diff --git a/reactos/.hgeol b/.hgeol similarity index 100% rename from reactos/.hgeol rename to .hgeol diff --git a/reactos/CMakeLists.txt b/CMakeLists.txt similarity index 100% rename from reactos/CMakeLists.txt rename to CMakeLists.txt diff --git a/reactos/COPYING b/COPYING similarity index 100% rename from reactos/COPYING rename to COPYING diff --git a/reactos/COPYING.ARM b/COPYING.ARM similarity index 100% rename from reactos/COPYING.ARM rename to COPYING.ARM diff --git a/reactos/COPYING.LIB b/COPYING.LIB similarity index 100% rename from reactos/COPYING.LIB rename to COPYING.LIB diff --git a/reactos/COPYING3 b/COPYING3 similarity index 100% rename from reactos/COPYING3 rename to COPYING3 diff --git a/reactos/COPYING3.LIB b/COPYING3.LIB similarity index 100% rename from reactos/COPYING3.LIB rename to COPYING3.LIB diff --git a/reactos/CREDITS b/CREDITS similarity index 100% rename from reactos/CREDITS rename to CREDITS diff --git a/reactos/Doxyfile b/Doxyfile similarity index 100% rename from reactos/Doxyfile rename to Doxyfile diff --git a/reactos/INSTALL b/INSTALL similarity index 100% rename from reactos/INSTALL rename to INSTALL diff --git a/reactos/Makefile b/Makefile similarity index 100% rename from reactos/Makefile rename to Makefile diff --git a/reactos/PreLoad.cmake b/PreLoad.cmake similarity index 100% rename from reactos/PreLoad.cmake rename to PreLoad.cmake diff --git a/reactos/README b/README similarity index 100% rename from reactos/README rename to README diff --git a/reactos/ReactOS-amd64.rbuild b/ReactOS-amd64.rbuild similarity index 100% rename from reactos/ReactOS-amd64.rbuild rename to ReactOS-amd64.rbuild diff --git a/reactos/ReactOS-arm.rbuild b/ReactOS-arm.rbuild similarity index 100% rename from reactos/ReactOS-arm.rbuild rename to ReactOS-arm.rbuild diff --git a/reactos/ReactOS-generic.rbuild b/ReactOS-generic.rbuild similarity index 100% rename from reactos/ReactOS-generic.rbuild rename to ReactOS-generic.rbuild diff --git a/reactos/ReactOS-i386.rbuild b/ReactOS-i386.rbuild similarity index 100% rename from reactos/ReactOS-i386.rbuild rename to ReactOS-i386.rbuild diff --git a/reactos/ReactOS-ppc.rbuild b/ReactOS-ppc.rbuild similarity index 100% rename from reactos/ReactOS-ppc.rbuild rename to ReactOS-ppc.rbuild diff --git a/reactos/apistatus.lst b/apistatus.lst similarity index 100% rename from reactos/apistatus.lst rename to apistatus.lst diff --git a/reactos/base/CMakeLists.txt b/base/CMakeLists.txt similarity index 100% rename from reactos/base/CMakeLists.txt rename to base/CMakeLists.txt diff --git a/reactos/base/applications/CMakeLists.txt b/base/applications/CMakeLists.txt similarity index 100% rename from reactos/base/applications/CMakeLists.txt rename to base/applications/CMakeLists.txt diff --git a/reactos/base/applications/applications.rbuild b/base/applications/applications.rbuild similarity index 100% rename from reactos/base/applications/applications.rbuild rename to base/applications/applications.rbuild diff --git a/reactos/base/applications/cacls/CMakeLists.txt b/base/applications/cacls/CMakeLists.txt similarity index 100% rename from reactos/base/applications/cacls/CMakeLists.txt rename to base/applications/cacls/CMakeLists.txt diff --git a/reactos/base/applications/cacls/cacls.c b/base/applications/cacls/cacls.c similarity index 100% rename from reactos/base/applications/cacls/cacls.c rename to base/applications/cacls/cacls.c diff --git a/reactos/base/applications/cacls/cacls.rbuild b/base/applications/cacls/cacls.rbuild similarity index 100% rename from reactos/base/applications/cacls/cacls.rbuild rename to base/applications/cacls/cacls.rbuild diff --git a/reactos/base/applications/cacls/cacls.rc b/base/applications/cacls/cacls.rc similarity index 100% rename from reactos/base/applications/cacls/cacls.rc rename to base/applications/cacls/cacls.rc diff --git a/reactos/base/applications/cacls/lang/bg-BG.rc b/base/applications/cacls/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/cacls/lang/bg-BG.rc rename to base/applications/cacls/lang/bg-BG.rc diff --git a/reactos/base/applications/cacls/lang/ca-ES.rc b/base/applications/cacls/lang/ca-ES.rc similarity index 100% rename from reactos/base/applications/cacls/lang/ca-ES.rc rename to base/applications/cacls/lang/ca-ES.rc diff --git a/reactos/base/applications/cacls/lang/cs-CZ.rc b/base/applications/cacls/lang/cs-CZ.rc similarity index 100% rename from reactos/base/applications/cacls/lang/cs-CZ.rc rename to base/applications/cacls/lang/cs-CZ.rc diff --git a/reactos/base/applications/cacls/lang/da-DA.rc b/base/applications/cacls/lang/da-DA.rc similarity index 100% rename from reactos/base/applications/cacls/lang/da-DA.rc rename to base/applications/cacls/lang/da-DA.rc diff --git a/reactos/base/applications/cacls/lang/de-DE.rc b/base/applications/cacls/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/cacls/lang/de-DE.rc rename to base/applications/cacls/lang/de-DE.rc diff --git a/reactos/base/applications/cacls/lang/el-GR.rc b/base/applications/cacls/lang/el-GR.rc similarity index 100% rename from reactos/base/applications/cacls/lang/el-GR.rc rename to base/applications/cacls/lang/el-GR.rc diff --git a/reactos/base/applications/cacls/lang/en-US.rc b/base/applications/cacls/lang/en-US.rc similarity index 100% rename from reactos/base/applications/cacls/lang/en-US.rc rename to base/applications/cacls/lang/en-US.rc diff --git a/reactos/base/applications/cacls/lang/es-ES.rc b/base/applications/cacls/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/cacls/lang/es-ES.rc rename to base/applications/cacls/lang/es-ES.rc diff --git a/reactos/base/applications/cacls/lang/fr-FR.rc b/base/applications/cacls/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/cacls/lang/fr-FR.rc rename to base/applications/cacls/lang/fr-FR.rc diff --git a/reactos/base/applications/cacls/lang/id-ID.rc b/base/applications/cacls/lang/id-ID.rc similarity index 100% rename from reactos/base/applications/cacls/lang/id-ID.rc rename to base/applications/cacls/lang/id-ID.rc diff --git a/reactos/base/applications/cacls/lang/it-IT.rc b/base/applications/cacls/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/cacls/lang/it-IT.rc rename to base/applications/cacls/lang/it-IT.rc diff --git a/reactos/base/applications/cacls/lang/ja-JP.rc b/base/applications/cacls/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/cacls/lang/ja-JP.rc rename to base/applications/cacls/lang/ja-JP.rc diff --git a/reactos/base/applications/cacls/lang/ko-KR.rc b/base/applications/cacls/lang/ko-KR.rc similarity index 100% rename from reactos/base/applications/cacls/lang/ko-KR.rc rename to base/applications/cacls/lang/ko-KR.rc diff --git a/reactos/base/applications/cacls/lang/nl-NL.rc b/base/applications/cacls/lang/nl-NL.rc similarity index 100% rename from reactos/base/applications/cacls/lang/nl-NL.rc rename to base/applications/cacls/lang/nl-NL.rc diff --git a/reactos/base/applications/cacls/lang/no-NO.rc b/base/applications/cacls/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/cacls/lang/no-NO.rc rename to base/applications/cacls/lang/no-NO.rc diff --git a/reactos/base/applications/cacls/lang/pl-PL.rc b/base/applications/cacls/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/cacls/lang/pl-PL.rc rename to base/applications/cacls/lang/pl-PL.rc diff --git a/reactos/base/applications/cacls/lang/pt-BR.rc b/base/applications/cacls/lang/pt-BR.rc similarity index 100% rename from reactos/base/applications/cacls/lang/pt-BR.rc rename to base/applications/cacls/lang/pt-BR.rc diff --git a/reactos/base/applications/cacls/lang/ro-RO.rc b/base/applications/cacls/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/cacls/lang/ro-RO.rc rename to base/applications/cacls/lang/ro-RO.rc diff --git a/reactos/base/applications/cacls/lang/ru-RU.rc b/base/applications/cacls/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/cacls/lang/ru-RU.rc rename to base/applications/cacls/lang/ru-RU.rc diff --git a/reactos/base/applications/cacls/lang/sk-SK.rc b/base/applications/cacls/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/cacls/lang/sk-SK.rc rename to base/applications/cacls/lang/sk-SK.rc diff --git a/reactos/base/applications/cacls/lang/sv-SE.rc b/base/applications/cacls/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/cacls/lang/sv-SE.rc rename to base/applications/cacls/lang/sv-SE.rc diff --git a/reactos/base/applications/cacls/lang/uk-UA.rc b/base/applications/cacls/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/cacls/lang/uk-UA.rc rename to base/applications/cacls/lang/uk-UA.rc diff --git a/reactos/base/applications/cacls/lang/zh-CN.rc b/base/applications/cacls/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/cacls/lang/zh-CN.rc rename to base/applications/cacls/lang/zh-CN.rc diff --git a/reactos/base/applications/cacls/lang/zh-TW.rc b/base/applications/cacls/lang/zh-TW.rc similarity index 100% rename from reactos/base/applications/cacls/lang/zh-TW.rc rename to base/applications/cacls/lang/zh-TW.rc diff --git a/reactos/base/applications/cacls/precomp.h b/base/applications/cacls/precomp.h similarity index 100% rename from reactos/base/applications/cacls/precomp.h rename to base/applications/cacls/precomp.h diff --git a/reactos/base/applications/cacls/resource.h b/base/applications/cacls/resource.h similarity index 100% rename from reactos/base/applications/cacls/resource.h rename to base/applications/cacls/resource.h diff --git a/reactos/base/applications/cacls/rsrc.rc b/base/applications/cacls/rsrc.rc similarity index 100% rename from reactos/base/applications/cacls/rsrc.rc rename to base/applications/cacls/rsrc.rc diff --git a/reactos/base/applications/calc/CMakeLists.txt b/base/applications/calc/CMakeLists.txt similarity index 100% rename from reactos/base/applications/calc/CMakeLists.txt rename to base/applications/calc/CMakeLists.txt diff --git a/reactos/base/applications/calc/about.c b/base/applications/calc/about.c similarity index 100% rename from reactos/base/applications/calc/about.c rename to base/applications/calc/about.c diff --git a/reactos/base/applications/calc/calc.h b/base/applications/calc/calc.h similarity index 100% rename from reactos/base/applications/calc/calc.h rename to base/applications/calc/calc.h diff --git a/reactos/base/applications/calc/calc.rbuild b/base/applications/calc/calc.rbuild similarity index 100% rename from reactos/base/applications/calc/calc.rbuild rename to base/applications/calc/calc.rbuild diff --git a/reactos/base/applications/calc/convert.c b/base/applications/calc/convert.c similarity index 100% rename from reactos/base/applications/calc/convert.c rename to base/applications/calc/convert.c diff --git a/reactos/base/applications/calc/copying.txt b/base/applications/calc/copying.txt similarity index 100% rename from reactos/base/applications/calc/copying.txt rename to base/applications/calc/copying.txt diff --git a/reactos/base/applications/calc/fun_mpfr.c b/base/applications/calc/fun_mpfr.c similarity index 100% rename from reactos/base/applications/calc/fun_mpfr.c rename to base/applications/calc/fun_mpfr.c diff --git a/reactos/base/applications/calc/function.c b/base/applications/calc/function.c similarity index 100% rename from reactos/base/applications/calc/function.c rename to base/applications/calc/function.c diff --git a/reactos/base/applications/calc/help.txt b/base/applications/calc/help.txt similarity index 100% rename from reactos/base/applications/calc/help.txt rename to base/applications/calc/help.txt diff --git a/reactos/base/applications/calc/lang/bg-BG.rc b/base/applications/calc/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/calc/lang/bg-BG.rc rename to base/applications/calc/lang/bg-BG.rc diff --git a/reactos/base/applications/calc/lang/cs-CZ.rc b/base/applications/calc/lang/cs-CZ.rc similarity index 100% rename from reactos/base/applications/calc/lang/cs-CZ.rc rename to base/applications/calc/lang/cs-CZ.rc diff --git a/reactos/base/applications/calc/lang/de-DE.rc b/base/applications/calc/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/calc/lang/de-DE.rc rename to base/applications/calc/lang/de-DE.rc diff --git a/reactos/base/applications/calc/lang/el-GR.rc b/base/applications/calc/lang/el-GR.rc similarity index 100% rename from reactos/base/applications/calc/lang/el-GR.rc rename to base/applications/calc/lang/el-GR.rc diff --git a/reactos/base/applications/calc/lang/en-US.rc b/base/applications/calc/lang/en-US.rc similarity index 100% rename from reactos/base/applications/calc/lang/en-US.rc rename to base/applications/calc/lang/en-US.rc diff --git a/reactos/base/applications/calc/lang/es-ES.rc b/base/applications/calc/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/calc/lang/es-ES.rc rename to base/applications/calc/lang/es-ES.rc diff --git a/reactos/base/applications/calc/lang/fr-FR.rc b/base/applications/calc/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/calc/lang/fr-FR.rc rename to base/applications/calc/lang/fr-FR.rc diff --git a/reactos/base/applications/calc/lang/it-IT.rc b/base/applications/calc/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/calc/lang/it-IT.rc rename to base/applications/calc/lang/it-IT.rc diff --git a/reactos/base/applications/calc/lang/ja-JP.rc b/base/applications/calc/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/calc/lang/ja-JP.rc rename to base/applications/calc/lang/ja-JP.rc diff --git a/reactos/base/applications/calc/lang/ko-KR.rc b/base/applications/calc/lang/ko-KR.rc similarity index 100% rename from reactos/base/applications/calc/lang/ko-KR.rc rename to base/applications/calc/lang/ko-KR.rc diff --git a/reactos/base/applications/calc/lang/nl-NL.rc b/base/applications/calc/lang/nl-NL.rc similarity index 100% rename from reactos/base/applications/calc/lang/nl-NL.rc rename to base/applications/calc/lang/nl-NL.rc diff --git a/reactos/base/applications/calc/lang/no-NO.rc b/base/applications/calc/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/calc/lang/no-NO.rc rename to base/applications/calc/lang/no-NO.rc diff --git a/reactos/base/applications/calc/lang/pl-PL.rc b/base/applications/calc/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/calc/lang/pl-PL.rc rename to base/applications/calc/lang/pl-PL.rc diff --git a/reactos/base/applications/calc/lang/pt-BR.rc b/base/applications/calc/lang/pt-BR.rc similarity index 100% rename from reactos/base/applications/calc/lang/pt-BR.rc rename to base/applications/calc/lang/pt-BR.rc diff --git a/reactos/base/applications/calc/lang/ro-RO.rc b/base/applications/calc/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/calc/lang/ro-RO.rc rename to base/applications/calc/lang/ro-RO.rc diff --git a/reactos/base/applications/calc/lang/ru-RU.rc b/base/applications/calc/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/calc/lang/ru-RU.rc rename to base/applications/calc/lang/ru-RU.rc diff --git a/reactos/base/applications/calc/lang/sk-SK.rc b/base/applications/calc/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/calc/lang/sk-SK.rc rename to base/applications/calc/lang/sk-SK.rc diff --git a/reactos/base/applications/calc/lang/sv-SE.rc b/base/applications/calc/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/calc/lang/sv-SE.rc rename to base/applications/calc/lang/sv-SE.rc diff --git a/reactos/base/applications/calc/lang/th-TH.rc b/base/applications/calc/lang/th-TH.rc similarity index 100% rename from reactos/base/applications/calc/lang/th-TH.rc rename to base/applications/calc/lang/th-TH.rc diff --git a/reactos/base/applications/calc/lang/uk-UA.rc b/base/applications/calc/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/calc/lang/uk-UA.rc rename to base/applications/calc/lang/uk-UA.rc diff --git a/reactos/base/applications/calc/lang/zh-CN.rc b/base/applications/calc/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/calc/lang/zh-CN.rc rename to base/applications/calc/lang/zh-CN.rc diff --git a/reactos/base/applications/calc/readme.txt b/base/applications/calc/readme.txt similarity index 100% rename from reactos/base/applications/calc/readme.txt rename to base/applications/calc/readme.txt diff --git a/reactos/base/applications/calc/res/ROS_logo.bmp b/base/applications/calc/res/ROS_logo.bmp similarity index 100% rename from reactos/base/applications/calc/res/ROS_logo.bmp rename to base/applications/calc/res/ROS_logo.bmp diff --git a/reactos/base/applications/calc/res/calc.ico b/base/applications/calc/res/calc.ico similarity index 100% rename from reactos/base/applications/calc/res/calc.ico rename to base/applications/calc/res/calc.ico diff --git a/reactos/base/applications/calc/res/calc_sm.ico b/base/applications/calc/res/calc_sm.ico similarity index 100% rename from reactos/base/applications/calc/res/calc_sm.ico rename to base/applications/calc/res/calc_sm.ico diff --git a/reactos/base/applications/calc/resource.h b/base/applications/calc/resource.h similarity index 100% rename from reactos/base/applications/calc/resource.h rename to base/applications/calc/resource.h diff --git a/reactos/base/applications/calc/resource.rc b/base/applications/calc/resource.rc similarity index 100% rename from reactos/base/applications/calc/resource.rc rename to base/applications/calc/resource.rc diff --git a/reactos/base/applications/calc/rpn.c b/base/applications/calc/rpn.c similarity index 100% rename from reactos/base/applications/calc/rpn.c rename to base/applications/calc/rpn.c diff --git a/reactos/base/applications/calc/rpn_mpfr.c b/base/applications/calc/rpn_mpfr.c similarity index 100% rename from reactos/base/applications/calc/rpn_mpfr.c rename to base/applications/calc/rpn_mpfr.c diff --git a/reactos/base/applications/calc/todo.txt b/base/applications/calc/todo.txt similarity index 100% rename from reactos/base/applications/calc/todo.txt rename to base/applications/calc/todo.txt diff --git a/reactos/base/applications/calc/utl.c b/base/applications/calc/utl.c similarity index 100% rename from reactos/base/applications/calc/utl.c rename to base/applications/calc/utl.c diff --git a/reactos/base/applications/calc/utl_mpfr.c b/base/applications/calc/utl_mpfr.c similarity index 100% rename from reactos/base/applications/calc/utl_mpfr.c rename to base/applications/calc/utl_mpfr.c diff --git a/reactos/base/applications/calc/whatsnew.txt b/base/applications/calc/whatsnew.txt similarity index 100% rename from reactos/base/applications/calc/whatsnew.txt rename to base/applications/calc/whatsnew.txt diff --git a/reactos/base/applications/calc/winmain.c b/base/applications/calc/winmain.c similarity index 100% rename from reactos/base/applications/calc/winmain.c rename to base/applications/calc/winmain.c diff --git a/reactos/base/applications/calc/wmmsg.h b/base/applications/calc/wmmsg.h similarity index 100% rename from reactos/base/applications/calc/wmmsg.h rename to base/applications/calc/wmmsg.h diff --git a/reactos/base/applications/charmap/CMakeLists.txt b/base/applications/charmap/CMakeLists.txt similarity index 100% rename from reactos/base/applications/charmap/CMakeLists.txt rename to base/applications/charmap/CMakeLists.txt diff --git a/reactos/base/applications/charmap/about.c b/base/applications/charmap/about.c similarity index 100% rename from reactos/base/applications/charmap/about.c rename to base/applications/charmap/about.c diff --git a/reactos/base/applications/charmap/charmap.c b/base/applications/charmap/charmap.c similarity index 100% rename from reactos/base/applications/charmap/charmap.c rename to base/applications/charmap/charmap.c diff --git a/reactos/base/applications/charmap/charmap.rbuild b/base/applications/charmap/charmap.rbuild similarity index 100% rename from reactos/base/applications/charmap/charmap.rbuild rename to base/applications/charmap/charmap.rbuild diff --git a/reactos/base/applications/charmap/charmap.rc b/base/applications/charmap/charmap.rc similarity index 100% rename from reactos/base/applications/charmap/charmap.rc rename to base/applications/charmap/charmap.rc diff --git a/reactos/base/applications/charmap/lang/bg-BG.rc b/base/applications/charmap/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/charmap/lang/bg-BG.rc rename to base/applications/charmap/lang/bg-BG.rc diff --git a/reactos/base/applications/charmap/lang/ca-ES.rc b/base/applications/charmap/lang/ca-ES.rc similarity index 100% rename from reactos/base/applications/charmap/lang/ca-ES.rc rename to base/applications/charmap/lang/ca-ES.rc diff --git a/reactos/base/applications/charmap/lang/cs-CZ.rc b/base/applications/charmap/lang/cs-CZ.rc similarity index 100% rename from reactos/base/applications/charmap/lang/cs-CZ.rc rename to base/applications/charmap/lang/cs-CZ.rc diff --git a/reactos/base/applications/charmap/lang/de-DE.rc b/base/applications/charmap/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/charmap/lang/de-DE.rc rename to base/applications/charmap/lang/de-DE.rc diff --git a/reactos/base/applications/charmap/lang/el-GR.rc b/base/applications/charmap/lang/el-GR.rc similarity index 100% rename from reactos/base/applications/charmap/lang/el-GR.rc rename to base/applications/charmap/lang/el-GR.rc diff --git a/reactos/base/applications/charmap/lang/en-US.rc b/base/applications/charmap/lang/en-US.rc similarity index 100% rename from reactos/base/applications/charmap/lang/en-US.rc rename to base/applications/charmap/lang/en-US.rc diff --git a/reactos/base/applications/charmap/lang/es-ES.rc b/base/applications/charmap/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/charmap/lang/es-ES.rc rename to base/applications/charmap/lang/es-ES.rc diff --git a/reactos/base/applications/charmap/lang/fr-FR.rc b/base/applications/charmap/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/charmap/lang/fr-FR.rc rename to base/applications/charmap/lang/fr-FR.rc diff --git a/reactos/base/applications/charmap/lang/id-ID.rc b/base/applications/charmap/lang/id-ID.rc similarity index 100% rename from reactos/base/applications/charmap/lang/id-ID.rc rename to base/applications/charmap/lang/id-ID.rc diff --git a/reactos/base/applications/charmap/lang/it-IT.rc b/base/applications/charmap/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/charmap/lang/it-IT.rc rename to base/applications/charmap/lang/it-IT.rc diff --git a/reactos/base/applications/charmap/lang/ja-JP.rc b/base/applications/charmap/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/charmap/lang/ja-JP.rc rename to base/applications/charmap/lang/ja-JP.rc diff --git a/reactos/base/applications/charmap/lang/ko-KR.rc b/base/applications/charmap/lang/ko-KR.rc similarity index 100% rename from reactos/base/applications/charmap/lang/ko-KR.rc rename to base/applications/charmap/lang/ko-KR.rc diff --git a/reactos/base/applications/charmap/lang/lt-LT.rc b/base/applications/charmap/lang/lt-LT.rc similarity index 100% rename from reactos/base/applications/charmap/lang/lt-LT.rc rename to base/applications/charmap/lang/lt-LT.rc diff --git a/reactos/base/applications/charmap/lang/nl-NL.rc b/base/applications/charmap/lang/nl-NL.rc similarity index 100% rename from reactos/base/applications/charmap/lang/nl-NL.rc rename to base/applications/charmap/lang/nl-NL.rc diff --git a/reactos/base/applications/charmap/lang/no-NO.rc b/base/applications/charmap/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/charmap/lang/no-NO.rc rename to base/applications/charmap/lang/no-NO.rc diff --git a/reactos/base/applications/charmap/lang/pl-PL.rc b/base/applications/charmap/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/charmap/lang/pl-PL.rc rename to base/applications/charmap/lang/pl-PL.rc diff --git a/reactos/base/applications/charmap/lang/pt-BR.rc b/base/applications/charmap/lang/pt-BR.rc similarity index 100% rename from reactos/base/applications/charmap/lang/pt-BR.rc rename to base/applications/charmap/lang/pt-BR.rc diff --git a/reactos/base/applications/charmap/lang/ro-RO.rc b/base/applications/charmap/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/charmap/lang/ro-RO.rc rename to base/applications/charmap/lang/ro-RO.rc diff --git a/reactos/base/applications/charmap/lang/ru-RU.rc b/base/applications/charmap/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/charmap/lang/ru-RU.rc rename to base/applications/charmap/lang/ru-RU.rc diff --git a/reactos/base/applications/charmap/lang/sk-SK.rc b/base/applications/charmap/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/charmap/lang/sk-SK.rc rename to base/applications/charmap/lang/sk-SK.rc diff --git a/reactos/base/applications/charmap/lang/sv-SE.rc b/base/applications/charmap/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/charmap/lang/sv-SE.rc rename to base/applications/charmap/lang/sv-SE.rc diff --git a/reactos/base/applications/charmap/lang/uk-UA.rc b/base/applications/charmap/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/charmap/lang/uk-UA.rc rename to base/applications/charmap/lang/uk-UA.rc diff --git a/reactos/base/applications/charmap/lang/zh-CN.rc b/base/applications/charmap/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/charmap/lang/zh-CN.rc rename to base/applications/charmap/lang/zh-CN.rc diff --git a/reactos/base/applications/charmap/lang/zh-TW.rc b/base/applications/charmap/lang/zh-TW.rc similarity index 100% rename from reactos/base/applications/charmap/lang/zh-TW.rc rename to base/applications/charmap/lang/zh-TW.rc diff --git a/reactos/base/applications/charmap/lrgcell.c b/base/applications/charmap/lrgcell.c similarity index 100% rename from reactos/base/applications/charmap/lrgcell.c rename to base/applications/charmap/lrgcell.c diff --git a/reactos/base/applications/charmap/map.c b/base/applications/charmap/map.c similarity index 100% rename from reactos/base/applications/charmap/map.c rename to base/applications/charmap/map.c diff --git a/reactos/base/applications/charmap/precomp.h b/base/applications/charmap/precomp.h similarity index 100% rename from reactos/base/applications/charmap/precomp.h rename to base/applications/charmap/precomp.h diff --git a/reactos/base/applications/charmap/res/charmap.ico b/base/applications/charmap/res/charmap.ico similarity index 100% rename from reactos/base/applications/charmap/res/charmap.ico rename to base/applications/charmap/res/charmap.ico diff --git a/reactos/base/applications/charmap/resource.h b/base/applications/charmap/resource.h similarity index 100% rename from reactos/base/applications/charmap/resource.h rename to base/applications/charmap/resource.h diff --git a/reactos/base/applications/charmap/rsrc.rc b/base/applications/charmap/rsrc.rc similarity index 100% rename from reactos/base/applications/charmap/rsrc.rc rename to base/applications/charmap/rsrc.rc diff --git a/reactos/base/applications/cmdutils/CMakeLists.txt b/base/applications/cmdutils/CMakeLists.txt similarity index 100% rename from reactos/base/applications/cmdutils/CMakeLists.txt rename to base/applications/cmdutils/CMakeLists.txt diff --git a/reactos/base/applications/cmdutils/cmdutils.rbuild b/base/applications/cmdutils/cmdutils.rbuild similarity index 100% rename from reactos/base/applications/cmdutils/cmdutils.rbuild rename to base/applications/cmdutils/cmdutils.rbuild diff --git a/reactos/base/applications/cmdutils/dbgprint/CMakeLists.txt b/base/applications/cmdutils/dbgprint/CMakeLists.txt similarity index 100% rename from reactos/base/applications/cmdutils/dbgprint/CMakeLists.txt rename to base/applications/cmdutils/dbgprint/CMakeLists.txt diff --git a/reactos/base/applications/cmdutils/dbgprint/dbgprint.c b/base/applications/cmdutils/dbgprint/dbgprint.c similarity index 100% rename from reactos/base/applications/cmdutils/dbgprint/dbgprint.c rename to base/applications/cmdutils/dbgprint/dbgprint.c diff --git a/reactos/base/applications/cmdutils/dbgprint/dbgprint.rbuild b/base/applications/cmdutils/dbgprint/dbgprint.rbuild similarity index 100% rename from reactos/base/applications/cmdutils/dbgprint/dbgprint.rbuild rename to base/applications/cmdutils/dbgprint/dbgprint.rbuild diff --git a/reactos/base/applications/cmdutils/doskey/CMakeLists.txt b/base/applications/cmdutils/doskey/CMakeLists.txt similarity index 100% rename from reactos/base/applications/cmdutils/doskey/CMakeLists.txt rename to base/applications/cmdutils/doskey/CMakeLists.txt diff --git a/reactos/base/applications/cmdutils/doskey/doskey.c b/base/applications/cmdutils/doskey/doskey.c similarity index 100% rename from reactos/base/applications/cmdutils/doskey/doskey.c rename to base/applications/cmdutils/doskey/doskey.c diff --git a/reactos/base/applications/cmdutils/doskey/doskey.h b/base/applications/cmdutils/doskey/doskey.h similarity index 100% rename from reactos/base/applications/cmdutils/doskey/doskey.h rename to base/applications/cmdutils/doskey/doskey.h diff --git a/reactos/base/applications/cmdutils/doskey/doskey.rbuild b/base/applications/cmdutils/doskey/doskey.rbuild similarity index 100% rename from reactos/base/applications/cmdutils/doskey/doskey.rbuild rename to base/applications/cmdutils/doskey/doskey.rbuild diff --git a/reactos/base/applications/cmdutils/doskey/doskey.rc b/base/applications/cmdutils/doskey/doskey.rc similarity index 100% rename from reactos/base/applications/cmdutils/doskey/doskey.rc rename to base/applications/cmdutils/doskey/doskey.rc diff --git a/reactos/base/applications/cmdutils/doskey/lang/bg-BG.rc b/base/applications/cmdutils/doskey/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/cmdutils/doskey/lang/bg-BG.rc rename to base/applications/cmdutils/doskey/lang/bg-BG.rc diff --git a/reactos/base/applications/cmdutils/doskey/lang/de-DE.rc b/base/applications/cmdutils/doskey/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/cmdutils/doskey/lang/de-DE.rc rename to base/applications/cmdutils/doskey/lang/de-DE.rc diff --git a/reactos/base/applications/cmdutils/doskey/lang/en-US.rc b/base/applications/cmdutils/doskey/lang/en-US.rc similarity index 100% rename from reactos/base/applications/cmdutils/doskey/lang/en-US.rc rename to base/applications/cmdutils/doskey/lang/en-US.rc diff --git a/reactos/base/applications/cmdutils/doskey/lang/es-ES.rc b/base/applications/cmdutils/doskey/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/cmdutils/doskey/lang/es-ES.rc rename to base/applications/cmdutils/doskey/lang/es-ES.rc diff --git a/reactos/base/applications/cmdutils/doskey/lang/fr-FR.rc b/base/applications/cmdutils/doskey/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/cmdutils/doskey/lang/fr-FR.rc rename to base/applications/cmdutils/doskey/lang/fr-FR.rc diff --git a/reactos/base/applications/cmdutils/doskey/lang/pl-PL.rc b/base/applications/cmdutils/doskey/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/cmdutils/doskey/lang/pl-PL.rc rename to base/applications/cmdutils/doskey/lang/pl-PL.rc diff --git a/reactos/base/applications/cmdutils/doskey/lang/ro-RO.rc b/base/applications/cmdutils/doskey/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/cmdutils/doskey/lang/ro-RO.rc rename to base/applications/cmdutils/doskey/lang/ro-RO.rc diff --git a/reactos/base/applications/cmdutils/doskey/lang/sv-SE.rc b/base/applications/cmdutils/doskey/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/cmdutils/doskey/lang/sv-SE.rc rename to base/applications/cmdutils/doskey/lang/sv-SE.rc diff --git a/reactos/base/applications/cmdutils/doskey/lang/uk-UA.rc b/base/applications/cmdutils/doskey/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/cmdutils/doskey/lang/uk-UA.rc rename to base/applications/cmdutils/doskey/lang/uk-UA.rc diff --git a/reactos/base/applications/cmdutils/doskey/lang/zh-CN.rc b/base/applications/cmdutils/doskey/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/cmdutils/doskey/lang/zh-CN.rc rename to base/applications/cmdutils/doskey/lang/zh-CN.rc diff --git a/reactos/base/applications/cmdutils/find/CMakeLists.txt b/base/applications/cmdutils/find/CMakeLists.txt similarity index 100% rename from reactos/base/applications/cmdutils/find/CMakeLists.txt rename to base/applications/cmdutils/find/CMakeLists.txt diff --git a/reactos/base/applications/cmdutils/find/find.c b/base/applications/cmdutils/find/find.c similarity index 100% rename from reactos/base/applications/cmdutils/find/find.c rename to base/applications/cmdutils/find/find.c diff --git a/reactos/base/applications/cmdutils/find/find.rbuild b/base/applications/cmdutils/find/find.rbuild similarity index 100% rename from reactos/base/applications/cmdutils/find/find.rbuild rename to base/applications/cmdutils/find/find.rbuild diff --git a/reactos/base/applications/cmdutils/find/find.rc b/base/applications/cmdutils/find/find.rc similarity index 100% rename from reactos/base/applications/cmdutils/find/find.rc rename to base/applications/cmdutils/find/find.rc diff --git a/reactos/base/applications/cmdutils/find/lang/bg-BG.rc b/base/applications/cmdutils/find/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/cmdutils/find/lang/bg-BG.rc rename to base/applications/cmdutils/find/lang/bg-BG.rc diff --git a/reactos/base/applications/cmdutils/find/lang/ca-ES.rc b/base/applications/cmdutils/find/lang/ca-ES.rc similarity index 100% rename from reactos/base/applications/cmdutils/find/lang/ca-ES.rc rename to base/applications/cmdutils/find/lang/ca-ES.rc diff --git a/reactos/base/applications/cmdutils/find/lang/cs-CZ.rc b/base/applications/cmdutils/find/lang/cs-CZ.rc similarity index 100% rename from reactos/base/applications/cmdutils/find/lang/cs-CZ.rc rename to base/applications/cmdutils/find/lang/cs-CZ.rc diff --git a/reactos/base/applications/cmdutils/find/lang/de-DE.rc b/base/applications/cmdutils/find/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/cmdutils/find/lang/de-DE.rc rename to base/applications/cmdutils/find/lang/de-DE.rc diff --git a/reactos/base/applications/cmdutils/find/lang/el-GR.rc b/base/applications/cmdutils/find/lang/el-GR.rc similarity index 100% rename from reactos/base/applications/cmdutils/find/lang/el-GR.rc rename to base/applications/cmdutils/find/lang/el-GR.rc diff --git a/reactos/base/applications/cmdutils/find/lang/en-US.rc b/base/applications/cmdutils/find/lang/en-US.rc similarity index 100% rename from reactos/base/applications/cmdutils/find/lang/en-US.rc rename to base/applications/cmdutils/find/lang/en-US.rc diff --git a/reactos/base/applications/cmdutils/find/lang/es-ES.rc b/base/applications/cmdutils/find/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/cmdutils/find/lang/es-ES.rc rename to base/applications/cmdutils/find/lang/es-ES.rc diff --git a/reactos/base/applications/cmdutils/find/lang/fr-FR.rc b/base/applications/cmdutils/find/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/cmdutils/find/lang/fr-FR.rc rename to base/applications/cmdutils/find/lang/fr-FR.rc diff --git a/reactos/base/applications/cmdutils/find/lang/it-IT.rc b/base/applications/cmdutils/find/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/cmdutils/find/lang/it-IT.rc rename to base/applications/cmdutils/find/lang/it-IT.rc diff --git a/reactos/base/applications/cmdutils/find/lang/lt-LT.rc b/base/applications/cmdutils/find/lang/lt-LT.rc similarity index 100% rename from reactos/base/applications/cmdutils/find/lang/lt-LT.rc rename to base/applications/cmdutils/find/lang/lt-LT.rc diff --git a/reactos/base/applications/cmdutils/find/lang/no-NO.rc b/base/applications/cmdutils/find/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/cmdutils/find/lang/no-NO.rc rename to base/applications/cmdutils/find/lang/no-NO.rc diff --git a/reactos/base/applications/cmdutils/find/lang/pl-PL.rc b/base/applications/cmdutils/find/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/cmdutils/find/lang/pl-PL.rc rename to base/applications/cmdutils/find/lang/pl-PL.rc diff --git a/reactos/base/applications/cmdutils/find/lang/pt-BR.rc b/base/applications/cmdutils/find/lang/pt-BR.rc similarity index 100% rename from reactos/base/applications/cmdutils/find/lang/pt-BR.rc rename to base/applications/cmdutils/find/lang/pt-BR.rc diff --git a/reactos/base/applications/cmdutils/find/lang/ro-RO.rc b/base/applications/cmdutils/find/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/cmdutils/find/lang/ro-RO.rc rename to base/applications/cmdutils/find/lang/ro-RO.rc diff --git a/reactos/base/applications/cmdutils/find/lang/ru-RU.rc b/base/applications/cmdutils/find/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/cmdutils/find/lang/ru-RU.rc rename to base/applications/cmdutils/find/lang/ru-RU.rc diff --git a/reactos/base/applications/cmdutils/find/lang/sk-SK.rc b/base/applications/cmdutils/find/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/cmdutils/find/lang/sk-SK.rc rename to base/applications/cmdutils/find/lang/sk-SK.rc diff --git a/reactos/base/applications/cmdutils/find/lang/sv-SE.rc b/base/applications/cmdutils/find/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/cmdutils/find/lang/sv-SE.rc rename to base/applications/cmdutils/find/lang/sv-SE.rc diff --git a/reactos/base/applications/cmdutils/find/lang/uk-UA.rc b/base/applications/cmdutils/find/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/cmdutils/find/lang/uk-UA.rc rename to base/applications/cmdutils/find/lang/uk-UA.rc diff --git a/reactos/base/applications/cmdutils/find/lang/zh-CN.rc b/base/applications/cmdutils/find/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/cmdutils/find/lang/zh-CN.rc rename to base/applications/cmdutils/find/lang/zh-CN.rc diff --git a/reactos/base/applications/cmdutils/find/resource.h b/base/applications/cmdutils/find/resource.h similarity index 100% rename from reactos/base/applications/cmdutils/find/resource.h rename to base/applications/cmdutils/find/resource.h diff --git a/reactos/base/applications/cmdutils/find/rsrc.rc b/base/applications/cmdutils/find/rsrc.rc similarity index 100% rename from reactos/base/applications/cmdutils/find/rsrc.rc rename to base/applications/cmdutils/find/rsrc.rc diff --git a/reactos/base/applications/cmdutils/hostname/CMakeLists.txt b/base/applications/cmdutils/hostname/CMakeLists.txt similarity index 100% rename from reactos/base/applications/cmdutils/hostname/CMakeLists.txt rename to base/applications/cmdutils/hostname/CMakeLists.txt diff --git a/reactos/base/applications/cmdutils/hostname/hostname.c b/base/applications/cmdutils/hostname/hostname.c similarity index 100% rename from reactos/base/applications/cmdutils/hostname/hostname.c rename to base/applications/cmdutils/hostname/hostname.c diff --git a/reactos/base/applications/cmdutils/hostname/hostname.rbuild b/base/applications/cmdutils/hostname/hostname.rbuild similarity index 100% rename from reactos/base/applications/cmdutils/hostname/hostname.rbuild rename to base/applications/cmdutils/hostname/hostname.rbuild diff --git a/reactos/base/applications/cmdutils/hostname/hostname.rc b/base/applications/cmdutils/hostname/hostname.rc similarity index 100% rename from reactos/base/applications/cmdutils/hostname/hostname.rc rename to base/applications/cmdutils/hostname/hostname.rc diff --git a/reactos/base/applications/cmdutils/lodctr/CMakeLists.txt b/base/applications/cmdutils/lodctr/CMakeLists.txt similarity index 100% rename from reactos/base/applications/cmdutils/lodctr/CMakeLists.txt rename to base/applications/cmdutils/lodctr/CMakeLists.txt diff --git a/reactos/base/applications/cmdutils/lodctr/lodctr.rbuild b/base/applications/cmdutils/lodctr/lodctr.rbuild similarity index 100% rename from reactos/base/applications/cmdutils/lodctr/lodctr.rbuild rename to base/applications/cmdutils/lodctr/lodctr.rbuild diff --git a/reactos/base/applications/cmdutils/lodctr/lodctr_main.c b/base/applications/cmdutils/lodctr/lodctr_main.c similarity index 100% rename from reactos/base/applications/cmdutils/lodctr/lodctr_main.c rename to base/applications/cmdutils/lodctr/lodctr_main.c diff --git a/reactos/base/applications/cmdutils/more/CMakeLists.txt b/base/applications/cmdutils/more/CMakeLists.txt similarity index 100% rename from reactos/base/applications/cmdutils/more/CMakeLists.txt rename to base/applications/cmdutils/more/CMakeLists.txt diff --git a/reactos/base/applications/cmdutils/more/lang/bg-BG.rc b/base/applications/cmdutils/more/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/cmdutils/more/lang/bg-BG.rc rename to base/applications/cmdutils/more/lang/bg-BG.rc diff --git a/reactos/base/applications/cmdutils/more/lang/ca-ES.rc b/base/applications/cmdutils/more/lang/ca-ES.rc similarity index 100% rename from reactos/base/applications/cmdutils/more/lang/ca-ES.rc rename to base/applications/cmdutils/more/lang/ca-ES.rc diff --git a/reactos/base/applications/cmdutils/more/lang/cs-CZ.rc b/base/applications/cmdutils/more/lang/cs-CZ.rc similarity index 100% rename from reactos/base/applications/cmdutils/more/lang/cs-CZ.rc rename to base/applications/cmdutils/more/lang/cs-CZ.rc diff --git a/reactos/base/applications/cmdutils/more/lang/de-DE.rc b/base/applications/cmdutils/more/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/cmdutils/more/lang/de-DE.rc rename to base/applications/cmdutils/more/lang/de-DE.rc diff --git a/reactos/base/applications/cmdutils/more/lang/el-GR.rc b/base/applications/cmdutils/more/lang/el-GR.rc similarity index 100% rename from reactos/base/applications/cmdutils/more/lang/el-GR.rc rename to base/applications/cmdutils/more/lang/el-GR.rc diff --git a/reactos/base/applications/cmdutils/more/lang/en-US.rc b/base/applications/cmdutils/more/lang/en-US.rc similarity index 100% rename from reactos/base/applications/cmdutils/more/lang/en-US.rc rename to base/applications/cmdutils/more/lang/en-US.rc diff --git a/reactos/base/applications/cmdutils/more/lang/es-ES.rc b/base/applications/cmdutils/more/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/cmdutils/more/lang/es-ES.rc rename to base/applications/cmdutils/more/lang/es-ES.rc diff --git a/reactos/base/applications/cmdutils/more/lang/fr-FR.rc b/base/applications/cmdutils/more/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/cmdutils/more/lang/fr-FR.rc rename to base/applications/cmdutils/more/lang/fr-FR.rc diff --git a/reactos/base/applications/cmdutils/more/lang/it-IT.rc b/base/applications/cmdutils/more/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/cmdutils/more/lang/it-IT.rc rename to base/applications/cmdutils/more/lang/it-IT.rc diff --git a/reactos/base/applications/cmdutils/more/lang/lt-LT.rc b/base/applications/cmdutils/more/lang/lt-LT.rc similarity index 100% rename from reactos/base/applications/cmdutils/more/lang/lt-LT.rc rename to base/applications/cmdutils/more/lang/lt-LT.rc diff --git a/reactos/base/applications/cmdutils/more/lang/no-NO.rc b/base/applications/cmdutils/more/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/cmdutils/more/lang/no-NO.rc rename to base/applications/cmdutils/more/lang/no-NO.rc diff --git a/reactos/base/applications/cmdutils/more/lang/pl-PL.rc b/base/applications/cmdutils/more/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/cmdutils/more/lang/pl-PL.rc rename to base/applications/cmdutils/more/lang/pl-PL.rc diff --git a/reactos/base/applications/cmdutils/more/lang/ro-RO.rc b/base/applications/cmdutils/more/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/cmdutils/more/lang/ro-RO.rc rename to base/applications/cmdutils/more/lang/ro-RO.rc diff --git a/reactos/base/applications/cmdutils/more/lang/ru-RU.rc b/base/applications/cmdutils/more/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/cmdutils/more/lang/ru-RU.rc rename to base/applications/cmdutils/more/lang/ru-RU.rc diff --git a/reactos/base/applications/cmdutils/more/lang/sk-SK.rc b/base/applications/cmdutils/more/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/cmdutils/more/lang/sk-SK.rc rename to base/applications/cmdutils/more/lang/sk-SK.rc diff --git a/reactos/base/applications/cmdutils/more/lang/sv-SE.rc b/base/applications/cmdutils/more/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/cmdutils/more/lang/sv-SE.rc rename to base/applications/cmdutils/more/lang/sv-SE.rc diff --git a/reactos/base/applications/cmdutils/more/lang/uk-UA.rc b/base/applications/cmdutils/more/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/cmdutils/more/lang/uk-UA.rc rename to base/applications/cmdutils/more/lang/uk-UA.rc diff --git a/reactos/base/applications/cmdutils/more/lang/zh-CN.rc b/base/applications/cmdutils/more/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/cmdutils/more/lang/zh-CN.rc rename to base/applications/cmdutils/more/lang/zh-CN.rc diff --git a/reactos/base/applications/cmdutils/more/more.c b/base/applications/cmdutils/more/more.c similarity index 100% rename from reactos/base/applications/cmdutils/more/more.c rename to base/applications/cmdutils/more/more.c diff --git a/reactos/base/applications/cmdutils/more/more.rbuild b/base/applications/cmdutils/more/more.rbuild similarity index 100% rename from reactos/base/applications/cmdutils/more/more.rbuild rename to base/applications/cmdutils/more/more.rbuild diff --git a/reactos/base/applications/cmdutils/more/more.rc b/base/applications/cmdutils/more/more.rc similarity index 100% rename from reactos/base/applications/cmdutils/more/more.rc rename to base/applications/cmdutils/more/more.rc diff --git a/reactos/base/applications/cmdutils/more/resource.h b/base/applications/cmdutils/more/resource.h similarity index 100% rename from reactos/base/applications/cmdutils/more/resource.h rename to base/applications/cmdutils/more/resource.h diff --git a/reactos/base/applications/cmdutils/more/rsrc.rc b/base/applications/cmdutils/more/rsrc.rc similarity index 100% rename from reactos/base/applications/cmdutils/more/rsrc.rc rename to base/applications/cmdutils/more/rsrc.rc diff --git a/reactos/base/applications/cmdutils/reg/Bg.rc b/base/applications/cmdutils/reg/Bg.rc similarity index 100% rename from reactos/base/applications/cmdutils/reg/Bg.rc rename to base/applications/cmdutils/reg/Bg.rc diff --git a/reactos/base/applications/cmdutils/reg/CMakeLists.txt b/base/applications/cmdutils/reg/CMakeLists.txt similarity index 100% rename from reactos/base/applications/cmdutils/reg/CMakeLists.txt rename to base/applications/cmdutils/reg/CMakeLists.txt diff --git a/reactos/base/applications/cmdutils/reg/Da.rc b/base/applications/cmdutils/reg/Da.rc similarity index 100% rename from reactos/base/applications/cmdutils/reg/Da.rc rename to base/applications/cmdutils/reg/Da.rc diff --git a/reactos/base/applications/cmdutils/reg/De.rc b/base/applications/cmdutils/reg/De.rc similarity index 100% rename from reactos/base/applications/cmdutils/reg/De.rc rename to base/applications/cmdutils/reg/De.rc diff --git a/reactos/base/applications/cmdutils/reg/En.rc b/base/applications/cmdutils/reg/En.rc similarity index 100% rename from reactos/base/applications/cmdutils/reg/En.rc rename to base/applications/cmdutils/reg/En.rc diff --git a/reactos/base/applications/cmdutils/reg/Es.rc b/base/applications/cmdutils/reg/Es.rc similarity index 100% rename from reactos/base/applications/cmdutils/reg/Es.rc rename to base/applications/cmdutils/reg/Es.rc diff --git a/reactos/base/applications/cmdutils/reg/Fr.rc b/base/applications/cmdutils/reg/Fr.rc similarity index 100% rename from reactos/base/applications/cmdutils/reg/Fr.rc rename to base/applications/cmdutils/reg/Fr.rc diff --git a/reactos/base/applications/cmdutils/reg/It.rc b/base/applications/cmdutils/reg/It.rc similarity index 100% rename from reactos/base/applications/cmdutils/reg/It.rc rename to base/applications/cmdutils/reg/It.rc diff --git a/reactos/base/applications/cmdutils/reg/Ja.rc b/base/applications/cmdutils/reg/Ja.rc similarity index 100% rename from reactos/base/applications/cmdutils/reg/Ja.rc rename to base/applications/cmdutils/reg/Ja.rc diff --git a/reactos/base/applications/cmdutils/reg/Ko.rc b/base/applications/cmdutils/reg/Ko.rc similarity index 100% rename from reactos/base/applications/cmdutils/reg/Ko.rc rename to base/applications/cmdutils/reg/Ko.rc diff --git a/reactos/base/applications/cmdutils/reg/Lt.rc b/base/applications/cmdutils/reg/Lt.rc similarity index 100% rename from reactos/base/applications/cmdutils/reg/Lt.rc rename to base/applications/cmdutils/reg/Lt.rc diff --git a/reactos/base/applications/cmdutils/reg/Nl.rc b/base/applications/cmdutils/reg/Nl.rc similarity index 100% rename from reactos/base/applications/cmdutils/reg/Nl.rc rename to base/applications/cmdutils/reg/Nl.rc diff --git a/reactos/base/applications/cmdutils/reg/No.rc b/base/applications/cmdutils/reg/No.rc similarity index 100% rename from reactos/base/applications/cmdutils/reg/No.rc rename to base/applications/cmdutils/reg/No.rc diff --git a/reactos/base/applications/cmdutils/reg/Pl.rc b/base/applications/cmdutils/reg/Pl.rc similarity index 100% rename from reactos/base/applications/cmdutils/reg/Pl.rc rename to base/applications/cmdutils/reg/Pl.rc diff --git a/reactos/base/applications/cmdutils/reg/Pt.rc b/base/applications/cmdutils/reg/Pt.rc similarity index 100% rename from reactos/base/applications/cmdutils/reg/Pt.rc rename to base/applications/cmdutils/reg/Pt.rc diff --git a/reactos/base/applications/cmdutils/reg/Ro.rc b/base/applications/cmdutils/reg/Ro.rc similarity index 100% rename from reactos/base/applications/cmdutils/reg/Ro.rc rename to base/applications/cmdutils/reg/Ro.rc diff --git a/reactos/base/applications/cmdutils/reg/Ru.rc b/base/applications/cmdutils/reg/Ru.rc similarity index 100% rename from reactos/base/applications/cmdutils/reg/Ru.rc rename to base/applications/cmdutils/reg/Ru.rc diff --git a/reactos/base/applications/cmdutils/reg/Si.rc b/base/applications/cmdutils/reg/Si.rc similarity index 100% rename from reactos/base/applications/cmdutils/reg/Si.rc rename to base/applications/cmdutils/reg/Si.rc diff --git a/reactos/base/applications/cmdutils/reg/Sv.rc b/base/applications/cmdutils/reg/Sv.rc similarity index 100% rename from reactos/base/applications/cmdutils/reg/Sv.rc rename to base/applications/cmdutils/reg/Sv.rc diff --git a/reactos/base/applications/cmdutils/reg/Uk.rc b/base/applications/cmdutils/reg/Uk.rc similarity index 100% rename from reactos/base/applications/cmdutils/reg/Uk.rc rename to base/applications/cmdutils/reg/Uk.rc diff --git a/reactos/base/applications/cmdutils/reg/reg.c b/base/applications/cmdutils/reg/reg.c similarity index 100% rename from reactos/base/applications/cmdutils/reg/reg.c rename to base/applications/cmdutils/reg/reg.c diff --git a/reactos/base/applications/cmdutils/reg/reg.h b/base/applications/cmdutils/reg/reg.h similarity index 100% rename from reactos/base/applications/cmdutils/reg/reg.h rename to base/applications/cmdutils/reg/reg.h diff --git a/reactos/base/applications/cmdutils/reg/reg.rbuild b/base/applications/cmdutils/reg/reg.rbuild similarity index 100% rename from reactos/base/applications/cmdutils/reg/reg.rbuild rename to base/applications/cmdutils/reg/reg.rbuild diff --git a/reactos/base/applications/cmdutils/reg/rsrc.rc b/base/applications/cmdutils/reg/rsrc.rc similarity index 100% rename from reactos/base/applications/cmdutils/reg/rsrc.rc rename to base/applications/cmdutils/reg/rsrc.rc diff --git a/reactos/base/applications/cmdutils/xcopy/CMakeLists.txt b/base/applications/cmdutils/xcopy/CMakeLists.txt similarity index 100% rename from reactos/base/applications/cmdutils/xcopy/CMakeLists.txt rename to base/applications/cmdutils/xcopy/CMakeLists.txt diff --git a/reactos/base/applications/cmdutils/xcopy/Da.rc b/base/applications/cmdutils/xcopy/Da.rc similarity index 100% rename from reactos/base/applications/cmdutils/xcopy/Da.rc rename to base/applications/cmdutils/xcopy/Da.rc diff --git a/reactos/base/applications/cmdutils/xcopy/De.rc b/base/applications/cmdutils/xcopy/De.rc similarity index 100% rename from reactos/base/applications/cmdutils/xcopy/De.rc rename to base/applications/cmdutils/xcopy/De.rc diff --git a/reactos/base/applications/cmdutils/xcopy/En.rc b/base/applications/cmdutils/xcopy/En.rc similarity index 100% rename from reactos/base/applications/cmdutils/xcopy/En.rc rename to base/applications/cmdutils/xcopy/En.rc diff --git a/reactos/base/applications/cmdutils/xcopy/Es.rc b/base/applications/cmdutils/xcopy/Es.rc similarity index 100% rename from reactos/base/applications/cmdutils/xcopy/Es.rc rename to base/applications/cmdutils/xcopy/Es.rc diff --git a/reactos/base/applications/cmdutils/xcopy/Fr.rc b/base/applications/cmdutils/xcopy/Fr.rc similarity index 100% rename from reactos/base/applications/cmdutils/xcopy/Fr.rc rename to base/applications/cmdutils/xcopy/Fr.rc diff --git a/reactos/base/applications/cmdutils/xcopy/It.rc b/base/applications/cmdutils/xcopy/It.rc similarity index 100% rename from reactos/base/applications/cmdutils/xcopy/It.rc rename to base/applications/cmdutils/xcopy/It.rc diff --git a/reactos/base/applications/cmdutils/xcopy/Ja.rc b/base/applications/cmdutils/xcopy/Ja.rc similarity index 100% rename from reactos/base/applications/cmdutils/xcopy/Ja.rc rename to base/applications/cmdutils/xcopy/Ja.rc diff --git a/reactos/base/applications/cmdutils/xcopy/Ko.rc b/base/applications/cmdutils/xcopy/Ko.rc similarity index 100% rename from reactos/base/applications/cmdutils/xcopy/Ko.rc rename to base/applications/cmdutils/xcopy/Ko.rc diff --git a/reactos/base/applications/cmdutils/xcopy/Lt.rc b/base/applications/cmdutils/xcopy/Lt.rc similarity index 100% rename from reactos/base/applications/cmdutils/xcopy/Lt.rc rename to base/applications/cmdutils/xcopy/Lt.rc diff --git a/reactos/base/applications/cmdutils/xcopy/Nl.rc b/base/applications/cmdutils/xcopy/Nl.rc similarity index 100% rename from reactos/base/applications/cmdutils/xcopy/Nl.rc rename to base/applications/cmdutils/xcopy/Nl.rc diff --git a/reactos/base/applications/cmdutils/xcopy/No.rc b/base/applications/cmdutils/xcopy/No.rc similarity index 100% rename from reactos/base/applications/cmdutils/xcopy/No.rc rename to base/applications/cmdutils/xcopy/No.rc diff --git a/reactos/base/applications/cmdutils/xcopy/Pl.rc b/base/applications/cmdutils/xcopy/Pl.rc similarity index 100% rename from reactos/base/applications/cmdutils/xcopy/Pl.rc rename to base/applications/cmdutils/xcopy/Pl.rc diff --git a/reactos/base/applications/cmdutils/xcopy/Pt.rc b/base/applications/cmdutils/xcopy/Pt.rc similarity index 100% rename from reactos/base/applications/cmdutils/xcopy/Pt.rc rename to base/applications/cmdutils/xcopy/Pt.rc diff --git a/reactos/base/applications/cmdutils/xcopy/Ro.rc b/base/applications/cmdutils/xcopy/Ro.rc similarity index 100% rename from reactos/base/applications/cmdutils/xcopy/Ro.rc rename to base/applications/cmdutils/xcopy/Ro.rc diff --git a/reactos/base/applications/cmdutils/xcopy/Ru.rc b/base/applications/cmdutils/xcopy/Ru.rc similarity index 100% rename from reactos/base/applications/cmdutils/xcopy/Ru.rc rename to base/applications/cmdutils/xcopy/Ru.rc diff --git a/reactos/base/applications/cmdutils/xcopy/Si.rc b/base/applications/cmdutils/xcopy/Si.rc similarity index 100% rename from reactos/base/applications/cmdutils/xcopy/Si.rc rename to base/applications/cmdutils/xcopy/Si.rc diff --git a/reactos/base/applications/cmdutils/xcopy/Sr.rc b/base/applications/cmdutils/xcopy/Sr.rc similarity index 100% rename from reactos/base/applications/cmdutils/xcopy/Sr.rc rename to base/applications/cmdutils/xcopy/Sr.rc diff --git a/reactos/base/applications/cmdutils/xcopy/Sv.rc b/base/applications/cmdutils/xcopy/Sv.rc similarity index 100% rename from reactos/base/applications/cmdutils/xcopy/Sv.rc rename to base/applications/cmdutils/xcopy/Sv.rc diff --git a/reactos/base/applications/cmdutils/xcopy/Uk.rc b/base/applications/cmdutils/xcopy/Uk.rc similarity index 100% rename from reactos/base/applications/cmdutils/xcopy/Uk.rc rename to base/applications/cmdutils/xcopy/Uk.rc diff --git a/reactos/base/applications/cmdutils/xcopy/rsrc.rc b/base/applications/cmdutils/xcopy/rsrc.rc similarity index 100% rename from reactos/base/applications/cmdutils/xcopy/rsrc.rc rename to base/applications/cmdutils/xcopy/rsrc.rc diff --git a/reactos/base/applications/cmdutils/xcopy/xcopy.c b/base/applications/cmdutils/xcopy/xcopy.c similarity index 100% rename from reactos/base/applications/cmdutils/xcopy/xcopy.c rename to base/applications/cmdutils/xcopy/xcopy.c diff --git a/reactos/base/applications/cmdutils/xcopy/xcopy.h b/base/applications/cmdutils/xcopy/xcopy.h similarity index 100% rename from reactos/base/applications/cmdutils/xcopy/xcopy.h rename to base/applications/cmdutils/xcopy/xcopy.h diff --git a/reactos/base/applications/cmdutils/xcopy/xcopy.rbuild b/base/applications/cmdutils/xcopy/xcopy.rbuild similarity index 100% rename from reactos/base/applications/cmdutils/xcopy/xcopy.rbuild rename to base/applications/cmdutils/xcopy/xcopy.rbuild diff --git a/reactos/base/applications/control/CMakeLists.txt b/base/applications/control/CMakeLists.txt similarity index 100% rename from reactos/base/applications/control/CMakeLists.txt rename to base/applications/control/CMakeLists.txt diff --git a/reactos/base/applications/control/control.c b/base/applications/control/control.c similarity index 100% rename from reactos/base/applications/control/control.c rename to base/applications/control/control.c diff --git a/reactos/base/applications/control/control.dsp b/base/applications/control/control.dsp similarity index 100% rename from reactos/base/applications/control/control.dsp rename to base/applications/control/control.dsp diff --git a/reactos/base/applications/control/control.dsw b/base/applications/control/control.dsw similarity index 100% rename from reactos/base/applications/control/control.dsw rename to base/applications/control/control.dsw diff --git a/reactos/base/applications/control/control.h b/base/applications/control/control.h similarity index 100% rename from reactos/base/applications/control/control.h rename to base/applications/control/control.h diff --git a/reactos/base/applications/control/control.rbuild b/base/applications/control/control.rbuild similarity index 100% rename from reactos/base/applications/control/control.rbuild rename to base/applications/control/control.rbuild diff --git a/reactos/base/applications/control/control.rc b/base/applications/control/control.rc similarity index 100% rename from reactos/base/applications/control/control.rc rename to base/applications/control/control.rc diff --git a/reactos/base/applications/control/resource.h b/base/applications/control/resource.h similarity index 100% rename from reactos/base/applications/control/resource.h rename to base/applications/control/resource.h diff --git a/reactos/base/applications/control/resources/config.ico b/base/applications/control/resources/config.ico similarity index 100% rename from reactos/base/applications/control/resources/config.ico rename to base/applications/control/resources/config.ico diff --git a/reactos/base/applications/dxdiag/CMakeLists.txt b/base/applications/dxdiag/CMakeLists.txt similarity index 100% rename from reactos/base/applications/dxdiag/CMakeLists.txt rename to base/applications/dxdiag/CMakeLists.txt diff --git a/reactos/base/applications/dxdiag/d3dtest.c b/base/applications/dxdiag/d3dtest.c similarity index 100% rename from reactos/base/applications/dxdiag/d3dtest.c rename to base/applications/dxdiag/d3dtest.c diff --git a/reactos/base/applications/dxdiag/d3dtest7.c b/base/applications/dxdiag/d3dtest7.c similarity index 100% rename from reactos/base/applications/dxdiag/d3dtest7.c rename to base/applications/dxdiag/d3dtest7.c diff --git a/reactos/base/applications/dxdiag/d3dtest8.c b/base/applications/dxdiag/d3dtest8.c similarity index 100% rename from reactos/base/applications/dxdiag/d3dtest8.c rename to base/applications/dxdiag/d3dtest8.c diff --git a/reactos/base/applications/dxdiag/d3dtest9.c b/base/applications/dxdiag/d3dtest9.c similarity index 100% rename from reactos/base/applications/dxdiag/d3dtest9.c rename to base/applications/dxdiag/d3dtest9.c diff --git a/reactos/base/applications/dxdiag/ddtest.c b/base/applications/dxdiag/ddtest.c similarity index 100% rename from reactos/base/applications/dxdiag/ddtest.c rename to base/applications/dxdiag/ddtest.c diff --git a/reactos/base/applications/dxdiag/display.c b/base/applications/dxdiag/display.c similarity index 100% rename from reactos/base/applications/dxdiag/display.c rename to base/applications/dxdiag/display.c diff --git a/reactos/base/applications/dxdiag/dxdiag.c b/base/applications/dxdiag/dxdiag.c similarity index 100% rename from reactos/base/applications/dxdiag/dxdiag.c rename to base/applications/dxdiag/dxdiag.c diff --git a/reactos/base/applications/dxdiag/dxdiag.rbuild b/base/applications/dxdiag/dxdiag.rbuild similarity index 100% rename from reactos/base/applications/dxdiag/dxdiag.rbuild rename to base/applications/dxdiag/dxdiag.rbuild diff --git a/reactos/base/applications/dxdiag/dxdiag.rc b/base/applications/dxdiag/dxdiag.rc similarity index 100% rename from reactos/base/applications/dxdiag/dxdiag.rc rename to base/applications/dxdiag/dxdiag.rc diff --git a/reactos/base/applications/dxdiag/help.c b/base/applications/dxdiag/help.c similarity index 100% rename from reactos/base/applications/dxdiag/help.c rename to base/applications/dxdiag/help.c diff --git a/reactos/base/applications/dxdiag/input.c b/base/applications/dxdiag/input.c similarity index 100% rename from reactos/base/applications/dxdiag/input.c rename to base/applications/dxdiag/input.c diff --git a/reactos/base/applications/dxdiag/lang/bg-BG.rc b/base/applications/dxdiag/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/dxdiag/lang/bg-BG.rc rename to base/applications/dxdiag/lang/bg-BG.rc diff --git a/reactos/base/applications/dxdiag/lang/cs-CZ.rc b/base/applications/dxdiag/lang/cs-CZ.rc similarity index 100% rename from reactos/base/applications/dxdiag/lang/cs-CZ.rc rename to base/applications/dxdiag/lang/cs-CZ.rc diff --git a/reactos/base/applications/dxdiag/lang/de-DE.rc b/base/applications/dxdiag/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/dxdiag/lang/de-DE.rc rename to base/applications/dxdiag/lang/de-DE.rc diff --git a/reactos/base/applications/dxdiag/lang/en-US.rc b/base/applications/dxdiag/lang/en-US.rc similarity index 100% rename from reactos/base/applications/dxdiag/lang/en-US.rc rename to base/applications/dxdiag/lang/en-US.rc diff --git a/reactos/base/applications/dxdiag/lang/es-ES.rc b/base/applications/dxdiag/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/dxdiag/lang/es-ES.rc rename to base/applications/dxdiag/lang/es-ES.rc diff --git a/reactos/base/applications/dxdiag/lang/fr-FR.rc b/base/applications/dxdiag/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/dxdiag/lang/fr-FR.rc rename to base/applications/dxdiag/lang/fr-FR.rc diff --git a/reactos/base/applications/dxdiag/lang/ja-JP.rc b/base/applications/dxdiag/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/dxdiag/lang/ja-JP.rc rename to base/applications/dxdiag/lang/ja-JP.rc diff --git a/reactos/base/applications/dxdiag/lang/ko-KR.rc b/base/applications/dxdiag/lang/ko-KR.rc similarity index 100% rename from reactos/base/applications/dxdiag/lang/ko-KR.rc rename to base/applications/dxdiag/lang/ko-KR.rc diff --git a/reactos/base/applications/dxdiag/lang/nl-NL.rc b/base/applications/dxdiag/lang/nl-NL.rc similarity index 100% rename from reactos/base/applications/dxdiag/lang/nl-NL.rc rename to base/applications/dxdiag/lang/nl-NL.rc diff --git a/reactos/base/applications/dxdiag/lang/no-NO.rc b/base/applications/dxdiag/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/dxdiag/lang/no-NO.rc rename to base/applications/dxdiag/lang/no-NO.rc diff --git a/reactos/base/applications/dxdiag/lang/pl-PL.rc b/base/applications/dxdiag/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/dxdiag/lang/pl-PL.rc rename to base/applications/dxdiag/lang/pl-PL.rc diff --git a/reactos/base/applications/dxdiag/lang/pt-BR.rc b/base/applications/dxdiag/lang/pt-BR.rc similarity index 100% rename from reactos/base/applications/dxdiag/lang/pt-BR.rc rename to base/applications/dxdiag/lang/pt-BR.rc diff --git a/reactos/base/applications/dxdiag/lang/ro-RO.rc b/base/applications/dxdiag/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/dxdiag/lang/ro-RO.rc rename to base/applications/dxdiag/lang/ro-RO.rc diff --git a/reactos/base/applications/dxdiag/lang/ru-RU.rc b/base/applications/dxdiag/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/dxdiag/lang/ru-RU.rc rename to base/applications/dxdiag/lang/ru-RU.rc diff --git a/reactos/base/applications/dxdiag/lang/sk-SK.rc b/base/applications/dxdiag/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/dxdiag/lang/sk-SK.rc rename to base/applications/dxdiag/lang/sk-SK.rc diff --git a/reactos/base/applications/dxdiag/lang/sv-SE.rc b/base/applications/dxdiag/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/dxdiag/lang/sv-SE.rc rename to base/applications/dxdiag/lang/sv-SE.rc diff --git a/reactos/base/applications/dxdiag/lang/uk-UA.rc b/base/applications/dxdiag/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/dxdiag/lang/uk-UA.rc rename to base/applications/dxdiag/lang/uk-UA.rc diff --git a/reactos/base/applications/dxdiag/lang/zh-CN.rc b/base/applications/dxdiag/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/dxdiag/lang/zh-CN.rc rename to base/applications/dxdiag/lang/zh-CN.rc diff --git a/reactos/base/applications/dxdiag/lang/zh-TW.rc b/base/applications/dxdiag/lang/zh-TW.rc similarity index 100% rename from reactos/base/applications/dxdiag/lang/zh-TW.rc rename to base/applications/dxdiag/lang/zh-TW.rc diff --git a/reactos/base/applications/dxdiag/music.c b/base/applications/dxdiag/music.c similarity index 100% rename from reactos/base/applications/dxdiag/music.c rename to base/applications/dxdiag/music.c diff --git a/reactos/base/applications/dxdiag/network.c b/base/applications/dxdiag/network.c similarity index 100% rename from reactos/base/applications/dxdiag/network.c rename to base/applications/dxdiag/network.c diff --git a/reactos/base/applications/dxdiag/precomp.h b/base/applications/dxdiag/precomp.h similarity index 100% rename from reactos/base/applications/dxdiag/precomp.h rename to base/applications/dxdiag/precomp.h diff --git a/reactos/base/applications/dxdiag/res/dxdiag.ico b/base/applications/dxdiag/res/dxdiag.ico similarity index 100% rename from reactos/base/applications/dxdiag/res/dxdiag.ico rename to base/applications/dxdiag/res/dxdiag.ico diff --git a/reactos/base/applications/dxdiag/resource.h b/base/applications/dxdiag/resource.h similarity index 100% rename from reactos/base/applications/dxdiag/resource.h rename to base/applications/dxdiag/resource.h diff --git a/reactos/base/applications/dxdiag/rsrc.rc b/base/applications/dxdiag/rsrc.rc similarity index 100% rename from reactos/base/applications/dxdiag/rsrc.rc rename to base/applications/dxdiag/rsrc.rc diff --git a/reactos/base/applications/dxdiag/sound.c b/base/applications/dxdiag/sound.c similarity index 100% rename from reactos/base/applications/dxdiag/sound.c rename to base/applications/dxdiag/sound.c diff --git a/reactos/base/applications/dxdiag/system.c b/base/applications/dxdiag/system.c similarity index 100% rename from reactos/base/applications/dxdiag/system.c rename to base/applications/dxdiag/system.c diff --git a/reactos/base/applications/extrac32/CMakeLists.txt b/base/applications/extrac32/CMakeLists.txt similarity index 100% rename from reactos/base/applications/extrac32/CMakeLists.txt rename to base/applications/extrac32/CMakeLists.txt diff --git a/reactos/base/applications/extrac32/extrac32.c b/base/applications/extrac32/extrac32.c similarity index 100% rename from reactos/base/applications/extrac32/extrac32.c rename to base/applications/extrac32/extrac32.c diff --git a/reactos/base/applications/extrac32/extrac32.rbuild b/base/applications/extrac32/extrac32.rbuild similarity index 100% rename from reactos/base/applications/extrac32/extrac32.rbuild rename to base/applications/extrac32/extrac32.rbuild diff --git a/reactos/base/applications/findstr/CMakeLists.txt b/base/applications/findstr/CMakeLists.txt similarity index 100% rename from reactos/base/applications/findstr/CMakeLists.txt rename to base/applications/findstr/CMakeLists.txt diff --git a/reactos/base/applications/findstr/findstr.c b/base/applications/findstr/findstr.c similarity index 100% rename from reactos/base/applications/findstr/findstr.c rename to base/applications/findstr/findstr.c diff --git a/reactos/base/applications/findstr/findstr.rbuild b/base/applications/findstr/findstr.rbuild similarity index 100% rename from reactos/base/applications/findstr/findstr.rbuild rename to base/applications/findstr/findstr.rbuild diff --git a/reactos/base/applications/findstr/findstr.rc b/base/applications/findstr/findstr.rc similarity index 100% rename from reactos/base/applications/findstr/findstr.rc rename to base/applications/findstr/findstr.rc diff --git a/reactos/base/applications/findstr/lang/bg-BG.rc b/base/applications/findstr/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/findstr/lang/bg-BG.rc rename to base/applications/findstr/lang/bg-BG.rc diff --git a/reactos/base/applications/findstr/lang/ca-ES.rc b/base/applications/findstr/lang/ca-ES.rc similarity index 100% rename from reactos/base/applications/findstr/lang/ca-ES.rc rename to base/applications/findstr/lang/ca-ES.rc diff --git a/reactos/base/applications/findstr/lang/cs-CZ.rc b/base/applications/findstr/lang/cs-CZ.rc similarity index 100% rename from reactos/base/applications/findstr/lang/cs-CZ.rc rename to base/applications/findstr/lang/cs-CZ.rc diff --git a/reactos/base/applications/findstr/lang/de-DE.rc b/base/applications/findstr/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/findstr/lang/de-DE.rc rename to base/applications/findstr/lang/de-DE.rc diff --git a/reactos/base/applications/findstr/lang/el-GR.rc b/base/applications/findstr/lang/el-GR.rc similarity index 100% rename from reactos/base/applications/findstr/lang/el-GR.rc rename to base/applications/findstr/lang/el-GR.rc diff --git a/reactos/base/applications/findstr/lang/en-US.rc b/base/applications/findstr/lang/en-US.rc similarity index 100% rename from reactos/base/applications/findstr/lang/en-US.rc rename to base/applications/findstr/lang/en-US.rc diff --git a/reactos/base/applications/findstr/lang/es-ES.rc b/base/applications/findstr/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/findstr/lang/es-ES.rc rename to base/applications/findstr/lang/es-ES.rc diff --git a/reactos/base/applications/findstr/lang/fr-FR.rc b/base/applications/findstr/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/findstr/lang/fr-FR.rc rename to base/applications/findstr/lang/fr-FR.rc diff --git a/reactos/base/applications/findstr/lang/it-IT.rc b/base/applications/findstr/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/findstr/lang/it-IT.rc rename to base/applications/findstr/lang/it-IT.rc diff --git a/reactos/base/applications/findstr/lang/lt-LT.rc b/base/applications/findstr/lang/lt-LT.rc similarity index 100% rename from reactos/base/applications/findstr/lang/lt-LT.rc rename to base/applications/findstr/lang/lt-LT.rc diff --git a/reactos/base/applications/findstr/lang/no-NO.rc b/base/applications/findstr/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/findstr/lang/no-NO.rc rename to base/applications/findstr/lang/no-NO.rc diff --git a/reactos/base/applications/findstr/lang/pl-PL.rc b/base/applications/findstr/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/findstr/lang/pl-PL.rc rename to base/applications/findstr/lang/pl-PL.rc diff --git a/reactos/base/applications/findstr/lang/pt-BR.rc b/base/applications/findstr/lang/pt-BR.rc similarity index 100% rename from reactos/base/applications/findstr/lang/pt-BR.rc rename to base/applications/findstr/lang/pt-BR.rc diff --git a/reactos/base/applications/findstr/lang/ro-RO.rc b/base/applications/findstr/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/findstr/lang/ro-RO.rc rename to base/applications/findstr/lang/ro-RO.rc diff --git a/reactos/base/applications/findstr/lang/ru-RU.rc b/base/applications/findstr/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/findstr/lang/ru-RU.rc rename to base/applications/findstr/lang/ru-RU.rc diff --git a/reactos/base/applications/findstr/lang/sk-SK.rc b/base/applications/findstr/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/findstr/lang/sk-SK.rc rename to base/applications/findstr/lang/sk-SK.rc diff --git a/reactos/base/applications/findstr/lang/sv-SE.rc b/base/applications/findstr/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/findstr/lang/sv-SE.rc rename to base/applications/findstr/lang/sv-SE.rc diff --git a/reactos/base/applications/findstr/lang/uk-UA.rc b/base/applications/findstr/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/findstr/lang/uk-UA.rc rename to base/applications/findstr/lang/uk-UA.rc diff --git a/reactos/base/applications/findstr/lang/zh-CN.rc b/base/applications/findstr/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/findstr/lang/zh-CN.rc rename to base/applications/findstr/lang/zh-CN.rc diff --git a/reactos/base/applications/findstr/lang/zh-TW.rc b/base/applications/findstr/lang/zh-TW.rc similarity index 100% rename from reactos/base/applications/findstr/lang/zh-TW.rc rename to base/applications/findstr/lang/zh-TW.rc diff --git a/reactos/base/applications/findstr/resource.h b/base/applications/findstr/resource.h similarity index 100% rename from reactos/base/applications/findstr/resource.h rename to base/applications/findstr/resource.h diff --git a/reactos/base/applications/findstr/rsrc.rc b/base/applications/findstr/rsrc.rc similarity index 100% rename from reactos/base/applications/findstr/rsrc.rc rename to base/applications/findstr/rsrc.rc diff --git a/reactos/base/applications/fontview/CMakeLists.txt b/base/applications/fontview/CMakeLists.txt similarity index 100% rename from reactos/base/applications/fontview/CMakeLists.txt rename to base/applications/fontview/CMakeLists.txt diff --git a/reactos/base/applications/fontview/display.c b/base/applications/fontview/display.c similarity index 100% rename from reactos/base/applications/fontview/display.c rename to base/applications/fontview/display.c diff --git a/reactos/base/applications/fontview/display.h b/base/applications/fontview/display.h similarity index 100% rename from reactos/base/applications/fontview/display.h rename to base/applications/fontview/display.h diff --git a/reactos/base/applications/fontview/fontview.c b/base/applications/fontview/fontview.c similarity index 100% rename from reactos/base/applications/fontview/fontview.c rename to base/applications/fontview/fontview.c diff --git a/reactos/base/applications/fontview/fontview.h b/base/applications/fontview/fontview.h similarity index 100% rename from reactos/base/applications/fontview/fontview.h rename to base/applications/fontview/fontview.h diff --git a/reactos/base/applications/fontview/fontview.rbuild b/base/applications/fontview/fontview.rbuild similarity index 100% rename from reactos/base/applications/fontview/fontview.rbuild rename to base/applications/fontview/fontview.rbuild diff --git a/reactos/base/applications/fontview/fontview.rc b/base/applications/fontview/fontview.rc similarity index 100% rename from reactos/base/applications/fontview/fontview.rc rename to base/applications/fontview/fontview.rc diff --git a/reactos/base/applications/fontview/lang/bg-BG.rc b/base/applications/fontview/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/fontview/lang/bg-BG.rc rename to base/applications/fontview/lang/bg-BG.rc diff --git a/reactos/base/applications/fontview/lang/de-DE.rc b/base/applications/fontview/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/fontview/lang/de-DE.rc rename to base/applications/fontview/lang/de-DE.rc diff --git a/reactos/base/applications/fontview/lang/en-US.rc b/base/applications/fontview/lang/en-US.rc similarity index 100% rename from reactos/base/applications/fontview/lang/en-US.rc rename to base/applications/fontview/lang/en-US.rc diff --git a/reactos/base/applications/fontview/lang/es-ES.rc b/base/applications/fontview/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/fontview/lang/es-ES.rc rename to base/applications/fontview/lang/es-ES.rc diff --git a/reactos/base/applications/fontview/lang/fr-FR.rc b/base/applications/fontview/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/fontview/lang/fr-FR.rc rename to base/applications/fontview/lang/fr-FR.rc diff --git a/reactos/base/applications/fontview/lang/lt-LT.rc b/base/applications/fontview/lang/lt-LT.rc similarity index 100% rename from reactos/base/applications/fontview/lang/lt-LT.rc rename to base/applications/fontview/lang/lt-LT.rc diff --git a/reactos/base/applications/fontview/lang/no-NO.rc b/base/applications/fontview/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/fontview/lang/no-NO.rc rename to base/applications/fontview/lang/no-NO.rc diff --git a/reactos/base/applications/fontview/lang/pl-PL.rc b/base/applications/fontview/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/fontview/lang/pl-PL.rc rename to base/applications/fontview/lang/pl-PL.rc diff --git a/reactos/base/applications/fontview/lang/pt-BR.rc b/base/applications/fontview/lang/pt-BR.rc similarity index 100% rename from reactos/base/applications/fontview/lang/pt-BR.rc rename to base/applications/fontview/lang/pt-BR.rc diff --git a/reactos/base/applications/fontview/lang/ro-RO.rc b/base/applications/fontview/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/fontview/lang/ro-RO.rc rename to base/applications/fontview/lang/ro-RO.rc diff --git a/reactos/base/applications/fontview/lang/ru-RU.rc b/base/applications/fontview/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/fontview/lang/ru-RU.rc rename to base/applications/fontview/lang/ru-RU.rc diff --git a/reactos/base/applications/fontview/lang/sk-SK.rc b/base/applications/fontview/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/fontview/lang/sk-SK.rc rename to base/applications/fontview/lang/sk-SK.rc diff --git a/reactos/base/applications/fontview/lang/sv-SE.rc b/base/applications/fontview/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/fontview/lang/sv-SE.rc rename to base/applications/fontview/lang/sv-SE.rc diff --git a/reactos/base/applications/fontview/lang/uk-UA.rc b/base/applications/fontview/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/fontview/lang/uk-UA.rc rename to base/applications/fontview/lang/uk-UA.rc diff --git a/reactos/base/applications/fontview/lang/zh-CN.rc b/base/applications/fontview/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/fontview/lang/zh-CN.rc rename to base/applications/fontview/lang/zh-CN.rc diff --git a/reactos/base/applications/fontview/lang/zh-TW.rc b/base/applications/fontview/lang/zh-TW.rc similarity index 100% rename from reactos/base/applications/fontview/lang/zh-TW.rc rename to base/applications/fontview/lang/zh-TW.rc diff --git a/reactos/base/applications/fontview/resource.h b/base/applications/fontview/resource.h similarity index 100% rename from reactos/base/applications/fontview/resource.h rename to base/applications/fontview/resource.h diff --git a/reactos/base/applications/fontview/ttf.ico b/base/applications/fontview/ttf.ico similarity index 100% rename from reactos/base/applications/fontview/ttf.ico rename to base/applications/fontview/ttf.ico diff --git a/reactos/base/applications/games/CMakeLists.txt b/base/applications/games/CMakeLists.txt similarity index 100% rename from reactos/base/applications/games/CMakeLists.txt rename to base/applications/games/CMakeLists.txt diff --git a/reactos/base/applications/games/games.rbuild b/base/applications/games/games.rbuild similarity index 100% rename from reactos/base/applications/games/games.rbuild rename to base/applications/games/games.rbuild diff --git a/reactos/base/applications/games/solitaire/CMakeLists.txt b/base/applications/games/solitaire/CMakeLists.txt similarity index 100% rename from reactos/base/applications/games/solitaire/CMakeLists.txt rename to base/applications/games/solitaire/CMakeLists.txt diff --git a/reactos/base/applications/games/solitaire/ReadMe.txt b/base/applications/games/solitaire/ReadMe.txt similarity index 100% rename from reactos/base/applications/games/solitaire/ReadMe.txt rename to base/applications/games/solitaire/ReadMe.txt diff --git a/reactos/base/applications/games/solitaire/lang/bg-BG.rc b/base/applications/games/solitaire/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/bg-BG.rc rename to base/applications/games/solitaire/lang/bg-BG.rc diff --git a/reactos/base/applications/games/solitaire/lang/ca-ES.rc b/base/applications/games/solitaire/lang/ca-ES.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/ca-ES.rc rename to base/applications/games/solitaire/lang/ca-ES.rc diff --git a/reactos/base/applications/games/solitaire/lang/cs-CZ.rc b/base/applications/games/solitaire/lang/cs-CZ.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/cs-CZ.rc rename to base/applications/games/solitaire/lang/cs-CZ.rc diff --git a/reactos/base/applications/games/solitaire/lang/de-DE.rc b/base/applications/games/solitaire/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/de-DE.rc rename to base/applications/games/solitaire/lang/de-DE.rc diff --git a/reactos/base/applications/games/solitaire/lang/el-GR.rc b/base/applications/games/solitaire/lang/el-GR.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/el-GR.rc rename to base/applications/games/solitaire/lang/el-GR.rc diff --git a/reactos/base/applications/games/solitaire/lang/en-US.rc b/base/applications/games/solitaire/lang/en-US.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/en-US.rc rename to base/applications/games/solitaire/lang/en-US.rc diff --git a/reactos/base/applications/games/solitaire/lang/es-ES.rc b/base/applications/games/solitaire/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/es-ES.rc rename to base/applications/games/solitaire/lang/es-ES.rc diff --git a/reactos/base/applications/games/solitaire/lang/eu-ES.rc b/base/applications/games/solitaire/lang/eu-ES.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/eu-ES.rc rename to base/applications/games/solitaire/lang/eu-ES.rc diff --git a/reactos/base/applications/games/solitaire/lang/fr-FR.rc b/base/applications/games/solitaire/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/fr-FR.rc rename to base/applications/games/solitaire/lang/fr-FR.rc diff --git a/reactos/base/applications/games/solitaire/lang/hu-HU.rc b/base/applications/games/solitaire/lang/hu-HU.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/hu-HU.rc rename to base/applications/games/solitaire/lang/hu-HU.rc diff --git a/reactos/base/applications/games/solitaire/lang/id-ID.rc b/base/applications/games/solitaire/lang/id-ID.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/id-ID.rc rename to base/applications/games/solitaire/lang/id-ID.rc diff --git a/reactos/base/applications/games/solitaire/lang/it-IT.rc b/base/applications/games/solitaire/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/it-IT.rc rename to base/applications/games/solitaire/lang/it-IT.rc diff --git a/reactos/base/applications/games/solitaire/lang/ja-JP.rc b/base/applications/games/solitaire/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/ja-JP.rc rename to base/applications/games/solitaire/lang/ja-JP.rc diff --git a/reactos/base/applications/games/solitaire/lang/ko-KR.rc b/base/applications/games/solitaire/lang/ko-KR.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/ko-KR.rc rename to base/applications/games/solitaire/lang/ko-KR.rc diff --git a/reactos/base/applications/games/solitaire/lang/lt-LT.rc b/base/applications/games/solitaire/lang/lt-LT.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/lt-LT.rc rename to base/applications/games/solitaire/lang/lt-LT.rc diff --git a/reactos/base/applications/games/solitaire/lang/nl-NL.rc b/base/applications/games/solitaire/lang/nl-NL.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/nl-NL.rc rename to base/applications/games/solitaire/lang/nl-NL.rc diff --git a/reactos/base/applications/games/solitaire/lang/no-NO.rc b/base/applications/games/solitaire/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/no-NO.rc rename to base/applications/games/solitaire/lang/no-NO.rc diff --git a/reactos/base/applications/games/solitaire/lang/pl-PL.rc b/base/applications/games/solitaire/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/pl-PL.rc rename to base/applications/games/solitaire/lang/pl-PL.rc diff --git a/reactos/base/applications/games/solitaire/lang/ro-RO.rc b/base/applications/games/solitaire/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/ro-RO.rc rename to base/applications/games/solitaire/lang/ro-RO.rc diff --git a/reactos/base/applications/games/solitaire/lang/ru-RU.rc b/base/applications/games/solitaire/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/ru-RU.rc rename to base/applications/games/solitaire/lang/ru-RU.rc diff --git a/reactos/base/applications/games/solitaire/lang/sk-SK.rc b/base/applications/games/solitaire/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/sk-SK.rc rename to base/applications/games/solitaire/lang/sk-SK.rc diff --git a/reactos/base/applications/games/solitaire/lang/sv-SE.rc b/base/applications/games/solitaire/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/sv-SE.rc rename to base/applications/games/solitaire/lang/sv-SE.rc diff --git a/reactos/base/applications/games/solitaire/lang/th-TH.rc b/base/applications/games/solitaire/lang/th-TH.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/th-TH.rc rename to base/applications/games/solitaire/lang/th-TH.rc diff --git a/reactos/base/applications/games/solitaire/lang/uk-UA.rc b/base/applications/games/solitaire/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/uk-UA.rc rename to base/applications/games/solitaire/lang/uk-UA.rc diff --git a/reactos/base/applications/games/solitaire/lang/zh-CN.rc b/base/applications/games/solitaire/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/zh-CN.rc rename to base/applications/games/solitaire/lang/zh-CN.rc diff --git a/reactos/base/applications/games/solitaire/lang/zh-TW.rc b/base/applications/games/solitaire/lang/zh-TW.rc similarity index 100% rename from reactos/base/applications/games/solitaire/lang/zh-TW.rc rename to base/applications/games/solitaire/lang/zh-TW.rc diff --git a/reactos/base/applications/games/solitaire/resource.h b/base/applications/games/solitaire/resource.h similarity index 100% rename from reactos/base/applications/games/solitaire/resource.h rename to base/applications/games/solitaire/resource.h diff --git a/reactos/base/applications/games/solitaire/rsrc.rc b/base/applications/games/solitaire/rsrc.rc similarity index 100% rename from reactos/base/applications/games/solitaire/rsrc.rc rename to base/applications/games/solitaire/rsrc.rc diff --git a/reactos/base/applications/games/solitaire/solcreate.cpp b/base/applications/games/solitaire/solcreate.cpp similarity index 100% rename from reactos/base/applications/games/solitaire/solcreate.cpp rename to base/applications/games/solitaire/solcreate.cpp diff --git a/reactos/base/applications/games/solitaire/solgame.cpp b/base/applications/games/solitaire/solgame.cpp similarity index 100% rename from reactos/base/applications/games/solitaire/solgame.cpp rename to base/applications/games/solitaire/solgame.cpp diff --git a/reactos/base/applications/games/solitaire/solitaire.cpp b/base/applications/games/solitaire/solitaire.cpp similarity index 100% rename from reactos/base/applications/games/solitaire/solitaire.cpp rename to base/applications/games/solitaire/solitaire.cpp diff --git a/reactos/base/applications/games/solitaire/solitaire.h b/base/applications/games/solitaire/solitaire.h similarity index 100% rename from reactos/base/applications/games/solitaire/solitaire.h rename to base/applications/games/solitaire/solitaire.h diff --git a/reactos/base/applications/games/solitaire/solitaire.ico b/base/applications/games/solitaire/solitaire.ico similarity index 100% rename from reactos/base/applications/games/solitaire/solitaire.ico rename to base/applications/games/solitaire/solitaire.ico diff --git a/reactos/base/applications/games/solitaire/solitaire.rbuild b/base/applications/games/solitaire/solitaire.rbuild similarity index 100% rename from reactos/base/applications/games/solitaire/solitaire.rbuild rename to base/applications/games/solitaire/solitaire.rbuild diff --git a/reactos/base/applications/games/spider/CMakeLists.txt b/base/applications/games/spider/CMakeLists.txt similarity index 100% rename from reactos/base/applications/games/spider/CMakeLists.txt rename to base/applications/games/spider/CMakeLists.txt diff --git a/reactos/base/applications/games/spider/lang/bg-BG.rc b/base/applications/games/spider/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/games/spider/lang/bg-BG.rc rename to base/applications/games/spider/lang/bg-BG.rc diff --git a/reactos/base/applications/games/spider/lang/de-DE.rc b/base/applications/games/spider/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/games/spider/lang/de-DE.rc rename to base/applications/games/spider/lang/de-DE.rc diff --git a/reactos/base/applications/games/spider/lang/en-US.rc b/base/applications/games/spider/lang/en-US.rc similarity index 100% rename from reactos/base/applications/games/spider/lang/en-US.rc rename to base/applications/games/spider/lang/en-US.rc diff --git a/reactos/base/applications/games/spider/lang/es-ES.rc b/base/applications/games/spider/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/games/spider/lang/es-ES.rc rename to base/applications/games/spider/lang/es-ES.rc diff --git a/reactos/base/applications/games/spider/lang/fr-FR.rc b/base/applications/games/spider/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/games/spider/lang/fr-FR.rc rename to base/applications/games/spider/lang/fr-FR.rc diff --git a/reactos/base/applications/games/spider/lang/hu-HU.rc b/base/applications/games/spider/lang/hu-HU.rc similarity index 100% rename from reactos/base/applications/games/spider/lang/hu-HU.rc rename to base/applications/games/spider/lang/hu-HU.rc diff --git a/reactos/base/applications/games/spider/lang/it-IT.rc b/base/applications/games/spider/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/games/spider/lang/it-IT.rc rename to base/applications/games/spider/lang/it-IT.rc diff --git a/reactos/base/applications/games/spider/lang/ja-JP.rc b/base/applications/games/spider/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/games/spider/lang/ja-JP.rc rename to base/applications/games/spider/lang/ja-JP.rc diff --git a/reactos/base/applications/games/spider/lang/nl-NL.rc b/base/applications/games/spider/lang/nl-NL.rc similarity index 100% rename from reactos/base/applications/games/spider/lang/nl-NL.rc rename to base/applications/games/spider/lang/nl-NL.rc diff --git a/reactos/base/applications/games/spider/lang/pl-PL.rc b/base/applications/games/spider/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/games/spider/lang/pl-PL.rc rename to base/applications/games/spider/lang/pl-PL.rc diff --git a/reactos/base/applications/games/spider/lang/pt-BR.rc b/base/applications/games/spider/lang/pt-BR.rc similarity index 100% rename from reactos/base/applications/games/spider/lang/pt-BR.rc rename to base/applications/games/spider/lang/pt-BR.rc diff --git a/reactos/base/applications/games/spider/lang/ro-RO.rc b/base/applications/games/spider/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/games/spider/lang/ro-RO.rc rename to base/applications/games/spider/lang/ro-RO.rc diff --git a/reactos/base/applications/games/spider/lang/ru-RU.rc b/base/applications/games/spider/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/games/spider/lang/ru-RU.rc rename to base/applications/games/spider/lang/ru-RU.rc diff --git a/reactos/base/applications/games/spider/lang/sk-SK.rc b/base/applications/games/spider/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/games/spider/lang/sk-SK.rc rename to base/applications/games/spider/lang/sk-SK.rc diff --git a/reactos/base/applications/games/spider/lang/sv-SE.rc b/base/applications/games/spider/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/games/spider/lang/sv-SE.rc rename to base/applications/games/spider/lang/sv-SE.rc diff --git a/reactos/base/applications/games/spider/lang/uk-UA.rc b/base/applications/games/spider/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/games/spider/lang/uk-UA.rc rename to base/applications/games/spider/lang/uk-UA.rc diff --git a/reactos/base/applications/games/spider/lang/zh-CN.rc b/base/applications/games/spider/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/games/spider/lang/zh-CN.rc rename to base/applications/games/spider/lang/zh-CN.rc diff --git a/reactos/base/applications/games/spider/lang/zh-TW.rc b/base/applications/games/spider/lang/zh-TW.rc similarity index 100% rename from reactos/base/applications/games/spider/lang/zh-TW.rc rename to base/applications/games/spider/lang/zh-TW.rc diff --git a/reactos/base/applications/games/spider/resource.h b/base/applications/games/spider/resource.h similarity index 100% rename from reactos/base/applications/games/spider/resource.h rename to base/applications/games/spider/resource.h diff --git a/reactos/base/applications/games/spider/rsrc.rc b/base/applications/games/spider/rsrc.rc similarity index 100% rename from reactos/base/applications/games/spider/rsrc.rc rename to base/applications/games/spider/rsrc.rc diff --git a/reactos/base/applications/games/spider/spider.cpp b/base/applications/games/spider/spider.cpp similarity index 100% rename from reactos/base/applications/games/spider/spider.cpp rename to base/applications/games/spider/spider.cpp diff --git a/reactos/base/applications/games/spider/spider.h b/base/applications/games/spider/spider.h similarity index 100% rename from reactos/base/applications/games/spider/spider.h rename to base/applications/games/spider/spider.h diff --git a/reactos/base/applications/games/spider/spider.ico b/base/applications/games/spider/spider.ico similarity index 100% rename from reactos/base/applications/games/spider/spider.ico rename to base/applications/games/spider/spider.ico diff --git a/reactos/base/applications/games/spider/spider.rbuild b/base/applications/games/spider/spider.rbuild similarity index 100% rename from reactos/base/applications/games/spider/spider.rbuild rename to base/applications/games/spider/spider.rbuild diff --git a/reactos/base/applications/games/spider/spigame.cpp b/base/applications/games/spider/spigame.cpp similarity index 100% rename from reactos/base/applications/games/spider/spigame.cpp rename to base/applications/games/spider/spigame.cpp diff --git a/reactos/base/applications/games/winmine/CMakeLists.txt b/base/applications/games/winmine/CMakeLists.txt similarity index 100% rename from reactos/base/applications/games/winmine/CMakeLists.txt rename to base/applications/games/winmine/CMakeLists.txt diff --git a/reactos/base/applications/games/winmine/dialog.c b/base/applications/games/winmine/dialog.c similarity index 100% rename from reactos/base/applications/games/winmine/dialog.c rename to base/applications/games/winmine/dialog.c diff --git a/reactos/base/applications/games/winmine/lang/bg-BG.rc b/base/applications/games/winmine/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/games/winmine/lang/bg-BG.rc rename to base/applications/games/winmine/lang/bg-BG.rc diff --git a/reactos/base/applications/games/winmine/lang/cs-CZ.rc b/base/applications/games/winmine/lang/cs-CZ.rc similarity index 100% rename from reactos/base/applications/games/winmine/lang/cs-CZ.rc rename to base/applications/games/winmine/lang/cs-CZ.rc diff --git a/reactos/base/applications/games/winmine/lang/da-DK.rc b/base/applications/games/winmine/lang/da-DK.rc similarity index 100% rename from reactos/base/applications/games/winmine/lang/da-DK.rc rename to base/applications/games/winmine/lang/da-DK.rc diff --git a/reactos/base/applications/games/winmine/lang/de-DE.rc b/base/applications/games/winmine/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/games/winmine/lang/de-DE.rc rename to base/applications/games/winmine/lang/de-DE.rc diff --git a/reactos/base/applications/games/winmine/lang/en-US.rc b/base/applications/games/winmine/lang/en-US.rc similarity index 100% rename from reactos/base/applications/games/winmine/lang/en-US.rc rename to base/applications/games/winmine/lang/en-US.rc diff --git a/reactos/base/applications/games/winmine/lang/es-ES.rc b/base/applications/games/winmine/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/games/winmine/lang/es-ES.rc rename to base/applications/games/winmine/lang/es-ES.rc diff --git a/reactos/base/applications/games/winmine/lang/fi-FI.rc b/base/applications/games/winmine/lang/fi-FI.rc similarity index 100% rename from reactos/base/applications/games/winmine/lang/fi-FI.rc rename to base/applications/games/winmine/lang/fi-FI.rc diff --git a/reactos/base/applications/games/winmine/lang/fr-FR.rc b/base/applications/games/winmine/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/games/winmine/lang/fr-FR.rc rename to base/applications/games/winmine/lang/fr-FR.rc diff --git a/reactos/base/applications/games/winmine/lang/it-IT.rc b/base/applications/games/winmine/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/games/winmine/lang/it-IT.rc rename to base/applications/games/winmine/lang/it-IT.rc diff --git a/reactos/base/applications/games/winmine/lang/ja-JP.rc b/base/applications/games/winmine/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/games/winmine/lang/ja-JP.rc rename to base/applications/games/winmine/lang/ja-JP.rc diff --git a/reactos/base/applications/games/winmine/lang/ko-KR.rc b/base/applications/games/winmine/lang/ko-KR.rc similarity index 100% rename from reactos/base/applications/games/winmine/lang/ko-KR.rc rename to base/applications/games/winmine/lang/ko-KR.rc diff --git a/reactos/base/applications/games/winmine/lang/lt-LT.rc b/base/applications/games/winmine/lang/lt-LT.rc similarity index 100% rename from reactos/base/applications/games/winmine/lang/lt-LT.rc rename to base/applications/games/winmine/lang/lt-LT.rc diff --git a/reactos/base/applications/games/winmine/lang/nl-NL.rc b/base/applications/games/winmine/lang/nl-NL.rc similarity index 100% rename from reactos/base/applications/games/winmine/lang/nl-NL.rc rename to base/applications/games/winmine/lang/nl-NL.rc diff --git a/reactos/base/applications/games/winmine/lang/no-NO.rc b/base/applications/games/winmine/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/games/winmine/lang/no-NO.rc rename to base/applications/games/winmine/lang/no-NO.rc diff --git a/reactos/base/applications/games/winmine/lang/pl-PL.rc b/base/applications/games/winmine/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/games/winmine/lang/pl-PL.rc rename to base/applications/games/winmine/lang/pl-PL.rc diff --git a/reactos/base/applications/games/winmine/lang/pt-PT.rc b/base/applications/games/winmine/lang/pt-PT.rc similarity index 100% rename from reactos/base/applications/games/winmine/lang/pt-PT.rc rename to base/applications/games/winmine/lang/pt-PT.rc diff --git a/reactos/base/applications/games/winmine/lang/ro-RO.rc b/base/applications/games/winmine/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/games/winmine/lang/ro-RO.rc rename to base/applications/games/winmine/lang/ro-RO.rc diff --git a/reactos/base/applications/games/winmine/lang/ru-RU.rc b/base/applications/games/winmine/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/games/winmine/lang/ru-RU.rc rename to base/applications/games/winmine/lang/ru-RU.rc diff --git a/reactos/base/applications/games/winmine/lang/sl-SI.rc b/base/applications/games/winmine/lang/sl-SI.rc similarity index 100% rename from reactos/base/applications/games/winmine/lang/sl-SI.rc rename to base/applications/games/winmine/lang/sl-SI.rc diff --git a/reactos/base/applications/games/winmine/lang/sv-SE.rc b/base/applications/games/winmine/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/games/winmine/lang/sv-SE.rc rename to base/applications/games/winmine/lang/sv-SE.rc diff --git a/reactos/base/applications/games/winmine/lang/tr-TR.rc b/base/applications/games/winmine/lang/tr-TR.rc similarity index 100% rename from reactos/base/applications/games/winmine/lang/tr-TR.rc rename to base/applications/games/winmine/lang/tr-TR.rc diff --git a/reactos/base/applications/games/winmine/lang/uk-UA.rc b/base/applications/games/winmine/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/games/winmine/lang/uk-UA.rc rename to base/applications/games/winmine/lang/uk-UA.rc diff --git a/reactos/base/applications/games/winmine/lang/zh-CN.rc b/base/applications/games/winmine/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/games/winmine/lang/zh-CN.rc rename to base/applications/games/winmine/lang/zh-CN.rc diff --git a/reactos/base/applications/games/winmine/lang/zh-TW.rc b/base/applications/games/winmine/lang/zh-TW.rc similarity index 100% rename from reactos/base/applications/games/winmine/lang/zh-TW.rc rename to base/applications/games/winmine/lang/zh-TW.rc diff --git a/reactos/base/applications/games/winmine/main.c b/base/applications/games/winmine/main.c similarity index 100% rename from reactos/base/applications/games/winmine/main.c rename to base/applications/games/winmine/main.c diff --git a/reactos/base/applications/games/winmine/main.h b/base/applications/games/winmine/main.h similarity index 100% rename from reactos/base/applications/games/winmine/main.h rename to base/applications/games/winmine/main.h diff --git a/reactos/base/applications/games/winmine/rc/faces.bmp b/base/applications/games/winmine/rc/faces.bmp similarity index 100% rename from reactos/base/applications/games/winmine/rc/faces.bmp rename to base/applications/games/winmine/rc/faces.bmp diff --git a/reactos/base/applications/games/winmine/rc/leds.bmp b/base/applications/games/winmine/rc/leds.bmp similarity index 100% rename from reactos/base/applications/games/winmine/rc/leds.bmp rename to base/applications/games/winmine/rc/leds.bmp diff --git a/reactos/base/applications/games/winmine/rc/mines.bmp b/base/applications/games/winmine/rc/mines.bmp similarity index 100% rename from reactos/base/applications/games/winmine/rc/mines.bmp rename to base/applications/games/winmine/rc/mines.bmp diff --git a/reactos/base/applications/games/winmine/rc/winemine.ico b/base/applications/games/winmine/rc/winemine.ico similarity index 100% rename from reactos/base/applications/games/winmine/rc/winemine.ico rename to base/applications/games/winmine/rc/winemine.ico diff --git a/reactos/base/applications/games/winmine/resource.h b/base/applications/games/winmine/resource.h similarity index 100% rename from reactos/base/applications/games/winmine/resource.h rename to base/applications/games/winmine/resource.h diff --git a/reactos/base/applications/games/winmine/rsrc.rc b/base/applications/games/winmine/rsrc.rc similarity index 100% rename from reactos/base/applications/games/winmine/rsrc.rc rename to base/applications/games/winmine/rsrc.rc diff --git a/reactos/base/applications/games/winmine/winmine.rbuild b/base/applications/games/winmine/winmine.rbuild similarity index 100% rename from reactos/base/applications/games/winmine/winmine.rbuild rename to base/applications/games/winmine/winmine.rbuild diff --git a/reactos/base/applications/hh/CMakeLists.txt b/base/applications/hh/CMakeLists.txt similarity index 100% rename from reactos/base/applications/hh/CMakeLists.txt rename to base/applications/hh/CMakeLists.txt diff --git a/reactos/base/applications/hh/hh.ico b/base/applications/hh/hh.ico similarity index 100% rename from reactos/base/applications/hh/hh.ico rename to base/applications/hh/hh.ico diff --git a/reactos/base/applications/hh/hh.rbuild b/base/applications/hh/hh.rbuild similarity index 100% rename from reactos/base/applications/hh/hh.rbuild rename to base/applications/hh/hh.rbuild diff --git a/reactos/base/applications/hh/hh.rc b/base/applications/hh/hh.rc similarity index 100% rename from reactos/base/applications/hh/hh.rc rename to base/applications/hh/hh.rc diff --git a/reactos/base/applications/hh/main.c b/base/applications/hh/main.c similarity index 100% rename from reactos/base/applications/hh/main.c rename to base/applications/hh/main.c diff --git a/reactos/base/applications/iexplore/CMakeLists.txt b/base/applications/iexplore/CMakeLists.txt similarity index 100% rename from reactos/base/applications/iexplore/CMakeLists.txt rename to base/applications/iexplore/CMakeLists.txt diff --git a/reactos/base/applications/iexplore/iexplore.ico b/base/applications/iexplore/iexplore.ico similarity index 100% rename from reactos/base/applications/iexplore/iexplore.ico rename to base/applications/iexplore/iexplore.ico diff --git a/reactos/base/applications/iexplore/iexplore.rbuild b/base/applications/iexplore/iexplore.rbuild similarity index 100% rename from reactos/base/applications/iexplore/iexplore.rbuild rename to base/applications/iexplore/iexplore.rbuild diff --git a/reactos/base/applications/iexplore/iexplore.rc b/base/applications/iexplore/iexplore.rc similarity index 100% rename from reactos/base/applications/iexplore/iexplore.rc rename to base/applications/iexplore/iexplore.rc diff --git a/reactos/base/applications/iexplore/main.c b/base/applications/iexplore/main.c similarity index 100% rename from reactos/base/applications/iexplore/main.c rename to base/applications/iexplore/main.c diff --git a/reactos/base/applications/kbswitch/CMakeLists.txt b/base/applications/kbswitch/CMakeLists.txt similarity index 100% rename from reactos/base/applications/kbswitch/CMakeLists.txt rename to base/applications/kbswitch/CMakeLists.txt diff --git a/reactos/base/applications/kbswitch/kbsdll/CMakeLists.txt b/base/applications/kbswitch/kbsdll/CMakeLists.txt similarity index 100% rename from reactos/base/applications/kbswitch/kbsdll/CMakeLists.txt rename to base/applications/kbswitch/kbsdll/CMakeLists.txt diff --git a/reactos/base/applications/kbswitch/kbsdll/kbsdll.c b/base/applications/kbswitch/kbsdll/kbsdll.c similarity index 100% rename from reactos/base/applications/kbswitch/kbsdll/kbsdll.c rename to base/applications/kbswitch/kbsdll/kbsdll.c diff --git a/reactos/base/applications/kbswitch/kbsdll/kbsdll.rbuild b/base/applications/kbswitch/kbsdll/kbsdll.rbuild similarity index 100% rename from reactos/base/applications/kbswitch/kbsdll/kbsdll.rbuild rename to base/applications/kbswitch/kbsdll/kbsdll.rbuild diff --git a/reactos/base/applications/kbswitch/kbsdll/kbsdll.rc b/base/applications/kbswitch/kbsdll/kbsdll.rc similarity index 100% rename from reactos/base/applications/kbswitch/kbsdll/kbsdll.rc rename to base/applications/kbswitch/kbsdll/kbsdll.rc diff --git a/reactos/base/applications/kbswitch/kbsdll/kbsdll.spec b/base/applications/kbswitch/kbsdll/kbsdll.spec similarity index 100% rename from reactos/base/applications/kbswitch/kbsdll/kbsdll.spec rename to base/applications/kbswitch/kbsdll/kbsdll.spec diff --git a/reactos/base/applications/kbswitch/kbswitch.c b/base/applications/kbswitch/kbswitch.c similarity index 100% rename from reactos/base/applications/kbswitch/kbswitch.c rename to base/applications/kbswitch/kbswitch.c diff --git a/reactos/base/applications/kbswitch/kbswitch.h b/base/applications/kbswitch/kbswitch.h similarity index 100% rename from reactos/base/applications/kbswitch/kbswitch.h rename to base/applications/kbswitch/kbswitch.h diff --git a/reactos/base/applications/kbswitch/kbswitch.rbuild b/base/applications/kbswitch/kbswitch.rbuild similarity index 100% rename from reactos/base/applications/kbswitch/kbswitch.rbuild rename to base/applications/kbswitch/kbswitch.rbuild diff --git a/reactos/base/applications/kbswitch/kbswitch.rc b/base/applications/kbswitch/kbswitch.rc similarity index 100% rename from reactos/base/applications/kbswitch/kbswitch.rc rename to base/applications/kbswitch/kbswitch.rc diff --git a/reactos/base/applications/kbswitch/lang/bg-BG.rc b/base/applications/kbswitch/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/kbswitch/lang/bg-BG.rc rename to base/applications/kbswitch/lang/bg-BG.rc diff --git a/reactos/base/applications/kbswitch/lang/cs-CZ.rc b/base/applications/kbswitch/lang/cs-CZ.rc similarity index 100% rename from reactos/base/applications/kbswitch/lang/cs-CZ.rc rename to base/applications/kbswitch/lang/cs-CZ.rc diff --git a/reactos/base/applications/kbswitch/lang/de-DE.rc b/base/applications/kbswitch/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/kbswitch/lang/de-DE.rc rename to base/applications/kbswitch/lang/de-DE.rc diff --git a/reactos/base/applications/kbswitch/lang/en-US.rc b/base/applications/kbswitch/lang/en-US.rc similarity index 100% rename from reactos/base/applications/kbswitch/lang/en-US.rc rename to base/applications/kbswitch/lang/en-US.rc diff --git a/reactos/base/applications/kbswitch/lang/es-ES.rc b/base/applications/kbswitch/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/kbswitch/lang/es-ES.rc rename to base/applications/kbswitch/lang/es-ES.rc diff --git a/reactos/base/applications/kbswitch/lang/fr-FR.rc b/base/applications/kbswitch/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/kbswitch/lang/fr-FR.rc rename to base/applications/kbswitch/lang/fr-FR.rc diff --git a/reactos/base/applications/kbswitch/lang/it-IT.rc b/base/applications/kbswitch/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/kbswitch/lang/it-IT.rc rename to base/applications/kbswitch/lang/it-IT.rc diff --git a/reactos/base/applications/kbswitch/lang/ja-JP.rc b/base/applications/kbswitch/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/kbswitch/lang/ja-JP.rc rename to base/applications/kbswitch/lang/ja-JP.rc diff --git a/reactos/base/applications/kbswitch/lang/lt-LT.rc b/base/applications/kbswitch/lang/lt-LT.rc similarity index 100% rename from reactos/base/applications/kbswitch/lang/lt-LT.rc rename to base/applications/kbswitch/lang/lt-LT.rc diff --git a/reactos/base/applications/kbswitch/lang/no-NO.rc b/base/applications/kbswitch/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/kbswitch/lang/no-NO.rc rename to base/applications/kbswitch/lang/no-NO.rc diff --git a/reactos/base/applications/kbswitch/lang/pl-PL.rc b/base/applications/kbswitch/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/kbswitch/lang/pl-PL.rc rename to base/applications/kbswitch/lang/pl-PL.rc diff --git a/reactos/base/applications/kbswitch/lang/pt-BR.rc b/base/applications/kbswitch/lang/pt-BR.rc similarity index 100% rename from reactos/base/applications/kbswitch/lang/pt-BR.rc rename to base/applications/kbswitch/lang/pt-BR.rc diff --git a/reactos/base/applications/kbswitch/lang/ro-RO.rc b/base/applications/kbswitch/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/kbswitch/lang/ro-RO.rc rename to base/applications/kbswitch/lang/ro-RO.rc diff --git a/reactos/base/applications/kbswitch/lang/ru-RU.rc b/base/applications/kbswitch/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/kbswitch/lang/ru-RU.rc rename to base/applications/kbswitch/lang/ru-RU.rc diff --git a/reactos/base/applications/kbswitch/lang/sk-SK.rc b/base/applications/kbswitch/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/kbswitch/lang/sk-SK.rc rename to base/applications/kbswitch/lang/sk-SK.rc diff --git a/reactos/base/applications/kbswitch/lang/sv-SE.rc b/base/applications/kbswitch/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/kbswitch/lang/sv-SE.rc rename to base/applications/kbswitch/lang/sv-SE.rc diff --git a/reactos/base/applications/kbswitch/lang/uk-UA.rc b/base/applications/kbswitch/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/kbswitch/lang/uk-UA.rc rename to base/applications/kbswitch/lang/uk-UA.rc diff --git a/reactos/base/applications/kbswitch/lang/zh-CN.rc b/base/applications/kbswitch/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/kbswitch/lang/zh-CN.rc rename to base/applications/kbswitch/lang/zh-CN.rc diff --git a/reactos/base/applications/kbswitch/lang/zh-TW.rc b/base/applications/kbswitch/lang/zh-TW.rc similarity index 100% rename from reactos/base/applications/kbswitch/lang/zh-TW.rc rename to base/applications/kbswitch/lang/zh-TW.rc diff --git a/reactos/base/applications/kbswitch/res/kbswitch.ico b/base/applications/kbswitch/res/kbswitch.ico similarity index 100% rename from reactos/base/applications/kbswitch/res/kbswitch.ico rename to base/applications/kbswitch/res/kbswitch.ico diff --git a/reactos/base/applications/kbswitch/resource.h b/base/applications/kbswitch/resource.h similarity index 100% rename from reactos/base/applications/kbswitch/resource.h rename to base/applications/kbswitch/resource.h diff --git a/reactos/base/applications/kbswitch/rsrc.rc b/base/applications/kbswitch/rsrc.rc similarity index 100% rename from reactos/base/applications/kbswitch/rsrc.rc rename to base/applications/kbswitch/rsrc.rc diff --git a/reactos/base/applications/logoff/CMakeLists.txt b/base/applications/logoff/CMakeLists.txt similarity index 100% rename from reactos/base/applications/logoff/CMakeLists.txt rename to base/applications/logoff/CMakeLists.txt diff --git a/reactos/base/applications/logoff/lang/bg-BG.rc b/base/applications/logoff/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/logoff/lang/bg-BG.rc rename to base/applications/logoff/lang/bg-BG.rc diff --git a/reactos/base/applications/logoff/lang/ca-ES.rc b/base/applications/logoff/lang/ca-ES.rc similarity index 100% rename from reactos/base/applications/logoff/lang/ca-ES.rc rename to base/applications/logoff/lang/ca-ES.rc diff --git a/reactos/base/applications/logoff/lang/cs-CZ.rc b/base/applications/logoff/lang/cs-CZ.rc similarity index 100% rename from reactos/base/applications/logoff/lang/cs-CZ.rc rename to base/applications/logoff/lang/cs-CZ.rc diff --git a/reactos/base/applications/logoff/lang/de-DE.rc b/base/applications/logoff/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/logoff/lang/de-DE.rc rename to base/applications/logoff/lang/de-DE.rc diff --git a/reactos/base/applications/logoff/lang/el-GR.rc b/base/applications/logoff/lang/el-GR.rc similarity index 100% rename from reactos/base/applications/logoff/lang/el-GR.rc rename to base/applications/logoff/lang/el-GR.rc diff --git a/reactos/base/applications/logoff/lang/en-US.rc b/base/applications/logoff/lang/en-US.rc similarity index 100% rename from reactos/base/applications/logoff/lang/en-US.rc rename to base/applications/logoff/lang/en-US.rc diff --git a/reactos/base/applications/logoff/lang/es-ES.rc b/base/applications/logoff/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/logoff/lang/es-ES.rc rename to base/applications/logoff/lang/es-ES.rc diff --git a/reactos/base/applications/logoff/lang/fr-FR.rc b/base/applications/logoff/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/logoff/lang/fr-FR.rc rename to base/applications/logoff/lang/fr-FR.rc diff --git a/reactos/base/applications/logoff/lang/it-IT.rc b/base/applications/logoff/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/logoff/lang/it-IT.rc rename to base/applications/logoff/lang/it-IT.rc diff --git a/reactos/base/applications/logoff/lang/ja-JP.rc b/base/applications/logoff/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/logoff/lang/ja-JP.rc rename to base/applications/logoff/lang/ja-JP.rc diff --git a/reactos/base/applications/logoff/lang/ko-KR.rc b/base/applications/logoff/lang/ko-KR.rc similarity index 100% rename from reactos/base/applications/logoff/lang/ko-KR.rc rename to base/applications/logoff/lang/ko-KR.rc diff --git a/reactos/base/applications/logoff/lang/lt-LT.rc b/base/applications/logoff/lang/lt-LT.rc similarity index 100% rename from reactos/base/applications/logoff/lang/lt-LT.rc rename to base/applications/logoff/lang/lt-LT.rc diff --git a/reactos/base/applications/logoff/lang/no-NO.rc b/base/applications/logoff/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/logoff/lang/no-NO.rc rename to base/applications/logoff/lang/no-NO.rc diff --git a/reactos/base/applications/logoff/lang/pl-PL.rc b/base/applications/logoff/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/logoff/lang/pl-PL.rc rename to base/applications/logoff/lang/pl-PL.rc diff --git a/reactos/base/applications/logoff/lang/pt-BR.rc b/base/applications/logoff/lang/pt-BR.rc similarity index 100% rename from reactos/base/applications/logoff/lang/pt-BR.rc rename to base/applications/logoff/lang/pt-BR.rc diff --git a/reactos/base/applications/logoff/lang/ro-RO.rc b/base/applications/logoff/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/logoff/lang/ro-RO.rc rename to base/applications/logoff/lang/ro-RO.rc diff --git a/reactos/base/applications/logoff/lang/ru-RU.rc b/base/applications/logoff/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/logoff/lang/ru-RU.rc rename to base/applications/logoff/lang/ru-RU.rc diff --git a/reactos/base/applications/logoff/lang/sk-SK.rc b/base/applications/logoff/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/logoff/lang/sk-SK.rc rename to base/applications/logoff/lang/sk-SK.rc diff --git a/reactos/base/applications/logoff/lang/sv-SE.rc b/base/applications/logoff/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/logoff/lang/sv-SE.rc rename to base/applications/logoff/lang/sv-SE.rc diff --git a/reactos/base/applications/logoff/lang/uk-UA.rc b/base/applications/logoff/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/logoff/lang/uk-UA.rc rename to base/applications/logoff/lang/uk-UA.rc diff --git a/reactos/base/applications/logoff/lang/zh-CN.rc b/base/applications/logoff/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/logoff/lang/zh-CN.rc rename to base/applications/logoff/lang/zh-CN.rc diff --git a/reactos/base/applications/logoff/lang/zh-TW.rc b/base/applications/logoff/lang/zh-TW.rc similarity index 100% rename from reactos/base/applications/logoff/lang/zh-TW.rc rename to base/applications/logoff/lang/zh-TW.rc diff --git a/reactos/base/applications/logoff/logoff.c b/base/applications/logoff/logoff.c similarity index 100% rename from reactos/base/applications/logoff/logoff.c rename to base/applications/logoff/logoff.c diff --git a/reactos/base/applications/logoff/logoff.rbuild b/base/applications/logoff/logoff.rbuild similarity index 100% rename from reactos/base/applications/logoff/logoff.rbuild rename to base/applications/logoff/logoff.rbuild diff --git a/reactos/base/applications/logoff/logoff.rc b/base/applications/logoff/logoff.rc similarity index 100% rename from reactos/base/applications/logoff/logoff.rc rename to base/applications/logoff/logoff.rc diff --git a/reactos/base/applications/logoff/misc.c b/base/applications/logoff/misc.c similarity index 100% rename from reactos/base/applications/logoff/misc.c rename to base/applications/logoff/misc.c diff --git a/reactos/base/applications/logoff/precomp.h b/base/applications/logoff/precomp.h similarity index 100% rename from reactos/base/applications/logoff/precomp.h rename to base/applications/logoff/precomp.h diff --git a/reactos/base/applications/logoff/resource.h b/base/applications/logoff/resource.h similarity index 100% rename from reactos/base/applications/logoff/resource.h rename to base/applications/logoff/resource.h diff --git a/reactos/base/applications/logoff/rsrc.rc b/base/applications/logoff/rsrc.rc similarity index 100% rename from reactos/base/applications/logoff/rsrc.rc rename to base/applications/logoff/rsrc.rc diff --git a/reactos/base/applications/magnify/CMakeLists.txt b/base/applications/magnify/CMakeLists.txt similarity index 100% rename from reactos/base/applications/magnify/CMakeLists.txt rename to base/applications/magnify/CMakeLists.txt diff --git a/reactos/base/applications/magnify/lang/bg-BG.rc b/base/applications/magnify/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/magnify/lang/bg-BG.rc rename to base/applications/magnify/lang/bg-BG.rc diff --git a/reactos/base/applications/magnify/lang/de-DE.rc b/base/applications/magnify/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/magnify/lang/de-DE.rc rename to base/applications/magnify/lang/de-DE.rc diff --git a/reactos/base/applications/magnify/lang/en-US.rc b/base/applications/magnify/lang/en-US.rc similarity index 100% rename from reactos/base/applications/magnify/lang/en-US.rc rename to base/applications/magnify/lang/en-US.rc diff --git a/reactos/base/applications/magnify/lang/es-ES.rc b/base/applications/magnify/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/magnify/lang/es-ES.rc rename to base/applications/magnify/lang/es-ES.rc diff --git a/reactos/base/applications/magnify/lang/fr-FR.rc b/base/applications/magnify/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/magnify/lang/fr-FR.rc rename to base/applications/magnify/lang/fr-FR.rc diff --git a/reactos/base/applications/magnify/lang/it-IT.rc b/base/applications/magnify/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/magnify/lang/it-IT.rc rename to base/applications/magnify/lang/it-IT.rc diff --git a/reactos/base/applications/magnify/lang/ja-JP.rc b/base/applications/magnify/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/magnify/lang/ja-JP.rc rename to base/applications/magnify/lang/ja-JP.rc diff --git a/reactos/base/applications/magnify/lang/no-NO.rc b/base/applications/magnify/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/magnify/lang/no-NO.rc rename to base/applications/magnify/lang/no-NO.rc diff --git a/reactos/base/applications/magnify/lang/pl-PL.rc b/base/applications/magnify/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/magnify/lang/pl-PL.rc rename to base/applications/magnify/lang/pl-PL.rc diff --git a/reactos/base/applications/magnify/lang/ro-RO.rc b/base/applications/magnify/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/magnify/lang/ro-RO.rc rename to base/applications/magnify/lang/ro-RO.rc diff --git a/reactos/base/applications/magnify/lang/ru-RU.rc b/base/applications/magnify/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/magnify/lang/ru-RU.rc rename to base/applications/magnify/lang/ru-RU.rc diff --git a/reactos/base/applications/magnify/lang/sk-SK.rc b/base/applications/magnify/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/magnify/lang/sk-SK.rc rename to base/applications/magnify/lang/sk-SK.rc diff --git a/reactos/base/applications/magnify/lang/sv-SE.rc b/base/applications/magnify/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/magnify/lang/sv-SE.rc rename to base/applications/magnify/lang/sv-SE.rc diff --git a/reactos/base/applications/magnify/lang/uk-UA.rc b/base/applications/magnify/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/magnify/lang/uk-UA.rc rename to base/applications/magnify/lang/uk-UA.rc diff --git a/reactos/base/applications/magnify/lang/zh-CN.rc b/base/applications/magnify/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/magnify/lang/zh-CN.rc rename to base/applications/magnify/lang/zh-CN.rc diff --git a/reactos/base/applications/magnify/lang/zh-TW.rc b/base/applications/magnify/lang/zh-TW.rc similarity index 100% rename from reactos/base/applications/magnify/lang/zh-TW.rc rename to base/applications/magnify/lang/zh-TW.rc diff --git a/reactos/base/applications/magnify/magnifier.c b/base/applications/magnify/magnifier.c similarity index 100% rename from reactos/base/applications/magnify/magnifier.c rename to base/applications/magnify/magnifier.c diff --git a/reactos/base/applications/magnify/magnifier.h b/base/applications/magnify/magnifier.h similarity index 100% rename from reactos/base/applications/magnify/magnifier.h rename to base/applications/magnify/magnifier.h diff --git a/reactos/base/applications/magnify/magnify.rbuild b/base/applications/magnify/magnify.rbuild similarity index 100% rename from reactos/base/applications/magnify/magnify.rbuild rename to base/applications/magnify/magnify.rbuild diff --git a/reactos/base/applications/magnify/magnify.rc b/base/applications/magnify/magnify.rc similarity index 100% rename from reactos/base/applications/magnify/magnify.rc rename to base/applications/magnify/magnify.rc diff --git a/reactos/base/applications/magnify/res/magnify.ico b/base/applications/magnify/res/magnify.ico similarity index 100% rename from reactos/base/applications/magnify/res/magnify.ico rename to base/applications/magnify/res/magnify.ico diff --git a/reactos/base/applications/magnify/resource.h b/base/applications/magnify/resource.h similarity index 100% rename from reactos/base/applications/magnify/resource.h rename to base/applications/magnify/resource.h diff --git a/reactos/base/applications/magnify/rsrc.rc b/base/applications/magnify/rsrc.rc similarity index 100% rename from reactos/base/applications/magnify/rsrc.rc rename to base/applications/magnify/rsrc.rc diff --git a/reactos/base/applications/magnify/settings.c b/base/applications/magnify/settings.c similarity index 100% rename from reactos/base/applications/magnify/settings.c rename to base/applications/magnify/settings.c diff --git a/reactos/base/applications/mmc/CMakeLists.txt b/base/applications/mmc/CMakeLists.txt similarity index 100% rename from reactos/base/applications/mmc/CMakeLists.txt rename to base/applications/mmc/CMakeLists.txt diff --git a/reactos/base/applications/mmc/console.c b/base/applications/mmc/console.c similarity index 100% rename from reactos/base/applications/mmc/console.c rename to base/applications/mmc/console.c diff --git a/reactos/base/applications/mmc/lang/bg-BG.rc b/base/applications/mmc/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/mmc/lang/bg-BG.rc rename to base/applications/mmc/lang/bg-BG.rc diff --git a/reactos/base/applications/mmc/lang/ca-ES.rc b/base/applications/mmc/lang/ca-ES.rc similarity index 100% rename from reactos/base/applications/mmc/lang/ca-ES.rc rename to base/applications/mmc/lang/ca-ES.rc diff --git a/reactos/base/applications/mmc/lang/cs-CZ.rc b/base/applications/mmc/lang/cs-CZ.rc similarity index 100% rename from reactos/base/applications/mmc/lang/cs-CZ.rc rename to base/applications/mmc/lang/cs-CZ.rc diff --git a/reactos/base/applications/mmc/lang/de-DE.rc b/base/applications/mmc/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/mmc/lang/de-DE.rc rename to base/applications/mmc/lang/de-DE.rc diff --git a/reactos/base/applications/mmc/lang/el-GR.rc b/base/applications/mmc/lang/el-GR.rc similarity index 100% rename from reactos/base/applications/mmc/lang/el-GR.rc rename to base/applications/mmc/lang/el-GR.rc diff --git a/reactos/base/applications/mmc/lang/en-US.rc b/base/applications/mmc/lang/en-US.rc similarity index 100% rename from reactos/base/applications/mmc/lang/en-US.rc rename to base/applications/mmc/lang/en-US.rc diff --git a/reactos/base/applications/mmc/lang/es-ES.rc b/base/applications/mmc/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/mmc/lang/es-ES.rc rename to base/applications/mmc/lang/es-ES.rc diff --git a/reactos/base/applications/mmc/lang/fr-FR.rc b/base/applications/mmc/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/mmc/lang/fr-FR.rc rename to base/applications/mmc/lang/fr-FR.rc diff --git a/reactos/base/applications/mmc/lang/it-IT.rc b/base/applications/mmc/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/mmc/lang/it-IT.rc rename to base/applications/mmc/lang/it-IT.rc diff --git a/reactos/base/applications/mmc/lang/ko-KR.rc b/base/applications/mmc/lang/ko-KR.rc similarity index 100% rename from reactos/base/applications/mmc/lang/ko-KR.rc rename to base/applications/mmc/lang/ko-KR.rc diff --git a/reactos/base/applications/mmc/lang/lt-LT.rc b/base/applications/mmc/lang/lt-LT.rc similarity index 100% rename from reactos/base/applications/mmc/lang/lt-LT.rc rename to base/applications/mmc/lang/lt-LT.rc diff --git a/reactos/base/applications/mmc/lang/no-NO.rc b/base/applications/mmc/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/mmc/lang/no-NO.rc rename to base/applications/mmc/lang/no-NO.rc diff --git a/reactos/base/applications/mmc/lang/pl-PL.rc b/base/applications/mmc/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/mmc/lang/pl-PL.rc rename to base/applications/mmc/lang/pl-PL.rc diff --git a/reactos/base/applications/mmc/lang/pt-BR.rc b/base/applications/mmc/lang/pt-BR.rc similarity index 100% rename from reactos/base/applications/mmc/lang/pt-BR.rc rename to base/applications/mmc/lang/pt-BR.rc diff --git a/reactos/base/applications/mmc/lang/ro-RO.rc b/base/applications/mmc/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/mmc/lang/ro-RO.rc rename to base/applications/mmc/lang/ro-RO.rc diff --git a/reactos/base/applications/mmc/lang/ru-RU.rc b/base/applications/mmc/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/mmc/lang/ru-RU.rc rename to base/applications/mmc/lang/ru-RU.rc diff --git a/reactos/base/applications/mmc/lang/sk-SK.rc b/base/applications/mmc/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/mmc/lang/sk-SK.rc rename to base/applications/mmc/lang/sk-SK.rc diff --git a/reactos/base/applications/mmc/lang/sv-SE.rc b/base/applications/mmc/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/mmc/lang/sv-SE.rc rename to base/applications/mmc/lang/sv-SE.rc diff --git a/reactos/base/applications/mmc/lang/uk-UA.rc b/base/applications/mmc/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/mmc/lang/uk-UA.rc rename to base/applications/mmc/lang/uk-UA.rc diff --git a/reactos/base/applications/mmc/lang/zh-CN.rc b/base/applications/mmc/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/mmc/lang/zh-CN.rc rename to base/applications/mmc/lang/zh-CN.rc diff --git a/reactos/base/applications/mmc/lang/zh-TW.rc b/base/applications/mmc/lang/zh-TW.rc similarity index 100% rename from reactos/base/applications/mmc/lang/zh-TW.rc rename to base/applications/mmc/lang/zh-TW.rc diff --git a/reactos/base/applications/mmc/misc.c b/base/applications/mmc/misc.c similarity index 100% rename from reactos/base/applications/mmc/misc.c rename to base/applications/mmc/misc.c diff --git a/reactos/base/applications/mmc/mmc.c b/base/applications/mmc/mmc.c similarity index 100% rename from reactos/base/applications/mmc/mmc.c rename to base/applications/mmc/mmc.c diff --git a/reactos/base/applications/mmc/mmc.rbuild b/base/applications/mmc/mmc.rbuild similarity index 100% rename from reactos/base/applications/mmc/mmc.rbuild rename to base/applications/mmc/mmc.rbuild diff --git a/reactos/base/applications/mmc/mmc.rc b/base/applications/mmc/mmc.rc similarity index 100% rename from reactos/base/applications/mmc/mmc.rc rename to base/applications/mmc/mmc.rc diff --git a/reactos/base/applications/mmc/precomp.h b/base/applications/mmc/precomp.h similarity index 100% rename from reactos/base/applications/mmc/precomp.h rename to base/applications/mmc/precomp.h diff --git a/reactos/base/applications/mmc/resource.h b/base/applications/mmc/resource.h similarity index 100% rename from reactos/base/applications/mmc/resource.h rename to base/applications/mmc/resource.h diff --git a/reactos/base/applications/mmc/resources/mmc.ico b/base/applications/mmc/resources/mmc.ico similarity index 100% rename from reactos/base/applications/mmc/resources/mmc.ico rename to base/applications/mmc/resources/mmc.ico diff --git a/reactos/base/applications/mmc/rsrc.rc b/base/applications/mmc/rsrc.rc similarity index 100% rename from reactos/base/applications/mmc/rsrc.rc rename to base/applications/mmc/rsrc.rc diff --git a/reactos/base/applications/mplay32/CMakeLists.txt b/base/applications/mplay32/CMakeLists.txt similarity index 100% rename from reactos/base/applications/mplay32/CMakeLists.txt rename to base/applications/mplay32/CMakeLists.txt diff --git a/reactos/base/applications/mplay32/lang/bg-BG.rc b/base/applications/mplay32/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/mplay32/lang/bg-BG.rc rename to base/applications/mplay32/lang/bg-BG.rc diff --git a/reactos/base/applications/mplay32/lang/cs-CZ.rc b/base/applications/mplay32/lang/cs-CZ.rc similarity index 100% rename from reactos/base/applications/mplay32/lang/cs-CZ.rc rename to base/applications/mplay32/lang/cs-CZ.rc diff --git a/reactos/base/applications/mplay32/lang/de-DE.rc b/base/applications/mplay32/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/mplay32/lang/de-DE.rc rename to base/applications/mplay32/lang/de-DE.rc diff --git a/reactos/base/applications/mplay32/lang/en-US.rc b/base/applications/mplay32/lang/en-US.rc similarity index 100% rename from reactos/base/applications/mplay32/lang/en-US.rc rename to base/applications/mplay32/lang/en-US.rc diff --git a/reactos/base/applications/mplay32/lang/es-ES.rc b/base/applications/mplay32/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/mplay32/lang/es-ES.rc rename to base/applications/mplay32/lang/es-ES.rc diff --git a/reactos/base/applications/mplay32/lang/fr-FR.rc b/base/applications/mplay32/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/mplay32/lang/fr-FR.rc rename to base/applications/mplay32/lang/fr-FR.rc diff --git a/reactos/base/applications/mplay32/lang/it-IT.rc b/base/applications/mplay32/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/mplay32/lang/it-IT.rc rename to base/applications/mplay32/lang/it-IT.rc diff --git a/reactos/base/applications/mplay32/lang/ja-JP.rc b/base/applications/mplay32/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/mplay32/lang/ja-JP.rc rename to base/applications/mplay32/lang/ja-JP.rc diff --git a/reactos/base/applications/mplay32/lang/nl-NL.rc b/base/applications/mplay32/lang/nl-NL.rc similarity index 100% rename from reactos/base/applications/mplay32/lang/nl-NL.rc rename to base/applications/mplay32/lang/nl-NL.rc diff --git a/reactos/base/applications/mplay32/lang/no-NO.rc b/base/applications/mplay32/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/mplay32/lang/no-NO.rc rename to base/applications/mplay32/lang/no-NO.rc diff --git a/reactos/base/applications/mplay32/lang/pl-PL.rc b/base/applications/mplay32/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/mplay32/lang/pl-PL.rc rename to base/applications/mplay32/lang/pl-PL.rc diff --git a/reactos/base/applications/mplay32/lang/pt-BR.rc b/base/applications/mplay32/lang/pt-BR.rc similarity index 100% rename from reactos/base/applications/mplay32/lang/pt-BR.rc rename to base/applications/mplay32/lang/pt-BR.rc diff --git a/reactos/base/applications/mplay32/lang/ro-RO.rc b/base/applications/mplay32/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/mplay32/lang/ro-RO.rc rename to base/applications/mplay32/lang/ro-RO.rc diff --git a/reactos/base/applications/mplay32/lang/ru-RU.rc b/base/applications/mplay32/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/mplay32/lang/ru-RU.rc rename to base/applications/mplay32/lang/ru-RU.rc diff --git a/reactos/base/applications/mplay32/lang/sk-SK.rc b/base/applications/mplay32/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/mplay32/lang/sk-SK.rc rename to base/applications/mplay32/lang/sk-SK.rc diff --git a/reactos/base/applications/mplay32/lang/sv-SE.rc b/base/applications/mplay32/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/mplay32/lang/sv-SE.rc rename to base/applications/mplay32/lang/sv-SE.rc diff --git a/reactos/base/applications/mplay32/lang/uk-UA.rc b/base/applications/mplay32/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/mplay32/lang/uk-UA.rc rename to base/applications/mplay32/lang/uk-UA.rc diff --git a/reactos/base/applications/mplay32/lang/zh-CN.rc b/base/applications/mplay32/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/mplay32/lang/zh-CN.rc rename to base/applications/mplay32/lang/zh-CN.rc diff --git a/reactos/base/applications/mplay32/lang/zh-TW.rc b/base/applications/mplay32/lang/zh-TW.rc similarity index 100% rename from reactos/base/applications/mplay32/lang/zh-TW.rc rename to base/applications/mplay32/lang/zh-TW.rc diff --git a/reactos/base/applications/mplay32/mplay32.c b/base/applications/mplay32/mplay32.c similarity index 100% rename from reactos/base/applications/mplay32/mplay32.c rename to base/applications/mplay32/mplay32.c diff --git a/reactos/base/applications/mplay32/mplay32.h b/base/applications/mplay32/mplay32.h similarity index 100% rename from reactos/base/applications/mplay32/mplay32.h rename to base/applications/mplay32/mplay32.h diff --git a/reactos/base/applications/mplay32/mplay32.rbuild b/base/applications/mplay32/mplay32.rbuild similarity index 100% rename from reactos/base/applications/mplay32/mplay32.rbuild rename to base/applications/mplay32/mplay32.rbuild diff --git a/reactos/base/applications/mplay32/mplay32.rc b/base/applications/mplay32/mplay32.rc similarity index 100% rename from reactos/base/applications/mplay32/mplay32.rc rename to base/applications/mplay32/mplay32.rc diff --git a/reactos/base/applications/mplay32/resource.h b/base/applications/mplay32/resource.h similarity index 100% rename from reactos/base/applications/mplay32/resource.h rename to base/applications/mplay32/resource.h diff --git a/reactos/base/applications/mplay32/resources/backward.bmp b/base/applications/mplay32/resources/backward.bmp similarity index 100% rename from reactos/base/applications/mplay32/resources/backward.bmp rename to base/applications/mplay32/resources/backward.bmp diff --git a/reactos/base/applications/mplay32/resources/eject.bmp b/base/applications/mplay32/resources/eject.bmp similarity index 100% rename from reactos/base/applications/mplay32/resources/eject.bmp rename to base/applications/mplay32/resources/eject.bmp diff --git a/reactos/base/applications/mplay32/resources/forward.bmp b/base/applications/mplay32/resources/forward.bmp similarity index 100% rename from reactos/base/applications/mplay32/resources/forward.bmp rename to base/applications/mplay32/resources/forward.bmp diff --git a/reactos/base/applications/mplay32/resources/mplay32.ico b/base/applications/mplay32/resources/mplay32.ico similarity index 100% rename from reactos/base/applications/mplay32/resources/mplay32.ico rename to base/applications/mplay32/resources/mplay32.ico diff --git a/reactos/base/applications/mplay32/resources/pause.bmp b/base/applications/mplay32/resources/pause.bmp similarity index 100% rename from reactos/base/applications/mplay32/resources/pause.bmp rename to base/applications/mplay32/resources/pause.bmp diff --git a/reactos/base/applications/mplay32/resources/play.bmp b/base/applications/mplay32/resources/play.bmp similarity index 100% rename from reactos/base/applications/mplay32/resources/play.bmp rename to base/applications/mplay32/resources/play.bmp diff --git a/reactos/base/applications/mplay32/resources/seekback.bmp b/base/applications/mplay32/resources/seekback.bmp similarity index 100% rename from reactos/base/applications/mplay32/resources/seekback.bmp rename to base/applications/mplay32/resources/seekback.bmp diff --git a/reactos/base/applications/mplay32/resources/seekforw.bmp b/base/applications/mplay32/resources/seekforw.bmp similarity index 100% rename from reactos/base/applications/mplay32/resources/seekforw.bmp rename to base/applications/mplay32/resources/seekforw.bmp diff --git a/reactos/base/applications/mplay32/resources/stop.bmp b/base/applications/mplay32/resources/stop.bmp similarity index 100% rename from reactos/base/applications/mplay32/resources/stop.bmp rename to base/applications/mplay32/resources/stop.bmp diff --git a/reactos/base/applications/mplay32/rsrc.rc b/base/applications/mplay32/rsrc.rc similarity index 100% rename from reactos/base/applications/mplay32/rsrc.rc rename to base/applications/mplay32/rsrc.rc diff --git a/reactos/base/applications/msconfig/CMakeLists.txt b/base/applications/msconfig/CMakeLists.txt similarity index 100% rename from reactos/base/applications/msconfig/CMakeLists.txt rename to base/applications/msconfig/CMakeLists.txt diff --git a/reactos/base/applications/msconfig/freeldrpage.c b/base/applications/msconfig/freeldrpage.c similarity index 100% rename from reactos/base/applications/msconfig/freeldrpage.c rename to base/applications/msconfig/freeldrpage.c diff --git a/reactos/base/applications/msconfig/freeldrpage.h b/base/applications/msconfig/freeldrpage.h similarity index 100% rename from reactos/base/applications/msconfig/freeldrpage.h rename to base/applications/msconfig/freeldrpage.h diff --git a/reactos/base/applications/msconfig/generalpage.c b/base/applications/msconfig/generalpage.c similarity index 100% rename from reactos/base/applications/msconfig/generalpage.c rename to base/applications/msconfig/generalpage.c diff --git a/reactos/base/applications/msconfig/generalpage.h b/base/applications/msconfig/generalpage.h similarity index 100% rename from reactos/base/applications/msconfig/generalpage.h rename to base/applications/msconfig/generalpage.h diff --git a/reactos/base/applications/msconfig/lang/bg-BG.rc b/base/applications/msconfig/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/msconfig/lang/bg-BG.rc rename to base/applications/msconfig/lang/bg-BG.rc diff --git a/reactos/base/applications/msconfig/lang/ca-ES.rc b/base/applications/msconfig/lang/ca-ES.rc similarity index 100% rename from reactos/base/applications/msconfig/lang/ca-ES.rc rename to base/applications/msconfig/lang/ca-ES.rc diff --git a/reactos/base/applications/msconfig/lang/cs-CZ.rc b/base/applications/msconfig/lang/cs-CZ.rc similarity index 100% rename from reactos/base/applications/msconfig/lang/cs-CZ.rc rename to base/applications/msconfig/lang/cs-CZ.rc diff --git a/reactos/base/applications/msconfig/lang/de-DE.rc b/base/applications/msconfig/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/msconfig/lang/de-DE.rc rename to base/applications/msconfig/lang/de-DE.rc diff --git a/reactos/base/applications/msconfig/lang/el-GR.rc b/base/applications/msconfig/lang/el-GR.rc similarity index 100% rename from reactos/base/applications/msconfig/lang/el-GR.rc rename to base/applications/msconfig/lang/el-GR.rc diff --git a/reactos/base/applications/msconfig/lang/en-US.rc b/base/applications/msconfig/lang/en-US.rc similarity index 100% rename from reactos/base/applications/msconfig/lang/en-US.rc rename to base/applications/msconfig/lang/en-US.rc diff --git a/reactos/base/applications/msconfig/lang/es-ES.rc b/base/applications/msconfig/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/msconfig/lang/es-ES.rc rename to base/applications/msconfig/lang/es-ES.rc diff --git a/reactos/base/applications/msconfig/lang/fr-FR.rc b/base/applications/msconfig/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/msconfig/lang/fr-FR.rc rename to base/applications/msconfig/lang/fr-FR.rc diff --git a/reactos/base/applications/msconfig/lang/hu-HU.rc b/base/applications/msconfig/lang/hu-HU.rc similarity index 100% rename from reactos/base/applications/msconfig/lang/hu-HU.rc rename to base/applications/msconfig/lang/hu-HU.rc diff --git a/reactos/base/applications/msconfig/lang/id-ID.rc b/base/applications/msconfig/lang/id-ID.rc similarity index 100% rename from reactos/base/applications/msconfig/lang/id-ID.rc rename to base/applications/msconfig/lang/id-ID.rc diff --git a/reactos/base/applications/msconfig/lang/it-IT.rc b/base/applications/msconfig/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/msconfig/lang/it-IT.rc rename to base/applications/msconfig/lang/it-IT.rc diff --git a/reactos/base/applications/msconfig/lang/ko-KR.rc b/base/applications/msconfig/lang/ko-KR.rc similarity index 100% rename from reactos/base/applications/msconfig/lang/ko-KR.rc rename to base/applications/msconfig/lang/ko-KR.rc diff --git a/reactos/base/applications/msconfig/lang/nl-NL.rc b/base/applications/msconfig/lang/nl-NL.rc similarity index 100% rename from reactos/base/applications/msconfig/lang/nl-NL.rc rename to base/applications/msconfig/lang/nl-NL.rc diff --git a/reactos/base/applications/msconfig/lang/no-NO.rc b/base/applications/msconfig/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/msconfig/lang/no-NO.rc rename to base/applications/msconfig/lang/no-NO.rc diff --git a/reactos/base/applications/msconfig/lang/pl-PL.rc b/base/applications/msconfig/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/msconfig/lang/pl-PL.rc rename to base/applications/msconfig/lang/pl-PL.rc diff --git a/reactos/base/applications/msconfig/lang/pt-BR.rc b/base/applications/msconfig/lang/pt-BR.rc similarity index 100% rename from reactos/base/applications/msconfig/lang/pt-BR.rc rename to base/applications/msconfig/lang/pt-BR.rc diff --git a/reactos/base/applications/msconfig/lang/ro-RO.rc b/base/applications/msconfig/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/msconfig/lang/ro-RO.rc rename to base/applications/msconfig/lang/ro-RO.rc diff --git a/reactos/base/applications/msconfig/lang/ru-RU.rc b/base/applications/msconfig/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/msconfig/lang/ru-RU.rc rename to base/applications/msconfig/lang/ru-RU.rc diff --git a/reactos/base/applications/msconfig/lang/sk-SK.rc b/base/applications/msconfig/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/msconfig/lang/sk-SK.rc rename to base/applications/msconfig/lang/sk-SK.rc diff --git a/reactos/base/applications/msconfig/lang/sv-SE.rc b/base/applications/msconfig/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/msconfig/lang/sv-SE.rc rename to base/applications/msconfig/lang/sv-SE.rc diff --git a/reactos/base/applications/msconfig/lang/th-TH.rc b/base/applications/msconfig/lang/th-TH.rc similarity index 100% rename from reactos/base/applications/msconfig/lang/th-TH.rc rename to base/applications/msconfig/lang/th-TH.rc diff --git a/reactos/base/applications/msconfig/lang/uk-UA.rc b/base/applications/msconfig/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/msconfig/lang/uk-UA.rc rename to base/applications/msconfig/lang/uk-UA.rc diff --git a/reactos/base/applications/msconfig/lang/zh-CN.rc b/base/applications/msconfig/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/msconfig/lang/zh-CN.rc rename to base/applications/msconfig/lang/zh-CN.rc diff --git a/reactos/base/applications/msconfig/lang/zh-TW.rc b/base/applications/msconfig/lang/zh-TW.rc similarity index 100% rename from reactos/base/applications/msconfig/lang/zh-TW.rc rename to base/applications/msconfig/lang/zh-TW.rc diff --git a/reactos/base/applications/msconfig/msconfig.c b/base/applications/msconfig/msconfig.c similarity index 100% rename from reactos/base/applications/msconfig/msconfig.c rename to base/applications/msconfig/msconfig.c diff --git a/reactos/base/applications/msconfig/msconfig.h b/base/applications/msconfig/msconfig.h similarity index 100% rename from reactos/base/applications/msconfig/msconfig.h rename to base/applications/msconfig/msconfig.h diff --git a/reactos/base/applications/msconfig/msconfig.rbuild b/base/applications/msconfig/msconfig.rbuild similarity index 100% rename from reactos/base/applications/msconfig/msconfig.rbuild rename to base/applications/msconfig/msconfig.rbuild diff --git a/reactos/base/applications/msconfig/msconfig.rc b/base/applications/msconfig/msconfig.rc similarity index 100% rename from reactos/base/applications/msconfig/msconfig.rc rename to base/applications/msconfig/msconfig.rc diff --git a/reactos/base/applications/msconfig/precomp.h b/base/applications/msconfig/precomp.h similarity index 100% rename from reactos/base/applications/msconfig/precomp.h rename to base/applications/msconfig/precomp.h diff --git a/reactos/base/applications/msconfig/res/msconfig.ico b/base/applications/msconfig/res/msconfig.ico similarity index 100% rename from reactos/base/applications/msconfig/res/msconfig.ico rename to base/applications/msconfig/res/msconfig.ico diff --git a/reactos/base/applications/msconfig/resource.h b/base/applications/msconfig/resource.h similarity index 100% rename from reactos/base/applications/msconfig/resource.h rename to base/applications/msconfig/resource.h diff --git a/reactos/base/applications/msconfig/rsrc.rc b/base/applications/msconfig/rsrc.rc similarity index 100% rename from reactos/base/applications/msconfig/rsrc.rc rename to base/applications/msconfig/rsrc.rc diff --git a/reactos/base/applications/msconfig/srvpage.c b/base/applications/msconfig/srvpage.c similarity index 100% rename from reactos/base/applications/msconfig/srvpage.c rename to base/applications/msconfig/srvpage.c diff --git a/reactos/base/applications/msconfig/srvpage.h b/base/applications/msconfig/srvpage.h similarity index 100% rename from reactos/base/applications/msconfig/srvpage.h rename to base/applications/msconfig/srvpage.h diff --git a/reactos/base/applications/msconfig/startuppage.c b/base/applications/msconfig/startuppage.c similarity index 100% rename from reactos/base/applications/msconfig/startuppage.c rename to base/applications/msconfig/startuppage.c diff --git a/reactos/base/applications/msconfig/startuppage.h b/base/applications/msconfig/startuppage.h similarity index 100% rename from reactos/base/applications/msconfig/startuppage.h rename to base/applications/msconfig/startuppage.h diff --git a/reactos/base/applications/msconfig/systempage.c b/base/applications/msconfig/systempage.c similarity index 100% rename from reactos/base/applications/msconfig/systempage.c rename to base/applications/msconfig/systempage.c diff --git a/reactos/base/applications/msconfig/systempage.h b/base/applications/msconfig/systempage.h similarity index 100% rename from reactos/base/applications/msconfig/systempage.h rename to base/applications/msconfig/systempage.h diff --git a/reactos/base/applications/msconfig/toolspage.c b/base/applications/msconfig/toolspage.c similarity index 100% rename from reactos/base/applications/msconfig/toolspage.c rename to base/applications/msconfig/toolspage.c diff --git a/reactos/base/applications/msconfig/toolspage.h b/base/applications/msconfig/toolspage.h similarity index 100% rename from reactos/base/applications/msconfig/toolspage.h rename to base/applications/msconfig/toolspage.h diff --git a/reactos/base/applications/mscutils/CMakeLists.txt b/base/applications/mscutils/CMakeLists.txt similarity index 100% rename from reactos/base/applications/mscutils/CMakeLists.txt rename to base/applications/mscutils/CMakeLists.txt diff --git a/reactos/base/applications/mscutils/devmgmt/CMakeLists.txt b/base/applications/mscutils/devmgmt/CMakeLists.txt similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/CMakeLists.txt rename to base/applications/mscutils/devmgmt/CMakeLists.txt diff --git a/reactos/base/applications/mscutils/devmgmt/about.c b/base/applications/mscutils/devmgmt/about.c similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/about.c rename to base/applications/mscutils/devmgmt/about.c diff --git a/reactos/base/applications/mscutils/devmgmt/devmgmt.c b/base/applications/mscutils/devmgmt/devmgmt.c similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/devmgmt.c rename to base/applications/mscutils/devmgmt/devmgmt.c diff --git a/reactos/base/applications/mscutils/devmgmt/devmgmt.rbuild b/base/applications/mscutils/devmgmt/devmgmt.rbuild similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/devmgmt.rbuild rename to base/applications/mscutils/devmgmt/devmgmt.rbuild diff --git a/reactos/base/applications/mscutils/devmgmt/devmgmt.rc b/base/applications/mscutils/devmgmt/devmgmt.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/devmgmt.rc rename to base/applications/mscutils/devmgmt/devmgmt.rc diff --git a/reactos/base/applications/mscutils/devmgmt/enumdevices.c b/base/applications/mscutils/devmgmt/enumdevices.c similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/enumdevices.c rename to base/applications/mscutils/devmgmt/enumdevices.c diff --git a/reactos/base/applications/mscutils/devmgmt/lang/bg-BG.rc b/base/applications/mscutils/devmgmt/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/lang/bg-BG.rc rename to base/applications/mscutils/devmgmt/lang/bg-BG.rc diff --git a/reactos/base/applications/mscutils/devmgmt/lang/de-DE.rc b/base/applications/mscutils/devmgmt/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/lang/de-DE.rc rename to base/applications/mscutils/devmgmt/lang/de-DE.rc diff --git a/reactos/base/applications/mscutils/devmgmt/lang/el-GR.rc b/base/applications/mscutils/devmgmt/lang/el-GR.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/lang/el-GR.rc rename to base/applications/mscutils/devmgmt/lang/el-GR.rc diff --git a/reactos/base/applications/mscutils/devmgmt/lang/en-US.rc b/base/applications/mscutils/devmgmt/lang/en-US.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/lang/en-US.rc rename to base/applications/mscutils/devmgmt/lang/en-US.rc diff --git a/reactos/base/applications/mscutils/devmgmt/lang/es-ES.rc b/base/applications/mscutils/devmgmt/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/lang/es-ES.rc rename to base/applications/mscutils/devmgmt/lang/es-ES.rc diff --git a/reactos/base/applications/mscutils/devmgmt/lang/fr-FR.rc b/base/applications/mscutils/devmgmt/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/lang/fr-FR.rc rename to base/applications/mscutils/devmgmt/lang/fr-FR.rc diff --git a/reactos/base/applications/mscutils/devmgmt/lang/id-ID.rc b/base/applications/mscutils/devmgmt/lang/id-ID.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/lang/id-ID.rc rename to base/applications/mscutils/devmgmt/lang/id-ID.rc diff --git a/reactos/base/applications/mscutils/devmgmt/lang/it-IT.rc b/base/applications/mscutils/devmgmt/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/lang/it-IT.rc rename to base/applications/mscutils/devmgmt/lang/it-IT.rc diff --git a/reactos/base/applications/mscutils/devmgmt/lang/ja-JP.rc b/base/applications/mscutils/devmgmt/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/lang/ja-JP.rc rename to base/applications/mscutils/devmgmt/lang/ja-JP.rc diff --git a/reactos/base/applications/mscutils/devmgmt/lang/ko-KR.rc b/base/applications/mscutils/devmgmt/lang/ko-KR.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/lang/ko-KR.rc rename to base/applications/mscutils/devmgmt/lang/ko-KR.rc diff --git a/reactos/base/applications/mscutils/devmgmt/lang/no-NO.rc b/base/applications/mscutils/devmgmt/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/lang/no-NO.rc rename to base/applications/mscutils/devmgmt/lang/no-NO.rc diff --git a/reactos/base/applications/mscutils/devmgmt/lang/pl-PL.rc b/base/applications/mscutils/devmgmt/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/lang/pl-PL.rc rename to base/applications/mscutils/devmgmt/lang/pl-PL.rc diff --git a/reactos/base/applications/mscutils/devmgmt/lang/ro-RO.rc b/base/applications/mscutils/devmgmt/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/lang/ro-RO.rc rename to base/applications/mscutils/devmgmt/lang/ro-RO.rc diff --git a/reactos/base/applications/mscutils/devmgmt/lang/ru-RU.rc b/base/applications/mscutils/devmgmt/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/lang/ru-RU.rc rename to base/applications/mscutils/devmgmt/lang/ru-RU.rc diff --git a/reactos/base/applications/mscutils/devmgmt/lang/sk-SK.rc b/base/applications/mscutils/devmgmt/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/lang/sk-SK.rc rename to base/applications/mscutils/devmgmt/lang/sk-SK.rc diff --git a/reactos/base/applications/mscutils/devmgmt/lang/sv-SE.rc b/base/applications/mscutils/devmgmt/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/lang/sv-SE.rc rename to base/applications/mscutils/devmgmt/lang/sv-SE.rc diff --git a/reactos/base/applications/mscutils/devmgmt/lang/th-TH.rc b/base/applications/mscutils/devmgmt/lang/th-TH.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/lang/th-TH.rc rename to base/applications/mscutils/devmgmt/lang/th-TH.rc diff --git a/reactos/base/applications/mscutils/devmgmt/lang/uk-UA.rc b/base/applications/mscutils/devmgmt/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/lang/uk-UA.rc rename to base/applications/mscutils/devmgmt/lang/uk-UA.rc diff --git a/reactos/base/applications/mscutils/devmgmt/lang/zh-CN.rc b/base/applications/mscutils/devmgmt/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/lang/zh-CN.rc rename to base/applications/mscutils/devmgmt/lang/zh-CN.rc diff --git a/reactos/base/applications/mscutils/devmgmt/mainwnd.c b/base/applications/mscutils/devmgmt/mainwnd.c similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/mainwnd.c rename to base/applications/mscutils/devmgmt/mainwnd.c diff --git a/reactos/base/applications/mscutils/devmgmt/misc.c b/base/applications/mscutils/devmgmt/misc.c similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/misc.c rename to base/applications/mscutils/devmgmt/misc.c diff --git a/reactos/base/applications/mscutils/devmgmt/precomp.h b/base/applications/mscutils/devmgmt/precomp.h similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/precomp.h rename to base/applications/mscutils/devmgmt/precomp.h diff --git a/reactos/base/applications/mscutils/devmgmt/res/computer.ico b/base/applications/mscutils/devmgmt/res/computer.ico similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/res/computer.ico rename to base/applications/mscutils/devmgmt/res/computer.ico diff --git a/reactos/base/applications/mscutils/devmgmt/res/exit.bmp b/base/applications/mscutils/devmgmt/res/exit.bmp similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/res/exit.bmp rename to base/applications/mscutils/devmgmt/res/exit.bmp diff --git a/reactos/base/applications/mscutils/devmgmt/res/help.bmp b/base/applications/mscutils/devmgmt/res/help.bmp similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/res/help.bmp rename to base/applications/mscutils/devmgmt/res/help.bmp diff --git a/reactos/base/applications/mscutils/devmgmt/res/properties.bmp b/base/applications/mscutils/devmgmt/res/properties.bmp similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/res/properties.bmp rename to base/applications/mscutils/devmgmt/res/properties.bmp diff --git a/reactos/base/applications/mscutils/devmgmt/res/refresh.bmp b/base/applications/mscutils/devmgmt/res/refresh.bmp similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/res/refresh.bmp rename to base/applications/mscutils/devmgmt/res/refresh.bmp diff --git a/reactos/base/applications/mscutils/devmgmt/res/root.bmp b/base/applications/mscutils/devmgmt/res/root.bmp similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/res/root.bmp rename to base/applications/mscutils/devmgmt/res/root.bmp diff --git a/reactos/base/applications/mscutils/devmgmt/resource.h b/base/applications/mscutils/devmgmt/resource.h similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/resource.h rename to base/applications/mscutils/devmgmt/resource.h diff --git a/reactos/base/applications/mscutils/devmgmt/rsrc.rc b/base/applications/mscutils/devmgmt/rsrc.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt/rsrc.rc rename to base/applications/mscutils/devmgmt/rsrc.rc diff --git a/reactos/base/applications/mscutils/devmgmt_new/DeviceView.cpp b/base/applications/mscutils/devmgmt_new/DeviceView.cpp similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/DeviceView.cpp rename to base/applications/mscutils/devmgmt_new/DeviceView.cpp diff --git a/reactos/base/applications/mscutils/devmgmt_new/DeviceView.h b/base/applications/mscutils/devmgmt_new/DeviceView.h similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/DeviceView.h rename to base/applications/mscutils/devmgmt_new/DeviceView.h diff --git a/reactos/base/applications/mscutils/devmgmt_new/Devices.cpp b/base/applications/mscutils/devmgmt_new/Devices.cpp similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/Devices.cpp rename to base/applications/mscutils/devmgmt_new/Devices.cpp diff --git a/reactos/base/applications/mscutils/devmgmt_new/Devices.h b/base/applications/mscutils/devmgmt_new/Devices.h similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/Devices.h rename to base/applications/mscutils/devmgmt_new/Devices.h diff --git a/reactos/base/applications/mscutils/devmgmt_new/MainWindow.cpp b/base/applications/mscutils/devmgmt_new/MainWindow.cpp similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/MainWindow.cpp rename to base/applications/mscutils/devmgmt_new/MainWindow.cpp diff --git a/reactos/base/applications/mscutils/devmgmt_new/MainWindow.h b/base/applications/mscutils/devmgmt_new/MainWindow.h similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/MainWindow.h rename to base/applications/mscutils/devmgmt_new/MainWindow.h diff --git a/reactos/base/applications/mscutils/devmgmt_new/Resource.h b/base/applications/mscutils/devmgmt_new/Resource.h similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/Resource.h rename to base/applications/mscutils/devmgmt_new/Resource.h diff --git a/reactos/base/applications/mscutils/devmgmt_new/devmgmt.cpp b/base/applications/mscutils/devmgmt_new/devmgmt.cpp similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/devmgmt.cpp rename to base/applications/mscutils/devmgmt_new/devmgmt.cpp diff --git a/reactos/base/applications/mscutils/devmgmt_new/devmgmt.h b/base/applications/mscutils/devmgmt_new/devmgmt.h similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/devmgmt.h rename to base/applications/mscutils/devmgmt_new/devmgmt.h diff --git a/reactos/base/applications/mscutils/devmgmt_new/devmgmt.rc b/base/applications/mscutils/devmgmt_new/devmgmt.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/devmgmt.rc rename to base/applications/mscutils/devmgmt_new/devmgmt.rc diff --git a/reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.sln b/base/applications/mscutils/devmgmt_new/devmgmt_new.sln similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.sln rename to base/applications/mscutils/devmgmt_new/devmgmt_new.sln diff --git a/reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.vcxproj b/base/applications/mscutils/devmgmt_new/devmgmt_new.vcxproj similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/devmgmt_new.vcxproj rename to base/applications/mscutils/devmgmt_new/devmgmt_new.vcxproj diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/bg-BG.rc b/base/applications/mscutils/devmgmt_new/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/lang/bg-BG.rc rename to base/applications/mscutils/devmgmt_new/lang/bg-BG.rc diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/de-DE.rc b/base/applications/mscutils/devmgmt_new/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/lang/de-DE.rc rename to base/applications/mscutils/devmgmt_new/lang/de-DE.rc diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/el-GR.rc b/base/applications/mscutils/devmgmt_new/lang/el-GR.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/lang/el-GR.rc rename to base/applications/mscutils/devmgmt_new/lang/el-GR.rc diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/en-US.rc b/base/applications/mscutils/devmgmt_new/lang/en-US.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/lang/en-US.rc rename to base/applications/mscutils/devmgmt_new/lang/en-US.rc diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/es-ES.rc b/base/applications/mscutils/devmgmt_new/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/lang/es-ES.rc rename to base/applications/mscutils/devmgmt_new/lang/es-ES.rc diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/fr-FR.rc b/base/applications/mscutils/devmgmt_new/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/lang/fr-FR.rc rename to base/applications/mscutils/devmgmt_new/lang/fr-FR.rc diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/id-ID.rc b/base/applications/mscutils/devmgmt_new/lang/id-ID.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/lang/id-ID.rc rename to base/applications/mscutils/devmgmt_new/lang/id-ID.rc diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/it-IT.rc b/base/applications/mscutils/devmgmt_new/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/lang/it-IT.rc rename to base/applications/mscutils/devmgmt_new/lang/it-IT.rc diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/ja-JP.rc b/base/applications/mscutils/devmgmt_new/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/lang/ja-JP.rc rename to base/applications/mscutils/devmgmt_new/lang/ja-JP.rc diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/ko-KR.rc b/base/applications/mscutils/devmgmt_new/lang/ko-KR.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/lang/ko-KR.rc rename to base/applications/mscutils/devmgmt_new/lang/ko-KR.rc diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/no-NO.rc b/base/applications/mscutils/devmgmt_new/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/lang/no-NO.rc rename to base/applications/mscutils/devmgmt_new/lang/no-NO.rc diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/pl-PL.rc b/base/applications/mscutils/devmgmt_new/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/lang/pl-PL.rc rename to base/applications/mscutils/devmgmt_new/lang/pl-PL.rc diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/ro-RO.rc b/base/applications/mscutils/devmgmt_new/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/lang/ro-RO.rc rename to base/applications/mscutils/devmgmt_new/lang/ro-RO.rc diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/ru-RU.rc b/base/applications/mscutils/devmgmt_new/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/lang/ru-RU.rc rename to base/applications/mscutils/devmgmt_new/lang/ru-RU.rc diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/sk-SK.rc b/base/applications/mscutils/devmgmt_new/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/lang/sk-SK.rc rename to base/applications/mscutils/devmgmt_new/lang/sk-SK.rc diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/sv-SE.rc b/base/applications/mscutils/devmgmt_new/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/lang/sv-SE.rc rename to base/applications/mscutils/devmgmt_new/lang/sv-SE.rc diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/th-TH.rc b/base/applications/mscutils/devmgmt_new/lang/th-TH.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/lang/th-TH.rc rename to base/applications/mscutils/devmgmt_new/lang/th-TH.rc diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/uk-UA.rc b/base/applications/mscutils/devmgmt_new/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/lang/uk-UA.rc rename to base/applications/mscutils/devmgmt_new/lang/uk-UA.rc diff --git a/reactos/base/applications/mscutils/devmgmt_new/lang/zh-CN.rc b/base/applications/mscutils/devmgmt_new/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/lang/zh-CN.rc rename to base/applications/mscutils/devmgmt_new/lang/zh-CN.rc diff --git a/reactos/base/applications/mscutils/devmgmt_new/res/computer.ico b/base/applications/mscutils/devmgmt_new/res/computer.ico similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/res/computer.ico rename to base/applications/mscutils/devmgmt_new/res/computer.ico diff --git a/reactos/base/applications/mscutils/devmgmt_new/res/exit.bmp b/base/applications/mscutils/devmgmt_new/res/exit.bmp similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/res/exit.bmp rename to base/applications/mscutils/devmgmt_new/res/exit.bmp diff --git a/reactos/base/applications/mscutils/devmgmt_new/res/help.bmp b/base/applications/mscutils/devmgmt_new/res/help.bmp similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/res/help.bmp rename to base/applications/mscutils/devmgmt_new/res/help.bmp diff --git a/reactos/base/applications/mscutils/devmgmt_new/res/properties.bmp b/base/applications/mscutils/devmgmt_new/res/properties.bmp similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/res/properties.bmp rename to base/applications/mscutils/devmgmt_new/res/properties.bmp diff --git a/reactos/base/applications/mscutils/devmgmt_new/res/refresh.bmp b/base/applications/mscutils/devmgmt_new/res/refresh.bmp similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/res/refresh.bmp rename to base/applications/mscutils/devmgmt_new/res/refresh.bmp diff --git a/reactos/base/applications/mscutils/devmgmt_new/res/root.bmp b/base/applications/mscutils/devmgmt_new/res/root.bmp similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/res/root.bmp rename to base/applications/mscutils/devmgmt_new/res/root.bmp diff --git a/reactos/base/applications/mscutils/devmgmt_new/rsrc.rc b/base/applications/mscutils/devmgmt_new/rsrc.rc similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/rsrc.rc rename to base/applications/mscutils/devmgmt_new/rsrc.rc diff --git a/reactos/base/applications/mscutils/devmgmt_new/stdafx.cpp b/base/applications/mscutils/devmgmt_new/stdafx.cpp similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/stdafx.cpp rename to base/applications/mscutils/devmgmt_new/stdafx.cpp diff --git a/reactos/base/applications/mscutils/devmgmt_new/stdafx.h b/base/applications/mscutils/devmgmt_new/stdafx.h similarity index 100% rename from reactos/base/applications/mscutils/devmgmt_new/stdafx.h rename to base/applications/mscutils/devmgmt_new/stdafx.h diff --git a/reactos/base/applications/mscutils/directory.rbuild b/base/applications/mscutils/directory.rbuild similarity index 100% rename from reactos/base/applications/mscutils/directory.rbuild rename to base/applications/mscutils/directory.rbuild diff --git a/reactos/base/applications/mscutils/eventvwr/CMakeLists.txt b/base/applications/mscutils/eventvwr/CMakeLists.txt similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/CMakeLists.txt rename to base/applications/mscutils/eventvwr/CMakeLists.txt diff --git a/reactos/base/applications/mscutils/eventvwr/eventvwr.c b/base/applications/mscutils/eventvwr/eventvwr.c similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/eventvwr.c rename to base/applications/mscutils/eventvwr/eventvwr.c diff --git a/reactos/base/applications/mscutils/eventvwr/eventvwr.h b/base/applications/mscutils/eventvwr/eventvwr.h similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/eventvwr.h rename to base/applications/mscutils/eventvwr/eventvwr.h diff --git a/reactos/base/applications/mscutils/eventvwr/eventvwr.rbuild b/base/applications/mscutils/eventvwr/eventvwr.rbuild similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/eventvwr.rbuild rename to base/applications/mscutils/eventvwr/eventvwr.rbuild diff --git a/reactos/base/applications/mscutils/eventvwr/eventvwr.rc b/base/applications/mscutils/eventvwr/eventvwr.rc similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/eventvwr.rc rename to base/applications/mscutils/eventvwr/eventvwr.rc diff --git a/reactos/base/applications/mscutils/eventvwr/lang/bg-BG.rc b/base/applications/mscutils/eventvwr/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/lang/bg-BG.rc rename to base/applications/mscutils/eventvwr/lang/bg-BG.rc diff --git a/reactos/base/applications/mscutils/eventvwr/lang/de-DE.rc b/base/applications/mscutils/eventvwr/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/lang/de-DE.rc rename to base/applications/mscutils/eventvwr/lang/de-DE.rc diff --git a/reactos/base/applications/mscutils/eventvwr/lang/el-GR.rc b/base/applications/mscutils/eventvwr/lang/el-GR.rc similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/lang/el-GR.rc rename to base/applications/mscutils/eventvwr/lang/el-GR.rc diff --git a/reactos/base/applications/mscutils/eventvwr/lang/en-US.rc b/base/applications/mscutils/eventvwr/lang/en-US.rc similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/lang/en-US.rc rename to base/applications/mscutils/eventvwr/lang/en-US.rc diff --git a/reactos/base/applications/mscutils/eventvwr/lang/es-ES.rc b/base/applications/mscutils/eventvwr/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/lang/es-ES.rc rename to base/applications/mscutils/eventvwr/lang/es-ES.rc diff --git a/reactos/base/applications/mscutils/eventvwr/lang/fr-FR.rc b/base/applications/mscutils/eventvwr/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/lang/fr-FR.rc rename to base/applications/mscutils/eventvwr/lang/fr-FR.rc diff --git a/reactos/base/applications/mscutils/eventvwr/lang/it-IT.rc b/base/applications/mscutils/eventvwr/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/lang/it-IT.rc rename to base/applications/mscutils/eventvwr/lang/it-IT.rc diff --git a/reactos/base/applications/mscutils/eventvwr/lang/ja-JP.rc b/base/applications/mscutils/eventvwr/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/lang/ja-JP.rc rename to base/applications/mscutils/eventvwr/lang/ja-JP.rc diff --git a/reactos/base/applications/mscutils/eventvwr/lang/ko-KR.rc b/base/applications/mscutils/eventvwr/lang/ko-KR.rc similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/lang/ko-KR.rc rename to base/applications/mscutils/eventvwr/lang/ko-KR.rc diff --git a/reactos/base/applications/mscutils/eventvwr/lang/no-NO.rc b/base/applications/mscutils/eventvwr/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/lang/no-NO.rc rename to base/applications/mscutils/eventvwr/lang/no-NO.rc diff --git a/reactos/base/applications/mscutils/eventvwr/lang/pl-PL.rc b/base/applications/mscutils/eventvwr/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/lang/pl-PL.rc rename to base/applications/mscutils/eventvwr/lang/pl-PL.rc diff --git a/reactos/base/applications/mscutils/eventvwr/lang/ro-RO.rc b/base/applications/mscutils/eventvwr/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/lang/ro-RO.rc rename to base/applications/mscutils/eventvwr/lang/ro-RO.rc diff --git a/reactos/base/applications/mscutils/eventvwr/lang/ru-RU.rc b/base/applications/mscutils/eventvwr/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/lang/ru-RU.rc rename to base/applications/mscutils/eventvwr/lang/ru-RU.rc diff --git a/reactos/base/applications/mscutils/eventvwr/lang/sk-SK.rc b/base/applications/mscutils/eventvwr/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/lang/sk-SK.rc rename to base/applications/mscutils/eventvwr/lang/sk-SK.rc diff --git a/reactos/base/applications/mscutils/eventvwr/lang/sv-SE.rc b/base/applications/mscutils/eventvwr/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/lang/sv-SE.rc rename to base/applications/mscutils/eventvwr/lang/sv-SE.rc diff --git a/reactos/base/applications/mscutils/eventvwr/lang/uk-UA.rc b/base/applications/mscutils/eventvwr/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/lang/uk-UA.rc rename to base/applications/mscutils/eventvwr/lang/uk-UA.rc diff --git a/reactos/base/applications/mscutils/eventvwr/lang/zh-CN.rc b/base/applications/mscutils/eventvwr/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/lang/zh-CN.rc rename to base/applications/mscutils/eventvwr/lang/zh-CN.rc diff --git a/reactos/base/applications/mscutils/eventvwr/res/error.ico b/base/applications/mscutils/eventvwr/res/error.ico similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/res/error.ico rename to base/applications/mscutils/eventvwr/res/error.ico diff --git a/reactos/base/applications/mscutils/eventvwr/res/eventvwr.ico b/base/applications/mscutils/eventvwr/res/eventvwr.ico similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/res/eventvwr.ico rename to base/applications/mscutils/eventvwr/res/eventvwr.ico diff --git a/reactos/base/applications/mscutils/eventvwr/res/info.ico b/base/applications/mscutils/eventvwr/res/info.ico similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/res/info.ico rename to base/applications/mscutils/eventvwr/res/info.ico diff --git a/reactos/base/applications/mscutils/eventvwr/res/warning.ico b/base/applications/mscutils/eventvwr/res/warning.ico similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/res/warning.ico rename to base/applications/mscutils/eventvwr/res/warning.ico diff --git a/reactos/base/applications/mscutils/eventvwr/resource.h b/base/applications/mscutils/eventvwr/resource.h similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/resource.h rename to base/applications/mscutils/eventvwr/resource.h diff --git a/reactos/base/applications/mscutils/eventvwr/rsrc.rc b/base/applications/mscutils/eventvwr/rsrc.rc similarity index 100% rename from reactos/base/applications/mscutils/eventvwr/rsrc.rc rename to base/applications/mscutils/eventvwr/rsrc.rc diff --git a/reactos/base/applications/mscutils/servman/CMakeLists.txt b/base/applications/mscutils/servman/CMakeLists.txt similarity index 100% rename from reactos/base/applications/mscutils/servman/CMakeLists.txt rename to base/applications/mscutils/servman/CMakeLists.txt diff --git a/reactos/base/applications/mscutils/servman/about.c b/base/applications/mscutils/servman/about.c similarity index 100% rename from reactos/base/applications/mscutils/servman/about.c rename to base/applications/mscutils/servman/about.c diff --git a/reactos/base/applications/mscutils/servman/control.c b/base/applications/mscutils/servman/control.c similarity index 100% rename from reactos/base/applications/mscutils/servman/control.c rename to base/applications/mscutils/servman/control.c diff --git a/reactos/base/applications/mscutils/servman/create.c b/base/applications/mscutils/servman/create.c similarity index 100% rename from reactos/base/applications/mscutils/servman/create.c rename to base/applications/mscutils/servman/create.c diff --git a/reactos/base/applications/mscutils/servman/delete.c b/base/applications/mscutils/servman/delete.c similarity index 100% rename from reactos/base/applications/mscutils/servman/delete.c rename to base/applications/mscutils/servman/delete.c diff --git a/reactos/base/applications/mscutils/servman/dependencies_tv1.c b/base/applications/mscutils/servman/dependencies_tv1.c similarity index 100% rename from reactos/base/applications/mscutils/servman/dependencies_tv1.c rename to base/applications/mscutils/servman/dependencies_tv1.c diff --git a/reactos/base/applications/mscutils/servman/dependencies_tv2.c b/base/applications/mscutils/servman/dependencies_tv2.c similarity index 100% rename from reactos/base/applications/mscutils/servman/dependencies_tv2.c rename to base/applications/mscutils/servman/dependencies_tv2.c diff --git a/reactos/base/applications/mscutils/servman/export.c b/base/applications/mscutils/servman/export.c similarity index 100% rename from reactos/base/applications/mscutils/servman/export.c rename to base/applications/mscutils/servman/export.c diff --git a/reactos/base/applications/mscutils/servman/lang/bg-BG.rc b/base/applications/mscutils/servman/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/mscutils/servman/lang/bg-BG.rc rename to base/applications/mscutils/servman/lang/bg-BG.rc diff --git a/reactos/base/applications/mscutils/servman/lang/de-DE.rc b/base/applications/mscutils/servman/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/mscutils/servman/lang/de-DE.rc rename to base/applications/mscutils/servman/lang/de-DE.rc diff --git a/reactos/base/applications/mscutils/servman/lang/el-GR.rc b/base/applications/mscutils/servman/lang/el-GR.rc similarity index 100% rename from reactos/base/applications/mscutils/servman/lang/el-GR.rc rename to base/applications/mscutils/servman/lang/el-GR.rc diff --git a/reactos/base/applications/mscutils/servman/lang/en-US.rc b/base/applications/mscutils/servman/lang/en-US.rc similarity index 100% rename from reactos/base/applications/mscutils/servman/lang/en-US.rc rename to base/applications/mscutils/servman/lang/en-US.rc diff --git a/reactos/base/applications/mscutils/servman/lang/es-ES.rc b/base/applications/mscutils/servman/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/mscutils/servman/lang/es-ES.rc rename to base/applications/mscutils/servman/lang/es-ES.rc diff --git a/reactos/base/applications/mscutils/servman/lang/fr-FR.rc b/base/applications/mscutils/servman/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/mscutils/servman/lang/fr-FR.rc rename to base/applications/mscutils/servman/lang/fr-FR.rc diff --git a/reactos/base/applications/mscutils/servman/lang/id-ID.rc b/base/applications/mscutils/servman/lang/id-ID.rc similarity index 100% rename from reactos/base/applications/mscutils/servman/lang/id-ID.rc rename to base/applications/mscutils/servman/lang/id-ID.rc diff --git a/reactos/base/applications/mscutils/servman/lang/it-IT.rc b/base/applications/mscutils/servman/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/mscutils/servman/lang/it-IT.rc rename to base/applications/mscutils/servman/lang/it-IT.rc diff --git a/reactos/base/applications/mscutils/servman/lang/ja-JP.rc b/base/applications/mscutils/servman/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/mscutils/servman/lang/ja-JP.rc rename to base/applications/mscutils/servman/lang/ja-JP.rc diff --git a/reactos/base/applications/mscutils/servman/lang/ko-KR.rc b/base/applications/mscutils/servman/lang/ko-KR.rc similarity index 100% rename from reactos/base/applications/mscutils/servman/lang/ko-KR.rc rename to base/applications/mscutils/servman/lang/ko-KR.rc diff --git a/reactos/base/applications/mscutils/servman/lang/no-NO.rc b/base/applications/mscutils/servman/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/mscutils/servman/lang/no-NO.rc rename to base/applications/mscutils/servman/lang/no-NO.rc diff --git a/reactos/base/applications/mscutils/servman/lang/pl-PL.rc b/base/applications/mscutils/servman/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/mscutils/servman/lang/pl-PL.rc rename to base/applications/mscutils/servman/lang/pl-PL.rc diff --git a/reactos/base/applications/mscutils/servman/lang/ro-RO.rc b/base/applications/mscutils/servman/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/mscutils/servman/lang/ro-RO.rc rename to base/applications/mscutils/servman/lang/ro-RO.rc diff --git a/reactos/base/applications/mscutils/servman/lang/ru-RU.rc b/base/applications/mscutils/servman/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/mscutils/servman/lang/ru-RU.rc rename to base/applications/mscutils/servman/lang/ru-RU.rc diff --git a/reactos/base/applications/mscutils/servman/lang/sk-SK.rc b/base/applications/mscutils/servman/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/mscutils/servman/lang/sk-SK.rc rename to base/applications/mscutils/servman/lang/sk-SK.rc diff --git a/reactos/base/applications/mscutils/servman/lang/sv-SE.rc b/base/applications/mscutils/servman/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/mscutils/servman/lang/sv-SE.rc rename to base/applications/mscutils/servman/lang/sv-SE.rc diff --git a/reactos/base/applications/mscutils/servman/lang/th-TH.rc b/base/applications/mscutils/servman/lang/th-TH.rc similarity index 100% rename from reactos/base/applications/mscutils/servman/lang/th-TH.rc rename to base/applications/mscutils/servman/lang/th-TH.rc diff --git a/reactos/base/applications/mscutils/servman/lang/uk-UA.rc b/base/applications/mscutils/servman/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/mscutils/servman/lang/uk-UA.rc rename to base/applications/mscutils/servman/lang/uk-UA.rc diff --git a/reactos/base/applications/mscutils/servman/lang/zh-CN.rc b/base/applications/mscutils/servman/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/mscutils/servman/lang/zh-CN.rc rename to base/applications/mscutils/servman/lang/zh-CN.rc diff --git a/reactos/base/applications/mscutils/servman/listview.c b/base/applications/mscutils/servman/listview.c similarity index 100% rename from reactos/base/applications/mscutils/servman/listview.c rename to base/applications/mscutils/servman/listview.c diff --git a/reactos/base/applications/mscutils/servman/mainwnd.c b/base/applications/mscutils/servman/mainwnd.c similarity index 100% rename from reactos/base/applications/mscutils/servman/mainwnd.c rename to base/applications/mscutils/servman/mainwnd.c diff --git a/reactos/base/applications/mscutils/servman/manifest.xml b/base/applications/mscutils/servman/manifest.xml similarity index 100% rename from reactos/base/applications/mscutils/servman/manifest.xml rename to base/applications/mscutils/servman/manifest.xml diff --git a/reactos/base/applications/mscutils/servman/misc.c b/base/applications/mscutils/servman/misc.c similarity index 100% rename from reactos/base/applications/mscutils/servman/misc.c rename to base/applications/mscutils/servman/misc.c diff --git a/reactos/base/applications/mscutils/servman/precomp.h b/base/applications/mscutils/servman/precomp.h similarity index 100% rename from reactos/base/applications/mscutils/servman/precomp.h rename to base/applications/mscutils/servman/precomp.h diff --git a/reactos/base/applications/mscutils/servman/progress.c b/base/applications/mscutils/servman/progress.c similarity index 100% rename from reactos/base/applications/mscutils/servman/progress.c rename to base/applications/mscutils/servman/progress.c diff --git a/reactos/base/applications/mscutils/servman/propsheet.c b/base/applications/mscutils/servman/propsheet.c similarity index 100% rename from reactos/base/applications/mscutils/servman/propsheet.c rename to base/applications/mscutils/servman/propsheet.c diff --git a/reactos/base/applications/mscutils/servman/propsheet_depends.c b/base/applications/mscutils/servman/propsheet_depends.c similarity index 100% rename from reactos/base/applications/mscutils/servman/propsheet_depends.c rename to base/applications/mscutils/servman/propsheet_depends.c diff --git a/reactos/base/applications/mscutils/servman/propsheet_general.c b/base/applications/mscutils/servman/propsheet_general.c similarity index 100% rename from reactos/base/applications/mscutils/servman/propsheet_general.c rename to base/applications/mscutils/servman/propsheet_general.c diff --git a/reactos/base/applications/mscutils/servman/query.c b/base/applications/mscutils/servman/query.c similarity index 100% rename from reactos/base/applications/mscutils/servman/query.c rename to base/applications/mscutils/servman/query.c diff --git a/reactos/base/applications/mscutils/servman/res/create.bmp b/base/applications/mscutils/servman/res/create.bmp similarity index 100% rename from reactos/base/applications/mscutils/servman/res/create.bmp rename to base/applications/mscutils/servman/res/create.bmp diff --git a/reactos/base/applications/mscutils/servman/res/delete.bmp b/base/applications/mscutils/servman/res/delete.bmp similarity index 100% rename from reactos/base/applications/mscutils/servman/res/delete.bmp rename to base/applications/mscutils/servman/res/delete.bmp diff --git a/reactos/base/applications/mscutils/servman/res/driver.ico b/base/applications/mscutils/servman/res/driver.ico similarity index 100% rename from reactos/base/applications/mscutils/servman/res/driver.ico rename to base/applications/mscutils/servman/res/driver.ico diff --git a/reactos/base/applications/mscutils/servman/res/export.bmp b/base/applications/mscutils/servman/res/export.bmp similarity index 100% rename from reactos/base/applications/mscutils/servman/res/export.bmp rename to base/applications/mscutils/servman/res/export.bmp diff --git a/reactos/base/applications/mscutils/servman/res/nodepends.ico b/base/applications/mscutils/servman/res/nodepends.ico similarity index 100% rename from reactos/base/applications/mscutils/servman/res/nodepends.ico rename to base/applications/mscutils/servman/res/nodepends.ico diff --git a/reactos/base/applications/mscutils/servman/res/pause.bmp b/base/applications/mscutils/servman/res/pause.bmp similarity index 100% rename from reactos/base/applications/mscutils/servman/res/pause.bmp rename to base/applications/mscutils/servman/res/pause.bmp diff --git a/reactos/base/applications/mscutils/servman/res/properties.bmp b/base/applications/mscutils/servman/res/properties.bmp similarity index 100% rename from reactos/base/applications/mscutils/servman/res/properties.bmp rename to base/applications/mscutils/servman/res/properties.bmp diff --git a/reactos/base/applications/mscutils/servman/res/refresh.bmp b/base/applications/mscutils/servman/res/refresh.bmp similarity index 100% rename from reactos/base/applications/mscutils/servman/res/refresh.bmp rename to base/applications/mscutils/servman/res/refresh.bmp diff --git a/reactos/base/applications/mscutils/servman/res/restart.bmp b/base/applications/mscutils/servman/res/restart.bmp similarity index 100% rename from reactos/base/applications/mscutils/servman/res/restart.bmp rename to base/applications/mscutils/servman/res/restart.bmp diff --git a/reactos/base/applications/mscutils/servman/res/start.bmp b/base/applications/mscutils/servman/res/start.bmp similarity index 100% rename from reactos/base/applications/mscutils/servman/res/start.bmp rename to base/applications/mscutils/servman/res/start.bmp diff --git a/reactos/base/applications/mscutils/servman/res/stop.bmp b/base/applications/mscutils/servman/res/stop.bmp similarity index 100% rename from reactos/base/applications/mscutils/servman/res/stop.bmp rename to base/applications/mscutils/servman/res/stop.bmp diff --git a/reactos/base/applications/mscutils/servman/res/system.ico b/base/applications/mscutils/servman/res/system.ico similarity index 100% rename from reactos/base/applications/mscutils/servman/res/system.ico rename to base/applications/mscutils/servman/res/system.ico diff --git a/reactos/base/applications/mscutils/servman/resource.h b/base/applications/mscutils/servman/resource.h similarity index 100% rename from reactos/base/applications/mscutils/servman/resource.h rename to base/applications/mscutils/servman/resource.h diff --git a/reactos/base/applications/mscutils/servman/rsrc.rc b/base/applications/mscutils/servman/rsrc.rc similarity index 100% rename from reactos/base/applications/mscutils/servman/rsrc.rc rename to base/applications/mscutils/servman/rsrc.rc diff --git a/reactos/base/applications/mscutils/servman/servman.c b/base/applications/mscutils/servman/servman.c similarity index 100% rename from reactos/base/applications/mscutils/servman/servman.c rename to base/applications/mscutils/servman/servman.c diff --git a/reactos/base/applications/mscutils/servman/servman.rbuild b/base/applications/mscutils/servman/servman.rbuild similarity index 100% rename from reactos/base/applications/mscutils/servman/servman.rbuild rename to base/applications/mscutils/servman/servman.rbuild diff --git a/reactos/base/applications/mscutils/servman/servman.rc b/base/applications/mscutils/servman/servman.rc similarity index 100% rename from reactos/base/applications/mscutils/servman/servman.rc rename to base/applications/mscutils/servman/servman.rc diff --git a/reactos/base/applications/mscutils/servman/start.c b/base/applications/mscutils/servman/start.c similarity index 100% rename from reactos/base/applications/mscutils/servman/start.c rename to base/applications/mscutils/servman/start.c diff --git a/reactos/base/applications/mscutils/servman/stop.c b/base/applications/mscutils/servman/stop.c similarity index 100% rename from reactos/base/applications/mscutils/servman/stop.c rename to base/applications/mscutils/servman/stop.c diff --git a/reactos/base/applications/mscutils/servman/stop_dependencies.c b/base/applications/mscutils/servman/stop_dependencies.c similarity index 100% rename from reactos/base/applications/mscutils/servman/stop_dependencies.c rename to base/applications/mscutils/servman/stop_dependencies.c diff --git a/reactos/base/applications/mspaint/CMakeLists.txt b/base/applications/mspaint/CMakeLists.txt similarity index 100% rename from reactos/base/applications/mspaint/CMakeLists.txt rename to base/applications/mspaint/CMakeLists.txt diff --git a/reactos/base/applications/mspaint/definitions.h b/base/applications/mspaint/definitions.h similarity index 100% rename from reactos/base/applications/mspaint/definitions.h rename to base/applications/mspaint/definitions.h diff --git a/reactos/base/applications/mspaint/dialogs.c b/base/applications/mspaint/dialogs.c similarity index 100% rename from reactos/base/applications/mspaint/dialogs.c rename to base/applications/mspaint/dialogs.c diff --git a/reactos/base/applications/mspaint/dialogs.h b/base/applications/mspaint/dialogs.h similarity index 100% rename from reactos/base/applications/mspaint/dialogs.h rename to base/applications/mspaint/dialogs.h diff --git a/reactos/base/applications/mspaint/dib.c b/base/applications/mspaint/dib.c similarity index 100% rename from reactos/base/applications/mspaint/dib.c rename to base/applications/mspaint/dib.c diff --git a/reactos/base/applications/mspaint/dib.h b/base/applications/mspaint/dib.h similarity index 100% rename from reactos/base/applications/mspaint/dib.h rename to base/applications/mspaint/dib.h diff --git a/reactos/base/applications/mspaint/drawing.c b/base/applications/mspaint/drawing.c similarity index 100% rename from reactos/base/applications/mspaint/drawing.c rename to base/applications/mspaint/drawing.c diff --git a/reactos/base/applications/mspaint/drawing.h b/base/applications/mspaint/drawing.h similarity index 100% rename from reactos/base/applications/mspaint/drawing.h rename to base/applications/mspaint/drawing.h diff --git a/reactos/base/applications/mspaint/globalvar.h b/base/applications/mspaint/globalvar.h similarity index 100% rename from reactos/base/applications/mspaint/globalvar.h rename to base/applications/mspaint/globalvar.h diff --git a/reactos/base/applications/mspaint/help/Paint.chm b/base/applications/mspaint/help/Paint.chm similarity index 100% rename from reactos/base/applications/mspaint/help/Paint.chm rename to base/applications/mspaint/help/Paint.chm diff --git a/reactos/base/applications/mspaint/help/Paint.hhp b/base/applications/mspaint/help/Paint.hhp similarity index 100% rename from reactos/base/applications/mspaint/help/Paint.hhp rename to base/applications/mspaint/help/Paint.hhp diff --git a/reactos/base/applications/mspaint/help/Table of Contents.hhc b/base/applications/mspaint/help/Table of Contents.hhc similarity index 100% rename from reactos/base/applications/mspaint/help/Table of Contents.hhc rename to base/applications/mspaint/help/Table of Contents.hhc diff --git a/reactos/base/applications/mspaint/help/airbrush.png b/base/applications/mspaint/help/airbrush.png similarity index 100% rename from reactos/base/applications/mspaint/help/airbrush.png rename to base/applications/mspaint/help/airbrush.png diff --git a/reactos/base/applications/mspaint/help/appwindow.png b/base/applications/mspaint/help/appwindow.png similarity index 100% rename from reactos/base/applications/mspaint/help/appwindow.png rename to base/applications/mspaint/help/appwindow.png diff --git a/reactos/base/applications/mspaint/help/bezier.png b/base/applications/mspaint/help/bezier.png similarity index 100% rename from reactos/base/applications/mspaint/help/bezier.png rename to base/applications/mspaint/help/bezier.png diff --git a/reactos/base/applications/mspaint/help/brush.png b/base/applications/mspaint/help/brush.png similarity index 100% rename from reactos/base/applications/mspaint/help/brush.png rename to base/applications/mspaint/help/brush.png diff --git a/reactos/base/applications/mspaint/help/color.png b/base/applications/mspaint/help/color.png similarity index 100% rename from reactos/base/applications/mspaint/help/color.png rename to base/applications/mspaint/help/color.png diff --git a/reactos/base/applications/mspaint/help/ellipse.png b/base/applications/mspaint/help/ellipse.png similarity index 100% rename from reactos/base/applications/mspaint/help/ellipse.png rename to base/applications/mspaint/help/ellipse.png diff --git a/reactos/base/applications/mspaint/help/fill.png b/base/applications/mspaint/help/fill.png similarity index 100% rename from reactos/base/applications/mspaint/help/fill.png rename to base/applications/mspaint/help/fill.png diff --git a/reactos/base/applications/mspaint/help/freesel.png b/base/applications/mspaint/help/freesel.png similarity index 100% rename from reactos/base/applications/mspaint/help/freesel.png rename to base/applications/mspaint/help/freesel.png diff --git a/reactos/base/applications/mspaint/help/line.png b/base/applications/mspaint/help/line.png similarity index 100% rename from reactos/base/applications/mspaint/help/line.png rename to base/applications/mspaint/help/line.png diff --git a/reactos/base/applications/mspaint/help/palette.png b/base/applications/mspaint/help/palette.png similarity index 100% rename from reactos/base/applications/mspaint/help/palette.png rename to base/applications/mspaint/help/palette.png diff --git a/reactos/base/applications/mspaint/help/pen.png b/base/applications/mspaint/help/pen.png similarity index 100% rename from reactos/base/applications/mspaint/help/pen.png rename to base/applications/mspaint/help/pen.png diff --git a/reactos/base/applications/mspaint/help/rect.png b/base/applications/mspaint/help/rect.png similarity index 100% rename from reactos/base/applications/mspaint/help/rect.png rename to base/applications/mspaint/help/rect.png diff --git a/reactos/base/applications/mspaint/help/rectsel.png b/base/applications/mspaint/help/rectsel.png similarity index 100% rename from reactos/base/applications/mspaint/help/rectsel.png rename to base/applications/mspaint/help/rectsel.png diff --git a/reactos/base/applications/mspaint/help/rrect.png b/base/applications/mspaint/help/rrect.png similarity index 100% rename from reactos/base/applications/mspaint/help/rrect.png rename to base/applications/mspaint/help/rrect.png diff --git a/reactos/base/applications/mspaint/help/rubber.png b/base/applications/mspaint/help/rubber.png similarity index 100% rename from reactos/base/applications/mspaint/help/rubber.png rename to base/applications/mspaint/help/rubber.png diff --git a/reactos/base/applications/mspaint/help/settings.html b/base/applications/mspaint/help/settings.html similarity index 100% rename from reactos/base/applications/mspaint/help/settings.html rename to base/applications/mspaint/help/settings.html diff --git a/reactos/base/applications/mspaint/help/settings1.png b/base/applications/mspaint/help/settings1.png similarity index 100% rename from reactos/base/applications/mspaint/help/settings1.png rename to base/applications/mspaint/help/settings1.png diff --git a/reactos/base/applications/mspaint/help/settings2.png b/base/applications/mspaint/help/settings2.png similarity index 100% rename from reactos/base/applications/mspaint/help/settings2.png rename to base/applications/mspaint/help/settings2.png diff --git a/reactos/base/applications/mspaint/help/settings3.png b/base/applications/mspaint/help/settings3.png similarity index 100% rename from reactos/base/applications/mspaint/help/settings3.png rename to base/applications/mspaint/help/settings3.png diff --git a/reactos/base/applications/mspaint/help/settings4.png b/base/applications/mspaint/help/settings4.png similarity index 100% rename from reactos/base/applications/mspaint/help/settings4.png rename to base/applications/mspaint/help/settings4.png diff --git a/reactos/base/applications/mspaint/help/settings5.png b/base/applications/mspaint/help/settings5.png similarity index 100% rename from reactos/base/applications/mspaint/help/settings5.png rename to base/applications/mspaint/help/settings5.png diff --git a/reactos/base/applications/mspaint/help/settings6.png b/base/applications/mspaint/help/settings6.png similarity index 100% rename from reactos/base/applications/mspaint/help/settings6.png rename to base/applications/mspaint/help/settings6.png diff --git a/reactos/base/applications/mspaint/help/shape.png b/base/applications/mspaint/help/shape.png similarity index 100% rename from reactos/base/applications/mspaint/help/shape.png rename to base/applications/mspaint/help/shape.png diff --git a/reactos/base/applications/mspaint/help/text.png b/base/applications/mspaint/help/text.png similarity index 100% rename from reactos/base/applications/mspaint/help/text.png rename to base/applications/mspaint/help/text.png diff --git a/reactos/base/applications/mspaint/help/toolbox.png b/base/applications/mspaint/help/toolbox.png similarity index 100% rename from reactos/base/applications/mspaint/help/toolbox.png rename to base/applications/mspaint/help/toolbox.png diff --git a/reactos/base/applications/mspaint/help/tools.html b/base/applications/mspaint/help/tools.html similarity index 100% rename from reactos/base/applications/mspaint/help/tools.html rename to base/applications/mspaint/help/tools.html diff --git a/reactos/base/applications/mspaint/help/usage.html b/base/applications/mspaint/help/usage.html similarity index 100% rename from reactos/base/applications/mspaint/help/usage.html rename to base/applications/mspaint/help/usage.html diff --git a/reactos/base/applications/mspaint/help/zoom.png b/base/applications/mspaint/help/zoom.png similarity index 100% rename from reactos/base/applications/mspaint/help/zoom.png rename to base/applications/mspaint/help/zoom.png diff --git a/reactos/base/applications/mspaint/history.c b/base/applications/mspaint/history.c similarity index 100% rename from reactos/base/applications/mspaint/history.c rename to base/applications/mspaint/history.c diff --git a/reactos/base/applications/mspaint/history.h b/base/applications/mspaint/history.h similarity index 100% rename from reactos/base/applications/mspaint/history.h rename to base/applications/mspaint/history.h diff --git a/reactos/base/applications/mspaint/icons.rc b/base/applications/mspaint/icons.rc similarity index 100% rename from reactos/base/applications/mspaint/icons.rc rename to base/applications/mspaint/icons.rc diff --git a/reactos/base/applications/mspaint/icons/airbrush_cur.ico b/base/applications/mspaint/icons/airbrush_cur.ico similarity index 100% rename from reactos/base/applications/mspaint/icons/airbrush_cur.ico rename to base/applications/mspaint/icons/airbrush_cur.ico diff --git a/reactos/base/applications/mspaint/icons/color_cur.ico b/base/applications/mspaint/icons/color_cur.ico similarity index 100% rename from reactos/base/applications/mspaint/icons/color_cur.ico rename to base/applications/mspaint/icons/color_cur.ico diff --git a/reactos/base/applications/mspaint/icons/fill_cur.ico b/base/applications/mspaint/icons/fill_cur.ico similarity index 100% rename from reactos/base/applications/mspaint/icons/fill_cur.ico rename to base/applications/mspaint/icons/fill_cur.ico diff --git a/reactos/base/applications/mspaint/icons/horzstretch.ico b/base/applications/mspaint/icons/horzstretch.ico similarity index 100% rename from reactos/base/applications/mspaint/icons/horzstretch.ico rename to base/applications/mspaint/icons/horzstretch.ico diff --git a/reactos/base/applications/mspaint/icons/iconbar.bmp b/base/applications/mspaint/icons/iconbar.bmp similarity index 100% rename from reactos/base/applications/mspaint/icons/iconbar.bmp rename to base/applications/mspaint/icons/iconbar.bmp diff --git a/reactos/base/applications/mspaint/icons/nontransparent.ico b/base/applications/mspaint/icons/nontransparent.ico similarity index 100% rename from reactos/base/applications/mspaint/icons/nontransparent.ico rename to base/applications/mspaint/icons/nontransparent.ico diff --git a/reactos/base/applications/mspaint/icons/paint.ico b/base/applications/mspaint/icons/paint.ico similarity index 100% rename from reactos/base/applications/mspaint/icons/paint.ico rename to base/applications/mspaint/icons/paint.ico diff --git a/reactos/base/applications/mspaint/icons/paint.svg b/base/applications/mspaint/icons/paint.svg similarity index 100% rename from reactos/base/applications/mspaint/icons/paint.svg rename to base/applications/mspaint/icons/paint.svg diff --git a/reactos/base/applications/mspaint/icons/pen_cur.ico b/base/applications/mspaint/icons/pen_cur.ico similarity index 100% rename from reactos/base/applications/mspaint/icons/pen_cur.ico rename to base/applications/mspaint/icons/pen_cur.ico diff --git a/reactos/base/applications/mspaint/icons/transparency.xcf b/base/applications/mspaint/icons/transparency.xcf similarity index 100% rename from reactos/base/applications/mspaint/icons/transparency.xcf rename to base/applications/mspaint/icons/transparency.xcf diff --git a/reactos/base/applications/mspaint/icons/transparent.ico b/base/applications/mspaint/icons/transparent.ico similarity index 100% rename from reactos/base/applications/mspaint/icons/transparent.ico rename to base/applications/mspaint/icons/transparent.ico diff --git a/reactos/base/applications/mspaint/icons/vertstretch.ico b/base/applications/mspaint/icons/vertstretch.ico similarity index 100% rename from reactos/base/applications/mspaint/icons/vertstretch.ico rename to base/applications/mspaint/icons/vertstretch.ico diff --git a/reactos/base/applications/mspaint/icons/zoom_cur.ico b/base/applications/mspaint/icons/zoom_cur.ico similarity index 100% rename from reactos/base/applications/mspaint/icons/zoom_cur.ico rename to base/applications/mspaint/icons/zoom_cur.ico diff --git a/reactos/base/applications/mspaint/lang/bg-BG.rc b/base/applications/mspaint/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/mspaint/lang/bg-BG.rc rename to base/applications/mspaint/lang/bg-BG.rc diff --git a/reactos/base/applications/mspaint/lang/cs-CZ.rc b/base/applications/mspaint/lang/cs-CZ.rc similarity index 100% rename from reactos/base/applications/mspaint/lang/cs-CZ.rc rename to base/applications/mspaint/lang/cs-CZ.rc diff --git a/reactos/base/applications/mspaint/lang/de-DE.rc b/base/applications/mspaint/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/mspaint/lang/de-DE.rc rename to base/applications/mspaint/lang/de-DE.rc diff --git a/reactos/base/applications/mspaint/lang/en-GB.rc b/base/applications/mspaint/lang/en-GB.rc similarity index 100% rename from reactos/base/applications/mspaint/lang/en-GB.rc rename to base/applications/mspaint/lang/en-GB.rc diff --git a/reactos/base/applications/mspaint/lang/en-US.rc b/base/applications/mspaint/lang/en-US.rc similarity index 100% rename from reactos/base/applications/mspaint/lang/en-US.rc rename to base/applications/mspaint/lang/en-US.rc diff --git a/reactos/base/applications/mspaint/lang/es-ES.rc b/base/applications/mspaint/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/mspaint/lang/es-ES.rc rename to base/applications/mspaint/lang/es-ES.rc diff --git a/reactos/base/applications/mspaint/lang/eu-ES.rc b/base/applications/mspaint/lang/eu-ES.rc similarity index 100% rename from reactos/base/applications/mspaint/lang/eu-ES.rc rename to base/applications/mspaint/lang/eu-ES.rc diff --git a/reactos/base/applications/mspaint/lang/fr-FR.rc b/base/applications/mspaint/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/mspaint/lang/fr-FR.rc rename to base/applications/mspaint/lang/fr-FR.rc diff --git a/reactos/base/applications/mspaint/lang/hu-HU.rc b/base/applications/mspaint/lang/hu-HU.rc similarity index 100% rename from reactos/base/applications/mspaint/lang/hu-HU.rc rename to base/applications/mspaint/lang/hu-HU.rc diff --git a/reactos/base/applications/mspaint/lang/it-IT.rc b/base/applications/mspaint/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/mspaint/lang/it-IT.rc rename to base/applications/mspaint/lang/it-IT.rc diff --git a/reactos/base/applications/mspaint/lang/ja-JP.rc b/base/applications/mspaint/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/mspaint/lang/ja-JP.rc rename to base/applications/mspaint/lang/ja-JP.rc diff --git a/reactos/base/applications/mspaint/lang/nl-NL.rc b/base/applications/mspaint/lang/nl-NL.rc similarity index 100% rename from reactos/base/applications/mspaint/lang/nl-NL.rc rename to base/applications/mspaint/lang/nl-NL.rc diff --git a/reactos/base/applications/mspaint/lang/no-NO.rc b/base/applications/mspaint/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/mspaint/lang/no-NO.rc rename to base/applications/mspaint/lang/no-NO.rc diff --git a/reactos/base/applications/mspaint/lang/pl-PL.rc b/base/applications/mspaint/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/mspaint/lang/pl-PL.rc rename to base/applications/mspaint/lang/pl-PL.rc diff --git a/reactos/base/applications/mspaint/lang/pt-BR.rc b/base/applications/mspaint/lang/pt-BR.rc similarity index 100% rename from reactos/base/applications/mspaint/lang/pt-BR.rc rename to base/applications/mspaint/lang/pt-BR.rc diff --git a/reactos/base/applications/mspaint/lang/pt-PT.rc b/base/applications/mspaint/lang/pt-PT.rc similarity index 100% rename from reactos/base/applications/mspaint/lang/pt-PT.rc rename to base/applications/mspaint/lang/pt-PT.rc diff --git a/reactos/base/applications/mspaint/lang/ro-RO.rc b/base/applications/mspaint/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/mspaint/lang/ro-RO.rc rename to base/applications/mspaint/lang/ro-RO.rc diff --git a/reactos/base/applications/mspaint/lang/ru-RU.rc b/base/applications/mspaint/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/mspaint/lang/ru-RU.rc rename to base/applications/mspaint/lang/ru-RU.rc diff --git a/reactos/base/applications/mspaint/lang/sk-SK.rc b/base/applications/mspaint/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/mspaint/lang/sk-SK.rc rename to base/applications/mspaint/lang/sk-SK.rc diff --git a/reactos/base/applications/mspaint/lang/sv-SE.rc b/base/applications/mspaint/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/mspaint/lang/sv-SE.rc rename to base/applications/mspaint/lang/sv-SE.rc diff --git a/reactos/base/applications/mspaint/lang/uk-UA.rc b/base/applications/mspaint/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/mspaint/lang/uk-UA.rc rename to base/applications/mspaint/lang/uk-UA.rc diff --git a/reactos/base/applications/mspaint/lang/zh-CN.rc b/base/applications/mspaint/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/mspaint/lang/zh-CN.rc rename to base/applications/mspaint/lang/zh-CN.rc diff --git a/reactos/base/applications/mspaint/lang/zh-TW.rc b/base/applications/mspaint/lang/zh-TW.rc similarity index 100% rename from reactos/base/applications/mspaint/lang/zh-TW.rc rename to base/applications/mspaint/lang/zh-TW.rc diff --git a/reactos/base/applications/mspaint/main.c b/base/applications/mspaint/main.c similarity index 100% rename from reactos/base/applications/mspaint/main.c rename to base/applications/mspaint/main.c diff --git a/reactos/base/applications/mspaint/mouse.c b/base/applications/mspaint/mouse.c similarity index 100% rename from reactos/base/applications/mspaint/mouse.c rename to base/applications/mspaint/mouse.c diff --git a/reactos/base/applications/mspaint/mouse.h b/base/applications/mspaint/mouse.h similarity index 100% rename from reactos/base/applications/mspaint/mouse.h rename to base/applications/mspaint/mouse.h diff --git a/reactos/base/applications/mspaint/mspaint.exe.amd64.manifest b/base/applications/mspaint/mspaint.exe.amd64.manifest similarity index 100% rename from reactos/base/applications/mspaint/mspaint.exe.amd64.manifest rename to base/applications/mspaint/mspaint.exe.amd64.manifest diff --git a/reactos/base/applications/mspaint/mspaint.exe.manifest b/base/applications/mspaint/mspaint.exe.manifest similarity index 100% rename from reactos/base/applications/mspaint/mspaint.exe.manifest rename to base/applications/mspaint/mspaint.exe.manifest diff --git a/reactos/base/applications/mspaint/mspaint.rbuild b/base/applications/mspaint/mspaint.rbuild similarity index 100% rename from reactos/base/applications/mspaint/mspaint.rbuild rename to base/applications/mspaint/mspaint.rbuild diff --git a/reactos/base/applications/mspaint/palette.c b/base/applications/mspaint/palette.c similarity index 100% rename from reactos/base/applications/mspaint/palette.c rename to base/applications/mspaint/palette.c diff --git a/reactos/base/applications/mspaint/palette.h b/base/applications/mspaint/palette.h similarity index 100% rename from reactos/base/applications/mspaint/palette.h rename to base/applications/mspaint/palette.h diff --git a/reactos/base/applications/mspaint/precomp.h b/base/applications/mspaint/precomp.h similarity index 100% rename from reactos/base/applications/mspaint/precomp.h rename to base/applications/mspaint/precomp.h diff --git a/reactos/base/applications/mspaint/registry.c b/base/applications/mspaint/registry.c similarity index 100% rename from reactos/base/applications/mspaint/registry.c rename to base/applications/mspaint/registry.c diff --git a/reactos/base/applications/mspaint/registry.h b/base/applications/mspaint/registry.h similarity index 100% rename from reactos/base/applications/mspaint/registry.h rename to base/applications/mspaint/registry.h diff --git a/reactos/base/applications/mspaint/rsrc.rc b/base/applications/mspaint/rsrc.rc similarity index 100% rename from reactos/base/applications/mspaint/rsrc.rc rename to base/applications/mspaint/rsrc.rc diff --git a/reactos/base/applications/mspaint/selection.c b/base/applications/mspaint/selection.c similarity index 100% rename from reactos/base/applications/mspaint/selection.c rename to base/applications/mspaint/selection.c diff --git a/reactos/base/applications/mspaint/selection.h b/base/applications/mspaint/selection.h similarity index 100% rename from reactos/base/applications/mspaint/selection.h rename to base/applications/mspaint/selection.h diff --git a/reactos/base/applications/mspaint/sizebox.c b/base/applications/mspaint/sizebox.c similarity index 100% rename from reactos/base/applications/mspaint/sizebox.c rename to base/applications/mspaint/sizebox.c diff --git a/reactos/base/applications/mspaint/sizebox.h b/base/applications/mspaint/sizebox.h similarity index 100% rename from reactos/base/applications/mspaint/sizebox.h rename to base/applications/mspaint/sizebox.h diff --git a/reactos/base/applications/mspaint/toolsettings.c b/base/applications/mspaint/toolsettings.c similarity index 100% rename from reactos/base/applications/mspaint/toolsettings.c rename to base/applications/mspaint/toolsettings.c diff --git a/reactos/base/applications/mspaint/toolsettings.h b/base/applications/mspaint/toolsettings.h similarity index 100% rename from reactos/base/applications/mspaint/toolsettings.h rename to base/applications/mspaint/toolsettings.h diff --git a/reactos/base/applications/mspaint/winproc.c b/base/applications/mspaint/winproc.c similarity index 100% rename from reactos/base/applications/mspaint/winproc.c rename to base/applications/mspaint/winproc.c diff --git a/reactos/base/applications/mspaint/winproc.h b/base/applications/mspaint/winproc.h similarity index 100% rename from reactos/base/applications/mspaint/winproc.h rename to base/applications/mspaint/winproc.h diff --git a/reactos/base/applications/mstsc/CMakeLists.txt b/base/applications/mstsc/CMakeLists.txt similarity index 100% rename from reactos/base/applications/mstsc/CMakeLists.txt rename to base/applications/mstsc/CMakeLists.txt diff --git a/reactos/base/applications/mstsc/bitmap.c b/base/applications/mstsc/bitmap.c similarity index 100% rename from reactos/base/applications/mstsc/bitmap.c rename to base/applications/mstsc/bitmap.c diff --git a/reactos/base/applications/mstsc/bsops.c b/base/applications/mstsc/bsops.c similarity index 100% rename from reactos/base/applications/mstsc/bsops.c rename to base/applications/mstsc/bsops.c diff --git a/reactos/base/applications/mstsc/bsops.h b/base/applications/mstsc/bsops.h similarity index 100% rename from reactos/base/applications/mstsc/bsops.h rename to base/applications/mstsc/bsops.h diff --git a/reactos/base/applications/mstsc/cache.c b/base/applications/mstsc/cache.c similarity index 100% rename from reactos/base/applications/mstsc/cache.c rename to base/applications/mstsc/cache.c diff --git a/reactos/base/applications/mstsc/channels.c b/base/applications/mstsc/channels.c similarity index 100% rename from reactos/base/applications/mstsc/channels.c rename to base/applications/mstsc/channels.c diff --git a/reactos/base/applications/mstsc/connectdialog.c b/base/applications/mstsc/connectdialog.c similarity index 100% rename from reactos/base/applications/mstsc/connectdialog.c rename to base/applications/mstsc/connectdialog.c diff --git a/reactos/base/applications/mstsc/constants.h b/base/applications/mstsc/constants.h similarity index 100% rename from reactos/base/applications/mstsc/constants.h rename to base/applications/mstsc/constants.h diff --git a/reactos/base/applications/mstsc/iso.c b/base/applications/mstsc/iso.c similarity index 100% rename from reactos/base/applications/mstsc/iso.c rename to base/applications/mstsc/iso.c diff --git a/reactos/base/applications/mstsc/lang/bg-BG.rc b/base/applications/mstsc/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/mstsc/lang/bg-BG.rc rename to base/applications/mstsc/lang/bg-BG.rc diff --git a/reactos/base/applications/mstsc/lang/ca-ES.rc b/base/applications/mstsc/lang/ca-ES.rc similarity index 100% rename from reactos/base/applications/mstsc/lang/ca-ES.rc rename to base/applications/mstsc/lang/ca-ES.rc diff --git a/reactos/base/applications/mstsc/lang/de-DE.rc b/base/applications/mstsc/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/mstsc/lang/de-DE.rc rename to base/applications/mstsc/lang/de-DE.rc diff --git a/reactos/base/applications/mstsc/lang/el-GR.rc b/base/applications/mstsc/lang/el-GR.rc similarity index 100% rename from reactos/base/applications/mstsc/lang/el-GR.rc rename to base/applications/mstsc/lang/el-GR.rc diff --git a/reactos/base/applications/mstsc/lang/en-US.rc b/base/applications/mstsc/lang/en-US.rc similarity index 100% rename from reactos/base/applications/mstsc/lang/en-US.rc rename to base/applications/mstsc/lang/en-US.rc diff --git a/reactos/base/applications/mstsc/lang/es-ES.rc b/base/applications/mstsc/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/mstsc/lang/es-ES.rc rename to base/applications/mstsc/lang/es-ES.rc diff --git a/reactos/base/applications/mstsc/lang/fr-FR.rc b/base/applications/mstsc/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/mstsc/lang/fr-FR.rc rename to base/applications/mstsc/lang/fr-FR.rc diff --git a/reactos/base/applications/mstsc/lang/it-IT.rc b/base/applications/mstsc/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/mstsc/lang/it-IT.rc rename to base/applications/mstsc/lang/it-IT.rc diff --git a/reactos/base/applications/mstsc/lang/ja-JP.rc b/base/applications/mstsc/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/mstsc/lang/ja-JP.rc rename to base/applications/mstsc/lang/ja-JP.rc diff --git a/reactos/base/applications/mstsc/lang/ko-KR.rc b/base/applications/mstsc/lang/ko-KR.rc similarity index 100% rename from reactos/base/applications/mstsc/lang/ko-KR.rc rename to base/applications/mstsc/lang/ko-KR.rc diff --git a/reactos/base/applications/mstsc/lang/lt-LT.rc b/base/applications/mstsc/lang/lt-LT.rc similarity index 100% rename from reactos/base/applications/mstsc/lang/lt-LT.rc rename to base/applications/mstsc/lang/lt-LT.rc diff --git a/reactos/base/applications/mstsc/lang/no-NO.rc b/base/applications/mstsc/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/mstsc/lang/no-NO.rc rename to base/applications/mstsc/lang/no-NO.rc diff --git a/reactos/base/applications/mstsc/lang/pl-PL.rc b/base/applications/mstsc/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/mstsc/lang/pl-PL.rc rename to base/applications/mstsc/lang/pl-PL.rc diff --git a/reactos/base/applications/mstsc/lang/ro-RO.rc b/base/applications/mstsc/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/mstsc/lang/ro-RO.rc rename to base/applications/mstsc/lang/ro-RO.rc diff --git a/reactos/base/applications/mstsc/lang/ru-RU.rc b/base/applications/mstsc/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/mstsc/lang/ru-RU.rc rename to base/applications/mstsc/lang/ru-RU.rc diff --git a/reactos/base/applications/mstsc/lang/sk-SK.rc b/base/applications/mstsc/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/mstsc/lang/sk-SK.rc rename to base/applications/mstsc/lang/sk-SK.rc diff --git a/reactos/base/applications/mstsc/lang/sv-SE.rc b/base/applications/mstsc/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/mstsc/lang/sv-SE.rc rename to base/applications/mstsc/lang/sv-SE.rc diff --git a/reactos/base/applications/mstsc/lang/uk-UA.rc b/base/applications/mstsc/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/mstsc/lang/uk-UA.rc rename to base/applications/mstsc/lang/uk-UA.rc diff --git a/reactos/base/applications/mstsc/lang/zh-CN.rc b/base/applications/mstsc/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/mstsc/lang/zh-CN.rc rename to base/applications/mstsc/lang/zh-CN.rc diff --git a/reactos/base/applications/mstsc/lang/zh-TW.rc b/base/applications/mstsc/lang/zh-TW.rc similarity index 100% rename from reactos/base/applications/mstsc/lang/zh-TW.rc rename to base/applications/mstsc/lang/zh-TW.rc diff --git a/reactos/base/applications/mstsc/licence.c b/base/applications/mstsc/licence.c similarity index 100% rename from reactos/base/applications/mstsc/licence.c rename to base/applications/mstsc/licence.c diff --git a/reactos/base/applications/mstsc/mcs.c b/base/applications/mstsc/mcs.c similarity index 100% rename from reactos/base/applications/mstsc/mcs.c rename to base/applications/mstsc/mcs.c diff --git a/reactos/base/applications/mstsc/mppc.c b/base/applications/mstsc/mppc.c similarity index 100% rename from reactos/base/applications/mstsc/mppc.c rename to base/applications/mstsc/mppc.c diff --git a/reactos/base/applications/mstsc/mstsc.rbuild b/base/applications/mstsc/mstsc.rbuild similarity index 100% rename from reactos/base/applications/mstsc/mstsc.rbuild rename to base/applications/mstsc/mstsc.rbuild diff --git a/reactos/base/applications/mstsc/orders.c b/base/applications/mstsc/orders.c similarity index 100% rename from reactos/base/applications/mstsc/orders.c rename to base/applications/mstsc/orders.c diff --git a/reactos/base/applications/mstsc/orders.h b/base/applications/mstsc/orders.h similarity index 100% rename from reactos/base/applications/mstsc/orders.h rename to base/applications/mstsc/orders.h diff --git a/reactos/base/applications/mstsc/parse.h b/base/applications/mstsc/parse.h similarity index 100% rename from reactos/base/applications/mstsc/parse.h rename to base/applications/mstsc/parse.h diff --git a/reactos/base/applications/mstsc/precomp.h b/base/applications/mstsc/precomp.h similarity index 100% rename from reactos/base/applications/mstsc/precomp.h rename to base/applications/mstsc/precomp.h diff --git a/reactos/base/applications/mstsc/proto.h b/base/applications/mstsc/proto.h similarity index 100% rename from reactos/base/applications/mstsc/proto.h rename to base/applications/mstsc/proto.h diff --git a/reactos/base/applications/mstsc/pstcache.c b/base/applications/mstsc/pstcache.c similarity index 100% rename from reactos/base/applications/mstsc/pstcache.c rename to base/applications/mstsc/pstcache.c diff --git a/reactos/base/applications/mstsc/rdc.rc b/base/applications/mstsc/rdc.rc similarity index 100% rename from reactos/base/applications/mstsc/rdc.rc rename to base/applications/mstsc/rdc.rc diff --git a/reactos/base/applications/mstsc/rdesktop.h b/base/applications/mstsc/rdesktop.h similarity index 100% rename from reactos/base/applications/mstsc/rdesktop.h rename to base/applications/mstsc/rdesktop.h diff --git a/reactos/base/applications/mstsc/rdp.c b/base/applications/mstsc/rdp.c similarity index 100% rename from reactos/base/applications/mstsc/rdp.c rename to base/applications/mstsc/rdp.c diff --git a/reactos/base/applications/mstsc/rdp5.c b/base/applications/mstsc/rdp5.c similarity index 100% rename from reactos/base/applications/mstsc/rdp5.c rename to base/applications/mstsc/rdp5.c diff --git a/reactos/base/applications/mstsc/res/colors.ico b/base/applications/mstsc/res/colors.ico similarity index 100% rename from reactos/base/applications/mstsc/res/colors.ico rename to base/applications/mstsc/res/colors.ico diff --git a/reactos/base/applications/mstsc/res/connection.ico b/base/applications/mstsc/res/connection.ico similarity index 100% rename from reactos/base/applications/mstsc/res/connection.ico rename to base/applications/mstsc/res/connection.ico diff --git a/reactos/base/applications/mstsc/res/header.bmp b/base/applications/mstsc/res/header.bmp similarity index 100% rename from reactos/base/applications/mstsc/res/header.bmp rename to base/applications/mstsc/res/header.bmp diff --git a/reactos/base/applications/mstsc/res/header.pdn b/base/applications/mstsc/res/header.pdn similarity index 100% rename from reactos/base/applications/mstsc/res/header.pdn rename to base/applications/mstsc/res/header.pdn diff --git a/reactos/base/applications/mstsc/res/logon.ico b/base/applications/mstsc/res/logon.ico similarity index 100% rename from reactos/base/applications/mstsc/res/logon.ico rename to base/applications/mstsc/res/logon.ico diff --git a/reactos/base/applications/mstsc/res/mstsc.ico b/base/applications/mstsc/res/mstsc.ico similarity index 100% rename from reactos/base/applications/mstsc/res/mstsc.ico rename to base/applications/mstsc/res/mstsc.ico diff --git a/reactos/base/applications/mstsc/res/remote.ico b/base/applications/mstsc/res/remote.ico similarity index 100% rename from reactos/base/applications/mstsc/res/remote.ico rename to base/applications/mstsc/res/remote.ico diff --git a/reactos/base/applications/mstsc/res/spectrum.bmp b/base/applications/mstsc/res/spectrum.bmp similarity index 100% rename from reactos/base/applications/mstsc/res/spectrum.bmp rename to base/applications/mstsc/res/spectrum.bmp diff --git a/reactos/base/applications/mstsc/res/video-display.png b/base/applications/mstsc/res/video-display.png similarity index 100% rename from reactos/base/applications/mstsc/res/video-display.png rename to base/applications/mstsc/res/video-display.png diff --git a/reactos/base/applications/mstsc/resource.h b/base/applications/mstsc/resource.h similarity index 100% rename from reactos/base/applications/mstsc/resource.h rename to base/applications/mstsc/resource.h diff --git a/reactos/base/applications/mstsc/rsrc.rc b/base/applications/mstsc/rsrc.rc similarity index 100% rename from reactos/base/applications/mstsc/rsrc.rc rename to base/applications/mstsc/rsrc.rc diff --git a/reactos/base/applications/mstsc/secure.c b/base/applications/mstsc/secure.c similarity index 100% rename from reactos/base/applications/mstsc/secure.c rename to base/applications/mstsc/secure.c diff --git a/reactos/base/applications/mstsc/settings.c b/base/applications/mstsc/settings.c similarity index 100% rename from reactos/base/applications/mstsc/settings.c rename to base/applications/mstsc/settings.c diff --git a/reactos/base/applications/mstsc/ssl_calls.c b/base/applications/mstsc/ssl_calls.c similarity index 100% rename from reactos/base/applications/mstsc/ssl_calls.c rename to base/applications/mstsc/ssl_calls.c diff --git a/reactos/base/applications/mstsc/tcp.c b/base/applications/mstsc/tcp.c similarity index 100% rename from reactos/base/applications/mstsc/tcp.c rename to base/applications/mstsc/tcp.c diff --git a/reactos/base/applications/mstsc/types.h b/base/applications/mstsc/types.h similarity index 100% rename from reactos/base/applications/mstsc/types.h rename to base/applications/mstsc/types.h diff --git a/reactos/base/applications/mstsc/uimain.c b/base/applications/mstsc/uimain.c similarity index 100% rename from reactos/base/applications/mstsc/uimain.c rename to base/applications/mstsc/uimain.c diff --git a/reactos/base/applications/mstsc/uimain.h b/base/applications/mstsc/uimain.h similarity index 100% rename from reactos/base/applications/mstsc/uimain.h rename to base/applications/mstsc/uimain.h diff --git a/reactos/base/applications/mstsc/win32.c b/base/applications/mstsc/win32.c similarity index 100% rename from reactos/base/applications/mstsc/win32.c rename to base/applications/mstsc/win32.c diff --git a/reactos/base/applications/network/CMakeLists.txt b/base/applications/network/CMakeLists.txt similarity index 100% rename from reactos/base/applications/network/CMakeLists.txt rename to base/applications/network/CMakeLists.txt diff --git a/reactos/base/applications/network/arp/CMakeLists.txt b/base/applications/network/arp/CMakeLists.txt similarity index 100% rename from reactos/base/applications/network/arp/CMakeLists.txt rename to base/applications/network/arp/CMakeLists.txt diff --git a/reactos/base/applications/network/arp/arp.c b/base/applications/network/arp/arp.c similarity index 100% rename from reactos/base/applications/network/arp/arp.c rename to base/applications/network/arp/arp.c diff --git a/reactos/base/applications/network/arp/arp.rbuild b/base/applications/network/arp/arp.rbuild similarity index 100% rename from reactos/base/applications/network/arp/arp.rbuild rename to base/applications/network/arp/arp.rbuild diff --git a/reactos/base/applications/network/arp/arp.rc b/base/applications/network/arp/arp.rc similarity index 100% rename from reactos/base/applications/network/arp/arp.rc rename to base/applications/network/arp/arp.rc diff --git a/reactos/base/applications/network/dwnl/CMakeLists.txt b/base/applications/network/dwnl/CMakeLists.txt similarity index 100% rename from reactos/base/applications/network/dwnl/CMakeLists.txt rename to base/applications/network/dwnl/CMakeLists.txt diff --git a/reactos/base/applications/network/dwnl/dwnl.c b/base/applications/network/dwnl/dwnl.c similarity index 100% rename from reactos/base/applications/network/dwnl/dwnl.c rename to base/applications/network/dwnl/dwnl.c diff --git a/reactos/base/applications/network/dwnl/dwnl.rbuild b/base/applications/network/dwnl/dwnl.rbuild similarity index 100% rename from reactos/base/applications/network/dwnl/dwnl.rbuild rename to base/applications/network/dwnl/dwnl.rbuild diff --git a/reactos/base/applications/network/finger/CMakeLists.txt b/base/applications/network/finger/CMakeLists.txt similarity index 100% rename from reactos/base/applications/network/finger/CMakeLists.txt rename to base/applications/network/finger/CMakeLists.txt diff --git a/reactos/base/applications/network/finger/LICENSE.txt b/base/applications/network/finger/LICENSE.txt similarity index 100% rename from reactos/base/applications/network/finger/LICENSE.txt rename to base/applications/network/finger/LICENSE.txt diff --git a/reactos/base/applications/network/finger/err.c b/base/applications/network/finger/err.c similarity index 100% rename from reactos/base/applications/network/finger/err.c rename to base/applications/network/finger/err.c diff --git a/reactos/base/applications/network/finger/err.h b/base/applications/network/finger/err.h similarity index 100% rename from reactos/base/applications/network/finger/err.h rename to base/applications/network/finger/err.h diff --git a/reactos/base/applications/network/finger/finger.c b/base/applications/network/finger/finger.c similarity index 100% rename from reactos/base/applications/network/finger/finger.c rename to base/applications/network/finger/finger.c diff --git a/reactos/base/applications/network/finger/finger.rbuild b/base/applications/network/finger/finger.rbuild similarity index 100% rename from reactos/base/applications/network/finger/finger.rbuild rename to base/applications/network/finger/finger.rbuild diff --git a/reactos/base/applications/network/finger/finger.rc b/base/applications/network/finger/finger.rc similarity index 100% rename from reactos/base/applications/network/finger/finger.rc rename to base/applications/network/finger/finger.rc diff --git a/reactos/base/applications/network/finger/getopt.c b/base/applications/network/finger/getopt.c similarity index 100% rename from reactos/base/applications/network/finger/getopt.c rename to base/applications/network/finger/getopt.c diff --git a/reactos/base/applications/network/finger/getopt.h b/base/applications/network/finger/getopt.h similarity index 100% rename from reactos/base/applications/network/finger/getopt.h rename to base/applications/network/finger/getopt.h diff --git a/reactos/base/applications/network/finger/net.c b/base/applications/network/finger/net.c similarity index 100% rename from reactos/base/applications/network/finger/net.c rename to base/applications/network/finger/net.c diff --git a/reactos/base/applications/network/finger/precomp.h b/base/applications/network/finger/precomp.h similarity index 100% rename from reactos/base/applications/network/finger/precomp.h rename to base/applications/network/finger/precomp.h diff --git a/reactos/base/applications/network/finger/various.h b/base/applications/network/finger/various.h similarity index 100% rename from reactos/base/applications/network/finger/various.h rename to base/applications/network/finger/various.h diff --git a/reactos/base/applications/network/ftp/CMakeLists.txt b/base/applications/network/ftp/CMakeLists.txt similarity index 100% rename from reactos/base/applications/network/ftp/CMakeLists.txt rename to base/applications/network/ftp/CMakeLists.txt diff --git a/reactos/base/applications/network/ftp/cmds.c b/base/applications/network/ftp/cmds.c similarity index 100% rename from reactos/base/applications/network/ftp/cmds.c rename to base/applications/network/ftp/cmds.c diff --git a/reactos/base/applications/network/ftp/cmdtab.c b/base/applications/network/ftp/cmdtab.c similarity index 100% rename from reactos/base/applications/network/ftp/cmdtab.c rename to base/applications/network/ftp/cmdtab.c diff --git a/reactos/base/applications/network/ftp/domacro.c b/base/applications/network/ftp/domacro.c similarity index 100% rename from reactos/base/applications/network/ftp/domacro.c rename to base/applications/network/ftp/domacro.c diff --git a/reactos/base/applications/network/ftp/fake.c b/base/applications/network/ftp/fake.c similarity index 100% rename from reactos/base/applications/network/ftp/fake.c rename to base/applications/network/ftp/fake.c diff --git a/reactos/base/applications/network/ftp/fake.h b/base/applications/network/ftp/fake.h similarity index 100% rename from reactos/base/applications/network/ftp/fake.h rename to base/applications/network/ftp/fake.h diff --git a/reactos/base/applications/network/ftp/ftp.c b/base/applications/network/ftp/ftp.c similarity index 100% rename from reactos/base/applications/network/ftp/ftp.c rename to base/applications/network/ftp/ftp.c diff --git a/reactos/base/applications/network/ftp/ftp.rbuild b/base/applications/network/ftp/ftp.rbuild similarity index 100% rename from reactos/base/applications/network/ftp/ftp.rbuild rename to base/applications/network/ftp/ftp.rbuild diff --git a/reactos/base/applications/network/ftp/ftp.rc b/base/applications/network/ftp/ftp.rc similarity index 100% rename from reactos/base/applications/network/ftp/ftp.rc rename to base/applications/network/ftp/ftp.rc diff --git a/reactos/base/applications/network/ftp/ftp_var.h b/base/applications/network/ftp/ftp_var.h similarity index 100% rename from reactos/base/applications/network/ftp/ftp_var.h rename to base/applications/network/ftp/ftp_var.h diff --git a/reactos/base/applications/network/ftp/main.c b/base/applications/network/ftp/main.c similarity index 100% rename from reactos/base/applications/network/ftp/main.c rename to base/applications/network/ftp/main.c diff --git a/reactos/base/applications/network/ftp/pathnames.h b/base/applications/network/ftp/pathnames.h similarity index 100% rename from reactos/base/applications/network/ftp/pathnames.h rename to base/applications/network/ftp/pathnames.h diff --git a/reactos/base/applications/network/ftp/precomp.h b/base/applications/network/ftp/precomp.h similarity index 100% rename from reactos/base/applications/network/ftp/precomp.h rename to base/applications/network/ftp/precomp.h diff --git a/reactos/base/applications/network/ftp/prototypes.h b/base/applications/network/ftp/prototypes.h similarity index 100% rename from reactos/base/applications/network/ftp/prototypes.h rename to base/applications/network/ftp/prototypes.h diff --git a/reactos/base/applications/network/ftp/ruserpass.c b/base/applications/network/ftp/ruserpass.c similarity index 100% rename from reactos/base/applications/network/ftp/ruserpass.c rename to base/applications/network/ftp/ruserpass.c diff --git a/reactos/base/applications/network/ipconfig/CMakeLists.txt b/base/applications/network/ipconfig/CMakeLists.txt similarity index 100% rename from reactos/base/applications/network/ipconfig/CMakeLists.txt rename to base/applications/network/ipconfig/CMakeLists.txt diff --git a/reactos/base/applications/network/ipconfig/ipconfig.c b/base/applications/network/ipconfig/ipconfig.c similarity index 100% rename from reactos/base/applications/network/ipconfig/ipconfig.c rename to base/applications/network/ipconfig/ipconfig.c diff --git a/reactos/base/applications/network/ipconfig/ipconfig.rbuild b/base/applications/network/ipconfig/ipconfig.rbuild similarity index 100% rename from reactos/base/applications/network/ipconfig/ipconfig.rbuild rename to base/applications/network/ipconfig/ipconfig.rbuild diff --git a/reactos/base/applications/network/ipconfig/ipconfig.rc b/base/applications/network/ipconfig/ipconfig.rc similarity index 100% rename from reactos/base/applications/network/ipconfig/ipconfig.rc rename to base/applications/network/ipconfig/ipconfig.rc diff --git a/reactos/base/applications/network/ipconfig/lang/bg-BG.rc b/base/applications/network/ipconfig/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/network/ipconfig/lang/bg-BG.rc rename to base/applications/network/ipconfig/lang/bg-BG.rc diff --git a/reactos/base/applications/network/ipconfig/lang/de-DE.rc b/base/applications/network/ipconfig/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/network/ipconfig/lang/de-DE.rc rename to base/applications/network/ipconfig/lang/de-DE.rc diff --git a/reactos/base/applications/network/ipconfig/lang/el-GR.rc b/base/applications/network/ipconfig/lang/el-GR.rc similarity index 100% rename from reactos/base/applications/network/ipconfig/lang/el-GR.rc rename to base/applications/network/ipconfig/lang/el-GR.rc diff --git a/reactos/base/applications/network/ipconfig/lang/en-US.rc b/base/applications/network/ipconfig/lang/en-US.rc similarity index 100% rename from reactos/base/applications/network/ipconfig/lang/en-US.rc rename to base/applications/network/ipconfig/lang/en-US.rc diff --git a/reactos/base/applications/network/ipconfig/lang/es-ES.rc b/base/applications/network/ipconfig/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/network/ipconfig/lang/es-ES.rc rename to base/applications/network/ipconfig/lang/es-ES.rc diff --git a/reactos/base/applications/network/ipconfig/lang/fr-FR.rc b/base/applications/network/ipconfig/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/network/ipconfig/lang/fr-FR.rc rename to base/applications/network/ipconfig/lang/fr-FR.rc diff --git a/reactos/base/applications/network/ipconfig/lang/id-ID.rc b/base/applications/network/ipconfig/lang/id-ID.rc similarity index 100% rename from reactos/base/applications/network/ipconfig/lang/id-ID.rc rename to base/applications/network/ipconfig/lang/id-ID.rc diff --git a/reactos/base/applications/network/ipconfig/lang/it-IT.rc b/base/applications/network/ipconfig/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/network/ipconfig/lang/it-IT.rc rename to base/applications/network/ipconfig/lang/it-IT.rc diff --git a/reactos/base/applications/network/ipconfig/lang/no-NO.rc b/base/applications/network/ipconfig/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/network/ipconfig/lang/no-NO.rc rename to base/applications/network/ipconfig/lang/no-NO.rc diff --git a/reactos/base/applications/network/ipconfig/lang/pl-PL.rc b/base/applications/network/ipconfig/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/network/ipconfig/lang/pl-PL.rc rename to base/applications/network/ipconfig/lang/pl-PL.rc diff --git a/reactos/base/applications/network/ipconfig/lang/ro-RO.rc b/base/applications/network/ipconfig/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/network/ipconfig/lang/ro-RO.rc rename to base/applications/network/ipconfig/lang/ro-RO.rc diff --git a/reactos/base/applications/network/ipconfig/lang/ru-RU.rc b/base/applications/network/ipconfig/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/network/ipconfig/lang/ru-RU.rc rename to base/applications/network/ipconfig/lang/ru-RU.rc diff --git a/reactos/base/applications/network/ipconfig/lang/sk-SK.rc b/base/applications/network/ipconfig/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/network/ipconfig/lang/sk-SK.rc rename to base/applications/network/ipconfig/lang/sk-SK.rc diff --git a/reactos/base/applications/network/ipconfig/lang/sv-SE.rc b/base/applications/network/ipconfig/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/network/ipconfig/lang/sv-SE.rc rename to base/applications/network/ipconfig/lang/sv-SE.rc diff --git a/reactos/base/applications/network/ipconfig/lang/uk-UA.rc b/base/applications/network/ipconfig/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/network/ipconfig/lang/uk-UA.rc rename to base/applications/network/ipconfig/lang/uk-UA.rc diff --git a/reactos/base/applications/network/ipconfig/lang/zh-CN.rc b/base/applications/network/ipconfig/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/network/ipconfig/lang/zh-CN.rc rename to base/applications/network/ipconfig/lang/zh-CN.rc diff --git a/reactos/base/applications/network/ipconfig/resource.h b/base/applications/network/ipconfig/resource.h similarity index 100% rename from reactos/base/applications/network/ipconfig/resource.h rename to base/applications/network/ipconfig/resource.h diff --git a/reactos/base/applications/network/net/CMakeLists.txt b/base/applications/network/net/CMakeLists.txt similarity index 100% rename from reactos/base/applications/network/net/CMakeLists.txt rename to base/applications/network/net/CMakeLists.txt diff --git a/reactos/base/applications/network/net/cmdStop.c b/base/applications/network/net/cmdStop.c similarity index 100% rename from reactos/base/applications/network/net/cmdStop.c rename to base/applications/network/net/cmdStop.c diff --git a/reactos/base/applications/network/net/cmdstart.c b/base/applications/network/net/cmdstart.c similarity index 100% rename from reactos/base/applications/network/net/cmdstart.c rename to base/applications/network/net/cmdstart.c diff --git a/reactos/base/applications/network/net/help.c b/base/applications/network/net/help.c similarity index 100% rename from reactos/base/applications/network/net/help.c rename to base/applications/network/net/help.c diff --git a/reactos/base/applications/network/net/main.c b/base/applications/network/net/main.c similarity index 100% rename from reactos/base/applications/network/net/main.c rename to base/applications/network/net/main.c diff --git a/reactos/base/applications/network/net/net.h b/base/applications/network/net/net.h similarity index 100% rename from reactos/base/applications/network/net/net.h rename to base/applications/network/net/net.h diff --git a/reactos/base/applications/network/net/net.rbuild b/base/applications/network/net/net.rbuild similarity index 100% rename from reactos/base/applications/network/net/net.rbuild rename to base/applications/network/net/net.rbuild diff --git a/reactos/base/applications/network/net/process.c b/base/applications/network/net/process.c similarity index 100% rename from reactos/base/applications/network/net/process.c rename to base/applications/network/net/process.c diff --git a/reactos/base/applications/network/netstat/CMakeLists.txt b/base/applications/network/netstat/CMakeLists.txt similarity index 100% rename from reactos/base/applications/network/netstat/CMakeLists.txt rename to base/applications/network/netstat/CMakeLists.txt diff --git a/reactos/base/applications/network/netstat/netstat.c b/base/applications/network/netstat/netstat.c similarity index 100% rename from reactos/base/applications/network/netstat/netstat.c rename to base/applications/network/netstat/netstat.c diff --git a/reactos/base/applications/network/netstat/netstat.h b/base/applications/network/netstat/netstat.h similarity index 100% rename from reactos/base/applications/network/netstat/netstat.h rename to base/applications/network/netstat/netstat.h diff --git a/reactos/base/applications/network/netstat/netstat.rbuild b/base/applications/network/netstat/netstat.rbuild similarity index 100% rename from reactos/base/applications/network/netstat/netstat.rbuild rename to base/applications/network/netstat/netstat.rbuild diff --git a/reactos/base/applications/network/netstat/netstat.rc b/base/applications/network/netstat/netstat.rc similarity index 100% rename from reactos/base/applications/network/netstat/netstat.rc rename to base/applications/network/netstat/netstat.rc diff --git a/reactos/base/applications/network/network.rbuild b/base/applications/network/network.rbuild similarity index 100% rename from reactos/base/applications/network/network.rbuild rename to base/applications/network/network.rbuild diff --git a/reactos/base/applications/network/nslookup/CMakeLists.txt b/base/applications/network/nslookup/CMakeLists.txt similarity index 100% rename from reactos/base/applications/network/nslookup/CMakeLists.txt rename to base/applications/network/nslookup/CMakeLists.txt diff --git a/reactos/base/applications/network/nslookup/nslookup.c b/base/applications/network/nslookup/nslookup.c similarity index 100% rename from reactos/base/applications/network/nslookup/nslookup.c rename to base/applications/network/nslookup/nslookup.c diff --git a/reactos/base/applications/network/nslookup/nslookup.h b/base/applications/network/nslookup/nslookup.h similarity index 100% rename from reactos/base/applications/network/nslookup/nslookup.h rename to base/applications/network/nslookup/nslookup.h diff --git a/reactos/base/applications/network/nslookup/nslookup.rbuild b/base/applications/network/nslookup/nslookup.rbuild similarity index 100% rename from reactos/base/applications/network/nslookup/nslookup.rbuild rename to base/applications/network/nslookup/nslookup.rbuild diff --git a/reactos/base/applications/network/nslookup/nslookup.rc b/base/applications/network/nslookup/nslookup.rc similarity index 100% rename from reactos/base/applications/network/nslookup/nslookup.rc rename to base/applications/network/nslookup/nslookup.rc diff --git a/reactos/base/applications/network/nslookup/utility.c b/base/applications/network/nslookup/utility.c similarity index 100% rename from reactos/base/applications/network/nslookup/utility.c rename to base/applications/network/nslookup/utility.c diff --git a/reactos/base/applications/network/ping/CMakeLists.txt b/base/applications/network/ping/CMakeLists.txt similarity index 100% rename from reactos/base/applications/network/ping/CMakeLists.txt rename to base/applications/network/ping/CMakeLists.txt diff --git a/reactos/base/applications/network/ping/lang/cs-CZ.rc b/base/applications/network/ping/lang/cs-CZ.rc similarity index 100% rename from reactos/base/applications/network/ping/lang/cs-CZ.rc rename to base/applications/network/ping/lang/cs-CZ.rc diff --git a/reactos/base/applications/network/ping/lang/de-DE.rc b/base/applications/network/ping/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/network/ping/lang/de-DE.rc rename to base/applications/network/ping/lang/de-DE.rc diff --git a/reactos/base/applications/network/ping/lang/en-US.rc b/base/applications/network/ping/lang/en-US.rc similarity index 100% rename from reactos/base/applications/network/ping/lang/en-US.rc rename to base/applications/network/ping/lang/en-US.rc diff --git a/reactos/base/applications/network/ping/lang/fr-FR.rc b/base/applications/network/ping/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/network/ping/lang/fr-FR.rc rename to base/applications/network/ping/lang/fr-FR.rc diff --git a/reactos/base/applications/network/ping/lang/it-IT.rc b/base/applications/network/ping/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/network/ping/lang/it-IT.rc rename to base/applications/network/ping/lang/it-IT.rc diff --git a/reactos/base/applications/network/ping/lang/pl-PL.rc b/base/applications/network/ping/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/network/ping/lang/pl-PL.rc rename to base/applications/network/ping/lang/pl-PL.rc diff --git a/reactos/base/applications/network/ping/lang/ro-RO.rc b/base/applications/network/ping/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/network/ping/lang/ro-RO.rc rename to base/applications/network/ping/lang/ro-RO.rc diff --git a/reactos/base/applications/network/ping/lang/sv-SE.rc b/base/applications/network/ping/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/network/ping/lang/sv-SE.rc rename to base/applications/network/ping/lang/sv-SE.rc diff --git a/reactos/base/applications/network/ping/lang/uk-UA.rc b/base/applications/network/ping/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/network/ping/lang/uk-UA.rc rename to base/applications/network/ping/lang/uk-UA.rc diff --git a/reactos/base/applications/network/ping/lang/zh-CN.rc b/base/applications/network/ping/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/network/ping/lang/zh-CN.rc rename to base/applications/network/ping/lang/zh-CN.rc diff --git a/reactos/base/applications/network/ping/ping.c b/base/applications/network/ping/ping.c similarity index 100% rename from reactos/base/applications/network/ping/ping.c rename to base/applications/network/ping/ping.c diff --git a/reactos/base/applications/network/ping/ping.rbuild b/base/applications/network/ping/ping.rbuild similarity index 100% rename from reactos/base/applications/network/ping/ping.rbuild rename to base/applications/network/ping/ping.rbuild diff --git a/reactos/base/applications/network/ping/ping.rc b/base/applications/network/ping/ping.rc similarity index 100% rename from reactos/base/applications/network/ping/ping.rc rename to base/applications/network/ping/ping.rc diff --git a/reactos/base/applications/network/ping/resource.h b/base/applications/network/ping/resource.h similarity index 100% rename from reactos/base/applications/network/ping/resource.h rename to base/applications/network/ping/resource.h diff --git a/reactos/base/applications/network/route/CMakeLists.txt b/base/applications/network/route/CMakeLists.txt similarity index 100% rename from reactos/base/applications/network/route/CMakeLists.txt rename to base/applications/network/route/CMakeLists.txt diff --git a/reactos/base/applications/network/route/route.c b/base/applications/network/route/route.c similarity index 100% rename from reactos/base/applications/network/route/route.c rename to base/applications/network/route/route.c diff --git a/reactos/base/applications/network/route/route.rbuild b/base/applications/network/route/route.rbuild similarity index 100% rename from reactos/base/applications/network/route/route.rbuild rename to base/applications/network/route/route.rbuild diff --git a/reactos/base/applications/network/route/route.rc b/base/applications/network/route/route.rc similarity index 100% rename from reactos/base/applications/network/route/route.rc rename to base/applications/network/route/route.rc diff --git a/reactos/base/applications/network/telnet/CMakeLists.txt b/base/applications/network/telnet/CMakeLists.txt similarity index 100% rename from reactos/base/applications/network/telnet/CMakeLists.txt rename to base/applications/network/telnet/CMakeLists.txt diff --git a/reactos/base/applications/network/telnet/Makefile.mingw b/base/applications/network/telnet/Makefile.mingw similarity index 100% rename from reactos/base/applications/network/telnet/Makefile.mingw rename to base/applications/network/telnet/Makefile.mingw diff --git a/reactos/base/applications/network/telnet/doc/00readme.avs b/base/applications/network/telnet/doc/00readme.avs similarity index 100% rename from reactos/base/applications/network/telnet/doc/00readme.avs rename to base/applications/network/telnet/doc/00readme.avs diff --git a/reactos/base/applications/network/telnet/doc/bugs.txt b/base/applications/network/telnet/doc/bugs.txt similarity index 100% rename from reactos/base/applications/network/telnet/doc/bugs.txt rename to base/applications/network/telnet/doc/bugs.txt diff --git a/reactos/base/applications/network/telnet/doc/changes.txt b/base/applications/network/telnet/doc/changes.txt similarity index 100% rename from reactos/base/applications/network/telnet/doc/changes.txt rename to base/applications/network/telnet/doc/changes.txt diff --git a/reactos/base/applications/network/telnet/doc/license.txt b/base/applications/network/telnet/doc/license.txt similarity index 100% rename from reactos/base/applications/network/telnet/doc/license.txt rename to base/applications/network/telnet/doc/license.txt diff --git a/reactos/base/applications/network/telnet/doc/options.txt b/base/applications/network/telnet/doc/options.txt similarity index 100% rename from reactos/base/applications/network/telnet/doc/options.txt rename to base/applications/network/telnet/doc/options.txt diff --git a/reactos/base/applications/network/telnet/doc/readme.txt b/base/applications/network/telnet/doc/readme.txt similarity index 100% rename from reactos/base/applications/network/telnet/doc/readme.txt rename to base/applications/network/telnet/doc/readme.txt diff --git a/reactos/base/applications/network/telnet/doc/ssh.txt b/base/applications/network/telnet/doc/ssh.txt similarity index 100% rename from reactos/base/applications/network/telnet/doc/ssh.txt rename to base/applications/network/telnet/doc/ssh.txt diff --git a/reactos/base/applications/network/telnet/resource/tnmsg.h b/base/applications/network/telnet/resource/tnmsg.h similarity index 100% rename from reactos/base/applications/network/telnet/resource/tnmsg.h rename to base/applications/network/telnet/resource/tnmsg.h diff --git a/reactos/base/applications/network/telnet/resource/tnmsg.rc b/base/applications/network/telnet/resource/tnmsg.rc similarity index 100% rename from reactos/base/applications/network/telnet/resource/tnmsg.rc rename to base/applications/network/telnet/resource/tnmsg.rc diff --git a/reactos/base/applications/network/telnet/src/ansiprsr.cpp b/base/applications/network/telnet/src/ansiprsr.cpp similarity index 100% rename from reactos/base/applications/network/telnet/src/ansiprsr.cpp rename to base/applications/network/telnet/src/ansiprsr.cpp diff --git a/reactos/base/applications/network/telnet/src/ansiprsr.h b/base/applications/network/telnet/src/ansiprsr.h similarity index 100% rename from reactos/base/applications/network/telnet/src/ansiprsr.h rename to base/applications/network/telnet/src/ansiprsr.h diff --git a/reactos/base/applications/network/telnet/src/keytrans.cpp b/base/applications/network/telnet/src/keytrans.cpp similarity index 100% rename from reactos/base/applications/network/telnet/src/keytrans.cpp rename to base/applications/network/telnet/src/keytrans.cpp diff --git a/reactos/base/applications/network/telnet/src/keytrans.h b/base/applications/network/telnet/src/keytrans.h similarity index 100% rename from reactos/base/applications/network/telnet/src/keytrans.h rename to base/applications/network/telnet/src/keytrans.h diff --git a/reactos/base/applications/network/telnet/src/precomp.h b/base/applications/network/telnet/src/precomp.h similarity index 100% rename from reactos/base/applications/network/telnet/src/precomp.h rename to base/applications/network/telnet/src/precomp.h diff --git a/reactos/base/applications/network/telnet/src/stl_bids.h b/base/applications/network/telnet/src/stl_bids.h similarity index 100% rename from reactos/base/applications/network/telnet/src/stl_bids.h rename to base/applications/network/telnet/src/stl_bids.h diff --git a/reactos/base/applications/network/telnet/src/tcharmap.cpp b/base/applications/network/telnet/src/tcharmap.cpp similarity index 100% rename from reactos/base/applications/network/telnet/src/tcharmap.cpp rename to base/applications/network/telnet/src/tcharmap.cpp diff --git a/reactos/base/applications/network/telnet/src/tcharmap.h b/base/applications/network/telnet/src/tcharmap.h similarity index 100% rename from reactos/base/applications/network/telnet/src/tcharmap.h rename to base/applications/network/telnet/src/tcharmap.h diff --git a/reactos/base/applications/network/telnet/src/tconsole.cpp b/base/applications/network/telnet/src/tconsole.cpp similarity index 100% rename from reactos/base/applications/network/telnet/src/tconsole.cpp rename to base/applications/network/telnet/src/tconsole.cpp diff --git a/reactos/base/applications/network/telnet/src/tconsole.h b/base/applications/network/telnet/src/tconsole.h similarity index 100% rename from reactos/base/applications/network/telnet/src/tconsole.h rename to base/applications/network/telnet/src/tconsole.h diff --git a/reactos/base/applications/network/telnet/src/telnet.h b/base/applications/network/telnet/src/telnet.h similarity index 100% rename from reactos/base/applications/network/telnet/src/telnet.h rename to base/applications/network/telnet/src/telnet.h diff --git a/reactos/base/applications/network/telnet/src/tkeydef.cpp b/base/applications/network/telnet/src/tkeydef.cpp similarity index 100% rename from reactos/base/applications/network/telnet/src/tkeydef.cpp rename to base/applications/network/telnet/src/tkeydef.cpp diff --git a/reactos/base/applications/network/telnet/src/tkeydef.h b/base/applications/network/telnet/src/tkeydef.h similarity index 100% rename from reactos/base/applications/network/telnet/src/tkeydef.h rename to base/applications/network/telnet/src/tkeydef.h diff --git a/reactos/base/applications/network/telnet/src/tkeymap.cpp b/base/applications/network/telnet/src/tkeymap.cpp similarity index 100% rename from reactos/base/applications/network/telnet/src/tkeymap.cpp rename to base/applications/network/telnet/src/tkeymap.cpp diff --git a/reactos/base/applications/network/telnet/src/tkeymap.h b/base/applications/network/telnet/src/tkeymap.h similarity index 100% rename from reactos/base/applications/network/telnet/src/tkeymap.h rename to base/applications/network/telnet/src/tkeymap.h diff --git a/reactos/base/applications/network/telnet/src/tmapldr.cpp b/base/applications/network/telnet/src/tmapldr.cpp similarity index 100% rename from reactos/base/applications/network/telnet/src/tmapldr.cpp rename to base/applications/network/telnet/src/tmapldr.cpp diff --git a/reactos/base/applications/network/telnet/src/tmapldr.h b/base/applications/network/telnet/src/tmapldr.h similarity index 100% rename from reactos/base/applications/network/telnet/src/tmapldr.h rename to base/applications/network/telnet/src/tmapldr.h diff --git a/reactos/base/applications/network/telnet/src/tmouse.cpp b/base/applications/network/telnet/src/tmouse.cpp similarity index 100% rename from reactos/base/applications/network/telnet/src/tmouse.cpp rename to base/applications/network/telnet/src/tmouse.cpp diff --git a/reactos/base/applications/network/telnet/src/tmouse.h b/base/applications/network/telnet/src/tmouse.h similarity index 100% rename from reactos/base/applications/network/telnet/src/tmouse.h rename to base/applications/network/telnet/src/tmouse.h diff --git a/reactos/base/applications/network/telnet/src/tnclass.cpp b/base/applications/network/telnet/src/tnclass.cpp similarity index 100% rename from reactos/base/applications/network/telnet/src/tnclass.cpp rename to base/applications/network/telnet/src/tnclass.cpp diff --git a/reactos/base/applications/network/telnet/src/tnclass.h b/base/applications/network/telnet/src/tnclass.h similarity index 100% rename from reactos/base/applications/network/telnet/src/tnclass.h rename to base/applications/network/telnet/src/tnclass.h diff --git a/reactos/base/applications/network/telnet/src/tnclip.cpp b/base/applications/network/telnet/src/tnclip.cpp similarity index 100% rename from reactos/base/applications/network/telnet/src/tnclip.cpp rename to base/applications/network/telnet/src/tnclip.cpp diff --git a/reactos/base/applications/network/telnet/src/tnclip.h b/base/applications/network/telnet/src/tnclip.h similarity index 100% rename from reactos/base/applications/network/telnet/src/tnclip.h rename to base/applications/network/telnet/src/tnclip.h diff --git a/reactos/base/applications/network/telnet/src/tncon.cpp b/base/applications/network/telnet/src/tncon.cpp similarity index 100% rename from reactos/base/applications/network/telnet/src/tncon.cpp rename to base/applications/network/telnet/src/tncon.cpp diff --git a/reactos/base/applications/network/telnet/src/tncon.h b/base/applications/network/telnet/src/tncon.h similarity index 100% rename from reactos/base/applications/network/telnet/src/tncon.h rename to base/applications/network/telnet/src/tncon.h diff --git a/reactos/base/applications/network/telnet/src/tnconfig.cpp b/base/applications/network/telnet/src/tnconfig.cpp similarity index 100% rename from reactos/base/applications/network/telnet/src/tnconfig.cpp rename to base/applications/network/telnet/src/tnconfig.cpp diff --git a/reactos/base/applications/network/telnet/src/tnconfig.h b/base/applications/network/telnet/src/tnconfig.h similarity index 100% rename from reactos/base/applications/network/telnet/src/tnconfig.h rename to base/applications/network/telnet/src/tnconfig.h diff --git a/reactos/base/applications/network/telnet/src/tnerror.cpp b/base/applications/network/telnet/src/tnerror.cpp similarity index 100% rename from reactos/base/applications/network/telnet/src/tnerror.cpp rename to base/applications/network/telnet/src/tnerror.cpp diff --git a/reactos/base/applications/network/telnet/src/tnerror.h b/base/applications/network/telnet/src/tnerror.h similarity index 100% rename from reactos/base/applications/network/telnet/src/tnerror.h rename to base/applications/network/telnet/src/tnerror.h diff --git a/reactos/base/applications/network/telnet/src/tnetwork.cpp b/base/applications/network/telnet/src/tnetwork.cpp similarity index 100% rename from reactos/base/applications/network/telnet/src/tnetwork.cpp rename to base/applications/network/telnet/src/tnetwork.cpp diff --git a/reactos/base/applications/network/telnet/src/tnetwork.h b/base/applications/network/telnet/src/tnetwork.h similarity index 100% rename from reactos/base/applications/network/telnet/src/tnetwork.h rename to base/applications/network/telnet/src/tnetwork.h diff --git a/reactos/base/applications/network/telnet/src/tnmain.cpp b/base/applications/network/telnet/src/tnmain.cpp similarity index 100% rename from reactos/base/applications/network/telnet/src/tnmain.cpp rename to base/applications/network/telnet/src/tnmain.cpp diff --git a/reactos/base/applications/network/telnet/src/tnmain.h b/base/applications/network/telnet/src/tnmain.h similarity index 100% rename from reactos/base/applications/network/telnet/src/tnmain.h rename to base/applications/network/telnet/src/tnmain.h diff --git a/reactos/base/applications/network/telnet/src/tnmisc.cpp b/base/applications/network/telnet/src/tnmisc.cpp similarity index 100% rename from reactos/base/applications/network/telnet/src/tnmisc.cpp rename to base/applications/network/telnet/src/tnmisc.cpp diff --git a/reactos/base/applications/network/telnet/src/tnmisc.h b/base/applications/network/telnet/src/tnmisc.h similarity index 100% rename from reactos/base/applications/network/telnet/src/tnmisc.h rename to base/applications/network/telnet/src/tnmisc.h diff --git a/reactos/base/applications/network/telnet/src/tnmsg.h b/base/applications/network/telnet/src/tnmsg.h similarity index 100% rename from reactos/base/applications/network/telnet/src/tnmsg.h rename to base/applications/network/telnet/src/tnmsg.h diff --git a/reactos/base/applications/network/telnet/src/tparams.h b/base/applications/network/telnet/src/tparams.h similarity index 100% rename from reactos/base/applications/network/telnet/src/tparams.h rename to base/applications/network/telnet/src/tparams.h diff --git a/reactos/base/applications/network/telnet/src/tparser.h b/base/applications/network/telnet/src/tparser.h similarity index 100% rename from reactos/base/applications/network/telnet/src/tparser.h rename to base/applications/network/telnet/src/tparser.h diff --git a/reactos/base/applications/network/telnet/src/tscript.cpp b/base/applications/network/telnet/src/tscript.cpp similarity index 100% rename from reactos/base/applications/network/telnet/src/tscript.cpp rename to base/applications/network/telnet/src/tscript.cpp diff --git a/reactos/base/applications/network/telnet/src/tscript.h b/base/applications/network/telnet/src/tscript.h similarity index 100% rename from reactos/base/applications/network/telnet/src/tscript.h rename to base/applications/network/telnet/src/tscript.h diff --git a/reactos/base/applications/network/telnet/src/tscroll.cpp b/base/applications/network/telnet/src/tscroll.cpp similarity index 100% rename from reactos/base/applications/network/telnet/src/tscroll.cpp rename to base/applications/network/telnet/src/tscroll.cpp diff --git a/reactos/base/applications/network/telnet/src/tscroll.h b/base/applications/network/telnet/src/tscroll.h similarity index 100% rename from reactos/base/applications/network/telnet/src/tscroll.h rename to base/applications/network/telnet/src/tscroll.h diff --git a/reactos/base/applications/network/telnet/src/ttelhndl.cpp b/base/applications/network/telnet/src/ttelhndl.cpp similarity index 100% rename from reactos/base/applications/network/telnet/src/ttelhndl.cpp rename to base/applications/network/telnet/src/ttelhndl.cpp diff --git a/reactos/base/applications/network/telnet/src/ttelhndl.h b/base/applications/network/telnet/src/ttelhndl.h similarity index 100% rename from reactos/base/applications/network/telnet/src/ttelhndl.h rename to base/applications/network/telnet/src/ttelhndl.h diff --git a/reactos/base/applications/network/telnet/telnet.cfg b/base/applications/network/telnet/telnet.cfg similarity index 100% rename from reactos/base/applications/network/telnet/telnet.cfg rename to base/applications/network/telnet/telnet.cfg diff --git a/reactos/base/applications/network/telnet/telnet.ico b/base/applications/network/telnet/telnet.ico similarity index 100% rename from reactos/base/applications/network/telnet/telnet.ico rename to base/applications/network/telnet/telnet.ico diff --git a/reactos/base/applications/network/telnet/telnet.ini b/base/applications/network/telnet/telnet.ini similarity index 100% rename from reactos/base/applications/network/telnet/telnet.ini rename to base/applications/network/telnet/telnet.ini diff --git a/reactos/base/applications/network/telnet/telnet.rbuild b/base/applications/network/telnet/telnet.rbuild similarity index 100% rename from reactos/base/applications/network/telnet/telnet.rbuild rename to base/applications/network/telnet/telnet.rbuild diff --git a/reactos/base/applications/network/telnet/telnet.rc b/base/applications/network/telnet/telnet.rc similarity index 100% rename from reactos/base/applications/network/telnet/telnet.rc rename to base/applications/network/telnet/telnet.rc diff --git a/reactos/base/applications/network/tracert/CMakeLists.txt b/base/applications/network/tracert/CMakeLists.txt similarity index 100% rename from reactos/base/applications/network/tracert/CMakeLists.txt rename to base/applications/network/tracert/CMakeLists.txt diff --git a/reactos/base/applications/network/tracert/tracert.c b/base/applications/network/tracert/tracert.c similarity index 100% rename from reactos/base/applications/network/tracert/tracert.c rename to base/applications/network/tracert/tracert.c diff --git a/reactos/base/applications/network/tracert/tracert.h b/base/applications/network/tracert/tracert.h similarity index 100% rename from reactos/base/applications/network/tracert/tracert.h rename to base/applications/network/tracert/tracert.h diff --git a/reactos/base/applications/network/tracert/tracert.rbuild b/base/applications/network/tracert/tracert.rbuild similarity index 100% rename from reactos/base/applications/network/tracert/tracert.rbuild rename to base/applications/network/tracert/tracert.rbuild diff --git a/reactos/base/applications/network/tracert/tracert.rc b/base/applications/network/tracert/tracert.rc similarity index 100% rename from reactos/base/applications/network/tracert/tracert.rc rename to base/applications/network/tracert/tracert.rc diff --git a/reactos/base/applications/network/whois/CMakeLists.txt b/base/applications/network/whois/CMakeLists.txt similarity index 100% rename from reactos/base/applications/network/whois/CMakeLists.txt rename to base/applications/network/whois/CMakeLists.txt diff --git a/reactos/base/applications/network/whois/LICENSE.txt b/base/applications/network/whois/LICENSE.txt similarity index 100% rename from reactos/base/applications/network/whois/LICENSE.txt rename to base/applications/network/whois/LICENSE.txt diff --git a/reactos/base/applications/network/whois/whois.c b/base/applications/network/whois/whois.c similarity index 100% rename from reactos/base/applications/network/whois/whois.c rename to base/applications/network/whois/whois.c diff --git a/reactos/base/applications/network/whois/whois.rbuild b/base/applications/network/whois/whois.rbuild similarity index 100% rename from reactos/base/applications/network/whois/whois.rbuild rename to base/applications/network/whois/whois.rbuild diff --git a/reactos/base/applications/network/whois/whois.rc b/base/applications/network/whois/whois.rc similarity index 100% rename from reactos/base/applications/network/whois/whois.rc rename to base/applications/network/whois/whois.rc diff --git a/reactos/base/applications/notepad/CMakeLists.txt b/base/applications/notepad/CMakeLists.txt similarity index 100% rename from reactos/base/applications/notepad/CMakeLists.txt rename to base/applications/notepad/CMakeLists.txt diff --git a/reactos/base/applications/notepad/ChangeLog b/base/applications/notepad/ChangeLog similarity index 100% rename from reactos/base/applications/notepad/ChangeLog rename to base/applications/notepad/ChangeLog diff --git a/reactos/base/applications/notepad/dialog.c b/base/applications/notepad/dialog.c similarity index 100% rename from reactos/base/applications/notepad/dialog.c rename to base/applications/notepad/dialog.c diff --git a/reactos/base/applications/notepad/dialog.h b/base/applications/notepad/dialog.h similarity index 100% rename from reactos/base/applications/notepad/dialog.h rename to base/applications/notepad/dialog.h diff --git a/reactos/base/applications/notepad/lang/bg-BG.rc b/base/applications/notepad/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/notepad/lang/bg-BG.rc rename to base/applications/notepad/lang/bg-BG.rc diff --git a/reactos/base/applications/notepad/lang/cs-CZ.rc b/base/applications/notepad/lang/cs-CZ.rc similarity index 100% rename from reactos/base/applications/notepad/lang/cs-CZ.rc rename to base/applications/notepad/lang/cs-CZ.rc diff --git a/reactos/base/applications/notepad/lang/da-DK.rc b/base/applications/notepad/lang/da-DK.rc similarity index 100% rename from reactos/base/applications/notepad/lang/da-DK.rc rename to base/applications/notepad/lang/da-DK.rc diff --git a/reactos/base/applications/notepad/lang/de-DE.rc b/base/applications/notepad/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/notepad/lang/de-DE.rc rename to base/applications/notepad/lang/de-DE.rc diff --git a/reactos/base/applications/notepad/lang/el-GR.rc b/base/applications/notepad/lang/el-GR.rc similarity index 100% rename from reactos/base/applications/notepad/lang/el-GR.rc rename to base/applications/notepad/lang/el-GR.rc diff --git a/reactos/base/applications/notepad/lang/en-US.rc b/base/applications/notepad/lang/en-US.rc similarity index 100% rename from reactos/base/applications/notepad/lang/en-US.rc rename to base/applications/notepad/lang/en-US.rc diff --git a/reactos/base/applications/notepad/lang/es-ES.rc b/base/applications/notepad/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/notepad/lang/es-ES.rc rename to base/applications/notepad/lang/es-ES.rc diff --git a/reactos/base/applications/notepad/lang/eu-ES.rc b/base/applications/notepad/lang/eu-ES.rc similarity index 100% rename from reactos/base/applications/notepad/lang/eu-ES.rc rename to base/applications/notepad/lang/eu-ES.rc diff --git a/reactos/base/applications/notepad/lang/fi-FI.rc b/base/applications/notepad/lang/fi-FI.rc similarity index 100% rename from reactos/base/applications/notepad/lang/fi-FI.rc rename to base/applications/notepad/lang/fi-FI.rc diff --git a/reactos/base/applications/notepad/lang/fr-FR.rc b/base/applications/notepad/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/notepad/lang/fr-FR.rc rename to base/applications/notepad/lang/fr-FR.rc diff --git a/reactos/base/applications/notepad/lang/hu-HU.rc b/base/applications/notepad/lang/hu-HU.rc similarity index 100% rename from reactos/base/applications/notepad/lang/hu-HU.rc rename to base/applications/notepad/lang/hu-HU.rc diff --git a/reactos/base/applications/notepad/lang/hy-AM.rc b/base/applications/notepad/lang/hy-AM.rc similarity index 100% rename from reactos/base/applications/notepad/lang/hy-AM.rc rename to base/applications/notepad/lang/hy-AM.rc diff --git a/reactos/base/applications/notepad/lang/id-ID.rc b/base/applications/notepad/lang/id-ID.rc similarity index 100% rename from reactos/base/applications/notepad/lang/id-ID.rc rename to base/applications/notepad/lang/id-ID.rc diff --git a/reactos/base/applications/notepad/lang/it-IT.rc b/base/applications/notepad/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/notepad/lang/it-IT.rc rename to base/applications/notepad/lang/it-IT.rc diff --git a/reactos/base/applications/notepad/lang/ja-JP.rc b/base/applications/notepad/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/notepad/lang/ja-JP.rc rename to base/applications/notepad/lang/ja-JP.rc diff --git a/reactos/base/applications/notepad/lang/lt-LT.rc b/base/applications/notepad/lang/lt-LT.rc similarity index 100% rename from reactos/base/applications/notepad/lang/lt-LT.rc rename to base/applications/notepad/lang/lt-LT.rc diff --git a/reactos/base/applications/notepad/lang/nl-NL.rc b/base/applications/notepad/lang/nl-NL.rc similarity index 100% rename from reactos/base/applications/notepad/lang/nl-NL.rc rename to base/applications/notepad/lang/nl-NL.rc diff --git a/reactos/base/applications/notepad/lang/no-NO.rc b/base/applications/notepad/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/notepad/lang/no-NO.rc rename to base/applications/notepad/lang/no-NO.rc diff --git a/reactos/base/applications/notepad/lang/pl-PL.rc b/base/applications/notepad/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/notepad/lang/pl-PL.rc rename to base/applications/notepad/lang/pl-PL.rc diff --git a/reactos/base/applications/notepad/lang/pt-PT.rc b/base/applications/notepad/lang/pt-PT.rc similarity index 100% rename from reactos/base/applications/notepad/lang/pt-PT.rc rename to base/applications/notepad/lang/pt-PT.rc diff --git a/reactos/base/applications/notepad/lang/ro-RO.rc b/base/applications/notepad/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/notepad/lang/ro-RO.rc rename to base/applications/notepad/lang/ro-RO.rc diff --git a/reactos/base/applications/notepad/lang/ru-RU.rc b/base/applications/notepad/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/notepad/lang/ru-RU.rc rename to base/applications/notepad/lang/ru-RU.rc diff --git a/reactos/base/applications/notepad/lang/sk-SK.rc b/base/applications/notepad/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/notepad/lang/sk-SK.rc rename to base/applications/notepad/lang/sk-SK.rc diff --git a/reactos/base/applications/notepad/lang/sl-SI.rc b/base/applications/notepad/lang/sl-SI.rc similarity index 100% rename from reactos/base/applications/notepad/lang/sl-SI.rc rename to base/applications/notepad/lang/sl-SI.rc diff --git a/reactos/base/applications/notepad/lang/sv-SE.rc b/base/applications/notepad/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/notepad/lang/sv-SE.rc rename to base/applications/notepad/lang/sv-SE.rc diff --git a/reactos/base/applications/notepad/lang/th-TH.rc b/base/applications/notepad/lang/th-TH.rc similarity index 100% rename from reactos/base/applications/notepad/lang/th-TH.rc rename to base/applications/notepad/lang/th-TH.rc diff --git a/reactos/base/applications/notepad/lang/uk-UA.rc b/base/applications/notepad/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/notepad/lang/uk-UA.rc rename to base/applications/notepad/lang/uk-UA.rc diff --git a/reactos/base/applications/notepad/lang/zh-CN.rc b/base/applications/notepad/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/notepad/lang/zh-CN.rc rename to base/applications/notepad/lang/zh-CN.rc diff --git a/reactos/base/applications/notepad/license.c b/base/applications/notepad/license.c similarity index 100% rename from reactos/base/applications/notepad/license.c rename to base/applications/notepad/license.c diff --git a/reactos/base/applications/notepad/main.c b/base/applications/notepad/main.c similarity index 100% rename from reactos/base/applications/notepad/main.c rename to base/applications/notepad/main.c diff --git a/reactos/base/applications/notepad/main.h b/base/applications/notepad/main.h similarity index 100% rename from reactos/base/applications/notepad/main.h rename to base/applications/notepad/main.h diff --git a/reactos/base/applications/notepad/notepad.h b/base/applications/notepad/notepad.h similarity index 100% rename from reactos/base/applications/notepad/notepad.h rename to base/applications/notepad/notepad.h diff --git a/reactos/base/applications/notepad/notepad.rbuild b/base/applications/notepad/notepad.rbuild similarity index 100% rename from reactos/base/applications/notepad/notepad.rbuild rename to base/applications/notepad/notepad.rbuild diff --git a/reactos/base/applications/notepad/notepad_res.h b/base/applications/notepad/notepad_res.h similarity index 100% rename from reactos/base/applications/notepad/notepad_res.h rename to base/applications/notepad/notepad_res.h diff --git a/reactos/base/applications/notepad/res/notepad.ico b/base/applications/notepad/res/notepad.ico similarity index 100% rename from reactos/base/applications/notepad/res/notepad.ico rename to base/applications/notepad/res/notepad.ico diff --git a/reactos/base/applications/notepad/rsrc.rc b/base/applications/notepad/rsrc.rc similarity index 100% rename from reactos/base/applications/notepad/rsrc.rc rename to base/applications/notepad/rsrc.rc diff --git a/reactos/base/applications/notepad/settings.c b/base/applications/notepad/settings.c similarity index 100% rename from reactos/base/applications/notepad/settings.c rename to base/applications/notepad/settings.c diff --git a/reactos/base/applications/notepad/text.c b/base/applications/notepad/text.c similarity index 100% rename from reactos/base/applications/notepad/text.c rename to base/applications/notepad/text.c diff --git a/reactos/base/applications/rapps/CMakeLists.txt b/base/applications/rapps/CMakeLists.txt similarity index 100% rename from reactos/base/applications/rapps/CMakeLists.txt rename to base/applications/rapps/CMakeLists.txt diff --git a/reactos/base/applications/rapps/CreateCabFile.bat b/base/applications/rapps/CreateCabFile.bat similarity index 100% rename from reactos/base/applications/rapps/CreateCabFile.bat rename to base/applications/rapps/CreateCabFile.bat diff --git a/reactos/base/applications/rapps/README.ENG b/base/applications/rapps/README.ENG similarity index 100% rename from reactos/base/applications/rapps/README.ENG rename to base/applications/rapps/README.ENG diff --git a/reactos/base/applications/rapps/README.RUS b/base/applications/rapps/README.RUS similarity index 100% rename from reactos/base/applications/rapps/README.RUS rename to base/applications/rapps/README.RUS diff --git a/reactos/base/applications/rapps/aboutdlg.c b/base/applications/rapps/aboutdlg.c similarity index 100% rename from reactos/base/applications/rapps/aboutdlg.c rename to base/applications/rapps/aboutdlg.c diff --git a/reactos/base/applications/rapps/available.c b/base/applications/rapps/available.c similarity index 100% rename from reactos/base/applications/rapps/available.c rename to base/applications/rapps/available.c diff --git a/reactos/base/applications/rapps/installdlg.c b/base/applications/rapps/installdlg.c similarity index 100% rename from reactos/base/applications/rapps/installdlg.c rename to base/applications/rapps/installdlg.c diff --git a/reactos/base/applications/rapps/installed.c b/base/applications/rapps/installed.c similarity index 100% rename from reactos/base/applications/rapps/installed.c rename to base/applications/rapps/installed.c diff --git a/reactos/base/applications/rapps/lang/bg-BG.rc b/base/applications/rapps/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/rapps/lang/bg-BG.rc rename to base/applications/rapps/lang/bg-BG.rc diff --git a/reactos/base/applications/rapps/lang/cs-CZ.rc b/base/applications/rapps/lang/cs-CZ.rc similarity index 100% rename from reactos/base/applications/rapps/lang/cs-CZ.rc rename to base/applications/rapps/lang/cs-CZ.rc diff --git a/reactos/base/applications/rapps/lang/de-DE.rc b/base/applications/rapps/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/rapps/lang/de-DE.rc rename to base/applications/rapps/lang/de-DE.rc diff --git a/reactos/base/applications/rapps/lang/en-US.rc b/base/applications/rapps/lang/en-US.rc similarity index 100% rename from reactos/base/applications/rapps/lang/en-US.rc rename to base/applications/rapps/lang/en-US.rc diff --git a/reactos/base/applications/rapps/lang/es-ES.rc b/base/applications/rapps/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/rapps/lang/es-ES.rc rename to base/applications/rapps/lang/es-ES.rc diff --git a/reactos/base/applications/rapps/lang/fr-FR.rc b/base/applications/rapps/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/rapps/lang/fr-FR.rc rename to base/applications/rapps/lang/fr-FR.rc diff --git a/reactos/base/applications/rapps/lang/it-IT.rc b/base/applications/rapps/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/rapps/lang/it-IT.rc rename to base/applications/rapps/lang/it-IT.rc diff --git a/reactos/base/applications/rapps/lang/ja-JP.rc b/base/applications/rapps/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/rapps/lang/ja-JP.rc rename to base/applications/rapps/lang/ja-JP.rc diff --git a/reactos/base/applications/rapps/lang/no-NO.rc b/base/applications/rapps/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/rapps/lang/no-NO.rc rename to base/applications/rapps/lang/no-NO.rc diff --git a/reactos/base/applications/rapps/lang/pl-PL.rc b/base/applications/rapps/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/rapps/lang/pl-PL.rc rename to base/applications/rapps/lang/pl-PL.rc diff --git a/reactos/base/applications/rapps/lang/pt-BR.rc b/base/applications/rapps/lang/pt-BR.rc similarity index 100% rename from reactos/base/applications/rapps/lang/pt-BR.rc rename to base/applications/rapps/lang/pt-BR.rc diff --git a/reactos/base/applications/rapps/lang/ro-RO.rc b/base/applications/rapps/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/rapps/lang/ro-RO.rc rename to base/applications/rapps/lang/ro-RO.rc diff --git a/reactos/base/applications/rapps/lang/ru-RU.rc b/base/applications/rapps/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/rapps/lang/ru-RU.rc rename to base/applications/rapps/lang/ru-RU.rc diff --git a/reactos/base/applications/rapps/lang/sk-SK.rc b/base/applications/rapps/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/rapps/lang/sk-SK.rc rename to base/applications/rapps/lang/sk-SK.rc diff --git a/reactos/base/applications/rapps/lang/sv-SE.rc b/base/applications/rapps/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/rapps/lang/sv-SE.rc rename to base/applications/rapps/lang/sv-SE.rc diff --git a/reactos/base/applications/rapps/lang/uk-UA.rc b/base/applications/rapps/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/rapps/lang/uk-UA.rc rename to base/applications/rapps/lang/uk-UA.rc diff --git a/reactos/base/applications/rapps/lang/zh-CN.rc b/base/applications/rapps/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/rapps/lang/zh-CN.rc rename to base/applications/rapps/lang/zh-CN.rc diff --git a/reactos/base/applications/rapps/listview.c b/base/applications/rapps/listview.c similarity index 100% rename from reactos/base/applications/rapps/listview.c rename to base/applications/rapps/listview.c diff --git a/reactos/base/applications/rapps/loaddlg.c b/base/applications/rapps/loaddlg.c similarity index 100% rename from reactos/base/applications/rapps/loaddlg.c rename to base/applications/rapps/loaddlg.c diff --git a/reactos/base/applications/rapps/manifest.xml b/base/applications/rapps/manifest.xml similarity index 100% rename from reactos/base/applications/rapps/manifest.xml rename to base/applications/rapps/manifest.xml diff --git a/reactos/base/applications/rapps/misc.c b/base/applications/rapps/misc.c similarity index 100% rename from reactos/base/applications/rapps/misc.c rename to base/applications/rapps/misc.c diff --git a/reactos/base/applications/rapps/parser.c b/base/applications/rapps/parser.c similarity index 100% rename from reactos/base/applications/rapps/parser.c rename to base/applications/rapps/parser.c diff --git a/reactos/base/applications/rapps/rapps.h b/base/applications/rapps/rapps.h similarity index 100% rename from reactos/base/applications/rapps/rapps.h rename to base/applications/rapps/rapps.h diff --git a/reactos/base/applications/rapps/rapps.rbuild b/base/applications/rapps/rapps.rbuild similarity index 100% rename from reactos/base/applications/rapps/rapps.rbuild rename to base/applications/rapps/rapps.rbuild diff --git a/reactos/base/applications/rapps/rapps.rc b/base/applications/rapps/rapps.rc similarity index 100% rename from reactos/base/applications/rapps/rapps.rc rename to base/applications/rapps/rapps.rc diff --git a/reactos/base/applications/rapps/rapps/7zip.txt b/base/applications/rapps/rapps/7zip.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/7zip.txt rename to base/applications/rapps/rapps/7zip.txt diff --git a/reactos/base/applications/rapps/rapps/abiword.txt b/base/applications/rapps/rapps/abiword.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/abiword.txt rename to base/applications/rapps/rapps/abiword.txt diff --git a/reactos/base/applications/rapps/rapps/abiword28x.txt b/base/applications/rapps/rapps/abiword28x.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/abiword28x.txt rename to base/applications/rapps/rapps/abiword28x.txt diff --git a/reactos/base/applications/rapps/rapps/abyss.txt b/base/applications/rapps/rapps/abyss.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/abyss.txt rename to base/applications/rapps/rapps/abyss.txt diff --git a/reactos/base/applications/rapps/rapps/ac97forvirtualbox.txt b/base/applications/rapps/rapps/ac97forvirtualbox.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/ac97forvirtualbox.txt rename to base/applications/rapps/rapps/ac97forvirtualbox.txt diff --git a/reactos/base/applications/rapps/rapps/audiograbber.txt b/base/applications/rapps/rapps/audiograbber.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/audiograbber.txt rename to base/applications/rapps/rapps/audiograbber.txt diff --git a/reactos/base/applications/rapps/rapps/bittorrent.txt b/base/applications/rapps/rapps/bittorrent.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/bittorrent.txt rename to base/applications/rapps/rapps/bittorrent.txt diff --git a/reactos/base/applications/rapps/rapps/comctl32ocx.txt b/base/applications/rapps/rapps/comctl32ocx.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/comctl32ocx.txt rename to base/applications/rapps/rapps/comctl32ocx.txt diff --git a/reactos/base/applications/rapps/rapps/diablo2.txt b/base/applications/rapps/rapps/diablo2.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/diablo2.txt rename to base/applications/rapps/rapps/diablo2.txt diff --git a/reactos/base/applications/rapps/rapps/dosblaster.txt b/base/applications/rapps/rapps/dosblaster.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/dosblaster.txt rename to base/applications/rapps/rapps/dosblaster.txt diff --git a/reactos/base/applications/rapps/rapps/dosbox.txt b/base/applications/rapps/rapps/dosbox.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/dosbox.txt rename to base/applications/rapps/rapps/dosbox.txt diff --git a/reactos/base/applications/rapps/rapps/doublecommander.txt b/base/applications/rapps/rapps/doublecommander.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/doublecommander.txt rename to base/applications/rapps/rapps/doublecommander.txt diff --git a/reactos/base/applications/rapps/rapps/fap.txt b/base/applications/rapps/rapps/fap.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/fap.txt rename to base/applications/rapps/rapps/fap.txt diff --git a/reactos/base/applications/rapps/rapps/firefox2.txt b/base/applications/rapps/rapps/firefox2.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/firefox2.txt rename to base/applications/rapps/rapps/firefox2.txt diff --git a/reactos/base/applications/rapps/rapps/firefox3.txt b/base/applications/rapps/rapps/firefox3.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/firefox3.txt rename to base/applications/rapps/rapps/firefox3.txt diff --git a/reactos/base/applications/rapps/rapps/firefox36.txt b/base/applications/rapps/rapps/firefox36.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/firefox36.txt rename to base/applications/rapps/rapps/firefox36.txt diff --git a/reactos/base/applications/rapps/rapps/firefox5.txt b/base/applications/rapps/rapps/firefox5.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/firefox5.txt rename to base/applications/rapps/rapps/firefox5.txt diff --git a/reactos/base/applications/rapps/rapps/freebasic.txt b/base/applications/rapps/rapps/freebasic.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/freebasic.txt rename to base/applications/rapps/rapps/freebasic.txt diff --git a/reactos/base/applications/rapps/rapps/glidewrapzbag.txt b/base/applications/rapps/rapps/glidewrapzbag.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/glidewrapzbag.txt rename to base/applications/rapps/rapps/glidewrapzbag.txt diff --git a/reactos/base/applications/rapps/rapps/irfanview.txt b/base/applications/rapps/rapps/irfanview.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/irfanview.txt rename to base/applications/rapps/rapps/irfanview.txt diff --git a/reactos/base/applications/rapps/rapps/irfanviewplugins.txt b/base/applications/rapps/rapps/irfanviewplugins.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/irfanviewplugins.txt rename to base/applications/rapps/rapps/irfanviewplugins.txt diff --git a/reactos/base/applications/rapps/rapps/kdewin.txt b/base/applications/rapps/rapps/kdewin.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/kdewin.txt rename to base/applications/rapps/rapps/kdewin.txt diff --git a/reactos/base/applications/rapps/rapps/lbreakout2.txt b/base/applications/rapps/rapps/lbreakout2.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/lbreakout2.txt rename to base/applications/rapps/rapps/lbreakout2.txt diff --git a/reactos/base/applications/rapps/rapps/lgeneral.txt b/base/applications/rapps/rapps/lgeneral.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/lgeneral.txt rename to base/applications/rapps/rapps/lgeneral.txt diff --git a/reactos/base/applications/rapps/rapps/libreoffice.txt b/base/applications/rapps/rapps/libreoffice.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/libreoffice.txt rename to base/applications/rapps/rapps/libreoffice.txt diff --git a/reactos/base/applications/rapps/rapps/lmarbles.txt b/base/applications/rapps/rapps/lmarbles.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/lmarbles.txt rename to base/applications/rapps/rapps/lmarbles.txt diff --git a/reactos/base/applications/rapps/rapps/mfc40.txt b/base/applications/rapps/rapps/mfc40.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/mfc40.txt rename to base/applications/rapps/rapps/mfc40.txt diff --git a/reactos/base/applications/rapps/rapps/mingw.txt b/base/applications/rapps/rapps/mingw.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/mingw.txt rename to base/applications/rapps/rapps/mingw.txt diff --git a/reactos/base/applications/rapps/rapps/mirandaim.txt b/base/applications/rapps/rapps/mirandaim.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/mirandaim.txt rename to base/applications/rapps/rapps/mirandaim.txt diff --git a/reactos/base/applications/rapps/rapps/mirc.txt b/base/applications/rapps/rapps/mirc.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/mirc.txt rename to base/applications/rapps/rapps/mirc.txt diff --git a/reactos/base/applications/rapps/rapps/mirc6.txt b/base/applications/rapps/rapps/mirc6.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/mirc6.txt rename to base/applications/rapps/rapps/mirc6.txt diff --git a/reactos/base/applications/rapps/rapps/mono2.txt b/base/applications/rapps/rapps/mono2.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/mono2.txt rename to base/applications/rapps/rapps/mono2.txt diff --git a/reactos/base/applications/rapps/rapps/mpc.txt b/base/applications/rapps/rapps/mpc.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/mpc.txt rename to base/applications/rapps/rapps/mpc.txt diff --git a/reactos/base/applications/rapps/rapps/msxml3.txt b/base/applications/rapps/rapps/msxml3.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/msxml3.txt rename to base/applications/rapps/rapps/msxml3.txt diff --git a/reactos/base/applications/rapps/rapps/net11.txt b/base/applications/rapps/rapps/net11.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/net11.txt rename to base/applications/rapps/rapps/net11.txt diff --git a/reactos/base/applications/rapps/rapps/net20.txt b/base/applications/rapps/rapps/net20.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/net20.txt rename to base/applications/rapps/rapps/net20.txt diff --git a/reactos/base/applications/rapps/rapps/net20sp2.txt b/base/applications/rapps/rapps/net20sp2.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/net20sp2.txt rename to base/applications/rapps/rapps/net20sp2.txt diff --git a/reactos/base/applications/rapps/rapps/offbyone.txt b/base/applications/rapps/rapps/offbyone.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/offbyone.txt rename to base/applications/rapps/rapps/offbyone.txt diff --git a/reactos/base/applications/rapps/rapps/openoffice2.4.txt b/base/applications/rapps/rapps/openoffice2.4.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/openoffice2.4.txt rename to base/applications/rapps/rapps/openoffice2.4.txt diff --git a/reactos/base/applications/rapps/rapps/openoffice3.0.txt b/base/applications/rapps/rapps/openoffice3.0.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/openoffice3.0.txt rename to base/applications/rapps/rapps/openoffice3.0.txt diff --git a/reactos/base/applications/rapps/rapps/openttd.txt b/base/applications/rapps/rapps/openttd.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/openttd.txt rename to base/applications/rapps/rapps/openttd.txt diff --git a/reactos/base/applications/rapps/rapps/opera.txt b/base/applications/rapps/rapps/opera.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/opera.txt rename to base/applications/rapps/rapps/opera.txt diff --git a/reactos/base/applications/rapps/rapps/opera9.txt b/base/applications/rapps/rapps/opera9.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/opera9.txt rename to base/applications/rapps/rapps/opera9.txt diff --git a/reactos/base/applications/rapps/rapps/putty.txt b/base/applications/rapps/rapps/putty.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/putty.txt rename to base/applications/rapps/rapps/putty.txt diff --git a/reactos/base/applications/rapps/rapps/python.txt b/base/applications/rapps/rapps/python.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/python.txt rename to base/applications/rapps/rapps/python.txt diff --git a/reactos/base/applications/rapps/rapps/python3.txt b/base/applications/rapps/rapps/python3.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/python3.txt rename to base/applications/rapps/rapps/python3.txt diff --git a/reactos/base/applications/rapps/rapps/remood.txt b/base/applications/rapps/rapps/remood.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/remood.txt rename to base/applications/rapps/rapps/remood.txt diff --git a/reactos/base/applications/rapps/rapps/rosbe.txt b/base/applications/rapps/rapps/rosbe.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/rosbe.txt rename to base/applications/rapps/rapps/rosbe.txt diff --git a/reactos/base/applications/rapps/rapps/rosbeamd64.txt b/base/applications/rapps/rapps/rosbeamd64.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/rosbeamd64.txt rename to base/applications/rapps/rapps/rosbeamd64.txt diff --git a/reactos/base/applications/rapps/rapps/rosbearm.txt b/base/applications/rapps/rapps/rosbearm.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/rosbearm.txt rename to base/applications/rapps/rapps/rosbearm.txt diff --git a/reactos/base/applications/rapps/rapps/sambatng.txt b/base/applications/rapps/rapps/sambatng.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/sambatng.txt rename to base/applications/rapps/rapps/sambatng.txt diff --git a/reactos/base/applications/rapps/rapps/sbforvmware.txt b/base/applications/rapps/rapps/sbforvmware.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/sbforvmware.txt rename to base/applications/rapps/rapps/sbforvmware.txt diff --git a/reactos/base/applications/rapps/rapps/scite.txt b/base/applications/rapps/rapps/scite.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/scite.txt rename to base/applications/rapps/rapps/scite.txt diff --git a/reactos/base/applications/rapps/rapps/scummvm.txt b/base/applications/rapps/rapps/scummvm.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/scummvm.txt rename to base/applications/rapps/rapps/scummvm.txt diff --git a/reactos/base/applications/rapps/rapps/sdl_mixer.txt b/base/applications/rapps/rapps/sdl_mixer.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/sdl_mixer.txt rename to base/applications/rapps/rapps/sdl_mixer.txt diff --git a/reactos/base/applications/rapps/rapps/sdl_runtime.txt b/base/applications/rapps/rapps/sdl_runtime.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/sdl_runtime.txt rename to base/applications/rapps/rapps/sdl_runtime.txt diff --git a/reactos/base/applications/rapps/rapps/seamonkey.txt b/base/applications/rapps/rapps/seamonkey.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/seamonkey.txt rename to base/applications/rapps/rapps/seamonkey.txt diff --git a/reactos/base/applications/rapps/rapps/smplayer.txt b/base/applications/rapps/rapps/smplayer.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/smplayer.txt rename to base/applications/rapps/rapps/smplayer.txt diff --git a/reactos/base/applications/rapps/rapps/steam.txt b/base/applications/rapps/rapps/steam.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/steam.txt rename to base/applications/rapps/rapps/steam.txt diff --git a/reactos/base/applications/rapps/rapps/sumatrapdf.txt b/base/applications/rapps/rapps/sumatrapdf.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/sumatrapdf.txt rename to base/applications/rapps/rapps/sumatrapdf.txt diff --git a/reactos/base/applications/rapps/rapps/superfinder.txt b/base/applications/rapps/rapps/superfinder.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/superfinder.txt rename to base/applications/rapps/rapps/superfinder.txt diff --git a/reactos/base/applications/rapps/rapps/tahoma.txt b/base/applications/rapps/rapps/tahoma.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/tahoma.txt rename to base/applications/rapps/rapps/tahoma.txt diff --git a/reactos/base/applications/rapps/rapps/thunderbird.txt b/base/applications/rapps/rapps/thunderbird.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/thunderbird.txt rename to base/applications/rapps/rapps/thunderbird.txt diff --git a/reactos/base/applications/rapps/rapps/thunderbird5.txt b/base/applications/rapps/rapps/thunderbird5.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/thunderbird5.txt rename to base/applications/rapps/rapps/thunderbird5.txt diff --git a/reactos/base/applications/rapps/rapps/tileworld.txt b/base/applications/rapps/rapps/tileworld.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/tileworld.txt rename to base/applications/rapps/rapps/tileworld.txt diff --git a/reactos/base/applications/rapps/rapps/tuxpaint.txt b/base/applications/rapps/rapps/tuxpaint.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/tuxpaint.txt rename to base/applications/rapps/rapps/tuxpaint.txt diff --git a/reactos/base/applications/rapps/rapps/ultravnc.txt b/base/applications/rapps/rapps/ultravnc.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/ultravnc.txt rename to base/applications/rapps/rapps/ultravnc.txt diff --git a/reactos/base/applications/rapps/rapps/utorrent.txt b/base/applications/rapps/rapps/utorrent.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/utorrent.txt rename to base/applications/rapps/rapps/utorrent.txt diff --git a/reactos/base/applications/rapps/rapps/vb5run.txt b/base/applications/rapps/rapps/vb5run.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/vb5run.txt rename to base/applications/rapps/rapps/vb5run.txt diff --git a/reactos/base/applications/rapps/rapps/vb6run.txt b/base/applications/rapps/rapps/vb6run.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/vb6run.txt rename to base/applications/rapps/rapps/vb6run.txt diff --git a/reactos/base/applications/rapps/rapps/vc2005sp1run.txt b/base/applications/rapps/rapps/vc2005sp1run.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/vc2005sp1run.txt rename to base/applications/rapps/rapps/vc2005sp1run.txt diff --git a/reactos/base/applications/rapps/rapps/vc2008sp1run.txt b/base/applications/rapps/rapps/vc2008sp1run.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/vc2008sp1run.txt rename to base/applications/rapps/rapps/vc2008sp1run.txt diff --git a/reactos/base/applications/rapps/rapps/vc6run.txt b/base/applications/rapps/rapps/vc6run.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/vc6run.txt rename to base/applications/rapps/rapps/vc6run.txt diff --git a/reactos/base/applications/rapps/rapps/vlc.txt b/base/applications/rapps/rapps/vlc.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/vlc.txt rename to base/applications/rapps/rapps/vlc.txt diff --git a/reactos/base/applications/rapps/rapps/winboard.txt b/base/applications/rapps/rapps/winboard.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/winboard.txt rename to base/applications/rapps/rapps/winboard.txt diff --git a/reactos/base/applications/rapps/rapps/wme9.txt b/base/applications/rapps/rapps/wme9.txt similarity index 100% rename from reactos/base/applications/rapps/rapps/wme9.txt rename to base/applications/rapps/rapps/wme9.txt diff --git a/reactos/base/applications/rapps/rappsmsg.mc b/base/applications/rapps/rappsmsg.mc similarity index 100% rename from reactos/base/applications/rapps/rappsmsg.mc rename to base/applications/rapps/rappsmsg.mc diff --git a/reactos/base/applications/rapps/res/apps.ico b/base/applications/rapps/res/apps.ico similarity index 100% rename from reactos/base/applications/rapps/res/apps.ico rename to base/applications/rapps/res/apps.ico diff --git a/reactos/base/applications/rapps/res/appupd.ico b/base/applications/rapps/res/appupd.ico similarity index 100% rename from reactos/base/applications/rapps/res/appupd.ico rename to base/applications/rapps/res/appupd.ico diff --git a/reactos/base/applications/rapps/res/cat.ico b/base/applications/rapps/res/cat.ico similarity index 100% rename from reactos/base/applications/rapps/res/cat.ico rename to base/applications/rapps/res/cat.ico diff --git a/reactos/base/applications/rapps/res/cats/audio.ico b/base/applications/rapps/res/cats/audio.ico similarity index 100% rename from reactos/base/applications/rapps/res/cats/audio.ico rename to base/applications/rapps/res/cats/audio.ico diff --git a/reactos/base/applications/rapps/res/cats/devel.ico b/base/applications/rapps/res/cats/devel.ico similarity index 100% rename from reactos/base/applications/rapps/res/cats/devel.ico rename to base/applications/rapps/res/cats/devel.ico diff --git a/reactos/base/applications/rapps/res/cats/drivers.ico b/base/applications/rapps/res/cats/drivers.ico similarity index 100% rename from reactos/base/applications/rapps/res/cats/drivers.ico rename to base/applications/rapps/res/cats/drivers.ico diff --git a/reactos/base/applications/rapps/res/cats/edu.ico b/base/applications/rapps/res/cats/edu.ico similarity index 100% rename from reactos/base/applications/rapps/res/cats/edu.ico rename to base/applications/rapps/res/cats/edu.ico diff --git a/reactos/base/applications/rapps/res/cats/engineer.ico b/base/applications/rapps/res/cats/engineer.ico similarity index 100% rename from reactos/base/applications/rapps/res/cats/engineer.ico rename to base/applications/rapps/res/cats/engineer.ico diff --git a/reactos/base/applications/rapps/res/cats/finance.ico b/base/applications/rapps/res/cats/finance.ico similarity index 100% rename from reactos/base/applications/rapps/res/cats/finance.ico rename to base/applications/rapps/res/cats/finance.ico diff --git a/reactos/base/applications/rapps/res/cats/games.ico b/base/applications/rapps/res/cats/games.ico similarity index 100% rename from reactos/base/applications/rapps/res/cats/games.ico rename to base/applications/rapps/res/cats/games.ico diff --git a/reactos/base/applications/rapps/res/cats/graphics.ico b/base/applications/rapps/res/cats/graphics.ico similarity index 100% rename from reactos/base/applications/rapps/res/cats/graphics.ico rename to base/applications/rapps/res/cats/graphics.ico diff --git a/reactos/base/applications/rapps/res/cats/internet.ico b/base/applications/rapps/res/cats/internet.ico similarity index 100% rename from reactos/base/applications/rapps/res/cats/internet.ico rename to base/applications/rapps/res/cats/internet.ico diff --git a/reactos/base/applications/rapps/res/cats/libs.ico b/base/applications/rapps/res/cats/libs.ico similarity index 100% rename from reactos/base/applications/rapps/res/cats/libs.ico rename to base/applications/rapps/res/cats/libs.ico diff --git a/reactos/base/applications/rapps/res/cats/office.ico b/base/applications/rapps/res/cats/office.ico similarity index 100% rename from reactos/base/applications/rapps/res/cats/office.ico rename to base/applications/rapps/res/cats/office.ico diff --git a/reactos/base/applications/rapps/res/cats/other.ico b/base/applications/rapps/res/cats/other.ico similarity index 100% rename from reactos/base/applications/rapps/res/cats/other.ico rename to base/applications/rapps/res/cats/other.ico diff --git a/reactos/base/applications/rapps/res/cats/science.ico b/base/applications/rapps/res/cats/science.ico similarity index 100% rename from reactos/base/applications/rapps/res/cats/science.ico rename to base/applications/rapps/res/cats/science.ico diff --git a/reactos/base/applications/rapps/res/cats/tools.ico b/base/applications/rapps/res/cats/tools.ico similarity index 100% rename from reactos/base/applications/rapps/res/cats/tools.ico rename to base/applications/rapps/res/cats/tools.ico diff --git a/reactos/base/applications/rapps/res/cats/video.ico b/base/applications/rapps/res/cats/video.ico similarity index 100% rename from reactos/base/applications/rapps/res/cats/video.ico rename to base/applications/rapps/res/cats/video.ico diff --git a/reactos/base/applications/rapps/res/exit.ico b/base/applications/rapps/res/exit.ico similarity index 100% rename from reactos/base/applications/rapps/res/exit.ico rename to base/applications/rapps/res/exit.ico diff --git a/reactos/base/applications/rapps/res/install.ico b/base/applications/rapps/res/install.ico similarity index 100% rename from reactos/base/applications/rapps/res/install.ico rename to base/applications/rapps/res/install.ico diff --git a/reactos/base/applications/rapps/res/main.ico b/base/applications/rapps/res/main.ico similarity index 100% rename from reactos/base/applications/rapps/res/main.ico rename to base/applications/rapps/res/main.ico diff --git a/reactos/base/applications/rapps/res/modify.ico b/base/applications/rapps/res/modify.ico similarity index 100% rename from reactos/base/applications/rapps/res/modify.ico rename to base/applications/rapps/res/modify.ico diff --git a/reactos/base/applications/rapps/res/refresh.ico b/base/applications/rapps/res/refresh.ico similarity index 100% rename from reactos/base/applications/rapps/res/refresh.ico rename to base/applications/rapps/res/refresh.ico diff --git a/reactos/base/applications/rapps/res/settings.ico b/base/applications/rapps/res/settings.ico similarity index 100% rename from reactos/base/applications/rapps/res/settings.ico rename to base/applications/rapps/res/settings.ico diff --git a/reactos/base/applications/rapps/res/uninstall.ico b/base/applications/rapps/res/uninstall.ico similarity index 100% rename from reactos/base/applications/rapps/res/uninstall.ico rename to base/applications/rapps/res/uninstall.ico diff --git a/reactos/base/applications/rapps/resource.h b/base/applications/rapps/resource.h similarity index 100% rename from reactos/base/applications/rapps/resource.h rename to base/applications/rapps/resource.h diff --git a/reactos/base/applications/rapps/richedit.c b/base/applications/rapps/richedit.c similarity index 100% rename from reactos/base/applications/rapps/richedit.c rename to base/applications/rapps/richedit.c diff --git a/reactos/base/applications/rapps/rsrc.rc b/base/applications/rapps/rsrc.rc similarity index 100% rename from reactos/base/applications/rapps/rsrc.rc rename to base/applications/rapps/rsrc.rc diff --git a/reactos/base/applications/rapps/settingsdlg.c b/base/applications/rapps/settingsdlg.c similarity index 100% rename from reactos/base/applications/rapps/settingsdlg.c rename to base/applications/rapps/settingsdlg.c diff --git a/reactos/base/applications/rapps/splitter.c b/base/applications/rapps/splitter.c similarity index 100% rename from reactos/base/applications/rapps/splitter.c rename to base/applications/rapps/splitter.c diff --git a/reactos/base/applications/rapps/statusbar.c b/base/applications/rapps/statusbar.c similarity index 100% rename from reactos/base/applications/rapps/statusbar.c rename to base/applications/rapps/statusbar.c diff --git a/reactos/base/applications/rapps/toolbar.c b/base/applications/rapps/toolbar.c similarity index 100% rename from reactos/base/applications/rapps/toolbar.c rename to base/applications/rapps/toolbar.c diff --git a/reactos/base/applications/rapps/treeview.c b/base/applications/rapps/treeview.c similarity index 100% rename from reactos/base/applications/rapps/treeview.c rename to base/applications/rapps/treeview.c diff --git a/reactos/base/applications/rapps/winmain.c b/base/applications/rapps/winmain.c similarity index 100% rename from reactos/base/applications/rapps/winmain.c rename to base/applications/rapps/winmain.c diff --git a/reactos/base/applications/regedit/CMakeLists.txt b/base/applications/regedit/CMakeLists.txt similarity index 100% rename from reactos/base/applications/regedit/CMakeLists.txt rename to base/applications/regedit/CMakeLists.txt diff --git a/reactos/base/applications/regedit/about.c b/base/applications/regedit/about.c similarity index 100% rename from reactos/base/applications/regedit/about.c rename to base/applications/regedit/about.c diff --git a/reactos/base/applications/regedit/childwnd.c b/base/applications/regedit/childwnd.c similarity index 100% rename from reactos/base/applications/regedit/childwnd.c rename to base/applications/regedit/childwnd.c diff --git a/reactos/base/applications/regedit/clb/CMakeLists.txt b/base/applications/regedit/clb/CMakeLists.txt similarity index 100% rename from reactos/base/applications/regedit/clb/CMakeLists.txt rename to base/applications/regedit/clb/CMakeLists.txt diff --git a/reactos/base/applications/regedit/clb/clb.c b/base/applications/regedit/clb/clb.c similarity index 100% rename from reactos/base/applications/regedit/clb/clb.c rename to base/applications/regedit/clb/clb.c diff --git a/reactos/base/applications/regedit/clb/clb.rbuild b/base/applications/regedit/clb/clb.rbuild similarity index 100% rename from reactos/base/applications/regedit/clb/clb.rbuild rename to base/applications/regedit/clb/clb.rbuild diff --git a/reactos/base/applications/regedit/clb/clb.rc b/base/applications/regedit/clb/clb.rc similarity index 100% rename from reactos/base/applications/regedit/clb/clb.rc rename to base/applications/regedit/clb/clb.rc diff --git a/reactos/base/applications/regedit/clb/clb.spec b/base/applications/regedit/clb/clb.spec similarity index 100% rename from reactos/base/applications/regedit/clb/clb.spec rename to base/applications/regedit/clb/clb.spec diff --git a/reactos/base/applications/regedit/clb/clbdll.h b/base/applications/regedit/clb/clbdll.h similarity index 100% rename from reactos/base/applications/regedit/clb/clbdll.h rename to base/applications/regedit/clb/clbdll.h diff --git a/reactos/base/applications/regedit/clb/lang/bg-BG.rc b/base/applications/regedit/clb/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/regedit/clb/lang/bg-BG.rc rename to base/applications/regedit/clb/lang/bg-BG.rc diff --git a/reactos/base/applications/regedit/clb/lang/de-DE.rc b/base/applications/regedit/clb/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/regedit/clb/lang/de-DE.rc rename to base/applications/regedit/clb/lang/de-DE.rc diff --git a/reactos/base/applications/regedit/clb/lang/el-GR.rc b/base/applications/regedit/clb/lang/el-GR.rc similarity index 100% rename from reactos/base/applications/regedit/clb/lang/el-GR.rc rename to base/applications/regedit/clb/lang/el-GR.rc diff --git a/reactos/base/applications/regedit/clb/lang/en-US.rc b/base/applications/regedit/clb/lang/en-US.rc similarity index 100% rename from reactos/base/applications/regedit/clb/lang/en-US.rc rename to base/applications/regedit/clb/lang/en-US.rc diff --git a/reactos/base/applications/regedit/clb/lang/es-ES.rc b/base/applications/regedit/clb/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/regedit/clb/lang/es-ES.rc rename to base/applications/regedit/clb/lang/es-ES.rc diff --git a/reactos/base/applications/regedit/clb/lang/fr-FR.rc b/base/applications/regedit/clb/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/regedit/clb/lang/fr-FR.rc rename to base/applications/regedit/clb/lang/fr-FR.rc diff --git a/reactos/base/applications/regedit/clb/lang/id-ID.rc b/base/applications/regedit/clb/lang/id-ID.rc similarity index 100% rename from reactos/base/applications/regedit/clb/lang/id-ID.rc rename to base/applications/regedit/clb/lang/id-ID.rc diff --git a/reactos/base/applications/regedit/clb/lang/it-IT.rc b/base/applications/regedit/clb/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/regedit/clb/lang/it-IT.rc rename to base/applications/regedit/clb/lang/it-IT.rc diff --git a/reactos/base/applications/regedit/clb/lang/ja-JP.rc b/base/applications/regedit/clb/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/regedit/clb/lang/ja-JP.rc rename to base/applications/regedit/clb/lang/ja-JP.rc diff --git a/reactos/base/applications/regedit/clb/lang/no-NO.rc b/base/applications/regedit/clb/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/regedit/clb/lang/no-NO.rc rename to base/applications/regedit/clb/lang/no-NO.rc diff --git a/reactos/base/applications/regedit/clb/lang/pl-PL.rc b/base/applications/regedit/clb/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/regedit/clb/lang/pl-PL.rc rename to base/applications/regedit/clb/lang/pl-PL.rc diff --git a/reactos/base/applications/regedit/clb/lang/ru-RU.rc b/base/applications/regedit/clb/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/regedit/clb/lang/ru-RU.rc rename to base/applications/regedit/clb/lang/ru-RU.rc diff --git a/reactos/base/applications/regedit/clb/lang/sk-SK.rc b/base/applications/regedit/clb/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/regedit/clb/lang/sk-SK.rc rename to base/applications/regedit/clb/lang/sk-SK.rc diff --git a/reactos/base/applications/regedit/clb/lang/th-TH.rc b/base/applications/regedit/clb/lang/th-TH.rc similarity index 100% rename from reactos/base/applications/regedit/clb/lang/th-TH.rc rename to base/applications/regedit/clb/lang/th-TH.rc diff --git a/reactos/base/applications/regedit/clb/lang/uk-UA.rc b/base/applications/regedit/clb/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/regedit/clb/lang/uk-UA.rc rename to base/applications/regedit/clb/lang/uk-UA.rc diff --git a/reactos/base/applications/regedit/clb/precomp.h b/base/applications/regedit/clb/precomp.h similarity index 100% rename from reactos/base/applications/regedit/clb/precomp.h rename to base/applications/regedit/clb/precomp.h diff --git a/reactos/base/applications/regedit/clb/resource.h b/base/applications/regedit/clb/resource.h similarity index 100% rename from reactos/base/applications/regedit/clb/resource.h rename to base/applications/regedit/clb/resource.h diff --git a/reactos/base/applications/regedit/clb/rsrc.rc b/base/applications/regedit/clb/rsrc.rc similarity index 100% rename from reactos/base/applications/regedit/clb/rsrc.rc rename to base/applications/regedit/clb/rsrc.rc diff --git a/reactos/base/applications/regedit/edit.c b/base/applications/regedit/edit.c similarity index 100% rename from reactos/base/applications/regedit/edit.c rename to base/applications/regedit/edit.c diff --git a/reactos/base/applications/regedit/error.c b/base/applications/regedit/error.c similarity index 100% rename from reactos/base/applications/regedit/error.c rename to base/applications/regedit/error.c diff --git a/reactos/base/applications/regedit/find.c b/base/applications/regedit/find.c similarity index 100% rename from reactos/base/applications/regedit/find.c rename to base/applications/regedit/find.c diff --git a/reactos/base/applications/regedit/framewnd.c b/base/applications/regedit/framewnd.c similarity index 100% rename from reactos/base/applications/regedit/framewnd.c rename to base/applications/regedit/framewnd.c diff --git a/reactos/base/applications/regedit/hexedit.c b/base/applications/regedit/hexedit.c similarity index 100% rename from reactos/base/applications/regedit/hexedit.c rename to base/applications/regedit/hexedit.c diff --git a/reactos/base/applications/regedit/hexedit.h b/base/applications/regedit/hexedit.h similarity index 100% rename from reactos/base/applications/regedit/hexedit.h rename to base/applications/regedit/hexedit.h diff --git a/reactos/base/applications/regedit/lang/bg-BG.rc b/base/applications/regedit/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/regedit/lang/bg-BG.rc rename to base/applications/regedit/lang/bg-BG.rc diff --git a/reactos/base/applications/regedit/lang/cs-CZ.rc b/base/applications/regedit/lang/cs-CZ.rc similarity index 100% rename from reactos/base/applications/regedit/lang/cs-CZ.rc rename to base/applications/regedit/lang/cs-CZ.rc diff --git a/reactos/base/applications/regedit/lang/de-DE.rc b/base/applications/regedit/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/regedit/lang/de-DE.rc rename to base/applications/regedit/lang/de-DE.rc diff --git a/reactos/base/applications/regedit/lang/el-GR.rc b/base/applications/regedit/lang/el-GR.rc similarity index 100% rename from reactos/base/applications/regedit/lang/el-GR.rc rename to base/applications/regedit/lang/el-GR.rc diff --git a/reactos/base/applications/regedit/lang/en-US.rc b/base/applications/regedit/lang/en-US.rc similarity index 100% rename from reactos/base/applications/regedit/lang/en-US.rc rename to base/applications/regedit/lang/en-US.rc diff --git a/reactos/base/applications/regedit/lang/es-ES.rc b/base/applications/regedit/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/regedit/lang/es-ES.rc rename to base/applications/regedit/lang/es-ES.rc diff --git a/reactos/base/applications/regedit/lang/fr-FR.rc b/base/applications/regedit/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/regedit/lang/fr-FR.rc rename to base/applications/regedit/lang/fr-FR.rc diff --git a/reactos/base/applications/regedit/lang/hu-HU.rc b/base/applications/regedit/lang/hu-HU.rc similarity index 100% rename from reactos/base/applications/regedit/lang/hu-HU.rc rename to base/applications/regedit/lang/hu-HU.rc diff --git a/reactos/base/applications/regedit/lang/id-ID.rc b/base/applications/regedit/lang/id-ID.rc similarity index 100% rename from reactos/base/applications/regedit/lang/id-ID.rc rename to base/applications/regedit/lang/id-ID.rc diff --git a/reactos/base/applications/regedit/lang/it-IT.rc b/base/applications/regedit/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/regedit/lang/it-IT.rc rename to base/applications/regedit/lang/it-IT.rc diff --git a/reactos/base/applications/regedit/lang/ja-JP.rc b/base/applications/regedit/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/regedit/lang/ja-JP.rc rename to base/applications/regedit/lang/ja-JP.rc diff --git a/reactos/base/applications/regedit/lang/ko-KR.rc b/base/applications/regedit/lang/ko-KR.rc similarity index 100% rename from reactos/base/applications/regedit/lang/ko-KR.rc rename to base/applications/regedit/lang/ko-KR.rc diff --git a/reactos/base/applications/regedit/lang/nl-NL.rc b/base/applications/regedit/lang/nl-NL.rc similarity index 100% rename from reactos/base/applications/regedit/lang/nl-NL.rc rename to base/applications/regedit/lang/nl-NL.rc diff --git a/reactos/base/applications/regedit/lang/no-NO.rc b/base/applications/regedit/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/regedit/lang/no-NO.rc rename to base/applications/regedit/lang/no-NO.rc diff --git a/reactos/base/applications/regedit/lang/pl-PL.rc b/base/applications/regedit/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/regedit/lang/pl-PL.rc rename to base/applications/regedit/lang/pl-PL.rc diff --git a/reactos/base/applications/regedit/lang/pt-BR.rc b/base/applications/regedit/lang/pt-BR.rc similarity index 100% rename from reactos/base/applications/regedit/lang/pt-BR.rc rename to base/applications/regedit/lang/pt-BR.rc diff --git a/reactos/base/applications/regedit/lang/pt-PT.rc b/base/applications/regedit/lang/pt-PT.rc similarity index 100% rename from reactos/base/applications/regedit/lang/pt-PT.rc rename to base/applications/regedit/lang/pt-PT.rc diff --git a/reactos/base/applications/regedit/lang/ro-RO.rc b/base/applications/regedit/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/regedit/lang/ro-RO.rc rename to base/applications/regedit/lang/ro-RO.rc diff --git a/reactos/base/applications/regedit/lang/ru-RU.rc b/base/applications/regedit/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/regedit/lang/ru-RU.rc rename to base/applications/regedit/lang/ru-RU.rc diff --git a/reactos/base/applications/regedit/lang/sk-SK.rc b/base/applications/regedit/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/regedit/lang/sk-SK.rc rename to base/applications/regedit/lang/sk-SK.rc diff --git a/reactos/base/applications/regedit/lang/sl-SI.rc b/base/applications/regedit/lang/sl-SI.rc similarity index 100% rename from reactos/base/applications/regedit/lang/sl-SI.rc rename to base/applications/regedit/lang/sl-SI.rc diff --git a/reactos/base/applications/regedit/lang/sv-SE.rc b/base/applications/regedit/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/regedit/lang/sv-SE.rc rename to base/applications/regedit/lang/sv-SE.rc diff --git a/reactos/base/applications/regedit/lang/th-TH.rc b/base/applications/regedit/lang/th-TH.rc similarity index 100% rename from reactos/base/applications/regedit/lang/th-TH.rc rename to base/applications/regedit/lang/th-TH.rc diff --git a/reactos/base/applications/regedit/lang/uk-UA.rc b/base/applications/regedit/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/regedit/lang/uk-UA.rc rename to base/applications/regedit/lang/uk-UA.rc diff --git a/reactos/base/applications/regedit/lang/zh-CN.rc b/base/applications/regedit/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/regedit/lang/zh-CN.rc rename to base/applications/regedit/lang/zh-CN.rc diff --git a/reactos/base/applications/regedit/lang/zh-TW.rc b/base/applications/regedit/lang/zh-TW.rc similarity index 100% rename from reactos/base/applications/regedit/lang/zh-TW.rc rename to base/applications/regedit/lang/zh-TW.rc diff --git a/reactos/base/applications/regedit/listview.c b/base/applications/regedit/listview.c similarity index 100% rename from reactos/base/applications/regedit/listview.c rename to base/applications/regedit/listview.c diff --git a/reactos/base/applications/regedit/main.c b/base/applications/regedit/main.c similarity index 100% rename from reactos/base/applications/regedit/main.c rename to base/applications/regedit/main.c diff --git a/reactos/base/applications/regedit/main.h b/base/applications/regedit/main.h similarity index 100% rename from reactos/base/applications/regedit/main.h rename to base/applications/regedit/main.h diff --git a/reactos/base/applications/regedit/regedit.c b/base/applications/regedit/regedit.c similarity index 100% rename from reactos/base/applications/regedit/regedit.c rename to base/applications/regedit/regedit.c diff --git a/reactos/base/applications/regedit/regedit.h b/base/applications/regedit/regedit.h similarity index 100% rename from reactos/base/applications/regedit/regedit.h rename to base/applications/regedit/regedit.h diff --git a/reactos/base/applications/regedit/regedit.rbuild b/base/applications/regedit/regedit.rbuild similarity index 100% rename from reactos/base/applications/regedit/regedit.rbuild rename to base/applications/regedit/regedit.rbuild diff --git a/reactos/base/applications/regedit/regedit.rc b/base/applications/regedit/regedit.rc similarity index 100% rename from reactos/base/applications/regedit/regedit.rc rename to base/applications/regedit/regedit.rc diff --git a/reactos/base/applications/regedit/regproc.c b/base/applications/regedit/regproc.c similarity index 100% rename from reactos/base/applications/regedit/regproc.c rename to base/applications/regedit/regproc.c diff --git a/reactos/base/applications/regedit/regproc.h b/base/applications/regedit/regproc.h similarity index 100% rename from reactos/base/applications/regedit/regproc.h rename to base/applications/regedit/regproc.h diff --git a/reactos/base/applications/regedit/res/bin.ico b/base/applications/regedit/res/bin.ico similarity index 100% rename from reactos/base/applications/regedit/res/bin.ico rename to base/applications/regedit/res/bin.ico diff --git a/reactos/base/applications/regedit/res/computer.ico b/base/applications/regedit/res/computer.ico similarity index 100% rename from reactos/base/applications/regedit/res/computer.ico rename to base/applications/regedit/res/computer.ico diff --git a/reactos/base/applications/regedit/res/folder.ico b/base/applications/regedit/res/folder.ico similarity index 100% rename from reactos/base/applications/regedit/res/folder.ico rename to base/applications/regedit/res/folder.ico diff --git a/reactos/base/applications/regedit/res/folderopen.ico b/base/applications/regedit/res/folderopen.ico similarity index 100% rename from reactos/base/applications/regedit/res/folderopen.ico rename to base/applications/regedit/res/folderopen.ico diff --git a/reactos/base/applications/regedit/res/regedit.ico b/base/applications/regedit/res/regedit.ico similarity index 100% rename from reactos/base/applications/regedit/res/regedit.ico rename to base/applications/regedit/res/regedit.ico diff --git a/reactos/base/applications/regedit/res/regfile.ico b/base/applications/regedit/res/regfile.ico similarity index 100% rename from reactos/base/applications/regedit/res/regfile.ico rename to base/applications/regedit/res/regfile.ico diff --git a/reactos/base/applications/regedit/res/string.ico b/base/applications/regedit/res/string.ico similarity index 100% rename from reactos/base/applications/regedit/res/string.ico rename to base/applications/regedit/res/string.ico diff --git a/reactos/base/applications/regedit/resource.h b/base/applications/regedit/resource.h similarity index 100% rename from reactos/base/applications/regedit/resource.h rename to base/applications/regedit/resource.h diff --git a/reactos/base/applications/regedit/rsrc.rc b/base/applications/regedit/rsrc.rc similarity index 100% rename from reactos/base/applications/regedit/rsrc.rc rename to base/applications/regedit/rsrc.rc diff --git a/reactos/base/applications/regedit/security.c b/base/applications/regedit/security.c similarity index 100% rename from reactos/base/applications/regedit/security.c rename to base/applications/regedit/security.c diff --git a/reactos/base/applications/regedit/security.h b/base/applications/regedit/security.h similarity index 100% rename from reactos/base/applications/regedit/security.h rename to base/applications/regedit/security.h diff --git a/reactos/base/applications/regedit/treeview.c b/base/applications/regedit/treeview.c similarity index 100% rename from reactos/base/applications/regedit/treeview.c rename to base/applications/regedit/treeview.c diff --git a/reactos/base/applications/regedt32/CMakeLists.txt b/base/applications/regedt32/CMakeLists.txt similarity index 100% rename from reactos/base/applications/regedt32/CMakeLists.txt rename to base/applications/regedt32/CMakeLists.txt diff --git a/reactos/base/applications/regedt32/regedt32.c b/base/applications/regedt32/regedt32.c similarity index 100% rename from reactos/base/applications/regedt32/regedt32.c rename to base/applications/regedt32/regedt32.c diff --git a/reactos/base/applications/regedt32/regedt32.rbuild b/base/applications/regedt32/regedt32.rbuild similarity index 100% rename from reactos/base/applications/regedt32/regedt32.rbuild rename to base/applications/regedt32/regedt32.rbuild diff --git a/reactos/base/applications/regedt32/res/regedt32.ico b/base/applications/regedt32/res/regedt32.ico similarity index 100% rename from reactos/base/applications/regedt32/res/regedt32.ico rename to base/applications/regedt32/res/regedt32.ico diff --git a/reactos/base/applications/regedt32/resource.h b/base/applications/regedt32/resource.h similarity index 100% rename from reactos/base/applications/regedt32/resource.h rename to base/applications/regedt32/resource.h diff --git a/reactos/base/applications/regedt32/resource.rc b/base/applications/regedt32/resource.rc similarity index 100% rename from reactos/base/applications/regedt32/resource.rc rename to base/applications/regedt32/resource.rc diff --git a/reactos/base/applications/sc/CMakeLists.txt b/base/applications/sc/CMakeLists.txt similarity index 100% rename from reactos/base/applications/sc/CMakeLists.txt rename to base/applications/sc/CMakeLists.txt diff --git a/reactos/base/applications/sc/control.c b/base/applications/sc/control.c similarity index 100% rename from reactos/base/applications/sc/control.c rename to base/applications/sc/control.c diff --git a/reactos/base/applications/sc/create.c b/base/applications/sc/create.c similarity index 100% rename from reactos/base/applications/sc/create.c rename to base/applications/sc/create.c diff --git a/reactos/base/applications/sc/delete.c b/base/applications/sc/delete.c similarity index 100% rename from reactos/base/applications/sc/delete.c rename to base/applications/sc/delete.c diff --git a/reactos/base/applications/sc/print.c b/base/applications/sc/print.c similarity index 100% rename from reactos/base/applications/sc/print.c rename to base/applications/sc/print.c diff --git a/reactos/base/applications/sc/query.c b/base/applications/sc/query.c similarity index 100% rename from reactos/base/applications/sc/query.c rename to base/applications/sc/query.c diff --git a/reactos/base/applications/sc/sc.c b/base/applications/sc/sc.c similarity index 100% rename from reactos/base/applications/sc/sc.c rename to base/applications/sc/sc.c diff --git a/reactos/base/applications/sc/sc.h b/base/applications/sc/sc.h similarity index 100% rename from reactos/base/applications/sc/sc.h rename to base/applications/sc/sc.h diff --git a/reactos/base/applications/sc/sc.rbuild b/base/applications/sc/sc.rbuild similarity index 100% rename from reactos/base/applications/sc/sc.rbuild rename to base/applications/sc/sc.rbuild diff --git a/reactos/base/applications/sc/sc.rc b/base/applications/sc/sc.rc similarity index 100% rename from reactos/base/applications/sc/sc.rc rename to base/applications/sc/sc.rc diff --git a/reactos/base/applications/sc/start.c b/base/applications/sc/start.c similarity index 100% rename from reactos/base/applications/sc/start.c rename to base/applications/sc/start.c diff --git a/reactos/base/applications/sc/usage.c b/base/applications/sc/usage.c similarity index 100% rename from reactos/base/applications/sc/usage.c rename to base/applications/sc/usage.c diff --git a/reactos/base/applications/screensavers/3dtext/3dtext.c b/base/applications/screensavers/3dtext/3dtext.c similarity index 100% rename from reactos/base/applications/screensavers/3dtext/3dtext.c rename to base/applications/screensavers/3dtext/3dtext.c diff --git a/reactos/base/applications/screensavers/3dtext/3dtext.h b/base/applications/screensavers/3dtext/3dtext.h similarity index 100% rename from reactos/base/applications/screensavers/3dtext/3dtext.h rename to base/applications/screensavers/3dtext/3dtext.h diff --git a/reactos/base/applications/screensavers/3dtext/3dtext.rbuild b/base/applications/screensavers/3dtext/3dtext.rbuild similarity index 100% rename from reactos/base/applications/screensavers/3dtext/3dtext.rbuild rename to base/applications/screensavers/3dtext/3dtext.rbuild diff --git a/reactos/base/applications/screensavers/3dtext/CMakeLists.txt b/base/applications/screensavers/3dtext/CMakeLists.txt similarity index 100% rename from reactos/base/applications/screensavers/3dtext/CMakeLists.txt rename to base/applications/screensavers/3dtext/CMakeLists.txt diff --git a/reactos/base/applications/screensavers/3dtext/lang/bg-BG.rc b/base/applications/screensavers/3dtext/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/screensavers/3dtext/lang/bg-BG.rc rename to base/applications/screensavers/3dtext/lang/bg-BG.rc diff --git a/reactos/base/applications/screensavers/3dtext/lang/de-DE.rc b/base/applications/screensavers/3dtext/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/screensavers/3dtext/lang/de-DE.rc rename to base/applications/screensavers/3dtext/lang/de-DE.rc diff --git a/reactos/base/applications/screensavers/3dtext/lang/el-GR.rc b/base/applications/screensavers/3dtext/lang/el-GR.rc similarity index 100% rename from reactos/base/applications/screensavers/3dtext/lang/el-GR.rc rename to base/applications/screensavers/3dtext/lang/el-GR.rc diff --git a/reactos/base/applications/screensavers/3dtext/lang/en-US.rc b/base/applications/screensavers/3dtext/lang/en-US.rc similarity index 100% rename from reactos/base/applications/screensavers/3dtext/lang/en-US.rc rename to base/applications/screensavers/3dtext/lang/en-US.rc diff --git a/reactos/base/applications/screensavers/3dtext/lang/es-ES.rc b/base/applications/screensavers/3dtext/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/screensavers/3dtext/lang/es-ES.rc rename to base/applications/screensavers/3dtext/lang/es-ES.rc diff --git a/reactos/base/applications/screensavers/3dtext/lang/eu-ES.rc b/base/applications/screensavers/3dtext/lang/eu-ES.rc similarity index 100% rename from reactos/base/applications/screensavers/3dtext/lang/eu-ES.rc rename to base/applications/screensavers/3dtext/lang/eu-ES.rc diff --git a/reactos/base/applications/screensavers/3dtext/lang/fr-FR.rc b/base/applications/screensavers/3dtext/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/screensavers/3dtext/lang/fr-FR.rc rename to base/applications/screensavers/3dtext/lang/fr-FR.rc diff --git a/reactos/base/applications/screensavers/3dtext/lang/it-IT.rc b/base/applications/screensavers/3dtext/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/screensavers/3dtext/lang/it-IT.rc rename to base/applications/screensavers/3dtext/lang/it-IT.rc diff --git a/reactos/base/applications/screensavers/3dtext/lang/ja-JP.rc b/base/applications/screensavers/3dtext/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/screensavers/3dtext/lang/ja-JP.rc rename to base/applications/screensavers/3dtext/lang/ja-JP.rc diff --git a/reactos/base/applications/screensavers/3dtext/lang/ko-KR.rc b/base/applications/screensavers/3dtext/lang/ko-KR.rc similarity index 100% rename from reactos/base/applications/screensavers/3dtext/lang/ko-KR.rc rename to base/applications/screensavers/3dtext/lang/ko-KR.rc diff --git a/reactos/base/applications/screensavers/3dtext/lang/lt-LT.rc b/base/applications/screensavers/3dtext/lang/lt-LT.rc similarity index 100% rename from reactos/base/applications/screensavers/3dtext/lang/lt-LT.rc rename to base/applications/screensavers/3dtext/lang/lt-LT.rc diff --git a/reactos/base/applications/screensavers/3dtext/lang/no-NO.rc b/base/applications/screensavers/3dtext/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/screensavers/3dtext/lang/no-NO.rc rename to base/applications/screensavers/3dtext/lang/no-NO.rc diff --git a/reactos/base/applications/screensavers/3dtext/lang/pl-PL.rc b/base/applications/screensavers/3dtext/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/screensavers/3dtext/lang/pl-PL.rc rename to base/applications/screensavers/3dtext/lang/pl-PL.rc diff --git a/reactos/base/applications/screensavers/3dtext/lang/ro-RO.rc b/base/applications/screensavers/3dtext/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/screensavers/3dtext/lang/ro-RO.rc rename to base/applications/screensavers/3dtext/lang/ro-RO.rc diff --git a/reactos/base/applications/screensavers/3dtext/lang/ru-RU.rc b/base/applications/screensavers/3dtext/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/screensavers/3dtext/lang/ru-RU.rc rename to base/applications/screensavers/3dtext/lang/ru-RU.rc diff --git a/reactos/base/applications/screensavers/3dtext/lang/sk-SK.rc b/base/applications/screensavers/3dtext/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/screensavers/3dtext/lang/sk-SK.rc rename to base/applications/screensavers/3dtext/lang/sk-SK.rc diff --git a/reactos/base/applications/screensavers/3dtext/lang/sv-SE.rc b/base/applications/screensavers/3dtext/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/screensavers/3dtext/lang/sv-SE.rc rename to base/applications/screensavers/3dtext/lang/sv-SE.rc diff --git a/reactos/base/applications/screensavers/3dtext/lang/uk-UA.rc b/base/applications/screensavers/3dtext/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/screensavers/3dtext/lang/uk-UA.rc rename to base/applications/screensavers/3dtext/lang/uk-UA.rc diff --git a/reactos/base/applications/screensavers/3dtext/lang/zh-CN.rc b/base/applications/screensavers/3dtext/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/screensavers/3dtext/lang/zh-CN.rc rename to base/applications/screensavers/3dtext/lang/zh-CN.rc diff --git a/reactos/base/applications/screensavers/3dtext/lang/zh-TW.rc b/base/applications/screensavers/3dtext/lang/zh-TW.rc similarity index 100% rename from reactos/base/applications/screensavers/3dtext/lang/zh-TW.rc rename to base/applications/screensavers/3dtext/lang/zh-TW.rc diff --git a/reactos/base/applications/screensavers/3dtext/resource.h b/base/applications/screensavers/3dtext/resource.h similarity index 100% rename from reactos/base/applications/screensavers/3dtext/resource.h rename to base/applications/screensavers/3dtext/resource.h diff --git a/reactos/base/applications/screensavers/3dtext/rsrc.rc b/base/applications/screensavers/3dtext/rsrc.rc similarity index 100% rename from reactos/base/applications/screensavers/3dtext/rsrc.rc rename to base/applications/screensavers/3dtext/rsrc.rc diff --git a/reactos/base/applications/screensavers/3dtext/settings.c b/base/applications/screensavers/3dtext/settings.c similarity index 100% rename from reactos/base/applications/screensavers/3dtext/settings.c rename to base/applications/screensavers/3dtext/settings.c diff --git a/reactos/base/applications/screensavers/CMakeLists.txt b/base/applications/screensavers/CMakeLists.txt similarity index 100% rename from reactos/base/applications/screensavers/CMakeLists.txt rename to base/applications/screensavers/CMakeLists.txt diff --git a/reactos/base/applications/screensavers/logon/CMakeLists.txt b/base/applications/screensavers/logon/CMakeLists.txt similarity index 100% rename from reactos/base/applications/screensavers/logon/CMakeLists.txt rename to base/applications/screensavers/logon/CMakeLists.txt diff --git a/reactos/base/applications/screensavers/logon/lang/bg-BG.rc b/base/applications/screensavers/logon/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/screensavers/logon/lang/bg-BG.rc rename to base/applications/screensavers/logon/lang/bg-BG.rc diff --git a/reactos/base/applications/screensavers/logon/lang/de-DE.rc b/base/applications/screensavers/logon/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/screensavers/logon/lang/de-DE.rc rename to base/applications/screensavers/logon/lang/de-DE.rc diff --git a/reactos/base/applications/screensavers/logon/lang/el-GR.rc b/base/applications/screensavers/logon/lang/el-GR.rc similarity index 100% rename from reactos/base/applications/screensavers/logon/lang/el-GR.rc rename to base/applications/screensavers/logon/lang/el-GR.rc diff --git a/reactos/base/applications/screensavers/logon/lang/en-US.rc b/base/applications/screensavers/logon/lang/en-US.rc similarity index 100% rename from reactos/base/applications/screensavers/logon/lang/en-US.rc rename to base/applications/screensavers/logon/lang/en-US.rc diff --git a/reactos/base/applications/screensavers/logon/lang/es-ES.rc b/base/applications/screensavers/logon/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/screensavers/logon/lang/es-ES.rc rename to base/applications/screensavers/logon/lang/es-ES.rc diff --git a/reactos/base/applications/screensavers/logon/lang/eu-ES.rc b/base/applications/screensavers/logon/lang/eu-ES.rc similarity index 100% rename from reactos/base/applications/screensavers/logon/lang/eu-ES.rc rename to base/applications/screensavers/logon/lang/eu-ES.rc diff --git a/reactos/base/applications/screensavers/logon/lang/fr-FR.rc b/base/applications/screensavers/logon/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/screensavers/logon/lang/fr-FR.rc rename to base/applications/screensavers/logon/lang/fr-FR.rc diff --git a/reactos/base/applications/screensavers/logon/lang/it-IT.rc b/base/applications/screensavers/logon/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/screensavers/logon/lang/it-IT.rc rename to base/applications/screensavers/logon/lang/it-IT.rc diff --git a/reactos/base/applications/screensavers/logon/lang/ja-JP.rc b/base/applications/screensavers/logon/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/screensavers/logon/lang/ja-JP.rc rename to base/applications/screensavers/logon/lang/ja-JP.rc diff --git a/reactos/base/applications/screensavers/logon/lang/ko-KR.rc b/base/applications/screensavers/logon/lang/ko-KR.rc similarity index 100% rename from reactos/base/applications/screensavers/logon/lang/ko-KR.rc rename to base/applications/screensavers/logon/lang/ko-KR.rc diff --git a/reactos/base/applications/screensavers/logon/lang/lt-LT.rc b/base/applications/screensavers/logon/lang/lt-LT.rc similarity index 100% rename from reactos/base/applications/screensavers/logon/lang/lt-LT.rc rename to base/applications/screensavers/logon/lang/lt-LT.rc diff --git a/reactos/base/applications/screensavers/logon/lang/nl-NL.rc b/base/applications/screensavers/logon/lang/nl-NL.rc similarity index 100% rename from reactos/base/applications/screensavers/logon/lang/nl-NL.rc rename to base/applications/screensavers/logon/lang/nl-NL.rc diff --git a/reactos/base/applications/screensavers/logon/lang/no-NO.rc b/base/applications/screensavers/logon/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/screensavers/logon/lang/no-NO.rc rename to base/applications/screensavers/logon/lang/no-NO.rc diff --git a/reactos/base/applications/screensavers/logon/lang/pl-PL.rc b/base/applications/screensavers/logon/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/screensavers/logon/lang/pl-PL.rc rename to base/applications/screensavers/logon/lang/pl-PL.rc diff --git a/reactos/base/applications/screensavers/logon/lang/ro-RO.rc b/base/applications/screensavers/logon/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/screensavers/logon/lang/ro-RO.rc rename to base/applications/screensavers/logon/lang/ro-RO.rc diff --git a/reactos/base/applications/screensavers/logon/lang/ru-RU.rc b/base/applications/screensavers/logon/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/screensavers/logon/lang/ru-RU.rc rename to base/applications/screensavers/logon/lang/ru-RU.rc diff --git a/reactos/base/applications/screensavers/logon/lang/sk-SK.rc b/base/applications/screensavers/logon/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/screensavers/logon/lang/sk-SK.rc rename to base/applications/screensavers/logon/lang/sk-SK.rc diff --git a/reactos/base/applications/screensavers/logon/lang/sv-SE.rc b/base/applications/screensavers/logon/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/screensavers/logon/lang/sv-SE.rc rename to base/applications/screensavers/logon/lang/sv-SE.rc diff --git a/reactos/base/applications/screensavers/logon/lang/uk-UA.rc b/base/applications/screensavers/logon/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/screensavers/logon/lang/uk-UA.rc rename to base/applications/screensavers/logon/lang/uk-UA.rc diff --git a/reactos/base/applications/screensavers/logon/lang/zh-CN.rc b/base/applications/screensavers/logon/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/screensavers/logon/lang/zh-CN.rc rename to base/applications/screensavers/logon/lang/zh-CN.rc diff --git a/reactos/base/applications/screensavers/logon/lang/zh-TW.rc b/base/applications/screensavers/logon/lang/zh-TW.rc similarity index 100% rename from reactos/base/applications/screensavers/logon/lang/zh-TW.rc rename to base/applications/screensavers/logon/lang/zh-TW.rc diff --git a/reactos/base/applications/screensavers/logon/logon.c b/base/applications/screensavers/logon/logon.c similarity index 100% rename from reactos/base/applications/screensavers/logon/logon.c rename to base/applications/screensavers/logon/logon.c diff --git a/reactos/base/applications/screensavers/logon/logon.rbuild b/base/applications/screensavers/logon/logon.rbuild similarity index 100% rename from reactos/base/applications/screensavers/logon/logon.rbuild rename to base/applications/screensavers/logon/logon.rbuild diff --git a/reactos/base/applications/screensavers/logon/logon.rc b/base/applications/screensavers/logon/logon.rc similarity index 100% rename from reactos/base/applications/screensavers/logon/logon.rc rename to base/applications/screensavers/logon/logon.rc diff --git a/reactos/base/applications/screensavers/logon/res/0.bmp b/base/applications/screensavers/logon/res/0.bmp similarity index 100% rename from reactos/base/applications/screensavers/logon/res/0.bmp rename to base/applications/screensavers/logon/res/0.bmp diff --git a/reactos/base/applications/screensavers/logon/res/1.bmp b/base/applications/screensavers/logon/res/1.bmp similarity index 100% rename from reactos/base/applications/screensavers/logon/res/1.bmp rename to base/applications/screensavers/logon/res/1.bmp diff --git a/reactos/base/applications/screensavers/logon/resource.h b/base/applications/screensavers/logon/resource.h similarity index 100% rename from reactos/base/applications/screensavers/logon/resource.h rename to base/applications/screensavers/logon/resource.h diff --git a/reactos/base/applications/screensavers/screensavers.rbuild b/base/applications/screensavers/screensavers.rbuild similarity index 100% rename from reactos/base/applications/screensavers/screensavers.rbuild rename to base/applications/screensavers/screensavers.rbuild diff --git a/reactos/base/applications/shutdown/CMakeLists.txt b/base/applications/shutdown/CMakeLists.txt similarity index 100% rename from reactos/base/applications/shutdown/CMakeLists.txt rename to base/applications/shutdown/CMakeLists.txt diff --git a/reactos/base/applications/shutdown/lang/bg-BG.rc b/base/applications/shutdown/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/shutdown/lang/bg-BG.rc rename to base/applications/shutdown/lang/bg-BG.rc diff --git a/reactos/base/applications/shutdown/lang/de-DE.rc b/base/applications/shutdown/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/shutdown/lang/de-DE.rc rename to base/applications/shutdown/lang/de-DE.rc diff --git a/reactos/base/applications/shutdown/lang/el-GR.rc b/base/applications/shutdown/lang/el-GR.rc similarity index 100% rename from reactos/base/applications/shutdown/lang/el-GR.rc rename to base/applications/shutdown/lang/el-GR.rc diff --git a/reactos/base/applications/shutdown/lang/en-US.rc b/base/applications/shutdown/lang/en-US.rc similarity index 100% rename from reactos/base/applications/shutdown/lang/en-US.rc rename to base/applications/shutdown/lang/en-US.rc diff --git a/reactos/base/applications/shutdown/lang/es-ES.rc b/base/applications/shutdown/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/shutdown/lang/es-ES.rc rename to base/applications/shutdown/lang/es-ES.rc diff --git a/reactos/base/applications/shutdown/lang/fr-FR.rc b/base/applications/shutdown/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/shutdown/lang/fr-FR.rc rename to base/applications/shutdown/lang/fr-FR.rc diff --git a/reactos/base/applications/shutdown/lang/it-IT.rc b/base/applications/shutdown/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/shutdown/lang/it-IT.rc rename to base/applications/shutdown/lang/it-IT.rc diff --git a/reactos/base/applications/shutdown/lang/ja-JP.rc b/base/applications/shutdown/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/shutdown/lang/ja-JP.rc rename to base/applications/shutdown/lang/ja-JP.rc diff --git a/reactos/base/applications/shutdown/lang/ko-KR.rc b/base/applications/shutdown/lang/ko-KR.rc similarity index 100% rename from reactos/base/applications/shutdown/lang/ko-KR.rc rename to base/applications/shutdown/lang/ko-KR.rc diff --git a/reactos/base/applications/shutdown/lang/lt-LT.rc b/base/applications/shutdown/lang/lt-LT.rc similarity index 100% rename from reactos/base/applications/shutdown/lang/lt-LT.rc rename to base/applications/shutdown/lang/lt-LT.rc diff --git a/reactos/base/applications/shutdown/lang/nl-NL.rc b/base/applications/shutdown/lang/nl-NL.rc similarity index 100% rename from reactos/base/applications/shutdown/lang/nl-NL.rc rename to base/applications/shutdown/lang/nl-NL.rc diff --git a/reactos/base/applications/shutdown/lang/no-NO.rc b/base/applications/shutdown/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/shutdown/lang/no-NO.rc rename to base/applications/shutdown/lang/no-NO.rc diff --git a/reactos/base/applications/shutdown/lang/pl-PL.rc b/base/applications/shutdown/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/shutdown/lang/pl-PL.rc rename to base/applications/shutdown/lang/pl-PL.rc diff --git a/reactos/base/applications/shutdown/lang/pt-BR.rc b/base/applications/shutdown/lang/pt-BR.rc similarity index 100% rename from reactos/base/applications/shutdown/lang/pt-BR.rc rename to base/applications/shutdown/lang/pt-BR.rc diff --git a/reactos/base/applications/shutdown/lang/ro-RO.rc b/base/applications/shutdown/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/shutdown/lang/ro-RO.rc rename to base/applications/shutdown/lang/ro-RO.rc diff --git a/reactos/base/applications/shutdown/lang/ru-RU.rc b/base/applications/shutdown/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/shutdown/lang/ru-RU.rc rename to base/applications/shutdown/lang/ru-RU.rc diff --git a/reactos/base/applications/shutdown/lang/sk-SK.rc b/base/applications/shutdown/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/shutdown/lang/sk-SK.rc rename to base/applications/shutdown/lang/sk-SK.rc diff --git a/reactos/base/applications/shutdown/lang/sv-SE.rc b/base/applications/shutdown/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/shutdown/lang/sv-SE.rc rename to base/applications/shutdown/lang/sv-SE.rc diff --git a/reactos/base/applications/shutdown/lang/uk-UA.rc b/base/applications/shutdown/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/shutdown/lang/uk-UA.rc rename to base/applications/shutdown/lang/uk-UA.rc diff --git a/reactos/base/applications/shutdown/lang/zh-CN.rc b/base/applications/shutdown/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/shutdown/lang/zh-CN.rc rename to base/applications/shutdown/lang/zh-CN.rc diff --git a/reactos/base/applications/shutdown/lang/zh-TW.rc b/base/applications/shutdown/lang/zh-TW.rc similarity index 100% rename from reactos/base/applications/shutdown/lang/zh-TW.rc rename to base/applications/shutdown/lang/zh-TW.rc diff --git a/reactos/base/applications/shutdown/misc.c b/base/applications/shutdown/misc.c similarity index 100% rename from reactos/base/applications/shutdown/misc.c rename to base/applications/shutdown/misc.c diff --git a/reactos/base/applications/shutdown/precomp.h b/base/applications/shutdown/precomp.h similarity index 100% rename from reactos/base/applications/shutdown/precomp.h rename to base/applications/shutdown/precomp.h diff --git a/reactos/base/applications/shutdown/resource.h b/base/applications/shutdown/resource.h similarity index 100% rename from reactos/base/applications/shutdown/resource.h rename to base/applications/shutdown/resource.h diff --git a/reactos/base/applications/shutdown/rsrc.rc b/base/applications/shutdown/rsrc.rc similarity index 100% rename from reactos/base/applications/shutdown/rsrc.rc rename to base/applications/shutdown/rsrc.rc diff --git a/reactos/base/applications/shutdown/shutdown.c b/base/applications/shutdown/shutdown.c similarity index 100% rename from reactos/base/applications/shutdown/shutdown.c rename to base/applications/shutdown/shutdown.c diff --git a/reactos/base/applications/shutdown/shutdown.rbuild b/base/applications/shutdown/shutdown.rbuild similarity index 100% rename from reactos/base/applications/shutdown/shutdown.rbuild rename to base/applications/shutdown/shutdown.rbuild diff --git a/reactos/base/applications/shutdown/shutdown.rc b/base/applications/shutdown/shutdown.rc similarity index 100% rename from reactos/base/applications/shutdown/shutdown.rc rename to base/applications/shutdown/shutdown.rc diff --git a/reactos/base/applications/sndrec32/CMakeLists.txt b/base/applications/sndrec32/CMakeLists.txt similarity index 100% rename from reactos/base/applications/sndrec32/CMakeLists.txt rename to base/applications/sndrec32/CMakeLists.txt diff --git a/reactos/base/applications/sndrec32/audio_api.hpp b/base/applications/sndrec32/audio_api.hpp similarity index 100% rename from reactos/base/applications/sndrec32/audio_api.hpp rename to base/applications/sndrec32/audio_api.hpp diff --git a/reactos/base/applications/sndrec32/audio_def.hpp b/base/applications/sndrec32/audio_def.hpp similarity index 100% rename from reactos/base/applications/sndrec32/audio_def.hpp rename to base/applications/sndrec32/audio_def.hpp diff --git a/reactos/base/applications/sndrec32/audio_format.cpp b/base/applications/sndrec32/audio_format.cpp similarity index 100% rename from reactos/base/applications/sndrec32/audio_format.cpp rename to base/applications/sndrec32/audio_format.cpp diff --git a/reactos/base/applications/sndrec32/audio_format.hpp b/base/applications/sndrec32/audio_format.hpp similarity index 100% rename from reactos/base/applications/sndrec32/audio_format.hpp rename to base/applications/sndrec32/audio_format.hpp diff --git a/reactos/base/applications/sndrec32/audio_membuffer.cpp b/base/applications/sndrec32/audio_membuffer.cpp similarity index 100% rename from reactos/base/applications/sndrec32/audio_membuffer.cpp rename to base/applications/sndrec32/audio_membuffer.cpp diff --git a/reactos/base/applications/sndrec32/audio_membuffer.hpp b/base/applications/sndrec32/audio_membuffer.hpp similarity index 100% rename from reactos/base/applications/sndrec32/audio_membuffer.hpp rename to base/applications/sndrec32/audio_membuffer.hpp diff --git a/reactos/base/applications/sndrec32/audio_producer.cpp b/base/applications/sndrec32/audio_producer.cpp similarity index 100% rename from reactos/base/applications/sndrec32/audio_producer.cpp rename to base/applications/sndrec32/audio_producer.cpp diff --git a/reactos/base/applications/sndrec32/audio_producer.hpp b/base/applications/sndrec32/audio_producer.hpp similarity index 100% rename from reactos/base/applications/sndrec32/audio_producer.hpp rename to base/applications/sndrec32/audio_producer.hpp diff --git a/reactos/base/applications/sndrec32/audio_receiver.cpp b/base/applications/sndrec32/audio_receiver.cpp similarity index 100% rename from reactos/base/applications/sndrec32/audio_receiver.cpp rename to base/applications/sndrec32/audio_receiver.cpp diff --git a/reactos/base/applications/sndrec32/audio_receiver.hpp b/base/applications/sndrec32/audio_receiver.hpp similarity index 100% rename from reactos/base/applications/sndrec32/audio_receiver.hpp rename to base/applications/sndrec32/audio_receiver.hpp diff --git a/reactos/base/applications/sndrec32/audio_resampler_acm.cpp b/base/applications/sndrec32/audio_resampler_acm.cpp similarity index 100% rename from reactos/base/applications/sndrec32/audio_resampler_acm.cpp rename to base/applications/sndrec32/audio_resampler_acm.cpp diff --git a/reactos/base/applications/sndrec32/audio_resampler_acm.hpp b/base/applications/sndrec32/audio_resampler_acm.hpp similarity index 100% rename from reactos/base/applications/sndrec32/audio_resampler_acm.hpp rename to base/applications/sndrec32/audio_resampler_acm.hpp diff --git a/reactos/base/applications/sndrec32/audio_wavein.cpp b/base/applications/sndrec32/audio_wavein.cpp similarity index 100% rename from reactos/base/applications/sndrec32/audio_wavein.cpp rename to base/applications/sndrec32/audio_wavein.cpp diff --git a/reactos/base/applications/sndrec32/audio_wavein.hpp b/base/applications/sndrec32/audio_wavein.hpp similarity index 100% rename from reactos/base/applications/sndrec32/audio_wavein.hpp rename to base/applications/sndrec32/audio_wavein.hpp diff --git a/reactos/base/applications/sndrec32/audio_waveout.cpp b/base/applications/sndrec32/audio_waveout.cpp similarity index 100% rename from reactos/base/applications/sndrec32/audio_waveout.cpp rename to base/applications/sndrec32/audio_waveout.cpp diff --git a/reactos/base/applications/sndrec32/audio_waveout.hpp b/base/applications/sndrec32/audio_waveout.hpp similarity index 100% rename from reactos/base/applications/sndrec32/audio_waveout.hpp rename to base/applications/sndrec32/audio_waveout.hpp diff --git a/reactos/base/applications/sndrec32/kkaudio.hpp b/base/applications/sndrec32/kkaudio.hpp similarity index 100% rename from reactos/base/applications/sndrec32/kkaudio.hpp rename to base/applications/sndrec32/kkaudio.hpp diff --git a/reactos/base/applications/sndrec32/lang/cs-CZ.rc b/base/applications/sndrec32/lang/cs-CZ.rc similarity index 100% rename from reactos/base/applications/sndrec32/lang/cs-CZ.rc rename to base/applications/sndrec32/lang/cs-CZ.rc diff --git a/reactos/base/applications/sndrec32/lang/de-DE.rc b/base/applications/sndrec32/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/sndrec32/lang/de-DE.rc rename to base/applications/sndrec32/lang/de-DE.rc diff --git a/reactos/base/applications/sndrec32/lang/en-US.rc b/base/applications/sndrec32/lang/en-US.rc similarity index 100% rename from reactos/base/applications/sndrec32/lang/en-US.rc rename to base/applications/sndrec32/lang/en-US.rc diff --git a/reactos/base/applications/sndrec32/lang/es-ES.rc b/base/applications/sndrec32/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/sndrec32/lang/es-ES.rc rename to base/applications/sndrec32/lang/es-ES.rc diff --git a/reactos/base/applications/sndrec32/lang/fr-FR.rc b/base/applications/sndrec32/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/sndrec32/lang/fr-FR.rc rename to base/applications/sndrec32/lang/fr-FR.rc diff --git a/reactos/base/applications/sndrec32/lang/it-IT.rc b/base/applications/sndrec32/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/sndrec32/lang/it-IT.rc rename to base/applications/sndrec32/lang/it-IT.rc diff --git a/reactos/base/applications/sndrec32/lang/ja-JP.rc b/base/applications/sndrec32/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/sndrec32/lang/ja-JP.rc rename to base/applications/sndrec32/lang/ja-JP.rc diff --git a/reactos/base/applications/sndrec32/lang/pl-PL.rc b/base/applications/sndrec32/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/sndrec32/lang/pl-PL.rc rename to base/applications/sndrec32/lang/pl-PL.rc diff --git a/reactos/base/applications/sndrec32/lang/ro-RO.rc b/base/applications/sndrec32/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/sndrec32/lang/ro-RO.rc rename to base/applications/sndrec32/lang/ro-RO.rc diff --git a/reactos/base/applications/sndrec32/lang/sk-SK.rc b/base/applications/sndrec32/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/sndrec32/lang/sk-SK.rc rename to base/applications/sndrec32/lang/sk-SK.rc diff --git a/reactos/base/applications/sndrec32/lang/sv-SE.rc b/base/applications/sndrec32/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/sndrec32/lang/sv-SE.rc rename to base/applications/sndrec32/lang/sv-SE.rc diff --git a/reactos/base/applications/sndrec32/lang/uk-UA.rc b/base/applications/sndrec32/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/sndrec32/lang/uk-UA.rc rename to base/applications/sndrec32/lang/uk-UA.rc diff --git a/reactos/base/applications/sndrec32/lang/zh-CN.rc b/base/applications/sndrec32/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/sndrec32/lang/zh-CN.rc rename to base/applications/sndrec32/lang/zh-CN.rc diff --git a/reactos/base/applications/sndrec32/lang/zh-TW.rc b/base/applications/sndrec32/lang/zh-TW.rc similarity index 100% rename from reactos/base/applications/sndrec32/lang/zh-TW.rc rename to base/applications/sndrec32/lang/zh-TW.rc diff --git a/reactos/base/applications/sndrec32/resource.h b/base/applications/sndrec32/resource.h similarity index 100% rename from reactos/base/applications/sndrec32/resource.h rename to base/applications/sndrec32/resource.h diff --git a/reactos/base/applications/sndrec32/resources/but_end.bmp b/base/applications/sndrec32/resources/but_end.bmp similarity index 100% rename from reactos/base/applications/sndrec32/resources/but_end.bmp rename to base/applications/sndrec32/resources/but_end.bmp diff --git a/reactos/base/applications/sndrec32/resources/but_end_dis.bmp b/base/applications/sndrec32/resources/but_end_dis.bmp similarity index 100% rename from reactos/base/applications/sndrec32/resources/but_end_dis.bmp rename to base/applications/sndrec32/resources/but_end_dis.bmp diff --git a/reactos/base/applications/sndrec32/resources/but_play.bmp b/base/applications/sndrec32/resources/but_play.bmp similarity index 100% rename from reactos/base/applications/sndrec32/resources/but_play.bmp rename to base/applications/sndrec32/resources/but_play.bmp diff --git a/reactos/base/applications/sndrec32/resources/but_play_dis.bmp b/base/applications/sndrec32/resources/but_play_dis.bmp similarity index 100% rename from reactos/base/applications/sndrec32/resources/but_play_dis.bmp rename to base/applications/sndrec32/resources/but_play_dis.bmp diff --git a/reactos/base/applications/sndrec32/resources/but_rec.bmp b/base/applications/sndrec32/resources/but_rec.bmp similarity index 100% rename from reactos/base/applications/sndrec32/resources/but_rec.bmp rename to base/applications/sndrec32/resources/but_rec.bmp diff --git a/reactos/base/applications/sndrec32/resources/but_rec_dis.bmp b/base/applications/sndrec32/resources/but_rec_dis.bmp similarity index 100% rename from reactos/base/applications/sndrec32/resources/but_rec_dis.bmp rename to base/applications/sndrec32/resources/but_rec_dis.bmp diff --git a/reactos/base/applications/sndrec32/resources/but_start.bmp b/base/applications/sndrec32/resources/but_start.bmp similarity index 100% rename from reactos/base/applications/sndrec32/resources/but_start.bmp rename to base/applications/sndrec32/resources/but_start.bmp diff --git a/reactos/base/applications/sndrec32/resources/but_start_dis.bmp b/base/applications/sndrec32/resources/but_start_dis.bmp similarity index 100% rename from reactos/base/applications/sndrec32/resources/but_start_dis.bmp rename to base/applications/sndrec32/resources/but_start_dis.bmp diff --git a/reactos/base/applications/sndrec32/resources/but_stop.bmp b/base/applications/sndrec32/resources/but_stop.bmp similarity index 100% rename from reactos/base/applications/sndrec32/resources/but_stop.bmp rename to base/applications/sndrec32/resources/but_stop.bmp diff --git a/reactos/base/applications/sndrec32/resources/but_stop_dis.bmp b/base/applications/sndrec32/resources/but_stop_dis.bmp similarity index 100% rename from reactos/base/applications/sndrec32/resources/but_stop_dis.bmp rename to base/applications/sndrec32/resources/but_stop_dis.bmp diff --git a/reactos/base/applications/sndrec32/resources/record-app.ico b/base/applications/sndrec32/resources/record-app.ico similarity index 100% rename from reactos/base/applications/sndrec32/resources/record-app.ico rename to base/applications/sndrec32/resources/record-app.ico diff --git a/reactos/base/applications/sndrec32/rsrc.rc b/base/applications/sndrec32/rsrc.rc similarity index 100% rename from reactos/base/applications/sndrec32/rsrc.rc rename to base/applications/sndrec32/rsrc.rc diff --git a/reactos/base/applications/sndrec32/sndrec32.cpp b/base/applications/sndrec32/sndrec32.cpp similarity index 100% rename from reactos/base/applications/sndrec32/sndrec32.cpp rename to base/applications/sndrec32/sndrec32.cpp diff --git a/reactos/base/applications/sndrec32/sndrec32.h b/base/applications/sndrec32/sndrec32.h similarity index 100% rename from reactos/base/applications/sndrec32/sndrec32.h rename to base/applications/sndrec32/sndrec32.h diff --git a/reactos/base/applications/sndrec32/sndrec32.rbuild b/base/applications/sndrec32/sndrec32.rbuild similarity index 100% rename from reactos/base/applications/sndrec32/sndrec32.rbuild rename to base/applications/sndrec32/sndrec32.rbuild diff --git a/reactos/base/applications/sndrec32/stdafx.h b/base/applications/sndrec32/stdafx.h similarity index 100% rename from reactos/base/applications/sndrec32/stdafx.h rename to base/applications/sndrec32/stdafx.h diff --git a/reactos/base/applications/sndrec32/targetver.h b/base/applications/sndrec32/targetver.h similarity index 100% rename from reactos/base/applications/sndrec32/targetver.h rename to base/applications/sndrec32/targetver.h diff --git a/reactos/base/applications/sndvol32/CMakeLists.txt b/base/applications/sndvol32/CMakeLists.txt similarity index 100% rename from reactos/base/applications/sndvol32/CMakeLists.txt rename to base/applications/sndvol32/CMakeLists.txt diff --git a/reactos/base/applications/sndvol32/dialog.c b/base/applications/sndvol32/dialog.c similarity index 100% rename from reactos/base/applications/sndvol32/dialog.c rename to base/applications/sndvol32/dialog.c diff --git a/reactos/base/applications/sndvol32/lang/bg-BG.rc b/base/applications/sndvol32/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/sndvol32/lang/bg-BG.rc rename to base/applications/sndvol32/lang/bg-BG.rc diff --git a/reactos/base/applications/sndvol32/lang/cs-CZ.rc b/base/applications/sndvol32/lang/cs-CZ.rc similarity index 100% rename from reactos/base/applications/sndvol32/lang/cs-CZ.rc rename to base/applications/sndvol32/lang/cs-CZ.rc diff --git a/reactos/base/applications/sndvol32/lang/de-DE.rc b/base/applications/sndvol32/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/sndvol32/lang/de-DE.rc rename to base/applications/sndvol32/lang/de-DE.rc diff --git a/reactos/base/applications/sndvol32/lang/el-GR.rc b/base/applications/sndvol32/lang/el-GR.rc similarity index 100% rename from reactos/base/applications/sndvol32/lang/el-GR.rc rename to base/applications/sndvol32/lang/el-GR.rc diff --git a/reactos/base/applications/sndvol32/lang/en-US.rc b/base/applications/sndvol32/lang/en-US.rc similarity index 100% rename from reactos/base/applications/sndvol32/lang/en-US.rc rename to base/applications/sndvol32/lang/en-US.rc diff --git a/reactos/base/applications/sndvol32/lang/es-ES.rc b/base/applications/sndvol32/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/sndvol32/lang/es-ES.rc rename to base/applications/sndvol32/lang/es-ES.rc diff --git a/reactos/base/applications/sndvol32/lang/fr-FR.rc b/base/applications/sndvol32/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/sndvol32/lang/fr-FR.rc rename to base/applications/sndvol32/lang/fr-FR.rc diff --git a/reactos/base/applications/sndvol32/lang/hu-HU.rc b/base/applications/sndvol32/lang/hu-HU.rc similarity index 100% rename from reactos/base/applications/sndvol32/lang/hu-HU.rc rename to base/applications/sndvol32/lang/hu-HU.rc diff --git a/reactos/base/applications/sndvol32/lang/id-ID.rc b/base/applications/sndvol32/lang/id-ID.rc similarity index 100% rename from reactos/base/applications/sndvol32/lang/id-ID.rc rename to base/applications/sndvol32/lang/id-ID.rc diff --git a/reactos/base/applications/sndvol32/lang/it-IT.rc b/base/applications/sndvol32/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/sndvol32/lang/it-IT.rc rename to base/applications/sndvol32/lang/it-IT.rc diff --git a/reactos/base/applications/sndvol32/lang/ja-JP.rc b/base/applications/sndvol32/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/sndvol32/lang/ja-JP.rc rename to base/applications/sndvol32/lang/ja-JP.rc diff --git a/reactos/base/applications/sndvol32/lang/ko-KR.rc b/base/applications/sndvol32/lang/ko-KR.rc similarity index 100% rename from reactos/base/applications/sndvol32/lang/ko-KR.rc rename to base/applications/sndvol32/lang/ko-KR.rc diff --git a/reactos/base/applications/sndvol32/lang/lt-LT.rc b/base/applications/sndvol32/lang/lt-LT.rc similarity index 100% rename from reactos/base/applications/sndvol32/lang/lt-LT.rc rename to base/applications/sndvol32/lang/lt-LT.rc diff --git a/reactos/base/applications/sndvol32/lang/nl-NL.rc b/base/applications/sndvol32/lang/nl-NL.rc similarity index 100% rename from reactos/base/applications/sndvol32/lang/nl-NL.rc rename to base/applications/sndvol32/lang/nl-NL.rc diff --git a/reactos/base/applications/sndvol32/lang/no-NO.rc b/base/applications/sndvol32/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/sndvol32/lang/no-NO.rc rename to base/applications/sndvol32/lang/no-NO.rc diff --git a/reactos/base/applications/sndvol32/lang/pl-PL.rc b/base/applications/sndvol32/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/sndvol32/lang/pl-PL.rc rename to base/applications/sndvol32/lang/pl-PL.rc diff --git a/reactos/base/applications/sndvol32/lang/pt-BR.rc b/base/applications/sndvol32/lang/pt-BR.rc similarity index 100% rename from reactos/base/applications/sndvol32/lang/pt-BR.rc rename to base/applications/sndvol32/lang/pt-BR.rc diff --git a/reactos/base/applications/sndvol32/lang/ro-RO.rc b/base/applications/sndvol32/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/sndvol32/lang/ro-RO.rc rename to base/applications/sndvol32/lang/ro-RO.rc diff --git a/reactos/base/applications/sndvol32/lang/ru-RU.rc b/base/applications/sndvol32/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/sndvol32/lang/ru-RU.rc rename to base/applications/sndvol32/lang/ru-RU.rc diff --git a/reactos/base/applications/sndvol32/lang/sk-SK.rc b/base/applications/sndvol32/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/sndvol32/lang/sk-SK.rc rename to base/applications/sndvol32/lang/sk-SK.rc diff --git a/reactos/base/applications/sndvol32/lang/sv-SE.rc b/base/applications/sndvol32/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/sndvol32/lang/sv-SE.rc rename to base/applications/sndvol32/lang/sv-SE.rc diff --git a/reactos/base/applications/sndvol32/lang/th-TH.rc b/base/applications/sndvol32/lang/th-TH.rc similarity index 100% rename from reactos/base/applications/sndvol32/lang/th-TH.rc rename to base/applications/sndvol32/lang/th-TH.rc diff --git a/reactos/base/applications/sndvol32/lang/uk-UA.rc b/base/applications/sndvol32/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/sndvol32/lang/uk-UA.rc rename to base/applications/sndvol32/lang/uk-UA.rc diff --git a/reactos/base/applications/sndvol32/lang/zh-CN.rc b/base/applications/sndvol32/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/sndvol32/lang/zh-CN.rc rename to base/applications/sndvol32/lang/zh-CN.rc diff --git a/reactos/base/applications/sndvol32/lang/zh-TW.rc b/base/applications/sndvol32/lang/zh-TW.rc similarity index 100% rename from reactos/base/applications/sndvol32/lang/zh-TW.rc rename to base/applications/sndvol32/lang/zh-TW.rc diff --git a/reactos/base/applications/sndvol32/misc.c b/base/applications/sndvol32/misc.c similarity index 100% rename from reactos/base/applications/sndvol32/misc.c rename to base/applications/sndvol32/misc.c diff --git a/reactos/base/applications/sndvol32/mixer.c b/base/applications/sndvol32/mixer.c similarity index 100% rename from reactos/base/applications/sndvol32/mixer.c rename to base/applications/sndvol32/mixer.c diff --git a/reactos/base/applications/sndvol32/resources.h b/base/applications/sndvol32/resources.h similarity index 100% rename from reactos/base/applications/sndvol32/resources.h rename to base/applications/sndvol32/resources.h diff --git a/reactos/base/applications/sndvol32/resources/sndvol32.ico b/base/applications/sndvol32/resources/sndvol32.ico similarity index 100% rename from reactos/base/applications/sndvol32/resources/sndvol32.ico rename to base/applications/sndvol32/resources/sndvol32.ico diff --git a/reactos/base/applications/sndvol32/rsrc.rc b/base/applications/sndvol32/rsrc.rc similarity index 100% rename from reactos/base/applications/sndvol32/rsrc.rc rename to base/applications/sndvol32/rsrc.rc diff --git a/reactos/base/applications/sndvol32/sndvol32.c b/base/applications/sndvol32/sndvol32.c similarity index 100% rename from reactos/base/applications/sndvol32/sndvol32.c rename to base/applications/sndvol32/sndvol32.c diff --git a/reactos/base/applications/sndvol32/sndvol32.h b/base/applications/sndvol32/sndvol32.h similarity index 100% rename from reactos/base/applications/sndvol32/sndvol32.h rename to base/applications/sndvol32/sndvol32.h diff --git a/reactos/base/applications/sndvol32/sndvol32.rbuild b/base/applications/sndvol32/sndvol32.rbuild similarity index 100% rename from reactos/base/applications/sndvol32/sndvol32.rbuild rename to base/applications/sndvol32/sndvol32.rbuild diff --git a/reactos/base/applications/sndvol32/sndvol32.rc b/base/applications/sndvol32/sndvol32.rc similarity index 100% rename from reactos/base/applications/sndvol32/sndvol32.rc rename to base/applications/sndvol32/sndvol32.rc diff --git a/reactos/base/applications/taskmgr/CMakeLists.txt b/base/applications/taskmgr/CMakeLists.txt similarity index 100% rename from reactos/base/applications/taskmgr/CMakeLists.txt rename to base/applications/taskmgr/CMakeLists.txt diff --git a/reactos/base/applications/taskmgr/about.c b/base/applications/taskmgr/about.c similarity index 100% rename from reactos/base/applications/taskmgr/about.c rename to base/applications/taskmgr/about.c diff --git a/reactos/base/applications/taskmgr/about.h b/base/applications/taskmgr/about.h similarity index 100% rename from reactos/base/applications/taskmgr/about.h rename to base/applications/taskmgr/about.h diff --git a/reactos/base/applications/taskmgr/affinity.c b/base/applications/taskmgr/affinity.c similarity index 100% rename from reactos/base/applications/taskmgr/affinity.c rename to base/applications/taskmgr/affinity.c diff --git a/reactos/base/applications/taskmgr/affinity.h b/base/applications/taskmgr/affinity.h similarity index 100% rename from reactos/base/applications/taskmgr/affinity.h rename to base/applications/taskmgr/affinity.h diff --git a/reactos/base/applications/taskmgr/applpage.c b/base/applications/taskmgr/applpage.c similarity index 100% rename from reactos/base/applications/taskmgr/applpage.c rename to base/applications/taskmgr/applpage.c diff --git a/reactos/base/applications/taskmgr/applpage.h b/base/applications/taskmgr/applpage.h similarity index 100% rename from reactos/base/applications/taskmgr/applpage.h rename to base/applications/taskmgr/applpage.h diff --git a/reactos/base/applications/taskmgr/column.c b/base/applications/taskmgr/column.c similarity index 100% rename from reactos/base/applications/taskmgr/column.c rename to base/applications/taskmgr/column.c diff --git a/reactos/base/applications/taskmgr/column.h b/base/applications/taskmgr/column.h similarity index 100% rename from reactos/base/applications/taskmgr/column.h rename to base/applications/taskmgr/column.h diff --git a/reactos/base/applications/taskmgr/dbgchnl.c b/base/applications/taskmgr/dbgchnl.c similarity index 100% rename from reactos/base/applications/taskmgr/dbgchnl.c rename to base/applications/taskmgr/dbgchnl.c diff --git a/reactos/base/applications/taskmgr/dbgchnl.h b/base/applications/taskmgr/dbgchnl.h similarity index 100% rename from reactos/base/applications/taskmgr/dbgchnl.h rename to base/applications/taskmgr/dbgchnl.h diff --git a/reactos/base/applications/taskmgr/debug.c b/base/applications/taskmgr/debug.c similarity index 100% rename from reactos/base/applications/taskmgr/debug.c rename to base/applications/taskmgr/debug.c diff --git a/reactos/base/applications/taskmgr/debug.h b/base/applications/taskmgr/debug.h similarity index 100% rename from reactos/base/applications/taskmgr/debug.h rename to base/applications/taskmgr/debug.h diff --git a/reactos/base/applications/taskmgr/endproc.c b/base/applications/taskmgr/endproc.c similarity index 100% rename from reactos/base/applications/taskmgr/endproc.c rename to base/applications/taskmgr/endproc.c diff --git a/reactos/base/applications/taskmgr/endproc.h b/base/applications/taskmgr/endproc.h similarity index 100% rename from reactos/base/applications/taskmgr/endproc.h rename to base/applications/taskmgr/endproc.h diff --git a/reactos/base/applications/taskmgr/graph.c b/base/applications/taskmgr/graph.c similarity index 100% rename from reactos/base/applications/taskmgr/graph.c rename to base/applications/taskmgr/graph.c diff --git a/reactos/base/applications/taskmgr/graph.h b/base/applications/taskmgr/graph.h similarity index 100% rename from reactos/base/applications/taskmgr/graph.h rename to base/applications/taskmgr/graph.h diff --git a/reactos/base/applications/taskmgr/graphctl.c b/base/applications/taskmgr/graphctl.c similarity index 100% rename from reactos/base/applications/taskmgr/graphctl.c rename to base/applications/taskmgr/graphctl.c diff --git a/reactos/base/applications/taskmgr/graphctl.h b/base/applications/taskmgr/graphctl.h similarity index 100% rename from reactos/base/applications/taskmgr/graphctl.h rename to base/applications/taskmgr/graphctl.h diff --git a/reactos/base/applications/taskmgr/lang/bg-BG.rc b/base/applications/taskmgr/lang/bg-BG.rc similarity index 100% rename from reactos/base/applications/taskmgr/lang/bg-BG.rc rename to base/applications/taskmgr/lang/bg-BG.rc diff --git a/reactos/base/applications/taskmgr/lang/cs-CZ.rc b/base/applications/taskmgr/lang/cs-CZ.rc similarity index 100% rename from reactos/base/applications/taskmgr/lang/cs-CZ.rc rename to base/applications/taskmgr/lang/cs-CZ.rc diff --git a/reactos/base/applications/taskmgr/lang/da-DK.rc b/base/applications/taskmgr/lang/da-DK.rc similarity index 100% rename from reactos/base/applications/taskmgr/lang/da-DK.rc rename to base/applications/taskmgr/lang/da-DK.rc diff --git a/reactos/base/applications/taskmgr/lang/de-DE.rc b/base/applications/taskmgr/lang/de-DE.rc similarity index 100% rename from reactos/base/applications/taskmgr/lang/de-DE.rc rename to base/applications/taskmgr/lang/de-DE.rc diff --git a/reactos/base/applications/taskmgr/lang/el-GR.rc b/base/applications/taskmgr/lang/el-GR.rc similarity index 100% rename from reactos/base/applications/taskmgr/lang/el-GR.rc rename to base/applications/taskmgr/lang/el-GR.rc diff --git a/reactos/base/applications/taskmgr/lang/en-US.rc b/base/applications/taskmgr/lang/en-US.rc similarity index 100% rename from reactos/base/applications/taskmgr/lang/en-US.rc rename to base/applications/taskmgr/lang/en-US.rc diff --git a/reactos/base/applications/taskmgr/lang/es-ES.rc b/base/applications/taskmgr/lang/es-ES.rc similarity index 100% rename from reactos/base/applications/taskmgr/lang/es-ES.rc rename to base/applications/taskmgr/lang/es-ES.rc diff --git a/reactos/base/applications/taskmgr/lang/fr-FR.rc b/base/applications/taskmgr/lang/fr-FR.rc similarity index 100% rename from reactos/base/applications/taskmgr/lang/fr-FR.rc rename to base/applications/taskmgr/lang/fr-FR.rc diff --git a/reactos/base/applications/taskmgr/lang/hu-HU.rc b/base/applications/taskmgr/lang/hu-HU.rc similarity index 100% rename from reactos/base/applications/taskmgr/lang/hu-HU.rc rename to base/applications/taskmgr/lang/hu-HU.rc diff --git a/reactos/base/applications/taskmgr/lang/id-ID.rc b/base/applications/taskmgr/lang/id-ID.rc similarity index 100% rename from reactos/base/applications/taskmgr/lang/id-ID.rc rename to base/applications/taskmgr/lang/id-ID.rc diff --git a/reactos/base/applications/taskmgr/lang/it-IT.rc b/base/applications/taskmgr/lang/it-IT.rc similarity index 100% rename from reactos/base/applications/taskmgr/lang/it-IT.rc rename to base/applications/taskmgr/lang/it-IT.rc diff --git a/reactos/base/applications/taskmgr/lang/ja-JP.rc b/base/applications/taskmgr/lang/ja-JP.rc similarity index 100% rename from reactos/base/applications/taskmgr/lang/ja-JP.rc rename to base/applications/taskmgr/lang/ja-JP.rc diff --git a/reactos/base/applications/taskmgr/lang/ko-KR.rc b/base/applications/taskmgr/lang/ko-KR.rc similarity index 100% rename from reactos/base/applications/taskmgr/lang/ko-KR.rc rename to base/applications/taskmgr/lang/ko-KR.rc diff --git a/reactos/base/applications/taskmgr/lang/nl-NL.rc b/base/applications/taskmgr/lang/nl-NL.rc similarity index 100% rename from reactos/base/applications/taskmgr/lang/nl-NL.rc rename to base/applications/taskmgr/lang/nl-NL.rc diff --git a/reactos/base/applications/taskmgr/lang/no-NO.rc b/base/applications/taskmgr/lang/no-NO.rc similarity index 100% rename from reactos/base/applications/taskmgr/lang/no-NO.rc rename to base/applications/taskmgr/lang/no-NO.rc diff --git a/reactos/base/applications/taskmgr/lang/pl-PL.rc b/base/applications/taskmgr/lang/pl-PL.rc similarity index 100% rename from reactos/base/applications/taskmgr/lang/pl-PL.rc rename to base/applications/taskmgr/lang/pl-PL.rc diff --git a/reactos/base/applications/taskmgr/lang/pt-BR.rc b/base/applications/taskmgr/lang/pt-BR.rc similarity index 100% rename from reactos/base/applications/taskmgr/lang/pt-BR.rc rename to base/applications/taskmgr/lang/pt-BR.rc diff --git a/reactos/base/applications/taskmgr/lang/ro-RO.rc b/base/applications/taskmgr/lang/ro-RO.rc similarity index 100% rename from reactos/base/applications/taskmgr/lang/ro-RO.rc rename to base/applications/taskmgr/lang/ro-RO.rc diff --git a/reactos/base/applications/taskmgr/lang/ru-RU.rc b/base/applications/taskmgr/lang/ru-RU.rc similarity index 100% rename from reactos/base/applications/taskmgr/lang/ru-RU.rc rename to base/applications/taskmgr/lang/ru-RU.rc diff --git a/reactos/base/applications/taskmgr/lang/sk-SK.rc b/base/applications/taskmgr/lang/sk-SK.rc similarity index 100% rename from reactos/base/applications/taskmgr/lang/sk-SK.rc rename to base/applications/taskmgr/lang/sk-SK.rc diff --git a/reactos/base/applications/taskmgr/lang/sv-SE.rc b/base/applications/taskmgr/lang/sv-SE.rc similarity index 100% rename from reactos/base/applications/taskmgr/lang/sv-SE.rc rename to base/applications/taskmgr/lang/sv-SE.rc diff --git a/reactos/base/applications/taskmgr/lang/uk-UA.rc b/base/applications/taskmgr/lang/uk-UA.rc similarity index 100% rename from reactos/base/applications/taskmgr/lang/uk-UA.rc rename to base/applications/taskmgr/lang/uk-UA.rc diff --git a/reactos/base/applications/taskmgr/lang/zh-CN.rc b/base/applications/taskmgr/lang/zh-CN.rc similarity index 100% rename from reactos/base/applications/taskmgr/lang/zh-CN.rc rename to base/applications/taskmgr/lang/zh-CN.rc diff --git a/reactos/base/applications/taskmgr/lang/zh-TW.rc b/base/applications/taskmgr/lang/zh-TW.rc similarity index 100% rename from reactos/base/applications/taskmgr/lang/zh-TW.rc rename to base/applications/taskmgr/lang/zh-TW.rc diff --git a/reactos/base/applications/taskmgr/optnmenu.c b/base/applications/taskmgr/optnmenu.c similarity index 100% rename from reactos/base/applications/taskmgr/optnmenu.c rename to base/applications/taskmgr/optnmenu.c diff --git a/reactos/base/applications/taskmgr/optnmenu.h b/base/applications/taskmgr/optnmenu.h similarity index 100% rename from reactos/base/applications/taskmgr/optnmenu.h rename to base/applications/taskmgr/optnmenu.h diff --git a/reactos/base/applications/taskmgr/perfdata.c b/base/applications/taskmgr/perfdata.c similarity index 100% rename from reactos/base/applications/taskmgr/perfdata.c rename to base/applications/taskmgr/perfdata.c diff --git a/reactos/base/applications/taskmgr/perfdata.h b/base/applications/taskmgr/perfdata.h similarity index 100% rename from reactos/base/applications/taskmgr/perfdata.h rename to base/applications/taskmgr/perfdata.h diff --git a/reactos/base/applications/taskmgr/perfpage.c b/base/applications/taskmgr/perfpage.c similarity index 100% rename from reactos/base/applications/taskmgr/perfpage.c rename to base/applications/taskmgr/perfpage.c diff --git a/reactos/base/applications/taskmgr/perfpage.h b/base/applications/taskmgr/perfpage.h similarity index 100% rename from reactos/base/applications/taskmgr/perfpage.h rename to base/applications/taskmgr/perfpage.h diff --git a/reactos/base/applications/taskmgr/precomp.h b/base/applications/taskmgr/precomp.h similarity index 100% rename from reactos/base/applications/taskmgr/precomp.h rename to base/applications/taskmgr/precomp.h diff --git a/reactos/base/applications/taskmgr/priority.c b/base/applications/taskmgr/priority.c similarity index 100% rename from reactos/base/applications/taskmgr/priority.c rename to base/applications/taskmgr/priority.c diff --git a/reactos/base/applications/taskmgr/priority.h b/base/applications/taskmgr/priority.h similarity index 100% rename from reactos/base/applications/taskmgr/priority.h rename to base/applications/taskmgr/priority.h diff --git a/reactos/base/applications/taskmgr/proclist.c b/base/applications/taskmgr/proclist.c similarity index 100% rename from reactos/base/applications/taskmgr/proclist.c rename to base/applications/taskmgr/proclist.c diff --git a/reactos/base/applications/taskmgr/proclist.h b/base/applications/taskmgr/proclist.h similarity index 100% rename from reactos/base/applications/taskmgr/proclist.h rename to base/applications/taskmgr/proclist.h diff --git a/reactos/base/applications/taskmgr/procpage.c b/base/applications/taskmgr/procpage.c similarity index 100% rename from reactos/base/applications/taskmgr/procpage.c rename to base/applications/taskmgr/procpage.c diff --git a/reactos/base/applications/taskmgr/procpage.h b/base/applications/taskmgr/procpage.h similarity index 100% rename from reactos/base/applications/taskmgr/procpage.h rename to base/applications/taskmgr/procpage.h diff --git a/reactos/base/applications/taskmgr/res/taskmgr.ico b/base/applications/taskmgr/res/taskmgr.ico similarity index 100% rename from reactos/base/applications/taskmgr/res/taskmgr.ico rename to base/applications/taskmgr/res/taskmgr.ico diff --git a/reactos/base/applications/taskmgr/res/trayicon.bmp b/base/applications/taskmgr/res/trayicon.bmp similarity index 100% rename from reactos/base/applications/taskmgr/res/trayicon.bmp rename to base/applications/taskmgr/res/trayicon.bmp diff --git a/reactos/base/applications/taskmgr/res/traymask.bmp b/base/applications/taskmgr/res/traymask.bmp similarity index 100% rename from reactos/base/applications/taskmgr/res/traymask.bmp rename to base/applications/taskmgr/res/traymask.bmp diff --git a/reactos/base/applications/taskmgr/res/window.ico b/base/applications/taskmgr/res/window.ico similarity index 100% rename from reactos/base/applications/taskmgr/res/window.ico rename to base/applications/taskmgr/res/window.ico diff --git a/reactos/base/applications/taskmgr/res/windowsm.ico b/base/applications/taskmgr/res/windowsm.ico similarity index 100% rename from reactos/base/applications/taskmgr/res/windowsm.ico rename to base/applications/taskmgr/res/windowsm.ico diff --git a/reactos/base/applications/taskmgr/resource.h b/base/applications/taskmgr/resource.h similarity index 100% rename from reactos/base/applications/taskmgr/resource.h rename to base/applications/taskmgr/resource.h diff --git a/reactos/base/applications/taskmgr/rsrc.rc b/base/applications/taskmgr/rsrc.rc similarity index 100% rename from reactos/base/applications/taskmgr/rsrc.rc rename to base/applications/taskmgr/rsrc.rc diff --git a/reactos/base/applications/taskmgr/run.c b/base/applications/taskmgr/run.c similarity index 100% rename from reactos/base/applications/taskmgr/run.c rename to base/applications/taskmgr/run.c diff --git a/reactos/base/applications/taskmgr/run.h b/base/applications/taskmgr/run.h similarity index 100% rename from reactos/base/applications/taskmgr/run.h rename to base/applications/taskmgr/run.h diff --git a/reactos/base/applications/taskmgr/taskmgr.c b/base/applications/taskmgr/taskmgr.c similarity index 100% rename from reactos/base/applications/taskmgr/taskmgr.c rename to base/applications/taskmgr/taskmgr.c diff --git a/reactos/base/applications/taskmgr/taskmgr.h b/base/applications/taskmgr/taskmgr.h similarity index 100% rename from reactos/base/applications/taskmgr/taskmgr.h rename to base/applications/taskmgr/taskmgr.h diff --git a/reactos/base/applications/taskmgr/taskmgr.rbuild b/base/applications/taskmgr/taskmgr.rbuild similarity index 100% rename from reactos/base/applications/taskmgr/taskmgr.rbuild rename to base/applications/taskmgr/taskmgr.rbuild diff --git a/reactos/base/applications/taskmgr/taskmgr.rc b/base/applications/taskmgr/taskmgr.rc similarity index 100% rename from reactos/base/applications/taskmgr/taskmgr.rc rename to base/applications/taskmgr/taskmgr.rc diff --git a/reactos/base/applications/taskmgr/trayicon.c b/base/applications/taskmgr/trayicon.c similarity index 100% rename from reactos/base/applications/taskmgr/trayicon.c rename to base/applications/taskmgr/trayicon.c diff --git a/reactos/base/applications/taskmgr/trayicon.h b/base/applications/taskmgr/trayicon.h similarity index 100% rename from reactos/base/applications/taskmgr/trayicon.h rename to base/applications/taskmgr/trayicon.h diff --git a/reactos/base/applications/winhlp32/Bg.rc b/base/applications/winhlp32/Bg.rc similarity index 100% rename from reactos/base/applications/winhlp32/Bg.rc rename to base/applications/winhlp32/Bg.rc diff --git a/reactos/base/applications/winhlp32/CMakeLists.txt b/base/applications/winhlp32/CMakeLists.txt similarity index 100% rename from reactos/base/applications/winhlp32/CMakeLists.txt rename to base/applications/winhlp32/CMakeLists.txt diff --git a/reactos/base/applications/winhlp32/Cs.rc b/base/applications/winhlp32/Cs.rc similarity index 100% rename from reactos/base/applications/winhlp32/Cs.rc rename to base/applications/winhlp32/Cs.rc diff --git a/reactos/base/applications/winhlp32/Da.rc b/base/applications/winhlp32/Da.rc similarity index 100% rename from reactos/base/applications/winhlp32/Da.rc rename to base/applications/winhlp32/Da.rc diff --git a/reactos/base/applications/winhlp32/De.rc b/base/applications/winhlp32/De.rc similarity index 100% rename from reactos/base/applications/winhlp32/De.rc rename to base/applications/winhlp32/De.rc diff --git a/reactos/base/applications/winhlp32/En.rc b/base/applications/winhlp32/En.rc similarity index 100% rename from reactos/base/applications/winhlp32/En.rc rename to base/applications/winhlp32/En.rc diff --git a/reactos/base/applications/winhlp32/Es.rc b/base/applications/winhlp32/Es.rc similarity index 100% rename from reactos/base/applications/winhlp32/Es.rc rename to base/applications/winhlp32/Es.rc diff --git a/reactos/base/applications/winhlp32/Fi.rc b/base/applications/winhlp32/Fi.rc similarity index 100% rename from reactos/base/applications/winhlp32/Fi.rc rename to base/applications/winhlp32/Fi.rc diff --git a/reactos/base/applications/winhlp32/Fr.rc b/base/applications/winhlp32/Fr.rc similarity index 100% rename from reactos/base/applications/winhlp32/Fr.rc rename to base/applications/winhlp32/Fr.rc diff --git a/reactos/base/applications/winhlp32/He.rc b/base/applications/winhlp32/He.rc similarity index 100% rename from reactos/base/applications/winhlp32/He.rc rename to base/applications/winhlp32/He.rc diff --git a/reactos/base/applications/winhlp32/Hu.rc b/base/applications/winhlp32/Hu.rc similarity index 100% rename from reactos/base/applications/winhlp32/Hu.rc rename to base/applications/winhlp32/Hu.rc diff --git a/reactos/base/applications/winhlp32/It.rc b/base/applications/winhlp32/It.rc similarity index 100% rename from reactos/base/applications/winhlp32/It.rc rename to base/applications/winhlp32/It.rc diff --git a/reactos/base/applications/winhlp32/Ja.rc b/base/applications/winhlp32/Ja.rc similarity index 100% rename from reactos/base/applications/winhlp32/Ja.rc rename to base/applications/winhlp32/Ja.rc diff --git a/reactos/base/applications/winhlp32/Ko.rc b/base/applications/winhlp32/Ko.rc similarity index 100% rename from reactos/base/applications/winhlp32/Ko.rc rename to base/applications/winhlp32/Ko.rc diff --git a/reactos/base/applications/winhlp32/Lt.rc b/base/applications/winhlp32/Lt.rc similarity index 100% rename from reactos/base/applications/winhlp32/Lt.rc rename to base/applications/winhlp32/Lt.rc diff --git a/reactos/base/applications/winhlp32/Nl.rc b/base/applications/winhlp32/Nl.rc similarity index 100% rename from reactos/base/applications/winhlp32/Nl.rc rename to base/applications/winhlp32/Nl.rc diff --git a/reactos/base/applications/winhlp32/No.rc b/base/applications/winhlp32/No.rc similarity index 100% rename from reactos/base/applications/winhlp32/No.rc rename to base/applications/winhlp32/No.rc diff --git a/reactos/base/applications/winhlp32/Pl.rc b/base/applications/winhlp32/Pl.rc similarity index 100% rename from reactos/base/applications/winhlp32/Pl.rc rename to base/applications/winhlp32/Pl.rc diff --git a/reactos/base/applications/winhlp32/Pt.rc b/base/applications/winhlp32/Pt.rc similarity index 100% rename from reactos/base/applications/winhlp32/Pt.rc rename to base/applications/winhlp32/Pt.rc diff --git a/reactos/base/applications/winhlp32/Rm.rc b/base/applications/winhlp32/Rm.rc similarity index 100% rename from reactos/base/applications/winhlp32/Rm.rc rename to base/applications/winhlp32/Rm.rc diff --git a/reactos/base/applications/winhlp32/Ro.rc b/base/applications/winhlp32/Ro.rc similarity index 100% rename from reactos/base/applications/winhlp32/Ro.rc rename to base/applications/winhlp32/Ro.rc diff --git a/reactos/base/applications/winhlp32/Ru.rc b/base/applications/winhlp32/Ru.rc similarity index 100% rename from reactos/base/applications/winhlp32/Ru.rc rename to base/applications/winhlp32/Ru.rc diff --git a/reactos/base/applications/winhlp32/Si.rc b/base/applications/winhlp32/Si.rc similarity index 100% rename from reactos/base/applications/winhlp32/Si.rc rename to base/applications/winhlp32/Si.rc diff --git a/reactos/base/applications/winhlp32/Sk.rc b/base/applications/winhlp32/Sk.rc similarity index 100% rename from reactos/base/applications/winhlp32/Sk.rc rename to base/applications/winhlp32/Sk.rc diff --git a/reactos/base/applications/winhlp32/Sr.rc b/base/applications/winhlp32/Sr.rc similarity index 100% rename from reactos/base/applications/winhlp32/Sr.rc rename to base/applications/winhlp32/Sr.rc diff --git a/reactos/base/applications/winhlp32/Sv.rc b/base/applications/winhlp32/Sv.rc similarity index 100% rename from reactos/base/applications/winhlp32/Sv.rc rename to base/applications/winhlp32/Sv.rc diff --git a/reactos/base/applications/winhlp32/Tr.rc b/base/applications/winhlp32/Tr.rc similarity index 100% rename from reactos/base/applications/winhlp32/Tr.rc rename to base/applications/winhlp32/Tr.rc diff --git a/reactos/base/applications/winhlp32/Uk.rc b/base/applications/winhlp32/Uk.rc similarity index 100% rename from reactos/base/applications/winhlp32/Uk.rc rename to base/applications/winhlp32/Uk.rc diff --git a/reactos/base/applications/winhlp32/Zh.rc b/base/applications/winhlp32/Zh.rc similarity index 100% rename from reactos/base/applications/winhlp32/Zh.rc rename to base/applications/winhlp32/Zh.rc diff --git a/reactos/base/applications/winhlp32/callback.c b/base/applications/winhlp32/callback.c similarity index 100% rename from reactos/base/applications/winhlp32/callback.c rename to base/applications/winhlp32/callback.c diff --git a/reactos/base/applications/winhlp32/hlpfile.c b/base/applications/winhlp32/hlpfile.c similarity index 100% rename from reactos/base/applications/winhlp32/hlpfile.c rename to base/applications/winhlp32/hlpfile.c diff --git a/reactos/base/applications/winhlp32/hlpfile.h b/base/applications/winhlp32/hlpfile.h similarity index 100% rename from reactos/base/applications/winhlp32/hlpfile.h rename to base/applications/winhlp32/hlpfile.h diff --git a/reactos/base/applications/winhlp32/lex.yy.c b/base/applications/winhlp32/lex.yy.c similarity index 100% rename from reactos/base/applications/winhlp32/lex.yy.c rename to base/applications/winhlp32/lex.yy.c diff --git a/reactos/base/applications/winhlp32/macro.c b/base/applications/winhlp32/macro.c similarity index 100% rename from reactos/base/applications/winhlp32/macro.c rename to base/applications/winhlp32/macro.c diff --git a/reactos/base/applications/winhlp32/macro.h b/base/applications/winhlp32/macro.h similarity index 100% rename from reactos/base/applications/winhlp32/macro.h rename to base/applications/winhlp32/macro.h diff --git a/reactos/base/applications/winhlp32/macro.lex.l b/base/applications/winhlp32/macro.lex.l similarity index 100% rename from reactos/base/applications/winhlp32/macro.lex.l rename to base/applications/winhlp32/macro.lex.l diff --git a/reactos/base/applications/winhlp32/rsrc.rc b/base/applications/winhlp32/rsrc.rc similarity index 100% rename from reactos/base/applications/winhlp32/rsrc.rc rename to base/applications/winhlp32/rsrc.rc diff --git a/reactos/base/applications/winhlp32/string.c b/base/applications/winhlp32/string.c similarity index 100% rename from reactos/base/applications/winhlp32/string.c rename to base/applications/winhlp32/string.c diff --git a/reactos/base/applications/winhlp32/winhelp.c b/base/applications/winhlp32/winhelp.c similarity index 100% rename from reactos/base/applications/winhlp32/winhelp.c rename to base/applications/winhlp32/winhelp.c diff --git a/reactos/base/applications/winhlp32/winhelp.h b/base/applications/winhlp32/winhelp.h similarity index 100% rename from reactos/base/applications/winhlp32/winhelp.h rename to base/applications/winhlp32/winhelp.h diff --git a/reactos/base/applications/winhlp32/winhelp.ico b/base/applications/winhlp32/winhelp.ico similarity index 100% rename from reactos/base/applications/winhlp32/winhelp.ico rename to base/applications/winhlp32/winhelp.ico diff --git a/reactos/base/applications/winhlp32/winhelp_res.h b/base/applications/winhlp32/winhelp_res.h similarity index 100% rename from reactos/base/applications/winhlp32/winhelp_res.h rename to base/applications/winhlp32/winhelp_res.h diff --git a/reactos/base/applications/winhlp32/winhlp32.rbuild b/base/applications/winhlp32/winhlp32.rbuild similarity index 100% rename from reactos/base/applications/winhlp32/winhlp32.rbuild rename to base/applications/winhlp32/winhlp32.rbuild diff --git a/reactos/base/applications/winver/CMakeLists.txt b/base/applications/winver/CMakeLists.txt similarity index 100% rename from reactos/base/applications/winver/CMakeLists.txt rename to base/applications/winver/CMakeLists.txt diff --git a/reactos/base/applications/winver/winver.c b/base/applications/winver/winver.c similarity index 100% rename from reactos/base/applications/winver/winver.c rename to base/applications/winver/winver.c diff --git a/reactos/base/applications/winver/winver.rbuild b/base/applications/winver/winver.rbuild similarity index 100% rename from reactos/base/applications/winver/winver.rbuild rename to base/applications/winver/winver.rbuild diff --git a/reactos/base/applications/wordpad/CMakeLists.txt b/base/applications/wordpad/CMakeLists.txt similarity index 100% rename from reactos/base/applications/wordpad/CMakeLists.txt rename to base/applications/wordpad/CMakeLists.txt diff --git a/reactos/base/applications/wordpad/Da.rc b/base/applications/wordpad/Da.rc similarity index 100% rename from reactos/base/applications/wordpad/Da.rc rename to base/applications/wordpad/Da.rc diff --git a/reactos/base/applications/wordpad/De.rc b/base/applications/wordpad/De.rc similarity index 100% rename from reactos/base/applications/wordpad/De.rc rename to base/applications/wordpad/De.rc diff --git a/reactos/base/applications/wordpad/En.rc b/base/applications/wordpad/En.rc similarity index 100% rename from reactos/base/applications/wordpad/En.rc rename to base/applications/wordpad/En.rc diff --git a/reactos/base/applications/wordpad/Fr.rc b/base/applications/wordpad/Fr.rc similarity index 100% rename from reactos/base/applications/wordpad/Fr.rc rename to base/applications/wordpad/Fr.rc diff --git a/reactos/base/applications/wordpad/Hu.rc b/base/applications/wordpad/Hu.rc similarity index 100% rename from reactos/base/applications/wordpad/Hu.rc rename to base/applications/wordpad/Hu.rc diff --git a/reactos/base/applications/wordpad/It.rc b/base/applications/wordpad/It.rc similarity index 100% rename from reactos/base/applications/wordpad/It.rc rename to base/applications/wordpad/It.rc diff --git a/reactos/base/applications/wordpad/Ja.rc b/base/applications/wordpad/Ja.rc similarity index 100% rename from reactos/base/applications/wordpad/Ja.rc rename to base/applications/wordpad/Ja.rc diff --git a/reactos/base/applications/wordpad/Ko.rc b/base/applications/wordpad/Ko.rc similarity index 100% rename from reactos/base/applications/wordpad/Ko.rc rename to base/applications/wordpad/Ko.rc diff --git a/reactos/base/applications/wordpad/Lt.rc b/base/applications/wordpad/Lt.rc similarity index 100% rename from reactos/base/applications/wordpad/Lt.rc rename to base/applications/wordpad/Lt.rc diff --git a/reactos/base/applications/wordpad/Nl.rc b/base/applications/wordpad/Nl.rc similarity index 100% rename from reactos/base/applications/wordpad/Nl.rc rename to base/applications/wordpad/Nl.rc diff --git a/reactos/base/applications/wordpad/No.rc b/base/applications/wordpad/No.rc similarity index 100% rename from reactos/base/applications/wordpad/No.rc rename to base/applications/wordpad/No.rc diff --git a/reactos/base/applications/wordpad/Pl.rc b/base/applications/wordpad/Pl.rc similarity index 100% rename from reactos/base/applications/wordpad/Pl.rc rename to base/applications/wordpad/Pl.rc diff --git a/reactos/base/applications/wordpad/Pt.rc b/base/applications/wordpad/Pt.rc similarity index 100% rename from reactos/base/applications/wordpad/Pt.rc rename to base/applications/wordpad/Pt.rc diff --git a/reactos/base/applications/wordpad/Ro.rc b/base/applications/wordpad/Ro.rc similarity index 100% rename from reactos/base/applications/wordpad/Ro.rc rename to base/applications/wordpad/Ro.rc diff --git a/reactos/base/applications/wordpad/Ru.rc b/base/applications/wordpad/Ru.rc similarity index 100% rename from reactos/base/applications/wordpad/Ru.rc rename to base/applications/wordpad/Ru.rc diff --git a/reactos/base/applications/wordpad/Si.rc b/base/applications/wordpad/Si.rc similarity index 100% rename from reactos/base/applications/wordpad/Si.rc rename to base/applications/wordpad/Si.rc diff --git a/reactos/base/applications/wordpad/Sv.rc b/base/applications/wordpad/Sv.rc similarity index 100% rename from reactos/base/applications/wordpad/Sv.rc rename to base/applications/wordpad/Sv.rc diff --git a/reactos/base/applications/wordpad/Tr.rc b/base/applications/wordpad/Tr.rc similarity index 100% rename from reactos/base/applications/wordpad/Tr.rc rename to base/applications/wordpad/Tr.rc diff --git a/reactos/base/applications/wordpad/Uk.rc b/base/applications/wordpad/Uk.rc similarity index 100% rename from reactos/base/applications/wordpad/Uk.rc rename to base/applications/wordpad/Uk.rc diff --git a/reactos/base/applications/wordpad/Zh.rc b/base/applications/wordpad/Zh.rc similarity index 100% rename from reactos/base/applications/wordpad/Zh.rc rename to base/applications/wordpad/Zh.rc diff --git a/reactos/base/applications/wordpad/formatbar.bmp b/base/applications/wordpad/formatbar.bmp similarity index 100% rename from reactos/base/applications/wordpad/formatbar.bmp rename to base/applications/wordpad/formatbar.bmp diff --git a/reactos/base/applications/wordpad/olecallback.c b/base/applications/wordpad/olecallback.c similarity index 100% rename from reactos/base/applications/wordpad/olecallback.c rename to base/applications/wordpad/olecallback.c diff --git a/reactos/base/applications/wordpad/print.c b/base/applications/wordpad/print.c similarity index 100% rename from reactos/base/applications/wordpad/print.c rename to base/applications/wordpad/print.c diff --git a/reactos/base/applications/wordpad/registry.c b/base/applications/wordpad/registry.c similarity index 100% rename from reactos/base/applications/wordpad/registry.c rename to base/applications/wordpad/registry.c diff --git a/reactos/base/applications/wordpad/rsrc.rc b/base/applications/wordpad/rsrc.rc similarity index 100% rename from reactos/base/applications/wordpad/rsrc.rc rename to base/applications/wordpad/rsrc.rc diff --git a/reactos/base/applications/wordpad/toolbar.bmp b/base/applications/wordpad/toolbar.bmp similarity index 100% rename from reactos/base/applications/wordpad/toolbar.bmp rename to base/applications/wordpad/toolbar.bmp diff --git a/reactos/base/applications/wordpad/wordpad.c b/base/applications/wordpad/wordpad.c similarity index 100% rename from reactos/base/applications/wordpad/wordpad.c rename to base/applications/wordpad/wordpad.c diff --git a/reactos/base/applications/wordpad/wordpad.h b/base/applications/wordpad/wordpad.h similarity index 100% rename from reactos/base/applications/wordpad/wordpad.h rename to base/applications/wordpad/wordpad.h diff --git a/reactos/base/applications/wordpad/wordpad.ico b/base/applications/wordpad/wordpad.ico similarity index 100% rename from reactos/base/applications/wordpad/wordpad.ico rename to base/applications/wordpad/wordpad.ico diff --git a/reactos/base/applications/wordpad/wordpad.rbuild b/base/applications/wordpad/wordpad.rbuild similarity index 100% rename from reactos/base/applications/wordpad/wordpad.rbuild rename to base/applications/wordpad/wordpad.rbuild diff --git a/reactos/base/applications/wordpad/zoom.cur b/base/applications/wordpad/zoom.cur similarity index 100% rename from reactos/base/applications/wordpad/zoom.cur rename to base/applications/wordpad/zoom.cur diff --git a/reactos/base/applications/write/CMakeLists.txt b/base/applications/write/CMakeLists.txt similarity index 100% rename from reactos/base/applications/write/CMakeLists.txt rename to base/applications/write/CMakeLists.txt diff --git a/reactos/base/applications/write/Da.rc b/base/applications/write/Da.rc similarity index 100% rename from reactos/base/applications/write/Da.rc rename to base/applications/write/Da.rc diff --git a/reactos/base/applications/write/De.rc b/base/applications/write/De.rc similarity index 100% rename from reactos/base/applications/write/De.rc rename to base/applications/write/De.rc diff --git a/reactos/base/applications/write/En.rc b/base/applications/write/En.rc similarity index 100% rename from reactos/base/applications/write/En.rc rename to base/applications/write/En.rc diff --git a/reactos/base/applications/write/Es.rc b/base/applications/write/Es.rc similarity index 100% rename from reactos/base/applications/write/Es.rc rename to base/applications/write/Es.rc diff --git a/reactos/base/applications/write/Fr.rc b/base/applications/write/Fr.rc similarity index 100% rename from reactos/base/applications/write/Fr.rc rename to base/applications/write/Fr.rc diff --git a/reactos/base/applications/write/It.rc b/base/applications/write/It.rc similarity index 100% rename from reactos/base/applications/write/It.rc rename to base/applications/write/It.rc diff --git a/reactos/base/applications/write/Ja.rc b/base/applications/write/Ja.rc similarity index 100% rename from reactos/base/applications/write/Ja.rc rename to base/applications/write/Ja.rc diff --git a/reactos/base/applications/write/Ko.rc b/base/applications/write/Ko.rc similarity index 100% rename from reactos/base/applications/write/Ko.rc rename to base/applications/write/Ko.rc diff --git a/reactos/base/applications/write/Lt.rc b/base/applications/write/Lt.rc similarity index 100% rename from reactos/base/applications/write/Lt.rc rename to base/applications/write/Lt.rc diff --git a/reactos/base/applications/write/Nl.rc b/base/applications/write/Nl.rc similarity index 100% rename from reactos/base/applications/write/Nl.rc rename to base/applications/write/Nl.rc diff --git a/reactos/base/applications/write/No.rc b/base/applications/write/No.rc similarity index 100% rename from reactos/base/applications/write/No.rc rename to base/applications/write/No.rc diff --git a/reactos/base/applications/write/Pl.rc b/base/applications/write/Pl.rc similarity index 100% rename from reactos/base/applications/write/Pl.rc rename to base/applications/write/Pl.rc diff --git a/reactos/base/applications/write/Pt.rc b/base/applications/write/Pt.rc similarity index 100% rename from reactos/base/applications/write/Pt.rc rename to base/applications/write/Pt.rc diff --git a/reactos/base/applications/write/Ro.rc b/base/applications/write/Ro.rc similarity index 100% rename from reactos/base/applications/write/Ro.rc rename to base/applications/write/Ro.rc diff --git a/reactos/base/applications/write/Ru.rc b/base/applications/write/Ru.rc similarity index 100% rename from reactos/base/applications/write/Ru.rc rename to base/applications/write/Ru.rc diff --git a/reactos/base/applications/write/Si.rc b/base/applications/write/Si.rc similarity index 100% rename from reactos/base/applications/write/Si.rc rename to base/applications/write/Si.rc diff --git a/reactos/base/applications/write/Sr.rc b/base/applications/write/Sr.rc similarity index 100% rename from reactos/base/applications/write/Sr.rc rename to base/applications/write/Sr.rc diff --git a/reactos/base/applications/write/Sv.rc b/base/applications/write/Sv.rc similarity index 100% rename from reactos/base/applications/write/Sv.rc rename to base/applications/write/Sv.rc diff --git a/reactos/base/applications/write/Uk.rc b/base/applications/write/Uk.rc similarity index 100% rename from reactos/base/applications/write/Uk.rc rename to base/applications/write/Uk.rc diff --git a/reactos/base/applications/write/Zh.rc b/base/applications/write/Zh.rc similarity index 100% rename from reactos/base/applications/write/Zh.rc rename to base/applications/write/Zh.rc diff --git a/reactos/base/applications/write/resources.h b/base/applications/write/resources.h similarity index 100% rename from reactos/base/applications/write/resources.h rename to base/applications/write/resources.h diff --git a/reactos/base/applications/write/rsrc.rc b/base/applications/write/rsrc.rc similarity index 100% rename from reactos/base/applications/write/rsrc.rc rename to base/applications/write/rsrc.rc diff --git a/reactos/base/applications/write/write.c b/base/applications/write/write.c similarity index 100% rename from reactos/base/applications/write/write.c rename to base/applications/write/write.c diff --git a/reactos/base/applications/write/write.rbuild b/base/applications/write/write.rbuild similarity index 100% rename from reactos/base/applications/write/write.rbuild rename to base/applications/write/write.rbuild diff --git a/reactos/base/base.rbuild b/base/base.rbuild similarity index 100% rename from reactos/base/base.rbuild rename to base/base.rbuild diff --git a/reactos/base/services/CMakeLists.txt b/base/services/CMakeLists.txt similarity index 100% rename from reactos/base/services/CMakeLists.txt rename to base/services/CMakeLists.txt diff --git a/reactos/base/services/audiosrv/CMakeLists.txt b/base/services/audiosrv/CMakeLists.txt similarity index 100% rename from reactos/base/services/audiosrv/CMakeLists.txt rename to base/services/audiosrv/CMakeLists.txt diff --git a/reactos/base/services/audiosrv/audiosrv.h b/base/services/audiosrv/audiosrv.h similarity index 100% rename from reactos/base/services/audiosrv/audiosrv.h rename to base/services/audiosrv/audiosrv.h diff --git a/reactos/base/services/audiosrv/audiosrv.rbuild b/base/services/audiosrv/audiosrv.rbuild similarity index 100% rename from reactos/base/services/audiosrv/audiosrv.rbuild rename to base/services/audiosrv/audiosrv.rbuild diff --git a/reactos/base/services/audiosrv/audiosrv.rc b/base/services/audiosrv/audiosrv.rc similarity index 100% rename from reactos/base/services/audiosrv/audiosrv.rc rename to base/services/audiosrv/audiosrv.rc diff --git a/reactos/base/services/audiosrv/audiosrv.txt b/base/services/audiosrv/audiosrv.txt similarity index 100% rename from reactos/base/services/audiosrv/audiosrv.txt rename to base/services/audiosrv/audiosrv.txt diff --git a/reactos/base/services/audiosrv/debug.c b/base/services/audiosrv/debug.c similarity index 100% rename from reactos/base/services/audiosrv/debug.c rename to base/services/audiosrv/debug.c diff --git a/reactos/base/services/audiosrv/main.c b/base/services/audiosrv/main.c similarity index 100% rename from reactos/base/services/audiosrv/main.c rename to base/services/audiosrv/main.c diff --git a/reactos/base/services/audiosrv/pnp.c b/base/services/audiosrv/pnp.c similarity index 100% rename from reactos/base/services/audiosrv/pnp.c rename to base/services/audiosrv/pnp.c diff --git a/reactos/base/services/audiosrv/pnp_list_lock.c b/base/services/audiosrv/pnp_list_lock.c similarity index 100% rename from reactos/base/services/audiosrv/pnp_list_lock.c rename to base/services/audiosrv/pnp_list_lock.c diff --git a/reactos/base/services/audiosrv/pnp_list_manager.c b/base/services/audiosrv/pnp_list_manager.c similarity index 100% rename from reactos/base/services/audiosrv/pnp_list_manager.c rename to base/services/audiosrv/pnp_list_manager.c diff --git a/reactos/base/services/audiosrv/services.c b/base/services/audiosrv/services.c similarity index 100% rename from reactos/base/services/audiosrv/services.c rename to base/services/audiosrv/services.c diff --git a/reactos/base/services/eventlog/CMakeLists.txt b/base/services/eventlog/CMakeLists.txt similarity index 100% rename from reactos/base/services/eventlog/CMakeLists.txt rename to base/services/eventlog/CMakeLists.txt diff --git a/reactos/base/services/eventlog/eventlog.c b/base/services/eventlog/eventlog.c similarity index 100% rename from reactos/base/services/eventlog/eventlog.c rename to base/services/eventlog/eventlog.c diff --git a/reactos/base/services/eventlog/eventlog.h b/base/services/eventlog/eventlog.h similarity index 100% rename from reactos/base/services/eventlog/eventlog.h rename to base/services/eventlog/eventlog.h diff --git a/reactos/base/services/eventlog/eventlog.rbuild b/base/services/eventlog/eventlog.rbuild similarity index 100% rename from reactos/base/services/eventlog/eventlog.rbuild rename to base/services/eventlog/eventlog.rbuild diff --git a/reactos/base/services/eventlog/eventlog.rc b/base/services/eventlog/eventlog.rc similarity index 100% rename from reactos/base/services/eventlog/eventlog.rc rename to base/services/eventlog/eventlog.rc diff --git a/reactos/base/services/eventlog/eventsource.c b/base/services/eventlog/eventsource.c similarity index 100% rename from reactos/base/services/eventlog/eventsource.c rename to base/services/eventlog/eventsource.c diff --git a/reactos/base/services/eventlog/file.c b/base/services/eventlog/file.c similarity index 100% rename from reactos/base/services/eventlog/file.c rename to base/services/eventlog/file.c diff --git a/reactos/base/services/eventlog/logport.c b/base/services/eventlog/logport.c similarity index 100% rename from reactos/base/services/eventlog/logport.c rename to base/services/eventlog/logport.c diff --git a/reactos/base/services/eventlog/rpc.c b/base/services/eventlog/rpc.c similarity index 100% rename from reactos/base/services/eventlog/rpc.c rename to base/services/eventlog/rpc.c diff --git a/reactos/base/services/rpcss/CMakeLists.txt b/base/services/rpcss/CMakeLists.txt similarity index 100% rename from reactos/base/services/rpcss/CMakeLists.txt rename to base/services/rpcss/CMakeLists.txt diff --git a/reactos/base/services/rpcss/epm.idl b/base/services/rpcss/epm.idl similarity index 100% rename from reactos/base/services/rpcss/epm.idl rename to base/services/rpcss/epm.idl diff --git a/reactos/base/services/rpcss/epmp.c b/base/services/rpcss/epmp.c similarity index 100% rename from reactos/base/services/rpcss/epmp.c rename to base/services/rpcss/epmp.c diff --git a/reactos/base/services/rpcss/irot.idl b/base/services/rpcss/irot.idl similarity index 100% rename from reactos/base/services/rpcss/irot.idl rename to base/services/rpcss/irot.idl diff --git a/reactos/base/services/rpcss/irotp.c b/base/services/rpcss/irotp.c similarity index 100% rename from reactos/base/services/rpcss/irotp.c rename to base/services/rpcss/irotp.c diff --git a/reactos/base/services/rpcss/rpcss.h b/base/services/rpcss/rpcss.h similarity index 100% rename from reactos/base/services/rpcss/rpcss.h rename to base/services/rpcss/rpcss.h diff --git a/reactos/base/services/rpcss/rpcss.rbuild b/base/services/rpcss/rpcss.rbuild similarity index 100% rename from reactos/base/services/rpcss/rpcss.rbuild rename to base/services/rpcss/rpcss.rbuild diff --git a/reactos/base/services/rpcss/rpcss.rc b/base/services/rpcss/rpcss.rc similarity index 100% rename from reactos/base/services/rpcss/rpcss.rc rename to base/services/rpcss/rpcss.rc diff --git a/reactos/base/services/rpcss/rpcss_main.c b/base/services/rpcss/rpcss_main.c similarity index 100% rename from reactos/base/services/rpcss/rpcss_main.c rename to base/services/rpcss/rpcss_main.c diff --git a/reactos/base/services/rpcss/rpcss_ros.diff b/base/services/rpcss/rpcss_ros.diff similarity index 100% rename from reactos/base/services/rpcss/rpcss_ros.diff rename to base/services/rpcss/rpcss_ros.diff diff --git a/reactos/base/services/rpcss/service_main.c b/base/services/rpcss/service_main.c similarity index 100% rename from reactos/base/services/rpcss/service_main.c rename to base/services/rpcss/service_main.c diff --git a/reactos/base/services/services.rbuild b/base/services/services.rbuild similarity index 100% rename from reactos/base/services/services.rbuild rename to base/services/services.rbuild diff --git a/reactos/base/services/spoolsv/CMakeLists.txt b/base/services/spoolsv/CMakeLists.txt similarity index 100% rename from reactos/base/services/spoolsv/CMakeLists.txt rename to base/services/spoolsv/CMakeLists.txt diff --git a/reactos/base/services/spoolsv/spoolsv.c b/base/services/spoolsv/spoolsv.c similarity index 100% rename from reactos/base/services/spoolsv/spoolsv.c rename to base/services/spoolsv/spoolsv.c diff --git a/reactos/base/services/spoolsv/spoolsv.rbuild b/base/services/spoolsv/spoolsv.rbuild similarity index 100% rename from reactos/base/services/spoolsv/spoolsv.rbuild rename to base/services/spoolsv/spoolsv.rbuild diff --git a/reactos/base/services/spoolsv/spoolsv.rc b/base/services/spoolsv/spoolsv.rc similarity index 100% rename from reactos/base/services/spoolsv/spoolsv.rc rename to base/services/spoolsv/spoolsv.rc diff --git a/reactos/base/services/svchost/CMakeLists.txt b/base/services/svchost/CMakeLists.txt similarity index 100% rename from reactos/base/services/svchost/CMakeLists.txt rename to base/services/svchost/CMakeLists.txt diff --git a/reactos/base/services/svchost/svchost.c b/base/services/svchost/svchost.c similarity index 100% rename from reactos/base/services/svchost/svchost.c rename to base/services/svchost/svchost.c diff --git a/reactos/base/services/svchost/svchost.h b/base/services/svchost/svchost.h similarity index 100% rename from reactos/base/services/svchost/svchost.h rename to base/services/svchost/svchost.h diff --git a/reactos/base/services/svchost/svchost.rbuild b/base/services/svchost/svchost.rbuild similarity index 100% rename from reactos/base/services/svchost/svchost.rbuild rename to base/services/svchost/svchost.rbuild diff --git a/reactos/base/services/svchost/svchost.rc b/base/services/svchost/svchost.rc similarity index 100% rename from reactos/base/services/svchost/svchost.rc rename to base/services/svchost/svchost.rc diff --git a/reactos/base/services/tcpsvcs/CMakeLists.txt b/base/services/tcpsvcs/CMakeLists.txt similarity index 100% rename from reactos/base/services/tcpsvcs/CMakeLists.txt rename to base/services/tcpsvcs/CMakeLists.txt diff --git a/reactos/base/services/tcpsvcs/chargen.c b/base/services/tcpsvcs/chargen.c similarity index 100% rename from reactos/base/services/tcpsvcs/chargen.c rename to base/services/tcpsvcs/chargen.c diff --git a/reactos/base/services/tcpsvcs/daytime.c b/base/services/tcpsvcs/daytime.c similarity index 100% rename from reactos/base/services/tcpsvcs/daytime.c rename to base/services/tcpsvcs/daytime.c diff --git a/reactos/base/services/tcpsvcs/discard.c b/base/services/tcpsvcs/discard.c similarity index 100% rename from reactos/base/services/tcpsvcs/discard.c rename to base/services/tcpsvcs/discard.c diff --git a/reactos/base/services/tcpsvcs/echo.c b/base/services/tcpsvcs/echo.c similarity index 100% rename from reactos/base/services/tcpsvcs/echo.c rename to base/services/tcpsvcs/echo.c diff --git a/reactos/base/services/tcpsvcs/log.c b/base/services/tcpsvcs/log.c similarity index 100% rename from reactos/base/services/tcpsvcs/log.c rename to base/services/tcpsvcs/log.c diff --git a/reactos/base/services/tcpsvcs/qotd.c b/base/services/tcpsvcs/qotd.c similarity index 100% rename from reactos/base/services/tcpsvcs/qotd.c rename to base/services/tcpsvcs/qotd.c diff --git a/reactos/base/services/tcpsvcs/quotes b/base/services/tcpsvcs/quotes similarity index 100% rename from reactos/base/services/tcpsvcs/quotes rename to base/services/tcpsvcs/quotes diff --git a/reactos/base/services/tcpsvcs/skelserver.c b/base/services/tcpsvcs/skelserver.c similarity index 100% rename from reactos/base/services/tcpsvcs/skelserver.c rename to base/services/tcpsvcs/skelserver.c diff --git a/reactos/base/services/tcpsvcs/tcpsvcs.c b/base/services/tcpsvcs/tcpsvcs.c similarity index 100% rename from reactos/base/services/tcpsvcs/tcpsvcs.c rename to base/services/tcpsvcs/tcpsvcs.c diff --git a/reactos/base/services/tcpsvcs/tcpsvcs.h b/base/services/tcpsvcs/tcpsvcs.h similarity index 100% rename from reactos/base/services/tcpsvcs/tcpsvcs.h rename to base/services/tcpsvcs/tcpsvcs.h diff --git a/reactos/base/services/tcpsvcs/tcpsvcs.rbuild b/base/services/tcpsvcs/tcpsvcs.rbuild similarity index 100% rename from reactos/base/services/tcpsvcs/tcpsvcs.rbuild rename to base/services/tcpsvcs/tcpsvcs.rbuild diff --git a/reactos/base/services/tcpsvcs/tcpsvcs.rc b/base/services/tcpsvcs/tcpsvcs.rc similarity index 100% rename from reactos/base/services/tcpsvcs/tcpsvcs.rc rename to base/services/tcpsvcs/tcpsvcs.rc diff --git a/reactos/base/services/telnetd/CMakeLists.txt b/base/services/telnetd/CMakeLists.txt similarity index 100% rename from reactos/base/services/telnetd/CMakeLists.txt rename to base/services/telnetd/CMakeLists.txt diff --git a/reactos/base/services/telnetd/serviceentry.c b/base/services/telnetd/serviceentry.c similarity index 100% rename from reactos/base/services/telnetd/serviceentry.c rename to base/services/telnetd/serviceentry.c diff --git a/reactos/base/services/telnetd/syslog.c b/base/services/telnetd/syslog.c similarity index 100% rename from reactos/base/services/telnetd/syslog.c rename to base/services/telnetd/syslog.c diff --git a/reactos/base/services/telnetd/syslog.h b/base/services/telnetd/syslog.h similarity index 100% rename from reactos/base/services/telnetd/syslog.h rename to base/services/telnetd/syslog.h diff --git a/reactos/base/services/telnetd/telnetd.c b/base/services/telnetd/telnetd.c similarity index 100% rename from reactos/base/services/telnetd/telnetd.c rename to base/services/telnetd/telnetd.c diff --git a/reactos/base/services/telnetd/telnetd.h b/base/services/telnetd/telnetd.h similarity index 100% rename from reactos/base/services/telnetd/telnetd.h rename to base/services/telnetd/telnetd.h diff --git a/reactos/base/services/telnetd/telnetd.rbuild b/base/services/telnetd/telnetd.rbuild similarity index 100% rename from reactos/base/services/telnetd/telnetd.rbuild rename to base/services/telnetd/telnetd.rbuild diff --git a/reactos/base/services/telnetd/telnetd.rc b/base/services/telnetd/telnetd.rc similarity index 100% rename from reactos/base/services/telnetd/telnetd.rc rename to base/services/telnetd/telnetd.rc diff --git a/reactos/base/services/telnetd/telnetd.vcproj b/base/services/telnetd/telnetd.vcproj similarity index 100% rename from reactos/base/services/telnetd/telnetd.vcproj rename to base/services/telnetd/telnetd.vcproj diff --git a/reactos/base/services/tftpd/CMakeLists.txt b/base/services/tftpd/CMakeLists.txt similarity index 100% rename from reactos/base/services/tftpd/CMakeLists.txt rename to base/services/tftpd/CMakeLists.txt diff --git a/reactos/base/services/tftpd/README.txt b/base/services/tftpd/README.txt similarity index 100% rename from reactos/base/services/tftpd/README.txt rename to base/services/tftpd/README.txt diff --git a/reactos/base/services/tftpd/tftpd.cpp b/base/services/tftpd/tftpd.cpp similarity index 100% rename from reactos/base/services/tftpd/tftpd.cpp rename to base/services/tftpd/tftpd.cpp diff --git a/reactos/base/services/tftpd/tftpd.h b/base/services/tftpd/tftpd.h similarity index 100% rename from reactos/base/services/tftpd/tftpd.h rename to base/services/tftpd/tftpd.h diff --git a/reactos/base/services/tftpd/tftpd.rbuild b/base/services/tftpd/tftpd.rbuild similarity index 100% rename from reactos/base/services/tftpd/tftpd.rbuild rename to base/services/tftpd/tftpd.rbuild diff --git a/reactos/base/services/thmsvc/CMakeLists.txt b/base/services/thmsvc/CMakeLists.txt similarity index 100% rename from reactos/base/services/thmsvc/CMakeLists.txt rename to base/services/thmsvc/CMakeLists.txt diff --git a/reactos/base/services/thmsvc/thmsvc.c b/base/services/thmsvc/thmsvc.c similarity index 100% rename from reactos/base/services/thmsvc/thmsvc.c rename to base/services/thmsvc/thmsvc.c diff --git a/reactos/base/services/thmsvc/thmsvc.rbuild b/base/services/thmsvc/thmsvc.rbuild similarity index 100% rename from reactos/base/services/thmsvc/thmsvc.rbuild rename to base/services/thmsvc/thmsvc.rbuild diff --git a/reactos/base/services/thmsvc/thmsvc.rc b/base/services/thmsvc/thmsvc.rc similarity index 100% rename from reactos/base/services/thmsvc/thmsvc.rc rename to base/services/thmsvc/thmsvc.rc diff --git a/reactos/base/services/umpnpmgr/CMakeLists.txt b/base/services/umpnpmgr/CMakeLists.txt similarity index 100% rename from reactos/base/services/umpnpmgr/CMakeLists.txt rename to base/services/umpnpmgr/CMakeLists.txt diff --git a/reactos/base/services/umpnpmgr/umpnpmgr.c b/base/services/umpnpmgr/umpnpmgr.c similarity index 100% rename from reactos/base/services/umpnpmgr/umpnpmgr.c rename to base/services/umpnpmgr/umpnpmgr.c diff --git a/reactos/base/services/umpnpmgr/umpnpmgr.rbuild b/base/services/umpnpmgr/umpnpmgr.rbuild similarity index 100% rename from reactos/base/services/umpnpmgr/umpnpmgr.rbuild rename to base/services/umpnpmgr/umpnpmgr.rbuild diff --git a/reactos/base/services/umpnpmgr/umpnpmgr.rc b/base/services/umpnpmgr/umpnpmgr.rc similarity index 100% rename from reactos/base/services/umpnpmgr/umpnpmgr.rc rename to base/services/umpnpmgr/umpnpmgr.rc diff --git a/reactos/base/services/wlansvc/CMakeLists.txt b/base/services/wlansvc/CMakeLists.txt similarity index 100% rename from reactos/base/services/wlansvc/CMakeLists.txt rename to base/services/wlansvc/CMakeLists.txt diff --git a/reactos/base/services/wlansvc/rpcserver.c b/base/services/wlansvc/rpcserver.c similarity index 100% rename from reactos/base/services/wlansvc/rpcserver.c rename to base/services/wlansvc/rpcserver.c diff --git a/reactos/base/services/wlansvc/wlansvc.c b/base/services/wlansvc/wlansvc.c similarity index 100% rename from reactos/base/services/wlansvc/wlansvc.c rename to base/services/wlansvc/wlansvc.c diff --git a/reactos/base/services/wlansvc/wlansvc.rbuild b/base/services/wlansvc/wlansvc.rbuild similarity index 100% rename from reactos/base/services/wlansvc/wlansvc.rbuild rename to base/services/wlansvc/wlansvc.rbuild diff --git a/reactos/base/setup/CMakeLists.txt b/base/setup/CMakeLists.txt similarity index 100% rename from reactos/base/setup/CMakeLists.txt rename to base/setup/CMakeLists.txt diff --git a/reactos/base/setup/reactos/CMakeLists.txt b/base/setup/reactos/CMakeLists.txt similarity index 100% rename from reactos/base/setup/reactos/CMakeLists.txt rename to base/setup/reactos/CMakeLists.txt diff --git a/reactos/base/setup/reactos/lang/bg-BG.rc b/base/setup/reactos/lang/bg-BG.rc similarity index 100% rename from reactos/base/setup/reactos/lang/bg-BG.rc rename to base/setup/reactos/lang/bg-BG.rc diff --git a/reactos/base/setup/reactos/lang/cs-CZ.rc b/base/setup/reactos/lang/cs-CZ.rc similarity index 100% rename from reactos/base/setup/reactos/lang/cs-CZ.rc rename to base/setup/reactos/lang/cs-CZ.rc diff --git a/reactos/base/setup/reactos/lang/de-DE.rc b/base/setup/reactos/lang/de-DE.rc similarity index 100% rename from reactos/base/setup/reactos/lang/de-DE.rc rename to base/setup/reactos/lang/de-DE.rc diff --git a/reactos/base/setup/reactos/lang/el-GR.rc b/base/setup/reactos/lang/el-GR.rc similarity index 100% rename from reactos/base/setup/reactos/lang/el-GR.rc rename to base/setup/reactos/lang/el-GR.rc diff --git a/reactos/base/setup/reactos/lang/en-US.rc b/base/setup/reactos/lang/en-US.rc similarity index 100% rename from reactos/base/setup/reactos/lang/en-US.rc rename to base/setup/reactos/lang/en-US.rc diff --git a/reactos/base/setup/reactos/lang/es-ES.rc b/base/setup/reactos/lang/es-ES.rc similarity index 100% rename from reactos/base/setup/reactos/lang/es-ES.rc rename to base/setup/reactos/lang/es-ES.rc diff --git a/reactos/base/setup/reactos/lang/et-EE.rc b/base/setup/reactos/lang/et-EE.rc similarity index 100% rename from reactos/base/setup/reactos/lang/et-EE.rc rename to base/setup/reactos/lang/et-EE.rc diff --git a/reactos/base/setup/reactos/lang/fi-FI.rc b/base/setup/reactos/lang/fi-FI.rc similarity index 100% rename from reactos/base/setup/reactos/lang/fi-FI.rc rename to base/setup/reactos/lang/fi-FI.rc diff --git a/reactos/base/setup/reactos/lang/fr-FR.rc b/base/setup/reactos/lang/fr-FR.rc similarity index 100% rename from reactos/base/setup/reactos/lang/fr-FR.rc rename to base/setup/reactos/lang/fr-FR.rc diff --git a/reactos/base/setup/reactos/lang/hu-HU.rc b/base/setup/reactos/lang/hu-HU.rc similarity index 100% rename from reactos/base/setup/reactos/lang/hu-HU.rc rename to base/setup/reactos/lang/hu-HU.rc diff --git a/reactos/base/setup/reactos/lang/it-IT.rc b/base/setup/reactos/lang/it-IT.rc similarity index 100% rename from reactos/base/setup/reactos/lang/it-IT.rc rename to base/setup/reactos/lang/it-IT.rc diff --git a/reactos/base/setup/reactos/lang/no-NO.rc b/base/setup/reactos/lang/no-NO.rc similarity index 100% rename from reactos/base/setup/reactos/lang/no-NO.rc rename to base/setup/reactos/lang/no-NO.rc diff --git a/reactos/base/setup/reactos/lang/pl-PL.rc b/base/setup/reactos/lang/pl-PL.rc similarity index 100% rename from reactos/base/setup/reactos/lang/pl-PL.rc rename to base/setup/reactos/lang/pl-PL.rc diff --git a/reactos/base/setup/reactos/lang/pt-BR.rc b/base/setup/reactos/lang/pt-BR.rc similarity index 100% rename from reactos/base/setup/reactos/lang/pt-BR.rc rename to base/setup/reactos/lang/pt-BR.rc diff --git a/reactos/base/setup/reactos/lang/ro-RO.rc b/base/setup/reactos/lang/ro-RO.rc similarity index 100% rename from reactos/base/setup/reactos/lang/ro-RO.rc rename to base/setup/reactos/lang/ro-RO.rc diff --git a/reactos/base/setup/reactos/lang/ru-RU.rc b/base/setup/reactos/lang/ru-RU.rc similarity index 100% rename from reactos/base/setup/reactos/lang/ru-RU.rc rename to base/setup/reactos/lang/ru-RU.rc diff --git a/reactos/base/setup/reactos/lang/sk-SK.rc b/base/setup/reactos/lang/sk-SK.rc similarity index 100% rename from reactos/base/setup/reactos/lang/sk-SK.rc rename to base/setup/reactos/lang/sk-SK.rc diff --git a/reactos/base/setup/reactos/lang/uk-UA.rc b/base/setup/reactos/lang/uk-UA.rc similarity index 100% rename from reactos/base/setup/reactos/lang/uk-UA.rc rename to base/setup/reactos/lang/uk-UA.rc diff --git a/reactos/base/setup/reactos/reactos.c b/base/setup/reactos/reactos.c similarity index 100% rename from reactos/base/setup/reactos/reactos.c rename to base/setup/reactos/reactos.c diff --git a/reactos/base/setup/reactos/reactos.rbuild b/base/setup/reactos/reactos.rbuild similarity index 100% rename from reactos/base/setup/reactos/reactos.rbuild rename to base/setup/reactos/reactos.rbuild diff --git a/reactos/base/setup/reactos/reactos.rc b/base/setup/reactos/reactos.rc similarity index 100% rename from reactos/base/setup/reactos/reactos.rc rename to base/setup/reactos/reactos.rc diff --git a/reactos/base/setup/reactos/res/header.bmp b/base/setup/reactos/res/header.bmp similarity index 100% rename from reactos/base/setup/reactos/res/header.bmp rename to base/setup/reactos/res/header.bmp diff --git a/reactos/base/setup/reactos/res/reactos.ico b/base/setup/reactos/res/reactos.ico similarity index 100% rename from reactos/base/setup/reactos/res/reactos.ico rename to base/setup/reactos/res/reactos.ico diff --git a/reactos/base/setup/reactos/res/rosbitmap.bmp b/base/setup/reactos/res/rosbitmap.bmp similarity index 100% rename from reactos/base/setup/reactos/res/rosbitmap.bmp rename to base/setup/reactos/res/rosbitmap.bmp diff --git a/reactos/base/setup/reactos/res/watermark.bmp b/base/setup/reactos/res/watermark.bmp similarity index 100% rename from reactos/base/setup/reactos/res/watermark.bmp rename to base/setup/reactos/res/watermark.bmp diff --git a/reactos/base/setup/reactos/resource.h b/base/setup/reactos/resource.h similarity index 100% rename from reactos/base/setup/reactos/resource.h rename to base/setup/reactos/resource.h diff --git a/reactos/base/setup/reactos/rsrc.rc b/base/setup/reactos/rsrc.rc similarity index 100% rename from reactos/base/setup/reactos/rsrc.rc rename to base/setup/reactos/rsrc.rc diff --git a/reactos/base/setup/setup.rbuild b/base/setup/setup.rbuild similarity index 100% rename from reactos/base/setup/setup.rbuild rename to base/setup/setup.rbuild diff --git a/reactos/base/setup/setup/CMakeLists.txt b/base/setup/setup/CMakeLists.txt similarity index 100% rename from reactos/base/setup/setup/CMakeLists.txt rename to base/setup/setup/CMakeLists.txt diff --git a/reactos/base/setup/setup/setup.c b/base/setup/setup/setup.c similarity index 100% rename from reactos/base/setup/setup/setup.c rename to base/setup/setup/setup.c diff --git a/reactos/base/setup/setup/setup.rbuild b/base/setup/setup/setup.rbuild similarity index 100% rename from reactos/base/setup/setup/setup.rbuild rename to base/setup/setup/setup.rbuild diff --git a/reactos/base/setup/setup/setup.rc b/base/setup/setup/setup.rc similarity index 100% rename from reactos/base/setup/setup/setup.rc rename to base/setup/setup/setup.rc diff --git a/reactos/base/setup/usetup/CMakeLists.txt b/base/setup/usetup/CMakeLists.txt similarity index 100% rename from reactos/base/setup/usetup/CMakeLists.txt rename to base/setup/usetup/CMakeLists.txt diff --git a/reactos/base/setup/usetup/bootsup.c b/base/setup/usetup/bootsup.c similarity index 100% rename from reactos/base/setup/usetup/bootsup.c rename to base/setup/usetup/bootsup.c diff --git a/reactos/base/setup/usetup/bootsup.h b/base/setup/usetup/bootsup.h similarity index 100% rename from reactos/base/setup/usetup/bootsup.h rename to base/setup/usetup/bootsup.h diff --git a/reactos/base/setup/usetup/cabinet.c b/base/setup/usetup/cabinet.c similarity index 100% rename from reactos/base/setup/usetup/cabinet.c rename to base/setup/usetup/cabinet.c diff --git a/reactos/base/setup/usetup/cabinet.h b/base/setup/usetup/cabinet.h similarity index 100% rename from reactos/base/setup/usetup/cabinet.h rename to base/setup/usetup/cabinet.h diff --git a/reactos/base/setup/usetup/chkdsk.c b/base/setup/usetup/chkdsk.c similarity index 100% rename from reactos/base/setup/usetup/chkdsk.c rename to base/setup/usetup/chkdsk.c diff --git a/reactos/base/setup/usetup/chkdsk.h b/base/setup/usetup/chkdsk.h similarity index 100% rename from reactos/base/setup/usetup/chkdsk.h rename to base/setup/usetup/chkdsk.h diff --git a/reactos/base/setup/usetup/drivesup.c b/base/setup/usetup/drivesup.c similarity index 100% rename from reactos/base/setup/usetup/drivesup.c rename to base/setup/usetup/drivesup.c diff --git a/reactos/base/setup/usetup/drivesup.h b/base/setup/usetup/drivesup.h similarity index 100% rename from reactos/base/setup/usetup/drivesup.h rename to base/setup/usetup/drivesup.h diff --git a/reactos/base/setup/usetup/errorcode.h b/base/setup/usetup/errorcode.h similarity index 100% rename from reactos/base/setup/usetup/errorcode.h rename to base/setup/usetup/errorcode.h diff --git a/reactos/base/setup/usetup/filequeue.c b/base/setup/usetup/filequeue.c similarity index 100% rename from reactos/base/setup/usetup/filequeue.c rename to base/setup/usetup/filequeue.c diff --git a/reactos/base/setup/usetup/filequeue.h b/base/setup/usetup/filequeue.h similarity index 100% rename from reactos/base/setup/usetup/filequeue.h rename to base/setup/usetup/filequeue.h diff --git a/reactos/base/setup/usetup/filesup.c b/base/setup/usetup/filesup.c similarity index 100% rename from reactos/base/setup/usetup/filesup.c rename to base/setup/usetup/filesup.c diff --git a/reactos/base/setup/usetup/filesup.h b/base/setup/usetup/filesup.h similarity index 100% rename from reactos/base/setup/usetup/filesup.h rename to base/setup/usetup/filesup.h diff --git a/reactos/base/setup/usetup/format.c b/base/setup/usetup/format.c similarity index 100% rename from reactos/base/setup/usetup/format.c rename to base/setup/usetup/format.c diff --git a/reactos/base/setup/usetup/format.h b/base/setup/usetup/format.h similarity index 100% rename from reactos/base/setup/usetup/format.h rename to base/setup/usetup/format.h diff --git a/reactos/base/setup/usetup/fslist.c b/base/setup/usetup/fslist.c similarity index 100% rename from reactos/base/setup/usetup/fslist.c rename to base/setup/usetup/fslist.c diff --git a/reactos/base/setup/usetup/fslist.h b/base/setup/usetup/fslist.h similarity index 100% rename from reactos/base/setup/usetup/fslist.h rename to base/setup/usetup/fslist.h diff --git a/reactos/base/setup/usetup/genlist.c b/base/setup/usetup/genlist.c similarity index 100% rename from reactos/base/setup/usetup/genlist.c rename to base/setup/usetup/genlist.c diff --git a/reactos/base/setup/usetup/genlist.h b/base/setup/usetup/genlist.h similarity index 100% rename from reactos/base/setup/usetup/genlist.h rename to base/setup/usetup/genlist.h diff --git a/reactos/base/setup/usetup/host.h b/base/setup/usetup/host.h similarity index 100% rename from reactos/base/setup/usetup/host.h rename to base/setup/usetup/host.h diff --git a/reactos/base/setup/usetup/inffile.c b/base/setup/usetup/inffile.c similarity index 100% rename from reactos/base/setup/usetup/inffile.c rename to base/setup/usetup/inffile.c diff --git a/reactos/base/setup/usetup/inffile.h b/base/setup/usetup/inffile.h similarity index 100% rename from reactos/base/setup/usetup/inffile.h rename to base/setup/usetup/inffile.h diff --git a/reactos/base/setup/usetup/inicache.c b/base/setup/usetup/inicache.c similarity index 100% rename from reactos/base/setup/usetup/inicache.c rename to base/setup/usetup/inicache.c diff --git a/reactos/base/setup/usetup/inicache.h b/base/setup/usetup/inicache.h similarity index 100% rename from reactos/base/setup/usetup/inicache.h rename to base/setup/usetup/inicache.h diff --git a/reactos/base/setup/usetup/interface/consup.c b/base/setup/usetup/interface/consup.c similarity index 100% rename from reactos/base/setup/usetup/interface/consup.c rename to base/setup/usetup/interface/consup.c diff --git a/reactos/base/setup/usetup/interface/consup.h b/base/setup/usetup/interface/consup.h similarity index 100% rename from reactos/base/setup/usetup/interface/consup.h rename to base/setup/usetup/interface/consup.h diff --git a/reactos/base/setup/usetup/interface/devinst.c b/base/setup/usetup/interface/devinst.c similarity index 100% rename from reactos/base/setup/usetup/interface/devinst.c rename to base/setup/usetup/interface/devinst.c diff --git a/reactos/base/setup/usetup/interface/usetup.c b/base/setup/usetup/interface/usetup.c similarity index 100% rename from reactos/base/setup/usetup/interface/usetup.c rename to base/setup/usetup/interface/usetup.c diff --git a/reactos/base/setup/usetup/lang/af-ZA.h b/base/setup/usetup/lang/af-ZA.h similarity index 100% rename from reactos/base/setup/usetup/lang/af-ZA.h rename to base/setup/usetup/lang/af-ZA.h diff --git a/reactos/base/setup/usetup/lang/ar-AE.h b/base/setup/usetup/lang/ar-AE.h similarity index 100% rename from reactos/base/setup/usetup/lang/ar-AE.h rename to base/setup/usetup/lang/ar-AE.h diff --git a/reactos/base/setup/usetup/lang/ar-BH.h b/base/setup/usetup/lang/ar-BH.h similarity index 100% rename from reactos/base/setup/usetup/lang/ar-BH.h rename to base/setup/usetup/lang/ar-BH.h diff --git a/reactos/base/setup/usetup/lang/ar-DZ.h b/base/setup/usetup/lang/ar-DZ.h similarity index 100% rename from reactos/base/setup/usetup/lang/ar-DZ.h rename to base/setup/usetup/lang/ar-DZ.h diff --git a/reactos/base/setup/usetup/lang/ar-EG.h b/base/setup/usetup/lang/ar-EG.h similarity index 100% rename from reactos/base/setup/usetup/lang/ar-EG.h rename to base/setup/usetup/lang/ar-EG.h diff --git a/reactos/base/setup/usetup/lang/ar-IQ.h b/base/setup/usetup/lang/ar-IQ.h similarity index 100% rename from reactos/base/setup/usetup/lang/ar-IQ.h rename to base/setup/usetup/lang/ar-IQ.h diff --git a/reactos/base/setup/usetup/lang/ar-JO.h b/base/setup/usetup/lang/ar-JO.h similarity index 100% rename from reactos/base/setup/usetup/lang/ar-JO.h rename to base/setup/usetup/lang/ar-JO.h diff --git a/reactos/base/setup/usetup/lang/ar-KW.h b/base/setup/usetup/lang/ar-KW.h similarity index 100% rename from reactos/base/setup/usetup/lang/ar-KW.h rename to base/setup/usetup/lang/ar-KW.h diff --git a/reactos/base/setup/usetup/lang/ar-LB.h b/base/setup/usetup/lang/ar-LB.h similarity index 100% rename from reactos/base/setup/usetup/lang/ar-LB.h rename to base/setup/usetup/lang/ar-LB.h diff --git a/reactos/base/setup/usetup/lang/ar-LY.h b/base/setup/usetup/lang/ar-LY.h similarity index 100% rename from reactos/base/setup/usetup/lang/ar-LY.h rename to base/setup/usetup/lang/ar-LY.h diff --git a/reactos/base/setup/usetup/lang/ar-MA.h b/base/setup/usetup/lang/ar-MA.h similarity index 100% rename from reactos/base/setup/usetup/lang/ar-MA.h rename to base/setup/usetup/lang/ar-MA.h diff --git a/reactos/base/setup/usetup/lang/ar-OM.h b/base/setup/usetup/lang/ar-OM.h similarity index 100% rename from reactos/base/setup/usetup/lang/ar-OM.h rename to base/setup/usetup/lang/ar-OM.h diff --git a/reactos/base/setup/usetup/lang/ar-QA.h b/base/setup/usetup/lang/ar-QA.h similarity index 100% rename from reactos/base/setup/usetup/lang/ar-QA.h rename to base/setup/usetup/lang/ar-QA.h diff --git a/reactos/base/setup/usetup/lang/ar-SA.h b/base/setup/usetup/lang/ar-SA.h similarity index 100% rename from reactos/base/setup/usetup/lang/ar-SA.h rename to base/setup/usetup/lang/ar-SA.h diff --git a/reactos/base/setup/usetup/lang/ar-SY.h b/base/setup/usetup/lang/ar-SY.h similarity index 100% rename from reactos/base/setup/usetup/lang/ar-SY.h rename to base/setup/usetup/lang/ar-SY.h diff --git a/reactos/base/setup/usetup/lang/ar-TN.h b/base/setup/usetup/lang/ar-TN.h similarity index 100% rename from reactos/base/setup/usetup/lang/ar-TN.h rename to base/setup/usetup/lang/ar-TN.h diff --git a/reactos/base/setup/usetup/lang/ar-YE.h b/base/setup/usetup/lang/ar-YE.h similarity index 100% rename from reactos/base/setup/usetup/lang/ar-YE.h rename to base/setup/usetup/lang/ar-YE.h diff --git a/reactos/base/setup/usetup/lang/az-AZ.h b/base/setup/usetup/lang/az-AZ.h similarity index 100% rename from reactos/base/setup/usetup/lang/az-AZ.h rename to base/setup/usetup/lang/az-AZ.h diff --git a/reactos/base/setup/usetup/lang/be-BY.h b/base/setup/usetup/lang/be-BY.h similarity index 100% rename from reactos/base/setup/usetup/lang/be-BY.h rename to base/setup/usetup/lang/be-BY.h diff --git a/reactos/base/setup/usetup/lang/bg-BG.h b/base/setup/usetup/lang/bg-BG.h similarity index 100% rename from reactos/base/setup/usetup/lang/bg-BG.h rename to base/setup/usetup/lang/bg-BG.h diff --git a/reactos/base/setup/usetup/lang/ca-ES.h b/base/setup/usetup/lang/ca-ES.h similarity index 100% rename from reactos/base/setup/usetup/lang/ca-ES.h rename to base/setup/usetup/lang/ca-ES.h diff --git a/reactos/base/setup/usetup/lang/cs-CZ.h b/base/setup/usetup/lang/cs-CZ.h similarity index 100% rename from reactos/base/setup/usetup/lang/cs-CZ.h rename to base/setup/usetup/lang/cs-CZ.h diff --git a/reactos/base/setup/usetup/lang/da-DK.h b/base/setup/usetup/lang/da-DK.h similarity index 100% rename from reactos/base/setup/usetup/lang/da-DK.h rename to base/setup/usetup/lang/da-DK.h diff --git a/reactos/base/setup/usetup/lang/de-AT.h b/base/setup/usetup/lang/de-AT.h similarity index 100% rename from reactos/base/setup/usetup/lang/de-AT.h rename to base/setup/usetup/lang/de-AT.h diff --git a/reactos/base/setup/usetup/lang/de-CH.h b/base/setup/usetup/lang/de-CH.h similarity index 100% rename from reactos/base/setup/usetup/lang/de-CH.h rename to base/setup/usetup/lang/de-CH.h diff --git a/reactos/base/setup/usetup/lang/de-DE.h b/base/setup/usetup/lang/de-DE.h similarity index 100% rename from reactos/base/setup/usetup/lang/de-DE.h rename to base/setup/usetup/lang/de-DE.h diff --git a/reactos/base/setup/usetup/lang/de-LI.h b/base/setup/usetup/lang/de-LI.h similarity index 100% rename from reactos/base/setup/usetup/lang/de-LI.h rename to base/setup/usetup/lang/de-LI.h diff --git a/reactos/base/setup/usetup/lang/de-LU.h b/base/setup/usetup/lang/de-LU.h similarity index 100% rename from reactos/base/setup/usetup/lang/de-LU.h rename to base/setup/usetup/lang/de-LU.h diff --git a/reactos/base/setup/usetup/lang/dv-MV.h b/base/setup/usetup/lang/dv-MV.h similarity index 100% rename from reactos/base/setup/usetup/lang/dv-MV.h rename to base/setup/usetup/lang/dv-MV.h diff --git a/reactos/base/setup/usetup/lang/el-GR.h b/base/setup/usetup/lang/el-GR.h similarity index 100% rename from reactos/base/setup/usetup/lang/el-GR.h rename to base/setup/usetup/lang/el-GR.h diff --git a/reactos/base/setup/usetup/lang/en-AU.h b/base/setup/usetup/lang/en-AU.h similarity index 100% rename from reactos/base/setup/usetup/lang/en-AU.h rename to base/setup/usetup/lang/en-AU.h diff --git a/reactos/base/setup/usetup/lang/en-BZ.h b/base/setup/usetup/lang/en-BZ.h similarity index 100% rename from reactos/base/setup/usetup/lang/en-BZ.h rename to base/setup/usetup/lang/en-BZ.h diff --git a/reactos/base/setup/usetup/lang/en-CA.h b/base/setup/usetup/lang/en-CA.h similarity index 100% rename from reactos/base/setup/usetup/lang/en-CA.h rename to base/setup/usetup/lang/en-CA.h diff --git a/reactos/base/setup/usetup/lang/en-CB.h b/base/setup/usetup/lang/en-CB.h similarity index 100% rename from reactos/base/setup/usetup/lang/en-CB.h rename to base/setup/usetup/lang/en-CB.h diff --git a/reactos/base/setup/usetup/lang/en-GB.h b/base/setup/usetup/lang/en-GB.h similarity index 100% rename from reactos/base/setup/usetup/lang/en-GB.h rename to base/setup/usetup/lang/en-GB.h diff --git a/reactos/base/setup/usetup/lang/en-IE.h b/base/setup/usetup/lang/en-IE.h similarity index 100% rename from reactos/base/setup/usetup/lang/en-IE.h rename to base/setup/usetup/lang/en-IE.h diff --git a/reactos/base/setup/usetup/lang/en-JM.h b/base/setup/usetup/lang/en-JM.h similarity index 100% rename from reactos/base/setup/usetup/lang/en-JM.h rename to base/setup/usetup/lang/en-JM.h diff --git a/reactos/base/setup/usetup/lang/en-NZ.h b/base/setup/usetup/lang/en-NZ.h similarity index 100% rename from reactos/base/setup/usetup/lang/en-NZ.h rename to base/setup/usetup/lang/en-NZ.h diff --git a/reactos/base/setup/usetup/lang/en-PH.h b/base/setup/usetup/lang/en-PH.h similarity index 100% rename from reactos/base/setup/usetup/lang/en-PH.h rename to base/setup/usetup/lang/en-PH.h diff --git a/reactos/base/setup/usetup/lang/en-TT.h b/base/setup/usetup/lang/en-TT.h similarity index 100% rename from reactos/base/setup/usetup/lang/en-TT.h rename to base/setup/usetup/lang/en-TT.h diff --git a/reactos/base/setup/usetup/lang/en-US.h b/base/setup/usetup/lang/en-US.h similarity index 100% rename from reactos/base/setup/usetup/lang/en-US.h rename to base/setup/usetup/lang/en-US.h diff --git a/reactos/base/setup/usetup/lang/en-ZA.h b/base/setup/usetup/lang/en-ZA.h similarity index 100% rename from reactos/base/setup/usetup/lang/en-ZA.h rename to base/setup/usetup/lang/en-ZA.h diff --git a/reactos/base/setup/usetup/lang/en-ZW.h b/base/setup/usetup/lang/en-ZW.h similarity index 100% rename from reactos/base/setup/usetup/lang/en-ZW.h rename to base/setup/usetup/lang/en-ZW.h diff --git a/reactos/base/setup/usetup/lang/eo-AA.h b/base/setup/usetup/lang/eo-AA.h similarity index 100% rename from reactos/base/setup/usetup/lang/eo-AA.h rename to base/setup/usetup/lang/eo-AA.h diff --git a/reactos/base/setup/usetup/lang/es-AR.h b/base/setup/usetup/lang/es-AR.h similarity index 100% rename from reactos/base/setup/usetup/lang/es-AR.h rename to base/setup/usetup/lang/es-AR.h diff --git a/reactos/base/setup/usetup/lang/es-BO.h b/base/setup/usetup/lang/es-BO.h similarity index 100% rename from reactos/base/setup/usetup/lang/es-BO.h rename to base/setup/usetup/lang/es-BO.h diff --git a/reactos/base/setup/usetup/lang/es-CL.h b/base/setup/usetup/lang/es-CL.h similarity index 100% rename from reactos/base/setup/usetup/lang/es-CL.h rename to base/setup/usetup/lang/es-CL.h diff --git a/reactos/base/setup/usetup/lang/es-CO.h b/base/setup/usetup/lang/es-CO.h similarity index 100% rename from reactos/base/setup/usetup/lang/es-CO.h rename to base/setup/usetup/lang/es-CO.h diff --git a/reactos/base/setup/usetup/lang/es-CR.h b/base/setup/usetup/lang/es-CR.h similarity index 100% rename from reactos/base/setup/usetup/lang/es-CR.h rename to base/setup/usetup/lang/es-CR.h diff --git a/reactos/base/setup/usetup/lang/es-DO.h b/base/setup/usetup/lang/es-DO.h similarity index 100% rename from reactos/base/setup/usetup/lang/es-DO.h rename to base/setup/usetup/lang/es-DO.h diff --git a/reactos/base/setup/usetup/lang/es-EC.h b/base/setup/usetup/lang/es-EC.h similarity index 100% rename from reactos/base/setup/usetup/lang/es-EC.h rename to base/setup/usetup/lang/es-EC.h diff --git a/reactos/base/setup/usetup/lang/es-ES.h b/base/setup/usetup/lang/es-ES.h similarity index 100% rename from reactos/base/setup/usetup/lang/es-ES.h rename to base/setup/usetup/lang/es-ES.h diff --git a/reactos/base/setup/usetup/lang/es-GT.h b/base/setup/usetup/lang/es-GT.h similarity index 100% rename from reactos/base/setup/usetup/lang/es-GT.h rename to base/setup/usetup/lang/es-GT.h diff --git a/reactos/base/setup/usetup/lang/es-HN.h b/base/setup/usetup/lang/es-HN.h similarity index 100% rename from reactos/base/setup/usetup/lang/es-HN.h rename to base/setup/usetup/lang/es-HN.h diff --git a/reactos/base/setup/usetup/lang/es-MX.h b/base/setup/usetup/lang/es-MX.h similarity index 100% rename from reactos/base/setup/usetup/lang/es-MX.h rename to base/setup/usetup/lang/es-MX.h diff --git a/reactos/base/setup/usetup/lang/es-NI.h b/base/setup/usetup/lang/es-NI.h similarity index 100% rename from reactos/base/setup/usetup/lang/es-NI.h rename to base/setup/usetup/lang/es-NI.h diff --git a/reactos/base/setup/usetup/lang/es-PA.h b/base/setup/usetup/lang/es-PA.h similarity index 100% rename from reactos/base/setup/usetup/lang/es-PA.h rename to base/setup/usetup/lang/es-PA.h diff --git a/reactos/base/setup/usetup/lang/es-PE.h b/base/setup/usetup/lang/es-PE.h similarity index 100% rename from reactos/base/setup/usetup/lang/es-PE.h rename to base/setup/usetup/lang/es-PE.h diff --git a/reactos/base/setup/usetup/lang/es-PR.h b/base/setup/usetup/lang/es-PR.h similarity index 100% rename from reactos/base/setup/usetup/lang/es-PR.h rename to base/setup/usetup/lang/es-PR.h diff --git a/reactos/base/setup/usetup/lang/es-PY.h b/base/setup/usetup/lang/es-PY.h similarity index 100% rename from reactos/base/setup/usetup/lang/es-PY.h rename to base/setup/usetup/lang/es-PY.h diff --git a/reactos/base/setup/usetup/lang/es-SV.h b/base/setup/usetup/lang/es-SV.h similarity index 100% rename from reactos/base/setup/usetup/lang/es-SV.h rename to base/setup/usetup/lang/es-SV.h diff --git a/reactos/base/setup/usetup/lang/es-UY.h b/base/setup/usetup/lang/es-UY.h similarity index 100% rename from reactos/base/setup/usetup/lang/es-UY.h rename to base/setup/usetup/lang/es-UY.h diff --git a/reactos/base/setup/usetup/lang/es-VE.h b/base/setup/usetup/lang/es-VE.h similarity index 100% rename from reactos/base/setup/usetup/lang/es-VE.h rename to base/setup/usetup/lang/es-VE.h diff --git a/reactos/base/setup/usetup/lang/et-EE.h b/base/setup/usetup/lang/et-EE.h similarity index 100% rename from reactos/base/setup/usetup/lang/et-EE.h rename to base/setup/usetup/lang/et-EE.h diff --git a/reactos/base/setup/usetup/lang/eu-ES.h b/base/setup/usetup/lang/eu-ES.h similarity index 100% rename from reactos/base/setup/usetup/lang/eu-ES.h rename to base/setup/usetup/lang/eu-ES.h diff --git a/reactos/base/setup/usetup/lang/fa-IR.h b/base/setup/usetup/lang/fa-IR.h similarity index 100% rename from reactos/base/setup/usetup/lang/fa-IR.h rename to base/setup/usetup/lang/fa-IR.h diff --git a/reactos/base/setup/usetup/lang/fi-FI.h b/base/setup/usetup/lang/fi-FI.h similarity index 100% rename from reactos/base/setup/usetup/lang/fi-FI.h rename to base/setup/usetup/lang/fi-FI.h diff --git a/reactos/base/setup/usetup/lang/fo-FO.h b/base/setup/usetup/lang/fo-FO.h similarity index 100% rename from reactos/base/setup/usetup/lang/fo-FO.h rename to base/setup/usetup/lang/fo-FO.h diff --git a/reactos/base/setup/usetup/lang/fr-BE.h b/base/setup/usetup/lang/fr-BE.h similarity index 100% rename from reactos/base/setup/usetup/lang/fr-BE.h rename to base/setup/usetup/lang/fr-BE.h diff --git a/reactos/base/setup/usetup/lang/fr-CA.h b/base/setup/usetup/lang/fr-CA.h similarity index 100% rename from reactos/base/setup/usetup/lang/fr-CA.h rename to base/setup/usetup/lang/fr-CA.h diff --git a/reactos/base/setup/usetup/lang/fr-CH.h b/base/setup/usetup/lang/fr-CH.h similarity index 100% rename from reactos/base/setup/usetup/lang/fr-CH.h rename to base/setup/usetup/lang/fr-CH.h diff --git a/reactos/base/setup/usetup/lang/fr-FR.h b/base/setup/usetup/lang/fr-FR.h similarity index 100% rename from reactos/base/setup/usetup/lang/fr-FR.h rename to base/setup/usetup/lang/fr-FR.h diff --git a/reactos/base/setup/usetup/lang/fr-LU.h b/base/setup/usetup/lang/fr-LU.h similarity index 100% rename from reactos/base/setup/usetup/lang/fr-LU.h rename to base/setup/usetup/lang/fr-LU.h diff --git a/reactos/base/setup/usetup/lang/fr-MC.h b/base/setup/usetup/lang/fr-MC.h similarity index 100% rename from reactos/base/setup/usetup/lang/fr-MC.h rename to base/setup/usetup/lang/fr-MC.h diff --git a/reactos/base/setup/usetup/lang/gl-ES.h b/base/setup/usetup/lang/gl-ES.h similarity index 100% rename from reactos/base/setup/usetup/lang/gl-ES.h rename to base/setup/usetup/lang/gl-ES.h diff --git a/reactos/base/setup/usetup/lang/gu-IN.h b/base/setup/usetup/lang/gu-IN.h similarity index 100% rename from reactos/base/setup/usetup/lang/gu-IN.h rename to base/setup/usetup/lang/gu-IN.h diff --git a/reactos/base/setup/usetup/lang/he-IL.h b/base/setup/usetup/lang/he-IL.h similarity index 100% rename from reactos/base/setup/usetup/lang/he-IL.h rename to base/setup/usetup/lang/he-IL.h diff --git a/reactos/base/setup/usetup/lang/hi-IN.h b/base/setup/usetup/lang/hi-IN.h similarity index 100% rename from reactos/base/setup/usetup/lang/hi-IN.h rename to base/setup/usetup/lang/hi-IN.h diff --git a/reactos/base/setup/usetup/lang/hr-HR.h b/base/setup/usetup/lang/hr-HR.h similarity index 100% rename from reactos/base/setup/usetup/lang/hr-HR.h rename to base/setup/usetup/lang/hr-HR.h diff --git a/reactos/base/setup/usetup/lang/hu-HU.h b/base/setup/usetup/lang/hu-HU.h similarity index 100% rename from reactos/base/setup/usetup/lang/hu-HU.h rename to base/setup/usetup/lang/hu-HU.h diff --git a/reactos/base/setup/usetup/lang/hy-AM.h b/base/setup/usetup/lang/hy-AM.h similarity index 100% rename from reactos/base/setup/usetup/lang/hy-AM.h rename to base/setup/usetup/lang/hy-AM.h diff --git a/reactos/base/setup/usetup/lang/id-ID.h b/base/setup/usetup/lang/id-ID.h similarity index 100% rename from reactos/base/setup/usetup/lang/id-ID.h rename to base/setup/usetup/lang/id-ID.h diff --git a/reactos/base/setup/usetup/lang/is-IS.h b/base/setup/usetup/lang/is-IS.h similarity index 100% rename from reactos/base/setup/usetup/lang/is-IS.h rename to base/setup/usetup/lang/is-IS.h diff --git a/reactos/base/setup/usetup/lang/it-CH.h b/base/setup/usetup/lang/it-CH.h similarity index 100% rename from reactos/base/setup/usetup/lang/it-CH.h rename to base/setup/usetup/lang/it-CH.h diff --git a/reactos/base/setup/usetup/lang/it-IT.h b/base/setup/usetup/lang/it-IT.h similarity index 100% rename from reactos/base/setup/usetup/lang/it-IT.h rename to base/setup/usetup/lang/it-IT.h diff --git a/reactos/base/setup/usetup/lang/ja-JP.h b/base/setup/usetup/lang/ja-JP.h similarity index 100% rename from reactos/base/setup/usetup/lang/ja-JP.h rename to base/setup/usetup/lang/ja-JP.h diff --git a/reactos/base/setup/usetup/lang/ka-GE.h b/base/setup/usetup/lang/ka-GE.h similarity index 100% rename from reactos/base/setup/usetup/lang/ka-GE.h rename to base/setup/usetup/lang/ka-GE.h diff --git a/reactos/base/setup/usetup/lang/kk-KZ.h b/base/setup/usetup/lang/kk-KZ.h similarity index 100% rename from reactos/base/setup/usetup/lang/kk-KZ.h rename to base/setup/usetup/lang/kk-KZ.h diff --git a/reactos/base/setup/usetup/lang/kn-IN.h b/base/setup/usetup/lang/kn-IN.h similarity index 100% rename from reactos/base/setup/usetup/lang/kn-IN.h rename to base/setup/usetup/lang/kn-IN.h diff --git a/reactos/base/setup/usetup/lang/ko-KR.h b/base/setup/usetup/lang/ko-KR.h similarity index 100% rename from reactos/base/setup/usetup/lang/ko-KR.h rename to base/setup/usetup/lang/ko-KR.h diff --git a/reactos/base/setup/usetup/lang/kok-IN.h b/base/setup/usetup/lang/kok-IN.h similarity index 100% rename from reactos/base/setup/usetup/lang/kok-IN.h rename to base/setup/usetup/lang/kok-IN.h diff --git a/reactos/base/setup/usetup/lang/ky-KG.h b/base/setup/usetup/lang/ky-KG.h similarity index 100% rename from reactos/base/setup/usetup/lang/ky-KG.h rename to base/setup/usetup/lang/ky-KG.h diff --git a/reactos/base/setup/usetup/lang/lt-LT.h b/base/setup/usetup/lang/lt-LT.h similarity index 100% rename from reactos/base/setup/usetup/lang/lt-LT.h rename to base/setup/usetup/lang/lt-LT.h diff --git a/reactos/base/setup/usetup/lang/lv-LV.h b/base/setup/usetup/lang/lv-LV.h similarity index 100% rename from reactos/base/setup/usetup/lang/lv-LV.h rename to base/setup/usetup/lang/lv-LV.h diff --git a/reactos/base/setup/usetup/lang/mk-MK.h b/base/setup/usetup/lang/mk-MK.h similarity index 100% rename from reactos/base/setup/usetup/lang/mk-MK.h rename to base/setup/usetup/lang/mk-MK.h diff --git a/reactos/base/setup/usetup/lang/mn-MN.h b/base/setup/usetup/lang/mn-MN.h similarity index 100% rename from reactos/base/setup/usetup/lang/mn-MN.h rename to base/setup/usetup/lang/mn-MN.h diff --git a/reactos/base/setup/usetup/lang/mr-IN.h b/base/setup/usetup/lang/mr-IN.h similarity index 100% rename from reactos/base/setup/usetup/lang/mr-IN.h rename to base/setup/usetup/lang/mr-IN.h diff --git a/reactos/base/setup/usetup/lang/ms-BN.h b/base/setup/usetup/lang/ms-BN.h similarity index 100% rename from reactos/base/setup/usetup/lang/ms-BN.h rename to base/setup/usetup/lang/ms-BN.h diff --git a/reactos/base/setup/usetup/lang/ms-MY.h b/base/setup/usetup/lang/ms-MY.h similarity index 100% rename from reactos/base/setup/usetup/lang/ms-MY.h rename to base/setup/usetup/lang/ms-MY.h diff --git a/reactos/base/setup/usetup/lang/my-MM.h b/base/setup/usetup/lang/my-MM.h similarity index 100% rename from reactos/base/setup/usetup/lang/my-MM.h rename to base/setup/usetup/lang/my-MM.h diff --git a/reactos/base/setup/usetup/lang/nl-BE.h b/base/setup/usetup/lang/nl-BE.h similarity index 100% rename from reactos/base/setup/usetup/lang/nl-BE.h rename to base/setup/usetup/lang/nl-BE.h diff --git a/reactos/base/setup/usetup/lang/nl-NL.h b/base/setup/usetup/lang/nl-NL.h similarity index 100% rename from reactos/base/setup/usetup/lang/nl-NL.h rename to base/setup/usetup/lang/nl-NL.h diff --git a/reactos/base/setup/usetup/lang/nn-NO.h b/base/setup/usetup/lang/nn-NO.h similarity index 100% rename from reactos/base/setup/usetup/lang/nn-NO.h rename to base/setup/usetup/lang/nn-NO.h diff --git a/reactos/base/setup/usetup/lang/pa-IN.h b/base/setup/usetup/lang/pa-IN.h similarity index 100% rename from reactos/base/setup/usetup/lang/pa-IN.h rename to base/setup/usetup/lang/pa-IN.h diff --git a/reactos/base/setup/usetup/lang/pl-PL.h b/base/setup/usetup/lang/pl-PL.h similarity index 100% rename from reactos/base/setup/usetup/lang/pl-PL.h rename to base/setup/usetup/lang/pl-PL.h diff --git a/reactos/base/setup/usetup/lang/pt-BR.h b/base/setup/usetup/lang/pt-BR.h similarity index 100% rename from reactos/base/setup/usetup/lang/pt-BR.h rename to base/setup/usetup/lang/pt-BR.h diff --git a/reactos/base/setup/usetup/lang/pt-PT.h b/base/setup/usetup/lang/pt-PT.h similarity index 100% rename from reactos/base/setup/usetup/lang/pt-PT.h rename to base/setup/usetup/lang/pt-PT.h diff --git a/reactos/base/setup/usetup/lang/rm-CH.h b/base/setup/usetup/lang/rm-CH.h similarity index 100% rename from reactos/base/setup/usetup/lang/rm-CH.h rename to base/setup/usetup/lang/rm-CH.h diff --git a/reactos/base/setup/usetup/lang/ro-RO.h b/base/setup/usetup/lang/ro-RO.h similarity index 100% rename from reactos/base/setup/usetup/lang/ro-RO.h rename to base/setup/usetup/lang/ro-RO.h diff --git a/reactos/base/setup/usetup/lang/ru-RU.h b/base/setup/usetup/lang/ru-RU.h similarity index 100% rename from reactos/base/setup/usetup/lang/ru-RU.h rename to base/setup/usetup/lang/ru-RU.h diff --git a/reactos/base/setup/usetup/lang/sa-IN.h b/base/setup/usetup/lang/sa-IN.h similarity index 100% rename from reactos/base/setup/usetup/lang/sa-IN.h rename to base/setup/usetup/lang/sa-IN.h diff --git a/reactos/base/setup/usetup/lang/sk-SK.h b/base/setup/usetup/lang/sk-SK.h similarity index 100% rename from reactos/base/setup/usetup/lang/sk-SK.h rename to base/setup/usetup/lang/sk-SK.h diff --git a/reactos/base/setup/usetup/lang/sl-SI.h b/base/setup/usetup/lang/sl-SI.h similarity index 100% rename from reactos/base/setup/usetup/lang/sl-SI.h rename to base/setup/usetup/lang/sl-SI.h diff --git a/reactos/base/setup/usetup/lang/sq-AL.h b/base/setup/usetup/lang/sq-AL.h similarity index 100% rename from reactos/base/setup/usetup/lang/sq-AL.h rename to base/setup/usetup/lang/sq-AL.h diff --git a/reactos/base/setup/usetup/lang/sr-SP.h b/base/setup/usetup/lang/sr-SP.h similarity index 100% rename from reactos/base/setup/usetup/lang/sr-SP.h rename to base/setup/usetup/lang/sr-SP.h diff --git a/reactos/base/setup/usetup/lang/sv-FI.h b/base/setup/usetup/lang/sv-FI.h similarity index 100% rename from reactos/base/setup/usetup/lang/sv-FI.h rename to base/setup/usetup/lang/sv-FI.h diff --git a/reactos/base/setup/usetup/lang/sv-SE.h b/base/setup/usetup/lang/sv-SE.h similarity index 100% rename from reactos/base/setup/usetup/lang/sv-SE.h rename to base/setup/usetup/lang/sv-SE.h diff --git a/reactos/base/setup/usetup/lang/sw-KE.h b/base/setup/usetup/lang/sw-KE.h similarity index 100% rename from reactos/base/setup/usetup/lang/sw-KE.h rename to base/setup/usetup/lang/sw-KE.h diff --git a/reactos/base/setup/usetup/lang/syr-SY.h b/base/setup/usetup/lang/syr-SY.h similarity index 100% rename from reactos/base/setup/usetup/lang/syr-SY.h rename to base/setup/usetup/lang/syr-SY.h diff --git a/reactos/base/setup/usetup/lang/ta-IN.h b/base/setup/usetup/lang/ta-IN.h similarity index 100% rename from reactos/base/setup/usetup/lang/ta-IN.h rename to base/setup/usetup/lang/ta-IN.h diff --git a/reactos/base/setup/usetup/lang/te-IN.h b/base/setup/usetup/lang/te-IN.h similarity index 100% rename from reactos/base/setup/usetup/lang/te-IN.h rename to base/setup/usetup/lang/te-IN.h diff --git a/reactos/base/setup/usetup/lang/th-TH.h b/base/setup/usetup/lang/th-TH.h similarity index 100% rename from reactos/base/setup/usetup/lang/th-TH.h rename to base/setup/usetup/lang/th-TH.h diff --git a/reactos/base/setup/usetup/lang/tr-TR.h b/base/setup/usetup/lang/tr-TR.h similarity index 100% rename from reactos/base/setup/usetup/lang/tr-TR.h rename to base/setup/usetup/lang/tr-TR.h diff --git a/reactos/base/setup/usetup/lang/tt-TA.h b/base/setup/usetup/lang/tt-TA.h similarity index 100% rename from reactos/base/setup/usetup/lang/tt-TA.h rename to base/setup/usetup/lang/tt-TA.h diff --git a/reactos/base/setup/usetup/lang/uk-UA.h b/base/setup/usetup/lang/uk-UA.h similarity index 100% rename from reactos/base/setup/usetup/lang/uk-UA.h rename to base/setup/usetup/lang/uk-UA.h diff --git a/reactos/base/setup/usetup/lang/ur-PK.h b/base/setup/usetup/lang/ur-PK.h similarity index 100% rename from reactos/base/setup/usetup/lang/ur-PK.h rename to base/setup/usetup/lang/ur-PK.h diff --git a/reactos/base/setup/usetup/lang/uz-UZ.h b/base/setup/usetup/lang/uz-UZ.h similarity index 100% rename from reactos/base/setup/usetup/lang/uz-UZ.h rename to base/setup/usetup/lang/uz-UZ.h diff --git a/reactos/base/setup/usetup/lang/vi-VN.h b/base/setup/usetup/lang/vi-VN.h similarity index 100% rename from reactos/base/setup/usetup/lang/vi-VN.h rename to base/setup/usetup/lang/vi-VN.h diff --git a/reactos/base/setup/usetup/lang/wa-BE.h b/base/setup/usetup/lang/wa-BE.h similarity index 100% rename from reactos/base/setup/usetup/lang/wa-BE.h rename to base/setup/usetup/lang/wa-BE.h diff --git a/reactos/base/setup/usetup/lang/zh-CN.h b/base/setup/usetup/lang/zh-CN.h similarity index 100% rename from reactos/base/setup/usetup/lang/zh-CN.h rename to base/setup/usetup/lang/zh-CN.h diff --git a/reactos/base/setup/usetup/lang/zh-HK.h b/base/setup/usetup/lang/zh-HK.h similarity index 100% rename from reactos/base/setup/usetup/lang/zh-HK.h rename to base/setup/usetup/lang/zh-HK.h diff --git a/reactos/base/setup/usetup/lang/zh-MO.h b/base/setup/usetup/lang/zh-MO.h similarity index 100% rename from reactos/base/setup/usetup/lang/zh-MO.h rename to base/setup/usetup/lang/zh-MO.h diff --git a/reactos/base/setup/usetup/lang/zh-SG.h b/base/setup/usetup/lang/zh-SG.h similarity index 100% rename from reactos/base/setup/usetup/lang/zh-SG.h rename to base/setup/usetup/lang/zh-SG.h diff --git a/reactos/base/setup/usetup/lang/zh-TW.h b/base/setup/usetup/lang/zh-TW.h similarity index 100% rename from reactos/base/setup/usetup/lang/zh-TW.h rename to base/setup/usetup/lang/zh-TW.h diff --git a/reactos/base/setup/usetup/mui.c b/base/setup/usetup/mui.c similarity index 100% rename from reactos/base/setup/usetup/mui.c rename to base/setup/usetup/mui.c diff --git a/reactos/base/setup/usetup/mui.h b/base/setup/usetup/mui.h similarity index 100% rename from reactos/base/setup/usetup/mui.h rename to base/setup/usetup/mui.h diff --git a/reactos/base/setup/usetup/muifonts.h b/base/setup/usetup/muifonts.h similarity index 100% rename from reactos/base/setup/usetup/muifonts.h rename to base/setup/usetup/muifonts.h diff --git a/reactos/base/setup/usetup/muilanguages.h b/base/setup/usetup/muilanguages.h similarity index 100% rename from reactos/base/setup/usetup/muilanguages.h rename to base/setup/usetup/muilanguages.h diff --git a/reactos/base/setup/usetup/native/console.c b/base/setup/usetup/native/console.c similarity index 100% rename from reactos/base/setup/usetup/native/console.c rename to base/setup/usetup/native/console.c diff --git a/reactos/base/setup/usetup/native/fslist.c b/base/setup/usetup/native/fslist.c similarity index 100% rename from reactos/base/setup/usetup/native/fslist.c rename to base/setup/usetup/native/fslist.c diff --git a/reactos/base/setup/usetup/native/host_native.h b/base/setup/usetup/native/host_native.h similarity index 100% rename from reactos/base/setup/usetup/native/host_native.h rename to base/setup/usetup/native/host_native.h diff --git a/reactos/base/setup/usetup/native/utils/console.c b/base/setup/usetup/native/utils/console.c similarity index 100% rename from reactos/base/setup/usetup/native/utils/console.c rename to base/setup/usetup/native/utils/console.c diff --git a/reactos/base/setup/usetup/native/utils/console.h b/base/setup/usetup/native/utils/console.h similarity index 100% rename from reactos/base/setup/usetup/native/utils/console.h rename to base/setup/usetup/native/utils/console.h diff --git a/reactos/base/setup/usetup/native/utils/keytrans.c b/base/setup/usetup/native/utils/keytrans.c similarity index 100% rename from reactos/base/setup/usetup/native/utils/keytrans.c rename to base/setup/usetup/native/utils/keytrans.c diff --git a/reactos/base/setup/usetup/native/utils/keytrans.h b/base/setup/usetup/native/utils/keytrans.h similarity index 100% rename from reactos/base/setup/usetup/native/utils/keytrans.h rename to base/setup/usetup/native/utils/keytrans.h diff --git a/reactos/base/setup/usetup/partlist.c b/base/setup/usetup/partlist.c similarity index 100% rename from reactos/base/setup/usetup/partlist.c rename to base/setup/usetup/partlist.c diff --git a/reactos/base/setup/usetup/partlist.h b/base/setup/usetup/partlist.h similarity index 100% rename from reactos/base/setup/usetup/partlist.h rename to base/setup/usetup/partlist.h diff --git a/reactos/base/setup/usetup/progress.c b/base/setup/usetup/progress.c similarity index 100% rename from reactos/base/setup/usetup/progress.c rename to base/setup/usetup/progress.c diff --git a/reactos/base/setup/usetup/progress.h b/base/setup/usetup/progress.h similarity index 100% rename from reactos/base/setup/usetup/progress.h rename to base/setup/usetup/progress.h diff --git a/reactos/base/setup/usetup/registry.c b/base/setup/usetup/registry.c similarity index 100% rename from reactos/base/setup/usetup/registry.c rename to base/setup/usetup/registry.c diff --git a/reactos/base/setup/usetup/registry.h b/base/setup/usetup/registry.h similarity index 100% rename from reactos/base/setup/usetup/registry.h rename to base/setup/usetup/registry.h diff --git a/reactos/base/setup/usetup/settings.c b/base/setup/usetup/settings.c similarity index 100% rename from reactos/base/setup/usetup/settings.c rename to base/setup/usetup/settings.c diff --git a/reactos/base/setup/usetup/settings.h b/base/setup/usetup/settings.h similarity index 100% rename from reactos/base/setup/usetup/settings.h rename to base/setup/usetup/settings.h diff --git a/reactos/base/setup/usetup/usetup.h b/base/setup/usetup/usetup.h similarity index 100% rename from reactos/base/setup/usetup/usetup.h rename to base/setup/usetup/usetup.h diff --git a/reactos/base/setup/usetup/usetup.rbuild b/base/setup/usetup/usetup.rbuild similarity index 100% rename from reactos/base/setup/usetup/usetup.rbuild rename to base/setup/usetup/usetup.rbuild diff --git a/reactos/base/setup/usetup/usetup.rc b/base/setup/usetup/usetup.rc similarity index 100% rename from reactos/base/setup/usetup/usetup.rc rename to base/setup/usetup/usetup.rc diff --git a/reactos/base/setup/vmwinst/CMakeLists.txt b/base/setup/vmwinst/CMakeLists.txt similarity index 100% rename from reactos/base/setup/vmwinst/CMakeLists.txt rename to base/setup/vmwinst/CMakeLists.txt diff --git a/reactos/base/setup/vmwinst/lang/bg-BG.rc b/base/setup/vmwinst/lang/bg-BG.rc similarity index 100% rename from reactos/base/setup/vmwinst/lang/bg-BG.rc rename to base/setup/vmwinst/lang/bg-BG.rc diff --git a/reactos/base/setup/vmwinst/lang/cs-CZ.rc b/base/setup/vmwinst/lang/cs-CZ.rc similarity index 100% rename from reactos/base/setup/vmwinst/lang/cs-CZ.rc rename to base/setup/vmwinst/lang/cs-CZ.rc diff --git a/reactos/base/setup/vmwinst/lang/da-DK.rc b/base/setup/vmwinst/lang/da-DK.rc similarity index 100% rename from reactos/base/setup/vmwinst/lang/da-DK.rc rename to base/setup/vmwinst/lang/da-DK.rc diff --git a/reactos/base/setup/vmwinst/lang/de-DE.rc b/base/setup/vmwinst/lang/de-DE.rc similarity index 100% rename from reactos/base/setup/vmwinst/lang/de-DE.rc rename to base/setup/vmwinst/lang/de-DE.rc diff --git a/reactos/base/setup/vmwinst/lang/el-GR.rc b/base/setup/vmwinst/lang/el-GR.rc similarity index 100% rename from reactos/base/setup/vmwinst/lang/el-GR.rc rename to base/setup/vmwinst/lang/el-GR.rc diff --git a/reactos/base/setup/vmwinst/lang/en-US.rc b/base/setup/vmwinst/lang/en-US.rc similarity index 100% rename from reactos/base/setup/vmwinst/lang/en-US.rc rename to base/setup/vmwinst/lang/en-US.rc diff --git a/reactos/base/setup/vmwinst/lang/es-ES.rc b/base/setup/vmwinst/lang/es-ES.rc similarity index 100% rename from reactos/base/setup/vmwinst/lang/es-ES.rc rename to base/setup/vmwinst/lang/es-ES.rc diff --git a/reactos/base/setup/vmwinst/lang/fr-FR.rc b/base/setup/vmwinst/lang/fr-FR.rc similarity index 100% rename from reactos/base/setup/vmwinst/lang/fr-FR.rc rename to base/setup/vmwinst/lang/fr-FR.rc diff --git a/reactos/base/setup/vmwinst/lang/hu-HU.rc b/base/setup/vmwinst/lang/hu-HU.rc similarity index 100% rename from reactos/base/setup/vmwinst/lang/hu-HU.rc rename to base/setup/vmwinst/lang/hu-HU.rc diff --git a/reactos/base/setup/vmwinst/lang/id-ID.rc b/base/setup/vmwinst/lang/id-ID.rc similarity index 100% rename from reactos/base/setup/vmwinst/lang/id-ID.rc rename to base/setup/vmwinst/lang/id-ID.rc diff --git a/reactos/base/setup/vmwinst/lang/it-IT.rc b/base/setup/vmwinst/lang/it-IT.rc similarity index 100% rename from reactos/base/setup/vmwinst/lang/it-IT.rc rename to base/setup/vmwinst/lang/it-IT.rc diff --git a/reactos/base/setup/vmwinst/lang/ja-JP.rc b/base/setup/vmwinst/lang/ja-JP.rc similarity index 100% rename from reactos/base/setup/vmwinst/lang/ja-JP.rc rename to base/setup/vmwinst/lang/ja-JP.rc diff --git a/reactos/base/setup/vmwinst/lang/lt-LT.rc b/base/setup/vmwinst/lang/lt-LT.rc similarity index 100% rename from reactos/base/setup/vmwinst/lang/lt-LT.rc rename to base/setup/vmwinst/lang/lt-LT.rc diff --git a/reactos/base/setup/vmwinst/lang/no-NO.rc b/base/setup/vmwinst/lang/no-NO.rc similarity index 100% rename from reactos/base/setup/vmwinst/lang/no-NO.rc rename to base/setup/vmwinst/lang/no-NO.rc diff --git a/reactos/base/setup/vmwinst/lang/pl-PL.rc b/base/setup/vmwinst/lang/pl-PL.rc similarity index 100% rename from reactos/base/setup/vmwinst/lang/pl-PL.rc rename to base/setup/vmwinst/lang/pl-PL.rc diff --git a/reactos/base/setup/vmwinst/lang/ro-RO.rc b/base/setup/vmwinst/lang/ro-RO.rc similarity index 100% rename from reactos/base/setup/vmwinst/lang/ro-RO.rc rename to base/setup/vmwinst/lang/ro-RO.rc diff --git a/reactos/base/setup/vmwinst/lang/ru-RU.rc b/base/setup/vmwinst/lang/ru-RU.rc similarity index 100% rename from reactos/base/setup/vmwinst/lang/ru-RU.rc rename to base/setup/vmwinst/lang/ru-RU.rc diff --git a/reactos/base/setup/vmwinst/lang/sk-SK.rc b/base/setup/vmwinst/lang/sk-SK.rc similarity index 100% rename from reactos/base/setup/vmwinst/lang/sk-SK.rc rename to base/setup/vmwinst/lang/sk-SK.rc diff --git a/reactos/base/setup/vmwinst/lang/sv-SE.rc b/base/setup/vmwinst/lang/sv-SE.rc similarity index 100% rename from reactos/base/setup/vmwinst/lang/sv-SE.rc rename to base/setup/vmwinst/lang/sv-SE.rc diff --git a/reactos/base/setup/vmwinst/lang/uk-UA.rc b/base/setup/vmwinst/lang/uk-UA.rc similarity index 100% rename from reactos/base/setup/vmwinst/lang/uk-UA.rc rename to base/setup/vmwinst/lang/uk-UA.rc diff --git a/reactos/base/setup/vmwinst/lang/zh-CN.rc b/base/setup/vmwinst/lang/zh-CN.rc similarity index 100% rename from reactos/base/setup/vmwinst/lang/zh-CN.rc rename to base/setup/vmwinst/lang/zh-CN.rc diff --git a/reactos/base/setup/vmwinst/resources/header.bmp b/base/setup/vmwinst/resources/header.bmp similarity index 100% rename from reactos/base/setup/vmwinst/resources/header.bmp rename to base/setup/vmwinst/resources/header.bmp diff --git a/reactos/base/setup/vmwinst/resources/watermark.bmp b/base/setup/vmwinst/resources/watermark.bmp similarity index 100% rename from reactos/base/setup/vmwinst/resources/watermark.bmp rename to base/setup/vmwinst/resources/watermark.bmp diff --git a/reactos/base/setup/vmwinst/rsrc.rc b/base/setup/vmwinst/rsrc.rc similarity index 100% rename from reactos/base/setup/vmwinst/rsrc.rc rename to base/setup/vmwinst/rsrc.rc diff --git a/reactos/base/setup/vmwinst/vmwinst.c b/base/setup/vmwinst/vmwinst.c similarity index 100% rename from reactos/base/setup/vmwinst/vmwinst.c rename to base/setup/vmwinst/vmwinst.c diff --git a/reactos/base/setup/vmwinst/vmwinst.h b/base/setup/vmwinst/vmwinst.h similarity index 100% rename from reactos/base/setup/vmwinst/vmwinst.h rename to base/setup/vmwinst/vmwinst.h diff --git a/reactos/base/setup/vmwinst/vmwinst.rbuild b/base/setup/vmwinst/vmwinst.rbuild similarity index 100% rename from reactos/base/setup/vmwinst/vmwinst.rbuild rename to base/setup/vmwinst/vmwinst.rbuild diff --git a/reactos/base/setup/vmwinst/vmwinst.rc b/base/setup/vmwinst/vmwinst.rc similarity index 100% rename from reactos/base/setup/vmwinst/vmwinst.rc rename to base/setup/vmwinst/vmwinst.rc diff --git a/reactos/base/setup/welcome/CMakeLists.txt b/base/setup/welcome/CMakeLists.txt similarity index 100% rename from reactos/base/setup/welcome/CMakeLists.txt rename to base/setup/welcome/CMakeLists.txt diff --git a/reactos/base/setup/welcome/lang/bg-BG.rc b/base/setup/welcome/lang/bg-BG.rc similarity index 100% rename from reactos/base/setup/welcome/lang/bg-BG.rc rename to base/setup/welcome/lang/bg-BG.rc diff --git a/reactos/base/setup/welcome/lang/cs-CZ.rc b/base/setup/welcome/lang/cs-CZ.rc similarity index 100% rename from reactos/base/setup/welcome/lang/cs-CZ.rc rename to base/setup/welcome/lang/cs-CZ.rc diff --git a/reactos/base/setup/welcome/lang/da-DK.rc b/base/setup/welcome/lang/da-DK.rc similarity index 100% rename from reactos/base/setup/welcome/lang/da-DK.rc rename to base/setup/welcome/lang/da-DK.rc diff --git a/reactos/base/setup/welcome/lang/de-DE.rc b/base/setup/welcome/lang/de-DE.rc similarity index 100% rename from reactos/base/setup/welcome/lang/de-DE.rc rename to base/setup/welcome/lang/de-DE.rc diff --git a/reactos/base/setup/welcome/lang/el-GR.rc b/base/setup/welcome/lang/el-GR.rc similarity index 100% rename from reactos/base/setup/welcome/lang/el-GR.rc rename to base/setup/welcome/lang/el-GR.rc diff --git a/reactos/base/setup/welcome/lang/en-US.rc b/base/setup/welcome/lang/en-US.rc similarity index 100% rename from reactos/base/setup/welcome/lang/en-US.rc rename to base/setup/welcome/lang/en-US.rc diff --git a/reactos/base/setup/welcome/lang/es-ES.rc b/base/setup/welcome/lang/es-ES.rc similarity index 100% rename from reactos/base/setup/welcome/lang/es-ES.rc rename to base/setup/welcome/lang/es-ES.rc diff --git a/reactos/base/setup/welcome/lang/et-EE.rc b/base/setup/welcome/lang/et-EE.rc similarity index 100% rename from reactos/base/setup/welcome/lang/et-EE.rc rename to base/setup/welcome/lang/et-EE.rc diff --git a/reactos/base/setup/welcome/lang/fr-FR.rc b/base/setup/welcome/lang/fr-FR.rc similarity index 100% rename from reactos/base/setup/welcome/lang/fr-FR.rc rename to base/setup/welcome/lang/fr-FR.rc diff --git a/reactos/base/setup/welcome/lang/hu-HU.rc b/base/setup/welcome/lang/hu-HU.rc similarity index 100% rename from reactos/base/setup/welcome/lang/hu-HU.rc rename to base/setup/welcome/lang/hu-HU.rc diff --git a/reactos/base/setup/welcome/lang/id-ID.rc b/base/setup/welcome/lang/id-ID.rc similarity index 100% rename from reactos/base/setup/welcome/lang/id-ID.rc rename to base/setup/welcome/lang/id-ID.rc diff --git a/reactos/base/setup/welcome/lang/it-IT.rc b/base/setup/welcome/lang/it-IT.rc similarity index 100% rename from reactos/base/setup/welcome/lang/it-IT.rc rename to base/setup/welcome/lang/it-IT.rc diff --git a/reactos/base/setup/welcome/lang/ja-JP.rc b/base/setup/welcome/lang/ja-JP.rc similarity index 100% rename from reactos/base/setup/welcome/lang/ja-JP.rc rename to base/setup/welcome/lang/ja-JP.rc diff --git a/reactos/base/setup/welcome/lang/lt-LT.rc b/base/setup/welcome/lang/lt-LT.rc similarity index 100% rename from reactos/base/setup/welcome/lang/lt-LT.rc rename to base/setup/welcome/lang/lt-LT.rc diff --git a/reactos/base/setup/welcome/lang/nl-NL.rc b/base/setup/welcome/lang/nl-NL.rc similarity index 100% rename from reactos/base/setup/welcome/lang/nl-NL.rc rename to base/setup/welcome/lang/nl-NL.rc diff --git a/reactos/base/setup/welcome/lang/no-NO.rc b/base/setup/welcome/lang/no-NO.rc similarity index 100% rename from reactos/base/setup/welcome/lang/no-NO.rc rename to base/setup/welcome/lang/no-NO.rc diff --git a/reactos/base/setup/welcome/lang/pl-PL.rc b/base/setup/welcome/lang/pl-PL.rc similarity index 100% rename from reactos/base/setup/welcome/lang/pl-PL.rc rename to base/setup/welcome/lang/pl-PL.rc diff --git a/reactos/base/setup/welcome/lang/pt-BR.rc b/base/setup/welcome/lang/pt-BR.rc similarity index 100% rename from reactos/base/setup/welcome/lang/pt-BR.rc rename to base/setup/welcome/lang/pt-BR.rc diff --git a/reactos/base/setup/welcome/lang/ro-RO.rc b/base/setup/welcome/lang/ro-RO.rc similarity index 100% rename from reactos/base/setup/welcome/lang/ro-RO.rc rename to base/setup/welcome/lang/ro-RO.rc diff --git a/reactos/base/setup/welcome/lang/ru-RU.rc b/base/setup/welcome/lang/ru-RU.rc similarity index 100% rename from reactos/base/setup/welcome/lang/ru-RU.rc rename to base/setup/welcome/lang/ru-RU.rc diff --git a/reactos/base/setup/welcome/lang/sk-SK.rc b/base/setup/welcome/lang/sk-SK.rc similarity index 100% rename from reactos/base/setup/welcome/lang/sk-SK.rc rename to base/setup/welcome/lang/sk-SK.rc diff --git a/reactos/base/setup/welcome/lang/sv-SE.rc b/base/setup/welcome/lang/sv-SE.rc similarity index 100% rename from reactos/base/setup/welcome/lang/sv-SE.rc rename to base/setup/welcome/lang/sv-SE.rc diff --git a/reactos/base/setup/welcome/lang/th-TH.rc b/base/setup/welcome/lang/th-TH.rc similarity index 100% rename from reactos/base/setup/welcome/lang/th-TH.rc rename to base/setup/welcome/lang/th-TH.rc diff --git a/reactos/base/setup/welcome/lang/uk-UA.rc b/base/setup/welcome/lang/uk-UA.rc similarity index 100% rename from reactos/base/setup/welcome/lang/uk-UA.rc rename to base/setup/welcome/lang/uk-UA.rc diff --git a/reactos/base/setup/welcome/lang/zh-CN.rc b/base/setup/welcome/lang/zh-CN.rc similarity index 100% rename from reactos/base/setup/welcome/lang/zh-CN.rc rename to base/setup/welcome/lang/zh-CN.rc diff --git a/reactos/base/setup/welcome/res/title.bmp b/base/setup/welcome/res/title.bmp similarity index 100% rename from reactos/base/setup/welcome/res/title.bmp rename to base/setup/welcome/res/title.bmp diff --git a/reactos/base/setup/welcome/res/welcome.ico b/base/setup/welcome/res/welcome.ico similarity index 100% rename from reactos/base/setup/welcome/res/welcome.ico rename to base/setup/welcome/res/welcome.ico diff --git a/reactos/base/setup/welcome/resource.h b/base/setup/welcome/resource.h similarity index 100% rename from reactos/base/setup/welcome/resource.h rename to base/setup/welcome/resource.h diff --git a/reactos/base/setup/welcome/rsrc.rc b/base/setup/welcome/rsrc.rc similarity index 100% rename from reactos/base/setup/welcome/rsrc.rc rename to base/setup/welcome/rsrc.rc diff --git a/reactos/base/setup/welcome/welcome.c b/base/setup/welcome/welcome.c similarity index 100% rename from reactos/base/setup/welcome/welcome.c rename to base/setup/welcome/welcome.c diff --git a/reactos/base/setup/welcome/welcome.rbuild b/base/setup/welcome/welcome.rbuild similarity index 100% rename from reactos/base/setup/welcome/welcome.rbuild rename to base/setup/welcome/welcome.rbuild diff --git a/reactos/base/setup/welcome/welcome.rc b/base/setup/welcome/welcome.rc similarity index 100% rename from reactos/base/setup/welcome/welcome.rc rename to base/setup/welcome/welcome.rc diff --git a/reactos/base/shell/CMakeLists.txt b/base/shell/CMakeLists.txt similarity index 100% rename from reactos/base/shell/CMakeLists.txt rename to base/shell/CMakeLists.txt diff --git a/reactos/base/shell/cmd/CMakeLists.txt b/base/shell/cmd/CMakeLists.txt similarity index 100% rename from reactos/base/shell/cmd/CMakeLists.txt rename to base/shell/cmd/CMakeLists.txt diff --git a/reactos/base/shell/cmd/alias.c b/base/shell/cmd/alias.c similarity index 100% rename from reactos/base/shell/cmd/alias.c rename to base/shell/cmd/alias.c diff --git a/reactos/base/shell/cmd/assoc.c b/base/shell/cmd/assoc.c similarity index 100% rename from reactos/base/shell/cmd/assoc.c rename to base/shell/cmd/assoc.c diff --git a/reactos/base/shell/cmd/attrib.c b/base/shell/cmd/attrib.c similarity index 100% rename from reactos/base/shell/cmd/attrib.c rename to base/shell/cmd/attrib.c diff --git a/reactos/base/shell/cmd/batch.c b/base/shell/cmd/batch.c similarity index 100% rename from reactos/base/shell/cmd/batch.c rename to base/shell/cmd/batch.c diff --git a/reactos/base/shell/cmd/batch.h b/base/shell/cmd/batch.h similarity index 100% rename from reactos/base/shell/cmd/batch.h rename to base/shell/cmd/batch.h diff --git a/reactos/base/shell/cmd/beep.c b/base/shell/cmd/beep.c similarity index 100% rename from reactos/base/shell/cmd/beep.c rename to base/shell/cmd/beep.c diff --git a/reactos/base/shell/cmd/call.c b/base/shell/cmd/call.c similarity index 100% rename from reactos/base/shell/cmd/call.c rename to base/shell/cmd/call.c diff --git a/reactos/base/shell/cmd/chcp.c b/base/shell/cmd/chcp.c similarity index 100% rename from reactos/base/shell/cmd/chcp.c rename to base/shell/cmd/chcp.c diff --git a/reactos/base/shell/cmd/choice.c b/base/shell/cmd/choice.c similarity index 100% rename from reactos/base/shell/cmd/choice.c rename to base/shell/cmd/choice.c diff --git a/reactos/base/shell/cmd/cls.c b/base/shell/cmd/cls.c similarity index 100% rename from reactos/base/shell/cmd/cls.c rename to base/shell/cmd/cls.c diff --git a/reactos/base/shell/cmd/cmd.c b/base/shell/cmd/cmd.c similarity index 100% rename from reactos/base/shell/cmd/cmd.c rename to base/shell/cmd/cmd.c diff --git a/reactos/base/shell/cmd/cmd.h b/base/shell/cmd/cmd.h similarity index 100% rename from reactos/base/shell/cmd/cmd.h rename to base/shell/cmd/cmd.h diff --git a/reactos/base/shell/cmd/cmd.rbuild b/base/shell/cmd/cmd.rbuild similarity index 100% rename from reactos/base/shell/cmd/cmd.rbuild rename to base/shell/cmd/cmd.rbuild diff --git a/reactos/base/shell/cmd/cmd.rc b/base/shell/cmd/cmd.rc similarity index 100% rename from reactos/base/shell/cmd/cmd.rc rename to base/shell/cmd/cmd.rc diff --git a/reactos/base/shell/cmd/cmddbg.c b/base/shell/cmd/cmddbg.c similarity index 100% rename from reactos/base/shell/cmd/cmddbg.c rename to base/shell/cmd/cmddbg.c diff --git a/reactos/base/shell/cmd/cmddbg.h b/base/shell/cmd/cmddbg.h similarity index 100% rename from reactos/base/shell/cmd/cmddbg.h rename to base/shell/cmd/cmddbg.h diff --git a/reactos/base/shell/cmd/cmdinput.c b/base/shell/cmd/cmdinput.c similarity index 100% rename from reactos/base/shell/cmd/cmdinput.c rename to base/shell/cmd/cmdinput.c diff --git a/reactos/base/shell/cmd/cmdtable.c b/base/shell/cmd/cmdtable.c similarity index 100% rename from reactos/base/shell/cmd/cmdtable.c rename to base/shell/cmd/cmdtable.c diff --git a/reactos/base/shell/cmd/cmdver.h b/base/shell/cmd/cmdver.h similarity index 100% rename from reactos/base/shell/cmd/cmdver.h rename to base/shell/cmd/cmdver.h diff --git a/reactos/base/shell/cmd/color.c b/base/shell/cmd/color.c similarity index 100% rename from reactos/base/shell/cmd/color.c rename to base/shell/cmd/color.c diff --git a/reactos/base/shell/cmd/config.h b/base/shell/cmd/config.h similarity index 100% rename from reactos/base/shell/cmd/config.h rename to base/shell/cmd/config.h diff --git a/reactos/base/shell/cmd/console.c b/base/shell/cmd/console.c similarity index 100% rename from reactos/base/shell/cmd/console.c rename to base/shell/cmd/console.c diff --git a/reactos/base/shell/cmd/copy.c b/base/shell/cmd/copy.c similarity index 100% rename from reactos/base/shell/cmd/copy.c rename to base/shell/cmd/copy.c diff --git a/reactos/base/shell/cmd/date.c b/base/shell/cmd/date.c similarity index 100% rename from reactos/base/shell/cmd/date.c rename to base/shell/cmd/date.c diff --git a/reactos/base/shell/cmd/del.c b/base/shell/cmd/del.c similarity index 100% rename from reactos/base/shell/cmd/del.c rename to base/shell/cmd/del.c diff --git a/reactos/base/shell/cmd/delay.c b/base/shell/cmd/delay.c similarity index 100% rename from reactos/base/shell/cmd/delay.c rename to base/shell/cmd/delay.c diff --git a/reactos/base/shell/cmd/dir.c b/base/shell/cmd/dir.c similarity index 100% rename from reactos/base/shell/cmd/dir.c rename to base/shell/cmd/dir.c diff --git a/reactos/base/shell/cmd/dirstack.c b/base/shell/cmd/dirstack.c similarity index 100% rename from reactos/base/shell/cmd/dirstack.c rename to base/shell/cmd/dirstack.c diff --git a/reactos/base/shell/cmd/echo.c b/base/shell/cmd/echo.c similarity index 100% rename from reactos/base/shell/cmd/echo.c rename to base/shell/cmd/echo.c diff --git a/reactos/base/shell/cmd/error.c b/base/shell/cmd/error.c similarity index 100% rename from reactos/base/shell/cmd/error.c rename to base/shell/cmd/error.c diff --git a/reactos/base/shell/cmd/filecomp.c b/base/shell/cmd/filecomp.c similarity index 100% rename from reactos/base/shell/cmd/filecomp.c rename to base/shell/cmd/filecomp.c diff --git a/reactos/base/shell/cmd/files.txt b/base/shell/cmd/files.txt similarity index 100% rename from reactos/base/shell/cmd/files.txt rename to base/shell/cmd/files.txt diff --git a/reactos/base/shell/cmd/for.c b/base/shell/cmd/for.c similarity index 100% rename from reactos/base/shell/cmd/for.c rename to base/shell/cmd/for.c diff --git a/reactos/base/shell/cmd/free.c b/base/shell/cmd/free.c similarity index 100% rename from reactos/base/shell/cmd/free.c rename to base/shell/cmd/free.c diff --git a/reactos/base/shell/cmd/goto.c b/base/shell/cmd/goto.c similarity index 100% rename from reactos/base/shell/cmd/goto.c rename to base/shell/cmd/goto.c diff --git a/reactos/base/shell/cmd/history.c b/base/shell/cmd/history.c similarity index 100% rename from reactos/base/shell/cmd/history.c rename to base/shell/cmd/history.c diff --git a/reactos/base/shell/cmd/history.txt b/base/shell/cmd/history.txt similarity index 100% rename from reactos/base/shell/cmd/history.txt rename to base/shell/cmd/history.txt diff --git a/reactos/base/shell/cmd/if.c b/base/shell/cmd/if.c similarity index 100% rename from reactos/base/shell/cmd/if.c rename to base/shell/cmd/if.c diff --git a/reactos/base/shell/cmd/internal.c b/base/shell/cmd/internal.c similarity index 100% rename from reactos/base/shell/cmd/internal.c rename to base/shell/cmd/internal.c diff --git a/reactos/base/shell/cmd/label.c b/base/shell/cmd/label.c similarity index 100% rename from reactos/base/shell/cmd/label.c rename to base/shell/cmd/label.c diff --git a/reactos/base/shell/cmd/lang/de-DE.rc b/base/shell/cmd/lang/de-DE.rc similarity index 100% rename from reactos/base/shell/cmd/lang/de-DE.rc rename to base/shell/cmd/lang/de-DE.rc diff --git a/reactos/base/shell/cmd/lang/el-GR.rc b/base/shell/cmd/lang/el-GR.rc similarity index 100% rename from reactos/base/shell/cmd/lang/el-GR.rc rename to base/shell/cmd/lang/el-GR.rc diff --git a/reactos/base/shell/cmd/lang/en-US.rc b/base/shell/cmd/lang/en-US.rc similarity index 100% rename from reactos/base/shell/cmd/lang/en-US.rc rename to base/shell/cmd/lang/en-US.rc diff --git a/reactos/base/shell/cmd/lang/es-ES.rc b/base/shell/cmd/lang/es-ES.rc similarity index 100% rename from reactos/base/shell/cmd/lang/es-ES.rc rename to base/shell/cmd/lang/es-ES.rc diff --git a/reactos/base/shell/cmd/lang/fr-FR.rc b/base/shell/cmd/lang/fr-FR.rc similarity index 100% rename from reactos/base/shell/cmd/lang/fr-FR.rc rename to base/shell/cmd/lang/fr-FR.rc diff --git a/reactos/base/shell/cmd/lang/hu-HU.rc b/base/shell/cmd/lang/hu-HU.rc similarity index 100% rename from reactos/base/shell/cmd/lang/hu-HU.rc rename to base/shell/cmd/lang/hu-HU.rc diff --git a/reactos/base/shell/cmd/lang/id-ID.rc b/base/shell/cmd/lang/id-ID.rc similarity index 100% rename from reactos/base/shell/cmd/lang/id-ID.rc rename to base/shell/cmd/lang/id-ID.rc diff --git a/reactos/base/shell/cmd/lang/it-IT.rc b/base/shell/cmd/lang/it-IT.rc similarity index 100% rename from reactos/base/shell/cmd/lang/it-IT.rc rename to base/shell/cmd/lang/it-IT.rc diff --git a/reactos/base/shell/cmd/lang/ja-JP.rc b/base/shell/cmd/lang/ja-JP.rc similarity index 100% rename from reactos/base/shell/cmd/lang/ja-JP.rc rename to base/shell/cmd/lang/ja-JP.rc diff --git a/reactos/base/shell/cmd/lang/no-NO.rc b/base/shell/cmd/lang/no-NO.rc similarity index 100% rename from reactos/base/shell/cmd/lang/no-NO.rc rename to base/shell/cmd/lang/no-NO.rc diff --git a/reactos/base/shell/cmd/lang/pl-PL.rc b/base/shell/cmd/lang/pl-PL.rc similarity index 100% rename from reactos/base/shell/cmd/lang/pl-PL.rc rename to base/shell/cmd/lang/pl-PL.rc diff --git a/reactos/base/shell/cmd/lang/ro-RO.rc b/base/shell/cmd/lang/ro-RO.rc similarity index 100% rename from reactos/base/shell/cmd/lang/ro-RO.rc rename to base/shell/cmd/lang/ro-RO.rc diff --git a/reactos/base/shell/cmd/lang/ru-RU.rc b/base/shell/cmd/lang/ru-RU.rc similarity index 100% rename from reactos/base/shell/cmd/lang/ru-RU.rc rename to base/shell/cmd/lang/ru-RU.rc diff --git a/reactos/base/shell/cmd/lang/sk-SK.rc b/base/shell/cmd/lang/sk-SK.rc similarity index 100% rename from reactos/base/shell/cmd/lang/sk-SK.rc rename to base/shell/cmd/lang/sk-SK.rc diff --git a/reactos/base/shell/cmd/lang/sv-SE.rc b/base/shell/cmd/lang/sv-SE.rc similarity index 100% rename from reactos/base/shell/cmd/lang/sv-SE.rc rename to base/shell/cmd/lang/sv-SE.rc diff --git a/reactos/base/shell/cmd/lang/uk-UA.rc b/base/shell/cmd/lang/uk-UA.rc similarity index 100% rename from reactos/base/shell/cmd/lang/uk-UA.rc rename to base/shell/cmd/lang/uk-UA.rc diff --git a/reactos/base/shell/cmd/lang/zh-CN.rc b/base/shell/cmd/lang/zh-CN.rc similarity index 100% rename from reactos/base/shell/cmd/lang/zh-CN.rc rename to base/shell/cmd/lang/zh-CN.rc diff --git a/reactos/base/shell/cmd/license.txt b/base/shell/cmd/license.txt similarity index 100% rename from reactos/base/shell/cmd/license.txt rename to base/shell/cmd/license.txt diff --git a/reactos/base/shell/cmd/locale.c b/base/shell/cmd/locale.c similarity index 100% rename from reactos/base/shell/cmd/locale.c rename to base/shell/cmd/locale.c diff --git a/reactos/base/shell/cmd/main.c b/base/shell/cmd/main.c similarity index 100% rename from reactos/base/shell/cmd/main.c rename to base/shell/cmd/main.c diff --git a/reactos/base/shell/cmd/memory.c b/base/shell/cmd/memory.c similarity index 100% rename from reactos/base/shell/cmd/memory.c rename to base/shell/cmd/memory.c diff --git a/reactos/base/shell/cmd/misc.c b/base/shell/cmd/misc.c similarity index 100% rename from reactos/base/shell/cmd/misc.c rename to base/shell/cmd/misc.c diff --git a/reactos/base/shell/cmd/mklink.c b/base/shell/cmd/mklink.c similarity index 100% rename from reactos/base/shell/cmd/mklink.c rename to base/shell/cmd/mklink.c diff --git a/reactos/base/shell/cmd/move.c b/base/shell/cmd/move.c similarity index 100% rename from reactos/base/shell/cmd/move.c rename to base/shell/cmd/move.c diff --git a/reactos/base/shell/cmd/msgbox.c b/base/shell/cmd/msgbox.c similarity index 100% rename from reactos/base/shell/cmd/msgbox.c rename to base/shell/cmd/msgbox.c diff --git a/reactos/base/shell/cmd/parser.c b/base/shell/cmd/parser.c similarity index 100% rename from reactos/base/shell/cmd/parser.c rename to base/shell/cmd/parser.c diff --git a/reactos/base/shell/cmd/path.c b/base/shell/cmd/path.c similarity index 100% rename from reactos/base/shell/cmd/path.c rename to base/shell/cmd/path.c diff --git a/reactos/base/shell/cmd/pause.c b/base/shell/cmd/pause.c similarity index 100% rename from reactos/base/shell/cmd/pause.c rename to base/shell/cmd/pause.c diff --git a/reactos/base/shell/cmd/precomp.h b/base/shell/cmd/precomp.h similarity index 100% rename from reactos/base/shell/cmd/precomp.h rename to base/shell/cmd/precomp.h diff --git a/reactos/base/shell/cmd/prompt.c b/base/shell/cmd/prompt.c similarity index 100% rename from reactos/base/shell/cmd/prompt.c rename to base/shell/cmd/prompt.c diff --git a/reactos/base/shell/cmd/readme.txt b/base/shell/cmd/readme.txt similarity index 100% rename from reactos/base/shell/cmd/readme.txt rename to base/shell/cmd/readme.txt diff --git a/reactos/base/shell/cmd/readme2.txt b/base/shell/cmd/readme2.txt similarity index 100% rename from reactos/base/shell/cmd/readme2.txt rename to base/shell/cmd/readme2.txt diff --git a/reactos/base/shell/cmd/redir.c b/base/shell/cmd/redir.c similarity index 100% rename from reactos/base/shell/cmd/redir.c rename to base/shell/cmd/redir.c diff --git a/reactos/base/shell/cmd/ren.c b/base/shell/cmd/ren.c similarity index 100% rename from reactos/base/shell/cmd/ren.c rename to base/shell/cmd/ren.c diff --git a/reactos/base/shell/cmd/ren.txt b/base/shell/cmd/ren.txt similarity index 100% rename from reactos/base/shell/cmd/ren.txt rename to base/shell/cmd/ren.txt diff --git a/reactos/base/shell/cmd/replace.c b/base/shell/cmd/replace.c similarity index 100% rename from reactos/base/shell/cmd/replace.c rename to base/shell/cmd/replace.c diff --git a/reactos/base/shell/cmd/res/terminal.ico b/base/shell/cmd/res/terminal.ico similarity index 100% rename from reactos/base/shell/cmd/res/terminal.ico rename to base/shell/cmd/res/terminal.ico diff --git a/reactos/base/shell/cmd/resource.h b/base/shell/cmd/resource.h similarity index 100% rename from reactos/base/shell/cmd/resource.h rename to base/shell/cmd/resource.h diff --git a/reactos/base/shell/cmd/rsrc.rc b/base/shell/cmd/rsrc.rc similarity index 100% rename from reactos/base/shell/cmd/rsrc.rc rename to base/shell/cmd/rsrc.rc diff --git a/reactos/base/shell/cmd/screen.c b/base/shell/cmd/screen.c similarity index 100% rename from reactos/base/shell/cmd/screen.c rename to base/shell/cmd/screen.c diff --git a/reactos/base/shell/cmd/set.c b/base/shell/cmd/set.c similarity index 100% rename from reactos/base/shell/cmd/set.c rename to base/shell/cmd/set.c diff --git a/reactos/base/shell/cmd/setlocal.c b/base/shell/cmd/setlocal.c similarity index 100% rename from reactos/base/shell/cmd/setlocal.c rename to base/shell/cmd/setlocal.c diff --git a/reactos/base/shell/cmd/shift.c b/base/shell/cmd/shift.c similarity index 100% rename from reactos/base/shell/cmd/shift.c rename to base/shell/cmd/shift.c diff --git a/reactos/base/shell/cmd/start.c b/base/shell/cmd/start.c similarity index 100% rename from reactos/base/shell/cmd/start.c rename to base/shell/cmd/start.c diff --git a/reactos/base/shell/cmd/strtoclr.c b/base/shell/cmd/strtoclr.c similarity index 100% rename from reactos/base/shell/cmd/strtoclr.c rename to base/shell/cmd/strtoclr.c diff --git a/reactos/base/shell/cmd/time.c b/base/shell/cmd/time.c similarity index 100% rename from reactos/base/shell/cmd/time.c rename to base/shell/cmd/time.c diff --git a/reactos/base/shell/cmd/timer.c b/base/shell/cmd/timer.c similarity index 100% rename from reactos/base/shell/cmd/timer.c rename to base/shell/cmd/timer.c diff --git a/reactos/base/shell/cmd/title.c b/base/shell/cmd/title.c similarity index 100% rename from reactos/base/shell/cmd/title.c rename to base/shell/cmd/title.c diff --git a/reactos/base/shell/cmd/todo.txt b/base/shell/cmd/todo.txt similarity index 100% rename from reactos/base/shell/cmd/todo.txt rename to base/shell/cmd/todo.txt diff --git a/reactos/base/shell/cmd/type.c b/base/shell/cmd/type.c similarity index 100% rename from reactos/base/shell/cmd/type.c rename to base/shell/cmd/type.c diff --git a/reactos/base/shell/cmd/ver.c b/base/shell/cmd/ver.c similarity index 100% rename from reactos/base/shell/cmd/ver.c rename to base/shell/cmd/ver.c diff --git a/reactos/base/shell/cmd/verify.c b/base/shell/cmd/verify.c similarity index 100% rename from reactos/base/shell/cmd/verify.c rename to base/shell/cmd/verify.c diff --git a/reactos/base/shell/cmd/vol.c b/base/shell/cmd/vol.c similarity index 100% rename from reactos/base/shell/cmd/vol.c rename to base/shell/cmd/vol.c diff --git a/reactos/base/shell/cmd/where.c b/base/shell/cmd/where.c similarity index 100% rename from reactos/base/shell/cmd/where.c rename to base/shell/cmd/where.c diff --git a/reactos/base/shell/cmd/window.c b/base/shell/cmd/window.c similarity index 100% rename from reactos/base/shell/cmd/window.c rename to base/shell/cmd/window.c diff --git a/reactos/base/shell/explorer-new/CMakeLists.txt b/base/shell/explorer-new/CMakeLists.txt similarity index 100% rename from reactos/base/shell/explorer-new/CMakeLists.txt rename to base/shell/explorer-new/CMakeLists.txt diff --git a/reactos/base/shell/explorer-new/comcsup.h b/base/shell/explorer-new/comcsup.h similarity index 100% rename from reactos/base/shell/explorer-new/comcsup.h rename to base/shell/explorer-new/comcsup.h diff --git a/reactos/base/shell/explorer-new/desktop.c b/base/shell/explorer-new/desktop.c similarity index 100% rename from reactos/base/shell/explorer-new/desktop.c rename to base/shell/explorer-new/desktop.c diff --git a/reactos/base/shell/explorer-new/dragdrop.c b/base/shell/explorer-new/dragdrop.c similarity index 100% rename from reactos/base/shell/explorer-new/dragdrop.c rename to base/shell/explorer-new/dragdrop.c diff --git a/reactos/base/shell/explorer-new/explorer.c b/base/shell/explorer-new/explorer.c similarity index 100% rename from reactos/base/shell/explorer-new/explorer.c rename to base/shell/explorer-new/explorer.c diff --git a/reactos/base/shell/explorer-new/explorer.rbuild b/base/shell/explorer-new/explorer.rbuild similarity index 100% rename from reactos/base/shell/explorer-new/explorer.rbuild rename to base/shell/explorer-new/explorer.rbuild diff --git a/reactos/base/shell/explorer-new/explorer.rc b/base/shell/explorer-new/explorer.rc similarity index 100% rename from reactos/base/shell/explorer-new/explorer.rc rename to base/shell/explorer-new/explorer.rc diff --git a/reactos/base/shell/explorer-new/lang/bg-BG.rc b/base/shell/explorer-new/lang/bg-BG.rc similarity index 100% rename from reactos/base/shell/explorer-new/lang/bg-BG.rc rename to base/shell/explorer-new/lang/bg-BG.rc diff --git a/reactos/base/shell/explorer-new/lang/cs-CZ.rc b/base/shell/explorer-new/lang/cs-CZ.rc similarity index 100% rename from reactos/base/shell/explorer-new/lang/cs-CZ.rc rename to base/shell/explorer-new/lang/cs-CZ.rc diff --git a/reactos/base/shell/explorer-new/lang/de-DE.rc b/base/shell/explorer-new/lang/de-DE.rc similarity index 100% rename from reactos/base/shell/explorer-new/lang/de-DE.rc rename to base/shell/explorer-new/lang/de-DE.rc diff --git a/reactos/base/shell/explorer-new/lang/en-US.rc b/base/shell/explorer-new/lang/en-US.rc similarity index 100% rename from reactos/base/shell/explorer-new/lang/en-US.rc rename to base/shell/explorer-new/lang/en-US.rc diff --git a/reactos/base/shell/explorer-new/lang/es-ES.rc b/base/shell/explorer-new/lang/es-ES.rc similarity index 100% rename from reactos/base/shell/explorer-new/lang/es-ES.rc rename to base/shell/explorer-new/lang/es-ES.rc diff --git a/reactos/base/shell/explorer-new/lang/fr-FR.rc b/base/shell/explorer-new/lang/fr-FR.rc similarity index 100% rename from reactos/base/shell/explorer-new/lang/fr-FR.rc rename to base/shell/explorer-new/lang/fr-FR.rc diff --git a/reactos/base/shell/explorer-new/lang/it-IT.rc b/base/shell/explorer-new/lang/it-IT.rc similarity index 100% rename from reactos/base/shell/explorer-new/lang/it-IT.rc rename to base/shell/explorer-new/lang/it-IT.rc diff --git a/reactos/base/shell/explorer-new/lang/ja-JP.rc b/base/shell/explorer-new/lang/ja-JP.rc similarity index 100% rename from reactos/base/shell/explorer-new/lang/ja-JP.rc rename to base/shell/explorer-new/lang/ja-JP.rc diff --git a/reactos/base/shell/explorer-new/lang/ko-KR.rc b/base/shell/explorer-new/lang/ko-KR.rc similarity index 100% rename from reactos/base/shell/explorer-new/lang/ko-KR.rc rename to base/shell/explorer-new/lang/ko-KR.rc diff --git a/reactos/base/shell/explorer-new/lang/lt-LT.rc b/base/shell/explorer-new/lang/lt-LT.rc similarity index 100% rename from reactos/base/shell/explorer-new/lang/lt-LT.rc rename to base/shell/explorer-new/lang/lt-LT.rc diff --git a/reactos/base/shell/explorer-new/lang/nl-NL.rc b/base/shell/explorer-new/lang/nl-NL.rc similarity index 100% rename from reactos/base/shell/explorer-new/lang/nl-NL.rc rename to base/shell/explorer-new/lang/nl-NL.rc diff --git a/reactos/base/shell/explorer-new/lang/no-NO.rc b/base/shell/explorer-new/lang/no-NO.rc similarity index 100% rename from reactos/base/shell/explorer-new/lang/no-NO.rc rename to base/shell/explorer-new/lang/no-NO.rc diff --git a/reactos/base/shell/explorer-new/lang/pl-PL.rc b/base/shell/explorer-new/lang/pl-PL.rc similarity index 100% rename from reactos/base/shell/explorer-new/lang/pl-PL.rc rename to base/shell/explorer-new/lang/pl-PL.rc diff --git a/reactos/base/shell/explorer-new/lang/pt-BR.rc b/base/shell/explorer-new/lang/pt-BR.rc similarity index 100% rename from reactos/base/shell/explorer-new/lang/pt-BR.rc rename to base/shell/explorer-new/lang/pt-BR.rc diff --git a/reactos/base/shell/explorer-new/lang/ro-RO.rc b/base/shell/explorer-new/lang/ro-RO.rc similarity index 100% rename from reactos/base/shell/explorer-new/lang/ro-RO.rc rename to base/shell/explorer-new/lang/ro-RO.rc diff --git a/reactos/base/shell/explorer-new/lang/ru-RU.rc b/base/shell/explorer-new/lang/ru-RU.rc similarity index 100% rename from reactos/base/shell/explorer-new/lang/ru-RU.rc rename to base/shell/explorer-new/lang/ru-RU.rc diff --git a/reactos/base/shell/explorer-new/lang/sk-SK.rc b/base/shell/explorer-new/lang/sk-SK.rc similarity index 100% rename from reactos/base/shell/explorer-new/lang/sk-SK.rc rename to base/shell/explorer-new/lang/sk-SK.rc diff --git a/reactos/base/shell/explorer-new/lang/uk-UA.rc b/base/shell/explorer-new/lang/uk-UA.rc similarity index 100% rename from reactos/base/shell/explorer-new/lang/uk-UA.rc rename to base/shell/explorer-new/lang/uk-UA.rc diff --git a/reactos/base/shell/explorer-new/lang/zh-CN.rc b/base/shell/explorer-new/lang/zh-CN.rc similarity index 100% rename from reactos/base/shell/explorer-new/lang/zh-CN.rc rename to base/shell/explorer-new/lang/zh-CN.rc diff --git a/reactos/base/shell/explorer-new/precomp.h b/base/shell/explorer-new/precomp.h similarity index 100% rename from reactos/base/shell/explorer-new/precomp.h rename to base/shell/explorer-new/precomp.h diff --git a/reactos/base/shell/explorer-new/res/auto_hide.bmp b/base/shell/explorer-new/res/auto_hide.bmp similarity index 100% rename from reactos/base/shell/explorer-new/res/auto_hide.bmp rename to base/shell/explorer-new/res/auto_hide.bmp diff --git a/reactos/base/shell/explorer-new/res/lock_group_noql.bmp b/base/shell/explorer-new/res/lock_group_noql.bmp similarity index 100% rename from reactos/base/shell/explorer-new/res/lock_group_noql.bmp rename to base/shell/explorer-new/res/lock_group_noql.bmp diff --git a/reactos/base/shell/explorer-new/res/lock_group_ql.bmp b/base/shell/explorer-new/res/lock_group_ql.bmp similarity index 100% rename from reactos/base/shell/explorer-new/res/lock_group_ql.bmp rename to base/shell/explorer-new/res/lock_group_ql.bmp diff --git a/reactos/base/shell/explorer-new/res/lock_nogroup_noql.bmp b/base/shell/explorer-new/res/lock_nogroup_noql.bmp similarity index 100% rename from reactos/base/shell/explorer-new/res/lock_nogroup_noql.bmp rename to base/shell/explorer-new/res/lock_nogroup_noql.bmp diff --git a/reactos/base/shell/explorer-new/res/lock_nogroup_ql.bmp b/base/shell/explorer-new/res/lock_nogroup_ql.bmp similarity index 100% rename from reactos/base/shell/explorer-new/res/lock_nogroup_ql.bmp rename to base/shell/explorer-new/res/lock_nogroup_ql.bmp diff --git a/reactos/base/shell/explorer-new/res/logov.bmp b/base/shell/explorer-new/res/logov.bmp similarity index 100% rename from reactos/base/shell/explorer-new/res/logov.bmp rename to base/shell/explorer-new/res/logov.bmp diff --git a/reactos/base/shell/explorer-new/res/nolock_group_noql.bmp b/base/shell/explorer-new/res/nolock_group_noql.bmp similarity index 100% rename from reactos/base/shell/explorer-new/res/nolock_group_noql.bmp rename to base/shell/explorer-new/res/nolock_group_noql.bmp diff --git a/reactos/base/shell/explorer-new/res/nolock_group_ql.bmp b/base/shell/explorer-new/res/nolock_group_ql.bmp similarity index 100% rename from reactos/base/shell/explorer-new/res/nolock_group_ql.bmp rename to base/shell/explorer-new/res/nolock_group_ql.bmp diff --git a/reactos/base/shell/explorer-new/res/nolock_nogroup_noql.bmp b/base/shell/explorer-new/res/nolock_nogroup_noql.bmp similarity index 100% rename from reactos/base/shell/explorer-new/res/nolock_nogroup_noql.bmp rename to base/shell/explorer-new/res/nolock_nogroup_noql.bmp diff --git a/reactos/base/shell/explorer-new/res/nolock_nogroup_ql.bmp b/base/shell/explorer-new/res/nolock_nogroup_ql.bmp similarity index 100% rename from reactos/base/shell/explorer-new/res/nolock_nogroup_ql.bmp rename to base/shell/explorer-new/res/nolock_nogroup_ql.bmp diff --git a/reactos/base/shell/explorer-new/res/start.ico b/base/shell/explorer-new/res/start.ico similarity index 100% rename from reactos/base/shell/explorer-new/res/start.ico rename to base/shell/explorer-new/res/start.ico diff --git a/reactos/base/shell/explorer-new/resource.h b/base/shell/explorer-new/resource.h similarity index 100% rename from reactos/base/shell/explorer-new/resource.h rename to base/shell/explorer-new/resource.h diff --git a/reactos/base/shell/explorer-new/startmnu.c b/base/shell/explorer-new/startmnu.c similarity index 100% rename from reactos/base/shell/explorer-new/startmnu.c rename to base/shell/explorer-new/startmnu.c diff --git a/reactos/base/shell/explorer-new/taskband.c b/base/shell/explorer-new/taskband.c similarity index 100% rename from reactos/base/shell/explorer-new/taskband.c rename to base/shell/explorer-new/taskband.c diff --git a/reactos/base/shell/explorer-new/taskswnd.c b/base/shell/explorer-new/taskswnd.c similarity index 100% rename from reactos/base/shell/explorer-new/taskswnd.c rename to base/shell/explorer-new/taskswnd.c diff --git a/reactos/base/shell/explorer-new/tbsite.c b/base/shell/explorer-new/tbsite.c similarity index 100% rename from reactos/base/shell/explorer-new/tbsite.c rename to base/shell/explorer-new/tbsite.c diff --git a/reactos/base/shell/explorer-new/todo.h b/base/shell/explorer-new/todo.h similarity index 100% rename from reactos/base/shell/explorer-new/todo.h rename to base/shell/explorer-new/todo.h diff --git a/reactos/base/shell/explorer-new/trayntfy.c b/base/shell/explorer-new/trayntfy.c similarity index 100% rename from reactos/base/shell/explorer-new/trayntfy.c rename to base/shell/explorer-new/trayntfy.c diff --git a/reactos/base/shell/explorer-new/trayprop.c b/base/shell/explorer-new/trayprop.c similarity index 100% rename from reactos/base/shell/explorer-new/trayprop.c rename to base/shell/explorer-new/trayprop.c diff --git a/reactos/base/shell/explorer-new/traywnd.c b/base/shell/explorer-new/traywnd.c similarity index 100% rename from reactos/base/shell/explorer-new/traywnd.c rename to base/shell/explorer-new/traywnd.c diff --git a/reactos/base/shell/explorer-new/undoc.h b/base/shell/explorer-new/undoc.h similarity index 100% rename from reactos/base/shell/explorer-new/undoc.h rename to base/shell/explorer-new/undoc.h diff --git a/reactos/base/shell/explorer/CMakeLists.txt b/base/shell/explorer/CMakeLists.txt similarity index 100% rename from reactos/base/shell/explorer/CMakeLists.txt rename to base/shell/explorer/CMakeLists.txt diff --git a/reactos/base/shell/explorer/Doxyfile b/base/shell/explorer/Doxyfile similarity index 100% rename from reactos/base/shell/explorer/Doxyfile rename to base/shell/explorer/Doxyfile diff --git a/reactos/base/shell/explorer/Doxyfile-all b/base/shell/explorer/Doxyfile-all similarity index 100% rename from reactos/base/shell/explorer/Doxyfile-all rename to base/shell/explorer/Doxyfile-all diff --git a/reactos/base/shell/explorer/Jamfile b/base/shell/explorer/Jamfile similarity index 100% rename from reactos/base/shell/explorer/Jamfile rename to base/shell/explorer/Jamfile diff --git a/reactos/base/shell/explorer/Make-rosshell-MinGW b/base/shell/explorer/Make-rosshell-MinGW similarity index 100% rename from reactos/base/shell/explorer/Make-rosshell-MinGW rename to base/shell/explorer/Make-rosshell-MinGW diff --git a/reactos/base/shell/explorer/Make-rosshell.mak b/base/shell/explorer/Make-rosshell.mak similarity index 100% rename from reactos/base/shell/explorer/Make-rosshell.mak rename to base/shell/explorer/Make-rosshell.mak diff --git a/reactos/base/shell/explorer/Makefile-MinGW b/base/shell/explorer/Makefile-MinGW similarity index 100% rename from reactos/base/shell/explorer/Makefile-MinGW rename to base/shell/explorer/Makefile-MinGW diff --git a/reactos/base/shell/explorer/Makefile-Wine b/base/shell/explorer/Makefile-Wine similarity index 100% rename from reactos/base/shell/explorer/Makefile-Wine rename to base/shell/explorer/Makefile-Wine diff --git a/reactos/base/shell/explorer/Makefile-precomp b/base/shell/explorer/Makefile-precomp similarity index 100% rename from reactos/base/shell/explorer/Makefile-precomp rename to base/shell/explorer/Makefile-precomp diff --git a/reactos/base/shell/explorer/desktop/desktop.cpp b/base/shell/explorer/desktop/desktop.cpp similarity index 100% rename from reactos/base/shell/explorer/desktop/desktop.cpp rename to base/shell/explorer/desktop/desktop.cpp diff --git a/reactos/base/shell/explorer/desktop/desktop.h b/base/shell/explorer/desktop/desktop.h similarity index 100% rename from reactos/base/shell/explorer/desktop/desktop.h rename to base/shell/explorer/desktop/desktop.h diff --git a/reactos/base/shell/explorer/dialogs/searchprogram.cpp b/base/shell/explorer/dialogs/searchprogram.cpp similarity index 100% rename from reactos/base/shell/explorer/dialogs/searchprogram.cpp rename to base/shell/explorer/dialogs/searchprogram.cpp diff --git a/reactos/base/shell/explorer/dialogs/searchprogram.h b/base/shell/explorer/dialogs/searchprogram.h similarity index 100% rename from reactos/base/shell/explorer/dialogs/searchprogram.h rename to base/shell/explorer/dialogs/searchprogram.h diff --git a/reactos/base/shell/explorer/dialogs/settings.cpp b/base/shell/explorer/dialogs/settings.cpp similarity index 100% rename from reactos/base/shell/explorer/dialogs/settings.cpp rename to base/shell/explorer/dialogs/settings.cpp diff --git a/reactos/base/shell/explorer/dialogs/settings.h b/base/shell/explorer/dialogs/settings.h similarity index 100% rename from reactos/base/shell/explorer/dialogs/settings.h rename to base/shell/explorer/dialogs/settings.h diff --git a/reactos/base/shell/explorer/doc/TODO.txt b/base/shell/explorer/doc/TODO.txt similarity index 100% rename from reactos/base/shell/explorer/doc/TODO.txt rename to base/shell/explorer/doc/TODO.txt diff --git a/reactos/base/shell/explorer/doc/changes.txt b/base/shell/explorer/doc/changes.txt similarity index 100% rename from reactos/base/shell/explorer/doc/changes.txt rename to base/shell/explorer/doc/changes.txt diff --git a/reactos/base/shell/explorer/doc/readme.txt b/base/shell/explorer/doc/readme.txt similarity index 100% rename from reactos/base/shell/explorer/doc/readme.txt rename to base/shell/explorer/doc/readme.txt diff --git a/reactos/base/shell/explorer/doxy-footer.html b/base/shell/explorer/doxy-footer.html similarity index 100% rename from reactos/base/shell/explorer/doxy-footer.html rename to base/shell/explorer/doxy-footer.html diff --git a/reactos/base/shell/explorer/doxy-footer.htmt b/base/shell/explorer/doxy-footer.htmt similarity index 100% rename from reactos/base/shell/explorer/doxy-footer.htmt rename to base/shell/explorer/doxy-footer.htmt diff --git a/reactos/base/shell/explorer/explorer-bg.rc b/base/shell/explorer/explorer-bg.rc similarity index 100% rename from reactos/base/shell/explorer/explorer-bg.rc rename to base/shell/explorer/explorer-bg.rc diff --git a/reactos/base/shell/explorer/explorer-bn.rc b/base/shell/explorer/explorer-bn.rc similarity index 100% rename from reactos/base/shell/explorer/explorer-bn.rc rename to base/shell/explorer/explorer-bn.rc diff --git a/reactos/base/shell/explorer/explorer-cfg-template.xml b/base/shell/explorer/explorer-cfg-template.xml similarity index 100% rename from reactos/base/shell/explorer/explorer-cfg-template.xml rename to base/shell/explorer/explorer-cfg-template.xml diff --git a/reactos/base/shell/explorer/explorer-cn-msvc.rc b/base/shell/explorer/explorer-cn-msvc.rc similarity index 100% rename from reactos/base/shell/explorer/explorer-cn-msvc.rc rename to base/shell/explorer/explorer-cn-msvc.rc diff --git a/reactos/base/shell/explorer/explorer-cn.rc b/base/shell/explorer/explorer-cn.rc similarity index 100% rename from reactos/base/shell/explorer/explorer-cn.rc rename to base/shell/explorer/explorer-cn.rc diff --git a/reactos/base/shell/explorer/explorer-cz.rc b/base/shell/explorer/explorer-cz.rc similarity index 100% rename from reactos/base/shell/explorer/explorer-cz.rc rename to base/shell/explorer/explorer-cz.rc diff --git a/reactos/base/shell/explorer/explorer-de.rc b/base/shell/explorer/explorer-de.rc similarity index 100% rename from reactos/base/shell/explorer/explorer-de.rc rename to base/shell/explorer/explorer-de.rc diff --git a/reactos/base/shell/explorer/explorer-en.rc b/base/shell/explorer/explorer-en.rc similarity index 100% rename from reactos/base/shell/explorer/explorer-en.rc rename to base/shell/explorer/explorer-en.rc diff --git a/reactos/base/shell/explorer/explorer-es.rc b/base/shell/explorer/explorer-es.rc similarity index 100% rename from reactos/base/shell/explorer/explorer-es.rc rename to base/shell/explorer/explorer-es.rc diff --git a/reactos/base/shell/explorer/explorer-fr.rc b/base/shell/explorer/explorer-fr.rc similarity index 100% rename from reactos/base/shell/explorer/explorer-fr.rc rename to base/shell/explorer/explorer-fr.rc diff --git a/reactos/base/shell/explorer/explorer-gr.rc b/base/shell/explorer/explorer-gr.rc similarity index 100% rename from reactos/base/shell/explorer/explorer-gr.rc rename to base/shell/explorer/explorer-gr.rc diff --git a/reactos/base/shell/explorer/explorer-hu.rc b/base/shell/explorer/explorer-hu.rc similarity index 100% rename from reactos/base/shell/explorer/explorer-hu.rc rename to base/shell/explorer/explorer-hu.rc diff --git a/reactos/base/shell/explorer/explorer-id.rc b/base/shell/explorer/explorer-id.rc similarity index 100% rename from reactos/base/shell/explorer/explorer-id.rc rename to base/shell/explorer/explorer-id.rc diff --git a/reactos/base/shell/explorer/explorer-it.rc b/base/shell/explorer/explorer-it.rc similarity index 100% rename from reactos/base/shell/explorer/explorer-it.rc rename to base/shell/explorer/explorer-it.rc diff --git a/reactos/base/shell/explorer/explorer-jp.rc b/base/shell/explorer/explorer-jp.rc similarity index 100% rename from reactos/base/shell/explorer/explorer-jp.rc rename to base/shell/explorer/explorer-jp.rc diff --git a/reactos/base/shell/explorer/explorer-ko.rc b/base/shell/explorer/explorer-ko.rc similarity index 100% rename from reactos/base/shell/explorer/explorer-ko.rc rename to base/shell/explorer/explorer-ko.rc diff --git a/reactos/base/shell/explorer/explorer-nl.rc b/base/shell/explorer/explorer-nl.rc similarity index 100% rename from reactos/base/shell/explorer/explorer-nl.rc rename to base/shell/explorer/explorer-nl.rc diff --git a/reactos/base/shell/explorer/explorer-no.rc b/base/shell/explorer/explorer-no.rc similarity index 100% rename from reactos/base/shell/explorer/explorer-no.rc rename to base/shell/explorer/explorer-no.rc diff --git a/reactos/base/shell/explorer/explorer-pl.rc b/base/shell/explorer/explorer-pl.rc similarity index 100% rename from reactos/base/shell/explorer/explorer-pl.rc rename to base/shell/explorer/explorer-pl.rc diff --git a/reactos/base/shell/explorer/explorer-pt.rc b/base/shell/explorer/explorer-pt.rc similarity index 100% rename from reactos/base/shell/explorer/explorer-pt.rc rename to base/shell/explorer/explorer-pt.rc diff --git a/reactos/base/shell/explorer/explorer-ro.rc b/base/shell/explorer/explorer-ro.rc similarity index 100% rename from reactos/base/shell/explorer/explorer-ro.rc rename to base/shell/explorer/explorer-ro.rc diff --git a/reactos/base/shell/explorer/explorer-ru.rc b/base/shell/explorer/explorer-ru.rc similarity index 100% rename from reactos/base/shell/explorer/explorer-ru.rc rename to base/shell/explorer/explorer-ru.rc diff --git a/reactos/base/shell/explorer/explorer-sk.rc b/base/shell/explorer/explorer-sk.rc similarity index 100% rename from reactos/base/shell/explorer/explorer-sk.rc rename to base/shell/explorer/explorer-sk.rc diff --git a/reactos/base/shell/explorer/explorer-sv.rc b/base/shell/explorer/explorer-sv.rc similarity index 100% rename from reactos/base/shell/explorer/explorer-sv.rc rename to base/shell/explorer/explorer-sv.rc diff --git a/reactos/base/shell/explorer/explorer-uk.rc b/base/shell/explorer/explorer-uk.rc similarity index 100% rename from reactos/base/shell/explorer/explorer-uk.rc rename to base/shell/explorer/explorer-uk.rc diff --git a/reactos/base/shell/explorer/explorer.cpp b/base/shell/explorer/explorer.cpp similarity index 100% rename from reactos/base/shell/explorer/explorer.cpp rename to base/shell/explorer/explorer.cpp diff --git a/reactos/base/shell/explorer/explorer.dsp b/base/shell/explorer/explorer.dsp similarity index 100% rename from reactos/base/shell/explorer/explorer.dsp rename to base/shell/explorer/explorer.dsp diff --git a/reactos/base/shell/explorer/explorer.dsw b/base/shell/explorer/explorer.dsw similarity index 100% rename from reactos/base/shell/explorer/explorer.dsw rename to base/shell/explorer/explorer.dsw diff --git a/reactos/base/shell/explorer/explorer.exe.manifest b/base/shell/explorer/explorer.exe.manifest similarity index 100% rename from reactos/base/shell/explorer/explorer.exe.manifest rename to base/shell/explorer/explorer.exe.manifest diff --git a/reactos/base/shell/explorer/explorer.h b/base/shell/explorer/explorer.h similarity index 100% rename from reactos/base/shell/explorer/explorer.h rename to base/shell/explorer/explorer.h diff --git a/reactos/base/shell/explorer/explorer.rbuild b/base/shell/explorer/explorer.rbuild similarity index 100% rename from reactos/base/shell/explorer/explorer.rbuild rename to base/shell/explorer/explorer.rbuild diff --git a/reactos/base/shell/explorer/explorer.rc b/base/shell/explorer/explorer.rc similarity index 100% rename from reactos/base/shell/explorer/explorer.rc rename to base/shell/explorer/explorer.rc diff --git a/reactos/base/shell/explorer/explorer.sln b/base/shell/explorer/explorer.sln similarity index 100% rename from reactos/base/shell/explorer/explorer.sln rename to base/shell/explorer/explorer.sln diff --git a/reactos/base/shell/explorer/explorer.vcproj b/base/shell/explorer/explorer.vcproj similarity index 100% rename from reactos/base/shell/explorer/explorer.vcproj rename to base/shell/explorer/explorer.vcproj diff --git a/reactos/base/shell/explorer/explorer_intres.rc b/base/shell/explorer/explorer_intres.rc similarity index 100% rename from reactos/base/shell/explorer/explorer_intres.rc rename to base/shell/explorer/explorer_intres.rc diff --git a/reactos/base/shell/explorer/externals.h b/base/shell/explorer/externals.h similarity index 100% rename from reactos/base/shell/explorer/externals.h rename to base/shell/explorer/externals.h diff --git a/reactos/base/shell/explorer/globals.h b/base/shell/explorer/globals.h similarity index 100% rename from reactos/base/shell/explorer/globals.h rename to base/shell/explorer/globals.h diff --git a/reactos/base/shell/explorer/i386-stub-win32.c b/base/shell/explorer/i386-stub-win32.c similarity index 100% rename from reactos/base/shell/explorer/i386-stub-win32.c rename to base/shell/explorer/i386-stub-win32.c diff --git a/reactos/base/shell/explorer/make-docu.sh b/base/shell/explorer/make-docu.sh similarity index 100% rename from reactos/base/shell/explorer/make-docu.sh rename to base/shell/explorer/make-docu.sh diff --git a/reactos/base/shell/explorer/make-full-docu.bat b/base/shell/explorer/make-full-docu.bat similarity index 100% rename from reactos/base/shell/explorer/make-full-docu.bat rename to base/shell/explorer/make-full-docu.bat diff --git a/reactos/base/shell/explorer/make_explorer.dsp b/base/shell/explorer/make_explorer.dsp similarity index 100% rename from reactos/base/shell/explorer/make_explorer.dsp rename to base/shell/explorer/make_explorer.dsp diff --git a/reactos/base/shell/explorer/make_explorer.vcproj b/base/shell/explorer/make_explorer.vcproj similarity index 100% rename from reactos/base/shell/explorer/make_explorer.vcproj rename to base/shell/explorer/make_explorer.vcproj diff --git a/reactos/base/shell/explorer/make_rosshell.dsp b/base/shell/explorer/make_rosshell.dsp similarity index 100% rename from reactos/base/shell/explorer/make_rosshell.dsp rename to base/shell/explorer/make_rosshell.dsp diff --git a/reactos/base/shell/explorer/makearchive.bat b/base/shell/explorer/makearchive.bat similarity index 100% rename from reactos/base/shell/explorer/makearchive.bat rename to base/shell/explorer/makearchive.bat diff --git a/reactos/base/shell/explorer/notifyhook/CMakeLists.txt b/base/shell/explorer/notifyhook/CMakeLists.txt similarity index 100% rename from reactos/base/shell/explorer/notifyhook/CMakeLists.txt rename to base/shell/explorer/notifyhook/CMakeLists.txt diff --git a/reactos/base/shell/explorer/notifyhook/notifyhook.c b/base/shell/explorer/notifyhook/notifyhook.c similarity index 100% rename from reactos/base/shell/explorer/notifyhook/notifyhook.c rename to base/shell/explorer/notifyhook/notifyhook.c diff --git a/reactos/base/shell/explorer/notifyhook/notifyhook.def b/base/shell/explorer/notifyhook/notifyhook.def similarity index 100% rename from reactos/base/shell/explorer/notifyhook/notifyhook.def rename to base/shell/explorer/notifyhook/notifyhook.def diff --git a/reactos/base/shell/explorer/notifyhook/notifyhook.dsp b/base/shell/explorer/notifyhook/notifyhook.dsp similarity index 100% rename from reactos/base/shell/explorer/notifyhook/notifyhook.dsp rename to base/shell/explorer/notifyhook/notifyhook.dsp diff --git a/reactos/base/shell/explorer/notifyhook/notifyhook.h b/base/shell/explorer/notifyhook/notifyhook.h similarity index 100% rename from reactos/base/shell/explorer/notifyhook/notifyhook.h rename to base/shell/explorer/notifyhook/notifyhook.h diff --git a/reactos/base/shell/explorer/notifyhook/notifyhook.rbuild b/base/shell/explorer/notifyhook/notifyhook.rbuild similarity index 100% rename from reactos/base/shell/explorer/notifyhook/notifyhook.rbuild rename to base/shell/explorer/notifyhook/notifyhook.rbuild diff --git a/reactos/base/shell/explorer/notifyhook/notifyhook.rc b/base/shell/explorer/notifyhook/notifyhook.rc similarity index 100% rename from reactos/base/shell/explorer/notifyhook/notifyhook.rc rename to base/shell/explorer/notifyhook/notifyhook.rc diff --git a/reactos/base/shell/explorer/notifyhook/notifyhook.spec b/base/shell/explorer/notifyhook/notifyhook.spec similarity index 100% rename from reactos/base/shell/explorer/notifyhook/notifyhook.spec rename to base/shell/explorer/notifyhook/notifyhook.spec diff --git a/reactos/base/shell/explorer/notifyhook/notifyhook.vcproj b/base/shell/explorer/notifyhook/notifyhook.vcproj similarity index 100% rename from reactos/base/shell/explorer/notifyhook/notifyhook.vcproj rename to base/shell/explorer/notifyhook/notifyhook.vcproj diff --git a/reactos/base/shell/explorer/precomp.cpp b/base/shell/explorer/precomp.cpp similarity index 100% rename from reactos/base/shell/explorer/precomp.cpp rename to base/shell/explorer/precomp.cpp diff --git a/reactos/base/shell/explorer/precomp.h b/base/shell/explorer/precomp.h similarity index 100% rename from reactos/base/shell/explorer/precomp.h rename to base/shell/explorer/precomp.h diff --git a/reactos/base/shell/explorer/project-root.jam b/base/shell/explorer/project-root.jam similarity index 100% rename from reactos/base/shell/explorer/project-root.jam rename to base/shell/explorer/project-root.jam diff --git a/reactos/base/shell/explorer/rc-mingw.jam b/base/shell/explorer/rc-mingw.jam similarity index 100% rename from reactos/base/shell/explorer/rc-mingw.jam rename to base/shell/explorer/rc-mingw.jam diff --git a/reactos/base/shell/explorer/res/action.ico b/base/shell/explorer/res/action.ico similarity index 100% rename from reactos/base/shell/explorer/res/action.ico rename to base/shell/explorer/res/action.ico diff --git a/reactos/base/shell/explorer/res/administration.ico b/base/shell/explorer/res/administration.ico similarity index 100% rename from reactos/base/shell/explorer/res/administration.ico rename to base/shell/explorer/res/administration.ico diff --git a/reactos/base/shell/explorer/res/appicon.ico b/base/shell/explorer/res/appicon.ico similarity index 100% rename from reactos/base/shell/explorer/res/appicon.ico rename to base/shell/explorer/res/appicon.ico diff --git a/reactos/base/shell/explorer/res/apps.ico b/base/shell/explorer/res/apps.ico similarity index 100% rename from reactos/base/shell/explorer/res/apps.ico rename to base/shell/explorer/res/apps.ico diff --git a/reactos/base/shell/explorer/res/arrow.ico b/base/shell/explorer/res/arrow.ico similarity index 100% rename from reactos/base/shell/explorer/res/arrow.ico rename to base/shell/explorer/res/arrow.ico diff --git a/reactos/base/shell/explorer/res/arrow_dwn.ico b/base/shell/explorer/res/arrow_dwn.ico similarity index 100% rename from reactos/base/shell/explorer/res/arrow_dwn.ico rename to base/shell/explorer/res/arrow_dwn.ico diff --git a/reactos/base/shell/explorer/res/arrow_up.ico b/base/shell/explorer/res/arrow_up.ico similarity index 100% rename from reactos/base/shell/explorer/res/arrow_up.ico rename to base/shell/explorer/res/arrow_up.ico diff --git a/reactos/base/shell/explorer/res/arrowsel.ico b/base/shell/explorer/res/arrowsel.ico similarity index 100% rename from reactos/base/shell/explorer/res/arrowsel.ico rename to base/shell/explorer/res/arrowsel.ico diff --git a/reactos/base/shell/explorer/res/computer.ico b/base/shell/explorer/res/computer.ico similarity index 100% rename from reactos/base/shell/explorer/res/computer.ico rename to base/shell/explorer/res/computer.ico diff --git a/reactos/base/shell/explorer/res/config.ico b/base/shell/explorer/res/config.ico similarity index 100% rename from reactos/base/shell/explorer/res/config.ico rename to base/shell/explorer/res/config.ico diff --git a/reactos/base/shell/explorer/res/control-panel.ico b/base/shell/explorer/res/control-panel.ico similarity index 100% rename from reactos/base/shell/explorer/res/control-panel.ico rename to base/shell/explorer/res/control-panel.ico diff --git a/reactos/base/shell/explorer/res/desktop-settings.ico b/base/shell/explorer/res/desktop-settings.ico similarity index 100% rename from reactos/base/shell/explorer/res/desktop-settings.ico rename to base/shell/explorer/res/desktop-settings.ico diff --git a/reactos/base/shell/explorer/res/documents.ico b/base/shell/explorer/res/documents.ico similarity index 100% rename from reactos/base/shell/explorer/res/documents.ico rename to base/shell/explorer/res/documents.ico diff --git a/reactos/base/shell/explorer/res/dot.ico b/base/shell/explorer/res/dot.ico similarity index 100% rename from reactos/base/shell/explorer/res/dot.ico rename to base/shell/explorer/res/dot.ico diff --git a/reactos/base/shell/explorer/res/dot_red.ico b/base/shell/explorer/res/dot_red.ico similarity index 100% rename from reactos/base/shell/explorer/res/dot_red.ico rename to base/shell/explorer/res/dot_red.ico diff --git a/reactos/base/shell/explorer/res/dot_trans.ico b/base/shell/explorer/res/dot_trans.ico similarity index 100% rename from reactos/base/shell/explorer/res/dot_trans.ico rename to base/shell/explorer/res/dot_trans.ico diff --git a/reactos/base/shell/explorer/res/drivebar.bmp b/base/shell/explorer/res/drivebar.bmp similarity index 100% rename from reactos/base/shell/explorer/res/drivebar.bmp rename to base/shell/explorer/res/drivebar.bmp diff --git a/reactos/base/shell/explorer/res/explorer.ico b/base/shell/explorer/res/explorer.ico similarity index 100% rename from reactos/base/shell/explorer/res/explorer.ico rename to base/shell/explorer/res/explorer.ico diff --git a/reactos/base/shell/explorer/res/favorites.ico b/base/shell/explorer/res/favorites.ico similarity index 100% rename from reactos/base/shell/explorer/res/favorites.ico rename to base/shell/explorer/res/favorites.ico diff --git a/reactos/base/shell/explorer/res/floating.ico b/base/shell/explorer/res/floating.ico similarity index 100% rename from reactos/base/shell/explorer/res/floating.ico rename to base/shell/explorer/res/floating.ico diff --git a/reactos/base/shell/explorer/res/folder.ico b/base/shell/explorer/res/folder.ico similarity index 100% rename from reactos/base/shell/explorer/res/folder.ico rename to base/shell/explorer/res/folder.ico diff --git a/reactos/base/shell/explorer/res/icoali10.bmp b/base/shell/explorer/res/icoali10.bmp similarity index 100% rename from reactos/base/shell/explorer/res/icoali10.bmp rename to base/shell/explorer/res/icoali10.bmp diff --git a/reactos/base/shell/explorer/res/icoalig0.bmp b/base/shell/explorer/res/icoalig0.bmp similarity index 100% rename from reactos/base/shell/explorer/res/icoalig0.bmp rename to base/shell/explorer/res/icoalig0.bmp diff --git a/reactos/base/shell/explorer/res/icoalig1.bmp b/base/shell/explorer/res/icoalig1.bmp similarity index 100% rename from reactos/base/shell/explorer/res/icoalig1.bmp rename to base/shell/explorer/res/icoalig1.bmp diff --git a/reactos/base/shell/explorer/res/icoalig2.bmp b/base/shell/explorer/res/icoalig2.bmp similarity index 100% rename from reactos/base/shell/explorer/res/icoalig2.bmp rename to base/shell/explorer/res/icoalig2.bmp diff --git a/reactos/base/shell/explorer/res/icoalig3.bmp b/base/shell/explorer/res/icoalig3.bmp similarity index 100% rename from reactos/base/shell/explorer/res/icoalig3.bmp rename to base/shell/explorer/res/icoalig3.bmp diff --git a/reactos/base/shell/explorer/res/icoalig4.bmp b/base/shell/explorer/res/icoalig4.bmp similarity index 100% rename from reactos/base/shell/explorer/res/icoalig4.bmp rename to base/shell/explorer/res/icoalig4.bmp diff --git a/reactos/base/shell/explorer/res/icoalig5.bmp b/base/shell/explorer/res/icoalig5.bmp similarity index 100% rename from reactos/base/shell/explorer/res/icoalig5.bmp rename to base/shell/explorer/res/icoalig5.bmp diff --git a/reactos/base/shell/explorer/res/icoalig6.bmp b/base/shell/explorer/res/icoalig6.bmp similarity index 100% rename from reactos/base/shell/explorer/res/icoalig6.bmp rename to base/shell/explorer/res/icoalig6.bmp diff --git a/reactos/base/shell/explorer/res/icoalig7.bmp b/base/shell/explorer/res/icoalig7.bmp similarity index 100% rename from reactos/base/shell/explorer/res/icoalig7.bmp rename to base/shell/explorer/res/icoalig7.bmp diff --git a/reactos/base/shell/explorer/res/icoalig8.bmp b/base/shell/explorer/res/icoalig8.bmp similarity index 100% rename from reactos/base/shell/explorer/res/icoalig8.bmp rename to base/shell/explorer/res/icoalig8.bmp diff --git a/reactos/base/shell/explorer/res/icoalig9.bmp b/base/shell/explorer/res/icoalig9.bmp similarity index 100% rename from reactos/base/shell/explorer/res/icoalig9.bmp rename to base/shell/explorer/res/icoalig9.bmp diff --git a/reactos/base/shell/explorer/res/images.bmp b/base/shell/explorer/res/images.bmp similarity index 100% rename from reactos/base/shell/explorer/res/images.bmp rename to base/shell/explorer/res/images.bmp diff --git a/reactos/base/shell/explorer/res/info.ico b/base/shell/explorer/res/info.ico similarity index 100% rename from reactos/base/shell/explorer/res/info.ico rename to base/shell/explorer/res/info.ico diff --git a/reactos/base/shell/explorer/res/logoff.ico b/base/shell/explorer/res/logoff.ico similarity index 100% rename from reactos/base/shell/explorer/res/logoff.ico rename to base/shell/explorer/res/logoff.ico diff --git a/reactos/base/shell/explorer/res/logov.bmp b/base/shell/explorer/res/logov.bmp similarity index 100% rename from reactos/base/shell/explorer/res/logov.bmp rename to base/shell/explorer/res/logov.bmp diff --git a/reactos/base/shell/explorer/res/logov.psd b/base/shell/explorer/res/logov.psd similarity index 100% rename from reactos/base/shell/explorer/res/logov.psd rename to base/shell/explorer/res/logov.psd diff --git a/reactos/base/shell/explorer/res/logov16.bmp b/base/shell/explorer/res/logov16.bmp similarity index 100% rename from reactos/base/shell/explorer/res/logov16.bmp rename to base/shell/explorer/res/logov16.bmp diff --git a/reactos/base/shell/explorer/res/logov256.bmp b/base/shell/explorer/res/logov256.bmp similarity index 100% rename from reactos/base/shell/explorer/res/logov256.bmp rename to base/shell/explorer/res/logov256.bmp diff --git a/reactos/base/shell/explorer/res/mdi.bmp b/base/shell/explorer/res/mdi.bmp similarity index 100% rename from reactos/base/shell/explorer/res/mdi.bmp rename to base/shell/explorer/res/mdi.bmp diff --git a/reactos/base/shell/explorer/res/minimize.ico b/base/shell/explorer/res/minimize.ico similarity index 100% rename from reactos/base/shell/explorer/res/minimize.ico rename to base/shell/explorer/res/minimize.ico diff --git a/reactos/base/shell/explorer/res/network-conns.ico b/base/shell/explorer/res/network-conns.ico similarity index 100% rename from reactos/base/shell/explorer/res/network-conns.ico rename to base/shell/explorer/res/network-conns.ico diff --git a/reactos/base/shell/explorer/res/network.ico b/base/shell/explorer/res/network.ico similarity index 100% rename from reactos/base/shell/explorer/res/network.ico rename to base/shell/explorer/res/network.ico diff --git a/reactos/base/shell/explorer/res/notify_l.ico b/base/shell/explorer/res/notify_l.ico similarity index 100% rename from reactos/base/shell/explorer/res/notify_l.ico rename to base/shell/explorer/res/notify_l.ico diff --git a/reactos/base/shell/explorer/res/notify_r.ico b/base/shell/explorer/res/notify_r.ico similarity index 100% rename from reactos/base/shell/explorer/res/notify_r.ico rename to base/shell/explorer/res/notify_r.ico diff --git a/reactos/base/shell/explorer/res/printer.ico b/base/shell/explorer/res/printer.ico similarity index 100% rename from reactos/base/shell/explorer/res/printer.ico rename to base/shell/explorer/res/printer.ico diff --git a/reactos/base/shell/explorer/res/reactos.ico b/base/shell/explorer/res/reactos.ico similarity index 100% rename from reactos/base/shell/explorer/res/reactos.ico rename to base/shell/explorer/res/reactos.ico diff --git a/reactos/base/shell/explorer/res/recent-documents.ico b/base/shell/explorer/res/recent-documents.ico similarity index 100% rename from reactos/base/shell/explorer/res/recent-documents.ico rename to base/shell/explorer/res/recent-documents.ico diff --git a/reactos/base/shell/explorer/res/restart.ico b/base/shell/explorer/res/restart.ico similarity index 100% rename from reactos/base/shell/explorer/res/restart.ico rename to base/shell/explorer/res/restart.ico diff --git a/reactos/base/shell/explorer/res/ros-big.ico b/base/shell/explorer/res/ros-big.ico similarity index 100% rename from reactos/base/shell/explorer/res/ros-big.ico rename to base/shell/explorer/res/ros-big.ico diff --git a/reactos/base/shell/explorer/res/sdi.bmp b/base/shell/explorer/res/sdi.bmp similarity index 100% rename from reactos/base/shell/explorer/res/sdi.bmp rename to base/shell/explorer/res/sdi.bmp diff --git a/reactos/base/shell/explorer/res/search-doc.ico b/base/shell/explorer/res/search-doc.ico similarity index 100% rename from reactos/base/shell/explorer/res/search-doc.ico rename to base/shell/explorer/res/search-doc.ico diff --git a/reactos/base/shell/explorer/res/search.ico b/base/shell/explorer/res/search.ico similarity index 100% rename from reactos/base/shell/explorer/res/search.ico rename to base/shell/explorer/res/search.ico diff --git a/reactos/base/shell/explorer/res/shutdown.ico b/base/shell/explorer/res/shutdown.ico similarity index 100% rename from reactos/base/shell/explorer/res/shutdown.ico rename to base/shell/explorer/res/shutdown.ico diff --git a/reactos/base/shell/explorer/res/speaker.ico b/base/shell/explorer/res/speaker.ico similarity index 100% rename from reactos/base/shell/explorer/res/speaker.ico rename to base/shell/explorer/res/speaker.ico diff --git a/reactos/base/shell/explorer/res/startmenu.ico b/base/shell/explorer/res/startmenu.ico similarity index 100% rename from reactos/base/shell/explorer/res/startmenu.ico rename to base/shell/explorer/res/startmenu.ico diff --git a/reactos/base/shell/explorer/res/toolbar.bmp b/base/shell/explorer/res/toolbar.bmp similarity index 100% rename from reactos/base/shell/explorer/res/toolbar.bmp rename to base/shell/explorer/res/toolbar.bmp diff --git a/reactos/base/shell/explorer/resource.h b/base/shell/explorer/resource.h similarity index 100% rename from reactos/base/shell/explorer/resource.h rename to base/shell/explorer/resource.h diff --git a/reactos/base/shell/explorer/rosshell.dsp b/base/shell/explorer/rosshell.dsp similarity index 100% rename from reactos/base/shell/explorer/rosshell.dsp rename to base/shell/explorer/rosshell.dsp diff --git a/reactos/base/shell/explorer/rosshell.dsw b/base/shell/explorer/rosshell.dsw similarity index 100% rename from reactos/base/shell/explorer/rosshell.dsw rename to base/shell/explorer/rosshell.dsw diff --git a/reactos/base/shell/explorer/services/shellservices.cpp b/base/shell/explorer/services/shellservices.cpp similarity index 100% rename from reactos/base/shell/explorer/services/shellservices.cpp rename to base/shell/explorer/services/shellservices.cpp diff --git a/reactos/base/shell/explorer/services/shellservices.h b/base/shell/explorer/services/shellservices.h similarity index 100% rename from reactos/base/shell/explorer/services/shellservices.h rename to base/shell/explorer/services/shellservices.h diff --git a/reactos/base/shell/explorer/services/startup.c b/base/shell/explorer/services/startup.c similarity index 100% rename from reactos/base/shell/explorer/services/startup.c rename to base/shell/explorer/services/startup.c diff --git a/reactos/base/shell/explorer/shell/entries.cpp b/base/shell/explorer/shell/entries.cpp similarity index 100% rename from reactos/base/shell/explorer/shell/entries.cpp rename to base/shell/explorer/shell/entries.cpp diff --git a/reactos/base/shell/explorer/shell/entries.h b/base/shell/explorer/shell/entries.h similarity index 100% rename from reactos/base/shell/explorer/shell/entries.h rename to base/shell/explorer/shell/entries.h diff --git a/reactos/base/shell/explorer/shell/fatfs.cpp b/base/shell/explorer/shell/fatfs.cpp similarity index 100% rename from reactos/base/shell/explorer/shell/fatfs.cpp rename to base/shell/explorer/shell/fatfs.cpp diff --git a/reactos/base/shell/explorer/shell/fatfs.h b/base/shell/explorer/shell/fatfs.h similarity index 100% rename from reactos/base/shell/explorer/shell/fatfs.h rename to base/shell/explorer/shell/fatfs.h diff --git a/reactos/base/shell/explorer/shell/filechild.cpp b/base/shell/explorer/shell/filechild.cpp similarity index 100% rename from reactos/base/shell/explorer/shell/filechild.cpp rename to base/shell/explorer/shell/filechild.cpp diff --git a/reactos/base/shell/explorer/shell/filechild.h b/base/shell/explorer/shell/filechild.h similarity index 100% rename from reactos/base/shell/explorer/shell/filechild.h rename to base/shell/explorer/shell/filechild.h diff --git a/reactos/base/shell/explorer/shell/mainframe.cpp b/base/shell/explorer/shell/mainframe.cpp similarity index 100% rename from reactos/base/shell/explorer/shell/mainframe.cpp rename to base/shell/explorer/shell/mainframe.cpp diff --git a/reactos/base/shell/explorer/shell/mainframe.h b/base/shell/explorer/shell/mainframe.h similarity index 100% rename from reactos/base/shell/explorer/shell/mainframe.h rename to base/shell/explorer/shell/mainframe.h diff --git a/reactos/base/shell/explorer/shell/ntobjfs.cpp b/base/shell/explorer/shell/ntobjfs.cpp similarity index 100% rename from reactos/base/shell/explorer/shell/ntobjfs.cpp rename to base/shell/explorer/shell/ntobjfs.cpp diff --git a/reactos/base/shell/explorer/shell/ntobjfs.h b/base/shell/explorer/shell/ntobjfs.h similarity index 100% rename from reactos/base/shell/explorer/shell/ntobjfs.h rename to base/shell/explorer/shell/ntobjfs.h diff --git a/reactos/base/shell/explorer/shell/pane.cpp b/base/shell/explorer/shell/pane.cpp similarity index 100% rename from reactos/base/shell/explorer/shell/pane.cpp rename to base/shell/explorer/shell/pane.cpp diff --git a/reactos/base/shell/explorer/shell/pane.h b/base/shell/explorer/shell/pane.h similarity index 100% rename from reactos/base/shell/explorer/shell/pane.h rename to base/shell/explorer/shell/pane.h diff --git a/reactos/base/shell/explorer/shell/regfs.cpp b/base/shell/explorer/shell/regfs.cpp similarity index 100% rename from reactos/base/shell/explorer/shell/regfs.cpp rename to base/shell/explorer/shell/regfs.cpp diff --git a/reactos/base/shell/explorer/shell/regfs.h b/base/shell/explorer/shell/regfs.h similarity index 100% rename from reactos/base/shell/explorer/shell/regfs.h rename to base/shell/explorer/shell/regfs.h diff --git a/reactos/base/shell/explorer/shell/shellbrowser.cpp b/base/shell/explorer/shell/shellbrowser.cpp similarity index 100% rename from reactos/base/shell/explorer/shell/shellbrowser.cpp rename to base/shell/explorer/shell/shellbrowser.cpp diff --git a/reactos/base/shell/explorer/shell/shellbrowser.h b/base/shell/explorer/shell/shellbrowser.h similarity index 100% rename from reactos/base/shell/explorer/shell/shellbrowser.h rename to base/shell/explorer/shell/shellbrowser.h diff --git a/reactos/base/shell/explorer/shell/shellfs.cpp b/base/shell/explorer/shell/shellfs.cpp similarity index 100% rename from reactos/base/shell/explorer/shell/shellfs.cpp rename to base/shell/explorer/shell/shellfs.cpp diff --git a/reactos/base/shell/explorer/shell/shellfs.h b/base/shell/explorer/shell/shellfs.h similarity index 100% rename from reactos/base/shell/explorer/shell/shellfs.h rename to base/shell/explorer/shell/shellfs.h diff --git a/reactos/base/shell/explorer/shell/unixfs.cpp b/base/shell/explorer/shell/unixfs.cpp similarity index 100% rename from reactos/base/shell/explorer/shell/unixfs.cpp rename to base/shell/explorer/shell/unixfs.cpp diff --git a/reactos/base/shell/explorer/shell/unixfs.h b/base/shell/explorer/shell/unixfs.h similarity index 100% rename from reactos/base/shell/explorer/shell/unixfs.h rename to base/shell/explorer/shell/unixfs.h diff --git a/reactos/base/shell/explorer/shell/webchild.cpp b/base/shell/explorer/shell/webchild.cpp similarity index 100% rename from reactos/base/shell/explorer/shell/webchild.cpp rename to base/shell/explorer/shell/webchild.cpp diff --git a/reactos/base/shell/explorer/shell/webchild.h b/base/shell/explorer/shell/webchild.h similarity index 100% rename from reactos/base/shell/explorer/shell/webchild.h rename to base/shell/explorer/shell/webchild.h diff --git a/reactos/base/shell/explorer/shell/winfs.cpp b/base/shell/explorer/shell/winfs.cpp similarity index 100% rename from reactos/base/shell/explorer/shell/winfs.cpp rename to base/shell/explorer/shell/winfs.cpp diff --git a/reactos/base/shell/explorer/shell/winfs.h b/base/shell/explorer/shell/winfs.h similarity index 100% rename from reactos/base/shell/explorer/shell/winfs.h rename to base/shell/explorer/shell/winfs.h diff --git a/reactos/base/shell/explorer/taskbar/desktopbar.cpp b/base/shell/explorer/taskbar/desktopbar.cpp similarity index 100% rename from reactos/base/shell/explorer/taskbar/desktopbar.cpp rename to base/shell/explorer/taskbar/desktopbar.cpp diff --git a/reactos/base/shell/explorer/taskbar/desktopbar.h b/base/shell/explorer/taskbar/desktopbar.h similarity index 100% rename from reactos/base/shell/explorer/taskbar/desktopbar.h rename to base/shell/explorer/taskbar/desktopbar.h diff --git a/reactos/base/shell/explorer/taskbar/favorites.cpp b/base/shell/explorer/taskbar/favorites.cpp similarity index 100% rename from reactos/base/shell/explorer/taskbar/favorites.cpp rename to base/shell/explorer/taskbar/favorites.cpp diff --git a/reactos/base/shell/explorer/taskbar/favorites.h b/base/shell/explorer/taskbar/favorites.h similarity index 100% rename from reactos/base/shell/explorer/taskbar/favorites.h rename to base/shell/explorer/taskbar/favorites.h diff --git a/reactos/base/shell/explorer/taskbar/quicklaunch.cpp b/base/shell/explorer/taskbar/quicklaunch.cpp similarity index 100% rename from reactos/base/shell/explorer/taskbar/quicklaunch.cpp rename to base/shell/explorer/taskbar/quicklaunch.cpp diff --git a/reactos/base/shell/explorer/taskbar/quicklaunch.h b/base/shell/explorer/taskbar/quicklaunch.h similarity index 100% rename from reactos/base/shell/explorer/taskbar/quicklaunch.h rename to base/shell/explorer/taskbar/quicklaunch.h diff --git a/reactos/base/shell/explorer/taskbar/startmenu.cpp b/base/shell/explorer/taskbar/startmenu.cpp similarity index 100% rename from reactos/base/shell/explorer/taskbar/startmenu.cpp rename to base/shell/explorer/taskbar/startmenu.cpp diff --git a/reactos/base/shell/explorer/taskbar/startmenu.h b/base/shell/explorer/taskbar/startmenu.h similarity index 100% rename from reactos/base/shell/explorer/taskbar/startmenu.h rename to base/shell/explorer/taskbar/startmenu.h diff --git a/reactos/base/shell/explorer/taskbar/taskbar.cpp b/base/shell/explorer/taskbar/taskbar.cpp similarity index 100% rename from reactos/base/shell/explorer/taskbar/taskbar.cpp rename to base/shell/explorer/taskbar/taskbar.cpp diff --git a/reactos/base/shell/explorer/taskbar/taskbar.h b/base/shell/explorer/taskbar/taskbar.h similarity index 100% rename from reactos/base/shell/explorer/taskbar/taskbar.h rename to base/shell/explorer/taskbar/taskbar.h diff --git a/reactos/base/shell/explorer/taskbar/traynotify.cpp b/base/shell/explorer/taskbar/traynotify.cpp similarity index 100% rename from reactos/base/shell/explorer/taskbar/traynotify.cpp rename to base/shell/explorer/taskbar/traynotify.cpp diff --git a/reactos/base/shell/explorer/taskbar/traynotify.h b/base/shell/explorer/taskbar/traynotify.h similarity index 100% rename from reactos/base/shell/explorer/taskbar/traynotify.h rename to base/shell/explorer/taskbar/traynotify.h diff --git a/reactos/base/shell/explorer/utility/dragdropimpl.cpp b/base/shell/explorer/utility/dragdropimpl.cpp similarity index 100% rename from reactos/base/shell/explorer/utility/dragdropimpl.cpp rename to base/shell/explorer/utility/dragdropimpl.cpp diff --git a/reactos/base/shell/explorer/utility/dragdropimpl.h b/base/shell/explorer/utility/dragdropimpl.h similarity index 100% rename from reactos/base/shell/explorer/utility/dragdropimpl.h rename to base/shell/explorer/utility/dragdropimpl.h diff --git a/reactos/base/shell/explorer/utility/shellbrowserimpl.cpp b/base/shell/explorer/utility/shellbrowserimpl.cpp similarity index 100% rename from reactos/base/shell/explorer/utility/shellbrowserimpl.cpp rename to base/shell/explorer/utility/shellbrowserimpl.cpp diff --git a/reactos/base/shell/explorer/utility/shellbrowserimpl.h b/base/shell/explorer/utility/shellbrowserimpl.h similarity index 100% rename from reactos/base/shell/explorer/utility/shellbrowserimpl.h rename to base/shell/explorer/utility/shellbrowserimpl.h diff --git a/reactos/base/shell/explorer/utility/shellclasses.cpp b/base/shell/explorer/utility/shellclasses.cpp similarity index 100% rename from reactos/base/shell/explorer/utility/shellclasses.cpp rename to base/shell/explorer/utility/shellclasses.cpp diff --git a/reactos/base/shell/explorer/utility/shellclasses.dsp b/base/shell/explorer/utility/shellclasses.dsp similarity index 100% rename from reactos/base/shell/explorer/utility/shellclasses.dsp rename to base/shell/explorer/utility/shellclasses.dsp diff --git a/reactos/base/shell/explorer/utility/shellclasses.dsw b/base/shell/explorer/utility/shellclasses.dsw similarity index 100% rename from reactos/base/shell/explorer/utility/shellclasses.dsw rename to base/shell/explorer/utility/shellclasses.dsw diff --git a/reactos/base/shell/explorer/utility/shellclasses.h b/base/shell/explorer/utility/shellclasses.h similarity index 100% rename from reactos/base/shell/explorer/utility/shellclasses.h rename to base/shell/explorer/utility/shellclasses.h diff --git a/reactos/base/shell/explorer/utility/shelltests.cpp b/base/shell/explorer/utility/shelltests.cpp similarity index 100% rename from reactos/base/shell/explorer/utility/shelltests.cpp rename to base/shell/explorer/utility/shelltests.cpp diff --git a/reactos/base/shell/explorer/utility/treedroptarget.h b/base/shell/explorer/utility/treedroptarget.h similarity index 100% rename from reactos/base/shell/explorer/utility/treedroptarget.h rename to base/shell/explorer/utility/treedroptarget.h diff --git a/reactos/base/shell/explorer/utility/utility.cpp b/base/shell/explorer/utility/utility.cpp similarity index 100% rename from reactos/base/shell/explorer/utility/utility.cpp rename to base/shell/explorer/utility/utility.cpp diff --git a/reactos/base/shell/explorer/utility/utility.h b/base/shell/explorer/utility/utility.h similarity index 100% rename from reactos/base/shell/explorer/utility/utility.h rename to base/shell/explorer/utility/utility.h diff --git a/reactos/base/shell/explorer/utility/window.cpp b/base/shell/explorer/utility/window.cpp similarity index 100% rename from reactos/base/shell/explorer/utility/window.cpp rename to base/shell/explorer/utility/window.cpp diff --git a/reactos/base/shell/explorer/utility/window.h b/base/shell/explorer/utility/window.h similarity index 100% rename from reactos/base/shell/explorer/utility/window.h rename to base/shell/explorer/utility/window.h diff --git a/reactos/base/shell/explorer/utility/xmlstorage.cpp b/base/shell/explorer/utility/xmlstorage.cpp similarity index 100% rename from reactos/base/shell/explorer/utility/xmlstorage.cpp rename to base/shell/explorer/utility/xmlstorage.cpp diff --git a/reactos/base/shell/explorer/utility/xmlstorage.h b/base/shell/explorer/utility/xmlstorage.h similarity index 100% rename from reactos/base/shell/explorer/utility/xmlstorage.h rename to base/shell/explorer/utility/xmlstorage.h diff --git a/reactos/base/shell/explorer/utility/xs-native.cpp b/base/shell/explorer/utility/xs-native.cpp similarity index 100% rename from reactos/base/shell/explorer/utility/xs-native.cpp rename to base/shell/explorer/utility/xs-native.cpp diff --git a/reactos/base/shell/explorer/wexplorer.dsw b/base/shell/explorer/wexplorer.dsw similarity index 100% rename from reactos/base/shell/explorer/wexplorer.dsw rename to base/shell/explorer/wexplorer.dsw diff --git a/reactos/base/shell/shell.rbuild b/base/shell/shell.rbuild similarity index 100% rename from reactos/base/shell/shell.rbuild rename to base/shell/shell.rbuild diff --git a/reactos/base/system/CMakeLists.txt b/base/system/CMakeLists.txt similarity index 100% rename from reactos/base/system/CMakeLists.txt rename to base/system/CMakeLists.txt diff --git a/reactos/base/system/autochk/CMakeLists.txt b/base/system/autochk/CMakeLists.txt similarity index 100% rename from reactos/base/system/autochk/CMakeLists.txt rename to base/system/autochk/CMakeLists.txt diff --git a/reactos/base/system/autochk/autochk.c b/base/system/autochk/autochk.c similarity index 100% rename from reactos/base/system/autochk/autochk.c rename to base/system/autochk/autochk.c diff --git a/reactos/base/system/autochk/autochk.rbuild b/base/system/autochk/autochk.rbuild similarity index 100% rename from reactos/base/system/autochk/autochk.rbuild rename to base/system/autochk/autochk.rbuild diff --git a/reactos/base/system/autochk/autochk.rc b/base/system/autochk/autochk.rc similarity index 100% rename from reactos/base/system/autochk/autochk.rc rename to base/system/autochk/autochk.rc diff --git a/reactos/base/system/bootok/CMakeLists.txt b/base/system/bootok/CMakeLists.txt similarity index 100% rename from reactos/base/system/bootok/CMakeLists.txt rename to base/system/bootok/CMakeLists.txt diff --git a/reactos/base/system/bootok/bootok.c b/base/system/bootok/bootok.c similarity index 100% rename from reactos/base/system/bootok/bootok.c rename to base/system/bootok/bootok.c diff --git a/reactos/base/system/bootok/bootok.rbuild b/base/system/bootok/bootok.rbuild similarity index 100% rename from reactos/base/system/bootok/bootok.rbuild rename to base/system/bootok/bootok.rbuild diff --git a/reactos/base/system/bootok/bootok.rc b/base/system/bootok/bootok.rc similarity index 100% rename from reactos/base/system/bootok/bootok.rc rename to base/system/bootok/bootok.rc diff --git a/reactos/base/system/diskpart/CMakeLists.txt b/base/system/diskpart/CMakeLists.txt similarity index 100% rename from reactos/base/system/diskpart/CMakeLists.txt rename to base/system/diskpart/CMakeLists.txt diff --git a/reactos/base/system/diskpart/active.c b/base/system/diskpart/active.c similarity index 100% rename from reactos/base/system/diskpart/active.c rename to base/system/diskpart/active.c diff --git a/reactos/base/system/diskpart/add.c b/base/system/diskpart/add.c similarity index 100% rename from reactos/base/system/diskpart/add.c rename to base/system/diskpart/add.c diff --git a/reactos/base/system/diskpart/assign.c b/base/system/diskpart/assign.c similarity index 100% rename from reactos/base/system/diskpart/assign.c rename to base/system/diskpart/assign.c diff --git a/reactos/base/system/diskpart/attach.c b/base/system/diskpart/attach.c similarity index 100% rename from reactos/base/system/diskpart/attach.c rename to base/system/diskpart/attach.c diff --git a/reactos/base/system/diskpart/attributes.c b/base/system/diskpart/attributes.c similarity index 100% rename from reactos/base/system/diskpart/attributes.c rename to base/system/diskpart/attributes.c diff --git a/reactos/base/system/diskpart/automount.c b/base/system/diskpart/automount.c similarity index 100% rename from reactos/base/system/diskpart/automount.c rename to base/system/diskpart/automount.c diff --git a/reactos/base/system/diskpart/break.c b/base/system/diskpart/break.c similarity index 100% rename from reactos/base/system/diskpart/break.c rename to base/system/diskpart/break.c diff --git a/reactos/base/system/diskpart/clean.c b/base/system/diskpart/clean.c similarity index 100% rename from reactos/base/system/diskpart/clean.c rename to base/system/diskpart/clean.c diff --git a/reactos/base/system/diskpart/compact.c b/base/system/diskpart/compact.c similarity index 100% rename from reactos/base/system/diskpart/compact.c rename to base/system/diskpart/compact.c diff --git a/reactos/base/system/diskpart/convert.c b/base/system/diskpart/convert.c similarity index 100% rename from reactos/base/system/diskpart/convert.c rename to base/system/diskpart/convert.c diff --git a/reactos/base/system/diskpart/create.c b/base/system/diskpart/create.c similarity index 100% rename from reactos/base/system/diskpart/create.c rename to base/system/diskpart/create.c diff --git a/reactos/base/system/diskpart/delete.c b/base/system/diskpart/delete.c similarity index 100% rename from reactos/base/system/diskpart/delete.c rename to base/system/diskpart/delete.c diff --git a/reactos/base/system/diskpart/detach.c b/base/system/diskpart/detach.c similarity index 100% rename from reactos/base/system/diskpart/detach.c rename to base/system/diskpart/detach.c diff --git a/reactos/base/system/diskpart/detail.c b/base/system/diskpart/detail.c similarity index 100% rename from reactos/base/system/diskpart/detail.c rename to base/system/diskpart/detail.c diff --git a/reactos/base/system/diskpart/diskpart.c b/base/system/diskpart/diskpart.c similarity index 100% rename from reactos/base/system/diskpart/diskpart.c rename to base/system/diskpart/diskpart.c diff --git a/reactos/base/system/diskpart/diskpart.h b/base/system/diskpart/diskpart.h similarity index 100% rename from reactos/base/system/diskpart/diskpart.h rename to base/system/diskpart/diskpart.h diff --git a/reactos/base/system/diskpart/diskpart.rbuild b/base/system/diskpart/diskpart.rbuild similarity index 100% rename from reactos/base/system/diskpart/diskpart.rbuild rename to base/system/diskpart/diskpart.rbuild diff --git a/reactos/base/system/diskpart/diskpart.rc b/base/system/diskpart/diskpart.rc similarity index 100% rename from reactos/base/system/diskpart/diskpart.rc rename to base/system/diskpart/diskpart.rc diff --git a/reactos/base/system/diskpart/expand.c b/base/system/diskpart/expand.c similarity index 100% rename from reactos/base/system/diskpart/expand.c rename to base/system/diskpart/expand.c diff --git a/reactos/base/system/diskpart/extend.c b/base/system/diskpart/extend.c similarity index 100% rename from reactos/base/system/diskpart/extend.c rename to base/system/diskpart/extend.c diff --git a/reactos/base/system/diskpart/filesystems.c b/base/system/diskpart/filesystems.c similarity index 100% rename from reactos/base/system/diskpart/filesystems.c rename to base/system/diskpart/filesystems.c diff --git a/reactos/base/system/diskpart/format.c b/base/system/diskpart/format.c similarity index 100% rename from reactos/base/system/diskpart/format.c rename to base/system/diskpart/format.c diff --git a/reactos/base/system/diskpart/gpt.c b/base/system/diskpart/gpt.c similarity index 100% rename from reactos/base/system/diskpart/gpt.c rename to base/system/diskpart/gpt.c diff --git a/reactos/base/system/diskpart/help.c b/base/system/diskpart/help.c similarity index 100% rename from reactos/base/system/diskpart/help.c rename to base/system/diskpart/help.c diff --git a/reactos/base/system/diskpart/import.c b/base/system/diskpart/import.c similarity index 100% rename from reactos/base/system/diskpart/import.c rename to base/system/diskpart/import.c diff --git a/reactos/base/system/diskpart/inactive.c b/base/system/diskpart/inactive.c similarity index 100% rename from reactos/base/system/diskpart/inactive.c rename to base/system/diskpart/inactive.c diff --git a/reactos/base/system/diskpart/interpreter.c b/base/system/diskpart/interpreter.c similarity index 100% rename from reactos/base/system/diskpart/interpreter.c rename to base/system/diskpart/interpreter.c diff --git a/reactos/base/system/diskpart/lang/en-US.rc b/base/system/diskpart/lang/en-US.rc similarity index 100% rename from reactos/base/system/diskpart/lang/en-US.rc rename to base/system/diskpart/lang/en-US.rc diff --git a/reactos/base/system/diskpart/lang/ro-RO.rc b/base/system/diskpart/lang/ro-RO.rc similarity index 100% rename from reactos/base/system/diskpart/lang/ro-RO.rc rename to base/system/diskpart/lang/ro-RO.rc diff --git a/reactos/base/system/diskpart/list.c b/base/system/diskpart/list.c similarity index 100% rename from reactos/base/system/diskpart/list.c rename to base/system/diskpart/list.c diff --git a/reactos/base/system/diskpart/merge.c b/base/system/diskpart/merge.c similarity index 100% rename from reactos/base/system/diskpart/merge.c rename to base/system/diskpart/merge.c diff --git a/reactos/base/system/diskpart/offline.c b/base/system/diskpart/offline.c similarity index 100% rename from reactos/base/system/diskpart/offline.c rename to base/system/diskpart/offline.c diff --git a/reactos/base/system/diskpart/online.c b/base/system/diskpart/online.c similarity index 100% rename from reactos/base/system/diskpart/online.c rename to base/system/diskpart/online.c diff --git a/reactos/base/system/diskpart/recover.c b/base/system/diskpart/recover.c similarity index 100% rename from reactos/base/system/diskpart/recover.c rename to base/system/diskpart/recover.c diff --git a/reactos/base/system/diskpart/remove.c b/base/system/diskpart/remove.c similarity index 100% rename from reactos/base/system/diskpart/remove.c rename to base/system/diskpart/remove.c diff --git a/reactos/base/system/diskpart/repair.c b/base/system/diskpart/repair.c similarity index 100% rename from reactos/base/system/diskpart/repair.c rename to base/system/diskpart/repair.c diff --git a/reactos/base/system/diskpart/rescan.c b/base/system/diskpart/rescan.c similarity index 100% rename from reactos/base/system/diskpart/rescan.c rename to base/system/diskpart/rescan.c diff --git a/reactos/base/system/diskpart/resource.h b/base/system/diskpart/resource.h similarity index 100% rename from reactos/base/system/diskpart/resource.h rename to base/system/diskpart/resource.h diff --git a/reactos/base/system/diskpart/retain.c b/base/system/diskpart/retain.c similarity index 100% rename from reactos/base/system/diskpart/retain.c rename to base/system/diskpart/retain.c diff --git a/reactos/base/system/diskpart/san.c b/base/system/diskpart/san.c similarity index 100% rename from reactos/base/system/diskpart/san.c rename to base/system/diskpart/san.c diff --git a/reactos/base/system/diskpart/select.c b/base/system/diskpart/select.c similarity index 100% rename from reactos/base/system/diskpart/select.c rename to base/system/diskpart/select.c diff --git a/reactos/base/system/diskpart/setid.c b/base/system/diskpart/setid.c similarity index 100% rename from reactos/base/system/diskpart/setid.c rename to base/system/diskpart/setid.c diff --git a/reactos/base/system/diskpart/shrink.c b/base/system/diskpart/shrink.c similarity index 100% rename from reactos/base/system/diskpart/shrink.c rename to base/system/diskpart/shrink.c diff --git a/reactos/base/system/diskpart/uniqueid.c b/base/system/diskpart/uniqueid.c similarity index 100% rename from reactos/base/system/diskpart/uniqueid.c rename to base/system/diskpart/uniqueid.c diff --git a/reactos/base/system/expand/CMakeLists.txt b/base/system/expand/CMakeLists.txt similarity index 100% rename from reactos/base/system/expand/CMakeLists.txt rename to base/system/expand/CMakeLists.txt diff --git a/reactos/base/system/expand/expand.c b/base/system/expand/expand.c similarity index 100% rename from reactos/base/system/expand/expand.c rename to base/system/expand/expand.c diff --git a/reactos/base/system/expand/expand.rbuild b/base/system/expand/expand.rbuild similarity index 100% rename from reactos/base/system/expand/expand.rbuild rename to base/system/expand/expand.rbuild diff --git a/reactos/base/system/expand/expand.rc b/base/system/expand/expand.rc similarity index 100% rename from reactos/base/system/expand/expand.rc rename to base/system/expand/expand.rc diff --git a/reactos/base/system/format/CMakeLists.txt b/base/system/format/CMakeLists.txt similarity index 100% rename from reactos/base/system/format/CMakeLists.txt rename to base/system/format/CMakeLists.txt diff --git a/reactos/base/system/format/format.c b/base/system/format/format.c similarity index 100% rename from reactos/base/system/format/format.c rename to base/system/format/format.c diff --git a/reactos/base/system/format/format.rbuild b/base/system/format/format.rbuild similarity index 100% rename from reactos/base/system/format/format.rbuild rename to base/system/format/format.rbuild diff --git a/reactos/base/system/format/format.rc b/base/system/format/format.rc similarity index 100% rename from reactos/base/system/format/format.rc rename to base/system/format/format.rc diff --git a/reactos/base/system/format/lang/bg-BG.rc b/base/system/format/lang/bg-BG.rc similarity index 100% rename from reactos/base/system/format/lang/bg-BG.rc rename to base/system/format/lang/bg-BG.rc diff --git a/reactos/base/system/format/lang/cs-CZ.rc b/base/system/format/lang/cs-CZ.rc similarity index 100% rename from reactos/base/system/format/lang/cs-CZ.rc rename to base/system/format/lang/cs-CZ.rc diff --git a/reactos/base/system/format/lang/de-DE.rc b/base/system/format/lang/de-DE.rc similarity index 100% rename from reactos/base/system/format/lang/de-DE.rc rename to base/system/format/lang/de-DE.rc diff --git a/reactos/base/system/format/lang/el-GR.rc b/base/system/format/lang/el-GR.rc similarity index 100% rename from reactos/base/system/format/lang/el-GR.rc rename to base/system/format/lang/el-GR.rc diff --git a/reactos/base/system/format/lang/en-US.rc b/base/system/format/lang/en-US.rc similarity index 100% rename from reactos/base/system/format/lang/en-US.rc rename to base/system/format/lang/en-US.rc diff --git a/reactos/base/system/format/lang/es-ES.rc b/base/system/format/lang/es-ES.rc similarity index 100% rename from reactos/base/system/format/lang/es-ES.rc rename to base/system/format/lang/es-ES.rc diff --git a/reactos/base/system/format/lang/fr-FR.rc b/base/system/format/lang/fr-FR.rc similarity index 100% rename from reactos/base/system/format/lang/fr-FR.rc rename to base/system/format/lang/fr-FR.rc diff --git a/reactos/base/system/format/lang/hu-HU.rc b/base/system/format/lang/hu-HU.rc similarity index 100% rename from reactos/base/system/format/lang/hu-HU.rc rename to base/system/format/lang/hu-HU.rc diff --git a/reactos/base/system/format/lang/id-ID.rc b/base/system/format/lang/id-ID.rc similarity index 100% rename from reactos/base/system/format/lang/id-ID.rc rename to base/system/format/lang/id-ID.rc diff --git a/reactos/base/system/format/lang/it-IT.rc b/base/system/format/lang/it-IT.rc similarity index 100% rename from reactos/base/system/format/lang/it-IT.rc rename to base/system/format/lang/it-IT.rc diff --git a/reactos/base/system/format/lang/ja-JP.rc b/base/system/format/lang/ja-JP.rc similarity index 100% rename from reactos/base/system/format/lang/ja-JP.rc rename to base/system/format/lang/ja-JP.rc diff --git a/reactos/base/system/format/lang/lt-LT.rc b/base/system/format/lang/lt-LT.rc similarity index 100% rename from reactos/base/system/format/lang/lt-LT.rc rename to base/system/format/lang/lt-LT.rc diff --git a/reactos/base/system/format/lang/no-NO.rc b/base/system/format/lang/no-NO.rc similarity index 100% rename from reactos/base/system/format/lang/no-NO.rc rename to base/system/format/lang/no-NO.rc diff --git a/reactos/base/system/format/lang/pl-PL.rc b/base/system/format/lang/pl-PL.rc similarity index 100% rename from reactos/base/system/format/lang/pl-PL.rc rename to base/system/format/lang/pl-PL.rc diff --git a/reactos/base/system/format/lang/ro-RO.rc b/base/system/format/lang/ro-RO.rc similarity index 100% rename from reactos/base/system/format/lang/ro-RO.rc rename to base/system/format/lang/ro-RO.rc diff --git a/reactos/base/system/format/lang/ru-RU.rc b/base/system/format/lang/ru-RU.rc similarity index 100% rename from reactos/base/system/format/lang/ru-RU.rc rename to base/system/format/lang/ru-RU.rc diff --git a/reactos/base/system/format/lang/sk-SK.rc b/base/system/format/lang/sk-SK.rc similarity index 100% rename from reactos/base/system/format/lang/sk-SK.rc rename to base/system/format/lang/sk-SK.rc diff --git a/reactos/base/system/format/lang/uk-UA.rc b/base/system/format/lang/uk-UA.rc similarity index 100% rename from reactos/base/system/format/lang/uk-UA.rc rename to base/system/format/lang/uk-UA.rc diff --git a/reactos/base/system/format/lang/zh-CN.rc b/base/system/format/lang/zh-CN.rc similarity index 100% rename from reactos/base/system/format/lang/zh-CN.rc rename to base/system/format/lang/zh-CN.rc diff --git a/reactos/base/system/format/resource.h b/base/system/format/resource.h similarity index 100% rename from reactos/base/system/format/resource.h rename to base/system/format/resource.h diff --git a/reactos/base/system/format/rsrc.rc b/base/system/format/rsrc.rc similarity index 100% rename from reactos/base/system/format/rsrc.rc rename to base/system/format/rsrc.rc diff --git a/reactos/base/system/logonui/NT5design.c b/base/system/logonui/NT5design.c similarity index 100% rename from reactos/base/system/logonui/NT5design.c rename to base/system/logonui/NT5design.c diff --git a/reactos/base/system/logonui/NT6design.c b/base/system/logonui/NT6design.c similarity index 100% rename from reactos/base/system/logonui/NT6design.c rename to base/system/logonui/NT6design.c diff --git a/reactos/base/system/logonui/lang/en-US.rc b/base/system/logonui/lang/en-US.rc similarity index 100% rename from reactos/base/system/logonui/lang/en-US.rc rename to base/system/logonui/lang/en-US.rc diff --git a/reactos/base/system/logonui/logonui.c b/base/system/logonui/logonui.c similarity index 100% rename from reactos/base/system/logonui/logonui.c rename to base/system/logonui/logonui.c diff --git a/reactos/base/system/logonui/logonui.h b/base/system/logonui/logonui.h similarity index 100% rename from reactos/base/system/logonui/logonui.h rename to base/system/logonui/logonui.h diff --git a/reactos/base/system/logonui/logonui.rbuild b/base/system/logonui/logonui.rbuild similarity index 100% rename from reactos/base/system/logonui/logonui.rbuild rename to base/system/logonui/logonui.rbuild diff --git a/reactos/base/system/logonui/logonui.rc b/base/system/logonui/logonui.rc similarity index 100% rename from reactos/base/system/logonui/logonui.rc rename to base/system/logonui/logonui.rc diff --git a/reactos/base/system/logonui/res/100.bmp b/base/system/logonui/res/100.bmp similarity index 100% rename from reactos/base/system/logonui/res/100.bmp rename to base/system/logonui/res/100.bmp diff --git a/reactos/base/system/logonui/res/123.bmp b/base/system/logonui/res/123.bmp similarity index 100% rename from reactos/base/system/logonui/res/123.bmp rename to base/system/logonui/res/123.bmp diff --git a/reactos/base/system/logonui/res/125.bmp b/base/system/logonui/res/125.bmp similarity index 100% rename from reactos/base/system/logonui/res/125.bmp rename to base/system/logonui/res/125.bmp diff --git a/reactos/base/system/logonui/res/126.bmp b/base/system/logonui/res/126.bmp similarity index 100% rename from reactos/base/system/logonui/res/126.bmp rename to base/system/logonui/res/126.bmp diff --git a/reactos/base/system/logonui/res/unknown.bmp b/base/system/logonui/res/unknown.bmp similarity index 100% rename from reactos/base/system/logonui/res/unknown.bmp rename to base/system/logonui/res/unknown.bmp diff --git a/reactos/base/system/logonui/res/unknown2.bmp b/base/system/logonui/res/unknown2.bmp similarity index 100% rename from reactos/base/system/logonui/res/unknown2.bmp rename to base/system/logonui/res/unknown2.bmp diff --git a/reactos/base/system/logonui/resource.h b/base/system/logonui/resource.h similarity index 100% rename from reactos/base/system/logonui/resource.h rename to base/system/logonui/resource.h diff --git a/reactos/base/system/logonui/rsrc.rc b/base/system/logonui/rsrc.rc similarity index 100% rename from reactos/base/system/logonui/rsrc.rc rename to base/system/logonui/rsrc.rc diff --git a/reactos/base/system/lsass/CMakeLists.txt b/base/system/lsass/CMakeLists.txt similarity index 100% rename from reactos/base/system/lsass/CMakeLists.txt rename to base/system/lsass/CMakeLists.txt diff --git a/reactos/base/system/lsass/lsass.c b/base/system/lsass/lsass.c similarity index 100% rename from reactos/base/system/lsass/lsass.c rename to base/system/lsass/lsass.c diff --git a/reactos/base/system/lsass/lsass.rbuild b/base/system/lsass/lsass.rbuild similarity index 100% rename from reactos/base/system/lsass/lsass.rbuild rename to base/system/lsass/lsass.rbuild diff --git a/reactos/base/system/lsass/lsass.rc b/base/system/lsass/lsass.rc similarity index 100% rename from reactos/base/system/lsass/lsass.rc rename to base/system/lsass/lsass.rc diff --git a/reactos/base/system/msiexec/CMakeLists.txt b/base/system/msiexec/CMakeLists.txt similarity index 100% rename from reactos/base/system/msiexec/CMakeLists.txt rename to base/system/msiexec/CMakeLists.txt diff --git a/reactos/base/system/msiexec/msiexec.c b/base/system/msiexec/msiexec.c similarity index 100% rename from reactos/base/system/msiexec/msiexec.c rename to base/system/msiexec/msiexec.c diff --git a/reactos/base/system/msiexec/msiexec.ico b/base/system/msiexec/msiexec.ico similarity index 100% rename from reactos/base/system/msiexec/msiexec.ico rename to base/system/msiexec/msiexec.ico diff --git a/reactos/base/system/msiexec/msiexec.rbuild b/base/system/msiexec/msiexec.rbuild similarity index 100% rename from reactos/base/system/msiexec/msiexec.rbuild rename to base/system/msiexec/msiexec.rbuild diff --git a/reactos/base/system/msiexec/rsrc.rc b/base/system/msiexec/rsrc.rc similarity index 100% rename from reactos/base/system/msiexec/rsrc.rc rename to base/system/msiexec/rsrc.rc diff --git a/reactos/base/system/msiexec/service.c b/base/system/msiexec/service.c similarity index 100% rename from reactos/base/system/msiexec/service.c rename to base/system/msiexec/service.c diff --git a/reactos/base/system/regsvr32/CMakeLists.txt b/base/system/regsvr32/CMakeLists.txt similarity index 100% rename from reactos/base/system/regsvr32/CMakeLists.txt rename to base/system/regsvr32/CMakeLists.txt diff --git a/reactos/base/system/regsvr32/lang/bg-BG.rc b/base/system/regsvr32/lang/bg-BG.rc similarity index 100% rename from reactos/base/system/regsvr32/lang/bg-BG.rc rename to base/system/regsvr32/lang/bg-BG.rc diff --git a/reactos/base/system/regsvr32/lang/cs-CZ.rc b/base/system/regsvr32/lang/cs-CZ.rc similarity index 100% rename from reactos/base/system/regsvr32/lang/cs-CZ.rc rename to base/system/regsvr32/lang/cs-CZ.rc diff --git a/reactos/base/system/regsvr32/lang/de-DE.rc b/base/system/regsvr32/lang/de-DE.rc similarity index 100% rename from reactos/base/system/regsvr32/lang/de-DE.rc rename to base/system/regsvr32/lang/de-DE.rc diff --git a/reactos/base/system/regsvr32/lang/en-US.rc b/base/system/regsvr32/lang/en-US.rc similarity index 100% rename from reactos/base/system/regsvr32/lang/en-US.rc rename to base/system/regsvr32/lang/en-US.rc diff --git a/reactos/base/system/regsvr32/lang/es-ES.rc b/base/system/regsvr32/lang/es-ES.rc similarity index 100% rename from reactos/base/system/regsvr32/lang/es-ES.rc rename to base/system/regsvr32/lang/es-ES.rc diff --git a/reactos/base/system/regsvr32/lang/fr-FR.rc b/base/system/regsvr32/lang/fr-FR.rc similarity index 100% rename from reactos/base/system/regsvr32/lang/fr-FR.rc rename to base/system/regsvr32/lang/fr-FR.rc diff --git a/reactos/base/system/regsvr32/lang/hu-HU.rc b/base/system/regsvr32/lang/hu-HU.rc similarity index 100% rename from reactos/base/system/regsvr32/lang/hu-HU.rc rename to base/system/regsvr32/lang/hu-HU.rc diff --git a/reactos/base/system/regsvr32/lang/id-ID.rc b/base/system/regsvr32/lang/id-ID.rc similarity index 100% rename from reactos/base/system/regsvr32/lang/id-ID.rc rename to base/system/regsvr32/lang/id-ID.rc diff --git a/reactos/base/system/regsvr32/lang/it-IT.rc b/base/system/regsvr32/lang/it-IT.rc similarity index 100% rename from reactos/base/system/regsvr32/lang/it-IT.rc rename to base/system/regsvr32/lang/it-IT.rc diff --git a/reactos/base/system/regsvr32/lang/ja-JP.rc b/base/system/regsvr32/lang/ja-JP.rc similarity index 100% rename from reactos/base/system/regsvr32/lang/ja-JP.rc rename to base/system/regsvr32/lang/ja-JP.rc diff --git a/reactos/base/system/regsvr32/lang/lt-LT.rc b/base/system/regsvr32/lang/lt-LT.rc similarity index 100% rename from reactos/base/system/regsvr32/lang/lt-LT.rc rename to base/system/regsvr32/lang/lt-LT.rc diff --git a/reactos/base/system/regsvr32/lang/nl-NL.rc b/base/system/regsvr32/lang/nl-NL.rc similarity index 100% rename from reactos/base/system/regsvr32/lang/nl-NL.rc rename to base/system/regsvr32/lang/nl-NL.rc diff --git a/reactos/base/system/regsvr32/lang/no-NO.rc b/base/system/regsvr32/lang/no-NO.rc similarity index 100% rename from reactos/base/system/regsvr32/lang/no-NO.rc rename to base/system/regsvr32/lang/no-NO.rc diff --git a/reactos/base/system/regsvr32/lang/pl-PL.rc b/base/system/regsvr32/lang/pl-PL.rc similarity index 100% rename from reactos/base/system/regsvr32/lang/pl-PL.rc rename to base/system/regsvr32/lang/pl-PL.rc diff --git a/reactos/base/system/regsvr32/lang/pt-BR.rc b/base/system/regsvr32/lang/pt-BR.rc similarity index 100% rename from reactos/base/system/regsvr32/lang/pt-BR.rc rename to base/system/regsvr32/lang/pt-BR.rc diff --git a/reactos/base/system/regsvr32/lang/ro-RO.rc b/base/system/regsvr32/lang/ro-RO.rc similarity index 100% rename from reactos/base/system/regsvr32/lang/ro-RO.rc rename to base/system/regsvr32/lang/ro-RO.rc diff --git a/reactos/base/system/regsvr32/lang/ru-RU.rc b/base/system/regsvr32/lang/ru-RU.rc similarity index 100% rename from reactos/base/system/regsvr32/lang/ru-RU.rc rename to base/system/regsvr32/lang/ru-RU.rc diff --git a/reactos/base/system/regsvr32/lang/uk-UA.rc b/base/system/regsvr32/lang/uk-UA.rc similarity index 100% rename from reactos/base/system/regsvr32/lang/uk-UA.rc rename to base/system/regsvr32/lang/uk-UA.rc diff --git a/reactos/base/system/regsvr32/lang/zh-CN.rc b/base/system/regsvr32/lang/zh-CN.rc similarity index 100% rename from reactos/base/system/regsvr32/lang/zh-CN.rc rename to base/system/regsvr32/lang/zh-CN.rc diff --git a/reactos/base/system/regsvr32/regsvr32.c b/base/system/regsvr32/regsvr32.c similarity index 100% rename from reactos/base/system/regsvr32/regsvr32.c rename to base/system/regsvr32/regsvr32.c diff --git a/reactos/base/system/regsvr32/regsvr32.rbuild b/base/system/regsvr32/regsvr32.rbuild similarity index 100% rename from reactos/base/system/regsvr32/regsvr32.rbuild rename to base/system/regsvr32/regsvr32.rbuild diff --git a/reactos/base/system/regsvr32/regsvr32.rc b/base/system/regsvr32/regsvr32.rc similarity index 100% rename from reactos/base/system/regsvr32/regsvr32.rc rename to base/system/regsvr32/regsvr32.rc diff --git a/reactos/base/system/regsvr32/resource.h b/base/system/regsvr32/resource.h similarity index 100% rename from reactos/base/system/regsvr32/resource.h rename to base/system/regsvr32/resource.h diff --git a/reactos/base/system/regsvr32/rsrc.rc b/base/system/regsvr32/rsrc.rc similarity index 100% rename from reactos/base/system/regsvr32/rsrc.rc rename to base/system/regsvr32/rsrc.rc diff --git a/reactos/base/system/rundll32/CMakeLists.txt b/base/system/rundll32/CMakeLists.txt similarity index 100% rename from reactos/base/system/rundll32/CMakeLists.txt rename to base/system/rundll32/CMakeLists.txt diff --git a/reactos/base/system/rundll32/lang/bg-BG.rc b/base/system/rundll32/lang/bg-BG.rc similarity index 100% rename from reactos/base/system/rundll32/lang/bg-BG.rc rename to base/system/rundll32/lang/bg-BG.rc diff --git a/reactos/base/system/rundll32/lang/cs-CZ.rc b/base/system/rundll32/lang/cs-CZ.rc similarity index 100% rename from reactos/base/system/rundll32/lang/cs-CZ.rc rename to base/system/rundll32/lang/cs-CZ.rc diff --git a/reactos/base/system/rundll32/lang/de-DE.rc b/base/system/rundll32/lang/de-DE.rc similarity index 100% rename from reactos/base/system/rundll32/lang/de-DE.rc rename to base/system/rundll32/lang/de-DE.rc diff --git a/reactos/base/system/rundll32/lang/el-GR.rc b/base/system/rundll32/lang/el-GR.rc similarity index 100% rename from reactos/base/system/rundll32/lang/el-GR.rc rename to base/system/rundll32/lang/el-GR.rc diff --git a/reactos/base/system/rundll32/lang/en-US.rc b/base/system/rundll32/lang/en-US.rc similarity index 100% rename from reactos/base/system/rundll32/lang/en-US.rc rename to base/system/rundll32/lang/en-US.rc diff --git a/reactos/base/system/rundll32/lang/es-ES.rc b/base/system/rundll32/lang/es-ES.rc similarity index 100% rename from reactos/base/system/rundll32/lang/es-ES.rc rename to base/system/rundll32/lang/es-ES.rc diff --git a/reactos/base/system/rundll32/lang/fr-FR.rc b/base/system/rundll32/lang/fr-FR.rc similarity index 100% rename from reactos/base/system/rundll32/lang/fr-FR.rc rename to base/system/rundll32/lang/fr-FR.rc diff --git a/reactos/base/system/rundll32/lang/hu-HU.rc b/base/system/rundll32/lang/hu-HU.rc similarity index 100% rename from reactos/base/system/rundll32/lang/hu-HU.rc rename to base/system/rundll32/lang/hu-HU.rc diff --git a/reactos/base/system/rundll32/lang/id-ID.rc b/base/system/rundll32/lang/id-ID.rc similarity index 100% rename from reactos/base/system/rundll32/lang/id-ID.rc rename to base/system/rundll32/lang/id-ID.rc diff --git a/reactos/base/system/rundll32/lang/it-IT.rc b/base/system/rundll32/lang/it-IT.rc similarity index 100% rename from reactos/base/system/rundll32/lang/it-IT.rc rename to base/system/rundll32/lang/it-IT.rc diff --git a/reactos/base/system/rundll32/lang/ja-JP.rc b/base/system/rundll32/lang/ja-JP.rc similarity index 100% rename from reactos/base/system/rundll32/lang/ja-JP.rc rename to base/system/rundll32/lang/ja-JP.rc diff --git a/reactos/base/system/rundll32/lang/lt-LT.rc b/base/system/rundll32/lang/lt-LT.rc similarity index 100% rename from reactos/base/system/rundll32/lang/lt-LT.rc rename to base/system/rundll32/lang/lt-LT.rc diff --git a/reactos/base/system/rundll32/lang/nl-NL.rc b/base/system/rundll32/lang/nl-NL.rc similarity index 100% rename from reactos/base/system/rundll32/lang/nl-NL.rc rename to base/system/rundll32/lang/nl-NL.rc diff --git a/reactos/base/system/rundll32/lang/no-NO.rc b/base/system/rundll32/lang/no-NO.rc similarity index 100% rename from reactos/base/system/rundll32/lang/no-NO.rc rename to base/system/rundll32/lang/no-NO.rc diff --git a/reactos/base/system/rundll32/lang/pl-PL.rc b/base/system/rundll32/lang/pl-PL.rc similarity index 100% rename from reactos/base/system/rundll32/lang/pl-PL.rc rename to base/system/rundll32/lang/pl-PL.rc diff --git a/reactos/base/system/rundll32/lang/pt-BR.rc b/base/system/rundll32/lang/pt-BR.rc similarity index 100% rename from reactos/base/system/rundll32/lang/pt-BR.rc rename to base/system/rundll32/lang/pt-BR.rc diff --git a/reactos/base/system/rundll32/lang/ro-RO.rc b/base/system/rundll32/lang/ro-RO.rc similarity index 100% rename from reactos/base/system/rundll32/lang/ro-RO.rc rename to base/system/rundll32/lang/ro-RO.rc diff --git a/reactos/base/system/rundll32/lang/ru-RU.rc b/base/system/rundll32/lang/ru-RU.rc similarity index 100% rename from reactos/base/system/rundll32/lang/ru-RU.rc rename to base/system/rundll32/lang/ru-RU.rc diff --git a/reactos/base/system/rundll32/lang/sk-SK.rc b/base/system/rundll32/lang/sk-SK.rc similarity index 100% rename from reactos/base/system/rundll32/lang/sk-SK.rc rename to base/system/rundll32/lang/sk-SK.rc diff --git a/reactos/base/system/rundll32/lang/th-TH.rc b/base/system/rundll32/lang/th-TH.rc similarity index 100% rename from reactos/base/system/rundll32/lang/th-TH.rc rename to base/system/rundll32/lang/th-TH.rc diff --git a/reactos/base/system/rundll32/lang/uk-UA.rc b/base/system/rundll32/lang/uk-UA.rc similarity index 100% rename from reactos/base/system/rundll32/lang/uk-UA.rc rename to base/system/rundll32/lang/uk-UA.rc diff --git a/reactos/base/system/rundll32/lang/zh-CN.rc b/base/system/rundll32/lang/zh-CN.rc similarity index 100% rename from reactos/base/system/rundll32/lang/zh-CN.rc rename to base/system/rundll32/lang/zh-CN.rc diff --git a/reactos/base/system/rundll32/resource.h b/base/system/rundll32/resource.h similarity index 100% rename from reactos/base/system/rundll32/resource.h rename to base/system/rundll32/resource.h diff --git a/reactos/base/system/rundll32/rsrc.rc b/base/system/rundll32/rsrc.rc similarity index 100% rename from reactos/base/system/rundll32/rsrc.rc rename to base/system/rundll32/rsrc.rc diff --git a/reactos/base/system/rundll32/rundll32.c b/base/system/rundll32/rundll32.c similarity index 100% rename from reactos/base/system/rundll32/rundll32.c rename to base/system/rundll32/rundll32.c diff --git a/reactos/base/system/rundll32/rundll32.rbuild b/base/system/rundll32/rundll32.rbuild similarity index 100% rename from reactos/base/system/rundll32/rundll32.rbuild rename to base/system/rundll32/rundll32.rbuild diff --git a/reactos/base/system/rundll32/rundll32.rc b/base/system/rundll32/rundll32.rc similarity index 100% rename from reactos/base/system/rundll32/rundll32.rc rename to base/system/rundll32/rundll32.rc diff --git a/reactos/base/system/runonce/CMakeLists.txt b/base/system/runonce/CMakeLists.txt similarity index 100% rename from reactos/base/system/runonce/CMakeLists.txt rename to base/system/runonce/CMakeLists.txt diff --git a/reactos/base/system/runonce/lang/de-DE.rc b/base/system/runonce/lang/de-DE.rc similarity index 100% rename from reactos/base/system/runonce/lang/de-DE.rc rename to base/system/runonce/lang/de-DE.rc diff --git a/reactos/base/system/runonce/lang/en-US.rc b/base/system/runonce/lang/en-US.rc similarity index 100% rename from reactos/base/system/runonce/lang/en-US.rc rename to base/system/runonce/lang/en-US.rc diff --git a/reactos/base/system/runonce/lang/es-ES.rc b/base/system/runonce/lang/es-ES.rc similarity index 100% rename from reactos/base/system/runonce/lang/es-ES.rc rename to base/system/runonce/lang/es-ES.rc diff --git a/reactos/base/system/runonce/lang/fr-FR.rc b/base/system/runonce/lang/fr-FR.rc similarity index 100% rename from reactos/base/system/runonce/lang/fr-FR.rc rename to base/system/runonce/lang/fr-FR.rc diff --git a/reactos/base/system/runonce/lang/ja-JP.rc b/base/system/runonce/lang/ja-JP.rc similarity index 100% rename from reactos/base/system/runonce/lang/ja-JP.rc rename to base/system/runonce/lang/ja-JP.rc diff --git a/reactos/base/system/runonce/lang/pl-PL.rc b/base/system/runonce/lang/pl-PL.rc similarity index 100% rename from reactos/base/system/runonce/lang/pl-PL.rc rename to base/system/runonce/lang/pl-PL.rc diff --git a/reactos/base/system/runonce/lang/pt-BR.rc b/base/system/runonce/lang/pt-BR.rc similarity index 100% rename from reactos/base/system/runonce/lang/pt-BR.rc rename to base/system/runonce/lang/pt-BR.rc diff --git a/reactos/base/system/runonce/lang/ro-RO.rc b/base/system/runonce/lang/ro-RO.rc similarity index 100% rename from reactos/base/system/runonce/lang/ro-RO.rc rename to base/system/runonce/lang/ro-RO.rc diff --git a/reactos/base/system/runonce/lang/ru-RU.rc b/base/system/runonce/lang/ru-RU.rc similarity index 100% rename from reactos/base/system/runonce/lang/ru-RU.rc rename to base/system/runonce/lang/ru-RU.rc diff --git a/reactos/base/system/runonce/lang/sk-SK.rc b/base/system/runonce/lang/sk-SK.rc similarity index 100% rename from reactos/base/system/runonce/lang/sk-SK.rc rename to base/system/runonce/lang/sk-SK.rc diff --git a/reactos/base/system/runonce/lang/uk-UA.rc b/base/system/runonce/lang/uk-UA.rc similarity index 100% rename from reactos/base/system/runonce/lang/uk-UA.rc rename to base/system/runonce/lang/uk-UA.rc diff --git a/reactos/base/system/runonce/lang/zh-CN.rc b/base/system/runonce/lang/zh-CN.rc similarity index 100% rename from reactos/base/system/runonce/lang/zh-CN.rc rename to base/system/runonce/lang/zh-CN.rc diff --git a/reactos/base/system/runonce/res/icon.ico b/base/system/runonce/res/icon.ico similarity index 100% rename from reactos/base/system/runonce/res/icon.ico rename to base/system/runonce/res/icon.ico diff --git a/reactos/base/system/runonce/resource.h b/base/system/runonce/resource.h similarity index 100% rename from reactos/base/system/runonce/resource.h rename to base/system/runonce/resource.h diff --git a/reactos/base/system/runonce/rsrc.rc b/base/system/runonce/rsrc.rc similarity index 100% rename from reactos/base/system/runonce/rsrc.rc rename to base/system/runonce/rsrc.rc diff --git a/reactos/base/system/runonce/runonce.c b/base/system/runonce/runonce.c similarity index 100% rename from reactos/base/system/runonce/runonce.c rename to base/system/runonce/runonce.c diff --git a/reactos/base/system/runonce/runonce.h b/base/system/runonce/runonce.h similarity index 100% rename from reactos/base/system/runonce/runonce.h rename to base/system/runonce/runonce.h diff --git a/reactos/base/system/runonce/runonce.rbuild b/base/system/runonce/runonce.rbuild similarity index 100% rename from reactos/base/system/runonce/runonce.rbuild rename to base/system/runonce/runonce.rbuild diff --git a/reactos/base/system/runonce/runonce.rc b/base/system/runonce/runonce.rc similarity index 100% rename from reactos/base/system/runonce/runonce.rc rename to base/system/runonce/runonce.rc diff --git a/reactos/base/system/services/CMakeLists.txt b/base/system/services/CMakeLists.txt similarity index 100% rename from reactos/base/system/services/CMakeLists.txt rename to base/system/services/CMakeLists.txt diff --git a/reactos/base/system/services/config.c b/base/system/services/config.c similarity index 100% rename from reactos/base/system/services/config.c rename to base/system/services/config.c diff --git a/reactos/base/system/services/database.c b/base/system/services/database.c similarity index 100% rename from reactos/base/system/services/database.c rename to base/system/services/database.c diff --git a/reactos/base/system/services/driver.c b/base/system/services/driver.c similarity index 100% rename from reactos/base/system/services/driver.c rename to base/system/services/driver.c diff --git a/reactos/base/system/services/groupdb.c b/base/system/services/groupdb.c similarity index 100% rename from reactos/base/system/services/groupdb.c rename to base/system/services/groupdb.c diff --git a/reactos/base/system/services/rpcserver.c b/base/system/services/rpcserver.c similarity index 100% rename from reactos/base/system/services/rpcserver.c rename to base/system/services/rpcserver.c diff --git a/reactos/base/system/services/services.c b/base/system/services/services.c similarity index 100% rename from reactos/base/system/services/services.c rename to base/system/services/services.c diff --git a/reactos/base/system/services/services.h b/base/system/services/services.h similarity index 100% rename from reactos/base/system/services/services.h rename to base/system/services/services.h diff --git a/reactos/base/system/services/services.rbuild b/base/system/services/services.rbuild similarity index 100% rename from reactos/base/system/services/services.rbuild rename to base/system/services/services.rbuild diff --git a/reactos/base/system/services/services.rc b/base/system/services/services.rc similarity index 100% rename from reactos/base/system/services/services.rc rename to base/system/services/services.rc diff --git a/reactos/base/system/smss/CMakeLists.txt b/base/system/smss/CMakeLists.txt similarity index 100% rename from reactos/base/system/smss/CMakeLists.txt rename to base/system/smss/CMakeLists.txt diff --git a/reactos/base/system/smss/client.c b/base/system/smss/client.c similarity index 100% rename from reactos/base/system/smss/client.c rename to base/system/smss/client.c diff --git a/reactos/base/system/smss/debug.c b/base/system/smss/debug.c similarity index 100% rename from reactos/base/system/smss/debug.c rename to base/system/smss/debug.c diff --git a/reactos/base/system/smss/init.c b/base/system/smss/init.c similarity index 100% rename from reactos/base/system/smss/init.c rename to base/system/smss/init.c diff --git a/reactos/base/system/smss/initdosdev.c b/base/system/smss/initdosdev.c similarity index 100% rename from reactos/base/system/smss/initdosdev.c rename to base/system/smss/initdosdev.c diff --git a/reactos/base/system/smss/initenv.c b/base/system/smss/initenv.c similarity index 100% rename from reactos/base/system/smss/initenv.c rename to base/system/smss/initenv.c diff --git a/reactos/base/system/smss/initheap.c b/base/system/smss/initheap.c similarity index 100% rename from reactos/base/system/smss/initheap.c rename to base/system/smss/initheap.c diff --git a/reactos/base/system/smss/initmv.c b/base/system/smss/initmv.c similarity index 100% rename from reactos/base/system/smss/initmv.c rename to base/system/smss/initmv.c diff --git a/reactos/base/system/smss/initobdir.c b/base/system/smss/initobdir.c similarity index 100% rename from reactos/base/system/smss/initobdir.c rename to base/system/smss/initobdir.c diff --git a/reactos/base/system/smss/initpage.c b/base/system/smss/initpage.c similarity index 100% rename from reactos/base/system/smss/initpage.c rename to base/system/smss/initpage.c diff --git a/reactos/base/system/smss/initreg.c b/base/system/smss/initreg.c similarity index 100% rename from reactos/base/system/smss/initreg.c rename to base/system/smss/initreg.c diff --git a/reactos/base/system/smss/initrun.c b/base/system/smss/initrun.c similarity index 100% rename from reactos/base/system/smss/initrun.c rename to base/system/smss/initrun.c diff --git a/reactos/base/system/smss/initss.c b/base/system/smss/initss.c similarity index 100% rename from reactos/base/system/smss/initss.c rename to base/system/smss/initss.c diff --git a/reactos/base/system/smss/initwkdll.c b/base/system/smss/initwkdll.c similarity index 100% rename from reactos/base/system/smss/initwkdll.c rename to base/system/smss/initwkdll.c diff --git a/reactos/base/system/smss/print.c b/base/system/smss/print.c similarity index 100% rename from reactos/base/system/smss/print.c rename to base/system/smss/print.c diff --git a/reactos/base/system/smss/smapi.c b/base/system/smss/smapi.c similarity index 100% rename from reactos/base/system/smss/smapi.c rename to base/system/smss/smapi.c diff --git a/reactos/base/system/smss/smapicomp.c b/base/system/smss/smapicomp.c similarity index 100% rename from reactos/base/system/smss/smapicomp.c rename to base/system/smss/smapicomp.c diff --git a/reactos/base/system/smss/smapiexec.c b/base/system/smss/smapiexec.c similarity index 100% rename from reactos/base/system/smss/smapiexec.c rename to base/system/smss/smapiexec.c diff --git a/reactos/base/system/smss/smapiquery.c b/base/system/smss/smapiquery.c similarity index 100% rename from reactos/base/system/smss/smapiquery.c rename to base/system/smss/smapiquery.c diff --git a/reactos/base/system/smss/smss.c b/base/system/smss/smss.c similarity index 100% rename from reactos/base/system/smss/smss.c rename to base/system/smss/smss.c diff --git a/reactos/base/system/smss/smss.h b/base/system/smss/smss.h similarity index 100% rename from reactos/base/system/smss/smss.h rename to base/system/smss/smss.h diff --git a/reactos/base/system/smss/smss.rbuild b/base/system/smss/smss.rbuild similarity index 100% rename from reactos/base/system/smss/smss.rbuild rename to base/system/smss/smss.rbuild diff --git a/reactos/base/system/smss/smss.rc b/base/system/smss/smss.rc similarity index 100% rename from reactos/base/system/smss/smss.rc rename to base/system/smss/smss.rc diff --git a/reactos/base/system/subst/CMakeLists.txt b/base/system/subst/CMakeLists.txt similarity index 100% rename from reactos/base/system/subst/CMakeLists.txt rename to base/system/subst/CMakeLists.txt diff --git a/reactos/base/system/subst/lang/en-US.rc b/base/system/subst/lang/en-US.rc similarity index 100% rename from reactos/base/system/subst/lang/en-US.rc rename to base/system/subst/lang/en-US.rc diff --git a/reactos/base/system/subst/lang/es-ES.rc b/base/system/subst/lang/es-ES.rc similarity index 100% rename from reactos/base/system/subst/lang/es-ES.rc rename to base/system/subst/lang/es-ES.rc diff --git a/reactos/base/system/subst/lang/fr-FR.rc b/base/system/subst/lang/fr-FR.rc similarity index 100% rename from reactos/base/system/subst/lang/fr-FR.rc rename to base/system/subst/lang/fr-FR.rc diff --git a/reactos/base/system/subst/lang/it-IT.rc b/base/system/subst/lang/it-IT.rc similarity index 100% rename from reactos/base/system/subst/lang/it-IT.rc rename to base/system/subst/lang/it-IT.rc diff --git a/reactos/base/system/subst/lang/pl-PL.rc b/base/system/subst/lang/pl-PL.rc similarity index 100% rename from reactos/base/system/subst/lang/pl-PL.rc rename to base/system/subst/lang/pl-PL.rc diff --git a/reactos/base/system/subst/lang/ro-RO.rc b/base/system/subst/lang/ro-RO.rc similarity index 100% rename from reactos/base/system/subst/lang/ro-RO.rc rename to base/system/subst/lang/ro-RO.rc diff --git a/reactos/base/system/subst/lang/uk-UA.rc b/base/system/subst/lang/uk-UA.rc similarity index 100% rename from reactos/base/system/subst/lang/uk-UA.rc rename to base/system/subst/lang/uk-UA.rc diff --git a/reactos/base/system/subst/lang/zh-CN.rc b/base/system/subst/lang/zh-CN.rc similarity index 100% rename from reactos/base/system/subst/lang/zh-CN.rc rename to base/system/subst/lang/zh-CN.rc diff --git a/reactos/base/system/subst/resource.h b/base/system/subst/resource.h similarity index 100% rename from reactos/base/system/subst/resource.h rename to base/system/subst/resource.h diff --git a/reactos/base/system/subst/rsrc.rc b/base/system/subst/rsrc.rc similarity index 100% rename from reactos/base/system/subst/rsrc.rc rename to base/system/subst/rsrc.rc diff --git a/reactos/base/system/subst/subst.c b/base/system/subst/subst.c similarity index 100% rename from reactos/base/system/subst/subst.c rename to base/system/subst/subst.c diff --git a/reactos/base/system/subst/subst.rbuild b/base/system/subst/subst.rbuild similarity index 100% rename from reactos/base/system/subst/subst.rbuild rename to base/system/subst/subst.rbuild diff --git a/reactos/base/system/subst/subst.rc b/base/system/subst/subst.rc similarity index 100% rename from reactos/base/system/subst/subst.rc rename to base/system/subst/subst.rc diff --git a/reactos/base/system/system.rbuild b/base/system/system.rbuild similarity index 100% rename from reactos/base/system/system.rbuild rename to base/system/system.rbuild diff --git a/reactos/base/system/userinit/CMakeLists.txt b/base/system/userinit/CMakeLists.txt similarity index 100% rename from reactos/base/system/userinit/CMakeLists.txt rename to base/system/userinit/CMakeLists.txt diff --git a/reactos/base/system/userinit/lang/bg-BG.rc b/base/system/userinit/lang/bg-BG.rc similarity index 100% rename from reactos/base/system/userinit/lang/bg-BG.rc rename to base/system/userinit/lang/bg-BG.rc diff --git a/reactos/base/system/userinit/lang/cs-CZ.rc b/base/system/userinit/lang/cs-CZ.rc similarity index 100% rename from reactos/base/system/userinit/lang/cs-CZ.rc rename to base/system/userinit/lang/cs-CZ.rc diff --git a/reactos/base/system/userinit/lang/de-DE.rc b/base/system/userinit/lang/de-DE.rc similarity index 100% rename from reactos/base/system/userinit/lang/de-DE.rc rename to base/system/userinit/lang/de-DE.rc diff --git a/reactos/base/system/userinit/lang/el-GR.rc b/base/system/userinit/lang/el-GR.rc similarity index 100% rename from reactos/base/system/userinit/lang/el-GR.rc rename to base/system/userinit/lang/el-GR.rc diff --git a/reactos/base/system/userinit/lang/en-US.rc b/base/system/userinit/lang/en-US.rc similarity index 100% rename from reactos/base/system/userinit/lang/en-US.rc rename to base/system/userinit/lang/en-US.rc diff --git a/reactos/base/system/userinit/lang/es-ES.rc b/base/system/userinit/lang/es-ES.rc similarity index 100% rename from reactos/base/system/userinit/lang/es-ES.rc rename to base/system/userinit/lang/es-ES.rc diff --git a/reactos/base/system/userinit/lang/fr-FR.rc b/base/system/userinit/lang/fr-FR.rc similarity index 100% rename from reactos/base/system/userinit/lang/fr-FR.rc rename to base/system/userinit/lang/fr-FR.rc diff --git a/reactos/base/system/userinit/lang/hu-HU.rc b/base/system/userinit/lang/hu-HU.rc similarity index 100% rename from reactos/base/system/userinit/lang/hu-HU.rc rename to base/system/userinit/lang/hu-HU.rc diff --git a/reactos/base/system/userinit/lang/id-ID.rc b/base/system/userinit/lang/id-ID.rc similarity index 100% rename from reactos/base/system/userinit/lang/id-ID.rc rename to base/system/userinit/lang/id-ID.rc diff --git a/reactos/base/system/userinit/lang/it-IT.rc b/base/system/userinit/lang/it-IT.rc similarity index 100% rename from reactos/base/system/userinit/lang/it-IT.rc rename to base/system/userinit/lang/it-IT.rc diff --git a/reactos/base/system/userinit/lang/ja-JP.rc b/base/system/userinit/lang/ja-JP.rc similarity index 100% rename from reactos/base/system/userinit/lang/ja-JP.rc rename to base/system/userinit/lang/ja-JP.rc diff --git a/reactos/base/system/userinit/lang/lt-LT.rc b/base/system/userinit/lang/lt-LT.rc similarity index 100% rename from reactos/base/system/userinit/lang/lt-LT.rc rename to base/system/userinit/lang/lt-LT.rc diff --git a/reactos/base/system/userinit/lang/nl-NL.rc b/base/system/userinit/lang/nl-NL.rc similarity index 100% rename from reactos/base/system/userinit/lang/nl-NL.rc rename to base/system/userinit/lang/nl-NL.rc diff --git a/reactos/base/system/userinit/lang/no-NO.rc b/base/system/userinit/lang/no-NO.rc similarity index 100% rename from reactos/base/system/userinit/lang/no-NO.rc rename to base/system/userinit/lang/no-NO.rc diff --git a/reactos/base/system/userinit/lang/pl-PL.rc b/base/system/userinit/lang/pl-PL.rc similarity index 100% rename from reactos/base/system/userinit/lang/pl-PL.rc rename to base/system/userinit/lang/pl-PL.rc diff --git a/reactos/base/system/userinit/lang/pt-BR.rc b/base/system/userinit/lang/pt-BR.rc similarity index 100% rename from reactos/base/system/userinit/lang/pt-BR.rc rename to base/system/userinit/lang/pt-BR.rc diff --git a/reactos/base/system/userinit/lang/ro-RO.rc b/base/system/userinit/lang/ro-RO.rc similarity index 100% rename from reactos/base/system/userinit/lang/ro-RO.rc rename to base/system/userinit/lang/ro-RO.rc diff --git a/reactos/base/system/userinit/lang/ru-RU.rc b/base/system/userinit/lang/ru-RU.rc similarity index 100% rename from reactos/base/system/userinit/lang/ru-RU.rc rename to base/system/userinit/lang/ru-RU.rc diff --git a/reactos/base/system/userinit/lang/sk-SK.rc b/base/system/userinit/lang/sk-SK.rc similarity index 100% rename from reactos/base/system/userinit/lang/sk-SK.rc rename to base/system/userinit/lang/sk-SK.rc diff --git a/reactos/base/system/userinit/lang/sv-SE.rc b/base/system/userinit/lang/sv-SE.rc similarity index 100% rename from reactos/base/system/userinit/lang/sv-SE.rc rename to base/system/userinit/lang/sv-SE.rc diff --git a/reactos/base/system/userinit/lang/th-TH.rc b/base/system/userinit/lang/th-TH.rc similarity index 100% rename from reactos/base/system/userinit/lang/th-TH.rc rename to base/system/userinit/lang/th-TH.rc diff --git a/reactos/base/system/userinit/lang/uk-UA.rc b/base/system/userinit/lang/uk-UA.rc similarity index 100% rename from reactos/base/system/userinit/lang/uk-UA.rc rename to base/system/userinit/lang/uk-UA.rc diff --git a/reactos/base/system/userinit/lang/zh-CN.rc b/base/system/userinit/lang/zh-CN.rc similarity index 100% rename from reactos/base/system/userinit/lang/zh-CN.rc rename to base/system/userinit/lang/zh-CN.rc diff --git a/reactos/base/system/userinit/resource.h b/base/system/userinit/resource.h similarity index 100% rename from reactos/base/system/userinit/resource.h rename to base/system/userinit/resource.h diff --git a/reactos/base/system/userinit/rsrc.rc b/base/system/userinit/rsrc.rc similarity index 100% rename from reactos/base/system/userinit/rsrc.rc rename to base/system/userinit/rsrc.rc diff --git a/reactos/base/system/userinit/userinit.c b/base/system/userinit/userinit.c similarity index 100% rename from reactos/base/system/userinit/userinit.c rename to base/system/userinit/userinit.c diff --git a/reactos/base/system/userinit/userinit.rbuild b/base/system/userinit/userinit.rbuild similarity index 100% rename from reactos/base/system/userinit/userinit.rbuild rename to base/system/userinit/userinit.rbuild diff --git a/reactos/base/system/userinit/userinit.rc b/base/system/userinit/userinit.rc similarity index 100% rename from reactos/base/system/userinit/userinit.rc rename to base/system/userinit/userinit.rc diff --git a/reactos/base/system/winlogon/CMakeLists.txt b/base/system/winlogon/CMakeLists.txt similarity index 100% rename from reactos/base/system/winlogon/CMakeLists.txt rename to base/system/winlogon/CMakeLists.txt diff --git a/reactos/base/system/winlogon/environment.c b/base/system/winlogon/environment.c similarity index 100% rename from reactos/base/system/winlogon/environment.c rename to base/system/winlogon/environment.c diff --git a/reactos/base/system/winlogon/lang/bg-BG.rc b/base/system/winlogon/lang/bg-BG.rc similarity index 100% rename from reactos/base/system/winlogon/lang/bg-BG.rc rename to base/system/winlogon/lang/bg-BG.rc diff --git a/reactos/base/system/winlogon/lang/cs-CZ.rc b/base/system/winlogon/lang/cs-CZ.rc similarity index 100% rename from reactos/base/system/winlogon/lang/cs-CZ.rc rename to base/system/winlogon/lang/cs-CZ.rc diff --git a/reactos/base/system/winlogon/lang/de-DE.rc b/base/system/winlogon/lang/de-DE.rc similarity index 100% rename from reactos/base/system/winlogon/lang/de-DE.rc rename to base/system/winlogon/lang/de-DE.rc diff --git a/reactos/base/system/winlogon/lang/el-GR.rc b/base/system/winlogon/lang/el-GR.rc similarity index 100% rename from reactos/base/system/winlogon/lang/el-GR.rc rename to base/system/winlogon/lang/el-GR.rc diff --git a/reactos/base/system/winlogon/lang/en-US.rc b/base/system/winlogon/lang/en-US.rc similarity index 100% rename from reactos/base/system/winlogon/lang/en-US.rc rename to base/system/winlogon/lang/en-US.rc diff --git a/reactos/base/system/winlogon/lang/es-ES.rc b/base/system/winlogon/lang/es-ES.rc similarity index 100% rename from reactos/base/system/winlogon/lang/es-ES.rc rename to base/system/winlogon/lang/es-ES.rc diff --git a/reactos/base/system/winlogon/lang/fr-FR.rc b/base/system/winlogon/lang/fr-FR.rc similarity index 100% rename from reactos/base/system/winlogon/lang/fr-FR.rc rename to base/system/winlogon/lang/fr-FR.rc diff --git a/reactos/base/system/winlogon/lang/hu-HU.rc b/base/system/winlogon/lang/hu-HU.rc similarity index 100% rename from reactos/base/system/winlogon/lang/hu-HU.rc rename to base/system/winlogon/lang/hu-HU.rc diff --git a/reactos/base/system/winlogon/lang/id-ID.rc b/base/system/winlogon/lang/id-ID.rc similarity index 100% rename from reactos/base/system/winlogon/lang/id-ID.rc rename to base/system/winlogon/lang/id-ID.rc diff --git a/reactos/base/system/winlogon/lang/it-IT.rc b/base/system/winlogon/lang/it-IT.rc similarity index 100% rename from reactos/base/system/winlogon/lang/it-IT.rc rename to base/system/winlogon/lang/it-IT.rc diff --git a/reactos/base/system/winlogon/lang/ja-JP.rc b/base/system/winlogon/lang/ja-JP.rc similarity index 100% rename from reactos/base/system/winlogon/lang/ja-JP.rc rename to base/system/winlogon/lang/ja-JP.rc diff --git a/reactos/base/system/winlogon/lang/lt-LT.rc b/base/system/winlogon/lang/lt-LT.rc similarity index 100% rename from reactos/base/system/winlogon/lang/lt-LT.rc rename to base/system/winlogon/lang/lt-LT.rc diff --git a/reactos/base/system/winlogon/lang/nl-NL.rc b/base/system/winlogon/lang/nl-NL.rc similarity index 100% rename from reactos/base/system/winlogon/lang/nl-NL.rc rename to base/system/winlogon/lang/nl-NL.rc diff --git a/reactos/base/system/winlogon/lang/no-NO.rc b/base/system/winlogon/lang/no-NO.rc similarity index 100% rename from reactos/base/system/winlogon/lang/no-NO.rc rename to base/system/winlogon/lang/no-NO.rc diff --git a/reactos/base/system/winlogon/lang/pl-PL.rc b/base/system/winlogon/lang/pl-PL.rc similarity index 100% rename from reactos/base/system/winlogon/lang/pl-PL.rc rename to base/system/winlogon/lang/pl-PL.rc diff --git a/reactos/base/system/winlogon/lang/ro-RO.rc b/base/system/winlogon/lang/ro-RO.rc similarity index 100% rename from reactos/base/system/winlogon/lang/ro-RO.rc rename to base/system/winlogon/lang/ro-RO.rc diff --git a/reactos/base/system/winlogon/lang/ru-RU.rc b/base/system/winlogon/lang/ru-RU.rc similarity index 100% rename from reactos/base/system/winlogon/lang/ru-RU.rc rename to base/system/winlogon/lang/ru-RU.rc diff --git a/reactos/base/system/winlogon/lang/sk-SK.rc b/base/system/winlogon/lang/sk-SK.rc similarity index 100% rename from reactos/base/system/winlogon/lang/sk-SK.rc rename to base/system/winlogon/lang/sk-SK.rc diff --git a/reactos/base/system/winlogon/lang/sv-SE.rc b/base/system/winlogon/lang/sv-SE.rc similarity index 100% rename from reactos/base/system/winlogon/lang/sv-SE.rc rename to base/system/winlogon/lang/sv-SE.rc diff --git a/reactos/base/system/winlogon/lang/uk-UA.rc b/base/system/winlogon/lang/uk-UA.rc similarity index 100% rename from reactos/base/system/winlogon/lang/uk-UA.rc rename to base/system/winlogon/lang/uk-UA.rc diff --git a/reactos/base/system/winlogon/lang/zh-CN.rc b/base/system/winlogon/lang/zh-CN.rc similarity index 100% rename from reactos/base/system/winlogon/lang/zh-CN.rc rename to base/system/winlogon/lang/zh-CN.rc diff --git a/reactos/base/system/winlogon/resource.h b/base/system/winlogon/resource.h similarity index 100% rename from reactos/base/system/winlogon/resource.h rename to base/system/winlogon/resource.h diff --git a/reactos/base/system/winlogon/rsrc.rc b/base/system/winlogon/rsrc.rc similarity index 100% rename from reactos/base/system/winlogon/rsrc.rc rename to base/system/winlogon/rsrc.rc diff --git a/reactos/base/system/winlogon/sas.c b/base/system/winlogon/sas.c similarity index 100% rename from reactos/base/system/winlogon/sas.c rename to base/system/winlogon/sas.c diff --git a/reactos/base/system/winlogon/screensaver.c b/base/system/winlogon/screensaver.c similarity index 100% rename from reactos/base/system/winlogon/screensaver.c rename to base/system/winlogon/screensaver.c diff --git a/reactos/base/system/winlogon/setup.c b/base/system/winlogon/setup.c similarity index 100% rename from reactos/base/system/winlogon/setup.c rename to base/system/winlogon/setup.c diff --git a/reactos/base/system/winlogon/setup.h b/base/system/winlogon/setup.h similarity index 100% rename from reactos/base/system/winlogon/setup.h rename to base/system/winlogon/setup.h diff --git a/reactos/base/system/winlogon/winlogon.c b/base/system/winlogon/winlogon.c similarity index 100% rename from reactos/base/system/winlogon/winlogon.c rename to base/system/winlogon/winlogon.c diff --git a/reactos/base/system/winlogon/winlogon.h b/base/system/winlogon/winlogon.h similarity index 100% rename from reactos/base/system/winlogon/winlogon.h rename to base/system/winlogon/winlogon.h diff --git a/reactos/base/system/winlogon/winlogon.rbuild b/base/system/winlogon/winlogon.rbuild similarity index 100% rename from reactos/base/system/winlogon/winlogon.rbuild rename to base/system/winlogon/winlogon.rbuild diff --git a/reactos/base/system/winlogon/winlogon.rc b/base/system/winlogon/winlogon.rc similarity index 100% rename from reactos/base/system/winlogon/winlogon.rc rename to base/system/winlogon/winlogon.rc diff --git a/reactos/base/system/winlogon/wlx.c b/base/system/winlogon/wlx.c similarity index 100% rename from reactos/base/system/winlogon/wlx.c rename to base/system/winlogon/wlx.c diff --git a/reactos/baseaddress.rbuild b/baseaddress.rbuild similarity index 100% rename from reactos/baseaddress.rbuild rename to baseaddress.rbuild diff --git a/reactos/boot/CMakeLists.txt b/boot/CMakeLists.txt similarity index 100% rename from reactos/boot/CMakeLists.txt rename to boot/CMakeLists.txt diff --git a/reactos/boot/armllb/armllb.rbuild b/boot/armllb/armllb.rbuild similarity index 100% rename from reactos/boot/armllb/armllb.rbuild rename to boot/armllb/armllb.rbuild diff --git a/reactos/boot/armllb/boot.s b/boot/armllb/boot.s similarity index 100% rename from reactos/boot/armllb/boot.s rename to boot/armllb/boot.s diff --git a/reactos/boot/armllb/crtsupp.c b/boot/armllb/crtsupp.c similarity index 100% rename from reactos/boot/armllb/crtsupp.c rename to boot/armllb/crtsupp.c diff --git a/reactos/boot/armllb/envir.c b/boot/armllb/envir.c similarity index 100% rename from reactos/boot/armllb/envir.c rename to boot/armllb/envir.c diff --git a/reactos/boot/armllb/fw.c b/boot/armllb/fw.c similarity index 100% rename from reactos/boot/armllb/fw.c rename to boot/armllb/fw.c diff --git a/reactos/boot/armllb/hw/keyboard.c b/boot/armllb/hw/keyboard.c similarity index 100% rename from reactos/boot/armllb/hw/keyboard.c rename to boot/armllb/hw/keyboard.c diff --git a/reactos/boot/armllb/hw/matrix.c b/boot/armllb/hw/matrix.c similarity index 100% rename from reactos/boot/armllb/hw/matrix.c rename to boot/armllb/hw/matrix.c diff --git a/reactos/boot/armllb/hw/omap3-beagle/hwinfo.c b/boot/armllb/hw/omap3-beagle/hwinfo.c similarity index 100% rename from reactos/boot/armllb/hw/omap3-beagle/hwinfo.c rename to boot/armllb/hw/omap3-beagle/hwinfo.c diff --git a/reactos/boot/armllb/hw/omap3-beagle/hwinit.c b/boot/armllb/hw/omap3-beagle/hwinit.c similarity index 100% rename from reactos/boot/armllb/hw/omap3-beagle/hwinit.c rename to boot/armllb/hw/omap3-beagle/hwinit.c diff --git a/reactos/boot/armllb/hw/omap3-beagle/hwuart.c b/boot/armllb/hw/omap3-beagle/hwuart.c similarity index 100% rename from reactos/boot/armllb/hw/omap3-beagle/hwuart.c rename to boot/armllb/hw/omap3-beagle/hwuart.c diff --git a/reactos/boot/armllb/hw/omap3-zoom2/hwinfo.c b/boot/armllb/hw/omap3-zoom2/hwinfo.c similarity index 100% rename from reactos/boot/armllb/hw/omap3-zoom2/hwinfo.c rename to boot/armllb/hw/omap3-zoom2/hwinfo.c diff --git a/reactos/boot/armllb/hw/omap3-zoom2/hwinit.c b/boot/armllb/hw/omap3-zoom2/hwinit.c similarity index 100% rename from reactos/boot/armllb/hw/omap3-zoom2/hwinit.c rename to boot/armllb/hw/omap3-zoom2/hwinit.c diff --git a/reactos/boot/armllb/hw/omap3-zoom2/hwlcd.c b/boot/armllb/hw/omap3-zoom2/hwlcd.c similarity index 100% rename from reactos/boot/armllb/hw/omap3-zoom2/hwlcd.c rename to boot/armllb/hw/omap3-zoom2/hwlcd.c diff --git a/reactos/boot/armllb/hw/omap3-zoom2/hwsynkp.c b/boot/armllb/hw/omap3-zoom2/hwsynkp.c similarity index 100% rename from reactos/boot/armllb/hw/omap3-zoom2/hwsynkp.c rename to boot/armllb/hw/omap3-zoom2/hwsynkp.c diff --git a/reactos/boot/armllb/hw/omap3-zoom2/hwtwl40x.c b/boot/armllb/hw/omap3-zoom2/hwtwl40x.c similarity index 100% rename from reactos/boot/armllb/hw/omap3-zoom2/hwtwl40x.c rename to boot/armllb/hw/omap3-zoom2/hwtwl40x.c diff --git a/reactos/boot/armllb/hw/omap3-zoom2/hwuart.c b/boot/armllb/hw/omap3-zoom2/hwuart.c similarity index 100% rename from reactos/boot/armllb/hw/omap3-zoom2/hwuart.c rename to boot/armllb/hw/omap3-zoom2/hwuart.c diff --git a/reactos/boot/armllb/hw/serial.c b/boot/armllb/hw/serial.c similarity index 100% rename from reactos/boot/armllb/hw/serial.c rename to boot/armllb/hw/serial.c diff --git a/reactos/boot/armllb/hw/time.c b/boot/armllb/hw/time.c similarity index 100% rename from reactos/boot/armllb/hw/time.c rename to boot/armllb/hw/time.c diff --git a/reactos/boot/armllb/hw/versatile/hwclcd.c b/boot/armllb/hw/versatile/hwclcd.c similarity index 100% rename from reactos/boot/armllb/hw/versatile/hwclcd.c rename to boot/armllb/hw/versatile/hwclcd.c diff --git a/reactos/boot/armllb/hw/versatile/hwinfo.c b/boot/armllb/hw/versatile/hwinfo.c similarity index 100% rename from reactos/boot/armllb/hw/versatile/hwinfo.c rename to boot/armllb/hw/versatile/hwinfo.c diff --git a/reactos/boot/armllb/hw/versatile/hwinit.c b/boot/armllb/hw/versatile/hwinit.c similarity index 100% rename from reactos/boot/armllb/hw/versatile/hwinit.c rename to boot/armllb/hw/versatile/hwinit.c diff --git a/reactos/boot/armllb/hw/versatile/hwkmi.c b/boot/armllb/hw/versatile/hwkmi.c similarity index 100% rename from reactos/boot/armllb/hw/versatile/hwkmi.c rename to boot/armllb/hw/versatile/hwkmi.c diff --git a/reactos/boot/armllb/hw/versatile/hwuart.c b/boot/armllb/hw/versatile/hwuart.c similarity index 100% rename from reactos/boot/armllb/hw/versatile/hwuart.c rename to boot/armllb/hw/versatile/hwuart.c diff --git a/reactos/boot/armllb/hw/video.c b/boot/armllb/hw/video.c similarity index 100% rename from reactos/boot/armllb/hw/video.c rename to boot/armllb/hw/video.c diff --git a/reactos/boot/armllb/inc/envir.h b/boot/armllb/inc/envir.h similarity index 100% rename from reactos/boot/armllb/inc/envir.h rename to boot/armllb/inc/envir.h diff --git a/reactos/boot/armllb/inc/fw.h b/boot/armllb/inc/fw.h similarity index 100% rename from reactos/boot/armllb/inc/fw.h rename to boot/armllb/inc/fw.h diff --git a/reactos/boot/armllb/inc/hw.h b/boot/armllb/inc/hw.h similarity index 100% rename from reactos/boot/armllb/inc/hw.h rename to boot/armllb/inc/hw.h diff --git a/reactos/boot/armllb/inc/keyboard.h b/boot/armllb/inc/keyboard.h similarity index 100% rename from reactos/boot/armllb/inc/keyboard.h rename to boot/armllb/inc/keyboard.h diff --git a/reactos/boot/armllb/inc/machtype.h b/boot/armllb/inc/machtype.h similarity index 100% rename from reactos/boot/armllb/inc/machtype.h rename to boot/armllb/inc/machtype.h diff --git a/reactos/boot/armllb/inc/omap3.h b/boot/armllb/inc/omap3.h similarity index 100% rename from reactos/boot/armllb/inc/omap3.h rename to boot/armllb/inc/omap3.h diff --git a/reactos/boot/armllb/inc/osloader.h b/boot/armllb/inc/osloader.h similarity index 100% rename from reactos/boot/armllb/inc/osloader.h rename to boot/armllb/inc/osloader.h diff --git a/reactos/boot/armllb/inc/precomp.h b/boot/armllb/inc/precomp.h similarity index 100% rename from reactos/boot/armllb/inc/precomp.h rename to boot/armllb/inc/precomp.h diff --git a/reactos/boot/armllb/inc/serial.h b/boot/armllb/inc/serial.h similarity index 100% rename from reactos/boot/armllb/inc/serial.h rename to boot/armllb/inc/serial.h diff --git a/reactos/boot/armllb/inc/versa.h b/boot/armllb/inc/versa.h similarity index 100% rename from reactos/boot/armllb/inc/versa.h rename to boot/armllb/inc/versa.h diff --git a/reactos/boot/armllb/inc/video.h b/boot/armllb/inc/video.h similarity index 100% rename from reactos/boot/armllb/inc/video.h rename to boot/armllb/inc/video.h diff --git a/reactos/boot/armllb/main.c b/boot/armllb/main.c similarity index 100% rename from reactos/boot/armllb/main.c rename to boot/armllb/main.c diff --git a/reactos/boot/armllb/os/loader.c b/boot/armllb/os/loader.c similarity index 100% rename from reactos/boot/armllb/os/loader.c rename to boot/armllb/os/loader.c diff --git a/reactos/boot/boot.rbuild b/boot/boot.rbuild similarity index 100% rename from reactos/boot/boot.rbuild rename to boot/boot.rbuild diff --git a/reactos/boot/bootdata/CMakeLists.txt b/boot/bootdata/CMakeLists.txt similarity index 100% rename from reactos/boot/bootdata/CMakeLists.txt rename to boot/bootdata/CMakeLists.txt diff --git a/reactos/boot/bootdata/autorun.inf b/boot/bootdata/autorun.inf similarity index 100% rename from reactos/boot/bootdata/autorun.inf rename to boot/bootdata/autorun.inf diff --git a/reactos/boot/bootdata/bootcd.ini b/boot/bootdata/bootcd.ini similarity index 100% rename from reactos/boot/bootdata/bootcd.ini rename to boot/bootdata/bootcd.ini diff --git a/reactos/boot/bootdata/bootcd/bootcd.rbuild b/boot/bootdata/bootcd/bootcd.rbuild similarity index 100% rename from reactos/boot/bootdata/bootcd/bootcd.rbuild rename to boot/bootdata/bootcd/bootcd.rbuild diff --git a/reactos/boot/bootdata/bootcd/unattend.inf b/boot/bootdata/bootcd/unattend.inf similarity index 100% rename from reactos/boot/bootdata/bootcd/unattend.inf rename to boot/bootdata/bootcd/unattend.inf diff --git a/reactos/boot/bootdata/bootcdregtest/bootcdregtest.rbuild b/boot/bootdata/bootcdregtest/bootcdregtest.rbuild similarity index 100% rename from reactos/boot/bootdata/bootcdregtest/bootcdregtest.rbuild rename to boot/bootdata/bootcdregtest/bootcdregtest.rbuild diff --git a/reactos/boot/bootdata/bootcdregtest/regtest.cmd b/boot/bootdata/bootcdregtest/regtest.cmd similarity index 100% rename from reactos/boot/bootdata/bootcdregtest/regtest.cmd rename to boot/bootdata/bootcdregtest/regtest.cmd diff --git a/reactos/boot/bootdata/bootcdregtest/testboot.bat.sample b/boot/bootdata/bootcdregtest/testboot.bat.sample similarity index 100% rename from reactos/boot/bootdata/bootcdregtest/testboot.bat.sample rename to boot/bootdata/bootcdregtest/testboot.bat.sample diff --git a/reactos/boot/bootdata/bootcdregtest/unattend.inf b/boot/bootdata/bootcdregtest/unattend.inf similarity index 100% rename from reactos/boot/bootdata/bootcdregtest/unattend.inf rename to boot/bootdata/bootcdregtest/unattend.inf diff --git a/reactos/boot/bootdata/bootdata.rbuild b/boot/bootdata/bootdata.rbuild similarity index 100% rename from reactos/boot/bootdata/bootdata.rbuild rename to boot/bootdata/bootdata.rbuild diff --git a/reactos/boot/bootdata/hivecls_amd64.inf b/boot/bootdata/hivecls_amd64.inf similarity index 100% rename from reactos/boot/bootdata/hivecls_amd64.inf rename to boot/bootdata/hivecls_amd64.inf diff --git a/reactos/boot/bootdata/hivecls_arm.inf b/boot/bootdata/hivecls_arm.inf similarity index 100% rename from reactos/boot/bootdata/hivecls_arm.inf rename to boot/bootdata/hivecls_arm.inf diff --git a/reactos/boot/bootdata/hivecls_i386.inf b/boot/bootdata/hivecls_i386.inf similarity index 100% rename from reactos/boot/bootdata/hivecls_i386.inf rename to boot/bootdata/hivecls_i386.inf diff --git a/reactos/boot/bootdata/hivedef_amd64.inf b/boot/bootdata/hivedef_amd64.inf similarity index 100% rename from reactos/boot/bootdata/hivedef_amd64.inf rename to boot/bootdata/hivedef_amd64.inf diff --git a/reactos/boot/bootdata/hivedef_arm.inf b/boot/bootdata/hivedef_arm.inf similarity index 100% rename from reactos/boot/bootdata/hivedef_arm.inf rename to boot/bootdata/hivedef_arm.inf diff --git a/reactos/boot/bootdata/hivedef_i386.inf b/boot/bootdata/hivedef_i386.inf similarity index 100% rename from reactos/boot/bootdata/hivedef_i386.inf rename to boot/bootdata/hivedef_i386.inf diff --git a/reactos/boot/bootdata/hiveinst_arm.inf b/boot/bootdata/hiveinst_arm.inf similarity index 100% rename from reactos/boot/bootdata/hiveinst_arm.inf rename to boot/bootdata/hiveinst_arm.inf diff --git a/reactos/boot/bootdata/hiveinst_i386.inf b/boot/bootdata/hiveinst_i386.inf similarity index 100% rename from reactos/boot/bootdata/hiveinst_i386.inf rename to boot/bootdata/hiveinst_i386.inf diff --git a/reactos/boot/bootdata/hivesft_amd64.inf b/boot/bootdata/hivesft_amd64.inf similarity index 100% rename from reactos/boot/bootdata/hivesft_amd64.inf rename to boot/bootdata/hivesft_amd64.inf diff --git a/reactos/boot/bootdata/hivesft_arm.inf b/boot/bootdata/hivesft_arm.inf similarity index 100% rename from reactos/boot/bootdata/hivesft_arm.inf rename to boot/bootdata/hivesft_arm.inf diff --git a/reactos/boot/bootdata/hivesft_i386.inf b/boot/bootdata/hivesft_i386.inf similarity index 100% rename from reactos/boot/bootdata/hivesft_i386.inf rename to boot/bootdata/hivesft_i386.inf diff --git a/reactos/boot/bootdata/hivesys_amd64.inf b/boot/bootdata/hivesys_amd64.inf similarity index 100% rename from reactos/boot/bootdata/hivesys_amd64.inf rename to boot/bootdata/hivesys_amd64.inf diff --git a/reactos/boot/bootdata/hivesys_arm.inf b/boot/bootdata/hivesys_arm.inf similarity index 100% rename from reactos/boot/bootdata/hivesys_arm.inf rename to boot/bootdata/hivesys_arm.inf diff --git a/reactos/boot/bootdata/hivesys_i386.inf b/boot/bootdata/hivesys_i386.inf similarity index 100% rename from reactos/boot/bootdata/hivesys_i386.inf rename to boot/bootdata/hivesys_i386.inf diff --git a/reactos/boot/bootdata/icon.ico b/boot/bootdata/icon.ico similarity index 100% rename from reactos/boot/bootdata/icon.ico rename to boot/bootdata/icon.ico diff --git a/reactos/boot/bootdata/livecd.inf b/boot/bootdata/livecd.inf similarity index 100% rename from reactos/boot/bootdata/livecd.inf rename to boot/bootdata/livecd.inf diff --git a/reactos/boot/bootdata/livecd.ini b/boot/bootdata/livecd.ini similarity index 100% rename from reactos/boot/bootdata/livecd.ini rename to boot/bootdata/livecd.ini diff --git a/reactos/boot/bootdata/livecd/livecd.rbuild b/boot/bootdata/livecd/livecd.rbuild similarity index 100% rename from reactos/boot/bootdata/livecd/livecd.rbuild rename to boot/bootdata/livecd/livecd.rbuild diff --git a/reactos/boot/bootdata/livecd_start.cmd b/boot/bootdata/livecd_start.cmd similarity index 100% rename from reactos/boot/bootdata/livecd_start.cmd rename to boot/bootdata/livecd_start.cmd diff --git a/reactos/boot/bootdata/livecdregtest/livecdregtest.rbuild b/boot/bootdata/livecdregtest/livecdregtest.rbuild similarity index 100% rename from reactos/boot/bootdata/livecdregtest/livecdregtest.rbuild rename to boot/bootdata/livecdregtest/livecdregtest.rbuild diff --git a/reactos/boot/bootdata/packages/CMakeLists.txt b/boot/bootdata/packages/CMakeLists.txt similarity index 100% rename from reactos/boot/bootdata/packages/CMakeLists.txt rename to boot/bootdata/packages/CMakeLists.txt diff --git a/reactos/boot/bootdata/packages/reactos.dff b/boot/bootdata/packages/reactos.dff similarity index 100% rename from reactos/boot/bootdata/packages/reactos.dff rename to boot/bootdata/packages/reactos.dff diff --git a/reactos/boot/bootdata/packages/reactos.dff.in b/boot/bootdata/packages/reactos.dff.in similarity index 100% rename from reactos/boot/bootdata/packages/reactos.dff.in rename to boot/bootdata/packages/reactos.dff.in diff --git a/reactos/boot/bootdata/readme.txt b/boot/bootdata/readme.txt similarity index 100% rename from reactos/boot/bootdata/readme.txt rename to boot/bootdata/readme.txt diff --git a/reactos/boot/bootdata/system.ini b/boot/bootdata/system.ini similarity index 100% rename from reactos/boot/bootdata/system.ini rename to boot/bootdata/system.ini diff --git a/reactos/boot/bootdata/txtsetup.sif b/boot/bootdata/txtsetup.sif similarity index 100% rename from reactos/boot/bootdata/txtsetup.sif rename to boot/bootdata/txtsetup.sif diff --git a/reactos/boot/bootdata/unattend.inf b/boot/bootdata/unattend.inf similarity index 100% rename from reactos/boot/bootdata/unattend.inf rename to boot/bootdata/unattend.inf diff --git a/reactos/boot/freeldr/CMakeLists.txt b/boot/freeldr/CMakeLists.txt similarity index 100% rename from reactos/boot/freeldr/CMakeLists.txt rename to boot/freeldr/CMakeLists.txt diff --git a/reactos/boot/freeldr/FREELDR.INI b/boot/freeldr/FREELDR.INI similarity index 100% rename from reactos/boot/freeldr/FREELDR.INI rename to boot/freeldr/FREELDR.INI diff --git a/reactos/boot/freeldr/bootsect/CMakeLists.txt b/boot/freeldr/bootsect/CMakeLists.txt similarity index 100% rename from reactos/boot/freeldr/bootsect/CMakeLists.txt rename to boot/freeldr/bootsect/CMakeLists.txt diff --git a/reactos/boot/freeldr/bootsect/bootsect.rbuild b/boot/freeldr/bootsect/bootsect.rbuild similarity index 100% rename from reactos/boot/freeldr/bootsect/bootsect.rbuild rename to boot/freeldr/bootsect/bootsect.rbuild diff --git a/reactos/boot/freeldr/bootsect/dosmbr.S b/boot/freeldr/bootsect/dosmbr.S similarity index 100% rename from reactos/boot/freeldr/bootsect/dosmbr.S rename to boot/freeldr/bootsect/dosmbr.S diff --git a/reactos/boot/freeldr/bootsect/dosmbr.asm b/boot/freeldr/bootsect/dosmbr.asm similarity index 100% rename from reactos/boot/freeldr/bootsect/dosmbr.asm rename to boot/freeldr/bootsect/dosmbr.asm diff --git a/reactos/boot/freeldr/bootsect/ext2.S b/boot/freeldr/bootsect/ext2.S similarity index 100% rename from reactos/boot/freeldr/bootsect/ext2.S rename to boot/freeldr/bootsect/ext2.S diff --git a/reactos/boot/freeldr/bootsect/ext2.asm b/boot/freeldr/bootsect/ext2.asm similarity index 100% rename from reactos/boot/freeldr/bootsect/ext2.asm rename to boot/freeldr/bootsect/ext2.asm diff --git a/reactos/boot/freeldr/bootsect/fat.S b/boot/freeldr/bootsect/fat.S similarity index 100% rename from reactos/boot/freeldr/bootsect/fat.S rename to boot/freeldr/bootsect/fat.S diff --git a/reactos/boot/freeldr/bootsect/fat.asm b/boot/freeldr/bootsect/fat.asm similarity index 100% rename from reactos/boot/freeldr/bootsect/fat.asm rename to boot/freeldr/bootsect/fat.asm diff --git a/reactos/boot/freeldr/bootsect/fat.h b/boot/freeldr/bootsect/fat.h similarity index 100% rename from reactos/boot/freeldr/bootsect/fat.h rename to boot/freeldr/bootsect/fat.h diff --git a/reactos/boot/freeldr/bootsect/fat32.S b/boot/freeldr/bootsect/fat32.S similarity index 100% rename from reactos/boot/freeldr/bootsect/fat32.S rename to boot/freeldr/bootsect/fat32.S diff --git a/reactos/boot/freeldr/bootsect/fat32.asm b/boot/freeldr/bootsect/fat32.asm similarity index 100% rename from reactos/boot/freeldr/bootsect/fat32.asm rename to boot/freeldr/bootsect/fat32.asm diff --git a/reactos/boot/freeldr/bootsect/fat32.h b/boot/freeldr/bootsect/fat32.h similarity index 100% rename from reactos/boot/freeldr/bootsect/fat32.h rename to boot/freeldr/bootsect/fat32.h diff --git a/reactos/boot/freeldr/bootsect/isoboot.S b/boot/freeldr/bootsect/isoboot.S similarity index 100% rename from reactos/boot/freeldr/bootsect/isoboot.S rename to boot/freeldr/bootsect/isoboot.S diff --git a/reactos/boot/freeldr/bootsect/isoboot.asm b/boot/freeldr/bootsect/isoboot.asm similarity index 100% rename from reactos/boot/freeldr/bootsect/isoboot.asm rename to boot/freeldr/bootsect/isoboot.asm diff --git a/reactos/boot/freeldr/bootsect/isobtrt.S b/boot/freeldr/bootsect/isobtrt.S similarity index 100% rename from reactos/boot/freeldr/bootsect/isobtrt.S rename to boot/freeldr/bootsect/isobtrt.S diff --git a/reactos/boot/freeldr/bootsect/isobtrt.asm b/boot/freeldr/bootsect/isobtrt.asm similarity index 100% rename from reactos/boot/freeldr/bootsect/isobtrt.asm rename to boot/freeldr/bootsect/isobtrt.asm diff --git a/reactos/boot/freeldr/bootsect/ofwboot.s b/boot/freeldr/bootsect/ofwboot.s similarity index 100% rename from reactos/boot/freeldr/bootsect/ofwboot.s rename to boot/freeldr/bootsect/ofwboot.s diff --git a/reactos/boot/freeldr/bootsect/win2k.asm b/boot/freeldr/bootsect/win2k.asm similarity index 100% rename from reactos/boot/freeldr/bootsect/win2k.asm rename to boot/freeldr/bootsect/win2k.asm diff --git a/reactos/boot/freeldr/bootsect/wxpfat16.asm b/boot/freeldr/bootsect/wxpfat16.asm similarity index 100% rename from reactos/boot/freeldr/bootsect/wxpfat16.asm rename to boot/freeldr/bootsect/wxpfat16.asm diff --git a/reactos/boot/freeldr/fdebug/fdebug.c b/boot/freeldr/fdebug/fdebug.c similarity index 100% rename from reactos/boot/freeldr/fdebug/fdebug.c rename to boot/freeldr/fdebug/fdebug.c diff --git a/reactos/boot/freeldr/fdebug/fdebug.ico b/boot/freeldr/fdebug/fdebug.ico similarity index 100% rename from reactos/boot/freeldr/fdebug/fdebug.ico rename to boot/freeldr/fdebug/fdebug.ico diff --git a/reactos/boot/freeldr/fdebug/fdebug.rbuild b/boot/freeldr/fdebug/fdebug.rbuild similarity index 100% rename from reactos/boot/freeldr/fdebug/fdebug.rbuild rename to boot/freeldr/fdebug/fdebug.rbuild diff --git a/reactos/boot/freeldr/fdebug/fdebug.rc b/boot/freeldr/fdebug/fdebug.rc similarity index 100% rename from reactos/boot/freeldr/fdebug/fdebug.rc rename to boot/freeldr/fdebug/fdebug.rc diff --git a/reactos/boot/freeldr/fdebug/lang/bg-BG.rc b/boot/freeldr/fdebug/lang/bg-BG.rc similarity index 100% rename from reactos/boot/freeldr/fdebug/lang/bg-BG.rc rename to boot/freeldr/fdebug/lang/bg-BG.rc diff --git a/reactos/boot/freeldr/fdebug/lang/cs-CZ.rc b/boot/freeldr/fdebug/lang/cs-CZ.rc similarity index 100% rename from reactos/boot/freeldr/fdebug/lang/cs-CZ.rc rename to boot/freeldr/fdebug/lang/cs-CZ.rc diff --git a/reactos/boot/freeldr/fdebug/lang/de-DE.rc b/boot/freeldr/fdebug/lang/de-DE.rc similarity index 100% rename from reactos/boot/freeldr/fdebug/lang/de-DE.rc rename to boot/freeldr/fdebug/lang/de-DE.rc diff --git a/reactos/boot/freeldr/fdebug/lang/el-GR.rc b/boot/freeldr/fdebug/lang/el-GR.rc similarity index 100% rename from reactos/boot/freeldr/fdebug/lang/el-GR.rc rename to boot/freeldr/fdebug/lang/el-GR.rc diff --git a/reactos/boot/freeldr/fdebug/lang/en-US.rc b/boot/freeldr/fdebug/lang/en-US.rc similarity index 100% rename from reactos/boot/freeldr/fdebug/lang/en-US.rc rename to boot/freeldr/fdebug/lang/en-US.rc diff --git a/reactos/boot/freeldr/fdebug/lang/es-ES.rc b/boot/freeldr/fdebug/lang/es-ES.rc similarity index 100% rename from reactos/boot/freeldr/fdebug/lang/es-ES.rc rename to boot/freeldr/fdebug/lang/es-ES.rc diff --git a/reactos/boot/freeldr/fdebug/lang/fr-FR.rc b/boot/freeldr/fdebug/lang/fr-FR.rc similarity index 100% rename from reactos/boot/freeldr/fdebug/lang/fr-FR.rc rename to boot/freeldr/fdebug/lang/fr-FR.rc diff --git a/reactos/boot/freeldr/fdebug/lang/hu-HU.rc b/boot/freeldr/fdebug/lang/hu-HU.rc similarity index 100% rename from reactos/boot/freeldr/fdebug/lang/hu-HU.rc rename to boot/freeldr/fdebug/lang/hu-HU.rc diff --git a/reactos/boot/freeldr/fdebug/lang/id-ID.rc b/boot/freeldr/fdebug/lang/id-ID.rc similarity index 100% rename from reactos/boot/freeldr/fdebug/lang/id-ID.rc rename to boot/freeldr/fdebug/lang/id-ID.rc diff --git a/reactos/boot/freeldr/fdebug/lang/it-IT.rc b/boot/freeldr/fdebug/lang/it-IT.rc similarity index 100% rename from reactos/boot/freeldr/fdebug/lang/it-IT.rc rename to boot/freeldr/fdebug/lang/it-IT.rc diff --git a/reactos/boot/freeldr/fdebug/lang/ja-JP.rc b/boot/freeldr/fdebug/lang/ja-JP.rc similarity index 100% rename from reactos/boot/freeldr/fdebug/lang/ja-JP.rc rename to boot/freeldr/fdebug/lang/ja-JP.rc diff --git a/reactos/boot/freeldr/fdebug/lang/no-NO.rc b/boot/freeldr/fdebug/lang/no-NO.rc similarity index 100% rename from reactos/boot/freeldr/fdebug/lang/no-NO.rc rename to boot/freeldr/fdebug/lang/no-NO.rc diff --git a/reactos/boot/freeldr/fdebug/lang/pl-PL.rc b/boot/freeldr/fdebug/lang/pl-PL.rc similarity index 100% rename from reactos/boot/freeldr/fdebug/lang/pl-PL.rc rename to boot/freeldr/fdebug/lang/pl-PL.rc diff --git a/reactos/boot/freeldr/fdebug/lang/ro-RO.rc b/boot/freeldr/fdebug/lang/ro-RO.rc similarity index 100% rename from reactos/boot/freeldr/fdebug/lang/ro-RO.rc rename to boot/freeldr/fdebug/lang/ro-RO.rc diff --git a/reactos/boot/freeldr/fdebug/lang/ru-RU.rc b/boot/freeldr/fdebug/lang/ru-RU.rc similarity index 100% rename from reactos/boot/freeldr/fdebug/lang/ru-RU.rc rename to boot/freeldr/fdebug/lang/ru-RU.rc diff --git a/reactos/boot/freeldr/fdebug/lang/sk-SK.rc b/boot/freeldr/fdebug/lang/sk-SK.rc similarity index 100% rename from reactos/boot/freeldr/fdebug/lang/sk-SK.rc rename to boot/freeldr/fdebug/lang/sk-SK.rc diff --git a/reactos/boot/freeldr/fdebug/lang/tr-TR.rc b/boot/freeldr/fdebug/lang/tr-TR.rc similarity index 100% rename from reactos/boot/freeldr/fdebug/lang/tr-TR.rc rename to boot/freeldr/fdebug/lang/tr-TR.rc diff --git a/reactos/boot/freeldr/fdebug/lang/uk-UA.rc b/boot/freeldr/fdebug/lang/uk-UA.rc similarity index 100% rename from reactos/boot/freeldr/fdebug/lang/uk-UA.rc rename to boot/freeldr/fdebug/lang/uk-UA.rc diff --git a/reactos/boot/freeldr/fdebug/resource.h b/boot/freeldr/fdebug/resource.h similarity index 100% rename from reactos/boot/freeldr/fdebug/resource.h rename to boot/freeldr/fdebug/resource.h diff --git a/reactos/boot/freeldr/fdebug/rs232.c b/boot/freeldr/fdebug/rs232.c similarity index 100% rename from reactos/boot/freeldr/fdebug/rs232.c rename to boot/freeldr/fdebug/rs232.c diff --git a/reactos/boot/freeldr/fdebug/rs232.h b/boot/freeldr/fdebug/rs232.h similarity index 100% rename from reactos/boot/freeldr/fdebug/rs232.h rename to boot/freeldr/fdebug/rs232.h diff --git a/reactos/boot/freeldr/freeldr.rbuild b/boot/freeldr/freeldr.rbuild similarity index 100% rename from reactos/boot/freeldr/freeldr.rbuild rename to boot/freeldr/freeldr.rbuild diff --git a/reactos/boot/freeldr/freeldr/CHANGELOG b/boot/freeldr/freeldr/CHANGELOG similarity index 100% rename from reactos/boot/freeldr/freeldr/CHANGELOG rename to boot/freeldr/freeldr/CHANGELOG diff --git a/reactos/boot/freeldr/freeldr/CMakeLists.txt b/boot/freeldr/freeldr/CMakeLists.txt similarity index 100% rename from reactos/boot/freeldr/freeldr/CMakeLists.txt rename to boot/freeldr/freeldr/CMakeLists.txt diff --git a/reactos/boot/freeldr/freeldr/arcemul/time.c b/boot/freeldr/freeldr/arcemul/time.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arcemul/time.c rename to boot/freeldr/freeldr/arcemul/time.c diff --git a/reactos/boot/freeldr/freeldr/arch/amd64/entry.S b/boot/freeldr/freeldr/arch/amd64/entry.S similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/amd64/entry.S rename to boot/freeldr/freeldr/arch/amd64/entry.S diff --git a/reactos/boot/freeldr/freeldr/arch/amd64/int386.S b/boot/freeldr/freeldr/arch/amd64/int386.S similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/amd64/int386.S rename to boot/freeldr/freeldr/arch/amd64/int386.S diff --git a/reactos/boot/freeldr/freeldr/arch/amd64/pnpbios.S b/boot/freeldr/freeldr/arch/amd64/pnpbios.S similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/amd64/pnpbios.S rename to boot/freeldr/freeldr/arch/amd64/pnpbios.S diff --git a/reactos/boot/freeldr/freeldr/arch/amd64/winldr.c b/boot/freeldr/freeldr/arch/amd64/winldr.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/amd64/winldr.c rename to boot/freeldr/freeldr/arch/amd64/winldr.c diff --git a/reactos/boot/freeldr/freeldr/arch/arm/boot.s b/boot/freeldr/freeldr/arch/arm/boot.s similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/arm/boot.s rename to boot/freeldr/freeldr/arch/arm/boot.s diff --git a/reactos/boot/freeldr/freeldr/arch/arm/macharm.c b/boot/freeldr/freeldr/arch/arm/macharm.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/arm/macharm.c rename to boot/freeldr/freeldr/arch/arm/macharm.c diff --git a/reactos/boot/freeldr/freeldr/arch/arm/winldr.c b/boot/freeldr/freeldr/arch/arm/winldr.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/arm/winldr.c rename to boot/freeldr/freeldr/arch/arm/winldr.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/arch.S b/boot/freeldr/freeldr/arch/i386/arch.S similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/arch.S rename to boot/freeldr/freeldr/arch/i386/arch.S diff --git a/reactos/boot/freeldr/freeldr/arch/i386/archmach.c b/boot/freeldr/freeldr/arch/i386/archmach.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/archmach.c rename to boot/freeldr/freeldr/arch/i386/archmach.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/boot.S b/boot/freeldr/freeldr/arch/i386/boot.S similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/boot.S rename to boot/freeldr/freeldr/arch/i386/boot.S diff --git a/reactos/boot/freeldr/freeldr/arch/i386/custom.c b/boot/freeldr/freeldr/arch/i386/custom.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/custom.c rename to boot/freeldr/freeldr/arch/i386/custom.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/drivemap.c b/boot/freeldr/freeldr/arch/i386/drivemap.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/drivemap.c rename to boot/freeldr/freeldr/arch/i386/drivemap.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/drvmap.S b/boot/freeldr/freeldr/arch/i386/drvmap.S similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/drvmap.S rename to boot/freeldr/freeldr/arch/i386/drvmap.S diff --git a/reactos/boot/freeldr/freeldr/arch/i386/entry.S b/boot/freeldr/freeldr/arch/i386/entry.S similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/entry.S rename to boot/freeldr/freeldr/arch/i386/entry.S diff --git a/reactos/boot/freeldr/freeldr/arch/i386/fathelp.S b/boot/freeldr/freeldr/arch/i386/fathelp.S similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/fathelp.S rename to boot/freeldr/freeldr/arch/i386/fathelp.S diff --git a/reactos/boot/freeldr/freeldr/arch/i386/fathelp.asm b/boot/freeldr/freeldr/arch/i386/fathelp.asm similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/fathelp.asm rename to boot/freeldr/freeldr/arch/i386/fathelp.asm diff --git a/reactos/boot/freeldr/freeldr/arch/i386/halstub.c b/boot/freeldr/freeldr/arch/i386/halstub.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/halstub.c rename to boot/freeldr/freeldr/arch/i386/halstub.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/hardware.c b/boot/freeldr/freeldr/arch/i386/hardware.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/hardware.c rename to boot/freeldr/freeldr/arch/i386/hardware.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/hwacpi.c b/boot/freeldr/freeldr/arch/i386/hwacpi.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/hwacpi.c rename to boot/freeldr/freeldr/arch/i386/hwacpi.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/hwapm.c b/boot/freeldr/freeldr/arch/i386/hwapm.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/hwapm.c rename to boot/freeldr/freeldr/arch/i386/hwapm.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/hwdisk.c b/boot/freeldr/freeldr/arch/i386/hwdisk.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/hwdisk.c rename to boot/freeldr/freeldr/arch/i386/hwdisk.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/hwpci.c b/boot/freeldr/freeldr/arch/i386/hwpci.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/hwpci.c rename to boot/freeldr/freeldr/arch/i386/hwpci.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/i386bug.c b/boot/freeldr/freeldr/arch/i386/i386bug.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/i386bug.c rename to boot/freeldr/freeldr/arch/i386/i386bug.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/i386cpu.S b/boot/freeldr/freeldr/arch/i386/i386cpu.S similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/i386cpu.S rename to boot/freeldr/freeldr/arch/i386/i386cpu.S diff --git a/reactos/boot/freeldr/freeldr/arch/i386/i386disk.c b/boot/freeldr/freeldr/arch/i386/i386disk.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/i386disk.c rename to boot/freeldr/freeldr/arch/i386/i386disk.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/i386idt.S b/boot/freeldr/freeldr/arch/i386/i386idt.S similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/i386idt.S rename to boot/freeldr/freeldr/arch/i386/i386idt.S diff --git a/reactos/boot/freeldr/freeldr/arch/i386/i386idt.c b/boot/freeldr/freeldr/arch/i386/i386idt.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/i386idt.c rename to boot/freeldr/freeldr/arch/i386/i386idt.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/i386pnp.S b/boot/freeldr/freeldr/arch/i386/i386pnp.S similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/i386pnp.S rename to boot/freeldr/freeldr/arch/i386/i386pnp.S diff --git a/reactos/boot/freeldr/freeldr/arch/i386/i386pnp.cmake.S b/boot/freeldr/freeldr/arch/i386/i386pnp.cmake.S similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/i386pnp.cmake.S rename to boot/freeldr/freeldr/arch/i386/i386pnp.cmake.S diff --git a/reactos/boot/freeldr/freeldr/arch/i386/i386pxe.S b/boot/freeldr/freeldr/arch/i386/i386pxe.S similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/i386pxe.S rename to boot/freeldr/freeldr/arch/i386/i386pxe.S diff --git a/reactos/boot/freeldr/freeldr/arch/i386/i386rtl.c b/boot/freeldr/freeldr/arch/i386/i386rtl.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/i386rtl.c rename to boot/freeldr/freeldr/arch/i386/i386rtl.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/i386trap.S b/boot/freeldr/freeldr/arch/i386/i386trap.S similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/i386trap.S rename to boot/freeldr/freeldr/arch/i386/i386trap.S diff --git a/reactos/boot/freeldr/freeldr/arch/i386/i386vid.c b/boot/freeldr/freeldr/arch/i386/i386vid.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/i386vid.c rename to boot/freeldr/freeldr/arch/i386/i386vid.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/int386.S b/boot/freeldr/freeldr/arch/i386/int386.S similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/int386.S rename to boot/freeldr/freeldr/arch/i386/int386.S diff --git a/reactos/boot/freeldr/freeldr/arch/i386/linux.S b/boot/freeldr/freeldr/arch/i386/linux.S similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/linux.S rename to boot/freeldr/freeldr/arch/i386/linux.S diff --git a/reactos/boot/freeldr/freeldr/arch/i386/linux.cmake.S b/boot/freeldr/freeldr/arch/i386/linux.cmake.S similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/linux.cmake.S rename to boot/freeldr/freeldr/arch/i386/linux.cmake.S diff --git a/reactos/boot/freeldr/freeldr/arch/i386/machpc.c b/boot/freeldr/freeldr/arch/i386/machpc.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/machpc.c rename to boot/freeldr/freeldr/arch/i386/machpc.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/machxbox.c b/boot/freeldr/freeldr/arch/i386/machxbox.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/machxbox.c rename to boot/freeldr/freeldr/arch/i386/machxbox.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/mb.S b/boot/freeldr/freeldr/arch/i386/mb.S similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/mb.S rename to boot/freeldr/freeldr/arch/i386/mb.S diff --git a/reactos/boot/freeldr/freeldr/arch/i386/miscboot.c b/boot/freeldr/freeldr/arch/i386/miscboot.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/miscboot.c rename to boot/freeldr/freeldr/arch/i386/miscboot.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/multiboot.S b/boot/freeldr/freeldr/arch/i386/multiboot.S similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/multiboot.S rename to boot/freeldr/freeldr/arch/i386/multiboot.S diff --git a/reactos/boot/freeldr/freeldr/arch/i386/ntoskrnl.c b/boot/freeldr/freeldr/arch/i386/ntoskrnl.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/ntoskrnl.c rename to boot/freeldr/freeldr/arch/i386/ntoskrnl.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/pccons.c b/boot/freeldr/freeldr/arch/i386/pccons.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/pccons.c rename to boot/freeldr/freeldr/arch/i386/pccons.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c b/boot/freeldr/freeldr/arch/i386/pcdisk.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c rename to boot/freeldr/freeldr/arch/i386/pcdisk.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c b/boot/freeldr/freeldr/arch/i386/pcmem.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/pcmem.c rename to boot/freeldr/freeldr/arch/i386/pcmem.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/pcrtc.c b/boot/freeldr/freeldr/arch/i386/pcrtc.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/pcrtc.c rename to boot/freeldr/freeldr/arch/i386/pcrtc.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/pcvideo.c b/boot/freeldr/freeldr/arch/i386/pcvideo.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/pcvideo.c rename to boot/freeldr/freeldr/arch/i386/pcvideo.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/realmode.S b/boot/freeldr/freeldr/arch/i386/realmode.S similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/realmode.S rename to boot/freeldr/freeldr/arch/i386/realmode.S diff --git a/reactos/boot/freeldr/freeldr/arch/i386/winldr.c b/boot/freeldr/freeldr/arch/i386/winldr.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/winldr.c rename to boot/freeldr/freeldr/arch/i386/winldr.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/xboxcons.c b/boot/freeldr/freeldr/arch/i386/xboxcons.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/xboxcons.c rename to boot/freeldr/freeldr/arch/i386/xboxcons.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/xboxdisk.c b/boot/freeldr/freeldr/arch/i386/xboxdisk.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/xboxdisk.c rename to boot/freeldr/freeldr/arch/i386/xboxdisk.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/xboxfont.c b/boot/freeldr/freeldr/arch/i386/xboxfont.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/xboxfont.c rename to boot/freeldr/freeldr/arch/i386/xboxfont.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c b/boot/freeldr/freeldr/arch/i386/xboxhw.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c rename to boot/freeldr/freeldr/arch/i386/xboxhw.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/xboxi2c.c b/boot/freeldr/freeldr/arch/i386/xboxi2c.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/xboxi2c.c rename to boot/freeldr/freeldr/arch/i386/xboxi2c.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/xboxmem.c b/boot/freeldr/freeldr/arch/i386/xboxmem.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/xboxmem.c rename to boot/freeldr/freeldr/arch/i386/xboxmem.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/xboxrtc.c b/boot/freeldr/freeldr/arch/i386/xboxrtc.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/xboxrtc.c rename to boot/freeldr/freeldr/arch/i386/xboxrtc.c diff --git a/reactos/boot/freeldr/freeldr/arch/i386/xboxvideo.c b/boot/freeldr/freeldr/arch/i386/xboxvideo.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/i386/xboxvideo.c rename to boot/freeldr/freeldr/arch/i386/xboxvideo.c diff --git a/reactos/boot/freeldr/freeldr/arch/powerpc/boot.s b/boot/freeldr/freeldr/arch/powerpc/boot.s similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/powerpc/boot.s rename to boot/freeldr/freeldr/arch/powerpc/boot.s diff --git a/reactos/boot/freeldr/freeldr/arch/powerpc/compat.h b/boot/freeldr/freeldr/arch/powerpc/compat.h similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/powerpc/compat.h rename to boot/freeldr/freeldr/arch/powerpc/compat.h diff --git a/reactos/boot/freeldr/freeldr/arch/powerpc/loader.c b/boot/freeldr/freeldr/arch/powerpc/loader.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/powerpc/loader.c rename to boot/freeldr/freeldr/arch/powerpc/loader.c diff --git a/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c b/boot/freeldr/freeldr/arch/powerpc/mach.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/powerpc/mach.c rename to boot/freeldr/freeldr/arch/powerpc/mach.c diff --git a/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c b/boot/freeldr/freeldr/arch/powerpc/mboot.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c rename to boot/freeldr/freeldr/arch/powerpc/mboot.c diff --git a/reactos/boot/freeldr/freeldr/arch/powerpc/mmu.c b/boot/freeldr/freeldr/arch/powerpc/mmu.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/powerpc/mmu.c rename to boot/freeldr/freeldr/arch/powerpc/mmu.c diff --git a/reactos/boot/freeldr/freeldr/arch/powerpc/ofw_method.c b/boot/freeldr/freeldr/arch/powerpc/ofw_method.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/powerpc/ofw_method.c rename to boot/freeldr/freeldr/arch/powerpc/ofw_method.c diff --git a/reactos/boot/freeldr/freeldr/arch/powerpc/ofw_util.s b/boot/freeldr/freeldr/arch/powerpc/ofw_util.s similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/powerpc/ofw_util.s rename to boot/freeldr/freeldr/arch/powerpc/ofw_util.s diff --git a/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c b/boot/freeldr/freeldr/arch/powerpc/prep.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/powerpc/prep.c rename to boot/freeldr/freeldr/arch/powerpc/prep.c diff --git a/reactos/boot/freeldr/freeldr/arch/powerpc/prep.h b/boot/freeldr/freeldr/arch/powerpc/prep.h similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/powerpc/prep.h rename to boot/freeldr/freeldr/arch/powerpc/prep.h diff --git a/reactos/boot/freeldr/freeldr/arch/powerpc/prep_ide.c b/boot/freeldr/freeldr/arch/powerpc/prep_ide.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/powerpc/prep_ide.c rename to boot/freeldr/freeldr/arch/powerpc/prep_ide.c diff --git a/reactos/boot/freeldr/freeldr/arch/powerpc/prep_pci.c b/boot/freeldr/freeldr/arch/powerpc/prep_pci.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/powerpc/prep_pci.c rename to boot/freeldr/freeldr/arch/powerpc/prep_pci.c diff --git a/reactos/boot/freeldr/freeldr/arch/powerpc/prep_vga.c b/boot/freeldr/freeldr/arch/powerpc/prep_vga.c similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/powerpc/prep_vga.c rename to boot/freeldr/freeldr/arch/powerpc/prep_vga.c diff --git a/reactos/boot/freeldr/freeldr/arch/realmode/amd64.S b/boot/freeldr/freeldr/arch/realmode/amd64.S similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/realmode/amd64.S rename to boot/freeldr/freeldr/arch/realmode/amd64.S diff --git a/reactos/boot/freeldr/freeldr/arch/realmode/fathelp.inc b/boot/freeldr/freeldr/arch/realmode/fathelp.inc similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/realmode/fathelp.inc rename to boot/freeldr/freeldr/arch/realmode/fathelp.inc diff --git a/reactos/boot/freeldr/freeldr/arch/realmode/helpers.inc b/boot/freeldr/freeldr/arch/realmode/helpers.inc similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/realmode/helpers.inc rename to boot/freeldr/freeldr/arch/realmode/helpers.inc diff --git a/reactos/boot/freeldr/freeldr/arch/realmode/i386.S b/boot/freeldr/freeldr/arch/realmode/i386.S similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/realmode/i386.S rename to boot/freeldr/freeldr/arch/realmode/i386.S diff --git a/reactos/boot/freeldr/freeldr/arch/realmode/int386.inc b/boot/freeldr/freeldr/arch/realmode/int386.inc similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/realmode/int386.inc rename to boot/freeldr/freeldr/arch/realmode/int386.inc diff --git a/reactos/boot/freeldr/freeldr/arch/realmode/linux.inc b/boot/freeldr/freeldr/arch/realmode/linux.inc similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/realmode/linux.inc rename to boot/freeldr/freeldr/arch/realmode/linux.inc diff --git a/reactos/boot/freeldr/freeldr/arch/realmode/pnp.inc b/boot/freeldr/freeldr/arch/realmode/pnp.inc similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/realmode/pnp.inc rename to boot/freeldr/freeldr/arch/realmode/pnp.inc diff --git a/reactos/boot/freeldr/freeldr/arch/realmode/pxe.inc b/boot/freeldr/freeldr/arch/realmode/pxe.inc similarity index 100% rename from reactos/boot/freeldr/freeldr/arch/realmode/pxe.inc rename to boot/freeldr/freeldr/arch/realmode/pxe.inc diff --git a/reactos/boot/freeldr/freeldr/bootmgr.c b/boot/freeldr/freeldr/bootmgr.c similarity index 100% rename from reactos/boot/freeldr/freeldr/bootmgr.c rename to boot/freeldr/freeldr/bootmgr.c diff --git a/reactos/boot/freeldr/freeldr/cache/blocklist.c b/boot/freeldr/freeldr/cache/blocklist.c similarity index 100% rename from reactos/boot/freeldr/freeldr/cache/blocklist.c rename to boot/freeldr/freeldr/cache/blocklist.c diff --git a/reactos/boot/freeldr/freeldr/cache/cache.c b/boot/freeldr/freeldr/cache/cache.c similarity index 100% rename from reactos/boot/freeldr/freeldr/cache/cache.c rename to boot/freeldr/freeldr/cache/cache.c diff --git a/reactos/boot/freeldr/freeldr/cmdline.c b/boot/freeldr/freeldr/cmdline.c similarity index 100% rename from reactos/boot/freeldr/freeldr/cmdline.c rename to boot/freeldr/freeldr/cmdline.c diff --git a/reactos/boot/freeldr/freeldr/comm/rs232.c b/boot/freeldr/freeldr/comm/rs232.c similarity index 100% rename from reactos/boot/freeldr/freeldr/comm/rs232.c rename to boot/freeldr/freeldr/comm/rs232.c diff --git a/reactos/boot/freeldr/freeldr/debug.c b/boot/freeldr/freeldr/debug.c similarity index 100% rename from reactos/boot/freeldr/freeldr/debug.c rename to boot/freeldr/freeldr/debug.c diff --git a/reactos/boot/freeldr/freeldr/disk/disk.c b/boot/freeldr/freeldr/disk/disk.c similarity index 100% rename from reactos/boot/freeldr/freeldr/disk/disk.c rename to boot/freeldr/freeldr/disk/disk.c diff --git a/reactos/boot/freeldr/freeldr/disk/partition.c b/boot/freeldr/freeldr/disk/partition.c similarity index 100% rename from reactos/boot/freeldr/freeldr/disk/partition.c rename to boot/freeldr/freeldr/disk/partition.c diff --git a/reactos/boot/freeldr/freeldr/disk/ramdisk.c b/boot/freeldr/freeldr/disk/ramdisk.c similarity index 100% rename from reactos/boot/freeldr/freeldr/disk/ramdisk.c rename to boot/freeldr/freeldr/disk/ramdisk.c diff --git a/reactos/boot/freeldr/freeldr/disk/scsiport.c b/boot/freeldr/freeldr/disk/scsiport.c similarity index 100% rename from reactos/boot/freeldr/freeldr/disk/scsiport.c rename to boot/freeldr/freeldr/disk/scsiport.c diff --git a/reactos/boot/freeldr/freeldr/freeldr.c b/boot/freeldr/freeldr/freeldr.c similarity index 100% rename from reactos/boot/freeldr/freeldr/freeldr.c rename to boot/freeldr/freeldr/freeldr.c diff --git a/reactos/boot/freeldr/freeldr/freeldr.rbuild b/boot/freeldr/freeldr/freeldr.rbuild similarity index 100% rename from reactos/boot/freeldr/freeldr/freeldr.rbuild rename to boot/freeldr/freeldr/freeldr.rbuild diff --git a/reactos/boot/freeldr/freeldr/freeldr.spec b/boot/freeldr/freeldr/freeldr.spec similarity index 100% rename from reactos/boot/freeldr/freeldr/freeldr.spec rename to boot/freeldr/freeldr/freeldr.spec diff --git a/reactos/boot/freeldr/freeldr/freeldr_amd64.lnk b/boot/freeldr/freeldr/freeldr_amd64.lnk similarity index 100% rename from reactos/boot/freeldr/freeldr/freeldr_amd64.lnk rename to boot/freeldr/freeldr/freeldr_amd64.lnk diff --git a/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild b/boot/freeldr/freeldr/freeldr_arch.rbuild similarity index 100% rename from reactos/boot/freeldr/freeldr/freeldr_arch.rbuild rename to boot/freeldr/freeldr/freeldr_arch.rbuild diff --git a/reactos/boot/freeldr/freeldr/freeldr_arm.lnk b/boot/freeldr/freeldr/freeldr_arm.lnk similarity index 100% rename from reactos/boot/freeldr/freeldr/freeldr_arm.lnk rename to boot/freeldr/freeldr/freeldr_arm.lnk diff --git a/reactos/boot/freeldr/freeldr/freeldr_base.rbuild b/boot/freeldr/freeldr/freeldr_base.rbuild similarity index 100% rename from reactos/boot/freeldr/freeldr/freeldr_base.rbuild rename to boot/freeldr/freeldr/freeldr_base.rbuild diff --git a/reactos/boot/freeldr/freeldr/freeldr_base64k.rbuild b/boot/freeldr/freeldr/freeldr_base64k.rbuild similarity index 100% rename from reactos/boot/freeldr/freeldr/freeldr_base64k.rbuild rename to boot/freeldr/freeldr/freeldr_base64k.rbuild diff --git a/reactos/boot/freeldr/freeldr/freeldr_i386.lnk b/boot/freeldr/freeldr/freeldr_i386.lnk similarity index 100% rename from reactos/boot/freeldr/freeldr/freeldr_i386.lnk rename to boot/freeldr/freeldr/freeldr_i386.lnk diff --git a/reactos/boot/freeldr/freeldr/freeldr_main.rbuild b/boot/freeldr/freeldr/freeldr_main.rbuild similarity index 100% rename from reactos/boot/freeldr/freeldr/freeldr_main.rbuild rename to boot/freeldr/freeldr/freeldr_main.rbuild diff --git a/reactos/boot/freeldr/freeldr/freeldr_startup.rbuild b/boot/freeldr/freeldr/freeldr_startup.rbuild similarity index 100% rename from reactos/boot/freeldr/freeldr/freeldr_startup.rbuild rename to boot/freeldr/freeldr/freeldr_startup.rbuild diff --git a/reactos/boot/freeldr/freeldr/fs/ext2.c b/boot/freeldr/freeldr/fs/ext2.c similarity index 100% rename from reactos/boot/freeldr/freeldr/fs/ext2.c rename to boot/freeldr/freeldr/fs/ext2.c diff --git a/reactos/boot/freeldr/freeldr/fs/fat.c b/boot/freeldr/freeldr/fs/fat.c similarity index 100% rename from reactos/boot/freeldr/freeldr/fs/fat.c rename to boot/freeldr/freeldr/fs/fat.c diff --git a/reactos/boot/freeldr/freeldr/fs/fs.c b/boot/freeldr/freeldr/fs/fs.c similarity index 100% rename from reactos/boot/freeldr/freeldr/fs/fs.c rename to boot/freeldr/freeldr/fs/fs.c diff --git a/reactos/boot/freeldr/freeldr/fs/iso.c b/boot/freeldr/freeldr/fs/iso.c similarity index 100% rename from reactos/boot/freeldr/freeldr/fs/iso.c rename to boot/freeldr/freeldr/fs/iso.c diff --git a/reactos/boot/freeldr/freeldr/fs/ntfs.c b/boot/freeldr/freeldr/fs/ntfs.c similarity index 100% rename from reactos/boot/freeldr/freeldr/fs/ntfs.c rename to boot/freeldr/freeldr/fs/ntfs.c diff --git a/reactos/boot/freeldr/freeldr/fs/pxe.c b/boot/freeldr/freeldr/fs/pxe.c similarity index 100% rename from reactos/boot/freeldr/freeldr/fs/pxe.c rename to boot/freeldr/freeldr/fs/pxe.c diff --git a/reactos/boot/freeldr/freeldr/include/arcemul.h b/boot/freeldr/freeldr/include/arcemul.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/arcemul.h rename to boot/freeldr/freeldr/include/arcemul.h diff --git a/reactos/boot/freeldr/freeldr/include/arch/amd64/amd64.h b/boot/freeldr/freeldr/include/arch/amd64/amd64.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/arch/amd64/amd64.h rename to boot/freeldr/freeldr/include/arch/amd64/amd64.h diff --git a/reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h b/boot/freeldr/freeldr/include/arch/arm/hardware.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h rename to boot/freeldr/freeldr/include/arch/arm/hardware.h diff --git a/reactos/boot/freeldr/freeldr/include/arch/i386/custom.h b/boot/freeldr/freeldr/include/arch/i386/custom.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/arch/i386/custom.h rename to boot/freeldr/freeldr/include/arch/i386/custom.h diff --git a/reactos/boot/freeldr/freeldr/include/arch/i386/drivemap.h b/boot/freeldr/freeldr/include/arch/i386/drivemap.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/arch/i386/drivemap.h rename to boot/freeldr/freeldr/include/arch/i386/drivemap.h diff --git a/reactos/boot/freeldr/freeldr/include/arch/i386/i386.h b/boot/freeldr/freeldr/include/arch/i386/i386.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/arch/i386/i386.h rename to boot/freeldr/freeldr/include/arch/i386/i386.h diff --git a/reactos/boot/freeldr/freeldr/include/arch/i386/machxbox.h b/boot/freeldr/freeldr/include/arch/i386/machxbox.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/arch/i386/machxbox.h rename to boot/freeldr/freeldr/include/arch/i386/machxbox.h diff --git a/reactos/boot/freeldr/freeldr/include/arch/i386/miscboot.h b/boot/freeldr/freeldr/include/arch/i386/miscboot.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/arch/i386/miscboot.h rename to boot/freeldr/freeldr/include/arch/i386/miscboot.h diff --git a/reactos/boot/freeldr/freeldr/include/arch/pc/hardware.h b/boot/freeldr/freeldr/include/arch/pc/hardware.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/arch/pc/hardware.h rename to boot/freeldr/freeldr/include/arch/pc/hardware.h diff --git a/reactos/boot/freeldr/freeldr/include/arch/pc/machpc.h b/boot/freeldr/freeldr/include/arch/pc/machpc.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/arch/pc/machpc.h rename to boot/freeldr/freeldr/include/arch/pc/machpc.h diff --git a/reactos/boot/freeldr/freeldr/include/arch/pc/pcbios.h b/boot/freeldr/freeldr/include/arch/pc/pcbios.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/arch/pc/pcbios.h rename to boot/freeldr/freeldr/include/arch/pc/pcbios.h diff --git a/reactos/boot/freeldr/freeldr/include/arch/pc/pxe.h b/boot/freeldr/freeldr/include/arch/pc/pxe.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/arch/pc/pxe.h rename to boot/freeldr/freeldr/include/arch/pc/pxe.h diff --git a/reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h b/boot/freeldr/freeldr/include/arch/pc/x86common.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h rename to boot/freeldr/freeldr/include/arch/pc/x86common.h diff --git a/reactos/boot/freeldr/freeldr/include/arch/powerpc/hardware.h b/boot/freeldr/freeldr/include/arch/powerpc/hardware.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/arch/powerpc/hardware.h rename to boot/freeldr/freeldr/include/arch/powerpc/hardware.h diff --git a/reactos/boot/freeldr/freeldr/include/bget.h b/boot/freeldr/freeldr/include/bget.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/bget.h rename to boot/freeldr/freeldr/include/bget.h diff --git a/reactos/boot/freeldr/freeldr/include/bytesex.h b/boot/freeldr/freeldr/include/bytesex.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/bytesex.h rename to boot/freeldr/freeldr/include/bytesex.h diff --git a/reactos/boot/freeldr/freeldr/include/cache.h b/boot/freeldr/freeldr/include/cache.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/cache.h rename to boot/freeldr/freeldr/include/cache.h diff --git a/reactos/boot/freeldr/freeldr/include/cmdline.h b/boot/freeldr/freeldr/include/cmdline.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/cmdline.h rename to boot/freeldr/freeldr/include/cmdline.h diff --git a/reactos/boot/freeldr/freeldr/include/comm.h b/boot/freeldr/freeldr/include/comm.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/comm.h rename to boot/freeldr/freeldr/include/comm.h diff --git a/reactos/boot/freeldr/freeldr/include/debug.h b/boot/freeldr/freeldr/include/debug.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/debug.h rename to boot/freeldr/freeldr/include/debug.h diff --git a/reactos/boot/freeldr/freeldr/include/disk.h b/boot/freeldr/freeldr/include/disk.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/disk.h rename to boot/freeldr/freeldr/include/disk.h diff --git a/reactos/boot/freeldr/freeldr/include/freeldr.h b/boot/freeldr/freeldr/include/freeldr.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/freeldr.h rename to boot/freeldr/freeldr/include/freeldr.h diff --git a/reactos/boot/freeldr/freeldr/include/fs.h b/boot/freeldr/freeldr/include/fs.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/fs.h rename to boot/freeldr/freeldr/include/fs.h diff --git a/reactos/boot/freeldr/freeldr/include/fs/ext2.h b/boot/freeldr/freeldr/include/fs/ext2.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/fs/ext2.h rename to boot/freeldr/freeldr/include/fs/ext2.h diff --git a/reactos/boot/freeldr/freeldr/include/fs/fat.h b/boot/freeldr/freeldr/include/fs/fat.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/fs/fat.h rename to boot/freeldr/freeldr/include/fs/fat.h diff --git a/reactos/boot/freeldr/freeldr/include/fs/iso.h b/boot/freeldr/freeldr/include/fs/iso.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/fs/iso.h rename to boot/freeldr/freeldr/include/fs/iso.h diff --git a/reactos/boot/freeldr/freeldr/include/fs/ntfs.h b/boot/freeldr/freeldr/include/fs/ntfs.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/fs/ntfs.h rename to boot/freeldr/freeldr/include/fs/ntfs.h diff --git a/reactos/boot/freeldr/freeldr/include/fs/pxe.h b/boot/freeldr/freeldr/include/fs/pxe.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/fs/pxe.h rename to boot/freeldr/freeldr/include/fs/pxe.h diff --git a/reactos/boot/freeldr/freeldr/include/inffile.h b/boot/freeldr/freeldr/include/inffile.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/inffile.h rename to boot/freeldr/freeldr/include/inffile.h diff --git a/reactos/boot/freeldr/freeldr/include/inifile.h b/boot/freeldr/freeldr/include/inifile.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/inifile.h rename to boot/freeldr/freeldr/include/inifile.h diff --git a/reactos/boot/freeldr/freeldr/include/keycodes.h b/boot/freeldr/freeldr/include/keycodes.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/keycodes.h rename to boot/freeldr/freeldr/include/keycodes.h diff --git a/reactos/boot/freeldr/freeldr/include/linux.h b/boot/freeldr/freeldr/include/linux.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/linux.h rename to boot/freeldr/freeldr/include/linux.h diff --git a/reactos/boot/freeldr/freeldr/include/machine.h b/boot/freeldr/freeldr/include/machine.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/machine.h rename to boot/freeldr/freeldr/include/machine.h diff --git a/reactos/boot/freeldr/freeldr/include/mm.h b/boot/freeldr/freeldr/include/mm.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/mm.h rename to boot/freeldr/freeldr/include/mm.h diff --git a/reactos/boot/freeldr/freeldr/include/multiboot.h b/boot/freeldr/freeldr/include/multiboot.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/multiboot.h rename to boot/freeldr/freeldr/include/multiboot.h diff --git a/reactos/boot/freeldr/freeldr/include/ntoskrnl.h b/boot/freeldr/freeldr/include/ntoskrnl.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/ntoskrnl.h rename to boot/freeldr/freeldr/include/ntoskrnl.h diff --git a/reactos/boot/freeldr/freeldr/include/of.h b/boot/freeldr/freeldr/include/of.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/of.h rename to boot/freeldr/freeldr/include/of.h diff --git a/reactos/boot/freeldr/freeldr/include/options.h b/boot/freeldr/freeldr/include/options.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/options.h rename to boot/freeldr/freeldr/include/options.h diff --git a/reactos/boot/freeldr/freeldr/include/oslist.h b/boot/freeldr/freeldr/include/oslist.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/oslist.h rename to boot/freeldr/freeldr/include/oslist.h diff --git a/reactos/boot/freeldr/freeldr/include/ramdisk.h b/boot/freeldr/freeldr/include/ramdisk.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/ramdisk.h rename to boot/freeldr/freeldr/include/ramdisk.h diff --git a/reactos/boot/freeldr/freeldr/include/reactos.h b/boot/freeldr/freeldr/include/reactos.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/reactos.h rename to boot/freeldr/freeldr/include/reactos.h diff --git a/reactos/boot/freeldr/freeldr/include/registry.h b/boot/freeldr/freeldr/include/registry.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/registry.h rename to boot/freeldr/freeldr/include/registry.h diff --git a/reactos/boot/freeldr/freeldr/include/ui.h b/boot/freeldr/freeldr/include/ui.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/ui.h rename to boot/freeldr/freeldr/include/ui.h diff --git a/reactos/boot/freeldr/freeldr/include/ui/gui.h b/boot/freeldr/freeldr/include/ui/gui.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/ui/gui.h rename to boot/freeldr/freeldr/include/ui/gui.h diff --git a/reactos/boot/freeldr/freeldr/include/ui/minitui.h b/boot/freeldr/freeldr/include/ui/minitui.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/ui/minitui.h rename to boot/freeldr/freeldr/include/ui/minitui.h diff --git a/reactos/boot/freeldr/freeldr/include/ui/noui.h b/boot/freeldr/freeldr/include/ui/noui.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/ui/noui.h rename to boot/freeldr/freeldr/include/ui/noui.h diff --git a/reactos/boot/freeldr/freeldr/include/ui/tui.h b/boot/freeldr/freeldr/include/ui/tui.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/ui/tui.h rename to boot/freeldr/freeldr/include/ui/tui.h diff --git a/reactos/boot/freeldr/freeldr/include/ver.h b/boot/freeldr/freeldr/include/ver.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/ver.h rename to boot/freeldr/freeldr/include/ver.h diff --git a/reactos/boot/freeldr/freeldr/include/video.h b/boot/freeldr/freeldr/include/video.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/video.h rename to boot/freeldr/freeldr/include/video.h diff --git a/reactos/boot/freeldr/freeldr/include/winldr.h b/boot/freeldr/freeldr/include/winldr.h similarity index 100% rename from reactos/boot/freeldr/freeldr/include/winldr.h rename to boot/freeldr/freeldr/include/winldr.h diff --git a/reactos/boot/freeldr/freeldr/inffile/inffile.c b/boot/freeldr/freeldr/inffile/inffile.c similarity index 100% rename from reactos/boot/freeldr/freeldr/inffile/inffile.c rename to boot/freeldr/freeldr/inffile/inffile.c diff --git a/reactos/boot/freeldr/freeldr/inifile/ini_init.c b/boot/freeldr/freeldr/inifile/ini_init.c similarity index 100% rename from reactos/boot/freeldr/freeldr/inifile/ini_init.c rename to boot/freeldr/freeldr/inifile/ini_init.c diff --git a/reactos/boot/freeldr/freeldr/inifile/inifile.c b/boot/freeldr/freeldr/inifile/inifile.c similarity index 100% rename from reactos/boot/freeldr/freeldr/inifile/inifile.c rename to boot/freeldr/freeldr/inifile/inifile.c diff --git a/reactos/boot/freeldr/freeldr/inifile/parse.c b/boot/freeldr/freeldr/inifile/parse.c similarity index 100% rename from reactos/boot/freeldr/freeldr/inifile/parse.c rename to boot/freeldr/freeldr/inifile/parse.c diff --git a/reactos/boot/freeldr/freeldr/linuxboot.c b/boot/freeldr/freeldr/linuxboot.c similarity index 100% rename from reactos/boot/freeldr/freeldr/linuxboot.c rename to boot/freeldr/freeldr/linuxboot.c diff --git a/reactos/boot/freeldr/freeldr/machine.c b/boot/freeldr/freeldr/machine.c similarity index 100% rename from reactos/boot/freeldr/freeldr/machine.c rename to boot/freeldr/freeldr/machine.c diff --git a/reactos/boot/freeldr/freeldr/mm/heap.c b/boot/freeldr/freeldr/mm/heap.c similarity index 100% rename from reactos/boot/freeldr/freeldr/mm/heap.c rename to boot/freeldr/freeldr/mm/heap.c diff --git a/reactos/boot/freeldr/freeldr/mm/heap_new.c b/boot/freeldr/freeldr/mm/heap_new.c similarity index 100% rename from reactos/boot/freeldr/freeldr/mm/heap_new.c rename to boot/freeldr/freeldr/mm/heap_new.c diff --git a/reactos/boot/freeldr/freeldr/mm/meminit.c b/boot/freeldr/freeldr/mm/meminit.c similarity index 100% rename from reactos/boot/freeldr/freeldr/mm/meminit.c rename to boot/freeldr/freeldr/mm/meminit.c diff --git a/reactos/boot/freeldr/freeldr/mm/mm.c b/boot/freeldr/freeldr/mm/mm.c similarity index 100% rename from reactos/boot/freeldr/freeldr/mm/mm.c rename to boot/freeldr/freeldr/mm/mm.c diff --git a/reactos/boot/freeldr/freeldr/options.c b/boot/freeldr/freeldr/options.c similarity index 100% rename from reactos/boot/freeldr/freeldr/options.c rename to boot/freeldr/freeldr/options.c diff --git a/reactos/boot/freeldr/freeldr/oslist.c b/boot/freeldr/freeldr/oslist.c similarity index 100% rename from reactos/boot/freeldr/freeldr/oslist.c rename to boot/freeldr/freeldr/oslist.c diff --git a/reactos/boot/freeldr/freeldr/reactos/archwsup.c b/boot/freeldr/freeldr/reactos/archwsup.c similarity index 100% rename from reactos/boot/freeldr/freeldr/reactos/archwsup.c rename to boot/freeldr/freeldr/reactos/archwsup.c diff --git a/reactos/boot/freeldr/freeldr/reactos/arcname.c b/boot/freeldr/freeldr/reactos/arcname.c similarity index 100% rename from reactos/boot/freeldr/freeldr/reactos/arcname.c rename to boot/freeldr/freeldr/reactos/arcname.c diff --git a/reactos/boot/freeldr/freeldr/reactos/binhive.c b/boot/freeldr/freeldr/reactos/binhive.c similarity index 100% rename from reactos/boot/freeldr/freeldr/reactos/binhive.c rename to boot/freeldr/freeldr/reactos/binhive.c diff --git a/reactos/boot/freeldr/freeldr/reactos/registry.c b/boot/freeldr/freeldr/reactos/registry.c similarity index 100% rename from reactos/boot/freeldr/freeldr/reactos/registry.c rename to boot/freeldr/freeldr/reactos/registry.c diff --git a/reactos/boot/freeldr/freeldr/rtl/bget.c b/boot/freeldr/freeldr/rtl/bget.c similarity index 100% rename from reactos/boot/freeldr/freeldr/rtl/bget.c rename to boot/freeldr/freeldr/rtl/bget.c diff --git a/reactos/boot/freeldr/freeldr/rtl/libsupp.c b/boot/freeldr/freeldr/rtl/libsupp.c similarity index 100% rename from reactos/boot/freeldr/freeldr/rtl/libsupp.c rename to boot/freeldr/freeldr/rtl/libsupp.c diff --git a/reactos/boot/freeldr/freeldr/setupldr.rbuild b/boot/freeldr/freeldr/setupldr.rbuild similarity index 100% rename from reactos/boot/freeldr/freeldr/setupldr.rbuild rename to boot/freeldr/freeldr/setupldr.rbuild diff --git a/reactos/boot/freeldr/freeldr/setupldr_main.rbuild b/boot/freeldr/freeldr/setupldr_main.rbuild similarity index 100% rename from reactos/boot/freeldr/freeldr/setupldr_main.rbuild rename to boot/freeldr/freeldr/setupldr_main.rbuild diff --git a/reactos/boot/freeldr/freeldr/ui/directui.c b/boot/freeldr/freeldr/ui/directui.c similarity index 100% rename from reactos/boot/freeldr/freeldr/ui/directui.c rename to boot/freeldr/freeldr/ui/directui.c diff --git a/reactos/boot/freeldr/freeldr/ui/gui.c b/boot/freeldr/freeldr/ui/gui.c similarity index 100% rename from reactos/boot/freeldr/freeldr/ui/gui.c rename to boot/freeldr/freeldr/ui/gui.c diff --git a/reactos/boot/freeldr/freeldr/ui/minitui.c b/boot/freeldr/freeldr/ui/minitui.c similarity index 100% rename from reactos/boot/freeldr/freeldr/ui/minitui.c rename to boot/freeldr/freeldr/ui/minitui.c diff --git a/reactos/boot/freeldr/freeldr/ui/noui.c b/boot/freeldr/freeldr/ui/noui.c similarity index 100% rename from reactos/boot/freeldr/freeldr/ui/noui.c rename to boot/freeldr/freeldr/ui/noui.c diff --git a/reactos/boot/freeldr/freeldr/ui/tui.c b/boot/freeldr/freeldr/ui/tui.c similarity index 100% rename from reactos/boot/freeldr/freeldr/ui/tui.c rename to boot/freeldr/freeldr/ui/tui.c diff --git a/reactos/boot/freeldr/freeldr/ui/tuimenu.c b/boot/freeldr/freeldr/ui/tuimenu.c similarity index 100% rename from reactos/boot/freeldr/freeldr/ui/tuimenu.c rename to boot/freeldr/freeldr/ui/tuimenu.c diff --git a/reactos/boot/freeldr/freeldr/ui/ui.c b/boot/freeldr/freeldr/ui/ui.c similarity index 100% rename from reactos/boot/freeldr/freeldr/ui/ui.c rename to boot/freeldr/freeldr/ui/ui.c diff --git a/reactos/boot/freeldr/freeldr/version.c b/boot/freeldr/freeldr/version.c similarity index 100% rename from reactos/boot/freeldr/freeldr/version.c rename to boot/freeldr/freeldr/version.c diff --git a/reactos/boot/freeldr/freeldr/video/fade.c b/boot/freeldr/freeldr/video/fade.c similarity index 100% rename from reactos/boot/freeldr/freeldr/video/fade.c rename to boot/freeldr/freeldr/video/fade.c diff --git a/reactos/boot/freeldr/freeldr/video/palette.c b/boot/freeldr/freeldr/video/palette.c similarity index 100% rename from reactos/boot/freeldr/freeldr/video/palette.c rename to boot/freeldr/freeldr/video/palette.c diff --git a/reactos/boot/freeldr/freeldr/video/video.c b/boot/freeldr/freeldr/video/video.c similarity index 100% rename from reactos/boot/freeldr/freeldr/video/video.c rename to boot/freeldr/freeldr/video/video.c diff --git a/reactos/boot/freeldr/freeldr/windows/conversion.c b/boot/freeldr/freeldr/windows/conversion.c similarity index 100% rename from reactos/boot/freeldr/freeldr/windows/conversion.c rename to boot/freeldr/freeldr/windows/conversion.c diff --git a/reactos/boot/freeldr/freeldr/windows/headless.c b/boot/freeldr/freeldr/windows/headless.c similarity index 100% rename from reactos/boot/freeldr/freeldr/windows/headless.c rename to boot/freeldr/freeldr/windows/headless.c diff --git a/reactos/boot/freeldr/freeldr/windows/peloader.c b/boot/freeldr/freeldr/windows/peloader.c similarity index 100% rename from reactos/boot/freeldr/freeldr/windows/peloader.c rename to boot/freeldr/freeldr/windows/peloader.c diff --git a/reactos/boot/freeldr/freeldr/windows/setupldr.c b/boot/freeldr/freeldr/windows/setupldr.c similarity index 100% rename from reactos/boot/freeldr/freeldr/windows/setupldr.c rename to boot/freeldr/freeldr/windows/setupldr.c diff --git a/reactos/boot/freeldr/freeldr/windows/winldr.c b/boot/freeldr/freeldr/windows/winldr.c similarity index 100% rename from reactos/boot/freeldr/freeldr/windows/winldr.c rename to boot/freeldr/freeldr/windows/winldr.c diff --git a/reactos/boot/freeldr/freeldr/windows/wlmemory.c b/boot/freeldr/freeldr/windows/wlmemory.c similarity index 100% rename from reactos/boot/freeldr/freeldr/windows/wlmemory.c rename to boot/freeldr/freeldr/windows/wlmemory.c diff --git a/reactos/boot/freeldr/freeldr/windows/wlregistry.c b/boot/freeldr/freeldr/windows/wlregistry.c similarity index 100% rename from reactos/boot/freeldr/freeldr/windows/wlregistry.c rename to boot/freeldr/freeldr/windows/wlregistry.c diff --git a/reactos/boot/freeldr/install/CMakeLists.txt b/boot/freeldr/install/CMakeLists.txt similarity index 100% rename from reactos/boot/freeldr/install/CMakeLists.txt rename to boot/freeldr/install/CMakeLists.txt diff --git a/reactos/boot/freeldr/install/install.c b/boot/freeldr/install/install.c similarity index 100% rename from reactos/boot/freeldr/install/install.c rename to boot/freeldr/install/install.c diff --git a/reactos/boot/freeldr/install/install.h b/boot/freeldr/install/install.h similarity index 100% rename from reactos/boot/freeldr/install/install.h rename to boot/freeldr/install/install.h diff --git a/reactos/boot/freeldr/install/installfreeldr.rbuild b/boot/freeldr/install/installfreeldr.rbuild similarity index 100% rename from reactos/boot/freeldr/install/installfreeldr.rbuild rename to boot/freeldr/install/installfreeldr.rbuild diff --git a/reactos/boot/freeldr/install/linux/finstext2.c b/boot/freeldr/install/linux/finstext2.c similarity index 100% rename from reactos/boot/freeldr/install/linux/finstext2.c rename to boot/freeldr/install/linux/finstext2.c diff --git a/reactos/boot/freeldr/install/linux/finstext2.h b/boot/freeldr/install/linux/finstext2.h similarity index 100% rename from reactos/boot/freeldr/install/linux/finstext2.h rename to boot/freeldr/install/linux/finstext2.h diff --git a/reactos/boot/freeldr/install/volume.c b/boot/freeldr/install/volume.c similarity index 100% rename from reactos/boot/freeldr/install/volume.c rename to boot/freeldr/install/volume.c diff --git a/reactos/boot/freeldr/install/volume.h b/boot/freeldr/install/volume.h similarity index 100% rename from reactos/boot/freeldr/install/volume.h rename to boot/freeldr/install/volume.h diff --git a/reactos/boot/freeldr/notes.txt b/boot/freeldr/notes.txt similarity index 100% rename from reactos/boot/freeldr/notes.txt rename to boot/freeldr/notes.txt diff --git a/reactos/boot/freeldr/tools/.cvsignore b/boot/freeldr/tools/.cvsignore similarity index 100% rename from reactos/boot/freeldr/tools/.cvsignore rename to boot/freeldr/tools/.cvsignore diff --git a/reactos/boot/freeldr/tools/deptool.c b/boot/freeldr/tools/deptool.c similarity index 100% rename from reactos/boot/freeldr/tools/deptool.c rename to boot/freeldr/tools/deptool.c diff --git a/reactos/boot/freeldr/tools/hosttype.c b/boot/freeldr/tools/hosttype.c similarity index 100% rename from reactos/boot/freeldr/tools/hosttype.c rename to boot/freeldr/tools/hosttype.c diff --git a/reactos/boot/freeldr/tools/rcopy.c b/boot/freeldr/tools/rcopy.c similarity index 100% rename from reactos/boot/freeldr/tools/rcopy.c rename to boot/freeldr/tools/rcopy.c diff --git a/reactos/boot/freeldr/tools/rdel.c b/boot/freeldr/tools/rdel.c similarity index 100% rename from reactos/boot/freeldr/tools/rdel.c rename to boot/freeldr/tools/rdel.c diff --git a/reactos/boot/freeldr/tools/rmkdir.c b/boot/freeldr/tools/rmkdir.c similarity index 100% rename from reactos/boot/freeldr/tools/rmkdir.c rename to boot/freeldr/tools/rmkdir.c diff --git a/reactos/boot/freeldr/tools/rrmdir.c b/boot/freeldr/tools/rrmdir.c similarity index 100% rename from reactos/boot/freeldr/tools/rrmdir.c rename to boot/freeldr/tools/rrmdir.c diff --git a/reactos/cmake/CMakeDetermineASMCompiler.cmake b/cmake/CMakeDetermineASMCompiler.cmake similarity index 100% rename from reactos/cmake/CMakeDetermineASMCompiler.cmake rename to cmake/CMakeDetermineASMCompiler.cmake diff --git a/reactos/cmake/CMakeDetermineCompilerId.cmake b/cmake/CMakeDetermineCompilerId.cmake similarity index 100% rename from reactos/cmake/CMakeDetermineCompilerId.cmake rename to cmake/CMakeDetermineCompilerId.cmake diff --git a/reactos/cmake/CMakeMacros.cmake b/cmake/CMakeMacros.cmake similarity index 100% rename from reactos/cmake/CMakeMacros.cmake rename to cmake/CMakeMacros.cmake diff --git a/reactos/cmake/CMakeParseArguments.cmake b/cmake/CMakeParseArguments.cmake similarity index 100% rename from reactos/cmake/CMakeParseArguments.cmake rename to cmake/CMakeParseArguments.cmake diff --git a/reactos/cmake/Compiler/VISUAL-ASM.cmake b/cmake/Compiler/VISUAL-ASM.cmake similarity index 100% rename from reactos/cmake/Compiler/VISUAL-ASM.cmake rename to cmake/Compiler/VISUAL-ASM.cmake diff --git a/reactos/cmake/Platform/Windows-cl.cmake b/cmake/Platform/Windows-cl.cmake similarity index 100% rename from reactos/cmake/Platform/Windows-cl.cmake rename to cmake/Platform/Windows-cl.cmake diff --git a/reactos/cmake/Platform/Windows.cmake b/cmake/Platform/Windows.cmake similarity index 100% rename from reactos/cmake/Platform/Windows.cmake rename to cmake/Platform/Windows.cmake diff --git a/reactos/cmake/baseaddress.cmake b/cmake/baseaddress.cmake similarity index 100% rename from reactos/cmake/baseaddress.cmake rename to cmake/baseaddress.cmake diff --git a/reactos/cmake/compilerflags.cmake b/cmake/compilerflags.cmake similarity index 100% rename from reactos/cmake/compilerflags.cmake rename to cmake/compilerflags.cmake diff --git a/reactos/cmake/config-amd64.cmake b/cmake/config-amd64.cmake similarity index 100% rename from reactos/cmake/config-amd64.cmake rename to cmake/config-amd64.cmake diff --git a/reactos/cmake/config-arm.cmake b/cmake/config-arm.cmake similarity index 100% rename from reactos/cmake/config-arm.cmake rename to cmake/config-arm.cmake diff --git a/reactos/cmake/config.cmake b/cmake/config.cmake similarity index 100% rename from reactos/cmake/config.cmake rename to cmake/config.cmake diff --git a/reactos/cmake/gcc.cmake b/cmake/gcc.cmake similarity index 100% rename from reactos/cmake/gcc.cmake rename to cmake/gcc.cmake diff --git a/reactos/cmake/idl-support.cmake b/cmake/idl-support.cmake similarity index 100% rename from reactos/cmake/idl-support.cmake rename to cmake/idl-support.cmake diff --git a/reactos/cmake/msvc.cmake b/cmake/msvc.cmake similarity index 100% rename from reactos/cmake/msvc.cmake rename to cmake/msvc.cmake diff --git a/reactos/cmake/writing_CmakeLists_for_ReactOS.txt b/cmake/writing_CmakeLists_for_ReactOS.txt similarity index 100% rename from reactos/cmake/writing_CmakeLists_for_ReactOS.txt rename to cmake/writing_CmakeLists_for_ReactOS.txt diff --git a/reactos/config-amd64.template.rbuild b/config-amd64.template.rbuild similarity index 100% rename from reactos/config-amd64.template.rbuild rename to config-amd64.template.rbuild diff --git a/reactos/config-arm.template.rbuild b/config-arm.template.rbuild similarity index 100% rename from reactos/config-arm.template.rbuild rename to config-arm.template.rbuild diff --git a/reactos/config-ppc.template.rbuild b/config-ppc.template.rbuild similarity index 100% rename from reactos/config-ppc.template.rbuild rename to config-ppc.template.rbuild diff --git a/reactos/config.template.rbuild b/config.template.rbuild similarity index 100% rename from reactos/config.template.rbuild rename to config.template.rbuild diff --git a/reactos/configure.cmd b/configure.cmd similarity index 100% rename from reactos/configure.cmd rename to configure.cmd diff --git a/reactos/configure.sh b/configure.sh similarity index 100% rename from reactos/configure.sh rename to configure.sh diff --git a/reactos/depmap.xsl b/depmap.xsl similarity index 100% rename from reactos/depmap.xsl rename to depmap.xsl diff --git a/reactos/dll/3rdparty/3rdparty.rbuild b/dll/3rdparty/3rdparty.rbuild similarity index 100% rename from reactos/dll/3rdparty/3rdparty.rbuild rename to dll/3rdparty/3rdparty.rbuild diff --git a/reactos/dll/3rdparty/CMakeLists.txt b/dll/3rdparty/CMakeLists.txt similarity index 100% rename from reactos/dll/3rdparty/CMakeLists.txt rename to dll/3rdparty/CMakeLists.txt diff --git a/reactos/dll/3rdparty/dxtn/CMakeLists.txt b/dll/3rdparty/dxtn/CMakeLists.txt similarity index 100% rename from reactos/dll/3rdparty/dxtn/CMakeLists.txt rename to dll/3rdparty/dxtn/CMakeLists.txt diff --git a/reactos/dll/3rdparty/dxtn/dxtn.c b/dll/3rdparty/dxtn/dxtn.c similarity index 100% rename from reactos/dll/3rdparty/dxtn/dxtn.c rename to dll/3rdparty/dxtn/dxtn.c diff --git a/reactos/dll/3rdparty/dxtn/dxtn.h b/dll/3rdparty/dxtn/dxtn.h similarity index 100% rename from reactos/dll/3rdparty/dxtn/dxtn.h rename to dll/3rdparty/dxtn/dxtn.h diff --git a/reactos/dll/3rdparty/dxtn/dxtn.rbuild b/dll/3rdparty/dxtn/dxtn.rbuild similarity index 100% rename from reactos/dll/3rdparty/dxtn/dxtn.rbuild rename to dll/3rdparty/dxtn/dxtn.rbuild diff --git a/reactos/dll/3rdparty/dxtn/dxtn.spec b/dll/3rdparty/dxtn/dxtn.spec similarity index 100% rename from reactos/dll/3rdparty/dxtn/dxtn.spec rename to dll/3rdparty/dxtn/dxtn.spec diff --git a/reactos/dll/3rdparty/dxtn/fxt1.c b/dll/3rdparty/dxtn/fxt1.c similarity index 100% rename from reactos/dll/3rdparty/dxtn/fxt1.c rename to dll/3rdparty/dxtn/fxt1.c diff --git a/reactos/dll/3rdparty/dxtn/fxt1.h b/dll/3rdparty/dxtn/fxt1.h similarity index 100% rename from reactos/dll/3rdparty/dxtn/fxt1.h rename to dll/3rdparty/dxtn/fxt1.h diff --git a/reactos/dll/3rdparty/dxtn/internal.h b/dll/3rdparty/dxtn/internal.h similarity index 100% rename from reactos/dll/3rdparty/dxtn/internal.h rename to dll/3rdparty/dxtn/internal.h diff --git a/reactos/dll/3rdparty/dxtn/texstore.c b/dll/3rdparty/dxtn/texstore.c similarity index 100% rename from reactos/dll/3rdparty/dxtn/texstore.c rename to dll/3rdparty/dxtn/texstore.c diff --git a/reactos/dll/3rdparty/dxtn/types.h b/dll/3rdparty/dxtn/types.h similarity index 100% rename from reactos/dll/3rdparty/dxtn/types.h rename to dll/3rdparty/dxtn/types.h diff --git a/reactos/dll/3rdparty/dxtn/wrapper.c b/dll/3rdparty/dxtn/wrapper.c similarity index 100% rename from reactos/dll/3rdparty/dxtn/wrapper.c rename to dll/3rdparty/dxtn/wrapper.c diff --git a/reactos/dll/3rdparty/libjpeg/CMakeLists.txt b/dll/3rdparty/libjpeg/CMakeLists.txt similarity index 100% rename from reactos/dll/3rdparty/libjpeg/CMakeLists.txt rename to dll/3rdparty/libjpeg/CMakeLists.txt diff --git a/reactos/dll/3rdparty/libjpeg/README b/dll/3rdparty/libjpeg/README similarity index 100% rename from reactos/dll/3rdparty/libjpeg/README rename to dll/3rdparty/libjpeg/README diff --git a/reactos/dll/3rdparty/libjpeg/ansi2knr.c b/dll/3rdparty/libjpeg/ansi2knr.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/ansi2knr.c rename to dll/3rdparty/libjpeg/ansi2knr.c diff --git a/reactos/dll/3rdparty/libjpeg/cdjpeg.c b/dll/3rdparty/libjpeg/cdjpeg.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/cdjpeg.c rename to dll/3rdparty/libjpeg/cdjpeg.c diff --git a/reactos/dll/3rdparty/libjpeg/change.log b/dll/3rdparty/libjpeg/change.log similarity index 100% rename from reactos/dll/3rdparty/libjpeg/change.log rename to dll/3rdparty/libjpeg/change.log diff --git a/reactos/dll/3rdparty/libjpeg/cjpeg.c b/dll/3rdparty/libjpeg/cjpeg.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/cjpeg.c rename to dll/3rdparty/libjpeg/cjpeg.c diff --git a/reactos/dll/3rdparty/libjpeg/ckconfig.c b/dll/3rdparty/libjpeg/ckconfig.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/ckconfig.c rename to dll/3rdparty/libjpeg/ckconfig.c diff --git a/reactos/dll/3rdparty/libjpeg/djpeg.c b/dll/3rdparty/libjpeg/djpeg.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/djpeg.c rename to dll/3rdparty/libjpeg/djpeg.c diff --git a/reactos/dll/3rdparty/libjpeg/example.c b/dll/3rdparty/libjpeg/example.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/example.c rename to dll/3rdparty/libjpeg/example.c diff --git a/reactos/dll/3rdparty/libjpeg/jaricom.c b/dll/3rdparty/libjpeg/jaricom.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jaricom.c rename to dll/3rdparty/libjpeg/jaricom.c diff --git a/reactos/dll/3rdparty/libjpeg/jcapimin.c b/dll/3rdparty/libjpeg/jcapimin.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jcapimin.c rename to dll/3rdparty/libjpeg/jcapimin.c diff --git a/reactos/dll/3rdparty/libjpeg/jcapistd.c b/dll/3rdparty/libjpeg/jcapistd.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jcapistd.c rename to dll/3rdparty/libjpeg/jcapistd.c diff --git a/reactos/dll/3rdparty/libjpeg/jcarith.c b/dll/3rdparty/libjpeg/jcarith.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jcarith.c rename to dll/3rdparty/libjpeg/jcarith.c diff --git a/reactos/dll/3rdparty/libjpeg/jccoefct.c b/dll/3rdparty/libjpeg/jccoefct.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jccoefct.c rename to dll/3rdparty/libjpeg/jccoefct.c diff --git a/reactos/dll/3rdparty/libjpeg/jccolor.c b/dll/3rdparty/libjpeg/jccolor.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jccolor.c rename to dll/3rdparty/libjpeg/jccolor.c diff --git a/reactos/dll/3rdparty/libjpeg/jcdctmgr.c b/dll/3rdparty/libjpeg/jcdctmgr.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jcdctmgr.c rename to dll/3rdparty/libjpeg/jcdctmgr.c diff --git a/reactos/dll/3rdparty/libjpeg/jchuff.c b/dll/3rdparty/libjpeg/jchuff.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jchuff.c rename to dll/3rdparty/libjpeg/jchuff.c diff --git a/reactos/dll/3rdparty/libjpeg/jcinit.c b/dll/3rdparty/libjpeg/jcinit.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jcinit.c rename to dll/3rdparty/libjpeg/jcinit.c diff --git a/reactos/dll/3rdparty/libjpeg/jcmainct.c b/dll/3rdparty/libjpeg/jcmainct.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jcmainct.c rename to dll/3rdparty/libjpeg/jcmainct.c diff --git a/reactos/dll/3rdparty/libjpeg/jcmarker.c b/dll/3rdparty/libjpeg/jcmarker.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jcmarker.c rename to dll/3rdparty/libjpeg/jcmarker.c diff --git a/reactos/dll/3rdparty/libjpeg/jcmaster.c b/dll/3rdparty/libjpeg/jcmaster.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jcmaster.c rename to dll/3rdparty/libjpeg/jcmaster.c diff --git a/reactos/dll/3rdparty/libjpeg/jcomapi.c b/dll/3rdparty/libjpeg/jcomapi.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jcomapi.c rename to dll/3rdparty/libjpeg/jcomapi.c diff --git a/reactos/dll/3rdparty/libjpeg/jcparam.c b/dll/3rdparty/libjpeg/jcparam.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jcparam.c rename to dll/3rdparty/libjpeg/jcparam.c diff --git a/reactos/dll/3rdparty/libjpeg/jcprepct.c b/dll/3rdparty/libjpeg/jcprepct.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jcprepct.c rename to dll/3rdparty/libjpeg/jcprepct.c diff --git a/reactos/dll/3rdparty/libjpeg/jcsample.c b/dll/3rdparty/libjpeg/jcsample.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jcsample.c rename to dll/3rdparty/libjpeg/jcsample.c diff --git a/reactos/dll/3rdparty/libjpeg/jctrans.c b/dll/3rdparty/libjpeg/jctrans.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jctrans.c rename to dll/3rdparty/libjpeg/jctrans.c diff --git a/reactos/dll/3rdparty/libjpeg/jdapimin.c b/dll/3rdparty/libjpeg/jdapimin.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jdapimin.c rename to dll/3rdparty/libjpeg/jdapimin.c diff --git a/reactos/dll/3rdparty/libjpeg/jdapistd.c b/dll/3rdparty/libjpeg/jdapistd.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jdapistd.c rename to dll/3rdparty/libjpeg/jdapistd.c diff --git a/reactos/dll/3rdparty/libjpeg/jdarith.c b/dll/3rdparty/libjpeg/jdarith.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jdarith.c rename to dll/3rdparty/libjpeg/jdarith.c diff --git a/reactos/dll/3rdparty/libjpeg/jdatadst.c b/dll/3rdparty/libjpeg/jdatadst.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jdatadst.c rename to dll/3rdparty/libjpeg/jdatadst.c diff --git a/reactos/dll/3rdparty/libjpeg/jdatasrc.c b/dll/3rdparty/libjpeg/jdatasrc.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jdatasrc.c rename to dll/3rdparty/libjpeg/jdatasrc.c diff --git a/reactos/dll/3rdparty/libjpeg/jdcoefct.c b/dll/3rdparty/libjpeg/jdcoefct.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jdcoefct.c rename to dll/3rdparty/libjpeg/jdcoefct.c diff --git a/reactos/dll/3rdparty/libjpeg/jdcolor.c b/dll/3rdparty/libjpeg/jdcolor.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jdcolor.c rename to dll/3rdparty/libjpeg/jdcolor.c diff --git a/reactos/dll/3rdparty/libjpeg/jddctmgr.c b/dll/3rdparty/libjpeg/jddctmgr.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jddctmgr.c rename to dll/3rdparty/libjpeg/jddctmgr.c diff --git a/reactos/dll/3rdparty/libjpeg/jdhuff.c b/dll/3rdparty/libjpeg/jdhuff.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jdhuff.c rename to dll/3rdparty/libjpeg/jdhuff.c diff --git a/reactos/dll/3rdparty/libjpeg/jdinput.c b/dll/3rdparty/libjpeg/jdinput.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jdinput.c rename to dll/3rdparty/libjpeg/jdinput.c diff --git a/reactos/dll/3rdparty/libjpeg/jdmainct.c b/dll/3rdparty/libjpeg/jdmainct.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jdmainct.c rename to dll/3rdparty/libjpeg/jdmainct.c diff --git a/reactos/dll/3rdparty/libjpeg/jdmarker.c b/dll/3rdparty/libjpeg/jdmarker.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jdmarker.c rename to dll/3rdparty/libjpeg/jdmarker.c diff --git a/reactos/dll/3rdparty/libjpeg/jdmaster.c b/dll/3rdparty/libjpeg/jdmaster.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jdmaster.c rename to dll/3rdparty/libjpeg/jdmaster.c diff --git a/reactos/dll/3rdparty/libjpeg/jdmerge.c b/dll/3rdparty/libjpeg/jdmerge.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jdmerge.c rename to dll/3rdparty/libjpeg/jdmerge.c diff --git a/reactos/dll/3rdparty/libjpeg/jdpostct.c b/dll/3rdparty/libjpeg/jdpostct.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jdpostct.c rename to dll/3rdparty/libjpeg/jdpostct.c diff --git a/reactos/dll/3rdparty/libjpeg/jdsample.c b/dll/3rdparty/libjpeg/jdsample.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jdsample.c rename to dll/3rdparty/libjpeg/jdsample.c diff --git a/reactos/dll/3rdparty/libjpeg/jdtrans.c b/dll/3rdparty/libjpeg/jdtrans.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jdtrans.c rename to dll/3rdparty/libjpeg/jdtrans.c diff --git a/reactos/dll/3rdparty/libjpeg/jerror.c b/dll/3rdparty/libjpeg/jerror.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jerror.c rename to dll/3rdparty/libjpeg/jerror.c diff --git a/reactos/dll/3rdparty/libjpeg/jfdctflt.c b/dll/3rdparty/libjpeg/jfdctflt.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jfdctflt.c rename to dll/3rdparty/libjpeg/jfdctflt.c diff --git a/reactos/dll/3rdparty/libjpeg/jfdctfst.c b/dll/3rdparty/libjpeg/jfdctfst.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jfdctfst.c rename to dll/3rdparty/libjpeg/jfdctfst.c diff --git a/reactos/dll/3rdparty/libjpeg/jfdctint.c b/dll/3rdparty/libjpeg/jfdctint.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jfdctint.c rename to dll/3rdparty/libjpeg/jfdctint.c diff --git a/reactos/dll/3rdparty/libjpeg/jidctflt.c b/dll/3rdparty/libjpeg/jidctflt.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jidctflt.c rename to dll/3rdparty/libjpeg/jidctflt.c diff --git a/reactos/dll/3rdparty/libjpeg/jidctfst.c b/dll/3rdparty/libjpeg/jidctfst.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jidctfst.c rename to dll/3rdparty/libjpeg/jidctfst.c diff --git a/reactos/dll/3rdparty/libjpeg/jidctint.c b/dll/3rdparty/libjpeg/jidctint.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jidctint.c rename to dll/3rdparty/libjpeg/jidctint.c diff --git a/reactos/dll/3rdparty/libjpeg/jmemansi.c b/dll/3rdparty/libjpeg/jmemansi.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jmemansi.c rename to dll/3rdparty/libjpeg/jmemansi.c diff --git a/reactos/dll/3rdparty/libjpeg/jmemmgr.c b/dll/3rdparty/libjpeg/jmemmgr.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jmemmgr.c rename to dll/3rdparty/libjpeg/jmemmgr.c diff --git a/reactos/dll/3rdparty/libjpeg/jmemname.c b/dll/3rdparty/libjpeg/jmemname.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jmemname.c rename to dll/3rdparty/libjpeg/jmemname.c diff --git a/reactos/dll/3rdparty/libjpeg/jmemnobs.c b/dll/3rdparty/libjpeg/jmemnobs.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jmemnobs.c rename to dll/3rdparty/libjpeg/jmemnobs.c diff --git a/reactos/dll/3rdparty/libjpeg/jpegtran.c b/dll/3rdparty/libjpeg/jpegtran.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jpegtran.c rename to dll/3rdparty/libjpeg/jpegtran.c diff --git a/reactos/dll/3rdparty/libjpeg/jquant1.c b/dll/3rdparty/libjpeg/jquant1.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jquant1.c rename to dll/3rdparty/libjpeg/jquant1.c diff --git a/reactos/dll/3rdparty/libjpeg/jquant2.c b/dll/3rdparty/libjpeg/jquant2.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jquant2.c rename to dll/3rdparty/libjpeg/jquant2.c diff --git a/reactos/dll/3rdparty/libjpeg/jutils.c b/dll/3rdparty/libjpeg/jutils.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/jutils.c rename to dll/3rdparty/libjpeg/jutils.c diff --git a/reactos/dll/3rdparty/libjpeg/libjpeg.rbuild b/dll/3rdparty/libjpeg/libjpeg.rbuild similarity index 100% rename from reactos/dll/3rdparty/libjpeg/libjpeg.rbuild rename to dll/3rdparty/libjpeg/libjpeg.rbuild diff --git a/reactos/dll/3rdparty/libjpeg/rdbmp.c b/dll/3rdparty/libjpeg/rdbmp.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/rdbmp.c rename to dll/3rdparty/libjpeg/rdbmp.c diff --git a/reactos/dll/3rdparty/libjpeg/rdcolmap.c b/dll/3rdparty/libjpeg/rdcolmap.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/rdcolmap.c rename to dll/3rdparty/libjpeg/rdcolmap.c diff --git a/reactos/dll/3rdparty/libjpeg/rdgif.c b/dll/3rdparty/libjpeg/rdgif.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/rdgif.c rename to dll/3rdparty/libjpeg/rdgif.c diff --git a/reactos/dll/3rdparty/libjpeg/rdjpgcom.c b/dll/3rdparty/libjpeg/rdjpgcom.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/rdjpgcom.c rename to dll/3rdparty/libjpeg/rdjpgcom.c diff --git a/reactos/dll/3rdparty/libjpeg/rdppm.c b/dll/3rdparty/libjpeg/rdppm.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/rdppm.c rename to dll/3rdparty/libjpeg/rdppm.c diff --git a/reactos/dll/3rdparty/libjpeg/rdrle.c b/dll/3rdparty/libjpeg/rdrle.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/rdrle.c rename to dll/3rdparty/libjpeg/rdrle.c diff --git a/reactos/dll/3rdparty/libjpeg/rdswitch.c b/dll/3rdparty/libjpeg/rdswitch.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/rdswitch.c rename to dll/3rdparty/libjpeg/rdswitch.c diff --git a/reactos/dll/3rdparty/libjpeg/rdtarga.c b/dll/3rdparty/libjpeg/rdtarga.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/rdtarga.c rename to dll/3rdparty/libjpeg/rdtarga.c diff --git a/reactos/dll/3rdparty/libjpeg/transupp.c b/dll/3rdparty/libjpeg/transupp.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/transupp.c rename to dll/3rdparty/libjpeg/transupp.c diff --git a/reactos/dll/3rdparty/libjpeg/wrbmp.c b/dll/3rdparty/libjpeg/wrbmp.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/wrbmp.c rename to dll/3rdparty/libjpeg/wrbmp.c diff --git a/reactos/dll/3rdparty/libjpeg/wrgif.c b/dll/3rdparty/libjpeg/wrgif.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/wrgif.c rename to dll/3rdparty/libjpeg/wrgif.c diff --git a/reactos/dll/3rdparty/libjpeg/wrjpgcom.c b/dll/3rdparty/libjpeg/wrjpgcom.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/wrjpgcom.c rename to dll/3rdparty/libjpeg/wrjpgcom.c diff --git a/reactos/dll/3rdparty/libjpeg/wrppm.c b/dll/3rdparty/libjpeg/wrppm.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/wrppm.c rename to dll/3rdparty/libjpeg/wrppm.c diff --git a/reactos/dll/3rdparty/libjpeg/wrrle.c b/dll/3rdparty/libjpeg/wrrle.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/wrrle.c rename to dll/3rdparty/libjpeg/wrrle.c diff --git a/reactos/dll/3rdparty/libjpeg/wrtarga.c b/dll/3rdparty/libjpeg/wrtarga.c similarity index 100% rename from reactos/dll/3rdparty/libjpeg/wrtarga.c rename to dll/3rdparty/libjpeg/wrtarga.c diff --git a/reactos/dll/3rdparty/libpng/CMakeLists.txt b/dll/3rdparty/libpng/CMakeLists.txt similarity index 100% rename from reactos/dll/3rdparty/libpng/CMakeLists.txt rename to dll/3rdparty/libpng/CMakeLists.txt diff --git a/reactos/dll/3rdparty/libpng/docs/ANNOUNCE b/dll/3rdparty/libpng/docs/ANNOUNCE similarity index 100% rename from reactos/dll/3rdparty/libpng/docs/ANNOUNCE rename to dll/3rdparty/libpng/docs/ANNOUNCE diff --git a/reactos/dll/3rdparty/libpng/docs/CHANGES b/dll/3rdparty/libpng/docs/CHANGES similarity index 100% rename from reactos/dll/3rdparty/libpng/docs/CHANGES rename to dll/3rdparty/libpng/docs/CHANGES diff --git a/reactos/dll/3rdparty/libpng/docs/INSTALL b/dll/3rdparty/libpng/docs/INSTALL similarity index 100% rename from reactos/dll/3rdparty/libpng/docs/INSTALL rename to dll/3rdparty/libpng/docs/INSTALL diff --git a/reactos/dll/3rdparty/libpng/docs/LICENSE b/dll/3rdparty/libpng/docs/LICENSE similarity index 100% rename from reactos/dll/3rdparty/libpng/docs/LICENSE rename to dll/3rdparty/libpng/docs/LICENSE diff --git a/reactos/dll/3rdparty/libpng/docs/README b/dll/3rdparty/libpng/docs/README similarity index 100% rename from reactos/dll/3rdparty/libpng/docs/README rename to dll/3rdparty/libpng/docs/README diff --git a/reactos/dll/3rdparty/libpng/docs/TODO b/dll/3rdparty/libpng/docs/TODO similarity index 100% rename from reactos/dll/3rdparty/libpng/docs/TODO rename to dll/3rdparty/libpng/docs/TODO diff --git a/reactos/dll/3rdparty/libpng/docs/example.c b/dll/3rdparty/libpng/docs/example.c similarity index 100% rename from reactos/dll/3rdparty/libpng/docs/example.c rename to dll/3rdparty/libpng/docs/example.c diff --git a/reactos/dll/3rdparty/libpng/docs/libpng-1.4.3.txt b/dll/3rdparty/libpng/docs/libpng-1.4.3.txt similarity index 100% rename from reactos/dll/3rdparty/libpng/docs/libpng-1.4.3.txt rename to dll/3rdparty/libpng/docs/libpng-1.4.3.txt diff --git a/reactos/dll/3rdparty/libpng/docs/libpng-manual.txt b/dll/3rdparty/libpng/docs/libpng-manual.txt similarity index 100% rename from reactos/dll/3rdparty/libpng/docs/libpng-manual.txt rename to dll/3rdparty/libpng/docs/libpng-manual.txt diff --git a/reactos/dll/3rdparty/libpng/libpng.rbuild b/dll/3rdparty/libpng/libpng.rbuild similarity index 100% rename from reactos/dll/3rdparty/libpng/libpng.rbuild rename to dll/3rdparty/libpng/libpng.rbuild diff --git a/reactos/dll/3rdparty/libpng/new_push_process_row.c b/dll/3rdparty/libpng/new_push_process_row.c similarity index 100% rename from reactos/dll/3rdparty/libpng/new_push_process_row.c rename to dll/3rdparty/libpng/new_push_process_row.c diff --git a/reactos/dll/3rdparty/libpng/png.c b/dll/3rdparty/libpng/png.c similarity index 100% rename from reactos/dll/3rdparty/libpng/png.c rename to dll/3rdparty/libpng/png.c diff --git a/reactos/dll/3rdparty/libpng/pngerror.c b/dll/3rdparty/libpng/pngerror.c similarity index 100% rename from reactos/dll/3rdparty/libpng/pngerror.c rename to dll/3rdparty/libpng/pngerror.c diff --git a/reactos/dll/3rdparty/libpng/pngget.c b/dll/3rdparty/libpng/pngget.c similarity index 100% rename from reactos/dll/3rdparty/libpng/pngget.c rename to dll/3rdparty/libpng/pngget.c diff --git a/reactos/dll/3rdparty/libpng/pngmem.c b/dll/3rdparty/libpng/pngmem.c similarity index 100% rename from reactos/dll/3rdparty/libpng/pngmem.c rename to dll/3rdparty/libpng/pngmem.c diff --git a/reactos/dll/3rdparty/libpng/pngpread.c b/dll/3rdparty/libpng/pngpread.c similarity index 100% rename from reactos/dll/3rdparty/libpng/pngpread.c rename to dll/3rdparty/libpng/pngpread.c diff --git a/reactos/dll/3rdparty/libpng/pngread.c b/dll/3rdparty/libpng/pngread.c similarity index 100% rename from reactos/dll/3rdparty/libpng/pngread.c rename to dll/3rdparty/libpng/pngread.c diff --git a/reactos/dll/3rdparty/libpng/pngrio.c b/dll/3rdparty/libpng/pngrio.c similarity index 100% rename from reactos/dll/3rdparty/libpng/pngrio.c rename to dll/3rdparty/libpng/pngrio.c diff --git a/reactos/dll/3rdparty/libpng/pngrtran.c b/dll/3rdparty/libpng/pngrtran.c similarity index 100% rename from reactos/dll/3rdparty/libpng/pngrtran.c rename to dll/3rdparty/libpng/pngrtran.c diff --git a/reactos/dll/3rdparty/libpng/pngrutil.c b/dll/3rdparty/libpng/pngrutil.c similarity index 100% rename from reactos/dll/3rdparty/libpng/pngrutil.c rename to dll/3rdparty/libpng/pngrutil.c diff --git a/reactos/dll/3rdparty/libpng/pngset.c b/dll/3rdparty/libpng/pngset.c similarity index 100% rename from reactos/dll/3rdparty/libpng/pngset.c rename to dll/3rdparty/libpng/pngset.c diff --git a/reactos/dll/3rdparty/libpng/pngtest.c b/dll/3rdparty/libpng/pngtest.c similarity index 100% rename from reactos/dll/3rdparty/libpng/pngtest.c rename to dll/3rdparty/libpng/pngtest.c diff --git a/reactos/dll/3rdparty/libpng/pngtrans.c b/dll/3rdparty/libpng/pngtrans.c similarity index 100% rename from reactos/dll/3rdparty/libpng/pngtrans.c rename to dll/3rdparty/libpng/pngtrans.c diff --git a/reactos/dll/3rdparty/libpng/pngwio.c b/dll/3rdparty/libpng/pngwio.c similarity index 100% rename from reactos/dll/3rdparty/libpng/pngwio.c rename to dll/3rdparty/libpng/pngwio.c diff --git a/reactos/dll/3rdparty/libpng/pngwrite.c b/dll/3rdparty/libpng/pngwrite.c similarity index 100% rename from reactos/dll/3rdparty/libpng/pngwrite.c rename to dll/3rdparty/libpng/pngwrite.c diff --git a/reactos/dll/3rdparty/libpng/pngwtran.c b/dll/3rdparty/libpng/pngwtran.c similarity index 100% rename from reactos/dll/3rdparty/libpng/pngwtran.c rename to dll/3rdparty/libpng/pngwtran.c diff --git a/reactos/dll/3rdparty/libpng/pngwutil.c b/dll/3rdparty/libpng/pngwutil.c similarity index 100% rename from reactos/dll/3rdparty/libpng/pngwutil.c rename to dll/3rdparty/libpng/pngwutil.c diff --git a/reactos/dll/3rdparty/libtiff/CMakeLists.txt b/dll/3rdparty/libtiff/CMakeLists.txt similarity index 100% rename from reactos/dll/3rdparty/libtiff/CMakeLists.txt rename to dll/3rdparty/libtiff/CMakeLists.txt diff --git a/reactos/dll/3rdparty/libtiff/libtiff.def b/dll/3rdparty/libtiff/libtiff.def similarity index 100% rename from reactos/dll/3rdparty/libtiff/libtiff.def rename to dll/3rdparty/libtiff/libtiff.def diff --git a/reactos/dll/3rdparty/libtiff/libtiff.rbuild b/dll/3rdparty/libtiff/libtiff.rbuild similarity index 100% rename from reactos/dll/3rdparty/libtiff/libtiff.rbuild rename to dll/3rdparty/libtiff/libtiff.rbuild diff --git a/reactos/dll/3rdparty/libtiff/mkg3states.c b/dll/3rdparty/libtiff/mkg3states.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/mkg3states.c rename to dll/3rdparty/libtiff/mkg3states.c diff --git a/reactos/dll/3rdparty/libtiff/rosdiff.patch b/dll/3rdparty/libtiff/rosdiff.patch similarity index 100% rename from reactos/dll/3rdparty/libtiff/rosdiff.patch rename to dll/3rdparty/libtiff/rosdiff.patch diff --git a/reactos/dll/3rdparty/libtiff/tif_aux.c b/dll/3rdparty/libtiff/tif_aux.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_aux.c rename to dll/3rdparty/libtiff/tif_aux.c diff --git a/reactos/dll/3rdparty/libtiff/tif_close.c b/dll/3rdparty/libtiff/tif_close.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_close.c rename to dll/3rdparty/libtiff/tif_close.c diff --git a/reactos/dll/3rdparty/libtiff/tif_codec.c b/dll/3rdparty/libtiff/tif_codec.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_codec.c rename to dll/3rdparty/libtiff/tif_codec.c diff --git a/reactos/dll/3rdparty/libtiff/tif_color.c b/dll/3rdparty/libtiff/tif_color.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_color.c rename to dll/3rdparty/libtiff/tif_color.c diff --git a/reactos/dll/3rdparty/libtiff/tif_compress.c b/dll/3rdparty/libtiff/tif_compress.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_compress.c rename to dll/3rdparty/libtiff/tif_compress.c diff --git a/reactos/dll/3rdparty/libtiff/tif_dir.c b/dll/3rdparty/libtiff/tif_dir.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_dir.c rename to dll/3rdparty/libtiff/tif_dir.c diff --git a/reactos/dll/3rdparty/libtiff/tif_dirinfo.c b/dll/3rdparty/libtiff/tif_dirinfo.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_dirinfo.c rename to dll/3rdparty/libtiff/tif_dirinfo.c diff --git a/reactos/dll/3rdparty/libtiff/tif_dirread.c b/dll/3rdparty/libtiff/tif_dirread.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_dirread.c rename to dll/3rdparty/libtiff/tif_dirread.c diff --git a/reactos/dll/3rdparty/libtiff/tif_dirwrite.c b/dll/3rdparty/libtiff/tif_dirwrite.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_dirwrite.c rename to dll/3rdparty/libtiff/tif_dirwrite.c diff --git a/reactos/dll/3rdparty/libtiff/tif_dumpmode.c b/dll/3rdparty/libtiff/tif_dumpmode.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_dumpmode.c rename to dll/3rdparty/libtiff/tif_dumpmode.c diff --git a/reactos/dll/3rdparty/libtiff/tif_error.c b/dll/3rdparty/libtiff/tif_error.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_error.c rename to dll/3rdparty/libtiff/tif_error.c diff --git a/reactos/dll/3rdparty/libtiff/tif_extension.c b/dll/3rdparty/libtiff/tif_extension.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_extension.c rename to dll/3rdparty/libtiff/tif_extension.c diff --git a/reactos/dll/3rdparty/libtiff/tif_fax3.c b/dll/3rdparty/libtiff/tif_fax3.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_fax3.c rename to dll/3rdparty/libtiff/tif_fax3.c diff --git a/reactos/dll/3rdparty/libtiff/tif_fax3sm.c b/dll/3rdparty/libtiff/tif_fax3sm.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_fax3sm.c rename to dll/3rdparty/libtiff/tif_fax3sm.c diff --git a/reactos/dll/3rdparty/libtiff/tif_flush.c b/dll/3rdparty/libtiff/tif_flush.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_flush.c rename to dll/3rdparty/libtiff/tif_flush.c diff --git a/reactos/dll/3rdparty/libtiff/tif_getimage.c b/dll/3rdparty/libtiff/tif_getimage.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_getimage.c rename to dll/3rdparty/libtiff/tif_getimage.c diff --git a/reactos/dll/3rdparty/libtiff/tif_jbig.c b/dll/3rdparty/libtiff/tif_jbig.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_jbig.c rename to dll/3rdparty/libtiff/tif_jbig.c diff --git a/reactos/dll/3rdparty/libtiff/tif_jpeg.c b/dll/3rdparty/libtiff/tif_jpeg.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_jpeg.c rename to dll/3rdparty/libtiff/tif_jpeg.c diff --git a/reactos/dll/3rdparty/libtiff/tif_luv.c b/dll/3rdparty/libtiff/tif_luv.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_luv.c rename to dll/3rdparty/libtiff/tif_luv.c diff --git a/reactos/dll/3rdparty/libtiff/tif_lzw.c b/dll/3rdparty/libtiff/tif_lzw.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_lzw.c rename to dll/3rdparty/libtiff/tif_lzw.c diff --git a/reactos/dll/3rdparty/libtiff/tif_next.c b/dll/3rdparty/libtiff/tif_next.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_next.c rename to dll/3rdparty/libtiff/tif_next.c diff --git a/reactos/dll/3rdparty/libtiff/tif_ojpeg.c b/dll/3rdparty/libtiff/tif_ojpeg.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_ojpeg.c rename to dll/3rdparty/libtiff/tif_ojpeg.c diff --git a/reactos/dll/3rdparty/libtiff/tif_open.c b/dll/3rdparty/libtiff/tif_open.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_open.c rename to dll/3rdparty/libtiff/tif_open.c diff --git a/reactos/dll/3rdparty/libtiff/tif_packbits.c b/dll/3rdparty/libtiff/tif_packbits.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_packbits.c rename to dll/3rdparty/libtiff/tif_packbits.c diff --git a/reactos/dll/3rdparty/libtiff/tif_pixarlog.c b/dll/3rdparty/libtiff/tif_pixarlog.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_pixarlog.c rename to dll/3rdparty/libtiff/tif_pixarlog.c diff --git a/reactos/dll/3rdparty/libtiff/tif_predict.c b/dll/3rdparty/libtiff/tif_predict.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_predict.c rename to dll/3rdparty/libtiff/tif_predict.c diff --git a/reactos/dll/3rdparty/libtiff/tif_print.c b/dll/3rdparty/libtiff/tif_print.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_print.c rename to dll/3rdparty/libtiff/tif_print.c diff --git a/reactos/dll/3rdparty/libtiff/tif_read.c b/dll/3rdparty/libtiff/tif_read.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_read.c rename to dll/3rdparty/libtiff/tif_read.c diff --git a/reactos/dll/3rdparty/libtiff/tif_strip.c b/dll/3rdparty/libtiff/tif_strip.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_strip.c rename to dll/3rdparty/libtiff/tif_strip.c diff --git a/reactos/dll/3rdparty/libtiff/tif_swab.c b/dll/3rdparty/libtiff/tif_swab.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_swab.c rename to dll/3rdparty/libtiff/tif_swab.c diff --git a/reactos/dll/3rdparty/libtiff/tif_thunder.c b/dll/3rdparty/libtiff/tif_thunder.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_thunder.c rename to dll/3rdparty/libtiff/tif_thunder.c diff --git a/reactos/dll/3rdparty/libtiff/tif_tile.c b/dll/3rdparty/libtiff/tif_tile.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_tile.c rename to dll/3rdparty/libtiff/tif_tile.c diff --git a/reactos/dll/3rdparty/libtiff/tif_version.c b/dll/3rdparty/libtiff/tif_version.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_version.c rename to dll/3rdparty/libtiff/tif_version.c diff --git a/reactos/dll/3rdparty/libtiff/tif_warning.c b/dll/3rdparty/libtiff/tif_warning.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_warning.c rename to dll/3rdparty/libtiff/tif_warning.c diff --git a/reactos/dll/3rdparty/libtiff/tif_win32.c b/dll/3rdparty/libtiff/tif_win32.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_win32.c rename to dll/3rdparty/libtiff/tif_win32.c diff --git a/reactos/dll/3rdparty/libtiff/tif_write.c b/dll/3rdparty/libtiff/tif_write.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_write.c rename to dll/3rdparty/libtiff/tif_write.c diff --git a/reactos/dll/3rdparty/libtiff/tif_zip.c b/dll/3rdparty/libtiff/tif_zip.c similarity index 100% rename from reactos/dll/3rdparty/libtiff/tif_zip.c rename to dll/3rdparty/libtiff/tif_zip.c diff --git a/reactos/dll/3rdparty/libxslt/AUTHORS b/dll/3rdparty/libxslt/AUTHORS similarity index 100% rename from reactos/dll/3rdparty/libxslt/AUTHORS rename to dll/3rdparty/libxslt/AUTHORS diff --git a/reactos/dll/3rdparty/libxslt/CMakeLists.txt b/dll/3rdparty/libxslt/CMakeLists.txt similarity index 100% rename from reactos/dll/3rdparty/libxslt/CMakeLists.txt rename to dll/3rdparty/libxslt/CMakeLists.txt diff --git a/reactos/dll/3rdparty/libxslt/COPYING b/dll/3rdparty/libxslt/COPYING similarity index 100% rename from reactos/dll/3rdparty/libxslt/COPYING rename to dll/3rdparty/libxslt/COPYING diff --git a/reactos/dll/3rdparty/libxslt/ChangeLog b/dll/3rdparty/libxslt/ChangeLog similarity index 100% rename from reactos/dll/3rdparty/libxslt/ChangeLog rename to dll/3rdparty/libxslt/ChangeLog diff --git a/reactos/dll/3rdparty/libxslt/Makefile.am b/dll/3rdparty/libxslt/Makefile.am similarity index 100% rename from reactos/dll/3rdparty/libxslt/Makefile.am rename to dll/3rdparty/libxslt/Makefile.am diff --git a/reactos/dll/3rdparty/libxslt/Makefile.in b/dll/3rdparty/libxslt/Makefile.in similarity index 100% rename from reactos/dll/3rdparty/libxslt/Makefile.in rename to dll/3rdparty/libxslt/Makefile.in diff --git a/reactos/dll/3rdparty/libxslt/NEWS b/dll/3rdparty/libxslt/NEWS similarity index 100% rename from reactos/dll/3rdparty/libxslt/NEWS rename to dll/3rdparty/libxslt/NEWS diff --git a/reactos/dll/3rdparty/libxslt/README b/dll/3rdparty/libxslt/README similarity index 100% rename from reactos/dll/3rdparty/libxslt/README rename to dll/3rdparty/libxslt/README diff --git a/reactos/dll/3rdparty/libxslt/attributes.c b/dll/3rdparty/libxslt/attributes.c similarity index 100% rename from reactos/dll/3rdparty/libxslt/attributes.c rename to dll/3rdparty/libxslt/attributes.c diff --git a/reactos/dll/3rdparty/libxslt/attributes.h b/dll/3rdparty/libxslt/attributes.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/attributes.h rename to dll/3rdparty/libxslt/attributes.h diff --git a/reactos/dll/3rdparty/libxslt/attrvt.c b/dll/3rdparty/libxslt/attrvt.c similarity index 100% rename from reactos/dll/3rdparty/libxslt/attrvt.c rename to dll/3rdparty/libxslt/attrvt.c diff --git a/reactos/dll/3rdparty/libxslt/config.h b/dll/3rdparty/libxslt/config.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/config.h rename to dll/3rdparty/libxslt/config.h diff --git a/reactos/dll/3rdparty/libxslt/documents.c b/dll/3rdparty/libxslt/documents.c similarity index 100% rename from reactos/dll/3rdparty/libxslt/documents.c rename to dll/3rdparty/libxslt/documents.c diff --git a/reactos/dll/3rdparty/libxslt/documents.h b/dll/3rdparty/libxslt/documents.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/documents.h rename to dll/3rdparty/libxslt/documents.h diff --git a/reactos/dll/3rdparty/libxslt/extensions.c b/dll/3rdparty/libxslt/extensions.c similarity index 100% rename from reactos/dll/3rdparty/libxslt/extensions.c rename to dll/3rdparty/libxslt/extensions.c diff --git a/reactos/dll/3rdparty/libxslt/extensions.h b/dll/3rdparty/libxslt/extensions.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/extensions.h rename to dll/3rdparty/libxslt/extensions.h diff --git a/reactos/dll/3rdparty/libxslt/extra.c b/dll/3rdparty/libxslt/extra.c similarity index 100% rename from reactos/dll/3rdparty/libxslt/extra.c rename to dll/3rdparty/libxslt/extra.c diff --git a/reactos/dll/3rdparty/libxslt/extra.h b/dll/3rdparty/libxslt/extra.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/extra.h rename to dll/3rdparty/libxslt/extra.h diff --git a/reactos/dll/3rdparty/libxslt/functions.c b/dll/3rdparty/libxslt/functions.c similarity index 100% rename from reactos/dll/3rdparty/libxslt/functions.c rename to dll/3rdparty/libxslt/functions.c diff --git a/reactos/dll/3rdparty/libxslt/functions.h b/dll/3rdparty/libxslt/functions.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/functions.h rename to dll/3rdparty/libxslt/functions.h diff --git a/reactos/dll/3rdparty/libxslt/imports.c b/dll/3rdparty/libxslt/imports.c similarity index 100% rename from reactos/dll/3rdparty/libxslt/imports.c rename to dll/3rdparty/libxslt/imports.c diff --git a/reactos/dll/3rdparty/libxslt/imports.h b/dll/3rdparty/libxslt/imports.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/imports.h rename to dll/3rdparty/libxslt/imports.h diff --git a/reactos/dll/3rdparty/libxslt/keys.c b/dll/3rdparty/libxslt/keys.c similarity index 100% rename from reactos/dll/3rdparty/libxslt/keys.c rename to dll/3rdparty/libxslt/keys.c diff --git a/reactos/dll/3rdparty/libxslt/keys.h b/dll/3rdparty/libxslt/keys.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/keys.h rename to dll/3rdparty/libxslt/keys.h diff --git a/reactos/dll/3rdparty/libxslt/libxslt.3 b/dll/3rdparty/libxslt/libxslt.3 similarity index 100% rename from reactos/dll/3rdparty/libxslt/libxslt.3 rename to dll/3rdparty/libxslt/libxslt.3 diff --git a/reactos/dll/3rdparty/libxslt/libxslt.h b/dll/3rdparty/libxslt/libxslt.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/libxslt.h rename to dll/3rdparty/libxslt/libxslt.h diff --git a/reactos/dll/3rdparty/libxslt/libxslt.rbuild b/dll/3rdparty/libxslt/libxslt.rbuild similarity index 100% rename from reactos/dll/3rdparty/libxslt/libxslt.rbuild rename to dll/3rdparty/libxslt/libxslt.rbuild diff --git a/reactos/dll/3rdparty/libxslt/namespaces.c b/dll/3rdparty/libxslt/namespaces.c similarity index 100% rename from reactos/dll/3rdparty/libxslt/namespaces.c rename to dll/3rdparty/libxslt/namespaces.c diff --git a/reactos/dll/3rdparty/libxslt/namespaces.h b/dll/3rdparty/libxslt/namespaces.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/namespaces.h rename to dll/3rdparty/libxslt/namespaces.h diff --git a/reactos/dll/3rdparty/libxslt/numbers.c b/dll/3rdparty/libxslt/numbers.c similarity index 100% rename from reactos/dll/3rdparty/libxslt/numbers.c rename to dll/3rdparty/libxslt/numbers.c diff --git a/reactos/dll/3rdparty/libxslt/numbersInternals.h b/dll/3rdparty/libxslt/numbersInternals.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/numbersInternals.h rename to dll/3rdparty/libxslt/numbersInternals.h diff --git a/reactos/dll/3rdparty/libxslt/pattern.c b/dll/3rdparty/libxslt/pattern.c similarity index 100% rename from reactos/dll/3rdparty/libxslt/pattern.c rename to dll/3rdparty/libxslt/pattern.c diff --git a/reactos/dll/3rdparty/libxslt/pattern.h b/dll/3rdparty/libxslt/pattern.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/pattern.h rename to dll/3rdparty/libxslt/pattern.h diff --git a/reactos/dll/3rdparty/libxslt/preproc.c b/dll/3rdparty/libxslt/preproc.c similarity index 100% rename from reactos/dll/3rdparty/libxslt/preproc.c rename to dll/3rdparty/libxslt/preproc.c diff --git a/reactos/dll/3rdparty/libxslt/preproc.h b/dll/3rdparty/libxslt/preproc.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/preproc.h rename to dll/3rdparty/libxslt/preproc.h diff --git a/reactos/dll/3rdparty/libxslt/security.c b/dll/3rdparty/libxslt/security.c similarity index 100% rename from reactos/dll/3rdparty/libxslt/security.c rename to dll/3rdparty/libxslt/security.c diff --git a/reactos/dll/3rdparty/libxslt/security.h b/dll/3rdparty/libxslt/security.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/security.h rename to dll/3rdparty/libxslt/security.h diff --git a/reactos/dll/3rdparty/libxslt/templates.c b/dll/3rdparty/libxslt/templates.c similarity index 100% rename from reactos/dll/3rdparty/libxslt/templates.c rename to dll/3rdparty/libxslt/templates.c diff --git a/reactos/dll/3rdparty/libxslt/templates.h b/dll/3rdparty/libxslt/templates.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/templates.h rename to dll/3rdparty/libxslt/templates.h diff --git a/reactos/dll/3rdparty/libxslt/transform.c b/dll/3rdparty/libxslt/transform.c similarity index 100% rename from reactos/dll/3rdparty/libxslt/transform.c rename to dll/3rdparty/libxslt/transform.c diff --git a/reactos/dll/3rdparty/libxslt/transform.h b/dll/3rdparty/libxslt/transform.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/transform.h rename to dll/3rdparty/libxslt/transform.h diff --git a/reactos/dll/3rdparty/libxslt/trio.h b/dll/3rdparty/libxslt/trio.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/trio.h rename to dll/3rdparty/libxslt/trio.h diff --git a/reactos/dll/3rdparty/libxslt/triodef.h b/dll/3rdparty/libxslt/triodef.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/triodef.h rename to dll/3rdparty/libxslt/triodef.h diff --git a/reactos/dll/3rdparty/libxslt/variables.c b/dll/3rdparty/libxslt/variables.c similarity index 100% rename from reactos/dll/3rdparty/libxslt/variables.c rename to dll/3rdparty/libxslt/variables.c diff --git a/reactos/dll/3rdparty/libxslt/variables.h b/dll/3rdparty/libxslt/variables.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/variables.h rename to dll/3rdparty/libxslt/variables.h diff --git a/reactos/dll/3rdparty/libxslt/win32config.h b/dll/3rdparty/libxslt/win32config.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/win32config.h rename to dll/3rdparty/libxslt/win32config.h diff --git a/reactos/dll/3rdparty/libxslt/xslt.c b/dll/3rdparty/libxslt/xslt.c similarity index 100% rename from reactos/dll/3rdparty/libxslt/xslt.c rename to dll/3rdparty/libxslt/xslt.c diff --git a/reactos/dll/3rdparty/libxslt/xslt.h b/dll/3rdparty/libxslt/xslt.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/xslt.h rename to dll/3rdparty/libxslt/xslt.h diff --git a/reactos/dll/3rdparty/libxslt/xsltInternals.h b/dll/3rdparty/libxslt/xsltInternals.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/xsltInternals.h rename to dll/3rdparty/libxslt/xsltInternals.h diff --git a/reactos/dll/3rdparty/libxslt/xsltconfig.h b/dll/3rdparty/libxslt/xsltconfig.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/xsltconfig.h rename to dll/3rdparty/libxslt/xsltconfig.h diff --git a/reactos/dll/3rdparty/libxslt/xsltconfig.h.in b/dll/3rdparty/libxslt/xsltconfig.h.in similarity index 100% rename from reactos/dll/3rdparty/libxslt/xsltconfig.h.in rename to dll/3rdparty/libxslt/xsltconfig.h.in diff --git a/reactos/dll/3rdparty/libxslt/xsltexports.h b/dll/3rdparty/libxslt/xsltexports.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/xsltexports.h rename to dll/3rdparty/libxslt/xsltexports.h diff --git a/reactos/dll/3rdparty/libxslt/xsltlocale.c b/dll/3rdparty/libxslt/xsltlocale.c similarity index 100% rename from reactos/dll/3rdparty/libxslt/xsltlocale.c rename to dll/3rdparty/libxslt/xsltlocale.c diff --git a/reactos/dll/3rdparty/libxslt/xsltlocale.h b/dll/3rdparty/libxslt/xsltlocale.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/xsltlocale.h rename to dll/3rdparty/libxslt/xsltlocale.h diff --git a/reactos/dll/3rdparty/libxslt/xsltutils.c b/dll/3rdparty/libxslt/xsltutils.c similarity index 100% rename from reactos/dll/3rdparty/libxslt/xsltutils.c rename to dll/3rdparty/libxslt/xsltutils.c diff --git a/reactos/dll/3rdparty/libxslt/xsltutils.h b/dll/3rdparty/libxslt/xsltutils.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/xsltutils.h rename to dll/3rdparty/libxslt/xsltutils.h diff --git a/reactos/dll/3rdparty/libxslt/xsltwin32config.h b/dll/3rdparty/libxslt/xsltwin32config.h similarity index 100% rename from reactos/dll/3rdparty/libxslt/xsltwin32config.h rename to dll/3rdparty/libxslt/xsltwin32config.h diff --git a/reactos/dll/3rdparty/libxslt/xsltwin32config.h.in b/dll/3rdparty/libxslt/xsltwin32config.h.in similarity index 100% rename from reactos/dll/3rdparty/libxslt/xsltwin32config.h.in rename to dll/3rdparty/libxslt/xsltwin32config.h.in diff --git a/reactos/dll/3rdparty/mesa32/CMakeLists.txt b/dll/3rdparty/mesa32/CMakeLists.txt similarity index 100% rename from reactos/dll/3rdparty/mesa32/CMakeLists.txt rename to dll/3rdparty/mesa32/CMakeLists.txt diff --git a/reactos/dll/3rdparty/mesa32/include/GL/dmesa.h b/dll/3rdparty/mesa32/include/GL/dmesa.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/include/GL/dmesa.h rename to dll/3rdparty/mesa32/include/GL/dmesa.h diff --git a/reactos/dll/3rdparty/mesa32/include/GL/ggimesa.h b/dll/3rdparty/mesa32/include/GL/ggimesa.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/include/GL/ggimesa.h rename to dll/3rdparty/mesa32/include/GL/ggimesa.h diff --git a/reactos/dll/3rdparty/mesa32/include/GL/gl.h b/dll/3rdparty/mesa32/include/GL/gl.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/include/GL/gl.h rename to dll/3rdparty/mesa32/include/GL/gl.h diff --git a/reactos/dll/3rdparty/mesa32/include/GL/gl_mangle.h b/dll/3rdparty/mesa32/include/GL/gl_mangle.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/include/GL/gl_mangle.h rename to dll/3rdparty/mesa32/include/GL/gl_mangle.h diff --git a/reactos/dll/3rdparty/mesa32/include/GL/glext.h b/dll/3rdparty/mesa32/include/GL/glext.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/include/GL/glext.h rename to dll/3rdparty/mesa32/include/GL/glext.h diff --git a/reactos/dll/3rdparty/mesa32/include/GL/glfbdev.h b/dll/3rdparty/mesa32/include/GL/glfbdev.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/include/GL/glfbdev.h rename to dll/3rdparty/mesa32/include/GL/glfbdev.h diff --git a/reactos/dll/3rdparty/mesa32/include/GL/glu.h b/dll/3rdparty/mesa32/include/GL/glu.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/include/GL/glu.h rename to dll/3rdparty/mesa32/include/GL/glu.h diff --git a/reactos/dll/3rdparty/mesa32/include/GL/glu_mangle.h b/dll/3rdparty/mesa32/include/GL/glu_mangle.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/include/GL/glu_mangle.h rename to dll/3rdparty/mesa32/include/GL/glu_mangle.h diff --git a/reactos/dll/3rdparty/mesa32/include/GL/glx.h b/dll/3rdparty/mesa32/include/GL/glx.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/include/GL/glx.h rename to dll/3rdparty/mesa32/include/GL/glx.h diff --git a/reactos/dll/3rdparty/mesa32/include/GL/glx_mangle.h b/dll/3rdparty/mesa32/include/GL/glx_mangle.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/include/GL/glx_mangle.h rename to dll/3rdparty/mesa32/include/GL/glx_mangle.h diff --git a/reactos/dll/3rdparty/mesa32/include/GL/glxext.h b/dll/3rdparty/mesa32/include/GL/glxext.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/include/GL/glxext.h rename to dll/3rdparty/mesa32/include/GL/glxext.h diff --git a/reactos/dll/3rdparty/mesa32/include/GL/internal/dri_interface.h b/dll/3rdparty/mesa32/include/GL/internal/dri_interface.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/include/GL/internal/dri_interface.h rename to dll/3rdparty/mesa32/include/GL/internal/dri_interface.h diff --git a/reactos/dll/3rdparty/mesa32/include/GL/internal/glcore.h b/dll/3rdparty/mesa32/include/GL/internal/glcore.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/include/GL/internal/glcore.h rename to dll/3rdparty/mesa32/include/GL/internal/glcore.h diff --git a/reactos/dll/3rdparty/mesa32/include/GL/internal/sarea.h b/dll/3rdparty/mesa32/include/GL/internal/sarea.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/include/GL/internal/sarea.h rename to dll/3rdparty/mesa32/include/GL/internal/sarea.h diff --git a/reactos/dll/3rdparty/mesa32/include/GL/mesa_wgl.h b/dll/3rdparty/mesa32/include/GL/mesa_wgl.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/include/GL/mesa_wgl.h rename to dll/3rdparty/mesa32/include/GL/mesa_wgl.h diff --git a/reactos/dll/3rdparty/mesa32/include/GL/mglmesa.h b/dll/3rdparty/mesa32/include/GL/mglmesa.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/include/GL/mglmesa.h rename to dll/3rdparty/mesa32/include/GL/mglmesa.h diff --git a/reactos/dll/3rdparty/mesa32/include/GL/osmesa.h b/dll/3rdparty/mesa32/include/GL/osmesa.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/include/GL/osmesa.h rename to dll/3rdparty/mesa32/include/GL/osmesa.h diff --git a/reactos/dll/3rdparty/mesa32/include/GL/svgamesa.h b/dll/3rdparty/mesa32/include/GL/svgamesa.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/include/GL/svgamesa.h rename to dll/3rdparty/mesa32/include/GL/svgamesa.h diff --git a/reactos/dll/3rdparty/mesa32/include/GL/vms_x_fix.h b/dll/3rdparty/mesa32/include/GL/vms_x_fix.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/include/GL/vms_x_fix.h rename to dll/3rdparty/mesa32/include/GL/vms_x_fix.h diff --git a/reactos/dll/3rdparty/mesa32/include/GL/wmesa.h b/dll/3rdparty/mesa32/include/GL/wmesa.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/include/GL/wmesa.h rename to dll/3rdparty/mesa32/include/GL/wmesa.h diff --git a/reactos/dll/3rdparty/mesa32/include/GLView.h b/dll/3rdparty/mesa32/include/GLView.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/include/GLView.h rename to dll/3rdparty/mesa32/include/GLView.h diff --git a/reactos/dll/3rdparty/mesa32/mesa32.rbuild b/dll/3rdparty/mesa32/mesa32.rbuild similarity index 100% rename from reactos/dll/3rdparty/mesa32/mesa32.rbuild rename to dll/3rdparty/mesa32/mesa32.rbuild diff --git a/reactos/dll/3rdparty/mesa32/reactos.diff b/dll/3rdparty/mesa32/reactos.diff similarity index 100% rename from reactos/dll/3rdparty/mesa32/reactos.diff rename to dll/3rdparty/mesa32/reactos.diff diff --git a/reactos/dll/3rdparty/mesa32/src/Makefile b/dll/3rdparty/mesa32/src/Makefile similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/Makefile rename to dll/3rdparty/mesa32/src/Makefile diff --git a/reactos/dll/3rdparty/mesa32/src/Makefile.DJ b/dll/3rdparty/mesa32/src/Makefile.DJ similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/Makefile.DJ rename to dll/3rdparty/mesa32/src/Makefile.DJ diff --git a/reactos/dll/3rdparty/mesa32/src/Makefile.mgw b/dll/3rdparty/mesa32/src/Makefile.mgw similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/Makefile.mgw rename to dll/3rdparty/mesa32/src/Makefile.mgw diff --git a/reactos/dll/3rdparty/mesa32/src/depend b/dll/3rdparty/mesa32/src/depend similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/depend rename to dll/3rdparty/mesa32/src/depend diff --git a/reactos/dll/3rdparty/mesa32/src/descrip.mms b/dll/3rdparty/mesa32/src/descrip.mms similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/descrip.mms rename to dll/3rdparty/mesa32/src/descrip.mms diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/common/descrip.mms b/dll/3rdparty/mesa32/src/drivers/common/descrip.mms similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/common/descrip.mms rename to dll/3rdparty/mesa32/src/drivers/common/descrip.mms diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/common/driverfuncs.c b/dll/3rdparty/mesa32/src/drivers/common/driverfuncs.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/common/driverfuncs.c rename to dll/3rdparty/mesa32/src/drivers/common/driverfuncs.c diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/common/driverfuncs.h b/dll/3rdparty/mesa32/src/drivers/common/driverfuncs.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/common/driverfuncs.h rename to dll/3rdparty/mesa32/src/drivers/common/driverfuncs.h diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/common/sources b/dll/3rdparty/mesa32/src/drivers/common/sources similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/common/sources rename to dll/3rdparty/mesa32/src/drivers/common/sources diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/fx/fxopengl.def b/dll/3rdparty/mesa32/src/drivers/windows/fx/fxopengl.def similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/fx/fxopengl.def rename to dll/3rdparty/mesa32/src/drivers/windows/fx/fxopengl.def diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/fx/fxwgl.c b/dll/3rdparty/mesa32/src/drivers/windows/fx/fxwgl.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/fx/fxwgl.c rename to dll/3rdparty/mesa32/src/drivers/windows/fx/fxwgl.c diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gdi/colors.h b/dll/3rdparty/mesa32/src/drivers/windows/gdi/colors.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gdi/colors.h rename to dll/3rdparty/mesa32/src/drivers/windows/gdi/colors.h diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gdi/mesa.def b/dll/3rdparty/mesa32/src/drivers/windows/gdi/mesa.def similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gdi/mesa.def rename to dll/3rdparty/mesa32/src/drivers/windows/gdi/mesa.def diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gdi/wgl.c b/dll/3rdparty/mesa32/src/drivers/windows/gdi/wgl.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gdi/wgl.c rename to dll/3rdparty/mesa32/src/drivers/windows/gdi/wgl.c diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gdi/wmesa.c b/dll/3rdparty/mesa32/src/drivers/windows/gdi/wmesa.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gdi/wmesa.c rename to dll/3rdparty/mesa32/src/drivers/windows/gdi/wmesa.c diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gdi/wmesadef.h b/dll/3rdparty/mesa32/src/drivers/windows/gdi/wmesadef.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gdi/wmesadef.h rename to dll/3rdparty/mesa32/src/drivers/windows/gdi/wmesadef.h diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/ddlog.c b/dll/3rdparty/mesa32/src/drivers/windows/gldirect/ddlog.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/ddlog.c rename to dll/3rdparty/mesa32/src/drivers/windows/gldirect/ddlog.c diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/ddlog.h b/dll/3rdparty/mesa32/src/drivers/windows/gldirect/ddlog.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/ddlog.h rename to dll/3rdparty/mesa32/src/drivers/windows/gldirect/ddlog.h diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglcontext.c b/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglcontext.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglcontext.c rename to dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglcontext.c diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglcontext.h b/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglcontext.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglcontext.h rename to dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglcontext.h diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglglobals.c b/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglglobals.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglglobals.c rename to dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglglobals.c diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglglobals.h b/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglglobals.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglglobals.h rename to dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglglobals.h diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglmacros.h b/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglmacros.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglmacros.h rename to dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglmacros.h diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglpf.c b/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglpf.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglpf.c rename to dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglpf.c diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglpf.h b/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglpf.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglpf.h rename to dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglpf.h diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglwgl.c b/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglwgl.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglwgl.c rename to dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglwgl.c diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglwgl.h b/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglwgl.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglwgl.h rename to dll/3rdparty/mesa32/src/drivers/windows/gldirect/dglwgl.h diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dll_main.c b/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dll_main.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dll_main.c rename to dll/3rdparty/mesa32/src/drivers/windows/gldirect/dll_main.c diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dllmain.h b/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dllmain.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/dllmain.h rename to dll/3rdparty/mesa32/src/drivers/windows/gldirect/dllmain.h diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/gld_debug_clip.c b/dll/3rdparty/mesa32/src/drivers/windows/gldirect/gld_debug_clip.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/gld_debug_clip.c rename to dll/3rdparty/mesa32/src/drivers/windows/gldirect/gld_debug_clip.c diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/gld_debug_norm.c b/dll/3rdparty/mesa32/src/drivers/windows/gldirect/gld_debug_norm.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/gld_debug_norm.c rename to dll/3rdparty/mesa32/src/drivers/windows/gldirect/gld_debug_norm.c diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/gld_debug_xform.c b/dll/3rdparty/mesa32/src/drivers/windows/gldirect/gld_debug_xform.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/gld_debug_xform.c rename to dll/3rdparty/mesa32/src/drivers/windows/gldirect/gld_debug_xform.c diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/gld_dispatch.c b/dll/3rdparty/mesa32/src/drivers/windows/gldirect/gld_dispatch.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/gld_dispatch.c rename to dll/3rdparty/mesa32/src/drivers/windows/gldirect/gld_dispatch.c diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/gld_driver.c b/dll/3rdparty/mesa32/src/drivers/windows/gldirect/gld_driver.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/gld_driver.c rename to dll/3rdparty/mesa32/src/drivers/windows/gldirect/gld_driver.c diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/gld_driver.h b/dll/3rdparty/mesa32/src/drivers/windows/gldirect/gld_driver.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/gld_driver.h rename to dll/3rdparty/mesa32/src/drivers/windows/gldirect/gld_driver.h diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/gldlame8.c b/dll/3rdparty/mesa32/src/drivers/windows/gldirect/gldlame8.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/gldlame8.c rename to dll/3rdparty/mesa32/src/drivers/windows/gldirect/gldlame8.c diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/opengl32.def b/dll/3rdparty/mesa32/src/drivers/windows/gldirect/opengl32.def similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/opengl32.def rename to dll/3rdparty/mesa32/src/drivers/windows/gldirect/opengl32.def diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/pixpack.h b/dll/3rdparty/mesa32/src/drivers/windows/gldirect/pixpack.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/gldirect/pixpack.h rename to dll/3rdparty/mesa32/src/drivers/windows/gldirect/pixpack.h diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/icd/icd.c b/dll/3rdparty/mesa32/src/drivers/windows/icd/icd.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/icd/icd.c rename to dll/3rdparty/mesa32/src/drivers/windows/icd/icd.c diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/icd/icdlist.h b/dll/3rdparty/mesa32/src/drivers/windows/icd/icdlist.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/icd/icdlist.h rename to dll/3rdparty/mesa32/src/drivers/windows/icd/icdlist.h diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/icd/mesa.def b/dll/3rdparty/mesa32/src/drivers/windows/icd/mesa.def similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/drivers/windows/icd/mesa.def rename to dll/3rdparty/mesa32/src/drivers/windows/icd/mesa.def diff --git a/reactos/dll/3rdparty/mesa32/src/glapi/descrip.mms b/dll/3rdparty/mesa32/src/glapi/descrip.mms similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/glapi/descrip.mms rename to dll/3rdparty/mesa32/src/glapi/descrip.mms diff --git a/reactos/dll/3rdparty/mesa32/src/glapi/dispatch.h b/dll/3rdparty/mesa32/src/glapi/dispatch.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/glapi/dispatch.h rename to dll/3rdparty/mesa32/src/glapi/dispatch.h diff --git a/reactos/dll/3rdparty/mesa32/src/glapi/glapi.c b/dll/3rdparty/mesa32/src/glapi/glapi.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/glapi/glapi.c rename to dll/3rdparty/mesa32/src/glapi/glapi.c diff --git a/reactos/dll/3rdparty/mesa32/src/glapi/glapi.h b/dll/3rdparty/mesa32/src/glapi/glapi.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/glapi/glapi.h rename to dll/3rdparty/mesa32/src/glapi/glapi.h diff --git a/reactos/dll/3rdparty/mesa32/src/glapi/glapi_getproc.c b/dll/3rdparty/mesa32/src/glapi/glapi_getproc.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/glapi/glapi_getproc.c rename to dll/3rdparty/mesa32/src/glapi/glapi_getproc.c diff --git a/reactos/dll/3rdparty/mesa32/src/glapi/glapioffsets.h b/dll/3rdparty/mesa32/src/glapi/glapioffsets.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/glapi/glapioffsets.h rename to dll/3rdparty/mesa32/src/glapi/glapioffsets.h diff --git a/reactos/dll/3rdparty/mesa32/src/glapi/glapitable.h b/dll/3rdparty/mesa32/src/glapi/glapitable.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/glapi/glapitable.h rename to dll/3rdparty/mesa32/src/glapi/glapitable.h diff --git a/reactos/dll/3rdparty/mesa32/src/glapi/glapitemp.h b/dll/3rdparty/mesa32/src/glapi/glapitemp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/glapi/glapitemp.h rename to dll/3rdparty/mesa32/src/glapi/glapitemp.h diff --git a/reactos/dll/3rdparty/mesa32/src/glapi/glprocs.h b/dll/3rdparty/mesa32/src/glapi/glprocs.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/glapi/glprocs.h rename to dll/3rdparty/mesa32/src/glapi/glprocs.h diff --git a/reactos/dll/3rdparty/mesa32/src/glapi/glthread.c b/dll/3rdparty/mesa32/src/glapi/glthread.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/glapi/glthread.c rename to dll/3rdparty/mesa32/src/glapi/glthread.c diff --git a/reactos/dll/3rdparty/mesa32/src/glapi/glthread.h b/dll/3rdparty/mesa32/src/glapi/glthread.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/glapi/glthread.h rename to dll/3rdparty/mesa32/src/glapi/glthread.h diff --git a/reactos/dll/3rdparty/mesa32/src/glapi/sources b/dll/3rdparty/mesa32/src/glapi/sources similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/glapi/sources rename to dll/3rdparty/mesa32/src/glapi/sources diff --git a/reactos/dll/3rdparty/mesa32/src/main/accum.c b/dll/3rdparty/mesa32/src/main/accum.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/accum.c rename to dll/3rdparty/mesa32/src/main/accum.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/accum.h b/dll/3rdparty/mesa32/src/main/accum.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/accum.h rename to dll/3rdparty/mesa32/src/main/accum.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/api_arrayelt.c b/dll/3rdparty/mesa32/src/main/api_arrayelt.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/api_arrayelt.c rename to dll/3rdparty/mesa32/src/main/api_arrayelt.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/api_arrayelt.h b/dll/3rdparty/mesa32/src/main/api_arrayelt.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/api_arrayelt.h rename to dll/3rdparty/mesa32/src/main/api_arrayelt.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/api_eval.h b/dll/3rdparty/mesa32/src/main/api_eval.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/api_eval.h rename to dll/3rdparty/mesa32/src/main/api_eval.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/api_exec.c b/dll/3rdparty/mesa32/src/main/api_exec.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/api_exec.c rename to dll/3rdparty/mesa32/src/main/api_exec.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/api_exec.h b/dll/3rdparty/mesa32/src/main/api_exec.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/api_exec.h rename to dll/3rdparty/mesa32/src/main/api_exec.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/api_loopback.c b/dll/3rdparty/mesa32/src/main/api_loopback.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/api_loopback.c rename to dll/3rdparty/mesa32/src/main/api_loopback.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/api_loopback.h b/dll/3rdparty/mesa32/src/main/api_loopback.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/api_loopback.h rename to dll/3rdparty/mesa32/src/main/api_loopback.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/api_noop.c b/dll/3rdparty/mesa32/src/main/api_noop.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/api_noop.c rename to dll/3rdparty/mesa32/src/main/api_noop.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/api_noop.h b/dll/3rdparty/mesa32/src/main/api_noop.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/api_noop.h rename to dll/3rdparty/mesa32/src/main/api_noop.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/api_validate.c b/dll/3rdparty/mesa32/src/main/api_validate.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/api_validate.c rename to dll/3rdparty/mesa32/src/main/api_validate.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/api_validate.h b/dll/3rdparty/mesa32/src/main/api_validate.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/api_validate.h rename to dll/3rdparty/mesa32/src/main/api_validate.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/arrayobj.c b/dll/3rdparty/mesa32/src/main/arrayobj.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/arrayobj.c rename to dll/3rdparty/mesa32/src/main/arrayobj.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/arrayobj.h b/dll/3rdparty/mesa32/src/main/arrayobj.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/arrayobj.h rename to dll/3rdparty/mesa32/src/main/arrayobj.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/attrib.c b/dll/3rdparty/mesa32/src/main/attrib.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/attrib.c rename to dll/3rdparty/mesa32/src/main/attrib.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/attrib.h b/dll/3rdparty/mesa32/src/main/attrib.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/attrib.h rename to dll/3rdparty/mesa32/src/main/attrib.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/bitset.h b/dll/3rdparty/mesa32/src/main/bitset.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/bitset.h rename to dll/3rdparty/mesa32/src/main/bitset.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/blend.c b/dll/3rdparty/mesa32/src/main/blend.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/blend.c rename to dll/3rdparty/mesa32/src/main/blend.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/blend.h b/dll/3rdparty/mesa32/src/main/blend.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/blend.h rename to dll/3rdparty/mesa32/src/main/blend.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/bufferobj.c b/dll/3rdparty/mesa32/src/main/bufferobj.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/bufferobj.c rename to dll/3rdparty/mesa32/src/main/bufferobj.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/bufferobj.h b/dll/3rdparty/mesa32/src/main/bufferobj.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/bufferobj.h rename to dll/3rdparty/mesa32/src/main/bufferobj.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/buffers.c b/dll/3rdparty/mesa32/src/main/buffers.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/buffers.c rename to dll/3rdparty/mesa32/src/main/buffers.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/buffers.h b/dll/3rdparty/mesa32/src/main/buffers.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/buffers.h rename to dll/3rdparty/mesa32/src/main/buffers.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/clear.c b/dll/3rdparty/mesa32/src/main/clear.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/clear.c rename to dll/3rdparty/mesa32/src/main/clear.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/clear.h b/dll/3rdparty/mesa32/src/main/clear.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/clear.h rename to dll/3rdparty/mesa32/src/main/clear.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/clip.c b/dll/3rdparty/mesa32/src/main/clip.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/clip.c rename to dll/3rdparty/mesa32/src/main/clip.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/clip.h b/dll/3rdparty/mesa32/src/main/clip.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/clip.h rename to dll/3rdparty/mesa32/src/main/clip.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/colormac.h b/dll/3rdparty/mesa32/src/main/colormac.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/colormac.h rename to dll/3rdparty/mesa32/src/main/colormac.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/colortab.c b/dll/3rdparty/mesa32/src/main/colortab.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/colortab.c rename to dll/3rdparty/mesa32/src/main/colortab.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/colortab.h b/dll/3rdparty/mesa32/src/main/colortab.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/colortab.h rename to dll/3rdparty/mesa32/src/main/colortab.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/config.h b/dll/3rdparty/mesa32/src/main/config.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/config.h rename to dll/3rdparty/mesa32/src/main/config.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/context.c b/dll/3rdparty/mesa32/src/main/context.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/context.c rename to dll/3rdparty/mesa32/src/main/context.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/context.h b/dll/3rdparty/mesa32/src/main/context.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/context.h rename to dll/3rdparty/mesa32/src/main/context.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/convolve.c b/dll/3rdparty/mesa32/src/main/convolve.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/convolve.c rename to dll/3rdparty/mesa32/src/main/convolve.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/convolve.h b/dll/3rdparty/mesa32/src/main/convolve.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/convolve.h rename to dll/3rdparty/mesa32/src/main/convolve.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/dd.h b/dll/3rdparty/mesa32/src/main/dd.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/dd.h rename to dll/3rdparty/mesa32/src/main/dd.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/debug.c b/dll/3rdparty/mesa32/src/main/debug.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/debug.c rename to dll/3rdparty/mesa32/src/main/debug.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/debug.h b/dll/3rdparty/mesa32/src/main/debug.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/debug.h rename to dll/3rdparty/mesa32/src/main/debug.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/depth.c b/dll/3rdparty/mesa32/src/main/depth.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/depth.c rename to dll/3rdparty/mesa32/src/main/depth.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/depth.h b/dll/3rdparty/mesa32/src/main/depth.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/depth.h rename to dll/3rdparty/mesa32/src/main/depth.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/depthstencil.c b/dll/3rdparty/mesa32/src/main/depthstencil.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/depthstencil.c rename to dll/3rdparty/mesa32/src/main/depthstencil.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/depthstencil.h b/dll/3rdparty/mesa32/src/main/depthstencil.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/depthstencil.h rename to dll/3rdparty/mesa32/src/main/depthstencil.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/descrip.mms b/dll/3rdparty/mesa32/src/main/descrip.mms similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/descrip.mms rename to dll/3rdparty/mesa32/src/main/descrip.mms diff --git a/reactos/dll/3rdparty/mesa32/src/main/dispatch.c b/dll/3rdparty/mesa32/src/main/dispatch.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/dispatch.c rename to dll/3rdparty/mesa32/src/main/dispatch.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/dlist.c b/dll/3rdparty/mesa32/src/main/dlist.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/dlist.c rename to dll/3rdparty/mesa32/src/main/dlist.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/dlist.h b/dll/3rdparty/mesa32/src/main/dlist.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/dlist.h rename to dll/3rdparty/mesa32/src/main/dlist.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/dlopen.c b/dll/3rdparty/mesa32/src/main/dlopen.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/dlopen.c rename to dll/3rdparty/mesa32/src/main/dlopen.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/dlopen.h b/dll/3rdparty/mesa32/src/main/dlopen.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/dlopen.h rename to dll/3rdparty/mesa32/src/main/dlopen.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/drawpix.c b/dll/3rdparty/mesa32/src/main/drawpix.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/drawpix.c rename to dll/3rdparty/mesa32/src/main/drawpix.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/drawpix.h b/dll/3rdparty/mesa32/src/main/drawpix.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/drawpix.h rename to dll/3rdparty/mesa32/src/main/drawpix.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/enable.c b/dll/3rdparty/mesa32/src/main/enable.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/enable.c rename to dll/3rdparty/mesa32/src/main/enable.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/enable.h b/dll/3rdparty/mesa32/src/main/enable.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/enable.h rename to dll/3rdparty/mesa32/src/main/enable.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/enums.c b/dll/3rdparty/mesa32/src/main/enums.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/enums.c rename to dll/3rdparty/mesa32/src/main/enums.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/enums.h b/dll/3rdparty/mesa32/src/main/enums.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/enums.h rename to dll/3rdparty/mesa32/src/main/enums.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/eval.c b/dll/3rdparty/mesa32/src/main/eval.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/eval.c rename to dll/3rdparty/mesa32/src/main/eval.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/eval.h b/dll/3rdparty/mesa32/src/main/eval.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/eval.h rename to dll/3rdparty/mesa32/src/main/eval.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/execmem.c b/dll/3rdparty/mesa32/src/main/execmem.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/execmem.c rename to dll/3rdparty/mesa32/src/main/execmem.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/extensions.c b/dll/3rdparty/mesa32/src/main/extensions.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/extensions.c rename to dll/3rdparty/mesa32/src/main/extensions.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/extensions.h b/dll/3rdparty/mesa32/src/main/extensions.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/extensions.h rename to dll/3rdparty/mesa32/src/main/extensions.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/fbobject.c b/dll/3rdparty/mesa32/src/main/fbobject.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/fbobject.c rename to dll/3rdparty/mesa32/src/main/fbobject.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/fbobject.h b/dll/3rdparty/mesa32/src/main/fbobject.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/fbobject.h rename to dll/3rdparty/mesa32/src/main/fbobject.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/feedback.c b/dll/3rdparty/mesa32/src/main/feedback.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/feedback.c rename to dll/3rdparty/mesa32/src/main/feedback.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/feedback.h b/dll/3rdparty/mesa32/src/main/feedback.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/feedback.h rename to dll/3rdparty/mesa32/src/main/feedback.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/ffvertex_prog.c b/dll/3rdparty/mesa32/src/main/ffvertex_prog.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/ffvertex_prog.c rename to dll/3rdparty/mesa32/src/main/ffvertex_prog.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/ffvertex_prog.h b/dll/3rdparty/mesa32/src/main/ffvertex_prog.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/ffvertex_prog.h rename to dll/3rdparty/mesa32/src/main/ffvertex_prog.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/fog.c b/dll/3rdparty/mesa32/src/main/fog.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/fog.c rename to dll/3rdparty/mesa32/src/main/fog.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/fog.h b/dll/3rdparty/mesa32/src/main/fog.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/fog.h rename to dll/3rdparty/mesa32/src/main/fog.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/framebuffer.c b/dll/3rdparty/mesa32/src/main/framebuffer.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/framebuffer.c rename to dll/3rdparty/mesa32/src/main/framebuffer.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/framebuffer.h b/dll/3rdparty/mesa32/src/main/framebuffer.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/framebuffer.h rename to dll/3rdparty/mesa32/src/main/framebuffer.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/get.c b/dll/3rdparty/mesa32/src/main/get.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/get.c rename to dll/3rdparty/mesa32/src/main/get.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/get.h b/dll/3rdparty/mesa32/src/main/get.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/get.h rename to dll/3rdparty/mesa32/src/main/get.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/getstring.c b/dll/3rdparty/mesa32/src/main/getstring.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/getstring.c rename to dll/3rdparty/mesa32/src/main/getstring.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/glheader.h b/dll/3rdparty/mesa32/src/main/glheader.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/glheader.h rename to dll/3rdparty/mesa32/src/main/glheader.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/hash.c b/dll/3rdparty/mesa32/src/main/hash.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/hash.c rename to dll/3rdparty/mesa32/src/main/hash.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/hash.h b/dll/3rdparty/mesa32/src/main/hash.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/hash.h rename to dll/3rdparty/mesa32/src/main/hash.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/hint.c b/dll/3rdparty/mesa32/src/main/hint.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/hint.c rename to dll/3rdparty/mesa32/src/main/hint.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/hint.h b/dll/3rdparty/mesa32/src/main/hint.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/hint.h rename to dll/3rdparty/mesa32/src/main/hint.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/histogram.c b/dll/3rdparty/mesa32/src/main/histogram.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/histogram.c rename to dll/3rdparty/mesa32/src/main/histogram.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/histogram.h b/dll/3rdparty/mesa32/src/main/histogram.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/histogram.h rename to dll/3rdparty/mesa32/src/main/histogram.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/image.c b/dll/3rdparty/mesa32/src/main/image.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/image.c rename to dll/3rdparty/mesa32/src/main/image.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/image.h b/dll/3rdparty/mesa32/src/main/image.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/image.h rename to dll/3rdparty/mesa32/src/main/image.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/imports.c b/dll/3rdparty/mesa32/src/main/imports.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/imports.c rename to dll/3rdparty/mesa32/src/main/imports.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/imports.h b/dll/3rdparty/mesa32/src/main/imports.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/imports.h rename to dll/3rdparty/mesa32/src/main/imports.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/light.c b/dll/3rdparty/mesa32/src/main/light.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/light.c rename to dll/3rdparty/mesa32/src/main/light.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/light.h b/dll/3rdparty/mesa32/src/main/light.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/light.h rename to dll/3rdparty/mesa32/src/main/light.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/lines.c b/dll/3rdparty/mesa32/src/main/lines.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/lines.c rename to dll/3rdparty/mesa32/src/main/lines.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/lines.h b/dll/3rdparty/mesa32/src/main/lines.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/lines.h rename to dll/3rdparty/mesa32/src/main/lines.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/macros.h b/dll/3rdparty/mesa32/src/main/macros.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/macros.h rename to dll/3rdparty/mesa32/src/main/macros.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/matrix.c b/dll/3rdparty/mesa32/src/main/matrix.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/matrix.c rename to dll/3rdparty/mesa32/src/main/matrix.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/matrix.h b/dll/3rdparty/mesa32/src/main/matrix.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/matrix.h rename to dll/3rdparty/mesa32/src/main/matrix.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/mcompiler.h b/dll/3rdparty/mesa32/src/main/mcompiler.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/mcompiler.h rename to dll/3rdparty/mesa32/src/main/mcompiler.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/mfeatures.h b/dll/3rdparty/mesa32/src/main/mfeatures.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/mfeatures.h rename to dll/3rdparty/mesa32/src/main/mfeatures.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/mipmap.c b/dll/3rdparty/mesa32/src/main/mipmap.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/mipmap.c rename to dll/3rdparty/mesa32/src/main/mipmap.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/mipmap.h b/dll/3rdparty/mesa32/src/main/mipmap.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/mipmap.h rename to dll/3rdparty/mesa32/src/main/mipmap.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/mm.c b/dll/3rdparty/mesa32/src/main/mm.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/mm.c rename to dll/3rdparty/mesa32/src/main/mm.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/mm.h b/dll/3rdparty/mesa32/src/main/mm.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/mm.h rename to dll/3rdparty/mesa32/src/main/mm.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/mtypes.h b/dll/3rdparty/mesa32/src/main/mtypes.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/mtypes.h rename to dll/3rdparty/mesa32/src/main/mtypes.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/multisample.c b/dll/3rdparty/mesa32/src/main/multisample.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/multisample.c rename to dll/3rdparty/mesa32/src/main/multisample.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/multisample.h b/dll/3rdparty/mesa32/src/main/multisample.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/multisample.h rename to dll/3rdparty/mesa32/src/main/multisample.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/pixel.c b/dll/3rdparty/mesa32/src/main/pixel.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/pixel.c rename to dll/3rdparty/mesa32/src/main/pixel.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/pixel.h b/dll/3rdparty/mesa32/src/main/pixel.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/pixel.h rename to dll/3rdparty/mesa32/src/main/pixel.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/pixelstore.c b/dll/3rdparty/mesa32/src/main/pixelstore.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/pixelstore.c rename to dll/3rdparty/mesa32/src/main/pixelstore.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/pixelstore.h b/dll/3rdparty/mesa32/src/main/pixelstore.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/pixelstore.h rename to dll/3rdparty/mesa32/src/main/pixelstore.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/points.c b/dll/3rdparty/mesa32/src/main/points.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/points.c rename to dll/3rdparty/mesa32/src/main/points.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/points.h b/dll/3rdparty/mesa32/src/main/points.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/points.h rename to dll/3rdparty/mesa32/src/main/points.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/polygon.c b/dll/3rdparty/mesa32/src/main/polygon.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/polygon.c rename to dll/3rdparty/mesa32/src/main/polygon.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/polygon.h b/dll/3rdparty/mesa32/src/main/polygon.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/polygon.h rename to dll/3rdparty/mesa32/src/main/polygon.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/queryobj.c b/dll/3rdparty/mesa32/src/main/queryobj.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/queryobj.c rename to dll/3rdparty/mesa32/src/main/queryobj.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/queryobj.h b/dll/3rdparty/mesa32/src/main/queryobj.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/queryobj.h rename to dll/3rdparty/mesa32/src/main/queryobj.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/rastpos.c b/dll/3rdparty/mesa32/src/main/rastpos.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/rastpos.c rename to dll/3rdparty/mesa32/src/main/rastpos.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/rastpos.h b/dll/3rdparty/mesa32/src/main/rastpos.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/rastpos.h rename to dll/3rdparty/mesa32/src/main/rastpos.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/rbadaptors.c b/dll/3rdparty/mesa32/src/main/rbadaptors.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/rbadaptors.c rename to dll/3rdparty/mesa32/src/main/rbadaptors.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/rbadaptors.h b/dll/3rdparty/mesa32/src/main/rbadaptors.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/rbadaptors.h rename to dll/3rdparty/mesa32/src/main/rbadaptors.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/readpix.c b/dll/3rdparty/mesa32/src/main/readpix.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/readpix.c rename to dll/3rdparty/mesa32/src/main/readpix.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/readpix.h b/dll/3rdparty/mesa32/src/main/readpix.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/readpix.h rename to dll/3rdparty/mesa32/src/main/readpix.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/renderbuffer.c b/dll/3rdparty/mesa32/src/main/renderbuffer.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/renderbuffer.c rename to dll/3rdparty/mesa32/src/main/renderbuffer.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/renderbuffer.h b/dll/3rdparty/mesa32/src/main/renderbuffer.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/renderbuffer.h rename to dll/3rdparty/mesa32/src/main/renderbuffer.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/scissor.c b/dll/3rdparty/mesa32/src/main/scissor.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/scissor.c rename to dll/3rdparty/mesa32/src/main/scissor.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/scissor.h b/dll/3rdparty/mesa32/src/main/scissor.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/scissor.h rename to dll/3rdparty/mesa32/src/main/scissor.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/shaders.c b/dll/3rdparty/mesa32/src/main/shaders.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/shaders.c rename to dll/3rdparty/mesa32/src/main/shaders.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/shaders.h b/dll/3rdparty/mesa32/src/main/shaders.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/shaders.h rename to dll/3rdparty/mesa32/src/main/shaders.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/simple_list.h b/dll/3rdparty/mesa32/src/main/simple_list.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/simple_list.h rename to dll/3rdparty/mesa32/src/main/simple_list.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/sources b/dll/3rdparty/mesa32/src/main/sources similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/sources rename to dll/3rdparty/mesa32/src/main/sources diff --git a/reactos/dll/3rdparty/mesa32/src/main/state.c b/dll/3rdparty/mesa32/src/main/state.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/state.c rename to dll/3rdparty/mesa32/src/main/state.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/state.h b/dll/3rdparty/mesa32/src/main/state.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/state.h rename to dll/3rdparty/mesa32/src/main/state.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/stencil.c b/dll/3rdparty/mesa32/src/main/stencil.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/stencil.c rename to dll/3rdparty/mesa32/src/main/stencil.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/stencil.h b/dll/3rdparty/mesa32/src/main/stencil.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/stencil.h rename to dll/3rdparty/mesa32/src/main/stencil.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/texcompress.c b/dll/3rdparty/mesa32/src/main/texcompress.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/texcompress.c rename to dll/3rdparty/mesa32/src/main/texcompress.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/texcompress.h b/dll/3rdparty/mesa32/src/main/texcompress.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/texcompress.h rename to dll/3rdparty/mesa32/src/main/texcompress.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/texcompress_fxt1.c b/dll/3rdparty/mesa32/src/main/texcompress_fxt1.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/texcompress_fxt1.c rename to dll/3rdparty/mesa32/src/main/texcompress_fxt1.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/texcompress_s3tc.c b/dll/3rdparty/mesa32/src/main/texcompress_s3tc.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/texcompress_s3tc.c rename to dll/3rdparty/mesa32/src/main/texcompress_s3tc.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/texenv.c b/dll/3rdparty/mesa32/src/main/texenv.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/texenv.c rename to dll/3rdparty/mesa32/src/main/texenv.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/texenv.h b/dll/3rdparty/mesa32/src/main/texenv.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/texenv.h rename to dll/3rdparty/mesa32/src/main/texenv.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/texenvprogram.c b/dll/3rdparty/mesa32/src/main/texenvprogram.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/texenvprogram.c rename to dll/3rdparty/mesa32/src/main/texenvprogram.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/texenvprogram.h b/dll/3rdparty/mesa32/src/main/texenvprogram.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/texenvprogram.h rename to dll/3rdparty/mesa32/src/main/texenvprogram.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/texformat.c b/dll/3rdparty/mesa32/src/main/texformat.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/texformat.c rename to dll/3rdparty/mesa32/src/main/texformat.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/texformat.h b/dll/3rdparty/mesa32/src/main/texformat.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/texformat.h rename to dll/3rdparty/mesa32/src/main/texformat.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/texformat_tmp.h b/dll/3rdparty/mesa32/src/main/texformat_tmp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/texformat_tmp.h rename to dll/3rdparty/mesa32/src/main/texformat_tmp.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/texgen.c b/dll/3rdparty/mesa32/src/main/texgen.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/texgen.c rename to dll/3rdparty/mesa32/src/main/texgen.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/texgen.h b/dll/3rdparty/mesa32/src/main/texgen.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/texgen.h rename to dll/3rdparty/mesa32/src/main/texgen.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/teximage.c b/dll/3rdparty/mesa32/src/main/teximage.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/teximage.c rename to dll/3rdparty/mesa32/src/main/teximage.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/teximage.h b/dll/3rdparty/mesa32/src/main/teximage.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/teximage.h rename to dll/3rdparty/mesa32/src/main/teximage.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/texobj.c b/dll/3rdparty/mesa32/src/main/texobj.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/texobj.c rename to dll/3rdparty/mesa32/src/main/texobj.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/texobj.h b/dll/3rdparty/mesa32/src/main/texobj.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/texobj.h rename to dll/3rdparty/mesa32/src/main/texobj.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/texparam.c b/dll/3rdparty/mesa32/src/main/texparam.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/texparam.c rename to dll/3rdparty/mesa32/src/main/texparam.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/texparam.h b/dll/3rdparty/mesa32/src/main/texparam.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/texparam.h rename to dll/3rdparty/mesa32/src/main/texparam.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/texrender.c b/dll/3rdparty/mesa32/src/main/texrender.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/texrender.c rename to dll/3rdparty/mesa32/src/main/texrender.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/texrender.h b/dll/3rdparty/mesa32/src/main/texrender.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/texrender.h rename to dll/3rdparty/mesa32/src/main/texrender.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/texstate.c b/dll/3rdparty/mesa32/src/main/texstate.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/texstate.c rename to dll/3rdparty/mesa32/src/main/texstate.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/texstate.h b/dll/3rdparty/mesa32/src/main/texstate.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/texstate.h rename to dll/3rdparty/mesa32/src/main/texstate.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/texstore.c b/dll/3rdparty/mesa32/src/main/texstore.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/texstore.c rename to dll/3rdparty/mesa32/src/main/texstore.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/texstore.h b/dll/3rdparty/mesa32/src/main/texstore.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/texstore.h rename to dll/3rdparty/mesa32/src/main/texstore.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/varray.c b/dll/3rdparty/mesa32/src/main/varray.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/varray.c rename to dll/3rdparty/mesa32/src/main/varray.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/varray.h b/dll/3rdparty/mesa32/src/main/varray.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/varray.h rename to dll/3rdparty/mesa32/src/main/varray.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/version.h b/dll/3rdparty/mesa32/src/main/version.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/version.h rename to dll/3rdparty/mesa32/src/main/version.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/vsnprintf.c b/dll/3rdparty/mesa32/src/main/vsnprintf.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/vsnprintf.c rename to dll/3rdparty/mesa32/src/main/vsnprintf.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/vtxfmt.c b/dll/3rdparty/mesa32/src/main/vtxfmt.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/vtxfmt.c rename to dll/3rdparty/mesa32/src/main/vtxfmt.c diff --git a/reactos/dll/3rdparty/mesa32/src/main/vtxfmt.h b/dll/3rdparty/mesa32/src/main/vtxfmt.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/vtxfmt.h rename to dll/3rdparty/mesa32/src/main/vtxfmt.h diff --git a/reactos/dll/3rdparty/mesa32/src/main/vtxfmt_tmp.h b/dll/3rdparty/mesa32/src/main/vtxfmt_tmp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/main/vtxfmt_tmp.h rename to dll/3rdparty/mesa32/src/main/vtxfmt_tmp.h diff --git a/reactos/dll/3rdparty/mesa32/src/math/descrip.mms b/dll/3rdparty/mesa32/src/math/descrip.mms similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/math/descrip.mms rename to dll/3rdparty/mesa32/src/math/descrip.mms diff --git a/reactos/dll/3rdparty/mesa32/src/math/m_clip_tmp.h b/dll/3rdparty/mesa32/src/math/m_clip_tmp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/math/m_clip_tmp.h rename to dll/3rdparty/mesa32/src/math/m_clip_tmp.h diff --git a/reactos/dll/3rdparty/mesa32/src/math/m_copy_tmp.h b/dll/3rdparty/mesa32/src/math/m_copy_tmp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/math/m_copy_tmp.h rename to dll/3rdparty/mesa32/src/math/m_copy_tmp.h diff --git a/reactos/dll/3rdparty/mesa32/src/math/m_debug.h b/dll/3rdparty/mesa32/src/math/m_debug.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/math/m_debug.h rename to dll/3rdparty/mesa32/src/math/m_debug.h diff --git a/reactos/dll/3rdparty/mesa32/src/math/m_debug_clip.c b/dll/3rdparty/mesa32/src/math/m_debug_clip.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/math/m_debug_clip.c rename to dll/3rdparty/mesa32/src/math/m_debug_clip.c diff --git a/reactos/dll/3rdparty/mesa32/src/math/m_debug_norm.c b/dll/3rdparty/mesa32/src/math/m_debug_norm.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/math/m_debug_norm.c rename to dll/3rdparty/mesa32/src/math/m_debug_norm.c diff --git a/reactos/dll/3rdparty/mesa32/src/math/m_debug_util.h b/dll/3rdparty/mesa32/src/math/m_debug_util.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/math/m_debug_util.h rename to dll/3rdparty/mesa32/src/math/m_debug_util.h diff --git a/reactos/dll/3rdparty/mesa32/src/math/m_debug_xform.c b/dll/3rdparty/mesa32/src/math/m_debug_xform.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/math/m_debug_xform.c rename to dll/3rdparty/mesa32/src/math/m_debug_xform.c diff --git a/reactos/dll/3rdparty/mesa32/src/math/m_dotprod_tmp.h b/dll/3rdparty/mesa32/src/math/m_dotprod_tmp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/math/m_dotprod_tmp.h rename to dll/3rdparty/mesa32/src/math/m_dotprod_tmp.h diff --git a/reactos/dll/3rdparty/mesa32/src/math/m_eval.c b/dll/3rdparty/mesa32/src/math/m_eval.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/math/m_eval.c rename to dll/3rdparty/mesa32/src/math/m_eval.c diff --git a/reactos/dll/3rdparty/mesa32/src/math/m_eval.h b/dll/3rdparty/mesa32/src/math/m_eval.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/math/m_eval.h rename to dll/3rdparty/mesa32/src/math/m_eval.h diff --git a/reactos/dll/3rdparty/mesa32/src/math/m_matrix.c b/dll/3rdparty/mesa32/src/math/m_matrix.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/math/m_matrix.c rename to dll/3rdparty/mesa32/src/math/m_matrix.c diff --git a/reactos/dll/3rdparty/mesa32/src/math/m_matrix.h b/dll/3rdparty/mesa32/src/math/m_matrix.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/math/m_matrix.h rename to dll/3rdparty/mesa32/src/math/m_matrix.h diff --git a/reactos/dll/3rdparty/mesa32/src/math/m_norm_tmp.h b/dll/3rdparty/mesa32/src/math/m_norm_tmp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/math/m_norm_tmp.h rename to dll/3rdparty/mesa32/src/math/m_norm_tmp.h diff --git a/reactos/dll/3rdparty/mesa32/src/math/m_trans_tmp.h b/dll/3rdparty/mesa32/src/math/m_trans_tmp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/math/m_trans_tmp.h rename to dll/3rdparty/mesa32/src/math/m_trans_tmp.h diff --git a/reactos/dll/3rdparty/mesa32/src/math/m_translate.c b/dll/3rdparty/mesa32/src/math/m_translate.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/math/m_translate.c rename to dll/3rdparty/mesa32/src/math/m_translate.c diff --git a/reactos/dll/3rdparty/mesa32/src/math/m_translate.h b/dll/3rdparty/mesa32/src/math/m_translate.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/math/m_translate.h rename to dll/3rdparty/mesa32/src/math/m_translate.h diff --git a/reactos/dll/3rdparty/mesa32/src/math/m_vector.c b/dll/3rdparty/mesa32/src/math/m_vector.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/math/m_vector.c rename to dll/3rdparty/mesa32/src/math/m_vector.c diff --git a/reactos/dll/3rdparty/mesa32/src/math/m_vector.h b/dll/3rdparty/mesa32/src/math/m_vector.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/math/m_vector.h rename to dll/3rdparty/mesa32/src/math/m_vector.h diff --git a/reactos/dll/3rdparty/mesa32/src/math/m_xform.c b/dll/3rdparty/mesa32/src/math/m_xform.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/math/m_xform.c rename to dll/3rdparty/mesa32/src/math/m_xform.c diff --git a/reactos/dll/3rdparty/mesa32/src/math/m_xform.h b/dll/3rdparty/mesa32/src/math/m_xform.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/math/m_xform.h rename to dll/3rdparty/mesa32/src/math/m_xform.h diff --git a/reactos/dll/3rdparty/mesa32/src/math/m_xform_tmp.h b/dll/3rdparty/mesa32/src/math/m_xform_tmp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/math/m_xform_tmp.h rename to dll/3rdparty/mesa32/src/math/m_xform_tmp.h diff --git a/reactos/dll/3rdparty/mesa32/src/math/mathmod.h b/dll/3rdparty/mesa32/src/math/mathmod.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/math/mathmod.h rename to dll/3rdparty/mesa32/src/math/mathmod.h diff --git a/reactos/dll/3rdparty/mesa32/src/math/sources b/dll/3rdparty/mesa32/src/math/sources similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/math/sources rename to dll/3rdparty/mesa32/src/math/sources diff --git a/reactos/dll/3rdparty/mesa32/src/ppc/common_ppc.c b/dll/3rdparty/mesa32/src/ppc/common_ppc.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/ppc/common_ppc.c rename to dll/3rdparty/mesa32/src/ppc/common_ppc.c diff --git a/reactos/dll/3rdparty/mesa32/src/ppc/common_ppc_features.h b/dll/3rdparty/mesa32/src/ppc/common_ppc_features.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/ppc/common_ppc_features.h rename to dll/3rdparty/mesa32/src/ppc/common_ppc_features.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/arbprogparse.c b/dll/3rdparty/mesa32/src/shader/arbprogparse.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/arbprogparse.c rename to dll/3rdparty/mesa32/src/shader/arbprogparse.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/arbprogparse.h b/dll/3rdparty/mesa32/src/shader/arbprogparse.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/arbprogparse.h rename to dll/3rdparty/mesa32/src/shader/arbprogparse.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/arbprogram.c b/dll/3rdparty/mesa32/src/shader/arbprogram.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/arbprogram.c rename to dll/3rdparty/mesa32/src/shader/arbprogram.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/arbprogram.h b/dll/3rdparty/mesa32/src/shader/arbprogram.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/arbprogram.h rename to dll/3rdparty/mesa32/src/shader/arbprogram.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/arbprogram_syn.h b/dll/3rdparty/mesa32/src/shader/arbprogram_syn.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/arbprogram_syn.h rename to dll/3rdparty/mesa32/src/shader/arbprogram_syn.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/atifragshader.c b/dll/3rdparty/mesa32/src/shader/atifragshader.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/atifragshader.c rename to dll/3rdparty/mesa32/src/shader/atifragshader.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/atifragshader.h b/dll/3rdparty/mesa32/src/shader/atifragshader.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/atifragshader.h rename to dll/3rdparty/mesa32/src/shader/atifragshader.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/descrip.mms b/dll/3rdparty/mesa32/src/shader/descrip.mms similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/descrip.mms rename to dll/3rdparty/mesa32/src/shader/descrip.mms diff --git a/reactos/dll/3rdparty/mesa32/src/shader/grammar/descrip.mms b/dll/3rdparty/mesa32/src/shader/grammar/descrip.mms similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/grammar/descrip.mms rename to dll/3rdparty/mesa32/src/shader/grammar/descrip.mms diff --git a/reactos/dll/3rdparty/mesa32/src/shader/grammar/grammar.c b/dll/3rdparty/mesa32/src/shader/grammar/grammar.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/grammar/grammar.c rename to dll/3rdparty/mesa32/src/shader/grammar/grammar.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/grammar/grammar.h b/dll/3rdparty/mesa32/src/shader/grammar/grammar.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/grammar/grammar.h rename to dll/3rdparty/mesa32/src/shader/grammar/grammar.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/grammar/grammar_crt.c b/dll/3rdparty/mesa32/src/shader/grammar/grammar_crt.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/grammar/grammar_crt.c rename to dll/3rdparty/mesa32/src/shader/grammar/grammar_crt.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/grammar/grammar_crt.h b/dll/3rdparty/mesa32/src/shader/grammar/grammar_crt.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/grammar/grammar_crt.h rename to dll/3rdparty/mesa32/src/shader/grammar/grammar_crt.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/grammar/grammar_mesa.c b/dll/3rdparty/mesa32/src/shader/grammar/grammar_mesa.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/grammar/grammar_mesa.c rename to dll/3rdparty/mesa32/src/shader/grammar/grammar_mesa.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/grammar/grammar_mesa.h b/dll/3rdparty/mesa32/src/shader/grammar/grammar_mesa.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/grammar/grammar_mesa.h rename to dll/3rdparty/mesa32/src/shader/grammar/grammar_mesa.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/grammar/grammar_syn.h b/dll/3rdparty/mesa32/src/shader/grammar/grammar_syn.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/grammar/grammar_syn.h rename to dll/3rdparty/mesa32/src/shader/grammar/grammar_syn.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/grammar/sources b/dll/3rdparty/mesa32/src/shader/grammar/sources similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/grammar/sources rename to dll/3rdparty/mesa32/src/shader/grammar/sources diff --git a/reactos/dll/3rdparty/mesa32/src/shader/nvfragparse.c b/dll/3rdparty/mesa32/src/shader/nvfragparse.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/nvfragparse.c rename to dll/3rdparty/mesa32/src/shader/nvfragparse.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/nvfragparse.h b/dll/3rdparty/mesa32/src/shader/nvfragparse.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/nvfragparse.h rename to dll/3rdparty/mesa32/src/shader/nvfragparse.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/nvprogram.c b/dll/3rdparty/mesa32/src/shader/nvprogram.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/nvprogram.c rename to dll/3rdparty/mesa32/src/shader/nvprogram.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/nvprogram.h b/dll/3rdparty/mesa32/src/shader/nvprogram.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/nvprogram.h rename to dll/3rdparty/mesa32/src/shader/nvprogram.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/nvvertparse.c b/dll/3rdparty/mesa32/src/shader/nvvertparse.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/nvvertparse.c rename to dll/3rdparty/mesa32/src/shader/nvvertparse.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/nvvertparse.h b/dll/3rdparty/mesa32/src/shader/nvvertparse.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/nvvertparse.h rename to dll/3rdparty/mesa32/src/shader/nvvertparse.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/prog_cache.c b/dll/3rdparty/mesa32/src/shader/prog_cache.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/prog_cache.c rename to dll/3rdparty/mesa32/src/shader/prog_cache.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/prog_cache.h b/dll/3rdparty/mesa32/src/shader/prog_cache.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/prog_cache.h rename to dll/3rdparty/mesa32/src/shader/prog_cache.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/prog_debug.c b/dll/3rdparty/mesa32/src/shader/prog_debug.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/prog_debug.c rename to dll/3rdparty/mesa32/src/shader/prog_debug.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/prog_debug.h b/dll/3rdparty/mesa32/src/shader/prog_debug.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/prog_debug.h rename to dll/3rdparty/mesa32/src/shader/prog_debug.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/prog_execute.c b/dll/3rdparty/mesa32/src/shader/prog_execute.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/prog_execute.c rename to dll/3rdparty/mesa32/src/shader/prog_execute.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/prog_execute.h b/dll/3rdparty/mesa32/src/shader/prog_execute.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/prog_execute.h rename to dll/3rdparty/mesa32/src/shader/prog_execute.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/prog_instruction.c b/dll/3rdparty/mesa32/src/shader/prog_instruction.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/prog_instruction.c rename to dll/3rdparty/mesa32/src/shader/prog_instruction.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/prog_instruction.h b/dll/3rdparty/mesa32/src/shader/prog_instruction.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/prog_instruction.h rename to dll/3rdparty/mesa32/src/shader/prog_instruction.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/prog_noise.c b/dll/3rdparty/mesa32/src/shader/prog_noise.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/prog_noise.c rename to dll/3rdparty/mesa32/src/shader/prog_noise.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/prog_noise.h b/dll/3rdparty/mesa32/src/shader/prog_noise.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/prog_noise.h rename to dll/3rdparty/mesa32/src/shader/prog_noise.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/prog_parameter.c b/dll/3rdparty/mesa32/src/shader/prog_parameter.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/prog_parameter.c rename to dll/3rdparty/mesa32/src/shader/prog_parameter.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/prog_parameter.h b/dll/3rdparty/mesa32/src/shader/prog_parameter.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/prog_parameter.h rename to dll/3rdparty/mesa32/src/shader/prog_parameter.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/prog_print.c b/dll/3rdparty/mesa32/src/shader/prog_print.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/prog_print.c rename to dll/3rdparty/mesa32/src/shader/prog_print.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/prog_print.h b/dll/3rdparty/mesa32/src/shader/prog_print.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/prog_print.h rename to dll/3rdparty/mesa32/src/shader/prog_print.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/prog_statevars.c b/dll/3rdparty/mesa32/src/shader/prog_statevars.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/prog_statevars.c rename to dll/3rdparty/mesa32/src/shader/prog_statevars.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/prog_statevars.h b/dll/3rdparty/mesa32/src/shader/prog_statevars.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/prog_statevars.h rename to dll/3rdparty/mesa32/src/shader/prog_statevars.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/prog_uniform.c b/dll/3rdparty/mesa32/src/shader/prog_uniform.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/prog_uniform.c rename to dll/3rdparty/mesa32/src/shader/prog_uniform.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/prog_uniform.h b/dll/3rdparty/mesa32/src/shader/prog_uniform.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/prog_uniform.h rename to dll/3rdparty/mesa32/src/shader/prog_uniform.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/program.c b/dll/3rdparty/mesa32/src/shader/program.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/program.c rename to dll/3rdparty/mesa32/src/shader/program.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/program.h b/dll/3rdparty/mesa32/src/shader/program.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/program.h rename to dll/3rdparty/mesa32/src/shader/program.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/programopt.c b/dll/3rdparty/mesa32/src/shader/programopt.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/programopt.c rename to dll/3rdparty/mesa32/src/shader/programopt.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/programopt.h b/dll/3rdparty/mesa32/src/shader/programopt.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/programopt.h rename to dll/3rdparty/mesa32/src/shader/programopt.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/shader_api.c b/dll/3rdparty/mesa32/src/shader/shader_api.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/shader_api.c rename to dll/3rdparty/mesa32/src/shader/shader_api.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/shader_api.h b/dll/3rdparty/mesa32/src/shader/shader_api.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/shader_api.h rename to dll/3rdparty/mesa32/src/shader/shader_api.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/shader_debug.c b/dll/3rdparty/mesa32/src/shader/shader_debug.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/shader_debug.c rename to dll/3rdparty/mesa32/src/shader/shader_debug.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/descrip.mms b/dll/3rdparty/mesa32/src/shader/slang/descrip.mms similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/descrip.mms rename to dll/3rdparty/mesa32/src/shader/slang/descrip.mms diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/Makefile b/dll/3rdparty/mesa32/src/shader/slang/library/Makefile similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/Makefile rename to dll/3rdparty/mesa32/src/shader/slang/library/Makefile diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/gc_to_bin.c b/dll/3rdparty/mesa32/src/shader/slang/library/gc_to_bin.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/gc_to_bin.c rename to dll/3rdparty/mesa32/src/shader/slang/library/gc_to_bin.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_120_core.gc b/dll/3rdparty/mesa32/src/shader/slang/library/slang_120_core.gc similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_120_core.gc rename to dll/3rdparty/mesa32/src/shader/slang/library/slang_120_core.gc diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_120_core_gc.h b/dll/3rdparty/mesa32/src/shader/slang/library/slang_120_core_gc.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_120_core_gc.h rename to dll/3rdparty/mesa32/src/shader/slang/library/slang_120_core_gc.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_builtin_120_common.gc b/dll/3rdparty/mesa32/src/shader/slang/library/slang_builtin_120_common.gc similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_builtin_120_common.gc rename to dll/3rdparty/mesa32/src/shader/slang/library/slang_builtin_120_common.gc diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_builtin_120_common_gc.h b/dll/3rdparty/mesa32/src/shader/slang/library/slang_builtin_120_common_gc.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_builtin_120_common_gc.h rename to dll/3rdparty/mesa32/src/shader/slang/library/slang_builtin_120_common_gc.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_builtin_120_fragment.gc b/dll/3rdparty/mesa32/src/shader/slang/library/slang_builtin_120_fragment.gc similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_builtin_120_fragment.gc rename to dll/3rdparty/mesa32/src/shader/slang/library/slang_builtin_120_fragment.gc diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_builtin_120_fragment_gc.h b/dll/3rdparty/mesa32/src/shader/slang/library/slang_builtin_120_fragment_gc.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_builtin_120_fragment_gc.h rename to dll/3rdparty/mesa32/src/shader/slang/library/slang_builtin_120_fragment_gc.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_common_builtin.gc b/dll/3rdparty/mesa32/src/shader/slang/library/slang_common_builtin.gc similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_common_builtin.gc rename to dll/3rdparty/mesa32/src/shader/slang/library/slang_common_builtin.gc diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_common_builtin_gc.h b/dll/3rdparty/mesa32/src/shader/slang/library/slang_common_builtin_gc.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_common_builtin_gc.h rename to dll/3rdparty/mesa32/src/shader/slang/library/slang_common_builtin_gc.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_core.gc b/dll/3rdparty/mesa32/src/shader/slang/library/slang_core.gc similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_core.gc rename to dll/3rdparty/mesa32/src/shader/slang/library/slang_core.gc diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_core_gc.h b/dll/3rdparty/mesa32/src/shader/slang/library/slang_core_gc.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_core_gc.h rename to dll/3rdparty/mesa32/src/shader/slang/library/slang_core_gc.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_fragment_builtin.gc b/dll/3rdparty/mesa32/src/shader/slang/library/slang_fragment_builtin.gc similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_fragment_builtin.gc rename to dll/3rdparty/mesa32/src/shader/slang/library/slang_fragment_builtin.gc diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_fragment_builtin_gc.h b/dll/3rdparty/mesa32/src/shader/slang/library/slang_fragment_builtin_gc.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_fragment_builtin_gc.h rename to dll/3rdparty/mesa32/src/shader/slang/library/slang_fragment_builtin_gc.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_pp_directives.syn b/dll/3rdparty/mesa32/src/shader/slang/library/slang_pp_directives.syn similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_pp_directives.syn rename to dll/3rdparty/mesa32/src/shader/slang/library/slang_pp_directives.syn diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_pp_directives_syn.h b/dll/3rdparty/mesa32/src/shader/slang/library/slang_pp_directives_syn.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_pp_directives_syn.h rename to dll/3rdparty/mesa32/src/shader/slang/library/slang_pp_directives_syn.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_pp_expression.syn b/dll/3rdparty/mesa32/src/shader/slang/library/slang_pp_expression.syn similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_pp_expression.syn rename to dll/3rdparty/mesa32/src/shader/slang/library/slang_pp_expression.syn diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_pp_expression_syn.h b/dll/3rdparty/mesa32/src/shader/slang/library/slang_pp_expression_syn.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_pp_expression_syn.h rename to dll/3rdparty/mesa32/src/shader/slang/library/slang_pp_expression_syn.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_pp_version.syn b/dll/3rdparty/mesa32/src/shader/slang/library/slang_pp_version.syn similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_pp_version.syn rename to dll/3rdparty/mesa32/src/shader/slang/library/slang_pp_version.syn diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_pp_version_syn.h b/dll/3rdparty/mesa32/src/shader/slang/library/slang_pp_version_syn.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_pp_version_syn.h rename to dll/3rdparty/mesa32/src/shader/slang/library/slang_pp_version_syn.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_shader.syn b/dll/3rdparty/mesa32/src/shader/slang/library/slang_shader.syn similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_shader.syn rename to dll/3rdparty/mesa32/src/shader/slang/library/slang_shader.syn diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_shader_syn.h b/dll/3rdparty/mesa32/src/shader/slang/library/slang_shader_syn.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_shader_syn.h rename to dll/3rdparty/mesa32/src/shader/slang/library/slang_shader_syn.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_version.syn b/dll/3rdparty/mesa32/src/shader/slang/library/slang_version.syn similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_version.syn rename to dll/3rdparty/mesa32/src/shader/slang/library/slang_version.syn diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_version_syn.h b/dll/3rdparty/mesa32/src/shader/slang/library/slang_version_syn.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_version_syn.h rename to dll/3rdparty/mesa32/src/shader/slang/library/slang_version_syn.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_vertex_builtin.gc b/dll/3rdparty/mesa32/src/shader/slang/library/slang_vertex_builtin.gc similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_vertex_builtin.gc rename to dll/3rdparty/mesa32/src/shader/slang/library/slang_vertex_builtin.gc diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_vertex_builtin_gc.h b/dll/3rdparty/mesa32/src/shader/slang/library/slang_vertex_builtin_gc.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/slang_vertex_builtin_gc.h rename to dll/3rdparty/mesa32/src/shader/slang/library/slang_vertex_builtin_gc.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/library/syn_to_c.c b/dll/3rdparty/mesa32/src/shader/slang/library/syn_to_c.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/library/syn_to_c.c rename to dll/3rdparty/mesa32/src/shader/slang/library/syn_to_c.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_builtin.c b/dll/3rdparty/mesa32/src/shader/slang/slang_builtin.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_builtin.c rename to dll/3rdparty/mesa32/src/shader/slang/slang_builtin.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_builtin.h b/dll/3rdparty/mesa32/src/shader/slang/slang_builtin.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_builtin.h rename to dll/3rdparty/mesa32/src/shader/slang/slang_builtin.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_codegen.c b/dll/3rdparty/mesa32/src/shader/slang/slang_codegen.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_codegen.c rename to dll/3rdparty/mesa32/src/shader/slang/slang_codegen.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_codegen.h b/dll/3rdparty/mesa32/src/shader/slang/slang_codegen.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_codegen.h rename to dll/3rdparty/mesa32/src/shader/slang/slang_codegen.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_compile.c b/dll/3rdparty/mesa32/src/shader/slang/slang_compile.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_compile.c rename to dll/3rdparty/mesa32/src/shader/slang/slang_compile.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_compile.h b/dll/3rdparty/mesa32/src/shader/slang/slang_compile.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_compile.h rename to dll/3rdparty/mesa32/src/shader/slang/slang_compile.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_compile_function.c b/dll/3rdparty/mesa32/src/shader/slang/slang_compile_function.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_compile_function.c rename to dll/3rdparty/mesa32/src/shader/slang/slang_compile_function.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_compile_function.h b/dll/3rdparty/mesa32/src/shader/slang/slang_compile_function.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_compile_function.h rename to dll/3rdparty/mesa32/src/shader/slang/slang_compile_function.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_compile_operation.c b/dll/3rdparty/mesa32/src/shader/slang/slang_compile_operation.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_compile_operation.c rename to dll/3rdparty/mesa32/src/shader/slang/slang_compile_operation.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_compile_operation.h b/dll/3rdparty/mesa32/src/shader/slang/slang_compile_operation.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_compile_operation.h rename to dll/3rdparty/mesa32/src/shader/slang/slang_compile_operation.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_compile_struct.c b/dll/3rdparty/mesa32/src/shader/slang/slang_compile_struct.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_compile_struct.c rename to dll/3rdparty/mesa32/src/shader/slang/slang_compile_struct.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_compile_struct.h b/dll/3rdparty/mesa32/src/shader/slang/slang_compile_struct.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_compile_struct.h rename to dll/3rdparty/mesa32/src/shader/slang/slang_compile_struct.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_compile_variable.c b/dll/3rdparty/mesa32/src/shader/slang/slang_compile_variable.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_compile_variable.c rename to dll/3rdparty/mesa32/src/shader/slang/slang_compile_variable.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_compile_variable.h b/dll/3rdparty/mesa32/src/shader/slang/slang_compile_variable.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_compile_variable.h rename to dll/3rdparty/mesa32/src/shader/slang/slang_compile_variable.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_emit.c b/dll/3rdparty/mesa32/src/shader/slang/slang_emit.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_emit.c rename to dll/3rdparty/mesa32/src/shader/slang/slang_emit.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_emit.h b/dll/3rdparty/mesa32/src/shader/slang/slang_emit.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_emit.h rename to dll/3rdparty/mesa32/src/shader/slang/slang_emit.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_ir.c b/dll/3rdparty/mesa32/src/shader/slang/slang_ir.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_ir.c rename to dll/3rdparty/mesa32/src/shader/slang/slang_ir.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_ir.h b/dll/3rdparty/mesa32/src/shader/slang/slang_ir.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_ir.h rename to dll/3rdparty/mesa32/src/shader/slang/slang_ir.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_label.c b/dll/3rdparty/mesa32/src/shader/slang/slang_label.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_label.c rename to dll/3rdparty/mesa32/src/shader/slang/slang_label.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_label.h b/dll/3rdparty/mesa32/src/shader/slang/slang_label.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_label.h rename to dll/3rdparty/mesa32/src/shader/slang/slang_label.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_library_noise.c b/dll/3rdparty/mesa32/src/shader/slang/slang_library_noise.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_library_noise.c rename to dll/3rdparty/mesa32/src/shader/slang/slang_library_noise.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_library_noise.h b/dll/3rdparty/mesa32/src/shader/slang/slang_library_noise.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_library_noise.h rename to dll/3rdparty/mesa32/src/shader/slang/slang_library_noise.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_link.c b/dll/3rdparty/mesa32/src/shader/slang/slang_link.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_link.c rename to dll/3rdparty/mesa32/src/shader/slang/slang_link.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_link.h b/dll/3rdparty/mesa32/src/shader/slang/slang_link.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_link.h rename to dll/3rdparty/mesa32/src/shader/slang/slang_link.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_log.c b/dll/3rdparty/mesa32/src/shader/slang/slang_log.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_log.c rename to dll/3rdparty/mesa32/src/shader/slang/slang_log.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_log.h b/dll/3rdparty/mesa32/src/shader/slang/slang_log.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_log.h rename to dll/3rdparty/mesa32/src/shader/slang/slang_log.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_mem.c b/dll/3rdparty/mesa32/src/shader/slang/slang_mem.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_mem.c rename to dll/3rdparty/mesa32/src/shader/slang/slang_mem.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_mem.h b/dll/3rdparty/mesa32/src/shader/slang/slang_mem.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_mem.h rename to dll/3rdparty/mesa32/src/shader/slang/slang_mem.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_preprocess.c b/dll/3rdparty/mesa32/src/shader/slang/slang_preprocess.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_preprocess.c rename to dll/3rdparty/mesa32/src/shader/slang/slang_preprocess.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_preprocess.h b/dll/3rdparty/mesa32/src/shader/slang/slang_preprocess.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_preprocess.h rename to dll/3rdparty/mesa32/src/shader/slang/slang_preprocess.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_print.c b/dll/3rdparty/mesa32/src/shader/slang/slang_print.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_print.c rename to dll/3rdparty/mesa32/src/shader/slang/slang_print.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_print.h b/dll/3rdparty/mesa32/src/shader/slang/slang_print.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_print.h rename to dll/3rdparty/mesa32/src/shader/slang/slang_print.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_simplify.c b/dll/3rdparty/mesa32/src/shader/slang/slang_simplify.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_simplify.c rename to dll/3rdparty/mesa32/src/shader/slang/slang_simplify.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_simplify.h b/dll/3rdparty/mesa32/src/shader/slang/slang_simplify.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_simplify.h rename to dll/3rdparty/mesa32/src/shader/slang/slang_simplify.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_storage.c b/dll/3rdparty/mesa32/src/shader/slang/slang_storage.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_storage.c rename to dll/3rdparty/mesa32/src/shader/slang/slang_storage.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_storage.h b/dll/3rdparty/mesa32/src/shader/slang/slang_storage.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_storage.h rename to dll/3rdparty/mesa32/src/shader/slang/slang_storage.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_typeinfo.c b/dll/3rdparty/mesa32/src/shader/slang/slang_typeinfo.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_typeinfo.c rename to dll/3rdparty/mesa32/src/shader/slang/slang_typeinfo.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_typeinfo.h b/dll/3rdparty/mesa32/src/shader/slang/slang_typeinfo.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_typeinfo.h rename to dll/3rdparty/mesa32/src/shader/slang/slang_typeinfo.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_utility.c b/dll/3rdparty/mesa32/src/shader/slang/slang_utility.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_utility.c rename to dll/3rdparty/mesa32/src/shader/slang/slang_utility.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_utility.h b/dll/3rdparty/mesa32/src/shader/slang/slang_utility.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_utility.h rename to dll/3rdparty/mesa32/src/shader/slang/slang_utility.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_vartable.c b/dll/3rdparty/mesa32/src/shader/slang/slang_vartable.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_vartable.c rename to dll/3rdparty/mesa32/src/shader/slang/slang_vartable.c diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/slang_vartable.h b/dll/3rdparty/mesa32/src/shader/slang/slang_vartable.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/slang_vartable.h rename to dll/3rdparty/mesa32/src/shader/slang/slang_vartable.h diff --git a/reactos/dll/3rdparty/mesa32/src/shader/slang/sources b/dll/3rdparty/mesa32/src/shader/slang/sources similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/slang/sources rename to dll/3rdparty/mesa32/src/shader/slang/sources diff --git a/reactos/dll/3rdparty/mesa32/src/shader/sources b/dll/3rdparty/mesa32/src/shader/sources similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/shader/sources rename to dll/3rdparty/mesa32/src/shader/sources diff --git a/reactos/dll/3rdparty/mesa32/src/sources b/dll/3rdparty/mesa32/src/sources similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/sources rename to dll/3rdparty/mesa32/src/sources diff --git a/reactos/dll/3rdparty/mesa32/src/sparc/clip.S b/dll/3rdparty/mesa32/src/sparc/clip.S similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/sparc/clip.S rename to dll/3rdparty/mesa32/src/sparc/clip.S diff --git a/reactos/dll/3rdparty/mesa32/src/sparc/glapi_sparc.S b/dll/3rdparty/mesa32/src/sparc/glapi_sparc.S similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/sparc/glapi_sparc.S rename to dll/3rdparty/mesa32/src/sparc/glapi_sparc.S diff --git a/reactos/dll/3rdparty/mesa32/src/sparc/norm.S b/dll/3rdparty/mesa32/src/sparc/norm.S similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/sparc/norm.S rename to dll/3rdparty/mesa32/src/sparc/norm.S diff --git a/reactos/dll/3rdparty/mesa32/src/sparc/sparc.c b/dll/3rdparty/mesa32/src/sparc/sparc.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/sparc/sparc.c rename to dll/3rdparty/mesa32/src/sparc/sparc.c diff --git a/reactos/dll/3rdparty/mesa32/src/sparc/sparc.h b/dll/3rdparty/mesa32/src/sparc/sparc.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/sparc/sparc.h rename to dll/3rdparty/mesa32/src/sparc/sparc.h diff --git a/reactos/dll/3rdparty/mesa32/src/sparc/sparc_matrix.h b/dll/3rdparty/mesa32/src/sparc/sparc_matrix.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/sparc/sparc_matrix.h rename to dll/3rdparty/mesa32/src/sparc/sparc_matrix.h diff --git a/reactos/dll/3rdparty/mesa32/src/sparc/xform.S b/dll/3rdparty/mesa32/src/sparc/xform.S similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/sparc/xform.S rename to dll/3rdparty/mesa32/src/sparc/xform.S diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/descrip.mms b/dll/3rdparty/mesa32/src/swrast/descrip.mms similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/descrip.mms rename to dll/3rdparty/mesa32/src/swrast/descrip.mms diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_aaline.c b/dll/3rdparty/mesa32/src/swrast/s_aaline.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_aaline.c rename to dll/3rdparty/mesa32/src/swrast/s_aaline.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_aaline.h b/dll/3rdparty/mesa32/src/swrast/s_aaline.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_aaline.h rename to dll/3rdparty/mesa32/src/swrast/s_aaline.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_aalinetemp.h b/dll/3rdparty/mesa32/src/swrast/s_aalinetemp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_aalinetemp.h rename to dll/3rdparty/mesa32/src/swrast/s_aalinetemp.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_aatriangle.c b/dll/3rdparty/mesa32/src/swrast/s_aatriangle.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_aatriangle.c rename to dll/3rdparty/mesa32/src/swrast/s_aatriangle.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_aatriangle.h b/dll/3rdparty/mesa32/src/swrast/s_aatriangle.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_aatriangle.h rename to dll/3rdparty/mesa32/src/swrast/s_aatriangle.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_aatritemp.h b/dll/3rdparty/mesa32/src/swrast/s_aatritemp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_aatritemp.h rename to dll/3rdparty/mesa32/src/swrast/s_aatritemp.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_accum.c b/dll/3rdparty/mesa32/src/swrast/s_accum.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_accum.c rename to dll/3rdparty/mesa32/src/swrast/s_accum.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_accum.h b/dll/3rdparty/mesa32/src/swrast/s_accum.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_accum.h rename to dll/3rdparty/mesa32/src/swrast/s_accum.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_alpha.c b/dll/3rdparty/mesa32/src/swrast/s_alpha.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_alpha.c rename to dll/3rdparty/mesa32/src/swrast/s_alpha.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_alpha.h b/dll/3rdparty/mesa32/src/swrast/s_alpha.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_alpha.h rename to dll/3rdparty/mesa32/src/swrast/s_alpha.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_atifragshader.c b/dll/3rdparty/mesa32/src/swrast/s_atifragshader.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_atifragshader.c rename to dll/3rdparty/mesa32/src/swrast/s_atifragshader.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_atifragshader.h b/dll/3rdparty/mesa32/src/swrast/s_atifragshader.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_atifragshader.h rename to dll/3rdparty/mesa32/src/swrast/s_atifragshader.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_bitmap.c b/dll/3rdparty/mesa32/src/swrast/s_bitmap.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_bitmap.c rename to dll/3rdparty/mesa32/src/swrast/s_bitmap.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_blend.c b/dll/3rdparty/mesa32/src/swrast/s_blend.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_blend.c rename to dll/3rdparty/mesa32/src/swrast/s_blend.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_blend.h b/dll/3rdparty/mesa32/src/swrast/s_blend.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_blend.h rename to dll/3rdparty/mesa32/src/swrast/s_blend.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_blit.c b/dll/3rdparty/mesa32/src/swrast/s_blit.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_blit.c rename to dll/3rdparty/mesa32/src/swrast/s_blit.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_buffers.c b/dll/3rdparty/mesa32/src/swrast/s_buffers.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_buffers.c rename to dll/3rdparty/mesa32/src/swrast/s_buffers.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_context.c b/dll/3rdparty/mesa32/src/swrast/s_context.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_context.c rename to dll/3rdparty/mesa32/src/swrast/s_context.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_context.h b/dll/3rdparty/mesa32/src/swrast/s_context.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_context.h rename to dll/3rdparty/mesa32/src/swrast/s_context.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_copypix.c b/dll/3rdparty/mesa32/src/swrast/s_copypix.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_copypix.c rename to dll/3rdparty/mesa32/src/swrast/s_copypix.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_depth.c b/dll/3rdparty/mesa32/src/swrast/s_depth.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_depth.c rename to dll/3rdparty/mesa32/src/swrast/s_depth.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_depth.h b/dll/3rdparty/mesa32/src/swrast/s_depth.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_depth.h rename to dll/3rdparty/mesa32/src/swrast/s_depth.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_drawpix.c b/dll/3rdparty/mesa32/src/swrast/s_drawpix.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_drawpix.c rename to dll/3rdparty/mesa32/src/swrast/s_drawpix.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_drawpix.h b/dll/3rdparty/mesa32/src/swrast/s_drawpix.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_drawpix.h rename to dll/3rdparty/mesa32/src/swrast/s_drawpix.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_feedback.c b/dll/3rdparty/mesa32/src/swrast/s_feedback.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_feedback.c rename to dll/3rdparty/mesa32/src/swrast/s_feedback.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_feedback.h b/dll/3rdparty/mesa32/src/swrast/s_feedback.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_feedback.h rename to dll/3rdparty/mesa32/src/swrast/s_feedback.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_fog.c b/dll/3rdparty/mesa32/src/swrast/s_fog.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_fog.c rename to dll/3rdparty/mesa32/src/swrast/s_fog.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_fog.h b/dll/3rdparty/mesa32/src/swrast/s_fog.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_fog.h rename to dll/3rdparty/mesa32/src/swrast/s_fog.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_fragprog.c b/dll/3rdparty/mesa32/src/swrast/s_fragprog.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_fragprog.c rename to dll/3rdparty/mesa32/src/swrast/s_fragprog.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_fragprog.h b/dll/3rdparty/mesa32/src/swrast/s_fragprog.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_fragprog.h rename to dll/3rdparty/mesa32/src/swrast/s_fragprog.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_imaging.c b/dll/3rdparty/mesa32/src/swrast/s_imaging.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_imaging.c rename to dll/3rdparty/mesa32/src/swrast/s_imaging.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_lines.c b/dll/3rdparty/mesa32/src/swrast/s_lines.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_lines.c rename to dll/3rdparty/mesa32/src/swrast/s_lines.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_lines.h b/dll/3rdparty/mesa32/src/swrast/s_lines.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_lines.h rename to dll/3rdparty/mesa32/src/swrast/s_lines.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_linetemp.h b/dll/3rdparty/mesa32/src/swrast/s_linetemp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_linetemp.h rename to dll/3rdparty/mesa32/src/swrast/s_linetemp.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_logic.c b/dll/3rdparty/mesa32/src/swrast/s_logic.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_logic.c rename to dll/3rdparty/mesa32/src/swrast/s_logic.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_logic.h b/dll/3rdparty/mesa32/src/swrast/s_logic.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_logic.h rename to dll/3rdparty/mesa32/src/swrast/s_logic.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_masking.c b/dll/3rdparty/mesa32/src/swrast/s_masking.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_masking.c rename to dll/3rdparty/mesa32/src/swrast/s_masking.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_masking.h b/dll/3rdparty/mesa32/src/swrast/s_masking.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_masking.h rename to dll/3rdparty/mesa32/src/swrast/s_masking.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_points.c b/dll/3rdparty/mesa32/src/swrast/s_points.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_points.c rename to dll/3rdparty/mesa32/src/swrast/s_points.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_points.h b/dll/3rdparty/mesa32/src/swrast/s_points.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_points.h rename to dll/3rdparty/mesa32/src/swrast/s_points.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_pointtemp.h b/dll/3rdparty/mesa32/src/swrast/s_pointtemp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_pointtemp.h rename to dll/3rdparty/mesa32/src/swrast/s_pointtemp.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_readpix.c b/dll/3rdparty/mesa32/src/swrast/s_readpix.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_readpix.c rename to dll/3rdparty/mesa32/src/swrast/s_readpix.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_span.c b/dll/3rdparty/mesa32/src/swrast/s_span.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_span.c rename to dll/3rdparty/mesa32/src/swrast/s_span.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_span.h b/dll/3rdparty/mesa32/src/swrast/s_span.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_span.h rename to dll/3rdparty/mesa32/src/swrast/s_span.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_spantemp.h b/dll/3rdparty/mesa32/src/swrast/s_spantemp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_spantemp.h rename to dll/3rdparty/mesa32/src/swrast/s_spantemp.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_stencil.c b/dll/3rdparty/mesa32/src/swrast/s_stencil.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_stencil.c rename to dll/3rdparty/mesa32/src/swrast/s_stencil.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_stencil.h b/dll/3rdparty/mesa32/src/swrast/s_stencil.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_stencil.h rename to dll/3rdparty/mesa32/src/swrast/s_stencil.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_texcombine.c b/dll/3rdparty/mesa32/src/swrast/s_texcombine.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_texcombine.c rename to dll/3rdparty/mesa32/src/swrast/s_texcombine.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_texcombine.h b/dll/3rdparty/mesa32/src/swrast/s_texcombine.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_texcombine.h rename to dll/3rdparty/mesa32/src/swrast/s_texcombine.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_texfilter.c b/dll/3rdparty/mesa32/src/swrast/s_texfilter.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_texfilter.c rename to dll/3rdparty/mesa32/src/swrast/s_texfilter.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_texfilter.h b/dll/3rdparty/mesa32/src/swrast/s_texfilter.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_texfilter.h rename to dll/3rdparty/mesa32/src/swrast/s_texfilter.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_texstore.c b/dll/3rdparty/mesa32/src/swrast/s_texstore.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_texstore.c rename to dll/3rdparty/mesa32/src/swrast/s_texstore.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_triangle.c b/dll/3rdparty/mesa32/src/swrast/s_triangle.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_triangle.c rename to dll/3rdparty/mesa32/src/swrast/s_triangle.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_triangle.h b/dll/3rdparty/mesa32/src/swrast/s_triangle.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_triangle.h rename to dll/3rdparty/mesa32/src/swrast/s_triangle.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_trispan.h b/dll/3rdparty/mesa32/src/swrast/s_trispan.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_trispan.h rename to dll/3rdparty/mesa32/src/swrast/s_trispan.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_tritemp.h b/dll/3rdparty/mesa32/src/swrast/s_tritemp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_tritemp.h rename to dll/3rdparty/mesa32/src/swrast/s_tritemp.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_zoom.c b/dll/3rdparty/mesa32/src/swrast/s_zoom.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_zoom.c rename to dll/3rdparty/mesa32/src/swrast/s_zoom.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/s_zoom.h b/dll/3rdparty/mesa32/src/swrast/s_zoom.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/s_zoom.h rename to dll/3rdparty/mesa32/src/swrast/s_zoom.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/sources b/dll/3rdparty/mesa32/src/swrast/sources similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/sources rename to dll/3rdparty/mesa32/src/swrast/sources diff --git a/reactos/dll/3rdparty/mesa32/src/swrast/swrast.h b/dll/3rdparty/mesa32/src/swrast/swrast.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast/swrast.h rename to dll/3rdparty/mesa32/src/swrast/swrast.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast_setup/descrip.mms b/dll/3rdparty/mesa32/src/swrast_setup/descrip.mms similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast_setup/descrip.mms rename to dll/3rdparty/mesa32/src/swrast_setup/descrip.mms diff --git a/reactos/dll/3rdparty/mesa32/src/swrast_setup/sources b/dll/3rdparty/mesa32/src/swrast_setup/sources similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast_setup/sources rename to dll/3rdparty/mesa32/src/swrast_setup/sources diff --git a/reactos/dll/3rdparty/mesa32/src/swrast_setup/ss_context.c b/dll/3rdparty/mesa32/src/swrast_setup/ss_context.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast_setup/ss_context.c rename to dll/3rdparty/mesa32/src/swrast_setup/ss_context.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast_setup/ss_context.h b/dll/3rdparty/mesa32/src/swrast_setup/ss_context.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast_setup/ss_context.h rename to dll/3rdparty/mesa32/src/swrast_setup/ss_context.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast_setup/ss_triangle.c b/dll/3rdparty/mesa32/src/swrast_setup/ss_triangle.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast_setup/ss_triangle.c rename to dll/3rdparty/mesa32/src/swrast_setup/ss_triangle.c diff --git a/reactos/dll/3rdparty/mesa32/src/swrast_setup/ss_triangle.h b/dll/3rdparty/mesa32/src/swrast_setup/ss_triangle.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast_setup/ss_triangle.h rename to dll/3rdparty/mesa32/src/swrast_setup/ss_triangle.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast_setup/ss_tritmp.h b/dll/3rdparty/mesa32/src/swrast_setup/ss_tritmp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast_setup/ss_tritmp.h rename to dll/3rdparty/mesa32/src/swrast_setup/ss_tritmp.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast_setup/ss_vb.h b/dll/3rdparty/mesa32/src/swrast_setup/ss_vb.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast_setup/ss_vb.h rename to dll/3rdparty/mesa32/src/swrast_setup/ss_vb.h diff --git a/reactos/dll/3rdparty/mesa32/src/swrast_setup/swrast_setup.h b/dll/3rdparty/mesa32/src/swrast_setup/swrast_setup.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/swrast_setup/swrast_setup.h rename to dll/3rdparty/mesa32/src/swrast_setup/swrast_setup.h diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/descrip.mms b/dll/3rdparty/mesa32/src/tnl/descrip.mms similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/descrip.mms rename to dll/3rdparty/mesa32/src/tnl/descrip.mms diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/sources b/dll/3rdparty/mesa32/src/tnl/sources similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/sources rename to dll/3rdparty/mesa32/src/tnl/sources diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/t_context.c b/dll/3rdparty/mesa32/src/tnl/t_context.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/t_context.c rename to dll/3rdparty/mesa32/src/tnl/t_context.c diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/t_context.h b/dll/3rdparty/mesa32/src/tnl/t_context.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/t_context.h rename to dll/3rdparty/mesa32/src/tnl/t_context.h diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/t_draw.c b/dll/3rdparty/mesa32/src/tnl/t_draw.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/t_draw.c rename to dll/3rdparty/mesa32/src/tnl/t_draw.c diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/t_pipeline.c b/dll/3rdparty/mesa32/src/tnl/t_pipeline.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/t_pipeline.c rename to dll/3rdparty/mesa32/src/tnl/t_pipeline.c diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/t_pipeline.h b/dll/3rdparty/mesa32/src/tnl/t_pipeline.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/t_pipeline.h rename to dll/3rdparty/mesa32/src/tnl/t_pipeline.h diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/t_rasterpos.c b/dll/3rdparty/mesa32/src/tnl/t_rasterpos.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/t_rasterpos.c rename to dll/3rdparty/mesa32/src/tnl/t_rasterpos.c diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/t_vb_cliptmp.h b/dll/3rdparty/mesa32/src/tnl/t_vb_cliptmp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/t_vb_cliptmp.h rename to dll/3rdparty/mesa32/src/tnl/t_vb_cliptmp.h diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/t_vb_cull.c b/dll/3rdparty/mesa32/src/tnl/t_vb_cull.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/t_vb_cull.c rename to dll/3rdparty/mesa32/src/tnl/t_vb_cull.c diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/t_vb_fog.c b/dll/3rdparty/mesa32/src/tnl/t_vb_fog.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/t_vb_fog.c rename to dll/3rdparty/mesa32/src/tnl/t_vb_fog.c diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/t_vb_light.c b/dll/3rdparty/mesa32/src/tnl/t_vb_light.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/t_vb_light.c rename to dll/3rdparty/mesa32/src/tnl/t_vb_light.c diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/t_vb_lighttmp.h b/dll/3rdparty/mesa32/src/tnl/t_vb_lighttmp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/t_vb_lighttmp.h rename to dll/3rdparty/mesa32/src/tnl/t_vb_lighttmp.h diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/t_vb_normals.c b/dll/3rdparty/mesa32/src/tnl/t_vb_normals.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/t_vb_normals.c rename to dll/3rdparty/mesa32/src/tnl/t_vb_normals.c diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/t_vb_points.c b/dll/3rdparty/mesa32/src/tnl/t_vb_points.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/t_vb_points.c rename to dll/3rdparty/mesa32/src/tnl/t_vb_points.c diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/t_vb_program.c b/dll/3rdparty/mesa32/src/tnl/t_vb_program.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/t_vb_program.c rename to dll/3rdparty/mesa32/src/tnl/t_vb_program.c diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/t_vb_render.c b/dll/3rdparty/mesa32/src/tnl/t_vb_render.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/t_vb_render.c rename to dll/3rdparty/mesa32/src/tnl/t_vb_render.c diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/t_vb_rendertmp.h b/dll/3rdparty/mesa32/src/tnl/t_vb_rendertmp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/t_vb_rendertmp.h rename to dll/3rdparty/mesa32/src/tnl/t_vb_rendertmp.h diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/t_vb_texgen.c b/dll/3rdparty/mesa32/src/tnl/t_vb_texgen.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/t_vb_texgen.c rename to dll/3rdparty/mesa32/src/tnl/t_vb_texgen.c diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/t_vb_texmat.c b/dll/3rdparty/mesa32/src/tnl/t_vb_texmat.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/t_vb_texmat.c rename to dll/3rdparty/mesa32/src/tnl/t_vb_texmat.c diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/t_vb_vertex.c b/dll/3rdparty/mesa32/src/tnl/t_vb_vertex.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/t_vb_vertex.c rename to dll/3rdparty/mesa32/src/tnl/t_vb_vertex.c diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/t_vertex.c b/dll/3rdparty/mesa32/src/tnl/t_vertex.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/t_vertex.c rename to dll/3rdparty/mesa32/src/tnl/t_vertex.c diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/t_vertex.h b/dll/3rdparty/mesa32/src/tnl/t_vertex.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/t_vertex.h rename to dll/3rdparty/mesa32/src/tnl/t_vertex.h diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/t_vertex_generic.c b/dll/3rdparty/mesa32/src/tnl/t_vertex_generic.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/t_vertex_generic.c rename to dll/3rdparty/mesa32/src/tnl/t_vertex_generic.c diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/t_vertex_sse.c b/dll/3rdparty/mesa32/src/tnl/t_vertex_sse.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/t_vertex_sse.c rename to dll/3rdparty/mesa32/src/tnl/t_vertex_sse.c diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/t_vp_build.c b/dll/3rdparty/mesa32/src/tnl/t_vp_build.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/t_vp_build.c rename to dll/3rdparty/mesa32/src/tnl/t_vp_build.c diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/t_vp_build.h b/dll/3rdparty/mesa32/src/tnl/t_vp_build.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/t_vp_build.h rename to dll/3rdparty/mesa32/src/tnl/t_vp_build.h diff --git a/reactos/dll/3rdparty/mesa32/src/tnl/tnl.h b/dll/3rdparty/mesa32/src/tnl/tnl.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl/tnl.h rename to dll/3rdparty/mesa32/src/tnl/tnl.h diff --git a/reactos/dll/3rdparty/mesa32/src/tnl_dd/imm/NOTES.imm b/dll/3rdparty/mesa32/src/tnl_dd/imm/NOTES.imm similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl_dd/imm/NOTES.imm rename to dll/3rdparty/mesa32/src/tnl_dd/imm/NOTES.imm diff --git a/reactos/dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_capi.h b/dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_capi.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_capi.h rename to dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_capi.h diff --git a/reactos/dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_napi.h b/dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_napi.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_napi.h rename to dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_napi.h diff --git a/reactos/dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_primtmp.h b/dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_primtmp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_primtmp.h rename to dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_primtmp.h diff --git a/reactos/dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_tapi.h b/dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_tapi.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_tapi.h rename to dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_tapi.h diff --git a/reactos/dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_vapi.h b/dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_vapi.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_vapi.h rename to dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_vapi.h diff --git a/reactos/dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_vb.c b/dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_vb.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_vb.c rename to dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_vb.c diff --git a/reactos/dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_vbtmp.h b/dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_vbtmp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_vbtmp.h rename to dll/3rdparty/mesa32/src/tnl_dd/imm/t_dd_imm_vbtmp.h diff --git a/reactos/dll/3rdparty/mesa32/src/tnl_dd/t_dd.c b/dll/3rdparty/mesa32/src/tnl_dd/t_dd.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl_dd/t_dd.c rename to dll/3rdparty/mesa32/src/tnl_dd/t_dd.c diff --git a/reactos/dll/3rdparty/mesa32/src/tnl_dd/t_dd_dmatmp.h b/dll/3rdparty/mesa32/src/tnl_dd/t_dd_dmatmp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl_dd/t_dd_dmatmp.h rename to dll/3rdparty/mesa32/src/tnl_dd/t_dd_dmatmp.h diff --git a/reactos/dll/3rdparty/mesa32/src/tnl_dd/t_dd_dmatmp2.h b/dll/3rdparty/mesa32/src/tnl_dd/t_dd_dmatmp2.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl_dd/t_dd_dmatmp2.h rename to dll/3rdparty/mesa32/src/tnl_dd/t_dd_dmatmp2.h diff --git a/reactos/dll/3rdparty/mesa32/src/tnl_dd/t_dd_rendertmp.h b/dll/3rdparty/mesa32/src/tnl_dd/t_dd_rendertmp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl_dd/t_dd_rendertmp.h rename to dll/3rdparty/mesa32/src/tnl_dd/t_dd_rendertmp.h diff --git a/reactos/dll/3rdparty/mesa32/src/tnl_dd/t_dd_triemit.h b/dll/3rdparty/mesa32/src/tnl_dd/t_dd_triemit.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl_dd/t_dd_triemit.h rename to dll/3rdparty/mesa32/src/tnl_dd/t_dd_triemit.h diff --git a/reactos/dll/3rdparty/mesa32/src/tnl_dd/t_dd_tritmp.h b/dll/3rdparty/mesa32/src/tnl_dd/t_dd_tritmp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl_dd/t_dd_tritmp.h rename to dll/3rdparty/mesa32/src/tnl_dd/t_dd_tritmp.h diff --git a/reactos/dll/3rdparty/mesa32/src/tnl_dd/t_dd_unfilled.h b/dll/3rdparty/mesa32/src/tnl_dd/t_dd_unfilled.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl_dd/t_dd_unfilled.h rename to dll/3rdparty/mesa32/src/tnl_dd/t_dd_unfilled.h diff --git a/reactos/dll/3rdparty/mesa32/src/tnl_dd/t_dd_vb.c b/dll/3rdparty/mesa32/src/tnl_dd/t_dd_vb.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl_dd/t_dd_vb.c rename to dll/3rdparty/mesa32/src/tnl_dd/t_dd_vb.c diff --git a/reactos/dll/3rdparty/mesa32/src/tnl_dd/t_dd_vbtmp.h b/dll/3rdparty/mesa32/src/tnl_dd/t_dd_vbtmp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl_dd/t_dd_vbtmp.h rename to dll/3rdparty/mesa32/src/tnl_dd/t_dd_vbtmp.h diff --git a/reactos/dll/3rdparty/mesa32/src/tnl_dd/t_dd_vertex.h b/dll/3rdparty/mesa32/src/tnl_dd/t_dd_vertex.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/tnl_dd/t_dd_vertex.h rename to dll/3rdparty/mesa32/src/tnl_dd/t_dd_vertex.h diff --git a/reactos/dll/3rdparty/mesa32/src/vbo/descrip.mms b/dll/3rdparty/mesa32/src/vbo/descrip.mms similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/vbo/descrip.mms rename to dll/3rdparty/mesa32/src/vbo/descrip.mms diff --git a/reactos/dll/3rdparty/mesa32/src/vbo/vbo.h b/dll/3rdparty/mesa32/src/vbo/vbo.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/vbo/vbo.h rename to dll/3rdparty/mesa32/src/vbo/vbo.h diff --git a/reactos/dll/3rdparty/mesa32/src/vbo/vbo_attrib.h b/dll/3rdparty/mesa32/src/vbo/vbo_attrib.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/vbo/vbo_attrib.h rename to dll/3rdparty/mesa32/src/vbo/vbo_attrib.h diff --git a/reactos/dll/3rdparty/mesa32/src/vbo/vbo_attrib_tmp.h b/dll/3rdparty/mesa32/src/vbo/vbo_attrib_tmp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/vbo/vbo_attrib_tmp.h rename to dll/3rdparty/mesa32/src/vbo/vbo_attrib_tmp.h diff --git a/reactos/dll/3rdparty/mesa32/src/vbo/vbo_context.c b/dll/3rdparty/mesa32/src/vbo/vbo_context.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/vbo/vbo_context.c rename to dll/3rdparty/mesa32/src/vbo/vbo_context.c diff --git a/reactos/dll/3rdparty/mesa32/src/vbo/vbo_context.h b/dll/3rdparty/mesa32/src/vbo/vbo_context.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/vbo/vbo_context.h rename to dll/3rdparty/mesa32/src/vbo/vbo_context.h diff --git a/reactos/dll/3rdparty/mesa32/src/vbo/vbo_exec.c b/dll/3rdparty/mesa32/src/vbo/vbo_exec.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/vbo/vbo_exec.c rename to dll/3rdparty/mesa32/src/vbo/vbo_exec.c diff --git a/reactos/dll/3rdparty/mesa32/src/vbo/vbo_exec.h b/dll/3rdparty/mesa32/src/vbo/vbo_exec.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/vbo/vbo_exec.h rename to dll/3rdparty/mesa32/src/vbo/vbo_exec.h diff --git a/reactos/dll/3rdparty/mesa32/src/vbo/vbo_exec_api.c b/dll/3rdparty/mesa32/src/vbo/vbo_exec_api.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/vbo/vbo_exec_api.c rename to dll/3rdparty/mesa32/src/vbo/vbo_exec_api.c diff --git a/reactos/dll/3rdparty/mesa32/src/vbo/vbo_exec_array.c b/dll/3rdparty/mesa32/src/vbo/vbo_exec_array.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/vbo/vbo_exec_array.c rename to dll/3rdparty/mesa32/src/vbo/vbo_exec_array.c diff --git a/reactos/dll/3rdparty/mesa32/src/vbo/vbo_exec_draw.c b/dll/3rdparty/mesa32/src/vbo/vbo_exec_draw.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/vbo/vbo_exec_draw.c rename to dll/3rdparty/mesa32/src/vbo/vbo_exec_draw.c diff --git a/reactos/dll/3rdparty/mesa32/src/vbo/vbo_exec_eval.c b/dll/3rdparty/mesa32/src/vbo/vbo_exec_eval.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/vbo/vbo_exec_eval.c rename to dll/3rdparty/mesa32/src/vbo/vbo_exec_eval.c diff --git a/reactos/dll/3rdparty/mesa32/src/vbo/vbo_rebase.c b/dll/3rdparty/mesa32/src/vbo/vbo_rebase.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/vbo/vbo_rebase.c rename to dll/3rdparty/mesa32/src/vbo/vbo_rebase.c diff --git a/reactos/dll/3rdparty/mesa32/src/vbo/vbo_save.c b/dll/3rdparty/mesa32/src/vbo/vbo_save.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/vbo/vbo_save.c rename to dll/3rdparty/mesa32/src/vbo/vbo_save.c diff --git a/reactos/dll/3rdparty/mesa32/src/vbo/vbo_save.h b/dll/3rdparty/mesa32/src/vbo/vbo_save.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/vbo/vbo_save.h rename to dll/3rdparty/mesa32/src/vbo/vbo_save.h diff --git a/reactos/dll/3rdparty/mesa32/src/vbo/vbo_save_api.c b/dll/3rdparty/mesa32/src/vbo/vbo_save_api.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/vbo/vbo_save_api.c rename to dll/3rdparty/mesa32/src/vbo/vbo_save_api.c diff --git a/reactos/dll/3rdparty/mesa32/src/vbo/vbo_save_draw.c b/dll/3rdparty/mesa32/src/vbo/vbo_save_draw.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/vbo/vbo_save_draw.c rename to dll/3rdparty/mesa32/src/vbo/vbo_save_draw.c diff --git a/reactos/dll/3rdparty/mesa32/src/vbo/vbo_save_loopback.c b/dll/3rdparty/mesa32/src/vbo/vbo_save_loopback.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/vbo/vbo_save_loopback.c rename to dll/3rdparty/mesa32/src/vbo/vbo_save_loopback.c diff --git a/reactos/dll/3rdparty/mesa32/src/vbo/vbo_split.c b/dll/3rdparty/mesa32/src/vbo/vbo_split.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/vbo/vbo_split.c rename to dll/3rdparty/mesa32/src/vbo/vbo_split.c diff --git a/reactos/dll/3rdparty/mesa32/src/vbo/vbo_split.h b/dll/3rdparty/mesa32/src/vbo/vbo_split.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/vbo/vbo_split.h rename to dll/3rdparty/mesa32/src/vbo/vbo_split.h diff --git a/reactos/dll/3rdparty/mesa32/src/vbo/vbo_split_copy.c b/dll/3rdparty/mesa32/src/vbo/vbo_split_copy.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/vbo/vbo_split_copy.c rename to dll/3rdparty/mesa32/src/vbo/vbo_split_copy.c diff --git a/reactos/dll/3rdparty/mesa32/src/vbo/vbo_split_inplace.c b/dll/3rdparty/mesa32/src/vbo/vbo_split_inplace.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/vbo/vbo_split_inplace.c rename to dll/3rdparty/mesa32/src/vbo/vbo_split_inplace.c diff --git a/reactos/dll/3rdparty/mesa32/src/x86-64/Makefile b/dll/3rdparty/mesa32/src/x86-64/Makefile similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86-64/Makefile rename to dll/3rdparty/mesa32/src/x86-64/Makefile diff --git a/reactos/dll/3rdparty/mesa32/src/x86-64/glapi_x86-64.S b/dll/3rdparty/mesa32/src/x86-64/glapi_x86-64.S similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86-64/glapi_x86-64.S rename to dll/3rdparty/mesa32/src/x86-64/glapi_x86-64.S diff --git a/reactos/dll/3rdparty/mesa32/src/x86-64/matypes.h b/dll/3rdparty/mesa32/src/x86-64/matypes.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86-64/matypes.h rename to dll/3rdparty/mesa32/src/x86-64/matypes.h diff --git a/reactos/dll/3rdparty/mesa32/src/x86-64/x86-64.c b/dll/3rdparty/mesa32/src/x86-64/x86-64.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86-64/x86-64.c rename to dll/3rdparty/mesa32/src/x86-64/x86-64.c diff --git a/reactos/dll/3rdparty/mesa32/src/x86-64/x86-64.h b/dll/3rdparty/mesa32/src/x86-64/x86-64.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86-64/x86-64.h rename to dll/3rdparty/mesa32/src/x86-64/x86-64.h diff --git a/reactos/dll/3rdparty/mesa32/src/x86-64/xform4.S b/dll/3rdparty/mesa32/src/x86-64/xform4.S similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86-64/xform4.S rename to dll/3rdparty/mesa32/src/x86-64/xform4.S diff --git a/reactos/dll/3rdparty/mesa32/src/x86/3dnow.c b/dll/3rdparty/mesa32/src/x86/3dnow.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/3dnow.c rename to dll/3rdparty/mesa32/src/x86/3dnow.c diff --git a/reactos/dll/3rdparty/mesa32/src/x86/3dnow.h b/dll/3rdparty/mesa32/src/x86/3dnow.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/3dnow.h rename to dll/3rdparty/mesa32/src/x86/3dnow.h diff --git a/reactos/dll/3rdparty/mesa32/src/x86/3dnow_normal.S b/dll/3rdparty/mesa32/src/x86/3dnow_normal.S similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/3dnow_normal.S rename to dll/3rdparty/mesa32/src/x86/3dnow_normal.S diff --git a/reactos/dll/3rdparty/mesa32/src/x86/3dnow_xform1.S b/dll/3rdparty/mesa32/src/x86/3dnow_xform1.S similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/3dnow_xform1.S rename to dll/3rdparty/mesa32/src/x86/3dnow_xform1.S diff --git a/reactos/dll/3rdparty/mesa32/src/x86/3dnow_xform2.S b/dll/3rdparty/mesa32/src/x86/3dnow_xform2.S similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/3dnow_xform2.S rename to dll/3rdparty/mesa32/src/x86/3dnow_xform2.S diff --git a/reactos/dll/3rdparty/mesa32/src/x86/3dnow_xform3.S b/dll/3rdparty/mesa32/src/x86/3dnow_xform3.S similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/3dnow_xform3.S rename to dll/3rdparty/mesa32/src/x86/3dnow_xform3.S diff --git a/reactos/dll/3rdparty/mesa32/src/x86/3dnow_xform4.S b/dll/3rdparty/mesa32/src/x86/3dnow_xform4.S similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/3dnow_xform4.S rename to dll/3rdparty/mesa32/src/x86/3dnow_xform4.S diff --git a/reactos/dll/3rdparty/mesa32/src/x86/Makefile b/dll/3rdparty/mesa32/src/x86/Makefile similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/Makefile rename to dll/3rdparty/mesa32/src/x86/Makefile diff --git a/reactos/dll/3rdparty/mesa32/src/x86/assyntax.h b/dll/3rdparty/mesa32/src/x86/assyntax.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/assyntax.h rename to dll/3rdparty/mesa32/src/x86/assyntax.h diff --git a/reactos/dll/3rdparty/mesa32/src/x86/clip_args.h b/dll/3rdparty/mesa32/src/x86/clip_args.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/clip_args.h rename to dll/3rdparty/mesa32/src/x86/clip_args.h diff --git a/reactos/dll/3rdparty/mesa32/src/x86/common_x86.c b/dll/3rdparty/mesa32/src/x86/common_x86.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/common_x86.c rename to dll/3rdparty/mesa32/src/x86/common_x86.c diff --git a/reactos/dll/3rdparty/mesa32/src/x86/common_x86_asm.S b/dll/3rdparty/mesa32/src/x86/common_x86_asm.S similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/common_x86_asm.S rename to dll/3rdparty/mesa32/src/x86/common_x86_asm.S diff --git a/reactos/dll/3rdparty/mesa32/src/x86/common_x86_asm.h b/dll/3rdparty/mesa32/src/x86/common_x86_asm.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/common_x86_asm.h rename to dll/3rdparty/mesa32/src/x86/common_x86_asm.h diff --git a/reactos/dll/3rdparty/mesa32/src/x86/common_x86_features.h b/dll/3rdparty/mesa32/src/x86/common_x86_features.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/common_x86_features.h rename to dll/3rdparty/mesa32/src/x86/common_x86_features.h diff --git a/reactos/dll/3rdparty/mesa32/src/x86/common_x86_macros.h b/dll/3rdparty/mesa32/src/x86/common_x86_macros.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/common_x86_macros.h rename to dll/3rdparty/mesa32/src/x86/common_x86_macros.h diff --git a/reactos/dll/3rdparty/mesa32/src/x86/gen_matypes.c b/dll/3rdparty/mesa32/src/x86/gen_matypes.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/gen_matypes.c rename to dll/3rdparty/mesa32/src/x86/gen_matypes.c diff --git a/reactos/dll/3rdparty/mesa32/src/x86/glapi_x86.S b/dll/3rdparty/mesa32/src/x86/glapi_x86.S similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/glapi_x86.S rename to dll/3rdparty/mesa32/src/x86/glapi_x86.S diff --git a/reactos/dll/3rdparty/mesa32/src/x86/matypes.h b/dll/3rdparty/mesa32/src/x86/matypes.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/matypes.h rename to dll/3rdparty/mesa32/src/x86/matypes.h diff --git a/reactos/dll/3rdparty/mesa32/src/x86/mmx.h b/dll/3rdparty/mesa32/src/x86/mmx.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/mmx.h rename to dll/3rdparty/mesa32/src/x86/mmx.h diff --git a/reactos/dll/3rdparty/mesa32/src/x86/mmx_blend.S b/dll/3rdparty/mesa32/src/x86/mmx_blend.S similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/mmx_blend.S rename to dll/3rdparty/mesa32/src/x86/mmx_blend.S diff --git a/reactos/dll/3rdparty/mesa32/src/x86/mmx_blendtmp.h b/dll/3rdparty/mesa32/src/x86/mmx_blendtmp.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/mmx_blendtmp.h rename to dll/3rdparty/mesa32/src/x86/mmx_blendtmp.h diff --git a/reactos/dll/3rdparty/mesa32/src/x86/norm_args.h b/dll/3rdparty/mesa32/src/x86/norm_args.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/norm_args.h rename to dll/3rdparty/mesa32/src/x86/norm_args.h diff --git a/reactos/dll/3rdparty/mesa32/src/x86/read_rgba_span_x86.S b/dll/3rdparty/mesa32/src/x86/read_rgba_span_x86.S similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/read_rgba_span_x86.S rename to dll/3rdparty/mesa32/src/x86/read_rgba_span_x86.S diff --git a/reactos/dll/3rdparty/mesa32/src/x86/read_rgba_span_x86.h b/dll/3rdparty/mesa32/src/x86/read_rgba_span_x86.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/read_rgba_span_x86.h rename to dll/3rdparty/mesa32/src/x86/read_rgba_span_x86.h diff --git a/reactos/dll/3rdparty/mesa32/src/x86/rtasm/x86sse.c b/dll/3rdparty/mesa32/src/x86/rtasm/x86sse.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/rtasm/x86sse.c rename to dll/3rdparty/mesa32/src/x86/rtasm/x86sse.c diff --git a/reactos/dll/3rdparty/mesa32/src/x86/rtasm/x86sse.h b/dll/3rdparty/mesa32/src/x86/rtasm/x86sse.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/rtasm/x86sse.h rename to dll/3rdparty/mesa32/src/x86/rtasm/x86sse.h diff --git a/reactos/dll/3rdparty/mesa32/src/x86/sse.c b/dll/3rdparty/mesa32/src/x86/sse.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/sse.c rename to dll/3rdparty/mesa32/src/x86/sse.c diff --git a/reactos/dll/3rdparty/mesa32/src/x86/sse.h b/dll/3rdparty/mesa32/src/x86/sse.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/sse.h rename to dll/3rdparty/mesa32/src/x86/sse.h diff --git a/reactos/dll/3rdparty/mesa32/src/x86/sse_normal.S b/dll/3rdparty/mesa32/src/x86/sse_normal.S similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/sse_normal.S rename to dll/3rdparty/mesa32/src/x86/sse_normal.S diff --git a/reactos/dll/3rdparty/mesa32/src/x86/sse_xform1.S b/dll/3rdparty/mesa32/src/x86/sse_xform1.S similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/sse_xform1.S rename to dll/3rdparty/mesa32/src/x86/sse_xform1.S diff --git a/reactos/dll/3rdparty/mesa32/src/x86/sse_xform2.S b/dll/3rdparty/mesa32/src/x86/sse_xform2.S similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/sse_xform2.S rename to dll/3rdparty/mesa32/src/x86/sse_xform2.S diff --git a/reactos/dll/3rdparty/mesa32/src/x86/sse_xform3.S b/dll/3rdparty/mesa32/src/x86/sse_xform3.S similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/sse_xform3.S rename to dll/3rdparty/mesa32/src/x86/sse_xform3.S diff --git a/reactos/dll/3rdparty/mesa32/src/x86/sse_xform4.S b/dll/3rdparty/mesa32/src/x86/sse_xform4.S similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/sse_xform4.S rename to dll/3rdparty/mesa32/src/x86/sse_xform4.S diff --git a/reactos/dll/3rdparty/mesa32/src/x86/x86.c b/dll/3rdparty/mesa32/src/x86/x86.c similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/x86.c rename to dll/3rdparty/mesa32/src/x86/x86.c diff --git a/reactos/dll/3rdparty/mesa32/src/x86/x86.h b/dll/3rdparty/mesa32/src/x86/x86.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/x86.h rename to dll/3rdparty/mesa32/src/x86/x86.h diff --git a/reactos/dll/3rdparty/mesa32/src/x86/x86_cliptest.S b/dll/3rdparty/mesa32/src/x86/x86_cliptest.S similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/x86_cliptest.S rename to dll/3rdparty/mesa32/src/x86/x86_cliptest.S diff --git a/reactos/dll/3rdparty/mesa32/src/x86/x86_xform2.S b/dll/3rdparty/mesa32/src/x86/x86_xform2.S similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/x86_xform2.S rename to dll/3rdparty/mesa32/src/x86/x86_xform2.S diff --git a/reactos/dll/3rdparty/mesa32/src/x86/x86_xform3.S b/dll/3rdparty/mesa32/src/x86/x86_xform3.S similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/x86_xform3.S rename to dll/3rdparty/mesa32/src/x86/x86_xform3.S diff --git a/reactos/dll/3rdparty/mesa32/src/x86/x86_xform4.S b/dll/3rdparty/mesa32/src/x86/x86_xform4.S similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/x86_xform4.S rename to dll/3rdparty/mesa32/src/x86/x86_xform4.S diff --git a/reactos/dll/3rdparty/mesa32/src/x86/xform_args.h b/dll/3rdparty/mesa32/src/x86/xform_args.h similarity index 100% rename from reactos/dll/3rdparty/mesa32/src/x86/xform_args.h rename to dll/3rdparty/mesa32/src/x86/xform_args.h diff --git a/reactos/dll/CMakeLists.txt b/dll/CMakeLists.txt similarity index 100% rename from reactos/dll/CMakeLists.txt rename to dll/CMakeLists.txt diff --git a/reactos/dll/cpl/CMakeLists.txt b/dll/cpl/CMakeLists.txt similarity index 100% rename from reactos/dll/cpl/CMakeLists.txt rename to dll/cpl/CMakeLists.txt diff --git a/reactos/dll/cpl/access/CMakeLists.txt b/dll/cpl/access/CMakeLists.txt similarity index 100% rename from reactos/dll/cpl/access/CMakeLists.txt rename to dll/cpl/access/CMakeLists.txt diff --git a/reactos/dll/cpl/access/access.c b/dll/cpl/access/access.c similarity index 100% rename from reactos/dll/cpl/access/access.c rename to dll/cpl/access/access.c diff --git a/reactos/dll/cpl/access/access.h b/dll/cpl/access/access.h similarity index 100% rename from reactos/dll/cpl/access/access.h rename to dll/cpl/access/access.h diff --git a/reactos/dll/cpl/access/access.rbuild b/dll/cpl/access/access.rbuild similarity index 100% rename from reactos/dll/cpl/access/access.rbuild rename to dll/cpl/access/access.rbuild diff --git a/reactos/dll/cpl/access/access.rc b/dll/cpl/access/access.rc similarity index 100% rename from reactos/dll/cpl/access/access.rc rename to dll/cpl/access/access.rc diff --git a/reactos/dll/cpl/access/access.spec b/dll/cpl/access/access.spec similarity index 100% rename from reactos/dll/cpl/access/access.spec rename to dll/cpl/access/access.spec diff --git a/reactos/dll/cpl/access/display.c b/dll/cpl/access/display.c similarity index 100% rename from reactos/dll/cpl/access/display.c rename to dll/cpl/access/display.c diff --git a/reactos/dll/cpl/access/general.c b/dll/cpl/access/general.c similarity index 100% rename from reactos/dll/cpl/access/general.c rename to dll/cpl/access/general.c diff --git a/reactos/dll/cpl/access/keyboard.c b/dll/cpl/access/keyboard.c similarity index 100% rename from reactos/dll/cpl/access/keyboard.c rename to dll/cpl/access/keyboard.c diff --git a/reactos/dll/cpl/access/lang/bg-BG.rc b/dll/cpl/access/lang/bg-BG.rc similarity index 100% rename from reactos/dll/cpl/access/lang/bg-BG.rc rename to dll/cpl/access/lang/bg-BG.rc diff --git a/reactos/dll/cpl/access/lang/cs-CZ.rc b/dll/cpl/access/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/cpl/access/lang/cs-CZ.rc rename to dll/cpl/access/lang/cs-CZ.rc diff --git a/reactos/dll/cpl/access/lang/de-DE.rc b/dll/cpl/access/lang/de-DE.rc similarity index 100% rename from reactos/dll/cpl/access/lang/de-DE.rc rename to dll/cpl/access/lang/de-DE.rc diff --git a/reactos/dll/cpl/access/lang/el-GR.rc b/dll/cpl/access/lang/el-GR.rc similarity index 100% rename from reactos/dll/cpl/access/lang/el-GR.rc rename to dll/cpl/access/lang/el-GR.rc diff --git a/reactos/dll/cpl/access/lang/en-US.rc b/dll/cpl/access/lang/en-US.rc similarity index 100% rename from reactos/dll/cpl/access/lang/en-US.rc rename to dll/cpl/access/lang/en-US.rc diff --git a/reactos/dll/cpl/access/lang/es-ES.rc b/dll/cpl/access/lang/es-ES.rc similarity index 100% rename from reactos/dll/cpl/access/lang/es-ES.rc rename to dll/cpl/access/lang/es-ES.rc diff --git a/reactos/dll/cpl/access/lang/fr-FR.rc b/dll/cpl/access/lang/fr-FR.rc similarity index 100% rename from reactos/dll/cpl/access/lang/fr-FR.rc rename to dll/cpl/access/lang/fr-FR.rc diff --git a/reactos/dll/cpl/access/lang/hu-HU.rc b/dll/cpl/access/lang/hu-HU.rc similarity index 100% rename from reactos/dll/cpl/access/lang/hu-HU.rc rename to dll/cpl/access/lang/hu-HU.rc diff --git a/reactos/dll/cpl/access/lang/id-ID.rc b/dll/cpl/access/lang/id-ID.rc similarity index 100% rename from reactos/dll/cpl/access/lang/id-ID.rc rename to dll/cpl/access/lang/id-ID.rc diff --git a/reactos/dll/cpl/access/lang/it-IT.rc b/dll/cpl/access/lang/it-IT.rc similarity index 100% rename from reactos/dll/cpl/access/lang/it-IT.rc rename to dll/cpl/access/lang/it-IT.rc diff --git a/reactos/dll/cpl/access/lang/ja-JP.rc b/dll/cpl/access/lang/ja-JP.rc similarity index 100% rename from reactos/dll/cpl/access/lang/ja-JP.rc rename to dll/cpl/access/lang/ja-JP.rc diff --git a/reactos/dll/cpl/access/lang/nl-NL.rc b/dll/cpl/access/lang/nl-NL.rc similarity index 100% rename from reactos/dll/cpl/access/lang/nl-NL.rc rename to dll/cpl/access/lang/nl-NL.rc diff --git a/reactos/dll/cpl/access/lang/no-NO.rc b/dll/cpl/access/lang/no-NO.rc similarity index 100% rename from reactos/dll/cpl/access/lang/no-NO.rc rename to dll/cpl/access/lang/no-NO.rc diff --git a/reactos/dll/cpl/access/lang/pl-PL.rc b/dll/cpl/access/lang/pl-PL.rc similarity index 100% rename from reactos/dll/cpl/access/lang/pl-PL.rc rename to dll/cpl/access/lang/pl-PL.rc diff --git a/reactos/dll/cpl/access/lang/ro-RO.rc b/dll/cpl/access/lang/ro-RO.rc similarity index 100% rename from reactos/dll/cpl/access/lang/ro-RO.rc rename to dll/cpl/access/lang/ro-RO.rc diff --git a/reactos/dll/cpl/access/lang/ru-RU.rc b/dll/cpl/access/lang/ru-RU.rc similarity index 100% rename from reactos/dll/cpl/access/lang/ru-RU.rc rename to dll/cpl/access/lang/ru-RU.rc diff --git a/reactos/dll/cpl/access/lang/sk-SK.rc b/dll/cpl/access/lang/sk-SK.rc similarity index 100% rename from reactos/dll/cpl/access/lang/sk-SK.rc rename to dll/cpl/access/lang/sk-SK.rc diff --git a/reactos/dll/cpl/access/lang/uk-UA.rc b/dll/cpl/access/lang/uk-UA.rc similarity index 100% rename from reactos/dll/cpl/access/lang/uk-UA.rc rename to dll/cpl/access/lang/uk-UA.rc diff --git a/reactos/dll/cpl/access/lang/zh-CN.rc b/dll/cpl/access/lang/zh-CN.rc similarity index 100% rename from reactos/dll/cpl/access/lang/zh-CN.rc rename to dll/cpl/access/lang/zh-CN.rc diff --git a/reactos/dll/cpl/access/mouse.c b/dll/cpl/access/mouse.c similarity index 100% rename from reactos/dll/cpl/access/mouse.c rename to dll/cpl/access/mouse.c diff --git a/reactos/dll/cpl/access/resource.h b/dll/cpl/access/resource.h similarity index 100% rename from reactos/dll/cpl/access/resource.h rename to dll/cpl/access/resource.h diff --git a/reactos/dll/cpl/access/resources/applet.ico b/dll/cpl/access/resources/applet.ico similarity index 100% rename from reactos/dll/cpl/access/resources/applet.ico rename to dll/cpl/access/resources/applet.ico diff --git a/reactos/dll/cpl/access/rsrc.rc b/dll/cpl/access/rsrc.rc similarity index 100% rename from reactos/dll/cpl/access/rsrc.rc rename to dll/cpl/access/rsrc.rc diff --git a/reactos/dll/cpl/access/sound.c b/dll/cpl/access/sound.c similarity index 100% rename from reactos/dll/cpl/access/sound.c rename to dll/cpl/access/sound.c diff --git a/reactos/dll/cpl/appwiz/CMakeLists.txt b/dll/cpl/appwiz/CMakeLists.txt similarity index 100% rename from reactos/dll/cpl/appwiz/CMakeLists.txt rename to dll/cpl/appwiz/CMakeLists.txt diff --git a/reactos/dll/cpl/appwiz/appwiz.c b/dll/cpl/appwiz/appwiz.c similarity index 100% rename from reactos/dll/cpl/appwiz/appwiz.c rename to dll/cpl/appwiz/appwiz.c diff --git a/reactos/dll/cpl/appwiz/appwiz.h b/dll/cpl/appwiz/appwiz.h similarity index 100% rename from reactos/dll/cpl/appwiz/appwiz.h rename to dll/cpl/appwiz/appwiz.h diff --git a/reactos/dll/cpl/appwiz/appwiz.rbuild b/dll/cpl/appwiz/appwiz.rbuild similarity index 100% rename from reactos/dll/cpl/appwiz/appwiz.rbuild rename to dll/cpl/appwiz/appwiz.rbuild diff --git a/reactos/dll/cpl/appwiz/appwiz.rc b/dll/cpl/appwiz/appwiz.rc similarity index 100% rename from reactos/dll/cpl/appwiz/appwiz.rc rename to dll/cpl/appwiz/appwiz.rc diff --git a/reactos/dll/cpl/appwiz/appwiz.spec b/dll/cpl/appwiz/appwiz.spec similarity index 100% rename from reactos/dll/cpl/appwiz/appwiz.spec rename to dll/cpl/appwiz/appwiz.spec diff --git a/reactos/dll/cpl/appwiz/createlink.c b/dll/cpl/appwiz/createlink.c similarity index 100% rename from reactos/dll/cpl/appwiz/createlink.c rename to dll/cpl/appwiz/createlink.c diff --git a/reactos/dll/cpl/appwiz/lang/bg-BG.rc b/dll/cpl/appwiz/lang/bg-BG.rc similarity index 100% rename from reactos/dll/cpl/appwiz/lang/bg-BG.rc rename to dll/cpl/appwiz/lang/bg-BG.rc diff --git a/reactos/dll/cpl/appwiz/lang/cs-CZ.rc b/dll/cpl/appwiz/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/cpl/appwiz/lang/cs-CZ.rc rename to dll/cpl/appwiz/lang/cs-CZ.rc diff --git a/reactos/dll/cpl/appwiz/lang/de-DE.rc b/dll/cpl/appwiz/lang/de-DE.rc similarity index 100% rename from reactos/dll/cpl/appwiz/lang/de-DE.rc rename to dll/cpl/appwiz/lang/de-DE.rc diff --git a/reactos/dll/cpl/appwiz/lang/el-GR.rc b/dll/cpl/appwiz/lang/el-GR.rc similarity index 100% rename from reactos/dll/cpl/appwiz/lang/el-GR.rc rename to dll/cpl/appwiz/lang/el-GR.rc diff --git a/reactos/dll/cpl/appwiz/lang/en-US.rc b/dll/cpl/appwiz/lang/en-US.rc similarity index 100% rename from reactos/dll/cpl/appwiz/lang/en-US.rc rename to dll/cpl/appwiz/lang/en-US.rc diff --git a/reactos/dll/cpl/appwiz/lang/es-ES.rc b/dll/cpl/appwiz/lang/es-ES.rc similarity index 100% rename from reactos/dll/cpl/appwiz/lang/es-ES.rc rename to dll/cpl/appwiz/lang/es-ES.rc diff --git a/reactos/dll/cpl/appwiz/lang/fr-FR.rc b/dll/cpl/appwiz/lang/fr-FR.rc similarity index 100% rename from reactos/dll/cpl/appwiz/lang/fr-FR.rc rename to dll/cpl/appwiz/lang/fr-FR.rc diff --git a/reactos/dll/cpl/appwiz/lang/it-IT.rc b/dll/cpl/appwiz/lang/it-IT.rc similarity index 100% rename from reactos/dll/cpl/appwiz/lang/it-IT.rc rename to dll/cpl/appwiz/lang/it-IT.rc diff --git a/reactos/dll/cpl/appwiz/lang/no-NO.rc b/dll/cpl/appwiz/lang/no-NO.rc similarity index 100% rename from reactos/dll/cpl/appwiz/lang/no-NO.rc rename to dll/cpl/appwiz/lang/no-NO.rc diff --git a/reactos/dll/cpl/appwiz/lang/pl-PL.rc b/dll/cpl/appwiz/lang/pl-PL.rc similarity index 100% rename from reactos/dll/cpl/appwiz/lang/pl-PL.rc rename to dll/cpl/appwiz/lang/pl-PL.rc diff --git a/reactos/dll/cpl/appwiz/lang/ro-RO.rc b/dll/cpl/appwiz/lang/ro-RO.rc similarity index 100% rename from reactos/dll/cpl/appwiz/lang/ro-RO.rc rename to dll/cpl/appwiz/lang/ro-RO.rc diff --git a/reactos/dll/cpl/appwiz/lang/ru-RU.rc b/dll/cpl/appwiz/lang/ru-RU.rc similarity index 100% rename from reactos/dll/cpl/appwiz/lang/ru-RU.rc rename to dll/cpl/appwiz/lang/ru-RU.rc diff --git a/reactos/dll/cpl/appwiz/lang/sk-SK.rc b/dll/cpl/appwiz/lang/sk-SK.rc similarity index 100% rename from reactos/dll/cpl/appwiz/lang/sk-SK.rc rename to dll/cpl/appwiz/lang/sk-SK.rc diff --git a/reactos/dll/cpl/appwiz/lang/uk-UA.rc b/dll/cpl/appwiz/lang/uk-UA.rc similarity index 100% rename from reactos/dll/cpl/appwiz/lang/uk-UA.rc rename to dll/cpl/appwiz/lang/uk-UA.rc diff --git a/reactos/dll/cpl/appwiz/lang/zh-CN.rc b/dll/cpl/appwiz/lang/zh-CN.rc similarity index 100% rename from reactos/dll/cpl/appwiz/lang/zh-CN.rc rename to dll/cpl/appwiz/lang/zh-CN.rc diff --git a/reactos/dll/cpl/appwiz/resource.h b/dll/cpl/appwiz/resource.h similarity index 100% rename from reactos/dll/cpl/appwiz/resource.h rename to dll/cpl/appwiz/resource.h diff --git a/reactos/dll/cpl/appwiz/resources/1501.ico b/dll/cpl/appwiz/resources/1501.ico similarity index 100% rename from reactos/dll/cpl/appwiz/resources/1501.ico rename to dll/cpl/appwiz/resources/1501.ico diff --git a/reactos/dll/cpl/appwiz/resources/1502.ico b/dll/cpl/appwiz/resources/1502.ico similarity index 100% rename from reactos/dll/cpl/appwiz/resources/1502.ico rename to dll/cpl/appwiz/resources/1502.ico diff --git a/reactos/dll/cpl/appwiz/resources/1503.ico b/dll/cpl/appwiz/resources/1503.ico similarity index 100% rename from reactos/dll/cpl/appwiz/resources/1503.ico rename to dll/cpl/appwiz/resources/1503.ico diff --git a/reactos/dll/cpl/appwiz/resources/1504.ico b/dll/cpl/appwiz/resources/1504.ico similarity index 100% rename from reactos/dll/cpl/appwiz/resources/1504.ico rename to dll/cpl/appwiz/resources/1504.ico diff --git a/reactos/dll/cpl/appwiz/resources/1505.ico b/dll/cpl/appwiz/resources/1505.ico similarity index 100% rename from reactos/dll/cpl/appwiz/resources/1505.ico rename to dll/cpl/appwiz/resources/1505.ico diff --git a/reactos/dll/cpl/appwiz/resources/applet.ico b/dll/cpl/appwiz/resources/applet.ico similarity index 100% rename from reactos/dll/cpl/appwiz/resources/applet.ico rename to dll/cpl/appwiz/resources/applet.ico diff --git a/reactos/dll/cpl/appwiz/resources/watermark.bmp b/dll/cpl/appwiz/resources/watermark.bmp similarity index 100% rename from reactos/dll/cpl/appwiz/resources/watermark.bmp rename to dll/cpl/appwiz/resources/watermark.bmp diff --git a/reactos/dll/cpl/appwiz/rsrc.rc b/dll/cpl/appwiz/rsrc.rc similarity index 100% rename from reactos/dll/cpl/appwiz/rsrc.rc rename to dll/cpl/appwiz/rsrc.rc diff --git a/reactos/dll/cpl/console/CMakeLists.txt b/dll/cpl/console/CMakeLists.txt similarity index 100% rename from reactos/dll/cpl/console/CMakeLists.txt rename to dll/cpl/console/CMakeLists.txt diff --git a/reactos/dll/cpl/console/colors.c b/dll/cpl/console/colors.c similarity index 100% rename from reactos/dll/cpl/console/colors.c rename to dll/cpl/console/colors.c diff --git a/reactos/dll/cpl/console/console.c b/dll/cpl/console/console.c similarity index 100% rename from reactos/dll/cpl/console/console.c rename to dll/cpl/console/console.c diff --git a/reactos/dll/cpl/console/console.h b/dll/cpl/console/console.h similarity index 100% rename from reactos/dll/cpl/console/console.h rename to dll/cpl/console/console.h diff --git a/reactos/dll/cpl/console/console.rbuild b/dll/cpl/console/console.rbuild similarity index 100% rename from reactos/dll/cpl/console/console.rbuild rename to dll/cpl/console/console.rbuild diff --git a/reactos/dll/cpl/console/console.rc b/dll/cpl/console/console.rc similarity index 100% rename from reactos/dll/cpl/console/console.rc rename to dll/cpl/console/console.rc diff --git a/reactos/dll/cpl/console/console.spec b/dll/cpl/console/console.spec similarity index 100% rename from reactos/dll/cpl/console/console.spec rename to dll/cpl/console/console.spec diff --git a/reactos/dll/cpl/console/font.c b/dll/cpl/console/font.c similarity index 100% rename from reactos/dll/cpl/console/font.c rename to dll/cpl/console/font.c diff --git a/reactos/dll/cpl/console/lang/bg-BG.rc b/dll/cpl/console/lang/bg-BG.rc similarity index 100% rename from reactos/dll/cpl/console/lang/bg-BG.rc rename to dll/cpl/console/lang/bg-BG.rc diff --git a/reactos/dll/cpl/console/lang/cs-CZ.rc b/dll/cpl/console/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/cpl/console/lang/cs-CZ.rc rename to dll/cpl/console/lang/cs-CZ.rc diff --git a/reactos/dll/cpl/console/lang/de-DE.rc b/dll/cpl/console/lang/de-DE.rc similarity index 100% rename from reactos/dll/cpl/console/lang/de-DE.rc rename to dll/cpl/console/lang/de-DE.rc diff --git a/reactos/dll/cpl/console/lang/en-US.rc b/dll/cpl/console/lang/en-US.rc similarity index 100% rename from reactos/dll/cpl/console/lang/en-US.rc rename to dll/cpl/console/lang/en-US.rc diff --git a/reactos/dll/cpl/console/lang/es-ES.rc b/dll/cpl/console/lang/es-ES.rc similarity index 100% rename from reactos/dll/cpl/console/lang/es-ES.rc rename to dll/cpl/console/lang/es-ES.rc diff --git a/reactos/dll/cpl/console/lang/fr-FR.rc b/dll/cpl/console/lang/fr-FR.rc similarity index 100% rename from reactos/dll/cpl/console/lang/fr-FR.rc rename to dll/cpl/console/lang/fr-FR.rc diff --git a/reactos/dll/cpl/console/lang/id-ID.rc b/dll/cpl/console/lang/id-ID.rc similarity index 100% rename from reactos/dll/cpl/console/lang/id-ID.rc rename to dll/cpl/console/lang/id-ID.rc diff --git a/reactos/dll/cpl/console/lang/it-IT.rc b/dll/cpl/console/lang/it-IT.rc similarity index 100% rename from reactos/dll/cpl/console/lang/it-IT.rc rename to dll/cpl/console/lang/it-IT.rc diff --git a/reactos/dll/cpl/console/lang/no-NO.rc b/dll/cpl/console/lang/no-NO.rc similarity index 100% rename from reactos/dll/cpl/console/lang/no-NO.rc rename to dll/cpl/console/lang/no-NO.rc diff --git a/reactos/dll/cpl/console/lang/pl-PL.rc b/dll/cpl/console/lang/pl-PL.rc similarity index 100% rename from reactos/dll/cpl/console/lang/pl-PL.rc rename to dll/cpl/console/lang/pl-PL.rc diff --git a/reactos/dll/cpl/console/lang/ro-RO.rc b/dll/cpl/console/lang/ro-RO.rc similarity index 100% rename from reactos/dll/cpl/console/lang/ro-RO.rc rename to dll/cpl/console/lang/ro-RO.rc diff --git a/reactos/dll/cpl/console/lang/ru-RU.rc b/dll/cpl/console/lang/ru-RU.rc similarity index 100% rename from reactos/dll/cpl/console/lang/ru-RU.rc rename to dll/cpl/console/lang/ru-RU.rc diff --git a/reactos/dll/cpl/console/lang/sk-SK.rc b/dll/cpl/console/lang/sk-SK.rc similarity index 100% rename from reactos/dll/cpl/console/lang/sk-SK.rc rename to dll/cpl/console/lang/sk-SK.rc diff --git a/reactos/dll/cpl/console/lang/uk-UA.rc b/dll/cpl/console/lang/uk-UA.rc similarity index 100% rename from reactos/dll/cpl/console/lang/uk-UA.rc rename to dll/cpl/console/lang/uk-UA.rc diff --git a/reactos/dll/cpl/console/lang/zh-CN.rc b/dll/cpl/console/lang/zh-CN.rc similarity index 100% rename from reactos/dll/cpl/console/lang/zh-CN.rc rename to dll/cpl/console/lang/zh-CN.rc diff --git a/reactos/dll/cpl/console/layout.c b/dll/cpl/console/layout.c similarity index 100% rename from reactos/dll/cpl/console/layout.c rename to dll/cpl/console/layout.c diff --git a/reactos/dll/cpl/console/options.c b/dll/cpl/console/options.c similarity index 100% rename from reactos/dll/cpl/console/options.c rename to dll/cpl/console/options.c diff --git a/reactos/dll/cpl/console/resource.h b/dll/cpl/console/resource.h similarity index 100% rename from reactos/dll/cpl/console/resource.h rename to dll/cpl/console/resource.h diff --git a/reactos/dll/cpl/console/rsrc.rc b/dll/cpl/console/rsrc.rc similarity index 100% rename from reactos/dll/cpl/console/rsrc.rc rename to dll/cpl/console/rsrc.rc diff --git a/reactos/dll/cpl/cpl.rbuild b/dll/cpl/cpl.rbuild similarity index 100% rename from reactos/dll/cpl/cpl.rbuild rename to dll/cpl/cpl.rbuild diff --git a/reactos/dll/cpl/desk/CMakeLists.txt b/dll/cpl/desk/CMakeLists.txt similarity index 100% rename from reactos/dll/cpl/desk/CMakeLists.txt rename to dll/cpl/desk/CMakeLists.txt diff --git a/reactos/dll/cpl/desk/advappdlg.c b/dll/cpl/desk/advappdlg.c similarity index 100% rename from reactos/dll/cpl/desk/advappdlg.c rename to dll/cpl/desk/advappdlg.c diff --git a/reactos/dll/cpl/desk/advmon.c b/dll/cpl/desk/advmon.c similarity index 100% rename from reactos/dll/cpl/desk/advmon.c rename to dll/cpl/desk/advmon.c diff --git a/reactos/dll/cpl/desk/appearance.c b/dll/cpl/desk/appearance.c similarity index 100% rename from reactos/dll/cpl/desk/appearance.c rename to dll/cpl/desk/appearance.c diff --git a/reactos/dll/cpl/desk/appearance.h b/dll/cpl/desk/appearance.h similarity index 100% rename from reactos/dll/cpl/desk/appearance.h rename to dll/cpl/desk/appearance.h diff --git a/reactos/dll/cpl/desk/background.c b/dll/cpl/desk/background.c similarity index 100% rename from reactos/dll/cpl/desk/background.c rename to dll/cpl/desk/background.c diff --git a/reactos/dll/cpl/desk/classinst.c b/dll/cpl/desk/classinst.c similarity index 100% rename from reactos/dll/cpl/desk/classinst.c rename to dll/cpl/desk/classinst.c diff --git a/reactos/dll/cpl/desk/desk.c b/dll/cpl/desk/desk.c similarity index 100% rename from reactos/dll/cpl/desk/desk.c rename to dll/cpl/desk/desk.c diff --git a/reactos/dll/cpl/desk/desk.h b/dll/cpl/desk/desk.h similarity index 100% rename from reactos/dll/cpl/desk/desk.h rename to dll/cpl/desk/desk.h diff --git a/reactos/dll/cpl/desk/desk.rbuild b/dll/cpl/desk/desk.rbuild similarity index 100% rename from reactos/dll/cpl/desk/desk.rbuild rename to dll/cpl/desk/desk.rbuild diff --git a/reactos/dll/cpl/desk/desk.rc b/dll/cpl/desk/desk.rc similarity index 100% rename from reactos/dll/cpl/desk/desk.rc rename to dll/cpl/desk/desk.rc diff --git a/reactos/dll/cpl/desk/desk.spec b/dll/cpl/desk/desk.spec similarity index 100% rename from reactos/dll/cpl/desk/desk.spec rename to dll/cpl/desk/desk.spec diff --git a/reactos/dll/cpl/desk/devsett.c b/dll/cpl/desk/devsett.c similarity index 100% rename from reactos/dll/cpl/desk/devsett.c rename to dll/cpl/desk/devsett.c diff --git a/reactos/dll/cpl/desk/dibitmap.c b/dll/cpl/desk/dibitmap.c similarity index 100% rename from reactos/dll/cpl/desk/dibitmap.c rename to dll/cpl/desk/dibitmap.c diff --git a/reactos/dll/cpl/desk/draw.c b/dll/cpl/desk/draw.c similarity index 100% rename from reactos/dll/cpl/desk/draw.c rename to dll/cpl/desk/draw.c diff --git a/reactos/dll/cpl/desk/draw.h b/dll/cpl/desk/draw.h similarity index 100% rename from reactos/dll/cpl/desk/draw.h rename to dll/cpl/desk/draw.h diff --git a/reactos/dll/cpl/desk/effappdlg.c b/dll/cpl/desk/effappdlg.c similarity index 100% rename from reactos/dll/cpl/desk/effappdlg.c rename to dll/cpl/desk/effappdlg.c diff --git a/reactos/dll/cpl/desk/general.c b/dll/cpl/desk/general.c similarity index 100% rename from reactos/dll/cpl/desk/general.c rename to dll/cpl/desk/general.c diff --git a/reactos/dll/cpl/desk/lang/bg-BG.rc b/dll/cpl/desk/lang/bg-BG.rc similarity index 100% rename from reactos/dll/cpl/desk/lang/bg-BG.rc rename to dll/cpl/desk/lang/bg-BG.rc diff --git a/reactos/dll/cpl/desk/lang/cs-CZ.rc b/dll/cpl/desk/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/cpl/desk/lang/cs-CZ.rc rename to dll/cpl/desk/lang/cs-CZ.rc diff --git a/reactos/dll/cpl/desk/lang/de-DE.rc b/dll/cpl/desk/lang/de-DE.rc similarity index 100% rename from reactos/dll/cpl/desk/lang/de-DE.rc rename to dll/cpl/desk/lang/de-DE.rc diff --git a/reactos/dll/cpl/desk/lang/el-GR.rc b/dll/cpl/desk/lang/el-GR.rc similarity index 100% rename from reactos/dll/cpl/desk/lang/el-GR.rc rename to dll/cpl/desk/lang/el-GR.rc diff --git a/reactos/dll/cpl/desk/lang/en-US.rc b/dll/cpl/desk/lang/en-US.rc similarity index 100% rename from reactos/dll/cpl/desk/lang/en-US.rc rename to dll/cpl/desk/lang/en-US.rc diff --git a/reactos/dll/cpl/desk/lang/es-ES.rc b/dll/cpl/desk/lang/es-ES.rc similarity index 100% rename from reactos/dll/cpl/desk/lang/es-ES.rc rename to dll/cpl/desk/lang/es-ES.rc diff --git a/reactos/dll/cpl/desk/lang/fr-FR.rc b/dll/cpl/desk/lang/fr-FR.rc similarity index 100% rename from reactos/dll/cpl/desk/lang/fr-FR.rc rename to dll/cpl/desk/lang/fr-FR.rc diff --git a/reactos/dll/cpl/desk/lang/hu-HU.rc b/dll/cpl/desk/lang/hu-HU.rc similarity index 100% rename from reactos/dll/cpl/desk/lang/hu-HU.rc rename to dll/cpl/desk/lang/hu-HU.rc diff --git a/reactos/dll/cpl/desk/lang/id-ID.rc b/dll/cpl/desk/lang/id-ID.rc similarity index 100% rename from reactos/dll/cpl/desk/lang/id-ID.rc rename to dll/cpl/desk/lang/id-ID.rc diff --git a/reactos/dll/cpl/desk/lang/it-IT.rc b/dll/cpl/desk/lang/it-IT.rc similarity index 100% rename from reactos/dll/cpl/desk/lang/it-IT.rc rename to dll/cpl/desk/lang/it-IT.rc diff --git a/reactos/dll/cpl/desk/lang/ja-JP.rc b/dll/cpl/desk/lang/ja-JP.rc similarity index 100% rename from reactos/dll/cpl/desk/lang/ja-JP.rc rename to dll/cpl/desk/lang/ja-JP.rc diff --git a/reactos/dll/cpl/desk/lang/nl-NL.rc b/dll/cpl/desk/lang/nl-NL.rc similarity index 100% rename from reactos/dll/cpl/desk/lang/nl-NL.rc rename to dll/cpl/desk/lang/nl-NL.rc diff --git a/reactos/dll/cpl/desk/lang/no-NO.rc b/dll/cpl/desk/lang/no-NO.rc similarity index 100% rename from reactos/dll/cpl/desk/lang/no-NO.rc rename to dll/cpl/desk/lang/no-NO.rc diff --git a/reactos/dll/cpl/desk/lang/pl-PL.rc b/dll/cpl/desk/lang/pl-PL.rc similarity index 100% rename from reactos/dll/cpl/desk/lang/pl-PL.rc rename to dll/cpl/desk/lang/pl-PL.rc diff --git a/reactos/dll/cpl/desk/lang/ro-RO.rc b/dll/cpl/desk/lang/ro-RO.rc similarity index 100% rename from reactos/dll/cpl/desk/lang/ro-RO.rc rename to dll/cpl/desk/lang/ro-RO.rc diff --git a/reactos/dll/cpl/desk/lang/ru-RU.rc b/dll/cpl/desk/lang/ru-RU.rc similarity index 100% rename from reactos/dll/cpl/desk/lang/ru-RU.rc rename to dll/cpl/desk/lang/ru-RU.rc diff --git a/reactos/dll/cpl/desk/lang/sk-SK.rc b/dll/cpl/desk/lang/sk-SK.rc similarity index 100% rename from reactos/dll/cpl/desk/lang/sk-SK.rc rename to dll/cpl/desk/lang/sk-SK.rc diff --git a/reactos/dll/cpl/desk/lang/sv-SE.rc b/dll/cpl/desk/lang/sv-SE.rc similarity index 100% rename from reactos/dll/cpl/desk/lang/sv-SE.rc rename to dll/cpl/desk/lang/sv-SE.rc diff --git a/reactos/dll/cpl/desk/lang/uk-UA.rc b/dll/cpl/desk/lang/uk-UA.rc similarity index 100% rename from reactos/dll/cpl/desk/lang/uk-UA.rc rename to dll/cpl/desk/lang/uk-UA.rc diff --git a/reactos/dll/cpl/desk/lang/zh-CN.rc b/dll/cpl/desk/lang/zh-CN.rc similarity index 100% rename from reactos/dll/cpl/desk/lang/zh-CN.rc rename to dll/cpl/desk/lang/zh-CN.rc diff --git a/reactos/dll/cpl/desk/misc.c b/dll/cpl/desk/misc.c similarity index 100% rename from reactos/dll/cpl/desk/misc.c rename to dll/cpl/desk/misc.c diff --git a/reactos/dll/cpl/desk/monslctl.c b/dll/cpl/desk/monslctl.c similarity index 100% rename from reactos/dll/cpl/desk/monslctl.c rename to dll/cpl/desk/monslctl.c diff --git a/reactos/dll/cpl/desk/monslctl.h b/dll/cpl/desk/monslctl.h similarity index 100% rename from reactos/dll/cpl/desk/monslctl.h rename to dll/cpl/desk/monslctl.h diff --git a/reactos/dll/cpl/desk/preview.c b/dll/cpl/desk/preview.c similarity index 100% rename from reactos/dll/cpl/desk/preview.c rename to dll/cpl/desk/preview.c diff --git a/reactos/dll/cpl/desk/preview.h b/dll/cpl/desk/preview.h similarity index 100% rename from reactos/dll/cpl/desk/preview.h rename to dll/cpl/desk/preview.h diff --git a/reactos/dll/cpl/desk/resource.h b/dll/cpl/desk/resource.h similarity index 100% rename from reactos/dll/cpl/desk/resource.h rename to dll/cpl/desk/resource.h diff --git a/reactos/dll/cpl/desk/resources/applet.ico b/dll/cpl/desk/resources/applet.ico similarity index 100% rename from reactos/dll/cpl/desk/resources/applet.ico rename to dll/cpl/desk/resources/applet.ico diff --git a/reactos/dll/cpl/desk/resources/monitor.bmp b/dll/cpl/desk/resources/monitor.bmp similarity index 100% rename from reactos/dll/cpl/desk/resources/monitor.bmp rename to dll/cpl/desk/resources/monitor.bmp diff --git a/reactos/dll/cpl/desk/resources/spectrum_16.bmp b/dll/cpl/desk/resources/spectrum_16.bmp similarity index 100% rename from reactos/dll/cpl/desk/resources/spectrum_16.bmp rename to dll/cpl/desk/resources/spectrum_16.bmp diff --git a/reactos/dll/cpl/desk/resources/spectrum_4.bmp b/dll/cpl/desk/resources/spectrum_4.bmp similarity index 100% rename from reactos/dll/cpl/desk/resources/spectrum_4.bmp rename to dll/cpl/desk/resources/spectrum_4.bmp diff --git a/reactos/dll/cpl/desk/resources/spectrum_8.bmp b/dll/cpl/desk/resources/spectrum_8.bmp similarity index 100% rename from reactos/dll/cpl/desk/resources/spectrum_8.bmp rename to dll/cpl/desk/resources/spectrum_8.bmp diff --git a/reactos/dll/cpl/desk/rsrc.rc b/dll/cpl/desk/rsrc.rc similarity index 100% rename from reactos/dll/cpl/desk/rsrc.rc rename to dll/cpl/desk/rsrc.rc diff --git a/reactos/dll/cpl/desk/screensaver.c b/dll/cpl/desk/screensaver.c similarity index 100% rename from reactos/dll/cpl/desk/screensaver.c rename to dll/cpl/desk/screensaver.c diff --git a/reactos/dll/cpl/desk/settings.c b/dll/cpl/desk/settings.c similarity index 100% rename from reactos/dll/cpl/desk/settings.c rename to dll/cpl/desk/settings.c diff --git a/reactos/dll/cpl/desk/theme.c b/dll/cpl/desk/theme.c similarity index 100% rename from reactos/dll/cpl/desk/theme.c rename to dll/cpl/desk/theme.c diff --git a/reactos/dll/cpl/hdwwiz/CMakeLists.txt b/dll/cpl/hdwwiz/CMakeLists.txt similarity index 100% rename from reactos/dll/cpl/hdwwiz/CMakeLists.txt rename to dll/cpl/hdwwiz/CMakeLists.txt diff --git a/reactos/dll/cpl/hdwwiz/hdwwiz.c b/dll/cpl/hdwwiz/hdwwiz.c similarity index 100% rename from reactos/dll/cpl/hdwwiz/hdwwiz.c rename to dll/cpl/hdwwiz/hdwwiz.c diff --git a/reactos/dll/cpl/hdwwiz/hdwwiz.h b/dll/cpl/hdwwiz/hdwwiz.h similarity index 100% rename from reactos/dll/cpl/hdwwiz/hdwwiz.h rename to dll/cpl/hdwwiz/hdwwiz.h diff --git a/reactos/dll/cpl/hdwwiz/hdwwiz.rbuild b/dll/cpl/hdwwiz/hdwwiz.rbuild similarity index 100% rename from reactos/dll/cpl/hdwwiz/hdwwiz.rbuild rename to dll/cpl/hdwwiz/hdwwiz.rbuild diff --git a/reactos/dll/cpl/hdwwiz/hdwwiz.rc b/dll/cpl/hdwwiz/hdwwiz.rc similarity index 100% rename from reactos/dll/cpl/hdwwiz/hdwwiz.rc rename to dll/cpl/hdwwiz/hdwwiz.rc diff --git a/reactos/dll/cpl/hdwwiz/hdwwiz.spec b/dll/cpl/hdwwiz/hdwwiz.spec similarity index 100% rename from reactos/dll/cpl/hdwwiz/hdwwiz.spec rename to dll/cpl/hdwwiz/hdwwiz.spec diff --git a/reactos/dll/cpl/hdwwiz/lang/bg-BG.rc b/dll/cpl/hdwwiz/lang/bg-BG.rc similarity index 100% rename from reactos/dll/cpl/hdwwiz/lang/bg-BG.rc rename to dll/cpl/hdwwiz/lang/bg-BG.rc diff --git a/reactos/dll/cpl/hdwwiz/lang/cs-CZ.rc b/dll/cpl/hdwwiz/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/cpl/hdwwiz/lang/cs-CZ.rc rename to dll/cpl/hdwwiz/lang/cs-CZ.rc diff --git a/reactos/dll/cpl/hdwwiz/lang/de-DE.rc b/dll/cpl/hdwwiz/lang/de-DE.rc similarity index 100% rename from reactos/dll/cpl/hdwwiz/lang/de-DE.rc rename to dll/cpl/hdwwiz/lang/de-DE.rc diff --git a/reactos/dll/cpl/hdwwiz/lang/el-GR.rc b/dll/cpl/hdwwiz/lang/el-GR.rc similarity index 100% rename from reactos/dll/cpl/hdwwiz/lang/el-GR.rc rename to dll/cpl/hdwwiz/lang/el-GR.rc diff --git a/reactos/dll/cpl/hdwwiz/lang/en-US.rc b/dll/cpl/hdwwiz/lang/en-US.rc similarity index 100% rename from reactos/dll/cpl/hdwwiz/lang/en-US.rc rename to dll/cpl/hdwwiz/lang/en-US.rc diff --git a/reactos/dll/cpl/hdwwiz/lang/es-ES.rc b/dll/cpl/hdwwiz/lang/es-ES.rc similarity index 100% rename from reactos/dll/cpl/hdwwiz/lang/es-ES.rc rename to dll/cpl/hdwwiz/lang/es-ES.rc diff --git a/reactos/dll/cpl/hdwwiz/lang/fr-FR.rc b/dll/cpl/hdwwiz/lang/fr-FR.rc similarity index 100% rename from reactos/dll/cpl/hdwwiz/lang/fr-FR.rc rename to dll/cpl/hdwwiz/lang/fr-FR.rc diff --git a/reactos/dll/cpl/hdwwiz/lang/hu-HU.rc b/dll/cpl/hdwwiz/lang/hu-HU.rc similarity index 100% rename from reactos/dll/cpl/hdwwiz/lang/hu-HU.rc rename to dll/cpl/hdwwiz/lang/hu-HU.rc diff --git a/reactos/dll/cpl/hdwwiz/lang/id-ID.rc b/dll/cpl/hdwwiz/lang/id-ID.rc similarity index 100% rename from reactos/dll/cpl/hdwwiz/lang/id-ID.rc rename to dll/cpl/hdwwiz/lang/id-ID.rc diff --git a/reactos/dll/cpl/hdwwiz/lang/it-IT.rc b/dll/cpl/hdwwiz/lang/it-IT.rc similarity index 100% rename from reactos/dll/cpl/hdwwiz/lang/it-IT.rc rename to dll/cpl/hdwwiz/lang/it-IT.rc diff --git a/reactos/dll/cpl/hdwwiz/lang/ja-JP.rc b/dll/cpl/hdwwiz/lang/ja-JP.rc similarity index 100% rename from reactos/dll/cpl/hdwwiz/lang/ja-JP.rc rename to dll/cpl/hdwwiz/lang/ja-JP.rc diff --git a/reactos/dll/cpl/hdwwiz/lang/nl-NL.rc b/dll/cpl/hdwwiz/lang/nl-NL.rc similarity index 100% rename from reactos/dll/cpl/hdwwiz/lang/nl-NL.rc rename to dll/cpl/hdwwiz/lang/nl-NL.rc diff --git a/reactos/dll/cpl/hdwwiz/lang/no-NO.rc b/dll/cpl/hdwwiz/lang/no-NO.rc similarity index 100% rename from reactos/dll/cpl/hdwwiz/lang/no-NO.rc rename to dll/cpl/hdwwiz/lang/no-NO.rc diff --git a/reactos/dll/cpl/hdwwiz/lang/pl-PL.rc b/dll/cpl/hdwwiz/lang/pl-PL.rc similarity index 100% rename from reactos/dll/cpl/hdwwiz/lang/pl-PL.rc rename to dll/cpl/hdwwiz/lang/pl-PL.rc diff --git a/reactos/dll/cpl/hdwwiz/lang/pt-BR.rc b/dll/cpl/hdwwiz/lang/pt-BR.rc similarity index 100% rename from reactos/dll/cpl/hdwwiz/lang/pt-BR.rc rename to dll/cpl/hdwwiz/lang/pt-BR.rc diff --git a/reactos/dll/cpl/hdwwiz/lang/ro-RO.rc b/dll/cpl/hdwwiz/lang/ro-RO.rc similarity index 100% rename from reactos/dll/cpl/hdwwiz/lang/ro-RO.rc rename to dll/cpl/hdwwiz/lang/ro-RO.rc diff --git a/reactos/dll/cpl/hdwwiz/lang/ru-RU.rc b/dll/cpl/hdwwiz/lang/ru-RU.rc similarity index 100% rename from reactos/dll/cpl/hdwwiz/lang/ru-RU.rc rename to dll/cpl/hdwwiz/lang/ru-RU.rc diff --git a/reactos/dll/cpl/hdwwiz/lang/sk-SK.rc b/dll/cpl/hdwwiz/lang/sk-SK.rc similarity index 100% rename from reactos/dll/cpl/hdwwiz/lang/sk-SK.rc rename to dll/cpl/hdwwiz/lang/sk-SK.rc diff --git a/reactos/dll/cpl/hdwwiz/lang/th-TH.rc b/dll/cpl/hdwwiz/lang/th-TH.rc similarity index 100% rename from reactos/dll/cpl/hdwwiz/lang/th-TH.rc rename to dll/cpl/hdwwiz/lang/th-TH.rc diff --git a/reactos/dll/cpl/hdwwiz/lang/uk-UA.rc b/dll/cpl/hdwwiz/lang/uk-UA.rc similarity index 100% rename from reactos/dll/cpl/hdwwiz/lang/uk-UA.rc rename to dll/cpl/hdwwiz/lang/uk-UA.rc diff --git a/reactos/dll/cpl/hdwwiz/lang/zh-CN.rc b/dll/cpl/hdwwiz/lang/zh-CN.rc similarity index 100% rename from reactos/dll/cpl/hdwwiz/lang/zh-CN.rc rename to dll/cpl/hdwwiz/lang/zh-CN.rc diff --git a/reactos/dll/cpl/hdwwiz/resource.h b/dll/cpl/hdwwiz/resource.h similarity index 100% rename from reactos/dll/cpl/hdwwiz/resource.h rename to dll/cpl/hdwwiz/resource.h diff --git a/reactos/dll/cpl/hdwwiz/resources/applet.ico b/dll/cpl/hdwwiz/resources/applet.ico similarity index 100% rename from reactos/dll/cpl/hdwwiz/resources/applet.ico rename to dll/cpl/hdwwiz/resources/applet.ico diff --git a/reactos/dll/cpl/hdwwiz/resources/header.bmp b/dll/cpl/hdwwiz/resources/header.bmp similarity index 100% rename from reactos/dll/cpl/hdwwiz/resources/header.bmp rename to dll/cpl/hdwwiz/resources/header.bmp diff --git a/reactos/dll/cpl/hdwwiz/resources/search.ico b/dll/cpl/hdwwiz/resources/search.ico similarity index 100% rename from reactos/dll/cpl/hdwwiz/resources/search.ico rename to dll/cpl/hdwwiz/resources/search.ico diff --git a/reactos/dll/cpl/hdwwiz/resources/warning.ico b/dll/cpl/hdwwiz/resources/warning.ico similarity index 100% rename from reactos/dll/cpl/hdwwiz/resources/warning.ico rename to dll/cpl/hdwwiz/resources/warning.ico diff --git a/reactos/dll/cpl/hdwwiz/resources/watermark.bmp b/dll/cpl/hdwwiz/resources/watermark.bmp similarity index 100% rename from reactos/dll/cpl/hdwwiz/resources/watermark.bmp rename to dll/cpl/hdwwiz/resources/watermark.bmp diff --git a/reactos/dll/cpl/hdwwiz/rsrc.rc b/dll/cpl/hdwwiz/rsrc.rc similarity index 100% rename from reactos/dll/cpl/hdwwiz/rsrc.rc rename to dll/cpl/hdwwiz/rsrc.rc diff --git a/reactos/dll/cpl/inetcpl/CMakeLists.txt b/dll/cpl/inetcpl/CMakeLists.txt similarity index 100% rename from reactos/dll/cpl/inetcpl/CMakeLists.txt rename to dll/cpl/inetcpl/CMakeLists.txt diff --git a/reactos/dll/cpl/inetcpl/content.c b/dll/cpl/inetcpl/content.c similarity index 100% rename from reactos/dll/cpl/inetcpl/content.c rename to dll/cpl/inetcpl/content.c diff --git a/reactos/dll/cpl/inetcpl/general.c b/dll/cpl/inetcpl/general.c similarity index 100% rename from reactos/dll/cpl/inetcpl/general.c rename to dll/cpl/inetcpl/general.c diff --git a/reactos/dll/cpl/inetcpl/inetcpl.c b/dll/cpl/inetcpl/inetcpl.c similarity index 100% rename from reactos/dll/cpl/inetcpl/inetcpl.c rename to dll/cpl/inetcpl/inetcpl.c diff --git a/reactos/dll/cpl/inetcpl/inetcpl.h b/dll/cpl/inetcpl/inetcpl.h similarity index 100% rename from reactos/dll/cpl/inetcpl/inetcpl.h rename to dll/cpl/inetcpl/inetcpl.h diff --git a/reactos/dll/cpl/inetcpl/inetcpl.ico b/dll/cpl/inetcpl/inetcpl.ico similarity index 100% rename from reactos/dll/cpl/inetcpl/inetcpl.ico rename to dll/cpl/inetcpl/inetcpl.ico diff --git a/reactos/dll/cpl/inetcpl/inetcpl.rbuild b/dll/cpl/inetcpl/inetcpl.rbuild similarity index 100% rename from reactos/dll/cpl/inetcpl/inetcpl.rbuild rename to dll/cpl/inetcpl/inetcpl.rbuild diff --git a/reactos/dll/cpl/inetcpl/inetcpl.rc b/dll/cpl/inetcpl/inetcpl.rc similarity index 100% rename from reactos/dll/cpl/inetcpl/inetcpl.rc rename to dll/cpl/inetcpl/inetcpl.rc diff --git a/reactos/dll/cpl/inetcpl/inetcpl.spec b/dll/cpl/inetcpl/inetcpl.spec similarity index 100% rename from reactos/dll/cpl/inetcpl/inetcpl.spec rename to dll/cpl/inetcpl/inetcpl.spec diff --git a/reactos/dll/cpl/inetcpl/inetcpl.svg b/dll/cpl/inetcpl/inetcpl.svg similarity index 100% rename from reactos/dll/cpl/inetcpl/inetcpl.svg rename to dll/cpl/inetcpl/inetcpl.svg diff --git a/reactos/dll/cpl/inetcpl/lang/He.rc b/dll/cpl/inetcpl/lang/He.rc similarity index 100% rename from reactos/dll/cpl/inetcpl/lang/He.rc rename to dll/cpl/inetcpl/lang/He.rc diff --git a/reactos/dll/cpl/inetcpl/lang/Sr.rc b/dll/cpl/inetcpl/lang/Sr.rc similarity index 100% rename from reactos/dll/cpl/inetcpl/lang/Sr.rc rename to dll/cpl/inetcpl/lang/Sr.rc diff --git a/reactos/dll/cpl/inetcpl/lang/de-DE.rc b/dll/cpl/inetcpl/lang/de-DE.rc similarity index 100% rename from reactos/dll/cpl/inetcpl/lang/de-DE.rc rename to dll/cpl/inetcpl/lang/de-DE.rc diff --git a/reactos/dll/cpl/inetcpl/lang/en-US.rc b/dll/cpl/inetcpl/lang/en-US.rc similarity index 100% rename from reactos/dll/cpl/inetcpl/lang/en-US.rc rename to dll/cpl/inetcpl/lang/en-US.rc diff --git a/reactos/dll/cpl/inetcpl/lang/fr-FR.rc b/dll/cpl/inetcpl/lang/fr-FR.rc similarity index 100% rename from reactos/dll/cpl/inetcpl/lang/fr-FR.rc rename to dll/cpl/inetcpl/lang/fr-FR.rc diff --git a/reactos/dll/cpl/inetcpl/lang/it-IT.rc b/dll/cpl/inetcpl/lang/it-IT.rc similarity index 100% rename from reactos/dll/cpl/inetcpl/lang/it-IT.rc rename to dll/cpl/inetcpl/lang/it-IT.rc diff --git a/reactos/dll/cpl/inetcpl/lang/ja-JP.rc b/dll/cpl/inetcpl/lang/ja-JP.rc similarity index 100% rename from reactos/dll/cpl/inetcpl/lang/ja-JP.rc rename to dll/cpl/inetcpl/lang/ja-JP.rc diff --git a/reactos/dll/cpl/inetcpl/lang/ko-KR.rc b/dll/cpl/inetcpl/lang/ko-KR.rc similarity index 100% rename from reactos/dll/cpl/inetcpl/lang/ko-KR.rc rename to dll/cpl/inetcpl/lang/ko-KR.rc diff --git a/reactos/dll/cpl/inetcpl/lang/lt-LT.rc b/dll/cpl/inetcpl/lang/lt-LT.rc similarity index 100% rename from reactos/dll/cpl/inetcpl/lang/lt-LT.rc rename to dll/cpl/inetcpl/lang/lt-LT.rc diff --git a/reactos/dll/cpl/inetcpl/lang/nl-NL.rc b/dll/cpl/inetcpl/lang/nl-NL.rc similarity index 100% rename from reactos/dll/cpl/inetcpl/lang/nl-NL.rc rename to dll/cpl/inetcpl/lang/nl-NL.rc diff --git a/reactos/dll/cpl/inetcpl/lang/pl-PL.rc b/dll/cpl/inetcpl/lang/pl-PL.rc similarity index 100% rename from reactos/dll/cpl/inetcpl/lang/pl-PL.rc rename to dll/cpl/inetcpl/lang/pl-PL.rc diff --git a/reactos/dll/cpl/inetcpl/lang/pt-PT.rc b/dll/cpl/inetcpl/lang/pt-PT.rc similarity index 100% rename from reactos/dll/cpl/inetcpl/lang/pt-PT.rc rename to dll/cpl/inetcpl/lang/pt-PT.rc diff --git a/reactos/dll/cpl/inetcpl/lang/ro-RO.rc b/dll/cpl/inetcpl/lang/ro-RO.rc similarity index 100% rename from reactos/dll/cpl/inetcpl/lang/ro-RO.rc rename to dll/cpl/inetcpl/lang/ro-RO.rc diff --git a/reactos/dll/cpl/inetcpl/lang/ru-RU.rc b/dll/cpl/inetcpl/lang/ru-RU.rc similarity index 100% rename from reactos/dll/cpl/inetcpl/lang/ru-RU.rc rename to dll/cpl/inetcpl/lang/ru-RU.rc diff --git a/reactos/dll/cpl/inetcpl/lang/sv-SE.rc b/dll/cpl/inetcpl/lang/sv-SE.rc similarity index 100% rename from reactos/dll/cpl/inetcpl/lang/sv-SE.rc rename to dll/cpl/inetcpl/lang/sv-SE.rc diff --git a/reactos/dll/cpl/inetcpl/lang/uk-UA.rc b/dll/cpl/inetcpl/lang/uk-UA.rc similarity index 100% rename from reactos/dll/cpl/inetcpl/lang/uk-UA.rc rename to dll/cpl/inetcpl/lang/uk-UA.rc diff --git a/reactos/dll/cpl/inetcpl/security.c b/dll/cpl/inetcpl/security.c similarity index 100% rename from reactos/dll/cpl/inetcpl/security.c rename to dll/cpl/inetcpl/security.c diff --git a/reactos/dll/cpl/input/CMakeLists.txt b/dll/cpl/input/CMakeLists.txt similarity index 100% rename from reactos/dll/cpl/input/CMakeLists.txt rename to dll/cpl/input/CMakeLists.txt diff --git a/reactos/dll/cpl/input/add.c b/dll/cpl/input/add.c similarity index 100% rename from reactos/dll/cpl/input/add.c rename to dll/cpl/input/add.c diff --git a/reactos/dll/cpl/input/changekeyseq.c b/dll/cpl/input/changekeyseq.c similarity index 100% rename from reactos/dll/cpl/input/changekeyseq.c rename to dll/cpl/input/changekeyseq.c diff --git a/reactos/dll/cpl/input/input.c b/dll/cpl/input/input.c similarity index 100% rename from reactos/dll/cpl/input/input.c rename to dll/cpl/input/input.c diff --git a/reactos/dll/cpl/input/input.h b/dll/cpl/input/input.h similarity index 100% rename from reactos/dll/cpl/input/input.h rename to dll/cpl/input/input.h diff --git a/reactos/dll/cpl/input/input.rbuild b/dll/cpl/input/input.rbuild similarity index 100% rename from reactos/dll/cpl/input/input.rbuild rename to dll/cpl/input/input.rbuild diff --git a/reactos/dll/cpl/input/input.rc b/dll/cpl/input/input.rc similarity index 100% rename from reactos/dll/cpl/input/input.rc rename to dll/cpl/input/input.rc diff --git a/reactos/dll/cpl/input/input.spec b/dll/cpl/input/input.spec similarity index 100% rename from reactos/dll/cpl/input/input.spec rename to dll/cpl/input/input.spec diff --git a/reactos/dll/cpl/input/keysettings.c b/dll/cpl/input/keysettings.c similarity index 100% rename from reactos/dll/cpl/input/keysettings.c rename to dll/cpl/input/keysettings.c diff --git a/reactos/dll/cpl/input/lang/bg-BG.rc b/dll/cpl/input/lang/bg-BG.rc similarity index 100% rename from reactos/dll/cpl/input/lang/bg-BG.rc rename to dll/cpl/input/lang/bg-BG.rc diff --git a/reactos/dll/cpl/input/lang/cs-CZ.rc b/dll/cpl/input/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/cpl/input/lang/cs-CZ.rc rename to dll/cpl/input/lang/cs-CZ.rc diff --git a/reactos/dll/cpl/input/lang/de-DE.rc b/dll/cpl/input/lang/de-DE.rc similarity index 100% rename from reactos/dll/cpl/input/lang/de-DE.rc rename to dll/cpl/input/lang/de-DE.rc diff --git a/reactos/dll/cpl/input/lang/el-GR.rc b/dll/cpl/input/lang/el-GR.rc similarity index 100% rename from reactos/dll/cpl/input/lang/el-GR.rc rename to dll/cpl/input/lang/el-GR.rc diff --git a/reactos/dll/cpl/input/lang/en-US.rc b/dll/cpl/input/lang/en-US.rc similarity index 100% rename from reactos/dll/cpl/input/lang/en-US.rc rename to dll/cpl/input/lang/en-US.rc diff --git a/reactos/dll/cpl/input/lang/es-ES.rc b/dll/cpl/input/lang/es-ES.rc similarity index 100% rename from reactos/dll/cpl/input/lang/es-ES.rc rename to dll/cpl/input/lang/es-ES.rc diff --git a/reactos/dll/cpl/input/lang/fr-FR.rc b/dll/cpl/input/lang/fr-FR.rc similarity index 100% rename from reactos/dll/cpl/input/lang/fr-FR.rc rename to dll/cpl/input/lang/fr-FR.rc diff --git a/reactos/dll/cpl/input/lang/it-IT.rc b/dll/cpl/input/lang/it-IT.rc similarity index 100% rename from reactos/dll/cpl/input/lang/it-IT.rc rename to dll/cpl/input/lang/it-IT.rc diff --git a/reactos/dll/cpl/input/lang/no-NO.rc b/dll/cpl/input/lang/no-NO.rc similarity index 100% rename from reactos/dll/cpl/input/lang/no-NO.rc rename to dll/cpl/input/lang/no-NO.rc diff --git a/reactos/dll/cpl/input/lang/pl-PL.rc b/dll/cpl/input/lang/pl-PL.rc similarity index 100% rename from reactos/dll/cpl/input/lang/pl-PL.rc rename to dll/cpl/input/lang/pl-PL.rc diff --git a/reactos/dll/cpl/input/lang/ro-RO.rc b/dll/cpl/input/lang/ro-RO.rc similarity index 100% rename from reactos/dll/cpl/input/lang/ro-RO.rc rename to dll/cpl/input/lang/ro-RO.rc diff --git a/reactos/dll/cpl/input/lang/ru-RU.rc b/dll/cpl/input/lang/ru-RU.rc similarity index 100% rename from reactos/dll/cpl/input/lang/ru-RU.rc rename to dll/cpl/input/lang/ru-RU.rc diff --git a/reactos/dll/cpl/input/lang/sk-SK.rc b/dll/cpl/input/lang/sk-SK.rc similarity index 100% rename from reactos/dll/cpl/input/lang/sk-SK.rc rename to dll/cpl/input/lang/sk-SK.rc diff --git a/reactos/dll/cpl/input/lang/uk-UA.rc b/dll/cpl/input/lang/uk-UA.rc similarity index 100% rename from reactos/dll/cpl/input/lang/uk-UA.rc rename to dll/cpl/input/lang/uk-UA.rc diff --git a/reactos/dll/cpl/input/lang/zh-CN.rc b/dll/cpl/input/lang/zh-CN.rc similarity index 100% rename from reactos/dll/cpl/input/lang/zh-CN.rc rename to dll/cpl/input/lang/zh-CN.rc diff --git a/reactos/dll/cpl/input/resource.h b/dll/cpl/input/resource.h similarity index 100% rename from reactos/dll/cpl/input/resource.h rename to dll/cpl/input/resource.h diff --git a/reactos/dll/cpl/input/resources/keyboard-shortcuts.ico b/dll/cpl/input/resources/keyboard-shortcuts.ico similarity index 100% rename from reactos/dll/cpl/input/resources/keyboard-shortcuts.ico rename to dll/cpl/input/resources/keyboard-shortcuts.ico diff --git a/reactos/dll/cpl/input/rsrc.rc b/dll/cpl/input/rsrc.rc similarity index 100% rename from reactos/dll/cpl/input/rsrc.rc rename to dll/cpl/input/rsrc.rc diff --git a/reactos/dll/cpl/input/settings.c b/dll/cpl/input/settings.c similarity index 100% rename from reactos/dll/cpl/input/settings.c rename to dll/cpl/input/settings.c diff --git a/reactos/dll/cpl/intl/CMakeLists.txt b/dll/cpl/intl/CMakeLists.txt similarity index 100% rename from reactos/dll/cpl/intl/CMakeLists.txt rename to dll/cpl/intl/CMakeLists.txt diff --git a/reactos/dll/cpl/intl/advanced.c b/dll/cpl/intl/advanced.c similarity index 100% rename from reactos/dll/cpl/intl/advanced.c rename to dll/cpl/intl/advanced.c diff --git a/reactos/dll/cpl/intl/currency.c b/dll/cpl/intl/currency.c similarity index 100% rename from reactos/dll/cpl/intl/currency.c rename to dll/cpl/intl/currency.c diff --git a/reactos/dll/cpl/intl/date.c b/dll/cpl/intl/date.c similarity index 100% rename from reactos/dll/cpl/intl/date.c rename to dll/cpl/intl/date.c diff --git a/reactos/dll/cpl/intl/generalp.c b/dll/cpl/intl/generalp.c similarity index 100% rename from reactos/dll/cpl/intl/generalp.c rename to dll/cpl/intl/generalp.c diff --git a/reactos/dll/cpl/intl/inplocale.c b/dll/cpl/intl/inplocale.c similarity index 100% rename from reactos/dll/cpl/intl/inplocale.c rename to dll/cpl/intl/inplocale.c diff --git a/reactos/dll/cpl/intl/intl.c b/dll/cpl/intl/intl.c similarity index 100% rename from reactos/dll/cpl/intl/intl.c rename to dll/cpl/intl/intl.c diff --git a/reactos/dll/cpl/intl/intl.h b/dll/cpl/intl/intl.h similarity index 100% rename from reactos/dll/cpl/intl/intl.h rename to dll/cpl/intl/intl.h diff --git a/reactos/dll/cpl/intl/intl.rbuild b/dll/cpl/intl/intl.rbuild similarity index 100% rename from reactos/dll/cpl/intl/intl.rbuild rename to dll/cpl/intl/intl.rbuild diff --git a/reactos/dll/cpl/intl/intl.rc b/dll/cpl/intl/intl.rc similarity index 100% rename from reactos/dll/cpl/intl/intl.rc rename to dll/cpl/intl/intl.rc diff --git a/reactos/dll/cpl/intl/intl.spec b/dll/cpl/intl/intl.spec similarity index 100% rename from reactos/dll/cpl/intl/intl.spec rename to dll/cpl/intl/intl.spec diff --git a/reactos/dll/cpl/intl/kblayouts.c b/dll/cpl/intl/kblayouts.c similarity index 100% rename from reactos/dll/cpl/intl/kblayouts.c rename to dll/cpl/intl/kblayouts.c diff --git a/reactos/dll/cpl/intl/lang/bg-BG.rc b/dll/cpl/intl/lang/bg-BG.rc similarity index 100% rename from reactos/dll/cpl/intl/lang/bg-BG.rc rename to dll/cpl/intl/lang/bg-BG.rc diff --git a/reactos/dll/cpl/intl/lang/cs-CZ.rc b/dll/cpl/intl/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/cpl/intl/lang/cs-CZ.rc rename to dll/cpl/intl/lang/cs-CZ.rc diff --git a/reactos/dll/cpl/intl/lang/de-DE.rc b/dll/cpl/intl/lang/de-DE.rc similarity index 100% rename from reactos/dll/cpl/intl/lang/de-DE.rc rename to dll/cpl/intl/lang/de-DE.rc diff --git a/reactos/dll/cpl/intl/lang/en-US.rc b/dll/cpl/intl/lang/en-US.rc similarity index 100% rename from reactos/dll/cpl/intl/lang/en-US.rc rename to dll/cpl/intl/lang/en-US.rc diff --git a/reactos/dll/cpl/intl/lang/es-ES.rc b/dll/cpl/intl/lang/es-ES.rc similarity index 100% rename from reactos/dll/cpl/intl/lang/es-ES.rc rename to dll/cpl/intl/lang/es-ES.rc diff --git a/reactos/dll/cpl/intl/lang/fr-FR.rc b/dll/cpl/intl/lang/fr-FR.rc similarity index 100% rename from reactos/dll/cpl/intl/lang/fr-FR.rc rename to dll/cpl/intl/lang/fr-FR.rc diff --git a/reactos/dll/cpl/intl/lang/it-IT.rc b/dll/cpl/intl/lang/it-IT.rc similarity index 100% rename from reactos/dll/cpl/intl/lang/it-IT.rc rename to dll/cpl/intl/lang/it-IT.rc diff --git a/reactos/dll/cpl/intl/lang/no-NO.rc b/dll/cpl/intl/lang/no-NO.rc similarity index 100% rename from reactos/dll/cpl/intl/lang/no-NO.rc rename to dll/cpl/intl/lang/no-NO.rc diff --git a/reactos/dll/cpl/intl/lang/pl-PL.rc b/dll/cpl/intl/lang/pl-PL.rc similarity index 100% rename from reactos/dll/cpl/intl/lang/pl-PL.rc rename to dll/cpl/intl/lang/pl-PL.rc diff --git a/reactos/dll/cpl/intl/lang/ro-RO.rc b/dll/cpl/intl/lang/ro-RO.rc similarity index 100% rename from reactos/dll/cpl/intl/lang/ro-RO.rc rename to dll/cpl/intl/lang/ro-RO.rc diff --git a/reactos/dll/cpl/intl/lang/ru-RU.rc b/dll/cpl/intl/lang/ru-RU.rc similarity index 100% rename from reactos/dll/cpl/intl/lang/ru-RU.rc rename to dll/cpl/intl/lang/ru-RU.rc diff --git a/reactos/dll/cpl/intl/lang/sk-SK.rc b/dll/cpl/intl/lang/sk-SK.rc similarity index 100% rename from reactos/dll/cpl/intl/lang/sk-SK.rc rename to dll/cpl/intl/lang/sk-SK.rc diff --git a/reactos/dll/cpl/intl/lang/uk-UA.rc b/dll/cpl/intl/lang/uk-UA.rc similarity index 100% rename from reactos/dll/cpl/intl/lang/uk-UA.rc rename to dll/cpl/intl/lang/uk-UA.rc diff --git a/reactos/dll/cpl/intl/lang/zh-CN.rc b/dll/cpl/intl/lang/zh-CN.rc similarity index 100% rename from reactos/dll/cpl/intl/lang/zh-CN.rc rename to dll/cpl/intl/lang/zh-CN.rc diff --git a/reactos/dll/cpl/intl/languages.c b/dll/cpl/intl/languages.c similarity index 100% rename from reactos/dll/cpl/intl/languages.c rename to dll/cpl/intl/languages.c diff --git a/reactos/dll/cpl/intl/misc.c b/dll/cpl/intl/misc.c similarity index 100% rename from reactos/dll/cpl/intl/misc.c rename to dll/cpl/intl/misc.c diff --git a/reactos/dll/cpl/intl/numbers.c b/dll/cpl/intl/numbers.c similarity index 100% rename from reactos/dll/cpl/intl/numbers.c rename to dll/cpl/intl/numbers.c diff --git a/reactos/dll/cpl/intl/resource.h b/dll/cpl/intl/resource.h similarity index 100% rename from reactos/dll/cpl/intl/resource.h rename to dll/cpl/intl/resource.h diff --git a/reactos/dll/cpl/intl/resources/applet.ico b/dll/cpl/intl/resources/applet.ico similarity index 100% rename from reactos/dll/cpl/intl/resources/applet.ico rename to dll/cpl/intl/resources/applet.ico diff --git a/reactos/dll/cpl/intl/rsrc.rc b/dll/cpl/intl/rsrc.rc similarity index 100% rename from reactos/dll/cpl/intl/rsrc.rc rename to dll/cpl/intl/rsrc.rc diff --git a/reactos/dll/cpl/intl/setupreg.c b/dll/cpl/intl/setupreg.c similarity index 100% rename from reactos/dll/cpl/intl/setupreg.c rename to dll/cpl/intl/setupreg.c diff --git a/reactos/dll/cpl/intl/sort.c b/dll/cpl/intl/sort.c similarity index 100% rename from reactos/dll/cpl/intl/sort.c rename to dll/cpl/intl/sort.c diff --git a/reactos/dll/cpl/intl/time.c b/dll/cpl/intl/time.c similarity index 100% rename from reactos/dll/cpl/intl/time.c rename to dll/cpl/intl/time.c diff --git a/reactos/dll/cpl/joy/CMakeLists.txt b/dll/cpl/joy/CMakeLists.txt similarity index 100% rename from reactos/dll/cpl/joy/CMakeLists.txt rename to dll/cpl/joy/CMakeLists.txt diff --git a/reactos/dll/cpl/joy/joy.c b/dll/cpl/joy/joy.c similarity index 100% rename from reactos/dll/cpl/joy/joy.c rename to dll/cpl/joy/joy.c diff --git a/reactos/dll/cpl/joy/joy.h b/dll/cpl/joy/joy.h similarity index 100% rename from reactos/dll/cpl/joy/joy.h rename to dll/cpl/joy/joy.h diff --git a/reactos/dll/cpl/joy/joy.rbuild b/dll/cpl/joy/joy.rbuild similarity index 100% rename from reactos/dll/cpl/joy/joy.rbuild rename to dll/cpl/joy/joy.rbuild diff --git a/reactos/dll/cpl/joy/joy.rc b/dll/cpl/joy/joy.rc similarity index 100% rename from reactos/dll/cpl/joy/joy.rc rename to dll/cpl/joy/joy.rc diff --git a/reactos/dll/cpl/joy/joy.spec b/dll/cpl/joy/joy.spec similarity index 100% rename from reactos/dll/cpl/joy/joy.spec rename to dll/cpl/joy/joy.spec diff --git a/reactos/dll/cpl/joy/lang/bg-BG.rc b/dll/cpl/joy/lang/bg-BG.rc similarity index 100% rename from reactos/dll/cpl/joy/lang/bg-BG.rc rename to dll/cpl/joy/lang/bg-BG.rc diff --git a/reactos/dll/cpl/joy/lang/cs-CZ.rc b/dll/cpl/joy/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/cpl/joy/lang/cs-CZ.rc rename to dll/cpl/joy/lang/cs-CZ.rc diff --git a/reactos/dll/cpl/joy/lang/de-DE.rc b/dll/cpl/joy/lang/de-DE.rc similarity index 100% rename from reactos/dll/cpl/joy/lang/de-DE.rc rename to dll/cpl/joy/lang/de-DE.rc diff --git a/reactos/dll/cpl/joy/lang/el-GR.rc b/dll/cpl/joy/lang/el-GR.rc similarity index 100% rename from reactos/dll/cpl/joy/lang/el-GR.rc rename to dll/cpl/joy/lang/el-GR.rc diff --git a/reactos/dll/cpl/joy/lang/en-US.rc b/dll/cpl/joy/lang/en-US.rc similarity index 100% rename from reactos/dll/cpl/joy/lang/en-US.rc rename to dll/cpl/joy/lang/en-US.rc diff --git a/reactos/dll/cpl/joy/lang/es-ES.rc b/dll/cpl/joy/lang/es-ES.rc similarity index 100% rename from reactos/dll/cpl/joy/lang/es-ES.rc rename to dll/cpl/joy/lang/es-ES.rc diff --git a/reactos/dll/cpl/joy/lang/fr-FR.rc b/dll/cpl/joy/lang/fr-FR.rc similarity index 100% rename from reactos/dll/cpl/joy/lang/fr-FR.rc rename to dll/cpl/joy/lang/fr-FR.rc diff --git a/reactos/dll/cpl/joy/lang/it-IT.rc b/dll/cpl/joy/lang/it-IT.rc similarity index 100% rename from reactos/dll/cpl/joy/lang/it-IT.rc rename to dll/cpl/joy/lang/it-IT.rc diff --git a/reactos/dll/cpl/joy/lang/no-NO.rc b/dll/cpl/joy/lang/no-NO.rc similarity index 100% rename from reactos/dll/cpl/joy/lang/no-NO.rc rename to dll/cpl/joy/lang/no-NO.rc diff --git a/reactos/dll/cpl/joy/lang/pl-PL.rc b/dll/cpl/joy/lang/pl-PL.rc similarity index 100% rename from reactos/dll/cpl/joy/lang/pl-PL.rc rename to dll/cpl/joy/lang/pl-PL.rc diff --git a/reactos/dll/cpl/joy/lang/ro-RO.rc b/dll/cpl/joy/lang/ro-RO.rc similarity index 100% rename from reactos/dll/cpl/joy/lang/ro-RO.rc rename to dll/cpl/joy/lang/ro-RO.rc diff --git a/reactos/dll/cpl/joy/lang/ru-RU.rc b/dll/cpl/joy/lang/ru-RU.rc similarity index 100% rename from reactos/dll/cpl/joy/lang/ru-RU.rc rename to dll/cpl/joy/lang/ru-RU.rc diff --git a/reactos/dll/cpl/joy/lang/sk-SK.rc b/dll/cpl/joy/lang/sk-SK.rc similarity index 100% rename from reactos/dll/cpl/joy/lang/sk-SK.rc rename to dll/cpl/joy/lang/sk-SK.rc diff --git a/reactos/dll/cpl/joy/lang/uk-UA.rc b/dll/cpl/joy/lang/uk-UA.rc similarity index 100% rename from reactos/dll/cpl/joy/lang/uk-UA.rc rename to dll/cpl/joy/lang/uk-UA.rc diff --git a/reactos/dll/cpl/joy/lang/zh-CN.rc b/dll/cpl/joy/lang/zh-CN.rc similarity index 100% rename from reactos/dll/cpl/joy/lang/zh-CN.rc rename to dll/cpl/joy/lang/zh-CN.rc diff --git a/reactos/dll/cpl/joy/resource.h b/dll/cpl/joy/resource.h similarity index 100% rename from reactos/dll/cpl/joy/resource.h rename to dll/cpl/joy/resource.h diff --git a/reactos/dll/cpl/joy/resources/applet.ico b/dll/cpl/joy/resources/applet.ico similarity index 100% rename from reactos/dll/cpl/joy/resources/applet.ico rename to dll/cpl/joy/resources/applet.ico diff --git a/reactos/dll/cpl/joy/rsrc.rc b/dll/cpl/joy/rsrc.rc similarity index 100% rename from reactos/dll/cpl/joy/rsrc.rc rename to dll/cpl/joy/rsrc.rc diff --git a/reactos/dll/cpl/liccpa/lang/bg-BG.rc b/dll/cpl/liccpa/lang/bg-BG.rc similarity index 100% rename from reactos/dll/cpl/liccpa/lang/bg-BG.rc rename to dll/cpl/liccpa/lang/bg-BG.rc diff --git a/reactos/dll/cpl/liccpa/lang/cs-CZ.rc b/dll/cpl/liccpa/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/cpl/liccpa/lang/cs-CZ.rc rename to dll/cpl/liccpa/lang/cs-CZ.rc diff --git a/reactos/dll/cpl/liccpa/lang/de-DE.rc b/dll/cpl/liccpa/lang/de-DE.rc similarity index 100% rename from reactos/dll/cpl/liccpa/lang/de-DE.rc rename to dll/cpl/liccpa/lang/de-DE.rc diff --git a/reactos/dll/cpl/liccpa/lang/el-GR.rc b/dll/cpl/liccpa/lang/el-GR.rc similarity index 100% rename from reactos/dll/cpl/liccpa/lang/el-GR.rc rename to dll/cpl/liccpa/lang/el-GR.rc diff --git a/reactos/dll/cpl/liccpa/lang/en-US.rc b/dll/cpl/liccpa/lang/en-US.rc similarity index 100% rename from reactos/dll/cpl/liccpa/lang/en-US.rc rename to dll/cpl/liccpa/lang/en-US.rc diff --git a/reactos/dll/cpl/liccpa/lang/es-ES.rc b/dll/cpl/liccpa/lang/es-ES.rc similarity index 100% rename from reactos/dll/cpl/liccpa/lang/es-ES.rc rename to dll/cpl/liccpa/lang/es-ES.rc diff --git a/reactos/dll/cpl/liccpa/lang/fr-FR.rc b/dll/cpl/liccpa/lang/fr-FR.rc similarity index 100% rename from reactos/dll/cpl/liccpa/lang/fr-FR.rc rename to dll/cpl/liccpa/lang/fr-FR.rc diff --git a/reactos/dll/cpl/liccpa/lang/id-ID.rc b/dll/cpl/liccpa/lang/id-ID.rc similarity index 100% rename from reactos/dll/cpl/liccpa/lang/id-ID.rc rename to dll/cpl/liccpa/lang/id-ID.rc diff --git a/reactos/dll/cpl/liccpa/lang/it-IT.rc b/dll/cpl/liccpa/lang/it-IT.rc similarity index 100% rename from reactos/dll/cpl/liccpa/lang/it-IT.rc rename to dll/cpl/liccpa/lang/it-IT.rc diff --git a/reactos/dll/cpl/liccpa/lang/ja-JP.rc b/dll/cpl/liccpa/lang/ja-JP.rc similarity index 100% rename from reactos/dll/cpl/liccpa/lang/ja-JP.rc rename to dll/cpl/liccpa/lang/ja-JP.rc diff --git a/reactos/dll/cpl/liccpa/lang/no-NO.rc b/dll/cpl/liccpa/lang/no-NO.rc similarity index 100% rename from reactos/dll/cpl/liccpa/lang/no-NO.rc rename to dll/cpl/liccpa/lang/no-NO.rc diff --git a/reactos/dll/cpl/liccpa/lang/pl-PL.rc b/dll/cpl/liccpa/lang/pl-PL.rc similarity index 100% rename from reactos/dll/cpl/liccpa/lang/pl-PL.rc rename to dll/cpl/liccpa/lang/pl-PL.rc diff --git a/reactos/dll/cpl/liccpa/lang/ro-RO.rc b/dll/cpl/liccpa/lang/ro-RO.rc similarity index 100% rename from reactos/dll/cpl/liccpa/lang/ro-RO.rc rename to dll/cpl/liccpa/lang/ro-RO.rc diff --git a/reactos/dll/cpl/liccpa/lang/ru-RU.rc b/dll/cpl/liccpa/lang/ru-RU.rc similarity index 100% rename from reactos/dll/cpl/liccpa/lang/ru-RU.rc rename to dll/cpl/liccpa/lang/ru-RU.rc diff --git a/reactos/dll/cpl/liccpa/lang/sk-SK.rc b/dll/cpl/liccpa/lang/sk-SK.rc similarity index 100% rename from reactos/dll/cpl/liccpa/lang/sk-SK.rc rename to dll/cpl/liccpa/lang/sk-SK.rc diff --git a/reactos/dll/cpl/liccpa/lang/uk-UA.rc b/dll/cpl/liccpa/lang/uk-UA.rc similarity index 100% rename from reactos/dll/cpl/liccpa/lang/uk-UA.rc rename to dll/cpl/liccpa/lang/uk-UA.rc diff --git a/reactos/dll/cpl/liccpa/lang/zh-CN.rc b/dll/cpl/liccpa/lang/zh-CN.rc similarity index 100% rename from reactos/dll/cpl/liccpa/lang/zh-CN.rc rename to dll/cpl/liccpa/lang/zh-CN.rc diff --git a/reactos/dll/cpl/liccpa/liccpa.c b/dll/cpl/liccpa/liccpa.c similarity index 100% rename from reactos/dll/cpl/liccpa/liccpa.c rename to dll/cpl/liccpa/liccpa.c diff --git a/reactos/dll/cpl/liccpa/liccpa.h b/dll/cpl/liccpa/liccpa.h similarity index 100% rename from reactos/dll/cpl/liccpa/liccpa.h rename to dll/cpl/liccpa/liccpa.h diff --git a/reactos/dll/cpl/liccpa/liccpa.rbuild b/dll/cpl/liccpa/liccpa.rbuild similarity index 100% rename from reactos/dll/cpl/liccpa/liccpa.rbuild rename to dll/cpl/liccpa/liccpa.rbuild diff --git a/reactos/dll/cpl/liccpa/liccpa.rc b/dll/cpl/liccpa/liccpa.rc similarity index 100% rename from reactos/dll/cpl/liccpa/liccpa.rc rename to dll/cpl/liccpa/liccpa.rc diff --git a/reactos/dll/cpl/liccpa/liccpa.spec b/dll/cpl/liccpa/liccpa.spec similarity index 100% rename from reactos/dll/cpl/liccpa/liccpa.spec rename to dll/cpl/liccpa/liccpa.spec diff --git a/reactos/dll/cpl/liccpa/resource.h b/dll/cpl/liccpa/resource.h similarity index 100% rename from reactos/dll/cpl/liccpa/resource.h rename to dll/cpl/liccpa/resource.h diff --git a/reactos/dll/cpl/liccpa/resources/cpl_icon1.ico b/dll/cpl/liccpa/resources/cpl_icon1.ico similarity index 100% rename from reactos/dll/cpl/liccpa/resources/cpl_icon1.ico rename to dll/cpl/liccpa/resources/cpl_icon1.ico diff --git a/reactos/dll/cpl/liccpa/rsrc.rc b/dll/cpl/liccpa/rsrc.rc similarity index 100% rename from reactos/dll/cpl/liccpa/rsrc.rc rename to dll/cpl/liccpa/rsrc.rc diff --git a/reactos/dll/cpl/main/CMakeLists.txt b/dll/cpl/main/CMakeLists.txt similarity index 100% rename from reactos/dll/cpl/main/CMakeLists.txt rename to dll/cpl/main/CMakeLists.txt diff --git a/reactos/dll/cpl/main/keyboard.c b/dll/cpl/main/keyboard.c similarity index 100% rename from reactos/dll/cpl/main/keyboard.c rename to dll/cpl/main/keyboard.c diff --git a/reactos/dll/cpl/main/lang/bg-BG.rc b/dll/cpl/main/lang/bg-BG.rc similarity index 100% rename from reactos/dll/cpl/main/lang/bg-BG.rc rename to dll/cpl/main/lang/bg-BG.rc diff --git a/reactos/dll/cpl/main/lang/cs-CZ.rc b/dll/cpl/main/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/cpl/main/lang/cs-CZ.rc rename to dll/cpl/main/lang/cs-CZ.rc diff --git a/reactos/dll/cpl/main/lang/de-DE.rc b/dll/cpl/main/lang/de-DE.rc similarity index 100% rename from reactos/dll/cpl/main/lang/de-DE.rc rename to dll/cpl/main/lang/de-DE.rc diff --git a/reactos/dll/cpl/main/lang/el-GR.rc b/dll/cpl/main/lang/el-GR.rc similarity index 100% rename from reactos/dll/cpl/main/lang/el-GR.rc rename to dll/cpl/main/lang/el-GR.rc diff --git a/reactos/dll/cpl/main/lang/en-US.rc b/dll/cpl/main/lang/en-US.rc similarity index 100% rename from reactos/dll/cpl/main/lang/en-US.rc rename to dll/cpl/main/lang/en-US.rc diff --git a/reactos/dll/cpl/main/lang/es-ES.rc b/dll/cpl/main/lang/es-ES.rc similarity index 100% rename from reactos/dll/cpl/main/lang/es-ES.rc rename to dll/cpl/main/lang/es-ES.rc diff --git a/reactos/dll/cpl/main/lang/fr-FR.rc b/dll/cpl/main/lang/fr-FR.rc similarity index 100% rename from reactos/dll/cpl/main/lang/fr-FR.rc rename to dll/cpl/main/lang/fr-FR.rc diff --git a/reactos/dll/cpl/main/lang/hu-HU.rc b/dll/cpl/main/lang/hu-HU.rc similarity index 100% rename from reactos/dll/cpl/main/lang/hu-HU.rc rename to dll/cpl/main/lang/hu-HU.rc diff --git a/reactos/dll/cpl/main/lang/id-ID.rc b/dll/cpl/main/lang/id-ID.rc similarity index 100% rename from reactos/dll/cpl/main/lang/id-ID.rc rename to dll/cpl/main/lang/id-ID.rc diff --git a/reactos/dll/cpl/main/lang/it-IT.rc b/dll/cpl/main/lang/it-IT.rc similarity index 100% rename from reactos/dll/cpl/main/lang/it-IT.rc rename to dll/cpl/main/lang/it-IT.rc diff --git a/reactos/dll/cpl/main/lang/ja-JP.rc b/dll/cpl/main/lang/ja-JP.rc similarity index 100% rename from reactos/dll/cpl/main/lang/ja-JP.rc rename to dll/cpl/main/lang/ja-JP.rc diff --git a/reactos/dll/cpl/main/lang/nl-NL.rc b/dll/cpl/main/lang/nl-NL.rc similarity index 100% rename from reactos/dll/cpl/main/lang/nl-NL.rc rename to dll/cpl/main/lang/nl-NL.rc diff --git a/reactos/dll/cpl/main/lang/no-NO.rc b/dll/cpl/main/lang/no-NO.rc similarity index 100% rename from reactos/dll/cpl/main/lang/no-NO.rc rename to dll/cpl/main/lang/no-NO.rc diff --git a/reactos/dll/cpl/main/lang/pl-PL.rc b/dll/cpl/main/lang/pl-PL.rc similarity index 100% rename from reactos/dll/cpl/main/lang/pl-PL.rc rename to dll/cpl/main/lang/pl-PL.rc diff --git a/reactos/dll/cpl/main/lang/ro-RO.rc b/dll/cpl/main/lang/ro-RO.rc similarity index 100% rename from reactos/dll/cpl/main/lang/ro-RO.rc rename to dll/cpl/main/lang/ro-RO.rc diff --git a/reactos/dll/cpl/main/lang/ru-RU.rc b/dll/cpl/main/lang/ru-RU.rc similarity index 100% rename from reactos/dll/cpl/main/lang/ru-RU.rc rename to dll/cpl/main/lang/ru-RU.rc diff --git a/reactos/dll/cpl/main/lang/sk-SK.rc b/dll/cpl/main/lang/sk-SK.rc similarity index 100% rename from reactos/dll/cpl/main/lang/sk-SK.rc rename to dll/cpl/main/lang/sk-SK.rc diff --git a/reactos/dll/cpl/main/lang/uk-UA.rc b/dll/cpl/main/lang/uk-UA.rc similarity index 100% rename from reactos/dll/cpl/main/lang/uk-UA.rc rename to dll/cpl/main/lang/uk-UA.rc diff --git a/reactos/dll/cpl/main/lang/zh-CN.rc b/dll/cpl/main/lang/zh-CN.rc similarity index 100% rename from reactos/dll/cpl/main/lang/zh-CN.rc rename to dll/cpl/main/lang/zh-CN.rc diff --git a/reactos/dll/cpl/main/main.c b/dll/cpl/main/main.c similarity index 100% rename from reactos/dll/cpl/main/main.c rename to dll/cpl/main/main.c diff --git a/reactos/dll/cpl/main/main.h b/dll/cpl/main/main.h similarity index 100% rename from reactos/dll/cpl/main/main.h rename to dll/cpl/main/main.h diff --git a/reactos/dll/cpl/main/main.rbuild b/dll/cpl/main/main.rbuild similarity index 100% rename from reactos/dll/cpl/main/main.rbuild rename to dll/cpl/main/main.rbuild diff --git a/reactos/dll/cpl/main/main.rc b/dll/cpl/main/main.rc similarity index 100% rename from reactos/dll/cpl/main/main.rc rename to dll/cpl/main/main.rc diff --git a/reactos/dll/cpl/main/main.spec b/dll/cpl/main/main.spec similarity index 100% rename from reactos/dll/cpl/main/main.spec rename to dll/cpl/main/main.spec diff --git a/reactos/dll/cpl/main/mouse.c b/dll/cpl/main/mouse.c similarity index 100% rename from reactos/dll/cpl/main/mouse.c rename to dll/cpl/main/mouse.c diff --git a/reactos/dll/cpl/main/resource.h b/dll/cpl/main/resource.h similarity index 100% rename from reactos/dll/cpl/main/resource.h rename to dll/cpl/main/resource.h diff --git a/reactos/dll/cpl/main/resources/admintools_folder.ico b/dll/cpl/main/resources/admintools_folder.ico similarity index 100% rename from reactos/dll/cpl/main/resources/admintools_folder.ico rename to dll/cpl/main/resources/admintools_folder.ico diff --git a/reactos/dll/cpl/main/resources/folder_closed.ico b/dll/cpl/main/resources/folder_closed.ico similarity index 100% rename from reactos/dll/cpl/main/resources/folder_closed.ico rename to dll/cpl/main/resources/folder_closed.ico diff --git a/reactos/dll/cpl/main/resources/folder_open.ico b/dll/cpl/main/resources/folder_open.ico similarity index 100% rename from reactos/dll/cpl/main/resources/folder_open.ico rename to dll/cpl/main/resources/folder_open.ico diff --git a/reactos/dll/cpl/main/resources/fonts_folder.ico b/dll/cpl/main/resources/fonts_folder.ico similarity index 100% rename from reactos/dll/cpl/main/resources/fonts_folder.ico rename to dll/cpl/main/resources/fonts_folder.ico diff --git a/reactos/dll/cpl/main/resources/keyboard.ico b/dll/cpl/main/resources/keyboard.ico similarity index 100% rename from reactos/dll/cpl/main/resources/keyboard.ico rename to dll/cpl/main/resources/keyboard.ico diff --git a/reactos/dll/cpl/main/resources/look_key.ico b/dll/cpl/main/resources/look_key.ico similarity index 100% rename from reactos/dll/cpl/main/resources/look_key.ico rename to dll/cpl/main/resources/look_key.ico diff --git a/reactos/dll/cpl/main/resources/mouse.ico b/dll/cpl/main/resources/mouse.ico similarity index 100% rename from reactos/dll/cpl/main/resources/mouse.ico rename to dll/cpl/main/resources/mouse.ico diff --git a/reactos/dll/cpl/main/resources/mouse_button.ico b/dll/cpl/main/resources/mouse_button.ico similarity index 100% rename from reactos/dll/cpl/main/resources/mouse_button.ico rename to dll/cpl/main/resources/mouse_button.ico diff --git a/reactos/dll/cpl/main/resources/mouse_left.ico b/dll/cpl/main/resources/mouse_left.ico similarity index 100% rename from reactos/dll/cpl/main/resources/mouse_left.ico rename to dll/cpl/main/resources/mouse_left.ico diff --git a/reactos/dll/cpl/main/resources/mouse_pointer.ico b/dll/cpl/main/resources/mouse_pointer.ico similarity index 100% rename from reactos/dll/cpl/main/resources/mouse_pointer.ico rename to dll/cpl/main/resources/mouse_pointer.ico diff --git a/reactos/dll/cpl/main/resources/mouse_right.ico b/dll/cpl/main/resources/mouse_right.ico similarity index 100% rename from reactos/dll/cpl/main/resources/mouse_right.ico rename to dll/cpl/main/resources/mouse_right.ico diff --git a/reactos/dll/cpl/main/resources/mouse_speed.ico b/dll/cpl/main/resources/mouse_speed.ico similarity index 100% rename from reactos/dll/cpl/main/resources/mouse_speed.ico rename to dll/cpl/main/resources/mouse_speed.ico diff --git a/reactos/dll/cpl/main/resources/mouse_trails.ico b/dll/cpl/main/resources/mouse_trails.ico similarity index 100% rename from reactos/dll/cpl/main/resources/mouse_trails.ico rename to dll/cpl/main/resources/mouse_trails.ico diff --git a/reactos/dll/cpl/main/resources/mouse_wheel.ico b/dll/cpl/main/resources/mouse_wheel.ico similarity index 100% rename from reactos/dll/cpl/main/resources/mouse_wheel.ico rename to dll/cpl/main/resources/mouse_wheel.ico diff --git a/reactos/dll/cpl/main/resources/repeat_delay.ico b/dll/cpl/main/resources/repeat_delay.ico similarity index 100% rename from reactos/dll/cpl/main/resources/repeat_delay.ico rename to dll/cpl/main/resources/repeat_delay.ico diff --git a/reactos/dll/cpl/main/resources/repeat_rate.ico b/dll/cpl/main/resources/repeat_rate.ico similarity index 100% rename from reactos/dll/cpl/main/resources/repeat_rate.ico rename to dll/cpl/main/resources/repeat_rate.ico diff --git a/reactos/dll/cpl/main/rsrc.rc b/dll/cpl/main/rsrc.rc similarity index 100% rename from reactos/dll/cpl/main/rsrc.rc rename to dll/cpl/main/rsrc.rc diff --git a/reactos/dll/cpl/mmsys/CMakeLists.txt b/dll/cpl/mmsys/CMakeLists.txt similarity index 100% rename from reactos/dll/cpl/mmsys/CMakeLists.txt rename to dll/cpl/mmsys/CMakeLists.txt diff --git a/reactos/dll/cpl/mmsys/audio.c b/dll/cpl/mmsys/audio.c similarity index 100% rename from reactos/dll/cpl/mmsys/audio.c rename to dll/cpl/mmsys/audio.c diff --git a/reactos/dll/cpl/mmsys/lang/bg-BG.rc b/dll/cpl/mmsys/lang/bg-BG.rc similarity index 100% rename from reactos/dll/cpl/mmsys/lang/bg-BG.rc rename to dll/cpl/mmsys/lang/bg-BG.rc diff --git a/reactos/dll/cpl/mmsys/lang/cs-CZ.rc b/dll/cpl/mmsys/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/cpl/mmsys/lang/cs-CZ.rc rename to dll/cpl/mmsys/lang/cs-CZ.rc diff --git a/reactos/dll/cpl/mmsys/lang/de-DE.rc b/dll/cpl/mmsys/lang/de-DE.rc similarity index 100% rename from reactos/dll/cpl/mmsys/lang/de-DE.rc rename to dll/cpl/mmsys/lang/de-DE.rc diff --git a/reactos/dll/cpl/mmsys/lang/el-GR.rc b/dll/cpl/mmsys/lang/el-GR.rc similarity index 100% rename from reactos/dll/cpl/mmsys/lang/el-GR.rc rename to dll/cpl/mmsys/lang/el-GR.rc diff --git a/reactos/dll/cpl/mmsys/lang/en-US.rc b/dll/cpl/mmsys/lang/en-US.rc similarity index 100% rename from reactos/dll/cpl/mmsys/lang/en-US.rc rename to dll/cpl/mmsys/lang/en-US.rc diff --git a/reactos/dll/cpl/mmsys/lang/es-ES.rc b/dll/cpl/mmsys/lang/es-ES.rc similarity index 100% rename from reactos/dll/cpl/mmsys/lang/es-ES.rc rename to dll/cpl/mmsys/lang/es-ES.rc diff --git a/reactos/dll/cpl/mmsys/lang/fr-FR.rc b/dll/cpl/mmsys/lang/fr-FR.rc similarity index 100% rename from reactos/dll/cpl/mmsys/lang/fr-FR.rc rename to dll/cpl/mmsys/lang/fr-FR.rc diff --git a/reactos/dll/cpl/mmsys/lang/id-ID.rc b/dll/cpl/mmsys/lang/id-ID.rc similarity index 100% rename from reactos/dll/cpl/mmsys/lang/id-ID.rc rename to dll/cpl/mmsys/lang/id-ID.rc diff --git a/reactos/dll/cpl/mmsys/lang/it-IT.rc b/dll/cpl/mmsys/lang/it-IT.rc similarity index 100% rename from reactos/dll/cpl/mmsys/lang/it-IT.rc rename to dll/cpl/mmsys/lang/it-IT.rc diff --git a/reactos/dll/cpl/mmsys/lang/nl-NL.rc b/dll/cpl/mmsys/lang/nl-NL.rc similarity index 100% rename from reactos/dll/cpl/mmsys/lang/nl-NL.rc rename to dll/cpl/mmsys/lang/nl-NL.rc diff --git a/reactos/dll/cpl/mmsys/lang/no-NO.rc b/dll/cpl/mmsys/lang/no-NO.rc similarity index 100% rename from reactos/dll/cpl/mmsys/lang/no-NO.rc rename to dll/cpl/mmsys/lang/no-NO.rc diff --git a/reactos/dll/cpl/mmsys/lang/pl-PL.rc b/dll/cpl/mmsys/lang/pl-PL.rc similarity index 100% rename from reactos/dll/cpl/mmsys/lang/pl-PL.rc rename to dll/cpl/mmsys/lang/pl-PL.rc diff --git a/reactos/dll/cpl/mmsys/lang/pt-BR.rc b/dll/cpl/mmsys/lang/pt-BR.rc similarity index 100% rename from reactos/dll/cpl/mmsys/lang/pt-BR.rc rename to dll/cpl/mmsys/lang/pt-BR.rc diff --git a/reactos/dll/cpl/mmsys/lang/ro-RO.rc b/dll/cpl/mmsys/lang/ro-RO.rc similarity index 100% rename from reactos/dll/cpl/mmsys/lang/ro-RO.rc rename to dll/cpl/mmsys/lang/ro-RO.rc diff --git a/reactos/dll/cpl/mmsys/lang/ru-RU.rc b/dll/cpl/mmsys/lang/ru-RU.rc similarity index 100% rename from reactos/dll/cpl/mmsys/lang/ru-RU.rc rename to dll/cpl/mmsys/lang/ru-RU.rc diff --git a/reactos/dll/cpl/mmsys/lang/sk-SK.rc b/dll/cpl/mmsys/lang/sk-SK.rc similarity index 100% rename from reactos/dll/cpl/mmsys/lang/sk-SK.rc rename to dll/cpl/mmsys/lang/sk-SK.rc diff --git a/reactos/dll/cpl/mmsys/lang/uk-UA.rc b/dll/cpl/mmsys/lang/uk-UA.rc similarity index 100% rename from reactos/dll/cpl/mmsys/lang/uk-UA.rc rename to dll/cpl/mmsys/lang/uk-UA.rc diff --git a/reactos/dll/cpl/mmsys/lang/zh-CN.rc b/dll/cpl/mmsys/lang/zh-CN.rc similarity index 100% rename from reactos/dll/cpl/mmsys/lang/zh-CN.rc rename to dll/cpl/mmsys/lang/zh-CN.rc diff --git a/reactos/dll/cpl/mmsys/mmsys.c b/dll/cpl/mmsys/mmsys.c similarity index 100% rename from reactos/dll/cpl/mmsys/mmsys.c rename to dll/cpl/mmsys/mmsys.c diff --git a/reactos/dll/cpl/mmsys/mmsys.h b/dll/cpl/mmsys/mmsys.h similarity index 100% rename from reactos/dll/cpl/mmsys/mmsys.h rename to dll/cpl/mmsys/mmsys.h diff --git a/reactos/dll/cpl/mmsys/mmsys.rbuild b/dll/cpl/mmsys/mmsys.rbuild similarity index 100% rename from reactos/dll/cpl/mmsys/mmsys.rbuild rename to dll/cpl/mmsys/mmsys.rbuild diff --git a/reactos/dll/cpl/mmsys/mmsys.rc b/dll/cpl/mmsys/mmsys.rc similarity index 100% rename from reactos/dll/cpl/mmsys/mmsys.rc rename to dll/cpl/mmsys/mmsys.rc diff --git a/reactos/dll/cpl/mmsys/mmsys.spec b/dll/cpl/mmsys/mmsys.spec similarity index 100% rename from reactos/dll/cpl/mmsys/mmsys.spec rename to dll/cpl/mmsys/mmsys.spec diff --git a/reactos/dll/cpl/mmsys/resource.h b/dll/cpl/mmsys/resource.h similarity index 100% rename from reactos/dll/cpl/mmsys/resource.h rename to dll/cpl/mmsys/resource.h diff --git a/reactos/dll/cpl/mmsys/resources/3004.ico b/dll/cpl/mmsys/resources/3004.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/3004.ico rename to dll/cpl/mmsys/resources/3004.ico diff --git a/reactos/dll/cpl/mmsys/resources/4353.ico b/dll/cpl/mmsys/resources/4353.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4353.ico rename to dll/cpl/mmsys/resources/4353.ico diff --git a/reactos/dll/cpl/mmsys/resources/4354.ico b/dll/cpl/mmsys/resources/4354.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4354.ico rename to dll/cpl/mmsys/resources/4354.ico diff --git a/reactos/dll/cpl/mmsys/resources/4355.ico b/dll/cpl/mmsys/resources/4355.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4355.ico rename to dll/cpl/mmsys/resources/4355.ico diff --git a/reactos/dll/cpl/mmsys/resources/4356.ico b/dll/cpl/mmsys/resources/4356.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4356.ico rename to dll/cpl/mmsys/resources/4356.ico diff --git a/reactos/dll/cpl/mmsys/resources/4357.ico b/dll/cpl/mmsys/resources/4357.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4357.ico rename to dll/cpl/mmsys/resources/4357.ico diff --git a/reactos/dll/cpl/mmsys/resources/4358.ico b/dll/cpl/mmsys/resources/4358.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4358.ico rename to dll/cpl/mmsys/resources/4358.ico diff --git a/reactos/dll/cpl/mmsys/resources/4359.ico b/dll/cpl/mmsys/resources/4359.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4359.ico rename to dll/cpl/mmsys/resources/4359.ico diff --git a/reactos/dll/cpl/mmsys/resources/4360.ico b/dll/cpl/mmsys/resources/4360.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4360.ico rename to dll/cpl/mmsys/resources/4360.ico diff --git a/reactos/dll/cpl/mmsys/resources/4361.ico b/dll/cpl/mmsys/resources/4361.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4361.ico rename to dll/cpl/mmsys/resources/4361.ico diff --git a/reactos/dll/cpl/mmsys/resources/4362.ico b/dll/cpl/mmsys/resources/4362.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4362.ico rename to dll/cpl/mmsys/resources/4362.ico diff --git a/reactos/dll/cpl/mmsys/resources/4363.ico b/dll/cpl/mmsys/resources/4363.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4363.ico rename to dll/cpl/mmsys/resources/4363.ico diff --git a/reactos/dll/cpl/mmsys/resources/4364.ico b/dll/cpl/mmsys/resources/4364.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4364.ico rename to dll/cpl/mmsys/resources/4364.ico diff --git a/reactos/dll/cpl/mmsys/resources/4365.ico b/dll/cpl/mmsys/resources/4365.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4365.ico rename to dll/cpl/mmsys/resources/4365.ico diff --git a/reactos/dll/cpl/mmsys/resources/4366.ico b/dll/cpl/mmsys/resources/4366.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4366.ico rename to dll/cpl/mmsys/resources/4366.ico diff --git a/reactos/dll/cpl/mmsys/resources/4367.ico b/dll/cpl/mmsys/resources/4367.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4367.ico rename to dll/cpl/mmsys/resources/4367.ico diff --git a/reactos/dll/cpl/mmsys/resources/4368.ico b/dll/cpl/mmsys/resources/4368.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4368.ico rename to dll/cpl/mmsys/resources/4368.ico diff --git a/reactos/dll/cpl/mmsys/resources/4369.ico b/dll/cpl/mmsys/resources/4369.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4369.ico rename to dll/cpl/mmsys/resources/4369.ico diff --git a/reactos/dll/cpl/mmsys/resources/4370.ico b/dll/cpl/mmsys/resources/4370.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4370.ico rename to dll/cpl/mmsys/resources/4370.ico diff --git a/reactos/dll/cpl/mmsys/resources/4371.ico b/dll/cpl/mmsys/resources/4371.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4371.ico rename to dll/cpl/mmsys/resources/4371.ico diff --git a/reactos/dll/cpl/mmsys/resources/4372.ico b/dll/cpl/mmsys/resources/4372.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4372.ico rename to dll/cpl/mmsys/resources/4372.ico diff --git a/reactos/dll/cpl/mmsys/resources/4373.ico b/dll/cpl/mmsys/resources/4373.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4373.ico rename to dll/cpl/mmsys/resources/4373.ico diff --git a/reactos/dll/cpl/mmsys/resources/4374.ico b/dll/cpl/mmsys/resources/4374.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4374.ico rename to dll/cpl/mmsys/resources/4374.ico diff --git a/reactos/dll/cpl/mmsys/resources/4375.ico b/dll/cpl/mmsys/resources/4375.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4375.ico rename to dll/cpl/mmsys/resources/4375.ico diff --git a/reactos/dll/cpl/mmsys/resources/4376.ico b/dll/cpl/mmsys/resources/4376.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4376.ico rename to dll/cpl/mmsys/resources/4376.ico diff --git a/reactos/dll/cpl/mmsys/resources/4377.ico b/dll/cpl/mmsys/resources/4377.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4377.ico rename to dll/cpl/mmsys/resources/4377.ico diff --git a/reactos/dll/cpl/mmsys/resources/4378.ico b/dll/cpl/mmsys/resources/4378.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4378.ico rename to dll/cpl/mmsys/resources/4378.ico diff --git a/reactos/dll/cpl/mmsys/resources/4379.ico b/dll/cpl/mmsys/resources/4379.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4379.ico rename to dll/cpl/mmsys/resources/4379.ico diff --git a/reactos/dll/cpl/mmsys/resources/4380.ico b/dll/cpl/mmsys/resources/4380.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4380.ico rename to dll/cpl/mmsys/resources/4380.ico diff --git a/reactos/dll/cpl/mmsys/resources/4381.ico b/dll/cpl/mmsys/resources/4381.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4381.ico rename to dll/cpl/mmsys/resources/4381.ico diff --git a/reactos/dll/cpl/mmsys/resources/4382.ico b/dll/cpl/mmsys/resources/4382.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4382.ico rename to dll/cpl/mmsys/resources/4382.ico diff --git a/reactos/dll/cpl/mmsys/resources/4383.ico b/dll/cpl/mmsys/resources/4383.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4383.ico rename to dll/cpl/mmsys/resources/4383.ico diff --git a/reactos/dll/cpl/mmsys/resources/4384.ico b/dll/cpl/mmsys/resources/4384.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4384.ico rename to dll/cpl/mmsys/resources/4384.ico diff --git a/reactos/dll/cpl/mmsys/resources/4385.ico b/dll/cpl/mmsys/resources/4385.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4385.ico rename to dll/cpl/mmsys/resources/4385.ico diff --git a/reactos/dll/cpl/mmsys/resources/4386.ico b/dll/cpl/mmsys/resources/4386.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4386.ico rename to dll/cpl/mmsys/resources/4386.ico diff --git a/reactos/dll/cpl/mmsys/resources/4387.ico b/dll/cpl/mmsys/resources/4387.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4387.ico rename to dll/cpl/mmsys/resources/4387.ico diff --git a/reactos/dll/cpl/mmsys/resources/4388.ico b/dll/cpl/mmsys/resources/4388.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4388.ico rename to dll/cpl/mmsys/resources/4388.ico diff --git a/reactos/dll/cpl/mmsys/resources/4390.ico b/dll/cpl/mmsys/resources/4390.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4390.ico rename to dll/cpl/mmsys/resources/4390.ico diff --git a/reactos/dll/cpl/mmsys/resources/4393.ico b/dll/cpl/mmsys/resources/4393.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4393.ico rename to dll/cpl/mmsys/resources/4393.ico diff --git a/reactos/dll/cpl/mmsys/resources/4394.ico b/dll/cpl/mmsys/resources/4394.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/4394.ico rename to dll/cpl/mmsys/resources/4394.ico diff --git a/reactos/dll/cpl/mmsys/resources/play.ico b/dll/cpl/mmsys/resources/play.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/play.ico rename to dll/cpl/mmsys/resources/play.ico diff --git a/reactos/dll/cpl/mmsys/resources/speaker.bmp b/dll/cpl/mmsys/resources/speaker.bmp similarity index 100% rename from reactos/dll/cpl/mmsys/resources/speaker.bmp rename to dll/cpl/mmsys/resources/speaker.bmp diff --git a/reactos/dll/cpl/mmsys/resources/stop.ico b/dll/cpl/mmsys/resources/stop.ico similarity index 100% rename from reactos/dll/cpl/mmsys/resources/stop.ico rename to dll/cpl/mmsys/resources/stop.ico diff --git a/reactos/dll/cpl/mmsys/rsrc.rc b/dll/cpl/mmsys/rsrc.rc similarity index 100% rename from reactos/dll/cpl/mmsys/rsrc.rc rename to dll/cpl/mmsys/rsrc.rc diff --git a/reactos/dll/cpl/mmsys/sounds.c b/dll/cpl/mmsys/sounds.c similarity index 100% rename from reactos/dll/cpl/mmsys/sounds.c rename to dll/cpl/mmsys/sounds.c diff --git a/reactos/dll/cpl/mmsys/voice.c b/dll/cpl/mmsys/voice.c similarity index 100% rename from reactos/dll/cpl/mmsys/voice.c rename to dll/cpl/mmsys/voice.c diff --git a/reactos/dll/cpl/mmsys/volume.c b/dll/cpl/mmsys/volume.c similarity index 100% rename from reactos/dll/cpl/mmsys/volume.c rename to dll/cpl/mmsys/volume.c diff --git a/reactos/dll/cpl/ncpa/CMakeLists.txt b/dll/cpl/ncpa/CMakeLists.txt similarity index 100% rename from reactos/dll/cpl/ncpa/CMakeLists.txt rename to dll/cpl/ncpa/CMakeLists.txt diff --git a/reactos/dll/cpl/ncpa/ncpa.c b/dll/cpl/ncpa/ncpa.c similarity index 100% rename from reactos/dll/cpl/ncpa/ncpa.c rename to dll/cpl/ncpa/ncpa.c diff --git a/reactos/dll/cpl/ncpa/ncpa.rbuild b/dll/cpl/ncpa/ncpa.rbuild similarity index 100% rename from reactos/dll/cpl/ncpa/ncpa.rbuild rename to dll/cpl/ncpa/ncpa.rbuild diff --git a/reactos/dll/cpl/ncpa/ncpa.spec b/dll/cpl/ncpa/ncpa.spec similarity index 100% rename from reactos/dll/cpl/ncpa/ncpa.spec rename to dll/cpl/ncpa/ncpa.spec diff --git a/reactos/dll/cpl/odbccp32/CMakeLists.txt b/dll/cpl/odbccp32/CMakeLists.txt similarity index 100% rename from reactos/dll/cpl/odbccp32/CMakeLists.txt rename to dll/cpl/odbccp32/CMakeLists.txt diff --git a/reactos/dll/cpl/odbccp32/odbccp32.c b/dll/cpl/odbccp32/odbccp32.c similarity index 100% rename from reactos/dll/cpl/odbccp32/odbccp32.c rename to dll/cpl/odbccp32/odbccp32.c diff --git a/reactos/dll/cpl/odbccp32/odbccp32.h b/dll/cpl/odbccp32/odbccp32.h similarity index 100% rename from reactos/dll/cpl/odbccp32/odbccp32.h rename to dll/cpl/odbccp32/odbccp32.h diff --git a/reactos/dll/cpl/odbccp32/odbccp32.rbuild b/dll/cpl/odbccp32/odbccp32.rbuild similarity index 100% rename from reactos/dll/cpl/odbccp32/odbccp32.rbuild rename to dll/cpl/odbccp32/odbccp32.rbuild diff --git a/reactos/dll/cpl/odbccp32/odbccp32.rc b/dll/cpl/odbccp32/odbccp32.rc similarity index 100% rename from reactos/dll/cpl/odbccp32/odbccp32.rc rename to dll/cpl/odbccp32/odbccp32.rc diff --git a/reactos/dll/cpl/odbccp32/odbccp32.spec b/dll/cpl/odbccp32/odbccp32.spec similarity index 100% rename from reactos/dll/cpl/odbccp32/odbccp32.spec rename to dll/cpl/odbccp32/odbccp32.spec diff --git a/reactos/dll/cpl/powercfg/CMakeLists.txt b/dll/cpl/powercfg/CMakeLists.txt similarity index 100% rename from reactos/dll/cpl/powercfg/CMakeLists.txt rename to dll/cpl/powercfg/CMakeLists.txt diff --git a/reactos/dll/cpl/powercfg/advanced.c b/dll/cpl/powercfg/advanced.c similarity index 100% rename from reactos/dll/cpl/powercfg/advanced.c rename to dll/cpl/powercfg/advanced.c diff --git a/reactos/dll/cpl/powercfg/alarms.c b/dll/cpl/powercfg/alarms.c similarity index 100% rename from reactos/dll/cpl/powercfg/alarms.c rename to dll/cpl/powercfg/alarms.c diff --git a/reactos/dll/cpl/powercfg/hibernate.c b/dll/cpl/powercfg/hibernate.c similarity index 100% rename from reactos/dll/cpl/powercfg/hibernate.c rename to dll/cpl/powercfg/hibernate.c diff --git a/reactos/dll/cpl/powercfg/lang/bg-BG.rc b/dll/cpl/powercfg/lang/bg-BG.rc similarity index 100% rename from reactos/dll/cpl/powercfg/lang/bg-BG.rc rename to dll/cpl/powercfg/lang/bg-BG.rc diff --git a/reactos/dll/cpl/powercfg/lang/cs-CZ.rc b/dll/cpl/powercfg/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/cpl/powercfg/lang/cs-CZ.rc rename to dll/cpl/powercfg/lang/cs-CZ.rc diff --git a/reactos/dll/cpl/powercfg/lang/de-DE.rc b/dll/cpl/powercfg/lang/de-DE.rc similarity index 100% rename from reactos/dll/cpl/powercfg/lang/de-DE.rc rename to dll/cpl/powercfg/lang/de-DE.rc diff --git a/reactos/dll/cpl/powercfg/lang/el-GR.rc b/dll/cpl/powercfg/lang/el-GR.rc similarity index 100% rename from reactos/dll/cpl/powercfg/lang/el-GR.rc rename to dll/cpl/powercfg/lang/el-GR.rc diff --git a/reactos/dll/cpl/powercfg/lang/en-US.rc b/dll/cpl/powercfg/lang/en-US.rc similarity index 100% rename from reactos/dll/cpl/powercfg/lang/en-US.rc rename to dll/cpl/powercfg/lang/en-US.rc diff --git a/reactos/dll/cpl/powercfg/lang/es-ES.rc b/dll/cpl/powercfg/lang/es-ES.rc similarity index 100% rename from reactos/dll/cpl/powercfg/lang/es-ES.rc rename to dll/cpl/powercfg/lang/es-ES.rc diff --git a/reactos/dll/cpl/powercfg/lang/fr-FR.rc b/dll/cpl/powercfg/lang/fr-FR.rc similarity index 100% rename from reactos/dll/cpl/powercfg/lang/fr-FR.rc rename to dll/cpl/powercfg/lang/fr-FR.rc diff --git a/reactos/dll/cpl/powercfg/lang/id-ID.rc b/dll/cpl/powercfg/lang/id-ID.rc similarity index 100% rename from reactos/dll/cpl/powercfg/lang/id-ID.rc rename to dll/cpl/powercfg/lang/id-ID.rc diff --git a/reactos/dll/cpl/powercfg/lang/it-IT.rc b/dll/cpl/powercfg/lang/it-IT.rc similarity index 100% rename from reactos/dll/cpl/powercfg/lang/it-IT.rc rename to dll/cpl/powercfg/lang/it-IT.rc diff --git a/reactos/dll/cpl/powercfg/lang/ja-JP.rc b/dll/cpl/powercfg/lang/ja-JP.rc similarity index 100% rename from reactos/dll/cpl/powercfg/lang/ja-JP.rc rename to dll/cpl/powercfg/lang/ja-JP.rc diff --git a/reactos/dll/cpl/powercfg/lang/nl-NL.rc b/dll/cpl/powercfg/lang/nl-NL.rc similarity index 100% rename from reactos/dll/cpl/powercfg/lang/nl-NL.rc rename to dll/cpl/powercfg/lang/nl-NL.rc diff --git a/reactos/dll/cpl/powercfg/lang/no-NO.rc b/dll/cpl/powercfg/lang/no-NO.rc similarity index 100% rename from reactos/dll/cpl/powercfg/lang/no-NO.rc rename to dll/cpl/powercfg/lang/no-NO.rc diff --git a/reactos/dll/cpl/powercfg/lang/pl-PL.rc b/dll/cpl/powercfg/lang/pl-PL.rc similarity index 100% rename from reactos/dll/cpl/powercfg/lang/pl-PL.rc rename to dll/cpl/powercfg/lang/pl-PL.rc diff --git a/reactos/dll/cpl/powercfg/lang/ro-RO.rc b/dll/cpl/powercfg/lang/ro-RO.rc similarity index 100% rename from reactos/dll/cpl/powercfg/lang/ro-RO.rc rename to dll/cpl/powercfg/lang/ro-RO.rc diff --git a/reactos/dll/cpl/powercfg/lang/ru-RU.rc b/dll/cpl/powercfg/lang/ru-RU.rc similarity index 100% rename from reactos/dll/cpl/powercfg/lang/ru-RU.rc rename to dll/cpl/powercfg/lang/ru-RU.rc diff --git a/reactos/dll/cpl/powercfg/lang/sk-SK.rc b/dll/cpl/powercfg/lang/sk-SK.rc similarity index 100% rename from reactos/dll/cpl/powercfg/lang/sk-SK.rc rename to dll/cpl/powercfg/lang/sk-SK.rc diff --git a/reactos/dll/cpl/powercfg/lang/th-TH.rc b/dll/cpl/powercfg/lang/th-TH.rc similarity index 100% rename from reactos/dll/cpl/powercfg/lang/th-TH.rc rename to dll/cpl/powercfg/lang/th-TH.rc diff --git a/reactos/dll/cpl/powercfg/lang/uk-UA.rc b/dll/cpl/powercfg/lang/uk-UA.rc similarity index 100% rename from reactos/dll/cpl/powercfg/lang/uk-UA.rc rename to dll/cpl/powercfg/lang/uk-UA.rc diff --git a/reactos/dll/cpl/powercfg/lang/zh-CN.rc b/dll/cpl/powercfg/lang/zh-CN.rc similarity index 100% rename from reactos/dll/cpl/powercfg/lang/zh-CN.rc rename to dll/cpl/powercfg/lang/zh-CN.rc diff --git a/reactos/dll/cpl/powercfg/powercfg.c b/dll/cpl/powercfg/powercfg.c similarity index 100% rename from reactos/dll/cpl/powercfg/powercfg.c rename to dll/cpl/powercfg/powercfg.c diff --git a/reactos/dll/cpl/powercfg/powercfg.h b/dll/cpl/powercfg/powercfg.h similarity index 100% rename from reactos/dll/cpl/powercfg/powercfg.h rename to dll/cpl/powercfg/powercfg.h diff --git a/reactos/dll/cpl/powercfg/powercfg.rbuild b/dll/cpl/powercfg/powercfg.rbuild similarity index 100% rename from reactos/dll/cpl/powercfg/powercfg.rbuild rename to dll/cpl/powercfg/powercfg.rbuild diff --git a/reactos/dll/cpl/powercfg/powercfg.rc b/dll/cpl/powercfg/powercfg.rc similarity index 100% rename from reactos/dll/cpl/powercfg/powercfg.rc rename to dll/cpl/powercfg/powercfg.rc diff --git a/reactos/dll/cpl/powercfg/powercfg.spec b/dll/cpl/powercfg/powercfg.spec similarity index 100% rename from reactos/dll/cpl/powercfg/powercfg.spec rename to dll/cpl/powercfg/powercfg.spec diff --git a/reactos/dll/cpl/powercfg/powershemes.c b/dll/cpl/powercfg/powershemes.c similarity index 100% rename from reactos/dll/cpl/powercfg/powershemes.c rename to dll/cpl/powercfg/powershemes.c diff --git a/reactos/dll/cpl/powercfg/resource.h b/dll/cpl/powercfg/resource.h similarity index 100% rename from reactos/dll/cpl/powercfg/resource.h rename to dll/cpl/powercfg/resource.h diff --git a/reactos/dll/cpl/powercfg/resources/ac.ico b/dll/cpl/powercfg/resources/ac.ico similarity index 100% rename from reactos/dll/cpl/powercfg/resources/ac.ico rename to dll/cpl/powercfg/resources/ac.ico diff --git a/reactos/dll/cpl/powercfg/resources/acdc.ico b/dll/cpl/powercfg/resources/acdc.ico similarity index 100% rename from reactos/dll/cpl/powercfg/resources/acdc.ico rename to dll/cpl/powercfg/resources/acdc.ico diff --git a/reactos/dll/cpl/powercfg/resources/batterycharging.ico b/dll/cpl/powercfg/resources/batterycharging.ico similarity index 100% rename from reactos/dll/cpl/powercfg/resources/batterycharging.ico rename to dll/cpl/powercfg/resources/batterycharging.ico diff --git a/reactos/dll/cpl/powercfg/resources/batterychargingcritical.ico b/dll/cpl/powercfg/resources/batterychargingcritical.ico similarity index 100% rename from reactos/dll/cpl/powercfg/resources/batterychargingcritical.ico rename to dll/cpl/powercfg/resources/batterychargingcritical.ico diff --git a/reactos/dll/cpl/powercfg/resources/batterycharginghalf.ico b/dll/cpl/powercfg/resources/batterycharginghalf.ico similarity index 100% rename from reactos/dll/cpl/powercfg/resources/batterycharginghalf.ico rename to dll/cpl/powercfg/resources/batterycharginghalf.ico diff --git a/reactos/dll/cpl/powercfg/resources/batterycharginghigh.ico b/dll/cpl/powercfg/resources/batterycharginghigh.ico similarity index 100% rename from reactos/dll/cpl/powercfg/resources/batterycharginghigh.ico rename to dll/cpl/powercfg/resources/batterycharginghigh.ico diff --git a/reactos/dll/cpl/powercfg/resources/batterycharginglow.ico b/dll/cpl/powercfg/resources/batterycharginglow.ico similarity index 100% rename from reactos/dll/cpl/powercfg/resources/batterycharginglow.ico rename to dll/cpl/powercfg/resources/batterycharginglow.ico diff --git a/reactos/dll/cpl/powercfg/resources/batterycritical.ico b/dll/cpl/powercfg/resources/batterycritical.ico similarity index 100% rename from reactos/dll/cpl/powercfg/resources/batterycritical.ico rename to dll/cpl/powercfg/resources/batterycritical.ico diff --git a/reactos/dll/cpl/powercfg/resources/batteryfull.ico b/dll/cpl/powercfg/resources/batteryfull.ico similarity index 100% rename from reactos/dll/cpl/powercfg/resources/batteryfull.ico rename to dll/cpl/powercfg/resources/batteryfull.ico diff --git a/reactos/dll/cpl/powercfg/resources/batteryhalf.ico b/dll/cpl/powercfg/resources/batteryhalf.ico similarity index 100% rename from reactos/dll/cpl/powercfg/resources/batteryhalf.ico rename to dll/cpl/powercfg/resources/batteryhalf.ico diff --git a/reactos/dll/cpl/powercfg/resources/batteryhigh.ico b/dll/cpl/powercfg/resources/batteryhigh.ico similarity index 100% rename from reactos/dll/cpl/powercfg/resources/batteryhigh.ico rename to dll/cpl/powercfg/resources/batteryhigh.ico diff --git a/reactos/dll/cpl/powercfg/resources/batterylow.ico b/dll/cpl/powercfg/resources/batterylow.ico similarity index 100% rename from reactos/dll/cpl/powercfg/resources/batterylow.ico rename to dll/cpl/powercfg/resources/batterylow.ico diff --git a/reactos/dll/cpl/powercfg/resources/batteryunknown.ico b/dll/cpl/powercfg/resources/batteryunknown.ico similarity index 100% rename from reactos/dll/cpl/powercfg/resources/batteryunknown.ico rename to dll/cpl/powercfg/resources/batteryunknown.ico diff --git a/reactos/dll/cpl/powercfg/resources/dc.ico b/dll/cpl/powercfg/resources/dc.ico similarity index 100% rename from reactos/dll/cpl/powercfg/resources/dc.ico rename to dll/cpl/powercfg/resources/dc.ico diff --git a/reactos/dll/cpl/powercfg/resources/hibernate.ico b/dll/cpl/powercfg/resources/hibernate.ico similarity index 100% rename from reactos/dll/cpl/powercfg/resources/hibernate.ico rename to dll/cpl/powercfg/resources/hibernate.ico diff --git a/reactos/dll/cpl/powercfg/resources/nobattery.ico b/dll/cpl/powercfg/resources/nobattery.ico similarity index 100% rename from reactos/dll/cpl/powercfg/resources/nobattery.ico rename to dll/cpl/powercfg/resources/nobattery.ico diff --git a/reactos/dll/cpl/powercfg/resources/screen.ico b/dll/cpl/powercfg/resources/screen.ico similarity index 100% rename from reactos/dll/cpl/powercfg/resources/screen.ico rename to dll/cpl/powercfg/resources/screen.ico diff --git a/reactos/dll/cpl/powercfg/rsrc.rc b/dll/cpl/powercfg/rsrc.rc similarity index 100% rename from reactos/dll/cpl/powercfg/rsrc.rc rename to dll/cpl/powercfg/rsrc.rc diff --git a/reactos/dll/cpl/sysdm/CMakeLists.txt b/dll/cpl/sysdm/CMakeLists.txt similarity index 100% rename from reactos/dll/cpl/sysdm/CMakeLists.txt rename to dll/cpl/sysdm/CMakeLists.txt diff --git a/reactos/dll/cpl/sysdm/advanced.c b/dll/cpl/sysdm/advanced.c similarity index 100% rename from reactos/dll/cpl/sysdm/advanced.c rename to dll/cpl/sysdm/advanced.c diff --git a/reactos/dll/cpl/sysdm/environment.c b/dll/cpl/sysdm/environment.c similarity index 100% rename from reactos/dll/cpl/sysdm/environment.c rename to dll/cpl/sysdm/environment.c diff --git a/reactos/dll/cpl/sysdm/general.c b/dll/cpl/sysdm/general.c similarity index 100% rename from reactos/dll/cpl/sysdm/general.c rename to dll/cpl/sysdm/general.c diff --git a/reactos/dll/cpl/sysdm/hardprof.c b/dll/cpl/sysdm/hardprof.c similarity index 100% rename from reactos/dll/cpl/sysdm/hardprof.c rename to dll/cpl/sysdm/hardprof.c diff --git a/reactos/dll/cpl/sysdm/hardware.c b/dll/cpl/sysdm/hardware.c similarity index 100% rename from reactos/dll/cpl/sysdm/hardware.c rename to dll/cpl/sysdm/hardware.c diff --git a/reactos/dll/cpl/sysdm/lang/bg-BG.rc b/dll/cpl/sysdm/lang/bg-BG.rc similarity index 100% rename from reactos/dll/cpl/sysdm/lang/bg-BG.rc rename to dll/cpl/sysdm/lang/bg-BG.rc diff --git a/reactos/dll/cpl/sysdm/lang/cs-CZ.rc b/dll/cpl/sysdm/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/cpl/sysdm/lang/cs-CZ.rc rename to dll/cpl/sysdm/lang/cs-CZ.rc diff --git a/reactos/dll/cpl/sysdm/lang/da-DK.rc b/dll/cpl/sysdm/lang/da-DK.rc similarity index 100% rename from reactos/dll/cpl/sysdm/lang/da-DK.rc rename to dll/cpl/sysdm/lang/da-DK.rc diff --git a/reactos/dll/cpl/sysdm/lang/de-DE.rc b/dll/cpl/sysdm/lang/de-DE.rc similarity index 100% rename from reactos/dll/cpl/sysdm/lang/de-DE.rc rename to dll/cpl/sysdm/lang/de-DE.rc diff --git a/reactos/dll/cpl/sysdm/lang/el-GR.rc b/dll/cpl/sysdm/lang/el-GR.rc similarity index 100% rename from reactos/dll/cpl/sysdm/lang/el-GR.rc rename to dll/cpl/sysdm/lang/el-GR.rc diff --git a/reactos/dll/cpl/sysdm/lang/en-US.rc b/dll/cpl/sysdm/lang/en-US.rc similarity index 100% rename from reactos/dll/cpl/sysdm/lang/en-US.rc rename to dll/cpl/sysdm/lang/en-US.rc diff --git a/reactos/dll/cpl/sysdm/lang/es-ES.rc b/dll/cpl/sysdm/lang/es-ES.rc similarity index 100% rename from reactos/dll/cpl/sysdm/lang/es-ES.rc rename to dll/cpl/sysdm/lang/es-ES.rc diff --git a/reactos/dll/cpl/sysdm/lang/fr-FR.rc b/dll/cpl/sysdm/lang/fr-FR.rc similarity index 100% rename from reactos/dll/cpl/sysdm/lang/fr-FR.rc rename to dll/cpl/sysdm/lang/fr-FR.rc diff --git a/reactos/dll/cpl/sysdm/lang/hu-HU.rc b/dll/cpl/sysdm/lang/hu-HU.rc similarity index 100% rename from reactos/dll/cpl/sysdm/lang/hu-HU.rc rename to dll/cpl/sysdm/lang/hu-HU.rc diff --git a/reactos/dll/cpl/sysdm/lang/id-ID.rc b/dll/cpl/sysdm/lang/id-ID.rc similarity index 100% rename from reactos/dll/cpl/sysdm/lang/id-ID.rc rename to dll/cpl/sysdm/lang/id-ID.rc diff --git a/reactos/dll/cpl/sysdm/lang/it-IT.rc b/dll/cpl/sysdm/lang/it-IT.rc similarity index 100% rename from reactos/dll/cpl/sysdm/lang/it-IT.rc rename to dll/cpl/sysdm/lang/it-IT.rc diff --git a/reactos/dll/cpl/sysdm/lang/ja-JP.rc b/dll/cpl/sysdm/lang/ja-JP.rc similarity index 100% rename from reactos/dll/cpl/sysdm/lang/ja-JP.rc rename to dll/cpl/sysdm/lang/ja-JP.rc diff --git a/reactos/dll/cpl/sysdm/lang/nl-NL.rc b/dll/cpl/sysdm/lang/nl-NL.rc similarity index 100% rename from reactos/dll/cpl/sysdm/lang/nl-NL.rc rename to dll/cpl/sysdm/lang/nl-NL.rc diff --git a/reactos/dll/cpl/sysdm/lang/no-NO.rc b/dll/cpl/sysdm/lang/no-NO.rc similarity index 100% rename from reactos/dll/cpl/sysdm/lang/no-NO.rc rename to dll/cpl/sysdm/lang/no-NO.rc diff --git a/reactos/dll/cpl/sysdm/lang/pl-PL.rc b/dll/cpl/sysdm/lang/pl-PL.rc similarity index 100% rename from reactos/dll/cpl/sysdm/lang/pl-PL.rc rename to dll/cpl/sysdm/lang/pl-PL.rc diff --git a/reactos/dll/cpl/sysdm/lang/ro-RO.rc b/dll/cpl/sysdm/lang/ro-RO.rc similarity index 100% rename from reactos/dll/cpl/sysdm/lang/ro-RO.rc rename to dll/cpl/sysdm/lang/ro-RO.rc diff --git a/reactos/dll/cpl/sysdm/lang/ru-RU.rc b/dll/cpl/sysdm/lang/ru-RU.rc similarity index 100% rename from reactos/dll/cpl/sysdm/lang/ru-RU.rc rename to dll/cpl/sysdm/lang/ru-RU.rc diff --git a/reactos/dll/cpl/sysdm/lang/sk-SK.rc b/dll/cpl/sysdm/lang/sk-SK.rc similarity index 100% rename from reactos/dll/cpl/sysdm/lang/sk-SK.rc rename to dll/cpl/sysdm/lang/sk-SK.rc diff --git a/reactos/dll/cpl/sysdm/lang/sv-SE.rc b/dll/cpl/sysdm/lang/sv-SE.rc similarity index 100% rename from reactos/dll/cpl/sysdm/lang/sv-SE.rc rename to dll/cpl/sysdm/lang/sv-SE.rc diff --git a/reactos/dll/cpl/sysdm/lang/uk-UA.rc b/dll/cpl/sysdm/lang/uk-UA.rc similarity index 100% rename from reactos/dll/cpl/sysdm/lang/uk-UA.rc rename to dll/cpl/sysdm/lang/uk-UA.rc diff --git a/reactos/dll/cpl/sysdm/lang/zh-CN.rc b/dll/cpl/sysdm/lang/zh-CN.rc similarity index 100% rename from reactos/dll/cpl/sysdm/lang/zh-CN.rc rename to dll/cpl/sysdm/lang/zh-CN.rc diff --git a/reactos/dll/cpl/sysdm/licence.c b/dll/cpl/sysdm/licence.c similarity index 100% rename from reactos/dll/cpl/sysdm/licence.c rename to dll/cpl/sysdm/licence.c diff --git a/reactos/dll/cpl/sysdm/precomp.h b/dll/cpl/sysdm/precomp.h similarity index 100% rename from reactos/dll/cpl/sysdm/precomp.h rename to dll/cpl/sysdm/precomp.h diff --git a/reactos/dll/cpl/sysdm/resource.h b/dll/cpl/sysdm/resource.h similarity index 100% rename from reactos/dll/cpl/sysdm/resource.h rename to dll/cpl/sysdm/resource.h diff --git a/reactos/dll/cpl/sysdm/resources/applet.ico b/dll/cpl/sysdm/resources/applet.ico similarity index 100% rename from reactos/dll/cpl/sysdm/resources/applet.ico rename to dll/cpl/sysdm/resources/applet.ico diff --git a/reactos/dll/cpl/sysdm/resources/devmgr.ico b/dll/cpl/sysdm/resources/devmgr.ico similarity index 100% rename from reactos/dll/cpl/sysdm/resources/devmgr.ico rename to dll/cpl/sysdm/resources/devmgr.ico diff --git a/reactos/dll/cpl/sysdm/resources/down.ico b/dll/cpl/sysdm/resources/down.ico similarity index 100% rename from reactos/dll/cpl/sysdm/resources/down.ico rename to dll/cpl/sysdm/resources/down.ico diff --git a/reactos/dll/cpl/sysdm/resources/gpl.txt b/dll/cpl/sysdm/resources/gpl.txt similarity index 100% rename from reactos/dll/cpl/sysdm/resources/gpl.txt rename to dll/cpl/sysdm/resources/gpl.txt diff --git a/reactos/dll/cpl/sysdm/resources/rosbitmap.bmp b/dll/cpl/sysdm/resources/rosbitmap.bmp similarity index 100% rename from reactos/dll/cpl/sysdm/resources/rosbitmap.bmp rename to dll/cpl/sysdm/resources/rosbitmap.bmp diff --git a/reactos/dll/cpl/sysdm/resources/up.ico b/dll/cpl/sysdm/resources/up.ico similarity index 100% rename from reactos/dll/cpl/sysdm/resources/up.ico rename to dll/cpl/sysdm/resources/up.ico diff --git a/reactos/dll/cpl/sysdm/rsrc.rc b/dll/cpl/sysdm/rsrc.rc similarity index 100% rename from reactos/dll/cpl/sysdm/rsrc.rc rename to dll/cpl/sysdm/rsrc.rc diff --git a/reactos/dll/cpl/sysdm/startrec.c b/dll/cpl/sysdm/startrec.c similarity index 100% rename from reactos/dll/cpl/sysdm/startrec.c rename to dll/cpl/sysdm/startrec.c diff --git a/reactos/dll/cpl/sysdm/sysdm.c b/dll/cpl/sysdm/sysdm.c similarity index 100% rename from reactos/dll/cpl/sysdm/sysdm.c rename to dll/cpl/sysdm/sysdm.c diff --git a/reactos/dll/cpl/sysdm/sysdm.rbuild b/dll/cpl/sysdm/sysdm.rbuild similarity index 100% rename from reactos/dll/cpl/sysdm/sysdm.rbuild rename to dll/cpl/sysdm/sysdm.rbuild diff --git a/reactos/dll/cpl/sysdm/sysdm.rc b/dll/cpl/sysdm/sysdm.rc similarity index 100% rename from reactos/dll/cpl/sysdm/sysdm.rc rename to dll/cpl/sysdm/sysdm.rc diff --git a/reactos/dll/cpl/sysdm/sysdm.spec b/dll/cpl/sysdm/sysdm.spec similarity index 100% rename from reactos/dll/cpl/sysdm/sysdm.spec rename to dll/cpl/sysdm/sysdm.spec diff --git a/reactos/dll/cpl/sysdm/userprofile.c b/dll/cpl/sysdm/userprofile.c similarity index 100% rename from reactos/dll/cpl/sysdm/userprofile.c rename to dll/cpl/sysdm/userprofile.c diff --git a/reactos/dll/cpl/sysdm/virtmem.c b/dll/cpl/sysdm/virtmem.c similarity index 100% rename from reactos/dll/cpl/sysdm/virtmem.c rename to dll/cpl/sysdm/virtmem.c diff --git a/reactos/dll/cpl/telephon/CMakeLists.txt b/dll/cpl/telephon/CMakeLists.txt similarity index 100% rename from reactos/dll/cpl/telephon/CMakeLists.txt rename to dll/cpl/telephon/CMakeLists.txt diff --git a/reactos/dll/cpl/telephon/lang/bg-BG.rc b/dll/cpl/telephon/lang/bg-BG.rc similarity index 100% rename from reactos/dll/cpl/telephon/lang/bg-BG.rc rename to dll/cpl/telephon/lang/bg-BG.rc diff --git a/reactos/dll/cpl/telephon/lang/cs-CZ.rc b/dll/cpl/telephon/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/cpl/telephon/lang/cs-CZ.rc rename to dll/cpl/telephon/lang/cs-CZ.rc diff --git a/reactos/dll/cpl/telephon/lang/de-DE.rc b/dll/cpl/telephon/lang/de-DE.rc similarity index 100% rename from reactos/dll/cpl/telephon/lang/de-DE.rc rename to dll/cpl/telephon/lang/de-DE.rc diff --git a/reactos/dll/cpl/telephon/lang/el-GR.rc b/dll/cpl/telephon/lang/el-GR.rc similarity index 100% rename from reactos/dll/cpl/telephon/lang/el-GR.rc rename to dll/cpl/telephon/lang/el-GR.rc diff --git a/reactos/dll/cpl/telephon/lang/en-US.rc b/dll/cpl/telephon/lang/en-US.rc similarity index 100% rename from reactos/dll/cpl/telephon/lang/en-US.rc rename to dll/cpl/telephon/lang/en-US.rc diff --git a/reactos/dll/cpl/telephon/lang/es-ES.rc b/dll/cpl/telephon/lang/es-ES.rc similarity index 100% rename from reactos/dll/cpl/telephon/lang/es-ES.rc rename to dll/cpl/telephon/lang/es-ES.rc diff --git a/reactos/dll/cpl/telephon/lang/fr-FR.rc b/dll/cpl/telephon/lang/fr-FR.rc similarity index 100% rename from reactos/dll/cpl/telephon/lang/fr-FR.rc rename to dll/cpl/telephon/lang/fr-FR.rc diff --git a/reactos/dll/cpl/telephon/lang/it-IT.rc b/dll/cpl/telephon/lang/it-IT.rc similarity index 100% rename from reactos/dll/cpl/telephon/lang/it-IT.rc rename to dll/cpl/telephon/lang/it-IT.rc diff --git a/reactos/dll/cpl/telephon/lang/ja-JP.rc b/dll/cpl/telephon/lang/ja-JP.rc similarity index 100% rename from reactos/dll/cpl/telephon/lang/ja-JP.rc rename to dll/cpl/telephon/lang/ja-JP.rc diff --git a/reactos/dll/cpl/telephon/lang/no-NO.rc b/dll/cpl/telephon/lang/no-NO.rc similarity index 100% rename from reactos/dll/cpl/telephon/lang/no-NO.rc rename to dll/cpl/telephon/lang/no-NO.rc diff --git a/reactos/dll/cpl/telephon/lang/pl-PL.rc b/dll/cpl/telephon/lang/pl-PL.rc similarity index 100% rename from reactos/dll/cpl/telephon/lang/pl-PL.rc rename to dll/cpl/telephon/lang/pl-PL.rc diff --git a/reactos/dll/cpl/telephon/lang/ro-RO.rc b/dll/cpl/telephon/lang/ro-RO.rc similarity index 100% rename from reactos/dll/cpl/telephon/lang/ro-RO.rc rename to dll/cpl/telephon/lang/ro-RO.rc diff --git a/reactos/dll/cpl/telephon/lang/ru-RU.rc b/dll/cpl/telephon/lang/ru-RU.rc similarity index 100% rename from reactos/dll/cpl/telephon/lang/ru-RU.rc rename to dll/cpl/telephon/lang/ru-RU.rc diff --git a/reactos/dll/cpl/telephon/lang/sk-SK.rc b/dll/cpl/telephon/lang/sk-SK.rc similarity index 100% rename from reactos/dll/cpl/telephon/lang/sk-SK.rc rename to dll/cpl/telephon/lang/sk-SK.rc diff --git a/reactos/dll/cpl/telephon/lang/uk-UA.rc b/dll/cpl/telephon/lang/uk-UA.rc similarity index 100% rename from reactos/dll/cpl/telephon/lang/uk-UA.rc rename to dll/cpl/telephon/lang/uk-UA.rc diff --git a/reactos/dll/cpl/telephon/resource.h b/dll/cpl/telephon/resource.h similarity index 100% rename from reactos/dll/cpl/telephon/resource.h rename to dll/cpl/telephon/resource.h diff --git a/reactos/dll/cpl/telephon/resources/applet.ico b/dll/cpl/telephon/resources/applet.ico similarity index 100% rename from reactos/dll/cpl/telephon/resources/applet.ico rename to dll/cpl/telephon/resources/applet.ico diff --git a/reactos/dll/cpl/telephon/rsrc.rc b/dll/cpl/telephon/rsrc.rc similarity index 100% rename from reactos/dll/cpl/telephon/rsrc.rc rename to dll/cpl/telephon/rsrc.rc diff --git a/reactos/dll/cpl/telephon/telephon.c b/dll/cpl/telephon/telephon.c similarity index 100% rename from reactos/dll/cpl/telephon/telephon.c rename to dll/cpl/telephon/telephon.c diff --git a/reactos/dll/cpl/telephon/telephon.rbuild b/dll/cpl/telephon/telephon.rbuild similarity index 100% rename from reactos/dll/cpl/telephon/telephon.rbuild rename to dll/cpl/telephon/telephon.rbuild diff --git a/reactos/dll/cpl/telephon/telephon.rc b/dll/cpl/telephon/telephon.rc similarity index 100% rename from reactos/dll/cpl/telephon/telephon.rc rename to dll/cpl/telephon/telephon.rc diff --git a/reactos/dll/cpl/telephon/telephon.spec b/dll/cpl/telephon/telephon.spec similarity index 100% rename from reactos/dll/cpl/telephon/telephon.spec rename to dll/cpl/telephon/telephon.spec diff --git a/reactos/dll/cpl/timedate/CMakeLists.txt b/dll/cpl/timedate/CMakeLists.txt similarity index 100% rename from reactos/dll/cpl/timedate/CMakeLists.txt rename to dll/cpl/timedate/CMakeLists.txt diff --git a/reactos/dll/cpl/timedate/clock.c b/dll/cpl/timedate/clock.c similarity index 100% rename from reactos/dll/cpl/timedate/clock.c rename to dll/cpl/timedate/clock.c diff --git a/reactos/dll/cpl/timedate/dateandtime.c b/dll/cpl/timedate/dateandtime.c similarity index 100% rename from reactos/dll/cpl/timedate/dateandtime.c rename to dll/cpl/timedate/dateandtime.c diff --git a/reactos/dll/cpl/timedate/internettime.c b/dll/cpl/timedate/internettime.c similarity index 100% rename from reactos/dll/cpl/timedate/internettime.c rename to dll/cpl/timedate/internettime.c diff --git a/reactos/dll/cpl/timedate/lang/bg-BG.rc b/dll/cpl/timedate/lang/bg-BG.rc similarity index 100% rename from reactos/dll/cpl/timedate/lang/bg-BG.rc rename to dll/cpl/timedate/lang/bg-BG.rc diff --git a/reactos/dll/cpl/timedate/lang/cs-CZ.rc b/dll/cpl/timedate/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/cpl/timedate/lang/cs-CZ.rc rename to dll/cpl/timedate/lang/cs-CZ.rc diff --git a/reactos/dll/cpl/timedate/lang/da-DK.rc b/dll/cpl/timedate/lang/da-DK.rc similarity index 100% rename from reactos/dll/cpl/timedate/lang/da-DK.rc rename to dll/cpl/timedate/lang/da-DK.rc diff --git a/reactos/dll/cpl/timedate/lang/de-DE.rc b/dll/cpl/timedate/lang/de-DE.rc similarity index 100% rename from reactos/dll/cpl/timedate/lang/de-DE.rc rename to dll/cpl/timedate/lang/de-DE.rc diff --git a/reactos/dll/cpl/timedate/lang/el-GR.rc b/dll/cpl/timedate/lang/el-GR.rc similarity index 100% rename from reactos/dll/cpl/timedate/lang/el-GR.rc rename to dll/cpl/timedate/lang/el-GR.rc diff --git a/reactos/dll/cpl/timedate/lang/en-US.rc b/dll/cpl/timedate/lang/en-US.rc similarity index 100% rename from reactos/dll/cpl/timedate/lang/en-US.rc rename to dll/cpl/timedate/lang/en-US.rc diff --git a/reactos/dll/cpl/timedate/lang/es-ES.rc b/dll/cpl/timedate/lang/es-ES.rc similarity index 100% rename from reactos/dll/cpl/timedate/lang/es-ES.rc rename to dll/cpl/timedate/lang/es-ES.rc diff --git a/reactos/dll/cpl/timedate/lang/eu-ES.rc b/dll/cpl/timedate/lang/eu-ES.rc similarity index 100% rename from reactos/dll/cpl/timedate/lang/eu-ES.rc rename to dll/cpl/timedate/lang/eu-ES.rc diff --git a/reactos/dll/cpl/timedate/lang/fr-FR.rc b/dll/cpl/timedate/lang/fr-FR.rc similarity index 100% rename from reactos/dll/cpl/timedate/lang/fr-FR.rc rename to dll/cpl/timedate/lang/fr-FR.rc diff --git a/reactos/dll/cpl/timedate/lang/hu-HU.rc b/dll/cpl/timedate/lang/hu-HU.rc similarity index 100% rename from reactos/dll/cpl/timedate/lang/hu-HU.rc rename to dll/cpl/timedate/lang/hu-HU.rc diff --git a/reactos/dll/cpl/timedate/lang/id-ID.rc b/dll/cpl/timedate/lang/id-ID.rc similarity index 100% rename from reactos/dll/cpl/timedate/lang/id-ID.rc rename to dll/cpl/timedate/lang/id-ID.rc diff --git a/reactos/dll/cpl/timedate/lang/it-IT.rc b/dll/cpl/timedate/lang/it-IT.rc similarity index 100% rename from reactos/dll/cpl/timedate/lang/it-IT.rc rename to dll/cpl/timedate/lang/it-IT.rc diff --git a/reactos/dll/cpl/timedate/lang/ja-JP.rc b/dll/cpl/timedate/lang/ja-JP.rc similarity index 100% rename from reactos/dll/cpl/timedate/lang/ja-JP.rc rename to dll/cpl/timedate/lang/ja-JP.rc diff --git a/reactos/dll/cpl/timedate/lang/nl-NL.rc b/dll/cpl/timedate/lang/nl-NL.rc similarity index 100% rename from reactos/dll/cpl/timedate/lang/nl-NL.rc rename to dll/cpl/timedate/lang/nl-NL.rc diff --git a/reactos/dll/cpl/timedate/lang/no-NO.rc b/dll/cpl/timedate/lang/no-NO.rc similarity index 100% rename from reactos/dll/cpl/timedate/lang/no-NO.rc rename to dll/cpl/timedate/lang/no-NO.rc diff --git a/reactos/dll/cpl/timedate/lang/pl-PL.rc b/dll/cpl/timedate/lang/pl-PL.rc similarity index 100% rename from reactos/dll/cpl/timedate/lang/pl-PL.rc rename to dll/cpl/timedate/lang/pl-PL.rc diff --git a/reactos/dll/cpl/timedate/lang/ro-RO.rc b/dll/cpl/timedate/lang/ro-RO.rc similarity index 100% rename from reactos/dll/cpl/timedate/lang/ro-RO.rc rename to dll/cpl/timedate/lang/ro-RO.rc diff --git a/reactos/dll/cpl/timedate/lang/ru-RU.rc b/dll/cpl/timedate/lang/ru-RU.rc similarity index 100% rename from reactos/dll/cpl/timedate/lang/ru-RU.rc rename to dll/cpl/timedate/lang/ru-RU.rc diff --git a/reactos/dll/cpl/timedate/lang/sk-SK.rc b/dll/cpl/timedate/lang/sk-SK.rc similarity index 100% rename from reactos/dll/cpl/timedate/lang/sk-SK.rc rename to dll/cpl/timedate/lang/sk-SK.rc diff --git a/reactos/dll/cpl/timedate/lang/sv-SE.rc b/dll/cpl/timedate/lang/sv-SE.rc similarity index 100% rename from reactos/dll/cpl/timedate/lang/sv-SE.rc rename to dll/cpl/timedate/lang/sv-SE.rc diff --git a/reactos/dll/cpl/timedate/lang/th-TH.rc b/dll/cpl/timedate/lang/th-TH.rc similarity index 100% rename from reactos/dll/cpl/timedate/lang/th-TH.rc rename to dll/cpl/timedate/lang/th-TH.rc diff --git a/reactos/dll/cpl/timedate/lang/uk-UA.rc b/dll/cpl/timedate/lang/uk-UA.rc similarity index 100% rename from reactos/dll/cpl/timedate/lang/uk-UA.rc rename to dll/cpl/timedate/lang/uk-UA.rc diff --git a/reactos/dll/cpl/timedate/monthcal.c b/dll/cpl/timedate/monthcal.c similarity index 100% rename from reactos/dll/cpl/timedate/monthcal.c rename to dll/cpl/timedate/monthcal.c diff --git a/reactos/dll/cpl/timedate/ntpclient.c b/dll/cpl/timedate/ntpclient.c similarity index 100% rename from reactos/dll/cpl/timedate/ntpclient.c rename to dll/cpl/timedate/ntpclient.c diff --git a/reactos/dll/cpl/timedate/resource.h b/dll/cpl/timedate/resource.h similarity index 100% rename from reactos/dll/cpl/timedate/resource.h rename to dll/cpl/timedate/resource.h diff --git a/reactos/dll/cpl/timedate/resources/applet.ico b/dll/cpl/timedate/resources/applet.ico similarity index 100% rename from reactos/dll/cpl/timedate/resources/applet.ico rename to dll/cpl/timedate/resources/applet.ico diff --git a/reactos/dll/cpl/timedate/resources/world.bmp b/dll/cpl/timedate/resources/world.bmp similarity index 100% rename from reactos/dll/cpl/timedate/resources/world.bmp rename to dll/cpl/timedate/resources/world.bmp diff --git a/reactos/dll/cpl/timedate/rsrc.rc b/dll/cpl/timedate/rsrc.rc similarity index 100% rename from reactos/dll/cpl/timedate/rsrc.rc rename to dll/cpl/timedate/rsrc.rc diff --git a/reactos/dll/cpl/timedate/timedate.c b/dll/cpl/timedate/timedate.c similarity index 100% rename from reactos/dll/cpl/timedate/timedate.c rename to dll/cpl/timedate/timedate.c diff --git a/reactos/dll/cpl/timedate/timedate.h b/dll/cpl/timedate/timedate.h similarity index 100% rename from reactos/dll/cpl/timedate/timedate.h rename to dll/cpl/timedate/timedate.h diff --git a/reactos/dll/cpl/timedate/timedate.rbuild b/dll/cpl/timedate/timedate.rbuild similarity index 100% rename from reactos/dll/cpl/timedate/timedate.rbuild rename to dll/cpl/timedate/timedate.rbuild diff --git a/reactos/dll/cpl/timedate/timedate.rc b/dll/cpl/timedate/timedate.rc similarity index 100% rename from reactos/dll/cpl/timedate/timedate.rc rename to dll/cpl/timedate/timedate.rc diff --git a/reactos/dll/cpl/timedate/timedate.spec b/dll/cpl/timedate/timedate.spec similarity index 100% rename from reactos/dll/cpl/timedate/timedate.spec rename to dll/cpl/timedate/timedate.spec diff --git a/reactos/dll/cpl/timedate/timezone.c b/dll/cpl/timedate/timezone.c similarity index 100% rename from reactos/dll/cpl/timedate/timezone.c rename to dll/cpl/timedate/timezone.c diff --git a/reactos/dll/cpl/usrmgr/CMakeLists.txt b/dll/cpl/usrmgr/CMakeLists.txt similarity index 100% rename from reactos/dll/cpl/usrmgr/CMakeLists.txt rename to dll/cpl/usrmgr/CMakeLists.txt diff --git a/reactos/dll/cpl/usrmgr/extra.c b/dll/cpl/usrmgr/extra.c similarity index 100% rename from reactos/dll/cpl/usrmgr/extra.c rename to dll/cpl/usrmgr/extra.c diff --git a/reactos/dll/cpl/usrmgr/groupprops.c b/dll/cpl/usrmgr/groupprops.c similarity index 100% rename from reactos/dll/cpl/usrmgr/groupprops.c rename to dll/cpl/usrmgr/groupprops.c diff --git a/reactos/dll/cpl/usrmgr/groups.c b/dll/cpl/usrmgr/groups.c similarity index 100% rename from reactos/dll/cpl/usrmgr/groups.c rename to dll/cpl/usrmgr/groups.c diff --git a/reactos/dll/cpl/usrmgr/lang/de-DE.rc b/dll/cpl/usrmgr/lang/de-DE.rc similarity index 100% rename from reactos/dll/cpl/usrmgr/lang/de-DE.rc rename to dll/cpl/usrmgr/lang/de-DE.rc diff --git a/reactos/dll/cpl/usrmgr/lang/en-US.rc b/dll/cpl/usrmgr/lang/en-US.rc similarity index 100% rename from reactos/dll/cpl/usrmgr/lang/en-US.rc rename to dll/cpl/usrmgr/lang/en-US.rc diff --git a/reactos/dll/cpl/usrmgr/lang/es-ES.rc b/dll/cpl/usrmgr/lang/es-ES.rc similarity index 100% rename from reactos/dll/cpl/usrmgr/lang/es-ES.rc rename to dll/cpl/usrmgr/lang/es-ES.rc diff --git a/reactos/dll/cpl/usrmgr/lang/fr-FR.rc b/dll/cpl/usrmgr/lang/fr-FR.rc similarity index 100% rename from reactos/dll/cpl/usrmgr/lang/fr-FR.rc rename to dll/cpl/usrmgr/lang/fr-FR.rc diff --git a/reactos/dll/cpl/usrmgr/lang/pl-PL.rc b/dll/cpl/usrmgr/lang/pl-PL.rc similarity index 100% rename from reactos/dll/cpl/usrmgr/lang/pl-PL.rc rename to dll/cpl/usrmgr/lang/pl-PL.rc diff --git a/reactos/dll/cpl/usrmgr/lang/ru-RU.rc b/dll/cpl/usrmgr/lang/ru-RU.rc similarity index 100% rename from reactos/dll/cpl/usrmgr/lang/ru-RU.rc rename to dll/cpl/usrmgr/lang/ru-RU.rc diff --git a/reactos/dll/cpl/usrmgr/lang/uk-UA.rc b/dll/cpl/usrmgr/lang/uk-UA.rc similarity index 100% rename from reactos/dll/cpl/usrmgr/lang/uk-UA.rc rename to dll/cpl/usrmgr/lang/uk-UA.rc diff --git a/reactos/dll/cpl/usrmgr/misc.c b/dll/cpl/usrmgr/misc.c similarity index 100% rename from reactos/dll/cpl/usrmgr/misc.c rename to dll/cpl/usrmgr/misc.c diff --git a/reactos/dll/cpl/usrmgr/resource.h b/dll/cpl/usrmgr/resource.h similarity index 100% rename from reactos/dll/cpl/usrmgr/resource.h rename to dll/cpl/usrmgr/resource.h diff --git a/reactos/dll/cpl/usrmgr/resources/applet.ico b/dll/cpl/usrmgr/resources/applet.ico similarity index 100% rename from reactos/dll/cpl/usrmgr/resources/applet.ico rename to dll/cpl/usrmgr/resources/applet.ico diff --git a/reactos/dll/cpl/usrmgr/resources/group.ico b/dll/cpl/usrmgr/resources/group.ico similarity index 100% rename from reactos/dll/cpl/usrmgr/resources/group.ico rename to dll/cpl/usrmgr/resources/group.ico diff --git a/reactos/dll/cpl/usrmgr/resources/locked.ico b/dll/cpl/usrmgr/resources/locked.ico similarity index 100% rename from reactos/dll/cpl/usrmgr/resources/locked.ico rename to dll/cpl/usrmgr/resources/locked.ico diff --git a/reactos/dll/cpl/usrmgr/resources/user.ico b/dll/cpl/usrmgr/resources/user.ico similarity index 100% rename from reactos/dll/cpl/usrmgr/resources/user.ico rename to dll/cpl/usrmgr/resources/user.ico diff --git a/reactos/dll/cpl/usrmgr/rsrc.rc b/dll/cpl/usrmgr/rsrc.rc similarity index 100% rename from reactos/dll/cpl/usrmgr/rsrc.rc rename to dll/cpl/usrmgr/rsrc.rc diff --git a/reactos/dll/cpl/usrmgr/userprops.c b/dll/cpl/usrmgr/userprops.c similarity index 100% rename from reactos/dll/cpl/usrmgr/userprops.c rename to dll/cpl/usrmgr/userprops.c diff --git a/reactos/dll/cpl/usrmgr/users.c b/dll/cpl/usrmgr/users.c similarity index 100% rename from reactos/dll/cpl/usrmgr/users.c rename to dll/cpl/usrmgr/users.c diff --git a/reactos/dll/cpl/usrmgr/usrmgr.c b/dll/cpl/usrmgr/usrmgr.c similarity index 100% rename from reactos/dll/cpl/usrmgr/usrmgr.c rename to dll/cpl/usrmgr/usrmgr.c diff --git a/reactos/dll/cpl/usrmgr/usrmgr.h b/dll/cpl/usrmgr/usrmgr.h similarity index 100% rename from reactos/dll/cpl/usrmgr/usrmgr.h rename to dll/cpl/usrmgr/usrmgr.h diff --git a/reactos/dll/cpl/usrmgr/usrmgr.rbuild b/dll/cpl/usrmgr/usrmgr.rbuild similarity index 100% rename from reactos/dll/cpl/usrmgr/usrmgr.rbuild rename to dll/cpl/usrmgr/usrmgr.rbuild diff --git a/reactos/dll/cpl/usrmgr/usrmgr.rc b/dll/cpl/usrmgr/usrmgr.rc similarity index 100% rename from reactos/dll/cpl/usrmgr/usrmgr.rc rename to dll/cpl/usrmgr/usrmgr.rc diff --git a/reactos/dll/cpl/usrmgr/usrmgr.spec b/dll/cpl/usrmgr/usrmgr.spec similarity index 100% rename from reactos/dll/cpl/usrmgr/usrmgr.spec rename to dll/cpl/usrmgr/usrmgr.spec diff --git a/reactos/dll/directx/CMakeLists.txt b/dll/directx/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/CMakeLists.txt rename to dll/directx/CMakeLists.txt diff --git a/reactos/dll/directx/amstream/CMakeLists.txt b/dll/directx/amstream/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/amstream/CMakeLists.txt rename to dll/directx/amstream/CMakeLists.txt diff --git a/reactos/dll/directx/amstream/amstream.c b/dll/directx/amstream/amstream.c similarity index 100% rename from reactos/dll/directx/amstream/amstream.c rename to dll/directx/amstream/amstream.c diff --git a/reactos/dll/directx/amstream/amstream.rbuild b/dll/directx/amstream/amstream.rbuild similarity index 100% rename from reactos/dll/directx/amstream/amstream.rbuild rename to dll/directx/amstream/amstream.rbuild diff --git a/reactos/dll/directx/amstream/amstream.spec b/dll/directx/amstream/amstream.spec similarity index 100% rename from reactos/dll/directx/amstream/amstream.spec rename to dll/directx/amstream/amstream.spec diff --git a/reactos/dll/directx/amstream/amstream_i.c b/dll/directx/amstream/amstream_i.c similarity index 100% rename from reactos/dll/directx/amstream/amstream_i.c rename to dll/directx/amstream/amstream_i.c diff --git a/reactos/dll/directx/amstream/amstream_private.h b/dll/directx/amstream/amstream_private.h similarity index 100% rename from reactos/dll/directx/amstream/amstream_private.h rename to dll/directx/amstream/amstream_private.h diff --git a/reactos/dll/directx/amstream/main.c b/dll/directx/amstream/main.c similarity index 100% rename from reactos/dll/directx/amstream/main.c rename to dll/directx/amstream/main.c diff --git a/reactos/dll/directx/amstream/mediastream.c b/dll/directx/amstream/mediastream.c similarity index 100% rename from reactos/dll/directx/amstream/mediastream.c rename to dll/directx/amstream/mediastream.c diff --git a/reactos/dll/directx/amstream/mediastreamfilter.c b/dll/directx/amstream/mediastreamfilter.c similarity index 100% rename from reactos/dll/directx/amstream/mediastreamfilter.c rename to dll/directx/amstream/mediastreamfilter.c diff --git a/reactos/dll/directx/amstream/regsvr.c b/dll/directx/amstream/regsvr.c similarity index 100% rename from reactos/dll/directx/amstream/regsvr.c rename to dll/directx/amstream/regsvr.c diff --git a/reactos/dll/directx/amstream/version.rc b/dll/directx/amstream/version.rc similarity index 100% rename from reactos/dll/directx/amstream/version.rc rename to dll/directx/amstream/version.rc diff --git a/reactos/dll/directx/bdaplgin/bdaplgin.cpp b/dll/directx/bdaplgin/bdaplgin.cpp similarity index 100% rename from reactos/dll/directx/bdaplgin/bdaplgin.cpp rename to dll/directx/bdaplgin/bdaplgin.cpp diff --git a/reactos/dll/directx/bdaplgin/bdaplgin.rbuild b/dll/directx/bdaplgin/bdaplgin.rbuild similarity index 100% rename from reactos/dll/directx/bdaplgin/bdaplgin.rbuild rename to dll/directx/bdaplgin/bdaplgin.rbuild diff --git a/reactos/dll/directx/bdaplgin/bdaplgin.rc b/dll/directx/bdaplgin/bdaplgin.rc similarity index 100% rename from reactos/dll/directx/bdaplgin/bdaplgin.rc rename to dll/directx/bdaplgin/bdaplgin.rc diff --git a/reactos/dll/directx/bdaplgin/bdaplgin.spec b/dll/directx/bdaplgin/bdaplgin.spec similarity index 100% rename from reactos/dll/directx/bdaplgin/bdaplgin.spec rename to dll/directx/bdaplgin/bdaplgin.spec diff --git a/reactos/dll/directx/bdaplgin/classfactory.cpp b/dll/directx/bdaplgin/classfactory.cpp similarity index 100% rename from reactos/dll/directx/bdaplgin/classfactory.cpp rename to dll/directx/bdaplgin/classfactory.cpp diff --git a/reactos/dll/directx/bdaplgin/controlnode.cpp b/dll/directx/bdaplgin/controlnode.cpp similarity index 100% rename from reactos/dll/directx/bdaplgin/controlnode.cpp rename to dll/directx/bdaplgin/controlnode.cpp diff --git a/reactos/dll/directx/bdaplgin/devicecontrol.cpp b/dll/directx/bdaplgin/devicecontrol.cpp similarity index 100% rename from reactos/dll/directx/bdaplgin/devicecontrol.cpp rename to dll/directx/bdaplgin/devicecontrol.cpp diff --git a/reactos/dll/directx/bdaplgin/digitaldemo.cpp b/dll/directx/bdaplgin/digitaldemo.cpp similarity index 100% rename from reactos/dll/directx/bdaplgin/digitaldemo.cpp rename to dll/directx/bdaplgin/digitaldemo.cpp diff --git a/reactos/dll/directx/bdaplgin/frequencyfilter.cpp b/dll/directx/bdaplgin/frequencyfilter.cpp similarity index 100% rename from reactos/dll/directx/bdaplgin/frequencyfilter.cpp rename to dll/directx/bdaplgin/frequencyfilter.cpp diff --git a/reactos/dll/directx/bdaplgin/lnbinfo.cpp b/dll/directx/bdaplgin/lnbinfo.cpp similarity index 100% rename from reactos/dll/directx/bdaplgin/lnbinfo.cpp rename to dll/directx/bdaplgin/lnbinfo.cpp diff --git a/reactos/dll/directx/bdaplgin/pincontrol.cpp b/dll/directx/bdaplgin/pincontrol.cpp similarity index 100% rename from reactos/dll/directx/bdaplgin/pincontrol.cpp rename to dll/directx/bdaplgin/pincontrol.cpp diff --git a/reactos/dll/directx/bdaplgin/precomp.h b/dll/directx/bdaplgin/precomp.h similarity index 100% rename from reactos/dll/directx/bdaplgin/precomp.h rename to dll/directx/bdaplgin/precomp.h diff --git a/reactos/dll/directx/bdaplgin/signalstatistics.cpp b/dll/directx/bdaplgin/signalstatistics.cpp similarity index 100% rename from reactos/dll/directx/bdaplgin/signalstatistics.cpp rename to dll/directx/bdaplgin/signalstatistics.cpp diff --git a/reactos/dll/directx/d3d8/d3d8.c b/dll/directx/d3d8/d3d8.c similarity index 100% rename from reactos/dll/directx/d3d8/d3d8.c rename to dll/directx/d3d8/d3d8.c diff --git a/reactos/dll/directx/d3d8/d3d8.h b/dll/directx/d3d8/d3d8.h similarity index 100% rename from reactos/dll/directx/d3d8/d3d8.h rename to dll/directx/d3d8/d3d8.h diff --git a/reactos/dll/directx/d3d8/d3d8.rbuild b/dll/directx/d3d8/d3d8.rbuild similarity index 100% rename from reactos/dll/directx/d3d8/d3d8.rbuild rename to dll/directx/d3d8/d3d8.rbuild diff --git a/reactos/dll/directx/d3d8/d3d8.rc b/dll/directx/d3d8/d3d8.rc similarity index 100% rename from reactos/dll/directx/d3d8/d3d8.rc rename to dll/directx/d3d8/d3d8.rc diff --git a/reactos/dll/directx/d3d8/d3d8.spec b/dll/directx/d3d8/d3d8.spec similarity index 100% rename from reactos/dll/directx/d3d8/d3d8.spec rename to dll/directx/d3d8/d3d8.spec diff --git a/reactos/dll/directx/d3d8thk/CMakeLists.txt b/dll/directx/d3d8thk/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/d3d8thk/CMakeLists.txt rename to dll/directx/d3d8thk/CMakeLists.txt diff --git a/reactos/dll/directx/d3d8thk/d3d8thk.rbuild b/dll/directx/d3d8thk/d3d8thk.rbuild similarity index 100% rename from reactos/dll/directx/d3d8thk/d3d8thk.rbuild rename to dll/directx/d3d8thk/d3d8thk.rbuild diff --git a/reactos/dll/directx/d3d8thk/d3d8thk.rc b/dll/directx/d3d8thk/d3d8thk.rc similarity index 100% rename from reactos/dll/directx/d3d8thk/d3d8thk.rc rename to dll/directx/d3d8thk/d3d8thk.rc diff --git a/reactos/dll/directx/d3d8thk/d3d8thk.spec b/dll/directx/d3d8thk/d3d8thk.spec similarity index 100% rename from reactos/dll/directx/d3d8thk/d3d8thk.spec rename to dll/directx/d3d8thk/d3d8thk.spec diff --git a/reactos/dll/directx/d3d9/adapter.c b/dll/directx/d3d9/adapter.c similarity index 100% rename from reactos/dll/directx/d3d9/adapter.c rename to dll/directx/d3d9/adapter.c diff --git a/reactos/dll/directx/d3d9/adapter.h b/dll/directx/d3d9/adapter.h similarity index 100% rename from reactos/dll/directx/d3d9/adapter.h rename to dll/directx/d3d9/adapter.h diff --git a/reactos/dll/directx/d3d9/d3d9.c b/dll/directx/d3d9/d3d9.c similarity index 100% rename from reactos/dll/directx/d3d9/d3d9.c rename to dll/directx/d3d9/d3d9.c diff --git a/reactos/dll/directx/d3d9/d3d9.rbuild b/dll/directx/d3d9/d3d9.rbuild similarity index 100% rename from reactos/dll/directx/d3d9/d3d9.rbuild rename to dll/directx/d3d9/d3d9.rbuild diff --git a/reactos/dll/directx/d3d9/d3d9.rc b/dll/directx/d3d9/d3d9.rc similarity index 100% rename from reactos/dll/directx/d3d9/d3d9.rc rename to dll/directx/d3d9/d3d9.rc diff --git a/reactos/dll/directx/d3d9/d3d9.spec b/dll/directx/d3d9/d3d9.spec similarity index 100% rename from reactos/dll/directx/d3d9/d3d9.spec rename to dll/directx/d3d9/d3d9.spec diff --git a/reactos/dll/directx/d3d9/d3d9_baseobject.c b/dll/directx/d3d9/d3d9_baseobject.c similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_baseobject.c rename to dll/directx/d3d9/d3d9_baseobject.c diff --git a/reactos/dll/directx/d3d9/d3d9_baseobject.h b/dll/directx/d3d9/d3d9_baseobject.h similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_baseobject.h rename to dll/directx/d3d9/d3d9_baseobject.h diff --git a/reactos/dll/directx/d3d9/d3d9_basetexture.h b/dll/directx/d3d9/d3d9_basetexture.h similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_basetexture.h rename to dll/directx/d3d9/d3d9_basetexture.h diff --git a/reactos/dll/directx/d3d9/d3d9_callbacks.c b/dll/directx/d3d9/d3d9_callbacks.c similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_callbacks.c rename to dll/directx/d3d9/d3d9_callbacks.c diff --git a/reactos/dll/directx/d3d9/d3d9_callbacks.h b/dll/directx/d3d9/d3d9_callbacks.h similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_callbacks.h rename to dll/directx/d3d9/d3d9_callbacks.h diff --git a/reactos/dll/directx/d3d9/d3d9_caps.c b/dll/directx/d3d9/d3d9_caps.c similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_caps.c rename to dll/directx/d3d9/d3d9_caps.c diff --git a/reactos/dll/directx/d3d9/d3d9_caps.h b/dll/directx/d3d9/d3d9_caps.h similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_caps.h rename to dll/directx/d3d9/d3d9_caps.h diff --git a/reactos/dll/directx/d3d9/d3d9_common.h b/dll/directx/d3d9/d3d9_common.h similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_common.h rename to dll/directx/d3d9/d3d9_common.h diff --git a/reactos/dll/directx/d3d9/d3d9_create.c b/dll/directx/d3d9/d3d9_create.c similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_create.c rename to dll/directx/d3d9/d3d9_create.c diff --git a/reactos/dll/directx/d3d9/d3d9_create.h b/dll/directx/d3d9/d3d9_create.h similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_create.h rename to dll/directx/d3d9/d3d9_create.h diff --git a/reactos/dll/directx/d3d9/d3d9_cursor.c b/dll/directx/d3d9/d3d9_cursor.c similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_cursor.c rename to dll/directx/d3d9/d3d9_cursor.c diff --git a/reactos/dll/directx/d3d9/d3d9_cursor.h b/dll/directx/d3d9/d3d9_cursor.h similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_cursor.h rename to dll/directx/d3d9/d3d9_cursor.h diff --git a/reactos/dll/directx/d3d9/d3d9_device.c b/dll/directx/d3d9/d3d9_device.c similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_device.c rename to dll/directx/d3d9/d3d9_device.c diff --git a/reactos/dll/directx/d3d9/d3d9_device.h b/dll/directx/d3d9/d3d9_device.h similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_device.h rename to dll/directx/d3d9/d3d9_device.h diff --git a/reactos/dll/directx/d3d9/d3d9_haldevice.c b/dll/directx/d3d9/d3d9_haldevice.c similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_haldevice.c rename to dll/directx/d3d9/d3d9_haldevice.c diff --git a/reactos/dll/directx/d3d9/d3d9_haldevice.h b/dll/directx/d3d9/d3d9_haldevice.h similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_haldevice.h rename to dll/directx/d3d9/d3d9_haldevice.h diff --git a/reactos/dll/directx/d3d9/d3d9_helpers.c b/dll/directx/d3d9/d3d9_helpers.c similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_helpers.c rename to dll/directx/d3d9/d3d9_helpers.c diff --git a/reactos/dll/directx/d3d9/d3d9_helpers.h b/dll/directx/d3d9/d3d9_helpers.h similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_helpers.h rename to dll/directx/d3d9/d3d9_helpers.h diff --git a/reactos/dll/directx/d3d9/d3d9_impl.c b/dll/directx/d3d9/d3d9_impl.c similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_impl.c rename to dll/directx/d3d9/d3d9_impl.c diff --git a/reactos/dll/directx/d3d9/d3d9_mipmap.c b/dll/directx/d3d9/d3d9_mipmap.c similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_mipmap.c rename to dll/directx/d3d9/d3d9_mipmap.c diff --git a/reactos/dll/directx/d3d9/d3d9_mipmap.h b/dll/directx/d3d9/d3d9_mipmap.h similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_mipmap.h rename to dll/directx/d3d9/d3d9_mipmap.h diff --git a/reactos/dll/directx/d3d9/d3d9_private.h b/dll/directx/d3d9/d3d9_private.h similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_private.h rename to dll/directx/d3d9/d3d9_private.h diff --git a/reactos/dll/directx/d3d9/d3d9_puredevice.c b/dll/directx/d3d9/d3d9_puredevice.c similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_puredevice.c rename to dll/directx/d3d9/d3d9_puredevice.c diff --git a/reactos/dll/directx/d3d9/d3d9_puredevice.h b/dll/directx/d3d9/d3d9_puredevice.h similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_puredevice.h rename to dll/directx/d3d9/d3d9_puredevice.h diff --git a/reactos/dll/directx/d3d9/d3d9_resource.c b/dll/directx/d3d9/d3d9_resource.c similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_resource.c rename to dll/directx/d3d9/d3d9_resource.c diff --git a/reactos/dll/directx/d3d9/d3d9_resource.h b/dll/directx/d3d9/d3d9_resource.h similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_resource.h rename to dll/directx/d3d9/d3d9_resource.h diff --git a/reactos/dll/directx/d3d9/d3d9_surface.h b/dll/directx/d3d9/d3d9_surface.h similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_surface.h rename to dll/directx/d3d9/d3d9_surface.h diff --git a/reactos/dll/directx/d3d9/d3d9_swapchain.c b/dll/directx/d3d9/d3d9_swapchain.c similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_swapchain.c rename to dll/directx/d3d9/d3d9_swapchain.c diff --git a/reactos/dll/directx/d3d9/d3d9_swapchain.h b/dll/directx/d3d9/d3d9_swapchain.h similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_swapchain.h rename to dll/directx/d3d9/d3d9_swapchain.h diff --git a/reactos/dll/directx/d3d9/d3d9_texture.c b/dll/directx/d3d9/d3d9_texture.c similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_texture.c rename to dll/directx/d3d9/d3d9_texture.c diff --git a/reactos/dll/directx/d3d9/d3d9_texture.h b/dll/directx/d3d9/d3d9_texture.h similarity index 100% rename from reactos/dll/directx/d3d9/d3d9_texture.h rename to dll/directx/d3d9/d3d9_texture.h diff --git a/reactos/dll/directx/d3d9/device.c b/dll/directx/d3d9/device.c similarity index 100% rename from reactos/dll/directx/d3d9/device.c rename to dll/directx/d3d9/device.c diff --git a/reactos/dll/directx/d3d9/device.h b/dll/directx/d3d9/device.h similarity index 100% rename from reactos/dll/directx/d3d9/device.h rename to dll/directx/d3d9/device.h diff --git a/reactos/dll/directx/d3d9/format.c b/dll/directx/d3d9/format.c similarity index 100% rename from reactos/dll/directx/d3d9/format.c rename to dll/directx/d3d9/format.c diff --git a/reactos/dll/directx/d3d9/format.h b/dll/directx/d3d9/format.h similarity index 100% rename from reactos/dll/directx/d3d9/format.h rename to dll/directx/d3d9/format.h diff --git a/reactos/dll/directx/ddraw/Clipper/clipper.h b/dll/directx/ddraw/Clipper/clipper.h similarity index 100% rename from reactos/dll/directx/ddraw/Clipper/clipper.h rename to dll/directx/ddraw/Clipper/clipper.h diff --git a/reactos/dll/directx/ddraw/Clipper/clipper_main.c b/dll/directx/ddraw/Clipper/clipper_main.c similarity index 100% rename from reactos/dll/directx/ddraw/Clipper/clipper_main.c rename to dll/directx/ddraw/Clipper/clipper_main.c diff --git a/reactos/dll/directx/ddraw/Clipper/clipper_stubs.c b/dll/directx/ddraw/Clipper/clipper_stubs.c similarity index 100% rename from reactos/dll/directx/ddraw/Clipper/clipper_stubs.c rename to dll/directx/ddraw/Clipper/clipper_stubs.c diff --git a/reactos/dll/directx/ddraw/Color/color_stubs.c b/dll/directx/ddraw/Color/color_stubs.c similarity index 100% rename from reactos/dll/directx/ddraw/Color/color_stubs.c rename to dll/directx/ddraw/Color/color_stubs.c diff --git a/reactos/dll/directx/ddraw/Ddraw/GetCaps.c b/dll/directx/ddraw/Ddraw/GetCaps.c similarity index 100% rename from reactos/dll/directx/ddraw/Ddraw/GetCaps.c rename to dll/directx/ddraw/Ddraw/GetCaps.c diff --git a/reactos/dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c b/dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c similarity index 100% rename from reactos/dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c rename to dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c diff --git a/reactos/dll/directx/ddraw/Ddraw/callbacks_dd_hel.c b/dll/directx/ddraw/Ddraw/callbacks_dd_hel.c similarity index 100% rename from reactos/dll/directx/ddraw/Ddraw/callbacks_dd_hel.c rename to dll/directx/ddraw/Ddraw/callbacks_dd_hel.c diff --git a/reactos/dll/directx/ddraw/Ddraw/ddraw.h b/dll/directx/ddraw/Ddraw/ddraw.h similarity index 100% rename from reactos/dll/directx/ddraw/Ddraw/ddraw.h rename to dll/directx/ddraw/Ddraw/ddraw.h diff --git a/reactos/dll/directx/ddraw/Ddraw/ddraw_displaymode.c b/dll/directx/ddraw/Ddraw/ddraw_displaymode.c similarity index 100% rename from reactos/dll/directx/ddraw/Ddraw/ddraw_displaymode.c rename to dll/directx/ddraw/Ddraw/ddraw_displaymode.c diff --git a/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c b/dll/directx/ddraw/Ddraw/ddraw_main.c similarity index 100% rename from reactos/dll/directx/ddraw/Ddraw/ddraw_main.c rename to dll/directx/ddraw/Ddraw/ddraw_main.c diff --git a/reactos/dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c b/dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c similarity index 100% rename from reactos/dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c rename to dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c diff --git a/reactos/dll/directx/ddraw/Ddraw/ddraw_stubs.c b/dll/directx/ddraw/Ddraw/ddraw_stubs.c similarity index 100% rename from reactos/dll/directx/ddraw/Ddraw/ddraw_stubs.c rename to dll/directx/ddraw/Ddraw/ddraw_stubs.c diff --git a/reactos/dll/directx/ddraw/Gamma/gamma_stubs.c b/dll/directx/ddraw/Gamma/gamma_stubs.c similarity index 100% rename from reactos/dll/directx/ddraw/Gamma/gamma_stubs.c rename to dll/directx/ddraw/Gamma/gamma_stubs.c diff --git a/reactos/dll/directx/ddraw/Kernel/kernel_stubs.c b/dll/directx/ddraw/Kernel/kernel_stubs.c similarity index 100% rename from reactos/dll/directx/ddraw/Kernel/kernel_stubs.c rename to dll/directx/ddraw/Kernel/kernel_stubs.c diff --git a/reactos/dll/directx/ddraw/Palette/createpalette.c b/dll/directx/ddraw/Palette/createpalette.c similarity index 100% rename from reactos/dll/directx/ddraw/Palette/createpalette.c rename to dll/directx/ddraw/Palette/createpalette.c diff --git a/reactos/dll/directx/ddraw/Palette/palette.c b/dll/directx/ddraw/Palette/palette.c similarity index 100% rename from reactos/dll/directx/ddraw/Palette/palette.c rename to dll/directx/ddraw/Palette/palette.c diff --git a/reactos/dll/directx/ddraw/Palette/palette_stubs.c b/dll/directx/ddraw/Palette/palette_stubs.c similarity index 100% rename from reactos/dll/directx/ddraw/Palette/palette_stubs.c rename to dll/directx/ddraw/Palette/palette_stubs.c diff --git a/reactos/dll/directx/ddraw/Surface/callbacks_surf_hel.c b/dll/directx/ddraw/Surface/callbacks_surf_hel.c similarity index 100% rename from reactos/dll/directx/ddraw/Surface/callbacks_surf_hel.c rename to dll/directx/ddraw/Surface/callbacks_surf_hel.c diff --git a/reactos/dll/directx/ddraw/Surface/createsurface.c b/dll/directx/ddraw/Surface/createsurface.c similarity index 100% rename from reactos/dll/directx/ddraw/Surface/createsurface.c rename to dll/directx/ddraw/Surface/createsurface.c diff --git a/reactos/dll/directx/ddraw/Surface/surface.h b/dll/directx/ddraw/Surface/surface.h similarity index 100% rename from reactos/dll/directx/ddraw/Surface/surface.h rename to dll/directx/ddraw/Surface/surface.h diff --git a/reactos/dll/directx/ddraw/Surface/surface_main.c b/dll/directx/ddraw/Surface/surface_main.c similarity index 100% rename from reactos/dll/directx/ddraw/Surface/surface_main.c rename to dll/directx/ddraw/Surface/surface_main.c diff --git a/reactos/dll/directx/ddraw/Surface/surface_stubs.c b/dll/directx/ddraw/Surface/surface_stubs.c similarity index 100% rename from reactos/dll/directx/ddraw/Surface/surface_stubs.c rename to dll/directx/ddraw/Surface/surface_stubs.c diff --git a/reactos/dll/directx/ddraw/Videoport/videoport_stubs.c b/dll/directx/ddraw/Videoport/videoport_stubs.c similarity index 100% rename from reactos/dll/directx/ddraw/Videoport/videoport_stubs.c rename to dll/directx/ddraw/Videoport/videoport_stubs.c diff --git a/reactos/dll/directx/ddraw/Vtable/DirectD3D2_Vtable.c b/dll/directx/ddraw/Vtable/DirectD3D2_Vtable.c similarity index 100% rename from reactos/dll/directx/ddraw/Vtable/DirectD3D2_Vtable.c rename to dll/directx/ddraw/Vtable/DirectD3D2_Vtable.c diff --git a/reactos/dll/directx/ddraw/Vtable/DirectD3D3_Vtable.c b/dll/directx/ddraw/Vtable/DirectD3D3_Vtable.c similarity index 100% rename from reactos/dll/directx/ddraw/Vtable/DirectD3D3_Vtable.c rename to dll/directx/ddraw/Vtable/DirectD3D3_Vtable.c diff --git a/reactos/dll/directx/ddraw/Vtable/DirectD3D7_Vtable.c b/dll/directx/ddraw/Vtable/DirectD3D7_Vtable.c similarity index 100% rename from reactos/dll/directx/ddraw/Vtable/DirectD3D7_Vtable.c rename to dll/directx/ddraw/Vtable/DirectD3D7_Vtable.c diff --git a/reactos/dll/directx/ddraw/Vtable/DirectD3D_Vtable.c b/dll/directx/ddraw/Vtable/DirectD3D_Vtable.c similarity index 100% rename from reactos/dll/directx/ddraw/Vtable/DirectD3D_Vtable.c rename to dll/directx/ddraw/Vtable/DirectD3D_Vtable.c diff --git a/reactos/dll/directx/ddraw/Vtable/DirectDraw2_Vtable.c b/dll/directx/ddraw/Vtable/DirectDraw2_Vtable.c similarity index 100% rename from reactos/dll/directx/ddraw/Vtable/DirectDraw2_Vtable.c rename to dll/directx/ddraw/Vtable/DirectDraw2_Vtable.c diff --git a/reactos/dll/directx/ddraw/Vtable/DirectDraw4_Vtable.c b/dll/directx/ddraw/Vtable/DirectDraw4_Vtable.c similarity index 100% rename from reactos/dll/directx/ddraw/Vtable/DirectDraw4_Vtable.c rename to dll/directx/ddraw/Vtable/DirectDraw4_Vtable.c diff --git a/reactos/dll/directx/ddraw/Vtable/DirectDraw7_Vtable.c b/dll/directx/ddraw/Vtable/DirectDraw7_Vtable.c similarity index 100% rename from reactos/dll/directx/ddraw/Vtable/DirectDraw7_Vtable.c rename to dll/directx/ddraw/Vtable/DirectDraw7_Vtable.c diff --git a/reactos/dll/directx/ddraw/Vtable/DirectDrawSurface2_Vtable.c b/dll/directx/ddraw/Vtable/DirectDrawSurface2_Vtable.c similarity index 100% rename from reactos/dll/directx/ddraw/Vtable/DirectDrawSurface2_Vtable.c rename to dll/directx/ddraw/Vtable/DirectDrawSurface2_Vtable.c diff --git a/reactos/dll/directx/ddraw/Vtable/DirectDrawSurface3_Vtable.c b/dll/directx/ddraw/Vtable/DirectDrawSurface3_Vtable.c similarity index 100% rename from reactos/dll/directx/ddraw/Vtable/DirectDrawSurface3_Vtable.c rename to dll/directx/ddraw/Vtable/DirectDrawSurface3_Vtable.c diff --git a/reactos/dll/directx/ddraw/Vtable/DirectDrawSurface4_Vtable.c b/dll/directx/ddraw/Vtable/DirectDrawSurface4_Vtable.c similarity index 100% rename from reactos/dll/directx/ddraw/Vtable/DirectDrawSurface4_Vtable.c rename to dll/directx/ddraw/Vtable/DirectDrawSurface4_Vtable.c diff --git a/reactos/dll/directx/ddraw/Vtable/DirectDrawSurface7_Vtable.c b/dll/directx/ddraw/Vtable/DirectDrawSurface7_Vtable.c similarity index 100% rename from reactos/dll/directx/ddraw/Vtable/DirectDrawSurface7_Vtable.c rename to dll/directx/ddraw/Vtable/DirectDrawSurface7_Vtable.c diff --git a/reactos/dll/directx/ddraw/Vtable/DirectDrawSurface_Vtable.c b/dll/directx/ddraw/Vtable/DirectDrawSurface_Vtable.c similarity index 100% rename from reactos/dll/directx/ddraw/Vtable/DirectDrawSurface_Vtable.c rename to dll/directx/ddraw/Vtable/DirectDrawSurface_Vtable.c diff --git a/reactos/dll/directx/ddraw/Vtable/DirectDraw_Vtable.c b/dll/directx/ddraw/Vtable/DirectDraw_Vtable.c similarity index 100% rename from reactos/dll/directx/ddraw/Vtable/DirectDraw_Vtable.c rename to dll/directx/ddraw/Vtable/DirectDraw_Vtable.c diff --git a/reactos/dll/directx/ddraw/cleanup.c b/dll/directx/ddraw/cleanup.c similarity index 100% rename from reactos/dll/directx/ddraw/cleanup.c rename to dll/directx/ddraw/cleanup.c diff --git a/reactos/dll/directx/ddraw/d3d/DirectD3D_main.c b/dll/directx/ddraw/d3d/DirectD3D_main.c similarity index 100% rename from reactos/dll/directx/ddraw/d3d/DirectD3D_main.c rename to dll/directx/ddraw/d3d/DirectD3D_main.c diff --git a/reactos/dll/directx/ddraw/ddraw.rbuild b/dll/directx/ddraw/ddraw.rbuild similarity index 100% rename from reactos/dll/directx/ddraw/ddraw.rbuild rename to dll/directx/ddraw/ddraw.rbuild diff --git a/reactos/dll/directx/ddraw/ddraw.rc b/dll/directx/ddraw/ddraw.rc similarity index 100% rename from reactos/dll/directx/ddraw/ddraw.rc rename to dll/directx/ddraw/ddraw.rc diff --git a/reactos/dll/directx/ddraw/ddraw.spec b/dll/directx/ddraw/ddraw.spec similarity index 100% rename from reactos/dll/directx/ddraw/ddraw.spec rename to dll/directx/ddraw/ddraw.spec diff --git a/reactos/dll/directx/ddraw/ddraw_structures.txt b/dll/directx/ddraw/ddraw_structures.txt similarity index 100% rename from reactos/dll/directx/ddraw/ddraw_structures.txt rename to dll/directx/ddraw/ddraw_structures.txt diff --git a/reactos/dll/directx/ddraw/main.c b/dll/directx/ddraw/main.c similarity index 100% rename from reactos/dll/directx/ddraw/main.c rename to dll/directx/ddraw/main.c diff --git a/reactos/dll/directx/ddraw/resource.h b/dll/directx/ddraw/resource.h similarity index 100% rename from reactos/dll/directx/ddraw/resource.h rename to dll/directx/ddraw/resource.h diff --git a/reactos/dll/directx/ddraw/rosdraw.h b/dll/directx/ddraw/rosdraw.h similarity index 100% rename from reactos/dll/directx/ddraw/rosdraw.h rename to dll/directx/ddraw/rosdraw.h diff --git a/reactos/dll/directx/ddraw/startup.c b/dll/directx/ddraw/startup.c similarity index 100% rename from reactos/dll/directx/ddraw/startup.c rename to dll/directx/ddraw/startup.c diff --git a/reactos/dll/directx/ddraw/thunks/ddraw_thunk.c b/dll/directx/ddraw/thunks/ddraw_thunk.c similarity index 100% rename from reactos/dll/directx/ddraw/thunks/ddraw_thunk.c rename to dll/directx/ddraw/thunks/ddraw_thunk.c diff --git a/reactos/dll/directx/ddraw/thunks/surface_thunk.c b/dll/directx/ddraw/thunks/surface_thunk.c similarity index 100% rename from reactos/dll/directx/ddraw/thunks/surface_thunk.c rename to dll/directx/ddraw/thunks/surface_thunk.c diff --git a/reactos/dll/directx/devenum/CMakeLists.txt b/dll/directx/devenum/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/devenum/CMakeLists.txt rename to dll/directx/devenum/CMakeLists.txt diff --git a/reactos/dll/directx/devenum/Makefile.in b/dll/directx/devenum/Makefile.in similarity index 100% rename from reactos/dll/directx/devenum/Makefile.in rename to dll/directx/devenum/Makefile.in diff --git a/reactos/dll/directx/devenum/createdevenum.c b/dll/directx/devenum/createdevenum.c similarity index 100% rename from reactos/dll/directx/devenum/createdevenum.c rename to dll/directx/devenum/createdevenum.c diff --git a/reactos/dll/directx/devenum/devenum.rbuild b/dll/directx/devenum/devenum.rbuild similarity index 100% rename from reactos/dll/directx/devenum/devenum.rbuild rename to dll/directx/devenum/devenum.rbuild diff --git a/reactos/dll/directx/devenum/devenum.rc b/dll/directx/devenum/devenum.rc similarity index 100% rename from reactos/dll/directx/devenum/devenum.rc rename to dll/directx/devenum/devenum.rc diff --git a/reactos/dll/directx/devenum/devenum.spec b/dll/directx/devenum/devenum.spec similarity index 100% rename from reactos/dll/directx/devenum/devenum.spec rename to dll/directx/devenum/devenum.spec diff --git a/reactos/dll/directx/devenum/devenum_main.c b/dll/directx/devenum/devenum_main.c similarity index 100% rename from reactos/dll/directx/devenum/devenum_main.c rename to dll/directx/devenum/devenum_main.c diff --git a/reactos/dll/directx/devenum/devenum_private.h b/dll/directx/devenum/devenum_private.h similarity index 100% rename from reactos/dll/directx/devenum/devenum_private.h rename to dll/directx/devenum/devenum_private.h diff --git a/reactos/dll/directx/devenum/factory.c b/dll/directx/devenum/factory.c similarity index 100% rename from reactos/dll/directx/devenum/factory.c rename to dll/directx/devenum/factory.c diff --git a/reactos/dll/directx/devenum/mediacatenum.c b/dll/directx/devenum/mediacatenum.c similarity index 100% rename from reactos/dll/directx/devenum/mediacatenum.c rename to dll/directx/devenum/mediacatenum.c diff --git a/reactos/dll/directx/devenum/parsedisplayname.c b/dll/directx/devenum/parsedisplayname.c similarity index 100% rename from reactos/dll/directx/devenum/parsedisplayname.c rename to dll/directx/devenum/parsedisplayname.c diff --git a/reactos/dll/directx/dinput/CMakeLists.txt b/dll/directx/dinput/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/dinput/CMakeLists.txt rename to dll/directx/dinput/CMakeLists.txt diff --git a/reactos/dll/directx/dinput/data_formats.c b/dll/directx/dinput/data_formats.c similarity index 100% rename from reactos/dll/directx/dinput/data_formats.c rename to dll/directx/dinput/data_formats.c diff --git a/reactos/dll/directx/dinput/device.c b/dll/directx/dinput/device.c similarity index 100% rename from reactos/dll/directx/dinput/device.c rename to dll/directx/dinput/device.c diff --git a/reactos/dll/directx/dinput/device_private.h b/dll/directx/dinput/device_private.h similarity index 100% rename from reactos/dll/directx/dinput/device_private.h rename to dll/directx/dinput/device_private.h diff --git a/reactos/dll/directx/dinput/dinput.rbuild b/dll/directx/dinput/dinput.rbuild similarity index 100% rename from reactos/dll/directx/dinput/dinput.rbuild rename to dll/directx/dinput/dinput.rbuild diff --git a/reactos/dll/directx/dinput/dinput.spec b/dll/directx/dinput/dinput.spec similarity index 100% rename from reactos/dll/directx/dinput/dinput.spec rename to dll/directx/dinput/dinput.spec diff --git a/reactos/dll/directx/dinput/dinput_main.c b/dll/directx/dinput/dinput_main.c similarity index 100% rename from reactos/dll/directx/dinput/dinput_main.c rename to dll/directx/dinput/dinput_main.c diff --git a/reactos/dll/directx/dinput/dinput_private.h b/dll/directx/dinput/dinput_private.h similarity index 100% rename from reactos/dll/directx/dinput/dinput_private.h rename to dll/directx/dinput/dinput_private.h diff --git a/reactos/dll/directx/dinput/effect_linuxinput.c b/dll/directx/dinput/effect_linuxinput.c similarity index 100% rename from reactos/dll/directx/dinput/effect_linuxinput.c rename to dll/directx/dinput/effect_linuxinput.c diff --git a/reactos/dll/directx/dinput/joystick_linux.c b/dll/directx/dinput/joystick_linux.c similarity index 100% rename from reactos/dll/directx/dinput/joystick_linux.c rename to dll/directx/dinput/joystick_linux.c diff --git a/reactos/dll/directx/dinput/joystick_linuxinput.c b/dll/directx/dinput/joystick_linuxinput.c similarity index 100% rename from reactos/dll/directx/dinput/joystick_linuxinput.c rename to dll/directx/dinput/joystick_linuxinput.c diff --git a/reactos/dll/directx/dinput/keyboard.c b/dll/directx/dinput/keyboard.c similarity index 100% rename from reactos/dll/directx/dinput/keyboard.c rename to dll/directx/dinput/keyboard.c diff --git a/reactos/dll/directx/dinput/mouse.c b/dll/directx/dinput/mouse.c similarity index 100% rename from reactos/dll/directx/dinput/mouse.c rename to dll/directx/dinput/mouse.c diff --git a/reactos/dll/directx/dinput/regsvr.c b/dll/directx/dinput/regsvr.c similarity index 100% rename from reactos/dll/directx/dinput/regsvr.c rename to dll/directx/dinput/regsvr.c diff --git a/reactos/dll/directx/dinput/version.rc b/dll/directx/dinput/version.rc similarity index 100% rename from reactos/dll/directx/dinput/version.rc rename to dll/directx/dinput/version.rc diff --git a/reactos/dll/directx/dinput8/CMakeLists.txt b/dll/directx/dinput8/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/dinput8/CMakeLists.txt rename to dll/directx/dinput8/CMakeLists.txt diff --git a/reactos/dll/directx/dinput8/dinput8.rbuild b/dll/directx/dinput8/dinput8.rbuild similarity index 100% rename from reactos/dll/directx/dinput8/dinput8.rbuild rename to dll/directx/dinput8/dinput8.rbuild diff --git a/reactos/dll/directx/dinput8/dinput8.spec b/dll/directx/dinput8/dinput8.spec similarity index 100% rename from reactos/dll/directx/dinput8/dinput8.spec rename to dll/directx/dinput8/dinput8.spec diff --git a/reactos/dll/directx/dinput8/dinput8_main.c b/dll/directx/dinput8/dinput8_main.c similarity index 100% rename from reactos/dll/directx/dinput8/dinput8_main.c rename to dll/directx/dinput8/dinput8_main.c diff --git a/reactos/dll/directx/dinput8/regsvr.c b/dll/directx/dinput8/regsvr.c similarity index 100% rename from reactos/dll/directx/dinput8/regsvr.c rename to dll/directx/dinput8/regsvr.c diff --git a/reactos/dll/directx/dinput8/version.rc b/dll/directx/dinput8/version.rc similarity index 100% rename from reactos/dll/directx/dinput8/version.rc rename to dll/directx/dinput8/version.rc diff --git a/reactos/dll/directx/directx.rbuild b/dll/directx/directx.rbuild similarity index 100% rename from reactos/dll/directx/directx.rbuild rename to dll/directx/directx.rbuild diff --git a/reactos/dll/directx/dmusic/CMakeLists.txt b/dll/directx/dmusic/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/dmusic/CMakeLists.txt rename to dll/directx/dmusic/CMakeLists.txt diff --git a/reactos/dll/directx/dmusic/buffer.c b/dll/directx/dmusic/buffer.c similarity index 100% rename from reactos/dll/directx/dmusic/buffer.c rename to dll/directx/dmusic/buffer.c diff --git a/reactos/dll/directx/dmusic/clock.c b/dll/directx/dmusic/clock.c similarity index 100% rename from reactos/dll/directx/dmusic/clock.c rename to dll/directx/dmusic/clock.c diff --git a/reactos/dll/directx/dmusic/collection.c b/dll/directx/dmusic/collection.c similarity index 100% rename from reactos/dll/directx/dmusic/collection.c rename to dll/directx/dmusic/collection.c diff --git a/reactos/dll/directx/dmusic/dmusic.c b/dll/directx/dmusic/dmusic.c similarity index 100% rename from reactos/dll/directx/dmusic/dmusic.c rename to dll/directx/dmusic/dmusic.c diff --git a/reactos/dll/directx/dmusic/dmusic.rbuild b/dll/directx/dmusic/dmusic.rbuild similarity index 100% rename from reactos/dll/directx/dmusic/dmusic.rbuild rename to dll/directx/dmusic/dmusic.rbuild diff --git a/reactos/dll/directx/dmusic/dmusic.spec b/dll/directx/dmusic/dmusic.spec similarity index 100% rename from reactos/dll/directx/dmusic/dmusic.spec rename to dll/directx/dmusic/dmusic.spec diff --git a/reactos/dll/directx/dmusic/dmusic_main.c b/dll/directx/dmusic/dmusic_main.c similarity index 100% rename from reactos/dll/directx/dmusic/dmusic_main.c rename to dll/directx/dmusic/dmusic_main.c diff --git a/reactos/dll/directx/dmusic/dmusic_private.h b/dll/directx/dmusic/dmusic_private.h similarity index 100% rename from reactos/dll/directx/dmusic/dmusic_private.h rename to dll/directx/dmusic/dmusic_private.h diff --git a/reactos/dll/directx/dmusic/download.c b/dll/directx/dmusic/download.c similarity index 100% rename from reactos/dll/directx/dmusic/download.c rename to dll/directx/dmusic/download.c diff --git a/reactos/dll/directx/dmusic/downloadedinstrument.c b/dll/directx/dmusic/downloadedinstrument.c similarity index 100% rename from reactos/dll/directx/dmusic/downloadedinstrument.c rename to dll/directx/dmusic/downloadedinstrument.c diff --git a/reactos/dll/directx/dmusic/instrument.c b/dll/directx/dmusic/instrument.c similarity index 100% rename from reactos/dll/directx/dmusic/instrument.c rename to dll/directx/dmusic/instrument.c diff --git a/reactos/dll/directx/dmusic/port.c b/dll/directx/dmusic/port.c similarity index 100% rename from reactos/dll/directx/dmusic/port.c rename to dll/directx/dmusic/port.c diff --git a/reactos/dll/directx/dmusic/regsvr.c b/dll/directx/dmusic/regsvr.c similarity index 100% rename from reactos/dll/directx/dmusic/regsvr.c rename to dll/directx/dmusic/regsvr.c diff --git a/reactos/dll/directx/dmusic/version.rc b/dll/directx/dmusic/version.rc similarity index 100% rename from reactos/dll/directx/dmusic/version.rc rename to dll/directx/dmusic/version.rc diff --git a/reactos/dll/directx/dplay/CMakeLists.txt b/dll/directx/dplay/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/dplay/CMakeLists.txt rename to dll/directx/dplay/CMakeLists.txt diff --git a/reactos/dll/directx/dplay/dplay.rbuild b/dll/directx/dplay/dplay.rbuild similarity index 100% rename from reactos/dll/directx/dplay/dplay.rbuild rename to dll/directx/dplay/dplay.rbuild diff --git a/reactos/dll/directx/dplay/dplay.spec b/dll/directx/dplay/dplay.spec similarity index 100% rename from reactos/dll/directx/dplay/dplay.spec rename to dll/directx/dplay/dplay.spec diff --git a/reactos/dll/directx/dplay/dplay_main.c b/dll/directx/dplay/dplay_main.c similarity index 100% rename from reactos/dll/directx/dplay/dplay_main.c rename to dll/directx/dplay/dplay_main.c diff --git a/reactos/dll/directx/dplay/version.rc b/dll/directx/dplay/version.rc similarity index 100% rename from reactos/dll/directx/dplay/version.rc rename to dll/directx/dplay/version.rc diff --git a/reactos/dll/directx/dplayx/CMakeLists.txt b/dll/directx/dplayx/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/dplayx/CMakeLists.txt rename to dll/directx/dplayx/CMakeLists.txt diff --git a/reactos/dll/directx/dplayx/dpclassfactory.c b/dll/directx/dplayx/dpclassfactory.c similarity index 100% rename from reactos/dll/directx/dplayx/dpclassfactory.c rename to dll/directx/dplayx/dpclassfactory.c diff --git a/reactos/dll/directx/dplayx/dpinit.h b/dll/directx/dplayx/dpinit.h similarity index 100% rename from reactos/dll/directx/dplayx/dpinit.h rename to dll/directx/dplayx/dpinit.h diff --git a/reactos/dll/directx/dplayx/dplay.c b/dll/directx/dplayx/dplay.c similarity index 100% rename from reactos/dll/directx/dplayx/dplay.c rename to dll/directx/dplayx/dplay.c diff --git a/reactos/dll/directx/dplayx/dplay_global.h b/dll/directx/dplayx/dplay_global.h similarity index 100% rename from reactos/dll/directx/dplayx/dplay_global.h rename to dll/directx/dplayx/dplay_global.h diff --git a/reactos/dll/directx/dplayx/dplaysp.c b/dll/directx/dplayx/dplaysp.c similarity index 100% rename from reactos/dll/directx/dplayx/dplaysp.c rename to dll/directx/dplayx/dplaysp.c diff --git a/reactos/dll/directx/dplayx/dplaysp.h b/dll/directx/dplayx/dplaysp.h similarity index 100% rename from reactos/dll/directx/dplayx/dplaysp.h rename to dll/directx/dplayx/dplaysp.h diff --git a/reactos/dll/directx/dplayx/dplayx.rbuild b/dll/directx/dplayx/dplayx.rbuild similarity index 100% rename from reactos/dll/directx/dplayx/dplayx.rbuild rename to dll/directx/dplayx/dplayx.rbuild diff --git a/reactos/dll/directx/dplayx/dplayx.spec b/dll/directx/dplayx/dplayx.spec similarity index 100% rename from reactos/dll/directx/dplayx/dplayx.spec rename to dll/directx/dplayx/dplayx.spec diff --git a/reactos/dll/directx/dplayx/dplayx_global.c b/dll/directx/dplayx/dplayx_global.c similarity index 100% rename from reactos/dll/directx/dplayx/dplayx_global.c rename to dll/directx/dplayx/dplayx_global.c diff --git a/reactos/dll/directx/dplayx/dplayx_global.h b/dll/directx/dplayx/dplayx_global.h similarity index 100% rename from reactos/dll/directx/dplayx/dplayx_global.h rename to dll/directx/dplayx/dplayx_global.h diff --git a/reactos/dll/directx/dplayx/dplayx_main.c b/dll/directx/dplayx/dplayx_main.c similarity index 100% rename from reactos/dll/directx/dplayx/dplayx_main.c rename to dll/directx/dplayx/dplayx_main.c diff --git a/reactos/dll/directx/dplayx/dplayx_messages.c b/dll/directx/dplayx/dplayx_messages.c similarity index 100% rename from reactos/dll/directx/dplayx/dplayx_messages.c rename to dll/directx/dplayx/dplayx_messages.c diff --git a/reactos/dll/directx/dplayx/dplayx_messages.h b/dll/directx/dplayx/dplayx_messages.h similarity index 100% rename from reactos/dll/directx/dplayx/dplayx_messages.h rename to dll/directx/dplayx/dplayx_messages.h diff --git a/reactos/dll/directx/dplayx/dplayx_queue.h b/dll/directx/dplayx/dplayx_queue.h similarity index 100% rename from reactos/dll/directx/dplayx/dplayx_queue.h rename to dll/directx/dplayx/dplayx_queue.h diff --git a/reactos/dll/directx/dplayx/dplobby.c b/dll/directx/dplayx/dplobby.c similarity index 100% rename from reactos/dll/directx/dplayx/dplobby.c rename to dll/directx/dplayx/dplobby.c diff --git a/reactos/dll/directx/dplayx/lobbysp.c b/dll/directx/dplayx/lobbysp.c similarity index 100% rename from reactos/dll/directx/dplayx/lobbysp.c rename to dll/directx/dplayx/lobbysp.c diff --git a/reactos/dll/directx/dplayx/lobbysp.h b/dll/directx/dplayx/lobbysp.h similarity index 100% rename from reactos/dll/directx/dplayx/lobbysp.h rename to dll/directx/dplayx/lobbysp.h diff --git a/reactos/dll/directx/dplayx/name_server.c b/dll/directx/dplayx/name_server.c similarity index 100% rename from reactos/dll/directx/dplayx/name_server.c rename to dll/directx/dplayx/name_server.c diff --git a/reactos/dll/directx/dplayx/name_server.h b/dll/directx/dplayx/name_server.h similarity index 100% rename from reactos/dll/directx/dplayx/name_server.h rename to dll/directx/dplayx/name_server.h diff --git a/reactos/dll/directx/dplayx/regsvr.c b/dll/directx/dplayx/regsvr.c similarity index 100% rename from reactos/dll/directx/dplayx/regsvr.c rename to dll/directx/dplayx/regsvr.c diff --git a/reactos/dll/directx/dplayx/version.rc b/dll/directx/dplayx/version.rc similarity index 100% rename from reactos/dll/directx/dplayx/version.rc rename to dll/directx/dplayx/version.rc diff --git a/reactos/dll/directx/dsound/CMakeLists.txt b/dll/directx/dsound/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/dsound/CMakeLists.txt rename to dll/directx/dsound/CMakeLists.txt diff --git a/reactos/dll/directx/dsound/buffer.c b/dll/directx/dsound/buffer.c similarity index 100% rename from reactos/dll/directx/dsound/buffer.c rename to dll/directx/dsound/buffer.c diff --git a/reactos/dll/directx/dsound/capture.c b/dll/directx/dsound/capture.c similarity index 100% rename from reactos/dll/directx/dsound/capture.c rename to dll/directx/dsound/capture.c diff --git a/reactos/dll/directx/dsound/dsound.c b/dll/directx/dsound/dsound.c similarity index 100% rename from reactos/dll/directx/dsound/dsound.c rename to dll/directx/dsound/dsound.c diff --git a/reactos/dll/directx/dsound/dsound.rbuild b/dll/directx/dsound/dsound.rbuild similarity index 100% rename from reactos/dll/directx/dsound/dsound.rbuild rename to dll/directx/dsound/dsound.rbuild diff --git a/reactos/dll/directx/dsound/dsound.spec b/dll/directx/dsound/dsound.spec similarity index 100% rename from reactos/dll/directx/dsound/dsound.spec rename to dll/directx/dsound/dsound.spec diff --git a/reactos/dll/directx/dsound/dsound_convert.c b/dll/directx/dsound/dsound_convert.c similarity index 100% rename from reactos/dll/directx/dsound/dsound_convert.c rename to dll/directx/dsound/dsound_convert.c diff --git a/reactos/dll/directx/dsound/dsound_main.c b/dll/directx/dsound/dsound_main.c similarity index 100% rename from reactos/dll/directx/dsound/dsound_main.c rename to dll/directx/dsound/dsound_main.c diff --git a/reactos/dll/directx/dsound/dsound_private.h b/dll/directx/dsound/dsound_private.h similarity index 100% rename from reactos/dll/directx/dsound/dsound_private.h rename to dll/directx/dsound/dsound_private.h diff --git a/reactos/dll/directx/dsound/duplex.c b/dll/directx/dsound/duplex.c similarity index 100% rename from reactos/dll/directx/dsound/duplex.c rename to dll/directx/dsound/duplex.c diff --git a/reactos/dll/directx/dsound/mixer.c b/dll/directx/dsound/mixer.c similarity index 100% rename from reactos/dll/directx/dsound/mixer.c rename to dll/directx/dsound/mixer.c diff --git a/reactos/dll/directx/dsound/primary.c b/dll/directx/dsound/primary.c similarity index 100% rename from reactos/dll/directx/dsound/primary.c rename to dll/directx/dsound/primary.c diff --git a/reactos/dll/directx/dsound/propset.c b/dll/directx/dsound/propset.c similarity index 100% rename from reactos/dll/directx/dsound/propset.c rename to dll/directx/dsound/propset.c diff --git a/reactos/dll/directx/dsound/regsvr.c b/dll/directx/dsound/regsvr.c similarity index 100% rename from reactos/dll/directx/dsound/regsvr.c rename to dll/directx/dsound/regsvr.c diff --git a/reactos/dll/directx/dsound/sound3d.c b/dll/directx/dsound/sound3d.c similarity index 100% rename from reactos/dll/directx/dsound/sound3d.c rename to dll/directx/dsound/sound3d.c diff --git a/reactos/dll/directx/dsound/tests/.cvsignore b/dll/directx/dsound/tests/.cvsignore similarity index 100% rename from reactos/dll/directx/dsound/tests/.cvsignore rename to dll/directx/dsound/tests/.cvsignore diff --git a/reactos/dll/directx/dsound/tests/Makefile.in b/dll/directx/dsound/tests/Makefile.in similarity index 100% rename from reactos/dll/directx/dsound/tests/Makefile.in rename to dll/directx/dsound/tests/Makefile.in diff --git a/reactos/dll/directx/dsound/tests/capture.c b/dll/directx/dsound/tests/capture.c similarity index 100% rename from reactos/dll/directx/dsound/tests/capture.c rename to dll/directx/dsound/tests/capture.c diff --git a/reactos/dll/directx/dsound/tests/ds3d.c b/dll/directx/dsound/tests/ds3d.c similarity index 100% rename from reactos/dll/directx/dsound/tests/ds3d.c rename to dll/directx/dsound/tests/ds3d.c diff --git a/reactos/dll/directx/dsound/tests/ds3d8.c b/dll/directx/dsound/tests/ds3d8.c similarity index 100% rename from reactos/dll/directx/dsound/tests/ds3d8.c rename to dll/directx/dsound/tests/ds3d8.c diff --git a/reactos/dll/directx/dsound/tests/dsound.c b/dll/directx/dsound/tests/dsound.c similarity index 100% rename from reactos/dll/directx/dsound/tests/dsound.c rename to dll/directx/dsound/tests/dsound.c diff --git a/reactos/dll/directx/dsound/tests/dsound8.c b/dll/directx/dsound/tests/dsound8.c similarity index 100% rename from reactos/dll/directx/dsound/tests/dsound8.c rename to dll/directx/dsound/tests/dsound8.c diff --git a/reactos/dll/directx/dsound/tests/dsound_test.h b/dll/directx/dsound/tests/dsound_test.h similarity index 100% rename from reactos/dll/directx/dsound/tests/dsound_test.h rename to dll/directx/dsound/tests/dsound_test.h diff --git a/reactos/dll/directx/dsound/tests/propset.c b/dll/directx/dsound/tests/propset.c similarity index 100% rename from reactos/dll/directx/dsound/tests/propset.c rename to dll/directx/dsound/tests/propset.c diff --git a/reactos/dll/directx/dsound/version.rc b/dll/directx/dsound/version.rc similarity index 100% rename from reactos/dll/directx/dsound/version.rc rename to dll/directx/dsound/version.rc diff --git a/reactos/dll/directx/dsound_new/capture.c b/dll/directx/dsound_new/capture.c similarity index 100% rename from reactos/dll/directx/dsound_new/capture.c rename to dll/directx/dsound_new/capture.c diff --git a/reactos/dll/directx/dsound_new/capturebuffer.c b/dll/directx/dsound_new/capturebuffer.c similarity index 100% rename from reactos/dll/directx/dsound_new/capturebuffer.c rename to dll/directx/dsound_new/capturebuffer.c diff --git a/reactos/dll/directx/dsound_new/classfactory.c b/dll/directx/dsound_new/classfactory.c similarity index 100% rename from reactos/dll/directx/dsound_new/classfactory.c rename to dll/directx/dsound_new/classfactory.c diff --git a/reactos/dll/directx/dsound_new/devicelist.c b/dll/directx/dsound_new/devicelist.c similarity index 100% rename from reactos/dll/directx/dsound_new/devicelist.c rename to dll/directx/dsound_new/devicelist.c diff --git a/reactos/dll/directx/dsound_new/directsound.c b/dll/directx/dsound_new/directsound.c similarity index 100% rename from reactos/dll/directx/dsound_new/directsound.c rename to dll/directx/dsound_new/directsound.c diff --git a/reactos/dll/directx/dsound_new/dsound.c b/dll/directx/dsound_new/dsound.c similarity index 100% rename from reactos/dll/directx/dsound_new/dsound.c rename to dll/directx/dsound_new/dsound.c diff --git a/reactos/dll/directx/dsound_new/dsound.spec b/dll/directx/dsound_new/dsound.spec similarity index 100% rename from reactos/dll/directx/dsound_new/dsound.spec rename to dll/directx/dsound_new/dsound.spec diff --git a/reactos/dll/directx/dsound_new/dsound_convert.c b/dll/directx/dsound_new/dsound_convert.c similarity index 100% rename from reactos/dll/directx/dsound_new/dsound_convert.c rename to dll/directx/dsound_new/dsound_convert.c diff --git a/reactos/dll/directx/dsound_new/dsound_new.rbuild b/dll/directx/dsound_new/dsound_new.rbuild similarity index 100% rename from reactos/dll/directx/dsound_new/dsound_new.rbuild rename to dll/directx/dsound_new/dsound_new.rbuild diff --git a/reactos/dll/directx/dsound_new/enum.c b/dll/directx/dsound_new/enum.c similarity index 100% rename from reactos/dll/directx/dsound_new/enum.c rename to dll/directx/dsound_new/enum.c diff --git a/reactos/dll/directx/dsound_new/misc.c b/dll/directx/dsound_new/misc.c similarity index 100% rename from reactos/dll/directx/dsound_new/misc.c rename to dll/directx/dsound_new/misc.c diff --git a/reactos/dll/directx/dsound_new/notify.c b/dll/directx/dsound_new/notify.c similarity index 100% rename from reactos/dll/directx/dsound_new/notify.c rename to dll/directx/dsound_new/notify.c diff --git a/reactos/dll/directx/dsound_new/precomp.h b/dll/directx/dsound_new/precomp.h similarity index 100% rename from reactos/dll/directx/dsound_new/precomp.h rename to dll/directx/dsound_new/precomp.h diff --git a/reactos/dll/directx/dsound_new/primary.c b/dll/directx/dsound_new/primary.c similarity index 100% rename from reactos/dll/directx/dsound_new/primary.c rename to dll/directx/dsound_new/primary.c diff --git a/reactos/dll/directx/dsound_new/property.c b/dll/directx/dsound_new/property.c similarity index 100% rename from reactos/dll/directx/dsound_new/property.c rename to dll/directx/dsound_new/property.c diff --git a/reactos/dll/directx/dsound_new/regsvr.c b/dll/directx/dsound_new/regsvr.c similarity index 100% rename from reactos/dll/directx/dsound_new/regsvr.c rename to dll/directx/dsound_new/regsvr.c diff --git a/reactos/dll/directx/dsound_new/resource.h b/dll/directx/dsound_new/resource.h similarity index 100% rename from reactos/dll/directx/dsound_new/resource.h rename to dll/directx/dsound_new/resource.h diff --git a/reactos/dll/directx/dsound_new/secondary.c b/dll/directx/dsound_new/secondary.c similarity index 100% rename from reactos/dll/directx/dsound_new/secondary.c rename to dll/directx/dsound_new/secondary.c diff --git a/reactos/dll/directx/dsound_new/stubs.c b/dll/directx/dsound_new/stubs.c similarity index 100% rename from reactos/dll/directx/dsound_new/stubs.c rename to dll/directx/dsound_new/stubs.c diff --git a/reactos/dll/directx/dsound_new/version.rc b/dll/directx/dsound_new/version.rc similarity index 100% rename from reactos/dll/directx/dsound_new/version.rc rename to dll/directx/dsound_new/version.rc diff --git a/reactos/dll/directx/dxdiagn/CMakeLists.txt b/dll/directx/dxdiagn/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/dxdiagn/CMakeLists.txt rename to dll/directx/dxdiagn/CMakeLists.txt diff --git a/reactos/dll/directx/dxdiagn/container.c b/dll/directx/dxdiagn/container.c similarity index 100% rename from reactos/dll/directx/dxdiagn/container.c rename to dll/directx/dxdiagn/container.c diff --git a/reactos/dll/directx/dxdiagn/dxdiag_main.c b/dll/directx/dxdiagn/dxdiag_main.c similarity index 100% rename from reactos/dll/directx/dxdiagn/dxdiag_main.c rename to dll/directx/dxdiagn/dxdiag_main.c diff --git a/reactos/dll/directx/dxdiagn/dxdiag_private.h b/dll/directx/dxdiagn/dxdiag_private.h similarity index 100% rename from reactos/dll/directx/dxdiagn/dxdiag_private.h rename to dll/directx/dxdiagn/dxdiag_private.h diff --git a/reactos/dll/directx/dxdiagn/dxdiagn.rbuild b/dll/directx/dxdiagn/dxdiagn.rbuild similarity index 100% rename from reactos/dll/directx/dxdiagn/dxdiagn.rbuild rename to dll/directx/dxdiagn/dxdiagn.rbuild diff --git a/reactos/dll/directx/dxdiagn/dxdiagn.spec b/dll/directx/dxdiagn/dxdiagn.spec similarity index 100% rename from reactos/dll/directx/dxdiagn/dxdiagn.spec rename to dll/directx/dxdiagn/dxdiagn.spec diff --git a/reactos/dll/directx/dxdiagn/provider.c b/dll/directx/dxdiagn/provider.c similarity index 100% rename from reactos/dll/directx/dxdiagn/provider.c rename to dll/directx/dxdiagn/provider.c diff --git a/reactos/dll/directx/dxdiagn/regsvr.c b/dll/directx/dxdiagn/regsvr.c similarity index 100% rename from reactos/dll/directx/dxdiagn/regsvr.c rename to dll/directx/dxdiagn/regsvr.c diff --git a/reactos/dll/directx/dxdiagn/version.rc b/dll/directx/dxdiagn/version.rc similarity index 100% rename from reactos/dll/directx/dxdiagn/version.rc rename to dll/directx/dxdiagn/version.rc diff --git a/reactos/dll/directx/ksproxy/CMakeLists.txt b/dll/directx/ksproxy/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/ksproxy/CMakeLists.txt rename to dll/directx/ksproxy/CMakeLists.txt diff --git a/reactos/dll/directx/ksproxy/allocator.cpp b/dll/directx/ksproxy/allocator.cpp similarity index 100% rename from reactos/dll/directx/ksproxy/allocator.cpp rename to dll/directx/ksproxy/allocator.cpp diff --git a/reactos/dll/directx/ksproxy/basicaudio.cpp b/dll/directx/ksproxy/basicaudio.cpp similarity index 100% rename from reactos/dll/directx/ksproxy/basicaudio.cpp rename to dll/directx/ksproxy/basicaudio.cpp diff --git a/reactos/dll/directx/ksproxy/classfactory.cpp b/dll/directx/ksproxy/classfactory.cpp similarity index 100% rename from reactos/dll/directx/ksproxy/classfactory.cpp rename to dll/directx/ksproxy/classfactory.cpp diff --git a/reactos/dll/directx/ksproxy/clockforward.cpp b/dll/directx/ksproxy/clockforward.cpp similarity index 100% rename from reactos/dll/directx/ksproxy/clockforward.cpp rename to dll/directx/ksproxy/clockforward.cpp diff --git a/reactos/dll/directx/ksproxy/cvpconfig.cpp b/dll/directx/ksproxy/cvpconfig.cpp similarity index 100% rename from reactos/dll/directx/ksproxy/cvpconfig.cpp rename to dll/directx/ksproxy/cvpconfig.cpp diff --git a/reactos/dll/directx/ksproxy/cvpvbiconfig.cpp b/dll/directx/ksproxy/cvpvbiconfig.cpp similarity index 100% rename from reactos/dll/directx/ksproxy/cvpvbiconfig.cpp rename to dll/directx/ksproxy/cvpvbiconfig.cpp diff --git a/reactos/dll/directx/ksproxy/datatype.cpp b/dll/directx/ksproxy/datatype.cpp similarity index 100% rename from reactos/dll/directx/ksproxy/datatype.cpp rename to dll/directx/ksproxy/datatype.cpp diff --git a/reactos/dll/directx/ksproxy/enum_mediatypes.cpp b/dll/directx/ksproxy/enum_mediatypes.cpp similarity index 100% rename from reactos/dll/directx/ksproxy/enum_mediatypes.cpp rename to dll/directx/ksproxy/enum_mediatypes.cpp diff --git a/reactos/dll/directx/ksproxy/enumpins.cpp b/dll/directx/ksproxy/enumpins.cpp similarity index 100% rename from reactos/dll/directx/ksproxy/enumpins.cpp rename to dll/directx/ksproxy/enumpins.cpp diff --git a/reactos/dll/directx/ksproxy/input_pin.cpp b/dll/directx/ksproxy/input_pin.cpp similarity index 100% rename from reactos/dll/directx/ksproxy/input_pin.cpp rename to dll/directx/ksproxy/input_pin.cpp diff --git a/reactos/dll/directx/ksproxy/interface.cpp b/dll/directx/ksproxy/interface.cpp similarity index 100% rename from reactos/dll/directx/ksproxy/interface.cpp rename to dll/directx/ksproxy/interface.cpp diff --git a/reactos/dll/directx/ksproxy/ksproxy.cpp b/dll/directx/ksproxy/ksproxy.cpp similarity index 100% rename from reactos/dll/directx/ksproxy/ksproxy.cpp rename to dll/directx/ksproxy/ksproxy.cpp diff --git a/reactos/dll/directx/ksproxy/ksproxy.rbuild b/dll/directx/ksproxy/ksproxy.rbuild similarity index 100% rename from reactos/dll/directx/ksproxy/ksproxy.rbuild rename to dll/directx/ksproxy/ksproxy.rbuild diff --git a/reactos/dll/directx/ksproxy/ksproxy.rc b/dll/directx/ksproxy/ksproxy.rc similarity index 100% rename from reactos/dll/directx/ksproxy/ksproxy.rc rename to dll/directx/ksproxy/ksproxy.rc diff --git a/reactos/dll/directx/ksproxy/ksproxy.spec b/dll/directx/ksproxy/ksproxy.spec similarity index 100% rename from reactos/dll/directx/ksproxy/ksproxy.spec rename to dll/directx/ksproxy/ksproxy.spec diff --git a/reactos/dll/directx/ksproxy/mediasample.cpp b/dll/directx/ksproxy/mediasample.cpp similarity index 100% rename from reactos/dll/directx/ksproxy/mediasample.cpp rename to dll/directx/ksproxy/mediasample.cpp diff --git a/reactos/dll/directx/ksproxy/node.cpp b/dll/directx/ksproxy/node.cpp similarity index 100% rename from reactos/dll/directx/ksproxy/node.cpp rename to dll/directx/ksproxy/node.cpp diff --git a/reactos/dll/directx/ksproxy/output_pin.cpp b/dll/directx/ksproxy/output_pin.cpp similarity index 100% rename from reactos/dll/directx/ksproxy/output_pin.cpp rename to dll/directx/ksproxy/output_pin.cpp diff --git a/reactos/dll/directx/ksproxy/precomp.h b/dll/directx/ksproxy/precomp.h similarity index 100% rename from reactos/dll/directx/ksproxy/precomp.h rename to dll/directx/ksproxy/precomp.h diff --git a/reactos/dll/directx/ksproxy/proxy.cpp b/dll/directx/ksproxy/proxy.cpp similarity index 100% rename from reactos/dll/directx/ksproxy/proxy.cpp rename to dll/directx/ksproxy/proxy.cpp diff --git a/reactos/dll/directx/ksproxy/qualityforward.cpp b/dll/directx/ksproxy/qualityforward.cpp similarity index 100% rename from reactos/dll/directx/ksproxy/qualityforward.cpp rename to dll/directx/ksproxy/qualityforward.cpp diff --git a/reactos/dll/directx/ksuser/CMakeLists.txt b/dll/directx/ksuser/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/ksuser/CMakeLists.txt rename to dll/directx/ksuser/CMakeLists.txt diff --git a/reactos/dll/directx/ksuser/ksuser.c b/dll/directx/ksuser/ksuser.c similarity index 100% rename from reactos/dll/directx/ksuser/ksuser.c rename to dll/directx/ksuser/ksuser.c diff --git a/reactos/dll/directx/ksuser/ksuser.h b/dll/directx/ksuser/ksuser.h similarity index 100% rename from reactos/dll/directx/ksuser/ksuser.h rename to dll/directx/ksuser/ksuser.h diff --git a/reactos/dll/directx/ksuser/ksuser.rbuild b/dll/directx/ksuser/ksuser.rbuild similarity index 100% rename from reactos/dll/directx/ksuser/ksuser.rbuild rename to dll/directx/ksuser/ksuser.rbuild diff --git a/reactos/dll/directx/ksuser/ksuser.rc b/dll/directx/ksuser/ksuser.rc similarity index 100% rename from reactos/dll/directx/ksuser/ksuser.rc rename to dll/directx/ksuser/ksuser.rc diff --git a/reactos/dll/directx/ksuser/ksuser.spec b/dll/directx/ksuser/ksuser.spec similarity index 100% rename from reactos/dll/directx/ksuser/ksuser.spec rename to dll/directx/ksuser/ksuser.spec diff --git a/reactos/dll/directx/msdmo/CMakeLists.txt b/dll/directx/msdmo/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/msdmo/CMakeLists.txt rename to dll/directx/msdmo/CMakeLists.txt diff --git a/reactos/dll/directx/msdmo/dmoreg.c b/dll/directx/msdmo/dmoreg.c similarity index 100% rename from reactos/dll/directx/msdmo/dmoreg.c rename to dll/directx/msdmo/dmoreg.c diff --git a/reactos/dll/directx/msdmo/dmort.c b/dll/directx/msdmo/dmort.c similarity index 100% rename from reactos/dll/directx/msdmo/dmort.c rename to dll/directx/msdmo/dmort.c diff --git a/reactos/dll/directx/msdmo/msdmo.rbuild b/dll/directx/msdmo/msdmo.rbuild similarity index 100% rename from reactos/dll/directx/msdmo/msdmo.rbuild rename to dll/directx/msdmo/msdmo.rbuild diff --git a/reactos/dll/directx/msdmo/msdmo.spec b/dll/directx/msdmo/msdmo.spec similarity index 100% rename from reactos/dll/directx/msdmo/msdmo.spec rename to dll/directx/msdmo/msdmo.spec diff --git a/reactos/dll/directx/msdmo/rsrc.rc b/dll/directx/msdmo/rsrc.rc similarity index 100% rename from reactos/dll/directx/msdmo/rsrc.rc rename to dll/directx/msdmo/rsrc.rc diff --git a/reactos/dll/directx/msdmo/stubs.c b/dll/directx/msdmo/stubs.c similarity index 100% rename from reactos/dll/directx/msdmo/stubs.c rename to dll/directx/msdmo/stubs.c diff --git a/reactos/dll/directx/msdvbnp/classfactory.cpp b/dll/directx/msdvbnp/classfactory.cpp similarity index 100% rename from reactos/dll/directx/msdvbnp/classfactory.cpp rename to dll/directx/msdvbnp/classfactory.cpp diff --git a/reactos/dll/directx/msdvbnp/enum_mediatypes.cpp b/dll/directx/msdvbnp/enum_mediatypes.cpp similarity index 100% rename from reactos/dll/directx/msdvbnp/enum_mediatypes.cpp rename to dll/directx/msdvbnp/enum_mediatypes.cpp diff --git a/reactos/dll/directx/msdvbnp/enumpins.cpp b/dll/directx/msdvbnp/enumpins.cpp similarity index 100% rename from reactos/dll/directx/msdvbnp/enumpins.cpp rename to dll/directx/msdvbnp/enumpins.cpp diff --git a/reactos/dll/directx/msdvbnp/ethernetfilter.cpp b/dll/directx/msdvbnp/ethernetfilter.cpp similarity index 100% rename from reactos/dll/directx/msdvbnp/ethernetfilter.cpp rename to dll/directx/msdvbnp/ethernetfilter.cpp diff --git a/reactos/dll/directx/msdvbnp/ipv4.cpp b/dll/directx/msdvbnp/ipv4.cpp similarity index 100% rename from reactos/dll/directx/msdvbnp/ipv4.cpp rename to dll/directx/msdvbnp/ipv4.cpp diff --git a/reactos/dll/directx/msdvbnp/ipv6.cpp b/dll/directx/msdvbnp/ipv6.cpp similarity index 100% rename from reactos/dll/directx/msdvbnp/ipv6.cpp rename to dll/directx/msdvbnp/ipv6.cpp diff --git a/reactos/dll/directx/msdvbnp/msdvbnp.cpp b/dll/directx/msdvbnp/msdvbnp.cpp similarity index 100% rename from reactos/dll/directx/msdvbnp/msdvbnp.cpp rename to dll/directx/msdvbnp/msdvbnp.cpp diff --git a/reactos/dll/directx/msdvbnp/msdvbnp.rbuild b/dll/directx/msdvbnp/msdvbnp.rbuild similarity index 100% rename from reactos/dll/directx/msdvbnp/msdvbnp.rbuild rename to dll/directx/msdvbnp/msdvbnp.rbuild diff --git a/reactos/dll/directx/msdvbnp/msdvbnp.rc b/dll/directx/msdvbnp/msdvbnp.rc similarity index 100% rename from reactos/dll/directx/msdvbnp/msdvbnp.rc rename to dll/directx/msdvbnp/msdvbnp.rc diff --git a/reactos/dll/directx/msdvbnp/msdvbnp.spec b/dll/directx/msdvbnp/msdvbnp.spec similarity index 100% rename from reactos/dll/directx/msdvbnp/msdvbnp.spec rename to dll/directx/msdvbnp/msdvbnp.spec diff --git a/reactos/dll/directx/msdvbnp/networkprovider.cpp b/dll/directx/msdvbnp/networkprovider.cpp similarity index 100% rename from reactos/dll/directx/msdvbnp/networkprovider.cpp rename to dll/directx/msdvbnp/networkprovider.cpp diff --git a/reactos/dll/directx/msdvbnp/pin.cpp b/dll/directx/msdvbnp/pin.cpp similarity index 100% rename from reactos/dll/directx/msdvbnp/pin.cpp rename to dll/directx/msdvbnp/pin.cpp diff --git a/reactos/dll/directx/msdvbnp/precomp.h b/dll/directx/msdvbnp/precomp.h similarity index 100% rename from reactos/dll/directx/msdvbnp/precomp.h rename to dll/directx/msdvbnp/precomp.h diff --git a/reactos/dll/directx/msdvbnp/scanningtuner.cpp b/dll/directx/msdvbnp/scanningtuner.cpp similarity index 100% rename from reactos/dll/directx/msdvbnp/scanningtuner.cpp rename to dll/directx/msdvbnp/scanningtuner.cpp diff --git a/reactos/dll/directx/msvidctl/classfactory.cpp b/dll/directx/msvidctl/classfactory.cpp similarity index 100% rename from reactos/dll/directx/msvidctl/classfactory.cpp rename to dll/directx/msvidctl/classfactory.cpp diff --git a/reactos/dll/directx/msvidctl/enumtuningspaces.cpp b/dll/directx/msvidctl/enumtuningspaces.cpp similarity index 100% rename from reactos/dll/directx/msvidctl/enumtuningspaces.cpp rename to dll/directx/msvidctl/enumtuningspaces.cpp diff --git a/reactos/dll/directx/msvidctl/msvidctl.cpp b/dll/directx/msvidctl/msvidctl.cpp similarity index 100% rename from reactos/dll/directx/msvidctl/msvidctl.cpp rename to dll/directx/msvidctl/msvidctl.cpp diff --git a/reactos/dll/directx/msvidctl/msvidctl.rbuild b/dll/directx/msvidctl/msvidctl.rbuild similarity index 100% rename from reactos/dll/directx/msvidctl/msvidctl.rbuild rename to dll/directx/msvidctl/msvidctl.rbuild diff --git a/reactos/dll/directx/msvidctl/msvidctl.rc b/dll/directx/msvidctl/msvidctl.rc similarity index 100% rename from reactos/dll/directx/msvidctl/msvidctl.rc rename to dll/directx/msvidctl/msvidctl.rc diff --git a/reactos/dll/directx/msvidctl/msvidctl.spec b/dll/directx/msvidctl/msvidctl.spec similarity index 100% rename from reactos/dll/directx/msvidctl/msvidctl.spec rename to dll/directx/msvidctl/msvidctl.spec diff --git a/reactos/dll/directx/msvidctl/precomp.h b/dll/directx/msvidctl/precomp.h similarity index 100% rename from reactos/dll/directx/msvidctl/precomp.h rename to dll/directx/msvidctl/precomp.h diff --git a/reactos/dll/directx/msvidctl/tunerequest.cpp b/dll/directx/msvidctl/tunerequest.cpp similarity index 100% rename from reactos/dll/directx/msvidctl/tunerequest.cpp rename to dll/directx/msvidctl/tunerequest.cpp diff --git a/reactos/dll/directx/msvidctl/tuningspace.cpp b/dll/directx/msvidctl/tuningspace.cpp similarity index 100% rename from reactos/dll/directx/msvidctl/tuningspace.cpp rename to dll/directx/msvidctl/tuningspace.cpp diff --git a/reactos/dll/directx/msvidctl/tuningspace_container.cpp b/dll/directx/msvidctl/tuningspace_container.cpp similarity index 100% rename from reactos/dll/directx/msvidctl/tuningspace_container.cpp rename to dll/directx/msvidctl/tuningspace_container.cpp diff --git a/reactos/dll/directx/qedit/CMakeLists.txt b/dll/directx/qedit/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/qedit/CMakeLists.txt rename to dll/directx/qedit/CMakeLists.txt diff --git a/reactos/dll/directx/qedit/main.c b/dll/directx/qedit/main.c similarity index 100% rename from reactos/dll/directx/qedit/main.c rename to dll/directx/qedit/main.c diff --git a/reactos/dll/directx/qedit/mediadet.c b/dll/directx/qedit/mediadet.c similarity index 100% rename from reactos/dll/directx/qedit/mediadet.c rename to dll/directx/qedit/mediadet.c diff --git a/reactos/dll/directx/qedit/qedit.rbuild b/dll/directx/qedit/qedit.rbuild similarity index 100% rename from reactos/dll/directx/qedit/qedit.rbuild rename to dll/directx/qedit/qedit.rbuild diff --git a/reactos/dll/directx/qedit/qedit.spec b/dll/directx/qedit/qedit.spec similarity index 100% rename from reactos/dll/directx/qedit/qedit.spec rename to dll/directx/qedit/qedit.spec diff --git a/reactos/dll/directx/qedit/qedit_private.h b/dll/directx/qedit/qedit_private.h similarity index 100% rename from reactos/dll/directx/qedit/qedit_private.h rename to dll/directx/qedit/qedit_private.h diff --git a/reactos/dll/directx/qedit/regsvr.c b/dll/directx/qedit/regsvr.c similarity index 100% rename from reactos/dll/directx/qedit/regsvr.c rename to dll/directx/qedit/regsvr.c diff --git a/reactos/dll/directx/qedit/samplegrabber.c b/dll/directx/qedit/samplegrabber.c similarity index 100% rename from reactos/dll/directx/qedit/samplegrabber.c rename to dll/directx/qedit/samplegrabber.c diff --git a/reactos/dll/directx/quartz/CMakeLists.txt b/dll/directx/quartz/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/quartz/CMakeLists.txt rename to dll/directx/quartz/CMakeLists.txt diff --git a/reactos/dll/directx/quartz/acmwrapper.c b/dll/directx/quartz/acmwrapper.c similarity index 100% rename from reactos/dll/directx/quartz/acmwrapper.c rename to dll/directx/quartz/acmwrapper.c diff --git a/reactos/dll/directx/quartz/avidec.c b/dll/directx/quartz/avidec.c similarity index 100% rename from reactos/dll/directx/quartz/avidec.c rename to dll/directx/quartz/avidec.c diff --git a/reactos/dll/directx/quartz/avisplit.c b/dll/directx/quartz/avisplit.c similarity index 100% rename from reactos/dll/directx/quartz/avisplit.c rename to dll/directx/quartz/avisplit.c diff --git a/reactos/dll/directx/quartz/control.c b/dll/directx/quartz/control.c similarity index 100% rename from reactos/dll/directx/quartz/control.c rename to dll/directx/quartz/control.c diff --git a/reactos/dll/directx/quartz/control_private.h b/dll/directx/quartz/control_private.h similarity index 100% rename from reactos/dll/directx/quartz/control_private.h rename to dll/directx/quartz/control_private.h diff --git a/reactos/dll/directx/quartz/dsoundrender.c b/dll/directx/quartz/dsoundrender.c similarity index 100% rename from reactos/dll/directx/quartz/dsoundrender.c rename to dll/directx/quartz/dsoundrender.c diff --git a/reactos/dll/directx/quartz/enumfilters.c b/dll/directx/quartz/enumfilters.c similarity index 100% rename from reactos/dll/directx/quartz/enumfilters.c rename to dll/directx/quartz/enumfilters.c diff --git a/reactos/dll/directx/quartz/enummedia.c b/dll/directx/quartz/enummedia.c similarity index 100% rename from reactos/dll/directx/quartz/enummedia.c rename to dll/directx/quartz/enummedia.c diff --git a/reactos/dll/directx/quartz/enummoniker.c b/dll/directx/quartz/enummoniker.c similarity index 100% rename from reactos/dll/directx/quartz/enummoniker.c rename to dll/directx/quartz/enummoniker.c diff --git a/reactos/dll/directx/quartz/enumpins.c b/dll/directx/quartz/enumpins.c similarity index 100% rename from reactos/dll/directx/quartz/enumpins.c rename to dll/directx/quartz/enumpins.c diff --git a/reactos/dll/directx/quartz/enumregfilters.c b/dll/directx/quartz/enumregfilters.c similarity index 100% rename from reactos/dll/directx/quartz/enumregfilters.c rename to dll/directx/quartz/enumregfilters.c diff --git a/reactos/dll/directx/quartz/filesource.c b/dll/directx/quartz/filesource.c similarity index 100% rename from reactos/dll/directx/quartz/filesource.c rename to dll/directx/quartz/filesource.c diff --git a/reactos/dll/directx/quartz/filtergraph.c b/dll/directx/quartz/filtergraph.c similarity index 100% rename from reactos/dll/directx/quartz/filtergraph.c rename to dll/directx/quartz/filtergraph.c diff --git a/reactos/dll/directx/quartz/filtermapper.c b/dll/directx/quartz/filtermapper.c similarity index 100% rename from reactos/dll/directx/quartz/filtermapper.c rename to dll/directx/quartz/filtermapper.c diff --git a/reactos/dll/directx/quartz/main.c b/dll/directx/quartz/main.c similarity index 100% rename from reactos/dll/directx/quartz/main.c rename to dll/directx/quartz/main.c diff --git a/reactos/dll/directx/quartz/memallocator.c b/dll/directx/quartz/memallocator.c similarity index 100% rename from reactos/dll/directx/quartz/memallocator.c rename to dll/directx/quartz/memallocator.c diff --git a/reactos/dll/directx/quartz/mpegsplit.c b/dll/directx/quartz/mpegsplit.c similarity index 100% rename from reactos/dll/directx/quartz/mpegsplit.c rename to dll/directx/quartz/mpegsplit.c diff --git a/reactos/dll/directx/quartz/nullrenderer.c b/dll/directx/quartz/nullrenderer.c similarity index 100% rename from reactos/dll/directx/quartz/nullrenderer.c rename to dll/directx/quartz/nullrenderer.c diff --git a/reactos/dll/directx/quartz/parser.c b/dll/directx/quartz/parser.c similarity index 100% rename from reactos/dll/directx/quartz/parser.c rename to dll/directx/quartz/parser.c diff --git a/reactos/dll/directx/quartz/parser.h b/dll/directx/quartz/parser.h similarity index 100% rename from reactos/dll/directx/quartz/parser.h rename to dll/directx/quartz/parser.h diff --git a/reactos/dll/directx/quartz/pin.c b/dll/directx/quartz/pin.c similarity index 100% rename from reactos/dll/directx/quartz/pin.c rename to dll/directx/quartz/pin.c diff --git a/reactos/dll/directx/quartz/pin.h b/dll/directx/quartz/pin.h similarity index 100% rename from reactos/dll/directx/quartz/pin.h rename to dll/directx/quartz/pin.h diff --git a/reactos/dll/directx/quartz/quartz.rbuild b/dll/directx/quartz/quartz.rbuild similarity index 100% rename from reactos/dll/directx/quartz/quartz.rbuild rename to dll/directx/quartz/quartz.rbuild diff --git a/reactos/dll/directx/quartz/quartz.spec b/dll/directx/quartz/quartz.spec similarity index 100% rename from reactos/dll/directx/quartz/quartz.spec rename to dll/directx/quartz/quartz.spec diff --git a/reactos/dll/directx/quartz/quartz_private.h b/dll/directx/quartz/quartz_private.h similarity index 100% rename from reactos/dll/directx/quartz/quartz_private.h rename to dll/directx/quartz/quartz_private.h diff --git a/reactos/dll/directx/quartz/quartz_strmif.idl b/dll/directx/quartz/quartz_strmif.idl similarity index 100% rename from reactos/dll/directx/quartz/quartz_strmif.idl rename to dll/directx/quartz/quartz_strmif.idl diff --git a/reactos/dll/directx/quartz/regsvr.c b/dll/directx/quartz/regsvr.c similarity index 100% rename from reactos/dll/directx/quartz/regsvr.c rename to dll/directx/quartz/regsvr.c diff --git a/reactos/dll/directx/quartz/systemclock.c b/dll/directx/quartz/systemclock.c similarity index 100% rename from reactos/dll/directx/quartz/systemclock.c rename to dll/directx/quartz/systemclock.c diff --git a/reactos/dll/directx/quartz/transform.c b/dll/directx/quartz/transform.c similarity index 100% rename from reactos/dll/directx/quartz/transform.c rename to dll/directx/quartz/transform.c diff --git a/reactos/dll/directx/quartz/transform.h b/dll/directx/quartz/transform.h similarity index 100% rename from reactos/dll/directx/quartz/transform.h rename to dll/directx/quartz/transform.h diff --git a/reactos/dll/directx/quartz/version.rc b/dll/directx/quartz/version.rc similarity index 100% rename from reactos/dll/directx/quartz/version.rc rename to dll/directx/quartz/version.rc diff --git a/reactos/dll/directx/quartz/videorenderer.c b/dll/directx/quartz/videorenderer.c similarity index 100% rename from reactos/dll/directx/quartz/videorenderer.c rename to dll/directx/quartz/videorenderer.c diff --git a/reactos/dll/directx/quartz/waveparser.c b/dll/directx/quartz/waveparser.c similarity index 100% rename from reactos/dll/directx/quartz/waveparser.c rename to dll/directx/quartz/waveparser.c diff --git a/reactos/dll/directx/wine/CMakeLists.txt b/dll/directx/wine/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/wine/CMakeLists.txt rename to dll/directx/wine/CMakeLists.txt diff --git a/reactos/dll/directx/wine/d3d8/CMakeLists.txt b/dll/directx/wine/d3d8/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/wine/d3d8/CMakeLists.txt rename to dll/directx/wine/d3d8/CMakeLists.txt diff --git a/reactos/dll/directx/wine/d3d8/buffer.c b/dll/directx/wine/d3d8/buffer.c similarity index 100% rename from reactos/dll/directx/wine/d3d8/buffer.c rename to dll/directx/wine/d3d8/buffer.c diff --git a/reactos/dll/directx/wine/d3d8/cubetexture.c b/dll/directx/wine/d3d8/cubetexture.c similarity index 100% rename from reactos/dll/directx/wine/d3d8/cubetexture.c rename to dll/directx/wine/d3d8/cubetexture.c diff --git a/reactos/dll/directx/wine/d3d8/d3d8.rbuild b/dll/directx/wine/d3d8/d3d8.rbuild similarity index 100% rename from reactos/dll/directx/wine/d3d8/d3d8.rbuild rename to dll/directx/wine/d3d8/d3d8.rbuild diff --git a/reactos/dll/directx/wine/d3d8/d3d8.spec b/dll/directx/wine/d3d8/d3d8.spec similarity index 100% rename from reactos/dll/directx/wine/d3d8/d3d8.spec rename to dll/directx/wine/d3d8/d3d8.spec diff --git a/reactos/dll/directx/wine/d3d8/d3d8_main.c b/dll/directx/wine/d3d8/d3d8_main.c similarity index 100% rename from reactos/dll/directx/wine/d3d8/d3d8_main.c rename to dll/directx/wine/d3d8/d3d8_main.c diff --git a/reactos/dll/directx/wine/d3d8/d3d8_private.h b/dll/directx/wine/d3d8/d3d8_private.h similarity index 100% rename from reactos/dll/directx/wine/d3d8/d3d8_private.h rename to dll/directx/wine/d3d8/d3d8_private.h diff --git a/reactos/dll/directx/wine/d3d8/device.c b/dll/directx/wine/d3d8/device.c similarity index 100% rename from reactos/dll/directx/wine/d3d8/device.c rename to dll/directx/wine/d3d8/device.c diff --git a/reactos/dll/directx/wine/d3d8/directx.c b/dll/directx/wine/d3d8/directx.c similarity index 100% rename from reactos/dll/directx/wine/d3d8/directx.c rename to dll/directx/wine/d3d8/directx.c diff --git a/reactos/dll/directx/wine/d3d8/shader.c b/dll/directx/wine/d3d8/shader.c similarity index 100% rename from reactos/dll/directx/wine/d3d8/shader.c rename to dll/directx/wine/d3d8/shader.c diff --git a/reactos/dll/directx/wine/d3d8/surface.c b/dll/directx/wine/d3d8/surface.c similarity index 100% rename from reactos/dll/directx/wine/d3d8/surface.c rename to dll/directx/wine/d3d8/surface.c diff --git a/reactos/dll/directx/wine/d3d8/swapchain.c b/dll/directx/wine/d3d8/swapchain.c similarity index 100% rename from reactos/dll/directx/wine/d3d8/swapchain.c rename to dll/directx/wine/d3d8/swapchain.c diff --git a/reactos/dll/directx/wine/d3d8/texture.c b/dll/directx/wine/d3d8/texture.c similarity index 100% rename from reactos/dll/directx/wine/d3d8/texture.c rename to dll/directx/wine/d3d8/texture.c diff --git a/reactos/dll/directx/wine/d3d8/version.rc b/dll/directx/wine/d3d8/version.rc similarity index 100% rename from reactos/dll/directx/wine/d3d8/version.rc rename to dll/directx/wine/d3d8/version.rc diff --git a/reactos/dll/directx/wine/d3d8/vertexdeclaration.c b/dll/directx/wine/d3d8/vertexdeclaration.c similarity index 100% rename from reactos/dll/directx/wine/d3d8/vertexdeclaration.c rename to dll/directx/wine/d3d8/vertexdeclaration.c diff --git a/reactos/dll/directx/wine/d3d8/volume.c b/dll/directx/wine/d3d8/volume.c similarity index 100% rename from reactos/dll/directx/wine/d3d8/volume.c rename to dll/directx/wine/d3d8/volume.c diff --git a/reactos/dll/directx/wine/d3d8/volumetexture.c b/dll/directx/wine/d3d8/volumetexture.c similarity index 100% rename from reactos/dll/directx/wine/d3d8/volumetexture.c rename to dll/directx/wine/d3d8/volumetexture.c diff --git a/reactos/dll/directx/wine/d3d9/CMakeLists.txt b/dll/directx/wine/d3d9/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/wine/d3d9/CMakeLists.txt rename to dll/directx/wine/d3d9/CMakeLists.txt diff --git a/reactos/dll/directx/wine/d3d9/buffer.c b/dll/directx/wine/d3d9/buffer.c similarity index 100% rename from reactos/dll/directx/wine/d3d9/buffer.c rename to dll/directx/wine/d3d9/buffer.c diff --git a/reactos/dll/directx/wine/d3d9/cubetexture.c b/dll/directx/wine/d3d9/cubetexture.c similarity index 100% rename from reactos/dll/directx/wine/d3d9/cubetexture.c rename to dll/directx/wine/d3d9/cubetexture.c diff --git a/reactos/dll/directx/wine/d3d9/d3d9.rbuild b/dll/directx/wine/d3d9/d3d9.rbuild similarity index 100% rename from reactos/dll/directx/wine/d3d9/d3d9.rbuild rename to dll/directx/wine/d3d9/d3d9.rbuild diff --git a/reactos/dll/directx/wine/d3d9/d3d9.spec b/dll/directx/wine/d3d9/d3d9.spec similarity index 100% rename from reactos/dll/directx/wine/d3d9/d3d9.spec rename to dll/directx/wine/d3d9/d3d9.spec diff --git a/reactos/dll/directx/wine/d3d9/d3d9_main.c b/dll/directx/wine/d3d9/d3d9_main.c similarity index 100% rename from reactos/dll/directx/wine/d3d9/d3d9_main.c rename to dll/directx/wine/d3d9/d3d9_main.c diff --git a/reactos/dll/directx/wine/d3d9/d3d9_private.h b/dll/directx/wine/d3d9/d3d9_private.h similarity index 100% rename from reactos/dll/directx/wine/d3d9/d3d9_private.h rename to dll/directx/wine/d3d9/d3d9_private.h diff --git a/reactos/dll/directx/wine/d3d9/device.c b/dll/directx/wine/d3d9/device.c similarity index 100% rename from reactos/dll/directx/wine/d3d9/device.c rename to dll/directx/wine/d3d9/device.c diff --git a/reactos/dll/directx/wine/d3d9/directx.c b/dll/directx/wine/d3d9/directx.c similarity index 100% rename from reactos/dll/directx/wine/d3d9/directx.c rename to dll/directx/wine/d3d9/directx.c diff --git a/reactos/dll/directx/wine/d3d9/query.c b/dll/directx/wine/d3d9/query.c similarity index 100% rename from reactos/dll/directx/wine/d3d9/query.c rename to dll/directx/wine/d3d9/query.c diff --git a/reactos/dll/directx/wine/d3d9/shader.c b/dll/directx/wine/d3d9/shader.c similarity index 100% rename from reactos/dll/directx/wine/d3d9/shader.c rename to dll/directx/wine/d3d9/shader.c diff --git a/reactos/dll/directx/wine/d3d9/stateblock.c b/dll/directx/wine/d3d9/stateblock.c similarity index 100% rename from reactos/dll/directx/wine/d3d9/stateblock.c rename to dll/directx/wine/d3d9/stateblock.c diff --git a/reactos/dll/directx/wine/d3d9/surface.c b/dll/directx/wine/d3d9/surface.c similarity index 100% rename from reactos/dll/directx/wine/d3d9/surface.c rename to dll/directx/wine/d3d9/surface.c diff --git a/reactos/dll/directx/wine/d3d9/swapchain.c b/dll/directx/wine/d3d9/swapchain.c similarity index 100% rename from reactos/dll/directx/wine/d3d9/swapchain.c rename to dll/directx/wine/d3d9/swapchain.c diff --git a/reactos/dll/directx/wine/d3d9/texture.c b/dll/directx/wine/d3d9/texture.c similarity index 100% rename from reactos/dll/directx/wine/d3d9/texture.c rename to dll/directx/wine/d3d9/texture.c diff --git a/reactos/dll/directx/wine/d3d9/version.rc b/dll/directx/wine/d3d9/version.rc similarity index 100% rename from reactos/dll/directx/wine/d3d9/version.rc rename to dll/directx/wine/d3d9/version.rc diff --git a/reactos/dll/directx/wine/d3d9/vertexdeclaration.c b/dll/directx/wine/d3d9/vertexdeclaration.c similarity index 100% rename from reactos/dll/directx/wine/d3d9/vertexdeclaration.c rename to dll/directx/wine/d3d9/vertexdeclaration.c diff --git a/reactos/dll/directx/wine/d3d9/volume.c b/dll/directx/wine/d3d9/volume.c similarity index 100% rename from reactos/dll/directx/wine/d3d9/volume.c rename to dll/directx/wine/d3d9/volume.c diff --git a/reactos/dll/directx/wine/d3d9/volumetexture.c b/dll/directx/wine/d3d9/volumetexture.c similarity index 100% rename from reactos/dll/directx/wine/d3d9/volumetexture.c rename to dll/directx/wine/d3d9/volumetexture.c diff --git a/reactos/dll/directx/wine/d3dx9_24/CMakeLists.txt b/dll/directx/wine/d3dx9_24/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/wine/d3dx9_24/CMakeLists.txt rename to dll/directx/wine/d3dx9_24/CMakeLists.txt diff --git a/reactos/dll/directx/wine/d3dx9_24/d3dx9_24.rbuild b/dll/directx/wine/d3dx9_24/d3dx9_24.rbuild similarity index 100% rename from reactos/dll/directx/wine/d3dx9_24/d3dx9_24.rbuild rename to dll/directx/wine/d3dx9_24/d3dx9_24.rbuild diff --git a/reactos/dll/directx/wine/d3dx9_24/d3dx9_24.spec b/dll/directx/wine/d3dx9_24/d3dx9_24.spec similarity index 100% rename from reactos/dll/directx/wine/d3dx9_24/d3dx9_24.spec rename to dll/directx/wine/d3dx9_24/d3dx9_24.spec diff --git a/reactos/dll/directx/wine/d3dx9_24/d3dx9_24_main.c b/dll/directx/wine/d3dx9_24/d3dx9_24_main.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_24/d3dx9_24_main.c rename to dll/directx/wine/d3dx9_24/d3dx9_24_main.c diff --git a/reactos/dll/directx/wine/d3dx9_24/version.rc b/dll/directx/wine/d3dx9_24/version.rc similarity index 100% rename from reactos/dll/directx/wine/d3dx9_24/version.rc rename to dll/directx/wine/d3dx9_24/version.rc diff --git a/reactos/dll/directx/wine/d3dx9_25/CMakeLists.txt b/dll/directx/wine/d3dx9_25/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/wine/d3dx9_25/CMakeLists.txt rename to dll/directx/wine/d3dx9_25/CMakeLists.txt diff --git a/reactos/dll/directx/wine/d3dx9_25/d3dx9_25.rbuild b/dll/directx/wine/d3dx9_25/d3dx9_25.rbuild similarity index 100% rename from reactos/dll/directx/wine/d3dx9_25/d3dx9_25.rbuild rename to dll/directx/wine/d3dx9_25/d3dx9_25.rbuild diff --git a/reactos/dll/directx/wine/d3dx9_25/d3dx9_25.spec b/dll/directx/wine/d3dx9_25/d3dx9_25.spec similarity index 100% rename from reactos/dll/directx/wine/d3dx9_25/d3dx9_25.spec rename to dll/directx/wine/d3dx9_25/d3dx9_25.spec diff --git a/reactos/dll/directx/wine/d3dx9_25/d3dx9_25_main.c b/dll/directx/wine/d3dx9_25/d3dx9_25_main.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_25/d3dx9_25_main.c rename to dll/directx/wine/d3dx9_25/d3dx9_25_main.c diff --git a/reactos/dll/directx/wine/d3dx9_25/version.rc b/dll/directx/wine/d3dx9_25/version.rc similarity index 100% rename from reactos/dll/directx/wine/d3dx9_25/version.rc rename to dll/directx/wine/d3dx9_25/version.rc diff --git a/reactos/dll/directx/wine/d3dx9_26/CMakeLists.txt b/dll/directx/wine/d3dx9_26/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/wine/d3dx9_26/CMakeLists.txt rename to dll/directx/wine/d3dx9_26/CMakeLists.txt diff --git a/reactos/dll/directx/wine/d3dx9_26/d3dx9_26.rbuild b/dll/directx/wine/d3dx9_26/d3dx9_26.rbuild similarity index 100% rename from reactos/dll/directx/wine/d3dx9_26/d3dx9_26.rbuild rename to dll/directx/wine/d3dx9_26/d3dx9_26.rbuild diff --git a/reactos/dll/directx/wine/d3dx9_26/d3dx9_26.spec b/dll/directx/wine/d3dx9_26/d3dx9_26.spec similarity index 100% rename from reactos/dll/directx/wine/d3dx9_26/d3dx9_26.spec rename to dll/directx/wine/d3dx9_26/d3dx9_26.spec diff --git a/reactos/dll/directx/wine/d3dx9_26/d3dx9_26_main.c b/dll/directx/wine/d3dx9_26/d3dx9_26_main.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_26/d3dx9_26_main.c rename to dll/directx/wine/d3dx9_26/d3dx9_26_main.c diff --git a/reactos/dll/directx/wine/d3dx9_26/version.rc b/dll/directx/wine/d3dx9_26/version.rc similarity index 100% rename from reactos/dll/directx/wine/d3dx9_26/version.rc rename to dll/directx/wine/d3dx9_26/version.rc diff --git a/reactos/dll/directx/wine/d3dx9_27/CMakeLists.txt b/dll/directx/wine/d3dx9_27/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/wine/d3dx9_27/CMakeLists.txt rename to dll/directx/wine/d3dx9_27/CMakeLists.txt diff --git a/reactos/dll/directx/wine/d3dx9_27/d3dx9_27.rbuild b/dll/directx/wine/d3dx9_27/d3dx9_27.rbuild similarity index 100% rename from reactos/dll/directx/wine/d3dx9_27/d3dx9_27.rbuild rename to dll/directx/wine/d3dx9_27/d3dx9_27.rbuild diff --git a/reactos/dll/directx/wine/d3dx9_27/d3dx9_27.spec b/dll/directx/wine/d3dx9_27/d3dx9_27.spec similarity index 100% rename from reactos/dll/directx/wine/d3dx9_27/d3dx9_27.spec rename to dll/directx/wine/d3dx9_27/d3dx9_27.spec diff --git a/reactos/dll/directx/wine/d3dx9_27/d3dx9_27_main.c b/dll/directx/wine/d3dx9_27/d3dx9_27_main.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_27/d3dx9_27_main.c rename to dll/directx/wine/d3dx9_27/d3dx9_27_main.c diff --git a/reactos/dll/directx/wine/d3dx9_27/version.rc b/dll/directx/wine/d3dx9_27/version.rc similarity index 100% rename from reactos/dll/directx/wine/d3dx9_27/version.rc rename to dll/directx/wine/d3dx9_27/version.rc diff --git a/reactos/dll/directx/wine/d3dx9_28/CMakeLists.txt b/dll/directx/wine/d3dx9_28/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/wine/d3dx9_28/CMakeLists.txt rename to dll/directx/wine/d3dx9_28/CMakeLists.txt diff --git a/reactos/dll/directx/wine/d3dx9_28/d3dx9_28.rbuild b/dll/directx/wine/d3dx9_28/d3dx9_28.rbuild similarity index 100% rename from reactos/dll/directx/wine/d3dx9_28/d3dx9_28.rbuild rename to dll/directx/wine/d3dx9_28/d3dx9_28.rbuild diff --git a/reactos/dll/directx/wine/d3dx9_28/d3dx9_28.spec b/dll/directx/wine/d3dx9_28/d3dx9_28.spec similarity index 100% rename from reactos/dll/directx/wine/d3dx9_28/d3dx9_28.spec rename to dll/directx/wine/d3dx9_28/d3dx9_28.spec diff --git a/reactos/dll/directx/wine/d3dx9_28/d3dx9_28_main.c b/dll/directx/wine/d3dx9_28/d3dx9_28_main.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_28/d3dx9_28_main.c rename to dll/directx/wine/d3dx9_28/d3dx9_28_main.c diff --git a/reactos/dll/directx/wine/d3dx9_28/version.rc b/dll/directx/wine/d3dx9_28/version.rc similarity index 100% rename from reactos/dll/directx/wine/d3dx9_28/version.rc rename to dll/directx/wine/d3dx9_28/version.rc diff --git a/reactos/dll/directx/wine/d3dx9_29/CMakeLists.txt b/dll/directx/wine/d3dx9_29/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/wine/d3dx9_29/CMakeLists.txt rename to dll/directx/wine/d3dx9_29/CMakeLists.txt diff --git a/reactos/dll/directx/wine/d3dx9_29/d3dx9_29.rbuild b/dll/directx/wine/d3dx9_29/d3dx9_29.rbuild similarity index 100% rename from reactos/dll/directx/wine/d3dx9_29/d3dx9_29.rbuild rename to dll/directx/wine/d3dx9_29/d3dx9_29.rbuild diff --git a/reactos/dll/directx/wine/d3dx9_29/d3dx9_29.spec b/dll/directx/wine/d3dx9_29/d3dx9_29.spec similarity index 100% rename from reactos/dll/directx/wine/d3dx9_29/d3dx9_29.spec rename to dll/directx/wine/d3dx9_29/d3dx9_29.spec diff --git a/reactos/dll/directx/wine/d3dx9_29/d3dx9_29_main.c b/dll/directx/wine/d3dx9_29/d3dx9_29_main.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_29/d3dx9_29_main.c rename to dll/directx/wine/d3dx9_29/d3dx9_29_main.c diff --git a/reactos/dll/directx/wine/d3dx9_29/version.rc b/dll/directx/wine/d3dx9_29/version.rc similarity index 100% rename from reactos/dll/directx/wine/d3dx9_29/version.rc rename to dll/directx/wine/d3dx9_29/version.rc diff --git a/reactos/dll/directx/wine/d3dx9_30/CMakeLists.txt b/dll/directx/wine/d3dx9_30/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/wine/d3dx9_30/CMakeLists.txt rename to dll/directx/wine/d3dx9_30/CMakeLists.txt diff --git a/reactos/dll/directx/wine/d3dx9_30/d3dx9_30.rbuild b/dll/directx/wine/d3dx9_30/d3dx9_30.rbuild similarity index 100% rename from reactos/dll/directx/wine/d3dx9_30/d3dx9_30.rbuild rename to dll/directx/wine/d3dx9_30/d3dx9_30.rbuild diff --git a/reactos/dll/directx/wine/d3dx9_30/d3dx9_30.spec b/dll/directx/wine/d3dx9_30/d3dx9_30.spec similarity index 100% rename from reactos/dll/directx/wine/d3dx9_30/d3dx9_30.spec rename to dll/directx/wine/d3dx9_30/d3dx9_30.spec diff --git a/reactos/dll/directx/wine/d3dx9_30/d3dx9_30_main.c b/dll/directx/wine/d3dx9_30/d3dx9_30_main.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_30/d3dx9_30_main.c rename to dll/directx/wine/d3dx9_30/d3dx9_30_main.c diff --git a/reactos/dll/directx/wine/d3dx9_30/version.rc b/dll/directx/wine/d3dx9_30/version.rc similarity index 100% rename from reactos/dll/directx/wine/d3dx9_30/version.rc rename to dll/directx/wine/d3dx9_30/version.rc diff --git a/reactos/dll/directx/wine/d3dx9_31/CMakeLists.txt b/dll/directx/wine/d3dx9_31/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/wine/d3dx9_31/CMakeLists.txt rename to dll/directx/wine/d3dx9_31/CMakeLists.txt diff --git a/reactos/dll/directx/wine/d3dx9_31/d3dx9_31.rbuild b/dll/directx/wine/d3dx9_31/d3dx9_31.rbuild similarity index 100% rename from reactos/dll/directx/wine/d3dx9_31/d3dx9_31.rbuild rename to dll/directx/wine/d3dx9_31/d3dx9_31.rbuild diff --git a/reactos/dll/directx/wine/d3dx9_31/d3dx9_31.spec b/dll/directx/wine/d3dx9_31/d3dx9_31.spec similarity index 100% rename from reactos/dll/directx/wine/d3dx9_31/d3dx9_31.spec rename to dll/directx/wine/d3dx9_31/d3dx9_31.spec diff --git a/reactos/dll/directx/wine/d3dx9_31/d3dx9_31_main.c b/dll/directx/wine/d3dx9_31/d3dx9_31_main.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_31/d3dx9_31_main.c rename to dll/directx/wine/d3dx9_31/d3dx9_31_main.c diff --git a/reactos/dll/directx/wine/d3dx9_31/version.rc b/dll/directx/wine/d3dx9_31/version.rc similarity index 100% rename from reactos/dll/directx/wine/d3dx9_31/version.rc rename to dll/directx/wine/d3dx9_31/version.rc diff --git a/reactos/dll/directx/wine/d3dx9_32/CMakeLists.txt b/dll/directx/wine/d3dx9_32/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/wine/d3dx9_32/CMakeLists.txt rename to dll/directx/wine/d3dx9_32/CMakeLists.txt diff --git a/reactos/dll/directx/wine/d3dx9_32/d3dx9_32.rbuild b/dll/directx/wine/d3dx9_32/d3dx9_32.rbuild similarity index 100% rename from reactos/dll/directx/wine/d3dx9_32/d3dx9_32.rbuild rename to dll/directx/wine/d3dx9_32/d3dx9_32.rbuild diff --git a/reactos/dll/directx/wine/d3dx9_32/d3dx9_32.spec b/dll/directx/wine/d3dx9_32/d3dx9_32.spec similarity index 100% rename from reactos/dll/directx/wine/d3dx9_32/d3dx9_32.spec rename to dll/directx/wine/d3dx9_32/d3dx9_32.spec diff --git a/reactos/dll/directx/wine/d3dx9_32/d3dx9_32_main.c b/dll/directx/wine/d3dx9_32/d3dx9_32_main.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_32/d3dx9_32_main.c rename to dll/directx/wine/d3dx9_32/d3dx9_32_main.c diff --git a/reactos/dll/directx/wine/d3dx9_32/version.rc b/dll/directx/wine/d3dx9_32/version.rc similarity index 100% rename from reactos/dll/directx/wine/d3dx9_32/version.rc rename to dll/directx/wine/d3dx9_32/version.rc diff --git a/reactos/dll/directx/wine/d3dx9_33/CMakeLists.txt b/dll/directx/wine/d3dx9_33/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/wine/d3dx9_33/CMakeLists.txt rename to dll/directx/wine/d3dx9_33/CMakeLists.txt diff --git a/reactos/dll/directx/wine/d3dx9_33/d3dx9_33.rbuild b/dll/directx/wine/d3dx9_33/d3dx9_33.rbuild similarity index 100% rename from reactos/dll/directx/wine/d3dx9_33/d3dx9_33.rbuild rename to dll/directx/wine/d3dx9_33/d3dx9_33.rbuild diff --git a/reactos/dll/directx/wine/d3dx9_33/d3dx9_33.spec b/dll/directx/wine/d3dx9_33/d3dx9_33.spec similarity index 100% rename from reactos/dll/directx/wine/d3dx9_33/d3dx9_33.spec rename to dll/directx/wine/d3dx9_33/d3dx9_33.spec diff --git a/reactos/dll/directx/wine/d3dx9_33/d3dx9_33_main.c b/dll/directx/wine/d3dx9_33/d3dx9_33_main.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_33/d3dx9_33_main.c rename to dll/directx/wine/d3dx9_33/d3dx9_33_main.c diff --git a/reactos/dll/directx/wine/d3dx9_33/version.rc b/dll/directx/wine/d3dx9_33/version.rc similarity index 100% rename from reactos/dll/directx/wine/d3dx9_33/version.rc rename to dll/directx/wine/d3dx9_33/version.rc diff --git a/reactos/dll/directx/wine/d3dx9_34/CMakeLists.txt b/dll/directx/wine/d3dx9_34/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/wine/d3dx9_34/CMakeLists.txt rename to dll/directx/wine/d3dx9_34/CMakeLists.txt diff --git a/reactos/dll/directx/wine/d3dx9_34/d3dx9_34.rbuild b/dll/directx/wine/d3dx9_34/d3dx9_34.rbuild similarity index 100% rename from reactos/dll/directx/wine/d3dx9_34/d3dx9_34.rbuild rename to dll/directx/wine/d3dx9_34/d3dx9_34.rbuild diff --git a/reactos/dll/directx/wine/d3dx9_34/d3dx9_34.spec b/dll/directx/wine/d3dx9_34/d3dx9_34.spec similarity index 100% rename from reactos/dll/directx/wine/d3dx9_34/d3dx9_34.spec rename to dll/directx/wine/d3dx9_34/d3dx9_34.spec diff --git a/reactos/dll/directx/wine/d3dx9_34/d3dx9_34_main.c b/dll/directx/wine/d3dx9_34/d3dx9_34_main.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_34/d3dx9_34_main.c rename to dll/directx/wine/d3dx9_34/d3dx9_34_main.c diff --git a/reactos/dll/directx/wine/d3dx9_34/version.rc b/dll/directx/wine/d3dx9_34/version.rc similarity index 100% rename from reactos/dll/directx/wine/d3dx9_34/version.rc rename to dll/directx/wine/d3dx9_34/version.rc diff --git a/reactos/dll/directx/wine/d3dx9_35/CMakeLists.txt b/dll/directx/wine/d3dx9_35/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/wine/d3dx9_35/CMakeLists.txt rename to dll/directx/wine/d3dx9_35/CMakeLists.txt diff --git a/reactos/dll/directx/wine/d3dx9_35/d3dx9_35.rbuild b/dll/directx/wine/d3dx9_35/d3dx9_35.rbuild similarity index 100% rename from reactos/dll/directx/wine/d3dx9_35/d3dx9_35.rbuild rename to dll/directx/wine/d3dx9_35/d3dx9_35.rbuild diff --git a/reactos/dll/directx/wine/d3dx9_35/d3dx9_35.spec b/dll/directx/wine/d3dx9_35/d3dx9_35.spec similarity index 100% rename from reactos/dll/directx/wine/d3dx9_35/d3dx9_35.spec rename to dll/directx/wine/d3dx9_35/d3dx9_35.spec diff --git a/reactos/dll/directx/wine/d3dx9_35/d3dx9_35_main.c b/dll/directx/wine/d3dx9_35/d3dx9_35_main.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_35/d3dx9_35_main.c rename to dll/directx/wine/d3dx9_35/d3dx9_35_main.c diff --git a/reactos/dll/directx/wine/d3dx9_35/version.rc b/dll/directx/wine/d3dx9_35/version.rc similarity index 100% rename from reactos/dll/directx/wine/d3dx9_35/version.rc rename to dll/directx/wine/d3dx9_35/version.rc diff --git a/reactos/dll/directx/wine/d3dx9_36/CMakeLists.txt b/dll/directx/wine/d3dx9_36/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/wine/d3dx9_36/CMakeLists.txt rename to dll/directx/wine/d3dx9_36/CMakeLists.txt diff --git a/reactos/dll/directx/wine/d3dx9_36/core.c b/dll/directx/wine/d3dx9_36/core.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_36/core.c rename to dll/directx/wine/d3dx9_36/core.c diff --git a/reactos/dll/directx/wine/d3dx9_36/d3dx9_36.rbuild b/dll/directx/wine/d3dx9_36/d3dx9_36.rbuild similarity index 100% rename from reactos/dll/directx/wine/d3dx9_36/d3dx9_36.rbuild rename to dll/directx/wine/d3dx9_36/d3dx9_36.rbuild diff --git a/reactos/dll/directx/wine/d3dx9_36/d3dx9_36.spec b/dll/directx/wine/d3dx9_36/d3dx9_36.spec similarity index 100% rename from reactos/dll/directx/wine/d3dx9_36/d3dx9_36.spec rename to dll/directx/wine/d3dx9_36/d3dx9_36.spec diff --git a/reactos/dll/directx/wine/d3dx9_36/d3dx9_36_main.c b/dll/directx/wine/d3dx9_36/d3dx9_36_main.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_36/d3dx9_36_main.c rename to dll/directx/wine/d3dx9_36/d3dx9_36_main.c diff --git a/reactos/dll/directx/wine/d3dx9_36/d3dx9_36_private.h b/dll/directx/wine/d3dx9_36/d3dx9_36_private.h similarity index 100% rename from reactos/dll/directx/wine/d3dx9_36/d3dx9_36_private.h rename to dll/directx/wine/d3dx9_36/d3dx9_36_private.h diff --git a/reactos/dll/directx/wine/d3dx9_36/font.c b/dll/directx/wine/d3dx9_36/font.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_36/font.c rename to dll/directx/wine/d3dx9_36/font.c diff --git a/reactos/dll/directx/wine/d3dx9_36/math.c b/dll/directx/wine/d3dx9_36/math.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_36/math.c rename to dll/directx/wine/d3dx9_36/math.c diff --git a/reactos/dll/directx/wine/d3dx9_36/mesh.c b/dll/directx/wine/d3dx9_36/mesh.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_36/mesh.c rename to dll/directx/wine/d3dx9_36/mesh.c diff --git a/reactos/dll/directx/wine/d3dx9_36/shader.c b/dll/directx/wine/d3dx9_36/shader.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_36/shader.c rename to dll/directx/wine/d3dx9_36/shader.c diff --git a/reactos/dll/directx/wine/d3dx9_36/sprite.c b/dll/directx/wine/d3dx9_36/sprite.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_36/sprite.c rename to dll/directx/wine/d3dx9_36/sprite.c diff --git a/reactos/dll/directx/wine/d3dx9_36/surface.c b/dll/directx/wine/d3dx9_36/surface.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_36/surface.c rename to dll/directx/wine/d3dx9_36/surface.c diff --git a/reactos/dll/directx/wine/d3dx9_36/texture.c b/dll/directx/wine/d3dx9_36/texture.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_36/texture.c rename to dll/directx/wine/d3dx9_36/texture.c diff --git a/reactos/dll/directx/wine/d3dx9_36/util.c b/dll/directx/wine/d3dx9_36/util.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_36/util.c rename to dll/directx/wine/d3dx9_36/util.c diff --git a/reactos/dll/directx/wine/d3dx9_36/version.rc b/dll/directx/wine/d3dx9_36/version.rc similarity index 100% rename from reactos/dll/directx/wine/d3dx9_36/version.rc rename to dll/directx/wine/d3dx9_36/version.rc diff --git a/reactos/dll/directx/wine/d3dx9_37/CMakeLists.txt b/dll/directx/wine/d3dx9_37/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/wine/d3dx9_37/CMakeLists.txt rename to dll/directx/wine/d3dx9_37/CMakeLists.txt diff --git a/reactos/dll/directx/wine/d3dx9_37/d3dx9_37.rbuild b/dll/directx/wine/d3dx9_37/d3dx9_37.rbuild similarity index 100% rename from reactos/dll/directx/wine/d3dx9_37/d3dx9_37.rbuild rename to dll/directx/wine/d3dx9_37/d3dx9_37.rbuild diff --git a/reactos/dll/directx/wine/d3dx9_37/d3dx9_37.spec b/dll/directx/wine/d3dx9_37/d3dx9_37.spec similarity index 100% rename from reactos/dll/directx/wine/d3dx9_37/d3dx9_37.spec rename to dll/directx/wine/d3dx9_37/d3dx9_37.spec diff --git a/reactos/dll/directx/wine/d3dx9_37/d3dx9_37_main.c b/dll/directx/wine/d3dx9_37/d3dx9_37_main.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_37/d3dx9_37_main.c rename to dll/directx/wine/d3dx9_37/d3dx9_37_main.c diff --git a/reactos/dll/directx/wine/d3dx9_37/version.rc b/dll/directx/wine/d3dx9_37/version.rc similarity index 100% rename from reactos/dll/directx/wine/d3dx9_37/version.rc rename to dll/directx/wine/d3dx9_37/version.rc diff --git a/reactos/dll/directx/wine/d3dx9_38/CMakeLists.txt b/dll/directx/wine/d3dx9_38/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/wine/d3dx9_38/CMakeLists.txt rename to dll/directx/wine/d3dx9_38/CMakeLists.txt diff --git a/reactos/dll/directx/wine/d3dx9_38/d3dx9_38.rbuild b/dll/directx/wine/d3dx9_38/d3dx9_38.rbuild similarity index 100% rename from reactos/dll/directx/wine/d3dx9_38/d3dx9_38.rbuild rename to dll/directx/wine/d3dx9_38/d3dx9_38.rbuild diff --git a/reactos/dll/directx/wine/d3dx9_38/d3dx9_38.spec b/dll/directx/wine/d3dx9_38/d3dx9_38.spec similarity index 100% rename from reactos/dll/directx/wine/d3dx9_38/d3dx9_38.spec rename to dll/directx/wine/d3dx9_38/d3dx9_38.spec diff --git a/reactos/dll/directx/wine/d3dx9_38/d3dx9_38_main.c b/dll/directx/wine/d3dx9_38/d3dx9_38_main.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_38/d3dx9_38_main.c rename to dll/directx/wine/d3dx9_38/d3dx9_38_main.c diff --git a/reactos/dll/directx/wine/d3dx9_38/version.rc b/dll/directx/wine/d3dx9_38/version.rc similarity index 100% rename from reactos/dll/directx/wine/d3dx9_38/version.rc rename to dll/directx/wine/d3dx9_38/version.rc diff --git a/reactos/dll/directx/wine/d3dx9_39/CMakeLists.txt b/dll/directx/wine/d3dx9_39/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/wine/d3dx9_39/CMakeLists.txt rename to dll/directx/wine/d3dx9_39/CMakeLists.txt diff --git a/reactos/dll/directx/wine/d3dx9_39/d3dx9_39.rbuild b/dll/directx/wine/d3dx9_39/d3dx9_39.rbuild similarity index 100% rename from reactos/dll/directx/wine/d3dx9_39/d3dx9_39.rbuild rename to dll/directx/wine/d3dx9_39/d3dx9_39.rbuild diff --git a/reactos/dll/directx/wine/d3dx9_39/d3dx9_39.spec b/dll/directx/wine/d3dx9_39/d3dx9_39.spec similarity index 100% rename from reactos/dll/directx/wine/d3dx9_39/d3dx9_39.spec rename to dll/directx/wine/d3dx9_39/d3dx9_39.spec diff --git a/reactos/dll/directx/wine/d3dx9_39/d3dx9_39_main.c b/dll/directx/wine/d3dx9_39/d3dx9_39_main.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_39/d3dx9_39_main.c rename to dll/directx/wine/d3dx9_39/d3dx9_39_main.c diff --git a/reactos/dll/directx/wine/d3dx9_39/version.rc b/dll/directx/wine/d3dx9_39/version.rc similarity index 100% rename from reactos/dll/directx/wine/d3dx9_39/version.rc rename to dll/directx/wine/d3dx9_39/version.rc diff --git a/reactos/dll/directx/wine/d3dx9_40/CMakeLists.txt b/dll/directx/wine/d3dx9_40/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/wine/d3dx9_40/CMakeLists.txt rename to dll/directx/wine/d3dx9_40/CMakeLists.txt diff --git a/reactos/dll/directx/wine/d3dx9_40/d3dx9_40.rbuild b/dll/directx/wine/d3dx9_40/d3dx9_40.rbuild similarity index 100% rename from reactos/dll/directx/wine/d3dx9_40/d3dx9_40.rbuild rename to dll/directx/wine/d3dx9_40/d3dx9_40.rbuild diff --git a/reactos/dll/directx/wine/d3dx9_40/d3dx9_40.spec b/dll/directx/wine/d3dx9_40/d3dx9_40.spec similarity index 100% rename from reactos/dll/directx/wine/d3dx9_40/d3dx9_40.spec rename to dll/directx/wine/d3dx9_40/d3dx9_40.spec diff --git a/reactos/dll/directx/wine/d3dx9_40/d3dx9_40_main.c b/dll/directx/wine/d3dx9_40/d3dx9_40_main.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_40/d3dx9_40_main.c rename to dll/directx/wine/d3dx9_40/d3dx9_40_main.c diff --git a/reactos/dll/directx/wine/d3dx9_40/version.rc b/dll/directx/wine/d3dx9_40/version.rc similarity index 100% rename from reactos/dll/directx/wine/d3dx9_40/version.rc rename to dll/directx/wine/d3dx9_40/version.rc diff --git a/reactos/dll/directx/wine/d3dx9_41/CMakeLists.txt b/dll/directx/wine/d3dx9_41/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/wine/d3dx9_41/CMakeLists.txt rename to dll/directx/wine/d3dx9_41/CMakeLists.txt diff --git a/reactos/dll/directx/wine/d3dx9_41/d3dx9_41.rbuild b/dll/directx/wine/d3dx9_41/d3dx9_41.rbuild similarity index 100% rename from reactos/dll/directx/wine/d3dx9_41/d3dx9_41.rbuild rename to dll/directx/wine/d3dx9_41/d3dx9_41.rbuild diff --git a/reactos/dll/directx/wine/d3dx9_41/d3dx9_41.spec b/dll/directx/wine/d3dx9_41/d3dx9_41.spec similarity index 100% rename from reactos/dll/directx/wine/d3dx9_41/d3dx9_41.spec rename to dll/directx/wine/d3dx9_41/d3dx9_41.spec diff --git a/reactos/dll/directx/wine/d3dx9_41/d3dx9_41_main.c b/dll/directx/wine/d3dx9_41/d3dx9_41_main.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_41/d3dx9_41_main.c rename to dll/directx/wine/d3dx9_41/d3dx9_41_main.c diff --git a/reactos/dll/directx/wine/d3dx9_41/version.rc b/dll/directx/wine/d3dx9_41/version.rc similarity index 100% rename from reactos/dll/directx/wine/d3dx9_41/version.rc rename to dll/directx/wine/d3dx9_41/version.rc diff --git a/reactos/dll/directx/wine/d3dx9_42/CMakeLists.txt b/dll/directx/wine/d3dx9_42/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/wine/d3dx9_42/CMakeLists.txt rename to dll/directx/wine/d3dx9_42/CMakeLists.txt diff --git a/reactos/dll/directx/wine/d3dx9_42/d3dx9_42.rbuild b/dll/directx/wine/d3dx9_42/d3dx9_42.rbuild similarity index 100% rename from reactos/dll/directx/wine/d3dx9_42/d3dx9_42.rbuild rename to dll/directx/wine/d3dx9_42/d3dx9_42.rbuild diff --git a/reactos/dll/directx/wine/d3dx9_42/d3dx9_42.spec b/dll/directx/wine/d3dx9_42/d3dx9_42.spec similarity index 100% rename from reactos/dll/directx/wine/d3dx9_42/d3dx9_42.spec rename to dll/directx/wine/d3dx9_42/d3dx9_42.spec diff --git a/reactos/dll/directx/wine/d3dx9_42/d3dx9_42_main.c b/dll/directx/wine/d3dx9_42/d3dx9_42_main.c similarity index 100% rename from reactos/dll/directx/wine/d3dx9_42/d3dx9_42_main.c rename to dll/directx/wine/d3dx9_42/d3dx9_42_main.c diff --git a/reactos/dll/directx/wine/d3dx9_42/version.rc b/dll/directx/wine/d3dx9_42/version.rc similarity index 100% rename from reactos/dll/directx/wine/d3dx9_42/version.rc rename to dll/directx/wine/d3dx9_42/version.rc diff --git a/reactos/dll/directx/wine/ddraw/CMakeLists.txt b/dll/directx/wine/ddraw/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/wine/ddraw/CMakeLists.txt rename to dll/directx/wine/ddraw/CMakeLists.txt diff --git a/reactos/dll/directx/wine/ddraw/clipper.c b/dll/directx/wine/ddraw/clipper.c similarity index 100% rename from reactos/dll/directx/wine/ddraw/clipper.c rename to dll/directx/wine/ddraw/clipper.c diff --git a/reactos/dll/directx/wine/ddraw/ddraw.c b/dll/directx/wine/ddraw/ddraw.c similarity index 100% rename from reactos/dll/directx/wine/ddraw/ddraw.c rename to dll/directx/wine/ddraw/ddraw.c diff --git a/reactos/dll/directx/wine/ddraw/ddraw.rbuild b/dll/directx/wine/ddraw/ddraw.rbuild similarity index 100% rename from reactos/dll/directx/wine/ddraw/ddraw.rbuild rename to dll/directx/wine/ddraw/ddraw.rbuild diff --git a/reactos/dll/directx/wine/ddraw/ddraw.spec b/dll/directx/wine/ddraw/ddraw.spec similarity index 100% rename from reactos/dll/directx/wine/ddraw/ddraw.spec rename to dll/directx/wine/ddraw/ddraw.spec diff --git a/reactos/dll/directx/wine/ddraw/ddraw_private.h b/dll/directx/wine/ddraw/ddraw_private.h similarity index 100% rename from reactos/dll/directx/wine/ddraw/ddraw_private.h rename to dll/directx/wine/ddraw/ddraw_private.h diff --git a/reactos/dll/directx/wine/ddraw/device.c b/dll/directx/wine/ddraw/device.c similarity index 100% rename from reactos/dll/directx/wine/ddraw/device.c rename to dll/directx/wine/ddraw/device.c diff --git a/reactos/dll/directx/wine/ddraw/executebuffer.c b/dll/directx/wine/ddraw/executebuffer.c similarity index 100% rename from reactos/dll/directx/wine/ddraw/executebuffer.c rename to dll/directx/wine/ddraw/executebuffer.c diff --git a/reactos/dll/directx/wine/ddraw/legacy.h b/dll/directx/wine/ddraw/legacy.h similarity index 100% rename from reactos/dll/directx/wine/ddraw/legacy.h rename to dll/directx/wine/ddraw/legacy.h diff --git a/reactos/dll/directx/wine/ddraw/light.c b/dll/directx/wine/ddraw/light.c similarity index 100% rename from reactos/dll/directx/wine/ddraw/light.c rename to dll/directx/wine/ddraw/light.c diff --git a/reactos/dll/directx/wine/ddraw/main.c b/dll/directx/wine/ddraw/main.c similarity index 100% rename from reactos/dll/directx/wine/ddraw/main.c rename to dll/directx/wine/ddraw/main.c diff --git a/reactos/dll/directx/wine/ddraw/material.c b/dll/directx/wine/ddraw/material.c similarity index 100% rename from reactos/dll/directx/wine/ddraw/material.c rename to dll/directx/wine/ddraw/material.c diff --git a/reactos/dll/directx/wine/ddraw/palette.c b/dll/directx/wine/ddraw/palette.c similarity index 100% rename from reactos/dll/directx/wine/ddraw/palette.c rename to dll/directx/wine/ddraw/palette.c diff --git a/reactos/dll/directx/wine/ddraw/parent.c b/dll/directx/wine/ddraw/parent.c similarity index 100% rename from reactos/dll/directx/wine/ddraw/parent.c rename to dll/directx/wine/ddraw/parent.c diff --git a/reactos/dll/directx/wine/ddraw/regsvr.c b/dll/directx/wine/ddraw/regsvr.c similarity index 100% rename from reactos/dll/directx/wine/ddraw/regsvr.c rename to dll/directx/wine/ddraw/regsvr.c diff --git a/reactos/dll/directx/wine/ddraw/stubs.c b/dll/directx/wine/ddraw/stubs.c similarity index 100% rename from reactos/dll/directx/wine/ddraw/stubs.c rename to dll/directx/wine/ddraw/stubs.c diff --git a/reactos/dll/directx/wine/ddraw/surface.c b/dll/directx/wine/ddraw/surface.c similarity index 100% rename from reactos/dll/directx/wine/ddraw/surface.c rename to dll/directx/wine/ddraw/surface.c diff --git a/reactos/dll/directx/wine/ddraw/utils.c b/dll/directx/wine/ddraw/utils.c similarity index 100% rename from reactos/dll/directx/wine/ddraw/utils.c rename to dll/directx/wine/ddraw/utils.c diff --git a/reactos/dll/directx/wine/ddraw/version.rc b/dll/directx/wine/ddraw/version.rc similarity index 100% rename from reactos/dll/directx/wine/ddraw/version.rc rename to dll/directx/wine/ddraw/version.rc diff --git a/reactos/dll/directx/wine/ddraw/vertexbuffer.c b/dll/directx/wine/ddraw/vertexbuffer.c similarity index 100% rename from reactos/dll/directx/wine/ddraw/vertexbuffer.c rename to dll/directx/wine/ddraw/vertexbuffer.c diff --git a/reactos/dll/directx/wine/ddraw/viewport.c b/dll/directx/wine/ddraw/viewport.c similarity index 100% rename from reactos/dll/directx/wine/ddraw/viewport.c rename to dll/directx/wine/ddraw/viewport.c diff --git a/reactos/dll/directx/wine/readme.txt b/dll/directx/wine/readme.txt similarity index 100% rename from reactos/dll/directx/wine/readme.txt rename to dll/directx/wine/readme.txt diff --git a/reactos/dll/directx/wine/wine.rbuild b/dll/directx/wine/wine.rbuild similarity index 100% rename from reactos/dll/directx/wine/wine.rbuild rename to dll/directx/wine/wine.rbuild diff --git a/reactos/dll/directx/wine/wined3d/CMakeLists.txt b/dll/directx/wine/wined3d/CMakeLists.txt similarity index 100% rename from reactos/dll/directx/wine/wined3d/CMakeLists.txt rename to dll/directx/wine/wined3d/CMakeLists.txt diff --git a/reactos/dll/directx/wine/wined3d/arb_program_shader.c b/dll/directx/wine/wined3d/arb_program_shader.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/arb_program_shader.c rename to dll/directx/wine/wined3d/arb_program_shader.c diff --git a/reactos/dll/directx/wine/wined3d/ati_fragment_shader.c b/dll/directx/wine/wined3d/ati_fragment_shader.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/ati_fragment_shader.c rename to dll/directx/wine/wined3d/ati_fragment_shader.c diff --git a/reactos/dll/directx/wine/wined3d/buffer.c b/dll/directx/wine/wined3d/buffer.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/buffer.c rename to dll/directx/wine/wined3d/buffer.c diff --git a/reactos/dll/directx/wine/wined3d/clipper.c b/dll/directx/wine/wined3d/clipper.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/clipper.c rename to dll/directx/wine/wined3d/clipper.c diff --git a/reactos/dll/directx/wine/wined3d/context.c b/dll/directx/wine/wined3d/context.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/context.c rename to dll/directx/wine/wined3d/context.c diff --git a/reactos/dll/directx/wine/wined3d/device.c b/dll/directx/wine/wined3d/device.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/device.c rename to dll/directx/wine/wined3d/device.c diff --git a/reactos/dll/directx/wine/wined3d/directx.c b/dll/directx/wine/wined3d/directx.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/directx.c rename to dll/directx/wine/wined3d/directx.c diff --git a/reactos/dll/directx/wine/wined3d/drawprim.c b/dll/directx/wine/wined3d/drawprim.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/drawprim.c rename to dll/directx/wine/wined3d/drawprim.c diff --git a/reactos/dll/directx/wine/wined3d/gl_compat.c b/dll/directx/wine/wined3d/gl_compat.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/gl_compat.c rename to dll/directx/wine/wined3d/gl_compat.c diff --git a/reactos/dll/directx/wine/wined3d/glsl_shader.c b/dll/directx/wine/wined3d/glsl_shader.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/glsl_shader.c rename to dll/directx/wine/wined3d/glsl_shader.c diff --git a/reactos/dll/directx/wine/wined3d/nvidia_texture_shader.c b/dll/directx/wine/wined3d/nvidia_texture_shader.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/nvidia_texture_shader.c rename to dll/directx/wine/wined3d/nvidia_texture_shader.c diff --git a/reactos/dll/directx/wine/wined3d/palette.c b/dll/directx/wine/wined3d/palette.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/palette.c rename to dll/directx/wine/wined3d/palette.c diff --git a/reactos/dll/directx/wine/wined3d/powf.c b/dll/directx/wine/wined3d/powf.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/powf.c rename to dll/directx/wine/wined3d/powf.c diff --git a/reactos/dll/directx/wine/wined3d/query.c b/dll/directx/wine/wined3d/query.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/query.c rename to dll/directx/wine/wined3d/query.c diff --git a/reactos/dll/directx/wine/wined3d/resource.c b/dll/directx/wine/wined3d/resource.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/resource.c rename to dll/directx/wine/wined3d/resource.c diff --git a/reactos/dll/directx/wine/wined3d/roshacks.txt b/dll/directx/wine/wined3d/roshacks.txt similarity index 100% rename from reactos/dll/directx/wine/wined3d/roshacks.txt rename to dll/directx/wine/wined3d/roshacks.txt diff --git a/reactos/dll/directx/wine/wined3d/shader.c b/dll/directx/wine/wined3d/shader.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/shader.c rename to dll/directx/wine/wined3d/shader.c diff --git a/reactos/dll/directx/wine/wined3d/shader_sm1.c b/dll/directx/wine/wined3d/shader_sm1.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/shader_sm1.c rename to dll/directx/wine/wined3d/shader_sm1.c diff --git a/reactos/dll/directx/wine/wined3d/shader_sm4.c b/dll/directx/wine/wined3d/shader_sm4.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/shader_sm4.c rename to dll/directx/wine/wined3d/shader_sm4.c diff --git a/reactos/dll/directx/wine/wined3d/sqrtf.c b/dll/directx/wine/wined3d/sqrtf.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/sqrtf.c rename to dll/directx/wine/wined3d/sqrtf.c diff --git a/reactos/dll/directx/wine/wined3d/state.c b/dll/directx/wine/wined3d/state.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/state.c rename to dll/directx/wine/wined3d/state.c diff --git a/reactos/dll/directx/wine/wined3d/stateblock.c b/dll/directx/wine/wined3d/stateblock.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/stateblock.c rename to dll/directx/wine/wined3d/stateblock.c diff --git a/reactos/dll/directx/wine/wined3d/surface.c b/dll/directx/wine/wined3d/surface.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/surface.c rename to dll/directx/wine/wined3d/surface.c diff --git a/reactos/dll/directx/wine/wined3d/swapchain.c b/dll/directx/wine/wined3d/swapchain.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/swapchain.c rename to dll/directx/wine/wined3d/swapchain.c diff --git a/reactos/dll/directx/wine/wined3d/texture.c b/dll/directx/wine/wined3d/texture.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/texture.c rename to dll/directx/wine/wined3d/texture.c diff --git a/reactos/dll/directx/wine/wined3d/utils.c b/dll/directx/wine/wined3d/utils.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/utils.c rename to dll/directx/wine/wined3d/utils.c diff --git a/reactos/dll/directx/wine/wined3d/version.rc b/dll/directx/wine/wined3d/version.rc similarity index 100% rename from reactos/dll/directx/wine/wined3d/version.rc rename to dll/directx/wine/wined3d/version.rc diff --git a/reactos/dll/directx/wine/wined3d/vertexdeclaration.c b/dll/directx/wine/wined3d/vertexdeclaration.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/vertexdeclaration.c rename to dll/directx/wine/wined3d/vertexdeclaration.c diff --git a/reactos/dll/directx/wine/wined3d/view.c b/dll/directx/wine/wined3d/view.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/view.c rename to dll/directx/wine/wined3d/view.c diff --git a/reactos/dll/directx/wine/wined3d/volume.c b/dll/directx/wine/wined3d/volume.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/volume.c rename to dll/directx/wine/wined3d/volume.c diff --git a/reactos/dll/directx/wine/wined3d/wined3d.rbuild b/dll/directx/wine/wined3d/wined3d.rbuild similarity index 100% rename from reactos/dll/directx/wine/wined3d/wined3d.rbuild rename to dll/directx/wine/wined3d/wined3d.rbuild diff --git a/reactos/dll/directx/wine/wined3d/wined3d.spec b/dll/directx/wine/wined3d/wined3d.spec similarity index 100% rename from reactos/dll/directx/wine/wined3d/wined3d.spec rename to dll/directx/wine/wined3d/wined3d.spec diff --git a/reactos/dll/directx/wine/wined3d/wined3d_gl.h b/dll/directx/wine/wined3d/wined3d_gl.h similarity index 100% rename from reactos/dll/directx/wine/wined3d/wined3d_gl.h rename to dll/directx/wine/wined3d/wined3d_gl.h diff --git a/reactos/dll/directx/wine/wined3d/wined3d_main.c b/dll/directx/wine/wined3d/wined3d_main.c similarity index 100% rename from reactos/dll/directx/wine/wined3d/wined3d_main.c rename to dll/directx/wine/wined3d/wined3d_main.c diff --git a/reactos/dll/directx/wine/wined3d/wined3d_private.h b/dll/directx/wine/wined3d/wined3d_private.h similarity index 100% rename from reactos/dll/directx/wine/wined3d/wined3d_private.h rename to dll/directx/wine/wined3d/wined3d_private.h diff --git a/reactos/dll/dll.rbuild b/dll/dll.rbuild similarity index 100% rename from reactos/dll/dll.rbuild rename to dll/dll.rbuild diff --git a/reactos/dll/keyboard/CMakeLists.txt b/dll/keyboard/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/CMakeLists.txt rename to dll/keyboard/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbda1/CMakeLists.txt b/dll/keyboard/kbda1/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbda1/CMakeLists.txt rename to dll/keyboard/kbda1/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbda1/kbda1.c b/dll/keyboard/kbda1/kbda1.c similarity index 100% rename from reactos/dll/keyboard/kbda1/kbda1.c rename to dll/keyboard/kbda1/kbda1.c diff --git a/reactos/dll/keyboard/kbda1/kbda1.rbuild b/dll/keyboard/kbda1/kbda1.rbuild similarity index 100% rename from reactos/dll/keyboard/kbda1/kbda1.rbuild rename to dll/keyboard/kbda1/kbda1.rbuild diff --git a/reactos/dll/keyboard/kbda1/kbda1.rc b/dll/keyboard/kbda1/kbda1.rc similarity index 100% rename from reactos/dll/keyboard/kbda1/kbda1.rc rename to dll/keyboard/kbda1/kbda1.rc diff --git a/reactos/dll/keyboard/kbda1/kbda1.spec b/dll/keyboard/kbda1/kbda1.spec similarity index 100% rename from reactos/dll/keyboard/kbda1/kbda1.spec rename to dll/keyboard/kbda1/kbda1.spec diff --git a/reactos/dll/keyboard/kbda2/CMakeLists.txt b/dll/keyboard/kbda2/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbda2/CMakeLists.txt rename to dll/keyboard/kbda2/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbda2/kbda2.c b/dll/keyboard/kbda2/kbda2.c similarity index 100% rename from reactos/dll/keyboard/kbda2/kbda2.c rename to dll/keyboard/kbda2/kbda2.c diff --git a/reactos/dll/keyboard/kbda2/kbda2.rbuild b/dll/keyboard/kbda2/kbda2.rbuild similarity index 100% rename from reactos/dll/keyboard/kbda2/kbda2.rbuild rename to dll/keyboard/kbda2/kbda2.rbuild diff --git a/reactos/dll/keyboard/kbda2/kbda2.rc b/dll/keyboard/kbda2/kbda2.rc similarity index 100% rename from reactos/dll/keyboard/kbda2/kbda2.rc rename to dll/keyboard/kbda2/kbda2.rc diff --git a/reactos/dll/keyboard/kbda2/kbda2.spec b/dll/keyboard/kbda2/kbda2.spec similarity index 100% rename from reactos/dll/keyboard/kbda2/kbda2.spec rename to dll/keyboard/kbda2/kbda2.spec diff --git a/reactos/dll/keyboard/kbda3/CMakeLists.txt b/dll/keyboard/kbda3/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbda3/CMakeLists.txt rename to dll/keyboard/kbda3/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbda3/kbda3.c b/dll/keyboard/kbda3/kbda3.c similarity index 100% rename from reactos/dll/keyboard/kbda3/kbda3.c rename to dll/keyboard/kbda3/kbda3.c diff --git a/reactos/dll/keyboard/kbda3/kbda3.rbuild b/dll/keyboard/kbda3/kbda3.rbuild similarity index 100% rename from reactos/dll/keyboard/kbda3/kbda3.rbuild rename to dll/keyboard/kbda3/kbda3.rbuild diff --git a/reactos/dll/keyboard/kbda3/kbda3.rc b/dll/keyboard/kbda3/kbda3.rc similarity index 100% rename from reactos/dll/keyboard/kbda3/kbda3.rc rename to dll/keyboard/kbda3/kbda3.rc diff --git a/reactos/dll/keyboard/kbda3/kbda3.spec b/dll/keyboard/kbda3/kbda3.spec similarity index 100% rename from reactos/dll/keyboard/kbda3/kbda3.spec rename to dll/keyboard/kbda3/kbda3.spec diff --git a/reactos/dll/keyboard/kbdal/CMakeLists.txt b/dll/keyboard/kbdal/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdal/CMakeLists.txt rename to dll/keyboard/kbdal/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdal/kbdal.c b/dll/keyboard/kbdal/kbdal.c similarity index 100% rename from reactos/dll/keyboard/kbdal/kbdal.c rename to dll/keyboard/kbdal/kbdal.c diff --git a/reactos/dll/keyboard/kbdal/kbdal.rbuild b/dll/keyboard/kbdal/kbdal.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdal/kbdal.rbuild rename to dll/keyboard/kbdal/kbdal.rbuild diff --git a/reactos/dll/keyboard/kbdal/kbdal.rc b/dll/keyboard/kbdal/kbdal.rc similarity index 100% rename from reactos/dll/keyboard/kbdal/kbdal.rc rename to dll/keyboard/kbdal/kbdal.rc diff --git a/reactos/dll/keyboard/kbdal/kbdal.spec b/dll/keyboard/kbdal/kbdal.spec similarity index 100% rename from reactos/dll/keyboard/kbdal/kbdal.spec rename to dll/keyboard/kbdal/kbdal.spec diff --git a/reactos/dll/keyboard/kbdarme/CMakeLists.txt b/dll/keyboard/kbdarme/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdarme/CMakeLists.txt rename to dll/keyboard/kbdarme/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdarme/kbdarme.c b/dll/keyboard/kbdarme/kbdarme.c similarity index 100% rename from reactos/dll/keyboard/kbdarme/kbdarme.c rename to dll/keyboard/kbdarme/kbdarme.c diff --git a/reactos/dll/keyboard/kbdarme/kbdarme.rbuild b/dll/keyboard/kbdarme/kbdarme.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdarme/kbdarme.rbuild rename to dll/keyboard/kbdarme/kbdarme.rbuild diff --git a/reactos/dll/keyboard/kbdarme/kbdarme.rc b/dll/keyboard/kbdarme/kbdarme.rc similarity index 100% rename from reactos/dll/keyboard/kbdarme/kbdarme.rc rename to dll/keyboard/kbdarme/kbdarme.rc diff --git a/reactos/dll/keyboard/kbdarme/kbdarme.spec b/dll/keyboard/kbdarme/kbdarme.spec similarity index 100% rename from reactos/dll/keyboard/kbdarme/kbdarme.spec rename to dll/keyboard/kbdarme/kbdarme.spec diff --git a/reactos/dll/keyboard/kbdarmw/CMakeLists.txt b/dll/keyboard/kbdarmw/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdarmw/CMakeLists.txt rename to dll/keyboard/kbdarmw/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdarmw/kbdarmw.c b/dll/keyboard/kbdarmw/kbdarmw.c similarity index 100% rename from reactos/dll/keyboard/kbdarmw/kbdarmw.c rename to dll/keyboard/kbdarmw/kbdarmw.c diff --git a/reactos/dll/keyboard/kbdarmw/kbdarmw.rbuild b/dll/keyboard/kbdarmw/kbdarmw.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdarmw/kbdarmw.rbuild rename to dll/keyboard/kbdarmw/kbdarmw.rbuild diff --git a/reactos/dll/keyboard/kbdarmw/kbdarmw.rc b/dll/keyboard/kbdarmw/kbdarmw.rc similarity index 100% rename from reactos/dll/keyboard/kbdarmw/kbdarmw.rc rename to dll/keyboard/kbdarmw/kbdarmw.rc diff --git a/reactos/dll/keyboard/kbdarmw/kbdarmw.spec b/dll/keyboard/kbdarmw/kbdarmw.spec similarity index 100% rename from reactos/dll/keyboard/kbdarmw/kbdarmw.spec rename to dll/keyboard/kbdarmw/kbdarmw.spec diff --git a/reactos/dll/keyboard/kbdaze/CMakeLists.txt b/dll/keyboard/kbdaze/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdaze/CMakeLists.txt rename to dll/keyboard/kbdaze/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdaze/kbdaze.c b/dll/keyboard/kbdaze/kbdaze.c similarity index 100% rename from reactos/dll/keyboard/kbdaze/kbdaze.c rename to dll/keyboard/kbdaze/kbdaze.c diff --git a/reactos/dll/keyboard/kbdaze/kbdaze.rbuild b/dll/keyboard/kbdaze/kbdaze.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdaze/kbdaze.rbuild rename to dll/keyboard/kbdaze/kbdaze.rbuild diff --git a/reactos/dll/keyboard/kbdaze/kbdaze.rc b/dll/keyboard/kbdaze/kbdaze.rc similarity index 100% rename from reactos/dll/keyboard/kbdaze/kbdaze.rc rename to dll/keyboard/kbdaze/kbdaze.rc diff --git a/reactos/dll/keyboard/kbdaze/kbdaze.spec b/dll/keyboard/kbdaze/kbdaze.spec similarity index 100% rename from reactos/dll/keyboard/kbdaze/kbdaze.spec rename to dll/keyboard/kbdaze/kbdaze.spec diff --git a/reactos/dll/keyboard/kbdazel/CMakeLists.txt b/dll/keyboard/kbdazel/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdazel/CMakeLists.txt rename to dll/keyboard/kbdazel/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdazel/kbdazel.c b/dll/keyboard/kbdazel/kbdazel.c similarity index 100% rename from reactos/dll/keyboard/kbdazel/kbdazel.c rename to dll/keyboard/kbdazel/kbdazel.c diff --git a/reactos/dll/keyboard/kbdazel/kbdazel.rbuild b/dll/keyboard/kbdazel/kbdazel.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdazel/kbdazel.rbuild rename to dll/keyboard/kbdazel/kbdazel.rbuild diff --git a/reactos/dll/keyboard/kbdazel/kbdazel.rc b/dll/keyboard/kbdazel/kbdazel.rc similarity index 100% rename from reactos/dll/keyboard/kbdazel/kbdazel.rc rename to dll/keyboard/kbdazel/kbdazel.rc diff --git a/reactos/dll/keyboard/kbdazel/kbdazel.spec b/dll/keyboard/kbdazel/kbdazel.spec similarity index 100% rename from reactos/dll/keyboard/kbdazel/kbdazel.spec rename to dll/keyboard/kbdazel/kbdazel.spec diff --git a/reactos/dll/keyboard/kbdbe/CMakeLists.txt b/dll/keyboard/kbdbe/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdbe/CMakeLists.txt rename to dll/keyboard/kbdbe/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdbe/kbdbe.c b/dll/keyboard/kbdbe/kbdbe.c similarity index 100% rename from reactos/dll/keyboard/kbdbe/kbdbe.c rename to dll/keyboard/kbdbe/kbdbe.c diff --git a/reactos/dll/keyboard/kbdbe/kbdbe.rbuild b/dll/keyboard/kbdbe/kbdbe.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdbe/kbdbe.rbuild rename to dll/keyboard/kbdbe/kbdbe.rbuild diff --git a/reactos/dll/keyboard/kbdbe/kbdbe.rc b/dll/keyboard/kbdbe/kbdbe.rc similarity index 100% rename from reactos/dll/keyboard/kbdbe/kbdbe.rc rename to dll/keyboard/kbdbe/kbdbe.rc diff --git a/reactos/dll/keyboard/kbdbe/kbdbe.spec b/dll/keyboard/kbdbe/kbdbe.spec similarity index 100% rename from reactos/dll/keyboard/kbdbe/kbdbe.spec rename to dll/keyboard/kbdbe/kbdbe.spec diff --git a/reactos/dll/keyboard/kbdbga/CMakeLists.txt b/dll/keyboard/kbdbga/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdbga/CMakeLists.txt rename to dll/keyboard/kbdbga/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdbga/kbdbga.c b/dll/keyboard/kbdbga/kbdbga.c similarity index 100% rename from reactos/dll/keyboard/kbdbga/kbdbga.c rename to dll/keyboard/kbdbga/kbdbga.c diff --git a/reactos/dll/keyboard/kbdbga/kbdbga.rbuild b/dll/keyboard/kbdbga/kbdbga.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdbga/kbdbga.rbuild rename to dll/keyboard/kbdbga/kbdbga.rbuild diff --git a/reactos/dll/keyboard/kbdbga/kbdbga.rc b/dll/keyboard/kbdbga/kbdbga.rc similarity index 100% rename from reactos/dll/keyboard/kbdbga/kbdbga.rc rename to dll/keyboard/kbdbga/kbdbga.rc diff --git a/reactos/dll/keyboard/kbdbga/kbdbga.spec b/dll/keyboard/kbdbga/kbdbga.spec similarity index 100% rename from reactos/dll/keyboard/kbdbga/kbdbga.spec rename to dll/keyboard/kbdbga/kbdbga.spec diff --git a/reactos/dll/keyboard/kbdbgm/CMakeLists.txt b/dll/keyboard/kbdbgm/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdbgm/CMakeLists.txt rename to dll/keyboard/kbdbgm/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdbgm/kbdbgm.c b/dll/keyboard/kbdbgm/kbdbgm.c similarity index 100% rename from reactos/dll/keyboard/kbdbgm/kbdbgm.c rename to dll/keyboard/kbdbgm/kbdbgm.c diff --git a/reactos/dll/keyboard/kbdbgm/kbdbgm.rbuild b/dll/keyboard/kbdbgm/kbdbgm.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdbgm/kbdbgm.rbuild rename to dll/keyboard/kbdbgm/kbdbgm.rbuild diff --git a/reactos/dll/keyboard/kbdbgm/kbdbgm.rc b/dll/keyboard/kbdbgm/kbdbgm.rc similarity index 100% rename from reactos/dll/keyboard/kbdbgm/kbdbgm.rc rename to dll/keyboard/kbdbgm/kbdbgm.rc diff --git a/reactos/dll/keyboard/kbdbgm/kbdbgm.spec b/dll/keyboard/kbdbgm/kbdbgm.spec similarity index 100% rename from reactos/dll/keyboard/kbdbgm/kbdbgm.spec rename to dll/keyboard/kbdbgm/kbdbgm.spec diff --git a/reactos/dll/keyboard/kbdbgt/CMakeLists.txt b/dll/keyboard/kbdbgt/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdbgt/CMakeLists.txt rename to dll/keyboard/kbdbgt/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdbgt/kbdbgt.c b/dll/keyboard/kbdbgt/kbdbgt.c similarity index 100% rename from reactos/dll/keyboard/kbdbgt/kbdbgt.c rename to dll/keyboard/kbdbgt/kbdbgt.c diff --git a/reactos/dll/keyboard/kbdbgt/kbdbgt.rbuild b/dll/keyboard/kbdbgt/kbdbgt.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdbgt/kbdbgt.rbuild rename to dll/keyboard/kbdbgt/kbdbgt.rbuild diff --git a/reactos/dll/keyboard/kbdbgt/kbdbgt.rc b/dll/keyboard/kbdbgt/kbdbgt.rc similarity index 100% rename from reactos/dll/keyboard/kbdbgt/kbdbgt.rc rename to dll/keyboard/kbdbgt/kbdbgt.rc diff --git a/reactos/dll/keyboard/kbdbgt/kbdbgt.spec b/dll/keyboard/kbdbgt/kbdbgt.spec similarity index 100% rename from reactos/dll/keyboard/kbdbgt/kbdbgt.spec rename to dll/keyboard/kbdbgt/kbdbgt.spec diff --git a/reactos/dll/keyboard/kbdblr/CMakeLists.txt b/dll/keyboard/kbdblr/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdblr/CMakeLists.txt rename to dll/keyboard/kbdblr/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdblr/kbdblr.c b/dll/keyboard/kbdblr/kbdblr.c similarity index 100% rename from reactos/dll/keyboard/kbdblr/kbdblr.c rename to dll/keyboard/kbdblr/kbdblr.c diff --git a/reactos/dll/keyboard/kbdblr/kbdblr.rbuild b/dll/keyboard/kbdblr/kbdblr.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdblr/kbdblr.rbuild rename to dll/keyboard/kbdblr/kbdblr.rbuild diff --git a/reactos/dll/keyboard/kbdblr/kbdblr.rc b/dll/keyboard/kbdblr/kbdblr.rc similarity index 100% rename from reactos/dll/keyboard/kbdblr/kbdblr.rc rename to dll/keyboard/kbdblr/kbdblr.rc diff --git a/reactos/dll/keyboard/kbdblr/kbdblr.spec b/dll/keyboard/kbdblr/kbdblr.spec similarity index 100% rename from reactos/dll/keyboard/kbdblr/kbdblr.spec rename to dll/keyboard/kbdblr/kbdblr.spec diff --git a/reactos/dll/keyboard/kbdbr/CMakeLists.txt b/dll/keyboard/kbdbr/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdbr/CMakeLists.txt rename to dll/keyboard/kbdbr/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdbr/kbdbr.c b/dll/keyboard/kbdbr/kbdbr.c similarity index 100% rename from reactos/dll/keyboard/kbdbr/kbdbr.c rename to dll/keyboard/kbdbr/kbdbr.c diff --git a/reactos/dll/keyboard/kbdbr/kbdbr.rbuild b/dll/keyboard/kbdbr/kbdbr.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdbr/kbdbr.rbuild rename to dll/keyboard/kbdbr/kbdbr.rbuild diff --git a/reactos/dll/keyboard/kbdbr/kbdbr.rc b/dll/keyboard/kbdbr/kbdbr.rc similarity index 100% rename from reactos/dll/keyboard/kbdbr/kbdbr.rc rename to dll/keyboard/kbdbr/kbdbr.rc diff --git a/reactos/dll/keyboard/kbdbr/kbdbr.spec b/dll/keyboard/kbdbr/kbdbr.spec similarity index 100% rename from reactos/dll/keyboard/kbdbr/kbdbr.spec rename to dll/keyboard/kbdbr/kbdbr.spec diff --git a/reactos/dll/keyboard/kbdbur/CMakeLists.txt b/dll/keyboard/kbdbur/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdbur/CMakeLists.txt rename to dll/keyboard/kbdbur/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdbur/kbdbur.c b/dll/keyboard/kbdbur/kbdbur.c similarity index 100% rename from reactos/dll/keyboard/kbdbur/kbdbur.c rename to dll/keyboard/kbdbur/kbdbur.c diff --git a/reactos/dll/keyboard/kbdbur/kbdbur.rbuild b/dll/keyboard/kbdbur/kbdbur.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdbur/kbdbur.rbuild rename to dll/keyboard/kbdbur/kbdbur.rbuild diff --git a/reactos/dll/keyboard/kbdbur/kbdbur.rc b/dll/keyboard/kbdbur/kbdbur.rc similarity index 100% rename from reactos/dll/keyboard/kbdbur/kbdbur.rc rename to dll/keyboard/kbdbur/kbdbur.rc diff --git a/reactos/dll/keyboard/kbdbur/kbdbur.spec b/dll/keyboard/kbdbur/kbdbur.spec similarity index 100% rename from reactos/dll/keyboard/kbdbur/kbdbur.spec rename to dll/keyboard/kbdbur/kbdbur.spec diff --git a/reactos/dll/keyboard/kbdcan/CMakeLists.txt b/dll/keyboard/kbdcan/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdcan/CMakeLists.txt rename to dll/keyboard/kbdcan/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdcan/kbdcan.c b/dll/keyboard/kbdcan/kbdcan.c similarity index 100% rename from reactos/dll/keyboard/kbdcan/kbdcan.c rename to dll/keyboard/kbdcan/kbdcan.c diff --git a/reactos/dll/keyboard/kbdcan/kbdcan.rbuild b/dll/keyboard/kbdcan/kbdcan.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdcan/kbdcan.rbuild rename to dll/keyboard/kbdcan/kbdcan.rbuild diff --git a/reactos/dll/keyboard/kbdcan/kbdcan.rc b/dll/keyboard/kbdcan/kbdcan.rc similarity index 100% rename from reactos/dll/keyboard/kbdcan/kbdcan.rc rename to dll/keyboard/kbdcan/kbdcan.rc diff --git a/reactos/dll/keyboard/kbdcan/kbdcan.spec b/dll/keyboard/kbdcan/kbdcan.spec similarity index 100% rename from reactos/dll/keyboard/kbdcan/kbdcan.spec rename to dll/keyboard/kbdcan/kbdcan.spec diff --git a/reactos/dll/keyboard/kbdcr/CMakeLists.txt b/dll/keyboard/kbdcr/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdcr/CMakeLists.txt rename to dll/keyboard/kbdcr/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdcr/kbdcr.c b/dll/keyboard/kbdcr/kbdcr.c similarity index 100% rename from reactos/dll/keyboard/kbdcr/kbdcr.c rename to dll/keyboard/kbdcr/kbdcr.c diff --git a/reactos/dll/keyboard/kbdcr/kbdcr.rbuild b/dll/keyboard/kbdcr/kbdcr.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdcr/kbdcr.rbuild rename to dll/keyboard/kbdcr/kbdcr.rbuild diff --git a/reactos/dll/keyboard/kbdcr/kbdcr.rc b/dll/keyboard/kbdcr/kbdcr.rc similarity index 100% rename from reactos/dll/keyboard/kbdcr/kbdcr.rc rename to dll/keyboard/kbdcr/kbdcr.rc diff --git a/reactos/dll/keyboard/kbdcr/kbdcr.spec b/dll/keyboard/kbdcr/kbdcr.spec similarity index 100% rename from reactos/dll/keyboard/kbdcr/kbdcr.spec rename to dll/keyboard/kbdcr/kbdcr.spec diff --git a/reactos/dll/keyboard/kbdcz/CMakeLists.txt b/dll/keyboard/kbdcz/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdcz/CMakeLists.txt rename to dll/keyboard/kbdcz/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdcz/kbdcz.c b/dll/keyboard/kbdcz/kbdcz.c similarity index 100% rename from reactos/dll/keyboard/kbdcz/kbdcz.c rename to dll/keyboard/kbdcz/kbdcz.c diff --git a/reactos/dll/keyboard/kbdcz/kbdcz.rbuild b/dll/keyboard/kbdcz/kbdcz.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdcz/kbdcz.rbuild rename to dll/keyboard/kbdcz/kbdcz.rbuild diff --git a/reactos/dll/keyboard/kbdcz/kbdcz.rc b/dll/keyboard/kbdcz/kbdcz.rc similarity index 100% rename from reactos/dll/keyboard/kbdcz/kbdcz.rc rename to dll/keyboard/kbdcz/kbdcz.rc diff --git a/reactos/dll/keyboard/kbdcz/kbdcz.spec b/dll/keyboard/kbdcz/kbdcz.spec similarity index 100% rename from reactos/dll/keyboard/kbdcz/kbdcz.spec rename to dll/keyboard/kbdcz/kbdcz.spec diff --git a/reactos/dll/keyboard/kbdcz1/CMakeLists.txt b/dll/keyboard/kbdcz1/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdcz1/CMakeLists.txt rename to dll/keyboard/kbdcz1/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdcz1/kbdcz1.c b/dll/keyboard/kbdcz1/kbdcz1.c similarity index 100% rename from reactos/dll/keyboard/kbdcz1/kbdcz1.c rename to dll/keyboard/kbdcz1/kbdcz1.c diff --git a/reactos/dll/keyboard/kbdcz1/kbdcz1.rbuild b/dll/keyboard/kbdcz1/kbdcz1.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdcz1/kbdcz1.rbuild rename to dll/keyboard/kbdcz1/kbdcz1.rbuild diff --git a/reactos/dll/keyboard/kbdcz1/kbdcz1.rc b/dll/keyboard/kbdcz1/kbdcz1.rc similarity index 100% rename from reactos/dll/keyboard/kbdcz1/kbdcz1.rc rename to dll/keyboard/kbdcz1/kbdcz1.rc diff --git a/reactos/dll/keyboard/kbdcz1/kbdcz1.spec b/dll/keyboard/kbdcz1/kbdcz1.spec similarity index 100% rename from reactos/dll/keyboard/kbdcz1/kbdcz1.spec rename to dll/keyboard/kbdcz1/kbdcz1.spec diff --git a/reactos/dll/keyboard/kbdda/CMakeLists.txt b/dll/keyboard/kbdda/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdda/CMakeLists.txt rename to dll/keyboard/kbdda/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdda/kbdda.c b/dll/keyboard/kbdda/kbdda.c similarity index 100% rename from reactos/dll/keyboard/kbdda/kbdda.c rename to dll/keyboard/kbdda/kbdda.c diff --git a/reactos/dll/keyboard/kbdda/kbdda.rbuild b/dll/keyboard/kbdda/kbdda.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdda/kbdda.rbuild rename to dll/keyboard/kbdda/kbdda.rbuild diff --git a/reactos/dll/keyboard/kbdda/kbdda.rc b/dll/keyboard/kbdda/kbdda.rc similarity index 100% rename from reactos/dll/keyboard/kbdda/kbdda.rc rename to dll/keyboard/kbdda/kbdda.rc diff --git a/reactos/dll/keyboard/kbdda/kbdda.spec b/dll/keyboard/kbdda/kbdda.spec similarity index 100% rename from reactos/dll/keyboard/kbdda/kbdda.spec rename to dll/keyboard/kbdda/kbdda.spec diff --git a/reactos/dll/keyboard/kbddv/CMakeLists.txt b/dll/keyboard/kbddv/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbddv/CMakeLists.txt rename to dll/keyboard/kbddv/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbddv/kbddv.c b/dll/keyboard/kbddv/kbddv.c similarity index 100% rename from reactos/dll/keyboard/kbddv/kbddv.c rename to dll/keyboard/kbddv/kbddv.c diff --git a/reactos/dll/keyboard/kbddv/kbddv.rbuild b/dll/keyboard/kbddv/kbddv.rbuild similarity index 100% rename from reactos/dll/keyboard/kbddv/kbddv.rbuild rename to dll/keyboard/kbddv/kbddv.rbuild diff --git a/reactos/dll/keyboard/kbddv/kbddv.rc b/dll/keyboard/kbddv/kbddv.rc similarity index 100% rename from reactos/dll/keyboard/kbddv/kbddv.rc rename to dll/keyboard/kbddv/kbddv.rc diff --git a/reactos/dll/keyboard/kbddv/kbddv.spec b/dll/keyboard/kbddv/kbddv.spec similarity index 100% rename from reactos/dll/keyboard/kbddv/kbddv.spec rename to dll/keyboard/kbddv/kbddv.spec diff --git a/reactos/dll/keyboard/kbdes/CMakeLists.txt b/dll/keyboard/kbdes/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdes/CMakeLists.txt rename to dll/keyboard/kbdes/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdes/kbdes.c b/dll/keyboard/kbdes/kbdes.c similarity index 100% rename from reactos/dll/keyboard/kbdes/kbdes.c rename to dll/keyboard/kbdes/kbdes.c diff --git a/reactos/dll/keyboard/kbdes/kbdes.rbuild b/dll/keyboard/kbdes/kbdes.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdes/kbdes.rbuild rename to dll/keyboard/kbdes/kbdes.rbuild diff --git a/reactos/dll/keyboard/kbdes/kbdes.rc b/dll/keyboard/kbdes/kbdes.rc similarity index 100% rename from reactos/dll/keyboard/kbdes/kbdes.rc rename to dll/keyboard/kbdes/kbdes.rc diff --git a/reactos/dll/keyboard/kbdes/kbdes.spec b/dll/keyboard/kbdes/kbdes.spec similarity index 100% rename from reactos/dll/keyboard/kbdes/kbdes.spec rename to dll/keyboard/kbdes/kbdes.spec diff --git a/reactos/dll/keyboard/kbdest/CMakeLists.txt b/dll/keyboard/kbdest/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdest/CMakeLists.txt rename to dll/keyboard/kbdest/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdest/kbdest.c b/dll/keyboard/kbdest/kbdest.c similarity index 100% rename from reactos/dll/keyboard/kbdest/kbdest.c rename to dll/keyboard/kbdest/kbdest.c diff --git a/reactos/dll/keyboard/kbdest/kbdest.rbuild b/dll/keyboard/kbdest/kbdest.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdest/kbdest.rbuild rename to dll/keyboard/kbdest/kbdest.rbuild diff --git a/reactos/dll/keyboard/kbdest/kbdest.rc b/dll/keyboard/kbdest/kbdest.rc similarity index 100% rename from reactos/dll/keyboard/kbdest/kbdest.rc rename to dll/keyboard/kbdest/kbdest.rc diff --git a/reactos/dll/keyboard/kbdest/kbdest.spec b/dll/keyboard/kbdest/kbdest.spec similarity index 100% rename from reactos/dll/keyboard/kbdest/kbdest.spec rename to dll/keyboard/kbdest/kbdest.spec diff --git a/reactos/dll/keyboard/kbdfc/CMakeLists.txt b/dll/keyboard/kbdfc/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdfc/CMakeLists.txt rename to dll/keyboard/kbdfc/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdfc/kbdfc.c b/dll/keyboard/kbdfc/kbdfc.c similarity index 100% rename from reactos/dll/keyboard/kbdfc/kbdfc.c rename to dll/keyboard/kbdfc/kbdfc.c diff --git a/reactos/dll/keyboard/kbdfc/kbdfc.rbuild b/dll/keyboard/kbdfc/kbdfc.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdfc/kbdfc.rbuild rename to dll/keyboard/kbdfc/kbdfc.rbuild diff --git a/reactos/dll/keyboard/kbdfc/kbdfc.rc b/dll/keyboard/kbdfc/kbdfc.rc similarity index 100% rename from reactos/dll/keyboard/kbdfc/kbdfc.rc rename to dll/keyboard/kbdfc/kbdfc.rc diff --git a/reactos/dll/keyboard/kbdfc/kbdfc.spec b/dll/keyboard/kbdfc/kbdfc.spec similarity index 100% rename from reactos/dll/keyboard/kbdfc/kbdfc.spec rename to dll/keyboard/kbdfc/kbdfc.spec diff --git a/reactos/dll/keyboard/kbdfi/CMakeLists.txt b/dll/keyboard/kbdfi/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdfi/CMakeLists.txt rename to dll/keyboard/kbdfi/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdfi/kbdfi.c b/dll/keyboard/kbdfi/kbdfi.c similarity index 100% rename from reactos/dll/keyboard/kbdfi/kbdfi.c rename to dll/keyboard/kbdfi/kbdfi.c diff --git a/reactos/dll/keyboard/kbdfi/kbdfi.rbuild b/dll/keyboard/kbdfi/kbdfi.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdfi/kbdfi.rbuild rename to dll/keyboard/kbdfi/kbdfi.rbuild diff --git a/reactos/dll/keyboard/kbdfi/kbdfi.rc b/dll/keyboard/kbdfi/kbdfi.rc similarity index 100% rename from reactos/dll/keyboard/kbdfi/kbdfi.rc rename to dll/keyboard/kbdfi/kbdfi.rc diff --git a/reactos/dll/keyboard/kbdfi/kbdfi.spec b/dll/keyboard/kbdfi/kbdfi.spec similarity index 100% rename from reactos/dll/keyboard/kbdfi/kbdfi.spec rename to dll/keyboard/kbdfi/kbdfi.spec diff --git a/reactos/dll/keyboard/kbdfr/CMakeLists.txt b/dll/keyboard/kbdfr/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdfr/CMakeLists.txt rename to dll/keyboard/kbdfr/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdfr/kbdfr.c b/dll/keyboard/kbdfr/kbdfr.c similarity index 100% rename from reactos/dll/keyboard/kbdfr/kbdfr.c rename to dll/keyboard/kbdfr/kbdfr.c diff --git a/reactos/dll/keyboard/kbdfr/kbdfr.rbuild b/dll/keyboard/kbdfr/kbdfr.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdfr/kbdfr.rbuild rename to dll/keyboard/kbdfr/kbdfr.rbuild diff --git a/reactos/dll/keyboard/kbdfr/kbdfr.rc b/dll/keyboard/kbdfr/kbdfr.rc similarity index 100% rename from reactos/dll/keyboard/kbdfr/kbdfr.rc rename to dll/keyboard/kbdfr/kbdfr.rc diff --git a/reactos/dll/keyboard/kbdfr/kbdfr.spec b/dll/keyboard/kbdfr/kbdfr.spec similarity index 100% rename from reactos/dll/keyboard/kbdfr/kbdfr.spec rename to dll/keyboard/kbdfr/kbdfr.spec diff --git a/reactos/dll/keyboard/kbdgeo/CMakeLists.txt b/dll/keyboard/kbdgeo/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdgeo/CMakeLists.txt rename to dll/keyboard/kbdgeo/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdgeo/kbdgeo.c b/dll/keyboard/kbdgeo/kbdgeo.c similarity index 100% rename from reactos/dll/keyboard/kbdgeo/kbdgeo.c rename to dll/keyboard/kbdgeo/kbdgeo.c diff --git a/reactos/dll/keyboard/kbdgeo/kbdgeo.rbuild b/dll/keyboard/kbdgeo/kbdgeo.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdgeo/kbdgeo.rbuild rename to dll/keyboard/kbdgeo/kbdgeo.rbuild diff --git a/reactos/dll/keyboard/kbdgeo/kbdgeo.rc b/dll/keyboard/kbdgeo/kbdgeo.rc similarity index 100% rename from reactos/dll/keyboard/kbdgeo/kbdgeo.rc rename to dll/keyboard/kbdgeo/kbdgeo.rc diff --git a/reactos/dll/keyboard/kbdgeo/kbdgeo.spec b/dll/keyboard/kbdgeo/kbdgeo.spec similarity index 100% rename from reactos/dll/keyboard/kbdgeo/kbdgeo.spec rename to dll/keyboard/kbdgeo/kbdgeo.spec diff --git a/reactos/dll/keyboard/kbdgerg/CMakeLists.txt b/dll/keyboard/kbdgerg/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdgerg/CMakeLists.txt rename to dll/keyboard/kbdgerg/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdgerg/kbdgerg.c b/dll/keyboard/kbdgerg/kbdgerg.c similarity index 100% rename from reactos/dll/keyboard/kbdgerg/kbdgerg.c rename to dll/keyboard/kbdgerg/kbdgerg.c diff --git a/reactos/dll/keyboard/kbdgerg/kbdgerg.rbuild b/dll/keyboard/kbdgerg/kbdgerg.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdgerg/kbdgerg.rbuild rename to dll/keyboard/kbdgerg/kbdgerg.rbuild diff --git a/reactos/dll/keyboard/kbdgerg/kbdgerg.rc b/dll/keyboard/kbdgerg/kbdgerg.rc similarity index 100% rename from reactos/dll/keyboard/kbdgerg/kbdgerg.rc rename to dll/keyboard/kbdgerg/kbdgerg.rc diff --git a/reactos/dll/keyboard/kbdgerg/kbdgerg.spec b/dll/keyboard/kbdgerg/kbdgerg.spec similarity index 100% rename from reactos/dll/keyboard/kbdgerg/kbdgerg.spec rename to dll/keyboard/kbdgerg/kbdgerg.spec diff --git a/reactos/dll/keyboard/kbdgneo/CMakeLists.txt b/dll/keyboard/kbdgneo/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdgneo/CMakeLists.txt rename to dll/keyboard/kbdgneo/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdgneo/kbdgneo.c b/dll/keyboard/kbdgneo/kbdgneo.c similarity index 100% rename from reactos/dll/keyboard/kbdgneo/kbdgneo.c rename to dll/keyboard/kbdgneo/kbdgneo.c diff --git a/reactos/dll/keyboard/kbdgneo/kbdgneo.rbuild b/dll/keyboard/kbdgneo/kbdgneo.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdgneo/kbdgneo.rbuild rename to dll/keyboard/kbdgneo/kbdgneo.rbuild diff --git a/reactos/dll/keyboard/kbdgneo/kbdgneo.rc b/dll/keyboard/kbdgneo/kbdgneo.rc similarity index 100% rename from reactos/dll/keyboard/kbdgneo/kbdgneo.rc rename to dll/keyboard/kbdgneo/kbdgneo.rc diff --git a/reactos/dll/keyboard/kbdgneo/kbdgneo.spec b/dll/keyboard/kbdgneo/kbdgneo.spec similarity index 100% rename from reactos/dll/keyboard/kbdgneo/kbdgneo.spec rename to dll/keyboard/kbdgneo/kbdgneo.spec diff --git a/reactos/dll/keyboard/kbdgr/CMakeLists.txt b/dll/keyboard/kbdgr/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdgr/CMakeLists.txt rename to dll/keyboard/kbdgr/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdgr/kbdgr.c b/dll/keyboard/kbdgr/kbdgr.c similarity index 100% rename from reactos/dll/keyboard/kbdgr/kbdgr.c rename to dll/keyboard/kbdgr/kbdgr.c diff --git a/reactos/dll/keyboard/kbdgr/kbdgr.rbuild b/dll/keyboard/kbdgr/kbdgr.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdgr/kbdgr.rbuild rename to dll/keyboard/kbdgr/kbdgr.rbuild diff --git a/reactos/dll/keyboard/kbdgr/kbdgr.rc b/dll/keyboard/kbdgr/kbdgr.rc similarity index 100% rename from reactos/dll/keyboard/kbdgr/kbdgr.rc rename to dll/keyboard/kbdgr/kbdgr.rc diff --git a/reactos/dll/keyboard/kbdgr/kbdgr.spec b/dll/keyboard/kbdgr/kbdgr.spec similarity index 100% rename from reactos/dll/keyboard/kbdgr/kbdgr.spec rename to dll/keyboard/kbdgr/kbdgr.spec diff --git a/reactos/dll/keyboard/kbdgrist/CMakeLists.txt b/dll/keyboard/kbdgrist/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdgrist/CMakeLists.txt rename to dll/keyboard/kbdgrist/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdgrist/kbdgrist.c b/dll/keyboard/kbdgrist/kbdgrist.c similarity index 100% rename from reactos/dll/keyboard/kbdgrist/kbdgrist.c rename to dll/keyboard/kbdgrist/kbdgrist.c diff --git a/reactos/dll/keyboard/kbdgrist/kbdgrist.rbuild b/dll/keyboard/kbdgrist/kbdgrist.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdgrist/kbdgrist.rbuild rename to dll/keyboard/kbdgrist/kbdgrist.rbuild diff --git a/reactos/dll/keyboard/kbdgrist/kbdgrist.rc b/dll/keyboard/kbdgrist/kbdgrist.rc similarity index 100% rename from reactos/dll/keyboard/kbdgrist/kbdgrist.rc rename to dll/keyboard/kbdgrist/kbdgrist.rc diff --git a/reactos/dll/keyboard/kbdgrist/kbdgrist.spec b/dll/keyboard/kbdgrist/kbdgrist.spec similarity index 100% rename from reactos/dll/keyboard/kbdgrist/kbdgrist.spec rename to dll/keyboard/kbdgrist/kbdgrist.spec diff --git a/reactos/dll/keyboard/kbdhe/CMakeLists.txt b/dll/keyboard/kbdhe/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdhe/CMakeLists.txt rename to dll/keyboard/kbdhe/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdhe/kbdhe.c b/dll/keyboard/kbdhe/kbdhe.c similarity index 100% rename from reactos/dll/keyboard/kbdhe/kbdhe.c rename to dll/keyboard/kbdhe/kbdhe.c diff --git a/reactos/dll/keyboard/kbdhe/kbdhe.rbuild b/dll/keyboard/kbdhe/kbdhe.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdhe/kbdhe.rbuild rename to dll/keyboard/kbdhe/kbdhe.rbuild diff --git a/reactos/dll/keyboard/kbdhe/kbdhe.rc b/dll/keyboard/kbdhe/kbdhe.rc similarity index 100% rename from reactos/dll/keyboard/kbdhe/kbdhe.rc rename to dll/keyboard/kbdhe/kbdhe.rc diff --git a/reactos/dll/keyboard/kbdhe/kbdhe.spec b/dll/keyboard/kbdhe/kbdhe.spec similarity index 100% rename from reactos/dll/keyboard/kbdhe/kbdhe.spec rename to dll/keyboard/kbdhe/kbdhe.spec diff --git a/reactos/dll/keyboard/kbdheb/CMakeLists.txt b/dll/keyboard/kbdheb/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdheb/CMakeLists.txt rename to dll/keyboard/kbdheb/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdheb/kbdheb.c b/dll/keyboard/kbdheb/kbdheb.c similarity index 100% rename from reactos/dll/keyboard/kbdheb/kbdheb.c rename to dll/keyboard/kbdheb/kbdheb.c diff --git a/reactos/dll/keyboard/kbdheb/kbdheb.rbuild b/dll/keyboard/kbdheb/kbdheb.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdheb/kbdheb.rbuild rename to dll/keyboard/kbdheb/kbdheb.rbuild diff --git a/reactos/dll/keyboard/kbdheb/kbdheb.rc b/dll/keyboard/kbdheb/kbdheb.rc similarity index 100% rename from reactos/dll/keyboard/kbdheb/kbdheb.rc rename to dll/keyboard/kbdheb/kbdheb.rc diff --git a/reactos/dll/keyboard/kbdheb/kbdheb.spec b/dll/keyboard/kbdheb/kbdheb.spec similarity index 100% rename from reactos/dll/keyboard/kbdheb/kbdheb.spec rename to dll/keyboard/kbdheb/kbdheb.spec diff --git a/reactos/dll/keyboard/kbdhu/CMakeLists.txt b/dll/keyboard/kbdhu/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdhu/CMakeLists.txt rename to dll/keyboard/kbdhu/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdhu/kbdhu.c b/dll/keyboard/kbdhu/kbdhu.c similarity index 100% rename from reactos/dll/keyboard/kbdhu/kbdhu.c rename to dll/keyboard/kbdhu/kbdhu.c diff --git a/reactos/dll/keyboard/kbdhu/kbdhu.rbuild b/dll/keyboard/kbdhu/kbdhu.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdhu/kbdhu.rbuild rename to dll/keyboard/kbdhu/kbdhu.rbuild diff --git a/reactos/dll/keyboard/kbdhu/kbdhu.rc b/dll/keyboard/kbdhu/kbdhu.rc similarity index 100% rename from reactos/dll/keyboard/kbdhu/kbdhu.rc rename to dll/keyboard/kbdhu/kbdhu.rc diff --git a/reactos/dll/keyboard/kbdhu/kbdhu.spec b/dll/keyboard/kbdhu/kbdhu.spec similarity index 100% rename from reactos/dll/keyboard/kbdhu/kbdhu.spec rename to dll/keyboard/kbdhu/kbdhu.spec diff --git a/reactos/dll/keyboard/kbdic/CMakeLists.txt b/dll/keyboard/kbdic/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdic/CMakeLists.txt rename to dll/keyboard/kbdic/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdic/kbdic.c b/dll/keyboard/kbdic/kbdic.c similarity index 100% rename from reactos/dll/keyboard/kbdic/kbdic.c rename to dll/keyboard/kbdic/kbdic.c diff --git a/reactos/dll/keyboard/kbdic/kbdic.rbuild b/dll/keyboard/kbdic/kbdic.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdic/kbdic.rbuild rename to dll/keyboard/kbdic/kbdic.rbuild diff --git a/reactos/dll/keyboard/kbdic/kbdic.rc b/dll/keyboard/kbdic/kbdic.rc similarity index 100% rename from reactos/dll/keyboard/kbdic/kbdic.rc rename to dll/keyboard/kbdic/kbdic.rc diff --git a/reactos/dll/keyboard/kbdic/kbdic.spec b/dll/keyboard/kbdic/kbdic.spec similarity index 100% rename from reactos/dll/keyboard/kbdic/kbdic.spec rename to dll/keyboard/kbdic/kbdic.spec diff --git a/reactos/dll/keyboard/kbdinasa/CMakeLists.txt b/dll/keyboard/kbdinasa/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdinasa/CMakeLists.txt rename to dll/keyboard/kbdinasa/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdinasa/kbdinasa.c b/dll/keyboard/kbdinasa/kbdinasa.c similarity index 100% rename from reactos/dll/keyboard/kbdinasa/kbdinasa.c rename to dll/keyboard/kbdinasa/kbdinasa.c diff --git a/reactos/dll/keyboard/kbdinasa/kbdinasa.rbuild b/dll/keyboard/kbdinasa/kbdinasa.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdinasa/kbdinasa.rbuild rename to dll/keyboard/kbdinasa/kbdinasa.rbuild diff --git a/reactos/dll/keyboard/kbdinasa/kbdinasa.rc b/dll/keyboard/kbdinasa/kbdinasa.rc similarity index 100% rename from reactos/dll/keyboard/kbdinasa/kbdinasa.rc rename to dll/keyboard/kbdinasa/kbdinasa.rc diff --git a/reactos/dll/keyboard/kbdinasa/kbdinasa.spec b/dll/keyboard/kbdinasa/kbdinasa.spec similarity index 100% rename from reactos/dll/keyboard/kbdinasa/kbdinasa.spec rename to dll/keyboard/kbdinasa/kbdinasa.spec diff --git a/reactos/dll/keyboard/kbdinben/CMakeLists.txt b/dll/keyboard/kbdinben/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdinben/CMakeLists.txt rename to dll/keyboard/kbdinben/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdinben/kbdinben.c b/dll/keyboard/kbdinben/kbdinben.c similarity index 100% rename from reactos/dll/keyboard/kbdinben/kbdinben.c rename to dll/keyboard/kbdinben/kbdinben.c diff --git a/reactos/dll/keyboard/kbdinben/kbdinben.rbuild b/dll/keyboard/kbdinben/kbdinben.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdinben/kbdinben.rbuild rename to dll/keyboard/kbdinben/kbdinben.rbuild diff --git a/reactos/dll/keyboard/kbdinben/kbdinben.rc b/dll/keyboard/kbdinben/kbdinben.rc similarity index 100% rename from reactos/dll/keyboard/kbdinben/kbdinben.rc rename to dll/keyboard/kbdinben/kbdinben.rc diff --git a/reactos/dll/keyboard/kbdinben/kbdinben.spec b/dll/keyboard/kbdinben/kbdinben.spec similarity index 100% rename from reactos/dll/keyboard/kbdinben/kbdinben.spec rename to dll/keyboard/kbdinben/kbdinben.spec diff --git a/reactos/dll/keyboard/kbdindev/CMakeLists.txt b/dll/keyboard/kbdindev/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdindev/CMakeLists.txt rename to dll/keyboard/kbdindev/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdindev/kbdindev.c b/dll/keyboard/kbdindev/kbdindev.c similarity index 100% rename from reactos/dll/keyboard/kbdindev/kbdindev.c rename to dll/keyboard/kbdindev/kbdindev.c diff --git a/reactos/dll/keyboard/kbdindev/kbdindev.rbuild b/dll/keyboard/kbdindev/kbdindev.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdindev/kbdindev.rbuild rename to dll/keyboard/kbdindev/kbdindev.rbuild diff --git a/reactos/dll/keyboard/kbdindev/kbdindev.rc b/dll/keyboard/kbdindev/kbdindev.rc similarity index 100% rename from reactos/dll/keyboard/kbdindev/kbdindev.rc rename to dll/keyboard/kbdindev/kbdindev.rc diff --git a/reactos/dll/keyboard/kbdindev/kbdindev.spec b/dll/keyboard/kbdindev/kbdindev.spec similarity index 100% rename from reactos/dll/keyboard/kbdindev/kbdindev.spec rename to dll/keyboard/kbdindev/kbdindev.spec diff --git a/reactos/dll/keyboard/kbdinguj/CMakeLists.txt b/dll/keyboard/kbdinguj/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdinguj/CMakeLists.txt rename to dll/keyboard/kbdinguj/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdinguj/kbdinguj.c b/dll/keyboard/kbdinguj/kbdinguj.c similarity index 100% rename from reactos/dll/keyboard/kbdinguj/kbdinguj.c rename to dll/keyboard/kbdinguj/kbdinguj.c diff --git a/reactos/dll/keyboard/kbdinguj/kbdinguj.rbuild b/dll/keyboard/kbdinguj/kbdinguj.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdinguj/kbdinguj.rbuild rename to dll/keyboard/kbdinguj/kbdinguj.rbuild diff --git a/reactos/dll/keyboard/kbdinguj/kbdinguj.rc b/dll/keyboard/kbdinguj/kbdinguj.rc similarity index 100% rename from reactos/dll/keyboard/kbdinguj/kbdinguj.rc rename to dll/keyboard/kbdinguj/kbdinguj.rc diff --git a/reactos/dll/keyboard/kbdinguj/kbdinguj.spec b/dll/keyboard/kbdinguj/kbdinguj.spec similarity index 100% rename from reactos/dll/keyboard/kbdinguj/kbdinguj.spec rename to dll/keyboard/kbdinguj/kbdinguj.spec diff --git a/reactos/dll/keyboard/kbdinmal/CMakeLists.txt b/dll/keyboard/kbdinmal/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdinmal/CMakeLists.txt rename to dll/keyboard/kbdinmal/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdinmal/kbdinmal.c b/dll/keyboard/kbdinmal/kbdinmal.c similarity index 100% rename from reactos/dll/keyboard/kbdinmal/kbdinmal.c rename to dll/keyboard/kbdinmal/kbdinmal.c diff --git a/reactos/dll/keyboard/kbdinmal/kbdinmal.rbuild b/dll/keyboard/kbdinmal/kbdinmal.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdinmal/kbdinmal.rbuild rename to dll/keyboard/kbdinmal/kbdinmal.rbuild diff --git a/reactos/dll/keyboard/kbdinmal/kbdinmal.rc b/dll/keyboard/kbdinmal/kbdinmal.rc similarity index 100% rename from reactos/dll/keyboard/kbdinmal/kbdinmal.rc rename to dll/keyboard/kbdinmal/kbdinmal.rc diff --git a/reactos/dll/keyboard/kbdinmal/kbdinmal.spec b/dll/keyboard/kbdinmal/kbdinmal.spec similarity index 100% rename from reactos/dll/keyboard/kbdinmal/kbdinmal.spec rename to dll/keyboard/kbdinmal/kbdinmal.spec diff --git a/reactos/dll/keyboard/kbdir/CMakeLists.txt b/dll/keyboard/kbdir/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdir/CMakeLists.txt rename to dll/keyboard/kbdir/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdir/kbdir.c b/dll/keyboard/kbdir/kbdir.c similarity index 100% rename from reactos/dll/keyboard/kbdir/kbdir.c rename to dll/keyboard/kbdir/kbdir.c diff --git a/reactos/dll/keyboard/kbdir/kbdir.rbuild b/dll/keyboard/kbdir/kbdir.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdir/kbdir.rbuild rename to dll/keyboard/kbdir/kbdir.rbuild diff --git a/reactos/dll/keyboard/kbdir/kbdir.rc b/dll/keyboard/kbdir/kbdir.rc similarity index 100% rename from reactos/dll/keyboard/kbdir/kbdir.rc rename to dll/keyboard/kbdir/kbdir.rc diff --git a/reactos/dll/keyboard/kbdir/kbdir.spec b/dll/keyboard/kbdir/kbdir.spec similarity index 100% rename from reactos/dll/keyboard/kbdir/kbdir.spec rename to dll/keyboard/kbdir/kbdir.spec diff --git a/reactos/dll/keyboard/kbdit/CMakeLists.txt b/dll/keyboard/kbdit/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdit/CMakeLists.txt rename to dll/keyboard/kbdit/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdit/kbdit.c b/dll/keyboard/kbdit/kbdit.c similarity index 100% rename from reactos/dll/keyboard/kbdit/kbdit.c rename to dll/keyboard/kbdit/kbdit.c diff --git a/reactos/dll/keyboard/kbdit/kbdit.rbuild b/dll/keyboard/kbdit/kbdit.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdit/kbdit.rbuild rename to dll/keyboard/kbdit/kbdit.rbuild diff --git a/reactos/dll/keyboard/kbdit/kbdit.rc b/dll/keyboard/kbdit/kbdit.rc similarity index 100% rename from reactos/dll/keyboard/kbdit/kbdit.rc rename to dll/keyboard/kbdit/kbdit.rc diff --git a/reactos/dll/keyboard/kbdit/kbdit.spec b/dll/keyboard/kbdit/kbdit.spec similarity index 100% rename from reactos/dll/keyboard/kbdit/kbdit.spec rename to dll/keyboard/kbdit/kbdit.spec diff --git a/reactos/dll/keyboard/kbdja/CMakeLists.txt b/dll/keyboard/kbdja/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdja/CMakeLists.txt rename to dll/keyboard/kbdja/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdja/kbdja.c b/dll/keyboard/kbdja/kbdja.c similarity index 100% rename from reactos/dll/keyboard/kbdja/kbdja.c rename to dll/keyboard/kbdja/kbdja.c diff --git a/reactos/dll/keyboard/kbdja/kbdja.rbuild b/dll/keyboard/kbdja/kbdja.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdja/kbdja.rbuild rename to dll/keyboard/kbdja/kbdja.rbuild diff --git a/reactos/dll/keyboard/kbdja/kbdja.rc b/dll/keyboard/kbdja/kbdja.rc similarity index 100% rename from reactos/dll/keyboard/kbdja/kbdja.rc rename to dll/keyboard/kbdja/kbdja.rc diff --git a/reactos/dll/keyboard/kbdja/kbdja.spec b/dll/keyboard/kbdja/kbdja.spec similarity index 100% rename from reactos/dll/keyboard/kbdja/kbdja.spec rename to dll/keyboard/kbdja/kbdja.spec diff --git a/reactos/dll/keyboard/kbdkaz/CMakeLists.txt b/dll/keyboard/kbdkaz/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdkaz/CMakeLists.txt rename to dll/keyboard/kbdkaz/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdkaz/kbdkaz.c b/dll/keyboard/kbdkaz/kbdkaz.c similarity index 100% rename from reactos/dll/keyboard/kbdkaz/kbdkaz.c rename to dll/keyboard/kbdkaz/kbdkaz.c diff --git a/reactos/dll/keyboard/kbdkaz/kbdkaz.rbuild b/dll/keyboard/kbdkaz/kbdkaz.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdkaz/kbdkaz.rbuild rename to dll/keyboard/kbdkaz/kbdkaz.rbuild diff --git a/reactos/dll/keyboard/kbdkaz/kbdkaz.rc b/dll/keyboard/kbdkaz/kbdkaz.rc similarity index 100% rename from reactos/dll/keyboard/kbdkaz/kbdkaz.rc rename to dll/keyboard/kbdkaz/kbdkaz.rc diff --git a/reactos/dll/keyboard/kbdkaz/kbdkaz.spec b/dll/keyboard/kbdkaz/kbdkaz.spec similarity index 100% rename from reactos/dll/keyboard/kbdkaz/kbdkaz.spec rename to dll/keyboard/kbdkaz/kbdkaz.spec diff --git a/reactos/dll/keyboard/kbdko/CMakeLists.txt b/dll/keyboard/kbdko/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdko/CMakeLists.txt rename to dll/keyboard/kbdko/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdko/kbdko.c b/dll/keyboard/kbdko/kbdko.c similarity index 100% rename from reactos/dll/keyboard/kbdko/kbdko.c rename to dll/keyboard/kbdko/kbdko.c diff --git a/reactos/dll/keyboard/kbdko/kbdko.rbuild b/dll/keyboard/kbdko/kbdko.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdko/kbdko.rbuild rename to dll/keyboard/kbdko/kbdko.rbuild diff --git a/reactos/dll/keyboard/kbdko/kbdko.rc b/dll/keyboard/kbdko/kbdko.rc similarity index 100% rename from reactos/dll/keyboard/kbdko/kbdko.rc rename to dll/keyboard/kbdko/kbdko.rc diff --git a/reactos/dll/keyboard/kbdko/kbdko.spec b/dll/keyboard/kbdko/kbdko.spec similarity index 100% rename from reactos/dll/keyboard/kbdko/kbdko.spec rename to dll/keyboard/kbdko/kbdko.spec diff --git a/reactos/dll/keyboard/kbdla/CMakeLists.txt b/dll/keyboard/kbdla/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdla/CMakeLists.txt rename to dll/keyboard/kbdla/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdla/kbdla.c b/dll/keyboard/kbdla/kbdla.c similarity index 100% rename from reactos/dll/keyboard/kbdla/kbdla.c rename to dll/keyboard/kbdla/kbdla.c diff --git a/reactos/dll/keyboard/kbdla/kbdla.rbuild b/dll/keyboard/kbdla/kbdla.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdla/kbdla.rbuild rename to dll/keyboard/kbdla/kbdla.rbuild diff --git a/reactos/dll/keyboard/kbdla/kbdla.rc b/dll/keyboard/kbdla/kbdla.rc similarity index 100% rename from reactos/dll/keyboard/kbdla/kbdla.rc rename to dll/keyboard/kbdla/kbdla.rc diff --git a/reactos/dll/keyboard/kbdla/kbdla.spec b/dll/keyboard/kbdla/kbdla.spec similarity index 100% rename from reactos/dll/keyboard/kbdla/kbdla.spec rename to dll/keyboard/kbdla/kbdla.spec diff --git a/reactos/dll/keyboard/kbdlt1/CMakeLists.txt b/dll/keyboard/kbdlt1/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdlt1/CMakeLists.txt rename to dll/keyboard/kbdlt1/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdlt1/kbdlt1.c b/dll/keyboard/kbdlt1/kbdlt1.c similarity index 100% rename from reactos/dll/keyboard/kbdlt1/kbdlt1.c rename to dll/keyboard/kbdlt1/kbdlt1.c diff --git a/reactos/dll/keyboard/kbdlt1/kbdlt1.rbuild b/dll/keyboard/kbdlt1/kbdlt1.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdlt1/kbdlt1.rbuild rename to dll/keyboard/kbdlt1/kbdlt1.rbuild diff --git a/reactos/dll/keyboard/kbdlt1/kbdlt1.rc b/dll/keyboard/kbdlt1/kbdlt1.rc similarity index 100% rename from reactos/dll/keyboard/kbdlt1/kbdlt1.rc rename to dll/keyboard/kbdlt1/kbdlt1.rc diff --git a/reactos/dll/keyboard/kbdlt1/kbdlt1.spec b/dll/keyboard/kbdlt1/kbdlt1.spec similarity index 100% rename from reactos/dll/keyboard/kbdlt1/kbdlt1.spec rename to dll/keyboard/kbdlt1/kbdlt1.spec diff --git a/reactos/dll/keyboard/kbdlv/CMakeLists.txt b/dll/keyboard/kbdlv/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdlv/CMakeLists.txt rename to dll/keyboard/kbdlv/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdlv/kbdlv.c b/dll/keyboard/kbdlv/kbdlv.c similarity index 100% rename from reactos/dll/keyboard/kbdlv/kbdlv.c rename to dll/keyboard/kbdlv/kbdlv.c diff --git a/reactos/dll/keyboard/kbdlv/kbdlv.rbuild b/dll/keyboard/kbdlv/kbdlv.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdlv/kbdlv.rbuild rename to dll/keyboard/kbdlv/kbdlv.rbuild diff --git a/reactos/dll/keyboard/kbdlv/kbdlv.rc b/dll/keyboard/kbdlv/kbdlv.rc similarity index 100% rename from reactos/dll/keyboard/kbdlv/kbdlv.rc rename to dll/keyboard/kbdlv/kbdlv.rc diff --git a/reactos/dll/keyboard/kbdlv/kbdlv.spec b/dll/keyboard/kbdlv/kbdlv.spec similarity index 100% rename from reactos/dll/keyboard/kbdlv/kbdlv.spec rename to dll/keyboard/kbdlv/kbdlv.spec diff --git a/reactos/dll/keyboard/kbdmac/CMakeLists.txt b/dll/keyboard/kbdmac/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdmac/CMakeLists.txt rename to dll/keyboard/kbdmac/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdmac/kbdmac.c b/dll/keyboard/kbdmac/kbdmac.c similarity index 100% rename from reactos/dll/keyboard/kbdmac/kbdmac.c rename to dll/keyboard/kbdmac/kbdmac.c diff --git a/reactos/dll/keyboard/kbdmac/kbdmac.rbuild b/dll/keyboard/kbdmac/kbdmac.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdmac/kbdmac.rbuild rename to dll/keyboard/kbdmac/kbdmac.rbuild diff --git a/reactos/dll/keyboard/kbdmac/kbdmac.rc b/dll/keyboard/kbdmac/kbdmac.rc similarity index 100% rename from reactos/dll/keyboard/kbdmac/kbdmac.rc rename to dll/keyboard/kbdmac/kbdmac.rc diff --git a/reactos/dll/keyboard/kbdmac/kbdmac.spec b/dll/keyboard/kbdmac/kbdmac.spec similarity index 100% rename from reactos/dll/keyboard/kbdmac/kbdmac.spec rename to dll/keyboard/kbdmac/kbdmac.spec diff --git a/reactos/dll/keyboard/kbdne/CMakeLists.txt b/dll/keyboard/kbdne/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdne/CMakeLists.txt rename to dll/keyboard/kbdne/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdne/kbdne.c b/dll/keyboard/kbdne/kbdne.c similarity index 100% rename from reactos/dll/keyboard/kbdne/kbdne.c rename to dll/keyboard/kbdne/kbdne.c diff --git a/reactos/dll/keyboard/kbdne/kbdne.rbuild b/dll/keyboard/kbdne/kbdne.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdne/kbdne.rbuild rename to dll/keyboard/kbdne/kbdne.rbuild diff --git a/reactos/dll/keyboard/kbdne/kbdne.rc b/dll/keyboard/kbdne/kbdne.rc similarity index 100% rename from reactos/dll/keyboard/kbdne/kbdne.rc rename to dll/keyboard/kbdne/kbdne.rc diff --git a/reactos/dll/keyboard/kbdne/kbdne.spec b/dll/keyboard/kbdne/kbdne.spec similarity index 100% rename from reactos/dll/keyboard/kbdne/kbdne.spec rename to dll/keyboard/kbdne/kbdne.spec diff --git a/reactos/dll/keyboard/kbdno/CMakeLists.txt b/dll/keyboard/kbdno/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdno/CMakeLists.txt rename to dll/keyboard/kbdno/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdno/kbdno.c b/dll/keyboard/kbdno/kbdno.c similarity index 100% rename from reactos/dll/keyboard/kbdno/kbdno.c rename to dll/keyboard/kbdno/kbdno.c diff --git a/reactos/dll/keyboard/kbdno/kbdno.rbuild b/dll/keyboard/kbdno/kbdno.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdno/kbdno.rbuild rename to dll/keyboard/kbdno/kbdno.rbuild diff --git a/reactos/dll/keyboard/kbdno/kbdno.rc b/dll/keyboard/kbdno/kbdno.rc similarity index 100% rename from reactos/dll/keyboard/kbdno/kbdno.rc rename to dll/keyboard/kbdno/kbdno.rc diff --git a/reactos/dll/keyboard/kbdno/kbdno.spec b/dll/keyboard/kbdno/kbdno.spec similarity index 100% rename from reactos/dll/keyboard/kbdno/kbdno.spec rename to dll/keyboard/kbdno/kbdno.spec diff --git a/reactos/dll/keyboard/kbdpl/CMakeLists.txt b/dll/keyboard/kbdpl/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdpl/CMakeLists.txt rename to dll/keyboard/kbdpl/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdpl/kbdpl.c b/dll/keyboard/kbdpl/kbdpl.c similarity index 100% rename from reactos/dll/keyboard/kbdpl/kbdpl.c rename to dll/keyboard/kbdpl/kbdpl.c diff --git a/reactos/dll/keyboard/kbdpl/kbdpl.rbuild b/dll/keyboard/kbdpl/kbdpl.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdpl/kbdpl.rbuild rename to dll/keyboard/kbdpl/kbdpl.rbuild diff --git a/reactos/dll/keyboard/kbdpl/kbdpl.rc b/dll/keyboard/kbdpl/kbdpl.rc similarity index 100% rename from reactos/dll/keyboard/kbdpl/kbdpl.rc rename to dll/keyboard/kbdpl/kbdpl.rc diff --git a/reactos/dll/keyboard/kbdpl/kbdpl.spec b/dll/keyboard/kbdpl/kbdpl.spec similarity index 100% rename from reactos/dll/keyboard/kbdpl/kbdpl.spec rename to dll/keyboard/kbdpl/kbdpl.spec diff --git a/reactos/dll/keyboard/kbdpl1/CMakeLists.txt b/dll/keyboard/kbdpl1/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdpl1/CMakeLists.txt rename to dll/keyboard/kbdpl1/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdpl1/kbdpl1.c b/dll/keyboard/kbdpl1/kbdpl1.c similarity index 100% rename from reactos/dll/keyboard/kbdpl1/kbdpl1.c rename to dll/keyboard/kbdpl1/kbdpl1.c diff --git a/reactos/dll/keyboard/kbdpl1/kbdpl1.rbuild b/dll/keyboard/kbdpl1/kbdpl1.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdpl1/kbdpl1.rbuild rename to dll/keyboard/kbdpl1/kbdpl1.rbuild diff --git a/reactos/dll/keyboard/kbdpl1/kbdpl1.rc b/dll/keyboard/kbdpl1/kbdpl1.rc similarity index 100% rename from reactos/dll/keyboard/kbdpl1/kbdpl1.rc rename to dll/keyboard/kbdpl1/kbdpl1.rc diff --git a/reactos/dll/keyboard/kbdpl1/kbdpl1.spec b/dll/keyboard/kbdpl1/kbdpl1.spec similarity index 100% rename from reactos/dll/keyboard/kbdpl1/kbdpl1.spec rename to dll/keyboard/kbdpl1/kbdpl1.spec diff --git a/reactos/dll/keyboard/kbdpo/CMakeLists.txt b/dll/keyboard/kbdpo/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdpo/CMakeLists.txt rename to dll/keyboard/kbdpo/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdpo/kbdpo.c b/dll/keyboard/kbdpo/kbdpo.c similarity index 100% rename from reactos/dll/keyboard/kbdpo/kbdpo.c rename to dll/keyboard/kbdpo/kbdpo.c diff --git a/reactos/dll/keyboard/kbdpo/kbdpo.rbuild b/dll/keyboard/kbdpo/kbdpo.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdpo/kbdpo.rbuild rename to dll/keyboard/kbdpo/kbdpo.rbuild diff --git a/reactos/dll/keyboard/kbdpo/kbdpo.rc b/dll/keyboard/kbdpo/kbdpo.rc similarity index 100% rename from reactos/dll/keyboard/kbdpo/kbdpo.rc rename to dll/keyboard/kbdpo/kbdpo.rc diff --git a/reactos/dll/keyboard/kbdpo/kbdpo.spec b/dll/keyboard/kbdpo/kbdpo.spec similarity index 100% rename from reactos/dll/keyboard/kbdpo/kbdpo.spec rename to dll/keyboard/kbdpo/kbdpo.spec diff --git a/reactos/dll/keyboard/kbdro/CMakeLists.txt b/dll/keyboard/kbdro/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdro/CMakeLists.txt rename to dll/keyboard/kbdro/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdro/kbdro.c b/dll/keyboard/kbdro/kbdro.c similarity index 100% rename from reactos/dll/keyboard/kbdro/kbdro.c rename to dll/keyboard/kbdro/kbdro.c diff --git a/reactos/dll/keyboard/kbdro/kbdro.rbuild b/dll/keyboard/kbdro/kbdro.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdro/kbdro.rbuild rename to dll/keyboard/kbdro/kbdro.rbuild diff --git a/reactos/dll/keyboard/kbdro/kbdro.rc b/dll/keyboard/kbdro/kbdro.rc similarity index 100% rename from reactos/dll/keyboard/kbdro/kbdro.rc rename to dll/keyboard/kbdro/kbdro.rc diff --git a/reactos/dll/keyboard/kbdro/kbdro.spec b/dll/keyboard/kbdro/kbdro.spec similarity index 100% rename from reactos/dll/keyboard/kbdro/kbdro.spec rename to dll/keyboard/kbdro/kbdro.spec diff --git a/reactos/dll/keyboard/kbdru/CMakeLists.txt b/dll/keyboard/kbdru/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdru/CMakeLists.txt rename to dll/keyboard/kbdru/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdru/kbdru.c b/dll/keyboard/kbdru/kbdru.c similarity index 100% rename from reactos/dll/keyboard/kbdru/kbdru.c rename to dll/keyboard/kbdru/kbdru.c diff --git a/reactos/dll/keyboard/kbdru/kbdru.rbuild b/dll/keyboard/kbdru/kbdru.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdru/kbdru.rbuild rename to dll/keyboard/kbdru/kbdru.rbuild diff --git a/reactos/dll/keyboard/kbdru/kbdru.rc b/dll/keyboard/kbdru/kbdru.rc similarity index 100% rename from reactos/dll/keyboard/kbdru/kbdru.rc rename to dll/keyboard/kbdru/kbdru.rc diff --git a/reactos/dll/keyboard/kbdru/kbdru.spec b/dll/keyboard/kbdru/kbdru.spec similarity index 100% rename from reactos/dll/keyboard/kbdru/kbdru.spec rename to dll/keyboard/kbdru/kbdru.spec diff --git a/reactos/dll/keyboard/kbdru1/CMakeLists.txt b/dll/keyboard/kbdru1/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdru1/CMakeLists.txt rename to dll/keyboard/kbdru1/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdru1/kbdru1.c b/dll/keyboard/kbdru1/kbdru1.c similarity index 100% rename from reactos/dll/keyboard/kbdru1/kbdru1.c rename to dll/keyboard/kbdru1/kbdru1.c diff --git a/reactos/dll/keyboard/kbdru1/kbdru1.rbuild b/dll/keyboard/kbdru1/kbdru1.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdru1/kbdru1.rbuild rename to dll/keyboard/kbdru1/kbdru1.rbuild diff --git a/reactos/dll/keyboard/kbdru1/kbdru1.rc b/dll/keyboard/kbdru1/kbdru1.rc similarity index 100% rename from reactos/dll/keyboard/kbdru1/kbdru1.rc rename to dll/keyboard/kbdru1/kbdru1.rc diff --git a/reactos/dll/keyboard/kbdru1/kbdru1.spec b/dll/keyboard/kbdru1/kbdru1.spec similarity index 100% rename from reactos/dll/keyboard/kbdru1/kbdru1.spec rename to dll/keyboard/kbdru1/kbdru1.spec diff --git a/reactos/dll/keyboard/kbdsg/CMakeLists.txt b/dll/keyboard/kbdsg/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdsg/CMakeLists.txt rename to dll/keyboard/kbdsg/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdsg/kbdsg.c b/dll/keyboard/kbdsg/kbdsg.c similarity index 100% rename from reactos/dll/keyboard/kbdsg/kbdsg.c rename to dll/keyboard/kbdsg/kbdsg.c diff --git a/reactos/dll/keyboard/kbdsg/kbdsg.rbuild b/dll/keyboard/kbdsg/kbdsg.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdsg/kbdsg.rbuild rename to dll/keyboard/kbdsg/kbdsg.rbuild diff --git a/reactos/dll/keyboard/kbdsg/kbdsg.rc b/dll/keyboard/kbdsg/kbdsg.rc similarity index 100% rename from reactos/dll/keyboard/kbdsg/kbdsg.rc rename to dll/keyboard/kbdsg/kbdsg.rc diff --git a/reactos/dll/keyboard/kbdsg/kbdsg.spec b/dll/keyboard/kbdsg/kbdsg.spec similarity index 100% rename from reactos/dll/keyboard/kbdsg/kbdsg.spec rename to dll/keyboard/kbdsg/kbdsg.spec diff --git a/reactos/dll/keyboard/kbdsk/CMakeLists.txt b/dll/keyboard/kbdsk/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdsk/CMakeLists.txt rename to dll/keyboard/kbdsk/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdsk/kbdsk.c b/dll/keyboard/kbdsk/kbdsk.c similarity index 100% rename from reactos/dll/keyboard/kbdsk/kbdsk.c rename to dll/keyboard/kbdsk/kbdsk.c diff --git a/reactos/dll/keyboard/kbdsk/kbdsk.rbuild b/dll/keyboard/kbdsk/kbdsk.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdsk/kbdsk.rbuild rename to dll/keyboard/kbdsk/kbdsk.rbuild diff --git a/reactos/dll/keyboard/kbdsk/kbdsk.rc b/dll/keyboard/kbdsk/kbdsk.rc similarity index 100% rename from reactos/dll/keyboard/kbdsk/kbdsk.rc rename to dll/keyboard/kbdsk/kbdsk.rc diff --git a/reactos/dll/keyboard/kbdsk/kbdsk.spec b/dll/keyboard/kbdsk/kbdsk.spec similarity index 100% rename from reactos/dll/keyboard/kbdsk/kbdsk.spec rename to dll/keyboard/kbdsk/kbdsk.spec diff --git a/reactos/dll/keyboard/kbdsk1/CMakeLists.txt b/dll/keyboard/kbdsk1/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdsk1/CMakeLists.txt rename to dll/keyboard/kbdsk1/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdsk1/kbdsk1.c b/dll/keyboard/kbdsk1/kbdsk1.c similarity index 100% rename from reactos/dll/keyboard/kbdsk1/kbdsk1.c rename to dll/keyboard/kbdsk1/kbdsk1.c diff --git a/reactos/dll/keyboard/kbdsk1/kbdsk1.rbuild b/dll/keyboard/kbdsk1/kbdsk1.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdsk1/kbdsk1.rbuild rename to dll/keyboard/kbdsk1/kbdsk1.rbuild diff --git a/reactos/dll/keyboard/kbdsk1/kbdsk1.rc b/dll/keyboard/kbdsk1/kbdsk1.rc similarity index 100% rename from reactos/dll/keyboard/kbdsk1/kbdsk1.rc rename to dll/keyboard/kbdsk1/kbdsk1.rc diff --git a/reactos/dll/keyboard/kbdsk1/kbdsk1.spec b/dll/keyboard/kbdsk1/kbdsk1.spec similarity index 100% rename from reactos/dll/keyboard/kbdsk1/kbdsk1.spec rename to dll/keyboard/kbdsk1/kbdsk1.spec diff --git a/reactos/dll/keyboard/kbdsw/CMakeLists.txt b/dll/keyboard/kbdsw/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdsw/CMakeLists.txt rename to dll/keyboard/kbdsw/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdsw/kbdsw.c b/dll/keyboard/kbdsw/kbdsw.c similarity index 100% rename from reactos/dll/keyboard/kbdsw/kbdsw.c rename to dll/keyboard/kbdsw/kbdsw.c diff --git a/reactos/dll/keyboard/kbdsw/kbdsw.rbuild b/dll/keyboard/kbdsw/kbdsw.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdsw/kbdsw.rbuild rename to dll/keyboard/kbdsw/kbdsw.rbuild diff --git a/reactos/dll/keyboard/kbdsw/kbdsw.rc b/dll/keyboard/kbdsw/kbdsw.rc similarity index 100% rename from reactos/dll/keyboard/kbdsw/kbdsw.rc rename to dll/keyboard/kbdsw/kbdsw.rc diff --git a/reactos/dll/keyboard/kbdsw/kbdsw.spec b/dll/keyboard/kbdsw/kbdsw.spec similarity index 100% rename from reactos/dll/keyboard/kbdsw/kbdsw.spec rename to dll/keyboard/kbdsw/kbdsw.spec diff --git a/reactos/dll/keyboard/kbdtat/CMakeLists.txt b/dll/keyboard/kbdtat/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdtat/CMakeLists.txt rename to dll/keyboard/kbdtat/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdtat/kbdtat.c b/dll/keyboard/kbdtat/kbdtat.c similarity index 100% rename from reactos/dll/keyboard/kbdtat/kbdtat.c rename to dll/keyboard/kbdtat/kbdtat.c diff --git a/reactos/dll/keyboard/kbdtat/kbdtat.rbuild b/dll/keyboard/kbdtat/kbdtat.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdtat/kbdtat.rbuild rename to dll/keyboard/kbdtat/kbdtat.rbuild diff --git a/reactos/dll/keyboard/kbdtat/kbdtat.rc b/dll/keyboard/kbdtat/kbdtat.rc similarity index 100% rename from reactos/dll/keyboard/kbdtat/kbdtat.rc rename to dll/keyboard/kbdtat/kbdtat.rc diff --git a/reactos/dll/keyboard/kbdtat/kbdtat.spec b/dll/keyboard/kbdtat/kbdtat.spec similarity index 100% rename from reactos/dll/keyboard/kbdtat/kbdtat.spec rename to dll/keyboard/kbdtat/kbdtat.spec diff --git a/reactos/dll/keyboard/kbdth0/CMakeLists.txt b/dll/keyboard/kbdth0/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdth0/CMakeLists.txt rename to dll/keyboard/kbdth0/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdth0/kbdth0.c b/dll/keyboard/kbdth0/kbdth0.c similarity index 100% rename from reactos/dll/keyboard/kbdth0/kbdth0.c rename to dll/keyboard/kbdth0/kbdth0.c diff --git a/reactos/dll/keyboard/kbdth0/kbdth0.rbuild b/dll/keyboard/kbdth0/kbdth0.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdth0/kbdth0.rbuild rename to dll/keyboard/kbdth0/kbdth0.rbuild diff --git a/reactos/dll/keyboard/kbdth0/kbdth0.rc b/dll/keyboard/kbdth0/kbdth0.rc similarity index 100% rename from reactos/dll/keyboard/kbdth0/kbdth0.rc rename to dll/keyboard/kbdth0/kbdth0.rc diff --git a/reactos/dll/keyboard/kbdth0/kbdth0.spec b/dll/keyboard/kbdth0/kbdth0.spec similarity index 100% rename from reactos/dll/keyboard/kbdth0/kbdth0.spec rename to dll/keyboard/kbdth0/kbdth0.spec diff --git a/reactos/dll/keyboard/kbdth1/CMakeLists.txt b/dll/keyboard/kbdth1/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdth1/CMakeLists.txt rename to dll/keyboard/kbdth1/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdth1/kbdth1.c b/dll/keyboard/kbdth1/kbdth1.c similarity index 100% rename from reactos/dll/keyboard/kbdth1/kbdth1.c rename to dll/keyboard/kbdth1/kbdth1.c diff --git a/reactos/dll/keyboard/kbdth1/kbdth1.rbuild b/dll/keyboard/kbdth1/kbdth1.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdth1/kbdth1.rbuild rename to dll/keyboard/kbdth1/kbdth1.rbuild diff --git a/reactos/dll/keyboard/kbdth1/kbdth1.rc b/dll/keyboard/kbdth1/kbdth1.rc similarity index 100% rename from reactos/dll/keyboard/kbdth1/kbdth1.rc rename to dll/keyboard/kbdth1/kbdth1.rc diff --git a/reactos/dll/keyboard/kbdth1/kbdth1.spec b/dll/keyboard/kbdth1/kbdth1.spec similarity index 100% rename from reactos/dll/keyboard/kbdth1/kbdth1.spec rename to dll/keyboard/kbdth1/kbdth1.spec diff --git a/reactos/dll/keyboard/kbdth2/CMakeLists.txt b/dll/keyboard/kbdth2/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdth2/CMakeLists.txt rename to dll/keyboard/kbdth2/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdth2/kbdth2.c b/dll/keyboard/kbdth2/kbdth2.c similarity index 100% rename from reactos/dll/keyboard/kbdth2/kbdth2.c rename to dll/keyboard/kbdth2/kbdth2.c diff --git a/reactos/dll/keyboard/kbdth2/kbdth2.rbuild b/dll/keyboard/kbdth2/kbdth2.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdth2/kbdth2.rbuild rename to dll/keyboard/kbdth2/kbdth2.rbuild diff --git a/reactos/dll/keyboard/kbdth2/kbdth2.rc b/dll/keyboard/kbdth2/kbdth2.rc similarity index 100% rename from reactos/dll/keyboard/kbdth2/kbdth2.rc rename to dll/keyboard/kbdth2/kbdth2.rc diff --git a/reactos/dll/keyboard/kbdth2/kbdth2.spec b/dll/keyboard/kbdth2/kbdth2.spec similarity index 100% rename from reactos/dll/keyboard/kbdth2/kbdth2.spec rename to dll/keyboard/kbdth2/kbdth2.spec diff --git a/reactos/dll/keyboard/kbdth3/CMakeLists.txt b/dll/keyboard/kbdth3/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdth3/CMakeLists.txt rename to dll/keyboard/kbdth3/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdth3/kbdth3.c b/dll/keyboard/kbdth3/kbdth3.c similarity index 100% rename from reactos/dll/keyboard/kbdth3/kbdth3.c rename to dll/keyboard/kbdth3/kbdth3.c diff --git a/reactos/dll/keyboard/kbdth3/kbdth3.rbuild b/dll/keyboard/kbdth3/kbdth3.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdth3/kbdth3.rbuild rename to dll/keyboard/kbdth3/kbdth3.rbuild diff --git a/reactos/dll/keyboard/kbdth3/kbdth3.rc b/dll/keyboard/kbdth3/kbdth3.rc similarity index 100% rename from reactos/dll/keyboard/kbdth3/kbdth3.rc rename to dll/keyboard/kbdth3/kbdth3.rc diff --git a/reactos/dll/keyboard/kbdth3/kbdth3.spec b/dll/keyboard/kbdth3/kbdth3.spec similarity index 100% rename from reactos/dll/keyboard/kbdth3/kbdth3.spec rename to dll/keyboard/kbdth3/kbdth3.spec diff --git a/reactos/dll/keyboard/kbdtuf/CMakeLists.txt b/dll/keyboard/kbdtuf/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdtuf/CMakeLists.txt rename to dll/keyboard/kbdtuf/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdtuf/kbdtuf.c b/dll/keyboard/kbdtuf/kbdtuf.c similarity index 100% rename from reactos/dll/keyboard/kbdtuf/kbdtuf.c rename to dll/keyboard/kbdtuf/kbdtuf.c diff --git a/reactos/dll/keyboard/kbdtuf/kbdtuf.rbuild b/dll/keyboard/kbdtuf/kbdtuf.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdtuf/kbdtuf.rbuild rename to dll/keyboard/kbdtuf/kbdtuf.rbuild diff --git a/reactos/dll/keyboard/kbdtuf/kbdtuf.rc b/dll/keyboard/kbdtuf/kbdtuf.rc similarity index 100% rename from reactos/dll/keyboard/kbdtuf/kbdtuf.rc rename to dll/keyboard/kbdtuf/kbdtuf.rc diff --git a/reactos/dll/keyboard/kbdtuf/kbdtuf.spec b/dll/keyboard/kbdtuf/kbdtuf.spec similarity index 100% rename from reactos/dll/keyboard/kbdtuf/kbdtuf.spec rename to dll/keyboard/kbdtuf/kbdtuf.spec diff --git a/reactos/dll/keyboard/kbdtuq/CMakeLists.txt b/dll/keyboard/kbdtuq/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdtuq/CMakeLists.txt rename to dll/keyboard/kbdtuq/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdtuq/kbdtuq.c b/dll/keyboard/kbdtuq/kbdtuq.c similarity index 100% rename from reactos/dll/keyboard/kbdtuq/kbdtuq.c rename to dll/keyboard/kbdtuq/kbdtuq.c diff --git a/reactos/dll/keyboard/kbdtuq/kbdtuq.rbuild b/dll/keyboard/kbdtuq/kbdtuq.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdtuq/kbdtuq.rbuild rename to dll/keyboard/kbdtuq/kbdtuq.rbuild diff --git a/reactos/dll/keyboard/kbdtuq/kbdtuq.rc b/dll/keyboard/kbdtuq/kbdtuq.rc similarity index 100% rename from reactos/dll/keyboard/kbdtuq/kbdtuq.rc rename to dll/keyboard/kbdtuq/kbdtuq.rc diff --git a/reactos/dll/keyboard/kbdtuq/kbdtuq.spec b/dll/keyboard/kbdtuq/kbdtuq.spec similarity index 100% rename from reactos/dll/keyboard/kbdtuq/kbdtuq.spec rename to dll/keyboard/kbdtuq/kbdtuq.spec diff --git a/reactos/dll/keyboard/kbduk/CMakeLists.txt b/dll/keyboard/kbduk/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbduk/CMakeLists.txt rename to dll/keyboard/kbduk/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbduk/kbduk.c b/dll/keyboard/kbduk/kbduk.c similarity index 100% rename from reactos/dll/keyboard/kbduk/kbduk.c rename to dll/keyboard/kbduk/kbduk.c diff --git a/reactos/dll/keyboard/kbduk/kbduk.rbuild b/dll/keyboard/kbduk/kbduk.rbuild similarity index 100% rename from reactos/dll/keyboard/kbduk/kbduk.rbuild rename to dll/keyboard/kbduk/kbduk.rbuild diff --git a/reactos/dll/keyboard/kbduk/kbduk.rc b/dll/keyboard/kbduk/kbduk.rc similarity index 100% rename from reactos/dll/keyboard/kbduk/kbduk.rc rename to dll/keyboard/kbduk/kbduk.rc diff --git a/reactos/dll/keyboard/kbduk/kbduk.spec b/dll/keyboard/kbduk/kbduk.spec similarity index 100% rename from reactos/dll/keyboard/kbduk/kbduk.spec rename to dll/keyboard/kbduk/kbduk.spec diff --git a/reactos/dll/keyboard/kbdur/CMakeLists.txt b/dll/keyboard/kbdur/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdur/CMakeLists.txt rename to dll/keyboard/kbdur/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdur/kbdur.c b/dll/keyboard/kbdur/kbdur.c similarity index 100% rename from reactos/dll/keyboard/kbdur/kbdur.c rename to dll/keyboard/kbdur/kbdur.c diff --git a/reactos/dll/keyboard/kbdur/kbdur.rbuild b/dll/keyboard/kbdur/kbdur.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdur/kbdur.rbuild rename to dll/keyboard/kbdur/kbdur.rbuild diff --git a/reactos/dll/keyboard/kbdur/kbdur.rc b/dll/keyboard/kbdur/kbdur.rc similarity index 100% rename from reactos/dll/keyboard/kbdur/kbdur.rc rename to dll/keyboard/kbdur/kbdur.rc diff --git a/reactos/dll/keyboard/kbdur/kbdur.spec b/dll/keyboard/kbdur/kbdur.spec similarity index 100% rename from reactos/dll/keyboard/kbdur/kbdur.spec rename to dll/keyboard/kbdur/kbdur.spec diff --git a/reactos/dll/keyboard/kbdurs/CMakeLists.txt b/dll/keyboard/kbdurs/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdurs/CMakeLists.txt rename to dll/keyboard/kbdurs/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdurs/kbdurs.c b/dll/keyboard/kbdurs/kbdurs.c similarity index 100% rename from reactos/dll/keyboard/kbdurs/kbdurs.c rename to dll/keyboard/kbdurs/kbdurs.c diff --git a/reactos/dll/keyboard/kbdurs/kbdurs.rbuild b/dll/keyboard/kbdurs/kbdurs.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdurs/kbdurs.rbuild rename to dll/keyboard/kbdurs/kbdurs.rbuild diff --git a/reactos/dll/keyboard/kbdurs/kbdurs.rc b/dll/keyboard/kbdurs/kbdurs.rc similarity index 100% rename from reactos/dll/keyboard/kbdurs/kbdurs.rc rename to dll/keyboard/kbdurs/kbdurs.rc diff --git a/reactos/dll/keyboard/kbdurs/kbdurs.spec b/dll/keyboard/kbdurs/kbdurs.spec similarity index 100% rename from reactos/dll/keyboard/kbdurs/kbdurs.spec rename to dll/keyboard/kbdurs/kbdurs.spec diff --git a/reactos/dll/keyboard/kbdus/CMakeLists.txt b/dll/keyboard/kbdus/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdus/CMakeLists.txt rename to dll/keyboard/kbdus/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdus/kbdus.c b/dll/keyboard/kbdus/kbdus.c similarity index 100% rename from reactos/dll/keyboard/kbdus/kbdus.c rename to dll/keyboard/kbdus/kbdus.c diff --git a/reactos/dll/keyboard/kbdus/kbdus.rbuild b/dll/keyboard/kbdus/kbdus.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdus/kbdus.rbuild rename to dll/keyboard/kbdus/kbdus.rbuild diff --git a/reactos/dll/keyboard/kbdus/kbdus.rc b/dll/keyboard/kbdus/kbdus.rc similarity index 100% rename from reactos/dll/keyboard/kbdus/kbdus.rc rename to dll/keyboard/kbdus/kbdus.rc diff --git a/reactos/dll/keyboard/kbdus/kbdus.spec b/dll/keyboard/kbdus/kbdus.spec similarity index 100% rename from reactos/dll/keyboard/kbdus/kbdus.spec rename to dll/keyboard/kbdus/kbdus.spec diff --git a/reactos/dll/keyboard/kbdusa/CMakeLists.txt b/dll/keyboard/kbdusa/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdusa/CMakeLists.txt rename to dll/keyboard/kbdusa/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdusa/kbdusa.c b/dll/keyboard/kbdusa/kbdusa.c similarity index 100% rename from reactos/dll/keyboard/kbdusa/kbdusa.c rename to dll/keyboard/kbdusa/kbdusa.c diff --git a/reactos/dll/keyboard/kbdusa/kbdusa.rbuild b/dll/keyboard/kbdusa/kbdusa.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdusa/kbdusa.rbuild rename to dll/keyboard/kbdusa/kbdusa.rbuild diff --git a/reactos/dll/keyboard/kbdusa/kbdusa.rc b/dll/keyboard/kbdusa/kbdusa.rc similarity index 100% rename from reactos/dll/keyboard/kbdusa/kbdusa.rc rename to dll/keyboard/kbdusa/kbdusa.rc diff --git a/reactos/dll/keyboard/kbdusa/kbdusa.spec b/dll/keyboard/kbdusa/kbdusa.spec similarity index 100% rename from reactos/dll/keyboard/kbdusa/kbdusa.spec rename to dll/keyboard/kbdusa/kbdusa.spec diff --git a/reactos/dll/keyboard/kbdusl/CMakeLists.txt b/dll/keyboard/kbdusl/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdusl/CMakeLists.txt rename to dll/keyboard/kbdusl/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdusl/kbdusl.c b/dll/keyboard/kbdusl/kbdusl.c similarity index 100% rename from reactos/dll/keyboard/kbdusl/kbdusl.c rename to dll/keyboard/kbdusl/kbdusl.c diff --git a/reactos/dll/keyboard/kbdusl/kbdusl.rbuild b/dll/keyboard/kbdusl/kbdusl.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdusl/kbdusl.rbuild rename to dll/keyboard/kbdusl/kbdusl.rbuild diff --git a/reactos/dll/keyboard/kbdusl/kbdusl.rc b/dll/keyboard/kbdusl/kbdusl.rc similarity index 100% rename from reactos/dll/keyboard/kbdusl/kbdusl.rc rename to dll/keyboard/kbdusl/kbdusl.rc diff --git a/reactos/dll/keyboard/kbdusl/kbdusl.spec b/dll/keyboard/kbdusl/kbdusl.spec similarity index 100% rename from reactos/dll/keyboard/kbdusl/kbdusl.spec rename to dll/keyboard/kbdusl/kbdusl.spec diff --git a/reactos/dll/keyboard/kbdusr/CMakeLists.txt b/dll/keyboard/kbdusr/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdusr/CMakeLists.txt rename to dll/keyboard/kbdusr/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdusr/kbdusr.c b/dll/keyboard/kbdusr/kbdusr.c similarity index 100% rename from reactos/dll/keyboard/kbdusr/kbdusr.c rename to dll/keyboard/kbdusr/kbdusr.c diff --git a/reactos/dll/keyboard/kbdusr/kbdusr.rbuild b/dll/keyboard/kbdusr/kbdusr.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdusr/kbdusr.rbuild rename to dll/keyboard/kbdusr/kbdusr.rbuild diff --git a/reactos/dll/keyboard/kbdusr/kbdusr.rc b/dll/keyboard/kbdusr/kbdusr.rc similarity index 100% rename from reactos/dll/keyboard/kbdusr/kbdusr.rc rename to dll/keyboard/kbdusr/kbdusr.rc diff --git a/reactos/dll/keyboard/kbdusr/kbdusr.spec b/dll/keyboard/kbdusr/kbdusr.spec similarity index 100% rename from reactos/dll/keyboard/kbdusr/kbdusr.spec rename to dll/keyboard/kbdusr/kbdusr.spec diff --git a/reactos/dll/keyboard/kbdusx/CMakeLists.txt b/dll/keyboard/kbdusx/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdusx/CMakeLists.txt rename to dll/keyboard/kbdusx/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdusx/kbdusx.c b/dll/keyboard/kbdusx/kbdusx.c similarity index 100% rename from reactos/dll/keyboard/kbdusx/kbdusx.c rename to dll/keyboard/kbdusx/kbdusx.c diff --git a/reactos/dll/keyboard/kbdusx/kbdusx.rbuild b/dll/keyboard/kbdusx/kbdusx.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdusx/kbdusx.rbuild rename to dll/keyboard/kbdusx/kbdusx.rbuild diff --git a/reactos/dll/keyboard/kbdusx/kbdusx.rc b/dll/keyboard/kbdusx/kbdusx.rc similarity index 100% rename from reactos/dll/keyboard/kbdusx/kbdusx.rc rename to dll/keyboard/kbdusx/kbdusx.rc diff --git a/reactos/dll/keyboard/kbdusx/kbdusx.spec b/dll/keyboard/kbdusx/kbdusx.spec similarity index 100% rename from reactos/dll/keyboard/kbdusx/kbdusx.spec rename to dll/keyboard/kbdusx/kbdusx.spec diff --git a/reactos/dll/keyboard/kbduzb/CMakeLists.txt b/dll/keyboard/kbduzb/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbduzb/CMakeLists.txt rename to dll/keyboard/kbduzb/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbduzb/kbduzb.c b/dll/keyboard/kbduzb/kbduzb.c similarity index 100% rename from reactos/dll/keyboard/kbduzb/kbduzb.c rename to dll/keyboard/kbduzb/kbduzb.c diff --git a/reactos/dll/keyboard/kbduzb/kbduzb.rbuild b/dll/keyboard/kbduzb/kbduzb.rbuild similarity index 100% rename from reactos/dll/keyboard/kbduzb/kbduzb.rbuild rename to dll/keyboard/kbduzb/kbduzb.rbuild diff --git a/reactos/dll/keyboard/kbduzb/kbduzb.rc b/dll/keyboard/kbduzb/kbduzb.rc similarity index 100% rename from reactos/dll/keyboard/kbduzb/kbduzb.rc rename to dll/keyboard/kbduzb/kbduzb.rc diff --git a/reactos/dll/keyboard/kbduzb/kbduzb.spec b/dll/keyboard/kbduzb/kbduzb.spec similarity index 100% rename from reactos/dll/keyboard/kbduzb/kbduzb.spec rename to dll/keyboard/kbduzb/kbduzb.spec diff --git a/reactos/dll/keyboard/kbdvntc/CMakeLists.txt b/dll/keyboard/kbdvntc/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdvntc/CMakeLists.txt rename to dll/keyboard/kbdvntc/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdvntc/kbdvntc.c b/dll/keyboard/kbdvntc/kbdvntc.c similarity index 100% rename from reactos/dll/keyboard/kbdvntc/kbdvntc.c rename to dll/keyboard/kbdvntc/kbdvntc.c diff --git a/reactos/dll/keyboard/kbdvntc/kbdvntc.rbuild b/dll/keyboard/kbdvntc/kbdvntc.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdvntc/kbdvntc.rbuild rename to dll/keyboard/kbdvntc/kbdvntc.rbuild diff --git a/reactos/dll/keyboard/kbdvntc/kbdvntc.rc b/dll/keyboard/kbdvntc/kbdvntc.rc similarity index 100% rename from reactos/dll/keyboard/kbdvntc/kbdvntc.rc rename to dll/keyboard/kbdvntc/kbdvntc.rc diff --git a/reactos/dll/keyboard/kbdvntc/kbdvntc.spec b/dll/keyboard/kbdvntc/kbdvntc.spec similarity index 100% rename from reactos/dll/keyboard/kbdvntc/kbdvntc.spec rename to dll/keyboard/kbdvntc/kbdvntc.spec diff --git a/reactos/dll/keyboard/kbdycc/CMakeLists.txt b/dll/keyboard/kbdycc/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdycc/CMakeLists.txt rename to dll/keyboard/kbdycc/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdycc/kbdycc.c b/dll/keyboard/kbdycc/kbdycc.c similarity index 100% rename from reactos/dll/keyboard/kbdycc/kbdycc.c rename to dll/keyboard/kbdycc/kbdycc.c diff --git a/reactos/dll/keyboard/kbdycc/kbdycc.rbuild b/dll/keyboard/kbdycc/kbdycc.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdycc/kbdycc.rbuild rename to dll/keyboard/kbdycc/kbdycc.rbuild diff --git a/reactos/dll/keyboard/kbdycc/kbdycc.rc b/dll/keyboard/kbdycc/kbdycc.rc similarity index 100% rename from reactos/dll/keyboard/kbdycc/kbdycc.rc rename to dll/keyboard/kbdycc/kbdycc.rc diff --git a/reactos/dll/keyboard/kbdycc/kbdycc.spec b/dll/keyboard/kbdycc/kbdycc.spec similarity index 100% rename from reactos/dll/keyboard/kbdycc/kbdycc.spec rename to dll/keyboard/kbdycc/kbdycc.spec diff --git a/reactos/dll/keyboard/kbdycl/CMakeLists.txt b/dll/keyboard/kbdycl/CMakeLists.txt similarity index 100% rename from reactos/dll/keyboard/kbdycl/CMakeLists.txt rename to dll/keyboard/kbdycl/CMakeLists.txt diff --git a/reactos/dll/keyboard/kbdycl/kbdycl.c b/dll/keyboard/kbdycl/kbdycl.c similarity index 100% rename from reactos/dll/keyboard/kbdycl/kbdycl.c rename to dll/keyboard/kbdycl/kbdycl.c diff --git a/reactos/dll/keyboard/kbdycl/kbdycl.rbuild b/dll/keyboard/kbdycl/kbdycl.rbuild similarity index 100% rename from reactos/dll/keyboard/kbdycl/kbdycl.rbuild rename to dll/keyboard/kbdycl/kbdycl.rbuild diff --git a/reactos/dll/keyboard/kbdycl/kbdycl.rc b/dll/keyboard/kbdycl/kbdycl.rc similarity index 100% rename from reactos/dll/keyboard/kbdycl/kbdycl.rc rename to dll/keyboard/kbdycl/kbdycl.rc diff --git a/reactos/dll/keyboard/kbdycl/kbdycl.spec b/dll/keyboard/kbdycl/kbdycl.spec similarity index 100% rename from reactos/dll/keyboard/kbdycl/kbdycl.spec rename to dll/keyboard/kbdycl/kbdycl.spec diff --git a/reactos/dll/keyboard/keyboard.rbuild b/dll/keyboard/keyboard.rbuild similarity index 100% rename from reactos/dll/keyboard/keyboard.rbuild rename to dll/keyboard/keyboard.rbuild diff --git a/reactos/dll/nls/CMakeLists.txt b/dll/nls/CMakeLists.txt similarity index 100% rename from reactos/dll/nls/CMakeLists.txt rename to dll/nls/CMakeLists.txt diff --git a/reactos/dll/nls/idndl/CMakeLists.txt b/dll/nls/idndl/CMakeLists.txt similarity index 100% rename from reactos/dll/nls/idndl/CMakeLists.txt rename to dll/nls/idndl/CMakeLists.txt diff --git a/reactos/dll/nls/idndl/idndl.cpp b/dll/nls/idndl/idndl.cpp similarity index 100% rename from reactos/dll/nls/idndl/idndl.cpp rename to dll/nls/idndl/idndl.cpp diff --git a/reactos/dll/nls/idndl/idndl.rbuild b/dll/nls/idndl/idndl.rbuild similarity index 100% rename from reactos/dll/nls/idndl/idndl.rbuild rename to dll/nls/idndl/idndl.rbuild diff --git a/reactos/dll/nls/idndl/idndl.spec b/dll/nls/idndl/idndl.spec similarity index 100% rename from reactos/dll/nls/idndl/idndl.spec rename to dll/nls/idndl/idndl.spec diff --git a/reactos/dll/nls/nls.rbuild b/dll/nls/nls.rbuild similarity index 100% rename from reactos/dll/nls/nls.rbuild rename to dll/nls/nls.rbuild diff --git a/reactos/dll/nls/normaliz/CMakeLists.txt b/dll/nls/normaliz/CMakeLists.txt similarity index 100% rename from reactos/dll/nls/normaliz/CMakeLists.txt rename to dll/nls/normaliz/CMakeLists.txt diff --git a/reactos/dll/nls/normaliz/dummy.c b/dll/nls/normaliz/dummy.c similarity index 100% rename from reactos/dll/nls/normaliz/dummy.c rename to dll/nls/normaliz/dummy.c diff --git a/reactos/dll/nls/normaliz/normaliz.rbuild b/dll/nls/normaliz/normaliz.rbuild similarity index 100% rename from reactos/dll/nls/normaliz/normaliz.rbuild rename to dll/nls/normaliz/normaliz.rbuild diff --git a/reactos/dll/nls/normaliz/normaliz.spec b/dll/nls/normaliz/normaliz.spec similarity index 100% rename from reactos/dll/nls/normaliz/normaliz.spec rename to dll/nls/normaliz/normaliz.spec diff --git a/reactos/dll/ntdll/CMakeLists.txt b/dll/ntdll/CMakeLists.txt similarity index 100% rename from reactos/dll/ntdll/CMakeLists.txt rename to dll/ntdll/CMakeLists.txt diff --git a/reactos/dll/ntdll/csr/api.c b/dll/ntdll/csr/api.c similarity index 100% rename from reactos/dll/ntdll/csr/api.c rename to dll/ntdll/csr/api.c diff --git a/reactos/dll/ntdll/csr/capture.c b/dll/ntdll/csr/capture.c similarity index 100% rename from reactos/dll/ntdll/csr/capture.c rename to dll/ntdll/csr/capture.c diff --git a/reactos/dll/ntdll/csr/connect.c b/dll/ntdll/csr/connect.c similarity index 100% rename from reactos/dll/ntdll/csr/connect.c rename to dll/ntdll/csr/connect.c diff --git a/reactos/dll/ntdll/dbg/dbgui.c b/dll/ntdll/dbg/dbgui.c similarity index 100% rename from reactos/dll/ntdll/dbg/dbgui.c rename to dll/ntdll/dbg/dbgui.c diff --git a/reactos/dll/ntdll/def/ntdll.pspec b/dll/ntdll/def/ntdll.pspec similarity index 100% rename from reactos/dll/ntdll/def/ntdll.pspec rename to dll/ntdll/def/ntdll.pspec diff --git a/reactos/dll/ntdll/def/ntdll.rc b/dll/ntdll/def/ntdll.rc similarity index 100% rename from reactos/dll/ntdll/def/ntdll.rc rename to dll/ntdll/def/ntdll.rc diff --git a/reactos/dll/ntdll/def/ntdll.spec b/dll/ntdll/def/ntdll.spec similarity index 100% rename from reactos/dll/ntdll/def/ntdll.spec rename to dll/ntdll/def/ntdll.spec diff --git a/reactos/dll/ntdll/dispatch/amd64/stubs.c b/dll/ntdll/dispatch/amd64/stubs.c similarity index 100% rename from reactos/dll/ntdll/dispatch/amd64/stubs.c rename to dll/ntdll/dispatch/amd64/stubs.c diff --git a/reactos/dll/ntdll/dispatch/arm/stubs_asm.s b/dll/ntdll/dispatch/arm/stubs_asm.s similarity index 100% rename from reactos/dll/ntdll/dispatch/arm/stubs_asm.s rename to dll/ntdll/dispatch/arm/stubs_asm.s diff --git a/reactos/dll/ntdll/dispatch/dispatch.c b/dll/ntdll/dispatch/dispatch.c similarity index 100% rename from reactos/dll/ntdll/dispatch/dispatch.c rename to dll/ntdll/dispatch/dispatch.c diff --git a/reactos/dll/ntdll/dispatch/i386/dispatch.S b/dll/ntdll/dispatch/i386/dispatch.S similarity index 100% rename from reactos/dll/ntdll/dispatch/i386/dispatch.S rename to dll/ntdll/dispatch/i386/dispatch.S diff --git a/reactos/dll/ntdll/include/ntdll.h b/dll/ntdll/include/ntdll.h similarity index 100% rename from reactos/dll/ntdll/include/ntdll.h rename to dll/ntdll/include/ntdll.h diff --git a/reactos/dll/ntdll/include/ntdllp.h b/dll/ntdll/include/ntdllp.h similarity index 100% rename from reactos/dll/ntdll/include/ntdllp.h rename to dll/ntdll/include/ntdllp.h diff --git a/reactos/dll/ntdll/ldr/ldrapi.c b/dll/ntdll/ldr/ldrapi.c similarity index 100% rename from reactos/dll/ntdll/ldr/ldrapi.c rename to dll/ntdll/ldr/ldrapi.c diff --git a/reactos/dll/ntdll/ldr/ldrinit.c b/dll/ntdll/ldr/ldrinit.c similarity index 100% rename from reactos/dll/ntdll/ldr/ldrinit.c rename to dll/ntdll/ldr/ldrinit.c diff --git a/reactos/dll/ntdll/ldr/ldrpe.c b/dll/ntdll/ldr/ldrpe.c similarity index 100% rename from reactos/dll/ntdll/ldr/ldrpe.c rename to dll/ntdll/ldr/ldrpe.c diff --git a/reactos/dll/ntdll/ldr/ldrutils.c b/dll/ntdll/ldr/ldrutils.c similarity index 100% rename from reactos/dll/ntdll/ldr/ldrutils.c rename to dll/ntdll/ldr/ldrutils.c diff --git a/reactos/dll/ntdll/ntdll.rbuild b/dll/ntdll/ntdll.rbuild similarity index 100% rename from reactos/dll/ntdll/ntdll.rbuild rename to dll/ntdll/ntdll.rbuild diff --git a/reactos/dll/ntdll/rtl/libsupp.c b/dll/ntdll/rtl/libsupp.c similarity index 100% rename from reactos/dll/ntdll/rtl/libsupp.c rename to dll/ntdll/rtl/libsupp.c diff --git a/reactos/dll/ntdll/rtl/version.c b/dll/ntdll/rtl/version.c similarity index 100% rename from reactos/dll/ntdll/rtl/version.c rename to dll/ntdll/rtl/version.c diff --git a/reactos/dll/shellext/CMakeLists.txt b/dll/shellext/CMakeLists.txt similarity index 100% rename from reactos/dll/shellext/CMakeLists.txt rename to dll/shellext/CMakeLists.txt diff --git a/reactos/dll/shellext/deskadp/CMakeLists.txt b/dll/shellext/deskadp/CMakeLists.txt similarity index 100% rename from reactos/dll/shellext/deskadp/CMakeLists.txt rename to dll/shellext/deskadp/CMakeLists.txt diff --git a/reactos/dll/shellext/deskadp/deskadp.c b/dll/shellext/deskadp/deskadp.c similarity index 100% rename from reactos/dll/shellext/deskadp/deskadp.c rename to dll/shellext/deskadp/deskadp.c diff --git a/reactos/dll/shellext/deskadp/deskadp.h b/dll/shellext/deskadp/deskadp.h similarity index 100% rename from reactos/dll/shellext/deskadp/deskadp.h rename to dll/shellext/deskadp/deskadp.h diff --git a/reactos/dll/shellext/deskadp/deskadp.rbuild b/dll/shellext/deskadp/deskadp.rbuild similarity index 100% rename from reactos/dll/shellext/deskadp/deskadp.rbuild rename to dll/shellext/deskadp/deskadp.rbuild diff --git a/reactos/dll/shellext/deskadp/deskadp.rc b/dll/shellext/deskadp/deskadp.rc similarity index 100% rename from reactos/dll/shellext/deskadp/deskadp.rc rename to dll/shellext/deskadp/deskadp.rc diff --git a/reactos/dll/shellext/deskadp/deskadp.spec b/dll/shellext/deskadp/deskadp.spec similarity index 100% rename from reactos/dll/shellext/deskadp/deskadp.spec rename to dll/shellext/deskadp/deskadp.spec diff --git a/reactos/dll/shellext/deskadp/lang/bg-BG.rc b/dll/shellext/deskadp/lang/bg-BG.rc similarity index 100% rename from reactos/dll/shellext/deskadp/lang/bg-BG.rc rename to dll/shellext/deskadp/lang/bg-BG.rc diff --git a/reactos/dll/shellext/deskadp/lang/cs-CZ.rc b/dll/shellext/deskadp/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/shellext/deskadp/lang/cs-CZ.rc rename to dll/shellext/deskadp/lang/cs-CZ.rc diff --git a/reactos/dll/shellext/deskadp/lang/de-DE.rc b/dll/shellext/deskadp/lang/de-DE.rc similarity index 100% rename from reactos/dll/shellext/deskadp/lang/de-DE.rc rename to dll/shellext/deskadp/lang/de-DE.rc diff --git a/reactos/dll/shellext/deskadp/lang/el-GR.rc b/dll/shellext/deskadp/lang/el-GR.rc similarity index 100% rename from reactos/dll/shellext/deskadp/lang/el-GR.rc rename to dll/shellext/deskadp/lang/el-GR.rc diff --git a/reactos/dll/shellext/deskadp/lang/en-US.rc b/dll/shellext/deskadp/lang/en-US.rc similarity index 100% rename from reactos/dll/shellext/deskadp/lang/en-US.rc rename to dll/shellext/deskadp/lang/en-US.rc diff --git a/reactos/dll/shellext/deskadp/lang/es-ES.rc b/dll/shellext/deskadp/lang/es-ES.rc similarity index 100% rename from reactos/dll/shellext/deskadp/lang/es-ES.rc rename to dll/shellext/deskadp/lang/es-ES.rc diff --git a/reactos/dll/shellext/deskadp/lang/eu-ES.rc b/dll/shellext/deskadp/lang/eu-ES.rc similarity index 100% rename from reactos/dll/shellext/deskadp/lang/eu-ES.rc rename to dll/shellext/deskadp/lang/eu-ES.rc diff --git a/reactos/dll/shellext/deskadp/lang/fr-FR.rc b/dll/shellext/deskadp/lang/fr-FR.rc similarity index 100% rename from reactos/dll/shellext/deskadp/lang/fr-FR.rc rename to dll/shellext/deskadp/lang/fr-FR.rc diff --git a/reactos/dll/shellext/deskadp/lang/it-IT.rc b/dll/shellext/deskadp/lang/it-IT.rc similarity index 100% rename from reactos/dll/shellext/deskadp/lang/it-IT.rc rename to dll/shellext/deskadp/lang/it-IT.rc diff --git a/reactos/dll/shellext/deskadp/lang/no-NO.rc b/dll/shellext/deskadp/lang/no-NO.rc similarity index 100% rename from reactos/dll/shellext/deskadp/lang/no-NO.rc rename to dll/shellext/deskadp/lang/no-NO.rc diff --git a/reactos/dll/shellext/deskadp/lang/pl-PL.rc b/dll/shellext/deskadp/lang/pl-PL.rc similarity index 100% rename from reactos/dll/shellext/deskadp/lang/pl-PL.rc rename to dll/shellext/deskadp/lang/pl-PL.rc diff --git a/reactos/dll/shellext/deskadp/lang/ro-RO.rc b/dll/shellext/deskadp/lang/ro-RO.rc similarity index 100% rename from reactos/dll/shellext/deskadp/lang/ro-RO.rc rename to dll/shellext/deskadp/lang/ro-RO.rc diff --git a/reactos/dll/shellext/deskadp/lang/ru-RU.rc b/dll/shellext/deskadp/lang/ru-RU.rc similarity index 100% rename from reactos/dll/shellext/deskadp/lang/ru-RU.rc rename to dll/shellext/deskadp/lang/ru-RU.rc diff --git a/reactos/dll/shellext/deskadp/lang/sk-SK.rc b/dll/shellext/deskadp/lang/sk-SK.rc similarity index 100% rename from reactos/dll/shellext/deskadp/lang/sk-SK.rc rename to dll/shellext/deskadp/lang/sk-SK.rc diff --git a/reactos/dll/shellext/deskadp/lang/uk-UA.rc b/dll/shellext/deskadp/lang/uk-UA.rc similarity index 100% rename from reactos/dll/shellext/deskadp/lang/uk-UA.rc rename to dll/shellext/deskadp/lang/uk-UA.rc diff --git a/reactos/dll/shellext/deskadp/precomp.h b/dll/shellext/deskadp/precomp.h similarity index 100% rename from reactos/dll/shellext/deskadp/precomp.h rename to dll/shellext/deskadp/precomp.h diff --git a/reactos/dll/shellext/deskadp/resource.h b/dll/shellext/deskadp/resource.h similarity index 100% rename from reactos/dll/shellext/deskadp/resource.h rename to dll/shellext/deskadp/resource.h diff --git a/reactos/dll/shellext/deskadp/rsrc.rc b/dll/shellext/deskadp/rsrc.rc similarity index 100% rename from reactos/dll/shellext/deskadp/rsrc.rc rename to dll/shellext/deskadp/rsrc.rc diff --git a/reactos/dll/shellext/deskadp/shxiface.c b/dll/shellext/deskadp/shxiface.c similarity index 100% rename from reactos/dll/shellext/deskadp/shxiface.c rename to dll/shellext/deskadp/shxiface.c diff --git a/reactos/dll/shellext/deskmon/CMakeLists.txt b/dll/shellext/deskmon/CMakeLists.txt similarity index 100% rename from reactos/dll/shellext/deskmon/CMakeLists.txt rename to dll/shellext/deskmon/CMakeLists.txt diff --git a/reactos/dll/shellext/deskmon/deskmon.c b/dll/shellext/deskmon/deskmon.c similarity index 100% rename from reactos/dll/shellext/deskmon/deskmon.c rename to dll/shellext/deskmon/deskmon.c diff --git a/reactos/dll/shellext/deskmon/deskmon.h b/dll/shellext/deskmon/deskmon.h similarity index 100% rename from reactos/dll/shellext/deskmon/deskmon.h rename to dll/shellext/deskmon/deskmon.h diff --git a/reactos/dll/shellext/deskmon/deskmon.rbuild b/dll/shellext/deskmon/deskmon.rbuild similarity index 100% rename from reactos/dll/shellext/deskmon/deskmon.rbuild rename to dll/shellext/deskmon/deskmon.rbuild diff --git a/reactos/dll/shellext/deskmon/deskmon.rc b/dll/shellext/deskmon/deskmon.rc similarity index 100% rename from reactos/dll/shellext/deskmon/deskmon.rc rename to dll/shellext/deskmon/deskmon.rc diff --git a/reactos/dll/shellext/deskmon/deskmon.spec b/dll/shellext/deskmon/deskmon.spec similarity index 100% rename from reactos/dll/shellext/deskmon/deskmon.spec rename to dll/shellext/deskmon/deskmon.spec diff --git a/reactos/dll/shellext/deskmon/lang/bg-BG.rc b/dll/shellext/deskmon/lang/bg-BG.rc similarity index 100% rename from reactos/dll/shellext/deskmon/lang/bg-BG.rc rename to dll/shellext/deskmon/lang/bg-BG.rc diff --git a/reactos/dll/shellext/deskmon/lang/cs-CZ.rc b/dll/shellext/deskmon/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/shellext/deskmon/lang/cs-CZ.rc rename to dll/shellext/deskmon/lang/cs-CZ.rc diff --git a/reactos/dll/shellext/deskmon/lang/de-DE.rc b/dll/shellext/deskmon/lang/de-DE.rc similarity index 100% rename from reactos/dll/shellext/deskmon/lang/de-DE.rc rename to dll/shellext/deskmon/lang/de-DE.rc diff --git a/reactos/dll/shellext/deskmon/lang/el-GR.rc b/dll/shellext/deskmon/lang/el-GR.rc similarity index 100% rename from reactos/dll/shellext/deskmon/lang/el-GR.rc rename to dll/shellext/deskmon/lang/el-GR.rc diff --git a/reactos/dll/shellext/deskmon/lang/en-US.rc b/dll/shellext/deskmon/lang/en-US.rc similarity index 100% rename from reactos/dll/shellext/deskmon/lang/en-US.rc rename to dll/shellext/deskmon/lang/en-US.rc diff --git a/reactos/dll/shellext/deskmon/lang/es-ES.rc b/dll/shellext/deskmon/lang/es-ES.rc similarity index 100% rename from reactos/dll/shellext/deskmon/lang/es-ES.rc rename to dll/shellext/deskmon/lang/es-ES.rc diff --git a/reactos/dll/shellext/deskmon/lang/eu-ES.rc b/dll/shellext/deskmon/lang/eu-ES.rc similarity index 100% rename from reactos/dll/shellext/deskmon/lang/eu-ES.rc rename to dll/shellext/deskmon/lang/eu-ES.rc diff --git a/reactos/dll/shellext/deskmon/lang/fr-FR.rc b/dll/shellext/deskmon/lang/fr-FR.rc similarity index 100% rename from reactos/dll/shellext/deskmon/lang/fr-FR.rc rename to dll/shellext/deskmon/lang/fr-FR.rc diff --git a/reactos/dll/shellext/deskmon/lang/it-IT.rc b/dll/shellext/deskmon/lang/it-IT.rc similarity index 100% rename from reactos/dll/shellext/deskmon/lang/it-IT.rc rename to dll/shellext/deskmon/lang/it-IT.rc diff --git a/reactos/dll/shellext/deskmon/lang/no-NO.rc b/dll/shellext/deskmon/lang/no-NO.rc similarity index 100% rename from reactos/dll/shellext/deskmon/lang/no-NO.rc rename to dll/shellext/deskmon/lang/no-NO.rc diff --git a/reactos/dll/shellext/deskmon/lang/pl-PL.rc b/dll/shellext/deskmon/lang/pl-PL.rc similarity index 100% rename from reactos/dll/shellext/deskmon/lang/pl-PL.rc rename to dll/shellext/deskmon/lang/pl-PL.rc diff --git a/reactos/dll/shellext/deskmon/lang/ro-RO.rc b/dll/shellext/deskmon/lang/ro-RO.rc similarity index 100% rename from reactos/dll/shellext/deskmon/lang/ro-RO.rc rename to dll/shellext/deskmon/lang/ro-RO.rc diff --git a/reactos/dll/shellext/deskmon/lang/ru-RU.rc b/dll/shellext/deskmon/lang/ru-RU.rc similarity index 100% rename from reactos/dll/shellext/deskmon/lang/ru-RU.rc rename to dll/shellext/deskmon/lang/ru-RU.rc diff --git a/reactos/dll/shellext/deskmon/lang/sk-SK.rc b/dll/shellext/deskmon/lang/sk-SK.rc similarity index 100% rename from reactos/dll/shellext/deskmon/lang/sk-SK.rc rename to dll/shellext/deskmon/lang/sk-SK.rc diff --git a/reactos/dll/shellext/deskmon/lang/uk-UA.rc b/dll/shellext/deskmon/lang/uk-UA.rc similarity index 100% rename from reactos/dll/shellext/deskmon/lang/uk-UA.rc rename to dll/shellext/deskmon/lang/uk-UA.rc diff --git a/reactos/dll/shellext/deskmon/precomp.h b/dll/shellext/deskmon/precomp.h similarity index 100% rename from reactos/dll/shellext/deskmon/precomp.h rename to dll/shellext/deskmon/precomp.h diff --git a/reactos/dll/shellext/deskmon/resource.h b/dll/shellext/deskmon/resource.h similarity index 100% rename from reactos/dll/shellext/deskmon/resource.h rename to dll/shellext/deskmon/resource.h diff --git a/reactos/dll/shellext/deskmon/rsrc.rc b/dll/shellext/deskmon/rsrc.rc similarity index 100% rename from reactos/dll/shellext/deskmon/rsrc.rc rename to dll/shellext/deskmon/rsrc.rc diff --git a/reactos/dll/shellext/deskmon/shxiface.c b/dll/shellext/deskmon/shxiface.c similarity index 100% rename from reactos/dll/shellext/deskmon/shxiface.c rename to dll/shellext/deskmon/shxiface.c diff --git a/reactos/dll/shellext/devcpux/CMakeLists.txt b/dll/shellext/devcpux/CMakeLists.txt similarity index 100% rename from reactos/dll/shellext/devcpux/CMakeLists.txt rename to dll/shellext/devcpux/CMakeLists.txt diff --git a/reactos/dll/shellext/devcpux/devcpux.rbuild b/dll/shellext/devcpux/devcpux.rbuild similarity index 100% rename from reactos/dll/shellext/devcpux/devcpux.rbuild rename to dll/shellext/devcpux/devcpux.rbuild diff --git a/reactos/dll/shellext/devcpux/devcpux.spec b/dll/shellext/devcpux/devcpux.spec similarity index 100% rename from reactos/dll/shellext/devcpux/devcpux.spec rename to dll/shellext/devcpux/devcpux.spec diff --git a/reactos/dll/shellext/devcpux/processor.c b/dll/shellext/devcpux/processor.c similarity index 100% rename from reactos/dll/shellext/devcpux/processor.c rename to dll/shellext/devcpux/processor.c diff --git a/reactos/dll/shellext/devcpux/processor.rc b/dll/shellext/devcpux/processor.rc similarity index 100% rename from reactos/dll/shellext/devcpux/processor.rc rename to dll/shellext/devcpux/processor.rc diff --git a/reactos/dll/shellext/devcpux/resource.h b/dll/shellext/devcpux/resource.h similarity index 100% rename from reactos/dll/shellext/devcpux/resource.h rename to dll/shellext/devcpux/resource.h diff --git a/reactos/dll/shellext/fontext/CMakeLists.txt b/dll/shellext/fontext/CMakeLists.txt similarity index 100% rename from reactos/dll/shellext/fontext/CMakeLists.txt rename to dll/shellext/fontext/CMakeLists.txt diff --git a/reactos/dll/shellext/fontext/fontext.c b/dll/shellext/fontext/fontext.c similarity index 100% rename from reactos/dll/shellext/fontext/fontext.c rename to dll/shellext/fontext/fontext.c diff --git a/reactos/dll/shellext/fontext/fontext.h b/dll/shellext/fontext/fontext.h similarity index 100% rename from reactos/dll/shellext/fontext/fontext.h rename to dll/shellext/fontext/fontext.h diff --git a/reactos/dll/shellext/fontext/fontext.rbuild b/dll/shellext/fontext/fontext.rbuild similarity index 100% rename from reactos/dll/shellext/fontext/fontext.rbuild rename to dll/shellext/fontext/fontext.rbuild diff --git a/reactos/dll/shellext/fontext/fontext.rc b/dll/shellext/fontext/fontext.rc similarity index 100% rename from reactos/dll/shellext/fontext/fontext.rc rename to dll/shellext/fontext/fontext.rc diff --git a/reactos/dll/shellext/fontext/fontext.spec b/dll/shellext/fontext/fontext.spec similarity index 100% rename from reactos/dll/shellext/fontext/fontext.spec rename to dll/shellext/fontext/fontext.spec diff --git a/reactos/dll/shellext/fontext/lang/en-US.rc b/dll/shellext/fontext/lang/en-US.rc similarity index 100% rename from reactos/dll/shellext/fontext/lang/en-US.rc rename to dll/shellext/fontext/lang/en-US.rc diff --git a/reactos/dll/shellext/fontext/regsvr.c b/dll/shellext/fontext/regsvr.c similarity index 100% rename from reactos/dll/shellext/fontext/regsvr.c rename to dll/shellext/fontext/regsvr.c diff --git a/reactos/dll/shellext/fontext/resource.h b/dll/shellext/fontext/resource.h similarity index 100% rename from reactos/dll/shellext/fontext/resource.h rename to dll/shellext/fontext/resource.h diff --git a/reactos/dll/shellext/fontext/rsrc.rc b/dll/shellext/fontext/rsrc.rc similarity index 100% rename from reactos/dll/shellext/fontext/rsrc.rc rename to dll/shellext/fontext/rsrc.rc diff --git a/reactos/dll/shellext/shellext.rbuild b/dll/shellext/shellext.rbuild similarity index 100% rename from reactos/dll/shellext/shellext.rbuild rename to dll/shellext/shellext.rbuild diff --git a/reactos/dll/shellext/slayer/CMakeLists.txt b/dll/shellext/slayer/CMakeLists.txt similarity index 100% rename from reactos/dll/shellext/slayer/CMakeLists.txt rename to dll/shellext/slayer/CMakeLists.txt diff --git a/reactos/dll/shellext/slayer/lang/bg-BG.rc b/dll/shellext/slayer/lang/bg-BG.rc similarity index 100% rename from reactos/dll/shellext/slayer/lang/bg-BG.rc rename to dll/shellext/slayer/lang/bg-BG.rc diff --git a/reactos/dll/shellext/slayer/lang/cs-CZ.rc b/dll/shellext/slayer/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/shellext/slayer/lang/cs-CZ.rc rename to dll/shellext/slayer/lang/cs-CZ.rc diff --git a/reactos/dll/shellext/slayer/lang/de-DE.rc b/dll/shellext/slayer/lang/de-DE.rc similarity index 100% rename from reactos/dll/shellext/slayer/lang/de-DE.rc rename to dll/shellext/slayer/lang/de-DE.rc diff --git a/reactos/dll/shellext/slayer/lang/en-US.rc b/dll/shellext/slayer/lang/en-US.rc similarity index 100% rename from reactos/dll/shellext/slayer/lang/en-US.rc rename to dll/shellext/slayer/lang/en-US.rc diff --git a/reactos/dll/shellext/slayer/lang/es-ES.rc b/dll/shellext/slayer/lang/es-ES.rc similarity index 100% rename from reactos/dll/shellext/slayer/lang/es-ES.rc rename to dll/shellext/slayer/lang/es-ES.rc diff --git a/reactos/dll/shellext/slayer/lang/eu-ES.rc b/dll/shellext/slayer/lang/eu-ES.rc similarity index 100% rename from reactos/dll/shellext/slayer/lang/eu-ES.rc rename to dll/shellext/slayer/lang/eu-ES.rc diff --git a/reactos/dll/shellext/slayer/lang/fr-FR.rc b/dll/shellext/slayer/lang/fr-FR.rc similarity index 100% rename from reactos/dll/shellext/slayer/lang/fr-FR.rc rename to dll/shellext/slayer/lang/fr-FR.rc diff --git a/reactos/dll/shellext/slayer/lang/hu-HU.rc b/dll/shellext/slayer/lang/hu-HU.rc similarity index 100% rename from reactos/dll/shellext/slayer/lang/hu-HU.rc rename to dll/shellext/slayer/lang/hu-HU.rc diff --git a/reactos/dll/shellext/slayer/lang/id-ID.rc b/dll/shellext/slayer/lang/id-ID.rc similarity index 100% rename from reactos/dll/shellext/slayer/lang/id-ID.rc rename to dll/shellext/slayer/lang/id-ID.rc diff --git a/reactos/dll/shellext/slayer/lang/it-IT.rc b/dll/shellext/slayer/lang/it-IT.rc similarity index 100% rename from reactos/dll/shellext/slayer/lang/it-IT.rc rename to dll/shellext/slayer/lang/it-IT.rc diff --git a/reactos/dll/shellext/slayer/lang/nl-NL.rc b/dll/shellext/slayer/lang/nl-NL.rc similarity index 100% rename from reactos/dll/shellext/slayer/lang/nl-NL.rc rename to dll/shellext/slayer/lang/nl-NL.rc diff --git a/reactos/dll/shellext/slayer/lang/no-NO.rc b/dll/shellext/slayer/lang/no-NO.rc similarity index 100% rename from reactos/dll/shellext/slayer/lang/no-NO.rc rename to dll/shellext/slayer/lang/no-NO.rc diff --git a/reactos/dll/shellext/slayer/lang/pl-PL.rc b/dll/shellext/slayer/lang/pl-PL.rc similarity index 100% rename from reactos/dll/shellext/slayer/lang/pl-PL.rc rename to dll/shellext/slayer/lang/pl-PL.rc diff --git a/reactos/dll/shellext/slayer/lang/ro-RO.rc b/dll/shellext/slayer/lang/ro-RO.rc similarity index 100% rename from reactos/dll/shellext/slayer/lang/ro-RO.rc rename to dll/shellext/slayer/lang/ro-RO.rc diff --git a/reactos/dll/shellext/slayer/lang/ru-RU.rc b/dll/shellext/slayer/lang/ru-RU.rc similarity index 100% rename from reactos/dll/shellext/slayer/lang/ru-RU.rc rename to dll/shellext/slayer/lang/ru-RU.rc diff --git a/reactos/dll/shellext/slayer/lang/sk-SK.rc b/dll/shellext/slayer/lang/sk-SK.rc similarity index 100% rename from reactos/dll/shellext/slayer/lang/sk-SK.rc rename to dll/shellext/slayer/lang/sk-SK.rc diff --git a/reactos/dll/shellext/slayer/lang/sv-SE.rc b/dll/shellext/slayer/lang/sv-SE.rc similarity index 100% rename from reactos/dll/shellext/slayer/lang/sv-SE.rc rename to dll/shellext/slayer/lang/sv-SE.rc diff --git a/reactos/dll/shellext/slayer/lang/uk-UA.rc b/dll/shellext/slayer/lang/uk-UA.rc similarity index 100% rename from reactos/dll/shellext/slayer/lang/uk-UA.rc rename to dll/shellext/slayer/lang/uk-UA.rc diff --git a/reactos/dll/shellext/slayer/precomp.h b/dll/shellext/slayer/precomp.h similarity index 100% rename from reactos/dll/shellext/slayer/precomp.h rename to dll/shellext/slayer/precomp.h diff --git a/reactos/dll/shellext/slayer/resource.h b/dll/shellext/slayer/resource.h similarity index 100% rename from reactos/dll/shellext/slayer/resource.h rename to dll/shellext/slayer/resource.h diff --git a/reactos/dll/shellext/slayer/rsrc.rc b/dll/shellext/slayer/rsrc.rc similarity index 100% rename from reactos/dll/shellext/slayer/rsrc.rc rename to dll/shellext/slayer/rsrc.rc diff --git a/reactos/dll/shellext/slayer/slayer.c b/dll/shellext/slayer/slayer.c similarity index 100% rename from reactos/dll/shellext/slayer/slayer.c rename to dll/shellext/slayer/slayer.c diff --git a/reactos/dll/shellext/slayer/slayer.h b/dll/shellext/slayer/slayer.h similarity index 100% rename from reactos/dll/shellext/slayer/slayer.h rename to dll/shellext/slayer/slayer.h diff --git a/reactos/dll/shellext/slayer/slayer.rbuild b/dll/shellext/slayer/slayer.rbuild similarity index 100% rename from reactos/dll/shellext/slayer/slayer.rbuild rename to dll/shellext/slayer/slayer.rbuild diff --git a/reactos/dll/shellext/slayer/slayer.rc b/dll/shellext/slayer/slayer.rc similarity index 100% rename from reactos/dll/shellext/slayer/slayer.rc rename to dll/shellext/slayer/slayer.rc diff --git a/reactos/dll/shellext/slayer/slayer.spec b/dll/shellext/slayer/slayer.spec similarity index 100% rename from reactos/dll/shellext/slayer/slayer.spec rename to dll/shellext/slayer/slayer.spec diff --git a/reactos/dll/win32/CMakeLists.txt b/dll/win32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/CMakeLists.txt rename to dll/win32/CMakeLists.txt diff --git a/reactos/dll/win32/acledit/CMakeLists.txt b/dll/win32/acledit/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/acledit/CMakeLists.txt rename to dll/win32/acledit/CMakeLists.txt diff --git a/reactos/dll/win32/acledit/acledit.c b/dll/win32/acledit/acledit.c similarity index 100% rename from reactos/dll/win32/acledit/acledit.c rename to dll/win32/acledit/acledit.c diff --git a/reactos/dll/win32/acledit/acledit.rbuild b/dll/win32/acledit/acledit.rbuild similarity index 100% rename from reactos/dll/win32/acledit/acledit.rbuild rename to dll/win32/acledit/acledit.rbuild diff --git a/reactos/dll/win32/acledit/acledit.rc b/dll/win32/acledit/acledit.rc similarity index 100% rename from reactos/dll/win32/acledit/acledit.rc rename to dll/win32/acledit/acledit.rc diff --git a/reactos/dll/win32/acledit/acledit.spec b/dll/win32/acledit/acledit.spec similarity index 100% rename from reactos/dll/win32/acledit/acledit.spec rename to dll/win32/acledit/acledit.spec diff --git a/reactos/dll/win32/acledit/acleditint.h b/dll/win32/acledit/acleditint.h similarity index 100% rename from reactos/dll/win32/acledit/acleditint.h rename to dll/win32/acledit/acleditint.h diff --git a/reactos/dll/win32/acledit/resource.h b/dll/win32/acledit/resource.h similarity index 100% rename from reactos/dll/win32/acledit/resource.h rename to dll/win32/acledit/resource.h diff --git a/reactos/dll/win32/acledit/stubs.c b/dll/win32/acledit/stubs.c similarity index 100% rename from reactos/dll/win32/acledit/stubs.c rename to dll/win32/acledit/stubs.c diff --git a/reactos/dll/win32/aclui/CMakeLists.txt b/dll/win32/aclui/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/aclui/CMakeLists.txt rename to dll/win32/aclui/CMakeLists.txt diff --git a/reactos/dll/win32/aclui/aclui.c b/dll/win32/aclui/aclui.c similarity index 100% rename from reactos/dll/win32/aclui/aclui.c rename to dll/win32/aclui/aclui.c diff --git a/reactos/dll/win32/aclui/aclui.rbuild b/dll/win32/aclui/aclui.rbuild similarity index 100% rename from reactos/dll/win32/aclui/aclui.rbuild rename to dll/win32/aclui/aclui.rbuild diff --git a/reactos/dll/win32/aclui/aclui.rc b/dll/win32/aclui/aclui.rc similarity index 100% rename from reactos/dll/win32/aclui/aclui.rc rename to dll/win32/aclui/aclui.rc diff --git a/reactos/dll/win32/aclui/aclui.spec b/dll/win32/aclui/aclui.spec similarity index 100% rename from reactos/dll/win32/aclui/aclui.spec rename to dll/win32/aclui/aclui.spec diff --git a/reactos/dll/win32/aclui/checklist.c b/dll/win32/aclui/checklist.c similarity index 100% rename from reactos/dll/win32/aclui/checklist.c rename to dll/win32/aclui/checklist.c diff --git a/reactos/dll/win32/aclui/guid.c b/dll/win32/aclui/guid.c similarity index 100% rename from reactos/dll/win32/aclui/guid.c rename to dll/win32/aclui/guid.c diff --git a/reactos/dll/win32/aclui/lang/bg-BG.rc b/dll/win32/aclui/lang/bg-BG.rc similarity index 100% rename from reactos/dll/win32/aclui/lang/bg-BG.rc rename to dll/win32/aclui/lang/bg-BG.rc diff --git a/reactos/dll/win32/aclui/lang/de-DE.rc b/dll/win32/aclui/lang/de-DE.rc similarity index 100% rename from reactos/dll/win32/aclui/lang/de-DE.rc rename to dll/win32/aclui/lang/de-DE.rc diff --git a/reactos/dll/win32/aclui/lang/el-GR.rc b/dll/win32/aclui/lang/el-GR.rc similarity index 100% rename from reactos/dll/win32/aclui/lang/el-GR.rc rename to dll/win32/aclui/lang/el-GR.rc diff --git a/reactos/dll/win32/aclui/lang/en-US.rc b/dll/win32/aclui/lang/en-US.rc similarity index 100% rename from reactos/dll/win32/aclui/lang/en-US.rc rename to dll/win32/aclui/lang/en-US.rc diff --git a/reactos/dll/win32/aclui/lang/es-ES.rc b/dll/win32/aclui/lang/es-ES.rc similarity index 100% rename from reactos/dll/win32/aclui/lang/es-ES.rc rename to dll/win32/aclui/lang/es-ES.rc diff --git a/reactos/dll/win32/aclui/lang/fr-FR.rc b/dll/win32/aclui/lang/fr-FR.rc similarity index 100% rename from reactos/dll/win32/aclui/lang/fr-FR.rc rename to dll/win32/aclui/lang/fr-FR.rc diff --git a/reactos/dll/win32/aclui/lang/hu-HU.rc b/dll/win32/aclui/lang/hu-HU.rc similarity index 100% rename from reactos/dll/win32/aclui/lang/hu-HU.rc rename to dll/win32/aclui/lang/hu-HU.rc diff --git a/reactos/dll/win32/aclui/lang/id-ID.rc b/dll/win32/aclui/lang/id-ID.rc similarity index 100% rename from reactos/dll/win32/aclui/lang/id-ID.rc rename to dll/win32/aclui/lang/id-ID.rc diff --git a/reactos/dll/win32/aclui/lang/it-IT.rc b/dll/win32/aclui/lang/it-IT.rc similarity index 100% rename from reactos/dll/win32/aclui/lang/it-IT.rc rename to dll/win32/aclui/lang/it-IT.rc diff --git a/reactos/dll/win32/aclui/lang/ja-JP.rc b/dll/win32/aclui/lang/ja-JP.rc similarity index 100% rename from reactos/dll/win32/aclui/lang/ja-JP.rc rename to dll/win32/aclui/lang/ja-JP.rc diff --git a/reactos/dll/win32/aclui/lang/lt-LT.rc b/dll/win32/aclui/lang/lt-LT.rc similarity index 100% rename from reactos/dll/win32/aclui/lang/lt-LT.rc rename to dll/win32/aclui/lang/lt-LT.rc diff --git a/reactos/dll/win32/aclui/lang/nl-NL.rc b/dll/win32/aclui/lang/nl-NL.rc similarity index 100% rename from reactos/dll/win32/aclui/lang/nl-NL.rc rename to dll/win32/aclui/lang/nl-NL.rc diff --git a/reactos/dll/win32/aclui/lang/no-NO.rc b/dll/win32/aclui/lang/no-NO.rc similarity index 100% rename from reactos/dll/win32/aclui/lang/no-NO.rc rename to dll/win32/aclui/lang/no-NO.rc diff --git a/reactos/dll/win32/aclui/lang/pl-PL.rc b/dll/win32/aclui/lang/pl-PL.rc similarity index 100% rename from reactos/dll/win32/aclui/lang/pl-PL.rc rename to dll/win32/aclui/lang/pl-PL.rc diff --git a/reactos/dll/win32/aclui/lang/ro-RO.rc b/dll/win32/aclui/lang/ro-RO.rc similarity index 100% rename from reactos/dll/win32/aclui/lang/ro-RO.rc rename to dll/win32/aclui/lang/ro-RO.rc diff --git a/reactos/dll/win32/aclui/lang/ru-RU.rc b/dll/win32/aclui/lang/ru-RU.rc similarity index 100% rename from reactos/dll/win32/aclui/lang/ru-RU.rc rename to dll/win32/aclui/lang/ru-RU.rc diff --git a/reactos/dll/win32/aclui/lang/sv-SE.rc b/dll/win32/aclui/lang/sv-SE.rc similarity index 100% rename from reactos/dll/win32/aclui/lang/sv-SE.rc rename to dll/win32/aclui/lang/sv-SE.rc diff --git a/reactos/dll/win32/aclui/lang/th-TH.rc b/dll/win32/aclui/lang/th-TH.rc similarity index 100% rename from reactos/dll/win32/aclui/lang/th-TH.rc rename to dll/win32/aclui/lang/th-TH.rc diff --git a/reactos/dll/win32/aclui/lang/uk-UA.rc b/dll/win32/aclui/lang/uk-UA.rc similarity index 100% rename from reactos/dll/win32/aclui/lang/uk-UA.rc rename to dll/win32/aclui/lang/uk-UA.rc diff --git a/reactos/dll/win32/aclui/misc.c b/dll/win32/aclui/misc.c similarity index 100% rename from reactos/dll/win32/aclui/misc.c rename to dll/win32/aclui/misc.c diff --git a/reactos/dll/win32/aclui/precomp.h b/dll/win32/aclui/precomp.h similarity index 100% rename from reactos/dll/win32/aclui/precomp.h rename to dll/win32/aclui/precomp.h diff --git a/reactos/dll/win32/aclui/res/usrgrp.bmp b/dll/win32/aclui/res/usrgrp.bmp similarity index 100% rename from reactos/dll/win32/aclui/res/usrgrp.bmp rename to dll/win32/aclui/res/usrgrp.bmp diff --git a/reactos/dll/win32/aclui/resource.h b/dll/win32/aclui/resource.h similarity index 100% rename from reactos/dll/win32/aclui/resource.h rename to dll/win32/aclui/resource.h diff --git a/reactos/dll/win32/aclui/rsrc.rc b/dll/win32/aclui/rsrc.rc similarity index 100% rename from reactos/dll/win32/aclui/rsrc.rc rename to dll/win32/aclui/rsrc.rc diff --git a/reactos/dll/win32/aclui/sidcache.c b/dll/win32/aclui/sidcache.c similarity index 100% rename from reactos/dll/win32/aclui/sidcache.c rename to dll/win32/aclui/sidcache.c diff --git a/reactos/dll/win32/activeds/CMakeLists.txt b/dll/win32/activeds/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/activeds/CMakeLists.txt rename to dll/win32/activeds/CMakeLists.txt diff --git a/reactos/dll/win32/activeds/activeds.rbuild b/dll/win32/activeds/activeds.rbuild similarity index 100% rename from reactos/dll/win32/activeds/activeds.rbuild rename to dll/win32/activeds/activeds.rbuild diff --git a/reactos/dll/win32/activeds/activeds.spec b/dll/win32/activeds/activeds.spec similarity index 100% rename from reactos/dll/win32/activeds/activeds.spec rename to dll/win32/activeds/activeds.spec diff --git a/reactos/dll/win32/activeds/activeds_main.c b/dll/win32/activeds/activeds_main.c similarity index 100% rename from reactos/dll/win32/activeds/activeds_main.c rename to dll/win32/activeds/activeds_main.c diff --git a/reactos/dll/win32/activeds/stubs.c b/dll/win32/activeds/stubs.c similarity index 100% rename from reactos/dll/win32/activeds/stubs.c rename to dll/win32/activeds/stubs.c diff --git a/reactos/dll/win32/actxprxy/CMakeLists.txt b/dll/win32/actxprxy/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/actxprxy/CMakeLists.txt rename to dll/win32/actxprxy/CMakeLists.txt diff --git a/reactos/dll/win32/actxprxy/actxprxy.rbuild b/dll/win32/actxprxy/actxprxy.rbuild similarity index 100% rename from reactos/dll/win32/actxprxy/actxprxy.rbuild rename to dll/win32/actxprxy/actxprxy.rbuild diff --git a/reactos/dll/win32/actxprxy/actxprxy.spec b/dll/win32/actxprxy/actxprxy.spec similarity index 100% rename from reactos/dll/win32/actxprxy/actxprxy.spec rename to dll/win32/actxprxy/actxprxy.spec diff --git a/reactos/dll/win32/actxprxy/actxprxy_activscp.idl b/dll/win32/actxprxy/actxprxy_activscp.idl similarity index 100% rename from reactos/dll/win32/actxprxy/actxprxy_activscp.idl rename to dll/win32/actxprxy/actxprxy_activscp.idl diff --git a/reactos/dll/win32/actxprxy/actxprxy_comcat.idl b/dll/win32/actxprxy/actxprxy_comcat.idl similarity index 100% rename from reactos/dll/win32/actxprxy/actxprxy_comcat.idl rename to dll/win32/actxprxy/actxprxy_comcat.idl diff --git a/reactos/dll/win32/actxprxy/actxprxy_docobj.idl b/dll/win32/actxprxy/actxprxy_docobj.idl similarity index 100% rename from reactos/dll/win32/actxprxy/actxprxy_docobj.idl rename to dll/win32/actxprxy/actxprxy_docobj.idl diff --git a/reactos/dll/win32/actxprxy/actxprxy_hlink.idl b/dll/win32/actxprxy/actxprxy_hlink.idl similarity index 100% rename from reactos/dll/win32/actxprxy/actxprxy_hlink.idl rename to dll/win32/actxprxy/actxprxy_hlink.idl diff --git a/reactos/dll/win32/actxprxy/actxprxy_htiframe.idl b/dll/win32/actxprxy/actxprxy_htiframe.idl similarity index 100% rename from reactos/dll/win32/actxprxy/actxprxy_htiframe.idl rename to dll/win32/actxprxy/actxprxy_htiframe.idl diff --git a/reactos/dll/win32/actxprxy/actxprxy_objsafe.idl b/dll/win32/actxprxy/actxprxy_objsafe.idl similarity index 100% rename from reactos/dll/win32/actxprxy/actxprxy_objsafe.idl rename to dll/win32/actxprxy/actxprxy_objsafe.idl diff --git a/reactos/dll/win32/actxprxy/actxprxy_ocmm.idl b/dll/win32/actxprxy/actxprxy_ocmm.idl similarity index 100% rename from reactos/dll/win32/actxprxy/actxprxy_ocmm.idl rename to dll/win32/actxprxy/actxprxy_ocmm.idl diff --git a/reactos/dll/win32/actxprxy/actxprxy_servprov.idl b/dll/win32/actxprxy/actxprxy_servprov.idl similarity index 100% rename from reactos/dll/win32/actxprxy/actxprxy_servprov.idl rename to dll/win32/actxprxy/actxprxy_servprov.idl diff --git a/reactos/dll/win32/actxprxy/actxprxy_shldisp.idl b/dll/win32/actxprxy/actxprxy_shldisp.idl similarity index 100% rename from reactos/dll/win32/actxprxy/actxprxy_shldisp.idl rename to dll/win32/actxprxy/actxprxy_shldisp.idl diff --git a/reactos/dll/win32/actxprxy/actxprxy_shobjidl.idl b/dll/win32/actxprxy/actxprxy_shobjidl.idl similarity index 100% rename from reactos/dll/win32/actxprxy/actxprxy_shobjidl.idl rename to dll/win32/actxprxy/actxprxy_shobjidl.idl diff --git a/reactos/dll/win32/actxprxy/actxprxy_urlhist.idl b/dll/win32/actxprxy/actxprxy_urlhist.idl similarity index 100% rename from reactos/dll/win32/actxprxy/actxprxy_urlhist.idl rename to dll/win32/actxprxy/actxprxy_urlhist.idl diff --git a/reactos/dll/win32/actxprxy/usrmarshal.c b/dll/win32/actxprxy/usrmarshal.c similarity index 100% rename from reactos/dll/win32/actxprxy/usrmarshal.c rename to dll/win32/actxprxy/usrmarshal.c diff --git a/reactos/dll/win32/advapi32/CMakeLists.txt b/dll/win32/advapi32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/advapi32/CMakeLists.txt rename to dll/win32/advapi32/CMakeLists.txt diff --git a/reactos/dll/win32/advapi32/advapi32.h b/dll/win32/advapi32/advapi32.h similarity index 100% rename from reactos/dll/win32/advapi32/advapi32.h rename to dll/win32/advapi32/advapi32.h diff --git a/reactos/dll/win32/advapi32/advapi32.rbuild b/dll/win32/advapi32/advapi32.rbuild similarity index 100% rename from reactos/dll/win32/advapi32/advapi32.rbuild rename to dll/win32/advapi32/advapi32.rbuild diff --git a/reactos/dll/win32/advapi32/advapi32.rc b/dll/win32/advapi32/advapi32.rc similarity index 100% rename from reactos/dll/win32/advapi32/advapi32.rc rename to dll/win32/advapi32/advapi32.rc diff --git a/reactos/dll/win32/advapi32/advapi32.spec b/dll/win32/advapi32/advapi32.spec similarity index 100% rename from reactos/dll/win32/advapi32/advapi32.spec rename to dll/win32/advapi32/advapi32.spec diff --git a/reactos/dll/win32/advapi32/crypt/crypt.c b/dll/win32/advapi32/crypt/crypt.c similarity index 100% rename from reactos/dll/win32/advapi32/crypt/crypt.c rename to dll/win32/advapi32/crypt/crypt.c diff --git a/reactos/dll/win32/advapi32/crypt/crypt.h b/dll/win32/advapi32/crypt/crypt.h similarity index 100% rename from reactos/dll/win32/advapi32/crypt/crypt.h rename to dll/win32/advapi32/crypt/crypt.h diff --git a/reactos/dll/win32/advapi32/crypt/crypt_arc4.c b/dll/win32/advapi32/crypt/crypt_arc4.c similarity index 100% rename from reactos/dll/win32/advapi32/crypt/crypt_arc4.c rename to dll/win32/advapi32/crypt/crypt_arc4.c diff --git a/reactos/dll/win32/advapi32/crypt/crypt_des.c b/dll/win32/advapi32/crypt/crypt_des.c similarity index 100% rename from reactos/dll/win32/advapi32/crypt/crypt_des.c rename to dll/win32/advapi32/crypt/crypt_des.c diff --git a/reactos/dll/win32/advapi32/crypt/crypt_lmhash.c b/dll/win32/advapi32/crypt/crypt_lmhash.c similarity index 100% rename from reactos/dll/win32/advapi32/crypt/crypt_lmhash.c rename to dll/win32/advapi32/crypt/crypt_lmhash.c diff --git a/reactos/dll/win32/advapi32/crypt/crypt_md4.c b/dll/win32/advapi32/crypt/crypt_md4.c similarity index 100% rename from reactos/dll/win32/advapi32/crypt/crypt_md4.c rename to dll/win32/advapi32/crypt/crypt_md4.c diff --git a/reactos/dll/win32/advapi32/crypt/crypt_md5.c b/dll/win32/advapi32/crypt/crypt_md5.c similarity index 100% rename from reactos/dll/win32/advapi32/crypt/crypt_md5.c rename to dll/win32/advapi32/crypt/crypt_md5.c diff --git a/reactos/dll/win32/advapi32/crypt/crypt_sha.c b/dll/win32/advapi32/crypt/crypt_sha.c similarity index 100% rename from reactos/dll/win32/advapi32/crypt/crypt_sha.c rename to dll/win32/advapi32/crypt/crypt_sha.c diff --git a/reactos/dll/win32/advapi32/crypt/ros_diff.patch b/dll/win32/advapi32/crypt/ros_diff.patch similarity index 100% rename from reactos/dll/win32/advapi32/crypt/ros_diff.patch rename to dll/win32/advapi32/crypt/ros_diff.patch diff --git a/reactos/dll/win32/advapi32/misc/dllmain.c b/dll/win32/advapi32/misc/dllmain.c similarity index 100% rename from reactos/dll/win32/advapi32/misc/dllmain.c rename to dll/win32/advapi32/misc/dllmain.c diff --git a/reactos/dll/win32/advapi32/misc/efs.c b/dll/win32/advapi32/misc/efs.c similarity index 100% rename from reactos/dll/win32/advapi32/misc/efs.c rename to dll/win32/advapi32/misc/efs.c diff --git a/reactos/dll/win32/advapi32/misc/hwprofiles.c b/dll/win32/advapi32/misc/hwprofiles.c similarity index 100% rename from reactos/dll/win32/advapi32/misc/hwprofiles.c rename to dll/win32/advapi32/misc/hwprofiles.c diff --git a/reactos/dll/win32/advapi32/misc/logon.c b/dll/win32/advapi32/misc/logon.c similarity index 100% rename from reactos/dll/win32/advapi32/misc/logon.c rename to dll/win32/advapi32/misc/logon.c diff --git a/reactos/dll/win32/advapi32/misc/msi.c b/dll/win32/advapi32/misc/msi.c similarity index 100% rename from reactos/dll/win32/advapi32/misc/msi.c rename to dll/win32/advapi32/misc/msi.c diff --git a/reactos/dll/win32/advapi32/misc/shutdown.c b/dll/win32/advapi32/misc/shutdown.c similarity index 100% rename from reactos/dll/win32/advapi32/misc/shutdown.c rename to dll/win32/advapi32/misc/shutdown.c diff --git a/reactos/dll/win32/advapi32/misc/sysfunc.c b/dll/win32/advapi32/misc/sysfunc.c similarity index 100% rename from reactos/dll/win32/advapi32/misc/sysfunc.c rename to dll/win32/advapi32/misc/sysfunc.c diff --git a/reactos/dll/win32/advapi32/misc/trace.c b/dll/win32/advapi32/misc/trace.c similarity index 100% rename from reactos/dll/win32/advapi32/misc/trace.c rename to dll/win32/advapi32/misc/trace.c diff --git a/reactos/dll/win32/advapi32/reg/reg.c b/dll/win32/advapi32/reg/reg.c similarity index 100% rename from reactos/dll/win32/advapi32/reg/reg.c rename to dll/win32/advapi32/reg/reg.c diff --git a/reactos/dll/win32/advapi32/sec/ac.c b/dll/win32/advapi32/sec/ac.c similarity index 100% rename from reactos/dll/win32/advapi32/sec/ac.c rename to dll/win32/advapi32/sec/ac.c diff --git a/reactos/dll/win32/advapi32/sec/audit.c b/dll/win32/advapi32/sec/audit.c similarity index 100% rename from reactos/dll/win32/advapi32/sec/audit.c rename to dll/win32/advapi32/sec/audit.c diff --git a/reactos/dll/win32/advapi32/sec/cred.c b/dll/win32/advapi32/sec/cred.c similarity index 100% rename from reactos/dll/win32/advapi32/sec/cred.c rename to dll/win32/advapi32/sec/cred.c diff --git a/reactos/dll/win32/advapi32/sec/lsa.c b/dll/win32/advapi32/sec/lsa.c similarity index 100% rename from reactos/dll/win32/advapi32/sec/lsa.c rename to dll/win32/advapi32/sec/lsa.c diff --git a/reactos/dll/win32/advapi32/sec/misc.c b/dll/win32/advapi32/sec/misc.c similarity index 100% rename from reactos/dll/win32/advapi32/sec/misc.c rename to dll/win32/advapi32/sec/misc.c diff --git a/reactos/dll/win32/advapi32/sec/sec.c b/dll/win32/advapi32/sec/sec.c similarity index 100% rename from reactos/dll/win32/advapi32/sec/sec.c rename to dll/win32/advapi32/sec/sec.c diff --git a/reactos/dll/win32/advapi32/sec/sid.c b/dll/win32/advapi32/sec/sid.c similarity index 100% rename from reactos/dll/win32/advapi32/sec/sid.c rename to dll/win32/advapi32/sec/sid.c diff --git a/reactos/dll/win32/advapi32/sec/trustee.c b/dll/win32/advapi32/sec/trustee.c similarity index 100% rename from reactos/dll/win32/advapi32/sec/trustee.c rename to dll/win32/advapi32/sec/trustee.c diff --git a/reactos/dll/win32/advapi32/service/eventlog.c b/dll/win32/advapi32/service/eventlog.c similarity index 100% rename from reactos/dll/win32/advapi32/service/eventlog.c rename to dll/win32/advapi32/service/eventlog.c diff --git a/reactos/dll/win32/advapi32/service/rpc.c b/dll/win32/advapi32/service/rpc.c similarity index 100% rename from reactos/dll/win32/advapi32/service/rpc.c rename to dll/win32/advapi32/service/rpc.c diff --git a/reactos/dll/win32/advapi32/service/scm.c b/dll/win32/advapi32/service/scm.c similarity index 100% rename from reactos/dll/win32/advapi32/service/scm.c rename to dll/win32/advapi32/service/scm.c diff --git a/reactos/dll/win32/advapi32/service/sctrl.c b/dll/win32/advapi32/service/sctrl.c similarity index 100% rename from reactos/dll/win32/advapi32/service/sctrl.c rename to dll/win32/advapi32/service/sctrl.c diff --git a/reactos/dll/win32/advapi32/token/privilege.c b/dll/win32/advapi32/token/privilege.c similarity index 100% rename from reactos/dll/win32/advapi32/token/privilege.c rename to dll/win32/advapi32/token/privilege.c diff --git a/reactos/dll/win32/advapi32/token/token.c b/dll/win32/advapi32/token/token.c similarity index 100% rename from reactos/dll/win32/advapi32/token/token.c rename to dll/win32/advapi32/token/token.c diff --git a/reactos/dll/win32/advpack/CMakeLists.txt b/dll/win32/advpack/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/advpack/CMakeLists.txt rename to dll/win32/advpack/CMakeLists.txt diff --git a/reactos/dll/win32/advpack/advpack.c b/dll/win32/advpack/advpack.c similarity index 100% rename from reactos/dll/win32/advpack/advpack.c rename to dll/win32/advpack/advpack.c diff --git a/reactos/dll/win32/advpack/advpack.rbuild b/dll/win32/advpack/advpack.rbuild similarity index 100% rename from reactos/dll/win32/advpack/advpack.rbuild rename to dll/win32/advpack/advpack.rbuild diff --git a/reactos/dll/win32/advpack/advpack.spec b/dll/win32/advpack/advpack.spec similarity index 100% rename from reactos/dll/win32/advpack/advpack.spec rename to dll/win32/advpack/advpack.spec diff --git a/reactos/dll/win32/advpack/advpack_private.h b/dll/win32/advpack/advpack_private.h similarity index 100% rename from reactos/dll/win32/advpack/advpack_private.h rename to dll/win32/advpack/advpack_private.h diff --git a/reactos/dll/win32/advpack/files.c b/dll/win32/advpack/files.c similarity index 100% rename from reactos/dll/win32/advpack/files.c rename to dll/win32/advpack/files.c diff --git a/reactos/dll/win32/advpack/install.c b/dll/win32/advpack/install.c similarity index 100% rename from reactos/dll/win32/advpack/install.c rename to dll/win32/advpack/install.c diff --git a/reactos/dll/win32/advpack/reg.c b/dll/win32/advpack/reg.c similarity index 100% rename from reactos/dll/win32/advpack/reg.c rename to dll/win32/advpack/reg.c diff --git a/reactos/dll/win32/atl/CMakeLists.txt b/dll/win32/atl/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/atl/CMakeLists.txt rename to dll/win32/atl/CMakeLists.txt diff --git a/reactos/dll/win32/atl/atl.rbuild b/dll/win32/atl/atl.rbuild similarity index 100% rename from reactos/dll/win32/atl/atl.rbuild rename to dll/win32/atl/atl.rbuild diff --git a/reactos/dll/win32/atl/atl.rgs b/dll/win32/atl/atl.rgs similarity index 100% rename from reactos/dll/win32/atl/atl.rgs rename to dll/win32/atl/atl.rgs diff --git a/reactos/dll/win32/atl/atl.spec b/dll/win32/atl/atl.spec similarity index 100% rename from reactos/dll/win32/atl/atl.spec rename to dll/win32/atl/atl.spec diff --git a/reactos/dll/win32/atl/atl_ax.c b/dll/win32/atl/atl_ax.c similarity index 100% rename from reactos/dll/win32/atl/atl_ax.c rename to dll/win32/atl/atl_ax.c diff --git a/reactos/dll/win32/atl/atl_main.c b/dll/win32/atl/atl_main.c similarity index 100% rename from reactos/dll/win32/atl/atl_main.c rename to dll/win32/atl/atl_main.c diff --git a/reactos/dll/win32/atl/atl_ros.diff b/dll/win32/atl/atl_ros.diff similarity index 100% rename from reactos/dll/win32/atl/atl_ros.diff rename to dll/win32/atl/atl_ros.diff diff --git a/reactos/dll/win32/atl/atlbase.h b/dll/win32/atl/atlbase.h similarity index 100% rename from reactos/dll/win32/atl/atlbase.h rename to dll/win32/atl/atlbase.h diff --git a/reactos/dll/win32/atl/atliface.idl b/dll/win32/atl/atliface.idl similarity index 100% rename from reactos/dll/win32/atl/atliface.idl rename to dll/win32/atl/atliface.idl diff --git a/reactos/dll/win32/atl/atlwin.h b/dll/win32/atl/atlwin.h similarity index 100% rename from reactos/dll/win32/atl/atlwin.h rename to dll/win32/atl/atlwin.h diff --git a/reactos/dll/win32/atl/registrar.c b/dll/win32/atl/registrar.c similarity index 100% rename from reactos/dll/win32/atl/registrar.c rename to dll/win32/atl/registrar.c diff --git a/reactos/dll/win32/atl/rsrc.rc b/dll/win32/atl/rsrc.rc similarity index 100% rename from reactos/dll/win32/atl/rsrc.rc rename to dll/win32/atl/rsrc.rc diff --git a/reactos/dll/win32/atl/stubs.c b/dll/win32/atl/stubs.c similarity index 100% rename from reactos/dll/win32/atl/stubs.c rename to dll/win32/atl/stubs.c diff --git a/reactos/dll/win32/authz/CMakeLists.txt b/dll/win32/authz/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/authz/CMakeLists.txt rename to dll/win32/authz/CMakeLists.txt diff --git a/reactos/dll/win32/authz/authz.c b/dll/win32/authz/authz.c similarity index 100% rename from reactos/dll/win32/authz/authz.c rename to dll/win32/authz/authz.c diff --git a/reactos/dll/win32/authz/authz.rbuild b/dll/win32/authz/authz.rbuild similarity index 100% rename from reactos/dll/win32/authz/authz.rbuild rename to dll/win32/authz/authz.rbuild diff --git a/reactos/dll/win32/authz/authz.rc b/dll/win32/authz/authz.rc similarity index 100% rename from reactos/dll/win32/authz/authz.rc rename to dll/win32/authz/authz.rc diff --git a/reactos/dll/win32/authz/authz.spec b/dll/win32/authz/authz.spec similarity index 100% rename from reactos/dll/win32/authz/authz.spec rename to dll/win32/authz/authz.spec diff --git a/reactos/dll/win32/authz/clictx.c b/dll/win32/authz/clictx.c similarity index 100% rename from reactos/dll/win32/authz/clictx.c rename to dll/win32/authz/clictx.c diff --git a/reactos/dll/win32/authz/precomp.h b/dll/win32/authz/precomp.h similarity index 100% rename from reactos/dll/win32/authz/precomp.h rename to dll/win32/authz/precomp.h diff --git a/reactos/dll/win32/authz/resman.c b/dll/win32/authz/resman.c similarity index 100% rename from reactos/dll/win32/authz/resman.c rename to dll/win32/authz/resman.c diff --git a/reactos/dll/win32/avicap32/CMakeLists.txt b/dll/win32/avicap32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/avicap32/CMakeLists.txt rename to dll/win32/avicap32/CMakeLists.txt diff --git a/reactos/dll/win32/avicap32/avicap32.c b/dll/win32/avicap32/avicap32.c similarity index 100% rename from reactos/dll/win32/avicap32/avicap32.c rename to dll/win32/avicap32/avicap32.c diff --git a/reactos/dll/win32/avicap32/avicap32.rbuild b/dll/win32/avicap32/avicap32.rbuild similarity index 100% rename from reactos/dll/win32/avicap32/avicap32.rbuild rename to dll/win32/avicap32/avicap32.rbuild diff --git a/reactos/dll/win32/avicap32/avicap32.rc b/dll/win32/avicap32/avicap32.rc similarity index 100% rename from reactos/dll/win32/avicap32/avicap32.rc rename to dll/win32/avicap32/avicap32.rc diff --git a/reactos/dll/win32/avicap32/avicap32.spec b/dll/win32/avicap32/avicap32.spec similarity index 100% rename from reactos/dll/win32/avicap32/avicap32.spec rename to dll/win32/avicap32/avicap32.spec diff --git a/reactos/dll/win32/avifil32/CMakeLists.txt b/dll/win32/avifil32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/avifil32/CMakeLists.txt rename to dll/win32/avifil32/CMakeLists.txt diff --git a/reactos/dll/win32/avifil32/acmstream.c b/dll/win32/avifil32/acmstream.c similarity index 100% rename from reactos/dll/win32/avifil32/acmstream.c rename to dll/win32/avifil32/acmstream.c diff --git a/reactos/dll/win32/avifil32/api.c b/dll/win32/avifil32/api.c similarity index 100% rename from reactos/dll/win32/avifil32/api.c rename to dll/win32/avifil32/api.c diff --git a/reactos/dll/win32/avifil32/avifil32.rbuild b/dll/win32/avifil32/avifil32.rbuild similarity index 100% rename from reactos/dll/win32/avifil32/avifil32.rbuild rename to dll/win32/avifil32/avifil32.rbuild diff --git a/reactos/dll/win32/avifil32/avifil32.spec b/dll/win32/avifil32/avifil32.spec similarity index 100% rename from reactos/dll/win32/avifil32/avifil32.spec rename to dll/win32/avifil32/avifil32.spec diff --git a/reactos/dll/win32/avifil32/avifile.c b/dll/win32/avifil32/avifile.c similarity index 100% rename from reactos/dll/win32/avifil32/avifile.c rename to dll/win32/avifil32/avifile.c diff --git a/reactos/dll/win32/avifil32/avifile_Bg.rc b/dll/win32/avifil32/avifile_Bg.rc similarity index 100% rename from reactos/dll/win32/avifil32/avifile_Bg.rc rename to dll/win32/avifil32/avifile_Bg.rc diff --git a/reactos/dll/win32/avifil32/avifile_Cs.rc b/dll/win32/avifil32/avifile_Cs.rc similarity index 100% rename from reactos/dll/win32/avifil32/avifile_Cs.rc rename to dll/win32/avifil32/avifile_Cs.rc diff --git a/reactos/dll/win32/avifil32/avifile_Da.rc b/dll/win32/avifil32/avifile_Da.rc similarity index 100% rename from reactos/dll/win32/avifil32/avifile_Da.rc rename to dll/win32/avifil32/avifile_Da.rc diff --git a/reactos/dll/win32/avifil32/avifile_De.rc b/dll/win32/avifil32/avifile_De.rc similarity index 100% rename from reactos/dll/win32/avifil32/avifile_De.rc rename to dll/win32/avifil32/avifile_De.rc diff --git a/reactos/dll/win32/avifil32/avifile_En.rc b/dll/win32/avifil32/avifile_En.rc similarity index 100% rename from reactos/dll/win32/avifil32/avifile_En.rc rename to dll/win32/avifil32/avifile_En.rc diff --git a/reactos/dll/win32/avifil32/avifile_Es.rc b/dll/win32/avifil32/avifile_Es.rc similarity index 100% rename from reactos/dll/win32/avifil32/avifile_Es.rc rename to dll/win32/avifil32/avifile_Es.rc diff --git a/reactos/dll/win32/avifil32/avifile_Fr.rc b/dll/win32/avifil32/avifile_Fr.rc similarity index 100% rename from reactos/dll/win32/avifil32/avifile_Fr.rc rename to dll/win32/avifil32/avifile_Fr.rc diff --git a/reactos/dll/win32/avifil32/avifile_Hu.rc b/dll/win32/avifil32/avifile_Hu.rc similarity index 100% rename from reactos/dll/win32/avifil32/avifile_Hu.rc rename to dll/win32/avifil32/avifile_Hu.rc diff --git a/reactos/dll/win32/avifil32/avifile_It.rc b/dll/win32/avifil32/avifile_It.rc similarity index 100% rename from reactos/dll/win32/avifil32/avifile_It.rc rename to dll/win32/avifil32/avifile_It.rc diff --git a/reactos/dll/win32/avifil32/avifile_Ja.rc b/dll/win32/avifil32/avifile_Ja.rc similarity index 100% rename from reactos/dll/win32/avifil32/avifile_Ja.rc rename to dll/win32/avifil32/avifile_Ja.rc diff --git a/reactos/dll/win32/avifil32/avifile_Ko.rc b/dll/win32/avifil32/avifile_Ko.rc similarity index 100% rename from reactos/dll/win32/avifil32/avifile_Ko.rc rename to dll/win32/avifil32/avifile_Ko.rc diff --git a/reactos/dll/win32/avifil32/avifile_Lt.rc b/dll/win32/avifil32/avifile_Lt.rc similarity index 100% rename from reactos/dll/win32/avifil32/avifile_Lt.rc rename to dll/win32/avifil32/avifile_Lt.rc diff --git a/reactos/dll/win32/avifil32/avifile_Nl.rc b/dll/win32/avifil32/avifile_Nl.rc similarity index 100% rename from reactos/dll/win32/avifil32/avifile_Nl.rc rename to dll/win32/avifil32/avifile_Nl.rc diff --git a/reactos/dll/win32/avifil32/avifile_No.rc b/dll/win32/avifil32/avifile_No.rc similarity index 100% rename from reactos/dll/win32/avifil32/avifile_No.rc rename to dll/win32/avifil32/avifile_No.rc diff --git a/reactos/dll/win32/avifil32/avifile_Pl.rc b/dll/win32/avifil32/avifile_Pl.rc similarity index 100% rename from reactos/dll/win32/avifil32/avifile_Pl.rc rename to dll/win32/avifil32/avifile_Pl.rc diff --git a/reactos/dll/win32/avifil32/avifile_Pt.rc b/dll/win32/avifil32/avifile_Pt.rc similarity index 100% rename from reactos/dll/win32/avifil32/avifile_Pt.rc rename to dll/win32/avifil32/avifile_Pt.rc diff --git a/reactos/dll/win32/avifil32/avifile_Ro.rc b/dll/win32/avifil32/avifile_Ro.rc similarity index 100% rename from reactos/dll/win32/avifil32/avifile_Ro.rc rename to dll/win32/avifil32/avifile_Ro.rc diff --git a/reactos/dll/win32/avifil32/avifile_Ru.rc b/dll/win32/avifil32/avifile_Ru.rc similarity index 100% rename from reactos/dll/win32/avifil32/avifile_Ru.rc rename to dll/win32/avifil32/avifile_Ru.rc diff --git a/reactos/dll/win32/avifil32/avifile_Si.rc b/dll/win32/avifil32/avifile_Si.rc similarity index 100% rename from reactos/dll/win32/avifil32/avifile_Si.rc rename to dll/win32/avifil32/avifile_Si.rc diff --git a/reactos/dll/win32/avifil32/avifile_Sv.rc b/dll/win32/avifil32/avifile_Sv.rc similarity index 100% rename from reactos/dll/win32/avifil32/avifile_Sv.rc rename to dll/win32/avifil32/avifile_Sv.rc diff --git a/reactos/dll/win32/avifil32/avifile_Tr.rc b/dll/win32/avifil32/avifile_Tr.rc similarity index 100% rename from reactos/dll/win32/avifil32/avifile_Tr.rc rename to dll/win32/avifil32/avifile_Tr.rc diff --git a/reactos/dll/win32/avifil32/avifile_Uk.rc b/dll/win32/avifil32/avifile_Uk.rc similarity index 100% rename from reactos/dll/win32/avifil32/avifile_Uk.rc rename to dll/win32/avifil32/avifile_Uk.rc diff --git a/reactos/dll/win32/avifil32/avifile_Zh.rc b/dll/win32/avifil32/avifile_Zh.rc similarity index 100% rename from reactos/dll/win32/avifil32/avifile_Zh.rc rename to dll/win32/avifil32/avifile_Zh.rc diff --git a/reactos/dll/win32/avifil32/avifile_private.h b/dll/win32/avifil32/avifile_private.h similarity index 100% rename from reactos/dll/win32/avifil32/avifile_private.h rename to dll/win32/avifil32/avifile_private.h diff --git a/reactos/dll/win32/avifil32/editstream.c b/dll/win32/avifil32/editstream.c similarity index 100% rename from reactos/dll/win32/avifil32/editstream.c rename to dll/win32/avifil32/editstream.c diff --git a/reactos/dll/win32/avifil32/extrachunk.c b/dll/win32/avifil32/extrachunk.c similarity index 100% rename from reactos/dll/win32/avifil32/extrachunk.c rename to dll/win32/avifil32/extrachunk.c diff --git a/reactos/dll/win32/avifil32/extrachunk.h b/dll/win32/avifil32/extrachunk.h similarity index 100% rename from reactos/dll/win32/avifil32/extrachunk.h rename to dll/win32/avifil32/extrachunk.h diff --git a/reactos/dll/win32/avifil32/factory.c b/dll/win32/avifil32/factory.c similarity index 100% rename from reactos/dll/win32/avifil32/factory.c rename to dll/win32/avifil32/factory.c diff --git a/reactos/dll/win32/avifil32/getframe.c b/dll/win32/avifil32/getframe.c similarity index 100% rename from reactos/dll/win32/avifil32/getframe.c rename to dll/win32/avifil32/getframe.c diff --git a/reactos/dll/win32/avifil32/icmstream.c b/dll/win32/avifil32/icmstream.c similarity index 100% rename from reactos/dll/win32/avifil32/icmstream.c rename to dll/win32/avifil32/icmstream.c diff --git a/reactos/dll/win32/avifil32/regsvr.c b/dll/win32/avifil32/regsvr.c similarity index 100% rename from reactos/dll/win32/avifil32/regsvr.c rename to dll/win32/avifil32/regsvr.c diff --git a/reactos/dll/win32/avifil32/rsrc.rc b/dll/win32/avifil32/rsrc.rc similarity index 100% rename from reactos/dll/win32/avifil32/rsrc.rc rename to dll/win32/avifil32/rsrc.rc diff --git a/reactos/dll/win32/avifil32/tmpfile.c b/dll/win32/avifil32/tmpfile.c similarity index 100% rename from reactos/dll/win32/avifil32/tmpfile.c rename to dll/win32/avifil32/tmpfile.c diff --git a/reactos/dll/win32/avifil32/wavfile.c b/dll/win32/avifil32/wavfile.c similarity index 100% rename from reactos/dll/win32/avifil32/wavfile.c rename to dll/win32/avifil32/wavfile.c diff --git a/reactos/dll/win32/batt/CMakeLists.txt b/dll/win32/batt/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/batt/CMakeLists.txt rename to dll/win32/batt/CMakeLists.txt diff --git a/reactos/dll/win32/batt/batt.c b/dll/win32/batt/batt.c similarity index 100% rename from reactos/dll/win32/batt/batt.c rename to dll/win32/batt/batt.c diff --git a/reactos/dll/win32/batt/batt.rbuild b/dll/win32/batt/batt.rbuild similarity index 100% rename from reactos/dll/win32/batt/batt.rbuild rename to dll/win32/batt/batt.rbuild diff --git a/reactos/dll/win32/batt/batt.rc b/dll/win32/batt/batt.rc similarity index 100% rename from reactos/dll/win32/batt/batt.rc rename to dll/win32/batt/batt.rc diff --git a/reactos/dll/win32/batt/batt.spec b/dll/win32/batt/batt.spec similarity index 100% rename from reactos/dll/win32/batt/batt.spec rename to dll/win32/batt/batt.spec diff --git a/reactos/dll/win32/batt/resource.h b/dll/win32/batt/resource.h similarity index 100% rename from reactos/dll/win32/batt/resource.h rename to dll/win32/batt/resource.h diff --git a/reactos/dll/win32/batt/resources/battery.ico b/dll/win32/batt/resources/battery.ico similarity index 100% rename from reactos/dll/win32/batt/resources/battery.ico rename to dll/win32/batt/resources/battery.ico diff --git a/reactos/dll/win32/bcrypt/CMakeLists.txt b/dll/win32/bcrypt/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/bcrypt/CMakeLists.txt rename to dll/win32/bcrypt/CMakeLists.txt diff --git a/reactos/dll/win32/bcrypt/bcrypt.rbuild b/dll/win32/bcrypt/bcrypt.rbuild similarity index 100% rename from reactos/dll/win32/bcrypt/bcrypt.rbuild rename to dll/win32/bcrypt/bcrypt.rbuild diff --git a/reactos/dll/win32/bcrypt/bcrypt.spec b/dll/win32/bcrypt/bcrypt.spec similarity index 100% rename from reactos/dll/win32/bcrypt/bcrypt.spec rename to dll/win32/bcrypt/bcrypt.spec diff --git a/reactos/dll/win32/bcrypt/bcrypt_main.c b/dll/win32/bcrypt/bcrypt_main.c similarity index 100% rename from reactos/dll/win32/bcrypt/bcrypt_main.c rename to dll/win32/bcrypt/bcrypt_main.c diff --git a/reactos/dll/win32/bcrypt/version.rc b/dll/win32/bcrypt/version.rc similarity index 100% rename from reactos/dll/win32/bcrypt/version.rc rename to dll/win32/bcrypt/version.rc diff --git a/reactos/dll/win32/beepmidi/CMakeLists.txt b/dll/win32/beepmidi/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/beepmidi/CMakeLists.txt rename to dll/win32/beepmidi/CMakeLists.txt diff --git a/reactos/dll/win32/beepmidi/beepmidi.c b/dll/win32/beepmidi/beepmidi.c similarity index 100% rename from reactos/dll/win32/beepmidi/beepmidi.c rename to dll/win32/beepmidi/beepmidi.c diff --git a/reactos/dll/win32/beepmidi/beepmidi.rbuild b/dll/win32/beepmidi/beepmidi.rbuild similarity index 100% rename from reactos/dll/win32/beepmidi/beepmidi.rbuild rename to dll/win32/beepmidi/beepmidi.rbuild diff --git a/reactos/dll/win32/beepmidi/beepmidi.spec b/dll/win32/beepmidi/beepmidi.spec similarity index 100% rename from reactos/dll/win32/beepmidi/beepmidi.spec rename to dll/win32/beepmidi/beepmidi.spec diff --git a/reactos/dll/win32/beepmidi/readme.txt b/dll/win32/beepmidi/readme.txt similarity index 100% rename from reactos/dll/win32/beepmidi/readme.txt rename to dll/win32/beepmidi/readme.txt diff --git a/reactos/dll/win32/browseui/CMakeLists.txt b/dll/win32/browseui/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/browseui/CMakeLists.txt rename to dll/win32/browseui/CMakeLists.txt diff --git a/reactos/dll/win32/browseui/aclmulti.cpp b/dll/win32/browseui/aclmulti.cpp similarity index 100% rename from reactos/dll/win32/browseui/aclmulti.cpp rename to dll/win32/browseui/aclmulti.cpp diff --git a/reactos/dll/win32/browseui/aclmulti.h b/dll/win32/browseui/aclmulti.h similarity index 100% rename from reactos/dll/win32/browseui/aclmulti.h rename to dll/win32/browseui/aclmulti.h diff --git a/reactos/dll/win32/browseui/addressband.cpp b/dll/win32/browseui/addressband.cpp similarity index 100% rename from reactos/dll/win32/browseui/addressband.cpp rename to dll/win32/browseui/addressband.cpp diff --git a/reactos/dll/win32/browseui/addressband.h b/dll/win32/browseui/addressband.h similarity index 100% rename from reactos/dll/win32/browseui/addressband.h rename to dll/win32/browseui/addressband.h diff --git a/reactos/dll/win32/browseui/addresseditbox.cpp b/dll/win32/browseui/addresseditbox.cpp similarity index 100% rename from reactos/dll/win32/browseui/addresseditbox.cpp rename to dll/win32/browseui/addresseditbox.cpp diff --git a/reactos/dll/win32/browseui/addresseditbox.h b/dll/win32/browseui/addresseditbox.h similarity index 100% rename from reactos/dll/win32/browseui/addresseditbox.h rename to dll/win32/browseui/addresseditbox.h diff --git a/reactos/dll/win32/browseui/bandproxy.cpp b/dll/win32/browseui/bandproxy.cpp similarity index 100% rename from reactos/dll/win32/browseui/bandproxy.cpp rename to dll/win32/browseui/bandproxy.cpp diff --git a/reactos/dll/win32/browseui/bandproxy.h b/dll/win32/browseui/bandproxy.h similarity index 100% rename from reactos/dll/win32/browseui/bandproxy.h rename to dll/win32/browseui/bandproxy.h diff --git a/reactos/dll/win32/browseui/bandsite.cpp b/dll/win32/browseui/bandsite.cpp similarity index 100% rename from reactos/dll/win32/browseui/bandsite.cpp rename to dll/win32/browseui/bandsite.cpp diff --git a/reactos/dll/win32/browseui/bandsite.h b/dll/win32/browseui/bandsite.h similarity index 100% rename from reactos/dll/win32/browseui/bandsite.h rename to dll/win32/browseui/bandsite.h diff --git a/reactos/dll/win32/browseui/bandsitemenu.cpp b/dll/win32/browseui/bandsitemenu.cpp similarity index 100% rename from reactos/dll/win32/browseui/bandsitemenu.cpp rename to dll/win32/browseui/bandsitemenu.cpp diff --git a/reactos/dll/win32/browseui/bandsitemenu.h b/dll/win32/browseui/bandsitemenu.h similarity index 100% rename from reactos/dll/win32/browseui/bandsitemenu.h rename to dll/win32/browseui/bandsitemenu.h diff --git a/reactos/dll/win32/browseui/basebar.cpp b/dll/win32/browseui/basebar.cpp similarity index 100% rename from reactos/dll/win32/browseui/basebar.cpp rename to dll/win32/browseui/basebar.cpp diff --git a/reactos/dll/win32/browseui/basebarsite.cpp b/dll/win32/browseui/basebarsite.cpp similarity index 100% rename from reactos/dll/win32/browseui/basebarsite.cpp rename to dll/win32/browseui/basebarsite.cpp diff --git a/reactos/dll/win32/browseui/brandband.cpp b/dll/win32/browseui/brandband.cpp similarity index 100% rename from reactos/dll/win32/browseui/brandband.cpp rename to dll/win32/browseui/brandband.cpp diff --git a/reactos/dll/win32/browseui/brandband.h b/dll/win32/browseui/brandband.h similarity index 100% rename from reactos/dll/win32/browseui/brandband.h rename to dll/win32/browseui/brandband.h diff --git a/reactos/dll/win32/browseui/browseui.cpp b/dll/win32/browseui/browseui.cpp similarity index 100% rename from reactos/dll/win32/browseui/browseui.cpp rename to dll/win32/browseui/browseui.cpp diff --git a/reactos/dll/win32/browseui/browseui.rbuild b/dll/win32/browseui/browseui.rbuild similarity index 100% rename from reactos/dll/win32/browseui/browseui.rbuild rename to dll/win32/browseui/browseui.rbuild diff --git a/reactos/dll/win32/browseui/browseui.rc b/dll/win32/browseui/browseui.rc similarity index 100% rename from reactos/dll/win32/browseui/browseui.rc rename to dll/win32/browseui/browseui.rc diff --git a/reactos/dll/win32/browseui/browseui.spec b/dll/win32/browseui/browseui.spec similarity index 100% rename from reactos/dll/win32/browseui/browseui.spec rename to dll/win32/browseui/browseui.spec diff --git a/reactos/dll/win32/browseui/browseui_ros.diff b/dll/win32/browseui/browseui_ros.diff similarity index 100% rename from reactos/dll/win32/browseui/browseui_ros.diff rename to dll/win32/browseui/browseui_ros.diff diff --git a/reactos/dll/win32/browseui/browseuiord.cpp b/dll/win32/browseui/browseuiord.cpp similarity index 100% rename from reactos/dll/win32/browseui/browseuiord.cpp rename to dll/win32/browseui/browseuiord.cpp diff --git a/reactos/dll/win32/browseui/commonbrowser.cpp b/dll/win32/browseui/commonbrowser.cpp similarity index 100% rename from reactos/dll/win32/browseui/commonbrowser.cpp rename to dll/win32/browseui/commonbrowser.cpp diff --git a/reactos/dll/win32/browseui/commonbrowser.h b/dll/win32/browseui/commonbrowser.h similarity index 100% rename from reactos/dll/win32/browseui/commonbrowser.h rename to dll/win32/browseui/commonbrowser.h diff --git a/reactos/dll/win32/browseui/dllinstall.c b/dll/win32/browseui/dllinstall.c similarity index 100% rename from reactos/dll/win32/browseui/dllinstall.c rename to dll/win32/browseui/dllinstall.c diff --git a/reactos/dll/win32/browseui/globalfoldersettings.cpp b/dll/win32/browseui/globalfoldersettings.cpp similarity index 100% rename from reactos/dll/win32/browseui/globalfoldersettings.cpp rename to dll/win32/browseui/globalfoldersettings.cpp diff --git a/reactos/dll/win32/browseui/globalfoldersettings.h b/dll/win32/browseui/globalfoldersettings.h similarity index 100% rename from reactos/dll/win32/browseui/globalfoldersettings.h rename to dll/win32/browseui/globalfoldersettings.h diff --git a/reactos/dll/win32/browseui/internettoolbar.cpp b/dll/win32/browseui/internettoolbar.cpp similarity index 100% rename from reactos/dll/win32/browseui/internettoolbar.cpp rename to dll/win32/browseui/internettoolbar.cpp diff --git a/reactos/dll/win32/browseui/internettoolbar.h b/dll/win32/browseui/internettoolbar.h similarity index 100% rename from reactos/dll/win32/browseui/internettoolbar.h rename to dll/win32/browseui/internettoolbar.h diff --git a/reactos/dll/win32/browseui/lang/bg-BG.rc b/dll/win32/browseui/lang/bg-BG.rc similarity index 100% rename from reactos/dll/win32/browseui/lang/bg-BG.rc rename to dll/win32/browseui/lang/bg-BG.rc diff --git a/reactos/dll/win32/browseui/lang/en-US.rc b/dll/win32/browseui/lang/en-US.rc similarity index 100% rename from reactos/dll/win32/browseui/lang/en-US.rc rename to dll/win32/browseui/lang/en-US.rc diff --git a/reactos/dll/win32/browseui/lang/es-ES.rc b/dll/win32/browseui/lang/es-ES.rc similarity index 100% rename from reactos/dll/win32/browseui/lang/es-ES.rc rename to dll/win32/browseui/lang/es-ES.rc diff --git a/reactos/dll/win32/browseui/lang/pl-PL.rc b/dll/win32/browseui/lang/pl-PL.rc similarity index 100% rename from reactos/dll/win32/browseui/lang/pl-PL.rc rename to dll/win32/browseui/lang/pl-PL.rc diff --git a/reactos/dll/win32/browseui/lang/ro-RO.rc b/dll/win32/browseui/lang/ro-RO.rc similarity index 100% rename from reactos/dll/win32/browseui/lang/ro-RO.rc rename to dll/win32/browseui/lang/ro-RO.rc diff --git a/reactos/dll/win32/browseui/lang/uk-UA.rc b/dll/win32/browseui/lang/uk-UA.rc similarity index 100% rename from reactos/dll/win32/browseui/lang/uk-UA.rc rename to dll/win32/browseui/lang/uk-UA.rc diff --git a/reactos/dll/win32/browseui/newatlinterfaces.h b/dll/win32/browseui/newatlinterfaces.h similarity index 100% rename from reactos/dll/win32/browseui/newatlinterfaces.h rename to dll/win32/browseui/newatlinterfaces.h diff --git a/reactos/dll/win32/browseui/precomp.h b/dll/win32/browseui/precomp.h similarity index 100% rename from reactos/dll/win32/browseui/precomp.h rename to dll/win32/browseui/precomp.h diff --git a/reactos/dll/win32/browseui/regtreeoptions.cpp b/dll/win32/browseui/regtreeoptions.cpp similarity index 100% rename from reactos/dll/win32/browseui/regtreeoptions.cpp rename to dll/win32/browseui/regtreeoptions.cpp diff --git a/reactos/dll/win32/browseui/regtreeoptions.h b/dll/win32/browseui/regtreeoptions.h similarity index 100% rename from reactos/dll/win32/browseui/regtreeoptions.h rename to dll/win32/browseui/regtreeoptions.h diff --git a/reactos/dll/win32/browseui/res/addressband.rgs b/dll/win32/browseui/res/addressband.rgs similarity index 100% rename from reactos/dll/win32/browseui/res/addressband.rgs rename to dll/win32/browseui/res/addressband.rgs diff --git a/reactos/dll/win32/browseui/res/addresseditbox.rgs b/dll/win32/browseui/res/addresseditbox.rgs similarity index 100% rename from reactos/dll/win32/browseui/res/addresseditbox.rgs rename to dll/win32/browseui/res/addresseditbox.rgs diff --git a/reactos/dll/win32/browseui/res/autocompletecontainer.rgs b/dll/win32/browseui/res/autocompletecontainer.rgs similarity index 100% rename from reactos/dll/win32/browseui/res/autocompletecontainer.rgs rename to dll/win32/browseui/res/autocompletecontainer.rgs diff --git a/reactos/dll/win32/browseui/res/bandproxy.rgs b/dll/win32/browseui/res/bandproxy.rgs similarity index 100% rename from reactos/dll/win32/browseui/res/bandproxy.rgs rename to dll/win32/browseui/res/bandproxy.rgs diff --git a/reactos/dll/win32/browseui/res/bandsitemenu.rgs b/dll/win32/browseui/res/bandsitemenu.rgs similarity index 100% rename from reactos/dll/win32/browseui/res/bandsitemenu.rgs rename to dll/win32/browseui/res/bandsitemenu.rgs diff --git a/reactos/dll/win32/browseui/res/brandband.rgs b/dll/win32/browseui/res/brandband.rgs similarity index 100% rename from reactos/dll/win32/browseui/res/brandband.rgs rename to dll/win32/browseui/res/brandband.rgs diff --git a/reactos/dll/win32/browseui/res/commonbrowser.rgs b/dll/win32/browseui/res/commonbrowser.rgs similarity index 100% rename from reactos/dll/win32/browseui/res/commonbrowser.rgs rename to dll/win32/browseui/res/commonbrowser.rgs diff --git a/reactos/dll/win32/browseui/res/globalfoldersettings.rgs b/dll/win32/browseui/res/globalfoldersettings.rgs similarity index 100% rename from reactos/dll/win32/browseui/res/globalfoldersettings.rgs rename to dll/win32/browseui/res/globalfoldersettings.rgs diff --git a/reactos/dll/win32/browseui/res/internettoolbar.rgs b/dll/win32/browseui/res/internettoolbar.rgs similarity index 100% rename from reactos/dll/win32/browseui/res/internettoolbar.rgs rename to dll/win32/browseui/res/internettoolbar.rgs diff --git a/reactos/dll/win32/browseui/res/rebarbandsite.rgs b/dll/win32/browseui/res/rebarbandsite.rgs similarity index 100% rename from reactos/dll/win32/browseui/res/rebarbandsite.rgs rename to dll/win32/browseui/res/rebarbandsite.rgs diff --git a/reactos/dll/win32/browseui/res/regtreeoptions.rgs b/dll/win32/browseui/res/regtreeoptions.rgs similarity index 100% rename from reactos/dll/win32/browseui/res/regtreeoptions.rgs rename to dll/win32/browseui/res/regtreeoptions.rgs diff --git a/reactos/dll/win32/browseui/resource.h b/dll/win32/browseui/resource.h similarity index 100% rename from reactos/dll/win32/browseui/resource.h rename to dll/win32/browseui/resource.h diff --git a/reactos/dll/win32/browseui/shellbrowser.cpp b/dll/win32/browseui/shellbrowser.cpp similarity index 100% rename from reactos/dll/win32/browseui/shellbrowser.cpp rename to dll/win32/browseui/shellbrowser.cpp diff --git a/reactos/dll/win32/browseui/toolsband.cpp b/dll/win32/browseui/toolsband.cpp similarity index 100% rename from reactos/dll/win32/browseui/toolsband.cpp rename to dll/win32/browseui/toolsband.cpp diff --git a/reactos/dll/win32/browseui/travellog.cpp b/dll/win32/browseui/travellog.cpp similarity index 100% rename from reactos/dll/win32/browseui/travellog.cpp rename to dll/win32/browseui/travellog.cpp diff --git a/reactos/dll/win32/browseui/utility.cpp b/dll/win32/browseui/utility.cpp similarity index 100% rename from reactos/dll/win32/browseui/utility.cpp rename to dll/win32/browseui/utility.cpp diff --git a/reactos/dll/win32/browseui/utility.h b/dll/win32/browseui/utility.h similarity index 100% rename from reactos/dll/win32/browseui/utility.h rename to dll/win32/browseui/utility.h diff --git a/reactos/dll/win32/browseui/version.rc b/dll/win32/browseui/version.rc similarity index 100% rename from reactos/dll/win32/browseui/version.rc rename to dll/win32/browseui/version.rc diff --git a/reactos/dll/win32/cabinet/CMakeLists.txt b/dll/win32/cabinet/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/cabinet/CMakeLists.txt rename to dll/win32/cabinet/CMakeLists.txt diff --git a/reactos/dll/win32/cabinet/cabinet.h b/dll/win32/cabinet/cabinet.h similarity index 100% rename from reactos/dll/win32/cabinet/cabinet.h rename to dll/win32/cabinet/cabinet.h diff --git a/reactos/dll/win32/cabinet/cabinet.rbuild b/dll/win32/cabinet/cabinet.rbuild similarity index 100% rename from reactos/dll/win32/cabinet/cabinet.rbuild rename to dll/win32/cabinet/cabinet.rbuild diff --git a/reactos/dll/win32/cabinet/cabinet.rc b/dll/win32/cabinet/cabinet.rc similarity index 100% rename from reactos/dll/win32/cabinet/cabinet.rc rename to dll/win32/cabinet/cabinet.rc diff --git a/reactos/dll/win32/cabinet/cabinet.spec b/dll/win32/cabinet/cabinet.spec similarity index 100% rename from reactos/dll/win32/cabinet/cabinet.spec rename to dll/win32/cabinet/cabinet.spec diff --git a/reactos/dll/win32/cabinet/cabinet_main.c b/dll/win32/cabinet/cabinet_main.c similarity index 100% rename from reactos/dll/win32/cabinet/cabinet_main.c rename to dll/win32/cabinet/cabinet_main.c diff --git a/reactos/dll/win32/cabinet/fci.c b/dll/win32/cabinet/fci.c similarity index 100% rename from reactos/dll/win32/cabinet/fci.c rename to dll/win32/cabinet/fci.c diff --git a/reactos/dll/win32/cabinet/fdi.c b/dll/win32/cabinet/fdi.c similarity index 100% rename from reactos/dll/win32/cabinet/fdi.c rename to dll/win32/cabinet/fdi.c diff --git a/reactos/dll/win32/cabinet/stubs.c b/dll/win32/cabinet/stubs.c similarity index 100% rename from reactos/dll/win32/cabinet/stubs.c rename to dll/win32/cabinet/stubs.c diff --git a/reactos/dll/win32/cards/CMakeLists.txt b/dll/win32/cards/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/cards/CMakeLists.txt rename to dll/win32/cards/CMakeLists.txt diff --git a/reactos/dll/win32/cards/cards.c b/dll/win32/cards/cards.c similarity index 100% rename from reactos/dll/win32/cards/cards.c rename to dll/win32/cards/cards.c diff --git a/reactos/dll/win32/cards/cards.h b/dll/win32/cards/cards.h similarity index 100% rename from reactos/dll/win32/cards/cards.h rename to dll/win32/cards/cards.h diff --git a/reactos/dll/win32/cards/cards.rbuild b/dll/win32/cards/cards.rbuild similarity index 100% rename from reactos/dll/win32/cards/cards.rbuild rename to dll/win32/cards/cards.rbuild diff --git a/reactos/dll/win32/cards/cards.rc b/dll/win32/cards/cards.rc similarity index 100% rename from reactos/dll/win32/cards/cards.rc rename to dll/win32/cards/cards.rc diff --git a/reactos/dll/win32/cards/cards.spec b/dll/win32/cards/cards.spec similarity index 100% rename from reactos/dll/win32/cards/cards.spec rename to dll/win32/cards/cards.spec diff --git a/reactos/dll/win32/cards/res/bavarian/Eichel10.bmp b/dll/win32/cards/res/bavarian/Eichel10.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Eichel10.bmp rename to dll/win32/cards/res/bavarian/Eichel10.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Eichel2.bmp b/dll/win32/cards/res/bavarian/Eichel2.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Eichel2.bmp rename to dll/win32/cards/res/bavarian/Eichel2.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Eichel3.bmp b/dll/win32/cards/res/bavarian/Eichel3.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Eichel3.bmp rename to dll/win32/cards/res/bavarian/Eichel3.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Eichel4.bmp b/dll/win32/cards/res/bavarian/Eichel4.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Eichel4.bmp rename to dll/win32/cards/res/bavarian/Eichel4.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Eichel5.bmp b/dll/win32/cards/res/bavarian/Eichel5.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Eichel5.bmp rename to dll/win32/cards/res/bavarian/Eichel5.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Eichel6.bmp b/dll/win32/cards/res/bavarian/Eichel6.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Eichel6.bmp rename to dll/win32/cards/res/bavarian/Eichel6.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Eichel7.bmp b/dll/win32/cards/res/bavarian/Eichel7.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Eichel7.bmp rename to dll/win32/cards/res/bavarian/Eichel7.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Eichel8.bmp b/dll/win32/cards/res/bavarian/Eichel8.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Eichel8.bmp rename to dll/win32/cards/res/bavarian/Eichel8.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Eichel9.bmp b/dll/win32/cards/res/bavarian/Eichel9.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Eichel9.bmp rename to dll/win32/cards/res/bavarian/Eichel9.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/EichelAs.bmp b/dll/win32/cards/res/bavarian/EichelAs.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/EichelAs.bmp rename to dll/win32/cards/res/bavarian/EichelAs.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/EichelKoenig.bmp b/dll/win32/cards/res/bavarian/EichelKoenig.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/EichelKoenig.bmp rename to dll/win32/cards/res/bavarian/EichelKoenig.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/EichelOber.bmp b/dll/win32/cards/res/bavarian/EichelOber.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/EichelOber.bmp rename to dll/win32/cards/res/bavarian/EichelOber.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/EichelUnter.bmp b/dll/win32/cards/res/bavarian/EichelUnter.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/EichelUnter.bmp rename to dll/win32/cards/res/bavarian/EichelUnter.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/FreeCard.bmp b/dll/win32/cards/res/bavarian/FreeCard.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/FreeCard.bmp rename to dll/win32/cards/res/bavarian/FreeCard.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Gras10.bmp b/dll/win32/cards/res/bavarian/Gras10.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Gras10.bmp rename to dll/win32/cards/res/bavarian/Gras10.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Gras2.bmp b/dll/win32/cards/res/bavarian/Gras2.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Gras2.bmp rename to dll/win32/cards/res/bavarian/Gras2.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Gras3.bmp b/dll/win32/cards/res/bavarian/Gras3.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Gras3.bmp rename to dll/win32/cards/res/bavarian/Gras3.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Gras4.bmp b/dll/win32/cards/res/bavarian/Gras4.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Gras4.bmp rename to dll/win32/cards/res/bavarian/Gras4.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Gras5.bmp b/dll/win32/cards/res/bavarian/Gras5.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Gras5.bmp rename to dll/win32/cards/res/bavarian/Gras5.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Gras6.bmp b/dll/win32/cards/res/bavarian/Gras6.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Gras6.bmp rename to dll/win32/cards/res/bavarian/Gras6.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Gras7.bmp b/dll/win32/cards/res/bavarian/Gras7.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Gras7.bmp rename to dll/win32/cards/res/bavarian/Gras7.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Gras8.bmp b/dll/win32/cards/res/bavarian/Gras8.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Gras8.bmp rename to dll/win32/cards/res/bavarian/Gras8.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Gras9.bmp b/dll/win32/cards/res/bavarian/Gras9.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Gras9.bmp rename to dll/win32/cards/res/bavarian/Gras9.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/GrasAs.bmp b/dll/win32/cards/res/bavarian/GrasAs.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/GrasAs.bmp rename to dll/win32/cards/res/bavarian/GrasAs.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/GrasKoenig.bmp b/dll/win32/cards/res/bavarian/GrasKoenig.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/GrasKoenig.bmp rename to dll/win32/cards/res/bavarian/GrasKoenig.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/GrasOber.bmp b/dll/win32/cards/res/bavarian/GrasOber.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/GrasOber.bmp rename to dll/win32/cards/res/bavarian/GrasOber.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/GrasUnter.bmp b/dll/win32/cards/res/bavarian/GrasUnter.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/GrasUnter.bmp rename to dll/win32/cards/res/bavarian/GrasUnter.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Herz10.bmp b/dll/win32/cards/res/bavarian/Herz10.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Herz10.bmp rename to dll/win32/cards/res/bavarian/Herz10.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Herz2.bmp b/dll/win32/cards/res/bavarian/Herz2.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Herz2.bmp rename to dll/win32/cards/res/bavarian/Herz2.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Herz3.bmp b/dll/win32/cards/res/bavarian/Herz3.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Herz3.bmp rename to dll/win32/cards/res/bavarian/Herz3.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Herz4.bmp b/dll/win32/cards/res/bavarian/Herz4.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Herz4.bmp rename to dll/win32/cards/res/bavarian/Herz4.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Herz5.bmp b/dll/win32/cards/res/bavarian/Herz5.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Herz5.bmp rename to dll/win32/cards/res/bavarian/Herz5.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Herz6.bmp b/dll/win32/cards/res/bavarian/Herz6.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Herz6.bmp rename to dll/win32/cards/res/bavarian/Herz6.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Herz7.bmp b/dll/win32/cards/res/bavarian/Herz7.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Herz7.bmp rename to dll/win32/cards/res/bavarian/Herz7.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Herz8.bmp b/dll/win32/cards/res/bavarian/Herz8.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Herz8.bmp rename to dll/win32/cards/res/bavarian/Herz8.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Herz9.bmp b/dll/win32/cards/res/bavarian/Herz9.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Herz9.bmp rename to dll/win32/cards/res/bavarian/Herz9.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/HerzAs.bmp b/dll/win32/cards/res/bavarian/HerzAs.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/HerzAs.bmp rename to dll/win32/cards/res/bavarian/HerzAs.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/HerzKoenig.bmp b/dll/win32/cards/res/bavarian/HerzKoenig.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/HerzKoenig.bmp rename to dll/win32/cards/res/bavarian/HerzKoenig.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/HerzOber.bmp b/dll/win32/cards/res/bavarian/HerzOber.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/HerzOber.bmp rename to dll/win32/cards/res/bavarian/HerzOber.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/HerzUnter.bmp b/dll/win32/cards/res/bavarian/HerzUnter.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/HerzUnter.bmp rename to dll/win32/cards/res/bavarian/HerzUnter.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Joker.bmp b/dll/win32/cards/res/bavarian/Joker.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Joker.bmp rename to dll/win32/cards/res/bavarian/Joker.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/OSign.bmp b/dll/win32/cards/res/bavarian/OSign.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/OSign.bmp rename to dll/win32/cards/res/bavarian/OSign.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Ruecken1.bmp b/dll/win32/cards/res/bavarian/Ruecken1.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Ruecken1.bmp rename to dll/win32/cards/res/bavarian/Ruecken1.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Ruecken10.bmp b/dll/win32/cards/res/bavarian/Ruecken10.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Ruecken10.bmp rename to dll/win32/cards/res/bavarian/Ruecken10.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Ruecken11.bmp b/dll/win32/cards/res/bavarian/Ruecken11.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Ruecken11.bmp rename to dll/win32/cards/res/bavarian/Ruecken11.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Ruecken12.bmp b/dll/win32/cards/res/bavarian/Ruecken12.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Ruecken12.bmp rename to dll/win32/cards/res/bavarian/Ruecken12.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Ruecken2.bmp b/dll/win32/cards/res/bavarian/Ruecken2.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Ruecken2.bmp rename to dll/win32/cards/res/bavarian/Ruecken2.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Ruecken3.bmp b/dll/win32/cards/res/bavarian/Ruecken3.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Ruecken3.bmp rename to dll/win32/cards/res/bavarian/Ruecken3.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Ruecken4.bmp b/dll/win32/cards/res/bavarian/Ruecken4.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Ruecken4.bmp rename to dll/win32/cards/res/bavarian/Ruecken4.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Ruecken5.bmp b/dll/win32/cards/res/bavarian/Ruecken5.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Ruecken5.bmp rename to dll/win32/cards/res/bavarian/Ruecken5.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Ruecken6.bmp b/dll/win32/cards/res/bavarian/Ruecken6.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Ruecken6.bmp rename to dll/win32/cards/res/bavarian/Ruecken6.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Ruecken7.bmp b/dll/win32/cards/res/bavarian/Ruecken7.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Ruecken7.bmp rename to dll/win32/cards/res/bavarian/Ruecken7.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Ruecken8.bmp b/dll/win32/cards/res/bavarian/Ruecken8.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Ruecken8.bmp rename to dll/win32/cards/res/bavarian/Ruecken8.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Ruecken9.bmp b/dll/win32/cards/res/bavarian/Ruecken9.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Ruecken9.bmp rename to dll/win32/cards/res/bavarian/Ruecken9.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Schellen10.bmp b/dll/win32/cards/res/bavarian/Schellen10.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Schellen10.bmp rename to dll/win32/cards/res/bavarian/Schellen10.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Schellen2.bmp b/dll/win32/cards/res/bavarian/Schellen2.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Schellen2.bmp rename to dll/win32/cards/res/bavarian/Schellen2.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Schellen3.bmp b/dll/win32/cards/res/bavarian/Schellen3.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Schellen3.bmp rename to dll/win32/cards/res/bavarian/Schellen3.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Schellen4.bmp b/dll/win32/cards/res/bavarian/Schellen4.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Schellen4.bmp rename to dll/win32/cards/res/bavarian/Schellen4.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Schellen5.bmp b/dll/win32/cards/res/bavarian/Schellen5.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Schellen5.bmp rename to dll/win32/cards/res/bavarian/Schellen5.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Schellen6.bmp b/dll/win32/cards/res/bavarian/Schellen6.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Schellen6.bmp rename to dll/win32/cards/res/bavarian/Schellen6.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Schellen7.bmp b/dll/win32/cards/res/bavarian/Schellen7.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Schellen7.bmp rename to dll/win32/cards/res/bavarian/Schellen7.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Schellen8.bmp b/dll/win32/cards/res/bavarian/Schellen8.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Schellen8.bmp rename to dll/win32/cards/res/bavarian/Schellen8.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/Schellen9.bmp b/dll/win32/cards/res/bavarian/Schellen9.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/Schellen9.bmp rename to dll/win32/cards/res/bavarian/Schellen9.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/SchellenAs.bmp b/dll/win32/cards/res/bavarian/SchellenAs.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/SchellenAs.bmp rename to dll/win32/cards/res/bavarian/SchellenAs.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/SchellenKoenig.bmp b/dll/win32/cards/res/bavarian/SchellenKoenig.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/SchellenKoenig.bmp rename to dll/win32/cards/res/bavarian/SchellenKoenig.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/SchellenOber.bmp b/dll/win32/cards/res/bavarian/SchellenOber.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/SchellenOber.bmp rename to dll/win32/cards/res/bavarian/SchellenOber.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/SchellenUnter.bmp b/dll/win32/cards/res/bavarian/SchellenUnter.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/SchellenUnter.bmp rename to dll/win32/cards/res/bavarian/SchellenUnter.bmp diff --git a/reactos/dll/win32/cards/res/bavarian/XSign.bmp b/dll/win32/cards/res/bavarian/XSign.bmp similarity index 100% rename from reactos/dll/win32/cards/res/bavarian/XSign.bmp rename to dll/win32/cards/res/bavarian/XSign.bmp diff --git a/reactos/dll/win32/cards/res/default/Background_1.bmp b/dll/win32/cards/res/default/Background_1.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Background_1.bmp rename to dll/win32/cards/res/default/Background_1.bmp diff --git a/reactos/dll/win32/cards/res/default/Background_10.bmp b/dll/win32/cards/res/default/Background_10.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Background_10.bmp rename to dll/win32/cards/res/default/Background_10.bmp diff --git a/reactos/dll/win32/cards/res/default/Background_11.bmp b/dll/win32/cards/res/default/Background_11.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Background_11.bmp rename to dll/win32/cards/res/default/Background_11.bmp diff --git a/reactos/dll/win32/cards/res/default/Background_12.bmp b/dll/win32/cards/res/default/Background_12.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Background_12.bmp rename to dll/win32/cards/res/default/Background_12.bmp diff --git a/reactos/dll/win32/cards/res/default/Background_2.bmp b/dll/win32/cards/res/default/Background_2.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Background_2.bmp rename to dll/win32/cards/res/default/Background_2.bmp diff --git a/reactos/dll/win32/cards/res/default/Background_3.bmp b/dll/win32/cards/res/default/Background_3.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Background_3.bmp rename to dll/win32/cards/res/default/Background_3.bmp diff --git a/reactos/dll/win32/cards/res/default/Background_4.bmp b/dll/win32/cards/res/default/Background_4.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Background_4.bmp rename to dll/win32/cards/res/default/Background_4.bmp diff --git a/reactos/dll/win32/cards/res/default/Background_5.bmp b/dll/win32/cards/res/default/Background_5.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Background_5.bmp rename to dll/win32/cards/res/default/Background_5.bmp diff --git a/reactos/dll/win32/cards/res/default/Background_6.bmp b/dll/win32/cards/res/default/Background_6.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Background_6.bmp rename to dll/win32/cards/res/default/Background_6.bmp diff --git a/reactos/dll/win32/cards/res/default/Background_7.bmp b/dll/win32/cards/res/default/Background_7.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Background_7.bmp rename to dll/win32/cards/res/default/Background_7.bmp diff --git a/reactos/dll/win32/cards/res/default/Background_8.bmp b/dll/win32/cards/res/default/Background_8.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Background_8.bmp rename to dll/win32/cards/res/default/Background_8.bmp diff --git a/reactos/dll/win32/cards/res/default/Background_9.bmp b/dll/win32/cards/res/default/Background_9.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Background_9.bmp rename to dll/win32/cards/res/default/Background_9.bmp diff --git a/reactos/dll/win32/cards/res/default/Clubs_Ace.bmp b/dll/win32/cards/res/default/Clubs_Ace.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Clubs_Ace.bmp rename to dll/win32/cards/res/default/Clubs_Ace.bmp diff --git a/reactos/dll/win32/cards/res/default/Clubs_Eight.bmp b/dll/win32/cards/res/default/Clubs_Eight.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Clubs_Eight.bmp rename to dll/win32/cards/res/default/Clubs_Eight.bmp diff --git a/reactos/dll/win32/cards/res/default/Clubs_Five.bmp b/dll/win32/cards/res/default/Clubs_Five.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Clubs_Five.bmp rename to dll/win32/cards/res/default/Clubs_Five.bmp diff --git a/reactos/dll/win32/cards/res/default/Clubs_Four.bmp b/dll/win32/cards/res/default/Clubs_Four.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Clubs_Four.bmp rename to dll/win32/cards/res/default/Clubs_Four.bmp diff --git a/reactos/dll/win32/cards/res/default/Clubs_Jack.bmp b/dll/win32/cards/res/default/Clubs_Jack.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Clubs_Jack.bmp rename to dll/win32/cards/res/default/Clubs_Jack.bmp diff --git a/reactos/dll/win32/cards/res/default/Clubs_King.bmp b/dll/win32/cards/res/default/Clubs_King.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Clubs_King.bmp rename to dll/win32/cards/res/default/Clubs_King.bmp diff --git a/reactos/dll/win32/cards/res/default/Clubs_Nine.bmp b/dll/win32/cards/res/default/Clubs_Nine.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Clubs_Nine.bmp rename to dll/win32/cards/res/default/Clubs_Nine.bmp diff --git a/reactos/dll/win32/cards/res/default/Clubs_Queen.bmp b/dll/win32/cards/res/default/Clubs_Queen.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Clubs_Queen.bmp rename to dll/win32/cards/res/default/Clubs_Queen.bmp diff --git a/reactos/dll/win32/cards/res/default/Clubs_Seven.bmp b/dll/win32/cards/res/default/Clubs_Seven.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Clubs_Seven.bmp rename to dll/win32/cards/res/default/Clubs_Seven.bmp diff --git a/reactos/dll/win32/cards/res/default/Clubs_Six.bmp b/dll/win32/cards/res/default/Clubs_Six.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Clubs_Six.bmp rename to dll/win32/cards/res/default/Clubs_Six.bmp diff --git a/reactos/dll/win32/cards/res/default/Clubs_Ten.bmp b/dll/win32/cards/res/default/Clubs_Ten.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Clubs_Ten.bmp rename to dll/win32/cards/res/default/Clubs_Ten.bmp diff --git a/reactos/dll/win32/cards/res/default/Clubs_Three.bmp b/dll/win32/cards/res/default/Clubs_Three.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Clubs_Three.bmp rename to dll/win32/cards/res/default/Clubs_Three.bmp diff --git a/reactos/dll/win32/cards/res/default/Clubs_Two.bmp b/dll/win32/cards/res/default/Clubs_Two.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Clubs_Two.bmp rename to dll/win32/cards/res/default/Clubs_Two.bmp diff --git a/reactos/dll/win32/cards/res/default/Diamonds_Ace.bmp b/dll/win32/cards/res/default/Diamonds_Ace.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Diamonds_Ace.bmp rename to dll/win32/cards/res/default/Diamonds_Ace.bmp diff --git a/reactos/dll/win32/cards/res/default/Diamonds_Eight.bmp b/dll/win32/cards/res/default/Diamonds_Eight.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Diamonds_Eight.bmp rename to dll/win32/cards/res/default/Diamonds_Eight.bmp diff --git a/reactos/dll/win32/cards/res/default/Diamonds_Five.bmp b/dll/win32/cards/res/default/Diamonds_Five.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Diamonds_Five.bmp rename to dll/win32/cards/res/default/Diamonds_Five.bmp diff --git a/reactos/dll/win32/cards/res/default/Diamonds_Four.bmp b/dll/win32/cards/res/default/Diamonds_Four.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Diamonds_Four.bmp rename to dll/win32/cards/res/default/Diamonds_Four.bmp diff --git a/reactos/dll/win32/cards/res/default/Diamonds_Jack.bmp b/dll/win32/cards/res/default/Diamonds_Jack.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Diamonds_Jack.bmp rename to dll/win32/cards/res/default/Diamonds_Jack.bmp diff --git a/reactos/dll/win32/cards/res/default/Diamonds_King.bmp b/dll/win32/cards/res/default/Diamonds_King.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Diamonds_King.bmp rename to dll/win32/cards/res/default/Diamonds_King.bmp diff --git a/reactos/dll/win32/cards/res/default/Diamonds_Nine.bmp b/dll/win32/cards/res/default/Diamonds_Nine.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Diamonds_Nine.bmp rename to dll/win32/cards/res/default/Diamonds_Nine.bmp diff --git a/reactos/dll/win32/cards/res/default/Diamonds_Queen.bmp b/dll/win32/cards/res/default/Diamonds_Queen.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Diamonds_Queen.bmp rename to dll/win32/cards/res/default/Diamonds_Queen.bmp diff --git a/reactos/dll/win32/cards/res/default/Diamonds_Seven.bmp b/dll/win32/cards/res/default/Diamonds_Seven.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Diamonds_Seven.bmp rename to dll/win32/cards/res/default/Diamonds_Seven.bmp diff --git a/reactos/dll/win32/cards/res/default/Diamonds_Six.bmp b/dll/win32/cards/res/default/Diamonds_Six.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Diamonds_Six.bmp rename to dll/win32/cards/res/default/Diamonds_Six.bmp diff --git a/reactos/dll/win32/cards/res/default/Diamonds_Ten.bmp b/dll/win32/cards/res/default/Diamonds_Ten.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Diamonds_Ten.bmp rename to dll/win32/cards/res/default/Diamonds_Ten.bmp diff --git a/reactos/dll/win32/cards/res/default/Diamonds_Three.bmp b/dll/win32/cards/res/default/Diamonds_Three.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Diamonds_Three.bmp rename to dll/win32/cards/res/default/Diamonds_Three.bmp diff --git a/reactos/dll/win32/cards/res/default/Diamonds_Two.bmp b/dll/win32/cards/res/default/Diamonds_Two.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Diamonds_Two.bmp rename to dll/win32/cards/res/default/Diamonds_Two.bmp diff --git a/reactos/dll/win32/cards/res/default/FreeCard.bmp b/dll/win32/cards/res/default/FreeCard.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/FreeCard.bmp rename to dll/win32/cards/res/default/FreeCard.bmp diff --git a/reactos/dll/win32/cards/res/default/Hearts_Ace.bmp b/dll/win32/cards/res/default/Hearts_Ace.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Hearts_Ace.bmp rename to dll/win32/cards/res/default/Hearts_Ace.bmp diff --git a/reactos/dll/win32/cards/res/default/Hearts_Eight.bmp b/dll/win32/cards/res/default/Hearts_Eight.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Hearts_Eight.bmp rename to dll/win32/cards/res/default/Hearts_Eight.bmp diff --git a/reactos/dll/win32/cards/res/default/Hearts_Five.bmp b/dll/win32/cards/res/default/Hearts_Five.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Hearts_Five.bmp rename to dll/win32/cards/res/default/Hearts_Five.bmp diff --git a/reactos/dll/win32/cards/res/default/Hearts_Four.bmp b/dll/win32/cards/res/default/Hearts_Four.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Hearts_Four.bmp rename to dll/win32/cards/res/default/Hearts_Four.bmp diff --git a/reactos/dll/win32/cards/res/default/Hearts_Jack.bmp b/dll/win32/cards/res/default/Hearts_Jack.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Hearts_Jack.bmp rename to dll/win32/cards/res/default/Hearts_Jack.bmp diff --git a/reactos/dll/win32/cards/res/default/Hearts_King.bmp b/dll/win32/cards/res/default/Hearts_King.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Hearts_King.bmp rename to dll/win32/cards/res/default/Hearts_King.bmp diff --git a/reactos/dll/win32/cards/res/default/Hearts_Nine.bmp b/dll/win32/cards/res/default/Hearts_Nine.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Hearts_Nine.bmp rename to dll/win32/cards/res/default/Hearts_Nine.bmp diff --git a/reactos/dll/win32/cards/res/default/Hearts_Queen.bmp b/dll/win32/cards/res/default/Hearts_Queen.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Hearts_Queen.bmp rename to dll/win32/cards/res/default/Hearts_Queen.bmp diff --git a/reactos/dll/win32/cards/res/default/Hearts_Seven.bmp b/dll/win32/cards/res/default/Hearts_Seven.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Hearts_Seven.bmp rename to dll/win32/cards/res/default/Hearts_Seven.bmp diff --git a/reactos/dll/win32/cards/res/default/Hearts_Six.bmp b/dll/win32/cards/res/default/Hearts_Six.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Hearts_Six.bmp rename to dll/win32/cards/res/default/Hearts_Six.bmp diff --git a/reactos/dll/win32/cards/res/default/Hearts_Ten.bmp b/dll/win32/cards/res/default/Hearts_Ten.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Hearts_Ten.bmp rename to dll/win32/cards/res/default/Hearts_Ten.bmp diff --git a/reactos/dll/win32/cards/res/default/Hearts_Three.bmp b/dll/win32/cards/res/default/Hearts_Three.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Hearts_Three.bmp rename to dll/win32/cards/res/default/Hearts_Three.bmp diff --git a/reactos/dll/win32/cards/res/default/Hearts_Two.bmp b/dll/win32/cards/res/default/Hearts_Two.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Hearts_Two.bmp rename to dll/win32/cards/res/default/Hearts_Two.bmp diff --git a/reactos/dll/win32/cards/res/default/Joker.bmp b/dll/win32/cards/res/default/Joker.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Joker.bmp rename to dll/win32/cards/res/default/Joker.bmp diff --git a/reactos/dll/win32/cards/res/default/OSign.bmp b/dll/win32/cards/res/default/OSign.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/OSign.bmp rename to dll/win32/cards/res/default/OSign.bmp diff --git a/reactos/dll/win32/cards/res/default/Spades_Ace.bmp b/dll/win32/cards/res/default/Spades_Ace.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Spades_Ace.bmp rename to dll/win32/cards/res/default/Spades_Ace.bmp diff --git a/reactos/dll/win32/cards/res/default/Spades_Eight.bmp b/dll/win32/cards/res/default/Spades_Eight.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Spades_Eight.bmp rename to dll/win32/cards/res/default/Spades_Eight.bmp diff --git a/reactos/dll/win32/cards/res/default/Spades_Five.bmp b/dll/win32/cards/res/default/Spades_Five.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Spades_Five.bmp rename to dll/win32/cards/res/default/Spades_Five.bmp diff --git a/reactos/dll/win32/cards/res/default/Spades_Four.bmp b/dll/win32/cards/res/default/Spades_Four.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Spades_Four.bmp rename to dll/win32/cards/res/default/Spades_Four.bmp diff --git a/reactos/dll/win32/cards/res/default/Spades_Jack.bmp b/dll/win32/cards/res/default/Spades_Jack.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Spades_Jack.bmp rename to dll/win32/cards/res/default/Spades_Jack.bmp diff --git a/reactos/dll/win32/cards/res/default/Spades_King.bmp b/dll/win32/cards/res/default/Spades_King.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Spades_King.bmp rename to dll/win32/cards/res/default/Spades_King.bmp diff --git a/reactos/dll/win32/cards/res/default/Spades_Nine.bmp b/dll/win32/cards/res/default/Spades_Nine.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Spades_Nine.bmp rename to dll/win32/cards/res/default/Spades_Nine.bmp diff --git a/reactos/dll/win32/cards/res/default/Spades_Queen.bmp b/dll/win32/cards/res/default/Spades_Queen.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Spades_Queen.bmp rename to dll/win32/cards/res/default/Spades_Queen.bmp diff --git a/reactos/dll/win32/cards/res/default/Spades_Seven.bmp b/dll/win32/cards/res/default/Spades_Seven.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Spades_Seven.bmp rename to dll/win32/cards/res/default/Spades_Seven.bmp diff --git a/reactos/dll/win32/cards/res/default/Spades_Six.bmp b/dll/win32/cards/res/default/Spades_Six.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Spades_Six.bmp rename to dll/win32/cards/res/default/Spades_Six.bmp diff --git a/reactos/dll/win32/cards/res/default/Spades_Ten.bmp b/dll/win32/cards/res/default/Spades_Ten.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Spades_Ten.bmp rename to dll/win32/cards/res/default/Spades_Ten.bmp diff --git a/reactos/dll/win32/cards/res/default/Spades_Three.bmp b/dll/win32/cards/res/default/Spades_Three.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Spades_Three.bmp rename to dll/win32/cards/res/default/Spades_Three.bmp diff --git a/reactos/dll/win32/cards/res/default/Spades_Two.bmp b/dll/win32/cards/res/default/Spades_Two.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/Spades_Two.bmp rename to dll/win32/cards/res/default/Spades_Two.bmp diff --git a/reactos/dll/win32/cards/res/default/XSign.bmp b/dll/win32/cards/res/default/XSign.bmp similarity index 100% rename from reactos/dll/win32/cards/res/default/XSign.bmp rename to dll/win32/cards/res/default/XSign.bmp diff --git a/reactos/dll/win32/cfgmgr32/CMakeLists.txt b/dll/win32/cfgmgr32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/cfgmgr32/CMakeLists.txt rename to dll/win32/cfgmgr32/CMakeLists.txt diff --git a/reactos/dll/win32/cfgmgr32/cfgmgr32.rbuild b/dll/win32/cfgmgr32/cfgmgr32.rbuild similarity index 100% rename from reactos/dll/win32/cfgmgr32/cfgmgr32.rbuild rename to dll/win32/cfgmgr32/cfgmgr32.rbuild diff --git a/reactos/dll/win32/cfgmgr32/cfgmgr32.rc b/dll/win32/cfgmgr32/cfgmgr32.rc similarity index 100% rename from reactos/dll/win32/cfgmgr32/cfgmgr32.rc rename to dll/win32/cfgmgr32/cfgmgr32.rc diff --git a/reactos/dll/win32/cfgmgr32/cfgmgr32.spec b/dll/win32/cfgmgr32/cfgmgr32.spec similarity index 100% rename from reactos/dll/win32/cfgmgr32/cfgmgr32.spec rename to dll/win32/cfgmgr32/cfgmgr32.spec diff --git a/reactos/dll/win32/clusapi/CMakeLists.txt b/dll/win32/clusapi/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/clusapi/CMakeLists.txt rename to dll/win32/clusapi/CMakeLists.txt diff --git a/reactos/dll/win32/clusapi/clusapi.c b/dll/win32/clusapi/clusapi.c similarity index 100% rename from reactos/dll/win32/clusapi/clusapi.c rename to dll/win32/clusapi/clusapi.c diff --git a/reactos/dll/win32/clusapi/clusapi.rbuild b/dll/win32/clusapi/clusapi.rbuild similarity index 100% rename from reactos/dll/win32/clusapi/clusapi.rbuild rename to dll/win32/clusapi/clusapi.rbuild diff --git a/reactos/dll/win32/clusapi/clusapi.spec b/dll/win32/clusapi/clusapi.spec similarity index 100% rename from reactos/dll/win32/clusapi/clusapi.spec rename to dll/win32/clusapi/clusapi.spec diff --git a/reactos/dll/win32/comcat/CMakeLists.txt b/dll/win32/comcat/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/comcat/CMakeLists.txt rename to dll/win32/comcat/CMakeLists.txt diff --git a/reactos/dll/win32/comcat/comcat.rbuild b/dll/win32/comcat/comcat.rbuild similarity index 100% rename from reactos/dll/win32/comcat/comcat.rbuild rename to dll/win32/comcat/comcat.rbuild diff --git a/reactos/dll/win32/comcat/comcat.spec b/dll/win32/comcat/comcat.spec similarity index 100% rename from reactos/dll/win32/comcat/comcat.spec rename to dll/win32/comcat/comcat.spec diff --git a/reactos/dll/win32/comcat/comcat_main.c b/dll/win32/comcat/comcat_main.c similarity index 100% rename from reactos/dll/win32/comcat/comcat_main.c rename to dll/win32/comcat/comcat_main.c diff --git a/reactos/dll/win32/comcat/version.rc b/dll/win32/comcat/version.rc similarity index 100% rename from reactos/dll/win32/comcat/version.rc rename to dll/win32/comcat/version.rc diff --git a/reactos/dll/win32/comctl32/CMakeLists.txt b/dll/win32/comctl32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/comctl32/CMakeLists.txt rename to dll/win32/comctl32/CMakeLists.txt diff --git a/reactos/dll/win32/comctl32/animate.c b/dll/win32/comctl32/animate.c similarity index 100% rename from reactos/dll/win32/comctl32/animate.c rename to dll/win32/comctl32/animate.c diff --git a/reactos/dll/win32/comctl32/comboex.c b/dll/win32/comctl32/comboex.c similarity index 100% rename from reactos/dll/win32/comctl32/comboex.c rename to dll/win32/comctl32/comboex.c diff --git a/reactos/dll/win32/comctl32/comctl32.h b/dll/win32/comctl32/comctl32.h similarity index 100% rename from reactos/dll/win32/comctl32/comctl32.h rename to dll/win32/comctl32/comctl32.h diff --git a/reactos/dll/win32/comctl32/comctl32.rbuild b/dll/win32/comctl32/comctl32.rbuild similarity index 100% rename from reactos/dll/win32/comctl32/comctl32.rbuild rename to dll/win32/comctl32/comctl32.rbuild diff --git a/reactos/dll/win32/comctl32/comctl32.spec b/dll/win32/comctl32/comctl32.spec similarity index 100% rename from reactos/dll/win32/comctl32/comctl32.spec rename to dll/win32/comctl32/comctl32.spec diff --git a/reactos/dll/win32/comctl32/comctl32_ros.diff b/dll/win32/comctl32/comctl32_ros.diff similarity index 100% rename from reactos/dll/win32/comctl32/comctl32_ros.diff rename to dll/win32/comctl32/comctl32_ros.diff diff --git a/reactos/dll/win32/comctl32/comctl32undoc.c b/dll/win32/comctl32/comctl32undoc.c similarity index 100% rename from reactos/dll/win32/comctl32/comctl32undoc.c rename to dll/win32/comctl32/comctl32undoc.c diff --git a/reactos/dll/win32/comctl32/comctl_Bg.rc b/dll/win32/comctl32/comctl_Bg.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_Bg.rc rename to dll/win32/comctl32/comctl_Bg.rc diff --git a/reactos/dll/win32/comctl32/comctl_Cs.rc b/dll/win32/comctl32/comctl_Cs.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_Cs.rc rename to dll/win32/comctl32/comctl_Cs.rc diff --git a/reactos/dll/win32/comctl32/comctl_Da.rc b/dll/win32/comctl32/comctl_Da.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_Da.rc rename to dll/win32/comctl32/comctl_Da.rc diff --git a/reactos/dll/win32/comctl32/comctl_De.rc b/dll/win32/comctl32/comctl_De.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_De.rc rename to dll/win32/comctl32/comctl_De.rc diff --git a/reactos/dll/win32/comctl32/comctl_El.rc b/dll/win32/comctl32/comctl_El.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_El.rc rename to dll/win32/comctl32/comctl_El.rc diff --git a/reactos/dll/win32/comctl32/comctl_En.rc b/dll/win32/comctl32/comctl_En.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_En.rc rename to dll/win32/comctl32/comctl_En.rc diff --git a/reactos/dll/win32/comctl32/comctl_Eo.rc b/dll/win32/comctl32/comctl_Eo.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_Eo.rc rename to dll/win32/comctl32/comctl_Eo.rc diff --git a/reactos/dll/win32/comctl32/comctl_Es.rc b/dll/win32/comctl32/comctl_Es.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_Es.rc rename to dll/win32/comctl32/comctl_Es.rc diff --git a/reactos/dll/win32/comctl32/comctl_Fr.rc b/dll/win32/comctl32/comctl_Fr.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_Fr.rc rename to dll/win32/comctl32/comctl_Fr.rc diff --git a/reactos/dll/win32/comctl32/comctl_He.rc b/dll/win32/comctl32/comctl_He.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_He.rc rename to dll/win32/comctl32/comctl_He.rc diff --git a/reactos/dll/win32/comctl32/comctl_Hu.rc b/dll/win32/comctl32/comctl_Hu.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_Hu.rc rename to dll/win32/comctl32/comctl_Hu.rc diff --git a/reactos/dll/win32/comctl32/comctl_It.rc b/dll/win32/comctl32/comctl_It.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_It.rc rename to dll/win32/comctl32/comctl_It.rc diff --git a/reactos/dll/win32/comctl32/comctl_Ja.rc b/dll/win32/comctl32/comctl_Ja.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_Ja.rc rename to dll/win32/comctl32/comctl_Ja.rc diff --git a/reactos/dll/win32/comctl32/comctl_Ko.rc b/dll/win32/comctl32/comctl_Ko.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_Ko.rc rename to dll/win32/comctl32/comctl_Ko.rc diff --git a/reactos/dll/win32/comctl32/comctl_Lt.rc b/dll/win32/comctl32/comctl_Lt.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_Lt.rc rename to dll/win32/comctl32/comctl_Lt.rc diff --git a/reactos/dll/win32/comctl32/comctl_Nl.rc b/dll/win32/comctl32/comctl_Nl.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_Nl.rc rename to dll/win32/comctl32/comctl_Nl.rc diff --git a/reactos/dll/win32/comctl32/comctl_No.rc b/dll/win32/comctl32/comctl_No.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_No.rc rename to dll/win32/comctl32/comctl_No.rc diff --git a/reactos/dll/win32/comctl32/comctl_Pl.rc b/dll/win32/comctl32/comctl_Pl.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_Pl.rc rename to dll/win32/comctl32/comctl_Pl.rc diff --git a/reactos/dll/win32/comctl32/comctl_Pt.rc b/dll/win32/comctl32/comctl_Pt.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_Pt.rc rename to dll/win32/comctl32/comctl_Pt.rc diff --git a/reactos/dll/win32/comctl32/comctl_Ro.rc b/dll/win32/comctl32/comctl_Ro.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_Ro.rc rename to dll/win32/comctl32/comctl_Ro.rc diff --git a/reactos/dll/win32/comctl32/comctl_Ru.rc b/dll/win32/comctl32/comctl_Ru.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_Ru.rc rename to dll/win32/comctl32/comctl_Ru.rc diff --git a/reactos/dll/win32/comctl32/comctl_Si.rc b/dll/win32/comctl32/comctl_Si.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_Si.rc rename to dll/win32/comctl32/comctl_Si.rc diff --git a/reactos/dll/win32/comctl32/comctl_Sk.rc b/dll/win32/comctl32/comctl_Sk.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_Sk.rc rename to dll/win32/comctl32/comctl_Sk.rc diff --git a/reactos/dll/win32/comctl32/comctl_Sr.rc b/dll/win32/comctl32/comctl_Sr.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_Sr.rc rename to dll/win32/comctl32/comctl_Sr.rc diff --git a/reactos/dll/win32/comctl32/comctl_Sv.rc b/dll/win32/comctl32/comctl_Sv.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_Sv.rc rename to dll/win32/comctl32/comctl_Sv.rc diff --git a/reactos/dll/win32/comctl32/comctl_Th.rc b/dll/win32/comctl32/comctl_Th.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_Th.rc rename to dll/win32/comctl32/comctl_Th.rc diff --git a/reactos/dll/win32/comctl32/comctl_Tr.rc b/dll/win32/comctl32/comctl_Tr.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_Tr.rc rename to dll/win32/comctl32/comctl_Tr.rc diff --git a/reactos/dll/win32/comctl32/comctl_Uk.rc b/dll/win32/comctl32/comctl_Uk.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_Uk.rc rename to dll/win32/comctl32/comctl_Uk.rc diff --git a/reactos/dll/win32/comctl32/comctl_Zh.rc b/dll/win32/comctl32/comctl_Zh.rc similarity index 100% rename from reactos/dll/win32/comctl32/comctl_Zh.rc rename to dll/win32/comctl32/comctl_Zh.rc diff --git a/reactos/dll/win32/comctl32/commctrl.c b/dll/win32/comctl32/commctrl.c similarity index 100% rename from reactos/dll/win32/comctl32/commctrl.c rename to dll/win32/comctl32/commctrl.c diff --git a/reactos/dll/win32/comctl32/datetime.c b/dll/win32/comctl32/datetime.c similarity index 100% rename from reactos/dll/win32/comctl32/datetime.c rename to dll/win32/comctl32/datetime.c diff --git a/reactos/dll/win32/comctl32/dpa.c b/dll/win32/comctl32/dpa.c similarity index 100% rename from reactos/dll/win32/comctl32/dpa.c rename to dll/win32/comctl32/dpa.c diff --git a/reactos/dll/win32/comctl32/draglist.c b/dll/win32/comctl32/draglist.c similarity index 100% rename from reactos/dll/win32/comctl32/draglist.c rename to dll/win32/comctl32/draglist.c diff --git a/reactos/dll/win32/comctl32/dsa.c b/dll/win32/comctl32/dsa.c similarity index 100% rename from reactos/dll/win32/comctl32/dsa.c rename to dll/win32/comctl32/dsa.c diff --git a/reactos/dll/win32/comctl32/flatsb.c b/dll/win32/comctl32/flatsb.c similarity index 100% rename from reactos/dll/win32/comctl32/flatsb.c rename to dll/win32/comctl32/flatsb.c diff --git a/reactos/dll/win32/comctl32/header.c b/dll/win32/comctl32/header.c similarity index 100% rename from reactos/dll/win32/comctl32/header.c rename to dll/win32/comctl32/header.c diff --git a/reactos/dll/win32/comctl32/hotkey.c b/dll/win32/comctl32/hotkey.c similarity index 100% rename from reactos/dll/win32/comctl32/hotkey.c rename to dll/win32/comctl32/hotkey.c diff --git a/reactos/dll/win32/comctl32/idb_hist_large.bmp b/dll/win32/comctl32/idb_hist_large.bmp similarity index 100% rename from reactos/dll/win32/comctl32/idb_hist_large.bmp rename to dll/win32/comctl32/idb_hist_large.bmp diff --git a/reactos/dll/win32/comctl32/idb_hist_small.bmp b/dll/win32/comctl32/idb_hist_small.bmp similarity index 100% rename from reactos/dll/win32/comctl32/idb_hist_small.bmp rename to dll/win32/comctl32/idb_hist_small.bmp diff --git a/reactos/dll/win32/comctl32/idb_std_large.bmp b/dll/win32/comctl32/idb_std_large.bmp similarity index 100% rename from reactos/dll/win32/comctl32/idb_std_large.bmp rename to dll/win32/comctl32/idb_std_large.bmp diff --git a/reactos/dll/win32/comctl32/idb_std_small.bmp b/dll/win32/comctl32/idb_std_small.bmp similarity index 100% rename from reactos/dll/win32/comctl32/idb_std_small.bmp rename to dll/win32/comctl32/idb_std_small.bmp diff --git a/reactos/dll/win32/comctl32/idb_view_large.bmp b/dll/win32/comctl32/idb_view_large.bmp similarity index 100% rename from reactos/dll/win32/comctl32/idb_view_large.bmp rename to dll/win32/comctl32/idb_view_large.bmp diff --git a/reactos/dll/win32/comctl32/idb_view_small.bmp b/dll/win32/comctl32/idb_view_small.bmp similarity index 100% rename from reactos/dll/win32/comctl32/idb_view_small.bmp rename to dll/win32/comctl32/idb_view_small.bmp diff --git a/reactos/dll/win32/comctl32/idc_copy.cur b/dll/win32/comctl32/idc_copy.cur similarity index 100% rename from reactos/dll/win32/comctl32/idc_copy.cur rename to dll/win32/comctl32/idc_copy.cur diff --git a/reactos/dll/win32/comctl32/idc_divider.cur b/dll/win32/comctl32/idc_divider.cur similarity index 100% rename from reactos/dll/win32/comctl32/idc_divider.cur rename to dll/win32/comctl32/idc_divider.cur diff --git a/reactos/dll/win32/comctl32/idc_divideropen.cur b/dll/win32/comctl32/idc_divideropen.cur similarity index 100% rename from reactos/dll/win32/comctl32/idc_divideropen.cur rename to dll/win32/comctl32/idc_divideropen.cur diff --git a/reactos/dll/win32/comctl32/idc_movebutton.cur b/dll/win32/comctl32/idc_movebutton.cur similarity index 100% rename from reactos/dll/win32/comctl32/idc_movebutton.cur rename to dll/win32/comctl32/idc_movebutton.cur diff --git a/reactos/dll/win32/comctl32/idi_dragarrow.ico b/dll/win32/comctl32/idi_dragarrow.ico similarity index 100% rename from reactos/dll/win32/comctl32/idi_dragarrow.ico rename to dll/win32/comctl32/idi_dragarrow.ico diff --git a/reactos/dll/win32/comctl32/idi_tt_error_sm.ico b/dll/win32/comctl32/idi_tt_error_sm.ico similarity index 100% rename from reactos/dll/win32/comctl32/idi_tt_error_sm.ico rename to dll/win32/comctl32/idi_tt_error_sm.ico diff --git a/reactos/dll/win32/comctl32/idi_tt_info_sm.ico b/dll/win32/comctl32/idi_tt_info_sm.ico similarity index 100% rename from reactos/dll/win32/comctl32/idi_tt_info_sm.ico rename to dll/win32/comctl32/idi_tt_info_sm.ico diff --git a/reactos/dll/win32/comctl32/idi_tt_warn_sm.ico b/dll/win32/comctl32/idi_tt_warn_sm.ico similarity index 100% rename from reactos/dll/win32/comctl32/idi_tt_warn_sm.ico rename to dll/win32/comctl32/idi_tt_warn_sm.ico diff --git a/reactos/dll/win32/comctl32/idt_check.bmp b/dll/win32/comctl32/idt_check.bmp similarity index 100% rename from reactos/dll/win32/comctl32/idt_check.bmp rename to dll/win32/comctl32/idt_check.bmp diff --git a/reactos/dll/win32/comctl32/imagelist.c b/dll/win32/comctl32/imagelist.c similarity index 100% rename from reactos/dll/win32/comctl32/imagelist.c rename to dll/win32/comctl32/imagelist.c diff --git a/reactos/dll/win32/comctl32/imagelist.h b/dll/win32/comctl32/imagelist.h similarity index 100% rename from reactos/dll/win32/comctl32/imagelist.h rename to dll/win32/comctl32/imagelist.h diff --git a/reactos/dll/win32/comctl32/ipaddress.c b/dll/win32/comctl32/ipaddress.c similarity index 100% rename from reactos/dll/win32/comctl32/ipaddress.c rename to dll/win32/comctl32/ipaddress.c diff --git a/reactos/dll/win32/comctl32/listview.c b/dll/win32/comctl32/listview.c similarity index 100% rename from reactos/dll/win32/comctl32/listview.c rename to dll/win32/comctl32/listview.c diff --git a/reactos/dll/win32/comctl32/monthcal.c b/dll/win32/comctl32/monthcal.c similarity index 100% rename from reactos/dll/win32/comctl32/monthcal.c rename to dll/win32/comctl32/monthcal.c diff --git a/reactos/dll/win32/comctl32/nativefont.c b/dll/win32/comctl32/nativefont.c similarity index 100% rename from reactos/dll/win32/comctl32/nativefont.c rename to dll/win32/comctl32/nativefont.c diff --git a/reactos/dll/win32/comctl32/pager.c b/dll/win32/comctl32/pager.c similarity index 100% rename from reactos/dll/win32/comctl32/pager.c rename to dll/win32/comctl32/pager.c diff --git a/reactos/dll/win32/comctl32/progress.c b/dll/win32/comctl32/progress.c similarity index 100% rename from reactos/dll/win32/comctl32/progress.c rename to dll/win32/comctl32/progress.c diff --git a/reactos/dll/win32/comctl32/propsheet.c b/dll/win32/comctl32/propsheet.c similarity index 100% rename from reactos/dll/win32/comctl32/propsheet.c rename to dll/win32/comctl32/propsheet.c diff --git a/reactos/dll/win32/comctl32/rebar.c b/dll/win32/comctl32/rebar.c similarity index 100% rename from reactos/dll/win32/comctl32/rebar.c rename to dll/win32/comctl32/rebar.c diff --git a/reactos/dll/win32/comctl32/rsrc.rc b/dll/win32/comctl32/rsrc.rc similarity index 100% rename from reactos/dll/win32/comctl32/rsrc.rc rename to dll/win32/comctl32/rsrc.rc diff --git a/reactos/dll/win32/comctl32/smoothscroll.c b/dll/win32/comctl32/smoothscroll.c similarity index 100% rename from reactos/dll/win32/comctl32/smoothscroll.c rename to dll/win32/comctl32/smoothscroll.c diff --git a/reactos/dll/win32/comctl32/status.c b/dll/win32/comctl32/status.c similarity index 100% rename from reactos/dll/win32/comctl32/status.c rename to dll/win32/comctl32/status.c diff --git a/reactos/dll/win32/comctl32/string.c b/dll/win32/comctl32/string.c similarity index 100% rename from reactos/dll/win32/comctl32/string.c rename to dll/win32/comctl32/string.c diff --git a/reactos/dll/win32/comctl32/stubs.c b/dll/win32/comctl32/stubs.c similarity index 100% rename from reactos/dll/win32/comctl32/stubs.c rename to dll/win32/comctl32/stubs.c diff --git a/reactos/dll/win32/comctl32/syslink.c b/dll/win32/comctl32/syslink.c similarity index 100% rename from reactos/dll/win32/comctl32/syslink.c rename to dll/win32/comctl32/syslink.c diff --git a/reactos/dll/win32/comctl32/tab.c b/dll/win32/comctl32/tab.c similarity index 100% rename from reactos/dll/win32/comctl32/tab.c rename to dll/win32/comctl32/tab.c diff --git a/reactos/dll/win32/comctl32/theme_button.c b/dll/win32/comctl32/theme_button.c similarity index 100% rename from reactos/dll/win32/comctl32/theme_button.c rename to dll/win32/comctl32/theme_button.c diff --git a/reactos/dll/win32/comctl32/theme_combo.c b/dll/win32/comctl32/theme_combo.c similarity index 100% rename from reactos/dll/win32/comctl32/theme_combo.c rename to dll/win32/comctl32/theme_combo.c diff --git a/reactos/dll/win32/comctl32/theme_dialog.c b/dll/win32/comctl32/theme_dialog.c similarity index 100% rename from reactos/dll/win32/comctl32/theme_dialog.c rename to dll/win32/comctl32/theme_dialog.c diff --git a/reactos/dll/win32/comctl32/theme_edit.c b/dll/win32/comctl32/theme_edit.c similarity index 100% rename from reactos/dll/win32/comctl32/theme_edit.c rename to dll/win32/comctl32/theme_edit.c diff --git a/reactos/dll/win32/comctl32/theme_listbox.c b/dll/win32/comctl32/theme_listbox.c similarity index 100% rename from reactos/dll/win32/comctl32/theme_listbox.c rename to dll/win32/comctl32/theme_listbox.c diff --git a/reactos/dll/win32/comctl32/theming.c b/dll/win32/comctl32/theming.c similarity index 100% rename from reactos/dll/win32/comctl32/theming.c rename to dll/win32/comctl32/theming.c diff --git a/reactos/dll/win32/comctl32/toolbar.c b/dll/win32/comctl32/toolbar.c similarity index 100% rename from reactos/dll/win32/comctl32/toolbar.c rename to dll/win32/comctl32/toolbar.c diff --git a/reactos/dll/win32/comctl32/tooltips.c b/dll/win32/comctl32/tooltips.c similarity index 100% rename from reactos/dll/win32/comctl32/tooltips.c rename to dll/win32/comctl32/tooltips.c diff --git a/reactos/dll/win32/comctl32/trackbar.c b/dll/win32/comctl32/trackbar.c similarity index 100% rename from reactos/dll/win32/comctl32/trackbar.c rename to dll/win32/comctl32/trackbar.c diff --git a/reactos/dll/win32/comctl32/treeview.c b/dll/win32/comctl32/treeview.c similarity index 100% rename from reactos/dll/win32/comctl32/treeview.c rename to dll/win32/comctl32/treeview.c diff --git a/reactos/dll/win32/comctl32/updown.c b/dll/win32/comctl32/updown.c similarity index 100% rename from reactos/dll/win32/comctl32/updown.c rename to dll/win32/comctl32/updown.c diff --git a/reactos/dll/win32/comdlg32/800.bmp b/dll/win32/comdlg32/800.bmp similarity index 100% rename from reactos/dll/win32/comdlg32/800.bmp rename to dll/win32/comdlg32/800.bmp diff --git a/reactos/dll/win32/comdlg32/CMakeLists.txt b/dll/win32/comdlg32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/comdlg32/CMakeLists.txt rename to dll/win32/comdlg32/CMakeLists.txt diff --git a/reactos/dll/win32/comdlg32/cdlg.h b/dll/win32/comdlg32/cdlg.h similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg.h rename to dll/win32/comdlg32/cdlg.h diff --git a/reactos/dll/win32/comdlg32/cdlg16.h b/dll/win32/comdlg32/cdlg16.h similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg16.h rename to dll/win32/comdlg32/cdlg16.h diff --git a/reactos/dll/win32/comdlg32/cdlg32.c b/dll/win32/comdlg32/cdlg32.c similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg32.c rename to dll/win32/comdlg32/cdlg32.c diff --git a/reactos/dll/win32/comdlg32/cdlg_Bg.rc b/dll/win32/comdlg32/cdlg_Bg.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_Bg.rc rename to dll/win32/comdlg32/cdlg_Bg.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_Ca.rc b/dll/win32/comdlg32/cdlg_Ca.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_Ca.rc rename to dll/win32/comdlg32/cdlg_Ca.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_Cn.rc b/dll/win32/comdlg32/cdlg_Cn.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_Cn.rc rename to dll/win32/comdlg32/cdlg_Cn.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_Cs.rc b/dll/win32/comdlg32/cdlg_Cs.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_Cs.rc rename to dll/win32/comdlg32/cdlg_Cs.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_Da.rc b/dll/win32/comdlg32/cdlg_Da.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_Da.rc rename to dll/win32/comdlg32/cdlg_Da.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_De.rc b/dll/win32/comdlg32/cdlg_De.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_De.rc rename to dll/win32/comdlg32/cdlg_De.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_El.rc b/dll/win32/comdlg32/cdlg_El.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_El.rc rename to dll/win32/comdlg32/cdlg_El.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_En.rc b/dll/win32/comdlg32/cdlg_En.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_En.rc rename to dll/win32/comdlg32/cdlg_En.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_Es.rc b/dll/win32/comdlg32/cdlg_Es.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_Es.rc rename to dll/win32/comdlg32/cdlg_Es.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_Fi.rc b/dll/win32/comdlg32/cdlg_Fi.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_Fi.rc rename to dll/win32/comdlg32/cdlg_Fi.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_Fr.rc b/dll/win32/comdlg32/cdlg_Fr.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_Fr.rc rename to dll/win32/comdlg32/cdlg_Fr.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_Hu.rc b/dll/win32/comdlg32/cdlg_Hu.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_Hu.rc rename to dll/win32/comdlg32/cdlg_Hu.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_It.rc b/dll/win32/comdlg32/cdlg_It.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_It.rc rename to dll/win32/comdlg32/cdlg_It.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_Ja.rc b/dll/win32/comdlg32/cdlg_Ja.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_Ja.rc rename to dll/win32/comdlg32/cdlg_Ja.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_Ko.rc b/dll/win32/comdlg32/cdlg_Ko.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_Ko.rc rename to dll/win32/comdlg32/cdlg_Ko.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_Lt.rc b/dll/win32/comdlg32/cdlg_Lt.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_Lt.rc rename to dll/win32/comdlg32/cdlg_Lt.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_Nl.rc b/dll/win32/comdlg32/cdlg_Nl.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_Nl.rc rename to dll/win32/comdlg32/cdlg_Nl.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_No.rc b/dll/win32/comdlg32/cdlg_No.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_No.rc rename to dll/win32/comdlg32/cdlg_No.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_Pl.rc b/dll/win32/comdlg32/cdlg_Pl.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_Pl.rc rename to dll/win32/comdlg32/cdlg_Pl.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_Pt.rc b/dll/win32/comdlg32/cdlg_Pt.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_Pt.rc rename to dll/win32/comdlg32/cdlg_Pt.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_Ro.rc b/dll/win32/comdlg32/cdlg_Ro.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_Ro.rc rename to dll/win32/comdlg32/cdlg_Ro.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_Ru.rc b/dll/win32/comdlg32/cdlg_Ru.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_Ru.rc rename to dll/win32/comdlg32/cdlg_Ru.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_Si.rc b/dll/win32/comdlg32/cdlg_Si.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_Si.rc rename to dll/win32/comdlg32/cdlg_Si.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_Sk.rc b/dll/win32/comdlg32/cdlg_Sk.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_Sk.rc rename to dll/win32/comdlg32/cdlg_Sk.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_Sr.rc b/dll/win32/comdlg32/cdlg_Sr.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_Sr.rc rename to dll/win32/comdlg32/cdlg_Sr.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_Sv.rc b/dll/win32/comdlg32/cdlg_Sv.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_Sv.rc rename to dll/win32/comdlg32/cdlg_Sv.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_Th.rc b/dll/win32/comdlg32/cdlg_Th.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_Th.rc rename to dll/win32/comdlg32/cdlg_Th.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_Tr.rc b/dll/win32/comdlg32/cdlg_Tr.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_Tr.rc rename to dll/win32/comdlg32/cdlg_Tr.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_Uk.rc b/dll/win32/comdlg32/cdlg_Uk.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_Uk.rc rename to dll/win32/comdlg32/cdlg_Uk.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_Zh.rc b/dll/win32/comdlg32/cdlg_Zh.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_Zh.rc rename to dll/win32/comdlg32/cdlg_Zh.rc diff --git a/reactos/dll/win32/comdlg32/cdlg_xx.rc b/dll/win32/comdlg32/cdlg_xx.rc similarity index 100% rename from reactos/dll/win32/comdlg32/cdlg_xx.rc rename to dll/win32/comdlg32/cdlg_xx.rc diff --git a/reactos/dll/win32/comdlg32/cdrom.ico b/dll/win32/comdlg32/cdrom.ico similarity index 100% rename from reactos/dll/win32/comdlg32/cdrom.ico rename to dll/win32/comdlg32/cdrom.ico diff --git a/reactos/dll/win32/comdlg32/colordlg.c b/dll/win32/comdlg32/colordlg.c similarity index 100% rename from reactos/dll/win32/comdlg32/colordlg.c rename to dll/win32/comdlg32/colordlg.c diff --git a/reactos/dll/win32/comdlg32/colordlg16.c b/dll/win32/comdlg32/colordlg16.c similarity index 100% rename from reactos/dll/win32/comdlg32/colordlg16.c rename to dll/win32/comdlg32/colordlg16.c diff --git a/reactos/dll/win32/comdlg32/comdlg32.rbuild b/dll/win32/comdlg32/comdlg32.rbuild similarity index 100% rename from reactos/dll/win32/comdlg32/comdlg32.rbuild rename to dll/win32/comdlg32/comdlg32.rbuild diff --git a/reactos/dll/win32/comdlg32/comdlg32.spec b/dll/win32/comdlg32/comdlg32.spec similarity index 100% rename from reactos/dll/win32/comdlg32/comdlg32.spec rename to dll/win32/comdlg32/comdlg32.spec diff --git a/reactos/dll/win32/comdlg32/commdlg.spec b/dll/win32/comdlg32/commdlg.spec similarity index 100% rename from reactos/dll/win32/comdlg32/commdlg.spec rename to dll/win32/comdlg32/commdlg.spec diff --git a/reactos/dll/win32/comdlg32/filedlg.c b/dll/win32/comdlg32/filedlg.c similarity index 100% rename from reactos/dll/win32/comdlg32/filedlg.c rename to dll/win32/comdlg32/filedlg.c diff --git a/reactos/dll/win32/comdlg32/filedlg16.c b/dll/win32/comdlg32/filedlg16.c similarity index 100% rename from reactos/dll/win32/comdlg32/filedlg16.c rename to dll/win32/comdlg32/filedlg16.c diff --git a/reactos/dll/win32/comdlg32/filedlg31.c b/dll/win32/comdlg32/filedlg31.c similarity index 100% rename from reactos/dll/win32/comdlg32/filedlg31.c rename to dll/win32/comdlg32/filedlg31.c diff --git a/reactos/dll/win32/comdlg32/filedlg31.h b/dll/win32/comdlg32/filedlg31.h similarity index 100% rename from reactos/dll/win32/comdlg32/filedlg31.h rename to dll/win32/comdlg32/filedlg31.h diff --git a/reactos/dll/win32/comdlg32/filedlgbrowser.c b/dll/win32/comdlg32/filedlgbrowser.c similarity index 100% rename from reactos/dll/win32/comdlg32/filedlgbrowser.c rename to dll/win32/comdlg32/filedlgbrowser.c diff --git a/reactos/dll/win32/comdlg32/filedlgbrowser.h b/dll/win32/comdlg32/filedlgbrowser.h similarity index 100% rename from reactos/dll/win32/comdlg32/filedlgbrowser.h rename to dll/win32/comdlg32/filedlgbrowser.h diff --git a/reactos/dll/win32/comdlg32/finddlg.c b/dll/win32/comdlg32/finddlg.c similarity index 100% rename from reactos/dll/win32/comdlg32/finddlg.c rename to dll/win32/comdlg32/finddlg.c diff --git a/reactos/dll/win32/comdlg32/floppy.ico b/dll/win32/comdlg32/floppy.ico similarity index 100% rename from reactos/dll/win32/comdlg32/floppy.ico rename to dll/win32/comdlg32/floppy.ico diff --git a/reactos/dll/win32/comdlg32/folder.ico b/dll/win32/comdlg32/folder.ico similarity index 100% rename from reactos/dll/win32/comdlg32/folder.ico rename to dll/win32/comdlg32/folder.ico diff --git a/reactos/dll/win32/comdlg32/folder2.ico b/dll/win32/comdlg32/folder2.ico similarity index 100% rename from reactos/dll/win32/comdlg32/folder2.ico rename to dll/win32/comdlg32/folder2.ico diff --git a/reactos/dll/win32/comdlg32/fontdlg.c b/dll/win32/comdlg32/fontdlg.c similarity index 100% rename from reactos/dll/win32/comdlg32/fontdlg.c rename to dll/win32/comdlg32/fontdlg.c diff --git a/reactos/dll/win32/comdlg32/fontpics.bmp b/dll/win32/comdlg32/fontpics.bmp similarity index 100% rename from reactos/dll/win32/comdlg32/fontpics.bmp rename to dll/win32/comdlg32/fontpics.bmp diff --git a/reactos/dll/win32/comdlg32/hdisk.ico b/dll/win32/comdlg32/hdisk.ico similarity index 100% rename from reactos/dll/win32/comdlg32/hdisk.ico rename to dll/win32/comdlg32/hdisk.ico diff --git a/reactos/dll/win32/comdlg32/network.ico b/dll/win32/comdlg32/network.ico similarity index 100% rename from reactos/dll/win32/comdlg32/network.ico rename to dll/win32/comdlg32/network.ico diff --git a/reactos/dll/win32/comdlg32/pd32_collate.ico b/dll/win32/comdlg32/pd32_collate.ico similarity index 100% rename from reactos/dll/win32/comdlg32/pd32_collate.ico rename to dll/win32/comdlg32/pd32_collate.ico diff --git a/reactos/dll/win32/comdlg32/pd32_landscape.ico b/dll/win32/comdlg32/pd32_landscape.ico similarity index 100% rename from reactos/dll/win32/comdlg32/pd32_landscape.ico rename to dll/win32/comdlg32/pd32_landscape.ico diff --git a/reactos/dll/win32/comdlg32/pd32_nocollate.ico b/dll/win32/comdlg32/pd32_nocollate.ico similarity index 100% rename from reactos/dll/win32/comdlg32/pd32_nocollate.ico rename to dll/win32/comdlg32/pd32_nocollate.ico diff --git a/reactos/dll/win32/comdlg32/pd32_portrait.ico b/dll/win32/comdlg32/pd32_portrait.ico similarity index 100% rename from reactos/dll/win32/comdlg32/pd32_portrait.ico rename to dll/win32/comdlg32/pd32_portrait.ico diff --git a/reactos/dll/win32/comdlg32/printdlg.c b/dll/win32/comdlg32/printdlg.c similarity index 100% rename from reactos/dll/win32/comdlg32/printdlg.c rename to dll/win32/comdlg32/printdlg.c diff --git a/reactos/dll/win32/comdlg32/printdlg.h b/dll/win32/comdlg32/printdlg.h similarity index 100% rename from reactos/dll/win32/comdlg32/printdlg.h rename to dll/win32/comdlg32/printdlg.h diff --git a/reactos/dll/win32/comdlg32/rsrc.rc b/dll/win32/comdlg32/rsrc.rc similarity index 100% rename from reactos/dll/win32/comdlg32/rsrc.rc rename to dll/win32/comdlg32/rsrc.rc diff --git a/reactos/dll/win32/compstui/CMakeLists.txt b/dll/win32/compstui/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/compstui/CMakeLists.txt rename to dll/win32/compstui/CMakeLists.txt diff --git a/reactos/dll/win32/compstui/compstui.rbuild b/dll/win32/compstui/compstui.rbuild similarity index 100% rename from reactos/dll/win32/compstui/compstui.rbuild rename to dll/win32/compstui/compstui.rbuild diff --git a/reactos/dll/win32/compstui/compstui.spec b/dll/win32/compstui/compstui.spec similarity index 100% rename from reactos/dll/win32/compstui/compstui.spec rename to dll/win32/compstui/compstui.spec diff --git a/reactos/dll/win32/compstui/compstui_main.c b/dll/win32/compstui/compstui_main.c similarity index 100% rename from reactos/dll/win32/compstui/compstui_main.c rename to dll/win32/compstui/compstui_main.c diff --git a/reactos/dll/win32/credui/CMakeLists.txt b/dll/win32/credui/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/credui/CMakeLists.txt rename to dll/win32/credui/CMakeLists.txt diff --git a/reactos/dll/win32/credui/banner.bmp b/dll/win32/credui/banner.bmp similarity index 100% rename from reactos/dll/win32/credui/banner.bmp rename to dll/win32/credui/banner.bmp diff --git a/reactos/dll/win32/credui/credui.rbuild b/dll/win32/credui/credui.rbuild similarity index 100% rename from reactos/dll/win32/credui/credui.rbuild rename to dll/win32/credui/credui.rbuild diff --git a/reactos/dll/win32/credui/credui.rc b/dll/win32/credui/credui.rc similarity index 100% rename from reactos/dll/win32/credui/credui.rc rename to dll/win32/credui/credui.rc diff --git a/reactos/dll/win32/credui/credui.spec b/dll/win32/credui/credui.spec similarity index 100% rename from reactos/dll/win32/credui/credui.spec rename to dll/win32/credui/credui.spec diff --git a/reactos/dll/win32/credui/credui_Da.rc b/dll/win32/credui/credui_Da.rc similarity index 100% rename from reactos/dll/win32/credui/credui_Da.rc rename to dll/win32/credui/credui_Da.rc diff --git a/reactos/dll/win32/credui/credui_De.rc b/dll/win32/credui/credui_De.rc similarity index 100% rename from reactos/dll/win32/credui/credui_De.rc rename to dll/win32/credui/credui_De.rc diff --git a/reactos/dll/win32/credui/credui_En.rc b/dll/win32/credui/credui_En.rc similarity index 100% rename from reactos/dll/win32/credui/credui_En.rc rename to dll/win32/credui/credui_En.rc diff --git a/reactos/dll/win32/credui/credui_Es.rc b/dll/win32/credui/credui_Es.rc similarity index 100% rename from reactos/dll/win32/credui/credui_Es.rc rename to dll/win32/credui/credui_Es.rc diff --git a/reactos/dll/win32/credui/credui_Fr.rc b/dll/win32/credui/credui_Fr.rc similarity index 100% rename from reactos/dll/win32/credui/credui_Fr.rc rename to dll/win32/credui/credui_Fr.rc diff --git a/reactos/dll/win32/credui/credui_Hu.rc b/dll/win32/credui/credui_Hu.rc similarity index 100% rename from reactos/dll/win32/credui/credui_Hu.rc rename to dll/win32/credui/credui_Hu.rc diff --git a/reactos/dll/win32/credui/credui_It.rc b/dll/win32/credui/credui_It.rc similarity index 100% rename from reactos/dll/win32/credui/credui_It.rc rename to dll/win32/credui/credui_It.rc diff --git a/reactos/dll/win32/credui/credui_Ko.rc b/dll/win32/credui/credui_Ko.rc similarity index 100% rename from reactos/dll/win32/credui/credui_Ko.rc rename to dll/win32/credui/credui_Ko.rc diff --git a/reactos/dll/win32/credui/credui_Lt.rc b/dll/win32/credui/credui_Lt.rc similarity index 100% rename from reactos/dll/win32/credui/credui_Lt.rc rename to dll/win32/credui/credui_Lt.rc diff --git a/reactos/dll/win32/credui/credui_Nl.rc b/dll/win32/credui/credui_Nl.rc similarity index 100% rename from reactos/dll/win32/credui/credui_Nl.rc rename to dll/win32/credui/credui_Nl.rc diff --git a/reactos/dll/win32/credui/credui_No.rc b/dll/win32/credui/credui_No.rc similarity index 100% rename from reactos/dll/win32/credui/credui_No.rc rename to dll/win32/credui/credui_No.rc diff --git a/reactos/dll/win32/credui/credui_Pl.rc b/dll/win32/credui/credui_Pl.rc similarity index 100% rename from reactos/dll/win32/credui/credui_Pl.rc rename to dll/win32/credui/credui_Pl.rc diff --git a/reactos/dll/win32/credui/credui_Pt.rc b/dll/win32/credui/credui_Pt.rc similarity index 100% rename from reactos/dll/win32/credui/credui_Pt.rc rename to dll/win32/credui/credui_Pt.rc diff --git a/reactos/dll/win32/credui/credui_Ro.rc b/dll/win32/credui/credui_Ro.rc similarity index 100% rename from reactos/dll/win32/credui/credui_Ro.rc rename to dll/win32/credui/credui_Ro.rc diff --git a/reactos/dll/win32/credui/credui_Ru.rc b/dll/win32/credui/credui_Ru.rc similarity index 100% rename from reactos/dll/win32/credui/credui_Ru.rc rename to dll/win32/credui/credui_Ru.rc diff --git a/reactos/dll/win32/credui/credui_Si.rc b/dll/win32/credui/credui_Si.rc similarity index 100% rename from reactos/dll/win32/credui/credui_Si.rc rename to dll/win32/credui/credui_Si.rc diff --git a/reactos/dll/win32/credui/credui_Sv.rc b/dll/win32/credui/credui_Sv.rc similarity index 100% rename from reactos/dll/win32/credui/credui_Sv.rc rename to dll/win32/credui/credui_Sv.rc diff --git a/reactos/dll/win32/credui/credui_Uk.rc b/dll/win32/credui/credui_Uk.rc similarity index 100% rename from reactos/dll/win32/credui/credui_Uk.rc rename to dll/win32/credui/credui_Uk.rc diff --git a/reactos/dll/win32/credui/credui_Zh.rc b/dll/win32/credui/credui_Zh.rc similarity index 100% rename from reactos/dll/win32/credui/credui_Zh.rc rename to dll/win32/credui/credui_Zh.rc diff --git a/reactos/dll/win32/credui/credui_main.c b/dll/win32/credui/credui_main.c similarity index 100% rename from reactos/dll/win32/credui/credui_main.c rename to dll/win32/credui/credui_main.c diff --git a/reactos/dll/win32/credui/credui_resources.h b/dll/win32/credui/credui_resources.h similarity index 100% rename from reactos/dll/win32/credui/credui_resources.h rename to dll/win32/credui/credui_resources.h diff --git a/reactos/dll/win32/crtdll/CMakeLists.txt b/dll/win32/crtdll/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/crtdll/CMakeLists.txt rename to dll/win32/crtdll/CMakeLists.txt diff --git a/reactos/dll/win32/crtdll/crtdll.rbuild b/dll/win32/crtdll/crtdll.rbuild similarity index 100% rename from reactos/dll/win32/crtdll/crtdll.rbuild rename to dll/win32/crtdll/crtdll.rbuild diff --git a/reactos/dll/win32/crtdll/crtdll.rc b/dll/win32/crtdll/crtdll.rc similarity index 100% rename from reactos/dll/win32/crtdll/crtdll.rc rename to dll/win32/crtdll/crtdll.rc diff --git a/reactos/dll/win32/crtdll/crtdll.spec b/dll/win32/crtdll/crtdll.spec similarity index 100% rename from reactos/dll/win32/crtdll/crtdll.spec rename to dll/win32/crtdll/crtdll.spec diff --git a/reactos/dll/win32/crtdll/dllmain.c b/dll/win32/crtdll/dllmain.c similarity index 100% rename from reactos/dll/win32/crtdll/dllmain.c rename to dll/win32/crtdll/dllmain.c diff --git a/reactos/dll/win32/crtdll/precomp.h b/dll/win32/crtdll/precomp.h similarity index 100% rename from reactos/dll/win32/crtdll/precomp.h rename to dll/win32/crtdll/precomp.h diff --git a/reactos/dll/win32/crypt32/CMakeLists.txt b/dll/win32/crypt32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/crypt32/CMakeLists.txt rename to dll/win32/crypt32/CMakeLists.txt diff --git a/reactos/dll/win32/crypt32/base64.c b/dll/win32/crypt32/base64.c similarity index 100% rename from reactos/dll/win32/crypt32/base64.c rename to dll/win32/crypt32/base64.c diff --git a/reactos/dll/win32/crypt32/cert.c b/dll/win32/crypt32/cert.c similarity index 100% rename from reactos/dll/win32/crypt32/cert.c rename to dll/win32/crypt32/cert.c diff --git a/reactos/dll/win32/crypt32/chain.c b/dll/win32/crypt32/chain.c similarity index 100% rename from reactos/dll/win32/crypt32/chain.c rename to dll/win32/crypt32/chain.c diff --git a/reactos/dll/win32/crypt32/collectionstore.c b/dll/win32/crypt32/collectionstore.c similarity index 100% rename from reactos/dll/win32/crypt32/collectionstore.c rename to dll/win32/crypt32/collectionstore.c diff --git a/reactos/dll/win32/crypt32/context.c b/dll/win32/crypt32/context.c similarity index 100% rename from reactos/dll/win32/crypt32/context.c rename to dll/win32/crypt32/context.c diff --git a/reactos/dll/win32/crypt32/crl.c b/dll/win32/crypt32/crl.c similarity index 100% rename from reactos/dll/win32/crypt32/crl.c rename to dll/win32/crypt32/crl.c diff --git a/reactos/dll/win32/crypt32/crypt32.rbuild b/dll/win32/crypt32/crypt32.rbuild similarity index 100% rename from reactos/dll/win32/crypt32/crypt32.rbuild rename to dll/win32/crypt32/crypt32.rbuild diff --git a/reactos/dll/win32/crypt32/crypt32.rc b/dll/win32/crypt32/crypt32.rc similarity index 100% rename from reactos/dll/win32/crypt32/crypt32.rc rename to dll/win32/crypt32/crypt32.rc diff --git a/reactos/dll/win32/crypt32/crypt32.spec b/dll/win32/crypt32/crypt32.spec similarity index 100% rename from reactos/dll/win32/crypt32/crypt32.spec rename to dll/win32/crypt32/crypt32.spec diff --git a/reactos/dll/win32/crypt32/crypt32_De.rc b/dll/win32/crypt32/crypt32_De.rc similarity index 100% rename from reactos/dll/win32/crypt32/crypt32_De.rc rename to dll/win32/crypt32/crypt32_De.rc diff --git a/reactos/dll/win32/crypt32/crypt32_En.rc b/dll/win32/crypt32/crypt32_En.rc similarity index 100% rename from reactos/dll/win32/crypt32/crypt32_En.rc rename to dll/win32/crypt32/crypt32_En.rc diff --git a/reactos/dll/win32/crypt32/crypt32_Fr.rc b/dll/win32/crypt32/crypt32_Fr.rc similarity index 100% rename from reactos/dll/win32/crypt32/crypt32_Fr.rc rename to dll/win32/crypt32/crypt32_Fr.rc diff --git a/reactos/dll/win32/crypt32/crypt32_Hu.rc b/dll/win32/crypt32/crypt32_Hu.rc similarity index 100% rename from reactos/dll/win32/crypt32/crypt32_Hu.rc rename to dll/win32/crypt32/crypt32_Hu.rc diff --git a/reactos/dll/win32/crypt32/crypt32_It.rc b/dll/win32/crypt32/crypt32_It.rc similarity index 100% rename from reactos/dll/win32/crypt32/crypt32_It.rc rename to dll/win32/crypt32/crypt32_It.rc diff --git a/reactos/dll/win32/crypt32/crypt32_Ko.rc b/dll/win32/crypt32/crypt32_Ko.rc similarity index 100% rename from reactos/dll/win32/crypt32/crypt32_Ko.rc rename to dll/win32/crypt32/crypt32_Ko.rc diff --git a/reactos/dll/win32/crypt32/crypt32_Lt.rc b/dll/win32/crypt32/crypt32_Lt.rc similarity index 100% rename from reactos/dll/win32/crypt32/crypt32_Lt.rc rename to dll/win32/crypt32/crypt32_Lt.rc diff --git a/reactos/dll/win32/crypt32/crypt32_Nl.rc b/dll/win32/crypt32/crypt32_Nl.rc similarity index 100% rename from reactos/dll/win32/crypt32/crypt32_Nl.rc rename to dll/win32/crypt32/crypt32_Nl.rc diff --git a/reactos/dll/win32/crypt32/crypt32_No.rc b/dll/win32/crypt32/crypt32_No.rc similarity index 100% rename from reactos/dll/win32/crypt32/crypt32_No.rc rename to dll/win32/crypt32/crypt32_No.rc diff --git a/reactos/dll/win32/crypt32/crypt32_Pl.rc b/dll/win32/crypt32/crypt32_Pl.rc similarity index 100% rename from reactos/dll/win32/crypt32/crypt32_Pl.rc rename to dll/win32/crypt32/crypt32_Pl.rc diff --git a/reactos/dll/win32/crypt32/crypt32_Pt.rc b/dll/win32/crypt32/crypt32_Pt.rc similarity index 100% rename from reactos/dll/win32/crypt32/crypt32_Pt.rc rename to dll/win32/crypt32/crypt32_Pt.rc diff --git a/reactos/dll/win32/crypt32/crypt32_Ro.rc b/dll/win32/crypt32/crypt32_Ro.rc similarity index 100% rename from reactos/dll/win32/crypt32/crypt32_Ro.rc rename to dll/win32/crypt32/crypt32_Ro.rc diff --git a/reactos/dll/win32/crypt32/crypt32_Sv.rc b/dll/win32/crypt32/crypt32_Sv.rc similarity index 100% rename from reactos/dll/win32/crypt32/crypt32_Sv.rc rename to dll/win32/crypt32/crypt32_Sv.rc diff --git a/reactos/dll/win32/crypt32/crypt32_Uk.rc b/dll/win32/crypt32/crypt32_Uk.rc similarity index 100% rename from reactos/dll/win32/crypt32/crypt32_Uk.rc rename to dll/win32/crypt32/crypt32_Uk.rc diff --git a/reactos/dll/win32/crypt32/crypt32_private.h b/dll/win32/crypt32/crypt32_private.h similarity index 100% rename from reactos/dll/win32/crypt32/crypt32_private.h rename to dll/win32/crypt32/crypt32_private.h diff --git a/reactos/dll/win32/crypt32/cryptres.h b/dll/win32/crypt32/cryptres.h similarity index 100% rename from reactos/dll/win32/crypt32/cryptres.h rename to dll/win32/crypt32/cryptres.h diff --git a/reactos/dll/win32/crypt32/ctl.c b/dll/win32/crypt32/ctl.c similarity index 100% rename from reactos/dll/win32/crypt32/ctl.c rename to dll/win32/crypt32/ctl.c diff --git a/reactos/dll/win32/crypt32/decode.c b/dll/win32/crypt32/decode.c similarity index 100% rename from reactos/dll/win32/crypt32/decode.c rename to dll/win32/crypt32/decode.c diff --git a/reactos/dll/win32/crypt32/encode.c b/dll/win32/crypt32/encode.c similarity index 100% rename from reactos/dll/win32/crypt32/encode.c rename to dll/win32/crypt32/encode.c diff --git a/reactos/dll/win32/crypt32/filestore.c b/dll/win32/crypt32/filestore.c similarity index 100% rename from reactos/dll/win32/crypt32/filestore.c rename to dll/win32/crypt32/filestore.c diff --git a/reactos/dll/win32/crypt32/main.c b/dll/win32/crypt32/main.c similarity index 100% rename from reactos/dll/win32/crypt32/main.c rename to dll/win32/crypt32/main.c diff --git a/reactos/dll/win32/crypt32/message.c b/dll/win32/crypt32/message.c similarity index 100% rename from reactos/dll/win32/crypt32/message.c rename to dll/win32/crypt32/message.c diff --git a/reactos/dll/win32/crypt32/msg.c b/dll/win32/crypt32/msg.c similarity index 100% rename from reactos/dll/win32/crypt32/msg.c rename to dll/win32/crypt32/msg.c diff --git a/reactos/dll/win32/crypt32/object.c b/dll/win32/crypt32/object.c similarity index 100% rename from reactos/dll/win32/crypt32/object.c rename to dll/win32/crypt32/object.c diff --git a/reactos/dll/win32/crypt32/oid.c b/dll/win32/crypt32/oid.c similarity index 100% rename from reactos/dll/win32/crypt32/oid.c rename to dll/win32/crypt32/oid.c diff --git a/reactos/dll/win32/crypt32/proplist.c b/dll/win32/crypt32/proplist.c similarity index 100% rename from reactos/dll/win32/crypt32/proplist.c rename to dll/win32/crypt32/proplist.c diff --git a/reactos/dll/win32/crypt32/protectdata.c b/dll/win32/crypt32/protectdata.c similarity index 100% rename from reactos/dll/win32/crypt32/protectdata.c rename to dll/win32/crypt32/protectdata.c diff --git a/reactos/dll/win32/crypt32/provstore.c b/dll/win32/crypt32/provstore.c similarity index 100% rename from reactos/dll/win32/crypt32/provstore.c rename to dll/win32/crypt32/provstore.c diff --git a/reactos/dll/win32/crypt32/regstore.c b/dll/win32/crypt32/regstore.c similarity index 100% rename from reactos/dll/win32/crypt32/regstore.c rename to dll/win32/crypt32/regstore.c diff --git a/reactos/dll/win32/crypt32/rootstore.c b/dll/win32/crypt32/rootstore.c similarity index 100% rename from reactos/dll/win32/crypt32/rootstore.c rename to dll/win32/crypt32/rootstore.c diff --git a/reactos/dll/win32/crypt32/serialize.c b/dll/win32/crypt32/serialize.c similarity index 100% rename from reactos/dll/win32/crypt32/serialize.c rename to dll/win32/crypt32/serialize.c diff --git a/reactos/dll/win32/crypt32/sip.c b/dll/win32/crypt32/sip.c similarity index 100% rename from reactos/dll/win32/crypt32/sip.c rename to dll/win32/crypt32/sip.c diff --git a/reactos/dll/win32/crypt32/store.c b/dll/win32/crypt32/store.c similarity index 100% rename from reactos/dll/win32/crypt32/store.c rename to dll/win32/crypt32/store.c diff --git a/reactos/dll/win32/crypt32/str.c b/dll/win32/crypt32/str.c similarity index 100% rename from reactos/dll/win32/crypt32/str.c rename to dll/win32/crypt32/str.c diff --git a/reactos/dll/win32/crypt32/version.rc b/dll/win32/crypt32/version.rc similarity index 100% rename from reactos/dll/win32/crypt32/version.rc rename to dll/win32/crypt32/version.rc diff --git a/reactos/dll/win32/cryptdlg/CMakeLists.txt b/dll/win32/cryptdlg/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/cryptdlg/CMakeLists.txt rename to dll/win32/cryptdlg/CMakeLists.txt diff --git a/reactos/dll/win32/cryptdlg/cryptdlg.rbuild b/dll/win32/cryptdlg/cryptdlg.rbuild similarity index 100% rename from reactos/dll/win32/cryptdlg/cryptdlg.rbuild rename to dll/win32/cryptdlg/cryptdlg.rbuild diff --git a/reactos/dll/win32/cryptdlg/cryptdlg.rc b/dll/win32/cryptdlg/cryptdlg.rc similarity index 100% rename from reactos/dll/win32/cryptdlg/cryptdlg.rc rename to dll/win32/cryptdlg/cryptdlg.rc diff --git a/reactos/dll/win32/cryptdlg/cryptdlg.spec b/dll/win32/cryptdlg/cryptdlg.spec similarity index 100% rename from reactos/dll/win32/cryptdlg/cryptdlg.spec rename to dll/win32/cryptdlg/cryptdlg.spec diff --git a/reactos/dll/win32/cryptdlg/cryptdlg_Da.rc b/dll/win32/cryptdlg/cryptdlg_Da.rc similarity index 100% rename from reactos/dll/win32/cryptdlg/cryptdlg_Da.rc rename to dll/win32/cryptdlg/cryptdlg_Da.rc diff --git a/reactos/dll/win32/cryptdlg/cryptdlg_De.rc b/dll/win32/cryptdlg/cryptdlg_De.rc similarity index 100% rename from reactos/dll/win32/cryptdlg/cryptdlg_De.rc rename to dll/win32/cryptdlg/cryptdlg_De.rc diff --git a/reactos/dll/win32/cryptdlg/cryptdlg_En.rc b/dll/win32/cryptdlg/cryptdlg_En.rc similarity index 100% rename from reactos/dll/win32/cryptdlg/cryptdlg_En.rc rename to dll/win32/cryptdlg/cryptdlg_En.rc diff --git a/reactos/dll/win32/cryptdlg/cryptdlg_Fr.rc b/dll/win32/cryptdlg/cryptdlg_Fr.rc similarity index 100% rename from reactos/dll/win32/cryptdlg/cryptdlg_Fr.rc rename to dll/win32/cryptdlg/cryptdlg_Fr.rc diff --git a/reactos/dll/win32/cryptdlg/cryptdlg_Hu.rc b/dll/win32/cryptdlg/cryptdlg_Hu.rc similarity index 100% rename from reactos/dll/win32/cryptdlg/cryptdlg_Hu.rc rename to dll/win32/cryptdlg/cryptdlg_Hu.rc diff --git a/reactos/dll/win32/cryptdlg/cryptdlg_It.rc b/dll/win32/cryptdlg/cryptdlg_It.rc similarity index 100% rename from reactos/dll/win32/cryptdlg/cryptdlg_It.rc rename to dll/win32/cryptdlg/cryptdlg_It.rc diff --git a/reactos/dll/win32/cryptdlg/cryptdlg_Ko.rc b/dll/win32/cryptdlg/cryptdlg_Ko.rc similarity index 100% rename from reactos/dll/win32/cryptdlg/cryptdlg_Ko.rc rename to dll/win32/cryptdlg/cryptdlg_Ko.rc diff --git a/reactos/dll/win32/cryptdlg/cryptdlg_Lt.rc b/dll/win32/cryptdlg/cryptdlg_Lt.rc similarity index 100% rename from reactos/dll/win32/cryptdlg/cryptdlg_Lt.rc rename to dll/win32/cryptdlg/cryptdlg_Lt.rc diff --git a/reactos/dll/win32/cryptdlg/cryptdlg_Nl.rc b/dll/win32/cryptdlg/cryptdlg_Nl.rc similarity index 100% rename from reactos/dll/win32/cryptdlg/cryptdlg_Nl.rc rename to dll/win32/cryptdlg/cryptdlg_Nl.rc diff --git a/reactos/dll/win32/cryptdlg/cryptdlg_No.rc b/dll/win32/cryptdlg/cryptdlg_No.rc similarity index 100% rename from reactos/dll/win32/cryptdlg/cryptdlg_No.rc rename to dll/win32/cryptdlg/cryptdlg_No.rc diff --git a/reactos/dll/win32/cryptdlg/cryptdlg_Pl.rc b/dll/win32/cryptdlg/cryptdlg_Pl.rc similarity index 100% rename from reactos/dll/win32/cryptdlg/cryptdlg_Pl.rc rename to dll/win32/cryptdlg/cryptdlg_Pl.rc diff --git a/reactos/dll/win32/cryptdlg/cryptdlg_Pt.rc b/dll/win32/cryptdlg/cryptdlg_Pt.rc similarity index 100% rename from reactos/dll/win32/cryptdlg/cryptdlg_Pt.rc rename to dll/win32/cryptdlg/cryptdlg_Pt.rc diff --git a/reactos/dll/win32/cryptdlg/cryptdlg_Ro.rc b/dll/win32/cryptdlg/cryptdlg_Ro.rc similarity index 100% rename from reactos/dll/win32/cryptdlg/cryptdlg_Ro.rc rename to dll/win32/cryptdlg/cryptdlg_Ro.rc diff --git a/reactos/dll/win32/cryptdlg/cryptdlg_Uk.rc b/dll/win32/cryptdlg/cryptdlg_Uk.rc similarity index 100% rename from reactos/dll/win32/cryptdlg/cryptdlg_Uk.rc rename to dll/win32/cryptdlg/cryptdlg_Uk.rc diff --git a/reactos/dll/win32/cryptdlg/cryptres.h b/dll/win32/cryptdlg/cryptres.h similarity index 100% rename from reactos/dll/win32/cryptdlg/cryptres.h rename to dll/win32/cryptdlg/cryptres.h diff --git a/reactos/dll/win32/cryptdlg/main.c b/dll/win32/cryptdlg/main.c similarity index 100% rename from reactos/dll/win32/cryptdlg/main.c rename to dll/win32/cryptdlg/main.c diff --git a/reactos/dll/win32/cryptdll/CMakeLists.txt b/dll/win32/cryptdll/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/cryptdll/CMakeLists.txt rename to dll/win32/cryptdll/CMakeLists.txt diff --git a/reactos/dll/win32/cryptdll/cryptdll.c b/dll/win32/cryptdll/cryptdll.c similarity index 100% rename from reactos/dll/win32/cryptdll/cryptdll.c rename to dll/win32/cryptdll/cryptdll.c diff --git a/reactos/dll/win32/cryptdll/cryptdll.rbuild b/dll/win32/cryptdll/cryptdll.rbuild similarity index 100% rename from reactos/dll/win32/cryptdll/cryptdll.rbuild rename to dll/win32/cryptdll/cryptdll.rbuild diff --git a/reactos/dll/win32/cryptdll/cryptdll.spec b/dll/win32/cryptdll/cryptdll.spec similarity index 100% rename from reactos/dll/win32/cryptdll/cryptdll.spec rename to dll/win32/cryptdll/cryptdll.spec diff --git a/reactos/dll/win32/cryptdll/stubs.c b/dll/win32/cryptdll/stubs.c similarity index 100% rename from reactos/dll/win32/cryptdll/stubs.c rename to dll/win32/cryptdll/stubs.c diff --git a/reactos/dll/win32/cryptnet/CMakeLists.txt b/dll/win32/cryptnet/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/cryptnet/CMakeLists.txt rename to dll/win32/cryptnet/CMakeLists.txt diff --git a/reactos/dll/win32/cryptnet/cryptnet.rbuild b/dll/win32/cryptnet/cryptnet.rbuild similarity index 100% rename from reactos/dll/win32/cryptnet/cryptnet.rbuild rename to dll/win32/cryptnet/cryptnet.rbuild diff --git a/reactos/dll/win32/cryptnet/cryptnet.spec b/dll/win32/cryptnet/cryptnet.spec similarity index 100% rename from reactos/dll/win32/cryptnet/cryptnet.spec rename to dll/win32/cryptnet/cryptnet.spec diff --git a/reactos/dll/win32/cryptnet/cryptnet_main.c b/dll/win32/cryptnet/cryptnet_main.c similarity index 100% rename from reactos/dll/win32/cryptnet/cryptnet_main.c rename to dll/win32/cryptnet/cryptnet_main.c diff --git a/reactos/dll/win32/cryptui/CMakeLists.txt b/dll/win32/cryptui/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/cryptui/CMakeLists.txt rename to dll/win32/cryptui/CMakeLists.txt diff --git a/reactos/dll/win32/cryptui/cert.bmp b/dll/win32/cryptui/cert.bmp similarity index 100% rename from reactos/dll/win32/cryptui/cert.bmp rename to dll/win32/cryptui/cert.bmp diff --git a/reactos/dll/win32/cryptui/certerror.bmp b/dll/win32/cryptui/certerror.bmp similarity index 100% rename from reactos/dll/win32/cryptui/certerror.bmp rename to dll/win32/cryptui/certerror.bmp diff --git a/reactos/dll/win32/cryptui/certheader.bmp b/dll/win32/cryptui/certheader.bmp similarity index 100% rename from reactos/dll/win32/cryptui/certheader.bmp rename to dll/win32/cryptui/certheader.bmp diff --git a/reactos/dll/win32/cryptui/certwarning.bmp b/dll/win32/cryptui/certwarning.bmp similarity index 100% rename from reactos/dll/win32/cryptui/certwarning.bmp rename to dll/win32/cryptui/certwarning.bmp diff --git a/reactos/dll/win32/cryptui/certwatermark.bmp b/dll/win32/cryptui/certwatermark.bmp similarity index 100% rename from reactos/dll/win32/cryptui/certwatermark.bmp rename to dll/win32/cryptui/certwatermark.bmp diff --git a/reactos/dll/win32/cryptui/checks.bmp b/dll/win32/cryptui/checks.bmp similarity index 100% rename from reactos/dll/win32/cryptui/checks.bmp rename to dll/win32/cryptui/checks.bmp diff --git a/reactos/dll/win32/cryptui/cryptui.rbuild b/dll/win32/cryptui/cryptui.rbuild similarity index 100% rename from reactos/dll/win32/cryptui/cryptui.rbuild rename to dll/win32/cryptui/cryptui.rbuild diff --git a/reactos/dll/win32/cryptui/cryptui.rc b/dll/win32/cryptui/cryptui.rc similarity index 100% rename from reactos/dll/win32/cryptui/cryptui.rc rename to dll/win32/cryptui/cryptui.rc diff --git a/reactos/dll/win32/cryptui/cryptui.spec b/dll/win32/cryptui/cryptui.spec similarity index 100% rename from reactos/dll/win32/cryptui/cryptui.spec rename to dll/win32/cryptui/cryptui.spec diff --git a/reactos/dll/win32/cryptui/cryptui_De.rc b/dll/win32/cryptui/cryptui_De.rc similarity index 100% rename from reactos/dll/win32/cryptui/cryptui_De.rc rename to dll/win32/cryptui/cryptui_De.rc diff --git a/reactos/dll/win32/cryptui/cryptui_En.rc b/dll/win32/cryptui/cryptui_En.rc similarity index 100% rename from reactos/dll/win32/cryptui/cryptui_En.rc rename to dll/win32/cryptui/cryptui_En.rc diff --git a/reactos/dll/win32/cryptui/cryptui_Fr.rc b/dll/win32/cryptui/cryptui_Fr.rc similarity index 100% rename from reactos/dll/win32/cryptui/cryptui_Fr.rc rename to dll/win32/cryptui/cryptui_Fr.rc diff --git a/reactos/dll/win32/cryptui/cryptui_It.rc b/dll/win32/cryptui/cryptui_It.rc similarity index 100% rename from reactos/dll/win32/cryptui/cryptui_It.rc rename to dll/win32/cryptui/cryptui_It.rc diff --git a/reactos/dll/win32/cryptui/cryptui_Ko.rc b/dll/win32/cryptui/cryptui_Ko.rc similarity index 100% rename from reactos/dll/win32/cryptui/cryptui_Ko.rc rename to dll/win32/cryptui/cryptui_Ko.rc diff --git a/reactos/dll/win32/cryptui/cryptui_Lt.rc b/dll/win32/cryptui/cryptui_Lt.rc similarity index 100% rename from reactos/dll/win32/cryptui/cryptui_Lt.rc rename to dll/win32/cryptui/cryptui_Lt.rc diff --git a/reactos/dll/win32/cryptui/cryptui_Nl.rc b/dll/win32/cryptui/cryptui_Nl.rc similarity index 100% rename from reactos/dll/win32/cryptui/cryptui_Nl.rc rename to dll/win32/cryptui/cryptui_Nl.rc diff --git a/reactos/dll/win32/cryptui/cryptui_No.rc b/dll/win32/cryptui/cryptui_No.rc similarity index 100% rename from reactos/dll/win32/cryptui/cryptui_No.rc rename to dll/win32/cryptui/cryptui_No.rc diff --git a/reactos/dll/win32/cryptui/cryptui_Pl.rc b/dll/win32/cryptui/cryptui_Pl.rc similarity index 100% rename from reactos/dll/win32/cryptui/cryptui_Pl.rc rename to dll/win32/cryptui/cryptui_Pl.rc diff --git a/reactos/dll/win32/cryptui/cryptui_Pt.rc b/dll/win32/cryptui/cryptui_Pt.rc similarity index 100% rename from reactos/dll/win32/cryptui/cryptui_Pt.rc rename to dll/win32/cryptui/cryptui_Pt.rc diff --git a/reactos/dll/win32/cryptui/cryptui_Ro.rc b/dll/win32/cryptui/cryptui_Ro.rc similarity index 100% rename from reactos/dll/win32/cryptui/cryptui_Ro.rc rename to dll/win32/cryptui/cryptui_Ro.rc diff --git a/reactos/dll/win32/cryptui/cryptui_Uk.rc b/dll/win32/cryptui/cryptui_Uk.rc similarity index 100% rename from reactos/dll/win32/cryptui/cryptui_Uk.rc rename to dll/win32/cryptui/cryptui_Uk.rc diff --git a/reactos/dll/win32/cryptui/cryptuires.h b/dll/win32/cryptui/cryptuires.h similarity index 100% rename from reactos/dll/win32/cryptui/cryptuires.h rename to dll/win32/cryptui/cryptuires.h diff --git a/reactos/dll/win32/cryptui/main.c b/dll/win32/cryptui/main.c similarity index 100% rename from reactos/dll/win32/cryptui/main.c rename to dll/win32/cryptui/main.c diff --git a/reactos/dll/win32/cryptui/smallicons.bmp b/dll/win32/cryptui/smallicons.bmp similarity index 100% rename from reactos/dll/win32/cryptui/smallicons.bmp rename to dll/win32/cryptui/smallicons.bmp diff --git a/reactos/dll/win32/dbghelp/CMakeLists.txt b/dll/win32/dbghelp/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/dbghelp/CMakeLists.txt rename to dll/win32/dbghelp/CMakeLists.txt diff --git a/reactos/dll/win32/dbghelp/coff.c b/dll/win32/dbghelp/coff.c similarity index 100% rename from reactos/dll/win32/dbghelp/coff.c rename to dll/win32/dbghelp/coff.c diff --git a/reactos/dll/win32/dbghelp/cpu_i386.c b/dll/win32/dbghelp/cpu_i386.c similarity index 100% rename from reactos/dll/win32/dbghelp/cpu_i386.c rename to dll/win32/dbghelp/cpu_i386.c diff --git a/reactos/dll/win32/dbghelp/cpu_ppc.c b/dll/win32/dbghelp/cpu_ppc.c similarity index 100% rename from reactos/dll/win32/dbghelp/cpu_ppc.c rename to dll/win32/dbghelp/cpu_ppc.c diff --git a/reactos/dll/win32/dbghelp/cpu_x86_64.c b/dll/win32/dbghelp/cpu_x86_64.c similarity index 100% rename from reactos/dll/win32/dbghelp/cpu_x86_64.c rename to dll/win32/dbghelp/cpu_x86_64.c diff --git a/reactos/dll/win32/dbghelp/crc32.c b/dll/win32/dbghelp/crc32.c similarity index 100% rename from reactos/dll/win32/dbghelp/crc32.c rename to dll/win32/dbghelp/crc32.c diff --git a/reactos/dll/win32/dbghelp/dbghelp.c b/dll/win32/dbghelp/dbghelp.c similarity index 100% rename from reactos/dll/win32/dbghelp/dbghelp.c rename to dll/win32/dbghelp/dbghelp.c diff --git a/reactos/dll/win32/dbghelp/dbghelp.rbuild b/dll/win32/dbghelp/dbghelp.rbuild similarity index 100% rename from reactos/dll/win32/dbghelp/dbghelp.rbuild rename to dll/win32/dbghelp/dbghelp.rbuild diff --git a/reactos/dll/win32/dbghelp/dbghelp.spec b/dll/win32/dbghelp/dbghelp.spec similarity index 100% rename from reactos/dll/win32/dbghelp/dbghelp.spec rename to dll/win32/dbghelp/dbghelp.spec diff --git a/reactos/dll/win32/dbghelp/dbghelp_private.h b/dll/win32/dbghelp/dbghelp_private.h similarity index 100% rename from reactos/dll/win32/dbghelp/dbghelp_private.h rename to dll/win32/dbghelp/dbghelp_private.h diff --git a/reactos/dll/win32/dbghelp/dbghelp_ros.diff b/dll/win32/dbghelp/dbghelp_ros.diff similarity index 100% rename from reactos/dll/win32/dbghelp/dbghelp_ros.diff rename to dll/win32/dbghelp/dbghelp_ros.diff diff --git a/reactos/dll/win32/dbghelp/dwarf.c b/dll/win32/dbghelp/dwarf.c similarity index 100% rename from reactos/dll/win32/dbghelp/dwarf.c rename to dll/win32/dbghelp/dwarf.c diff --git a/reactos/dll/win32/dbghelp/dwarf.h b/dll/win32/dbghelp/dwarf.h similarity index 100% rename from reactos/dll/win32/dbghelp/dwarf.h rename to dll/win32/dbghelp/dwarf.h diff --git a/reactos/dll/win32/dbghelp/elf_module.c b/dll/win32/dbghelp/elf_module.c similarity index 100% rename from reactos/dll/win32/dbghelp/elf_module.c rename to dll/win32/dbghelp/elf_module.c diff --git a/reactos/dll/win32/dbghelp/image.c b/dll/win32/dbghelp/image.c similarity index 100% rename from reactos/dll/win32/dbghelp/image.c rename to dll/win32/dbghelp/image.c diff --git a/reactos/dll/win32/dbghelp/image_private.h b/dll/win32/dbghelp/image_private.h similarity index 100% rename from reactos/dll/win32/dbghelp/image_private.h rename to dll/win32/dbghelp/image_private.h diff --git a/reactos/dll/win32/dbghelp/macho_module.c b/dll/win32/dbghelp/macho_module.c similarity index 100% rename from reactos/dll/win32/dbghelp/macho_module.c rename to dll/win32/dbghelp/macho_module.c diff --git a/reactos/dll/win32/dbghelp/minidump.c b/dll/win32/dbghelp/minidump.c similarity index 100% rename from reactos/dll/win32/dbghelp/minidump.c rename to dll/win32/dbghelp/minidump.c diff --git a/reactos/dll/win32/dbghelp/module.c b/dll/win32/dbghelp/module.c similarity index 100% rename from reactos/dll/win32/dbghelp/module.c rename to dll/win32/dbghelp/module.c diff --git a/reactos/dll/win32/dbghelp/msc.c b/dll/win32/dbghelp/msc.c similarity index 100% rename from reactos/dll/win32/dbghelp/msc.c rename to dll/win32/dbghelp/msc.c diff --git a/reactos/dll/win32/dbghelp/path.c b/dll/win32/dbghelp/path.c similarity index 100% rename from reactos/dll/win32/dbghelp/path.c rename to dll/win32/dbghelp/path.c diff --git a/reactos/dll/win32/dbghelp/pe_module.c b/dll/win32/dbghelp/pe_module.c similarity index 100% rename from reactos/dll/win32/dbghelp/pe_module.c rename to dll/win32/dbghelp/pe_module.c diff --git a/reactos/dll/win32/dbghelp/regex.c b/dll/win32/dbghelp/regex.c similarity index 100% rename from reactos/dll/win32/dbghelp/regex.c rename to dll/win32/dbghelp/regex.c diff --git a/reactos/dll/win32/dbghelp/rosstubs.c b/dll/win32/dbghelp/rosstubs.c similarity index 100% rename from reactos/dll/win32/dbghelp/rosstubs.c rename to dll/win32/dbghelp/rosstubs.c diff --git a/reactos/dll/win32/dbghelp/source.c b/dll/win32/dbghelp/source.c similarity index 100% rename from reactos/dll/win32/dbghelp/source.c rename to dll/win32/dbghelp/source.c diff --git a/reactos/dll/win32/dbghelp/stabs.c b/dll/win32/dbghelp/stabs.c similarity index 100% rename from reactos/dll/win32/dbghelp/stabs.c rename to dll/win32/dbghelp/stabs.c diff --git a/reactos/dll/win32/dbghelp/stack.c b/dll/win32/dbghelp/stack.c similarity index 100% rename from reactos/dll/win32/dbghelp/stack.c rename to dll/win32/dbghelp/stack.c diff --git a/reactos/dll/win32/dbghelp/storage.c b/dll/win32/dbghelp/storage.c similarity index 100% rename from reactos/dll/win32/dbghelp/storage.c rename to dll/win32/dbghelp/storage.c diff --git a/reactos/dll/win32/dbghelp/symbol.c b/dll/win32/dbghelp/symbol.c similarity index 100% rename from reactos/dll/win32/dbghelp/symbol.c rename to dll/win32/dbghelp/symbol.c diff --git a/reactos/dll/win32/dbghelp/type.c b/dll/win32/dbghelp/type.c similarity index 100% rename from reactos/dll/win32/dbghelp/type.c rename to dll/win32/dbghelp/type.c diff --git a/reactos/dll/win32/dbghelp/version.rc b/dll/win32/dbghelp/version.rc similarity index 100% rename from reactos/dll/win32/dbghelp/version.rc rename to dll/win32/dbghelp/version.rc diff --git a/reactos/dll/win32/dbghelp/wdbgexts.h b/dll/win32/dbghelp/wdbgexts.h similarity index 100% rename from reactos/dll/win32/dbghelp/wdbgexts.h rename to dll/win32/dbghelp/wdbgexts.h diff --git a/reactos/dll/win32/dciman32/CMakeLists.txt b/dll/win32/dciman32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/dciman32/CMakeLists.txt rename to dll/win32/dciman32/CMakeLists.txt diff --git a/reactos/dll/win32/dciman32/dciman32.rbuild b/dll/win32/dciman32/dciman32.rbuild similarity index 100% rename from reactos/dll/win32/dciman32/dciman32.rbuild rename to dll/win32/dciman32/dciman32.rbuild diff --git a/reactos/dll/win32/dciman32/dciman32.spec b/dll/win32/dciman32/dciman32.spec similarity index 100% rename from reactos/dll/win32/dciman32/dciman32.spec rename to dll/win32/dciman32/dciman32.spec diff --git a/reactos/dll/win32/dciman32/dciman_main.c b/dll/win32/dciman32/dciman_main.c similarity index 100% rename from reactos/dll/win32/dciman32/dciman_main.c rename to dll/win32/dciman32/dciman_main.c diff --git a/reactos/dll/win32/devmgr/CMakeLists.txt b/dll/win32/devmgr/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/devmgr/CMakeLists.txt rename to dll/win32/devmgr/CMakeLists.txt diff --git a/reactos/dll/win32/devmgr/advprop.c b/dll/win32/devmgr/advprop.c similarity index 100% rename from reactos/dll/win32/devmgr/advprop.c rename to dll/win32/devmgr/advprop.c diff --git a/reactos/dll/win32/devmgr/devmgr.rbuild b/dll/win32/devmgr/devmgr.rbuild similarity index 100% rename from reactos/dll/win32/devmgr/devmgr.rbuild rename to dll/win32/devmgr/devmgr.rbuild diff --git a/reactos/dll/win32/devmgr/devmgr.rc b/dll/win32/devmgr/devmgr.rc similarity index 100% rename from reactos/dll/win32/devmgr/devmgr.rc rename to dll/win32/devmgr/devmgr.rc diff --git a/reactos/dll/win32/devmgr/devmgr.spec b/dll/win32/devmgr/devmgr.spec similarity index 100% rename from reactos/dll/win32/devmgr/devmgr.spec rename to dll/win32/devmgr/devmgr.spec diff --git a/reactos/dll/win32/devmgr/devprblm.c b/dll/win32/devmgr/devprblm.c similarity index 100% rename from reactos/dll/win32/devmgr/devprblm.c rename to dll/win32/devmgr/devprblm.c diff --git a/reactos/dll/win32/devmgr/hwpage.c b/dll/win32/devmgr/hwpage.c similarity index 100% rename from reactos/dll/win32/devmgr/hwpage.c rename to dll/win32/devmgr/hwpage.c diff --git a/reactos/dll/win32/devmgr/lang/bg-BG.rc b/dll/win32/devmgr/lang/bg-BG.rc similarity index 100% rename from reactos/dll/win32/devmgr/lang/bg-BG.rc rename to dll/win32/devmgr/lang/bg-BG.rc diff --git a/reactos/dll/win32/devmgr/lang/cs-CZ.rc b/dll/win32/devmgr/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/win32/devmgr/lang/cs-CZ.rc rename to dll/win32/devmgr/lang/cs-CZ.rc diff --git a/reactos/dll/win32/devmgr/lang/de-DE.rc b/dll/win32/devmgr/lang/de-DE.rc similarity index 100% rename from reactos/dll/win32/devmgr/lang/de-DE.rc rename to dll/win32/devmgr/lang/de-DE.rc diff --git a/reactos/dll/win32/devmgr/lang/el-GR.rc b/dll/win32/devmgr/lang/el-GR.rc similarity index 100% rename from reactos/dll/win32/devmgr/lang/el-GR.rc rename to dll/win32/devmgr/lang/el-GR.rc diff --git a/reactos/dll/win32/devmgr/lang/en-US.rc b/dll/win32/devmgr/lang/en-US.rc similarity index 100% rename from reactos/dll/win32/devmgr/lang/en-US.rc rename to dll/win32/devmgr/lang/en-US.rc diff --git a/reactos/dll/win32/devmgr/lang/es-ES.rc b/dll/win32/devmgr/lang/es-ES.rc similarity index 100% rename from reactos/dll/win32/devmgr/lang/es-ES.rc rename to dll/win32/devmgr/lang/es-ES.rc diff --git a/reactos/dll/win32/devmgr/lang/fr-FR.rc b/dll/win32/devmgr/lang/fr-FR.rc similarity index 100% rename from reactos/dll/win32/devmgr/lang/fr-FR.rc rename to dll/win32/devmgr/lang/fr-FR.rc diff --git a/reactos/dll/win32/devmgr/lang/hu-HU.rc b/dll/win32/devmgr/lang/hu-HU.rc similarity index 100% rename from reactos/dll/win32/devmgr/lang/hu-HU.rc rename to dll/win32/devmgr/lang/hu-HU.rc diff --git a/reactos/dll/win32/devmgr/lang/id-ID.rc b/dll/win32/devmgr/lang/id-ID.rc similarity index 100% rename from reactos/dll/win32/devmgr/lang/id-ID.rc rename to dll/win32/devmgr/lang/id-ID.rc diff --git a/reactos/dll/win32/devmgr/lang/it-IT.rc b/dll/win32/devmgr/lang/it-IT.rc similarity index 100% rename from reactos/dll/win32/devmgr/lang/it-IT.rc rename to dll/win32/devmgr/lang/it-IT.rc diff --git a/reactos/dll/win32/devmgr/lang/no-NO.rc b/dll/win32/devmgr/lang/no-NO.rc similarity index 100% rename from reactos/dll/win32/devmgr/lang/no-NO.rc rename to dll/win32/devmgr/lang/no-NO.rc diff --git a/reactos/dll/win32/devmgr/lang/pl-PL.rc b/dll/win32/devmgr/lang/pl-PL.rc similarity index 100% rename from reactos/dll/win32/devmgr/lang/pl-PL.rc rename to dll/win32/devmgr/lang/pl-PL.rc diff --git a/reactos/dll/win32/devmgr/lang/pt-BR.rc b/dll/win32/devmgr/lang/pt-BR.rc similarity index 100% rename from reactos/dll/win32/devmgr/lang/pt-BR.rc rename to dll/win32/devmgr/lang/pt-BR.rc diff --git a/reactos/dll/win32/devmgr/lang/ro-RO.rc b/dll/win32/devmgr/lang/ro-RO.rc similarity index 100% rename from reactos/dll/win32/devmgr/lang/ro-RO.rc rename to dll/win32/devmgr/lang/ro-RO.rc diff --git a/reactos/dll/win32/devmgr/lang/ru-RU.rc b/dll/win32/devmgr/lang/ru-RU.rc similarity index 100% rename from reactos/dll/win32/devmgr/lang/ru-RU.rc rename to dll/win32/devmgr/lang/ru-RU.rc diff --git a/reactos/dll/win32/devmgr/lang/sk-SK.rc b/dll/win32/devmgr/lang/sk-SK.rc similarity index 100% rename from reactos/dll/win32/devmgr/lang/sk-SK.rc rename to dll/win32/devmgr/lang/sk-SK.rc diff --git a/reactos/dll/win32/devmgr/lang/uk-UA.rc b/dll/win32/devmgr/lang/uk-UA.rc similarity index 100% rename from reactos/dll/win32/devmgr/lang/uk-UA.rc rename to dll/win32/devmgr/lang/uk-UA.rc diff --git a/reactos/dll/win32/devmgr/misc.c b/dll/win32/devmgr/misc.c similarity index 100% rename from reactos/dll/win32/devmgr/misc.c rename to dll/win32/devmgr/misc.c diff --git a/reactos/dll/win32/devmgr/precomp.h b/dll/win32/devmgr/precomp.h similarity index 100% rename from reactos/dll/win32/devmgr/precomp.h rename to dll/win32/devmgr/precomp.h diff --git a/reactos/dll/win32/devmgr/resource.h b/dll/win32/devmgr/resource.h similarity index 100% rename from reactos/dll/win32/devmgr/resource.h rename to dll/win32/devmgr/resource.h diff --git a/reactos/dll/win32/devmgr/resources/devmgr.ico b/dll/win32/devmgr/resources/devmgr.ico similarity index 100% rename from reactos/dll/win32/devmgr/resources/devmgr.ico rename to dll/win32/devmgr/resources/devmgr.ico diff --git a/reactos/dll/win32/devmgr/stubs.c b/dll/win32/devmgr/stubs.c similarity index 100% rename from reactos/dll/win32/devmgr/stubs.c rename to dll/win32/devmgr/stubs.c diff --git a/reactos/dll/win32/dhcpcsvc/CMakeLists.txt b/dll/win32/dhcpcsvc/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/dhcpcsvc/CMakeLists.txt rename to dll/win32/dhcpcsvc/CMakeLists.txt diff --git a/reactos/dll/win32/dhcpcsvc/dhcp/adapter.c b/dll/win32/dhcpcsvc/dhcp/adapter.c similarity index 100% rename from reactos/dll/win32/dhcpcsvc/dhcp/adapter.c rename to dll/win32/dhcpcsvc/dhcp/adapter.c diff --git a/reactos/dll/win32/dhcpcsvc/dhcp/alloc.c b/dll/win32/dhcpcsvc/dhcp/alloc.c similarity index 100% rename from reactos/dll/win32/dhcpcsvc/dhcp/alloc.c rename to dll/win32/dhcpcsvc/dhcp/alloc.c diff --git a/reactos/dll/win32/dhcpcsvc/dhcp/api.c b/dll/win32/dhcpcsvc/dhcp/api.c similarity index 100% rename from reactos/dll/win32/dhcpcsvc/dhcp/api.c rename to dll/win32/dhcpcsvc/dhcp/api.c diff --git a/reactos/dll/win32/dhcpcsvc/dhcp/compat.c b/dll/win32/dhcpcsvc/dhcp/compat.c similarity index 100% rename from reactos/dll/win32/dhcpcsvc/dhcp/compat.c rename to dll/win32/dhcpcsvc/dhcp/compat.c diff --git a/reactos/dll/win32/dhcpcsvc/dhcp/dhclient.c b/dll/win32/dhcpcsvc/dhcp/dhclient.c similarity index 100% rename from reactos/dll/win32/dhcpcsvc/dhcp/dhclient.c rename to dll/win32/dhcpcsvc/dhcp/dhclient.c diff --git a/reactos/dll/win32/dhcpcsvc/dhcp/dispatch.c b/dll/win32/dhcpcsvc/dhcp/dispatch.c similarity index 100% rename from reactos/dll/win32/dhcpcsvc/dhcp/dispatch.c rename to dll/win32/dhcpcsvc/dhcp/dispatch.c diff --git a/reactos/dll/win32/dhcpcsvc/dhcp/hash.c b/dll/win32/dhcpcsvc/dhcp/hash.c similarity index 100% rename from reactos/dll/win32/dhcpcsvc/dhcp/hash.c rename to dll/win32/dhcpcsvc/dhcp/hash.c diff --git a/reactos/dll/win32/dhcpcsvc/dhcp/options.c b/dll/win32/dhcpcsvc/dhcp/options.c similarity index 100% rename from reactos/dll/win32/dhcpcsvc/dhcp/options.c rename to dll/win32/dhcpcsvc/dhcp/options.c diff --git a/reactos/dll/win32/dhcpcsvc/dhcp/pipe.c b/dll/win32/dhcpcsvc/dhcp/pipe.c similarity index 100% rename from reactos/dll/win32/dhcpcsvc/dhcp/pipe.c rename to dll/win32/dhcpcsvc/dhcp/pipe.c diff --git a/reactos/dll/win32/dhcpcsvc/dhcp/socket.c b/dll/win32/dhcpcsvc/dhcp/socket.c similarity index 100% rename from reactos/dll/win32/dhcpcsvc/dhcp/socket.c rename to dll/win32/dhcpcsvc/dhcp/socket.c diff --git a/reactos/dll/win32/dhcpcsvc/dhcp/tables.c b/dll/win32/dhcpcsvc/dhcp/tables.c similarity index 100% rename from reactos/dll/win32/dhcpcsvc/dhcp/tables.c rename to dll/win32/dhcpcsvc/dhcp/tables.c diff --git a/reactos/dll/win32/dhcpcsvc/dhcp/tree.c b/dll/win32/dhcpcsvc/dhcp/tree.c similarity index 100% rename from reactos/dll/win32/dhcpcsvc/dhcp/tree.c rename to dll/win32/dhcpcsvc/dhcp/tree.c diff --git a/reactos/dll/win32/dhcpcsvc/dhcp/util.c b/dll/win32/dhcpcsvc/dhcp/util.c similarity index 100% rename from reactos/dll/win32/dhcpcsvc/dhcp/util.c rename to dll/win32/dhcpcsvc/dhcp/util.c diff --git a/reactos/dll/win32/dhcpcsvc/dhcpcsvc.c b/dll/win32/dhcpcsvc/dhcpcsvc.c similarity index 100% rename from reactos/dll/win32/dhcpcsvc/dhcpcsvc.c rename to dll/win32/dhcpcsvc/dhcpcsvc.c diff --git a/reactos/dll/win32/dhcpcsvc/dhcpcsvc.rbuild b/dll/win32/dhcpcsvc/dhcpcsvc.rbuild similarity index 100% rename from reactos/dll/win32/dhcpcsvc/dhcpcsvc.rbuild rename to dll/win32/dhcpcsvc/dhcpcsvc.rbuild diff --git a/reactos/dll/win32/dhcpcsvc/dhcpcsvc.rc b/dll/win32/dhcpcsvc/dhcpcsvc.rc similarity index 100% rename from reactos/dll/win32/dhcpcsvc/dhcpcsvc.rc rename to dll/win32/dhcpcsvc/dhcpcsvc.rc diff --git a/reactos/dll/win32/dhcpcsvc/dhcpcsvc.spec b/dll/win32/dhcpcsvc/dhcpcsvc.spec similarity index 100% rename from reactos/dll/win32/dhcpcsvc/dhcpcsvc.spec rename to dll/win32/dhcpcsvc/dhcpcsvc.spec diff --git a/reactos/dll/win32/dhcpcsvc/include/debug.h b/dll/win32/dhcpcsvc/include/debug.h similarity index 100% rename from reactos/dll/win32/dhcpcsvc/include/debug.h rename to dll/win32/dhcpcsvc/include/debug.h diff --git a/reactos/dll/win32/dhcpcsvc/include/dhcp.h b/dll/win32/dhcpcsvc/include/dhcp.h similarity index 100% rename from reactos/dll/win32/dhcpcsvc/include/dhcp.h rename to dll/win32/dhcpcsvc/include/dhcp.h diff --git a/reactos/dll/win32/dhcpcsvc/include/dhcpd.h b/dll/win32/dhcpcsvc/include/dhcpd.h similarity index 100% rename from reactos/dll/win32/dhcpcsvc/include/dhcpd.h rename to dll/win32/dhcpcsvc/include/dhcpd.h diff --git a/reactos/dll/win32/dhcpcsvc/include/hash.h b/dll/win32/dhcpcsvc/include/hash.h similarity index 100% rename from reactos/dll/win32/dhcpcsvc/include/hash.h rename to dll/win32/dhcpcsvc/include/hash.h diff --git a/reactos/dll/win32/dhcpcsvc/include/rosdhcp.h b/dll/win32/dhcpcsvc/include/rosdhcp.h similarity index 100% rename from reactos/dll/win32/dhcpcsvc/include/rosdhcp.h rename to dll/win32/dhcpcsvc/include/rosdhcp.h diff --git a/reactos/dll/win32/dhcpcsvc/include/tree.h b/dll/win32/dhcpcsvc/include/tree.h similarity index 100% rename from reactos/dll/win32/dhcpcsvc/include/tree.h rename to dll/win32/dhcpcsvc/include/tree.h diff --git a/reactos/dll/win32/dnsapi/CMakeLists.txt b/dll/win32/dnsapi/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/dnsapi/CMakeLists.txt rename to dll/win32/dnsapi/CMakeLists.txt diff --git a/reactos/dll/win32/dnsapi/dnsapi.rbuild b/dll/win32/dnsapi/dnsapi.rbuild similarity index 100% rename from reactos/dll/win32/dnsapi/dnsapi.rbuild rename to dll/win32/dnsapi/dnsapi.rbuild diff --git a/reactos/dll/win32/dnsapi/dnsapi.rc b/dll/win32/dnsapi/dnsapi.rc similarity index 100% rename from reactos/dll/win32/dnsapi/dnsapi.rc rename to dll/win32/dnsapi/dnsapi.rc diff --git a/reactos/dll/win32/dnsapi/dnsapi.spec b/dll/win32/dnsapi/dnsapi.spec similarity index 100% rename from reactos/dll/win32/dnsapi/dnsapi.spec rename to dll/win32/dnsapi/dnsapi.spec diff --git a/reactos/dll/win32/dnsapi/dnsapi/adns.c b/dll/win32/dnsapi/dnsapi/adns.c similarity index 100% rename from reactos/dll/win32/dnsapi/dnsapi/adns.c rename to dll/win32/dnsapi/dnsapi/adns.c diff --git a/reactos/dll/win32/dnsapi/dnsapi/context.c b/dll/win32/dnsapi/dnsapi/context.c similarity index 100% rename from reactos/dll/win32/dnsapi/dnsapi/context.c rename to dll/win32/dnsapi/dnsapi/context.c diff --git a/reactos/dll/win32/dnsapi/dnsapi/memory.c b/dll/win32/dnsapi/dnsapi/memory.c similarity index 100% rename from reactos/dll/win32/dnsapi/dnsapi/memory.c rename to dll/win32/dnsapi/dnsapi/memory.c diff --git a/reactos/dll/win32/dnsapi/dnsapi/names.c b/dll/win32/dnsapi/dnsapi/names.c similarity index 100% rename from reactos/dll/win32/dnsapi/dnsapi/names.c rename to dll/win32/dnsapi/dnsapi/names.c diff --git a/reactos/dll/win32/dnsapi/dnsapi/precomp.h b/dll/win32/dnsapi/dnsapi/precomp.h similarity index 100% rename from reactos/dll/win32/dnsapi/dnsapi/precomp.h rename to dll/win32/dnsapi/dnsapi/precomp.h diff --git a/reactos/dll/win32/dnsapi/dnsapi/query.c b/dll/win32/dnsapi/dnsapi/query.c similarity index 100% rename from reactos/dll/win32/dnsapi/dnsapi/query.c rename to dll/win32/dnsapi/dnsapi/query.c diff --git a/reactos/dll/win32/dnsapi/dnsapi/record.c b/dll/win32/dnsapi/dnsapi/record.c similarity index 100% rename from reactos/dll/win32/dnsapi/dnsapi/record.c rename to dll/win32/dnsapi/dnsapi/record.c diff --git a/reactos/dll/win32/dnsapi/dnsapi/stubs.c b/dll/win32/dnsapi/dnsapi/stubs.c similarity index 100% rename from reactos/dll/win32/dnsapi/dnsapi/stubs.c rename to dll/win32/dnsapi/dnsapi/stubs.c diff --git a/reactos/dll/win32/dnsapi/include/internal/windns.h b/dll/win32/dnsapi/include/internal/windns.h similarity index 100% rename from reactos/dll/win32/dnsapi/include/internal/windns.h rename to dll/win32/dnsapi/include/internal/windns.h diff --git a/reactos/dll/win32/dwmapi/CMakeLists.txt b/dll/win32/dwmapi/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/dwmapi/CMakeLists.txt rename to dll/win32/dwmapi/CMakeLists.txt diff --git a/reactos/dll/win32/dwmapi/dwmapi.rbuild b/dll/win32/dwmapi/dwmapi.rbuild similarity index 100% rename from reactos/dll/win32/dwmapi/dwmapi.rbuild rename to dll/win32/dwmapi/dwmapi.rbuild diff --git a/reactos/dll/win32/dwmapi/dwmapi.spec b/dll/win32/dwmapi/dwmapi.spec similarity index 100% rename from reactos/dll/win32/dwmapi/dwmapi.spec rename to dll/win32/dwmapi/dwmapi.spec diff --git a/reactos/dll/win32/dwmapi/dwmapi_main.c b/dll/win32/dwmapi/dwmapi_main.c similarity index 100% rename from reactos/dll/win32/dwmapi/dwmapi_main.c rename to dll/win32/dwmapi/dwmapi_main.c diff --git a/reactos/dll/win32/dwmapi/dwmapi_ros.diff b/dll/win32/dwmapi/dwmapi_ros.diff similarity index 100% rename from reactos/dll/win32/dwmapi/dwmapi_ros.diff rename to dll/win32/dwmapi/dwmapi_ros.diff diff --git a/reactos/dll/win32/dwmapi/version.rc b/dll/win32/dwmapi/version.rc similarity index 100% rename from reactos/dll/win32/dwmapi/version.rc rename to dll/win32/dwmapi/version.rc diff --git a/reactos/dll/win32/faultrep/CMakeLists.txt b/dll/win32/faultrep/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/faultrep/CMakeLists.txt rename to dll/win32/faultrep/CMakeLists.txt diff --git a/reactos/dll/win32/faultrep/faultrep.c b/dll/win32/faultrep/faultrep.c similarity index 100% rename from reactos/dll/win32/faultrep/faultrep.c rename to dll/win32/faultrep/faultrep.c diff --git a/reactos/dll/win32/faultrep/faultrep.rbuild b/dll/win32/faultrep/faultrep.rbuild similarity index 100% rename from reactos/dll/win32/faultrep/faultrep.rbuild rename to dll/win32/faultrep/faultrep.rbuild diff --git a/reactos/dll/win32/faultrep/faultrep.spec b/dll/win32/faultrep/faultrep.spec similarity index 100% rename from reactos/dll/win32/faultrep/faultrep.spec rename to dll/win32/faultrep/faultrep.spec diff --git a/reactos/dll/win32/fmifs/CMakeLists.txt b/dll/win32/fmifs/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/fmifs/CMakeLists.txt rename to dll/win32/fmifs/CMakeLists.txt diff --git a/reactos/dll/win32/fmifs/chkdsk.c b/dll/win32/fmifs/chkdsk.c similarity index 100% rename from reactos/dll/win32/fmifs/chkdsk.c rename to dll/win32/fmifs/chkdsk.c diff --git a/reactos/dll/win32/fmifs/compress.c b/dll/win32/fmifs/compress.c similarity index 100% rename from reactos/dll/win32/fmifs/compress.c rename to dll/win32/fmifs/compress.c diff --git a/reactos/dll/win32/fmifs/diskcopy.c b/dll/win32/fmifs/diskcopy.c similarity index 100% rename from reactos/dll/win32/fmifs/diskcopy.c rename to dll/win32/fmifs/diskcopy.c diff --git a/reactos/dll/win32/fmifs/extend.c b/dll/win32/fmifs/extend.c similarity index 100% rename from reactos/dll/win32/fmifs/extend.c rename to dll/win32/fmifs/extend.c diff --git a/reactos/dll/win32/fmifs/fmifs.rbuild b/dll/win32/fmifs/fmifs.rbuild similarity index 100% rename from reactos/dll/win32/fmifs/fmifs.rbuild rename to dll/win32/fmifs/fmifs.rbuild diff --git a/reactos/dll/win32/fmifs/fmifs.rc b/dll/win32/fmifs/fmifs.rc similarity index 100% rename from reactos/dll/win32/fmifs/fmifs.rc rename to dll/win32/fmifs/fmifs.rc diff --git a/reactos/dll/win32/fmifs/fmifs.spec b/dll/win32/fmifs/fmifs.spec similarity index 100% rename from reactos/dll/win32/fmifs/fmifs.spec rename to dll/win32/fmifs/fmifs.spec diff --git a/reactos/dll/win32/fmifs/format.c b/dll/win32/fmifs/format.c similarity index 100% rename from reactos/dll/win32/fmifs/format.c rename to dll/win32/fmifs/format.c diff --git a/reactos/dll/win32/fmifs/init.c b/dll/win32/fmifs/init.c similarity index 100% rename from reactos/dll/win32/fmifs/init.c rename to dll/win32/fmifs/init.c diff --git a/reactos/dll/win32/fmifs/media.c b/dll/win32/fmifs/media.c similarity index 100% rename from reactos/dll/win32/fmifs/media.c rename to dll/win32/fmifs/media.c diff --git a/reactos/dll/win32/fmifs/precomp.h b/dll/win32/fmifs/precomp.h similarity index 100% rename from reactos/dll/win32/fmifs/precomp.h rename to dll/win32/fmifs/precomp.h diff --git a/reactos/dll/win32/fmifs/query.c b/dll/win32/fmifs/query.c similarity index 100% rename from reactos/dll/win32/fmifs/query.c rename to dll/win32/fmifs/query.c diff --git a/reactos/dll/win32/fusion/CMakeLists.txt b/dll/win32/fusion/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/fusion/CMakeLists.txt rename to dll/win32/fusion/CMakeLists.txt diff --git a/reactos/dll/win32/fusion/asmcache.c b/dll/win32/fusion/asmcache.c similarity index 100% rename from reactos/dll/win32/fusion/asmcache.c rename to dll/win32/fusion/asmcache.c diff --git a/reactos/dll/win32/fusion/asmenum.c b/dll/win32/fusion/asmenum.c similarity index 100% rename from reactos/dll/win32/fusion/asmenum.c rename to dll/win32/fusion/asmenum.c diff --git a/reactos/dll/win32/fusion/asmname.c b/dll/win32/fusion/asmname.c similarity index 100% rename from reactos/dll/win32/fusion/asmname.c rename to dll/win32/fusion/asmname.c diff --git a/reactos/dll/win32/fusion/assembly.c b/dll/win32/fusion/assembly.c similarity index 100% rename from reactos/dll/win32/fusion/assembly.c rename to dll/win32/fusion/assembly.c diff --git a/reactos/dll/win32/fusion/fusion.c b/dll/win32/fusion/fusion.c similarity index 100% rename from reactos/dll/win32/fusion/fusion.c rename to dll/win32/fusion/fusion.c diff --git a/reactos/dll/win32/fusion/fusion.rbuild b/dll/win32/fusion/fusion.rbuild similarity index 100% rename from reactos/dll/win32/fusion/fusion.rbuild rename to dll/win32/fusion/fusion.rbuild diff --git a/reactos/dll/win32/fusion/fusion.spec b/dll/win32/fusion/fusion.spec similarity index 100% rename from reactos/dll/win32/fusion/fusion.spec rename to dll/win32/fusion/fusion.spec diff --git a/reactos/dll/win32/fusion/fusion_main.c b/dll/win32/fusion/fusion_main.c similarity index 100% rename from reactos/dll/win32/fusion/fusion_main.c rename to dll/win32/fusion/fusion_main.c diff --git a/reactos/dll/win32/fusion/fusion_ros.diff b/dll/win32/fusion/fusion_ros.diff similarity index 100% rename from reactos/dll/win32/fusion/fusion_ros.diff rename to dll/win32/fusion/fusion_ros.diff diff --git a/reactos/dll/win32/fusion/fusionpriv.h b/dll/win32/fusion/fusionpriv.h similarity index 100% rename from reactos/dll/win32/fusion/fusionpriv.h rename to dll/win32/fusion/fusionpriv.h diff --git a/reactos/dll/win32/gdi32/CMakeLists.txt b/dll/win32/gdi32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/gdi32/CMakeLists.txt rename to dll/win32/gdi32/CMakeLists.txt diff --git a/reactos/dll/win32/gdi32/gdi32.rbuild b/dll/win32/gdi32/gdi32.rbuild similarity index 100% rename from reactos/dll/win32/gdi32/gdi32.rbuild rename to dll/win32/gdi32/gdi32.rbuild diff --git a/reactos/dll/win32/gdi32/gdi32.rc b/dll/win32/gdi32/gdi32.rc similarity index 100% rename from reactos/dll/win32/gdi32/gdi32.rc rename to dll/win32/gdi32/gdi32.rc diff --git a/reactos/dll/win32/gdi32/gdi32.spec b/dll/win32/gdi32/gdi32.spec similarity index 100% rename from reactos/dll/win32/gdi32/gdi32.spec rename to dll/win32/gdi32/gdi32.spec diff --git a/reactos/dll/win32/gdi32/good api.def b/dll/win32/gdi32/good api.def similarity index 100% rename from reactos/dll/win32/gdi32/good api.def rename to dll/win32/gdi32/good api.def diff --git a/reactos/dll/win32/gdi32/include/gdi32p.h b/dll/win32/gdi32/include/gdi32p.h similarity index 100% rename from reactos/dll/win32/gdi32/include/gdi32p.h rename to dll/win32/gdi32/include/gdi32p.h diff --git a/reactos/dll/win32/gdi32/include/precomp.h b/dll/win32/gdi32/include/precomp.h similarity index 100% rename from reactos/dll/win32/gdi32/include/precomp.h rename to dll/win32/gdi32/include/precomp.h diff --git a/reactos/dll/win32/gdi32/main/dllmain.c b/dll/win32/gdi32/main/dllmain.c similarity index 100% rename from reactos/dll/win32/gdi32/main/dllmain.c rename to dll/win32/gdi32/main/dllmain.c diff --git a/reactos/dll/win32/gdi32/misc/gdientry.c b/dll/win32/gdi32/misc/gdientry.c similarity index 100% rename from reactos/dll/win32/gdi32/misc/gdientry.c rename to dll/win32/gdi32/misc/gdientry.c diff --git a/reactos/dll/win32/gdi32/misc/hacks.c b/dll/win32/gdi32/misc/hacks.c similarity index 100% rename from reactos/dll/win32/gdi32/misc/hacks.c rename to dll/win32/gdi32/misc/hacks.c diff --git a/reactos/dll/win32/gdi32/misc/heap.c b/dll/win32/gdi32/misc/heap.c similarity index 100% rename from reactos/dll/win32/gdi32/misc/heap.c rename to dll/win32/gdi32/misc/heap.c diff --git a/reactos/dll/win32/gdi32/misc/historic.c b/dll/win32/gdi32/misc/historic.c similarity index 100% rename from reactos/dll/win32/gdi32/misc/historic.c rename to dll/win32/gdi32/misc/historic.c diff --git a/reactos/dll/win32/gdi32/misc/misc.c b/dll/win32/gdi32/misc/misc.c similarity index 100% rename from reactos/dll/win32/gdi32/misc/misc.c rename to dll/win32/gdi32/misc/misc.c diff --git a/reactos/dll/win32/gdi32/misc/stubs.c b/dll/win32/gdi32/misc/stubs.c similarity index 100% rename from reactos/dll/win32/gdi32/misc/stubs.c rename to dll/win32/gdi32/misc/stubs.c diff --git a/reactos/dll/win32/gdi32/misc/stubsa.c b/dll/win32/gdi32/misc/stubsa.c similarity index 100% rename from reactos/dll/win32/gdi32/misc/stubsa.c rename to dll/win32/gdi32/misc/stubsa.c diff --git a/reactos/dll/win32/gdi32/misc/stubsw.c b/dll/win32/gdi32/misc/stubsw.c similarity index 100% rename from reactos/dll/win32/gdi32/misc/stubsw.c rename to dll/win32/gdi32/misc/stubsw.c diff --git a/reactos/dll/win32/gdi32/misc/wingl.c b/dll/win32/gdi32/misc/wingl.c similarity index 100% rename from reactos/dll/win32/gdi32/misc/wingl.c rename to dll/win32/gdi32/misc/wingl.c diff --git a/reactos/dll/win32/gdi32/objects/arc.c b/dll/win32/gdi32/objects/arc.c similarity index 100% rename from reactos/dll/win32/gdi32/objects/arc.c rename to dll/win32/gdi32/objects/arc.c diff --git a/reactos/dll/win32/gdi32/objects/bitmap.c b/dll/win32/gdi32/objects/bitmap.c similarity index 100% rename from reactos/dll/win32/gdi32/objects/bitmap.c rename to dll/win32/gdi32/objects/bitmap.c diff --git a/reactos/dll/win32/gdi32/objects/brush.c b/dll/win32/gdi32/objects/brush.c similarity index 100% rename from reactos/dll/win32/gdi32/objects/brush.c rename to dll/win32/gdi32/objects/brush.c diff --git a/reactos/dll/win32/gdi32/objects/coord.c b/dll/win32/gdi32/objects/coord.c similarity index 100% rename from reactos/dll/win32/gdi32/objects/coord.c rename to dll/win32/gdi32/objects/coord.c diff --git a/reactos/dll/win32/gdi32/objects/dc.c b/dll/win32/gdi32/objects/dc.c similarity index 100% rename from reactos/dll/win32/gdi32/objects/dc.c rename to dll/win32/gdi32/objects/dc.c diff --git a/reactos/dll/win32/gdi32/objects/efloat.c b/dll/win32/gdi32/objects/efloat.c similarity index 100% rename from reactos/dll/win32/gdi32/objects/efloat.c rename to dll/win32/gdi32/objects/efloat.c diff --git a/reactos/dll/win32/gdi32/objects/eng.c b/dll/win32/gdi32/objects/eng.c similarity index 100% rename from reactos/dll/win32/gdi32/objects/eng.c rename to dll/win32/gdi32/objects/eng.c diff --git a/reactos/dll/win32/gdi32/objects/enhmfile.c b/dll/win32/gdi32/objects/enhmfile.c similarity index 100% rename from reactos/dll/win32/gdi32/objects/enhmfile.c rename to dll/win32/gdi32/objects/enhmfile.c diff --git a/reactos/dll/win32/gdi32/objects/font.c b/dll/win32/gdi32/objects/font.c similarity index 100% rename from reactos/dll/win32/gdi32/objects/font.c rename to dll/win32/gdi32/objects/font.c diff --git a/reactos/dll/win32/gdi32/objects/icm.c b/dll/win32/gdi32/objects/icm.c similarity index 100% rename from reactos/dll/win32/gdi32/objects/icm.c rename to dll/win32/gdi32/objects/icm.c diff --git a/reactos/dll/win32/gdi32/objects/linedda.c b/dll/win32/gdi32/objects/linedda.c similarity index 100% rename from reactos/dll/win32/gdi32/objects/linedda.c rename to dll/win32/gdi32/objects/linedda.c diff --git a/reactos/dll/win32/gdi32/objects/metafile.c b/dll/win32/gdi32/objects/metafile.c similarity index 100% rename from reactos/dll/win32/gdi32/objects/metafile.c rename to dll/win32/gdi32/objects/metafile.c diff --git a/reactos/dll/win32/gdi32/objects/painting.c b/dll/win32/gdi32/objects/painting.c similarity index 100% rename from reactos/dll/win32/gdi32/objects/painting.c rename to dll/win32/gdi32/objects/painting.c diff --git a/reactos/dll/win32/gdi32/objects/palette.c b/dll/win32/gdi32/objects/palette.c similarity index 100% rename from reactos/dll/win32/gdi32/objects/palette.c rename to dll/win32/gdi32/objects/palette.c diff --git a/reactos/dll/win32/gdi32/objects/path.c b/dll/win32/gdi32/objects/path.c similarity index 100% rename from reactos/dll/win32/gdi32/objects/path.c rename to dll/win32/gdi32/objects/path.c diff --git a/reactos/dll/win32/gdi32/objects/pen.c b/dll/win32/gdi32/objects/pen.c similarity index 100% rename from reactos/dll/win32/gdi32/objects/pen.c rename to dll/win32/gdi32/objects/pen.c diff --git a/reactos/dll/win32/gdi32/objects/printdrv.c b/dll/win32/gdi32/objects/printdrv.c similarity index 100% rename from reactos/dll/win32/gdi32/objects/printdrv.c rename to dll/win32/gdi32/objects/printdrv.c diff --git a/reactos/dll/win32/gdi32/objects/region.c b/dll/win32/gdi32/objects/region.c similarity index 100% rename from reactos/dll/win32/gdi32/objects/region.c rename to dll/win32/gdi32/objects/region.c diff --git a/reactos/dll/win32/gdi32/objects/text.c b/dll/win32/gdi32/objects/text.c similarity index 100% rename from reactos/dll/win32/gdi32/objects/text.c rename to dll/win32/gdi32/objects/text.c diff --git a/reactos/dll/win32/gdi32/objects/utils.c b/dll/win32/gdi32/objects/utils.c similarity index 100% rename from reactos/dll/win32/gdi32/objects/utils.c rename to dll/win32/gdi32/objects/utils.c diff --git a/reactos/dll/win32/gdiplus/CMakeLists.txt b/dll/win32/gdiplus/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/gdiplus/CMakeLists.txt rename to dll/win32/gdiplus/CMakeLists.txt diff --git a/reactos/dll/win32/gdiplus/brush.c b/dll/win32/gdiplus/brush.c similarity index 100% rename from reactos/dll/win32/gdiplus/brush.c rename to dll/win32/gdiplus/brush.c diff --git a/reactos/dll/win32/gdiplus/customlinecap.c b/dll/win32/gdiplus/customlinecap.c similarity index 100% rename from reactos/dll/win32/gdiplus/customlinecap.c rename to dll/win32/gdiplus/customlinecap.c diff --git a/reactos/dll/win32/gdiplus/font.c b/dll/win32/gdiplus/font.c similarity index 100% rename from reactos/dll/win32/gdiplus/font.c rename to dll/win32/gdiplus/font.c diff --git a/reactos/dll/win32/gdiplus/gdiplus.c b/dll/win32/gdiplus/gdiplus.c similarity index 100% rename from reactos/dll/win32/gdiplus/gdiplus.c rename to dll/win32/gdiplus/gdiplus.c diff --git a/reactos/dll/win32/gdiplus/gdiplus.rbuild b/dll/win32/gdiplus/gdiplus.rbuild similarity index 100% rename from reactos/dll/win32/gdiplus/gdiplus.rbuild rename to dll/win32/gdiplus/gdiplus.rbuild diff --git a/reactos/dll/win32/gdiplus/gdiplus.spec b/dll/win32/gdiplus/gdiplus.spec similarity index 100% rename from reactos/dll/win32/gdiplus/gdiplus.spec rename to dll/win32/gdiplus/gdiplus.spec diff --git a/reactos/dll/win32/gdiplus/gdiplus_private.h b/dll/win32/gdiplus/gdiplus_private.h similarity index 100% rename from reactos/dll/win32/gdiplus/gdiplus_private.h rename to dll/win32/gdiplus/gdiplus_private.h diff --git a/reactos/dll/win32/gdiplus/graphics.c b/dll/win32/gdiplus/graphics.c similarity index 100% rename from reactos/dll/win32/gdiplus/graphics.c rename to dll/win32/gdiplus/graphics.c diff --git a/reactos/dll/win32/gdiplus/graphicspath.c b/dll/win32/gdiplus/graphicspath.c similarity index 100% rename from reactos/dll/win32/gdiplus/graphicspath.c rename to dll/win32/gdiplus/graphicspath.c diff --git a/reactos/dll/win32/gdiplus/image.c b/dll/win32/gdiplus/image.c similarity index 100% rename from reactos/dll/win32/gdiplus/image.c rename to dll/win32/gdiplus/image.c diff --git a/reactos/dll/win32/gdiplus/imageattributes.c b/dll/win32/gdiplus/imageattributes.c similarity index 100% rename from reactos/dll/win32/gdiplus/imageattributes.c rename to dll/win32/gdiplus/imageattributes.c diff --git a/reactos/dll/win32/gdiplus/matrix.c b/dll/win32/gdiplus/matrix.c similarity index 100% rename from reactos/dll/win32/gdiplus/matrix.c rename to dll/win32/gdiplus/matrix.c diff --git a/reactos/dll/win32/gdiplus/pathiterator.c b/dll/win32/gdiplus/pathiterator.c similarity index 100% rename from reactos/dll/win32/gdiplus/pathiterator.c rename to dll/win32/gdiplus/pathiterator.c diff --git a/reactos/dll/win32/gdiplus/pen.c b/dll/win32/gdiplus/pen.c similarity index 100% rename from reactos/dll/win32/gdiplus/pen.c rename to dll/win32/gdiplus/pen.c diff --git a/reactos/dll/win32/gdiplus/region.c b/dll/win32/gdiplus/region.c similarity index 100% rename from reactos/dll/win32/gdiplus/region.c rename to dll/win32/gdiplus/region.c diff --git a/reactos/dll/win32/gdiplus/stringformat.c b/dll/win32/gdiplus/stringformat.c similarity index 100% rename from reactos/dll/win32/gdiplus/stringformat.c rename to dll/win32/gdiplus/stringformat.c diff --git a/reactos/dll/win32/getuname/CMakeLists.txt b/dll/win32/getuname/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/getuname/CMakeLists.txt rename to dll/win32/getuname/CMakeLists.txt diff --git a/reactos/dll/win32/getuname/getuname.c b/dll/win32/getuname/getuname.c similarity index 100% rename from reactos/dll/win32/getuname/getuname.c rename to dll/win32/getuname/getuname.c diff --git a/reactos/dll/win32/getuname/getuname.rbuild b/dll/win32/getuname/getuname.rbuild similarity index 100% rename from reactos/dll/win32/getuname/getuname.rbuild rename to dll/win32/getuname/getuname.rbuild diff --git a/reactos/dll/win32/getuname/getuname.rc b/dll/win32/getuname/getuname.rc similarity index 100% rename from reactos/dll/win32/getuname/getuname.rc rename to dll/win32/getuname/getuname.rc diff --git a/reactos/dll/win32/getuname/getuname.spec b/dll/win32/getuname/getuname.spec similarity index 100% rename from reactos/dll/win32/getuname/getuname.spec rename to dll/win32/getuname/getuname.spec diff --git a/reactos/dll/win32/glu32/CMakeLists.txt b/dll/win32/glu32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/glu32/CMakeLists.txt rename to dll/win32/glu32/CMakeLists.txt diff --git a/reactos/dll/win32/glu32/glu32.rbuild b/dll/win32/glu32/glu32.rbuild similarity index 100% rename from reactos/dll/win32/glu32/glu32.rbuild rename to dll/win32/glu32/glu32.rbuild diff --git a/reactos/dll/win32/glu32/glu32.spec b/dll/win32/glu32/glu32.spec similarity index 100% rename from reactos/dll/win32/glu32/glu32.spec rename to dll/win32/glu32/glu32.spec diff --git a/reactos/dll/win32/glu32/include/gluos.h b/dll/win32/glu32/include/gluos.h similarity index 100% rename from reactos/dll/win32/glu32/include/gluos.h rename to dll/win32/glu32/include/gluos.h diff --git a/reactos/dll/win32/glu32/libnurbs/interface/bezierEval.cc b/dll/win32/glu32/libnurbs/interface/bezierEval.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/interface/bezierEval.cc rename to dll/win32/glu32/libnurbs/interface/bezierEval.cc diff --git a/reactos/dll/win32/glu32/libnurbs/interface/bezierEval.h b/dll/win32/glu32/libnurbs/interface/bezierEval.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/interface/bezierEval.h rename to dll/win32/glu32/libnurbs/interface/bezierEval.h diff --git a/reactos/dll/win32/glu32/libnurbs/interface/bezierPatch.cc b/dll/win32/glu32/libnurbs/interface/bezierPatch.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/interface/bezierPatch.cc rename to dll/win32/glu32/libnurbs/interface/bezierPatch.cc diff --git a/reactos/dll/win32/glu32/libnurbs/interface/bezierPatch.h b/dll/win32/glu32/libnurbs/interface/bezierPatch.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/interface/bezierPatch.h rename to dll/win32/glu32/libnurbs/interface/bezierPatch.h diff --git a/reactos/dll/win32/glu32/libnurbs/interface/bezierPatchMesh.cc b/dll/win32/glu32/libnurbs/interface/bezierPatchMesh.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/interface/bezierPatchMesh.cc rename to dll/win32/glu32/libnurbs/interface/bezierPatchMesh.cc diff --git a/reactos/dll/win32/glu32/libnurbs/interface/bezierPatchMesh.h b/dll/win32/glu32/libnurbs/interface/bezierPatchMesh.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/interface/bezierPatchMesh.h rename to dll/win32/glu32/libnurbs/interface/bezierPatchMesh.h diff --git a/reactos/dll/win32/glu32/libnurbs/interface/glcurveval.cc b/dll/win32/glu32/libnurbs/interface/glcurveval.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/interface/glcurveval.cc rename to dll/win32/glu32/libnurbs/interface/glcurveval.cc diff --git a/reactos/dll/win32/glu32/libnurbs/interface/glcurveval.h b/dll/win32/glu32/libnurbs/interface/glcurveval.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/interface/glcurveval.h rename to dll/win32/glu32/libnurbs/interface/glcurveval.h diff --git a/reactos/dll/win32/glu32/libnurbs/interface/glimports.h b/dll/win32/glu32/libnurbs/interface/glimports.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/interface/glimports.h rename to dll/win32/glu32/libnurbs/interface/glimports.h diff --git a/reactos/dll/win32/glu32/libnurbs/interface/glinterface.cc b/dll/win32/glu32/libnurbs/interface/glinterface.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/interface/glinterface.cc rename to dll/win32/glu32/libnurbs/interface/glinterface.cc diff --git a/reactos/dll/win32/glu32/libnurbs/interface/glrenderer.cc b/dll/win32/glu32/libnurbs/interface/glrenderer.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/interface/glrenderer.cc rename to dll/win32/glu32/libnurbs/interface/glrenderer.cc diff --git a/reactos/dll/win32/glu32/libnurbs/interface/glrenderer.h b/dll/win32/glu32/libnurbs/interface/glrenderer.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/interface/glrenderer.h rename to dll/win32/glu32/libnurbs/interface/glrenderer.h diff --git a/reactos/dll/win32/glu32/libnurbs/interface/glsurfeval.cc b/dll/win32/glu32/libnurbs/interface/glsurfeval.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/interface/glsurfeval.cc rename to dll/win32/glu32/libnurbs/interface/glsurfeval.cc diff --git a/reactos/dll/win32/glu32/libnurbs/interface/glsurfeval.h b/dll/win32/glu32/libnurbs/interface/glsurfeval.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/interface/glsurfeval.h rename to dll/win32/glu32/libnurbs/interface/glsurfeval.h diff --git a/reactos/dll/win32/glu32/libnurbs/interface/incurveeval.cc b/dll/win32/glu32/libnurbs/interface/incurveeval.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/interface/incurveeval.cc rename to dll/win32/glu32/libnurbs/interface/incurveeval.cc diff --git a/reactos/dll/win32/glu32/libnurbs/interface/insurfeval.cc b/dll/win32/glu32/libnurbs/interface/insurfeval.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/interface/insurfeval.cc rename to dll/win32/glu32/libnurbs/interface/insurfeval.cc diff --git a/reactos/dll/win32/glu32/libnurbs/interface/mystdio.h b/dll/win32/glu32/libnurbs/interface/mystdio.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/interface/mystdio.h rename to dll/win32/glu32/libnurbs/interface/mystdio.h diff --git a/reactos/dll/win32/glu32/libnurbs/interface/mystdlib.h b/dll/win32/glu32/libnurbs/interface/mystdlib.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/interface/mystdlib.h rename to dll/win32/glu32/libnurbs/interface/mystdlib.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/arc.cc b/dll/win32/glu32/libnurbs/internals/arc.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/arc.cc rename to dll/win32/glu32/libnurbs/internals/arc.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/arc.h b/dll/win32/glu32/libnurbs/internals/arc.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/arc.h rename to dll/win32/glu32/libnurbs/internals/arc.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/arcsorter.cc b/dll/win32/glu32/libnurbs/internals/arcsorter.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/arcsorter.cc rename to dll/win32/glu32/libnurbs/internals/arcsorter.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/arcsorter.h b/dll/win32/glu32/libnurbs/internals/arcsorter.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/arcsorter.h rename to dll/win32/glu32/libnurbs/internals/arcsorter.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/arctess.cc b/dll/win32/glu32/libnurbs/internals/arctess.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/arctess.cc rename to dll/win32/glu32/libnurbs/internals/arctess.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/arctess.h b/dll/win32/glu32/libnurbs/internals/arctess.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/arctess.h rename to dll/win32/glu32/libnurbs/internals/arctess.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/backend.cc b/dll/win32/glu32/libnurbs/internals/backend.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/backend.cc rename to dll/win32/glu32/libnurbs/internals/backend.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/backend.h b/dll/win32/glu32/libnurbs/internals/backend.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/backend.h rename to dll/win32/glu32/libnurbs/internals/backend.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/basiccrveval.cc b/dll/win32/glu32/libnurbs/internals/basiccrveval.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/basiccrveval.cc rename to dll/win32/glu32/libnurbs/internals/basiccrveval.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/basiccrveval.h b/dll/win32/glu32/libnurbs/internals/basiccrveval.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/basiccrveval.h rename to dll/win32/glu32/libnurbs/internals/basiccrveval.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/basicsurfeval.cc b/dll/win32/glu32/libnurbs/internals/basicsurfeval.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/basicsurfeval.cc rename to dll/win32/glu32/libnurbs/internals/basicsurfeval.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/basicsurfeval.h b/dll/win32/glu32/libnurbs/internals/basicsurfeval.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/basicsurfeval.h rename to dll/win32/glu32/libnurbs/internals/basicsurfeval.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/bezierarc.h b/dll/win32/glu32/libnurbs/internals/bezierarc.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/bezierarc.h rename to dll/win32/glu32/libnurbs/internals/bezierarc.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/bin.cc b/dll/win32/glu32/libnurbs/internals/bin.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/bin.cc rename to dll/win32/glu32/libnurbs/internals/bin.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/bin.h b/dll/win32/glu32/libnurbs/internals/bin.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/bin.h rename to dll/win32/glu32/libnurbs/internals/bin.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/bufpool.cc b/dll/win32/glu32/libnurbs/internals/bufpool.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/bufpool.cc rename to dll/win32/glu32/libnurbs/internals/bufpool.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/bufpool.h b/dll/win32/glu32/libnurbs/internals/bufpool.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/bufpool.h rename to dll/win32/glu32/libnurbs/internals/bufpool.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/cachingeval.cc b/dll/win32/glu32/libnurbs/internals/cachingeval.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/cachingeval.cc rename to dll/win32/glu32/libnurbs/internals/cachingeval.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/cachingeval.h b/dll/win32/glu32/libnurbs/internals/cachingeval.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/cachingeval.h rename to dll/win32/glu32/libnurbs/internals/cachingeval.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/ccw.cc b/dll/win32/glu32/libnurbs/internals/ccw.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/ccw.cc rename to dll/win32/glu32/libnurbs/internals/ccw.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/coveandtiler.cc b/dll/win32/glu32/libnurbs/internals/coveandtiler.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/coveandtiler.cc rename to dll/win32/glu32/libnurbs/internals/coveandtiler.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/coveandtiler.h b/dll/win32/glu32/libnurbs/internals/coveandtiler.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/coveandtiler.h rename to dll/win32/glu32/libnurbs/internals/coveandtiler.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/curve.cc b/dll/win32/glu32/libnurbs/internals/curve.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/curve.cc rename to dll/win32/glu32/libnurbs/internals/curve.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/curve.h b/dll/win32/glu32/libnurbs/internals/curve.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/curve.h rename to dll/win32/glu32/libnurbs/internals/curve.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/curvelist.cc b/dll/win32/glu32/libnurbs/internals/curvelist.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/curvelist.cc rename to dll/win32/glu32/libnurbs/internals/curvelist.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/curvelist.h b/dll/win32/glu32/libnurbs/internals/curvelist.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/curvelist.h rename to dll/win32/glu32/libnurbs/internals/curvelist.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/curvesub.cc b/dll/win32/glu32/libnurbs/internals/curvesub.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/curvesub.cc rename to dll/win32/glu32/libnurbs/internals/curvesub.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/dataTransform.cc b/dll/win32/glu32/libnurbs/internals/dataTransform.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/dataTransform.cc rename to dll/win32/glu32/libnurbs/internals/dataTransform.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/dataTransform.h b/dll/win32/glu32/libnurbs/internals/dataTransform.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/dataTransform.h rename to dll/win32/glu32/libnurbs/internals/dataTransform.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/defines.h b/dll/win32/glu32/libnurbs/internals/defines.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/defines.h rename to dll/win32/glu32/libnurbs/internals/defines.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/displaylist.cc b/dll/win32/glu32/libnurbs/internals/displaylist.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/displaylist.cc rename to dll/win32/glu32/libnurbs/internals/displaylist.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/displaylist.h b/dll/win32/glu32/libnurbs/internals/displaylist.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/displaylist.h rename to dll/win32/glu32/libnurbs/internals/displaylist.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/displaymode.h b/dll/win32/glu32/libnurbs/internals/displaymode.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/displaymode.h rename to dll/win32/glu32/libnurbs/internals/displaymode.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/flist.cc b/dll/win32/glu32/libnurbs/internals/flist.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/flist.cc rename to dll/win32/glu32/libnurbs/internals/flist.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/flist.h b/dll/win32/glu32/libnurbs/internals/flist.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/flist.h rename to dll/win32/glu32/libnurbs/internals/flist.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/flistsorter.cc b/dll/win32/glu32/libnurbs/internals/flistsorter.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/flistsorter.cc rename to dll/win32/glu32/libnurbs/internals/flistsorter.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/flistsorter.h b/dll/win32/glu32/libnurbs/internals/flistsorter.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/flistsorter.h rename to dll/win32/glu32/libnurbs/internals/flistsorter.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/gridline.h b/dll/win32/glu32/libnurbs/internals/gridline.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/gridline.h rename to dll/win32/glu32/libnurbs/internals/gridline.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/gridtrimvertex.h b/dll/win32/glu32/libnurbs/internals/gridtrimvertex.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/gridtrimvertex.h rename to dll/win32/glu32/libnurbs/internals/gridtrimvertex.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/gridvertex.h b/dll/win32/glu32/libnurbs/internals/gridvertex.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/gridvertex.h rename to dll/win32/glu32/libnurbs/internals/gridvertex.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/hull.cc b/dll/win32/glu32/libnurbs/internals/hull.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/hull.cc rename to dll/win32/glu32/libnurbs/internals/hull.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/hull.h b/dll/win32/glu32/libnurbs/internals/hull.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/hull.h rename to dll/win32/glu32/libnurbs/internals/hull.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/intersect.cc b/dll/win32/glu32/libnurbs/internals/intersect.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/intersect.cc rename to dll/win32/glu32/libnurbs/internals/intersect.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/jarcloc.h b/dll/win32/glu32/libnurbs/internals/jarcloc.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/jarcloc.h rename to dll/win32/glu32/libnurbs/internals/jarcloc.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/knotvector.cc b/dll/win32/glu32/libnurbs/internals/knotvector.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/knotvector.cc rename to dll/win32/glu32/libnurbs/internals/knotvector.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/knotvector.h b/dll/win32/glu32/libnurbs/internals/knotvector.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/knotvector.h rename to dll/win32/glu32/libnurbs/internals/knotvector.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/mapdesc.cc b/dll/win32/glu32/libnurbs/internals/mapdesc.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/mapdesc.cc rename to dll/win32/glu32/libnurbs/internals/mapdesc.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/mapdesc.h b/dll/win32/glu32/libnurbs/internals/mapdesc.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/mapdesc.h rename to dll/win32/glu32/libnurbs/internals/mapdesc.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/mapdescv.cc b/dll/win32/glu32/libnurbs/internals/mapdescv.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/mapdescv.cc rename to dll/win32/glu32/libnurbs/internals/mapdescv.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/maplist.cc b/dll/win32/glu32/libnurbs/internals/maplist.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/maplist.cc rename to dll/win32/glu32/libnurbs/internals/maplist.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/maplist.h b/dll/win32/glu32/libnurbs/internals/maplist.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/maplist.h rename to dll/win32/glu32/libnurbs/internals/maplist.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/mesher.cc b/dll/win32/glu32/libnurbs/internals/mesher.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/mesher.cc rename to dll/win32/glu32/libnurbs/internals/mesher.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/mesher.h b/dll/win32/glu32/libnurbs/internals/mesher.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/mesher.h rename to dll/win32/glu32/libnurbs/internals/mesher.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/monoTriangulationBackend.cc b/dll/win32/glu32/libnurbs/internals/monoTriangulationBackend.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/monoTriangulationBackend.cc rename to dll/win32/glu32/libnurbs/internals/monoTriangulationBackend.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/monotonizer.cc b/dll/win32/glu32/libnurbs/internals/monotonizer.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/monotonizer.cc rename to dll/win32/glu32/libnurbs/internals/monotonizer.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/monotonizer.h b/dll/win32/glu32/libnurbs/internals/monotonizer.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/monotonizer.h rename to dll/win32/glu32/libnurbs/internals/monotonizer.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/myassert.h b/dll/win32/glu32/libnurbs/internals/myassert.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/myassert.h rename to dll/win32/glu32/libnurbs/internals/myassert.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/mycode.cc b/dll/win32/glu32/libnurbs/internals/mycode.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/mycode.cc rename to dll/win32/glu32/libnurbs/internals/mycode.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/mymath.h b/dll/win32/glu32/libnurbs/internals/mymath.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/mymath.h rename to dll/win32/glu32/libnurbs/internals/mymath.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/mysetjmp.h b/dll/win32/glu32/libnurbs/internals/mysetjmp.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/mysetjmp.h rename to dll/win32/glu32/libnurbs/internals/mysetjmp.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/mystring.h b/dll/win32/glu32/libnurbs/internals/mystring.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/mystring.h rename to dll/win32/glu32/libnurbs/internals/mystring.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/nurbsconsts.h b/dll/win32/glu32/libnurbs/internals/nurbsconsts.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/nurbsconsts.h rename to dll/win32/glu32/libnurbs/internals/nurbsconsts.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/nurbsinterfac.cc b/dll/win32/glu32/libnurbs/internals/nurbsinterfac.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/nurbsinterfac.cc rename to dll/win32/glu32/libnurbs/internals/nurbsinterfac.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/nurbstess.cc b/dll/win32/glu32/libnurbs/internals/nurbstess.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/nurbstess.cc rename to dll/win32/glu32/libnurbs/internals/nurbstess.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/nurbstess.h b/dll/win32/glu32/libnurbs/internals/nurbstess.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/nurbstess.h rename to dll/win32/glu32/libnurbs/internals/nurbstess.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/patch.cc b/dll/win32/glu32/libnurbs/internals/patch.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/patch.cc rename to dll/win32/glu32/libnurbs/internals/patch.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/patch.h b/dll/win32/glu32/libnurbs/internals/patch.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/patch.h rename to dll/win32/glu32/libnurbs/internals/patch.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/patchlist.cc b/dll/win32/glu32/libnurbs/internals/patchlist.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/patchlist.cc rename to dll/win32/glu32/libnurbs/internals/patchlist.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/patchlist.h b/dll/win32/glu32/libnurbs/internals/patchlist.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/patchlist.h rename to dll/win32/glu32/libnurbs/internals/patchlist.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/pwlarc.h b/dll/win32/glu32/libnurbs/internals/pwlarc.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/pwlarc.h rename to dll/win32/glu32/libnurbs/internals/pwlarc.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/quilt.cc b/dll/win32/glu32/libnurbs/internals/quilt.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/quilt.cc rename to dll/win32/glu32/libnurbs/internals/quilt.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/quilt.h b/dll/win32/glu32/libnurbs/internals/quilt.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/quilt.h rename to dll/win32/glu32/libnurbs/internals/quilt.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/reader.cc b/dll/win32/glu32/libnurbs/internals/reader.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/reader.cc rename to dll/win32/glu32/libnurbs/internals/reader.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/reader.h b/dll/win32/glu32/libnurbs/internals/reader.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/reader.h rename to dll/win32/glu32/libnurbs/internals/reader.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/renderhints.cc b/dll/win32/glu32/libnurbs/internals/renderhints.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/renderhints.cc rename to dll/win32/glu32/libnurbs/internals/renderhints.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/renderhints.h b/dll/win32/glu32/libnurbs/internals/renderhints.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/renderhints.h rename to dll/win32/glu32/libnurbs/internals/renderhints.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/simplemath.h b/dll/win32/glu32/libnurbs/internals/simplemath.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/simplemath.h rename to dll/win32/glu32/libnurbs/internals/simplemath.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/slicer.cc b/dll/win32/glu32/libnurbs/internals/slicer.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/slicer.cc rename to dll/win32/glu32/libnurbs/internals/slicer.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/slicer.h b/dll/win32/glu32/libnurbs/internals/slicer.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/slicer.h rename to dll/win32/glu32/libnurbs/internals/slicer.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/sorter.cc b/dll/win32/glu32/libnurbs/internals/sorter.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/sorter.cc rename to dll/win32/glu32/libnurbs/internals/sorter.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/sorter.h b/dll/win32/glu32/libnurbs/internals/sorter.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/sorter.h rename to dll/win32/glu32/libnurbs/internals/sorter.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/splitarcs.cc b/dll/win32/glu32/libnurbs/internals/splitarcs.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/splitarcs.cc rename to dll/win32/glu32/libnurbs/internals/splitarcs.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/subdivider.cc b/dll/win32/glu32/libnurbs/internals/subdivider.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/subdivider.cc rename to dll/win32/glu32/libnurbs/internals/subdivider.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/subdivider.h b/dll/win32/glu32/libnurbs/internals/subdivider.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/subdivider.h rename to dll/win32/glu32/libnurbs/internals/subdivider.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/tobezier.cc b/dll/win32/glu32/libnurbs/internals/tobezier.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/tobezier.cc rename to dll/win32/glu32/libnurbs/internals/tobezier.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/trimline.cc b/dll/win32/glu32/libnurbs/internals/trimline.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/trimline.cc rename to dll/win32/glu32/libnurbs/internals/trimline.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/trimline.h b/dll/win32/glu32/libnurbs/internals/trimline.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/trimline.h rename to dll/win32/glu32/libnurbs/internals/trimline.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/trimregion.cc b/dll/win32/glu32/libnurbs/internals/trimregion.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/trimregion.cc rename to dll/win32/glu32/libnurbs/internals/trimregion.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/trimregion.h b/dll/win32/glu32/libnurbs/internals/trimregion.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/trimregion.h rename to dll/win32/glu32/libnurbs/internals/trimregion.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/trimvertex.h b/dll/win32/glu32/libnurbs/internals/trimvertex.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/trimvertex.h rename to dll/win32/glu32/libnurbs/internals/trimvertex.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/trimvertpool.cc b/dll/win32/glu32/libnurbs/internals/trimvertpool.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/trimvertpool.cc rename to dll/win32/glu32/libnurbs/internals/trimvertpool.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/trimvertpool.h b/dll/win32/glu32/libnurbs/internals/trimvertpool.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/trimvertpool.h rename to dll/win32/glu32/libnurbs/internals/trimvertpool.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/types.h b/dll/win32/glu32/libnurbs/internals/types.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/types.h rename to dll/win32/glu32/libnurbs/internals/types.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/uarray.cc b/dll/win32/glu32/libnurbs/internals/uarray.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/uarray.cc rename to dll/win32/glu32/libnurbs/internals/uarray.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/uarray.h b/dll/win32/glu32/libnurbs/internals/uarray.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/uarray.h rename to dll/win32/glu32/libnurbs/internals/uarray.h diff --git a/reactos/dll/win32/glu32/libnurbs/internals/varray.cc b/dll/win32/glu32/libnurbs/internals/varray.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/varray.cc rename to dll/win32/glu32/libnurbs/internals/varray.cc diff --git a/reactos/dll/win32/glu32/libnurbs/internals/varray.h b/dll/win32/glu32/libnurbs/internals/varray.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/internals/varray.h rename to dll/win32/glu32/libnurbs/internals/varray.h diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/definitions.h b/dll/win32/glu32/libnurbs/nurbtess/definitions.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/definitions.h rename to dll/win32/glu32/libnurbs/nurbtess/definitions.h diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/directedLine.cc b/dll/win32/glu32/libnurbs/nurbtess/directedLine.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/directedLine.cc rename to dll/win32/glu32/libnurbs/nurbtess/directedLine.cc diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/directedLine.h b/dll/win32/glu32/libnurbs/nurbtess/directedLine.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/directedLine.h rename to dll/win32/glu32/libnurbs/nurbtess/directedLine.h diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/glimports.h b/dll/win32/glu32/libnurbs/nurbtess/glimports.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/glimports.h rename to dll/win32/glu32/libnurbs/nurbtess/glimports.h diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/gridWrap.cc b/dll/win32/glu32/libnurbs/nurbtess/gridWrap.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/gridWrap.cc rename to dll/win32/glu32/libnurbs/nurbtess/gridWrap.cc diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/gridWrap.h b/dll/win32/glu32/libnurbs/nurbtess/gridWrap.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/gridWrap.h rename to dll/win32/glu32/libnurbs/nurbtess/gridWrap.h diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/monoChain.cc b/dll/win32/glu32/libnurbs/nurbtess/monoChain.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/monoChain.cc rename to dll/win32/glu32/libnurbs/nurbtess/monoChain.cc diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/monoChain.h b/dll/win32/glu32/libnurbs/nurbtess/monoChain.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/monoChain.h rename to dll/win32/glu32/libnurbs/nurbtess/monoChain.h diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/monoPolyPart.cc b/dll/win32/glu32/libnurbs/nurbtess/monoPolyPart.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/monoPolyPart.cc rename to dll/win32/glu32/libnurbs/nurbtess/monoPolyPart.cc diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/monoPolyPart.h b/dll/win32/glu32/libnurbs/nurbtess/monoPolyPart.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/monoPolyPart.h rename to dll/win32/glu32/libnurbs/nurbtess/monoPolyPart.h diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/monoTriangulation.cc b/dll/win32/glu32/libnurbs/nurbtess/monoTriangulation.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/monoTriangulation.cc rename to dll/win32/glu32/libnurbs/nurbtess/monoTriangulation.cc diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/monoTriangulation.h b/dll/win32/glu32/libnurbs/nurbtess/monoTriangulation.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/monoTriangulation.h rename to dll/win32/glu32/libnurbs/nurbtess/monoTriangulation.h diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/mystdio.h b/dll/win32/glu32/libnurbs/nurbtess/mystdio.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/mystdio.h rename to dll/win32/glu32/libnurbs/nurbtess/mystdio.h diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/mystdlib.h b/dll/win32/glu32/libnurbs/nurbtess/mystdlib.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/mystdlib.h rename to dll/win32/glu32/libnurbs/nurbtess/mystdlib.h diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/partitionX.cc b/dll/win32/glu32/libnurbs/nurbtess/partitionX.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/partitionX.cc rename to dll/win32/glu32/libnurbs/nurbtess/partitionX.cc diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/partitionX.h b/dll/win32/glu32/libnurbs/nurbtess/partitionX.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/partitionX.h rename to dll/win32/glu32/libnurbs/nurbtess/partitionX.h diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/partitionY.cc b/dll/win32/glu32/libnurbs/nurbtess/partitionY.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/partitionY.cc rename to dll/win32/glu32/libnurbs/nurbtess/partitionY.cc diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/partitionY.h b/dll/win32/glu32/libnurbs/nurbtess/partitionY.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/partitionY.h rename to dll/win32/glu32/libnurbs/nurbtess/partitionY.h diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/polyDBG.cc b/dll/win32/glu32/libnurbs/nurbtess/polyDBG.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/polyDBG.cc rename to dll/win32/glu32/libnurbs/nurbtess/polyDBG.cc diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/polyDBG.h b/dll/win32/glu32/libnurbs/nurbtess/polyDBG.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/polyDBG.h rename to dll/win32/glu32/libnurbs/nurbtess/polyDBG.h diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/polyUtil.cc b/dll/win32/glu32/libnurbs/nurbtess/polyUtil.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/polyUtil.cc rename to dll/win32/glu32/libnurbs/nurbtess/polyUtil.cc diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/polyUtil.h b/dll/win32/glu32/libnurbs/nurbtess/polyUtil.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/polyUtil.h rename to dll/win32/glu32/libnurbs/nurbtess/polyUtil.h diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/primitiveStream.cc b/dll/win32/glu32/libnurbs/nurbtess/primitiveStream.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/primitiveStream.cc rename to dll/win32/glu32/libnurbs/nurbtess/primitiveStream.cc diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/primitiveStream.h b/dll/win32/glu32/libnurbs/nurbtess/primitiveStream.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/primitiveStream.h rename to dll/win32/glu32/libnurbs/nurbtess/primitiveStream.h diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/quicksort.cc b/dll/win32/glu32/libnurbs/nurbtess/quicksort.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/quicksort.cc rename to dll/win32/glu32/libnurbs/nurbtess/quicksort.cc diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/quicksort.h b/dll/win32/glu32/libnurbs/nurbtess/quicksort.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/quicksort.h rename to dll/win32/glu32/libnurbs/nurbtess/quicksort.h diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/rectBlock.cc b/dll/win32/glu32/libnurbs/nurbtess/rectBlock.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/rectBlock.cc rename to dll/win32/glu32/libnurbs/nurbtess/rectBlock.cc diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/rectBlock.h b/dll/win32/glu32/libnurbs/nurbtess/rectBlock.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/rectBlock.h rename to dll/win32/glu32/libnurbs/nurbtess/rectBlock.h diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/sampleComp.cc b/dll/win32/glu32/libnurbs/nurbtess/sampleComp.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/sampleComp.cc rename to dll/win32/glu32/libnurbs/nurbtess/sampleComp.cc diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/sampleComp.h b/dll/win32/glu32/libnurbs/nurbtess/sampleComp.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/sampleComp.h rename to dll/win32/glu32/libnurbs/nurbtess/sampleComp.h diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/sampleCompBot.cc b/dll/win32/glu32/libnurbs/nurbtess/sampleCompBot.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/sampleCompBot.cc rename to dll/win32/glu32/libnurbs/nurbtess/sampleCompBot.cc diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/sampleCompBot.h b/dll/win32/glu32/libnurbs/nurbtess/sampleCompBot.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/sampleCompBot.h rename to dll/win32/glu32/libnurbs/nurbtess/sampleCompBot.h diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/sampleCompRight.cc b/dll/win32/glu32/libnurbs/nurbtess/sampleCompRight.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/sampleCompRight.cc rename to dll/win32/glu32/libnurbs/nurbtess/sampleCompRight.cc diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/sampleCompRight.h b/dll/win32/glu32/libnurbs/nurbtess/sampleCompRight.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/sampleCompRight.h rename to dll/win32/glu32/libnurbs/nurbtess/sampleCompRight.h diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/sampleCompTop.cc b/dll/win32/glu32/libnurbs/nurbtess/sampleCompTop.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/sampleCompTop.cc rename to dll/win32/glu32/libnurbs/nurbtess/sampleCompTop.cc diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/sampleCompTop.h b/dll/win32/glu32/libnurbs/nurbtess/sampleCompTop.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/sampleCompTop.h rename to dll/win32/glu32/libnurbs/nurbtess/sampleCompTop.h diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/sampleMonoPoly.cc b/dll/win32/glu32/libnurbs/nurbtess/sampleMonoPoly.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/sampleMonoPoly.cc rename to dll/win32/glu32/libnurbs/nurbtess/sampleMonoPoly.cc diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/sampleMonoPoly.h b/dll/win32/glu32/libnurbs/nurbtess/sampleMonoPoly.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/sampleMonoPoly.h rename to dll/win32/glu32/libnurbs/nurbtess/sampleMonoPoly.h diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/sampledLine.cc b/dll/win32/glu32/libnurbs/nurbtess/sampledLine.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/sampledLine.cc rename to dll/win32/glu32/libnurbs/nurbtess/sampledLine.cc diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/sampledLine.h b/dll/win32/glu32/libnurbs/nurbtess/sampledLine.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/sampledLine.h rename to dll/win32/glu32/libnurbs/nurbtess/sampledLine.h diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/searchTree.cc b/dll/win32/glu32/libnurbs/nurbtess/searchTree.cc similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/searchTree.cc rename to dll/win32/glu32/libnurbs/nurbtess/searchTree.cc diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/searchTree.h b/dll/win32/glu32/libnurbs/nurbtess/searchTree.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/searchTree.h rename to dll/win32/glu32/libnurbs/nurbtess/searchTree.h diff --git a/reactos/dll/win32/glu32/libnurbs/nurbtess/zlassert.h b/dll/win32/glu32/libnurbs/nurbtess/zlassert.h similarity index 100% rename from reactos/dll/win32/glu32/libnurbs/nurbtess/zlassert.h rename to dll/win32/glu32/libnurbs/nurbtess/zlassert.h diff --git a/reactos/dll/win32/glu32/libtess/README b/dll/win32/glu32/libtess/README similarity index 100% rename from reactos/dll/win32/glu32/libtess/README rename to dll/win32/glu32/libtess/README diff --git a/reactos/dll/win32/glu32/libtess/alg-outline b/dll/win32/glu32/libtess/alg-outline similarity index 100% rename from reactos/dll/win32/glu32/libtess/alg-outline rename to dll/win32/glu32/libtess/alg-outline diff --git a/reactos/dll/win32/glu32/libtess/dict-list.h b/dll/win32/glu32/libtess/dict-list.h similarity index 100% rename from reactos/dll/win32/glu32/libtess/dict-list.h rename to dll/win32/glu32/libtess/dict-list.h diff --git a/reactos/dll/win32/glu32/libtess/dict.c b/dll/win32/glu32/libtess/dict.c similarity index 100% rename from reactos/dll/win32/glu32/libtess/dict.c rename to dll/win32/glu32/libtess/dict.c diff --git a/reactos/dll/win32/glu32/libtess/dict.h b/dll/win32/glu32/libtess/dict.h similarity index 100% rename from reactos/dll/win32/glu32/libtess/dict.h rename to dll/win32/glu32/libtess/dict.h diff --git a/reactos/dll/win32/glu32/libtess/geom.c b/dll/win32/glu32/libtess/geom.c similarity index 100% rename from reactos/dll/win32/glu32/libtess/geom.c rename to dll/win32/glu32/libtess/geom.c diff --git a/reactos/dll/win32/glu32/libtess/geom.h b/dll/win32/glu32/libtess/geom.h similarity index 100% rename from reactos/dll/win32/glu32/libtess/geom.h rename to dll/win32/glu32/libtess/geom.h diff --git a/reactos/dll/win32/glu32/libtess/memalloc.c b/dll/win32/glu32/libtess/memalloc.c similarity index 100% rename from reactos/dll/win32/glu32/libtess/memalloc.c rename to dll/win32/glu32/libtess/memalloc.c diff --git a/reactos/dll/win32/glu32/libtess/memalloc.h b/dll/win32/glu32/libtess/memalloc.h similarity index 100% rename from reactos/dll/win32/glu32/libtess/memalloc.h rename to dll/win32/glu32/libtess/memalloc.h diff --git a/reactos/dll/win32/glu32/libtess/mesh.c b/dll/win32/glu32/libtess/mesh.c similarity index 100% rename from reactos/dll/win32/glu32/libtess/mesh.c rename to dll/win32/glu32/libtess/mesh.c diff --git a/reactos/dll/win32/glu32/libtess/mesh.h b/dll/win32/glu32/libtess/mesh.h similarity index 100% rename from reactos/dll/win32/glu32/libtess/mesh.h rename to dll/win32/glu32/libtess/mesh.h diff --git a/reactos/dll/win32/glu32/libtess/normal.c b/dll/win32/glu32/libtess/normal.c similarity index 100% rename from reactos/dll/win32/glu32/libtess/normal.c rename to dll/win32/glu32/libtess/normal.c diff --git a/reactos/dll/win32/glu32/libtess/normal.h b/dll/win32/glu32/libtess/normal.h similarity index 100% rename from reactos/dll/win32/glu32/libtess/normal.h rename to dll/win32/glu32/libtess/normal.h diff --git a/reactos/dll/win32/glu32/libtess/priorityq-heap.c b/dll/win32/glu32/libtess/priorityq-heap.c similarity index 100% rename from reactos/dll/win32/glu32/libtess/priorityq-heap.c rename to dll/win32/glu32/libtess/priorityq-heap.c diff --git a/reactos/dll/win32/glu32/libtess/priorityq-heap.h b/dll/win32/glu32/libtess/priorityq-heap.h similarity index 100% rename from reactos/dll/win32/glu32/libtess/priorityq-heap.h rename to dll/win32/glu32/libtess/priorityq-heap.h diff --git a/reactos/dll/win32/glu32/libtess/priorityq-sort.h b/dll/win32/glu32/libtess/priorityq-sort.h similarity index 100% rename from reactos/dll/win32/glu32/libtess/priorityq-sort.h rename to dll/win32/glu32/libtess/priorityq-sort.h diff --git a/reactos/dll/win32/glu32/libtess/priorityq.c b/dll/win32/glu32/libtess/priorityq.c similarity index 100% rename from reactos/dll/win32/glu32/libtess/priorityq.c rename to dll/win32/glu32/libtess/priorityq.c diff --git a/reactos/dll/win32/glu32/libtess/priorityq.h b/dll/win32/glu32/libtess/priorityq.h similarity index 100% rename from reactos/dll/win32/glu32/libtess/priorityq.h rename to dll/win32/glu32/libtess/priorityq.h diff --git a/reactos/dll/win32/glu32/libtess/render.c b/dll/win32/glu32/libtess/render.c similarity index 100% rename from reactos/dll/win32/glu32/libtess/render.c rename to dll/win32/glu32/libtess/render.c diff --git a/reactos/dll/win32/glu32/libtess/render.h b/dll/win32/glu32/libtess/render.h similarity index 100% rename from reactos/dll/win32/glu32/libtess/render.h rename to dll/win32/glu32/libtess/render.h diff --git a/reactos/dll/win32/glu32/libtess/sweep.c b/dll/win32/glu32/libtess/sweep.c similarity index 100% rename from reactos/dll/win32/glu32/libtess/sweep.c rename to dll/win32/glu32/libtess/sweep.c diff --git a/reactos/dll/win32/glu32/libtess/sweep.h b/dll/win32/glu32/libtess/sweep.h similarity index 100% rename from reactos/dll/win32/glu32/libtess/sweep.h rename to dll/win32/glu32/libtess/sweep.h diff --git a/reactos/dll/win32/glu32/libtess/tess.c b/dll/win32/glu32/libtess/tess.c similarity index 100% rename from reactos/dll/win32/glu32/libtess/tess.c rename to dll/win32/glu32/libtess/tess.c diff --git a/reactos/dll/win32/glu32/libtess/tess.h b/dll/win32/glu32/libtess/tess.h similarity index 100% rename from reactos/dll/win32/glu32/libtess/tess.h rename to dll/win32/glu32/libtess/tess.h diff --git a/reactos/dll/win32/glu32/libtess/tessmono.c b/dll/win32/glu32/libtess/tessmono.c similarity index 100% rename from reactos/dll/win32/glu32/libtess/tessmono.c rename to dll/win32/glu32/libtess/tessmono.c diff --git a/reactos/dll/win32/glu32/libtess/tessmono.h b/dll/win32/glu32/libtess/tessmono.h similarity index 100% rename from reactos/dll/win32/glu32/libtess/tessmono.h rename to dll/win32/glu32/libtess/tessmono.h diff --git a/reactos/dll/win32/glu32/libutil/error.c b/dll/win32/glu32/libutil/error.c similarity index 100% rename from reactos/dll/win32/glu32/libutil/error.c rename to dll/win32/glu32/libutil/error.c diff --git a/reactos/dll/win32/glu32/libutil/glue.c b/dll/win32/glu32/libutil/glue.c similarity index 100% rename from reactos/dll/win32/glu32/libutil/glue.c rename to dll/win32/glu32/libutil/glue.c diff --git a/reactos/dll/win32/glu32/libutil/gluint.h b/dll/win32/glu32/libutil/gluint.h similarity index 100% rename from reactos/dll/win32/glu32/libutil/gluint.h rename to dll/win32/glu32/libutil/gluint.h diff --git a/reactos/dll/win32/glu32/libutil/mipmap.c b/dll/win32/glu32/libutil/mipmap.c similarity index 100% rename from reactos/dll/win32/glu32/libutil/mipmap.c rename to dll/win32/glu32/libutil/mipmap.c diff --git a/reactos/dll/win32/glu32/libutil/project.c b/dll/win32/glu32/libutil/project.c similarity index 100% rename from reactos/dll/win32/glu32/libutil/project.c rename to dll/win32/glu32/libutil/project.c diff --git a/reactos/dll/win32/glu32/libutil/quad.c b/dll/win32/glu32/libutil/quad.c similarity index 100% rename from reactos/dll/win32/glu32/libutil/quad.c rename to dll/win32/glu32/libutil/quad.c diff --git a/reactos/dll/win32/glu32/libutil/registry.c b/dll/win32/glu32/libutil/registry.c similarity index 100% rename from reactos/dll/win32/glu32/libutil/registry.c rename to dll/win32/glu32/libutil/registry.c diff --git a/reactos/dll/win32/hhctrl.ocx/CMakeLists.txt b/dll/win32/hhctrl.ocx/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/CMakeLists.txt rename to dll/win32/hhctrl.ocx/CMakeLists.txt diff --git a/reactos/dll/win32/hhctrl.ocx/Cs.rc b/dll/win32/hhctrl.ocx/Cs.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/Cs.rc rename to dll/win32/hhctrl.ocx/Cs.rc diff --git a/reactos/dll/win32/hhctrl.ocx/Da.rc b/dll/win32/hhctrl.ocx/Da.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/Da.rc rename to dll/win32/hhctrl.ocx/Da.rc diff --git a/reactos/dll/win32/hhctrl.ocx/De.rc b/dll/win32/hhctrl.ocx/De.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/De.rc rename to dll/win32/hhctrl.ocx/De.rc diff --git a/reactos/dll/win32/hhctrl.ocx/El.rc b/dll/win32/hhctrl.ocx/El.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/El.rc rename to dll/win32/hhctrl.ocx/El.rc diff --git a/reactos/dll/win32/hhctrl.ocx/En.rc b/dll/win32/hhctrl.ocx/En.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/En.rc rename to dll/win32/hhctrl.ocx/En.rc diff --git a/reactos/dll/win32/hhctrl.ocx/Es.rc b/dll/win32/hhctrl.ocx/Es.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/Es.rc rename to dll/win32/hhctrl.ocx/Es.rc diff --git a/reactos/dll/win32/hhctrl.ocx/Fi.rc b/dll/win32/hhctrl.ocx/Fi.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/Fi.rc rename to dll/win32/hhctrl.ocx/Fi.rc diff --git a/reactos/dll/win32/hhctrl.ocx/Fr.rc b/dll/win32/hhctrl.ocx/Fr.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/Fr.rc rename to dll/win32/hhctrl.ocx/Fr.rc diff --git a/reactos/dll/win32/hhctrl.ocx/Hu.rc b/dll/win32/hhctrl.ocx/Hu.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/Hu.rc rename to dll/win32/hhctrl.ocx/Hu.rc diff --git a/reactos/dll/win32/hhctrl.ocx/It.rc b/dll/win32/hhctrl.ocx/It.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/It.rc rename to dll/win32/hhctrl.ocx/It.rc diff --git a/reactos/dll/win32/hhctrl.ocx/Ja.rc b/dll/win32/hhctrl.ocx/Ja.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/Ja.rc rename to dll/win32/hhctrl.ocx/Ja.rc diff --git a/reactos/dll/win32/hhctrl.ocx/Ko.rc b/dll/win32/hhctrl.ocx/Ko.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/Ko.rc rename to dll/win32/hhctrl.ocx/Ko.rc diff --git a/reactos/dll/win32/hhctrl.ocx/Lt.rc b/dll/win32/hhctrl.ocx/Lt.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/Lt.rc rename to dll/win32/hhctrl.ocx/Lt.rc diff --git a/reactos/dll/win32/hhctrl.ocx/Nl.rc b/dll/win32/hhctrl.ocx/Nl.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/Nl.rc rename to dll/win32/hhctrl.ocx/Nl.rc diff --git a/reactos/dll/win32/hhctrl.ocx/No.rc b/dll/win32/hhctrl.ocx/No.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/No.rc rename to dll/win32/hhctrl.ocx/No.rc diff --git a/reactos/dll/win32/hhctrl.ocx/Pl.rc b/dll/win32/hhctrl.ocx/Pl.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/Pl.rc rename to dll/win32/hhctrl.ocx/Pl.rc diff --git a/reactos/dll/win32/hhctrl.ocx/Pt.rc b/dll/win32/hhctrl.ocx/Pt.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/Pt.rc rename to dll/win32/hhctrl.ocx/Pt.rc diff --git a/reactos/dll/win32/hhctrl.ocx/Ro.rc b/dll/win32/hhctrl.ocx/Ro.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/Ro.rc rename to dll/win32/hhctrl.ocx/Ro.rc diff --git a/reactos/dll/win32/hhctrl.ocx/Ru.rc b/dll/win32/hhctrl.ocx/Ru.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/Ru.rc rename to dll/win32/hhctrl.ocx/Ru.rc diff --git a/reactos/dll/win32/hhctrl.ocx/Si.rc b/dll/win32/hhctrl.ocx/Si.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/Si.rc rename to dll/win32/hhctrl.ocx/Si.rc diff --git a/reactos/dll/win32/hhctrl.ocx/Sv.rc b/dll/win32/hhctrl.ocx/Sv.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/Sv.rc rename to dll/win32/hhctrl.ocx/Sv.rc diff --git a/reactos/dll/win32/hhctrl.ocx/Tr.rc b/dll/win32/hhctrl.ocx/Tr.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/Tr.rc rename to dll/win32/hhctrl.ocx/Tr.rc diff --git a/reactos/dll/win32/hhctrl.ocx/Uk.rc b/dll/win32/hhctrl.ocx/Uk.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/Uk.rc rename to dll/win32/hhctrl.ocx/Uk.rc diff --git a/reactos/dll/win32/hhctrl.ocx/Zh.rc b/dll/win32/hhctrl.ocx/Zh.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/Zh.rc rename to dll/win32/hhctrl.ocx/Zh.rc diff --git a/reactos/dll/win32/hhctrl.ocx/chm.c b/dll/win32/hhctrl.ocx/chm.c similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/chm.c rename to dll/win32/hhctrl.ocx/chm.c diff --git a/reactos/dll/win32/hhctrl.ocx/content.c b/dll/win32/hhctrl.ocx/content.c similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/content.c rename to dll/win32/hhctrl.ocx/content.c diff --git a/reactos/dll/win32/hhctrl.ocx/help.c b/dll/win32/hhctrl.ocx/help.c similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/help.c rename to dll/win32/hhctrl.ocx/help.c diff --git a/reactos/dll/win32/hhctrl.ocx/hhctrl.c b/dll/win32/hhctrl.ocx/hhctrl.c similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/hhctrl.c rename to dll/win32/hhctrl.ocx/hhctrl.c diff --git a/reactos/dll/win32/hhctrl.ocx/hhctrl.h b/dll/win32/hhctrl.ocx/hhctrl.h similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/hhctrl.h rename to dll/win32/hhctrl.ocx/hhctrl.h diff --git a/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild b/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild rename to dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild diff --git a/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.spec b/dll/win32/hhctrl.ocx/hhctrl.ocx.spec similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.spec rename to dll/win32/hhctrl.ocx/hhctrl.ocx.spec diff --git a/reactos/dll/win32/hhctrl.ocx/hhctrl.rc b/dll/win32/hhctrl.ocx/hhctrl.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/hhctrl.rc rename to dll/win32/hhctrl.ocx/hhctrl.rc diff --git a/reactos/dll/win32/hhctrl.ocx/index.c b/dll/win32/hhctrl.ocx/index.c similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/index.c rename to dll/win32/hhctrl.ocx/index.c diff --git a/reactos/dll/win32/hhctrl.ocx/regsvr.c b/dll/win32/hhctrl.ocx/regsvr.c similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/regsvr.c rename to dll/win32/hhctrl.ocx/regsvr.c diff --git a/reactos/dll/win32/hhctrl.ocx/resource.h b/dll/win32/hhctrl.ocx/resource.h similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/resource.h rename to dll/win32/hhctrl.ocx/resource.h diff --git a/reactos/dll/win32/hhctrl.ocx/search.c b/dll/win32/hhctrl.ocx/search.c similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/search.c rename to dll/win32/hhctrl.ocx/search.c diff --git a/reactos/dll/win32/hhctrl.ocx/stream.c b/dll/win32/hhctrl.ocx/stream.c similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/stream.c rename to dll/win32/hhctrl.ocx/stream.c diff --git a/reactos/dll/win32/hhctrl.ocx/stream.h b/dll/win32/hhctrl.ocx/stream.h similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/stream.h rename to dll/win32/hhctrl.ocx/stream.h diff --git a/reactos/dll/win32/hhctrl.ocx/version.rc b/dll/win32/hhctrl.ocx/version.rc similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/version.rc rename to dll/win32/hhctrl.ocx/version.rc diff --git a/reactos/dll/win32/hhctrl.ocx/webbrowser.c b/dll/win32/hhctrl.ocx/webbrowser.c similarity index 100% rename from reactos/dll/win32/hhctrl.ocx/webbrowser.c rename to dll/win32/hhctrl.ocx/webbrowser.c diff --git a/reactos/dll/win32/hid/CMakeLists.txt b/dll/win32/hid/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/hid/CMakeLists.txt rename to dll/win32/hid/CMakeLists.txt diff --git a/reactos/dll/win32/hid/hid.c b/dll/win32/hid/hid.c similarity index 100% rename from reactos/dll/win32/hid/hid.c rename to dll/win32/hid/hid.c diff --git a/reactos/dll/win32/hid/hid.rbuild b/dll/win32/hid/hid.rbuild similarity index 100% rename from reactos/dll/win32/hid/hid.rbuild rename to dll/win32/hid/hid.rbuild diff --git a/reactos/dll/win32/hid/hid.rc b/dll/win32/hid/hid.rc similarity index 100% rename from reactos/dll/win32/hid/hid.rc rename to dll/win32/hid/hid.rc diff --git a/reactos/dll/win32/hid/hid.spec b/dll/win32/hid/hid.spec similarity index 100% rename from reactos/dll/win32/hid/hid.spec rename to dll/win32/hid/hid.spec diff --git a/reactos/dll/win32/hid/precomp.h b/dll/win32/hid/precomp.h similarity index 100% rename from reactos/dll/win32/hid/precomp.h rename to dll/win32/hid/precomp.h diff --git a/reactos/dll/win32/hid/stubs.c b/dll/win32/hid/stubs.c similarity index 100% rename from reactos/dll/win32/hid/stubs.c rename to dll/win32/hid/stubs.c diff --git a/reactos/dll/win32/hlink/CMakeLists.txt b/dll/win32/hlink/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/hlink/CMakeLists.txt rename to dll/win32/hlink/CMakeLists.txt diff --git a/reactos/dll/win32/hlink/browse_ctx.c b/dll/win32/hlink/browse_ctx.c similarity index 100% rename from reactos/dll/win32/hlink/browse_ctx.c rename to dll/win32/hlink/browse_ctx.c diff --git a/reactos/dll/win32/hlink/extserv.c b/dll/win32/hlink/extserv.c similarity index 100% rename from reactos/dll/win32/hlink/extserv.c rename to dll/win32/hlink/extserv.c diff --git a/reactos/dll/win32/hlink/hlink.rbuild b/dll/win32/hlink/hlink.rbuild similarity index 100% rename from reactos/dll/win32/hlink/hlink.rbuild rename to dll/win32/hlink/hlink.rbuild diff --git a/reactos/dll/win32/hlink/hlink.spec b/dll/win32/hlink/hlink.spec similarity index 100% rename from reactos/dll/win32/hlink/hlink.spec rename to dll/win32/hlink/hlink.spec diff --git a/reactos/dll/win32/hlink/hlink_main.c b/dll/win32/hlink/hlink_main.c similarity index 100% rename from reactos/dll/win32/hlink/hlink_main.c rename to dll/win32/hlink/hlink_main.c diff --git a/reactos/dll/win32/hlink/hlink_private.h b/dll/win32/hlink/hlink_private.h similarity index 100% rename from reactos/dll/win32/hlink/hlink_private.h rename to dll/win32/hlink/hlink_private.h diff --git a/reactos/dll/win32/hlink/link.c b/dll/win32/hlink/link.c similarity index 100% rename from reactos/dll/win32/hlink/link.c rename to dll/win32/hlink/link.c diff --git a/reactos/dll/win32/hnetcfg/CMakeLists.txt b/dll/win32/hnetcfg/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/hnetcfg/CMakeLists.txt rename to dll/win32/hnetcfg/CMakeLists.txt diff --git a/reactos/dll/win32/hnetcfg/apps.c b/dll/win32/hnetcfg/apps.c similarity index 100% rename from reactos/dll/win32/hnetcfg/apps.c rename to dll/win32/hnetcfg/apps.c diff --git a/reactos/dll/win32/hnetcfg/hnetcfg.c b/dll/win32/hnetcfg/hnetcfg.c similarity index 100% rename from reactos/dll/win32/hnetcfg/hnetcfg.c rename to dll/win32/hnetcfg/hnetcfg.c diff --git a/reactos/dll/win32/hnetcfg/hnetcfg.rbuild b/dll/win32/hnetcfg/hnetcfg.rbuild similarity index 100% rename from reactos/dll/win32/hnetcfg/hnetcfg.rbuild rename to dll/win32/hnetcfg/hnetcfg.rbuild diff --git a/reactos/dll/win32/hnetcfg/hnetcfg.spec b/dll/win32/hnetcfg/hnetcfg.spec similarity index 100% rename from reactos/dll/win32/hnetcfg/hnetcfg.spec rename to dll/win32/hnetcfg/hnetcfg.spec diff --git a/reactos/dll/win32/hnetcfg/hnetcfg_private.h b/dll/win32/hnetcfg/hnetcfg_private.h similarity index 100% rename from reactos/dll/win32/hnetcfg/hnetcfg_private.h rename to dll/win32/hnetcfg/hnetcfg_private.h diff --git a/reactos/dll/win32/hnetcfg/manager.c b/dll/win32/hnetcfg/manager.c similarity index 100% rename from reactos/dll/win32/hnetcfg/manager.c rename to dll/win32/hnetcfg/manager.c diff --git a/reactos/dll/win32/hnetcfg/policy.c b/dll/win32/hnetcfg/policy.c similarity index 100% rename from reactos/dll/win32/hnetcfg/policy.c rename to dll/win32/hnetcfg/policy.c diff --git a/reactos/dll/win32/hnetcfg/port.c b/dll/win32/hnetcfg/port.c similarity index 100% rename from reactos/dll/win32/hnetcfg/port.c rename to dll/win32/hnetcfg/port.c diff --git a/reactos/dll/win32/hnetcfg/profile.c b/dll/win32/hnetcfg/profile.c similarity index 100% rename from reactos/dll/win32/hnetcfg/profile.c rename to dll/win32/hnetcfg/profile.c diff --git a/reactos/dll/win32/hnetcfg/regsvr.c b/dll/win32/hnetcfg/regsvr.c similarity index 100% rename from reactos/dll/win32/hnetcfg/regsvr.c rename to dll/win32/hnetcfg/regsvr.c diff --git a/reactos/dll/win32/hnetcfg/service.c b/dll/win32/hnetcfg/service.c similarity index 100% rename from reactos/dll/win32/hnetcfg/service.c rename to dll/win32/hnetcfg/service.c diff --git a/reactos/dll/win32/httpapi/CMakeLists.txt b/dll/win32/httpapi/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/httpapi/CMakeLists.txt rename to dll/win32/httpapi/CMakeLists.txt diff --git a/reactos/dll/win32/httpapi/httpapi.rbuild b/dll/win32/httpapi/httpapi.rbuild similarity index 100% rename from reactos/dll/win32/httpapi/httpapi.rbuild rename to dll/win32/httpapi/httpapi.rbuild diff --git a/reactos/dll/win32/httpapi/httpapi.spec b/dll/win32/httpapi/httpapi.spec similarity index 100% rename from reactos/dll/win32/httpapi/httpapi.spec rename to dll/win32/httpapi/httpapi.spec diff --git a/reactos/dll/win32/httpapi/httpapi_main.c b/dll/win32/httpapi/httpapi_main.c similarity index 100% rename from reactos/dll/win32/httpapi/httpapi_main.c rename to dll/win32/httpapi/httpapi_main.c diff --git a/reactos/dll/win32/iccvid/CMakeLists.txt b/dll/win32/iccvid/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/iccvid/CMakeLists.txt rename to dll/win32/iccvid/CMakeLists.txt diff --git a/reactos/dll/win32/iccvid/iccvid.c b/dll/win32/iccvid/iccvid.c similarity index 100% rename from reactos/dll/win32/iccvid/iccvid.c rename to dll/win32/iccvid/iccvid.c diff --git a/reactos/dll/win32/iccvid/iccvid.rbuild b/dll/win32/iccvid/iccvid.rbuild similarity index 100% rename from reactos/dll/win32/iccvid/iccvid.rbuild rename to dll/win32/iccvid/iccvid.rbuild diff --git a/reactos/dll/win32/iccvid/iccvid.spec b/dll/win32/iccvid/iccvid.spec similarity index 100% rename from reactos/dll/win32/iccvid/iccvid.spec rename to dll/win32/iccvid/iccvid.spec diff --git a/reactos/dll/win32/iccvid/iccvid_Cy.rc b/dll/win32/iccvid/iccvid_Cy.rc similarity index 100% rename from reactos/dll/win32/iccvid/iccvid_Cy.rc rename to dll/win32/iccvid/iccvid_Cy.rc diff --git a/reactos/dll/win32/iccvid/iccvid_Da.rc b/dll/win32/iccvid/iccvid_Da.rc similarity index 100% rename from reactos/dll/win32/iccvid/iccvid_Da.rc rename to dll/win32/iccvid/iccvid_Da.rc diff --git a/reactos/dll/win32/iccvid/iccvid_De.rc b/dll/win32/iccvid/iccvid_De.rc similarity index 100% rename from reactos/dll/win32/iccvid/iccvid_De.rc rename to dll/win32/iccvid/iccvid_De.rc diff --git a/reactos/dll/win32/iccvid/iccvid_En.rc b/dll/win32/iccvid/iccvid_En.rc similarity index 100% rename from reactos/dll/win32/iccvid/iccvid_En.rc rename to dll/win32/iccvid/iccvid_En.rc diff --git a/reactos/dll/win32/iccvid/iccvid_Es.rc b/dll/win32/iccvid/iccvid_Es.rc similarity index 100% rename from reactos/dll/win32/iccvid/iccvid_Es.rc rename to dll/win32/iccvid/iccvid_Es.rc diff --git a/reactos/dll/win32/iccvid/iccvid_Fr.rc b/dll/win32/iccvid/iccvid_Fr.rc similarity index 100% rename from reactos/dll/win32/iccvid/iccvid_Fr.rc rename to dll/win32/iccvid/iccvid_Fr.rc diff --git a/reactos/dll/win32/iccvid/iccvid_Hu.rc b/dll/win32/iccvid/iccvid_Hu.rc similarity index 100% rename from reactos/dll/win32/iccvid/iccvid_Hu.rc rename to dll/win32/iccvid/iccvid_Hu.rc diff --git a/reactos/dll/win32/iccvid/iccvid_It.rc b/dll/win32/iccvid/iccvid_It.rc similarity index 100% rename from reactos/dll/win32/iccvid/iccvid_It.rc rename to dll/win32/iccvid/iccvid_It.rc diff --git a/reactos/dll/win32/iccvid/iccvid_Ja.rc b/dll/win32/iccvid/iccvid_Ja.rc similarity index 100% rename from reactos/dll/win32/iccvid/iccvid_Ja.rc rename to dll/win32/iccvid/iccvid_Ja.rc diff --git a/reactos/dll/win32/iccvid/iccvid_Ko.rc b/dll/win32/iccvid/iccvid_Ko.rc similarity index 100% rename from reactos/dll/win32/iccvid/iccvid_Ko.rc rename to dll/win32/iccvid/iccvid_Ko.rc diff --git a/reactos/dll/win32/iccvid/iccvid_Lt.rc b/dll/win32/iccvid/iccvid_Lt.rc similarity index 100% rename from reactos/dll/win32/iccvid/iccvid_Lt.rc rename to dll/win32/iccvid/iccvid_Lt.rc diff --git a/reactos/dll/win32/iccvid/iccvid_Nl.rc b/dll/win32/iccvid/iccvid_Nl.rc similarity index 100% rename from reactos/dll/win32/iccvid/iccvid_Nl.rc rename to dll/win32/iccvid/iccvid_Nl.rc diff --git a/reactos/dll/win32/iccvid/iccvid_No.rc b/dll/win32/iccvid/iccvid_No.rc similarity index 100% rename from reactos/dll/win32/iccvid/iccvid_No.rc rename to dll/win32/iccvid/iccvid_No.rc diff --git a/reactos/dll/win32/iccvid/iccvid_Pl.rc b/dll/win32/iccvid/iccvid_Pl.rc similarity index 100% rename from reactos/dll/win32/iccvid/iccvid_Pl.rc rename to dll/win32/iccvid/iccvid_Pl.rc diff --git a/reactos/dll/win32/iccvid/iccvid_Pt.rc b/dll/win32/iccvid/iccvid_Pt.rc similarity index 100% rename from reactos/dll/win32/iccvid/iccvid_Pt.rc rename to dll/win32/iccvid/iccvid_Pt.rc diff --git a/reactos/dll/win32/iccvid/iccvid_Ro.rc b/dll/win32/iccvid/iccvid_Ro.rc similarity index 100% rename from reactos/dll/win32/iccvid/iccvid_Ro.rc rename to dll/win32/iccvid/iccvid_Ro.rc diff --git a/reactos/dll/win32/iccvid/iccvid_Ru.rc b/dll/win32/iccvid/iccvid_Ru.rc similarity index 100% rename from reactos/dll/win32/iccvid/iccvid_Ru.rc rename to dll/win32/iccvid/iccvid_Ru.rc diff --git a/reactos/dll/win32/iccvid/iccvid_Si.rc b/dll/win32/iccvid/iccvid_Si.rc similarity index 100% rename from reactos/dll/win32/iccvid/iccvid_Si.rc rename to dll/win32/iccvid/iccvid_Si.rc diff --git a/reactos/dll/win32/iccvid/iccvid_Sv.rc b/dll/win32/iccvid/iccvid_Sv.rc similarity index 100% rename from reactos/dll/win32/iccvid/iccvid_Sv.rc rename to dll/win32/iccvid/iccvid_Sv.rc diff --git a/reactos/dll/win32/iccvid/iccvid_Tr.rc b/dll/win32/iccvid/iccvid_Tr.rc similarity index 100% rename from reactos/dll/win32/iccvid/iccvid_Tr.rc rename to dll/win32/iccvid/iccvid_Tr.rc diff --git a/reactos/dll/win32/iccvid/iccvid_Uk.rc b/dll/win32/iccvid/iccvid_Uk.rc similarity index 100% rename from reactos/dll/win32/iccvid/iccvid_Uk.rc rename to dll/win32/iccvid/iccvid_Uk.rc diff --git a/reactos/dll/win32/iccvid/iccvid_private.h b/dll/win32/iccvid/iccvid_private.h similarity index 100% rename from reactos/dll/win32/iccvid/iccvid_private.h rename to dll/win32/iccvid/iccvid_private.h diff --git a/reactos/dll/win32/iccvid/rsrc.rc b/dll/win32/iccvid/rsrc.rc similarity index 100% rename from reactos/dll/win32/iccvid/rsrc.rc rename to dll/win32/iccvid/rsrc.rc diff --git a/reactos/dll/win32/icmp/CMakeLists.txt b/dll/win32/icmp/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/icmp/CMakeLists.txt rename to dll/win32/icmp/CMakeLists.txt diff --git a/reactos/dll/win32/icmp/icmp.rbuild b/dll/win32/icmp/icmp.rbuild similarity index 100% rename from reactos/dll/win32/icmp/icmp.rbuild rename to dll/win32/icmp/icmp.rbuild diff --git a/reactos/dll/win32/icmp/icmp.rc b/dll/win32/icmp/icmp.rc similarity index 100% rename from reactos/dll/win32/icmp/icmp.rc rename to dll/win32/icmp/icmp.rc diff --git a/reactos/dll/win32/icmp/icmp.spec b/dll/win32/icmp/icmp.spec similarity index 100% rename from reactos/dll/win32/icmp/icmp.spec rename to dll/win32/icmp/icmp.spec diff --git a/reactos/dll/win32/icmp/icmp_main.c b/dll/win32/icmp/icmp_main.c similarity index 100% rename from reactos/dll/win32/icmp/icmp_main.c rename to dll/win32/icmp/icmp_main.c diff --git a/reactos/dll/win32/icmp/ip.h b/dll/win32/icmp/ip.h similarity index 100% rename from reactos/dll/win32/icmp/ip.h rename to dll/win32/icmp/ip.h diff --git a/reactos/dll/win32/icmp/ip_icmp.h b/dll/win32/icmp/ip_icmp.h similarity index 100% rename from reactos/dll/win32/icmp/ip_icmp.h rename to dll/win32/icmp/ip_icmp.h diff --git a/reactos/dll/win32/imaadp32.acm/CMakeLists.txt b/dll/win32/imaadp32.acm/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/imaadp32.acm/CMakeLists.txt rename to dll/win32/imaadp32.acm/CMakeLists.txt diff --git a/reactos/dll/win32/imaadp32.acm/imaadp32.acm.rbuild b/dll/win32/imaadp32.acm/imaadp32.acm.rbuild similarity index 100% rename from reactos/dll/win32/imaadp32.acm/imaadp32.acm.rbuild rename to dll/win32/imaadp32.acm/imaadp32.acm.rbuild diff --git a/reactos/dll/win32/imaadp32.acm/imaadp32.acm.spec b/dll/win32/imaadp32.acm/imaadp32.acm.spec similarity index 100% rename from reactos/dll/win32/imaadp32.acm/imaadp32.acm.spec rename to dll/win32/imaadp32.acm/imaadp32.acm.spec diff --git a/reactos/dll/win32/imaadp32.acm/imaadp32.c b/dll/win32/imaadp32.acm/imaadp32.c similarity index 100% rename from reactos/dll/win32/imaadp32.acm/imaadp32.c rename to dll/win32/imaadp32.acm/imaadp32.c diff --git a/reactos/dll/win32/imagehlp/CMakeLists.txt b/dll/win32/imagehlp/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/imagehlp/CMakeLists.txt rename to dll/win32/imagehlp/CMakeLists.txt diff --git a/reactos/dll/win32/imagehlp/access.c b/dll/win32/imagehlp/access.c similarity index 100% rename from reactos/dll/win32/imagehlp/access.c rename to dll/win32/imagehlp/access.c diff --git a/reactos/dll/win32/imagehlp/imagehlp.rbuild b/dll/win32/imagehlp/imagehlp.rbuild similarity index 100% rename from reactos/dll/win32/imagehlp/imagehlp.rbuild rename to dll/win32/imagehlp/imagehlp.rbuild diff --git a/reactos/dll/win32/imagehlp/imagehlp.rc b/dll/win32/imagehlp/imagehlp.rc similarity index 100% rename from reactos/dll/win32/imagehlp/imagehlp.rc rename to dll/win32/imagehlp/imagehlp.rc diff --git a/reactos/dll/win32/imagehlp/imagehlp.spec b/dll/win32/imagehlp/imagehlp.spec similarity index 100% rename from reactos/dll/win32/imagehlp/imagehlp.spec rename to dll/win32/imagehlp/imagehlp.spec diff --git a/reactos/dll/win32/imagehlp/imagehlp_main.c b/dll/win32/imagehlp/imagehlp_main.c similarity index 100% rename from reactos/dll/win32/imagehlp/imagehlp_main.c rename to dll/win32/imagehlp/imagehlp_main.c diff --git a/reactos/dll/win32/imagehlp/integrity.c b/dll/win32/imagehlp/integrity.c similarity index 100% rename from reactos/dll/win32/imagehlp/integrity.c rename to dll/win32/imagehlp/integrity.c diff --git a/reactos/dll/win32/imagehlp/modify.c b/dll/win32/imagehlp/modify.c similarity index 100% rename from reactos/dll/win32/imagehlp/modify.c rename to dll/win32/imagehlp/modify.c diff --git a/reactos/dll/win32/imagehlp/precomp.h b/dll/win32/imagehlp/precomp.h similarity index 100% rename from reactos/dll/win32/imagehlp/precomp.h rename to dll/win32/imagehlp/precomp.h diff --git a/reactos/dll/win32/imm32/CMakeLists.txt b/dll/win32/imm32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/imm32/CMakeLists.txt rename to dll/win32/imm32/CMakeLists.txt diff --git a/reactos/dll/win32/imm32/imm.c b/dll/win32/imm32/imm.c similarity index 100% rename from reactos/dll/win32/imm32/imm.c rename to dll/win32/imm32/imm.c diff --git a/reactos/dll/win32/imm32/imm.spec b/dll/win32/imm32/imm.spec similarity index 100% rename from reactos/dll/win32/imm32/imm.spec rename to dll/win32/imm32/imm.spec diff --git a/reactos/dll/win32/imm32/imm32.rbuild b/dll/win32/imm32/imm32.rbuild similarity index 100% rename from reactos/dll/win32/imm32/imm32.rbuild rename to dll/win32/imm32/imm32.rbuild diff --git a/reactos/dll/win32/imm32/imm32.spec b/dll/win32/imm32/imm32.spec similarity index 100% rename from reactos/dll/win32/imm32/imm32.spec rename to dll/win32/imm32/imm32.spec diff --git a/reactos/dll/win32/imm32/version.rc b/dll/win32/imm32/version.rc similarity index 100% rename from reactos/dll/win32/imm32/version.rc rename to dll/win32/imm32/version.rc diff --git a/reactos/dll/win32/inetcomm/CMakeLists.txt b/dll/win32/inetcomm/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/inetcomm/CMakeLists.txt rename to dll/win32/inetcomm/CMakeLists.txt diff --git a/reactos/dll/win32/inetcomm/imaptransport.c b/dll/win32/inetcomm/imaptransport.c similarity index 100% rename from reactos/dll/win32/inetcomm/imaptransport.c rename to dll/win32/inetcomm/imaptransport.c diff --git a/reactos/dll/win32/inetcomm/inetcomm.rbuild b/dll/win32/inetcomm/inetcomm.rbuild similarity index 100% rename from reactos/dll/win32/inetcomm/inetcomm.rbuild rename to dll/win32/inetcomm/inetcomm.rbuild diff --git a/reactos/dll/win32/inetcomm/inetcomm.spec b/dll/win32/inetcomm/inetcomm.spec similarity index 100% rename from reactos/dll/win32/inetcomm/inetcomm.spec rename to dll/win32/inetcomm/inetcomm.spec diff --git a/reactos/dll/win32/inetcomm/inetcomm_main.c b/dll/win32/inetcomm/inetcomm_main.c similarity index 100% rename from reactos/dll/win32/inetcomm/inetcomm_main.c rename to dll/win32/inetcomm/inetcomm_main.c diff --git a/reactos/dll/win32/inetcomm/inetcomm_private.h b/dll/win32/inetcomm/inetcomm_private.h similarity index 100% rename from reactos/dll/win32/inetcomm/inetcomm_private.h rename to dll/win32/inetcomm/inetcomm_private.h diff --git a/reactos/dll/win32/inetcomm/internettransport.c b/dll/win32/inetcomm/internettransport.c similarity index 100% rename from reactos/dll/win32/inetcomm/internettransport.c rename to dll/win32/inetcomm/internettransport.c diff --git a/reactos/dll/win32/inetcomm/mimeintl.c b/dll/win32/inetcomm/mimeintl.c similarity index 100% rename from reactos/dll/win32/inetcomm/mimeintl.c rename to dll/win32/inetcomm/mimeintl.c diff --git a/reactos/dll/win32/inetcomm/mimeole.c b/dll/win32/inetcomm/mimeole.c similarity index 100% rename from reactos/dll/win32/inetcomm/mimeole.c rename to dll/win32/inetcomm/mimeole.c diff --git a/reactos/dll/win32/inetcomm/pop3transport.c b/dll/win32/inetcomm/pop3transport.c similarity index 100% rename from reactos/dll/win32/inetcomm/pop3transport.c rename to dll/win32/inetcomm/pop3transport.c diff --git a/reactos/dll/win32/inetcomm/regsvr.c b/dll/win32/inetcomm/regsvr.c similarity index 100% rename from reactos/dll/win32/inetcomm/regsvr.c rename to dll/win32/inetcomm/regsvr.c diff --git a/reactos/dll/win32/inetcomm/smtptransport.c b/dll/win32/inetcomm/smtptransport.c similarity index 100% rename from reactos/dll/win32/inetcomm/smtptransport.c rename to dll/win32/inetcomm/smtptransport.c diff --git a/reactos/dll/win32/inetmib1/CMakeLists.txt b/dll/win32/inetmib1/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/inetmib1/CMakeLists.txt rename to dll/win32/inetmib1/CMakeLists.txt diff --git a/reactos/dll/win32/inetmib1/inetmib1.rbuild b/dll/win32/inetmib1/inetmib1.rbuild similarity index 100% rename from reactos/dll/win32/inetmib1/inetmib1.rbuild rename to dll/win32/inetmib1/inetmib1.rbuild diff --git a/reactos/dll/win32/inetmib1/inetmib1.spec b/dll/win32/inetmib1/inetmib1.spec similarity index 100% rename from reactos/dll/win32/inetmib1/inetmib1.spec rename to dll/win32/inetmib1/inetmib1.spec diff --git a/reactos/dll/win32/inetmib1/main.c b/dll/win32/inetmib1/main.c similarity index 100% rename from reactos/dll/win32/inetmib1/main.c rename to dll/win32/inetmib1/main.c diff --git a/reactos/dll/win32/initpki/CMakeLists.txt b/dll/win32/initpki/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/initpki/CMakeLists.txt rename to dll/win32/initpki/CMakeLists.txt diff --git a/reactos/dll/win32/initpki/initpki.rbuild b/dll/win32/initpki/initpki.rbuild similarity index 100% rename from reactos/dll/win32/initpki/initpki.rbuild rename to dll/win32/initpki/initpki.rbuild diff --git a/reactos/dll/win32/initpki/initpki.spec b/dll/win32/initpki/initpki.spec similarity index 100% rename from reactos/dll/win32/initpki/initpki.spec rename to dll/win32/initpki/initpki.spec diff --git a/reactos/dll/win32/initpki/main.c b/dll/win32/initpki/main.c similarity index 100% rename from reactos/dll/win32/initpki/main.c rename to dll/win32/initpki/main.c diff --git a/reactos/dll/win32/inseng/CMakeLists.txt b/dll/win32/inseng/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/inseng/CMakeLists.txt rename to dll/win32/inseng/CMakeLists.txt diff --git a/reactos/dll/win32/inseng/inseng.rbuild b/dll/win32/inseng/inseng.rbuild similarity index 100% rename from reactos/dll/win32/inseng/inseng.rbuild rename to dll/win32/inseng/inseng.rbuild diff --git a/reactos/dll/win32/inseng/inseng.spec b/dll/win32/inseng/inseng.spec similarity index 100% rename from reactos/dll/win32/inseng/inseng.spec rename to dll/win32/inseng/inseng.spec diff --git a/reactos/dll/win32/inseng/inseng_main.c b/dll/win32/inseng/inseng_main.c similarity index 100% rename from reactos/dll/win32/inseng/inseng_main.c rename to dll/win32/inseng/inseng_main.c diff --git a/reactos/dll/win32/inseng/regsvr.c b/dll/win32/inseng/regsvr.c similarity index 100% rename from reactos/dll/win32/inseng/regsvr.c rename to dll/win32/inseng/regsvr.c diff --git a/reactos/dll/win32/iologmsg/iologmsg.rbuild b/dll/win32/iologmsg/iologmsg.rbuild similarity index 100% rename from reactos/dll/win32/iologmsg/iologmsg.rbuild rename to dll/win32/iologmsg/iologmsg.rbuild diff --git a/reactos/dll/win32/iologmsg/iologmsg.rc b/dll/win32/iologmsg/iologmsg.rc similarity index 100% rename from reactos/dll/win32/iologmsg/iologmsg.rc rename to dll/win32/iologmsg/iologmsg.rc diff --git a/reactos/dll/win32/iphlpapi/CMakeLists.txt b/dll/win32/iphlpapi/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/iphlpapi/CMakeLists.txt rename to dll/win32/iphlpapi/CMakeLists.txt diff --git a/reactos/dll/win32/iphlpapi/dhcp.h b/dll/win32/iphlpapi/dhcp.h similarity index 100% rename from reactos/dll/win32/iphlpapi/dhcp.h rename to dll/win32/iphlpapi/dhcp.h diff --git a/reactos/dll/win32/iphlpapi/dhcp_reactos.c b/dll/win32/iphlpapi/dhcp_reactos.c similarity index 100% rename from reactos/dll/win32/iphlpapi/dhcp_reactos.c rename to dll/win32/iphlpapi/dhcp_reactos.c diff --git a/reactos/dll/win32/iphlpapi/ifenum.h b/dll/win32/iphlpapi/ifenum.h similarity index 100% rename from reactos/dll/win32/iphlpapi/ifenum.h rename to dll/win32/iphlpapi/ifenum.h diff --git a/reactos/dll/win32/iphlpapi/ifenum_reactos.c b/dll/win32/iphlpapi/ifenum_reactos.c similarity index 100% rename from reactos/dll/win32/iphlpapi/ifenum_reactos.c rename to dll/win32/iphlpapi/ifenum_reactos.c diff --git a/reactos/dll/win32/iphlpapi/iphlpapi.rbuild b/dll/win32/iphlpapi/iphlpapi.rbuild similarity index 100% rename from reactos/dll/win32/iphlpapi/iphlpapi.rbuild rename to dll/win32/iphlpapi/iphlpapi.rbuild diff --git a/reactos/dll/win32/iphlpapi/iphlpapi.rc b/dll/win32/iphlpapi/iphlpapi.rc similarity index 100% rename from reactos/dll/win32/iphlpapi/iphlpapi.rc rename to dll/win32/iphlpapi/iphlpapi.rc diff --git a/reactos/dll/win32/iphlpapi/iphlpapi.spec b/dll/win32/iphlpapi/iphlpapi.spec similarity index 100% rename from reactos/dll/win32/iphlpapi/iphlpapi.spec rename to dll/win32/iphlpapi/iphlpapi.spec diff --git a/reactos/dll/win32/iphlpapi/iphlpapi_main.c b/dll/win32/iphlpapi/iphlpapi_main.c similarity index 100% rename from reactos/dll/win32/iphlpapi/iphlpapi_main.c rename to dll/win32/iphlpapi/iphlpapi_main.c diff --git a/reactos/dll/win32/iphlpapi/iphlpapi_private.h b/dll/win32/iphlpapi/iphlpapi_private.h similarity index 100% rename from reactos/dll/win32/iphlpapi/iphlpapi_private.h rename to dll/win32/iphlpapi/iphlpapi_private.h diff --git a/reactos/dll/win32/iphlpapi/ipstats.h b/dll/win32/iphlpapi/ipstats.h similarity index 100% rename from reactos/dll/win32/iphlpapi/ipstats.h rename to dll/win32/iphlpapi/ipstats.h diff --git a/reactos/dll/win32/iphlpapi/ipstats_reactos.c b/dll/win32/iphlpapi/ipstats_reactos.c similarity index 100% rename from reactos/dll/win32/iphlpapi/ipstats_reactos.c rename to dll/win32/iphlpapi/ipstats_reactos.c diff --git a/reactos/dll/win32/iphlpapi/media.c b/dll/win32/iphlpapi/media.c similarity index 100% rename from reactos/dll/win32/iphlpapi/media.c rename to dll/win32/iphlpapi/media.c diff --git a/reactos/dll/win32/iphlpapi/merge-notes.txt b/dll/win32/iphlpapi/merge-notes.txt similarity index 100% rename from reactos/dll/win32/iphlpapi/merge-notes.txt rename to dll/win32/iphlpapi/merge-notes.txt diff --git a/reactos/dll/win32/iphlpapi/registry.c b/dll/win32/iphlpapi/registry.c similarity index 100% rename from reactos/dll/win32/iphlpapi/registry.c rename to dll/win32/iphlpapi/registry.c diff --git a/reactos/dll/win32/iphlpapi/resinfo.c b/dll/win32/iphlpapi/resinfo.c similarity index 100% rename from reactos/dll/win32/iphlpapi/resinfo.c rename to dll/win32/iphlpapi/resinfo.c diff --git a/reactos/dll/win32/iphlpapi/resinfo.h b/dll/win32/iphlpapi/resinfo.h similarity index 100% rename from reactos/dll/win32/iphlpapi/resinfo.h rename to dll/win32/iphlpapi/resinfo.h diff --git a/reactos/dll/win32/iphlpapi/resinfo_reactos.c b/dll/win32/iphlpapi/resinfo_reactos.c similarity index 100% rename from reactos/dll/win32/iphlpapi/resinfo_reactos.c rename to dll/win32/iphlpapi/resinfo_reactos.c diff --git a/reactos/dll/win32/iphlpapi/route.c b/dll/win32/iphlpapi/route.c similarity index 100% rename from reactos/dll/win32/iphlpapi/route.c rename to dll/win32/iphlpapi/route.c diff --git a/reactos/dll/win32/iphlpapi/route.h b/dll/win32/iphlpapi/route.h similarity index 100% rename from reactos/dll/win32/iphlpapi/route.h rename to dll/win32/iphlpapi/route.h diff --git a/reactos/dll/win32/iphlpapi/route_reactos.c b/dll/win32/iphlpapi/route_reactos.c similarity index 100% rename from reactos/dll/win32/iphlpapi/route_reactos.c rename to dll/win32/iphlpapi/route_reactos.c diff --git a/reactos/dll/win32/iprtprio/iprtprio.c b/dll/win32/iprtprio/iprtprio.c similarity index 100% rename from reactos/dll/win32/iprtprio/iprtprio.c rename to dll/win32/iprtprio/iprtprio.c diff --git a/reactos/dll/win32/iprtprio/iprtprio.def b/dll/win32/iprtprio/iprtprio.def similarity index 100% rename from reactos/dll/win32/iprtprio/iprtprio.def rename to dll/win32/iprtprio/iprtprio.def diff --git a/reactos/dll/win32/iprtprio/iprtprio.rc b/dll/win32/iprtprio/iprtprio.rc similarity index 100% rename from reactos/dll/win32/iprtprio/iprtprio.rc rename to dll/win32/iprtprio/iprtprio.rc diff --git a/reactos/dll/win32/itircl/CMakeLists.txt b/dll/win32/itircl/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/itircl/CMakeLists.txt rename to dll/win32/itircl/CMakeLists.txt diff --git a/reactos/dll/win32/itircl/itircl.rbuild b/dll/win32/itircl/itircl.rbuild similarity index 100% rename from reactos/dll/win32/itircl/itircl.rbuild rename to dll/win32/itircl/itircl.rbuild diff --git a/reactos/dll/win32/itircl/itircl.spec b/dll/win32/itircl/itircl.spec similarity index 100% rename from reactos/dll/win32/itircl/itircl.spec rename to dll/win32/itircl/itircl.spec diff --git a/reactos/dll/win32/itircl/itircl_main.c b/dll/win32/itircl/itircl_main.c similarity index 100% rename from reactos/dll/win32/itircl/itircl_main.c rename to dll/win32/itircl/itircl_main.c diff --git a/reactos/dll/win32/itss/CMakeLists.txt b/dll/win32/itss/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/itss/CMakeLists.txt rename to dll/win32/itss/CMakeLists.txt diff --git a/reactos/dll/win32/itss/chm_lib.c b/dll/win32/itss/chm_lib.c similarity index 100% rename from reactos/dll/win32/itss/chm_lib.c rename to dll/win32/itss/chm_lib.c diff --git a/reactos/dll/win32/itss/chm_lib.h b/dll/win32/itss/chm_lib.h similarity index 100% rename from reactos/dll/win32/itss/chm_lib.h rename to dll/win32/itss/chm_lib.h diff --git a/reactos/dll/win32/itss/itss.c b/dll/win32/itss/itss.c similarity index 100% rename from reactos/dll/win32/itss/itss.c rename to dll/win32/itss/itss.c diff --git a/reactos/dll/win32/itss/itss.inf b/dll/win32/itss/itss.inf similarity index 100% rename from reactos/dll/win32/itss/itss.inf rename to dll/win32/itss/itss.inf diff --git a/reactos/dll/win32/itss/itss.rbuild b/dll/win32/itss/itss.rbuild similarity index 100% rename from reactos/dll/win32/itss/itss.rbuild rename to dll/win32/itss/itss.rbuild diff --git a/reactos/dll/win32/itss/itss.spec b/dll/win32/itss/itss.spec similarity index 100% rename from reactos/dll/win32/itss/itss.spec rename to dll/win32/itss/itss.spec diff --git a/reactos/dll/win32/itss/itsstor.h b/dll/win32/itss/itsstor.h similarity index 100% rename from reactos/dll/win32/itss/itsstor.h rename to dll/win32/itss/itsstor.h diff --git a/reactos/dll/win32/itss/lzx.c b/dll/win32/itss/lzx.c similarity index 100% rename from reactos/dll/win32/itss/lzx.c rename to dll/win32/itss/lzx.c diff --git a/reactos/dll/win32/itss/lzx.h b/dll/win32/itss/lzx.h similarity index 100% rename from reactos/dll/win32/itss/lzx.h rename to dll/win32/itss/lzx.h diff --git a/reactos/dll/win32/itss/moniker.c b/dll/win32/itss/moniker.c similarity index 100% rename from reactos/dll/win32/itss/moniker.c rename to dll/win32/itss/moniker.c diff --git a/reactos/dll/win32/itss/protocol.c b/dll/win32/itss/protocol.c similarity index 100% rename from reactos/dll/win32/itss/protocol.c rename to dll/win32/itss/protocol.c diff --git a/reactos/dll/win32/itss/rsrc.rc b/dll/win32/itss/rsrc.rc similarity index 100% rename from reactos/dll/win32/itss/rsrc.rc rename to dll/win32/itss/rsrc.rc diff --git a/reactos/dll/win32/itss/storage.c b/dll/win32/itss/storage.c similarity index 100% rename from reactos/dll/win32/itss/storage.c rename to dll/win32/itss/storage.c diff --git a/reactos/dll/win32/jscript/CMakeLists.txt b/dll/win32/jscript/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/jscript/CMakeLists.txt rename to dll/win32/jscript/CMakeLists.txt diff --git a/reactos/dll/win32/jscript/activex.c b/dll/win32/jscript/activex.c similarity index 100% rename from reactos/dll/win32/jscript/activex.c rename to dll/win32/jscript/activex.c diff --git a/reactos/dll/win32/jscript/array.c b/dll/win32/jscript/array.c similarity index 100% rename from reactos/dll/win32/jscript/array.c rename to dll/win32/jscript/array.c diff --git a/reactos/dll/win32/jscript/bool.c b/dll/win32/jscript/bool.c similarity index 100% rename from reactos/dll/win32/jscript/bool.c rename to dll/win32/jscript/bool.c diff --git a/reactos/dll/win32/jscript/date.c b/dll/win32/jscript/date.c similarity index 100% rename from reactos/dll/win32/jscript/date.c rename to dll/win32/jscript/date.c diff --git a/reactos/dll/win32/jscript/dispex.c b/dll/win32/jscript/dispex.c similarity index 100% rename from reactos/dll/win32/jscript/dispex.c rename to dll/win32/jscript/dispex.c diff --git a/reactos/dll/win32/jscript/engine.c b/dll/win32/jscript/engine.c similarity index 100% rename from reactos/dll/win32/jscript/engine.c rename to dll/win32/jscript/engine.c diff --git a/reactos/dll/win32/jscript/engine.h b/dll/win32/jscript/engine.h similarity index 100% rename from reactos/dll/win32/jscript/engine.h rename to dll/win32/jscript/engine.h diff --git a/reactos/dll/win32/jscript/error.c b/dll/win32/jscript/error.c similarity index 100% rename from reactos/dll/win32/jscript/error.c rename to dll/win32/jscript/error.c diff --git a/reactos/dll/win32/jscript/function.c b/dll/win32/jscript/function.c similarity index 100% rename from reactos/dll/win32/jscript/function.c rename to dll/win32/jscript/function.c diff --git a/reactos/dll/win32/jscript/global.c b/dll/win32/jscript/global.c similarity index 100% rename from reactos/dll/win32/jscript/global.c rename to dll/win32/jscript/global.c diff --git a/reactos/dll/win32/jscript/jscript.c b/dll/win32/jscript/jscript.c similarity index 100% rename from reactos/dll/win32/jscript/jscript.c rename to dll/win32/jscript/jscript.c diff --git a/reactos/dll/win32/jscript/jscript.h b/dll/win32/jscript/jscript.h similarity index 100% rename from reactos/dll/win32/jscript/jscript.h rename to dll/win32/jscript/jscript.h diff --git a/reactos/dll/win32/jscript/jscript.inf b/dll/win32/jscript/jscript.inf similarity index 100% rename from reactos/dll/win32/jscript/jscript.inf rename to dll/win32/jscript/jscript.inf diff --git a/reactos/dll/win32/jscript/jscript.rbuild b/dll/win32/jscript/jscript.rbuild similarity index 100% rename from reactos/dll/win32/jscript/jscript.rbuild rename to dll/win32/jscript/jscript.rbuild diff --git a/reactos/dll/win32/jscript/jscript.spec b/dll/win32/jscript/jscript.spec similarity index 100% rename from reactos/dll/win32/jscript/jscript.spec rename to dll/win32/jscript/jscript.spec diff --git a/reactos/dll/win32/jscript/jscript_Da.rc b/dll/win32/jscript/jscript_Da.rc similarity index 100% rename from reactos/dll/win32/jscript/jscript_Da.rc rename to dll/win32/jscript/jscript_Da.rc diff --git a/reactos/dll/win32/jscript/jscript_De.rc b/dll/win32/jscript/jscript_De.rc similarity index 100% rename from reactos/dll/win32/jscript/jscript_De.rc rename to dll/win32/jscript/jscript_De.rc diff --git a/reactos/dll/win32/jscript/jscript_En.rc b/dll/win32/jscript/jscript_En.rc similarity index 100% rename from reactos/dll/win32/jscript/jscript_En.rc rename to dll/win32/jscript/jscript_En.rc diff --git a/reactos/dll/win32/jscript/jscript_Es.rc b/dll/win32/jscript/jscript_Es.rc similarity index 100% rename from reactos/dll/win32/jscript/jscript_Es.rc rename to dll/win32/jscript/jscript_Es.rc diff --git a/reactos/dll/win32/jscript/jscript_Fr.rc b/dll/win32/jscript/jscript_Fr.rc similarity index 100% rename from reactos/dll/win32/jscript/jscript_Fr.rc rename to dll/win32/jscript/jscript_Fr.rc diff --git a/reactos/dll/win32/jscript/jscript_Hu.rc b/dll/win32/jscript/jscript_Hu.rc similarity index 100% rename from reactos/dll/win32/jscript/jscript_Hu.rc rename to dll/win32/jscript/jscript_Hu.rc diff --git a/reactos/dll/win32/jscript/jscript_It.rc b/dll/win32/jscript/jscript_It.rc similarity index 100% rename from reactos/dll/win32/jscript/jscript_It.rc rename to dll/win32/jscript/jscript_It.rc diff --git a/reactos/dll/win32/jscript/jscript_Ja.rc b/dll/win32/jscript/jscript_Ja.rc similarity index 100% rename from reactos/dll/win32/jscript/jscript_Ja.rc rename to dll/win32/jscript/jscript_Ja.rc diff --git a/reactos/dll/win32/jscript/jscript_Ko.rc b/dll/win32/jscript/jscript_Ko.rc similarity index 100% rename from reactos/dll/win32/jscript/jscript_Ko.rc rename to dll/win32/jscript/jscript_Ko.rc diff --git a/reactos/dll/win32/jscript/jscript_Lt.rc b/dll/win32/jscript/jscript_Lt.rc similarity index 100% rename from reactos/dll/win32/jscript/jscript_Lt.rc rename to dll/win32/jscript/jscript_Lt.rc diff --git a/reactos/dll/win32/jscript/jscript_Nl.rc b/dll/win32/jscript/jscript_Nl.rc similarity index 100% rename from reactos/dll/win32/jscript/jscript_Nl.rc rename to dll/win32/jscript/jscript_Nl.rc diff --git a/reactos/dll/win32/jscript/jscript_No.rc b/dll/win32/jscript/jscript_No.rc similarity index 100% rename from reactos/dll/win32/jscript/jscript_No.rc rename to dll/win32/jscript/jscript_No.rc diff --git a/reactos/dll/win32/jscript/jscript_Pl.rc b/dll/win32/jscript/jscript_Pl.rc similarity index 100% rename from reactos/dll/win32/jscript/jscript_Pl.rc rename to dll/win32/jscript/jscript_Pl.rc diff --git a/reactos/dll/win32/jscript/jscript_Pt.rc b/dll/win32/jscript/jscript_Pt.rc similarity index 100% rename from reactos/dll/win32/jscript/jscript_Pt.rc rename to dll/win32/jscript/jscript_Pt.rc diff --git a/reactos/dll/win32/jscript/jscript_Ro.rc b/dll/win32/jscript/jscript_Ro.rc similarity index 100% rename from reactos/dll/win32/jscript/jscript_Ro.rc rename to dll/win32/jscript/jscript_Ro.rc diff --git a/reactos/dll/win32/jscript/jscript_Ru.rc b/dll/win32/jscript/jscript_Ru.rc similarity index 100% rename from reactos/dll/win32/jscript/jscript_Ru.rc rename to dll/win32/jscript/jscript_Ru.rc diff --git a/reactos/dll/win32/jscript/jscript_Si.rc b/dll/win32/jscript/jscript_Si.rc similarity index 100% rename from reactos/dll/win32/jscript/jscript_Si.rc rename to dll/win32/jscript/jscript_Si.rc diff --git a/reactos/dll/win32/jscript/jscript_Uk.rc b/dll/win32/jscript/jscript_Uk.rc similarity index 100% rename from reactos/dll/win32/jscript/jscript_Uk.rc rename to dll/win32/jscript/jscript_Uk.rc diff --git a/reactos/dll/win32/jscript/jscript_main.c b/dll/win32/jscript/jscript_main.c similarity index 100% rename from reactos/dll/win32/jscript/jscript_main.c rename to dll/win32/jscript/jscript_main.c diff --git a/reactos/dll/win32/jscript/jsglobal.idl b/dll/win32/jscript/jsglobal.idl similarity index 100% rename from reactos/dll/win32/jscript/jsglobal.idl rename to dll/win32/jscript/jsglobal.idl diff --git a/reactos/dll/win32/jscript/jsglobal_dispid.h b/dll/win32/jscript/jsglobal_dispid.h similarity index 100% rename from reactos/dll/win32/jscript/jsglobal_dispid.h rename to dll/win32/jscript/jsglobal_dispid.h diff --git a/reactos/dll/win32/jscript/jsutils.c b/dll/win32/jscript/jsutils.c similarity index 100% rename from reactos/dll/win32/jscript/jsutils.c rename to dll/win32/jscript/jsutils.c diff --git a/reactos/dll/win32/jscript/lex.c b/dll/win32/jscript/lex.c similarity index 100% rename from reactos/dll/win32/jscript/lex.c rename to dll/win32/jscript/lex.c diff --git a/reactos/dll/win32/jscript/math.c b/dll/win32/jscript/math.c similarity index 100% rename from reactos/dll/win32/jscript/math.c rename to dll/win32/jscript/math.c diff --git a/reactos/dll/win32/jscript/number.c b/dll/win32/jscript/number.c similarity index 100% rename from reactos/dll/win32/jscript/number.c rename to dll/win32/jscript/number.c diff --git a/reactos/dll/win32/jscript/object.c b/dll/win32/jscript/object.c similarity index 100% rename from reactos/dll/win32/jscript/object.c rename to dll/win32/jscript/object.c diff --git a/reactos/dll/win32/jscript/parser.tab.c b/dll/win32/jscript/parser.tab.c similarity index 100% rename from reactos/dll/win32/jscript/parser.tab.c rename to dll/win32/jscript/parser.tab.c diff --git a/reactos/dll/win32/jscript/parser.tab.h b/dll/win32/jscript/parser.tab.h similarity index 100% rename from reactos/dll/win32/jscript/parser.tab.h rename to dll/win32/jscript/parser.tab.h diff --git a/reactos/dll/win32/jscript/parser.y b/dll/win32/jscript/parser.y similarity index 100% rename from reactos/dll/win32/jscript/parser.y rename to dll/win32/jscript/parser.y diff --git a/reactos/dll/win32/jscript/regexp.c b/dll/win32/jscript/regexp.c similarity index 100% rename from reactos/dll/win32/jscript/regexp.c rename to dll/win32/jscript/regexp.c diff --git a/reactos/dll/win32/jscript/resource.h b/dll/win32/jscript/resource.h similarity index 100% rename from reactos/dll/win32/jscript/resource.h rename to dll/win32/jscript/resource.h diff --git a/reactos/dll/win32/jscript/rsrc.rc b/dll/win32/jscript/rsrc.rc similarity index 100% rename from reactos/dll/win32/jscript/rsrc.rc rename to dll/win32/jscript/rsrc.rc diff --git a/reactos/dll/win32/jscript/string.c b/dll/win32/jscript/string.c similarity index 100% rename from reactos/dll/win32/jscript/string.c rename to dll/win32/jscript/string.c diff --git a/reactos/dll/win32/kernel32/CMakeLists.txt b/dll/win32/kernel32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/kernel32/CMakeLists.txt rename to dll/win32/kernel32/CMakeLists.txt diff --git a/reactos/dll/win32/kernel32/client/amd64/fiber.S b/dll/win32/kernel32/client/amd64/fiber.S similarity index 100% rename from reactos/dll/win32/kernel32/client/amd64/fiber.S rename to dll/win32/kernel32/client/amd64/fiber.S diff --git a/reactos/dll/win32/kernel32/client/amd64/thread.S b/dll/win32/kernel32/client/amd64/thread.S similarity index 100% rename from reactos/dll/win32/kernel32/client/amd64/thread.S rename to dll/win32/kernel32/client/amd64/thread.S diff --git a/reactos/dll/win32/kernel32/client/appcache.c b/dll/win32/kernel32/client/appcache.c similarity index 100% rename from reactos/dll/win32/kernel32/client/appcache.c rename to dll/win32/kernel32/client/appcache.c diff --git a/reactos/dll/win32/kernel32/client/atom.c b/dll/win32/kernel32/client/atom.c similarity index 100% rename from reactos/dll/win32/kernel32/client/atom.c rename to dll/win32/kernel32/client/atom.c diff --git a/reactos/dll/win32/kernel32/client/compname.c b/dll/win32/kernel32/client/compname.c similarity index 100% rename from reactos/dll/win32/kernel32/client/compname.c rename to dll/win32/kernel32/client/compname.c diff --git a/reactos/dll/win32/kernel32/client/debugger.c b/dll/win32/kernel32/client/debugger.c similarity index 100% rename from reactos/dll/win32/kernel32/client/debugger.c rename to dll/win32/kernel32/client/debugger.c diff --git a/reactos/dll/win32/kernel32/client/dllmain.c b/dll/win32/kernel32/client/dllmain.c similarity index 100% rename from reactos/dll/win32/kernel32/client/dllmain.c rename to dll/win32/kernel32/client/dllmain.c diff --git a/reactos/dll/win32/kernel32/client/dosdev.c b/dll/win32/kernel32/client/dosdev.c similarity index 100% rename from reactos/dll/win32/kernel32/client/dosdev.c rename to dll/win32/kernel32/client/dosdev.c diff --git a/reactos/dll/win32/kernel32/client/environ.c b/dll/win32/kernel32/client/environ.c similarity index 100% rename from reactos/dll/win32/kernel32/client/environ.c rename to dll/win32/kernel32/client/environ.c diff --git a/reactos/dll/win32/kernel32/client/except.c b/dll/win32/kernel32/client/except.c similarity index 100% rename from reactos/dll/win32/kernel32/client/except.c rename to dll/win32/kernel32/client/except.c diff --git a/reactos/dll/win32/kernel32/client/fiber.c b/dll/win32/kernel32/client/fiber.c similarity index 100% rename from reactos/dll/win32/kernel32/client/fiber.c rename to dll/win32/kernel32/client/fiber.c diff --git a/reactos/dll/win32/kernel32/client/file/backup.c b/dll/win32/kernel32/client/file/backup.c similarity index 100% rename from reactos/dll/win32/kernel32/client/file/backup.c rename to dll/win32/kernel32/client/file/backup.c diff --git a/reactos/dll/win32/kernel32/client/file/cnotify.c b/dll/win32/kernel32/client/file/cnotify.c similarity index 100% rename from reactos/dll/win32/kernel32/client/file/cnotify.c rename to dll/win32/kernel32/client/file/cnotify.c diff --git a/reactos/dll/win32/kernel32/client/file/console.c b/dll/win32/kernel32/client/file/console.c similarity index 100% rename from reactos/dll/win32/kernel32/client/file/console.c rename to dll/win32/kernel32/client/file/console.c diff --git a/reactos/dll/win32/kernel32/client/file/copy.c b/dll/win32/kernel32/client/file/copy.c similarity index 100% rename from reactos/dll/win32/kernel32/client/file/copy.c rename to dll/win32/kernel32/client/file/copy.c diff --git a/reactos/dll/win32/kernel32/client/file/create.c b/dll/win32/kernel32/client/file/create.c similarity index 100% rename from reactos/dll/win32/kernel32/client/file/create.c rename to dll/win32/kernel32/client/file/create.c diff --git a/reactos/dll/win32/kernel32/client/file/delete.c b/dll/win32/kernel32/client/file/delete.c similarity index 100% rename from reactos/dll/win32/kernel32/client/file/delete.c rename to dll/win32/kernel32/client/file/delete.c diff --git a/reactos/dll/win32/kernel32/client/file/deviceio.c b/dll/win32/kernel32/client/file/deviceio.c similarity index 100% rename from reactos/dll/win32/kernel32/client/file/deviceio.c rename to dll/win32/kernel32/client/file/deviceio.c diff --git a/reactos/dll/win32/kernel32/client/file/dir.c b/dll/win32/kernel32/client/file/dir.c similarity index 100% rename from reactos/dll/win32/kernel32/client/file/dir.c rename to dll/win32/kernel32/client/file/dir.c diff --git a/reactos/dll/win32/kernel32/client/file/fileinfo.c b/dll/win32/kernel32/client/file/fileinfo.c similarity index 100% rename from reactos/dll/win32/kernel32/client/file/fileinfo.c rename to dll/win32/kernel32/client/file/fileinfo.c diff --git a/reactos/dll/win32/kernel32/client/file/filemap.c b/dll/win32/kernel32/client/file/filemap.c similarity index 100% rename from reactos/dll/win32/kernel32/client/file/filemap.c rename to dll/win32/kernel32/client/file/filemap.c diff --git a/reactos/dll/win32/kernel32/client/file/filename.c b/dll/win32/kernel32/client/file/filename.c similarity index 100% rename from reactos/dll/win32/kernel32/client/file/filename.c rename to dll/win32/kernel32/client/file/filename.c diff --git a/reactos/dll/win32/kernel32/client/file/find.c b/dll/win32/kernel32/client/file/find.c similarity index 100% rename from reactos/dll/win32/kernel32/client/file/find.c rename to dll/win32/kernel32/client/file/find.c diff --git a/reactos/dll/win32/kernel32/client/file/hardlink.c b/dll/win32/kernel32/client/file/hardlink.c similarity index 100% rename from reactos/dll/win32/kernel32/client/file/hardlink.c rename to dll/win32/kernel32/client/file/hardlink.c diff --git a/reactos/dll/win32/kernel32/client/file/iocompl.c b/dll/win32/kernel32/client/file/iocompl.c similarity index 100% rename from reactos/dll/win32/kernel32/client/file/iocompl.c rename to dll/win32/kernel32/client/file/iocompl.c diff --git a/reactos/dll/win32/kernel32/client/file/lfile.c b/dll/win32/kernel32/client/file/lfile.c similarity index 100% rename from reactos/dll/win32/kernel32/client/file/lfile.c rename to dll/win32/kernel32/client/file/lfile.c diff --git a/reactos/dll/win32/kernel32/client/file/lock.c b/dll/win32/kernel32/client/file/lock.c similarity index 100% rename from reactos/dll/win32/kernel32/client/file/lock.c rename to dll/win32/kernel32/client/file/lock.c diff --git a/reactos/dll/win32/kernel32/client/file/mailslot.c b/dll/win32/kernel32/client/file/mailslot.c similarity index 100% rename from reactos/dll/win32/kernel32/client/file/mailslot.c rename to dll/win32/kernel32/client/file/mailslot.c diff --git a/reactos/dll/win32/kernel32/client/file/move.c b/dll/win32/kernel32/client/file/move.c similarity index 100% rename from reactos/dll/win32/kernel32/client/file/move.c rename to dll/win32/kernel32/client/file/move.c diff --git a/reactos/dll/win32/kernel32/client/file/npipe.c b/dll/win32/kernel32/client/file/npipe.c similarity index 100% rename from reactos/dll/win32/kernel32/client/file/npipe.c rename to dll/win32/kernel32/client/file/npipe.c diff --git a/reactos/dll/win32/kernel32/client/file/rw.c b/dll/win32/kernel32/client/file/rw.c similarity index 100% rename from reactos/dll/win32/kernel32/client/file/rw.c rename to dll/win32/kernel32/client/file/rw.c diff --git a/reactos/dll/win32/kernel32/client/file/tape.c b/dll/win32/kernel32/client/file/tape.c similarity index 100% rename from reactos/dll/win32/kernel32/client/file/tape.c rename to dll/win32/kernel32/client/file/tape.c diff --git a/reactos/dll/win32/kernel32/client/file/volume.c b/dll/win32/kernel32/client/file/volume.c similarity index 100% rename from reactos/dll/win32/kernel32/client/file/volume.c rename to dll/win32/kernel32/client/file/volume.c diff --git a/reactos/dll/win32/kernel32/client/handle.c b/dll/win32/kernel32/client/handle.c similarity index 100% rename from reactos/dll/win32/kernel32/client/handle.c rename to dll/win32/kernel32/client/handle.c diff --git a/reactos/dll/win32/kernel32/client/heapmem.c b/dll/win32/kernel32/client/heapmem.c similarity index 100% rename from reactos/dll/win32/kernel32/client/heapmem.c rename to dll/win32/kernel32/client/heapmem.c diff --git a/reactos/dll/win32/kernel32/client/i386/fiber.S b/dll/win32/kernel32/client/i386/fiber.S similarity index 100% rename from reactos/dll/win32/kernel32/client/i386/fiber.S rename to dll/win32/kernel32/client/i386/fiber.S diff --git a/reactos/dll/win32/kernel32/client/i386/thread.S b/dll/win32/kernel32/client/i386/thread.S similarity index 100% rename from reactos/dll/win32/kernel32/client/i386/thread.S rename to dll/win32/kernel32/client/i386/thread.S diff --git a/reactos/dll/win32/kernel32/client/job.c b/dll/win32/kernel32/client/job.c similarity index 100% rename from reactos/dll/win32/kernel32/client/job.c rename to dll/win32/kernel32/client/job.c diff --git a/reactos/dll/win32/kernel32/client/loader.c b/dll/win32/kernel32/client/loader.c similarity index 100% rename from reactos/dll/win32/kernel32/client/loader.c rename to dll/win32/kernel32/client/loader.c diff --git a/reactos/dll/win32/kernel32/client/path.c b/dll/win32/kernel32/client/path.c similarity index 100% rename from reactos/dll/win32/kernel32/client/path.c rename to dll/win32/kernel32/client/path.c diff --git a/reactos/dll/win32/kernel32/client/perfcnt.c b/dll/win32/kernel32/client/perfcnt.c similarity index 100% rename from reactos/dll/win32/kernel32/client/perfcnt.c rename to dll/win32/kernel32/client/perfcnt.c diff --git a/reactos/dll/win32/kernel32/client/power.c b/dll/win32/kernel32/client/power.c similarity index 100% rename from reactos/dll/win32/kernel32/client/power.c rename to dll/win32/kernel32/client/power.c diff --git a/reactos/dll/win32/kernel32/client/proc.c b/dll/win32/kernel32/client/proc.c similarity index 100% rename from reactos/dll/win32/kernel32/client/proc.c rename to dll/win32/kernel32/client/proc.c diff --git a/reactos/dll/win32/kernel32/client/resntfy.c b/dll/win32/kernel32/client/resntfy.c similarity index 100% rename from reactos/dll/win32/kernel32/client/resntfy.c rename to dll/win32/kernel32/client/resntfy.c diff --git a/reactos/dll/win32/kernel32/client/session.c b/dll/win32/kernel32/client/session.c similarity index 100% rename from reactos/dll/win32/kernel32/client/session.c rename to dll/win32/kernel32/client/session.c diff --git a/reactos/dll/win32/kernel32/client/synch.c b/dll/win32/kernel32/client/synch.c similarity index 100% rename from reactos/dll/win32/kernel32/client/synch.c rename to dll/win32/kernel32/client/synch.c diff --git a/reactos/dll/win32/kernel32/client/sysinfo.c b/dll/win32/kernel32/client/sysinfo.c similarity index 100% rename from reactos/dll/win32/kernel32/client/sysinfo.c rename to dll/win32/kernel32/client/sysinfo.c diff --git a/reactos/dll/win32/kernel32/client/thread.c b/dll/win32/kernel32/client/thread.c similarity index 100% rename from reactos/dll/win32/kernel32/client/thread.c rename to dll/win32/kernel32/client/thread.c diff --git a/reactos/dll/win32/kernel32/client/time.c b/dll/win32/kernel32/client/time.c similarity index 100% rename from reactos/dll/win32/kernel32/client/time.c rename to dll/win32/kernel32/client/time.c diff --git a/reactos/dll/win32/kernel32/client/timerqueue.c b/dll/win32/kernel32/client/timerqueue.c similarity index 100% rename from reactos/dll/win32/kernel32/client/timerqueue.c rename to dll/win32/kernel32/client/timerqueue.c diff --git a/reactos/dll/win32/kernel32/client/toolhelp.c b/dll/win32/kernel32/client/toolhelp.c similarity index 100% rename from reactos/dll/win32/kernel32/client/toolhelp.c rename to dll/win32/kernel32/client/toolhelp.c diff --git a/reactos/dll/win32/kernel32/client/utils.c b/dll/win32/kernel32/client/utils.c similarity index 100% rename from reactos/dll/win32/kernel32/client/utils.c rename to dll/win32/kernel32/client/utils.c diff --git a/reactos/dll/win32/kernel32/client/vdm.c b/dll/win32/kernel32/client/vdm.c similarity index 100% rename from reactos/dll/win32/kernel32/client/vdm.c rename to dll/win32/kernel32/client/vdm.c diff --git a/reactos/dll/win32/kernel32/client/version.c b/dll/win32/kernel32/client/version.c similarity index 100% rename from reactos/dll/win32/kernel32/client/version.c rename to dll/win32/kernel32/client/version.c diff --git a/reactos/dll/win32/kernel32/client/virtmem.c b/dll/win32/kernel32/client/virtmem.c similarity index 100% rename from reactos/dll/win32/kernel32/client/virtmem.c rename to dll/win32/kernel32/client/virtmem.c diff --git a/reactos/dll/win32/kernel32/client/vista.c b/dll/win32/kernel32/client/vista.c similarity index 100% rename from reactos/dll/win32/kernel32/client/vista.c rename to dll/win32/kernel32/client/vista.c diff --git a/reactos/dll/win32/kernel32/include/base_x.h b/dll/win32/kernel32/include/base_x.h similarity index 100% rename from reactos/dll/win32/kernel32/include/base_x.h rename to dll/win32/kernel32/include/base_x.h diff --git a/reactos/dll/win32/kernel32/include/baseheap.h b/dll/win32/kernel32/include/baseheap.h similarity index 100% rename from reactos/dll/win32/kernel32/include/baseheap.h rename to dll/win32/kernel32/include/baseheap.h diff --git a/reactos/dll/win32/kernel32/include/kernel32.h b/dll/win32/kernel32/include/kernel32.h similarity index 100% rename from reactos/dll/win32/kernel32/include/kernel32.h rename to dll/win32/kernel32/include/kernel32.h diff --git a/reactos/dll/win32/kernel32/k32.h b/dll/win32/kernel32/k32.h similarity index 100% rename from reactos/dll/win32/kernel32/k32.h rename to dll/win32/kernel32/k32.h diff --git a/reactos/dll/win32/kernel32/kernel32.pspec b/dll/win32/kernel32/kernel32.pspec similarity index 100% rename from reactos/dll/win32/kernel32/kernel32.pspec rename to dll/win32/kernel32/kernel32.pspec diff --git a/reactos/dll/win32/kernel32/kernel32.rbuild b/dll/win32/kernel32/kernel32.rbuild similarity index 100% rename from reactos/dll/win32/kernel32/kernel32.rbuild rename to dll/win32/kernel32/kernel32.rbuild diff --git a/reactos/dll/win32/kernel32/kernel32.rc b/dll/win32/kernel32/kernel32.rc similarity index 100% rename from reactos/dll/win32/kernel32/kernel32.rc rename to dll/win32/kernel32/kernel32.rc diff --git a/reactos/dll/win32/kernel32/kernel32.spec b/dll/win32/kernel32/kernel32.spec similarity index 100% rename from reactos/dll/win32/kernel32/kernel32.spec rename to dll/win32/kernel32/kernel32.spec diff --git a/reactos/dll/win32/kernel32/wine/actctx.c b/dll/win32/kernel32/wine/actctx.c similarity index 100% rename from reactos/dll/win32/kernel32/wine/actctx.c rename to dll/win32/kernel32/wine/actctx.c diff --git a/reactos/dll/win32/kernel32/wine/comm.c b/dll/win32/kernel32/wine/comm.c similarity index 100% rename from reactos/dll/win32/kernel32/wine/comm.c rename to dll/win32/kernel32/wine/comm.c diff --git a/reactos/dll/win32/kernel32/wine/lzexpand.c b/dll/win32/kernel32/wine/lzexpand.c similarity index 100% rename from reactos/dll/win32/kernel32/wine/lzexpand.c rename to dll/win32/kernel32/wine/lzexpand.c diff --git a/reactos/dll/win32/kernel32/wine/muldiv.c b/dll/win32/kernel32/wine/muldiv.c similarity index 100% rename from reactos/dll/win32/kernel32/wine/muldiv.c rename to dll/win32/kernel32/wine/muldiv.c diff --git a/reactos/dll/win32/kernel32/wine/profile.c b/dll/win32/kernel32/wine/profile.c similarity index 100% rename from reactos/dll/win32/kernel32/wine/profile.c rename to dll/win32/kernel32/wine/profile.c diff --git a/reactos/dll/win32/kernel32/wine/res.c b/dll/win32/kernel32/wine/res.c similarity index 100% rename from reactos/dll/win32/kernel32/wine/res.c rename to dll/win32/kernel32/wine/res.c diff --git a/reactos/dll/win32/kernel32/wine/timezone.c b/dll/win32/kernel32/wine/timezone.c similarity index 100% rename from reactos/dll/win32/kernel32/wine/timezone.c rename to dll/win32/kernel32/wine/timezone.c diff --git a/reactos/dll/win32/kernel32/winnls/lang/bg-BG.mc b/dll/win32/kernel32/winnls/lang/bg-BG.mc similarity index 100% rename from reactos/dll/win32/kernel32/winnls/lang/bg-BG.mc rename to dll/win32/kernel32/winnls/lang/bg-BG.mc diff --git a/reactos/dll/win32/kernel32/winnls/lang/de-DE.mc b/dll/win32/kernel32/winnls/lang/de-DE.mc similarity index 100% rename from reactos/dll/win32/kernel32/winnls/lang/de-DE.mc rename to dll/win32/kernel32/winnls/lang/de-DE.mc diff --git a/reactos/dll/win32/kernel32/winnls/lang/de-DE.rc b/dll/win32/kernel32/winnls/lang/de-DE.rc similarity index 100% rename from reactos/dll/win32/kernel32/winnls/lang/de-DE.rc rename to dll/win32/kernel32/winnls/lang/de-DE.rc diff --git a/reactos/dll/win32/kernel32/winnls/lang/en-US.rc b/dll/win32/kernel32/winnls/lang/en-US.rc similarity index 100% rename from reactos/dll/win32/kernel32/winnls/lang/en-US.rc rename to dll/win32/kernel32/winnls/lang/en-US.rc diff --git a/reactos/dll/win32/kernel32/winnls/lang/es-ES.rc b/dll/win32/kernel32/winnls/lang/es-ES.rc similarity index 100% rename from reactos/dll/win32/kernel32/winnls/lang/es-ES.rc rename to dll/win32/kernel32/winnls/lang/es-ES.rc diff --git a/reactos/dll/win32/kernel32/winnls/lang/pl-PL.mc b/dll/win32/kernel32/winnls/lang/pl-PL.mc similarity index 100% rename from reactos/dll/win32/kernel32/winnls/lang/pl-PL.mc rename to dll/win32/kernel32/winnls/lang/pl-PL.mc diff --git a/reactos/dll/win32/kernel32/winnls/lang/ro-RO.rc b/dll/win32/kernel32/winnls/lang/ro-RO.rc similarity index 100% rename from reactos/dll/win32/kernel32/winnls/lang/ro-RO.rc rename to dll/win32/kernel32/winnls/lang/ro-RO.rc diff --git a/reactos/dll/win32/kernel32/winnls/lang/ru-RU.mc b/dll/win32/kernel32/winnls/lang/ru-RU.mc similarity index 100% rename from reactos/dll/win32/kernel32/winnls/lang/ru-RU.mc rename to dll/win32/kernel32/winnls/lang/ru-RU.mc diff --git a/reactos/dll/win32/kernel32/winnls/lang/ru-RU.rc b/dll/win32/kernel32/winnls/lang/ru-RU.rc similarity index 100% rename from reactos/dll/win32/kernel32/winnls/lang/ru-RU.rc rename to dll/win32/kernel32/winnls/lang/ru-RU.rc diff --git a/reactos/dll/win32/kernel32/winnls/lang/uk-UA.rc b/dll/win32/kernel32/winnls/lang/uk-UA.rc similarity index 100% rename from reactos/dll/win32/kernel32/winnls/lang/uk-UA.rc rename to dll/win32/kernel32/winnls/lang/uk-UA.rc diff --git a/reactos/dll/win32/kernel32/winnls/locale_rc.rc b/dll/win32/kernel32/winnls/locale_rc.rc similarity index 100% rename from reactos/dll/win32/kernel32/winnls/locale_rc.rc rename to dll/win32/kernel32/winnls/locale_rc.rc diff --git a/reactos/dll/win32/kernel32/winnls/nls/afk.nls b/dll/win32/kernel32/winnls/nls/afk.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/afk.nls rename to dll/win32/kernel32/winnls/nls/afk.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/ara.nls b/dll/win32/kernel32/winnls/nls/ara.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/ara.nls rename to dll/win32/kernel32/winnls/nls/ara.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/arb.nls b/dll/win32/kernel32/winnls/nls/arb.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/arb.nls rename to dll/win32/kernel32/winnls/nls/arb.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/are.nls b/dll/win32/kernel32/winnls/nls/are.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/are.nls rename to dll/win32/kernel32/winnls/nls/are.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/arg.nls b/dll/win32/kernel32/winnls/nls/arg.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/arg.nls rename to dll/win32/kernel32/winnls/nls/arg.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/arh.nls b/dll/win32/kernel32/winnls/nls/arh.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/arh.nls rename to dll/win32/kernel32/winnls/nls/arh.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/ari.nls b/dll/win32/kernel32/winnls/nls/ari.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/ari.nls rename to dll/win32/kernel32/winnls/nls/ari.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/arj.nls b/dll/win32/kernel32/winnls/nls/arj.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/arj.nls rename to dll/win32/kernel32/winnls/nls/arj.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/ark.nls b/dll/win32/kernel32/winnls/nls/ark.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/ark.nls rename to dll/win32/kernel32/winnls/nls/ark.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/arl.nls b/dll/win32/kernel32/winnls/nls/arl.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/arl.nls rename to dll/win32/kernel32/winnls/nls/arl.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/arm.nls b/dll/win32/kernel32/winnls/nls/arm.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/arm.nls rename to dll/win32/kernel32/winnls/nls/arm.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/aro.nls b/dll/win32/kernel32/winnls/nls/aro.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/aro.nls rename to dll/win32/kernel32/winnls/nls/aro.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/arq.nls b/dll/win32/kernel32/winnls/nls/arq.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/arq.nls rename to dll/win32/kernel32/winnls/nls/arq.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/ars.nls b/dll/win32/kernel32/winnls/nls/ars.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/ars.nls rename to dll/win32/kernel32/winnls/nls/ars.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/art.nls b/dll/win32/kernel32/winnls/nls/art.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/art.nls rename to dll/win32/kernel32/winnls/nls/art.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/aru.nls b/dll/win32/kernel32/winnls/nls/aru.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/aru.nls rename to dll/win32/kernel32/winnls/nls/aru.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/ary.nls b/dll/win32/kernel32/winnls/nls/ary.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/ary.nls rename to dll/win32/kernel32/winnls/nls/ary.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/aze.nls b/dll/win32/kernel32/winnls/nls/aze.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/aze.nls rename to dll/win32/kernel32/winnls/nls/aze.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/azl.nls b/dll/win32/kernel32/winnls/nls/azl.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/azl.nls rename to dll/win32/kernel32/winnls/nls/azl.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/bel.nls b/dll/win32/kernel32/winnls/nls/bel.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/bel.nls rename to dll/win32/kernel32/winnls/nls/bel.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/bgr.nls b/dll/win32/kernel32/winnls/nls/bgr.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/bgr.nls rename to dll/win32/kernel32/winnls/nls/bgr.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/brf.nls b/dll/win32/kernel32/winnls/nls/brf.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/brf.nls rename to dll/win32/kernel32/winnls/nls/brf.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/cat.nls b/dll/win32/kernel32/winnls/nls/cat.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/cat.nls rename to dll/win32/kernel32/winnls/nls/cat.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/chs.nls b/dll/win32/kernel32/winnls/nls/chs.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/chs.nls rename to dll/win32/kernel32/winnls/nls/chs.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/cht.nls b/dll/win32/kernel32/winnls/nls/cht.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/cht.nls rename to dll/win32/kernel32/winnls/nls/cht.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/csy.nls b/dll/win32/kernel32/winnls/nls/csy.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/csy.nls rename to dll/win32/kernel32/winnls/nls/csy.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/cym.nls b/dll/win32/kernel32/winnls/nls/cym.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/cym.nls rename to dll/win32/kernel32/winnls/nls/cym.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/dan.nls b/dll/win32/kernel32/winnls/nls/dan.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/dan.nls rename to dll/win32/kernel32/winnls/nls/dan.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/dea.nls b/dll/win32/kernel32/winnls/nls/dea.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/dea.nls rename to dll/win32/kernel32/winnls/nls/dea.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/dec.nls b/dll/win32/kernel32/winnls/nls/dec.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/dec.nls rename to dll/win32/kernel32/winnls/nls/dec.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/del.nls b/dll/win32/kernel32/winnls/nls/del.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/del.nls rename to dll/win32/kernel32/winnls/nls/del.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/des.nls b/dll/win32/kernel32/winnls/nls/des.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/des.nls rename to dll/win32/kernel32/winnls/nls/des.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/deu.nls b/dll/win32/kernel32/winnls/nls/deu.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/deu.nls rename to dll/win32/kernel32/winnls/nls/deu.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/div.nls b/dll/win32/kernel32/winnls/nls/div.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/div.nls rename to dll/win32/kernel32/winnls/nls/div.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/ell.nls b/dll/win32/kernel32/winnls/nls/ell.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/ell.nls rename to dll/win32/kernel32/winnls/nls/ell.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/ena.nls b/dll/win32/kernel32/winnls/nls/ena.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/ena.nls rename to dll/win32/kernel32/winnls/nls/ena.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/enb.nls b/dll/win32/kernel32/winnls/nls/enb.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/enb.nls rename to dll/win32/kernel32/winnls/nls/enb.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/enc.nls b/dll/win32/kernel32/winnls/nls/enc.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/enc.nls rename to dll/win32/kernel32/winnls/nls/enc.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/eng.nls b/dll/win32/kernel32/winnls/nls/eng.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/eng.nls rename to dll/win32/kernel32/winnls/nls/eng.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/eni.nls b/dll/win32/kernel32/winnls/nls/eni.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/eni.nls rename to dll/win32/kernel32/winnls/nls/eni.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/enj.nls b/dll/win32/kernel32/winnls/nls/enj.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/enj.nls rename to dll/win32/kernel32/winnls/nls/enj.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/enl.nls b/dll/win32/kernel32/winnls/nls/enl.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/enl.nls rename to dll/win32/kernel32/winnls/nls/enl.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/enp.nls b/dll/win32/kernel32/winnls/nls/enp.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/enp.nls rename to dll/win32/kernel32/winnls/nls/enp.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/ens.nls b/dll/win32/kernel32/winnls/nls/ens.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/ens.nls rename to dll/win32/kernel32/winnls/nls/ens.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/ent.nls b/dll/win32/kernel32/winnls/nls/ent.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/ent.nls rename to dll/win32/kernel32/winnls/nls/ent.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/enu.nls b/dll/win32/kernel32/winnls/nls/enu.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/enu.nls rename to dll/win32/kernel32/winnls/nls/enu.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/enw.nls b/dll/win32/kernel32/winnls/nls/enw.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/enw.nls rename to dll/win32/kernel32/winnls/nls/enw.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/enz.nls b/dll/win32/kernel32/winnls/nls/enz.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/enz.nls rename to dll/win32/kernel32/winnls/nls/enz.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/esa.nls b/dll/win32/kernel32/winnls/nls/esa.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/esa.nls rename to dll/win32/kernel32/winnls/nls/esa.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/esb.nls b/dll/win32/kernel32/winnls/nls/esb.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/esb.nls rename to dll/win32/kernel32/winnls/nls/esb.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/esc.nls b/dll/win32/kernel32/winnls/nls/esc.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/esc.nls rename to dll/win32/kernel32/winnls/nls/esc.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/esd.nls b/dll/win32/kernel32/winnls/nls/esd.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/esd.nls rename to dll/win32/kernel32/winnls/nls/esd.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/ese.nls b/dll/win32/kernel32/winnls/nls/ese.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/ese.nls rename to dll/win32/kernel32/winnls/nls/ese.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/esf.nls b/dll/win32/kernel32/winnls/nls/esf.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/esf.nls rename to dll/win32/kernel32/winnls/nls/esf.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/esg.nls b/dll/win32/kernel32/winnls/nls/esg.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/esg.nls rename to dll/win32/kernel32/winnls/nls/esg.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/esh.nls b/dll/win32/kernel32/winnls/nls/esh.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/esh.nls rename to dll/win32/kernel32/winnls/nls/esh.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/esi.nls b/dll/win32/kernel32/winnls/nls/esi.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/esi.nls rename to dll/win32/kernel32/winnls/nls/esi.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/esl.nls b/dll/win32/kernel32/winnls/nls/esl.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/esl.nls rename to dll/win32/kernel32/winnls/nls/esl.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/esm.nls b/dll/win32/kernel32/winnls/nls/esm.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/esm.nls rename to dll/win32/kernel32/winnls/nls/esm.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/esn.nls b/dll/win32/kernel32/winnls/nls/esn.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/esn.nls rename to dll/win32/kernel32/winnls/nls/esn.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/eso.nls b/dll/win32/kernel32/winnls/nls/eso.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/eso.nls rename to dll/win32/kernel32/winnls/nls/eso.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/esp.nls b/dll/win32/kernel32/winnls/nls/esp.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/esp.nls rename to dll/win32/kernel32/winnls/nls/esp.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/esr.nls b/dll/win32/kernel32/winnls/nls/esr.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/esr.nls rename to dll/win32/kernel32/winnls/nls/esr.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/ess.nls b/dll/win32/kernel32/winnls/nls/ess.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/ess.nls rename to dll/win32/kernel32/winnls/nls/ess.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/esu.nls b/dll/win32/kernel32/winnls/nls/esu.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/esu.nls rename to dll/win32/kernel32/winnls/nls/esu.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/esv.nls b/dll/win32/kernel32/winnls/nls/esv.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/esv.nls rename to dll/win32/kernel32/winnls/nls/esv.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/esy.nls b/dll/win32/kernel32/winnls/nls/esy.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/esy.nls rename to dll/win32/kernel32/winnls/nls/esy.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/esz.nls b/dll/win32/kernel32/winnls/nls/esz.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/esz.nls rename to dll/win32/kernel32/winnls/nls/esz.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/eti.nls b/dll/win32/kernel32/winnls/nls/eti.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/eti.nls rename to dll/win32/kernel32/winnls/nls/eti.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/euq.nls b/dll/win32/kernel32/winnls/nls/euq.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/euq.nls rename to dll/win32/kernel32/winnls/nls/euq.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/far.nls b/dll/win32/kernel32/winnls/nls/far.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/far.nls rename to dll/win32/kernel32/winnls/nls/far.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/fin.nls b/dll/win32/kernel32/winnls/nls/fin.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/fin.nls rename to dll/win32/kernel32/winnls/nls/fin.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/fos.nls b/dll/win32/kernel32/winnls/nls/fos.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/fos.nls rename to dll/win32/kernel32/winnls/nls/fos.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/fra.nls b/dll/win32/kernel32/winnls/nls/fra.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/fra.nls rename to dll/win32/kernel32/winnls/nls/fra.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/frb.nls b/dll/win32/kernel32/winnls/nls/frb.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/frb.nls rename to dll/win32/kernel32/winnls/nls/frb.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/frc.nls b/dll/win32/kernel32/winnls/nls/frc.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/frc.nls rename to dll/win32/kernel32/winnls/nls/frc.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/frl.nls b/dll/win32/kernel32/winnls/nls/frl.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/frl.nls rename to dll/win32/kernel32/winnls/nls/frl.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/frm.nls b/dll/win32/kernel32/winnls/nls/frm.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/frm.nls rename to dll/win32/kernel32/winnls/nls/frm.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/frs.nls b/dll/win32/kernel32/winnls/nls/frs.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/frs.nls rename to dll/win32/kernel32/winnls/nls/frs.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/glc.nls b/dll/win32/kernel32/winnls/nls/glc.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/glc.nls rename to dll/win32/kernel32/winnls/nls/glc.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/guj.nls b/dll/win32/kernel32/winnls/nls/guj.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/guj.nls rename to dll/win32/kernel32/winnls/nls/guj.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/heb.nls b/dll/win32/kernel32/winnls/nls/heb.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/heb.nls rename to dll/win32/kernel32/winnls/nls/heb.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/hin.nls b/dll/win32/kernel32/winnls/nls/hin.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/hin.nls rename to dll/win32/kernel32/winnls/nls/hin.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/hrv.nls b/dll/win32/kernel32/winnls/nls/hrv.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/hrv.nls rename to dll/win32/kernel32/winnls/nls/hrv.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/hun.nls b/dll/win32/kernel32/winnls/nls/hun.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/hun.nls rename to dll/win32/kernel32/winnls/nls/hun.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/hye.nls b/dll/win32/kernel32/winnls/nls/hye.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/hye.nls rename to dll/win32/kernel32/winnls/nls/hye.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/ind.nls b/dll/win32/kernel32/winnls/nls/ind.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/ind.nls rename to dll/win32/kernel32/winnls/nls/ind.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/isl.nls b/dll/win32/kernel32/winnls/nls/isl.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/isl.nls rename to dll/win32/kernel32/winnls/nls/isl.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/ita.nls b/dll/win32/kernel32/winnls/nls/ita.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/ita.nls rename to dll/win32/kernel32/winnls/nls/ita.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/its.nls b/dll/win32/kernel32/winnls/nls/its.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/its.nls rename to dll/win32/kernel32/winnls/nls/its.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/jpn.nls b/dll/win32/kernel32/winnls/nls/jpn.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/jpn.nls rename to dll/win32/kernel32/winnls/nls/jpn.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/kan.nls b/dll/win32/kernel32/winnls/nls/kan.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/kan.nls rename to dll/win32/kernel32/winnls/nls/kan.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/kat.nls b/dll/win32/kernel32/winnls/nls/kat.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/kat.nls rename to dll/win32/kernel32/winnls/nls/kat.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/kkz.nls b/dll/win32/kernel32/winnls/nls/kkz.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/kkz.nls rename to dll/win32/kernel32/winnls/nls/kkz.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/knk.nls b/dll/win32/kernel32/winnls/nls/knk.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/knk.nls rename to dll/win32/kernel32/winnls/nls/knk.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/kor.nls b/dll/win32/kernel32/winnls/nls/kor.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/kor.nls rename to dll/win32/kernel32/winnls/nls/kor.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/kyr.nls b/dll/win32/kernel32/winnls/nls/kyr.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/kyr.nls rename to dll/win32/kernel32/winnls/nls/kyr.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/lth.nls b/dll/win32/kernel32/winnls/nls/lth.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/lth.nls rename to dll/win32/kernel32/winnls/nls/lth.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/lvi.nls b/dll/win32/kernel32/winnls/nls/lvi.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/lvi.nls rename to dll/win32/kernel32/winnls/nls/lvi.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/mar.nls b/dll/win32/kernel32/winnls/nls/mar.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/mar.nls rename to dll/win32/kernel32/winnls/nls/mar.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/mki.nls b/dll/win32/kernel32/winnls/nls/mki.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/mki.nls rename to dll/win32/kernel32/winnls/nls/mki.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/mon.nls b/dll/win32/kernel32/winnls/nls/mon.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/mon.nls rename to dll/win32/kernel32/winnls/nls/mon.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/msb.nls b/dll/win32/kernel32/winnls/nls/msb.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/msb.nls rename to dll/win32/kernel32/winnls/nls/msb.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/msl.nls b/dll/win32/kernel32/winnls/nls/msl.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/msl.nls rename to dll/win32/kernel32/winnls/nls/msl.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/nlb.nls b/dll/win32/kernel32/winnls/nls/nlb.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/nlb.nls rename to dll/win32/kernel32/winnls/nls/nlb.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/nld.nls b/dll/win32/kernel32/winnls/nls/nld.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/nld.nls rename to dll/win32/kernel32/winnls/nls/nld.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/non.nls b/dll/win32/kernel32/winnls/nls/non.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/non.nls rename to dll/win32/kernel32/winnls/nls/non.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/nor.nls b/dll/win32/kernel32/winnls/nls/nor.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/nor.nls rename to dll/win32/kernel32/winnls/nls/nor.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/pan.nls b/dll/win32/kernel32/winnls/nls/pan.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/pan.nls rename to dll/win32/kernel32/winnls/nls/pan.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/plk.nls b/dll/win32/kernel32/winnls/nls/plk.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/plk.nls rename to dll/win32/kernel32/winnls/nls/plk.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/ptb.nls b/dll/win32/kernel32/winnls/nls/ptb.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/ptb.nls rename to dll/win32/kernel32/winnls/nls/ptb.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/ptg.nls b/dll/win32/kernel32/winnls/nls/ptg.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/ptg.nls rename to dll/win32/kernel32/winnls/nls/ptg.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/rmc.nls b/dll/win32/kernel32/winnls/nls/rmc.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/rmc.nls rename to dll/win32/kernel32/winnls/nls/rmc.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/rom.nls b/dll/win32/kernel32/winnls/nls/rom.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/rom.nls rename to dll/win32/kernel32/winnls/nls/rom.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/rus.nls b/dll/win32/kernel32/winnls/nls/rus.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/rus.nls rename to dll/win32/kernel32/winnls/nls/rus.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/san.nls b/dll/win32/kernel32/winnls/nls/san.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/san.nls rename to dll/win32/kernel32/winnls/nls/san.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/sky.nls b/dll/win32/kernel32/winnls/nls/sky.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/sky.nls rename to dll/win32/kernel32/winnls/nls/sky.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/slv.nls b/dll/win32/kernel32/winnls/nls/slv.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/slv.nls rename to dll/win32/kernel32/winnls/nls/slv.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/sqi.nls b/dll/win32/kernel32/winnls/nls/sqi.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/sqi.nls rename to dll/win32/kernel32/winnls/nls/sqi.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/srb.nls b/dll/win32/kernel32/winnls/nls/srb.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/srb.nls rename to dll/win32/kernel32/winnls/nls/srb.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/srl.nls b/dll/win32/kernel32/winnls/nls/srl.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/srl.nls rename to dll/win32/kernel32/winnls/nls/srl.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/sve.nls b/dll/win32/kernel32/winnls/nls/sve.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/sve.nls rename to dll/win32/kernel32/winnls/nls/sve.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/svf.nls b/dll/win32/kernel32/winnls/nls/svf.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/svf.nls rename to dll/win32/kernel32/winnls/nls/svf.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/swk.nls b/dll/win32/kernel32/winnls/nls/swk.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/swk.nls rename to dll/win32/kernel32/winnls/nls/swk.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/syr.nls b/dll/win32/kernel32/winnls/nls/syr.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/syr.nls rename to dll/win32/kernel32/winnls/nls/syr.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/tam.nls b/dll/win32/kernel32/winnls/nls/tam.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/tam.nls rename to dll/win32/kernel32/winnls/nls/tam.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/tel.nls b/dll/win32/kernel32/winnls/nls/tel.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/tel.nls rename to dll/win32/kernel32/winnls/nls/tel.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/tha.nls b/dll/win32/kernel32/winnls/nls/tha.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/tha.nls rename to dll/win32/kernel32/winnls/nls/tha.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/trk.nls b/dll/win32/kernel32/winnls/nls/trk.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/trk.nls rename to dll/win32/kernel32/winnls/nls/trk.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/ttt.nls b/dll/win32/kernel32/winnls/nls/ttt.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/ttt.nls rename to dll/win32/kernel32/winnls/nls/ttt.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/ukr.nls b/dll/win32/kernel32/winnls/nls/ukr.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/ukr.nls rename to dll/win32/kernel32/winnls/nls/ukr.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/urd.nls b/dll/win32/kernel32/winnls/nls/urd.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/urd.nls rename to dll/win32/kernel32/winnls/nls/urd.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/uzb.nls b/dll/win32/kernel32/winnls/nls/uzb.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/uzb.nls rename to dll/win32/kernel32/winnls/nls/uzb.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/uzl.nls b/dll/win32/kernel32/winnls/nls/uzl.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/uzl.nls rename to dll/win32/kernel32/winnls/nls/uzl.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/vit.nls b/dll/win32/kernel32/winnls/nls/vit.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/vit.nls rename to dll/win32/kernel32/winnls/nls/vit.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/zhh.nls b/dll/win32/kernel32/winnls/nls/zhh.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/zhh.nls rename to dll/win32/kernel32/winnls/nls/zhh.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/zhi.nls b/dll/win32/kernel32/winnls/nls/zhi.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/zhi.nls rename to dll/win32/kernel32/winnls/nls/zhi.nls diff --git a/reactos/dll/win32/kernel32/winnls/nls/zhm.nls b/dll/win32/kernel32/winnls/nls/zhm.nls similarity index 100% rename from reactos/dll/win32/kernel32/winnls/nls/zhm.nls rename to dll/win32/kernel32/winnls/nls/zhm.nls diff --git a/reactos/dll/win32/kernel32/winnls/string/casemap.c b/dll/win32/kernel32/winnls/string/casemap.c similarity index 100% rename from reactos/dll/win32/kernel32/winnls/string/casemap.c rename to dll/win32/kernel32/winnls/string/casemap.c diff --git a/reactos/dll/win32/kernel32/winnls/string/collation.c b/dll/win32/kernel32/winnls/string/collation.c similarity index 100% rename from reactos/dll/win32/kernel32/winnls/string/collation.c rename to dll/win32/kernel32/winnls/string/collation.c diff --git a/reactos/dll/win32/kernel32/winnls/string/fold.c b/dll/win32/kernel32/winnls/string/fold.c similarity index 100% rename from reactos/dll/win32/kernel32/winnls/string/fold.c rename to dll/win32/kernel32/winnls/string/fold.c diff --git a/reactos/dll/win32/kernel32/winnls/string/format_msg.c b/dll/win32/kernel32/winnls/string/format_msg.c similarity index 100% rename from reactos/dll/win32/kernel32/winnls/string/format_msg.c rename to dll/win32/kernel32/winnls/string/format_msg.c diff --git a/reactos/dll/win32/kernel32/winnls/string/lang.c b/dll/win32/kernel32/winnls/string/lang.c similarity index 100% rename from reactos/dll/win32/kernel32/winnls/string/lang.c rename to dll/win32/kernel32/winnls/string/lang.c diff --git a/reactos/dll/win32/kernel32/winnls/string/lcformat.c b/dll/win32/kernel32/winnls/string/lcformat.c similarity index 100% rename from reactos/dll/win32/kernel32/winnls/string/lcformat.c rename to dll/win32/kernel32/winnls/string/lcformat.c diff --git a/reactos/dll/win32/kernel32/winnls/string/lcformat_private.h b/dll/win32/kernel32/winnls/string/lcformat_private.h similarity index 100% rename from reactos/dll/win32/kernel32/winnls/string/lcformat_private.h rename to dll/win32/kernel32/winnls/string/lcformat_private.h diff --git a/reactos/dll/win32/kernel32/winnls/string/lstring.c b/dll/win32/kernel32/winnls/string/lstring.c similarity index 100% rename from reactos/dll/win32/kernel32/winnls/string/lstring.c rename to dll/win32/kernel32/winnls/string/lstring.c diff --git a/reactos/dll/win32/kernel32/winnls/string/nls.c b/dll/win32/kernel32/winnls/string/nls.c similarity index 100% rename from reactos/dll/win32/kernel32/winnls/string/nls.c rename to dll/win32/kernel32/winnls/string/nls.c diff --git a/reactos/dll/win32/kernel32/winnls/string/sortkey.c b/dll/win32/kernel32/winnls/string/sortkey.c similarity index 100% rename from reactos/dll/win32/kernel32/winnls/string/sortkey.c rename to dll/win32/kernel32/winnls/string/sortkey.c diff --git a/reactos/dll/win32/loadperf/CMakeLists.txt b/dll/win32/loadperf/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/loadperf/CMakeLists.txt rename to dll/win32/loadperf/CMakeLists.txt diff --git a/reactos/dll/win32/loadperf/loadperf.rbuild b/dll/win32/loadperf/loadperf.rbuild similarity index 100% rename from reactos/dll/win32/loadperf/loadperf.rbuild rename to dll/win32/loadperf/loadperf.rbuild diff --git a/reactos/dll/win32/loadperf/loadperf.spec b/dll/win32/loadperf/loadperf.spec similarity index 100% rename from reactos/dll/win32/loadperf/loadperf.spec rename to dll/win32/loadperf/loadperf.spec diff --git a/reactos/dll/win32/loadperf/loadperf_main.c b/dll/win32/loadperf/loadperf_main.c similarity index 100% rename from reactos/dll/win32/loadperf/loadperf_main.c rename to dll/win32/loadperf/loadperf_main.c diff --git a/reactos/dll/win32/loadperf/stubs.c b/dll/win32/loadperf/stubs.c similarity index 100% rename from reactos/dll/win32/loadperf/stubs.c rename to dll/win32/loadperf/stubs.c diff --git a/reactos/dll/win32/localspl/CMakeLists.txt b/dll/win32/localspl/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/localspl/CMakeLists.txt rename to dll/win32/localspl/CMakeLists.txt diff --git a/reactos/dll/win32/localspl/localmon.c b/dll/win32/localspl/localmon.c similarity index 100% rename from reactos/dll/win32/localspl/localmon.c rename to dll/win32/localspl/localmon.c diff --git a/reactos/dll/win32/localspl/localspl.rbuild b/dll/win32/localspl/localspl.rbuild similarity index 100% rename from reactos/dll/win32/localspl/localspl.rbuild rename to dll/win32/localspl/localspl.rbuild diff --git a/reactos/dll/win32/localspl/localspl.rc b/dll/win32/localspl/localspl.rc similarity index 100% rename from reactos/dll/win32/localspl/localspl.rc rename to dll/win32/localspl/localspl.rc diff --git a/reactos/dll/win32/localspl/localspl.spec b/dll/win32/localspl/localspl.spec similarity index 100% rename from reactos/dll/win32/localspl/localspl.spec rename to dll/win32/localspl/localspl.spec diff --git a/reactos/dll/win32/localspl/localspl_main.c b/dll/win32/localspl/localspl_main.c similarity index 100% rename from reactos/dll/win32/localspl/localspl_main.c rename to dll/win32/localspl/localspl_main.c diff --git a/reactos/dll/win32/localspl/localspl_private.h b/dll/win32/localspl/localspl_private.h similarity index 100% rename from reactos/dll/win32/localspl/localspl_private.h rename to dll/win32/localspl/localspl_private.h diff --git a/reactos/dll/win32/localspl/provider.c b/dll/win32/localspl/provider.c similarity index 100% rename from reactos/dll/win32/localspl/provider.c rename to dll/win32/localspl/provider.c diff --git a/reactos/dll/win32/localspl/spl_Cy.rc b/dll/win32/localspl/spl_Cy.rc similarity index 100% rename from reactos/dll/win32/localspl/spl_Cy.rc rename to dll/win32/localspl/spl_Cy.rc diff --git a/reactos/dll/win32/localspl/spl_Da.rc b/dll/win32/localspl/spl_Da.rc similarity index 100% rename from reactos/dll/win32/localspl/spl_Da.rc rename to dll/win32/localspl/spl_Da.rc diff --git a/reactos/dll/win32/localspl/spl_De.rc b/dll/win32/localspl/spl_De.rc similarity index 100% rename from reactos/dll/win32/localspl/spl_De.rc rename to dll/win32/localspl/spl_De.rc diff --git a/reactos/dll/win32/localspl/spl_En.rc b/dll/win32/localspl/spl_En.rc similarity index 100% rename from reactos/dll/win32/localspl/spl_En.rc rename to dll/win32/localspl/spl_En.rc diff --git a/reactos/dll/win32/localspl/spl_Es.rc b/dll/win32/localspl/spl_Es.rc similarity index 100% rename from reactos/dll/win32/localspl/spl_Es.rc rename to dll/win32/localspl/spl_Es.rc diff --git a/reactos/dll/win32/localspl/spl_Fr.rc b/dll/win32/localspl/spl_Fr.rc similarity index 100% rename from reactos/dll/win32/localspl/spl_Fr.rc rename to dll/win32/localspl/spl_Fr.rc diff --git a/reactos/dll/win32/localspl/spl_Hu.rc b/dll/win32/localspl/spl_Hu.rc similarity index 100% rename from reactos/dll/win32/localspl/spl_Hu.rc rename to dll/win32/localspl/spl_Hu.rc diff --git a/reactos/dll/win32/localspl/spl_It.rc b/dll/win32/localspl/spl_It.rc similarity index 100% rename from reactos/dll/win32/localspl/spl_It.rc rename to dll/win32/localspl/spl_It.rc diff --git a/reactos/dll/win32/localspl/spl_Ja.rc b/dll/win32/localspl/spl_Ja.rc similarity index 100% rename from reactos/dll/win32/localspl/spl_Ja.rc rename to dll/win32/localspl/spl_Ja.rc diff --git a/reactos/dll/win32/localspl/spl_Ko.rc b/dll/win32/localspl/spl_Ko.rc similarity index 100% rename from reactos/dll/win32/localspl/spl_Ko.rc rename to dll/win32/localspl/spl_Ko.rc diff --git a/reactos/dll/win32/localspl/spl_Lt.rc b/dll/win32/localspl/spl_Lt.rc similarity index 100% rename from reactos/dll/win32/localspl/spl_Lt.rc rename to dll/win32/localspl/spl_Lt.rc diff --git a/reactos/dll/win32/localspl/spl_Nl.rc b/dll/win32/localspl/spl_Nl.rc similarity index 100% rename from reactos/dll/win32/localspl/spl_Nl.rc rename to dll/win32/localspl/spl_Nl.rc diff --git a/reactos/dll/win32/localspl/spl_No.rc b/dll/win32/localspl/spl_No.rc similarity index 100% rename from reactos/dll/win32/localspl/spl_No.rc rename to dll/win32/localspl/spl_No.rc diff --git a/reactos/dll/win32/localspl/spl_Pl.rc b/dll/win32/localspl/spl_Pl.rc similarity index 100% rename from reactos/dll/win32/localspl/spl_Pl.rc rename to dll/win32/localspl/spl_Pl.rc diff --git a/reactos/dll/win32/localspl/spl_Pt.rc b/dll/win32/localspl/spl_Pt.rc similarity index 100% rename from reactos/dll/win32/localspl/spl_Pt.rc rename to dll/win32/localspl/spl_Pt.rc diff --git a/reactos/dll/win32/localspl/spl_Ro.rc b/dll/win32/localspl/spl_Ro.rc similarity index 100% rename from reactos/dll/win32/localspl/spl_Ro.rc rename to dll/win32/localspl/spl_Ro.rc diff --git a/reactos/dll/win32/localspl/spl_Ru.rc b/dll/win32/localspl/spl_Ru.rc similarity index 100% rename from reactos/dll/win32/localspl/spl_Ru.rc rename to dll/win32/localspl/spl_Ru.rc diff --git a/reactos/dll/win32/localspl/spl_Si.rc b/dll/win32/localspl/spl_Si.rc similarity index 100% rename from reactos/dll/win32/localspl/spl_Si.rc rename to dll/win32/localspl/spl_Si.rc diff --git a/reactos/dll/win32/localspl/spl_Sv.rc b/dll/win32/localspl/spl_Sv.rc similarity index 100% rename from reactos/dll/win32/localspl/spl_Sv.rc rename to dll/win32/localspl/spl_Sv.rc diff --git a/reactos/dll/win32/localspl/spl_Uk.rc b/dll/win32/localspl/spl_Uk.rc similarity index 100% rename from reactos/dll/win32/localspl/spl_Uk.rc rename to dll/win32/localspl/spl_Uk.rc diff --git a/reactos/dll/win32/localspl/spl_Zh.rc b/dll/win32/localspl/spl_Zh.rc similarity index 100% rename from reactos/dll/win32/localspl/spl_Zh.rc rename to dll/win32/localspl/spl_Zh.rc diff --git a/reactos/dll/win32/localui/CMakeLists.txt b/dll/win32/localui/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/localui/CMakeLists.txt rename to dll/win32/localui/CMakeLists.txt diff --git a/reactos/dll/win32/localui/localui.c b/dll/win32/localui/localui.c similarity index 100% rename from reactos/dll/win32/localui/localui.c rename to dll/win32/localui/localui.c diff --git a/reactos/dll/win32/localui/localui.h b/dll/win32/localui/localui.h similarity index 100% rename from reactos/dll/win32/localui/localui.h rename to dll/win32/localui/localui.h diff --git a/reactos/dll/win32/localui/localui.rbuild b/dll/win32/localui/localui.rbuild similarity index 100% rename from reactos/dll/win32/localui/localui.rbuild rename to dll/win32/localui/localui.rbuild diff --git a/reactos/dll/win32/localui/localui.rc b/dll/win32/localui/localui.rc similarity index 100% rename from reactos/dll/win32/localui/localui.rc rename to dll/win32/localui/localui.rc diff --git a/reactos/dll/win32/localui/localui.spec b/dll/win32/localui/localui.spec similarity index 100% rename from reactos/dll/win32/localui/localui.spec rename to dll/win32/localui/localui.spec diff --git a/reactos/dll/win32/localui/ui_Da.rc b/dll/win32/localui/ui_Da.rc similarity index 100% rename from reactos/dll/win32/localui/ui_Da.rc rename to dll/win32/localui/ui_Da.rc diff --git a/reactos/dll/win32/localui/ui_De.rc b/dll/win32/localui/ui_De.rc similarity index 100% rename from reactos/dll/win32/localui/ui_De.rc rename to dll/win32/localui/ui_De.rc diff --git a/reactos/dll/win32/localui/ui_En.rc b/dll/win32/localui/ui_En.rc similarity index 100% rename from reactos/dll/win32/localui/ui_En.rc rename to dll/win32/localui/ui_En.rc diff --git a/reactos/dll/win32/localui/ui_Es.rc b/dll/win32/localui/ui_Es.rc similarity index 100% rename from reactos/dll/win32/localui/ui_Es.rc rename to dll/win32/localui/ui_Es.rc diff --git a/reactos/dll/win32/localui/ui_Fr.rc b/dll/win32/localui/ui_Fr.rc similarity index 100% rename from reactos/dll/win32/localui/ui_Fr.rc rename to dll/win32/localui/ui_Fr.rc diff --git a/reactos/dll/win32/localui/ui_Hu.rc b/dll/win32/localui/ui_Hu.rc similarity index 100% rename from reactos/dll/win32/localui/ui_Hu.rc rename to dll/win32/localui/ui_Hu.rc diff --git a/reactos/dll/win32/localui/ui_It.rc b/dll/win32/localui/ui_It.rc similarity index 100% rename from reactos/dll/win32/localui/ui_It.rc rename to dll/win32/localui/ui_It.rc diff --git a/reactos/dll/win32/localui/ui_Ja.rc b/dll/win32/localui/ui_Ja.rc similarity index 100% rename from reactos/dll/win32/localui/ui_Ja.rc rename to dll/win32/localui/ui_Ja.rc diff --git a/reactos/dll/win32/localui/ui_Ko.rc b/dll/win32/localui/ui_Ko.rc similarity index 100% rename from reactos/dll/win32/localui/ui_Ko.rc rename to dll/win32/localui/ui_Ko.rc diff --git a/reactos/dll/win32/localui/ui_Lt.rc b/dll/win32/localui/ui_Lt.rc similarity index 100% rename from reactos/dll/win32/localui/ui_Lt.rc rename to dll/win32/localui/ui_Lt.rc diff --git a/reactos/dll/win32/localui/ui_Nl.rc b/dll/win32/localui/ui_Nl.rc similarity index 100% rename from reactos/dll/win32/localui/ui_Nl.rc rename to dll/win32/localui/ui_Nl.rc diff --git a/reactos/dll/win32/localui/ui_No.rc b/dll/win32/localui/ui_No.rc similarity index 100% rename from reactos/dll/win32/localui/ui_No.rc rename to dll/win32/localui/ui_No.rc diff --git a/reactos/dll/win32/localui/ui_Pl.rc b/dll/win32/localui/ui_Pl.rc similarity index 100% rename from reactos/dll/win32/localui/ui_Pl.rc rename to dll/win32/localui/ui_Pl.rc diff --git a/reactos/dll/win32/localui/ui_Pt.rc b/dll/win32/localui/ui_Pt.rc similarity index 100% rename from reactos/dll/win32/localui/ui_Pt.rc rename to dll/win32/localui/ui_Pt.rc diff --git a/reactos/dll/win32/localui/ui_Ro.rc b/dll/win32/localui/ui_Ro.rc similarity index 100% rename from reactos/dll/win32/localui/ui_Ro.rc rename to dll/win32/localui/ui_Ro.rc diff --git a/reactos/dll/win32/localui/ui_Ru.rc b/dll/win32/localui/ui_Ru.rc similarity index 100% rename from reactos/dll/win32/localui/ui_Ru.rc rename to dll/win32/localui/ui_Ru.rc diff --git a/reactos/dll/win32/localui/ui_Si.rc b/dll/win32/localui/ui_Si.rc similarity index 100% rename from reactos/dll/win32/localui/ui_Si.rc rename to dll/win32/localui/ui_Si.rc diff --git a/reactos/dll/win32/localui/ui_Sv.rc b/dll/win32/localui/ui_Sv.rc similarity index 100% rename from reactos/dll/win32/localui/ui_Sv.rc rename to dll/win32/localui/ui_Sv.rc diff --git a/reactos/dll/win32/localui/ui_Uk.rc b/dll/win32/localui/ui_Uk.rc similarity index 100% rename from reactos/dll/win32/localui/ui_Uk.rc rename to dll/win32/localui/ui_Uk.rc diff --git a/reactos/dll/win32/localui/ui_Zh.rc b/dll/win32/localui/ui_Zh.rc similarity index 100% rename from reactos/dll/win32/localui/ui_Zh.rc rename to dll/win32/localui/ui_Zh.rc diff --git a/reactos/dll/win32/lpk/CMakeLists.txt b/dll/win32/lpk/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/lpk/CMakeLists.txt rename to dll/win32/lpk/CMakeLists.txt diff --git a/reactos/dll/win32/lpk/dllmain.c b/dll/win32/lpk/dllmain.c similarity index 100% rename from reactos/dll/win32/lpk/dllmain.c rename to dll/win32/lpk/dllmain.c diff --git a/reactos/dll/win32/lpk/lpk.rbuild b/dll/win32/lpk/lpk.rbuild similarity index 100% rename from reactos/dll/win32/lpk/lpk.rbuild rename to dll/win32/lpk/lpk.rbuild diff --git a/reactos/dll/win32/lpk/lpk.rc b/dll/win32/lpk/lpk.rc similarity index 100% rename from reactos/dll/win32/lpk/lpk.rc rename to dll/win32/lpk/lpk.rc diff --git a/reactos/dll/win32/lpk/lpk.spec b/dll/win32/lpk/lpk.spec similarity index 100% rename from reactos/dll/win32/lpk/lpk.spec rename to dll/win32/lpk/lpk.spec diff --git a/reactos/dll/win32/lpk/ros_lpk.h b/dll/win32/lpk/ros_lpk.h similarity index 100% rename from reactos/dll/win32/lpk/ros_lpk.h rename to dll/win32/lpk/ros_lpk.h diff --git a/reactos/dll/win32/lpk/stub.c b/dll/win32/lpk/stub.c similarity index 100% rename from reactos/dll/win32/lpk/stub.c rename to dll/win32/lpk/stub.c diff --git a/reactos/dll/win32/lsasrv/CMakeLists.txt b/dll/win32/lsasrv/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/lsasrv/CMakeLists.txt rename to dll/win32/lsasrv/CMakeLists.txt diff --git a/reactos/dll/win32/lsasrv/authport.c b/dll/win32/lsasrv/authport.c similarity index 100% rename from reactos/dll/win32/lsasrv/authport.c rename to dll/win32/lsasrv/authport.c diff --git a/reactos/dll/win32/lsasrv/database.c b/dll/win32/lsasrv/database.c similarity index 100% rename from reactos/dll/win32/lsasrv/database.c rename to dll/win32/lsasrv/database.c diff --git a/reactos/dll/win32/lsasrv/lsarpc.c b/dll/win32/lsasrv/lsarpc.c similarity index 100% rename from reactos/dll/win32/lsasrv/lsarpc.c rename to dll/win32/lsasrv/lsarpc.c diff --git a/reactos/dll/win32/lsasrv/lsasrv.c b/dll/win32/lsasrv/lsasrv.c similarity index 100% rename from reactos/dll/win32/lsasrv/lsasrv.c rename to dll/win32/lsasrv/lsasrv.c diff --git a/reactos/dll/win32/lsasrv/lsasrv.h b/dll/win32/lsasrv/lsasrv.h similarity index 100% rename from reactos/dll/win32/lsasrv/lsasrv.h rename to dll/win32/lsasrv/lsasrv.h diff --git a/reactos/dll/win32/lsasrv/lsasrv.rbuild b/dll/win32/lsasrv/lsasrv.rbuild similarity index 100% rename from reactos/dll/win32/lsasrv/lsasrv.rbuild rename to dll/win32/lsasrv/lsasrv.rbuild diff --git a/reactos/dll/win32/lsasrv/lsasrv.rc b/dll/win32/lsasrv/lsasrv.rc similarity index 100% rename from reactos/dll/win32/lsasrv/lsasrv.rc rename to dll/win32/lsasrv/lsasrv.rc diff --git a/reactos/dll/win32/lsasrv/lsasrv.spec b/dll/win32/lsasrv/lsasrv.spec similarity index 100% rename from reactos/dll/win32/lsasrv/lsasrv.spec rename to dll/win32/lsasrv/lsasrv.spec diff --git a/reactos/dll/win32/lsasrv/policy.c b/dll/win32/lsasrv/policy.c similarity index 100% rename from reactos/dll/win32/lsasrv/policy.c rename to dll/win32/lsasrv/policy.c diff --git a/reactos/dll/win32/lsasrv/privileges.c b/dll/win32/lsasrv/privileges.c similarity index 100% rename from reactos/dll/win32/lsasrv/privileges.c rename to dll/win32/lsasrv/privileges.c diff --git a/reactos/dll/win32/lsasrv/sids.c b/dll/win32/lsasrv/sids.c similarity index 100% rename from reactos/dll/win32/lsasrv/sids.c rename to dll/win32/lsasrv/sids.c diff --git a/reactos/dll/win32/lz32/CMakeLists.txt b/dll/win32/lz32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/lz32/CMakeLists.txt rename to dll/win32/lz32/CMakeLists.txt diff --git a/reactos/dll/win32/lz32/lz32.rbuild b/dll/win32/lz32/lz32.rbuild similarity index 100% rename from reactos/dll/win32/lz32/lz32.rbuild rename to dll/win32/lz32/lz32.rbuild diff --git a/reactos/dll/win32/lz32/lz32.spec b/dll/win32/lz32/lz32.spec similarity index 100% rename from reactos/dll/win32/lz32/lz32.spec rename to dll/win32/lz32/lz32.spec diff --git a/reactos/dll/win32/lz32/version.rc b/dll/win32/lz32/version.rc similarity index 100% rename from reactos/dll/win32/lz32/version.rc rename to dll/win32/lz32/version.rc diff --git a/reactos/dll/win32/mapi32/CMakeLists.txt b/dll/win32/mapi32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/mapi32/CMakeLists.txt rename to dll/win32/mapi32/CMakeLists.txt diff --git a/reactos/dll/win32/mapi32/Cy.rc b/dll/win32/mapi32/Cy.rc similarity index 100% rename from reactos/dll/win32/mapi32/Cy.rc rename to dll/win32/mapi32/Cy.rc diff --git a/reactos/dll/win32/mapi32/Da.rc b/dll/win32/mapi32/Da.rc similarity index 100% rename from reactos/dll/win32/mapi32/Da.rc rename to dll/win32/mapi32/Da.rc diff --git a/reactos/dll/win32/mapi32/De.rc b/dll/win32/mapi32/De.rc similarity index 100% rename from reactos/dll/win32/mapi32/De.rc rename to dll/win32/mapi32/De.rc diff --git a/reactos/dll/win32/mapi32/En.rc b/dll/win32/mapi32/En.rc similarity index 100% rename from reactos/dll/win32/mapi32/En.rc rename to dll/win32/mapi32/En.rc diff --git a/reactos/dll/win32/mapi32/Es.rc b/dll/win32/mapi32/Es.rc similarity index 100% rename from reactos/dll/win32/mapi32/Es.rc rename to dll/win32/mapi32/Es.rc diff --git a/reactos/dll/win32/mapi32/Fr.rc b/dll/win32/mapi32/Fr.rc similarity index 100% rename from reactos/dll/win32/mapi32/Fr.rc rename to dll/win32/mapi32/Fr.rc diff --git a/reactos/dll/win32/mapi32/Ga.rc b/dll/win32/mapi32/Ga.rc similarity index 100% rename from reactos/dll/win32/mapi32/Ga.rc rename to dll/win32/mapi32/Ga.rc diff --git a/reactos/dll/win32/mapi32/Hu.rc b/dll/win32/mapi32/Hu.rc similarity index 100% rename from reactos/dll/win32/mapi32/Hu.rc rename to dll/win32/mapi32/Hu.rc diff --git a/reactos/dll/win32/mapi32/It.rc b/dll/win32/mapi32/It.rc similarity index 100% rename from reactos/dll/win32/mapi32/It.rc rename to dll/win32/mapi32/It.rc diff --git a/reactos/dll/win32/mapi32/Ja.rc b/dll/win32/mapi32/Ja.rc similarity index 100% rename from reactos/dll/win32/mapi32/Ja.rc rename to dll/win32/mapi32/Ja.rc diff --git a/reactos/dll/win32/mapi32/Ko.rc b/dll/win32/mapi32/Ko.rc similarity index 100% rename from reactos/dll/win32/mapi32/Ko.rc rename to dll/win32/mapi32/Ko.rc diff --git a/reactos/dll/win32/mapi32/Lt.rc b/dll/win32/mapi32/Lt.rc similarity index 100% rename from reactos/dll/win32/mapi32/Lt.rc rename to dll/win32/mapi32/Lt.rc diff --git a/reactos/dll/win32/mapi32/Nl.rc b/dll/win32/mapi32/Nl.rc similarity index 100% rename from reactos/dll/win32/mapi32/Nl.rc rename to dll/win32/mapi32/Nl.rc diff --git a/reactos/dll/win32/mapi32/No.rc b/dll/win32/mapi32/No.rc similarity index 100% rename from reactos/dll/win32/mapi32/No.rc rename to dll/win32/mapi32/No.rc diff --git a/reactos/dll/win32/mapi32/Pl.rc b/dll/win32/mapi32/Pl.rc similarity index 100% rename from reactos/dll/win32/mapi32/Pl.rc rename to dll/win32/mapi32/Pl.rc diff --git a/reactos/dll/win32/mapi32/Pt.rc b/dll/win32/mapi32/Pt.rc similarity index 100% rename from reactos/dll/win32/mapi32/Pt.rc rename to dll/win32/mapi32/Pt.rc diff --git a/reactos/dll/win32/mapi32/Ro.rc b/dll/win32/mapi32/Ro.rc similarity index 100% rename from reactos/dll/win32/mapi32/Ro.rc rename to dll/win32/mapi32/Ro.rc diff --git a/reactos/dll/win32/mapi32/Ru.rc b/dll/win32/mapi32/Ru.rc similarity index 100% rename from reactos/dll/win32/mapi32/Ru.rc rename to dll/win32/mapi32/Ru.rc diff --git a/reactos/dll/win32/mapi32/Si.rc b/dll/win32/mapi32/Si.rc similarity index 100% rename from reactos/dll/win32/mapi32/Si.rc rename to dll/win32/mapi32/Si.rc diff --git a/reactos/dll/win32/mapi32/Uk.rc b/dll/win32/mapi32/Uk.rc similarity index 100% rename from reactos/dll/win32/mapi32/Uk.rc rename to dll/win32/mapi32/Uk.rc diff --git a/reactos/dll/win32/mapi32/imalloc.c b/dll/win32/mapi32/imalloc.c similarity index 100% rename from reactos/dll/win32/mapi32/imalloc.c rename to dll/win32/mapi32/imalloc.c diff --git a/reactos/dll/win32/mapi32/mapi32.rbuild b/dll/win32/mapi32/mapi32.rbuild similarity index 100% rename from reactos/dll/win32/mapi32/mapi32.rbuild rename to dll/win32/mapi32/mapi32.rbuild diff --git a/reactos/dll/win32/mapi32/mapi32.spec b/dll/win32/mapi32/mapi32.spec similarity index 100% rename from reactos/dll/win32/mapi32/mapi32.spec rename to dll/win32/mapi32/mapi32.spec diff --git a/reactos/dll/win32/mapi32/mapi32_main.c b/dll/win32/mapi32/mapi32_main.c similarity index 100% rename from reactos/dll/win32/mapi32/mapi32_main.c rename to dll/win32/mapi32/mapi32_main.c diff --git a/reactos/dll/win32/mapi32/prop.c b/dll/win32/mapi32/prop.c similarity index 100% rename from reactos/dll/win32/mapi32/prop.c rename to dll/win32/mapi32/prop.c diff --git a/reactos/dll/win32/mapi32/res.h b/dll/win32/mapi32/res.h similarity index 100% rename from reactos/dll/win32/mapi32/res.h rename to dll/win32/mapi32/res.h diff --git a/reactos/dll/win32/mapi32/sendmail.c b/dll/win32/mapi32/sendmail.c similarity index 100% rename from reactos/dll/win32/mapi32/sendmail.c rename to dll/win32/mapi32/sendmail.c diff --git a/reactos/dll/win32/mapi32/stubs.c b/dll/win32/mapi32/stubs.c similarity index 100% rename from reactos/dll/win32/mapi32/stubs.c rename to dll/win32/mapi32/stubs.c diff --git a/reactos/dll/win32/mapi32/util.c b/dll/win32/mapi32/util.c similarity index 100% rename from reactos/dll/win32/mapi32/util.c rename to dll/win32/mapi32/util.c diff --git a/reactos/dll/win32/mapi32/util.h b/dll/win32/mapi32/util.h similarity index 100% rename from reactos/dll/win32/mapi32/util.h rename to dll/win32/mapi32/util.h diff --git a/reactos/dll/win32/mapi32/version.rc b/dll/win32/mapi32/version.rc similarity index 100% rename from reactos/dll/win32/mapi32/version.rc rename to dll/win32/mapi32/version.rc diff --git a/reactos/dll/win32/mciavi32/CMakeLists.txt b/dll/win32/mciavi32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/mciavi32/CMakeLists.txt rename to dll/win32/mciavi32/CMakeLists.txt diff --git a/reactos/dll/win32/mciavi32/info.c b/dll/win32/mciavi32/info.c similarity index 100% rename from reactos/dll/win32/mciavi32/info.c rename to dll/win32/mciavi32/info.c diff --git a/reactos/dll/win32/mciavi32/mciavi.c b/dll/win32/mciavi32/mciavi.c similarity index 100% rename from reactos/dll/win32/mciavi32/mciavi.c rename to dll/win32/mciavi32/mciavi.c diff --git a/reactos/dll/win32/mciavi32/mciavi32.rbuild b/dll/win32/mciavi32/mciavi32.rbuild similarity index 100% rename from reactos/dll/win32/mciavi32/mciavi32.rbuild rename to dll/win32/mciavi32/mciavi32.rbuild diff --git a/reactos/dll/win32/mciavi32/mciavi32.spec b/dll/win32/mciavi32/mciavi32.spec similarity index 100% rename from reactos/dll/win32/mciavi32/mciavi32.spec rename to dll/win32/mciavi32/mciavi32.spec diff --git a/reactos/dll/win32/mciavi32/mciavi_res.rc b/dll/win32/mciavi32/mciavi_res.rc similarity index 100% rename from reactos/dll/win32/mciavi32/mciavi_res.rc rename to dll/win32/mciavi32/mciavi_res.rc diff --git a/reactos/dll/win32/mciavi32/mmoutput.c b/dll/win32/mciavi32/mmoutput.c similarity index 100% rename from reactos/dll/win32/mciavi32/mmoutput.c rename to dll/win32/mciavi32/mmoutput.c diff --git a/reactos/dll/win32/mciavi32/private_mciavi.h b/dll/win32/mciavi32/private_mciavi.h similarity index 100% rename from reactos/dll/win32/mciavi32/private_mciavi.h rename to dll/win32/mciavi32/private_mciavi.h diff --git a/reactos/dll/win32/mciavi32/wnd.c b/dll/win32/mciavi32/wnd.c similarity index 100% rename from reactos/dll/win32/mciavi32/wnd.c rename to dll/win32/mciavi32/wnd.c diff --git a/reactos/dll/win32/mcicda/CMakeLists.txt b/dll/win32/mcicda/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/mcicda/CMakeLists.txt rename to dll/win32/mcicda/CMakeLists.txt diff --git a/reactos/dll/win32/mcicda/mcicda.c b/dll/win32/mcicda/mcicda.c similarity index 100% rename from reactos/dll/win32/mcicda/mcicda.c rename to dll/win32/mcicda/mcicda.c diff --git a/reactos/dll/win32/mcicda/mcicda.rbuild b/dll/win32/mcicda/mcicda.rbuild similarity index 100% rename from reactos/dll/win32/mcicda/mcicda.rbuild rename to dll/win32/mcicda/mcicda.rbuild diff --git a/reactos/dll/win32/mcicda/mcicda.spec b/dll/win32/mcicda/mcicda.spec similarity index 100% rename from reactos/dll/win32/mcicda/mcicda.spec rename to dll/win32/mcicda/mcicda.spec diff --git a/reactos/dll/win32/mciqtz32/CMakeLists.txt b/dll/win32/mciqtz32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/mciqtz32/CMakeLists.txt rename to dll/win32/mciqtz32/CMakeLists.txt diff --git a/reactos/dll/win32/mciqtz32/mciqtz.c b/dll/win32/mciqtz32/mciqtz.c similarity index 100% rename from reactos/dll/win32/mciqtz32/mciqtz.c rename to dll/win32/mciqtz32/mciqtz.c diff --git a/reactos/dll/win32/mciqtz32/mciqtz32.rbuild b/dll/win32/mciqtz32/mciqtz32.rbuild similarity index 100% rename from reactos/dll/win32/mciqtz32/mciqtz32.rbuild rename to dll/win32/mciqtz32/mciqtz32.rbuild diff --git a/reactos/dll/win32/mciqtz32/mciqtz32.spec b/dll/win32/mciqtz32/mciqtz32.spec similarity index 100% rename from reactos/dll/win32/mciqtz32/mciqtz32.spec rename to dll/win32/mciqtz32/mciqtz32.spec diff --git a/reactos/dll/win32/mciqtz32/mciqtz_private.h b/dll/win32/mciqtz32/mciqtz_private.h similarity index 100% rename from reactos/dll/win32/mciqtz32/mciqtz_private.h rename to dll/win32/mciqtz32/mciqtz_private.h diff --git a/reactos/dll/win32/mciqtz32/version.rc b/dll/win32/mciqtz32/version.rc similarity index 100% rename from reactos/dll/win32/mciqtz32/version.rc rename to dll/win32/mciqtz32/version.rc diff --git a/reactos/dll/win32/mciseq/CMakeLists.txt b/dll/win32/mciseq/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/mciseq/CMakeLists.txt rename to dll/win32/mciseq/CMakeLists.txt diff --git a/reactos/dll/win32/mciseq/mcimidi.c b/dll/win32/mciseq/mcimidi.c similarity index 100% rename from reactos/dll/win32/mciseq/mcimidi.c rename to dll/win32/mciseq/mcimidi.c diff --git a/reactos/dll/win32/mciseq/mciseq.rbuild b/dll/win32/mciseq/mciseq.rbuild similarity index 100% rename from reactos/dll/win32/mciseq/mciseq.rbuild rename to dll/win32/mciseq/mciseq.rbuild diff --git a/reactos/dll/win32/mciseq/mciseq.spec b/dll/win32/mciseq/mciseq.spec similarity index 100% rename from reactos/dll/win32/mciseq/mciseq.spec rename to dll/win32/mciseq/mciseq.spec diff --git a/reactos/dll/win32/mciwave/CMakeLists.txt b/dll/win32/mciwave/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/mciwave/CMakeLists.txt rename to dll/win32/mciwave/CMakeLists.txt diff --git a/reactos/dll/win32/mciwave/mciwave.c b/dll/win32/mciwave/mciwave.c similarity index 100% rename from reactos/dll/win32/mciwave/mciwave.c rename to dll/win32/mciwave/mciwave.c diff --git a/reactos/dll/win32/mciwave/mciwave.rbuild b/dll/win32/mciwave/mciwave.rbuild similarity index 100% rename from reactos/dll/win32/mciwave/mciwave.rbuild rename to dll/win32/mciwave/mciwave.rbuild diff --git a/reactos/dll/win32/mciwave/mciwave.spec b/dll/win32/mciwave/mciwave.spec similarity index 100% rename from reactos/dll/win32/mciwave/mciwave.spec rename to dll/win32/mciwave/mciwave.spec diff --git a/reactos/dll/win32/mlang/CMakeLists.txt b/dll/win32/mlang/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/mlang/CMakeLists.txt rename to dll/win32/mlang/CMakeLists.txt diff --git a/reactos/dll/win32/mlang/mlang.c b/dll/win32/mlang/mlang.c similarity index 100% rename from reactos/dll/win32/mlang/mlang.c rename to dll/win32/mlang/mlang.c diff --git a/reactos/dll/win32/mlang/mlang.rbuild b/dll/win32/mlang/mlang.rbuild similarity index 100% rename from reactos/dll/win32/mlang/mlang.rbuild rename to dll/win32/mlang/mlang.rbuild diff --git a/reactos/dll/win32/mlang/mlang.spec b/dll/win32/mlang/mlang.spec similarity index 100% rename from reactos/dll/win32/mlang/mlang.spec rename to dll/win32/mlang/mlang.spec diff --git a/reactos/dll/win32/mlang/regsvr.c b/dll/win32/mlang/regsvr.c similarity index 100% rename from reactos/dll/win32/mlang/regsvr.c rename to dll/win32/mlang/regsvr.c diff --git a/reactos/dll/win32/mmdrv/CMakeLists.txt b/dll/win32/mmdrv/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/mmdrv/CMakeLists.txt rename to dll/win32/mmdrv/CMakeLists.txt diff --git a/reactos/dll/win32/mmdrv/TODO b/dll/win32/mmdrv/TODO similarity index 100% rename from reactos/dll/win32/mmdrv/TODO rename to dll/win32/mmdrv/TODO diff --git a/reactos/dll/win32/mmdrv/auxil.c b/dll/win32/mmdrv/auxil.c similarity index 100% rename from reactos/dll/win32/mmdrv/auxil.c rename to dll/win32/mmdrv/auxil.c diff --git a/reactos/dll/win32/mmdrv/common.c b/dll/win32/mmdrv/common.c similarity index 100% rename from reactos/dll/win32/mmdrv/common.c rename to dll/win32/mmdrv/common.c diff --git a/reactos/dll/win32/mmdrv/entry.c b/dll/win32/mmdrv/entry.c similarity index 100% rename from reactos/dll/win32/mmdrv/entry.c rename to dll/win32/mmdrv/entry.c diff --git a/reactos/dll/win32/mmdrv/kernel.c b/dll/win32/mmdrv/kernel.c similarity index 100% rename from reactos/dll/win32/mmdrv/kernel.c rename to dll/win32/mmdrv/kernel.c diff --git a/reactos/dll/win32/mmdrv/midi.c b/dll/win32/mmdrv/midi.c similarity index 100% rename from reactos/dll/win32/mmdrv/midi.c rename to dll/win32/mmdrv/midi.c diff --git a/reactos/dll/win32/mmdrv/mmddk.h b/dll/win32/mmdrv/mmddk.h similarity index 100% rename from reactos/dll/win32/mmdrv/mmddk.h rename to dll/win32/mmdrv/mmddk.h diff --git a/reactos/dll/win32/mmdrv/mmdef.h b/dll/win32/mmdrv/mmdef.h similarity index 100% rename from reactos/dll/win32/mmdrv/mmdef.h rename to dll/win32/mmdrv/mmdef.h diff --git a/reactos/dll/win32/mmdrv/mmdrv.h b/dll/win32/mmdrv/mmdrv.h similarity index 100% rename from reactos/dll/win32/mmdrv/mmdrv.h rename to dll/win32/mmdrv/mmdrv.h diff --git a/reactos/dll/win32/mmdrv/mmdrv.rbuild b/dll/win32/mmdrv/mmdrv.rbuild similarity index 100% rename from reactos/dll/win32/mmdrv/mmdrv.rbuild rename to dll/win32/mmdrv/mmdrv.rbuild diff --git a/reactos/dll/win32/mmdrv/mmdrv.spec b/dll/win32/mmdrv/mmdrv.spec similarity index 100% rename from reactos/dll/win32/mmdrv/mmdrv.spec rename to dll/win32/mmdrv/mmdrv.spec diff --git a/reactos/dll/win32/mmdrv/mme.c b/dll/win32/mmdrv/mme.c similarity index 100% rename from reactos/dll/win32/mmdrv/mme.c rename to dll/win32/mmdrv/mme.c diff --git a/reactos/dll/win32/mmdrv/mmioctl.h b/dll/win32/mmdrv/mmioctl.h similarity index 100% rename from reactos/dll/win32/mmdrv/mmioctl.h rename to dll/win32/mmdrv/mmioctl.h diff --git a/reactos/dll/win32/mmdrv/session.c b/dll/win32/mmdrv/session.c similarity index 100% rename from reactos/dll/win32/mmdrv/session.c rename to dll/win32/mmdrv/session.c diff --git a/reactos/dll/win32/mmdrv/utils.c b/dll/win32/mmdrv/utils.c similarity index 100% rename from reactos/dll/win32/mmdrv/utils.c rename to dll/win32/mmdrv/utils.c diff --git a/reactos/dll/win32/mmdrv/wave.c b/dll/win32/mmdrv/wave.c similarity index 100% rename from reactos/dll/win32/mmdrv/wave.c rename to dll/win32/mmdrv/wave.c diff --git a/reactos/dll/win32/mmdrv/wave.h b/dll/win32/mmdrv/wave.h similarity index 100% rename from reactos/dll/win32/mmdrv/wave.h rename to dll/win32/mmdrv/wave.h diff --git a/reactos/dll/win32/mmdrv/wave_io.c b/dll/win32/mmdrv/wave_io.c similarity index 100% rename from reactos/dll/win32/mmdrv/wave_io.c rename to dll/win32/mmdrv/wave_io.c diff --git a/reactos/dll/win32/modemui/CMakeLists.txt b/dll/win32/modemui/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/modemui/CMakeLists.txt rename to dll/win32/modemui/CMakeLists.txt diff --git a/reactos/dll/win32/modemui/lang/de-DE.rc b/dll/win32/modemui/lang/de-DE.rc similarity index 100% rename from reactos/dll/win32/modemui/lang/de-DE.rc rename to dll/win32/modemui/lang/de-DE.rc diff --git a/reactos/dll/win32/modemui/lang/en-US.rc b/dll/win32/modemui/lang/en-US.rc similarity index 100% rename from reactos/dll/win32/modemui/lang/en-US.rc rename to dll/win32/modemui/lang/en-US.rc diff --git a/reactos/dll/win32/modemui/lang/es-ES.rc b/dll/win32/modemui/lang/es-ES.rc similarity index 100% rename from reactos/dll/win32/modemui/lang/es-ES.rc rename to dll/win32/modemui/lang/es-ES.rc diff --git a/reactos/dll/win32/modemui/lang/no-NO.rc b/dll/win32/modemui/lang/no-NO.rc similarity index 100% rename from reactos/dll/win32/modemui/lang/no-NO.rc rename to dll/win32/modemui/lang/no-NO.rc diff --git a/reactos/dll/win32/modemui/lang/pl-PL.rc b/dll/win32/modemui/lang/pl-PL.rc similarity index 100% rename from reactos/dll/win32/modemui/lang/pl-PL.rc rename to dll/win32/modemui/lang/pl-PL.rc diff --git a/reactos/dll/win32/modemui/lang/ro-RO.rc b/dll/win32/modemui/lang/ro-RO.rc similarity index 100% rename from reactos/dll/win32/modemui/lang/ro-RO.rc rename to dll/win32/modemui/lang/ro-RO.rc diff --git a/reactos/dll/win32/modemui/lang/ru-RU.rc b/dll/win32/modemui/lang/ru-RU.rc similarity index 100% rename from reactos/dll/win32/modemui/lang/ru-RU.rc rename to dll/win32/modemui/lang/ru-RU.rc diff --git a/reactos/dll/win32/modemui/lang/uk-UA.rc b/dll/win32/modemui/lang/uk-UA.rc similarity index 100% rename from reactos/dll/win32/modemui/lang/uk-UA.rc rename to dll/win32/modemui/lang/uk-UA.rc diff --git a/reactos/dll/win32/modemui/modemui.c b/dll/win32/modemui/modemui.c similarity index 100% rename from reactos/dll/win32/modemui/modemui.c rename to dll/win32/modemui/modemui.c diff --git a/reactos/dll/win32/modemui/modemui.rbuild b/dll/win32/modemui/modemui.rbuild similarity index 100% rename from reactos/dll/win32/modemui/modemui.rbuild rename to dll/win32/modemui/modemui.rbuild diff --git a/reactos/dll/win32/modemui/modemui.rc b/dll/win32/modemui/modemui.rc similarity index 100% rename from reactos/dll/win32/modemui/modemui.rc rename to dll/win32/modemui/modemui.rc diff --git a/reactos/dll/win32/modemui/modemui.spec b/dll/win32/modemui/modemui.spec similarity index 100% rename from reactos/dll/win32/modemui/modemui.spec rename to dll/win32/modemui/modemui.spec diff --git a/reactos/dll/win32/modemui/res/5100.ico b/dll/win32/modemui/res/5100.ico similarity index 100% rename from reactos/dll/win32/modemui/res/5100.ico rename to dll/win32/modemui/res/5100.ico diff --git a/reactos/dll/win32/modemui/res/700.ico b/dll/win32/modemui/res/700.ico similarity index 100% rename from reactos/dll/win32/modemui/res/700.ico rename to dll/win32/modemui/res/700.ico diff --git a/reactos/dll/win32/modemui/res/701.ico b/dll/win32/modemui/res/701.ico similarity index 100% rename from reactos/dll/win32/modemui/res/701.ico rename to dll/win32/modemui/res/701.ico diff --git a/reactos/dll/win32/modemui/res/702.ico b/dll/win32/modemui/res/702.ico similarity index 100% rename from reactos/dll/win32/modemui/res/702.ico rename to dll/win32/modemui/res/702.ico diff --git a/reactos/dll/win32/modemui/res/703.ico b/dll/win32/modemui/res/703.ico similarity index 100% rename from reactos/dll/win32/modemui/res/703.ico rename to dll/win32/modemui/res/703.ico diff --git a/reactos/dll/win32/modemui/resource.h b/dll/win32/modemui/resource.h similarity index 100% rename from reactos/dll/win32/modemui/resource.h rename to dll/win32/modemui/resource.h diff --git a/reactos/dll/win32/mpr/CMakeLists.txt b/dll/win32/mpr/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/mpr/CMakeLists.txt rename to dll/win32/mpr/CMakeLists.txt diff --git a/reactos/dll/win32/mpr/auth.c b/dll/win32/mpr/auth.c similarity index 100% rename from reactos/dll/win32/mpr/auth.c rename to dll/win32/mpr/auth.c diff --git a/reactos/dll/win32/mpr/mpr.rbuild b/dll/win32/mpr/mpr.rbuild similarity index 100% rename from reactos/dll/win32/mpr/mpr.rbuild rename to dll/win32/mpr/mpr.rbuild diff --git a/reactos/dll/win32/mpr/mpr.rc b/dll/win32/mpr/mpr.rc similarity index 100% rename from reactos/dll/win32/mpr/mpr.rc rename to dll/win32/mpr/mpr.rc diff --git a/reactos/dll/win32/mpr/mpr.spec b/dll/win32/mpr/mpr.spec similarity index 100% rename from reactos/dll/win32/mpr/mpr.spec rename to dll/win32/mpr/mpr.spec diff --git a/reactos/dll/win32/mpr/mpr_Bg.rc b/dll/win32/mpr/mpr_Bg.rc similarity index 100% rename from reactos/dll/win32/mpr/mpr_Bg.rc rename to dll/win32/mpr/mpr_Bg.rc diff --git a/reactos/dll/win32/mpr/mpr_Cs.rc b/dll/win32/mpr/mpr_Cs.rc similarity index 100% rename from reactos/dll/win32/mpr/mpr_Cs.rc rename to dll/win32/mpr/mpr_Cs.rc diff --git a/reactos/dll/win32/mpr/mpr_Da.rc b/dll/win32/mpr/mpr_Da.rc similarity index 100% rename from reactos/dll/win32/mpr/mpr_Da.rc rename to dll/win32/mpr/mpr_Da.rc diff --git a/reactos/dll/win32/mpr/mpr_De.rc b/dll/win32/mpr/mpr_De.rc similarity index 100% rename from reactos/dll/win32/mpr/mpr_De.rc rename to dll/win32/mpr/mpr_De.rc diff --git a/reactos/dll/win32/mpr/mpr_En.rc b/dll/win32/mpr/mpr_En.rc similarity index 100% rename from reactos/dll/win32/mpr/mpr_En.rc rename to dll/win32/mpr/mpr_En.rc diff --git a/reactos/dll/win32/mpr/mpr_Es.rc b/dll/win32/mpr/mpr_Es.rc similarity index 100% rename from reactos/dll/win32/mpr/mpr_Es.rc rename to dll/win32/mpr/mpr_Es.rc diff --git a/reactos/dll/win32/mpr/mpr_Fr.rc b/dll/win32/mpr/mpr_Fr.rc similarity index 100% rename from reactos/dll/win32/mpr/mpr_Fr.rc rename to dll/win32/mpr/mpr_Fr.rc diff --git a/reactos/dll/win32/mpr/mpr_Hu.rc b/dll/win32/mpr/mpr_Hu.rc similarity index 100% rename from reactos/dll/win32/mpr/mpr_Hu.rc rename to dll/win32/mpr/mpr_Hu.rc diff --git a/reactos/dll/win32/mpr/mpr_It.rc b/dll/win32/mpr/mpr_It.rc similarity index 100% rename from reactos/dll/win32/mpr/mpr_It.rc rename to dll/win32/mpr/mpr_It.rc diff --git a/reactos/dll/win32/mpr/mpr_Ja.rc b/dll/win32/mpr/mpr_Ja.rc similarity index 100% rename from reactos/dll/win32/mpr/mpr_Ja.rc rename to dll/win32/mpr/mpr_Ja.rc diff --git a/reactos/dll/win32/mpr/mpr_Ko.rc b/dll/win32/mpr/mpr_Ko.rc similarity index 100% rename from reactos/dll/win32/mpr/mpr_Ko.rc rename to dll/win32/mpr/mpr_Ko.rc diff --git a/reactos/dll/win32/mpr/mpr_Lt.rc b/dll/win32/mpr/mpr_Lt.rc similarity index 100% rename from reactos/dll/win32/mpr/mpr_Lt.rc rename to dll/win32/mpr/mpr_Lt.rc diff --git a/reactos/dll/win32/mpr/mpr_Nl.rc b/dll/win32/mpr/mpr_Nl.rc similarity index 100% rename from reactos/dll/win32/mpr/mpr_Nl.rc rename to dll/win32/mpr/mpr_Nl.rc diff --git a/reactos/dll/win32/mpr/mpr_No.rc b/dll/win32/mpr/mpr_No.rc similarity index 100% rename from reactos/dll/win32/mpr/mpr_No.rc rename to dll/win32/mpr/mpr_No.rc diff --git a/reactos/dll/win32/mpr/mpr_Pl.rc b/dll/win32/mpr/mpr_Pl.rc similarity index 100% rename from reactos/dll/win32/mpr/mpr_Pl.rc rename to dll/win32/mpr/mpr_Pl.rc diff --git a/reactos/dll/win32/mpr/mpr_Pt.rc b/dll/win32/mpr/mpr_Pt.rc similarity index 100% rename from reactos/dll/win32/mpr/mpr_Pt.rc rename to dll/win32/mpr/mpr_Pt.rc diff --git a/reactos/dll/win32/mpr/mpr_Ro.rc b/dll/win32/mpr/mpr_Ro.rc similarity index 100% rename from reactos/dll/win32/mpr/mpr_Ro.rc rename to dll/win32/mpr/mpr_Ro.rc diff --git a/reactos/dll/win32/mpr/mpr_Ru.rc b/dll/win32/mpr/mpr_Ru.rc similarity index 100% rename from reactos/dll/win32/mpr/mpr_Ru.rc rename to dll/win32/mpr/mpr_Ru.rc diff --git a/reactos/dll/win32/mpr/mpr_Si.rc b/dll/win32/mpr/mpr_Si.rc similarity index 100% rename from reactos/dll/win32/mpr/mpr_Si.rc rename to dll/win32/mpr/mpr_Si.rc diff --git a/reactos/dll/win32/mpr/mpr_Sv.rc b/dll/win32/mpr/mpr_Sv.rc similarity index 100% rename from reactos/dll/win32/mpr/mpr_Sv.rc rename to dll/win32/mpr/mpr_Sv.rc diff --git a/reactos/dll/win32/mpr/mpr_Tr.rc b/dll/win32/mpr/mpr_Tr.rc similarity index 100% rename from reactos/dll/win32/mpr/mpr_Tr.rc rename to dll/win32/mpr/mpr_Tr.rc diff --git a/reactos/dll/win32/mpr/mpr_Uk.rc b/dll/win32/mpr/mpr_Uk.rc similarity index 100% rename from reactos/dll/win32/mpr/mpr_Uk.rc rename to dll/win32/mpr/mpr_Uk.rc diff --git a/reactos/dll/win32/mpr/mpr_Zh.rc b/dll/win32/mpr/mpr_Zh.rc similarity index 100% rename from reactos/dll/win32/mpr/mpr_Zh.rc rename to dll/win32/mpr/mpr_Zh.rc diff --git a/reactos/dll/win32/mpr/mpr_main.c b/dll/win32/mpr/mpr_main.c similarity index 100% rename from reactos/dll/win32/mpr/mpr_main.c rename to dll/win32/mpr/mpr_main.c diff --git a/reactos/dll/win32/mpr/mpr_ros.diff b/dll/win32/mpr/mpr_ros.diff similarity index 100% rename from reactos/dll/win32/mpr/mpr_ros.diff rename to dll/win32/mpr/mpr_ros.diff diff --git a/reactos/dll/win32/mpr/mprres.h b/dll/win32/mpr/mprres.h similarity index 100% rename from reactos/dll/win32/mpr/mprres.h rename to dll/win32/mpr/mprres.h diff --git a/reactos/dll/win32/mpr/multinet.c b/dll/win32/mpr/multinet.c similarity index 100% rename from reactos/dll/win32/mpr/multinet.c rename to dll/win32/mpr/multinet.c diff --git a/reactos/dll/win32/mpr/netspi.h b/dll/win32/mpr/netspi.h similarity index 100% rename from reactos/dll/win32/mpr/netspi.h rename to dll/win32/mpr/netspi.h diff --git a/reactos/dll/win32/mpr/nps.c b/dll/win32/mpr/nps.c similarity index 100% rename from reactos/dll/win32/mpr/nps.c rename to dll/win32/mpr/nps.c diff --git a/reactos/dll/win32/mpr/pwcache.c b/dll/win32/mpr/pwcache.c similarity index 100% rename from reactos/dll/win32/mpr/pwcache.c rename to dll/win32/mpr/pwcache.c diff --git a/reactos/dll/win32/mpr/version.rc b/dll/win32/mpr/version.rc similarity index 100% rename from reactos/dll/win32/mpr/version.rc rename to dll/win32/mpr/version.rc diff --git a/reactos/dll/win32/mpr/wnet.c b/dll/win32/mpr/wnet.c similarity index 100% rename from reactos/dll/win32/mpr/wnet.c rename to dll/win32/mpr/wnet.c diff --git a/reactos/dll/win32/mpr/wnetpriv.h b/dll/win32/mpr/wnetpriv.h similarity index 100% rename from reactos/dll/win32/mpr/wnetpriv.h rename to dll/win32/mpr/wnetpriv.h diff --git a/reactos/dll/win32/mprapi/CMakeLists.txt b/dll/win32/mprapi/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/mprapi/CMakeLists.txt rename to dll/win32/mprapi/CMakeLists.txt diff --git a/reactos/dll/win32/mprapi/mprapi.c b/dll/win32/mprapi/mprapi.c similarity index 100% rename from reactos/dll/win32/mprapi/mprapi.c rename to dll/win32/mprapi/mprapi.c diff --git a/reactos/dll/win32/mprapi/mprapi.rbuild b/dll/win32/mprapi/mprapi.rbuild similarity index 100% rename from reactos/dll/win32/mprapi/mprapi.rbuild rename to dll/win32/mprapi/mprapi.rbuild diff --git a/reactos/dll/win32/mprapi/mprapi.spec b/dll/win32/mprapi/mprapi.spec similarity index 100% rename from reactos/dll/win32/mprapi/mprapi.spec rename to dll/win32/mprapi/mprapi.spec diff --git a/reactos/dll/win32/msacm32/CMakeLists.txt b/dll/win32/msacm32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/msacm32/CMakeLists.txt rename to dll/win32/msacm32/CMakeLists.txt diff --git a/reactos/dll/win32/msacm32/driver.c b/dll/win32/msacm32/driver.c similarity index 100% rename from reactos/dll/win32/msacm32/driver.c rename to dll/win32/msacm32/driver.c diff --git a/reactos/dll/win32/msacm32/filter.c b/dll/win32/msacm32/filter.c similarity index 100% rename from reactos/dll/win32/msacm32/filter.c rename to dll/win32/msacm32/filter.c diff --git a/reactos/dll/win32/msacm32/format.c b/dll/win32/msacm32/format.c similarity index 100% rename from reactos/dll/win32/msacm32/format.c rename to dll/win32/msacm32/format.c diff --git a/reactos/dll/win32/msacm32/imaadp32/Makefile.in b/dll/win32/msacm32/imaadp32/Makefile.in similarity index 100% rename from reactos/dll/win32/msacm32/imaadp32/Makefile.in rename to dll/win32/msacm32/imaadp32/Makefile.in diff --git a/reactos/dll/win32/msacm32/imaadp32/imaadp32.acm.spec b/dll/win32/msacm32/imaadp32/imaadp32.acm.spec similarity index 100% rename from reactos/dll/win32/msacm32/imaadp32/imaadp32.acm.spec rename to dll/win32/msacm32/imaadp32/imaadp32.acm.spec diff --git a/reactos/dll/win32/msacm32/imaadp32/imaadp32.c b/dll/win32/msacm32/imaadp32/imaadp32.c similarity index 100% rename from reactos/dll/win32/msacm32/imaadp32/imaadp32.c rename to dll/win32/msacm32/imaadp32/imaadp32.c diff --git a/reactos/dll/win32/msacm32/internal.c b/dll/win32/msacm32/internal.c similarity index 100% rename from reactos/dll/win32/msacm32/internal.c rename to dll/win32/msacm32/internal.c diff --git a/reactos/dll/win32/msacm32/msacm.rc b/dll/win32/msacm32/msacm.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm.rc rename to dll/win32/msacm32/msacm.rc diff --git a/reactos/dll/win32/msacm32/msacm.spec b/dll/win32/msacm32/msacm.spec similarity index 100% rename from reactos/dll/win32/msacm32/msacm.spec rename to dll/win32/msacm32/msacm.spec diff --git a/reactos/dll/win32/msacm32/msacm.spec.def b/dll/win32/msacm32/msacm.spec.def similarity index 100% rename from reactos/dll/win32/msacm32/msacm.spec.def rename to dll/win32/msacm32/msacm.spec.def diff --git a/reactos/dll/win32/msacm32/msacm32.drv/CMakeLists.txt b/dll/win32/msacm32/msacm32.drv/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/msacm32/msacm32.drv/CMakeLists.txt rename to dll/win32/msacm32/msacm32.drv/CMakeLists.txt diff --git a/reactos/dll/win32/msacm32/msacm32.drv/msacm32.drv.rbuild b/dll/win32/msacm32/msacm32.drv/msacm32.drv.rbuild similarity index 100% rename from reactos/dll/win32/msacm32/msacm32.drv/msacm32.drv.rbuild rename to dll/win32/msacm32/msacm32.drv/msacm32.drv.rbuild diff --git a/reactos/dll/win32/msacm32/msacm32.drv/msacm32.drv.spec b/dll/win32/msacm32/msacm32.drv/msacm32.drv.spec similarity index 100% rename from reactos/dll/win32/msacm32/msacm32.drv/msacm32.drv.spec rename to dll/win32/msacm32/msacm32.drv/msacm32.drv.spec diff --git a/reactos/dll/win32/msacm32/msacm32.drv/wavemap.c b/dll/win32/msacm32/msacm32.drv/wavemap.c similarity index 100% rename from reactos/dll/win32/msacm32/msacm32.drv/wavemap.c rename to dll/win32/msacm32/msacm32.drv/wavemap.c diff --git a/reactos/dll/win32/msacm32/msacm32.drv/wavemap.rc b/dll/win32/msacm32/msacm32.drv/wavemap.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm32.drv/wavemap.rc rename to dll/win32/msacm32/msacm32.drv/wavemap.rc diff --git a/reactos/dll/win32/msacm32/msacm32.rbuild b/dll/win32/msacm32/msacm32.rbuild similarity index 100% rename from reactos/dll/win32/msacm32/msacm32.rbuild rename to dll/win32/msacm32/msacm32.rbuild diff --git a/reactos/dll/win32/msacm32/msacm32.spec b/dll/win32/msacm32/msacm32.spec similarity index 100% rename from reactos/dll/win32/msacm32/msacm32.spec rename to dll/win32/msacm32/msacm32.spec diff --git a/reactos/dll/win32/msacm32/msacm32_main.c b/dll/win32/msacm32/msacm32_main.c similarity index 100% rename from reactos/dll/win32/msacm32/msacm32_main.c rename to dll/win32/msacm32/msacm32_main.c diff --git a/reactos/dll/win32/msacm32/msacm_Bg.rc b/dll/win32/msacm32/msacm_Bg.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm_Bg.rc rename to dll/win32/msacm32/msacm_Bg.rc diff --git a/reactos/dll/win32/msacm32/msacm_Cs.rc b/dll/win32/msacm32/msacm_Cs.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm_Cs.rc rename to dll/win32/msacm32/msacm_Cs.rc diff --git a/reactos/dll/win32/msacm32/msacm_Da.rc b/dll/win32/msacm32/msacm_Da.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm_Da.rc rename to dll/win32/msacm32/msacm_Da.rc diff --git a/reactos/dll/win32/msacm32/msacm_De.rc b/dll/win32/msacm32/msacm_De.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm_De.rc rename to dll/win32/msacm32/msacm_De.rc diff --git a/reactos/dll/win32/msacm32/msacm_El.rc b/dll/win32/msacm32/msacm_El.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm_El.rc rename to dll/win32/msacm32/msacm_El.rc diff --git a/reactos/dll/win32/msacm32/msacm_En.rc b/dll/win32/msacm32/msacm_En.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm_En.rc rename to dll/win32/msacm32/msacm_En.rc diff --git a/reactos/dll/win32/msacm32/msacm_Es.rc b/dll/win32/msacm32/msacm_Es.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm_Es.rc rename to dll/win32/msacm32/msacm_Es.rc diff --git a/reactos/dll/win32/msacm32/msacm_Fr.rc b/dll/win32/msacm32/msacm_Fr.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm_Fr.rc rename to dll/win32/msacm32/msacm_Fr.rc diff --git a/reactos/dll/win32/msacm32/msacm_Hu.rc b/dll/win32/msacm32/msacm_Hu.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm_Hu.rc rename to dll/win32/msacm32/msacm_Hu.rc diff --git a/reactos/dll/win32/msacm32/msacm_It.rc b/dll/win32/msacm32/msacm_It.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm_It.rc rename to dll/win32/msacm32/msacm_It.rc diff --git a/reactos/dll/win32/msacm32/msacm_Ja.rc b/dll/win32/msacm32/msacm_Ja.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm_Ja.rc rename to dll/win32/msacm32/msacm_Ja.rc diff --git a/reactos/dll/win32/msacm32/msacm_Ko.rc b/dll/win32/msacm32/msacm_Ko.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm_Ko.rc rename to dll/win32/msacm32/msacm_Ko.rc diff --git a/reactos/dll/win32/msacm32/msacm_Lt.rc b/dll/win32/msacm32/msacm_Lt.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm_Lt.rc rename to dll/win32/msacm32/msacm_Lt.rc diff --git a/reactos/dll/win32/msacm32/msacm_Nl.rc b/dll/win32/msacm32/msacm_Nl.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm_Nl.rc rename to dll/win32/msacm32/msacm_Nl.rc diff --git a/reactos/dll/win32/msacm32/msacm_No.rc b/dll/win32/msacm32/msacm_No.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm_No.rc rename to dll/win32/msacm32/msacm_No.rc diff --git a/reactos/dll/win32/msacm32/msacm_Pl.rc b/dll/win32/msacm32/msacm_Pl.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm_Pl.rc rename to dll/win32/msacm32/msacm_Pl.rc diff --git a/reactos/dll/win32/msacm32/msacm_Pt.rc b/dll/win32/msacm32/msacm_Pt.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm_Pt.rc rename to dll/win32/msacm32/msacm_Pt.rc diff --git a/reactos/dll/win32/msacm32/msacm_Ro.rc b/dll/win32/msacm32/msacm_Ro.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm_Ro.rc rename to dll/win32/msacm32/msacm_Ro.rc diff --git a/reactos/dll/win32/msacm32/msacm_Ru.rc b/dll/win32/msacm32/msacm_Ru.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm_Ru.rc rename to dll/win32/msacm32/msacm_Ru.rc diff --git a/reactos/dll/win32/msacm32/msacm_Si.rc b/dll/win32/msacm32/msacm_Si.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm_Si.rc rename to dll/win32/msacm32/msacm_Si.rc diff --git a/reactos/dll/win32/msacm32/msacm_Sv.rc b/dll/win32/msacm32/msacm_Sv.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm_Sv.rc rename to dll/win32/msacm32/msacm_Sv.rc diff --git a/reactos/dll/win32/msacm32/msacm_Tr.rc b/dll/win32/msacm32/msacm_Tr.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm_Tr.rc rename to dll/win32/msacm32/msacm_Tr.rc diff --git a/reactos/dll/win32/msacm32/msacm_Uk.rc b/dll/win32/msacm32/msacm_Uk.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm_Uk.rc rename to dll/win32/msacm32/msacm_Uk.rc diff --git a/reactos/dll/win32/msacm32/msacm_Zh.rc b/dll/win32/msacm32/msacm_Zh.rc similarity index 100% rename from reactos/dll/win32/msacm32/msacm_Zh.rc rename to dll/win32/msacm32/msacm_Zh.rc diff --git a/reactos/dll/win32/msacm32/msacm_main.c b/dll/win32/msacm32/msacm_main.c similarity index 100% rename from reactos/dll/win32/msacm32/msacm_main.c rename to dll/win32/msacm32/msacm_main.c diff --git a/reactos/dll/win32/msacm32/msacm_ros.diff b/dll/win32/msacm32/msacm_ros.diff similarity index 100% rename from reactos/dll/win32/msacm32/msacm_ros.diff rename to dll/win32/msacm32/msacm_ros.diff diff --git a/reactos/dll/win32/msacm32/msadp32/Makefile.in b/dll/win32/msacm32/msadp32/Makefile.in similarity index 100% rename from reactos/dll/win32/msacm32/msadp32/Makefile.in rename to dll/win32/msacm32/msadp32/Makefile.in diff --git a/reactos/dll/win32/msacm32/msadp32/msadp32.acm.spec b/dll/win32/msacm32/msadp32/msadp32.acm.spec similarity index 100% rename from reactos/dll/win32/msacm32/msadp32/msadp32.acm.spec rename to dll/win32/msacm32/msadp32/msadp32.acm.spec diff --git a/reactos/dll/win32/msacm32/msadp32/msadp32.c b/dll/win32/msacm32/msadp32/msadp32.c similarity index 100% rename from reactos/dll/win32/msacm32/msadp32/msadp32.c rename to dll/win32/msacm32/msadp32/msadp32.c diff --git a/reactos/dll/win32/msacm32/pcmconverter.c b/dll/win32/msacm32/pcmconverter.c similarity index 100% rename from reactos/dll/win32/msacm32/pcmconverter.c rename to dll/win32/msacm32/pcmconverter.c diff --git a/reactos/dll/win32/msacm32/stream.c b/dll/win32/msacm32/stream.c similarity index 100% rename from reactos/dll/win32/msacm32/stream.c rename to dll/win32/msacm32/stream.c diff --git a/reactos/dll/win32/msacm32/wineacm.h b/dll/win32/msacm32/wineacm.h similarity index 100% rename from reactos/dll/win32/msacm32/wineacm.h rename to dll/win32/msacm32/wineacm.h diff --git a/reactos/dll/win32/msadp32.acm/CMakeLists.txt b/dll/win32/msadp32.acm/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/msadp32.acm/CMakeLists.txt rename to dll/win32/msadp32.acm/CMakeLists.txt diff --git a/reactos/dll/win32/msadp32.acm/msadp32.acm.rbuild b/dll/win32/msadp32.acm/msadp32.acm.rbuild similarity index 100% rename from reactos/dll/win32/msadp32.acm/msadp32.acm.rbuild rename to dll/win32/msadp32.acm/msadp32.acm.rbuild diff --git a/reactos/dll/win32/msadp32.acm/msadp32.acm.spec b/dll/win32/msadp32.acm/msadp32.acm.spec similarity index 100% rename from reactos/dll/win32/msadp32.acm/msadp32.acm.spec rename to dll/win32/msadp32.acm/msadp32.acm.spec diff --git a/reactos/dll/win32/msadp32.acm/msadp32.c b/dll/win32/msadp32.acm/msadp32.c similarity index 100% rename from reactos/dll/win32/msadp32.acm/msadp32.c rename to dll/win32/msadp32.acm/msadp32.c diff --git a/reactos/dll/win32/msafd/CMakeLists.txt b/dll/win32/msafd/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/msafd/CMakeLists.txt rename to dll/win32/msafd/CMakeLists.txt diff --git a/reactos/dll/win32/msafd/include/debug.h b/dll/win32/msafd/include/debug.h similarity index 100% rename from reactos/dll/win32/msafd/include/debug.h rename to dll/win32/msafd/include/debug.h diff --git a/reactos/dll/win32/msafd/include/helpers.h b/dll/win32/msafd/include/helpers.h similarity index 100% rename from reactos/dll/win32/msafd/include/helpers.h rename to dll/win32/msafd/include/helpers.h diff --git a/reactos/dll/win32/msafd/misc/dllmain.c b/dll/win32/msafd/misc/dllmain.c similarity index 100% rename from reactos/dll/win32/msafd/misc/dllmain.c rename to dll/win32/msafd/misc/dllmain.c diff --git a/reactos/dll/win32/msafd/misc/event.c b/dll/win32/msafd/misc/event.c similarity index 100% rename from reactos/dll/win32/msafd/misc/event.c rename to dll/win32/msafd/misc/event.c diff --git a/reactos/dll/win32/msafd/misc/helpers.c b/dll/win32/msafd/misc/helpers.c similarity index 100% rename from reactos/dll/win32/msafd/misc/helpers.c rename to dll/win32/msafd/misc/helpers.c diff --git a/reactos/dll/win32/msafd/misc/sndrcv.c b/dll/win32/msafd/misc/sndrcv.c similarity index 100% rename from reactos/dll/win32/msafd/misc/sndrcv.c rename to dll/win32/msafd/misc/sndrcv.c diff --git a/reactos/dll/win32/msafd/misc/stubs.c b/dll/win32/msafd/misc/stubs.c similarity index 100% rename from reactos/dll/win32/msafd/misc/stubs.c rename to dll/win32/msafd/misc/stubs.c diff --git a/reactos/dll/win32/msafd/msafd.h b/dll/win32/msafd/msafd.h similarity index 100% rename from reactos/dll/win32/msafd/msafd.h rename to dll/win32/msafd/msafd.h diff --git a/reactos/dll/win32/msafd/msafd.rbuild b/dll/win32/msafd/msafd.rbuild similarity index 100% rename from reactos/dll/win32/msafd/msafd.rbuild rename to dll/win32/msafd/msafd.rbuild diff --git a/reactos/dll/win32/msafd/msafd.rc b/dll/win32/msafd/msafd.rc similarity index 100% rename from reactos/dll/win32/msafd/msafd.rc rename to dll/win32/msafd/msafd.rc diff --git a/reactos/dll/win32/msafd/msafd.spec b/dll/win32/msafd/msafd.spec similarity index 100% rename from reactos/dll/win32/msafd/msafd.spec rename to dll/win32/msafd/msafd.spec diff --git a/reactos/dll/win32/mscat32/CMakeLists.txt b/dll/win32/mscat32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/mscat32/CMakeLists.txt rename to dll/win32/mscat32/CMakeLists.txt diff --git a/reactos/dll/win32/mscat32/main.c b/dll/win32/mscat32/main.c similarity index 100% rename from reactos/dll/win32/mscat32/main.c rename to dll/win32/mscat32/main.c diff --git a/reactos/dll/win32/mscat32/mscat32.rbuild b/dll/win32/mscat32/mscat32.rbuild similarity index 100% rename from reactos/dll/win32/mscat32/mscat32.rbuild rename to dll/win32/mscat32/mscat32.rbuild diff --git a/reactos/dll/win32/mscat32/mscat32.spec b/dll/win32/mscat32/mscat32.spec similarity index 100% rename from reactos/dll/win32/mscat32/mscat32.spec rename to dll/win32/mscat32/mscat32.spec diff --git a/reactos/dll/win32/mscms/CMakeLists.txt b/dll/win32/mscms/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/mscms/CMakeLists.txt rename to dll/win32/mscms/CMakeLists.txt diff --git a/reactos/dll/win32/mscms/handle.c b/dll/win32/mscms/handle.c similarity index 100% rename from reactos/dll/win32/mscms/handle.c rename to dll/win32/mscms/handle.c diff --git a/reactos/dll/win32/mscms/icc.c b/dll/win32/mscms/icc.c similarity index 100% rename from reactos/dll/win32/mscms/icc.c rename to dll/win32/mscms/icc.c diff --git a/reactos/dll/win32/mscms/mscms.rbuild b/dll/win32/mscms/mscms.rbuild similarity index 100% rename from reactos/dll/win32/mscms/mscms.rbuild rename to dll/win32/mscms/mscms.rbuild diff --git a/reactos/dll/win32/mscms/mscms.spec b/dll/win32/mscms/mscms.spec similarity index 100% rename from reactos/dll/win32/mscms/mscms.spec rename to dll/win32/mscms/mscms.spec diff --git a/reactos/dll/win32/mscms/mscms_main.c b/dll/win32/mscms/mscms_main.c similarity index 100% rename from reactos/dll/win32/mscms/mscms_main.c rename to dll/win32/mscms/mscms_main.c diff --git a/reactos/dll/win32/mscms/mscms_priv.h b/dll/win32/mscms/mscms_priv.h similarity index 100% rename from reactos/dll/win32/mscms/mscms_priv.h rename to dll/win32/mscms/mscms_priv.h diff --git a/reactos/dll/win32/mscms/profile.c b/dll/win32/mscms/profile.c similarity index 100% rename from reactos/dll/win32/mscms/profile.c rename to dll/win32/mscms/profile.c diff --git a/reactos/dll/win32/mscms/stub.c b/dll/win32/mscms/stub.c similarity index 100% rename from reactos/dll/win32/mscms/stub.c rename to dll/win32/mscms/stub.c diff --git a/reactos/dll/win32/mscms/transform.c b/dll/win32/mscms/transform.c similarity index 100% rename from reactos/dll/win32/mscms/transform.c rename to dll/win32/mscms/transform.c diff --git a/reactos/dll/win32/mscms/version.rc b/dll/win32/mscms/version.rc similarity index 100% rename from reactos/dll/win32/mscms/version.rc rename to dll/win32/mscms/version.rc diff --git a/reactos/dll/win32/mscoree/CMakeLists.txt b/dll/win32/mscoree/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/mscoree/CMakeLists.txt rename to dll/win32/mscoree/CMakeLists.txt diff --git a/reactos/dll/win32/mscoree/corruntimehost.c b/dll/win32/mscoree/corruntimehost.c similarity index 100% rename from reactos/dll/win32/mscoree/corruntimehost.c rename to dll/win32/mscoree/corruntimehost.c diff --git a/reactos/dll/win32/mscoree/mscoree.rbuild b/dll/win32/mscoree/mscoree.rbuild similarity index 100% rename from reactos/dll/win32/mscoree/mscoree.rbuild rename to dll/win32/mscoree/mscoree.rbuild diff --git a/reactos/dll/win32/mscoree/mscoree.spec b/dll/win32/mscoree/mscoree.spec similarity index 100% rename from reactos/dll/win32/mscoree/mscoree.spec rename to dll/win32/mscoree/mscoree.spec diff --git a/reactos/dll/win32/mscoree/mscoree_main.c b/dll/win32/mscoree/mscoree_main.c similarity index 100% rename from reactos/dll/win32/mscoree/mscoree_main.c rename to dll/win32/mscoree/mscoree_main.c diff --git a/reactos/dll/win32/mscoree/mscoree_private.h b/dll/win32/mscoree/mscoree_private.h similarity index 100% rename from reactos/dll/win32/mscoree/mscoree_private.h rename to dll/win32/mscoree/mscoree_private.h diff --git a/reactos/dll/win32/msctf/CMakeLists.txt b/dll/win32/msctf/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/msctf/CMakeLists.txt rename to dll/win32/msctf/CMakeLists.txt diff --git a/reactos/dll/win32/msctf/categorymgr.c b/dll/win32/msctf/categorymgr.c similarity index 100% rename from reactos/dll/win32/msctf/categorymgr.c rename to dll/win32/msctf/categorymgr.c diff --git a/reactos/dll/win32/msctf/compartmentmgr.c b/dll/win32/msctf/compartmentmgr.c similarity index 100% rename from reactos/dll/win32/msctf/compartmentmgr.c rename to dll/win32/msctf/compartmentmgr.c diff --git a/reactos/dll/win32/msctf/context.c b/dll/win32/msctf/context.c similarity index 100% rename from reactos/dll/win32/msctf/context.c rename to dll/win32/msctf/context.c diff --git a/reactos/dll/win32/msctf/displayattributemgr.c b/dll/win32/msctf/displayattributemgr.c similarity index 100% rename from reactos/dll/win32/msctf/displayattributemgr.c rename to dll/win32/msctf/displayattributemgr.c diff --git a/reactos/dll/win32/msctf/documentmgr.c b/dll/win32/msctf/documentmgr.c similarity index 100% rename from reactos/dll/win32/msctf/documentmgr.c rename to dll/win32/msctf/documentmgr.c diff --git a/reactos/dll/win32/msctf/inputprocessor.c b/dll/win32/msctf/inputprocessor.c similarity index 100% rename from reactos/dll/win32/msctf/inputprocessor.c rename to dll/win32/msctf/inputprocessor.c diff --git a/reactos/dll/win32/msctf/langbarmgr.c b/dll/win32/msctf/langbarmgr.c similarity index 100% rename from reactos/dll/win32/msctf/langbarmgr.c rename to dll/win32/msctf/langbarmgr.c diff --git a/reactos/dll/win32/msctf/msctf.c b/dll/win32/msctf/msctf.c similarity index 100% rename from reactos/dll/win32/msctf/msctf.c rename to dll/win32/msctf/msctf.c diff --git a/reactos/dll/win32/msctf/msctf.rbuild b/dll/win32/msctf/msctf.rbuild similarity index 100% rename from reactos/dll/win32/msctf/msctf.rbuild rename to dll/win32/msctf/msctf.rbuild diff --git a/reactos/dll/win32/msctf/msctf.spec b/dll/win32/msctf/msctf.spec similarity index 100% rename from reactos/dll/win32/msctf/msctf.spec rename to dll/win32/msctf/msctf.spec diff --git a/reactos/dll/win32/msctf/msctf_internal.h b/dll/win32/msctf/msctf_internal.h similarity index 100% rename from reactos/dll/win32/msctf/msctf_internal.h rename to dll/win32/msctf/msctf_internal.h diff --git a/reactos/dll/win32/msctf/range.c b/dll/win32/msctf/range.c similarity index 100% rename from reactos/dll/win32/msctf/range.c rename to dll/win32/msctf/range.c diff --git a/reactos/dll/win32/msctf/regsvr.c b/dll/win32/msctf/regsvr.c similarity index 100% rename from reactos/dll/win32/msctf/regsvr.c rename to dll/win32/msctf/regsvr.c diff --git a/reactos/dll/win32/msctf/threadmgr.c b/dll/win32/msctf/threadmgr.c similarity index 100% rename from reactos/dll/win32/msctf/threadmgr.c rename to dll/win32/msctf/threadmgr.c diff --git a/reactos/dll/win32/msctf/version.rc b/dll/win32/msctf/version.rc similarity index 100% rename from reactos/dll/win32/msctf/version.rc rename to dll/win32/msctf/version.rc diff --git a/reactos/dll/win32/msftedit/CMakeLists.txt b/dll/win32/msftedit/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/msftedit/CMakeLists.txt rename to dll/win32/msftedit/CMakeLists.txt diff --git a/reactos/dll/win32/msftedit/msftedit.rbuild b/dll/win32/msftedit/msftedit.rbuild similarity index 100% rename from reactos/dll/win32/msftedit/msftedit.rbuild rename to dll/win32/msftedit/msftedit.rbuild diff --git a/reactos/dll/win32/msftedit/msftedit.spec b/dll/win32/msftedit/msftedit.spec similarity index 100% rename from reactos/dll/win32/msftedit/msftedit.spec rename to dll/win32/msftedit/msftedit.spec diff --git a/reactos/dll/win32/msftedit/msftedit_main.c b/dll/win32/msftedit/msftedit_main.c similarity index 100% rename from reactos/dll/win32/msftedit/msftedit_main.c rename to dll/win32/msftedit/msftedit_main.c diff --git a/reactos/dll/win32/msftedit/version.rc b/dll/win32/msftedit/version.rc similarity index 100% rename from reactos/dll/win32/msftedit/version.rc rename to dll/win32/msftedit/version.rc diff --git a/reactos/dll/win32/msg711.acm/CMakeLists.txt b/dll/win32/msg711.acm/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/msg711.acm/CMakeLists.txt rename to dll/win32/msg711.acm/CMakeLists.txt diff --git a/reactos/dll/win32/msg711.acm/msg711.acm.rbuild b/dll/win32/msg711.acm/msg711.acm.rbuild similarity index 100% rename from reactos/dll/win32/msg711.acm/msg711.acm.rbuild rename to dll/win32/msg711.acm/msg711.acm.rbuild diff --git a/reactos/dll/win32/msg711.acm/msg711.acm.spec b/dll/win32/msg711.acm/msg711.acm.spec similarity index 100% rename from reactos/dll/win32/msg711.acm/msg711.acm.spec rename to dll/win32/msg711.acm/msg711.acm.spec diff --git a/reactos/dll/win32/msg711.acm/msg711.c b/dll/win32/msg711.acm/msg711.c similarity index 100% rename from reactos/dll/win32/msg711.acm/msg711.c rename to dll/win32/msg711.acm/msg711.c diff --git a/reactos/dll/win32/msgina/CMakeLists.txt b/dll/win32/msgina/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/msgina/CMakeLists.txt rename to dll/win32/msgina/CMakeLists.txt diff --git a/reactos/dll/win32/msgina/gui.c b/dll/win32/msgina/gui.c similarity index 100% rename from reactos/dll/win32/msgina/gui.c rename to dll/win32/msgina/gui.c diff --git a/reactos/dll/win32/msgina/lang/bg-BG.rc b/dll/win32/msgina/lang/bg-BG.rc similarity index 100% rename from reactos/dll/win32/msgina/lang/bg-BG.rc rename to dll/win32/msgina/lang/bg-BG.rc diff --git a/reactos/dll/win32/msgina/lang/cs-CZ.rc b/dll/win32/msgina/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/win32/msgina/lang/cs-CZ.rc rename to dll/win32/msgina/lang/cs-CZ.rc diff --git a/reactos/dll/win32/msgina/lang/de-DE.rc b/dll/win32/msgina/lang/de-DE.rc similarity index 100% rename from reactos/dll/win32/msgina/lang/de-DE.rc rename to dll/win32/msgina/lang/de-DE.rc diff --git a/reactos/dll/win32/msgina/lang/en-US.rc b/dll/win32/msgina/lang/en-US.rc similarity index 100% rename from reactos/dll/win32/msgina/lang/en-US.rc rename to dll/win32/msgina/lang/en-US.rc diff --git a/reactos/dll/win32/msgina/lang/es-ES.rc b/dll/win32/msgina/lang/es-ES.rc similarity index 100% rename from reactos/dll/win32/msgina/lang/es-ES.rc rename to dll/win32/msgina/lang/es-ES.rc diff --git a/reactos/dll/win32/msgina/lang/fr-FR.rc b/dll/win32/msgina/lang/fr-FR.rc similarity index 100% rename from reactos/dll/win32/msgina/lang/fr-FR.rc rename to dll/win32/msgina/lang/fr-FR.rc diff --git a/reactos/dll/win32/msgina/lang/id-ID.rc b/dll/win32/msgina/lang/id-ID.rc similarity index 100% rename from reactos/dll/win32/msgina/lang/id-ID.rc rename to dll/win32/msgina/lang/id-ID.rc diff --git a/reactos/dll/win32/msgina/lang/it-IT.rc b/dll/win32/msgina/lang/it-IT.rc similarity index 100% rename from reactos/dll/win32/msgina/lang/it-IT.rc rename to dll/win32/msgina/lang/it-IT.rc diff --git a/reactos/dll/win32/msgina/lang/ja-JP.rc b/dll/win32/msgina/lang/ja-JP.rc similarity index 100% rename from reactos/dll/win32/msgina/lang/ja-JP.rc rename to dll/win32/msgina/lang/ja-JP.rc diff --git a/reactos/dll/win32/msgina/lang/no-NO.rc b/dll/win32/msgina/lang/no-NO.rc similarity index 100% rename from reactos/dll/win32/msgina/lang/no-NO.rc rename to dll/win32/msgina/lang/no-NO.rc diff --git a/reactos/dll/win32/msgina/lang/pl-PL.rc b/dll/win32/msgina/lang/pl-PL.rc similarity index 100% rename from reactos/dll/win32/msgina/lang/pl-PL.rc rename to dll/win32/msgina/lang/pl-PL.rc diff --git a/reactos/dll/win32/msgina/lang/ro-RO.rc b/dll/win32/msgina/lang/ro-RO.rc similarity index 100% rename from reactos/dll/win32/msgina/lang/ro-RO.rc rename to dll/win32/msgina/lang/ro-RO.rc diff --git a/reactos/dll/win32/msgina/lang/ru-RU.rc b/dll/win32/msgina/lang/ru-RU.rc similarity index 100% rename from reactos/dll/win32/msgina/lang/ru-RU.rc rename to dll/win32/msgina/lang/ru-RU.rc diff --git a/reactos/dll/win32/msgina/lang/sk-SK.rc b/dll/win32/msgina/lang/sk-SK.rc similarity index 100% rename from reactos/dll/win32/msgina/lang/sk-SK.rc rename to dll/win32/msgina/lang/sk-SK.rc diff --git a/reactos/dll/win32/msgina/lang/uk-UA.rc b/dll/win32/msgina/lang/uk-UA.rc similarity index 100% rename from reactos/dll/win32/msgina/lang/uk-UA.rc rename to dll/win32/msgina/lang/uk-UA.rc diff --git a/reactos/dll/win32/msgina/msgina.c b/dll/win32/msgina/msgina.c similarity index 100% rename from reactos/dll/win32/msgina/msgina.c rename to dll/win32/msgina/msgina.c diff --git a/reactos/dll/win32/msgina/msgina.h b/dll/win32/msgina/msgina.h similarity index 100% rename from reactos/dll/win32/msgina/msgina.h rename to dll/win32/msgina/msgina.h diff --git a/reactos/dll/win32/msgina/msgina.rbuild b/dll/win32/msgina/msgina.rbuild similarity index 100% rename from reactos/dll/win32/msgina/msgina.rbuild rename to dll/win32/msgina/msgina.rbuild diff --git a/reactos/dll/win32/msgina/msgina.rc b/dll/win32/msgina/msgina.rc similarity index 100% rename from reactos/dll/win32/msgina/msgina.rc rename to dll/win32/msgina/msgina.rc diff --git a/reactos/dll/win32/msgina/msgina.spec b/dll/win32/msgina/msgina.spec similarity index 100% rename from reactos/dll/win32/msgina/msgina.spec rename to dll/win32/msgina/msgina.spec diff --git a/reactos/dll/win32/msgina/resource.h b/dll/win32/msgina/resource.h similarity index 100% rename from reactos/dll/win32/msgina/resource.h rename to dll/win32/msgina/resource.h diff --git a/reactos/dll/win32/msgina/resources/21.ico b/dll/win32/msgina/resources/21.ico similarity index 100% rename from reactos/dll/win32/msgina/resources/21.ico rename to dll/win32/msgina/resources/21.ico diff --git a/reactos/dll/win32/msgina/resources/ico_logoff.ico b/dll/win32/msgina/resources/ico_logoff.ico similarity index 100% rename from reactos/dll/win32/msgina/resources/ico_logoff.ico rename to dll/win32/msgina/resources/ico_logoff.ico diff --git a/reactos/dll/win32/msgina/resources/reactos.bmp b/dll/win32/msgina/resources/reactos.bmp similarity index 100% rename from reactos/dll/win32/msgina/resources/reactos.bmp rename to dll/win32/msgina/resources/reactos.bmp diff --git a/reactos/dll/win32/msgina/stubs.c b/dll/win32/msgina/stubs.c similarity index 100% rename from reactos/dll/win32/msgina/stubs.c rename to dll/win32/msgina/stubs.c diff --git a/reactos/dll/win32/msgina/tui.c b/dll/win32/msgina/tui.c similarity index 100% rename from reactos/dll/win32/msgina/tui.c rename to dll/win32/msgina/tui.c diff --git a/reactos/dll/win32/msgsm32.acm/CMakeLists.txt b/dll/win32/msgsm32.acm/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/msgsm32.acm/CMakeLists.txt rename to dll/win32/msgsm32.acm/CMakeLists.txt diff --git a/reactos/dll/win32/msgsm32.acm/msgsm32.acm.rbuild b/dll/win32/msgsm32.acm/msgsm32.acm.rbuild similarity index 100% rename from reactos/dll/win32/msgsm32.acm/msgsm32.acm.rbuild rename to dll/win32/msgsm32.acm/msgsm32.acm.rbuild diff --git a/reactos/dll/win32/msgsm32.acm/msgsm32.acm.spec b/dll/win32/msgsm32.acm/msgsm32.acm.spec similarity index 100% rename from reactos/dll/win32/msgsm32.acm/msgsm32.acm.spec rename to dll/win32/msgsm32.acm/msgsm32.acm.spec diff --git a/reactos/dll/win32/msgsm32.acm/msgsm32.c b/dll/win32/msgsm32.acm/msgsm32.c similarity index 100% rename from reactos/dll/win32/msgsm32.acm/msgsm32.c rename to dll/win32/msgsm32.acm/msgsm32.c diff --git a/reactos/dll/win32/mshtml.tlb/CMakeLists.txt b/dll/win32/mshtml.tlb/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/mshtml.tlb/CMakeLists.txt rename to dll/win32/mshtml.tlb/CMakeLists.txt diff --git a/reactos/dll/win32/mshtml.tlb/mshtml.tlb.rbuild b/dll/win32/mshtml.tlb/mshtml.tlb.rbuild similarity index 100% rename from reactos/dll/win32/mshtml.tlb/mshtml.tlb.rbuild rename to dll/win32/mshtml.tlb/mshtml.tlb.rbuild diff --git a/reactos/dll/win32/mshtml.tlb/mshtml.tlb.spec b/dll/win32/mshtml.tlb/mshtml.tlb.spec similarity index 100% rename from reactos/dll/win32/mshtml.tlb/mshtml.tlb.spec rename to dll/win32/mshtml.tlb/mshtml.tlb.spec diff --git a/reactos/dll/win32/mshtml.tlb/mshtml_tlb.idl b/dll/win32/mshtml.tlb/mshtml_tlb.idl similarity index 100% rename from reactos/dll/win32/mshtml.tlb/mshtml_tlb.idl rename to dll/win32/mshtml.tlb/mshtml_tlb.idl diff --git a/reactos/dll/win32/mshtml.tlb/rsrc.rc b/dll/win32/mshtml.tlb/rsrc.rc similarity index 100% rename from reactos/dll/win32/mshtml.tlb/rsrc.rc rename to dll/win32/mshtml.tlb/rsrc.rc diff --git a/reactos/dll/win32/mshtml/Bg.rc b/dll/win32/mshtml/Bg.rc similarity index 100% rename from reactos/dll/win32/mshtml/Bg.rc rename to dll/win32/mshtml/Bg.rc diff --git a/reactos/dll/win32/mshtml/CMakeLists.txt b/dll/win32/mshtml/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/mshtml/CMakeLists.txt rename to dll/win32/mshtml/CMakeLists.txt diff --git a/reactos/dll/win32/mshtml/Da.rc b/dll/win32/mshtml/Da.rc similarity index 100% rename from reactos/dll/win32/mshtml/Da.rc rename to dll/win32/mshtml/Da.rc diff --git a/reactos/dll/win32/mshtml/De.rc b/dll/win32/mshtml/De.rc similarity index 100% rename from reactos/dll/win32/mshtml/De.rc rename to dll/win32/mshtml/De.rc diff --git a/reactos/dll/win32/mshtml/En.rc b/dll/win32/mshtml/En.rc similarity index 100% rename from reactos/dll/win32/mshtml/En.rc rename to dll/win32/mshtml/En.rc diff --git a/reactos/dll/win32/mshtml/Es.rc b/dll/win32/mshtml/Es.rc similarity index 100% rename from reactos/dll/win32/mshtml/Es.rc rename to dll/win32/mshtml/Es.rc diff --git a/reactos/dll/win32/mshtml/Fi.rc b/dll/win32/mshtml/Fi.rc similarity index 100% rename from reactos/dll/win32/mshtml/Fi.rc rename to dll/win32/mshtml/Fi.rc diff --git a/reactos/dll/win32/mshtml/Fr.rc b/dll/win32/mshtml/Fr.rc similarity index 100% rename from reactos/dll/win32/mshtml/Fr.rc rename to dll/win32/mshtml/Fr.rc diff --git a/reactos/dll/win32/mshtml/Hu.rc b/dll/win32/mshtml/Hu.rc similarity index 100% rename from reactos/dll/win32/mshtml/Hu.rc rename to dll/win32/mshtml/Hu.rc diff --git a/reactos/dll/win32/mshtml/It.rc b/dll/win32/mshtml/It.rc similarity index 100% rename from reactos/dll/win32/mshtml/It.rc rename to dll/win32/mshtml/It.rc diff --git a/reactos/dll/win32/mshtml/Ja.rc b/dll/win32/mshtml/Ja.rc similarity index 100% rename from reactos/dll/win32/mshtml/Ja.rc rename to dll/win32/mshtml/Ja.rc diff --git a/reactos/dll/win32/mshtml/Ko.rc b/dll/win32/mshtml/Ko.rc similarity index 100% rename from reactos/dll/win32/mshtml/Ko.rc rename to dll/win32/mshtml/Ko.rc diff --git a/reactos/dll/win32/mshtml/Lt.rc b/dll/win32/mshtml/Lt.rc similarity index 100% rename from reactos/dll/win32/mshtml/Lt.rc rename to dll/win32/mshtml/Lt.rc diff --git a/reactos/dll/win32/mshtml/Nl.rc b/dll/win32/mshtml/Nl.rc similarity index 100% rename from reactos/dll/win32/mshtml/Nl.rc rename to dll/win32/mshtml/Nl.rc diff --git a/reactos/dll/win32/mshtml/No.rc b/dll/win32/mshtml/No.rc similarity index 100% rename from reactos/dll/win32/mshtml/No.rc rename to dll/win32/mshtml/No.rc diff --git a/reactos/dll/win32/mshtml/Pl.rc b/dll/win32/mshtml/Pl.rc similarity index 100% rename from reactos/dll/win32/mshtml/Pl.rc rename to dll/win32/mshtml/Pl.rc diff --git a/reactos/dll/win32/mshtml/Pt.rc b/dll/win32/mshtml/Pt.rc similarity index 100% rename from reactos/dll/win32/mshtml/Pt.rc rename to dll/win32/mshtml/Pt.rc diff --git a/reactos/dll/win32/mshtml/Ro.rc b/dll/win32/mshtml/Ro.rc similarity index 100% rename from reactos/dll/win32/mshtml/Ro.rc rename to dll/win32/mshtml/Ro.rc diff --git a/reactos/dll/win32/mshtml/Ru.rc b/dll/win32/mshtml/Ru.rc similarity index 100% rename from reactos/dll/win32/mshtml/Ru.rc rename to dll/win32/mshtml/Ru.rc diff --git a/reactos/dll/win32/mshtml/Si.rc b/dll/win32/mshtml/Si.rc similarity index 100% rename from reactos/dll/win32/mshtml/Si.rc rename to dll/win32/mshtml/Si.rc diff --git a/reactos/dll/win32/mshtml/Sv.rc b/dll/win32/mshtml/Sv.rc similarity index 100% rename from reactos/dll/win32/mshtml/Sv.rc rename to dll/win32/mshtml/Sv.rc diff --git a/reactos/dll/win32/mshtml/Tr.rc b/dll/win32/mshtml/Tr.rc similarity index 100% rename from reactos/dll/win32/mshtml/Tr.rc rename to dll/win32/mshtml/Tr.rc diff --git a/reactos/dll/win32/mshtml/Uk.rc b/dll/win32/mshtml/Uk.rc similarity index 100% rename from reactos/dll/win32/mshtml/Uk.rc rename to dll/win32/mshtml/Uk.rc diff --git a/reactos/dll/win32/mshtml/Zh.rc b/dll/win32/mshtml/Zh.rc similarity index 100% rename from reactos/dll/win32/mshtml/Zh.rc rename to dll/win32/mshtml/Zh.rc diff --git a/reactos/dll/win32/mshtml/blank.htm b/dll/win32/mshtml/blank.htm similarity index 100% rename from reactos/dll/win32/mshtml/blank.htm rename to dll/win32/mshtml/blank.htm diff --git a/reactos/dll/win32/mshtml/conpoint.c b/dll/win32/mshtml/conpoint.c similarity index 100% rename from reactos/dll/win32/mshtml/conpoint.c rename to dll/win32/mshtml/conpoint.c diff --git a/reactos/dll/win32/mshtml/dispex.c b/dll/win32/mshtml/dispex.c similarity index 100% rename from reactos/dll/win32/mshtml/dispex.c rename to dll/win32/mshtml/dispex.c diff --git a/reactos/dll/win32/mshtml/editor.c b/dll/win32/mshtml/editor.c similarity index 100% rename from reactos/dll/win32/mshtml/editor.c rename to dll/win32/mshtml/editor.c diff --git a/reactos/dll/win32/mshtml/hlink.c b/dll/win32/mshtml/hlink.c similarity index 100% rename from reactos/dll/win32/mshtml/hlink.c rename to dll/win32/mshtml/hlink.c diff --git a/reactos/dll/win32/mshtml/htmlanchor.c b/dll/win32/mshtml/htmlanchor.c similarity index 100% rename from reactos/dll/win32/mshtml/htmlanchor.c rename to dll/win32/mshtml/htmlanchor.c diff --git a/reactos/dll/win32/mshtml/htmlbody.c b/dll/win32/mshtml/htmlbody.c similarity index 100% rename from reactos/dll/win32/mshtml/htmlbody.c rename to dll/win32/mshtml/htmlbody.c diff --git a/reactos/dll/win32/mshtml/htmlcomment.c b/dll/win32/mshtml/htmlcomment.c similarity index 100% rename from reactos/dll/win32/mshtml/htmlcomment.c rename to dll/win32/mshtml/htmlcomment.c diff --git a/reactos/dll/win32/mshtml/htmlcurstyle.c b/dll/win32/mshtml/htmlcurstyle.c similarity index 100% rename from reactos/dll/win32/mshtml/htmlcurstyle.c rename to dll/win32/mshtml/htmlcurstyle.c diff --git a/reactos/dll/win32/mshtml/htmldoc.c b/dll/win32/mshtml/htmldoc.c similarity index 100% rename from reactos/dll/win32/mshtml/htmldoc.c rename to dll/win32/mshtml/htmldoc.c diff --git a/reactos/dll/win32/mshtml/htmldoc3.c b/dll/win32/mshtml/htmldoc3.c similarity index 100% rename from reactos/dll/win32/mshtml/htmldoc3.c rename to dll/win32/mshtml/htmldoc3.c diff --git a/reactos/dll/win32/mshtml/htmldoc5.c b/dll/win32/mshtml/htmldoc5.c similarity index 100% rename from reactos/dll/win32/mshtml/htmldoc5.c rename to dll/win32/mshtml/htmldoc5.c diff --git a/reactos/dll/win32/mshtml/htmlelem.c b/dll/win32/mshtml/htmlelem.c similarity index 100% rename from reactos/dll/win32/mshtml/htmlelem.c rename to dll/win32/mshtml/htmlelem.c diff --git a/reactos/dll/win32/mshtml/htmlelem2.c b/dll/win32/mshtml/htmlelem2.c similarity index 100% rename from reactos/dll/win32/mshtml/htmlelem2.c rename to dll/win32/mshtml/htmlelem2.c diff --git a/reactos/dll/win32/mshtml/htmlelem3.c b/dll/win32/mshtml/htmlelem3.c similarity index 100% rename from reactos/dll/win32/mshtml/htmlelem3.c rename to dll/win32/mshtml/htmlelem3.c diff --git a/reactos/dll/win32/mshtml/htmlelemcol.c b/dll/win32/mshtml/htmlelemcol.c similarity index 100% rename from reactos/dll/win32/mshtml/htmlelemcol.c rename to dll/win32/mshtml/htmlelemcol.c diff --git a/reactos/dll/win32/mshtml/htmlevent.c b/dll/win32/mshtml/htmlevent.c similarity index 100% rename from reactos/dll/win32/mshtml/htmlevent.c rename to dll/win32/mshtml/htmlevent.c diff --git a/reactos/dll/win32/mshtml/htmlevent.h b/dll/win32/mshtml/htmlevent.h similarity index 100% rename from reactos/dll/win32/mshtml/htmlevent.h rename to dll/win32/mshtml/htmlevent.h diff --git a/reactos/dll/win32/mshtml/htmlform.c b/dll/win32/mshtml/htmlform.c similarity index 100% rename from reactos/dll/win32/mshtml/htmlform.c rename to dll/win32/mshtml/htmlform.c diff --git a/reactos/dll/win32/mshtml/htmlframe.c b/dll/win32/mshtml/htmlframe.c similarity index 100% rename from reactos/dll/win32/mshtml/htmlframe.c rename to dll/win32/mshtml/htmlframe.c diff --git a/reactos/dll/win32/mshtml/htmlframebase.c b/dll/win32/mshtml/htmlframebase.c similarity index 100% rename from reactos/dll/win32/mshtml/htmlframebase.c rename to dll/win32/mshtml/htmlframebase.c diff --git a/reactos/dll/win32/mshtml/htmlgeneric.c b/dll/win32/mshtml/htmlgeneric.c similarity index 100% rename from reactos/dll/win32/mshtml/htmlgeneric.c rename to dll/win32/mshtml/htmlgeneric.c diff --git a/reactos/dll/win32/mshtml/htmliframe.c b/dll/win32/mshtml/htmliframe.c similarity index 100% rename from reactos/dll/win32/mshtml/htmliframe.c rename to dll/win32/mshtml/htmliframe.c diff --git a/reactos/dll/win32/mshtml/htmlimg.c b/dll/win32/mshtml/htmlimg.c similarity index 100% rename from reactos/dll/win32/mshtml/htmlimg.c rename to dll/win32/mshtml/htmlimg.c diff --git a/reactos/dll/win32/mshtml/htmlinput.c b/dll/win32/mshtml/htmlinput.c similarity index 100% rename from reactos/dll/win32/mshtml/htmlinput.c rename to dll/win32/mshtml/htmlinput.c diff --git a/reactos/dll/win32/mshtml/htmllocation.c b/dll/win32/mshtml/htmllocation.c similarity index 100% rename from reactos/dll/win32/mshtml/htmllocation.c rename to dll/win32/mshtml/htmllocation.c diff --git a/reactos/dll/win32/mshtml/htmlnode.c b/dll/win32/mshtml/htmlnode.c similarity index 100% rename from reactos/dll/win32/mshtml/htmlnode.c rename to dll/win32/mshtml/htmlnode.c diff --git a/reactos/dll/win32/mshtml/htmloption.c b/dll/win32/mshtml/htmloption.c similarity index 100% rename from reactos/dll/win32/mshtml/htmloption.c rename to dll/win32/mshtml/htmloption.c diff --git a/reactos/dll/win32/mshtml/htmlscreen.c b/dll/win32/mshtml/htmlscreen.c similarity index 100% rename from reactos/dll/win32/mshtml/htmlscreen.c rename to dll/win32/mshtml/htmlscreen.c diff --git a/reactos/dll/win32/mshtml/htmlscript.c b/dll/win32/mshtml/htmlscript.c similarity index 100% rename from reactos/dll/win32/mshtml/htmlscript.c rename to dll/win32/mshtml/htmlscript.c diff --git a/reactos/dll/win32/mshtml/htmlselect.c b/dll/win32/mshtml/htmlselect.c similarity index 100% rename from reactos/dll/win32/mshtml/htmlselect.c rename to dll/win32/mshtml/htmlselect.c diff --git a/reactos/dll/win32/mshtml/htmlstyle.c b/dll/win32/mshtml/htmlstyle.c similarity index 100% rename from reactos/dll/win32/mshtml/htmlstyle.c rename to dll/win32/mshtml/htmlstyle.c diff --git a/reactos/dll/win32/mshtml/htmlstyle.h b/dll/win32/mshtml/htmlstyle.h similarity index 100% rename from reactos/dll/win32/mshtml/htmlstyle.h rename to dll/win32/mshtml/htmlstyle.h diff --git a/reactos/dll/win32/mshtml/htmlstyle2.c b/dll/win32/mshtml/htmlstyle2.c similarity index 100% rename from reactos/dll/win32/mshtml/htmlstyle2.c rename to dll/win32/mshtml/htmlstyle2.c diff --git a/reactos/dll/win32/mshtml/htmlstyle3.c b/dll/win32/mshtml/htmlstyle3.c similarity index 100% rename from reactos/dll/win32/mshtml/htmlstyle3.c rename to dll/win32/mshtml/htmlstyle3.c diff --git a/reactos/dll/win32/mshtml/htmlstylesheet.c b/dll/win32/mshtml/htmlstylesheet.c similarity index 100% rename from reactos/dll/win32/mshtml/htmlstylesheet.c rename to dll/win32/mshtml/htmlstylesheet.c diff --git a/reactos/dll/win32/mshtml/htmltable.c b/dll/win32/mshtml/htmltable.c similarity index 100% rename from reactos/dll/win32/mshtml/htmltable.c rename to dll/win32/mshtml/htmltable.c diff --git a/reactos/dll/win32/mshtml/htmltablerow.c b/dll/win32/mshtml/htmltablerow.c similarity index 100% rename from reactos/dll/win32/mshtml/htmltablerow.c rename to dll/win32/mshtml/htmltablerow.c diff --git a/reactos/dll/win32/mshtml/htmltextarea.c b/dll/win32/mshtml/htmltextarea.c similarity index 100% rename from reactos/dll/win32/mshtml/htmltextarea.c rename to dll/win32/mshtml/htmltextarea.c diff --git a/reactos/dll/win32/mshtml/htmltextcont.c b/dll/win32/mshtml/htmltextcont.c similarity index 100% rename from reactos/dll/win32/mshtml/htmltextcont.c rename to dll/win32/mshtml/htmltextcont.c diff --git a/reactos/dll/win32/mshtml/htmltextnode.c b/dll/win32/mshtml/htmltextnode.c similarity index 100% rename from reactos/dll/win32/mshtml/htmltextnode.c rename to dll/win32/mshtml/htmltextnode.c diff --git a/reactos/dll/win32/mshtml/htmlwindow.c b/dll/win32/mshtml/htmlwindow.c similarity index 100% rename from reactos/dll/win32/mshtml/htmlwindow.c rename to dll/win32/mshtml/htmlwindow.c diff --git a/reactos/dll/win32/mshtml/install.c b/dll/win32/mshtml/install.c similarity index 100% rename from reactos/dll/win32/mshtml/install.c rename to dll/win32/mshtml/install.c diff --git a/reactos/dll/win32/mshtml/loadopts.c b/dll/win32/mshtml/loadopts.c similarity index 100% rename from reactos/dll/win32/mshtml/loadopts.c rename to dll/win32/mshtml/loadopts.c diff --git a/reactos/dll/win32/mshtml/main.c b/dll/win32/mshtml/main.c similarity index 100% rename from reactos/dll/win32/mshtml/main.c rename to dll/win32/mshtml/main.c diff --git a/reactos/dll/win32/mshtml/mshtml.inf b/dll/win32/mshtml/mshtml.inf similarity index 100% rename from reactos/dll/win32/mshtml/mshtml.inf rename to dll/win32/mshtml/mshtml.inf diff --git a/reactos/dll/win32/mshtml/mshtml.rbuild b/dll/win32/mshtml/mshtml.rbuild similarity index 100% rename from reactos/dll/win32/mshtml/mshtml.rbuild rename to dll/win32/mshtml/mshtml.rbuild diff --git a/reactos/dll/win32/mshtml/mshtml.spec b/dll/win32/mshtml/mshtml.spec similarity index 100% rename from reactos/dll/win32/mshtml/mshtml.spec rename to dll/win32/mshtml/mshtml.spec diff --git a/reactos/dll/win32/mshtml/mshtml_private.h b/dll/win32/mshtml/mshtml_private.h similarity index 100% rename from reactos/dll/win32/mshtml/mshtml_private.h rename to dll/win32/mshtml/mshtml_private.h diff --git a/reactos/dll/win32/mshtml/mutation.c b/dll/win32/mshtml/mutation.c similarity index 100% rename from reactos/dll/win32/mshtml/mutation.c rename to dll/win32/mshtml/mutation.c diff --git a/reactos/dll/win32/mshtml/navigate.c b/dll/win32/mshtml/navigate.c similarity index 100% rename from reactos/dll/win32/mshtml/navigate.c rename to dll/win32/mshtml/navigate.c diff --git a/reactos/dll/win32/mshtml/nsembed.c b/dll/win32/mshtml/nsembed.c similarity index 100% rename from reactos/dll/win32/mshtml/nsembed.c rename to dll/win32/mshtml/nsembed.c diff --git a/reactos/dll/win32/mshtml/nsevents.c b/dll/win32/mshtml/nsevents.c similarity index 100% rename from reactos/dll/win32/mshtml/nsevents.c rename to dll/win32/mshtml/nsevents.c diff --git a/reactos/dll/win32/mshtml/nsiface.idl b/dll/win32/mshtml/nsiface.idl similarity index 100% rename from reactos/dll/win32/mshtml/nsiface.idl rename to dll/win32/mshtml/nsiface.idl diff --git a/reactos/dll/win32/mshtml/nsio.c b/dll/win32/mshtml/nsio.c similarity index 100% rename from reactos/dll/win32/mshtml/nsio.c rename to dll/win32/mshtml/nsio.c diff --git a/reactos/dll/win32/mshtml/nsservice.c b/dll/win32/mshtml/nsservice.c similarity index 100% rename from reactos/dll/win32/mshtml/nsservice.c rename to dll/win32/mshtml/nsservice.c diff --git a/reactos/dll/win32/mshtml/olecmd.c b/dll/win32/mshtml/olecmd.c similarity index 100% rename from reactos/dll/win32/mshtml/olecmd.c rename to dll/win32/mshtml/olecmd.c diff --git a/reactos/dll/win32/mshtml/oleobj.c b/dll/win32/mshtml/oleobj.c similarity index 100% rename from reactos/dll/win32/mshtml/oleobj.c rename to dll/win32/mshtml/oleobj.c diff --git a/reactos/dll/win32/mshtml/olewnd.c b/dll/win32/mshtml/olewnd.c similarity index 100% rename from reactos/dll/win32/mshtml/olewnd.c rename to dll/win32/mshtml/olewnd.c diff --git a/reactos/dll/win32/mshtml/omnavigator.c b/dll/win32/mshtml/omnavigator.c similarity index 100% rename from reactos/dll/win32/mshtml/omnavigator.c rename to dll/win32/mshtml/omnavigator.c diff --git a/reactos/dll/win32/mshtml/persist.c b/dll/win32/mshtml/persist.c similarity index 100% rename from reactos/dll/win32/mshtml/persist.c rename to dll/win32/mshtml/persist.c diff --git a/reactos/dll/win32/mshtml/protocol.c b/dll/win32/mshtml/protocol.c similarity index 100% rename from reactos/dll/win32/mshtml/protocol.c rename to dll/win32/mshtml/protocol.c diff --git a/reactos/dll/win32/mshtml/resource.h b/dll/win32/mshtml/resource.h similarity index 100% rename from reactos/dll/win32/mshtml/resource.h rename to dll/win32/mshtml/resource.h diff --git a/reactos/dll/win32/mshtml/ros_diff.patch b/dll/win32/mshtml/ros_diff.patch similarity index 100% rename from reactos/dll/win32/mshtml/ros_diff.patch rename to dll/win32/mshtml/ros_diff.patch diff --git a/reactos/dll/win32/mshtml/rsrc.rc b/dll/win32/mshtml/rsrc.rc similarity index 100% rename from reactos/dll/win32/mshtml/rsrc.rc rename to dll/win32/mshtml/rsrc.rc diff --git a/reactos/dll/win32/mshtml/script.c b/dll/win32/mshtml/script.c similarity index 100% rename from reactos/dll/win32/mshtml/script.c rename to dll/win32/mshtml/script.c diff --git a/reactos/dll/win32/mshtml/secmgr.c b/dll/win32/mshtml/secmgr.c similarity index 100% rename from reactos/dll/win32/mshtml/secmgr.c rename to dll/win32/mshtml/secmgr.c diff --git a/reactos/dll/win32/mshtml/selection.c b/dll/win32/mshtml/selection.c similarity index 100% rename from reactos/dll/win32/mshtml/selection.c rename to dll/win32/mshtml/selection.c diff --git a/reactos/dll/win32/mshtml/service.c b/dll/win32/mshtml/service.c similarity index 100% rename from reactos/dll/win32/mshtml/service.c rename to dll/win32/mshtml/service.c diff --git a/reactos/dll/win32/mshtml/task.c b/dll/win32/mshtml/task.c similarity index 100% rename from reactos/dll/win32/mshtml/task.c rename to dll/win32/mshtml/task.c diff --git a/reactos/dll/win32/mshtml/txtrange.c b/dll/win32/mshtml/txtrange.c similarity index 100% rename from reactos/dll/win32/mshtml/txtrange.c rename to dll/win32/mshtml/txtrange.c diff --git a/reactos/dll/win32/mshtml/view.c b/dll/win32/mshtml/view.c similarity index 100% rename from reactos/dll/win32/mshtml/view.c rename to dll/win32/mshtml/view.c diff --git a/reactos/dll/win32/msi/CMakeLists.txt b/dll/win32/msi/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/msi/CMakeLists.txt rename to dll/win32/msi/CMakeLists.txt diff --git a/reactos/dll/win32/msi/action.c b/dll/win32/msi/action.c similarity index 100% rename from reactos/dll/win32/msi/action.c rename to dll/win32/msi/action.c diff --git a/reactos/dll/win32/msi/alter.c b/dll/win32/msi/alter.c similarity index 100% rename from reactos/dll/win32/msi/alter.c rename to dll/win32/msi/alter.c diff --git a/reactos/dll/win32/msi/appsearch.c b/dll/win32/msi/appsearch.c similarity index 100% rename from reactos/dll/win32/msi/appsearch.c rename to dll/win32/msi/appsearch.c diff --git a/reactos/dll/win32/msi/assembly.c b/dll/win32/msi/assembly.c similarity index 100% rename from reactos/dll/win32/msi/assembly.c rename to dll/win32/msi/assembly.c diff --git a/reactos/dll/win32/msi/automation.c b/dll/win32/msi/automation.c similarity index 100% rename from reactos/dll/win32/msi/automation.c rename to dll/win32/msi/automation.c diff --git a/reactos/dll/win32/msi/classes.c b/dll/win32/msi/classes.c similarity index 100% rename from reactos/dll/win32/msi/classes.c rename to dll/win32/msi/classes.c diff --git a/reactos/dll/win32/msi/cond.tab.c b/dll/win32/msi/cond.tab.c similarity index 100% rename from reactos/dll/win32/msi/cond.tab.c rename to dll/win32/msi/cond.tab.c diff --git a/reactos/dll/win32/msi/cond.tab.h b/dll/win32/msi/cond.tab.h similarity index 100% rename from reactos/dll/win32/msi/cond.tab.h rename to dll/win32/msi/cond.tab.h diff --git a/reactos/dll/win32/msi/cond.y b/dll/win32/msi/cond.y similarity index 100% rename from reactos/dll/win32/msi/cond.y rename to dll/win32/msi/cond.y diff --git a/reactos/dll/win32/msi/create.c b/dll/win32/msi/create.c similarity index 100% rename from reactos/dll/win32/msi/create.c rename to dll/win32/msi/create.c diff --git a/reactos/dll/win32/msi/custom.c b/dll/win32/msi/custom.c similarity index 100% rename from reactos/dll/win32/msi/custom.c rename to dll/win32/msi/custom.c diff --git a/reactos/dll/win32/msi/database.c b/dll/win32/msi/database.c similarity index 100% rename from reactos/dll/win32/msi/database.c rename to dll/win32/msi/database.c diff --git a/reactos/dll/win32/msi/delete.c b/dll/win32/msi/delete.c similarity index 100% rename from reactos/dll/win32/msi/delete.c rename to dll/win32/msi/delete.c diff --git a/reactos/dll/win32/msi/dialog.c b/dll/win32/msi/dialog.c similarity index 100% rename from reactos/dll/win32/msi/dialog.c rename to dll/win32/msi/dialog.c diff --git a/reactos/dll/win32/msi/distinct.c b/dll/win32/msi/distinct.c similarity index 100% rename from reactos/dll/win32/msi/distinct.c rename to dll/win32/msi/distinct.c diff --git a/reactos/dll/win32/msi/drop.c b/dll/win32/msi/drop.c similarity index 100% rename from reactos/dll/win32/msi/drop.c rename to dll/win32/msi/drop.c diff --git a/reactos/dll/win32/msi/events.c b/dll/win32/msi/events.c similarity index 100% rename from reactos/dll/win32/msi/events.c rename to dll/win32/msi/events.c diff --git a/reactos/dll/win32/msi/files.c b/dll/win32/msi/files.c similarity index 100% rename from reactos/dll/win32/msi/files.c rename to dll/win32/msi/files.c diff --git a/reactos/dll/win32/msi/font.c b/dll/win32/msi/font.c similarity index 100% rename from reactos/dll/win32/msi/font.c rename to dll/win32/msi/font.c diff --git a/reactos/dll/win32/msi/format.c b/dll/win32/msi/format.c similarity index 100% rename from reactos/dll/win32/msi/format.c rename to dll/win32/msi/format.c diff --git a/reactos/dll/win32/msi/handle.c b/dll/win32/msi/handle.c similarity index 100% rename from reactos/dll/win32/msi/handle.c rename to dll/win32/msi/handle.c diff --git a/reactos/dll/win32/msi/helpers.c b/dll/win32/msi/helpers.c similarity index 100% rename from reactos/dll/win32/msi/helpers.c rename to dll/win32/msi/helpers.c diff --git a/reactos/dll/win32/msi/insert.c b/dll/win32/msi/insert.c similarity index 100% rename from reactos/dll/win32/msi/insert.c rename to dll/win32/msi/insert.c diff --git a/reactos/dll/win32/msi/instabsent.bmp b/dll/win32/msi/instabsent.bmp similarity index 100% rename from reactos/dll/win32/msi/instabsent.bmp rename to dll/win32/msi/instabsent.bmp diff --git a/reactos/dll/win32/msi/instadvert.bmp b/dll/win32/msi/instadvert.bmp similarity index 100% rename from reactos/dll/win32/msi/instadvert.bmp rename to dll/win32/msi/instadvert.bmp diff --git a/reactos/dll/win32/msi/install.c b/dll/win32/msi/install.c similarity index 100% rename from reactos/dll/win32/msi/install.c rename to dll/win32/msi/install.c diff --git a/reactos/dll/win32/msi/instlocal.bmp b/dll/win32/msi/instlocal.bmp similarity index 100% rename from reactos/dll/win32/msi/instlocal.bmp rename to dll/win32/msi/instlocal.bmp diff --git a/reactos/dll/win32/msi/join.c b/dll/win32/msi/join.c similarity index 100% rename from reactos/dll/win32/msi/join.c rename to dll/win32/msi/join.c diff --git a/reactos/dll/win32/msi/media.c b/dll/win32/msi/media.c similarity index 100% rename from reactos/dll/win32/msi/media.c rename to dll/win32/msi/media.c diff --git a/reactos/dll/win32/msi/msi.c b/dll/win32/msi/msi.c similarity index 100% rename from reactos/dll/win32/msi/msi.c rename to dll/win32/msi/msi.c diff --git a/reactos/dll/win32/msi/msi.rbuild b/dll/win32/msi/msi.rbuild similarity index 100% rename from reactos/dll/win32/msi/msi.rbuild rename to dll/win32/msi/msi.rbuild diff --git a/reactos/dll/win32/msi/msi.rc b/dll/win32/msi/msi.rc similarity index 100% rename from reactos/dll/win32/msi/msi.rc rename to dll/win32/msi/msi.rc diff --git a/reactos/dll/win32/msi/msi.spec b/dll/win32/msi/msi.spec similarity index 100% rename from reactos/dll/win32/msi/msi.spec rename to dll/win32/msi/msi.spec diff --git a/reactos/dll/win32/msi/msi_Bg.rc b/dll/win32/msi/msi_Bg.rc similarity index 100% rename from reactos/dll/win32/msi/msi_Bg.rc rename to dll/win32/msi/msi_Bg.rc diff --git a/reactos/dll/win32/msi/msi_Da.rc b/dll/win32/msi/msi_Da.rc similarity index 100% rename from reactos/dll/win32/msi/msi_Da.rc rename to dll/win32/msi/msi_Da.rc diff --git a/reactos/dll/win32/msi/msi_De.rc b/dll/win32/msi/msi_De.rc similarity index 100% rename from reactos/dll/win32/msi/msi_De.rc rename to dll/win32/msi/msi_De.rc diff --git a/reactos/dll/win32/msi/msi_En.rc b/dll/win32/msi/msi_En.rc similarity index 100% rename from reactos/dll/win32/msi/msi_En.rc rename to dll/win32/msi/msi_En.rc diff --git a/reactos/dll/win32/msi/msi_Es.rc b/dll/win32/msi/msi_Es.rc similarity index 100% rename from reactos/dll/win32/msi/msi_Es.rc rename to dll/win32/msi/msi_Es.rc diff --git a/reactos/dll/win32/msi/msi_Fi.rc b/dll/win32/msi/msi_Fi.rc similarity index 100% rename from reactos/dll/win32/msi/msi_Fi.rc rename to dll/win32/msi/msi_Fi.rc diff --git a/reactos/dll/win32/msi/msi_Fr.rc b/dll/win32/msi/msi_Fr.rc similarity index 100% rename from reactos/dll/win32/msi/msi_Fr.rc rename to dll/win32/msi/msi_Fr.rc diff --git a/reactos/dll/win32/msi/msi_Hu.rc b/dll/win32/msi/msi_Hu.rc similarity index 100% rename from reactos/dll/win32/msi/msi_Hu.rc rename to dll/win32/msi/msi_Hu.rc diff --git a/reactos/dll/win32/msi/msi_It.rc b/dll/win32/msi/msi_It.rc similarity index 100% rename from reactos/dll/win32/msi/msi_It.rc rename to dll/win32/msi/msi_It.rc diff --git a/reactos/dll/win32/msi/msi_Ja.rc b/dll/win32/msi/msi_Ja.rc similarity index 100% rename from reactos/dll/win32/msi/msi_Ja.rc rename to dll/win32/msi/msi_Ja.rc diff --git a/reactos/dll/win32/msi/msi_Ko.rc b/dll/win32/msi/msi_Ko.rc similarity index 100% rename from reactos/dll/win32/msi/msi_Ko.rc rename to dll/win32/msi/msi_Ko.rc diff --git a/reactos/dll/win32/msi/msi_Lt.rc b/dll/win32/msi/msi_Lt.rc similarity index 100% rename from reactos/dll/win32/msi/msi_Lt.rc rename to dll/win32/msi/msi_Lt.rc diff --git a/reactos/dll/win32/msi/msi_Nl.rc b/dll/win32/msi/msi_Nl.rc similarity index 100% rename from reactos/dll/win32/msi/msi_Nl.rc rename to dll/win32/msi/msi_Nl.rc diff --git a/reactos/dll/win32/msi/msi_No.rc b/dll/win32/msi/msi_No.rc similarity index 100% rename from reactos/dll/win32/msi/msi_No.rc rename to dll/win32/msi/msi_No.rc diff --git a/reactos/dll/win32/msi/msi_Pl.rc b/dll/win32/msi/msi_Pl.rc similarity index 100% rename from reactos/dll/win32/msi/msi_Pl.rc rename to dll/win32/msi/msi_Pl.rc diff --git a/reactos/dll/win32/msi/msi_Pt.rc b/dll/win32/msi/msi_Pt.rc similarity index 100% rename from reactos/dll/win32/msi/msi_Pt.rc rename to dll/win32/msi/msi_Pt.rc diff --git a/reactos/dll/win32/msi/msi_Ro.rc b/dll/win32/msi/msi_Ro.rc similarity index 100% rename from reactos/dll/win32/msi/msi_Ro.rc rename to dll/win32/msi/msi_Ro.rc diff --git a/reactos/dll/win32/msi/msi_Ru.rc b/dll/win32/msi/msi_Ru.rc similarity index 100% rename from reactos/dll/win32/msi/msi_Ru.rc rename to dll/win32/msi/msi_Ru.rc diff --git a/reactos/dll/win32/msi/msi_Si.rc b/dll/win32/msi/msi_Si.rc similarity index 100% rename from reactos/dll/win32/msi/msi_Si.rc rename to dll/win32/msi/msi_Si.rc diff --git a/reactos/dll/win32/msi/msi_Sr.rc b/dll/win32/msi/msi_Sr.rc similarity index 100% rename from reactos/dll/win32/msi/msi_Sr.rc rename to dll/win32/msi/msi_Sr.rc diff --git a/reactos/dll/win32/msi/msi_Sv.rc b/dll/win32/msi/msi_Sv.rc similarity index 100% rename from reactos/dll/win32/msi/msi_Sv.rc rename to dll/win32/msi/msi_Sv.rc diff --git a/reactos/dll/win32/msi/msi_Tr.rc b/dll/win32/msi/msi_Tr.rc similarity index 100% rename from reactos/dll/win32/msi/msi_Tr.rc rename to dll/win32/msi/msi_Tr.rc diff --git a/reactos/dll/win32/msi/msi_Uk.rc b/dll/win32/msi/msi_Uk.rc similarity index 100% rename from reactos/dll/win32/msi/msi_Uk.rc rename to dll/win32/msi/msi_Uk.rc diff --git a/reactos/dll/win32/msi/msi_Zh.rc b/dll/win32/msi/msi_Zh.rc similarity index 100% rename from reactos/dll/win32/msi/msi_Zh.rc rename to dll/win32/msi/msi_Zh.rc diff --git a/reactos/dll/win32/msi/msi_main.c b/dll/win32/msi/msi_main.c similarity index 100% rename from reactos/dll/win32/msi/msi_main.c rename to dll/win32/msi/msi_main.c diff --git a/reactos/dll/win32/msi/msi_ros.diff b/dll/win32/msi/msi_ros.diff similarity index 100% rename from reactos/dll/win32/msi/msi_ros.diff rename to dll/win32/msi/msi_ros.diff diff --git a/reactos/dll/win32/msi/msipriv.h b/dll/win32/msi/msipriv.h similarity index 100% rename from reactos/dll/win32/msi/msipriv.h rename to dll/win32/msi/msipriv.h diff --git a/reactos/dll/win32/msi/msiquery.c b/dll/win32/msi/msiquery.c similarity index 100% rename from reactos/dll/win32/msi/msiquery.c rename to dll/win32/msi/msiquery.c diff --git a/reactos/dll/win32/msi/msiserver.idl b/dll/win32/msi/msiserver.idl similarity index 100% rename from reactos/dll/win32/msi/msiserver.idl rename to dll/win32/msi/msiserver.idl diff --git a/reactos/dll/win32/msi/msiserver_dispids.h b/dll/win32/msi/msiserver_dispids.h similarity index 100% rename from reactos/dll/win32/msi/msiserver_dispids.h rename to dll/win32/msi/msiserver_dispids.h diff --git a/reactos/dll/win32/msi/msvchelper.h b/dll/win32/msi/msvchelper.h similarity index 100% rename from reactos/dll/win32/msi/msvchelper.h rename to dll/win32/msi/msvchelper.h diff --git a/reactos/dll/win32/msi/package.c b/dll/win32/msi/package.c similarity index 100% rename from reactos/dll/win32/msi/package.c rename to dll/win32/msi/package.c diff --git a/reactos/dll/win32/msi/preview.c b/dll/win32/msi/preview.c similarity index 100% rename from reactos/dll/win32/msi/preview.c rename to dll/win32/msi/preview.c diff --git a/reactos/dll/win32/msi/query.h b/dll/win32/msi/query.h similarity index 100% rename from reactos/dll/win32/msi/query.h rename to dll/win32/msi/query.h diff --git a/reactos/dll/win32/msi/record.c b/dll/win32/msi/record.c similarity index 100% rename from reactos/dll/win32/msi/record.c rename to dll/win32/msi/record.c diff --git a/reactos/dll/win32/msi/registry.c b/dll/win32/msi/registry.c similarity index 100% rename from reactos/dll/win32/msi/registry.c rename to dll/win32/msi/registry.c diff --git a/reactos/dll/win32/msi/regsvr.c b/dll/win32/msi/regsvr.c similarity index 100% rename from reactos/dll/win32/msi/regsvr.c rename to dll/win32/msi/regsvr.c diff --git a/reactos/dll/win32/msi/script.c b/dll/win32/msi/script.c similarity index 100% rename from reactos/dll/win32/msi/script.c rename to dll/win32/msi/script.c diff --git a/reactos/dll/win32/msi/select.c b/dll/win32/msi/select.c similarity index 100% rename from reactos/dll/win32/msi/select.c rename to dll/win32/msi/select.c diff --git a/reactos/dll/win32/msi/source.c b/dll/win32/msi/source.c similarity index 100% rename from reactos/dll/win32/msi/source.c rename to dll/win32/msi/source.c diff --git a/reactos/dll/win32/msi/sql.tab.c b/dll/win32/msi/sql.tab.c similarity index 100% rename from reactos/dll/win32/msi/sql.tab.c rename to dll/win32/msi/sql.tab.c diff --git a/reactos/dll/win32/msi/sql.tab.h b/dll/win32/msi/sql.tab.h similarity index 100% rename from reactos/dll/win32/msi/sql.tab.h rename to dll/win32/msi/sql.tab.h diff --git a/reactos/dll/win32/msi/sql.y b/dll/win32/msi/sql.y similarity index 100% rename from reactos/dll/win32/msi/sql.y rename to dll/win32/msi/sql.y diff --git a/reactos/dll/win32/msi/storages.c b/dll/win32/msi/storages.c similarity index 100% rename from reactos/dll/win32/msi/storages.c rename to dll/win32/msi/storages.c diff --git a/reactos/dll/win32/msi/streams.c b/dll/win32/msi/streams.c similarity index 100% rename from reactos/dll/win32/msi/streams.c rename to dll/win32/msi/streams.c diff --git a/reactos/dll/win32/msi/string.c b/dll/win32/msi/string.c similarity index 100% rename from reactos/dll/win32/msi/string.c rename to dll/win32/msi/string.c diff --git a/reactos/dll/win32/msi/suminfo.c b/dll/win32/msi/suminfo.c similarity index 100% rename from reactos/dll/win32/msi/suminfo.c rename to dll/win32/msi/suminfo.c diff --git a/reactos/dll/win32/msi/table.c b/dll/win32/msi/table.c similarity index 100% rename from reactos/dll/win32/msi/table.c rename to dll/win32/msi/table.c diff --git a/reactos/dll/win32/msi/tokenize.c b/dll/win32/msi/tokenize.c similarity index 100% rename from reactos/dll/win32/msi/tokenize.c rename to dll/win32/msi/tokenize.c diff --git a/reactos/dll/win32/msi/update.c b/dll/win32/msi/update.c similarity index 100% rename from reactos/dll/win32/msi/update.c rename to dll/win32/msi/update.c diff --git a/reactos/dll/win32/msi/upgrade.c b/dll/win32/msi/upgrade.c similarity index 100% rename from reactos/dll/win32/msi/upgrade.c rename to dll/win32/msi/upgrade.c diff --git a/reactos/dll/win32/msi/version.rc b/dll/win32/msi/version.rc similarity index 100% rename from reactos/dll/win32/msi/version.rc rename to dll/win32/msi/version.rc diff --git a/reactos/dll/win32/msi/where.c b/dll/win32/msi/where.c similarity index 100% rename from reactos/dll/win32/msi/where.c rename to dll/win32/msi/where.c diff --git a/reactos/dll/win32/msimg32/CMakeLists.txt b/dll/win32/msimg32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/msimg32/CMakeLists.txt rename to dll/win32/msimg32/CMakeLists.txt diff --git a/reactos/dll/win32/msimg32/msimg32.rbuild b/dll/win32/msimg32/msimg32.rbuild similarity index 100% rename from reactos/dll/win32/msimg32/msimg32.rbuild rename to dll/win32/msimg32/msimg32.rbuild diff --git a/reactos/dll/win32/msimg32/msimg32.spec b/dll/win32/msimg32/msimg32.spec similarity index 100% rename from reactos/dll/win32/msimg32/msimg32.spec rename to dll/win32/msimg32/msimg32.spec diff --git a/reactos/dll/win32/msimg32/msimg32_main.c b/dll/win32/msimg32/msimg32_main.c similarity index 100% rename from reactos/dll/win32/msimg32/msimg32_main.c rename to dll/win32/msimg32/msimg32_main.c diff --git a/reactos/dll/win32/msimtf/CMakeLists.txt b/dll/win32/msimtf/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/msimtf/CMakeLists.txt rename to dll/win32/msimtf/CMakeLists.txt diff --git a/reactos/dll/win32/msimtf/activeimmapp.c b/dll/win32/msimtf/activeimmapp.c similarity index 100% rename from reactos/dll/win32/msimtf/activeimmapp.c rename to dll/win32/msimtf/activeimmapp.c diff --git a/reactos/dll/win32/msimtf/main.c b/dll/win32/msimtf/main.c similarity index 100% rename from reactos/dll/win32/msimtf/main.c rename to dll/win32/msimtf/main.c diff --git a/reactos/dll/win32/msimtf/msimtf.inf b/dll/win32/msimtf/msimtf.inf similarity index 100% rename from reactos/dll/win32/msimtf/msimtf.inf rename to dll/win32/msimtf/msimtf.inf diff --git a/reactos/dll/win32/msimtf/msimtf.rbuild b/dll/win32/msimtf/msimtf.rbuild similarity index 100% rename from reactos/dll/win32/msimtf/msimtf.rbuild rename to dll/win32/msimtf/msimtf.rbuild diff --git a/reactos/dll/win32/msimtf/msimtf.spec b/dll/win32/msimtf/msimtf.spec similarity index 100% rename from reactos/dll/win32/msimtf/msimtf.spec rename to dll/win32/msimtf/msimtf.spec diff --git a/reactos/dll/win32/msimtf/msimtf_ros.diff b/dll/win32/msimtf/msimtf_ros.diff similarity index 100% rename from reactos/dll/win32/msimtf/msimtf_ros.diff rename to dll/win32/msimtf/msimtf_ros.diff diff --git a/reactos/dll/win32/msimtf/rsrc.rc b/dll/win32/msimtf/rsrc.rc similarity index 100% rename from reactos/dll/win32/msimtf/rsrc.rc rename to dll/win32/msimtf/rsrc.rc diff --git a/reactos/dll/win32/msisip/CMakeLists.txt b/dll/win32/msisip/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/msisip/CMakeLists.txt rename to dll/win32/msisip/CMakeLists.txt diff --git a/reactos/dll/win32/msisip/main.c b/dll/win32/msisip/main.c similarity index 100% rename from reactos/dll/win32/msisip/main.c rename to dll/win32/msisip/main.c diff --git a/reactos/dll/win32/msisip/msisip.rbuild b/dll/win32/msisip/msisip.rbuild similarity index 100% rename from reactos/dll/win32/msisip/msisip.rbuild rename to dll/win32/msisip/msisip.rbuild diff --git a/reactos/dll/win32/msisip/msisip.spec b/dll/win32/msisip/msisip.spec similarity index 100% rename from reactos/dll/win32/msisip/msisip.spec rename to dll/win32/msisip/msisip.spec diff --git a/reactos/dll/win32/msisys.ocx/CMakeLists.txt b/dll/win32/msisys.ocx/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/msisys.ocx/CMakeLists.txt rename to dll/win32/msisys.ocx/CMakeLists.txt diff --git a/reactos/dll/win32/msisys.ocx/msisys.c b/dll/win32/msisys.ocx/msisys.c similarity index 100% rename from reactos/dll/win32/msisys.ocx/msisys.c rename to dll/win32/msisys.ocx/msisys.c diff --git a/reactos/dll/win32/msisys.ocx/msisys.ocx.rbuild b/dll/win32/msisys.ocx/msisys.ocx.rbuild similarity index 100% rename from reactos/dll/win32/msisys.ocx/msisys.ocx.rbuild rename to dll/win32/msisys.ocx/msisys.ocx.rbuild diff --git a/reactos/dll/win32/msisys.ocx/msisys.ocx.spec b/dll/win32/msisys.ocx/msisys.ocx.spec similarity index 100% rename from reactos/dll/win32/msisys.ocx/msisys.ocx.spec rename to dll/win32/msisys.ocx/msisys.ocx.spec diff --git a/reactos/dll/win32/msnet32/CMakeLists.txt b/dll/win32/msnet32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/msnet32/CMakeLists.txt rename to dll/win32/msnet32/CMakeLists.txt diff --git a/reactos/dll/win32/msnet32/msnet32.rbuild b/dll/win32/msnet32/msnet32.rbuild similarity index 100% rename from reactos/dll/win32/msnet32/msnet32.rbuild rename to dll/win32/msnet32/msnet32.rbuild diff --git a/reactos/dll/win32/msnet32/msnet32.spec b/dll/win32/msnet32/msnet32.spec similarity index 100% rename from reactos/dll/win32/msnet32/msnet32.spec rename to dll/win32/msnet32/msnet32.spec diff --git a/reactos/dll/win32/msnet32/msnet_main.c b/dll/win32/msnet32/msnet_main.c similarity index 100% rename from reactos/dll/win32/msnet32/msnet_main.c rename to dll/win32/msnet32/msnet_main.c diff --git a/reactos/dll/win32/msports/CMakeLists.txt b/dll/win32/msports/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/msports/CMakeLists.txt rename to dll/win32/msports/CMakeLists.txt diff --git a/reactos/dll/win32/msports/classinst.c b/dll/win32/msports/classinst.c similarity index 100% rename from reactos/dll/win32/msports/classinst.c rename to dll/win32/msports/classinst.c diff --git a/reactos/dll/win32/msports/comdb.c b/dll/win32/msports/comdb.c similarity index 100% rename from reactos/dll/win32/msports/comdb.c rename to dll/win32/msports/comdb.c diff --git a/reactos/dll/win32/msports/internal.h b/dll/win32/msports/internal.h similarity index 100% rename from reactos/dll/win32/msports/internal.h rename to dll/win32/msports/internal.h diff --git a/reactos/dll/win32/msports/lang/de-DE.rc b/dll/win32/msports/lang/de-DE.rc similarity index 100% rename from reactos/dll/win32/msports/lang/de-DE.rc rename to dll/win32/msports/lang/de-DE.rc diff --git a/reactos/dll/win32/msports/lang/en-US.rc b/dll/win32/msports/lang/en-US.rc similarity index 100% rename from reactos/dll/win32/msports/lang/en-US.rc rename to dll/win32/msports/lang/en-US.rc diff --git a/reactos/dll/win32/msports/lang/pl-PL.rc b/dll/win32/msports/lang/pl-PL.rc similarity index 100% rename from reactos/dll/win32/msports/lang/pl-PL.rc rename to dll/win32/msports/lang/pl-PL.rc diff --git a/reactos/dll/win32/msports/lang/ro-RO.rc b/dll/win32/msports/lang/ro-RO.rc similarity index 100% rename from reactos/dll/win32/msports/lang/ro-RO.rc rename to dll/win32/msports/lang/ro-RO.rc diff --git a/reactos/dll/win32/msports/lang/uk-UA.rc b/dll/win32/msports/lang/uk-UA.rc similarity index 100% rename from reactos/dll/win32/msports/lang/uk-UA.rc rename to dll/win32/msports/lang/uk-UA.rc diff --git a/reactos/dll/win32/msports/msports.c b/dll/win32/msports/msports.c similarity index 100% rename from reactos/dll/win32/msports/msports.c rename to dll/win32/msports/msports.c diff --git a/reactos/dll/win32/msports/msports.rbuild b/dll/win32/msports/msports.rbuild similarity index 100% rename from reactos/dll/win32/msports/msports.rbuild rename to dll/win32/msports/msports.rbuild diff --git a/reactos/dll/win32/msports/msports.rc b/dll/win32/msports/msports.rc similarity index 100% rename from reactos/dll/win32/msports/msports.rc rename to dll/win32/msports/msports.rc diff --git a/reactos/dll/win32/msports/msports.spec b/dll/win32/msports/msports.spec similarity index 100% rename from reactos/dll/win32/msports/msports.spec rename to dll/win32/msports/msports.spec diff --git a/reactos/dll/win32/msports/precomp.h b/dll/win32/msports/precomp.h similarity index 100% rename from reactos/dll/win32/msports/precomp.h rename to dll/win32/msports/precomp.h diff --git a/reactos/dll/win32/msports/resource.h b/dll/win32/msports/resource.h similarity index 100% rename from reactos/dll/win32/msports/resource.h rename to dll/win32/msports/resource.h diff --git a/reactos/dll/win32/msports/serial.c b/dll/win32/msports/serial.c similarity index 100% rename from reactos/dll/win32/msports/serial.c rename to dll/win32/msports/serial.c diff --git a/reactos/dll/win32/msrle32/CMakeLists.txt b/dll/win32/msrle32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/msrle32/CMakeLists.txt rename to dll/win32/msrle32/CMakeLists.txt diff --git a/reactos/dll/win32/msrle32/msrle32.c b/dll/win32/msrle32/msrle32.c similarity index 100% rename from reactos/dll/win32/msrle32/msrle32.c rename to dll/win32/msrle32/msrle32.c diff --git a/reactos/dll/win32/msrle32/msrle32.rbuild b/dll/win32/msrle32/msrle32.rbuild similarity index 100% rename from reactos/dll/win32/msrle32/msrle32.rbuild rename to dll/win32/msrle32/msrle32.rbuild diff --git a/reactos/dll/win32/msrle32/msrle32.spec b/dll/win32/msrle32/msrle32.spec similarity index 100% rename from reactos/dll/win32/msrle32/msrle32.spec rename to dll/win32/msrle32/msrle32.spec diff --git a/reactos/dll/win32/msrle32/msrle_Bg.rc b/dll/win32/msrle32/msrle_Bg.rc similarity index 100% rename from reactos/dll/win32/msrle32/msrle_Bg.rc rename to dll/win32/msrle32/msrle_Bg.rc diff --git a/reactos/dll/win32/msrle32/msrle_Cs.rc b/dll/win32/msrle32/msrle_Cs.rc similarity index 100% rename from reactos/dll/win32/msrle32/msrle_Cs.rc rename to dll/win32/msrle32/msrle_Cs.rc diff --git a/reactos/dll/win32/msrle32/msrle_Cy.rc b/dll/win32/msrle32/msrle_Cy.rc similarity index 100% rename from reactos/dll/win32/msrle32/msrle_Cy.rc rename to dll/win32/msrle32/msrle_Cy.rc diff --git a/reactos/dll/win32/msrle32/msrle_Da.rc b/dll/win32/msrle32/msrle_Da.rc similarity index 100% rename from reactos/dll/win32/msrle32/msrle_Da.rc rename to dll/win32/msrle32/msrle_Da.rc diff --git a/reactos/dll/win32/msrle32/msrle_De.rc b/dll/win32/msrle32/msrle_De.rc similarity index 100% rename from reactos/dll/win32/msrle32/msrle_De.rc rename to dll/win32/msrle32/msrle_De.rc diff --git a/reactos/dll/win32/msrle32/msrle_En.rc b/dll/win32/msrle32/msrle_En.rc similarity index 100% rename from reactos/dll/win32/msrle32/msrle_En.rc rename to dll/win32/msrle32/msrle_En.rc diff --git a/reactos/dll/win32/msrle32/msrle_Es.rc b/dll/win32/msrle32/msrle_Es.rc similarity index 100% rename from reactos/dll/win32/msrle32/msrle_Es.rc rename to dll/win32/msrle32/msrle_Es.rc diff --git a/reactos/dll/win32/msrle32/msrle_Fr.rc b/dll/win32/msrle32/msrle_Fr.rc similarity index 100% rename from reactos/dll/win32/msrle32/msrle_Fr.rc rename to dll/win32/msrle32/msrle_Fr.rc diff --git a/reactos/dll/win32/msrle32/msrle_Hu.rc b/dll/win32/msrle32/msrle_Hu.rc similarity index 100% rename from reactos/dll/win32/msrle32/msrle_Hu.rc rename to dll/win32/msrle32/msrle_Hu.rc diff --git a/reactos/dll/win32/msrle32/msrle_It.rc b/dll/win32/msrle32/msrle_It.rc similarity index 100% rename from reactos/dll/win32/msrle32/msrle_It.rc rename to dll/win32/msrle32/msrle_It.rc diff --git a/reactos/dll/win32/msrle32/msrle_Ja.rc b/dll/win32/msrle32/msrle_Ja.rc similarity index 100% rename from reactos/dll/win32/msrle32/msrle_Ja.rc rename to dll/win32/msrle32/msrle_Ja.rc diff --git a/reactos/dll/win32/msrle32/msrle_Ko.rc b/dll/win32/msrle32/msrle_Ko.rc similarity index 100% rename from reactos/dll/win32/msrle32/msrle_Ko.rc rename to dll/win32/msrle32/msrle_Ko.rc diff --git a/reactos/dll/win32/msrle32/msrle_Lt.rc b/dll/win32/msrle32/msrle_Lt.rc similarity index 100% rename from reactos/dll/win32/msrle32/msrle_Lt.rc rename to dll/win32/msrle32/msrle_Lt.rc diff --git a/reactos/dll/win32/msrle32/msrle_Nl.rc b/dll/win32/msrle32/msrle_Nl.rc similarity index 100% rename from reactos/dll/win32/msrle32/msrle_Nl.rc rename to dll/win32/msrle32/msrle_Nl.rc diff --git a/reactos/dll/win32/msrle32/msrle_No.rc b/dll/win32/msrle32/msrle_No.rc similarity index 100% rename from reactos/dll/win32/msrle32/msrle_No.rc rename to dll/win32/msrle32/msrle_No.rc diff --git a/reactos/dll/win32/msrle32/msrle_Pl.rc b/dll/win32/msrle32/msrle_Pl.rc similarity index 100% rename from reactos/dll/win32/msrle32/msrle_Pl.rc rename to dll/win32/msrle32/msrle_Pl.rc diff --git a/reactos/dll/win32/msrle32/msrle_Pt.rc b/dll/win32/msrle32/msrle_Pt.rc similarity index 100% rename from reactos/dll/win32/msrle32/msrle_Pt.rc rename to dll/win32/msrle32/msrle_Pt.rc diff --git a/reactos/dll/win32/msrle32/msrle_Ro.rc b/dll/win32/msrle32/msrle_Ro.rc similarity index 100% rename from reactos/dll/win32/msrle32/msrle_Ro.rc rename to dll/win32/msrle32/msrle_Ro.rc diff --git a/reactos/dll/win32/msrle32/msrle_Ru.rc b/dll/win32/msrle32/msrle_Ru.rc similarity index 100% rename from reactos/dll/win32/msrle32/msrle_Ru.rc rename to dll/win32/msrle32/msrle_Ru.rc diff --git a/reactos/dll/win32/msrle32/msrle_Si.rc b/dll/win32/msrle32/msrle_Si.rc similarity index 100% rename from reactos/dll/win32/msrle32/msrle_Si.rc rename to dll/win32/msrle32/msrle_Si.rc diff --git a/reactos/dll/win32/msrle32/msrle_Sv.rc b/dll/win32/msrle32/msrle_Sv.rc similarity index 100% rename from reactos/dll/win32/msrle32/msrle_Sv.rc rename to dll/win32/msrle32/msrle_Sv.rc diff --git a/reactos/dll/win32/msrle32/msrle_Tr.rc b/dll/win32/msrle32/msrle_Tr.rc similarity index 100% rename from reactos/dll/win32/msrle32/msrle_Tr.rc rename to dll/win32/msrle32/msrle_Tr.rc diff --git a/reactos/dll/win32/msrle32/msrle_Uk.rc b/dll/win32/msrle32/msrle_Uk.rc similarity index 100% rename from reactos/dll/win32/msrle32/msrle_Uk.rc rename to dll/win32/msrle32/msrle_Uk.rc diff --git a/reactos/dll/win32/msrle32/msrle_private.h b/dll/win32/msrle32/msrle_private.h similarity index 100% rename from reactos/dll/win32/msrle32/msrle_private.h rename to dll/win32/msrle32/msrle_private.h diff --git a/reactos/dll/win32/msrle32/rsrc.rc b/dll/win32/msrle32/rsrc.rc similarity index 100% rename from reactos/dll/win32/msrle32/rsrc.rc rename to dll/win32/msrle32/rsrc.rc diff --git a/reactos/dll/win32/mssign32/CMakeLists.txt b/dll/win32/mssign32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/mssign32/CMakeLists.txt rename to dll/win32/mssign32/CMakeLists.txt diff --git a/reactos/dll/win32/mssign32/mssign32.rbuild b/dll/win32/mssign32/mssign32.rbuild similarity index 100% rename from reactos/dll/win32/mssign32/mssign32.rbuild rename to dll/win32/mssign32/mssign32.rbuild diff --git a/reactos/dll/win32/mssign32/mssign32.spec b/dll/win32/mssign32/mssign32.spec similarity index 100% rename from reactos/dll/win32/mssign32/mssign32.spec rename to dll/win32/mssign32/mssign32.spec diff --git a/reactos/dll/win32/mssign32/mssign32_main.c b/dll/win32/mssign32/mssign32_main.c similarity index 100% rename from reactos/dll/win32/mssign32/mssign32_main.c rename to dll/win32/mssign32/mssign32_main.c diff --git a/reactos/dll/win32/mssip32/CMakeLists.txt b/dll/win32/mssip32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/mssip32/CMakeLists.txt rename to dll/win32/mssip32/CMakeLists.txt diff --git a/reactos/dll/win32/mssip32/main.c b/dll/win32/mssip32/main.c similarity index 100% rename from reactos/dll/win32/mssip32/main.c rename to dll/win32/mssip32/main.c diff --git a/reactos/dll/win32/mssip32/mssip32.rbuild b/dll/win32/mssip32/mssip32.rbuild similarity index 100% rename from reactos/dll/win32/mssip32/mssip32.rbuild rename to dll/win32/mssip32/mssip32.rbuild diff --git a/reactos/dll/win32/mssip32/mssip32.spec b/dll/win32/mssip32/mssip32.spec similarity index 100% rename from reactos/dll/win32/mssip32/mssip32.spec rename to dll/win32/mssip32/mssip32.spec diff --git a/reactos/dll/win32/mstask/CMakeLists.txt b/dll/win32/mstask/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/mstask/CMakeLists.txt rename to dll/win32/mstask/CMakeLists.txt diff --git a/reactos/dll/win32/mstask/factory.c b/dll/win32/mstask/factory.c similarity index 100% rename from reactos/dll/win32/mstask/factory.c rename to dll/win32/mstask/factory.c diff --git a/reactos/dll/win32/mstask/mstask.inf b/dll/win32/mstask/mstask.inf similarity index 100% rename from reactos/dll/win32/mstask/mstask.inf rename to dll/win32/mstask/mstask.inf diff --git a/reactos/dll/win32/mstask/mstask.rbuild b/dll/win32/mstask/mstask.rbuild similarity index 100% rename from reactos/dll/win32/mstask/mstask.rbuild rename to dll/win32/mstask/mstask.rbuild diff --git a/reactos/dll/win32/mstask/mstask.spec b/dll/win32/mstask/mstask.spec similarity index 100% rename from reactos/dll/win32/mstask/mstask.spec rename to dll/win32/mstask/mstask.spec diff --git a/reactos/dll/win32/mstask/mstask_local.idl b/dll/win32/mstask/mstask_local.idl similarity index 100% rename from reactos/dll/win32/mstask/mstask_local.idl rename to dll/win32/mstask/mstask_local.idl diff --git a/reactos/dll/win32/mstask/mstask_main.c b/dll/win32/mstask/mstask_main.c similarity index 100% rename from reactos/dll/win32/mstask/mstask_main.c rename to dll/win32/mstask/mstask_main.c diff --git a/reactos/dll/win32/mstask/mstask_private.h b/dll/win32/mstask/mstask_private.h similarity index 100% rename from reactos/dll/win32/mstask/mstask_private.h rename to dll/win32/mstask/mstask_private.h diff --git a/reactos/dll/win32/mstask/rsrc.rc b/dll/win32/mstask/rsrc.rc similarity index 100% rename from reactos/dll/win32/mstask/rsrc.rc rename to dll/win32/mstask/rsrc.rc diff --git a/reactos/dll/win32/mstask/task.c b/dll/win32/mstask/task.c similarity index 100% rename from reactos/dll/win32/mstask/task.c rename to dll/win32/mstask/task.c diff --git a/reactos/dll/win32/mstask/task_scheduler.c b/dll/win32/mstask/task_scheduler.c similarity index 100% rename from reactos/dll/win32/mstask/task_scheduler.c rename to dll/win32/mstask/task_scheduler.c diff --git a/reactos/dll/win32/mstask/task_trigger.c b/dll/win32/mstask/task_trigger.c similarity index 100% rename from reactos/dll/win32/mstask/task_trigger.c rename to dll/win32/mstask/task_trigger.c diff --git a/reactos/dll/win32/msvcrt/CMakeLists.txt b/dll/win32/msvcrt/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/msvcrt/CMakeLists.txt rename to dll/win32/msvcrt/CMakeLists.txt diff --git a/reactos/dll/win32/msvcrt/dllmain.c b/dll/win32/msvcrt/dllmain.c similarity index 100% rename from reactos/dll/win32/msvcrt/dllmain.c rename to dll/win32/msvcrt/dllmain.c diff --git a/reactos/dll/win32/msvcrt/msvcrt.rbuild b/dll/win32/msvcrt/msvcrt.rbuild similarity index 100% rename from reactos/dll/win32/msvcrt/msvcrt.rbuild rename to dll/win32/msvcrt/msvcrt.rbuild diff --git a/reactos/dll/win32/msvcrt/msvcrt.rc b/dll/win32/msvcrt/msvcrt.rc similarity index 100% rename from reactos/dll/win32/msvcrt/msvcrt.rc rename to dll/win32/msvcrt/msvcrt.rc diff --git a/reactos/dll/win32/msvcrt/msvcrt.spec b/dll/win32/msvcrt/msvcrt.spec similarity index 100% rename from reactos/dll/win32/msvcrt/msvcrt.spec rename to dll/win32/msvcrt/msvcrt.spec diff --git a/reactos/dll/win32/msvcrt/precomp.h b/dll/win32/msvcrt/precomp.h similarity index 100% rename from reactos/dll/win32/msvcrt/precomp.h rename to dll/win32/msvcrt/precomp.h diff --git a/reactos/dll/win32/msvcrt/stubs.c b/dll/win32/msvcrt/stubs.c similarity index 100% rename from reactos/dll/win32/msvcrt/stubs.c rename to dll/win32/msvcrt/stubs.c diff --git a/reactos/dll/win32/msvcrt20/CMakeLists.txt b/dll/win32/msvcrt20/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/msvcrt20/CMakeLists.txt rename to dll/win32/msvcrt20/CMakeLists.txt diff --git a/reactos/dll/win32/msvcrt20/msvcrt20.c b/dll/win32/msvcrt20/msvcrt20.c similarity index 100% rename from reactos/dll/win32/msvcrt20/msvcrt20.c rename to dll/win32/msvcrt20/msvcrt20.c diff --git a/reactos/dll/win32/msvcrt20/msvcrt20.rbuild b/dll/win32/msvcrt20/msvcrt20.rbuild similarity index 100% rename from reactos/dll/win32/msvcrt20/msvcrt20.rbuild rename to dll/win32/msvcrt20/msvcrt20.rbuild diff --git a/reactos/dll/win32/msvcrt20/msvcrt20.spec b/dll/win32/msvcrt20/msvcrt20.spec similarity index 100% rename from reactos/dll/win32/msvcrt20/msvcrt20.spec rename to dll/win32/msvcrt20/msvcrt20.spec diff --git a/reactos/dll/win32/msvcrt20/stubs.c b/dll/win32/msvcrt20/stubs.c similarity index 100% rename from reactos/dll/win32/msvcrt20/stubs.c rename to dll/win32/msvcrt20/stubs.c diff --git a/reactos/dll/win32/msvcrt40/CMakeLists.txt b/dll/win32/msvcrt40/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/msvcrt40/CMakeLists.txt rename to dll/win32/msvcrt40/CMakeLists.txt diff --git a/reactos/dll/win32/msvcrt40/msvcrt40.c b/dll/win32/msvcrt40/msvcrt40.c similarity index 100% rename from reactos/dll/win32/msvcrt40/msvcrt40.c rename to dll/win32/msvcrt40/msvcrt40.c diff --git a/reactos/dll/win32/msvcrt40/msvcrt40.rbuild b/dll/win32/msvcrt40/msvcrt40.rbuild similarity index 100% rename from reactos/dll/win32/msvcrt40/msvcrt40.rbuild rename to dll/win32/msvcrt40/msvcrt40.rbuild diff --git a/reactos/dll/win32/msvcrt40/msvcrt40.spec b/dll/win32/msvcrt40/msvcrt40.spec similarity index 100% rename from reactos/dll/win32/msvcrt40/msvcrt40.spec rename to dll/win32/msvcrt40/msvcrt40.spec diff --git a/reactos/dll/win32/msvcrt40/stubs.c b/dll/win32/msvcrt40/stubs.c similarity index 100% rename from reactos/dll/win32/msvcrt40/stubs.c rename to dll/win32/msvcrt40/stubs.c diff --git a/reactos/dll/win32/msvfw32/CMakeLists.txt b/dll/win32/msvfw32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/msvfw32/CMakeLists.txt rename to dll/win32/msvfw32/CMakeLists.txt diff --git a/reactos/dll/win32/msvfw32/drawdib.c b/dll/win32/msvfw32/drawdib.c similarity index 100% rename from reactos/dll/win32/msvfw32/drawdib.c rename to dll/win32/msvfw32/drawdib.c diff --git a/reactos/dll/win32/msvfw32/mciwnd.c b/dll/win32/msvfw32/mciwnd.c similarity index 100% rename from reactos/dll/win32/msvfw32/mciwnd.c rename to dll/win32/msvfw32/mciwnd.c diff --git a/reactos/dll/win32/msvfw32/msvfw32.rbuild b/dll/win32/msvfw32/msvfw32.rbuild similarity index 100% rename from reactos/dll/win32/msvfw32/msvfw32.rbuild rename to dll/win32/msvfw32/msvfw32.rbuild diff --git a/reactos/dll/win32/msvfw32/msvfw32.spec b/dll/win32/msvfw32/msvfw32.spec similarity index 100% rename from reactos/dll/win32/msvfw32/msvfw32.spec rename to dll/win32/msvfw32/msvfw32.spec diff --git a/reactos/dll/win32/msvfw32/msvfw32_Da.rc b/dll/win32/msvfw32/msvfw32_Da.rc similarity index 100% rename from reactos/dll/win32/msvfw32/msvfw32_Da.rc rename to dll/win32/msvfw32/msvfw32_Da.rc diff --git a/reactos/dll/win32/msvfw32/msvfw32_De.rc b/dll/win32/msvfw32/msvfw32_De.rc similarity index 100% rename from reactos/dll/win32/msvfw32/msvfw32_De.rc rename to dll/win32/msvfw32/msvfw32_De.rc diff --git a/reactos/dll/win32/msvfw32/msvfw32_En.rc b/dll/win32/msvfw32/msvfw32_En.rc similarity index 100% rename from reactos/dll/win32/msvfw32/msvfw32_En.rc rename to dll/win32/msvfw32/msvfw32_En.rc diff --git a/reactos/dll/win32/msvfw32/msvfw32_Es.rc b/dll/win32/msvfw32/msvfw32_Es.rc similarity index 100% rename from reactos/dll/win32/msvfw32/msvfw32_Es.rc rename to dll/win32/msvfw32/msvfw32_Es.rc diff --git a/reactos/dll/win32/msvfw32/msvfw32_Fr.rc b/dll/win32/msvfw32/msvfw32_Fr.rc similarity index 100% rename from reactos/dll/win32/msvfw32/msvfw32_Fr.rc rename to dll/win32/msvfw32/msvfw32_Fr.rc diff --git a/reactos/dll/win32/msvfw32/msvfw32_Hu.rc b/dll/win32/msvfw32/msvfw32_Hu.rc similarity index 100% rename from reactos/dll/win32/msvfw32/msvfw32_Hu.rc rename to dll/win32/msvfw32/msvfw32_Hu.rc diff --git a/reactos/dll/win32/msvfw32/msvfw32_It.rc b/dll/win32/msvfw32/msvfw32_It.rc similarity index 100% rename from reactos/dll/win32/msvfw32/msvfw32_It.rc rename to dll/win32/msvfw32/msvfw32_It.rc diff --git a/reactos/dll/win32/msvfw32/msvfw32_Ko.rc b/dll/win32/msvfw32/msvfw32_Ko.rc similarity index 100% rename from reactos/dll/win32/msvfw32/msvfw32_Ko.rc rename to dll/win32/msvfw32/msvfw32_Ko.rc diff --git a/reactos/dll/win32/msvfw32/msvfw32_Lt.rc b/dll/win32/msvfw32/msvfw32_Lt.rc similarity index 100% rename from reactos/dll/win32/msvfw32/msvfw32_Lt.rc rename to dll/win32/msvfw32/msvfw32_Lt.rc diff --git a/reactos/dll/win32/msvfw32/msvfw32_Nl.rc b/dll/win32/msvfw32/msvfw32_Nl.rc similarity index 100% rename from reactos/dll/win32/msvfw32/msvfw32_Nl.rc rename to dll/win32/msvfw32/msvfw32_Nl.rc diff --git a/reactos/dll/win32/msvfw32/msvfw32_No.rc b/dll/win32/msvfw32/msvfw32_No.rc similarity index 100% rename from reactos/dll/win32/msvfw32/msvfw32_No.rc rename to dll/win32/msvfw32/msvfw32_No.rc diff --git a/reactos/dll/win32/msvfw32/msvfw32_Pl.rc b/dll/win32/msvfw32/msvfw32_Pl.rc similarity index 100% rename from reactos/dll/win32/msvfw32/msvfw32_Pl.rc rename to dll/win32/msvfw32/msvfw32_Pl.rc diff --git a/reactos/dll/win32/msvfw32/msvfw32_Pt.rc b/dll/win32/msvfw32/msvfw32_Pt.rc similarity index 100% rename from reactos/dll/win32/msvfw32/msvfw32_Pt.rc rename to dll/win32/msvfw32/msvfw32_Pt.rc diff --git a/reactos/dll/win32/msvfw32/msvfw32_Ro.rc b/dll/win32/msvfw32/msvfw32_Ro.rc similarity index 100% rename from reactos/dll/win32/msvfw32/msvfw32_Ro.rc rename to dll/win32/msvfw32/msvfw32_Ro.rc diff --git a/reactos/dll/win32/msvfw32/msvfw32_Ru.rc b/dll/win32/msvfw32/msvfw32_Ru.rc similarity index 100% rename from reactos/dll/win32/msvfw32/msvfw32_Ru.rc rename to dll/win32/msvfw32/msvfw32_Ru.rc diff --git a/reactos/dll/win32/msvfw32/msvfw32_Si.rc b/dll/win32/msvfw32/msvfw32_Si.rc similarity index 100% rename from reactos/dll/win32/msvfw32/msvfw32_Si.rc rename to dll/win32/msvfw32/msvfw32_Si.rc diff --git a/reactos/dll/win32/msvfw32/msvfw32_Sv.rc b/dll/win32/msvfw32/msvfw32_Sv.rc similarity index 100% rename from reactos/dll/win32/msvfw32/msvfw32_Sv.rc rename to dll/win32/msvfw32/msvfw32_Sv.rc diff --git a/reactos/dll/win32/msvfw32/msvfw32_Tr.rc b/dll/win32/msvfw32/msvfw32_Tr.rc similarity index 100% rename from reactos/dll/win32/msvfw32/msvfw32_Tr.rc rename to dll/win32/msvfw32/msvfw32_Tr.rc diff --git a/reactos/dll/win32/msvfw32/msvfw32_Uk.rc b/dll/win32/msvfw32/msvfw32_Uk.rc similarity index 100% rename from reactos/dll/win32/msvfw32/msvfw32_Uk.rc rename to dll/win32/msvfw32/msvfw32_Uk.rc diff --git a/reactos/dll/win32/msvfw32/msvfw32_Zh.rc b/dll/win32/msvfw32/msvfw32_Zh.rc similarity index 100% rename from reactos/dll/win32/msvfw32/msvfw32_Zh.rc rename to dll/win32/msvfw32/msvfw32_Zh.rc diff --git a/reactos/dll/win32/msvfw32/msvideo.spec b/dll/win32/msvfw32/msvideo.spec similarity index 100% rename from reactos/dll/win32/msvfw32/msvideo.spec rename to dll/win32/msvfw32/msvideo.spec diff --git a/reactos/dll/win32/msvfw32/msvideo_main.c b/dll/win32/msvfw32/msvideo_main.c similarity index 100% rename from reactos/dll/win32/msvfw32/msvideo_main.c rename to dll/win32/msvfw32/msvideo_main.c diff --git a/reactos/dll/win32/msvfw32/msvideo_private.h b/dll/win32/msvfw32/msvideo_private.h similarity index 100% rename from reactos/dll/win32/msvfw32/msvideo_private.h rename to dll/win32/msvfw32/msvideo_private.h diff --git a/reactos/dll/win32/msvfw32/rsrc.rc b/dll/win32/msvfw32/rsrc.rc similarity index 100% rename from reactos/dll/win32/msvfw32/rsrc.rc rename to dll/win32/msvfw32/rsrc.rc diff --git a/reactos/dll/win32/msvidc32/CMakeLists.txt b/dll/win32/msvidc32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/msvidc32/CMakeLists.txt rename to dll/win32/msvidc32/CMakeLists.txt diff --git a/reactos/dll/win32/msvidc32/msvidc32.rbuild b/dll/win32/msvidc32/msvidc32.rbuild similarity index 100% rename from reactos/dll/win32/msvidc32/msvidc32.rbuild rename to dll/win32/msvidc32/msvidc32.rbuild diff --git a/reactos/dll/win32/msvidc32/msvidc32.spec b/dll/win32/msvidc32/msvidc32.spec similarity index 100% rename from reactos/dll/win32/msvidc32/msvidc32.spec rename to dll/win32/msvidc32/msvidc32.spec diff --git a/reactos/dll/win32/msvidc32/msvidc32_Cy.rc b/dll/win32/msvidc32/msvidc32_Cy.rc similarity index 100% rename from reactos/dll/win32/msvidc32/msvidc32_Cy.rc rename to dll/win32/msvidc32/msvidc32_Cy.rc diff --git a/reactos/dll/win32/msvidc32/msvidc32_Da.rc b/dll/win32/msvidc32/msvidc32_Da.rc similarity index 100% rename from reactos/dll/win32/msvidc32/msvidc32_Da.rc rename to dll/win32/msvidc32/msvidc32_Da.rc diff --git a/reactos/dll/win32/msvidc32/msvidc32_De.rc b/dll/win32/msvidc32/msvidc32_De.rc similarity index 100% rename from reactos/dll/win32/msvidc32/msvidc32_De.rc rename to dll/win32/msvidc32/msvidc32_De.rc diff --git a/reactos/dll/win32/msvidc32/msvidc32_En.rc b/dll/win32/msvidc32/msvidc32_En.rc similarity index 100% rename from reactos/dll/win32/msvidc32/msvidc32_En.rc rename to dll/win32/msvidc32/msvidc32_En.rc diff --git a/reactos/dll/win32/msvidc32/msvidc32_Es.rc b/dll/win32/msvidc32/msvidc32_Es.rc similarity index 100% rename from reactos/dll/win32/msvidc32/msvidc32_Es.rc rename to dll/win32/msvidc32/msvidc32_Es.rc diff --git a/reactos/dll/win32/msvidc32/msvidc32_Fr.rc b/dll/win32/msvidc32/msvidc32_Fr.rc similarity index 100% rename from reactos/dll/win32/msvidc32/msvidc32_Fr.rc rename to dll/win32/msvidc32/msvidc32_Fr.rc diff --git a/reactos/dll/win32/msvidc32/msvidc32_Hu.rc b/dll/win32/msvidc32/msvidc32_Hu.rc similarity index 100% rename from reactos/dll/win32/msvidc32/msvidc32_Hu.rc rename to dll/win32/msvidc32/msvidc32_Hu.rc diff --git a/reactos/dll/win32/msvidc32/msvidc32_It.rc b/dll/win32/msvidc32/msvidc32_It.rc similarity index 100% rename from reactos/dll/win32/msvidc32/msvidc32_It.rc rename to dll/win32/msvidc32/msvidc32_It.rc diff --git a/reactos/dll/win32/msvidc32/msvidc32_Ja.rc b/dll/win32/msvidc32/msvidc32_Ja.rc similarity index 100% rename from reactos/dll/win32/msvidc32/msvidc32_Ja.rc rename to dll/win32/msvidc32/msvidc32_Ja.rc diff --git a/reactos/dll/win32/msvidc32/msvidc32_Ko.rc b/dll/win32/msvidc32/msvidc32_Ko.rc similarity index 100% rename from reactos/dll/win32/msvidc32/msvidc32_Ko.rc rename to dll/win32/msvidc32/msvidc32_Ko.rc diff --git a/reactos/dll/win32/msvidc32/msvidc32_Lt.rc b/dll/win32/msvidc32/msvidc32_Lt.rc similarity index 100% rename from reactos/dll/win32/msvidc32/msvidc32_Lt.rc rename to dll/win32/msvidc32/msvidc32_Lt.rc diff --git a/reactos/dll/win32/msvidc32/msvidc32_Nl.rc b/dll/win32/msvidc32/msvidc32_Nl.rc similarity index 100% rename from reactos/dll/win32/msvidc32/msvidc32_Nl.rc rename to dll/win32/msvidc32/msvidc32_Nl.rc diff --git a/reactos/dll/win32/msvidc32/msvidc32_No.rc b/dll/win32/msvidc32/msvidc32_No.rc similarity index 100% rename from reactos/dll/win32/msvidc32/msvidc32_No.rc rename to dll/win32/msvidc32/msvidc32_No.rc diff --git a/reactos/dll/win32/msvidc32/msvidc32_Pl.rc b/dll/win32/msvidc32/msvidc32_Pl.rc similarity index 100% rename from reactos/dll/win32/msvidc32/msvidc32_Pl.rc rename to dll/win32/msvidc32/msvidc32_Pl.rc diff --git a/reactos/dll/win32/msvidc32/msvidc32_Pt.rc b/dll/win32/msvidc32/msvidc32_Pt.rc similarity index 100% rename from reactos/dll/win32/msvidc32/msvidc32_Pt.rc rename to dll/win32/msvidc32/msvidc32_Pt.rc diff --git a/reactos/dll/win32/msvidc32/msvidc32_Ro.rc b/dll/win32/msvidc32/msvidc32_Ro.rc similarity index 100% rename from reactos/dll/win32/msvidc32/msvidc32_Ro.rc rename to dll/win32/msvidc32/msvidc32_Ro.rc diff --git a/reactos/dll/win32/msvidc32/msvidc32_Ru.rc b/dll/win32/msvidc32/msvidc32_Ru.rc similarity index 100% rename from reactos/dll/win32/msvidc32/msvidc32_Ru.rc rename to dll/win32/msvidc32/msvidc32_Ru.rc diff --git a/reactos/dll/win32/msvidc32/msvidc32_Si.rc b/dll/win32/msvidc32/msvidc32_Si.rc similarity index 100% rename from reactos/dll/win32/msvidc32/msvidc32_Si.rc rename to dll/win32/msvidc32/msvidc32_Si.rc diff --git a/reactos/dll/win32/msvidc32/msvidc32_Sv.rc b/dll/win32/msvidc32/msvidc32_Sv.rc similarity index 100% rename from reactos/dll/win32/msvidc32/msvidc32_Sv.rc rename to dll/win32/msvidc32/msvidc32_Sv.rc diff --git a/reactos/dll/win32/msvidc32/msvidc32_Tr.rc b/dll/win32/msvidc32/msvidc32_Tr.rc similarity index 100% rename from reactos/dll/win32/msvidc32/msvidc32_Tr.rc rename to dll/win32/msvidc32/msvidc32_Tr.rc diff --git a/reactos/dll/win32/msvidc32/msvidc32_Uk.rc b/dll/win32/msvidc32/msvidc32_Uk.rc similarity index 100% rename from reactos/dll/win32/msvidc32/msvidc32_Uk.rc rename to dll/win32/msvidc32/msvidc32_Uk.rc diff --git a/reactos/dll/win32/msvidc32/msvidc32_private.h b/dll/win32/msvidc32/msvidc32_private.h similarity index 100% rename from reactos/dll/win32/msvidc32/msvidc32_private.h rename to dll/win32/msvidc32/msvidc32_private.h diff --git a/reactos/dll/win32/msvidc32/msvideo1.c b/dll/win32/msvidc32/msvideo1.c similarity index 100% rename from reactos/dll/win32/msvidc32/msvideo1.c rename to dll/win32/msvidc32/msvideo1.c diff --git a/reactos/dll/win32/msvidc32/rsrc.rc b/dll/win32/msvidc32/rsrc.rc similarity index 100% rename from reactos/dll/win32/msvidc32/rsrc.rc rename to dll/win32/msvidc32/rsrc.rc diff --git a/reactos/dll/win32/mswsock/CMakeLists.txt b/dll/win32/mswsock/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/mswsock/CMakeLists.txt rename to dll/win32/mswsock/CMakeLists.txt diff --git a/reactos/dll/win32/mswsock/extensions.c b/dll/win32/mswsock/extensions.c similarity index 100% rename from reactos/dll/win32/mswsock/extensions.c rename to dll/win32/mswsock/extensions.c diff --git a/reactos/dll/win32/mswsock/mswsock.rbuild b/dll/win32/mswsock/mswsock.rbuild similarity index 100% rename from reactos/dll/win32/mswsock/mswsock.rbuild rename to dll/win32/mswsock/mswsock.rbuild diff --git a/reactos/dll/win32/mswsock/mswsock.rc b/dll/win32/mswsock/mswsock.rc similarity index 100% rename from reactos/dll/win32/mswsock/mswsock.rc rename to dll/win32/mswsock/mswsock.rc diff --git a/reactos/dll/win32/mswsock/mswsock.spec b/dll/win32/mswsock/mswsock.spec similarity index 100% rename from reactos/dll/win32/mswsock/mswsock.spec rename to dll/win32/mswsock/mswsock.spec diff --git a/reactos/dll/win32/mswsock/precomp.h b/dll/win32/mswsock/precomp.h similarity index 100% rename from reactos/dll/win32/mswsock/precomp.h rename to dll/win32/mswsock/precomp.h diff --git a/reactos/dll/win32/mswsock/stubs.c b/dll/win32/mswsock/stubs.c similarity index 100% rename from reactos/dll/win32/mswsock/stubs.c rename to dll/win32/mswsock/stubs.c diff --git a/reactos/dll/win32/msxml3/CMakeLists.txt b/dll/win32/msxml3/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/msxml3/CMakeLists.txt rename to dll/win32/msxml3/CMakeLists.txt diff --git a/reactos/dll/win32/msxml3/attribute.c b/dll/win32/msxml3/attribute.c similarity index 100% rename from reactos/dll/win32/msxml3/attribute.c rename to dll/win32/msxml3/attribute.c diff --git a/reactos/dll/win32/msxml3/bsc.c b/dll/win32/msxml3/bsc.c similarity index 100% rename from reactos/dll/win32/msxml3/bsc.c rename to dll/win32/msxml3/bsc.c diff --git a/reactos/dll/win32/msxml3/cdata.c b/dll/win32/msxml3/cdata.c similarity index 100% rename from reactos/dll/win32/msxml3/cdata.c rename to dll/win32/msxml3/cdata.c diff --git a/reactos/dll/win32/msxml3/comment.c b/dll/win32/msxml3/comment.c similarity index 100% rename from reactos/dll/win32/msxml3/comment.c rename to dll/win32/msxml3/comment.c diff --git a/reactos/dll/win32/msxml3/dispex.c b/dll/win32/msxml3/dispex.c similarity index 100% rename from reactos/dll/win32/msxml3/dispex.c rename to dll/win32/msxml3/dispex.c diff --git a/reactos/dll/win32/msxml3/docfrag.c b/dll/win32/msxml3/docfrag.c similarity index 100% rename from reactos/dll/win32/msxml3/docfrag.c rename to dll/win32/msxml3/docfrag.c diff --git a/reactos/dll/win32/msxml3/domdoc.c b/dll/win32/msxml3/domdoc.c similarity index 100% rename from reactos/dll/win32/msxml3/domdoc.c rename to dll/win32/msxml3/domdoc.c diff --git a/reactos/dll/win32/msxml3/domimpl.c b/dll/win32/msxml3/domimpl.c similarity index 100% rename from reactos/dll/win32/msxml3/domimpl.c rename to dll/win32/msxml3/domimpl.c diff --git a/reactos/dll/win32/msxml3/element.c b/dll/win32/msxml3/element.c similarity index 100% rename from reactos/dll/win32/msxml3/element.c rename to dll/win32/msxml3/element.c diff --git a/reactos/dll/win32/msxml3/entityref.c b/dll/win32/msxml3/entityref.c similarity index 100% rename from reactos/dll/win32/msxml3/entityref.c rename to dll/win32/msxml3/entityref.c diff --git a/reactos/dll/win32/msxml3/factory.c b/dll/win32/msxml3/factory.c similarity index 100% rename from reactos/dll/win32/msxml3/factory.c rename to dll/win32/msxml3/factory.c diff --git a/reactos/dll/win32/msxml3/httprequest.c b/dll/win32/msxml3/httprequest.c similarity index 100% rename from reactos/dll/win32/msxml3/httprequest.c rename to dll/win32/msxml3/httprequest.c diff --git a/reactos/dll/win32/msxml3/main.c b/dll/win32/msxml3/main.c similarity index 100% rename from reactos/dll/win32/msxml3/main.c rename to dll/win32/msxml3/main.c diff --git a/reactos/dll/win32/msxml3/msvc.h b/dll/win32/msxml3/msvc.h similarity index 100% rename from reactos/dll/win32/msxml3/msvc.h rename to dll/win32/msxml3/msvc.h diff --git a/reactos/dll/win32/msxml3/msvc_uuid.c b/dll/win32/msxml3/msvc_uuid.c similarity index 100% rename from reactos/dll/win32/msxml3/msvc_uuid.c rename to dll/win32/msxml3/msvc_uuid.c diff --git a/reactos/dll/win32/msxml3/msxml3.rbuild b/dll/win32/msxml3/msxml3.rbuild similarity index 100% rename from reactos/dll/win32/msxml3/msxml3.rbuild rename to dll/win32/msxml3/msxml3.rbuild diff --git a/reactos/dll/win32/msxml3/msxml3.spec b/dll/win32/msxml3/msxml3.spec similarity index 100% rename from reactos/dll/win32/msxml3/msxml3.spec rename to dll/win32/msxml3/msxml3.spec diff --git a/reactos/dll/win32/msxml3/msxml3_ros.diff b/dll/win32/msxml3/msxml3_ros.diff similarity index 100% rename from reactos/dll/win32/msxml3/msxml3_ros.diff rename to dll/win32/msxml3/msxml3_ros.diff diff --git a/reactos/dll/win32/msxml3/msxml3_v1.idl b/dll/win32/msxml3/msxml3_v1.idl similarity index 100% rename from reactos/dll/win32/msxml3/msxml3_v1.idl rename to dll/win32/msxml3/msxml3_v1.idl diff --git a/reactos/dll/win32/msxml3/msxml_private.h b/dll/win32/msxml3/msxml_private.h similarity index 100% rename from reactos/dll/win32/msxml3/msxml_private.h rename to dll/win32/msxml3/msxml_private.h diff --git a/reactos/dll/win32/msxml3/node.c b/dll/win32/msxml3/node.c similarity index 100% rename from reactos/dll/win32/msxml3/node.c rename to dll/win32/msxml3/node.c diff --git a/reactos/dll/win32/msxml3/nodelist.c b/dll/win32/msxml3/nodelist.c similarity index 100% rename from reactos/dll/win32/msxml3/nodelist.c rename to dll/win32/msxml3/nodelist.c diff --git a/reactos/dll/win32/msxml3/nodemap.c b/dll/win32/msxml3/nodemap.c similarity index 100% rename from reactos/dll/win32/msxml3/nodemap.c rename to dll/win32/msxml3/nodemap.c diff --git a/reactos/dll/win32/msxml3/parseerror.c b/dll/win32/msxml3/parseerror.c similarity index 100% rename from reactos/dll/win32/msxml3/parseerror.c rename to dll/win32/msxml3/parseerror.c diff --git a/reactos/dll/win32/msxml3/pi.c b/dll/win32/msxml3/pi.c similarity index 100% rename from reactos/dll/win32/msxml3/pi.c rename to dll/win32/msxml3/pi.c diff --git a/reactos/dll/win32/msxml3/queryresult.c b/dll/win32/msxml3/queryresult.c similarity index 100% rename from reactos/dll/win32/msxml3/queryresult.c rename to dll/win32/msxml3/queryresult.c diff --git a/reactos/dll/win32/msxml3/regsvr.c b/dll/win32/msxml3/regsvr.c similarity index 100% rename from reactos/dll/win32/msxml3/regsvr.c rename to dll/win32/msxml3/regsvr.c diff --git a/reactos/dll/win32/msxml3/saxreader.c b/dll/win32/msxml3/saxreader.c similarity index 100% rename from reactos/dll/win32/msxml3/saxreader.c rename to dll/win32/msxml3/saxreader.c diff --git a/reactos/dll/win32/msxml3/schema.c b/dll/win32/msxml3/schema.c similarity index 100% rename from reactos/dll/win32/msxml3/schema.c rename to dll/win32/msxml3/schema.c diff --git a/reactos/dll/win32/msxml3/text.c b/dll/win32/msxml3/text.c similarity index 100% rename from reactos/dll/win32/msxml3/text.c rename to dll/win32/msxml3/text.c diff --git a/reactos/dll/win32/msxml3/uuid.c b/dll/win32/msxml3/uuid.c similarity index 100% rename from reactos/dll/win32/msxml3/uuid.c rename to dll/win32/msxml3/uuid.c diff --git a/reactos/dll/win32/msxml3/version.rc b/dll/win32/msxml3/version.rc similarity index 100% rename from reactos/dll/win32/msxml3/version.rc rename to dll/win32/msxml3/version.rc diff --git a/reactos/dll/win32/msxml3/xmldoc.c b/dll/win32/msxml3/xmldoc.c similarity index 100% rename from reactos/dll/win32/msxml3/xmldoc.c rename to dll/win32/msxml3/xmldoc.c diff --git a/reactos/dll/win32/msxml3/xmlelem.c b/dll/win32/msxml3/xmlelem.c similarity index 100% rename from reactos/dll/win32/msxml3/xmlelem.c rename to dll/win32/msxml3/xmlelem.c diff --git a/reactos/dll/win32/nddeapi/CMakeLists.txt b/dll/win32/nddeapi/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/nddeapi/CMakeLists.txt rename to dll/win32/nddeapi/CMakeLists.txt diff --git a/reactos/dll/win32/nddeapi/nddeapi.c b/dll/win32/nddeapi/nddeapi.c similarity index 100% rename from reactos/dll/win32/nddeapi/nddeapi.c rename to dll/win32/nddeapi/nddeapi.c diff --git a/reactos/dll/win32/nddeapi/nddeapi.rbuild b/dll/win32/nddeapi/nddeapi.rbuild similarity index 100% rename from reactos/dll/win32/nddeapi/nddeapi.rbuild rename to dll/win32/nddeapi/nddeapi.rbuild diff --git a/reactos/dll/win32/nddeapi/nddeapi.spec b/dll/win32/nddeapi/nddeapi.spec similarity index 100% rename from reactos/dll/win32/nddeapi/nddeapi.spec rename to dll/win32/nddeapi/nddeapi.spec diff --git a/reactos/dll/win32/netapi32/CMakeLists.txt b/dll/win32/netapi32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/netapi32/CMakeLists.txt rename to dll/win32/netapi32/CMakeLists.txt diff --git a/reactos/dll/win32/netapi32/access.c b/dll/win32/netapi32/access.c similarity index 100% rename from reactos/dll/win32/netapi32/access.c rename to dll/win32/netapi32/access.c diff --git a/reactos/dll/win32/netapi32/apibuf.c b/dll/win32/netapi32/apibuf.c similarity index 100% rename from reactos/dll/win32/netapi32/apibuf.c rename to dll/win32/netapi32/apibuf.c diff --git a/reactos/dll/win32/netapi32/browsr.c b/dll/win32/netapi32/browsr.c similarity index 100% rename from reactos/dll/win32/netapi32/browsr.c rename to dll/win32/netapi32/browsr.c diff --git a/reactos/dll/win32/netapi32/ds.c b/dll/win32/netapi32/ds.c similarity index 100% rename from reactos/dll/win32/netapi32/ds.c rename to dll/win32/netapi32/ds.c diff --git a/reactos/dll/win32/netapi32/local_group.c b/dll/win32/netapi32/local_group.c similarity index 100% rename from reactos/dll/win32/netapi32/local_group.c rename to dll/win32/netapi32/local_group.c diff --git a/reactos/dll/win32/netapi32/nbcmdqueue.c b/dll/win32/netapi32/nbcmdqueue.c similarity index 100% rename from reactos/dll/win32/netapi32/nbcmdqueue.c rename to dll/win32/netapi32/nbcmdqueue.c diff --git a/reactos/dll/win32/netapi32/nbcmdqueue.h b/dll/win32/netapi32/nbcmdqueue.h similarity index 100% rename from reactos/dll/win32/netapi32/nbcmdqueue.h rename to dll/win32/netapi32/nbcmdqueue.h diff --git a/reactos/dll/win32/netapi32/nbnamecache.c b/dll/win32/netapi32/nbnamecache.c similarity index 100% rename from reactos/dll/win32/netapi32/nbnamecache.c rename to dll/win32/netapi32/nbnamecache.c diff --git a/reactos/dll/win32/netapi32/nbnamecache.h b/dll/win32/netapi32/nbnamecache.h similarity index 100% rename from reactos/dll/win32/netapi32/nbnamecache.h rename to dll/win32/netapi32/nbnamecache.h diff --git a/reactos/dll/win32/netapi32/nbt.c b/dll/win32/netapi32/nbt.c similarity index 100% rename from reactos/dll/win32/netapi32/nbt.c rename to dll/win32/netapi32/nbt.c diff --git a/reactos/dll/win32/netapi32/netapi32.c b/dll/win32/netapi32/netapi32.c similarity index 100% rename from reactos/dll/win32/netapi32/netapi32.c rename to dll/win32/netapi32/netapi32.c diff --git a/reactos/dll/win32/netapi32/netapi32.rbuild b/dll/win32/netapi32/netapi32.rbuild similarity index 100% rename from reactos/dll/win32/netapi32/netapi32.rbuild rename to dll/win32/netapi32/netapi32.rbuild diff --git a/reactos/dll/win32/netapi32/netapi32.spec b/dll/win32/netapi32/netapi32.spec similarity index 100% rename from reactos/dll/win32/netapi32/netapi32.spec rename to dll/win32/netapi32/netapi32.spec diff --git a/reactos/dll/win32/netapi32/netbios.c b/dll/win32/netapi32/netbios.c similarity index 100% rename from reactos/dll/win32/netapi32/netbios.c rename to dll/win32/netapi32/netbios.c diff --git a/reactos/dll/win32/netapi32/netbios.h b/dll/win32/netapi32/netbios.h similarity index 100% rename from reactos/dll/win32/netapi32/netbios.h rename to dll/win32/netapi32/netbios.h diff --git a/reactos/dll/win32/netapi32/share.c b/dll/win32/netapi32/share.c similarity index 100% rename from reactos/dll/win32/netapi32/share.c rename to dll/win32/netapi32/share.c diff --git a/reactos/dll/win32/netapi32/wksta.c b/dll/win32/netapi32/wksta.c similarity index 100% rename from reactos/dll/win32/netapi32/wksta.c rename to dll/win32/netapi32/wksta.c diff --git a/reactos/dll/win32/netcfgx/CMakeLists.txt b/dll/win32/netcfgx/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/netcfgx/CMakeLists.txt rename to dll/win32/netcfgx/CMakeLists.txt diff --git a/reactos/dll/win32/netcfgx/classfactory.c b/dll/win32/netcfgx/classfactory.c similarity index 100% rename from reactos/dll/win32/netcfgx/classfactory.c rename to dll/win32/netcfgx/classfactory.c diff --git a/reactos/dll/win32/netcfgx/inetcfgcomp_iface.c b/dll/win32/netcfgx/inetcfgcomp_iface.c similarity index 100% rename from reactos/dll/win32/netcfgx/inetcfgcomp_iface.c rename to dll/win32/netcfgx/inetcfgcomp_iface.c diff --git a/reactos/dll/win32/netcfgx/lang/bg-BG.rc b/dll/win32/netcfgx/lang/bg-BG.rc similarity index 100% rename from reactos/dll/win32/netcfgx/lang/bg-BG.rc rename to dll/win32/netcfgx/lang/bg-BG.rc diff --git a/reactos/dll/win32/netcfgx/lang/cs-CZ.rc b/dll/win32/netcfgx/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/win32/netcfgx/lang/cs-CZ.rc rename to dll/win32/netcfgx/lang/cs-CZ.rc diff --git a/reactos/dll/win32/netcfgx/lang/da-DK.rc b/dll/win32/netcfgx/lang/da-DK.rc similarity index 100% rename from reactos/dll/win32/netcfgx/lang/da-DK.rc rename to dll/win32/netcfgx/lang/da-DK.rc diff --git a/reactos/dll/win32/netcfgx/lang/de-DE.rc b/dll/win32/netcfgx/lang/de-DE.rc similarity index 100% rename from reactos/dll/win32/netcfgx/lang/de-DE.rc rename to dll/win32/netcfgx/lang/de-DE.rc diff --git a/reactos/dll/win32/netcfgx/lang/el-GR.rc b/dll/win32/netcfgx/lang/el-GR.rc similarity index 100% rename from reactos/dll/win32/netcfgx/lang/el-GR.rc rename to dll/win32/netcfgx/lang/el-GR.rc diff --git a/reactos/dll/win32/netcfgx/lang/en-US.rc b/dll/win32/netcfgx/lang/en-US.rc similarity index 100% rename from reactos/dll/win32/netcfgx/lang/en-US.rc rename to dll/win32/netcfgx/lang/en-US.rc diff --git a/reactos/dll/win32/netcfgx/lang/es-ES.rc b/dll/win32/netcfgx/lang/es-ES.rc similarity index 100% rename from reactos/dll/win32/netcfgx/lang/es-ES.rc rename to dll/win32/netcfgx/lang/es-ES.rc diff --git a/reactos/dll/win32/netcfgx/lang/fr-FR.rc b/dll/win32/netcfgx/lang/fr-FR.rc similarity index 100% rename from reactos/dll/win32/netcfgx/lang/fr-FR.rc rename to dll/win32/netcfgx/lang/fr-FR.rc diff --git a/reactos/dll/win32/netcfgx/lang/hu-HU.rc b/dll/win32/netcfgx/lang/hu-HU.rc similarity index 100% rename from reactos/dll/win32/netcfgx/lang/hu-HU.rc rename to dll/win32/netcfgx/lang/hu-HU.rc diff --git a/reactos/dll/win32/netcfgx/lang/id-ID.rc b/dll/win32/netcfgx/lang/id-ID.rc similarity index 100% rename from reactos/dll/win32/netcfgx/lang/id-ID.rc rename to dll/win32/netcfgx/lang/id-ID.rc diff --git a/reactos/dll/win32/netcfgx/lang/it-IT.rc b/dll/win32/netcfgx/lang/it-IT.rc similarity index 100% rename from reactos/dll/win32/netcfgx/lang/it-IT.rc rename to dll/win32/netcfgx/lang/it-IT.rc diff --git a/reactos/dll/win32/netcfgx/lang/ja-JP.rc b/dll/win32/netcfgx/lang/ja-JP.rc similarity index 100% rename from reactos/dll/win32/netcfgx/lang/ja-JP.rc rename to dll/win32/netcfgx/lang/ja-JP.rc diff --git a/reactos/dll/win32/netcfgx/lang/nl-NL.rc b/dll/win32/netcfgx/lang/nl-NL.rc similarity index 100% rename from reactos/dll/win32/netcfgx/lang/nl-NL.rc rename to dll/win32/netcfgx/lang/nl-NL.rc diff --git a/reactos/dll/win32/netcfgx/lang/no-NO.rc b/dll/win32/netcfgx/lang/no-NO.rc similarity index 100% rename from reactos/dll/win32/netcfgx/lang/no-NO.rc rename to dll/win32/netcfgx/lang/no-NO.rc diff --git a/reactos/dll/win32/netcfgx/lang/pl-PL.rc b/dll/win32/netcfgx/lang/pl-PL.rc similarity index 100% rename from reactos/dll/win32/netcfgx/lang/pl-PL.rc rename to dll/win32/netcfgx/lang/pl-PL.rc diff --git a/reactos/dll/win32/netcfgx/lang/ro-RO.rc b/dll/win32/netcfgx/lang/ro-RO.rc similarity index 100% rename from reactos/dll/win32/netcfgx/lang/ro-RO.rc rename to dll/win32/netcfgx/lang/ro-RO.rc diff --git a/reactos/dll/win32/netcfgx/lang/ru-RU.rc b/dll/win32/netcfgx/lang/ru-RU.rc similarity index 100% rename from reactos/dll/win32/netcfgx/lang/ru-RU.rc rename to dll/win32/netcfgx/lang/ru-RU.rc diff --git a/reactos/dll/win32/netcfgx/lang/sk-SK.rc b/dll/win32/netcfgx/lang/sk-SK.rc similarity index 100% rename from reactos/dll/win32/netcfgx/lang/sk-SK.rc rename to dll/win32/netcfgx/lang/sk-SK.rc diff --git a/reactos/dll/win32/netcfgx/lang/sv-SE.rc b/dll/win32/netcfgx/lang/sv-SE.rc similarity index 100% rename from reactos/dll/win32/netcfgx/lang/sv-SE.rc rename to dll/win32/netcfgx/lang/sv-SE.rc diff --git a/reactos/dll/win32/netcfgx/lang/uk-UA.rc b/dll/win32/netcfgx/lang/uk-UA.rc similarity index 100% rename from reactos/dll/win32/netcfgx/lang/uk-UA.rc rename to dll/win32/netcfgx/lang/uk-UA.rc diff --git a/reactos/dll/win32/netcfgx/lang/zh-CN.rc b/dll/win32/netcfgx/lang/zh-CN.rc similarity index 100% rename from reactos/dll/win32/netcfgx/lang/zh-CN.rc rename to dll/win32/netcfgx/lang/zh-CN.rc diff --git a/reactos/dll/win32/netcfgx/netcfg_iface.c b/dll/win32/netcfgx/netcfg_iface.c similarity index 100% rename from reactos/dll/win32/netcfgx/netcfg_iface.c rename to dll/win32/netcfgx/netcfg_iface.c diff --git a/reactos/dll/win32/netcfgx/netcfgx.c b/dll/win32/netcfgx/netcfgx.c similarity index 100% rename from reactos/dll/win32/netcfgx/netcfgx.c rename to dll/win32/netcfgx/netcfgx.c diff --git a/reactos/dll/win32/netcfgx/netcfgx.rbuild b/dll/win32/netcfgx/netcfgx.rbuild similarity index 100% rename from reactos/dll/win32/netcfgx/netcfgx.rbuild rename to dll/win32/netcfgx/netcfgx.rbuild diff --git a/reactos/dll/win32/netcfgx/netcfgx.rc b/dll/win32/netcfgx/netcfgx.rc similarity index 100% rename from reactos/dll/win32/netcfgx/netcfgx.rc rename to dll/win32/netcfgx/netcfgx.rc diff --git a/reactos/dll/win32/netcfgx/netcfgx.spec b/dll/win32/netcfgx/netcfgx.spec similarity index 100% rename from reactos/dll/win32/netcfgx/netcfgx.spec rename to dll/win32/netcfgx/netcfgx.spec diff --git a/reactos/dll/win32/netcfgx/precomp.h b/dll/win32/netcfgx/precomp.h similarity index 100% rename from reactos/dll/win32/netcfgx/precomp.h rename to dll/win32/netcfgx/precomp.h diff --git a/reactos/dll/win32/netcfgx/resource.h b/dll/win32/netcfgx/resource.h similarity index 100% rename from reactos/dll/win32/netcfgx/resource.h rename to dll/win32/netcfgx/resource.h diff --git a/reactos/dll/win32/netcfgx/tcpipconf_notify.c b/dll/win32/netcfgx/tcpipconf_notify.c similarity index 100% rename from reactos/dll/win32/netcfgx/tcpipconf_notify.c rename to dll/win32/netcfgx/tcpipconf_notify.c diff --git a/reactos/dll/win32/netevent/CMakeLists.txt b/dll/win32/netevent/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/netevent/CMakeLists.txt rename to dll/win32/netevent/CMakeLists.txt diff --git a/reactos/dll/win32/netevent/netevent.rbuild b/dll/win32/netevent/netevent.rbuild similarity index 100% rename from reactos/dll/win32/netevent/netevent.rbuild rename to dll/win32/netevent/netevent.rbuild diff --git a/reactos/dll/win32/netevent/netevt.rc b/dll/win32/netevent/netevt.rc similarity index 100% rename from reactos/dll/win32/netevent/netevt.rc rename to dll/win32/netevent/netevt.rc diff --git a/reactos/dll/win32/netid/CMakeLists.txt b/dll/win32/netid/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/netid/CMakeLists.txt rename to dll/win32/netid/CMakeLists.txt diff --git a/reactos/dll/win32/netid/lang/bg-BG.rc b/dll/win32/netid/lang/bg-BG.rc similarity index 100% rename from reactos/dll/win32/netid/lang/bg-BG.rc rename to dll/win32/netid/lang/bg-BG.rc diff --git a/reactos/dll/win32/netid/lang/cs-CZ.rc b/dll/win32/netid/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/win32/netid/lang/cs-CZ.rc rename to dll/win32/netid/lang/cs-CZ.rc diff --git a/reactos/dll/win32/netid/lang/de-DE.rc b/dll/win32/netid/lang/de-DE.rc similarity index 100% rename from reactos/dll/win32/netid/lang/de-DE.rc rename to dll/win32/netid/lang/de-DE.rc diff --git a/reactos/dll/win32/netid/lang/el-GR.rc b/dll/win32/netid/lang/el-GR.rc similarity index 100% rename from reactos/dll/win32/netid/lang/el-GR.rc rename to dll/win32/netid/lang/el-GR.rc diff --git a/reactos/dll/win32/netid/lang/en-US.rc b/dll/win32/netid/lang/en-US.rc similarity index 100% rename from reactos/dll/win32/netid/lang/en-US.rc rename to dll/win32/netid/lang/en-US.rc diff --git a/reactos/dll/win32/netid/lang/es-ES.rc b/dll/win32/netid/lang/es-ES.rc similarity index 100% rename from reactos/dll/win32/netid/lang/es-ES.rc rename to dll/win32/netid/lang/es-ES.rc diff --git a/reactos/dll/win32/netid/lang/fr-FR.rc b/dll/win32/netid/lang/fr-FR.rc similarity index 100% rename from reactos/dll/win32/netid/lang/fr-FR.rc rename to dll/win32/netid/lang/fr-FR.rc diff --git a/reactos/dll/win32/netid/lang/id-ID.rc b/dll/win32/netid/lang/id-ID.rc similarity index 100% rename from reactos/dll/win32/netid/lang/id-ID.rc rename to dll/win32/netid/lang/id-ID.rc diff --git a/reactos/dll/win32/netid/lang/it-IT.rc b/dll/win32/netid/lang/it-IT.rc similarity index 100% rename from reactos/dll/win32/netid/lang/it-IT.rc rename to dll/win32/netid/lang/it-IT.rc diff --git a/reactos/dll/win32/netid/lang/ja-JP.rc b/dll/win32/netid/lang/ja-JP.rc similarity index 100% rename from reactos/dll/win32/netid/lang/ja-JP.rc rename to dll/win32/netid/lang/ja-JP.rc diff --git a/reactos/dll/win32/netid/lang/nl-NL.rc b/dll/win32/netid/lang/nl-NL.rc similarity index 100% rename from reactos/dll/win32/netid/lang/nl-NL.rc rename to dll/win32/netid/lang/nl-NL.rc diff --git a/reactos/dll/win32/netid/lang/no-NO.rc b/dll/win32/netid/lang/no-NO.rc similarity index 100% rename from reactos/dll/win32/netid/lang/no-NO.rc rename to dll/win32/netid/lang/no-NO.rc diff --git a/reactos/dll/win32/netid/lang/pl-PL.rc b/dll/win32/netid/lang/pl-PL.rc similarity index 100% rename from reactos/dll/win32/netid/lang/pl-PL.rc rename to dll/win32/netid/lang/pl-PL.rc diff --git a/reactos/dll/win32/netid/lang/ro-RO.rc b/dll/win32/netid/lang/ro-RO.rc similarity index 100% rename from reactos/dll/win32/netid/lang/ro-RO.rc rename to dll/win32/netid/lang/ro-RO.rc diff --git a/reactos/dll/win32/netid/lang/ru-RU.rc b/dll/win32/netid/lang/ru-RU.rc similarity index 100% rename from reactos/dll/win32/netid/lang/ru-RU.rc rename to dll/win32/netid/lang/ru-RU.rc diff --git a/reactos/dll/win32/netid/lang/sk-SK.rc b/dll/win32/netid/lang/sk-SK.rc similarity index 100% rename from reactos/dll/win32/netid/lang/sk-SK.rc rename to dll/win32/netid/lang/sk-SK.rc diff --git a/reactos/dll/win32/netid/lang/uk-UA.rc b/dll/win32/netid/lang/uk-UA.rc similarity index 100% rename from reactos/dll/win32/netid/lang/uk-UA.rc rename to dll/win32/netid/lang/uk-UA.rc diff --git a/reactos/dll/win32/netid/netid.c b/dll/win32/netid/netid.c similarity index 100% rename from reactos/dll/win32/netid/netid.c rename to dll/win32/netid/netid.c diff --git a/reactos/dll/win32/netid/netid.def b/dll/win32/netid/netid.def similarity index 100% rename from reactos/dll/win32/netid/netid.def rename to dll/win32/netid/netid.def diff --git a/reactos/dll/win32/netid/netid.rbuild b/dll/win32/netid/netid.rbuild similarity index 100% rename from reactos/dll/win32/netid/netid.rbuild rename to dll/win32/netid/netid.rbuild diff --git a/reactos/dll/win32/netid/netid.rc b/dll/win32/netid/netid.rc similarity index 100% rename from reactos/dll/win32/netid/netid.rc rename to dll/win32/netid/netid.rc diff --git a/reactos/dll/win32/netid/netid.spec b/dll/win32/netid/netid.spec similarity index 100% rename from reactos/dll/win32/netid/netid.spec rename to dll/win32/netid/netid.spec diff --git a/reactos/dll/win32/netid/res/101.ico b/dll/win32/netid/res/101.ico similarity index 100% rename from reactos/dll/win32/netid/res/101.ico rename to dll/win32/netid/res/101.ico diff --git a/reactos/dll/win32/netid/res/102.ico b/dll/win32/netid/res/102.ico similarity index 100% rename from reactos/dll/win32/netid/res/102.ico rename to dll/win32/netid/res/102.ico diff --git a/reactos/dll/win32/netid/resource.h b/dll/win32/netid/resource.h similarity index 100% rename from reactos/dll/win32/netid/resource.h rename to dll/win32/netid/resource.h diff --git a/reactos/dll/win32/netid/rsrc.rc b/dll/win32/netid/rsrc.rc similarity index 100% rename from reactos/dll/win32/netid/rsrc.rc rename to dll/win32/netid/rsrc.rc diff --git a/reactos/dll/win32/netshell/CMakeLists.txt b/dll/win32/netshell/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/netshell/CMakeLists.txt rename to dll/win32/netshell/CMakeLists.txt diff --git a/reactos/dll/win32/netshell/README b/dll/win32/netshell/README similarity index 100% rename from reactos/dll/win32/netshell/README rename to dll/win32/netshell/README diff --git a/reactos/dll/win32/netshell/classfactory.c b/dll/win32/netshell/classfactory.c similarity index 100% rename from reactos/dll/win32/netshell/classfactory.c rename to dll/win32/netshell/classfactory.c diff --git a/reactos/dll/win32/netshell/connectmanager.c b/dll/win32/netshell/connectmanager.c similarity index 100% rename from reactos/dll/win32/netshell/connectmanager.c rename to dll/win32/netshell/connectmanager.c diff --git a/reactos/dll/win32/netshell/enumlist.c b/dll/win32/netshell/enumlist.c similarity index 100% rename from reactos/dll/win32/netshell/enumlist.c rename to dll/win32/netshell/enumlist.c diff --git a/reactos/dll/win32/netshell/lanconnectui.c b/dll/win32/netshell/lanconnectui.c similarity index 100% rename from reactos/dll/win32/netshell/lanconnectui.c rename to dll/win32/netshell/lanconnectui.c diff --git a/reactos/dll/win32/netshell/lang/bg-BG.rc b/dll/win32/netshell/lang/bg-BG.rc similarity index 100% rename from reactos/dll/win32/netshell/lang/bg-BG.rc rename to dll/win32/netshell/lang/bg-BG.rc diff --git a/reactos/dll/win32/netshell/lang/cs-CZ.rc b/dll/win32/netshell/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/win32/netshell/lang/cs-CZ.rc rename to dll/win32/netshell/lang/cs-CZ.rc diff --git a/reactos/dll/win32/netshell/lang/da-DK.rc b/dll/win32/netshell/lang/da-DK.rc similarity index 100% rename from reactos/dll/win32/netshell/lang/da-DK.rc rename to dll/win32/netshell/lang/da-DK.rc diff --git a/reactos/dll/win32/netshell/lang/de-DE.rc b/dll/win32/netshell/lang/de-DE.rc similarity index 100% rename from reactos/dll/win32/netshell/lang/de-DE.rc rename to dll/win32/netshell/lang/de-DE.rc diff --git a/reactos/dll/win32/netshell/lang/el-GR.rc b/dll/win32/netshell/lang/el-GR.rc similarity index 100% rename from reactos/dll/win32/netshell/lang/el-GR.rc rename to dll/win32/netshell/lang/el-GR.rc diff --git a/reactos/dll/win32/netshell/lang/en-US.rc b/dll/win32/netshell/lang/en-US.rc similarity index 100% rename from reactos/dll/win32/netshell/lang/en-US.rc rename to dll/win32/netshell/lang/en-US.rc diff --git a/reactos/dll/win32/netshell/lang/es-ES.rc b/dll/win32/netshell/lang/es-ES.rc similarity index 100% rename from reactos/dll/win32/netshell/lang/es-ES.rc rename to dll/win32/netshell/lang/es-ES.rc diff --git a/reactos/dll/win32/netshell/lang/fr-FR.rc b/dll/win32/netshell/lang/fr-FR.rc similarity index 100% rename from reactos/dll/win32/netshell/lang/fr-FR.rc rename to dll/win32/netshell/lang/fr-FR.rc diff --git a/reactos/dll/win32/netshell/lang/hu-HU.rc b/dll/win32/netshell/lang/hu-HU.rc similarity index 100% rename from reactos/dll/win32/netshell/lang/hu-HU.rc rename to dll/win32/netshell/lang/hu-HU.rc diff --git a/reactos/dll/win32/netshell/lang/id-ID.rc b/dll/win32/netshell/lang/id-ID.rc similarity index 100% rename from reactos/dll/win32/netshell/lang/id-ID.rc rename to dll/win32/netshell/lang/id-ID.rc diff --git a/reactos/dll/win32/netshell/lang/it-IT.rc b/dll/win32/netshell/lang/it-IT.rc similarity index 100% rename from reactos/dll/win32/netshell/lang/it-IT.rc rename to dll/win32/netshell/lang/it-IT.rc diff --git a/reactos/dll/win32/netshell/lang/ja-JP.rc b/dll/win32/netshell/lang/ja-JP.rc similarity index 100% rename from reactos/dll/win32/netshell/lang/ja-JP.rc rename to dll/win32/netshell/lang/ja-JP.rc diff --git a/reactos/dll/win32/netshell/lang/nl-NL.rc b/dll/win32/netshell/lang/nl-NL.rc similarity index 100% rename from reactos/dll/win32/netshell/lang/nl-NL.rc rename to dll/win32/netshell/lang/nl-NL.rc diff --git a/reactos/dll/win32/netshell/lang/no-NO.rc b/dll/win32/netshell/lang/no-NO.rc similarity index 100% rename from reactos/dll/win32/netshell/lang/no-NO.rc rename to dll/win32/netshell/lang/no-NO.rc diff --git a/reactos/dll/win32/netshell/lang/pl-PL.rc b/dll/win32/netshell/lang/pl-PL.rc similarity index 100% rename from reactos/dll/win32/netshell/lang/pl-PL.rc rename to dll/win32/netshell/lang/pl-PL.rc diff --git a/reactos/dll/win32/netshell/lang/ro-RO.rc b/dll/win32/netshell/lang/ro-RO.rc similarity index 100% rename from reactos/dll/win32/netshell/lang/ro-RO.rc rename to dll/win32/netshell/lang/ro-RO.rc diff --git a/reactos/dll/win32/netshell/lang/ru-RU.rc b/dll/win32/netshell/lang/ru-RU.rc similarity index 100% rename from reactos/dll/win32/netshell/lang/ru-RU.rc rename to dll/win32/netshell/lang/ru-RU.rc diff --git a/reactos/dll/win32/netshell/lang/sk-SK.rc b/dll/win32/netshell/lang/sk-SK.rc similarity index 100% rename from reactos/dll/win32/netshell/lang/sk-SK.rc rename to dll/win32/netshell/lang/sk-SK.rc diff --git a/reactos/dll/win32/netshell/lang/sv-SE.rc b/dll/win32/netshell/lang/sv-SE.rc similarity index 100% rename from reactos/dll/win32/netshell/lang/sv-SE.rc rename to dll/win32/netshell/lang/sv-SE.rc diff --git a/reactos/dll/win32/netshell/lang/uk-UA.rc b/dll/win32/netshell/lang/uk-UA.rc similarity index 100% rename from reactos/dll/win32/netshell/lang/uk-UA.rc rename to dll/win32/netshell/lang/uk-UA.rc diff --git a/reactos/dll/win32/netshell/lang/zh-CN.rc b/dll/win32/netshell/lang/zh-CN.rc similarity index 100% rename from reactos/dll/win32/netshell/lang/zh-CN.rc rename to dll/win32/netshell/lang/zh-CN.rc diff --git a/reactos/dll/win32/netshell/lanstatusui.c b/dll/win32/netshell/lanstatusui.c similarity index 100% rename from reactos/dll/win32/netshell/lanstatusui.c rename to dll/win32/netshell/lanstatusui.c diff --git a/reactos/dll/win32/netshell/netshell.c b/dll/win32/netshell/netshell.c similarity index 100% rename from reactos/dll/win32/netshell/netshell.c rename to dll/win32/netshell/netshell.c diff --git a/reactos/dll/win32/netshell/netshell.rbuild b/dll/win32/netshell/netshell.rbuild similarity index 100% rename from reactos/dll/win32/netshell/netshell.rbuild rename to dll/win32/netshell/netshell.rbuild diff --git a/reactos/dll/win32/netshell/netshell.rc b/dll/win32/netshell/netshell.rc similarity index 100% rename from reactos/dll/win32/netshell/netshell.rc rename to dll/win32/netshell/netshell.rc diff --git a/reactos/dll/win32/netshell/netshell.spec b/dll/win32/netshell/netshell.spec similarity index 100% rename from reactos/dll/win32/netshell/netshell.spec rename to dll/win32/netshell/netshell.spec diff --git a/reactos/dll/win32/netshell/precomp.h b/dll/win32/netshell/precomp.h similarity index 100% rename from reactos/dll/win32/netshell/precomp.h rename to dll/win32/netshell/precomp.h diff --git a/reactos/dll/win32/netshell/res/neterror.ico b/dll/win32/netshell/res/neterror.ico similarity index 100% rename from reactos/dll/win32/netshell/res/neterror.ico rename to dll/win32/netshell/res/neterror.ico diff --git a/reactos/dll/win32/netshell/res/netidle.ico b/dll/win32/netshell/res/netidle.ico similarity index 100% rename from reactos/dll/win32/netshell/res/netidle.ico rename to dll/win32/netshell/res/netidle.ico diff --git a/reactos/dll/win32/netshell/res/netoff.ico b/dll/win32/netshell/res/netoff.ico similarity index 100% rename from reactos/dll/win32/netshell/res/netoff.ico rename to dll/win32/netshell/res/netoff.ico diff --git a/reactos/dll/win32/netshell/res/netrec.ico b/dll/win32/netshell/res/netrec.ico similarity index 100% rename from reactos/dll/win32/netshell/res/netrec.ico rename to dll/win32/netshell/res/netrec.ico diff --git a/reactos/dll/win32/netshell/res/netshell.ico b/dll/win32/netshell/res/netshell.ico similarity index 100% rename from reactos/dll/win32/netshell/res/netshell.ico rename to dll/win32/netshell/res/netshell.ico diff --git a/reactos/dll/win32/netshell/res/nettrans.ico b/dll/win32/netshell/res/nettrans.ico similarity index 100% rename from reactos/dll/win32/netshell/res/nettrans.ico rename to dll/win32/netshell/res/nettrans.ico diff --git a/reactos/dll/win32/netshell/res/nettrrec.ico b/dll/win32/netshell/res/nettrrec.ico similarity index 100% rename from reactos/dll/win32/netshell/res/nettrrec.ico rename to dll/win32/netshell/res/nettrrec.ico diff --git a/reactos/dll/win32/netshell/resource.h b/dll/win32/netshell/resource.h similarity index 100% rename from reactos/dll/win32/netshell/resource.h rename to dll/win32/netshell/resource.h diff --git a/reactos/dll/win32/netshell/shfldr_netconnect.c b/dll/win32/netshell/shfldr_netconnect.c similarity index 100% rename from reactos/dll/win32/netshell/shfldr_netconnect.c rename to dll/win32/netshell/shfldr_netconnect.c diff --git a/reactos/dll/win32/newdev/CMakeLists.txt b/dll/win32/newdev/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/newdev/CMakeLists.txt rename to dll/win32/newdev/CMakeLists.txt diff --git a/reactos/dll/win32/newdev/lang/bg-BG.rc b/dll/win32/newdev/lang/bg-BG.rc similarity index 100% rename from reactos/dll/win32/newdev/lang/bg-BG.rc rename to dll/win32/newdev/lang/bg-BG.rc diff --git a/reactos/dll/win32/newdev/lang/cs-CZ.rc b/dll/win32/newdev/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/win32/newdev/lang/cs-CZ.rc rename to dll/win32/newdev/lang/cs-CZ.rc diff --git a/reactos/dll/win32/newdev/lang/de-DE.rc b/dll/win32/newdev/lang/de-DE.rc similarity index 100% rename from reactos/dll/win32/newdev/lang/de-DE.rc rename to dll/win32/newdev/lang/de-DE.rc diff --git a/reactos/dll/win32/newdev/lang/el-GR.rc b/dll/win32/newdev/lang/el-GR.rc similarity index 100% rename from reactos/dll/win32/newdev/lang/el-GR.rc rename to dll/win32/newdev/lang/el-GR.rc diff --git a/reactos/dll/win32/newdev/lang/en-US.rc b/dll/win32/newdev/lang/en-US.rc similarity index 100% rename from reactos/dll/win32/newdev/lang/en-US.rc rename to dll/win32/newdev/lang/en-US.rc diff --git a/reactos/dll/win32/newdev/lang/es-ES.rc b/dll/win32/newdev/lang/es-ES.rc similarity index 100% rename from reactos/dll/win32/newdev/lang/es-ES.rc rename to dll/win32/newdev/lang/es-ES.rc diff --git a/reactos/dll/win32/newdev/lang/fr-FR.rc b/dll/win32/newdev/lang/fr-FR.rc similarity index 100% rename from reactos/dll/win32/newdev/lang/fr-FR.rc rename to dll/win32/newdev/lang/fr-FR.rc diff --git a/reactos/dll/win32/newdev/lang/hu-HU.rc b/dll/win32/newdev/lang/hu-HU.rc similarity index 100% rename from reactos/dll/win32/newdev/lang/hu-HU.rc rename to dll/win32/newdev/lang/hu-HU.rc diff --git a/reactos/dll/win32/newdev/lang/id-ID.rc b/dll/win32/newdev/lang/id-ID.rc similarity index 100% rename from reactos/dll/win32/newdev/lang/id-ID.rc rename to dll/win32/newdev/lang/id-ID.rc diff --git a/reactos/dll/win32/newdev/lang/it-IT.rc b/dll/win32/newdev/lang/it-IT.rc similarity index 100% rename from reactos/dll/win32/newdev/lang/it-IT.rc rename to dll/win32/newdev/lang/it-IT.rc diff --git a/reactos/dll/win32/newdev/lang/ja-JP.rc b/dll/win32/newdev/lang/ja-JP.rc similarity index 100% rename from reactos/dll/win32/newdev/lang/ja-JP.rc rename to dll/win32/newdev/lang/ja-JP.rc diff --git a/reactos/dll/win32/newdev/lang/nl-NL.rc b/dll/win32/newdev/lang/nl-NL.rc similarity index 100% rename from reactos/dll/win32/newdev/lang/nl-NL.rc rename to dll/win32/newdev/lang/nl-NL.rc diff --git a/reactos/dll/win32/newdev/lang/no-NO.rc b/dll/win32/newdev/lang/no-NO.rc similarity index 100% rename from reactos/dll/win32/newdev/lang/no-NO.rc rename to dll/win32/newdev/lang/no-NO.rc diff --git a/reactos/dll/win32/newdev/lang/pl-PL.rc b/dll/win32/newdev/lang/pl-PL.rc similarity index 100% rename from reactos/dll/win32/newdev/lang/pl-PL.rc rename to dll/win32/newdev/lang/pl-PL.rc diff --git a/reactos/dll/win32/newdev/lang/ro-RO.rc b/dll/win32/newdev/lang/ro-RO.rc similarity index 100% rename from reactos/dll/win32/newdev/lang/ro-RO.rc rename to dll/win32/newdev/lang/ro-RO.rc diff --git a/reactos/dll/win32/newdev/lang/ru-RU.rc b/dll/win32/newdev/lang/ru-RU.rc similarity index 100% rename from reactos/dll/win32/newdev/lang/ru-RU.rc rename to dll/win32/newdev/lang/ru-RU.rc diff --git a/reactos/dll/win32/newdev/lang/sk-SK.rc b/dll/win32/newdev/lang/sk-SK.rc similarity index 100% rename from reactos/dll/win32/newdev/lang/sk-SK.rc rename to dll/win32/newdev/lang/sk-SK.rc diff --git a/reactos/dll/win32/newdev/lang/th-TH.rc b/dll/win32/newdev/lang/th-TH.rc similarity index 100% rename from reactos/dll/win32/newdev/lang/th-TH.rc rename to dll/win32/newdev/lang/th-TH.rc diff --git a/reactos/dll/win32/newdev/lang/uk-UA.rc b/dll/win32/newdev/lang/uk-UA.rc similarity index 100% rename from reactos/dll/win32/newdev/lang/uk-UA.rc rename to dll/win32/newdev/lang/uk-UA.rc diff --git a/reactos/dll/win32/newdev/newdev.c b/dll/win32/newdev/newdev.c similarity index 100% rename from reactos/dll/win32/newdev/newdev.c rename to dll/win32/newdev/newdev.c diff --git a/reactos/dll/win32/newdev/newdev.rbuild b/dll/win32/newdev/newdev.rbuild similarity index 100% rename from reactos/dll/win32/newdev/newdev.rbuild rename to dll/win32/newdev/newdev.rbuild diff --git a/reactos/dll/win32/newdev/newdev.rc b/dll/win32/newdev/newdev.rc similarity index 100% rename from reactos/dll/win32/newdev/newdev.rc rename to dll/win32/newdev/newdev.rc diff --git a/reactos/dll/win32/newdev/newdev.spec b/dll/win32/newdev/newdev.spec similarity index 100% rename from reactos/dll/win32/newdev/newdev.spec rename to dll/win32/newdev/newdev.spec diff --git a/reactos/dll/win32/newdev/newdev_private.h b/dll/win32/newdev/newdev_private.h similarity index 100% rename from reactos/dll/win32/newdev/newdev_private.h rename to dll/win32/newdev/newdev_private.h diff --git a/reactos/dll/win32/newdev/resource.h b/dll/win32/newdev/resource.h similarity index 100% rename from reactos/dll/win32/newdev/resource.h rename to dll/win32/newdev/resource.h diff --git a/reactos/dll/win32/newdev/resources/header.bmp b/dll/win32/newdev/resources/header.bmp similarity index 100% rename from reactos/dll/win32/newdev/resources/header.bmp rename to dll/win32/newdev/resources/header.bmp diff --git a/reactos/dll/win32/newdev/resources/watermark.bmp b/dll/win32/newdev/resources/watermark.bmp similarity index 100% rename from reactos/dll/win32/newdev/resources/watermark.bmp rename to dll/win32/newdev/resources/watermark.bmp diff --git a/reactos/dll/win32/newdev/rsrc.rc b/dll/win32/newdev/rsrc.rc similarity index 100% rename from reactos/dll/win32/newdev/rsrc.rc rename to dll/win32/newdev/rsrc.rc diff --git a/reactos/dll/win32/newdev/stubs.c b/dll/win32/newdev/stubs.c similarity index 100% rename from reactos/dll/win32/newdev/stubs.c rename to dll/win32/newdev/stubs.c diff --git a/reactos/dll/win32/newdev/wizard.c b/dll/win32/newdev/wizard.c similarity index 100% rename from reactos/dll/win32/newdev/wizard.c rename to dll/win32/newdev/wizard.c diff --git a/reactos/dll/win32/ntdsapi/CMakeLists.txt b/dll/win32/ntdsapi/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/ntdsapi/CMakeLists.txt rename to dll/win32/ntdsapi/CMakeLists.txt diff --git a/reactos/dll/win32/ntdsapi/ntdsapi.c b/dll/win32/ntdsapi/ntdsapi.c similarity index 100% rename from reactos/dll/win32/ntdsapi/ntdsapi.c rename to dll/win32/ntdsapi/ntdsapi.c diff --git a/reactos/dll/win32/ntdsapi/ntdsapi.rbuild b/dll/win32/ntdsapi/ntdsapi.rbuild similarity index 100% rename from reactos/dll/win32/ntdsapi/ntdsapi.rbuild rename to dll/win32/ntdsapi/ntdsapi.rbuild diff --git a/reactos/dll/win32/ntdsapi/ntdsapi.spec b/dll/win32/ntdsapi/ntdsapi.spec similarity index 100% rename from reactos/dll/win32/ntdsapi/ntdsapi.spec rename to dll/win32/ntdsapi/ntdsapi.spec diff --git a/reactos/dll/win32/ntlanman/CMakeLists.txt b/dll/win32/ntlanman/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/ntlanman/CMakeLists.txt rename to dll/win32/ntlanman/CMakeLists.txt diff --git a/reactos/dll/win32/ntlanman/ntlanman.c b/dll/win32/ntlanman/ntlanman.c similarity index 100% rename from reactos/dll/win32/ntlanman/ntlanman.c rename to dll/win32/ntlanman/ntlanman.c diff --git a/reactos/dll/win32/ntlanman/ntlanman.rbuild b/dll/win32/ntlanman/ntlanman.rbuild similarity index 100% rename from reactos/dll/win32/ntlanman/ntlanman.rbuild rename to dll/win32/ntlanman/ntlanman.rbuild diff --git a/reactos/dll/win32/ntlanman/ntlanman.rc b/dll/win32/ntlanman/ntlanman.rc similarity index 100% rename from reactos/dll/win32/ntlanman/ntlanman.rc rename to dll/win32/ntlanman/ntlanman.rc diff --git a/reactos/dll/win32/ntlanman/ntlanman.spec b/dll/win32/ntlanman/ntlanman.spec similarity index 100% rename from reactos/dll/win32/ntlanman/ntlanman.spec rename to dll/win32/ntlanman/ntlanman.spec diff --git a/reactos/dll/win32/ntmarta/CMakeLists.txt b/dll/win32/ntmarta/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/ntmarta/CMakeLists.txt rename to dll/win32/ntmarta/CMakeLists.txt diff --git a/reactos/dll/win32/ntmarta/ntmarta.c b/dll/win32/ntmarta/ntmarta.c similarity index 100% rename from reactos/dll/win32/ntmarta/ntmarta.c rename to dll/win32/ntmarta/ntmarta.c diff --git a/reactos/dll/win32/ntmarta/ntmarta.h b/dll/win32/ntmarta/ntmarta.h similarity index 100% rename from reactos/dll/win32/ntmarta/ntmarta.h rename to dll/win32/ntmarta/ntmarta.h diff --git a/reactos/dll/win32/ntmarta/ntmarta.rbuild b/dll/win32/ntmarta/ntmarta.rbuild similarity index 100% rename from reactos/dll/win32/ntmarta/ntmarta.rbuild rename to dll/win32/ntmarta/ntmarta.rbuild diff --git a/reactos/dll/win32/ntmarta/ntmarta.rc b/dll/win32/ntmarta/ntmarta.rc similarity index 100% rename from reactos/dll/win32/ntmarta/ntmarta.rc rename to dll/win32/ntmarta/ntmarta.rc diff --git a/reactos/dll/win32/ntmarta/ntmarta.spec b/dll/win32/ntmarta/ntmarta.spec similarity index 100% rename from reactos/dll/win32/ntmarta/ntmarta.spec rename to dll/win32/ntmarta/ntmarta.spec diff --git a/reactos/dll/win32/ntprint/CMakeLists.txt b/dll/win32/ntprint/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/ntprint/CMakeLists.txt rename to dll/win32/ntprint/CMakeLists.txt diff --git a/reactos/dll/win32/ntprint/ntprint.c b/dll/win32/ntprint/ntprint.c similarity index 100% rename from reactos/dll/win32/ntprint/ntprint.c rename to dll/win32/ntprint/ntprint.c diff --git a/reactos/dll/win32/ntprint/ntprint.rbuild b/dll/win32/ntprint/ntprint.rbuild similarity index 100% rename from reactos/dll/win32/ntprint/ntprint.rbuild rename to dll/win32/ntprint/ntprint.rbuild diff --git a/reactos/dll/win32/ntprint/ntprint.rc b/dll/win32/ntprint/ntprint.rc similarity index 100% rename from reactos/dll/win32/ntprint/ntprint.rc rename to dll/win32/ntprint/ntprint.rc diff --git a/reactos/dll/win32/ntprint/ntprint.spec b/dll/win32/ntprint/ntprint.spec similarity index 100% rename from reactos/dll/win32/ntprint/ntprint.spec rename to dll/win32/ntprint/ntprint.spec diff --git a/reactos/dll/win32/objsel/CMakeLists.txt b/dll/win32/objsel/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/objsel/CMakeLists.txt rename to dll/win32/objsel/CMakeLists.txt diff --git a/reactos/dll/win32/objsel/factory.c b/dll/win32/objsel/factory.c similarity index 100% rename from reactos/dll/win32/objsel/factory.c rename to dll/win32/objsel/factory.c diff --git a/reactos/dll/win32/objsel/objsel.c b/dll/win32/objsel/objsel.c similarity index 100% rename from reactos/dll/win32/objsel/objsel.c rename to dll/win32/objsel/objsel.c diff --git a/reactos/dll/win32/objsel/objsel.rbuild b/dll/win32/objsel/objsel.rbuild similarity index 100% rename from reactos/dll/win32/objsel/objsel.rbuild rename to dll/win32/objsel/objsel.rbuild diff --git a/reactos/dll/win32/objsel/objsel.rc b/dll/win32/objsel/objsel.rc similarity index 100% rename from reactos/dll/win32/objsel/objsel.rc rename to dll/win32/objsel/objsel.rc diff --git a/reactos/dll/win32/objsel/objsel.spec b/dll/win32/objsel/objsel.spec similarity index 100% rename from reactos/dll/win32/objsel/objsel.spec rename to dll/win32/objsel/objsel.spec diff --git a/reactos/dll/win32/objsel/objsel_private.h b/dll/win32/objsel/objsel_private.h similarity index 100% rename from reactos/dll/win32/objsel/objsel_private.h rename to dll/win32/objsel/objsel_private.h diff --git a/reactos/dll/win32/objsel/regsvr.c b/dll/win32/objsel/regsvr.c similarity index 100% rename from reactos/dll/win32/objsel/regsvr.c rename to dll/win32/objsel/regsvr.c diff --git a/reactos/dll/win32/odbc32/CMakeLists.txt b/dll/win32/odbc32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/odbc32/CMakeLists.txt rename to dll/win32/odbc32/CMakeLists.txt diff --git a/reactos/dll/win32/odbc32/README.txt b/dll/win32/odbc32/README.txt similarity index 100% rename from reactos/dll/win32/odbc32/README.txt rename to dll/win32/odbc32/README.txt diff --git a/reactos/dll/win32/odbc32/odbc32.rbuild b/dll/win32/odbc32/odbc32.rbuild similarity index 100% rename from reactos/dll/win32/odbc32/odbc32.rbuild rename to dll/win32/odbc32/odbc32.rbuild diff --git a/reactos/dll/win32/odbc32/odbc32.rc b/dll/win32/odbc32/odbc32.rc similarity index 100% rename from reactos/dll/win32/odbc32/odbc32.rc rename to dll/win32/odbc32/odbc32.rc diff --git a/reactos/dll/win32/odbc32/odbc32.spec b/dll/win32/odbc32/odbc32.spec similarity index 100% rename from reactos/dll/win32/odbc32/odbc32.spec rename to dll/win32/odbc32/odbc32.spec diff --git a/reactos/dll/win32/odbc32/odbc32_ros.diff b/dll/win32/odbc32/odbc32_ros.diff similarity index 100% rename from reactos/dll/win32/odbc32/odbc32_ros.diff rename to dll/win32/odbc32/odbc32_ros.diff diff --git a/reactos/dll/win32/odbc32/proxyodbc.c b/dll/win32/odbc32/proxyodbc.c similarity index 100% rename from reactos/dll/win32/odbc32/proxyodbc.c rename to dll/win32/odbc32/proxyodbc.c diff --git a/reactos/dll/win32/odbc32/proxyodbc.h b/dll/win32/odbc32/proxyodbc.h similarity index 100% rename from reactos/dll/win32/odbc32/proxyodbc.h rename to dll/win32/odbc32/proxyodbc.h diff --git a/reactos/dll/win32/odbccp32/CMakeLists.txt b/dll/win32/odbccp32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/odbccp32/CMakeLists.txt rename to dll/win32/odbccp32/CMakeLists.txt diff --git a/reactos/dll/win32/odbccp32/odbccp32.c b/dll/win32/odbccp32/odbccp32.c similarity index 100% rename from reactos/dll/win32/odbccp32/odbccp32.c rename to dll/win32/odbccp32/odbccp32.c diff --git a/reactos/dll/win32/odbccp32/odbccp32.rbuild b/dll/win32/odbccp32/odbccp32.rbuild similarity index 100% rename from reactos/dll/win32/odbccp32/odbccp32.rbuild rename to dll/win32/odbccp32/odbccp32.rbuild diff --git a/reactos/dll/win32/odbccp32/odbccp32.spec b/dll/win32/odbccp32/odbccp32.spec similarity index 100% rename from reactos/dll/win32/odbccp32/odbccp32.spec rename to dll/win32/odbccp32/odbccp32.spec diff --git a/reactos/dll/win32/ole32/CMakeLists.txt b/dll/win32/ole32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/ole32/CMakeLists.txt rename to dll/win32/ole32/CMakeLists.txt diff --git a/reactos/dll/win32/ole32/antimoniker.c b/dll/win32/ole32/antimoniker.c similarity index 100% rename from reactos/dll/win32/ole32/antimoniker.c rename to dll/win32/ole32/antimoniker.c diff --git a/reactos/dll/win32/ole32/bindctx.c b/dll/win32/ole32/bindctx.c similarity index 100% rename from reactos/dll/win32/ole32/bindctx.c rename to dll/win32/ole32/bindctx.c diff --git a/reactos/dll/win32/ole32/classmoniker.c b/dll/win32/ole32/classmoniker.c similarity index 100% rename from reactos/dll/win32/ole32/classmoniker.c rename to dll/win32/ole32/classmoniker.c diff --git a/reactos/dll/win32/ole32/clipboard.c b/dll/win32/ole32/clipboard.c similarity index 100% rename from reactos/dll/win32/ole32/clipboard.c rename to dll/win32/ole32/clipboard.c diff --git a/reactos/dll/win32/ole32/comcat.c b/dll/win32/ole32/comcat.c similarity index 100% rename from reactos/dll/win32/ole32/comcat.c rename to dll/win32/ole32/comcat.c diff --git a/reactos/dll/win32/ole32/compobj.c b/dll/win32/ole32/compobj.c similarity index 100% rename from reactos/dll/win32/ole32/compobj.c rename to dll/win32/ole32/compobj.c diff --git a/reactos/dll/win32/ole32/compobj_private.h b/dll/win32/ole32/compobj_private.h similarity index 100% rename from reactos/dll/win32/ole32/compobj_private.h rename to dll/win32/ole32/compobj_private.h diff --git a/reactos/dll/win32/ole32/compositemoniker.c b/dll/win32/ole32/compositemoniker.c similarity index 100% rename from reactos/dll/win32/ole32/compositemoniker.c rename to dll/win32/ole32/compositemoniker.c diff --git a/reactos/dll/win32/ole32/datacache.c b/dll/win32/ole32/datacache.c similarity index 100% rename from reactos/dll/win32/ole32/datacache.c rename to dll/win32/ole32/datacache.c diff --git a/reactos/dll/win32/ole32/dcom.idl b/dll/win32/ole32/dcom.idl similarity index 100% rename from reactos/dll/win32/ole32/dcom.idl rename to dll/win32/ole32/dcom.idl diff --git a/reactos/dll/win32/ole32/defaulthandler.c b/dll/win32/ole32/defaulthandler.c similarity index 100% rename from reactos/dll/win32/ole32/defaulthandler.c rename to dll/win32/ole32/defaulthandler.c diff --git a/reactos/dll/win32/ole32/dictionary.c b/dll/win32/ole32/dictionary.c similarity index 100% rename from reactos/dll/win32/ole32/dictionary.c rename to dll/win32/ole32/dictionary.c diff --git a/reactos/dll/win32/ole32/dictionary.h b/dll/win32/ole32/dictionary.h similarity index 100% rename from reactos/dll/win32/ole32/dictionary.h rename to dll/win32/ole32/dictionary.h diff --git a/reactos/dll/win32/ole32/drag_copy.cur b/dll/win32/ole32/drag_copy.cur similarity index 100% rename from reactos/dll/win32/ole32/drag_copy.cur rename to dll/win32/ole32/drag_copy.cur diff --git a/reactos/dll/win32/ole32/drag_link.cur b/dll/win32/ole32/drag_link.cur similarity index 100% rename from reactos/dll/win32/ole32/drag_link.cur rename to dll/win32/ole32/drag_link.cur diff --git a/reactos/dll/win32/ole32/drag_move.cur b/dll/win32/ole32/drag_move.cur similarity index 100% rename from reactos/dll/win32/ole32/drag_move.cur rename to dll/win32/ole32/drag_move.cur diff --git a/reactos/dll/win32/ole32/enumx.c b/dll/win32/ole32/enumx.c similarity index 100% rename from reactos/dll/win32/ole32/enumx.c rename to dll/win32/ole32/enumx.c diff --git a/reactos/dll/win32/ole32/enumx.h b/dll/win32/ole32/enumx.h similarity index 100% rename from reactos/dll/win32/ole32/enumx.h rename to dll/win32/ole32/enumx.h diff --git a/reactos/dll/win32/ole32/errorinfo.c b/dll/win32/ole32/errorinfo.c similarity index 100% rename from reactos/dll/win32/ole32/errorinfo.c rename to dll/win32/ole32/errorinfo.c diff --git a/reactos/dll/win32/ole32/filelockbytes.c b/dll/win32/ole32/filelockbytes.c similarity index 100% rename from reactos/dll/win32/ole32/filelockbytes.c rename to dll/win32/ole32/filelockbytes.c diff --git a/reactos/dll/win32/ole32/filemoniker.c b/dll/win32/ole32/filemoniker.c similarity index 100% rename from reactos/dll/win32/ole32/filemoniker.c rename to dll/win32/ole32/filemoniker.c diff --git a/reactos/dll/win32/ole32/ftmarshal.c b/dll/win32/ole32/ftmarshal.c similarity index 100% rename from reactos/dll/win32/ole32/ftmarshal.c rename to dll/win32/ole32/ftmarshal.c diff --git a/reactos/dll/win32/ole32/git.c b/dll/win32/ole32/git.c similarity index 100% rename from reactos/dll/win32/ole32/git.c rename to dll/win32/ole32/git.c diff --git a/reactos/dll/win32/ole32/hglobalstream.c b/dll/win32/ole32/hglobalstream.c similarity index 100% rename from reactos/dll/win32/ole32/hglobalstream.c rename to dll/win32/ole32/hglobalstream.c diff --git a/reactos/dll/win32/ole32/ifs.c b/dll/win32/ole32/ifs.c similarity index 100% rename from reactos/dll/win32/ole32/ifs.c rename to dll/win32/ole32/ifs.c diff --git a/reactos/dll/win32/ole32/irot.idl b/dll/win32/ole32/irot.idl similarity index 100% rename from reactos/dll/win32/ole32/irot.idl rename to dll/win32/ole32/irot.idl diff --git a/reactos/dll/win32/ole32/itemmoniker.c b/dll/win32/ole32/itemmoniker.c similarity index 100% rename from reactos/dll/win32/ole32/itemmoniker.c rename to dll/win32/ole32/itemmoniker.c diff --git a/reactos/dll/win32/ole32/marshal.c b/dll/win32/ole32/marshal.c similarity index 100% rename from reactos/dll/win32/ole32/marshal.c rename to dll/win32/ole32/marshal.c diff --git a/reactos/dll/win32/ole32/memlockbytes.c b/dll/win32/ole32/memlockbytes.c similarity index 100% rename from reactos/dll/win32/ole32/memlockbytes.c rename to dll/win32/ole32/memlockbytes.c diff --git a/reactos/dll/win32/ole32/moniker.c b/dll/win32/ole32/moniker.c similarity index 100% rename from reactos/dll/win32/ole32/moniker.c rename to dll/win32/ole32/moniker.c diff --git a/reactos/dll/win32/ole32/moniker.h b/dll/win32/ole32/moniker.h similarity index 100% rename from reactos/dll/win32/ole32/moniker.h rename to dll/win32/ole32/moniker.h diff --git a/reactos/dll/win32/ole32/nodrop.cur b/dll/win32/ole32/nodrop.cur similarity index 100% rename from reactos/dll/win32/ole32/nodrop.cur rename to dll/win32/ole32/nodrop.cur diff --git a/reactos/dll/win32/ole32/ole2.c b/dll/win32/ole32/ole2.c similarity index 100% rename from reactos/dll/win32/ole32/ole2.c rename to dll/win32/ole32/ole2.c diff --git a/reactos/dll/win32/ole32/ole2impl.c b/dll/win32/ole32/ole2impl.c similarity index 100% rename from reactos/dll/win32/ole32/ole2impl.c rename to dll/win32/ole32/ole2impl.c diff --git a/reactos/dll/win32/ole32/ole2stubs.c b/dll/win32/ole32/ole2stubs.c similarity index 100% rename from reactos/dll/win32/ole32/ole2stubs.c rename to dll/win32/ole32/ole2stubs.c diff --git a/reactos/dll/win32/ole32/ole32.rbuild b/dll/win32/ole32/ole32.rbuild similarity index 100% rename from reactos/dll/win32/ole32/ole32.rbuild rename to dll/win32/ole32/ole32.rbuild diff --git a/reactos/dll/win32/ole32/ole32.spec b/dll/win32/ole32/ole32.spec similarity index 100% rename from reactos/dll/win32/ole32/ole32.spec rename to dll/win32/ole32/ole32.spec diff --git a/reactos/dll/win32/ole32/ole32_main.c b/dll/win32/ole32/ole32_main.c similarity index 100% rename from reactos/dll/win32/ole32/ole32_main.c rename to dll/win32/ole32/ole32_main.c diff --git a/reactos/dll/win32/ole32/ole32_objidl.idl b/dll/win32/ole32/ole32_objidl.idl similarity index 100% rename from reactos/dll/win32/ole32/ole32_objidl.idl rename to dll/win32/ole32/ole32_objidl.idl diff --git a/reactos/dll/win32/ole32/ole32_oleidl.idl b/dll/win32/ole32/ole32_oleidl.idl similarity index 100% rename from reactos/dll/win32/ole32/ole32_oleidl.idl rename to dll/win32/ole32/ole32_oleidl.idl diff --git a/reactos/dll/win32/ole32/ole32_unknwn.idl b/dll/win32/ole32/ole32_unknwn.idl similarity index 100% rename from reactos/dll/win32/ole32/ole32_unknwn.idl rename to dll/win32/ole32/ole32_unknwn.idl diff --git a/reactos/dll/win32/ole32/ole32res.rc b/dll/win32/ole32/ole32res.rc similarity index 100% rename from reactos/dll/win32/ole32/ole32res.rc rename to dll/win32/ole32/ole32res.rc diff --git a/reactos/dll/win32/ole32/oleobj.c b/dll/win32/ole32/oleobj.c similarity index 100% rename from reactos/dll/win32/ole32/oleobj.c rename to dll/win32/ole32/oleobj.c diff --git a/reactos/dll/win32/ole32/oleproxy.c b/dll/win32/ole32/oleproxy.c similarity index 100% rename from reactos/dll/win32/ole32/oleproxy.c rename to dll/win32/ole32/oleproxy.c diff --git a/reactos/dll/win32/ole32/olestd.h b/dll/win32/ole32/olestd.h similarity index 100% rename from reactos/dll/win32/ole32/olestd.h rename to dll/win32/ole32/olestd.h diff --git a/reactos/dll/win32/ole32/pointermoniker.c b/dll/win32/ole32/pointermoniker.c similarity index 100% rename from reactos/dll/win32/ole32/pointermoniker.c rename to dll/win32/ole32/pointermoniker.c diff --git a/reactos/dll/win32/ole32/regsvr.c b/dll/win32/ole32/regsvr.c similarity index 100% rename from reactos/dll/win32/ole32/regsvr.c rename to dll/win32/ole32/regsvr.c diff --git a/reactos/dll/win32/ole32/rpc.c b/dll/win32/ole32/rpc.c similarity index 100% rename from reactos/dll/win32/ole32/rpc.c rename to dll/win32/ole32/rpc.c diff --git a/reactos/dll/win32/ole32/stg_prop.c b/dll/win32/ole32/stg_prop.c similarity index 100% rename from reactos/dll/win32/ole32/stg_prop.c rename to dll/win32/ole32/stg_prop.c diff --git a/reactos/dll/win32/ole32/stg_stream.c b/dll/win32/ole32/stg_stream.c similarity index 100% rename from reactos/dll/win32/ole32/stg_stream.c rename to dll/win32/ole32/stg_stream.c diff --git a/reactos/dll/win32/ole32/storage32.c b/dll/win32/ole32/storage32.c similarity index 100% rename from reactos/dll/win32/ole32/storage32.c rename to dll/win32/ole32/storage32.c diff --git a/reactos/dll/win32/ole32/storage32.h b/dll/win32/ole32/storage32.h similarity index 100% rename from reactos/dll/win32/ole32/storage32.h rename to dll/win32/ole32/storage32.h diff --git a/reactos/dll/win32/ole32/stubmanager.c b/dll/win32/ole32/stubmanager.c similarity index 100% rename from reactos/dll/win32/ole32/stubmanager.c rename to dll/win32/ole32/stubmanager.c diff --git a/reactos/dll/win32/ole32/usrmarshal.c b/dll/win32/ole32/usrmarshal.c similarity index 100% rename from reactos/dll/win32/ole32/usrmarshal.c rename to dll/win32/ole32/usrmarshal.c diff --git a/reactos/dll/win32/oleacc/CMakeLists.txt b/dll/win32/oleacc/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/oleacc/CMakeLists.txt rename to dll/win32/oleacc/CMakeLists.txt diff --git a/reactos/dll/win32/oleacc/main.c b/dll/win32/oleacc/main.c similarity index 100% rename from reactos/dll/win32/oleacc/main.c rename to dll/win32/oleacc/main.c diff --git a/reactos/dll/win32/oleacc/oleacc.rbuild b/dll/win32/oleacc/oleacc.rbuild similarity index 100% rename from reactos/dll/win32/oleacc/oleacc.rbuild rename to dll/win32/oleacc/oleacc.rbuild diff --git a/reactos/dll/win32/oleacc/oleacc.rc b/dll/win32/oleacc/oleacc.rc similarity index 100% rename from reactos/dll/win32/oleacc/oleacc.rc rename to dll/win32/oleacc/oleacc.rc diff --git a/reactos/dll/win32/oleacc/oleacc.spec b/dll/win32/oleacc/oleacc.spec similarity index 100% rename from reactos/dll/win32/oleacc/oleacc.spec rename to dll/win32/oleacc/oleacc.spec diff --git a/reactos/dll/win32/oleacc/oleacc_De.rc b/dll/win32/oleacc/oleacc_De.rc similarity index 100% rename from reactos/dll/win32/oleacc/oleacc_De.rc rename to dll/win32/oleacc/oleacc_De.rc diff --git a/reactos/dll/win32/oleacc/oleacc_En.rc b/dll/win32/oleacc/oleacc_En.rc similarity index 100% rename from reactos/dll/win32/oleacc/oleacc_En.rc rename to dll/win32/oleacc/oleacc_En.rc diff --git a/reactos/dll/win32/oleacc/oleacc_Fr.rc b/dll/win32/oleacc/oleacc_Fr.rc similarity index 100% rename from reactos/dll/win32/oleacc/oleacc_Fr.rc rename to dll/win32/oleacc/oleacc_Fr.rc diff --git a/reactos/dll/win32/oleacc/oleacc_Hu.rc b/dll/win32/oleacc/oleacc_Hu.rc similarity index 100% rename from reactos/dll/win32/oleacc/oleacc_Hu.rc rename to dll/win32/oleacc/oleacc_Hu.rc diff --git a/reactos/dll/win32/oleacc/oleacc_It.rc b/dll/win32/oleacc/oleacc_It.rc similarity index 100% rename from reactos/dll/win32/oleacc/oleacc_It.rc rename to dll/win32/oleacc/oleacc_It.rc diff --git a/reactos/dll/win32/oleacc/oleacc_Ko.rc b/dll/win32/oleacc/oleacc_Ko.rc similarity index 100% rename from reactos/dll/win32/oleacc/oleacc_Ko.rc rename to dll/win32/oleacc/oleacc_Ko.rc diff --git a/reactos/dll/win32/oleacc/oleacc_Lt.rc b/dll/win32/oleacc/oleacc_Lt.rc similarity index 100% rename from reactos/dll/win32/oleacc/oleacc_Lt.rc rename to dll/win32/oleacc/oleacc_Lt.rc diff --git a/reactos/dll/win32/oleacc/oleacc_Nl.rc b/dll/win32/oleacc/oleacc_Nl.rc similarity index 100% rename from reactos/dll/win32/oleacc/oleacc_Nl.rc rename to dll/win32/oleacc/oleacc_Nl.rc diff --git a/reactos/dll/win32/oleacc/oleacc_No.rc b/dll/win32/oleacc/oleacc_No.rc similarity index 100% rename from reactos/dll/win32/oleacc/oleacc_No.rc rename to dll/win32/oleacc/oleacc_No.rc diff --git a/reactos/dll/win32/oleacc/oleacc_Pl.rc b/dll/win32/oleacc/oleacc_Pl.rc similarity index 100% rename from reactos/dll/win32/oleacc/oleacc_Pl.rc rename to dll/win32/oleacc/oleacc_Pl.rc diff --git a/reactos/dll/win32/oleacc/oleacc_Pt.rc b/dll/win32/oleacc/oleacc_Pt.rc similarity index 100% rename from reactos/dll/win32/oleacc/oleacc_Pt.rc rename to dll/win32/oleacc/oleacc_Pt.rc diff --git a/reactos/dll/win32/oleacc/oleacc_Ro.rc b/dll/win32/oleacc/oleacc_Ro.rc similarity index 100% rename from reactos/dll/win32/oleacc/oleacc_Ro.rc rename to dll/win32/oleacc/oleacc_Ro.rc diff --git a/reactos/dll/win32/oleacc/oleacc_Si.rc b/dll/win32/oleacc/oleacc_Si.rc similarity index 100% rename from reactos/dll/win32/oleacc/oleacc_Si.rc rename to dll/win32/oleacc/oleacc_Si.rc diff --git a/reactos/dll/win32/oleacc/oleacc_Uk.rc b/dll/win32/oleacc/oleacc_Uk.rc similarity index 100% rename from reactos/dll/win32/oleacc/oleacc_Uk.rc rename to dll/win32/oleacc/oleacc_Uk.rc diff --git a/reactos/dll/win32/oleaut32/CMakeLists.txt b/dll/win32/oleaut32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/oleaut32/CMakeLists.txt rename to dll/win32/oleaut32/CMakeLists.txt diff --git a/reactos/dll/win32/oleaut32/connpt.c b/dll/win32/oleaut32/connpt.c similarity index 100% rename from reactos/dll/win32/oleaut32/connpt.c rename to dll/win32/oleaut32/connpt.c diff --git a/reactos/dll/win32/oleaut32/connpt.h b/dll/win32/oleaut32/connpt.h similarity index 100% rename from reactos/dll/win32/oleaut32/connpt.h rename to dll/win32/oleaut32/connpt.h diff --git a/reactos/dll/win32/oleaut32/dispatch.c b/dll/win32/oleaut32/dispatch.c similarity index 100% rename from reactos/dll/win32/oleaut32/dispatch.c rename to dll/win32/oleaut32/dispatch.c diff --git a/reactos/dll/win32/oleaut32/hash.c b/dll/win32/oleaut32/hash.c similarity index 100% rename from reactos/dll/win32/oleaut32/hash.c rename to dll/win32/oleaut32/hash.c diff --git a/reactos/dll/win32/oleaut32/msvc.S b/dll/win32/oleaut32/msvc.S similarity index 100% rename from reactos/dll/win32/oleaut32/msvc.S rename to dll/win32/oleaut32/msvc.S diff --git a/reactos/dll/win32/oleaut32/oleaut.c b/dll/win32/oleaut32/oleaut.c similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut.c rename to dll/win32/oleaut32/oleaut.c diff --git a/reactos/dll/win32/oleaut32/oleaut32.rbuild b/dll/win32/oleaut32/oleaut32.rbuild similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32.rbuild rename to dll/win32/oleaut32/oleaut32.rbuild diff --git a/reactos/dll/win32/oleaut32/oleaut32.rc b/dll/win32/oleaut32/oleaut32.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32.rc rename to dll/win32/oleaut32/oleaut32.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32.spec b/dll/win32/oleaut32/oleaut32.spec similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32.spec rename to dll/win32/oleaut32/oleaut32.spec diff --git a/reactos/dll/win32/oleaut32/oleaut32_Bg.rc b/dll/win32/oleaut32/oleaut32_Bg.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_Bg.rc rename to dll/win32/oleaut32/oleaut32_Bg.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_Cy.rc b/dll/win32/oleaut32/oleaut32_Cy.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_Cy.rc rename to dll/win32/oleaut32/oleaut32_Cy.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_Cz.rc b/dll/win32/oleaut32/oleaut32_Cz.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_Cz.rc rename to dll/win32/oleaut32/oleaut32_Cz.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_Da.rc b/dll/win32/oleaut32/oleaut32_Da.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_Da.rc rename to dll/win32/oleaut32/oleaut32_Da.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_De.rc b/dll/win32/oleaut32/oleaut32_De.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_De.rc rename to dll/win32/oleaut32/oleaut32_De.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_El.rc b/dll/win32/oleaut32/oleaut32_El.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_El.rc rename to dll/win32/oleaut32/oleaut32_El.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_En.rc b/dll/win32/oleaut32/oleaut32_En.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_En.rc rename to dll/win32/oleaut32/oleaut32_En.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_Es.rc b/dll/win32/oleaut32/oleaut32_Es.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_Es.rc rename to dll/win32/oleaut32/oleaut32_Es.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_Fr.rc b/dll/win32/oleaut32/oleaut32_Fr.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_Fr.rc rename to dll/win32/oleaut32/oleaut32_Fr.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_Hu.rc b/dll/win32/oleaut32/oleaut32_Hu.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_Hu.rc rename to dll/win32/oleaut32/oleaut32_Hu.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_It.rc b/dll/win32/oleaut32/oleaut32_It.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_It.rc rename to dll/win32/oleaut32/oleaut32_It.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_Ja.rc b/dll/win32/oleaut32/oleaut32_Ja.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_Ja.rc rename to dll/win32/oleaut32/oleaut32_Ja.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_Ko.rc b/dll/win32/oleaut32/oleaut32_Ko.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_Ko.rc rename to dll/win32/oleaut32/oleaut32_Ko.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_Lt.rc b/dll/win32/oleaut32/oleaut32_Lt.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_Lt.rc rename to dll/win32/oleaut32/oleaut32_Lt.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_Nl.rc b/dll/win32/oleaut32/oleaut32_Nl.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_Nl.rc rename to dll/win32/oleaut32/oleaut32_Nl.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_No.rc b/dll/win32/oleaut32/oleaut32_No.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_No.rc rename to dll/win32/oleaut32/oleaut32_No.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_Pl.rc b/dll/win32/oleaut32/oleaut32_Pl.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_Pl.rc rename to dll/win32/oleaut32/oleaut32_Pl.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_Pt.rc b/dll/win32/oleaut32/oleaut32_Pt.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_Pt.rc rename to dll/win32/oleaut32/oleaut32_Pt.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_Ro.rc b/dll/win32/oleaut32/oleaut32_Ro.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_Ro.rc rename to dll/win32/oleaut32/oleaut32_Ro.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_Ru.rc b/dll/win32/oleaut32/oleaut32_Ru.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_Ru.rc rename to dll/win32/oleaut32/oleaut32_Ru.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_Si.rc b/dll/win32/oleaut32/oleaut32_Si.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_Si.rc rename to dll/win32/oleaut32/oleaut32_Si.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_Sv.rc b/dll/win32/oleaut32/oleaut32_Sv.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_Sv.rc rename to dll/win32/oleaut32/oleaut32_Sv.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_Th.rc b/dll/win32/oleaut32/oleaut32_Th.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_Th.rc rename to dll/win32/oleaut32/oleaut32_Th.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_Tr.rc b/dll/win32/oleaut32/oleaut32_Tr.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_Tr.rc rename to dll/win32/oleaut32/oleaut32_Tr.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_Uk.rc b/dll/win32/oleaut32/oleaut32_Uk.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_Uk.rc rename to dll/win32/oleaut32/oleaut32_Uk.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_Zh.rc b/dll/win32/oleaut32/oleaut32_Zh.rc similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_Zh.rc rename to dll/win32/oleaut32/oleaut32_Zh.rc diff --git a/reactos/dll/win32/oleaut32/oleaut32_oaidl.idl b/dll/win32/oleaut32/oleaut32_oaidl.idl similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_oaidl.idl rename to dll/win32/oleaut32/oleaut32_oaidl.idl diff --git a/reactos/dll/win32/oleaut32/oleaut32_ocidl.idl b/dll/win32/oleaut32/oleaut32_ocidl.idl similarity index 100% rename from reactos/dll/win32/oleaut32/oleaut32_ocidl.idl rename to dll/win32/oleaut32/oleaut32_ocidl.idl diff --git a/reactos/dll/win32/oleaut32/olefont.c b/dll/win32/oleaut32/olefont.c similarity index 100% rename from reactos/dll/win32/oleaut32/olefont.c rename to dll/win32/oleaut32/olefont.c diff --git a/reactos/dll/win32/oleaut32/olepicture.c b/dll/win32/oleaut32/olepicture.c similarity index 100% rename from reactos/dll/win32/oleaut32/olepicture.c rename to dll/win32/oleaut32/olepicture.c diff --git a/reactos/dll/win32/oleaut32/recinfo.c b/dll/win32/oleaut32/recinfo.c similarity index 100% rename from reactos/dll/win32/oleaut32/recinfo.c rename to dll/win32/oleaut32/recinfo.c diff --git a/reactos/dll/win32/oleaut32/regsvr.c b/dll/win32/oleaut32/regsvr.c similarity index 100% rename from reactos/dll/win32/oleaut32/regsvr.c rename to dll/win32/oleaut32/regsvr.c diff --git a/reactos/dll/win32/oleaut32/resource.h b/dll/win32/oleaut32/resource.h similarity index 100% rename from reactos/dll/win32/oleaut32/resource.h rename to dll/win32/oleaut32/resource.h diff --git a/reactos/dll/win32/oleaut32/safearray.c b/dll/win32/oleaut32/safearray.c similarity index 100% rename from reactos/dll/win32/oleaut32/safearray.c rename to dll/win32/oleaut32/safearray.c diff --git a/reactos/dll/win32/oleaut32/stubs.c b/dll/win32/oleaut32/stubs.c similarity index 100% rename from reactos/dll/win32/oleaut32/stubs.c rename to dll/win32/oleaut32/stubs.c diff --git a/reactos/dll/win32/oleaut32/tmarshal.c b/dll/win32/oleaut32/tmarshal.c similarity index 100% rename from reactos/dll/win32/oleaut32/tmarshal.c rename to dll/win32/oleaut32/tmarshal.c diff --git a/reactos/dll/win32/oleaut32/typelib.c b/dll/win32/oleaut32/typelib.c similarity index 100% rename from reactos/dll/win32/oleaut32/typelib.c rename to dll/win32/oleaut32/typelib.c diff --git a/reactos/dll/win32/oleaut32/typelib.h b/dll/win32/oleaut32/typelib.h similarity index 100% rename from reactos/dll/win32/oleaut32/typelib.h rename to dll/win32/oleaut32/typelib.h diff --git a/reactos/dll/win32/oleaut32/typelib2.c b/dll/win32/oleaut32/typelib2.c similarity index 100% rename from reactos/dll/win32/oleaut32/typelib2.c rename to dll/win32/oleaut32/typelib2.c diff --git a/reactos/dll/win32/oleaut32/ungif.c b/dll/win32/oleaut32/ungif.c similarity index 100% rename from reactos/dll/win32/oleaut32/ungif.c rename to dll/win32/oleaut32/ungif.c diff --git a/reactos/dll/win32/oleaut32/ungif.h b/dll/win32/oleaut32/ungif.h similarity index 100% rename from reactos/dll/win32/oleaut32/ungif.h rename to dll/win32/oleaut32/ungif.h diff --git a/reactos/dll/win32/oleaut32/usrmarshal.c b/dll/win32/oleaut32/usrmarshal.c similarity index 100% rename from reactos/dll/win32/oleaut32/usrmarshal.c rename to dll/win32/oleaut32/usrmarshal.c diff --git a/reactos/dll/win32/oleaut32/varformat.c b/dll/win32/oleaut32/varformat.c similarity index 100% rename from reactos/dll/win32/oleaut32/varformat.c rename to dll/win32/oleaut32/varformat.c diff --git a/reactos/dll/win32/oleaut32/variant.c b/dll/win32/oleaut32/variant.c similarity index 100% rename from reactos/dll/win32/oleaut32/variant.c rename to dll/win32/oleaut32/variant.c diff --git a/reactos/dll/win32/oleaut32/variant.h b/dll/win32/oleaut32/variant.h similarity index 100% rename from reactos/dll/win32/oleaut32/variant.h rename to dll/win32/oleaut32/variant.h diff --git a/reactos/dll/win32/oleaut32/vartype.c b/dll/win32/oleaut32/vartype.c similarity index 100% rename from reactos/dll/win32/oleaut32/vartype.c rename to dll/win32/oleaut32/vartype.c diff --git a/reactos/dll/win32/oleaut32/version.rc b/dll/win32/oleaut32/version.rc similarity index 100% rename from reactos/dll/win32/oleaut32/version.rc rename to dll/win32/oleaut32/version.rc diff --git a/reactos/dll/win32/olecli32/CMakeLists.txt b/dll/win32/olecli32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/olecli32/CMakeLists.txt rename to dll/win32/olecli32/CMakeLists.txt diff --git a/reactos/dll/win32/olecli32/olecli.h b/dll/win32/olecli32/olecli.h similarity index 100% rename from reactos/dll/win32/olecli32/olecli.h rename to dll/win32/olecli32/olecli.h diff --git a/reactos/dll/win32/olecli32/olecli32.rbuild b/dll/win32/olecli32/olecli32.rbuild similarity index 100% rename from reactos/dll/win32/olecli32/olecli32.rbuild rename to dll/win32/olecli32/olecli32.rbuild diff --git a/reactos/dll/win32/olecli32/olecli32.spec b/dll/win32/olecli32/olecli32.spec similarity index 100% rename from reactos/dll/win32/olecli32/olecli32.spec rename to dll/win32/olecli32/olecli32.spec diff --git a/reactos/dll/win32/olecli32/olecli_main.c b/dll/win32/olecli32/olecli_main.c similarity index 100% rename from reactos/dll/win32/olecli32/olecli_main.c rename to dll/win32/olecli32/olecli_main.c diff --git a/reactos/dll/win32/oledlg/CMakeLists.txt b/dll/win32/oledlg/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/oledlg/CMakeLists.txt rename to dll/win32/oledlg/CMakeLists.txt diff --git a/reactos/dll/win32/oledlg/insobjdlg.c b/dll/win32/oledlg/insobjdlg.c similarity index 100% rename from reactos/dll/win32/oledlg/insobjdlg.c rename to dll/win32/oledlg/insobjdlg.c diff --git a/reactos/dll/win32/oledlg/oledlg.rbuild b/dll/win32/oledlg/oledlg.rbuild similarity index 100% rename from reactos/dll/win32/oledlg/oledlg.rbuild rename to dll/win32/oledlg/oledlg.rbuild diff --git a/reactos/dll/win32/oledlg/oledlg.spec b/dll/win32/oledlg/oledlg.spec similarity index 100% rename from reactos/dll/win32/oledlg/oledlg.spec rename to dll/win32/oledlg/oledlg.spec diff --git a/reactos/dll/win32/oledlg/oledlg_Cs.rc b/dll/win32/oledlg/oledlg_Cs.rc similarity index 100% rename from reactos/dll/win32/oledlg/oledlg_Cs.rc rename to dll/win32/oledlg/oledlg_Cs.rc diff --git a/reactos/dll/win32/oledlg/oledlg_Da.rc b/dll/win32/oledlg/oledlg_Da.rc similarity index 100% rename from reactos/dll/win32/oledlg/oledlg_Da.rc rename to dll/win32/oledlg/oledlg_Da.rc diff --git a/reactos/dll/win32/oledlg/oledlg_De.rc b/dll/win32/oledlg/oledlg_De.rc similarity index 100% rename from reactos/dll/win32/oledlg/oledlg_De.rc rename to dll/win32/oledlg/oledlg_De.rc diff --git a/reactos/dll/win32/oledlg/oledlg_En.rc b/dll/win32/oledlg/oledlg_En.rc similarity index 100% rename from reactos/dll/win32/oledlg/oledlg_En.rc rename to dll/win32/oledlg/oledlg_En.rc diff --git a/reactos/dll/win32/oledlg/oledlg_Es.rc b/dll/win32/oledlg/oledlg_Es.rc similarity index 100% rename from reactos/dll/win32/oledlg/oledlg_Es.rc rename to dll/win32/oledlg/oledlg_Es.rc diff --git a/reactos/dll/win32/oledlg/oledlg_Fr.rc b/dll/win32/oledlg/oledlg_Fr.rc similarity index 100% rename from reactos/dll/win32/oledlg/oledlg_Fr.rc rename to dll/win32/oledlg/oledlg_Fr.rc diff --git a/reactos/dll/win32/oledlg/oledlg_Hu.rc b/dll/win32/oledlg/oledlg_Hu.rc similarity index 100% rename from reactos/dll/win32/oledlg/oledlg_Hu.rc rename to dll/win32/oledlg/oledlg_Hu.rc diff --git a/reactos/dll/win32/oledlg/oledlg_It.rc b/dll/win32/oledlg/oledlg_It.rc similarity index 100% rename from reactos/dll/win32/oledlg/oledlg_It.rc rename to dll/win32/oledlg/oledlg_It.rc diff --git a/reactos/dll/win32/oledlg/oledlg_Ja.rc b/dll/win32/oledlg/oledlg_Ja.rc similarity index 100% rename from reactos/dll/win32/oledlg/oledlg_Ja.rc rename to dll/win32/oledlg/oledlg_Ja.rc diff --git a/reactos/dll/win32/oledlg/oledlg_Ko.rc b/dll/win32/oledlg/oledlg_Ko.rc similarity index 100% rename from reactos/dll/win32/oledlg/oledlg_Ko.rc rename to dll/win32/oledlg/oledlg_Ko.rc diff --git a/reactos/dll/win32/oledlg/oledlg_Lt.rc b/dll/win32/oledlg/oledlg_Lt.rc similarity index 100% rename from reactos/dll/win32/oledlg/oledlg_Lt.rc rename to dll/win32/oledlg/oledlg_Lt.rc diff --git a/reactos/dll/win32/oledlg/oledlg_Nl.rc b/dll/win32/oledlg/oledlg_Nl.rc similarity index 100% rename from reactos/dll/win32/oledlg/oledlg_Nl.rc rename to dll/win32/oledlg/oledlg_Nl.rc diff --git a/reactos/dll/win32/oledlg/oledlg_No.rc b/dll/win32/oledlg/oledlg_No.rc similarity index 100% rename from reactos/dll/win32/oledlg/oledlg_No.rc rename to dll/win32/oledlg/oledlg_No.rc diff --git a/reactos/dll/win32/oledlg/oledlg_Pl.rc b/dll/win32/oledlg/oledlg_Pl.rc similarity index 100% rename from reactos/dll/win32/oledlg/oledlg_Pl.rc rename to dll/win32/oledlg/oledlg_Pl.rc diff --git a/reactos/dll/win32/oledlg/oledlg_Pt.rc b/dll/win32/oledlg/oledlg_Pt.rc similarity index 100% rename from reactos/dll/win32/oledlg/oledlg_Pt.rc rename to dll/win32/oledlg/oledlg_Pt.rc diff --git a/reactos/dll/win32/oledlg/oledlg_Ro.rc b/dll/win32/oledlg/oledlg_Ro.rc similarity index 100% rename from reactos/dll/win32/oledlg/oledlg_Ro.rc rename to dll/win32/oledlg/oledlg_Ro.rc diff --git a/reactos/dll/win32/oledlg/oledlg_Ru.rc b/dll/win32/oledlg/oledlg_Ru.rc similarity index 100% rename from reactos/dll/win32/oledlg/oledlg_Ru.rc rename to dll/win32/oledlg/oledlg_Ru.rc diff --git a/reactos/dll/win32/oledlg/oledlg_Si.rc b/dll/win32/oledlg/oledlg_Si.rc similarity index 100% rename from reactos/dll/win32/oledlg/oledlg_Si.rc rename to dll/win32/oledlg/oledlg_Si.rc diff --git a/reactos/dll/win32/oledlg/oledlg_Sv.rc b/dll/win32/oledlg/oledlg_Sv.rc similarity index 100% rename from reactos/dll/win32/oledlg/oledlg_Sv.rc rename to dll/win32/oledlg/oledlg_Sv.rc diff --git a/reactos/dll/win32/oledlg/oledlg_Tr.rc b/dll/win32/oledlg/oledlg_Tr.rc similarity index 100% rename from reactos/dll/win32/oledlg/oledlg_Tr.rc rename to dll/win32/oledlg/oledlg_Tr.rc diff --git a/reactos/dll/win32/oledlg/oledlg_Uk.rc b/dll/win32/oledlg/oledlg_Uk.rc similarity index 100% rename from reactos/dll/win32/oledlg/oledlg_Uk.rc rename to dll/win32/oledlg/oledlg_Uk.rc diff --git a/reactos/dll/win32/oledlg/oledlg_Zh.rc b/dll/win32/oledlg/oledlg_Zh.rc similarity index 100% rename from reactos/dll/win32/oledlg/oledlg_Zh.rc rename to dll/win32/oledlg/oledlg_Zh.rc diff --git a/reactos/dll/win32/oledlg/oledlg_main.c b/dll/win32/oledlg/oledlg_main.c similarity index 100% rename from reactos/dll/win32/oledlg/oledlg_main.c rename to dll/win32/oledlg/oledlg_main.c diff --git a/reactos/dll/win32/oledlg/oledlg_private.h b/dll/win32/oledlg/oledlg_private.h similarity index 100% rename from reactos/dll/win32/oledlg/oledlg_private.h rename to dll/win32/oledlg/oledlg_private.h diff --git a/reactos/dll/win32/oledlg/pastespl.c b/dll/win32/oledlg/pastespl.c similarity index 100% rename from reactos/dll/win32/oledlg/pastespl.c rename to dll/win32/oledlg/pastespl.c diff --git a/reactos/dll/win32/oledlg/resource.h b/dll/win32/oledlg/resource.h similarity index 100% rename from reactos/dll/win32/oledlg/resource.h rename to dll/win32/oledlg/resource.h diff --git a/reactos/dll/win32/oledlg/rsrc.rc b/dll/win32/oledlg/rsrc.rc similarity index 100% rename from reactos/dll/win32/oledlg/rsrc.rc rename to dll/win32/oledlg/rsrc.rc diff --git a/reactos/dll/win32/olepro32/CMakeLists.txt b/dll/win32/olepro32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/olepro32/CMakeLists.txt rename to dll/win32/olepro32/CMakeLists.txt diff --git a/reactos/dll/win32/olepro32/README b/dll/win32/olepro32/README similarity index 100% rename from reactos/dll/win32/olepro32/README rename to dll/win32/olepro32/README diff --git a/reactos/dll/win32/olepro32/olepro32.rbuild b/dll/win32/olepro32/olepro32.rbuild similarity index 100% rename from reactos/dll/win32/olepro32/olepro32.rbuild rename to dll/win32/olepro32/olepro32.rbuild diff --git a/reactos/dll/win32/olepro32/olepro32.spec b/dll/win32/olepro32/olepro32.spec similarity index 100% rename from reactos/dll/win32/olepro32/olepro32.spec rename to dll/win32/olepro32/olepro32.spec diff --git a/reactos/dll/win32/olepro32/olepro32stubs.c b/dll/win32/olepro32/olepro32stubs.c similarity index 100% rename from reactos/dll/win32/olepro32/olepro32stubs.c rename to dll/win32/olepro32/olepro32stubs.c diff --git a/reactos/dll/win32/olepro32/version.rc b/dll/win32/olepro32/version.rc similarity index 100% rename from reactos/dll/win32/olepro32/version.rc rename to dll/win32/olepro32/version.rc diff --git a/reactos/dll/win32/olesvr32/CMakeLists.txt b/dll/win32/olesvr32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/olesvr32/CMakeLists.txt rename to dll/win32/olesvr32/CMakeLists.txt diff --git a/reactos/dll/win32/olesvr32/olesvr32.rbuild b/dll/win32/olesvr32/olesvr32.rbuild similarity index 100% rename from reactos/dll/win32/olesvr32/olesvr32.rbuild rename to dll/win32/olesvr32/olesvr32.rbuild diff --git a/reactos/dll/win32/olesvr32/olesvr32.spec b/dll/win32/olesvr32/olesvr32.spec similarity index 100% rename from reactos/dll/win32/olesvr32/olesvr32.spec rename to dll/win32/olesvr32/olesvr32.spec diff --git a/reactos/dll/win32/olesvr32/olesvr_main.c b/dll/win32/olesvr32/olesvr_main.c similarity index 100% rename from reactos/dll/win32/olesvr32/olesvr_main.c rename to dll/win32/olesvr32/olesvr_main.c diff --git a/reactos/dll/win32/olethk32/CMakeLists.txt b/dll/win32/olethk32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/olethk32/CMakeLists.txt rename to dll/win32/olethk32/CMakeLists.txt diff --git a/reactos/dll/win32/olethk32/main.c b/dll/win32/olethk32/main.c similarity index 100% rename from reactos/dll/win32/olethk32/main.c rename to dll/win32/olethk32/main.c diff --git a/reactos/dll/win32/olethk32/olethk32.rbuild b/dll/win32/olethk32/olethk32.rbuild similarity index 100% rename from reactos/dll/win32/olethk32/olethk32.rbuild rename to dll/win32/olethk32/olethk32.rbuild diff --git a/reactos/dll/win32/olethk32/olethk32.spec b/dll/win32/olethk32/olethk32.spec similarity index 100% rename from reactos/dll/win32/olethk32/olethk32.spec rename to dll/win32/olethk32/olethk32.spec diff --git a/reactos/dll/win32/olethk32/version.rc b/dll/win32/olethk32/version.rc similarity index 100% rename from reactos/dll/win32/olethk32/version.rc rename to dll/win32/olethk32/version.rc diff --git a/reactos/dll/win32/opengl32/CMakeLists.txt b/dll/win32/opengl32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/opengl32/CMakeLists.txt rename to dll/win32/opengl32/CMakeLists.txt diff --git a/reactos/dll/win32/opengl32/font.c b/dll/win32/opengl32/font.c similarity index 100% rename from reactos/dll/win32/opengl32/font.c rename to dll/win32/opengl32/font.c diff --git a/reactos/dll/win32/opengl32/gl.c b/dll/win32/opengl32/gl.c similarity index 100% rename from reactos/dll/win32/opengl32/gl.c rename to dll/win32/opengl32/gl.c diff --git a/reactos/dll/win32/opengl32/glfuncs.h b/dll/win32/opengl32/glfuncs.h similarity index 100% rename from reactos/dll/win32/opengl32/glfuncs.h rename to dll/win32/opengl32/glfuncs.h diff --git a/reactos/dll/win32/opengl32/icdlist.h b/dll/win32/opengl32/icdlist.h similarity index 100% rename from reactos/dll/win32/opengl32/icdlist.h rename to dll/win32/opengl32/icdlist.h diff --git a/reactos/dll/win32/opengl32/icdtable.h b/dll/win32/opengl32/icdtable.h similarity index 100% rename from reactos/dll/win32/opengl32/icdtable.h rename to dll/win32/opengl32/icdtable.h diff --git a/reactos/dll/win32/opengl32/opengl32.c b/dll/win32/opengl32/opengl32.c similarity index 100% rename from reactos/dll/win32/opengl32/opengl32.c rename to dll/win32/opengl32/opengl32.c diff --git a/reactos/dll/win32/opengl32/opengl32.dsp b/dll/win32/opengl32/opengl32.dsp similarity index 100% rename from reactos/dll/win32/opengl32/opengl32.dsp rename to dll/win32/opengl32/opengl32.dsp diff --git a/reactos/dll/win32/opengl32/opengl32.dsw b/dll/win32/opengl32/opengl32.dsw similarity index 100% rename from reactos/dll/win32/opengl32/opengl32.dsw rename to dll/win32/opengl32/opengl32.dsw diff --git a/reactos/dll/win32/opengl32/opengl32.h b/dll/win32/opengl32/opengl32.h similarity index 100% rename from reactos/dll/win32/opengl32/opengl32.h rename to dll/win32/opengl32/opengl32.h diff --git a/reactos/dll/win32/opengl32/opengl32.rbuild b/dll/win32/opengl32/opengl32.rbuild similarity index 100% rename from reactos/dll/win32/opengl32/opengl32.rbuild rename to dll/win32/opengl32/opengl32.rbuild diff --git a/reactos/dll/win32/opengl32/opengl32.spec b/dll/win32/opengl32/opengl32.spec similarity index 100% rename from reactos/dll/win32/opengl32/opengl32.spec rename to dll/win32/opengl32/opengl32.spec diff --git a/reactos/dll/win32/opengl32/wgl.c b/dll/win32/opengl32/wgl.c similarity index 100% rename from reactos/dll/win32/opengl32/wgl.c rename to dll/win32/opengl32/wgl.c diff --git a/reactos/dll/win32/pdh/CMakeLists.txt b/dll/win32/pdh/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/pdh/CMakeLists.txt rename to dll/win32/pdh/CMakeLists.txt diff --git a/reactos/dll/win32/pdh/pdh.rbuild b/dll/win32/pdh/pdh.rbuild similarity index 100% rename from reactos/dll/win32/pdh/pdh.rbuild rename to dll/win32/pdh/pdh.rbuild diff --git a/reactos/dll/win32/pdh/pdh.spec b/dll/win32/pdh/pdh.spec similarity index 100% rename from reactos/dll/win32/pdh/pdh.spec rename to dll/win32/pdh/pdh.spec diff --git a/reactos/dll/win32/pdh/pdh_main.c b/dll/win32/pdh/pdh_main.c similarity index 100% rename from reactos/dll/win32/pdh/pdh_main.c rename to dll/win32/pdh/pdh_main.c diff --git a/reactos/dll/win32/pidgen/CMakeLists.txt b/dll/win32/pidgen/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/pidgen/CMakeLists.txt rename to dll/win32/pidgen/CMakeLists.txt diff --git a/reactos/dll/win32/pidgen/bink.bin b/dll/win32/pidgen/bink.bin similarity index 100% rename from reactos/dll/win32/pidgen/bink.bin rename to dll/win32/pidgen/bink.bin diff --git a/reactos/dll/win32/pidgen/main.c b/dll/win32/pidgen/main.c similarity index 100% rename from reactos/dll/win32/pidgen/main.c rename to dll/win32/pidgen/main.c diff --git a/reactos/dll/win32/pidgen/pidgen.rbuild b/dll/win32/pidgen/pidgen.rbuild similarity index 100% rename from reactos/dll/win32/pidgen/pidgen.rbuild rename to dll/win32/pidgen/pidgen.rbuild diff --git a/reactos/dll/win32/pidgen/pidgen.spec b/dll/win32/pidgen/pidgen.spec similarity index 100% rename from reactos/dll/win32/pidgen/pidgen.spec rename to dll/win32/pidgen/pidgen.spec diff --git a/reactos/dll/win32/pidgen/rsrc.rc b/dll/win32/pidgen/rsrc.rc similarity index 100% rename from reactos/dll/win32/pidgen/rsrc.rc rename to dll/win32/pidgen/rsrc.rc diff --git a/reactos/dll/win32/powrprof/CMakeLists.txt b/dll/win32/powrprof/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/powrprof/CMakeLists.txt rename to dll/win32/powrprof/CMakeLists.txt diff --git a/reactos/dll/win32/powrprof/powrprof.c b/dll/win32/powrprof/powrprof.c similarity index 100% rename from reactos/dll/win32/powrprof/powrprof.c rename to dll/win32/powrprof/powrprof.c diff --git a/reactos/dll/win32/powrprof/powrprof.rbuild b/dll/win32/powrprof/powrprof.rbuild similarity index 100% rename from reactos/dll/win32/powrprof/powrprof.rbuild rename to dll/win32/powrprof/powrprof.rbuild diff --git a/reactos/dll/win32/powrprof/powrprof.rc b/dll/win32/powrprof/powrprof.rc similarity index 100% rename from reactos/dll/win32/powrprof/powrprof.rc rename to dll/win32/powrprof/powrprof.rc diff --git a/reactos/dll/win32/powrprof/powrprof.spec b/dll/win32/powrprof/powrprof.spec similarity index 100% rename from reactos/dll/win32/powrprof/powrprof.spec rename to dll/win32/powrprof/powrprof.spec diff --git a/reactos/dll/win32/printui/CMakeLists.txt b/dll/win32/printui/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/printui/CMakeLists.txt rename to dll/win32/printui/CMakeLists.txt diff --git a/reactos/dll/win32/printui/printui.c b/dll/win32/printui/printui.c similarity index 100% rename from reactos/dll/win32/printui/printui.c rename to dll/win32/printui/printui.c diff --git a/reactos/dll/win32/printui/printui.rbuild b/dll/win32/printui/printui.rbuild similarity index 100% rename from reactos/dll/win32/printui/printui.rbuild rename to dll/win32/printui/printui.rbuild diff --git a/reactos/dll/win32/printui/printui.rc b/dll/win32/printui/printui.rc similarity index 100% rename from reactos/dll/win32/printui/printui.rc rename to dll/win32/printui/printui.rc diff --git a/reactos/dll/win32/printui/printui.spec b/dll/win32/printui/printui.spec similarity index 100% rename from reactos/dll/win32/printui/printui.spec rename to dll/win32/printui/printui.spec diff --git a/reactos/dll/win32/printui/printui_private.h b/dll/win32/printui/printui_private.h similarity index 100% rename from reactos/dll/win32/printui/printui_private.h rename to dll/win32/printui/printui_private.h diff --git a/reactos/dll/win32/psapi/CMakeLists.txt b/dll/win32/psapi/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/psapi/CMakeLists.txt rename to dll/win32/psapi/CMakeLists.txt diff --git a/reactos/dll/win32/psapi/internal.h b/dll/win32/psapi/internal.h similarity index 100% rename from reactos/dll/win32/psapi/internal.h rename to dll/win32/psapi/internal.h diff --git a/reactos/dll/win32/psapi/malloc.c b/dll/win32/psapi/malloc.c similarity index 100% rename from reactos/dll/win32/psapi/malloc.c rename to dll/win32/psapi/malloc.c diff --git a/reactos/dll/win32/psapi/precomp.h b/dll/win32/psapi/precomp.h similarity index 100% rename from reactos/dll/win32/psapi/precomp.h rename to dll/win32/psapi/precomp.h diff --git a/reactos/dll/win32/psapi/psapi.c b/dll/win32/psapi/psapi.c similarity index 100% rename from reactos/dll/win32/psapi/psapi.c rename to dll/win32/psapi/psapi.c diff --git a/reactos/dll/win32/psapi/psapi.rbuild b/dll/win32/psapi/psapi.rbuild similarity index 100% rename from reactos/dll/win32/psapi/psapi.rbuild rename to dll/win32/psapi/psapi.rbuild diff --git a/reactos/dll/win32/psapi/psapi.rc b/dll/win32/psapi/psapi.rc similarity index 100% rename from reactos/dll/win32/psapi/psapi.rc rename to dll/win32/psapi/psapi.rc diff --git a/reactos/dll/win32/psapi/psapi.spec b/dll/win32/psapi/psapi.spec similarity index 100% rename from reactos/dll/win32/psapi/psapi.spec rename to dll/win32/psapi/psapi.spec diff --git a/reactos/dll/win32/pstorec/CMakeLists.txt b/dll/win32/pstorec/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/pstorec/CMakeLists.txt rename to dll/win32/pstorec/CMakeLists.txt diff --git a/reactos/dll/win32/pstorec/pstorec.c b/dll/win32/pstorec/pstorec.c similarity index 100% rename from reactos/dll/win32/pstorec/pstorec.c rename to dll/win32/pstorec/pstorec.c diff --git a/reactos/dll/win32/pstorec/pstorec.rbuild b/dll/win32/pstorec/pstorec.rbuild similarity index 100% rename from reactos/dll/win32/pstorec/pstorec.rbuild rename to dll/win32/pstorec/pstorec.rbuild diff --git a/reactos/dll/win32/pstorec/pstorec.spec b/dll/win32/pstorec/pstorec.spec similarity index 100% rename from reactos/dll/win32/pstorec/pstorec.spec rename to dll/win32/pstorec/pstorec.spec diff --git a/reactos/dll/win32/pstorec/pstorec_tlb.idl b/dll/win32/pstorec/pstorec_tlb.idl similarity index 100% rename from reactos/dll/win32/pstorec/pstorec_tlb.idl rename to dll/win32/pstorec/pstorec_tlb.idl diff --git a/reactos/dll/win32/pstorec/rsrc.rc b/dll/win32/pstorec/rsrc.rc similarity index 100% rename from reactos/dll/win32/pstorec/rsrc.rc rename to dll/win32/pstorec/rsrc.rc diff --git a/reactos/dll/win32/qmgr/CMakeLists.txt b/dll/win32/qmgr/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/qmgr/CMakeLists.txt rename to dll/win32/qmgr/CMakeLists.txt diff --git a/reactos/dll/win32/qmgr/enum_files.c b/dll/win32/qmgr/enum_files.c similarity index 100% rename from reactos/dll/win32/qmgr/enum_files.c rename to dll/win32/qmgr/enum_files.c diff --git a/reactos/dll/win32/qmgr/enum_jobs.c b/dll/win32/qmgr/enum_jobs.c similarity index 100% rename from reactos/dll/win32/qmgr/enum_jobs.c rename to dll/win32/qmgr/enum_jobs.c diff --git a/reactos/dll/win32/qmgr/factory.c b/dll/win32/qmgr/factory.c similarity index 100% rename from reactos/dll/win32/qmgr/factory.c rename to dll/win32/qmgr/factory.c diff --git a/reactos/dll/win32/qmgr/file.c b/dll/win32/qmgr/file.c similarity index 100% rename from reactos/dll/win32/qmgr/file.c rename to dll/win32/qmgr/file.c diff --git a/reactos/dll/win32/qmgr/job.c b/dll/win32/qmgr/job.c similarity index 100% rename from reactos/dll/win32/qmgr/job.c rename to dll/win32/qmgr/job.c diff --git a/reactos/dll/win32/qmgr/qmgr.c b/dll/win32/qmgr/qmgr.c similarity index 100% rename from reactos/dll/win32/qmgr/qmgr.c rename to dll/win32/qmgr/qmgr.c diff --git a/reactos/dll/win32/qmgr/qmgr.h b/dll/win32/qmgr/qmgr.h similarity index 100% rename from reactos/dll/win32/qmgr/qmgr.h rename to dll/win32/qmgr/qmgr.h diff --git a/reactos/dll/win32/qmgr/qmgr.inf b/dll/win32/qmgr/qmgr.inf similarity index 100% rename from reactos/dll/win32/qmgr/qmgr.inf rename to dll/win32/qmgr/qmgr.inf diff --git a/reactos/dll/win32/qmgr/qmgr.rbuild b/dll/win32/qmgr/qmgr.rbuild similarity index 100% rename from reactos/dll/win32/qmgr/qmgr.rbuild rename to dll/win32/qmgr/qmgr.rbuild diff --git a/reactos/dll/win32/qmgr/qmgr.spec b/dll/win32/qmgr/qmgr.spec similarity index 100% rename from reactos/dll/win32/qmgr/qmgr.spec rename to dll/win32/qmgr/qmgr.spec diff --git a/reactos/dll/win32/qmgr/qmgr_local.idl b/dll/win32/qmgr/qmgr_local.idl similarity index 100% rename from reactos/dll/win32/qmgr/qmgr_local.idl rename to dll/win32/qmgr/qmgr_local.idl diff --git a/reactos/dll/win32/qmgr/qmgr_main.c b/dll/win32/qmgr/qmgr_main.c similarity index 100% rename from reactos/dll/win32/qmgr/qmgr_main.c rename to dll/win32/qmgr/qmgr_main.c diff --git a/reactos/dll/win32/qmgr/rsrc.rc b/dll/win32/qmgr/rsrc.rc similarity index 100% rename from reactos/dll/win32/qmgr/rsrc.rc rename to dll/win32/qmgr/rsrc.rc diff --git a/reactos/dll/win32/qmgr/service.c b/dll/win32/qmgr/service.c similarity index 100% rename from reactos/dll/win32/qmgr/service.c rename to dll/win32/qmgr/service.c diff --git a/reactos/dll/win32/qmgrprxy/CMakeLists.txt b/dll/win32/qmgrprxy/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/qmgrprxy/CMakeLists.txt rename to dll/win32/qmgrprxy/CMakeLists.txt diff --git a/reactos/dll/win32/qmgrprxy/qmgrprxy.idl b/dll/win32/qmgrprxy/qmgrprxy.idl similarity index 100% rename from reactos/dll/win32/qmgrprxy/qmgrprxy.idl rename to dll/win32/qmgrprxy/qmgrprxy.idl diff --git a/reactos/dll/win32/qmgrprxy/qmgrprxy.rbuild b/dll/win32/qmgrprxy/qmgrprxy.rbuild similarity index 100% rename from reactos/dll/win32/qmgrprxy/qmgrprxy.rbuild rename to dll/win32/qmgrprxy/qmgrprxy.rbuild diff --git a/reactos/dll/win32/qmgrprxy/qmgrprxy.spec b/dll/win32/qmgrprxy/qmgrprxy.spec similarity index 100% rename from reactos/dll/win32/qmgrprxy/qmgrprxy.spec rename to dll/win32/qmgrprxy/qmgrprxy.spec diff --git a/reactos/dll/win32/qmgrprxy/version.rc b/dll/win32/qmgrprxy/version.rc similarity index 100% rename from reactos/dll/win32/qmgrprxy/version.rc rename to dll/win32/qmgrprxy/version.rc diff --git a/reactos/dll/win32/query/CMakeLists.txt b/dll/win32/query/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/query/CMakeLists.txt rename to dll/win32/query/CMakeLists.txt diff --git a/reactos/dll/win32/query/query.rbuild b/dll/win32/query/query.rbuild similarity index 100% rename from reactos/dll/win32/query/query.rbuild rename to dll/win32/query/query.rbuild diff --git a/reactos/dll/win32/query/query.spec b/dll/win32/query/query.spec similarity index 100% rename from reactos/dll/win32/query/query.spec rename to dll/win32/query/query.spec diff --git a/reactos/dll/win32/query/query_main.c b/dll/win32/query/query_main.c similarity index 100% rename from reactos/dll/win32/query/query_main.c rename to dll/win32/query/query_main.c diff --git a/reactos/dll/win32/rasadhlp/CMakeLists.txt b/dll/win32/rasadhlp/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/rasadhlp/CMakeLists.txt rename to dll/win32/rasadhlp/CMakeLists.txt diff --git a/reactos/dll/win32/rasadhlp/autodial.c b/dll/win32/rasadhlp/autodial.c similarity index 100% rename from reactos/dll/win32/rasadhlp/autodial.c rename to dll/win32/rasadhlp/autodial.c diff --git a/reactos/dll/win32/rasadhlp/init.c b/dll/win32/rasadhlp/init.c similarity index 100% rename from reactos/dll/win32/rasadhlp/init.c rename to dll/win32/rasadhlp/init.c diff --git a/reactos/dll/win32/rasadhlp/precomp.h b/dll/win32/rasadhlp/precomp.h similarity index 100% rename from reactos/dll/win32/rasadhlp/precomp.h rename to dll/win32/rasadhlp/precomp.h diff --git a/reactos/dll/win32/rasadhlp/rasadhlp.rbuild b/dll/win32/rasadhlp/rasadhlp.rbuild similarity index 100% rename from reactos/dll/win32/rasadhlp/rasadhlp.rbuild rename to dll/win32/rasadhlp/rasadhlp.rbuild diff --git a/reactos/dll/win32/rasadhlp/rasadhlp.spec b/dll/win32/rasadhlp/rasadhlp.spec similarity index 100% rename from reactos/dll/win32/rasadhlp/rasadhlp.spec rename to dll/win32/rasadhlp/rasadhlp.spec diff --git a/reactos/dll/win32/rasadhlp/winsock.c b/dll/win32/rasadhlp/winsock.c similarity index 100% rename from reactos/dll/win32/rasadhlp/winsock.c rename to dll/win32/rasadhlp/winsock.c diff --git a/reactos/dll/win32/rasapi32/CMakeLists.txt b/dll/win32/rasapi32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/rasapi32/CMakeLists.txt rename to dll/win32/rasapi32/CMakeLists.txt diff --git a/reactos/dll/win32/rasapi32/rasapi.c b/dll/win32/rasapi32/rasapi.c similarity index 100% rename from reactos/dll/win32/rasapi32/rasapi.c rename to dll/win32/rasapi32/rasapi.c diff --git a/reactos/dll/win32/rasapi32/rasapi32.rbuild b/dll/win32/rasapi32/rasapi32.rbuild similarity index 100% rename from reactos/dll/win32/rasapi32/rasapi32.rbuild rename to dll/win32/rasapi32/rasapi32.rbuild diff --git a/reactos/dll/win32/rasapi32/rasapi32.spec b/dll/win32/rasapi32/rasapi32.spec similarity index 100% rename from reactos/dll/win32/rasapi32/rasapi32.spec rename to dll/win32/rasapi32/rasapi32.spec diff --git a/reactos/dll/win32/rasdlg/CMakeLists.txt b/dll/win32/rasdlg/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/rasdlg/CMakeLists.txt rename to dll/win32/rasdlg/CMakeLists.txt diff --git a/reactos/dll/win32/rasdlg/lang/de-DE.rc b/dll/win32/rasdlg/lang/de-DE.rc similarity index 100% rename from reactos/dll/win32/rasdlg/lang/de-DE.rc rename to dll/win32/rasdlg/lang/de-DE.rc diff --git a/reactos/dll/win32/rasdlg/lang/en-US.rc b/dll/win32/rasdlg/lang/en-US.rc similarity index 100% rename from reactos/dll/win32/rasdlg/lang/en-US.rc rename to dll/win32/rasdlg/lang/en-US.rc diff --git a/reactos/dll/win32/rasdlg/lang/no-NO.rc b/dll/win32/rasdlg/lang/no-NO.rc similarity index 100% rename from reactos/dll/win32/rasdlg/lang/no-NO.rc rename to dll/win32/rasdlg/lang/no-NO.rc diff --git a/reactos/dll/win32/rasdlg/lang/pl-PL.rc b/dll/win32/rasdlg/lang/pl-PL.rc similarity index 100% rename from reactos/dll/win32/rasdlg/lang/pl-PL.rc rename to dll/win32/rasdlg/lang/pl-PL.rc diff --git a/reactos/dll/win32/rasdlg/lang/ro-RO.rc b/dll/win32/rasdlg/lang/ro-RO.rc similarity index 100% rename from reactos/dll/win32/rasdlg/lang/ro-RO.rc rename to dll/win32/rasdlg/lang/ro-RO.rc diff --git a/reactos/dll/win32/rasdlg/lang/ru-RU.rc b/dll/win32/rasdlg/lang/ru-RU.rc similarity index 100% rename from reactos/dll/win32/rasdlg/lang/ru-RU.rc rename to dll/win32/rasdlg/lang/ru-RU.rc diff --git a/reactos/dll/win32/rasdlg/lang/uk-UA.rc b/dll/win32/rasdlg/lang/uk-UA.rc similarity index 100% rename from reactos/dll/win32/rasdlg/lang/uk-UA.rc rename to dll/win32/rasdlg/lang/uk-UA.rc diff --git a/reactos/dll/win32/rasdlg/rasdlg.c b/dll/win32/rasdlg/rasdlg.c similarity index 100% rename from reactos/dll/win32/rasdlg/rasdlg.c rename to dll/win32/rasdlg/rasdlg.c diff --git a/reactos/dll/win32/rasdlg/rasdlg.rbuild b/dll/win32/rasdlg/rasdlg.rbuild similarity index 100% rename from reactos/dll/win32/rasdlg/rasdlg.rbuild rename to dll/win32/rasdlg/rasdlg.rbuild diff --git a/reactos/dll/win32/rasdlg/rasdlg.rc b/dll/win32/rasdlg/rasdlg.rc similarity index 100% rename from reactos/dll/win32/rasdlg/rasdlg.rc rename to dll/win32/rasdlg/rasdlg.rc diff --git a/reactos/dll/win32/rasdlg/rasdlg.spec b/dll/win32/rasdlg/rasdlg.spec similarity index 100% rename from reactos/dll/win32/rasdlg/rasdlg.spec rename to dll/win32/rasdlg/rasdlg.spec diff --git a/reactos/dll/win32/rasdlg/res/bitmaps/100.bmp b/dll/win32/rasdlg/res/bitmaps/100.bmp similarity index 100% rename from reactos/dll/win32/rasdlg/res/bitmaps/100.bmp rename to dll/win32/rasdlg/res/bitmaps/100.bmp diff --git a/reactos/dll/win32/rasdlg/res/bitmaps/101.bmp b/dll/win32/rasdlg/res/bitmaps/101.bmp similarity index 100% rename from reactos/dll/win32/rasdlg/res/bitmaps/101.bmp rename to dll/win32/rasdlg/res/bitmaps/101.bmp diff --git a/reactos/dll/win32/rasdlg/res/bitmaps/102.bmp b/dll/win32/rasdlg/res/bitmaps/102.bmp similarity index 100% rename from reactos/dll/win32/rasdlg/res/bitmaps/102.bmp rename to dll/win32/rasdlg/res/bitmaps/102.bmp diff --git a/reactos/dll/win32/rasdlg/res/bitmaps/1678.bmp b/dll/win32/rasdlg/res/bitmaps/1678.bmp similarity index 100% rename from reactos/dll/win32/rasdlg/res/bitmaps/1678.bmp rename to dll/win32/rasdlg/res/bitmaps/1678.bmp diff --git a/reactos/dll/win32/rasdlg/res/icons/134.ico b/dll/win32/rasdlg/res/icons/134.ico similarity index 100% rename from reactos/dll/win32/rasdlg/res/icons/134.ico rename to dll/win32/rasdlg/res/icons/134.ico diff --git a/reactos/dll/win32/rasdlg/res/icons/135.ico b/dll/win32/rasdlg/res/icons/135.ico similarity index 100% rename from reactos/dll/win32/rasdlg/res/icons/135.ico rename to dll/win32/rasdlg/res/icons/135.ico diff --git a/reactos/dll/win32/rasdlg/res/icons/144.ico b/dll/win32/rasdlg/res/icons/144.ico similarity index 100% rename from reactos/dll/win32/rasdlg/res/icons/144.ico rename to dll/win32/rasdlg/res/icons/144.ico diff --git a/reactos/dll/win32/rasdlg/res/icons/145.ico b/dll/win32/rasdlg/res/icons/145.ico similarity index 100% rename from reactos/dll/win32/rasdlg/res/icons/145.ico rename to dll/win32/rasdlg/res/icons/145.ico diff --git a/reactos/dll/win32/rasdlg/res/icons/15102.ico b/dll/win32/rasdlg/res/icons/15102.ico similarity index 100% rename from reactos/dll/win32/rasdlg/res/icons/15102.ico rename to dll/win32/rasdlg/res/icons/15102.ico diff --git a/reactos/dll/win32/rasdlg/res/icons/50.ico b/dll/win32/rasdlg/res/icons/50.ico similarity index 100% rename from reactos/dll/win32/rasdlg/res/icons/50.ico rename to dll/win32/rasdlg/res/icons/50.ico diff --git a/reactos/dll/win32/rasdlg/res/icons/51.ico b/dll/win32/rasdlg/res/icons/51.ico similarity index 100% rename from reactos/dll/win32/rasdlg/res/icons/51.ico rename to dll/win32/rasdlg/res/icons/51.ico diff --git a/reactos/dll/win32/rasdlg/res/icons/52.ico b/dll/win32/rasdlg/res/icons/52.ico similarity index 100% rename from reactos/dll/win32/rasdlg/res/icons/52.ico rename to dll/win32/rasdlg/res/icons/52.ico diff --git a/reactos/dll/win32/rasdlg/res/icons/53.ico b/dll/win32/rasdlg/res/icons/53.ico similarity index 100% rename from reactos/dll/win32/rasdlg/res/icons/53.ico rename to dll/win32/rasdlg/res/icons/53.ico diff --git a/reactos/dll/win32/rasdlg/res/icons/54.ico b/dll/win32/rasdlg/res/icons/54.ico similarity index 100% rename from reactos/dll/win32/rasdlg/res/icons/54.ico rename to dll/win32/rasdlg/res/icons/54.ico diff --git a/reactos/dll/win32/rasdlg/res/icons/55.ico b/dll/win32/rasdlg/res/icons/55.ico similarity index 100% rename from reactos/dll/win32/rasdlg/res/icons/55.ico rename to dll/win32/rasdlg/res/icons/55.ico diff --git a/reactos/dll/win32/rasdlg/res/icons/56.ico b/dll/win32/rasdlg/res/icons/56.ico similarity index 100% rename from reactos/dll/win32/rasdlg/res/icons/56.ico rename to dll/win32/rasdlg/res/icons/56.ico diff --git a/reactos/dll/win32/rasdlg/res/icons/562.ico b/dll/win32/rasdlg/res/icons/562.ico similarity index 100% rename from reactos/dll/win32/rasdlg/res/icons/562.ico rename to dll/win32/rasdlg/res/icons/562.ico diff --git a/reactos/dll/win32/rasdlg/res/icons/563.ico b/dll/win32/rasdlg/res/icons/563.ico similarity index 100% rename from reactos/dll/win32/rasdlg/res/icons/563.ico rename to dll/win32/rasdlg/res/icons/563.ico diff --git a/reactos/dll/win32/rasdlg/res/icons/57.ico b/dll/win32/rasdlg/res/icons/57.ico similarity index 100% rename from reactos/dll/win32/rasdlg/res/icons/57.ico rename to dll/win32/rasdlg/res/icons/57.ico diff --git a/reactos/dll/win32/rasdlg/res/icons/58.ico b/dll/win32/rasdlg/res/icons/58.ico similarity index 100% rename from reactos/dll/win32/rasdlg/res/icons/58.ico rename to dll/win32/rasdlg/res/icons/58.ico diff --git a/reactos/dll/win32/rasdlg/res/icons/59.ico b/dll/win32/rasdlg/res/icons/59.ico similarity index 100% rename from reactos/dll/win32/rasdlg/res/icons/59.ico rename to dll/win32/rasdlg/res/icons/59.ico diff --git a/reactos/dll/win32/rasdlg/res/icons/60.ico b/dll/win32/rasdlg/res/icons/60.ico similarity index 100% rename from reactos/dll/win32/rasdlg/res/icons/60.ico rename to dll/win32/rasdlg/res/icons/60.ico diff --git a/reactos/dll/win32/rasdlg/res/icons/61.ico b/dll/win32/rasdlg/res/icons/61.ico similarity index 100% rename from reactos/dll/win32/rasdlg/res/icons/61.ico rename to dll/win32/rasdlg/res/icons/61.ico diff --git a/reactos/dll/win32/rasdlg/res/icons/62.ico b/dll/win32/rasdlg/res/icons/62.ico similarity index 100% rename from reactos/dll/win32/rasdlg/res/icons/62.ico rename to dll/win32/rasdlg/res/icons/62.ico diff --git a/reactos/dll/win32/rasdlg/res/icons/63.ico b/dll/win32/rasdlg/res/icons/63.ico similarity index 100% rename from reactos/dll/win32/rasdlg/res/icons/63.ico rename to dll/win32/rasdlg/res/icons/63.ico diff --git a/reactos/dll/win32/rasdlg/resource.h b/dll/win32/rasdlg/resource.h similarity index 100% rename from reactos/dll/win32/rasdlg/resource.h rename to dll/win32/rasdlg/resource.h diff --git a/reactos/dll/win32/rasman/CMakeLists.txt b/dll/win32/rasman/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/rasman/CMakeLists.txt rename to dll/win32/rasman/CMakeLists.txt diff --git a/reactos/dll/win32/rasman/rasman.c b/dll/win32/rasman/rasman.c similarity index 100% rename from reactos/dll/win32/rasman/rasman.c rename to dll/win32/rasman/rasman.c diff --git a/reactos/dll/win32/rasman/rasman.rbuild b/dll/win32/rasman/rasman.rbuild similarity index 100% rename from reactos/dll/win32/rasman/rasman.rbuild rename to dll/win32/rasman/rasman.rbuild diff --git a/reactos/dll/win32/rasman/rasman.rc b/dll/win32/rasman/rasman.rc similarity index 100% rename from reactos/dll/win32/rasman/rasman.rc rename to dll/win32/rasman/rasman.rc diff --git a/reactos/dll/win32/rasman/rasman.spec b/dll/win32/rasman/rasman.spec similarity index 100% rename from reactos/dll/win32/rasman/rasman.spec rename to dll/win32/rasman/rasman.spec diff --git a/reactos/dll/win32/resutils/CMakeLists.txt b/dll/win32/resutils/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/resutils/CMakeLists.txt rename to dll/win32/resutils/CMakeLists.txt diff --git a/reactos/dll/win32/resutils/resutils.c b/dll/win32/resutils/resutils.c similarity index 100% rename from reactos/dll/win32/resutils/resutils.c rename to dll/win32/resutils/resutils.c diff --git a/reactos/dll/win32/resutils/resutils.rbuild b/dll/win32/resutils/resutils.rbuild similarity index 100% rename from reactos/dll/win32/resutils/resutils.rbuild rename to dll/win32/resutils/resutils.rbuild diff --git a/reactos/dll/win32/resutils/resutils.spec b/dll/win32/resutils/resutils.spec similarity index 100% rename from reactos/dll/win32/resutils/resutils.spec rename to dll/win32/resutils/resutils.spec diff --git a/reactos/dll/win32/riched20/CMakeLists.txt b/dll/win32/riched20/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/riched20/CMakeLists.txt rename to dll/win32/riched20/CMakeLists.txt diff --git a/reactos/dll/win32/riched20/caret.c b/dll/win32/riched20/caret.c similarity index 100% rename from reactos/dll/win32/riched20/caret.c rename to dll/win32/riched20/caret.c diff --git a/reactos/dll/win32/riched20/clipboard.c b/dll/win32/riched20/clipboard.c similarity index 100% rename from reactos/dll/win32/riched20/clipboard.c rename to dll/win32/riched20/clipboard.c diff --git a/reactos/dll/win32/riched20/context.c b/dll/win32/riched20/context.c similarity index 100% rename from reactos/dll/win32/riched20/context.c rename to dll/win32/riched20/context.c diff --git a/reactos/dll/win32/riched20/editor.c b/dll/win32/riched20/editor.c similarity index 100% rename from reactos/dll/win32/riched20/editor.c rename to dll/win32/riched20/editor.c diff --git a/reactos/dll/win32/riched20/editor.h b/dll/win32/riched20/editor.h similarity index 100% rename from reactos/dll/win32/riched20/editor.h rename to dll/win32/riched20/editor.h diff --git a/reactos/dll/win32/riched20/editstr.h b/dll/win32/riched20/editstr.h similarity index 100% rename from reactos/dll/win32/riched20/editstr.h rename to dll/win32/riched20/editstr.h diff --git a/reactos/dll/win32/riched20/list.c b/dll/win32/riched20/list.c similarity index 100% rename from reactos/dll/win32/riched20/list.c rename to dll/win32/riched20/list.c diff --git a/reactos/dll/win32/riched20/msvc-thiscall.c b/dll/win32/riched20/msvc-thiscall.c similarity index 100% rename from reactos/dll/win32/riched20/msvc-thiscall.c rename to dll/win32/riched20/msvc-thiscall.c diff --git a/reactos/dll/win32/riched20/msvc.h b/dll/win32/riched20/msvc.h similarity index 100% rename from reactos/dll/win32/riched20/msvc.h rename to dll/win32/riched20/msvc.h diff --git a/reactos/dll/win32/riched20/ocr_reverse.cur b/dll/win32/riched20/ocr_reverse.cur similarity index 100% rename from reactos/dll/win32/riched20/ocr_reverse.cur rename to dll/win32/riched20/ocr_reverse.cur diff --git a/reactos/dll/win32/riched20/paint.c b/dll/win32/riched20/paint.c similarity index 100% rename from reactos/dll/win32/riched20/paint.c rename to dll/win32/riched20/paint.c diff --git a/reactos/dll/win32/riched20/para.c b/dll/win32/riched20/para.c similarity index 100% rename from reactos/dll/win32/riched20/para.c rename to dll/win32/riched20/para.c diff --git a/reactos/dll/win32/riched20/reader.c b/dll/win32/riched20/reader.c similarity index 100% rename from reactos/dll/win32/riched20/reader.c rename to dll/win32/riched20/reader.c diff --git a/reactos/dll/win32/riched20/res.h b/dll/win32/riched20/res.h similarity index 100% rename from reactos/dll/win32/riched20/res.h rename to dll/win32/riched20/res.h diff --git a/reactos/dll/win32/riched20/riched20.rbuild b/dll/win32/riched20/riched20.rbuild similarity index 100% rename from reactos/dll/win32/riched20/riched20.rbuild rename to dll/win32/riched20/riched20.rbuild diff --git a/reactos/dll/win32/riched20/riched20.spec b/dll/win32/riched20/riched20.spec similarity index 100% rename from reactos/dll/win32/riched20/riched20.spec rename to dll/win32/riched20/riched20.spec diff --git a/reactos/dll/win32/riched20/richole.c b/dll/win32/riched20/richole.c similarity index 100% rename from reactos/dll/win32/riched20/richole.c rename to dll/win32/riched20/richole.c diff --git a/reactos/dll/win32/riched20/row.c b/dll/win32/riched20/row.c similarity index 100% rename from reactos/dll/win32/riched20/row.c rename to dll/win32/riched20/row.c diff --git a/reactos/dll/win32/riched20/rtf.h b/dll/win32/riched20/rtf.h similarity index 100% rename from reactos/dll/win32/riched20/rtf.h rename to dll/win32/riched20/rtf.h diff --git a/reactos/dll/win32/riched20/run.c b/dll/win32/riched20/run.c similarity index 100% rename from reactos/dll/win32/riched20/run.c rename to dll/win32/riched20/run.c diff --git a/reactos/dll/win32/riched20/string.c b/dll/win32/riched20/string.c similarity index 100% rename from reactos/dll/win32/riched20/string.c rename to dll/win32/riched20/string.c diff --git a/reactos/dll/win32/riched20/style.c b/dll/win32/riched20/style.c similarity index 100% rename from reactos/dll/win32/riched20/style.c rename to dll/win32/riched20/style.c diff --git a/reactos/dll/win32/riched20/table.c b/dll/win32/riched20/table.c similarity index 100% rename from reactos/dll/win32/riched20/table.c rename to dll/win32/riched20/table.c diff --git a/reactos/dll/win32/riched20/txthost.c b/dll/win32/riched20/txthost.c similarity index 100% rename from reactos/dll/win32/riched20/txthost.c rename to dll/win32/riched20/txthost.c diff --git a/reactos/dll/win32/riched20/txtsrv.c b/dll/win32/riched20/txtsrv.c similarity index 100% rename from reactos/dll/win32/riched20/txtsrv.c rename to dll/win32/riched20/txtsrv.c diff --git a/reactos/dll/win32/riched20/undo.c b/dll/win32/riched20/undo.c similarity index 100% rename from reactos/dll/win32/riched20/undo.c rename to dll/win32/riched20/undo.c diff --git a/reactos/dll/win32/riched20/version.rc b/dll/win32/riched20/version.rc similarity index 100% rename from reactos/dll/win32/riched20/version.rc rename to dll/win32/riched20/version.rc diff --git a/reactos/dll/win32/riched20/wrap.c b/dll/win32/riched20/wrap.c similarity index 100% rename from reactos/dll/win32/riched20/wrap.c rename to dll/win32/riched20/wrap.c diff --git a/reactos/dll/win32/riched20/writer.c b/dll/win32/riched20/writer.c similarity index 100% rename from reactos/dll/win32/riched20/writer.c rename to dll/win32/riched20/writer.c diff --git a/reactos/dll/win32/riched32/CMakeLists.txt b/dll/win32/riched32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/riched32/CMakeLists.txt rename to dll/win32/riched32/CMakeLists.txt diff --git a/reactos/dll/win32/riched32/riched32.rbuild b/dll/win32/riched32/riched32.rbuild similarity index 100% rename from reactos/dll/win32/riched32/riched32.rbuild rename to dll/win32/riched32/riched32.rbuild diff --git a/reactos/dll/win32/riched32/riched32.spec b/dll/win32/riched32/riched32.spec similarity index 100% rename from reactos/dll/win32/riched32/riched32.spec rename to dll/win32/riched32/riched32.spec diff --git a/reactos/dll/win32/riched32/richedit.c b/dll/win32/riched32/richedit.c similarity index 100% rename from reactos/dll/win32/riched32/richedit.c rename to dll/win32/riched32/richedit.c diff --git a/reactos/dll/win32/riched32/version.rc b/dll/win32/riched32/version.rc similarity index 100% rename from reactos/dll/win32/riched32/version.rc rename to dll/win32/riched32/version.rc diff --git a/reactos/dll/win32/rpcrt4/CMakeLists.txt b/dll/win32/rpcrt4/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/rpcrt4/CMakeLists.txt rename to dll/win32/rpcrt4/CMakeLists.txt diff --git a/reactos/dll/win32/rpcrt4/cproxy.c b/dll/win32/rpcrt4/cproxy.c similarity index 100% rename from reactos/dll/win32/rpcrt4/cproxy.c rename to dll/win32/rpcrt4/cproxy.c diff --git a/reactos/dll/win32/rpcrt4/cpsf.c b/dll/win32/rpcrt4/cpsf.c similarity index 100% rename from reactos/dll/win32/rpcrt4/cpsf.c rename to dll/win32/rpcrt4/cpsf.c diff --git a/reactos/dll/win32/rpcrt4/cpsf.h b/dll/win32/rpcrt4/cpsf.h similarity index 100% rename from reactos/dll/win32/rpcrt4/cpsf.h rename to dll/win32/rpcrt4/cpsf.h diff --git a/reactos/dll/win32/rpcrt4/cstub.c b/dll/win32/rpcrt4/cstub.c similarity index 100% rename from reactos/dll/win32/rpcrt4/cstub.c rename to dll/win32/rpcrt4/cstub.c diff --git a/reactos/dll/win32/rpcrt4/epm.idl b/dll/win32/rpcrt4/epm.idl similarity index 100% rename from reactos/dll/win32/rpcrt4/epm.idl rename to dll/win32/rpcrt4/epm.idl diff --git a/reactos/dll/win32/rpcrt4/epm_towers.h b/dll/win32/rpcrt4/epm_towers.h similarity index 100% rename from reactos/dll/win32/rpcrt4/epm_towers.h rename to dll/win32/rpcrt4/epm_towers.h diff --git a/reactos/dll/win32/rpcrt4/msvc.S b/dll/win32/rpcrt4/msvc.S similarity index 100% rename from reactos/dll/win32/rpcrt4/msvc.S rename to dll/win32/rpcrt4/msvc.S diff --git a/reactos/dll/win32/rpcrt4/ncastatus.h b/dll/win32/rpcrt4/ncastatus.h similarity index 100% rename from reactos/dll/win32/rpcrt4/ncastatus.h rename to dll/win32/rpcrt4/ncastatus.h diff --git a/reactos/dll/win32/rpcrt4/ndr_clientserver.c b/dll/win32/rpcrt4/ndr_clientserver.c similarity index 100% rename from reactos/dll/win32/rpcrt4/ndr_clientserver.c rename to dll/win32/rpcrt4/ndr_clientserver.c diff --git a/reactos/dll/win32/rpcrt4/ndr_contexthandle.c b/dll/win32/rpcrt4/ndr_contexthandle.c similarity index 100% rename from reactos/dll/win32/rpcrt4/ndr_contexthandle.c rename to dll/win32/rpcrt4/ndr_contexthandle.c diff --git a/reactos/dll/win32/rpcrt4/ndr_es.c b/dll/win32/rpcrt4/ndr_es.c similarity index 100% rename from reactos/dll/win32/rpcrt4/ndr_es.c rename to dll/win32/rpcrt4/ndr_es.c diff --git a/reactos/dll/win32/rpcrt4/ndr_fullpointer.c b/dll/win32/rpcrt4/ndr_fullpointer.c similarity index 100% rename from reactos/dll/win32/rpcrt4/ndr_fullpointer.c rename to dll/win32/rpcrt4/ndr_fullpointer.c diff --git a/reactos/dll/win32/rpcrt4/ndr_marshall.c b/dll/win32/rpcrt4/ndr_marshall.c similarity index 100% rename from reactos/dll/win32/rpcrt4/ndr_marshall.c rename to dll/win32/rpcrt4/ndr_marshall.c diff --git a/reactos/dll/win32/rpcrt4/ndr_misc.h b/dll/win32/rpcrt4/ndr_misc.h similarity index 100% rename from reactos/dll/win32/rpcrt4/ndr_misc.h rename to dll/win32/rpcrt4/ndr_misc.h diff --git a/reactos/dll/win32/rpcrt4/ndr_ole.c b/dll/win32/rpcrt4/ndr_ole.c similarity index 100% rename from reactos/dll/win32/rpcrt4/ndr_ole.c rename to dll/win32/rpcrt4/ndr_ole.c diff --git a/reactos/dll/win32/rpcrt4/ndr_stubless.c b/dll/win32/rpcrt4/ndr_stubless.c similarity index 100% rename from reactos/dll/win32/rpcrt4/ndr_stubless.c rename to dll/win32/rpcrt4/ndr_stubless.c diff --git a/reactos/dll/win32/rpcrt4/ndr_stubless.h b/dll/win32/rpcrt4/ndr_stubless.h similarity index 100% rename from reactos/dll/win32/rpcrt4/ndr_stubless.h rename to dll/win32/rpcrt4/ndr_stubless.h diff --git a/reactos/dll/win32/rpcrt4/rpc_assoc.c b/dll/win32/rpcrt4/rpc_assoc.c similarity index 100% rename from reactos/dll/win32/rpcrt4/rpc_assoc.c rename to dll/win32/rpcrt4/rpc_assoc.c diff --git a/reactos/dll/win32/rpcrt4/rpc_assoc.h b/dll/win32/rpcrt4/rpc_assoc.h similarity index 100% rename from reactos/dll/win32/rpcrt4/rpc_assoc.h rename to dll/win32/rpcrt4/rpc_assoc.h diff --git a/reactos/dll/win32/rpcrt4/rpc_async.c b/dll/win32/rpcrt4/rpc_async.c similarity index 100% rename from reactos/dll/win32/rpcrt4/rpc_async.c rename to dll/win32/rpcrt4/rpc_async.c diff --git a/reactos/dll/win32/rpcrt4/rpc_binding.c b/dll/win32/rpcrt4/rpc_binding.c similarity index 100% rename from reactos/dll/win32/rpcrt4/rpc_binding.c rename to dll/win32/rpcrt4/rpc_binding.c diff --git a/reactos/dll/win32/rpcrt4/rpc_binding.h b/dll/win32/rpcrt4/rpc_binding.h similarity index 100% rename from reactos/dll/win32/rpcrt4/rpc_binding.h rename to dll/win32/rpcrt4/rpc_binding.h diff --git a/reactos/dll/win32/rpcrt4/rpc_defs.h b/dll/win32/rpcrt4/rpc_defs.h similarity index 100% rename from reactos/dll/win32/rpcrt4/rpc_defs.h rename to dll/win32/rpcrt4/rpc_defs.h diff --git a/reactos/dll/win32/rpcrt4/rpc_epmap.c b/dll/win32/rpcrt4/rpc_epmap.c similarity index 100% rename from reactos/dll/win32/rpcrt4/rpc_epmap.c rename to dll/win32/rpcrt4/rpc_epmap.c diff --git a/reactos/dll/win32/rpcrt4/rpc_message.c b/dll/win32/rpcrt4/rpc_message.c similarity index 100% rename from reactos/dll/win32/rpcrt4/rpc_message.c rename to dll/win32/rpcrt4/rpc_message.c diff --git a/reactos/dll/win32/rpcrt4/rpc_message.h b/dll/win32/rpcrt4/rpc_message.h similarity index 100% rename from reactos/dll/win32/rpcrt4/rpc_message.h rename to dll/win32/rpcrt4/rpc_message.h diff --git a/reactos/dll/win32/rpcrt4/rpc_server.c b/dll/win32/rpcrt4/rpc_server.c similarity index 100% rename from reactos/dll/win32/rpcrt4/rpc_server.c rename to dll/win32/rpcrt4/rpc_server.c diff --git a/reactos/dll/win32/rpcrt4/rpc_server.h b/dll/win32/rpcrt4/rpc_server.h similarity index 100% rename from reactos/dll/win32/rpcrt4/rpc_server.h rename to dll/win32/rpcrt4/rpc_server.h diff --git a/reactos/dll/win32/rpcrt4/rpc_transport.c b/dll/win32/rpcrt4/rpc_transport.c similarity index 100% rename from reactos/dll/win32/rpcrt4/rpc_transport.c rename to dll/win32/rpcrt4/rpc_transport.c diff --git a/reactos/dll/win32/rpcrt4/rpcrt4.rbuild b/dll/win32/rpcrt4/rpcrt4.rbuild similarity index 100% rename from reactos/dll/win32/rpcrt4/rpcrt4.rbuild rename to dll/win32/rpcrt4/rpcrt4.rbuild diff --git a/reactos/dll/win32/rpcrt4/rpcrt4.rc b/dll/win32/rpcrt4/rpcrt4.rc similarity index 100% rename from reactos/dll/win32/rpcrt4/rpcrt4.rc rename to dll/win32/rpcrt4/rpcrt4.rc diff --git a/reactos/dll/win32/rpcrt4/rpcrt4.spec b/dll/win32/rpcrt4/rpcrt4.spec similarity index 100% rename from reactos/dll/win32/rpcrt4/rpcrt4.spec rename to dll/win32/rpcrt4/rpcrt4.spec diff --git a/reactos/dll/win32/rpcrt4/rpcrt4_main.c b/dll/win32/rpcrt4/rpcrt4_main.c similarity index 100% rename from reactos/dll/win32/rpcrt4/rpcrt4_main.c rename to dll/win32/rpcrt4/rpcrt4_main.c diff --git a/reactos/dll/win32/rpcrt4/rpcrt4_ros.diff b/dll/win32/rpcrt4/rpcrt4_ros.diff similarity index 100% rename from reactos/dll/win32/rpcrt4/rpcrt4_ros.diff rename to dll/win32/rpcrt4/rpcrt4_ros.diff diff --git a/reactos/dll/win32/rpcrt4/unix_func.c b/dll/win32/rpcrt4/unix_func.c similarity index 100% rename from reactos/dll/win32/rpcrt4/unix_func.c rename to dll/win32/rpcrt4/unix_func.c diff --git a/reactos/dll/win32/rpcrt4/version.rc b/dll/win32/rpcrt4/version.rc similarity index 100% rename from reactos/dll/win32/rpcrt4/version.rc rename to dll/win32/rpcrt4/version.rc diff --git a/reactos/dll/win32/rsabase/CMakeLists.txt b/dll/win32/rsabase/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/rsabase/CMakeLists.txt rename to dll/win32/rsabase/CMakeLists.txt diff --git a/reactos/dll/win32/rsabase/rsabase.rbuild b/dll/win32/rsabase/rsabase.rbuild similarity index 100% rename from reactos/dll/win32/rsabase/rsabase.rbuild rename to dll/win32/rsabase/rsabase.rbuild diff --git a/reactos/dll/win32/rsabase/rsabase.spec b/dll/win32/rsabase/rsabase.spec similarity index 100% rename from reactos/dll/win32/rsabase/rsabase.spec rename to dll/win32/rsabase/rsabase.spec diff --git a/reactos/dll/win32/rsabase/version.rc b/dll/win32/rsabase/version.rc similarity index 100% rename from reactos/dll/win32/rsabase/version.rc rename to dll/win32/rsabase/version.rc diff --git a/reactos/dll/win32/rsaenh/CMakeLists.txt b/dll/win32/rsaenh/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/rsaenh/CMakeLists.txt rename to dll/win32/rsaenh/CMakeLists.txt diff --git a/reactos/dll/win32/rsaenh/aes.c b/dll/win32/rsaenh/aes.c similarity index 100% rename from reactos/dll/win32/rsaenh/aes.c rename to dll/win32/rsaenh/aes.c diff --git a/reactos/dll/win32/rsaenh/des.c b/dll/win32/rsaenh/des.c similarity index 100% rename from reactos/dll/win32/rsaenh/des.c rename to dll/win32/rsaenh/des.c diff --git a/reactos/dll/win32/rsaenh/handle.c b/dll/win32/rsaenh/handle.c similarity index 100% rename from reactos/dll/win32/rsaenh/handle.c rename to dll/win32/rsaenh/handle.c diff --git a/reactos/dll/win32/rsaenh/handle.h b/dll/win32/rsaenh/handle.h similarity index 100% rename from reactos/dll/win32/rsaenh/handle.h rename to dll/win32/rsaenh/handle.h diff --git a/reactos/dll/win32/rsaenh/implglue.c b/dll/win32/rsaenh/implglue.c similarity index 100% rename from reactos/dll/win32/rsaenh/implglue.c rename to dll/win32/rsaenh/implglue.c diff --git a/reactos/dll/win32/rsaenh/implglue.h b/dll/win32/rsaenh/implglue.h similarity index 100% rename from reactos/dll/win32/rsaenh/implglue.h rename to dll/win32/rsaenh/implglue.h diff --git a/reactos/dll/win32/rsaenh/md2.c b/dll/win32/rsaenh/md2.c similarity index 100% rename from reactos/dll/win32/rsaenh/md2.c rename to dll/win32/rsaenh/md2.c diff --git a/reactos/dll/win32/rsaenh/mpi.c b/dll/win32/rsaenh/mpi.c similarity index 100% rename from reactos/dll/win32/rsaenh/mpi.c rename to dll/win32/rsaenh/mpi.c diff --git a/reactos/dll/win32/rsaenh/rc2.c b/dll/win32/rsaenh/rc2.c similarity index 100% rename from reactos/dll/win32/rsaenh/rc2.c rename to dll/win32/rsaenh/rc2.c diff --git a/reactos/dll/win32/rsaenh/rc4.c b/dll/win32/rsaenh/rc4.c similarity index 100% rename from reactos/dll/win32/rsaenh/rc4.c rename to dll/win32/rsaenh/rc4.c diff --git a/reactos/dll/win32/rsaenh/rsa.c b/dll/win32/rsaenh/rsa.c similarity index 100% rename from reactos/dll/win32/rsaenh/rsa.c rename to dll/win32/rsaenh/rsa.c diff --git a/reactos/dll/win32/rsaenh/rsaenh.c b/dll/win32/rsaenh/rsaenh.c similarity index 100% rename from reactos/dll/win32/rsaenh/rsaenh.c rename to dll/win32/rsaenh/rsaenh.c diff --git a/reactos/dll/win32/rsaenh/rsaenh.rbuild b/dll/win32/rsaenh/rsaenh.rbuild similarity index 100% rename from reactos/dll/win32/rsaenh/rsaenh.rbuild rename to dll/win32/rsaenh/rsaenh.rbuild diff --git a/reactos/dll/win32/rsaenh/rsaenh.spec b/dll/win32/rsaenh/rsaenh.spec similarity index 100% rename from reactos/dll/win32/rsaenh/rsaenh.spec rename to dll/win32/rsaenh/rsaenh.spec diff --git a/reactos/dll/win32/rsaenh/sha2.c b/dll/win32/rsaenh/sha2.c similarity index 100% rename from reactos/dll/win32/rsaenh/sha2.c rename to dll/win32/rsaenh/sha2.c diff --git a/reactos/dll/win32/rsaenh/sha2.h b/dll/win32/rsaenh/sha2.h similarity index 100% rename from reactos/dll/win32/rsaenh/sha2.h rename to dll/win32/rsaenh/sha2.h diff --git a/reactos/dll/win32/rsaenh/tomcrypt.h b/dll/win32/rsaenh/tomcrypt.h similarity index 100% rename from reactos/dll/win32/rsaenh/tomcrypt.h rename to dll/win32/rsaenh/tomcrypt.h diff --git a/reactos/dll/win32/rsaenh/version.rc b/dll/win32/rsaenh/version.rc similarity index 100% rename from reactos/dll/win32/rsaenh/version.rc rename to dll/win32/rsaenh/version.rc diff --git a/reactos/dll/win32/samlib/CMakeLists.txt b/dll/win32/samlib/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/samlib/CMakeLists.txt rename to dll/win32/samlib/CMakeLists.txt diff --git a/reactos/dll/win32/samlib/debug.h b/dll/win32/samlib/debug.h similarity index 100% rename from reactos/dll/win32/samlib/debug.h rename to dll/win32/samlib/debug.h diff --git a/reactos/dll/win32/samlib/dllmain.c b/dll/win32/samlib/dllmain.c similarity index 100% rename from reactos/dll/win32/samlib/dllmain.c rename to dll/win32/samlib/dllmain.c diff --git a/reactos/dll/win32/samlib/precomp.h b/dll/win32/samlib/precomp.h similarity index 100% rename from reactos/dll/win32/samlib/precomp.h rename to dll/win32/samlib/precomp.h diff --git a/reactos/dll/win32/samlib/samlib.c b/dll/win32/samlib/samlib.c similarity index 100% rename from reactos/dll/win32/samlib/samlib.c rename to dll/win32/samlib/samlib.c diff --git a/reactos/dll/win32/samlib/samlib.rbuild b/dll/win32/samlib/samlib.rbuild similarity index 100% rename from reactos/dll/win32/samlib/samlib.rbuild rename to dll/win32/samlib/samlib.rbuild diff --git a/reactos/dll/win32/samlib/samlib.rc b/dll/win32/samlib/samlib.rc similarity index 100% rename from reactos/dll/win32/samlib/samlib.rc rename to dll/win32/samlib/samlib.rc diff --git a/reactos/dll/win32/samlib/samlib.spec b/dll/win32/samlib/samlib.spec similarity index 100% rename from reactos/dll/win32/samlib/samlib.spec rename to dll/win32/samlib/samlib.spec diff --git a/reactos/dll/win32/samsrv/CMakeLists.txt b/dll/win32/samsrv/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/samsrv/CMakeLists.txt rename to dll/win32/samsrv/CMakeLists.txt diff --git a/reactos/dll/win32/samsrv/samsrv.c b/dll/win32/samsrv/samsrv.c similarity index 100% rename from reactos/dll/win32/samsrv/samsrv.c rename to dll/win32/samsrv/samsrv.c diff --git a/reactos/dll/win32/samsrv/samsrv.rbuild b/dll/win32/samsrv/samsrv.rbuild similarity index 100% rename from reactos/dll/win32/samsrv/samsrv.rbuild rename to dll/win32/samsrv/samsrv.rbuild diff --git a/reactos/dll/win32/samsrv/samsrv.rc b/dll/win32/samsrv/samsrv.rc similarity index 100% rename from reactos/dll/win32/samsrv/samsrv.rc rename to dll/win32/samsrv/samsrv.rc diff --git a/reactos/dll/win32/samsrv/samsrv.spec b/dll/win32/samsrv/samsrv.spec similarity index 100% rename from reactos/dll/win32/samsrv/samsrv.spec rename to dll/win32/samsrv/samsrv.spec diff --git a/reactos/dll/win32/sccbase/CMakeLists.txt b/dll/win32/sccbase/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/sccbase/CMakeLists.txt rename to dll/win32/sccbase/CMakeLists.txt diff --git a/reactos/dll/win32/sccbase/main.c b/dll/win32/sccbase/main.c similarity index 100% rename from reactos/dll/win32/sccbase/main.c rename to dll/win32/sccbase/main.c diff --git a/reactos/dll/win32/sccbase/sccbase.rbuild b/dll/win32/sccbase/sccbase.rbuild similarity index 100% rename from reactos/dll/win32/sccbase/sccbase.rbuild rename to dll/win32/sccbase/sccbase.rbuild diff --git a/reactos/dll/win32/sccbase/sccbase.spec b/dll/win32/sccbase/sccbase.spec similarity index 100% rename from reactos/dll/win32/sccbase/sccbase.spec rename to dll/win32/sccbase/sccbase.spec diff --git a/reactos/dll/win32/schannel/CMakeLists.txt b/dll/win32/schannel/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/schannel/CMakeLists.txt rename to dll/win32/schannel/CMakeLists.txt diff --git a/reactos/dll/win32/schannel/lsamode.c b/dll/win32/schannel/lsamode.c similarity index 100% rename from reactos/dll/win32/schannel/lsamode.c rename to dll/win32/schannel/lsamode.c diff --git a/reactos/dll/win32/schannel/schannel.rbuild b/dll/win32/schannel/schannel.rbuild similarity index 100% rename from reactos/dll/win32/schannel/schannel.rbuild rename to dll/win32/schannel/schannel.rbuild diff --git a/reactos/dll/win32/schannel/schannel.spec b/dll/win32/schannel/schannel.spec similarity index 100% rename from reactos/dll/win32/schannel/schannel.spec rename to dll/win32/schannel/schannel.spec diff --git a/reactos/dll/win32/schannel/schannel_main.c b/dll/win32/schannel/schannel_main.c similarity index 100% rename from reactos/dll/win32/schannel/schannel_main.c rename to dll/win32/schannel/schannel_main.c diff --git a/reactos/dll/win32/schannel/usermode.c b/dll/win32/schannel/usermode.c similarity index 100% rename from reactos/dll/win32/schannel/usermode.c rename to dll/win32/schannel/usermode.c diff --git a/reactos/dll/win32/schannel/version.rc b/dll/win32/schannel/version.rc similarity index 100% rename from reactos/dll/win32/schannel/version.rc rename to dll/win32/schannel/version.rc diff --git a/reactos/dll/win32/secur32/CMakeLists.txt b/dll/win32/secur32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/secur32/CMakeLists.txt rename to dll/win32/secur32/CMakeLists.txt diff --git a/reactos/dll/win32/secur32/dllmain.c b/dll/win32/secur32/dllmain.c similarity index 100% rename from reactos/dll/win32/secur32/dllmain.c rename to dll/win32/secur32/dllmain.c diff --git a/reactos/dll/win32/secur32/precomp.h b/dll/win32/secur32/precomp.h similarity index 100% rename from reactos/dll/win32/secur32/precomp.h rename to dll/win32/secur32/precomp.h diff --git a/reactos/dll/win32/secur32/secext.c b/dll/win32/secur32/secext.c similarity index 100% rename from reactos/dll/win32/secur32/secext.c rename to dll/win32/secur32/secext.c diff --git a/reactos/dll/win32/secur32/secur32.rbuild b/dll/win32/secur32/secur32.rbuild similarity index 100% rename from reactos/dll/win32/secur32/secur32.rbuild rename to dll/win32/secur32/secur32.rbuild diff --git a/reactos/dll/win32/secur32/secur32.rc b/dll/win32/secur32/secur32.rc similarity index 100% rename from reactos/dll/win32/secur32/secur32.rc rename to dll/win32/secur32/secur32.rc diff --git a/reactos/dll/win32/secur32/secur32.spec b/dll/win32/secur32/secur32.spec similarity index 100% rename from reactos/dll/win32/secur32/secur32.spec rename to dll/win32/secur32/secur32.spec diff --git a/reactos/dll/win32/secur32/sspi.c b/dll/win32/secur32/sspi.c similarity index 100% rename from reactos/dll/win32/secur32/sspi.c rename to dll/win32/secur32/sspi.c diff --git a/reactos/dll/win32/secur32/stubs.c b/dll/win32/secur32/stubs.c similarity index 100% rename from reactos/dll/win32/secur32/stubs.c rename to dll/win32/secur32/stubs.c diff --git a/reactos/dll/win32/security/CMakeLists.txt b/dll/win32/security/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/security/CMakeLists.txt rename to dll/win32/security/CMakeLists.txt diff --git a/reactos/dll/win32/security/security.rbuild b/dll/win32/security/security.rbuild similarity index 100% rename from reactos/dll/win32/security/security.rbuild rename to dll/win32/security/security.rbuild diff --git a/reactos/dll/win32/security/security.rc b/dll/win32/security/security.rc similarity index 100% rename from reactos/dll/win32/security/security.rc rename to dll/win32/security/security.rc diff --git a/reactos/dll/win32/security/security.spec b/dll/win32/security/security.spec similarity index 100% rename from reactos/dll/win32/security/security.spec rename to dll/win32/security/security.spec diff --git a/reactos/dll/win32/sensapi/CMakeLists.txt b/dll/win32/sensapi/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/sensapi/CMakeLists.txt rename to dll/win32/sensapi/CMakeLists.txt diff --git a/reactos/dll/win32/sensapi/sensapi.c b/dll/win32/sensapi/sensapi.c similarity index 100% rename from reactos/dll/win32/sensapi/sensapi.c rename to dll/win32/sensapi/sensapi.c diff --git a/reactos/dll/win32/sensapi/sensapi.rbuild b/dll/win32/sensapi/sensapi.rbuild similarity index 100% rename from reactos/dll/win32/sensapi/sensapi.rbuild rename to dll/win32/sensapi/sensapi.rbuild diff --git a/reactos/dll/win32/sensapi/sensapi.spec b/dll/win32/sensapi/sensapi.spec similarity index 100% rename from reactos/dll/win32/sensapi/sensapi.spec rename to dll/win32/sensapi/sensapi.spec diff --git a/reactos/dll/win32/serialui/CMakeLists.txt b/dll/win32/serialui/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/serialui/CMakeLists.txt rename to dll/win32/serialui/CMakeLists.txt diff --git a/reactos/dll/win32/serialui/lang/bg-BG.rc b/dll/win32/serialui/lang/bg-BG.rc similarity index 100% rename from reactos/dll/win32/serialui/lang/bg-BG.rc rename to dll/win32/serialui/lang/bg-BG.rc diff --git a/reactos/dll/win32/serialui/lang/cs-CZ.rc b/dll/win32/serialui/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/win32/serialui/lang/cs-CZ.rc rename to dll/win32/serialui/lang/cs-CZ.rc diff --git a/reactos/dll/win32/serialui/lang/de-DE.rc b/dll/win32/serialui/lang/de-DE.rc similarity index 100% rename from reactos/dll/win32/serialui/lang/de-DE.rc rename to dll/win32/serialui/lang/de-DE.rc diff --git a/reactos/dll/win32/serialui/lang/en-US.rc b/dll/win32/serialui/lang/en-US.rc similarity index 100% rename from reactos/dll/win32/serialui/lang/en-US.rc rename to dll/win32/serialui/lang/en-US.rc diff --git a/reactos/dll/win32/serialui/lang/es-ES.rc b/dll/win32/serialui/lang/es-ES.rc similarity index 100% rename from reactos/dll/win32/serialui/lang/es-ES.rc rename to dll/win32/serialui/lang/es-ES.rc diff --git a/reactos/dll/win32/serialui/lang/fr-FR.rc b/dll/win32/serialui/lang/fr-FR.rc similarity index 100% rename from reactos/dll/win32/serialui/lang/fr-FR.rc rename to dll/win32/serialui/lang/fr-FR.rc diff --git a/reactos/dll/win32/serialui/lang/id-ID.rc b/dll/win32/serialui/lang/id-ID.rc similarity index 100% rename from reactos/dll/win32/serialui/lang/id-ID.rc rename to dll/win32/serialui/lang/id-ID.rc diff --git a/reactos/dll/win32/serialui/lang/it-IT.rc b/dll/win32/serialui/lang/it-IT.rc similarity index 100% rename from reactos/dll/win32/serialui/lang/it-IT.rc rename to dll/win32/serialui/lang/it-IT.rc diff --git a/reactos/dll/win32/serialui/lang/no-NO.rc b/dll/win32/serialui/lang/no-NO.rc similarity index 100% rename from reactos/dll/win32/serialui/lang/no-NO.rc rename to dll/win32/serialui/lang/no-NO.rc diff --git a/reactos/dll/win32/serialui/lang/pl-PL.rc b/dll/win32/serialui/lang/pl-PL.rc similarity index 100% rename from reactos/dll/win32/serialui/lang/pl-PL.rc rename to dll/win32/serialui/lang/pl-PL.rc diff --git a/reactos/dll/win32/serialui/lang/ro-RO.rc b/dll/win32/serialui/lang/ro-RO.rc similarity index 100% rename from reactos/dll/win32/serialui/lang/ro-RO.rc rename to dll/win32/serialui/lang/ro-RO.rc diff --git a/reactos/dll/win32/serialui/lang/ru-RU.rc b/dll/win32/serialui/lang/ru-RU.rc similarity index 100% rename from reactos/dll/win32/serialui/lang/ru-RU.rc rename to dll/win32/serialui/lang/ru-RU.rc diff --git a/reactos/dll/win32/serialui/lang/uk-UA.rc b/dll/win32/serialui/lang/uk-UA.rc similarity index 100% rename from reactos/dll/win32/serialui/lang/uk-UA.rc rename to dll/win32/serialui/lang/uk-UA.rc diff --git a/reactos/dll/win32/serialui/resource.h b/dll/win32/serialui/resource.h similarity index 100% rename from reactos/dll/win32/serialui/resource.h rename to dll/win32/serialui/resource.h diff --git a/reactos/dll/win32/serialui/serialui.c b/dll/win32/serialui/serialui.c similarity index 100% rename from reactos/dll/win32/serialui/serialui.c rename to dll/win32/serialui/serialui.c diff --git a/reactos/dll/win32/serialui/serialui.h b/dll/win32/serialui/serialui.h similarity index 100% rename from reactos/dll/win32/serialui/serialui.h rename to dll/win32/serialui/serialui.h diff --git a/reactos/dll/win32/serialui/serialui.rbuild b/dll/win32/serialui/serialui.rbuild similarity index 100% rename from reactos/dll/win32/serialui/serialui.rbuild rename to dll/win32/serialui/serialui.rbuild diff --git a/reactos/dll/win32/serialui/serialui.rc b/dll/win32/serialui/serialui.rc similarity index 100% rename from reactos/dll/win32/serialui/serialui.rc rename to dll/win32/serialui/serialui.rc diff --git a/reactos/dll/win32/serialui/serialui.spec b/dll/win32/serialui/serialui.spec similarity index 100% rename from reactos/dll/win32/serialui/serialui.spec rename to dll/win32/serialui/serialui.spec diff --git a/reactos/dll/win32/setupapi/CMakeLists.txt b/dll/win32/setupapi/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/setupapi/CMakeLists.txt rename to dll/win32/setupapi/CMakeLists.txt diff --git a/reactos/dll/win32/setupapi/cfgmgr.c b/dll/win32/setupapi/cfgmgr.c similarity index 100% rename from reactos/dll/win32/setupapi/cfgmgr.c rename to dll/win32/setupapi/cfgmgr.c diff --git a/reactos/dll/win32/setupapi/devclass.c b/dll/win32/setupapi/devclass.c similarity index 100% rename from reactos/dll/win32/setupapi/devclass.c rename to dll/win32/setupapi/devclass.c diff --git a/reactos/dll/win32/setupapi/devinst.c b/dll/win32/setupapi/devinst.c similarity index 100% rename from reactos/dll/win32/setupapi/devinst.c rename to dll/win32/setupapi/devinst.c diff --git a/reactos/dll/win32/setupapi/dirid.c b/dll/win32/setupapi/dirid.c similarity index 100% rename from reactos/dll/win32/setupapi/dirid.c rename to dll/win32/setupapi/dirid.c diff --git a/reactos/dll/win32/setupapi/diskspace.c b/dll/win32/setupapi/diskspace.c similarity index 100% rename from reactos/dll/win32/setupapi/diskspace.c rename to dll/win32/setupapi/diskspace.c diff --git a/reactos/dll/win32/setupapi/driver.c b/dll/win32/setupapi/driver.c similarity index 100% rename from reactos/dll/win32/setupapi/driver.c rename to dll/win32/setupapi/driver.c diff --git a/reactos/dll/win32/setupapi/install.c b/dll/win32/setupapi/install.c similarity index 100% rename from reactos/dll/win32/setupapi/install.c rename to dll/win32/setupapi/install.c diff --git a/reactos/dll/win32/setupapi/interface.c b/dll/win32/setupapi/interface.c similarity index 100% rename from reactos/dll/win32/setupapi/interface.c rename to dll/win32/setupapi/interface.c diff --git a/reactos/dll/win32/setupapi/lang/bg-BG.rc b/dll/win32/setupapi/lang/bg-BG.rc similarity index 100% rename from reactos/dll/win32/setupapi/lang/bg-BG.rc rename to dll/win32/setupapi/lang/bg-BG.rc diff --git a/reactos/dll/win32/setupapi/lang/cs-CZ.rc b/dll/win32/setupapi/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/win32/setupapi/lang/cs-CZ.rc rename to dll/win32/setupapi/lang/cs-CZ.rc diff --git a/reactos/dll/win32/setupapi/lang/da-DK.rc b/dll/win32/setupapi/lang/da-DK.rc similarity index 100% rename from reactos/dll/win32/setupapi/lang/da-DK.rc rename to dll/win32/setupapi/lang/da-DK.rc diff --git a/reactos/dll/win32/setupapi/lang/de-DE.rc b/dll/win32/setupapi/lang/de-DE.rc similarity index 100% rename from reactos/dll/win32/setupapi/lang/de-DE.rc rename to dll/win32/setupapi/lang/de-DE.rc diff --git a/reactos/dll/win32/setupapi/lang/en-US.rc b/dll/win32/setupapi/lang/en-US.rc similarity index 100% rename from reactos/dll/win32/setupapi/lang/en-US.rc rename to dll/win32/setupapi/lang/en-US.rc diff --git a/reactos/dll/win32/setupapi/lang/es-ES.rc b/dll/win32/setupapi/lang/es-ES.rc similarity index 100% rename from reactos/dll/win32/setupapi/lang/es-ES.rc rename to dll/win32/setupapi/lang/es-ES.rc diff --git a/reactos/dll/win32/setupapi/lang/fi-FI.rc b/dll/win32/setupapi/lang/fi-FI.rc similarity index 100% rename from reactos/dll/win32/setupapi/lang/fi-FI.rc rename to dll/win32/setupapi/lang/fi-FI.rc diff --git a/reactos/dll/win32/setupapi/lang/fr-FR.rc b/dll/win32/setupapi/lang/fr-FR.rc similarity index 100% rename from reactos/dll/win32/setupapi/lang/fr-FR.rc rename to dll/win32/setupapi/lang/fr-FR.rc diff --git a/reactos/dll/win32/setupapi/lang/hu-HU.rc b/dll/win32/setupapi/lang/hu-HU.rc similarity index 100% rename from reactos/dll/win32/setupapi/lang/hu-HU.rc rename to dll/win32/setupapi/lang/hu-HU.rc diff --git a/reactos/dll/win32/setupapi/lang/id-ID.rc b/dll/win32/setupapi/lang/id-ID.rc similarity index 100% rename from reactos/dll/win32/setupapi/lang/id-ID.rc rename to dll/win32/setupapi/lang/id-ID.rc diff --git a/reactos/dll/win32/setupapi/lang/it-IT.rc b/dll/win32/setupapi/lang/it-IT.rc similarity index 100% rename from reactos/dll/win32/setupapi/lang/it-IT.rc rename to dll/win32/setupapi/lang/it-IT.rc diff --git a/reactos/dll/win32/setupapi/lang/ja-JP.rc b/dll/win32/setupapi/lang/ja-JP.rc similarity index 100% rename from reactos/dll/win32/setupapi/lang/ja-JP.rc rename to dll/win32/setupapi/lang/ja-JP.rc diff --git a/reactos/dll/win32/setupapi/lang/ko-KR.rc b/dll/win32/setupapi/lang/ko-KR.rc similarity index 100% rename from reactos/dll/win32/setupapi/lang/ko-KR.rc rename to dll/win32/setupapi/lang/ko-KR.rc diff --git a/reactos/dll/win32/setupapi/lang/nl-NL.rc b/dll/win32/setupapi/lang/nl-NL.rc similarity index 100% rename from reactos/dll/win32/setupapi/lang/nl-NL.rc rename to dll/win32/setupapi/lang/nl-NL.rc diff --git a/reactos/dll/win32/setupapi/lang/no-NO.rc b/dll/win32/setupapi/lang/no-NO.rc similarity index 100% rename from reactos/dll/win32/setupapi/lang/no-NO.rc rename to dll/win32/setupapi/lang/no-NO.rc diff --git a/reactos/dll/win32/setupapi/lang/pl-PL.rc b/dll/win32/setupapi/lang/pl-PL.rc similarity index 100% rename from reactos/dll/win32/setupapi/lang/pl-PL.rc rename to dll/win32/setupapi/lang/pl-PL.rc diff --git a/reactos/dll/win32/setupapi/lang/pt-BR.rc b/dll/win32/setupapi/lang/pt-BR.rc similarity index 100% rename from reactos/dll/win32/setupapi/lang/pt-BR.rc rename to dll/win32/setupapi/lang/pt-BR.rc diff --git a/reactos/dll/win32/setupapi/lang/ro-RO.rc b/dll/win32/setupapi/lang/ro-RO.rc similarity index 100% rename from reactos/dll/win32/setupapi/lang/ro-RO.rc rename to dll/win32/setupapi/lang/ro-RO.rc diff --git a/reactos/dll/win32/setupapi/lang/ru-RU.rc b/dll/win32/setupapi/lang/ru-RU.rc similarity index 100% rename from reactos/dll/win32/setupapi/lang/ru-RU.rc rename to dll/win32/setupapi/lang/ru-RU.rc diff --git a/reactos/dll/win32/setupapi/lang/sk-SK.rc b/dll/win32/setupapi/lang/sk-SK.rc similarity index 100% rename from reactos/dll/win32/setupapi/lang/sk-SK.rc rename to dll/win32/setupapi/lang/sk-SK.rc diff --git a/reactos/dll/win32/setupapi/lang/sv-SE.rc b/dll/win32/setupapi/lang/sv-SE.rc similarity index 100% rename from reactos/dll/win32/setupapi/lang/sv-SE.rc rename to dll/win32/setupapi/lang/sv-SE.rc diff --git a/reactos/dll/win32/setupapi/lang/th-TH.rc b/dll/win32/setupapi/lang/th-TH.rc similarity index 100% rename from reactos/dll/win32/setupapi/lang/th-TH.rc rename to dll/win32/setupapi/lang/th-TH.rc diff --git a/reactos/dll/win32/setupapi/lang/tr-TR.rc b/dll/win32/setupapi/lang/tr-TR.rc similarity index 100% rename from reactos/dll/win32/setupapi/lang/tr-TR.rc rename to dll/win32/setupapi/lang/tr-TR.rc diff --git a/reactos/dll/win32/setupapi/lang/uk-UA.rc b/dll/win32/setupapi/lang/uk-UA.rc similarity index 100% rename from reactos/dll/win32/setupapi/lang/uk-UA.rc rename to dll/win32/setupapi/lang/uk-UA.rc diff --git a/reactos/dll/win32/setupapi/misc.c b/dll/win32/setupapi/misc.c similarity index 100% rename from reactos/dll/win32/setupapi/misc.c rename to dll/win32/setupapi/misc.c diff --git a/reactos/dll/win32/setupapi/parser.c b/dll/win32/setupapi/parser.c similarity index 100% rename from reactos/dll/win32/setupapi/parser.c rename to dll/win32/setupapi/parser.c diff --git a/reactos/dll/win32/setupapi/query.c b/dll/win32/setupapi/query.c similarity index 100% rename from reactos/dll/win32/setupapi/query.c rename to dll/win32/setupapi/query.c diff --git a/reactos/dll/win32/setupapi/queue.c b/dll/win32/setupapi/queue.c similarity index 100% rename from reactos/dll/win32/setupapi/queue.c rename to dll/win32/setupapi/queue.c diff --git a/reactos/dll/win32/setupapi/res/1.ico b/dll/win32/setupapi/res/1.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/1.ico rename to dll/win32/setupapi/res/1.ico diff --git a/reactos/dll/win32/setupapi/res/10.ico b/dll/win32/setupapi/res/10.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/10.ico rename to dll/win32/setupapi/res/10.ico diff --git a/reactos/dll/win32/setupapi/res/105.ico b/dll/win32/setupapi/res/105.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/105.ico rename to dll/win32/setupapi/res/105.ico diff --git a/reactos/dll/win32/setupapi/res/11.ico b/dll/win32/setupapi/res/11.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/11.ico rename to dll/win32/setupapi/res/11.ico diff --git a/reactos/dll/win32/setupapi/res/159.ico b/dll/win32/setupapi/res/159.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/159.ico rename to dll/win32/setupapi/res/159.ico diff --git a/reactos/dll/win32/setupapi/res/161.ico b/dll/win32/setupapi/res/161.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/161.ico rename to dll/win32/setupapi/res/161.ico diff --git a/reactos/dll/win32/setupapi/res/18.ico b/dll/win32/setupapi/res/18.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/18.ico rename to dll/win32/setupapi/res/18.ico diff --git a/reactos/dll/win32/setupapi/res/19.ico b/dll/win32/setupapi/res/19.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/19.ico rename to dll/win32/setupapi/res/19.ico diff --git a/reactos/dll/win32/setupapi/res/2.ico b/dll/win32/setupapi/res/2.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/2.ico rename to dll/win32/setupapi/res/2.ico diff --git a/reactos/dll/win32/setupapi/res/20.ico b/dll/win32/setupapi/res/20.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/20.ico rename to dll/win32/setupapi/res/20.ico diff --git a/reactos/dll/win32/setupapi/res/21.ico b/dll/win32/setupapi/res/21.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/21.ico rename to dll/win32/setupapi/res/21.ico diff --git a/reactos/dll/win32/setupapi/res/22.ico b/dll/win32/setupapi/res/22.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/22.ico rename to dll/win32/setupapi/res/22.ico diff --git a/reactos/dll/win32/setupapi/res/23.ico b/dll/win32/setupapi/res/23.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/23.ico rename to dll/win32/setupapi/res/23.ico diff --git a/reactos/dll/win32/setupapi/res/24.ico b/dll/win32/setupapi/res/24.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/24.ico rename to dll/win32/setupapi/res/24.ico diff --git a/reactos/dll/win32/setupapi/res/25.ico b/dll/win32/setupapi/res/25.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/25.ico rename to dll/win32/setupapi/res/25.ico diff --git a/reactos/dll/win32/setupapi/res/26.ico b/dll/win32/setupapi/res/26.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/26.ico rename to dll/win32/setupapi/res/26.ico diff --git a/reactos/dll/win32/setupapi/res/27.ico b/dll/win32/setupapi/res/27.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/27.ico rename to dll/win32/setupapi/res/27.ico diff --git a/reactos/dll/win32/setupapi/res/28.ico b/dll/win32/setupapi/res/28.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/28.ico rename to dll/win32/setupapi/res/28.ico diff --git a/reactos/dll/win32/setupapi/res/3.ico b/dll/win32/setupapi/res/3.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/3.ico rename to dll/win32/setupapi/res/3.ico diff --git a/reactos/dll/win32/setupapi/res/4.ico b/dll/win32/setupapi/res/4.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/4.ico rename to dll/win32/setupapi/res/4.ico diff --git a/reactos/dll/win32/setupapi/res/40.ico b/dll/win32/setupapi/res/40.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/40.ico rename to dll/win32/setupapi/res/40.ico diff --git a/reactos/dll/win32/setupapi/res/41.ico b/dll/win32/setupapi/res/41.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/41.ico rename to dll/win32/setupapi/res/41.ico diff --git a/reactos/dll/win32/setupapi/res/42.ico b/dll/win32/setupapi/res/42.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/42.ico rename to dll/win32/setupapi/res/42.ico diff --git a/reactos/dll/win32/setupapi/res/43.ico b/dll/win32/setupapi/res/43.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/43.ico rename to dll/win32/setupapi/res/43.ico diff --git a/reactos/dll/win32/setupapi/res/5.ico b/dll/win32/setupapi/res/5.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/5.ico rename to dll/win32/setupapi/res/5.ico diff --git a/reactos/dll/win32/setupapi/res/50.ico b/dll/win32/setupapi/res/50.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/50.ico rename to dll/win32/setupapi/res/50.ico diff --git a/reactos/dll/win32/setupapi/res/500.ico b/dll/win32/setupapi/res/500.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/500.ico rename to dll/win32/setupapi/res/500.ico diff --git a/reactos/dll/win32/setupapi/res/501.ico b/dll/win32/setupapi/res/501.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/501.ico rename to dll/win32/setupapi/res/501.ico diff --git a/reactos/dll/win32/setupapi/res/502.ico b/dll/win32/setupapi/res/502.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/502.ico rename to dll/win32/setupapi/res/502.ico diff --git a/reactos/dll/win32/setupapi/res/51.ico b/dll/win32/setupapi/res/51.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/51.ico rename to dll/win32/setupapi/res/51.ico diff --git a/reactos/dll/win32/setupapi/res/52.ico b/dll/win32/setupapi/res/52.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/52.ico rename to dll/win32/setupapi/res/52.ico diff --git a/reactos/dll/win32/setupapi/res/53.ico b/dll/win32/setupapi/res/53.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/53.ico rename to dll/win32/setupapi/res/53.ico diff --git a/reactos/dll/win32/setupapi/res/54.ico b/dll/win32/setupapi/res/54.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/54.ico rename to dll/win32/setupapi/res/54.ico diff --git a/reactos/dll/win32/setupapi/res/6.ico b/dll/win32/setupapi/res/6.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/6.ico rename to dll/win32/setupapi/res/6.ico diff --git a/reactos/dll/win32/setupapi/res/7.ico b/dll/win32/setupapi/res/7.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/7.ico rename to dll/win32/setupapi/res/7.ico diff --git a/reactos/dll/win32/setupapi/res/8.ico b/dll/win32/setupapi/res/8.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/8.ico rename to dll/win32/setupapi/res/8.ico diff --git a/reactos/dll/win32/setupapi/res/9.ico b/dll/win32/setupapi/res/9.ico similarity index 100% rename from reactos/dll/win32/setupapi/res/9.ico rename to dll/win32/setupapi/res/9.ico diff --git a/reactos/dll/win32/setupapi/res/Icon_Licence/COPYING b/dll/win32/setupapi/res/Icon_Licence/COPYING similarity index 100% rename from reactos/dll/win32/setupapi/res/Icon_Licence/COPYING rename to dll/win32/setupapi/res/Icon_Licence/COPYING diff --git a/reactos/dll/win32/setupapi/res/Icon_Licence/Tango.txt b/dll/win32/setupapi/res/Icon_Licence/Tango.txt similarity index 100% rename from reactos/dll/win32/setupapi/res/Icon_Licence/Tango.txt rename to dll/win32/setupapi/res/Icon_Licence/Tango.txt diff --git a/reactos/dll/win32/setupapi/res/icons_res.rc b/dll/win32/setupapi/res/icons_res.rc similarity index 100% rename from reactos/dll/win32/setupapi/res/icons_res.rc rename to dll/win32/setupapi/res/icons_res.rc diff --git a/reactos/dll/win32/setupapi/resource.h b/dll/win32/setupapi/resource.h similarity index 100% rename from reactos/dll/win32/setupapi/resource.h rename to dll/win32/setupapi/resource.h diff --git a/reactos/dll/win32/setupapi/rpc.c b/dll/win32/setupapi/rpc.c similarity index 100% rename from reactos/dll/win32/setupapi/rpc.c rename to dll/win32/setupapi/rpc.c diff --git a/reactos/dll/win32/setupapi/rpc_private.h b/dll/win32/setupapi/rpc_private.h similarity index 100% rename from reactos/dll/win32/setupapi/rpc_private.h rename to dll/win32/setupapi/rpc_private.h diff --git a/reactos/dll/win32/setupapi/setupapi.rbuild b/dll/win32/setupapi/setupapi.rbuild similarity index 100% rename from reactos/dll/win32/setupapi/setupapi.rbuild rename to dll/win32/setupapi/setupapi.rbuild diff --git a/reactos/dll/win32/setupapi/setupapi.rc b/dll/win32/setupapi/setupapi.rc similarity index 100% rename from reactos/dll/win32/setupapi/setupapi.rc rename to dll/win32/setupapi/setupapi.rc diff --git a/reactos/dll/win32/setupapi/setupapi.spec b/dll/win32/setupapi/setupapi.spec similarity index 100% rename from reactos/dll/win32/setupapi/setupapi.spec rename to dll/win32/setupapi/setupapi.spec diff --git a/reactos/dll/win32/setupapi/setupapi_private.h b/dll/win32/setupapi/setupapi_private.h similarity index 100% rename from reactos/dll/win32/setupapi/setupapi_private.h rename to dll/win32/setupapi/setupapi_private.h diff --git a/reactos/dll/win32/setupapi/setupcab.c b/dll/win32/setupapi/setupcab.c similarity index 100% rename from reactos/dll/win32/setupapi/setupcab.c rename to dll/win32/setupapi/setupcab.c diff --git a/reactos/dll/win32/setupapi/stringtable.c b/dll/win32/setupapi/stringtable.c similarity index 100% rename from reactos/dll/win32/setupapi/stringtable.c rename to dll/win32/setupapi/stringtable.c diff --git a/reactos/dll/win32/setupapi/stubs.c b/dll/win32/setupapi/stubs.c similarity index 100% rename from reactos/dll/win32/setupapi/stubs.c rename to dll/win32/setupapi/stubs.c diff --git a/reactos/dll/win32/sfc/CMakeLists.txt b/dll/win32/sfc/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/sfc/CMakeLists.txt rename to dll/win32/sfc/CMakeLists.txt diff --git a/reactos/dll/win32/sfc/precomp.h b/dll/win32/sfc/precomp.h similarity index 100% rename from reactos/dll/win32/sfc/precomp.h rename to dll/win32/sfc/precomp.h diff --git a/reactos/dll/win32/sfc/sfc.c b/dll/win32/sfc/sfc.c similarity index 100% rename from reactos/dll/win32/sfc/sfc.c rename to dll/win32/sfc/sfc.c diff --git a/reactos/dll/win32/sfc/sfc.rbuild b/dll/win32/sfc/sfc.rbuild similarity index 100% rename from reactos/dll/win32/sfc/sfc.rbuild rename to dll/win32/sfc/sfc.rbuild diff --git a/reactos/dll/win32/sfc/sfc.spec b/dll/win32/sfc/sfc.spec similarity index 100% rename from reactos/dll/win32/sfc/sfc.spec rename to dll/win32/sfc/sfc.spec diff --git a/reactos/dll/win32/sfc_os/CMakeLists.txt b/dll/win32/sfc_os/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/sfc_os/CMakeLists.txt rename to dll/win32/sfc_os/CMakeLists.txt diff --git a/reactos/dll/win32/sfc_os/precomp.h b/dll/win32/sfc_os/precomp.h similarity index 100% rename from reactos/dll/win32/sfc_os/precomp.h rename to dll/win32/sfc_os/precomp.h diff --git a/reactos/dll/win32/sfc_os/sfc_os.c b/dll/win32/sfc_os/sfc_os.c similarity index 100% rename from reactos/dll/win32/sfc_os/sfc_os.c rename to dll/win32/sfc_os/sfc_os.c diff --git a/reactos/dll/win32/sfc_os/sfc_os.rbuild b/dll/win32/sfc_os/sfc_os.rbuild similarity index 100% rename from reactos/dll/win32/sfc_os/sfc_os.rbuild rename to dll/win32/sfc_os/sfc_os.rbuild diff --git a/reactos/dll/win32/sfc_os/sfc_os.spec b/dll/win32/sfc_os/sfc_os.spec similarity index 100% rename from reactos/dll/win32/sfc_os/sfc_os.spec rename to dll/win32/sfc_os/sfc_os.spec diff --git a/reactos/dll/win32/shdoclc/Bg.rc b/dll/win32/shdoclc/Bg.rc similarity index 100% rename from reactos/dll/win32/shdoclc/Bg.rc rename to dll/win32/shdoclc/Bg.rc diff --git a/reactos/dll/win32/shdoclc/CMakeLists.txt b/dll/win32/shdoclc/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/shdoclc/CMakeLists.txt rename to dll/win32/shdoclc/CMakeLists.txt diff --git a/reactos/dll/win32/shdoclc/Da.rc b/dll/win32/shdoclc/Da.rc similarity index 100% rename from reactos/dll/win32/shdoclc/Da.rc rename to dll/win32/shdoclc/Da.rc diff --git a/reactos/dll/win32/shdoclc/De.rc b/dll/win32/shdoclc/De.rc similarity index 100% rename from reactos/dll/win32/shdoclc/De.rc rename to dll/win32/shdoclc/De.rc diff --git a/reactos/dll/win32/shdoclc/En.rc b/dll/win32/shdoclc/En.rc similarity index 100% rename from reactos/dll/win32/shdoclc/En.rc rename to dll/win32/shdoclc/En.rc diff --git a/reactos/dll/win32/shdoclc/Es.rc b/dll/win32/shdoclc/Es.rc similarity index 100% rename from reactos/dll/win32/shdoclc/Es.rc rename to dll/win32/shdoclc/Es.rc diff --git a/reactos/dll/win32/shdoclc/Fi.rc b/dll/win32/shdoclc/Fi.rc similarity index 100% rename from reactos/dll/win32/shdoclc/Fi.rc rename to dll/win32/shdoclc/Fi.rc diff --git a/reactos/dll/win32/shdoclc/Fr.rc b/dll/win32/shdoclc/Fr.rc similarity index 100% rename from reactos/dll/win32/shdoclc/Fr.rc rename to dll/win32/shdoclc/Fr.rc diff --git a/reactos/dll/win32/shdoclc/Hu.rc b/dll/win32/shdoclc/Hu.rc similarity index 100% rename from reactos/dll/win32/shdoclc/Hu.rc rename to dll/win32/shdoclc/Hu.rc diff --git a/reactos/dll/win32/shdoclc/It.rc b/dll/win32/shdoclc/It.rc similarity index 100% rename from reactos/dll/win32/shdoclc/It.rc rename to dll/win32/shdoclc/It.rc diff --git a/reactos/dll/win32/shdoclc/Ja.rc b/dll/win32/shdoclc/Ja.rc similarity index 100% rename from reactos/dll/win32/shdoclc/Ja.rc rename to dll/win32/shdoclc/Ja.rc diff --git a/reactos/dll/win32/shdoclc/Ko.rc b/dll/win32/shdoclc/Ko.rc similarity index 100% rename from reactos/dll/win32/shdoclc/Ko.rc rename to dll/win32/shdoclc/Ko.rc diff --git a/reactos/dll/win32/shdoclc/Lt.rc b/dll/win32/shdoclc/Lt.rc similarity index 100% rename from reactos/dll/win32/shdoclc/Lt.rc rename to dll/win32/shdoclc/Lt.rc diff --git a/reactos/dll/win32/shdoclc/Nl.rc b/dll/win32/shdoclc/Nl.rc similarity index 100% rename from reactos/dll/win32/shdoclc/Nl.rc rename to dll/win32/shdoclc/Nl.rc diff --git a/reactos/dll/win32/shdoclc/No.rc b/dll/win32/shdoclc/No.rc similarity index 100% rename from reactos/dll/win32/shdoclc/No.rc rename to dll/win32/shdoclc/No.rc diff --git a/reactos/dll/win32/shdoclc/Pl.rc b/dll/win32/shdoclc/Pl.rc similarity index 100% rename from reactos/dll/win32/shdoclc/Pl.rc rename to dll/win32/shdoclc/Pl.rc diff --git a/reactos/dll/win32/shdoclc/Pt.rc b/dll/win32/shdoclc/Pt.rc similarity index 100% rename from reactos/dll/win32/shdoclc/Pt.rc rename to dll/win32/shdoclc/Pt.rc diff --git a/reactos/dll/win32/shdoclc/Ro.rc b/dll/win32/shdoclc/Ro.rc similarity index 100% rename from reactos/dll/win32/shdoclc/Ro.rc rename to dll/win32/shdoclc/Ro.rc diff --git a/reactos/dll/win32/shdoclc/Ru.rc b/dll/win32/shdoclc/Ru.rc similarity index 100% rename from reactos/dll/win32/shdoclc/Ru.rc rename to dll/win32/shdoclc/Ru.rc diff --git a/reactos/dll/win32/shdoclc/Si.rc b/dll/win32/shdoclc/Si.rc similarity index 100% rename from reactos/dll/win32/shdoclc/Si.rc rename to dll/win32/shdoclc/Si.rc diff --git a/reactos/dll/win32/shdoclc/Sv.rc b/dll/win32/shdoclc/Sv.rc similarity index 100% rename from reactos/dll/win32/shdoclc/Sv.rc rename to dll/win32/shdoclc/Sv.rc diff --git a/reactos/dll/win32/shdoclc/Tr.rc b/dll/win32/shdoclc/Tr.rc similarity index 100% rename from reactos/dll/win32/shdoclc/Tr.rc rename to dll/win32/shdoclc/Tr.rc diff --git a/reactos/dll/win32/shdoclc/Uk.rc b/dll/win32/shdoclc/Uk.rc similarity index 100% rename from reactos/dll/win32/shdoclc/Uk.rc rename to dll/win32/shdoclc/Uk.rc diff --git a/reactos/dll/win32/shdoclc/Zh.rc b/dll/win32/shdoclc/Zh.rc similarity index 100% rename from reactos/dll/win32/shdoclc/Zh.rc rename to dll/win32/shdoclc/Zh.rc diff --git a/reactos/dll/win32/shdoclc/rsrc.rc b/dll/win32/shdoclc/rsrc.rc similarity index 100% rename from reactos/dll/win32/shdoclc/rsrc.rc rename to dll/win32/shdoclc/rsrc.rc diff --git a/reactos/dll/win32/shdoclc/shdoclc.h b/dll/win32/shdoclc/shdoclc.h similarity index 100% rename from reactos/dll/win32/shdoclc/shdoclc.h rename to dll/win32/shdoclc/shdoclc.h diff --git a/reactos/dll/win32/shdoclc/shdoclc.rbuild b/dll/win32/shdoclc/shdoclc.rbuild similarity index 100% rename from reactos/dll/win32/shdoclc/shdoclc.rbuild rename to dll/win32/shdoclc/shdoclc.rbuild diff --git a/reactos/dll/win32/shdoclc/shdoclc.spec b/dll/win32/shdoclc/shdoclc.spec similarity index 100% rename from reactos/dll/win32/shdoclc/shdoclc.spec rename to dll/win32/shdoclc/shdoclc.spec diff --git a/reactos/dll/win32/shdocvw/CMakeLists.txt b/dll/win32/shdocvw/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/shdocvw/CMakeLists.txt rename to dll/win32/shdocvw/CMakeLists.txt diff --git a/reactos/dll/win32/shdocvw/De.rc b/dll/win32/shdocvw/De.rc similarity index 100% rename from reactos/dll/win32/shdocvw/De.rc rename to dll/win32/shdocvw/De.rc diff --git a/reactos/dll/win32/shdocvw/En.rc b/dll/win32/shdocvw/En.rc similarity index 100% rename from reactos/dll/win32/shdocvw/En.rc rename to dll/win32/shdocvw/En.rc diff --git a/reactos/dll/win32/shdocvw/Es.rc b/dll/win32/shdocvw/Es.rc similarity index 100% rename from reactos/dll/win32/shdocvw/Es.rc rename to dll/win32/shdocvw/Es.rc diff --git a/reactos/dll/win32/shdocvw/Fr.rc b/dll/win32/shdocvw/Fr.rc similarity index 100% rename from reactos/dll/win32/shdocvw/Fr.rc rename to dll/win32/shdocvw/Fr.rc diff --git a/reactos/dll/win32/shdocvw/He.rc b/dll/win32/shdocvw/He.rc similarity index 100% rename from reactos/dll/win32/shdocvw/He.rc rename to dll/win32/shdocvw/He.rc diff --git a/reactos/dll/win32/shdocvw/It.rc b/dll/win32/shdocvw/It.rc similarity index 100% rename from reactos/dll/win32/shdocvw/It.rc rename to dll/win32/shdocvw/It.rc diff --git a/reactos/dll/win32/shdocvw/Ko.rc b/dll/win32/shdocvw/Ko.rc similarity index 100% rename from reactos/dll/win32/shdocvw/Ko.rc rename to dll/win32/shdocvw/Ko.rc diff --git a/reactos/dll/win32/shdocvw/Lt.rc b/dll/win32/shdocvw/Lt.rc similarity index 100% rename from reactos/dll/win32/shdocvw/Lt.rc rename to dll/win32/shdocvw/Lt.rc diff --git a/reactos/dll/win32/shdocvw/Nl.rc b/dll/win32/shdocvw/Nl.rc similarity index 100% rename from reactos/dll/win32/shdocvw/Nl.rc rename to dll/win32/shdocvw/Nl.rc diff --git a/reactos/dll/win32/shdocvw/Pl.rc b/dll/win32/shdocvw/Pl.rc similarity index 100% rename from reactos/dll/win32/shdocvw/Pl.rc rename to dll/win32/shdocvw/Pl.rc diff --git a/reactos/dll/win32/shdocvw/Pt.rc b/dll/win32/shdocvw/Pt.rc similarity index 100% rename from reactos/dll/win32/shdocvw/Pt.rc rename to dll/win32/shdocvw/Pt.rc diff --git a/reactos/dll/win32/shdocvw/Ro.rc b/dll/win32/shdocvw/Ro.rc similarity index 100% rename from reactos/dll/win32/shdocvw/Ro.rc rename to dll/win32/shdocvw/Ro.rc diff --git a/reactos/dll/win32/shdocvw/Si.rc b/dll/win32/shdocvw/Si.rc similarity index 100% rename from reactos/dll/win32/shdocvw/Si.rc rename to dll/win32/shdocvw/Si.rc diff --git a/reactos/dll/win32/shdocvw/Sr.rc b/dll/win32/shdocvw/Sr.rc similarity index 100% rename from reactos/dll/win32/shdocvw/Sr.rc rename to dll/win32/shdocvw/Sr.rc diff --git a/reactos/dll/win32/shdocvw/Sv.rc b/dll/win32/shdocvw/Sv.rc similarity index 100% rename from reactos/dll/win32/shdocvw/Sv.rc rename to dll/win32/shdocvw/Sv.rc diff --git a/reactos/dll/win32/shdocvw/Uk.rc b/dll/win32/shdocvw/Uk.rc similarity index 100% rename from reactos/dll/win32/shdocvw/Uk.rc rename to dll/win32/shdocvw/Uk.rc diff --git a/reactos/dll/win32/shdocvw/classinfo.c b/dll/win32/shdocvw/classinfo.c similarity index 100% rename from reactos/dll/win32/shdocvw/classinfo.c rename to dll/win32/shdocvw/classinfo.c diff --git a/reactos/dll/win32/shdocvw/client.c b/dll/win32/shdocvw/client.c similarity index 100% rename from reactos/dll/win32/shdocvw/client.c rename to dll/win32/shdocvw/client.c diff --git a/reactos/dll/win32/shdocvw/dochost.c b/dll/win32/shdocvw/dochost.c similarity index 100% rename from reactos/dll/win32/shdocvw/dochost.c rename to dll/win32/shdocvw/dochost.c diff --git a/reactos/dll/win32/shdocvw/events.c b/dll/win32/shdocvw/events.c similarity index 100% rename from reactos/dll/win32/shdocvw/events.c rename to dll/win32/shdocvw/events.c diff --git a/reactos/dll/win32/shdocvw/factory.c b/dll/win32/shdocvw/factory.c similarity index 100% rename from reactos/dll/win32/shdocvw/factory.c rename to dll/win32/shdocvw/factory.c diff --git a/reactos/dll/win32/shdocvw/frame.c b/dll/win32/shdocvw/frame.c similarity index 100% rename from reactos/dll/win32/shdocvw/frame.c rename to dll/win32/shdocvw/frame.c diff --git a/reactos/dll/win32/shdocvw/ie.c b/dll/win32/shdocvw/ie.c similarity index 100% rename from reactos/dll/win32/shdocvw/ie.c rename to dll/win32/shdocvw/ie.c diff --git a/reactos/dll/win32/shdocvw/ietoolbar.bmp b/dll/win32/shdocvw/ietoolbar.bmp similarity index 100% rename from reactos/dll/win32/shdocvw/ietoolbar.bmp rename to dll/win32/shdocvw/ietoolbar.bmp diff --git a/reactos/dll/win32/shdocvw/ietoolbar.svg b/dll/win32/shdocvw/ietoolbar.svg similarity index 100% rename from reactos/dll/win32/shdocvw/ietoolbar.svg rename to dll/win32/shdocvw/ietoolbar.svg diff --git a/reactos/dll/win32/shdocvw/iexplore.c b/dll/win32/shdocvw/iexplore.c similarity index 100% rename from reactos/dll/win32/shdocvw/iexplore.c rename to dll/win32/shdocvw/iexplore.c diff --git a/reactos/dll/win32/shdocvw/intshcut.c b/dll/win32/shdocvw/intshcut.c similarity index 100% rename from reactos/dll/win32/shdocvw/intshcut.c rename to dll/win32/shdocvw/intshcut.c diff --git a/reactos/dll/win32/shdocvw/navigate.c b/dll/win32/shdocvw/navigate.c similarity index 100% rename from reactos/dll/win32/shdocvw/navigate.c rename to dll/win32/shdocvw/navigate.c diff --git a/reactos/dll/win32/shdocvw/oleobject.c b/dll/win32/shdocvw/oleobject.c similarity index 100% rename from reactos/dll/win32/shdocvw/oleobject.c rename to dll/win32/shdocvw/oleobject.c diff --git a/reactos/dll/win32/shdocvw/persist.c b/dll/win32/shdocvw/persist.c similarity index 100% rename from reactos/dll/win32/shdocvw/persist.c rename to dll/win32/shdocvw/persist.c diff --git a/reactos/dll/win32/shdocvw/resource.h b/dll/win32/shdocvw/resource.h similarity index 100% rename from reactos/dll/win32/shdocvw/resource.h rename to dll/win32/shdocvw/resource.h diff --git a/reactos/dll/win32/shdocvw/shdocvw.h b/dll/win32/shdocvw/shdocvw.h similarity index 100% rename from reactos/dll/win32/shdocvw/shdocvw.h rename to dll/win32/shdocvw/shdocvw.h diff --git a/reactos/dll/win32/shdocvw/shdocvw.inf b/dll/win32/shdocvw/shdocvw.inf similarity index 100% rename from reactos/dll/win32/shdocvw/shdocvw.inf rename to dll/win32/shdocvw/shdocvw.inf diff --git a/reactos/dll/win32/shdocvw/shdocvw.rbuild b/dll/win32/shdocvw/shdocvw.rbuild similarity index 100% rename from reactos/dll/win32/shdocvw/shdocvw.rbuild rename to dll/win32/shdocvw/shdocvw.rbuild diff --git a/reactos/dll/win32/shdocvw/shdocvw.rc b/dll/win32/shdocvw/shdocvw.rc similarity index 100% rename from reactos/dll/win32/shdocvw/shdocvw.rc rename to dll/win32/shdocvw/shdocvw.rc diff --git a/reactos/dll/win32/shdocvw/shdocvw.spec b/dll/win32/shdocvw/shdocvw.spec similarity index 100% rename from reactos/dll/win32/shdocvw/shdocvw.spec rename to dll/win32/shdocvw/shdocvw.spec diff --git a/reactos/dll/win32/shdocvw/shdocvw_main.c b/dll/win32/shdocvw/shdocvw_main.c similarity index 100% rename from reactos/dll/win32/shdocvw/shdocvw_main.c rename to dll/win32/shdocvw/shdocvw_main.c diff --git a/reactos/dll/win32/shdocvw/shdocvw_v1.idl b/dll/win32/shdocvw/shdocvw_v1.idl similarity index 100% rename from reactos/dll/win32/shdocvw/shdocvw_v1.idl rename to dll/win32/shdocvw/shdocvw_v1.idl diff --git a/reactos/dll/win32/shdocvw/shlinstobj.c b/dll/win32/shdocvw/shlinstobj.c similarity index 100% rename from reactos/dll/win32/shdocvw/shlinstobj.c rename to dll/win32/shdocvw/shlinstobj.c diff --git a/reactos/dll/win32/shdocvw/taskbarlist.c b/dll/win32/shdocvw/taskbarlist.c similarity index 100% rename from reactos/dll/win32/shdocvw/taskbarlist.c rename to dll/win32/shdocvw/taskbarlist.c diff --git a/reactos/dll/win32/shdocvw/urlhist.c b/dll/win32/shdocvw/urlhist.c similarity index 100% rename from reactos/dll/win32/shdocvw/urlhist.c rename to dll/win32/shdocvw/urlhist.c diff --git a/reactos/dll/win32/shdocvw/version.rc b/dll/win32/shdocvw/version.rc similarity index 100% rename from reactos/dll/win32/shdocvw/version.rc rename to dll/win32/shdocvw/version.rc diff --git a/reactos/dll/win32/shdocvw/view.c b/dll/win32/shdocvw/view.c similarity index 100% rename from reactos/dll/win32/shdocvw/view.c rename to dll/win32/shdocvw/view.c diff --git a/reactos/dll/win32/shdocvw/webbrowser.c b/dll/win32/shdocvw/webbrowser.c similarity index 100% rename from reactos/dll/win32/shdocvw/webbrowser.c rename to dll/win32/shdocvw/webbrowser.c diff --git a/reactos/dll/win32/shell32/CMakeLists.txt b/dll/win32/shell32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/shell32/CMakeLists.txt rename to dll/win32/shell32/CMakeLists.txt diff --git a/reactos/dll/win32/shell32/TODO.txt b/dll/win32/shell32/TODO.txt similarity index 100% rename from reactos/dll/win32/shell32/TODO.txt rename to dll/win32/shell32/TODO.txt diff --git a/reactos/dll/win32/shell32/authors.cpp b/dll/win32/shell32/authors.cpp similarity index 100% rename from reactos/dll/win32/shell32/authors.cpp rename to dll/win32/shell32/authors.cpp diff --git a/reactos/dll/win32/shell32/autocomplete.cpp b/dll/win32/shell32/autocomplete.cpp similarity index 100% rename from reactos/dll/win32/shell32/autocomplete.cpp rename to dll/win32/shell32/autocomplete.cpp diff --git a/reactos/dll/win32/shell32/autocomplete.h b/dll/win32/shell32/autocomplete.h similarity index 100% rename from reactos/dll/win32/shell32/autocomplete.h rename to dll/win32/shell32/autocomplete.h diff --git a/reactos/dll/win32/shell32/avi_res.rc b/dll/win32/shell32/avi_res.rc similarity index 100% rename from reactos/dll/win32/shell32/avi_res.rc rename to dll/win32/shell32/avi_res.rc diff --git a/reactos/dll/win32/shell32/bitmap_res.rc b/dll/win32/shell32/bitmap_res.rc similarity index 100% rename from reactos/dll/win32/shell32/bitmap_res.rc rename to dll/win32/shell32/bitmap_res.rc diff --git a/reactos/dll/win32/shell32/brsfolder.cpp b/dll/win32/shell32/brsfolder.cpp similarity index 100% rename from reactos/dll/win32/shell32/brsfolder.cpp rename to dll/win32/shell32/brsfolder.cpp diff --git a/reactos/dll/win32/shell32/changenotify.cpp b/dll/win32/shell32/changenotify.cpp similarity index 100% rename from reactos/dll/win32/shell32/changenotify.cpp rename to dll/win32/shell32/changenotify.cpp diff --git a/reactos/dll/win32/shell32/classes.cpp b/dll/win32/shell32/classes.cpp similarity index 100% rename from reactos/dll/win32/shell32/classes.cpp rename to dll/win32/shell32/classes.cpp diff --git a/reactos/dll/win32/shell32/clipboard.cpp b/dll/win32/shell32/clipboard.cpp similarity index 100% rename from reactos/dll/win32/shell32/clipboard.cpp rename to dll/win32/shell32/clipboard.cpp diff --git a/reactos/dll/win32/shell32/control.cpp b/dll/win32/shell32/control.cpp similarity index 100% rename from reactos/dll/win32/shell32/control.cpp rename to dll/win32/shell32/control.cpp diff --git a/reactos/dll/win32/shell32/cpanel.h b/dll/win32/shell32/cpanel.h similarity index 100% rename from reactos/dll/win32/shell32/cpanel.h rename to dll/win32/shell32/cpanel.h diff --git a/reactos/dll/win32/shell32/dataobject.cpp b/dll/win32/shell32/dataobject.cpp similarity index 100% rename from reactos/dll/win32/shell32/dataobject.cpp rename to dll/win32/shell32/dataobject.cpp diff --git a/reactos/dll/win32/shell32/dde.cpp b/dll/win32/shell32/dde.cpp similarity index 100% rename from reactos/dll/win32/shell32/dde.cpp rename to dll/win32/shell32/dde.cpp diff --git a/reactos/dll/win32/shell32/debughlp.cpp b/dll/win32/shell32/debughlp.cpp similarity index 100% rename from reactos/dll/win32/shell32/debughlp.cpp rename to dll/win32/shell32/debughlp.cpp diff --git a/reactos/dll/win32/shell32/debughlp.h b/dll/win32/shell32/debughlp.h similarity index 100% rename from reactos/dll/win32/shell32/debughlp.h rename to dll/win32/shell32/debughlp.h diff --git a/reactos/dll/win32/shell32/defcontextmenu.cpp b/dll/win32/shell32/defcontextmenu.cpp similarity index 100% rename from reactos/dll/win32/shell32/defcontextmenu.cpp rename to dll/win32/shell32/defcontextmenu.cpp diff --git a/reactos/dll/win32/shell32/desktop.cpp b/dll/win32/shell32/desktop.cpp similarity index 100% rename from reactos/dll/win32/shell32/desktop.cpp rename to dll/win32/shell32/desktop.cpp diff --git a/reactos/dll/win32/shell32/dialogs.cpp b/dll/win32/shell32/dialogs.cpp similarity index 100% rename from reactos/dll/win32/shell32/dialogs.cpp rename to dll/win32/shell32/dialogs.cpp diff --git a/reactos/dll/win32/shell32/dragdrophelper.cpp b/dll/win32/shell32/dragdrophelper.cpp similarity index 100% rename from reactos/dll/win32/shell32/dragdrophelper.cpp rename to dll/win32/shell32/dragdrophelper.cpp diff --git a/reactos/dll/win32/shell32/dragdrophelper.h b/dll/win32/shell32/dragdrophelper.h similarity index 100% rename from reactos/dll/win32/shell32/dragdrophelper.h rename to dll/win32/shell32/dragdrophelper.h diff --git a/reactos/dll/win32/shell32/drive.cpp b/dll/win32/shell32/drive.cpp similarity index 100% rename from reactos/dll/win32/shell32/drive.cpp rename to dll/win32/shell32/drive.cpp diff --git a/reactos/dll/win32/shell32/enumidlist.cpp b/dll/win32/shell32/enumidlist.cpp similarity index 100% rename from reactos/dll/win32/shell32/enumidlist.cpp rename to dll/win32/shell32/enumidlist.cpp diff --git a/reactos/dll/win32/shell32/enumidlist.h b/dll/win32/shell32/enumidlist.h similarity index 100% rename from reactos/dll/win32/shell32/enumidlist.h rename to dll/win32/shell32/enumidlist.h diff --git a/reactos/dll/win32/shell32/extracticon.cpp b/dll/win32/shell32/extracticon.cpp similarity index 100% rename from reactos/dll/win32/shell32/extracticon.cpp rename to dll/win32/shell32/extracticon.cpp diff --git a/reactos/dll/win32/shell32/folder_options.cpp b/dll/win32/shell32/folder_options.cpp similarity index 100% rename from reactos/dll/win32/shell32/folder_options.cpp rename to dll/win32/shell32/folder_options.cpp diff --git a/reactos/dll/win32/shell32/folders.cpp b/dll/win32/shell32/folders.cpp similarity index 100% rename from reactos/dll/win32/shell32/folders.cpp rename to dll/win32/shell32/folders.cpp diff --git a/reactos/dll/win32/shell32/folders/admintools.cpp b/dll/win32/shell32/folders/admintools.cpp similarity index 100% rename from reactos/dll/win32/shell32/folders/admintools.cpp rename to dll/win32/shell32/folders/admintools.cpp diff --git a/reactos/dll/win32/shell32/folders/admintools.h b/dll/win32/shell32/folders/admintools.h similarity index 100% rename from reactos/dll/win32/shell32/folders/admintools.h rename to dll/win32/shell32/folders/admintools.h diff --git a/reactos/dll/win32/shell32/folders/cpanel.cpp b/dll/win32/shell32/folders/cpanel.cpp similarity index 100% rename from reactos/dll/win32/shell32/folders/cpanel.cpp rename to dll/win32/shell32/folders/cpanel.cpp diff --git a/reactos/dll/win32/shell32/folders/cpanel.h b/dll/win32/shell32/folders/cpanel.h similarity index 100% rename from reactos/dll/win32/shell32/folders/cpanel.h rename to dll/win32/shell32/folders/cpanel.h diff --git a/reactos/dll/win32/shell32/folders/desktop.cpp b/dll/win32/shell32/folders/desktop.cpp similarity index 100% rename from reactos/dll/win32/shell32/folders/desktop.cpp rename to dll/win32/shell32/folders/desktop.cpp diff --git a/reactos/dll/win32/shell32/folders/desktop.h b/dll/win32/shell32/folders/desktop.h similarity index 100% rename from reactos/dll/win32/shell32/folders/desktop.h rename to dll/win32/shell32/folders/desktop.h diff --git a/reactos/dll/win32/shell32/folders/fonts.cpp b/dll/win32/shell32/folders/fonts.cpp similarity index 100% rename from reactos/dll/win32/shell32/folders/fonts.cpp rename to dll/win32/shell32/folders/fonts.cpp diff --git a/reactos/dll/win32/shell32/folders/fonts.h b/dll/win32/shell32/folders/fonts.h similarity index 100% rename from reactos/dll/win32/shell32/folders/fonts.h rename to dll/win32/shell32/folders/fonts.h diff --git a/reactos/dll/win32/shell32/folders/fs.cpp b/dll/win32/shell32/folders/fs.cpp similarity index 100% rename from reactos/dll/win32/shell32/folders/fs.cpp rename to dll/win32/shell32/folders/fs.cpp diff --git a/reactos/dll/win32/shell32/folders/fs.h b/dll/win32/shell32/folders/fs.h similarity index 100% rename from reactos/dll/win32/shell32/folders/fs.h rename to dll/win32/shell32/folders/fs.h diff --git a/reactos/dll/win32/shell32/folders/mycomp.cpp b/dll/win32/shell32/folders/mycomp.cpp similarity index 100% rename from reactos/dll/win32/shell32/folders/mycomp.cpp rename to dll/win32/shell32/folders/mycomp.cpp diff --git a/reactos/dll/win32/shell32/folders/mycomp.h b/dll/win32/shell32/folders/mycomp.h similarity index 100% rename from reactos/dll/win32/shell32/folders/mycomp.h rename to dll/win32/shell32/folders/mycomp.h diff --git a/reactos/dll/win32/shell32/folders/mydocuments.cpp b/dll/win32/shell32/folders/mydocuments.cpp similarity index 100% rename from reactos/dll/win32/shell32/folders/mydocuments.cpp rename to dll/win32/shell32/folders/mydocuments.cpp diff --git a/reactos/dll/win32/shell32/folders/mydocuments.h b/dll/win32/shell32/folders/mydocuments.h similarity index 100% rename from reactos/dll/win32/shell32/folders/mydocuments.h rename to dll/win32/shell32/folders/mydocuments.h diff --git a/reactos/dll/win32/shell32/folders/netplaces.cpp b/dll/win32/shell32/folders/netplaces.cpp similarity index 100% rename from reactos/dll/win32/shell32/folders/netplaces.cpp rename to dll/win32/shell32/folders/netplaces.cpp diff --git a/reactos/dll/win32/shell32/folders/netplaces.h b/dll/win32/shell32/folders/netplaces.h similarity index 100% rename from reactos/dll/win32/shell32/folders/netplaces.h rename to dll/win32/shell32/folders/netplaces.h diff --git a/reactos/dll/win32/shell32/folders/printers.cpp b/dll/win32/shell32/folders/printers.cpp similarity index 100% rename from reactos/dll/win32/shell32/folders/printers.cpp rename to dll/win32/shell32/folders/printers.cpp diff --git a/reactos/dll/win32/shell32/folders/printers.h b/dll/win32/shell32/folders/printers.h similarity index 100% rename from reactos/dll/win32/shell32/folders/printers.h rename to dll/win32/shell32/folders/printers.h diff --git a/reactos/dll/win32/shell32/folders/recyclebin.cpp b/dll/win32/shell32/folders/recyclebin.cpp similarity index 100% rename from reactos/dll/win32/shell32/folders/recyclebin.cpp rename to dll/win32/shell32/folders/recyclebin.cpp diff --git a/reactos/dll/win32/shell32/folders/recyclebin.h b/dll/win32/shell32/folders/recyclebin.h similarity index 100% rename from reactos/dll/win32/shell32/folders/recyclebin.h rename to dll/win32/shell32/folders/recyclebin.h diff --git a/reactos/dll/win32/shell32/fprop.cpp b/dll/win32/shell32/fprop.cpp similarity index 100% rename from reactos/dll/win32/shell32/fprop.cpp rename to dll/win32/shell32/fprop.cpp diff --git a/reactos/dll/win32/shell32/icon_res.rc b/dll/win32/shell32/icon_res.rc similarity index 100% rename from reactos/dll/win32/shell32/icon_res.rc rename to dll/win32/shell32/icon_res.rc diff --git a/reactos/dll/win32/shell32/iconcache.cpp b/dll/win32/shell32/iconcache.cpp similarity index 100% rename from reactos/dll/win32/shell32/iconcache.cpp rename to dll/win32/shell32/iconcache.cpp diff --git a/reactos/dll/win32/shell32/lang/bg-BG.rc b/dll/win32/shell32/lang/bg-BG.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/bg-BG.rc rename to dll/win32/shell32/lang/bg-BG.rc diff --git a/reactos/dll/win32/shell32/lang/ca-ES.rc b/dll/win32/shell32/lang/ca-ES.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/ca-ES.rc rename to dll/win32/shell32/lang/ca-ES.rc diff --git a/reactos/dll/win32/shell32/lang/cs-CZ.rc b/dll/win32/shell32/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/cs-CZ.rc rename to dll/win32/shell32/lang/cs-CZ.rc diff --git a/reactos/dll/win32/shell32/lang/da-DK.rc b/dll/win32/shell32/lang/da-DK.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/da-DK.rc rename to dll/win32/shell32/lang/da-DK.rc diff --git a/reactos/dll/win32/shell32/lang/de-DE.rc b/dll/win32/shell32/lang/de-DE.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/de-DE.rc rename to dll/win32/shell32/lang/de-DE.rc diff --git a/reactos/dll/win32/shell32/lang/el-GR.rc b/dll/win32/shell32/lang/el-GR.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/el-GR.rc rename to dll/win32/shell32/lang/el-GR.rc diff --git a/reactos/dll/win32/shell32/lang/en-GB.rc b/dll/win32/shell32/lang/en-GB.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/en-GB.rc rename to dll/win32/shell32/lang/en-GB.rc diff --git a/reactos/dll/win32/shell32/lang/en-US.rc b/dll/win32/shell32/lang/en-US.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/en-US.rc rename to dll/win32/shell32/lang/en-US.rc diff --git a/reactos/dll/win32/shell32/lang/es-ES.rc b/dll/win32/shell32/lang/es-ES.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/es-ES.rc rename to dll/win32/shell32/lang/es-ES.rc diff --git a/reactos/dll/win32/shell32/lang/fi-FI.rc b/dll/win32/shell32/lang/fi-FI.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/fi-FI.rc rename to dll/win32/shell32/lang/fi-FI.rc diff --git a/reactos/dll/win32/shell32/lang/fr-FR.rc b/dll/win32/shell32/lang/fr-FR.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/fr-FR.rc rename to dll/win32/shell32/lang/fr-FR.rc diff --git a/reactos/dll/win32/shell32/lang/hu-HU.rc b/dll/win32/shell32/lang/hu-HU.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/hu-HU.rc rename to dll/win32/shell32/lang/hu-HU.rc diff --git a/reactos/dll/win32/shell32/lang/it-IT.rc b/dll/win32/shell32/lang/it-IT.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/it-IT.rc rename to dll/win32/shell32/lang/it-IT.rc diff --git a/reactos/dll/win32/shell32/lang/ja-JP.rc b/dll/win32/shell32/lang/ja-JP.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/ja-JP.rc rename to dll/win32/shell32/lang/ja-JP.rc diff --git a/reactos/dll/win32/shell32/lang/ko-KR.rc b/dll/win32/shell32/lang/ko-KR.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/ko-KR.rc rename to dll/win32/shell32/lang/ko-KR.rc diff --git a/reactos/dll/win32/shell32/lang/nl-NL.rc b/dll/win32/shell32/lang/nl-NL.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/nl-NL.rc rename to dll/win32/shell32/lang/nl-NL.rc diff --git a/reactos/dll/win32/shell32/lang/no-NO.rc b/dll/win32/shell32/lang/no-NO.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/no-NO.rc rename to dll/win32/shell32/lang/no-NO.rc diff --git a/reactos/dll/win32/shell32/lang/pl-PL.rc b/dll/win32/shell32/lang/pl-PL.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/pl-PL.rc rename to dll/win32/shell32/lang/pl-PL.rc diff --git a/reactos/dll/win32/shell32/lang/pt-BR.rc b/dll/win32/shell32/lang/pt-BR.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/pt-BR.rc rename to dll/win32/shell32/lang/pt-BR.rc diff --git a/reactos/dll/win32/shell32/lang/pt-PT.rc b/dll/win32/shell32/lang/pt-PT.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/pt-PT.rc rename to dll/win32/shell32/lang/pt-PT.rc diff --git a/reactos/dll/win32/shell32/lang/ro-RO.rc b/dll/win32/shell32/lang/ro-RO.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/ro-RO.rc rename to dll/win32/shell32/lang/ro-RO.rc diff --git a/reactos/dll/win32/shell32/lang/ru-RU.rc b/dll/win32/shell32/lang/ru-RU.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/ru-RU.rc rename to dll/win32/shell32/lang/ru-RU.rc diff --git a/reactos/dll/win32/shell32/lang/sk-SK.rc b/dll/win32/shell32/lang/sk-SK.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/sk-SK.rc rename to dll/win32/shell32/lang/sk-SK.rc diff --git a/reactos/dll/win32/shell32/lang/sl-SI.rc b/dll/win32/shell32/lang/sl-SI.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/sl-SI.rc rename to dll/win32/shell32/lang/sl-SI.rc diff --git a/reactos/dll/win32/shell32/lang/sv-SE.rc b/dll/win32/shell32/lang/sv-SE.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/sv-SE.rc rename to dll/win32/shell32/lang/sv-SE.rc diff --git a/reactos/dll/win32/shell32/lang/tr-TR.rc b/dll/win32/shell32/lang/tr-TR.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/tr-TR.rc rename to dll/win32/shell32/lang/tr-TR.rc diff --git a/reactos/dll/win32/shell32/lang/uk-UA.rc b/dll/win32/shell32/lang/uk-UA.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/uk-UA.rc rename to dll/win32/shell32/lang/uk-UA.rc diff --git a/reactos/dll/win32/shell32/lang/zh-CN.rc b/dll/win32/shell32/lang/zh-CN.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/zh-CN.rc rename to dll/win32/shell32/lang/zh-CN.rc diff --git a/reactos/dll/win32/shell32/lang/zh-TW.rc b/dll/win32/shell32/lang/zh-TW.rc similarity index 100% rename from reactos/dll/win32/shell32/lang/zh-TW.rc rename to dll/win32/shell32/lang/zh-TW.rc diff --git a/reactos/dll/win32/shell32/newmenu.cpp b/dll/win32/shell32/newmenu.cpp similarity index 100% rename from reactos/dll/win32/shell32/newmenu.cpp rename to dll/win32/shell32/newmenu.cpp diff --git a/reactos/dll/win32/shell32/newmenu.h b/dll/win32/shell32/newmenu.h similarity index 100% rename from reactos/dll/win32/shell32/newmenu.h rename to dll/win32/shell32/newmenu.h diff --git a/reactos/dll/win32/shell32/openwithmenu.cpp b/dll/win32/shell32/openwithmenu.cpp similarity index 100% rename from reactos/dll/win32/shell32/openwithmenu.cpp rename to dll/win32/shell32/openwithmenu.cpp diff --git a/reactos/dll/win32/shell32/openwithmenu.h b/dll/win32/shell32/openwithmenu.h similarity index 100% rename from reactos/dll/win32/shell32/openwithmenu.h rename to dll/win32/shell32/openwithmenu.h diff --git a/reactos/dll/win32/shell32/pidl.cpp b/dll/win32/shell32/pidl.cpp similarity index 100% rename from reactos/dll/win32/shell32/pidl.cpp rename to dll/win32/shell32/pidl.cpp diff --git a/reactos/dll/win32/shell32/pidl.h b/dll/win32/shell32/pidl.h similarity index 100% rename from reactos/dll/win32/shell32/pidl.h rename to dll/win32/shell32/pidl.h diff --git a/reactos/dll/win32/shell32/precomp.h b/dll/win32/shell32/precomp.h similarity index 100% rename from reactos/dll/win32/shell32/precomp.h rename to dll/win32/shell32/precomp.h diff --git a/reactos/dll/win32/shell32/res/Copy of rgs/adminfoldershortcut.rgs b/dll/win32/shell32/res/Copy of rgs/adminfoldershortcut.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/Copy of rgs/adminfoldershortcut.rgs rename to dll/win32/shell32/res/Copy of rgs/adminfoldershortcut.rgs diff --git a/reactos/dll/win32/shell32/res/Copy of rgs/autocomplete.rgs b/dll/win32/shell32/res/Copy of rgs/autocomplete.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/Copy of rgs/autocomplete.rgs rename to dll/win32/shell32/res/Copy of rgs/autocomplete.rgs diff --git a/reactos/dll/win32/shell32/res/Copy of rgs/controlpanel.rgs b/dll/win32/shell32/res/Copy of rgs/controlpanel.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/Copy of rgs/controlpanel.rgs rename to dll/win32/shell32/res/Copy of rgs/controlpanel.rgs diff --git a/reactos/dll/win32/shell32/res/Copy of rgs/dragdrophelper.rgs b/dll/win32/shell32/res/Copy of rgs/dragdrophelper.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/Copy of rgs/dragdrophelper.rgs rename to dll/win32/shell32/res/Copy of rgs/dragdrophelper.rgs diff --git a/reactos/dll/win32/shell32/res/Copy of rgs/folderoptions.rgs b/dll/win32/shell32/res/Copy of rgs/folderoptions.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/Copy of rgs/folderoptions.rgs rename to dll/win32/shell32/res/Copy of rgs/folderoptions.rgs diff --git a/reactos/dll/win32/shell32/res/Copy of rgs/foldershortcut.rgs b/dll/win32/shell32/res/Copy of rgs/foldershortcut.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/Copy of rgs/foldershortcut.rgs rename to dll/win32/shell32/res/Copy of rgs/foldershortcut.rgs diff --git a/reactos/dll/win32/shell32/res/Copy of rgs/fontsfoldershortcut.rgs b/dll/win32/shell32/res/Copy of rgs/fontsfoldershortcut.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/Copy of rgs/fontsfoldershortcut.rgs rename to dll/win32/shell32/res/Copy of rgs/fontsfoldershortcut.rgs diff --git a/reactos/dll/win32/shell32/res/Copy of rgs/menubandsite.rgs b/dll/win32/shell32/res/Copy of rgs/menubandsite.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/Copy of rgs/menubandsite.rgs rename to dll/win32/shell32/res/Copy of rgs/menubandsite.rgs diff --git a/reactos/dll/win32/shell32/res/Copy of rgs/mycomputer.rgs b/dll/win32/shell32/res/Copy of rgs/mycomputer.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/Copy of rgs/mycomputer.rgs rename to dll/win32/shell32/res/Copy of rgs/mycomputer.rgs diff --git a/reactos/dll/win32/shell32/res/Copy of rgs/mydocuments.rgs b/dll/win32/shell32/res/Copy of rgs/mydocuments.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/Copy of rgs/mydocuments.rgs rename to dll/win32/shell32/res/Copy of rgs/mydocuments.rgs diff --git a/reactos/dll/win32/shell32/res/Copy of rgs/networkplaces.rgs b/dll/win32/shell32/res/Copy of rgs/networkplaces.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/Copy of rgs/networkplaces.rgs rename to dll/win32/shell32/res/Copy of rgs/networkplaces.rgs diff --git a/reactos/dll/win32/shell32/res/Copy of rgs/newmenu.rgs b/dll/win32/shell32/res/Copy of rgs/newmenu.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/Copy of rgs/newmenu.rgs rename to dll/win32/shell32/res/Copy of rgs/newmenu.rgs diff --git a/reactos/dll/win32/shell32/res/Copy of rgs/printers.rgs b/dll/win32/shell32/res/Copy of rgs/printers.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/Copy of rgs/printers.rgs rename to dll/win32/shell32/res/Copy of rgs/printers.rgs diff --git a/reactos/dll/win32/shell32/res/Copy of rgs/recyclebin.rgs b/dll/win32/shell32/res/Copy of rgs/recyclebin.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/Copy of rgs/recyclebin.rgs rename to dll/win32/shell32/res/Copy of rgs/recyclebin.rgs diff --git a/reactos/dll/win32/shell32/res/Copy of rgs/shelldesktop.rgs b/dll/win32/shell32/res/Copy of rgs/shelldesktop.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/Copy of rgs/shelldesktop.rgs rename to dll/win32/shell32/res/Copy of rgs/shelldesktop.rgs diff --git a/reactos/dll/win32/shell32/res/Copy of rgs/shellfsfolder.rgs b/dll/win32/shell32/res/Copy of rgs/shellfsfolder.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/Copy of rgs/shellfsfolder.rgs rename to dll/win32/shell32/res/Copy of rgs/shellfsfolder.rgs diff --git a/reactos/dll/win32/shell32/res/Copy of rgs/shelllink.rgs b/dll/win32/shell32/res/Copy of rgs/shelllink.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/Copy of rgs/shelllink.rgs rename to dll/win32/shell32/res/Copy of rgs/shelllink.rgs diff --git a/reactos/dll/win32/shell32/res/Copy of rgs/startmenu.rgs b/dll/win32/shell32/res/Copy of rgs/startmenu.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/Copy of rgs/startmenu.rgs rename to dll/win32/shell32/res/Copy of rgs/startmenu.rgs diff --git a/reactos/dll/win32/shell32/res/avis/160+161+167+168.avi b/dll/win32/shell32/res/avis/160+161+167+168.avi similarity index 100% rename from reactos/dll/win32/shell32/res/avis/160+161+167+168.avi rename to dll/win32/shell32/res/avis/160+161+167+168.avi diff --git a/reactos/dll/win32/shell32/res/avis/162.avi b/dll/win32/shell32/res/avis/162.avi similarity index 100% rename from reactos/dll/win32/shell32/res/avis/162.avi rename to dll/win32/shell32/res/avis/162.avi diff --git a/reactos/dll/win32/shell32/res/avis/163.avi b/dll/win32/shell32/res/avis/163.avi similarity index 100% rename from reactos/dll/win32/shell32/res/avis/163.avi rename to dll/win32/shell32/res/avis/163.avi diff --git a/reactos/dll/win32/shell32/res/avis/164+169.avi b/dll/win32/shell32/res/avis/164+169.avi similarity index 100% rename from reactos/dll/win32/shell32/res/avis/164+169.avi rename to dll/win32/shell32/res/avis/164+169.avi diff --git a/reactos/dll/win32/shell32/res/avis/170.avi b/dll/win32/shell32/res/avis/170.avi similarity index 100% rename from reactos/dll/win32/shell32/res/avis/170.avi rename to dll/win32/shell32/res/avis/170.avi diff --git a/reactos/dll/win32/shell32/res/avis/Licence/COPYING b/dll/win32/shell32/res/avis/Licence/COPYING similarity index 100% rename from reactos/dll/win32/shell32/res/avis/Licence/COPYING rename to dll/win32/shell32/res/avis/Licence/COPYING diff --git a/reactos/dll/win32/shell32/res/avis/Licence/Tango.txt b/dll/win32/shell32/res/avis/Licence/Tango.txt similarity index 100% rename from reactos/dll/win32/shell32/res/avis/Licence/Tango.txt rename to dll/win32/shell32/res/avis/Licence/Tango.txt diff --git a/reactos/dll/win32/shell32/res/bitmaps/204.bmp b/dll/win32/shell32/res/bitmaps/204.bmp similarity index 100% rename from reactos/dll/win32/shell32/res/bitmaps/204.bmp rename to dll/win32/shell32/res/bitmaps/204.bmp diff --git a/reactos/dll/win32/shell32/res/bitmaps/205.bmp b/dll/win32/shell32/res/bitmaps/205.bmp similarity index 100% rename from reactos/dll/win32/shell32/res/bitmaps/205.bmp rename to dll/win32/shell32/res/bitmaps/205.bmp diff --git a/reactos/dll/win32/shell32/res/bitmaps/206.bmp b/dll/win32/shell32/res/bitmaps/206.bmp similarity index 100% rename from reactos/dll/win32/shell32/res/bitmaps/206.bmp rename to dll/win32/shell32/res/bitmaps/206.bmp diff --git a/reactos/dll/win32/shell32/res/bitmaps/207.bmp b/dll/win32/shell32/res/bitmaps/207.bmp similarity index 100% rename from reactos/dll/win32/shell32/res/bitmaps/207.bmp rename to dll/win32/shell32/res/bitmaps/207.bmp diff --git a/reactos/dll/win32/shell32/res/bitmaps/225.bmp b/dll/win32/shell32/res/bitmaps/225.bmp similarity index 100% rename from reactos/dll/win32/shell32/res/bitmaps/225.bmp rename to dll/win32/shell32/res/bitmaps/225.bmp diff --git a/reactos/dll/win32/shell32/res/bitmaps/226.bmp b/dll/win32/shell32/res/bitmaps/226.bmp similarity index 100% rename from reactos/dll/win32/shell32/res/bitmaps/226.bmp rename to dll/win32/shell32/res/bitmaps/226.bmp diff --git a/reactos/dll/win32/shell32/res/bitmaps/227.bmp b/dll/win32/shell32/res/bitmaps/227.bmp similarity index 100% rename from reactos/dll/win32/shell32/res/bitmaps/227.bmp rename to dll/win32/shell32/res/bitmaps/227.bmp diff --git a/reactos/dll/win32/shell32/res/bitmaps/228.bmp b/dll/win32/shell32/res/bitmaps/228.bmp similarity index 100% rename from reactos/dll/win32/shell32/res/bitmaps/228.bmp rename to dll/win32/shell32/res/bitmaps/228.bmp diff --git a/reactos/dll/win32/shell32/res/bitmaps/shell_about_logo_24bpp.bmp b/dll/win32/shell32/res/bitmaps/shell_about_logo_24bpp.bmp similarity index 100% rename from reactos/dll/win32/shell32/res/bitmaps/shell_about_logo_24bpp.bmp rename to dll/win32/shell32/res/bitmaps/shell_about_logo_24bpp.bmp diff --git a/reactos/dll/win32/shell32/res/icons/1.ico b/dll/win32/shell32/res/icons/1.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/1.ico rename to dll/win32/shell32/res/icons/1.ico diff --git a/reactos/dll/win32/shell32/res/icons/10.ico b/dll/win32/shell32/res/icons/10.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/10.ico rename to dll/win32/shell32/res/icons/10.ico diff --git a/reactos/dll/win32/shell32/res/icons/1001.ico b/dll/win32/shell32/res/icons/1001.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/1001.ico rename to dll/win32/shell32/res/icons/1001.ico diff --git a/reactos/dll/win32/shell32/res/icons/1004.ico b/dll/win32/shell32/res/icons/1004.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/1004.ico rename to dll/win32/shell32/res/icons/1004.ico diff --git a/reactos/dll/win32/shell32/res/icons/11.ico b/dll/win32/shell32/res/icons/11.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/11.ico rename to dll/win32/shell32/res/icons/11.ico diff --git a/reactos/dll/win32/shell32/res/icons/12.ico b/dll/win32/shell32/res/icons/12.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/12.ico rename to dll/win32/shell32/res/icons/12.ico diff --git a/reactos/dll/win32/shell32/res/icons/13.ico b/dll/win32/shell32/res/icons/13.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/13.ico rename to dll/win32/shell32/res/icons/13.ico diff --git a/reactos/dll/win32/shell32/res/icons/134.ico b/dll/win32/shell32/res/icons/134.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/134.ico rename to dll/win32/shell32/res/icons/134.ico diff --git a/reactos/dll/win32/shell32/res/icons/135.ico b/dll/win32/shell32/res/icons/135.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/135.ico rename to dll/win32/shell32/res/icons/135.ico diff --git a/reactos/dll/win32/shell32/res/icons/137.ico b/dll/win32/shell32/res/icons/137.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/137.ico rename to dll/win32/shell32/res/icons/137.ico diff --git a/reactos/dll/win32/shell32/res/icons/138.ico b/dll/win32/shell32/res/icons/138.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/138.ico rename to dll/win32/shell32/res/icons/138.ico diff --git a/reactos/dll/win32/shell32/res/icons/14.ico b/dll/win32/shell32/res/icons/14.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/14.ico rename to dll/win32/shell32/res/icons/14.ico diff --git a/reactos/dll/win32/shell32/res/icons/15.ico b/dll/win32/shell32/res/icons/15.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/15.ico rename to dll/win32/shell32/res/icons/15.ico diff --git a/reactos/dll/win32/shell32/res/icons/151.ico b/dll/win32/shell32/res/icons/151.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/151.ico rename to dll/win32/shell32/res/icons/151.ico diff --git a/reactos/dll/win32/shell32/res/icons/152.ico b/dll/win32/shell32/res/icons/152.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/152.ico rename to dll/win32/shell32/res/icons/152.ico diff --git a/reactos/dll/win32/shell32/res/icons/153.ico b/dll/win32/shell32/res/icons/153.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/153.ico rename to dll/win32/shell32/res/icons/153.ico diff --git a/reactos/dll/win32/shell32/res/icons/154.ico b/dll/win32/shell32/res/icons/154.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/154.ico rename to dll/win32/shell32/res/icons/154.ico diff --git a/reactos/dll/win32/shell32/res/icons/155.ico b/dll/win32/shell32/res/icons/155.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/155.ico rename to dll/win32/shell32/res/icons/155.ico diff --git a/reactos/dll/win32/shell32/res/icons/156.ico b/dll/win32/shell32/res/icons/156.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/156.ico rename to dll/win32/shell32/res/icons/156.ico diff --git a/reactos/dll/win32/shell32/res/icons/157.ico b/dll/win32/shell32/res/icons/157.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/157.ico rename to dll/win32/shell32/res/icons/157.ico diff --git a/reactos/dll/win32/shell32/res/icons/16.ico b/dll/win32/shell32/res/icons/16.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/16.ico rename to dll/win32/shell32/res/icons/16.ico diff --git a/reactos/dll/win32/shell32/res/icons/160.ico b/dll/win32/shell32/res/icons/160.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/160.ico rename to dll/win32/shell32/res/icons/160.ico diff --git a/reactos/dll/win32/shell32/res/icons/161.ico b/dll/win32/shell32/res/icons/161.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/161.ico rename to dll/win32/shell32/res/icons/161.ico diff --git a/reactos/dll/win32/shell32/res/icons/16710.ico b/dll/win32/shell32/res/icons/16710.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/16710.ico rename to dll/win32/shell32/res/icons/16710.ico diff --git a/reactos/dll/win32/shell32/res/icons/16715.ico b/dll/win32/shell32/res/icons/16715.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/16715.ico rename to dll/win32/shell32/res/icons/16715.ico diff --git a/reactos/dll/win32/shell32/res/icons/16717.ico b/dll/win32/shell32/res/icons/16717.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/16717.ico rename to dll/win32/shell32/res/icons/16717.ico diff --git a/reactos/dll/win32/shell32/res/icons/16718.ico b/dll/win32/shell32/res/icons/16718.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/16718.ico rename to dll/win32/shell32/res/icons/16718.ico diff --git a/reactos/dll/win32/shell32/res/icons/16721.ico b/dll/win32/shell32/res/icons/16721.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/16721.ico rename to dll/win32/shell32/res/icons/16721.ico diff --git a/reactos/dll/win32/shell32/res/icons/17.ico b/dll/win32/shell32/res/icons/17.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/17.ico rename to dll/win32/shell32/res/icons/17.ico diff --git a/reactos/dll/win32/shell32/res/icons/1700.ico b/dll/win32/shell32/res/icons/1700.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/1700.ico rename to dll/win32/shell32/res/icons/1700.ico diff --git a/reactos/dll/win32/shell32/res/icons/172.ico b/dll/win32/shell32/res/icons/172.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/172.ico rename to dll/win32/shell32/res/icons/172.ico diff --git a/reactos/dll/win32/shell32/res/icons/173.ico b/dll/win32/shell32/res/icons/173.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/173.ico rename to dll/win32/shell32/res/icons/173.ico diff --git a/reactos/dll/win32/shell32/res/icons/18.ico b/dll/win32/shell32/res/icons/18.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/18.ico rename to dll/win32/shell32/res/icons/18.ico diff --git a/reactos/dll/win32/shell32/res/icons/182.ico b/dll/win32/shell32/res/icons/182.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/182.ico rename to dll/win32/shell32/res/icons/182.ico diff --git a/reactos/dll/win32/shell32/res/icons/183.ico b/dll/win32/shell32/res/icons/183.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/183.ico rename to dll/win32/shell32/res/icons/183.ico diff --git a/reactos/dll/win32/shell32/res/icons/184.ico b/dll/win32/shell32/res/icons/184.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/184.ico rename to dll/win32/shell32/res/icons/184.ico diff --git a/reactos/dll/win32/shell32/res/icons/185.ico b/dll/win32/shell32/res/icons/185.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/185.ico rename to dll/win32/shell32/res/icons/185.ico diff --git a/reactos/dll/win32/shell32/res/icons/186.ico b/dll/win32/shell32/res/icons/186.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/186.ico rename to dll/win32/shell32/res/icons/186.ico diff --git a/reactos/dll/win32/shell32/res/icons/187.ico b/dll/win32/shell32/res/icons/187.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/187.ico rename to dll/win32/shell32/res/icons/187.ico diff --git a/reactos/dll/win32/shell32/res/icons/19.ico b/dll/win32/shell32/res/icons/19.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/19.ico rename to dll/win32/shell32/res/icons/19.ico diff --git a/reactos/dll/win32/shell32/res/icons/191.ico b/dll/win32/shell32/res/icons/191.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/191.ico rename to dll/win32/shell32/res/icons/191.ico diff --git a/reactos/dll/win32/shell32/res/icons/192.ico b/dll/win32/shell32/res/icons/192.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/192.ico rename to dll/win32/shell32/res/icons/192.ico diff --git a/reactos/dll/win32/shell32/res/icons/2.ico b/dll/win32/shell32/res/icons/2.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/2.ico rename to dll/win32/shell32/res/icons/2.ico diff --git a/reactos/dll/win32/shell32/res/icons/20.ico b/dll/win32/shell32/res/icons/20.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/20.ico rename to dll/win32/shell32/res/icons/20.ico diff --git a/reactos/dll/win32/shell32/res/icons/21.ico b/dll/win32/shell32/res/icons/21.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/21.ico rename to dll/win32/shell32/res/icons/21.ico diff --git a/reactos/dll/win32/shell32/res/icons/210.ico b/dll/win32/shell32/res/icons/210.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/210.ico rename to dll/win32/shell32/res/icons/210.ico diff --git a/reactos/dll/win32/shell32/res/icons/22.ico b/dll/win32/shell32/res/icons/22.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/22.ico rename to dll/win32/shell32/res/icons/22.ico diff --git a/reactos/dll/win32/shell32/res/icons/220.ico b/dll/win32/shell32/res/icons/220.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/220.ico rename to dll/win32/shell32/res/icons/220.ico diff --git a/reactos/dll/win32/shell32/res/icons/221.ico b/dll/win32/shell32/res/icons/221.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/221.ico rename to dll/win32/shell32/res/icons/221.ico diff --git a/reactos/dll/win32/shell32/res/icons/222.ico b/dll/win32/shell32/res/icons/222.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/222.ico rename to dll/win32/shell32/res/icons/222.ico diff --git a/reactos/dll/win32/shell32/res/icons/224.ico b/dll/win32/shell32/res/icons/224.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/224.ico rename to dll/win32/shell32/res/icons/224.ico diff --git a/reactos/dll/win32/shell32/res/icons/225.ico b/dll/win32/shell32/res/icons/225.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/225.ico rename to dll/win32/shell32/res/icons/225.ico diff --git a/reactos/dll/win32/shell32/res/icons/226.ico b/dll/win32/shell32/res/icons/226.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/226.ico rename to dll/win32/shell32/res/icons/226.ico diff --git a/reactos/dll/win32/shell32/res/icons/228.ico b/dll/win32/shell32/res/icons/228.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/228.ico rename to dll/win32/shell32/res/icons/228.ico diff --git a/reactos/dll/win32/shell32/res/icons/23.ico b/dll/win32/shell32/res/icons/23.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/23.ico rename to dll/win32/shell32/res/icons/23.ico diff --git a/reactos/dll/win32/shell32/res/icons/233.ico b/dll/win32/shell32/res/icons/233.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/233.ico rename to dll/win32/shell32/res/icons/233.ico diff --git a/reactos/dll/win32/shell32/res/icons/235.ico b/dll/win32/shell32/res/icons/235.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/235.ico rename to dll/win32/shell32/res/icons/235.ico diff --git a/reactos/dll/win32/shell32/res/icons/236.ico b/dll/win32/shell32/res/icons/236.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/236.ico rename to dll/win32/shell32/res/icons/236.ico diff --git a/reactos/dll/win32/shell32/res/icons/237.ico b/dll/win32/shell32/res/icons/237.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/237.ico rename to dll/win32/shell32/res/icons/237.ico diff --git a/reactos/dll/win32/shell32/res/icons/238.ico b/dll/win32/shell32/res/icons/238.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/238.ico rename to dll/win32/shell32/res/icons/238.ico diff --git a/reactos/dll/win32/shell32/res/icons/24.ico b/dll/win32/shell32/res/icons/24.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/24.ico rename to dll/win32/shell32/res/icons/24.ico diff --git a/reactos/dll/win32/shell32/res/icons/240.ico b/dll/win32/shell32/res/icons/240.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/240.ico rename to dll/win32/shell32/res/icons/240.ico diff --git a/reactos/dll/win32/shell32/res/icons/245.ico b/dll/win32/shell32/res/icons/245.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/245.ico rename to dll/win32/shell32/res/icons/245.ico diff --git a/reactos/dll/win32/shell32/res/icons/246.ico b/dll/win32/shell32/res/icons/246.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/246.ico rename to dll/win32/shell32/res/icons/246.ico diff --git a/reactos/dll/win32/shell32/res/icons/248.ico b/dll/win32/shell32/res/icons/248.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/248.ico rename to dll/win32/shell32/res/icons/248.ico diff --git a/reactos/dll/win32/shell32/res/icons/249.ico b/dll/win32/shell32/res/icons/249.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/249.ico rename to dll/win32/shell32/res/icons/249.ico diff --git a/reactos/dll/win32/shell32/res/icons/25.ico b/dll/win32/shell32/res/icons/25.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/25.ico rename to dll/win32/shell32/res/icons/25.ico diff --git a/reactos/dll/win32/shell32/res/icons/250.ico b/dll/win32/shell32/res/icons/250.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/250.ico rename to dll/win32/shell32/res/icons/250.ico diff --git a/reactos/dll/win32/shell32/res/icons/252.ico b/dll/win32/shell32/res/icons/252.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/252.ico rename to dll/win32/shell32/res/icons/252.ico diff --git a/reactos/dll/win32/shell32/res/icons/254.ico b/dll/win32/shell32/res/icons/254.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/254.ico rename to dll/win32/shell32/res/icons/254.ico diff --git a/reactos/dll/win32/shell32/res/icons/255.ico b/dll/win32/shell32/res/icons/255.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/255.ico rename to dll/win32/shell32/res/icons/255.ico diff --git a/reactos/dll/win32/shell32/res/icons/263.ico b/dll/win32/shell32/res/icons/263.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/263.ico rename to dll/win32/shell32/res/icons/263.ico diff --git a/reactos/dll/win32/shell32/res/icons/265.ico b/dll/win32/shell32/res/icons/265.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/265.ico rename to dll/win32/shell32/res/icons/265.ico diff --git a/reactos/dll/win32/shell32/res/icons/268.ico b/dll/win32/shell32/res/icons/268.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/268.ico rename to dll/win32/shell32/res/icons/268.ico diff --git a/reactos/dll/win32/shell32/res/icons/269.ico b/dll/win32/shell32/res/icons/269.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/269.ico rename to dll/win32/shell32/res/icons/269.ico diff --git a/reactos/dll/win32/shell32/res/icons/270.ico b/dll/win32/shell32/res/icons/270.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/270.ico rename to dll/win32/shell32/res/icons/270.ico diff --git a/reactos/dll/win32/shell32/res/icons/271.ico b/dll/win32/shell32/res/icons/271.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/271.ico rename to dll/win32/shell32/res/icons/271.ico diff --git a/reactos/dll/win32/shell32/res/icons/277.ico b/dll/win32/shell32/res/icons/277.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/277.ico rename to dll/win32/shell32/res/icons/277.ico diff --git a/reactos/dll/win32/shell32/res/icons/279.ico b/dll/win32/shell32/res/icons/279.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/279.ico rename to dll/win32/shell32/res/icons/279.ico diff --git a/reactos/dll/win32/shell32/res/icons/28.ico b/dll/win32/shell32/res/icons/28.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/28.ico rename to dll/win32/shell32/res/icons/28.ico diff --git a/reactos/dll/win32/shell32/res/icons/289.ico b/dll/win32/shell32/res/icons/289.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/289.ico rename to dll/win32/shell32/res/icons/289.ico diff --git a/reactos/dll/win32/shell32/res/icons/29.ico b/dll/win32/shell32/res/icons/29.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/29.ico rename to dll/win32/shell32/res/icons/29.ico diff --git a/reactos/dll/win32/shell32/res/icons/290.ico b/dll/win32/shell32/res/icons/290.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/290.ico rename to dll/win32/shell32/res/icons/290.ico diff --git a/reactos/dll/win32/shell32/res/icons/291.ico b/dll/win32/shell32/res/icons/291.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/291.ico rename to dll/win32/shell32/res/icons/291.ico diff --git a/reactos/dll/win32/shell32/res/icons/292.ico b/dll/win32/shell32/res/icons/292.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/292.ico rename to dll/win32/shell32/res/icons/292.ico diff --git a/reactos/dll/win32/shell32/res/icons/293.ico b/dll/win32/shell32/res/icons/293.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/293.ico rename to dll/win32/shell32/res/icons/293.ico diff --git a/reactos/dll/win32/shell32/res/icons/294.ico b/dll/win32/shell32/res/icons/294.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/294.ico rename to dll/win32/shell32/res/icons/294.ico diff --git a/reactos/dll/win32/shell32/res/icons/295.ico b/dll/win32/shell32/res/icons/295.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/295.ico rename to dll/win32/shell32/res/icons/295.ico diff --git a/reactos/dll/win32/shell32/res/icons/296.ico b/dll/win32/shell32/res/icons/296.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/296.ico rename to dll/win32/shell32/res/icons/296.ico diff --git a/reactos/dll/win32/shell32/res/icons/297.ico b/dll/win32/shell32/res/icons/297.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/297.ico rename to dll/win32/shell32/res/icons/297.ico diff --git a/reactos/dll/win32/shell32/res/icons/298.ico b/dll/win32/shell32/res/icons/298.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/298.ico rename to dll/win32/shell32/res/icons/298.ico diff --git a/reactos/dll/win32/shell32/res/icons/299.ico b/dll/win32/shell32/res/icons/299.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/299.ico rename to dll/win32/shell32/res/icons/299.ico diff --git a/reactos/dll/win32/shell32/res/icons/3.ico b/dll/win32/shell32/res/icons/3.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/3.ico rename to dll/win32/shell32/res/icons/3.ico diff --git a/reactos/dll/win32/shell32/res/icons/30.ico b/dll/win32/shell32/res/icons/30.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/30.ico rename to dll/win32/shell32/res/icons/30.ico diff --git a/reactos/dll/win32/shell32/res/icons/302.ico b/dll/win32/shell32/res/icons/302.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/302.ico rename to dll/win32/shell32/res/icons/302.ico diff --git a/reactos/dll/win32/shell32/res/icons/304.ico b/dll/win32/shell32/res/icons/304.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/304.ico rename to dll/win32/shell32/res/icons/304.ico diff --git a/reactos/dll/win32/shell32/res/icons/305.ico b/dll/win32/shell32/res/icons/305.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/305.ico rename to dll/win32/shell32/res/icons/305.ico diff --git a/reactos/dll/win32/shell32/res/icons/309.ico b/dll/win32/shell32/res/icons/309.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/309.ico rename to dll/win32/shell32/res/icons/309.ico diff --git a/reactos/dll/win32/shell32/res/icons/315.ico b/dll/win32/shell32/res/icons/315.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/315.ico rename to dll/win32/shell32/res/icons/315.ico diff --git a/reactos/dll/win32/shell32/res/icons/317.ico b/dll/win32/shell32/res/icons/317.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/317.ico rename to dll/win32/shell32/res/icons/317.ico diff --git a/reactos/dll/win32/shell32/res/icons/318.ico b/dll/win32/shell32/res/icons/318.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/318.ico rename to dll/win32/shell32/res/icons/318.ico diff --git a/reactos/dll/win32/shell32/res/icons/319.ico b/dll/win32/shell32/res/icons/319.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/319.ico rename to dll/win32/shell32/res/icons/319.ico diff --git a/reactos/dll/win32/shell32/res/icons/32.ico b/dll/win32/shell32/res/icons/32.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/32.ico rename to dll/win32/shell32/res/icons/32.ico diff --git a/reactos/dll/win32/shell32/res/icons/322.ico b/dll/win32/shell32/res/icons/322.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/322.ico rename to dll/win32/shell32/res/icons/322.ico diff --git a/reactos/dll/win32/shell32/res/icons/323.ico b/dll/win32/shell32/res/icons/323.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/323.ico rename to dll/win32/shell32/res/icons/323.ico diff --git a/reactos/dll/win32/shell32/res/icons/324.ico b/dll/win32/shell32/res/icons/324.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/324.ico rename to dll/win32/shell32/res/icons/324.ico diff --git a/reactos/dll/win32/shell32/res/icons/325.ico b/dll/win32/shell32/res/icons/325.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/325.ico rename to dll/win32/shell32/res/icons/325.ico diff --git a/reactos/dll/win32/shell32/res/icons/326.ico b/dll/win32/shell32/res/icons/326.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/326.ico rename to dll/win32/shell32/res/icons/326.ico diff --git a/reactos/dll/win32/shell32/res/icons/327.ico b/dll/win32/shell32/res/icons/327.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/327.ico rename to dll/win32/shell32/res/icons/327.ico diff --git a/reactos/dll/win32/shell32/res/icons/328.ico b/dll/win32/shell32/res/icons/328.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/328.ico rename to dll/win32/shell32/res/icons/328.ico diff --git a/reactos/dll/win32/shell32/res/icons/329.ico b/dll/win32/shell32/res/icons/329.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/329.ico rename to dll/win32/shell32/res/icons/329.ico diff --git a/reactos/dll/win32/shell32/res/icons/33.ico b/dll/win32/shell32/res/icons/33.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/33.ico rename to dll/win32/shell32/res/icons/33.ico diff --git a/reactos/dll/win32/shell32/res/icons/330.ico b/dll/win32/shell32/res/icons/330.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/330.ico rename to dll/win32/shell32/res/icons/330.ico diff --git a/reactos/dll/win32/shell32/res/icons/35.ico b/dll/win32/shell32/res/icons/35.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/35.ico rename to dll/win32/shell32/res/icons/35.ico diff --git a/reactos/dll/win32/shell32/res/icons/36.ico b/dll/win32/shell32/res/icons/36.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/36.ico rename to dll/win32/shell32/res/icons/36.ico diff --git a/reactos/dll/win32/shell32/res/icons/37.ico b/dll/win32/shell32/res/icons/37.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/37.ico rename to dll/win32/shell32/res/icons/37.ico diff --git a/reactos/dll/win32/shell32/res/icons/38.ico b/dll/win32/shell32/res/icons/38.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/38.ico rename to dll/win32/shell32/res/icons/38.ico diff --git a/reactos/dll/win32/shell32/res/icons/39.ico b/dll/win32/shell32/res/icons/39.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/39.ico rename to dll/win32/shell32/res/icons/39.ico diff --git a/reactos/dll/win32/shell32/res/icons/4.ico b/dll/win32/shell32/res/icons/4.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/4.ico rename to dll/win32/shell32/res/icons/4.ico diff --git a/reactos/dll/win32/shell32/res/icons/40.ico b/dll/win32/shell32/res/icons/40.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/40.ico rename to dll/win32/shell32/res/icons/40.ico diff --git a/reactos/dll/win32/shell32/res/icons/41.ico b/dll/win32/shell32/res/icons/41.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/41.ico rename to dll/win32/shell32/res/icons/41.ico diff --git a/reactos/dll/win32/shell32/res/icons/44.ico b/dll/win32/shell32/res/icons/44.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/44.ico rename to dll/win32/shell32/res/icons/44.ico diff --git a/reactos/dll/win32/shell32/res/icons/45.ico b/dll/win32/shell32/res/icons/45.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/45.ico rename to dll/win32/shell32/res/icons/45.ico diff --git a/reactos/dll/win32/shell32/res/icons/46.ico b/dll/win32/shell32/res/icons/46.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/46.ico rename to dll/win32/shell32/res/icons/46.ico diff --git a/reactos/dll/win32/shell32/res/icons/47.ico b/dll/win32/shell32/res/icons/47.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/47.ico rename to dll/win32/shell32/res/icons/47.ico diff --git a/reactos/dll/win32/shell32/res/icons/48.ico b/dll/win32/shell32/res/icons/48.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/48.ico rename to dll/win32/shell32/res/icons/48.ico diff --git a/reactos/dll/win32/shell32/res/icons/5.ico b/dll/win32/shell32/res/icons/5.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/5.ico rename to dll/win32/shell32/res/icons/5.ico diff --git a/reactos/dll/win32/shell32/res/icons/54.ico b/dll/win32/shell32/res/icons/54.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/54.ico rename to dll/win32/shell32/res/icons/54.ico diff --git a/reactos/dll/win32/shell32/res/icons/6.ico b/dll/win32/shell32/res/icons/6.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/6.ico rename to dll/win32/shell32/res/icons/6.ico diff --git a/reactos/dll/win32/shell32/res/icons/7.ico b/dll/win32/shell32/res/icons/7.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/7.ico rename to dll/win32/shell32/res/icons/7.ico diff --git a/reactos/dll/win32/shell32/res/icons/8.ico b/dll/win32/shell32/res/icons/8.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/8.ico rename to dll/win32/shell32/res/icons/8.ico diff --git a/reactos/dll/win32/shell32/res/icons/8240.ico b/dll/win32/shell32/res/icons/8240.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/8240.ico rename to dll/win32/shell32/res/icons/8240.ico diff --git a/reactos/dll/win32/shell32/res/icons/9.ico b/dll/win32/shell32/res/icons/9.ico similarity index 100% rename from reactos/dll/win32/shell32/res/icons/9.ico rename to dll/win32/shell32/res/icons/9.ico diff --git a/reactos/dll/win32/shell32/res/icons/Icon_Licence/COPYING b/dll/win32/shell32/res/icons/Icon_Licence/COPYING similarity index 100% rename from reactos/dll/win32/shell32/res/icons/Icon_Licence/COPYING rename to dll/win32/shell32/res/icons/Icon_Licence/COPYING diff --git a/reactos/dll/win32/shell32/res/icons/Icon_Licence/Tango.txt b/dll/win32/shell32/res/icons/Icon_Licence/Tango.txt similarity index 100% rename from reactos/dll/win32/shell32/res/icons/Icon_Licence/Tango.txt rename to dll/win32/shell32/res/icons/Icon_Licence/Tango.txt diff --git a/reactos/dll/win32/shell32/res/rgs/adminfoldershortcut.rgs b/dll/win32/shell32/res/rgs/adminfoldershortcut.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/rgs/adminfoldershortcut.rgs rename to dll/win32/shell32/res/rgs/adminfoldershortcut.rgs diff --git a/reactos/dll/win32/shell32/res/rgs/autocomplete.rgs b/dll/win32/shell32/res/rgs/autocomplete.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/rgs/autocomplete.rgs rename to dll/win32/shell32/res/rgs/autocomplete.rgs diff --git a/reactos/dll/win32/shell32/res/rgs/controlpanel.rgs b/dll/win32/shell32/res/rgs/controlpanel.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/rgs/controlpanel.rgs rename to dll/win32/shell32/res/rgs/controlpanel.rgs diff --git a/reactos/dll/win32/shell32/res/rgs/dragdrophelper.rgs b/dll/win32/shell32/res/rgs/dragdrophelper.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/rgs/dragdrophelper.rgs rename to dll/win32/shell32/res/rgs/dragdrophelper.rgs diff --git a/reactos/dll/win32/shell32/res/rgs/folderoptions.rgs b/dll/win32/shell32/res/rgs/folderoptions.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/rgs/folderoptions.rgs rename to dll/win32/shell32/res/rgs/folderoptions.rgs diff --git a/reactos/dll/win32/shell32/res/rgs/foldershortcut.rgs b/dll/win32/shell32/res/rgs/foldershortcut.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/rgs/foldershortcut.rgs rename to dll/win32/shell32/res/rgs/foldershortcut.rgs diff --git a/reactos/dll/win32/shell32/res/rgs/fontsfoldershortcut.rgs b/dll/win32/shell32/res/rgs/fontsfoldershortcut.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/rgs/fontsfoldershortcut.rgs rename to dll/win32/shell32/res/rgs/fontsfoldershortcut.rgs diff --git a/reactos/dll/win32/shell32/res/rgs/menubandsite.rgs b/dll/win32/shell32/res/rgs/menubandsite.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/rgs/menubandsite.rgs rename to dll/win32/shell32/res/rgs/menubandsite.rgs diff --git a/reactos/dll/win32/shell32/res/rgs/mycomputer.rgs b/dll/win32/shell32/res/rgs/mycomputer.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/rgs/mycomputer.rgs rename to dll/win32/shell32/res/rgs/mycomputer.rgs diff --git a/reactos/dll/win32/shell32/res/rgs/mydocuments.rgs b/dll/win32/shell32/res/rgs/mydocuments.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/rgs/mydocuments.rgs rename to dll/win32/shell32/res/rgs/mydocuments.rgs diff --git a/reactos/dll/win32/shell32/res/rgs/networkplaces.rgs b/dll/win32/shell32/res/rgs/networkplaces.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/rgs/networkplaces.rgs rename to dll/win32/shell32/res/rgs/networkplaces.rgs diff --git a/reactos/dll/win32/shell32/res/rgs/newmenu.rgs b/dll/win32/shell32/res/rgs/newmenu.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/rgs/newmenu.rgs rename to dll/win32/shell32/res/rgs/newmenu.rgs diff --git a/reactos/dll/win32/shell32/res/rgs/openwithmenu.rgs b/dll/win32/shell32/res/rgs/openwithmenu.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/rgs/openwithmenu.rgs rename to dll/win32/shell32/res/rgs/openwithmenu.rgs diff --git a/reactos/dll/win32/shell32/res/rgs/printers.rgs b/dll/win32/shell32/res/rgs/printers.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/rgs/printers.rgs rename to dll/win32/shell32/res/rgs/printers.rgs diff --git a/reactos/dll/win32/shell32/res/rgs/recyclebin.rgs b/dll/win32/shell32/res/rgs/recyclebin.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/rgs/recyclebin.rgs rename to dll/win32/shell32/res/rgs/recyclebin.rgs diff --git a/reactos/dll/win32/shell32/res/rgs/shelldesktop.rgs b/dll/win32/shell32/res/rgs/shelldesktop.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/rgs/shelldesktop.rgs rename to dll/win32/shell32/res/rgs/shelldesktop.rgs diff --git a/reactos/dll/win32/shell32/res/rgs/shellfsfolder.rgs b/dll/win32/shell32/res/rgs/shellfsfolder.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/rgs/shellfsfolder.rgs rename to dll/win32/shell32/res/rgs/shellfsfolder.rgs diff --git a/reactos/dll/win32/shell32/res/rgs/shelllink.rgs b/dll/win32/shell32/res/rgs/shelllink.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/rgs/shelllink.rgs rename to dll/win32/shell32/res/rgs/shelllink.rgs diff --git a/reactos/dll/win32/shell32/res/rgs/startmenu.rgs b/dll/win32/shell32/res/rgs/startmenu.rgs similarity index 100% rename from reactos/dll/win32/shell32/res/rgs/startmenu.rgs rename to dll/win32/shell32/res/rgs/startmenu.rgs diff --git a/reactos/dll/win32/shell32/rgs_res.rc b/dll/win32/shell32/rgs_res.rc similarity index 100% rename from reactos/dll/win32/shell32/rgs_res.rc rename to dll/win32/shell32/rgs_res.rc diff --git a/reactos/dll/win32/shell32/shell32.rbuild b/dll/win32/shell32/shell32.rbuild similarity index 100% rename from reactos/dll/win32/shell32/shell32.rbuild rename to dll/win32/shell32/shell32.rbuild diff --git a/reactos/dll/win32/shell32/shell32.rc b/dll/win32/shell32/shell32.rc similarity index 100% rename from reactos/dll/win32/shell32/shell32.rc rename to dll/win32/shell32/shell32.rc diff --git a/reactos/dll/win32/shell32/shell32.spec b/dll/win32/shell32/shell32.spec similarity index 100% rename from reactos/dll/win32/shell32/shell32.spec rename to dll/win32/shell32/shell32.spec diff --git a/reactos/dll/win32/shell32/shell32_main.cpp b/dll/win32/shell32/shell32_main.cpp similarity index 100% rename from reactos/dll/win32/shell32/shell32_main.cpp rename to dll/win32/shell32/shell32_main.cpp diff --git a/reactos/dll/win32/shell32/shell32_main.h b/dll/win32/shell32/shell32_main.h similarity index 100% rename from reactos/dll/win32/shell32/shell32_main.h rename to dll/win32/shell32/shell32_main.h diff --git a/reactos/dll/win32/shell32/shellfolder.h b/dll/win32/shell32/shellfolder.h similarity index 100% rename from reactos/dll/win32/shell32/shellfolder.h rename to dll/win32/shell32/shellfolder.h diff --git a/reactos/dll/win32/shell32/shellitem.cpp b/dll/win32/shell32/shellitem.cpp similarity index 100% rename from reactos/dll/win32/shell32/shellitem.cpp rename to dll/win32/shell32/shellitem.cpp diff --git a/reactos/dll/win32/shell32/shellitem.h b/dll/win32/shell32/shellitem.h similarity index 100% rename from reactos/dll/win32/shell32/shellitem.h rename to dll/win32/shell32/shellitem.h diff --git a/reactos/dll/win32/shell32/shelllink.cpp b/dll/win32/shell32/shelllink.cpp similarity index 100% rename from reactos/dll/win32/shell32/shelllink.cpp rename to dll/win32/shell32/shelllink.cpp diff --git a/reactos/dll/win32/shell32/shelllink.h b/dll/win32/shell32/shelllink.h similarity index 100% rename from reactos/dll/win32/shell32/shelllink.h rename to dll/win32/shell32/shelllink.h diff --git a/reactos/dll/win32/shell32/shellole.cpp b/dll/win32/shell32/shellole.cpp similarity index 100% rename from reactos/dll/win32/shell32/shellole.cpp rename to dll/win32/shell32/shellole.cpp diff --git a/reactos/dll/win32/shell32/shellord.cpp b/dll/win32/shell32/shellord.cpp similarity index 100% rename from reactos/dll/win32/shell32/shellord.cpp rename to dll/win32/shell32/shellord.cpp diff --git a/reactos/dll/win32/shell32/shellpath.cpp b/dll/win32/shell32/shellpath.cpp similarity index 100% rename from reactos/dll/win32/shell32/shellpath.cpp rename to dll/win32/shell32/shellpath.cpp diff --git a/reactos/dll/win32/shell32/shellreg.cpp b/dll/win32/shell32/shellreg.cpp similarity index 100% rename from reactos/dll/win32/shell32/shellreg.cpp rename to dll/win32/shell32/shellreg.cpp diff --git a/reactos/dll/win32/shell32/shellstring.cpp b/dll/win32/shell32/shellstring.cpp similarity index 100% rename from reactos/dll/win32/shell32/shellstring.cpp rename to dll/win32/shell32/shellstring.cpp diff --git a/reactos/dll/win32/shell32/shfldr.h b/dll/win32/shell32/shfldr.h similarity index 100% rename from reactos/dll/win32/shell32/shfldr.h rename to dll/win32/shell32/shfldr.h diff --git a/reactos/dll/win32/shell32/shlexec.cpp b/dll/win32/shell32/shlexec.cpp similarity index 100% rename from reactos/dll/win32/shell32/shlexec.cpp rename to dll/win32/shell32/shlexec.cpp diff --git a/reactos/dll/win32/shell32/shlfileop.cpp b/dll/win32/shell32/shlfileop.cpp similarity index 100% rename from reactos/dll/win32/shell32/shlfileop.cpp rename to dll/win32/shell32/shlfileop.cpp diff --git a/reactos/dll/win32/shell32/shlfolder.cpp b/dll/win32/shell32/shlfolder.cpp similarity index 100% rename from reactos/dll/win32/shell32/shlfolder.cpp rename to dll/win32/shell32/shlfolder.cpp diff --git a/reactos/dll/win32/shell32/shlfsbind.cpp b/dll/win32/shell32/shlfsbind.cpp similarity index 100% rename from reactos/dll/win32/shell32/shlfsbind.cpp rename to dll/win32/shell32/shlfsbind.cpp diff --git a/reactos/dll/win32/shell32/shlmenu.cpp b/dll/win32/shell32/shlmenu.cpp similarity index 100% rename from reactos/dll/win32/shell32/shlmenu.cpp rename to dll/win32/shell32/shlmenu.cpp diff --git a/reactos/dll/win32/shell32/shlview.cpp b/dll/win32/shell32/shlview.cpp similarity index 100% rename from reactos/dll/win32/shell32/shlview.cpp rename to dll/win32/shell32/shlview.cpp diff --git a/reactos/dll/win32/shell32/shobjidl_local.idl b/dll/win32/shell32/shobjidl_local.idl similarity index 100% rename from reactos/dll/win32/shell32/shobjidl_local.idl rename to dll/win32/shell32/shobjidl_local.idl diff --git a/reactos/dll/win32/shell32/shpolicy.cpp b/dll/win32/shell32/shpolicy.cpp similarity index 100% rename from reactos/dll/win32/shell32/shpolicy.cpp rename to dll/win32/shell32/shpolicy.cpp diff --git a/reactos/dll/win32/shell32/shresdef.h b/dll/win32/shell32/shresdef.h similarity index 100% rename from reactos/dll/win32/shell32/shresdef.h rename to dll/win32/shell32/shresdef.h diff --git a/reactos/dll/win32/shell32/startmenu.cpp b/dll/win32/shell32/startmenu.cpp similarity index 100% rename from reactos/dll/win32/shell32/startmenu.cpp rename to dll/win32/shell32/startmenu.cpp diff --git a/reactos/dll/win32/shell32/startmenu.h b/dll/win32/shell32/startmenu.h similarity index 100% rename from reactos/dll/win32/shell32/startmenu.h rename to dll/win32/shell32/startmenu.h diff --git a/reactos/dll/win32/shell32/stubs.cpp b/dll/win32/shell32/stubs.cpp similarity index 100% rename from reactos/dll/win32/shell32/stubs.cpp rename to dll/win32/shell32/stubs.cpp diff --git a/reactos/dll/win32/shell32/systray.cpp b/dll/win32/shell32/systray.cpp similarity index 100% rename from reactos/dll/win32/shell32/systray.cpp rename to dll/win32/shell32/systray.cpp diff --git a/reactos/dll/win32/shell32/undocshell.h b/dll/win32/shell32/undocshell.h similarity index 100% rename from reactos/dll/win32/shell32/undocshell.h rename to dll/win32/shell32/undocshell.h diff --git a/reactos/dll/win32/shell32/version.h b/dll/win32/shell32/version.h similarity index 100% rename from reactos/dll/win32/shell32/version.h rename to dll/win32/shell32/version.h diff --git a/reactos/dll/win32/shell32/version.rc b/dll/win32/shell32/version.rc similarity index 100% rename from reactos/dll/win32/shell32/version.rc rename to dll/win32/shell32/version.rc diff --git a/reactos/dll/win32/shell32/xdg.h b/dll/win32/shell32/xdg.h similarity index 100% rename from reactos/dll/win32/shell32/xdg.h rename to dll/win32/shell32/xdg.h diff --git a/reactos/dll/win32/shfolder/CMakeLists.txt b/dll/win32/shfolder/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/shfolder/CMakeLists.txt rename to dll/win32/shfolder/CMakeLists.txt diff --git a/reactos/dll/win32/shfolder/shfolder.rbuild b/dll/win32/shfolder/shfolder.rbuild similarity index 100% rename from reactos/dll/win32/shfolder/shfolder.rbuild rename to dll/win32/shfolder/shfolder.rbuild diff --git a/reactos/dll/win32/shfolder/shfolder.spec b/dll/win32/shfolder/shfolder.spec similarity index 100% rename from reactos/dll/win32/shfolder/shfolder.spec rename to dll/win32/shfolder/shfolder.spec diff --git a/reactos/dll/win32/shfolder/version.rc b/dll/win32/shfolder/version.rc similarity index 100% rename from reactos/dll/win32/shfolder/version.rc rename to dll/win32/shfolder/version.rc diff --git a/reactos/dll/win32/shimgvw/CMakeLists.txt b/dll/win32/shimgvw/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/shimgvw/CMakeLists.txt rename to dll/win32/shimgvw/CMakeLists.txt diff --git a/reactos/dll/win32/shimgvw/lang/bg-BG.rc b/dll/win32/shimgvw/lang/bg-BG.rc similarity index 100% rename from reactos/dll/win32/shimgvw/lang/bg-BG.rc rename to dll/win32/shimgvw/lang/bg-BG.rc diff --git a/reactos/dll/win32/shimgvw/lang/cs-CZ.rc b/dll/win32/shimgvw/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/win32/shimgvw/lang/cs-CZ.rc rename to dll/win32/shimgvw/lang/cs-CZ.rc diff --git a/reactos/dll/win32/shimgvw/lang/de-DE.rc b/dll/win32/shimgvw/lang/de-DE.rc similarity index 100% rename from reactos/dll/win32/shimgvw/lang/de-DE.rc rename to dll/win32/shimgvw/lang/de-DE.rc diff --git a/reactos/dll/win32/shimgvw/lang/en-US.rc b/dll/win32/shimgvw/lang/en-US.rc similarity index 100% rename from reactos/dll/win32/shimgvw/lang/en-US.rc rename to dll/win32/shimgvw/lang/en-US.rc diff --git a/reactos/dll/win32/shimgvw/lang/es-ES.rc b/dll/win32/shimgvw/lang/es-ES.rc similarity index 100% rename from reactos/dll/win32/shimgvw/lang/es-ES.rc rename to dll/win32/shimgvw/lang/es-ES.rc diff --git a/reactos/dll/win32/shimgvw/lang/fr-FR.rc b/dll/win32/shimgvw/lang/fr-FR.rc similarity index 100% rename from reactos/dll/win32/shimgvw/lang/fr-FR.rc rename to dll/win32/shimgvw/lang/fr-FR.rc diff --git a/reactos/dll/win32/shimgvw/lang/it-IT.rc b/dll/win32/shimgvw/lang/it-IT.rc similarity index 100% rename from reactos/dll/win32/shimgvw/lang/it-IT.rc rename to dll/win32/shimgvw/lang/it-IT.rc diff --git a/reactos/dll/win32/shimgvw/lang/lt-LT.rc b/dll/win32/shimgvw/lang/lt-LT.rc similarity index 100% rename from reactos/dll/win32/shimgvw/lang/lt-LT.rc rename to dll/win32/shimgvw/lang/lt-LT.rc diff --git a/reactos/dll/win32/shimgvw/lang/no-NO.rc b/dll/win32/shimgvw/lang/no-NO.rc similarity index 100% rename from reactos/dll/win32/shimgvw/lang/no-NO.rc rename to dll/win32/shimgvw/lang/no-NO.rc diff --git a/reactos/dll/win32/shimgvw/lang/pl-PL.rc b/dll/win32/shimgvw/lang/pl-PL.rc similarity index 100% rename from reactos/dll/win32/shimgvw/lang/pl-PL.rc rename to dll/win32/shimgvw/lang/pl-PL.rc diff --git a/reactos/dll/win32/shimgvw/lang/ro-RO.rc b/dll/win32/shimgvw/lang/ro-RO.rc similarity index 100% rename from reactos/dll/win32/shimgvw/lang/ro-RO.rc rename to dll/win32/shimgvw/lang/ro-RO.rc diff --git a/reactos/dll/win32/shimgvw/lang/ru-RU.rc b/dll/win32/shimgvw/lang/ru-RU.rc similarity index 100% rename from reactos/dll/win32/shimgvw/lang/ru-RU.rc rename to dll/win32/shimgvw/lang/ru-RU.rc diff --git a/reactos/dll/win32/shimgvw/lang/sk-SK.rc b/dll/win32/shimgvw/lang/sk-SK.rc similarity index 100% rename from reactos/dll/win32/shimgvw/lang/sk-SK.rc rename to dll/win32/shimgvw/lang/sk-SK.rc diff --git a/reactos/dll/win32/shimgvw/lang/uk-UA.rc b/dll/win32/shimgvw/lang/uk-UA.rc similarity index 100% rename from reactos/dll/win32/shimgvw/lang/uk-UA.rc rename to dll/win32/shimgvw/lang/uk-UA.rc diff --git a/reactos/dll/win32/shimgvw/res/main.ico b/dll/win32/shimgvw/res/main.ico similarity index 100% rename from reactos/dll/win32/shimgvw/res/main.ico rename to dll/win32/shimgvw/res/main.ico diff --git a/reactos/dll/win32/shimgvw/res/next.bmp b/dll/win32/shimgvw/res/next.bmp similarity index 100% rename from reactos/dll/win32/shimgvw/res/next.bmp rename to dll/win32/shimgvw/res/next.bmp diff --git a/reactos/dll/win32/shimgvw/res/prev.bmp b/dll/win32/shimgvw/res/prev.bmp similarity index 100% rename from reactos/dll/win32/shimgvw/res/prev.bmp rename to dll/win32/shimgvw/res/prev.bmp diff --git a/reactos/dll/win32/shimgvw/res/print.bmp b/dll/win32/shimgvw/res/print.bmp similarity index 100% rename from reactos/dll/win32/shimgvw/res/print.bmp rename to dll/win32/shimgvw/res/print.bmp diff --git a/reactos/dll/win32/shimgvw/res/rot1.bmp b/dll/win32/shimgvw/res/rot1.bmp similarity index 100% rename from reactos/dll/win32/shimgvw/res/rot1.bmp rename to dll/win32/shimgvw/res/rot1.bmp diff --git a/reactos/dll/win32/shimgvw/res/rot2.bmp b/dll/win32/shimgvw/res/rot2.bmp similarity index 100% rename from reactos/dll/win32/shimgvw/res/rot2.bmp rename to dll/win32/shimgvw/res/rot2.bmp diff --git a/reactos/dll/win32/shimgvw/res/save.bmp b/dll/win32/shimgvw/res/save.bmp similarity index 100% rename from reactos/dll/win32/shimgvw/res/save.bmp rename to dll/win32/shimgvw/res/save.bmp diff --git a/reactos/dll/win32/shimgvw/res/zoomm.bmp b/dll/win32/shimgvw/res/zoomm.bmp similarity index 100% rename from reactos/dll/win32/shimgvw/res/zoomm.bmp rename to dll/win32/shimgvw/res/zoomm.bmp diff --git a/reactos/dll/win32/shimgvw/res/zoomp.bmp b/dll/win32/shimgvw/res/zoomp.bmp similarity index 100% rename from reactos/dll/win32/shimgvw/res/zoomp.bmp rename to dll/win32/shimgvw/res/zoomp.bmp diff --git a/reactos/dll/win32/shimgvw/resource.h b/dll/win32/shimgvw/resource.h similarity index 100% rename from reactos/dll/win32/shimgvw/resource.h rename to dll/win32/shimgvw/resource.h diff --git a/reactos/dll/win32/shimgvw/rsrc.rc b/dll/win32/shimgvw/rsrc.rc similarity index 100% rename from reactos/dll/win32/shimgvw/rsrc.rc rename to dll/win32/shimgvw/rsrc.rc diff --git a/reactos/dll/win32/shimgvw/shimgvw.c b/dll/win32/shimgvw/shimgvw.c similarity index 100% rename from reactos/dll/win32/shimgvw/shimgvw.c rename to dll/win32/shimgvw/shimgvw.c diff --git a/reactos/dll/win32/shimgvw/shimgvw.h b/dll/win32/shimgvw/shimgvw.h similarity index 100% rename from reactos/dll/win32/shimgvw/shimgvw.h rename to dll/win32/shimgvw/shimgvw.h diff --git a/reactos/dll/win32/shimgvw/shimgvw.rbuild b/dll/win32/shimgvw/shimgvw.rbuild similarity index 100% rename from reactos/dll/win32/shimgvw/shimgvw.rbuild rename to dll/win32/shimgvw/shimgvw.rbuild diff --git a/reactos/dll/win32/shimgvw/shimgvw.rc b/dll/win32/shimgvw/shimgvw.rc similarity index 100% rename from reactos/dll/win32/shimgvw/shimgvw.rc rename to dll/win32/shimgvw/shimgvw.rc diff --git a/reactos/dll/win32/shimgvw/shimgvw.spec b/dll/win32/shimgvw/shimgvw.spec similarity index 100% rename from reactos/dll/win32/shimgvw/shimgvw.spec rename to dll/win32/shimgvw/shimgvw.spec diff --git a/reactos/dll/win32/shlwapi/CMakeLists.txt b/dll/win32/shlwapi/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/shlwapi/CMakeLists.txt rename to dll/win32/shlwapi/CMakeLists.txt diff --git a/reactos/dll/win32/shlwapi/assoc.c b/dll/win32/shlwapi/assoc.c similarity index 100% rename from reactos/dll/win32/shlwapi/assoc.c rename to dll/win32/shlwapi/assoc.c diff --git a/reactos/dll/win32/shlwapi/clist.c b/dll/win32/shlwapi/clist.c similarity index 100% rename from reactos/dll/win32/shlwapi/clist.c rename to dll/win32/shlwapi/clist.c diff --git a/reactos/dll/win32/shlwapi/istream.c b/dll/win32/shlwapi/istream.c similarity index 100% rename from reactos/dll/win32/shlwapi/istream.c rename to dll/win32/shlwapi/istream.c diff --git a/reactos/dll/win32/shlwapi/msgbox.c b/dll/win32/shlwapi/msgbox.c similarity index 100% rename from reactos/dll/win32/shlwapi/msgbox.c rename to dll/win32/shlwapi/msgbox.c diff --git a/reactos/dll/win32/shlwapi/ordinal.c b/dll/win32/shlwapi/ordinal.c similarity index 100% rename from reactos/dll/win32/shlwapi/ordinal.c rename to dll/win32/shlwapi/ordinal.c diff --git a/reactos/dll/win32/shlwapi/path.c b/dll/win32/shlwapi/path.c similarity index 100% rename from reactos/dll/win32/shlwapi/path.c rename to dll/win32/shlwapi/path.c diff --git a/reactos/dll/win32/shlwapi/reg.c b/dll/win32/shlwapi/reg.c similarity index 100% rename from reactos/dll/win32/shlwapi/reg.c rename to dll/win32/shlwapi/reg.c diff --git a/reactos/dll/win32/shlwapi/regstream.c b/dll/win32/shlwapi/regstream.c similarity index 100% rename from reactos/dll/win32/shlwapi/regstream.c rename to dll/win32/shlwapi/regstream.c diff --git a/reactos/dll/win32/shlwapi/resource.h b/dll/win32/shlwapi/resource.h similarity index 100% rename from reactos/dll/win32/shlwapi/resource.h rename to dll/win32/shlwapi/resource.h diff --git a/reactos/dll/win32/shlwapi/shlwapi.rbuild b/dll/win32/shlwapi/shlwapi.rbuild similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi.rbuild rename to dll/win32/shlwapi/shlwapi.rbuild diff --git a/reactos/dll/win32/shlwapi/shlwapi.rc b/dll/win32/shlwapi/shlwapi.rc similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi.rc rename to dll/win32/shlwapi/shlwapi.rc diff --git a/reactos/dll/win32/shlwapi/shlwapi.spec b/dll/win32/shlwapi/shlwapi.spec similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi.spec rename to dll/win32/shlwapi/shlwapi.spec diff --git a/reactos/dll/win32/shlwapi/shlwapi_Da.rc b/dll/win32/shlwapi/shlwapi_Da.rc similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi_Da.rc rename to dll/win32/shlwapi/shlwapi_Da.rc diff --git a/reactos/dll/win32/shlwapi/shlwapi_De.rc b/dll/win32/shlwapi/shlwapi_De.rc similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi_De.rc rename to dll/win32/shlwapi/shlwapi_De.rc diff --git a/reactos/dll/win32/shlwapi/shlwapi_En.rc b/dll/win32/shlwapi/shlwapi_En.rc similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi_En.rc rename to dll/win32/shlwapi/shlwapi_En.rc diff --git a/reactos/dll/win32/shlwapi/shlwapi_Es.rc b/dll/win32/shlwapi/shlwapi_Es.rc similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi_Es.rc rename to dll/win32/shlwapi/shlwapi_Es.rc diff --git a/reactos/dll/win32/shlwapi/shlwapi_Fi.rc b/dll/win32/shlwapi/shlwapi_Fi.rc similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi_Fi.rc rename to dll/win32/shlwapi/shlwapi_Fi.rc diff --git a/reactos/dll/win32/shlwapi/shlwapi_Fr.rc b/dll/win32/shlwapi/shlwapi_Fr.rc similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi_Fr.rc rename to dll/win32/shlwapi/shlwapi_Fr.rc diff --git a/reactos/dll/win32/shlwapi/shlwapi_Hu.rc b/dll/win32/shlwapi/shlwapi_Hu.rc similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi_Hu.rc rename to dll/win32/shlwapi/shlwapi_Hu.rc diff --git a/reactos/dll/win32/shlwapi/shlwapi_It.rc b/dll/win32/shlwapi/shlwapi_It.rc similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi_It.rc rename to dll/win32/shlwapi/shlwapi_It.rc diff --git a/reactos/dll/win32/shlwapi/shlwapi_Ja.rc b/dll/win32/shlwapi/shlwapi_Ja.rc similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi_Ja.rc rename to dll/win32/shlwapi/shlwapi_Ja.rc diff --git a/reactos/dll/win32/shlwapi/shlwapi_Ko.rc b/dll/win32/shlwapi/shlwapi_Ko.rc similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi_Ko.rc rename to dll/win32/shlwapi/shlwapi_Ko.rc diff --git a/reactos/dll/win32/shlwapi/shlwapi_Lt.rc b/dll/win32/shlwapi/shlwapi_Lt.rc similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi_Lt.rc rename to dll/win32/shlwapi/shlwapi_Lt.rc diff --git a/reactos/dll/win32/shlwapi/shlwapi_Nl.rc b/dll/win32/shlwapi/shlwapi_Nl.rc similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi_Nl.rc rename to dll/win32/shlwapi/shlwapi_Nl.rc diff --git a/reactos/dll/win32/shlwapi/shlwapi_No.rc b/dll/win32/shlwapi/shlwapi_No.rc similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi_No.rc rename to dll/win32/shlwapi/shlwapi_No.rc diff --git a/reactos/dll/win32/shlwapi/shlwapi_Pl.rc b/dll/win32/shlwapi/shlwapi_Pl.rc similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi_Pl.rc rename to dll/win32/shlwapi/shlwapi_Pl.rc diff --git a/reactos/dll/win32/shlwapi/shlwapi_Pt.rc b/dll/win32/shlwapi/shlwapi_Pt.rc similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi_Pt.rc rename to dll/win32/shlwapi/shlwapi_Pt.rc diff --git a/reactos/dll/win32/shlwapi/shlwapi_Ro.rc b/dll/win32/shlwapi/shlwapi_Ro.rc similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi_Ro.rc rename to dll/win32/shlwapi/shlwapi_Ro.rc diff --git a/reactos/dll/win32/shlwapi/shlwapi_Ru.rc b/dll/win32/shlwapi/shlwapi_Ru.rc similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi_Ru.rc rename to dll/win32/shlwapi/shlwapi_Ru.rc diff --git a/reactos/dll/win32/shlwapi/shlwapi_Si.rc b/dll/win32/shlwapi/shlwapi_Si.rc similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi_Si.rc rename to dll/win32/shlwapi/shlwapi_Si.rc diff --git a/reactos/dll/win32/shlwapi/shlwapi_Sk.rc b/dll/win32/shlwapi/shlwapi_Sk.rc similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi_Sk.rc rename to dll/win32/shlwapi/shlwapi_Sk.rc diff --git a/reactos/dll/win32/shlwapi/shlwapi_Sv.rc b/dll/win32/shlwapi/shlwapi_Sv.rc similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi_Sv.rc rename to dll/win32/shlwapi/shlwapi_Sv.rc diff --git a/reactos/dll/win32/shlwapi/shlwapi_Tr.rc b/dll/win32/shlwapi/shlwapi_Tr.rc similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi_Tr.rc rename to dll/win32/shlwapi/shlwapi_Tr.rc diff --git a/reactos/dll/win32/shlwapi/shlwapi_Uk.rc b/dll/win32/shlwapi/shlwapi_Uk.rc similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi_Uk.rc rename to dll/win32/shlwapi/shlwapi_Uk.rc diff --git a/reactos/dll/win32/shlwapi/shlwapi_Zh.rc b/dll/win32/shlwapi/shlwapi_Zh.rc similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi_Zh.rc rename to dll/win32/shlwapi/shlwapi_Zh.rc diff --git a/reactos/dll/win32/shlwapi/shlwapi_main.c b/dll/win32/shlwapi/shlwapi_main.c similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi_main.c rename to dll/win32/shlwapi/shlwapi_main.c diff --git a/reactos/dll/win32/shlwapi/shlwapi_ros.diff b/dll/win32/shlwapi/shlwapi_ros.diff similarity index 100% rename from reactos/dll/win32/shlwapi/shlwapi_ros.diff rename to dll/win32/shlwapi/shlwapi_ros.diff diff --git a/reactos/dll/win32/shlwapi/stopwatch.c b/dll/win32/shlwapi/stopwatch.c similarity index 100% rename from reactos/dll/win32/shlwapi/stopwatch.c rename to dll/win32/shlwapi/stopwatch.c diff --git a/reactos/dll/win32/shlwapi/string.c b/dll/win32/shlwapi/string.c similarity index 100% rename from reactos/dll/win32/shlwapi/string.c rename to dll/win32/shlwapi/string.c diff --git a/reactos/dll/win32/shlwapi/thread.c b/dll/win32/shlwapi/thread.c similarity index 100% rename from reactos/dll/win32/shlwapi/thread.c rename to dll/win32/shlwapi/thread.c diff --git a/reactos/dll/win32/shlwapi/url.c b/dll/win32/shlwapi/url.c similarity index 100% rename from reactos/dll/win32/shlwapi/url.c rename to dll/win32/shlwapi/url.c diff --git a/reactos/dll/win32/shlwapi/version.rc b/dll/win32/shlwapi/version.rc similarity index 100% rename from reactos/dll/win32/shlwapi/version.rc rename to dll/win32/shlwapi/version.rc diff --git a/reactos/dll/win32/shlwapi/wsprintf.c b/dll/win32/shlwapi/wsprintf.c similarity index 100% rename from reactos/dll/win32/shlwapi/wsprintf.c rename to dll/win32/shlwapi/wsprintf.c diff --git a/reactos/dll/win32/slbcsp/CMakeLists.txt b/dll/win32/slbcsp/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/slbcsp/CMakeLists.txt rename to dll/win32/slbcsp/CMakeLists.txt diff --git a/reactos/dll/win32/slbcsp/main.c b/dll/win32/slbcsp/main.c similarity index 100% rename from reactos/dll/win32/slbcsp/main.c rename to dll/win32/slbcsp/main.c diff --git a/reactos/dll/win32/slbcsp/slbcsp.rbuild b/dll/win32/slbcsp/slbcsp.rbuild similarity index 100% rename from reactos/dll/win32/slbcsp/slbcsp.rbuild rename to dll/win32/slbcsp/slbcsp.rbuild diff --git a/reactos/dll/win32/slbcsp/slbcsp.spec b/dll/win32/slbcsp/slbcsp.spec similarity index 100% rename from reactos/dll/win32/slbcsp/slbcsp.spec rename to dll/win32/slbcsp/slbcsp.spec diff --git a/reactos/dll/win32/smdll/CMakeLists.txt b/dll/win32/smdll/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/smdll/CMakeLists.txt rename to dll/win32/smdll/CMakeLists.txt diff --git a/reactos/dll/win32/smdll/dllmain.c b/dll/win32/smdll/dllmain.c similarity index 100% rename from reactos/dll/win32/smdll/dllmain.c rename to dll/win32/smdll/dllmain.c diff --git a/reactos/dll/win32/smdll/precomp.h b/dll/win32/smdll/precomp.h similarity index 100% rename from reactos/dll/win32/smdll/precomp.h rename to dll/win32/smdll/precomp.h diff --git a/reactos/dll/win32/smdll/query.c b/dll/win32/smdll/query.c similarity index 100% rename from reactos/dll/win32/smdll/query.c rename to dll/win32/smdll/query.c diff --git a/reactos/dll/win32/smdll/readme.txt b/dll/win32/smdll/readme.txt similarity index 100% rename from reactos/dll/win32/smdll/readme.txt rename to dll/win32/smdll/readme.txt diff --git a/reactos/dll/win32/smdll/smdll.rbuild b/dll/win32/smdll/smdll.rbuild similarity index 100% rename from reactos/dll/win32/smdll/smdll.rbuild rename to dll/win32/smdll/smdll.rbuild diff --git a/reactos/dll/win32/smdll/smdll.rc b/dll/win32/smdll/smdll.rc similarity index 100% rename from reactos/dll/win32/smdll/smdll.rc rename to dll/win32/smdll/smdll.rc diff --git a/reactos/dll/win32/smdll/smdll.spec b/dll/win32/smdll/smdll.spec similarity index 100% rename from reactos/dll/win32/smdll/smdll.spec rename to dll/win32/smdll/smdll.spec diff --git a/reactos/dll/win32/sndblst/CMakeLists.txt b/dll/win32/sndblst/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/sndblst/CMakeLists.txt rename to dll/win32/sndblst/CMakeLists.txt diff --git a/reactos/dll/win32/sndblst/sndblst.c b/dll/win32/sndblst/sndblst.c similarity index 100% rename from reactos/dll/win32/sndblst/sndblst.c rename to dll/win32/sndblst/sndblst.c diff --git a/reactos/dll/win32/sndblst/sndblst.rbuild b/dll/win32/sndblst/sndblst.rbuild similarity index 100% rename from reactos/dll/win32/sndblst/sndblst.rbuild rename to dll/win32/sndblst/sndblst.rbuild diff --git a/reactos/dll/win32/sndblst/sndblst.spec b/dll/win32/sndblst/sndblst.spec similarity index 100% rename from reactos/dll/win32/sndblst/sndblst.spec rename to dll/win32/sndblst/sndblst.spec diff --git a/reactos/dll/win32/snmpapi/CMakeLists.txt b/dll/win32/snmpapi/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/snmpapi/CMakeLists.txt rename to dll/win32/snmpapi/CMakeLists.txt diff --git a/reactos/dll/win32/snmpapi/main.c b/dll/win32/snmpapi/main.c similarity index 100% rename from reactos/dll/win32/snmpapi/main.c rename to dll/win32/snmpapi/main.c diff --git a/reactos/dll/win32/snmpapi/snmpapi.rbuild b/dll/win32/snmpapi/snmpapi.rbuild similarity index 100% rename from reactos/dll/win32/snmpapi/snmpapi.rbuild rename to dll/win32/snmpapi/snmpapi.rbuild diff --git a/reactos/dll/win32/snmpapi/snmpapi.rc b/dll/win32/snmpapi/snmpapi.rc similarity index 100% rename from reactos/dll/win32/snmpapi/snmpapi.rc rename to dll/win32/snmpapi/snmpapi.rc diff --git a/reactos/dll/win32/snmpapi/snmpapi.spec b/dll/win32/snmpapi/snmpapi.spec similarity index 100% rename from reactos/dll/win32/snmpapi/snmpapi.spec rename to dll/win32/snmpapi/snmpapi.spec diff --git a/reactos/dll/win32/softpub/CMakeLists.txt b/dll/win32/softpub/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/softpub/CMakeLists.txt rename to dll/win32/softpub/CMakeLists.txt diff --git a/reactos/dll/win32/softpub/softpub.rbuild b/dll/win32/softpub/softpub.rbuild similarity index 100% rename from reactos/dll/win32/softpub/softpub.rbuild rename to dll/win32/softpub/softpub.rbuild diff --git a/reactos/dll/win32/softpub/softpub.rc b/dll/win32/softpub/softpub.rc similarity index 100% rename from reactos/dll/win32/softpub/softpub.rc rename to dll/win32/softpub/softpub.rc diff --git a/reactos/dll/win32/softpub/softpub.spec b/dll/win32/softpub/softpub.spec similarity index 100% rename from reactos/dll/win32/softpub/softpub.spec rename to dll/win32/softpub/softpub.spec diff --git a/reactos/dll/win32/spoolss/CMakeLists.txt b/dll/win32/spoolss/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/spoolss/CMakeLists.txt rename to dll/win32/spoolss/CMakeLists.txt diff --git a/reactos/dll/win32/spoolss/router.c b/dll/win32/spoolss/router.c similarity index 100% rename from reactos/dll/win32/spoolss/router.c rename to dll/win32/spoolss/router.c diff --git a/reactos/dll/win32/spoolss/spoolss.h b/dll/win32/spoolss/spoolss.h similarity index 100% rename from reactos/dll/win32/spoolss/spoolss.h rename to dll/win32/spoolss/spoolss.h diff --git a/reactos/dll/win32/spoolss/spoolss.rbuild b/dll/win32/spoolss/spoolss.rbuild similarity index 100% rename from reactos/dll/win32/spoolss/spoolss.rbuild rename to dll/win32/spoolss/spoolss.rbuild diff --git a/reactos/dll/win32/spoolss/spoolss.spec b/dll/win32/spoolss/spoolss.spec similarity index 100% rename from reactos/dll/win32/spoolss/spoolss.spec rename to dll/win32/spoolss/spoolss.spec diff --git a/reactos/dll/win32/spoolss/spoolss_main.c b/dll/win32/spoolss/spoolss_main.c similarity index 100% rename from reactos/dll/win32/spoolss/spoolss_main.c rename to dll/win32/spoolss/spoolss_main.c diff --git a/reactos/dll/win32/srclient/CMakeLists.txt b/dll/win32/srclient/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/srclient/CMakeLists.txt rename to dll/win32/srclient/CMakeLists.txt diff --git a/reactos/dll/win32/srclient/srclient.rbuild b/dll/win32/srclient/srclient.rbuild similarity index 100% rename from reactos/dll/win32/srclient/srclient.rbuild rename to dll/win32/srclient/srclient.rbuild diff --git a/reactos/dll/win32/srclient/srclient.spec b/dll/win32/srclient/srclient.spec similarity index 100% rename from reactos/dll/win32/srclient/srclient.spec rename to dll/win32/srclient/srclient.spec diff --git a/reactos/dll/win32/srclient/srclient_main.c b/dll/win32/srclient/srclient_main.c similarity index 100% rename from reactos/dll/win32/srclient/srclient_main.c rename to dll/win32/srclient/srclient_main.c diff --git a/reactos/dll/win32/stdole2.tlb/CMakeLists.txt b/dll/win32/stdole2.tlb/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/stdole2.tlb/CMakeLists.txt rename to dll/win32/stdole2.tlb/CMakeLists.txt diff --git a/reactos/dll/win32/stdole2.tlb/rsrc.rc b/dll/win32/stdole2.tlb/rsrc.rc similarity index 100% rename from reactos/dll/win32/stdole2.tlb/rsrc.rc rename to dll/win32/stdole2.tlb/rsrc.rc diff --git a/reactos/dll/win32/stdole2.tlb/std_ole_v2.idl b/dll/win32/stdole2.tlb/std_ole_v2.idl similarity index 100% rename from reactos/dll/win32/stdole2.tlb/std_ole_v2.idl rename to dll/win32/stdole2.tlb/std_ole_v2.idl diff --git a/reactos/dll/win32/stdole2.tlb/stdole2.rbuild b/dll/win32/stdole2.tlb/stdole2.rbuild similarity index 100% rename from reactos/dll/win32/stdole2.tlb/stdole2.rbuild rename to dll/win32/stdole2.tlb/stdole2.rbuild diff --git a/reactos/dll/win32/stdole2.tlb/stdole2.tlb.spec b/dll/win32/stdole2.tlb/stdole2.tlb.spec similarity index 100% rename from reactos/dll/win32/stdole2.tlb/stdole2.tlb.spec rename to dll/win32/stdole2.tlb/stdole2.tlb.spec diff --git a/reactos/dll/win32/stdole32.tlb/CMakeLists.txt b/dll/win32/stdole32.tlb/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/stdole32.tlb/CMakeLists.txt rename to dll/win32/stdole32.tlb/CMakeLists.txt diff --git a/reactos/dll/win32/stdole32.tlb/rsrc.rc b/dll/win32/stdole32.tlb/rsrc.rc similarity index 100% rename from reactos/dll/win32/stdole32.tlb/rsrc.rc rename to dll/win32/stdole32.tlb/rsrc.rc diff --git a/reactos/dll/win32/stdole32.tlb/std_ole_v1.idl b/dll/win32/stdole32.tlb/std_ole_v1.idl similarity index 100% rename from reactos/dll/win32/stdole32.tlb/std_ole_v1.idl rename to dll/win32/stdole32.tlb/std_ole_v1.idl diff --git a/reactos/dll/win32/stdole32.tlb/stdole32.rbuild b/dll/win32/stdole32.tlb/stdole32.rbuild similarity index 100% rename from reactos/dll/win32/stdole32.tlb/stdole32.rbuild rename to dll/win32/stdole32.tlb/stdole32.rbuild diff --git a/reactos/dll/win32/stdole32.tlb/stdole32.tlb.spec b/dll/win32/stdole32.tlb/stdole32.tlb.spec similarity index 100% rename from reactos/dll/win32/stdole32.tlb/stdole32.tlb.spec rename to dll/win32/stdole32.tlb/stdole32.tlb.spec diff --git a/reactos/dll/win32/sti/CMakeLists.txt b/dll/win32/sti/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/sti/CMakeLists.txt rename to dll/win32/sti/CMakeLists.txt diff --git a/reactos/dll/win32/sti/regsvr.c b/dll/win32/sti/regsvr.c similarity index 100% rename from reactos/dll/win32/sti/regsvr.c rename to dll/win32/sti/regsvr.c diff --git a/reactos/dll/win32/sti/sti.c b/dll/win32/sti/sti.c similarity index 100% rename from reactos/dll/win32/sti/sti.c rename to dll/win32/sti/sti.c diff --git a/reactos/dll/win32/sti/sti.rbuild b/dll/win32/sti/sti.rbuild similarity index 100% rename from reactos/dll/win32/sti/sti.rbuild rename to dll/win32/sti/sti.rbuild diff --git a/reactos/dll/win32/sti/sti.spec b/dll/win32/sti/sti.spec similarity index 100% rename from reactos/dll/win32/sti/sti.spec rename to dll/win32/sti/sti.spec diff --git a/reactos/dll/win32/sti/sti_main.c b/dll/win32/sti/sti_main.c similarity index 100% rename from reactos/dll/win32/sti/sti_main.c rename to dll/win32/sti/sti_main.c diff --git a/reactos/dll/win32/sti/sti_private.h b/dll/win32/sti/sti_private.h similarity index 100% rename from reactos/dll/win32/sti/sti_private.h rename to dll/win32/sti/sti_private.h diff --git a/reactos/dll/win32/sti/sti_wia.idl b/dll/win32/sti/sti_wia.idl similarity index 100% rename from reactos/dll/win32/sti/sti_wia.idl rename to dll/win32/sti/sti_wia.idl diff --git a/reactos/dll/win32/sxs/CMakeLists.txt b/dll/win32/sxs/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/sxs/CMakeLists.txt rename to dll/win32/sxs/CMakeLists.txt diff --git a/reactos/dll/win32/sxs/sxs.c b/dll/win32/sxs/sxs.c similarity index 100% rename from reactos/dll/win32/sxs/sxs.c rename to dll/win32/sxs/sxs.c diff --git a/reactos/dll/win32/sxs/sxs.rbuild b/dll/win32/sxs/sxs.rbuild similarity index 100% rename from reactos/dll/win32/sxs/sxs.rbuild rename to dll/win32/sxs/sxs.rbuild diff --git a/reactos/dll/win32/sxs/sxs.spec b/dll/win32/sxs/sxs.spec similarity index 100% rename from reactos/dll/win32/sxs/sxs.spec rename to dll/win32/sxs/sxs.spec diff --git a/reactos/dll/win32/syssetup/CMakeLists.txt b/dll/win32/syssetup/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/syssetup/CMakeLists.txt rename to dll/win32/syssetup/CMakeLists.txt diff --git a/reactos/dll/win32/syssetup/COPYING b/dll/win32/syssetup/COPYING similarity index 100% rename from reactos/dll/win32/syssetup/COPYING rename to dll/win32/syssetup/COPYING diff --git a/reactos/dll/win32/syssetup/classinst.c b/dll/win32/syssetup/classinst.c similarity index 100% rename from reactos/dll/win32/syssetup/classinst.c rename to dll/win32/syssetup/classinst.c diff --git a/reactos/dll/win32/syssetup/dllmain.c b/dll/win32/syssetup/dllmain.c similarity index 100% rename from reactos/dll/win32/syssetup/dllmain.c rename to dll/win32/syssetup/dllmain.c diff --git a/reactos/dll/win32/syssetup/globals.h b/dll/win32/syssetup/globals.h similarity index 100% rename from reactos/dll/win32/syssetup/globals.h rename to dll/win32/syssetup/globals.h diff --git a/reactos/dll/win32/syssetup/install.c b/dll/win32/syssetup/install.c similarity index 100% rename from reactos/dll/win32/syssetup/install.c rename to dll/win32/syssetup/install.c diff --git a/reactos/dll/win32/syssetup/lang/bg-BG.rc b/dll/win32/syssetup/lang/bg-BG.rc similarity index 100% rename from reactos/dll/win32/syssetup/lang/bg-BG.rc rename to dll/win32/syssetup/lang/bg-BG.rc diff --git a/reactos/dll/win32/syssetup/lang/cs-CZ.rc b/dll/win32/syssetup/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/win32/syssetup/lang/cs-CZ.rc rename to dll/win32/syssetup/lang/cs-CZ.rc diff --git a/reactos/dll/win32/syssetup/lang/de-DE.rc b/dll/win32/syssetup/lang/de-DE.rc similarity index 100% rename from reactos/dll/win32/syssetup/lang/de-DE.rc rename to dll/win32/syssetup/lang/de-DE.rc diff --git a/reactos/dll/win32/syssetup/lang/el-GR.rc b/dll/win32/syssetup/lang/el-GR.rc similarity index 100% rename from reactos/dll/win32/syssetup/lang/el-GR.rc rename to dll/win32/syssetup/lang/el-GR.rc diff --git a/reactos/dll/win32/syssetup/lang/en-US.rc b/dll/win32/syssetup/lang/en-US.rc similarity index 100% rename from reactos/dll/win32/syssetup/lang/en-US.rc rename to dll/win32/syssetup/lang/en-US.rc diff --git a/reactos/dll/win32/syssetup/lang/es-ES.rc b/dll/win32/syssetup/lang/es-ES.rc similarity index 100% rename from reactos/dll/win32/syssetup/lang/es-ES.rc rename to dll/win32/syssetup/lang/es-ES.rc diff --git a/reactos/dll/win32/syssetup/lang/et-EE.rc b/dll/win32/syssetup/lang/et-EE.rc similarity index 100% rename from reactos/dll/win32/syssetup/lang/et-EE.rc rename to dll/win32/syssetup/lang/et-EE.rc diff --git a/reactos/dll/win32/syssetup/lang/fr-FR.rc b/dll/win32/syssetup/lang/fr-FR.rc similarity index 100% rename from reactos/dll/win32/syssetup/lang/fr-FR.rc rename to dll/win32/syssetup/lang/fr-FR.rc diff --git a/reactos/dll/win32/syssetup/lang/hu-HU.rc b/dll/win32/syssetup/lang/hu-HU.rc similarity index 100% rename from reactos/dll/win32/syssetup/lang/hu-HU.rc rename to dll/win32/syssetup/lang/hu-HU.rc diff --git a/reactos/dll/win32/syssetup/lang/id-ID.rc b/dll/win32/syssetup/lang/id-ID.rc similarity index 100% rename from reactos/dll/win32/syssetup/lang/id-ID.rc rename to dll/win32/syssetup/lang/id-ID.rc diff --git a/reactos/dll/win32/syssetup/lang/it-IT.rc b/dll/win32/syssetup/lang/it-IT.rc similarity index 100% rename from reactos/dll/win32/syssetup/lang/it-IT.rc rename to dll/win32/syssetup/lang/it-IT.rc diff --git a/reactos/dll/win32/syssetup/lang/ja-JP.rc b/dll/win32/syssetup/lang/ja-JP.rc similarity index 100% rename from reactos/dll/win32/syssetup/lang/ja-JP.rc rename to dll/win32/syssetup/lang/ja-JP.rc diff --git a/reactos/dll/win32/syssetup/lang/nl-NL.rc b/dll/win32/syssetup/lang/nl-NL.rc similarity index 100% rename from reactos/dll/win32/syssetup/lang/nl-NL.rc rename to dll/win32/syssetup/lang/nl-NL.rc diff --git a/reactos/dll/win32/syssetup/lang/no-NO.rc b/dll/win32/syssetup/lang/no-NO.rc similarity index 100% rename from reactos/dll/win32/syssetup/lang/no-NO.rc rename to dll/win32/syssetup/lang/no-NO.rc diff --git a/reactos/dll/win32/syssetup/lang/pl-PL.rc b/dll/win32/syssetup/lang/pl-PL.rc similarity index 100% rename from reactos/dll/win32/syssetup/lang/pl-PL.rc rename to dll/win32/syssetup/lang/pl-PL.rc diff --git a/reactos/dll/win32/syssetup/lang/pt-BR.rc b/dll/win32/syssetup/lang/pt-BR.rc similarity index 100% rename from reactos/dll/win32/syssetup/lang/pt-BR.rc rename to dll/win32/syssetup/lang/pt-BR.rc diff --git a/reactos/dll/win32/syssetup/lang/ro-RO.rc b/dll/win32/syssetup/lang/ro-RO.rc similarity index 100% rename from reactos/dll/win32/syssetup/lang/ro-RO.rc rename to dll/win32/syssetup/lang/ro-RO.rc diff --git a/reactos/dll/win32/syssetup/lang/ru-RU.rc b/dll/win32/syssetup/lang/ru-RU.rc similarity index 100% rename from reactos/dll/win32/syssetup/lang/ru-RU.rc rename to dll/win32/syssetup/lang/ru-RU.rc diff --git a/reactos/dll/win32/syssetup/lang/sk-SK.rc b/dll/win32/syssetup/lang/sk-SK.rc similarity index 100% rename from reactos/dll/win32/syssetup/lang/sk-SK.rc rename to dll/win32/syssetup/lang/sk-SK.rc diff --git a/reactos/dll/win32/syssetup/lang/uk-UA.rc b/dll/win32/syssetup/lang/uk-UA.rc similarity index 100% rename from reactos/dll/win32/syssetup/lang/uk-UA.rc rename to dll/win32/syssetup/lang/uk-UA.rc diff --git a/reactos/dll/win32/syssetup/lang/zh-CN.rc b/dll/win32/syssetup/lang/zh-CN.rc similarity index 100% rename from reactos/dll/win32/syssetup/lang/zh-CN.rc rename to dll/win32/syssetup/lang/zh-CN.rc diff --git a/reactos/dll/win32/syssetup/logfile.c b/dll/win32/syssetup/logfile.c similarity index 100% rename from reactos/dll/win32/syssetup/logfile.c rename to dll/win32/syssetup/logfile.c diff --git a/reactos/dll/win32/syssetup/precomp.h b/dll/win32/syssetup/precomp.h similarity index 100% rename from reactos/dll/win32/syssetup/precomp.h rename to dll/win32/syssetup/precomp.h diff --git a/reactos/dll/win32/syssetup/resource.h b/dll/win32/syssetup/resource.h similarity index 100% rename from reactos/dll/win32/syssetup/resource.h rename to dll/win32/syssetup/resource.h diff --git a/reactos/dll/win32/syssetup/resources/1.ico b/dll/win32/syssetup/resources/1.ico similarity index 100% rename from reactos/dll/win32/syssetup/resources/1.ico rename to dll/win32/syssetup/resources/1.ico diff --git a/reactos/dll/win32/syssetup/resources/2.ico b/dll/win32/syssetup/resources/2.ico similarity index 100% rename from reactos/dll/win32/syssetup/resources/2.ico rename to dll/win32/syssetup/resources/2.ico diff --git a/reactos/dll/win32/syssetup/resources/3.ico b/dll/win32/syssetup/resources/3.ico similarity index 100% rename from reactos/dll/win32/syssetup/resources/3.ico rename to dll/win32/syssetup/resources/3.ico diff --git a/reactos/dll/win32/syssetup/resources/4.ico b/dll/win32/syssetup/resources/4.ico similarity index 100% rename from reactos/dll/win32/syssetup/resources/4.ico rename to dll/win32/syssetup/resources/4.ico diff --git a/reactos/dll/win32/syssetup/resources/5.ico b/dll/win32/syssetup/resources/5.ico similarity index 100% rename from reactos/dll/win32/syssetup/resources/5.ico rename to dll/win32/syssetup/resources/5.ico diff --git a/reactos/dll/win32/syssetup/resources/header.bmp b/dll/win32/syssetup/resources/header.bmp similarity index 100% rename from reactos/dll/win32/syssetup/resources/header.bmp rename to dll/win32/syssetup/resources/header.bmp diff --git a/reactos/dll/win32/syssetup/resources/watermark.bmp b/dll/win32/syssetup/resources/watermark.bmp similarity index 100% rename from reactos/dll/win32/syssetup/resources/watermark.bmp rename to dll/win32/syssetup/resources/watermark.bmp diff --git a/reactos/dll/win32/syssetup/syssetup.rbuild b/dll/win32/syssetup/syssetup.rbuild similarity index 100% rename from reactos/dll/win32/syssetup/syssetup.rbuild rename to dll/win32/syssetup/syssetup.rbuild diff --git a/reactos/dll/win32/syssetup/syssetup.rc b/dll/win32/syssetup/syssetup.rc similarity index 100% rename from reactos/dll/win32/syssetup/syssetup.rc rename to dll/win32/syssetup/syssetup.rc diff --git a/reactos/dll/win32/syssetup/syssetup.spec b/dll/win32/syssetup/syssetup.spec similarity index 100% rename from reactos/dll/win32/syssetup/syssetup.spec rename to dll/win32/syssetup/syssetup.spec diff --git a/reactos/dll/win32/syssetup/wizard.c b/dll/win32/syssetup/wizard.c similarity index 100% rename from reactos/dll/win32/syssetup/wizard.c rename to dll/win32/syssetup/wizard.c diff --git a/reactos/dll/win32/t2embed/CMakeLists.txt b/dll/win32/t2embed/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/t2embed/CMakeLists.txt rename to dll/win32/t2embed/CMakeLists.txt diff --git a/reactos/dll/win32/t2embed/t2embed.c b/dll/win32/t2embed/t2embed.c similarity index 100% rename from reactos/dll/win32/t2embed/t2embed.c rename to dll/win32/t2embed/t2embed.c diff --git a/reactos/dll/win32/t2embed/t2embed.rbuild b/dll/win32/t2embed/t2embed.rbuild similarity index 100% rename from reactos/dll/win32/t2embed/t2embed.rbuild rename to dll/win32/t2embed/t2embed.rbuild diff --git a/reactos/dll/win32/t2embed/t2embed.rc b/dll/win32/t2embed/t2embed.rc similarity index 100% rename from reactos/dll/win32/t2embed/t2embed.rc rename to dll/win32/t2embed/t2embed.rc diff --git a/reactos/dll/win32/t2embed/t2embed.spec b/dll/win32/t2embed/t2embed.spec similarity index 100% rename from reactos/dll/win32/t2embed/t2embed.spec rename to dll/win32/t2embed/t2embed.spec diff --git a/reactos/dll/win32/tapi32/CMakeLists.txt b/dll/win32/tapi32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/tapi32/CMakeLists.txt rename to dll/win32/tapi32/CMakeLists.txt diff --git a/reactos/dll/win32/tapi32/assisted.c b/dll/win32/tapi32/assisted.c similarity index 100% rename from reactos/dll/win32/tapi32/assisted.c rename to dll/win32/tapi32/assisted.c diff --git a/reactos/dll/win32/tapi32/internal.c b/dll/win32/tapi32/internal.c similarity index 100% rename from reactos/dll/win32/tapi32/internal.c rename to dll/win32/tapi32/internal.c diff --git a/reactos/dll/win32/tapi32/line.c b/dll/win32/tapi32/line.c similarity index 100% rename from reactos/dll/win32/tapi32/line.c rename to dll/win32/tapi32/line.c diff --git a/reactos/dll/win32/tapi32/phone.c b/dll/win32/tapi32/phone.c similarity index 100% rename from reactos/dll/win32/tapi32/phone.c rename to dll/win32/tapi32/phone.c diff --git a/reactos/dll/win32/tapi32/tapi32.rbuild b/dll/win32/tapi32/tapi32.rbuild similarity index 100% rename from reactos/dll/win32/tapi32/tapi32.rbuild rename to dll/win32/tapi32/tapi32.rbuild diff --git a/reactos/dll/win32/tapi32/tapi32.spec b/dll/win32/tapi32/tapi32.spec similarity index 100% rename from reactos/dll/win32/tapi32/tapi32.spec rename to dll/win32/tapi32/tapi32.spec diff --git a/reactos/dll/win32/tapiui/CMakeLists.txt b/dll/win32/tapiui/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/tapiui/CMakeLists.txt rename to dll/win32/tapiui/CMakeLists.txt diff --git a/reactos/dll/win32/tapiui/lang/de-DE.rc b/dll/win32/tapiui/lang/de-DE.rc similarity index 100% rename from reactos/dll/win32/tapiui/lang/de-DE.rc rename to dll/win32/tapiui/lang/de-DE.rc diff --git a/reactos/dll/win32/tapiui/lang/en-US.rc b/dll/win32/tapiui/lang/en-US.rc similarity index 100% rename from reactos/dll/win32/tapiui/lang/en-US.rc rename to dll/win32/tapiui/lang/en-US.rc diff --git a/reactos/dll/win32/tapiui/lang/no-NO.rc b/dll/win32/tapiui/lang/no-NO.rc similarity index 100% rename from reactos/dll/win32/tapiui/lang/no-NO.rc rename to dll/win32/tapiui/lang/no-NO.rc diff --git a/reactos/dll/win32/tapiui/lang/pl-PL.rc b/dll/win32/tapiui/lang/pl-PL.rc similarity index 100% rename from reactos/dll/win32/tapiui/lang/pl-PL.rc rename to dll/win32/tapiui/lang/pl-PL.rc diff --git a/reactos/dll/win32/tapiui/lang/ro-RO.rc b/dll/win32/tapiui/lang/ro-RO.rc similarity index 100% rename from reactos/dll/win32/tapiui/lang/ro-RO.rc rename to dll/win32/tapiui/lang/ro-RO.rc diff --git a/reactos/dll/win32/tapiui/lang/ru-RU.rc b/dll/win32/tapiui/lang/ru-RU.rc similarity index 100% rename from reactos/dll/win32/tapiui/lang/ru-RU.rc rename to dll/win32/tapiui/lang/ru-RU.rc diff --git a/reactos/dll/win32/tapiui/lang/uk-UA.rc b/dll/win32/tapiui/lang/uk-UA.rc similarity index 100% rename from reactos/dll/win32/tapiui/lang/uk-UA.rc rename to dll/win32/tapiui/lang/uk-UA.rc diff --git a/reactos/dll/win32/tapiui/res/201.ico b/dll/win32/tapiui/res/201.ico similarity index 100% rename from reactos/dll/win32/tapiui/res/201.ico rename to dll/win32/tapiui/res/201.ico diff --git a/reactos/dll/win32/tapiui/res/202.ico b/dll/win32/tapiui/res/202.ico similarity index 100% rename from reactos/dll/win32/tapiui/res/202.ico rename to dll/win32/tapiui/res/202.ico diff --git a/reactos/dll/win32/tapiui/res/203.ico b/dll/win32/tapiui/res/203.ico similarity index 100% rename from reactos/dll/win32/tapiui/res/203.ico rename to dll/win32/tapiui/res/203.ico diff --git a/reactos/dll/win32/tapiui/res/301.bmp b/dll/win32/tapiui/res/301.bmp similarity index 100% rename from reactos/dll/win32/tapiui/res/301.bmp rename to dll/win32/tapiui/res/301.bmp diff --git a/reactos/dll/win32/tapiui/res/302.bmp b/dll/win32/tapiui/res/302.bmp similarity index 100% rename from reactos/dll/win32/tapiui/res/302.bmp rename to dll/win32/tapiui/res/302.bmp diff --git a/reactos/dll/win32/tapiui/res/504.ico b/dll/win32/tapiui/res/504.ico similarity index 100% rename from reactos/dll/win32/tapiui/res/504.ico rename to dll/win32/tapiui/res/504.ico diff --git a/reactos/dll/win32/tapiui/resource.h b/dll/win32/tapiui/resource.h similarity index 100% rename from reactos/dll/win32/tapiui/resource.h rename to dll/win32/tapiui/resource.h diff --git a/reactos/dll/win32/tapiui/tapiui.rbuild b/dll/win32/tapiui/tapiui.rbuild similarity index 100% rename from reactos/dll/win32/tapiui/tapiui.rbuild rename to dll/win32/tapiui/tapiui.rbuild diff --git a/reactos/dll/win32/tapiui/tapiui.rc b/dll/win32/tapiui/tapiui.rc similarity index 100% rename from reactos/dll/win32/tapiui/tapiui.rc rename to dll/win32/tapiui/tapiui.rc diff --git a/reactos/dll/win32/traffic/CMakeLists.txt b/dll/win32/traffic/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/traffic/CMakeLists.txt rename to dll/win32/traffic/CMakeLists.txt diff --git a/reactos/dll/win32/traffic/traffic.rbuild b/dll/win32/traffic/traffic.rbuild similarity index 100% rename from reactos/dll/win32/traffic/traffic.rbuild rename to dll/win32/traffic/traffic.rbuild diff --git a/reactos/dll/win32/traffic/traffic.spec b/dll/win32/traffic/traffic.spec similarity index 100% rename from reactos/dll/win32/traffic/traffic.spec rename to dll/win32/traffic/traffic.spec diff --git a/reactos/dll/win32/traffic/traffic_main.c b/dll/win32/traffic/traffic_main.c similarity index 100% rename from reactos/dll/win32/traffic/traffic_main.c rename to dll/win32/traffic/traffic_main.c diff --git a/reactos/dll/win32/twain_32/CMakeLists.txt b/dll/win32/twain_32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/twain_32/CMakeLists.txt rename to dll/win32/twain_32/CMakeLists.txt diff --git a/reactos/dll/win32/twain_32/README b/dll/win32/twain_32/README similarity index 100% rename from reactos/dll/win32/twain_32/README rename to dll/win32/twain_32/README diff --git a/reactos/dll/win32/twain_32/TWAIN b/dll/win32/twain_32/TWAIN similarity index 100% rename from reactos/dll/win32/twain_32/TWAIN rename to dll/win32/twain_32/TWAIN diff --git a/reactos/dll/win32/twain_32/capability.c b/dll/win32/twain_32/capability.c similarity index 100% rename from reactos/dll/win32/twain_32/capability.c rename to dll/win32/twain_32/capability.c diff --git a/reactos/dll/win32/twain_32/ds_audio.c b/dll/win32/twain_32/ds_audio.c similarity index 100% rename from reactos/dll/win32/twain_32/ds_audio.c rename to dll/win32/twain_32/ds_audio.c diff --git a/reactos/dll/win32/twain_32/ds_ctrl.c b/dll/win32/twain_32/ds_ctrl.c similarity index 100% rename from reactos/dll/win32/twain_32/ds_ctrl.c rename to dll/win32/twain_32/ds_ctrl.c diff --git a/reactos/dll/win32/twain_32/ds_image.c b/dll/win32/twain_32/ds_image.c similarity index 100% rename from reactos/dll/win32/twain_32/ds_image.c rename to dll/win32/twain_32/ds_image.c diff --git a/reactos/dll/win32/twain_32/dsm_ctrl.c b/dll/win32/twain_32/dsm_ctrl.c similarity index 100% rename from reactos/dll/win32/twain_32/dsm_ctrl.c rename to dll/win32/twain_32/dsm_ctrl.c diff --git a/reactos/dll/win32/twain_32/twain.h b/dll/win32/twain_32/twain.h similarity index 100% rename from reactos/dll/win32/twain_32/twain.h rename to dll/win32/twain_32/twain.h diff --git a/reactos/dll/win32/twain_32/twain32_main.c b/dll/win32/twain_32/twain32_main.c similarity index 100% rename from reactos/dll/win32/twain_32/twain32_main.c rename to dll/win32/twain_32/twain32_main.c diff --git a/reactos/dll/win32/twain_32/twain_32.rbuild b/dll/win32/twain_32/twain_32.rbuild similarity index 100% rename from reactos/dll/win32/twain_32/twain_32.rbuild rename to dll/win32/twain_32/twain_32.rbuild diff --git a/reactos/dll/win32/twain_32/twain_32.rc b/dll/win32/twain_32/twain_32.rc similarity index 100% rename from reactos/dll/win32/twain_32/twain_32.rc rename to dll/win32/twain_32/twain_32.rc diff --git a/reactos/dll/win32/twain_32/twain_32.spec b/dll/win32/twain_32/twain_32.spec similarity index 100% rename from reactos/dll/win32/twain_32/twain_32.spec rename to dll/win32/twain_32/twain_32.spec diff --git a/reactos/dll/win32/twain_32/twain_i.h b/dll/win32/twain_32/twain_i.h similarity index 100% rename from reactos/dll/win32/twain_32/twain_i.h rename to dll/win32/twain_32/twain_i.h diff --git a/reactos/dll/win32/uext2/CMakeLists.txt b/dll/win32/uext2/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/uext2/CMakeLists.txt rename to dll/win32/uext2/CMakeLists.txt diff --git a/reactos/dll/win32/uext2/uext2.c b/dll/win32/uext2/uext2.c similarity index 100% rename from reactos/dll/win32/uext2/uext2.c rename to dll/win32/uext2/uext2.c diff --git a/reactos/dll/win32/uext2/uext2.rbuild b/dll/win32/uext2/uext2.rbuild similarity index 100% rename from reactos/dll/win32/uext2/uext2.rbuild rename to dll/win32/uext2/uext2.rbuild diff --git a/reactos/dll/win32/uext2/uext2.rc b/dll/win32/uext2/uext2.rc similarity index 100% rename from reactos/dll/win32/uext2/uext2.rc rename to dll/win32/uext2/uext2.rc diff --git a/reactos/dll/win32/uext2/uext2.spec b/dll/win32/uext2/uext2.spec similarity index 100% rename from reactos/dll/win32/uext2/uext2.spec rename to dll/win32/uext2/uext2.spec diff --git a/reactos/dll/win32/ufat/CMakeLists.txt b/dll/win32/ufat/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/ufat/CMakeLists.txt rename to dll/win32/ufat/CMakeLists.txt diff --git a/reactos/dll/win32/ufat/ufat.c b/dll/win32/ufat/ufat.c similarity index 100% rename from reactos/dll/win32/ufat/ufat.c rename to dll/win32/ufat/ufat.c diff --git a/reactos/dll/win32/ufat/ufat.rbuild b/dll/win32/ufat/ufat.rbuild similarity index 100% rename from reactos/dll/win32/ufat/ufat.rbuild rename to dll/win32/ufat/ufat.rbuild diff --git a/reactos/dll/win32/ufat/ufat.rc b/dll/win32/ufat/ufat.rc similarity index 100% rename from reactos/dll/win32/ufat/ufat.rc rename to dll/win32/ufat/ufat.rc diff --git a/reactos/dll/win32/ufat/ufat.spec b/dll/win32/ufat/ufat.spec similarity index 100% rename from reactos/dll/win32/ufat/ufat.spec rename to dll/win32/ufat/ufat.spec diff --git a/reactos/dll/win32/ufatx/CMakeLists.txt b/dll/win32/ufatx/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/ufatx/CMakeLists.txt rename to dll/win32/ufatx/CMakeLists.txt diff --git a/reactos/dll/win32/ufatx/ufatx.rbuild b/dll/win32/ufatx/ufatx.rbuild similarity index 100% rename from reactos/dll/win32/ufatx/ufatx.rbuild rename to dll/win32/ufatx/ufatx.rbuild diff --git a/reactos/dll/win32/ufatx/ufatx.rc b/dll/win32/ufatx/ufatx.rc similarity index 100% rename from reactos/dll/win32/ufatx/ufatx.rc rename to dll/win32/ufatx/ufatx.rc diff --git a/reactos/dll/win32/ufatx/ufatx.spec b/dll/win32/ufatx/ufatx.spec similarity index 100% rename from reactos/dll/win32/ufatx/ufatx.spec rename to dll/win32/ufatx/ufatx.spec diff --git a/reactos/dll/win32/unicows/CMakeLists.txt b/dll/win32/unicows/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/unicows/CMakeLists.txt rename to dll/win32/unicows/CMakeLists.txt diff --git a/reactos/dll/win32/unicows/unicows.rbuild b/dll/win32/unicows/unicows.rbuild similarity index 100% rename from reactos/dll/win32/unicows/unicows.rbuild rename to dll/win32/unicows/unicows.rbuild diff --git a/reactos/dll/win32/unicows/unicows.spec b/dll/win32/unicows/unicows.spec similarity index 100% rename from reactos/dll/win32/unicows/unicows.spec rename to dll/win32/unicows/unicows.spec diff --git a/reactos/dll/win32/untfs/CMakeLists.txt b/dll/win32/untfs/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/untfs/CMakeLists.txt rename to dll/win32/untfs/CMakeLists.txt diff --git a/reactos/dll/win32/untfs/untfs.c b/dll/win32/untfs/untfs.c similarity index 100% rename from reactos/dll/win32/untfs/untfs.c rename to dll/win32/untfs/untfs.c diff --git a/reactos/dll/win32/untfs/untfs.rbuild b/dll/win32/untfs/untfs.rbuild similarity index 100% rename from reactos/dll/win32/untfs/untfs.rbuild rename to dll/win32/untfs/untfs.rbuild diff --git a/reactos/dll/win32/untfs/untfs.rc b/dll/win32/untfs/untfs.rc similarity index 100% rename from reactos/dll/win32/untfs/untfs.rc rename to dll/win32/untfs/untfs.rc diff --git a/reactos/dll/win32/untfs/untfs.spec b/dll/win32/untfs/untfs.spec similarity index 100% rename from reactos/dll/win32/untfs/untfs.spec rename to dll/win32/untfs/untfs.spec diff --git a/reactos/dll/win32/updspapi/CMakeLists.txt b/dll/win32/updspapi/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/updspapi/CMakeLists.txt rename to dll/win32/updspapi/CMakeLists.txt diff --git a/reactos/dll/win32/updspapi/main.c b/dll/win32/updspapi/main.c similarity index 100% rename from reactos/dll/win32/updspapi/main.c rename to dll/win32/updspapi/main.c diff --git a/reactos/dll/win32/updspapi/updspapi.rbuild b/dll/win32/updspapi/updspapi.rbuild similarity index 100% rename from reactos/dll/win32/updspapi/updspapi.rbuild rename to dll/win32/updspapi/updspapi.rbuild diff --git a/reactos/dll/win32/updspapi/updspapi.spec b/dll/win32/updspapi/updspapi.spec similarity index 100% rename from reactos/dll/win32/updspapi/updspapi.spec rename to dll/win32/updspapi/updspapi.spec diff --git a/reactos/dll/win32/url/CMakeLists.txt b/dll/win32/url/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/url/CMakeLists.txt rename to dll/win32/url/CMakeLists.txt diff --git a/reactos/dll/win32/url/url.rbuild b/dll/win32/url/url.rbuild similarity index 100% rename from reactos/dll/win32/url/url.rbuild rename to dll/win32/url/url.rbuild diff --git a/reactos/dll/win32/url/url.spec b/dll/win32/url/url.spec similarity index 100% rename from reactos/dll/win32/url/url.spec rename to dll/win32/url/url.spec diff --git a/reactos/dll/win32/url/url_main.c b/dll/win32/url/url_main.c similarity index 100% rename from reactos/dll/win32/url/url_main.c rename to dll/win32/url/url_main.c diff --git a/reactos/dll/win32/urlmon/CMakeLists.txt b/dll/win32/urlmon/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/urlmon/CMakeLists.txt rename to dll/win32/urlmon/CMakeLists.txt diff --git a/reactos/dll/win32/urlmon/bindctx.c b/dll/win32/urlmon/bindctx.c similarity index 100% rename from reactos/dll/win32/urlmon/bindctx.c rename to dll/win32/urlmon/bindctx.c diff --git a/reactos/dll/win32/urlmon/binding.c b/dll/win32/urlmon/binding.c similarity index 100% rename from reactos/dll/win32/urlmon/binding.c rename to dll/win32/urlmon/binding.c diff --git a/reactos/dll/win32/urlmon/bindprot.c b/dll/win32/urlmon/bindprot.c similarity index 100% rename from reactos/dll/win32/urlmon/bindprot.c rename to dll/win32/urlmon/bindprot.c diff --git a/reactos/dll/win32/urlmon/download.c b/dll/win32/urlmon/download.c similarity index 100% rename from reactos/dll/win32/urlmon/download.c rename to dll/win32/urlmon/download.c diff --git a/reactos/dll/win32/urlmon/file.c b/dll/win32/urlmon/file.c similarity index 100% rename from reactos/dll/win32/urlmon/file.c rename to dll/win32/urlmon/file.c diff --git a/reactos/dll/win32/urlmon/format.c b/dll/win32/urlmon/format.c similarity index 100% rename from reactos/dll/win32/urlmon/format.c rename to dll/win32/urlmon/format.c diff --git a/reactos/dll/win32/urlmon/ftp.c b/dll/win32/urlmon/ftp.c similarity index 100% rename from reactos/dll/win32/urlmon/ftp.c rename to dll/win32/urlmon/ftp.c diff --git a/reactos/dll/win32/urlmon/gopher.c b/dll/win32/urlmon/gopher.c similarity index 100% rename from reactos/dll/win32/urlmon/gopher.c rename to dll/win32/urlmon/gopher.c diff --git a/reactos/dll/win32/urlmon/http.c b/dll/win32/urlmon/http.c similarity index 100% rename from reactos/dll/win32/urlmon/http.c rename to dll/win32/urlmon/http.c diff --git a/reactos/dll/win32/urlmon/internet.c b/dll/win32/urlmon/internet.c similarity index 100% rename from reactos/dll/win32/urlmon/internet.c rename to dll/win32/urlmon/internet.c diff --git a/reactos/dll/win32/urlmon/mimefilter.c b/dll/win32/urlmon/mimefilter.c similarity index 100% rename from reactos/dll/win32/urlmon/mimefilter.c rename to dll/win32/urlmon/mimefilter.c diff --git a/reactos/dll/win32/urlmon/mk.c b/dll/win32/urlmon/mk.c similarity index 100% rename from reactos/dll/win32/urlmon/mk.c rename to dll/win32/urlmon/mk.c diff --git a/reactos/dll/win32/urlmon/protocol.c b/dll/win32/urlmon/protocol.c similarity index 100% rename from reactos/dll/win32/urlmon/protocol.c rename to dll/win32/urlmon/protocol.c diff --git a/reactos/dll/win32/urlmon/protproxy.c b/dll/win32/urlmon/protproxy.c similarity index 100% rename from reactos/dll/win32/urlmon/protproxy.c rename to dll/win32/urlmon/protproxy.c diff --git a/reactos/dll/win32/urlmon/rsrc.rc b/dll/win32/urlmon/rsrc.rc similarity index 100% rename from reactos/dll/win32/urlmon/rsrc.rc rename to dll/win32/urlmon/rsrc.rc diff --git a/reactos/dll/win32/urlmon/sec_mgr.c b/dll/win32/urlmon/sec_mgr.c similarity index 100% rename from reactos/dll/win32/urlmon/sec_mgr.c rename to dll/win32/urlmon/sec_mgr.c diff --git a/reactos/dll/win32/urlmon/session.c b/dll/win32/urlmon/session.c similarity index 100% rename from reactos/dll/win32/urlmon/session.c rename to dll/win32/urlmon/session.c diff --git a/reactos/dll/win32/urlmon/umon.c b/dll/win32/urlmon/umon.c similarity index 100% rename from reactos/dll/win32/urlmon/umon.c rename to dll/win32/urlmon/umon.c diff --git a/reactos/dll/win32/urlmon/umstream.c b/dll/win32/urlmon/umstream.c similarity index 100% rename from reactos/dll/win32/urlmon/umstream.c rename to dll/win32/urlmon/umstream.c diff --git a/reactos/dll/win32/urlmon/uri.c b/dll/win32/urlmon/uri.c similarity index 100% rename from reactos/dll/win32/urlmon/uri.c rename to dll/win32/urlmon/uri.c diff --git a/reactos/dll/win32/urlmon/urlmon.inf b/dll/win32/urlmon/urlmon.inf similarity index 100% rename from reactos/dll/win32/urlmon/urlmon.inf rename to dll/win32/urlmon/urlmon.inf diff --git a/reactos/dll/win32/urlmon/urlmon.rbuild b/dll/win32/urlmon/urlmon.rbuild similarity index 100% rename from reactos/dll/win32/urlmon/urlmon.rbuild rename to dll/win32/urlmon/urlmon.rbuild diff --git a/reactos/dll/win32/urlmon/urlmon.rgs b/dll/win32/urlmon/urlmon.rgs similarity index 100% rename from reactos/dll/win32/urlmon/urlmon.rgs rename to dll/win32/urlmon/urlmon.rgs diff --git a/reactos/dll/win32/urlmon/urlmon.spec b/dll/win32/urlmon/urlmon.spec similarity index 100% rename from reactos/dll/win32/urlmon/urlmon.spec rename to dll/win32/urlmon/urlmon.spec diff --git a/reactos/dll/win32/urlmon/urlmon_main.c b/dll/win32/urlmon/urlmon_main.c similarity index 100% rename from reactos/dll/win32/urlmon/urlmon_main.c rename to dll/win32/urlmon/urlmon_main.c diff --git a/reactos/dll/win32/urlmon/urlmon_main.h b/dll/win32/urlmon/urlmon_main.h similarity index 100% rename from reactos/dll/win32/urlmon/urlmon_main.h rename to dll/win32/urlmon/urlmon_main.h diff --git a/reactos/dll/win32/urlmon/urlmon_urlmon.idl b/dll/win32/urlmon/urlmon_urlmon.idl similarity index 100% rename from reactos/dll/win32/urlmon/urlmon_urlmon.idl rename to dll/win32/urlmon/urlmon_urlmon.idl diff --git a/reactos/dll/win32/urlmon/usrmarshal.c b/dll/win32/urlmon/usrmarshal.c similarity index 100% rename from reactos/dll/win32/urlmon/usrmarshal.c rename to dll/win32/urlmon/usrmarshal.c diff --git a/reactos/dll/win32/urlmon/version.rc b/dll/win32/urlmon/version.rc similarity index 100% rename from reactos/dll/win32/urlmon/version.rc rename to dll/win32/urlmon/version.rc diff --git a/reactos/dll/win32/user32/CMakeLists.txt b/dll/win32/user32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/user32/CMakeLists.txt rename to dll/win32/user32/CMakeLists.txt diff --git a/reactos/dll/win32/user32/controls/appswitch.c b/dll/win32/user32/controls/appswitch.c similarity index 100% rename from reactos/dll/win32/user32/controls/appswitch.c rename to dll/win32/user32/controls/appswitch.c diff --git a/reactos/dll/win32/user32/controls/button.c b/dll/win32/user32/controls/button.c similarity index 100% rename from reactos/dll/win32/user32/controls/button.c rename to dll/win32/user32/controls/button.c diff --git a/reactos/dll/win32/user32/controls/combo.c b/dll/win32/user32/controls/combo.c similarity index 100% rename from reactos/dll/win32/user32/controls/combo.c rename to dll/win32/user32/controls/combo.c diff --git a/reactos/dll/win32/user32/controls/edit.c b/dll/win32/user32/controls/edit.c similarity index 100% rename from reactos/dll/win32/user32/controls/edit.c rename to dll/win32/user32/controls/edit.c diff --git a/reactos/dll/win32/user32/controls/icontitle.c b/dll/win32/user32/controls/icontitle.c similarity index 100% rename from reactos/dll/win32/user32/controls/icontitle.c rename to dll/win32/user32/controls/icontitle.c diff --git a/reactos/dll/win32/user32/controls/listbox.c b/dll/win32/user32/controls/listbox.c similarity index 100% rename from reactos/dll/win32/user32/controls/listbox.c rename to dll/win32/user32/controls/listbox.c diff --git a/reactos/dll/win32/user32/controls/regcontrol.c b/dll/win32/user32/controls/regcontrol.c similarity index 100% rename from reactos/dll/win32/user32/controls/regcontrol.c rename to dll/win32/user32/controls/regcontrol.c diff --git a/reactos/dll/win32/user32/controls/scrollbar.c b/dll/win32/user32/controls/scrollbar.c similarity index 100% rename from reactos/dll/win32/user32/controls/scrollbar.c rename to dll/win32/user32/controls/scrollbar.c diff --git a/reactos/dll/win32/user32/controls/static.c b/dll/win32/user32/controls/static.c similarity index 100% rename from reactos/dll/win32/user32/controls/static.c rename to dll/win32/user32/controls/static.c diff --git a/reactos/dll/win32/user32/include/controls.h b/dll/win32/user32/include/controls.h similarity index 100% rename from reactos/dll/win32/user32/include/controls.h rename to dll/win32/user32/include/controls.h diff --git a/reactos/dll/win32/user32/include/dde_private.h b/dll/win32/user32/include/dde_private.h similarity index 100% rename from reactos/dll/win32/user32/include/dde_private.h rename to dll/win32/user32/include/dde_private.h diff --git a/reactos/dll/win32/user32/include/ntwrapper.h b/dll/win32/user32/include/ntwrapper.h similarity index 100% rename from reactos/dll/win32/user32/include/ntwrapper.h rename to dll/win32/user32/include/ntwrapper.h diff --git a/reactos/dll/win32/user32/include/regcontrol.h b/dll/win32/user32/include/regcontrol.h similarity index 100% rename from reactos/dll/win32/user32/include/regcontrol.h rename to dll/win32/user32/include/regcontrol.h diff --git a/reactos/dll/win32/user32/include/resource.h b/dll/win32/user32/include/resource.h similarity index 100% rename from reactos/dll/win32/user32/include/resource.h rename to dll/win32/user32/include/resource.h diff --git a/reactos/dll/win32/user32/include/user32.h b/dll/win32/user32/include/user32.h similarity index 100% rename from reactos/dll/win32/user32/include/user32.h rename to dll/win32/user32/include/user32.h diff --git a/reactos/dll/win32/user32/include/user32p.h b/dll/win32/user32/include/user32p.h similarity index 100% rename from reactos/dll/win32/user32/include/user32p.h rename to dll/win32/user32/include/user32p.h diff --git a/reactos/dll/win32/user32/include/user_x.h b/dll/win32/user32/include/user_x.h similarity index 100% rename from reactos/dll/win32/user32/include/user_x.h rename to dll/win32/user32/include/user_x.h diff --git a/reactos/dll/win32/user32/lang/bg-BG.rc b/dll/win32/user32/lang/bg-BG.rc similarity index 100% rename from reactos/dll/win32/user32/lang/bg-BG.rc rename to dll/win32/user32/lang/bg-BG.rc diff --git a/reactos/dll/win32/user32/lang/cs-CZ.rc b/dll/win32/user32/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/win32/user32/lang/cs-CZ.rc rename to dll/win32/user32/lang/cs-CZ.rc diff --git a/reactos/dll/win32/user32/lang/da-DK.rc b/dll/win32/user32/lang/da-DK.rc similarity index 100% rename from reactos/dll/win32/user32/lang/da-DK.rc rename to dll/win32/user32/lang/da-DK.rc diff --git a/reactos/dll/win32/user32/lang/de-DE.rc b/dll/win32/user32/lang/de-DE.rc similarity index 100% rename from reactos/dll/win32/user32/lang/de-DE.rc rename to dll/win32/user32/lang/de-DE.rc diff --git a/reactos/dll/win32/user32/lang/el-GR.rc b/dll/win32/user32/lang/el-GR.rc similarity index 100% rename from reactos/dll/win32/user32/lang/el-GR.rc rename to dll/win32/user32/lang/el-GR.rc diff --git a/reactos/dll/win32/user32/lang/en-US.rc b/dll/win32/user32/lang/en-US.rc similarity index 100% rename from reactos/dll/win32/user32/lang/en-US.rc rename to dll/win32/user32/lang/en-US.rc diff --git a/reactos/dll/win32/user32/lang/es-ES.rc b/dll/win32/user32/lang/es-ES.rc similarity index 100% rename from reactos/dll/win32/user32/lang/es-ES.rc rename to dll/win32/user32/lang/es-ES.rc diff --git a/reactos/dll/win32/user32/lang/fr-FR.rc b/dll/win32/user32/lang/fr-FR.rc similarity index 100% rename from reactos/dll/win32/user32/lang/fr-FR.rc rename to dll/win32/user32/lang/fr-FR.rc diff --git a/reactos/dll/win32/user32/lang/hu-HU.rc b/dll/win32/user32/lang/hu-HU.rc similarity index 100% rename from reactos/dll/win32/user32/lang/hu-HU.rc rename to dll/win32/user32/lang/hu-HU.rc diff --git a/reactos/dll/win32/user32/lang/id-ID.rc b/dll/win32/user32/lang/id-ID.rc similarity index 100% rename from reactos/dll/win32/user32/lang/id-ID.rc rename to dll/win32/user32/lang/id-ID.rc diff --git a/reactos/dll/win32/user32/lang/it-IT.rc b/dll/win32/user32/lang/it-IT.rc similarity index 100% rename from reactos/dll/win32/user32/lang/it-IT.rc rename to dll/win32/user32/lang/it-IT.rc diff --git a/reactos/dll/win32/user32/lang/ja-JP.rc b/dll/win32/user32/lang/ja-JP.rc similarity index 100% rename from reactos/dll/win32/user32/lang/ja-JP.rc rename to dll/win32/user32/lang/ja-JP.rc diff --git a/reactos/dll/win32/user32/lang/lt-LT.rc b/dll/win32/user32/lang/lt-LT.rc similarity index 100% rename from reactos/dll/win32/user32/lang/lt-LT.rc rename to dll/win32/user32/lang/lt-LT.rc diff --git a/reactos/dll/win32/user32/lang/nl-NL.rc b/dll/win32/user32/lang/nl-NL.rc similarity index 100% rename from reactos/dll/win32/user32/lang/nl-NL.rc rename to dll/win32/user32/lang/nl-NL.rc diff --git a/reactos/dll/win32/user32/lang/no-NO.rc b/dll/win32/user32/lang/no-NO.rc similarity index 100% rename from reactos/dll/win32/user32/lang/no-NO.rc rename to dll/win32/user32/lang/no-NO.rc diff --git a/reactos/dll/win32/user32/lang/pl-PL.rc b/dll/win32/user32/lang/pl-PL.rc similarity index 100% rename from reactos/dll/win32/user32/lang/pl-PL.rc rename to dll/win32/user32/lang/pl-PL.rc diff --git a/reactos/dll/win32/user32/lang/ro-RO.rc b/dll/win32/user32/lang/ro-RO.rc similarity index 100% rename from reactos/dll/win32/user32/lang/ro-RO.rc rename to dll/win32/user32/lang/ro-RO.rc diff --git a/reactos/dll/win32/user32/lang/ru-RU.rc b/dll/win32/user32/lang/ru-RU.rc similarity index 100% rename from reactos/dll/win32/user32/lang/ru-RU.rc rename to dll/win32/user32/lang/ru-RU.rc diff --git a/reactos/dll/win32/user32/lang/sk-SK.rc b/dll/win32/user32/lang/sk-SK.rc similarity index 100% rename from reactos/dll/win32/user32/lang/sk-SK.rc rename to dll/win32/user32/lang/sk-SK.rc diff --git a/reactos/dll/win32/user32/lang/sv-SE.rc b/dll/win32/user32/lang/sv-SE.rc similarity index 100% rename from reactos/dll/win32/user32/lang/sv-SE.rc rename to dll/win32/user32/lang/sv-SE.rc diff --git a/reactos/dll/win32/user32/lang/uk-UA.rc b/dll/win32/user32/lang/uk-UA.rc similarity index 100% rename from reactos/dll/win32/user32/lang/uk-UA.rc rename to dll/win32/user32/lang/uk-UA.rc diff --git a/reactos/dll/win32/user32/misc/dde.c b/dll/win32/user32/misc/dde.c similarity index 100% rename from reactos/dll/win32/user32/misc/dde.c rename to dll/win32/user32/misc/dde.c diff --git a/reactos/dll/win32/user32/misc/ddeclient.c b/dll/win32/user32/misc/ddeclient.c similarity index 100% rename from reactos/dll/win32/user32/misc/ddeclient.c rename to dll/win32/user32/misc/ddeclient.c diff --git a/reactos/dll/win32/user32/misc/ddeserver.c b/dll/win32/user32/misc/ddeserver.c similarity index 100% rename from reactos/dll/win32/user32/misc/ddeserver.c rename to dll/win32/user32/misc/ddeserver.c diff --git a/reactos/dll/win32/user32/misc/desktop.c b/dll/win32/user32/misc/desktop.c similarity index 100% rename from reactos/dll/win32/user32/misc/desktop.c rename to dll/win32/user32/misc/desktop.c diff --git a/reactos/dll/win32/user32/misc/display.c b/dll/win32/user32/misc/display.c similarity index 100% rename from reactos/dll/win32/user32/misc/display.c rename to dll/win32/user32/misc/display.c diff --git a/reactos/dll/win32/user32/misc/dllmain.c b/dll/win32/user32/misc/dllmain.c similarity index 100% rename from reactos/dll/win32/user32/misc/dllmain.c rename to dll/win32/user32/misc/dllmain.c diff --git a/reactos/dll/win32/user32/misc/exit.c b/dll/win32/user32/misc/exit.c similarity index 100% rename from reactos/dll/win32/user32/misc/exit.c rename to dll/win32/user32/misc/exit.c diff --git a/reactos/dll/win32/user32/misc/exticon.c b/dll/win32/user32/misc/exticon.c similarity index 100% rename from reactos/dll/win32/user32/misc/exticon.c rename to dll/win32/user32/misc/exticon.c diff --git a/reactos/dll/win32/user32/misc/imm.c b/dll/win32/user32/misc/imm.c similarity index 100% rename from reactos/dll/win32/user32/misc/imm.c rename to dll/win32/user32/misc/imm.c diff --git a/reactos/dll/win32/user32/misc/misc.c b/dll/win32/user32/misc/misc.c similarity index 100% rename from reactos/dll/win32/user32/misc/misc.c rename to dll/win32/user32/misc/misc.c diff --git a/reactos/dll/win32/user32/misc/object.c b/dll/win32/user32/misc/object.c similarity index 100% rename from reactos/dll/win32/user32/misc/object.c rename to dll/win32/user32/misc/object.c diff --git a/reactos/dll/win32/user32/misc/resources.c b/dll/win32/user32/misc/resources.c similarity index 100% rename from reactos/dll/win32/user32/misc/resources.c rename to dll/win32/user32/misc/resources.c diff --git a/reactos/dll/win32/user32/misc/rtlstr.c b/dll/win32/user32/misc/rtlstr.c similarity index 100% rename from reactos/dll/win32/user32/misc/rtlstr.c rename to dll/win32/user32/misc/rtlstr.c diff --git a/reactos/dll/win32/user32/misc/stubs.c b/dll/win32/user32/misc/stubs.c similarity index 100% rename from reactos/dll/win32/user32/misc/stubs.c rename to dll/win32/user32/misc/stubs.c diff --git a/reactos/dll/win32/user32/misc/timer.c b/dll/win32/user32/misc/timer.c similarity index 100% rename from reactos/dll/win32/user32/misc/timer.c rename to dll/win32/user32/misc/timer.c diff --git a/reactos/dll/win32/user32/misc/usrapihk.c b/dll/win32/user32/misc/usrapihk.c similarity index 100% rename from reactos/dll/win32/user32/misc/usrapihk.c rename to dll/win32/user32/misc/usrapihk.c diff --git a/reactos/dll/win32/user32/misc/winhelp.c b/dll/win32/user32/misc/winhelp.c similarity index 100% rename from reactos/dll/win32/user32/misc/winhelp.c rename to dll/win32/user32/misc/winhelp.c diff --git a/reactos/dll/win32/user32/misc/winsta.c b/dll/win32/user32/misc/winsta.c similarity index 100% rename from reactos/dll/win32/user32/misc/winsta.c rename to dll/win32/user32/misc/winsta.c diff --git a/reactos/dll/win32/user32/resources/obm_btncorners.bmp b/dll/win32/user32/resources/obm_btncorners.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_btncorners.bmp rename to dll/win32/user32/resources/obm_btncorners.bmp diff --git a/reactos/dll/win32/user32/resources/obm_btsize.bmp b/dll/win32/user32/resources/obm_btsize.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_btsize.bmp rename to dll/win32/user32/resources/obm_btsize.bmp diff --git a/reactos/dll/win32/user32/resources/obm_check.bmp b/dll/win32/user32/resources/obm_check.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_check.bmp rename to dll/win32/user32/resources/obm_check.bmp diff --git a/reactos/dll/win32/user32/resources/obm_checkboxes.bmp b/dll/win32/user32/resources/obm_checkboxes.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_checkboxes.bmp rename to dll/win32/user32/resources/obm_checkboxes.bmp diff --git a/reactos/dll/win32/user32/resources/obm_close.bmp b/dll/win32/user32/resources/obm_close.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_close.bmp rename to dll/win32/user32/resources/obm_close.bmp diff --git a/reactos/dll/win32/user32/resources/obm_combo.bmp b/dll/win32/user32/resources/obm_combo.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_combo.bmp rename to dll/win32/user32/resources/obm_combo.bmp diff --git a/reactos/dll/win32/user32/resources/obm_dnarrow.bmp b/dll/win32/user32/resources/obm_dnarrow.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_dnarrow.bmp rename to dll/win32/user32/resources/obm_dnarrow.bmp diff --git a/reactos/dll/win32/user32/resources/obm_dnarrowd.bmp b/dll/win32/user32/resources/obm_dnarrowd.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_dnarrowd.bmp rename to dll/win32/user32/resources/obm_dnarrowd.bmp diff --git a/reactos/dll/win32/user32/resources/obm_dnarrowi.bmp b/dll/win32/user32/resources/obm_dnarrowi.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_dnarrowi.bmp rename to dll/win32/user32/resources/obm_dnarrowi.bmp diff --git a/reactos/dll/win32/user32/resources/obm_lfarrow.bmp b/dll/win32/user32/resources/obm_lfarrow.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_lfarrow.bmp rename to dll/win32/user32/resources/obm_lfarrow.bmp diff --git a/reactos/dll/win32/user32/resources/obm_lfarrowd.bmp b/dll/win32/user32/resources/obm_lfarrowd.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_lfarrowd.bmp rename to dll/win32/user32/resources/obm_lfarrowd.bmp diff --git a/reactos/dll/win32/user32/resources/obm_lfarrowi.bmp b/dll/win32/user32/resources/obm_lfarrowi.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_lfarrowi.bmp rename to dll/win32/user32/resources/obm_lfarrowi.bmp diff --git a/reactos/dll/win32/user32/resources/obm_mnarrow.bmp b/dll/win32/user32/resources/obm_mnarrow.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_mnarrow.bmp rename to dll/win32/user32/resources/obm_mnarrow.bmp diff --git a/reactos/dll/win32/user32/resources/obm_old_close.bmp b/dll/win32/user32/resources/obm_old_close.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_old_close.bmp rename to dll/win32/user32/resources/obm_old_close.bmp diff --git a/reactos/dll/win32/user32/resources/obm_old_dnarrow.bmp b/dll/win32/user32/resources/obm_old_dnarrow.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_old_dnarrow.bmp rename to dll/win32/user32/resources/obm_old_dnarrow.bmp diff --git a/reactos/dll/win32/user32/resources/obm_old_lfarrow.bmp b/dll/win32/user32/resources/obm_old_lfarrow.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_old_lfarrow.bmp rename to dll/win32/user32/resources/obm_old_lfarrow.bmp diff --git a/reactos/dll/win32/user32/resources/obm_old_reduce.bmp b/dll/win32/user32/resources/obm_old_reduce.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_old_reduce.bmp rename to dll/win32/user32/resources/obm_old_reduce.bmp diff --git a/reactos/dll/win32/user32/resources/obm_old_restore.bmp b/dll/win32/user32/resources/obm_old_restore.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_old_restore.bmp rename to dll/win32/user32/resources/obm_old_restore.bmp diff --git a/reactos/dll/win32/user32/resources/obm_old_rgarrow.bmp b/dll/win32/user32/resources/obm_old_rgarrow.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_old_rgarrow.bmp rename to dll/win32/user32/resources/obm_old_rgarrow.bmp diff --git a/reactos/dll/win32/user32/resources/obm_old_uparrow.bmp b/dll/win32/user32/resources/obm_old_uparrow.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_old_uparrow.bmp rename to dll/win32/user32/resources/obm_old_uparrow.bmp diff --git a/reactos/dll/win32/user32/resources/obm_old_zoom.bmp b/dll/win32/user32/resources/obm_old_zoom.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_old_zoom.bmp rename to dll/win32/user32/resources/obm_old_zoom.bmp diff --git a/reactos/dll/win32/user32/resources/obm_reduce.bmp b/dll/win32/user32/resources/obm_reduce.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_reduce.bmp rename to dll/win32/user32/resources/obm_reduce.bmp diff --git a/reactos/dll/win32/user32/resources/obm_reduced.bmp b/dll/win32/user32/resources/obm_reduced.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_reduced.bmp rename to dll/win32/user32/resources/obm_reduced.bmp diff --git a/reactos/dll/win32/user32/resources/obm_restore.bmp b/dll/win32/user32/resources/obm_restore.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_restore.bmp rename to dll/win32/user32/resources/obm_restore.bmp diff --git a/reactos/dll/win32/user32/resources/obm_restored.bmp b/dll/win32/user32/resources/obm_restored.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_restored.bmp rename to dll/win32/user32/resources/obm_restored.bmp diff --git a/reactos/dll/win32/user32/resources/obm_rgarrow.bmp b/dll/win32/user32/resources/obm_rgarrow.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_rgarrow.bmp rename to dll/win32/user32/resources/obm_rgarrow.bmp diff --git a/reactos/dll/win32/user32/resources/obm_rgarrowd.bmp b/dll/win32/user32/resources/obm_rgarrowd.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_rgarrowd.bmp rename to dll/win32/user32/resources/obm_rgarrowd.bmp diff --git a/reactos/dll/win32/user32/resources/obm_rgarrowi.bmp b/dll/win32/user32/resources/obm_rgarrowi.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_rgarrowi.bmp rename to dll/win32/user32/resources/obm_rgarrowi.bmp diff --git a/reactos/dll/win32/user32/resources/obm_size.bmp b/dll/win32/user32/resources/obm_size.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_size.bmp rename to dll/win32/user32/resources/obm_size.bmp diff --git a/reactos/dll/win32/user32/resources/obm_trtype.bmp b/dll/win32/user32/resources/obm_trtype.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_trtype.bmp rename to dll/win32/user32/resources/obm_trtype.bmp diff --git a/reactos/dll/win32/user32/resources/obm_uparrow.bmp b/dll/win32/user32/resources/obm_uparrow.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_uparrow.bmp rename to dll/win32/user32/resources/obm_uparrow.bmp diff --git a/reactos/dll/win32/user32/resources/obm_uparrowd.bmp b/dll/win32/user32/resources/obm_uparrowd.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_uparrowd.bmp rename to dll/win32/user32/resources/obm_uparrowd.bmp diff --git a/reactos/dll/win32/user32/resources/obm_uparrowi.bmp b/dll/win32/user32/resources/obm_uparrowi.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_uparrowi.bmp rename to dll/win32/user32/resources/obm_uparrowi.bmp diff --git a/reactos/dll/win32/user32/resources/obm_zoom.bmp b/dll/win32/user32/resources/obm_zoom.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_zoom.bmp rename to dll/win32/user32/resources/obm_zoom.bmp diff --git a/reactos/dll/win32/user32/resources/obm_zoomd.bmp b/dll/win32/user32/resources/obm_zoomd.bmp similarity index 100% rename from reactos/dll/win32/user32/resources/obm_zoomd.bmp rename to dll/win32/user32/resources/obm_zoomd.bmp diff --git a/reactos/dll/win32/user32/resources/ocr_appstarting.cur b/dll/win32/user32/resources/ocr_appstarting.cur similarity index 100% rename from reactos/dll/win32/user32/resources/ocr_appstarting.cur rename to dll/win32/user32/resources/ocr_appstarting.cur diff --git a/reactos/dll/win32/user32/resources/ocr_cdautostart.cur b/dll/win32/user32/resources/ocr_cdautostart.cur similarity index 100% rename from reactos/dll/win32/user32/resources/ocr_cdautostart.cur rename to dll/win32/user32/resources/ocr_cdautostart.cur diff --git a/reactos/dll/win32/user32/resources/ocr_cross.cur b/dll/win32/user32/resources/ocr_cross.cur similarity index 100% rename from reactos/dll/win32/user32/resources/ocr_cross.cur rename to dll/win32/user32/resources/ocr_cross.cur diff --git a/reactos/dll/win32/user32/resources/ocr_dragobject.cur b/dll/win32/user32/resources/ocr_dragobject.cur similarity index 100% rename from reactos/dll/win32/user32/resources/ocr_dragobject.cur rename to dll/win32/user32/resources/ocr_dragobject.cur diff --git a/reactos/dll/win32/user32/resources/ocr_hand.cur b/dll/win32/user32/resources/ocr_hand.cur similarity index 100% rename from reactos/dll/win32/user32/resources/ocr_hand.cur rename to dll/win32/user32/resources/ocr_hand.cur diff --git a/reactos/dll/win32/user32/resources/ocr_help.cur b/dll/win32/user32/resources/ocr_help.cur similarity index 100% rename from reactos/dll/win32/user32/resources/ocr_help.cur rename to dll/win32/user32/resources/ocr_help.cur diff --git a/reactos/dll/win32/user32/resources/ocr_ibeam.cur b/dll/win32/user32/resources/ocr_ibeam.cur similarity index 100% rename from reactos/dll/win32/user32/resources/ocr_ibeam.cur rename to dll/win32/user32/resources/ocr_ibeam.cur diff --git a/reactos/dll/win32/user32/resources/ocr_icon.cur b/dll/win32/user32/resources/ocr_icon.cur similarity index 100% rename from reactos/dll/win32/user32/resources/ocr_icon.cur rename to dll/win32/user32/resources/ocr_icon.cur diff --git a/reactos/dll/win32/user32/resources/ocr_no.cur b/dll/win32/user32/resources/ocr_no.cur similarity index 100% rename from reactos/dll/win32/user32/resources/ocr_no.cur rename to dll/win32/user32/resources/ocr_no.cur diff --git a/reactos/dll/win32/user32/resources/ocr_normal.cur b/dll/win32/user32/resources/ocr_normal.cur similarity index 100% rename from reactos/dll/win32/user32/resources/ocr_normal.cur rename to dll/win32/user32/resources/ocr_normal.cur diff --git a/reactos/dll/win32/user32/resources/ocr_pen.cur b/dll/win32/user32/resources/ocr_pen.cur similarity index 100% rename from reactos/dll/win32/user32/resources/ocr_pen.cur rename to dll/win32/user32/resources/ocr_pen.cur diff --git a/reactos/dll/win32/user32/resources/ocr_size.cur b/dll/win32/user32/resources/ocr_size.cur similarity index 100% rename from reactos/dll/win32/user32/resources/ocr_size.cur rename to dll/win32/user32/resources/ocr_size.cur diff --git a/reactos/dll/win32/user32/resources/ocr_sizeall.cur b/dll/win32/user32/resources/ocr_sizeall.cur similarity index 100% rename from reactos/dll/win32/user32/resources/ocr_sizeall.cur rename to dll/win32/user32/resources/ocr_sizeall.cur diff --git a/reactos/dll/win32/user32/resources/ocr_sizenesw.cur b/dll/win32/user32/resources/ocr_sizenesw.cur similarity index 100% rename from reactos/dll/win32/user32/resources/ocr_sizenesw.cur rename to dll/win32/user32/resources/ocr_sizenesw.cur diff --git a/reactos/dll/win32/user32/resources/ocr_sizens.cur b/dll/win32/user32/resources/ocr_sizens.cur similarity index 100% rename from reactos/dll/win32/user32/resources/ocr_sizens.cur rename to dll/win32/user32/resources/ocr_sizens.cur diff --git a/reactos/dll/win32/user32/resources/ocr_sizenwse.cur b/dll/win32/user32/resources/ocr_sizenwse.cur similarity index 100% rename from reactos/dll/win32/user32/resources/ocr_sizenwse.cur rename to dll/win32/user32/resources/ocr_sizenwse.cur diff --git a/reactos/dll/win32/user32/resources/ocr_sizewe.cur b/dll/win32/user32/resources/ocr_sizewe.cur similarity index 100% rename from reactos/dll/win32/user32/resources/ocr_sizewe.cur rename to dll/win32/user32/resources/ocr_sizewe.cur diff --git a/reactos/dll/win32/user32/resources/ocr_up.cur b/dll/win32/user32/resources/ocr_up.cur similarity index 100% rename from reactos/dll/win32/user32/resources/ocr_up.cur rename to dll/win32/user32/resources/ocr_up.cur diff --git a/reactos/dll/win32/user32/resources/ocr_wait.cur b/dll/win32/user32/resources/ocr_wait.cur similarity index 100% rename from reactos/dll/win32/user32/resources/ocr_wait.cur rename to dll/win32/user32/resources/ocr_wait.cur diff --git a/reactos/dll/win32/user32/resources/oic_bang.ico b/dll/win32/user32/resources/oic_bang.ico similarity index 100% rename from reactos/dll/win32/user32/resources/oic_bang.ico rename to dll/win32/user32/resources/oic_bang.ico diff --git a/reactos/dll/win32/user32/resources/oic_hand.ico b/dll/win32/user32/resources/oic_hand.ico similarity index 100% rename from reactos/dll/win32/user32/resources/oic_hand.ico rename to dll/win32/user32/resources/oic_hand.ico diff --git a/reactos/dll/win32/user32/resources/oic_note.ico b/dll/win32/user32/resources/oic_note.ico similarity index 100% rename from reactos/dll/win32/user32/resources/oic_note.ico rename to dll/win32/user32/resources/oic_note.ico diff --git a/reactos/dll/win32/user32/resources/oic_ques.ico b/dll/win32/user32/resources/oic_ques.ico similarity index 100% rename from reactos/dll/win32/user32/resources/oic_ques.ico rename to dll/win32/user32/resources/oic_ques.ico diff --git a/reactos/dll/win32/user32/resources/oic_reactos.ico b/dll/win32/user32/resources/oic_reactos.ico similarity index 100% rename from reactos/dll/win32/user32/resources/oic_reactos.ico rename to dll/win32/user32/resources/oic_reactos.ico diff --git a/reactos/dll/win32/user32/resources/oic_sample.ico b/dll/win32/user32/resources/oic_sample.ico similarity index 100% rename from reactos/dll/win32/user32/resources/oic_sample.ico rename to dll/win32/user32/resources/oic_sample.ico diff --git a/reactos/dll/win32/user32/user32.pspec b/dll/win32/user32/user32.pspec similarity index 100% rename from reactos/dll/win32/user32/user32.pspec rename to dll/win32/user32/user32.pspec diff --git a/reactos/dll/win32/user32/user32.rbuild b/dll/win32/user32/user32.rbuild similarity index 100% rename from reactos/dll/win32/user32/user32.rbuild rename to dll/win32/user32/user32.rbuild diff --git a/reactos/dll/win32/user32/user32.rc b/dll/win32/user32/user32.rc similarity index 100% rename from reactos/dll/win32/user32/user32.rc rename to dll/win32/user32/user32.rc diff --git a/reactos/dll/win32/user32/user32.spec b/dll/win32/user32/user32.spec similarity index 100% rename from reactos/dll/win32/user32/user32.spec rename to dll/win32/user32/user32.spec diff --git a/reactos/dll/win32/user32/windows/accel.c b/dll/win32/user32/windows/accel.c similarity index 100% rename from reactos/dll/win32/user32/windows/accel.c rename to dll/win32/user32/windows/accel.c diff --git a/reactos/dll/win32/user32/windows/caret.c b/dll/win32/user32/windows/caret.c similarity index 100% rename from reactos/dll/win32/user32/windows/caret.c rename to dll/win32/user32/windows/caret.c diff --git a/reactos/dll/win32/user32/windows/class.c b/dll/win32/user32/windows/class.c similarity index 100% rename from reactos/dll/win32/user32/windows/class.c rename to dll/win32/user32/windows/class.c diff --git a/reactos/dll/win32/user32/windows/clipboard.c b/dll/win32/user32/windows/clipboard.c similarity index 100% rename from reactos/dll/win32/user32/windows/clipboard.c rename to dll/win32/user32/windows/clipboard.c diff --git a/reactos/dll/win32/user32/windows/cursoricon.c b/dll/win32/user32/windows/cursoricon.c similarity index 100% rename from reactos/dll/win32/user32/windows/cursoricon.c rename to dll/win32/user32/windows/cursoricon.c diff --git a/reactos/dll/win32/user32/windows/dc.c b/dll/win32/user32/windows/dc.c similarity index 100% rename from reactos/dll/win32/user32/windows/dc.c rename to dll/win32/user32/windows/dc.c diff --git a/reactos/dll/win32/user32/windows/defwnd.c b/dll/win32/user32/windows/defwnd.c similarity index 100% rename from reactos/dll/win32/user32/windows/defwnd.c rename to dll/win32/user32/windows/defwnd.c diff --git a/reactos/dll/win32/user32/windows/dialog.c b/dll/win32/user32/windows/dialog.c similarity index 100% rename from reactos/dll/win32/user32/windows/dialog.c rename to dll/win32/user32/windows/dialog.c diff --git a/reactos/dll/win32/user32/windows/draw.c b/dll/win32/user32/windows/draw.c similarity index 100% rename from reactos/dll/win32/user32/windows/draw.c rename to dll/win32/user32/windows/draw.c diff --git a/reactos/dll/win32/user32/windows/font.c b/dll/win32/user32/windows/font.c similarity index 100% rename from reactos/dll/win32/user32/windows/font.c rename to dll/win32/user32/windows/font.c diff --git a/reactos/dll/win32/user32/windows/hook.c b/dll/win32/user32/windows/hook.c similarity index 100% rename from reactos/dll/win32/user32/windows/hook.c rename to dll/win32/user32/windows/hook.c diff --git a/reactos/dll/win32/user32/windows/input.c b/dll/win32/user32/windows/input.c similarity index 100% rename from reactos/dll/win32/user32/windows/input.c rename to dll/win32/user32/windows/input.c diff --git a/reactos/dll/win32/user32/windows/mdi.c b/dll/win32/user32/windows/mdi.c similarity index 100% rename from reactos/dll/win32/user32/windows/mdi.c rename to dll/win32/user32/windows/mdi.c diff --git a/reactos/dll/win32/user32/windows/menu.c b/dll/win32/user32/windows/menu.c similarity index 100% rename from reactos/dll/win32/user32/windows/menu.c rename to dll/win32/user32/windows/menu.c diff --git a/reactos/dll/win32/user32/windows/message.c b/dll/win32/user32/windows/message.c similarity index 100% rename from reactos/dll/win32/user32/windows/message.c rename to dll/win32/user32/windows/message.c diff --git a/reactos/dll/win32/user32/windows/messagebox.c b/dll/win32/user32/windows/messagebox.c similarity index 100% rename from reactos/dll/win32/user32/windows/messagebox.c rename to dll/win32/user32/windows/messagebox.c diff --git a/reactos/dll/win32/user32/windows/nonclient.c b/dll/win32/user32/windows/nonclient.c similarity index 100% rename from reactos/dll/win32/user32/windows/nonclient.c rename to dll/win32/user32/windows/nonclient.c diff --git a/reactos/dll/win32/user32/windows/paint.c b/dll/win32/user32/windows/paint.c similarity index 100% rename from reactos/dll/win32/user32/windows/paint.c rename to dll/win32/user32/windows/paint.c diff --git a/reactos/dll/win32/user32/windows/prop.c b/dll/win32/user32/windows/prop.c similarity index 100% rename from reactos/dll/win32/user32/windows/prop.c rename to dll/win32/user32/windows/prop.c diff --git a/reactos/dll/win32/user32/windows/rect.c b/dll/win32/user32/windows/rect.c similarity index 100% rename from reactos/dll/win32/user32/windows/rect.c rename to dll/win32/user32/windows/rect.c diff --git a/reactos/dll/win32/user32/windows/spy.c b/dll/win32/user32/windows/spy.c similarity index 100% rename from reactos/dll/win32/user32/windows/spy.c rename to dll/win32/user32/windows/spy.c diff --git a/reactos/dll/win32/user32/windows/text.c b/dll/win32/user32/windows/text.c similarity index 100% rename from reactos/dll/win32/user32/windows/text.c rename to dll/win32/user32/windows/text.c diff --git a/reactos/dll/win32/user32/windows/window.c b/dll/win32/user32/windows/window.c similarity index 100% rename from reactos/dll/win32/user32/windows/window.c rename to dll/win32/user32/windows/window.c diff --git a/reactos/dll/win32/user32/windows/winpos.c b/dll/win32/user32/windows/winpos.c similarity index 100% rename from reactos/dll/win32/user32/windows/winpos.c rename to dll/win32/user32/windows/winpos.c diff --git a/reactos/dll/win32/userenv/CMakeLists.txt b/dll/win32/userenv/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/userenv/CMakeLists.txt rename to dll/win32/userenv/CMakeLists.txt diff --git a/reactos/dll/win32/userenv/desktop.c b/dll/win32/userenv/desktop.c similarity index 100% rename from reactos/dll/win32/userenv/desktop.c rename to dll/win32/userenv/desktop.c diff --git a/reactos/dll/win32/userenv/directory.c b/dll/win32/userenv/directory.c similarity index 100% rename from reactos/dll/win32/userenv/directory.c rename to dll/win32/userenv/directory.c diff --git a/reactos/dll/win32/userenv/environment.c b/dll/win32/userenv/environment.c similarity index 100% rename from reactos/dll/win32/userenv/environment.c rename to dll/win32/userenv/environment.c diff --git a/reactos/dll/win32/userenv/gpolicy.c b/dll/win32/userenv/gpolicy.c similarity index 100% rename from reactos/dll/win32/userenv/gpolicy.c rename to dll/win32/userenv/gpolicy.c diff --git a/reactos/dll/win32/userenv/internal.h b/dll/win32/userenv/internal.h similarity index 100% rename from reactos/dll/win32/userenv/internal.h rename to dll/win32/userenv/internal.h diff --git a/reactos/dll/win32/userenv/lang/bg-BG.rc b/dll/win32/userenv/lang/bg-BG.rc similarity index 100% rename from reactos/dll/win32/userenv/lang/bg-BG.rc rename to dll/win32/userenv/lang/bg-BG.rc diff --git a/reactos/dll/win32/userenv/lang/cs-CZ.rc b/dll/win32/userenv/lang/cs-CZ.rc similarity index 100% rename from reactos/dll/win32/userenv/lang/cs-CZ.rc rename to dll/win32/userenv/lang/cs-CZ.rc diff --git a/reactos/dll/win32/userenv/lang/da-DK.rc b/dll/win32/userenv/lang/da-DK.rc similarity index 100% rename from reactos/dll/win32/userenv/lang/da-DK.rc rename to dll/win32/userenv/lang/da-DK.rc diff --git a/reactos/dll/win32/userenv/lang/de-DE.rc b/dll/win32/userenv/lang/de-DE.rc similarity index 100% rename from reactos/dll/win32/userenv/lang/de-DE.rc rename to dll/win32/userenv/lang/de-DE.rc diff --git a/reactos/dll/win32/userenv/lang/el-GR.rc b/dll/win32/userenv/lang/el-GR.rc similarity index 100% rename from reactos/dll/win32/userenv/lang/el-GR.rc rename to dll/win32/userenv/lang/el-GR.rc diff --git a/reactos/dll/win32/userenv/lang/en-US.rc b/dll/win32/userenv/lang/en-US.rc similarity index 100% rename from reactos/dll/win32/userenv/lang/en-US.rc rename to dll/win32/userenv/lang/en-US.rc diff --git a/reactos/dll/win32/userenv/lang/es-ES.rc b/dll/win32/userenv/lang/es-ES.rc similarity index 100% rename from reactos/dll/win32/userenv/lang/es-ES.rc rename to dll/win32/userenv/lang/es-ES.rc diff --git a/reactos/dll/win32/userenv/lang/fi-FI.rc b/dll/win32/userenv/lang/fi-FI.rc similarity index 100% rename from reactos/dll/win32/userenv/lang/fi-FI.rc rename to dll/win32/userenv/lang/fi-FI.rc diff --git a/reactos/dll/win32/userenv/lang/fr-FR.rc b/dll/win32/userenv/lang/fr-FR.rc similarity index 100% rename from reactos/dll/win32/userenv/lang/fr-FR.rc rename to dll/win32/userenv/lang/fr-FR.rc diff --git a/reactos/dll/win32/userenv/lang/hu-HU.rc b/dll/win32/userenv/lang/hu-HU.rc similarity index 100% rename from reactos/dll/win32/userenv/lang/hu-HU.rc rename to dll/win32/userenv/lang/hu-HU.rc diff --git a/reactos/dll/win32/userenv/lang/id-ID.rc b/dll/win32/userenv/lang/id-ID.rc similarity index 100% rename from reactos/dll/win32/userenv/lang/id-ID.rc rename to dll/win32/userenv/lang/id-ID.rc diff --git a/reactos/dll/win32/userenv/lang/it-IT.rc b/dll/win32/userenv/lang/it-IT.rc similarity index 100% rename from reactos/dll/win32/userenv/lang/it-IT.rc rename to dll/win32/userenv/lang/it-IT.rc diff --git a/reactos/dll/win32/userenv/lang/ja-JP.rc b/dll/win32/userenv/lang/ja-JP.rc similarity index 100% rename from reactos/dll/win32/userenv/lang/ja-JP.rc rename to dll/win32/userenv/lang/ja-JP.rc diff --git a/reactos/dll/win32/userenv/lang/lt-LT.rc b/dll/win32/userenv/lang/lt-LT.rc similarity index 100% rename from reactos/dll/win32/userenv/lang/lt-LT.rc rename to dll/win32/userenv/lang/lt-LT.rc diff --git a/reactos/dll/win32/userenv/lang/nl-NL.rc b/dll/win32/userenv/lang/nl-NL.rc similarity index 100% rename from reactos/dll/win32/userenv/lang/nl-NL.rc rename to dll/win32/userenv/lang/nl-NL.rc diff --git a/reactos/dll/win32/userenv/lang/no-NO.rc b/dll/win32/userenv/lang/no-NO.rc similarity index 100% rename from reactos/dll/win32/userenv/lang/no-NO.rc rename to dll/win32/userenv/lang/no-NO.rc diff --git a/reactos/dll/win32/userenv/lang/pl-PL.rc b/dll/win32/userenv/lang/pl-PL.rc similarity index 100% rename from reactos/dll/win32/userenv/lang/pl-PL.rc rename to dll/win32/userenv/lang/pl-PL.rc diff --git a/reactos/dll/win32/userenv/lang/pt-BR.rc b/dll/win32/userenv/lang/pt-BR.rc similarity index 100% rename from reactos/dll/win32/userenv/lang/pt-BR.rc rename to dll/win32/userenv/lang/pt-BR.rc diff --git a/reactos/dll/win32/userenv/lang/ro-RO.rc b/dll/win32/userenv/lang/ro-RO.rc similarity index 100% rename from reactos/dll/win32/userenv/lang/ro-RO.rc rename to dll/win32/userenv/lang/ro-RO.rc diff --git a/reactos/dll/win32/userenv/lang/ru-RU.rc b/dll/win32/userenv/lang/ru-RU.rc similarity index 100% rename from reactos/dll/win32/userenv/lang/ru-RU.rc rename to dll/win32/userenv/lang/ru-RU.rc diff --git a/reactos/dll/win32/userenv/lang/sk-SK.rc b/dll/win32/userenv/lang/sk-SK.rc similarity index 100% rename from reactos/dll/win32/userenv/lang/sk-SK.rc rename to dll/win32/userenv/lang/sk-SK.rc diff --git a/reactos/dll/win32/userenv/lang/sv-SE.rc b/dll/win32/userenv/lang/sv-SE.rc similarity index 100% rename from reactos/dll/win32/userenv/lang/sv-SE.rc rename to dll/win32/userenv/lang/sv-SE.rc diff --git a/reactos/dll/win32/userenv/lang/th-TH.rc b/dll/win32/userenv/lang/th-TH.rc similarity index 100% rename from reactos/dll/win32/userenv/lang/th-TH.rc rename to dll/win32/userenv/lang/th-TH.rc diff --git a/reactos/dll/win32/userenv/lang/uk-UA.rc b/dll/win32/userenv/lang/uk-UA.rc similarity index 100% rename from reactos/dll/win32/userenv/lang/uk-UA.rc rename to dll/win32/userenv/lang/uk-UA.rc diff --git a/reactos/dll/win32/userenv/misc.c b/dll/win32/userenv/misc.c similarity index 100% rename from reactos/dll/win32/userenv/misc.c rename to dll/win32/userenv/misc.c diff --git a/reactos/dll/win32/userenv/precomp.h b/dll/win32/userenv/precomp.h similarity index 100% rename from reactos/dll/win32/userenv/precomp.h rename to dll/win32/userenv/precomp.h diff --git a/reactos/dll/win32/userenv/profile.c b/dll/win32/userenv/profile.c similarity index 100% rename from reactos/dll/win32/userenv/profile.c rename to dll/win32/userenv/profile.c diff --git a/reactos/dll/win32/userenv/registry.c b/dll/win32/userenv/registry.c similarity index 100% rename from reactos/dll/win32/userenv/registry.c rename to dll/win32/userenv/registry.c diff --git a/reactos/dll/win32/userenv/resources.h b/dll/win32/userenv/resources.h similarity index 100% rename from reactos/dll/win32/userenv/resources.h rename to dll/win32/userenv/resources.h diff --git a/reactos/dll/win32/userenv/setup.c b/dll/win32/userenv/setup.c similarity index 100% rename from reactos/dll/win32/userenv/setup.c rename to dll/win32/userenv/setup.c diff --git a/reactos/dll/win32/userenv/userenv.c b/dll/win32/userenv/userenv.c similarity index 100% rename from reactos/dll/win32/userenv/userenv.c rename to dll/win32/userenv/userenv.c diff --git a/reactos/dll/win32/userenv/userenv.rbuild b/dll/win32/userenv/userenv.rbuild similarity index 100% rename from reactos/dll/win32/userenv/userenv.rbuild rename to dll/win32/userenv/userenv.rbuild diff --git a/reactos/dll/win32/userenv/userenv.rc b/dll/win32/userenv/userenv.rc similarity index 100% rename from reactos/dll/win32/userenv/userenv.rc rename to dll/win32/userenv/userenv.rc diff --git a/reactos/dll/win32/userenv/userenv.spec b/dll/win32/userenv/userenv.spec similarity index 100% rename from reactos/dll/win32/userenv/userenv.spec rename to dll/win32/userenv/userenv.spec diff --git a/reactos/dll/win32/usp10/CMakeLists.txt b/dll/win32/usp10/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/usp10/CMakeLists.txt rename to dll/win32/usp10/CMakeLists.txt diff --git a/reactos/dll/win32/usp10/bidi.c b/dll/win32/usp10/bidi.c similarity index 100% rename from reactos/dll/win32/usp10/bidi.c rename to dll/win32/usp10/bidi.c diff --git a/reactos/dll/win32/usp10/breaking.c b/dll/win32/usp10/breaking.c similarity index 100% rename from reactos/dll/win32/usp10/breaking.c rename to dll/win32/usp10/breaking.c diff --git a/reactos/dll/win32/usp10/indic.c b/dll/win32/usp10/indic.c similarity index 100% rename from reactos/dll/win32/usp10/indic.c rename to dll/win32/usp10/indic.c diff --git a/reactos/dll/win32/usp10/indicsyllable.c b/dll/win32/usp10/indicsyllable.c similarity index 100% rename from reactos/dll/win32/usp10/indicsyllable.c rename to dll/win32/usp10/indicsyllable.c diff --git a/reactos/dll/win32/usp10/linebreak.c b/dll/win32/usp10/linebreak.c similarity index 100% rename from reactos/dll/win32/usp10/linebreak.c rename to dll/win32/usp10/linebreak.c diff --git a/reactos/dll/win32/usp10/mirror.c b/dll/win32/usp10/mirror.c similarity index 100% rename from reactos/dll/win32/usp10/mirror.c rename to dll/win32/usp10/mirror.c diff --git a/reactos/dll/win32/usp10/shape.c b/dll/win32/usp10/shape.c similarity index 100% rename from reactos/dll/win32/usp10/shape.c rename to dll/win32/usp10/shape.c diff --git a/reactos/dll/win32/usp10/shaping.c b/dll/win32/usp10/shaping.c similarity index 100% rename from reactos/dll/win32/usp10/shaping.c rename to dll/win32/usp10/shaping.c diff --git a/reactos/dll/win32/usp10/usp10.c b/dll/win32/usp10/usp10.c similarity index 100% rename from reactos/dll/win32/usp10/usp10.c rename to dll/win32/usp10/usp10.c diff --git a/reactos/dll/win32/usp10/usp10.rbuild b/dll/win32/usp10/usp10.rbuild similarity index 100% rename from reactos/dll/win32/usp10/usp10.rbuild rename to dll/win32/usp10/usp10.rbuild diff --git a/reactos/dll/win32/usp10/usp10.spec b/dll/win32/usp10/usp10.spec similarity index 100% rename from reactos/dll/win32/usp10/usp10.spec rename to dll/win32/usp10/usp10.spec diff --git a/reactos/dll/win32/usp10/usp10_internal.h b/dll/win32/usp10/usp10_internal.h similarity index 100% rename from reactos/dll/win32/usp10/usp10_internal.h rename to dll/win32/usp10/usp10_internal.h diff --git a/reactos/dll/win32/usp10/usp10_ros.diff b/dll/win32/usp10/usp10_ros.diff similarity index 100% rename from reactos/dll/win32/usp10/usp10_ros.diff rename to dll/win32/usp10/usp10_ros.diff diff --git a/reactos/dll/win32/uxtheme/CMakeLists.txt b/dll/win32/uxtheme/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/uxtheme/CMakeLists.txt rename to dll/win32/uxtheme/CMakeLists.txt diff --git a/reactos/dll/win32/uxtheme/buffer.c b/dll/win32/uxtheme/buffer.c similarity index 100% rename from reactos/dll/win32/uxtheme/buffer.c rename to dll/win32/uxtheme/buffer.c diff --git a/reactos/dll/win32/uxtheme/draw.c b/dll/win32/uxtheme/draw.c similarity index 100% rename from reactos/dll/win32/uxtheme/draw.c rename to dll/win32/uxtheme/draw.c diff --git a/reactos/dll/win32/uxtheme/main.c b/dll/win32/uxtheme/main.c similarity index 100% rename from reactos/dll/win32/uxtheme/main.c rename to dll/win32/uxtheme/main.c diff --git a/reactos/dll/win32/uxtheme/metric.c b/dll/win32/uxtheme/metric.c similarity index 100% rename from reactos/dll/win32/uxtheme/metric.c rename to dll/win32/uxtheme/metric.c diff --git a/reactos/dll/win32/uxtheme/msstyles.c b/dll/win32/uxtheme/msstyles.c similarity index 100% rename from reactos/dll/win32/uxtheme/msstyles.c rename to dll/win32/uxtheme/msstyles.c diff --git a/reactos/dll/win32/uxtheme/ncscrollbar.c b/dll/win32/uxtheme/ncscrollbar.c similarity index 100% rename from reactos/dll/win32/uxtheme/ncscrollbar.c rename to dll/win32/uxtheme/ncscrollbar.c diff --git a/reactos/dll/win32/uxtheme/nonclient.c b/dll/win32/uxtheme/nonclient.c similarity index 100% rename from reactos/dll/win32/uxtheme/nonclient.c rename to dll/win32/uxtheme/nonclient.c diff --git a/reactos/dll/win32/uxtheme/property.c b/dll/win32/uxtheme/property.c similarity index 100% rename from reactos/dll/win32/uxtheme/property.c rename to dll/win32/uxtheme/property.c diff --git a/reactos/dll/win32/uxtheme/stylemap.c b/dll/win32/uxtheme/stylemap.c similarity index 100% rename from reactos/dll/win32/uxtheme/stylemap.c rename to dll/win32/uxtheme/stylemap.c diff --git a/reactos/dll/win32/uxtheme/system.c b/dll/win32/uxtheme/system.c similarity index 100% rename from reactos/dll/win32/uxtheme/system.c rename to dll/win32/uxtheme/system.c diff --git a/reactos/dll/win32/uxtheme/themehooks.c b/dll/win32/uxtheme/themehooks.c similarity index 100% rename from reactos/dll/win32/uxtheme/themehooks.c rename to dll/win32/uxtheme/themehooks.c diff --git a/reactos/dll/win32/uxtheme/uxini.c b/dll/win32/uxtheme/uxini.c similarity index 100% rename from reactos/dll/win32/uxtheme/uxini.c rename to dll/win32/uxtheme/uxini.c diff --git a/reactos/dll/win32/uxtheme/uxtheme.rbuild b/dll/win32/uxtheme/uxtheme.rbuild similarity index 100% rename from reactos/dll/win32/uxtheme/uxtheme.rbuild rename to dll/win32/uxtheme/uxtheme.rbuild diff --git a/reactos/dll/win32/uxtheme/uxtheme.spec b/dll/win32/uxtheme/uxtheme.spec similarity index 100% rename from reactos/dll/win32/uxtheme/uxtheme.spec rename to dll/win32/uxtheme/uxtheme.spec diff --git a/reactos/dll/win32/uxtheme/uxthemep.h b/dll/win32/uxtheme/uxthemep.h similarity index 100% rename from reactos/dll/win32/uxtheme/uxthemep.h rename to dll/win32/uxtheme/uxthemep.h diff --git a/reactos/dll/win32/uxtheme/version.rc b/dll/win32/uxtheme/version.rc similarity index 100% rename from reactos/dll/win32/uxtheme/version.rc rename to dll/win32/uxtheme/version.rc diff --git a/reactos/dll/win32/vdmdbg/CMakeLists.txt b/dll/win32/vdmdbg/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/vdmdbg/CMakeLists.txt rename to dll/win32/vdmdbg/CMakeLists.txt diff --git a/reactos/dll/win32/vdmdbg/vdmdbg.c b/dll/win32/vdmdbg/vdmdbg.c similarity index 100% rename from reactos/dll/win32/vdmdbg/vdmdbg.c rename to dll/win32/vdmdbg/vdmdbg.c diff --git a/reactos/dll/win32/vdmdbg/vdmdbg.h b/dll/win32/vdmdbg/vdmdbg.h similarity index 100% rename from reactos/dll/win32/vdmdbg/vdmdbg.h rename to dll/win32/vdmdbg/vdmdbg.h diff --git a/reactos/dll/win32/vdmdbg/vdmdbg.rbuild b/dll/win32/vdmdbg/vdmdbg.rbuild similarity index 100% rename from reactos/dll/win32/vdmdbg/vdmdbg.rbuild rename to dll/win32/vdmdbg/vdmdbg.rbuild diff --git a/reactos/dll/win32/vdmdbg/vdmdbg.spec b/dll/win32/vdmdbg/vdmdbg.spec similarity index 100% rename from reactos/dll/win32/vdmdbg/vdmdbg.spec rename to dll/win32/vdmdbg/vdmdbg.spec diff --git a/reactos/dll/win32/version/CMakeLists.txt b/dll/win32/version/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/version/CMakeLists.txt rename to dll/win32/version/CMakeLists.txt diff --git a/reactos/dll/win32/version/info.c b/dll/win32/version/info.c similarity index 100% rename from reactos/dll/win32/version/info.c rename to dll/win32/version/info.c diff --git a/reactos/dll/win32/version/install.c b/dll/win32/version/install.c similarity index 100% rename from reactos/dll/win32/version/install.c rename to dll/win32/version/install.c diff --git a/reactos/dll/win32/version/resource.c b/dll/win32/version/resource.c similarity index 100% rename from reactos/dll/win32/version/resource.c rename to dll/win32/version/resource.c diff --git a/reactos/dll/win32/version/version.rbuild b/dll/win32/version/version.rbuild similarity index 100% rename from reactos/dll/win32/version/version.rbuild rename to dll/win32/version/version.rbuild diff --git a/reactos/dll/win32/version/version.rc b/dll/win32/version/version.rc similarity index 100% rename from reactos/dll/win32/version/version.rc rename to dll/win32/version/version.rc diff --git a/reactos/dll/win32/version/version.spec b/dll/win32/version/version.spec similarity index 100% rename from reactos/dll/win32/version/version.spec rename to dll/win32/version/version.spec diff --git a/reactos/dll/win32/wdmaud.drv/CMakeLists.txt b/dll/win32/wdmaud.drv/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/wdmaud.drv/CMakeLists.txt rename to dll/win32/wdmaud.drv/CMakeLists.txt diff --git a/reactos/dll/win32/wdmaud.drv/legacy.c b/dll/win32/wdmaud.drv/legacy.c similarity index 100% rename from reactos/dll/win32/wdmaud.drv/legacy.c rename to dll/win32/wdmaud.drv/legacy.c diff --git a/reactos/dll/win32/wdmaud.drv/mixer.c b/dll/win32/wdmaud.drv/mixer.c similarity index 100% rename from reactos/dll/win32/wdmaud.drv/mixer.c rename to dll/win32/wdmaud.drv/mixer.c diff --git a/reactos/dll/win32/wdmaud.drv/mmixer.c b/dll/win32/wdmaud.drv/mmixer.c similarity index 100% rename from reactos/dll/win32/wdmaud.drv/mmixer.c rename to dll/win32/wdmaud.drv/mmixer.c diff --git a/reactos/dll/win32/wdmaud.drv/wdmaud.c b/dll/win32/wdmaud.drv/wdmaud.c similarity index 100% rename from reactos/dll/win32/wdmaud.drv/wdmaud.c rename to dll/win32/wdmaud.drv/wdmaud.c diff --git a/reactos/dll/win32/wdmaud.drv/wdmaud.h b/dll/win32/wdmaud.drv/wdmaud.h similarity index 100% rename from reactos/dll/win32/wdmaud.drv/wdmaud.h rename to dll/win32/wdmaud.drv/wdmaud.h diff --git a/reactos/dll/win32/wdmaud.drv/wdmaud.rbuild b/dll/win32/wdmaud.drv/wdmaud.rbuild similarity index 100% rename from reactos/dll/win32/wdmaud.drv/wdmaud.rbuild rename to dll/win32/wdmaud.drv/wdmaud.rbuild diff --git a/reactos/dll/win32/wdmaud.drv/wdmaud.rc b/dll/win32/wdmaud.drv/wdmaud.rc similarity index 100% rename from reactos/dll/win32/wdmaud.drv/wdmaud.rc rename to dll/win32/wdmaud.drv/wdmaud.rc diff --git a/reactos/dll/win32/wdmaud.drv/wdmaud.spec b/dll/win32/wdmaud.drv/wdmaud.spec similarity index 100% rename from reactos/dll/win32/wdmaud.drv/wdmaud.spec rename to dll/win32/wdmaud.drv/wdmaud.spec diff --git a/reactos/dll/win32/wer/main.c b/dll/win32/wer/main.c similarity index 100% rename from reactos/dll/win32/wer/main.c rename to dll/win32/wer/main.c diff --git a/reactos/dll/win32/wer/wer.rbuild b/dll/win32/wer/wer.rbuild similarity index 100% rename from reactos/dll/win32/wer/wer.rbuild rename to dll/win32/wer/wer.rbuild diff --git a/reactos/dll/win32/wer/wer.spec b/dll/win32/wer/wer.spec similarity index 100% rename from reactos/dll/win32/wer/wer.spec rename to dll/win32/wer/wer.spec diff --git a/reactos/dll/win32/win32.rbuild b/dll/win32/win32.rbuild similarity index 100% rename from reactos/dll/win32/win32.rbuild rename to dll/win32/win32.rbuild diff --git a/reactos/dll/win32/windowscodecs/CMakeLists.txt b/dll/win32/windowscodecs/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/windowscodecs/CMakeLists.txt rename to dll/win32/windowscodecs/CMakeLists.txt diff --git a/reactos/dll/win32/windowscodecs/bmpdecode.c b/dll/win32/windowscodecs/bmpdecode.c similarity index 100% rename from reactos/dll/win32/windowscodecs/bmpdecode.c rename to dll/win32/windowscodecs/bmpdecode.c diff --git a/reactos/dll/win32/windowscodecs/bmpencode.c b/dll/win32/windowscodecs/bmpencode.c similarity index 100% rename from reactos/dll/win32/windowscodecs/bmpencode.c rename to dll/win32/windowscodecs/bmpencode.c diff --git a/reactos/dll/win32/windowscodecs/clsfactory.c b/dll/win32/windowscodecs/clsfactory.c similarity index 100% rename from reactos/dll/win32/windowscodecs/clsfactory.c rename to dll/win32/windowscodecs/clsfactory.c diff --git a/reactos/dll/win32/windowscodecs/converter.c b/dll/win32/windowscodecs/converter.c similarity index 100% rename from reactos/dll/win32/windowscodecs/converter.c rename to dll/win32/windowscodecs/converter.c diff --git a/reactos/dll/win32/windowscodecs/fliprotate.c b/dll/win32/windowscodecs/fliprotate.c similarity index 100% rename from reactos/dll/win32/windowscodecs/fliprotate.c rename to dll/win32/windowscodecs/fliprotate.c diff --git a/reactos/dll/win32/windowscodecs/gifformat.c b/dll/win32/windowscodecs/gifformat.c similarity index 100% rename from reactos/dll/win32/windowscodecs/gifformat.c rename to dll/win32/windowscodecs/gifformat.c diff --git a/reactos/dll/win32/windowscodecs/icoformat.c b/dll/win32/windowscodecs/icoformat.c similarity index 100% rename from reactos/dll/win32/windowscodecs/icoformat.c rename to dll/win32/windowscodecs/icoformat.c diff --git a/reactos/dll/win32/windowscodecs/imgfactory.c b/dll/win32/windowscodecs/imgfactory.c similarity index 100% rename from reactos/dll/win32/windowscodecs/imgfactory.c rename to dll/win32/windowscodecs/imgfactory.c diff --git a/reactos/dll/win32/windowscodecs/info.c b/dll/win32/windowscodecs/info.c similarity index 100% rename from reactos/dll/win32/windowscodecs/info.c rename to dll/win32/windowscodecs/info.c diff --git a/reactos/dll/win32/windowscodecs/jpegformat.c b/dll/win32/windowscodecs/jpegformat.c similarity index 100% rename from reactos/dll/win32/windowscodecs/jpegformat.c rename to dll/win32/windowscodecs/jpegformat.c diff --git a/reactos/dll/win32/windowscodecs/main.c b/dll/win32/windowscodecs/main.c similarity index 100% rename from reactos/dll/win32/windowscodecs/main.c rename to dll/win32/windowscodecs/main.c diff --git a/reactos/dll/win32/windowscodecs/palette.c b/dll/win32/windowscodecs/palette.c similarity index 100% rename from reactos/dll/win32/windowscodecs/palette.c rename to dll/win32/windowscodecs/palette.c diff --git a/reactos/dll/win32/windowscodecs/pngformat.c b/dll/win32/windowscodecs/pngformat.c similarity index 100% rename from reactos/dll/win32/windowscodecs/pngformat.c rename to dll/win32/windowscodecs/pngformat.c diff --git a/reactos/dll/win32/windowscodecs/propertybag.c b/dll/win32/windowscodecs/propertybag.c similarity index 100% rename from reactos/dll/win32/windowscodecs/propertybag.c rename to dll/win32/windowscodecs/propertybag.c diff --git a/reactos/dll/win32/windowscodecs/regsvr.c b/dll/win32/windowscodecs/regsvr.c similarity index 100% rename from reactos/dll/win32/windowscodecs/regsvr.c rename to dll/win32/windowscodecs/regsvr.c diff --git a/reactos/dll/win32/windowscodecs/stream.c b/dll/win32/windowscodecs/stream.c similarity index 100% rename from reactos/dll/win32/windowscodecs/stream.c rename to dll/win32/windowscodecs/stream.c diff --git a/reactos/dll/win32/windowscodecs/tiffformat.c b/dll/win32/windowscodecs/tiffformat.c similarity index 100% rename from reactos/dll/win32/windowscodecs/tiffformat.c rename to dll/win32/windowscodecs/tiffformat.c diff --git a/reactos/dll/win32/windowscodecs/typeof.h b/dll/win32/windowscodecs/typeof.h similarity index 100% rename from reactos/dll/win32/windowscodecs/typeof.h rename to dll/win32/windowscodecs/typeof.h diff --git a/reactos/dll/win32/windowscodecs/ungif.c b/dll/win32/windowscodecs/ungif.c similarity index 100% rename from reactos/dll/win32/windowscodecs/ungif.c rename to dll/win32/windowscodecs/ungif.c diff --git a/reactos/dll/win32/windowscodecs/ungif.h b/dll/win32/windowscodecs/ungif.h similarity index 100% rename from reactos/dll/win32/windowscodecs/ungif.h rename to dll/win32/windowscodecs/ungif.h diff --git a/reactos/dll/win32/windowscodecs/version.rc b/dll/win32/windowscodecs/version.rc similarity index 100% rename from reactos/dll/win32/windowscodecs/version.rc rename to dll/win32/windowscodecs/version.rc diff --git a/reactos/dll/win32/windowscodecs/wincodecs_private.h b/dll/win32/windowscodecs/wincodecs_private.h similarity index 100% rename from reactos/dll/win32/windowscodecs/wincodecs_private.h rename to dll/win32/windowscodecs/wincodecs_private.h diff --git a/reactos/dll/win32/windowscodecs/windowscodecs.rbuild b/dll/win32/windowscodecs/windowscodecs.rbuild similarity index 100% rename from reactos/dll/win32/windowscodecs/windowscodecs.rbuild rename to dll/win32/windowscodecs/windowscodecs.rbuild diff --git a/reactos/dll/win32/windowscodecs/windowscodecs.spec b/dll/win32/windowscodecs/windowscodecs.spec similarity index 100% rename from reactos/dll/win32/windowscodecs/windowscodecs.spec rename to dll/win32/windowscodecs/windowscodecs.spec diff --git a/reactos/dll/win32/winemp3.acm/CMakeLists.txt b/dll/win32/winemp3.acm/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/winemp3.acm/CMakeLists.txt rename to dll/win32/winemp3.acm/CMakeLists.txt diff --git a/reactos/dll/win32/winemp3.acm/mpegl3.c b/dll/win32/winemp3.acm/mpegl3.c similarity index 100% rename from reactos/dll/win32/winemp3.acm/mpegl3.c rename to dll/win32/winemp3.acm/mpegl3.c diff --git a/reactos/dll/win32/winemp3.acm/winemp3.acm.rbuild b/dll/win32/winemp3.acm/winemp3.acm.rbuild similarity index 100% rename from reactos/dll/win32/winemp3.acm/winemp3.acm.rbuild rename to dll/win32/winemp3.acm/winemp3.acm.rbuild diff --git a/reactos/dll/win32/winemp3.acm/winemp3.acm.spec b/dll/win32/winemp3.acm/winemp3.acm.spec similarity index 100% rename from reactos/dll/win32/winemp3.acm/winemp3.acm.spec rename to dll/win32/winemp3.acm/winemp3.acm.spec diff --git a/reactos/dll/win32/winfax/CMakeLists.txt b/dll/win32/winfax/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/winfax/CMakeLists.txt rename to dll/win32/winfax/CMakeLists.txt diff --git a/reactos/dll/win32/winfax/precomp.h b/dll/win32/winfax/precomp.h similarity index 100% rename from reactos/dll/win32/winfax/precomp.h rename to dll/win32/winfax/precomp.h diff --git a/reactos/dll/win32/winfax/winfax.c b/dll/win32/winfax/winfax.c similarity index 100% rename from reactos/dll/win32/winfax/winfax.c rename to dll/win32/winfax/winfax.c diff --git a/reactos/dll/win32/winfax/winfax.rbuild b/dll/win32/winfax/winfax.rbuild similarity index 100% rename from reactos/dll/win32/winfax/winfax.rbuild rename to dll/win32/winfax/winfax.rbuild diff --git a/reactos/dll/win32/winfax/winfax.rc b/dll/win32/winfax/winfax.rc similarity index 100% rename from reactos/dll/win32/winfax/winfax.rc rename to dll/win32/winfax/winfax.rc diff --git a/reactos/dll/win32/winfax/winfax.spec b/dll/win32/winfax/winfax.spec similarity index 100% rename from reactos/dll/win32/winfax/winfax.spec rename to dll/win32/winfax/winfax.spec diff --git a/reactos/dll/win32/wing32/CMakeLists.txt b/dll/win32/wing32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/wing32/CMakeLists.txt rename to dll/win32/wing32/CMakeLists.txt diff --git a/reactos/dll/win32/wing32/wing32.c b/dll/win32/wing32/wing32.c similarity index 100% rename from reactos/dll/win32/wing32/wing32.c rename to dll/win32/wing32/wing32.c diff --git a/reactos/dll/win32/wing32/wing32.rbuild b/dll/win32/wing32/wing32.rbuild similarity index 100% rename from reactos/dll/win32/wing32/wing32.rbuild rename to dll/win32/wing32/wing32.rbuild diff --git a/reactos/dll/win32/wing32/wing32.spec b/dll/win32/wing32/wing32.spec similarity index 100% rename from reactos/dll/win32/wing32/wing32.spec rename to dll/win32/wing32/wing32.spec diff --git a/reactos/dll/win32/winhttp/CMakeLists.txt b/dll/win32/winhttp/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/winhttp/CMakeLists.txt rename to dll/win32/winhttp/CMakeLists.txt diff --git a/reactos/dll/win32/winhttp/cookie.c b/dll/win32/winhttp/cookie.c similarity index 100% rename from reactos/dll/win32/winhttp/cookie.c rename to dll/win32/winhttp/cookie.c diff --git a/reactos/dll/win32/winhttp/handle.c b/dll/win32/winhttp/handle.c similarity index 100% rename from reactos/dll/win32/winhttp/handle.c rename to dll/win32/winhttp/handle.c diff --git a/reactos/dll/win32/winhttp/inet_ntop.c b/dll/win32/winhttp/inet_ntop.c similarity index 100% rename from reactos/dll/win32/winhttp/inet_ntop.c rename to dll/win32/winhttp/inet_ntop.c diff --git a/reactos/dll/win32/winhttp/main.c b/dll/win32/winhttp/main.c similarity index 100% rename from reactos/dll/win32/winhttp/main.c rename to dll/win32/winhttp/main.c diff --git a/reactos/dll/win32/winhttp/net.c b/dll/win32/winhttp/net.c similarity index 100% rename from reactos/dll/win32/winhttp/net.c rename to dll/win32/winhttp/net.c diff --git a/reactos/dll/win32/winhttp/request.c b/dll/win32/winhttp/request.c similarity index 100% rename from reactos/dll/win32/winhttp/request.c rename to dll/win32/winhttp/request.c diff --git a/reactos/dll/win32/winhttp/session.c b/dll/win32/winhttp/session.c similarity index 100% rename from reactos/dll/win32/winhttp/session.c rename to dll/win32/winhttp/session.c diff --git a/reactos/dll/win32/winhttp/url.c b/dll/win32/winhttp/url.c similarity index 100% rename from reactos/dll/win32/winhttp/url.c rename to dll/win32/winhttp/url.c diff --git a/reactos/dll/win32/winhttp/winhttp.rbuild b/dll/win32/winhttp/winhttp.rbuild similarity index 100% rename from reactos/dll/win32/winhttp/winhttp.rbuild rename to dll/win32/winhttp/winhttp.rbuild diff --git a/reactos/dll/win32/winhttp/winhttp.spec b/dll/win32/winhttp/winhttp.spec similarity index 100% rename from reactos/dll/win32/winhttp/winhttp.spec rename to dll/win32/winhttp/winhttp.spec diff --git a/reactos/dll/win32/winhttp/winhttp_private.h b/dll/win32/winhttp/winhttp_private.h similarity index 100% rename from reactos/dll/win32/winhttp/winhttp_private.h rename to dll/win32/winhttp/winhttp_private.h diff --git a/reactos/dll/win32/winhttp/winhttp_ros.diff b/dll/win32/winhttp/winhttp_ros.diff similarity index 100% rename from reactos/dll/win32/winhttp/winhttp_ros.diff rename to dll/win32/winhttp/winhttp_ros.diff diff --git a/reactos/dll/win32/wininet/CMakeLists.txt b/dll/win32/wininet/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/wininet/CMakeLists.txt rename to dll/win32/wininet/CMakeLists.txt diff --git a/reactos/dll/win32/wininet/cookie.c b/dll/win32/wininet/cookie.c similarity index 100% rename from reactos/dll/win32/wininet/cookie.c rename to dll/win32/wininet/cookie.c diff --git a/reactos/dll/win32/wininet/dialogs.c b/dll/win32/wininet/dialogs.c similarity index 100% rename from reactos/dll/win32/wininet/dialogs.c rename to dll/win32/wininet/dialogs.c diff --git a/reactos/dll/win32/wininet/ftp.c b/dll/win32/wininet/ftp.c similarity index 100% rename from reactos/dll/win32/wininet/ftp.c rename to dll/win32/wininet/ftp.c diff --git a/reactos/dll/win32/wininet/gopher.c b/dll/win32/wininet/gopher.c similarity index 100% rename from reactos/dll/win32/wininet/gopher.c rename to dll/win32/wininet/gopher.c diff --git a/reactos/dll/win32/wininet/http.c b/dll/win32/wininet/http.c similarity index 100% rename from reactos/dll/win32/wininet/http.c rename to dll/win32/wininet/http.c diff --git a/reactos/dll/win32/wininet/inet_ntop.c b/dll/win32/wininet/inet_ntop.c similarity index 100% rename from reactos/dll/win32/wininet/inet_ntop.c rename to dll/win32/wininet/inet_ntop.c diff --git a/reactos/dll/win32/wininet/internet.c b/dll/win32/wininet/internet.c similarity index 100% rename from reactos/dll/win32/wininet/internet.c rename to dll/win32/wininet/internet.c diff --git a/reactos/dll/win32/wininet/internet.h b/dll/win32/wininet/internet.h similarity index 100% rename from reactos/dll/win32/wininet/internet.h rename to dll/win32/wininet/internet.h diff --git a/reactos/dll/win32/wininet/netconnection.c b/dll/win32/wininet/netconnection.c similarity index 100% rename from reactos/dll/win32/wininet/netconnection.c rename to dll/win32/wininet/netconnection.c diff --git a/reactos/dll/win32/wininet/resource.h b/dll/win32/wininet/resource.h similarity index 100% rename from reactos/dll/win32/wininet/resource.h rename to dll/win32/wininet/resource.h diff --git a/reactos/dll/win32/wininet/rsrc.rc b/dll/win32/wininet/rsrc.rc similarity index 100% rename from reactos/dll/win32/wininet/rsrc.rc rename to dll/win32/wininet/rsrc.rc diff --git a/reactos/dll/win32/wininet/urlcache.c b/dll/win32/wininet/urlcache.c similarity index 100% rename from reactos/dll/win32/wininet/urlcache.c rename to dll/win32/wininet/urlcache.c diff --git a/reactos/dll/win32/wininet/utility.c b/dll/win32/wininet/utility.c similarity index 100% rename from reactos/dll/win32/wininet/utility.c rename to dll/win32/wininet/utility.c diff --git a/reactos/dll/win32/wininet/version.rc b/dll/win32/wininet/version.rc similarity index 100% rename from reactos/dll/win32/wininet/version.rc rename to dll/win32/wininet/version.rc diff --git a/reactos/dll/win32/wininet/wininet.rbuild b/dll/win32/wininet/wininet.rbuild similarity index 100% rename from reactos/dll/win32/wininet/wininet.rbuild rename to dll/win32/wininet/wininet.rbuild diff --git a/reactos/dll/win32/wininet/wininet.spec b/dll/win32/wininet/wininet.spec similarity index 100% rename from reactos/dll/win32/wininet/wininet.spec rename to dll/win32/wininet/wininet.spec diff --git a/reactos/dll/win32/wininet/wininet_Bg.rc b/dll/win32/wininet/wininet_Bg.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_Bg.rc rename to dll/win32/wininet/wininet_Bg.rc diff --git a/reactos/dll/win32/wininet/wininet_Cs.rc b/dll/win32/wininet/wininet_Cs.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_Cs.rc rename to dll/win32/wininet/wininet_Cs.rc diff --git a/reactos/dll/win32/wininet/wininet_Da.rc b/dll/win32/wininet/wininet_Da.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_Da.rc rename to dll/win32/wininet/wininet_Da.rc diff --git a/reactos/dll/win32/wininet/wininet_De.rc b/dll/win32/wininet/wininet_De.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_De.rc rename to dll/win32/wininet/wininet_De.rc diff --git a/reactos/dll/win32/wininet/wininet_En.rc b/dll/win32/wininet/wininet_En.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_En.rc rename to dll/win32/wininet/wininet_En.rc diff --git a/reactos/dll/win32/wininet/wininet_Eo.rc b/dll/win32/wininet/wininet_Eo.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_Eo.rc rename to dll/win32/wininet/wininet_Eo.rc diff --git a/reactos/dll/win32/wininet/wininet_Es.rc b/dll/win32/wininet/wininet_Es.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_Es.rc rename to dll/win32/wininet/wininet_Es.rc diff --git a/reactos/dll/win32/wininet/wininet_Fi.rc b/dll/win32/wininet/wininet_Fi.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_Fi.rc rename to dll/win32/wininet/wininet_Fi.rc diff --git a/reactos/dll/win32/wininet/wininet_Fr.rc b/dll/win32/wininet/wininet_Fr.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_Fr.rc rename to dll/win32/wininet/wininet_Fr.rc diff --git a/reactos/dll/win32/wininet/wininet_He.rc b/dll/win32/wininet/wininet_He.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_He.rc rename to dll/win32/wininet/wininet_He.rc diff --git a/reactos/dll/win32/wininet/wininet_Hu.rc b/dll/win32/wininet/wininet_Hu.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_Hu.rc rename to dll/win32/wininet/wininet_Hu.rc diff --git a/reactos/dll/win32/wininet/wininet_It.rc b/dll/win32/wininet/wininet_It.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_It.rc rename to dll/win32/wininet/wininet_It.rc diff --git a/reactos/dll/win32/wininet/wininet_Ja.rc b/dll/win32/wininet/wininet_Ja.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_Ja.rc rename to dll/win32/wininet/wininet_Ja.rc diff --git a/reactos/dll/win32/wininet/wininet_Ko.rc b/dll/win32/wininet/wininet_Ko.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_Ko.rc rename to dll/win32/wininet/wininet_Ko.rc diff --git a/reactos/dll/win32/wininet/wininet_Lt.rc b/dll/win32/wininet/wininet_Lt.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_Lt.rc rename to dll/win32/wininet/wininet_Lt.rc diff --git a/reactos/dll/win32/wininet/wininet_Nl.rc b/dll/win32/wininet/wininet_Nl.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_Nl.rc rename to dll/win32/wininet/wininet_Nl.rc diff --git a/reactos/dll/win32/wininet/wininet_No.rc b/dll/win32/wininet/wininet_No.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_No.rc rename to dll/win32/wininet/wininet_No.rc diff --git a/reactos/dll/win32/wininet/wininet_Pl.rc b/dll/win32/wininet/wininet_Pl.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_Pl.rc rename to dll/win32/wininet/wininet_Pl.rc diff --git a/reactos/dll/win32/wininet/wininet_Pt.rc b/dll/win32/wininet/wininet_Pt.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_Pt.rc rename to dll/win32/wininet/wininet_Pt.rc diff --git a/reactos/dll/win32/wininet/wininet_Ro.rc b/dll/win32/wininet/wininet_Ro.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_Ro.rc rename to dll/win32/wininet/wininet_Ro.rc diff --git a/reactos/dll/win32/wininet/wininet_Ru.rc b/dll/win32/wininet/wininet_Ru.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_Ru.rc rename to dll/win32/wininet/wininet_Ru.rc diff --git a/reactos/dll/win32/wininet/wininet_Si.rc b/dll/win32/wininet/wininet_Si.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_Si.rc rename to dll/win32/wininet/wininet_Si.rc diff --git a/reactos/dll/win32/wininet/wininet_Sr.rc b/dll/win32/wininet/wininet_Sr.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_Sr.rc rename to dll/win32/wininet/wininet_Sr.rc diff --git a/reactos/dll/win32/wininet/wininet_Sv.rc b/dll/win32/wininet/wininet_Sv.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_Sv.rc rename to dll/win32/wininet/wininet_Sv.rc diff --git a/reactos/dll/win32/wininet/wininet_Tr.rc b/dll/win32/wininet/wininet_Tr.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_Tr.rc rename to dll/win32/wininet/wininet_Tr.rc diff --git a/reactos/dll/win32/wininet/wininet_Uk.rc b/dll/win32/wininet/wininet_Uk.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_Uk.rc rename to dll/win32/wininet/wininet_Uk.rc diff --git a/reactos/dll/win32/wininet/wininet_Zh.rc b/dll/win32/wininet/wininet_Zh.rc similarity index 100% rename from reactos/dll/win32/wininet/wininet_Zh.rc rename to dll/win32/wininet/wininet_Zh.rc diff --git a/reactos/dll/win32/wininet/wininet_main.c b/dll/win32/wininet/wininet_main.c similarity index 100% rename from reactos/dll/win32/wininet/wininet_main.c rename to dll/win32/wininet/wininet_main.c diff --git a/reactos/dll/win32/wininet/wininet_ros.diff b/dll/win32/wininet/wininet_ros.diff similarity index 100% rename from reactos/dll/win32/wininet/wininet_ros.diff rename to dll/win32/wininet/wininet_ros.diff diff --git a/reactos/dll/win32/winmm/CMakeLists.txt b/dll/win32/winmm/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/winmm/CMakeLists.txt rename to dll/win32/winmm/CMakeLists.txt diff --git a/reactos/dll/win32/winmm/driver.c b/dll/win32/winmm/driver.c similarity index 100% rename from reactos/dll/win32/winmm/driver.c rename to dll/win32/winmm/driver.c diff --git a/reactos/dll/win32/winmm/joystick.c b/dll/win32/winmm/joystick.c similarity index 100% rename from reactos/dll/win32/winmm/joystick.c rename to dll/win32/winmm/joystick.c diff --git a/reactos/dll/win32/winmm/lolvldrv.c b/dll/win32/winmm/lolvldrv.c similarity index 100% rename from reactos/dll/win32/winmm/lolvldrv.c rename to dll/win32/winmm/lolvldrv.c diff --git a/reactos/dll/win32/winmm/mci.c b/dll/win32/winmm/mci.c similarity index 100% rename from reactos/dll/win32/winmm/mci.c rename to dll/win32/winmm/mci.c diff --git a/reactos/dll/win32/winmm/midimap/CMakeLists.txt b/dll/win32/winmm/midimap/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/winmm/midimap/CMakeLists.txt rename to dll/win32/winmm/midimap/CMakeLists.txt diff --git a/reactos/dll/win32/winmm/midimap/midimap.c b/dll/win32/winmm/midimap/midimap.c similarity index 100% rename from reactos/dll/win32/winmm/midimap/midimap.c rename to dll/win32/winmm/midimap/midimap.c diff --git a/reactos/dll/win32/winmm/midimap/midimap.drv.spec b/dll/win32/winmm/midimap/midimap.drv.spec similarity index 100% rename from reactos/dll/win32/winmm/midimap/midimap.drv.spec rename to dll/win32/winmm/midimap/midimap.drv.spec diff --git a/reactos/dll/win32/winmm/midimap/midimap.rbuild b/dll/win32/winmm/midimap/midimap.rbuild similarity index 100% rename from reactos/dll/win32/winmm/midimap/midimap.rbuild rename to dll/win32/winmm/midimap/midimap.rbuild diff --git a/reactos/dll/win32/winmm/midimap/midimap.rc b/dll/win32/winmm/midimap/midimap.rc similarity index 100% rename from reactos/dll/win32/winmm/midimap/midimap.rc rename to dll/win32/winmm/midimap/midimap.rc diff --git a/reactos/dll/win32/winmm/midimap/midimap.spec b/dll/win32/winmm/midimap/midimap.spec similarity index 100% rename from reactos/dll/win32/winmm/midimap/midimap.spec rename to dll/win32/winmm/midimap/midimap.spec diff --git a/reactos/dll/win32/winmm/mmio.c b/dll/win32/winmm/mmio.c similarity index 100% rename from reactos/dll/win32/winmm/mmio.c rename to dll/win32/winmm/mmio.c diff --git a/reactos/dll/win32/winmm/playsound.c b/dll/win32/winmm/playsound.c similarity index 100% rename from reactos/dll/win32/winmm/playsound.c rename to dll/win32/winmm/playsound.c diff --git a/reactos/dll/win32/winmm/registry.c b/dll/win32/winmm/registry.c similarity index 100% rename from reactos/dll/win32/winmm/registry.c rename to dll/win32/winmm/registry.c diff --git a/reactos/dll/win32/winmm/time.c b/dll/win32/winmm/time.c similarity index 100% rename from reactos/dll/win32/winmm/time.c rename to dll/win32/winmm/time.c diff --git a/reactos/dll/win32/winmm/winemm.h b/dll/win32/winmm/winemm.h similarity index 100% rename from reactos/dll/win32/winmm/winemm.h rename to dll/win32/winmm/winemm.h diff --git a/reactos/dll/win32/winmm/winemm16.h b/dll/win32/winmm/winemm16.h similarity index 100% rename from reactos/dll/win32/winmm/winemm16.h rename to dll/win32/winmm/winemm16.h diff --git a/reactos/dll/win32/winmm/winmm.c b/dll/win32/winmm/winmm.c similarity index 100% rename from reactos/dll/win32/winmm/winmm.c rename to dll/win32/winmm/winmm.c diff --git a/reactos/dll/win32/winmm/winmm.rbuild b/dll/win32/winmm/winmm.rbuild similarity index 100% rename from reactos/dll/win32/winmm/winmm.rbuild rename to dll/win32/winmm/winmm.rbuild diff --git a/reactos/dll/win32/winmm/winmm.spec b/dll/win32/winmm/winmm.spec similarity index 100% rename from reactos/dll/win32/winmm/winmm.spec rename to dll/win32/winmm/winmm.spec diff --git a/reactos/dll/win32/winmm/winmm_Br.rc b/dll/win32/winmm/winmm_Br.rc similarity index 100% rename from reactos/dll/win32/winmm/winmm_Br.rc rename to dll/win32/winmm/winmm_Br.rc diff --git a/reactos/dll/win32/winmm/winmm_Cs.rc b/dll/win32/winmm/winmm_Cs.rc similarity index 100% rename from reactos/dll/win32/winmm/winmm_Cs.rc rename to dll/win32/winmm/winmm_Cs.rc diff --git a/reactos/dll/win32/winmm/winmm_De.rc b/dll/win32/winmm/winmm_De.rc similarity index 100% rename from reactos/dll/win32/winmm/winmm_De.rc rename to dll/win32/winmm/winmm_De.rc diff --git a/reactos/dll/win32/winmm/winmm_En.rc b/dll/win32/winmm/winmm_En.rc similarity index 100% rename from reactos/dll/win32/winmm/winmm_En.rc rename to dll/win32/winmm/winmm_En.rc diff --git a/reactos/dll/win32/winmm/winmm_Es.rc b/dll/win32/winmm/winmm_Es.rc similarity index 100% rename from reactos/dll/win32/winmm/winmm_Es.rc rename to dll/win32/winmm/winmm_Es.rc diff --git a/reactos/dll/win32/winmm/winmm_Fr.rc b/dll/win32/winmm/winmm_Fr.rc similarity index 100% rename from reactos/dll/win32/winmm/winmm_Fr.rc rename to dll/win32/winmm/winmm_Fr.rc diff --git a/reactos/dll/win32/winmm/winmm_Hu.rc b/dll/win32/winmm/winmm_Hu.rc similarity index 100% rename from reactos/dll/win32/winmm/winmm_Hu.rc rename to dll/win32/winmm/winmm_Hu.rc diff --git a/reactos/dll/win32/winmm/winmm_Id.rc b/dll/win32/winmm/winmm_Id.rc similarity index 100% rename from reactos/dll/win32/winmm/winmm_Id.rc rename to dll/win32/winmm/winmm_Id.rc diff --git a/reactos/dll/win32/winmm/winmm_It.rc b/dll/win32/winmm/winmm_It.rc similarity index 100% rename from reactos/dll/win32/winmm/winmm_It.rc rename to dll/win32/winmm/winmm_It.rc diff --git a/reactos/dll/win32/winmm/winmm_Ja.rc b/dll/win32/winmm/winmm_Ja.rc similarity index 100% rename from reactos/dll/win32/winmm/winmm_Ja.rc rename to dll/win32/winmm/winmm_Ja.rc diff --git a/reactos/dll/win32/winmm/winmm_Nl.rc b/dll/win32/winmm/winmm_Nl.rc similarity index 100% rename from reactos/dll/win32/winmm/winmm_Nl.rc rename to dll/win32/winmm/winmm_Nl.rc diff --git a/reactos/dll/win32/winmm/winmm_No.rc b/dll/win32/winmm/winmm_No.rc similarity index 100% rename from reactos/dll/win32/winmm/winmm_No.rc rename to dll/win32/winmm/winmm_No.rc diff --git a/reactos/dll/win32/winmm/winmm_Pl.rc b/dll/win32/winmm/winmm_Pl.rc similarity index 100% rename from reactos/dll/win32/winmm/winmm_Pl.rc rename to dll/win32/winmm/winmm_Pl.rc diff --git a/reactos/dll/win32/winmm/winmm_Pt.rc b/dll/win32/winmm/winmm_Pt.rc similarity index 100% rename from reactos/dll/win32/winmm/winmm_Pt.rc rename to dll/win32/winmm/winmm_Pt.rc diff --git a/reactos/dll/win32/winmm/winmm_Ro.rc b/dll/win32/winmm/winmm_Ro.rc similarity index 100% rename from reactos/dll/win32/winmm/winmm_Ro.rc rename to dll/win32/winmm/winmm_Ro.rc diff --git a/reactos/dll/win32/winmm/winmm_Ru.rc b/dll/win32/winmm/winmm_Ru.rc similarity index 100% rename from reactos/dll/win32/winmm/winmm_Ru.rc rename to dll/win32/winmm/winmm_Ru.rc diff --git a/reactos/dll/win32/winmm/winmm_Si.rc b/dll/win32/winmm/winmm_Si.rc similarity index 100% rename from reactos/dll/win32/winmm/winmm_Si.rc rename to dll/win32/winmm/winmm_Si.rc diff --git a/reactos/dll/win32/winmm/winmm_Sk.rc b/dll/win32/winmm/winmm_Sk.rc similarity index 100% rename from reactos/dll/win32/winmm/winmm_Sk.rc rename to dll/win32/winmm/winmm_Sk.rc diff --git a/reactos/dll/win32/winmm/winmm_Uk.rc b/dll/win32/winmm/winmm_Uk.rc similarity index 100% rename from reactos/dll/win32/winmm/winmm_Uk.rc rename to dll/win32/winmm/winmm_Uk.rc diff --git a/reactos/dll/win32/winmm/winmm_res.rc b/dll/win32/winmm/winmm_res.rc similarity index 100% rename from reactos/dll/win32/winmm/winmm_res.rc rename to dll/win32/winmm/winmm_res.rc diff --git a/reactos/dll/win32/winscard/precomp.h b/dll/win32/winscard/precomp.h similarity index 100% rename from reactos/dll/win32/winscard/precomp.h rename to dll/win32/winscard/precomp.h diff --git a/reactos/dll/win32/winscard/winscard.c b/dll/win32/winscard/winscard.c similarity index 100% rename from reactos/dll/win32/winscard/winscard.c rename to dll/win32/winscard/winscard.c diff --git a/reactos/dll/win32/winscard/winscard.def b/dll/win32/winscard/winscard.def similarity index 100% rename from reactos/dll/win32/winscard/winscard.def rename to dll/win32/winscard/winscard.def diff --git a/reactos/dll/win32/winscard/winscard.rc b/dll/win32/winscard/winscard.rc similarity index 100% rename from reactos/dll/win32/winscard/winscard.rc rename to dll/win32/winscard/winscard.rc diff --git a/reactos/dll/win32/winspool/CMakeLists.txt b/dll/win32/winspool/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/winspool/CMakeLists.txt rename to dll/win32/winspool/CMakeLists.txt diff --git a/reactos/dll/win32/winspool/info.c b/dll/win32/winspool/info.c similarity index 100% rename from reactos/dll/win32/winspool/info.c rename to dll/win32/winspool/info.c diff --git a/reactos/dll/win32/winspool/stubs.c b/dll/win32/winspool/stubs.c similarity index 100% rename from reactos/dll/win32/winspool/stubs.c rename to dll/win32/winspool/stubs.c diff --git a/reactos/dll/win32/winspool/winspool.rbuild b/dll/win32/winspool/winspool.rbuild similarity index 100% rename from reactos/dll/win32/winspool/winspool.rbuild rename to dll/win32/winspool/winspool.rbuild diff --git a/reactos/dll/win32/winspool/winspool.rc b/dll/win32/winspool/winspool.rc similarity index 100% rename from reactos/dll/win32/winspool/winspool.rc rename to dll/win32/winspool/winspool.rc diff --git a/reactos/dll/win32/winspool/winspool.spec b/dll/win32/winspool/winspool.spec similarity index 100% rename from reactos/dll/win32/winspool/winspool.spec rename to dll/win32/winspool/winspool.spec diff --git a/reactos/dll/win32/winsta/CMakeLists.txt b/dll/win32/winsta/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/winsta/CMakeLists.txt rename to dll/win32/winsta/CMakeLists.txt diff --git a/reactos/dll/win32/winsta/logon.c b/dll/win32/winsta/logon.c similarity index 100% rename from reactos/dll/win32/winsta/logon.c rename to dll/win32/winsta/logon.c diff --git a/reactos/dll/win32/winsta/main.c b/dll/win32/winsta/main.c similarity index 100% rename from reactos/dll/win32/winsta/main.c rename to dll/win32/winsta/main.c diff --git a/reactos/dll/win32/winsta/misc.c b/dll/win32/winsta/misc.c similarity index 100% rename from reactos/dll/win32/winsta/misc.c rename to dll/win32/winsta/misc.c diff --git a/reactos/dll/win32/winsta/query.c b/dll/win32/winsta/query.c similarity index 100% rename from reactos/dll/win32/winsta/query.c rename to dll/win32/winsta/query.c diff --git a/reactos/dll/win32/winsta/security.c b/dll/win32/winsta/security.c similarity index 100% rename from reactos/dll/win32/winsta/security.c rename to dll/win32/winsta/security.c diff --git a/reactos/dll/win32/winsta/server.c b/dll/win32/winsta/server.c similarity index 100% rename from reactos/dll/win32/winsta/server.c rename to dll/win32/winsta/server.c diff --git a/reactos/dll/win32/winsta/winsta.h b/dll/win32/winsta/winsta.h similarity index 100% rename from reactos/dll/win32/winsta/winsta.h rename to dll/win32/winsta/winsta.h diff --git a/reactos/dll/win32/winsta/winsta.rbuild b/dll/win32/winsta/winsta.rbuild similarity index 100% rename from reactos/dll/win32/winsta/winsta.rbuild rename to dll/win32/winsta/winsta.rbuild diff --git a/reactos/dll/win32/winsta/winsta.rc b/dll/win32/winsta/winsta.rc similarity index 100% rename from reactos/dll/win32/winsta/winsta.rc rename to dll/win32/winsta/winsta.rc diff --git a/reactos/dll/win32/winsta/winsta.spec b/dll/win32/winsta/winsta.spec similarity index 100% rename from reactos/dll/win32/winsta/winsta.spec rename to dll/win32/winsta/winsta.spec diff --git a/reactos/dll/win32/winsta/ws.c b/dll/win32/winsta/ws.c similarity index 100% rename from reactos/dll/win32/winsta/ws.c rename to dll/win32/winsta/ws.c diff --git a/reactos/dll/win32/wintrust/CMakeLists.txt b/dll/win32/wintrust/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/wintrust/CMakeLists.txt rename to dll/win32/wintrust/CMakeLists.txt diff --git a/reactos/dll/win32/wintrust/asn.c b/dll/win32/wintrust/asn.c similarity index 100% rename from reactos/dll/win32/wintrust/asn.c rename to dll/win32/wintrust/asn.c diff --git a/reactos/dll/win32/wintrust/crypt.c b/dll/win32/wintrust/crypt.c similarity index 100% rename from reactos/dll/win32/wintrust/crypt.c rename to dll/win32/wintrust/crypt.c diff --git a/reactos/dll/win32/wintrust/register.c b/dll/win32/wintrust/register.c similarity index 100% rename from reactos/dll/win32/wintrust/register.c rename to dll/win32/wintrust/register.c diff --git a/reactos/dll/win32/wintrust/softpub.c b/dll/win32/wintrust/softpub.c similarity index 100% rename from reactos/dll/win32/wintrust/softpub.c rename to dll/win32/wintrust/softpub.c diff --git a/reactos/dll/win32/wintrust/version.rc b/dll/win32/wintrust/version.rc similarity index 100% rename from reactos/dll/win32/wintrust/version.rc rename to dll/win32/wintrust/version.rc diff --git a/reactos/dll/win32/wintrust/wintrust.rbuild b/dll/win32/wintrust/wintrust.rbuild similarity index 100% rename from reactos/dll/win32/wintrust/wintrust.rbuild rename to dll/win32/wintrust/wintrust.rbuild diff --git a/reactos/dll/win32/wintrust/wintrust.spec b/dll/win32/wintrust/wintrust.spec similarity index 100% rename from reactos/dll/win32/wintrust/wintrust.spec rename to dll/win32/wintrust/wintrust.spec diff --git a/reactos/dll/win32/wintrust/wintrust_main.c b/dll/win32/wintrust/wintrust_main.c similarity index 100% rename from reactos/dll/win32/wintrust/wintrust_main.c rename to dll/win32/wintrust/wintrust_main.c diff --git a/reactos/dll/win32/wintrust/wintrust_priv.h b/dll/win32/wintrust/wintrust_priv.h similarity index 100% rename from reactos/dll/win32/wintrust/wintrust_priv.h rename to dll/win32/wintrust/wintrust_priv.h diff --git a/reactos/dll/win32/wintrust/wintrust_ros.diff b/dll/win32/wintrust/wintrust_ros.diff similarity index 100% rename from reactos/dll/win32/wintrust/wintrust_ros.diff rename to dll/win32/wintrust/wintrust_ros.diff diff --git a/reactos/dll/win32/wlanapi/CMakeLists.txt b/dll/win32/wlanapi/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/wlanapi/CMakeLists.txt rename to dll/win32/wlanapi/CMakeLists.txt diff --git a/reactos/dll/win32/wlanapi/main.c b/dll/win32/wlanapi/main.c similarity index 100% rename from reactos/dll/win32/wlanapi/main.c rename to dll/win32/wlanapi/main.c diff --git a/reactos/dll/win32/wlanapi/wlanapi.rbuild b/dll/win32/wlanapi/wlanapi.rbuild similarity index 100% rename from reactos/dll/win32/wlanapi/wlanapi.rbuild rename to dll/win32/wlanapi/wlanapi.rbuild diff --git a/reactos/dll/win32/wlanapi/wlanapi.spec b/dll/win32/wlanapi/wlanapi.spec similarity index 100% rename from reactos/dll/win32/wlanapi/wlanapi.spec rename to dll/win32/wlanapi/wlanapi.spec diff --git a/reactos/dll/win32/wldap32/CMakeLists.txt b/dll/win32/wldap32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/wldap32/CMakeLists.txt rename to dll/win32/wldap32/CMakeLists.txt diff --git a/reactos/dll/win32/wldap32/add.c b/dll/win32/wldap32/add.c similarity index 100% rename from reactos/dll/win32/wldap32/add.c rename to dll/win32/wldap32/add.c diff --git a/reactos/dll/win32/wldap32/ber.c b/dll/win32/wldap32/ber.c similarity index 100% rename from reactos/dll/win32/wldap32/ber.c rename to dll/win32/wldap32/ber.c diff --git a/reactos/dll/win32/wldap32/bind.c b/dll/win32/wldap32/bind.c similarity index 100% rename from reactos/dll/win32/wldap32/bind.c rename to dll/win32/wldap32/bind.c diff --git a/reactos/dll/win32/wldap32/compare.c b/dll/win32/wldap32/compare.c similarity index 100% rename from reactos/dll/win32/wldap32/compare.c rename to dll/win32/wldap32/compare.c diff --git a/reactos/dll/win32/wldap32/control.c b/dll/win32/wldap32/control.c similarity index 100% rename from reactos/dll/win32/wldap32/control.c rename to dll/win32/wldap32/control.c diff --git a/reactos/dll/win32/wldap32/delete.c b/dll/win32/wldap32/delete.c similarity index 100% rename from reactos/dll/win32/wldap32/delete.c rename to dll/win32/wldap32/delete.c diff --git a/reactos/dll/win32/wldap32/dn.c b/dll/win32/wldap32/dn.c similarity index 100% rename from reactos/dll/win32/wldap32/dn.c rename to dll/win32/wldap32/dn.c diff --git a/reactos/dll/win32/wldap32/error.c b/dll/win32/wldap32/error.c similarity index 100% rename from reactos/dll/win32/wldap32/error.c rename to dll/win32/wldap32/error.c diff --git a/reactos/dll/win32/wldap32/extended.c b/dll/win32/wldap32/extended.c similarity index 100% rename from reactos/dll/win32/wldap32/extended.c rename to dll/win32/wldap32/extended.c diff --git a/reactos/dll/win32/wldap32/init.c b/dll/win32/wldap32/init.c similarity index 100% rename from reactos/dll/win32/wldap32/init.c rename to dll/win32/wldap32/init.c diff --git a/reactos/dll/win32/wldap32/main.c b/dll/win32/wldap32/main.c similarity index 100% rename from reactos/dll/win32/wldap32/main.c rename to dll/win32/wldap32/main.c diff --git a/reactos/dll/win32/wldap32/misc.c b/dll/win32/wldap32/misc.c similarity index 100% rename from reactos/dll/win32/wldap32/misc.c rename to dll/win32/wldap32/misc.c diff --git a/reactos/dll/win32/wldap32/modify.c b/dll/win32/wldap32/modify.c similarity index 100% rename from reactos/dll/win32/wldap32/modify.c rename to dll/win32/wldap32/modify.c diff --git a/reactos/dll/win32/wldap32/modrdn.c b/dll/win32/wldap32/modrdn.c similarity index 100% rename from reactos/dll/win32/wldap32/modrdn.c rename to dll/win32/wldap32/modrdn.c diff --git a/reactos/dll/win32/wldap32/option.c b/dll/win32/wldap32/option.c similarity index 100% rename from reactos/dll/win32/wldap32/option.c rename to dll/win32/wldap32/option.c diff --git a/reactos/dll/win32/wldap32/page.c b/dll/win32/wldap32/page.c similarity index 100% rename from reactos/dll/win32/wldap32/page.c rename to dll/win32/wldap32/page.c diff --git a/reactos/dll/win32/wldap32/parse.c b/dll/win32/wldap32/parse.c similarity index 100% rename from reactos/dll/win32/wldap32/parse.c rename to dll/win32/wldap32/parse.c diff --git a/reactos/dll/win32/wldap32/rename.c b/dll/win32/wldap32/rename.c similarity index 100% rename from reactos/dll/win32/wldap32/rename.c rename to dll/win32/wldap32/rename.c diff --git a/reactos/dll/win32/wldap32/search.c b/dll/win32/wldap32/search.c similarity index 100% rename from reactos/dll/win32/wldap32/search.c rename to dll/win32/wldap32/search.c diff --git a/reactos/dll/win32/wldap32/value.c b/dll/win32/wldap32/value.c similarity index 100% rename from reactos/dll/win32/wldap32/value.c rename to dll/win32/wldap32/value.c diff --git a/reactos/dll/win32/wldap32/winldap_private.h b/dll/win32/wldap32/winldap_private.h similarity index 100% rename from reactos/dll/win32/wldap32/winldap_private.h rename to dll/win32/wldap32/winldap_private.h diff --git a/reactos/dll/win32/wldap32/wldap32.h b/dll/win32/wldap32/wldap32.h similarity index 100% rename from reactos/dll/win32/wldap32/wldap32.h rename to dll/win32/wldap32/wldap32.h diff --git a/reactos/dll/win32/wldap32/wldap32.rbuild b/dll/win32/wldap32/wldap32.rbuild similarity index 100% rename from reactos/dll/win32/wldap32/wldap32.rbuild rename to dll/win32/wldap32/wldap32.rbuild diff --git a/reactos/dll/win32/wldap32/wldap32.rc b/dll/win32/wldap32/wldap32.rc similarity index 100% rename from reactos/dll/win32/wldap32/wldap32.rc rename to dll/win32/wldap32/wldap32.rc diff --git a/reactos/dll/win32/wldap32/wldap32.spec b/dll/win32/wldap32/wldap32.spec similarity index 100% rename from reactos/dll/win32/wldap32/wldap32.spec rename to dll/win32/wldap32/wldap32.spec diff --git a/reactos/dll/win32/wldap32/wldap32_Da.rc b/dll/win32/wldap32/wldap32_Da.rc similarity index 100% rename from reactos/dll/win32/wldap32/wldap32_Da.rc rename to dll/win32/wldap32/wldap32_Da.rc diff --git a/reactos/dll/win32/wldap32/wldap32_De.rc b/dll/win32/wldap32/wldap32_De.rc similarity index 100% rename from reactos/dll/win32/wldap32/wldap32_De.rc rename to dll/win32/wldap32/wldap32_De.rc diff --git a/reactos/dll/win32/wldap32/wldap32_En.rc b/dll/win32/wldap32/wldap32_En.rc similarity index 100% rename from reactos/dll/win32/wldap32/wldap32_En.rc rename to dll/win32/wldap32/wldap32_En.rc diff --git a/reactos/dll/win32/wldap32/wldap32_Es.rc b/dll/win32/wldap32/wldap32_Es.rc similarity index 100% rename from reactos/dll/win32/wldap32/wldap32_Es.rc rename to dll/win32/wldap32/wldap32_Es.rc diff --git a/reactos/dll/win32/wldap32/wldap32_Fr.rc b/dll/win32/wldap32/wldap32_Fr.rc similarity index 100% rename from reactos/dll/win32/wldap32/wldap32_Fr.rc rename to dll/win32/wldap32/wldap32_Fr.rc diff --git a/reactos/dll/win32/wldap32/wldap32_Hu.rc b/dll/win32/wldap32/wldap32_Hu.rc similarity index 100% rename from reactos/dll/win32/wldap32/wldap32_Hu.rc rename to dll/win32/wldap32/wldap32_Hu.rc diff --git a/reactos/dll/win32/wldap32/wldap32_It.rc b/dll/win32/wldap32/wldap32_It.rc similarity index 100% rename from reactos/dll/win32/wldap32/wldap32_It.rc rename to dll/win32/wldap32/wldap32_It.rc diff --git a/reactos/dll/win32/wldap32/wldap32_Ko.rc b/dll/win32/wldap32/wldap32_Ko.rc similarity index 100% rename from reactos/dll/win32/wldap32/wldap32_Ko.rc rename to dll/win32/wldap32/wldap32_Ko.rc diff --git a/reactos/dll/win32/wldap32/wldap32_Lt.rc b/dll/win32/wldap32/wldap32_Lt.rc similarity index 100% rename from reactos/dll/win32/wldap32/wldap32_Lt.rc rename to dll/win32/wldap32/wldap32_Lt.rc diff --git a/reactos/dll/win32/wldap32/wldap32_Nl.rc b/dll/win32/wldap32/wldap32_Nl.rc similarity index 100% rename from reactos/dll/win32/wldap32/wldap32_Nl.rc rename to dll/win32/wldap32/wldap32_Nl.rc diff --git a/reactos/dll/win32/wldap32/wldap32_No.rc b/dll/win32/wldap32/wldap32_No.rc similarity index 100% rename from reactos/dll/win32/wldap32/wldap32_No.rc rename to dll/win32/wldap32/wldap32_No.rc diff --git a/reactos/dll/win32/wldap32/wldap32_Pl.rc b/dll/win32/wldap32/wldap32_Pl.rc similarity index 100% rename from reactos/dll/win32/wldap32/wldap32_Pl.rc rename to dll/win32/wldap32/wldap32_Pl.rc diff --git a/reactos/dll/win32/wldap32/wldap32_Pt.rc b/dll/win32/wldap32/wldap32_Pt.rc similarity index 100% rename from reactos/dll/win32/wldap32/wldap32_Pt.rc rename to dll/win32/wldap32/wldap32_Pt.rc diff --git a/reactos/dll/win32/wldap32/wldap32_Ro.rc b/dll/win32/wldap32/wldap32_Ro.rc similarity index 100% rename from reactos/dll/win32/wldap32/wldap32_Ro.rc rename to dll/win32/wldap32/wldap32_Ro.rc diff --git a/reactos/dll/win32/wldap32/wldap32_Ru.rc b/dll/win32/wldap32/wldap32_Ru.rc similarity index 100% rename from reactos/dll/win32/wldap32/wldap32_Ru.rc rename to dll/win32/wldap32/wldap32_Ru.rc diff --git a/reactos/dll/win32/wldap32/wldap32_Sv.rc b/dll/win32/wldap32/wldap32_Sv.rc similarity index 100% rename from reactos/dll/win32/wldap32/wldap32_Sv.rc rename to dll/win32/wldap32/wldap32_Sv.rc diff --git a/reactos/dll/win32/wldap32/wldap32_Tr.rc b/dll/win32/wldap32/wldap32_Tr.rc similarity index 100% rename from reactos/dll/win32/wldap32/wldap32_Tr.rc rename to dll/win32/wldap32/wldap32_Tr.rc diff --git a/reactos/dll/win32/wldap32/wldap32_Uk.rc b/dll/win32/wldap32/wldap32_Uk.rc similarity index 100% rename from reactos/dll/win32/wldap32/wldap32_Uk.rc rename to dll/win32/wldap32/wldap32_Uk.rc diff --git a/reactos/dll/win32/wmi/CMakeLists.txt b/dll/win32/wmi/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/wmi/CMakeLists.txt rename to dll/win32/wmi/CMakeLists.txt diff --git a/reactos/dll/win32/wmi/wmi.rbuild b/dll/win32/wmi/wmi.rbuild similarity index 100% rename from reactos/dll/win32/wmi/wmi.rbuild rename to dll/win32/wmi/wmi.rbuild diff --git a/reactos/dll/win32/wmi/wmi.rc b/dll/win32/wmi/wmi.rc similarity index 100% rename from reactos/dll/win32/wmi/wmi.rc rename to dll/win32/wmi/wmi.rc diff --git a/reactos/dll/win32/wmi/wmi.spec b/dll/win32/wmi/wmi.spec similarity index 100% rename from reactos/dll/win32/wmi/wmi.spec rename to dll/win32/wmi/wmi.spec diff --git a/reactos/dll/win32/ws2_32/CMakeLists.txt b/dll/win32/ws2_32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/ws2_32/CMakeLists.txt rename to dll/win32/ws2_32/CMakeLists.txt diff --git a/reactos/dll/win32/ws2_32/include/catalog.h b/dll/win32/ws2_32/include/catalog.h similarity index 100% rename from reactos/dll/win32/ws2_32/include/catalog.h rename to dll/win32/ws2_32/include/catalog.h diff --git a/reactos/dll/win32/ws2_32/include/debug.h b/dll/win32/ws2_32/include/debug.h similarity index 100% rename from reactos/dll/win32/ws2_32/include/debug.h rename to dll/win32/ws2_32/include/debug.h diff --git a/reactos/dll/win32/ws2_32/include/handle.h b/dll/win32/ws2_32/include/handle.h similarity index 100% rename from reactos/dll/win32/ws2_32/include/handle.h rename to dll/win32/ws2_32/include/handle.h diff --git a/reactos/dll/win32/ws2_32/include/upcall.h b/dll/win32/ws2_32/include/upcall.h similarity index 100% rename from reactos/dll/win32/ws2_32/include/upcall.h rename to dll/win32/ws2_32/include/upcall.h diff --git a/reactos/dll/win32/ws2_32/include/ws2_32.h b/dll/win32/ws2_32/include/ws2_32.h similarity index 100% rename from reactos/dll/win32/ws2_32/include/ws2_32.h rename to dll/win32/ws2_32/include/ws2_32.h diff --git a/reactos/dll/win32/ws2_32/misc/async.c b/dll/win32/ws2_32/misc/async.c similarity index 100% rename from reactos/dll/win32/ws2_32/misc/async.c rename to dll/win32/ws2_32/misc/async.c diff --git a/reactos/dll/win32/ws2_32/misc/bsd.c b/dll/win32/ws2_32/misc/bsd.c similarity index 100% rename from reactos/dll/win32/ws2_32/misc/bsd.c rename to dll/win32/ws2_32/misc/bsd.c diff --git a/reactos/dll/win32/ws2_32/misc/catalog.c b/dll/win32/ws2_32/misc/catalog.c similarity index 100% rename from reactos/dll/win32/ws2_32/misc/catalog.c rename to dll/win32/ws2_32/misc/catalog.c diff --git a/reactos/dll/win32/ws2_32/misc/dllmain.c b/dll/win32/ws2_32/misc/dllmain.c similarity index 100% rename from reactos/dll/win32/ws2_32/misc/dllmain.c rename to dll/win32/ws2_32/misc/dllmain.c diff --git a/reactos/dll/win32/ws2_32/misc/event.c b/dll/win32/ws2_32/misc/event.c similarity index 100% rename from reactos/dll/win32/ws2_32/misc/event.c rename to dll/win32/ws2_32/misc/event.c diff --git a/reactos/dll/win32/ws2_32/misc/handle.c b/dll/win32/ws2_32/misc/handle.c similarity index 100% rename from reactos/dll/win32/ws2_32/misc/handle.c rename to dll/win32/ws2_32/misc/handle.c diff --git a/reactos/dll/win32/ws2_32/misc/ns.c b/dll/win32/ws2_32/misc/ns.c similarity index 100% rename from reactos/dll/win32/ws2_32/misc/ns.c rename to dll/win32/ws2_32/misc/ns.c diff --git a/reactos/dll/win32/ws2_32/misc/sndrcv.c b/dll/win32/ws2_32/misc/sndrcv.c similarity index 100% rename from reactos/dll/win32/ws2_32/misc/sndrcv.c rename to dll/win32/ws2_32/misc/sndrcv.c diff --git a/reactos/dll/win32/ws2_32/misc/stubs.c b/dll/win32/ws2_32/misc/stubs.c similarity index 100% rename from reactos/dll/win32/ws2_32/misc/stubs.c rename to dll/win32/ws2_32/misc/stubs.c diff --git a/reactos/dll/win32/ws2_32/misc/upcall.c b/dll/win32/ws2_32/misc/upcall.c similarity index 100% rename from reactos/dll/win32/ws2_32/misc/upcall.c rename to dll/win32/ws2_32/misc/upcall.c diff --git a/reactos/dll/win32/ws2_32/tests/setup.c b/dll/win32/ws2_32/tests/setup.c similarity index 100% rename from reactos/dll/win32/ws2_32/tests/setup.c rename to dll/win32/ws2_32/tests/setup.c diff --git a/reactos/dll/win32/ws2_32/tests/stubs.tst b/dll/win32/ws2_32/tests/stubs.tst similarity index 100% rename from reactos/dll/win32/ws2_32/tests/stubs.tst rename to dll/win32/ws2_32/tests/stubs.tst diff --git a/reactos/dll/win32/ws2_32/tests/tests/WinsockEvent.c b/dll/win32/ws2_32/tests/tests/WinsockEvent.c similarity index 100% rename from reactos/dll/win32/ws2_32/tests/tests/WinsockEvent.c rename to dll/win32/ws2_32/tests/tests/WinsockEvent.c diff --git a/reactos/dll/win32/ws2_32/ws2_32.rbuild b/dll/win32/ws2_32/ws2_32.rbuild similarity index 100% rename from reactos/dll/win32/ws2_32/ws2_32.rbuild rename to dll/win32/ws2_32/ws2_32.rbuild diff --git a/reactos/dll/win32/ws2_32/ws2_32.rc b/dll/win32/ws2_32/ws2_32.rc similarity index 100% rename from reactos/dll/win32/ws2_32/ws2_32.rc rename to dll/win32/ws2_32/ws2_32.rc diff --git a/reactos/dll/win32/ws2_32/ws2_32.spec b/dll/win32/ws2_32/ws2_32.spec similarity index 100% rename from reactos/dll/win32/ws2_32/ws2_32.spec rename to dll/win32/ws2_32/ws2_32.spec diff --git a/reactos/dll/win32/ws2_32_new/CMakeLists.txt b/dll/win32/ws2_32_new/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/ws2_32_new/CMakeLists.txt rename to dll/win32/ws2_32_new/CMakeLists.txt diff --git a/reactos/dll/win32/ws2_32_new/inc/ws2_32.h b/dll/win32/ws2_32_new/inc/ws2_32.h similarity index 100% rename from reactos/dll/win32/ws2_32_new/inc/ws2_32.h rename to dll/win32/ws2_32_new/inc/ws2_32.h diff --git a/reactos/dll/win32/ws2_32_new/inc/ws2_32p.h b/dll/win32/ws2_32_new/inc/ws2_32p.h similarity index 100% rename from reactos/dll/win32/ws2_32_new/inc/ws2_32p.h rename to dll/win32/ws2_32_new/inc/ws2_32p.h diff --git a/reactos/dll/win32/ws2_32_new/src/addrconv.c b/dll/win32/ws2_32_new/src/addrconv.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/addrconv.c rename to dll/win32/ws2_32_new/src/addrconv.c diff --git a/reactos/dll/win32/ws2_32_new/src/addrinfo.c b/dll/win32/ws2_32_new/src/addrinfo.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/addrinfo.c rename to dll/win32/ws2_32_new/src/addrinfo.c diff --git a/reactos/dll/win32/ws2_32_new/src/async.c b/dll/win32/ws2_32_new/src/async.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/async.c rename to dll/win32/ws2_32_new/src/async.c diff --git a/reactos/dll/win32/ws2_32_new/src/bhook.c b/dll/win32/ws2_32_new/src/bhook.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/bhook.c rename to dll/win32/ws2_32_new/src/bhook.c diff --git a/reactos/dll/win32/ws2_32_new/src/dcatalog.c b/dll/win32/ws2_32_new/src/dcatalog.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/dcatalog.c rename to dll/win32/ws2_32_new/src/dcatalog.c diff --git a/reactos/dll/win32/ws2_32_new/src/dcatitem.c b/dll/win32/ws2_32_new/src/dcatitem.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/dcatitem.c rename to dll/win32/ws2_32_new/src/dcatitem.c diff --git a/reactos/dll/win32/ws2_32_new/src/dllmain.c b/dll/win32/ws2_32_new/src/dllmain.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/dllmain.c rename to dll/win32/ws2_32_new/src/dllmain.c diff --git a/reactos/dll/win32/ws2_32_new/src/dprocess.c b/dll/win32/ws2_32_new/src/dprocess.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/dprocess.c rename to dll/win32/ws2_32_new/src/dprocess.c diff --git a/reactos/dll/win32/ws2_32_new/src/dprovide.c b/dll/win32/ws2_32_new/src/dprovide.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/dprovide.c rename to dll/win32/ws2_32_new/src/dprovide.c diff --git a/reactos/dll/win32/ws2_32_new/src/dsocket.c b/dll/win32/ws2_32_new/src/dsocket.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/dsocket.c rename to dll/win32/ws2_32_new/src/dsocket.c diff --git a/reactos/dll/win32/ws2_32_new/src/dthread.c b/dll/win32/ws2_32_new/src/dthread.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/dthread.c rename to dll/win32/ws2_32_new/src/dthread.c diff --git a/reactos/dll/win32/ws2_32_new/src/dupsock.c b/dll/win32/ws2_32_new/src/dupsock.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/dupsock.c rename to dll/win32/ws2_32_new/src/dupsock.c diff --git a/reactos/dll/win32/ws2_32_new/src/enumprot.c b/dll/win32/ws2_32_new/src/enumprot.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/enumprot.c rename to dll/win32/ws2_32_new/src/enumprot.c diff --git a/reactos/dll/win32/ws2_32_new/src/event.c b/dll/win32/ws2_32_new/src/event.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/event.c rename to dll/win32/ws2_32_new/src/event.c diff --git a/reactos/dll/win32/ws2_32_new/src/getproto.c b/dll/win32/ws2_32_new/src/getproto.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/getproto.c rename to dll/win32/ws2_32_new/src/getproto.c diff --git a/reactos/dll/win32/ws2_32_new/src/getxbyxx.c b/dll/win32/ws2_32_new/src/getxbyxx.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/getxbyxx.c rename to dll/win32/ws2_32_new/src/getxbyxx.c diff --git a/reactos/dll/win32/ws2_32_new/src/ioctl.c b/dll/win32/ws2_32_new/src/ioctl.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/ioctl.c rename to dll/win32/ws2_32_new/src/ioctl.c diff --git a/reactos/dll/win32/ws2_32_new/src/nscatalo.c b/dll/win32/ws2_32_new/src/nscatalo.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/nscatalo.c rename to dll/win32/ws2_32_new/src/nscatalo.c diff --git a/reactos/dll/win32/ws2_32_new/src/nscatent.c b/dll/win32/ws2_32_new/src/nscatent.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/nscatent.c rename to dll/win32/ws2_32_new/src/nscatent.c diff --git a/reactos/dll/win32/ws2_32_new/src/nspinstl.c b/dll/win32/ws2_32_new/src/nspinstl.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/nspinstl.c rename to dll/win32/ws2_32_new/src/nspinstl.c diff --git a/reactos/dll/win32/ws2_32_new/src/nsprovid.c b/dll/win32/ws2_32_new/src/nsprovid.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/nsprovid.c rename to dll/win32/ws2_32_new/src/nsprovid.c diff --git a/reactos/dll/win32/ws2_32_new/src/nsquery.c b/dll/win32/ws2_32_new/src/nsquery.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/nsquery.c rename to dll/win32/ws2_32_new/src/nsquery.c diff --git a/reactos/dll/win32/ws2_32_new/src/qos.c b/dll/win32/ws2_32_new/src/qos.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/qos.c rename to dll/win32/ws2_32_new/src/qos.c diff --git a/reactos/dll/win32/ws2_32_new/src/qshelpr.c b/dll/win32/ws2_32_new/src/qshelpr.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/qshelpr.c rename to dll/win32/ws2_32_new/src/qshelpr.c diff --git a/reactos/dll/win32/ws2_32_new/src/rasdial.c b/dll/win32/ws2_32_new/src/rasdial.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/rasdial.c rename to dll/win32/ws2_32_new/src/rasdial.c diff --git a/reactos/dll/win32/ws2_32_new/src/recv.c b/dll/win32/ws2_32_new/src/recv.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/recv.c rename to dll/win32/ws2_32_new/src/recv.c diff --git a/reactos/dll/win32/ws2_32_new/src/rnr.c b/dll/win32/ws2_32_new/src/rnr.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/rnr.c rename to dll/win32/ws2_32_new/src/rnr.c diff --git a/reactos/dll/win32/ws2_32_new/src/scihlpr.c b/dll/win32/ws2_32_new/src/scihlpr.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/scihlpr.c rename to dll/win32/ws2_32_new/src/scihlpr.c diff --git a/reactos/dll/win32/ws2_32_new/src/select.c b/dll/win32/ws2_32_new/src/select.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/select.c rename to dll/win32/ws2_32_new/src/select.c diff --git a/reactos/dll/win32/ws2_32_new/src/send.c b/dll/win32/ws2_32_new/src/send.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/send.c rename to dll/win32/ws2_32_new/src/send.c diff --git a/reactos/dll/win32/ws2_32_new/src/sockctrl.c b/dll/win32/ws2_32_new/src/sockctrl.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/sockctrl.c rename to dll/win32/ws2_32_new/src/sockctrl.c diff --git a/reactos/dll/win32/ws2_32_new/src/socklife.c b/dll/win32/ws2_32_new/src/socklife.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/socklife.c rename to dll/win32/ws2_32_new/src/socklife.c diff --git a/reactos/dll/win32/ws2_32_new/src/spinstal.c b/dll/win32/ws2_32_new/src/spinstal.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/spinstal.c rename to dll/win32/ws2_32_new/src/spinstal.c diff --git a/reactos/dll/win32/ws2_32_new/src/sputil.c b/dll/win32/ws2_32_new/src/sputil.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/sputil.c rename to dll/win32/ws2_32_new/src/sputil.c diff --git a/reactos/dll/win32/ws2_32_new/src/startup.c b/dll/win32/ws2_32_new/src/startup.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/startup.c rename to dll/win32/ws2_32_new/src/startup.c diff --git a/reactos/dll/win32/ws2_32_new/src/wsautil.c b/dll/win32/ws2_32_new/src/wsautil.c similarity index 100% rename from reactos/dll/win32/ws2_32_new/src/wsautil.c rename to dll/win32/ws2_32_new/src/wsautil.c diff --git a/reactos/dll/win32/ws2_32_new/ws2_32.rbuild b/dll/win32/ws2_32_new/ws2_32.rbuild similarity index 100% rename from reactos/dll/win32/ws2_32_new/ws2_32.rbuild rename to dll/win32/ws2_32_new/ws2_32.rbuild diff --git a/reactos/dll/win32/ws2_32_new/ws2_32.rc b/dll/win32/ws2_32_new/ws2_32.rc similarity index 100% rename from reactos/dll/win32/ws2_32_new/ws2_32.rc rename to dll/win32/ws2_32_new/ws2_32.rc diff --git a/reactos/dll/win32/ws2_32_new/ws2_32.spec b/dll/win32/ws2_32_new/ws2_32.spec similarity index 100% rename from reactos/dll/win32/ws2_32_new/ws2_32.spec rename to dll/win32/ws2_32_new/ws2_32.spec diff --git a/reactos/dll/win32/ws2help/CMakeLists.txt b/dll/win32/ws2help/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/ws2help/CMakeLists.txt rename to dll/win32/ws2help/CMakeLists.txt diff --git a/reactos/dll/win32/ws2help/apc.c b/dll/win32/ws2help/apc.c similarity index 100% rename from reactos/dll/win32/ws2help/apc.c rename to dll/win32/ws2help/apc.c diff --git a/reactos/dll/win32/ws2help/context.c b/dll/win32/ws2help/context.c similarity index 100% rename from reactos/dll/win32/ws2help/context.c rename to dll/win32/ws2help/context.c diff --git a/reactos/dll/win32/ws2help/dllmain.c b/dll/win32/ws2help/dllmain.c similarity index 100% rename from reactos/dll/win32/ws2help/dllmain.c rename to dll/win32/ws2help/dllmain.c diff --git a/reactos/dll/win32/ws2help/handle.c b/dll/win32/ws2help/handle.c similarity index 100% rename from reactos/dll/win32/ws2help/handle.c rename to dll/win32/ws2help/handle.c diff --git a/reactos/dll/win32/ws2help/notify.c b/dll/win32/ws2help/notify.c similarity index 100% rename from reactos/dll/win32/ws2help/notify.c rename to dll/win32/ws2help/notify.c diff --git a/reactos/dll/win32/ws2help/precomp.h b/dll/win32/ws2help/precomp.h similarity index 100% rename from reactos/dll/win32/ws2help/precomp.h rename to dll/win32/ws2help/precomp.h diff --git a/reactos/dll/win32/ws2help/ws2help.rbuild b/dll/win32/ws2help/ws2help.rbuild similarity index 100% rename from reactos/dll/win32/ws2help/ws2help.rbuild rename to dll/win32/ws2help/ws2help.rbuild diff --git a/reactos/dll/win32/ws2help/ws2help.rc b/dll/win32/ws2help/ws2help.rc similarity index 100% rename from reactos/dll/win32/ws2help/ws2help.rc rename to dll/win32/ws2help/ws2help.rc diff --git a/reactos/dll/win32/ws2help/ws2help.spec b/dll/win32/ws2help/ws2help.spec similarity index 100% rename from reactos/dll/win32/ws2help/ws2help.spec rename to dll/win32/ws2help/ws2help.spec diff --git a/reactos/dll/win32/ws2help/wshdrv.h b/dll/win32/ws2help/wshdrv.h similarity index 100% rename from reactos/dll/win32/ws2help/wshdrv.h rename to dll/win32/ws2help/wshdrv.h diff --git a/reactos/dll/win32/wshirda/CMakeLists.txt b/dll/win32/wshirda/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/wshirda/CMakeLists.txt rename to dll/win32/wshirda/CMakeLists.txt diff --git a/reactos/dll/win32/wshirda/debug.h b/dll/win32/wshirda/debug.h similarity index 100% rename from reactos/dll/win32/wshirda/debug.h rename to dll/win32/wshirda/debug.h diff --git a/reactos/dll/win32/wshirda/wshirda.c b/dll/win32/wshirda/wshirda.c similarity index 100% rename from reactos/dll/win32/wshirda/wshirda.c rename to dll/win32/wshirda/wshirda.c diff --git a/reactos/dll/win32/wshirda/wshirda.h b/dll/win32/wshirda/wshirda.h similarity index 100% rename from reactos/dll/win32/wshirda/wshirda.h rename to dll/win32/wshirda/wshirda.h diff --git a/reactos/dll/win32/wshirda/wshirda.rbuild b/dll/win32/wshirda/wshirda.rbuild similarity index 100% rename from reactos/dll/win32/wshirda/wshirda.rbuild rename to dll/win32/wshirda/wshirda.rbuild diff --git a/reactos/dll/win32/wshirda/wshirda.rc b/dll/win32/wshirda/wshirda.rc similarity index 100% rename from reactos/dll/win32/wshirda/wshirda.rc rename to dll/win32/wshirda/wshirda.rc diff --git a/reactos/dll/win32/wshirda/wshirda.spec b/dll/win32/wshirda/wshirda.spec similarity index 100% rename from reactos/dll/win32/wshirda/wshirda.spec rename to dll/win32/wshirda/wshirda.spec diff --git a/reactos/dll/win32/wshtcpip/CMakeLists.txt b/dll/win32/wshtcpip/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/wshtcpip/CMakeLists.txt rename to dll/win32/wshtcpip/CMakeLists.txt diff --git a/reactos/dll/win32/wshtcpip/wshtcpip.c b/dll/win32/wshtcpip/wshtcpip.c similarity index 100% rename from reactos/dll/win32/wshtcpip/wshtcpip.c rename to dll/win32/wshtcpip/wshtcpip.c diff --git a/reactos/dll/win32/wshtcpip/wshtcpip.h b/dll/win32/wshtcpip/wshtcpip.h similarity index 100% rename from reactos/dll/win32/wshtcpip/wshtcpip.h rename to dll/win32/wshtcpip/wshtcpip.h diff --git a/reactos/dll/win32/wshtcpip/wshtcpip.rbuild b/dll/win32/wshtcpip/wshtcpip.rbuild similarity index 100% rename from reactos/dll/win32/wshtcpip/wshtcpip.rbuild rename to dll/win32/wshtcpip/wshtcpip.rbuild diff --git a/reactos/dll/win32/wshtcpip/wshtcpip.rc b/dll/win32/wshtcpip/wshtcpip.rc similarity index 100% rename from reactos/dll/win32/wshtcpip/wshtcpip.rc rename to dll/win32/wshtcpip/wshtcpip.rc diff --git a/reactos/dll/win32/wshtcpip/wshtcpip.spec b/dll/win32/wshtcpip/wshtcpip.spec similarity index 100% rename from reactos/dll/win32/wshtcpip/wshtcpip.spec rename to dll/win32/wshtcpip/wshtcpip.spec diff --git a/reactos/dll/win32/wshtcpip/wshtcpip_specs b/dll/win32/wshtcpip/wshtcpip_specs similarity index 100% rename from reactos/dll/win32/wshtcpip/wshtcpip_specs rename to dll/win32/wshtcpip/wshtcpip_specs diff --git a/reactos/dll/win32/wsock32/CMakeLists.txt b/dll/win32/wsock32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/wsock32/CMakeLists.txt rename to dll/win32/wsock32/CMakeLists.txt diff --git a/reactos/dll/win32/wsock32/stubs.c b/dll/win32/wsock32/stubs.c similarity index 100% rename from reactos/dll/win32/wsock32/stubs.c rename to dll/win32/wsock32/stubs.c diff --git a/reactos/dll/win32/wsock32/wsock32.rbuild b/dll/win32/wsock32/wsock32.rbuild similarity index 100% rename from reactos/dll/win32/wsock32/wsock32.rbuild rename to dll/win32/wsock32/wsock32.rbuild diff --git a/reactos/dll/win32/wsock32/wsock32.rc b/dll/win32/wsock32/wsock32.rc similarity index 100% rename from reactos/dll/win32/wsock32/wsock32.rc rename to dll/win32/wsock32/wsock32.rc diff --git a/reactos/dll/win32/wsock32/wsock32.spec b/dll/win32/wsock32/wsock32.spec similarity index 100% rename from reactos/dll/win32/wsock32/wsock32.spec rename to dll/win32/wsock32/wsock32.spec diff --git a/reactos/dll/win32/wtsapi32/CMakeLists.txt b/dll/win32/wtsapi32/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/wtsapi32/CMakeLists.txt rename to dll/win32/wtsapi32/CMakeLists.txt diff --git a/reactos/dll/win32/wtsapi32/wtsapi32.c b/dll/win32/wtsapi32/wtsapi32.c similarity index 100% rename from reactos/dll/win32/wtsapi32/wtsapi32.c rename to dll/win32/wtsapi32/wtsapi32.c diff --git a/reactos/dll/win32/wtsapi32/wtsapi32.rbuild b/dll/win32/wtsapi32/wtsapi32.rbuild similarity index 100% rename from reactos/dll/win32/wtsapi32/wtsapi32.rbuild rename to dll/win32/wtsapi32/wtsapi32.rbuild diff --git a/reactos/dll/win32/wtsapi32/wtsapi32.spec b/dll/win32/wtsapi32/wtsapi32.spec similarity index 100% rename from reactos/dll/win32/wtsapi32/wtsapi32.spec rename to dll/win32/wtsapi32/wtsapi32.spec diff --git a/reactos/dll/win32/wuapi/CMakeLists.txt b/dll/win32/wuapi/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/wuapi/CMakeLists.txt rename to dll/win32/wuapi/CMakeLists.txt diff --git a/reactos/dll/win32/wuapi/downloader.c b/dll/win32/wuapi/downloader.c similarity index 100% rename from reactos/dll/win32/wuapi/downloader.c rename to dll/win32/wuapi/downloader.c diff --git a/reactos/dll/win32/wuapi/installer.c b/dll/win32/wuapi/installer.c similarity index 100% rename from reactos/dll/win32/wuapi/installer.c rename to dll/win32/wuapi/installer.c diff --git a/reactos/dll/win32/wuapi/main.c b/dll/win32/wuapi/main.c similarity index 100% rename from reactos/dll/win32/wuapi/main.c rename to dll/win32/wuapi/main.c diff --git a/reactos/dll/win32/wuapi/regsvr.c b/dll/win32/wuapi/regsvr.c similarity index 100% rename from reactos/dll/win32/wuapi/regsvr.c rename to dll/win32/wuapi/regsvr.c diff --git a/reactos/dll/win32/wuapi/searcher.c b/dll/win32/wuapi/searcher.c similarity index 100% rename from reactos/dll/win32/wuapi/searcher.c rename to dll/win32/wuapi/searcher.c diff --git a/reactos/dll/win32/wuapi/session.c b/dll/win32/wuapi/session.c similarity index 100% rename from reactos/dll/win32/wuapi/session.c rename to dll/win32/wuapi/session.c diff --git a/reactos/dll/win32/wuapi/updates.c b/dll/win32/wuapi/updates.c similarity index 100% rename from reactos/dll/win32/wuapi/updates.c rename to dll/win32/wuapi/updates.c diff --git a/reactos/dll/win32/wuapi/wuapi.rbuild b/dll/win32/wuapi/wuapi.rbuild similarity index 100% rename from reactos/dll/win32/wuapi/wuapi.rbuild rename to dll/win32/wuapi/wuapi.rbuild diff --git a/reactos/dll/win32/wuapi/wuapi.spec b/dll/win32/wuapi/wuapi.spec similarity index 100% rename from reactos/dll/win32/wuapi/wuapi.spec rename to dll/win32/wuapi/wuapi.spec diff --git a/reactos/dll/win32/wuapi/wuapi_private.h b/dll/win32/wuapi/wuapi_private.h similarity index 100% rename from reactos/dll/win32/wuapi/wuapi_private.h rename to dll/win32/wuapi/wuapi_private.h diff --git a/reactos/dll/win32/xinput1_1/CMakeLists.txt b/dll/win32/xinput1_1/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/xinput1_1/CMakeLists.txt rename to dll/win32/xinput1_1/CMakeLists.txt diff --git a/reactos/dll/win32/xinput1_1/version.rc b/dll/win32/xinput1_1/version.rc similarity index 100% rename from reactos/dll/win32/xinput1_1/version.rc rename to dll/win32/xinput1_1/version.rc diff --git a/reactos/dll/win32/xinput1_1/xinput1_1.rbuild b/dll/win32/xinput1_1/xinput1_1.rbuild similarity index 100% rename from reactos/dll/win32/xinput1_1/xinput1_1.rbuild rename to dll/win32/xinput1_1/xinput1_1.rbuild diff --git a/reactos/dll/win32/xinput1_1/xinput1_1.spec b/dll/win32/xinput1_1/xinput1_1.spec similarity index 100% rename from reactos/dll/win32/xinput1_1/xinput1_1.spec rename to dll/win32/xinput1_1/xinput1_1.spec diff --git a/reactos/dll/win32/xinput1_1/xinput1_1_main.c b/dll/win32/xinput1_1/xinput1_1_main.c similarity index 100% rename from reactos/dll/win32/xinput1_1/xinput1_1_main.c rename to dll/win32/xinput1_1/xinput1_1_main.c diff --git a/reactos/dll/win32/xinput1_2/CMakeLists.txt b/dll/win32/xinput1_2/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/xinput1_2/CMakeLists.txt rename to dll/win32/xinput1_2/CMakeLists.txt diff --git a/reactos/dll/win32/xinput1_2/version.rc b/dll/win32/xinput1_2/version.rc similarity index 100% rename from reactos/dll/win32/xinput1_2/version.rc rename to dll/win32/xinput1_2/version.rc diff --git a/reactos/dll/win32/xinput1_2/xinput1_2.rbuild b/dll/win32/xinput1_2/xinput1_2.rbuild similarity index 100% rename from reactos/dll/win32/xinput1_2/xinput1_2.rbuild rename to dll/win32/xinput1_2/xinput1_2.rbuild diff --git a/reactos/dll/win32/xinput1_2/xinput1_2.spec b/dll/win32/xinput1_2/xinput1_2.spec similarity index 100% rename from reactos/dll/win32/xinput1_2/xinput1_2.spec rename to dll/win32/xinput1_2/xinput1_2.spec diff --git a/reactos/dll/win32/xinput1_2/xinput1_2_main.c b/dll/win32/xinput1_2/xinput1_2_main.c similarity index 100% rename from reactos/dll/win32/xinput1_2/xinput1_2_main.c rename to dll/win32/xinput1_2/xinput1_2_main.c diff --git a/reactos/dll/win32/xinput1_3/CMakeLists.txt b/dll/win32/xinput1_3/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/xinput1_3/CMakeLists.txt rename to dll/win32/xinput1_3/CMakeLists.txt diff --git a/reactos/dll/win32/xinput1_3/version.rc b/dll/win32/xinput1_3/version.rc similarity index 100% rename from reactos/dll/win32/xinput1_3/version.rc rename to dll/win32/xinput1_3/version.rc diff --git a/reactos/dll/win32/xinput1_3/xinput.h b/dll/win32/xinput1_3/xinput.h similarity index 100% rename from reactos/dll/win32/xinput1_3/xinput.h rename to dll/win32/xinput1_3/xinput.h diff --git a/reactos/dll/win32/xinput1_3/xinput1_3.rbuild b/dll/win32/xinput1_3/xinput1_3.rbuild similarity index 100% rename from reactos/dll/win32/xinput1_3/xinput1_3.rbuild rename to dll/win32/xinput1_3/xinput1_3.rbuild diff --git a/reactos/dll/win32/xinput1_3/xinput1_3.spec b/dll/win32/xinput1_3/xinput1_3.spec similarity index 100% rename from reactos/dll/win32/xinput1_3/xinput1_3.spec rename to dll/win32/xinput1_3/xinput1_3.spec diff --git a/reactos/dll/win32/xinput1_3/xinput1_3_main.c b/dll/win32/xinput1_3/xinput1_3_main.c similarity index 100% rename from reactos/dll/win32/xinput1_3/xinput1_3_main.c rename to dll/win32/xinput1_3/xinput1_3_main.c diff --git a/reactos/dll/win32/xinput9_1_0/CMakeLists.txt b/dll/win32/xinput9_1_0/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/xinput9_1_0/CMakeLists.txt rename to dll/win32/xinput9_1_0/CMakeLists.txt diff --git a/reactos/dll/win32/xinput9_1_0/version.rc b/dll/win32/xinput9_1_0/version.rc similarity index 100% rename from reactos/dll/win32/xinput9_1_0/version.rc rename to dll/win32/xinput9_1_0/version.rc diff --git a/reactos/dll/win32/xinput9_1_0/xinput9_1_0.rbuild b/dll/win32/xinput9_1_0/xinput9_1_0.rbuild similarity index 100% rename from reactos/dll/win32/xinput9_1_0/xinput9_1_0.rbuild rename to dll/win32/xinput9_1_0/xinput9_1_0.rbuild diff --git a/reactos/dll/win32/xinput9_1_0/xinput9_1_0.spec b/dll/win32/xinput9_1_0/xinput9_1_0.spec similarity index 100% rename from reactos/dll/win32/xinput9_1_0/xinput9_1_0.spec rename to dll/win32/xinput9_1_0/xinput9_1_0.spec diff --git a/reactos/dll/win32/xinput9_1_0/xinput9_1_0_main.c b/dll/win32/xinput9_1_0/xinput9_1_0_main.c similarity index 100% rename from reactos/dll/win32/xinput9_1_0/xinput9_1_0_main.c rename to dll/win32/xinput9_1_0/xinput9_1_0_main.c diff --git a/reactos/dll/win32/xmllite/CMakeLists.txt b/dll/win32/xmllite/CMakeLists.txt similarity index 100% rename from reactos/dll/win32/xmllite/CMakeLists.txt rename to dll/win32/xmllite/CMakeLists.txt diff --git a/reactos/dll/win32/xmllite/reader.c b/dll/win32/xmllite/reader.c similarity index 100% rename from reactos/dll/win32/xmllite/reader.c rename to dll/win32/xmllite/reader.c diff --git a/reactos/dll/win32/xmllite/xmllite.rbuild b/dll/win32/xmllite/xmllite.rbuild similarity index 100% rename from reactos/dll/win32/xmllite/xmllite.rbuild rename to dll/win32/xmllite/xmllite.rbuild diff --git a/reactos/dll/win32/xmllite/xmllite.spec b/dll/win32/xmllite/xmllite.spec similarity index 100% rename from reactos/dll/win32/xmllite/xmllite.spec rename to dll/win32/xmllite/xmllite.spec diff --git a/reactos/dll/win32/xmllite/xmllite_main.c b/dll/win32/xmllite/xmllite_main.c similarity index 100% rename from reactos/dll/win32/xmllite/xmllite_main.c rename to dll/win32/xmllite/xmllite_main.c diff --git a/reactos/drivers/CMakeLists.txt b/drivers/CMakeLists.txt similarity index 100% rename from reactos/drivers/CMakeLists.txt rename to drivers/CMakeLists.txt diff --git a/reactos/drivers/base/CMakeLists.txt b/drivers/base/CMakeLists.txt similarity index 100% rename from reactos/drivers/base/CMakeLists.txt rename to drivers/base/CMakeLists.txt diff --git a/reactos/drivers/base/beep/CMakeLists.txt b/drivers/base/beep/CMakeLists.txt similarity index 100% rename from reactos/drivers/base/beep/CMakeLists.txt rename to drivers/base/beep/CMakeLists.txt diff --git a/reactos/drivers/base/beep/beep.c b/drivers/base/beep/beep.c similarity index 100% rename from reactos/drivers/base/beep/beep.c rename to drivers/base/beep/beep.c diff --git a/reactos/drivers/base/beep/beep.rbuild b/drivers/base/beep/beep.rbuild similarity index 100% rename from reactos/drivers/base/beep/beep.rbuild rename to drivers/base/beep/beep.rbuild diff --git a/reactos/drivers/base/beep/beep.rc b/drivers/base/beep/beep.rc similarity index 100% rename from reactos/drivers/base/beep/beep.rc rename to drivers/base/beep/beep.rc diff --git a/reactos/drivers/base/bootvid/CMakeLists.txt b/drivers/base/bootvid/CMakeLists.txt similarity index 100% rename from reactos/drivers/base/bootvid/CMakeLists.txt rename to drivers/base/bootvid/CMakeLists.txt diff --git a/reactos/drivers/base/bootvid/arm/bootdata.c b/drivers/base/bootvid/arm/bootdata.c similarity index 100% rename from reactos/drivers/base/bootvid/arm/bootdata.c rename to drivers/base/bootvid/arm/bootdata.c diff --git a/reactos/drivers/base/bootvid/arm/bootvid.c b/drivers/base/bootvid/arm/bootvid.c similarity index 100% rename from reactos/drivers/base/bootvid/arm/bootvid.c rename to drivers/base/bootvid/arm/bootvid.c diff --git a/reactos/drivers/base/bootvid/bootvid.rbuild b/drivers/base/bootvid/bootvid.rbuild similarity index 100% rename from reactos/drivers/base/bootvid/bootvid.rbuild rename to drivers/base/bootvid/bootvid.rbuild diff --git a/reactos/drivers/base/bootvid/bootvid.rc b/drivers/base/bootvid/bootvid.rc similarity index 100% rename from reactos/drivers/base/bootvid/bootvid.rc rename to drivers/base/bootvid/bootvid.rc diff --git a/reactos/drivers/base/bootvid/bootvid.spec b/drivers/base/bootvid/bootvid.spec similarity index 100% rename from reactos/drivers/base/bootvid/bootvid.spec rename to drivers/base/bootvid/bootvid.spec diff --git a/reactos/drivers/base/bootvid/i386/bootdata.c b/drivers/base/bootvid/i386/bootdata.c similarity index 100% rename from reactos/drivers/base/bootvid/i386/bootdata.c rename to drivers/base/bootvid/i386/bootdata.c diff --git a/reactos/drivers/base/bootvid/i386/bootvid.c b/drivers/base/bootvid/i386/bootvid.c similarity index 100% rename from reactos/drivers/base/bootvid/i386/bootvid.c rename to drivers/base/bootvid/i386/bootvid.c diff --git a/reactos/drivers/base/bootvid/i386/vga.c b/drivers/base/bootvid/i386/vga.c similarity index 100% rename from reactos/drivers/base/bootvid/i386/vga.c rename to drivers/base/bootvid/i386/vga.c diff --git a/reactos/drivers/base/bootvid/precomp.h b/drivers/base/bootvid/precomp.h similarity index 100% rename from reactos/drivers/base/bootvid/precomp.h rename to drivers/base/bootvid/precomp.h diff --git a/reactos/drivers/base/directory.rbuild b/drivers/base/directory.rbuild similarity index 100% rename from reactos/drivers/base/directory.rbuild rename to drivers/base/directory.rbuild diff --git a/reactos/drivers/base/kdcom/CMakeLists.txt b/drivers/base/kdcom/CMakeLists.txt similarity index 100% rename from reactos/drivers/base/kdcom/CMakeLists.txt rename to drivers/base/kdcom/CMakeLists.txt diff --git a/reactos/drivers/base/kdcom/arm/kdbg.c b/drivers/base/kdcom/arm/kdbg.c similarity index 100% rename from reactos/drivers/base/kdcom/arm/kdbg.c rename to drivers/base/kdcom/arm/kdbg.c diff --git a/reactos/drivers/base/kdcom/i386/kdbg.c b/drivers/base/kdcom/i386/kdbg.c similarity index 100% rename from reactos/drivers/base/kdcom/i386/kdbg.c rename to drivers/base/kdcom/i386/kdbg.c diff --git a/reactos/drivers/base/kdcom/kdcom.rbuild b/drivers/base/kdcom/kdcom.rbuild similarity index 100% rename from reactos/drivers/base/kdcom/kdcom.rbuild rename to drivers/base/kdcom/kdcom.rbuild diff --git a/reactos/drivers/base/kdcom/kdcom.rc b/drivers/base/kdcom/kdcom.rc similarity index 100% rename from reactos/drivers/base/kdcom/kdcom.rc rename to drivers/base/kdcom/kdcom.rc diff --git a/reactos/drivers/base/kdcom/kdcom.spec b/drivers/base/kdcom/kdcom.spec similarity index 100% rename from reactos/drivers/base/kdcom/kdcom.spec rename to drivers/base/kdcom/kdcom.spec diff --git a/reactos/drivers/base/kddll/CMakeLists.txt b/drivers/base/kddll/CMakeLists.txt similarity index 100% rename from reactos/drivers/base/kddll/CMakeLists.txt rename to drivers/base/kddll/CMakeLists.txt diff --git a/reactos/drivers/base/kddll/kdcom.c b/drivers/base/kddll/kdcom.c similarity index 100% rename from reactos/drivers/base/kddll/kdcom.c rename to drivers/base/kddll/kdcom.c diff --git a/reactos/drivers/base/kddll/kdcom.h b/drivers/base/kddll/kdcom.h similarity index 100% rename from reactos/drivers/base/kddll/kdcom.h rename to drivers/base/kddll/kdcom.h diff --git a/reactos/drivers/base/kddll/kdcom.spec b/drivers/base/kddll/kdcom.spec similarity index 100% rename from reactos/drivers/base/kddll/kdcom.spec rename to drivers/base/kddll/kdcom.spec diff --git a/reactos/drivers/base/kddll/kddll.c b/drivers/base/kddll/kddll.c similarity index 100% rename from reactos/drivers/base/kddll/kddll.c rename to drivers/base/kddll/kddll.c diff --git a/reactos/drivers/base/kddll/kddll.h b/drivers/base/kddll/kddll.h similarity index 100% rename from reactos/drivers/base/kddll/kddll.h rename to drivers/base/kddll/kddll.h diff --git a/reactos/drivers/base/kddll/kddll.rbuild b/drivers/base/kddll/kddll.rbuild similarity index 100% rename from reactos/drivers/base/kddll/kddll.rbuild rename to drivers/base/kddll/kddll.rbuild diff --git a/reactos/drivers/base/kddll/kddll.spec b/drivers/base/kddll/kddll.spec similarity index 100% rename from reactos/drivers/base/kddll/kddll.spec rename to drivers/base/kddll/kddll.spec diff --git a/reactos/drivers/base/kddll/kdserial.c b/drivers/base/kddll/kdserial.c similarity index 100% rename from reactos/drivers/base/kddll/kdserial.c rename to drivers/base/kddll/kdserial.c diff --git a/reactos/drivers/base/nmidebug/CMakeLists.txt b/drivers/base/nmidebug/CMakeLists.txt similarity index 100% rename from reactos/drivers/base/nmidebug/CMakeLists.txt rename to drivers/base/nmidebug/CMakeLists.txt diff --git a/reactos/drivers/base/nmidebug/nmidebug.c b/drivers/base/nmidebug/nmidebug.c similarity index 100% rename from reactos/drivers/base/nmidebug/nmidebug.c rename to drivers/base/nmidebug/nmidebug.c diff --git a/reactos/drivers/base/nmidebug/nmidebug.rbuild b/drivers/base/nmidebug/nmidebug.rbuild similarity index 100% rename from reactos/drivers/base/nmidebug/nmidebug.rbuild rename to drivers/base/nmidebug/nmidebug.rbuild diff --git a/reactos/drivers/base/nmidebug/nmidebug.rc b/drivers/base/nmidebug/nmidebug.rc similarity index 100% rename from reactos/drivers/base/nmidebug/nmidebug.rc rename to drivers/base/nmidebug/nmidebug.rc diff --git a/reactos/drivers/base/null/CMakeLists.txt b/drivers/base/null/CMakeLists.txt similarity index 100% rename from reactos/drivers/base/null/CMakeLists.txt rename to drivers/base/null/CMakeLists.txt diff --git a/reactos/drivers/base/null/null.c b/drivers/base/null/null.c similarity index 100% rename from reactos/drivers/base/null/null.c rename to drivers/base/null/null.c diff --git a/reactos/drivers/base/null/null.rbuild b/drivers/base/null/null.rbuild similarity index 100% rename from reactos/drivers/base/null/null.rbuild rename to drivers/base/null/null.rbuild diff --git a/reactos/drivers/base/null/null.rc b/drivers/base/null/null.rc similarity index 100% rename from reactos/drivers/base/null/null.rc rename to drivers/base/null/null.rc diff --git a/reactos/drivers/battery/CMakeLists.txt b/drivers/battery/CMakeLists.txt similarity index 100% rename from reactos/drivers/battery/CMakeLists.txt rename to drivers/battery/CMakeLists.txt diff --git a/reactos/drivers/battery/battc/CMakeLists.txt b/drivers/battery/battc/CMakeLists.txt similarity index 100% rename from reactos/drivers/battery/battc/CMakeLists.txt rename to drivers/battery/battc/CMakeLists.txt diff --git a/reactos/drivers/battery/battc/battc.c b/drivers/battery/battc/battc.c similarity index 100% rename from reactos/drivers/battery/battc/battc.c rename to drivers/battery/battc/battc.c diff --git a/reactos/drivers/battery/battc/battc.h b/drivers/battery/battc/battc.h similarity index 100% rename from reactos/drivers/battery/battc/battc.h rename to drivers/battery/battc/battc.h diff --git a/reactos/drivers/battery/battc/battc.rbuild b/drivers/battery/battc/battc.rbuild similarity index 100% rename from reactos/drivers/battery/battc/battc.rbuild rename to drivers/battery/battc/battc.rbuild diff --git a/reactos/drivers/battery/battc/battc.rc b/drivers/battery/battc/battc.rc similarity index 100% rename from reactos/drivers/battery/battc/battc.rc rename to drivers/battery/battc/battc.rc diff --git a/reactos/drivers/battery/battc/battc.spec b/drivers/battery/battc/battc.spec similarity index 100% rename from reactos/drivers/battery/battc/battc.spec rename to drivers/battery/battc/battc.spec diff --git a/reactos/drivers/battery/directory.rbuild b/drivers/battery/directory.rbuild similarity index 100% rename from reactos/drivers/battery/directory.rbuild rename to drivers/battery/directory.rbuild diff --git a/reactos/drivers/bluetooth/directory.rbuild b/drivers/bluetooth/directory.rbuild similarity index 100% rename from reactos/drivers/bluetooth/directory.rbuild rename to drivers/bluetooth/directory.rbuild diff --git a/reactos/drivers/bluetooth/fbtusb/fbtdev.c b/drivers/bluetooth/fbtusb/fbtdev.c similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/fbtdev.c rename to drivers/bluetooth/fbtusb/fbtdev.c diff --git a/reactos/drivers/bluetooth/fbtusb/fbtpnp.c b/drivers/bluetooth/fbtusb/fbtpnp.c similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/fbtpnp.c rename to drivers/bluetooth/fbtusb/fbtpnp.c diff --git a/reactos/drivers/bluetooth/fbtusb/fbtpwr.c b/drivers/bluetooth/fbtusb/fbtpwr.c similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/fbtpwr.c rename to drivers/bluetooth/fbtusb/fbtpwr.c diff --git a/reactos/drivers/bluetooth/fbtusb/fbtrwr.c b/drivers/bluetooth/fbtusb/fbtrwr.c similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/fbtrwr.c rename to drivers/bluetooth/fbtusb/fbtrwr.c diff --git a/reactos/drivers/bluetooth/fbtusb/fbtusb.c b/drivers/bluetooth/fbtusb/fbtusb.c similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/fbtusb.c rename to drivers/bluetooth/fbtusb/fbtusb.c diff --git a/reactos/drivers/bluetooth/fbtusb/fbtusb.rbuild b/drivers/bluetooth/fbtusb/fbtusb.rbuild similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/fbtusb.rbuild rename to drivers/bluetooth/fbtusb/fbtusb.rbuild diff --git a/reactos/drivers/bluetooth/fbtusb/fbtusb.rc b/drivers/bluetooth/fbtusb/fbtusb.rc similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/fbtusb.rc rename to drivers/bluetooth/fbtusb/fbtusb.rc diff --git a/reactos/drivers/bluetooth/fbtusb/fbtwmi.c b/drivers/bluetooth/fbtusb/fbtwmi.c similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/fbtwmi.c rename to drivers/bluetooth/fbtusb/fbtwmi.c diff --git a/reactos/drivers/bluetooth/fbtusb/include/fbtHciCmdStructs.h b/drivers/bluetooth/fbtusb/include/fbtHciCmdStructs.h similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/include/fbtHciCmdStructs.h rename to drivers/bluetooth/fbtusb/include/fbtHciCmdStructs.h diff --git a/reactos/drivers/bluetooth/fbtusb/include/fbtHciCmds.h b/drivers/bluetooth/fbtusb/include/fbtHciCmds.h similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/include/fbtHciCmds.h rename to drivers/bluetooth/fbtusb/include/fbtHciCmds.h diff --git a/reactos/drivers/bluetooth/fbtusb/include/fbtHciDefs.h b/drivers/bluetooth/fbtusb/include/fbtHciDefs.h similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/include/fbtHciDefs.h rename to drivers/bluetooth/fbtusb/include/fbtHciDefs.h diff --git a/reactos/drivers/bluetooth/fbtusb/include/fbtHciErrors.h b/drivers/bluetooth/fbtusb/include/fbtHciErrors.h similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/include/fbtHciErrors.h rename to drivers/bluetooth/fbtusb/include/fbtHciErrors.h diff --git a/reactos/drivers/bluetooth/fbtusb/include/fbtHciEventStructs.h b/drivers/bluetooth/fbtusb/include/fbtHciEventStructs.h similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/include/fbtHciEventStructs.h rename to drivers/bluetooth/fbtusb/include/fbtHciEventStructs.h diff --git a/reactos/drivers/bluetooth/fbtusb/include/fbtHciEvents.h b/drivers/bluetooth/fbtusb/include/fbtHciEvents.h similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/include/fbtHciEvents.h rename to drivers/bluetooth/fbtusb/include/fbtHciEvents.h diff --git a/reactos/drivers/bluetooth/fbtusb/include/fbtHciLocal.h b/drivers/bluetooth/fbtusb/include/fbtHciLocal.h similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/include/fbtHciLocal.h rename to drivers/bluetooth/fbtusb/include/fbtHciLocal.h diff --git a/reactos/drivers/bluetooth/fbtusb/include/fbtHciOpCodes.h b/drivers/bluetooth/fbtusb/include/fbtHciOpCodes.h similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/include/fbtHciOpCodes.h rename to drivers/bluetooth/fbtusb/include/fbtHciOpCodes.h diff --git a/reactos/drivers/bluetooth/fbtusb/include/fbtHciParms.h b/drivers/bluetooth/fbtusb/include/fbtHciParms.h similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/include/fbtHciParms.h rename to drivers/bluetooth/fbtusb/include/fbtHciParms.h diff --git a/reactos/drivers/bluetooth/fbtusb/include/fbtHciRoundTrip.h b/drivers/bluetooth/fbtusb/include/fbtHciRoundTrip.h similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/include/fbtHciRoundTrip.h rename to drivers/bluetooth/fbtusb/include/fbtHciRoundTrip.h diff --git a/reactos/drivers/bluetooth/fbtusb/include/fbtHciSizes.h b/drivers/bluetooth/fbtusb/include/fbtHciSizes.h similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/include/fbtHciSizes.h rename to drivers/bluetooth/fbtusb/include/fbtHciSizes.h diff --git a/reactos/drivers/bluetooth/fbtusb/include/fbtSeXcpt.h b/drivers/bluetooth/fbtusb/include/fbtSeXcpt.h similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/include/fbtSeXcpt.h rename to drivers/bluetooth/fbtusb/include/fbtSeXcpt.h diff --git a/reactos/drivers/bluetooth/fbtusb/include/fbtdev.h b/drivers/bluetooth/fbtusb/include/fbtdev.h similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/include/fbtdev.h rename to drivers/bluetooth/fbtusb/include/fbtdev.h diff --git a/reactos/drivers/bluetooth/fbtusb/include/fbthci.h b/drivers/bluetooth/fbtusb/include/fbthci.h similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/include/fbthci.h rename to drivers/bluetooth/fbtusb/include/fbthci.h diff --git a/reactos/drivers/bluetooth/fbtusb/include/fbthw.h b/drivers/bluetooth/fbtusb/include/fbthw.h similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/include/fbthw.h rename to drivers/bluetooth/fbtusb/include/fbthw.h diff --git a/reactos/drivers/bluetooth/fbtusb/include/fbtlog.h b/drivers/bluetooth/fbtusb/include/fbtlog.h similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/include/fbtlog.h rename to drivers/bluetooth/fbtusb/include/fbtlog.h diff --git a/reactos/drivers/bluetooth/fbtusb/include/fbtpnp.h b/drivers/bluetooth/fbtusb/include/fbtpnp.h similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/include/fbtpnp.h rename to drivers/bluetooth/fbtusb/include/fbtpnp.h diff --git a/reactos/drivers/bluetooth/fbtusb/include/fbtpwr.h b/drivers/bluetooth/fbtusb/include/fbtpwr.h similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/include/fbtpwr.h rename to drivers/bluetooth/fbtusb/include/fbtpwr.h diff --git a/reactos/drivers/bluetooth/fbtusb/include/fbtreg.h b/drivers/bluetooth/fbtusb/include/fbtreg.h similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/include/fbtreg.h rename to drivers/bluetooth/fbtusb/include/fbtreg.h diff --git a/reactos/drivers/bluetooth/fbtusb/include/fbtrwr.h b/drivers/bluetooth/fbtusb/include/fbtrwr.h similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/include/fbtrwr.h rename to drivers/bluetooth/fbtusb/include/fbtrwr.h diff --git a/reactos/drivers/bluetooth/fbtusb/include/fbtusb.h b/drivers/bluetooth/fbtusb/include/fbtusb.h similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/include/fbtusb.h rename to drivers/bluetooth/fbtusb/include/fbtusb.h diff --git a/reactos/drivers/bluetooth/fbtusb/include/fbtusr.h b/drivers/bluetooth/fbtusb/include/fbtusr.h similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/include/fbtusr.h rename to drivers/bluetooth/fbtusb/include/fbtusr.h diff --git a/reactos/drivers/bluetooth/fbtusb/include/fbtutil.h b/drivers/bluetooth/fbtusb/include/fbtutil.h similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/include/fbtutil.h rename to drivers/bluetooth/fbtusb/include/fbtutil.h diff --git a/reactos/drivers/bluetooth/fbtusb/include/fbtwmi.h b/drivers/bluetooth/fbtusb/include/fbtwmi.h similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/include/fbtwmi.h rename to drivers/bluetooth/fbtusb/include/fbtwmi.h diff --git a/reactos/drivers/bluetooth/fbtusb/include/fbtxcpt.h b/drivers/bluetooth/fbtusb/include/fbtxcpt.h similarity index 100% rename from reactos/drivers/bluetooth/fbtusb/include/fbtxcpt.h rename to drivers/bluetooth/fbtusb/include/fbtxcpt.h diff --git a/reactos/drivers/bus/CMakeLists.txt b/drivers/bus/CMakeLists.txt similarity index 100% rename from reactos/drivers/bus/CMakeLists.txt rename to drivers/bus/CMakeLists.txt diff --git a/reactos/drivers/bus/acpi/CMakeLists.txt b/drivers/bus/acpi/CMakeLists.txt similarity index 100% rename from reactos/drivers/bus/acpi/CMakeLists.txt rename to drivers/bus/acpi/CMakeLists.txt diff --git a/reactos/drivers/bus/acpi/acpi.rbuild b/drivers/bus/acpi/acpi.rbuild similarity index 100% rename from reactos/drivers/bus/acpi/acpi.rbuild rename to drivers/bus/acpi/acpi.rbuild diff --git a/reactos/drivers/bus/acpi/acpi.rc b/drivers/bus/acpi/acpi.rc similarity index 100% rename from reactos/drivers/bus/acpi/acpi.rc rename to drivers/bus/acpi/acpi.rc diff --git a/reactos/drivers/bus/acpi/acpica/acpica.rbuild b/drivers/bus/acpi/acpica/acpica.rbuild similarity index 100% rename from reactos/drivers/bus/acpi/acpica/acpica.rbuild rename to drivers/bus/acpi/acpica/acpica.rbuild diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dsargs.c b/drivers/bus/acpi/acpica/dispatcher/dsargs.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/dispatcher/dsargs.c rename to drivers/bus/acpi/acpica/dispatcher/dsargs.c diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dscontrol.c b/drivers/bus/acpi/acpica/dispatcher/dscontrol.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/dispatcher/dscontrol.c rename to drivers/bus/acpi/acpica/dispatcher/dscontrol.c diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dsfield.c b/drivers/bus/acpi/acpica/dispatcher/dsfield.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/dispatcher/dsfield.c rename to drivers/bus/acpi/acpica/dispatcher/dsfield.c diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dsinit.c b/drivers/bus/acpi/acpica/dispatcher/dsinit.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/dispatcher/dsinit.c rename to drivers/bus/acpi/acpica/dispatcher/dsinit.c diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dsmethod.c b/drivers/bus/acpi/acpica/dispatcher/dsmethod.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/dispatcher/dsmethod.c rename to drivers/bus/acpi/acpica/dispatcher/dsmethod.c diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dsmthdat.c b/drivers/bus/acpi/acpica/dispatcher/dsmthdat.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/dispatcher/dsmthdat.c rename to drivers/bus/acpi/acpica/dispatcher/dsmthdat.c diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dsobject.c b/drivers/bus/acpi/acpica/dispatcher/dsobject.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/dispatcher/dsobject.c rename to drivers/bus/acpi/acpica/dispatcher/dsobject.c diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dsopcode.c b/drivers/bus/acpi/acpica/dispatcher/dsopcode.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/dispatcher/dsopcode.c rename to drivers/bus/acpi/acpica/dispatcher/dsopcode.c diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dsutils.c b/drivers/bus/acpi/acpica/dispatcher/dsutils.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/dispatcher/dsutils.c rename to drivers/bus/acpi/acpica/dispatcher/dsutils.c diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dswexec.c b/drivers/bus/acpi/acpica/dispatcher/dswexec.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/dispatcher/dswexec.c rename to drivers/bus/acpi/acpica/dispatcher/dswexec.c diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dswload.c b/drivers/bus/acpi/acpica/dispatcher/dswload.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/dispatcher/dswload.c rename to drivers/bus/acpi/acpica/dispatcher/dswload.c diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dswload2.c b/drivers/bus/acpi/acpica/dispatcher/dswload2.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/dispatcher/dswload2.c rename to drivers/bus/acpi/acpica/dispatcher/dswload2.c diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dswscope.c b/drivers/bus/acpi/acpica/dispatcher/dswscope.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/dispatcher/dswscope.c rename to drivers/bus/acpi/acpica/dispatcher/dswscope.c diff --git a/reactos/drivers/bus/acpi/acpica/dispatcher/dswstate.c b/drivers/bus/acpi/acpica/dispatcher/dswstate.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/dispatcher/dswstate.c rename to drivers/bus/acpi/acpica/dispatcher/dswstate.c diff --git a/reactos/drivers/bus/acpi/acpica/events/evevent.c b/drivers/bus/acpi/acpica/events/evevent.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/events/evevent.c rename to drivers/bus/acpi/acpica/events/evevent.c diff --git a/reactos/drivers/bus/acpi/acpica/events/evglock.c b/drivers/bus/acpi/acpica/events/evglock.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/events/evglock.c rename to drivers/bus/acpi/acpica/events/evglock.c diff --git a/reactos/drivers/bus/acpi/acpica/events/evgpe.c b/drivers/bus/acpi/acpica/events/evgpe.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/events/evgpe.c rename to drivers/bus/acpi/acpica/events/evgpe.c diff --git a/reactos/drivers/bus/acpi/acpica/events/evgpeblk.c b/drivers/bus/acpi/acpica/events/evgpeblk.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/events/evgpeblk.c rename to drivers/bus/acpi/acpica/events/evgpeblk.c diff --git a/reactos/drivers/bus/acpi/acpica/events/evgpeinit.c b/drivers/bus/acpi/acpica/events/evgpeinit.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/events/evgpeinit.c rename to drivers/bus/acpi/acpica/events/evgpeinit.c diff --git a/reactos/drivers/bus/acpi/acpica/events/evgpeutil.c b/drivers/bus/acpi/acpica/events/evgpeutil.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/events/evgpeutil.c rename to drivers/bus/acpi/acpica/events/evgpeutil.c diff --git a/reactos/drivers/bus/acpi/acpica/events/evmisc.c b/drivers/bus/acpi/acpica/events/evmisc.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/events/evmisc.c rename to drivers/bus/acpi/acpica/events/evmisc.c diff --git a/reactos/drivers/bus/acpi/acpica/events/evregion.c b/drivers/bus/acpi/acpica/events/evregion.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/events/evregion.c rename to drivers/bus/acpi/acpica/events/evregion.c diff --git a/reactos/drivers/bus/acpi/acpica/events/evrgnini.c b/drivers/bus/acpi/acpica/events/evrgnini.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/events/evrgnini.c rename to drivers/bus/acpi/acpica/events/evrgnini.c diff --git a/reactos/drivers/bus/acpi/acpica/events/evsci.c b/drivers/bus/acpi/acpica/events/evsci.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/events/evsci.c rename to drivers/bus/acpi/acpica/events/evsci.c diff --git a/reactos/drivers/bus/acpi/acpica/events/evxface.c b/drivers/bus/acpi/acpica/events/evxface.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/events/evxface.c rename to drivers/bus/acpi/acpica/events/evxface.c diff --git a/reactos/drivers/bus/acpi/acpica/events/evxfevnt.c b/drivers/bus/acpi/acpica/events/evxfevnt.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/events/evxfevnt.c rename to drivers/bus/acpi/acpica/events/evxfevnt.c diff --git a/reactos/drivers/bus/acpi/acpica/events/evxfgpe.c b/drivers/bus/acpi/acpica/events/evxfgpe.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/events/evxfgpe.c rename to drivers/bus/acpi/acpica/events/evxfgpe.c diff --git a/reactos/drivers/bus/acpi/acpica/events/evxfregn.c b/drivers/bus/acpi/acpica/events/evxfregn.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/events/evxfregn.c rename to drivers/bus/acpi/acpica/events/evxfregn.c diff --git a/reactos/drivers/bus/acpi/acpica/executer/exconfig.c b/drivers/bus/acpi/acpica/executer/exconfig.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/executer/exconfig.c rename to drivers/bus/acpi/acpica/executer/exconfig.c diff --git a/reactos/drivers/bus/acpi/acpica/executer/exconvrt.c b/drivers/bus/acpi/acpica/executer/exconvrt.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/executer/exconvrt.c rename to drivers/bus/acpi/acpica/executer/exconvrt.c diff --git a/reactos/drivers/bus/acpi/acpica/executer/excreate.c b/drivers/bus/acpi/acpica/executer/excreate.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/executer/excreate.c rename to drivers/bus/acpi/acpica/executer/excreate.c diff --git a/reactos/drivers/bus/acpi/acpica/executer/exdebug.c b/drivers/bus/acpi/acpica/executer/exdebug.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/executer/exdebug.c rename to drivers/bus/acpi/acpica/executer/exdebug.c diff --git a/reactos/drivers/bus/acpi/acpica/executer/exdump.c b/drivers/bus/acpi/acpica/executer/exdump.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/executer/exdump.c rename to drivers/bus/acpi/acpica/executer/exdump.c diff --git a/reactos/drivers/bus/acpi/acpica/executer/exfield.c b/drivers/bus/acpi/acpica/executer/exfield.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/executer/exfield.c rename to drivers/bus/acpi/acpica/executer/exfield.c diff --git a/reactos/drivers/bus/acpi/acpica/executer/exfldio.c b/drivers/bus/acpi/acpica/executer/exfldio.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/executer/exfldio.c rename to drivers/bus/acpi/acpica/executer/exfldio.c diff --git a/reactos/drivers/bus/acpi/acpica/executer/exmisc.c b/drivers/bus/acpi/acpica/executer/exmisc.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/executer/exmisc.c rename to drivers/bus/acpi/acpica/executer/exmisc.c diff --git a/reactos/drivers/bus/acpi/acpica/executer/exmutex.c b/drivers/bus/acpi/acpica/executer/exmutex.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/executer/exmutex.c rename to drivers/bus/acpi/acpica/executer/exmutex.c diff --git a/reactos/drivers/bus/acpi/acpica/executer/exnames.c b/drivers/bus/acpi/acpica/executer/exnames.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/executer/exnames.c rename to drivers/bus/acpi/acpica/executer/exnames.c diff --git a/reactos/drivers/bus/acpi/acpica/executer/exoparg1.c b/drivers/bus/acpi/acpica/executer/exoparg1.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/executer/exoparg1.c rename to drivers/bus/acpi/acpica/executer/exoparg1.c diff --git a/reactos/drivers/bus/acpi/acpica/executer/exoparg2.c b/drivers/bus/acpi/acpica/executer/exoparg2.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/executer/exoparg2.c rename to drivers/bus/acpi/acpica/executer/exoparg2.c diff --git a/reactos/drivers/bus/acpi/acpica/executer/exoparg3.c b/drivers/bus/acpi/acpica/executer/exoparg3.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/executer/exoparg3.c rename to drivers/bus/acpi/acpica/executer/exoparg3.c diff --git a/reactos/drivers/bus/acpi/acpica/executer/exoparg6.c b/drivers/bus/acpi/acpica/executer/exoparg6.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/executer/exoparg6.c rename to drivers/bus/acpi/acpica/executer/exoparg6.c diff --git a/reactos/drivers/bus/acpi/acpica/executer/exprep.c b/drivers/bus/acpi/acpica/executer/exprep.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/executer/exprep.c rename to drivers/bus/acpi/acpica/executer/exprep.c diff --git a/reactos/drivers/bus/acpi/acpica/executer/exregion.c b/drivers/bus/acpi/acpica/executer/exregion.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/executer/exregion.c rename to drivers/bus/acpi/acpica/executer/exregion.c diff --git a/reactos/drivers/bus/acpi/acpica/executer/exresnte.c b/drivers/bus/acpi/acpica/executer/exresnte.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/executer/exresnte.c rename to drivers/bus/acpi/acpica/executer/exresnte.c diff --git a/reactos/drivers/bus/acpi/acpica/executer/exresolv.c b/drivers/bus/acpi/acpica/executer/exresolv.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/executer/exresolv.c rename to drivers/bus/acpi/acpica/executer/exresolv.c diff --git a/reactos/drivers/bus/acpi/acpica/executer/exresop.c b/drivers/bus/acpi/acpica/executer/exresop.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/executer/exresop.c rename to drivers/bus/acpi/acpica/executer/exresop.c diff --git a/reactos/drivers/bus/acpi/acpica/executer/exstore.c b/drivers/bus/acpi/acpica/executer/exstore.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/executer/exstore.c rename to drivers/bus/acpi/acpica/executer/exstore.c diff --git a/reactos/drivers/bus/acpi/acpica/executer/exstoren.c b/drivers/bus/acpi/acpica/executer/exstoren.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/executer/exstoren.c rename to drivers/bus/acpi/acpica/executer/exstoren.c diff --git a/reactos/drivers/bus/acpi/acpica/executer/exstorob.c b/drivers/bus/acpi/acpica/executer/exstorob.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/executer/exstorob.c rename to drivers/bus/acpi/acpica/executer/exstorob.c diff --git a/reactos/drivers/bus/acpi/acpica/executer/exsystem.c b/drivers/bus/acpi/acpica/executer/exsystem.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/executer/exsystem.c rename to drivers/bus/acpi/acpica/executer/exsystem.c diff --git a/reactos/drivers/bus/acpi/acpica/executer/exutils.c b/drivers/bus/acpi/acpica/executer/exutils.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/executer/exutils.c rename to drivers/bus/acpi/acpica/executer/exutils.c diff --git a/reactos/drivers/bus/acpi/acpica/hardware/hwacpi.c b/drivers/bus/acpi/acpica/hardware/hwacpi.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/hardware/hwacpi.c rename to drivers/bus/acpi/acpica/hardware/hwacpi.c diff --git a/reactos/drivers/bus/acpi/acpica/hardware/hwgpe.c b/drivers/bus/acpi/acpica/hardware/hwgpe.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/hardware/hwgpe.c rename to drivers/bus/acpi/acpica/hardware/hwgpe.c diff --git a/reactos/drivers/bus/acpi/acpica/hardware/hwpci.c b/drivers/bus/acpi/acpica/hardware/hwpci.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/hardware/hwpci.c rename to drivers/bus/acpi/acpica/hardware/hwpci.c diff --git a/reactos/drivers/bus/acpi/acpica/hardware/hwregs.c b/drivers/bus/acpi/acpica/hardware/hwregs.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/hardware/hwregs.c rename to drivers/bus/acpi/acpica/hardware/hwregs.c diff --git a/reactos/drivers/bus/acpi/acpica/hardware/hwsleep.c b/drivers/bus/acpi/acpica/hardware/hwsleep.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/hardware/hwsleep.c rename to drivers/bus/acpi/acpica/hardware/hwsleep.c diff --git a/reactos/drivers/bus/acpi/acpica/hardware/hwtimer.c b/drivers/bus/acpi/acpica/hardware/hwtimer.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/hardware/hwtimer.c rename to drivers/bus/acpi/acpica/hardware/hwtimer.c diff --git a/reactos/drivers/bus/acpi/acpica/hardware/hwvalid.c b/drivers/bus/acpi/acpica/hardware/hwvalid.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/hardware/hwvalid.c rename to drivers/bus/acpi/acpica/hardware/hwvalid.c diff --git a/reactos/drivers/bus/acpi/acpica/hardware/hwxface.c b/drivers/bus/acpi/acpica/hardware/hwxface.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/hardware/hwxface.c rename to drivers/bus/acpi/acpica/hardware/hwxface.c diff --git a/reactos/drivers/bus/acpi/acpica/include/acapps.h b/drivers/bus/acpi/acpica/include/acapps.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/acapps.h rename to drivers/bus/acpi/acpica/include/acapps.h diff --git a/reactos/drivers/bus/acpi/acpica/include/accommon.h b/drivers/bus/acpi/acpica/include/accommon.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/accommon.h rename to drivers/bus/acpi/acpica/include/accommon.h diff --git a/reactos/drivers/bus/acpi/acpica/include/acconfig.h b/drivers/bus/acpi/acpica/include/acconfig.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/acconfig.h rename to drivers/bus/acpi/acpica/include/acconfig.h diff --git a/reactos/drivers/bus/acpi/acpica/include/acdebug.h b/drivers/bus/acpi/acpica/include/acdebug.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/acdebug.h rename to drivers/bus/acpi/acpica/include/acdebug.h diff --git a/reactos/drivers/bus/acpi/acpica/include/acdisasm.h b/drivers/bus/acpi/acpica/include/acdisasm.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/acdisasm.h rename to drivers/bus/acpi/acpica/include/acdisasm.h diff --git a/reactos/drivers/bus/acpi/acpica/include/acdispat.h b/drivers/bus/acpi/acpica/include/acdispat.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/acdispat.h rename to drivers/bus/acpi/acpica/include/acdispat.h diff --git a/reactos/drivers/bus/acpi/acpica/include/acevents.h b/drivers/bus/acpi/acpica/include/acevents.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/acevents.h rename to drivers/bus/acpi/acpica/include/acevents.h diff --git a/reactos/drivers/bus/acpi/acpica/include/acexcep.h b/drivers/bus/acpi/acpica/include/acexcep.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/acexcep.h rename to drivers/bus/acpi/acpica/include/acexcep.h diff --git a/reactos/drivers/bus/acpi/acpica/include/acglobal.h b/drivers/bus/acpi/acpica/include/acglobal.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/acglobal.h rename to drivers/bus/acpi/acpica/include/acglobal.h diff --git a/reactos/drivers/bus/acpi/acpica/include/achware.h b/drivers/bus/acpi/acpica/include/achware.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/achware.h rename to drivers/bus/acpi/acpica/include/achware.h diff --git a/reactos/drivers/bus/acpi/acpica/include/acinterp.h b/drivers/bus/acpi/acpica/include/acinterp.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/acinterp.h rename to drivers/bus/acpi/acpica/include/acinterp.h diff --git a/reactos/drivers/bus/acpi/acpica/include/aclocal.h b/drivers/bus/acpi/acpica/include/aclocal.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/aclocal.h rename to drivers/bus/acpi/acpica/include/aclocal.h diff --git a/reactos/drivers/bus/acpi/acpica/include/acmacros.h b/drivers/bus/acpi/acpica/include/acmacros.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/acmacros.h rename to drivers/bus/acpi/acpica/include/acmacros.h diff --git a/reactos/drivers/bus/acpi/acpica/include/acnames.h b/drivers/bus/acpi/acpica/include/acnames.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/acnames.h rename to drivers/bus/acpi/acpica/include/acnames.h diff --git a/reactos/drivers/bus/acpi/acpica/include/acnamesp.h b/drivers/bus/acpi/acpica/include/acnamesp.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/acnamesp.h rename to drivers/bus/acpi/acpica/include/acnamesp.h diff --git a/reactos/drivers/bus/acpi/acpica/include/acobject.h b/drivers/bus/acpi/acpica/include/acobject.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/acobject.h rename to drivers/bus/acpi/acpica/include/acobject.h diff --git a/reactos/drivers/bus/acpi/acpica/include/acopcode.h b/drivers/bus/acpi/acpica/include/acopcode.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/acopcode.h rename to drivers/bus/acpi/acpica/include/acopcode.h diff --git a/reactos/drivers/bus/acpi/acpica/include/acoutput.h b/drivers/bus/acpi/acpica/include/acoutput.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/acoutput.h rename to drivers/bus/acpi/acpica/include/acoutput.h diff --git a/reactos/drivers/bus/acpi/acpica/include/acparser.h b/drivers/bus/acpi/acpica/include/acparser.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/acparser.h rename to drivers/bus/acpi/acpica/include/acparser.h diff --git a/reactos/drivers/bus/acpi/acpica/include/acpi.h b/drivers/bus/acpi/acpica/include/acpi.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/acpi.h rename to drivers/bus/acpi/acpica/include/acpi.h diff --git a/reactos/drivers/bus/acpi/acpica/include/acpiosxf.h b/drivers/bus/acpi/acpica/include/acpiosxf.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/acpiosxf.h rename to drivers/bus/acpi/acpica/include/acpiosxf.h diff --git a/reactos/drivers/bus/acpi/acpica/include/acpixf.h b/drivers/bus/acpi/acpica/include/acpixf.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/acpixf.h rename to drivers/bus/acpi/acpica/include/acpixf.h diff --git a/reactos/drivers/bus/acpi/acpica/include/acpredef.h b/drivers/bus/acpi/acpica/include/acpredef.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/acpredef.h rename to drivers/bus/acpi/acpica/include/acpredef.h diff --git a/reactos/drivers/bus/acpi/acpica/include/acresrc.h b/drivers/bus/acpi/acpica/include/acresrc.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/acresrc.h rename to drivers/bus/acpi/acpica/include/acresrc.h diff --git a/reactos/drivers/bus/acpi/acpica/include/acrestyp.h b/drivers/bus/acpi/acpica/include/acrestyp.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/acrestyp.h rename to drivers/bus/acpi/acpica/include/acrestyp.h diff --git a/reactos/drivers/bus/acpi/acpica/include/acstruct.h b/drivers/bus/acpi/acpica/include/acstruct.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/acstruct.h rename to drivers/bus/acpi/acpica/include/acstruct.h diff --git a/reactos/drivers/bus/acpi/acpica/include/actables.h b/drivers/bus/acpi/acpica/include/actables.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/actables.h rename to drivers/bus/acpi/acpica/include/actables.h diff --git a/reactos/drivers/bus/acpi/acpica/include/actbl.h b/drivers/bus/acpi/acpica/include/actbl.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/actbl.h rename to drivers/bus/acpi/acpica/include/actbl.h diff --git a/reactos/drivers/bus/acpi/acpica/include/actbl1.h b/drivers/bus/acpi/acpica/include/actbl1.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/actbl1.h rename to drivers/bus/acpi/acpica/include/actbl1.h diff --git a/reactos/drivers/bus/acpi/acpica/include/actbl2.h b/drivers/bus/acpi/acpica/include/actbl2.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/actbl2.h rename to drivers/bus/acpi/acpica/include/actbl2.h diff --git a/reactos/drivers/bus/acpi/acpica/include/actbl71.h b/drivers/bus/acpi/acpica/include/actbl71.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/actbl71.h rename to drivers/bus/acpi/acpica/include/actbl71.h diff --git a/reactos/drivers/bus/acpi/acpica/include/actypes.h b/drivers/bus/acpi/acpica/include/actypes.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/actypes.h rename to drivers/bus/acpi/acpica/include/actypes.h diff --git a/reactos/drivers/bus/acpi/acpica/include/acutils.h b/drivers/bus/acpi/acpica/include/acutils.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/acutils.h rename to drivers/bus/acpi/acpica/include/acutils.h diff --git a/reactos/drivers/bus/acpi/acpica/include/amlcode.h b/drivers/bus/acpi/acpica/include/amlcode.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/amlcode.h rename to drivers/bus/acpi/acpica/include/amlcode.h diff --git a/reactos/drivers/bus/acpi/acpica/include/amlresrc.h b/drivers/bus/acpi/acpica/include/amlresrc.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/amlresrc.h rename to drivers/bus/acpi/acpica/include/amlresrc.h diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/accygwin.h b/drivers/bus/acpi/acpica/include/platform/accygwin.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/platform/accygwin.h rename to drivers/bus/acpi/acpica/include/platform/accygwin.h diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/acdos16.h b/drivers/bus/acpi/acpica/include/platform/acdos16.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/platform/acdos16.h rename to drivers/bus/acpi/acpica/include/platform/acdos16.h diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/acefi.h b/drivers/bus/acpi/acpica/include/platform/acefi.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/platform/acefi.h rename to drivers/bus/acpi/acpica/include/platform/acefi.h diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/acenv.h b/drivers/bus/acpi/acpica/include/platform/acenv.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/platform/acenv.h rename to drivers/bus/acpi/acpica/include/platform/acenv.h diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/acfreebsd.h b/drivers/bus/acpi/acpica/include/platform/acfreebsd.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/platform/acfreebsd.h rename to drivers/bus/acpi/acpica/include/platform/acfreebsd.h diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/acgcc.h b/drivers/bus/acpi/acpica/include/platform/acgcc.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/platform/acgcc.h rename to drivers/bus/acpi/acpica/include/platform/acgcc.h diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/acintel.h b/drivers/bus/acpi/acpica/include/platform/acintel.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/platform/acintel.h rename to drivers/bus/acpi/acpica/include/platform/acintel.h diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/aclinux.h b/drivers/bus/acpi/acpica/include/platform/aclinux.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/platform/aclinux.h rename to drivers/bus/acpi/acpica/include/platform/aclinux.h diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/acmsvc.h b/drivers/bus/acpi/acpica/include/platform/acmsvc.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/platform/acmsvc.h rename to drivers/bus/acpi/acpica/include/platform/acmsvc.h diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/acnetbsd.h b/drivers/bus/acpi/acpica/include/platform/acnetbsd.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/platform/acnetbsd.h rename to drivers/bus/acpi/acpica/include/platform/acnetbsd.h diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/acos2.h b/drivers/bus/acpi/acpica/include/platform/acos2.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/platform/acos2.h rename to drivers/bus/acpi/acpica/include/platform/acos2.h diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/acwin.h b/drivers/bus/acpi/acpica/include/platform/acwin.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/platform/acwin.h rename to drivers/bus/acpi/acpica/include/platform/acwin.h diff --git a/reactos/drivers/bus/acpi/acpica/include/platform/acwin64.h b/drivers/bus/acpi/acpica/include/platform/acwin64.h similarity index 100% rename from reactos/drivers/bus/acpi/acpica/include/platform/acwin64.h rename to drivers/bus/acpi/acpica/include/platform/acwin64.h diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsaccess.c b/drivers/bus/acpi/acpica/namespace/nsaccess.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/namespace/nsaccess.c rename to drivers/bus/acpi/acpica/namespace/nsaccess.c diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsalloc.c b/drivers/bus/acpi/acpica/namespace/nsalloc.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/namespace/nsalloc.c rename to drivers/bus/acpi/acpica/namespace/nsalloc.c diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsdump.c b/drivers/bus/acpi/acpica/namespace/nsdump.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/namespace/nsdump.c rename to drivers/bus/acpi/acpica/namespace/nsdump.c diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsdumpdv.c b/drivers/bus/acpi/acpica/namespace/nsdumpdv.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/namespace/nsdumpdv.c rename to drivers/bus/acpi/acpica/namespace/nsdumpdv.c diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nseval.c b/drivers/bus/acpi/acpica/namespace/nseval.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/namespace/nseval.c rename to drivers/bus/acpi/acpica/namespace/nseval.c diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsinit.c b/drivers/bus/acpi/acpica/namespace/nsinit.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/namespace/nsinit.c rename to drivers/bus/acpi/acpica/namespace/nsinit.c diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsload.c b/drivers/bus/acpi/acpica/namespace/nsload.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/namespace/nsload.c rename to drivers/bus/acpi/acpica/namespace/nsload.c diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsnames.c b/drivers/bus/acpi/acpica/namespace/nsnames.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/namespace/nsnames.c rename to drivers/bus/acpi/acpica/namespace/nsnames.c diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsobject.c b/drivers/bus/acpi/acpica/namespace/nsobject.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/namespace/nsobject.c rename to drivers/bus/acpi/acpica/namespace/nsobject.c diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsparse.c b/drivers/bus/acpi/acpica/namespace/nsparse.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/namespace/nsparse.c rename to drivers/bus/acpi/acpica/namespace/nsparse.c diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nspredef.c b/drivers/bus/acpi/acpica/namespace/nspredef.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/namespace/nspredef.c rename to drivers/bus/acpi/acpica/namespace/nspredef.c diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsrepair.c b/drivers/bus/acpi/acpica/namespace/nsrepair.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/namespace/nsrepair.c rename to drivers/bus/acpi/acpica/namespace/nsrepair.c diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsrepair2.c b/drivers/bus/acpi/acpica/namespace/nsrepair2.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/namespace/nsrepair2.c rename to drivers/bus/acpi/acpica/namespace/nsrepair2.c diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nssearch.c b/drivers/bus/acpi/acpica/namespace/nssearch.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/namespace/nssearch.c rename to drivers/bus/acpi/acpica/namespace/nssearch.c diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsutils.c b/drivers/bus/acpi/acpica/namespace/nsutils.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/namespace/nsutils.c rename to drivers/bus/acpi/acpica/namespace/nsutils.c diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nswalk.c b/drivers/bus/acpi/acpica/namespace/nswalk.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/namespace/nswalk.c rename to drivers/bus/acpi/acpica/namespace/nswalk.c diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsxfeval.c b/drivers/bus/acpi/acpica/namespace/nsxfeval.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/namespace/nsxfeval.c rename to drivers/bus/acpi/acpica/namespace/nsxfeval.c diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsxfname.c b/drivers/bus/acpi/acpica/namespace/nsxfname.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/namespace/nsxfname.c rename to drivers/bus/acpi/acpica/namespace/nsxfname.c diff --git a/reactos/drivers/bus/acpi/acpica/namespace/nsxfobj.c b/drivers/bus/acpi/acpica/namespace/nsxfobj.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/namespace/nsxfobj.c rename to drivers/bus/acpi/acpica/namespace/nsxfobj.c diff --git a/reactos/drivers/bus/acpi/acpica/parser/psargs.c b/drivers/bus/acpi/acpica/parser/psargs.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/parser/psargs.c rename to drivers/bus/acpi/acpica/parser/psargs.c diff --git a/reactos/drivers/bus/acpi/acpica/parser/psloop.c b/drivers/bus/acpi/acpica/parser/psloop.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/parser/psloop.c rename to drivers/bus/acpi/acpica/parser/psloop.c diff --git a/reactos/drivers/bus/acpi/acpica/parser/psopcode.c b/drivers/bus/acpi/acpica/parser/psopcode.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/parser/psopcode.c rename to drivers/bus/acpi/acpica/parser/psopcode.c diff --git a/reactos/drivers/bus/acpi/acpica/parser/psparse.c b/drivers/bus/acpi/acpica/parser/psparse.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/parser/psparse.c rename to drivers/bus/acpi/acpica/parser/psparse.c diff --git a/reactos/drivers/bus/acpi/acpica/parser/psscope.c b/drivers/bus/acpi/acpica/parser/psscope.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/parser/psscope.c rename to drivers/bus/acpi/acpica/parser/psscope.c diff --git a/reactos/drivers/bus/acpi/acpica/parser/pstree.c b/drivers/bus/acpi/acpica/parser/pstree.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/parser/pstree.c rename to drivers/bus/acpi/acpica/parser/pstree.c diff --git a/reactos/drivers/bus/acpi/acpica/parser/psutils.c b/drivers/bus/acpi/acpica/parser/psutils.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/parser/psutils.c rename to drivers/bus/acpi/acpica/parser/psutils.c diff --git a/reactos/drivers/bus/acpi/acpica/parser/pswalk.c b/drivers/bus/acpi/acpica/parser/pswalk.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/parser/pswalk.c rename to drivers/bus/acpi/acpica/parser/pswalk.c diff --git a/reactos/drivers/bus/acpi/acpica/parser/psxface.c b/drivers/bus/acpi/acpica/parser/psxface.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/parser/psxface.c rename to drivers/bus/acpi/acpica/parser/psxface.c diff --git a/reactos/drivers/bus/acpi/acpica/resources/rsaddr.c b/drivers/bus/acpi/acpica/resources/rsaddr.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/resources/rsaddr.c rename to drivers/bus/acpi/acpica/resources/rsaddr.c diff --git a/reactos/drivers/bus/acpi/acpica/resources/rscalc.c b/drivers/bus/acpi/acpica/resources/rscalc.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/resources/rscalc.c rename to drivers/bus/acpi/acpica/resources/rscalc.c diff --git a/reactos/drivers/bus/acpi/acpica/resources/rscreate.c b/drivers/bus/acpi/acpica/resources/rscreate.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/resources/rscreate.c rename to drivers/bus/acpi/acpica/resources/rscreate.c diff --git a/reactos/drivers/bus/acpi/acpica/resources/rsdump.c b/drivers/bus/acpi/acpica/resources/rsdump.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/resources/rsdump.c rename to drivers/bus/acpi/acpica/resources/rsdump.c diff --git a/reactos/drivers/bus/acpi/acpica/resources/rsinfo.c b/drivers/bus/acpi/acpica/resources/rsinfo.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/resources/rsinfo.c rename to drivers/bus/acpi/acpica/resources/rsinfo.c diff --git a/reactos/drivers/bus/acpi/acpica/resources/rsio.c b/drivers/bus/acpi/acpica/resources/rsio.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/resources/rsio.c rename to drivers/bus/acpi/acpica/resources/rsio.c diff --git a/reactos/drivers/bus/acpi/acpica/resources/rsirq.c b/drivers/bus/acpi/acpica/resources/rsirq.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/resources/rsirq.c rename to drivers/bus/acpi/acpica/resources/rsirq.c diff --git a/reactos/drivers/bus/acpi/acpica/resources/rslist.c b/drivers/bus/acpi/acpica/resources/rslist.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/resources/rslist.c rename to drivers/bus/acpi/acpica/resources/rslist.c diff --git a/reactos/drivers/bus/acpi/acpica/resources/rsmemory.c b/drivers/bus/acpi/acpica/resources/rsmemory.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/resources/rsmemory.c rename to drivers/bus/acpi/acpica/resources/rsmemory.c diff --git a/reactos/drivers/bus/acpi/acpica/resources/rsmisc.c b/drivers/bus/acpi/acpica/resources/rsmisc.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/resources/rsmisc.c rename to drivers/bus/acpi/acpica/resources/rsmisc.c diff --git a/reactos/drivers/bus/acpi/acpica/resources/rsutils.c b/drivers/bus/acpi/acpica/resources/rsutils.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/resources/rsutils.c rename to drivers/bus/acpi/acpica/resources/rsutils.c diff --git a/reactos/drivers/bus/acpi/acpica/resources/rsxface.c b/drivers/bus/acpi/acpica/resources/rsxface.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/resources/rsxface.c rename to drivers/bus/acpi/acpica/resources/rsxface.c diff --git a/reactos/drivers/bus/acpi/acpica/tables/tbconvrt.c b/drivers/bus/acpi/acpica/tables/tbconvrt.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/tables/tbconvrt.c rename to drivers/bus/acpi/acpica/tables/tbconvrt.c diff --git a/reactos/drivers/bus/acpi/acpica/tables/tbfadt.c b/drivers/bus/acpi/acpica/tables/tbfadt.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/tables/tbfadt.c rename to drivers/bus/acpi/acpica/tables/tbfadt.c diff --git a/reactos/drivers/bus/acpi/acpica/tables/tbfind.c b/drivers/bus/acpi/acpica/tables/tbfind.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/tables/tbfind.c rename to drivers/bus/acpi/acpica/tables/tbfind.c diff --git a/reactos/drivers/bus/acpi/acpica/tables/tbget.c b/drivers/bus/acpi/acpica/tables/tbget.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/tables/tbget.c rename to drivers/bus/acpi/acpica/tables/tbget.c diff --git a/reactos/drivers/bus/acpi/acpica/tables/tbinstal.c b/drivers/bus/acpi/acpica/tables/tbinstal.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/tables/tbinstal.c rename to drivers/bus/acpi/acpica/tables/tbinstal.c diff --git a/reactos/drivers/bus/acpi/acpica/tables/tbutils.c b/drivers/bus/acpi/acpica/tables/tbutils.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/tables/tbutils.c rename to drivers/bus/acpi/acpica/tables/tbutils.c diff --git a/reactos/drivers/bus/acpi/acpica/tables/tbxface.c b/drivers/bus/acpi/acpica/tables/tbxface.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/tables/tbxface.c rename to drivers/bus/acpi/acpica/tables/tbxface.c diff --git a/reactos/drivers/bus/acpi/acpica/tables/tbxfroot.c b/drivers/bus/acpi/acpica/tables/tbxfroot.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/tables/tbxfroot.c rename to drivers/bus/acpi/acpica/tables/tbxfroot.c diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utalloc.c b/drivers/bus/acpi/acpica/utilities/utalloc.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/utilities/utalloc.c rename to drivers/bus/acpi/acpica/utilities/utalloc.c diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utcache.c b/drivers/bus/acpi/acpica/utilities/utcache.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/utilities/utcache.c rename to drivers/bus/acpi/acpica/utilities/utcache.c diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utclib.c b/drivers/bus/acpi/acpica/utilities/utclib.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/utilities/utclib.c rename to drivers/bus/acpi/acpica/utilities/utclib.c diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utcopy.c b/drivers/bus/acpi/acpica/utilities/utcopy.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/utilities/utcopy.c rename to drivers/bus/acpi/acpica/utilities/utcopy.c diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utdebug.c b/drivers/bus/acpi/acpica/utilities/utdebug.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/utilities/utdebug.c rename to drivers/bus/acpi/acpica/utilities/utdebug.c diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utdecode.c b/drivers/bus/acpi/acpica/utilities/utdecode.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/utilities/utdecode.c rename to drivers/bus/acpi/acpica/utilities/utdecode.c diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utdelete.c b/drivers/bus/acpi/acpica/utilities/utdelete.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/utilities/utdelete.c rename to drivers/bus/acpi/acpica/utilities/utdelete.c diff --git a/reactos/drivers/bus/acpi/acpica/utilities/uteval.c b/drivers/bus/acpi/acpica/utilities/uteval.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/utilities/uteval.c rename to drivers/bus/acpi/acpica/utilities/uteval.c diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utglobal.c b/drivers/bus/acpi/acpica/utilities/utglobal.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/utilities/utglobal.c rename to drivers/bus/acpi/acpica/utilities/utglobal.c diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utids.c b/drivers/bus/acpi/acpica/utilities/utids.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/utilities/utids.c rename to drivers/bus/acpi/acpica/utilities/utids.c diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utinit.c b/drivers/bus/acpi/acpica/utilities/utinit.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/utilities/utinit.c rename to drivers/bus/acpi/acpica/utilities/utinit.c diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utlock.c b/drivers/bus/acpi/acpica/utilities/utlock.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/utilities/utlock.c rename to drivers/bus/acpi/acpica/utilities/utlock.c diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utmath.c b/drivers/bus/acpi/acpica/utilities/utmath.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/utilities/utmath.c rename to drivers/bus/acpi/acpica/utilities/utmath.c diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utmisc.c b/drivers/bus/acpi/acpica/utilities/utmisc.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/utilities/utmisc.c rename to drivers/bus/acpi/acpica/utilities/utmisc.c diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utmutex.c b/drivers/bus/acpi/acpica/utilities/utmutex.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/utilities/utmutex.c rename to drivers/bus/acpi/acpica/utilities/utmutex.c diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utobject.c b/drivers/bus/acpi/acpica/utilities/utobject.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/utilities/utobject.c rename to drivers/bus/acpi/acpica/utilities/utobject.c diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utosi.c b/drivers/bus/acpi/acpica/utilities/utosi.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/utilities/utosi.c rename to drivers/bus/acpi/acpica/utilities/utosi.c diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utresrc.c b/drivers/bus/acpi/acpica/utilities/utresrc.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/utilities/utresrc.c rename to drivers/bus/acpi/acpica/utilities/utresrc.c diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utstate.c b/drivers/bus/acpi/acpica/utilities/utstate.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/utilities/utstate.c rename to drivers/bus/acpi/acpica/utilities/utstate.c diff --git a/reactos/drivers/bus/acpi/acpica/utilities/uttrack.c b/drivers/bus/acpi/acpica/utilities/uttrack.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/utilities/uttrack.c rename to drivers/bus/acpi/acpica/utilities/uttrack.c diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utxface.c b/drivers/bus/acpi/acpica/utilities/utxface.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/utilities/utxface.c rename to drivers/bus/acpi/acpica/utilities/utxface.c diff --git a/reactos/drivers/bus/acpi/acpica/utilities/utxferror.c b/drivers/bus/acpi/acpica/utilities/utxferror.c similarity index 100% rename from reactos/drivers/bus/acpi/acpica/utilities/utxferror.c rename to drivers/bus/acpi/acpica/utilities/utxferror.c diff --git a/reactos/drivers/bus/acpi/acpienum.c b/drivers/bus/acpi/acpienum.c similarity index 100% rename from reactos/drivers/bus/acpi/acpienum.c rename to drivers/bus/acpi/acpienum.c diff --git a/reactos/drivers/bus/acpi/busmgr/bus.c b/drivers/bus/acpi/busmgr/bus.c similarity index 100% rename from reactos/drivers/bus/acpi/busmgr/bus.c rename to drivers/bus/acpi/busmgr/bus.c diff --git a/reactos/drivers/bus/acpi/busmgr/button.c b/drivers/bus/acpi/busmgr/button.c similarity index 100% rename from reactos/drivers/bus/acpi/busmgr/button.c rename to drivers/bus/acpi/busmgr/button.c diff --git a/reactos/drivers/bus/acpi/busmgr/power.c b/drivers/bus/acpi/busmgr/power.c similarity index 100% rename from reactos/drivers/bus/acpi/busmgr/power.c rename to drivers/bus/acpi/busmgr/power.c diff --git a/reactos/drivers/bus/acpi/busmgr/system.c b/drivers/bus/acpi/busmgr/system.c similarity index 100% rename from reactos/drivers/bus/acpi/busmgr/system.c rename to drivers/bus/acpi/busmgr/system.c diff --git a/reactos/drivers/bus/acpi/busmgr/utils.c b/drivers/bus/acpi/busmgr/utils.c similarity index 100% rename from reactos/drivers/bus/acpi/busmgr/utils.c rename to drivers/bus/acpi/busmgr/utils.c diff --git a/reactos/drivers/bus/acpi/buspdo.c b/drivers/bus/acpi/buspdo.c similarity index 100% rename from reactos/drivers/bus/acpi/buspdo.c rename to drivers/bus/acpi/buspdo.c diff --git a/reactos/drivers/bus/acpi/cmbatt/CMakeLists.txt b/drivers/bus/acpi/cmbatt/CMakeLists.txt similarity index 100% rename from reactos/drivers/bus/acpi/cmbatt/CMakeLists.txt rename to drivers/bus/acpi/cmbatt/CMakeLists.txt diff --git a/reactos/drivers/bus/acpi/cmbatt/cmbatt.c b/drivers/bus/acpi/cmbatt/cmbatt.c similarity index 100% rename from reactos/drivers/bus/acpi/cmbatt/cmbatt.c rename to drivers/bus/acpi/cmbatt/cmbatt.c diff --git a/reactos/drivers/bus/acpi/cmbatt/cmbatt.h b/drivers/bus/acpi/cmbatt/cmbatt.h similarity index 100% rename from reactos/drivers/bus/acpi/cmbatt/cmbatt.h rename to drivers/bus/acpi/cmbatt/cmbatt.h diff --git a/reactos/drivers/bus/acpi/cmbatt/cmbatt.rbuild b/drivers/bus/acpi/cmbatt/cmbatt.rbuild similarity index 100% rename from reactos/drivers/bus/acpi/cmbatt/cmbatt.rbuild rename to drivers/bus/acpi/cmbatt/cmbatt.rbuild diff --git a/reactos/drivers/bus/acpi/cmbatt/cmbatt.rc b/drivers/bus/acpi/cmbatt/cmbatt.rc similarity index 100% rename from reactos/drivers/bus/acpi/cmbatt/cmbatt.rc rename to drivers/bus/acpi/cmbatt/cmbatt.rc diff --git a/reactos/drivers/bus/acpi/cmbatt/cmbpnp.c b/drivers/bus/acpi/cmbatt/cmbpnp.c similarity index 100% rename from reactos/drivers/bus/acpi/cmbatt/cmbpnp.c rename to drivers/bus/acpi/cmbatt/cmbpnp.c diff --git a/reactos/drivers/bus/acpi/cmbatt/cmbwmi.c b/drivers/bus/acpi/cmbatt/cmbwmi.c similarity index 100% rename from reactos/drivers/bus/acpi/cmbatt/cmbwmi.c rename to drivers/bus/acpi/cmbatt/cmbwmi.c diff --git a/reactos/drivers/bus/acpi/cmbatt/cmexec.c b/drivers/bus/acpi/cmbatt/cmexec.c similarity index 100% rename from reactos/drivers/bus/acpi/cmbatt/cmexec.c rename to drivers/bus/acpi/cmbatt/cmexec.c diff --git a/reactos/drivers/bus/acpi/compbatt/CMakeLists.txt b/drivers/bus/acpi/compbatt/CMakeLists.txt similarity index 100% rename from reactos/drivers/bus/acpi/compbatt/CMakeLists.txt rename to drivers/bus/acpi/compbatt/CMakeLists.txt diff --git a/reactos/drivers/bus/acpi/compbatt/compbatt.c b/drivers/bus/acpi/compbatt/compbatt.c similarity index 100% rename from reactos/drivers/bus/acpi/compbatt/compbatt.c rename to drivers/bus/acpi/compbatt/compbatt.c diff --git a/reactos/drivers/bus/acpi/compbatt/compbatt.h b/drivers/bus/acpi/compbatt/compbatt.h similarity index 100% rename from reactos/drivers/bus/acpi/compbatt/compbatt.h rename to drivers/bus/acpi/compbatt/compbatt.h diff --git a/reactos/drivers/bus/acpi/compbatt/compbatt.rbuild b/drivers/bus/acpi/compbatt/compbatt.rbuild similarity index 100% rename from reactos/drivers/bus/acpi/compbatt/compbatt.rbuild rename to drivers/bus/acpi/compbatt/compbatt.rbuild diff --git a/reactos/drivers/bus/acpi/compbatt/compbatt.rc b/drivers/bus/acpi/compbatt/compbatt.rc similarity index 100% rename from reactos/drivers/bus/acpi/compbatt/compbatt.rc rename to drivers/bus/acpi/compbatt/compbatt.rc diff --git a/reactos/drivers/bus/acpi/compbatt/compmisc.c b/drivers/bus/acpi/compbatt/compmisc.c similarity index 100% rename from reactos/drivers/bus/acpi/compbatt/compmisc.c rename to drivers/bus/acpi/compbatt/compmisc.c diff --git a/reactos/drivers/bus/acpi/compbatt/comppnp.c b/drivers/bus/acpi/compbatt/comppnp.c similarity index 100% rename from reactos/drivers/bus/acpi/compbatt/comppnp.c rename to drivers/bus/acpi/compbatt/comppnp.c diff --git a/reactos/drivers/bus/acpi/eval.c b/drivers/bus/acpi/eval.c similarity index 100% rename from reactos/drivers/bus/acpi/eval.c rename to drivers/bus/acpi/eval.c diff --git a/reactos/drivers/bus/acpi/include/acpi_bus.h b/drivers/bus/acpi/include/acpi_bus.h similarity index 100% rename from reactos/drivers/bus/acpi/include/acpi_bus.h rename to drivers/bus/acpi/include/acpi_bus.h diff --git a/reactos/drivers/bus/acpi/include/acpi_drivers.h b/drivers/bus/acpi/include/acpi_drivers.h similarity index 100% rename from reactos/drivers/bus/acpi/include/acpi_drivers.h rename to drivers/bus/acpi/include/acpi_drivers.h diff --git a/reactos/drivers/bus/acpi/include/acpisys.h b/drivers/bus/acpi/include/acpisys.h similarity index 100% rename from reactos/drivers/bus/acpi/include/acpisys.h rename to drivers/bus/acpi/include/acpisys.h diff --git a/reactos/drivers/bus/acpi/include/glue.h b/drivers/bus/acpi/include/glue.h similarity index 100% rename from reactos/drivers/bus/acpi/include/glue.h rename to drivers/bus/acpi/include/glue.h diff --git a/reactos/drivers/bus/acpi/include/list.h b/drivers/bus/acpi/include/list.h similarity index 100% rename from reactos/drivers/bus/acpi/include/list.h rename to drivers/bus/acpi/include/list.h diff --git a/reactos/drivers/bus/acpi/interface.c b/drivers/bus/acpi/interface.c similarity index 100% rename from reactos/drivers/bus/acpi/interface.c rename to drivers/bus/acpi/interface.c diff --git a/reactos/drivers/bus/acpi/main.c b/drivers/bus/acpi/main.c similarity index 100% rename from reactos/drivers/bus/acpi/main.c rename to drivers/bus/acpi/main.c diff --git a/reactos/drivers/bus/acpi/osl.c b/drivers/bus/acpi/osl.c similarity index 100% rename from reactos/drivers/bus/acpi/osl.c rename to drivers/bus/acpi/osl.c diff --git a/reactos/drivers/bus/acpi/pnp.c b/drivers/bus/acpi/pnp.c similarity index 100% rename from reactos/drivers/bus/acpi/pnp.c rename to drivers/bus/acpi/pnp.c diff --git a/reactos/drivers/bus/acpi/power.c b/drivers/bus/acpi/power.c similarity index 100% rename from reactos/drivers/bus/acpi/power.c rename to drivers/bus/acpi/power.c diff --git a/reactos/drivers/bus/directory.rbuild b/drivers/bus/directory.rbuild similarity index 100% rename from reactos/drivers/bus/directory.rbuild rename to drivers/bus/directory.rbuild diff --git a/reactos/drivers/bus/isapnp/CMakeLists.txt b/drivers/bus/isapnp/CMakeLists.txt similarity index 100% rename from reactos/drivers/bus/isapnp/CMakeLists.txt rename to drivers/bus/isapnp/CMakeLists.txt diff --git a/reactos/drivers/bus/isapnp/fdo.c b/drivers/bus/isapnp/fdo.c similarity index 100% rename from reactos/drivers/bus/isapnp/fdo.c rename to drivers/bus/isapnp/fdo.c diff --git a/reactos/drivers/bus/isapnp/hardware.c b/drivers/bus/isapnp/hardware.c similarity index 100% rename from reactos/drivers/bus/isapnp/hardware.c rename to drivers/bus/isapnp/hardware.c diff --git a/reactos/drivers/bus/isapnp/isapnp.c b/drivers/bus/isapnp/isapnp.c similarity index 100% rename from reactos/drivers/bus/isapnp/isapnp.c rename to drivers/bus/isapnp/isapnp.c diff --git a/reactos/drivers/bus/isapnp/isapnp.h b/drivers/bus/isapnp/isapnp.h similarity index 100% rename from reactos/drivers/bus/isapnp/isapnp.h rename to drivers/bus/isapnp/isapnp.h diff --git a/reactos/drivers/bus/isapnp/isapnp.rbuild b/drivers/bus/isapnp/isapnp.rbuild similarity index 100% rename from reactos/drivers/bus/isapnp/isapnp.rbuild rename to drivers/bus/isapnp/isapnp.rbuild diff --git a/reactos/drivers/bus/isapnp/isapnp.rc b/drivers/bus/isapnp/isapnp.rc similarity index 100% rename from reactos/drivers/bus/isapnp/isapnp.rc rename to drivers/bus/isapnp/isapnp.rc diff --git a/reactos/drivers/bus/isapnp/isapnphw.h b/drivers/bus/isapnp/isapnphw.h similarity index 100% rename from reactos/drivers/bus/isapnp/isapnphw.h rename to drivers/bus/isapnp/isapnphw.h diff --git a/reactos/drivers/bus/isapnp/pdo.c b/drivers/bus/isapnp/pdo.c similarity index 100% rename from reactos/drivers/bus/isapnp/pdo.c rename to drivers/bus/isapnp/pdo.c diff --git a/reactos/drivers/bus/pci/CMakeLists.txt b/drivers/bus/pci/CMakeLists.txt similarity index 100% rename from reactos/drivers/bus/pci/CMakeLists.txt rename to drivers/bus/pci/CMakeLists.txt diff --git a/reactos/drivers/bus/pci/fdo.c b/drivers/bus/pci/fdo.c similarity index 100% rename from reactos/drivers/bus/pci/fdo.c rename to drivers/bus/pci/fdo.c diff --git a/reactos/drivers/bus/pci/pci.c b/drivers/bus/pci/pci.c similarity index 100% rename from reactos/drivers/bus/pci/pci.c rename to drivers/bus/pci/pci.c diff --git a/reactos/drivers/bus/pci/pci.h b/drivers/bus/pci/pci.h similarity index 100% rename from reactos/drivers/bus/pci/pci.h rename to drivers/bus/pci/pci.h diff --git a/reactos/drivers/bus/pci/pci.rbuild b/drivers/bus/pci/pci.rbuild similarity index 100% rename from reactos/drivers/bus/pci/pci.rbuild rename to drivers/bus/pci/pci.rbuild diff --git a/reactos/drivers/bus/pci/pci.rc b/drivers/bus/pci/pci.rc similarity index 100% rename from reactos/drivers/bus/pci/pci.rc rename to drivers/bus/pci/pci.rc diff --git a/reactos/drivers/bus/pci/pcidef.h b/drivers/bus/pci/pcidef.h similarity index 100% rename from reactos/drivers/bus/pci/pcidef.h rename to drivers/bus/pci/pcidef.h diff --git a/reactos/drivers/bus/pci/pdo.c b/drivers/bus/pci/pdo.c similarity index 100% rename from reactos/drivers/bus/pci/pdo.c rename to drivers/bus/pci/pdo.c diff --git a/reactos/drivers/bus/pcix/CMakeLists.txt b/drivers/bus/pcix/CMakeLists.txt similarity index 100% rename from reactos/drivers/bus/pcix/CMakeLists.txt rename to drivers/bus/pcix/CMakeLists.txt diff --git a/reactos/drivers/bus/pcix/arb/ar_busno.c b/drivers/bus/pcix/arb/ar_busno.c similarity index 100% rename from reactos/drivers/bus/pcix/arb/ar_busno.c rename to drivers/bus/pcix/arb/ar_busno.c diff --git a/reactos/drivers/bus/pcix/arb/ar_memio.c b/drivers/bus/pcix/arb/ar_memio.c similarity index 100% rename from reactos/drivers/bus/pcix/arb/ar_memio.c rename to drivers/bus/pcix/arb/ar_memio.c diff --git a/reactos/drivers/bus/pcix/arb/arb_comn.c b/drivers/bus/pcix/arb/arb_comn.c similarity index 100% rename from reactos/drivers/bus/pcix/arb/arb_comn.c rename to drivers/bus/pcix/arb/arb_comn.c diff --git a/reactos/drivers/bus/pcix/arb/tr_irq.c b/drivers/bus/pcix/arb/tr_irq.c similarity index 100% rename from reactos/drivers/bus/pcix/arb/tr_irq.c rename to drivers/bus/pcix/arb/tr_irq.c diff --git a/reactos/drivers/bus/pcix/debug.c b/drivers/bus/pcix/debug.c similarity index 100% rename from reactos/drivers/bus/pcix/debug.c rename to drivers/bus/pcix/debug.c diff --git a/reactos/drivers/bus/pcix/device.c b/drivers/bus/pcix/device.c similarity index 100% rename from reactos/drivers/bus/pcix/device.c rename to drivers/bus/pcix/device.c diff --git a/reactos/drivers/bus/pcix/dispatch.c b/drivers/bus/pcix/dispatch.c similarity index 100% rename from reactos/drivers/bus/pcix/dispatch.c rename to drivers/bus/pcix/dispatch.c diff --git a/reactos/drivers/bus/pcix/enum.c b/drivers/bus/pcix/enum.c similarity index 100% rename from reactos/drivers/bus/pcix/enum.c rename to drivers/bus/pcix/enum.c diff --git a/reactos/drivers/bus/pcix/fdo.c b/drivers/bus/pcix/fdo.c similarity index 100% rename from reactos/drivers/bus/pcix/fdo.c rename to drivers/bus/pcix/fdo.c diff --git a/reactos/drivers/bus/pcix/guid.c b/drivers/bus/pcix/guid.c similarity index 100% rename from reactos/drivers/bus/pcix/guid.c rename to drivers/bus/pcix/guid.c diff --git a/reactos/drivers/bus/pcix/hookhal.c b/drivers/bus/pcix/hookhal.c similarity index 100% rename from reactos/drivers/bus/pcix/hookhal.c rename to drivers/bus/pcix/hookhal.c diff --git a/reactos/drivers/bus/pcix/init.c b/drivers/bus/pcix/init.c similarity index 100% rename from reactos/drivers/bus/pcix/init.c rename to drivers/bus/pcix/init.c diff --git a/reactos/drivers/bus/pcix/intrface/agpintrf.c b/drivers/bus/pcix/intrface/agpintrf.c similarity index 100% rename from reactos/drivers/bus/pcix/intrface/agpintrf.c rename to drivers/bus/pcix/intrface/agpintrf.c diff --git a/reactos/drivers/bus/pcix/intrface/busintrf.c b/drivers/bus/pcix/intrface/busintrf.c similarity index 100% rename from reactos/drivers/bus/pcix/intrface/busintrf.c rename to drivers/bus/pcix/intrface/busintrf.c diff --git a/reactos/drivers/bus/pcix/intrface/cardbus.c b/drivers/bus/pcix/intrface/cardbus.c similarity index 100% rename from reactos/drivers/bus/pcix/intrface/cardbus.c rename to drivers/bus/pcix/intrface/cardbus.c diff --git a/reactos/drivers/bus/pcix/intrface/devhere.c b/drivers/bus/pcix/intrface/devhere.c similarity index 100% rename from reactos/drivers/bus/pcix/intrface/devhere.c rename to drivers/bus/pcix/intrface/devhere.c diff --git a/reactos/drivers/bus/pcix/intrface/ideintrf.c b/drivers/bus/pcix/intrface/ideintrf.c similarity index 100% rename from reactos/drivers/bus/pcix/intrface/ideintrf.c rename to drivers/bus/pcix/intrface/ideintrf.c diff --git a/reactos/drivers/bus/pcix/intrface/intrface.c b/drivers/bus/pcix/intrface/intrface.c similarity index 100% rename from reactos/drivers/bus/pcix/intrface/intrface.c rename to drivers/bus/pcix/intrface/intrface.c diff --git a/reactos/drivers/bus/pcix/intrface/lddintrf.c b/drivers/bus/pcix/intrface/lddintrf.c similarity index 100% rename from reactos/drivers/bus/pcix/intrface/lddintrf.c rename to drivers/bus/pcix/intrface/lddintrf.c diff --git a/reactos/drivers/bus/pcix/intrface/locintrf.c b/drivers/bus/pcix/intrface/locintrf.c similarity index 100% rename from reactos/drivers/bus/pcix/intrface/locintrf.c rename to drivers/bus/pcix/intrface/locintrf.c diff --git a/reactos/drivers/bus/pcix/intrface/pmeintf.c b/drivers/bus/pcix/intrface/pmeintf.c similarity index 100% rename from reactos/drivers/bus/pcix/intrface/pmeintf.c rename to drivers/bus/pcix/intrface/pmeintf.c diff --git a/reactos/drivers/bus/pcix/intrface/routintf.c b/drivers/bus/pcix/intrface/routintf.c similarity index 100% rename from reactos/drivers/bus/pcix/intrface/routintf.c rename to drivers/bus/pcix/intrface/routintf.c diff --git a/reactos/drivers/bus/pcix/pci.h b/drivers/bus/pcix/pci.h similarity index 100% rename from reactos/drivers/bus/pcix/pci.h rename to drivers/bus/pcix/pci.h diff --git a/reactos/drivers/bus/pcix/pci.rc b/drivers/bus/pcix/pci.rc similarity index 100% rename from reactos/drivers/bus/pcix/pci.rc rename to drivers/bus/pcix/pci.rc diff --git a/reactos/drivers/bus/pcix/pci/busno.c b/drivers/bus/pcix/pci/busno.c similarity index 100% rename from reactos/drivers/bus/pcix/pci/busno.c rename to drivers/bus/pcix/pci/busno.c diff --git a/reactos/drivers/bus/pcix/pci/config.c b/drivers/bus/pcix/pci/config.c similarity index 100% rename from reactos/drivers/bus/pcix/pci/config.c rename to drivers/bus/pcix/pci/config.c diff --git a/reactos/drivers/bus/pcix/pci/devhere.c b/drivers/bus/pcix/pci/devhere.c similarity index 100% rename from reactos/drivers/bus/pcix/pci/devhere.c rename to drivers/bus/pcix/pci/devhere.c diff --git a/reactos/drivers/bus/pcix/pci/id.c b/drivers/bus/pcix/pci/id.c similarity index 100% rename from reactos/drivers/bus/pcix/pci/id.c rename to drivers/bus/pcix/pci/id.c diff --git a/reactos/drivers/bus/pcix/pci/ppbridge.c b/drivers/bus/pcix/pci/ppbridge.c similarity index 100% rename from reactos/drivers/bus/pcix/pci/ppbridge.c rename to drivers/bus/pcix/pci/ppbridge.c diff --git a/reactos/drivers/bus/pcix/pci/romimage.c b/drivers/bus/pcix/pci/romimage.c similarity index 100% rename from reactos/drivers/bus/pcix/pci/romimage.c rename to drivers/bus/pcix/pci/romimage.c diff --git a/reactos/drivers/bus/pcix/pci/state.c b/drivers/bus/pcix/pci/state.c similarity index 100% rename from reactos/drivers/bus/pcix/pci/state.c rename to drivers/bus/pcix/pci/state.c diff --git a/reactos/drivers/bus/pcix/pcivrify.c b/drivers/bus/pcix/pcivrify.c similarity index 100% rename from reactos/drivers/bus/pcix/pcivrify.c rename to drivers/bus/pcix/pcivrify.c diff --git a/reactos/drivers/bus/pcix/pcix.rbuild b/drivers/bus/pcix/pcix.rbuild similarity index 100% rename from reactos/drivers/bus/pcix/pcix.rbuild rename to drivers/bus/pcix/pcix.rbuild diff --git a/reactos/drivers/bus/pcix/pdo.c b/drivers/bus/pcix/pdo.c similarity index 100% rename from reactos/drivers/bus/pcix/pdo.c rename to drivers/bus/pcix/pdo.c diff --git a/reactos/drivers/bus/pcix/power.c b/drivers/bus/pcix/power.c similarity index 100% rename from reactos/drivers/bus/pcix/power.c rename to drivers/bus/pcix/power.c diff --git a/reactos/drivers/bus/pcix/usage.c b/drivers/bus/pcix/usage.c similarity index 100% rename from reactos/drivers/bus/pcix/usage.c rename to drivers/bus/pcix/usage.c diff --git a/reactos/drivers/bus/pcix/utils.c b/drivers/bus/pcix/utils.c similarity index 100% rename from reactos/drivers/bus/pcix/utils.c rename to drivers/bus/pcix/utils.c diff --git a/reactos/drivers/bus/pcmcia/CMakeLists.txt b/drivers/bus/pcmcia/CMakeLists.txt similarity index 100% rename from reactos/drivers/bus/pcmcia/CMakeLists.txt rename to drivers/bus/pcmcia/CMakeLists.txt diff --git a/reactos/drivers/bus/pcmcia/fdo.c b/drivers/bus/pcmcia/fdo.c similarity index 100% rename from reactos/drivers/bus/pcmcia/fdo.c rename to drivers/bus/pcmcia/fdo.c diff --git a/reactos/drivers/bus/pcmcia/pcmcia.c b/drivers/bus/pcmcia/pcmcia.c similarity index 100% rename from reactos/drivers/bus/pcmcia/pcmcia.c rename to drivers/bus/pcmcia/pcmcia.c diff --git a/reactos/drivers/bus/pcmcia/pcmcia.h b/drivers/bus/pcmcia/pcmcia.h similarity index 100% rename from reactos/drivers/bus/pcmcia/pcmcia.h rename to drivers/bus/pcmcia/pcmcia.h diff --git a/reactos/drivers/bus/pcmcia/pcmcia.rbuild b/drivers/bus/pcmcia/pcmcia.rbuild similarity index 100% rename from reactos/drivers/bus/pcmcia/pcmcia.rbuild rename to drivers/bus/pcmcia/pcmcia.rbuild diff --git a/reactos/drivers/bus/pcmcia/pcmcia.rc b/drivers/bus/pcmcia/pcmcia.rc similarity index 100% rename from reactos/drivers/bus/pcmcia/pcmcia.rc rename to drivers/bus/pcmcia/pcmcia.rc diff --git a/reactos/drivers/bus/pcmcia/pdo.c b/drivers/bus/pcmcia/pdo.c similarity index 100% rename from reactos/drivers/bus/pcmcia/pdo.c rename to drivers/bus/pcmcia/pdo.c diff --git a/reactos/drivers/directx/CMakeLists.txt b/drivers/directx/CMakeLists.txt similarity index 100% rename from reactos/drivers/directx/CMakeLists.txt rename to drivers/directx/CMakeLists.txt diff --git a/reactos/drivers/directx/directory.rbuild b/drivers/directx/directory.rbuild similarity index 100% rename from reactos/drivers/directx/directory.rbuild rename to drivers/directx/directory.rbuild diff --git a/reactos/drivers/directx/dxapi/CMakeLists.txt b/drivers/directx/dxapi/CMakeLists.txt similarity index 100% rename from reactos/drivers/directx/dxapi/CMakeLists.txt rename to drivers/directx/dxapi/CMakeLists.txt diff --git a/reactos/drivers/directx/dxapi/dxapi.rbuild b/drivers/directx/dxapi/dxapi.rbuild similarity index 100% rename from reactos/drivers/directx/dxapi/dxapi.rbuild rename to drivers/directx/dxapi/dxapi.rbuild diff --git a/reactos/drivers/directx/dxapi/dxapi.rc b/drivers/directx/dxapi/dxapi.rc similarity index 100% rename from reactos/drivers/directx/dxapi/dxapi.rc rename to drivers/directx/dxapi/dxapi.rc diff --git a/reactos/drivers/directx/dxapi/dxapi.spec b/drivers/directx/dxapi/dxapi.spec similarity index 100% rename from reactos/drivers/directx/dxapi/dxapi.spec rename to drivers/directx/dxapi/dxapi.spec diff --git a/reactos/drivers/directx/dxapi/dxapi_driver.h b/drivers/directx/dxapi/dxapi_driver.h similarity index 100% rename from reactos/drivers/directx/dxapi/dxapi_driver.h rename to drivers/directx/dxapi/dxapi_driver.h diff --git a/reactos/drivers/directx/dxapi/main.c b/drivers/directx/dxapi/main.c similarity index 100% rename from reactos/drivers/directx/dxapi/main.c rename to drivers/directx/dxapi/main.c diff --git a/reactos/drivers/directx/dxg/CMakeLists.txt b/drivers/directx/dxg/CMakeLists.txt similarity index 100% rename from reactos/drivers/directx/dxg/CMakeLists.txt rename to drivers/directx/dxg/CMakeLists.txt diff --git a/reactos/drivers/directx/dxg/ddhmg.c b/drivers/directx/dxg/ddhmg.c similarity index 100% rename from reactos/drivers/directx/dxg/ddhmg.c rename to drivers/directx/dxg/ddhmg.c diff --git a/reactos/drivers/directx/dxg/dxg.rbuild b/drivers/directx/dxg/dxg.rbuild similarity index 100% rename from reactos/drivers/directx/dxg/dxg.rbuild rename to drivers/directx/dxg/dxg.rbuild diff --git a/reactos/drivers/directx/dxg/dxg.rc b/drivers/directx/dxg/dxg.rc similarity index 100% rename from reactos/drivers/directx/dxg/dxg.rc rename to drivers/directx/dxg/dxg.rc diff --git a/reactos/drivers/directx/dxg/dxg.spec b/drivers/directx/dxg/dxg.spec similarity index 100% rename from reactos/drivers/directx/dxg/dxg.spec rename to drivers/directx/dxg/dxg.spec diff --git a/reactos/drivers/directx/dxg/dxg_driver.h b/drivers/directx/dxg/dxg_driver.h similarity index 100% rename from reactos/drivers/directx/dxg/dxg_driver.h rename to drivers/directx/dxg/dxg_driver.h diff --git a/reactos/drivers/directx/dxg/dxg_int.h b/drivers/directx/dxg/dxg_int.h similarity index 100% rename from reactos/drivers/directx/dxg/dxg_int.h rename to drivers/directx/dxg/dxg_int.h diff --git a/reactos/drivers/directx/dxg/eng.c b/drivers/directx/dxg/eng.c similarity index 100% rename from reactos/drivers/directx/dxg/eng.c rename to drivers/directx/dxg/eng.c diff --git a/reactos/drivers/directx/dxg/historic.c b/drivers/directx/dxg/historic.c similarity index 100% rename from reactos/drivers/directx/dxg/historic.c rename to drivers/directx/dxg/historic.c diff --git a/reactos/drivers/directx/dxg/main.c b/drivers/directx/dxg/main.c similarity index 100% rename from reactos/drivers/directx/dxg/main.c rename to drivers/directx/dxg/main.c diff --git a/reactos/drivers/directx/dxg/tags.h b/drivers/directx/dxg/tags.h similarity index 100% rename from reactos/drivers/directx/dxg/tags.h rename to drivers/directx/dxg/tags.h diff --git a/reactos/drivers/directx/dxgthk/CMakeLists.txt b/drivers/directx/dxgthk/CMakeLists.txt similarity index 100% rename from reactos/drivers/directx/dxgthk/CMakeLists.txt rename to drivers/directx/dxgthk/CMakeLists.txt diff --git a/reactos/drivers/directx/dxgthk/dxgthk.rbuild b/drivers/directx/dxgthk/dxgthk.rbuild similarity index 100% rename from reactos/drivers/directx/dxgthk/dxgthk.rbuild rename to drivers/directx/dxgthk/dxgthk.rbuild diff --git a/reactos/drivers/directx/dxgthk/dxgthk.rc b/drivers/directx/dxgthk/dxgthk.rc similarity index 100% rename from reactos/drivers/directx/dxgthk/dxgthk.rc rename to drivers/directx/dxgthk/dxgthk.rc diff --git a/reactos/drivers/directx/dxgthk/dxgthk.spec b/drivers/directx/dxgthk/dxgthk.spec similarity index 100% rename from reactos/drivers/directx/dxgthk/dxgthk.spec rename to drivers/directx/dxgthk/dxgthk.spec diff --git a/reactos/drivers/directx/dxgthk/main.c b/drivers/directx/dxgthk/main.c similarity index 100% rename from reactos/drivers/directx/dxgthk/main.c rename to drivers/directx/dxgthk/main.c diff --git a/reactos/drivers/drivers.rbuild b/drivers/drivers.rbuild similarity index 100% rename from reactos/drivers/drivers.rbuild rename to drivers/drivers.rbuild diff --git a/reactos/drivers/filesystems/CMakeLists.txt b/drivers/filesystems/CMakeLists.txt similarity index 100% rename from reactos/drivers/filesystems/CMakeLists.txt rename to drivers/filesystems/CMakeLists.txt diff --git a/reactos/drivers/filesystems/cdfs/CMakeLists.txt b/drivers/filesystems/cdfs/CMakeLists.txt similarity index 100% rename from reactos/drivers/filesystems/cdfs/CMakeLists.txt rename to drivers/filesystems/cdfs/CMakeLists.txt diff --git a/reactos/drivers/filesystems/cdfs/cdfs.c b/drivers/filesystems/cdfs/cdfs.c similarity index 100% rename from reactos/drivers/filesystems/cdfs/cdfs.c rename to drivers/filesystems/cdfs/cdfs.c diff --git a/reactos/drivers/filesystems/cdfs/cdfs.h b/drivers/filesystems/cdfs/cdfs.h similarity index 100% rename from reactos/drivers/filesystems/cdfs/cdfs.h rename to drivers/filesystems/cdfs/cdfs.h diff --git a/reactos/drivers/filesystems/cdfs/cdfs.rbuild b/drivers/filesystems/cdfs/cdfs.rbuild similarity index 100% rename from reactos/drivers/filesystems/cdfs/cdfs.rbuild rename to drivers/filesystems/cdfs/cdfs.rbuild diff --git a/reactos/drivers/filesystems/cdfs/cdfs.rc b/drivers/filesystems/cdfs/cdfs.rc similarity index 100% rename from reactos/drivers/filesystems/cdfs/cdfs.rc rename to drivers/filesystems/cdfs/cdfs.rc diff --git a/reactos/drivers/filesystems/cdfs/cleanup.c b/drivers/filesystems/cdfs/cleanup.c similarity index 100% rename from reactos/drivers/filesystems/cdfs/cleanup.c rename to drivers/filesystems/cdfs/cleanup.c diff --git a/reactos/drivers/filesystems/cdfs/close.c b/drivers/filesystems/cdfs/close.c similarity index 100% rename from reactos/drivers/filesystems/cdfs/close.c rename to drivers/filesystems/cdfs/close.c diff --git a/reactos/drivers/filesystems/cdfs/common.c b/drivers/filesystems/cdfs/common.c similarity index 100% rename from reactos/drivers/filesystems/cdfs/common.c rename to drivers/filesystems/cdfs/common.c diff --git a/reactos/drivers/filesystems/cdfs/create.c b/drivers/filesystems/cdfs/create.c similarity index 100% rename from reactos/drivers/filesystems/cdfs/create.c rename to drivers/filesystems/cdfs/create.c diff --git a/reactos/drivers/filesystems/cdfs/devctrl.c b/drivers/filesystems/cdfs/devctrl.c similarity index 100% rename from reactos/drivers/filesystems/cdfs/devctrl.c rename to drivers/filesystems/cdfs/devctrl.c diff --git a/reactos/drivers/filesystems/cdfs/dirctl.c b/drivers/filesystems/cdfs/dirctl.c similarity index 100% rename from reactos/drivers/filesystems/cdfs/dirctl.c rename to drivers/filesystems/cdfs/dirctl.c diff --git a/reactos/drivers/filesystems/cdfs/fcb.c b/drivers/filesystems/cdfs/fcb.c similarity index 100% rename from reactos/drivers/filesystems/cdfs/fcb.c rename to drivers/filesystems/cdfs/fcb.c diff --git a/reactos/drivers/filesystems/cdfs/finfo.c b/drivers/filesystems/cdfs/finfo.c similarity index 100% rename from reactos/drivers/filesystems/cdfs/finfo.c rename to drivers/filesystems/cdfs/finfo.c diff --git a/reactos/drivers/filesystems/cdfs/fsctl.c b/drivers/filesystems/cdfs/fsctl.c similarity index 100% rename from reactos/drivers/filesystems/cdfs/fsctl.c rename to drivers/filesystems/cdfs/fsctl.c diff --git a/reactos/drivers/filesystems/cdfs/misc.c b/drivers/filesystems/cdfs/misc.c similarity index 100% rename from reactos/drivers/filesystems/cdfs/misc.c rename to drivers/filesystems/cdfs/misc.c diff --git a/reactos/drivers/filesystems/cdfs/rw.c b/drivers/filesystems/cdfs/rw.c similarity index 100% rename from reactos/drivers/filesystems/cdfs/rw.c rename to drivers/filesystems/cdfs/rw.c diff --git a/reactos/drivers/filesystems/cdfs/volinfo.c b/drivers/filesystems/cdfs/volinfo.c similarity index 100% rename from reactos/drivers/filesystems/cdfs/volinfo.c rename to drivers/filesystems/cdfs/volinfo.c diff --git a/reactos/drivers/filesystems/directory.rbuild b/drivers/filesystems/directory.rbuild similarity index 100% rename from reactos/drivers/filesystems/directory.rbuild rename to drivers/filesystems/directory.rbuild diff --git a/reactos/drivers/filesystems/ext2/CMakeLists.txt b/drivers/filesystems/ext2/CMakeLists.txt similarity index 100% rename from reactos/drivers/filesystems/ext2/CMakeLists.txt rename to drivers/filesystems/ext2/CMakeLists.txt diff --git a/reactos/drivers/filesystems/ext2/ext2.rbuild b/drivers/filesystems/ext2/ext2.rbuild similarity index 100% rename from reactos/drivers/filesystems/ext2/ext2.rbuild rename to drivers/filesystems/ext2/ext2.rbuild diff --git a/reactos/drivers/filesystems/ext2/ext2fs.rc b/drivers/filesystems/ext2/ext2fs.rc similarity index 100% rename from reactos/drivers/filesystems/ext2/ext2fs.rc rename to drivers/filesystems/ext2/ext2fs.rc diff --git a/reactos/drivers/filesystems/ext2/inc/errmsg.h b/drivers/filesystems/ext2/inc/errmsg.h similarity index 100% rename from reactos/drivers/filesystems/ext2/inc/errmsg.h rename to drivers/filesystems/ext2/inc/errmsg.h diff --git a/reactos/drivers/filesystems/ext2/inc/ext2_fs.h b/drivers/filesystems/ext2/inc/ext2_fs.h similarity index 100% rename from reactos/drivers/filesystems/ext2/inc/ext2_fs.h rename to drivers/filesystems/ext2/inc/ext2_fs.h diff --git a/reactos/drivers/filesystems/ext2/inc/ext2fsd.h b/drivers/filesystems/ext2/inc/ext2fsd.h similarity index 100% rename from reactos/drivers/filesystems/ext2/inc/ext2fsd.h rename to drivers/filesystems/ext2/inc/ext2fsd.h diff --git a/reactos/drivers/filesystems/ext2/inc/ext2metadata.h b/drivers/filesystems/ext2/inc/ext2metadata.h similarity index 100% rename from reactos/drivers/filesystems/ext2/inc/ext2metadata.h rename to drivers/filesystems/ext2/inc/ext2metadata.h diff --git a/reactos/drivers/filesystems/ext2/inc/protos.h b/drivers/filesystems/ext2/inc/protos.h similarity index 100% rename from reactos/drivers/filesystems/ext2/inc/protos.h rename to drivers/filesystems/ext2/inc/protos.h diff --git a/reactos/drivers/filesystems/ext2/inc/resource.h b/drivers/filesystems/ext2/inc/resource.h similarity index 100% rename from reactos/drivers/filesystems/ext2/inc/resource.h rename to drivers/filesystems/ext2/inc/resource.h diff --git a/reactos/drivers/filesystems/ext2/inc/struct.h b/drivers/filesystems/ext2/inc/struct.h similarity index 100% rename from reactos/drivers/filesystems/ext2/inc/struct.h rename to drivers/filesystems/ext2/inc/struct.h diff --git a/reactos/drivers/filesystems/ext2/src/DiskIO.c b/drivers/filesystems/ext2/src/DiskIO.c similarity index 100% rename from reactos/drivers/filesystems/ext2/src/DiskIO.c rename to drivers/filesystems/ext2/src/DiskIO.c diff --git a/reactos/drivers/filesystems/ext2/src/cleanup.c b/drivers/filesystems/ext2/src/cleanup.c similarity index 100% rename from reactos/drivers/filesystems/ext2/src/cleanup.c rename to drivers/filesystems/ext2/src/cleanup.c diff --git a/reactos/drivers/filesystems/ext2/src/close.c b/drivers/filesystems/ext2/src/close.c similarity index 100% rename from reactos/drivers/filesystems/ext2/src/close.c rename to drivers/filesystems/ext2/src/close.c diff --git a/reactos/drivers/filesystems/ext2/src/create.c b/drivers/filesystems/ext2/src/create.c similarity index 100% rename from reactos/drivers/filesystems/ext2/src/create.c rename to drivers/filesystems/ext2/src/create.c diff --git a/reactos/drivers/filesystems/ext2/src/devcntrl.c b/drivers/filesystems/ext2/src/devcntrl.c similarity index 100% rename from reactos/drivers/filesystems/ext2/src/devcntrl.c rename to drivers/filesystems/ext2/src/devcntrl.c diff --git a/reactos/drivers/filesystems/ext2/src/dircntrl.c b/drivers/filesystems/ext2/src/dircntrl.c similarity index 100% rename from reactos/drivers/filesystems/ext2/src/dircntrl.c rename to drivers/filesystems/ext2/src/dircntrl.c diff --git a/reactos/drivers/filesystems/ext2/src/ext2.rc b/drivers/filesystems/ext2/src/ext2.rc similarity index 100% rename from reactos/drivers/filesystems/ext2/src/ext2.rc rename to drivers/filesystems/ext2/src/ext2.rc diff --git a/reactos/drivers/filesystems/ext2/src/ext2init.c b/drivers/filesystems/ext2/src/ext2init.c similarity index 100% rename from reactos/drivers/filesystems/ext2/src/ext2init.c rename to drivers/filesystems/ext2/src/ext2init.c diff --git a/reactos/drivers/filesystems/ext2/src/fastio.c b/drivers/filesystems/ext2/src/fastio.c similarity index 100% rename from reactos/drivers/filesystems/ext2/src/fastio.c rename to drivers/filesystems/ext2/src/fastio.c diff --git a/reactos/drivers/filesystems/ext2/src/fileinfo.c b/drivers/filesystems/ext2/src/fileinfo.c similarity index 100% rename from reactos/drivers/filesystems/ext2/src/fileinfo.c rename to drivers/filesystems/ext2/src/fileinfo.c diff --git a/reactos/drivers/filesystems/ext2/src/flush.c b/drivers/filesystems/ext2/src/flush.c similarity index 100% rename from reactos/drivers/filesystems/ext2/src/flush.c rename to drivers/filesystems/ext2/src/flush.c diff --git a/reactos/drivers/filesystems/ext2/src/fsctrl.c b/drivers/filesystems/ext2/src/fsctrl.c similarity index 100% rename from reactos/drivers/filesystems/ext2/src/fsctrl.c rename to drivers/filesystems/ext2/src/fsctrl.c diff --git a/reactos/drivers/filesystems/ext2/src/io.c b/drivers/filesystems/ext2/src/io.c similarity index 100% rename from reactos/drivers/filesystems/ext2/src/io.c rename to drivers/filesystems/ext2/src/io.c diff --git a/reactos/drivers/filesystems/ext2/src/metadata.c b/drivers/filesystems/ext2/src/metadata.c similarity index 100% rename from reactos/drivers/filesystems/ext2/src/metadata.c rename to drivers/filesystems/ext2/src/metadata.c diff --git a/reactos/drivers/filesystems/ext2/src/misc.c b/drivers/filesystems/ext2/src/misc.c similarity index 100% rename from reactos/drivers/filesystems/ext2/src/misc.c rename to drivers/filesystems/ext2/src/misc.c diff --git a/reactos/drivers/filesystems/ext2/src/read.c b/drivers/filesystems/ext2/src/read.c similarity index 100% rename from reactos/drivers/filesystems/ext2/src/read.c rename to drivers/filesystems/ext2/src/read.c diff --git a/reactos/drivers/filesystems/ext2/src/shutdown.c b/drivers/filesystems/ext2/src/shutdown.c similarity index 100% rename from reactos/drivers/filesystems/ext2/src/shutdown.c rename to drivers/filesystems/ext2/src/shutdown.c diff --git a/reactos/drivers/filesystems/ext2/src/volinfo.c b/drivers/filesystems/ext2/src/volinfo.c similarity index 100% rename from reactos/drivers/filesystems/ext2/src/volinfo.c rename to drivers/filesystems/ext2/src/volinfo.c diff --git a/reactos/drivers/filesystems/ext2/src/write.c b/drivers/filesystems/ext2/src/write.c similarity index 100% rename from reactos/drivers/filesystems/ext2/src/write.c rename to drivers/filesystems/ext2/src/write.c diff --git a/reactos/drivers/filesystems/fastfat/CMakeLists.txt b/drivers/filesystems/fastfat/CMakeLists.txt similarity index 100% rename from reactos/drivers/filesystems/fastfat/CMakeLists.txt rename to drivers/filesystems/fastfat/CMakeLists.txt diff --git a/reactos/drivers/filesystems/fastfat/blockdev.c b/drivers/filesystems/fastfat/blockdev.c similarity index 100% rename from reactos/drivers/filesystems/fastfat/blockdev.c rename to drivers/filesystems/fastfat/blockdev.c diff --git a/reactos/drivers/filesystems/fastfat/cleanup.c b/drivers/filesystems/fastfat/cleanup.c similarity index 100% rename from reactos/drivers/filesystems/fastfat/cleanup.c rename to drivers/filesystems/fastfat/cleanup.c diff --git a/reactos/drivers/filesystems/fastfat/close.c b/drivers/filesystems/fastfat/close.c similarity index 100% rename from reactos/drivers/filesystems/fastfat/close.c rename to drivers/filesystems/fastfat/close.c diff --git a/reactos/drivers/filesystems/fastfat/create.c b/drivers/filesystems/fastfat/create.c similarity index 100% rename from reactos/drivers/filesystems/fastfat/create.c rename to drivers/filesystems/fastfat/create.c diff --git a/reactos/drivers/filesystems/fastfat/dir.c b/drivers/filesystems/fastfat/dir.c similarity index 100% rename from reactos/drivers/filesystems/fastfat/dir.c rename to drivers/filesystems/fastfat/dir.c diff --git a/reactos/drivers/filesystems/fastfat/direntry.c b/drivers/filesystems/fastfat/direntry.c similarity index 100% rename from reactos/drivers/filesystems/fastfat/direntry.c rename to drivers/filesystems/fastfat/direntry.c diff --git a/reactos/drivers/filesystems/fastfat/dirwr.c b/drivers/filesystems/fastfat/dirwr.c similarity index 100% rename from reactos/drivers/filesystems/fastfat/dirwr.c rename to drivers/filesystems/fastfat/dirwr.c diff --git a/reactos/drivers/filesystems/fastfat/ea.c b/drivers/filesystems/fastfat/ea.c similarity index 100% rename from reactos/drivers/filesystems/fastfat/ea.c rename to drivers/filesystems/fastfat/ea.c diff --git a/reactos/drivers/filesystems/fastfat/fastio.c b/drivers/filesystems/fastfat/fastio.c similarity index 100% rename from reactos/drivers/filesystems/fastfat/fastio.c rename to drivers/filesystems/fastfat/fastio.c diff --git a/reactos/drivers/filesystems/fastfat/fat.c b/drivers/filesystems/fastfat/fat.c similarity index 100% rename from reactos/drivers/filesystems/fastfat/fat.c rename to drivers/filesystems/fastfat/fat.c diff --git a/reactos/drivers/filesystems/fastfat/fcb.c b/drivers/filesystems/fastfat/fcb.c similarity index 100% rename from reactos/drivers/filesystems/fastfat/fcb.c rename to drivers/filesystems/fastfat/fcb.c diff --git a/reactos/drivers/filesystems/fastfat/finfo.c b/drivers/filesystems/fastfat/finfo.c similarity index 100% rename from reactos/drivers/filesystems/fastfat/finfo.c rename to drivers/filesystems/fastfat/finfo.c diff --git a/reactos/drivers/filesystems/fastfat/flush.c b/drivers/filesystems/fastfat/flush.c similarity index 100% rename from reactos/drivers/filesystems/fastfat/flush.c rename to drivers/filesystems/fastfat/flush.c diff --git a/reactos/drivers/filesystems/fastfat/fsctl.c b/drivers/filesystems/fastfat/fsctl.c similarity index 100% rename from reactos/drivers/filesystems/fastfat/fsctl.c rename to drivers/filesystems/fastfat/fsctl.c diff --git a/reactos/drivers/filesystems/fastfat/iface.c b/drivers/filesystems/fastfat/iface.c similarity index 100% rename from reactos/drivers/filesystems/fastfat/iface.c rename to drivers/filesystems/fastfat/iface.c diff --git a/reactos/drivers/filesystems/fastfat/misc.c b/drivers/filesystems/fastfat/misc.c similarity index 100% rename from reactos/drivers/filesystems/fastfat/misc.c rename to drivers/filesystems/fastfat/misc.c diff --git a/reactos/drivers/filesystems/fastfat/pnp.c b/drivers/filesystems/fastfat/pnp.c similarity index 100% rename from reactos/drivers/filesystems/fastfat/pnp.c rename to drivers/filesystems/fastfat/pnp.c diff --git a/reactos/drivers/filesystems/fastfat/rw.c b/drivers/filesystems/fastfat/rw.c similarity index 100% rename from reactos/drivers/filesystems/fastfat/rw.c rename to drivers/filesystems/fastfat/rw.c diff --git a/reactos/drivers/filesystems/fastfat/shutdown.c b/drivers/filesystems/fastfat/shutdown.c similarity index 100% rename from reactos/drivers/filesystems/fastfat/shutdown.c rename to drivers/filesystems/fastfat/shutdown.c diff --git a/reactos/drivers/filesystems/fastfat/string.c b/drivers/filesystems/fastfat/string.c similarity index 100% rename from reactos/drivers/filesystems/fastfat/string.c rename to drivers/filesystems/fastfat/string.c diff --git a/reactos/drivers/filesystems/fastfat/vfat.h b/drivers/filesystems/fastfat/vfat.h similarity index 100% rename from reactos/drivers/filesystems/fastfat/vfat.h rename to drivers/filesystems/fastfat/vfat.h diff --git a/reactos/drivers/filesystems/fastfat/vfat005.1st b/drivers/filesystems/fastfat/vfat005.1st similarity index 100% rename from reactos/drivers/filesystems/fastfat/vfat005.1st rename to drivers/filesystems/fastfat/vfat005.1st diff --git a/reactos/drivers/filesystems/fastfat/vfat_fr.txt b/drivers/filesystems/fastfat/vfat_fr.txt similarity index 100% rename from reactos/drivers/filesystems/fastfat/vfat_fr.txt rename to drivers/filesystems/fastfat/vfat_fr.txt diff --git a/reactos/drivers/filesystems/fastfat/vfatfs.rbuild b/drivers/filesystems/fastfat/vfatfs.rbuild similarity index 100% rename from reactos/drivers/filesystems/fastfat/vfatfs.rbuild rename to drivers/filesystems/fastfat/vfatfs.rbuild diff --git a/reactos/drivers/filesystems/fastfat/vfatfs.rc b/drivers/filesystems/fastfat/vfatfs.rc similarity index 100% rename from reactos/drivers/filesystems/fastfat/vfatfs.rc rename to drivers/filesystems/fastfat/vfatfs.rc diff --git a/reactos/drivers/filesystems/fastfat/volume.c b/drivers/filesystems/fastfat/volume.c similarity index 100% rename from reactos/drivers/filesystems/fastfat/volume.c rename to drivers/filesystems/fastfat/volume.c diff --git a/reactos/drivers/filesystems/fastfat_new/CMakeLists.txt b/drivers/filesystems/fastfat_new/CMakeLists.txt similarity index 100% rename from reactos/drivers/filesystems/fastfat_new/CMakeLists.txt rename to drivers/filesystems/fastfat_new/CMakeLists.txt diff --git a/reactos/drivers/filesystems/fastfat_new/cleanup.c b/drivers/filesystems/fastfat_new/cleanup.c similarity index 100% rename from reactos/drivers/filesystems/fastfat_new/cleanup.c rename to drivers/filesystems/fastfat_new/cleanup.c diff --git a/reactos/drivers/filesystems/fastfat_new/close.c b/drivers/filesystems/fastfat_new/close.c similarity index 100% rename from reactos/drivers/filesystems/fastfat_new/close.c rename to drivers/filesystems/fastfat_new/close.c diff --git a/reactos/drivers/filesystems/fastfat_new/create.c b/drivers/filesystems/fastfat_new/create.c similarity index 100% rename from reactos/drivers/filesystems/fastfat_new/create.c rename to drivers/filesystems/fastfat_new/create.c diff --git a/reactos/drivers/filesystems/fastfat_new/device.c b/drivers/filesystems/fastfat_new/device.c similarity index 100% rename from reactos/drivers/filesystems/fastfat_new/device.c rename to drivers/filesystems/fastfat_new/device.c diff --git a/reactos/drivers/filesystems/fastfat_new/dir.c b/drivers/filesystems/fastfat_new/dir.c similarity index 100% rename from reactos/drivers/filesystems/fastfat_new/dir.c rename to drivers/filesystems/fastfat_new/dir.c diff --git a/reactos/drivers/filesystems/fastfat_new/ea.c b/drivers/filesystems/fastfat_new/ea.c similarity index 100% rename from reactos/drivers/filesystems/fastfat_new/ea.c rename to drivers/filesystems/fastfat_new/ea.c diff --git a/reactos/drivers/filesystems/fastfat_new/fastfat.c b/drivers/filesystems/fastfat_new/fastfat.c similarity index 100% rename from reactos/drivers/filesystems/fastfat_new/fastfat.c rename to drivers/filesystems/fastfat_new/fastfat.c diff --git a/reactos/drivers/filesystems/fastfat_new/fastfat.h b/drivers/filesystems/fastfat_new/fastfat.h similarity index 100% rename from reactos/drivers/filesystems/fastfat_new/fastfat.h rename to drivers/filesystems/fastfat_new/fastfat.h diff --git a/reactos/drivers/filesystems/fastfat_new/fastfat.rbuild b/drivers/filesystems/fastfat_new/fastfat.rbuild similarity index 100% rename from reactos/drivers/filesystems/fastfat_new/fastfat.rbuild rename to drivers/filesystems/fastfat_new/fastfat.rbuild diff --git a/reactos/drivers/filesystems/fastfat_new/fastfat.rc b/drivers/filesystems/fastfat_new/fastfat.rc similarity index 100% rename from reactos/drivers/filesystems/fastfat_new/fastfat.rc rename to drivers/filesystems/fastfat_new/fastfat.rc diff --git a/reactos/drivers/filesystems/fastfat_new/fastio.c b/drivers/filesystems/fastfat_new/fastio.c similarity index 100% rename from reactos/drivers/filesystems/fastfat_new/fastio.c rename to drivers/filesystems/fastfat_new/fastio.c diff --git a/reactos/drivers/filesystems/fastfat_new/fat.c b/drivers/filesystems/fastfat_new/fat.c similarity index 100% rename from reactos/drivers/filesystems/fastfat_new/fat.c rename to drivers/filesystems/fastfat_new/fat.c diff --git a/reactos/drivers/filesystems/fastfat_new/fat.h b/drivers/filesystems/fastfat_new/fat.h similarity index 100% rename from reactos/drivers/filesystems/fastfat_new/fat.h rename to drivers/filesystems/fastfat_new/fat.h diff --git a/reactos/drivers/filesystems/fastfat_new/fatstruc.h b/drivers/filesystems/fastfat_new/fatstruc.h similarity index 100% rename from reactos/drivers/filesystems/fastfat_new/fatstruc.h rename to drivers/filesystems/fastfat_new/fatstruc.h diff --git a/reactos/drivers/filesystems/fastfat_new/fcb.c b/drivers/filesystems/fastfat_new/fcb.c similarity index 100% rename from reactos/drivers/filesystems/fastfat_new/fcb.c rename to drivers/filesystems/fastfat_new/fcb.c diff --git a/reactos/drivers/filesystems/fastfat_new/finfo.c b/drivers/filesystems/fastfat_new/finfo.c similarity index 100% rename from reactos/drivers/filesystems/fastfat_new/finfo.c rename to drivers/filesystems/fastfat_new/finfo.c diff --git a/reactos/drivers/filesystems/fastfat_new/flush.c b/drivers/filesystems/fastfat_new/flush.c similarity index 100% rename from reactos/drivers/filesystems/fastfat_new/flush.c rename to drivers/filesystems/fastfat_new/flush.c diff --git a/reactos/drivers/filesystems/fastfat_new/fsctl.c b/drivers/filesystems/fastfat_new/fsctl.c similarity index 100% rename from reactos/drivers/filesystems/fastfat_new/fsctl.c rename to drivers/filesystems/fastfat_new/fsctl.c diff --git a/reactos/drivers/filesystems/fastfat_new/fullfat.c b/drivers/filesystems/fastfat_new/fullfat.c similarity index 100% rename from reactos/drivers/filesystems/fastfat_new/fullfat.c rename to drivers/filesystems/fastfat_new/fullfat.c diff --git a/reactos/drivers/filesystems/fastfat_new/lock.c b/drivers/filesystems/fastfat_new/lock.c similarity index 100% rename from reactos/drivers/filesystems/fastfat_new/lock.c rename to drivers/filesystems/fastfat_new/lock.c diff --git a/reactos/drivers/filesystems/fastfat_new/rw.c b/drivers/filesystems/fastfat_new/rw.c similarity index 100% rename from reactos/drivers/filesystems/fastfat_new/rw.c rename to drivers/filesystems/fastfat_new/rw.c diff --git a/reactos/drivers/filesystems/fastfat_new/shutdown.c b/drivers/filesystems/fastfat_new/shutdown.c similarity index 100% rename from reactos/drivers/filesystems/fastfat_new/shutdown.c rename to drivers/filesystems/fastfat_new/shutdown.c diff --git a/reactos/drivers/filesystems/fastfat_new/volume.c b/drivers/filesystems/fastfat_new/volume.c similarity index 100% rename from reactos/drivers/filesystems/fastfat_new/volume.c rename to drivers/filesystems/fastfat_new/volume.c diff --git a/reactos/drivers/filesystems/fs_rec/CMakeLists.txt b/drivers/filesystems/fs_rec/CMakeLists.txt similarity index 100% rename from reactos/drivers/filesystems/fs_rec/CMakeLists.txt rename to drivers/filesystems/fs_rec/CMakeLists.txt diff --git a/reactos/drivers/filesystems/fs_rec/blockdev.c b/drivers/filesystems/fs_rec/blockdev.c similarity index 100% rename from reactos/drivers/filesystems/fs_rec/blockdev.c rename to drivers/filesystems/fs_rec/blockdev.c diff --git a/reactos/drivers/filesystems/fs_rec/cdfs.c b/drivers/filesystems/fs_rec/cdfs.c similarity index 100% rename from reactos/drivers/filesystems/fs_rec/cdfs.c rename to drivers/filesystems/fs_rec/cdfs.c diff --git a/reactos/drivers/filesystems/fs_rec/ext2.c b/drivers/filesystems/fs_rec/ext2.c similarity index 100% rename from reactos/drivers/filesystems/fs_rec/ext2.c rename to drivers/filesystems/fs_rec/ext2.c diff --git a/reactos/drivers/filesystems/fs_rec/fat.c b/drivers/filesystems/fs_rec/fat.c similarity index 100% rename from reactos/drivers/filesystems/fs_rec/fat.c rename to drivers/filesystems/fs_rec/fat.c diff --git a/reactos/drivers/filesystems/fs_rec/fs_rec.c b/drivers/filesystems/fs_rec/fs_rec.c similarity index 100% rename from reactos/drivers/filesystems/fs_rec/fs_rec.c rename to drivers/filesystems/fs_rec/fs_rec.c diff --git a/reactos/drivers/filesystems/fs_rec/fs_rec.h b/drivers/filesystems/fs_rec/fs_rec.h similarity index 100% rename from reactos/drivers/filesystems/fs_rec/fs_rec.h rename to drivers/filesystems/fs_rec/fs_rec.h diff --git a/reactos/drivers/filesystems/fs_rec/fs_rec.rbuild b/drivers/filesystems/fs_rec/fs_rec.rbuild similarity index 100% rename from reactos/drivers/filesystems/fs_rec/fs_rec.rbuild rename to drivers/filesystems/fs_rec/fs_rec.rbuild diff --git a/reactos/drivers/filesystems/fs_rec/fs_rec.rc b/drivers/filesystems/fs_rec/fs_rec.rc similarity index 100% rename from reactos/drivers/filesystems/fs_rec/fs_rec.rc rename to drivers/filesystems/fs_rec/fs_rec.rc diff --git a/reactos/drivers/filesystems/fs_rec/ntfs.c b/drivers/filesystems/fs_rec/ntfs.c similarity index 100% rename from reactos/drivers/filesystems/fs_rec/ntfs.c rename to drivers/filesystems/fs_rec/ntfs.c diff --git a/reactos/drivers/filesystems/fs_rec/udfs.c b/drivers/filesystems/fs_rec/udfs.c similarity index 100% rename from reactos/drivers/filesystems/fs_rec/udfs.c rename to drivers/filesystems/fs_rec/udfs.c diff --git a/reactos/drivers/filesystems/fs_rec/udfs.h b/drivers/filesystems/fs_rec/udfs.h similarity index 100% rename from reactos/drivers/filesystems/fs_rec/udfs.h rename to drivers/filesystems/fs_rec/udfs.h diff --git a/reactos/drivers/filesystems/msfs/CMakeLists.txt b/drivers/filesystems/msfs/CMakeLists.txt similarity index 100% rename from reactos/drivers/filesystems/msfs/CMakeLists.txt rename to drivers/filesystems/msfs/CMakeLists.txt diff --git a/reactos/drivers/filesystems/msfs/create.c b/drivers/filesystems/msfs/create.c similarity index 100% rename from reactos/drivers/filesystems/msfs/create.c rename to drivers/filesystems/msfs/create.c diff --git a/reactos/drivers/filesystems/msfs/finfo.c b/drivers/filesystems/msfs/finfo.c similarity index 100% rename from reactos/drivers/filesystems/msfs/finfo.c rename to drivers/filesystems/msfs/finfo.c diff --git a/reactos/drivers/filesystems/msfs/fsctrl.c b/drivers/filesystems/msfs/fsctrl.c similarity index 100% rename from reactos/drivers/filesystems/msfs/fsctrl.c rename to drivers/filesystems/msfs/fsctrl.c diff --git a/reactos/drivers/filesystems/msfs/msfs.c b/drivers/filesystems/msfs/msfs.c similarity index 100% rename from reactos/drivers/filesystems/msfs/msfs.c rename to drivers/filesystems/msfs/msfs.c diff --git a/reactos/drivers/filesystems/msfs/msfs.h b/drivers/filesystems/msfs/msfs.h similarity index 100% rename from reactos/drivers/filesystems/msfs/msfs.h rename to drivers/filesystems/msfs/msfs.h diff --git a/reactos/drivers/filesystems/msfs/msfs.rbuild b/drivers/filesystems/msfs/msfs.rbuild similarity index 100% rename from reactos/drivers/filesystems/msfs/msfs.rbuild rename to drivers/filesystems/msfs/msfs.rbuild diff --git a/reactos/drivers/filesystems/msfs/msfs.rc b/drivers/filesystems/msfs/msfs.rc similarity index 100% rename from reactos/drivers/filesystems/msfs/msfs.rc rename to drivers/filesystems/msfs/msfs.rc diff --git a/reactos/drivers/filesystems/msfs/rw.c b/drivers/filesystems/msfs/rw.c similarity index 100% rename from reactos/drivers/filesystems/msfs/rw.c rename to drivers/filesystems/msfs/rw.c diff --git a/reactos/drivers/filesystems/mup/CMakeLists.txt b/drivers/filesystems/mup/CMakeLists.txt similarity index 100% rename from reactos/drivers/filesystems/mup/CMakeLists.txt rename to drivers/filesystems/mup/CMakeLists.txt diff --git a/reactos/drivers/filesystems/mup/create.c b/drivers/filesystems/mup/create.c similarity index 100% rename from reactos/drivers/filesystems/mup/create.c rename to drivers/filesystems/mup/create.c diff --git a/reactos/drivers/filesystems/mup/mup.c b/drivers/filesystems/mup/mup.c similarity index 100% rename from reactos/drivers/filesystems/mup/mup.c rename to drivers/filesystems/mup/mup.c diff --git a/reactos/drivers/filesystems/mup/mup.h b/drivers/filesystems/mup/mup.h similarity index 100% rename from reactos/drivers/filesystems/mup/mup.h rename to drivers/filesystems/mup/mup.h diff --git a/reactos/drivers/filesystems/mup/mup.rbuild b/drivers/filesystems/mup/mup.rbuild similarity index 100% rename from reactos/drivers/filesystems/mup/mup.rbuild rename to drivers/filesystems/mup/mup.rbuild diff --git a/reactos/drivers/filesystems/mup/mup.rc b/drivers/filesystems/mup/mup.rc similarity index 100% rename from reactos/drivers/filesystems/mup/mup.rc rename to drivers/filesystems/mup/mup.rc diff --git a/reactos/drivers/filesystems/npfs/CMakeLists.txt b/drivers/filesystems/npfs/CMakeLists.txt similarity index 100% rename from reactos/drivers/filesystems/npfs/CMakeLists.txt rename to drivers/filesystems/npfs/CMakeLists.txt diff --git a/reactos/drivers/filesystems/npfs/create.c b/drivers/filesystems/npfs/create.c similarity index 100% rename from reactos/drivers/filesystems/npfs/create.c rename to drivers/filesystems/npfs/create.c diff --git a/reactos/drivers/filesystems/npfs/dirctl.c b/drivers/filesystems/npfs/dirctl.c similarity index 100% rename from reactos/drivers/filesystems/npfs/dirctl.c rename to drivers/filesystems/npfs/dirctl.c diff --git a/reactos/drivers/filesystems/npfs/finfo.c b/drivers/filesystems/npfs/finfo.c similarity index 100% rename from reactos/drivers/filesystems/npfs/finfo.c rename to drivers/filesystems/npfs/finfo.c diff --git a/reactos/drivers/filesystems/npfs/fsctrl.c b/drivers/filesystems/npfs/fsctrl.c similarity index 100% rename from reactos/drivers/filesystems/npfs/fsctrl.c rename to drivers/filesystems/npfs/fsctrl.c diff --git a/reactos/drivers/filesystems/npfs/npfs.c b/drivers/filesystems/npfs/npfs.c similarity index 100% rename from reactos/drivers/filesystems/npfs/npfs.c rename to drivers/filesystems/npfs/npfs.c diff --git a/reactos/drivers/filesystems/npfs/npfs.h b/drivers/filesystems/npfs/npfs.h similarity index 100% rename from reactos/drivers/filesystems/npfs/npfs.h rename to drivers/filesystems/npfs/npfs.h diff --git a/reactos/drivers/filesystems/npfs/npfs.rbuild b/drivers/filesystems/npfs/npfs.rbuild similarity index 100% rename from reactos/drivers/filesystems/npfs/npfs.rbuild rename to drivers/filesystems/npfs/npfs.rbuild diff --git a/reactos/drivers/filesystems/npfs/npfs.rc b/drivers/filesystems/npfs/npfs.rc similarity index 100% rename from reactos/drivers/filesystems/npfs/npfs.rc rename to drivers/filesystems/npfs/npfs.rc diff --git a/reactos/drivers/filesystems/npfs/rw.c b/drivers/filesystems/npfs/rw.c similarity index 100% rename from reactos/drivers/filesystems/npfs/rw.c rename to drivers/filesystems/npfs/rw.c diff --git a/reactos/drivers/filesystems/npfs/volume.c b/drivers/filesystems/npfs/volume.c similarity index 100% rename from reactos/drivers/filesystems/npfs/volume.c rename to drivers/filesystems/npfs/volume.c diff --git a/reactos/drivers/filesystems/ntfs/CMakeLists.txt b/drivers/filesystems/ntfs/CMakeLists.txt similarity index 100% rename from reactos/drivers/filesystems/ntfs/CMakeLists.txt rename to drivers/filesystems/ntfs/CMakeLists.txt diff --git a/reactos/drivers/filesystems/ntfs/attrib.c b/drivers/filesystems/ntfs/attrib.c similarity index 100% rename from reactos/drivers/filesystems/ntfs/attrib.c rename to drivers/filesystems/ntfs/attrib.c diff --git a/reactos/drivers/filesystems/ntfs/blockdev.c b/drivers/filesystems/ntfs/blockdev.c similarity index 100% rename from reactos/drivers/filesystems/ntfs/blockdev.c rename to drivers/filesystems/ntfs/blockdev.c diff --git a/reactos/drivers/filesystems/ntfs/close.c b/drivers/filesystems/ntfs/close.c similarity index 100% rename from reactos/drivers/filesystems/ntfs/close.c rename to drivers/filesystems/ntfs/close.c diff --git a/reactos/drivers/filesystems/ntfs/create.c b/drivers/filesystems/ntfs/create.c similarity index 100% rename from reactos/drivers/filesystems/ntfs/create.c rename to drivers/filesystems/ntfs/create.c diff --git a/reactos/drivers/filesystems/ntfs/dirctl.c b/drivers/filesystems/ntfs/dirctl.c similarity index 100% rename from reactos/drivers/filesystems/ntfs/dirctl.c rename to drivers/filesystems/ntfs/dirctl.c diff --git a/reactos/drivers/filesystems/ntfs/dispatch.c b/drivers/filesystems/ntfs/dispatch.c similarity index 100% rename from reactos/drivers/filesystems/ntfs/dispatch.c rename to drivers/filesystems/ntfs/dispatch.c diff --git a/reactos/drivers/filesystems/ntfs/fastio.c b/drivers/filesystems/ntfs/fastio.c similarity index 100% rename from reactos/drivers/filesystems/ntfs/fastio.c rename to drivers/filesystems/ntfs/fastio.c diff --git a/reactos/drivers/filesystems/ntfs/fcb.c b/drivers/filesystems/ntfs/fcb.c similarity index 100% rename from reactos/drivers/filesystems/ntfs/fcb.c rename to drivers/filesystems/ntfs/fcb.c diff --git a/reactos/drivers/filesystems/ntfs/finfo.c b/drivers/filesystems/ntfs/finfo.c similarity index 100% rename from reactos/drivers/filesystems/ntfs/finfo.c rename to drivers/filesystems/ntfs/finfo.c diff --git a/reactos/drivers/filesystems/ntfs/fsctl.c b/drivers/filesystems/ntfs/fsctl.c similarity index 100% rename from reactos/drivers/filesystems/ntfs/fsctl.c rename to drivers/filesystems/ntfs/fsctl.c diff --git a/reactos/drivers/filesystems/ntfs/mft.c b/drivers/filesystems/ntfs/mft.c similarity index 100% rename from reactos/drivers/filesystems/ntfs/mft.c rename to drivers/filesystems/ntfs/mft.c diff --git a/reactos/drivers/filesystems/ntfs/misc.c b/drivers/filesystems/ntfs/misc.c similarity index 100% rename from reactos/drivers/filesystems/ntfs/misc.c rename to drivers/filesystems/ntfs/misc.c diff --git a/reactos/drivers/filesystems/ntfs/notes.txt b/drivers/filesystems/ntfs/notes.txt similarity index 100% rename from reactos/drivers/filesystems/ntfs/notes.txt rename to drivers/filesystems/ntfs/notes.txt diff --git a/reactos/drivers/filesystems/ntfs/ntfs.c b/drivers/filesystems/ntfs/ntfs.c similarity index 100% rename from reactos/drivers/filesystems/ntfs/ntfs.c rename to drivers/filesystems/ntfs/ntfs.c diff --git a/reactos/drivers/filesystems/ntfs/ntfs.h b/drivers/filesystems/ntfs/ntfs.h similarity index 100% rename from reactos/drivers/filesystems/ntfs/ntfs.h rename to drivers/filesystems/ntfs/ntfs.h diff --git a/reactos/drivers/filesystems/ntfs/ntfs.rbuild b/drivers/filesystems/ntfs/ntfs.rbuild similarity index 100% rename from reactos/drivers/filesystems/ntfs/ntfs.rbuild rename to drivers/filesystems/ntfs/ntfs.rbuild diff --git a/reactos/drivers/filesystems/ntfs/ntfs.rc b/drivers/filesystems/ntfs/ntfs.rc similarity index 100% rename from reactos/drivers/filesystems/ntfs/ntfs.rc rename to drivers/filesystems/ntfs/ntfs.rc diff --git a/reactos/drivers/filesystems/ntfs/rw.c b/drivers/filesystems/ntfs/rw.c similarity index 100% rename from reactos/drivers/filesystems/ntfs/rw.c rename to drivers/filesystems/ntfs/rw.c diff --git a/reactos/drivers/filesystems/ntfs/volinfo.c b/drivers/filesystems/ntfs/volinfo.c similarity index 100% rename from reactos/drivers/filesystems/ntfs/volinfo.c rename to drivers/filesystems/ntfs/volinfo.c diff --git a/reactos/drivers/input/CMakeLists.txt b/drivers/input/CMakeLists.txt similarity index 100% rename from reactos/drivers/input/CMakeLists.txt rename to drivers/input/CMakeLists.txt diff --git a/reactos/drivers/input/directory.rbuild b/drivers/input/directory.rbuild similarity index 100% rename from reactos/drivers/input/directory.rbuild rename to drivers/input/directory.rbuild diff --git a/reactos/drivers/input/i8042prt/CMakeLists.txt b/drivers/input/i8042prt/CMakeLists.txt similarity index 100% rename from reactos/drivers/input/i8042prt/CMakeLists.txt rename to drivers/input/i8042prt/CMakeLists.txt diff --git a/reactos/drivers/input/i8042prt/README.txt b/drivers/input/i8042prt/README.txt similarity index 100% rename from reactos/drivers/input/i8042prt/README.txt rename to drivers/input/i8042prt/README.txt diff --git a/reactos/drivers/input/i8042prt/createclose.c b/drivers/input/i8042prt/createclose.c similarity index 100% rename from reactos/drivers/input/i8042prt/createclose.c rename to drivers/input/i8042prt/createclose.c diff --git a/reactos/drivers/input/i8042prt/i8042prt.c b/drivers/input/i8042prt/i8042prt.c similarity index 100% rename from reactos/drivers/input/i8042prt/i8042prt.c rename to drivers/input/i8042prt/i8042prt.c diff --git a/reactos/drivers/input/i8042prt/i8042prt.h b/drivers/input/i8042prt/i8042prt.h similarity index 100% rename from reactos/drivers/input/i8042prt/i8042prt.h rename to drivers/input/i8042prt/i8042prt.h diff --git a/reactos/drivers/input/i8042prt/i8042prt.rbuild b/drivers/input/i8042prt/i8042prt.rbuild similarity index 100% rename from reactos/drivers/input/i8042prt/i8042prt.rbuild rename to drivers/input/i8042prt/i8042prt.rbuild diff --git a/reactos/drivers/input/i8042prt/i8042prt.rc b/drivers/input/i8042prt/i8042prt.rc similarity index 100% rename from reactos/drivers/input/i8042prt/i8042prt.rc rename to drivers/input/i8042prt/i8042prt.rc diff --git a/reactos/drivers/input/i8042prt/keyboard.c b/drivers/input/i8042prt/keyboard.c similarity index 100% rename from reactos/drivers/input/i8042prt/keyboard.c rename to drivers/input/i8042prt/keyboard.c diff --git a/reactos/drivers/input/i8042prt/misc.c b/drivers/input/i8042prt/misc.c similarity index 100% rename from reactos/drivers/input/i8042prt/misc.c rename to drivers/input/i8042prt/misc.c diff --git a/reactos/drivers/input/i8042prt/mouse.c b/drivers/input/i8042prt/mouse.c similarity index 100% rename from reactos/drivers/input/i8042prt/mouse.c rename to drivers/input/i8042prt/mouse.c diff --git a/reactos/drivers/input/i8042prt/pnp.c b/drivers/input/i8042prt/pnp.c similarity index 100% rename from reactos/drivers/input/i8042prt/pnp.c rename to drivers/input/i8042prt/pnp.c diff --git a/reactos/drivers/input/i8042prt/ps2pp.c b/drivers/input/i8042prt/ps2pp.c similarity index 100% rename from reactos/drivers/input/i8042prt/ps2pp.c rename to drivers/input/i8042prt/ps2pp.c diff --git a/reactos/drivers/input/i8042prt/readwrite.c b/drivers/input/i8042prt/readwrite.c similarity index 100% rename from reactos/drivers/input/i8042prt/readwrite.c rename to drivers/input/i8042prt/readwrite.c diff --git a/reactos/drivers/input/i8042prt/registry.c b/drivers/input/i8042prt/registry.c similarity index 100% rename from reactos/drivers/input/i8042prt/registry.c rename to drivers/input/i8042prt/registry.c diff --git a/reactos/drivers/input/i8042prt/setup.c b/drivers/input/i8042prt/setup.c similarity index 100% rename from reactos/drivers/input/i8042prt/setup.c rename to drivers/input/i8042prt/setup.c diff --git a/reactos/drivers/input/kbdclass/CMakeLists.txt b/drivers/input/kbdclass/CMakeLists.txt similarity index 100% rename from reactos/drivers/input/kbdclass/CMakeLists.txt rename to drivers/input/kbdclass/CMakeLists.txt diff --git a/reactos/drivers/input/kbdclass/kbdclass.c b/drivers/input/kbdclass/kbdclass.c similarity index 100% rename from reactos/drivers/input/kbdclass/kbdclass.c rename to drivers/input/kbdclass/kbdclass.c diff --git a/reactos/drivers/input/kbdclass/kbdclass.h b/drivers/input/kbdclass/kbdclass.h similarity index 100% rename from reactos/drivers/input/kbdclass/kbdclass.h rename to drivers/input/kbdclass/kbdclass.h diff --git a/reactos/drivers/input/kbdclass/kbdclass.rbuild b/drivers/input/kbdclass/kbdclass.rbuild similarity index 100% rename from reactos/drivers/input/kbdclass/kbdclass.rbuild rename to drivers/input/kbdclass/kbdclass.rbuild diff --git a/reactos/drivers/input/kbdclass/kbdclass.rc b/drivers/input/kbdclass/kbdclass.rc similarity index 100% rename from reactos/drivers/input/kbdclass/kbdclass.rc rename to drivers/input/kbdclass/kbdclass.rc diff --git a/reactos/drivers/input/kbdclass/misc.c b/drivers/input/kbdclass/misc.c similarity index 100% rename from reactos/drivers/input/kbdclass/misc.c rename to drivers/input/kbdclass/misc.c diff --git a/reactos/drivers/input/kbdclass/setup.c b/drivers/input/kbdclass/setup.c similarity index 100% rename from reactos/drivers/input/kbdclass/setup.c rename to drivers/input/kbdclass/setup.c diff --git a/reactos/drivers/input/mouclass/CMakeLists.txt b/drivers/input/mouclass/CMakeLists.txt similarity index 100% rename from reactos/drivers/input/mouclass/CMakeLists.txt rename to drivers/input/mouclass/CMakeLists.txt diff --git a/reactos/drivers/input/mouclass/misc.c b/drivers/input/mouclass/misc.c similarity index 100% rename from reactos/drivers/input/mouclass/misc.c rename to drivers/input/mouclass/misc.c diff --git a/reactos/drivers/input/mouclass/mouclass.c b/drivers/input/mouclass/mouclass.c similarity index 100% rename from reactos/drivers/input/mouclass/mouclass.c rename to drivers/input/mouclass/mouclass.c diff --git a/reactos/drivers/input/mouclass/mouclass.h b/drivers/input/mouclass/mouclass.h similarity index 100% rename from reactos/drivers/input/mouclass/mouclass.h rename to drivers/input/mouclass/mouclass.h diff --git a/reactos/drivers/input/mouclass/mouclass.rbuild b/drivers/input/mouclass/mouclass.rbuild similarity index 100% rename from reactos/drivers/input/mouclass/mouclass.rbuild rename to drivers/input/mouclass/mouclass.rbuild diff --git a/reactos/drivers/input/mouclass/mouclass.rc b/drivers/input/mouclass/mouclass.rc similarity index 100% rename from reactos/drivers/input/mouclass/mouclass.rc rename to drivers/input/mouclass/mouclass.rc diff --git a/reactos/drivers/input/sermouse/CMakeLists.txt b/drivers/input/sermouse/CMakeLists.txt similarity index 100% rename from reactos/drivers/input/sermouse/CMakeLists.txt rename to drivers/input/sermouse/CMakeLists.txt diff --git a/reactos/drivers/input/sermouse/createclose.c b/drivers/input/sermouse/createclose.c similarity index 100% rename from reactos/drivers/input/sermouse/createclose.c rename to drivers/input/sermouse/createclose.c diff --git a/reactos/drivers/input/sermouse/detect.c b/drivers/input/sermouse/detect.c similarity index 100% rename from reactos/drivers/input/sermouse/detect.c rename to drivers/input/sermouse/detect.c diff --git a/reactos/drivers/input/sermouse/fdo.c b/drivers/input/sermouse/fdo.c similarity index 100% rename from reactos/drivers/input/sermouse/fdo.c rename to drivers/input/sermouse/fdo.c diff --git a/reactos/drivers/input/sermouse/internaldevctl.c b/drivers/input/sermouse/internaldevctl.c similarity index 100% rename from reactos/drivers/input/sermouse/internaldevctl.c rename to drivers/input/sermouse/internaldevctl.c diff --git a/reactos/drivers/input/sermouse/misc.c b/drivers/input/sermouse/misc.c similarity index 100% rename from reactos/drivers/input/sermouse/misc.c rename to drivers/input/sermouse/misc.c diff --git a/reactos/drivers/input/sermouse/readmouse.c b/drivers/input/sermouse/readmouse.c similarity index 100% rename from reactos/drivers/input/sermouse/readmouse.c rename to drivers/input/sermouse/readmouse.c diff --git a/reactos/drivers/input/sermouse/sermouse.c b/drivers/input/sermouse/sermouse.c similarity index 100% rename from reactos/drivers/input/sermouse/sermouse.c rename to drivers/input/sermouse/sermouse.c diff --git a/reactos/drivers/input/sermouse/sermouse.h b/drivers/input/sermouse/sermouse.h similarity index 100% rename from reactos/drivers/input/sermouse/sermouse.h rename to drivers/input/sermouse/sermouse.h diff --git a/reactos/drivers/input/sermouse/sermouse.rbuild b/drivers/input/sermouse/sermouse.rbuild similarity index 100% rename from reactos/drivers/input/sermouse/sermouse.rbuild rename to drivers/input/sermouse/sermouse.rbuild diff --git a/reactos/drivers/input/sermouse/sermouse.rc b/drivers/input/sermouse/sermouse.rc similarity index 100% rename from reactos/drivers/input/sermouse/sermouse.rc rename to drivers/input/sermouse/sermouse.rc diff --git a/reactos/drivers/input/sermouse/sermouse.txt b/drivers/input/sermouse/sermouse.txt similarity index 100% rename from reactos/drivers/input/sermouse/sermouse.txt rename to drivers/input/sermouse/sermouse.txt diff --git a/reactos/drivers/ksfilter/CMakeLists.txt b/drivers/ksfilter/CMakeLists.txt similarity index 100% rename from reactos/drivers/ksfilter/CMakeLists.txt rename to drivers/ksfilter/CMakeLists.txt diff --git a/reactos/drivers/ksfilter/directory.rbuild b/drivers/ksfilter/directory.rbuild similarity index 100% rename from reactos/drivers/ksfilter/directory.rbuild rename to drivers/ksfilter/directory.rbuild diff --git a/reactos/drivers/ksfilter/ks/CMakeLists.txt b/drivers/ksfilter/ks/CMakeLists.txt similarity index 100% rename from reactos/drivers/ksfilter/ks/CMakeLists.txt rename to drivers/ksfilter/ks/CMakeLists.txt diff --git a/reactos/drivers/ksfilter/ks/allocators.c b/drivers/ksfilter/ks/allocators.c similarity index 100% rename from reactos/drivers/ksfilter/ks/allocators.c rename to drivers/ksfilter/ks/allocators.c diff --git a/reactos/drivers/ksfilter/ks/api.c b/drivers/ksfilter/ks/api.c similarity index 100% rename from reactos/drivers/ksfilter/ks/api.c rename to drivers/ksfilter/ks/api.c diff --git a/reactos/drivers/ksfilter/ks/bag.c b/drivers/ksfilter/ks/bag.c similarity index 100% rename from reactos/drivers/ksfilter/ks/bag.c rename to drivers/ksfilter/ks/bag.c diff --git a/reactos/drivers/ksfilter/ks/clocks.c b/drivers/ksfilter/ks/clocks.c similarity index 100% rename from reactos/drivers/ksfilter/ks/clocks.c rename to drivers/ksfilter/ks/clocks.c diff --git a/reactos/drivers/ksfilter/ks/connectivity.c b/drivers/ksfilter/ks/connectivity.c similarity index 100% rename from reactos/drivers/ksfilter/ks/connectivity.c rename to drivers/ksfilter/ks/connectivity.c diff --git a/reactos/drivers/ksfilter/ks/device.c b/drivers/ksfilter/ks/device.c similarity index 100% rename from reactos/drivers/ksfilter/ks/device.c rename to drivers/ksfilter/ks/device.c diff --git a/reactos/drivers/ksfilter/ks/deviceinterface.c b/drivers/ksfilter/ks/deviceinterface.c similarity index 100% rename from reactos/drivers/ksfilter/ks/deviceinterface.c rename to drivers/ksfilter/ks/deviceinterface.c diff --git a/reactos/drivers/ksfilter/ks/driver.c b/drivers/ksfilter/ks/driver.c similarity index 100% rename from reactos/drivers/ksfilter/ks/driver.c rename to drivers/ksfilter/ks/driver.c diff --git a/reactos/drivers/ksfilter/ks/event.c b/drivers/ksfilter/ks/event.c similarity index 100% rename from reactos/drivers/ksfilter/ks/event.c rename to drivers/ksfilter/ks/event.c diff --git a/reactos/drivers/ksfilter/ks/filter.c b/drivers/ksfilter/ks/filter.c similarity index 100% rename from reactos/drivers/ksfilter/ks/filter.c rename to drivers/ksfilter/ks/filter.c diff --git a/reactos/drivers/ksfilter/ks/filterfactory.c b/drivers/ksfilter/ks/filterfactory.c similarity index 100% rename from reactos/drivers/ksfilter/ks/filterfactory.c rename to drivers/ksfilter/ks/filterfactory.c diff --git a/reactos/drivers/ksfilter/ks/image.c b/drivers/ksfilter/ks/image.c similarity index 100% rename from reactos/drivers/ksfilter/ks/image.c rename to drivers/ksfilter/ks/image.c diff --git a/reactos/drivers/ksfilter/ks/irp.c b/drivers/ksfilter/ks/irp.c similarity index 100% rename from reactos/drivers/ksfilter/ks/irp.c rename to drivers/ksfilter/ks/irp.c diff --git a/reactos/drivers/ksfilter/ks/kcom.c b/drivers/ksfilter/ks/kcom.c similarity index 100% rename from reactos/drivers/ksfilter/ks/kcom.c rename to drivers/ksfilter/ks/kcom.c diff --git a/reactos/drivers/ksfilter/ks/ks.rbuild b/drivers/ksfilter/ks/ks.rbuild similarity index 100% rename from reactos/drivers/ksfilter/ks/ks.rbuild rename to drivers/ksfilter/ks/ks.rbuild diff --git a/reactos/drivers/ksfilter/ks/ks.rc b/drivers/ksfilter/ks/ks.rc similarity index 100% rename from reactos/drivers/ksfilter/ks/ks.rc rename to drivers/ksfilter/ks/ks.rc diff --git a/reactos/drivers/ksfilter/ks/ks.spec b/drivers/ksfilter/ks/ks.spec similarity index 100% rename from reactos/drivers/ksfilter/ks/ks.spec rename to drivers/ksfilter/ks/ks.spec diff --git a/reactos/drivers/ksfilter/ks/ksfunc.h b/drivers/ksfilter/ks/ksfunc.h similarity index 100% rename from reactos/drivers/ksfilter/ks/ksfunc.h rename to drivers/ksfilter/ks/ksfunc.h diff --git a/reactos/drivers/ksfilter/ks/ksiface.h b/drivers/ksfilter/ks/ksiface.h similarity index 100% rename from reactos/drivers/ksfilter/ks/ksiface.h rename to drivers/ksfilter/ks/ksiface.h diff --git a/reactos/drivers/ksfilter/ks/kstypes.h b/drivers/ksfilter/ks/kstypes.h similarity index 100% rename from reactos/drivers/ksfilter/ks/kstypes.h rename to drivers/ksfilter/ks/kstypes.h diff --git a/reactos/drivers/ksfilter/ks/methods.c b/drivers/ksfilter/ks/methods.c similarity index 100% rename from reactos/drivers/ksfilter/ks/methods.c rename to drivers/ksfilter/ks/methods.c diff --git a/reactos/drivers/ksfilter/ks/misc.c b/drivers/ksfilter/ks/misc.c similarity index 100% rename from reactos/drivers/ksfilter/ks/misc.c rename to drivers/ksfilter/ks/misc.c diff --git a/reactos/drivers/ksfilter/ks/msvc.S b/drivers/ksfilter/ks/msvc.S similarity index 100% rename from reactos/drivers/ksfilter/ks/msvc.S rename to drivers/ksfilter/ks/msvc.S diff --git a/reactos/drivers/ksfilter/ks/pin.c b/drivers/ksfilter/ks/pin.c similarity index 100% rename from reactos/drivers/ksfilter/ks/pin.c rename to drivers/ksfilter/ks/pin.c diff --git a/reactos/drivers/ksfilter/ks/priv.h b/drivers/ksfilter/ks/priv.h similarity index 100% rename from reactos/drivers/ksfilter/ks/priv.h rename to drivers/ksfilter/ks/priv.h diff --git a/reactos/drivers/ksfilter/ks/property.c b/drivers/ksfilter/ks/property.c similarity index 100% rename from reactos/drivers/ksfilter/ks/property.c rename to drivers/ksfilter/ks/property.c diff --git a/reactos/drivers/ksfilter/ks/swenum.c b/drivers/ksfilter/ks/swenum.c similarity index 100% rename from reactos/drivers/ksfilter/ks/swenum.c rename to drivers/ksfilter/ks/swenum.c diff --git a/reactos/drivers/ksfilter/ks/topology.c b/drivers/ksfilter/ks/topology.c similarity index 100% rename from reactos/drivers/ksfilter/ks/topology.c rename to drivers/ksfilter/ks/topology.c diff --git a/reactos/drivers/ksfilter/ks/unknown.c b/drivers/ksfilter/ks/unknown.c similarity index 100% rename from reactos/drivers/ksfilter/ks/unknown.c rename to drivers/ksfilter/ks/unknown.c diff --git a/reactos/drivers/ksfilter/ks/worker.c b/drivers/ksfilter/ks/worker.c similarity index 100% rename from reactos/drivers/ksfilter/ks/worker.c rename to drivers/ksfilter/ks/worker.c diff --git a/reactos/drivers/ksfilter/swenum/CMakeLists.txt b/drivers/ksfilter/swenum/CMakeLists.txt similarity index 100% rename from reactos/drivers/ksfilter/swenum/CMakeLists.txt rename to drivers/ksfilter/swenum/CMakeLists.txt diff --git a/reactos/drivers/ksfilter/swenum/precomp.h b/drivers/ksfilter/swenum/precomp.h similarity index 100% rename from reactos/drivers/ksfilter/swenum/precomp.h rename to drivers/ksfilter/swenum/precomp.h diff --git a/reactos/drivers/ksfilter/swenum/swenum.c b/drivers/ksfilter/swenum/swenum.c similarity index 100% rename from reactos/drivers/ksfilter/swenum/swenum.c rename to drivers/ksfilter/swenum/swenum.c diff --git a/reactos/drivers/ksfilter/swenum/swenum.rbuild b/drivers/ksfilter/swenum/swenum.rbuild similarity index 100% rename from reactos/drivers/ksfilter/swenum/swenum.rbuild rename to drivers/ksfilter/swenum/swenum.rbuild diff --git a/reactos/drivers/multimedia/README b/drivers/multimedia/README similarity index 100% rename from reactos/drivers/multimedia/README rename to drivers/multimedia/README diff --git a/reactos/drivers/multimedia/audio/directory.rbuild b/drivers/multimedia/audio/directory.rbuild similarity index 100% rename from reactos/drivers/multimedia/audio/directory.rbuild rename to drivers/multimedia/audio/directory.rbuild diff --git a/reactos/drivers/multimedia/audio/mpu401_nt4/mpu401.c b/drivers/multimedia/audio/mpu401_nt4/mpu401.c similarity index 100% rename from reactos/drivers/multimedia/audio/mpu401_nt4/mpu401.c rename to drivers/multimedia/audio/mpu401_nt4/mpu401.c diff --git a/reactos/drivers/multimedia/audio/mpu401_nt4/mpu401.h b/drivers/multimedia/audio/mpu401_nt4/mpu401.h similarity index 100% rename from reactos/drivers/multimedia/audio/mpu401_nt4/mpu401.h rename to drivers/multimedia/audio/mpu401_nt4/mpu401.h diff --git a/reactos/drivers/multimedia/audio/mpu401_nt4/mpu401.rbuild b/drivers/multimedia/audio/mpu401_nt4/mpu401.rbuild similarity index 100% rename from reactos/drivers/multimedia/audio/mpu401_nt4/mpu401.rbuild rename to drivers/multimedia/audio/mpu401_nt4/mpu401.rbuild diff --git a/reactos/drivers/multimedia/audio/mpu401_nt4/mpu401.rc b/drivers/multimedia/audio/mpu401_nt4/mpu401.rc similarity index 100% rename from reactos/drivers/multimedia/audio/mpu401_nt4/mpu401.rc rename to drivers/multimedia/audio/mpu401_nt4/mpu401.rc diff --git a/reactos/drivers/multimedia/audio/mpu401_nt4/portio.c b/drivers/multimedia/audio/mpu401_nt4/portio.c similarity index 100% rename from reactos/drivers/multimedia/audio/mpu401_nt4/portio.c rename to drivers/multimedia/audio/mpu401_nt4/portio.c diff --git a/reactos/drivers/multimedia/audio/mpu401_nt4/readme.txt b/drivers/multimedia/audio/mpu401_nt4/readme.txt similarity index 100% rename from reactos/drivers/multimedia/audio/mpu401_nt4/readme.txt rename to drivers/multimedia/audio/mpu401_nt4/readme.txt diff --git a/reactos/drivers/multimedia/audio/mpu401_nt4/sbdebug.h b/drivers/multimedia/audio/mpu401_nt4/sbdebug.h similarity index 100% rename from reactos/drivers/multimedia/audio/mpu401_nt4/sbdebug.h rename to drivers/multimedia/audio/mpu401_nt4/sbdebug.h diff --git a/reactos/drivers/multimedia/audio/mpu401_nt4/settings.c b/drivers/multimedia/audio/mpu401_nt4/settings.c similarity index 100% rename from reactos/drivers/multimedia/audio/mpu401_nt4/settings.c rename to drivers/multimedia/audio/mpu401_nt4/settings.c diff --git a/reactos/drivers/multimedia/audio/mpu401_nt4/test.c b/drivers/multimedia/audio/mpu401_nt4/test.c similarity index 100% rename from reactos/drivers/multimedia/audio/mpu401_nt4/test.c rename to drivers/multimedia/audio/mpu401_nt4/test.c diff --git a/reactos/drivers/multimedia/audio/sb16_nt4.old/control.c b/drivers/multimedia/audio/sb16_nt4.old/control.c similarity index 100% rename from reactos/drivers/multimedia/audio/sb16_nt4.old/control.c rename to drivers/multimedia/audio/sb16_nt4.old/control.c diff --git a/reactos/drivers/multimedia/audio/sb16_nt4.old/interrupt.c b/drivers/multimedia/audio/sb16_nt4.old/interrupt.c similarity index 100% rename from reactos/drivers/multimedia/audio/sb16_nt4.old/interrupt.c rename to drivers/multimedia/audio/sb16_nt4.old/interrupt.c diff --git a/reactos/drivers/multimedia/audio/sb16_nt4.old/main.c b/drivers/multimedia/audio/sb16_nt4.old/main.c similarity index 100% rename from reactos/drivers/multimedia/audio/sb16_nt4.old/main.c rename to drivers/multimedia/audio/sb16_nt4.old/main.c diff --git a/reactos/drivers/multimedia/audio/sb16_nt4.old/sb16_nt4.rbuild b/drivers/multimedia/audio/sb16_nt4.old/sb16_nt4.rbuild similarity index 100% rename from reactos/drivers/multimedia/audio/sb16_nt4.old/sb16_nt4.rbuild rename to drivers/multimedia/audio/sb16_nt4.old/sb16_nt4.rbuild diff --git a/reactos/drivers/multimedia/audio/sb16_nt4.old/sndblst.h b/drivers/multimedia/audio/sb16_nt4.old/sndblst.h similarity index 100% rename from reactos/drivers/multimedia/audio/sb16_nt4.old/sndblst.h rename to drivers/multimedia/audio/sb16_nt4.old/sndblst.h diff --git a/reactos/drivers/multimedia/audio/sndblst.old/card.c b/drivers/multimedia/audio/sndblst.old/card.c similarity index 100% rename from reactos/drivers/multimedia/audio/sndblst.old/card.c rename to drivers/multimedia/audio/sndblst.old/card.c diff --git a/reactos/drivers/multimedia/audio/sndblst.old/dma.c b/drivers/multimedia/audio/sndblst.old/dma.c similarity index 100% rename from reactos/drivers/multimedia/audio/sndblst.old/dma.c rename to drivers/multimedia/audio/sndblst.old/dma.c diff --git a/reactos/drivers/multimedia/audio/sndblst.old/irq.c b/drivers/multimedia/audio/sndblst.old/irq.c similarity index 100% rename from reactos/drivers/multimedia/audio/sndblst.old/irq.c rename to drivers/multimedia/audio/sndblst.old/irq.c diff --git a/reactos/drivers/multimedia/audio/sndblst.old/portio.c b/drivers/multimedia/audio/sndblst.old/portio.c similarity index 100% rename from reactos/drivers/multimedia/audio/sndblst.old/portio.c rename to drivers/multimedia/audio/sndblst.old/portio.c diff --git a/reactos/drivers/multimedia/audio/sndblst.old/sbdebug.h b/drivers/multimedia/audio/sndblst.old/sbdebug.h similarity index 100% rename from reactos/drivers/multimedia/audio/sndblst.old/sbdebug.h rename to drivers/multimedia/audio/sndblst.old/sbdebug.h diff --git a/reactos/drivers/multimedia/audio/sndblst.old/settings.c b/drivers/multimedia/audio/sndblst.old/settings.c similarity index 100% rename from reactos/drivers/multimedia/audio/sndblst.old/settings.c rename to drivers/multimedia/audio/sndblst.old/settings.c diff --git a/reactos/drivers/multimedia/audio/sndblst.old/sndblst.c b/drivers/multimedia/audio/sndblst.old/sndblst.c similarity index 100% rename from reactos/drivers/multimedia/audio/sndblst.old/sndblst.c rename to drivers/multimedia/audio/sndblst.old/sndblst.c diff --git a/reactos/drivers/multimedia/audio/sndblst.old/sndblst.h b/drivers/multimedia/audio/sndblst.old/sndblst.h similarity index 100% rename from reactos/drivers/multimedia/audio/sndblst.old/sndblst.h rename to drivers/multimedia/audio/sndblst.old/sndblst.h diff --git a/reactos/drivers/multimedia/audio/sndblst.old/sndblst.rbuild b/drivers/multimedia/audio/sndblst.old/sndblst.rbuild similarity index 100% rename from reactos/drivers/multimedia/audio/sndblst.old/sndblst.rbuild rename to drivers/multimedia/audio/sndblst.old/sndblst.rbuild diff --git a/reactos/drivers/multimedia/audio/sndblst.old/sndblst.rc b/drivers/multimedia/audio/sndblst.old/sndblst.rc similarity index 100% rename from reactos/drivers/multimedia/audio/sndblst.old/sndblst.rc rename to drivers/multimedia/audio/sndblst.old/sndblst.rc diff --git a/reactos/drivers/multimedia/audio/sndblst.old/test.c b/drivers/multimedia/audio/sndblst.old/test.c similarity index 100% rename from reactos/drivers/multimedia/audio/sndblst.old/test.c rename to drivers/multimedia/audio/sndblst.old/test.c diff --git a/reactos/drivers/multimedia/audio/sndblst.old/test/sb.c b/drivers/multimedia/audio/sndblst.old/test/sb.c similarity index 100% rename from reactos/drivers/multimedia/audio/sndblst.old/test/sb.c rename to drivers/multimedia/audio/sndblst.old/test/sb.c diff --git a/reactos/drivers/multimedia/audio/sndblst_sys/sndblst.c b/drivers/multimedia/audio/sndblst_sys/sndblst.c similarity index 100% rename from reactos/drivers/multimedia/audio/sndblst_sys/sndblst.c rename to drivers/multimedia/audio/sndblst_sys/sndblst.c diff --git a/reactos/drivers/multimedia/audio/sndblst_sys/sndblst.rbuild b/drivers/multimedia/audio/sndblst_sys/sndblst.rbuild similarity index 100% rename from reactos/drivers/multimedia/audio/sndblst_sys/sndblst.rbuild rename to drivers/multimedia/audio/sndblst_sys/sndblst.rbuild diff --git a/reactos/drivers/multimedia/audio/sndblst_sys/sndblst.rc b/drivers/multimedia/audio/sndblst_sys/sndblst.rc similarity index 100% rename from reactos/drivers/multimedia/audio/sndblst_sys/sndblst.rc rename to drivers/multimedia/audio/sndblst_sys/sndblst.rc diff --git a/reactos/drivers/multimedia/audio/sound/dsp.c b/drivers/multimedia/audio/sound/dsp.c similarity index 100% rename from reactos/drivers/multimedia/audio/sound/dsp.c rename to drivers/multimedia/audio/sound/dsp.c diff --git a/reactos/drivers/multimedia/audio/sound/dsp.h b/drivers/multimedia/audio/sound/dsp.h similarity index 100% rename from reactos/drivers/multimedia/audio/sound/dsp.h rename to drivers/multimedia/audio/sound/dsp.h diff --git a/reactos/drivers/multimedia/audio/sound/in.h b/drivers/multimedia/audio/sound/in.h similarity index 100% rename from reactos/drivers/multimedia/audio/sound/in.h rename to drivers/multimedia/audio/sound/in.h diff --git a/reactos/drivers/multimedia/audio/sound/include/devices.h b/drivers/multimedia/audio/sound/include/devices.h similarity index 100% rename from reactos/drivers/multimedia/audio/sound/include/devices.h rename to drivers/multimedia/audio/sound/include/devices.h diff --git a/reactos/drivers/multimedia/audio/sound/mixer.c b/drivers/multimedia/audio/sound/mixer.c similarity index 100% rename from reactos/drivers/multimedia/audio/sound/mixer.c rename to drivers/multimedia/audio/sound/mixer.c diff --git a/reactos/drivers/multimedia/audio/sound/mixer.h b/drivers/multimedia/audio/sound/mixer.h similarity index 100% rename from reactos/drivers/multimedia/audio/sound/mixer.h rename to drivers/multimedia/audio/sound/mixer.h diff --git a/reactos/drivers/multimedia/audio/sound/sb16.c b/drivers/multimedia/audio/sound/sb16.c similarity index 100% rename from reactos/drivers/multimedia/audio/sound/sb16.c rename to drivers/multimedia/audio/sound/sb16.c diff --git a/reactos/drivers/multimedia/audio/sound/sb16.h b/drivers/multimedia/audio/sound/sb16.h similarity index 100% rename from reactos/drivers/multimedia/audio/sound/sb16.h rename to drivers/multimedia/audio/sound/sb16.h diff --git a/reactos/drivers/multimedia/audio/sound/sb16.rc b/drivers/multimedia/audio/sound/sb16.rc similarity index 100% rename from reactos/drivers/multimedia/audio/sound/sb16.rc rename to drivers/multimedia/audio/sound/sb16.rc diff --git a/reactos/drivers/multimedia/audio/sound/sb_waveout.c b/drivers/multimedia/audio/sound/sb_waveout.c similarity index 100% rename from reactos/drivers/multimedia/audio/sound/sb_waveout.c rename to drivers/multimedia/audio/sound/sb_waveout.c diff --git a/reactos/drivers/multimedia/audio/sound/sound.c b/drivers/multimedia/audio/sound/sound.c similarity index 100% rename from reactos/drivers/multimedia/audio/sound/sound.c rename to drivers/multimedia/audio/sound/sound.c diff --git a/reactos/drivers/multimedia/audio/sound/sound.rbuild b/drivers/multimedia/audio/sound/sound.rbuild similarity index 100% rename from reactos/drivers/multimedia/audio/sound/sound.rbuild rename to drivers/multimedia/audio/sound/sound.rbuild diff --git a/reactos/drivers/multimedia/audio/sound/wave.c b/drivers/multimedia/audio/sound/wave.c similarity index 100% rename from reactos/drivers/multimedia/audio/sound/wave.c rename to drivers/multimedia/audio/sound/wave.c diff --git a/reactos/drivers/multimedia/audio/sound/wave.h b/drivers/multimedia/audio/sound/wave.h similarity index 100% rename from reactos/drivers/multimedia/audio/sound/wave.h rename to drivers/multimedia/audio/sound/wave.h diff --git a/reactos/drivers/multimedia/bdasup/bdasup.c b/drivers/multimedia/bdasup/bdasup.c similarity index 100% rename from reactos/drivers/multimedia/bdasup/bdasup.c rename to drivers/multimedia/bdasup/bdasup.c diff --git a/reactos/drivers/multimedia/bdasup/bdasup.rbuild b/drivers/multimedia/bdasup/bdasup.rbuild similarity index 100% rename from reactos/drivers/multimedia/bdasup/bdasup.rbuild rename to drivers/multimedia/bdasup/bdasup.rbuild diff --git a/reactos/drivers/multimedia/bdasup/bdasup.spec b/drivers/multimedia/bdasup/bdasup.spec similarity index 100% rename from reactos/drivers/multimedia/bdasup/bdasup.spec rename to drivers/multimedia/bdasup/bdasup.spec diff --git a/reactos/drivers/multimedia/bdasup/precomp.h b/drivers/multimedia/bdasup/precomp.h similarity index 100% rename from reactos/drivers/multimedia/bdasup/precomp.h rename to drivers/multimedia/bdasup/precomp.h diff --git a/reactos/drivers/multimedia/directory.rbuild b/drivers/multimedia/directory.rbuild similarity index 100% rename from reactos/drivers/multimedia/directory.rbuild rename to drivers/multimedia/directory.rbuild diff --git a/reactos/drivers/network/CMakeLists.txt b/drivers/network/CMakeLists.txt similarity index 100% rename from reactos/drivers/network/CMakeLists.txt rename to drivers/network/CMakeLists.txt diff --git a/reactos/drivers/network/acd/acd/main.c b/drivers/network/acd/acd/main.c similarity index 100% rename from reactos/drivers/network/acd/acd/main.c rename to drivers/network/acd/acd/main.c diff --git a/reactos/drivers/network/acd/include/acdapi.h b/drivers/network/acd/include/acdapi.h similarity index 100% rename from reactos/drivers/network/acd/include/acdapi.h rename to drivers/network/acd/include/acdapi.h diff --git a/reactos/drivers/network/acd/rasacd.rbuild b/drivers/network/acd/rasacd.rbuild similarity index 100% rename from reactos/drivers/network/acd/rasacd.rbuild rename to drivers/network/acd/rasacd.rbuild diff --git a/reactos/drivers/network/acd/rasacd.rc b/drivers/network/acd/rasacd.rc similarity index 100% rename from reactos/drivers/network/acd/rasacd.rc rename to drivers/network/acd/rasacd.rc diff --git a/reactos/drivers/network/afd/CMakeLists.txt b/drivers/network/afd/CMakeLists.txt similarity index 100% rename from reactos/drivers/network/afd/CMakeLists.txt rename to drivers/network/afd/CMakeLists.txt diff --git a/reactos/drivers/network/afd/afd.rbuild b/drivers/network/afd/afd.rbuild similarity index 100% rename from reactos/drivers/network/afd/afd.rbuild rename to drivers/network/afd/afd.rbuild diff --git a/reactos/drivers/network/afd/afd.rc b/drivers/network/afd/afd.rc similarity index 100% rename from reactos/drivers/network/afd/afd.rc rename to drivers/network/afd/afd.rc diff --git a/reactos/drivers/network/afd/afd/bind.c b/drivers/network/afd/afd/bind.c similarity index 100% rename from reactos/drivers/network/afd/afd/bind.c rename to drivers/network/afd/afd/bind.c diff --git a/reactos/drivers/network/afd/afd/connect.c b/drivers/network/afd/afd/connect.c similarity index 100% rename from reactos/drivers/network/afd/afd/connect.c rename to drivers/network/afd/afd/connect.c diff --git a/reactos/drivers/network/afd/afd/context.c b/drivers/network/afd/afd/context.c similarity index 100% rename from reactos/drivers/network/afd/afd/context.c rename to drivers/network/afd/afd/context.c diff --git a/reactos/drivers/network/afd/afd/event.c b/drivers/network/afd/afd/event.c similarity index 100% rename from reactos/drivers/network/afd/afd/event.c rename to drivers/network/afd/afd/event.c diff --git a/reactos/drivers/network/afd/afd/info.c b/drivers/network/afd/afd/info.c similarity index 100% rename from reactos/drivers/network/afd/afd/info.c rename to drivers/network/afd/afd/info.c diff --git a/reactos/drivers/network/afd/afd/listen.c b/drivers/network/afd/afd/listen.c similarity index 100% rename from reactos/drivers/network/afd/afd/listen.c rename to drivers/network/afd/afd/listen.c diff --git a/reactos/drivers/network/afd/afd/lock.c b/drivers/network/afd/afd/lock.c similarity index 100% rename from reactos/drivers/network/afd/afd/lock.c rename to drivers/network/afd/afd/lock.c diff --git a/reactos/drivers/network/afd/afd/main.c b/drivers/network/afd/afd/main.c similarity index 100% rename from reactos/drivers/network/afd/afd/main.c rename to drivers/network/afd/afd/main.c diff --git a/reactos/drivers/network/afd/afd/read.c b/drivers/network/afd/afd/read.c similarity index 100% rename from reactos/drivers/network/afd/afd/read.c rename to drivers/network/afd/afd/read.c diff --git a/reactos/drivers/network/afd/afd/select.c b/drivers/network/afd/afd/select.c similarity index 100% rename from reactos/drivers/network/afd/afd/select.c rename to drivers/network/afd/afd/select.c diff --git a/reactos/drivers/network/afd/afd/tdi.c b/drivers/network/afd/afd/tdi.c similarity index 100% rename from reactos/drivers/network/afd/afd/tdi.c rename to drivers/network/afd/afd/tdi.c diff --git a/reactos/drivers/network/afd/afd/tdiconn.c b/drivers/network/afd/afd/tdiconn.c similarity index 100% rename from reactos/drivers/network/afd/afd/tdiconn.c rename to drivers/network/afd/afd/tdiconn.c diff --git a/reactos/drivers/network/afd/afd/write.c b/drivers/network/afd/afd/write.c similarity index 100% rename from reactos/drivers/network/afd/afd/write.c rename to drivers/network/afd/afd/write.c diff --git a/reactos/drivers/network/afd/doc/simple_select.txt b/drivers/network/afd/doc/simple_select.txt similarity index 100% rename from reactos/drivers/network/afd/doc/simple_select.txt rename to drivers/network/afd/doc/simple_select.txt diff --git a/reactos/drivers/network/afd/include/afd.h b/drivers/network/afd/include/afd.h similarity index 100% rename from reactos/drivers/network/afd/include/afd.h rename to drivers/network/afd/include/afd.h diff --git a/reactos/drivers/network/afd/include/debug.h b/drivers/network/afd/include/debug.h similarity index 100% rename from reactos/drivers/network/afd/include/debug.h rename to drivers/network/afd/include/debug.h diff --git a/reactos/drivers/network/afd/include/tdi_proto.h b/drivers/network/afd/include/tdi_proto.h similarity index 100% rename from reactos/drivers/network/afd/include/tdi_proto.h rename to drivers/network/afd/include/tdi_proto.h diff --git a/reactos/drivers/network/afd/include/tdiconn.h b/drivers/network/afd/include/tdiconn.h similarity index 100% rename from reactos/drivers/network/afd/include/tdiconn.h rename to drivers/network/afd/include/tdiconn.h diff --git a/reactos/drivers/network/dd/CMakeLists.txt b/drivers/network/dd/CMakeLists.txt similarity index 100% rename from reactos/drivers/network/dd/CMakeLists.txt rename to drivers/network/dd/CMakeLists.txt diff --git a/reactos/drivers/network/dd/directory.rbuild b/drivers/network/dd/directory.rbuild similarity index 100% rename from reactos/drivers/network/dd/directory.rbuild rename to drivers/network/dd/directory.rbuild diff --git a/reactos/drivers/network/dd/ne2000/CMakeLists.txt b/drivers/network/dd/ne2000/CMakeLists.txt similarity index 100% rename from reactos/drivers/network/dd/ne2000/CMakeLists.txt rename to drivers/network/dd/ne2000/CMakeLists.txt diff --git a/reactos/drivers/network/dd/ne2000/include/8390.h b/drivers/network/dd/ne2000/include/8390.h similarity index 100% rename from reactos/drivers/network/dd/ne2000/include/8390.h rename to drivers/network/dd/ne2000/include/8390.h diff --git a/reactos/drivers/network/dd/ne2000/include/debug.h b/drivers/network/dd/ne2000/include/debug.h similarity index 100% rename from reactos/drivers/network/dd/ne2000/include/debug.h rename to drivers/network/dd/ne2000/include/debug.h diff --git a/reactos/drivers/network/dd/ne2000/include/ne2000.h b/drivers/network/dd/ne2000/include/ne2000.h similarity index 100% rename from reactos/drivers/network/dd/ne2000/include/ne2000.h rename to drivers/network/dd/ne2000/include/ne2000.h diff --git a/reactos/drivers/network/dd/ne2000/ne2000.rbuild b/drivers/network/dd/ne2000/ne2000.rbuild similarity index 100% rename from reactos/drivers/network/dd/ne2000/ne2000.rbuild rename to drivers/network/dd/ne2000/ne2000.rbuild diff --git a/reactos/drivers/network/dd/ne2000/ne2000.rc b/drivers/network/dd/ne2000/ne2000.rc similarity index 100% rename from reactos/drivers/network/dd/ne2000/ne2000.rc rename to drivers/network/dd/ne2000/ne2000.rc diff --git a/reactos/drivers/network/dd/ne2000/ne2000/8390.c b/drivers/network/dd/ne2000/ne2000/8390.c similarity index 100% rename from reactos/drivers/network/dd/ne2000/ne2000/8390.c rename to drivers/network/dd/ne2000/ne2000/8390.c diff --git a/reactos/drivers/network/dd/ne2000/ne2000/main.c b/drivers/network/dd/ne2000/ne2000/main.c similarity index 100% rename from reactos/drivers/network/dd/ne2000/ne2000/main.c rename to drivers/network/dd/ne2000/ne2000/main.c diff --git a/reactos/drivers/network/dd/pcnet/CMakeLists.txt b/drivers/network/dd/pcnet/CMakeLists.txt similarity index 100% rename from reactos/drivers/network/dd/pcnet/CMakeLists.txt rename to drivers/network/dd/pcnet/CMakeLists.txt diff --git a/reactos/drivers/network/dd/pcnet/pci.h b/drivers/network/dd/pcnet/pci.h similarity index 100% rename from reactos/drivers/network/dd/pcnet/pci.h rename to drivers/network/dd/pcnet/pci.h diff --git a/reactos/drivers/network/dd/pcnet/pcnet.c b/drivers/network/dd/pcnet/pcnet.c similarity index 100% rename from reactos/drivers/network/dd/pcnet/pcnet.c rename to drivers/network/dd/pcnet/pcnet.c diff --git a/reactos/drivers/network/dd/pcnet/pcnet.h b/drivers/network/dd/pcnet/pcnet.h similarity index 100% rename from reactos/drivers/network/dd/pcnet/pcnet.h rename to drivers/network/dd/pcnet/pcnet.h diff --git a/reactos/drivers/network/dd/pcnet/pcnet.rbuild b/drivers/network/dd/pcnet/pcnet.rbuild similarity index 100% rename from reactos/drivers/network/dd/pcnet/pcnet.rbuild rename to drivers/network/dd/pcnet/pcnet.rbuild diff --git a/reactos/drivers/network/dd/pcnet/pcnet.rc b/drivers/network/dd/pcnet/pcnet.rc similarity index 100% rename from reactos/drivers/network/dd/pcnet/pcnet.rc rename to drivers/network/dd/pcnet/pcnet.rc diff --git a/reactos/drivers/network/dd/pcnet/pcnethw.h b/drivers/network/dd/pcnet/pcnethw.h similarity index 100% rename from reactos/drivers/network/dd/pcnet/pcnethw.h rename to drivers/network/dd/pcnet/pcnethw.h diff --git a/reactos/drivers/network/dd/pcnet/requests.c b/drivers/network/dd/pcnet/requests.c similarity index 100% rename from reactos/drivers/network/dd/pcnet/requests.c rename to drivers/network/dd/pcnet/requests.c diff --git a/reactos/drivers/network/directory.rbuild b/drivers/network/directory.rbuild similarity index 100% rename from reactos/drivers/network/directory.rbuild rename to drivers/network/directory.rbuild diff --git a/reactos/drivers/network/lan/include/debug.h b/drivers/network/lan/include/debug.h similarity index 100% rename from reactos/drivers/network/lan/include/debug.h rename to drivers/network/lan/include/debug.h diff --git a/reactos/drivers/network/lan/include/lan.h b/drivers/network/lan/include/lan.h similarity index 100% rename from reactos/drivers/network/lan/include/lan.h rename to drivers/network/lan/include/lan.h diff --git a/reactos/drivers/network/lan/include/memtrack.h b/drivers/network/lan/include/memtrack.h similarity index 100% rename from reactos/drivers/network/lan/include/memtrack.h rename to drivers/network/lan/include/memtrack.h diff --git a/reactos/drivers/network/lan/include/net_lan.h b/drivers/network/lan/include/net_lan.h similarity index 100% rename from reactos/drivers/network/lan/include/net_lan.h rename to drivers/network/lan/include/net_lan.h diff --git a/reactos/drivers/network/lan/include/net_wh.h b/drivers/network/lan/include/net_wh.h similarity index 100% rename from reactos/drivers/network/lan/include/net_wh.h rename to drivers/network/lan/include/net_wh.h diff --git a/reactos/drivers/network/lan/include/precomp.h b/drivers/network/lan/include/precomp.h similarity index 100% rename from reactos/drivers/network/lan/include/precomp.h rename to drivers/network/lan/include/precomp.h diff --git a/reactos/drivers/network/lan/lan.rc b/drivers/network/lan/lan.rc similarity index 100% rename from reactos/drivers/network/lan/lan.rc rename to drivers/network/lan/lan.rc diff --git a/reactos/drivers/network/lan/lan/lan.c b/drivers/network/lan/lan/lan.c similarity index 100% rename from reactos/drivers/network/lan/lan/lan.c rename to drivers/network/lan/lan/lan.c diff --git a/reactos/drivers/network/lan/lan/routines.c b/drivers/network/lan/lan/routines.c similarity index 100% rename from reactos/drivers/network/lan/lan/routines.c rename to drivers/network/lan/lan/routines.c diff --git a/reactos/drivers/network/ndis/CMakeLists.txt b/drivers/network/ndis/CMakeLists.txt similarity index 100% rename from reactos/drivers/network/ndis/CMakeLists.txt rename to drivers/network/ndis/CMakeLists.txt diff --git a/reactos/drivers/network/ndis/DIRS b/drivers/network/ndis/DIRS similarity index 100% rename from reactos/drivers/network/ndis/DIRS rename to drivers/network/ndis/DIRS diff --git a/reactos/drivers/network/ndis/include/buffer.h b/drivers/network/ndis/include/buffer.h similarity index 100% rename from reactos/drivers/network/ndis/include/buffer.h rename to drivers/network/ndis/include/buffer.h diff --git a/reactos/drivers/network/ndis/include/debug.h b/drivers/network/ndis/include/debug.h similarity index 100% rename from reactos/drivers/network/ndis/include/debug.h rename to drivers/network/ndis/include/debug.h diff --git a/reactos/drivers/network/ndis/include/efilter.h b/drivers/network/ndis/include/efilter.h similarity index 100% rename from reactos/drivers/network/ndis/include/efilter.h rename to drivers/network/ndis/include/efilter.h diff --git a/reactos/drivers/network/ndis/include/miniport.h b/drivers/network/ndis/include/miniport.h similarity index 100% rename from reactos/drivers/network/ndis/include/miniport.h rename to drivers/network/ndis/include/miniport.h diff --git a/reactos/drivers/network/ndis/include/ndissys.h b/drivers/network/ndis/include/ndissys.h similarity index 100% rename from reactos/drivers/network/ndis/include/ndissys.h rename to drivers/network/ndis/include/ndissys.h diff --git a/reactos/drivers/network/ndis/include/protocol.h b/drivers/network/ndis/include/protocol.h similarity index 100% rename from reactos/drivers/network/ndis/include/protocol.h rename to drivers/network/ndis/include/protocol.h diff --git a/reactos/drivers/network/ndis/ndis.rbuild b/drivers/network/ndis/ndis.rbuild similarity index 100% rename from reactos/drivers/network/ndis/ndis.rbuild rename to drivers/network/ndis/ndis.rbuild diff --git a/reactos/drivers/network/ndis/ndis.rc b/drivers/network/ndis/ndis.rc similarity index 100% rename from reactos/drivers/network/ndis/ndis.rc rename to drivers/network/ndis/ndis.rc diff --git a/reactos/drivers/network/ndis/ndis.spec b/drivers/network/ndis/ndis.spec similarity index 100% rename from reactos/drivers/network/ndis/ndis.spec rename to drivers/network/ndis/ndis.spec diff --git a/reactos/drivers/network/ndis/ndis/30stubs.c b/drivers/network/ndis/ndis/30stubs.c similarity index 100% rename from reactos/drivers/network/ndis/ndis/30stubs.c rename to drivers/network/ndis/ndis/30stubs.c diff --git a/reactos/drivers/network/ndis/ndis/40stubs.c b/drivers/network/ndis/ndis/40stubs.c similarity index 100% rename from reactos/drivers/network/ndis/ndis/40stubs.c rename to drivers/network/ndis/ndis/40stubs.c diff --git a/reactos/drivers/network/ndis/ndis/50stubs.c b/drivers/network/ndis/ndis/50stubs.c similarity index 100% rename from reactos/drivers/network/ndis/ndis/50stubs.c rename to drivers/network/ndis/ndis/50stubs.c diff --git a/reactos/drivers/network/ndis/ndis/SOURCES b/drivers/network/ndis/ndis/SOURCES similarity index 100% rename from reactos/drivers/network/ndis/ndis/SOURCES rename to drivers/network/ndis/ndis/SOURCES diff --git a/reactos/drivers/network/ndis/ndis/buffer.c b/drivers/network/ndis/ndis/buffer.c similarity index 100% rename from reactos/drivers/network/ndis/ndis/buffer.c rename to drivers/network/ndis/ndis/buffer.c diff --git a/reactos/drivers/network/ndis/ndis/cl.c b/drivers/network/ndis/ndis/cl.c similarity index 100% rename from reactos/drivers/network/ndis/ndis/cl.c rename to drivers/network/ndis/ndis/cl.c diff --git a/reactos/drivers/network/ndis/ndis/cm.c b/drivers/network/ndis/ndis/cm.c similarity index 100% rename from reactos/drivers/network/ndis/ndis/cm.c rename to drivers/network/ndis/ndis/cm.c diff --git a/reactos/drivers/network/ndis/ndis/co.c b/drivers/network/ndis/ndis/co.c similarity index 100% rename from reactos/drivers/network/ndis/ndis/co.c rename to drivers/network/ndis/ndis/co.c diff --git a/reactos/drivers/network/ndis/ndis/config.c b/drivers/network/ndis/ndis/config.c similarity index 100% rename from reactos/drivers/network/ndis/ndis/config.c rename to drivers/network/ndis/ndis/config.c diff --git a/reactos/drivers/network/ndis/ndis/control.c b/drivers/network/ndis/ndis/control.c similarity index 100% rename from reactos/drivers/network/ndis/ndis/control.c rename to drivers/network/ndis/ndis/control.c diff --git a/reactos/drivers/network/ndis/ndis/efilter.c b/drivers/network/ndis/ndis/efilter.c similarity index 100% rename from reactos/drivers/network/ndis/ndis/efilter.c rename to drivers/network/ndis/ndis/efilter.c diff --git a/reactos/drivers/network/ndis/ndis/hardware.c b/drivers/network/ndis/ndis/hardware.c similarity index 100% rename from reactos/drivers/network/ndis/ndis/hardware.c rename to drivers/network/ndis/ndis/hardware.c diff --git a/reactos/drivers/network/ndis/ndis/io.c b/drivers/network/ndis/ndis/io.c similarity index 100% rename from reactos/drivers/network/ndis/ndis/io.c rename to drivers/network/ndis/ndis/io.c diff --git a/reactos/drivers/network/ndis/ndis/main.c b/drivers/network/ndis/ndis/main.c similarity index 100% rename from reactos/drivers/network/ndis/ndis/main.c rename to drivers/network/ndis/ndis/main.c diff --git a/reactos/drivers/network/ndis/ndis/memory.c b/drivers/network/ndis/ndis/memory.c similarity index 100% rename from reactos/drivers/network/ndis/ndis/memory.c rename to drivers/network/ndis/ndis/memory.c diff --git a/reactos/drivers/network/ndis/ndis/miniport.c b/drivers/network/ndis/ndis/miniport.c similarity index 100% rename from reactos/drivers/network/ndis/ndis/miniport.c rename to drivers/network/ndis/ndis/miniport.c diff --git a/reactos/drivers/network/ndis/ndis/misc.c b/drivers/network/ndis/ndis/misc.c similarity index 100% rename from reactos/drivers/network/ndis/ndis/misc.c rename to drivers/network/ndis/ndis/misc.c diff --git a/reactos/drivers/network/ndis/ndis/object.c b/drivers/network/ndis/ndis/object.c similarity index 100% rename from reactos/drivers/network/ndis/ndis/object.c rename to drivers/network/ndis/ndis/object.c diff --git a/reactos/drivers/network/ndis/ndis/protocol.c b/drivers/network/ndis/ndis/protocol.c similarity index 100% rename from reactos/drivers/network/ndis/ndis/protocol.c rename to drivers/network/ndis/ndis/protocol.c diff --git a/reactos/drivers/network/ndis/ndis/string.c b/drivers/network/ndis/ndis/string.c similarity index 100% rename from reactos/drivers/network/ndis/ndis/string.c rename to drivers/network/ndis/ndis/string.c diff --git a/reactos/drivers/network/ndis/ndis/time.c b/drivers/network/ndis/ndis/time.c similarity index 100% rename from reactos/drivers/network/ndis/ndis/time.c rename to drivers/network/ndis/ndis/time.c diff --git a/reactos/drivers/network/ndis/ndis/workitem.c b/drivers/network/ndis/ndis/workitem.c similarity index 100% rename from reactos/drivers/network/ndis/ndis/workitem.c rename to drivers/network/ndis/ndis/workitem.c diff --git a/reactos/drivers/network/ndis/readme.txt b/drivers/network/ndis/readme.txt similarity index 100% rename from reactos/drivers/network/ndis/readme.txt rename to drivers/network/ndis/readme.txt diff --git a/reactos/drivers/network/tcpip/CMakeLists.txt b/drivers/network/tcpip/CMakeLists.txt similarity index 100% rename from reactos/drivers/network/tcpip/CMakeLists.txt rename to drivers/network/tcpip/CMakeLists.txt diff --git a/reactos/drivers/network/tcpip/DIRS b/drivers/network/tcpip/DIRS similarity index 100% rename from reactos/drivers/network/tcpip/DIRS rename to drivers/network/tcpip/DIRS diff --git a/reactos/drivers/network/tcpip/datalink/SOURCES b/drivers/network/tcpip/datalink/SOURCES similarity index 100% rename from reactos/drivers/network/tcpip/datalink/SOURCES rename to drivers/network/tcpip/datalink/SOURCES diff --git a/reactos/drivers/network/tcpip/datalink/lan.c b/drivers/network/tcpip/datalink/lan.c similarity index 100% rename from reactos/drivers/network/tcpip/datalink/lan.c rename to drivers/network/tcpip/datalink/lan.c diff --git a/reactos/drivers/network/tcpip/include/address.h b/drivers/network/tcpip/include/address.h similarity index 100% rename from reactos/drivers/network/tcpip/include/address.h rename to drivers/network/tcpip/include/address.h diff --git a/reactos/drivers/network/tcpip/include/arp.h b/drivers/network/tcpip/include/arp.h similarity index 100% rename from reactos/drivers/network/tcpip/include/arp.h rename to drivers/network/tcpip/include/arp.h diff --git a/reactos/drivers/network/tcpip/include/checksum.h b/drivers/network/tcpip/include/checksum.h similarity index 100% rename from reactos/drivers/network/tcpip/include/checksum.h rename to drivers/network/tcpip/include/checksum.h diff --git a/reactos/drivers/network/tcpip/include/datagram.h b/drivers/network/tcpip/include/datagram.h similarity index 100% rename from reactos/drivers/network/tcpip/include/datagram.h rename to drivers/network/tcpip/include/datagram.h diff --git a/reactos/drivers/network/tcpip/include/debug.h b/drivers/network/tcpip/include/debug.h similarity index 100% rename from reactos/drivers/network/tcpip/include/debug.h rename to drivers/network/tcpip/include/debug.h diff --git a/reactos/drivers/network/tcpip/include/dispatch.h b/drivers/network/tcpip/include/dispatch.h similarity index 100% rename from reactos/drivers/network/tcpip/include/dispatch.h rename to drivers/network/tcpip/include/dispatch.h diff --git a/reactos/drivers/network/tcpip/include/fileobjs.h b/drivers/network/tcpip/include/fileobjs.h similarity index 100% rename from reactos/drivers/network/tcpip/include/fileobjs.h rename to drivers/network/tcpip/include/fileobjs.h diff --git a/reactos/drivers/network/tcpip/include/icmp.h b/drivers/network/tcpip/include/icmp.h similarity index 100% rename from reactos/drivers/network/tcpip/include/icmp.h rename to drivers/network/tcpip/include/icmp.h diff --git a/reactos/drivers/network/tcpip/include/info.h b/drivers/network/tcpip/include/info.h similarity index 100% rename from reactos/drivers/network/tcpip/include/info.h rename to drivers/network/tcpip/include/info.h diff --git a/reactos/drivers/network/tcpip/include/interface.h b/drivers/network/tcpip/include/interface.h similarity index 100% rename from reactos/drivers/network/tcpip/include/interface.h rename to drivers/network/tcpip/include/interface.h diff --git a/reactos/drivers/network/tcpip/include/ip.h b/drivers/network/tcpip/include/ip.h similarity index 100% rename from reactos/drivers/network/tcpip/include/ip.h rename to drivers/network/tcpip/include/ip.h diff --git a/reactos/drivers/network/tcpip/include/lan.h b/drivers/network/tcpip/include/lan.h similarity index 100% rename from reactos/drivers/network/tcpip/include/lan.h rename to drivers/network/tcpip/include/lan.h diff --git a/reactos/drivers/network/tcpip/include/linux.h b/drivers/network/tcpip/include/linux.h similarity index 100% rename from reactos/drivers/network/tcpip/include/linux.h rename to drivers/network/tcpip/include/linux.h diff --git a/reactos/drivers/network/tcpip/include/lock.h b/drivers/network/tcpip/include/lock.h similarity index 100% rename from reactos/drivers/network/tcpip/include/lock.h rename to drivers/network/tcpip/include/lock.h diff --git a/reactos/drivers/network/tcpip/include/loopback.h b/drivers/network/tcpip/include/loopback.h similarity index 100% rename from reactos/drivers/network/tcpip/include/loopback.h rename to drivers/network/tcpip/include/loopback.h diff --git a/reactos/drivers/network/tcpip/include/neighbor.h b/drivers/network/tcpip/include/neighbor.h similarity index 100% rename from reactos/drivers/network/tcpip/include/neighbor.h rename to drivers/network/tcpip/include/neighbor.h diff --git a/reactos/drivers/network/tcpip/include/pool.h b/drivers/network/tcpip/include/pool.h similarity index 100% rename from reactos/drivers/network/tcpip/include/pool.h rename to drivers/network/tcpip/include/pool.h diff --git a/reactos/drivers/network/tcpip/include/ports.h b/drivers/network/tcpip/include/ports.h similarity index 100% rename from reactos/drivers/network/tcpip/include/ports.h rename to drivers/network/tcpip/include/ports.h diff --git a/reactos/drivers/network/tcpip/include/precomp.h b/drivers/network/tcpip/include/precomp.h similarity index 100% rename from reactos/drivers/network/tcpip/include/precomp.h rename to drivers/network/tcpip/include/precomp.h diff --git a/reactos/drivers/network/tcpip/include/rawip.h b/drivers/network/tcpip/include/rawip.h similarity index 100% rename from reactos/drivers/network/tcpip/include/rawip.h rename to drivers/network/tcpip/include/rawip.h diff --git a/reactos/drivers/network/tcpip/include/receive.h b/drivers/network/tcpip/include/receive.h similarity index 100% rename from reactos/drivers/network/tcpip/include/receive.h rename to drivers/network/tcpip/include/receive.h diff --git a/reactos/drivers/network/tcpip/include/route.h b/drivers/network/tcpip/include/route.h similarity index 100% rename from reactos/drivers/network/tcpip/include/route.h rename to drivers/network/tcpip/include/route.h diff --git a/reactos/drivers/network/tcpip/include/router.h b/drivers/network/tcpip/include/router.h similarity index 100% rename from reactos/drivers/network/tcpip/include/router.h rename to drivers/network/tcpip/include/router.h diff --git a/reactos/drivers/network/tcpip/include/routines.h b/drivers/network/tcpip/include/routines.h similarity index 100% rename from reactos/drivers/network/tcpip/include/routines.h rename to drivers/network/tcpip/include/routines.h diff --git a/reactos/drivers/network/tcpip/include/tags.h b/drivers/network/tcpip/include/tags.h similarity index 100% rename from reactos/drivers/network/tcpip/include/tags.h rename to drivers/network/tcpip/include/tags.h diff --git a/reactos/drivers/network/tcpip/include/tcp.h b/drivers/network/tcpip/include/tcp.h similarity index 100% rename from reactos/drivers/network/tcpip/include/tcp.h rename to drivers/network/tcpip/include/tcp.h diff --git a/reactos/drivers/network/tcpip/include/tcpcore.h b/drivers/network/tcpip/include/tcpcore.h similarity index 100% rename from reactos/drivers/network/tcpip/include/tcpcore.h rename to drivers/network/tcpip/include/tcpcore.h diff --git a/reactos/drivers/network/tcpip/include/tcpdef.h b/drivers/network/tcpip/include/tcpdef.h similarity index 100% rename from reactos/drivers/network/tcpip/include/tcpdef.h rename to drivers/network/tcpip/include/tcpdef.h diff --git a/reactos/drivers/network/tcpip/include/tcpip.h b/drivers/network/tcpip/include/tcpip.h similarity index 100% rename from reactos/drivers/network/tcpip/include/tcpip.h rename to drivers/network/tcpip/include/tcpip.h diff --git a/reactos/drivers/network/tcpip/include/ticonsts.h b/drivers/network/tcpip/include/ticonsts.h similarity index 100% rename from reactos/drivers/network/tcpip/include/ticonsts.h rename to drivers/network/tcpip/include/ticonsts.h diff --git a/reactos/drivers/network/tcpip/include/tilists.h b/drivers/network/tcpip/include/tilists.h similarity index 100% rename from reactos/drivers/network/tcpip/include/tilists.h rename to drivers/network/tcpip/include/tilists.h diff --git a/reactos/drivers/network/tcpip/include/titypes.h b/drivers/network/tcpip/include/titypes.h similarity index 100% rename from reactos/drivers/network/tcpip/include/titypes.h rename to drivers/network/tcpip/include/titypes.h diff --git a/reactos/drivers/network/tcpip/include/transmit.h b/drivers/network/tcpip/include/transmit.h similarity index 100% rename from reactos/drivers/network/tcpip/include/transmit.h rename to drivers/network/tcpip/include/transmit.h diff --git a/reactos/drivers/network/tcpip/include/udp.h b/drivers/network/tcpip/include/udp.h similarity index 100% rename from reactos/drivers/network/tcpip/include/udp.h rename to drivers/network/tcpip/include/udp.h diff --git a/reactos/drivers/network/tcpip/include/wait.h b/drivers/network/tcpip/include/wait.h similarity index 100% rename from reactos/drivers/network/tcpip/include/wait.h rename to drivers/network/tcpip/include/wait.h diff --git a/reactos/drivers/network/tcpip/notes.txt b/drivers/network/tcpip/notes.txt similarity index 100% rename from reactos/drivers/network/tcpip/notes.txt rename to drivers/network/tcpip/notes.txt diff --git a/reactos/drivers/network/tcpip/readme.txt b/drivers/network/tcpip/readme.txt similarity index 100% rename from reactos/drivers/network/tcpip/readme.txt rename to drivers/network/tcpip/readme.txt diff --git a/reactos/drivers/network/tcpip/tcpip.rbuild b/drivers/network/tcpip/tcpip.rbuild similarity index 100% rename from reactos/drivers/network/tcpip/tcpip.rbuild rename to drivers/network/tcpip/tcpip.rbuild diff --git a/reactos/drivers/network/tcpip/tcpip.rc b/drivers/network/tcpip/tcpip.rc similarity index 100% rename from reactos/drivers/network/tcpip/tcpip.rc rename to drivers/network/tcpip/tcpip.rc diff --git a/reactos/drivers/network/tcpip/tcpip.spec b/drivers/network/tcpip/tcpip.spec similarity index 100% rename from reactos/drivers/network/tcpip/tcpip.spec rename to drivers/network/tcpip/tcpip.spec diff --git a/reactos/drivers/network/tcpip/tcpip/SOURCES b/drivers/network/tcpip/tcpip/SOURCES similarity index 100% rename from reactos/drivers/network/tcpip/tcpip/SOURCES rename to drivers/network/tcpip/tcpip/SOURCES diff --git a/reactos/drivers/network/tcpip/tcpip/ainfo.c b/drivers/network/tcpip/tcpip/ainfo.c similarity index 100% rename from reactos/drivers/network/tcpip/tcpip/ainfo.c rename to drivers/network/tcpip/tcpip/ainfo.c diff --git a/reactos/drivers/network/tcpip/tcpip/buffer.c b/drivers/network/tcpip/tcpip/buffer.c similarity index 100% rename from reactos/drivers/network/tcpip/tcpip/buffer.c rename to drivers/network/tcpip/tcpip/buffer.c diff --git a/reactos/drivers/network/tcpip/tcpip/dispatch.c b/drivers/network/tcpip/tcpip/dispatch.c similarity index 100% rename from reactos/drivers/network/tcpip/tcpip/dispatch.c rename to drivers/network/tcpip/tcpip/dispatch.c diff --git a/reactos/drivers/network/tcpip/tcpip/fileobjs.c b/drivers/network/tcpip/tcpip/fileobjs.c similarity index 100% rename from reactos/drivers/network/tcpip/tcpip/fileobjs.c rename to drivers/network/tcpip/tcpip/fileobjs.c diff --git a/reactos/drivers/network/tcpip/tcpip/iinfo.c b/drivers/network/tcpip/tcpip/iinfo.c similarity index 100% rename from reactos/drivers/network/tcpip/tcpip/iinfo.c rename to drivers/network/tcpip/tcpip/iinfo.c diff --git a/reactos/drivers/network/tcpip/tcpip/info.c b/drivers/network/tcpip/tcpip/info.c similarity index 100% rename from reactos/drivers/network/tcpip/tcpip/info.c rename to drivers/network/tcpip/tcpip/info.c diff --git a/reactos/drivers/network/tcpip/tcpip/lock.c b/drivers/network/tcpip/tcpip/lock.c similarity index 100% rename from reactos/drivers/network/tcpip/tcpip/lock.c rename to drivers/network/tcpip/tcpip/lock.c diff --git a/reactos/drivers/network/tcpip/tcpip/main.c b/drivers/network/tcpip/tcpip/main.c similarity index 100% rename from reactos/drivers/network/tcpip/tcpip/main.c rename to drivers/network/tcpip/tcpip/main.c diff --git a/reactos/drivers/network/tcpip/tcpip/mockbuffer.c b/drivers/network/tcpip/tcpip/mockbuffer.c similarity index 100% rename from reactos/drivers/network/tcpip/tcpip/mockbuffer.c rename to drivers/network/tcpip/tcpip/mockbuffer.c diff --git a/reactos/drivers/network/tcpip/tcpip/mocklock.c b/drivers/network/tcpip/tcpip/mocklock.c similarity index 100% rename from reactos/drivers/network/tcpip/tcpip/mocklock.c rename to drivers/network/tcpip/tcpip/mocklock.c diff --git a/reactos/drivers/network/tcpip/tcpip/mockpool.c b/drivers/network/tcpip/tcpip/mockpool.c similarity index 100% rename from reactos/drivers/network/tcpip/tcpip/mockpool.c rename to drivers/network/tcpip/tcpip/mockpool.c diff --git a/reactos/drivers/network/tcpip/tcpip/mockwait.c b/drivers/network/tcpip/tcpip/mockwait.c similarity index 100% rename from reactos/drivers/network/tcpip/tcpip/mockwait.c rename to drivers/network/tcpip/tcpip/mockwait.c diff --git a/reactos/drivers/network/tcpip/tcpip/ninfo.c b/drivers/network/tcpip/tcpip/ninfo.c similarity index 100% rename from reactos/drivers/network/tcpip/tcpip/ninfo.c rename to drivers/network/tcpip/tcpip/ninfo.c diff --git a/reactos/drivers/network/tcpip/tcpip/proto.c b/drivers/network/tcpip/tcpip/proto.c similarity index 100% rename from reactos/drivers/network/tcpip/tcpip/proto.c rename to drivers/network/tcpip/tcpip/proto.c diff --git a/reactos/drivers/network/tcpip/tcpip/resource.rc b/drivers/network/tcpip/tcpip/resource.rc similarity index 100% rename from reactos/drivers/network/tcpip/tcpip/resource.rc rename to drivers/network/tcpip/tcpip/resource.rc diff --git a/reactos/drivers/network/tcpip/tcpip/tcpip.def b/drivers/network/tcpip/tcpip/tcpip.def similarity index 100% rename from reactos/drivers/network/tcpip/tcpip/tcpip.def rename to drivers/network/tcpip/tcpip/tcpip.def diff --git a/reactos/drivers/network/tcpip/tcpip/tinfo.c b/drivers/network/tcpip/tcpip/tinfo.c similarity index 100% rename from reactos/drivers/network/tcpip/tcpip/tinfo.c rename to drivers/network/tcpip/tcpip/tinfo.c diff --git a/reactos/drivers/network/tcpip/tcpip/wait.c b/drivers/network/tcpip/tcpip/wait.c similarity index 100% rename from reactos/drivers/network/tcpip/tcpip/wait.c rename to drivers/network/tcpip/tcpip/wait.c diff --git a/reactos/drivers/network/tcpip/tests/setup.c b/drivers/network/tcpip/tests/setup.c similarity index 100% rename from reactos/drivers/network/tcpip/tests/setup.c rename to drivers/network/tcpip/tests/setup.c diff --git a/reactos/drivers/network/tcpip/tests/stubs.tst b/drivers/network/tcpip/tests/stubs.tst similarity index 100% rename from reactos/drivers/network/tcpip/tests/stubs.tst rename to drivers/network/tcpip/tests/stubs.tst diff --git a/reactos/drivers/network/tcpip/tests/tests/ipreceive.c b/drivers/network/tcpip/tests/tests/ipreceive.c similarity index 100% rename from reactos/drivers/network/tcpip/tests/tests/ipreceive.c rename to drivers/network/tcpip/tests/tests/ipreceive.c diff --git a/reactos/drivers/network/tcpip/tests/tests/tigetprotocolnumber.c b/drivers/network/tcpip/tests/tests/tigetprotocolnumber.c similarity index 100% rename from reactos/drivers/network/tcpip/tests/tests/tigetprotocolnumber.c rename to drivers/network/tcpip/tests/tests/tigetprotocolnumber.c diff --git a/reactos/drivers/network/tdi/CMakeLists.txt b/drivers/network/tdi/CMakeLists.txt similarity index 100% rename from reactos/drivers/network/tdi/CMakeLists.txt rename to drivers/network/tdi/CMakeLists.txt diff --git a/reactos/drivers/network/tdi/cte/events.c b/drivers/network/tdi/cte/events.c similarity index 100% rename from reactos/drivers/network/tdi/cte/events.c rename to drivers/network/tdi/cte/events.c diff --git a/reactos/drivers/network/tdi/cte/string.c b/drivers/network/tdi/cte/string.c similarity index 100% rename from reactos/drivers/network/tdi/cte/string.c rename to drivers/network/tdi/cte/string.c diff --git a/reactos/drivers/network/tdi/cte/timer.c b/drivers/network/tdi/cte/timer.c similarity index 100% rename from reactos/drivers/network/tdi/cte/timer.c rename to drivers/network/tdi/cte/timer.c diff --git a/reactos/drivers/network/tdi/misc/main.c b/drivers/network/tdi/misc/main.c similarity index 100% rename from reactos/drivers/network/tdi/misc/main.c rename to drivers/network/tdi/misc/main.c diff --git a/reactos/drivers/network/tdi/misc/tdi.rc b/drivers/network/tdi/misc/tdi.rc similarity index 100% rename from reactos/drivers/network/tdi/misc/tdi.rc rename to drivers/network/tdi/misc/tdi.rc diff --git a/reactos/drivers/network/tdi/misc/tdi.spec b/drivers/network/tdi/misc/tdi.spec similarity index 100% rename from reactos/drivers/network/tdi/misc/tdi.spec rename to drivers/network/tdi/misc/tdi.spec diff --git a/reactos/drivers/network/tdi/precomp.h b/drivers/network/tdi/precomp.h similarity index 100% rename from reactos/drivers/network/tdi/precomp.h rename to drivers/network/tdi/precomp.h diff --git a/reactos/drivers/network/tdi/tdi.rbuild b/drivers/network/tdi/tdi.rbuild similarity index 100% rename from reactos/drivers/network/tdi/tdi.rbuild rename to drivers/network/tdi/tdi.rbuild diff --git a/reactos/drivers/network/tdi/tdi/dereg.c b/drivers/network/tdi/tdi/dereg.c similarity index 100% rename from reactos/drivers/network/tdi/tdi/dereg.c rename to drivers/network/tdi/tdi/dereg.c diff --git a/reactos/drivers/network/tdi/tdi/handler.c b/drivers/network/tdi/tdi/handler.c similarity index 100% rename from reactos/drivers/network/tdi/tdi/handler.c rename to drivers/network/tdi/tdi/handler.c diff --git a/reactos/drivers/network/tdi/tdi/obsolete.c b/drivers/network/tdi/tdi/obsolete.c similarity index 100% rename from reactos/drivers/network/tdi/tdi/obsolete.c rename to drivers/network/tdi/tdi/obsolete.c diff --git a/reactos/drivers/network/tdi/tdi/stubs.c b/drivers/network/tdi/tdi/stubs.c similarity index 100% rename from reactos/drivers/network/tdi/tdi/stubs.c rename to drivers/network/tdi/tdi/stubs.c diff --git a/reactos/drivers/parallel/CMakeLists.txt b/drivers/parallel/CMakeLists.txt similarity index 100% rename from reactos/drivers/parallel/CMakeLists.txt rename to drivers/parallel/CMakeLists.txt diff --git a/reactos/drivers/parallel/directory.rbuild b/drivers/parallel/directory.rbuild similarity index 100% rename from reactos/drivers/parallel/directory.rbuild rename to drivers/parallel/directory.rbuild diff --git a/reactos/drivers/parallel/parallel/CMakeLists.txt b/drivers/parallel/parallel/CMakeLists.txt similarity index 100% rename from reactos/drivers/parallel/parallel/CMakeLists.txt rename to drivers/parallel/parallel/CMakeLists.txt diff --git a/reactos/drivers/parallel/parallel/parallel.c b/drivers/parallel/parallel/parallel.c similarity index 100% rename from reactos/drivers/parallel/parallel/parallel.c rename to drivers/parallel/parallel/parallel.c diff --git a/reactos/drivers/parallel/parallel/parallel.h b/drivers/parallel/parallel/parallel.h similarity index 100% rename from reactos/drivers/parallel/parallel/parallel.h rename to drivers/parallel/parallel/parallel.h diff --git a/reactos/drivers/parallel/parallel/parallel.rbuild b/drivers/parallel/parallel/parallel.rbuild similarity index 100% rename from reactos/drivers/parallel/parallel/parallel.rbuild rename to drivers/parallel/parallel/parallel.rbuild diff --git a/reactos/drivers/parallel/parallel/parallel.rc b/drivers/parallel/parallel/parallel.rc similarity index 100% rename from reactos/drivers/parallel/parallel/parallel.rc rename to drivers/parallel/parallel/parallel.rc diff --git a/reactos/drivers/sac/directory.rbuild b/drivers/sac/directory.rbuild similarity index 100% rename from reactos/drivers/sac/directory.rbuild rename to drivers/sac/directory.rbuild diff --git a/reactos/drivers/sac/driver/chanmgr.c b/drivers/sac/driver/chanmgr.c similarity index 100% rename from reactos/drivers/sac/driver/chanmgr.c rename to drivers/sac/driver/chanmgr.c diff --git a/reactos/drivers/sac/driver/channel.c b/drivers/sac/driver/channel.c similarity index 100% rename from reactos/drivers/sac/driver/channel.c rename to drivers/sac/driver/channel.c diff --git a/reactos/drivers/sac/driver/cmdchan.c b/drivers/sac/driver/cmdchan.c similarity index 100% rename from reactos/drivers/sac/driver/cmdchan.c rename to drivers/sac/driver/cmdchan.c diff --git a/reactos/drivers/sac/driver/concmd.c b/drivers/sac/driver/concmd.c similarity index 100% rename from reactos/drivers/sac/driver/concmd.c rename to drivers/sac/driver/concmd.c diff --git a/reactos/drivers/sac/driver/conmgr.c b/drivers/sac/driver/conmgr.c similarity index 100% rename from reactos/drivers/sac/driver/conmgr.c rename to drivers/sac/driver/conmgr.c diff --git a/reactos/drivers/sac/driver/data.c b/drivers/sac/driver/data.c similarity index 100% rename from reactos/drivers/sac/driver/data.c rename to drivers/sac/driver/data.c diff --git a/reactos/drivers/sac/driver/dispatch.c b/drivers/sac/driver/dispatch.c similarity index 100% rename from reactos/drivers/sac/driver/dispatch.c rename to drivers/sac/driver/dispatch.c diff --git a/reactos/drivers/sac/driver/init.c b/drivers/sac/driver/init.c similarity index 100% rename from reactos/drivers/sac/driver/init.c rename to drivers/sac/driver/init.c diff --git a/reactos/drivers/sac/driver/memory.c b/drivers/sac/driver/memory.c similarity index 100% rename from reactos/drivers/sac/driver/memory.c rename to drivers/sac/driver/memory.c diff --git a/reactos/drivers/sac/driver/rawchan.c b/drivers/sac/driver/rawchan.c similarity index 100% rename from reactos/drivers/sac/driver/rawchan.c rename to drivers/sac/driver/rawchan.c diff --git a/reactos/drivers/sac/driver/sacdrv.h b/drivers/sac/driver/sacdrv.h similarity index 100% rename from reactos/drivers/sac/driver/sacdrv.h rename to drivers/sac/driver/sacdrv.h diff --git a/reactos/drivers/sac/driver/sacdrv.rbuild b/drivers/sac/driver/sacdrv.rbuild similarity index 100% rename from reactos/drivers/sac/driver/sacdrv.rbuild rename to drivers/sac/driver/sacdrv.rbuild diff --git a/reactos/drivers/sac/driver/sacdrv.rc b/drivers/sac/driver/sacdrv.rc similarity index 100% rename from reactos/drivers/sac/driver/sacdrv.rc rename to drivers/sac/driver/sacdrv.rc diff --git a/reactos/drivers/sac/driver/util.c b/drivers/sac/driver/util.c similarity index 100% rename from reactos/drivers/sac/driver/util.c rename to drivers/sac/driver/util.c diff --git a/reactos/drivers/sac/driver/vtutf8chan.c b/drivers/sac/driver/vtutf8chan.c similarity index 100% rename from reactos/drivers/sac/driver/vtutf8chan.c rename to drivers/sac/driver/vtutf8chan.c diff --git a/reactos/drivers/serial/CMakeLists.txt b/drivers/serial/CMakeLists.txt similarity index 100% rename from reactos/drivers/serial/CMakeLists.txt rename to drivers/serial/CMakeLists.txt diff --git a/reactos/drivers/serial/directory.rbuild b/drivers/serial/directory.rbuild similarity index 100% rename from reactos/drivers/serial/directory.rbuild rename to drivers/serial/directory.rbuild diff --git a/reactos/drivers/serial/serenum/CMakeLists.txt b/drivers/serial/serenum/CMakeLists.txt similarity index 100% rename from reactos/drivers/serial/serenum/CMakeLists.txt rename to drivers/serial/serenum/CMakeLists.txt diff --git a/reactos/drivers/serial/serenum/detect.c b/drivers/serial/serenum/detect.c similarity index 100% rename from reactos/drivers/serial/serenum/detect.c rename to drivers/serial/serenum/detect.c diff --git a/reactos/drivers/serial/serenum/fdo.c b/drivers/serial/serenum/fdo.c similarity index 100% rename from reactos/drivers/serial/serenum/fdo.c rename to drivers/serial/serenum/fdo.c diff --git a/reactos/drivers/serial/serenum/misc.c b/drivers/serial/serenum/misc.c similarity index 100% rename from reactos/drivers/serial/serenum/misc.c rename to drivers/serial/serenum/misc.c diff --git a/reactos/drivers/serial/serenum/pdo.c b/drivers/serial/serenum/pdo.c similarity index 100% rename from reactos/drivers/serial/serenum/pdo.c rename to drivers/serial/serenum/pdo.c diff --git a/reactos/drivers/serial/serenum/serenum.c b/drivers/serial/serenum/serenum.c similarity index 100% rename from reactos/drivers/serial/serenum/serenum.c rename to drivers/serial/serenum/serenum.c diff --git a/reactos/drivers/serial/serenum/serenum.h b/drivers/serial/serenum/serenum.h similarity index 100% rename from reactos/drivers/serial/serenum/serenum.h rename to drivers/serial/serenum/serenum.h diff --git a/reactos/drivers/serial/serenum/serenum.rbuild b/drivers/serial/serenum/serenum.rbuild similarity index 100% rename from reactos/drivers/serial/serenum/serenum.rbuild rename to drivers/serial/serenum/serenum.rbuild diff --git a/reactos/drivers/serial/serenum/serenum.rc b/drivers/serial/serenum/serenum.rc similarity index 100% rename from reactos/drivers/serial/serenum/serenum.rc rename to drivers/serial/serenum/serenum.rc diff --git a/reactos/drivers/serial/serial/CMakeLists.txt b/drivers/serial/serial/CMakeLists.txt similarity index 100% rename from reactos/drivers/serial/serial/CMakeLists.txt rename to drivers/serial/serial/CMakeLists.txt diff --git a/reactos/drivers/serial/serial/circularbuffer.c b/drivers/serial/serial/circularbuffer.c similarity index 100% rename from reactos/drivers/serial/serial/circularbuffer.c rename to drivers/serial/serial/circularbuffer.c diff --git a/reactos/drivers/serial/serial/cleanup.c b/drivers/serial/serial/cleanup.c similarity index 100% rename from reactos/drivers/serial/serial/cleanup.c rename to drivers/serial/serial/cleanup.c diff --git a/reactos/drivers/serial/serial/close.c b/drivers/serial/serial/close.c similarity index 100% rename from reactos/drivers/serial/serial/close.c rename to drivers/serial/serial/close.c diff --git a/reactos/drivers/serial/serial/create.c b/drivers/serial/serial/create.c similarity index 100% rename from reactos/drivers/serial/serial/create.c rename to drivers/serial/serial/create.c diff --git a/reactos/drivers/serial/serial/devctrl.c b/drivers/serial/serial/devctrl.c similarity index 100% rename from reactos/drivers/serial/serial/devctrl.c rename to drivers/serial/serial/devctrl.c diff --git a/reactos/drivers/serial/serial/info.c b/drivers/serial/serial/info.c similarity index 100% rename from reactos/drivers/serial/serial/info.c rename to drivers/serial/serial/info.c diff --git a/reactos/drivers/serial/serial/legacy.c b/drivers/serial/serial/legacy.c similarity index 100% rename from reactos/drivers/serial/serial/legacy.c rename to drivers/serial/serial/legacy.c diff --git a/reactos/drivers/serial/serial/misc.c b/drivers/serial/serial/misc.c similarity index 100% rename from reactos/drivers/serial/serial/misc.c rename to drivers/serial/serial/misc.c diff --git a/reactos/drivers/serial/serial/pnp.c b/drivers/serial/serial/pnp.c similarity index 100% rename from reactos/drivers/serial/serial/pnp.c rename to drivers/serial/serial/pnp.c diff --git a/reactos/drivers/serial/serial/power.c b/drivers/serial/serial/power.c similarity index 100% rename from reactos/drivers/serial/serial/power.c rename to drivers/serial/serial/power.c diff --git a/reactos/drivers/serial/serial/rw.c b/drivers/serial/serial/rw.c similarity index 100% rename from reactos/drivers/serial/serial/rw.c rename to drivers/serial/serial/rw.c diff --git a/reactos/drivers/serial/serial/serial.c b/drivers/serial/serial/serial.c similarity index 100% rename from reactos/drivers/serial/serial/serial.c rename to drivers/serial/serial/serial.c diff --git a/reactos/drivers/serial/serial/serial.h b/drivers/serial/serial/serial.h similarity index 100% rename from reactos/drivers/serial/serial/serial.h rename to drivers/serial/serial/serial.h diff --git a/reactos/drivers/serial/serial/serial.rbuild b/drivers/serial/serial/serial.rbuild similarity index 100% rename from reactos/drivers/serial/serial/serial.rbuild rename to drivers/serial/serial/serial.rbuild diff --git a/reactos/drivers/serial/serial/serial.rc b/drivers/serial/serial/serial.rc similarity index 100% rename from reactos/drivers/serial/serial/serial.rc rename to drivers/serial/serial/serial.rc diff --git a/reactos/drivers/setup/CMakeLists.txt b/drivers/setup/CMakeLists.txt similarity index 100% rename from reactos/drivers/setup/CMakeLists.txt rename to drivers/setup/CMakeLists.txt diff --git a/reactos/drivers/setup/blue/CMakeLists.txt b/drivers/setup/blue/CMakeLists.txt similarity index 100% rename from reactos/drivers/setup/blue/CMakeLists.txt rename to drivers/setup/blue/CMakeLists.txt diff --git a/reactos/drivers/setup/blue/blue.c b/drivers/setup/blue/blue.c similarity index 100% rename from reactos/drivers/setup/blue/blue.c rename to drivers/setup/blue/blue.c diff --git a/reactos/drivers/setup/blue/blue.h b/drivers/setup/blue/blue.h similarity index 100% rename from reactos/drivers/setup/blue/blue.h rename to drivers/setup/blue/blue.h diff --git a/reactos/drivers/setup/blue/blue.rbuild b/drivers/setup/blue/blue.rbuild similarity index 100% rename from reactos/drivers/setup/blue/blue.rbuild rename to drivers/setup/blue/blue.rbuild diff --git a/reactos/drivers/setup/blue/blue.rc b/drivers/setup/blue/blue.rc similarity index 100% rename from reactos/drivers/setup/blue/blue.rc rename to drivers/setup/blue/blue.rc diff --git a/reactos/drivers/setup/blue/font.c b/drivers/setup/blue/font.c similarity index 100% rename from reactos/drivers/setup/blue/font.c rename to drivers/setup/blue/font.c diff --git a/reactos/drivers/setup/directory.rbuild b/drivers/setup/directory.rbuild similarity index 100% rename from reactos/drivers/setup/directory.rbuild rename to drivers/setup/directory.rbuild diff --git a/reactos/drivers/storage/CMakeLists.txt b/drivers/storage/CMakeLists.txt similarity index 100% rename from reactos/drivers/storage/CMakeLists.txt rename to drivers/storage/CMakeLists.txt diff --git a/reactos/drivers/storage/class/CMakeLists.txt b/drivers/storage/class/CMakeLists.txt similarity index 100% rename from reactos/drivers/storage/class/CMakeLists.txt rename to drivers/storage/class/CMakeLists.txt diff --git a/reactos/drivers/storage/class/cdrom/CMakeLists.txt b/drivers/storage/class/cdrom/CMakeLists.txt similarity index 100% rename from reactos/drivers/storage/class/cdrom/CMakeLists.txt rename to drivers/storage/class/cdrom/CMakeLists.txt diff --git a/reactos/drivers/storage/class/cdrom/cdrom.c b/drivers/storage/class/cdrom/cdrom.c similarity index 100% rename from reactos/drivers/storage/class/cdrom/cdrom.c rename to drivers/storage/class/cdrom/cdrom.c diff --git a/reactos/drivers/storage/class/cdrom/cdrom.rbuild b/drivers/storage/class/cdrom/cdrom.rbuild similarity index 100% rename from reactos/drivers/storage/class/cdrom/cdrom.rbuild rename to drivers/storage/class/cdrom/cdrom.rbuild diff --git a/reactos/drivers/storage/class/cdrom/cdrom.rc b/drivers/storage/class/cdrom/cdrom.rc similarity index 100% rename from reactos/drivers/storage/class/cdrom/cdrom.rc rename to drivers/storage/class/cdrom/cdrom.rc diff --git a/reactos/drivers/storage/class/cdrom/findscsi.c b/drivers/storage/class/cdrom/findscsi.c similarity index 100% rename from reactos/drivers/storage/class/cdrom/findscsi.c rename to drivers/storage/class/cdrom/findscsi.c diff --git a/reactos/drivers/storage/class/cdrom/license.txt b/drivers/storage/class/cdrom/license.txt similarity index 100% rename from reactos/drivers/storage/class/cdrom/license.txt rename to drivers/storage/class/cdrom/license.txt diff --git a/reactos/drivers/storage/class/cdrom/precomp.h b/drivers/storage/class/cdrom/precomp.h similarity index 100% rename from reactos/drivers/storage/class/cdrom/precomp.h rename to drivers/storage/class/cdrom/precomp.h diff --git a/reactos/drivers/storage/class/cdrom_new/cdrom.c b/drivers/storage/class/cdrom_new/cdrom.c similarity index 100% rename from reactos/drivers/storage/class/cdrom_new/cdrom.c rename to drivers/storage/class/cdrom_new/cdrom.c diff --git a/reactos/drivers/storage/class/cdrom_new/cdrom.h b/drivers/storage/class/cdrom_new/cdrom.h similarity index 100% rename from reactos/drivers/storage/class/cdrom_new/cdrom.h rename to drivers/storage/class/cdrom_new/cdrom.h diff --git a/reactos/drivers/storage/class/cdrom_new/cdrom.inf b/drivers/storage/class/cdrom_new/cdrom.inf similarity index 100% rename from reactos/drivers/storage/class/cdrom_new/cdrom.inf rename to drivers/storage/class/cdrom_new/cdrom.inf diff --git a/reactos/drivers/storage/class/cdrom_new/cdrom_new.rbuild b/drivers/storage/class/cdrom_new/cdrom_new.rbuild similarity index 100% rename from reactos/drivers/storage/class/cdrom_new/cdrom_new.rbuild rename to drivers/storage/class/cdrom_new/cdrom_new.rbuild diff --git a/reactos/drivers/storage/class/cdrom_new/data.c b/drivers/storage/class/cdrom_new/data.c similarity index 100% rename from reactos/drivers/storage/class/cdrom_new/data.c rename to drivers/storage/class/cdrom_new/data.c diff --git a/reactos/drivers/storage/class/cdrom_new/ioctl.c b/drivers/storage/class/cdrom_new/ioctl.c similarity index 100% rename from reactos/drivers/storage/class/cdrom_new/ioctl.c rename to drivers/storage/class/cdrom_new/ioctl.c diff --git a/reactos/drivers/storage/class/cdrom_new/mmc.c b/drivers/storage/class/cdrom_new/mmc.c similarity index 100% rename from reactos/drivers/storage/class/cdrom_new/mmc.c rename to drivers/storage/class/cdrom_new/mmc.c diff --git a/reactos/drivers/storage/class/cdrom_new/scsicdrm.rc b/drivers/storage/class/cdrom_new/scsicdrm.rc similarity index 100% rename from reactos/drivers/storage/class/cdrom_new/scsicdrm.rc rename to drivers/storage/class/cdrom_new/scsicdrm.rc diff --git a/reactos/drivers/storage/class/cdrom_new/sec.c b/drivers/storage/class/cdrom_new/sec.c similarity index 100% rename from reactos/drivers/storage/class/cdrom_new/sec.c rename to drivers/storage/class/cdrom_new/sec.c diff --git a/reactos/drivers/storage/class/cdrom_new/sec.h b/drivers/storage/class/cdrom_new/sec.h similarity index 100% rename from reactos/drivers/storage/class/cdrom_new/sec.h rename to drivers/storage/class/cdrom_new/sec.h diff --git a/reactos/drivers/storage/class/cdrom_new/trace.h b/drivers/storage/class/cdrom_new/trace.h similarity index 100% rename from reactos/drivers/storage/class/cdrom_new/trace.h rename to drivers/storage/class/cdrom_new/trace.h diff --git a/reactos/drivers/storage/class/class2/CMakeLists.txt b/drivers/storage/class/class2/CMakeLists.txt similarity index 100% rename from reactos/drivers/storage/class/class2/CMakeLists.txt rename to drivers/storage/class/class2/CMakeLists.txt diff --git a/reactos/drivers/storage/class/class2/class2.c b/drivers/storage/class/class2/class2.c similarity index 100% rename from reactos/drivers/storage/class/class2/class2.c rename to drivers/storage/class/class2/class2.c diff --git a/reactos/drivers/storage/class/class2/class2.rbuild b/drivers/storage/class/class2/class2.rbuild similarity index 100% rename from reactos/drivers/storage/class/class2/class2.rbuild rename to drivers/storage/class/class2/class2.rbuild diff --git a/reactos/drivers/storage/class/class2/class2.rc b/drivers/storage/class/class2/class2.rc similarity index 100% rename from reactos/drivers/storage/class/class2/class2.rc rename to drivers/storage/class/class2/class2.rc diff --git a/reactos/drivers/storage/class/class2/class2.spec b/drivers/storage/class/class2/class2.spec similarity index 100% rename from reactos/drivers/storage/class/class2/class2.spec rename to drivers/storage/class/class2/class2.spec diff --git a/reactos/drivers/storage/class/class2/license.txt b/drivers/storage/class/class2/license.txt similarity index 100% rename from reactos/drivers/storage/class/class2/license.txt rename to drivers/storage/class/class2/license.txt diff --git a/reactos/drivers/storage/class/directory.rbuild b/drivers/storage/class/directory.rbuild similarity index 100% rename from reactos/drivers/storage/class/directory.rbuild rename to drivers/storage/class/directory.rbuild diff --git a/reactos/drivers/storage/class/disk/CMakeLists.txt b/drivers/storage/class/disk/CMakeLists.txt similarity index 100% rename from reactos/drivers/storage/class/disk/CMakeLists.txt rename to drivers/storage/class/disk/CMakeLists.txt diff --git a/reactos/drivers/storage/class/disk/disk.c b/drivers/storage/class/disk/disk.c similarity index 100% rename from reactos/drivers/storage/class/disk/disk.c rename to drivers/storage/class/disk/disk.c diff --git a/reactos/drivers/storage/class/disk/disk.rbuild b/drivers/storage/class/disk/disk.rbuild similarity index 100% rename from reactos/drivers/storage/class/disk/disk.rbuild rename to drivers/storage/class/disk/disk.rbuild diff --git a/reactos/drivers/storage/class/disk/disk.rc b/drivers/storage/class/disk/disk.rc similarity index 100% rename from reactos/drivers/storage/class/disk/disk.rc rename to drivers/storage/class/disk/disk.rc diff --git a/reactos/drivers/storage/class/disk/license.txt b/drivers/storage/class/disk/license.txt similarity index 100% rename from reactos/drivers/storage/class/disk/license.txt rename to drivers/storage/class/disk/license.txt diff --git a/reactos/drivers/storage/class/include/class2.h b/drivers/storage/class/include/class2.h similarity index 100% rename from reactos/drivers/storage/class/include/class2.h rename to drivers/storage/class/include/class2.h diff --git a/reactos/drivers/storage/class/ramdisk/CMakeLists.txt b/drivers/storage/class/ramdisk/CMakeLists.txt similarity index 100% rename from reactos/drivers/storage/class/ramdisk/CMakeLists.txt rename to drivers/storage/class/ramdisk/CMakeLists.txt diff --git a/reactos/drivers/storage/class/ramdisk/ramdisk.c b/drivers/storage/class/ramdisk/ramdisk.c similarity index 100% rename from reactos/drivers/storage/class/ramdisk/ramdisk.c rename to drivers/storage/class/ramdisk/ramdisk.c diff --git a/reactos/drivers/storage/class/ramdisk/ramdisk.rbuild b/drivers/storage/class/ramdisk/ramdisk.rbuild similarity index 100% rename from reactos/drivers/storage/class/ramdisk/ramdisk.rbuild rename to drivers/storage/class/ramdisk/ramdisk.rbuild diff --git a/reactos/drivers/storage/class/ramdisk/ramdisk.rc b/drivers/storage/class/ramdisk/ramdisk.rc similarity index 100% rename from reactos/drivers/storage/class/ramdisk/ramdisk.rc rename to drivers/storage/class/ramdisk/ramdisk.rc diff --git a/reactos/drivers/storage/classpnp/CMakeLists.txt b/drivers/storage/classpnp/CMakeLists.txt similarity index 100% rename from reactos/drivers/storage/classpnp/CMakeLists.txt rename to drivers/storage/classpnp/CMakeLists.txt diff --git a/reactos/drivers/storage/classpnp/autorun.c b/drivers/storage/classpnp/autorun.c similarity index 100% rename from reactos/drivers/storage/classpnp/autorun.c rename to drivers/storage/classpnp/autorun.c diff --git a/reactos/drivers/storage/classpnp/class.c b/drivers/storage/classpnp/class.c similarity index 100% rename from reactos/drivers/storage/classpnp/class.c rename to drivers/storage/classpnp/class.c diff --git a/reactos/drivers/storage/classpnp/class.rc b/drivers/storage/classpnp/class.rc similarity index 100% rename from reactos/drivers/storage/classpnp/class.rc rename to drivers/storage/classpnp/class.rc diff --git a/reactos/drivers/storage/classpnp/class.spec b/drivers/storage/classpnp/class.spec similarity index 100% rename from reactos/drivers/storage/classpnp/class.spec rename to drivers/storage/classpnp/class.spec diff --git a/reactos/drivers/storage/classpnp/classp.h b/drivers/storage/classpnp/classp.h similarity index 100% rename from reactos/drivers/storage/classpnp/classp.h rename to drivers/storage/classpnp/classp.h diff --git a/reactos/drivers/storage/classpnp/classpnp.rbuild b/drivers/storage/classpnp/classpnp.rbuild similarity index 100% rename from reactos/drivers/storage/classpnp/classpnp.rbuild rename to drivers/storage/classpnp/classpnp.rbuild diff --git a/reactos/drivers/storage/classpnp/classwmi.c b/drivers/storage/classpnp/classwmi.c similarity index 100% rename from reactos/drivers/storage/classpnp/classwmi.c rename to drivers/storage/classpnp/classwmi.c diff --git a/reactos/drivers/storage/classpnp/clntirp.c b/drivers/storage/classpnp/clntirp.c similarity index 100% rename from reactos/drivers/storage/classpnp/clntirp.c rename to drivers/storage/classpnp/clntirp.c diff --git a/reactos/drivers/storage/classpnp/create.c b/drivers/storage/classpnp/create.c similarity index 100% rename from reactos/drivers/storage/classpnp/create.c rename to drivers/storage/classpnp/create.c diff --git a/reactos/drivers/storage/classpnp/data.c b/drivers/storage/classpnp/data.c similarity index 100% rename from reactos/drivers/storage/classpnp/data.c rename to drivers/storage/classpnp/data.c diff --git a/reactos/drivers/storage/classpnp/debug.c b/drivers/storage/classpnp/debug.c similarity index 100% rename from reactos/drivers/storage/classpnp/debug.c rename to drivers/storage/classpnp/debug.c diff --git a/reactos/drivers/storage/classpnp/debug.h b/drivers/storage/classpnp/debug.h similarity index 100% rename from reactos/drivers/storage/classpnp/debug.h rename to drivers/storage/classpnp/debug.h diff --git a/reactos/drivers/storage/classpnp/dictlib.c b/drivers/storage/classpnp/dictlib.c similarity index 100% rename from reactos/drivers/storage/classpnp/dictlib.c rename to drivers/storage/classpnp/dictlib.c diff --git a/reactos/drivers/storage/classpnp/lock.c b/drivers/storage/classpnp/lock.c similarity index 100% rename from reactos/drivers/storage/classpnp/lock.c rename to drivers/storage/classpnp/lock.c diff --git a/reactos/drivers/storage/classpnp/obsolete.c b/drivers/storage/classpnp/obsolete.c similarity index 100% rename from reactos/drivers/storage/classpnp/obsolete.c rename to drivers/storage/classpnp/obsolete.c diff --git a/reactos/drivers/storage/classpnp/power.c b/drivers/storage/classpnp/power.c similarity index 100% rename from reactos/drivers/storage/classpnp/power.c rename to drivers/storage/classpnp/power.c diff --git a/reactos/drivers/storage/classpnp/retry.c b/drivers/storage/classpnp/retry.c similarity index 100% rename from reactos/drivers/storage/classpnp/retry.c rename to drivers/storage/classpnp/retry.c diff --git a/reactos/drivers/storage/classpnp/utils.c b/drivers/storage/classpnp/utils.c similarity index 100% rename from reactos/drivers/storage/classpnp/utils.c rename to drivers/storage/classpnp/utils.c diff --git a/reactos/drivers/storage/classpnp/xferpkt.c b/drivers/storage/classpnp/xferpkt.c similarity index 100% rename from reactos/drivers/storage/classpnp/xferpkt.c rename to drivers/storage/classpnp/xferpkt.c diff --git a/reactos/drivers/storage/directory.rbuild b/drivers/storage/directory.rbuild similarity index 100% rename from reactos/drivers/storage/directory.rbuild rename to drivers/storage/directory.rbuild diff --git a/reactos/drivers/storage/fdc/CMakeLists.txt b/drivers/storage/fdc/CMakeLists.txt similarity index 100% rename from reactos/drivers/storage/fdc/CMakeLists.txt rename to drivers/storage/fdc/CMakeLists.txt diff --git a/reactos/drivers/storage/fdc/directory.rbuild b/drivers/storage/fdc/directory.rbuild similarity index 100% rename from reactos/drivers/storage/fdc/directory.rbuild rename to drivers/storage/fdc/directory.rbuild diff --git a/reactos/drivers/storage/fdc/fdc/CMakeLists.txt b/drivers/storage/fdc/fdc/CMakeLists.txt similarity index 100% rename from reactos/drivers/storage/fdc/fdc/CMakeLists.txt rename to drivers/storage/fdc/fdc/CMakeLists.txt diff --git a/reactos/drivers/storage/fdc/fdc/SOURCES b/drivers/storage/fdc/fdc/SOURCES similarity index 100% rename from reactos/drivers/storage/fdc/fdc/SOURCES rename to drivers/storage/fdc/fdc/SOURCES diff --git a/reactos/drivers/storage/fdc/fdc/fdc.rbuild b/drivers/storage/fdc/fdc/fdc.rbuild similarity index 100% rename from reactos/drivers/storage/fdc/fdc/fdc.rbuild rename to drivers/storage/fdc/fdc/fdc.rbuild diff --git a/reactos/drivers/storage/floppy/CMakeLists.txt b/drivers/storage/floppy/CMakeLists.txt similarity index 100% rename from reactos/drivers/storage/floppy/CMakeLists.txt rename to drivers/storage/floppy/CMakeLists.txt diff --git a/reactos/drivers/storage/floppy/SOURCES b/drivers/storage/floppy/SOURCES similarity index 100% rename from reactos/drivers/storage/floppy/SOURCES rename to drivers/storage/floppy/SOURCES diff --git a/reactos/drivers/storage/floppy/csqrtns.c b/drivers/storage/floppy/csqrtns.c similarity index 100% rename from reactos/drivers/storage/floppy/csqrtns.c rename to drivers/storage/floppy/csqrtns.c diff --git a/reactos/drivers/storage/floppy/csqrtns.h b/drivers/storage/floppy/csqrtns.h similarity index 100% rename from reactos/drivers/storage/floppy/csqrtns.h rename to drivers/storage/floppy/csqrtns.h diff --git a/reactos/drivers/storage/floppy/floppy.c b/drivers/storage/floppy/floppy.c similarity index 100% rename from reactos/drivers/storage/floppy/floppy.c rename to drivers/storage/floppy/floppy.c diff --git a/reactos/drivers/storage/floppy/floppy.h b/drivers/storage/floppy/floppy.h similarity index 100% rename from reactos/drivers/storage/floppy/floppy.h rename to drivers/storage/floppy/floppy.h diff --git a/reactos/drivers/storage/floppy/floppy.rbuild b/drivers/storage/floppy/floppy.rbuild similarity index 100% rename from reactos/drivers/storage/floppy/floppy.rbuild rename to drivers/storage/floppy/floppy.rbuild diff --git a/reactos/drivers/storage/floppy/floppy.rc b/drivers/storage/floppy/floppy.rc similarity index 100% rename from reactos/drivers/storage/floppy/floppy.rc rename to drivers/storage/floppy/floppy.rc diff --git a/reactos/drivers/storage/floppy/hardware.c b/drivers/storage/floppy/hardware.c similarity index 100% rename from reactos/drivers/storage/floppy/hardware.c rename to drivers/storage/floppy/hardware.c diff --git a/reactos/drivers/storage/floppy/hardware.h b/drivers/storage/floppy/hardware.h similarity index 100% rename from reactos/drivers/storage/floppy/hardware.h rename to drivers/storage/floppy/hardware.h diff --git a/reactos/drivers/storage/floppy/ioctl.c b/drivers/storage/floppy/ioctl.c similarity index 100% rename from reactos/drivers/storage/floppy/ioctl.c rename to drivers/storage/floppy/ioctl.c diff --git a/reactos/drivers/storage/floppy/ioctl.h b/drivers/storage/floppy/ioctl.h similarity index 100% rename from reactos/drivers/storage/floppy/ioctl.h rename to drivers/storage/floppy/ioctl.h diff --git a/reactos/drivers/storage/floppy/precomp.h b/drivers/storage/floppy/precomp.h similarity index 100% rename from reactos/drivers/storage/floppy/precomp.h rename to drivers/storage/floppy/precomp.h diff --git a/reactos/drivers/storage/floppy/readwrite.c b/drivers/storage/floppy/readwrite.c similarity index 100% rename from reactos/drivers/storage/floppy/readwrite.c rename to drivers/storage/floppy/readwrite.c diff --git a/reactos/drivers/storage/floppy/readwrite.h b/drivers/storage/floppy/readwrite.h similarity index 100% rename from reactos/drivers/storage/floppy/readwrite.h rename to drivers/storage/floppy/readwrite.h diff --git a/reactos/drivers/storage/ide/CMakeLists.txt b/drivers/storage/ide/CMakeLists.txt similarity index 100% rename from reactos/drivers/storage/ide/CMakeLists.txt rename to drivers/storage/ide/CMakeLists.txt diff --git a/reactos/drivers/storage/ide/atapi/CMakeLists.txt b/drivers/storage/ide/atapi/CMakeLists.txt similarity index 100% rename from reactos/drivers/storage/ide/atapi/CMakeLists.txt rename to drivers/storage/ide/atapi/CMakeLists.txt diff --git a/reactos/drivers/storage/ide/atapi/atapi.c b/drivers/storage/ide/atapi/atapi.c similarity index 100% rename from reactos/drivers/storage/ide/atapi/atapi.c rename to drivers/storage/ide/atapi/atapi.c diff --git a/reactos/drivers/storage/ide/atapi/atapi.h b/drivers/storage/ide/atapi/atapi.h similarity index 100% rename from reactos/drivers/storage/ide/atapi/atapi.h rename to drivers/storage/ide/atapi/atapi.h diff --git a/reactos/drivers/storage/ide/atapi/atapi.rbuild b/drivers/storage/ide/atapi/atapi.rbuild similarity index 100% rename from reactos/drivers/storage/ide/atapi/atapi.rbuild rename to drivers/storage/ide/atapi/atapi.rbuild diff --git a/reactos/drivers/storage/ide/atapi/atapi.rc b/drivers/storage/ide/atapi/atapi.rc similarity index 100% rename from reactos/drivers/storage/ide/atapi/atapi.rc rename to drivers/storage/ide/atapi/atapi.rc diff --git a/reactos/drivers/storage/ide/atapi/license.txt b/drivers/storage/ide/atapi/license.txt similarity index 100% rename from reactos/drivers/storage/ide/atapi/license.txt rename to drivers/storage/ide/atapi/license.txt diff --git a/reactos/drivers/storage/ide/directory.rbuild b/drivers/storage/ide/directory.rbuild similarity index 100% rename from reactos/drivers/storage/ide/directory.rbuild rename to drivers/storage/ide/directory.rbuild diff --git a/reactos/drivers/storage/ide/pciide/CMakeLists.txt b/drivers/storage/ide/pciide/CMakeLists.txt similarity index 100% rename from reactos/drivers/storage/ide/pciide/CMakeLists.txt rename to drivers/storage/ide/pciide/CMakeLists.txt diff --git a/reactos/drivers/storage/ide/pciide/pciide.c b/drivers/storage/ide/pciide/pciide.c similarity index 100% rename from reactos/drivers/storage/ide/pciide/pciide.c rename to drivers/storage/ide/pciide/pciide.c diff --git a/reactos/drivers/storage/ide/pciide/pciide.h b/drivers/storage/ide/pciide/pciide.h similarity index 100% rename from reactos/drivers/storage/ide/pciide/pciide.h rename to drivers/storage/ide/pciide/pciide.h diff --git a/reactos/drivers/storage/ide/pciide/pciide.rbuild b/drivers/storage/ide/pciide/pciide.rbuild similarity index 100% rename from reactos/drivers/storage/ide/pciide/pciide.rbuild rename to drivers/storage/ide/pciide/pciide.rbuild diff --git a/reactos/drivers/storage/ide/pciide/pciide.rc b/drivers/storage/ide/pciide/pciide.rc similarity index 100% rename from reactos/drivers/storage/ide/pciide/pciide.rc rename to drivers/storage/ide/pciide/pciide.rc diff --git a/reactos/drivers/storage/ide/pciidex/CMakeLists.txt b/drivers/storage/ide/pciidex/CMakeLists.txt similarity index 100% rename from reactos/drivers/storage/ide/pciidex/CMakeLists.txt rename to drivers/storage/ide/pciidex/CMakeLists.txt diff --git a/reactos/drivers/storage/ide/pciidex/fdo.c b/drivers/storage/ide/pciidex/fdo.c similarity index 100% rename from reactos/drivers/storage/ide/pciidex/fdo.c rename to drivers/storage/ide/pciidex/fdo.c diff --git a/reactos/drivers/storage/ide/pciidex/miniport.c b/drivers/storage/ide/pciidex/miniport.c similarity index 100% rename from reactos/drivers/storage/ide/pciidex/miniport.c rename to drivers/storage/ide/pciidex/miniport.c diff --git a/reactos/drivers/storage/ide/pciidex/misc.c b/drivers/storage/ide/pciidex/misc.c similarity index 100% rename from reactos/drivers/storage/ide/pciidex/misc.c rename to drivers/storage/ide/pciidex/misc.c diff --git a/reactos/drivers/storage/ide/pciidex/pciidex.c b/drivers/storage/ide/pciidex/pciidex.c similarity index 100% rename from reactos/drivers/storage/ide/pciidex/pciidex.c rename to drivers/storage/ide/pciidex/pciidex.c diff --git a/reactos/drivers/storage/ide/pciidex/pciidex.h b/drivers/storage/ide/pciidex/pciidex.h similarity index 100% rename from reactos/drivers/storage/ide/pciidex/pciidex.h rename to drivers/storage/ide/pciidex/pciidex.h diff --git a/reactos/drivers/storage/ide/pciidex/pciidex.rbuild b/drivers/storage/ide/pciidex/pciidex.rbuild similarity index 100% rename from reactos/drivers/storage/ide/pciidex/pciidex.rbuild rename to drivers/storage/ide/pciidex/pciidex.rbuild diff --git a/reactos/drivers/storage/ide/pciidex/pciidex.rc b/drivers/storage/ide/pciidex/pciidex.rc similarity index 100% rename from reactos/drivers/storage/ide/pciidex/pciidex.rc rename to drivers/storage/ide/pciidex/pciidex.rc diff --git a/reactos/drivers/storage/ide/pciidex/pciidex.spec b/drivers/storage/ide/pciidex/pciidex.spec similarity index 100% rename from reactos/drivers/storage/ide/pciidex/pciidex.spec rename to drivers/storage/ide/pciidex/pciidex.spec diff --git a/reactos/drivers/storage/ide/pciidex/pdo.c b/drivers/storage/ide/pciidex/pdo.c similarity index 100% rename from reactos/drivers/storage/ide/pciidex/pdo.c rename to drivers/storage/ide/pciidex/pdo.c diff --git a/reactos/drivers/storage/ide/uniata/CMakeLists.txt b/drivers/storage/ide/uniata/CMakeLists.txt similarity index 100% rename from reactos/drivers/storage/ide/uniata/CMakeLists.txt rename to drivers/storage/ide/uniata/CMakeLists.txt diff --git a/reactos/drivers/storage/ide/uniata/atapi.h b/drivers/storage/ide/uniata/atapi.h similarity index 100% rename from reactos/drivers/storage/ide/uniata/atapi.h rename to drivers/storage/ide/uniata/atapi.h diff --git a/reactos/drivers/storage/ide/uniata/badblock.h b/drivers/storage/ide/uniata/badblock.h similarity index 100% rename from reactos/drivers/storage/ide/uniata/badblock.h rename to drivers/storage/ide/uniata/badblock.h diff --git a/reactos/drivers/storage/ide/uniata/bm_devs.h b/drivers/storage/ide/uniata/bm_devs.h similarity index 100% rename from reactos/drivers/storage/ide/uniata/bm_devs.h rename to drivers/storage/ide/uniata/bm_devs.h diff --git a/reactos/drivers/storage/ide/uniata/bsmaster.h b/drivers/storage/ide/uniata/bsmaster.h similarity index 100% rename from reactos/drivers/storage/ide/uniata/bsmaster.h rename to drivers/storage/ide/uniata/bsmaster.h diff --git a/reactos/drivers/storage/ide/uniata/config.h b/drivers/storage/ide/uniata/config.h similarity index 100% rename from reactos/drivers/storage/ide/uniata/config.h rename to drivers/storage/ide/uniata/config.h diff --git a/reactos/drivers/storage/ide/uniata/id_ata.cpp b/drivers/storage/ide/uniata/id_ata.cpp similarity index 100% rename from reactos/drivers/storage/ide/uniata/id_ata.cpp rename to drivers/storage/ide/uniata/id_ata.cpp diff --git a/reactos/drivers/storage/ide/uniata/id_badblock.cpp b/drivers/storage/ide/uniata/id_badblock.cpp similarity index 100% rename from reactos/drivers/storage/ide/uniata/id_badblock.cpp rename to drivers/storage/ide/uniata/id_badblock.cpp diff --git a/reactos/drivers/storage/ide/uniata/id_dma.cpp b/drivers/storage/ide/uniata/id_dma.cpp similarity index 100% rename from reactos/drivers/storage/ide/uniata/id_dma.cpp rename to drivers/storage/ide/uniata/id_dma.cpp diff --git a/reactos/drivers/storage/ide/uniata/id_init.cpp b/drivers/storage/ide/uniata/id_init.cpp similarity index 100% rename from reactos/drivers/storage/ide/uniata/id_init.cpp rename to drivers/storage/ide/uniata/id_init.cpp diff --git a/reactos/drivers/storage/ide/uniata/id_probe.cpp b/drivers/storage/ide/uniata/id_probe.cpp similarity index 100% rename from reactos/drivers/storage/ide/uniata/id_probe.cpp rename to drivers/storage/ide/uniata/id_probe.cpp diff --git a/reactos/drivers/storage/ide/uniata/id_queue.cpp b/drivers/storage/ide/uniata/id_queue.cpp similarity index 100% rename from reactos/drivers/storage/ide/uniata/id_queue.cpp rename to drivers/storage/ide/uniata/id_queue.cpp diff --git a/reactos/drivers/storage/ide/uniata/id_queue.h b/drivers/storage/ide/uniata/id_queue.h similarity index 100% rename from reactos/drivers/storage/ide/uniata/id_queue.h rename to drivers/storage/ide/uniata/id_queue.h diff --git a/reactos/drivers/storage/ide/uniata/id_sata.cpp b/drivers/storage/ide/uniata/id_sata.cpp similarity index 100% rename from reactos/drivers/storage/ide/uniata/id_sata.cpp rename to drivers/storage/ide/uniata/id_sata.cpp diff --git a/reactos/drivers/storage/ide/uniata/id_sata.h b/drivers/storage/ide/uniata/id_sata.h similarity index 100% rename from reactos/drivers/storage/ide/uniata/id_sata.h rename to drivers/storage/ide/uniata/id_sata.h diff --git a/reactos/drivers/storage/ide/uniata/idedma.def b/drivers/storage/ide/uniata/idedma.def similarity index 100% rename from reactos/drivers/storage/ide/uniata/idedma.def rename to drivers/storage/ide/uniata/idedma.def diff --git a/reactos/drivers/storage/ide/uniata/idedma.rc b/drivers/storage/ide/uniata/idedma.rc similarity index 100% rename from reactos/drivers/storage/ide/uniata/idedma.rc rename to drivers/storage/ide/uniata/idedma.rc diff --git a/reactos/drivers/storage/ide/uniata/inc/CrNtDecl.h b/drivers/storage/ide/uniata/inc/CrNtDecl.h similarity index 100% rename from reactos/drivers/storage/ide/uniata/inc/CrNtDecl.h rename to drivers/storage/ide/uniata/inc/CrNtDecl.h diff --git a/reactos/drivers/storage/ide/uniata/inc/CrNtStubs.h b/drivers/storage/ide/uniata/inc/CrNtStubs.h similarity index 100% rename from reactos/drivers/storage/ide/uniata/inc/CrNtStubs.h rename to drivers/storage/ide/uniata/inc/CrNtStubs.h diff --git a/reactos/drivers/storage/ide/uniata/inc/CrossNt.h b/drivers/storage/ide/uniata/inc/CrossNt.h similarity index 100% rename from reactos/drivers/storage/ide/uniata/inc/CrossNt.h rename to drivers/storage/ide/uniata/inc/CrossNt.h diff --git a/reactos/drivers/storage/ide/uniata/inc/PostDbgMesg.h b/drivers/storage/ide/uniata/inc/PostDbgMesg.h similarity index 100% rename from reactos/drivers/storage/ide/uniata/inc/PostDbgMesg.h rename to drivers/storage/ide/uniata/inc/PostDbgMesg.h diff --git a/reactos/drivers/storage/ide/uniata/inc/misc.h b/drivers/storage/ide/uniata/inc/misc.h similarity index 100% rename from reactos/drivers/storage/ide/uniata/inc/misc.h rename to drivers/storage/ide/uniata/inc/misc.h diff --git a/reactos/drivers/storage/ide/uniata/inc/rwlock.h b/drivers/storage/ide/uniata/inc/rwlock.h similarity index 100% rename from reactos/drivers/storage/ide/uniata/inc/rwlock.h rename to drivers/storage/ide/uniata/inc/rwlock.h diff --git a/reactos/drivers/storage/ide/uniata/ntddk_ex.h b/drivers/storage/ide/uniata/ntddk_ex.h similarity index 100% rename from reactos/drivers/storage/ide/uniata/ntddk_ex.h rename to drivers/storage/ide/uniata/ntddk_ex.h diff --git a/reactos/drivers/storage/ide/uniata/ntddscsi.h b/drivers/storage/ide/uniata/ntddscsi.h similarity index 100% rename from reactos/drivers/storage/ide/uniata/ntddscsi.h rename to drivers/storage/ide/uniata/ntddscsi.h diff --git a/reactos/drivers/storage/ide/uniata/ros_glue/ros_glue.cpp b/drivers/storage/ide/uniata/ros_glue/ros_glue.cpp similarity index 100% rename from reactos/drivers/storage/ide/uniata/ros_glue/ros_glue.cpp rename to drivers/storage/ide/uniata/ros_glue/ros_glue.cpp diff --git a/reactos/drivers/storage/ide/uniata/scsi.h b/drivers/storage/ide/uniata/scsi.h similarity index 100% rename from reactos/drivers/storage/ide/uniata/scsi.h rename to drivers/storage/ide/uniata/scsi.h diff --git a/reactos/drivers/storage/ide/uniata/srb.h b/drivers/storage/ide/uniata/srb.h similarity index 100% rename from reactos/drivers/storage/ide/uniata/srb.h rename to drivers/storage/ide/uniata/srb.h diff --git a/reactos/drivers/storage/ide/uniata/stdafx.h b/drivers/storage/ide/uniata/stdafx.h similarity index 100% rename from reactos/drivers/storage/ide/uniata/stdafx.h rename to drivers/storage/ide/uniata/stdafx.h diff --git a/reactos/drivers/storage/ide/uniata/todo.txt b/drivers/storage/ide/uniata/todo.txt similarity index 100% rename from reactos/drivers/storage/ide/uniata/todo.txt rename to drivers/storage/ide/uniata/todo.txt diff --git a/reactos/drivers/storage/ide/uniata/tools.h b/drivers/storage/ide/uniata/tools.h similarity index 100% rename from reactos/drivers/storage/ide/uniata/tools.h rename to drivers/storage/ide/uniata/tools.h diff --git a/reactos/drivers/storage/ide/uniata/uata_ctl.h b/drivers/storage/ide/uniata/uata_ctl.h similarity index 100% rename from reactos/drivers/storage/ide/uniata/uata_ctl.h rename to drivers/storage/ide/uniata/uata_ctl.h diff --git a/reactos/drivers/storage/ide/uniata/uniata.rbuild b/drivers/storage/ide/uniata/uniata.rbuild similarity index 100% rename from reactos/drivers/storage/ide/uniata/uniata.rbuild rename to drivers/storage/ide/uniata/uniata.rbuild diff --git a/reactos/drivers/storage/ide/uniata/uniata_ver.h b/drivers/storage/ide/uniata/uniata_ver.h similarity index 100% rename from reactos/drivers/storage/ide/uniata/uniata_ver.h rename to drivers/storage/ide/uniata/uniata_ver.h diff --git a/reactos/drivers/storage/ide/uniata/warningfixes.diff b/drivers/storage/ide/uniata/warningfixes.diff similarity index 100% rename from reactos/drivers/storage/ide/uniata/warningfixes.diff rename to drivers/storage/ide/uniata/warningfixes.diff diff --git a/reactos/drivers/storage/inc/class.h b/drivers/storage/inc/class.h similarity index 100% rename from reactos/drivers/storage/inc/class.h rename to drivers/storage/inc/class.h diff --git a/reactos/drivers/storage/inc/ide.h b/drivers/storage/inc/ide.h similarity index 100% rename from reactos/drivers/storage/inc/ide.h rename to drivers/storage/inc/ide.h diff --git a/reactos/drivers/storage/inc/ideuser.h b/drivers/storage/inc/ideuser.h similarity index 100% rename from reactos/drivers/storage/inc/ideuser.h rename to drivers/storage/inc/ideuser.h diff --git a/reactos/drivers/storage/inc/physlogi.h b/drivers/storage/inc/physlogi.h similarity index 100% rename from reactos/drivers/storage/inc/physlogi.h rename to drivers/storage/inc/physlogi.h diff --git a/reactos/drivers/storage/inc/rbc.h b/drivers/storage/inc/rbc.h similarity index 100% rename from reactos/drivers/storage/inc/rbc.h rename to drivers/storage/inc/rbc.h diff --git a/reactos/drivers/storage/inc/tape.h b/drivers/storage/inc/tape.h similarity index 100% rename from reactos/drivers/storage/inc/tape.h rename to drivers/storage/inc/tape.h diff --git a/reactos/drivers/storage/port/CMakeLists.txt b/drivers/storage/port/CMakeLists.txt similarity index 100% rename from reactos/drivers/storage/port/CMakeLists.txt rename to drivers/storage/port/CMakeLists.txt diff --git a/reactos/drivers/storage/port/buslogic/BT958.bmf b/drivers/storage/port/buslogic/BT958.bmf similarity index 100% rename from reactos/drivers/storage/port/buslogic/BT958.bmf rename to drivers/storage/port/buslogic/BT958.bmf diff --git a/reactos/drivers/storage/port/buslogic/BT958.mof b/drivers/storage/port/buslogic/BT958.mof similarity index 100% rename from reactos/drivers/storage/port/buslogic/BT958.mof rename to drivers/storage/port/buslogic/BT958.mof diff --git a/reactos/drivers/storage/port/buslogic/BT958dt.h b/drivers/storage/port/buslogic/BT958dt.h similarity index 100% rename from reactos/drivers/storage/port/buslogic/BT958dt.h rename to drivers/storage/port/buslogic/BT958dt.h diff --git a/reactos/drivers/storage/port/buslogic/BusLogic958.c b/drivers/storage/port/buslogic/BusLogic958.c similarity index 100% rename from reactos/drivers/storage/port/buslogic/BusLogic958.c rename to drivers/storage/port/buslogic/BusLogic958.c diff --git a/reactos/drivers/storage/port/buslogic/BusLogic958.h b/drivers/storage/port/buslogic/BusLogic958.h similarity index 100% rename from reactos/drivers/storage/port/buslogic/BusLogic958.h rename to drivers/storage/port/buslogic/BusLogic958.h diff --git a/reactos/drivers/storage/port/buslogic/BusLogic958.rc b/drivers/storage/port/buslogic/BusLogic958.rc similarity index 100% rename from reactos/drivers/storage/port/buslogic/BusLogic958.rc rename to drivers/storage/port/buslogic/BusLogic958.rc diff --git a/reactos/drivers/storage/port/buslogic/CMakeLists.txt b/drivers/storage/port/buslogic/CMakeLists.txt similarity index 100% rename from reactos/drivers/storage/port/buslogic/CMakeLists.txt rename to drivers/storage/port/buslogic/CMakeLists.txt diff --git a/reactos/drivers/storage/port/buslogic/Log.c b/drivers/storage/port/buslogic/Log.c similarity index 100% rename from reactos/drivers/storage/port/buslogic/Log.c rename to drivers/storage/port/buslogic/Log.c diff --git a/reactos/drivers/storage/port/buslogic/Log.h b/drivers/storage/port/buslogic/Log.h similarity index 100% rename from reactos/drivers/storage/port/buslogic/Log.h rename to drivers/storage/port/buslogic/Log.h diff --git a/reactos/drivers/storage/port/buslogic/README.ReactOS b/drivers/storage/port/buslogic/README.ReactOS similarity index 100% rename from reactos/drivers/storage/port/buslogic/README.ReactOS rename to drivers/storage/port/buslogic/README.ReactOS diff --git a/reactos/drivers/storage/port/buslogic/buslogic.rbuild b/drivers/storage/port/buslogic/buslogic.rbuild similarity index 100% rename from reactos/drivers/storage/port/buslogic/buslogic.rbuild rename to drivers/storage/port/buslogic/buslogic.rbuild diff --git a/reactos/drivers/storage/port/buslogic/makefile.inc b/drivers/storage/port/buslogic/makefile.inc similarity index 100% rename from reactos/drivers/storage/port/buslogic/makefile.inc rename to drivers/storage/port/buslogic/makefile.inc diff --git a/reactos/drivers/storage/port/buslogic/makefile.original b/drivers/storage/port/buslogic/makefile.original similarity index 100% rename from reactos/drivers/storage/port/buslogic/makefile.original rename to drivers/storage/port/buslogic/makefile.original diff --git a/reactos/drivers/storage/port/buslogic/resource.h b/drivers/storage/port/buslogic/resource.h similarity index 100% rename from reactos/drivers/storage/port/buslogic/resource.h rename to drivers/storage/port/buslogic/resource.h diff --git a/reactos/drivers/storage/port/buslogic/sources b/drivers/storage/port/buslogic/sources similarity index 100% rename from reactos/drivers/storage/port/buslogic/sources rename to drivers/storage/port/buslogic/sources diff --git a/reactos/drivers/storage/port/buslogic/wmi.c b/drivers/storage/port/buslogic/wmi.c similarity index 100% rename from reactos/drivers/storage/port/buslogic/wmi.c rename to drivers/storage/port/buslogic/wmi.c diff --git a/reactos/drivers/storage/port/directory.rbuild b/drivers/storage/port/directory.rbuild similarity index 100% rename from reactos/drivers/storage/port/directory.rbuild rename to drivers/storage/port/directory.rbuild diff --git a/reactos/drivers/storage/scsiport/CMakeLists.txt b/drivers/storage/scsiport/CMakeLists.txt similarity index 100% rename from reactos/drivers/storage/scsiport/CMakeLists.txt rename to drivers/storage/scsiport/CMakeLists.txt diff --git a/reactos/drivers/storage/scsiport/precomp.h b/drivers/storage/scsiport/precomp.h similarity index 100% rename from reactos/drivers/storage/scsiport/precomp.h rename to drivers/storage/scsiport/precomp.h diff --git a/reactos/drivers/storage/scsiport/scsiport.c b/drivers/storage/scsiport/scsiport.c similarity index 100% rename from reactos/drivers/storage/scsiport/scsiport.c rename to drivers/storage/scsiport/scsiport.c diff --git a/reactos/drivers/storage/scsiport/scsiport.pspec b/drivers/storage/scsiport/scsiport.pspec similarity index 100% rename from reactos/drivers/storage/scsiport/scsiport.pspec rename to drivers/storage/scsiport/scsiport.pspec diff --git a/reactos/drivers/storage/scsiport/scsiport.rbuild b/drivers/storage/scsiport/scsiport.rbuild similarity index 100% rename from reactos/drivers/storage/scsiport/scsiport.rbuild rename to drivers/storage/scsiport/scsiport.rbuild diff --git a/reactos/drivers/storage/scsiport/scsiport.rc b/drivers/storage/scsiport/scsiport.rc similarity index 100% rename from reactos/drivers/storage/scsiport/scsiport.rc rename to drivers/storage/scsiport/scsiport.rc diff --git a/reactos/drivers/storage/scsiport/scsiport.spec b/drivers/storage/scsiport/scsiport.spec similarity index 100% rename from reactos/drivers/storage/scsiport/scsiport.spec rename to drivers/storage/scsiport/scsiport.spec diff --git a/reactos/drivers/storage/scsiport/scsiport_int.h b/drivers/storage/scsiport/scsiport_int.h similarity index 100% rename from reactos/drivers/storage/scsiport/scsiport_int.h rename to drivers/storage/scsiport/scsiport_int.h diff --git a/reactos/drivers/storage/scsiport/stubs.c b/drivers/storage/scsiport/stubs.c similarity index 100% rename from reactos/drivers/storage/scsiport/stubs.c rename to drivers/storage/scsiport/stubs.c diff --git a/reactos/drivers/usb/CMakeLists.txt b/drivers/usb/CMakeLists.txt similarity index 100% rename from reactos/drivers/usb/CMakeLists.txt rename to drivers/usb/CMakeLists.txt diff --git a/reactos/drivers/usb/directory.rbuild b/drivers/usb/directory.rbuild similarity index 100% rename from reactos/drivers/usb/directory.rbuild rename to drivers/usb/directory.rbuild diff --git a/reactos/drivers/usb/nt4compat/CMakeLists.txt b/drivers/usb/nt4compat/CMakeLists.txt similarity index 100% rename from reactos/drivers/usb/nt4compat/CMakeLists.txt rename to drivers/usb/nt4compat/CMakeLists.txt diff --git a/reactos/drivers/usb/nt4compat/directory.rbuild b/drivers/usb/nt4compat/directory.rbuild similarity index 100% rename from reactos/drivers/usb/nt4compat/directory.rbuild rename to drivers/usb/nt4compat/directory.rbuild diff --git a/reactos/drivers/usb/nt4compat/usbdrv/CMakeLists.txt b/drivers/usb/nt4compat/usbdrv/CMakeLists.txt similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/CMakeLists.txt rename to drivers/usb/nt4compat/usbdrv/CMakeLists.txt diff --git a/reactos/drivers/usb/nt4compat/usbdrv/bulkonly.c b/drivers/usb/nt4compat/usbdrv/bulkonly.c similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/bulkonly.c rename to drivers/usb/nt4compat/usbdrv/bulkonly.c diff --git a/reactos/drivers/usb/nt4compat/usbdrv/cbi.c b/drivers/usb/nt4compat/usbdrv/cbi.c similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/cbi.c rename to drivers/usb/nt4compat/usbdrv/cbi.c diff --git a/reactos/drivers/usb/nt4compat/usbdrv/compdrv.c b/drivers/usb/nt4compat/usbdrv/compdrv.c similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/compdrv.c rename to drivers/usb/nt4compat/usbdrv/compdrv.c diff --git a/reactos/drivers/usb/nt4compat/usbdrv/debug.h b/drivers/usb/nt4compat/usbdrv/debug.h similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/debug.h rename to drivers/usb/nt4compat/usbdrv/debug.h diff --git a/reactos/drivers/usb/nt4compat/usbdrv/devmgr.c b/drivers/usb/nt4compat/usbdrv/devmgr.c similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/devmgr.c rename to drivers/usb/nt4compat/usbdrv/devmgr.c diff --git a/reactos/drivers/usb/nt4compat/usbdrv/devmgr.h b/drivers/usb/nt4compat/usbdrv/devmgr.h similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/devmgr.h rename to drivers/usb/nt4compat/usbdrv/devmgr.h diff --git a/reactos/drivers/usb/nt4compat/usbdrv/dmgrdisp.c b/drivers/usb/nt4compat/usbdrv/dmgrdisp.c similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/dmgrdisp.c rename to drivers/usb/nt4compat/usbdrv/dmgrdisp.c diff --git a/reactos/drivers/usb/nt4compat/usbdrv/ehci.c b/drivers/usb/nt4compat/usbdrv/ehci.c similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/ehci.c rename to drivers/usb/nt4compat/usbdrv/ehci.c diff --git a/reactos/drivers/usb/nt4compat/usbdrv/ehci.h b/drivers/usb/nt4compat/usbdrv/ehci.h similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/ehci.h rename to drivers/usb/nt4compat/usbdrv/ehci.h diff --git a/reactos/drivers/usb/nt4compat/usbdrv/etd.c b/drivers/usb/nt4compat/usbdrv/etd.c similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/etd.c rename to drivers/usb/nt4compat/usbdrv/etd.c diff --git a/reactos/drivers/usb/nt4compat/usbdrv/events.h b/drivers/usb/nt4compat/usbdrv/events.h similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/events.h rename to drivers/usb/nt4compat/usbdrv/events.h diff --git a/reactos/drivers/usb/nt4compat/usbdrv/gendrv.c b/drivers/usb/nt4compat/usbdrv/gendrv.c similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/gendrv.c rename to drivers/usb/nt4compat/usbdrv/gendrv.c diff --git a/reactos/drivers/usb/nt4compat/usbdrv/gendrv.h b/drivers/usb/nt4compat/usbdrv/gendrv.h similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/gendrv.h rename to drivers/usb/nt4compat/usbdrv/gendrv.h diff --git a/reactos/drivers/usb/nt4compat/usbdrv/hcd.h b/drivers/usb/nt4compat/usbdrv/hcd.h similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/hcd.h rename to drivers/usb/nt4compat/usbdrv/hcd.h diff --git a/reactos/drivers/usb/nt4compat/usbdrv/hub.c b/drivers/usb/nt4compat/usbdrv/hub.c similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/hub.c rename to drivers/usb/nt4compat/usbdrv/hub.c diff --git a/reactos/drivers/usb/nt4compat/usbdrv/hub.h b/drivers/usb/nt4compat/usbdrv/hub.h similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/hub.h rename to drivers/usb/nt4compat/usbdrv/hub.h diff --git a/reactos/drivers/usb/nt4compat/usbdrv/irplist.h b/drivers/usb/nt4compat/usbdrv/irplist.h similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/irplist.h rename to drivers/usb/nt4compat/usbdrv/irplist.h diff --git a/reactos/drivers/usb/nt4compat/usbdrv/keyboard.c b/drivers/usb/nt4compat/usbdrv/keyboard.c similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/keyboard.c rename to drivers/usb/nt4compat/usbdrv/keyboard.c diff --git a/reactos/drivers/usb/nt4compat/usbdrv/keyboard.h b/drivers/usb/nt4compat/usbdrv/keyboard.h similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/keyboard.h rename to drivers/usb/nt4compat/usbdrv/keyboard.h diff --git a/reactos/drivers/usb/nt4compat/usbdrv/mouse.c b/drivers/usb/nt4compat/usbdrv/mouse.c similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/mouse.c rename to drivers/usb/nt4compat/usbdrv/mouse.c diff --git a/reactos/drivers/usb/nt4compat/usbdrv/mouse.h b/drivers/usb/nt4compat/usbdrv/mouse.h similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/mouse.h rename to drivers/usb/nt4compat/usbdrv/mouse.h diff --git a/reactos/drivers/usb/nt4compat/usbdrv/ohci.c b/drivers/usb/nt4compat/usbdrv/ohci.c similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/ohci.c rename to drivers/usb/nt4compat/usbdrv/ohci.c diff --git a/reactos/drivers/usb/nt4compat/usbdrv/ohci.h b/drivers/usb/nt4compat/usbdrv/ohci.h similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/ohci.h rename to drivers/usb/nt4compat/usbdrv/ohci.h diff --git a/reactos/drivers/usb/nt4compat/usbdrv/roothub.c b/drivers/usb/nt4compat/usbdrv/roothub.c similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/roothub.c rename to drivers/usb/nt4compat/usbdrv/roothub.c diff --git a/reactos/drivers/usb/nt4compat/usbdrv/td.c b/drivers/usb/nt4compat/usbdrv/td.c similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/td.c rename to drivers/usb/nt4compat/usbdrv/td.c diff --git a/reactos/drivers/usb/nt4compat/usbdrv/td.h b/drivers/usb/nt4compat/usbdrv/td.h similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/td.h rename to drivers/usb/nt4compat/usbdrv/td.h diff --git a/reactos/drivers/usb/nt4compat/usbdrv/uhci.c b/drivers/usb/nt4compat/usbdrv/uhci.c similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/uhci.c rename to drivers/usb/nt4compat/usbdrv/uhci.c diff --git a/reactos/drivers/usb/nt4compat/usbdrv/uhciver.h b/drivers/usb/nt4compat/usbdrv/uhciver.h similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/uhciver.h rename to drivers/usb/nt4compat/usbdrv/uhciver.h diff --git a/reactos/drivers/usb/nt4compat/usbdrv/umss.c b/drivers/usb/nt4compat/usbdrv/umss.c similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/umss.c rename to drivers/usb/nt4compat/usbdrv/umss.c diff --git a/reactos/drivers/usb/nt4compat/usbdrv/umss.h b/drivers/usb/nt4compat/usbdrv/umss.h similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/umss.h rename to drivers/usb/nt4compat/usbdrv/umss.h diff --git a/reactos/drivers/usb/nt4compat/usbdrv/usb.c b/drivers/usb/nt4compat/usbdrv/usb.c similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/usb.c rename to drivers/usb/nt4compat/usbdrv/usb.c diff --git a/reactos/drivers/usb/nt4compat/usbdrv/usb.h b/drivers/usb/nt4compat/usbdrv/usb.h similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/usb.h rename to drivers/usb/nt4compat/usbdrv/usb.h diff --git a/reactos/drivers/usb/nt4compat/usbdrv/usbdriver.h b/drivers/usb/nt4compat/usbdrv/usbdriver.h similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/usbdriver.h rename to drivers/usb/nt4compat/usbdrv/usbdriver.h diff --git a/reactos/drivers/usb/nt4compat/usbdrv/usbdriver.rc b/drivers/usb/nt4compat/usbdrv/usbdriver.rc similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/usbdriver.rc rename to drivers/usb/nt4compat/usbdrv/usbdriver.rc diff --git a/reactos/drivers/usb/nt4compat/usbdrv/usbdrv.rbuild b/drivers/usb/nt4compat/usbdrv/usbdrv.rbuild similarity index 100% rename from reactos/drivers/usb/nt4compat/usbdrv/usbdrv.rbuild rename to drivers/usb/nt4compat/usbdrv/usbdrv.rbuild diff --git a/reactos/drivers/usb/usbd/CMakeLists.txt b/drivers/usb/usbd/CMakeLists.txt similarity index 100% rename from reactos/drivers/usb/usbd/CMakeLists.txt rename to drivers/usb/usbd/CMakeLists.txt diff --git a/reactos/drivers/usb/usbd/test.c b/drivers/usb/usbd/test.c similarity index 100% rename from reactos/drivers/usb/usbd/test.c rename to drivers/usb/usbd/test.c diff --git a/reactos/drivers/usb/usbd/usbd.c b/drivers/usb/usbd/usbd.c similarity index 100% rename from reactos/drivers/usb/usbd/usbd.c rename to drivers/usb/usbd/usbd.c diff --git a/reactos/drivers/usb/usbd/usbd.rbuild b/drivers/usb/usbd/usbd.rbuild similarity index 100% rename from reactos/drivers/usb/usbd/usbd.rbuild rename to drivers/usb/usbd/usbd.rbuild diff --git a/reactos/drivers/usb/usbd/usbd.rc b/drivers/usb/usbd/usbd.rc similarity index 100% rename from reactos/drivers/usb/usbd/usbd.rc rename to drivers/usb/usbd/usbd.rc diff --git a/reactos/drivers/usb/usbd/usbd.spec b/drivers/usb/usbd/usbd.spec similarity index 100% rename from reactos/drivers/usb/usbd/usbd.spec rename to drivers/usb/usbd/usbd.spec diff --git a/reactos/drivers/usb/usbehci/CMakeLists.txt b/drivers/usb/usbehci/CMakeLists.txt similarity index 100% rename from reactos/drivers/usb/usbehci/CMakeLists.txt rename to drivers/usb/usbehci/CMakeLists.txt diff --git a/reactos/drivers/usb/usbehci/common.c b/drivers/usb/usbehci/common.c similarity index 100% rename from reactos/drivers/usb/usbehci/common.c rename to drivers/usb/usbehci/common.c diff --git a/reactos/drivers/usb/usbehci/fdo.c b/drivers/usb/usbehci/fdo.c similarity index 100% rename from reactos/drivers/usb/usbehci/fdo.c rename to drivers/usb/usbehci/fdo.c diff --git a/reactos/drivers/usb/usbehci/hardware.c b/drivers/usb/usbehci/hardware.c similarity index 100% rename from reactos/drivers/usb/usbehci/hardware.c rename to drivers/usb/usbehci/hardware.c diff --git a/reactos/drivers/usb/usbehci/hardware.h b/drivers/usb/usbehci/hardware.h similarity index 100% rename from reactos/drivers/usb/usbehci/hardware.h rename to drivers/usb/usbehci/hardware.h diff --git a/reactos/drivers/usb/usbehci/hwiface.c b/drivers/usb/usbehci/hwiface.c similarity index 100% rename from reactos/drivers/usb/usbehci/hwiface.c rename to drivers/usb/usbehci/hwiface.c diff --git a/reactos/drivers/usb/usbehci/hwiface.h b/drivers/usb/usbehci/hwiface.h similarity index 100% rename from reactos/drivers/usb/usbehci/hwiface.h rename to drivers/usb/usbehci/hwiface.h diff --git a/reactos/drivers/usb/usbehci/irp.c b/drivers/usb/usbehci/irp.c similarity index 100% rename from reactos/drivers/usb/usbehci/irp.c rename to drivers/usb/usbehci/irp.c diff --git a/reactos/drivers/usb/usbehci/misc.c b/drivers/usb/usbehci/misc.c similarity index 100% rename from reactos/drivers/usb/usbehci/misc.c rename to drivers/usb/usbehci/misc.c diff --git a/reactos/drivers/usb/usbehci/pdo.c b/drivers/usb/usbehci/pdo.c similarity index 100% rename from reactos/drivers/usb/usbehci/pdo.c rename to drivers/usb/usbehci/pdo.c diff --git a/reactos/drivers/usb/usbehci/physmem.c b/drivers/usb/usbehci/physmem.c similarity index 100% rename from reactos/drivers/usb/usbehci/physmem.c rename to drivers/usb/usbehci/physmem.c diff --git a/reactos/drivers/usb/usbehci/physmem.h b/drivers/usb/usbehci/physmem.h similarity index 100% rename from reactos/drivers/usb/usbehci/physmem.h rename to drivers/usb/usbehci/physmem.h diff --git a/reactos/drivers/usb/usbehci/transfer.c b/drivers/usb/usbehci/transfer.c similarity index 100% rename from reactos/drivers/usb/usbehci/transfer.c rename to drivers/usb/usbehci/transfer.c diff --git a/reactos/drivers/usb/usbehci/transfer.h b/drivers/usb/usbehci/transfer.h similarity index 100% rename from reactos/drivers/usb/usbehci/transfer.h rename to drivers/usb/usbehci/transfer.h diff --git a/reactos/drivers/usb/usbehci/usbehci.c b/drivers/usb/usbehci/usbehci.c similarity index 100% rename from reactos/drivers/usb/usbehci/usbehci.c rename to drivers/usb/usbehci/usbehci.c diff --git a/reactos/drivers/usb/usbehci/usbehci.h b/drivers/usb/usbehci/usbehci.h similarity index 100% rename from reactos/drivers/usb/usbehci/usbehci.h rename to drivers/usb/usbehci/usbehci.h diff --git a/reactos/drivers/usb/usbehci/usbehci.rbuild b/drivers/usb/usbehci/usbehci.rbuild similarity index 100% rename from reactos/drivers/usb/usbehci/usbehci.rbuild rename to drivers/usb/usbehci/usbehci.rbuild diff --git a/reactos/drivers/usb/usbehci/usbehci.rc b/drivers/usb/usbehci/usbehci.rc similarity index 100% rename from reactos/drivers/usb/usbehci/usbehci.rc rename to drivers/usb/usbehci/usbehci.rc diff --git a/reactos/drivers/usb/usbehci/usbiffn.c b/drivers/usb/usbehci/usbiffn.c similarity index 100% rename from reactos/drivers/usb/usbehci/usbiffn.c rename to drivers/usb/usbehci/usbiffn.c diff --git a/reactos/drivers/usb/usbehci/usbiffn.h b/drivers/usb/usbehci/usbiffn.h similarity index 100% rename from reactos/drivers/usb/usbehci/usbiffn.h rename to drivers/usb/usbehci/usbiffn.h diff --git a/reactos/drivers/usb/usbhub/CMakeLists.txt b/drivers/usb/usbhub/CMakeLists.txt similarity index 100% rename from reactos/drivers/usb/usbhub/CMakeLists.txt rename to drivers/usb/usbhub/CMakeLists.txt diff --git a/reactos/drivers/usb/usbhub/createclose.c b/drivers/usb/usbhub/createclose.c similarity index 100% rename from reactos/drivers/usb/usbhub/createclose.c rename to drivers/usb/usbhub/createclose.c diff --git a/reactos/drivers/usb/usbhub/fdo.c b/drivers/usb/usbhub/fdo.c similarity index 100% rename from reactos/drivers/usb/usbhub/fdo.c rename to drivers/usb/usbhub/fdo.c diff --git a/reactos/drivers/usb/usbhub/misc.c b/drivers/usb/usbhub/misc.c similarity index 100% rename from reactos/drivers/usb/usbhub/misc.c rename to drivers/usb/usbhub/misc.c diff --git a/reactos/drivers/usb/usbhub/pdo.c b/drivers/usb/usbhub/pdo.c similarity index 100% rename from reactos/drivers/usb/usbhub/pdo.c rename to drivers/usb/usbhub/pdo.c diff --git a/reactos/drivers/usb/usbhub/usbhub.c b/drivers/usb/usbhub/usbhub.c similarity index 100% rename from reactos/drivers/usb/usbhub/usbhub.c rename to drivers/usb/usbhub/usbhub.c diff --git a/reactos/drivers/usb/usbhub/usbhub.h b/drivers/usb/usbhub/usbhub.h similarity index 100% rename from reactos/drivers/usb/usbhub/usbhub.h rename to drivers/usb/usbhub/usbhub.h diff --git a/reactos/drivers/usb/usbhub/usbhub.rbuild b/drivers/usb/usbhub/usbhub.rbuild similarity index 100% rename from reactos/drivers/usb/usbhub/usbhub.rbuild rename to drivers/usb/usbhub/usbhub.rbuild diff --git a/reactos/drivers/usb/usbhub/usbhub.rc b/drivers/usb/usbhub/usbhub.rc similarity index 100% rename from reactos/drivers/usb/usbhub/usbhub.rc rename to drivers/usb/usbhub/usbhub.rc diff --git a/reactos/drivers/usb/usbstor/CMakeLists.txt b/drivers/usb/usbstor/CMakeLists.txt similarity index 100% rename from reactos/drivers/usb/usbstor/CMakeLists.txt rename to drivers/usb/usbstor/CMakeLists.txt diff --git a/reactos/drivers/usb/usbstor/usbstor.c b/drivers/usb/usbstor/usbstor.c similarity index 100% rename from reactos/drivers/usb/usbstor/usbstor.c rename to drivers/usb/usbstor/usbstor.c diff --git a/reactos/drivers/usb/usbstor/usbstor.h b/drivers/usb/usbstor/usbstor.h similarity index 100% rename from reactos/drivers/usb/usbstor/usbstor.h rename to drivers/usb/usbstor/usbstor.h diff --git a/reactos/drivers/usb/usbstor/usbstor.rbuild b/drivers/usb/usbstor/usbstor.rbuild similarity index 100% rename from reactos/drivers/usb/usbstor/usbstor.rbuild rename to drivers/usb/usbstor/usbstor.rbuild diff --git a/reactos/drivers/usb/usbstor/usbstor.rc b/drivers/usb/usbstor/usbstor.rc similarity index 100% rename from reactos/drivers/usb/usbstor/usbstor.rc rename to drivers/usb/usbstor/usbstor.rc diff --git a/reactos/drivers/video/CMakeLists.txt b/drivers/video/CMakeLists.txt similarity index 100% rename from reactos/drivers/video/CMakeLists.txt rename to drivers/video/CMakeLists.txt diff --git a/reactos/drivers/video/directory.rbuild b/drivers/video/directory.rbuild similarity index 100% rename from reactos/drivers/video/directory.rbuild rename to drivers/video/directory.rbuild diff --git a/reactos/drivers/video/displays/CMakeLists.txt b/drivers/video/displays/CMakeLists.txt similarity index 100% rename from reactos/drivers/video/displays/CMakeLists.txt rename to drivers/video/displays/CMakeLists.txt diff --git a/reactos/drivers/video/displays/directory.rbuild b/drivers/video/displays/directory.rbuild similarity index 100% rename from reactos/drivers/video/displays/directory.rbuild rename to drivers/video/displays/directory.rbuild diff --git a/reactos/drivers/video/displays/framebuf/CMakeLists.txt b/drivers/video/displays/framebuf/CMakeLists.txt similarity index 100% rename from reactos/drivers/video/displays/framebuf/CMakeLists.txt rename to drivers/video/displays/framebuf/CMakeLists.txt diff --git a/reactos/drivers/video/displays/framebuf/dd.c b/drivers/video/displays/framebuf/dd.c similarity index 100% rename from reactos/drivers/video/displays/framebuf/dd.c rename to drivers/video/displays/framebuf/dd.c diff --git a/reactos/drivers/video/displays/framebuf/ddenable.c b/drivers/video/displays/framebuf/ddenable.c similarity index 100% rename from reactos/drivers/video/displays/framebuf/ddenable.c rename to drivers/video/displays/framebuf/ddenable.c diff --git a/reactos/drivers/video/displays/framebuf/enable.c b/drivers/video/displays/framebuf/enable.c similarity index 100% rename from reactos/drivers/video/displays/framebuf/enable.c rename to drivers/video/displays/framebuf/enable.c diff --git a/reactos/drivers/video/displays/framebuf/framebuf.h b/drivers/video/displays/framebuf/framebuf.h similarity index 100% rename from reactos/drivers/video/displays/framebuf/framebuf.h rename to drivers/video/displays/framebuf/framebuf.h diff --git a/reactos/drivers/video/displays/framebuf/framebuf.rbuild b/drivers/video/displays/framebuf/framebuf.rbuild similarity index 100% rename from reactos/drivers/video/displays/framebuf/framebuf.rbuild rename to drivers/video/displays/framebuf/framebuf.rbuild diff --git a/reactos/drivers/video/displays/framebuf/framebuf.rc b/drivers/video/displays/framebuf/framebuf.rc similarity index 100% rename from reactos/drivers/video/displays/framebuf/framebuf.rc rename to drivers/video/displays/framebuf/framebuf.rc diff --git a/reactos/drivers/video/displays/framebuf/framebuf.spec b/drivers/video/displays/framebuf/framebuf.spec similarity index 100% rename from reactos/drivers/video/displays/framebuf/framebuf.spec rename to drivers/video/displays/framebuf/framebuf.spec diff --git a/reactos/drivers/video/displays/framebuf/palette.c b/drivers/video/displays/framebuf/palette.c similarity index 100% rename from reactos/drivers/video/displays/framebuf/palette.c rename to drivers/video/displays/framebuf/palette.c diff --git a/reactos/drivers/video/displays/framebuf/pointer.c b/drivers/video/displays/framebuf/pointer.c similarity index 100% rename from reactos/drivers/video/displays/framebuf/pointer.c rename to drivers/video/displays/framebuf/pointer.c diff --git a/reactos/drivers/video/displays/framebuf/screen.c b/drivers/video/displays/framebuf/screen.c similarity index 100% rename from reactos/drivers/video/displays/framebuf/screen.c rename to drivers/video/displays/framebuf/screen.c diff --git a/reactos/drivers/video/displays/framebuf/surface.c b/drivers/video/displays/framebuf/surface.c similarity index 100% rename from reactos/drivers/video/displays/framebuf/surface.c rename to drivers/video/displays/framebuf/surface.c diff --git a/reactos/drivers/video/displays/framebuf_new/CMakeLists.txt b/drivers/video/displays/framebuf_new/CMakeLists.txt similarity index 100% rename from reactos/drivers/video/displays/framebuf_new/CMakeLists.txt rename to drivers/video/displays/framebuf_new/CMakeLists.txt diff --git a/reactos/drivers/video/displays/framebuf_new/debug.c b/drivers/video/displays/framebuf_new/debug.c similarity index 100% rename from reactos/drivers/video/displays/framebuf_new/debug.c rename to drivers/video/displays/framebuf_new/debug.c diff --git a/reactos/drivers/video/displays/framebuf_new/debug.h b/drivers/video/displays/framebuf_new/debug.h similarity index 100% rename from reactos/drivers/video/displays/framebuf_new/debug.h rename to drivers/video/displays/framebuf_new/debug.h diff --git a/reactos/drivers/video/displays/framebuf_new/driver.h b/drivers/video/displays/framebuf_new/driver.h similarity index 100% rename from reactos/drivers/video/displays/framebuf_new/driver.h rename to drivers/video/displays/framebuf_new/driver.h diff --git a/reactos/drivers/video/displays/framebuf_new/enable.c b/drivers/video/displays/framebuf_new/enable.c similarity index 100% rename from reactos/drivers/video/displays/framebuf_new/enable.c rename to drivers/video/displays/framebuf_new/enable.c diff --git a/reactos/drivers/video/displays/framebuf_new/framebuf_new.rbuild b/drivers/video/displays/framebuf_new/framebuf_new.rbuild similarity index 100% rename from reactos/drivers/video/displays/framebuf_new/framebuf_new.rbuild rename to drivers/video/displays/framebuf_new/framebuf_new.rbuild diff --git a/reactos/drivers/video/displays/framebuf_new/framebuf_new.rc b/drivers/video/displays/framebuf_new/framebuf_new.rc similarity index 100% rename from reactos/drivers/video/displays/framebuf_new/framebuf_new.rc rename to drivers/video/displays/framebuf_new/framebuf_new.rc diff --git a/reactos/drivers/video/displays/framebuf_new/framebuf_new.spec b/drivers/video/displays/framebuf_new/framebuf_new.spec similarity index 100% rename from reactos/drivers/video/displays/framebuf_new/framebuf_new.spec rename to drivers/video/displays/framebuf_new/framebuf_new.spec diff --git a/reactos/drivers/video/displays/framebuf_new/palette.c b/drivers/video/displays/framebuf_new/palette.c similarity index 100% rename from reactos/drivers/video/displays/framebuf_new/palette.c rename to drivers/video/displays/framebuf_new/palette.c diff --git a/reactos/drivers/video/displays/framebuf_new/pointer.c b/drivers/video/displays/framebuf_new/pointer.c similarity index 100% rename from reactos/drivers/video/displays/framebuf_new/pointer.c rename to drivers/video/displays/framebuf_new/pointer.c diff --git a/reactos/drivers/video/displays/framebuf_new/screen.c b/drivers/video/displays/framebuf_new/screen.c similarity index 100% rename from reactos/drivers/video/displays/framebuf_new/screen.c rename to drivers/video/displays/framebuf_new/screen.c diff --git a/reactos/drivers/video/displays/framebufacc/dd.c b/drivers/video/displays/framebufacc/dd.c similarity index 100% rename from reactos/drivers/video/displays/framebufacc/dd.c rename to drivers/video/displays/framebufacc/dd.c diff --git a/reactos/drivers/video/displays/framebufacc/ddenable.c b/drivers/video/displays/framebufacc/ddenable.c similarity index 100% rename from reactos/drivers/video/displays/framebufacc/ddenable.c rename to drivers/video/displays/framebufacc/ddenable.c diff --git a/reactos/drivers/video/displays/framebufacc/enable.c b/drivers/video/displays/framebufacc/enable.c similarity index 100% rename from reactos/drivers/video/displays/framebufacc/enable.c rename to drivers/video/displays/framebufacc/enable.c diff --git a/reactos/drivers/video/displays/framebufacc/framebufacc.h b/drivers/video/displays/framebufacc/framebufacc.h similarity index 100% rename from reactos/drivers/video/displays/framebufacc/framebufacc.h rename to drivers/video/displays/framebufacc/framebufacc.h diff --git a/reactos/drivers/video/displays/framebufacc/framebufacc.rbuild b/drivers/video/displays/framebufacc/framebufacc.rbuild similarity index 100% rename from reactos/drivers/video/displays/framebufacc/framebufacc.rbuild rename to drivers/video/displays/framebufacc/framebufacc.rbuild diff --git a/reactos/drivers/video/displays/framebufacc/framebufacc.rc b/drivers/video/displays/framebufacc/framebufacc.rc similarity index 100% rename from reactos/drivers/video/displays/framebufacc/framebufacc.rc rename to drivers/video/displays/framebufacc/framebufacc.rc diff --git a/reactos/drivers/video/displays/framebufacc/framebufacc.spec b/drivers/video/displays/framebufacc/framebufacc.spec similarity index 100% rename from reactos/drivers/video/displays/framebufacc/framebufacc.spec rename to drivers/video/displays/framebufacc/framebufacc.spec diff --git a/reactos/drivers/video/displays/framebufacc/palette.c b/drivers/video/displays/framebufacc/palette.c similarity index 100% rename from reactos/drivers/video/displays/framebufacc/palette.c rename to drivers/video/displays/framebufacc/palette.c diff --git a/reactos/drivers/video/displays/framebufacc/pointer.c b/drivers/video/displays/framebufacc/pointer.c similarity index 100% rename from reactos/drivers/video/displays/framebufacc/pointer.c rename to drivers/video/displays/framebufacc/pointer.c diff --git a/reactos/drivers/video/displays/framebufacc/screen.c b/drivers/video/displays/framebufacc/screen.c similarity index 100% rename from reactos/drivers/video/displays/framebufacc/screen.c rename to drivers/video/displays/framebufacc/screen.c diff --git a/reactos/drivers/video/displays/framebufacc/surface.c b/drivers/video/displays/framebufacc/surface.c similarity index 100% rename from reactos/drivers/video/displays/framebufacc/surface.c rename to drivers/video/displays/framebufacc/surface.c diff --git a/reactos/drivers/video/displays/vga/CMakeLists.txt b/drivers/video/displays/vga/CMakeLists.txt similarity index 100% rename from reactos/drivers/video/displays/vga/CMakeLists.txt rename to drivers/video/displays/vga/CMakeLists.txt diff --git a/reactos/drivers/video/displays/vga/main/enable.c b/drivers/video/displays/vga/main/enable.c similarity index 100% rename from reactos/drivers/video/displays/vga/main/enable.c rename to drivers/video/displays/vga/main/enable.c diff --git a/reactos/drivers/video/displays/vga/objects/bitblt.c b/drivers/video/displays/vga/objects/bitblt.c similarity index 100% rename from reactos/drivers/video/displays/vga/objects/bitblt.c rename to drivers/video/displays/vga/objects/bitblt.c diff --git a/reactos/drivers/video/displays/vga/objects/bitblt.h b/drivers/video/displays/vga/objects/bitblt.h similarity index 100% rename from reactos/drivers/video/displays/vga/objects/bitblt.h rename to drivers/video/displays/vga/objects/bitblt.h diff --git a/reactos/drivers/video/displays/vga/objects/brush.h b/drivers/video/displays/vga/objects/brush.h similarity index 100% rename from reactos/drivers/video/displays/vga/objects/brush.h rename to drivers/video/displays/vga/objects/brush.h diff --git a/reactos/drivers/video/displays/vga/objects/copybits.c b/drivers/video/displays/vga/objects/copybits.c similarity index 100% rename from reactos/drivers/video/displays/vga/objects/copybits.c rename to drivers/video/displays/vga/objects/copybits.c diff --git a/reactos/drivers/video/displays/vga/objects/lineto.c b/drivers/video/displays/vga/objects/lineto.c similarity index 100% rename from reactos/drivers/video/displays/vga/objects/lineto.c rename to drivers/video/displays/vga/objects/lineto.c diff --git a/reactos/drivers/video/displays/vga/objects/offscreen.c b/drivers/video/displays/vga/objects/offscreen.c similarity index 100% rename from reactos/drivers/video/displays/vga/objects/offscreen.c rename to drivers/video/displays/vga/objects/offscreen.c diff --git a/reactos/drivers/video/displays/vga/objects/paint.c b/drivers/video/displays/vga/objects/paint.c similarity index 100% rename from reactos/drivers/video/displays/vga/objects/paint.c rename to drivers/video/displays/vga/objects/paint.c diff --git a/reactos/drivers/video/displays/vga/objects/pointer.c b/drivers/video/displays/vga/objects/pointer.c similarity index 100% rename from reactos/drivers/video/displays/vga/objects/pointer.c rename to drivers/video/displays/vga/objects/pointer.c diff --git a/reactos/drivers/video/displays/vga/objects/screen.c b/drivers/video/displays/vga/objects/screen.c similarity index 100% rename from reactos/drivers/video/displays/vga/objects/screen.c rename to drivers/video/displays/vga/objects/screen.c diff --git a/reactos/drivers/video/displays/vga/objects/transblt.c b/drivers/video/displays/vga/objects/transblt.c similarity index 100% rename from reactos/drivers/video/displays/vga/objects/transblt.c rename to drivers/video/displays/vga/objects/transblt.c diff --git a/reactos/drivers/video/displays/vga/vgaddi.h b/drivers/video/displays/vga/vgaddi.h similarity index 100% rename from reactos/drivers/video/displays/vga/vgaddi.h rename to drivers/video/displays/vga/vgaddi.h diff --git a/reactos/drivers/video/displays/vga/vgaddi.rbuild b/drivers/video/displays/vga/vgaddi.rbuild similarity index 100% rename from reactos/drivers/video/displays/vga/vgaddi.rbuild rename to drivers/video/displays/vga/vgaddi.rbuild diff --git a/reactos/drivers/video/displays/vga/vgaddi.rc b/drivers/video/displays/vga/vgaddi.rc similarity index 100% rename from reactos/drivers/video/displays/vga/vgaddi.rc rename to drivers/video/displays/vga/vgaddi.rc diff --git a/reactos/drivers/video/displays/vga/vgaddi.spec b/drivers/video/displays/vga/vgaddi.spec similarity index 100% rename from reactos/drivers/video/displays/vga/vgaddi.spec rename to drivers/video/displays/vga/vgaddi.spec diff --git a/reactos/drivers/video/displays/vga/vgavideo/vgavideo.c b/drivers/video/displays/vga/vgavideo/vgavideo.c similarity index 100% rename from reactos/drivers/video/displays/vga/vgavideo/vgavideo.c rename to drivers/video/displays/vga/vgavideo/vgavideo.c diff --git a/reactos/drivers/video/displays/vga/vgavideo/vgavideo.h b/drivers/video/displays/vga/vgavideo/vgavideo.h similarity index 100% rename from reactos/drivers/video/displays/vga/vgavideo/vgavideo.h rename to drivers/video/displays/vga/vgavideo/vgavideo.h diff --git a/reactos/drivers/video/displays/vga_new/debug.c b/drivers/video/displays/vga_new/debug.c similarity index 100% rename from reactos/drivers/video/displays/vga_new/debug.c rename to drivers/video/displays/vga_new/debug.c diff --git a/reactos/drivers/video/displays/vga_new/debug.h b/drivers/video/displays/vga_new/debug.h similarity index 100% rename from reactos/drivers/video/displays/vga_new/debug.h rename to drivers/video/displays/vga_new/debug.h diff --git a/reactos/drivers/video/displays/vga_new/driver.h b/drivers/video/displays/vga_new/driver.h similarity index 100% rename from reactos/drivers/video/displays/vga_new/driver.h rename to drivers/video/displays/vga_new/driver.h diff --git a/reactos/drivers/video/displays/vga_new/enable.c b/drivers/video/displays/vga_new/enable.c similarity index 100% rename from reactos/drivers/video/displays/vga_new/enable.c rename to drivers/video/displays/vga_new/enable.c diff --git a/reactos/drivers/video/displays/vga_new/palette.c b/drivers/video/displays/vga_new/palette.c similarity index 100% rename from reactos/drivers/video/displays/vga_new/palette.c rename to drivers/video/displays/vga_new/palette.c diff --git a/reactos/drivers/video/displays/vga_new/screen.c b/drivers/video/displays/vga_new/screen.c similarity index 100% rename from reactos/drivers/video/displays/vga_new/screen.c rename to drivers/video/displays/vga_new/screen.c diff --git a/reactos/drivers/video/displays/vga_new/vga_new.rbuild b/drivers/video/displays/vga_new/vga_new.rbuild similarity index 100% rename from reactos/drivers/video/displays/vga_new/vga_new.rbuild rename to drivers/video/displays/vga_new/vga_new.rbuild diff --git a/reactos/drivers/video/displays/vga_new/vga_new.rc b/drivers/video/displays/vga_new/vga_new.rc similarity index 100% rename from reactos/drivers/video/displays/vga_new/vga_new.rc rename to drivers/video/displays/vga_new/vga_new.rc diff --git a/reactos/drivers/video/displays/vga_new/vga_new.spec b/drivers/video/displays/vga_new/vga_new.spec similarity index 100% rename from reactos/drivers/video/displays/vga_new/vga_new.spec rename to drivers/video/displays/vga_new/vga_new.spec diff --git a/reactos/drivers/video/font/CMakeLists.txt b/drivers/video/font/CMakeLists.txt similarity index 100% rename from reactos/drivers/video/font/CMakeLists.txt rename to drivers/video/font/CMakeLists.txt diff --git a/reactos/drivers/video/font/bmfd/CMakeLists.txt b/drivers/video/font/bmfd/CMakeLists.txt similarity index 100% rename from reactos/drivers/video/font/bmfd/CMakeLists.txt rename to drivers/video/font/bmfd/CMakeLists.txt diff --git a/reactos/drivers/video/font/bmfd/bmfd.h b/drivers/video/font/bmfd/bmfd.h similarity index 100% rename from reactos/drivers/video/font/bmfd/bmfd.h rename to drivers/video/font/bmfd/bmfd.h diff --git a/reactos/drivers/video/font/bmfd/bmfd.rbuild b/drivers/video/font/bmfd/bmfd.rbuild similarity index 100% rename from reactos/drivers/video/font/bmfd/bmfd.rbuild rename to drivers/video/font/bmfd/bmfd.rbuild diff --git a/reactos/drivers/video/font/bmfd/enable.c b/drivers/video/font/bmfd/enable.c similarity index 100% rename from reactos/drivers/video/font/bmfd/enable.c rename to drivers/video/font/bmfd/enable.c diff --git a/reactos/drivers/video/font/bmfd/font.c b/drivers/video/font/bmfd/font.c similarity index 100% rename from reactos/drivers/video/font/bmfd/font.c rename to drivers/video/font/bmfd/font.c diff --git a/reactos/drivers/video/font/bmfd/glyph.c b/drivers/video/font/bmfd/glyph.c similarity index 100% rename from reactos/drivers/video/font/bmfd/glyph.c rename to drivers/video/font/bmfd/glyph.c diff --git a/reactos/drivers/video/font/directory.rbuild b/drivers/video/font/directory.rbuild similarity index 100% rename from reactos/drivers/video/font/directory.rbuild rename to drivers/video/font/directory.rbuild diff --git a/reactos/drivers/video/font/ftfd/CMakeLists.txt b/drivers/video/font/ftfd/CMakeLists.txt similarity index 100% rename from reactos/drivers/video/font/ftfd/CMakeLists.txt rename to drivers/video/font/ftfd/CMakeLists.txt diff --git a/reactos/drivers/video/font/ftfd/enable.c b/drivers/video/font/ftfd/enable.c similarity index 100% rename from reactos/drivers/video/font/ftfd/enable.c rename to drivers/video/font/ftfd/enable.c diff --git a/reactos/drivers/video/font/ftfd/font.c b/drivers/video/font/ftfd/font.c similarity index 100% rename from reactos/drivers/video/font/ftfd/font.c rename to drivers/video/font/ftfd/font.c diff --git a/reactos/drivers/video/font/ftfd/freetype.def b/drivers/video/font/ftfd/freetype.def similarity index 100% rename from reactos/drivers/video/font/ftfd/freetype.def rename to drivers/video/font/ftfd/freetype.def diff --git a/reactos/drivers/video/font/ftfd/freetype.rc b/drivers/video/font/ftfd/freetype.rc similarity index 100% rename from reactos/drivers/video/font/ftfd/freetype.rc rename to drivers/video/font/ftfd/freetype.rc diff --git a/reactos/drivers/video/font/ftfd/ftfd.h b/drivers/video/font/ftfd/ftfd.h similarity index 100% rename from reactos/drivers/video/font/ftfd/ftfd.h rename to drivers/video/font/ftfd/ftfd.h diff --git a/reactos/drivers/video/font/ftfd/ftfd.rbuild b/drivers/video/font/ftfd/ftfd.rbuild similarity index 100% rename from reactos/drivers/video/font/ftfd/ftfd.rbuild rename to drivers/video/font/ftfd/ftfd.rbuild diff --git a/reactos/drivers/video/font/ftfd/ftfd.spec b/drivers/video/font/ftfd/ftfd.spec similarity index 100% rename from reactos/drivers/video/font/ftfd/ftfd.spec rename to drivers/video/font/ftfd/ftfd.spec diff --git a/reactos/drivers/video/font/ftfd/glyph.c b/drivers/video/font/ftfd/glyph.c similarity index 100% rename from reactos/drivers/video/font/ftfd/glyph.c rename to drivers/video/font/ftfd/glyph.c diff --git a/reactos/drivers/video/font/ftfd/rosglue.c b/drivers/video/font/ftfd/rosglue.c similarity index 100% rename from reactos/drivers/video/font/ftfd/rosglue.c rename to drivers/video/font/ftfd/rosglue.c diff --git a/reactos/drivers/video/font/ftfd/sprintf.c b/drivers/video/font/ftfd/sprintf.c similarity index 100% rename from reactos/drivers/video/font/ftfd/sprintf.c rename to drivers/video/font/ftfd/sprintf.c diff --git a/reactos/drivers/video/miniport/CMakeLists.txt b/drivers/video/miniport/CMakeLists.txt similarity index 100% rename from reactos/drivers/video/miniport/CMakeLists.txt rename to drivers/video/miniport/CMakeLists.txt diff --git a/reactos/drivers/video/miniport/directory.rbuild b/drivers/video/miniport/directory.rbuild similarity index 100% rename from reactos/drivers/video/miniport/directory.rbuild rename to drivers/video/miniport/directory.rbuild diff --git a/reactos/drivers/video/miniport/vbe/CMakeLists.txt b/drivers/video/miniport/vbe/CMakeLists.txt similarity index 100% rename from reactos/drivers/video/miniport/vbe/CMakeLists.txt rename to drivers/video/miniport/vbe/CMakeLists.txt diff --git a/reactos/drivers/video/miniport/vbe/edid.c b/drivers/video/miniport/vbe/edid.c similarity index 100% rename from reactos/drivers/video/miniport/vbe/edid.c rename to drivers/video/miniport/vbe/edid.c diff --git a/reactos/drivers/video/miniport/vbe/vbemp.c b/drivers/video/miniport/vbe/vbemp.c similarity index 100% rename from reactos/drivers/video/miniport/vbe/vbemp.c rename to drivers/video/miniport/vbe/vbemp.c diff --git a/reactos/drivers/video/miniport/vbe/vbemp.h b/drivers/video/miniport/vbe/vbemp.h similarity index 100% rename from reactos/drivers/video/miniport/vbe/vbemp.h rename to drivers/video/miniport/vbe/vbemp.h diff --git a/reactos/drivers/video/miniport/vbe/vbemp.rbuild b/drivers/video/miniport/vbe/vbemp.rbuild similarity index 100% rename from reactos/drivers/video/miniport/vbe/vbemp.rbuild rename to drivers/video/miniport/vbe/vbemp.rbuild diff --git a/reactos/drivers/video/miniport/vbe/vbemp.rc b/drivers/video/miniport/vbe/vbemp.rc similarity index 100% rename from reactos/drivers/video/miniport/vbe/vbemp.rc rename to drivers/video/miniport/vbe/vbemp.rc diff --git a/reactos/drivers/video/miniport/vga/CMakeLists.txt b/drivers/video/miniport/vga/CMakeLists.txt similarity index 100% rename from reactos/drivers/video/miniport/vga/CMakeLists.txt rename to drivers/video/miniport/vga/CMakeLists.txt diff --git a/reactos/drivers/video/miniport/vga/initvga.c b/drivers/video/miniport/vga/initvga.c similarity index 100% rename from reactos/drivers/video/miniport/vga/initvga.c rename to drivers/video/miniport/vga/initvga.c diff --git a/reactos/drivers/video/miniport/vga/vgamp.c b/drivers/video/miniport/vga/vgamp.c similarity index 100% rename from reactos/drivers/video/miniport/vga/vgamp.c rename to drivers/video/miniport/vga/vgamp.c diff --git a/reactos/drivers/video/miniport/vga/vgamp.h b/drivers/video/miniport/vga/vgamp.h similarity index 100% rename from reactos/drivers/video/miniport/vga/vgamp.h rename to drivers/video/miniport/vga/vgamp.h diff --git a/reactos/drivers/video/miniport/vga/vgamp.rbuild b/drivers/video/miniport/vga/vgamp.rbuild similarity index 100% rename from reactos/drivers/video/miniport/vga/vgamp.rbuild rename to drivers/video/miniport/vga/vgamp.rbuild diff --git a/reactos/drivers/video/miniport/vga/vgamp.rc b/drivers/video/miniport/vga/vgamp.rc similarity index 100% rename from reactos/drivers/video/miniport/vga/vgamp.rc rename to drivers/video/miniport/vga/vgamp.rc diff --git a/reactos/drivers/video/miniport/vga/vgavideo.h b/drivers/video/miniport/vga/vgavideo.h similarity index 100% rename from reactos/drivers/video/miniport/vga/vgavideo.h rename to drivers/video/miniport/vga/vgavideo.h diff --git a/reactos/drivers/video/miniport/vga_new/CMakeLists.txt b/drivers/video/miniport/vga_new/CMakeLists.txt similarity index 100% rename from reactos/drivers/video/miniport/vga_new/CMakeLists.txt rename to drivers/video/miniport/vga_new/CMakeLists.txt diff --git a/reactos/drivers/video/miniport/vga_new/cmdcnst.h b/drivers/video/miniport/vga_new/cmdcnst.h similarity index 100% rename from reactos/drivers/video/miniport/vga_new/cmdcnst.h rename to drivers/video/miniport/vga_new/cmdcnst.h diff --git a/reactos/drivers/video/miniport/vga_new/modeset.c b/drivers/video/miniport/vga_new/modeset.c similarity index 100% rename from reactos/drivers/video/miniport/vga_new/modeset.c rename to drivers/video/miniport/vga_new/modeset.c diff --git a/reactos/drivers/video/miniport/vga_new/vbe.c b/drivers/video/miniport/vga_new/vbe.c similarity index 100% rename from reactos/drivers/video/miniport/vga_new/vbe.c rename to drivers/video/miniport/vga_new/vbe.c diff --git a/reactos/drivers/video/miniport/vga_new/vbe.h b/drivers/video/miniport/vga_new/vbe.h similarity index 100% rename from reactos/drivers/video/miniport/vga_new/vbe.h rename to drivers/video/miniport/vga_new/vbe.h diff --git a/reactos/drivers/video/miniport/vga_new/vbemodes.c b/drivers/video/miniport/vga_new/vbemodes.c similarity index 100% rename from reactos/drivers/video/miniport/vga_new/vbemodes.c rename to drivers/video/miniport/vga_new/vbemodes.c diff --git a/reactos/drivers/video/miniport/vga_new/vga.c b/drivers/video/miniport/vga_new/vga.c similarity index 100% rename from reactos/drivers/video/miniport/vga_new/vga.c rename to drivers/video/miniport/vga_new/vga.c diff --git a/reactos/drivers/video/miniport/vga_new/vga.h b/drivers/video/miniport/vga_new/vga.h similarity index 100% rename from reactos/drivers/video/miniport/vga_new/vga.h rename to drivers/video/miniport/vga_new/vga.h diff --git a/reactos/drivers/video/miniport/vga_new/vga.rbuild b/drivers/video/miniport/vga_new/vga.rbuild similarity index 100% rename from reactos/drivers/video/miniport/vga_new/vga.rbuild rename to drivers/video/miniport/vga_new/vga.rbuild diff --git a/reactos/drivers/video/miniport/vga_new/vga.rc b/drivers/video/miniport/vga_new/vga.rc similarity index 100% rename from reactos/drivers/video/miniport/vga_new/vga.rc rename to drivers/video/miniport/vga_new/vga.rc diff --git a/reactos/drivers/video/miniport/vga_new/vgadata.c b/drivers/video/miniport/vga_new/vgadata.c similarity index 100% rename from reactos/drivers/video/miniport/vga_new/vgadata.c rename to drivers/video/miniport/vga_new/vgadata.c diff --git a/reactos/drivers/video/miniport/vmx_svga/CMakeLists.txt b/drivers/video/miniport/vmx_svga/CMakeLists.txt similarity index 100% rename from reactos/drivers/video/miniport/vmx_svga/CMakeLists.txt rename to drivers/video/miniport/vmx_svga/CMakeLists.txt diff --git a/reactos/drivers/video/miniport/vmx_svga/precomp.h b/drivers/video/miniport/vmx_svga/precomp.h similarity index 100% rename from reactos/drivers/video/miniport/vmx_svga/precomp.h rename to drivers/video/miniport/vmx_svga/precomp.h diff --git a/reactos/drivers/video/miniport/vmx_svga/vmx_regs.h b/drivers/video/miniport/vmx_svga/vmx_regs.h similarity index 100% rename from reactos/drivers/video/miniport/vmx_svga/vmx_regs.h rename to drivers/video/miniport/vmx_svga/vmx_regs.h diff --git a/reactos/drivers/video/miniport/vmx_svga/vmx_svga.c b/drivers/video/miniport/vmx_svga/vmx_svga.c similarity index 100% rename from reactos/drivers/video/miniport/vmx_svga/vmx_svga.c rename to drivers/video/miniport/vmx_svga/vmx_svga.c diff --git a/reactos/drivers/video/miniport/vmx_svga/vmx_svga.rbuild b/drivers/video/miniport/vmx_svga/vmx_svga.rbuild similarity index 100% rename from reactos/drivers/video/miniport/vmx_svga/vmx_svga.rbuild rename to drivers/video/miniport/vmx_svga/vmx_svga.rbuild diff --git a/reactos/drivers/video/miniport/vmx_svga/vmx_svga.rc b/drivers/video/miniport/vmx_svga/vmx_svga.rc similarity index 100% rename from reactos/drivers/video/miniport/vmx_svga/vmx_svga.rc rename to drivers/video/miniport/vmx_svga/vmx_svga.rc diff --git a/reactos/drivers/video/miniport/xboxvmp/CMakeLists.txt b/drivers/video/miniport/xboxvmp/CMakeLists.txt similarity index 100% rename from reactos/drivers/video/miniport/xboxvmp/CMakeLists.txt rename to drivers/video/miniport/xboxvmp/CMakeLists.txt diff --git a/reactos/drivers/video/miniport/xboxvmp/xboxvmp.c b/drivers/video/miniport/xboxvmp/xboxvmp.c similarity index 100% rename from reactos/drivers/video/miniport/xboxvmp/xboxvmp.c rename to drivers/video/miniport/xboxvmp/xboxvmp.c diff --git a/reactos/drivers/video/miniport/xboxvmp/xboxvmp.h b/drivers/video/miniport/xboxvmp/xboxvmp.h similarity index 100% rename from reactos/drivers/video/miniport/xboxvmp/xboxvmp.h rename to drivers/video/miniport/xboxvmp/xboxvmp.h diff --git a/reactos/drivers/video/miniport/xboxvmp/xboxvmp.rbuild b/drivers/video/miniport/xboxvmp/xboxvmp.rbuild similarity index 100% rename from reactos/drivers/video/miniport/xboxvmp/xboxvmp.rbuild rename to drivers/video/miniport/xboxvmp/xboxvmp.rbuild diff --git a/reactos/drivers/video/miniport/xboxvmp/xboxvmp.rc b/drivers/video/miniport/xboxvmp/xboxvmp.rc similarity index 100% rename from reactos/drivers/video/miniport/xboxvmp/xboxvmp.rc rename to drivers/video/miniport/xboxvmp/xboxvmp.rc diff --git a/reactos/drivers/video/videoprt/CMakeLists.txt b/drivers/video/videoprt/CMakeLists.txt similarity index 100% rename from reactos/drivers/video/videoprt/CMakeLists.txt rename to drivers/video/videoprt/CMakeLists.txt diff --git a/reactos/drivers/video/videoprt/agp.c b/drivers/video/videoprt/agp.c similarity index 100% rename from reactos/drivers/video/videoprt/agp.c rename to drivers/video/videoprt/agp.c diff --git a/reactos/drivers/video/videoprt/ddc.c b/drivers/video/videoprt/ddc.c similarity index 100% rename from reactos/drivers/video/videoprt/ddc.c rename to drivers/video/videoprt/ddc.c diff --git a/reactos/drivers/video/videoprt/dispatch.c b/drivers/video/videoprt/dispatch.c similarity index 100% rename from reactos/drivers/video/videoprt/dispatch.c rename to drivers/video/videoprt/dispatch.c diff --git a/reactos/drivers/video/videoprt/dma.c b/drivers/video/videoprt/dma.c similarity index 100% rename from reactos/drivers/video/videoprt/dma.c rename to drivers/video/videoprt/dma.c diff --git a/reactos/drivers/video/videoprt/event.c b/drivers/video/videoprt/event.c similarity index 100% rename from reactos/drivers/video/videoprt/event.c rename to drivers/video/videoprt/event.c diff --git a/reactos/drivers/video/videoprt/funclist.c b/drivers/video/videoprt/funclist.c similarity index 100% rename from reactos/drivers/video/videoprt/funclist.c rename to drivers/video/videoprt/funclist.c diff --git a/reactos/drivers/video/videoprt/int10.c b/drivers/video/videoprt/int10.c similarity index 100% rename from reactos/drivers/video/videoprt/int10.c rename to drivers/video/videoprt/int10.c diff --git a/reactos/drivers/video/videoprt/interrupt.c b/drivers/video/videoprt/interrupt.c similarity index 100% rename from reactos/drivers/video/videoprt/interrupt.c rename to drivers/video/videoprt/interrupt.c diff --git a/reactos/drivers/video/videoprt/resource.c b/drivers/video/videoprt/resource.c similarity index 100% rename from reactos/drivers/video/videoprt/resource.c rename to drivers/video/videoprt/resource.c diff --git a/reactos/drivers/video/videoprt/services.c b/drivers/video/videoprt/services.c similarity index 100% rename from reactos/drivers/video/videoprt/services.c rename to drivers/video/videoprt/services.c diff --git a/reactos/drivers/video/videoprt/spinlock.c b/drivers/video/videoprt/spinlock.c similarity index 100% rename from reactos/drivers/video/videoprt/spinlock.c rename to drivers/video/videoprt/spinlock.c diff --git a/reactos/drivers/video/videoprt/stubs.c b/drivers/video/videoprt/stubs.c similarity index 100% rename from reactos/drivers/video/videoprt/stubs.c rename to drivers/video/videoprt/stubs.c diff --git a/reactos/drivers/video/videoprt/timer.c b/drivers/video/videoprt/timer.c similarity index 100% rename from reactos/drivers/video/videoprt/timer.c rename to drivers/video/videoprt/timer.c diff --git a/reactos/drivers/video/videoprt/videoprt.c b/drivers/video/videoprt/videoprt.c similarity index 100% rename from reactos/drivers/video/videoprt/videoprt.c rename to drivers/video/videoprt/videoprt.c diff --git a/reactos/drivers/video/videoprt/videoprt.h b/drivers/video/videoprt/videoprt.h similarity index 100% rename from reactos/drivers/video/videoprt/videoprt.h rename to drivers/video/videoprt/videoprt.h diff --git a/reactos/drivers/video/videoprt/videoprt.rbuild b/drivers/video/videoprt/videoprt.rbuild similarity index 100% rename from reactos/drivers/video/videoprt/videoprt.rbuild rename to drivers/video/videoprt/videoprt.rbuild diff --git a/reactos/drivers/video/videoprt/videoprt.rc b/drivers/video/videoprt/videoprt.rc similarity index 100% rename from reactos/drivers/video/videoprt/videoprt.rc rename to drivers/video/videoprt/videoprt.rc diff --git a/reactos/drivers/video/videoprt/videoprt.spec b/drivers/video/videoprt/videoprt.spec similarity index 100% rename from reactos/drivers/video/videoprt/videoprt.spec rename to drivers/video/videoprt/videoprt.spec diff --git a/reactos/drivers/wdm/CMakeLists.txt b/drivers/wdm/CMakeLists.txt similarity index 100% rename from reactos/drivers/wdm/CMakeLists.txt rename to drivers/wdm/CMakeLists.txt diff --git a/reactos/drivers/wdm/audio/CMakeLists.txt b/drivers/wdm/audio/CMakeLists.txt similarity index 100% rename from reactos/drivers/wdm/audio/CMakeLists.txt rename to drivers/wdm/audio/CMakeLists.txt diff --git a/reactos/drivers/wdm/audio/backpln/CMakeLists.txt b/drivers/wdm/audio/backpln/CMakeLists.txt similarity index 100% rename from reactos/drivers/wdm/audio/backpln/CMakeLists.txt rename to drivers/wdm/audio/backpln/CMakeLists.txt diff --git a/reactos/drivers/wdm/audio/backpln/audio_test/CMakeLists.txt b/drivers/wdm/audio/backpln/audio_test/CMakeLists.txt similarity index 100% rename from reactos/drivers/wdm/audio/backpln/audio_test/CMakeLists.txt rename to drivers/wdm/audio/backpln/audio_test/CMakeLists.txt diff --git a/reactos/drivers/wdm/audio/backpln/audio_test/audio_test.c b/drivers/wdm/audio/backpln/audio_test/audio_test.c similarity index 100% rename from reactos/drivers/wdm/audio/backpln/audio_test/audio_test.c rename to drivers/wdm/audio/backpln/audio_test/audio_test.c diff --git a/reactos/drivers/wdm/audio/backpln/audio_test/audio_test.rbuild b/drivers/wdm/audio/backpln/audio_test/audio_test.rbuild similarity index 100% rename from reactos/drivers/wdm/audio/backpln/audio_test/audio_test.rbuild rename to drivers/wdm/audio/backpln/audio_test/audio_test.rbuild diff --git a/reactos/drivers/wdm/audio/backpln/directory.rbuild b/drivers/wdm/audio/backpln/directory.rbuild similarity index 100% rename from reactos/drivers/wdm/audio/backpln/directory.rbuild rename to drivers/wdm/audio/backpln/directory.rbuild diff --git a/reactos/drivers/wdm/audio/backpln/portcls/CMakeLists.txt b/drivers/wdm/audio/backpln/portcls/CMakeLists.txt similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/CMakeLists.txt rename to drivers/wdm/audio/backpln/portcls/CMakeLists.txt diff --git a/reactos/drivers/wdm/audio/backpln/portcls/adapter.cpp b/drivers/wdm/audio/backpln/portcls/adapter.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/adapter.cpp rename to drivers/wdm/audio/backpln/portcls/adapter.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/api.cpp b/drivers/wdm/audio/backpln/portcls/api.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/api.cpp rename to drivers/wdm/audio/backpln/portcls/api.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/connection.cpp b/drivers/wdm/audio/backpln/portcls/connection.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/connection.cpp rename to drivers/wdm/audio/backpln/portcls/connection.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/dispatcher.cpp b/drivers/wdm/audio/backpln/portcls/dispatcher.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/dispatcher.cpp rename to drivers/wdm/audio/backpln/portcls/dispatcher.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/dll.cpp b/drivers/wdm/audio/backpln/portcls/dll.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/dll.cpp rename to drivers/wdm/audio/backpln/portcls/dll.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.cpp b/drivers/wdm/audio/backpln/portcls/dma_slave.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/dma_slave.cpp rename to drivers/wdm/audio/backpln/portcls/dma_slave.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/drm.cpp b/drivers/wdm/audio/backpln/portcls/drm.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/drm.cpp rename to drivers/wdm/audio/backpln/portcls/drm.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/drm_port.cpp b/drivers/wdm/audio/backpln/portcls/drm_port.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/drm_port.cpp rename to drivers/wdm/audio/backpln/portcls/drm_port.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/filter_dmus.cpp b/drivers/wdm/audio/backpln/portcls/filter_dmus.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/filter_dmus.cpp rename to drivers/wdm/audio/backpln/portcls/filter_dmus.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/filter_topology.cpp b/drivers/wdm/audio/backpln/portcls/filter_topology.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/filter_topology.cpp rename to drivers/wdm/audio/backpln/portcls/filter_topology.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/filter_wavecyclic.cpp b/drivers/wdm/audio/backpln/portcls/filter_wavecyclic.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/filter_wavecyclic.cpp rename to drivers/wdm/audio/backpln/portcls/filter_wavecyclic.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/filter_wavepci.cpp b/drivers/wdm/audio/backpln/portcls/filter_wavepci.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/filter_wavepci.cpp rename to drivers/wdm/audio/backpln/portcls/filter_wavepci.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/filter_wavert.cpp b/drivers/wdm/audio/backpln/portcls/filter_wavert.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/filter_wavert.cpp rename to drivers/wdm/audio/backpln/portcls/filter_wavert.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/guids.cpp b/drivers/wdm/audio/backpln/portcls/guids.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/guids.cpp rename to drivers/wdm/audio/backpln/portcls/guids.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/interfaces.hpp b/drivers/wdm/audio/backpln/portcls/interfaces.hpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/interfaces.hpp rename to drivers/wdm/audio/backpln/portcls/interfaces.hpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/interrupt.cpp b/drivers/wdm/audio/backpln/portcls/interrupt.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/interrupt.cpp rename to drivers/wdm/audio/backpln/portcls/interrupt.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/irp.cpp b/drivers/wdm/audio/backpln/portcls/irp.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/irp.cpp rename to drivers/wdm/audio/backpln/portcls/irp.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp b/drivers/wdm/audio/backpln/portcls/irpstream.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp rename to drivers/wdm/audio/backpln/portcls/irpstream.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/miniport.cpp b/drivers/wdm/audio/backpln/portcls/miniport.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/miniport.cpp rename to drivers/wdm/audio/backpln/portcls/miniport.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/miniport_dmus.cpp b/drivers/wdm/audio/backpln/portcls/miniport_dmus.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/miniport_dmus.cpp rename to drivers/wdm/audio/backpln/portcls/miniport_dmus.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/miniport_fmsynth.cpp b/drivers/wdm/audio/backpln/portcls/miniport_fmsynth.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/miniport_fmsynth.cpp rename to drivers/wdm/audio/backpln/portcls/miniport_fmsynth.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/pin_dmus.cpp b/drivers/wdm/audio/backpln/portcls/pin_dmus.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/pin_dmus.cpp rename to drivers/wdm/audio/backpln/portcls/pin_dmus.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp b/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp rename to drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/pin_wavepci.cpp b/drivers/wdm/audio/backpln/portcls/pin_wavepci.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/pin_wavepci.cpp rename to drivers/wdm/audio/backpln/portcls/pin_wavepci.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/pin_wavert.cpp b/drivers/wdm/audio/backpln/portcls/pin_wavert.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/pin_wavert.cpp rename to drivers/wdm/audio/backpln/portcls/pin_wavert.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/pool.cpp b/drivers/wdm/audio/backpln/portcls/pool.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/pool.cpp rename to drivers/wdm/audio/backpln/portcls/pool.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/port.cpp b/drivers/wdm/audio/backpln/portcls/port.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/port.cpp rename to drivers/wdm/audio/backpln/portcls/port.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/port_dmus.cpp b/drivers/wdm/audio/backpln/portcls/port_dmus.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/port_dmus.cpp rename to drivers/wdm/audio/backpln/portcls/port_dmus.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/port_topology.cpp b/drivers/wdm/audio/backpln/portcls/port_topology.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/port_topology.cpp rename to drivers/wdm/audio/backpln/portcls/port_topology.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp b/drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp rename to drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.cpp b/drivers/wdm/audio/backpln/portcls/port_wavepci.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.cpp rename to drivers/wdm/audio/backpln/portcls/port_wavepci.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/port_wavert.cpp b/drivers/wdm/audio/backpln/portcls/port_wavert.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/port_wavert.cpp rename to drivers/wdm/audio/backpln/portcls/port_wavert.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/port_wavertstream.cpp b/drivers/wdm/audio/backpln/portcls/port_wavertstream.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/port_wavertstream.cpp rename to drivers/wdm/audio/backpln/portcls/port_wavertstream.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild b/drivers/wdm/audio/backpln/portcls/portcls.rbuild similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild rename to drivers/wdm/audio/backpln/portcls/portcls.rbuild diff --git a/reactos/drivers/multimedia/portcls.NEW/portcls.rc b/drivers/wdm/audio/backpln/portcls/portcls.rc similarity index 100% rename from reactos/drivers/multimedia/portcls.NEW/portcls.rc rename to drivers/wdm/audio/backpln/portcls/portcls.rc diff --git a/reactos/drivers/wdm/audio/backpln/portcls/portcls.spec b/drivers/wdm/audio/backpln/portcls/portcls.spec similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/portcls.spec rename to drivers/wdm/audio/backpln/portcls/portcls.spec diff --git a/reactos/drivers/wdm/audio/backpln/portcls/power.cpp b/drivers/wdm/audio/backpln/portcls/power.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/power.cpp rename to drivers/wdm/audio/backpln/portcls/power.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/private.hpp b/drivers/wdm/audio/backpln/portcls/private.hpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/private.hpp rename to drivers/wdm/audio/backpln/portcls/private.hpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.cpp b/drivers/wdm/audio/backpln/portcls/propertyhandler.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.cpp rename to drivers/wdm/audio/backpln/portcls/propertyhandler.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/purecall.cpp b/drivers/wdm/audio/backpln/portcls/purecall.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/purecall.cpp rename to drivers/wdm/audio/backpln/portcls/purecall.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/registry.cpp b/drivers/wdm/audio/backpln/portcls/registry.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/registry.cpp rename to drivers/wdm/audio/backpln/portcls/registry.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp b/drivers/wdm/audio/backpln/portcls/resource.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/resource.cpp rename to drivers/wdm/audio/backpln/portcls/resource.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/service_group.cpp b/drivers/wdm/audio/backpln/portcls/service_group.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/service_group.cpp rename to drivers/wdm/audio/backpln/portcls/service_group.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/undoc.cpp b/drivers/wdm/audio/backpln/portcls/undoc.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/undoc.cpp rename to drivers/wdm/audio/backpln/portcls/undoc.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/unregister.cpp b/drivers/wdm/audio/backpln/portcls/unregister.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/unregister.cpp rename to drivers/wdm/audio/backpln/portcls/unregister.cpp diff --git a/reactos/drivers/wdm/audio/backpln/portcls/version.cpp b/drivers/wdm/audio/backpln/portcls/version.cpp similarity index 100% rename from reactos/drivers/wdm/audio/backpln/portcls/version.cpp rename to drivers/wdm/audio/backpln/portcls/version.cpp diff --git a/reactos/drivers/wdm/audio/directory.rbuild b/drivers/wdm/audio/directory.rbuild similarity index 100% rename from reactos/drivers/wdm/audio/directory.rbuild rename to drivers/wdm/audio/directory.rbuild diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/CHANGELOG.txt b/drivers/wdm/audio/drivers/CMIDriver/CHANGELOG.txt similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/CHANGELOG.txt rename to drivers/wdm/audio/drivers/CMIDriver/CHANGELOG.txt diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/CM8738-x32-WaveRT.inf b/drivers/wdm/audio/drivers/CMIDriver/CM8738-x32-WaveRT.inf similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/CM8738-x32-WaveRT.inf rename to drivers/wdm/audio/drivers/CMIDriver/CM8738-x32-WaveRT.inf diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/CM8738-x32.inf b/drivers/wdm/audio/drivers/CMIDriver/CM8738-x32.inf similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/CM8738-x32.inf rename to drivers/wdm/audio/drivers/CMIDriver/CM8738-x32.inf diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/CM8738-x64-WaveRT.inf b/drivers/wdm/audio/drivers/CMIDriver/CM8738-x64-WaveRT.inf similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/CM8738-x64-WaveRT.inf rename to drivers/wdm/audio/drivers/CMIDriver/CM8738-x64-WaveRT.inf diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/CM8738-x64.inf b/drivers/wdm/audio/drivers/CMIDriver/CM8738-x64.inf similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/CM8738-x64.inf rename to drivers/wdm/audio/drivers/CMIDriver/CM8738-x64.inf diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/adapter.cpp b/drivers/wdm/audio/drivers/CMIDriver/adapter.cpp similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/adapter.cpp rename to drivers/wdm/audio/drivers/CMIDriver/adapter.cpp diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/adapter.hpp b/drivers/wdm/audio/drivers/CMIDriver/adapter.hpp similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/adapter.hpp rename to drivers/wdm/audio/drivers/CMIDriver/adapter.hpp diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/main.cpp b/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/main.cpp similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/main.cpp rename to drivers/wdm/audio/drivers/CMIDriver/cmicontrol/main.cpp diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/main.h b/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/main.h similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/main.h rename to drivers/wdm/audio/drivers/CMIDriver/cmicontrol/main.h diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/makefile b/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/makefile similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/makefile rename to drivers/wdm/audio/drivers/CMIDriver/cmicontrol/makefile diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/resource.h b/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/resource.h similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/resource.h rename to drivers/wdm/audio/drivers/CMIDriver/cmicontrol/resource.h diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/sources b/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/sources similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/sources rename to drivers/wdm/audio/drivers/CMIDriver/cmicontrol/sources diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/window.aps b/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/window.aps similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/window.aps rename to drivers/wdm/audio/drivers/CMIDriver/cmicontrol/window.aps diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/window.ico b/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/window.ico similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/window.ico rename to drivers/wdm/audio/drivers/CMIDriver/cmicontrol/window.ico diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/window.ico-license.txt b/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/window.ico-license.txt similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/window.ico-license.txt rename to drivers/wdm/audio/drivers/CMIDriver/cmicontrol/window.ico-license.txt diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/window.rc b/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/window.rc similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/cmicontrol/window.rc rename to drivers/wdm/audio/drivers/CMIDriver/cmicontrol/window.rc diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/cmidriver.rbuild b/drivers/wdm/audio/drivers/CMIDriver/cmidriver.rbuild similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/cmidriver.rbuild rename to drivers/wdm/audio/drivers/CMIDriver/cmidriver.rbuild diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/cmipci.rc b/drivers/wdm/audio/drivers/CMIDriver/cmipci.rc similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/cmipci.rc rename to drivers/wdm/audio/drivers/CMIDriver/cmipci.rc diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/cmireg.hpp b/drivers/wdm/audio/drivers/CMIDriver/cmireg.hpp similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/cmireg.hpp rename to drivers/wdm/audio/drivers/CMIDriver/cmireg.hpp diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/common.cpp b/drivers/wdm/audio/drivers/CMIDriver/common.cpp similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/common.cpp rename to drivers/wdm/audio/drivers/CMIDriver/common.cpp diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/common.hpp b/drivers/wdm/audio/drivers/CMIDriver/common.hpp similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/common.hpp rename to drivers/wdm/audio/drivers/CMIDriver/common.hpp diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/cpl/cmicpl.cpp b/drivers/wdm/audio/drivers/CMIDriver/cpl/cmicpl.cpp similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/cpl/cmicpl.cpp rename to drivers/wdm/audio/drivers/CMIDriver/cpl/cmicpl.cpp diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/cpl/cmicpl.def b/drivers/wdm/audio/drivers/CMIDriver/cpl/cmicpl.def similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/cpl/cmicpl.def rename to drivers/wdm/audio/drivers/CMIDriver/cpl/cmicpl.def diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/cpl/cmicpl.rc b/drivers/wdm/audio/drivers/CMIDriver/cpl/cmicpl.rc similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/cpl/cmicpl.rc rename to drivers/wdm/audio/drivers/CMIDriver/cpl/cmicpl.rc diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/cpl/makefile b/drivers/wdm/audio/drivers/CMIDriver/cpl/makefile similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/cpl/makefile rename to drivers/wdm/audio/drivers/CMIDriver/cpl/makefile diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/cpl/resource.h b/drivers/wdm/audio/drivers/CMIDriver/cpl/resource.h similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/cpl/resource.h rename to drivers/wdm/audio/drivers/CMIDriver/cpl/resource.h diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/cpl/sources b/drivers/wdm/audio/drivers/CMIDriver/cpl/sources similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/cpl/sources rename to drivers/wdm/audio/drivers/CMIDriver/cpl/sources diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/debug.hpp b/drivers/wdm/audio/drivers/CMIDriver/debug.hpp similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/debug.hpp rename to drivers/wdm/audio/drivers/CMIDriver/debug.hpp diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/installer/main.cpp b/drivers/wdm/audio/drivers/CMIDriver/installer/main.cpp similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/installer/main.cpp rename to drivers/wdm/audio/drivers/CMIDriver/installer/main.cpp diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/installer/main.h b/drivers/wdm/audio/drivers/CMIDriver/installer/main.h similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/installer/main.h rename to drivers/wdm/audio/drivers/CMIDriver/installer/main.h diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/installer/makefile b/drivers/wdm/audio/drivers/CMIDriver/installer/makefile similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/installer/makefile rename to drivers/wdm/audio/drivers/CMIDriver/installer/makefile diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/installer/resource.h b/drivers/wdm/audio/drivers/CMIDriver/installer/resource.h similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/installer/resource.h rename to drivers/wdm/audio/drivers/CMIDriver/installer/resource.h diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/installer/sources b/drivers/wdm/audio/drivers/CMIDriver/installer/sources similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/installer/sources rename to drivers/wdm/audio/drivers/CMIDriver/installer/sources diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/installer/window.rc b/drivers/wdm/audio/drivers/CMIDriver/installer/window.rc similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/installer/window.rc rename to drivers/wdm/audio/drivers/CMIDriver/installer/window.rc diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/interfaces.hpp b/drivers/wdm/audio/drivers/CMIDriver/interfaces.hpp similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/interfaces.hpp rename to drivers/wdm/audio/drivers/CMIDriver/interfaces.hpp diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/mintopo.cpp b/drivers/wdm/audio/drivers/CMIDriver/mintopo.cpp similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/mintopo.cpp rename to drivers/wdm/audio/drivers/CMIDriver/mintopo.cpp diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/mintopo.hpp b/drivers/wdm/audio/drivers/CMIDriver/mintopo.hpp similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/mintopo.hpp rename to drivers/wdm/audio/drivers/CMIDriver/mintopo.hpp diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/mintopotables.hpp b/drivers/wdm/audio/drivers/CMIDriver/mintopotables.hpp similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/mintopotables.hpp rename to drivers/wdm/audio/drivers/CMIDriver/mintopotables.hpp diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/minwave.cpp b/drivers/wdm/audio/drivers/CMIDriver/minwave.cpp similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/minwave.cpp rename to drivers/wdm/audio/drivers/CMIDriver/minwave.cpp diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/minwave.hpp b/drivers/wdm/audio/drivers/CMIDriver/minwave.hpp similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/minwave.hpp rename to drivers/wdm/audio/drivers/CMIDriver/minwave.hpp diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/minwavetables.hpp b/drivers/wdm/audio/drivers/CMIDriver/minwavetables.hpp similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/minwavetables.hpp rename to drivers/wdm/audio/drivers/CMIDriver/minwavetables.hpp diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/property.h b/drivers/wdm/audio/drivers/CMIDriver/property.h similarity index 100% rename from reactos/drivers/wdm/audio/drivers/CMIDriver/property.h rename to drivers/wdm/audio/drivers/CMIDriver/property.h diff --git a/reactos/drivers/wdm/audio/drivers/directory.rbuild b/drivers/wdm/audio/drivers/directory.rbuild similarity index 100% rename from reactos/drivers/wdm/audio/drivers/directory.rbuild rename to drivers/wdm/audio/drivers/directory.rbuild diff --git a/reactos/drivers/wdm/audio/drivers/mpu401/adapter.cpp b/drivers/wdm/audio/drivers/mpu401/adapter.cpp similarity index 100% rename from reactos/drivers/wdm/audio/drivers/mpu401/adapter.cpp rename to drivers/wdm/audio/drivers/mpu401/adapter.cpp diff --git a/reactos/drivers/wdm/audio/drivers/mpu401/mpu401.rbuild b/drivers/wdm/audio/drivers/mpu401/mpu401.rbuild similarity index 100% rename from reactos/drivers/wdm/audio/drivers/mpu401/mpu401.rbuild rename to drivers/wdm/audio/drivers/mpu401/mpu401.rbuild diff --git a/reactos/drivers/wdm/audio/drivers/mpu401/mpu401.rc b/drivers/wdm/audio/drivers/mpu401/mpu401.rc similarity index 100% rename from reactos/drivers/wdm/audio/drivers/mpu401/mpu401.rc rename to drivers/wdm/audio/drivers/mpu401/mpu401.rc diff --git a/reactos/drivers/wdm/audio/drivers/sb16/adapter.cpp b/drivers/wdm/audio/drivers/sb16/adapter.cpp similarity index 100% rename from reactos/drivers/wdm/audio/drivers/sb16/adapter.cpp rename to drivers/wdm/audio/drivers/sb16/adapter.cpp diff --git a/reactos/drivers/wdm/audio/drivers/sb16/main.cpp b/drivers/wdm/audio/drivers/sb16/main.cpp similarity index 100% rename from reactos/drivers/wdm/audio/drivers/sb16/main.cpp rename to drivers/wdm/audio/drivers/sb16/main.cpp diff --git a/reactos/drivers/wdm/audio/drivers/sb16/sb16.h b/drivers/wdm/audio/drivers/sb16/sb16.h similarity index 100% rename from reactos/drivers/wdm/audio/drivers/sb16/sb16.h rename to drivers/wdm/audio/drivers/sb16/sb16.h diff --git a/reactos/drivers/wdm/audio/drivers/sb16/sb16.rbuild b/drivers/wdm/audio/drivers/sb16/sb16.rbuild similarity index 100% rename from reactos/drivers/wdm/audio/drivers/sb16/sb16.rbuild rename to drivers/wdm/audio/drivers/sb16/sb16.rbuild diff --git a/reactos/drivers/wdm/audio/drivers/sb16/stdunk.cpp b/drivers/wdm/audio/drivers/sb16/stdunk.cpp similarity index 100% rename from reactos/drivers/wdm/audio/drivers/sb16/stdunk.cpp rename to drivers/wdm/audio/drivers/sb16/stdunk.cpp diff --git a/reactos/drivers/wdm/audio/drm/CMakeLists.txt b/drivers/wdm/audio/drm/CMakeLists.txt similarity index 100% rename from reactos/drivers/wdm/audio/drm/CMakeLists.txt rename to drivers/wdm/audio/drm/CMakeLists.txt diff --git a/reactos/drivers/wdm/audio/drm/directory.rbuild b/drivers/wdm/audio/drm/directory.rbuild similarity index 100% rename from reactos/drivers/wdm/audio/drm/directory.rbuild rename to drivers/wdm/audio/drm/directory.rbuild diff --git a/reactos/drivers/wdm/audio/drm/drmk/CMakeLists.txt b/drivers/wdm/audio/drm/drmk/CMakeLists.txt similarity index 100% rename from reactos/drivers/wdm/audio/drm/drmk/CMakeLists.txt rename to drivers/wdm/audio/drm/drmk/CMakeLists.txt diff --git a/reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild b/drivers/wdm/audio/drm/drmk/drmk.rbuild similarity index 100% rename from reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild rename to drivers/wdm/audio/drm/drmk/drmk.rbuild diff --git a/reactos/drivers/wdm/audio/drm/drmk/drmk.rc b/drivers/wdm/audio/drm/drmk/drmk.rc similarity index 100% rename from reactos/drivers/wdm/audio/drm/drmk/drmk.rc rename to drivers/wdm/audio/drm/drmk/drmk.rc diff --git a/reactos/drivers/wdm/audio/drm/drmk/drmk.spec b/drivers/wdm/audio/drm/drmk/drmk.spec similarity index 100% rename from reactos/drivers/wdm/audio/drm/drmk/drmk.spec rename to drivers/wdm/audio/drm/drmk/drmk.spec diff --git a/reactos/drivers/wdm/audio/drm/drmk/stubs.cpp b/drivers/wdm/audio/drm/drmk/stubs.cpp similarity index 100% rename from reactos/drivers/wdm/audio/drm/drmk/stubs.cpp rename to drivers/wdm/audio/drm/drmk/stubs.cpp diff --git a/reactos/drivers/wdm/audio/filters/CMakeLists.txt b/drivers/wdm/audio/filters/CMakeLists.txt similarity index 100% rename from reactos/drivers/wdm/audio/filters/CMakeLists.txt rename to drivers/wdm/audio/filters/CMakeLists.txt diff --git a/reactos/drivers/wdm/audio/filters/directory.rbuild b/drivers/wdm/audio/filters/directory.rbuild similarity index 100% rename from reactos/drivers/wdm/audio/filters/directory.rbuild rename to drivers/wdm/audio/filters/directory.rbuild diff --git a/reactos/drivers/wdm/audio/filters/kmixer/CMakeLists.txt b/drivers/wdm/audio/filters/kmixer/CMakeLists.txt similarity index 100% rename from reactos/drivers/wdm/audio/filters/kmixer/CMakeLists.txt rename to drivers/wdm/audio/filters/kmixer/CMakeLists.txt diff --git a/reactos/drivers/wdm/audio/filters/kmixer/filter.c b/drivers/wdm/audio/filters/kmixer/filter.c similarity index 100% rename from reactos/drivers/wdm/audio/filters/kmixer/filter.c rename to drivers/wdm/audio/filters/kmixer/filter.c diff --git a/reactos/drivers/wdm/audio/filters/kmixer/kmixer.c b/drivers/wdm/audio/filters/kmixer/kmixer.c similarity index 100% rename from reactos/drivers/wdm/audio/filters/kmixer/kmixer.c rename to drivers/wdm/audio/filters/kmixer/kmixer.c diff --git a/reactos/drivers/wdm/audio/filters/kmixer/kmixer.h b/drivers/wdm/audio/filters/kmixer/kmixer.h similarity index 100% rename from reactos/drivers/wdm/audio/filters/kmixer/kmixer.h rename to drivers/wdm/audio/filters/kmixer/kmixer.h diff --git a/reactos/drivers/wdm/audio/filters/kmixer/kmixer.rbuild b/drivers/wdm/audio/filters/kmixer/kmixer.rbuild similarity index 100% rename from reactos/drivers/wdm/audio/filters/kmixer/kmixer.rbuild rename to drivers/wdm/audio/filters/kmixer/kmixer.rbuild diff --git a/reactos/drivers/wdm/audio/filters/kmixer/pin.c b/drivers/wdm/audio/filters/kmixer/pin.c similarity index 100% rename from reactos/drivers/wdm/audio/filters/kmixer/pin.c rename to drivers/wdm/audio/filters/kmixer/pin.c diff --git a/reactos/drivers/wdm/audio/filters/splitter/filter.c b/drivers/wdm/audio/filters/splitter/filter.c similarity index 100% rename from reactos/drivers/wdm/audio/filters/splitter/filter.c rename to drivers/wdm/audio/filters/splitter/filter.c diff --git a/reactos/drivers/wdm/audio/filters/splitter/pin.c b/drivers/wdm/audio/filters/splitter/pin.c similarity index 100% rename from reactos/drivers/wdm/audio/filters/splitter/pin.c rename to drivers/wdm/audio/filters/splitter/pin.c diff --git a/reactos/drivers/wdm/audio/filters/splitter/precomp.h b/drivers/wdm/audio/filters/splitter/precomp.h similarity index 100% rename from reactos/drivers/wdm/audio/filters/splitter/precomp.h rename to drivers/wdm/audio/filters/splitter/precomp.h diff --git a/reactos/drivers/wdm/audio/filters/splitter/splitter.c b/drivers/wdm/audio/filters/splitter/splitter.c similarity index 100% rename from reactos/drivers/wdm/audio/filters/splitter/splitter.c rename to drivers/wdm/audio/filters/splitter/splitter.c diff --git a/reactos/drivers/wdm/audio/filters/splitter/splitter.rbuild b/drivers/wdm/audio/filters/splitter/splitter.rbuild similarity index 100% rename from reactos/drivers/wdm/audio/filters/splitter/splitter.rbuild rename to drivers/wdm/audio/filters/splitter/splitter.rbuild diff --git a/reactos/drivers/wdm/audio/legacy/CMakeLists.txt b/drivers/wdm/audio/legacy/CMakeLists.txt similarity index 100% rename from reactos/drivers/wdm/audio/legacy/CMakeLists.txt rename to drivers/wdm/audio/legacy/CMakeLists.txt diff --git a/reactos/drivers/wdm/audio/legacy/directory.rbuild b/drivers/wdm/audio/legacy/directory.rbuild similarity index 100% rename from reactos/drivers/wdm/audio/legacy/directory.rbuild rename to drivers/wdm/audio/legacy/directory.rbuild diff --git a/reactos/drivers/wdm/audio/legacy/stream/control.c b/drivers/wdm/audio/legacy/stream/control.c similarity index 100% rename from reactos/drivers/wdm/audio/legacy/stream/control.c rename to drivers/wdm/audio/legacy/stream/control.c diff --git a/reactos/drivers/wdm/audio/legacy/stream/dll.c b/drivers/wdm/audio/legacy/stream/dll.c similarity index 100% rename from reactos/drivers/wdm/audio/legacy/stream/dll.c rename to drivers/wdm/audio/legacy/stream/dll.c diff --git a/reactos/drivers/wdm/audio/legacy/stream/driver.c b/drivers/wdm/audio/legacy/stream/driver.c similarity index 100% rename from reactos/drivers/wdm/audio/legacy/stream/driver.c rename to drivers/wdm/audio/legacy/stream/driver.c diff --git a/reactos/drivers/wdm/audio/legacy/stream/filter.c b/drivers/wdm/audio/legacy/stream/filter.c similarity index 100% rename from reactos/drivers/wdm/audio/legacy/stream/filter.c rename to drivers/wdm/audio/legacy/stream/filter.c diff --git a/reactos/drivers/wdm/audio/legacy/stream/helper.c b/drivers/wdm/audio/legacy/stream/helper.c similarity index 100% rename from reactos/drivers/wdm/audio/legacy/stream/helper.c rename to drivers/wdm/audio/legacy/stream/helper.c diff --git a/reactos/drivers/wdm/audio/legacy/stream/pnp.c b/drivers/wdm/audio/legacy/stream/pnp.c similarity index 100% rename from reactos/drivers/wdm/audio/legacy/stream/pnp.c rename to drivers/wdm/audio/legacy/stream/pnp.c diff --git a/reactos/drivers/wdm/audio/legacy/stream/stream.h b/drivers/wdm/audio/legacy/stream/stream.h similarity index 100% rename from reactos/drivers/wdm/audio/legacy/stream/stream.h rename to drivers/wdm/audio/legacy/stream/stream.h diff --git a/reactos/drivers/wdm/audio/legacy/stream/stream.rbuild b/drivers/wdm/audio/legacy/stream/stream.rbuild similarity index 100% rename from reactos/drivers/wdm/audio/legacy/stream/stream.rbuild rename to drivers/wdm/audio/legacy/stream/stream.rbuild diff --git a/reactos/drivers/wdm/audio/legacy/stream/stream.rc b/drivers/wdm/audio/legacy/stream/stream.rc similarity index 100% rename from reactos/drivers/wdm/audio/legacy/stream/stream.rc rename to drivers/wdm/audio/legacy/stream/stream.rc diff --git a/reactos/drivers/wdm/audio/legacy/stream/stream.spec b/drivers/wdm/audio/legacy/stream/stream.spec similarity index 100% rename from reactos/drivers/wdm/audio/legacy/stream/stream.spec rename to drivers/wdm/audio/legacy/stream/stream.spec diff --git a/reactos/drivers/wdm/audio/legacy/wdmaud/CMakeLists.txt b/drivers/wdm/audio/legacy/wdmaud/CMakeLists.txt similarity index 100% rename from reactos/drivers/wdm/audio/legacy/wdmaud/CMakeLists.txt rename to drivers/wdm/audio/legacy/wdmaud/CMakeLists.txt diff --git a/reactos/drivers/wdm/audio/legacy/wdmaud/control.c b/drivers/wdm/audio/legacy/wdmaud/control.c similarity index 100% rename from reactos/drivers/wdm/audio/legacy/wdmaud/control.c rename to drivers/wdm/audio/legacy/wdmaud/control.c diff --git a/reactos/drivers/wdm/audio/legacy/wdmaud/deviface.c b/drivers/wdm/audio/legacy/wdmaud/deviface.c similarity index 100% rename from reactos/drivers/wdm/audio/legacy/wdmaud/deviface.c rename to drivers/wdm/audio/legacy/wdmaud/deviface.c diff --git a/reactos/drivers/wdm/audio/legacy/wdmaud/entry.c b/drivers/wdm/audio/legacy/wdmaud/entry.c similarity index 100% rename from reactos/drivers/wdm/audio/legacy/wdmaud/entry.c rename to drivers/wdm/audio/legacy/wdmaud/entry.c diff --git a/reactos/drivers/wdm/audio/legacy/wdmaud/interface.h b/drivers/wdm/audio/legacy/wdmaud/interface.h similarity index 100% rename from reactos/drivers/wdm/audio/legacy/wdmaud/interface.h rename to drivers/wdm/audio/legacy/wdmaud/interface.h diff --git a/reactos/drivers/wdm/audio/legacy/wdmaud/mmixer.c b/drivers/wdm/audio/legacy/wdmaud/mmixer.c similarity index 100% rename from reactos/drivers/wdm/audio/legacy/wdmaud/mmixer.c rename to drivers/wdm/audio/legacy/wdmaud/mmixer.c diff --git a/reactos/drivers/wdm/audio/legacy/wdmaud/sup.c b/drivers/wdm/audio/legacy/wdmaud/sup.c similarity index 100% rename from reactos/drivers/wdm/audio/legacy/wdmaud/sup.c rename to drivers/wdm/audio/legacy/wdmaud/sup.c diff --git a/reactos/drivers/wdm/audio/legacy/wdmaud/wdmaud.h b/drivers/wdm/audio/legacy/wdmaud/wdmaud.h similarity index 100% rename from reactos/drivers/wdm/audio/legacy/wdmaud/wdmaud.h rename to drivers/wdm/audio/legacy/wdmaud/wdmaud.h diff --git a/reactos/drivers/wdm/audio/legacy/wdmaud/wdmaud.rbuild b/drivers/wdm/audio/legacy/wdmaud/wdmaud.rbuild similarity index 100% rename from reactos/drivers/wdm/audio/legacy/wdmaud/wdmaud.rbuild rename to drivers/wdm/audio/legacy/wdmaud/wdmaud.rbuild diff --git a/reactos/drivers/wdm/audio/legacy/wdmaud/wdmaud.rc b/drivers/wdm/audio/legacy/wdmaud/wdmaud.rc similarity index 100% rename from reactos/drivers/wdm/audio/legacy/wdmaud/wdmaud.rc rename to drivers/wdm/audio/legacy/wdmaud/wdmaud.rc diff --git a/reactos/drivers/wdm/audio/sysaudio/CMakeLists.txt b/drivers/wdm/audio/sysaudio/CMakeLists.txt similarity index 100% rename from reactos/drivers/wdm/audio/sysaudio/CMakeLists.txt rename to drivers/wdm/audio/sysaudio/CMakeLists.txt diff --git a/reactos/drivers/wdm/audio/sysaudio/control.c b/drivers/wdm/audio/sysaudio/control.c similarity index 100% rename from reactos/drivers/wdm/audio/sysaudio/control.c rename to drivers/wdm/audio/sysaudio/control.c diff --git a/reactos/drivers/wdm/audio/sysaudio/deviface.c b/drivers/wdm/audio/sysaudio/deviface.c similarity index 100% rename from reactos/drivers/wdm/audio/sysaudio/deviface.c rename to drivers/wdm/audio/sysaudio/deviface.c diff --git a/reactos/drivers/wdm/audio/sysaudio/dispatcher.c b/drivers/wdm/audio/sysaudio/dispatcher.c similarity index 100% rename from reactos/drivers/wdm/audio/sysaudio/dispatcher.c rename to drivers/wdm/audio/sysaudio/dispatcher.c diff --git a/reactos/drivers/wdm/audio/sysaudio/main.c b/drivers/wdm/audio/sysaudio/main.c similarity index 100% rename from reactos/drivers/wdm/audio/sysaudio/main.c rename to drivers/wdm/audio/sysaudio/main.c diff --git a/reactos/drivers/wdm/audio/sysaudio/pin.c b/drivers/wdm/audio/sysaudio/pin.c similarity index 100% rename from reactos/drivers/wdm/audio/sysaudio/pin.c rename to drivers/wdm/audio/sysaudio/pin.c diff --git a/reactos/drivers/wdm/audio/sysaudio/sysaudio.h b/drivers/wdm/audio/sysaudio/sysaudio.h similarity index 100% rename from reactos/drivers/wdm/audio/sysaudio/sysaudio.h rename to drivers/wdm/audio/sysaudio/sysaudio.h diff --git a/reactos/drivers/wdm/audio/sysaudio/sysaudio.rbuild b/drivers/wdm/audio/sysaudio/sysaudio.rbuild similarity index 100% rename from reactos/drivers/wdm/audio/sysaudio/sysaudio.rbuild rename to drivers/wdm/audio/sysaudio/sysaudio.rbuild diff --git a/reactos/drivers/wdm/audio/sysaudio/sysaudio.rc b/drivers/wdm/audio/sysaudio/sysaudio.rc similarity index 100% rename from reactos/drivers/wdm/audio/sysaudio/sysaudio.rc rename to drivers/wdm/audio/sysaudio/sysaudio.rc diff --git a/reactos/drivers/wdm/wdm.rbuild b/drivers/wdm/wdm.rbuild similarity index 100% rename from reactos/drivers/wdm/wdm.rbuild rename to drivers/wdm/wdm.rbuild diff --git a/reactos/drivers/wmi/CMakeLists.txt b/drivers/wmi/CMakeLists.txt similarity index 100% rename from reactos/drivers/wmi/CMakeLists.txt rename to drivers/wmi/CMakeLists.txt diff --git a/reactos/drivers/wmi/wmilib.c b/drivers/wmi/wmilib.c similarity index 100% rename from reactos/drivers/wmi/wmilib.c rename to drivers/wmi/wmilib.c diff --git a/reactos/drivers/wmi/wmilib.rbuild b/drivers/wmi/wmilib.rbuild similarity index 100% rename from reactos/drivers/wmi/wmilib.rbuild rename to drivers/wmi/wmilib.rbuild diff --git a/reactos/drivers/wmi/wmilib.rc b/drivers/wmi/wmilib.rc similarity index 100% rename from reactos/drivers/wmi/wmilib.rc rename to drivers/wmi/wmilib.rc diff --git a/reactos/drivers/wmi/wmilib.spec b/drivers/wmi/wmilib.spec similarity index 100% rename from reactos/drivers/wmi/wmilib.spec rename to drivers/wmi/wmilib.spec diff --git a/reactos/global.lds b/global.lds similarity index 100% rename from reactos/global.lds rename to global.lds diff --git a/reactos/hal/CMakeLists.txt b/hal/CMakeLists.txt similarity index 100% rename from reactos/hal/CMakeLists.txt rename to hal/CMakeLists.txt diff --git a/reactos/hal/hal.pspec b/hal/hal.pspec similarity index 100% rename from reactos/hal/hal.pspec rename to hal/hal.pspec diff --git a/reactos/hal/hal.rbuild b/hal/hal.rbuild similarity index 100% rename from reactos/hal/hal.rbuild rename to hal/hal.rbuild diff --git a/reactos/hal/hal.spec b/hal/hal.spec similarity index 100% rename from reactos/hal/hal.spec rename to hal/hal.spec diff --git a/reactos/hal/halarm/directory.rbuild b/hal/halarm/directory.rbuild similarity index 100% rename from reactos/hal/halarm/directory.rbuild rename to hal/halarm/directory.rbuild diff --git a/reactos/hal/halarm/generic/beep.c b/hal/halarm/generic/beep.c similarity index 100% rename from reactos/hal/halarm/generic/beep.c rename to hal/halarm/generic/beep.c diff --git a/reactos/hal/halarm/generic/bus.c b/hal/halarm/generic/bus.c similarity index 100% rename from reactos/hal/halarm/generic/bus.c rename to hal/halarm/generic/bus.c diff --git a/reactos/hal/halarm/generic/cache.S b/hal/halarm/generic/cache.S similarity index 100% rename from reactos/hal/halarm/generic/cache.S rename to hal/halarm/generic/cache.S diff --git a/reactos/hal/halarm/generic/display.c b/hal/halarm/generic/display.c similarity index 100% rename from reactos/hal/halarm/generic/display.c rename to hal/halarm/generic/display.c diff --git a/reactos/hal/halarm/generic/dma.c b/hal/halarm/generic/dma.c similarity index 100% rename from reactos/hal/halarm/generic/dma.c rename to hal/halarm/generic/dma.c diff --git a/reactos/hal/halarm/generic/drive.c b/hal/halarm/generic/drive.c similarity index 100% rename from reactos/hal/halarm/generic/drive.c rename to hal/halarm/generic/drive.c diff --git a/reactos/hal/halarm/generic/fmutex.c b/hal/halarm/generic/fmutex.c similarity index 100% rename from reactos/hal/halarm/generic/fmutex.c rename to hal/halarm/generic/fmutex.c diff --git a/reactos/hal/halarm/generic/halinit.c b/hal/halarm/generic/halinit.c similarity index 100% rename from reactos/hal/halarm/generic/halinit.c rename to hal/halarm/generic/halinit.c diff --git a/reactos/hal/halarm/generic/misc.c b/hal/halarm/generic/misc.c similarity index 100% rename from reactos/hal/halarm/generic/misc.c rename to hal/halarm/generic/misc.c diff --git a/reactos/hal/halarm/generic/pic.c b/hal/halarm/generic/pic.c similarity index 100% rename from reactos/hal/halarm/generic/pic.c rename to hal/halarm/generic/pic.c diff --git a/reactos/hal/halarm/generic/portio.c b/hal/halarm/generic/portio.c similarity index 100% rename from reactos/hal/halarm/generic/portio.c rename to hal/halarm/generic/portio.c diff --git a/reactos/hal/halarm/generic/processor.c b/hal/halarm/generic/processor.c similarity index 100% rename from reactos/hal/halarm/generic/processor.c rename to hal/halarm/generic/processor.c diff --git a/reactos/hal/halarm/generic/profil.c b/hal/halarm/generic/profil.c similarity index 100% rename from reactos/hal/halarm/generic/profil.c rename to hal/halarm/generic/profil.c diff --git a/reactos/hal/halarm/generic/reboot.c b/hal/halarm/generic/reboot.c similarity index 100% rename from reactos/hal/halarm/generic/reboot.c rename to hal/halarm/generic/reboot.c diff --git a/reactos/hal/halarm/generic/rtc.c b/hal/halarm/generic/rtc.c similarity index 100% rename from reactos/hal/halarm/generic/rtc.c rename to hal/halarm/generic/rtc.c diff --git a/reactos/hal/halarm/generic/spinlock.c b/hal/halarm/generic/spinlock.c similarity index 100% rename from reactos/hal/halarm/generic/spinlock.c rename to hal/halarm/generic/spinlock.c diff --git a/reactos/hal/halarm/generic/sysinfo.c b/hal/halarm/generic/sysinfo.c similarity index 100% rename from reactos/hal/halarm/generic/sysinfo.c rename to hal/halarm/generic/sysinfo.c diff --git a/reactos/hal/halarm/generic/timer.c b/hal/halarm/generic/timer.c similarity index 100% rename from reactos/hal/halarm/generic/timer.c rename to hal/halarm/generic/timer.c diff --git a/reactos/hal/halarm/generic/usage.c b/hal/halarm/generic/usage.c similarity index 100% rename from reactos/hal/halarm/generic/usage.c rename to hal/halarm/generic/usage.c diff --git a/reactos/hal/halarm/hal.rbuild b/hal/halarm/hal.rbuild similarity index 100% rename from reactos/hal/halarm/hal.rbuild rename to hal/halarm/hal.rbuild diff --git a/reactos/hal/halarm/hal_generic.rbuild b/hal/halarm/hal_generic.rbuild similarity index 100% rename from reactos/hal/halarm/hal_generic.rbuild rename to hal/halarm/hal_generic.rbuild diff --git a/reactos/hal/halarm/include/hal.h b/hal/halarm/include/hal.h similarity index 100% rename from reactos/hal/halarm/include/hal.h rename to hal/halarm/include/hal.h diff --git a/reactos/hal/halarm/include/halp.h b/hal/halarm/include/halp.h similarity index 100% rename from reactos/hal/halarm/include/halp.h rename to hal/halarm/include/halp.h diff --git a/reactos/hal/halarm/omap3/halinit_up.c b/hal/halarm/omap3/halinit_up.c similarity index 100% rename from reactos/hal/halarm/omap3/halinit_up.c rename to hal/halarm/omap3/halinit_up.c diff --git a/reactos/hal/halarm/omap3/halup.rbuild b/hal/halarm/omap3/halup.rbuild similarity index 100% rename from reactos/hal/halarm/omap3/halup.rbuild rename to hal/halarm/omap3/halup.rbuild diff --git a/reactos/hal/halarm/omap3/halup.rc b/hal/halarm/omap3/halup.rc similarity index 100% rename from reactos/hal/halarm/omap3/halup.rc rename to hal/halarm/omap3/halup.rc diff --git a/reactos/hal/halarm/versa/halinit_up.c b/hal/halarm/versa/halinit_up.c similarity index 100% rename from reactos/hal/halarm/versa/halinit_up.c rename to hal/halarm/versa/halinit_up.c diff --git a/reactos/hal/halarm/versa/halup.rbuild b/hal/halarm/versa/halup.rbuild similarity index 100% rename from reactos/hal/halarm/versa/halup.rbuild rename to hal/halarm/versa/halup.rbuild diff --git a/reactos/hal/halarm/versa/halup.rc b/hal/halarm/versa/halup.rc similarity index 100% rename from reactos/hal/halarm/versa/halup.rc rename to hal/halarm/versa/halup.rc diff --git a/reactos/hal/halppc/directory.rbuild b/hal/halppc/directory.rbuild similarity index 100% rename from reactos/hal/halppc/directory.rbuild rename to hal/halppc/directory.rbuild diff --git a/reactos/hal/halppc/generic/beep.c b/hal/halppc/generic/beep.c similarity index 100% rename from reactos/hal/halppc/generic/beep.c rename to hal/halppc/generic/beep.c diff --git a/reactos/hal/halppc/generic/bus.c b/hal/halppc/generic/bus.c similarity index 100% rename from reactos/hal/halppc/generic/bus.c rename to hal/halppc/generic/bus.c diff --git a/reactos/hal/halppc/generic/cmos.c b/hal/halppc/generic/cmos.c similarity index 100% rename from reactos/hal/halppc/generic/cmos.c rename to hal/halppc/generic/cmos.c diff --git a/reactos/hal/halppc/generic/display.c b/hal/halppc/generic/display.c similarity index 100% rename from reactos/hal/halppc/generic/display.c rename to hal/halppc/generic/display.c diff --git a/reactos/hal/halppc/generic/dma.c b/hal/halppc/generic/dma.c similarity index 100% rename from reactos/hal/halppc/generic/dma.c rename to hal/halppc/generic/dma.c diff --git a/reactos/hal/halppc/generic/drive.c b/hal/halppc/generic/drive.c similarity index 100% rename from reactos/hal/halppc/generic/drive.c rename to hal/halppc/generic/drive.c diff --git a/reactos/hal/halppc/generic/enum.c b/hal/halppc/generic/enum.c similarity index 100% rename from reactos/hal/halppc/generic/enum.c rename to hal/halppc/generic/enum.c diff --git a/reactos/hal/halppc/generic/fmutex.c b/hal/halppc/generic/fmutex.c similarity index 100% rename from reactos/hal/halppc/generic/fmutex.c rename to hal/halppc/generic/fmutex.c diff --git a/reactos/hal/halppc/generic/font.c b/hal/halppc/generic/font.c similarity index 100% rename from reactos/hal/halppc/generic/font.c rename to hal/halppc/generic/font.c diff --git a/reactos/hal/halppc/generic/generic.rbuild b/hal/halppc/generic/generic.rbuild similarity index 100% rename from reactos/hal/halppc/generic/generic.rbuild rename to hal/halppc/generic/generic.rbuild diff --git a/reactos/hal/halppc/generic/halinit.c b/hal/halppc/generic/halinit.c similarity index 100% rename from reactos/hal/halppc/generic/halinit.c rename to hal/halppc/generic/halinit.c diff --git a/reactos/hal/halppc/generic/irql.c b/hal/halppc/generic/irql.c similarity index 100% rename from reactos/hal/halppc/generic/irql.c rename to hal/halppc/generic/irql.c diff --git a/reactos/hal/halppc/generic/isa.c b/hal/halppc/generic/isa.c similarity index 100% rename from reactos/hal/halppc/generic/isa.c rename to hal/halppc/generic/isa.c diff --git a/reactos/hal/halppc/generic/misc.c b/hal/halppc/generic/misc.c similarity index 100% rename from reactos/hal/halppc/generic/misc.c rename to hal/halppc/generic/misc.c diff --git a/reactos/hal/halppc/generic/pci.c b/hal/halppc/generic/pci.c similarity index 100% rename from reactos/hal/halppc/generic/pci.c rename to hal/halppc/generic/pci.c diff --git a/reactos/hal/halppc/generic/portio.c b/hal/halppc/generic/portio.c similarity index 100% rename from reactos/hal/halppc/generic/portio.c rename to hal/halppc/generic/portio.c diff --git a/reactos/hal/halppc/generic/processor.c b/hal/halppc/generic/processor.c similarity index 100% rename from reactos/hal/halppc/generic/processor.c rename to hal/halppc/generic/processor.c diff --git a/reactos/hal/halppc/generic/profil.c b/hal/halppc/generic/profil.c similarity index 100% rename from reactos/hal/halppc/generic/profil.c rename to hal/halppc/generic/profil.c diff --git a/reactos/hal/halppc/generic/reboot.c b/hal/halppc/generic/reboot.c similarity index 100% rename from reactos/hal/halppc/generic/reboot.c rename to hal/halppc/generic/reboot.c diff --git a/reactos/hal/halppc/generic/spinlock.c b/hal/halppc/generic/spinlock.c similarity index 100% rename from reactos/hal/halppc/generic/spinlock.c rename to hal/halppc/generic/spinlock.c diff --git a/reactos/hal/halppc/generic/sysinfo.c b/hal/halppc/generic/sysinfo.c similarity index 100% rename from reactos/hal/halppc/generic/sysinfo.c rename to hal/halppc/generic/sysinfo.c diff --git a/reactos/hal/halppc/generic/timer.c b/hal/halppc/generic/timer.c similarity index 100% rename from reactos/hal/halppc/generic/timer.c rename to hal/halppc/generic/timer.c diff --git a/reactos/hal/halppc/include/apic.h b/hal/halppc/include/apic.h similarity index 100% rename from reactos/hal/halppc/include/apic.h rename to hal/halppc/include/apic.h diff --git a/reactos/hal/halppc/include/bus.h b/hal/halppc/include/bus.h similarity index 100% rename from reactos/hal/halppc/include/bus.h rename to hal/halppc/include/bus.h diff --git a/reactos/hal/halppc/include/hal.h b/hal/halppc/include/hal.h similarity index 100% rename from reactos/hal/halppc/include/hal.h rename to hal/halppc/include/hal.h diff --git a/reactos/hal/halppc/include/haldma.h b/hal/halppc/include/haldma.h similarity index 100% rename from reactos/hal/halppc/include/haldma.h rename to hal/halppc/include/haldma.h diff --git a/reactos/hal/halppc/include/halirq.h b/hal/halppc/include/halirq.h similarity index 100% rename from reactos/hal/halppc/include/halirq.h rename to hal/halppc/include/halirq.h diff --git a/reactos/hal/halppc/include/halp.h b/hal/halppc/include/halp.h similarity index 100% rename from reactos/hal/halppc/include/halp.h rename to hal/halppc/include/halp.h diff --git a/reactos/hal/halppc/include/ioapic.h b/hal/halppc/include/ioapic.h similarity index 100% rename from reactos/hal/halppc/include/ioapic.h rename to hal/halppc/include/ioapic.h diff --git a/reactos/hal/halppc/include/mps.h b/hal/halppc/include/mps.h similarity index 100% rename from reactos/hal/halppc/include/mps.h rename to hal/halppc/include/mps.h diff --git a/reactos/hal/halppc/up/halinit_up.c b/hal/halppc/up/halinit_up.c similarity index 100% rename from reactos/hal/halppc/up/halinit_up.c rename to hal/halppc/up/halinit_up.c diff --git a/reactos/hal/halppc/up/halup.rbuild b/hal/halppc/up/halup.rbuild similarity index 100% rename from reactos/hal/halppc/up/halup.rbuild rename to hal/halppc/up/halup.rbuild diff --git a/reactos/hal/halppc/up/halup.rc b/hal/halppc/up/halup.rc similarity index 100% rename from reactos/hal/halppc/up/halup.rc rename to hal/halppc/up/halup.rc diff --git a/reactos/hal/halx86/CMakeLists.txt b/hal/halx86/CMakeLists.txt similarity index 100% rename from reactos/hal/halx86/CMakeLists.txt rename to hal/halx86/CMakeLists.txt diff --git a/reactos/hal/halx86/acpi/busemul.c b/hal/halx86/acpi/busemul.c similarity index 100% rename from reactos/hal/halx86/acpi/busemul.c rename to hal/halx86/acpi/busemul.c diff --git a/reactos/hal/halx86/acpi/halacpi.c b/hal/halx86/acpi/halacpi.c similarity index 100% rename from reactos/hal/halx86/acpi/halacpi.c rename to hal/halx86/acpi/halacpi.c diff --git a/reactos/hal/halx86/acpi/halacpi.rc b/hal/halx86/acpi/halacpi.rc similarity index 100% rename from reactos/hal/halx86/acpi/halacpi.rc rename to hal/halx86/acpi/halacpi.rc diff --git a/reactos/hal/halx86/acpi/halpnpdd.c b/hal/halx86/acpi/halpnpdd.c similarity index 100% rename from reactos/hal/halx86/acpi/halpnpdd.c rename to hal/halx86/acpi/halpnpdd.c diff --git a/reactos/hal/halx86/amd64/halinit.c b/hal/halx86/amd64/halinit.c similarity index 100% rename from reactos/hal/halx86/amd64/halinit.c rename to hal/halx86/amd64/halinit.c diff --git a/reactos/hal/halx86/amd64/mps.S b/hal/halx86/amd64/mps.S similarity index 100% rename from reactos/hal/halx86/amd64/mps.S rename to hal/halx86/amd64/mps.S diff --git a/reactos/hal/halx86/amd64/processor.c b/hal/halx86/amd64/processor.c similarity index 100% rename from reactos/hal/halx86/amd64/processor.c rename to hal/halx86/amd64/processor.c diff --git a/reactos/hal/halx86/amd64/stubs.c b/hal/halx86/amd64/stubs.c similarity index 100% rename from reactos/hal/halx86/amd64/stubs.c rename to hal/halx86/amd64/stubs.c diff --git a/reactos/hal/halx86/amd64/systimer.S b/hal/halx86/amd64/systimer.S similarity index 100% rename from reactos/hal/halx86/amd64/systimer.S rename to hal/halx86/amd64/systimer.S diff --git a/reactos/hal/halx86/amd64/x86bios.c b/hal/halx86/amd64/x86bios.c similarity index 100% rename from reactos/hal/halx86/amd64/x86bios.c rename to hal/halx86/amd64/x86bios.c diff --git a/reactos/hal/halx86/apic/apic.c b/hal/halx86/apic/apic.c similarity index 100% rename from reactos/hal/halx86/apic/apic.c rename to hal/halx86/apic/apic.c diff --git a/reactos/hal/halx86/apic/apic.h b/hal/halx86/apic/apic.h similarity index 100% rename from reactos/hal/halx86/apic/apic.h rename to hal/halx86/apic/apic.h diff --git a/reactos/hal/halx86/apic/apictimer.c b/hal/halx86/apic/apictimer.c similarity index 100% rename from reactos/hal/halx86/apic/apictimer.c rename to hal/halx86/apic/apictimer.c diff --git a/reactos/hal/halx86/apic/apictrap.S b/hal/halx86/apic/apictrap.S similarity index 100% rename from reactos/hal/halx86/apic/apictrap.S rename to hal/halx86/apic/apictrap.S diff --git a/reactos/hal/halx86/apic/halinit_apic.c b/hal/halx86/apic/halinit_apic.c similarity index 100% rename from reactos/hal/halx86/apic/halinit_apic.c rename to hal/halx86/apic/halinit_apic.c diff --git a/reactos/hal/halx86/apic/rtctimer.c b/hal/halx86/apic/rtctimer.c similarity index 100% rename from reactos/hal/halx86/apic/rtctimer.c rename to hal/halx86/apic/rtctimer.c diff --git a/reactos/hal/halx86/apic/tsc.c b/hal/halx86/apic/tsc.c similarity index 100% rename from reactos/hal/halx86/apic/tsc.c rename to hal/halx86/apic/tsc.c diff --git a/reactos/hal/halx86/apic/tsc.h b/hal/halx86/apic/tsc.h similarity index 100% rename from reactos/hal/halx86/apic/tsc.h rename to hal/halx86/apic/tsc.h diff --git a/reactos/hal/halx86/apic/tsccal.S b/hal/halx86/apic/tsccal.S similarity index 100% rename from reactos/hal/halx86/apic/tsccal.S rename to hal/halx86/apic/tsccal.S diff --git a/reactos/hal/halx86/directory.rbuild b/hal/halx86/directory.rbuild similarity index 100% rename from reactos/hal/halx86/directory.rbuild rename to hal/halx86/directory.rbuild diff --git a/reactos/hal/halx86/generic/beep.c b/hal/halx86/generic/beep.c similarity index 100% rename from reactos/hal/halx86/generic/beep.c rename to hal/halx86/generic/beep.c diff --git a/reactos/hal/halx86/generic/bios.c b/hal/halx86/generic/bios.c similarity index 100% rename from reactos/hal/halx86/generic/bios.c rename to hal/halx86/generic/bios.c diff --git a/reactos/hal/halx86/generic/cmos.c b/hal/halx86/generic/cmos.c similarity index 100% rename from reactos/hal/halx86/generic/cmos.c rename to hal/halx86/generic/cmos.c diff --git a/reactos/hal/halx86/generic/display.c b/hal/halx86/generic/display.c similarity index 100% rename from reactos/hal/halx86/generic/display.c rename to hal/halx86/generic/display.c diff --git a/reactos/hal/halx86/generic/dma.c b/hal/halx86/generic/dma.c similarity index 100% rename from reactos/hal/halx86/generic/dma.c rename to hal/halx86/generic/dma.c diff --git a/reactos/hal/halx86/generic/drive.c b/hal/halx86/generic/drive.c similarity index 100% rename from reactos/hal/halx86/generic/drive.c rename to hal/halx86/generic/drive.c diff --git a/reactos/hal/halx86/generic/halinit.c b/hal/halx86/generic/halinit.c similarity index 100% rename from reactos/hal/halx86/generic/halinit.c rename to hal/halx86/generic/halinit.c diff --git a/reactos/hal/halx86/generic/memory.c b/hal/halx86/generic/memory.c similarity index 100% rename from reactos/hal/halx86/generic/memory.c rename to hal/halx86/generic/memory.c diff --git a/reactos/hal/halx86/generic/misc.c b/hal/halx86/generic/misc.c similarity index 100% rename from reactos/hal/halx86/generic/misc.c rename to hal/halx86/generic/misc.c diff --git a/reactos/hal/halx86/generic/portio.c b/hal/halx86/generic/portio.c similarity index 100% rename from reactos/hal/halx86/generic/portio.c rename to hal/halx86/generic/portio.c diff --git a/reactos/hal/halx86/generic/profil.c b/hal/halx86/generic/profil.c similarity index 100% rename from reactos/hal/halx86/generic/profil.c rename to hal/halx86/generic/profil.c diff --git a/reactos/hal/halx86/generic/reboot.c b/hal/halx86/generic/reboot.c similarity index 100% rename from reactos/hal/halx86/generic/reboot.c rename to hal/halx86/generic/reboot.c diff --git a/reactos/hal/halx86/generic/spinlock.c b/hal/halx86/generic/spinlock.c similarity index 100% rename from reactos/hal/halx86/generic/spinlock.c rename to hal/halx86/generic/spinlock.c diff --git a/reactos/hal/halx86/generic/sysinfo.c b/hal/halx86/generic/sysinfo.c similarity index 100% rename from reactos/hal/halx86/generic/sysinfo.c rename to hal/halx86/generic/sysinfo.c diff --git a/reactos/hal/halx86/generic/systimer.S b/hal/halx86/generic/systimer.S similarity index 100% rename from reactos/hal/halx86/generic/systimer.S rename to hal/halx86/generic/systimer.S diff --git a/reactos/hal/halx86/generic/timer.c b/hal/halx86/generic/timer.c similarity index 100% rename from reactos/hal/halx86/generic/timer.c rename to hal/halx86/generic/timer.c diff --git a/reactos/hal/halx86/generic/trap.S b/hal/halx86/generic/trap.S similarity index 100% rename from reactos/hal/halx86/generic/trap.S rename to hal/halx86/generic/trap.S diff --git a/reactos/hal/halx86/generic/usage.c b/hal/halx86/generic/usage.c similarity index 100% rename from reactos/hal/halx86/generic/usage.c rename to hal/halx86/generic/usage.c diff --git a/reactos/hal/halx86/generic/v86.S b/hal/halx86/generic/v86.S similarity index 100% rename from reactos/hal/halx86/generic/v86.S rename to hal/halx86/generic/v86.S diff --git a/reactos/hal/halx86/hal.rbuild b/hal/halx86/hal.rbuild similarity index 100% rename from reactos/hal/halx86/hal.rbuild rename to hal/halx86/hal.rbuild diff --git a/reactos/hal/halx86/hal_generic.rbuild b/hal/halx86/hal_generic.rbuild similarity index 100% rename from reactos/hal/halx86/hal_generic.rbuild rename to hal/halx86/hal_generic.rbuild diff --git a/reactos/hal/halx86/hal_generic_acpi.rbuild b/hal/halx86/hal_generic_acpi.rbuild similarity index 100% rename from reactos/hal/halx86/hal_generic_acpi.rbuild rename to hal/halx86/hal_generic_acpi.rbuild diff --git a/reactos/hal/halx86/hal_generic_mp.rbuild b/hal/halx86/hal_generic_mp.rbuild similarity index 100% rename from reactos/hal/halx86/hal_generic_mp.rbuild rename to hal/halx86/hal_generic_mp.rbuild diff --git a/reactos/hal/halx86/hal_generic_pcat.rbuild b/hal/halx86/hal_generic_pcat.rbuild similarity index 100% rename from reactos/hal/halx86/hal_generic_pcat.rbuild rename to hal/halx86/hal_generic_pcat.rbuild diff --git a/reactos/hal/halx86/hal_generic_up.rbuild b/hal/halx86/hal_generic_up.rbuild similarity index 100% rename from reactos/hal/halx86/hal_generic_up.rbuild rename to hal/halx86/hal_generic_up.rbuild diff --git a/reactos/hal/halx86/hal_mini.rbuild b/hal/halx86/hal_mini.rbuild similarity index 100% rename from reactos/hal/halx86/hal_mini.rbuild rename to hal/halx86/hal_mini.rbuild diff --git a/reactos/hal/halx86/halacpi.rbuild b/hal/halx86/halacpi.rbuild similarity index 100% rename from reactos/hal/halx86/halacpi.rbuild rename to hal/halx86/halacpi.rbuild diff --git a/reactos/hal/halx86/halamd64.rbuild b/hal/halx86/halamd64.rbuild similarity index 100% rename from reactos/hal/halx86/halamd64.rbuild rename to hal/halx86/halamd64.rbuild diff --git a/reactos/hal/halx86/halmps.rbuild b/hal/halx86/halmps.rbuild similarity index 100% rename from reactos/hal/halx86/halmps.rbuild rename to hal/halx86/halmps.rbuild diff --git a/reactos/hal/halx86/halxbox.rbuild b/hal/halx86/halxbox.rbuild similarity index 100% rename from reactos/hal/halx86/halxbox.rbuild rename to hal/halx86/halxbox.rbuild diff --git a/reactos/hal/halx86/include/apic.h b/hal/halx86/include/apic.h similarity index 100% rename from reactos/hal/halx86/include/apic.h rename to hal/halx86/include/apic.h diff --git a/reactos/hal/halx86/include/bus.h b/hal/halx86/include/bus.h similarity index 100% rename from reactos/hal/halx86/include/bus.h rename to hal/halx86/include/bus.h diff --git a/reactos/hal/halx86/include/hal.h b/hal/halx86/include/hal.h similarity index 100% rename from reactos/hal/halx86/include/hal.h rename to hal/halx86/include/hal.h diff --git a/reactos/hal/halx86/include/halacpi.h b/hal/halx86/include/halacpi.h similarity index 100% rename from reactos/hal/halx86/include/halacpi.h rename to hal/halx86/include/halacpi.h diff --git a/reactos/hal/halx86/include/haldma.h b/hal/halx86/include/haldma.h similarity index 100% rename from reactos/hal/halx86/include/haldma.h rename to hal/halx86/include/haldma.h diff --git a/reactos/hal/halx86/include/halirq.h b/hal/halx86/include/halirq.h similarity index 100% rename from reactos/hal/halx86/include/halirq.h rename to hal/halx86/include/halirq.h diff --git a/reactos/hal/halx86/include/halp.h b/hal/halx86/include/halp.h similarity index 100% rename from reactos/hal/halx86/include/halp.h rename to hal/halx86/include/halp.h diff --git a/reactos/hal/halx86/include/ioapic.h b/hal/halx86/include/ioapic.h similarity index 100% rename from reactos/hal/halx86/include/ioapic.h rename to hal/halx86/include/ioapic.h diff --git a/reactos/hal/halx86/include/mps.h b/hal/halx86/include/mps.h similarity index 100% rename from reactos/hal/halx86/include/mps.h rename to hal/halx86/include/mps.h diff --git a/reactos/hal/halx86/legacy/bus/bushndlr.c b/hal/halx86/legacy/bus/bushndlr.c similarity index 100% rename from reactos/hal/halx86/legacy/bus/bushndlr.c rename to hal/halx86/legacy/bus/bushndlr.c diff --git a/reactos/hal/halx86/legacy/bus/cmosbus.c b/hal/halx86/legacy/bus/cmosbus.c similarity index 100% rename from reactos/hal/halx86/legacy/bus/cmosbus.c rename to hal/halx86/legacy/bus/cmosbus.c diff --git a/reactos/hal/halx86/legacy/bus/isabus.c b/hal/halx86/legacy/bus/isabus.c similarity index 100% rename from reactos/hal/halx86/legacy/bus/isabus.c rename to hal/halx86/legacy/bus/isabus.c diff --git a/reactos/hal/halx86/legacy/bus/libpcidata.a b/hal/halx86/legacy/bus/libpcidata.a similarity index 100% rename from reactos/hal/halx86/legacy/bus/libpcidata.a rename to hal/halx86/legacy/bus/libpcidata.a diff --git a/reactos/hal/halx86/legacy/bus/pcibus.c b/hal/halx86/legacy/bus/pcibus.c similarity index 100% rename from reactos/hal/halx86/legacy/bus/pcibus.c rename to hal/halx86/legacy/bus/pcibus.c diff --git a/reactos/hal/halx86/legacy/bus/pcidata.c b/hal/halx86/legacy/bus/pcidata.c similarity index 100% rename from reactos/hal/halx86/legacy/bus/pcidata.c rename to hal/halx86/legacy/bus/pcidata.c diff --git a/reactos/hal/halx86/legacy/bus/sysbus.c b/hal/halx86/legacy/bus/sysbus.c similarity index 100% rename from reactos/hal/halx86/legacy/bus/sysbus.c rename to hal/halx86/legacy/bus/sysbus.c diff --git a/reactos/hal/halx86/legacy/bussupp.c b/hal/halx86/legacy/bussupp.c similarity index 100% rename from reactos/hal/halx86/legacy/bussupp.c rename to hal/halx86/legacy/bussupp.c diff --git a/reactos/hal/halx86/legacy/halpcat.c b/hal/halx86/legacy/halpcat.c similarity index 100% rename from reactos/hal/halx86/legacy/halpcat.c rename to hal/halx86/legacy/halpcat.c diff --git a/reactos/hal/halx86/legacy/halpnpdd.c b/hal/halx86/legacy/halpnpdd.c similarity index 100% rename from reactos/hal/halx86/legacy/halpnpdd.c rename to hal/halx86/legacy/halpnpdd.c diff --git a/reactos/hal/halx86/mp/apic.c b/hal/halx86/mp/apic.c similarity index 100% rename from reactos/hal/halx86/mp/apic.c rename to hal/halx86/mp/apic.c diff --git a/reactos/hal/halx86/mp/halinit_mp.c b/hal/halx86/mp/halinit_mp.c similarity index 100% rename from reactos/hal/halx86/mp/halinit_mp.c rename to hal/halx86/mp/halinit_mp.c diff --git a/reactos/hal/halx86/mp/halmp.rc b/hal/halx86/mp/halmp.rc similarity index 100% rename from reactos/hal/halx86/mp/halmp.rc rename to hal/halx86/mp/halmp.rc diff --git a/reactos/hal/halx86/mp/ioapic.c b/hal/halx86/mp/ioapic.c similarity index 100% rename from reactos/hal/halx86/mp/ioapic.c rename to hal/halx86/mp/ioapic.c diff --git a/reactos/hal/halx86/mp/ipi_mp.c b/hal/halx86/mp/ipi_mp.c similarity index 100% rename from reactos/hal/halx86/mp/ipi_mp.c rename to hal/halx86/mp/ipi_mp.c diff --git a/reactos/hal/halx86/mp/mpconfig.c b/hal/halx86/mp/mpconfig.c similarity index 100% rename from reactos/hal/halx86/mp/mpconfig.c rename to hal/halx86/mp/mpconfig.c diff --git a/reactos/hal/halx86/mp/mps.S b/hal/halx86/mp/mps.S similarity index 100% rename from reactos/hal/halx86/mp/mps.S rename to hal/halx86/mp/mps.S diff --git a/reactos/hal/halx86/mp/mpsboot.asm b/hal/halx86/mp/mpsboot.asm similarity index 100% rename from reactos/hal/halx86/mp/mpsboot.asm rename to hal/halx86/mp/mpsboot.asm diff --git a/reactos/hal/halx86/mp/mpsirql.c b/hal/halx86/mp/mpsirql.c similarity index 100% rename from reactos/hal/halx86/mp/mpsirql.c rename to hal/halx86/mp/mpsirql.c diff --git a/reactos/hal/halx86/mp/processor_mp.c b/hal/halx86/mp/processor_mp.c similarity index 100% rename from reactos/hal/halx86/mp/processor_mp.c rename to hal/halx86/mp/processor_mp.c diff --git a/reactos/hal/halx86/up/halinit_mini.c b/hal/halx86/up/halinit_mini.c similarity index 100% rename from reactos/hal/halx86/up/halinit_mini.c rename to hal/halx86/up/halinit_mini.c diff --git a/reactos/hal/halx86/up/halinit_up.c b/hal/halx86/up/halinit_up.c similarity index 100% rename from reactos/hal/halx86/up/halinit_up.c rename to hal/halx86/up/halinit_up.c diff --git a/reactos/hal/halx86/up/halup.rc b/hal/halx86/up/halup.rc similarity index 100% rename from reactos/hal/halx86/up/halup.rc rename to hal/halx86/up/halup.rc diff --git a/reactos/hal/halx86/up/pic.c b/hal/halx86/up/pic.c similarity index 100% rename from reactos/hal/halx86/up/pic.c rename to hal/halx86/up/pic.c diff --git a/reactos/hal/halx86/up/processor.c b/hal/halx86/up/processor.c similarity index 100% rename from reactos/hal/halx86/up/processor.c rename to hal/halx86/up/processor.c diff --git a/reactos/hal/halx86/xbox/halinit_xbox.c b/hal/halx86/xbox/halinit_xbox.c similarity index 100% rename from reactos/hal/halx86/xbox/halinit_xbox.c rename to hal/halx86/xbox/halinit_xbox.c diff --git a/reactos/hal/halx86/xbox/halxbox.h b/hal/halx86/xbox/halxbox.h similarity index 100% rename from reactos/hal/halx86/xbox/halxbox.h rename to hal/halx86/xbox/halxbox.h diff --git a/reactos/hal/halx86/xbox/halxbox.rc b/hal/halx86/xbox/halxbox.rc similarity index 100% rename from reactos/hal/halx86/xbox/halxbox.rc rename to hal/halx86/xbox/halxbox.rc diff --git a/reactos/hal/halx86/xbox/part_xbox.c b/hal/halx86/xbox/part_xbox.c similarity index 100% rename from reactos/hal/halx86/xbox/part_xbox.c rename to hal/halx86/xbox/part_xbox.c diff --git a/reactos/importlibs/libcoldname.a b/importlibs/libcoldname.a similarity index 100% rename from reactos/importlibs/libcoldname.a rename to importlibs/libcoldname.a diff --git a/reactos/importlibs/libgcc.a b/importlibs/libgcc.a similarity index 100% rename from reactos/importlibs/libgcc.a rename to importlibs/libgcc.a diff --git a/reactos/importlibs/libmingw32.a b/importlibs/libmingw32.a similarity index 100% rename from reactos/importlibs/libmingw32.a rename to importlibs/libmingw32.a diff --git a/reactos/importlibs/libmingwex.a b/importlibs/libmingwex.a similarity index 100% rename from reactos/importlibs/libmingwex.a rename to importlibs/libmingwex.a diff --git a/reactos/importlibs/libsupc++.a b/importlibs/libsupc++.a similarity index 100% rename from reactos/importlibs/libsupc++.a rename to importlibs/libsupc++.a diff --git a/reactos/importlibs/oldnames.lib b/importlibs/oldnames.lib similarity index 100% rename from reactos/importlibs/oldnames.lib rename to importlibs/oldnames.lib diff --git a/reactos/include/GL/gl.h b/include/GL/gl.h similarity index 100% rename from reactos/include/GL/gl.h rename to include/GL/gl.h diff --git a/reactos/include/GL/glext.h b/include/GL/glext.h similarity index 100% rename from reactos/include/GL/glext.h rename to include/GL/glext.h diff --git a/reactos/include/GL/glu.h b/include/GL/glu.h similarity index 100% rename from reactos/include/GL/glu.h rename to include/GL/glu.h diff --git a/reactos/include/asm/CMakeLists.txt b/include/asm/CMakeLists.txt similarity index 100% rename from reactos/include/asm/CMakeLists.txt rename to include/asm/CMakeLists.txt diff --git a/reactos/include/asm/asm.inc b/include/asm/asm.inc similarity index 100% rename from reactos/include/asm/asm.inc rename to include/asm/asm.inc diff --git a/reactos/include/asm/genincdata.c b/include/asm/genincdata.c similarity index 100% rename from reactos/include/asm/genincdata.c rename to include/asm/genincdata.c diff --git a/reactos/include/asm/ks386.template.h b/include/asm/ks386.template.h similarity index 100% rename from reactos/include/asm/ks386.template.h rename to include/asm/ks386.template.h diff --git a/reactos/include/asm/ksamd64.template.h b/include/asm/ksamd64.template.h similarity index 100% rename from reactos/include/asm/ksamd64.template.h rename to include/asm/ksamd64.template.h diff --git a/reactos/include/asm/ksx.template.h b/include/asm/ksx.template.h similarity index 100% rename from reactos/include/asm/ksx.template.h rename to include/asm/ksx.template.h diff --git a/reactos/include/asm/syscalls.inc b/include/asm/syscalls.inc similarity index 100% rename from reactos/include/asm/syscalls.inc rename to include/asm/syscalls.inc diff --git a/reactos/include/asm/trapamd64.inc b/include/asm/trapamd64.inc similarity index 100% rename from reactos/include/asm/trapamd64.inc rename to include/asm/trapamd64.inc diff --git a/reactos/include/c++/cerrno b/include/c++/cerrno similarity index 100% rename from reactos/include/c++/cerrno rename to include/c++/cerrno diff --git a/reactos/include/c++/cfloat b/include/c++/cfloat similarity index 100% rename from reactos/include/c++/cfloat rename to include/c++/cfloat diff --git a/reactos/include/c++/climits b/include/c++/climits similarity index 100% rename from reactos/include/c++/climits rename to include/c++/climits diff --git a/reactos/include/c++/clocale b/include/c++/clocale similarity index 100% rename from reactos/include/c++/clocale rename to include/c++/clocale diff --git a/reactos/include/c++/cmath b/include/c++/cmath similarity index 100% rename from reactos/include/c++/cmath rename to include/c++/cmath diff --git a/reactos/include/c++/cstddef b/include/c++/cstddef similarity index 100% rename from reactos/include/c++/cstddef rename to include/c++/cstddef diff --git a/reactos/include/c++/cstdio b/include/c++/cstdio similarity index 100% rename from reactos/include/c++/cstdio rename to include/c++/cstdio diff --git a/reactos/include/c++/cstdlib b/include/c++/cstdlib similarity index 100% rename from reactos/include/c++/cstdlib rename to include/c++/cstdlib diff --git a/reactos/include/c++/cstring b/include/c++/cstring similarity index 100% rename from reactos/include/c++/cstring rename to include/c++/cstring diff --git a/reactos/include/c++/ctime b/include/c++/ctime similarity index 100% rename from reactos/include/c++/ctime rename to include/c++/ctime diff --git a/reactos/include/c++/cwchar b/include/c++/cwchar similarity index 100% rename from reactos/include/c++/cwchar rename to include/c++/cwchar diff --git a/reactos/include/c++/exception b/include/c++/exception similarity index 100% rename from reactos/include/c++/exception rename to include/c++/exception diff --git a/reactos/include/c++/new b/include/c++/new similarity index 100% rename from reactos/include/c++/new rename to include/c++/new diff --git a/reactos/include/c++/stlport/algorithm b/include/c++/stlport/algorithm similarity index 100% rename from reactos/include/c++/stlport/algorithm rename to include/c++/stlport/algorithm diff --git a/reactos/include/c++/stlport/assert.h b/include/c++/stlport/assert.h similarity index 100% rename from reactos/include/c++/stlport/assert.h rename to include/c++/stlport/assert.h diff --git a/reactos/include/c++/stlport/bitset b/include/c++/stlport/bitset similarity index 100% rename from reactos/include/c++/stlport/bitset rename to include/c++/stlport/bitset diff --git a/reactos/include/c++/stlport/cassert b/include/c++/stlport/cassert similarity index 100% rename from reactos/include/c++/stlport/cassert rename to include/c++/stlport/cassert diff --git a/reactos/include/c++/stlport/cctype b/include/c++/stlport/cctype similarity index 100% rename from reactos/include/c++/stlport/cctype rename to include/c++/stlport/cctype diff --git a/reactos/include/c++/stlport/cerrno b/include/c++/stlport/cerrno similarity index 100% rename from reactos/include/c++/stlport/cerrno rename to include/c++/stlport/cerrno diff --git a/reactos/include/c++/stlport/cfloat b/include/c++/stlport/cfloat similarity index 100% rename from reactos/include/c++/stlport/cfloat rename to include/c++/stlport/cfloat diff --git a/reactos/include/c++/stlport/ciso646 b/include/c++/stlport/ciso646 similarity index 100% rename from reactos/include/c++/stlport/ciso646 rename to include/c++/stlport/ciso646 diff --git a/reactos/include/c++/stlport/climits b/include/c++/stlport/climits similarity index 100% rename from reactos/include/c++/stlport/climits rename to include/c++/stlport/climits diff --git a/reactos/include/c++/stlport/clocale b/include/c++/stlport/clocale similarity index 100% rename from reactos/include/c++/stlport/clocale rename to include/c++/stlport/clocale diff --git a/reactos/include/c++/stlport/cmath b/include/c++/stlport/cmath similarity index 100% rename from reactos/include/c++/stlport/cmath rename to include/c++/stlport/cmath diff --git a/reactos/include/c++/stlport/complex b/include/c++/stlport/complex similarity index 100% rename from reactos/include/c++/stlport/complex rename to include/c++/stlport/complex diff --git a/reactos/include/c++/stlport/csetjmp b/include/c++/stlport/csetjmp similarity index 100% rename from reactos/include/c++/stlport/csetjmp rename to include/c++/stlport/csetjmp diff --git a/reactos/include/c++/stlport/csignal b/include/c++/stlport/csignal similarity index 100% rename from reactos/include/c++/stlport/csignal rename to include/c++/stlport/csignal diff --git a/reactos/include/c++/stlport/cstdarg b/include/c++/stlport/cstdarg similarity index 100% rename from reactos/include/c++/stlport/cstdarg rename to include/c++/stlport/cstdarg diff --git a/reactos/include/c++/stlport/cstddef b/include/c++/stlport/cstddef similarity index 100% rename from reactos/include/c++/stlport/cstddef rename to include/c++/stlport/cstddef diff --git a/reactos/include/c++/stlport/cstdio b/include/c++/stlport/cstdio similarity index 100% rename from reactos/include/c++/stlport/cstdio rename to include/c++/stlport/cstdio diff --git a/reactos/include/c++/stlport/cstdlib b/include/c++/stlport/cstdlib similarity index 100% rename from reactos/include/c++/stlport/cstdlib rename to include/c++/stlport/cstdlib diff --git a/reactos/include/c++/stlport/cstring b/include/c++/stlport/cstring similarity index 100% rename from reactos/include/c++/stlport/cstring rename to include/c++/stlport/cstring diff --git a/reactos/include/c++/stlport/ctime b/include/c++/stlport/ctime similarity index 100% rename from reactos/include/c++/stlport/ctime rename to include/c++/stlport/ctime diff --git a/reactos/include/c++/stlport/ctype.h b/include/c++/stlport/ctype.h similarity index 100% rename from reactos/include/c++/stlport/ctype.h rename to include/c++/stlport/ctype.h diff --git a/reactos/include/c++/stlport/cwchar b/include/c++/stlport/cwchar similarity index 100% rename from reactos/include/c++/stlport/cwchar rename to include/c++/stlport/cwchar diff --git a/reactos/include/c++/stlport/cwctype b/include/c++/stlport/cwctype similarity index 100% rename from reactos/include/c++/stlport/cwctype rename to include/c++/stlport/cwctype diff --git a/reactos/include/c++/stlport/deque b/include/c++/stlport/deque similarity index 100% rename from reactos/include/c++/stlport/deque rename to include/c++/stlport/deque diff --git a/reactos/include/c++/stlport/errno.h b/include/c++/stlport/errno.h similarity index 100% rename from reactos/include/c++/stlport/errno.h rename to include/c++/stlport/errno.h diff --git a/reactos/include/c++/stlport/exception b/include/c++/stlport/exception similarity index 100% rename from reactos/include/c++/stlport/exception rename to include/c++/stlport/exception diff --git a/reactos/include/c++/stlport/exception.h b/include/c++/stlport/exception.h similarity index 100% rename from reactos/include/c++/stlport/exception.h rename to include/c++/stlport/exception.h diff --git a/reactos/include/c++/stlport/float.h b/include/c++/stlport/float.h similarity index 100% rename from reactos/include/c++/stlport/float.h rename to include/c++/stlport/float.h diff --git a/reactos/include/c++/stlport/fstream b/include/c++/stlport/fstream similarity index 100% rename from reactos/include/c++/stlport/fstream rename to include/c++/stlport/fstream diff --git a/reactos/include/c++/stlport/fstream.h b/include/c++/stlport/fstream.h similarity index 100% rename from reactos/include/c++/stlport/fstream.h rename to include/c++/stlport/fstream.h diff --git a/reactos/include/c++/stlport/functional b/include/c++/stlport/functional similarity index 100% rename from reactos/include/c++/stlport/functional rename to include/c++/stlport/functional diff --git a/reactos/include/c++/stlport/hash_map b/include/c++/stlport/hash_map similarity index 100% rename from reactos/include/c++/stlport/hash_map rename to include/c++/stlport/hash_map diff --git a/reactos/include/c++/stlport/hash_set b/include/c++/stlport/hash_set similarity index 100% rename from reactos/include/c++/stlport/hash_set rename to include/c++/stlport/hash_set diff --git a/reactos/include/c++/stlport/iomanip b/include/c++/stlport/iomanip similarity index 100% rename from reactos/include/c++/stlport/iomanip rename to include/c++/stlport/iomanip diff --git a/reactos/include/c++/stlport/iomanip.h b/include/c++/stlport/iomanip.h similarity index 100% rename from reactos/include/c++/stlport/iomanip.h rename to include/c++/stlport/iomanip.h diff --git a/reactos/include/c++/stlport/ios b/include/c++/stlport/ios similarity index 100% rename from reactos/include/c++/stlport/ios rename to include/c++/stlport/ios diff --git a/reactos/include/c++/stlport/ios.h b/include/c++/stlport/ios.h similarity index 100% rename from reactos/include/c++/stlport/ios.h rename to include/c++/stlport/ios.h diff --git a/reactos/include/c++/stlport/iosfwd b/include/c++/stlport/iosfwd similarity index 100% rename from reactos/include/c++/stlport/iosfwd rename to include/c++/stlport/iosfwd diff --git a/reactos/include/c++/stlport/iostream b/include/c++/stlport/iostream similarity index 100% rename from reactos/include/c++/stlport/iostream rename to include/c++/stlport/iostream diff --git a/reactos/include/c++/stlport/iostream.h b/include/c++/stlport/iostream.h similarity index 100% rename from reactos/include/c++/stlport/iostream.h rename to include/c++/stlport/iostream.h diff --git a/reactos/include/c++/stlport/iso646.h b/include/c++/stlport/iso646.h similarity index 100% rename from reactos/include/c++/stlport/iso646.h rename to include/c++/stlport/iso646.h diff --git a/reactos/include/c++/stlport/istream b/include/c++/stlport/istream similarity index 100% rename from reactos/include/c++/stlport/istream rename to include/c++/stlport/istream diff --git a/reactos/include/c++/stlport/istream.h b/include/c++/stlport/istream.h similarity index 100% rename from reactos/include/c++/stlport/istream.h rename to include/c++/stlport/istream.h diff --git a/reactos/include/c++/stlport/iterator b/include/c++/stlport/iterator similarity index 100% rename from reactos/include/c++/stlport/iterator rename to include/c++/stlport/iterator diff --git a/reactos/include/c++/stlport/limits b/include/c++/stlport/limits similarity index 100% rename from reactos/include/c++/stlport/limits rename to include/c++/stlport/limits diff --git a/reactos/include/c++/stlport/limits.h b/include/c++/stlport/limits.h similarity index 100% rename from reactos/include/c++/stlport/limits.h rename to include/c++/stlport/limits.h diff --git a/reactos/include/c++/stlport/list b/include/c++/stlport/list similarity index 100% rename from reactos/include/c++/stlport/list rename to include/c++/stlport/list diff --git a/reactos/include/c++/stlport/locale b/include/c++/stlport/locale similarity index 100% rename from reactos/include/c++/stlport/locale rename to include/c++/stlport/locale diff --git a/reactos/include/c++/stlport/locale.h b/include/c++/stlport/locale.h similarity index 100% rename from reactos/include/c++/stlport/locale.h rename to include/c++/stlport/locale.h diff --git a/reactos/include/c++/stlport/map b/include/c++/stlport/map similarity index 100% rename from reactos/include/c++/stlport/map rename to include/c++/stlport/map diff --git a/reactos/include/c++/stlport/math.h b/include/c++/stlport/math.h similarity index 100% rename from reactos/include/c++/stlport/math.h rename to include/c++/stlport/math.h diff --git a/reactos/include/c++/stlport/mem.h b/include/c++/stlport/mem.h similarity index 100% rename from reactos/include/c++/stlport/mem.h rename to include/c++/stlport/mem.h diff --git a/reactos/include/c++/stlport/memory b/include/c++/stlport/memory similarity index 100% rename from reactos/include/c++/stlport/memory rename to include/c++/stlport/memory diff --git a/reactos/include/c++/stlport/new b/include/c++/stlport/new similarity index 100% rename from reactos/include/c++/stlport/new rename to include/c++/stlport/new diff --git a/reactos/include/c++/stlport/new.h b/include/c++/stlport/new.h similarity index 100% rename from reactos/include/c++/stlport/new.h rename to include/c++/stlport/new.h diff --git a/reactos/include/c++/stlport/numeric b/include/c++/stlport/numeric similarity index 100% rename from reactos/include/c++/stlport/numeric rename to include/c++/stlport/numeric diff --git a/reactos/include/c++/stlport/ostream b/include/c++/stlport/ostream similarity index 100% rename from reactos/include/c++/stlport/ostream rename to include/c++/stlport/ostream diff --git a/reactos/include/c++/stlport/ostream.h b/include/c++/stlport/ostream.h similarity index 100% rename from reactos/include/c++/stlport/ostream.h rename to include/c++/stlport/ostream.h diff --git a/reactos/include/c++/stlport/pthread.h b/include/c++/stlport/pthread.h similarity index 100% rename from reactos/include/c++/stlport/pthread.h rename to include/c++/stlport/pthread.h diff --git a/reactos/include/c++/stlport/pthread_alloc b/include/c++/stlport/pthread_alloc similarity index 100% rename from reactos/include/c++/stlport/pthread_alloc rename to include/c++/stlport/pthread_alloc diff --git a/reactos/include/c++/stlport/queue b/include/c++/stlport/queue similarity index 100% rename from reactos/include/c++/stlport/queue rename to include/c++/stlport/queue diff --git a/reactos/include/c++/stlport/rlocks.h b/include/c++/stlport/rlocks.h similarity index 100% rename from reactos/include/c++/stlport/rlocks.h rename to include/c++/stlport/rlocks.h diff --git a/reactos/include/c++/stlport/rope b/include/c++/stlport/rope similarity index 100% rename from reactos/include/c++/stlport/rope rename to include/c++/stlport/rope diff --git a/reactos/include/c++/stlport/set b/include/c++/stlport/set similarity index 100% rename from reactos/include/c++/stlport/set rename to include/c++/stlport/set diff --git a/reactos/include/c++/stlport/setjmp.h b/include/c++/stlport/setjmp.h similarity index 100% rename from reactos/include/c++/stlport/setjmp.h rename to include/c++/stlport/setjmp.h diff --git a/reactos/include/c++/stlport/signal.h b/include/c++/stlport/signal.h similarity index 100% rename from reactos/include/c++/stlport/signal.h rename to include/c++/stlport/signal.h diff --git a/reactos/include/c++/stlport/slist b/include/c++/stlport/slist similarity index 100% rename from reactos/include/c++/stlport/slist rename to include/c++/stlport/slist diff --git a/reactos/include/c++/stlport/sstream b/include/c++/stlport/sstream similarity index 100% rename from reactos/include/c++/stlport/sstream rename to include/c++/stlport/sstream diff --git a/reactos/include/c++/stlport/stack b/include/c++/stlport/stack similarity index 100% rename from reactos/include/c++/stlport/stack rename to include/c++/stlport/stack diff --git a/reactos/include/c++/stlport/stdarg.h b/include/c++/stlport/stdarg.h similarity index 100% rename from reactos/include/c++/stlport/stdarg.h rename to include/c++/stlport/stdarg.h diff --git a/reactos/include/c++/stlport/stddef.h b/include/c++/stlport/stddef.h similarity index 100% rename from reactos/include/c++/stlport/stddef.h rename to include/c++/stlport/stddef.h diff --git a/reactos/include/c++/stlport/stdexcept b/include/c++/stlport/stdexcept similarity index 100% rename from reactos/include/c++/stlport/stdexcept rename to include/c++/stlport/stdexcept diff --git a/reactos/include/c++/stlport/stdio.h b/include/c++/stlport/stdio.h similarity index 100% rename from reactos/include/c++/stlport/stdio.h rename to include/c++/stlport/stdio.h diff --git a/reactos/include/c++/stlport/stdiostream.h b/include/c++/stlport/stdiostream.h similarity index 100% rename from reactos/include/c++/stlport/stdiostream.h rename to include/c++/stlport/stdiostream.h diff --git a/reactos/include/c++/stlport/stdlib.h b/include/c++/stlport/stdlib.h similarity index 100% rename from reactos/include/c++/stlport/stdlib.h rename to include/c++/stlport/stdlib.h diff --git a/reactos/include/c++/stlport/stl/_abbrevs.h b/include/c++/stlport/stl/_abbrevs.h similarity index 100% rename from reactos/include/c++/stlport/stl/_abbrevs.h rename to include/c++/stlport/stl/_abbrevs.h diff --git a/reactos/include/c++/stlport/stl/_algo.c b/include/c++/stlport/stl/_algo.c similarity index 100% rename from reactos/include/c++/stlport/stl/_algo.c rename to include/c++/stlport/stl/_algo.c diff --git a/reactos/include/c++/stlport/stl/_algo.h b/include/c++/stlport/stl/_algo.h similarity index 100% rename from reactos/include/c++/stlport/stl/_algo.h rename to include/c++/stlport/stl/_algo.h diff --git a/reactos/include/c++/stlport/stl/_algobase.c b/include/c++/stlport/stl/_algobase.c similarity index 100% rename from reactos/include/c++/stlport/stl/_algobase.c rename to include/c++/stlport/stl/_algobase.c diff --git a/reactos/include/c++/stlport/stl/_algobase.h b/include/c++/stlport/stl/_algobase.h similarity index 100% rename from reactos/include/c++/stlport/stl/_algobase.h rename to include/c++/stlport/stl/_algobase.h diff --git a/reactos/include/c++/stlport/stl/_alloc.c b/include/c++/stlport/stl/_alloc.c similarity index 100% rename from reactos/include/c++/stlport/stl/_alloc.c rename to include/c++/stlport/stl/_alloc.c diff --git a/reactos/include/c++/stlport/stl/_alloc.h b/include/c++/stlport/stl/_alloc.h similarity index 100% rename from reactos/include/c++/stlport/stl/_alloc.h rename to include/c++/stlport/stl/_alloc.h diff --git a/reactos/include/c++/stlport/stl/_auto_ptr.h b/include/c++/stlport/stl/_auto_ptr.h similarity index 100% rename from reactos/include/c++/stlport/stl/_auto_ptr.h rename to include/c++/stlport/stl/_auto_ptr.h diff --git a/reactos/include/c++/stlport/stl/_bitset.c b/include/c++/stlport/stl/_bitset.c similarity index 100% rename from reactos/include/c++/stlport/stl/_bitset.c rename to include/c++/stlport/stl/_bitset.c diff --git a/reactos/include/c++/stlport/stl/_bitset.h b/include/c++/stlport/stl/_bitset.h similarity index 100% rename from reactos/include/c++/stlport/stl/_bitset.h rename to include/c++/stlport/stl/_bitset.h diff --git a/reactos/include/c++/stlport/stl/_bvector.h b/include/c++/stlport/stl/_bvector.h similarity index 100% rename from reactos/include/c++/stlport/stl/_bvector.h rename to include/c++/stlport/stl/_bvector.h diff --git a/reactos/include/c++/stlport/stl/_carray.h b/include/c++/stlport/stl/_carray.h similarity index 100% rename from reactos/include/c++/stlport/stl/_carray.h rename to include/c++/stlport/stl/_carray.h diff --git a/reactos/include/c++/stlport/stl/_cctype.h b/include/c++/stlport/stl/_cctype.h similarity index 100% rename from reactos/include/c++/stlport/stl/_cctype.h rename to include/c++/stlport/stl/_cctype.h diff --git a/reactos/include/c++/stlport/stl/_clocale.h b/include/c++/stlport/stl/_clocale.h similarity index 100% rename from reactos/include/c++/stlport/stl/_clocale.h rename to include/c++/stlport/stl/_clocale.h diff --git a/reactos/include/c++/stlport/stl/_cmath.h b/include/c++/stlport/stl/_cmath.h similarity index 100% rename from reactos/include/c++/stlport/stl/_cmath.h rename to include/c++/stlport/stl/_cmath.h diff --git a/reactos/include/c++/stlport/stl/_codecvt.h b/include/c++/stlport/stl/_codecvt.h similarity index 100% rename from reactos/include/c++/stlport/stl/_codecvt.h rename to include/c++/stlport/stl/_codecvt.h diff --git a/reactos/include/c++/stlport/stl/_collate.h b/include/c++/stlport/stl/_collate.h similarity index 100% rename from reactos/include/c++/stlport/stl/_collate.h rename to include/c++/stlport/stl/_collate.h diff --git a/reactos/include/c++/stlport/stl/_complex.c b/include/c++/stlport/stl/_complex.c similarity index 100% rename from reactos/include/c++/stlport/stl/_complex.c rename to include/c++/stlport/stl/_complex.c diff --git a/reactos/include/c++/stlport/stl/_complex.h b/include/c++/stlport/stl/_complex.h similarity index 100% rename from reactos/include/c++/stlport/stl/_complex.h rename to include/c++/stlport/stl/_complex.h diff --git a/reactos/include/c++/stlport/stl/_config_compat_post.h b/include/c++/stlport/stl/_config_compat_post.h similarity index 100% rename from reactos/include/c++/stlport/stl/_config_compat_post.h rename to include/c++/stlport/stl/_config_compat_post.h diff --git a/reactos/include/c++/stlport/stl/_construct.h b/include/c++/stlport/stl/_construct.h similarity index 100% rename from reactos/include/c++/stlport/stl/_construct.h rename to include/c++/stlport/stl/_construct.h diff --git a/reactos/include/c++/stlport/stl/_cprolog.h b/include/c++/stlport/stl/_cprolog.h similarity index 100% rename from reactos/include/c++/stlport/stl/_cprolog.h rename to include/c++/stlport/stl/_cprolog.h diff --git a/reactos/include/c++/stlport/stl/_csetjmp.h b/include/c++/stlport/stl/_csetjmp.h similarity index 100% rename from reactos/include/c++/stlport/stl/_csetjmp.h rename to include/c++/stlport/stl/_csetjmp.h diff --git a/reactos/include/c++/stlport/stl/_csignal.h b/include/c++/stlport/stl/_csignal.h similarity index 100% rename from reactos/include/c++/stlport/stl/_csignal.h rename to include/c++/stlport/stl/_csignal.h diff --git a/reactos/include/c++/stlport/stl/_cstdarg.h b/include/c++/stlport/stl/_cstdarg.h similarity index 100% rename from reactos/include/c++/stlport/stl/_cstdarg.h rename to include/c++/stlport/stl/_cstdarg.h diff --git a/reactos/include/c++/stlport/stl/_cstddef.h b/include/c++/stlport/stl/_cstddef.h similarity index 100% rename from reactos/include/c++/stlport/stl/_cstddef.h rename to include/c++/stlport/stl/_cstddef.h diff --git a/reactos/include/c++/stlport/stl/_cstdio.h b/include/c++/stlport/stl/_cstdio.h similarity index 100% rename from reactos/include/c++/stlport/stl/_cstdio.h rename to include/c++/stlport/stl/_cstdio.h diff --git a/reactos/include/c++/stlport/stl/_cstdlib.h b/include/c++/stlport/stl/_cstdlib.h similarity index 100% rename from reactos/include/c++/stlport/stl/_cstdlib.h rename to include/c++/stlport/stl/_cstdlib.h diff --git a/reactos/include/c++/stlport/stl/_cstring.h b/include/c++/stlport/stl/_cstring.h similarity index 100% rename from reactos/include/c++/stlport/stl/_cstring.h rename to include/c++/stlport/stl/_cstring.h diff --git a/reactos/include/c++/stlport/stl/_ctime.h b/include/c++/stlport/stl/_ctime.h similarity index 100% rename from reactos/include/c++/stlport/stl/_ctime.h rename to include/c++/stlport/stl/_ctime.h diff --git a/reactos/include/c++/stlport/stl/_ctraits_fns.h b/include/c++/stlport/stl/_ctraits_fns.h similarity index 100% rename from reactos/include/c++/stlport/stl/_ctraits_fns.h rename to include/c++/stlport/stl/_ctraits_fns.h diff --git a/reactos/include/c++/stlport/stl/_ctype.h b/include/c++/stlport/stl/_ctype.h similarity index 100% rename from reactos/include/c++/stlport/stl/_ctype.h rename to include/c++/stlport/stl/_ctype.h diff --git a/reactos/include/c++/stlport/stl/_cwchar.h b/include/c++/stlport/stl/_cwchar.h similarity index 100% rename from reactos/include/c++/stlport/stl/_cwchar.h rename to include/c++/stlport/stl/_cwchar.h diff --git a/reactos/include/c++/stlport/stl/_cwctype.h b/include/c++/stlport/stl/_cwctype.h similarity index 100% rename from reactos/include/c++/stlport/stl/_cwctype.h rename to include/c++/stlport/stl/_cwctype.h diff --git a/reactos/include/c++/stlport/stl/_deque.c b/include/c++/stlport/stl/_deque.c similarity index 100% rename from reactos/include/c++/stlport/stl/_deque.c rename to include/c++/stlport/stl/_deque.c diff --git a/reactos/include/c++/stlport/stl/_deque.h b/include/c++/stlport/stl/_deque.h similarity index 100% rename from reactos/include/c++/stlport/stl/_deque.h rename to include/c++/stlport/stl/_deque.h diff --git a/reactos/include/c++/stlport/stl/_epilog.h b/include/c++/stlport/stl/_epilog.h similarity index 100% rename from reactos/include/c++/stlport/stl/_epilog.h rename to include/c++/stlport/stl/_epilog.h diff --git a/reactos/include/c++/stlport/stl/_exception.h b/include/c++/stlport/stl/_exception.h similarity index 100% rename from reactos/include/c++/stlport/stl/_exception.h rename to include/c++/stlport/stl/_exception.h diff --git a/reactos/include/c++/stlport/stl/_facets_fwd.h b/include/c++/stlport/stl/_facets_fwd.h similarity index 100% rename from reactos/include/c++/stlport/stl/_facets_fwd.h rename to include/c++/stlport/stl/_facets_fwd.h diff --git a/reactos/include/c++/stlport/stl/_fstream.c b/include/c++/stlport/stl/_fstream.c similarity index 100% rename from reactos/include/c++/stlport/stl/_fstream.c rename to include/c++/stlport/stl/_fstream.c diff --git a/reactos/include/c++/stlport/stl/_fstream.h b/include/c++/stlport/stl/_fstream.h similarity index 100% rename from reactos/include/c++/stlport/stl/_fstream.h rename to include/c++/stlport/stl/_fstream.h diff --git a/reactos/include/c++/stlport/stl/_function.h b/include/c++/stlport/stl/_function.h similarity index 100% rename from reactos/include/c++/stlport/stl/_function.h rename to include/c++/stlport/stl/_function.h diff --git a/reactos/include/c++/stlport/stl/_function_adaptors.h b/include/c++/stlport/stl/_function_adaptors.h similarity index 100% rename from reactos/include/c++/stlport/stl/_function_adaptors.h rename to include/c++/stlport/stl/_function_adaptors.h diff --git a/reactos/include/c++/stlport/stl/_function_base.h b/include/c++/stlport/stl/_function_base.h similarity index 100% rename from reactos/include/c++/stlport/stl/_function_base.h rename to include/c++/stlport/stl/_function_base.h diff --git a/reactos/include/c++/stlport/stl/_hash_fun.h b/include/c++/stlport/stl/_hash_fun.h similarity index 100% rename from reactos/include/c++/stlport/stl/_hash_fun.h rename to include/c++/stlport/stl/_hash_fun.h diff --git a/reactos/include/c++/stlport/stl/_hash_map.h b/include/c++/stlport/stl/_hash_map.h similarity index 100% rename from reactos/include/c++/stlport/stl/_hash_map.h rename to include/c++/stlport/stl/_hash_map.h diff --git a/reactos/include/c++/stlport/stl/_hash_set.h b/include/c++/stlport/stl/_hash_set.h similarity index 100% rename from reactos/include/c++/stlport/stl/_hash_set.h rename to include/c++/stlport/stl/_hash_set.h diff --git a/reactos/include/c++/stlport/stl/_hashtable.c b/include/c++/stlport/stl/_hashtable.c similarity index 100% rename from reactos/include/c++/stlport/stl/_hashtable.c rename to include/c++/stlport/stl/_hashtable.c diff --git a/reactos/include/c++/stlport/stl/_hashtable.h b/include/c++/stlport/stl/_hashtable.h similarity index 100% rename from reactos/include/c++/stlport/stl/_hashtable.h rename to include/c++/stlport/stl/_hashtable.h diff --git a/reactos/include/c++/stlport/stl/_heap.c b/include/c++/stlport/stl/_heap.c similarity index 100% rename from reactos/include/c++/stlport/stl/_heap.c rename to include/c++/stlport/stl/_heap.c diff --git a/reactos/include/c++/stlport/stl/_heap.h b/include/c++/stlport/stl/_heap.h similarity index 100% rename from reactos/include/c++/stlport/stl/_heap.h rename to include/c++/stlport/stl/_heap.h diff --git a/reactos/include/c++/stlport/stl/_iomanip.h b/include/c++/stlport/stl/_iomanip.h similarity index 100% rename from reactos/include/c++/stlport/stl/_iomanip.h rename to include/c++/stlport/stl/_iomanip.h diff --git a/reactos/include/c++/stlport/stl/_ios.c b/include/c++/stlport/stl/_ios.c similarity index 100% rename from reactos/include/c++/stlport/stl/_ios.c rename to include/c++/stlport/stl/_ios.c diff --git a/reactos/include/c++/stlport/stl/_ios.h b/include/c++/stlport/stl/_ios.h similarity index 100% rename from reactos/include/c++/stlport/stl/_ios.h rename to include/c++/stlport/stl/_ios.h diff --git a/reactos/include/c++/stlport/stl/_ios_base.h b/include/c++/stlport/stl/_ios_base.h similarity index 100% rename from reactos/include/c++/stlport/stl/_ios_base.h rename to include/c++/stlport/stl/_ios_base.h diff --git a/reactos/include/c++/stlport/stl/_ioserr.h b/include/c++/stlport/stl/_ioserr.h similarity index 100% rename from reactos/include/c++/stlport/stl/_ioserr.h rename to include/c++/stlport/stl/_ioserr.h diff --git a/reactos/include/c++/stlport/stl/_iosfwd.h b/include/c++/stlport/stl/_iosfwd.h similarity index 100% rename from reactos/include/c++/stlport/stl/_iosfwd.h rename to include/c++/stlport/stl/_iosfwd.h diff --git a/reactos/include/c++/stlport/stl/_iostream_string.h b/include/c++/stlport/stl/_iostream_string.h similarity index 100% rename from reactos/include/c++/stlport/stl/_iostream_string.h rename to include/c++/stlport/stl/_iostream_string.h diff --git a/reactos/include/c++/stlport/stl/_istream.c b/include/c++/stlport/stl/_istream.c similarity index 100% rename from reactos/include/c++/stlport/stl/_istream.c rename to include/c++/stlport/stl/_istream.c diff --git a/reactos/include/c++/stlport/stl/_istream.h b/include/c++/stlport/stl/_istream.h similarity index 100% rename from reactos/include/c++/stlport/stl/_istream.h rename to include/c++/stlport/stl/_istream.h diff --git a/reactos/include/c++/stlport/stl/_istreambuf_iterator.h b/include/c++/stlport/stl/_istreambuf_iterator.h similarity index 100% rename from reactos/include/c++/stlport/stl/_istreambuf_iterator.h rename to include/c++/stlport/stl/_istreambuf_iterator.h diff --git a/reactos/include/c++/stlport/stl/_iterator.h b/include/c++/stlport/stl/_iterator.h similarity index 100% rename from reactos/include/c++/stlport/stl/_iterator.h rename to include/c++/stlport/stl/_iterator.h diff --git a/reactos/include/c++/stlport/stl/_iterator_base.h b/include/c++/stlport/stl/_iterator_base.h similarity index 100% rename from reactos/include/c++/stlport/stl/_iterator_base.h rename to include/c++/stlport/stl/_iterator_base.h diff --git a/reactos/include/c++/stlport/stl/_iterator_old.h b/include/c++/stlport/stl/_iterator_old.h similarity index 100% rename from reactos/include/c++/stlport/stl/_iterator_old.h rename to include/c++/stlport/stl/_iterator_old.h diff --git a/reactos/include/c++/stlport/stl/_limits.c b/include/c++/stlport/stl/_limits.c similarity index 100% rename from reactos/include/c++/stlport/stl/_limits.c rename to include/c++/stlport/stl/_limits.c diff --git a/reactos/include/c++/stlport/stl/_limits.h b/include/c++/stlport/stl/_limits.h similarity index 100% rename from reactos/include/c++/stlport/stl/_limits.h rename to include/c++/stlport/stl/_limits.h diff --git a/reactos/include/c++/stlport/stl/_list.c b/include/c++/stlport/stl/_list.c similarity index 100% rename from reactos/include/c++/stlport/stl/_list.c rename to include/c++/stlport/stl/_list.c diff --git a/reactos/include/c++/stlport/stl/_list.h b/include/c++/stlport/stl/_list.h similarity index 100% rename from reactos/include/c++/stlport/stl/_list.h rename to include/c++/stlport/stl/_list.h diff --git a/reactos/include/c++/stlport/stl/_locale.h b/include/c++/stlport/stl/_locale.h similarity index 100% rename from reactos/include/c++/stlport/stl/_locale.h rename to include/c++/stlport/stl/_locale.h diff --git a/reactos/include/c++/stlport/stl/_map.h b/include/c++/stlport/stl/_map.h similarity index 100% rename from reactos/include/c++/stlport/stl/_map.h rename to include/c++/stlport/stl/_map.h diff --git a/reactos/include/c++/stlport/stl/_mbstate_t.h b/include/c++/stlport/stl/_mbstate_t.h similarity index 100% rename from reactos/include/c++/stlport/stl/_mbstate_t.h rename to include/c++/stlport/stl/_mbstate_t.h diff --git a/reactos/include/c++/stlport/stl/_messages_facets.h b/include/c++/stlport/stl/_messages_facets.h similarity index 100% rename from reactos/include/c++/stlport/stl/_messages_facets.h rename to include/c++/stlport/stl/_messages_facets.h diff --git a/reactos/include/c++/stlport/stl/_monetary.c b/include/c++/stlport/stl/_monetary.c similarity index 100% rename from reactos/include/c++/stlport/stl/_monetary.c rename to include/c++/stlport/stl/_monetary.c diff --git a/reactos/include/c++/stlport/stl/_monetary.h b/include/c++/stlport/stl/_monetary.h similarity index 100% rename from reactos/include/c++/stlport/stl/_monetary.h rename to include/c++/stlport/stl/_monetary.h diff --git a/reactos/include/c++/stlport/stl/_move_construct_fwk.h b/include/c++/stlport/stl/_move_construct_fwk.h similarity index 100% rename from reactos/include/c++/stlport/stl/_move_construct_fwk.h rename to include/c++/stlport/stl/_move_construct_fwk.h diff --git a/reactos/include/c++/stlport/stl/_new.h b/include/c++/stlport/stl/_new.h similarity index 100% rename from reactos/include/c++/stlport/stl/_new.h rename to include/c++/stlport/stl/_new.h diff --git a/reactos/include/c++/stlport/stl/_num_get.c b/include/c++/stlport/stl/_num_get.c similarity index 100% rename from reactos/include/c++/stlport/stl/_num_get.c rename to include/c++/stlport/stl/_num_get.c diff --git a/reactos/include/c++/stlport/stl/_num_get.h b/include/c++/stlport/stl/_num_get.h similarity index 100% rename from reactos/include/c++/stlport/stl/_num_get.h rename to include/c++/stlport/stl/_num_get.h diff --git a/reactos/include/c++/stlport/stl/_num_put.c b/include/c++/stlport/stl/_num_put.c similarity index 100% rename from reactos/include/c++/stlport/stl/_num_put.c rename to include/c++/stlport/stl/_num_put.c diff --git a/reactos/include/c++/stlport/stl/_num_put.h b/include/c++/stlport/stl/_num_put.h similarity index 100% rename from reactos/include/c++/stlport/stl/_num_put.h rename to include/c++/stlport/stl/_num_put.h diff --git a/reactos/include/c++/stlport/stl/_numeric.c b/include/c++/stlport/stl/_numeric.c similarity index 100% rename from reactos/include/c++/stlport/stl/_numeric.c rename to include/c++/stlport/stl/_numeric.c diff --git a/reactos/include/c++/stlport/stl/_numeric.h b/include/c++/stlport/stl/_numeric.h similarity index 100% rename from reactos/include/c++/stlport/stl/_numeric.h rename to include/c++/stlport/stl/_numeric.h diff --git a/reactos/include/c++/stlport/stl/_numpunct.h b/include/c++/stlport/stl/_numpunct.h similarity index 100% rename from reactos/include/c++/stlport/stl/_numpunct.h rename to include/c++/stlport/stl/_numpunct.h diff --git a/reactos/include/c++/stlport/stl/_ostream.c b/include/c++/stlport/stl/_ostream.c similarity index 100% rename from reactos/include/c++/stlport/stl/_ostream.c rename to include/c++/stlport/stl/_ostream.c diff --git a/reactos/include/c++/stlport/stl/_ostream.h b/include/c++/stlport/stl/_ostream.h similarity index 100% rename from reactos/include/c++/stlport/stl/_ostream.h rename to include/c++/stlport/stl/_ostream.h diff --git a/reactos/include/c++/stlport/stl/_ostreambuf_iterator.h b/include/c++/stlport/stl/_ostreambuf_iterator.h similarity index 100% rename from reactos/include/c++/stlport/stl/_ostreambuf_iterator.h rename to include/c++/stlport/stl/_ostreambuf_iterator.h diff --git a/reactos/include/c++/stlport/stl/_pair.h b/include/c++/stlport/stl/_pair.h similarity index 100% rename from reactos/include/c++/stlport/stl/_pair.h rename to include/c++/stlport/stl/_pair.h diff --git a/reactos/include/c++/stlport/stl/_prolog.h b/include/c++/stlport/stl/_prolog.h similarity index 100% rename from reactos/include/c++/stlport/stl/_prolog.h rename to include/c++/stlport/stl/_prolog.h diff --git a/reactos/include/c++/stlport/stl/_pthread_alloc.h b/include/c++/stlport/stl/_pthread_alloc.h similarity index 100% rename from reactos/include/c++/stlport/stl/_pthread_alloc.h rename to include/c++/stlport/stl/_pthread_alloc.h diff --git a/reactos/include/c++/stlport/stl/_ptrs_specialize.h b/include/c++/stlport/stl/_ptrs_specialize.h similarity index 100% rename from reactos/include/c++/stlport/stl/_ptrs_specialize.h rename to include/c++/stlport/stl/_ptrs_specialize.h diff --git a/reactos/include/c++/stlport/stl/_queue.h b/include/c++/stlport/stl/_queue.h similarity index 100% rename from reactos/include/c++/stlport/stl/_queue.h rename to include/c++/stlport/stl/_queue.h diff --git a/reactos/include/c++/stlport/stl/_range_errors.c b/include/c++/stlport/stl/_range_errors.c similarity index 100% rename from reactos/include/c++/stlport/stl/_range_errors.c rename to include/c++/stlport/stl/_range_errors.c diff --git a/reactos/include/c++/stlport/stl/_range_errors.h b/include/c++/stlport/stl/_range_errors.h similarity index 100% rename from reactos/include/c++/stlport/stl/_range_errors.h rename to include/c++/stlport/stl/_range_errors.h diff --git a/reactos/include/c++/stlport/stl/_raw_storage_iter.h b/include/c++/stlport/stl/_raw_storage_iter.h similarity index 100% rename from reactos/include/c++/stlport/stl/_raw_storage_iter.h rename to include/c++/stlport/stl/_raw_storage_iter.h diff --git a/reactos/include/c++/stlport/stl/_relops_cont.h b/include/c++/stlport/stl/_relops_cont.h similarity index 100% rename from reactos/include/c++/stlport/stl/_relops_cont.h rename to include/c++/stlport/stl/_relops_cont.h diff --git a/reactos/include/c++/stlport/stl/_relops_hash_cont.h b/include/c++/stlport/stl/_relops_hash_cont.h similarity index 100% rename from reactos/include/c++/stlport/stl/_relops_hash_cont.h rename to include/c++/stlport/stl/_relops_hash_cont.h diff --git a/reactos/include/c++/stlport/stl/_rope.c b/include/c++/stlport/stl/_rope.c similarity index 100% rename from reactos/include/c++/stlport/stl/_rope.c rename to include/c++/stlport/stl/_rope.c diff --git a/reactos/include/c++/stlport/stl/_rope.h b/include/c++/stlport/stl/_rope.h similarity index 100% rename from reactos/include/c++/stlport/stl/_rope.h rename to include/c++/stlport/stl/_rope.h diff --git a/reactos/include/c++/stlport/stl/_set.h b/include/c++/stlport/stl/_set.h similarity index 100% rename from reactos/include/c++/stlport/stl/_set.h rename to include/c++/stlport/stl/_set.h diff --git a/reactos/include/c++/stlport/stl/_slist.c b/include/c++/stlport/stl/_slist.c similarity index 100% rename from reactos/include/c++/stlport/stl/_slist.c rename to include/c++/stlport/stl/_slist.c diff --git a/reactos/include/c++/stlport/stl/_slist.h b/include/c++/stlport/stl/_slist.h similarity index 100% rename from reactos/include/c++/stlport/stl/_slist.h rename to include/c++/stlport/stl/_slist.h diff --git a/reactos/include/c++/stlport/stl/_slist_base.c b/include/c++/stlport/stl/_slist_base.c similarity index 100% rename from reactos/include/c++/stlport/stl/_slist_base.c rename to include/c++/stlport/stl/_slist_base.c diff --git a/reactos/include/c++/stlport/stl/_slist_base.h b/include/c++/stlport/stl/_slist_base.h similarity index 100% rename from reactos/include/c++/stlport/stl/_slist_base.h rename to include/c++/stlport/stl/_slist_base.h diff --git a/reactos/include/c++/stlport/stl/_sparc_atomic.h b/include/c++/stlport/stl/_sparc_atomic.h similarity index 100% rename from reactos/include/c++/stlport/stl/_sparc_atomic.h rename to include/c++/stlport/stl/_sparc_atomic.h diff --git a/reactos/include/c++/stlport/stl/_sstream.c b/include/c++/stlport/stl/_sstream.c similarity index 100% rename from reactos/include/c++/stlport/stl/_sstream.c rename to include/c++/stlport/stl/_sstream.c diff --git a/reactos/include/c++/stlport/stl/_sstream.h b/include/c++/stlport/stl/_sstream.h similarity index 100% rename from reactos/include/c++/stlport/stl/_sstream.h rename to include/c++/stlport/stl/_sstream.h diff --git a/reactos/include/c++/stlport/stl/_stack.h b/include/c++/stlport/stl/_stack.h similarity index 100% rename from reactos/include/c++/stlport/stl/_stack.h rename to include/c++/stlport/stl/_stack.h diff --git a/reactos/include/c++/stlport/stl/_stdexcept.h b/include/c++/stlport/stl/_stdexcept.h similarity index 100% rename from reactos/include/c++/stlport/stl/_stdexcept.h rename to include/c++/stlport/stl/_stdexcept.h diff --git a/reactos/include/c++/stlport/stl/_stdexcept_base.c b/include/c++/stlport/stl/_stdexcept_base.c similarity index 100% rename from reactos/include/c++/stlport/stl/_stdexcept_base.c rename to include/c++/stlport/stl/_stdexcept_base.c diff --git a/reactos/include/c++/stlport/stl/_stdexcept_base.h b/include/c++/stlport/stl/_stdexcept_base.h similarity index 100% rename from reactos/include/c++/stlport/stl/_stdexcept_base.h rename to include/c++/stlport/stl/_stdexcept_base.h diff --git a/reactos/include/c++/stlport/stl/_stlport_version.h b/include/c++/stlport/stl/_stlport_version.h similarity index 100% rename from reactos/include/c++/stlport/stl/_stlport_version.h rename to include/c++/stlport/stl/_stlport_version.h diff --git a/reactos/include/c++/stlport/stl/_stream_iterator.h b/include/c++/stlport/stl/_stream_iterator.h similarity index 100% rename from reactos/include/c++/stlport/stl/_stream_iterator.h rename to include/c++/stlport/stl/_stream_iterator.h diff --git a/reactos/include/c++/stlport/stl/_streambuf.c b/include/c++/stlport/stl/_streambuf.c similarity index 100% rename from reactos/include/c++/stlport/stl/_streambuf.c rename to include/c++/stlport/stl/_streambuf.c diff --git a/reactos/include/c++/stlport/stl/_streambuf.h b/include/c++/stlport/stl/_streambuf.h similarity index 100% rename from reactos/include/c++/stlport/stl/_streambuf.h rename to include/c++/stlport/stl/_streambuf.h diff --git a/reactos/include/c++/stlport/stl/_string.c b/include/c++/stlport/stl/_string.c similarity index 100% rename from reactos/include/c++/stlport/stl/_string.c rename to include/c++/stlport/stl/_string.c diff --git a/reactos/include/c++/stlport/stl/_string.h b/include/c++/stlport/stl/_string.h similarity index 100% rename from reactos/include/c++/stlport/stl/_string.h rename to include/c++/stlport/stl/_string.h diff --git a/reactos/include/c++/stlport/stl/_string_base.h b/include/c++/stlport/stl/_string_base.h similarity index 100% rename from reactos/include/c++/stlport/stl/_string_base.h rename to include/c++/stlport/stl/_string_base.h diff --git a/reactos/include/c++/stlport/stl/_string_fwd.h b/include/c++/stlport/stl/_string_fwd.h similarity index 100% rename from reactos/include/c++/stlport/stl/_string_fwd.h rename to include/c++/stlport/stl/_string_fwd.h diff --git a/reactos/include/c++/stlport/stl/_string_hash.h b/include/c++/stlport/stl/_string_hash.h similarity index 100% rename from reactos/include/c++/stlport/stl/_string_hash.h rename to include/c++/stlport/stl/_string_hash.h diff --git a/reactos/include/c++/stlport/stl/_string_io.c b/include/c++/stlport/stl/_string_io.c similarity index 100% rename from reactos/include/c++/stlport/stl/_string_io.c rename to include/c++/stlport/stl/_string_io.c diff --git a/reactos/include/c++/stlport/stl/_string_io.h b/include/c++/stlport/stl/_string_io.h similarity index 100% rename from reactos/include/c++/stlport/stl/_string_io.h rename to include/c++/stlport/stl/_string_io.h diff --git a/reactos/include/c++/stlport/stl/_string_npos.h b/include/c++/stlport/stl/_string_npos.h similarity index 100% rename from reactos/include/c++/stlport/stl/_string_npos.h rename to include/c++/stlport/stl/_string_npos.h diff --git a/reactos/include/c++/stlport/stl/_string_operators.h b/include/c++/stlport/stl/_string_operators.h similarity index 100% rename from reactos/include/c++/stlport/stl/_string_operators.h rename to include/c++/stlport/stl/_string_operators.h diff --git a/reactos/include/c++/stlport/stl/_string_sum.h b/include/c++/stlport/stl/_string_sum.h similarity index 100% rename from reactos/include/c++/stlport/stl/_string_sum.h rename to include/c++/stlport/stl/_string_sum.h diff --git a/reactos/include/c++/stlport/stl/_string_sum_methods.h b/include/c++/stlport/stl/_string_sum_methods.h similarity index 100% rename from reactos/include/c++/stlport/stl/_string_sum_methods.h rename to include/c++/stlport/stl/_string_sum_methods.h diff --git a/reactos/include/c++/stlport/stl/_string_workaround.h b/include/c++/stlport/stl/_string_workaround.h similarity index 100% rename from reactos/include/c++/stlport/stl/_string_workaround.h rename to include/c++/stlport/stl/_string_workaround.h diff --git a/reactos/include/c++/stlport/stl/_strstream.h b/include/c++/stlport/stl/_strstream.h similarity index 100% rename from reactos/include/c++/stlport/stl/_strstream.h rename to include/c++/stlport/stl/_strstream.h diff --git a/reactos/include/c++/stlport/stl/_tempbuf.c b/include/c++/stlport/stl/_tempbuf.c similarity index 100% rename from reactos/include/c++/stlport/stl/_tempbuf.c rename to include/c++/stlport/stl/_tempbuf.c diff --git a/reactos/include/c++/stlport/stl/_tempbuf.h b/include/c++/stlport/stl/_tempbuf.h similarity index 100% rename from reactos/include/c++/stlport/stl/_tempbuf.h rename to include/c++/stlport/stl/_tempbuf.h diff --git a/reactos/include/c++/stlport/stl/_threads.c b/include/c++/stlport/stl/_threads.c similarity index 100% rename from reactos/include/c++/stlport/stl/_threads.c rename to include/c++/stlport/stl/_threads.c diff --git a/reactos/include/c++/stlport/stl/_threads.h b/include/c++/stlport/stl/_threads.h similarity index 100% rename from reactos/include/c++/stlport/stl/_threads.h rename to include/c++/stlport/stl/_threads.h diff --git a/reactos/include/c++/stlport/stl/_time_facets.c b/include/c++/stlport/stl/_time_facets.c similarity index 100% rename from reactos/include/c++/stlport/stl/_time_facets.c rename to include/c++/stlport/stl/_time_facets.c diff --git a/reactos/include/c++/stlport/stl/_time_facets.h b/include/c++/stlport/stl/_time_facets.h similarity index 100% rename from reactos/include/c++/stlport/stl/_time_facets.h rename to include/c++/stlport/stl/_time_facets.h diff --git a/reactos/include/c++/stlport/stl/_tree.c b/include/c++/stlport/stl/_tree.c similarity index 100% rename from reactos/include/c++/stlport/stl/_tree.c rename to include/c++/stlport/stl/_tree.c diff --git a/reactos/include/c++/stlport/stl/_tree.h b/include/c++/stlport/stl/_tree.h similarity index 100% rename from reactos/include/c++/stlport/stl/_tree.h rename to include/c++/stlport/stl/_tree.h diff --git a/reactos/include/c++/stlport/stl/_typeinfo.h b/include/c++/stlport/stl/_typeinfo.h similarity index 100% rename from reactos/include/c++/stlport/stl/_typeinfo.h rename to include/c++/stlport/stl/_typeinfo.h diff --git a/reactos/include/c++/stlport/stl/_uninitialized.h b/include/c++/stlport/stl/_uninitialized.h similarity index 100% rename from reactos/include/c++/stlport/stl/_uninitialized.h rename to include/c++/stlport/stl/_uninitialized.h diff --git a/reactos/include/c++/stlport/stl/_unordered_map.h b/include/c++/stlport/stl/_unordered_map.h similarity index 100% rename from reactos/include/c++/stlport/stl/_unordered_map.h rename to include/c++/stlport/stl/_unordered_map.h diff --git a/reactos/include/c++/stlport/stl/_unordered_set.h b/include/c++/stlport/stl/_unordered_set.h similarity index 100% rename from reactos/include/c++/stlport/stl/_unordered_set.h rename to include/c++/stlport/stl/_unordered_set.h diff --git a/reactos/include/c++/stlport/stl/_valarray.c b/include/c++/stlport/stl/_valarray.c similarity index 100% rename from reactos/include/c++/stlport/stl/_valarray.c rename to include/c++/stlport/stl/_valarray.c diff --git a/reactos/include/c++/stlport/stl/_valarray.h b/include/c++/stlport/stl/_valarray.h similarity index 100% rename from reactos/include/c++/stlport/stl/_valarray.h rename to include/c++/stlport/stl/_valarray.h diff --git a/reactos/include/c++/stlport/stl/_vector.c b/include/c++/stlport/stl/_vector.c similarity index 100% rename from reactos/include/c++/stlport/stl/_vector.c rename to include/c++/stlport/stl/_vector.c diff --git a/reactos/include/c++/stlport/stl/_vector.h b/include/c++/stlport/stl/_vector.h similarity index 100% rename from reactos/include/c++/stlport/stl/_vector.h rename to include/c++/stlport/stl/_vector.h diff --git a/reactos/include/c++/stlport/stl/boost_type_traits.h b/include/c++/stlport/stl/boost_type_traits.h similarity index 100% rename from reactos/include/c++/stlport/stl/boost_type_traits.h rename to include/c++/stlport/stl/boost_type_traits.h diff --git a/reactos/include/c++/stlport/stl/c_locale.h b/include/c++/stlport/stl/c_locale.h similarity index 100% rename from reactos/include/c++/stlport/stl/c_locale.h rename to include/c++/stlport/stl/c_locale.h diff --git a/reactos/include/c++/stlport/stl/char_traits.h b/include/c++/stlport/stl/char_traits.h similarity index 100% rename from reactos/include/c++/stlport/stl/char_traits.h rename to include/c++/stlport/stl/char_traits.h diff --git a/reactos/include/c++/stlport/stl/concept_checks.h b/include/c++/stlport/stl/concept_checks.h similarity index 100% rename from reactos/include/c++/stlport/stl/concept_checks.h rename to include/c++/stlport/stl/concept_checks.h diff --git a/reactos/include/c++/stlport/stl/config/_aix.h b/include/c++/stlport/stl/config/_aix.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_aix.h rename to include/c++/stlport/stl/config/_aix.h diff --git a/reactos/include/c++/stlport/stl/config/_apcc.h b/include/c++/stlport/stl/config/_apcc.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_apcc.h rename to include/c++/stlport/stl/config/_apcc.h diff --git a/reactos/include/c++/stlport/stl/config/_apple.h b/include/c++/stlport/stl/config/_apple.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_apple.h rename to include/c++/stlport/stl/config/_apple.h diff --git a/reactos/include/c++/stlport/stl/config/_as400.h b/include/c++/stlport/stl/config/_as400.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_as400.h rename to include/c++/stlport/stl/config/_as400.h diff --git a/reactos/include/c++/stlport/stl/config/_auto_link.h b/include/c++/stlport/stl/config/_auto_link.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_auto_link.h rename to include/c++/stlport/stl/config/_auto_link.h diff --git a/reactos/include/c++/stlport/stl/config/_bc.h b/include/c++/stlport/stl/config/_bc.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_bc.h rename to include/c++/stlport/stl/config/_bc.h diff --git a/reactos/include/c++/stlport/stl/config/_como.h b/include/c++/stlport/stl/config/_como.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_como.h rename to include/c++/stlport/stl/config/_como.h diff --git a/reactos/include/c++/stlport/stl/config/_cray.h b/include/c++/stlport/stl/config/_cray.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_cray.h rename to include/c++/stlport/stl/config/_cray.h diff --git a/reactos/include/c++/stlport/stl/config/_cygwin.h b/include/c++/stlport/stl/config/_cygwin.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_cygwin.h rename to include/c++/stlport/stl/config/_cygwin.h diff --git a/reactos/include/c++/stlport/stl/config/_dec.h b/include/c++/stlport/stl/config/_dec.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_dec.h rename to include/c++/stlport/stl/config/_dec.h diff --git a/reactos/include/c++/stlport/stl/config/_dec_vms.h b/include/c++/stlport/stl/config/_dec_vms.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_dec_vms.h rename to include/c++/stlport/stl/config/_dec_vms.h diff --git a/reactos/include/c++/stlport/stl/config/_detect_dll_or_lib.h b/include/c++/stlport/stl/config/_detect_dll_or_lib.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_detect_dll_or_lib.h rename to include/c++/stlport/stl/config/_detect_dll_or_lib.h diff --git a/reactos/include/c++/stlport/stl/config/_dm.h b/include/c++/stlport/stl/config/_dm.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_dm.h rename to include/c++/stlport/stl/config/_dm.h diff --git a/reactos/include/c++/stlport/stl/config/_epilog.h b/include/c++/stlport/stl/config/_epilog.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_epilog.h rename to include/c++/stlport/stl/config/_epilog.h diff --git a/reactos/include/c++/stlport/stl/config/_evc.h b/include/c++/stlport/stl/config/_evc.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_evc.h rename to include/c++/stlport/stl/config/_evc.h diff --git a/reactos/include/c++/stlport/stl/config/_feedback.h b/include/c++/stlport/stl/config/_feedback.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_feedback.h rename to include/c++/stlport/stl/config/_feedback.h diff --git a/reactos/include/c++/stlport/stl/config/_freebsd.h b/include/c++/stlport/stl/config/_freebsd.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_freebsd.h rename to include/c++/stlport/stl/config/_freebsd.h diff --git a/reactos/include/c++/stlport/stl/config/_fujitsu.h b/include/c++/stlport/stl/config/_fujitsu.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_fujitsu.h rename to include/c++/stlport/stl/config/_fujitsu.h diff --git a/reactos/include/c++/stlport/stl/config/_gcc.h b/include/c++/stlport/stl/config/_gcc.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_gcc.h rename to include/c++/stlport/stl/config/_gcc.h diff --git a/reactos/include/c++/stlport/stl/config/_hpacc.h b/include/c++/stlport/stl/config/_hpacc.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_hpacc.h rename to include/c++/stlport/stl/config/_hpacc.h diff --git a/reactos/include/c++/stlport/stl/config/_hpux.h b/include/c++/stlport/stl/config/_hpux.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_hpux.h rename to include/c++/stlport/stl/config/_hpux.h diff --git a/reactos/include/c++/stlport/stl/config/_ibm.h b/include/c++/stlport/stl/config/_ibm.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_ibm.h rename to include/c++/stlport/stl/config/_ibm.h diff --git a/reactos/include/c++/stlport/stl/config/_icc.h b/include/c++/stlport/stl/config/_icc.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_icc.h rename to include/c++/stlport/stl/config/_icc.h diff --git a/reactos/include/c++/stlport/stl/config/_intel.h b/include/c++/stlport/stl/config/_intel.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_intel.h rename to include/c++/stlport/stl/config/_intel.h diff --git a/reactos/include/c++/stlport/stl/config/_kai.h b/include/c++/stlport/stl/config/_kai.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_kai.h rename to include/c++/stlport/stl/config/_kai.h diff --git a/reactos/include/c++/stlport/stl/config/_linux.h b/include/c++/stlport/stl/config/_linux.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_linux.h rename to include/c++/stlport/stl/config/_linux.h diff --git a/reactos/include/c++/stlport/stl/config/_mac.h b/include/c++/stlport/stl/config/_mac.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_mac.h rename to include/c++/stlport/stl/config/_mac.h diff --git a/reactos/include/c++/stlport/stl/config/_macosx.h b/include/c++/stlport/stl/config/_macosx.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_macosx.h rename to include/c++/stlport/stl/config/_macosx.h diff --git a/reactos/include/c++/stlport/stl/config/_mlc.h b/include/c++/stlport/stl/config/_mlc.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_mlc.h rename to include/c++/stlport/stl/config/_mlc.h diff --git a/reactos/include/c++/stlport/stl/config/_msvc.h b/include/c++/stlport/stl/config/_msvc.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_msvc.h rename to include/c++/stlport/stl/config/_msvc.h diff --git a/reactos/include/c++/stlport/stl/config/_mwerks.h b/include/c++/stlport/stl/config/_mwerks.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_mwerks.h rename to include/c++/stlport/stl/config/_mwerks.h diff --git a/reactos/include/c++/stlport/stl/config/_native_headers.h b/include/c++/stlport/stl/config/_native_headers.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_native_headers.h rename to include/c++/stlport/stl/config/_native_headers.h diff --git a/reactos/include/c++/stlport/stl/config/_openbsd.h b/include/c++/stlport/stl/config/_openbsd.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_openbsd.h rename to include/c++/stlport/stl/config/_openbsd.h diff --git a/reactos/include/c++/stlport/stl/config/_prolog.h b/include/c++/stlport/stl/config/_prolog.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_prolog.h rename to include/c++/stlport/stl/config/_prolog.h diff --git a/reactos/include/c++/stlport/stl/config/_reactos.h b/include/c++/stlport/stl/config/_reactos.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_reactos.h rename to include/c++/stlport/stl/config/_reactos.h diff --git a/reactos/include/c++/stlport/stl/config/_sgi.h b/include/c++/stlport/stl/config/_sgi.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_sgi.h rename to include/c++/stlport/stl/config/_sgi.h diff --git a/reactos/include/c++/stlport/stl/config/_solaris.h b/include/c++/stlport/stl/config/_solaris.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_solaris.h rename to include/c++/stlport/stl/config/_solaris.h diff --git a/reactos/include/c++/stlport/stl/config/_sunprocc.h b/include/c++/stlport/stl/config/_sunprocc.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_sunprocc.h rename to include/c++/stlport/stl/config/_sunprocc.h diff --git a/reactos/include/c++/stlport/stl/config/_system.h b/include/c++/stlport/stl/config/_system.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_system.h rename to include/c++/stlport/stl/config/_system.h diff --git a/reactos/include/c++/stlport/stl/config/_warnings_off.h b/include/c++/stlport/stl/config/_warnings_off.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_warnings_off.h rename to include/c++/stlport/stl/config/_warnings_off.h diff --git a/reactos/include/c++/stlport/stl/config/_watcom.h b/include/c++/stlport/stl/config/_watcom.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_watcom.h rename to include/c++/stlport/stl/config/_watcom.h diff --git a/reactos/include/c++/stlport/stl/config/_windows.h b/include/c++/stlport/stl/config/_windows.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/_windows.h rename to include/c++/stlport/stl/config/_windows.h diff --git a/reactos/include/c++/stlport/stl/config/compat.h b/include/c++/stlport/stl/config/compat.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/compat.h rename to include/c++/stlport/stl/config/compat.h diff --git a/reactos/include/c++/stlport/stl/config/features.h b/include/c++/stlport/stl/config/features.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/features.h rename to include/c++/stlport/stl/config/features.h diff --git a/reactos/include/c++/stlport/stl/config/host.h b/include/c++/stlport/stl/config/host.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/host.h rename to include/c++/stlport/stl/config/host.h diff --git a/reactos/include/c++/stlport/stl/config/stl_confix.h b/include/c++/stlport/stl/config/stl_confix.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/stl_confix.h rename to include/c++/stlport/stl/config/stl_confix.h diff --git a/reactos/include/c++/stlport/stl/config/stl_mycomp.h b/include/c++/stlport/stl/config/stl_mycomp.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/stl_mycomp.h rename to include/c++/stlport/stl/config/stl_mycomp.h diff --git a/reactos/include/c++/stlport/stl/config/user_config.h b/include/c++/stlport/stl/config/user_config.h similarity index 100% rename from reactos/include/c++/stlport/stl/config/user_config.h rename to include/c++/stlport/stl/config/user_config.h diff --git a/reactos/include/c++/stlport/stl/debug/_debug.c b/include/c++/stlport/stl/debug/_debug.c similarity index 100% rename from reactos/include/c++/stlport/stl/debug/_debug.c rename to include/c++/stlport/stl/debug/_debug.c diff --git a/reactos/include/c++/stlport/stl/debug/_debug.h b/include/c++/stlport/stl/debug/_debug.h similarity index 100% rename from reactos/include/c++/stlport/stl/debug/_debug.h rename to include/c++/stlport/stl/debug/_debug.h diff --git a/reactos/include/c++/stlport/stl/debug/_deque.h b/include/c++/stlport/stl/debug/_deque.h similarity index 100% rename from reactos/include/c++/stlport/stl/debug/_deque.h rename to include/c++/stlport/stl/debug/_deque.h diff --git a/reactos/include/c++/stlport/stl/debug/_hashtable.h b/include/c++/stlport/stl/debug/_hashtable.h similarity index 100% rename from reactos/include/c++/stlport/stl/debug/_hashtable.h rename to include/c++/stlport/stl/debug/_hashtable.h diff --git a/reactos/include/c++/stlport/stl/debug/_iterator.h b/include/c++/stlport/stl/debug/_iterator.h similarity index 100% rename from reactos/include/c++/stlport/stl/debug/_iterator.h rename to include/c++/stlport/stl/debug/_iterator.h diff --git a/reactos/include/c++/stlport/stl/debug/_list.h b/include/c++/stlport/stl/debug/_list.h similarity index 100% rename from reactos/include/c++/stlport/stl/debug/_list.h rename to include/c++/stlport/stl/debug/_list.h diff --git a/reactos/include/c++/stlport/stl/debug/_slist.h b/include/c++/stlport/stl/debug/_slist.h similarity index 100% rename from reactos/include/c++/stlport/stl/debug/_slist.h rename to include/c++/stlport/stl/debug/_slist.h diff --git a/reactos/include/c++/stlport/stl/debug/_string.h b/include/c++/stlport/stl/debug/_string.h similarity index 100% rename from reactos/include/c++/stlport/stl/debug/_string.h rename to include/c++/stlport/stl/debug/_string.h diff --git a/reactos/include/c++/stlport/stl/debug/_string_sum_methods.h b/include/c++/stlport/stl/debug/_string_sum_methods.h similarity index 100% rename from reactos/include/c++/stlport/stl/debug/_string_sum_methods.h rename to include/c++/stlport/stl/debug/_string_sum_methods.h diff --git a/reactos/include/c++/stlport/stl/debug/_tree.h b/include/c++/stlport/stl/debug/_tree.h similarity index 100% rename from reactos/include/c++/stlport/stl/debug/_tree.h rename to include/c++/stlport/stl/debug/_tree.h diff --git a/reactos/include/c++/stlport/stl/debug/_vector.h b/include/c++/stlport/stl/debug/_vector.h similarity index 100% rename from reactos/include/c++/stlport/stl/debug/_vector.h rename to include/c++/stlport/stl/debug/_vector.h diff --git a/reactos/include/c++/stlport/stl/msl_string.h b/include/c++/stlport/stl/msl_string.h similarity index 100% rename from reactos/include/c++/stlport/stl/msl_string.h rename to include/c++/stlport/stl/msl_string.h diff --git a/reactos/include/c++/stlport/stl/pointers/_deque.h b/include/c++/stlport/stl/pointers/_deque.h similarity index 100% rename from reactos/include/c++/stlport/stl/pointers/_deque.h rename to include/c++/stlport/stl/pointers/_deque.h diff --git a/reactos/include/c++/stlport/stl/pointers/_list.h b/include/c++/stlport/stl/pointers/_list.h similarity index 100% rename from reactos/include/c++/stlport/stl/pointers/_list.h rename to include/c++/stlport/stl/pointers/_list.h diff --git a/reactos/include/c++/stlport/stl/pointers/_set.h b/include/c++/stlport/stl/pointers/_set.h similarity index 100% rename from reactos/include/c++/stlport/stl/pointers/_set.h rename to include/c++/stlport/stl/pointers/_set.h diff --git a/reactos/include/c++/stlport/stl/pointers/_slist.h b/include/c++/stlport/stl/pointers/_slist.h similarity index 100% rename from reactos/include/c++/stlport/stl/pointers/_slist.h rename to include/c++/stlport/stl/pointers/_slist.h diff --git a/reactos/include/c++/stlport/stl/pointers/_tools.h b/include/c++/stlport/stl/pointers/_tools.h similarity index 100% rename from reactos/include/c++/stlport/stl/pointers/_tools.h rename to include/c++/stlport/stl/pointers/_tools.h diff --git a/reactos/include/c++/stlport/stl/pointers/_vector.h b/include/c++/stlport/stl/pointers/_vector.h similarity index 100% rename from reactos/include/c++/stlport/stl/pointers/_vector.h rename to include/c++/stlport/stl/pointers/_vector.h diff --git a/reactos/include/c++/stlport/stl/type_manips.h b/include/c++/stlport/stl/type_manips.h similarity index 100% rename from reactos/include/c++/stlport/stl/type_manips.h rename to include/c++/stlport/stl/type_manips.h diff --git a/reactos/include/c++/stlport/stl/type_traits.h b/include/c++/stlport/stl/type_traits.h similarity index 100% rename from reactos/include/c++/stlport/stl/type_traits.h rename to include/c++/stlport/stl/type_traits.h diff --git a/reactos/include/c++/stlport/streambuf b/include/c++/stlport/streambuf similarity index 100% rename from reactos/include/c++/stlport/streambuf rename to include/c++/stlport/streambuf diff --git a/reactos/include/c++/stlport/streambuf.h b/include/c++/stlport/streambuf.h similarity index 100% rename from reactos/include/c++/stlport/streambuf.h rename to include/c++/stlport/streambuf.h diff --git a/reactos/include/c++/stlport/string b/include/c++/stlport/string similarity index 100% rename from reactos/include/c++/stlport/string rename to include/c++/stlport/string diff --git a/reactos/include/c++/stlport/string.h b/include/c++/stlport/string.h similarity index 100% rename from reactos/include/c++/stlport/string.h rename to include/c++/stlport/string.h diff --git a/reactos/include/c++/stlport/strstream b/include/c++/stlport/strstream similarity index 100% rename from reactos/include/c++/stlport/strstream rename to include/c++/stlport/strstream diff --git a/reactos/include/c++/stlport/strstream.h b/include/c++/stlport/strstream.h similarity index 100% rename from reactos/include/c++/stlport/strstream.h rename to include/c++/stlport/strstream.h diff --git a/reactos/include/c++/stlport/time.h b/include/c++/stlport/time.h similarity index 100% rename from reactos/include/c++/stlport/time.h rename to include/c++/stlport/time.h diff --git a/reactos/include/c++/stlport/type_traits b/include/c++/stlport/type_traits similarity index 100% rename from reactos/include/c++/stlport/type_traits rename to include/c++/stlport/type_traits diff --git a/reactos/include/c++/stlport/typeinfo b/include/c++/stlport/typeinfo similarity index 100% rename from reactos/include/c++/stlport/typeinfo rename to include/c++/stlport/typeinfo diff --git a/reactos/include/c++/stlport/typeinfo.h b/include/c++/stlport/typeinfo.h similarity index 100% rename from reactos/include/c++/stlport/typeinfo.h rename to include/c++/stlport/typeinfo.h diff --git a/reactos/include/c++/stlport/unordered_map b/include/c++/stlport/unordered_map similarity index 100% rename from reactos/include/c++/stlport/unordered_map rename to include/c++/stlport/unordered_map diff --git a/reactos/include/c++/stlport/unordered_set b/include/c++/stlport/unordered_set similarity index 100% rename from reactos/include/c++/stlport/unordered_set rename to include/c++/stlport/unordered_set diff --git a/reactos/include/c++/stlport/using/cstring b/include/c++/stlport/using/cstring similarity index 100% rename from reactos/include/c++/stlport/using/cstring rename to include/c++/stlport/using/cstring diff --git a/reactos/include/c++/stlport/using/export b/include/c++/stlport/using/export similarity index 100% rename from reactos/include/c++/stlport/using/export rename to include/c++/stlport/using/export diff --git a/reactos/include/c++/stlport/using/fstream b/include/c++/stlport/using/fstream similarity index 100% rename from reactos/include/c++/stlport/using/fstream rename to include/c++/stlport/using/fstream diff --git a/reactos/include/c++/stlport/using/h/fstream.h b/include/c++/stlport/using/h/fstream.h similarity index 100% rename from reactos/include/c++/stlport/using/h/fstream.h rename to include/c++/stlport/using/h/fstream.h diff --git a/reactos/include/c++/stlport/using/h/iomanip.h b/include/c++/stlport/using/h/iomanip.h similarity index 100% rename from reactos/include/c++/stlport/using/h/iomanip.h rename to include/c++/stlport/using/h/iomanip.h diff --git a/reactos/include/c++/stlport/using/h/iostream.h b/include/c++/stlport/using/h/iostream.h similarity index 100% rename from reactos/include/c++/stlport/using/h/iostream.h rename to include/c++/stlport/using/h/iostream.h diff --git a/reactos/include/c++/stlport/using/h/ostream.h b/include/c++/stlport/using/h/ostream.h similarity index 100% rename from reactos/include/c++/stlport/using/h/ostream.h rename to include/c++/stlport/using/h/ostream.h diff --git a/reactos/include/c++/stlport/using/h/streambuf.h b/include/c++/stlport/using/h/streambuf.h similarity index 100% rename from reactos/include/c++/stlport/using/h/streambuf.h rename to include/c++/stlport/using/h/streambuf.h diff --git a/reactos/include/c++/stlport/using/h/strstream.h b/include/c++/stlport/using/h/strstream.h similarity index 100% rename from reactos/include/c++/stlport/using/h/strstream.h rename to include/c++/stlport/using/h/strstream.h diff --git a/reactos/include/c++/stlport/using/iomanip b/include/c++/stlport/using/iomanip similarity index 100% rename from reactos/include/c++/stlport/using/iomanip rename to include/c++/stlport/using/iomanip diff --git a/reactos/include/c++/stlport/using/ios b/include/c++/stlport/using/ios similarity index 100% rename from reactos/include/c++/stlport/using/ios rename to include/c++/stlport/using/ios diff --git a/reactos/include/c++/stlport/using/iosfwd b/include/c++/stlport/using/iosfwd similarity index 100% rename from reactos/include/c++/stlport/using/iosfwd rename to include/c++/stlport/using/iosfwd diff --git a/reactos/include/c++/stlport/using/iostream b/include/c++/stlport/using/iostream similarity index 100% rename from reactos/include/c++/stlport/using/iostream rename to include/c++/stlport/using/iostream diff --git a/reactos/include/c++/stlport/using/istream b/include/c++/stlport/using/istream similarity index 100% rename from reactos/include/c++/stlport/using/istream rename to include/c++/stlport/using/istream diff --git a/reactos/include/c++/stlport/using/locale b/include/c++/stlport/using/locale similarity index 100% rename from reactos/include/c++/stlport/using/locale rename to include/c++/stlport/using/locale diff --git a/reactos/include/c++/stlport/using/ostream b/include/c++/stlport/using/ostream similarity index 100% rename from reactos/include/c++/stlport/using/ostream rename to include/c++/stlport/using/ostream diff --git a/reactos/include/c++/stlport/using/sstream b/include/c++/stlport/using/sstream similarity index 100% rename from reactos/include/c++/stlport/using/sstream rename to include/c++/stlport/using/sstream diff --git a/reactos/include/c++/stlport/using/streambuf b/include/c++/stlport/using/streambuf similarity index 100% rename from reactos/include/c++/stlport/using/streambuf rename to include/c++/stlport/using/streambuf diff --git a/reactos/include/c++/stlport/using/strstream b/include/c++/stlport/using/strstream similarity index 100% rename from reactos/include/c++/stlport/using/strstream rename to include/c++/stlport/using/strstream diff --git a/reactos/include/c++/stlport/utility b/include/c++/stlport/utility similarity index 100% rename from reactos/include/c++/stlport/utility rename to include/c++/stlport/utility diff --git a/reactos/include/c++/stlport/valarray b/include/c++/stlport/valarray similarity index 100% rename from reactos/include/c++/stlport/valarray rename to include/c++/stlport/valarray diff --git a/reactos/include/c++/stlport/vector b/include/c++/stlport/vector similarity index 100% rename from reactos/include/c++/stlport/vector rename to include/c++/stlport/vector diff --git a/reactos/include/c++/stlport/wchar.h b/include/c++/stlport/wchar.h similarity index 100% rename from reactos/include/c++/stlport/wchar.h rename to include/c++/stlport/wchar.h diff --git a/reactos/include/c++/stlport/wctype.h b/include/c++/stlport/wctype.h similarity index 100% rename from reactos/include/c++/stlport/wctype.h rename to include/c++/stlport/wctype.h diff --git a/reactos/include/c++/typeinfo b/include/c++/typeinfo similarity index 100% rename from reactos/include/c++/typeinfo rename to include/c++/typeinfo diff --git a/reactos/include/crt/_mingw.h b/include/crt/_mingw.h similarity index 100% rename from reactos/include/crt/_mingw.h rename to include/crt/_mingw.h diff --git a/reactos/include/crt/_mingw_mac.h b/include/crt/_mingw_mac.h similarity index 100% rename from reactos/include/crt/_mingw_mac.h rename to include/crt/_mingw_mac.h diff --git a/reactos/include/crt/_mingw_unicode.h b/include/crt/_mingw_unicode.h similarity index 100% rename from reactos/include/crt/_mingw_unicode.h rename to include/crt/_mingw_unicode.h diff --git a/reactos/include/crt/assert.h b/include/crt/assert.h similarity index 100% rename from reactos/include/crt/assert.h rename to include/crt/assert.h diff --git a/reactos/include/crt/complex.h b/include/crt/complex.h similarity index 100% rename from reactos/include/crt/complex.h rename to include/crt/complex.h diff --git a/reactos/include/crt/conio.h b/include/crt/conio.h similarity index 100% rename from reactos/include/crt/conio.h rename to include/crt/conio.h diff --git a/reactos/include/crt/crtdbg.h b/include/crt/crtdbg.h similarity index 100% rename from reactos/include/crt/crtdbg.h rename to include/crt/crtdbg.h diff --git a/reactos/include/crt/crtdefs.h b/include/crt/crtdefs.h similarity index 100% rename from reactos/include/crt/crtdefs.h rename to include/crt/crtdefs.h diff --git a/reactos/include/crt/ctype.h b/include/crt/ctype.h similarity index 100% rename from reactos/include/crt/ctype.h rename to include/crt/ctype.h diff --git a/reactos/include/crt/direct.h b/include/crt/direct.h similarity index 100% rename from reactos/include/crt/direct.h rename to include/crt/direct.h diff --git a/reactos/include/crt/dirent.h b/include/crt/dirent.h similarity index 100% rename from reactos/include/crt/dirent.h rename to include/crt/dirent.h diff --git a/reactos/include/crt/dos.h b/include/crt/dos.h similarity index 100% rename from reactos/include/crt/dos.h rename to include/crt/dos.h diff --git a/reactos/include/crt/dvec.h b/include/crt/dvec.h similarity index 100% rename from reactos/include/crt/dvec.h rename to include/crt/dvec.h diff --git a/reactos/include/crt/eh.h b/include/crt/eh.h similarity index 100% rename from reactos/include/crt/eh.h rename to include/crt/eh.h diff --git a/reactos/include/crt/emmintrin.h b/include/crt/emmintrin.h similarity index 100% rename from reactos/include/crt/emmintrin.h rename to include/crt/emmintrin.h diff --git a/reactos/include/crt/errno.h b/include/crt/errno.h similarity index 100% rename from reactos/include/crt/errno.h rename to include/crt/errno.h diff --git a/reactos/include/crt/excpt.h b/include/crt/excpt.h similarity index 100% rename from reactos/include/crt/excpt.h rename to include/crt/excpt.h diff --git a/reactos/include/crt/fcntl.h b/include/crt/fcntl.h similarity index 100% rename from reactos/include/crt/fcntl.h rename to include/crt/fcntl.h diff --git a/reactos/include/crt/fenv.h b/include/crt/fenv.h similarity index 100% rename from reactos/include/crt/fenv.h rename to include/crt/fenv.h diff --git a/reactos/include/crt/float.h b/include/crt/float.h similarity index 100% rename from reactos/include/crt/float.h rename to include/crt/float.h diff --git a/reactos/include/crt/fpieee.h b/include/crt/fpieee.h similarity index 100% rename from reactos/include/crt/fpieee.h rename to include/crt/fpieee.h diff --git a/reactos/include/crt/fvec.h b/include/crt/fvec.h similarity index 100% rename from reactos/include/crt/fvec.h rename to include/crt/fvec.h diff --git a/reactos/include/crt/getopt.h b/include/crt/getopt.h similarity index 100% rename from reactos/include/crt/getopt.h rename to include/crt/getopt.h diff --git a/reactos/include/crt/inttypes.h b/include/crt/inttypes.h similarity index 100% rename from reactos/include/crt/inttypes.h rename to include/crt/inttypes.h diff --git a/reactos/include/crt/io.h b/include/crt/io.h similarity index 100% rename from reactos/include/crt/io.h rename to include/crt/io.h diff --git a/reactos/include/crt/libgen.h b/include/crt/libgen.h similarity index 100% rename from reactos/include/crt/libgen.h rename to include/crt/libgen.h diff --git a/reactos/include/crt/limits.h b/include/crt/limits.h similarity index 100% rename from reactos/include/crt/limits.h rename to include/crt/limits.h diff --git a/reactos/include/crt/locale.h b/include/crt/locale.h similarity index 100% rename from reactos/include/crt/locale.h rename to include/crt/locale.h diff --git a/reactos/include/crt/malloc.h b/include/crt/malloc.h similarity index 100% rename from reactos/include/crt/malloc.h rename to include/crt/malloc.h diff --git a/reactos/include/crt/math.h b/include/crt/math.h similarity index 100% rename from reactos/include/crt/math.h rename to include/crt/math.h diff --git a/reactos/include/crt/mbctype.h b/include/crt/mbctype.h similarity index 100% rename from reactos/include/crt/mbctype.h rename to include/crt/mbctype.h diff --git a/reactos/include/crt/mbstring.h b/include/crt/mbstring.h similarity index 100% rename from reactos/include/crt/mbstring.h rename to include/crt/mbstring.h diff --git a/reactos/include/crt/mem.h b/include/crt/mem.h similarity index 100% rename from reactos/include/crt/mem.h rename to include/crt/mem.h diff --git a/reactos/include/crt/memory.h b/include/crt/memory.h similarity index 100% rename from reactos/include/crt/memory.h rename to include/crt/memory.h diff --git a/reactos/include/crt/mingw32/gcc_float.h b/include/crt/mingw32/gcc_float.h similarity index 100% rename from reactos/include/crt/mingw32/gcc_float.h rename to include/crt/mingw32/gcc_float.h diff --git a/reactos/include/crt/mingw32/intrin.h b/include/crt/mingw32/intrin.h similarity index 100% rename from reactos/include/crt/mingw32/intrin.h rename to include/crt/mingw32/intrin.h diff --git a/reactos/include/crt/mingw32/intrin_arm.h b/include/crt/mingw32/intrin_arm.h similarity index 100% rename from reactos/include/crt/mingw32/intrin_arm.h rename to include/crt/mingw32/intrin_arm.h diff --git a/reactos/include/crt/mingw32/intrin_ppc.h b/include/crt/mingw32/intrin_ppc.h similarity index 100% rename from reactos/include/crt/mingw32/intrin_ppc.h rename to include/crt/mingw32/intrin_ppc.h diff --git a/reactos/include/crt/mingw32/intrin_x86.h b/include/crt/mingw32/intrin_x86.h similarity index 100% rename from reactos/include/crt/mingw32/intrin_x86.h rename to include/crt/mingw32/intrin_x86.h diff --git a/reactos/include/crt/mingw32/intrin_x86_64.h b/include/crt/mingw32/intrin_x86_64.h similarity index 100% rename from reactos/include/crt/mingw32/intrin_x86_64.h rename to include/crt/mingw32/intrin_x86_64.h diff --git a/reactos/include/crt/mingw32/stdbool.h b/include/crt/mingw32/stdbool.h similarity index 100% rename from reactos/include/crt/mingw32/stdbool.h rename to include/crt/mingw32/stdbool.h diff --git a/reactos/include/crt/mingw_math.h b/include/crt/mingw_math.h similarity index 100% rename from reactos/include/crt/mingw_math.h rename to include/crt/mingw_math.h diff --git a/reactos/include/crt/minmax.h b/include/crt/minmax.h similarity index 100% rename from reactos/include/crt/minmax.h rename to include/crt/minmax.h diff --git a/reactos/include/crt/mmintrin.h b/include/crt/mmintrin.h similarity index 100% rename from reactos/include/crt/mmintrin.h rename to include/crt/mmintrin.h diff --git a/reactos/include/crt/msc/intrin.h b/include/crt/msc/intrin.h similarity index 100% rename from reactos/include/crt/msc/intrin.h rename to include/crt/msc/intrin.h diff --git a/reactos/include/crt/msc/msc_float.h b/include/crt/msc/msc_float.h similarity index 100% rename from reactos/include/crt/msc/msc_float.h rename to include/crt/msc/msc_float.h diff --git a/reactos/include/crt/new.h b/include/crt/new.h similarity index 100% rename from reactos/include/crt/new.h rename to include/crt/new.h diff --git a/reactos/include/crt/pgobootrun.h b/include/crt/pgobootrun.h similarity index 100% rename from reactos/include/crt/pgobootrun.h rename to include/crt/pgobootrun.h diff --git a/reactos/include/crt/process.h b/include/crt/process.h similarity index 100% rename from reactos/include/crt/process.h rename to include/crt/process.h diff --git a/reactos/include/crt/rtcapi.h b/include/crt/rtcapi.h similarity index 100% rename from reactos/include/crt/rtcapi.h rename to include/crt/rtcapi.h diff --git a/reactos/include/crt/search.h b/include/crt/search.h similarity index 100% rename from reactos/include/crt/search.h rename to include/crt/search.h diff --git a/reactos/include/crt/sec_api/conio_s.h b/include/crt/sec_api/conio_s.h similarity index 100% rename from reactos/include/crt/sec_api/conio_s.h rename to include/crt/sec_api/conio_s.h diff --git a/reactos/include/crt/sec_api/crtdbg_s.h b/include/crt/sec_api/crtdbg_s.h similarity index 100% rename from reactos/include/crt/sec_api/crtdbg_s.h rename to include/crt/sec_api/crtdbg_s.h diff --git a/reactos/include/crt/sec_api/io_s.h b/include/crt/sec_api/io_s.h similarity index 100% rename from reactos/include/crt/sec_api/io_s.h rename to include/crt/sec_api/io_s.h diff --git a/reactos/include/crt/sec_api/mbstring_s.h b/include/crt/sec_api/mbstring_s.h similarity index 100% rename from reactos/include/crt/sec_api/mbstring_s.h rename to include/crt/sec_api/mbstring_s.h diff --git a/reactos/include/crt/sec_api/search_s.h b/include/crt/sec_api/search_s.h similarity index 100% rename from reactos/include/crt/sec_api/search_s.h rename to include/crt/sec_api/search_s.h diff --git a/reactos/include/crt/sec_api/stdio_s.h b/include/crt/sec_api/stdio_s.h similarity index 100% rename from reactos/include/crt/sec_api/stdio_s.h rename to include/crt/sec_api/stdio_s.h diff --git a/reactos/include/crt/sec_api/stdlib_s.h b/include/crt/sec_api/stdlib_s.h similarity index 100% rename from reactos/include/crt/sec_api/stdlib_s.h rename to include/crt/sec_api/stdlib_s.h diff --git a/reactos/include/crt/sec_api/stralign_s.h b/include/crt/sec_api/stralign_s.h similarity index 100% rename from reactos/include/crt/sec_api/stralign_s.h rename to include/crt/sec_api/stralign_s.h diff --git a/reactos/include/crt/sec_api/string_s.h b/include/crt/sec_api/string_s.h similarity index 100% rename from reactos/include/crt/sec_api/string_s.h rename to include/crt/sec_api/string_s.h diff --git a/reactos/include/crt/sec_api/sys/timeb_s.h b/include/crt/sec_api/sys/timeb_s.h similarity index 100% rename from reactos/include/crt/sec_api/sys/timeb_s.h rename to include/crt/sec_api/sys/timeb_s.h diff --git a/reactos/include/crt/sec_api/tchar_s.h b/include/crt/sec_api/tchar_s.h similarity index 100% rename from reactos/include/crt/sec_api/tchar_s.h rename to include/crt/sec_api/tchar_s.h diff --git a/reactos/include/crt/sec_api/time_s.h b/include/crt/sec_api/time_s.h similarity index 100% rename from reactos/include/crt/sec_api/time_s.h rename to include/crt/sec_api/time_s.h diff --git a/reactos/include/crt/sec_api/wchar_s.h b/include/crt/sec_api/wchar_s.h similarity index 100% rename from reactos/include/crt/sec_api/wchar_s.h rename to include/crt/sec_api/wchar_s.h diff --git a/reactos/include/crt/setjmp.h b/include/crt/setjmp.h similarity index 100% rename from reactos/include/crt/setjmp.h rename to include/crt/setjmp.h diff --git a/reactos/include/crt/setjmpex.h b/include/crt/setjmpex.h similarity index 100% rename from reactos/include/crt/setjmpex.h rename to include/crt/setjmpex.h diff --git a/reactos/include/crt/share.h b/include/crt/share.h similarity index 100% rename from reactos/include/crt/share.h rename to include/crt/share.h diff --git a/reactos/include/crt/signal.h b/include/crt/signal.h similarity index 100% rename from reactos/include/crt/signal.h rename to include/crt/signal.h diff --git a/reactos/include/crt/stdarg.h b/include/crt/stdarg.h similarity index 100% rename from reactos/include/crt/stdarg.h rename to include/crt/stdarg.h diff --git a/reactos/include/crt/stddef.h b/include/crt/stddef.h similarity index 100% rename from reactos/include/crt/stddef.h rename to include/crt/stddef.h diff --git a/reactos/include/crt/stdexcpt.h b/include/crt/stdexcpt.h similarity index 100% rename from reactos/include/crt/stdexcpt.h rename to include/crt/stdexcpt.h diff --git a/reactos/include/crt/stdint.h b/include/crt/stdint.h similarity index 100% rename from reactos/include/crt/stdint.h rename to include/crt/stdint.h diff --git a/reactos/include/crt/stdio.h b/include/crt/stdio.h similarity index 100% rename from reactos/include/crt/stdio.h rename to include/crt/stdio.h diff --git a/reactos/include/crt/stdlib.h b/include/crt/stdlib.h similarity index 100% rename from reactos/include/crt/stdlib.h rename to include/crt/stdlib.h diff --git a/reactos/include/crt/string.h b/include/crt/string.h similarity index 100% rename from reactos/include/crt/string.h rename to include/crt/string.h diff --git a/reactos/include/crt/strings.h b/include/crt/strings.h similarity index 100% rename from reactos/include/crt/strings.h rename to include/crt/strings.h diff --git a/reactos/include/crt/sys/cdefs.h b/include/crt/sys/cdefs.h similarity index 100% rename from reactos/include/crt/sys/cdefs.h rename to include/crt/sys/cdefs.h diff --git a/reactos/include/crt/sys/fcntl.h b/include/crt/sys/fcntl.h similarity index 100% rename from reactos/include/crt/sys/fcntl.h rename to include/crt/sys/fcntl.h diff --git a/reactos/include/crt/sys/file.h b/include/crt/sys/file.h similarity index 100% rename from reactos/include/crt/sys/file.h rename to include/crt/sys/file.h diff --git a/reactos/include/crt/sys/ioctl.h b/include/crt/sys/ioctl.h similarity index 100% rename from reactos/include/crt/sys/ioctl.h rename to include/crt/sys/ioctl.h diff --git a/reactos/include/crt/sys/locking.h b/include/crt/sys/locking.h similarity index 100% rename from reactos/include/crt/sys/locking.h rename to include/crt/sys/locking.h diff --git a/reactos/include/crt/sys/param.h b/include/crt/sys/param.h similarity index 100% rename from reactos/include/crt/sys/param.h rename to include/crt/sys/param.h diff --git a/reactos/include/crt/sys/stat.h b/include/crt/sys/stat.h similarity index 100% rename from reactos/include/crt/sys/stat.h rename to include/crt/sys/stat.h diff --git a/reactos/include/crt/sys/time.h b/include/crt/sys/time.h similarity index 100% rename from reactos/include/crt/sys/time.h rename to include/crt/sys/time.h diff --git a/reactos/include/crt/sys/timeb.h b/include/crt/sys/timeb.h similarity index 100% rename from reactos/include/crt/sys/timeb.h rename to include/crt/sys/timeb.h diff --git a/reactos/include/crt/sys/types.h b/include/crt/sys/types.h similarity index 100% rename from reactos/include/crt/sys/types.h rename to include/crt/sys/types.h diff --git a/reactos/include/crt/sys/unistd.h b/include/crt/sys/unistd.h similarity index 100% rename from reactos/include/crt/sys/unistd.h rename to include/crt/sys/unistd.h diff --git a/reactos/include/crt/sys/utime.h b/include/crt/sys/utime.h similarity index 100% rename from reactos/include/crt/sys/utime.h rename to include/crt/sys/utime.h diff --git a/reactos/include/crt/tchar.h b/include/crt/tchar.h similarity index 100% rename from reactos/include/crt/tchar.h rename to include/crt/tchar.h diff --git a/reactos/include/crt/time.h b/include/crt/time.h similarity index 100% rename from reactos/include/crt/time.h rename to include/crt/time.h diff --git a/reactos/include/crt/typeinfo.h b/include/crt/typeinfo.h similarity index 100% rename from reactos/include/crt/typeinfo.h rename to include/crt/typeinfo.h diff --git a/reactos/include/crt/unistd.h b/include/crt/unistd.h similarity index 100% rename from reactos/include/crt/unistd.h rename to include/crt/unistd.h diff --git a/reactos/include/crt/utime.h b/include/crt/utime.h similarity index 100% rename from reactos/include/crt/utime.h rename to include/crt/utime.h diff --git a/reactos/include/crt/vadefs.h b/include/crt/vadefs.h similarity index 100% rename from reactos/include/crt/vadefs.h rename to include/crt/vadefs.h diff --git a/reactos/include/crt/varargs.h b/include/crt/varargs.h similarity index 100% rename from reactos/include/crt/varargs.h rename to include/crt/varargs.h diff --git a/reactos/include/crt/wchar.h b/include/crt/wchar.h similarity index 100% rename from reactos/include/crt/wchar.h rename to include/crt/wchar.h diff --git a/reactos/include/crt/wctype.h b/include/crt/wctype.h similarity index 100% rename from reactos/include/crt/wctype.h rename to include/crt/wctype.h diff --git a/reactos/include/crt/xlocinfo.h b/include/crt/xlocinfo.h similarity index 100% rename from reactos/include/crt/xlocinfo.h rename to include/crt/xlocinfo.h diff --git a/reactos/include/crt/xmath.h b/include/crt/xmath.h similarity index 100% rename from reactos/include/crt/xmath.h rename to include/crt/xmath.h diff --git a/reactos/include/crt/xmmintrin.h b/include/crt/xmmintrin.h similarity index 100% rename from reactos/include/crt/xmmintrin.h rename to include/crt/xmmintrin.h diff --git a/reactos/include/crt/ymath.h b/include/crt/ymath.h similarity index 100% rename from reactos/include/crt/ymath.h rename to include/crt/ymath.h diff --git a/reactos/include/crt/yvals.h b/include/crt/yvals.h similarity index 100% rename from reactos/include/crt/yvals.h rename to include/crt/yvals.h diff --git a/reactos/include/ddk/acpiioct.h b/include/ddk/acpiioct.h similarity index 100% rename from reactos/include/ddk/acpiioct.h rename to include/ddk/acpiioct.h diff --git a/reactos/include/ddk/afilter.h b/include/ddk/afilter.h similarity index 100% rename from reactos/include/ddk/afilter.h rename to include/ddk/afilter.h diff --git a/reactos/include/ddk/amtvuids.h b/include/ddk/amtvuids.h similarity index 100% rename from reactos/include/ddk/amtvuids.h rename to include/ddk/amtvuids.h diff --git a/reactos/include/ddk/atm.h b/include/ddk/atm.h similarity index 100% rename from reactos/include/ddk/atm.h rename to include/ddk/atm.h diff --git a/reactos/include/ddk/bdasup.h b/include/ddk/bdasup.h similarity index 100% rename from reactos/include/ddk/bdasup.h rename to include/ddk/bdasup.h diff --git a/reactos/include/ddk/classpnp.h b/include/ddk/classpnp.h similarity index 100% rename from reactos/include/ddk/classpnp.h rename to include/ddk/classpnp.h diff --git a/reactos/include/ddk/csq.h b/include/ddk/csq.h similarity index 100% rename from reactos/include/ddk/csq.h rename to include/ddk/csq.h diff --git a/reactos/include/ddk/d3dhal.h b/include/ddk/d3dhal.h similarity index 100% rename from reactos/include/ddk/d3dhal.h rename to include/ddk/d3dhal.h diff --git a/reactos/include/ddk/d3dhalex.h b/include/ddk/d3dhalex.h similarity index 100% rename from reactos/include/ddk/d3dhalex.h rename to include/ddk/d3dhalex.h diff --git a/reactos/include/ddk/d4drvif.h b/include/ddk/d4drvif.h similarity index 100% rename from reactos/include/ddk/d4drvif.h rename to include/ddk/d4drvif.h diff --git a/reactos/include/ddk/d4iface.h b/include/ddk/d4iface.h similarity index 100% rename from reactos/include/ddk/d4iface.h rename to include/ddk/d4iface.h diff --git a/reactos/include/ddk/dciddi.h b/include/ddk/dciddi.h similarity index 100% rename from reactos/include/ddk/dciddi.h rename to include/ddk/dciddi.h diff --git a/reactos/include/ddk/dderror.h b/include/ddk/dderror.h similarity index 100% rename from reactos/include/ddk/dderror.h rename to include/ddk/dderror.h diff --git a/reactos/include/ddk/dmusicks.h b/include/ddk/dmusicks.h similarity index 100% rename from reactos/include/ddk/dmusicks.h rename to include/ddk/dmusicks.h diff --git a/reactos/include/ddk/dmusprop.h b/include/ddk/dmusprop.h similarity index 100% rename from reactos/include/ddk/dmusprop.h rename to include/ddk/dmusprop.h diff --git a/reactos/include/ddk/drivinit.h b/include/ddk/drivinit.h similarity index 100% rename from reactos/include/ddk/drivinit.h rename to include/ddk/drivinit.h diff --git a/reactos/include/ddk/drmk.h b/include/ddk/drmk.h similarity index 100% rename from reactos/include/ddk/drmk.h rename to include/ddk/drmk.h diff --git a/reactos/include/ddk/dxapi.h b/include/ddk/dxapi.h similarity index 100% rename from reactos/include/ddk/dxapi.h rename to include/ddk/dxapi.h diff --git a/reactos/include/ddk/fltsafe.h b/include/ddk/fltsafe.h similarity index 100% rename from reactos/include/ddk/fltsafe.h rename to include/ddk/fltsafe.h diff --git a/reactos/include/ddk/hidclass.h b/include/ddk/hidclass.h similarity index 100% rename from reactos/include/ddk/hidclass.h rename to include/ddk/hidclass.h diff --git a/reactos/include/ddk/hubbusif.h b/include/ddk/hubbusif.h similarity index 100% rename from reactos/include/ddk/hubbusif.h rename to include/ddk/hubbusif.h diff --git a/reactos/include/ddk/ide.h b/include/ddk/ide.h similarity index 100% rename from reactos/include/ddk/ide.h rename to include/ddk/ide.h diff --git a/reactos/include/ddk/ioaccess.h b/include/ddk/ioaccess.h similarity index 100% rename from reactos/include/ddk/ioaccess.h rename to include/ddk/ioaccess.h diff --git a/reactos/include/ddk/kbdmou.h b/include/ddk/kbdmou.h similarity index 100% rename from reactos/include/ddk/kbdmou.h rename to include/ddk/kbdmou.h diff --git a/reactos/include/ddk/mcd.h b/include/ddk/mcd.h similarity index 100% rename from reactos/include/ddk/mcd.h rename to include/ddk/mcd.h diff --git a/reactos/include/ddk/mce.h b/include/ddk/mce.h similarity index 100% rename from reactos/include/ddk/mce.h rename to include/ddk/mce.h diff --git a/reactos/include/ddk/miniport.h b/include/ddk/miniport.h similarity index 100% rename from reactos/include/ddk/miniport.h rename to include/ddk/miniport.h diff --git a/reactos/include/ddk/minitape.h b/include/ddk/minitape.h similarity index 100% rename from reactos/include/ddk/minitape.h rename to include/ddk/minitape.h diff --git a/reactos/include/ddk/mountdev.h b/include/ddk/mountdev.h similarity index 100% rename from reactos/include/ddk/mountdev.h rename to include/ddk/mountdev.h diff --git a/reactos/include/ddk/mountmgr.h b/include/ddk/mountmgr.h similarity index 100% rename from reactos/include/ddk/mountmgr.h rename to include/ddk/mountmgr.h diff --git a/reactos/include/ddk/msports.h b/include/ddk/msports.h similarity index 100% rename from reactos/include/ddk/msports.h rename to include/ddk/msports.h diff --git a/reactos/include/ddk/ndis.h b/include/ddk/ndis.h similarity index 100% rename from reactos/include/ddk/ndis.h rename to include/ddk/ndis.h diff --git a/reactos/include/ddk/ndisguid.h b/include/ddk/ndisguid.h similarity index 100% rename from reactos/include/ddk/ndisguid.h rename to include/ddk/ndisguid.h diff --git a/reactos/include/ddk/ndistapi.h b/include/ddk/ndistapi.h similarity index 100% rename from reactos/include/ddk/ndistapi.h rename to include/ddk/ndistapi.h diff --git a/reactos/include/ddk/ndiswan.h b/include/ddk/ndiswan.h similarity index 100% rename from reactos/include/ddk/ndiswan.h rename to include/ddk/ndiswan.h diff --git a/reactos/include/ddk/netpnp.h b/include/ddk/netpnp.h similarity index 100% rename from reactos/include/ddk/netpnp.h rename to include/ddk/netpnp.h diff --git a/reactos/include/ddk/ntagp.h b/include/ddk/ntagp.h similarity index 100% rename from reactos/include/ddk/ntagp.h rename to include/ddk/ntagp.h diff --git a/reactos/include/ddk/ntddk.h b/include/ddk/ntddk.h similarity index 100% rename from reactos/include/ddk/ntddk.h rename to include/ddk/ntddk.h diff --git a/reactos/include/ddk/ntddpcm.h b/include/ddk/ntddpcm.h similarity index 100% rename from reactos/include/ddk/ntddpcm.h rename to include/ddk/ntddpcm.h diff --git a/reactos/include/ddk/ntddsnd.h b/include/ddk/ntddsnd.h similarity index 100% rename from reactos/include/ddk/ntddsnd.h rename to include/ddk/ntddsnd.h diff --git a/reactos/include/ddk/ntifs.h b/include/ddk/ntifs.h similarity index 100% rename from reactos/include/ddk/ntifs.h rename to include/ddk/ntifs.h diff --git a/reactos/include/ddk/ntimage.h b/include/ddk/ntimage.h similarity index 100% rename from reactos/include/ddk/ntimage.h rename to include/ddk/ntimage.h diff --git a/reactos/include/ddk/ntnls.h b/include/ddk/ntnls.h similarity index 100% rename from reactos/include/ddk/ntnls.h rename to include/ddk/ntnls.h diff --git a/reactos/include/ddk/ntpoapi.h b/include/ddk/ntpoapi.h similarity index 100% rename from reactos/include/ddk/ntpoapi.h rename to include/ddk/ntpoapi.h diff --git a/reactos/include/ddk/ntstrsafe.h b/include/ddk/ntstrsafe.h similarity index 100% rename from reactos/include/ddk/ntstrsafe.h rename to include/ddk/ntstrsafe.h diff --git a/reactos/include/ddk/oprghdlr.h b/include/ddk/oprghdlr.h similarity index 100% rename from reactos/include/ddk/oprghdlr.h rename to include/ddk/oprghdlr.h diff --git a/reactos/include/ddk/parallel.h b/include/ddk/parallel.h similarity index 100% rename from reactos/include/ddk/parallel.h rename to include/ddk/parallel.h diff --git a/reactos/include/ddk/pfhook.h b/include/ddk/pfhook.h similarity index 100% rename from reactos/include/ddk/pfhook.h rename to include/ddk/pfhook.h diff --git a/reactos/include/ddk/poclass.h b/include/ddk/poclass.h similarity index 100% rename from reactos/include/ddk/poclass.h rename to include/ddk/poclass.h diff --git a/reactos/include/ddk/portcls.h b/include/ddk/portcls.h similarity index 100% rename from reactos/include/ddk/portcls.h rename to include/ddk/portcls.h diff --git a/reactos/include/ddk/punknown.h b/include/ddk/punknown.h similarity index 100% rename from reactos/include/ddk/punknown.h rename to include/ddk/punknown.h diff --git a/reactos/include/ddk/scsi.h b/include/ddk/scsi.h similarity index 100% rename from reactos/include/ddk/scsi.h rename to include/ddk/scsi.h diff --git a/reactos/include/ddk/scsiscan.h b/include/ddk/scsiscan.h similarity index 100% rename from reactos/include/ddk/scsiscan.h rename to include/ddk/scsiscan.h diff --git a/reactos/include/ddk/scsiwmi.h b/include/ddk/scsiwmi.h similarity index 100% rename from reactos/include/ddk/scsiwmi.h rename to include/ddk/scsiwmi.h diff --git a/reactos/include/ddk/smbus.h b/include/ddk/smbus.h similarity index 100% rename from reactos/include/ddk/smbus.h rename to include/ddk/smbus.h diff --git a/reactos/include/ddk/srb.h b/include/ddk/srb.h similarity index 100% rename from reactos/include/ddk/srb.h rename to include/ddk/srb.h diff --git a/reactos/include/ddk/stdunk.h b/include/ddk/stdunk.h similarity index 100% rename from reactos/include/ddk/stdunk.h rename to include/ddk/stdunk.h diff --git a/reactos/include/ddk/storport.h b/include/ddk/storport.h similarity index 100% rename from reactos/include/ddk/storport.h rename to include/ddk/storport.h diff --git a/reactos/include/ddk/strmini.h b/include/ddk/strmini.h similarity index 100% rename from reactos/include/ddk/strmini.h rename to include/ddk/strmini.h diff --git a/reactos/include/ddk/swenum.h b/include/ddk/swenum.h similarity index 100% rename from reactos/include/ddk/swenum.h rename to include/ddk/swenum.h diff --git a/reactos/include/ddk/tdikrnl.h b/include/ddk/tdikrnl.h similarity index 100% rename from reactos/include/ddk/tdikrnl.h rename to include/ddk/tdikrnl.h diff --git a/reactos/include/ddk/tdistat.h b/include/ddk/tdistat.h similarity index 100% rename from reactos/include/ddk/tdistat.h rename to include/ddk/tdistat.h diff --git a/reactos/include/ddk/upssvc.h b/include/ddk/upssvc.h similarity index 100% rename from reactos/include/ddk/upssvc.h rename to include/ddk/upssvc.h diff --git a/reactos/include/ddk/usbbusif.h b/include/ddk/usbbusif.h similarity index 100% rename from reactos/include/ddk/usbbusif.h rename to include/ddk/usbbusif.h diff --git a/reactos/include/ddk/usbdlib.h b/include/ddk/usbdlib.h similarity index 100% rename from reactos/include/ddk/usbdlib.h rename to include/ddk/usbdlib.h diff --git a/reactos/include/ddk/usbdrivr.h b/include/ddk/usbdrivr.h similarity index 100% rename from reactos/include/ddk/usbdrivr.h rename to include/ddk/usbdrivr.h diff --git a/reactos/include/ddk/usbkern.h b/include/ddk/usbkern.h similarity index 100% rename from reactos/include/ddk/usbkern.h rename to include/ddk/usbkern.h diff --git a/reactos/include/ddk/usbprint.h b/include/ddk/usbprint.h similarity index 100% rename from reactos/include/ddk/usbprint.h rename to include/ddk/usbprint.h diff --git a/reactos/include/ddk/usbprotocoldefs.h b/include/ddk/usbprotocoldefs.h similarity index 100% rename from reactos/include/ddk/usbprotocoldefs.h rename to include/ddk/usbprotocoldefs.h diff --git a/reactos/include/ddk/usbscan.h b/include/ddk/usbscan.h similarity index 100% rename from reactos/include/ddk/usbscan.h rename to include/ddk/usbscan.h diff --git a/reactos/include/ddk/usbstorioctl.h b/include/ddk/usbstorioctl.h similarity index 100% rename from reactos/include/ddk/usbstorioctl.h rename to include/ddk/usbstorioctl.h diff --git a/reactos/include/ddk/video.h b/include/ddk/video.h similarity index 100% rename from reactos/include/ddk/video.h rename to include/ddk/video.h diff --git a/reactos/include/ddk/videoagp.h b/include/ddk/videoagp.h similarity index 100% rename from reactos/include/ddk/videoagp.h rename to include/ddk/videoagp.h diff --git a/reactos/include/ddk/wdm.h b/include/ddk/wdm.h similarity index 100% rename from reactos/include/ddk/wdm.h rename to include/ddk/wdm.h diff --git a/reactos/include/ddk/wdmguid.h b/include/ddk/wdmguid.h similarity index 100% rename from reactos/include/ddk/wdmguid.h rename to include/ddk/wdmguid.h diff --git a/reactos/include/ddk/wmidata.h b/include/ddk/wmidata.h similarity index 100% rename from reactos/include/ddk/wmidata.h rename to include/ddk/wmidata.h diff --git a/reactos/include/ddk/wmilib.h b/include/ddk/wmilib.h similarity index 100% rename from reactos/include/ddk/wmilib.h rename to include/ddk/wmilib.h diff --git a/reactos/include/ddk/ws2san.h b/include/ddk/ws2san.h similarity index 100% rename from reactos/include/ddk/ws2san.h rename to include/ddk/ws2san.h diff --git a/reactos/include/ddk/xfilter.h b/include/ddk/xfilter.h similarity index 100% rename from reactos/include/ddk/xfilter.h rename to include/ddk/xfilter.h diff --git a/reactos/include/directory.rbuild b/include/directory.rbuild similarity index 100% rename from reactos/include/directory.rbuild rename to include/directory.rbuild diff --git a/reactos/include/dxsdk/CMakeLists.txt b/include/dxsdk/CMakeLists.txt similarity index 100% rename from reactos/include/dxsdk/CMakeLists.txt rename to include/dxsdk/CMakeLists.txt diff --git a/reactos/include/dxsdk/Iwstdec.h b/include/dxsdk/Iwstdec.h similarity index 100% rename from reactos/include/dxsdk/Iwstdec.h rename to include/dxsdk/Iwstdec.h diff --git a/reactos/include/dxsdk/activecf.h b/include/dxsdk/activecf.h similarity index 100% rename from reactos/include/dxsdk/activecf.h rename to include/dxsdk/activecf.h diff --git a/reactos/include/dxsdk/amaudio.h b/include/dxsdk/amaudio.h similarity index 100% rename from reactos/include/dxsdk/amaudio.h rename to include/dxsdk/amaudio.h diff --git a/reactos/include/dxsdk/amparse.h b/include/dxsdk/amparse.h similarity index 100% rename from reactos/include/dxsdk/amparse.h rename to include/dxsdk/amparse.h diff --git a/reactos/include/dxsdk/amstream.idl b/include/dxsdk/amstream.idl similarity index 100% rename from reactos/include/dxsdk/amstream.idl rename to include/dxsdk/amstream.idl diff --git a/reactos/include/dxsdk/amva.h b/include/dxsdk/amva.h similarity index 100% rename from reactos/include/dxsdk/amva.h rename to include/dxsdk/amva.h diff --git a/reactos/include/dxsdk/amvideo.h b/include/dxsdk/amvideo.h similarity index 100% rename from reactos/include/dxsdk/amvideo.h rename to include/dxsdk/amvideo.h diff --git a/reactos/include/dxsdk/amvideo.idl b/include/dxsdk/amvideo.idl similarity index 100% rename from reactos/include/dxsdk/amvideo.idl rename to include/dxsdk/amvideo.idl diff --git a/reactos/include/dxsdk/atsmedia.h b/include/dxsdk/atsmedia.h similarity index 100% rename from reactos/include/dxsdk/atsmedia.h rename to include/dxsdk/atsmedia.h diff --git a/reactos/include/dxsdk/audevcod.h b/include/dxsdk/audevcod.h similarity index 100% rename from reactos/include/dxsdk/audevcod.h rename to include/dxsdk/audevcod.h diff --git a/reactos/include/dxsdk/austream.idl b/include/dxsdk/austream.idl similarity index 100% rename from reactos/include/dxsdk/austream.idl rename to include/dxsdk/austream.idl diff --git a/reactos/include/dxsdk/aviriff.h b/include/dxsdk/aviriff.h similarity index 100% rename from reactos/include/dxsdk/aviriff.h rename to include/dxsdk/aviriff.h diff --git a/reactos/include/dxsdk/axcore.idl b/include/dxsdk/axcore.idl similarity index 100% rename from reactos/include/dxsdk/axcore.idl rename to include/dxsdk/axcore.idl diff --git a/reactos/include/dxsdk/axextend.idl b/include/dxsdk/axextend.idl similarity index 100% rename from reactos/include/dxsdk/axextend.idl rename to include/dxsdk/axextend.idl diff --git a/reactos/include/dxsdk/axextendenums.h b/include/dxsdk/axextendenums.h similarity index 100% rename from reactos/include/dxsdk/axextendenums.h rename to include/dxsdk/axextendenums.h diff --git a/reactos/include/dxsdk/bdamedia.h b/include/dxsdk/bdamedia.h similarity index 100% rename from reactos/include/dxsdk/bdamedia.h rename to include/dxsdk/bdamedia.h diff --git a/reactos/include/dxsdk/bdatif.idl b/include/dxsdk/bdatif.idl similarity index 100% rename from reactos/include/dxsdk/bdatif.idl rename to include/dxsdk/bdatif.idl diff --git a/reactos/include/dxsdk/bdatypes.h b/include/dxsdk/bdatypes.h similarity index 100% rename from reactos/include/dxsdk/bdatypes.h rename to include/dxsdk/bdatypes.h diff --git a/reactos/include/dxsdk/comlite.h b/include/dxsdk/comlite.h similarity index 100% rename from reactos/include/dxsdk/comlite.h rename to include/dxsdk/comlite.h diff --git a/reactos/include/dxsdk/d3d8caps.h b/include/dxsdk/d3d8caps.h similarity index 100% rename from reactos/include/dxsdk/d3d8caps.h rename to include/dxsdk/d3d8caps.h diff --git a/reactos/include/dxsdk/d3d9caps.h b/include/dxsdk/d3d9caps.h similarity index 100% rename from reactos/include/dxsdk/d3d9caps.h rename to include/dxsdk/d3d9caps.h diff --git a/reactos/include/dxsdk/d3dcaps.h b/include/dxsdk/d3dcaps.h similarity index 100% rename from reactos/include/dxsdk/d3dcaps.h rename to include/dxsdk/d3dcaps.h diff --git a/reactos/include/dxsdk/d3drmwin.h b/include/dxsdk/d3drmwin.h similarity index 100% rename from reactos/include/dxsdk/d3drmwin.h rename to include/dxsdk/d3drmwin.h diff --git a/reactos/include/dxsdk/d3dvec.inl b/include/dxsdk/d3dvec.inl similarity index 100% rename from reactos/include/dxsdk/d3dvec.inl rename to include/dxsdk/d3dvec.inl diff --git a/reactos/include/dxsdk/d3dx9.h b/include/dxsdk/d3dx9.h similarity index 100% rename from reactos/include/dxsdk/d3dx9.h rename to include/dxsdk/d3dx9.h diff --git a/reactos/include/dxsdk/d3dx9core.h b/include/dxsdk/d3dx9core.h similarity index 100% rename from reactos/include/dxsdk/d3dx9core.h rename to include/dxsdk/d3dx9core.h diff --git a/reactos/include/dxsdk/d3dx9math.h b/include/dxsdk/d3dx9math.h similarity index 100% rename from reactos/include/dxsdk/d3dx9math.h rename to include/dxsdk/d3dx9math.h diff --git a/reactos/include/dxsdk/d3dx9math.inl b/include/dxsdk/d3dx9math.inl similarity index 100% rename from reactos/include/dxsdk/d3dx9math.inl rename to include/dxsdk/d3dx9math.inl diff --git a/reactos/include/dxsdk/d3dx9mesh.h b/include/dxsdk/d3dx9mesh.h similarity index 100% rename from reactos/include/dxsdk/d3dx9mesh.h rename to include/dxsdk/d3dx9mesh.h diff --git a/reactos/include/dxsdk/d3dx9shader.h b/include/dxsdk/d3dx9shader.h similarity index 100% rename from reactos/include/dxsdk/d3dx9shader.h rename to include/dxsdk/d3dx9shader.h diff --git a/reactos/include/dxsdk/d3dx9shape.h b/include/dxsdk/d3dx9shape.h similarity index 100% rename from reactos/include/dxsdk/d3dx9shape.h rename to include/dxsdk/d3dx9shape.h diff --git a/reactos/include/dxsdk/d3dx9tex.h b/include/dxsdk/d3dx9tex.h similarity index 100% rename from reactos/include/dxsdk/d3dx9tex.h rename to include/dxsdk/d3dx9tex.h diff --git a/reactos/include/dxsdk/d3dx9xof.h b/include/dxsdk/d3dx9xof.h similarity index 100% rename from reactos/include/dxsdk/d3dx9xof.h rename to include/dxsdk/d3dx9xof.h diff --git a/reactos/include/dxsdk/ddrawex.h b/include/dxsdk/ddrawex.h similarity index 100% rename from reactos/include/dxsdk/ddrawex.h rename to include/dxsdk/ddrawex.h diff --git a/reactos/include/dxsdk/ddstream.idl b/include/dxsdk/ddstream.idl similarity index 100% rename from reactos/include/dxsdk/ddstream.idl rename to include/dxsdk/ddstream.idl diff --git a/reactos/include/dxsdk/devenum.idl b/include/dxsdk/devenum.idl similarity index 100% rename from reactos/include/dxsdk/devenum.idl rename to include/dxsdk/devenum.idl diff --git a/reactos/include/dxsdk/dls1.h b/include/dxsdk/dls1.h similarity index 100% rename from reactos/include/dxsdk/dls1.h rename to include/dxsdk/dls1.h diff --git a/reactos/include/dxsdk/dls2.h b/include/dxsdk/dls2.h similarity index 100% rename from reactos/include/dxsdk/dls2.h rename to include/dxsdk/dls2.h diff --git a/reactos/include/dxsdk/dmdls.h b/include/dxsdk/dmdls.h similarity index 100% rename from reactos/include/dxsdk/dmdls.h rename to include/dxsdk/dmdls.h diff --git a/reactos/include/dxsdk/dmerror.h b/include/dxsdk/dmerror.h similarity index 100% rename from reactos/include/dxsdk/dmerror.h rename to include/dxsdk/dmerror.h diff --git a/reactos/include/dxsdk/dmksctrl.h b/include/dxsdk/dmksctrl.h similarity index 100% rename from reactos/include/dxsdk/dmksctrl.h rename to include/dxsdk/dmksctrl.h diff --git a/reactos/include/dxsdk/dmo.h b/include/dxsdk/dmo.h similarity index 100% rename from reactos/include/dxsdk/dmo.h rename to include/dxsdk/dmo.h diff --git a/reactos/include/dxsdk/dmodshow.idl b/include/dxsdk/dmodshow.idl similarity index 100% rename from reactos/include/dxsdk/dmodshow.idl rename to include/dxsdk/dmodshow.idl diff --git a/reactos/include/dxsdk/dmoreg.h b/include/dxsdk/dmoreg.h similarity index 100% rename from reactos/include/dxsdk/dmoreg.h rename to include/dxsdk/dmoreg.h diff --git a/reactos/include/dxsdk/dmort.h b/include/dxsdk/dmort.h similarity index 100% rename from reactos/include/dxsdk/dmort.h rename to include/dxsdk/dmort.h diff --git a/reactos/include/dxsdk/dmplugin.h b/include/dxsdk/dmplugin.h similarity index 100% rename from reactos/include/dxsdk/dmplugin.h rename to include/dxsdk/dmplugin.h diff --git a/reactos/include/dxsdk/dmusbuff.h b/include/dxsdk/dmusbuff.h similarity index 100% rename from reactos/include/dxsdk/dmusbuff.h rename to include/dxsdk/dmusbuff.h diff --git a/reactos/include/dxsdk/dmusicc.h b/include/dxsdk/dmusicc.h similarity index 100% rename from reactos/include/dxsdk/dmusicc.h rename to include/dxsdk/dmusicc.h diff --git a/reactos/include/dxsdk/dmusicf.h b/include/dxsdk/dmusicf.h similarity index 100% rename from reactos/include/dxsdk/dmusicf.h rename to include/dxsdk/dmusicf.h diff --git a/reactos/include/dxsdk/dmusici.h b/include/dxsdk/dmusici.h similarity index 100% rename from reactos/include/dxsdk/dmusici.h rename to include/dxsdk/dmusici.h diff --git a/reactos/include/dxsdk/dmusics.h b/include/dxsdk/dmusics.h similarity index 100% rename from reactos/include/dxsdk/dmusics.h rename to include/dxsdk/dmusics.h diff --git a/reactos/include/dxsdk/dsconf.h b/include/dxsdk/dsconf.h similarity index 100% rename from reactos/include/dxsdk/dsconf.h rename to include/dxsdk/dsconf.h diff --git a/reactos/include/dxsdk/dsetup.h b/include/dxsdk/dsetup.h similarity index 100% rename from reactos/include/dxsdk/dsetup.h rename to include/dxsdk/dsetup.h diff --git a/reactos/include/dxsdk/dshow.h b/include/dxsdk/dshow.h similarity index 100% rename from reactos/include/dxsdk/dshow.h rename to include/dxsdk/dshow.h diff --git a/reactos/include/dxsdk/dshowasf.idl b/include/dxsdk/dshowasf.idl similarity index 100% rename from reactos/include/dxsdk/dshowasf.idl rename to include/dxsdk/dshowasf.idl diff --git a/reactos/include/dxsdk/dv.h b/include/dxsdk/dv.h similarity index 100% rename from reactos/include/dxsdk/dv.h rename to include/dxsdk/dv.h diff --git a/reactos/include/dxsdk/dx7todx8.h b/include/dxsdk/dx7todx8.h similarity index 100% rename from reactos/include/dxsdk/dx7todx8.h rename to include/dxsdk/dx7todx8.h diff --git a/reactos/include/dxsdk/dxdiag.h b/include/dxsdk/dxdiag.h similarity index 100% rename from reactos/include/dxsdk/dxdiag.h rename to include/dxsdk/dxdiag.h diff --git a/reactos/include/dxsdk/dxerr8.h b/include/dxsdk/dxerr8.h similarity index 100% rename from reactos/include/dxsdk/dxerr8.h rename to include/dxsdk/dxerr8.h diff --git a/reactos/include/dxsdk/dxerr9.h b/include/dxsdk/dxerr9.h similarity index 100% rename from reactos/include/dxsdk/dxerr9.h rename to include/dxsdk/dxerr9.h diff --git a/reactos/include/dxsdk/dxfile.h b/include/dxsdk/dxfile.h similarity index 100% rename from reactos/include/dxsdk/dxfile.h rename to include/dxsdk/dxfile.h diff --git a/reactos/include/dxsdk/dxsdk.rbuild b/include/dxsdk/dxsdk.rbuild similarity index 100% rename from reactos/include/dxsdk/dxsdk.rbuild rename to include/dxsdk/dxsdk.rbuild diff --git a/reactos/include/dxsdk/dxsdkver.h b/include/dxsdk/dxsdkver.h similarity index 100% rename from reactos/include/dxsdk/dxsdkver.h rename to include/dxsdk/dxsdkver.h diff --git a/reactos/include/dxsdk/dyngraph.idl b/include/dxsdk/dyngraph.idl similarity index 100% rename from reactos/include/dxsdk/dyngraph.idl rename to include/dxsdk/dyngraph.idl diff --git a/reactos/include/dxsdk/errors.h b/include/dxsdk/errors.h similarity index 100% rename from reactos/include/dxsdk/errors.h rename to include/dxsdk/errors.h diff --git a/reactos/include/dxsdk/evcode.h b/include/dxsdk/evcode.h similarity index 100% rename from reactos/include/dxsdk/evcode.h rename to include/dxsdk/evcode.h diff --git a/reactos/include/dxsdk/il21dec.h b/include/dxsdk/il21dec.h similarity index 100% rename from reactos/include/dxsdk/il21dec.h rename to include/dxsdk/il21dec.h diff --git a/reactos/include/dxsdk/ksguid.h b/include/dxsdk/ksguid.h similarity index 100% rename from reactos/include/dxsdk/ksguid.h rename to include/dxsdk/ksguid.h diff --git a/reactos/include/dxsdk/ksuuids.h b/include/dxsdk/ksuuids.h similarity index 100% rename from reactos/include/dxsdk/ksuuids.h rename to include/dxsdk/ksuuids.h diff --git a/reactos/include/dxsdk/mediaerr.h b/include/dxsdk/mediaerr.h similarity index 100% rename from reactos/include/dxsdk/mediaerr.h rename to include/dxsdk/mediaerr.h diff --git a/reactos/include/dxsdk/mediaobj.idl b/include/dxsdk/mediaobj.idl similarity index 100% rename from reactos/include/dxsdk/mediaobj.idl rename to include/dxsdk/mediaobj.idl diff --git a/reactos/include/dxsdk/medparam.idl b/include/dxsdk/medparam.idl similarity index 100% rename from reactos/include/dxsdk/medparam.idl rename to include/dxsdk/medparam.idl diff --git a/reactos/include/dxsdk/mixerocx.idl b/include/dxsdk/mixerocx.idl similarity index 100% rename from reactos/include/dxsdk/mixerocx.idl rename to include/dxsdk/mixerocx.idl diff --git a/reactos/include/dxsdk/mmstream.idl b/include/dxsdk/mmstream.idl similarity index 100% rename from reactos/include/dxsdk/mmstream.idl rename to include/dxsdk/mmstream.idl diff --git a/reactos/include/dxsdk/mpconfig.h b/include/dxsdk/mpconfig.h similarity index 100% rename from reactos/include/dxsdk/mpconfig.h rename to include/dxsdk/mpconfig.h diff --git a/reactos/include/dxsdk/mpeg2bits.h b/include/dxsdk/mpeg2bits.h similarity index 100% rename from reactos/include/dxsdk/mpeg2bits.h rename to include/dxsdk/mpeg2bits.h diff --git a/reactos/include/dxsdk/mpeg2error.h b/include/dxsdk/mpeg2error.h similarity index 100% rename from reactos/include/dxsdk/mpeg2error.h rename to include/dxsdk/mpeg2error.h diff --git a/reactos/include/dxsdk/mpegtype.h b/include/dxsdk/mpegtype.h similarity index 100% rename from reactos/include/dxsdk/mpegtype.h rename to include/dxsdk/mpegtype.h diff --git a/reactos/include/dxsdk/pixplugin.h b/include/dxsdk/pixplugin.h similarity index 100% rename from reactos/include/dxsdk/pixplugin.h rename to include/dxsdk/pixplugin.h diff --git a/reactos/include/dxsdk/qedit.idl b/include/dxsdk/qedit.idl similarity index 100% rename from reactos/include/dxsdk/qedit.idl rename to include/dxsdk/qedit.idl diff --git a/reactos/include/dxsdk/regbag.idl b/include/dxsdk/regbag.idl similarity index 100% rename from reactos/include/dxsdk/regbag.idl rename to include/dxsdk/regbag.idl diff --git a/reactos/include/dxsdk/rmxfguid.h b/include/dxsdk/rmxfguid.h similarity index 100% rename from reactos/include/dxsdk/rmxfguid.h rename to include/dxsdk/rmxfguid.h diff --git a/reactos/include/dxsdk/strmif.idl b/include/dxsdk/strmif.idl similarity index 100% rename from reactos/include/dxsdk/strmif.idl rename to include/dxsdk/strmif.idl diff --git a/reactos/include/dxsdk/tvratings.idl b/include/dxsdk/tvratings.idl similarity index 100% rename from reactos/include/dxsdk/tvratings.idl rename to include/dxsdk/tvratings.idl diff --git a/reactos/include/dxsdk/uuids.h b/include/dxsdk/uuids.h similarity index 100% rename from reactos/include/dxsdk/uuids.h rename to include/dxsdk/uuids.h diff --git a/reactos/include/dxsdk/vidcap.idl b/include/dxsdk/vidcap.idl similarity index 100% rename from reactos/include/dxsdk/vidcap.idl rename to include/dxsdk/vidcap.idl diff --git a/reactos/include/dxsdk/videoacc.idl b/include/dxsdk/videoacc.idl similarity index 100% rename from reactos/include/dxsdk/videoacc.idl rename to include/dxsdk/videoacc.idl diff --git a/reactos/include/dxsdk/vmrender.idl b/include/dxsdk/vmrender.idl similarity index 100% rename from reactos/include/dxsdk/vmrender.idl rename to include/dxsdk/vmrender.idl diff --git a/reactos/include/dxsdk/vpconfig.h b/include/dxsdk/vpconfig.h similarity index 100% rename from reactos/include/dxsdk/vpconfig.h rename to include/dxsdk/vpconfig.h diff --git a/reactos/include/dxsdk/vpnotify.h b/include/dxsdk/vpnotify.h similarity index 100% rename from reactos/include/dxsdk/vpnotify.h rename to include/dxsdk/vpnotify.h diff --git a/reactos/include/dxsdk/vptype.h b/include/dxsdk/vptype.h similarity index 100% rename from reactos/include/dxsdk/vptype.h rename to include/dxsdk/vptype.h diff --git a/reactos/include/host/config.h b/include/host/config.h similarity index 100% rename from reactos/include/host/config.h rename to include/host/config.h diff --git a/reactos/include/host/debug.h b/include/host/debug.h similarity index 100% rename from reactos/include/host/debug.h rename to include/host/debug.h diff --git a/reactos/include/host/guiddef.h b/include/host/guiddef.h similarity index 100% rename from reactos/include/host/guiddef.h rename to include/host/guiddef.h diff --git a/reactos/include/host/nls.h b/include/host/nls.h similarity index 100% rename from reactos/include/host/nls.h rename to include/host/nls.h diff --git a/reactos/include/host/poppack.h b/include/host/poppack.h similarity index 100% rename from reactos/include/host/poppack.h rename to include/host/poppack.h diff --git a/reactos/include/host/pshpack1.h b/include/host/pshpack1.h similarity index 100% rename from reactos/include/host/pshpack1.h rename to include/host/pshpack1.h diff --git a/reactos/include/host/pshpack2.h b/include/host/pshpack2.h similarity index 100% rename from reactos/include/host/pshpack2.h rename to include/host/pshpack2.h diff --git a/reactos/include/host/pshpack4.h b/include/host/pshpack4.h similarity index 100% rename from reactos/include/host/pshpack4.h rename to include/host/pshpack4.h diff --git a/reactos/include/host/pshpack8.h b/include/host/pshpack8.h similarity index 100% rename from reactos/include/host/pshpack8.h rename to include/host/pshpack8.h diff --git a/reactos/include/host/pshpck16.h b/include/host/pshpck16.h similarity index 100% rename from reactos/include/host/pshpck16.h rename to include/host/pshpck16.h diff --git a/reactos/include/host/typedefs.h b/include/host/typedefs.h similarity index 100% rename from reactos/include/host/typedefs.h rename to include/host/typedefs.h diff --git a/reactos/include/host/wine/list.h b/include/host/wine/list.h similarity index 100% rename from reactos/include/host/wine/list.h rename to include/host/wine/list.h diff --git a/reactos/include/host/wine/port.h b/include/host/wine/port.h similarity index 100% rename from reactos/include/host/wine/port.h rename to include/host/wine/port.h diff --git a/reactos/include/host/wine/rpcfc.h b/include/host/wine/rpcfc.h similarity index 100% rename from reactos/include/host/wine/rpcfc.h rename to include/host/wine/rpcfc.h diff --git a/reactos/include/host/wine/unicode.h b/include/host/wine/unicode.h similarity index 100% rename from reactos/include/host/wine/unicode.h rename to include/host/wine/unicode.h diff --git a/reactos/include/host/wine/wpp.h b/include/host/wine/wpp.h similarity index 100% rename from reactos/include/host/wine/wpp.h rename to include/host/wine/wpp.h diff --git a/reactos/include/ndk/amd64/asm.h b/include/ndk/amd64/asm.h similarity index 100% rename from reactos/include/ndk/amd64/asm.h rename to include/ndk/amd64/asm.h diff --git a/reactos/include/ndk/amd64/asmmacro.S b/include/ndk/amd64/asmmacro.S similarity index 100% rename from reactos/include/ndk/amd64/asmmacro.S rename to include/ndk/amd64/asmmacro.S diff --git a/reactos/include/ndk/amd64/ketypes.h b/include/ndk/amd64/ketypes.h similarity index 100% rename from reactos/include/ndk/amd64/ketypes.h rename to include/ndk/amd64/ketypes.h diff --git a/reactos/include/ndk/amd64/mmtypes.h b/include/ndk/amd64/mmtypes.h similarity index 100% rename from reactos/include/ndk/amd64/mmtypes.h rename to include/ndk/amd64/mmtypes.h diff --git a/reactos/include/ndk/arch/ketypes.h b/include/ndk/arch/ketypes.h similarity index 100% rename from reactos/include/ndk/arch/ketypes.h rename to include/ndk/arch/ketypes.h diff --git a/reactos/include/ndk/arch/mmtypes.h b/include/ndk/arch/mmtypes.h similarity index 100% rename from reactos/include/ndk/arch/mmtypes.h rename to include/ndk/arch/mmtypes.h diff --git a/reactos/include/ndk/arm/ketypes.h b/include/ndk/arm/ketypes.h similarity index 100% rename from reactos/include/ndk/arm/ketypes.h rename to include/ndk/arm/ketypes.h diff --git a/reactos/include/ndk/arm/mmtypes.h b/include/ndk/arm/mmtypes.h similarity index 100% rename from reactos/include/ndk/arm/mmtypes.h rename to include/ndk/arm/mmtypes.h diff --git a/reactos/include/ndk/asm.h b/include/ndk/asm.h similarity index 100% rename from reactos/include/ndk/asm.h rename to include/ndk/asm.h diff --git a/reactos/include/ndk/cctypes.h b/include/ndk/cctypes.h similarity index 100% rename from reactos/include/ndk/cctypes.h rename to include/ndk/cctypes.h diff --git a/reactos/include/ndk/cmfuncs.h b/include/ndk/cmfuncs.h similarity index 100% rename from reactos/include/ndk/cmfuncs.h rename to include/ndk/cmfuncs.h diff --git a/reactos/include/ndk/cmtypes.h b/include/ndk/cmtypes.h similarity index 100% rename from reactos/include/ndk/cmtypes.h rename to include/ndk/cmtypes.h diff --git a/reactos/include/ndk/dbgkfuncs.h b/include/ndk/dbgkfuncs.h similarity index 100% rename from reactos/include/ndk/dbgkfuncs.h rename to include/ndk/dbgkfuncs.h diff --git a/reactos/include/ndk/dbgktypes.h b/include/ndk/dbgktypes.h similarity index 100% rename from reactos/include/ndk/dbgktypes.h rename to include/ndk/dbgktypes.h diff --git a/reactos/include/ndk/exfuncs.h b/include/ndk/exfuncs.h similarity index 100% rename from reactos/include/ndk/exfuncs.h rename to include/ndk/exfuncs.h diff --git a/reactos/include/ndk/extypes.h b/include/ndk/extypes.h similarity index 100% rename from reactos/include/ndk/extypes.h rename to include/ndk/extypes.h diff --git a/reactos/include/ndk/halfuncs.h b/include/ndk/halfuncs.h similarity index 100% rename from reactos/include/ndk/halfuncs.h rename to include/ndk/halfuncs.h diff --git a/reactos/include/ndk/haltypes.h b/include/ndk/haltypes.h similarity index 100% rename from reactos/include/ndk/haltypes.h rename to include/ndk/haltypes.h diff --git a/reactos/include/ndk/i386/asm.h b/include/ndk/i386/asm.h similarity index 100% rename from reactos/include/ndk/i386/asm.h rename to include/ndk/i386/asm.h diff --git a/reactos/include/ndk/i386/ketypes.h b/include/ndk/i386/ketypes.h similarity index 100% rename from reactos/include/ndk/i386/ketypes.h rename to include/ndk/i386/ketypes.h diff --git a/reactos/include/ndk/i386/mmtypes.h b/include/ndk/i386/mmtypes.h similarity index 100% rename from reactos/include/ndk/i386/mmtypes.h rename to include/ndk/i386/mmtypes.h diff --git a/reactos/include/ndk/ifssupp.h b/include/ndk/ifssupp.h similarity index 100% rename from reactos/include/ndk/ifssupp.h rename to include/ndk/ifssupp.h diff --git a/reactos/include/ndk/inbvfuncs.h b/include/ndk/inbvfuncs.h similarity index 100% rename from reactos/include/ndk/inbvfuncs.h rename to include/ndk/inbvfuncs.h diff --git a/reactos/include/ndk/inbvtypes.h b/include/ndk/inbvtypes.h similarity index 100% rename from reactos/include/ndk/inbvtypes.h rename to include/ndk/inbvtypes.h diff --git a/reactos/include/ndk/inline_ntcurrentteb.h b/include/ndk/inline_ntcurrentteb.h similarity index 100% rename from reactos/include/ndk/inline_ntcurrentteb.h rename to include/ndk/inline_ntcurrentteb.h diff --git a/reactos/include/ndk/iofuncs.h b/include/ndk/iofuncs.h similarity index 100% rename from reactos/include/ndk/iofuncs.h rename to include/ndk/iofuncs.h diff --git a/reactos/include/ndk/iotypes.h b/include/ndk/iotypes.h similarity index 100% rename from reactos/include/ndk/iotypes.h rename to include/ndk/iotypes.h diff --git a/reactos/include/ndk/kbd.h b/include/ndk/kbd.h similarity index 100% rename from reactos/include/ndk/kbd.h rename to include/ndk/kbd.h diff --git a/reactos/include/ndk/kdfuncs.h b/include/ndk/kdfuncs.h similarity index 100% rename from reactos/include/ndk/kdfuncs.h rename to include/ndk/kdfuncs.h diff --git a/reactos/include/ndk/kdtypes.h b/include/ndk/kdtypes.h similarity index 100% rename from reactos/include/ndk/kdtypes.h rename to include/ndk/kdtypes.h diff --git a/reactos/include/ndk/kefuncs.h b/include/ndk/kefuncs.h similarity index 100% rename from reactos/include/ndk/kefuncs.h rename to include/ndk/kefuncs.h diff --git a/reactos/include/ndk/ketypes.h b/include/ndk/ketypes.h similarity index 100% rename from reactos/include/ndk/ketypes.h rename to include/ndk/ketypes.h diff --git a/reactos/include/ndk/ldrfuncs.h b/include/ndk/ldrfuncs.h similarity index 100% rename from reactos/include/ndk/ldrfuncs.h rename to include/ndk/ldrfuncs.h diff --git a/reactos/include/ndk/ldrtypes.h b/include/ndk/ldrtypes.h similarity index 100% rename from reactos/include/ndk/ldrtypes.h rename to include/ndk/ldrtypes.h diff --git a/reactos/include/ndk/lpcfuncs.h b/include/ndk/lpcfuncs.h similarity index 100% rename from reactos/include/ndk/lpcfuncs.h rename to include/ndk/lpcfuncs.h diff --git a/reactos/include/ndk/lpctypes.h b/include/ndk/lpctypes.h similarity index 100% rename from reactos/include/ndk/lpctypes.h rename to include/ndk/lpctypes.h diff --git a/reactos/include/ndk/mmfuncs.h b/include/ndk/mmfuncs.h similarity index 100% rename from reactos/include/ndk/mmfuncs.h rename to include/ndk/mmfuncs.h diff --git a/reactos/include/ndk/mmtypes.h b/include/ndk/mmtypes.h similarity index 100% rename from reactos/include/ndk/mmtypes.h rename to include/ndk/mmtypes.h diff --git a/reactos/include/ndk/ntndk.h b/include/ndk/ntndk.h similarity index 100% rename from reactos/include/ndk/ntndk.h rename to include/ndk/ntndk.h diff --git a/reactos/include/ndk/obfuncs.h b/include/ndk/obfuncs.h similarity index 100% rename from reactos/include/ndk/obfuncs.h rename to include/ndk/obfuncs.h diff --git a/reactos/include/ndk/obtypes.h b/include/ndk/obtypes.h similarity index 100% rename from reactos/include/ndk/obtypes.h rename to include/ndk/obtypes.h diff --git a/reactos/include/ndk/peb_teb.h b/include/ndk/peb_teb.h similarity index 100% rename from reactos/include/ndk/peb_teb.h rename to include/ndk/peb_teb.h diff --git a/reactos/include/ndk/pofuncs.h b/include/ndk/pofuncs.h similarity index 100% rename from reactos/include/ndk/pofuncs.h rename to include/ndk/pofuncs.h diff --git a/reactos/include/ndk/potypes.h b/include/ndk/potypes.h similarity index 100% rename from reactos/include/ndk/potypes.h rename to include/ndk/potypes.h diff --git a/reactos/include/ndk/powerpc/ketypes.h b/include/ndk/powerpc/ketypes.h similarity index 100% rename from reactos/include/ndk/powerpc/ketypes.h rename to include/ndk/powerpc/ketypes.h diff --git a/reactos/include/ndk/powerpc/mmtypes.h b/include/ndk/powerpc/mmtypes.h similarity index 100% rename from reactos/include/ndk/powerpc/mmtypes.h rename to include/ndk/powerpc/mmtypes.h diff --git a/reactos/include/ndk/psfuncs.h b/include/ndk/psfuncs.h similarity index 100% rename from reactos/include/ndk/psfuncs.h rename to include/ndk/psfuncs.h diff --git a/reactos/include/ndk/pstypes.h b/include/ndk/pstypes.h similarity index 100% rename from reactos/include/ndk/pstypes.h rename to include/ndk/pstypes.h diff --git a/reactos/include/ndk/readme.txt b/include/ndk/readme.txt similarity index 100% rename from reactos/include/ndk/readme.txt rename to include/ndk/readme.txt diff --git a/reactos/include/ndk/rtlfuncs.h b/include/ndk/rtlfuncs.h similarity index 100% rename from reactos/include/ndk/rtlfuncs.h rename to include/ndk/rtlfuncs.h diff --git a/reactos/include/ndk/rtltypes.h b/include/ndk/rtltypes.h similarity index 100% rename from reactos/include/ndk/rtltypes.h rename to include/ndk/rtltypes.h diff --git a/reactos/include/ndk/sefuncs.h b/include/ndk/sefuncs.h similarity index 100% rename from reactos/include/ndk/sefuncs.h rename to include/ndk/sefuncs.h diff --git a/reactos/include/ndk/setypes.h b/include/ndk/setypes.h similarity index 100% rename from reactos/include/ndk/setypes.h rename to include/ndk/setypes.h diff --git a/reactos/include/ndk/umfuncs.h b/include/ndk/umfuncs.h similarity index 100% rename from reactos/include/ndk/umfuncs.h rename to include/ndk/umfuncs.h diff --git a/reactos/include/ndk/umtypes.h b/include/ndk/umtypes.h similarity index 100% rename from reactos/include/ndk/umtypes.h rename to include/ndk/umtypes.h diff --git a/reactos/include/ndk/vffuncs.h b/include/ndk/vffuncs.h similarity index 100% rename from reactos/include/ndk/vffuncs.h rename to include/ndk/vffuncs.h diff --git a/reactos/include/ndk/vftypes.h b/include/ndk/vftypes.h similarity index 100% rename from reactos/include/ndk/vftypes.h rename to include/ndk/vftypes.h diff --git a/reactos/include/psdk/CMakeLists.txt b/include/psdk/CMakeLists.txt similarity index 100% rename from reactos/include/psdk/CMakeLists.txt rename to include/psdk/CMakeLists.txt diff --git a/reactos/include/psdk/README.w32api b/include/psdk/README.w32api similarity index 100% rename from reactos/include/psdk/README.w32api rename to include/psdk/README.w32api diff --git a/reactos/include/psdk/accctrl.h b/include/psdk/accctrl.h similarity index 100% rename from reactos/include/psdk/accctrl.h rename to include/psdk/accctrl.h diff --git a/reactos/include/psdk/access.idl b/include/psdk/access.idl similarity index 100% rename from reactos/include/psdk/access.idl rename to include/psdk/access.idl diff --git a/reactos/include/psdk/aclapi.h b/include/psdk/aclapi.h similarity index 100% rename from reactos/include/psdk/aclapi.h rename to include/psdk/aclapi.h diff --git a/reactos/include/psdk/aclui.h b/include/psdk/aclui.h similarity index 100% rename from reactos/include/psdk/aclui.h rename to include/psdk/aclui.h diff --git a/reactos/include/psdk/activaut.idl b/include/psdk/activaut.idl similarity index 100% rename from reactos/include/psdk/activaut.idl rename to include/psdk/activaut.idl diff --git a/reactos/include/psdk/activdbg.idl b/include/psdk/activdbg.idl similarity index 100% rename from reactos/include/psdk/activdbg.idl rename to include/psdk/activdbg.idl diff --git a/reactos/include/psdk/activscp.idl b/include/psdk/activscp.idl similarity index 100% rename from reactos/include/psdk/activscp.idl rename to include/psdk/activscp.idl diff --git a/reactos/include/psdk/adshlp.h b/include/psdk/adshlp.h similarity index 100% rename from reactos/include/psdk/adshlp.h rename to include/psdk/adshlp.h diff --git a/reactos/include/psdk/advpub.h b/include/psdk/advpub.h similarity index 100% rename from reactos/include/psdk/advpub.h rename to include/psdk/advpub.h diff --git a/reactos/include/psdk/af_irda.h b/include/psdk/af_irda.h similarity index 100% rename from reactos/include/psdk/af_irda.h rename to include/psdk/af_irda.h diff --git a/reactos/include/psdk/afxres.h b/include/psdk/afxres.h similarity index 100% rename from reactos/include/psdk/afxres.h rename to include/psdk/afxres.h diff --git a/reactos/include/psdk/appmgmt.h b/include/psdk/appmgmt.h similarity index 100% rename from reactos/include/psdk/appmgmt.h rename to include/psdk/appmgmt.h diff --git a/reactos/include/psdk/asptlb.idl b/include/psdk/asptlb.idl similarity index 100% rename from reactos/include/psdk/asptlb.idl rename to include/psdk/asptlb.idl diff --git a/reactos/include/psdk/asynot.idl b/include/psdk/asynot.idl similarity index 100% rename from reactos/include/psdk/asynot.idl rename to include/psdk/asynot.idl diff --git a/reactos/include/psdk/asysta.idl b/include/psdk/asysta.idl similarity index 100% rename from reactos/include/psdk/asysta.idl rename to include/psdk/asysta.idl diff --git a/reactos/include/psdk/atliface.idl b/include/psdk/atliface.idl similarity index 100% rename from reactos/include/psdk/atliface.idl rename to include/psdk/atliface.idl diff --git a/reactos/include/psdk/atsmedia.h b/include/psdk/atsmedia.h similarity index 100% rename from reactos/include/psdk/atsmedia.h rename to include/psdk/atsmedia.h diff --git a/reactos/include/psdk/authz.h b/include/psdk/authz.h similarity index 100% rename from reactos/include/psdk/authz.h rename to include/psdk/authz.h diff --git a/reactos/include/psdk/basetsd.h b/include/psdk/basetsd.h similarity index 100% rename from reactos/include/psdk/basetsd.h rename to include/psdk/basetsd.h diff --git a/reactos/include/psdk/basetyps.h b/include/psdk/basetyps.h similarity index 100% rename from reactos/include/psdk/basetyps.h rename to include/psdk/basetyps.h diff --git a/reactos/include/psdk/batclass.h b/include/psdk/batclass.h similarity index 100% rename from reactos/include/psdk/batclass.h rename to include/psdk/batclass.h diff --git a/reactos/include/psdk/bcrypt.h b/include/psdk/bcrypt.h similarity index 100% rename from reactos/include/psdk/bcrypt.h rename to include/psdk/bcrypt.h diff --git a/reactos/include/psdk/bdaiface.idl b/include/psdk/bdaiface.idl similarity index 100% rename from reactos/include/psdk/bdaiface.idl rename to include/psdk/bdaiface.idl diff --git a/reactos/include/psdk/binres.idl b/include/psdk/binres.idl similarity index 100% rename from reactos/include/psdk/binres.idl rename to include/psdk/binres.idl diff --git a/reactos/include/psdk/bits.idl b/include/psdk/bits.idl similarity index 100% rename from reactos/include/psdk/bits.idl rename to include/psdk/bits.idl diff --git a/reactos/include/psdk/bits1_5.idl b/include/psdk/bits1_5.idl similarity index 100% rename from reactos/include/psdk/bits1_5.idl rename to include/psdk/bits1_5.idl diff --git a/reactos/include/psdk/bitsmsg.h b/include/psdk/bitsmsg.h similarity index 100% rename from reactos/include/psdk/bitsmsg.h rename to include/psdk/bitsmsg.h diff --git a/reactos/include/psdk/cderr.h b/include/psdk/cderr.h similarity index 100% rename from reactos/include/psdk/cderr.h rename to include/psdk/cderr.h diff --git a/reactos/include/psdk/cfg.h b/include/psdk/cfg.h similarity index 100% rename from reactos/include/psdk/cfg.h rename to include/psdk/cfg.h diff --git a/reactos/include/psdk/cfgmgr32.h b/include/psdk/cfgmgr32.h similarity index 100% rename from reactos/include/psdk/cfgmgr32.h rename to include/psdk/cfgmgr32.h diff --git a/reactos/include/psdk/cguid.h b/include/psdk/cguid.h similarity index 100% rename from reactos/include/psdk/cguid.h rename to include/psdk/cguid.h diff --git a/reactos/include/psdk/cierror.h b/include/psdk/cierror.h similarity index 100% rename from reactos/include/psdk/cierror.h rename to include/psdk/cierror.h diff --git a/reactos/include/psdk/clusapi.h b/include/psdk/clusapi.h similarity index 100% rename from reactos/include/psdk/clusapi.h rename to include/psdk/clusapi.h diff --git a/reactos/include/psdk/cmdbas.idl b/include/psdk/cmdbas.idl similarity index 100% rename from reactos/include/psdk/cmdbas.idl rename to include/psdk/cmdbas.idl diff --git a/reactos/include/psdk/cmdtxt.idl b/include/psdk/cmdtxt.idl similarity index 100% rename from reactos/include/psdk/cmdtxt.idl rename to include/psdk/cmdtxt.idl diff --git a/reactos/include/psdk/comcat.idl b/include/psdk/comcat.idl similarity index 100% rename from reactos/include/psdk/comcat.idl rename to include/psdk/comcat.idl diff --git a/reactos/include/psdk/commctrl.h b/include/psdk/commctrl.h similarity index 100% rename from reactos/include/psdk/commctrl.h rename to include/psdk/commctrl.h diff --git a/reactos/include/psdk/commdlg.h b/include/psdk/commdlg.h similarity index 100% rename from reactos/include/psdk/commdlg.h rename to include/psdk/commdlg.h diff --git a/reactos/include/psdk/common.ver b/include/psdk/common.ver similarity index 100% rename from reactos/include/psdk/common.ver rename to include/psdk/common.ver diff --git a/reactos/include/psdk/commoncontrols.idl b/include/psdk/commoncontrols.idl similarity index 100% rename from reactos/include/psdk/commoncontrols.idl rename to include/psdk/commoncontrols.idl diff --git a/reactos/include/psdk/compstui.h b/include/psdk/compstui.h similarity index 100% rename from reactos/include/psdk/compstui.h rename to include/psdk/compstui.h diff --git a/reactos/include/psdk/control.idl b/include/psdk/control.idl similarity index 100% rename from reactos/include/psdk/control.idl rename to include/psdk/control.idl diff --git a/reactos/include/psdk/cor.h b/include/psdk/cor.h similarity index 100% rename from reactos/include/psdk/cor.h rename to include/psdk/cor.h diff --git a/reactos/include/psdk/corerror.h b/include/psdk/corerror.h similarity index 100% rename from reactos/include/psdk/corerror.h rename to include/psdk/corerror.h diff --git a/reactos/include/psdk/corhdr.h b/include/psdk/corhdr.h similarity index 100% rename from reactos/include/psdk/corhdr.h rename to include/psdk/corhdr.h diff --git a/reactos/include/psdk/cpl.h b/include/psdk/cpl.h similarity index 100% rename from reactos/include/psdk/cpl.h rename to include/psdk/cpl.h diff --git a/reactos/include/psdk/cplext.h b/include/psdk/cplext.h similarity index 100% rename from reactos/include/psdk/cplext.h rename to include/psdk/cplext.h diff --git a/reactos/include/psdk/crtrow.idl b/include/psdk/crtrow.idl similarity index 100% rename from reactos/include/psdk/crtrow.idl rename to include/psdk/crtrow.idl diff --git a/reactos/include/psdk/cryptdlg.h b/include/psdk/cryptdlg.h similarity index 100% rename from reactos/include/psdk/cryptdlg.h rename to include/psdk/cryptdlg.h diff --git a/reactos/include/psdk/cryptuiapi.h b/include/psdk/cryptuiapi.h similarity index 100% rename from reactos/include/psdk/cryptuiapi.h rename to include/psdk/cryptuiapi.h diff --git a/reactos/include/psdk/ctfutb.idl b/include/psdk/ctfutb.idl similarity index 100% rename from reactos/include/psdk/ctfutb.idl rename to include/psdk/ctfutb.idl diff --git a/reactos/include/psdk/ctxtcall.idl b/include/psdk/ctxtcall.idl similarity index 100% rename from reactos/include/psdk/ctxtcall.idl rename to include/psdk/ctxtcall.idl diff --git a/reactos/include/psdk/custcntl.h b/include/psdk/custcntl.h similarity index 100% rename from reactos/include/psdk/custcntl.h rename to include/psdk/custcntl.h diff --git a/reactos/include/psdk/cvconst.h b/include/psdk/cvconst.h similarity index 100% rename from reactos/include/psdk/cvconst.h rename to include/psdk/cvconst.h diff --git a/reactos/include/psdk/d3d.h b/include/psdk/d3d.h similarity index 100% rename from reactos/include/psdk/d3d.h rename to include/psdk/d3d.h diff --git a/reactos/include/psdk/d3d8.h b/include/psdk/d3d8.h similarity index 100% rename from reactos/include/psdk/d3d8.h rename to include/psdk/d3d8.h diff --git a/reactos/include/psdk/d3d8types.h b/include/psdk/d3d8types.h similarity index 100% rename from reactos/include/psdk/d3d8types.h rename to include/psdk/d3d8types.h diff --git a/reactos/include/psdk/d3d9.h b/include/psdk/d3d9.h similarity index 100% rename from reactos/include/psdk/d3d9.h rename to include/psdk/d3d9.h diff --git a/reactos/include/psdk/d3d9types.h b/include/psdk/d3d9types.h similarity index 100% rename from reactos/include/psdk/d3d9types.h rename to include/psdk/d3d9types.h diff --git a/reactos/include/psdk/d3dnthal.h b/include/psdk/d3dnthal.h similarity index 100% rename from reactos/include/psdk/d3dnthal.h rename to include/psdk/d3dnthal.h diff --git a/reactos/include/psdk/d3drm.h b/include/psdk/d3drm.h similarity index 100% rename from reactos/include/psdk/d3drm.h rename to include/psdk/d3drm.h diff --git a/reactos/include/psdk/d3drmdef.h b/include/psdk/d3drmdef.h similarity index 100% rename from reactos/include/psdk/d3drmdef.h rename to include/psdk/d3drmdef.h diff --git a/reactos/include/psdk/d3dtypes.h b/include/psdk/d3dtypes.h similarity index 100% rename from reactos/include/psdk/d3dtypes.h rename to include/psdk/d3dtypes.h diff --git a/reactos/include/psdk/d3dx8core.h b/include/psdk/d3dx8core.h similarity index 100% rename from reactos/include/psdk/d3dx8core.h rename to include/psdk/d3dx8core.h diff --git a/reactos/include/psdk/dbccmd.idl b/include/psdk/dbccmd.idl similarity index 100% rename from reactos/include/psdk/dbccmd.idl rename to include/psdk/dbccmd.idl diff --git a/reactos/include/psdk/dbcses.idl b/include/psdk/dbcses.idl similarity index 100% rename from reactos/include/psdk/dbcses.idl rename to include/psdk/dbcses.idl diff --git a/reactos/include/psdk/dbdsad.idl b/include/psdk/dbdsad.idl similarity index 100% rename from reactos/include/psdk/dbdsad.idl rename to include/psdk/dbdsad.idl diff --git a/reactos/include/psdk/dbghelp.h b/include/psdk/dbghelp.h similarity index 100% rename from reactos/include/psdk/dbghelp.h rename to include/psdk/dbghelp.h diff --git a/reactos/include/psdk/dbinit.idl b/include/psdk/dbinit.idl similarity index 100% rename from reactos/include/psdk/dbinit.idl rename to include/psdk/dbinit.idl diff --git a/reactos/include/psdk/dbprop.idl b/include/psdk/dbprop.idl similarity index 100% rename from reactos/include/psdk/dbprop.idl rename to include/psdk/dbprop.idl diff --git a/reactos/include/psdk/dbs.idl b/include/psdk/dbs.idl similarity index 100% rename from reactos/include/psdk/dbs.idl rename to include/psdk/dbs.idl diff --git a/reactos/include/psdk/dbt.h b/include/psdk/dbt.h similarity index 100% rename from reactos/include/psdk/dbt.h rename to include/psdk/dbt.h diff --git a/reactos/include/psdk/dciman.h b/include/psdk/dciman.h similarity index 100% rename from reactos/include/psdk/dciman.h rename to include/psdk/dciman.h diff --git a/reactos/include/psdk/dde.h b/include/psdk/dde.h similarity index 100% rename from reactos/include/psdk/dde.h rename to include/psdk/dde.h diff --git a/reactos/include/psdk/ddeml.h b/include/psdk/ddeml.h similarity index 100% rename from reactos/include/psdk/ddeml.h rename to include/psdk/ddeml.h diff --git a/reactos/include/psdk/ddkernel.h b/include/psdk/ddkernel.h similarity index 100% rename from reactos/include/psdk/ddkernel.h rename to include/psdk/ddkernel.h diff --git a/reactos/include/psdk/ddkmapi.h b/include/psdk/ddkmapi.h similarity index 100% rename from reactos/include/psdk/ddkmapi.h rename to include/psdk/ddkmapi.h diff --git a/reactos/include/psdk/ddraw.h b/include/psdk/ddraw.h similarity index 100% rename from reactos/include/psdk/ddraw.h rename to include/psdk/ddraw.h diff --git a/reactos/include/psdk/ddrawgdi.h b/include/psdk/ddrawgdi.h similarity index 100% rename from reactos/include/psdk/ddrawgdi.h rename to include/psdk/ddrawgdi.h diff --git a/reactos/include/psdk/ddrawi.h b/include/psdk/ddrawi.h similarity index 100% rename from reactos/include/psdk/ddrawi.h rename to include/psdk/ddrawi.h diff --git a/reactos/include/psdk/ddrawint.h b/include/psdk/ddrawint.h similarity index 100% rename from reactos/include/psdk/ddrawint.h rename to include/psdk/ddrawint.h diff --git a/reactos/include/psdk/delayimp.h b/include/psdk/delayimp.h similarity index 100% rename from reactos/include/psdk/delayimp.h rename to include/psdk/delayimp.h diff --git a/reactos/include/psdk/devenum.idl b/include/psdk/devenum.idl similarity index 100% rename from reactos/include/psdk/devenum.idl rename to include/psdk/devenum.idl diff --git a/reactos/include/psdk/devguid.h b/include/psdk/devguid.h similarity index 100% rename from reactos/include/psdk/devguid.h rename to include/psdk/devguid.h diff --git a/reactos/include/psdk/devioctl.h b/include/psdk/devioctl.h similarity index 100% rename from reactos/include/psdk/devioctl.h rename to include/psdk/devioctl.h diff --git a/reactos/include/psdk/devpropdef.h b/include/psdk/devpropdef.h similarity index 100% rename from reactos/include/psdk/devpropdef.h rename to include/psdk/devpropdef.h diff --git a/reactos/include/psdk/dhcpcapi.h b/include/psdk/dhcpcapi.h similarity index 100% rename from reactos/include/psdk/dhcpcapi.h rename to include/psdk/dhcpcapi.h diff --git a/reactos/include/psdk/dhcpcsdk.h b/include/psdk/dhcpcsdk.h similarity index 100% rename from reactos/include/psdk/dhcpcsdk.h rename to include/psdk/dhcpcsdk.h diff --git a/reactos/include/psdk/digitalv.h b/include/psdk/digitalv.h similarity index 100% rename from reactos/include/psdk/digitalv.h rename to include/psdk/digitalv.h diff --git a/reactos/include/psdk/dimm.idl b/include/psdk/dimm.idl similarity index 100% rename from reactos/include/psdk/dimm.idl rename to include/psdk/dimm.idl diff --git a/reactos/include/psdk/dinput.h b/include/psdk/dinput.h similarity index 100% rename from reactos/include/psdk/dinput.h rename to include/psdk/dinput.h diff --git a/reactos/include/psdk/diskguid.h b/include/psdk/diskguid.h similarity index 100% rename from reactos/include/psdk/diskguid.h rename to include/psdk/diskguid.h diff --git a/reactos/include/psdk/dispex.idl b/include/psdk/dispex.idl similarity index 100% rename from reactos/include/psdk/dispex.idl rename to include/psdk/dispex.idl diff --git a/reactos/include/psdk/dlgs.h b/include/psdk/dlgs.h similarity index 100% rename from reactos/include/psdk/dlgs.h rename to include/psdk/dlgs.h diff --git a/reactos/include/psdk/dmemmgr.h b/include/psdk/dmemmgr.h similarity index 100% rename from reactos/include/psdk/dmemmgr.h rename to include/psdk/dmemmgr.h diff --git a/reactos/include/psdk/dmksctrl.h b/include/psdk/dmksctrl.h similarity index 100% rename from reactos/include/psdk/dmksctrl.h rename to include/psdk/dmksctrl.h diff --git a/reactos/include/psdk/docobj.idl b/include/psdk/docobj.idl similarity index 100% rename from reactos/include/psdk/docobj.idl rename to include/psdk/docobj.idl diff --git a/reactos/include/psdk/downloadmgr.idl b/include/psdk/downloadmgr.idl similarity index 100% rename from reactos/include/psdk/downloadmgr.idl rename to include/psdk/downloadmgr.idl diff --git a/reactos/include/psdk/dpfilter.h b/include/psdk/dpfilter.h similarity index 100% rename from reactos/include/psdk/dpfilter.h rename to include/psdk/dpfilter.h diff --git a/reactos/include/psdk/dplay.h b/include/psdk/dplay.h similarity index 100% rename from reactos/include/psdk/dplay.h rename to include/psdk/dplay.h diff --git a/reactos/include/psdk/dplobby.h b/include/psdk/dplobby.h similarity index 100% rename from reactos/include/psdk/dplobby.h rename to include/psdk/dplobby.h diff --git a/reactos/include/psdk/driverspecs.h b/include/psdk/driverspecs.h similarity index 100% rename from reactos/include/psdk/driverspecs.h rename to include/psdk/driverspecs.h diff --git a/reactos/include/psdk/dsdriver.h b/include/psdk/dsdriver.h similarity index 100% rename from reactos/include/psdk/dsdriver.h rename to include/psdk/dsdriver.h diff --git a/reactos/include/psdk/dsgetdc.h b/include/psdk/dsgetdc.h similarity index 100% rename from reactos/include/psdk/dsgetdc.h rename to include/psdk/dsgetdc.h diff --git a/reactos/include/psdk/dsound.h b/include/psdk/dsound.h similarity index 100% rename from reactos/include/psdk/dsound.h rename to include/psdk/dsound.h diff --git a/reactos/include/psdk/dsrole.h b/include/psdk/dsrole.h similarity index 100% rename from reactos/include/psdk/dsrole.h rename to include/psdk/dsrole.h diff --git a/reactos/include/psdk/dvdevcod.h b/include/psdk/dvdevcod.h similarity index 100% rename from reactos/include/psdk/dvdevcod.h rename to include/psdk/dvdevcod.h diff --git a/reactos/include/psdk/dvdmedia.h b/include/psdk/dvdmedia.h similarity index 100% rename from reactos/include/psdk/dvdmedia.h rename to include/psdk/dvdmedia.h diff --git a/reactos/include/psdk/dvp.h b/include/psdk/dvp.h similarity index 100% rename from reactos/include/psdk/dvp.h rename to include/psdk/dvp.h diff --git a/reactos/include/psdk/dwmapi.h b/include/psdk/dwmapi.h similarity index 100% rename from reactos/include/psdk/dwmapi.h rename to include/psdk/dwmapi.h diff --git a/reactos/include/psdk/dyngraph.idl b/include/psdk/dyngraph.idl similarity index 100% rename from reactos/include/psdk/dyngraph.idl rename to include/psdk/dyngraph.idl diff --git a/reactos/include/psdk/eaptypes.h b/include/psdk/eaptypes.h similarity index 100% rename from reactos/include/psdk/eaptypes.h rename to include/psdk/eaptypes.h diff --git a/reactos/include/psdk/edevdefs.h b/include/psdk/edevdefs.h similarity index 100% rename from reactos/include/psdk/edevdefs.h rename to include/psdk/edevdefs.h diff --git a/reactos/include/psdk/errorrep.h b/include/psdk/errorrep.h similarity index 100% rename from reactos/include/psdk/errorrep.h rename to include/psdk/errorrep.h diff --git a/reactos/include/psdk/evntprov.h b/include/psdk/evntprov.h similarity index 100% rename from reactos/include/psdk/evntprov.h rename to include/psdk/evntprov.h diff --git a/reactos/include/psdk/evntrace.h b/include/psdk/evntrace.h similarity index 100% rename from reactos/include/psdk/evntrace.h rename to include/psdk/evntrace.h diff --git a/reactos/include/psdk/exdisp.idl b/include/psdk/exdisp.idl similarity index 100% rename from reactos/include/psdk/exdisp.idl rename to include/psdk/exdisp.idl diff --git a/reactos/include/psdk/exdispid.h b/include/psdk/exdispid.h similarity index 100% rename from reactos/include/psdk/exdispid.h rename to include/psdk/exdispid.h diff --git a/reactos/include/psdk/fci.h b/include/psdk/fci.h similarity index 100% rename from reactos/include/psdk/fci.h rename to include/psdk/fci.h diff --git a/reactos/include/psdk/fdi.h b/include/psdk/fdi.h similarity index 100% rename from reactos/include/psdk/fdi.h rename to include/psdk/fdi.h diff --git a/reactos/include/psdk/fusion.idl b/include/psdk/fusion.idl similarity index 100% rename from reactos/include/psdk/fusion.idl rename to include/psdk/fusion.idl diff --git a/reactos/include/psdk/gdiplus.h b/include/psdk/gdiplus.h similarity index 100% rename from reactos/include/psdk/gdiplus.h rename to include/psdk/gdiplus.h diff --git a/reactos/include/psdk/gdiplusbase.h b/include/psdk/gdiplusbase.h similarity index 100% rename from reactos/include/psdk/gdiplusbase.h rename to include/psdk/gdiplusbase.h diff --git a/reactos/include/psdk/gdiplusbrush.h b/include/psdk/gdiplusbrush.h similarity index 100% rename from reactos/include/psdk/gdiplusbrush.h rename to include/psdk/gdiplusbrush.h diff --git a/reactos/include/psdk/gdipluscolor.h b/include/psdk/gdipluscolor.h similarity index 100% rename from reactos/include/psdk/gdipluscolor.h rename to include/psdk/gdipluscolor.h diff --git a/reactos/include/psdk/gdipluscolormatrix.h b/include/psdk/gdipluscolormatrix.h similarity index 100% rename from reactos/include/psdk/gdipluscolormatrix.h rename to include/psdk/gdipluscolormatrix.h diff --git a/reactos/include/psdk/gdipluseffects.h b/include/psdk/gdipluseffects.h similarity index 100% rename from reactos/include/psdk/gdipluseffects.h rename to include/psdk/gdipluseffects.h diff --git a/reactos/include/psdk/gdiplusenums.h b/include/psdk/gdiplusenums.h similarity index 100% rename from reactos/include/psdk/gdiplusenums.h rename to include/psdk/gdiplusenums.h diff --git a/reactos/include/psdk/gdiplusflat.h b/include/psdk/gdiplusflat.h similarity index 100% rename from reactos/include/psdk/gdiplusflat.h rename to include/psdk/gdiplusflat.h diff --git a/reactos/include/psdk/gdiplusgpstubs.h b/include/psdk/gdiplusgpstubs.h similarity index 100% rename from reactos/include/psdk/gdiplusgpstubs.h rename to include/psdk/gdiplusgpstubs.h diff --git a/reactos/include/psdk/gdiplusgraphics.h b/include/psdk/gdiplusgraphics.h similarity index 100% rename from reactos/include/psdk/gdiplusgraphics.h rename to include/psdk/gdiplusgraphics.h diff --git a/reactos/include/psdk/gdiplusheaders.h b/include/psdk/gdiplusheaders.h similarity index 100% rename from reactos/include/psdk/gdiplusheaders.h rename to include/psdk/gdiplusheaders.h diff --git a/reactos/include/psdk/gdiplusimageattributes.h b/include/psdk/gdiplusimageattributes.h similarity index 100% rename from reactos/include/psdk/gdiplusimageattributes.h rename to include/psdk/gdiplusimageattributes.h diff --git a/reactos/include/psdk/gdiplusimaging.h b/include/psdk/gdiplusimaging.h similarity index 100% rename from reactos/include/psdk/gdiplusimaging.h rename to include/psdk/gdiplusimaging.h diff --git a/reactos/include/psdk/gdiplusinit.h b/include/psdk/gdiplusinit.h similarity index 100% rename from reactos/include/psdk/gdiplusinit.h rename to include/psdk/gdiplusinit.h diff --git a/reactos/include/psdk/gdipluslinecaps.h b/include/psdk/gdipluslinecaps.h similarity index 100% rename from reactos/include/psdk/gdipluslinecaps.h rename to include/psdk/gdipluslinecaps.h diff --git a/reactos/include/psdk/gdiplusmatrix.h b/include/psdk/gdiplusmatrix.h similarity index 100% rename from reactos/include/psdk/gdiplusmatrix.h rename to include/psdk/gdiplusmatrix.h diff --git a/reactos/include/psdk/gdiplusmem.h b/include/psdk/gdiplusmem.h similarity index 100% rename from reactos/include/psdk/gdiplusmem.h rename to include/psdk/gdiplusmem.h diff --git a/reactos/include/psdk/gdiplusmetafile.h b/include/psdk/gdiplusmetafile.h similarity index 100% rename from reactos/include/psdk/gdiplusmetafile.h rename to include/psdk/gdiplusmetafile.h diff --git a/reactos/include/psdk/gdiplusmetaheader.h b/include/psdk/gdiplusmetaheader.h similarity index 100% rename from reactos/include/psdk/gdiplusmetaheader.h rename to include/psdk/gdiplusmetaheader.h diff --git a/reactos/include/psdk/gdipluspath.h b/include/psdk/gdipluspath.h similarity index 100% rename from reactos/include/psdk/gdipluspath.h rename to include/psdk/gdipluspath.h diff --git a/reactos/include/psdk/gdipluspen.h b/include/psdk/gdipluspen.h similarity index 100% rename from reactos/include/psdk/gdipluspen.h rename to include/psdk/gdipluspen.h diff --git a/reactos/include/psdk/gdipluspixelformats.h b/include/psdk/gdipluspixelformats.h similarity index 100% rename from reactos/include/psdk/gdipluspixelformats.h rename to include/psdk/gdipluspixelformats.h diff --git a/reactos/include/psdk/gdiplusstringformat.h b/include/psdk/gdiplusstringformat.h similarity index 100% rename from reactos/include/psdk/gdiplusstringformat.h rename to include/psdk/gdiplusstringformat.h diff --git a/reactos/include/psdk/gdiplustypes.h b/include/psdk/gdiplustypes.h similarity index 100% rename from reactos/include/psdk/gdiplustypes.h rename to include/psdk/gdiplustypes.h diff --git a/reactos/include/psdk/guiddef.h b/include/psdk/guiddef.h similarity index 100% rename from reactos/include/psdk/guiddef.h rename to include/psdk/guiddef.h diff --git a/reactos/include/psdk/hidpi.h b/include/psdk/hidpi.h similarity index 100% rename from reactos/include/psdk/hidpi.h rename to include/psdk/hidpi.h diff --git a/reactos/include/psdk/hidusage.h b/include/psdk/hidusage.h similarity index 100% rename from reactos/include/psdk/hidusage.h rename to include/psdk/hidusage.h diff --git a/reactos/include/psdk/hlguids.h b/include/psdk/hlguids.h similarity index 100% rename from reactos/include/psdk/hlguids.h rename to include/psdk/hlguids.h diff --git a/reactos/include/psdk/hlink.idl b/include/psdk/hlink.idl similarity index 100% rename from reactos/include/psdk/hlink.idl rename to include/psdk/hlink.idl diff --git a/reactos/include/psdk/htiframe.idl b/include/psdk/htiframe.idl similarity index 100% rename from reactos/include/psdk/htiframe.idl rename to include/psdk/htiframe.idl diff --git a/reactos/include/psdk/htmlhelp.h b/include/psdk/htmlhelp.h similarity index 100% rename from reactos/include/psdk/htmlhelp.h rename to include/psdk/htmlhelp.h diff --git a/reactos/include/psdk/http.h b/include/psdk/http.h similarity index 100% rename from reactos/include/psdk/http.h rename to include/psdk/http.h diff --git a/reactos/include/psdk/httpext.h b/include/psdk/httpext.h similarity index 100% rename from reactos/include/psdk/httpext.h rename to include/psdk/httpext.h diff --git a/reactos/include/psdk/i_cryptasn1tls.h b/include/psdk/i_cryptasn1tls.h similarity index 100% rename from reactos/include/psdk/i_cryptasn1tls.h rename to include/psdk/i_cryptasn1tls.h diff --git a/reactos/include/psdk/iads.idl b/include/psdk/iads.idl similarity index 100% rename from reactos/include/psdk/iads.idl rename to include/psdk/iads.idl diff --git a/reactos/include/psdk/icftypes.idl b/include/psdk/icftypes.idl similarity index 100% rename from reactos/include/psdk/icftypes.idl rename to include/psdk/icftypes.idl diff --git a/reactos/include/psdk/icm.h b/include/psdk/icm.h similarity index 100% rename from reactos/include/psdk/icm.h rename to include/psdk/icm.h diff --git a/reactos/include/psdk/icmpapi.h b/include/psdk/icmpapi.h similarity index 100% rename from reactos/include/psdk/icmpapi.h rename to include/psdk/icmpapi.h diff --git a/reactos/include/psdk/idispids.h b/include/psdk/idispids.h similarity index 100% rename from reactos/include/psdk/idispids.h rename to include/psdk/idispids.h diff --git a/reactos/include/psdk/idndl.h b/include/psdk/idndl.h similarity index 100% rename from reactos/include/psdk/idndl.h rename to include/psdk/idndl.h diff --git a/reactos/include/psdk/ieverp.h b/include/psdk/ieverp.h similarity index 100% rename from reactos/include/psdk/ieverp.h rename to include/psdk/ieverp.h diff --git a/reactos/include/psdk/ifdef.h b/include/psdk/ifdef.h similarity index 100% rename from reactos/include/psdk/ifdef.h rename to include/psdk/ifdef.h diff --git a/reactos/include/psdk/imagehlp.h b/include/psdk/imagehlp.h similarity index 100% rename from reactos/include/psdk/imagehlp.h rename to include/psdk/imagehlp.h diff --git a/reactos/include/psdk/imm.h b/include/psdk/imm.h similarity index 100% rename from reactos/include/psdk/imm.h rename to include/psdk/imm.h diff --git a/reactos/include/psdk/imnact.idl b/include/psdk/imnact.idl similarity index 100% rename from reactos/include/psdk/imnact.idl rename to include/psdk/imnact.idl diff --git a/reactos/include/psdk/imnxport.idl b/include/psdk/imnxport.idl similarity index 100% rename from reactos/include/psdk/imnxport.idl rename to include/psdk/imnxport.idl diff --git a/reactos/include/psdk/in6addr.h b/include/psdk/in6addr.h similarity index 100% rename from reactos/include/psdk/in6addr.h rename to include/psdk/in6addr.h diff --git a/reactos/include/psdk/inaddr.h b/include/psdk/inaddr.h similarity index 100% rename from reactos/include/psdk/inaddr.h rename to include/psdk/inaddr.h diff --git a/reactos/include/psdk/indexsrv.idl b/include/psdk/indexsrv.idl similarity index 100% rename from reactos/include/psdk/indexsrv.idl rename to include/psdk/indexsrv.idl diff --git a/reactos/include/psdk/initguid.h b/include/psdk/initguid.h similarity index 100% rename from reactos/include/psdk/initguid.h rename to include/psdk/initguid.h diff --git a/reactos/include/psdk/intshcut.h b/include/psdk/intshcut.h similarity index 100% rename from reactos/include/psdk/intshcut.h rename to include/psdk/intshcut.h diff --git a/reactos/include/psdk/ioevent.h b/include/psdk/ioevent.h similarity index 100% rename from reactos/include/psdk/ioevent.h rename to include/psdk/ioevent.h diff --git a/reactos/include/psdk/ipexport.h b/include/psdk/ipexport.h similarity index 100% rename from reactos/include/psdk/ipexport.h rename to include/psdk/ipexport.h diff --git a/reactos/include/psdk/iphlpapi.h b/include/psdk/iphlpapi.h similarity index 100% rename from reactos/include/psdk/iphlpapi.h rename to include/psdk/iphlpapi.h diff --git a/reactos/include/psdk/ipifcons.h b/include/psdk/ipifcons.h similarity index 100% rename from reactos/include/psdk/ipifcons.h rename to include/psdk/ipifcons.h diff --git a/reactos/include/psdk/iprtrmib.h b/include/psdk/iprtrmib.h similarity index 100% rename from reactos/include/psdk/iprtrmib.h rename to include/psdk/iprtrmib.h diff --git a/reactos/include/psdk/iptypes.h b/include/psdk/iptypes.h similarity index 100% rename from reactos/include/psdk/iptypes.h rename to include/psdk/iptypes.h diff --git a/reactos/include/psdk/isguids.h b/include/psdk/isguids.h similarity index 100% rename from reactos/include/psdk/isguids.h rename to include/psdk/isguids.h diff --git a/reactos/include/psdk/kcom.h b/include/psdk/kcom.h similarity index 100% rename from reactos/include/psdk/kcom.h rename to include/psdk/kcom.h diff --git a/reactos/include/psdk/knownfolders.h b/include/psdk/knownfolders.h similarity index 100% rename from reactos/include/psdk/knownfolders.h rename to include/psdk/knownfolders.h diff --git a/reactos/include/psdk/ks.h b/include/psdk/ks.h similarity index 100% rename from reactos/include/psdk/ks.h rename to include/psdk/ks.h diff --git a/reactos/include/psdk/ksdebug.h b/include/psdk/ksdebug.h similarity index 100% rename from reactos/include/psdk/ksdebug.h rename to include/psdk/ksdebug.h diff --git a/reactos/include/psdk/ksmedia.h b/include/psdk/ksmedia.h similarity index 100% rename from reactos/include/psdk/ksmedia.h rename to include/psdk/ksmedia.h diff --git a/reactos/include/psdk/ksproxy.h b/include/psdk/ksproxy.h similarity index 100% rename from reactos/include/psdk/ksproxy.h rename to include/psdk/ksproxy.h diff --git a/reactos/include/psdk/ksuuids.h b/include/psdk/ksuuids.h similarity index 100% rename from reactos/include/psdk/ksuuids.h rename to include/psdk/ksuuids.h diff --git a/reactos/include/psdk/ktmtypes.h b/include/psdk/ktmtypes.h similarity index 100% rename from reactos/include/psdk/ktmtypes.h rename to include/psdk/ktmtypes.h diff --git a/reactos/include/psdk/l2cmn.h b/include/psdk/l2cmn.h similarity index 100% rename from reactos/include/psdk/l2cmn.h rename to include/psdk/l2cmn.h diff --git a/reactos/include/psdk/largeint.h b/include/psdk/largeint.h similarity index 100% rename from reactos/include/psdk/largeint.h rename to include/psdk/largeint.h diff --git a/reactos/include/psdk/lm.h b/include/psdk/lm.h similarity index 100% rename from reactos/include/psdk/lm.h rename to include/psdk/lm.h diff --git a/reactos/include/psdk/lmaccess.h b/include/psdk/lmaccess.h similarity index 100% rename from reactos/include/psdk/lmaccess.h rename to include/psdk/lmaccess.h diff --git a/reactos/include/psdk/lmalert.h b/include/psdk/lmalert.h similarity index 100% rename from reactos/include/psdk/lmalert.h rename to include/psdk/lmalert.h diff --git a/reactos/include/psdk/lmapibuf.h b/include/psdk/lmapibuf.h similarity index 100% rename from reactos/include/psdk/lmapibuf.h rename to include/psdk/lmapibuf.h diff --git a/reactos/include/psdk/lmat.h b/include/psdk/lmat.h similarity index 100% rename from reactos/include/psdk/lmat.h rename to include/psdk/lmat.h diff --git a/reactos/include/psdk/lmaudit.h b/include/psdk/lmaudit.h similarity index 100% rename from reactos/include/psdk/lmaudit.h rename to include/psdk/lmaudit.h diff --git a/reactos/include/psdk/lmchdev.h b/include/psdk/lmchdev.h similarity index 100% rename from reactos/include/psdk/lmchdev.h rename to include/psdk/lmchdev.h diff --git a/reactos/include/psdk/lmconfig.h b/include/psdk/lmconfig.h similarity index 100% rename from reactos/include/psdk/lmconfig.h rename to include/psdk/lmconfig.h diff --git a/reactos/include/psdk/lmcons.h b/include/psdk/lmcons.h similarity index 100% rename from reactos/include/psdk/lmcons.h rename to include/psdk/lmcons.h diff --git a/reactos/include/psdk/lmerr.h b/include/psdk/lmerr.h similarity index 100% rename from reactos/include/psdk/lmerr.h rename to include/psdk/lmerr.h diff --git a/reactos/include/psdk/lmerrlog.h b/include/psdk/lmerrlog.h similarity index 100% rename from reactos/include/psdk/lmerrlog.h rename to include/psdk/lmerrlog.h diff --git a/reactos/include/psdk/lmjoin.h b/include/psdk/lmjoin.h similarity index 100% rename from reactos/include/psdk/lmjoin.h rename to include/psdk/lmjoin.h diff --git a/reactos/include/psdk/lmmsg.h b/include/psdk/lmmsg.h similarity index 100% rename from reactos/include/psdk/lmmsg.h rename to include/psdk/lmmsg.h diff --git a/reactos/include/psdk/lmon.h b/include/psdk/lmon.h similarity index 100% rename from reactos/include/psdk/lmon.h rename to include/psdk/lmon.h diff --git a/reactos/include/psdk/lmremutl.h b/include/psdk/lmremutl.h similarity index 100% rename from reactos/include/psdk/lmremutl.h rename to include/psdk/lmremutl.h diff --git a/reactos/include/psdk/lmrepl.h b/include/psdk/lmrepl.h similarity index 100% rename from reactos/include/psdk/lmrepl.h rename to include/psdk/lmrepl.h diff --git a/reactos/include/psdk/lmserver.h b/include/psdk/lmserver.h similarity index 100% rename from reactos/include/psdk/lmserver.h rename to include/psdk/lmserver.h diff --git a/reactos/include/psdk/lmshare.h b/include/psdk/lmshare.h similarity index 100% rename from reactos/include/psdk/lmshare.h rename to include/psdk/lmshare.h diff --git a/reactos/include/psdk/lmsname.h b/include/psdk/lmsname.h similarity index 100% rename from reactos/include/psdk/lmsname.h rename to include/psdk/lmsname.h diff --git a/reactos/include/psdk/lmstats.h b/include/psdk/lmstats.h similarity index 100% rename from reactos/include/psdk/lmstats.h rename to include/psdk/lmstats.h diff --git a/reactos/include/psdk/lmsvc.h b/include/psdk/lmsvc.h similarity index 100% rename from reactos/include/psdk/lmsvc.h rename to include/psdk/lmsvc.h diff --git a/reactos/include/psdk/lmuse.h b/include/psdk/lmuse.h similarity index 100% rename from reactos/include/psdk/lmuse.h rename to include/psdk/lmuse.h diff --git a/reactos/include/psdk/lmuseflg.h b/include/psdk/lmuseflg.h similarity index 100% rename from reactos/include/psdk/lmuseflg.h rename to include/psdk/lmuseflg.h diff --git a/reactos/include/psdk/lmwksta.h b/include/psdk/lmwksta.h similarity index 100% rename from reactos/include/psdk/lmwksta.h rename to include/psdk/lmwksta.h diff --git a/reactos/include/psdk/loadperf.h b/include/psdk/loadperf.h similarity index 100% rename from reactos/include/psdk/loadperf.h rename to include/psdk/loadperf.h diff --git a/reactos/include/psdk/lzexpand.h b/include/psdk/lzexpand.h similarity index 100% rename from reactos/include/psdk/lzexpand.h rename to include/psdk/lzexpand.h diff --git a/reactos/include/psdk/mapi.h b/include/psdk/mapi.h similarity index 100% rename from reactos/include/psdk/mapi.h rename to include/psdk/mapi.h diff --git a/reactos/include/psdk/mapicode.h b/include/psdk/mapicode.h similarity index 100% rename from reactos/include/psdk/mapicode.h rename to include/psdk/mapicode.h diff --git a/reactos/include/psdk/mapidefs.h b/include/psdk/mapidefs.h similarity index 100% rename from reactos/include/psdk/mapidefs.h rename to include/psdk/mapidefs.h diff --git a/reactos/include/psdk/mapiform.h b/include/psdk/mapiform.h similarity index 100% rename from reactos/include/psdk/mapiform.h rename to include/psdk/mapiform.h diff --git a/reactos/include/psdk/mapiguid.h b/include/psdk/mapiguid.h similarity index 100% rename from reactos/include/psdk/mapiguid.h rename to include/psdk/mapiguid.h diff --git a/reactos/include/psdk/mapitags.h b/include/psdk/mapitags.h similarity index 100% rename from reactos/include/psdk/mapitags.h rename to include/psdk/mapitags.h diff --git a/reactos/include/psdk/mapiutil.h b/include/psdk/mapiutil.h similarity index 100% rename from reactos/include/psdk/mapiutil.h rename to include/psdk/mapiutil.h diff --git a/reactos/include/psdk/mapival.h b/include/psdk/mapival.h similarity index 100% rename from reactos/include/psdk/mapival.h rename to include/psdk/mapival.h diff --git a/reactos/include/psdk/mapix.h b/include/psdk/mapix.h similarity index 100% rename from reactos/include/psdk/mapix.h rename to include/psdk/mapix.h diff --git a/reactos/include/psdk/mciavi.h b/include/psdk/mciavi.h similarity index 100% rename from reactos/include/psdk/mciavi.h rename to include/psdk/mciavi.h diff --git a/reactos/include/psdk/mcx.h b/include/psdk/mcx.h similarity index 100% rename from reactos/include/psdk/mcx.h rename to include/psdk/mcx.h diff --git a/reactos/include/psdk/mgmtapi.h b/include/psdk/mgmtapi.h similarity index 100% rename from reactos/include/psdk/mgmtapi.h rename to include/psdk/mgmtapi.h diff --git a/reactos/include/psdk/midles.h b/include/psdk/midles.h similarity index 100% rename from reactos/include/psdk/midles.h rename to include/psdk/midles.h diff --git a/reactos/include/psdk/mimeinfo.idl b/include/psdk/mimeinfo.idl similarity index 100% rename from reactos/include/psdk/mimeinfo.idl rename to include/psdk/mimeinfo.idl diff --git a/reactos/include/psdk/mimeole.idl b/include/psdk/mimeole.idl similarity index 100% rename from reactos/include/psdk/mimeole.idl rename to include/psdk/mimeole.idl diff --git a/reactos/include/psdk/mlang.idl b/include/psdk/mlang.idl similarity index 100% rename from reactos/include/psdk/mlang.idl rename to include/psdk/mlang.idl diff --git a/reactos/include/psdk/mmddk.h b/include/psdk/mmddk.h similarity index 100% rename from reactos/include/psdk/mmddk.h rename to include/psdk/mmddk.h diff --git a/reactos/include/psdk/mmreg.h b/include/psdk/mmreg.h similarity index 100% rename from reactos/include/psdk/mmreg.h rename to include/psdk/mmreg.h diff --git a/reactos/include/psdk/mmsystem.h b/include/psdk/mmsystem.h similarity index 100% rename from reactos/include/psdk/mmsystem.h rename to include/psdk/mmsystem.h diff --git a/reactos/include/psdk/mprapi.h b/include/psdk/mprapi.h similarity index 100% rename from reactos/include/psdk/mprapi.h rename to include/psdk/mprapi.h diff --git a/reactos/include/psdk/msacm.h b/include/psdk/msacm.h similarity index 100% rename from reactos/include/psdk/msacm.h rename to include/psdk/msacm.h diff --git a/reactos/include/psdk/msacmdlg.h b/include/psdk/msacmdlg.h similarity index 100% rename from reactos/include/psdk/msacmdlg.h rename to include/psdk/msacmdlg.h diff --git a/reactos/include/psdk/mscat.h b/include/psdk/mscat.h similarity index 100% rename from reactos/include/psdk/mscat.h rename to include/psdk/mscat.h diff --git a/reactos/include/psdk/mscoree.idl b/include/psdk/mscoree.idl similarity index 100% rename from reactos/include/psdk/mscoree.idl rename to include/psdk/mscoree.idl diff --git a/reactos/include/psdk/msctf.idl b/include/psdk/msctf.idl similarity index 100% rename from reactos/include/psdk/msctf.idl rename to include/psdk/msctf.idl diff --git a/reactos/include/psdk/msdadc.idl b/include/psdk/msdadc.idl similarity index 100% rename from reactos/include/psdk/msdadc.idl rename to include/psdk/msdadc.idl diff --git a/reactos/include/psdk/mshtmcid.h b/include/psdk/mshtmcid.h similarity index 100% rename from reactos/include/psdk/mshtmcid.h rename to include/psdk/mshtmcid.h diff --git a/reactos/include/psdk/mshtmdid.h b/include/psdk/mshtmdid.h similarity index 100% rename from reactos/include/psdk/mshtmdid.h rename to include/psdk/mshtmdid.h diff --git a/reactos/include/psdk/mshtmhst.idl b/include/psdk/mshtmhst.idl similarity index 100% rename from reactos/include/psdk/mshtmhst.idl rename to include/psdk/mshtmhst.idl diff --git a/reactos/include/psdk/mshtml.idl b/include/psdk/mshtml.idl similarity index 100% rename from reactos/include/psdk/mshtml.idl rename to include/psdk/mshtml.idl diff --git a/reactos/include/psdk/msi.h b/include/psdk/msi.h similarity index 100% rename from reactos/include/psdk/msi.h rename to include/psdk/msi.h diff --git a/reactos/include/psdk/msidefs.h b/include/psdk/msidefs.h similarity index 100% rename from reactos/include/psdk/msidefs.h rename to include/psdk/msidefs.h diff --git a/reactos/include/psdk/msinkaut.idl b/include/psdk/msinkaut.idl similarity index 100% rename from reactos/include/psdk/msinkaut.idl rename to include/psdk/msinkaut.idl diff --git a/reactos/include/psdk/msiquery.h b/include/psdk/msiquery.h similarity index 100% rename from reactos/include/psdk/msiquery.h rename to include/psdk/msiquery.h diff --git a/reactos/include/psdk/mssip.h b/include/psdk/mssip.h similarity index 100% rename from reactos/include/psdk/mssip.h rename to include/psdk/mssip.h diff --git a/reactos/include/psdk/mstask.idl b/include/psdk/mstask.idl similarity index 100% rename from reactos/include/psdk/mstask.idl rename to include/psdk/mstask.idl diff --git a/reactos/include/psdk/mstcpip.h b/include/psdk/mstcpip.h similarity index 100% rename from reactos/include/psdk/mstcpip.h rename to include/psdk/mstcpip.h diff --git a/reactos/include/psdk/mswsock.h b/include/psdk/mswsock.h similarity index 100% rename from reactos/include/psdk/mswsock.h rename to include/psdk/mswsock.h diff --git a/reactos/include/psdk/mswsockdef.h b/include/psdk/mswsockdef.h similarity index 100% rename from reactos/include/psdk/mswsockdef.h rename to include/psdk/mswsockdef.h diff --git a/reactos/include/psdk/msxml.idl b/include/psdk/msxml.idl similarity index 100% rename from reactos/include/psdk/msxml.idl rename to include/psdk/msxml.idl diff --git a/reactos/include/psdk/msxml2.idl b/include/psdk/msxml2.idl similarity index 100% rename from reactos/include/psdk/msxml2.idl rename to include/psdk/msxml2.idl diff --git a/reactos/include/psdk/msxml2did.h b/include/psdk/msxml2did.h similarity index 100% rename from reactos/include/psdk/msxml2did.h rename to include/psdk/msxml2did.h diff --git a/reactos/include/psdk/msxml6.idl b/include/psdk/msxml6.idl similarity index 100% rename from reactos/include/psdk/msxml6.idl rename to include/psdk/msxml6.idl diff --git a/reactos/include/psdk/msxml6did.h b/include/psdk/msxml6did.h similarity index 100% rename from reactos/include/psdk/msxml6did.h rename to include/psdk/msxml6did.h diff --git a/reactos/include/psdk/msxmldid.h b/include/psdk/msxmldid.h similarity index 100% rename from reactos/include/psdk/msxmldid.h rename to include/psdk/msxmldid.h diff --git a/reactos/include/psdk/multimon.h b/include/psdk/multimon.h similarity index 100% rename from reactos/include/psdk/multimon.h rename to include/psdk/multimon.h diff --git a/reactos/include/psdk/nb30.h b/include/psdk/nb30.h similarity index 100% rename from reactos/include/psdk/nb30.h rename to include/psdk/nb30.h diff --git a/reactos/include/psdk/nddeapi.h b/include/psdk/nddeapi.h similarity index 100% rename from reactos/include/psdk/nddeapi.h rename to include/psdk/nddeapi.h diff --git a/reactos/include/psdk/ndrtypes.h b/include/psdk/ndrtypes.h similarity index 100% rename from reactos/include/psdk/ndrtypes.h rename to include/psdk/ndrtypes.h diff --git a/reactos/include/psdk/netcfgn.h b/include/psdk/netcfgn.h similarity index 100% rename from reactos/include/psdk/netcfgn.h rename to include/psdk/netcfgn.h diff --git a/reactos/include/psdk/netcfgx.h b/include/psdk/netcfgx.h similarity index 100% rename from reactos/include/psdk/netcfgx.h rename to include/psdk/netcfgx.h diff --git a/reactos/include/psdk/netcon.h b/include/psdk/netcon.h similarity index 100% rename from reactos/include/psdk/netcon.h rename to include/psdk/netcon.h diff --git a/reactos/include/psdk/netcon.idl b/include/psdk/netcon.idl similarity index 100% rename from reactos/include/psdk/netcon.idl rename to include/psdk/netcon.idl diff --git a/reactos/include/psdk/netevent.h b/include/psdk/netevent.h similarity index 100% rename from reactos/include/psdk/netevent.h rename to include/psdk/netevent.h diff --git a/reactos/include/psdk/netfw.idl b/include/psdk/netfw.idl similarity index 100% rename from reactos/include/psdk/netfw.idl rename to include/psdk/netfw.idl diff --git a/reactos/include/psdk/netioapi.h b/include/psdk/netioapi.h similarity index 100% rename from reactos/include/psdk/netioapi.h rename to include/psdk/netioapi.h diff --git a/reactos/include/psdk/nettypes.h b/include/psdk/nettypes.h similarity index 100% rename from reactos/include/psdk/nettypes.h rename to include/psdk/nettypes.h diff --git a/reactos/include/psdk/newdev.h b/include/psdk/newdev.h similarity index 100% rename from reactos/include/psdk/newdev.h rename to include/psdk/newdev.h diff --git a/reactos/include/psdk/npapi.h b/include/psdk/npapi.h similarity index 100% rename from reactos/include/psdk/npapi.h rename to include/psdk/npapi.h diff --git a/reactos/include/psdk/nspapi.h b/include/psdk/nspapi.h similarity index 100% rename from reactos/include/psdk/nspapi.h rename to include/psdk/nspapi.h diff --git a/reactos/include/psdk/ntdd1394.h b/include/psdk/ntdd1394.h similarity index 100% rename from reactos/include/psdk/ntdd1394.h rename to include/psdk/ntdd1394.h diff --git a/reactos/include/psdk/ntdd8042.h b/include/psdk/ntdd8042.h similarity index 100% rename from reactos/include/psdk/ntdd8042.h rename to include/psdk/ntdd8042.h diff --git a/reactos/include/psdk/ntddbeep.h b/include/psdk/ntddbeep.h similarity index 100% rename from reactos/include/psdk/ntddbeep.h rename to include/psdk/ntddbeep.h diff --git a/reactos/include/psdk/ntddcdrm.h b/include/psdk/ntddcdrm.h similarity index 100% rename from reactos/include/psdk/ntddcdrm.h rename to include/psdk/ntddcdrm.h diff --git a/reactos/include/psdk/ntddcdvd.h b/include/psdk/ntddcdvd.h similarity index 100% rename from reactos/include/psdk/ntddcdvd.h rename to include/psdk/ntddcdvd.h diff --git a/reactos/include/psdk/ntddchgr.h b/include/psdk/ntddchgr.h similarity index 100% rename from reactos/include/psdk/ntddchgr.h rename to include/psdk/ntddchgr.h diff --git a/reactos/include/psdk/ntdddisk.h b/include/psdk/ntdddisk.h similarity index 100% rename from reactos/include/psdk/ntdddisk.h rename to include/psdk/ntdddisk.h diff --git a/reactos/include/psdk/ntddft.h b/include/psdk/ntddft.h similarity index 100% rename from reactos/include/psdk/ntddft.h rename to include/psdk/ntddft.h diff --git a/reactos/include/psdk/ntddkbd.h b/include/psdk/ntddkbd.h similarity index 100% rename from reactos/include/psdk/ntddkbd.h rename to include/psdk/ntddkbd.h diff --git a/reactos/include/psdk/ntddmmc.h b/include/psdk/ntddmmc.h similarity index 100% rename from reactos/include/psdk/ntddmmc.h rename to include/psdk/ntddmmc.h diff --git a/reactos/include/psdk/ntddmou.h b/include/psdk/ntddmou.h similarity index 100% rename from reactos/include/psdk/ntddmou.h rename to include/psdk/ntddmou.h diff --git a/reactos/include/psdk/ntddndis.h b/include/psdk/ntddndis.h similarity index 100% rename from reactos/include/psdk/ntddndis.h rename to include/psdk/ntddndis.h diff --git a/reactos/include/psdk/ntddpar.h b/include/psdk/ntddpar.h similarity index 100% rename from reactos/include/psdk/ntddpar.h rename to include/psdk/ntddpar.h diff --git a/reactos/include/psdk/ntddscsi.h b/include/psdk/ntddscsi.h similarity index 100% rename from reactos/include/psdk/ntddscsi.h rename to include/psdk/ntddscsi.h diff --git a/reactos/include/psdk/ntddser.h b/include/psdk/ntddser.h similarity index 100% rename from reactos/include/psdk/ntddser.h rename to include/psdk/ntddser.h diff --git a/reactos/include/psdk/ntddstor.h b/include/psdk/ntddstor.h similarity index 100% rename from reactos/include/psdk/ntddstor.h rename to include/psdk/ntddstor.h diff --git a/reactos/include/psdk/ntddtape.h b/include/psdk/ntddtape.h similarity index 100% rename from reactos/include/psdk/ntddtape.h rename to include/psdk/ntddtape.h diff --git a/reactos/include/psdk/ntddtdi.h b/include/psdk/ntddtdi.h similarity index 100% rename from reactos/include/psdk/ntddtdi.h rename to include/psdk/ntddtdi.h diff --git a/reactos/include/psdk/ntddvdeo.h b/include/psdk/ntddvdeo.h similarity index 100% rename from reactos/include/psdk/ntddvdeo.h rename to include/psdk/ntddvdeo.h diff --git a/reactos/include/psdk/ntddvol.h b/include/psdk/ntddvol.h similarity index 100% rename from reactos/include/psdk/ntddvol.h rename to include/psdk/ntddvol.h diff --git a/reactos/include/psdk/ntdef.h b/include/psdk/ntdef.h similarity index 100% rename from reactos/include/psdk/ntdef.h rename to include/psdk/ntdef.h diff --git a/reactos/include/psdk/ntdll.h b/include/psdk/ntdll.h similarity index 100% rename from reactos/include/psdk/ntdll.h rename to include/psdk/ntdll.h diff --git a/reactos/include/psdk/ntdsapi.h b/include/psdk/ntdsapi.h similarity index 100% rename from reactos/include/psdk/ntdsapi.h rename to include/psdk/ntdsapi.h diff --git a/reactos/include/psdk/ntgdi.h b/include/psdk/ntgdi.h similarity index 100% rename from reactos/include/psdk/ntgdi.h rename to include/psdk/ntgdi.h diff --git a/reactos/include/psdk/ntiologc.h b/include/psdk/ntiologc.h similarity index 100% rename from reactos/include/psdk/ntiologc.h rename to include/psdk/ntiologc.h diff --git a/reactos/include/psdk/ntldap.h b/include/psdk/ntldap.h similarity index 100% rename from reactos/include/psdk/ntldap.h rename to include/psdk/ntldap.h diff --git a/reactos/include/psdk/ntquery.h b/include/psdk/ntquery.h similarity index 100% rename from reactos/include/psdk/ntquery.h rename to include/psdk/ntquery.h diff --git a/reactos/include/psdk/ntsecapi.h b/include/psdk/ntsecapi.h similarity index 100% rename from reactos/include/psdk/ntsecapi.h rename to include/psdk/ntsecapi.h diff --git a/reactos/include/psdk/ntsecpkg.h b/include/psdk/ntsecpkg.h similarity index 100% rename from reactos/include/psdk/ntsecpkg.h rename to include/psdk/ntsecpkg.h diff --git a/reactos/include/psdk/ntstatus.h b/include/psdk/ntstatus.h similarity index 100% rename from reactos/include/psdk/ntstatus.h rename to include/psdk/ntstatus.h diff --git a/reactos/include/psdk/ntverp.h b/include/psdk/ntverp.h similarity index 100% rename from reactos/include/psdk/ntverp.h rename to include/psdk/ntverp.h diff --git a/reactos/include/psdk/oaidl.idl b/include/psdk/oaidl.idl similarity index 100% rename from reactos/include/psdk/oaidl.idl rename to include/psdk/oaidl.idl diff --git a/reactos/include/psdk/objbase.h b/include/psdk/objbase.h similarity index 100% rename from reactos/include/psdk/objbase.h rename to include/psdk/objbase.h diff --git a/reactos/include/psdk/objectarray.idl b/include/psdk/objectarray.idl similarity index 100% rename from reactos/include/psdk/objectarray.idl rename to include/psdk/objectarray.idl diff --git a/reactos/include/psdk/objerror.h b/include/psdk/objerror.h similarity index 100% rename from reactos/include/psdk/objerror.h rename to include/psdk/objerror.h diff --git a/reactos/include/psdk/objfwd.h b/include/psdk/objfwd.h similarity index 100% rename from reactos/include/psdk/objfwd.h rename to include/psdk/objfwd.h diff --git a/reactos/include/psdk/objidl.idl b/include/psdk/objidl.idl similarity index 100% rename from reactos/include/psdk/objidl.idl rename to include/psdk/objidl.idl diff --git a/reactos/include/psdk/objsafe.idl b/include/psdk/objsafe.idl similarity index 100% rename from reactos/include/psdk/objsafe.idl rename to include/psdk/objsafe.idl diff --git a/reactos/include/psdk/objsel.h b/include/psdk/objsel.h similarity index 100% rename from reactos/include/psdk/objsel.h rename to include/psdk/objsel.h diff --git a/reactos/include/psdk/ocidl.idl b/include/psdk/ocidl.idl similarity index 100% rename from reactos/include/psdk/ocidl.idl rename to include/psdk/ocidl.idl diff --git a/reactos/include/psdk/ocmm.idl b/include/psdk/ocmm.idl similarity index 100% rename from reactos/include/psdk/ocmm.idl rename to include/psdk/ocmm.idl diff --git a/reactos/include/psdk/odbcinst.h b/include/psdk/odbcinst.h similarity index 100% rename from reactos/include/psdk/odbcinst.h rename to include/psdk/odbcinst.h diff --git a/reactos/include/psdk/ole.h b/include/psdk/ole.h similarity index 100% rename from reactos/include/psdk/ole.h rename to include/psdk/ole.h diff --git a/reactos/include/psdk/ole2.h b/include/psdk/ole2.h similarity index 100% rename from reactos/include/psdk/ole2.h rename to include/psdk/ole2.h diff --git a/reactos/include/psdk/ole2ver.h b/include/psdk/ole2ver.h similarity index 100% rename from reactos/include/psdk/ole2ver.h rename to include/psdk/ole2ver.h diff --git a/reactos/include/psdk/oleacc.idl b/include/psdk/oleacc.idl similarity index 100% rename from reactos/include/psdk/oleacc.idl rename to include/psdk/oleacc.idl diff --git a/reactos/include/psdk/oleauto.h b/include/psdk/oleauto.h similarity index 100% rename from reactos/include/psdk/oleauto.h rename to include/psdk/oleauto.h diff --git a/reactos/include/psdk/olectl.h b/include/psdk/olectl.h similarity index 100% rename from reactos/include/psdk/olectl.h rename to include/psdk/olectl.h diff --git a/reactos/include/psdk/olectlid.h b/include/psdk/olectlid.h similarity index 100% rename from reactos/include/psdk/olectlid.h rename to include/psdk/olectlid.h diff --git a/reactos/include/psdk/oledb.idl b/include/psdk/oledb.idl similarity index 100% rename from reactos/include/psdk/oledb.idl rename to include/psdk/oledb.idl diff --git a/reactos/include/psdk/oledlg.h b/include/psdk/oledlg.h similarity index 100% rename from reactos/include/psdk/oledlg.h rename to include/psdk/oledlg.h diff --git a/reactos/include/psdk/oleidl.idl b/include/psdk/oleidl.idl similarity index 100% rename from reactos/include/psdk/oleidl.idl rename to include/psdk/oleidl.idl diff --git a/reactos/include/psdk/opnrst.idl b/include/psdk/opnrst.idl similarity index 100% rename from reactos/include/psdk/opnrst.idl rename to include/psdk/opnrst.idl diff --git a/reactos/include/psdk/optary.idl b/include/psdk/optary.idl similarity index 100% rename from reactos/include/psdk/optary.idl rename to include/psdk/optary.idl diff --git a/reactos/include/psdk/pbt.h b/include/psdk/pbt.h similarity index 100% rename from reactos/include/psdk/pbt.h rename to include/psdk/pbt.h diff --git a/reactos/include/psdk/pdh.h b/include/psdk/pdh.h similarity index 100% rename from reactos/include/psdk/pdh.h rename to include/psdk/pdh.h diff --git a/reactos/include/psdk/pdhmsg.h b/include/psdk/pdhmsg.h similarity index 100% rename from reactos/include/psdk/pdhmsg.h rename to include/psdk/pdhmsg.h diff --git a/reactos/include/psdk/perhist.idl b/include/psdk/perhist.idl similarity index 100% rename from reactos/include/psdk/perhist.idl rename to include/psdk/perhist.idl diff --git a/reactos/include/psdk/polarity.h b/include/psdk/polarity.h similarity index 100% rename from reactos/include/psdk/polarity.h rename to include/psdk/polarity.h diff --git a/reactos/include/psdk/poppack.h b/include/psdk/poppack.h similarity index 100% rename from reactos/include/psdk/poppack.h rename to include/psdk/poppack.h diff --git a/reactos/include/psdk/powrprof.h b/include/psdk/powrprof.h similarity index 100% rename from reactos/include/psdk/powrprof.h rename to include/psdk/powrprof.h diff --git a/reactos/include/psdk/prntfont.h b/include/psdk/prntfont.h similarity index 100% rename from reactos/include/psdk/prntfont.h rename to include/psdk/prntfont.h diff --git a/reactos/include/psdk/propidl.idl b/include/psdk/propidl.idl similarity index 100% rename from reactos/include/psdk/propidl.idl rename to include/psdk/propidl.idl diff --git a/reactos/include/psdk/propkeydef.h b/include/psdk/propkeydef.h similarity index 100% rename from reactos/include/psdk/propkeydef.h rename to include/psdk/propkeydef.h diff --git a/reactos/include/psdk/propsys.idl b/include/psdk/propsys.idl similarity index 100% rename from reactos/include/psdk/propsys.idl rename to include/psdk/propsys.idl diff --git a/reactos/include/psdk/propvarutil.h b/include/psdk/propvarutil.h similarity index 100% rename from reactos/include/psdk/propvarutil.h rename to include/psdk/propvarutil.h diff --git a/reactos/include/psdk/prsht.h b/include/psdk/prsht.h similarity index 100% rename from reactos/include/psdk/prsht.h rename to include/psdk/prsht.h diff --git a/reactos/include/psdk/psapi.h b/include/psdk/psapi.h similarity index 100% rename from reactos/include/psdk/psapi.h rename to include/psdk/psapi.h diff --git a/reactos/include/psdk/psdk.rbuild b/include/psdk/psdk.rbuild similarity index 100% rename from reactos/include/psdk/psdk.rbuild rename to include/psdk/psdk.rbuild diff --git a/reactos/include/psdk/pshpack1.h b/include/psdk/pshpack1.h similarity index 100% rename from reactos/include/psdk/pshpack1.h rename to include/psdk/pshpack1.h diff --git a/reactos/include/psdk/pshpack2.h b/include/psdk/pshpack2.h similarity index 100% rename from reactos/include/psdk/pshpack2.h rename to include/psdk/pshpack2.h diff --git a/reactos/include/psdk/pshpack4.h b/include/psdk/pshpack4.h similarity index 100% rename from reactos/include/psdk/pshpack4.h rename to include/psdk/pshpack4.h diff --git a/reactos/include/psdk/pshpack8.h b/include/psdk/pshpack8.h similarity index 100% rename from reactos/include/psdk/pshpack8.h rename to include/psdk/pshpack8.h diff --git a/reactos/include/psdk/pshpck16.h b/include/psdk/pshpck16.h similarity index 100% rename from reactos/include/psdk/pshpck16.h rename to include/psdk/pshpck16.h diff --git a/reactos/include/psdk/pstore.idl b/include/psdk/pstore.idl similarity index 100% rename from reactos/include/psdk/pstore.idl rename to include/psdk/pstore.idl diff --git a/reactos/include/psdk/qos.h b/include/psdk/qos.h similarity index 100% rename from reactos/include/psdk/qos.h rename to include/psdk/qos.h diff --git a/reactos/include/psdk/rapi.h b/include/psdk/rapi.h similarity index 100% rename from reactos/include/psdk/rapi.h rename to include/psdk/rapi.h diff --git a/reactos/include/psdk/ras.h b/include/psdk/ras.h similarity index 100% rename from reactos/include/psdk/ras.h rename to include/psdk/ras.h diff --git a/reactos/include/psdk/rasdlg.h b/include/psdk/rasdlg.h similarity index 100% rename from reactos/include/psdk/rasdlg.h rename to include/psdk/rasdlg.h diff --git a/reactos/include/psdk/raseapif.h b/include/psdk/raseapif.h similarity index 100% rename from reactos/include/psdk/raseapif.h rename to include/psdk/raseapif.h diff --git a/reactos/include/psdk/raserror.h b/include/psdk/raserror.h similarity index 100% rename from reactos/include/psdk/raserror.h rename to include/psdk/raserror.h diff --git a/reactos/include/psdk/rassapi.h b/include/psdk/rassapi.h similarity index 100% rename from reactos/include/psdk/rassapi.h rename to include/psdk/rassapi.h diff --git a/reactos/include/psdk/rasshost.h b/include/psdk/rasshost.h similarity index 100% rename from reactos/include/psdk/rasshost.h rename to include/psdk/rasshost.h diff --git a/reactos/include/psdk/reason.h b/include/psdk/reason.h similarity index 100% rename from reactos/include/psdk/reason.h rename to include/psdk/reason.h diff --git a/reactos/include/psdk/regstr.h b/include/psdk/regstr.h similarity index 100% rename from reactos/include/psdk/regstr.h rename to include/psdk/regstr.h diff --git a/reactos/include/psdk/richedit.h b/include/psdk/richedit.h similarity index 100% rename from reactos/include/psdk/richedit.h rename to include/psdk/richedit.h diff --git a/reactos/include/psdk/richole.idl b/include/psdk/richole.idl similarity index 100% rename from reactos/include/psdk/richole.idl rename to include/psdk/richole.idl diff --git a/reactos/include/psdk/row.idl b/include/psdk/row.idl similarity index 100% rename from reactos/include/psdk/row.idl rename to include/psdk/row.idl diff --git a/reactos/include/psdk/rowchg.idl b/include/psdk/rowchg.idl similarity index 100% rename from reactos/include/psdk/rowchg.idl rename to include/psdk/rowchg.idl diff --git a/reactos/include/psdk/rpc.h b/include/psdk/rpc.h similarity index 100% rename from reactos/include/psdk/rpc.h rename to include/psdk/rpc.h diff --git a/reactos/include/psdk/rpcasync.h b/include/psdk/rpcasync.h similarity index 100% rename from reactos/include/psdk/rpcasync.h rename to include/psdk/rpcasync.h diff --git a/reactos/include/psdk/rpcdce.h b/include/psdk/rpcdce.h similarity index 100% rename from reactos/include/psdk/rpcdce.h rename to include/psdk/rpcdce.h diff --git a/reactos/include/psdk/rpcdce2.h b/include/psdk/rpcdce2.h similarity index 100% rename from reactos/include/psdk/rpcdce2.h rename to include/psdk/rpcdce2.h diff --git a/reactos/include/psdk/rpcdcep.h b/include/psdk/rpcdcep.h similarity index 100% rename from reactos/include/psdk/rpcdcep.h rename to include/psdk/rpcdcep.h diff --git a/reactos/include/psdk/rpcndr.h b/include/psdk/rpcndr.h similarity index 100% rename from reactos/include/psdk/rpcndr.h rename to include/psdk/rpcndr.h diff --git a/reactos/include/psdk/rpcnsi.h b/include/psdk/rpcnsi.h similarity index 100% rename from reactos/include/psdk/rpcnsi.h rename to include/psdk/rpcnsi.h diff --git a/reactos/include/psdk/rpcnsip.h b/include/psdk/rpcnsip.h similarity index 100% rename from reactos/include/psdk/rpcnsip.h rename to include/psdk/rpcnsip.h diff --git a/reactos/include/psdk/rpcnterr.h b/include/psdk/rpcnterr.h similarity index 100% rename from reactos/include/psdk/rpcnterr.h rename to include/psdk/rpcnterr.h diff --git a/reactos/include/psdk/rpcproxy.h b/include/psdk/rpcproxy.h similarity index 100% rename from reactos/include/psdk/rpcproxy.h rename to include/psdk/rpcproxy.h diff --git a/reactos/include/psdk/rstbas.idl b/include/psdk/rstbas.idl similarity index 100% rename from reactos/include/psdk/rstbas.idl rename to include/psdk/rstbas.idl diff --git a/reactos/include/psdk/rstinf.idl b/include/psdk/rstinf.idl similarity index 100% rename from reactos/include/psdk/rstinf.idl rename to include/psdk/rstinf.idl diff --git a/reactos/include/psdk/rstloc.idl b/include/psdk/rstloc.idl similarity index 100% rename from reactos/include/psdk/rstloc.idl rename to include/psdk/rstloc.idl diff --git a/reactos/include/psdk/scarderr.h b/include/psdk/scarderr.h similarity index 100% rename from reactos/include/psdk/scarderr.h rename to include/psdk/scarderr.h diff --git a/reactos/include/psdk/schannel.h b/include/psdk/schannel.h similarity index 100% rename from reactos/include/psdk/schannel.h rename to include/psdk/schannel.h diff --git a/reactos/include/psdk/schemadef.h b/include/psdk/schemadef.h similarity index 100% rename from reactos/include/psdk/schemadef.h rename to include/psdk/schemadef.h diff --git a/reactos/include/psdk/schnlsp.h b/include/psdk/schnlsp.h similarity index 100% rename from reactos/include/psdk/schnlsp.h rename to include/psdk/schnlsp.h diff --git a/reactos/include/psdk/scrnsave.h b/include/psdk/scrnsave.h similarity index 100% rename from reactos/include/psdk/scrnsave.h rename to include/psdk/scrnsave.h diff --git a/reactos/include/psdk/sddl.h b/include/psdk/sddl.h similarity index 100% rename from reactos/include/psdk/sddl.h rename to include/psdk/sddl.h diff --git a/reactos/include/psdk/sdkddkver.h b/include/psdk/sdkddkver.h similarity index 100% rename from reactos/include/psdk/sdkddkver.h rename to include/psdk/sdkddkver.h diff --git a/reactos/include/psdk/secext.h b/include/psdk/secext.h similarity index 100% rename from reactos/include/psdk/secext.h rename to include/psdk/secext.h diff --git a/reactos/include/psdk/security.h b/include/psdk/security.h similarity index 100% rename from reactos/include/psdk/security.h rename to include/psdk/security.h diff --git a/reactos/include/psdk/sensapi.h b/include/psdk/sensapi.h similarity index 100% rename from reactos/include/psdk/sensapi.h rename to include/psdk/sensapi.h diff --git a/reactos/include/psdk/sensevts.idl b/include/psdk/sensevts.idl similarity index 100% rename from reactos/include/psdk/sensevts.idl rename to include/psdk/sensevts.idl diff --git a/reactos/include/psdk/servprov.idl b/include/psdk/servprov.idl similarity index 100% rename from reactos/include/psdk/servprov.idl rename to include/psdk/servprov.idl diff --git a/reactos/include/psdk/sesprp.idl b/include/psdk/sesprp.idl similarity index 100% rename from reactos/include/psdk/sesprp.idl rename to include/psdk/sesprp.idl diff --git a/reactos/include/psdk/setupapi.h b/include/psdk/setupapi.h similarity index 100% rename from reactos/include/psdk/setupapi.h rename to include/psdk/setupapi.h diff --git a/reactos/include/psdk/sfc.h b/include/psdk/sfc.h similarity index 100% rename from reactos/include/psdk/sfc.h rename to include/psdk/sfc.h diff --git a/reactos/include/psdk/shdeprecated.idl b/include/psdk/shdeprecated.idl similarity index 100% rename from reactos/include/psdk/shdeprecated.idl rename to include/psdk/shdeprecated.idl diff --git a/reactos/include/psdk/shdispid.h b/include/psdk/shdispid.h similarity index 100% rename from reactos/include/psdk/shdispid.h rename to include/psdk/shdispid.h diff --git a/reactos/include/psdk/shellapi.h b/include/psdk/shellapi.h similarity index 100% rename from reactos/include/psdk/shellapi.h rename to include/psdk/shellapi.h diff --git a/reactos/include/psdk/shldisp.idl b/include/psdk/shldisp.idl similarity index 100% rename from reactos/include/psdk/shldisp.idl rename to include/psdk/shldisp.idl diff --git a/reactos/include/psdk/shlguid.h b/include/psdk/shlguid.h similarity index 100% rename from reactos/include/psdk/shlguid.h rename to include/psdk/shlguid.h diff --git a/reactos/include/psdk/shlguid_undoc.h b/include/psdk/shlguid_undoc.h similarity index 100% rename from reactos/include/psdk/shlguid_undoc.h rename to include/psdk/shlguid_undoc.h diff --git a/reactos/include/psdk/shlobj.h b/include/psdk/shlobj.h similarity index 100% rename from reactos/include/psdk/shlobj.h rename to include/psdk/shlobj.h diff --git a/reactos/include/psdk/shlobj_undoc.h b/include/psdk/shlobj_undoc.h similarity index 100% rename from reactos/include/psdk/shlobj_undoc.h rename to include/psdk/shlobj_undoc.h diff --git a/reactos/include/psdk/shlwapi.h b/include/psdk/shlwapi.h similarity index 100% rename from reactos/include/psdk/shlwapi.h rename to include/psdk/shlwapi.h diff --git a/reactos/include/psdk/shlwapi_undoc.h b/include/psdk/shlwapi_undoc.h similarity index 100% rename from reactos/include/psdk/shlwapi_undoc.h rename to include/psdk/shlwapi_undoc.h diff --git a/reactos/include/psdk/shobjidl.idl b/include/psdk/shobjidl.idl similarity index 100% rename from reactos/include/psdk/shobjidl.idl rename to include/psdk/shobjidl.idl diff --git a/reactos/include/psdk/shtypes.idl b/include/psdk/shtypes.idl similarity index 100% rename from reactos/include/psdk/shtypes.idl rename to include/psdk/shtypes.idl diff --git a/reactos/include/psdk/snmp.h b/include/psdk/snmp.h similarity index 100% rename from reactos/include/psdk/snmp.h rename to include/psdk/snmp.h diff --git a/reactos/include/psdk/softpub.h b/include/psdk/softpub.h similarity index 100% rename from reactos/include/psdk/softpub.h rename to include/psdk/softpub.h diff --git a/reactos/include/psdk/specstrings.h b/include/psdk/specstrings.h similarity index 100% rename from reactos/include/psdk/specstrings.h rename to include/psdk/specstrings.h diff --git a/reactos/include/psdk/sql.h b/include/psdk/sql.h similarity index 100% rename from reactos/include/psdk/sql.h rename to include/psdk/sql.h diff --git a/reactos/include/psdk/sqlext.h b/include/psdk/sqlext.h similarity index 100% rename from reactos/include/psdk/sqlext.h rename to include/psdk/sqlext.h diff --git a/reactos/include/psdk/sqltypes.h b/include/psdk/sqltypes.h similarity index 100% rename from reactos/include/psdk/sqltypes.h rename to include/psdk/sqltypes.h diff --git a/reactos/include/psdk/sqlucode.h b/include/psdk/sqlucode.h similarity index 100% rename from reactos/include/psdk/sqlucode.h rename to include/psdk/sqlucode.h diff --git a/reactos/include/psdk/srrestoreptapi.h b/include/psdk/srrestoreptapi.h similarity index 100% rename from reactos/include/psdk/srrestoreptapi.h rename to include/psdk/srrestoreptapi.h diff --git a/reactos/include/psdk/sspi.h b/include/psdk/sspi.h similarity index 100% rename from reactos/include/psdk/sspi.h rename to include/psdk/sspi.h diff --git a/reactos/include/psdk/stdole2.idl b/include/psdk/stdole2.idl similarity index 100% rename from reactos/include/psdk/stdole2.idl rename to include/psdk/stdole2.idl diff --git a/reactos/include/psdk/sti.h b/include/psdk/sti.h similarity index 100% rename from reactos/include/psdk/sti.h rename to include/psdk/sti.h diff --git a/reactos/include/psdk/stierr.h b/include/psdk/stierr.h similarity index 100% rename from reactos/include/psdk/stierr.h rename to include/psdk/stierr.h diff --git a/reactos/include/psdk/stireg.h b/include/psdk/stireg.h similarity index 100% rename from reactos/include/psdk/stireg.h rename to include/psdk/stireg.h diff --git a/reactos/include/psdk/strmif.idl b/include/psdk/strmif.idl similarity index 100% rename from reactos/include/psdk/strmif.idl rename to include/psdk/strmif.idl diff --git a/reactos/include/psdk/strsafe.h b/include/psdk/strsafe.h similarity index 100% rename from reactos/include/psdk/strsafe.h rename to include/psdk/strsafe.h diff --git a/reactos/include/psdk/structuredquerycondition.idl b/include/psdk/structuredquerycondition.idl similarity index 100% rename from reactos/include/psdk/structuredquerycondition.idl rename to include/psdk/structuredquerycondition.idl diff --git a/reactos/include/psdk/subauth.h b/include/psdk/subauth.h similarity index 100% rename from reactos/include/psdk/subauth.h rename to include/psdk/subauth.h diff --git a/reactos/include/psdk/svcguid.h b/include/psdk/svcguid.h similarity index 100% rename from reactos/include/psdk/svcguid.h rename to include/psdk/svcguid.h diff --git a/reactos/include/psdk/svrapi.h b/include/psdk/svrapi.h similarity index 100% rename from reactos/include/psdk/svrapi.h rename to include/psdk/svrapi.h diff --git a/reactos/include/psdk/t2embapi.h b/include/psdk/t2embapi.h similarity index 100% rename from reactos/include/psdk/t2embapi.h rename to include/psdk/t2embapi.h diff --git a/reactos/include/psdk/tapi.h b/include/psdk/tapi.h similarity index 100% rename from reactos/include/psdk/tapi.h rename to include/psdk/tapi.h diff --git a/reactos/include/psdk/tcpioctl.h b/include/psdk/tcpioctl.h similarity index 100% rename from reactos/include/psdk/tcpioctl.h rename to include/psdk/tcpioctl.h diff --git a/reactos/include/psdk/tdi.h b/include/psdk/tdi.h similarity index 100% rename from reactos/include/psdk/tdi.h rename to include/psdk/tdi.h diff --git a/reactos/include/psdk/tdiinfo.h b/include/psdk/tdiinfo.h similarity index 100% rename from reactos/include/psdk/tdiinfo.h rename to include/psdk/tdiinfo.h diff --git a/reactos/include/psdk/textserv.h b/include/psdk/textserv.h similarity index 100% rename from reactos/include/psdk/textserv.h rename to include/psdk/textserv.h diff --git a/reactos/include/psdk/textstor.idl b/include/psdk/textstor.idl similarity index 100% rename from reactos/include/psdk/textstor.idl rename to include/psdk/textstor.idl diff --git a/reactos/include/psdk/tlhelp32.h b/include/psdk/tlhelp32.h similarity index 100% rename from reactos/include/psdk/tlhelp32.h rename to include/psdk/tlhelp32.h diff --git a/reactos/include/psdk/tmschema.h b/include/psdk/tmschema.h similarity index 100% rename from reactos/include/psdk/tmschema.h rename to include/psdk/tmschema.h diff --git a/reactos/include/psdk/tom.idl b/include/psdk/tom.idl similarity index 100% rename from reactos/include/psdk/tom.idl rename to include/psdk/tom.idl diff --git a/reactos/include/psdk/traffic.h b/include/psdk/traffic.h similarity index 100% rename from reactos/include/psdk/traffic.h rename to include/psdk/traffic.h diff --git a/reactos/include/psdk/tuner.idl b/include/psdk/tuner.idl similarity index 100% rename from reactos/include/psdk/tuner.idl rename to include/psdk/tuner.idl diff --git a/reactos/include/psdk/tvout.h b/include/psdk/tvout.h similarity index 100% rename from reactos/include/psdk/tvout.h rename to include/psdk/tvout.h diff --git a/reactos/include/psdk/twain.h b/include/psdk/twain.h similarity index 100% rename from reactos/include/psdk/twain.h rename to include/psdk/twain.h diff --git a/reactos/include/psdk/unknown.h b/include/psdk/unknown.h similarity index 100% rename from reactos/include/psdk/unknown.h rename to include/psdk/unknown.h diff --git a/reactos/include/psdk/unknwn.idl b/include/psdk/unknwn.idl similarity index 100% rename from reactos/include/psdk/unknwn.idl rename to include/psdk/unknwn.idl diff --git a/reactos/include/psdk/urlhist.idl b/include/psdk/urlhist.idl similarity index 100% rename from reactos/include/psdk/urlhist.idl rename to include/psdk/urlhist.idl diff --git a/reactos/include/psdk/urlmon.idl b/include/psdk/urlmon.idl similarity index 100% rename from reactos/include/psdk/urlmon.idl rename to include/psdk/urlmon.idl diff --git a/reactos/include/psdk/usb.h b/include/psdk/usb.h similarity index 100% rename from reactos/include/psdk/usb.h rename to include/psdk/usb.h diff --git a/reactos/include/psdk/usb100.h b/include/psdk/usb100.h similarity index 100% rename from reactos/include/psdk/usb100.h rename to include/psdk/usb100.h diff --git a/reactos/include/psdk/usb200.h b/include/psdk/usb200.h similarity index 100% rename from reactos/include/psdk/usb200.h rename to include/psdk/usb200.h diff --git a/reactos/include/psdk/usbcamdi.h b/include/psdk/usbcamdi.h similarity index 100% rename from reactos/include/psdk/usbcamdi.h rename to include/psdk/usbcamdi.h diff --git a/reactos/include/psdk/usbdi.h b/include/psdk/usbdi.h similarity index 100% rename from reactos/include/psdk/usbdi.h rename to include/psdk/usbdi.h diff --git a/reactos/include/psdk/usbioctl.h b/include/psdk/usbioctl.h similarity index 100% rename from reactos/include/psdk/usbioctl.h rename to include/psdk/usbioctl.h diff --git a/reactos/include/psdk/usbiodef.h b/include/psdk/usbiodef.h similarity index 100% rename from reactos/include/psdk/usbiodef.h rename to include/psdk/usbiodef.h diff --git a/reactos/include/psdk/usbrpmif.h b/include/psdk/usbrpmif.h similarity index 100% rename from reactos/include/psdk/usbrpmif.h rename to include/psdk/usbrpmif.h diff --git a/reactos/include/psdk/usbuser.h b/include/psdk/usbuser.h similarity index 100% rename from reactos/include/psdk/usbuser.h rename to include/psdk/usbuser.h diff --git a/reactos/include/psdk/userenv.h b/include/psdk/userenv.h similarity index 100% rename from reactos/include/psdk/userenv.h rename to include/psdk/userenv.h diff --git a/reactos/include/psdk/usp10.h b/include/psdk/usp10.h similarity index 100% rename from reactos/include/psdk/usp10.h rename to include/psdk/usp10.h diff --git a/reactos/include/psdk/uxtheme.h b/include/psdk/uxtheme.h similarity index 100% rename from reactos/include/psdk/uxtheme.h rename to include/psdk/uxtheme.h diff --git a/reactos/include/psdk/vfw.h b/include/psdk/vfw.h similarity index 100% rename from reactos/include/psdk/vfw.h rename to include/psdk/vfw.h diff --git a/reactos/include/psdk/vfwmsgs.h b/include/psdk/vfwmsgs.h similarity index 100% rename from reactos/include/psdk/vfwmsgs.h rename to include/psdk/vfwmsgs.h diff --git a/reactos/include/psdk/vmr9.idl b/include/psdk/vmr9.idl similarity index 100% rename from reactos/include/psdk/vmr9.idl rename to include/psdk/vmr9.idl diff --git a/reactos/include/psdk/vmrender.idl b/include/psdk/vmrender.idl similarity index 100% rename from reactos/include/psdk/vmrender.idl rename to include/psdk/vmrender.idl diff --git a/reactos/include/psdk/w32api.h b/include/psdk/w32api.h similarity index 100% rename from reactos/include/psdk/w32api.h rename to include/psdk/w32api.h diff --git a/reactos/include/psdk/warning.h b/include/psdk/warning.h similarity index 100% rename from reactos/include/psdk/warning.h rename to include/psdk/warning.h diff --git a/reactos/include/psdk/wbemcli.idl b/include/psdk/wbemcli.idl similarity index 100% rename from reactos/include/psdk/wbemcli.idl rename to include/psdk/wbemcli.idl diff --git a/reactos/include/psdk/wdbgexts.h b/include/psdk/wdbgexts.h similarity index 100% rename from reactos/include/psdk/wdbgexts.h rename to include/psdk/wdbgexts.h diff --git a/reactos/include/psdk/werapi.h b/include/psdk/werapi.h similarity index 100% rename from reactos/include/psdk/werapi.h rename to include/psdk/werapi.h diff --git a/reactos/include/psdk/wia.h b/include/psdk/wia.h similarity index 100% rename from reactos/include/psdk/wia.h rename to include/psdk/wia.h diff --git a/reactos/include/psdk/wia_lh.idl b/include/psdk/wia_lh.idl similarity index 100% rename from reactos/include/psdk/wia_lh.idl rename to include/psdk/wia_lh.idl diff --git a/reactos/include/psdk/wia_xp.idl b/include/psdk/wia_xp.idl similarity index 100% rename from reactos/include/psdk/wia_xp.idl rename to include/psdk/wia_xp.idl diff --git a/reactos/include/psdk/winable.h b/include/psdk/winable.h similarity index 100% rename from reactos/include/psdk/winable.h rename to include/psdk/winable.h diff --git a/reactos/include/psdk/winbase.h b/include/psdk/winbase.h similarity index 100% rename from reactos/include/psdk/winbase.h rename to include/psdk/winbase.h diff --git a/reactos/include/psdk/winber.h b/include/psdk/winber.h similarity index 100% rename from reactos/include/psdk/winber.h rename to include/psdk/winber.h diff --git a/reactos/include/psdk/wincodec.idl b/include/psdk/wincodec.idl similarity index 100% rename from reactos/include/psdk/wincodec.idl rename to include/psdk/wincodec.idl diff --git a/reactos/include/psdk/wincon.h b/include/psdk/wincon.h similarity index 100% rename from reactos/include/psdk/wincon.h rename to include/psdk/wincon.h diff --git a/reactos/include/psdk/wincred.h b/include/psdk/wincred.h similarity index 100% rename from reactos/include/psdk/wincred.h rename to include/psdk/wincred.h diff --git a/reactos/include/psdk/wincrypt.h b/include/psdk/wincrypt.h similarity index 100% rename from reactos/include/psdk/wincrypt.h rename to include/psdk/wincrypt.h diff --git a/reactos/include/psdk/winddi.h b/include/psdk/winddi.h similarity index 100% rename from reactos/include/psdk/winddi.h rename to include/psdk/winddi.h diff --git a/reactos/include/psdk/winddiui.h b/include/psdk/winddiui.h similarity index 100% rename from reactos/include/psdk/winddiui.h rename to include/psdk/winddiui.h diff --git a/reactos/include/psdk/windef.h b/include/psdk/windef.h similarity index 100% rename from reactos/include/psdk/windef.h rename to include/psdk/windef.h diff --git a/reactos/include/psdk/windns.h b/include/psdk/windns.h similarity index 100% rename from reactos/include/psdk/windns.h rename to include/psdk/windns.h diff --git a/reactos/include/psdk/windot11.h b/include/psdk/windot11.h similarity index 100% rename from reactos/include/psdk/windot11.h rename to include/psdk/windot11.h diff --git a/reactos/include/psdk/windows.h b/include/psdk/windows.h similarity index 100% rename from reactos/include/psdk/windows.h rename to include/psdk/windows.h diff --git a/reactos/include/psdk/windowsx.h b/include/psdk/windowsx.h similarity index 100% rename from reactos/include/psdk/windowsx.h rename to include/psdk/windowsx.h diff --git a/reactos/include/psdk/winefs.h b/include/psdk/winefs.h similarity index 100% rename from reactos/include/psdk/winefs.h rename to include/psdk/winefs.h diff --git a/reactos/include/psdk/winerror.h b/include/psdk/winerror.h similarity index 100% rename from reactos/include/psdk/winerror.h rename to include/psdk/winerror.h diff --git a/reactos/include/psdk/winfax.h b/include/psdk/winfax.h similarity index 100% rename from reactos/include/psdk/winfax.h rename to include/psdk/winfax.h diff --git a/reactos/include/psdk/wingdi.h b/include/psdk/wingdi.h similarity index 100% rename from reactos/include/psdk/wingdi.h rename to include/psdk/wingdi.h diff --git a/reactos/include/psdk/winhttp.h b/include/psdk/winhttp.h similarity index 100% rename from reactos/include/psdk/winhttp.h rename to include/psdk/winhttp.h diff --git a/reactos/include/psdk/wininet.h b/include/psdk/wininet.h similarity index 100% rename from reactos/include/psdk/wininet.h rename to include/psdk/wininet.h diff --git a/reactos/include/psdk/winineti.h b/include/psdk/winineti.h similarity index 100% rename from reactos/include/psdk/winineti.h rename to include/psdk/winineti.h diff --git a/reactos/include/psdk/winioctl.h b/include/psdk/winioctl.h similarity index 100% rename from reactos/include/psdk/winioctl.h rename to include/psdk/winioctl.h diff --git a/reactos/include/psdk/winldap.h b/include/psdk/winldap.h similarity index 100% rename from reactos/include/psdk/winldap.h rename to include/psdk/winldap.h diff --git a/reactos/include/psdk/winnetwk.h b/include/psdk/winnetwk.h similarity index 100% rename from reactos/include/psdk/winnetwk.h rename to include/psdk/winnetwk.h diff --git a/reactos/include/psdk/winnls.h b/include/psdk/winnls.h similarity index 100% rename from reactos/include/psdk/winnls.h rename to include/psdk/winnls.h diff --git a/reactos/include/psdk/winnls32.h b/include/psdk/winnls32.h similarity index 100% rename from reactos/include/psdk/winnls32.h rename to include/psdk/winnls32.h diff --git a/reactos/include/psdk/winnt.h b/include/psdk/winnt.h similarity index 100% rename from reactos/include/psdk/winnt.h rename to include/psdk/winnt.h diff --git a/reactos/include/psdk/winperf.h b/include/psdk/winperf.h similarity index 100% rename from reactos/include/psdk/winperf.h rename to include/psdk/winperf.h diff --git a/reactos/include/psdk/winreg.h b/include/psdk/winreg.h similarity index 100% rename from reactos/include/psdk/winreg.h rename to include/psdk/winreg.h diff --git a/reactos/include/psdk/winres.h b/include/psdk/winres.h similarity index 100% rename from reactos/include/psdk/winres.h rename to include/psdk/winres.h diff --git a/reactos/include/psdk/winresrc.h b/include/psdk/winresrc.h similarity index 100% rename from reactos/include/psdk/winresrc.h rename to include/psdk/winresrc.h diff --git a/reactos/include/psdk/winsafer.h b/include/psdk/winsafer.h similarity index 100% rename from reactos/include/psdk/winsafer.h rename to include/psdk/winsafer.h diff --git a/reactos/include/psdk/winscard.h b/include/psdk/winscard.h similarity index 100% rename from reactos/include/psdk/winscard.h rename to include/psdk/winscard.h diff --git a/reactos/include/psdk/winsmcrd.h b/include/psdk/winsmcrd.h similarity index 100% rename from reactos/include/psdk/winsmcrd.h rename to include/psdk/winsmcrd.h diff --git a/reactos/include/psdk/winsnmp.h b/include/psdk/winsnmp.h similarity index 100% rename from reactos/include/psdk/winsnmp.h rename to include/psdk/winsnmp.h diff --git a/reactos/include/psdk/winsock.h b/include/psdk/winsock.h similarity index 100% rename from reactos/include/psdk/winsock.h rename to include/psdk/winsock.h diff --git a/reactos/include/psdk/winsock2.h b/include/psdk/winsock2.h similarity index 100% rename from reactos/include/psdk/winsock2.h rename to include/psdk/winsock2.h diff --git a/reactos/include/psdk/winsplp.h b/include/psdk/winsplp.h similarity index 100% rename from reactos/include/psdk/winsplp.h rename to include/psdk/winsplp.h diff --git a/reactos/include/psdk/winspool.h b/include/psdk/winspool.h similarity index 100% rename from reactos/include/psdk/winspool.h rename to include/psdk/winspool.h diff --git a/reactos/include/psdk/winsvc.h b/include/psdk/winsvc.h similarity index 100% rename from reactos/include/psdk/winsvc.h rename to include/psdk/winsvc.h diff --git a/reactos/include/psdk/winsxs.idl b/include/psdk/winsxs.idl similarity index 100% rename from reactos/include/psdk/winsxs.idl rename to include/psdk/winsxs.idl diff --git a/reactos/include/psdk/winternl.h b/include/psdk/winternl.h similarity index 100% rename from reactos/include/psdk/winternl.h rename to include/psdk/winternl.h diff --git a/reactos/include/psdk/wintrust.h b/include/psdk/wintrust.h similarity index 100% rename from reactos/include/psdk/wintrust.h rename to include/psdk/wintrust.h diff --git a/reactos/include/psdk/winuser.h b/include/psdk/winuser.h similarity index 100% rename from reactos/include/psdk/winuser.h rename to include/psdk/winuser.h diff --git a/reactos/include/psdk/winver.h b/include/psdk/winver.h similarity index 100% rename from reactos/include/psdk/winver.h rename to include/psdk/winver.h diff --git a/reactos/include/psdk/winwlx.h b/include/psdk/winwlx.h similarity index 100% rename from reactos/include/psdk/winwlx.h rename to include/psdk/winwlx.h diff --git a/reactos/include/psdk/wlanapi.h b/include/psdk/wlanapi.h similarity index 100% rename from reactos/include/psdk/wlanapi.h rename to include/psdk/wlanapi.h diff --git a/reactos/include/psdk/wlantypes.h b/include/psdk/wlantypes.h similarity index 100% rename from reactos/include/psdk/wlantypes.h rename to include/psdk/wlantypes.h diff --git a/reactos/include/psdk/wmistr.h b/include/psdk/wmistr.h similarity index 100% rename from reactos/include/psdk/wmistr.h rename to include/psdk/wmistr.h diff --git a/reactos/include/psdk/ws2atm.h b/include/psdk/ws2atm.h similarity index 100% rename from reactos/include/psdk/ws2atm.h rename to include/psdk/ws2atm.h diff --git a/reactos/include/psdk/ws2bth.h b/include/psdk/ws2bth.h similarity index 100% rename from reactos/include/psdk/ws2bth.h rename to include/psdk/ws2bth.h diff --git a/reactos/include/psdk/ws2def.h b/include/psdk/ws2def.h similarity index 100% rename from reactos/include/psdk/ws2def.h rename to include/psdk/ws2def.h diff --git a/reactos/include/psdk/ws2ipdef.h b/include/psdk/ws2ipdef.h similarity index 100% rename from reactos/include/psdk/ws2ipdef.h rename to include/psdk/ws2ipdef.h diff --git a/reactos/include/psdk/ws2spi.h b/include/psdk/ws2spi.h similarity index 100% rename from reactos/include/psdk/ws2spi.h rename to include/psdk/ws2spi.h diff --git a/reactos/include/psdk/ws2tcpip.h b/include/psdk/ws2tcpip.h similarity index 100% rename from reactos/include/psdk/ws2tcpip.h rename to include/psdk/ws2tcpip.h diff --git a/reactos/include/psdk/wsahelp.h b/include/psdk/wsahelp.h similarity index 100% rename from reactos/include/psdk/wsahelp.h rename to include/psdk/wsahelp.h diff --git a/reactos/include/psdk/wsipv6ok.h b/include/psdk/wsipv6ok.h similarity index 100% rename from reactos/include/psdk/wsipv6ok.h rename to include/psdk/wsipv6ok.h diff --git a/reactos/include/psdk/wsipx.h b/include/psdk/wsipx.h similarity index 100% rename from reactos/include/psdk/wsipx.h rename to include/psdk/wsipx.h diff --git a/reactos/include/psdk/wsnetbs.h b/include/psdk/wsnetbs.h similarity index 100% rename from reactos/include/psdk/wsnetbs.h rename to include/psdk/wsnetbs.h diff --git a/reactos/include/psdk/wspiapi.h b/include/psdk/wspiapi.h similarity index 100% rename from reactos/include/psdk/wspiapi.h rename to include/psdk/wspiapi.h diff --git a/reactos/include/psdk/wtsapi32.h b/include/psdk/wtsapi32.h similarity index 100% rename from reactos/include/psdk/wtsapi32.h rename to include/psdk/wtsapi32.h diff --git a/reactos/include/psdk/wtypes.idl b/include/psdk/wtypes.idl similarity index 100% rename from reactos/include/psdk/wtypes.idl rename to include/psdk/wtypes.idl diff --git a/reactos/include/psdk/wuapi.idl b/include/psdk/wuapi.idl similarity index 100% rename from reactos/include/psdk/wuapi.idl rename to include/psdk/wuapi.idl diff --git a/reactos/include/psdk/xcmc.h b/include/psdk/xcmc.h similarity index 100% rename from reactos/include/psdk/xcmc.h rename to include/psdk/xcmc.h diff --git a/reactos/include/psdk/xmldom.idl b/include/psdk/xmldom.idl similarity index 100% rename from reactos/include/psdk/xmldom.idl rename to include/psdk/xmldom.idl diff --git a/reactos/include/psdk/xmldomdid.h b/include/psdk/xmldomdid.h similarity index 100% rename from reactos/include/psdk/xmldomdid.h rename to include/psdk/xmldomdid.h diff --git a/reactos/include/psdk/xmldso.idl b/include/psdk/xmldso.idl similarity index 100% rename from reactos/include/psdk/xmldso.idl rename to include/psdk/xmldso.idl diff --git a/reactos/include/psdk/xmldsodid.h b/include/psdk/xmldsodid.h similarity index 100% rename from reactos/include/psdk/xmldsodid.h rename to include/psdk/xmldsodid.h diff --git a/reactos/include/psdk/xmllite.idl b/include/psdk/xmllite.idl similarity index 100% rename from reactos/include/psdk/xmllite.idl rename to include/psdk/xmllite.idl diff --git a/reactos/include/psdk/xprtdefs.h b/include/psdk/xprtdefs.h similarity index 100% rename from reactos/include/psdk/xprtdefs.h rename to include/psdk/xprtdefs.h diff --git a/reactos/include/psdk/zmouse.h b/include/psdk/zmouse.h similarity index 100% rename from reactos/include/psdk/zmouse.h rename to include/psdk/zmouse.h diff --git a/reactos/include/reactos/arc/arc.h b/include/reactos/arc/arc.h similarity index 100% rename from reactos/include/reactos/arc/arc.h rename to include/reactos/arc/arc.h diff --git a/reactos/include/reactos/arc/setupblk.h b/include/reactos/arc/setupblk.h similarity index 100% rename from reactos/include/reactos/arc/setupblk.h rename to include/reactos/arc/setupblk.h diff --git a/reactos/include/reactos/arm/armddk.h b/include/reactos/arm/armddk.h similarity index 100% rename from reactos/include/reactos/arm/armddk.h rename to include/reactos/arm/armddk.h diff --git a/reactos/include/reactos/arm/peripherals/pl011.h b/include/reactos/arm/peripherals/pl011.h similarity index 100% rename from reactos/include/reactos/arm/peripherals/pl011.h rename to include/reactos/arm/peripherals/pl011.h diff --git a/reactos/include/reactos/arm/peripherals/pl190.h b/include/reactos/arm/peripherals/pl190.h similarity index 100% rename from reactos/include/reactos/arm/peripherals/pl190.h rename to include/reactos/arm/peripherals/pl190.h diff --git a/reactos/include/reactos/arm/peripherals/sp804.h b/include/reactos/arm/peripherals/sp804.h similarity index 100% rename from reactos/include/reactos/arm/peripherals/sp804.h rename to include/reactos/arm/peripherals/sp804.h diff --git a/reactos/include/reactos/asm.h b/include/reactos/asm.h similarity index 100% rename from reactos/include/reactos/asm.h rename to include/reactos/asm.h diff --git a/reactos/include/reactos/asm.inc b/include/reactos/asm.inc similarity index 100% rename from reactos/include/reactos/asm.inc rename to include/reactos/asm.inc diff --git a/reactos/include/reactos/buildno.h.cmake b/include/reactos/buildno.h.cmake similarity index 100% rename from reactos/include/reactos/buildno.h.cmake rename to include/reactos/buildno.h.cmake diff --git a/reactos/include/reactos/chew/chew.h b/include/reactos/chew/chew.h similarity index 100% rename from reactos/include/reactos/chew/chew.h rename to include/reactos/chew/chew.h diff --git a/reactos/include/reactos/debug.h b/include/reactos/debug.h similarity index 100% rename from reactos/include/reactos/debug.h rename to include/reactos/debug.h diff --git a/reactos/include/reactos/dll/desk/deskcplx.h b/include/reactos/dll/desk/deskcplx.h similarity index 100% rename from reactos/include/reactos/dll/desk/deskcplx.h rename to include/reactos/dll/desk/deskcplx.h diff --git a/reactos/include/reactos/dll/devmgr/devmgr.h b/include/reactos/dll/devmgr/devmgr.h similarity index 100% rename from reactos/include/reactos/dll/devmgr/devmgr.h rename to include/reactos/dll/devmgr/devmgr.h diff --git a/reactos/include/reactos/dll/directx/d3d8thk.h b/include/reactos/dll/directx/d3d8thk.h similarity index 100% rename from reactos/include/reactos/dll/directx/d3d8thk.h rename to include/reactos/dll/directx/d3d8thk.h diff --git a/reactos/include/reactos/drivers/acpi/acpi.h b/include/reactos/drivers/acpi/acpi.h similarity index 100% rename from reactos/include/reactos/drivers/acpi/acpi.h rename to include/reactos/drivers/acpi/acpi.h diff --git a/reactos/include/reactos/drivers/afd/shared.h b/include/reactos/drivers/afd/shared.h similarity index 100% rename from reactos/include/reactos/drivers/afd/shared.h rename to include/reactos/drivers/afd/shared.h diff --git a/reactos/include/reactos/drivers/blue/ntddblue.h b/include/reactos/drivers/blue/ntddblue.h similarity index 100% rename from reactos/include/reactos/drivers/blue/ntddblue.h rename to include/reactos/drivers/blue/ntddblue.h diff --git a/reactos/include/reactos/drivers/bootvid/bootvid.h b/include/reactos/drivers/bootvid/bootvid.h similarity index 100% rename from reactos/include/reactos/drivers/bootvid/bootvid.h rename to include/reactos/drivers/bootvid/bootvid.h diff --git a/reactos/include/reactos/drivers/directx/directxint.h b/include/reactos/drivers/directx/directxint.h similarity index 100% rename from reactos/include/reactos/drivers/directx/directxint.h rename to include/reactos/drivers/directx/directxint.h diff --git a/reactos/include/reactos/drivers/directx/dxeng.h b/include/reactos/drivers/directx/dxeng.h similarity index 100% rename from reactos/include/reactos/drivers/directx/dxeng.h rename to include/reactos/drivers/directx/dxeng.h diff --git a/reactos/include/reactos/drivers/directx/dxg.h b/include/reactos/drivers/directx/dxg.h similarity index 100% rename from reactos/include/reactos/drivers/directx/dxg.h rename to include/reactos/drivers/directx/dxg.h diff --git a/reactos/include/reactos/drivers/ntddrdsk.h b/include/reactos/drivers/ntddrdsk.h similarity index 100% rename from reactos/include/reactos/drivers/ntddrdsk.h rename to include/reactos/drivers/ntddrdsk.h diff --git a/reactos/include/reactos/drivers/pci/pci.h b/include/reactos/drivers/pci/pci.h similarity index 100% rename from reactos/include/reactos/drivers/pci/pci.h rename to include/reactos/drivers/pci/pci.h diff --git a/reactos/include/reactos/drivers/serial/ns16550.h b/include/reactos/drivers/serial/ns16550.h similarity index 100% rename from reactos/include/reactos/drivers/serial/ns16550.h rename to include/reactos/drivers/serial/ns16550.h diff --git a/reactos/include/reactos/elf/common.h b/include/reactos/elf/common.h similarity index 100% rename from reactos/include/reactos/elf/common.h rename to include/reactos/elf/common.h diff --git a/reactos/include/reactos/elf/elf-i386.h b/include/reactos/elf/elf-i386.h similarity index 100% rename from reactos/include/reactos/elf/elf-i386.h rename to include/reactos/elf/elf-i386.h diff --git a/reactos/include/reactos/elf/elf-powerpc.h b/include/reactos/elf/elf-powerpc.h similarity index 100% rename from reactos/include/reactos/elf/elf-powerpc.h rename to include/reactos/elf/elf-powerpc.h diff --git a/reactos/include/reactos/elf/elf.h b/include/reactos/elf/elf.h similarity index 100% rename from reactos/include/reactos/elf/elf.h rename to include/reactos/elf/elf.h diff --git a/reactos/include/reactos/elf/elf32.h b/include/reactos/elf/elf32.h similarity index 100% rename from reactos/include/reactos/elf/elf32.h rename to include/reactos/elf/elf32.h diff --git a/reactos/include/reactos/elf/elf64.h b/include/reactos/elf/elf64.h similarity index 100% rename from reactos/include/reactos/elf/elf64.h rename to include/reactos/elf/elf64.h diff --git a/reactos/include/reactos/elf/generic.h b/include/reactos/elf/generic.h similarity index 100% rename from reactos/include/reactos/elf/generic.h rename to include/reactos/elf/generic.h diff --git a/reactos/include/reactos/elf/machine.h b/include/reactos/elf/machine.h similarity index 100% rename from reactos/include/reactos/elf/machine.h rename to include/reactos/elf/machine.h diff --git a/reactos/include/reactos/elf/reactos.h b/include/reactos/elf/reactos.h similarity index 100% rename from reactos/include/reactos/elf/reactos.h rename to include/reactos/elf/reactos.h diff --git a/reactos/include/reactos/exeformat.h b/include/reactos/exeformat.h similarity index 100% rename from reactos/include/reactos/exeformat.h rename to include/reactos/exeformat.h diff --git a/reactos/include/reactos/idl/eventlogrpc.acf b/include/reactos/idl/eventlogrpc.acf similarity index 100% rename from reactos/include/reactos/idl/eventlogrpc.acf rename to include/reactos/idl/eventlogrpc.acf diff --git a/reactos/include/reactos/idl/eventlogrpc.idl b/include/reactos/idl/eventlogrpc.idl similarity index 100% rename from reactos/include/reactos/idl/eventlogrpc.idl rename to include/reactos/idl/eventlogrpc.idl diff --git a/reactos/include/reactos/idl/idl.rbuild b/include/reactos/idl/idl.rbuild similarity index 100% rename from reactos/include/reactos/idl/idl.rbuild rename to include/reactos/idl/idl.rbuild diff --git a/reactos/include/reactos/idl/lsa.acf b/include/reactos/idl/lsa.acf similarity index 100% rename from reactos/include/reactos/idl/lsa.acf rename to include/reactos/idl/lsa.acf diff --git a/reactos/include/reactos/idl/lsa.idl b/include/reactos/idl/lsa.idl similarity index 100% rename from reactos/include/reactos/idl/lsa.idl rename to include/reactos/idl/lsa.idl diff --git a/reactos/include/reactos/idl/ms-dtyp.idl b/include/reactos/idl/ms-dtyp.idl similarity index 100% rename from reactos/include/reactos/idl/ms-dtyp.idl rename to include/reactos/idl/ms-dtyp.idl diff --git a/reactos/include/reactos/idl/pnp.acf b/include/reactos/idl/pnp.acf similarity index 100% rename from reactos/include/reactos/idl/pnp.acf rename to include/reactos/idl/pnp.acf diff --git a/reactos/include/reactos/idl/pnp.idl b/include/reactos/idl/pnp.idl similarity index 100% rename from reactos/include/reactos/idl/pnp.idl rename to include/reactos/idl/pnp.idl diff --git a/reactos/include/reactos/idl/svcctl.acf b/include/reactos/idl/svcctl.acf similarity index 100% rename from reactos/include/reactos/idl/svcctl.acf rename to include/reactos/idl/svcctl.acf diff --git a/reactos/include/reactos/idl/svcctl.idl b/include/reactos/idl/svcctl.idl similarity index 100% rename from reactos/include/reactos/idl/svcctl.idl rename to include/reactos/idl/svcctl.idl diff --git a/reactos/include/reactos/idl/wlansvc.idl b/include/reactos/idl/wlansvc.idl similarity index 100% rename from reactos/include/reactos/idl/wlansvc.idl rename to include/reactos/idl/wlansvc.idl diff --git a/reactos/include/reactos/kddll.h b/include/reactos/kddll.h similarity index 100% rename from reactos/include/reactos/kddll.h rename to include/reactos/kddll.h diff --git a/reactos/include/reactos/kjk/argv_parser.h b/include/reactos/kjk/argv_parser.h similarity index 100% rename from reactos/include/reactos/kjk/argv_parser.h rename to include/reactos/kjk/argv_parser.h diff --git a/reactos/include/reactos/kjk/null_output_iterator.h b/include/reactos/kjk/null_output_iterator.h similarity index 100% rename from reactos/include/reactos/kjk/null_output_iterator.h rename to include/reactos/kjk/null_output_iterator.h diff --git a/reactos/include/reactos/kjk/stringz_iterator.h b/include/reactos/kjk/stringz_iterator.h similarity index 100% rename from reactos/include/reactos/kjk/stringz_iterator.h rename to include/reactos/kjk/stringz_iterator.h diff --git a/reactos/include/reactos/ks386.inc b/include/reactos/ks386.inc similarity index 100% rename from reactos/include/reactos/ks386.inc rename to include/reactos/ks386.inc diff --git a/reactos/include/reactos/ksamd64.inc b/include/reactos/ksamd64.inc similarity index 100% rename from reactos/include/reactos/ksamd64.inc rename to include/reactos/ksamd64.inc diff --git a/reactos/include/reactos/libs/audiosrv/audiosrv.h b/include/reactos/libs/audiosrv/audiosrv.h similarity index 100% rename from reactos/include/reactos/libs/audiosrv/audiosrv.h rename to include/reactos/libs/audiosrv/audiosrv.h diff --git a/reactos/include/reactos/libs/cportlib/cportlib.h b/include/reactos/libs/cportlib/cportlib.h similarity index 100% rename from reactos/include/reactos/libs/cportlib/cportlib.h rename to include/reactos/libs/cportlib/cportlib.h diff --git a/reactos/include/reactos/libs/dhcp/rosdhcp_public.h b/include/reactos/libs/dhcp/rosdhcp_public.h similarity index 100% rename from reactos/include/reactos/libs/dhcp/rosdhcp_public.h rename to include/reactos/libs/dhcp/rosdhcp_public.h diff --git a/reactos/include/reactos/libs/epsapi/epsapi.h b/include/reactos/libs/epsapi/epsapi.h similarity index 100% rename from reactos/include/reactos/libs/epsapi/epsapi.h rename to include/reactos/libs/epsapi/epsapi.h diff --git a/reactos/include/reactos/libs/expat/expat.h b/include/reactos/libs/expat/expat.h similarity index 100% rename from reactos/include/reactos/libs/expat/expat.h rename to include/reactos/libs/expat/expat.h diff --git a/reactos/include/reactos/libs/expat/expat_external.h b/include/reactos/libs/expat/expat_external.h similarity index 100% rename from reactos/include/reactos/libs/expat/expat_external.h rename to include/reactos/libs/expat/expat_external.h diff --git a/reactos/include/reactos/libs/fmifs/fmifs.h b/include/reactos/libs/fmifs/fmifs.h similarity index 100% rename from reactos/include/reactos/libs/fmifs/fmifs.h rename to include/reactos/libs/fmifs/fmifs.h diff --git a/reactos/include/reactos/libs/fslib/ext2lib.h b/include/reactos/libs/fslib/ext2lib.h similarity index 100% rename from reactos/include/reactos/libs/fslib/ext2lib.h rename to include/reactos/libs/fslib/ext2lib.h diff --git a/reactos/include/reactos/libs/fslib/vfatlib.h b/include/reactos/libs/fslib/vfatlib.h similarity index 100% rename from reactos/include/reactos/libs/fslib/vfatlib.h rename to include/reactos/libs/fslib/vfatlib.h diff --git a/reactos/include/reactos/libs/fslib/vfatxlib.h b/include/reactos/libs/fslib/vfatxlib.h similarity index 100% rename from reactos/include/reactos/libs/fslib/vfatxlib.h rename to include/reactos/libs/fslib/vfatxlib.h diff --git a/reactos/include/reactos/libs/fullfat/fat.h b/include/reactos/libs/fullfat/fat.h similarity index 100% rename from reactos/include/reactos/libs/fullfat/fat.h rename to include/reactos/libs/fullfat/fat.h diff --git a/reactos/include/reactos/libs/fullfat/ff_blk.h b/include/reactos/libs/fullfat/ff_blk.h similarity index 100% rename from reactos/include/reactos/libs/fullfat/ff_blk.h rename to include/reactos/libs/fullfat/ff_blk.h diff --git a/reactos/include/reactos/libs/fullfat/ff_config.h b/include/reactos/libs/fullfat/ff_config.h similarity index 100% rename from reactos/include/reactos/libs/fullfat/ff_config.h rename to include/reactos/libs/fullfat/ff_config.h diff --git a/reactos/include/reactos/libs/fullfat/ff_crc.h b/include/reactos/libs/fullfat/ff_crc.h similarity index 100% rename from reactos/include/reactos/libs/fullfat/ff_crc.h rename to include/reactos/libs/fullfat/ff_crc.h diff --git a/reactos/include/reactos/libs/fullfat/ff_dir.h b/include/reactos/libs/fullfat/ff_dir.h similarity index 100% rename from reactos/include/reactos/libs/fullfat/ff_dir.h rename to include/reactos/libs/fullfat/ff_dir.h diff --git a/reactos/include/reactos/libs/fullfat/ff_error.h b/include/reactos/libs/fullfat/ff_error.h similarity index 100% rename from reactos/include/reactos/libs/fullfat/ff_error.h rename to include/reactos/libs/fullfat/ff_error.h diff --git a/reactos/include/reactos/libs/fullfat/ff_fat.h b/include/reactos/libs/fullfat/ff_fat.h similarity index 100% rename from reactos/include/reactos/libs/fullfat/ff_fat.h rename to include/reactos/libs/fullfat/ff_fat.h diff --git a/reactos/include/reactos/libs/fullfat/ff_fatdef.h b/include/reactos/libs/fullfat/ff_fatdef.h similarity index 100% rename from reactos/include/reactos/libs/fullfat/ff_fatdef.h rename to include/reactos/libs/fullfat/ff_fatdef.h diff --git a/reactos/include/reactos/libs/fullfat/ff_file.h b/include/reactos/libs/fullfat/ff_file.h similarity index 100% rename from reactos/include/reactos/libs/fullfat/ff_file.h rename to include/reactos/libs/fullfat/ff_file.h diff --git a/reactos/include/reactos/libs/fullfat/ff_format.h b/include/reactos/libs/fullfat/ff_format.h similarity index 100% rename from reactos/include/reactos/libs/fullfat/ff_format.h rename to include/reactos/libs/fullfat/ff_format.h diff --git a/reactos/include/reactos/libs/fullfat/ff_hash.h b/include/reactos/libs/fullfat/ff_hash.h similarity index 100% rename from reactos/include/reactos/libs/fullfat/ff_hash.h rename to include/reactos/libs/fullfat/ff_hash.h diff --git a/reactos/include/reactos/libs/fullfat/ff_ioman.h b/include/reactos/libs/fullfat/ff_ioman.h similarity index 100% rename from reactos/include/reactos/libs/fullfat/ff_ioman.h rename to include/reactos/libs/fullfat/ff_ioman.h diff --git a/reactos/include/reactos/libs/fullfat/ff_memory.h b/include/reactos/libs/fullfat/ff_memory.h similarity index 100% rename from reactos/include/reactos/libs/fullfat/ff_memory.h rename to include/reactos/libs/fullfat/ff_memory.h diff --git a/reactos/include/reactos/libs/fullfat/ff_safety.h b/include/reactos/libs/fullfat/ff_safety.h similarity index 100% rename from reactos/include/reactos/libs/fullfat/ff_safety.h rename to include/reactos/libs/fullfat/ff_safety.h diff --git a/reactos/include/reactos/libs/fullfat/ff_string.h b/include/reactos/libs/fullfat/ff_string.h similarity index 100% rename from reactos/include/reactos/libs/fullfat/ff_string.h rename to include/reactos/libs/fullfat/ff_string.h diff --git a/reactos/include/reactos/libs/fullfat/ff_time.h b/include/reactos/libs/fullfat/ff_time.h similarity index 100% rename from reactos/include/reactos/libs/fullfat/ff_time.h rename to include/reactos/libs/fullfat/ff_time.h diff --git a/reactos/include/reactos/libs/fullfat/ff_types.h b/include/reactos/libs/fullfat/ff_types.h similarity index 100% rename from reactos/include/reactos/libs/fullfat/ff_types.h rename to include/reactos/libs/fullfat/ff_types.h diff --git a/reactos/include/reactos/libs/fullfat/ff_unicode.h b/include/reactos/libs/fullfat/ff_unicode.h similarity index 100% rename from reactos/include/reactos/libs/fullfat/ff_unicode.h rename to include/reactos/libs/fullfat/ff_unicode.h diff --git a/reactos/include/reactos/libs/fullfat/fullfat.h b/include/reactos/libs/fullfat/fullfat.h similarity index 100% rename from reactos/include/reactos/libs/fullfat/fullfat.h rename to include/reactos/libs/fullfat/fullfat.h diff --git a/reactos/include/reactos/libs/libjpeg/cderror.h b/include/reactos/libs/libjpeg/cderror.h similarity index 100% rename from reactos/include/reactos/libs/libjpeg/cderror.h rename to include/reactos/libs/libjpeg/cderror.h diff --git a/reactos/include/reactos/libs/libjpeg/cdjpeg.h b/include/reactos/libs/libjpeg/cdjpeg.h similarity index 100% rename from reactos/include/reactos/libs/libjpeg/cdjpeg.h rename to include/reactos/libs/libjpeg/cdjpeg.h diff --git a/reactos/include/reactos/libs/libjpeg/jconfig.h b/include/reactos/libs/libjpeg/jconfig.h similarity index 100% rename from reactos/include/reactos/libs/libjpeg/jconfig.h rename to include/reactos/libs/libjpeg/jconfig.h diff --git a/reactos/include/reactos/libs/libjpeg/jdct.h b/include/reactos/libs/libjpeg/jdct.h similarity index 100% rename from reactos/include/reactos/libs/libjpeg/jdct.h rename to include/reactos/libs/libjpeg/jdct.h diff --git a/reactos/include/reactos/libs/libjpeg/jerror.h b/include/reactos/libs/libjpeg/jerror.h similarity index 100% rename from reactos/include/reactos/libs/libjpeg/jerror.h rename to include/reactos/libs/libjpeg/jerror.h diff --git a/reactos/include/reactos/libs/libjpeg/jinclude.h b/include/reactos/libs/libjpeg/jinclude.h similarity index 100% rename from reactos/include/reactos/libs/libjpeg/jinclude.h rename to include/reactos/libs/libjpeg/jinclude.h diff --git a/reactos/include/reactos/libs/libjpeg/jmemsys.h b/include/reactos/libs/libjpeg/jmemsys.h similarity index 100% rename from reactos/include/reactos/libs/libjpeg/jmemsys.h rename to include/reactos/libs/libjpeg/jmemsys.h diff --git a/reactos/include/reactos/libs/libjpeg/jmorecfg.h b/include/reactos/libs/libjpeg/jmorecfg.h similarity index 100% rename from reactos/include/reactos/libs/libjpeg/jmorecfg.h rename to include/reactos/libs/libjpeg/jmorecfg.h diff --git a/reactos/include/reactos/libs/libjpeg/jpegint.h b/include/reactos/libs/libjpeg/jpegint.h similarity index 100% rename from reactos/include/reactos/libs/libjpeg/jpegint.h rename to include/reactos/libs/libjpeg/jpegint.h diff --git a/reactos/include/reactos/libs/libjpeg/jpeglib.h b/include/reactos/libs/libjpeg/jpeglib.h similarity index 100% rename from reactos/include/reactos/libs/libjpeg/jpeglib.h rename to include/reactos/libs/libjpeg/jpeglib.h diff --git a/reactos/include/reactos/libs/libjpeg/jversion.h b/include/reactos/libs/libjpeg/jversion.h similarity index 100% rename from reactos/include/reactos/libs/libjpeg/jversion.h rename to include/reactos/libs/libjpeg/jversion.h diff --git a/reactos/include/reactos/libs/libjpeg/rosdiff.patch b/include/reactos/libs/libjpeg/rosdiff.patch similarity index 100% rename from reactos/include/reactos/libs/libjpeg/rosdiff.patch rename to include/reactos/libs/libjpeg/rosdiff.patch diff --git a/reactos/include/reactos/libs/libjpeg/transupp.h b/include/reactos/libs/libjpeg/transupp.h similarity index 100% rename from reactos/include/reactos/libs/libjpeg/transupp.h rename to include/reactos/libs/libjpeg/transupp.h diff --git a/reactos/include/reactos/libs/libmpg123/aligncheck.h b/include/reactos/libs/libmpg123/aligncheck.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/aligncheck.h rename to include/reactos/libs/libmpg123/aligncheck.h diff --git a/reactos/include/reactos/libs/libmpg123/compat.h b/include/reactos/libs/libmpg123/compat.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/compat.h rename to include/reactos/libs/libmpg123/compat.h diff --git a/reactos/include/reactos/libs/libmpg123/config.h b/include/reactos/libs/libmpg123/config.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/config.h rename to include/reactos/libs/libmpg123/config.h diff --git a/reactos/include/reactos/libs/libmpg123/debug.h b/include/reactos/libs/libmpg123/debug.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/debug.h rename to include/reactos/libs/libmpg123/debug.h diff --git a/reactos/include/reactos/libs/libmpg123/decode.h b/include/reactos/libs/libmpg123/decode.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/decode.h rename to include/reactos/libs/libmpg123/decode.h diff --git a/reactos/include/reactos/libs/libmpg123/dither.h b/include/reactos/libs/libmpg123/dither.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/dither.h rename to include/reactos/libs/libmpg123/dither.h diff --git a/reactos/include/reactos/libs/libmpg123/frame.h b/include/reactos/libs/libmpg123/frame.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/frame.h rename to include/reactos/libs/libmpg123/frame.h diff --git a/reactos/include/reactos/libs/libmpg123/getbits.h b/include/reactos/libs/libmpg123/getbits.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/getbits.h rename to include/reactos/libs/libmpg123/getbits.h diff --git a/reactos/include/reactos/libs/libmpg123/getcpuflags.h b/include/reactos/libs/libmpg123/getcpuflags.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/getcpuflags.h rename to include/reactos/libs/libmpg123/getcpuflags.h diff --git a/reactos/include/reactos/libs/libmpg123/huffman.h b/include/reactos/libs/libmpg123/huffman.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/huffman.h rename to include/reactos/libs/libmpg123/huffman.h diff --git a/reactos/include/reactos/libs/libmpg123/icy.h b/include/reactos/libs/libmpg123/icy.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/icy.h rename to include/reactos/libs/libmpg123/icy.h diff --git a/reactos/include/reactos/libs/libmpg123/icy2utf8.h b/include/reactos/libs/libmpg123/icy2utf8.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/icy2utf8.h rename to include/reactos/libs/libmpg123/icy2utf8.h diff --git a/reactos/include/reactos/libs/libmpg123/id3.h b/include/reactos/libs/libmpg123/id3.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/id3.h rename to include/reactos/libs/libmpg123/id3.h diff --git a/reactos/include/reactos/libs/libmpg123/index.h b/include/reactos/libs/libmpg123/index.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/index.h rename to include/reactos/libs/libmpg123/index.h diff --git a/reactos/include/reactos/libs/libmpg123/l12_integer_tables.h b/include/reactos/libs/libmpg123/l12_integer_tables.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/l12_integer_tables.h rename to include/reactos/libs/libmpg123/l12_integer_tables.h diff --git a/reactos/include/reactos/libs/libmpg123/l2tables.h b/include/reactos/libs/libmpg123/l2tables.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/l2tables.h rename to include/reactos/libs/libmpg123/l2tables.h diff --git a/reactos/include/reactos/libs/libmpg123/l3_integer_tables.h b/include/reactos/libs/libmpg123/l3_integer_tables.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/l3_integer_tables.h rename to include/reactos/libs/libmpg123/l3_integer_tables.h diff --git a/reactos/include/reactos/libs/libmpg123/mangle.h b/include/reactos/libs/libmpg123/mangle.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/mangle.h rename to include/reactos/libs/libmpg123/mangle.h diff --git a/reactos/include/reactos/libs/libmpg123/mpg123.h b/include/reactos/libs/libmpg123/mpg123.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/mpg123.h rename to include/reactos/libs/libmpg123/mpg123.h diff --git a/reactos/include/reactos/libs/libmpg123/mpg123lib_intern.h b/include/reactos/libs/libmpg123/mpg123lib_intern.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/mpg123lib_intern.h rename to include/reactos/libs/libmpg123/mpg123lib_intern.h diff --git a/reactos/include/reactos/libs/libmpg123/optimize.h b/include/reactos/libs/libmpg123/optimize.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/optimize.h rename to include/reactos/libs/libmpg123/optimize.h diff --git a/reactos/include/reactos/libs/libmpg123/parse.h b/include/reactos/libs/libmpg123/parse.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/parse.h rename to include/reactos/libs/libmpg123/parse.h diff --git a/reactos/include/reactos/libs/libmpg123/reader.h b/include/reactos/libs/libmpg123/reader.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/reader.h rename to include/reactos/libs/libmpg123/reader.h diff --git a/reactos/include/reactos/libs/libmpg123/sample.h b/include/reactos/libs/libmpg123/sample.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/sample.h rename to include/reactos/libs/libmpg123/sample.h diff --git a/reactos/include/reactos/libs/libmpg123/synth.h b/include/reactos/libs/libmpg123/synth.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/synth.h rename to include/reactos/libs/libmpg123/synth.h diff --git a/reactos/include/reactos/libs/libmpg123/synth_8bit.h b/include/reactos/libs/libmpg123/synth_8bit.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/synth_8bit.h rename to include/reactos/libs/libmpg123/synth_8bit.h diff --git a/reactos/include/reactos/libs/libmpg123/synth_mono.h b/include/reactos/libs/libmpg123/synth_mono.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/synth_mono.h rename to include/reactos/libs/libmpg123/synth_mono.h diff --git a/reactos/include/reactos/libs/libmpg123/synth_ntom.h b/include/reactos/libs/libmpg123/synth_ntom.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/synth_ntom.h rename to include/reactos/libs/libmpg123/synth_ntom.h diff --git a/reactos/include/reactos/libs/libmpg123/synth_sse3d.h b/include/reactos/libs/libmpg123/synth_sse3d.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/synth_sse3d.h rename to include/reactos/libs/libmpg123/synth_sse3d.h diff --git a/reactos/include/reactos/libs/libmpg123/synths.h b/include/reactos/libs/libmpg123/synths.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/synths.h rename to include/reactos/libs/libmpg123/synths.h diff --git a/reactos/include/reactos/libs/libmpg123/true.h b/include/reactos/libs/libmpg123/true.h similarity index 100% rename from reactos/include/reactos/libs/libmpg123/true.h rename to include/reactos/libs/libmpg123/true.h diff --git a/reactos/include/reactos/libs/libpng/png.h b/include/reactos/libs/libpng/png.h similarity index 100% rename from reactos/include/reactos/libs/libpng/png.h rename to include/reactos/libs/libpng/png.h diff --git a/reactos/include/reactos/libs/libpng/pngconf.h b/include/reactos/libs/libpng/pngconf.h similarity index 100% rename from reactos/include/reactos/libs/libpng/pngconf.h rename to include/reactos/libs/libpng/pngconf.h diff --git a/reactos/include/reactos/libs/libpng/pngdebug.h b/include/reactos/libs/libpng/pngdebug.h similarity index 100% rename from reactos/include/reactos/libs/libpng/pngdebug.h rename to include/reactos/libs/libpng/pngdebug.h diff --git a/reactos/include/reactos/libs/libpng/pnginfo.h b/include/reactos/libs/libpng/pnginfo.h similarity index 100% rename from reactos/include/reactos/libs/libpng/pnginfo.h rename to include/reactos/libs/libpng/pnginfo.h diff --git a/reactos/include/reactos/libs/libpng/pnglibconf.h b/include/reactos/libs/libpng/pnglibconf.h similarity index 100% rename from reactos/include/reactos/libs/libpng/pnglibconf.h rename to include/reactos/libs/libpng/pnglibconf.h diff --git a/reactos/include/reactos/libs/libpng/pngpriv.h b/include/reactos/libs/libpng/pngpriv.h similarity index 100% rename from reactos/include/reactos/libs/libpng/pngpriv.h rename to include/reactos/libs/libpng/pngpriv.h diff --git a/reactos/include/reactos/libs/libpng/pngstruct.h b/include/reactos/libs/libpng/pngstruct.h similarity index 100% rename from reactos/include/reactos/libs/libpng/pngstruct.h rename to include/reactos/libs/libpng/pngstruct.h diff --git a/reactos/include/reactos/libs/libtiff/rosdiff.patch b/include/reactos/libs/libtiff/rosdiff.patch similarity index 100% rename from reactos/include/reactos/libs/libtiff/rosdiff.patch rename to include/reactos/libs/libtiff/rosdiff.patch diff --git a/reactos/include/reactos/libs/libtiff/t4.h b/include/reactos/libs/libtiff/t4.h similarity index 100% rename from reactos/include/reactos/libs/libtiff/t4.h rename to include/reactos/libs/libtiff/t4.h diff --git a/reactos/include/reactos/libs/libtiff/tif_config.h b/include/reactos/libs/libtiff/tif_config.h similarity index 100% rename from reactos/include/reactos/libs/libtiff/tif_config.h rename to include/reactos/libs/libtiff/tif_config.h diff --git a/reactos/include/reactos/libs/libtiff/tif_config.vc.h b/include/reactos/libs/libtiff/tif_config.vc.h similarity index 100% rename from reactos/include/reactos/libs/libtiff/tif_config.vc.h rename to include/reactos/libs/libtiff/tif_config.vc.h diff --git a/reactos/include/reactos/libs/libtiff/tif_dir.h b/include/reactos/libs/libtiff/tif_dir.h similarity index 100% rename from reactos/include/reactos/libs/libtiff/tif_dir.h rename to include/reactos/libs/libtiff/tif_dir.h diff --git a/reactos/include/reactos/libs/libtiff/tif_fax3.h b/include/reactos/libs/libtiff/tif_fax3.h similarity index 100% rename from reactos/include/reactos/libs/libtiff/tif_fax3.h rename to include/reactos/libs/libtiff/tif_fax3.h diff --git a/reactos/include/reactos/libs/libtiff/tif_predict.h b/include/reactos/libs/libtiff/tif_predict.h similarity index 100% rename from reactos/include/reactos/libs/libtiff/tif_predict.h rename to include/reactos/libs/libtiff/tif_predict.h diff --git a/reactos/include/reactos/libs/libtiff/tiff.h b/include/reactos/libs/libtiff/tiff.h similarity index 100% rename from reactos/include/reactos/libs/libtiff/tiff.h rename to include/reactos/libs/libtiff/tiff.h diff --git a/reactos/include/reactos/libs/libtiff/tiffconf.h b/include/reactos/libs/libtiff/tiffconf.h similarity index 100% rename from reactos/include/reactos/libs/libtiff/tiffconf.h rename to include/reactos/libs/libtiff/tiffconf.h diff --git a/reactos/include/reactos/libs/libtiff/tiffconf.vc.h b/include/reactos/libs/libtiff/tiffconf.vc.h similarity index 100% rename from reactos/include/reactos/libs/libtiff/tiffconf.vc.h rename to include/reactos/libs/libtiff/tiffconf.vc.h diff --git a/reactos/include/reactos/libs/libtiff/tiffio.h b/include/reactos/libs/libtiff/tiffio.h similarity index 100% rename from reactos/include/reactos/libs/libtiff/tiffio.h rename to include/reactos/libs/libtiff/tiffio.h diff --git a/reactos/include/reactos/libs/libtiff/tiffio.hxx b/include/reactos/libs/libtiff/tiffio.hxx similarity index 100% rename from reactos/include/reactos/libs/libtiff/tiffio.hxx rename to include/reactos/libs/libtiff/tiffio.hxx diff --git a/reactos/include/reactos/libs/libtiff/tiffiop.h b/include/reactos/libs/libtiff/tiffiop.h similarity index 100% rename from reactos/include/reactos/libs/libtiff/tiffiop.h rename to include/reactos/libs/libtiff/tiffiop.h diff --git a/reactos/include/reactos/libs/libtiff/tiffvers.h b/include/reactos/libs/libtiff/tiffvers.h similarity index 100% rename from reactos/include/reactos/libs/libtiff/tiffvers.h rename to include/reactos/libs/libtiff/tiffvers.h diff --git a/reactos/include/reactos/libs/libtiff/uvcode.h b/include/reactos/libs/libtiff/uvcode.h similarity index 100% rename from reactos/include/reactos/libs/libtiff/uvcode.h rename to include/reactos/libs/libtiff/uvcode.h diff --git a/reactos/include/reactos/libs/libxml/DOCBparser.h b/include/reactos/libs/libxml/DOCBparser.h similarity index 100% rename from reactos/include/reactos/libs/libxml/DOCBparser.h rename to include/reactos/libs/libxml/DOCBparser.h diff --git a/reactos/include/reactos/libs/libxml/HTMLparser.h b/include/reactos/libs/libxml/HTMLparser.h similarity index 100% rename from reactos/include/reactos/libs/libxml/HTMLparser.h rename to include/reactos/libs/libxml/HTMLparser.h diff --git a/reactos/include/reactos/libs/libxml/HTMLtree.h b/include/reactos/libs/libxml/HTMLtree.h similarity index 100% rename from reactos/include/reactos/libs/libxml/HTMLtree.h rename to include/reactos/libs/libxml/HTMLtree.h diff --git a/reactos/include/reactos/libs/libxml/Makefile.am b/include/reactos/libs/libxml/Makefile.am similarity index 100% rename from reactos/include/reactos/libs/libxml/Makefile.am rename to include/reactos/libs/libxml/Makefile.am diff --git a/reactos/include/reactos/libs/libxml/Makefile.in b/include/reactos/libs/libxml/Makefile.in similarity index 100% rename from reactos/include/reactos/libs/libxml/Makefile.in rename to include/reactos/libs/libxml/Makefile.in diff --git a/reactos/include/reactos/libs/libxml/SAX.h b/include/reactos/libs/libxml/SAX.h similarity index 100% rename from reactos/include/reactos/libs/libxml/SAX.h rename to include/reactos/libs/libxml/SAX.h diff --git a/reactos/include/reactos/libs/libxml/SAX2.h b/include/reactos/libs/libxml/SAX2.h similarity index 100% rename from reactos/include/reactos/libs/libxml/SAX2.h rename to include/reactos/libs/libxml/SAX2.h diff --git a/reactos/include/reactos/libs/libxml/c14n.h b/include/reactos/libs/libxml/c14n.h similarity index 100% rename from reactos/include/reactos/libs/libxml/c14n.h rename to include/reactos/libs/libxml/c14n.h diff --git a/reactos/include/reactos/libs/libxml/catalog.h b/include/reactos/libs/libxml/catalog.h similarity index 100% rename from reactos/include/reactos/libs/libxml/catalog.h rename to include/reactos/libs/libxml/catalog.h diff --git a/reactos/include/reactos/libs/libxml/chvalid.h b/include/reactos/libs/libxml/chvalid.h similarity index 100% rename from reactos/include/reactos/libs/libxml/chvalid.h rename to include/reactos/libs/libxml/chvalid.h diff --git a/reactos/include/reactos/libs/libxml/debugXML.h b/include/reactos/libs/libxml/debugXML.h similarity index 100% rename from reactos/include/reactos/libs/libxml/debugXML.h rename to include/reactos/libs/libxml/debugXML.h diff --git a/reactos/include/reactos/libs/libxml/dict.h b/include/reactos/libs/libxml/dict.h similarity index 100% rename from reactos/include/reactos/libs/libxml/dict.h rename to include/reactos/libs/libxml/dict.h diff --git a/reactos/include/reactos/libs/libxml/encoding.h b/include/reactos/libs/libxml/encoding.h similarity index 100% rename from reactos/include/reactos/libs/libxml/encoding.h rename to include/reactos/libs/libxml/encoding.h diff --git a/reactos/include/reactos/libs/libxml/entities.h b/include/reactos/libs/libxml/entities.h similarity index 100% rename from reactos/include/reactos/libs/libxml/entities.h rename to include/reactos/libs/libxml/entities.h diff --git a/reactos/include/reactos/libs/libxml/globals.h b/include/reactos/libs/libxml/globals.h similarity index 100% rename from reactos/include/reactos/libs/libxml/globals.h rename to include/reactos/libs/libxml/globals.h diff --git a/reactos/include/reactos/libs/libxml/hash.h b/include/reactos/libs/libxml/hash.h similarity index 100% rename from reactos/include/reactos/libs/libxml/hash.h rename to include/reactos/libs/libxml/hash.h diff --git a/reactos/include/reactos/libs/libxml/list.h b/include/reactos/libs/libxml/list.h similarity index 100% rename from reactos/include/reactos/libs/libxml/list.h rename to include/reactos/libs/libxml/list.h diff --git a/reactos/include/reactos/libs/libxml/nanoftp.h b/include/reactos/libs/libxml/nanoftp.h similarity index 100% rename from reactos/include/reactos/libs/libxml/nanoftp.h rename to include/reactos/libs/libxml/nanoftp.h diff --git a/reactos/include/reactos/libs/libxml/nanohttp.h b/include/reactos/libs/libxml/nanohttp.h similarity index 100% rename from reactos/include/reactos/libs/libxml/nanohttp.h rename to include/reactos/libs/libxml/nanohttp.h diff --git a/reactos/include/reactos/libs/libxml/parser.h b/include/reactos/libs/libxml/parser.h similarity index 100% rename from reactos/include/reactos/libs/libxml/parser.h rename to include/reactos/libs/libxml/parser.h diff --git a/reactos/include/reactos/libs/libxml/parserInternals.h b/include/reactos/libs/libxml/parserInternals.h similarity index 100% rename from reactos/include/reactos/libs/libxml/parserInternals.h rename to include/reactos/libs/libxml/parserInternals.h diff --git a/reactos/include/reactos/libs/libxml/pattern.h b/include/reactos/libs/libxml/pattern.h similarity index 100% rename from reactos/include/reactos/libs/libxml/pattern.h rename to include/reactos/libs/libxml/pattern.h diff --git a/reactos/include/reactos/libs/libxml/relaxng.h b/include/reactos/libs/libxml/relaxng.h similarity index 100% rename from reactos/include/reactos/libs/libxml/relaxng.h rename to include/reactos/libs/libxml/relaxng.h diff --git a/reactos/include/reactos/libs/libxml/schemasInternals.h b/include/reactos/libs/libxml/schemasInternals.h similarity index 100% rename from reactos/include/reactos/libs/libxml/schemasInternals.h rename to include/reactos/libs/libxml/schemasInternals.h diff --git a/reactos/include/reactos/libs/libxml/schematron.h b/include/reactos/libs/libxml/schematron.h similarity index 100% rename from reactos/include/reactos/libs/libxml/schematron.h rename to include/reactos/libs/libxml/schematron.h diff --git a/reactos/include/reactos/libs/libxml/threads.h b/include/reactos/libs/libxml/threads.h similarity index 100% rename from reactos/include/reactos/libs/libxml/threads.h rename to include/reactos/libs/libxml/threads.h diff --git a/reactos/include/reactos/libs/libxml/tree.h b/include/reactos/libs/libxml/tree.h similarity index 100% rename from reactos/include/reactos/libs/libxml/tree.h rename to include/reactos/libs/libxml/tree.h diff --git a/reactos/include/reactos/libs/libxml/uri.h b/include/reactos/libs/libxml/uri.h similarity index 100% rename from reactos/include/reactos/libs/libxml/uri.h rename to include/reactos/libs/libxml/uri.h diff --git a/reactos/include/reactos/libs/libxml/valid.h b/include/reactos/libs/libxml/valid.h similarity index 100% rename from reactos/include/reactos/libs/libxml/valid.h rename to include/reactos/libs/libxml/valid.h diff --git a/reactos/include/reactos/libs/libxml/xinclude.h b/include/reactos/libs/libxml/xinclude.h similarity index 100% rename from reactos/include/reactos/libs/libxml/xinclude.h rename to include/reactos/libs/libxml/xinclude.h diff --git a/reactos/include/reactos/libs/libxml/xlink.h b/include/reactos/libs/libxml/xlink.h similarity index 100% rename from reactos/include/reactos/libs/libxml/xlink.h rename to include/reactos/libs/libxml/xlink.h diff --git a/reactos/include/reactos/libs/libxml/xmlIO.h b/include/reactos/libs/libxml/xmlIO.h similarity index 100% rename from reactos/include/reactos/libs/libxml/xmlIO.h rename to include/reactos/libs/libxml/xmlIO.h diff --git a/reactos/include/reactos/libs/libxml/xmlautomata.h b/include/reactos/libs/libxml/xmlautomata.h similarity index 100% rename from reactos/include/reactos/libs/libxml/xmlautomata.h rename to include/reactos/libs/libxml/xmlautomata.h diff --git a/reactos/include/reactos/libs/libxml/xmlerror.h b/include/reactos/libs/libxml/xmlerror.h similarity index 100% rename from reactos/include/reactos/libs/libxml/xmlerror.h rename to include/reactos/libs/libxml/xmlerror.h diff --git a/reactos/include/reactos/libs/libxml/xmlexports.h b/include/reactos/libs/libxml/xmlexports.h similarity index 100% rename from reactos/include/reactos/libs/libxml/xmlexports.h rename to include/reactos/libs/libxml/xmlexports.h diff --git a/reactos/include/reactos/libs/libxml/xmlmemory.h b/include/reactos/libs/libxml/xmlmemory.h similarity index 100% rename from reactos/include/reactos/libs/libxml/xmlmemory.h rename to include/reactos/libs/libxml/xmlmemory.h diff --git a/reactos/include/reactos/libs/libxml/xmlmodule.h b/include/reactos/libs/libxml/xmlmodule.h similarity index 100% rename from reactos/include/reactos/libs/libxml/xmlmodule.h rename to include/reactos/libs/libxml/xmlmodule.h diff --git a/reactos/include/reactos/libs/libxml/xmlreader.h b/include/reactos/libs/libxml/xmlreader.h similarity index 100% rename from reactos/include/reactos/libs/libxml/xmlreader.h rename to include/reactos/libs/libxml/xmlreader.h diff --git a/reactos/include/reactos/libs/libxml/xmlregexp.h b/include/reactos/libs/libxml/xmlregexp.h similarity index 100% rename from reactos/include/reactos/libs/libxml/xmlregexp.h rename to include/reactos/libs/libxml/xmlregexp.h diff --git a/reactos/include/reactos/libs/libxml/xmlsave.h b/include/reactos/libs/libxml/xmlsave.h similarity index 100% rename from reactos/include/reactos/libs/libxml/xmlsave.h rename to include/reactos/libs/libxml/xmlsave.h diff --git a/reactos/include/reactos/libs/libxml/xmlschemas.h b/include/reactos/libs/libxml/xmlschemas.h similarity index 100% rename from reactos/include/reactos/libs/libxml/xmlschemas.h rename to include/reactos/libs/libxml/xmlschemas.h diff --git a/reactos/include/reactos/libs/libxml/xmlschemastypes.h b/include/reactos/libs/libxml/xmlschemastypes.h similarity index 100% rename from reactos/include/reactos/libs/libxml/xmlschemastypes.h rename to include/reactos/libs/libxml/xmlschemastypes.h diff --git a/reactos/include/reactos/libs/libxml/xmlstring.h b/include/reactos/libs/libxml/xmlstring.h similarity index 100% rename from reactos/include/reactos/libs/libxml/xmlstring.h rename to include/reactos/libs/libxml/xmlstring.h diff --git a/reactos/include/reactos/libs/libxml/xmlunicode.h b/include/reactos/libs/libxml/xmlunicode.h similarity index 100% rename from reactos/include/reactos/libs/libxml/xmlunicode.h rename to include/reactos/libs/libxml/xmlunicode.h diff --git a/reactos/include/reactos/libs/libxml/xmlversion.h b/include/reactos/libs/libxml/xmlversion.h similarity index 100% rename from reactos/include/reactos/libs/libxml/xmlversion.h rename to include/reactos/libs/libxml/xmlversion.h diff --git a/reactos/include/reactos/libs/libxml/xmlversion.h.in b/include/reactos/libs/libxml/xmlversion.h.in similarity index 100% rename from reactos/include/reactos/libs/libxml/xmlversion.h.in rename to include/reactos/libs/libxml/xmlversion.h.in diff --git a/reactos/include/reactos/libs/libxml/xmlwriter.h b/include/reactos/libs/libxml/xmlwriter.h similarity index 100% rename from reactos/include/reactos/libs/libxml/xmlwriter.h rename to include/reactos/libs/libxml/xmlwriter.h diff --git a/reactos/include/reactos/libs/libxml/xpath.h b/include/reactos/libs/libxml/xpath.h similarity index 100% rename from reactos/include/reactos/libs/libxml/xpath.h rename to include/reactos/libs/libxml/xpath.h diff --git a/reactos/include/reactos/libs/libxml/xpathInternals.h b/include/reactos/libs/libxml/xpathInternals.h similarity index 100% rename from reactos/include/reactos/libs/libxml/xpathInternals.h rename to include/reactos/libs/libxml/xpathInternals.h diff --git a/reactos/include/reactos/libs/libxml/xpointer.h b/include/reactos/libs/libxml/xpointer.h similarity index 100% rename from reactos/include/reactos/libs/libxml/xpointer.h rename to include/reactos/libs/libxml/xpointer.h diff --git a/reactos/include/reactos/libs/libxslt/extensions.h b/include/reactos/libs/libxslt/extensions.h similarity index 100% rename from reactos/include/reactos/libs/libxslt/extensions.h rename to include/reactos/libs/libxslt/extensions.h diff --git a/reactos/include/reactos/libs/libxslt/libxslt.h b/include/reactos/libs/libxslt/libxslt.h similarity index 100% rename from reactos/include/reactos/libs/libxslt/libxslt.h rename to include/reactos/libs/libxslt/libxslt.h diff --git a/reactos/include/reactos/libs/libxslt/numbersInternals.h b/include/reactos/libs/libxslt/numbersInternals.h similarity index 100% rename from reactos/include/reactos/libs/libxslt/numbersInternals.h rename to include/reactos/libs/libxslt/numbersInternals.h diff --git a/reactos/include/reactos/libs/libxslt/pattern.h b/include/reactos/libs/libxslt/pattern.h similarity index 100% rename from reactos/include/reactos/libs/libxslt/pattern.h rename to include/reactos/libs/libxslt/pattern.h diff --git a/reactos/include/reactos/libs/libxslt/transform.h b/include/reactos/libs/libxslt/transform.h similarity index 100% rename from reactos/include/reactos/libs/libxslt/transform.h rename to include/reactos/libs/libxslt/transform.h diff --git a/reactos/include/reactos/libs/libxslt/xslt.h b/include/reactos/libs/libxslt/xslt.h similarity index 100% rename from reactos/include/reactos/libs/libxslt/xslt.h rename to include/reactos/libs/libxslt/xslt.h diff --git a/reactos/include/reactos/libs/libxslt/xsltInternals.h b/include/reactos/libs/libxslt/xsltInternals.h similarity index 100% rename from reactos/include/reactos/libs/libxslt/xsltInternals.h rename to include/reactos/libs/libxslt/xsltInternals.h diff --git a/reactos/include/reactos/libs/libxslt/xsltconfig.h b/include/reactos/libs/libxslt/xsltconfig.h similarity index 100% rename from reactos/include/reactos/libs/libxslt/xsltconfig.h rename to include/reactos/libs/libxslt/xsltconfig.h diff --git a/reactos/include/reactos/libs/libxslt/xsltexports.h b/include/reactos/libs/libxslt/xsltexports.h similarity index 100% rename from reactos/include/reactos/libs/libxslt/xsltexports.h rename to include/reactos/libs/libxslt/xsltexports.h diff --git a/reactos/include/reactos/libs/libxslt/xsltlocale.h b/include/reactos/libs/libxslt/xsltlocale.h similarity index 100% rename from reactos/include/reactos/libs/libxslt/xsltlocale.h rename to include/reactos/libs/libxslt/xsltlocale.h diff --git a/reactos/include/reactos/libs/libxslt/xsltutils.h b/include/reactos/libs/libxslt/xsltutils.h similarity index 100% rename from reactos/include/reactos/libs/libxslt/xsltutils.h rename to include/reactos/libs/libxslt/xsltutils.h diff --git a/reactos/include/reactos/libs/ppcmmu/mmu.h b/include/reactos/libs/ppcmmu/mmu.h similarity index 100% rename from reactos/include/reactos/libs/ppcmmu/mmu.h rename to include/reactos/libs/ppcmmu/mmu.h diff --git a/reactos/include/reactos/libs/ppcmmu/mmuutil.h b/include/reactos/libs/ppcmmu/mmuutil.h similarity index 100% rename from reactos/include/reactos/libs/ppcmmu/mmuutil.h rename to include/reactos/libs/ppcmmu/mmuutil.h diff --git a/reactos/include/reactos/libs/pseh/excpt.h b/include/reactos/libs/pseh/excpt.h similarity index 100% rename from reactos/include/reactos/libs/pseh/excpt.h rename to include/reactos/libs/pseh/excpt.h diff --git a/reactos/include/reactos/libs/pseh/framebased.h b/include/reactos/libs/pseh/framebased.h similarity index 100% rename from reactos/include/reactos/libs/pseh/framebased.h rename to include/reactos/libs/pseh/framebased.h diff --git a/reactos/include/reactos/libs/pseh/framebased/internal.h b/include/reactos/libs/pseh/framebased/internal.h similarity index 100% rename from reactos/include/reactos/libs/pseh/framebased/internal.h rename to include/reactos/libs/pseh/framebased/internal.h diff --git a/reactos/include/reactos/libs/pseh/pseh.h b/include/reactos/libs/pseh/pseh.h similarity index 100% rename from reactos/include/reactos/libs/pseh/pseh.h rename to include/reactos/libs/pseh/pseh.h diff --git a/reactos/include/reactos/libs/pseh/pseh2.h b/include/reactos/libs/pseh/pseh2.h similarity index 100% rename from reactos/include/reactos/libs/pseh/pseh2.h rename to include/reactos/libs/pseh/pseh2.h diff --git a/reactos/include/reactos/libs/pseh/pseh2_64.h b/include/reactos/libs/pseh/pseh2_64.h similarity index 100% rename from reactos/include/reactos/libs/pseh/pseh2_64.h rename to include/reactos/libs/pseh/pseh2_64.h diff --git a/reactos/include/reactos/libs/samlib/samlib.h b/include/reactos/libs/samlib/samlib.h similarity index 100% rename from reactos/include/reactos/libs/samlib/samlib.h rename to include/reactos/libs/samlib/samlib.h diff --git a/reactos/include/reactos/libs/sound/devname.h b/include/reactos/libs/sound/devname.h similarity index 100% rename from reactos/include/reactos/libs/sound/devname.h rename to include/reactos/libs/sound/devname.h diff --git a/reactos/include/reactos/libs/sound/hardware.h b/include/reactos/libs/sound/hardware.h similarity index 100% rename from reactos/include/reactos/libs/sound/hardware.h rename to include/reactos/libs/sound/hardware.h diff --git a/reactos/include/reactos/libs/sound/midi.h b/include/reactos/libs/sound/midi.h similarity index 100% rename from reactos/include/reactos/libs/sound/midi.h rename to include/reactos/libs/sound/midi.h diff --git a/reactos/include/reactos/libs/sound/midiuart.h b/include/reactos/libs/sound/midiuart.h similarity index 100% rename from reactos/include/reactos/libs/sound/midiuart.h rename to include/reactos/libs/sound/midiuart.h diff --git a/reactos/include/reactos/libs/sound/mmebuddy.h b/include/reactos/libs/sound/mmebuddy.h similarity index 100% rename from reactos/include/reactos/libs/sound/mmebuddy.h rename to include/reactos/libs/sound/mmebuddy.h diff --git a/reactos/include/reactos/libs/sound/mment4.h b/include/reactos/libs/sound/mment4.h similarity index 100% rename from reactos/include/reactos/libs/sound/mment4.h rename to include/reactos/libs/sound/mment4.h diff --git a/reactos/include/reactos/libs/sound/sbdsp.h b/include/reactos/libs/sound/sbdsp.h similarity index 100% rename from reactos/include/reactos/libs/sound/sbdsp.h rename to include/reactos/libs/sound/sbdsp.h diff --git a/reactos/include/reactos/libs/sound/sndnames.h b/include/reactos/libs/sound/sndnames.h similarity index 100% rename from reactos/include/reactos/libs/sound/sndnames.h rename to include/reactos/libs/sound/sndnames.h diff --git a/reactos/include/reactos/libs/sound/sndtypes.h b/include/reactos/libs/sound/sndtypes.h similarity index 100% rename from reactos/include/reactos/libs/sound/sndtypes.h rename to include/reactos/libs/sound/sndtypes.h diff --git a/reactos/include/reactos/libs/sound/time.h b/include/reactos/libs/sound/time.h similarity index 100% rename from reactos/include/reactos/libs/sound/time.h rename to include/reactos/libs/sound/time.h diff --git a/reactos/include/reactos/libs/syssetup/syssetup.h b/include/reactos/libs/syssetup/syssetup.h similarity index 100% rename from reactos/include/reactos/libs/syssetup/syssetup.h rename to include/reactos/libs/syssetup/syssetup.h diff --git a/reactos/include/reactos/libs/umpnpmgr/sysguid.h b/include/reactos/libs/umpnpmgr/sysguid.h similarity index 100% rename from reactos/include/reactos/libs/umpnpmgr/sysguid.h rename to include/reactos/libs/umpnpmgr/sysguid.h diff --git a/reactos/include/reactos/libs/zlib/crc32.h b/include/reactos/libs/zlib/crc32.h similarity index 100% rename from reactos/include/reactos/libs/zlib/crc32.h rename to include/reactos/libs/zlib/crc32.h diff --git a/reactos/include/reactos/libs/zlib/deflate.h b/include/reactos/libs/zlib/deflate.h similarity index 100% rename from reactos/include/reactos/libs/zlib/deflate.h rename to include/reactos/libs/zlib/deflate.h diff --git a/reactos/include/reactos/libs/zlib/gzguts.h b/include/reactos/libs/zlib/gzguts.h similarity index 100% rename from reactos/include/reactos/libs/zlib/gzguts.h rename to include/reactos/libs/zlib/gzguts.h diff --git a/reactos/include/reactos/libs/zlib/inffast.h b/include/reactos/libs/zlib/inffast.h similarity index 100% rename from reactos/include/reactos/libs/zlib/inffast.h rename to include/reactos/libs/zlib/inffast.h diff --git a/reactos/include/reactos/libs/zlib/inffixed.h b/include/reactos/libs/zlib/inffixed.h similarity index 100% rename from reactos/include/reactos/libs/zlib/inffixed.h rename to include/reactos/libs/zlib/inffixed.h diff --git a/reactos/include/reactos/libs/zlib/inflate.h b/include/reactos/libs/zlib/inflate.h similarity index 100% rename from reactos/include/reactos/libs/zlib/inflate.h rename to include/reactos/libs/zlib/inflate.h diff --git a/reactos/include/reactos/libs/zlib/inftrees.h b/include/reactos/libs/zlib/inftrees.h similarity index 100% rename from reactos/include/reactos/libs/zlib/inftrees.h rename to include/reactos/libs/zlib/inftrees.h diff --git a/reactos/include/reactos/libs/zlib/trees.h b/include/reactos/libs/zlib/trees.h similarity index 100% rename from reactos/include/reactos/libs/zlib/trees.h rename to include/reactos/libs/zlib/trees.h diff --git a/reactos/include/reactos/libs/zlib/zconf.h b/include/reactos/libs/zlib/zconf.h similarity index 100% rename from reactos/include/reactos/libs/zlib/zconf.h rename to include/reactos/libs/zlib/zconf.h diff --git a/reactos/include/reactos/libs/zlib/zlib.h b/include/reactos/libs/zlib/zlib.h similarity index 100% rename from reactos/include/reactos/libs/zlib/zlib.h rename to include/reactos/libs/zlib/zlib.h diff --git a/reactos/include/reactos/libs/zlib/zutil.h b/include/reactos/libs/zlib/zutil.h similarity index 100% rename from reactos/include/reactos/libs/zlib/zutil.h rename to include/reactos/libs/zlib/zutil.h diff --git a/reactos/include/reactos/mc/CMakeLists.txt b/include/reactos/mc/CMakeLists.txt similarity index 100% rename from reactos/include/reactos/mc/CMakeLists.txt rename to include/reactos/mc/CMakeLists.txt diff --git a/reactos/include/reactos/mc/bugcodes.mc b/include/reactos/mc/bugcodes.mc similarity index 100% rename from reactos/include/reactos/mc/bugcodes.mc rename to include/reactos/mc/bugcodes.mc diff --git a/reactos/include/reactos/mc/errcodes.mc b/include/reactos/mc/errcodes.mc similarity index 100% rename from reactos/include/reactos/mc/errcodes.mc rename to include/reactos/mc/errcodes.mc diff --git a/reactos/include/reactos/mc/mc.rbuild b/include/reactos/mc/mc.rbuild similarity index 100% rename from reactos/include/reactos/mc/mc.rbuild rename to include/reactos/mc/mc.rbuild diff --git a/reactos/include/reactos/mc/neteventmsg.mc b/include/reactos/mc/neteventmsg.mc similarity index 100% rename from reactos/include/reactos/mc/neteventmsg.mc rename to include/reactos/mc/neteventmsg.mc diff --git a/reactos/include/reactos/mc/ntiologc.mc b/include/reactos/mc/ntiologc.mc similarity index 100% rename from reactos/include/reactos/mc/ntiologc.mc rename to include/reactos/mc/ntiologc.mc diff --git a/reactos/include/reactos/mc/ntstatus.mc b/include/reactos/mc/ntstatus.mc similarity index 100% rename from reactos/include/reactos/mc/ntstatus.mc rename to include/reactos/mc/ntstatus.mc diff --git a/reactos/include/reactos/mc/pciclass.mc b/include/reactos/mc/pciclass.mc similarity index 100% rename from reactos/include/reactos/mc/pciclass.mc rename to include/reactos/mc/pciclass.mc diff --git a/reactos/include/reactos/mc/sacmsg.mc b/include/reactos/mc/sacmsg.mc similarity index 100% rename from reactos/include/reactos/mc/sacmsg.mc rename to include/reactos/mc/sacmsg.mc diff --git a/reactos/include/reactos/mingw-w64/internal.h b/include/reactos/mingw-w64/internal.h similarity index 100% rename from reactos/include/reactos/mingw-w64/internal.h rename to include/reactos/mingw-w64/internal.h diff --git a/reactos/include/reactos/mingw-w64/oscalls.h b/include/reactos/mingw-w64/oscalls.h similarity index 100% rename from reactos/include/reactos/mingw-w64/oscalls.h rename to include/reactos/mingw-w64/oscalls.h diff --git a/reactos/include/reactos/mingw-w64/sect_attribs.h b/include/reactos/mingw-w64/sect_attribs.h similarity index 100% rename from reactos/include/reactos/mingw-w64/sect_attribs.h rename to include/reactos/mingw-w64/sect_attribs.h diff --git a/reactos/include/reactos/msvctarget.h b/include/reactos/msvctarget.h similarity index 100% rename from reactos/include/reactos/msvctarget.h rename to include/reactos/msvctarget.h diff --git a/reactos/include/reactos/probe.h b/include/reactos/probe.h similarity index 100% rename from reactos/include/reactos/probe.h rename to include/reactos/probe.h diff --git a/reactos/include/reactos/reactos.rbuild b/include/reactos/reactos.rbuild similarity index 100% rename from reactos/include/reactos/reactos.rbuild rename to include/reactos/reactos.rbuild diff --git a/reactos/include/reactos/reactx.h b/include/reactos/reactx.h similarity index 100% rename from reactos/include/reactos/reactx.h rename to include/reactos/reactx.h diff --git a/reactos/include/reactos/rosioctl.h b/include/reactos/rosioctl.h similarity index 100% rename from reactos/include/reactos/rosioctl.h rename to include/reactos/rosioctl.h diff --git a/reactos/include/reactos/rosldr.h b/include/reactos/rosldr.h similarity index 100% rename from reactos/include/reactos/rosldr.h rename to include/reactos/rosldr.h diff --git a/reactos/include/reactos/rossym.h b/include/reactos/rossym.h similarity index 100% rename from reactos/include/reactos/rossym.h rename to include/reactos/rossym.h diff --git a/reactos/include/reactos/services/services.h b/include/reactos/services/services.h similarity index 100% rename from reactos/include/reactos/services/services.h rename to include/reactos/services/services.h diff --git a/reactos/include/reactos/stubs.h b/include/reactos/stubs.h similarity index 100% rename from reactos/include/reactos/stubs.h rename to include/reactos/stubs.h diff --git a/reactos/include/reactos/subsys/csr/server.h b/include/reactos/subsys/csr/server.h similarity index 100% rename from reactos/include/reactos/subsys/csr/server.h rename to include/reactos/subsys/csr/server.h diff --git a/reactos/include/reactos/subsys/csrss/csrss.h b/include/reactos/subsys/csrss/csrss.h similarity index 100% rename from reactos/include/reactos/subsys/csrss/csrss.h rename to include/reactos/subsys/csrss/csrss.h diff --git a/reactos/include/reactos/subsys/lsass/lsasrv.h b/include/reactos/subsys/lsass/lsasrv.h similarity index 100% rename from reactos/include/reactos/subsys/lsass/lsasrv.h rename to include/reactos/subsys/lsass/lsasrv.h diff --git a/reactos/include/reactos/subsys/lsass/lsass.h b/include/reactos/subsys/lsass/lsass.h similarity index 100% rename from reactos/include/reactos/subsys/lsass/lsass.h rename to include/reactos/subsys/lsass/lsass.h diff --git a/reactos/include/reactos/subsys/sm/api.h b/include/reactos/subsys/sm/api.h similarity index 100% rename from reactos/include/reactos/subsys/sm/api.h rename to include/reactos/subsys/sm/api.h diff --git a/reactos/include/reactos/subsys/sm/helper.h b/include/reactos/subsys/sm/helper.h similarity index 100% rename from reactos/include/reactos/subsys/sm/helper.h rename to include/reactos/subsys/sm/helper.h diff --git a/reactos/include/reactos/subsys/sm/ns.h b/include/reactos/subsys/sm/ns.h similarity index 100% rename from reactos/include/reactos/subsys/sm/ns.h rename to include/reactos/subsys/sm/ns.h diff --git a/reactos/include/reactos/subsys/win/base.h b/include/reactos/subsys/win/base.h similarity index 100% rename from reactos/include/reactos/subsys/win/base.h rename to include/reactos/subsys/win/base.h diff --git a/reactos/include/reactos/subsys/win/windows.h b/include/reactos/subsys/win/windows.h similarity index 100% rename from reactos/include/reactos/subsys/win/windows.h rename to include/reactos/subsys/win/windows.h diff --git a/reactos/include/reactos/syscalls.inc b/include/reactos/syscalls.inc similarity index 100% rename from reactos/include/reactos/syscalls.inc rename to include/reactos/syscalls.inc diff --git a/reactos/include/reactos/undocuser.h b/include/reactos/undocuser.h similarity index 100% rename from reactos/include/reactos/undocuser.h rename to include/reactos/undocuser.h diff --git a/reactos/include/reactos/uxundoc.h b/include/reactos/uxundoc.h similarity index 100% rename from reactos/include/reactos/uxundoc.h rename to include/reactos/uxundoc.h diff --git a/reactos/include/reactos/version.cmake b/include/reactos/version.cmake similarity index 100% rename from reactos/include/reactos/version.cmake rename to include/reactos/version.cmake diff --git a/reactos/include/reactos/version.h b/include/reactos/version.h similarity index 100% rename from reactos/include/reactos/version.h rename to include/reactos/version.h diff --git a/reactos/include/reactos/version.h.cmake b/include/reactos/version.h.cmake similarity index 100% rename from reactos/include/reactos/version.h.cmake rename to include/reactos/version.h.cmake diff --git a/reactos/include/reactos/version.rc b/include/reactos/version.rc similarity index 100% rename from reactos/include/reactos/version.rc rename to include/reactos/version.rc diff --git a/reactos/include/reactos/win32k/callback.h b/include/reactos/win32k/callback.h similarity index 100% rename from reactos/include/reactos/win32k/callback.h rename to include/reactos/win32k/callback.h diff --git a/reactos/include/reactos/win32k/ntgdibad.h b/include/reactos/win32k/ntgdibad.h similarity index 100% rename from reactos/include/reactos/win32k/ntgdibad.h rename to include/reactos/win32k/ntgdibad.h diff --git a/reactos/include/reactos/win32k/ntgdihdl.h b/include/reactos/win32k/ntgdihdl.h similarity index 100% rename from reactos/include/reactos/win32k/ntgdihdl.h rename to include/reactos/win32k/ntgdihdl.h diff --git a/reactos/include/reactos/win32k/ntgdityp.h b/include/reactos/win32k/ntgdityp.h similarity index 100% rename from reactos/include/reactos/win32k/ntgdityp.h rename to include/reactos/win32k/ntgdityp.h diff --git a/reactos/include/reactos/win32k/ntuser.h b/include/reactos/win32k/ntuser.h similarity index 100% rename from reactos/include/reactos/win32k/ntuser.h rename to include/reactos/win32k/ntuser.h diff --git a/reactos/include/reactos/win32k/ntusrtyp.h b/include/reactos/win32k/ntusrtyp.h similarity index 100% rename from reactos/include/reactos/win32k/ntusrtyp.h rename to include/reactos/win32k/ntusrtyp.h diff --git a/reactos/include/reactos/windbgkd.h b/include/reactos/windbgkd.h similarity index 100% rename from reactos/include/reactos/windbgkd.h rename to include/reactos/windbgkd.h diff --git a/reactos/include/reactos/wine/CMakeLists.txt b/include/reactos/wine/CMakeLists.txt similarity index 100% rename from reactos/include/reactos/wine/CMakeLists.txt rename to include/reactos/wine/CMakeLists.txt diff --git a/reactos/include/reactos/wine/alloca.h b/include/reactos/wine/alloca.h similarity index 100% rename from reactos/include/reactos/wine/alloca.h rename to include/reactos/wine/alloca.h diff --git a/reactos/include/reactos/wine/commctrl.h b/include/reactos/wine/commctrl.h similarity index 100% rename from reactos/include/reactos/wine/commctrl.h rename to include/reactos/wine/commctrl.h diff --git a/reactos/include/reactos/wine/config.h b/include/reactos/wine/config.h similarity index 100% rename from reactos/include/reactos/wine/config.h rename to include/reactos/wine/config.h diff --git a/reactos/include/reactos/wine/dcetypes.idl b/include/reactos/wine/dcetypes.idl similarity index 100% rename from reactos/include/reactos/wine/dcetypes.idl rename to include/reactos/wine/dcetypes.idl diff --git a/reactos/include/reactos/wine/ddk/compstui.h b/include/reactos/wine/ddk/compstui.h similarity index 100% rename from reactos/include/reactos/wine/ddk/compstui.h rename to include/reactos/wine/ddk/compstui.h diff --git a/reactos/include/reactos/wine/ddk/imm.h b/include/reactos/wine/ddk/imm.h similarity index 100% rename from reactos/include/reactos/wine/ddk/imm.h rename to include/reactos/wine/ddk/imm.h diff --git a/reactos/include/reactos/wine/ddk/winddiui.h b/include/reactos/wine/ddk/winddiui.h similarity index 100% rename from reactos/include/reactos/wine/ddk/winddiui.h rename to include/reactos/wine/ddk/winddiui.h diff --git a/reactos/include/reactos/wine/ddk/winsplp.h b/include/reactos/wine/ddk/winsplp.h similarity index 100% rename from reactos/include/reactos/wine/ddk/winsplp.h rename to include/reactos/wine/ddk/winsplp.h diff --git a/reactos/include/reactos/wine/debug.h b/include/reactos/wine/debug.h similarity index 100% rename from reactos/include/reactos/wine/debug.h rename to include/reactos/wine/debug.h diff --git a/reactos/include/reactos/wine/epm.idl b/include/reactos/wine/epm.idl similarity index 100% rename from reactos/include/reactos/wine/epm.idl rename to include/reactos/wine/epm.idl diff --git a/reactos/include/reactos/wine/exception.h b/include/reactos/wine/exception.h similarity index 100% rename from reactos/include/reactos/wine/exception.h rename to include/reactos/wine/exception.h diff --git a/reactos/include/reactos/wine/guiddef.h b/include/reactos/wine/guiddef.h similarity index 100% rename from reactos/include/reactos/wine/guiddef.h rename to include/reactos/wine/guiddef.h diff --git a/reactos/include/reactos/wine/imm.h b/include/reactos/wine/imm.h similarity index 100% rename from reactos/include/reactos/wine/imm.h rename to include/reactos/wine/imm.h diff --git a/reactos/include/reactos/wine/irot.idl b/include/reactos/wine/irot.idl similarity index 100% rename from reactos/include/reactos/wine/irot.idl rename to include/reactos/wine/irot.idl diff --git a/reactos/include/reactos/wine/itss.idl b/include/reactos/wine/itss.idl similarity index 100% rename from reactos/include/reactos/wine/itss.idl rename to include/reactos/wine/itss.idl diff --git a/reactos/include/reactos/wine/library.h b/include/reactos/wine/library.h similarity index 100% rename from reactos/include/reactos/wine/library.h rename to include/reactos/wine/library.h diff --git a/reactos/include/reactos/wine/list.h b/include/reactos/wine/list.h similarity index 100% rename from reactos/include/reactos/wine/list.h rename to include/reactos/wine/list.h diff --git a/reactos/include/reactos/wine/lmbrowsr.h b/include/reactos/wine/lmbrowsr.h similarity index 100% rename from reactos/include/reactos/wine/lmbrowsr.h rename to include/reactos/wine/lmbrowsr.h diff --git a/reactos/include/reactos/wine/math.h b/include/reactos/wine/math.h similarity index 100% rename from reactos/include/reactos/wine/math.h rename to include/reactos/wine/math.h diff --git a/reactos/include/reactos/wine/mmreg.h b/include/reactos/wine/mmreg.h similarity index 100% rename from reactos/include/reactos/wine/mmreg.h rename to include/reactos/wine/mmreg.h diff --git a/reactos/include/reactos/wine/msacmdrv.h b/include/reactos/wine/msacmdrv.h similarity index 100% rename from reactos/include/reactos/wine/msacmdrv.h rename to include/reactos/wine/msacmdrv.h diff --git a/reactos/include/reactos/wine/mscvpdb.h b/include/reactos/wine/mscvpdb.h similarity index 100% rename from reactos/include/reactos/wine/mscvpdb.h rename to include/reactos/wine/mscvpdb.h diff --git a/reactos/include/reactos/wine/msvcrt/fcntl.h b/include/reactos/wine/msvcrt/fcntl.h similarity index 100% rename from reactos/include/reactos/wine/msvcrt/fcntl.h rename to include/reactos/wine/msvcrt/fcntl.h diff --git a/reactos/include/reactos/wine/port.h b/include/reactos/wine/port.h similarity index 100% rename from reactos/include/reactos/wine/port.h rename to include/reactos/wine/port.h diff --git a/reactos/include/reactos/wine/rbtree.h b/include/reactos/wine/rbtree.h similarity index 100% rename from reactos/include/reactos/wine/rbtree.h rename to include/reactos/wine/rbtree.h diff --git a/reactos/include/reactos/wine/regex.h b/include/reactos/wine/regex.h similarity index 100% rename from reactos/include/reactos/wine/regex.h rename to include/reactos/wine/regex.h diff --git a/reactos/include/reactos/wine/rpcfc.h b/include/reactos/wine/rpcfc.h similarity index 100% rename from reactos/include/reactos/wine/rpcfc.h rename to include/reactos/wine/rpcfc.h diff --git a/reactos/include/reactos/wine/rpcss_shared.h b/include/reactos/wine/rpcss_shared.h similarity index 100% rename from reactos/include/reactos/wine/rpcss_shared.h rename to include/reactos/wine/rpcss_shared.h diff --git a/reactos/include/reactos/wine/test.h b/include/reactos/wine/test.h similarity index 100% rename from reactos/include/reactos/wine/test.h rename to include/reactos/wine/test.h diff --git a/reactos/include/reactos/wine/typeof.h b/include/reactos/wine/typeof.h similarity index 100% rename from reactos/include/reactos/wine/typeof.h rename to include/reactos/wine/typeof.h diff --git a/reactos/include/reactos/wine/unicode.h b/include/reactos/wine/unicode.h similarity index 100% rename from reactos/include/reactos/wine/unicode.h rename to include/reactos/wine/unicode.h diff --git a/reactos/include/reactos/wine/winbase16.h b/include/reactos/wine/winbase16.h similarity index 100% rename from reactos/include/reactos/wine/winbase16.h rename to include/reactos/wine/winbase16.h diff --git a/reactos/include/reactos/wine/windef16.h b/include/reactos/wine/windef16.h similarity index 100% rename from reactos/include/reactos/wine/windef16.h rename to include/reactos/wine/windef16.h diff --git a/reactos/include/reactos/wine/wine_common_ver.rc b/include/reactos/wine/wine_common_ver.rc similarity index 100% rename from reactos/include/reactos/wine/wine_common_ver.rc rename to include/reactos/wine/wine_common_ver.rc diff --git a/reactos/include/reactos/wine/wined3d.h b/include/reactos/wine/wined3d.h similarity index 100% rename from reactos/include/reactos/wine/wined3d.h rename to include/reactos/wine/wined3d.h diff --git a/reactos/include/reactos/wine/wineheaders.rbuild b/include/reactos/wine/wineheaders.rbuild similarity index 100% rename from reactos/include/reactos/wine/wineheaders.rbuild rename to include/reactos/wine/wineheaders.rbuild diff --git a/reactos/include/reactos/wine/wingdi16.h b/include/reactos/wine/wingdi16.h similarity index 100% rename from reactos/include/reactos/wine/wingdi16.h rename to include/reactos/wine/wingdi16.h diff --git a/reactos/include/reactos/wine/winsock16.h b/include/reactos/wine/winsock16.h similarity index 100% rename from reactos/include/reactos/wine/winsock16.h rename to include/reactos/wine/winsock16.h diff --git a/reactos/include/reactos/wine/wownt32.h b/include/reactos/wine/wownt32.h similarity index 100% rename from reactos/include/reactos/wine/wownt32.h rename to include/reactos/wine/wownt32.h diff --git a/reactos/include/reactos/wine/wpp.h b/include/reactos/wine/wpp.h similarity index 100% rename from reactos/include/reactos/wine/wpp.h rename to include/reactos/wine/wpp.h diff --git a/reactos/include/reactos/winlogon.h b/include/reactos/winlogon.h similarity index 100% rename from reactos/include/reactos/winlogon.h rename to include/reactos/winlogon.h diff --git a/reactos/include/reactos/winsock/msafd.h b/include/reactos/winsock/msafd.h similarity index 100% rename from reactos/include/reactos/winsock/msafd.h rename to include/reactos/winsock/msafd.h diff --git a/reactos/include/reactos/winsock/msafdlib.h b/include/reactos/winsock/msafdlib.h similarity index 100% rename from reactos/include/reactos/winsock/msafdlib.h rename to include/reactos/winsock/msafdlib.h diff --git a/reactos/include/reactos/winsock/mswinsock.h b/include/reactos/winsock/mswinsock.h similarity index 100% rename from reactos/include/reactos/winsock/mswinsock.h rename to include/reactos/winsock/mswinsock.h diff --git a/reactos/include/reactos/winsock/nsp_dns.h b/include/reactos/winsock/nsp_dns.h similarity index 100% rename from reactos/include/reactos/winsock/nsp_dns.h rename to include/reactos/winsock/nsp_dns.h diff --git a/reactos/include/reactos/winsock/rnr20lib.h b/include/reactos/winsock/rnr20lib.h similarity index 100% rename from reactos/include/reactos/winsock/rnr20lib.h rename to include/reactos/winsock/rnr20lib.h diff --git a/reactos/include/reactos/winsock/ws2help.h b/include/reactos/winsock/ws2help.h similarity index 100% rename from reactos/include/reactos/winsock/ws2help.h rename to include/reactos/winsock/ws2help.h diff --git a/reactos/include/reactos/winsock/wsmobile.h b/include/reactos/winsock/wsmobile.h similarity index 100% rename from reactos/include/reactos/winsock/wsmobile.h rename to include/reactos/winsock/wsmobile.h diff --git a/reactos/include/xdk/amd64/ke.h b/include/xdk/amd64/ke.h similarity index 100% rename from reactos/include/xdk/amd64/ke.h rename to include/xdk/amd64/ke.h diff --git a/reactos/include/xdk/amd64/mm.h b/include/xdk/amd64/mm.h similarity index 100% rename from reactos/include/xdk/amd64/mm.h rename to include/xdk/amd64/mm.h diff --git a/reactos/include/xdk/arm/ke.h b/include/xdk/arm/ke.h similarity index 100% rename from reactos/include/xdk/arm/ke.h rename to include/xdk/arm/ke.h diff --git a/reactos/include/xdk/ccfuncs.h b/include/xdk/ccfuncs.h similarity index 100% rename from reactos/include/xdk/ccfuncs.h rename to include/xdk/ccfuncs.h diff --git a/reactos/include/xdk/cctypes.h b/include/xdk/cctypes.h similarity index 100% rename from reactos/include/xdk/cctypes.h rename to include/xdk/cctypes.h diff --git a/reactos/include/xdk/cmfuncs.h b/include/xdk/cmfuncs.h similarity index 100% rename from reactos/include/xdk/cmfuncs.h rename to include/xdk/cmfuncs.h diff --git a/reactos/include/xdk/cmtypes.h b/include/xdk/cmtypes.h similarity index 100% rename from reactos/include/xdk/cmtypes.h rename to include/xdk/cmtypes.h diff --git a/reactos/include/xdk/devioctl.template.h b/include/xdk/devioctl.template.h similarity index 100% rename from reactos/include/xdk/devioctl.template.h rename to include/xdk/devioctl.template.h diff --git a/reactos/include/xdk/exfuncs.h b/include/xdk/exfuncs.h similarity index 100% rename from reactos/include/xdk/exfuncs.h rename to include/xdk/exfuncs.h diff --git a/reactos/include/xdk/extypes.h b/include/xdk/extypes.h similarity index 100% rename from reactos/include/xdk/extypes.h rename to include/xdk/extypes.h diff --git a/reactos/include/xdk/fsrtlfuncs.h b/include/xdk/fsrtlfuncs.h similarity index 100% rename from reactos/include/xdk/fsrtlfuncs.h rename to include/xdk/fsrtlfuncs.h diff --git a/reactos/include/xdk/fsrtltypes.h b/include/xdk/fsrtltypes.h similarity index 100% rename from reactos/include/xdk/fsrtltypes.h rename to include/xdk/fsrtltypes.h diff --git a/reactos/include/xdk/generate.bat b/include/xdk/generate.bat similarity index 100% rename from reactos/include/xdk/generate.bat rename to include/xdk/generate.bat diff --git a/reactos/include/xdk/halfuncs.h b/include/xdk/halfuncs.h similarity index 100% rename from reactos/include/xdk/halfuncs.h rename to include/xdk/halfuncs.h diff --git a/reactos/include/xdk/haltypes.h b/include/xdk/haltypes.h similarity index 100% rename from reactos/include/xdk/haltypes.h rename to include/xdk/haltypes.h diff --git a/reactos/include/xdk/ia64/ke.h b/include/xdk/ia64/ke.h similarity index 100% rename from reactos/include/xdk/ia64/ke.h rename to include/xdk/ia64/ke.h diff --git a/reactos/include/xdk/interlocked.h b/include/xdk/interlocked.h similarity index 100% rename from reactos/include/xdk/interlocked.h rename to include/xdk/interlocked.h diff --git a/reactos/include/xdk/iofuncs.h b/include/xdk/iofuncs.h similarity index 100% rename from reactos/include/xdk/iofuncs.h rename to include/xdk/iofuncs.h diff --git a/reactos/include/xdk/iotypes.h b/include/xdk/iotypes.h similarity index 100% rename from reactos/include/xdk/iotypes.h rename to include/xdk/iotypes.h diff --git a/reactos/include/xdk/kdfuncs.h b/include/xdk/kdfuncs.h similarity index 100% rename from reactos/include/xdk/kdfuncs.h rename to include/xdk/kdfuncs.h diff --git a/reactos/include/xdk/kdtypes.h b/include/xdk/kdtypes.h similarity index 100% rename from reactos/include/xdk/kdtypes.h rename to include/xdk/kdtypes.h diff --git a/reactos/include/xdk/kefuncs.h b/include/xdk/kefuncs.h similarity index 100% rename from reactos/include/xdk/kefuncs.h rename to include/xdk/kefuncs.h diff --git a/reactos/include/xdk/ketypes.h b/include/xdk/ketypes.h similarity index 100% rename from reactos/include/xdk/ketypes.h rename to include/xdk/ketypes.h diff --git a/reactos/include/xdk/mips/ke.h b/include/xdk/mips/ke.h similarity index 100% rename from reactos/include/xdk/mips/ke.h rename to include/xdk/mips/ke.h diff --git a/reactos/include/xdk/mmfuncs.h b/include/xdk/mmfuncs.h similarity index 100% rename from reactos/include/xdk/mmfuncs.h rename to include/xdk/mmfuncs.h diff --git a/reactos/include/xdk/mmtypes.h b/include/xdk/mmtypes.h similarity index 100% rename from reactos/include/xdk/mmtypes.h rename to include/xdk/mmtypes.h diff --git a/reactos/include/xdk/ntddk.template.h b/include/xdk/ntddk.template.h similarity index 100% rename from reactos/include/xdk/ntddk.template.h rename to include/xdk/ntddk.template.h diff --git a/reactos/include/xdk/ntifs.template.h b/include/xdk/ntifs.template.h similarity index 100% rename from reactos/include/xdk/ntifs.template.h rename to include/xdk/ntifs.template.h diff --git a/reactos/include/xdk/nttmapi.h b/include/xdk/nttmapi.h similarity index 100% rename from reactos/include/xdk/nttmapi.h rename to include/xdk/nttmapi.h diff --git a/reactos/include/xdk/obfuncs.h b/include/xdk/obfuncs.h similarity index 100% rename from reactos/include/xdk/obfuncs.h rename to include/xdk/obfuncs.h diff --git a/reactos/include/xdk/obtypes.h b/include/xdk/obtypes.h similarity index 100% rename from reactos/include/xdk/obtypes.h rename to include/xdk/obtypes.h diff --git a/reactos/include/xdk/pofuncs.h b/include/xdk/pofuncs.h similarity index 100% rename from reactos/include/xdk/pofuncs.h rename to include/xdk/pofuncs.h diff --git a/reactos/include/xdk/potypes.h b/include/xdk/potypes.h similarity index 100% rename from reactos/include/xdk/potypes.h rename to include/xdk/potypes.h diff --git a/reactos/include/xdk/ppc/ke.h b/include/xdk/ppc/ke.h similarity index 100% rename from reactos/include/xdk/ppc/ke.h rename to include/xdk/ppc/ke.h diff --git a/reactos/include/xdk/psfuncs.h b/include/xdk/psfuncs.h similarity index 100% rename from reactos/include/xdk/psfuncs.h rename to include/xdk/psfuncs.h diff --git a/reactos/include/xdk/pstypes.h b/include/xdk/pstypes.h similarity index 100% rename from reactos/include/xdk/pstypes.h rename to include/xdk/pstypes.h diff --git a/reactos/include/xdk/rtlfuncs.h b/include/xdk/rtlfuncs.h similarity index 100% rename from reactos/include/xdk/rtlfuncs.h rename to include/xdk/rtlfuncs.h diff --git a/reactos/include/xdk/rtltypes.h b/include/xdk/rtltypes.h similarity index 100% rename from reactos/include/xdk/rtltypes.h rename to include/xdk/rtltypes.h diff --git a/reactos/include/xdk/sefuncs.h b/include/xdk/sefuncs.h similarity index 100% rename from reactos/include/xdk/sefuncs.h rename to include/xdk/sefuncs.h diff --git a/reactos/include/xdk/setypes.h b/include/xdk/setypes.h similarity index 100% rename from reactos/include/xdk/setypes.h rename to include/xdk/setypes.h diff --git a/reactos/include/xdk/wdm.template.h b/include/xdk/wdm.template.h similarity index 100% rename from reactos/include/xdk/wdm.template.h rename to include/xdk/wdm.template.h diff --git a/reactos/include/xdk/wmifuncs.h b/include/xdk/wmifuncs.h similarity index 100% rename from reactos/include/xdk/wmifuncs.h rename to include/xdk/wmifuncs.h diff --git a/reactos/include/xdk/wmitypes.h b/include/xdk/wmitypes.h similarity index 100% rename from reactos/include/xdk/wmitypes.h rename to include/xdk/wmitypes.h diff --git a/reactos/include/xdk/x86/ke.h b/include/xdk/x86/ke.h similarity index 100% rename from reactos/include/xdk/x86/ke.h rename to include/xdk/x86/ke.h diff --git a/reactos/include/xdk/x86/mm.h b/include/xdk/x86/mm.h similarity index 100% rename from reactos/include/xdk/x86/mm.h rename to include/xdk/x86/mm.h diff --git a/reactos/include/xdk/zwfuncs.h b/include/xdk/zwfuncs.h similarity index 100% rename from reactos/include/xdk/zwfuncs.h rename to include/xdk/zwfuncs.h diff --git a/reactos/lib/3rdparty/3rdparty.rbuild b/lib/3rdparty/3rdparty.rbuild similarity index 100% rename from reactos/lib/3rdparty/3rdparty.rbuild rename to lib/3rdparty/3rdparty.rbuild diff --git a/reactos/lib/3rdparty/CMakeLists.txt b/lib/3rdparty/CMakeLists.txt similarity index 100% rename from reactos/lib/3rdparty/CMakeLists.txt rename to lib/3rdparty/CMakeLists.txt diff --git a/reactos/lib/3rdparty/adns/CMakeLists.txt b/lib/3rdparty/adns/CMakeLists.txt similarity index 100% rename from reactos/lib/3rdparty/adns/CMakeLists.txt rename to lib/3rdparty/adns/CMakeLists.txt diff --git a/reactos/lib/3rdparty/adns/COPYING b/lib/3rdparty/adns/COPYING similarity index 100% rename from reactos/lib/3rdparty/adns/COPYING rename to lib/3rdparty/adns/COPYING diff --git a/reactos/lib/3rdparty/adns/GPL-vs-LGPL b/lib/3rdparty/adns/GPL-vs-LGPL similarity index 100% rename from reactos/lib/3rdparty/adns/GPL-vs-LGPL rename to lib/3rdparty/adns/GPL-vs-LGPL diff --git a/reactos/lib/3rdparty/adns/INSTALL b/lib/3rdparty/adns/INSTALL similarity index 100% rename from reactos/lib/3rdparty/adns/INSTALL rename to lib/3rdparty/adns/INSTALL diff --git a/reactos/lib/3rdparty/adns/Makefile.in b/lib/3rdparty/adns/Makefile.in similarity index 100% rename from reactos/lib/3rdparty/adns/Makefile.in rename to lib/3rdparty/adns/Makefile.in diff --git a/reactos/lib/3rdparty/adns/README b/lib/3rdparty/adns/README similarity index 100% rename from reactos/lib/3rdparty/adns/README rename to lib/3rdparty/adns/README diff --git a/reactos/lib/3rdparty/adns/README.html b/lib/3rdparty/adns/README.html similarity index 100% rename from reactos/lib/3rdparty/adns/README.html rename to lib/3rdparty/adns/README.html diff --git a/reactos/lib/3rdparty/adns/TODO b/lib/3rdparty/adns/TODO similarity index 100% rename from reactos/lib/3rdparty/adns/TODO rename to lib/3rdparty/adns/TODO diff --git a/reactos/lib/3rdparty/adns/acconfig.h b/lib/3rdparty/adns/acconfig.h similarity index 100% rename from reactos/lib/3rdparty/adns/acconfig.h rename to lib/3rdparty/adns/acconfig.h diff --git a/reactos/lib/3rdparty/adns/aclocal.m4 b/lib/3rdparty/adns/aclocal.m4 similarity index 100% rename from reactos/lib/3rdparty/adns/aclocal.m4 rename to lib/3rdparty/adns/aclocal.m4 diff --git a/reactos/lib/3rdparty/adns/adns.rbuild b/lib/3rdparty/adns/adns.rbuild similarity index 100% rename from reactos/lib/3rdparty/adns/adns.rbuild rename to lib/3rdparty/adns/adns.rbuild diff --git a/reactos/lib/3rdparty/adns/adns_win32/README.TXT b/lib/3rdparty/adns/adns_win32/README.TXT similarity index 100% rename from reactos/lib/3rdparty/adns/adns_win32/README.TXT rename to lib/3rdparty/adns/adns_win32/README.TXT diff --git a/reactos/lib/3rdparty/adns/adns_win32/adns_unix_calls.c b/lib/3rdparty/adns/adns_win32/adns_unix_calls.c similarity index 100% rename from reactos/lib/3rdparty/adns/adns_win32/adns_unix_calls.c rename to lib/3rdparty/adns/adns_win32/adns_unix_calls.c diff --git a/reactos/lib/3rdparty/adns/adns_win32/adns_win32.h b/lib/3rdparty/adns/adns_win32/adns_win32.h similarity index 100% rename from reactos/lib/3rdparty/adns/adns_win32/adns_win32.h rename to lib/3rdparty/adns/adns_win32/adns_win32.h diff --git a/reactos/lib/3rdparty/adns/adns_win32/getopt.c b/lib/3rdparty/adns/adns_win32/getopt.c similarity index 100% rename from reactos/lib/3rdparty/adns/adns_win32/getopt.c rename to lib/3rdparty/adns/adns_win32/getopt.c diff --git a/reactos/lib/3rdparty/adns/adns_win32/getopt.h b/lib/3rdparty/adns/adns_win32/getopt.h similarity index 100% rename from reactos/lib/3rdparty/adns/adns_win32/getopt.h rename to lib/3rdparty/adns/adns_win32/getopt.h diff --git a/reactos/lib/3rdparty/adns/adns_win32/timercmp.h b/lib/3rdparty/adns/adns_win32/timercmp.h similarity index 100% rename from reactos/lib/3rdparty/adns/adns_win32/timercmp.h rename to lib/3rdparty/adns/adns_win32/timercmp.h diff --git a/reactos/lib/3rdparty/adns/changelog b/lib/3rdparty/adns/changelog similarity index 100% rename from reactos/lib/3rdparty/adns/changelog rename to lib/3rdparty/adns/changelog diff --git a/reactos/lib/3rdparty/adns/client/Makefile.in b/lib/3rdparty/adns/client/Makefile.in similarity index 100% rename from reactos/lib/3rdparty/adns/client/Makefile.in rename to lib/3rdparty/adns/client/Makefile.in diff --git a/reactos/lib/3rdparty/adns/client/adh-main.c b/lib/3rdparty/adns/client/adh-main.c similarity index 100% rename from reactos/lib/3rdparty/adns/client/adh-main.c rename to lib/3rdparty/adns/client/adh-main.c diff --git a/reactos/lib/3rdparty/adns/client/adh-opts.c b/lib/3rdparty/adns/client/adh-opts.c similarity index 100% rename from reactos/lib/3rdparty/adns/client/adh-opts.c rename to lib/3rdparty/adns/client/adh-opts.c diff --git a/reactos/lib/3rdparty/adns/client/adh-query.c b/lib/3rdparty/adns/client/adh-query.c similarity index 100% rename from reactos/lib/3rdparty/adns/client/adh-query.c rename to lib/3rdparty/adns/client/adh-query.c diff --git a/reactos/lib/3rdparty/adns/client/adnshost.h b/lib/3rdparty/adns/client/adnshost.h similarity index 100% rename from reactos/lib/3rdparty/adns/client/adnshost.h rename to lib/3rdparty/adns/client/adnshost.h diff --git a/reactos/lib/3rdparty/adns/client/adnslogres.c b/lib/3rdparty/adns/client/adnslogres.c similarity index 100% rename from reactos/lib/3rdparty/adns/client/adnslogres.c rename to lib/3rdparty/adns/client/adnslogres.c diff --git a/reactos/lib/3rdparty/adns/client/adnsresfilter.c b/lib/3rdparty/adns/client/adnsresfilter.c similarity index 100% rename from reactos/lib/3rdparty/adns/client/adnsresfilter.c rename to lib/3rdparty/adns/client/adnsresfilter.c diff --git a/reactos/lib/3rdparty/adns/client/adnstest.c b/lib/3rdparty/adns/client/adnstest.c similarity index 100% rename from reactos/lib/3rdparty/adns/client/adnstest.c rename to lib/3rdparty/adns/client/adnstest.c diff --git a/reactos/lib/3rdparty/adns/client/client.h b/lib/3rdparty/adns/client/client.h similarity index 100% rename from reactos/lib/3rdparty/adns/client/client.h rename to lib/3rdparty/adns/client/client.h diff --git a/reactos/lib/3rdparty/adns/client/fanftest.c b/lib/3rdparty/adns/client/fanftest.c similarity index 100% rename from reactos/lib/3rdparty/adns/client/fanftest.c rename to lib/3rdparty/adns/client/fanftest.c diff --git a/reactos/lib/3rdparty/adns/configure.in b/lib/3rdparty/adns/configure.in similarity index 100% rename from reactos/lib/3rdparty/adns/configure.in rename to lib/3rdparty/adns/configure.in diff --git a/reactos/lib/3rdparty/adns/dynamic/Makefile.in b/lib/3rdparty/adns/dynamic/Makefile.in similarity index 100% rename from reactos/lib/3rdparty/adns/dynamic/Makefile.in rename to lib/3rdparty/adns/dynamic/Makefile.in diff --git a/reactos/lib/3rdparty/adns/install-sh b/lib/3rdparty/adns/install-sh similarity index 100% rename from reactos/lib/3rdparty/adns/install-sh rename to lib/3rdparty/adns/install-sh diff --git a/reactos/lib/3rdparty/adns/settings.make.in b/lib/3rdparty/adns/settings.make.in similarity index 100% rename from reactos/lib/3rdparty/adns/settings.make.in rename to lib/3rdparty/adns/settings.make.in diff --git a/reactos/lib/3rdparty/adns/src/Makefile.in b/lib/3rdparty/adns/src/Makefile.in similarity index 100% rename from reactos/lib/3rdparty/adns/src/Makefile.in rename to lib/3rdparty/adns/src/Makefile.in diff --git a/reactos/lib/3rdparty/adns/src/adns.h b/lib/3rdparty/adns/src/adns.h similarity index 100% rename from reactos/lib/3rdparty/adns/src/adns.h rename to lib/3rdparty/adns/src/adns.h diff --git a/reactos/lib/3rdparty/adns/src/adns.make b/lib/3rdparty/adns/src/adns.make similarity index 100% rename from reactos/lib/3rdparty/adns/src/adns.make rename to lib/3rdparty/adns/src/adns.make diff --git a/reactos/lib/3rdparty/adns/src/check.c b/lib/3rdparty/adns/src/check.c similarity index 100% rename from reactos/lib/3rdparty/adns/src/check.c rename to lib/3rdparty/adns/src/check.c diff --git a/reactos/lib/3rdparty/adns/src/config.h b/lib/3rdparty/adns/src/config.h similarity index 100% rename from reactos/lib/3rdparty/adns/src/config.h rename to lib/3rdparty/adns/src/config.h diff --git a/reactos/lib/3rdparty/adns/src/config.h.in b/lib/3rdparty/adns/src/config.h.in similarity index 100% rename from reactos/lib/3rdparty/adns/src/config.h.in rename to lib/3rdparty/adns/src/config.h.in diff --git a/reactos/lib/3rdparty/adns/src/dlist.h b/lib/3rdparty/adns/src/dlist.h similarity index 100% rename from reactos/lib/3rdparty/adns/src/dlist.h rename to lib/3rdparty/adns/src/dlist.h diff --git a/reactos/lib/3rdparty/adns/src/event.c b/lib/3rdparty/adns/src/event.c similarity index 100% rename from reactos/lib/3rdparty/adns/src/event.c rename to lib/3rdparty/adns/src/event.c diff --git a/reactos/lib/3rdparty/adns/src/general.c b/lib/3rdparty/adns/src/general.c similarity index 100% rename from reactos/lib/3rdparty/adns/src/general.c rename to lib/3rdparty/adns/src/general.c diff --git a/reactos/lib/3rdparty/adns/src/internal.h b/lib/3rdparty/adns/src/internal.h similarity index 100% rename from reactos/lib/3rdparty/adns/src/internal.h rename to lib/3rdparty/adns/src/internal.h diff --git a/reactos/lib/3rdparty/adns/src/parse.c b/lib/3rdparty/adns/src/parse.c similarity index 100% rename from reactos/lib/3rdparty/adns/src/parse.c rename to lib/3rdparty/adns/src/parse.c diff --git a/reactos/lib/3rdparty/adns/src/poll.c b/lib/3rdparty/adns/src/poll.c similarity index 100% rename from reactos/lib/3rdparty/adns/src/poll.c rename to lib/3rdparty/adns/src/poll.c diff --git a/reactos/lib/3rdparty/adns/src/query.c b/lib/3rdparty/adns/src/query.c similarity index 100% rename from reactos/lib/3rdparty/adns/src/query.c rename to lib/3rdparty/adns/src/query.c diff --git a/reactos/lib/3rdparty/adns/src/reply.c b/lib/3rdparty/adns/src/reply.c similarity index 100% rename from reactos/lib/3rdparty/adns/src/reply.c rename to lib/3rdparty/adns/src/reply.c diff --git a/reactos/lib/3rdparty/adns/src/setup.c b/lib/3rdparty/adns/src/setup.c similarity index 100% rename from reactos/lib/3rdparty/adns/src/setup.c rename to lib/3rdparty/adns/src/setup.c diff --git a/reactos/lib/3rdparty/adns/src/transmit.c b/lib/3rdparty/adns/src/transmit.c similarity index 100% rename from reactos/lib/3rdparty/adns/src/transmit.c rename to lib/3rdparty/adns/src/transmit.c diff --git a/reactos/lib/3rdparty/adns/src/tvarith.h b/lib/3rdparty/adns/src/tvarith.h similarity index 100% rename from reactos/lib/3rdparty/adns/src/tvarith.h rename to lib/3rdparty/adns/src/tvarith.h diff --git a/reactos/lib/3rdparty/adns/src/types.c b/lib/3rdparty/adns/src/types.c similarity index 100% rename from reactos/lib/3rdparty/adns/src/types.c rename to lib/3rdparty/adns/src/types.c diff --git a/reactos/lib/3rdparty/bzip2/CHANGES b/lib/3rdparty/bzip2/CHANGES similarity index 100% rename from reactos/lib/3rdparty/bzip2/CHANGES rename to lib/3rdparty/bzip2/CHANGES diff --git a/reactos/lib/3rdparty/bzip2/CMakeLists.txt b/lib/3rdparty/bzip2/CMakeLists.txt similarity index 100% rename from reactos/lib/3rdparty/bzip2/CMakeLists.txt rename to lib/3rdparty/bzip2/CMakeLists.txt diff --git a/reactos/lib/3rdparty/bzip2/LICENSE b/lib/3rdparty/bzip2/LICENSE similarity index 100% rename from reactos/lib/3rdparty/bzip2/LICENSE rename to lib/3rdparty/bzip2/LICENSE diff --git a/reactos/lib/3rdparty/bzip2/Makefile-libbz2_so b/lib/3rdparty/bzip2/Makefile-libbz2_so similarity index 100% rename from reactos/lib/3rdparty/bzip2/Makefile-libbz2_so rename to lib/3rdparty/bzip2/Makefile-libbz2_so diff --git a/reactos/lib/3rdparty/bzip2/README b/lib/3rdparty/bzip2/README similarity index 100% rename from reactos/lib/3rdparty/bzip2/README rename to lib/3rdparty/bzip2/README diff --git a/reactos/lib/3rdparty/bzip2/README.COMPILATION.PROBLEMS b/lib/3rdparty/bzip2/README.COMPILATION.PROBLEMS similarity index 100% rename from reactos/lib/3rdparty/bzip2/README.COMPILATION.PROBLEMS rename to lib/3rdparty/bzip2/README.COMPILATION.PROBLEMS diff --git a/reactos/lib/3rdparty/bzip2/README.reactos b/lib/3rdparty/bzip2/README.reactos similarity index 100% rename from reactos/lib/3rdparty/bzip2/README.reactos rename to lib/3rdparty/bzip2/README.reactos diff --git a/reactos/lib/3rdparty/bzip2/Y2K_INFO b/lib/3rdparty/bzip2/Y2K_INFO similarity index 100% rename from reactos/lib/3rdparty/bzip2/Y2K_INFO rename to lib/3rdparty/bzip2/Y2K_INFO diff --git a/reactos/lib/3rdparty/bzip2/blocksort.c b/lib/3rdparty/bzip2/blocksort.c similarity index 100% rename from reactos/lib/3rdparty/bzip2/blocksort.c rename to lib/3rdparty/bzip2/blocksort.c diff --git a/reactos/lib/3rdparty/bzip2/bzip2.1 b/lib/3rdparty/bzip2/bzip2.1 similarity index 100% rename from reactos/lib/3rdparty/bzip2/bzip2.1 rename to lib/3rdparty/bzip2/bzip2.1 diff --git a/reactos/lib/3rdparty/bzip2/bzip2.1.preformatted b/lib/3rdparty/bzip2/bzip2.1.preformatted similarity index 100% rename from reactos/lib/3rdparty/bzip2/bzip2.1.preformatted rename to lib/3rdparty/bzip2/bzip2.1.preformatted diff --git a/reactos/lib/3rdparty/bzip2/bzip2.c b/lib/3rdparty/bzip2/bzip2.c similarity index 100% rename from reactos/lib/3rdparty/bzip2/bzip2.c rename to lib/3rdparty/bzip2/bzip2.c diff --git a/reactos/lib/3rdparty/bzip2/bzip2.rbuild b/lib/3rdparty/bzip2/bzip2.rbuild similarity index 100% rename from reactos/lib/3rdparty/bzip2/bzip2.rbuild rename to lib/3rdparty/bzip2/bzip2.rbuild diff --git a/reactos/lib/3rdparty/bzip2/bzip2.txt b/lib/3rdparty/bzip2/bzip2.txt similarity index 100% rename from reactos/lib/3rdparty/bzip2/bzip2.txt rename to lib/3rdparty/bzip2/bzip2.txt diff --git a/reactos/lib/3rdparty/bzip2/bzip2recover.c b/lib/3rdparty/bzip2/bzip2recover.c similarity index 100% rename from reactos/lib/3rdparty/bzip2/bzip2recover.c rename to lib/3rdparty/bzip2/bzip2recover.c diff --git a/reactos/lib/3rdparty/bzip2/bzlib.c b/lib/3rdparty/bzip2/bzlib.c similarity index 100% rename from reactos/lib/3rdparty/bzip2/bzlib.c rename to lib/3rdparty/bzip2/bzlib.c diff --git a/reactos/lib/3rdparty/bzip2/bzlib.h b/lib/3rdparty/bzip2/bzlib.h similarity index 100% rename from reactos/lib/3rdparty/bzip2/bzlib.h rename to lib/3rdparty/bzip2/bzlib.h diff --git a/reactos/lib/3rdparty/bzip2/bzlib_private.h b/lib/3rdparty/bzip2/bzlib_private.h similarity index 100% rename from reactos/lib/3rdparty/bzip2/bzlib_private.h rename to lib/3rdparty/bzip2/bzlib_private.h diff --git a/reactos/lib/3rdparty/bzip2/compress.c b/lib/3rdparty/bzip2/compress.c similarity index 100% rename from reactos/lib/3rdparty/bzip2/compress.c rename to lib/3rdparty/bzip2/compress.c diff --git a/reactos/lib/3rdparty/bzip2/crctable.c b/lib/3rdparty/bzip2/crctable.c similarity index 100% rename from reactos/lib/3rdparty/bzip2/crctable.c rename to lib/3rdparty/bzip2/crctable.c diff --git a/reactos/lib/3rdparty/bzip2/decompress.c b/lib/3rdparty/bzip2/decompress.c similarity index 100% rename from reactos/lib/3rdparty/bzip2/decompress.c rename to lib/3rdparty/bzip2/decompress.c diff --git a/reactos/lib/3rdparty/bzip2/dllmain.c b/lib/3rdparty/bzip2/dllmain.c similarity index 100% rename from reactos/lib/3rdparty/bzip2/dllmain.c rename to lib/3rdparty/bzip2/dllmain.c diff --git a/reactos/lib/3rdparty/bzip2/dlltest.c b/lib/3rdparty/bzip2/dlltest.c similarity index 100% rename from reactos/lib/3rdparty/bzip2/dlltest.c rename to lib/3rdparty/bzip2/dlltest.c diff --git a/reactos/lib/3rdparty/bzip2/dlltest.dsp b/lib/3rdparty/bzip2/dlltest.dsp similarity index 100% rename from reactos/lib/3rdparty/bzip2/dlltest.dsp rename to lib/3rdparty/bzip2/dlltest.dsp diff --git a/reactos/lib/3rdparty/bzip2/huffman.c b/lib/3rdparty/bzip2/huffman.c similarity index 100% rename from reactos/lib/3rdparty/bzip2/huffman.c rename to lib/3rdparty/bzip2/huffman.c diff --git a/reactos/lib/3rdparty/bzip2/libbz2.def b/lib/3rdparty/bzip2/libbz2.def similarity index 100% rename from reactos/lib/3rdparty/bzip2/libbz2.def rename to lib/3rdparty/bzip2/libbz2.def diff --git a/reactos/lib/3rdparty/bzip2/libbz2.dsp b/lib/3rdparty/bzip2/libbz2.dsp similarity index 100% rename from reactos/lib/3rdparty/bzip2/libbz2.dsp rename to lib/3rdparty/bzip2/libbz2.dsp diff --git a/reactos/lib/3rdparty/bzip2/makefile.msc b/lib/3rdparty/bzip2/makefile.msc similarity index 100% rename from reactos/lib/3rdparty/bzip2/makefile.msc rename to lib/3rdparty/bzip2/makefile.msc diff --git a/reactos/lib/3rdparty/bzip2/manual.ps b/lib/3rdparty/bzip2/manual.ps similarity index 100% rename from reactos/lib/3rdparty/bzip2/manual.ps rename to lib/3rdparty/bzip2/manual.ps diff --git a/reactos/lib/3rdparty/bzip2/manual.texi b/lib/3rdparty/bzip2/manual.texi similarity index 100% rename from reactos/lib/3rdparty/bzip2/manual.texi rename to lib/3rdparty/bzip2/manual.texi diff --git a/reactos/lib/3rdparty/bzip2/manual_1.html b/lib/3rdparty/bzip2/manual_1.html similarity index 100% rename from reactos/lib/3rdparty/bzip2/manual_1.html rename to lib/3rdparty/bzip2/manual_1.html diff --git a/reactos/lib/3rdparty/bzip2/manual_2.html b/lib/3rdparty/bzip2/manual_2.html similarity index 100% rename from reactos/lib/3rdparty/bzip2/manual_2.html rename to lib/3rdparty/bzip2/manual_2.html diff --git a/reactos/lib/3rdparty/bzip2/manual_3.html b/lib/3rdparty/bzip2/manual_3.html similarity index 100% rename from reactos/lib/3rdparty/bzip2/manual_3.html rename to lib/3rdparty/bzip2/manual_3.html diff --git a/reactos/lib/3rdparty/bzip2/manual_4.html b/lib/3rdparty/bzip2/manual_4.html similarity index 100% rename from reactos/lib/3rdparty/bzip2/manual_4.html rename to lib/3rdparty/bzip2/manual_4.html diff --git a/reactos/lib/3rdparty/bzip2/manual_toc.html b/lib/3rdparty/bzip2/manual_toc.html similarity index 100% rename from reactos/lib/3rdparty/bzip2/manual_toc.html rename to lib/3rdparty/bzip2/manual_toc.html diff --git a/reactos/lib/3rdparty/bzip2/randtable.c b/lib/3rdparty/bzip2/randtable.c similarity index 100% rename from reactos/lib/3rdparty/bzip2/randtable.c rename to lib/3rdparty/bzip2/randtable.c diff --git a/reactos/lib/3rdparty/bzip2/sample1.ref b/lib/3rdparty/bzip2/sample1.ref similarity index 100% rename from reactos/lib/3rdparty/bzip2/sample1.ref rename to lib/3rdparty/bzip2/sample1.ref diff --git a/reactos/lib/3rdparty/bzip2/sample2.ref b/lib/3rdparty/bzip2/sample2.ref similarity index 100% rename from reactos/lib/3rdparty/bzip2/sample2.ref rename to lib/3rdparty/bzip2/sample2.ref diff --git a/reactos/lib/3rdparty/bzip2/sample3.ref b/lib/3rdparty/bzip2/sample3.ref similarity index 100% rename from reactos/lib/3rdparty/bzip2/sample3.ref rename to lib/3rdparty/bzip2/sample3.ref diff --git a/reactos/lib/3rdparty/bzip2/spewG.c b/lib/3rdparty/bzip2/spewG.c similarity index 100% rename from reactos/lib/3rdparty/bzip2/spewG.c rename to lib/3rdparty/bzip2/spewG.c diff --git a/reactos/lib/3rdparty/bzip2/unbzip2.spec b/lib/3rdparty/bzip2/unbzip2.spec similarity index 100% rename from reactos/lib/3rdparty/bzip2/unbzip2.spec rename to lib/3rdparty/bzip2/unbzip2.spec diff --git a/reactos/lib/3rdparty/bzip2/unzcrash.c b/lib/3rdparty/bzip2/unzcrash.c similarity index 100% rename from reactos/lib/3rdparty/bzip2/unzcrash.c rename to lib/3rdparty/bzip2/unzcrash.c diff --git a/reactos/lib/3rdparty/bzip2/words0 b/lib/3rdparty/bzip2/words0 similarity index 100% rename from reactos/lib/3rdparty/bzip2/words0 rename to lib/3rdparty/bzip2/words0 diff --git a/reactos/lib/3rdparty/bzip2/words1 b/lib/3rdparty/bzip2/words1 similarity index 100% rename from reactos/lib/3rdparty/bzip2/words1 rename to lib/3rdparty/bzip2/words1 diff --git a/reactos/lib/3rdparty/bzip2/words2 b/lib/3rdparty/bzip2/words2 similarity index 100% rename from reactos/lib/3rdparty/bzip2/words2 rename to lib/3rdparty/bzip2/words2 diff --git a/reactos/lib/3rdparty/bzip2/words3 b/lib/3rdparty/bzip2/words3 similarity index 100% rename from reactos/lib/3rdparty/bzip2/words3 rename to lib/3rdparty/bzip2/words3 diff --git a/reactos/lib/3rdparty/cardlib/CMakeLists.txt b/lib/3rdparty/cardlib/CMakeLists.txt similarity index 100% rename from reactos/lib/3rdparty/cardlib/CMakeLists.txt rename to lib/3rdparty/cardlib/CMakeLists.txt diff --git a/reactos/lib/3rdparty/cardlib/ReadMe.txt b/lib/3rdparty/cardlib/ReadMe.txt similarity index 100% rename from reactos/lib/3rdparty/cardlib/ReadMe.txt rename to lib/3rdparty/cardlib/ReadMe.txt diff --git a/reactos/lib/3rdparty/cardlib/card.h b/lib/3rdparty/cardlib/card.h similarity index 100% rename from reactos/lib/3rdparty/cardlib/card.h rename to lib/3rdparty/cardlib/card.h diff --git a/reactos/lib/3rdparty/cardlib/cardbitmaps.cpp b/lib/3rdparty/cardlib/cardbitmaps.cpp similarity index 100% rename from reactos/lib/3rdparty/cardlib/cardbitmaps.cpp rename to lib/3rdparty/cardlib/cardbitmaps.cpp diff --git a/reactos/lib/3rdparty/cardlib/cardbutton.cpp b/lib/3rdparty/cardlib/cardbutton.cpp similarity index 100% rename from reactos/lib/3rdparty/cardlib/cardbutton.cpp rename to lib/3rdparty/cardlib/cardbutton.cpp diff --git a/reactos/lib/3rdparty/cardlib/cardbutton.h b/lib/3rdparty/cardlib/cardbutton.h similarity index 100% rename from reactos/lib/3rdparty/cardlib/cardbutton.h rename to lib/3rdparty/cardlib/cardbutton.h diff --git a/reactos/lib/3rdparty/cardlib/cardcolor.cpp b/lib/3rdparty/cardlib/cardcolor.cpp similarity index 100% rename from reactos/lib/3rdparty/cardlib/cardcolor.cpp rename to lib/3rdparty/cardlib/cardcolor.cpp diff --git a/reactos/lib/3rdparty/cardlib/cardcolor.h b/lib/3rdparty/cardlib/cardcolor.h similarity index 100% rename from reactos/lib/3rdparty/cardlib/cardcolor.h rename to lib/3rdparty/cardlib/cardcolor.h diff --git a/reactos/lib/3rdparty/cardlib/cardcount.cpp b/lib/3rdparty/cardlib/cardcount.cpp similarity index 100% rename from reactos/lib/3rdparty/cardlib/cardcount.cpp rename to lib/3rdparty/cardlib/cardcount.cpp diff --git a/reactos/lib/3rdparty/cardlib/cardcount.h b/lib/3rdparty/cardlib/cardcount.h similarity index 100% rename from reactos/lib/3rdparty/cardlib/cardcount.h rename to lib/3rdparty/cardlib/cardcount.h diff --git a/reactos/lib/3rdparty/cardlib/cardlib.cpp b/lib/3rdparty/cardlib/cardlib.cpp similarity index 100% rename from reactos/lib/3rdparty/cardlib/cardlib.cpp rename to lib/3rdparty/cardlib/cardlib.cpp diff --git a/reactos/lib/3rdparty/cardlib/cardlib.h b/lib/3rdparty/cardlib/cardlib.h similarity index 100% rename from reactos/lib/3rdparty/cardlib/cardlib.h rename to lib/3rdparty/cardlib/cardlib.h diff --git a/reactos/lib/3rdparty/cardlib/cardlib.rbuild b/lib/3rdparty/cardlib/cardlib.rbuild similarity index 100% rename from reactos/lib/3rdparty/cardlib/cardlib.rbuild rename to lib/3rdparty/cardlib/cardlib.rbuild diff --git a/reactos/lib/3rdparty/cardlib/cardregion.cpp b/lib/3rdparty/cardlib/cardregion.cpp similarity index 100% rename from reactos/lib/3rdparty/cardlib/cardregion.cpp rename to lib/3rdparty/cardlib/cardregion.cpp diff --git a/reactos/lib/3rdparty/cardlib/cardregion.h b/lib/3rdparty/cardlib/cardregion.h similarity index 100% rename from reactos/lib/3rdparty/cardlib/cardregion.h rename to lib/3rdparty/cardlib/cardregion.h diff --git a/reactos/lib/3rdparty/cardlib/cardrgndraw.cpp b/lib/3rdparty/cardlib/cardrgndraw.cpp similarity index 100% rename from reactos/lib/3rdparty/cardlib/cardrgndraw.cpp rename to lib/3rdparty/cardlib/cardrgndraw.cpp diff --git a/reactos/lib/3rdparty/cardlib/cardrgnmouse.cpp b/lib/3rdparty/cardlib/cardrgnmouse.cpp similarity index 100% rename from reactos/lib/3rdparty/cardlib/cardrgnmouse.cpp rename to lib/3rdparty/cardlib/cardrgnmouse.cpp diff --git a/reactos/lib/3rdparty/cardlib/cardstack.cpp b/lib/3rdparty/cardlib/cardstack.cpp similarity index 100% rename from reactos/lib/3rdparty/cardlib/cardstack.cpp rename to lib/3rdparty/cardlib/cardstack.cpp diff --git a/reactos/lib/3rdparty/cardlib/cardstack.h b/lib/3rdparty/cardlib/cardstack.h similarity index 100% rename from reactos/lib/3rdparty/cardlib/cardstack.h rename to lib/3rdparty/cardlib/cardstack.h diff --git a/reactos/lib/3rdparty/cardlib/cardwindow.cpp b/lib/3rdparty/cardlib/cardwindow.cpp similarity index 100% rename from reactos/lib/3rdparty/cardlib/cardwindow.cpp rename to lib/3rdparty/cardlib/cardwindow.cpp diff --git a/reactos/lib/3rdparty/cardlib/cardwindow.h b/lib/3rdparty/cardlib/cardwindow.h similarity index 100% rename from reactos/lib/3rdparty/cardlib/cardwindow.h rename to lib/3rdparty/cardlib/cardwindow.h diff --git a/reactos/lib/3rdparty/cardlib/dropzone.cpp b/lib/3rdparty/cardlib/dropzone.cpp similarity index 100% rename from reactos/lib/3rdparty/cardlib/dropzone.cpp rename to lib/3rdparty/cardlib/dropzone.cpp diff --git a/reactos/lib/3rdparty/cardlib/dropzone.h b/lib/3rdparty/cardlib/dropzone.h similarity index 100% rename from reactos/lib/3rdparty/cardlib/dropzone.h rename to lib/3rdparty/cardlib/dropzone.h diff --git a/reactos/lib/3rdparty/cardlib/globals.h b/lib/3rdparty/cardlib/globals.h similarity index 100% rename from reactos/lib/3rdparty/cardlib/globals.h rename to lib/3rdparty/cardlib/globals.h diff --git a/reactos/lib/3rdparty/expat/CMakeLists.txt b/lib/3rdparty/expat/CMakeLists.txt similarity index 100% rename from reactos/lib/3rdparty/expat/CMakeLists.txt rename to lib/3rdparty/expat/CMakeLists.txt diff --git a/reactos/lib/3rdparty/expat/COPYING b/lib/3rdparty/expat/COPYING similarity index 100% rename from reactos/lib/3rdparty/expat/COPYING rename to lib/3rdparty/expat/COPYING diff --git a/reactos/lib/3rdparty/expat/Makefile.in b/lib/3rdparty/expat/Makefile.in similarity index 100% rename from reactos/lib/3rdparty/expat/Makefile.in rename to lib/3rdparty/expat/Makefile.in diff --git a/reactos/lib/3rdparty/expat/README b/lib/3rdparty/expat/README similarity index 100% rename from reactos/lib/3rdparty/expat/README rename to lib/3rdparty/expat/README diff --git a/reactos/lib/3rdparty/expat/expat.dsw b/lib/3rdparty/expat/expat.dsw similarity index 100% rename from reactos/lib/3rdparty/expat/expat.dsw rename to lib/3rdparty/expat/expat.dsw diff --git a/reactos/lib/3rdparty/expat/expat.rbuild b/lib/3rdparty/expat/expat.rbuild similarity index 100% rename from reactos/lib/3rdparty/expat/expat.rbuild rename to lib/3rdparty/expat/expat.rbuild diff --git a/reactos/lib/3rdparty/expat/expat.spec b/lib/3rdparty/expat/expat.spec similarity index 100% rename from reactos/lib/3rdparty/expat/expat.spec rename to lib/3rdparty/expat/expat.spec diff --git a/reactos/lib/3rdparty/expat/lib/Makefile.MPW b/lib/3rdparty/expat/lib/Makefile.MPW similarity index 100% rename from reactos/lib/3rdparty/expat/lib/Makefile.MPW rename to lib/3rdparty/expat/lib/Makefile.MPW diff --git a/reactos/lib/3rdparty/expat/lib/ascii.h b/lib/3rdparty/expat/lib/ascii.h similarity index 100% rename from reactos/lib/3rdparty/expat/lib/ascii.h rename to lib/3rdparty/expat/lib/ascii.h diff --git a/reactos/lib/3rdparty/expat/lib/asciitab.h b/lib/3rdparty/expat/lib/asciitab.h similarity index 100% rename from reactos/lib/3rdparty/expat/lib/asciitab.h rename to lib/3rdparty/expat/lib/asciitab.h diff --git a/reactos/lib/3rdparty/expat/lib/expat.dsp b/lib/3rdparty/expat/lib/expat.dsp similarity index 100% rename from reactos/lib/3rdparty/expat/lib/expat.dsp rename to lib/3rdparty/expat/lib/expat.dsp diff --git a/reactos/lib/3rdparty/expat/lib/expat_config.h b/lib/3rdparty/expat/lib/expat_config.h similarity index 100% rename from reactos/lib/3rdparty/expat/lib/expat_config.h rename to lib/3rdparty/expat/lib/expat_config.h diff --git a/reactos/lib/3rdparty/expat/lib/expat_static.dsp b/lib/3rdparty/expat/lib/expat_static.dsp similarity index 100% rename from reactos/lib/3rdparty/expat/lib/expat_static.dsp rename to lib/3rdparty/expat/lib/expat_static.dsp diff --git a/reactos/lib/3rdparty/expat/lib/expatw.dsp b/lib/3rdparty/expat/lib/expatw.dsp similarity index 100% rename from reactos/lib/3rdparty/expat/lib/expatw.dsp rename to lib/3rdparty/expat/lib/expatw.dsp diff --git a/reactos/lib/3rdparty/expat/lib/expatw_static.dsp b/lib/3rdparty/expat/lib/expatw_static.dsp similarity index 100% rename from reactos/lib/3rdparty/expat/lib/expatw_static.dsp rename to lib/3rdparty/expat/lib/expatw_static.dsp diff --git a/reactos/lib/3rdparty/expat/lib/iasciitab.h b/lib/3rdparty/expat/lib/iasciitab.h similarity index 100% rename from reactos/lib/3rdparty/expat/lib/iasciitab.h rename to lib/3rdparty/expat/lib/iasciitab.h diff --git a/reactos/lib/3rdparty/expat/lib/internal.h b/lib/3rdparty/expat/lib/internal.h similarity index 100% rename from reactos/lib/3rdparty/expat/lib/internal.h rename to lib/3rdparty/expat/lib/internal.h diff --git a/reactos/lib/3rdparty/expat/lib/latin1tab.h b/lib/3rdparty/expat/lib/latin1tab.h similarity index 100% rename from reactos/lib/3rdparty/expat/lib/latin1tab.h rename to lib/3rdparty/expat/lib/latin1tab.h diff --git a/reactos/lib/3rdparty/expat/lib/libexpat.def b/lib/3rdparty/expat/lib/libexpat.def similarity index 100% rename from reactos/lib/3rdparty/expat/lib/libexpat.def rename to lib/3rdparty/expat/lib/libexpat.def diff --git a/reactos/lib/3rdparty/expat/lib/libexpatw.def b/lib/3rdparty/expat/lib/libexpatw.def similarity index 100% rename from reactos/lib/3rdparty/expat/lib/libexpatw.def rename to lib/3rdparty/expat/lib/libexpatw.def diff --git a/reactos/lib/3rdparty/expat/lib/macconfig.h b/lib/3rdparty/expat/lib/macconfig.h similarity index 100% rename from reactos/lib/3rdparty/expat/lib/macconfig.h rename to lib/3rdparty/expat/lib/macconfig.h diff --git a/reactos/lib/3rdparty/expat/lib/nametab.h b/lib/3rdparty/expat/lib/nametab.h similarity index 100% rename from reactos/lib/3rdparty/expat/lib/nametab.h rename to lib/3rdparty/expat/lib/nametab.h diff --git a/reactos/lib/3rdparty/expat/lib/utf8tab.h b/lib/3rdparty/expat/lib/utf8tab.h similarity index 100% rename from reactos/lib/3rdparty/expat/lib/utf8tab.h rename to lib/3rdparty/expat/lib/utf8tab.h diff --git a/reactos/lib/3rdparty/expat/lib/winconfig.h b/lib/3rdparty/expat/lib/winconfig.h similarity index 100% rename from reactos/lib/3rdparty/expat/lib/winconfig.h rename to lib/3rdparty/expat/lib/winconfig.h diff --git a/reactos/lib/3rdparty/expat/lib/xmlparse.c b/lib/3rdparty/expat/lib/xmlparse.c similarity index 100% rename from reactos/lib/3rdparty/expat/lib/xmlparse.c rename to lib/3rdparty/expat/lib/xmlparse.c diff --git a/reactos/lib/3rdparty/expat/lib/xmlrole.c b/lib/3rdparty/expat/lib/xmlrole.c similarity index 100% rename from reactos/lib/3rdparty/expat/lib/xmlrole.c rename to lib/3rdparty/expat/lib/xmlrole.c diff --git a/reactos/lib/3rdparty/expat/lib/xmlrole.h b/lib/3rdparty/expat/lib/xmlrole.h similarity index 100% rename from reactos/lib/3rdparty/expat/lib/xmlrole.h rename to lib/3rdparty/expat/lib/xmlrole.h diff --git a/reactos/lib/3rdparty/expat/lib/xmltok.c b/lib/3rdparty/expat/lib/xmltok.c similarity index 100% rename from reactos/lib/3rdparty/expat/lib/xmltok.c rename to lib/3rdparty/expat/lib/xmltok.c diff --git a/reactos/lib/3rdparty/expat/lib/xmltok.h b/lib/3rdparty/expat/lib/xmltok.h similarity index 100% rename from reactos/lib/3rdparty/expat/lib/xmltok.h rename to lib/3rdparty/expat/lib/xmltok.h diff --git a/reactos/lib/3rdparty/expat/lib/xmltok_impl.c b/lib/3rdparty/expat/lib/xmltok_impl.c similarity index 100% rename from reactos/lib/3rdparty/expat/lib/xmltok_impl.c rename to lib/3rdparty/expat/lib/xmltok_impl.c diff --git a/reactos/lib/3rdparty/expat/lib/xmltok_impl.h b/lib/3rdparty/expat/lib/xmltok_impl.h similarity index 100% rename from reactos/lib/3rdparty/expat/lib/xmltok_impl.h rename to lib/3rdparty/expat/lib/xmltok_impl.h diff --git a/reactos/lib/3rdparty/expat/lib/xmltok_ns.c b/lib/3rdparty/expat/lib/xmltok_ns.c similarity index 100% rename from reactos/lib/3rdparty/expat/lib/xmltok_ns.c rename to lib/3rdparty/expat/lib/xmltok_ns.c diff --git a/reactos/lib/3rdparty/freetype/CMakeLists.txt b/lib/3rdparty/freetype/CMakeLists.txt similarity index 100% rename from reactos/lib/3rdparty/freetype/CMakeLists.txt rename to lib/3rdparty/freetype/CMakeLists.txt diff --git a/reactos/lib/3rdparty/freetype/ChangeLog b/lib/3rdparty/freetype/ChangeLog similarity index 100% rename from reactos/lib/3rdparty/freetype/ChangeLog rename to lib/3rdparty/freetype/ChangeLog diff --git a/reactos/lib/3rdparty/freetype/ChangeLog.20 b/lib/3rdparty/freetype/ChangeLog.20 similarity index 100% rename from reactos/lib/3rdparty/freetype/ChangeLog.20 rename to lib/3rdparty/freetype/ChangeLog.20 diff --git a/reactos/lib/3rdparty/freetype/ChangeLog.21 b/lib/3rdparty/freetype/ChangeLog.21 similarity index 100% rename from reactos/lib/3rdparty/freetype/ChangeLog.21 rename to lib/3rdparty/freetype/ChangeLog.21 diff --git a/reactos/lib/3rdparty/freetype/ChangeLog.22 b/lib/3rdparty/freetype/ChangeLog.22 similarity index 100% rename from reactos/lib/3rdparty/freetype/ChangeLog.22 rename to lib/3rdparty/freetype/ChangeLog.22 diff --git a/reactos/lib/3rdparty/freetype/ChangeLog.23 b/lib/3rdparty/freetype/ChangeLog.23 similarity index 100% rename from reactos/lib/3rdparty/freetype/ChangeLog.23 rename to lib/3rdparty/freetype/ChangeLog.23 diff --git a/reactos/lib/3rdparty/freetype/Jamfile b/lib/3rdparty/freetype/Jamfile similarity index 100% rename from reactos/lib/3rdparty/freetype/Jamfile rename to lib/3rdparty/freetype/Jamfile diff --git a/reactos/lib/3rdparty/freetype/Jamrules b/lib/3rdparty/freetype/Jamrules similarity index 100% rename from reactos/lib/3rdparty/freetype/Jamrules rename to lib/3rdparty/freetype/Jamrules diff --git a/reactos/lib/3rdparty/freetype/Makefile b/lib/3rdparty/freetype/Makefile similarity index 100% rename from reactos/lib/3rdparty/freetype/Makefile rename to lib/3rdparty/freetype/Makefile diff --git a/reactos/lib/3rdparty/freetype/README b/lib/3rdparty/freetype/README similarity index 100% rename from reactos/lib/3rdparty/freetype/README rename to lib/3rdparty/freetype/README diff --git a/reactos/lib/3rdparty/freetype/README.ROS b/lib/3rdparty/freetype/README.ROS similarity index 100% rename from reactos/lib/3rdparty/freetype/README.ROS rename to lib/3rdparty/freetype/README.ROS diff --git a/reactos/lib/3rdparty/freetype/README.git b/lib/3rdparty/freetype/README.git similarity index 100% rename from reactos/lib/3rdparty/freetype/README.git rename to lib/3rdparty/freetype/README.git diff --git a/reactos/lib/3rdparty/freetype/autogen.sh b/lib/3rdparty/freetype/autogen.sh similarity index 100% rename from reactos/lib/3rdparty/freetype/autogen.sh rename to lib/3rdparty/freetype/autogen.sh diff --git a/reactos/lib/3rdparty/freetype/configure b/lib/3rdparty/freetype/configure similarity index 100% rename from reactos/lib/3rdparty/freetype/configure rename to lib/3rdparty/freetype/configure diff --git a/reactos/lib/3rdparty/freetype/devel/ft2build.h b/lib/3rdparty/freetype/devel/ft2build.h similarity index 100% rename from reactos/lib/3rdparty/freetype/devel/ft2build.h rename to lib/3rdparty/freetype/devel/ft2build.h diff --git a/reactos/lib/3rdparty/freetype/devel/ftoption.h b/lib/3rdparty/freetype/devel/ftoption.h similarity index 100% rename from reactos/lib/3rdparty/freetype/devel/ftoption.h rename to lib/3rdparty/freetype/devel/ftoption.h diff --git a/reactos/lib/3rdparty/freetype/freetype.def b/lib/3rdparty/freetype/freetype.def similarity index 100% rename from reactos/lib/3rdparty/freetype/freetype.def rename to lib/3rdparty/freetype/freetype.def diff --git a/reactos/lib/3rdparty/freetype/freetype.rbuild b/lib/3rdparty/freetype/freetype.rbuild similarity index 100% rename from reactos/lib/3rdparty/freetype/freetype.rbuild rename to lib/3rdparty/freetype/freetype.rbuild diff --git a/reactos/lib/3rdparty/freetype/freetype.rc b/lib/3rdparty/freetype/freetype.rc similarity index 100% rename from reactos/lib/3rdparty/freetype/freetype.rc rename to lib/3rdparty/freetype/freetype.rc diff --git a/reactos/lib/3rdparty/freetype/freetype_ros.diff b/lib/3rdparty/freetype/freetype_ros.diff similarity index 100% rename from reactos/lib/3rdparty/freetype/freetype_ros.diff rename to lib/3rdparty/freetype/freetype_ros.diff diff --git a/reactos/lib/3rdparty/freetype/include/freetype/config/ftconfig.h b/lib/3rdparty/freetype/include/freetype/config/ftconfig.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/config/ftconfig.h rename to lib/3rdparty/freetype/include/freetype/config/ftconfig.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/config/ftheader.h b/lib/3rdparty/freetype/include/freetype/config/ftheader.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/config/ftheader.h rename to lib/3rdparty/freetype/include/freetype/config/ftheader.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/config/ftmodule.h b/lib/3rdparty/freetype/include/freetype/config/ftmodule.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/config/ftmodule.h rename to lib/3rdparty/freetype/include/freetype/config/ftmodule.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/config/ftoption.h b/lib/3rdparty/freetype/include/freetype/config/ftoption.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/config/ftoption.h rename to lib/3rdparty/freetype/include/freetype/config/ftoption.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/config/ftstdlib.h b/lib/3rdparty/freetype/include/freetype/config/ftstdlib.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/config/ftstdlib.h rename to lib/3rdparty/freetype/include/freetype/config/ftstdlib.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/freetype.h b/lib/3rdparty/freetype/include/freetype/freetype.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/freetype.h rename to lib/3rdparty/freetype/include/freetype/freetype.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftadvanc.h b/lib/3rdparty/freetype/include/freetype/ftadvanc.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftadvanc.h rename to lib/3rdparty/freetype/include/freetype/ftadvanc.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftbbox.h b/lib/3rdparty/freetype/include/freetype/ftbbox.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftbbox.h rename to lib/3rdparty/freetype/include/freetype/ftbbox.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftbdf.h b/lib/3rdparty/freetype/include/freetype/ftbdf.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftbdf.h rename to lib/3rdparty/freetype/include/freetype/ftbdf.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftbitmap.h b/lib/3rdparty/freetype/include/freetype/ftbitmap.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftbitmap.h rename to lib/3rdparty/freetype/include/freetype/ftbitmap.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftcache.h b/lib/3rdparty/freetype/include/freetype/ftcache.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftcache.h rename to lib/3rdparty/freetype/include/freetype/ftcache.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftchapters.h b/lib/3rdparty/freetype/include/freetype/ftchapters.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftchapters.h rename to lib/3rdparty/freetype/include/freetype/ftchapters.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftcid.h b/lib/3rdparty/freetype/include/freetype/ftcid.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftcid.h rename to lib/3rdparty/freetype/include/freetype/ftcid.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/fterrdef.h b/lib/3rdparty/freetype/include/freetype/fterrdef.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/fterrdef.h rename to lib/3rdparty/freetype/include/freetype/fterrdef.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/fterrors.h b/lib/3rdparty/freetype/include/freetype/fterrors.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/fterrors.h rename to lib/3rdparty/freetype/include/freetype/fterrors.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftgasp.h b/lib/3rdparty/freetype/include/freetype/ftgasp.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftgasp.h rename to lib/3rdparty/freetype/include/freetype/ftgasp.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftglyph.h b/lib/3rdparty/freetype/include/freetype/ftglyph.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftglyph.h rename to lib/3rdparty/freetype/include/freetype/ftglyph.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftgxval.h b/lib/3rdparty/freetype/include/freetype/ftgxval.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftgxval.h rename to lib/3rdparty/freetype/include/freetype/ftgxval.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftgzip.h b/lib/3rdparty/freetype/include/freetype/ftgzip.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftgzip.h rename to lib/3rdparty/freetype/include/freetype/ftgzip.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftimage.h b/lib/3rdparty/freetype/include/freetype/ftimage.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftimage.h rename to lib/3rdparty/freetype/include/freetype/ftimage.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftincrem.h b/lib/3rdparty/freetype/include/freetype/ftincrem.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftincrem.h rename to lib/3rdparty/freetype/include/freetype/ftincrem.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftlcdfil.h b/lib/3rdparty/freetype/include/freetype/ftlcdfil.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftlcdfil.h rename to lib/3rdparty/freetype/include/freetype/ftlcdfil.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftlist.h b/lib/3rdparty/freetype/include/freetype/ftlist.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftlist.h rename to lib/3rdparty/freetype/include/freetype/ftlist.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftlzw.h b/lib/3rdparty/freetype/include/freetype/ftlzw.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftlzw.h rename to lib/3rdparty/freetype/include/freetype/ftlzw.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftmac.h b/lib/3rdparty/freetype/include/freetype/ftmac.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftmac.h rename to lib/3rdparty/freetype/include/freetype/ftmac.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftmm.h b/lib/3rdparty/freetype/include/freetype/ftmm.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftmm.h rename to lib/3rdparty/freetype/include/freetype/ftmm.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftmodapi.h b/lib/3rdparty/freetype/include/freetype/ftmodapi.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftmodapi.h rename to lib/3rdparty/freetype/include/freetype/ftmodapi.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftmoderr.h b/lib/3rdparty/freetype/include/freetype/ftmoderr.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftmoderr.h rename to lib/3rdparty/freetype/include/freetype/ftmoderr.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftotval.h b/lib/3rdparty/freetype/include/freetype/ftotval.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftotval.h rename to lib/3rdparty/freetype/include/freetype/ftotval.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftoutln.h b/lib/3rdparty/freetype/include/freetype/ftoutln.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftoutln.h rename to lib/3rdparty/freetype/include/freetype/ftoutln.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftpfr.h b/lib/3rdparty/freetype/include/freetype/ftpfr.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftpfr.h rename to lib/3rdparty/freetype/include/freetype/ftpfr.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftrender.h b/lib/3rdparty/freetype/include/freetype/ftrender.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftrender.h rename to lib/3rdparty/freetype/include/freetype/ftrender.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftsizes.h b/lib/3rdparty/freetype/include/freetype/ftsizes.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftsizes.h rename to lib/3rdparty/freetype/include/freetype/ftsizes.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftsnames.h b/lib/3rdparty/freetype/include/freetype/ftsnames.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftsnames.h rename to lib/3rdparty/freetype/include/freetype/ftsnames.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftstroke.h b/lib/3rdparty/freetype/include/freetype/ftstroke.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftstroke.h rename to lib/3rdparty/freetype/include/freetype/ftstroke.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftsynth.h b/lib/3rdparty/freetype/include/freetype/ftsynth.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftsynth.h rename to lib/3rdparty/freetype/include/freetype/ftsynth.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftsystem.h b/lib/3rdparty/freetype/include/freetype/ftsystem.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftsystem.h rename to lib/3rdparty/freetype/include/freetype/ftsystem.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/fttrigon.h b/lib/3rdparty/freetype/include/freetype/fttrigon.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/fttrigon.h rename to lib/3rdparty/freetype/include/freetype/fttrigon.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/fttypes.h b/lib/3rdparty/freetype/include/freetype/fttypes.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/fttypes.h rename to lib/3rdparty/freetype/include/freetype/fttypes.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftwinfnt.h b/lib/3rdparty/freetype/include/freetype/ftwinfnt.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftwinfnt.h rename to lib/3rdparty/freetype/include/freetype/ftwinfnt.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ftxf86.h b/lib/3rdparty/freetype/include/freetype/ftxf86.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ftxf86.h rename to lib/3rdparty/freetype/include/freetype/ftxf86.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/autohint.h b/lib/3rdparty/freetype/include/freetype/internal/autohint.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/autohint.h rename to lib/3rdparty/freetype/include/freetype/internal/autohint.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/ftcalc.h b/lib/3rdparty/freetype/include/freetype/internal/ftcalc.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/ftcalc.h rename to lib/3rdparty/freetype/include/freetype/internal/ftcalc.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/ftdebug.h b/lib/3rdparty/freetype/include/freetype/internal/ftdebug.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/ftdebug.h rename to lib/3rdparty/freetype/include/freetype/internal/ftdebug.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/ftdriver.h b/lib/3rdparty/freetype/include/freetype/internal/ftdriver.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/ftdriver.h rename to lib/3rdparty/freetype/include/freetype/internal/ftdriver.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/ftgloadr.h b/lib/3rdparty/freetype/include/freetype/internal/ftgloadr.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/ftgloadr.h rename to lib/3rdparty/freetype/include/freetype/internal/ftgloadr.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/ftmemory.h b/lib/3rdparty/freetype/include/freetype/internal/ftmemory.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/ftmemory.h rename to lib/3rdparty/freetype/include/freetype/internal/ftmemory.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/ftobjs.h b/lib/3rdparty/freetype/include/freetype/internal/ftobjs.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/ftobjs.h rename to lib/3rdparty/freetype/include/freetype/internal/ftobjs.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/ftpic.h b/lib/3rdparty/freetype/include/freetype/internal/ftpic.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/ftpic.h rename to lib/3rdparty/freetype/include/freetype/internal/ftpic.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/ftrfork.h b/lib/3rdparty/freetype/include/freetype/internal/ftrfork.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/ftrfork.h rename to lib/3rdparty/freetype/include/freetype/internal/ftrfork.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/ftserv.h b/lib/3rdparty/freetype/include/freetype/internal/ftserv.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/ftserv.h rename to lib/3rdparty/freetype/include/freetype/internal/ftserv.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/ftstream.h b/lib/3rdparty/freetype/include/freetype/internal/ftstream.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/ftstream.h rename to lib/3rdparty/freetype/include/freetype/internal/ftstream.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/fttrace.h b/lib/3rdparty/freetype/include/freetype/internal/fttrace.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/fttrace.h rename to lib/3rdparty/freetype/include/freetype/internal/fttrace.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/ftvalid.h b/lib/3rdparty/freetype/include/freetype/internal/ftvalid.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/ftvalid.h rename to lib/3rdparty/freetype/include/freetype/internal/ftvalid.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/internal.h b/lib/3rdparty/freetype/include/freetype/internal/internal.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/internal.h rename to lib/3rdparty/freetype/include/freetype/internal/internal.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/pcftypes.h b/lib/3rdparty/freetype/include/freetype/internal/pcftypes.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/pcftypes.h rename to lib/3rdparty/freetype/include/freetype/internal/pcftypes.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/psaux.h b/lib/3rdparty/freetype/include/freetype/internal/psaux.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/psaux.h rename to lib/3rdparty/freetype/include/freetype/internal/psaux.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/pshints.h b/lib/3rdparty/freetype/include/freetype/internal/pshints.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/pshints.h rename to lib/3rdparty/freetype/include/freetype/internal/pshints.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/services/svbdf.h b/lib/3rdparty/freetype/include/freetype/internal/services/svbdf.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/services/svbdf.h rename to lib/3rdparty/freetype/include/freetype/internal/services/svbdf.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/services/svcid.h b/lib/3rdparty/freetype/include/freetype/internal/services/svcid.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/services/svcid.h rename to lib/3rdparty/freetype/include/freetype/internal/services/svcid.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/services/svgldict.h b/lib/3rdparty/freetype/include/freetype/internal/services/svgldict.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/services/svgldict.h rename to lib/3rdparty/freetype/include/freetype/internal/services/svgldict.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/services/svgxval.h b/lib/3rdparty/freetype/include/freetype/internal/services/svgxval.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/services/svgxval.h rename to lib/3rdparty/freetype/include/freetype/internal/services/svgxval.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/services/svkern.h b/lib/3rdparty/freetype/include/freetype/internal/services/svkern.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/services/svkern.h rename to lib/3rdparty/freetype/include/freetype/internal/services/svkern.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/services/svmm.h b/lib/3rdparty/freetype/include/freetype/internal/services/svmm.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/services/svmm.h rename to lib/3rdparty/freetype/include/freetype/internal/services/svmm.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/services/svotval.h b/lib/3rdparty/freetype/include/freetype/internal/services/svotval.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/services/svotval.h rename to lib/3rdparty/freetype/include/freetype/internal/services/svotval.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/services/svpfr.h b/lib/3rdparty/freetype/include/freetype/internal/services/svpfr.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/services/svpfr.h rename to lib/3rdparty/freetype/include/freetype/internal/services/svpfr.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/services/svpostnm.h b/lib/3rdparty/freetype/include/freetype/internal/services/svpostnm.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/services/svpostnm.h rename to lib/3rdparty/freetype/include/freetype/internal/services/svpostnm.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/services/svpscmap.h b/lib/3rdparty/freetype/include/freetype/internal/services/svpscmap.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/services/svpscmap.h rename to lib/3rdparty/freetype/include/freetype/internal/services/svpscmap.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/services/svpsinfo.h b/lib/3rdparty/freetype/include/freetype/internal/services/svpsinfo.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/services/svpsinfo.h rename to lib/3rdparty/freetype/include/freetype/internal/services/svpsinfo.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/services/svsfnt.h b/lib/3rdparty/freetype/include/freetype/internal/services/svsfnt.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/services/svsfnt.h rename to lib/3rdparty/freetype/include/freetype/internal/services/svsfnt.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/services/svttcmap.h b/lib/3rdparty/freetype/include/freetype/internal/services/svttcmap.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/services/svttcmap.h rename to lib/3rdparty/freetype/include/freetype/internal/services/svttcmap.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/services/svtteng.h b/lib/3rdparty/freetype/include/freetype/internal/services/svtteng.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/services/svtteng.h rename to lib/3rdparty/freetype/include/freetype/internal/services/svtteng.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/services/svttglyf.h b/lib/3rdparty/freetype/include/freetype/internal/services/svttglyf.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/services/svttglyf.h rename to lib/3rdparty/freetype/include/freetype/internal/services/svttglyf.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/services/svwinfnt.h b/lib/3rdparty/freetype/include/freetype/internal/services/svwinfnt.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/services/svwinfnt.h rename to lib/3rdparty/freetype/include/freetype/internal/services/svwinfnt.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/services/svxf86nm.h b/lib/3rdparty/freetype/include/freetype/internal/services/svxf86nm.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/services/svxf86nm.h rename to lib/3rdparty/freetype/include/freetype/internal/services/svxf86nm.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/sfnt.h b/lib/3rdparty/freetype/include/freetype/internal/sfnt.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/sfnt.h rename to lib/3rdparty/freetype/include/freetype/internal/sfnt.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/t1types.h b/lib/3rdparty/freetype/include/freetype/internal/t1types.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/t1types.h rename to lib/3rdparty/freetype/include/freetype/internal/t1types.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/internal/tttypes.h b/lib/3rdparty/freetype/include/freetype/internal/tttypes.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/internal/tttypes.h rename to lib/3rdparty/freetype/include/freetype/internal/tttypes.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/t1tables.h b/lib/3rdparty/freetype/include/freetype/t1tables.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/t1tables.h rename to lib/3rdparty/freetype/include/freetype/t1tables.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ttnameid.h b/lib/3rdparty/freetype/include/freetype/ttnameid.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ttnameid.h rename to lib/3rdparty/freetype/include/freetype/ttnameid.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/tttables.h b/lib/3rdparty/freetype/include/freetype/tttables.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/tttables.h rename to lib/3rdparty/freetype/include/freetype/tttables.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/tttags.h b/lib/3rdparty/freetype/include/freetype/tttags.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/tttags.h rename to lib/3rdparty/freetype/include/freetype/tttags.h diff --git a/reactos/lib/3rdparty/freetype/include/freetype/ttunpat.h b/lib/3rdparty/freetype/include/freetype/ttunpat.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/freetype/ttunpat.h rename to lib/3rdparty/freetype/include/freetype/ttunpat.h diff --git a/reactos/lib/3rdparty/freetype/include/ft2build.h b/lib/3rdparty/freetype/include/ft2build.h similarity index 100% rename from reactos/lib/3rdparty/freetype/include/ft2build.h rename to lib/3rdparty/freetype/include/ft2build.h diff --git a/reactos/lib/3rdparty/freetype/modules.cfg b/lib/3rdparty/freetype/modules.cfg similarity index 100% rename from reactos/lib/3rdparty/freetype/modules.cfg rename to lib/3rdparty/freetype/modules.cfg diff --git a/reactos/lib/3rdparty/freetype/objs/README b/lib/3rdparty/freetype/objs/README similarity index 100% rename from reactos/lib/3rdparty/freetype/objs/README rename to lib/3rdparty/freetype/objs/README diff --git a/reactos/lib/3rdparty/freetype/src/Jamfile b/lib/3rdparty/freetype/src/Jamfile similarity index 100% rename from reactos/lib/3rdparty/freetype/src/Jamfile rename to lib/3rdparty/freetype/src/Jamfile diff --git a/reactos/lib/3rdparty/freetype/src/autofit/Jamfile b/lib/3rdparty/freetype/src/autofit/Jamfile similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/Jamfile rename to lib/3rdparty/freetype/src/autofit/Jamfile diff --git a/reactos/lib/3rdparty/freetype/src/autofit/afangles.c b/lib/3rdparty/freetype/src/autofit/afangles.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/afangles.c rename to lib/3rdparty/freetype/src/autofit/afangles.c diff --git a/reactos/lib/3rdparty/freetype/src/autofit/afangles.h b/lib/3rdparty/freetype/src/autofit/afangles.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/afangles.h rename to lib/3rdparty/freetype/src/autofit/afangles.h diff --git a/reactos/lib/3rdparty/freetype/src/autofit/afcjk.c b/lib/3rdparty/freetype/src/autofit/afcjk.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/afcjk.c rename to lib/3rdparty/freetype/src/autofit/afcjk.c diff --git a/reactos/lib/3rdparty/freetype/src/autofit/afcjk.h b/lib/3rdparty/freetype/src/autofit/afcjk.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/afcjk.h rename to lib/3rdparty/freetype/src/autofit/afcjk.h diff --git a/reactos/lib/3rdparty/freetype/src/autofit/afdummy.c b/lib/3rdparty/freetype/src/autofit/afdummy.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/afdummy.c rename to lib/3rdparty/freetype/src/autofit/afdummy.c diff --git a/reactos/lib/3rdparty/freetype/src/autofit/afdummy.h b/lib/3rdparty/freetype/src/autofit/afdummy.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/afdummy.h rename to lib/3rdparty/freetype/src/autofit/afdummy.h diff --git a/reactos/lib/3rdparty/freetype/src/autofit/aferrors.h b/lib/3rdparty/freetype/src/autofit/aferrors.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/aferrors.h rename to lib/3rdparty/freetype/src/autofit/aferrors.h diff --git a/reactos/lib/3rdparty/freetype/src/autofit/afglobal.c b/lib/3rdparty/freetype/src/autofit/afglobal.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/afglobal.c rename to lib/3rdparty/freetype/src/autofit/afglobal.c diff --git a/reactos/lib/3rdparty/freetype/src/autofit/afglobal.h b/lib/3rdparty/freetype/src/autofit/afglobal.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/afglobal.h rename to lib/3rdparty/freetype/src/autofit/afglobal.h diff --git a/reactos/lib/3rdparty/freetype/src/autofit/afhints.c b/lib/3rdparty/freetype/src/autofit/afhints.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/afhints.c rename to lib/3rdparty/freetype/src/autofit/afhints.c diff --git a/reactos/lib/3rdparty/freetype/src/autofit/afhints.h b/lib/3rdparty/freetype/src/autofit/afhints.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/afhints.h rename to lib/3rdparty/freetype/src/autofit/afhints.h diff --git a/reactos/lib/3rdparty/freetype/src/autofit/afindic.c b/lib/3rdparty/freetype/src/autofit/afindic.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/afindic.c rename to lib/3rdparty/freetype/src/autofit/afindic.c diff --git a/reactos/lib/3rdparty/freetype/src/autofit/afindic.h b/lib/3rdparty/freetype/src/autofit/afindic.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/afindic.h rename to lib/3rdparty/freetype/src/autofit/afindic.h diff --git a/reactos/lib/3rdparty/freetype/src/autofit/aflatin.c b/lib/3rdparty/freetype/src/autofit/aflatin.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/aflatin.c rename to lib/3rdparty/freetype/src/autofit/aflatin.c diff --git a/reactos/lib/3rdparty/freetype/src/autofit/aflatin.h b/lib/3rdparty/freetype/src/autofit/aflatin.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/aflatin.h rename to lib/3rdparty/freetype/src/autofit/aflatin.h diff --git a/reactos/lib/3rdparty/freetype/src/autofit/aflatin2.c b/lib/3rdparty/freetype/src/autofit/aflatin2.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/aflatin2.c rename to lib/3rdparty/freetype/src/autofit/aflatin2.c diff --git a/reactos/lib/3rdparty/freetype/src/autofit/aflatin2.h b/lib/3rdparty/freetype/src/autofit/aflatin2.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/aflatin2.h rename to lib/3rdparty/freetype/src/autofit/aflatin2.h diff --git a/reactos/lib/3rdparty/freetype/src/autofit/afloader.c b/lib/3rdparty/freetype/src/autofit/afloader.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/afloader.c rename to lib/3rdparty/freetype/src/autofit/afloader.c diff --git a/reactos/lib/3rdparty/freetype/src/autofit/afloader.h b/lib/3rdparty/freetype/src/autofit/afloader.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/afloader.h rename to lib/3rdparty/freetype/src/autofit/afloader.h diff --git a/reactos/lib/3rdparty/freetype/src/autofit/afmodule.c b/lib/3rdparty/freetype/src/autofit/afmodule.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/afmodule.c rename to lib/3rdparty/freetype/src/autofit/afmodule.c diff --git a/reactos/lib/3rdparty/freetype/src/autofit/afmodule.h b/lib/3rdparty/freetype/src/autofit/afmodule.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/afmodule.h rename to lib/3rdparty/freetype/src/autofit/afmodule.h diff --git a/reactos/lib/3rdparty/freetype/src/autofit/afpic.c b/lib/3rdparty/freetype/src/autofit/afpic.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/afpic.c rename to lib/3rdparty/freetype/src/autofit/afpic.c diff --git a/reactos/lib/3rdparty/freetype/src/autofit/afpic.h b/lib/3rdparty/freetype/src/autofit/afpic.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/afpic.h rename to lib/3rdparty/freetype/src/autofit/afpic.h diff --git a/reactos/lib/3rdparty/freetype/src/autofit/aftypes.h b/lib/3rdparty/freetype/src/autofit/aftypes.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/aftypes.h rename to lib/3rdparty/freetype/src/autofit/aftypes.h diff --git a/reactos/lib/3rdparty/freetype/src/autofit/afwarp.c b/lib/3rdparty/freetype/src/autofit/afwarp.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/afwarp.c rename to lib/3rdparty/freetype/src/autofit/afwarp.c diff --git a/reactos/lib/3rdparty/freetype/src/autofit/afwarp.h b/lib/3rdparty/freetype/src/autofit/afwarp.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/afwarp.h rename to lib/3rdparty/freetype/src/autofit/afwarp.h diff --git a/reactos/lib/3rdparty/freetype/src/autofit/autofit.c b/lib/3rdparty/freetype/src/autofit/autofit.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/autofit.c rename to lib/3rdparty/freetype/src/autofit/autofit.c diff --git a/reactos/lib/3rdparty/freetype/src/autofit/module.mk b/lib/3rdparty/freetype/src/autofit/module.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/module.mk rename to lib/3rdparty/freetype/src/autofit/module.mk diff --git a/reactos/lib/3rdparty/freetype/src/autofit/rules.mk b/lib/3rdparty/freetype/src/autofit/rules.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/autofit/rules.mk rename to lib/3rdparty/freetype/src/autofit/rules.mk diff --git a/reactos/lib/3rdparty/freetype/src/base/Jamfile b/lib/3rdparty/freetype/src/base/Jamfile similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/Jamfile rename to lib/3rdparty/freetype/src/base/Jamfile diff --git a/reactos/lib/3rdparty/freetype/src/base/basepic.c b/lib/3rdparty/freetype/src/base/basepic.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/basepic.c rename to lib/3rdparty/freetype/src/base/basepic.c diff --git a/reactos/lib/3rdparty/freetype/src/base/basepic.h b/lib/3rdparty/freetype/src/base/basepic.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/basepic.h rename to lib/3rdparty/freetype/src/base/basepic.h diff --git a/reactos/lib/3rdparty/freetype/src/base/ftadvanc.c b/lib/3rdparty/freetype/src/base/ftadvanc.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftadvanc.c rename to lib/3rdparty/freetype/src/base/ftadvanc.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftapi.c b/lib/3rdparty/freetype/src/base/ftapi.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftapi.c rename to lib/3rdparty/freetype/src/base/ftapi.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftbase.c b/lib/3rdparty/freetype/src/base/ftbase.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftbase.c rename to lib/3rdparty/freetype/src/base/ftbase.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftbase.h b/lib/3rdparty/freetype/src/base/ftbase.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftbase.h rename to lib/3rdparty/freetype/src/base/ftbase.h diff --git a/reactos/lib/3rdparty/freetype/src/base/ftbbox.c b/lib/3rdparty/freetype/src/base/ftbbox.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftbbox.c rename to lib/3rdparty/freetype/src/base/ftbbox.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftbdf.c b/lib/3rdparty/freetype/src/base/ftbdf.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftbdf.c rename to lib/3rdparty/freetype/src/base/ftbdf.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftbitmap.c b/lib/3rdparty/freetype/src/base/ftbitmap.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftbitmap.c rename to lib/3rdparty/freetype/src/base/ftbitmap.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftcalc.c b/lib/3rdparty/freetype/src/base/ftcalc.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftcalc.c rename to lib/3rdparty/freetype/src/base/ftcalc.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftcid.c b/lib/3rdparty/freetype/src/base/ftcid.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftcid.c rename to lib/3rdparty/freetype/src/base/ftcid.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftdbgmem.c b/lib/3rdparty/freetype/src/base/ftdbgmem.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftdbgmem.c rename to lib/3rdparty/freetype/src/base/ftdbgmem.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftdebug.c b/lib/3rdparty/freetype/src/base/ftdebug.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftdebug.c rename to lib/3rdparty/freetype/src/base/ftdebug.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftfstype.c b/lib/3rdparty/freetype/src/base/ftfstype.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftfstype.c rename to lib/3rdparty/freetype/src/base/ftfstype.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftgasp.c b/lib/3rdparty/freetype/src/base/ftgasp.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftgasp.c rename to lib/3rdparty/freetype/src/base/ftgasp.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftgloadr.c b/lib/3rdparty/freetype/src/base/ftgloadr.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftgloadr.c rename to lib/3rdparty/freetype/src/base/ftgloadr.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftglyph.c b/lib/3rdparty/freetype/src/base/ftglyph.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftglyph.c rename to lib/3rdparty/freetype/src/base/ftglyph.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftgxval.c b/lib/3rdparty/freetype/src/base/ftgxval.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftgxval.c rename to lib/3rdparty/freetype/src/base/ftgxval.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftinit.c b/lib/3rdparty/freetype/src/base/ftinit.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftinit.c rename to lib/3rdparty/freetype/src/base/ftinit.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftlcdfil.c b/lib/3rdparty/freetype/src/base/ftlcdfil.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftlcdfil.c rename to lib/3rdparty/freetype/src/base/ftlcdfil.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftmac.c b/lib/3rdparty/freetype/src/base/ftmac.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftmac.c rename to lib/3rdparty/freetype/src/base/ftmac.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftmm.c b/lib/3rdparty/freetype/src/base/ftmm.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftmm.c rename to lib/3rdparty/freetype/src/base/ftmm.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftnames.c b/lib/3rdparty/freetype/src/base/ftnames.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftnames.c rename to lib/3rdparty/freetype/src/base/ftnames.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftobjs.c b/lib/3rdparty/freetype/src/base/ftobjs.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftobjs.c rename to lib/3rdparty/freetype/src/base/ftobjs.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftotval.c b/lib/3rdparty/freetype/src/base/ftotval.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftotval.c rename to lib/3rdparty/freetype/src/base/ftotval.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftoutln.c b/lib/3rdparty/freetype/src/base/ftoutln.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftoutln.c rename to lib/3rdparty/freetype/src/base/ftoutln.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftpatent.c b/lib/3rdparty/freetype/src/base/ftpatent.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftpatent.c rename to lib/3rdparty/freetype/src/base/ftpatent.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftpfr.c b/lib/3rdparty/freetype/src/base/ftpfr.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftpfr.c rename to lib/3rdparty/freetype/src/base/ftpfr.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftpic.c b/lib/3rdparty/freetype/src/base/ftpic.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftpic.c rename to lib/3rdparty/freetype/src/base/ftpic.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftrfork.c b/lib/3rdparty/freetype/src/base/ftrfork.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftrfork.c rename to lib/3rdparty/freetype/src/base/ftrfork.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftsnames.c b/lib/3rdparty/freetype/src/base/ftsnames.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftsnames.c rename to lib/3rdparty/freetype/src/base/ftsnames.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftstream.c b/lib/3rdparty/freetype/src/base/ftstream.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftstream.c rename to lib/3rdparty/freetype/src/base/ftstream.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftstroke.c b/lib/3rdparty/freetype/src/base/ftstroke.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftstroke.c rename to lib/3rdparty/freetype/src/base/ftstroke.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftsynth.c b/lib/3rdparty/freetype/src/base/ftsynth.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftsynth.c rename to lib/3rdparty/freetype/src/base/ftsynth.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftsystem.c b/lib/3rdparty/freetype/src/base/ftsystem.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftsystem.c rename to lib/3rdparty/freetype/src/base/ftsystem.c diff --git a/reactos/lib/3rdparty/freetype/src/base/fttrigon.c b/lib/3rdparty/freetype/src/base/fttrigon.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/fttrigon.c rename to lib/3rdparty/freetype/src/base/fttrigon.c diff --git a/reactos/lib/3rdparty/freetype/src/base/fttype1.c b/lib/3rdparty/freetype/src/base/fttype1.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/fttype1.c rename to lib/3rdparty/freetype/src/base/fttype1.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftutil.c b/lib/3rdparty/freetype/src/base/ftutil.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftutil.c rename to lib/3rdparty/freetype/src/base/ftutil.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftwinfnt.c b/lib/3rdparty/freetype/src/base/ftwinfnt.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftwinfnt.c rename to lib/3rdparty/freetype/src/base/ftwinfnt.c diff --git a/reactos/lib/3rdparty/freetype/src/base/ftxf86.c b/lib/3rdparty/freetype/src/base/ftxf86.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/ftxf86.c rename to lib/3rdparty/freetype/src/base/ftxf86.c diff --git a/reactos/lib/3rdparty/freetype/src/base/rules.mk b/lib/3rdparty/freetype/src/base/rules.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/base/rules.mk rename to lib/3rdparty/freetype/src/base/rules.mk diff --git a/reactos/lib/3rdparty/freetype/src/bdf/Jamfile b/lib/3rdparty/freetype/src/bdf/Jamfile similarity index 100% rename from reactos/lib/3rdparty/freetype/src/bdf/Jamfile rename to lib/3rdparty/freetype/src/bdf/Jamfile diff --git a/reactos/lib/3rdparty/freetype/src/bdf/README b/lib/3rdparty/freetype/src/bdf/README similarity index 100% rename from reactos/lib/3rdparty/freetype/src/bdf/README rename to lib/3rdparty/freetype/src/bdf/README diff --git a/reactos/lib/3rdparty/freetype/src/bdf/bdf.c b/lib/3rdparty/freetype/src/bdf/bdf.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/bdf/bdf.c rename to lib/3rdparty/freetype/src/bdf/bdf.c diff --git a/reactos/lib/3rdparty/freetype/src/bdf/bdf.h b/lib/3rdparty/freetype/src/bdf/bdf.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/bdf/bdf.h rename to lib/3rdparty/freetype/src/bdf/bdf.h diff --git a/reactos/lib/3rdparty/freetype/src/bdf/bdfdrivr.c b/lib/3rdparty/freetype/src/bdf/bdfdrivr.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/bdf/bdfdrivr.c rename to lib/3rdparty/freetype/src/bdf/bdfdrivr.c diff --git a/reactos/lib/3rdparty/freetype/src/bdf/bdfdrivr.h b/lib/3rdparty/freetype/src/bdf/bdfdrivr.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/bdf/bdfdrivr.h rename to lib/3rdparty/freetype/src/bdf/bdfdrivr.h diff --git a/reactos/lib/3rdparty/freetype/src/bdf/bdferror.h b/lib/3rdparty/freetype/src/bdf/bdferror.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/bdf/bdferror.h rename to lib/3rdparty/freetype/src/bdf/bdferror.h diff --git a/reactos/lib/3rdparty/freetype/src/bdf/bdflib.c b/lib/3rdparty/freetype/src/bdf/bdflib.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/bdf/bdflib.c rename to lib/3rdparty/freetype/src/bdf/bdflib.c diff --git a/reactos/lib/3rdparty/freetype/src/bdf/module.mk b/lib/3rdparty/freetype/src/bdf/module.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/bdf/module.mk rename to lib/3rdparty/freetype/src/bdf/module.mk diff --git a/reactos/lib/3rdparty/freetype/src/bdf/rules.mk b/lib/3rdparty/freetype/src/bdf/rules.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/bdf/rules.mk rename to lib/3rdparty/freetype/src/bdf/rules.mk diff --git a/reactos/lib/3rdparty/freetype/src/cache/Jamfile b/lib/3rdparty/freetype/src/cache/Jamfile similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cache/Jamfile rename to lib/3rdparty/freetype/src/cache/Jamfile diff --git a/reactos/lib/3rdparty/freetype/src/cache/ftcache.c b/lib/3rdparty/freetype/src/cache/ftcache.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cache/ftcache.c rename to lib/3rdparty/freetype/src/cache/ftcache.c diff --git a/reactos/lib/3rdparty/freetype/src/cache/ftcbasic.c b/lib/3rdparty/freetype/src/cache/ftcbasic.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cache/ftcbasic.c rename to lib/3rdparty/freetype/src/cache/ftcbasic.c diff --git a/reactos/lib/3rdparty/freetype/src/cache/ftccache.c b/lib/3rdparty/freetype/src/cache/ftccache.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cache/ftccache.c rename to lib/3rdparty/freetype/src/cache/ftccache.c diff --git a/reactos/lib/3rdparty/freetype/src/cache/ftccache.h b/lib/3rdparty/freetype/src/cache/ftccache.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cache/ftccache.h rename to lib/3rdparty/freetype/src/cache/ftccache.h diff --git a/reactos/lib/3rdparty/freetype/src/cache/ftccback.h b/lib/3rdparty/freetype/src/cache/ftccback.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cache/ftccback.h rename to lib/3rdparty/freetype/src/cache/ftccback.h diff --git a/reactos/lib/3rdparty/freetype/src/cache/ftccmap.c b/lib/3rdparty/freetype/src/cache/ftccmap.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cache/ftccmap.c rename to lib/3rdparty/freetype/src/cache/ftccmap.c diff --git a/reactos/lib/3rdparty/freetype/src/cache/ftcerror.h b/lib/3rdparty/freetype/src/cache/ftcerror.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cache/ftcerror.h rename to lib/3rdparty/freetype/src/cache/ftcerror.h diff --git a/reactos/lib/3rdparty/freetype/src/cache/ftcglyph.c b/lib/3rdparty/freetype/src/cache/ftcglyph.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cache/ftcglyph.c rename to lib/3rdparty/freetype/src/cache/ftcglyph.c diff --git a/reactos/lib/3rdparty/freetype/src/cache/ftcglyph.h b/lib/3rdparty/freetype/src/cache/ftcglyph.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cache/ftcglyph.h rename to lib/3rdparty/freetype/src/cache/ftcglyph.h diff --git a/reactos/lib/3rdparty/freetype/src/cache/ftcimage.c b/lib/3rdparty/freetype/src/cache/ftcimage.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cache/ftcimage.c rename to lib/3rdparty/freetype/src/cache/ftcimage.c diff --git a/reactos/lib/3rdparty/freetype/src/cache/ftcimage.h b/lib/3rdparty/freetype/src/cache/ftcimage.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cache/ftcimage.h rename to lib/3rdparty/freetype/src/cache/ftcimage.h diff --git a/reactos/lib/3rdparty/freetype/src/cache/ftcmanag.c b/lib/3rdparty/freetype/src/cache/ftcmanag.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cache/ftcmanag.c rename to lib/3rdparty/freetype/src/cache/ftcmanag.c diff --git a/reactos/lib/3rdparty/freetype/src/cache/ftcmanag.h b/lib/3rdparty/freetype/src/cache/ftcmanag.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cache/ftcmanag.h rename to lib/3rdparty/freetype/src/cache/ftcmanag.h diff --git a/reactos/lib/3rdparty/freetype/src/cache/ftcmru.c b/lib/3rdparty/freetype/src/cache/ftcmru.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cache/ftcmru.c rename to lib/3rdparty/freetype/src/cache/ftcmru.c diff --git a/reactos/lib/3rdparty/freetype/src/cache/ftcmru.h b/lib/3rdparty/freetype/src/cache/ftcmru.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cache/ftcmru.h rename to lib/3rdparty/freetype/src/cache/ftcmru.h diff --git a/reactos/lib/3rdparty/freetype/src/cache/ftcsbits.c b/lib/3rdparty/freetype/src/cache/ftcsbits.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cache/ftcsbits.c rename to lib/3rdparty/freetype/src/cache/ftcsbits.c diff --git a/reactos/lib/3rdparty/freetype/src/cache/ftcsbits.h b/lib/3rdparty/freetype/src/cache/ftcsbits.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cache/ftcsbits.h rename to lib/3rdparty/freetype/src/cache/ftcsbits.h diff --git a/reactos/lib/3rdparty/freetype/src/cache/rules.mk b/lib/3rdparty/freetype/src/cache/rules.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cache/rules.mk rename to lib/3rdparty/freetype/src/cache/rules.mk diff --git a/reactos/lib/3rdparty/freetype/src/cff/Jamfile b/lib/3rdparty/freetype/src/cff/Jamfile similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cff/Jamfile rename to lib/3rdparty/freetype/src/cff/Jamfile diff --git a/reactos/lib/3rdparty/freetype/src/cff/cff.c b/lib/3rdparty/freetype/src/cff/cff.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cff/cff.c rename to lib/3rdparty/freetype/src/cff/cff.c diff --git a/reactos/lib/3rdparty/freetype/src/cff/cffcmap.c b/lib/3rdparty/freetype/src/cff/cffcmap.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cff/cffcmap.c rename to lib/3rdparty/freetype/src/cff/cffcmap.c diff --git a/reactos/lib/3rdparty/freetype/src/cff/cffcmap.h b/lib/3rdparty/freetype/src/cff/cffcmap.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cff/cffcmap.h rename to lib/3rdparty/freetype/src/cff/cffcmap.h diff --git a/reactos/lib/3rdparty/freetype/src/cff/cffdrivr.c b/lib/3rdparty/freetype/src/cff/cffdrivr.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cff/cffdrivr.c rename to lib/3rdparty/freetype/src/cff/cffdrivr.c diff --git a/reactos/lib/3rdparty/freetype/src/cff/cffdrivr.h b/lib/3rdparty/freetype/src/cff/cffdrivr.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cff/cffdrivr.h rename to lib/3rdparty/freetype/src/cff/cffdrivr.h diff --git a/reactos/lib/3rdparty/freetype/src/cff/cfferrs.h b/lib/3rdparty/freetype/src/cff/cfferrs.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cff/cfferrs.h rename to lib/3rdparty/freetype/src/cff/cfferrs.h diff --git a/reactos/lib/3rdparty/freetype/src/cff/cffgload.c b/lib/3rdparty/freetype/src/cff/cffgload.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cff/cffgload.c rename to lib/3rdparty/freetype/src/cff/cffgload.c diff --git a/reactos/lib/3rdparty/freetype/src/cff/cffgload.h b/lib/3rdparty/freetype/src/cff/cffgload.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cff/cffgload.h rename to lib/3rdparty/freetype/src/cff/cffgload.h diff --git a/reactos/lib/3rdparty/freetype/src/cff/cffload.c b/lib/3rdparty/freetype/src/cff/cffload.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cff/cffload.c rename to lib/3rdparty/freetype/src/cff/cffload.c diff --git a/reactos/lib/3rdparty/freetype/src/cff/cffload.h b/lib/3rdparty/freetype/src/cff/cffload.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cff/cffload.h rename to lib/3rdparty/freetype/src/cff/cffload.h diff --git a/reactos/lib/3rdparty/freetype/src/cff/cffobjs.c b/lib/3rdparty/freetype/src/cff/cffobjs.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cff/cffobjs.c rename to lib/3rdparty/freetype/src/cff/cffobjs.c diff --git a/reactos/lib/3rdparty/freetype/src/cff/cffobjs.h b/lib/3rdparty/freetype/src/cff/cffobjs.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cff/cffobjs.h rename to lib/3rdparty/freetype/src/cff/cffobjs.h diff --git a/reactos/lib/3rdparty/freetype/src/cff/cffparse.c b/lib/3rdparty/freetype/src/cff/cffparse.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cff/cffparse.c rename to lib/3rdparty/freetype/src/cff/cffparse.c diff --git a/reactos/lib/3rdparty/freetype/src/cff/cffparse.h b/lib/3rdparty/freetype/src/cff/cffparse.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cff/cffparse.h rename to lib/3rdparty/freetype/src/cff/cffparse.h diff --git a/reactos/lib/3rdparty/freetype/src/cff/cffpic.c b/lib/3rdparty/freetype/src/cff/cffpic.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cff/cffpic.c rename to lib/3rdparty/freetype/src/cff/cffpic.c diff --git a/reactos/lib/3rdparty/freetype/src/cff/cffpic.h b/lib/3rdparty/freetype/src/cff/cffpic.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cff/cffpic.h rename to lib/3rdparty/freetype/src/cff/cffpic.h diff --git a/reactos/lib/3rdparty/freetype/src/cff/cfftoken.h b/lib/3rdparty/freetype/src/cff/cfftoken.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cff/cfftoken.h rename to lib/3rdparty/freetype/src/cff/cfftoken.h diff --git a/reactos/lib/3rdparty/freetype/src/cff/cfftypes.h b/lib/3rdparty/freetype/src/cff/cfftypes.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cff/cfftypes.h rename to lib/3rdparty/freetype/src/cff/cfftypes.h diff --git a/reactos/lib/3rdparty/freetype/src/cff/module.mk b/lib/3rdparty/freetype/src/cff/module.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cff/module.mk rename to lib/3rdparty/freetype/src/cff/module.mk diff --git a/reactos/lib/3rdparty/freetype/src/cff/rules.mk b/lib/3rdparty/freetype/src/cff/rules.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cff/rules.mk rename to lib/3rdparty/freetype/src/cff/rules.mk diff --git a/reactos/lib/3rdparty/freetype/src/cid/Jamfile b/lib/3rdparty/freetype/src/cid/Jamfile similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cid/Jamfile rename to lib/3rdparty/freetype/src/cid/Jamfile diff --git a/reactos/lib/3rdparty/freetype/src/cid/ciderrs.h b/lib/3rdparty/freetype/src/cid/ciderrs.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cid/ciderrs.h rename to lib/3rdparty/freetype/src/cid/ciderrs.h diff --git a/reactos/lib/3rdparty/freetype/src/cid/cidgload.c b/lib/3rdparty/freetype/src/cid/cidgload.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cid/cidgload.c rename to lib/3rdparty/freetype/src/cid/cidgload.c diff --git a/reactos/lib/3rdparty/freetype/src/cid/cidgload.h b/lib/3rdparty/freetype/src/cid/cidgload.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cid/cidgload.h rename to lib/3rdparty/freetype/src/cid/cidgload.h diff --git a/reactos/lib/3rdparty/freetype/src/cid/cidload.c b/lib/3rdparty/freetype/src/cid/cidload.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cid/cidload.c rename to lib/3rdparty/freetype/src/cid/cidload.c diff --git a/reactos/lib/3rdparty/freetype/src/cid/cidload.h b/lib/3rdparty/freetype/src/cid/cidload.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cid/cidload.h rename to lib/3rdparty/freetype/src/cid/cidload.h diff --git a/reactos/lib/3rdparty/freetype/src/cid/cidobjs.c b/lib/3rdparty/freetype/src/cid/cidobjs.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cid/cidobjs.c rename to lib/3rdparty/freetype/src/cid/cidobjs.c diff --git a/reactos/lib/3rdparty/freetype/src/cid/cidobjs.h b/lib/3rdparty/freetype/src/cid/cidobjs.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cid/cidobjs.h rename to lib/3rdparty/freetype/src/cid/cidobjs.h diff --git a/reactos/lib/3rdparty/freetype/src/cid/cidparse.c b/lib/3rdparty/freetype/src/cid/cidparse.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cid/cidparse.c rename to lib/3rdparty/freetype/src/cid/cidparse.c diff --git a/reactos/lib/3rdparty/freetype/src/cid/cidparse.h b/lib/3rdparty/freetype/src/cid/cidparse.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cid/cidparse.h rename to lib/3rdparty/freetype/src/cid/cidparse.h diff --git a/reactos/lib/3rdparty/freetype/src/cid/cidriver.c b/lib/3rdparty/freetype/src/cid/cidriver.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cid/cidriver.c rename to lib/3rdparty/freetype/src/cid/cidriver.c diff --git a/reactos/lib/3rdparty/freetype/src/cid/cidriver.h b/lib/3rdparty/freetype/src/cid/cidriver.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cid/cidriver.h rename to lib/3rdparty/freetype/src/cid/cidriver.h diff --git a/reactos/lib/3rdparty/freetype/src/cid/cidtoken.h b/lib/3rdparty/freetype/src/cid/cidtoken.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cid/cidtoken.h rename to lib/3rdparty/freetype/src/cid/cidtoken.h diff --git a/reactos/lib/3rdparty/freetype/src/cid/module.mk b/lib/3rdparty/freetype/src/cid/module.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cid/module.mk rename to lib/3rdparty/freetype/src/cid/module.mk diff --git a/reactos/lib/3rdparty/freetype/src/cid/rules.mk b/lib/3rdparty/freetype/src/cid/rules.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cid/rules.mk rename to lib/3rdparty/freetype/src/cid/rules.mk diff --git a/reactos/lib/3rdparty/freetype/src/cid/type1cid.c b/lib/3rdparty/freetype/src/cid/type1cid.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/cid/type1cid.c rename to lib/3rdparty/freetype/src/cid/type1cid.c diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/Jamfile b/lib/3rdparty/freetype/src/gxvalid/Jamfile similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/Jamfile rename to lib/3rdparty/freetype/src/gxvalid/Jamfile diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/README b/lib/3rdparty/freetype/src/gxvalid/README similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/README rename to lib/3rdparty/freetype/src/gxvalid/README diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvalid.c b/lib/3rdparty/freetype/src/gxvalid/gxvalid.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvalid.c rename to lib/3rdparty/freetype/src/gxvalid/gxvalid.c diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvalid.h b/lib/3rdparty/freetype/src/gxvalid/gxvalid.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvalid.h rename to lib/3rdparty/freetype/src/gxvalid/gxvalid.h diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvbsln.c b/lib/3rdparty/freetype/src/gxvalid/gxvbsln.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvbsln.c rename to lib/3rdparty/freetype/src/gxvalid/gxvbsln.c diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvcommn.c b/lib/3rdparty/freetype/src/gxvalid/gxvcommn.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvcommn.c rename to lib/3rdparty/freetype/src/gxvalid/gxvcommn.c diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvcommn.h b/lib/3rdparty/freetype/src/gxvalid/gxvcommn.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvcommn.h rename to lib/3rdparty/freetype/src/gxvalid/gxvcommn.h diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxverror.h b/lib/3rdparty/freetype/src/gxvalid/gxverror.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxverror.h rename to lib/3rdparty/freetype/src/gxvalid/gxverror.h diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvfeat.c b/lib/3rdparty/freetype/src/gxvalid/gxvfeat.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvfeat.c rename to lib/3rdparty/freetype/src/gxvalid/gxvfeat.c diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvfeat.h b/lib/3rdparty/freetype/src/gxvalid/gxvfeat.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvfeat.h rename to lib/3rdparty/freetype/src/gxvalid/gxvfeat.h diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvfgen.c b/lib/3rdparty/freetype/src/gxvalid/gxvfgen.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvfgen.c rename to lib/3rdparty/freetype/src/gxvalid/gxvfgen.c diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvjust.c b/lib/3rdparty/freetype/src/gxvalid/gxvjust.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvjust.c rename to lib/3rdparty/freetype/src/gxvalid/gxvjust.c diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvkern.c b/lib/3rdparty/freetype/src/gxvalid/gxvkern.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvkern.c rename to lib/3rdparty/freetype/src/gxvalid/gxvkern.c diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvlcar.c b/lib/3rdparty/freetype/src/gxvalid/gxvlcar.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvlcar.c rename to lib/3rdparty/freetype/src/gxvalid/gxvlcar.c diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvmod.c b/lib/3rdparty/freetype/src/gxvalid/gxvmod.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvmod.c rename to lib/3rdparty/freetype/src/gxvalid/gxvmod.c diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvmod.h b/lib/3rdparty/freetype/src/gxvalid/gxvmod.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvmod.h rename to lib/3rdparty/freetype/src/gxvalid/gxvmod.h diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvmort.c b/lib/3rdparty/freetype/src/gxvalid/gxvmort.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvmort.c rename to lib/3rdparty/freetype/src/gxvalid/gxvmort.c diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvmort.h b/lib/3rdparty/freetype/src/gxvalid/gxvmort.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvmort.h rename to lib/3rdparty/freetype/src/gxvalid/gxvmort.h diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvmort0.c b/lib/3rdparty/freetype/src/gxvalid/gxvmort0.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvmort0.c rename to lib/3rdparty/freetype/src/gxvalid/gxvmort0.c diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvmort1.c b/lib/3rdparty/freetype/src/gxvalid/gxvmort1.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvmort1.c rename to lib/3rdparty/freetype/src/gxvalid/gxvmort1.c diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvmort2.c b/lib/3rdparty/freetype/src/gxvalid/gxvmort2.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvmort2.c rename to lib/3rdparty/freetype/src/gxvalid/gxvmort2.c diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvmort4.c b/lib/3rdparty/freetype/src/gxvalid/gxvmort4.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvmort4.c rename to lib/3rdparty/freetype/src/gxvalid/gxvmort4.c diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvmort5.c b/lib/3rdparty/freetype/src/gxvalid/gxvmort5.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvmort5.c rename to lib/3rdparty/freetype/src/gxvalid/gxvmort5.c diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvmorx.c b/lib/3rdparty/freetype/src/gxvalid/gxvmorx.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvmorx.c rename to lib/3rdparty/freetype/src/gxvalid/gxvmorx.c diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvmorx.h b/lib/3rdparty/freetype/src/gxvalid/gxvmorx.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvmorx.h rename to lib/3rdparty/freetype/src/gxvalid/gxvmorx.h diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvmorx0.c b/lib/3rdparty/freetype/src/gxvalid/gxvmorx0.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvmorx0.c rename to lib/3rdparty/freetype/src/gxvalid/gxvmorx0.c diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvmorx1.c b/lib/3rdparty/freetype/src/gxvalid/gxvmorx1.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvmorx1.c rename to lib/3rdparty/freetype/src/gxvalid/gxvmorx1.c diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvmorx2.c b/lib/3rdparty/freetype/src/gxvalid/gxvmorx2.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvmorx2.c rename to lib/3rdparty/freetype/src/gxvalid/gxvmorx2.c diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvmorx4.c b/lib/3rdparty/freetype/src/gxvalid/gxvmorx4.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvmorx4.c rename to lib/3rdparty/freetype/src/gxvalid/gxvmorx4.c diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvmorx5.c b/lib/3rdparty/freetype/src/gxvalid/gxvmorx5.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvmorx5.c rename to lib/3rdparty/freetype/src/gxvalid/gxvmorx5.c diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvopbd.c b/lib/3rdparty/freetype/src/gxvalid/gxvopbd.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvopbd.c rename to lib/3rdparty/freetype/src/gxvalid/gxvopbd.c diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvprop.c b/lib/3rdparty/freetype/src/gxvalid/gxvprop.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvprop.c rename to lib/3rdparty/freetype/src/gxvalid/gxvprop.c diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/gxvtrak.c b/lib/3rdparty/freetype/src/gxvalid/gxvtrak.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/gxvtrak.c rename to lib/3rdparty/freetype/src/gxvalid/gxvtrak.c diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/module.mk b/lib/3rdparty/freetype/src/gxvalid/module.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/module.mk rename to lib/3rdparty/freetype/src/gxvalid/module.mk diff --git a/reactos/lib/3rdparty/freetype/src/gxvalid/rules.mk b/lib/3rdparty/freetype/src/gxvalid/rules.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gxvalid/rules.mk rename to lib/3rdparty/freetype/src/gxvalid/rules.mk diff --git a/reactos/lib/3rdparty/freetype/src/gzip/Jamfile b/lib/3rdparty/freetype/src/gzip/Jamfile similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gzip/Jamfile rename to lib/3rdparty/freetype/src/gzip/Jamfile diff --git a/reactos/lib/3rdparty/freetype/src/gzip/adler32.c b/lib/3rdparty/freetype/src/gzip/adler32.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gzip/adler32.c rename to lib/3rdparty/freetype/src/gzip/adler32.c diff --git a/reactos/lib/3rdparty/freetype/src/gzip/ftgzip.c b/lib/3rdparty/freetype/src/gzip/ftgzip.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gzip/ftgzip.c rename to lib/3rdparty/freetype/src/gzip/ftgzip.c diff --git a/reactos/lib/3rdparty/freetype/src/gzip/infblock.c b/lib/3rdparty/freetype/src/gzip/infblock.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gzip/infblock.c rename to lib/3rdparty/freetype/src/gzip/infblock.c diff --git a/reactos/lib/3rdparty/freetype/src/gzip/infblock.h b/lib/3rdparty/freetype/src/gzip/infblock.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gzip/infblock.h rename to lib/3rdparty/freetype/src/gzip/infblock.h diff --git a/reactos/lib/3rdparty/freetype/src/gzip/infcodes.c b/lib/3rdparty/freetype/src/gzip/infcodes.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gzip/infcodes.c rename to lib/3rdparty/freetype/src/gzip/infcodes.c diff --git a/reactos/lib/3rdparty/freetype/src/gzip/infcodes.h b/lib/3rdparty/freetype/src/gzip/infcodes.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gzip/infcodes.h rename to lib/3rdparty/freetype/src/gzip/infcodes.h diff --git a/reactos/lib/3rdparty/freetype/src/gzip/inffixed.h b/lib/3rdparty/freetype/src/gzip/inffixed.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gzip/inffixed.h rename to lib/3rdparty/freetype/src/gzip/inffixed.h diff --git a/reactos/lib/3rdparty/freetype/src/gzip/inflate.c b/lib/3rdparty/freetype/src/gzip/inflate.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gzip/inflate.c rename to lib/3rdparty/freetype/src/gzip/inflate.c diff --git a/reactos/lib/3rdparty/freetype/src/gzip/inftrees.c b/lib/3rdparty/freetype/src/gzip/inftrees.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gzip/inftrees.c rename to lib/3rdparty/freetype/src/gzip/inftrees.c diff --git a/reactos/lib/3rdparty/freetype/src/gzip/inftrees.h b/lib/3rdparty/freetype/src/gzip/inftrees.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gzip/inftrees.h rename to lib/3rdparty/freetype/src/gzip/inftrees.h diff --git a/reactos/lib/3rdparty/freetype/src/gzip/infutil.c b/lib/3rdparty/freetype/src/gzip/infutil.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gzip/infutil.c rename to lib/3rdparty/freetype/src/gzip/infutil.c diff --git a/reactos/lib/3rdparty/freetype/src/gzip/infutil.h b/lib/3rdparty/freetype/src/gzip/infutil.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gzip/infutil.h rename to lib/3rdparty/freetype/src/gzip/infutil.h diff --git a/reactos/lib/3rdparty/freetype/src/gzip/rules.mk b/lib/3rdparty/freetype/src/gzip/rules.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gzip/rules.mk rename to lib/3rdparty/freetype/src/gzip/rules.mk diff --git a/reactos/lib/3rdparty/freetype/src/gzip/zconf.h b/lib/3rdparty/freetype/src/gzip/zconf.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gzip/zconf.h rename to lib/3rdparty/freetype/src/gzip/zconf.h diff --git a/reactos/lib/3rdparty/freetype/src/gzip/zlib.h b/lib/3rdparty/freetype/src/gzip/zlib.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gzip/zlib.h rename to lib/3rdparty/freetype/src/gzip/zlib.h diff --git a/reactos/lib/3rdparty/freetype/src/gzip/zutil.c b/lib/3rdparty/freetype/src/gzip/zutil.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gzip/zutil.c rename to lib/3rdparty/freetype/src/gzip/zutil.c diff --git a/reactos/lib/3rdparty/freetype/src/gzip/zutil.h b/lib/3rdparty/freetype/src/gzip/zutil.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/gzip/zutil.h rename to lib/3rdparty/freetype/src/gzip/zutil.h diff --git a/reactos/lib/3rdparty/freetype/src/lzw/Jamfile b/lib/3rdparty/freetype/src/lzw/Jamfile similarity index 100% rename from reactos/lib/3rdparty/freetype/src/lzw/Jamfile rename to lib/3rdparty/freetype/src/lzw/Jamfile diff --git a/reactos/lib/3rdparty/freetype/src/lzw/ftlzw.c b/lib/3rdparty/freetype/src/lzw/ftlzw.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/lzw/ftlzw.c rename to lib/3rdparty/freetype/src/lzw/ftlzw.c diff --git a/reactos/lib/3rdparty/freetype/src/lzw/ftzopen.c b/lib/3rdparty/freetype/src/lzw/ftzopen.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/lzw/ftzopen.c rename to lib/3rdparty/freetype/src/lzw/ftzopen.c diff --git a/reactos/lib/3rdparty/freetype/src/lzw/ftzopen.h b/lib/3rdparty/freetype/src/lzw/ftzopen.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/lzw/ftzopen.h rename to lib/3rdparty/freetype/src/lzw/ftzopen.h diff --git a/reactos/lib/3rdparty/freetype/src/lzw/rules.mk b/lib/3rdparty/freetype/src/lzw/rules.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/lzw/rules.mk rename to lib/3rdparty/freetype/src/lzw/rules.mk diff --git a/reactos/lib/3rdparty/freetype/src/otvalid/Jamfile b/lib/3rdparty/freetype/src/otvalid/Jamfile similarity index 100% rename from reactos/lib/3rdparty/freetype/src/otvalid/Jamfile rename to lib/3rdparty/freetype/src/otvalid/Jamfile diff --git a/reactos/lib/3rdparty/freetype/src/otvalid/module.mk b/lib/3rdparty/freetype/src/otvalid/module.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/otvalid/module.mk rename to lib/3rdparty/freetype/src/otvalid/module.mk diff --git a/reactos/lib/3rdparty/freetype/src/otvalid/otvalid.c b/lib/3rdparty/freetype/src/otvalid/otvalid.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/otvalid/otvalid.c rename to lib/3rdparty/freetype/src/otvalid/otvalid.c diff --git a/reactos/lib/3rdparty/freetype/src/otvalid/otvalid.h b/lib/3rdparty/freetype/src/otvalid/otvalid.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/otvalid/otvalid.h rename to lib/3rdparty/freetype/src/otvalid/otvalid.h diff --git a/reactos/lib/3rdparty/freetype/src/otvalid/otvbase.c b/lib/3rdparty/freetype/src/otvalid/otvbase.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/otvalid/otvbase.c rename to lib/3rdparty/freetype/src/otvalid/otvbase.c diff --git a/reactos/lib/3rdparty/freetype/src/otvalid/otvcommn.c b/lib/3rdparty/freetype/src/otvalid/otvcommn.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/otvalid/otvcommn.c rename to lib/3rdparty/freetype/src/otvalid/otvcommn.c diff --git a/reactos/lib/3rdparty/freetype/src/otvalid/otvcommn.h b/lib/3rdparty/freetype/src/otvalid/otvcommn.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/otvalid/otvcommn.h rename to lib/3rdparty/freetype/src/otvalid/otvcommn.h diff --git a/reactos/lib/3rdparty/freetype/src/otvalid/otverror.h b/lib/3rdparty/freetype/src/otvalid/otverror.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/otvalid/otverror.h rename to lib/3rdparty/freetype/src/otvalid/otverror.h diff --git a/reactos/lib/3rdparty/freetype/src/otvalid/otvgdef.c b/lib/3rdparty/freetype/src/otvalid/otvgdef.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/otvalid/otvgdef.c rename to lib/3rdparty/freetype/src/otvalid/otvgdef.c diff --git a/reactos/lib/3rdparty/freetype/src/otvalid/otvgpos.c b/lib/3rdparty/freetype/src/otvalid/otvgpos.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/otvalid/otvgpos.c rename to lib/3rdparty/freetype/src/otvalid/otvgpos.c diff --git a/reactos/lib/3rdparty/freetype/src/otvalid/otvgpos.h b/lib/3rdparty/freetype/src/otvalid/otvgpos.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/otvalid/otvgpos.h rename to lib/3rdparty/freetype/src/otvalid/otvgpos.h diff --git a/reactos/lib/3rdparty/freetype/src/otvalid/otvgsub.c b/lib/3rdparty/freetype/src/otvalid/otvgsub.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/otvalid/otvgsub.c rename to lib/3rdparty/freetype/src/otvalid/otvgsub.c diff --git a/reactos/lib/3rdparty/freetype/src/otvalid/otvjstf.c b/lib/3rdparty/freetype/src/otvalid/otvjstf.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/otvalid/otvjstf.c rename to lib/3rdparty/freetype/src/otvalid/otvjstf.c diff --git a/reactos/lib/3rdparty/freetype/src/otvalid/otvmath.c b/lib/3rdparty/freetype/src/otvalid/otvmath.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/otvalid/otvmath.c rename to lib/3rdparty/freetype/src/otvalid/otvmath.c diff --git a/reactos/lib/3rdparty/freetype/src/otvalid/otvmod.c b/lib/3rdparty/freetype/src/otvalid/otvmod.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/otvalid/otvmod.c rename to lib/3rdparty/freetype/src/otvalid/otvmod.c diff --git a/reactos/lib/3rdparty/freetype/src/otvalid/otvmod.h b/lib/3rdparty/freetype/src/otvalid/otvmod.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/otvalid/otvmod.h rename to lib/3rdparty/freetype/src/otvalid/otvmod.h diff --git a/reactos/lib/3rdparty/freetype/src/otvalid/rules.mk b/lib/3rdparty/freetype/src/otvalid/rules.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/otvalid/rules.mk rename to lib/3rdparty/freetype/src/otvalid/rules.mk diff --git a/reactos/lib/3rdparty/freetype/src/pcf/Jamfile b/lib/3rdparty/freetype/src/pcf/Jamfile similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pcf/Jamfile rename to lib/3rdparty/freetype/src/pcf/Jamfile diff --git a/reactos/lib/3rdparty/freetype/src/pcf/README b/lib/3rdparty/freetype/src/pcf/README similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pcf/README rename to lib/3rdparty/freetype/src/pcf/README diff --git a/reactos/lib/3rdparty/freetype/src/pcf/module.mk b/lib/3rdparty/freetype/src/pcf/module.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pcf/module.mk rename to lib/3rdparty/freetype/src/pcf/module.mk diff --git a/reactos/lib/3rdparty/freetype/src/pcf/pcf.c b/lib/3rdparty/freetype/src/pcf/pcf.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pcf/pcf.c rename to lib/3rdparty/freetype/src/pcf/pcf.c diff --git a/reactos/lib/3rdparty/freetype/src/pcf/pcf.h b/lib/3rdparty/freetype/src/pcf/pcf.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pcf/pcf.h rename to lib/3rdparty/freetype/src/pcf/pcf.h diff --git a/reactos/lib/3rdparty/freetype/src/pcf/pcfdrivr.c b/lib/3rdparty/freetype/src/pcf/pcfdrivr.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pcf/pcfdrivr.c rename to lib/3rdparty/freetype/src/pcf/pcfdrivr.c diff --git a/reactos/lib/3rdparty/freetype/src/pcf/pcfdrivr.h b/lib/3rdparty/freetype/src/pcf/pcfdrivr.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pcf/pcfdrivr.h rename to lib/3rdparty/freetype/src/pcf/pcfdrivr.h diff --git a/reactos/lib/3rdparty/freetype/src/pcf/pcferror.h b/lib/3rdparty/freetype/src/pcf/pcferror.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pcf/pcferror.h rename to lib/3rdparty/freetype/src/pcf/pcferror.h diff --git a/reactos/lib/3rdparty/freetype/src/pcf/pcfread.c b/lib/3rdparty/freetype/src/pcf/pcfread.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pcf/pcfread.c rename to lib/3rdparty/freetype/src/pcf/pcfread.c diff --git a/reactos/lib/3rdparty/freetype/src/pcf/pcfread.h b/lib/3rdparty/freetype/src/pcf/pcfread.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pcf/pcfread.h rename to lib/3rdparty/freetype/src/pcf/pcfread.h diff --git a/reactos/lib/3rdparty/freetype/src/pcf/pcfutil.c b/lib/3rdparty/freetype/src/pcf/pcfutil.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pcf/pcfutil.c rename to lib/3rdparty/freetype/src/pcf/pcfutil.c diff --git a/reactos/lib/3rdparty/freetype/src/pcf/pcfutil.h b/lib/3rdparty/freetype/src/pcf/pcfutil.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pcf/pcfutil.h rename to lib/3rdparty/freetype/src/pcf/pcfutil.h diff --git a/reactos/lib/3rdparty/freetype/src/pcf/rules.mk b/lib/3rdparty/freetype/src/pcf/rules.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pcf/rules.mk rename to lib/3rdparty/freetype/src/pcf/rules.mk diff --git a/reactos/lib/3rdparty/freetype/src/pfr/Jamfile b/lib/3rdparty/freetype/src/pfr/Jamfile similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pfr/Jamfile rename to lib/3rdparty/freetype/src/pfr/Jamfile diff --git a/reactos/lib/3rdparty/freetype/src/pfr/module.mk b/lib/3rdparty/freetype/src/pfr/module.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pfr/module.mk rename to lib/3rdparty/freetype/src/pfr/module.mk diff --git a/reactos/lib/3rdparty/freetype/src/pfr/pfr.c b/lib/3rdparty/freetype/src/pfr/pfr.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pfr/pfr.c rename to lib/3rdparty/freetype/src/pfr/pfr.c diff --git a/reactos/lib/3rdparty/freetype/src/pfr/pfrcmap.c b/lib/3rdparty/freetype/src/pfr/pfrcmap.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pfr/pfrcmap.c rename to lib/3rdparty/freetype/src/pfr/pfrcmap.c diff --git a/reactos/lib/3rdparty/freetype/src/pfr/pfrcmap.h b/lib/3rdparty/freetype/src/pfr/pfrcmap.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pfr/pfrcmap.h rename to lib/3rdparty/freetype/src/pfr/pfrcmap.h diff --git a/reactos/lib/3rdparty/freetype/src/pfr/pfrdrivr.c b/lib/3rdparty/freetype/src/pfr/pfrdrivr.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pfr/pfrdrivr.c rename to lib/3rdparty/freetype/src/pfr/pfrdrivr.c diff --git a/reactos/lib/3rdparty/freetype/src/pfr/pfrdrivr.h b/lib/3rdparty/freetype/src/pfr/pfrdrivr.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pfr/pfrdrivr.h rename to lib/3rdparty/freetype/src/pfr/pfrdrivr.h diff --git a/reactos/lib/3rdparty/freetype/src/pfr/pfrerror.h b/lib/3rdparty/freetype/src/pfr/pfrerror.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pfr/pfrerror.h rename to lib/3rdparty/freetype/src/pfr/pfrerror.h diff --git a/reactos/lib/3rdparty/freetype/src/pfr/pfrgload.c b/lib/3rdparty/freetype/src/pfr/pfrgload.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pfr/pfrgload.c rename to lib/3rdparty/freetype/src/pfr/pfrgload.c diff --git a/reactos/lib/3rdparty/freetype/src/pfr/pfrgload.h b/lib/3rdparty/freetype/src/pfr/pfrgload.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pfr/pfrgload.h rename to lib/3rdparty/freetype/src/pfr/pfrgload.h diff --git a/reactos/lib/3rdparty/freetype/src/pfr/pfrload.c b/lib/3rdparty/freetype/src/pfr/pfrload.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pfr/pfrload.c rename to lib/3rdparty/freetype/src/pfr/pfrload.c diff --git a/reactos/lib/3rdparty/freetype/src/pfr/pfrload.h b/lib/3rdparty/freetype/src/pfr/pfrload.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pfr/pfrload.h rename to lib/3rdparty/freetype/src/pfr/pfrload.h diff --git a/reactos/lib/3rdparty/freetype/src/pfr/pfrobjs.c b/lib/3rdparty/freetype/src/pfr/pfrobjs.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pfr/pfrobjs.c rename to lib/3rdparty/freetype/src/pfr/pfrobjs.c diff --git a/reactos/lib/3rdparty/freetype/src/pfr/pfrobjs.h b/lib/3rdparty/freetype/src/pfr/pfrobjs.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pfr/pfrobjs.h rename to lib/3rdparty/freetype/src/pfr/pfrobjs.h diff --git a/reactos/lib/3rdparty/freetype/src/pfr/pfrsbit.c b/lib/3rdparty/freetype/src/pfr/pfrsbit.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pfr/pfrsbit.c rename to lib/3rdparty/freetype/src/pfr/pfrsbit.c diff --git a/reactos/lib/3rdparty/freetype/src/pfr/pfrsbit.h b/lib/3rdparty/freetype/src/pfr/pfrsbit.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pfr/pfrsbit.h rename to lib/3rdparty/freetype/src/pfr/pfrsbit.h diff --git a/reactos/lib/3rdparty/freetype/src/pfr/pfrtypes.h b/lib/3rdparty/freetype/src/pfr/pfrtypes.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pfr/pfrtypes.h rename to lib/3rdparty/freetype/src/pfr/pfrtypes.h diff --git a/reactos/lib/3rdparty/freetype/src/pfr/rules.mk b/lib/3rdparty/freetype/src/pfr/rules.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pfr/rules.mk rename to lib/3rdparty/freetype/src/pfr/rules.mk diff --git a/reactos/lib/3rdparty/freetype/src/psaux/Jamfile b/lib/3rdparty/freetype/src/psaux/Jamfile similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psaux/Jamfile rename to lib/3rdparty/freetype/src/psaux/Jamfile diff --git a/reactos/lib/3rdparty/freetype/src/psaux/afmparse.c b/lib/3rdparty/freetype/src/psaux/afmparse.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psaux/afmparse.c rename to lib/3rdparty/freetype/src/psaux/afmparse.c diff --git a/reactos/lib/3rdparty/freetype/src/psaux/afmparse.h b/lib/3rdparty/freetype/src/psaux/afmparse.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psaux/afmparse.h rename to lib/3rdparty/freetype/src/psaux/afmparse.h diff --git a/reactos/lib/3rdparty/freetype/src/psaux/module.mk b/lib/3rdparty/freetype/src/psaux/module.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psaux/module.mk rename to lib/3rdparty/freetype/src/psaux/module.mk diff --git a/reactos/lib/3rdparty/freetype/src/psaux/psaux.c b/lib/3rdparty/freetype/src/psaux/psaux.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psaux/psaux.c rename to lib/3rdparty/freetype/src/psaux/psaux.c diff --git a/reactos/lib/3rdparty/freetype/src/psaux/psauxerr.h b/lib/3rdparty/freetype/src/psaux/psauxerr.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psaux/psauxerr.h rename to lib/3rdparty/freetype/src/psaux/psauxerr.h diff --git a/reactos/lib/3rdparty/freetype/src/psaux/psauxmod.c b/lib/3rdparty/freetype/src/psaux/psauxmod.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psaux/psauxmod.c rename to lib/3rdparty/freetype/src/psaux/psauxmod.c diff --git a/reactos/lib/3rdparty/freetype/src/psaux/psauxmod.h b/lib/3rdparty/freetype/src/psaux/psauxmod.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psaux/psauxmod.h rename to lib/3rdparty/freetype/src/psaux/psauxmod.h diff --git a/reactos/lib/3rdparty/freetype/src/psaux/psconv.c b/lib/3rdparty/freetype/src/psaux/psconv.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psaux/psconv.c rename to lib/3rdparty/freetype/src/psaux/psconv.c diff --git a/reactos/lib/3rdparty/freetype/src/psaux/psconv.h b/lib/3rdparty/freetype/src/psaux/psconv.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psaux/psconv.h rename to lib/3rdparty/freetype/src/psaux/psconv.h diff --git a/reactos/lib/3rdparty/freetype/src/psaux/psobjs.c b/lib/3rdparty/freetype/src/psaux/psobjs.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psaux/psobjs.c rename to lib/3rdparty/freetype/src/psaux/psobjs.c diff --git a/reactos/lib/3rdparty/freetype/src/psaux/psobjs.h b/lib/3rdparty/freetype/src/psaux/psobjs.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psaux/psobjs.h rename to lib/3rdparty/freetype/src/psaux/psobjs.h diff --git a/reactos/lib/3rdparty/freetype/src/psaux/rules.mk b/lib/3rdparty/freetype/src/psaux/rules.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psaux/rules.mk rename to lib/3rdparty/freetype/src/psaux/rules.mk diff --git a/reactos/lib/3rdparty/freetype/src/psaux/t1cmap.c b/lib/3rdparty/freetype/src/psaux/t1cmap.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psaux/t1cmap.c rename to lib/3rdparty/freetype/src/psaux/t1cmap.c diff --git a/reactos/lib/3rdparty/freetype/src/psaux/t1cmap.h b/lib/3rdparty/freetype/src/psaux/t1cmap.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psaux/t1cmap.h rename to lib/3rdparty/freetype/src/psaux/t1cmap.h diff --git a/reactos/lib/3rdparty/freetype/src/psaux/t1decode.c b/lib/3rdparty/freetype/src/psaux/t1decode.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psaux/t1decode.c rename to lib/3rdparty/freetype/src/psaux/t1decode.c diff --git a/reactos/lib/3rdparty/freetype/src/psaux/t1decode.h b/lib/3rdparty/freetype/src/psaux/t1decode.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psaux/t1decode.h rename to lib/3rdparty/freetype/src/psaux/t1decode.h diff --git a/reactos/lib/3rdparty/freetype/src/pshinter/Jamfile b/lib/3rdparty/freetype/src/pshinter/Jamfile similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pshinter/Jamfile rename to lib/3rdparty/freetype/src/pshinter/Jamfile diff --git a/reactos/lib/3rdparty/freetype/src/pshinter/module.mk b/lib/3rdparty/freetype/src/pshinter/module.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pshinter/module.mk rename to lib/3rdparty/freetype/src/pshinter/module.mk diff --git a/reactos/lib/3rdparty/freetype/src/pshinter/pshalgo.c b/lib/3rdparty/freetype/src/pshinter/pshalgo.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pshinter/pshalgo.c rename to lib/3rdparty/freetype/src/pshinter/pshalgo.c diff --git a/reactos/lib/3rdparty/freetype/src/pshinter/pshalgo.h b/lib/3rdparty/freetype/src/pshinter/pshalgo.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pshinter/pshalgo.h rename to lib/3rdparty/freetype/src/pshinter/pshalgo.h diff --git a/reactos/lib/3rdparty/freetype/src/pshinter/pshglob.c b/lib/3rdparty/freetype/src/pshinter/pshglob.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pshinter/pshglob.c rename to lib/3rdparty/freetype/src/pshinter/pshglob.c diff --git a/reactos/lib/3rdparty/freetype/src/pshinter/pshglob.h b/lib/3rdparty/freetype/src/pshinter/pshglob.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pshinter/pshglob.h rename to lib/3rdparty/freetype/src/pshinter/pshglob.h diff --git a/reactos/lib/3rdparty/freetype/src/pshinter/pshinter.c b/lib/3rdparty/freetype/src/pshinter/pshinter.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pshinter/pshinter.c rename to lib/3rdparty/freetype/src/pshinter/pshinter.c diff --git a/reactos/lib/3rdparty/freetype/src/pshinter/pshmod.c b/lib/3rdparty/freetype/src/pshinter/pshmod.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pshinter/pshmod.c rename to lib/3rdparty/freetype/src/pshinter/pshmod.c diff --git a/reactos/lib/3rdparty/freetype/src/pshinter/pshmod.h b/lib/3rdparty/freetype/src/pshinter/pshmod.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pshinter/pshmod.h rename to lib/3rdparty/freetype/src/pshinter/pshmod.h diff --git a/reactos/lib/3rdparty/freetype/src/pshinter/pshnterr.h b/lib/3rdparty/freetype/src/pshinter/pshnterr.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pshinter/pshnterr.h rename to lib/3rdparty/freetype/src/pshinter/pshnterr.h diff --git a/reactos/lib/3rdparty/freetype/src/pshinter/pshpic.c b/lib/3rdparty/freetype/src/pshinter/pshpic.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pshinter/pshpic.c rename to lib/3rdparty/freetype/src/pshinter/pshpic.c diff --git a/reactos/lib/3rdparty/freetype/src/pshinter/pshpic.h b/lib/3rdparty/freetype/src/pshinter/pshpic.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pshinter/pshpic.h rename to lib/3rdparty/freetype/src/pshinter/pshpic.h diff --git a/reactos/lib/3rdparty/freetype/src/pshinter/pshrec.c b/lib/3rdparty/freetype/src/pshinter/pshrec.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pshinter/pshrec.c rename to lib/3rdparty/freetype/src/pshinter/pshrec.c diff --git a/reactos/lib/3rdparty/freetype/src/pshinter/pshrec.h b/lib/3rdparty/freetype/src/pshinter/pshrec.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pshinter/pshrec.h rename to lib/3rdparty/freetype/src/pshinter/pshrec.h diff --git a/reactos/lib/3rdparty/freetype/src/pshinter/rules.mk b/lib/3rdparty/freetype/src/pshinter/rules.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/pshinter/rules.mk rename to lib/3rdparty/freetype/src/pshinter/rules.mk diff --git a/reactos/lib/3rdparty/freetype/src/psnames/Jamfile b/lib/3rdparty/freetype/src/psnames/Jamfile similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psnames/Jamfile rename to lib/3rdparty/freetype/src/psnames/Jamfile diff --git a/reactos/lib/3rdparty/freetype/src/psnames/module.mk b/lib/3rdparty/freetype/src/psnames/module.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psnames/module.mk rename to lib/3rdparty/freetype/src/psnames/module.mk diff --git a/reactos/lib/3rdparty/freetype/src/psnames/psmodule.c b/lib/3rdparty/freetype/src/psnames/psmodule.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psnames/psmodule.c rename to lib/3rdparty/freetype/src/psnames/psmodule.c diff --git a/reactos/lib/3rdparty/freetype/src/psnames/psmodule.h b/lib/3rdparty/freetype/src/psnames/psmodule.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psnames/psmodule.h rename to lib/3rdparty/freetype/src/psnames/psmodule.h diff --git a/reactos/lib/3rdparty/freetype/src/psnames/psnamerr.h b/lib/3rdparty/freetype/src/psnames/psnamerr.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psnames/psnamerr.h rename to lib/3rdparty/freetype/src/psnames/psnamerr.h diff --git a/reactos/lib/3rdparty/freetype/src/psnames/psnames.c b/lib/3rdparty/freetype/src/psnames/psnames.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psnames/psnames.c rename to lib/3rdparty/freetype/src/psnames/psnames.c diff --git a/reactos/lib/3rdparty/freetype/src/psnames/pspic.c b/lib/3rdparty/freetype/src/psnames/pspic.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psnames/pspic.c rename to lib/3rdparty/freetype/src/psnames/pspic.c diff --git a/reactos/lib/3rdparty/freetype/src/psnames/pspic.h b/lib/3rdparty/freetype/src/psnames/pspic.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psnames/pspic.h rename to lib/3rdparty/freetype/src/psnames/pspic.h diff --git a/reactos/lib/3rdparty/freetype/src/psnames/pstables.h b/lib/3rdparty/freetype/src/psnames/pstables.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psnames/pstables.h rename to lib/3rdparty/freetype/src/psnames/pstables.h diff --git a/reactos/lib/3rdparty/freetype/src/psnames/rules.mk b/lib/3rdparty/freetype/src/psnames/rules.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/psnames/rules.mk rename to lib/3rdparty/freetype/src/psnames/rules.mk diff --git a/reactos/lib/3rdparty/freetype/src/raster/Jamfile b/lib/3rdparty/freetype/src/raster/Jamfile similarity index 100% rename from reactos/lib/3rdparty/freetype/src/raster/Jamfile rename to lib/3rdparty/freetype/src/raster/Jamfile diff --git a/reactos/lib/3rdparty/freetype/src/raster/ftmisc.h b/lib/3rdparty/freetype/src/raster/ftmisc.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/raster/ftmisc.h rename to lib/3rdparty/freetype/src/raster/ftmisc.h diff --git a/reactos/lib/3rdparty/freetype/src/raster/ftraster.c b/lib/3rdparty/freetype/src/raster/ftraster.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/raster/ftraster.c rename to lib/3rdparty/freetype/src/raster/ftraster.c diff --git a/reactos/lib/3rdparty/freetype/src/raster/ftraster.h b/lib/3rdparty/freetype/src/raster/ftraster.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/raster/ftraster.h rename to lib/3rdparty/freetype/src/raster/ftraster.h diff --git a/reactos/lib/3rdparty/freetype/src/raster/ftrend1.c b/lib/3rdparty/freetype/src/raster/ftrend1.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/raster/ftrend1.c rename to lib/3rdparty/freetype/src/raster/ftrend1.c diff --git a/reactos/lib/3rdparty/freetype/src/raster/ftrend1.h b/lib/3rdparty/freetype/src/raster/ftrend1.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/raster/ftrend1.h rename to lib/3rdparty/freetype/src/raster/ftrend1.h diff --git a/reactos/lib/3rdparty/freetype/src/raster/module.mk b/lib/3rdparty/freetype/src/raster/module.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/raster/module.mk rename to lib/3rdparty/freetype/src/raster/module.mk diff --git a/reactos/lib/3rdparty/freetype/src/raster/raster.c b/lib/3rdparty/freetype/src/raster/raster.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/raster/raster.c rename to lib/3rdparty/freetype/src/raster/raster.c diff --git a/reactos/lib/3rdparty/freetype/src/raster/rasterrs.h b/lib/3rdparty/freetype/src/raster/rasterrs.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/raster/rasterrs.h rename to lib/3rdparty/freetype/src/raster/rasterrs.h diff --git a/reactos/lib/3rdparty/freetype/src/raster/rastpic.c b/lib/3rdparty/freetype/src/raster/rastpic.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/raster/rastpic.c rename to lib/3rdparty/freetype/src/raster/rastpic.c diff --git a/reactos/lib/3rdparty/freetype/src/raster/rastpic.h b/lib/3rdparty/freetype/src/raster/rastpic.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/raster/rastpic.h rename to lib/3rdparty/freetype/src/raster/rastpic.h diff --git a/reactos/lib/3rdparty/freetype/src/raster/rules.mk b/lib/3rdparty/freetype/src/raster/rules.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/raster/rules.mk rename to lib/3rdparty/freetype/src/raster/rules.mk diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/Jamfile b/lib/3rdparty/freetype/src/sfnt/Jamfile similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/Jamfile rename to lib/3rdparty/freetype/src/sfnt/Jamfile diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/module.mk b/lib/3rdparty/freetype/src/sfnt/module.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/module.mk rename to lib/3rdparty/freetype/src/sfnt/module.mk diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/rules.mk b/lib/3rdparty/freetype/src/sfnt/rules.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/rules.mk rename to lib/3rdparty/freetype/src/sfnt/rules.mk diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/sfdriver.c b/lib/3rdparty/freetype/src/sfnt/sfdriver.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/sfdriver.c rename to lib/3rdparty/freetype/src/sfnt/sfdriver.c diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/sfdriver.h b/lib/3rdparty/freetype/src/sfnt/sfdriver.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/sfdriver.h rename to lib/3rdparty/freetype/src/sfnt/sfdriver.h diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/sferrors.h b/lib/3rdparty/freetype/src/sfnt/sferrors.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/sferrors.h rename to lib/3rdparty/freetype/src/sfnt/sferrors.h diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/sfnt.c b/lib/3rdparty/freetype/src/sfnt/sfnt.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/sfnt.c rename to lib/3rdparty/freetype/src/sfnt/sfnt.c diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/sfntpic.c b/lib/3rdparty/freetype/src/sfnt/sfntpic.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/sfntpic.c rename to lib/3rdparty/freetype/src/sfnt/sfntpic.c diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/sfntpic.h b/lib/3rdparty/freetype/src/sfnt/sfntpic.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/sfntpic.h rename to lib/3rdparty/freetype/src/sfnt/sfntpic.h diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/sfobjs.c b/lib/3rdparty/freetype/src/sfnt/sfobjs.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/sfobjs.c rename to lib/3rdparty/freetype/src/sfnt/sfobjs.c diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/sfobjs.h b/lib/3rdparty/freetype/src/sfnt/sfobjs.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/sfobjs.h rename to lib/3rdparty/freetype/src/sfnt/sfobjs.h diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/ttbdf.c b/lib/3rdparty/freetype/src/sfnt/ttbdf.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/ttbdf.c rename to lib/3rdparty/freetype/src/sfnt/ttbdf.c diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/ttbdf.h b/lib/3rdparty/freetype/src/sfnt/ttbdf.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/ttbdf.h rename to lib/3rdparty/freetype/src/sfnt/ttbdf.h diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/ttcmap.c b/lib/3rdparty/freetype/src/sfnt/ttcmap.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/ttcmap.c rename to lib/3rdparty/freetype/src/sfnt/ttcmap.c diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/ttcmap.h b/lib/3rdparty/freetype/src/sfnt/ttcmap.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/ttcmap.h rename to lib/3rdparty/freetype/src/sfnt/ttcmap.h diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/ttcmapc.h b/lib/3rdparty/freetype/src/sfnt/ttcmapc.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/ttcmapc.h rename to lib/3rdparty/freetype/src/sfnt/ttcmapc.h diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/ttkern.c b/lib/3rdparty/freetype/src/sfnt/ttkern.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/ttkern.c rename to lib/3rdparty/freetype/src/sfnt/ttkern.c diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/ttkern.h b/lib/3rdparty/freetype/src/sfnt/ttkern.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/ttkern.h rename to lib/3rdparty/freetype/src/sfnt/ttkern.h diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/ttload.c b/lib/3rdparty/freetype/src/sfnt/ttload.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/ttload.c rename to lib/3rdparty/freetype/src/sfnt/ttload.c diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/ttload.h b/lib/3rdparty/freetype/src/sfnt/ttload.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/ttload.h rename to lib/3rdparty/freetype/src/sfnt/ttload.h diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/ttmtx.c b/lib/3rdparty/freetype/src/sfnt/ttmtx.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/ttmtx.c rename to lib/3rdparty/freetype/src/sfnt/ttmtx.c diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/ttmtx.h b/lib/3rdparty/freetype/src/sfnt/ttmtx.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/ttmtx.h rename to lib/3rdparty/freetype/src/sfnt/ttmtx.h diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/ttpost.c b/lib/3rdparty/freetype/src/sfnt/ttpost.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/ttpost.c rename to lib/3rdparty/freetype/src/sfnt/ttpost.c diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/ttpost.h b/lib/3rdparty/freetype/src/sfnt/ttpost.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/ttpost.h rename to lib/3rdparty/freetype/src/sfnt/ttpost.h diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/ttsbit.c b/lib/3rdparty/freetype/src/sfnt/ttsbit.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/ttsbit.c rename to lib/3rdparty/freetype/src/sfnt/ttsbit.c diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/ttsbit.h b/lib/3rdparty/freetype/src/sfnt/ttsbit.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/ttsbit.h rename to lib/3rdparty/freetype/src/sfnt/ttsbit.h diff --git a/reactos/lib/3rdparty/freetype/src/sfnt/ttsbit0.c b/lib/3rdparty/freetype/src/sfnt/ttsbit0.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/sfnt/ttsbit0.c rename to lib/3rdparty/freetype/src/sfnt/ttsbit0.c diff --git a/reactos/lib/3rdparty/freetype/src/smooth/Jamfile b/lib/3rdparty/freetype/src/smooth/Jamfile similarity index 100% rename from reactos/lib/3rdparty/freetype/src/smooth/Jamfile rename to lib/3rdparty/freetype/src/smooth/Jamfile diff --git a/reactos/lib/3rdparty/freetype/src/smooth/ftgrays.c b/lib/3rdparty/freetype/src/smooth/ftgrays.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/smooth/ftgrays.c rename to lib/3rdparty/freetype/src/smooth/ftgrays.c diff --git a/reactos/lib/3rdparty/freetype/src/smooth/ftgrays.h b/lib/3rdparty/freetype/src/smooth/ftgrays.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/smooth/ftgrays.h rename to lib/3rdparty/freetype/src/smooth/ftgrays.h diff --git a/reactos/lib/3rdparty/freetype/src/smooth/ftsmerrs.h b/lib/3rdparty/freetype/src/smooth/ftsmerrs.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/smooth/ftsmerrs.h rename to lib/3rdparty/freetype/src/smooth/ftsmerrs.h diff --git a/reactos/lib/3rdparty/freetype/src/smooth/ftsmooth.c b/lib/3rdparty/freetype/src/smooth/ftsmooth.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/smooth/ftsmooth.c rename to lib/3rdparty/freetype/src/smooth/ftsmooth.c diff --git a/reactos/lib/3rdparty/freetype/src/smooth/ftsmooth.h b/lib/3rdparty/freetype/src/smooth/ftsmooth.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/smooth/ftsmooth.h rename to lib/3rdparty/freetype/src/smooth/ftsmooth.h diff --git a/reactos/lib/3rdparty/freetype/src/smooth/ftspic.c b/lib/3rdparty/freetype/src/smooth/ftspic.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/smooth/ftspic.c rename to lib/3rdparty/freetype/src/smooth/ftspic.c diff --git a/reactos/lib/3rdparty/freetype/src/smooth/ftspic.h b/lib/3rdparty/freetype/src/smooth/ftspic.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/smooth/ftspic.h rename to lib/3rdparty/freetype/src/smooth/ftspic.h diff --git a/reactos/lib/3rdparty/freetype/src/smooth/module.mk b/lib/3rdparty/freetype/src/smooth/module.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/smooth/module.mk rename to lib/3rdparty/freetype/src/smooth/module.mk diff --git a/reactos/lib/3rdparty/freetype/src/smooth/rules.mk b/lib/3rdparty/freetype/src/smooth/rules.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/smooth/rules.mk rename to lib/3rdparty/freetype/src/smooth/rules.mk diff --git a/reactos/lib/3rdparty/freetype/src/smooth/smooth.c b/lib/3rdparty/freetype/src/smooth/smooth.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/smooth/smooth.c rename to lib/3rdparty/freetype/src/smooth/smooth.c diff --git a/reactos/lib/3rdparty/freetype/src/tools/Jamfile b/lib/3rdparty/freetype/src/tools/Jamfile similarity index 100% rename from reactos/lib/3rdparty/freetype/src/tools/Jamfile rename to lib/3rdparty/freetype/src/tools/Jamfile diff --git a/reactos/lib/3rdparty/freetype/src/tools/apinames.c b/lib/3rdparty/freetype/src/tools/apinames.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/tools/apinames.c rename to lib/3rdparty/freetype/src/tools/apinames.c diff --git a/reactos/lib/3rdparty/freetype/src/tools/chktrcmp.py b/lib/3rdparty/freetype/src/tools/chktrcmp.py similarity index 100% rename from reactos/lib/3rdparty/freetype/src/tools/chktrcmp.py rename to lib/3rdparty/freetype/src/tools/chktrcmp.py diff --git a/reactos/lib/3rdparty/freetype/src/tools/cordic.py b/lib/3rdparty/freetype/src/tools/cordic.py similarity index 100% rename from reactos/lib/3rdparty/freetype/src/tools/cordic.py rename to lib/3rdparty/freetype/src/tools/cordic.py diff --git a/reactos/lib/3rdparty/freetype/src/tools/docmaker/content.py b/lib/3rdparty/freetype/src/tools/docmaker/content.py similarity index 100% rename from reactos/lib/3rdparty/freetype/src/tools/docmaker/content.py rename to lib/3rdparty/freetype/src/tools/docmaker/content.py diff --git a/reactos/lib/3rdparty/freetype/src/tools/docmaker/docbeauty.py b/lib/3rdparty/freetype/src/tools/docmaker/docbeauty.py similarity index 100% rename from reactos/lib/3rdparty/freetype/src/tools/docmaker/docbeauty.py rename to lib/3rdparty/freetype/src/tools/docmaker/docbeauty.py diff --git a/reactos/lib/3rdparty/freetype/src/tools/docmaker/docmaker.py b/lib/3rdparty/freetype/src/tools/docmaker/docmaker.py similarity index 100% rename from reactos/lib/3rdparty/freetype/src/tools/docmaker/docmaker.py rename to lib/3rdparty/freetype/src/tools/docmaker/docmaker.py diff --git a/reactos/lib/3rdparty/freetype/src/tools/docmaker/formatter.py b/lib/3rdparty/freetype/src/tools/docmaker/formatter.py similarity index 100% rename from reactos/lib/3rdparty/freetype/src/tools/docmaker/formatter.py rename to lib/3rdparty/freetype/src/tools/docmaker/formatter.py diff --git a/reactos/lib/3rdparty/freetype/src/tools/docmaker/sources.py b/lib/3rdparty/freetype/src/tools/docmaker/sources.py similarity index 100% rename from reactos/lib/3rdparty/freetype/src/tools/docmaker/sources.py rename to lib/3rdparty/freetype/src/tools/docmaker/sources.py diff --git a/reactos/lib/3rdparty/freetype/src/tools/docmaker/tohtml.py b/lib/3rdparty/freetype/src/tools/docmaker/tohtml.py similarity index 100% rename from reactos/lib/3rdparty/freetype/src/tools/docmaker/tohtml.py rename to lib/3rdparty/freetype/src/tools/docmaker/tohtml.py diff --git a/reactos/lib/3rdparty/freetype/src/tools/docmaker/utils.py b/lib/3rdparty/freetype/src/tools/docmaker/utils.py similarity index 100% rename from reactos/lib/3rdparty/freetype/src/tools/docmaker/utils.py rename to lib/3rdparty/freetype/src/tools/docmaker/utils.py diff --git a/reactos/lib/3rdparty/freetype/src/tools/ftrandom/Makefile b/lib/3rdparty/freetype/src/tools/ftrandom/Makefile similarity index 100% rename from reactos/lib/3rdparty/freetype/src/tools/ftrandom/Makefile rename to lib/3rdparty/freetype/src/tools/ftrandom/Makefile diff --git a/reactos/lib/3rdparty/freetype/src/tools/ftrandom/README b/lib/3rdparty/freetype/src/tools/ftrandom/README similarity index 100% rename from reactos/lib/3rdparty/freetype/src/tools/ftrandom/README rename to lib/3rdparty/freetype/src/tools/ftrandom/README diff --git a/reactos/lib/3rdparty/freetype/src/tools/ftrandom/ftrandom.c b/lib/3rdparty/freetype/src/tools/ftrandom/ftrandom.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/tools/ftrandom/ftrandom.c rename to lib/3rdparty/freetype/src/tools/ftrandom/ftrandom.c diff --git a/reactos/lib/3rdparty/freetype/src/tools/glnames.py b/lib/3rdparty/freetype/src/tools/glnames.py similarity index 100% rename from reactos/lib/3rdparty/freetype/src/tools/glnames.py rename to lib/3rdparty/freetype/src/tools/glnames.py diff --git a/reactos/lib/3rdparty/freetype/src/tools/test_afm.c b/lib/3rdparty/freetype/src/tools/test_afm.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/tools/test_afm.c rename to lib/3rdparty/freetype/src/tools/test_afm.c diff --git a/reactos/lib/3rdparty/freetype/src/tools/test_bbox.c b/lib/3rdparty/freetype/src/tools/test_bbox.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/tools/test_bbox.c rename to lib/3rdparty/freetype/src/tools/test_bbox.c diff --git a/reactos/lib/3rdparty/freetype/src/tools/test_trig.c b/lib/3rdparty/freetype/src/tools/test_trig.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/tools/test_trig.c rename to lib/3rdparty/freetype/src/tools/test_trig.c diff --git a/reactos/lib/3rdparty/freetype/src/truetype/Jamfile b/lib/3rdparty/freetype/src/truetype/Jamfile similarity index 100% rename from reactos/lib/3rdparty/freetype/src/truetype/Jamfile rename to lib/3rdparty/freetype/src/truetype/Jamfile diff --git a/reactos/lib/3rdparty/freetype/src/truetype/module.mk b/lib/3rdparty/freetype/src/truetype/module.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/truetype/module.mk rename to lib/3rdparty/freetype/src/truetype/module.mk diff --git a/reactos/lib/3rdparty/freetype/src/truetype/rules.mk b/lib/3rdparty/freetype/src/truetype/rules.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/truetype/rules.mk rename to lib/3rdparty/freetype/src/truetype/rules.mk diff --git a/reactos/lib/3rdparty/freetype/src/truetype/truetype.c b/lib/3rdparty/freetype/src/truetype/truetype.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/truetype/truetype.c rename to lib/3rdparty/freetype/src/truetype/truetype.c diff --git a/reactos/lib/3rdparty/freetype/src/truetype/ttdriver.c b/lib/3rdparty/freetype/src/truetype/ttdriver.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/truetype/ttdriver.c rename to lib/3rdparty/freetype/src/truetype/ttdriver.c diff --git a/reactos/lib/3rdparty/freetype/src/truetype/ttdriver.h b/lib/3rdparty/freetype/src/truetype/ttdriver.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/truetype/ttdriver.h rename to lib/3rdparty/freetype/src/truetype/ttdriver.h diff --git a/reactos/lib/3rdparty/freetype/src/truetype/tterrors.h b/lib/3rdparty/freetype/src/truetype/tterrors.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/truetype/tterrors.h rename to lib/3rdparty/freetype/src/truetype/tterrors.h diff --git a/reactos/lib/3rdparty/freetype/src/truetype/ttgload.c b/lib/3rdparty/freetype/src/truetype/ttgload.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/truetype/ttgload.c rename to lib/3rdparty/freetype/src/truetype/ttgload.c diff --git a/reactos/lib/3rdparty/freetype/src/truetype/ttgload.c.old b/lib/3rdparty/freetype/src/truetype/ttgload.c.old similarity index 100% rename from reactos/lib/3rdparty/freetype/src/truetype/ttgload.c.old rename to lib/3rdparty/freetype/src/truetype/ttgload.c.old diff --git a/reactos/lib/3rdparty/freetype/src/truetype/ttgload.h b/lib/3rdparty/freetype/src/truetype/ttgload.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/truetype/ttgload.h rename to lib/3rdparty/freetype/src/truetype/ttgload.h diff --git a/reactos/lib/3rdparty/freetype/src/truetype/ttgxvar.c b/lib/3rdparty/freetype/src/truetype/ttgxvar.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/truetype/ttgxvar.c rename to lib/3rdparty/freetype/src/truetype/ttgxvar.c diff --git a/reactos/lib/3rdparty/freetype/src/truetype/ttgxvar.h b/lib/3rdparty/freetype/src/truetype/ttgxvar.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/truetype/ttgxvar.h rename to lib/3rdparty/freetype/src/truetype/ttgxvar.h diff --git a/reactos/lib/3rdparty/freetype/src/truetype/ttinterp.c b/lib/3rdparty/freetype/src/truetype/ttinterp.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/truetype/ttinterp.c rename to lib/3rdparty/freetype/src/truetype/ttinterp.c diff --git a/reactos/lib/3rdparty/freetype/src/truetype/ttinterp.h b/lib/3rdparty/freetype/src/truetype/ttinterp.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/truetype/ttinterp.h rename to lib/3rdparty/freetype/src/truetype/ttinterp.h diff --git a/reactos/lib/3rdparty/freetype/src/truetype/ttobjs.c b/lib/3rdparty/freetype/src/truetype/ttobjs.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/truetype/ttobjs.c rename to lib/3rdparty/freetype/src/truetype/ttobjs.c diff --git a/reactos/lib/3rdparty/freetype/src/truetype/ttobjs.h b/lib/3rdparty/freetype/src/truetype/ttobjs.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/truetype/ttobjs.h rename to lib/3rdparty/freetype/src/truetype/ttobjs.h diff --git a/reactos/lib/3rdparty/freetype/src/truetype/ttpic.c b/lib/3rdparty/freetype/src/truetype/ttpic.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/truetype/ttpic.c rename to lib/3rdparty/freetype/src/truetype/ttpic.c diff --git a/reactos/lib/3rdparty/freetype/src/truetype/ttpic.h b/lib/3rdparty/freetype/src/truetype/ttpic.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/truetype/ttpic.h rename to lib/3rdparty/freetype/src/truetype/ttpic.h diff --git a/reactos/lib/3rdparty/freetype/src/truetype/ttpload.c b/lib/3rdparty/freetype/src/truetype/ttpload.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/truetype/ttpload.c rename to lib/3rdparty/freetype/src/truetype/ttpload.c diff --git a/reactos/lib/3rdparty/freetype/src/truetype/ttpload.h b/lib/3rdparty/freetype/src/truetype/ttpload.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/truetype/ttpload.h rename to lib/3rdparty/freetype/src/truetype/ttpload.h diff --git a/reactos/lib/3rdparty/freetype/src/type1/Jamfile b/lib/3rdparty/freetype/src/type1/Jamfile similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type1/Jamfile rename to lib/3rdparty/freetype/src/type1/Jamfile diff --git a/reactos/lib/3rdparty/freetype/src/type1/module.mk b/lib/3rdparty/freetype/src/type1/module.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type1/module.mk rename to lib/3rdparty/freetype/src/type1/module.mk diff --git a/reactos/lib/3rdparty/freetype/src/type1/rules.mk b/lib/3rdparty/freetype/src/type1/rules.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type1/rules.mk rename to lib/3rdparty/freetype/src/type1/rules.mk diff --git a/reactos/lib/3rdparty/freetype/src/type1/t1afm.c b/lib/3rdparty/freetype/src/type1/t1afm.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type1/t1afm.c rename to lib/3rdparty/freetype/src/type1/t1afm.c diff --git a/reactos/lib/3rdparty/freetype/src/type1/t1afm.h b/lib/3rdparty/freetype/src/type1/t1afm.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type1/t1afm.h rename to lib/3rdparty/freetype/src/type1/t1afm.h diff --git a/reactos/lib/3rdparty/freetype/src/type1/t1driver.c b/lib/3rdparty/freetype/src/type1/t1driver.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type1/t1driver.c rename to lib/3rdparty/freetype/src/type1/t1driver.c diff --git a/reactos/lib/3rdparty/freetype/src/type1/t1driver.h b/lib/3rdparty/freetype/src/type1/t1driver.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type1/t1driver.h rename to lib/3rdparty/freetype/src/type1/t1driver.h diff --git a/reactos/lib/3rdparty/freetype/src/type1/t1errors.h b/lib/3rdparty/freetype/src/type1/t1errors.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type1/t1errors.h rename to lib/3rdparty/freetype/src/type1/t1errors.h diff --git a/reactos/lib/3rdparty/freetype/src/type1/t1gload.c b/lib/3rdparty/freetype/src/type1/t1gload.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type1/t1gload.c rename to lib/3rdparty/freetype/src/type1/t1gload.c diff --git a/reactos/lib/3rdparty/freetype/src/type1/t1gload.h b/lib/3rdparty/freetype/src/type1/t1gload.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type1/t1gload.h rename to lib/3rdparty/freetype/src/type1/t1gload.h diff --git a/reactos/lib/3rdparty/freetype/src/type1/t1load.c b/lib/3rdparty/freetype/src/type1/t1load.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type1/t1load.c rename to lib/3rdparty/freetype/src/type1/t1load.c diff --git a/reactos/lib/3rdparty/freetype/src/type1/t1load.h b/lib/3rdparty/freetype/src/type1/t1load.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type1/t1load.h rename to lib/3rdparty/freetype/src/type1/t1load.h diff --git a/reactos/lib/3rdparty/freetype/src/type1/t1objs.c b/lib/3rdparty/freetype/src/type1/t1objs.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type1/t1objs.c rename to lib/3rdparty/freetype/src/type1/t1objs.c diff --git a/reactos/lib/3rdparty/freetype/src/type1/t1objs.h b/lib/3rdparty/freetype/src/type1/t1objs.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type1/t1objs.h rename to lib/3rdparty/freetype/src/type1/t1objs.h diff --git a/reactos/lib/3rdparty/freetype/src/type1/t1parse.c b/lib/3rdparty/freetype/src/type1/t1parse.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type1/t1parse.c rename to lib/3rdparty/freetype/src/type1/t1parse.c diff --git a/reactos/lib/3rdparty/freetype/src/type1/t1parse.h b/lib/3rdparty/freetype/src/type1/t1parse.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type1/t1parse.h rename to lib/3rdparty/freetype/src/type1/t1parse.h diff --git a/reactos/lib/3rdparty/freetype/src/type1/t1tokens.h b/lib/3rdparty/freetype/src/type1/t1tokens.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type1/t1tokens.h rename to lib/3rdparty/freetype/src/type1/t1tokens.h diff --git a/reactos/lib/3rdparty/freetype/src/type1/type1.c b/lib/3rdparty/freetype/src/type1/type1.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type1/type1.c rename to lib/3rdparty/freetype/src/type1/type1.c diff --git a/reactos/lib/3rdparty/freetype/src/type42/Jamfile b/lib/3rdparty/freetype/src/type42/Jamfile similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type42/Jamfile rename to lib/3rdparty/freetype/src/type42/Jamfile diff --git a/reactos/lib/3rdparty/freetype/src/type42/module.mk b/lib/3rdparty/freetype/src/type42/module.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type42/module.mk rename to lib/3rdparty/freetype/src/type42/module.mk diff --git a/reactos/lib/3rdparty/freetype/src/type42/rules.mk b/lib/3rdparty/freetype/src/type42/rules.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type42/rules.mk rename to lib/3rdparty/freetype/src/type42/rules.mk diff --git a/reactos/lib/3rdparty/freetype/src/type42/t42drivr.c b/lib/3rdparty/freetype/src/type42/t42drivr.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type42/t42drivr.c rename to lib/3rdparty/freetype/src/type42/t42drivr.c diff --git a/reactos/lib/3rdparty/freetype/src/type42/t42drivr.h b/lib/3rdparty/freetype/src/type42/t42drivr.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type42/t42drivr.h rename to lib/3rdparty/freetype/src/type42/t42drivr.h diff --git a/reactos/lib/3rdparty/freetype/src/type42/t42error.h b/lib/3rdparty/freetype/src/type42/t42error.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type42/t42error.h rename to lib/3rdparty/freetype/src/type42/t42error.h diff --git a/reactos/lib/3rdparty/freetype/src/type42/t42objs.c b/lib/3rdparty/freetype/src/type42/t42objs.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type42/t42objs.c rename to lib/3rdparty/freetype/src/type42/t42objs.c diff --git a/reactos/lib/3rdparty/freetype/src/type42/t42objs.h b/lib/3rdparty/freetype/src/type42/t42objs.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type42/t42objs.h rename to lib/3rdparty/freetype/src/type42/t42objs.h diff --git a/reactos/lib/3rdparty/freetype/src/type42/t42parse.c b/lib/3rdparty/freetype/src/type42/t42parse.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type42/t42parse.c rename to lib/3rdparty/freetype/src/type42/t42parse.c diff --git a/reactos/lib/3rdparty/freetype/src/type42/t42parse.h b/lib/3rdparty/freetype/src/type42/t42parse.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type42/t42parse.h rename to lib/3rdparty/freetype/src/type42/t42parse.h diff --git a/reactos/lib/3rdparty/freetype/src/type42/t42types.h b/lib/3rdparty/freetype/src/type42/t42types.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type42/t42types.h rename to lib/3rdparty/freetype/src/type42/t42types.h diff --git a/reactos/lib/3rdparty/freetype/src/type42/type42.c b/lib/3rdparty/freetype/src/type42/type42.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/type42/type42.c rename to lib/3rdparty/freetype/src/type42/type42.c diff --git a/reactos/lib/3rdparty/freetype/src/winfonts/Jamfile b/lib/3rdparty/freetype/src/winfonts/Jamfile similarity index 100% rename from reactos/lib/3rdparty/freetype/src/winfonts/Jamfile rename to lib/3rdparty/freetype/src/winfonts/Jamfile diff --git a/reactos/lib/3rdparty/freetype/src/winfonts/fnterrs.h b/lib/3rdparty/freetype/src/winfonts/fnterrs.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/winfonts/fnterrs.h rename to lib/3rdparty/freetype/src/winfonts/fnterrs.h diff --git a/reactos/lib/3rdparty/freetype/src/winfonts/module.mk b/lib/3rdparty/freetype/src/winfonts/module.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/winfonts/module.mk rename to lib/3rdparty/freetype/src/winfonts/module.mk diff --git a/reactos/lib/3rdparty/freetype/src/winfonts/rules.mk b/lib/3rdparty/freetype/src/winfonts/rules.mk similarity index 100% rename from reactos/lib/3rdparty/freetype/src/winfonts/rules.mk rename to lib/3rdparty/freetype/src/winfonts/rules.mk diff --git a/reactos/lib/3rdparty/freetype/src/winfonts/winfnt.c b/lib/3rdparty/freetype/src/winfonts/winfnt.c similarity index 100% rename from reactos/lib/3rdparty/freetype/src/winfonts/winfnt.c rename to lib/3rdparty/freetype/src/winfonts/winfnt.c diff --git a/reactos/lib/3rdparty/freetype/src/winfonts/winfnt.h b/lib/3rdparty/freetype/src/winfonts/winfnt.h similarity index 100% rename from reactos/lib/3rdparty/freetype/src/winfonts/winfnt.h rename to lib/3rdparty/freetype/src/winfonts/winfnt.h diff --git a/reactos/lib/3rdparty/freetype/version.sed b/lib/3rdparty/freetype/version.sed similarity index 100% rename from reactos/lib/3rdparty/freetype/version.sed rename to lib/3rdparty/freetype/version.sed diff --git a/reactos/lib/3rdparty/fullfat/CMakeLists.txt b/lib/3rdparty/fullfat/CMakeLists.txt similarity index 100% rename from reactos/lib/3rdparty/fullfat/CMakeLists.txt rename to lib/3rdparty/fullfat/CMakeLists.txt diff --git a/reactos/lib/3rdparty/fullfat/ff_blk.c b/lib/3rdparty/fullfat/ff_blk.c similarity index 100% rename from reactos/lib/3rdparty/fullfat/ff_blk.c rename to lib/3rdparty/fullfat/ff_blk.c diff --git a/reactos/lib/3rdparty/fullfat/ff_crc.c b/lib/3rdparty/fullfat/ff_crc.c similarity index 100% rename from reactos/lib/3rdparty/fullfat/ff_crc.c rename to lib/3rdparty/fullfat/ff_crc.c diff --git a/reactos/lib/3rdparty/fullfat/ff_dir.c b/lib/3rdparty/fullfat/ff_dir.c similarity index 100% rename from reactos/lib/3rdparty/fullfat/ff_dir.c rename to lib/3rdparty/fullfat/ff_dir.c diff --git a/reactos/lib/3rdparty/fullfat/ff_error.c b/lib/3rdparty/fullfat/ff_error.c similarity index 100% rename from reactos/lib/3rdparty/fullfat/ff_error.c rename to lib/3rdparty/fullfat/ff_error.c diff --git a/reactos/lib/3rdparty/fullfat/ff_fat.c b/lib/3rdparty/fullfat/ff_fat.c similarity index 100% rename from reactos/lib/3rdparty/fullfat/ff_fat.c rename to lib/3rdparty/fullfat/ff_fat.c diff --git a/reactos/lib/3rdparty/fullfat/ff_file.c b/lib/3rdparty/fullfat/ff_file.c similarity index 100% rename from reactos/lib/3rdparty/fullfat/ff_file.c rename to lib/3rdparty/fullfat/ff_file.c diff --git a/reactos/lib/3rdparty/fullfat/ff_format.c b/lib/3rdparty/fullfat/ff_format.c similarity index 100% rename from reactos/lib/3rdparty/fullfat/ff_format.c rename to lib/3rdparty/fullfat/ff_format.c diff --git a/reactos/lib/3rdparty/fullfat/ff_hash.c b/lib/3rdparty/fullfat/ff_hash.c similarity index 100% rename from reactos/lib/3rdparty/fullfat/ff_hash.c rename to lib/3rdparty/fullfat/ff_hash.c diff --git a/reactos/lib/3rdparty/fullfat/ff_ioman.c b/lib/3rdparty/fullfat/ff_ioman.c similarity index 100% rename from reactos/lib/3rdparty/fullfat/ff_ioman.c rename to lib/3rdparty/fullfat/ff_ioman.c diff --git a/reactos/lib/3rdparty/fullfat/ff_memory.c b/lib/3rdparty/fullfat/ff_memory.c similarity index 100% rename from reactos/lib/3rdparty/fullfat/ff_memory.c rename to lib/3rdparty/fullfat/ff_memory.c diff --git a/reactos/lib/3rdparty/fullfat/ff_safety.c b/lib/3rdparty/fullfat/ff_safety.c similarity index 100% rename from reactos/lib/3rdparty/fullfat/ff_safety.c rename to lib/3rdparty/fullfat/ff_safety.c diff --git a/reactos/lib/3rdparty/fullfat/ff_string.c b/lib/3rdparty/fullfat/ff_string.c similarity index 100% rename from reactos/lib/3rdparty/fullfat/ff_string.c rename to lib/3rdparty/fullfat/ff_string.c diff --git a/reactos/lib/3rdparty/fullfat/ff_time.c b/lib/3rdparty/fullfat/ff_time.c similarity index 100% rename from reactos/lib/3rdparty/fullfat/ff_time.c rename to lib/3rdparty/fullfat/ff_time.c diff --git a/reactos/lib/3rdparty/fullfat/ff_unicode.c b/lib/3rdparty/fullfat/ff_unicode.c similarity index 100% rename from reactos/lib/3rdparty/fullfat/ff_unicode.c rename to lib/3rdparty/fullfat/ff_unicode.c diff --git a/reactos/lib/3rdparty/fullfat/fullfat.rbuild b/lib/3rdparty/fullfat/fullfat.rbuild similarity index 100% rename from reactos/lib/3rdparty/fullfat/fullfat.rbuild rename to lib/3rdparty/fullfat/fullfat.rbuild diff --git a/reactos/lib/3rdparty/libmpg123/CMakeLists.txt b/lib/3rdparty/libmpg123/CMakeLists.txt similarity index 100% rename from reactos/lib/3rdparty/libmpg123/CMakeLists.txt rename to lib/3rdparty/libmpg123/CMakeLists.txt diff --git a/reactos/lib/3rdparty/libmpg123/compat.c b/lib/3rdparty/libmpg123/compat.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/compat.c rename to lib/3rdparty/libmpg123/compat.c diff --git a/reactos/lib/3rdparty/libmpg123/dct36_3dnow.S b/lib/3rdparty/libmpg123/dct36_3dnow.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/dct36_3dnow.S rename to lib/3rdparty/libmpg123/dct36_3dnow.S diff --git a/reactos/lib/3rdparty/libmpg123/dct36_3dnowext.S b/lib/3rdparty/libmpg123/dct36_3dnowext.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/dct36_3dnowext.S rename to lib/3rdparty/libmpg123/dct36_3dnowext.S diff --git a/reactos/lib/3rdparty/libmpg123/dct64.c b/lib/3rdparty/libmpg123/dct64.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/dct64.c rename to lib/3rdparty/libmpg123/dct64.c diff --git a/reactos/lib/3rdparty/libmpg123/dct64_3dnow.S b/lib/3rdparty/libmpg123/dct64_3dnow.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/dct64_3dnow.S rename to lib/3rdparty/libmpg123/dct64_3dnow.S diff --git a/reactos/lib/3rdparty/libmpg123/dct64_3dnowext.S b/lib/3rdparty/libmpg123/dct64_3dnowext.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/dct64_3dnowext.S rename to lib/3rdparty/libmpg123/dct64_3dnowext.S diff --git a/reactos/lib/3rdparty/libmpg123/dct64_altivec.c b/lib/3rdparty/libmpg123/dct64_altivec.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/dct64_altivec.c rename to lib/3rdparty/libmpg123/dct64_altivec.c diff --git a/reactos/lib/3rdparty/libmpg123/dct64_i386.c b/lib/3rdparty/libmpg123/dct64_i386.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/dct64_i386.c rename to lib/3rdparty/libmpg123/dct64_i386.c diff --git a/reactos/lib/3rdparty/libmpg123/dct64_i486.c b/lib/3rdparty/libmpg123/dct64_i486.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/dct64_i486.c rename to lib/3rdparty/libmpg123/dct64_i486.c diff --git a/reactos/lib/3rdparty/libmpg123/dct64_mmx.S b/lib/3rdparty/libmpg123/dct64_mmx.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/dct64_mmx.S rename to lib/3rdparty/libmpg123/dct64_mmx.S diff --git a/reactos/lib/3rdparty/libmpg123/dct64_sse.S b/lib/3rdparty/libmpg123/dct64_sse.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/dct64_sse.S rename to lib/3rdparty/libmpg123/dct64_sse.S diff --git a/reactos/lib/3rdparty/libmpg123/dct64_sse_float.S b/lib/3rdparty/libmpg123/dct64_sse_float.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/dct64_sse_float.S rename to lib/3rdparty/libmpg123/dct64_sse_float.S diff --git a/reactos/lib/3rdparty/libmpg123/dct64_x86_64.S b/lib/3rdparty/libmpg123/dct64_x86_64.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/dct64_x86_64.S rename to lib/3rdparty/libmpg123/dct64_x86_64.S diff --git a/reactos/lib/3rdparty/libmpg123/dct64_x86_64_float.S b/lib/3rdparty/libmpg123/dct64_x86_64_float.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/dct64_x86_64_float.S rename to lib/3rdparty/libmpg123/dct64_x86_64_float.S diff --git a/reactos/lib/3rdparty/libmpg123/dither.c b/lib/3rdparty/libmpg123/dither.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/dither.c rename to lib/3rdparty/libmpg123/dither.c diff --git a/reactos/lib/3rdparty/libmpg123/equalizer.c b/lib/3rdparty/libmpg123/equalizer.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/equalizer.c rename to lib/3rdparty/libmpg123/equalizer.c diff --git a/reactos/lib/3rdparty/libmpg123/equalizer_3dnow.S b/lib/3rdparty/libmpg123/equalizer_3dnow.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/equalizer_3dnow.S rename to lib/3rdparty/libmpg123/equalizer_3dnow.S diff --git a/reactos/lib/3rdparty/libmpg123/feature.c b/lib/3rdparty/libmpg123/feature.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/feature.c rename to lib/3rdparty/libmpg123/feature.c diff --git a/reactos/lib/3rdparty/libmpg123/format.c b/lib/3rdparty/libmpg123/format.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/format.c rename to lib/3rdparty/libmpg123/format.c diff --git a/reactos/lib/3rdparty/libmpg123/frame.c b/lib/3rdparty/libmpg123/frame.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/frame.c rename to lib/3rdparty/libmpg123/frame.c diff --git a/reactos/lib/3rdparty/libmpg123/getcpuflags.S b/lib/3rdparty/libmpg123/getcpuflags.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/getcpuflags.S rename to lib/3rdparty/libmpg123/getcpuflags.S diff --git a/reactos/lib/3rdparty/libmpg123/icy.c b/lib/3rdparty/libmpg123/icy.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/icy.c rename to lib/3rdparty/libmpg123/icy.c diff --git a/reactos/lib/3rdparty/libmpg123/icy2utf8.c b/lib/3rdparty/libmpg123/icy2utf8.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/icy2utf8.c rename to lib/3rdparty/libmpg123/icy2utf8.c diff --git a/reactos/lib/3rdparty/libmpg123/id3.c b/lib/3rdparty/libmpg123/id3.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/id3.c rename to lib/3rdparty/libmpg123/id3.c diff --git a/reactos/lib/3rdparty/libmpg123/index.c b/lib/3rdparty/libmpg123/index.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/index.c rename to lib/3rdparty/libmpg123/index.c diff --git a/reactos/lib/3rdparty/libmpg123/layer1.c b/lib/3rdparty/libmpg123/layer1.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/layer1.c rename to lib/3rdparty/libmpg123/layer1.c diff --git a/reactos/lib/3rdparty/libmpg123/layer2.c b/lib/3rdparty/libmpg123/layer2.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/layer2.c rename to lib/3rdparty/libmpg123/layer2.c diff --git a/reactos/lib/3rdparty/libmpg123/layer3.c b/lib/3rdparty/libmpg123/layer3.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/layer3.c rename to lib/3rdparty/libmpg123/layer3.c diff --git a/reactos/lib/3rdparty/libmpg123/lfs_alias.c b/lib/3rdparty/libmpg123/lfs_alias.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/lfs_alias.c rename to lib/3rdparty/libmpg123/lfs_alias.c diff --git a/reactos/lib/3rdparty/libmpg123/lfs_wrap.c b/lib/3rdparty/libmpg123/lfs_wrap.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/lfs_wrap.c rename to lib/3rdparty/libmpg123/lfs_wrap.c diff --git a/reactos/lib/3rdparty/libmpg123/libmpg123.c b/lib/3rdparty/libmpg123/libmpg123.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/libmpg123.c rename to lib/3rdparty/libmpg123/libmpg123.c diff --git a/reactos/lib/3rdparty/libmpg123/libmpg123.rbuild b/lib/3rdparty/libmpg123/libmpg123.rbuild similarity index 100% rename from reactos/lib/3rdparty/libmpg123/libmpg123.rbuild rename to lib/3rdparty/libmpg123/libmpg123.rbuild diff --git a/reactos/lib/3rdparty/libmpg123/ntom.c b/lib/3rdparty/libmpg123/ntom.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/ntom.c rename to lib/3rdparty/libmpg123/ntom.c diff --git a/reactos/lib/3rdparty/libmpg123/optimize.c b/lib/3rdparty/libmpg123/optimize.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/optimize.c rename to lib/3rdparty/libmpg123/optimize.c diff --git a/reactos/lib/3rdparty/libmpg123/parse.c b/lib/3rdparty/libmpg123/parse.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/parse.c rename to lib/3rdparty/libmpg123/parse.c diff --git a/reactos/lib/3rdparty/libmpg123/readers.c b/lib/3rdparty/libmpg123/readers.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/readers.c rename to lib/3rdparty/libmpg123/readers.c diff --git a/reactos/lib/3rdparty/libmpg123/stringbuf.c b/lib/3rdparty/libmpg123/stringbuf.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/stringbuf.c rename to lib/3rdparty/libmpg123/stringbuf.c diff --git a/reactos/lib/3rdparty/libmpg123/synth.c b/lib/3rdparty/libmpg123/synth.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth.c rename to lib/3rdparty/libmpg123/synth.c diff --git a/reactos/lib/3rdparty/libmpg123/synth_3dnow.S b/lib/3rdparty/libmpg123/synth_3dnow.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_3dnow.S rename to lib/3rdparty/libmpg123/synth_3dnow.S diff --git a/reactos/lib/3rdparty/libmpg123/synth_3dnowext.S b/lib/3rdparty/libmpg123/synth_3dnowext.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_3dnowext.S rename to lib/3rdparty/libmpg123/synth_3dnowext.S diff --git a/reactos/lib/3rdparty/libmpg123/synth_8bit.c b/lib/3rdparty/libmpg123/synth_8bit.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_8bit.c rename to lib/3rdparty/libmpg123/synth_8bit.c diff --git a/reactos/lib/3rdparty/libmpg123/synth_altivec.c b/lib/3rdparty/libmpg123/synth_altivec.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_altivec.c rename to lib/3rdparty/libmpg123/synth_altivec.c diff --git a/reactos/lib/3rdparty/libmpg123/synth_arm.S b/lib/3rdparty/libmpg123/synth_arm.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_arm.S rename to lib/3rdparty/libmpg123/synth_arm.S diff --git a/reactos/lib/3rdparty/libmpg123/synth_arm_accurate.S b/lib/3rdparty/libmpg123/synth_arm_accurate.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_arm_accurate.S rename to lib/3rdparty/libmpg123/synth_arm_accurate.S diff --git a/reactos/lib/3rdparty/libmpg123/synth_i486.c b/lib/3rdparty/libmpg123/synth_i486.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_i486.c rename to lib/3rdparty/libmpg123/synth_i486.c diff --git a/reactos/lib/3rdparty/libmpg123/synth_i586.S b/lib/3rdparty/libmpg123/synth_i586.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_i586.S rename to lib/3rdparty/libmpg123/synth_i586.S diff --git a/reactos/lib/3rdparty/libmpg123/synth_i586_dither.S b/lib/3rdparty/libmpg123/synth_i586_dither.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_i586_dither.S rename to lib/3rdparty/libmpg123/synth_i586_dither.S diff --git a/reactos/lib/3rdparty/libmpg123/synth_mmx.S b/lib/3rdparty/libmpg123/synth_mmx.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_mmx.S rename to lib/3rdparty/libmpg123/synth_mmx.S diff --git a/reactos/lib/3rdparty/libmpg123/synth_real.c b/lib/3rdparty/libmpg123/synth_real.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_real.c rename to lib/3rdparty/libmpg123/synth_real.c diff --git a/reactos/lib/3rdparty/libmpg123/synth_s32.c b/lib/3rdparty/libmpg123/synth_s32.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_s32.c rename to lib/3rdparty/libmpg123/synth_s32.c diff --git a/reactos/lib/3rdparty/libmpg123/synth_sse.S b/lib/3rdparty/libmpg123/synth_sse.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_sse.S rename to lib/3rdparty/libmpg123/synth_sse.S diff --git a/reactos/lib/3rdparty/libmpg123/synth_sse_accurate.S b/lib/3rdparty/libmpg123/synth_sse_accurate.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_sse_accurate.S rename to lib/3rdparty/libmpg123/synth_sse_accurate.S diff --git a/reactos/lib/3rdparty/libmpg123/synth_sse_float.S b/lib/3rdparty/libmpg123/synth_sse_float.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_sse_float.S rename to lib/3rdparty/libmpg123/synth_sse_float.S diff --git a/reactos/lib/3rdparty/libmpg123/synth_sse_s32.S b/lib/3rdparty/libmpg123/synth_sse_s32.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_sse_s32.S rename to lib/3rdparty/libmpg123/synth_sse_s32.S diff --git a/reactos/lib/3rdparty/libmpg123/synth_stereo_sse_accurate.S b/lib/3rdparty/libmpg123/synth_stereo_sse_accurate.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_stereo_sse_accurate.S rename to lib/3rdparty/libmpg123/synth_stereo_sse_accurate.S diff --git a/reactos/lib/3rdparty/libmpg123/synth_stereo_sse_float.S b/lib/3rdparty/libmpg123/synth_stereo_sse_float.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_stereo_sse_float.S rename to lib/3rdparty/libmpg123/synth_stereo_sse_float.S diff --git a/reactos/lib/3rdparty/libmpg123/synth_stereo_sse_s32.S b/lib/3rdparty/libmpg123/synth_stereo_sse_s32.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_stereo_sse_s32.S rename to lib/3rdparty/libmpg123/synth_stereo_sse_s32.S diff --git a/reactos/lib/3rdparty/libmpg123/synth_stereo_x86_64.S b/lib/3rdparty/libmpg123/synth_stereo_x86_64.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_stereo_x86_64.S rename to lib/3rdparty/libmpg123/synth_stereo_x86_64.S diff --git a/reactos/lib/3rdparty/libmpg123/synth_stereo_x86_64_accurate.S b/lib/3rdparty/libmpg123/synth_stereo_x86_64_accurate.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_stereo_x86_64_accurate.S rename to lib/3rdparty/libmpg123/synth_stereo_x86_64_accurate.S diff --git a/reactos/lib/3rdparty/libmpg123/synth_stereo_x86_64_float.S b/lib/3rdparty/libmpg123/synth_stereo_x86_64_float.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_stereo_x86_64_float.S rename to lib/3rdparty/libmpg123/synth_stereo_x86_64_float.S diff --git a/reactos/lib/3rdparty/libmpg123/synth_stereo_x86_64_s32.S b/lib/3rdparty/libmpg123/synth_stereo_x86_64_s32.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_stereo_x86_64_s32.S rename to lib/3rdparty/libmpg123/synth_stereo_x86_64_s32.S diff --git a/reactos/lib/3rdparty/libmpg123/synth_x86_64.S b/lib/3rdparty/libmpg123/synth_x86_64.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_x86_64.S rename to lib/3rdparty/libmpg123/synth_x86_64.S diff --git a/reactos/lib/3rdparty/libmpg123/synth_x86_64_accurate.S b/lib/3rdparty/libmpg123/synth_x86_64_accurate.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_x86_64_accurate.S rename to lib/3rdparty/libmpg123/synth_x86_64_accurate.S diff --git a/reactos/lib/3rdparty/libmpg123/synth_x86_64_float.S b/lib/3rdparty/libmpg123/synth_x86_64_float.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_x86_64_float.S rename to lib/3rdparty/libmpg123/synth_x86_64_float.S diff --git a/reactos/lib/3rdparty/libmpg123/synth_x86_64_s32.S b/lib/3rdparty/libmpg123/synth_x86_64_s32.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/synth_x86_64_s32.S rename to lib/3rdparty/libmpg123/synth_x86_64_s32.S diff --git a/reactos/lib/3rdparty/libmpg123/tabinit.c b/lib/3rdparty/libmpg123/tabinit.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/tabinit.c rename to lib/3rdparty/libmpg123/tabinit.c diff --git a/reactos/lib/3rdparty/libmpg123/tabinit_mmx.S b/lib/3rdparty/libmpg123/tabinit_mmx.S similarity index 100% rename from reactos/lib/3rdparty/libmpg123/tabinit_mmx.S rename to lib/3rdparty/libmpg123/tabinit_mmx.S diff --git a/reactos/lib/3rdparty/libmpg123/testcpu.c b/lib/3rdparty/libmpg123/testcpu.c similarity index 100% rename from reactos/lib/3rdparty/libmpg123/testcpu.c rename to lib/3rdparty/libmpg123/testcpu.c diff --git a/reactos/lib/3rdparty/libsamplerate/CMakeLists.txt b/lib/3rdparty/libsamplerate/CMakeLists.txt similarity index 100% rename from reactos/lib/3rdparty/libsamplerate/CMakeLists.txt rename to lib/3rdparty/libsamplerate/CMakeLists.txt diff --git a/reactos/lib/3rdparty/libsamplerate/common.h b/lib/3rdparty/libsamplerate/common.h similarity index 100% rename from reactos/lib/3rdparty/libsamplerate/common.h rename to lib/3rdparty/libsamplerate/common.h diff --git a/reactos/lib/3rdparty/libsamplerate/config.h b/lib/3rdparty/libsamplerate/config.h similarity index 100% rename from reactos/lib/3rdparty/libsamplerate/config.h rename to lib/3rdparty/libsamplerate/config.h diff --git a/reactos/lib/3rdparty/libsamplerate/fastest_coeffs.h b/lib/3rdparty/libsamplerate/fastest_coeffs.h similarity index 100% rename from reactos/lib/3rdparty/libsamplerate/fastest_coeffs.h rename to lib/3rdparty/libsamplerate/fastest_coeffs.h diff --git a/reactos/lib/3rdparty/libsamplerate/float_cast.h b/lib/3rdparty/libsamplerate/float_cast.h similarity index 100% rename from reactos/lib/3rdparty/libsamplerate/float_cast.h rename to lib/3rdparty/libsamplerate/float_cast.h diff --git a/reactos/lib/3rdparty/libsamplerate/high_qual_coeffs.h b/lib/3rdparty/libsamplerate/high_qual_coeffs.h similarity index 100% rename from reactos/lib/3rdparty/libsamplerate/high_qual_coeffs.h rename to lib/3rdparty/libsamplerate/high_qual_coeffs.h diff --git a/reactos/lib/3rdparty/libsamplerate/libsamplerate.rbuild b/lib/3rdparty/libsamplerate/libsamplerate.rbuild similarity index 100% rename from reactos/lib/3rdparty/libsamplerate/libsamplerate.rbuild rename to lib/3rdparty/libsamplerate/libsamplerate.rbuild diff --git a/reactos/lib/3rdparty/libsamplerate/mid_qual_coeffs.h b/lib/3rdparty/libsamplerate/mid_qual_coeffs.h similarity index 100% rename from reactos/lib/3rdparty/libsamplerate/mid_qual_coeffs.h rename to lib/3rdparty/libsamplerate/mid_qual_coeffs.h diff --git a/reactos/lib/3rdparty/libsamplerate/samplerate.c b/lib/3rdparty/libsamplerate/samplerate.c similarity index 100% rename from reactos/lib/3rdparty/libsamplerate/samplerate.c rename to lib/3rdparty/libsamplerate/samplerate.c diff --git a/reactos/lib/3rdparty/libsamplerate/samplerate.h b/lib/3rdparty/libsamplerate/samplerate.h similarity index 100% rename from reactos/lib/3rdparty/libsamplerate/samplerate.h rename to lib/3rdparty/libsamplerate/samplerate.h diff --git a/reactos/lib/3rdparty/libsamplerate/src_linear.c b/lib/3rdparty/libsamplerate/src_linear.c similarity index 100% rename from reactos/lib/3rdparty/libsamplerate/src_linear.c rename to lib/3rdparty/libsamplerate/src_linear.c diff --git a/reactos/lib/3rdparty/libsamplerate/src_sinc.c b/lib/3rdparty/libsamplerate/src_sinc.c similarity index 100% rename from reactos/lib/3rdparty/libsamplerate/src_sinc.c rename to lib/3rdparty/libsamplerate/src_sinc.c diff --git a/reactos/lib/3rdparty/libsamplerate/src_zoh.c b/lib/3rdparty/libsamplerate/src_zoh.c similarity index 100% rename from reactos/lib/3rdparty/libsamplerate/src_zoh.c rename to lib/3rdparty/libsamplerate/src_zoh.c diff --git a/reactos/lib/3rdparty/libsamplerate/unistd.h b/lib/3rdparty/libsamplerate/unistd.h similarity index 100% rename from reactos/lib/3rdparty/libsamplerate/unistd.h rename to lib/3rdparty/libsamplerate/unistd.h diff --git a/reactos/lib/3rdparty/libwine/CMakeLists.txt b/lib/3rdparty/libwine/CMakeLists.txt similarity index 100% rename from reactos/lib/3rdparty/libwine/CMakeLists.txt rename to lib/3rdparty/libwine/CMakeLists.txt diff --git a/reactos/lib/3rdparty/libwine/config.c b/lib/3rdparty/libwine/config.c similarity index 100% rename from reactos/lib/3rdparty/libwine/config.c rename to lib/3rdparty/libwine/config.c diff --git a/reactos/lib/3rdparty/libwine/debug.c b/lib/3rdparty/libwine/debug.c similarity index 100% rename from reactos/lib/3rdparty/libwine/debug.c rename to lib/3rdparty/libwine/debug.c diff --git a/reactos/lib/3rdparty/libwine/debug_ros.c b/lib/3rdparty/libwine/debug_ros.c similarity index 100% rename from reactos/lib/3rdparty/libwine/debug_ros.c rename to lib/3rdparty/libwine/debug_ros.c diff --git a/reactos/lib/3rdparty/libwine/libwine.rbuild b/lib/3rdparty/libwine/libwine.rbuild similarity index 100% rename from reactos/lib/3rdparty/libwine/libwine.rbuild rename to lib/3rdparty/libwine/libwine.rbuild diff --git a/reactos/lib/3rdparty/libwine/loader.c b/lib/3rdparty/libwine/loader.c similarity index 100% rename from reactos/lib/3rdparty/libwine/loader.c rename to lib/3rdparty/libwine/loader.c diff --git a/reactos/lib/3rdparty/libwine/register.c b/lib/3rdparty/libwine/register.c similarity index 100% rename from reactos/lib/3rdparty/libwine/register.c rename to lib/3rdparty/libwine/register.c diff --git a/reactos/lib/3rdparty/libwine/string.c b/lib/3rdparty/libwine/string.c similarity index 100% rename from reactos/lib/3rdparty/libwine/string.c rename to lib/3rdparty/libwine/string.c diff --git a/reactos/lib/3rdparty/libwine/wctype.c b/lib/3rdparty/libwine/wctype.c similarity index 100% rename from reactos/lib/3rdparty/libwine/wctype.c rename to lib/3rdparty/libwine/wctype.c diff --git a/reactos/lib/3rdparty/libxml2/AUTHORS b/lib/3rdparty/libxml2/AUTHORS similarity index 100% rename from reactos/lib/3rdparty/libxml2/AUTHORS rename to lib/3rdparty/libxml2/AUTHORS diff --git a/reactos/lib/3rdparty/libxml2/CMakeLists.txt b/lib/3rdparty/libxml2/CMakeLists.txt similarity index 100% rename from reactos/lib/3rdparty/libxml2/CMakeLists.txt rename to lib/3rdparty/libxml2/CMakeLists.txt diff --git a/reactos/lib/3rdparty/libxml2/COPYING b/lib/3rdparty/libxml2/COPYING similarity index 100% rename from reactos/lib/3rdparty/libxml2/COPYING rename to lib/3rdparty/libxml2/COPYING diff --git a/reactos/lib/3rdparty/libxml2/ChangeLog b/lib/3rdparty/libxml2/ChangeLog similarity index 100% rename from reactos/lib/3rdparty/libxml2/ChangeLog rename to lib/3rdparty/libxml2/ChangeLog diff --git a/reactos/lib/3rdparty/libxml2/Copyright b/lib/3rdparty/libxml2/Copyright similarity index 100% rename from reactos/lib/3rdparty/libxml2/Copyright rename to lib/3rdparty/libxml2/Copyright diff --git a/reactos/lib/3rdparty/libxml2/DOCBparser.c b/lib/3rdparty/libxml2/DOCBparser.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/DOCBparser.c rename to lib/3rdparty/libxml2/DOCBparser.c diff --git a/reactos/lib/3rdparty/libxml2/HTMLparser.c b/lib/3rdparty/libxml2/HTMLparser.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/HTMLparser.c rename to lib/3rdparty/libxml2/HTMLparser.c diff --git a/reactos/lib/3rdparty/libxml2/HTMLtree.c b/lib/3rdparty/libxml2/HTMLtree.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/HTMLtree.c rename to lib/3rdparty/libxml2/HTMLtree.c diff --git a/reactos/lib/3rdparty/libxml2/INSTALL b/lib/3rdparty/libxml2/INSTALL similarity index 100% rename from reactos/lib/3rdparty/libxml2/INSTALL rename to lib/3rdparty/libxml2/INSTALL diff --git a/reactos/lib/3rdparty/libxml2/Makefile.am b/lib/3rdparty/libxml2/Makefile.am similarity index 100% rename from reactos/lib/3rdparty/libxml2/Makefile.am rename to lib/3rdparty/libxml2/Makefile.am diff --git a/reactos/lib/3rdparty/libxml2/Makefile.in b/lib/3rdparty/libxml2/Makefile.in similarity index 100% rename from reactos/lib/3rdparty/libxml2/Makefile.in rename to lib/3rdparty/libxml2/Makefile.in diff --git a/reactos/lib/3rdparty/libxml2/Makefile.tests b/lib/3rdparty/libxml2/Makefile.tests similarity index 100% rename from reactos/lib/3rdparty/libxml2/Makefile.tests rename to lib/3rdparty/libxml2/Makefile.tests diff --git a/reactos/lib/3rdparty/libxml2/NEWS b/lib/3rdparty/libxml2/NEWS similarity index 100% rename from reactos/lib/3rdparty/libxml2/NEWS rename to lib/3rdparty/libxml2/NEWS diff --git a/reactos/lib/3rdparty/libxml2/README b/lib/3rdparty/libxml2/README similarity index 100% rename from reactos/lib/3rdparty/libxml2/README rename to lib/3rdparty/libxml2/README diff --git a/reactos/lib/3rdparty/libxml2/README.tests b/lib/3rdparty/libxml2/README.tests similarity index 100% rename from reactos/lib/3rdparty/libxml2/README.tests rename to lib/3rdparty/libxml2/README.tests diff --git a/reactos/lib/3rdparty/libxml2/SAX.c b/lib/3rdparty/libxml2/SAX.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/SAX.c rename to lib/3rdparty/libxml2/SAX.c diff --git a/reactos/lib/3rdparty/libxml2/SAX2.c b/lib/3rdparty/libxml2/SAX2.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/SAX2.c rename to lib/3rdparty/libxml2/SAX2.c diff --git a/reactos/lib/3rdparty/libxml2/TODO b/lib/3rdparty/libxml2/TODO similarity index 100% rename from reactos/lib/3rdparty/libxml2/TODO rename to lib/3rdparty/libxml2/TODO diff --git a/reactos/lib/3rdparty/libxml2/TODO_SCHEMAS b/lib/3rdparty/libxml2/TODO_SCHEMAS similarity index 100% rename from reactos/lib/3rdparty/libxml2/TODO_SCHEMAS rename to lib/3rdparty/libxml2/TODO_SCHEMAS diff --git a/reactos/lib/3rdparty/libxml2/acconfig.h b/lib/3rdparty/libxml2/acconfig.h similarity index 100% rename from reactos/lib/3rdparty/libxml2/acconfig.h rename to lib/3rdparty/libxml2/acconfig.h diff --git a/reactos/lib/3rdparty/libxml2/acinclude.m4 b/lib/3rdparty/libxml2/acinclude.m4 similarity index 100% rename from reactos/lib/3rdparty/libxml2/acinclude.m4 rename to lib/3rdparty/libxml2/acinclude.m4 diff --git a/reactos/lib/3rdparty/libxml2/aclocal.m4 b/lib/3rdparty/libxml2/aclocal.m4 similarity index 100% rename from reactos/lib/3rdparty/libxml2/aclocal.m4 rename to lib/3rdparty/libxml2/aclocal.m4 diff --git a/reactos/lib/3rdparty/libxml2/c14n.c b/lib/3rdparty/libxml2/c14n.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/c14n.c rename to lib/3rdparty/libxml2/c14n.c diff --git a/reactos/lib/3rdparty/libxml2/catalog.c b/lib/3rdparty/libxml2/catalog.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/catalog.c rename to lib/3rdparty/libxml2/catalog.c diff --git a/reactos/lib/3rdparty/libxml2/check-relaxng-test-suite.py b/lib/3rdparty/libxml2/check-relaxng-test-suite.py similarity index 100% rename from reactos/lib/3rdparty/libxml2/check-relaxng-test-suite.py rename to lib/3rdparty/libxml2/check-relaxng-test-suite.py diff --git a/reactos/lib/3rdparty/libxml2/check-relaxng-test-suite2.py b/lib/3rdparty/libxml2/check-relaxng-test-suite2.py similarity index 100% rename from reactos/lib/3rdparty/libxml2/check-relaxng-test-suite2.py rename to lib/3rdparty/libxml2/check-relaxng-test-suite2.py diff --git a/reactos/lib/3rdparty/libxml2/check-xinclude-test-suite.py b/lib/3rdparty/libxml2/check-xinclude-test-suite.py similarity index 100% rename from reactos/lib/3rdparty/libxml2/check-xinclude-test-suite.py rename to lib/3rdparty/libxml2/check-xinclude-test-suite.py diff --git a/reactos/lib/3rdparty/libxml2/check-xml-test-suite.py b/lib/3rdparty/libxml2/check-xml-test-suite.py similarity index 100% rename from reactos/lib/3rdparty/libxml2/check-xml-test-suite.py rename to lib/3rdparty/libxml2/check-xml-test-suite.py diff --git a/reactos/lib/3rdparty/libxml2/check-xsddata-test-suite.py b/lib/3rdparty/libxml2/check-xsddata-test-suite.py similarity index 100% rename from reactos/lib/3rdparty/libxml2/check-xsddata-test-suite.py rename to lib/3rdparty/libxml2/check-xsddata-test-suite.py diff --git a/reactos/lib/3rdparty/libxml2/chvalid.c b/lib/3rdparty/libxml2/chvalid.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/chvalid.c rename to lib/3rdparty/libxml2/chvalid.c diff --git a/reactos/lib/3rdparty/libxml2/config.guess b/lib/3rdparty/libxml2/config.guess similarity index 100% rename from reactos/lib/3rdparty/libxml2/config.guess rename to lib/3rdparty/libxml2/config.guess diff --git a/reactos/lib/3rdparty/libxml2/config.h b/lib/3rdparty/libxml2/config.h similarity index 100% rename from reactos/lib/3rdparty/libxml2/config.h rename to lib/3rdparty/libxml2/config.h diff --git a/reactos/lib/3rdparty/libxml2/config.h.in b/lib/3rdparty/libxml2/config.h.in similarity index 100% rename from reactos/lib/3rdparty/libxml2/config.h.in rename to lib/3rdparty/libxml2/config.h.in diff --git a/reactos/lib/3rdparty/libxml2/config.sub b/lib/3rdparty/libxml2/config.sub similarity index 100% rename from reactos/lib/3rdparty/libxml2/config.sub rename to lib/3rdparty/libxml2/config.sub diff --git a/reactos/lib/3rdparty/libxml2/configure b/lib/3rdparty/libxml2/configure similarity index 100% rename from reactos/lib/3rdparty/libxml2/configure rename to lib/3rdparty/libxml2/configure diff --git a/reactos/lib/3rdparty/libxml2/configure.in b/lib/3rdparty/libxml2/configure.in similarity index 100% rename from reactos/lib/3rdparty/libxml2/configure.in rename to lib/3rdparty/libxml2/configure.in diff --git a/reactos/lib/3rdparty/libxml2/dbgen.pl b/lib/3rdparty/libxml2/dbgen.pl similarity index 100% rename from reactos/lib/3rdparty/libxml2/dbgen.pl rename to lib/3rdparty/libxml2/dbgen.pl diff --git a/reactos/lib/3rdparty/libxml2/dbgenattr.pl b/lib/3rdparty/libxml2/dbgenattr.pl similarity index 100% rename from reactos/lib/3rdparty/libxml2/dbgenattr.pl rename to lib/3rdparty/libxml2/dbgenattr.pl diff --git a/reactos/lib/3rdparty/libxml2/debugXML.c b/lib/3rdparty/libxml2/debugXML.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/debugXML.c rename to lib/3rdparty/libxml2/debugXML.c diff --git a/reactos/lib/3rdparty/libxml2/depcomp b/lib/3rdparty/libxml2/depcomp similarity index 100% rename from reactos/lib/3rdparty/libxml2/depcomp rename to lib/3rdparty/libxml2/depcomp diff --git a/reactos/lib/3rdparty/libxml2/dict.c b/lib/3rdparty/libxml2/dict.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/dict.c rename to lib/3rdparty/libxml2/dict.c diff --git a/reactos/lib/3rdparty/libxml2/elfgcchack.h b/lib/3rdparty/libxml2/elfgcchack.h similarity index 100% rename from reactos/lib/3rdparty/libxml2/elfgcchack.h rename to lib/3rdparty/libxml2/elfgcchack.h diff --git a/reactos/lib/3rdparty/libxml2/encoding.c b/lib/3rdparty/libxml2/encoding.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/encoding.c rename to lib/3rdparty/libxml2/encoding.c diff --git a/reactos/lib/3rdparty/libxml2/entities.c b/lib/3rdparty/libxml2/entities.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/entities.c rename to lib/3rdparty/libxml2/entities.c diff --git a/reactos/lib/3rdparty/libxml2/error.c b/lib/3rdparty/libxml2/error.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/error.c rename to lib/3rdparty/libxml2/error.c diff --git a/reactos/lib/3rdparty/libxml2/genUnicode.py b/lib/3rdparty/libxml2/genUnicode.py similarity index 100% rename from reactos/lib/3rdparty/libxml2/genUnicode.py rename to lib/3rdparty/libxml2/genUnicode.py diff --git a/reactos/lib/3rdparty/libxml2/gentest.py b/lib/3rdparty/libxml2/gentest.py similarity index 100% rename from reactos/lib/3rdparty/libxml2/gentest.py rename to lib/3rdparty/libxml2/gentest.py diff --git a/reactos/lib/3rdparty/libxml2/globals.c b/lib/3rdparty/libxml2/globals.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/globals.c rename to lib/3rdparty/libxml2/globals.c diff --git a/reactos/lib/3rdparty/libxml2/hash.c b/lib/3rdparty/libxml2/hash.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/hash.c rename to lib/3rdparty/libxml2/hash.c diff --git a/reactos/lib/3rdparty/libxml2/include/Makefile.am b/lib/3rdparty/libxml2/include/Makefile.am similarity index 100% rename from reactos/lib/3rdparty/libxml2/include/Makefile.am rename to lib/3rdparty/libxml2/include/Makefile.am diff --git a/reactos/lib/3rdparty/libxml2/include/Makefile.in b/lib/3rdparty/libxml2/include/Makefile.in similarity index 100% rename from reactos/lib/3rdparty/libxml2/include/Makefile.in rename to lib/3rdparty/libxml2/include/Makefile.in diff --git a/reactos/lib/3rdparty/libxml2/include/win32config.h b/lib/3rdparty/libxml2/include/win32config.h similarity index 100% rename from reactos/lib/3rdparty/libxml2/include/win32config.h rename to lib/3rdparty/libxml2/include/win32config.h diff --git a/reactos/lib/3rdparty/libxml2/include/wsockcompat.h b/lib/3rdparty/libxml2/include/wsockcompat.h similarity index 100% rename from reactos/lib/3rdparty/libxml2/include/wsockcompat.h rename to lib/3rdparty/libxml2/include/wsockcompat.h diff --git a/reactos/lib/3rdparty/libxml2/install-sh b/lib/3rdparty/libxml2/install-sh similarity index 100% rename from reactos/lib/3rdparty/libxml2/install-sh rename to lib/3rdparty/libxml2/install-sh diff --git a/reactos/lib/3rdparty/libxml2/legacy.c b/lib/3rdparty/libxml2/legacy.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/legacy.c rename to lib/3rdparty/libxml2/legacy.c diff --git a/reactos/lib/3rdparty/libxml2/libxml-2.0-uninstalled.pc.in b/lib/3rdparty/libxml2/libxml-2.0-uninstalled.pc.in similarity index 100% rename from reactos/lib/3rdparty/libxml2/libxml-2.0-uninstalled.pc.in rename to lib/3rdparty/libxml2/libxml-2.0-uninstalled.pc.in diff --git a/reactos/lib/3rdparty/libxml2/libxml-2.0.pc.in b/lib/3rdparty/libxml2/libxml-2.0.pc.in similarity index 100% rename from reactos/lib/3rdparty/libxml2/libxml-2.0.pc.in rename to lib/3rdparty/libxml2/libxml-2.0.pc.in diff --git a/reactos/lib/3rdparty/libxml2/libxml.3 b/lib/3rdparty/libxml2/libxml.3 similarity index 100% rename from reactos/lib/3rdparty/libxml2/libxml.3 rename to lib/3rdparty/libxml2/libxml.3 diff --git a/reactos/lib/3rdparty/libxml2/libxml.h b/lib/3rdparty/libxml2/libxml.h similarity index 100% rename from reactos/lib/3rdparty/libxml2/libxml.h rename to lib/3rdparty/libxml2/libxml.h diff --git a/reactos/lib/3rdparty/libxml2/libxml.m4 b/lib/3rdparty/libxml2/libxml.m4 similarity index 100% rename from reactos/lib/3rdparty/libxml2/libxml.m4 rename to lib/3rdparty/libxml2/libxml.m4 diff --git a/reactos/lib/3rdparty/libxml2/libxml.spec.in b/lib/3rdparty/libxml2/libxml.spec.in similarity index 100% rename from reactos/lib/3rdparty/libxml2/libxml.spec.in rename to lib/3rdparty/libxml2/libxml.spec.in diff --git a/reactos/lib/3rdparty/libxml2/libxml2.rbuild b/lib/3rdparty/libxml2/libxml2.rbuild similarity index 100% rename from reactos/lib/3rdparty/libxml2/libxml2.rbuild rename to lib/3rdparty/libxml2/libxml2.rbuild diff --git a/reactos/lib/3rdparty/libxml2/libxml2.spec b/lib/3rdparty/libxml2/libxml2.spec similarity index 100% rename from reactos/lib/3rdparty/libxml2/libxml2.spec rename to lib/3rdparty/libxml2/libxml2.spec diff --git a/reactos/lib/3rdparty/libxml2/list.c b/lib/3rdparty/libxml2/list.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/list.c rename to lib/3rdparty/libxml2/list.c diff --git a/reactos/lib/3rdparty/libxml2/ltmain.sh b/lib/3rdparty/libxml2/ltmain.sh similarity index 100% rename from reactos/lib/3rdparty/libxml2/ltmain.sh rename to lib/3rdparty/libxml2/ltmain.sh diff --git a/reactos/lib/3rdparty/libxml2/missing b/lib/3rdparty/libxml2/missing similarity index 100% rename from reactos/lib/3rdparty/libxml2/missing rename to lib/3rdparty/libxml2/missing diff --git a/reactos/lib/3rdparty/libxml2/mkinstalldirs b/lib/3rdparty/libxml2/mkinstalldirs similarity index 100% rename from reactos/lib/3rdparty/libxml2/mkinstalldirs rename to lib/3rdparty/libxml2/mkinstalldirs diff --git a/reactos/lib/3rdparty/libxml2/nanoftp.c b/lib/3rdparty/libxml2/nanoftp.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/nanoftp.c rename to lib/3rdparty/libxml2/nanoftp.c diff --git a/reactos/lib/3rdparty/libxml2/nanohttp.c b/lib/3rdparty/libxml2/nanohttp.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/nanohttp.c rename to lib/3rdparty/libxml2/nanohttp.c diff --git a/reactos/lib/3rdparty/libxml2/parser.c b/lib/3rdparty/libxml2/parser.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/parser.c rename to lib/3rdparty/libxml2/parser.c diff --git a/reactos/lib/3rdparty/libxml2/parserInternals.c b/lib/3rdparty/libxml2/parserInternals.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/parserInternals.c rename to lib/3rdparty/libxml2/parserInternals.c diff --git a/reactos/lib/3rdparty/libxml2/pattern.c b/lib/3rdparty/libxml2/pattern.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/pattern.c rename to lib/3rdparty/libxml2/pattern.c diff --git a/reactos/lib/3rdparty/libxml2/regressions.py b/lib/3rdparty/libxml2/regressions.py similarity index 100% rename from reactos/lib/3rdparty/libxml2/regressions.py rename to lib/3rdparty/libxml2/regressions.py diff --git a/reactos/lib/3rdparty/libxml2/regressions.xml b/lib/3rdparty/libxml2/regressions.xml similarity index 100% rename from reactos/lib/3rdparty/libxml2/regressions.xml rename to lib/3rdparty/libxml2/regressions.xml diff --git a/reactos/lib/3rdparty/libxml2/relaxng.c b/lib/3rdparty/libxml2/relaxng.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/relaxng.c rename to lib/3rdparty/libxml2/relaxng.c diff --git a/reactos/lib/3rdparty/libxml2/runsuite.c b/lib/3rdparty/libxml2/runsuite.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/runsuite.c rename to lib/3rdparty/libxml2/runsuite.c diff --git a/reactos/lib/3rdparty/libxml2/runtest.c b/lib/3rdparty/libxml2/runtest.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/runtest.c rename to lib/3rdparty/libxml2/runtest.c diff --git a/reactos/lib/3rdparty/libxml2/runxmlconf.c b/lib/3rdparty/libxml2/runxmlconf.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/runxmlconf.c rename to lib/3rdparty/libxml2/runxmlconf.c diff --git a/reactos/lib/3rdparty/libxml2/schematron.c b/lib/3rdparty/libxml2/schematron.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/schematron.c rename to lib/3rdparty/libxml2/schematron.c diff --git a/reactos/lib/3rdparty/libxml2/testAutomata.c b/lib/3rdparty/libxml2/testAutomata.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/testAutomata.c rename to lib/3rdparty/libxml2/testAutomata.c diff --git a/reactos/lib/3rdparty/libxml2/testC14N.c b/lib/3rdparty/libxml2/testC14N.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/testC14N.c rename to lib/3rdparty/libxml2/testC14N.c diff --git a/reactos/lib/3rdparty/libxml2/testHTML.c b/lib/3rdparty/libxml2/testHTML.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/testHTML.c rename to lib/3rdparty/libxml2/testHTML.c diff --git a/reactos/lib/3rdparty/libxml2/testModule.c b/lib/3rdparty/libxml2/testModule.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/testModule.c rename to lib/3rdparty/libxml2/testModule.c diff --git a/reactos/lib/3rdparty/libxml2/testReader.c b/lib/3rdparty/libxml2/testReader.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/testReader.c rename to lib/3rdparty/libxml2/testReader.c diff --git a/reactos/lib/3rdparty/libxml2/testRegexp.c b/lib/3rdparty/libxml2/testRegexp.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/testRegexp.c rename to lib/3rdparty/libxml2/testRegexp.c diff --git a/reactos/lib/3rdparty/libxml2/testRelax.c b/lib/3rdparty/libxml2/testRelax.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/testRelax.c rename to lib/3rdparty/libxml2/testRelax.c diff --git a/reactos/lib/3rdparty/libxml2/testSAX.c b/lib/3rdparty/libxml2/testSAX.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/testSAX.c rename to lib/3rdparty/libxml2/testSAX.c diff --git a/reactos/lib/3rdparty/libxml2/testSchemas.c b/lib/3rdparty/libxml2/testSchemas.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/testSchemas.c rename to lib/3rdparty/libxml2/testSchemas.c diff --git a/reactos/lib/3rdparty/libxml2/testThreads.c b/lib/3rdparty/libxml2/testThreads.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/testThreads.c rename to lib/3rdparty/libxml2/testThreads.c diff --git a/reactos/lib/3rdparty/libxml2/testThreadsWin32.c b/lib/3rdparty/libxml2/testThreadsWin32.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/testThreadsWin32.c rename to lib/3rdparty/libxml2/testThreadsWin32.c diff --git a/reactos/lib/3rdparty/libxml2/testURI.c b/lib/3rdparty/libxml2/testURI.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/testURI.c rename to lib/3rdparty/libxml2/testURI.c diff --git a/reactos/lib/3rdparty/libxml2/testXPath.c b/lib/3rdparty/libxml2/testXPath.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/testXPath.c rename to lib/3rdparty/libxml2/testXPath.c diff --git a/reactos/lib/3rdparty/libxml2/testapi.c b/lib/3rdparty/libxml2/testapi.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/testapi.c rename to lib/3rdparty/libxml2/testapi.c diff --git a/reactos/lib/3rdparty/libxml2/testchar.c b/lib/3rdparty/libxml2/testchar.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/testchar.c rename to lib/3rdparty/libxml2/testchar.c diff --git a/reactos/lib/3rdparty/libxml2/testdict.c b/lib/3rdparty/libxml2/testdict.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/testdict.c rename to lib/3rdparty/libxml2/testdict.c diff --git a/reactos/lib/3rdparty/libxml2/testdso.c b/lib/3rdparty/libxml2/testdso.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/testdso.c rename to lib/3rdparty/libxml2/testdso.c diff --git a/reactos/lib/3rdparty/libxml2/testrecurse.c b/lib/3rdparty/libxml2/testrecurse.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/testrecurse.c rename to lib/3rdparty/libxml2/testrecurse.c diff --git a/reactos/lib/3rdparty/libxml2/threads.c b/lib/3rdparty/libxml2/threads.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/threads.c rename to lib/3rdparty/libxml2/threads.c diff --git a/reactos/lib/3rdparty/libxml2/tree.c b/lib/3rdparty/libxml2/tree.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/tree.c rename to lib/3rdparty/libxml2/tree.c diff --git a/reactos/lib/3rdparty/libxml2/trio.c b/lib/3rdparty/libxml2/trio.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/trio.c rename to lib/3rdparty/libxml2/trio.c diff --git a/reactos/lib/3rdparty/libxml2/trio.h b/lib/3rdparty/libxml2/trio.h similarity index 100% rename from reactos/lib/3rdparty/libxml2/trio.h rename to lib/3rdparty/libxml2/trio.h diff --git a/reactos/lib/3rdparty/libxml2/triodef.h b/lib/3rdparty/libxml2/triodef.h similarity index 100% rename from reactos/lib/3rdparty/libxml2/triodef.h rename to lib/3rdparty/libxml2/triodef.h diff --git a/reactos/lib/3rdparty/libxml2/trionan.c b/lib/3rdparty/libxml2/trionan.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/trionan.c rename to lib/3rdparty/libxml2/trionan.c diff --git a/reactos/lib/3rdparty/libxml2/trionan.h b/lib/3rdparty/libxml2/trionan.h similarity index 100% rename from reactos/lib/3rdparty/libxml2/trionan.h rename to lib/3rdparty/libxml2/trionan.h diff --git a/reactos/lib/3rdparty/libxml2/triop.h b/lib/3rdparty/libxml2/triop.h similarity index 100% rename from reactos/lib/3rdparty/libxml2/triop.h rename to lib/3rdparty/libxml2/triop.h diff --git a/reactos/lib/3rdparty/libxml2/triostr.c b/lib/3rdparty/libxml2/triostr.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/triostr.c rename to lib/3rdparty/libxml2/triostr.c diff --git a/reactos/lib/3rdparty/libxml2/triostr.h b/lib/3rdparty/libxml2/triostr.h similarity index 100% rename from reactos/lib/3rdparty/libxml2/triostr.h rename to lib/3rdparty/libxml2/triostr.h diff --git a/reactos/lib/3rdparty/libxml2/uri.c b/lib/3rdparty/libxml2/uri.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/uri.c rename to lib/3rdparty/libxml2/uri.c diff --git a/reactos/lib/3rdparty/libxml2/valid.c b/lib/3rdparty/libxml2/valid.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/valid.c rename to lib/3rdparty/libxml2/valid.c diff --git a/reactos/lib/3rdparty/libxml2/xinclude.c b/lib/3rdparty/libxml2/xinclude.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/xinclude.c rename to lib/3rdparty/libxml2/xinclude.c diff --git a/reactos/lib/3rdparty/libxml2/xlink.c b/lib/3rdparty/libxml2/xlink.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/xlink.c rename to lib/3rdparty/libxml2/xlink.c diff --git a/reactos/lib/3rdparty/libxml2/xml2-config.1 b/lib/3rdparty/libxml2/xml2-config.1 similarity index 100% rename from reactos/lib/3rdparty/libxml2/xml2-config.1 rename to lib/3rdparty/libxml2/xml2-config.1 diff --git a/reactos/lib/3rdparty/libxml2/xml2-config.in b/lib/3rdparty/libxml2/xml2-config.in similarity index 100% rename from reactos/lib/3rdparty/libxml2/xml2-config.in rename to lib/3rdparty/libxml2/xml2-config.in diff --git a/reactos/lib/3rdparty/libxml2/xml2Conf.sh.in b/lib/3rdparty/libxml2/xml2Conf.sh.in similarity index 100% rename from reactos/lib/3rdparty/libxml2/xml2Conf.sh.in rename to lib/3rdparty/libxml2/xml2Conf.sh.in diff --git a/reactos/lib/3rdparty/libxml2/xmlIO.c b/lib/3rdparty/libxml2/xmlIO.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/xmlIO.c rename to lib/3rdparty/libxml2/xmlIO.c diff --git a/reactos/lib/3rdparty/libxml2/xmlcatalog.c b/lib/3rdparty/libxml2/xmlcatalog.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/xmlcatalog.c rename to lib/3rdparty/libxml2/xmlcatalog.c diff --git a/reactos/lib/3rdparty/libxml2/xmllint.c b/lib/3rdparty/libxml2/xmllint.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/xmllint.c rename to lib/3rdparty/libxml2/xmllint.c diff --git a/reactos/lib/3rdparty/libxml2/xmlmemory.c b/lib/3rdparty/libxml2/xmlmemory.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/xmlmemory.c rename to lib/3rdparty/libxml2/xmlmemory.c diff --git a/reactos/lib/3rdparty/libxml2/xmlmodule.c b/lib/3rdparty/libxml2/xmlmodule.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/xmlmodule.c rename to lib/3rdparty/libxml2/xmlmodule.c diff --git a/reactos/lib/3rdparty/libxml2/xmlreader.c b/lib/3rdparty/libxml2/xmlreader.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/xmlreader.c rename to lib/3rdparty/libxml2/xmlreader.c diff --git a/reactos/lib/3rdparty/libxml2/xmlregexp.c b/lib/3rdparty/libxml2/xmlregexp.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/xmlregexp.c rename to lib/3rdparty/libxml2/xmlregexp.c diff --git a/reactos/lib/3rdparty/libxml2/xmlsave.c b/lib/3rdparty/libxml2/xmlsave.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/xmlsave.c rename to lib/3rdparty/libxml2/xmlsave.c diff --git a/reactos/lib/3rdparty/libxml2/xmlschemas.c b/lib/3rdparty/libxml2/xmlschemas.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/xmlschemas.c rename to lib/3rdparty/libxml2/xmlschemas.c diff --git a/reactos/lib/3rdparty/libxml2/xmlschemastypes.c b/lib/3rdparty/libxml2/xmlschemastypes.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/xmlschemastypes.c rename to lib/3rdparty/libxml2/xmlschemastypes.c diff --git a/reactos/lib/3rdparty/libxml2/xmlstring.c b/lib/3rdparty/libxml2/xmlstring.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/xmlstring.c rename to lib/3rdparty/libxml2/xmlstring.c diff --git a/reactos/lib/3rdparty/libxml2/xmlunicode.c b/lib/3rdparty/libxml2/xmlunicode.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/xmlunicode.c rename to lib/3rdparty/libxml2/xmlunicode.c diff --git a/reactos/lib/3rdparty/libxml2/xmlwriter.c b/lib/3rdparty/libxml2/xmlwriter.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/xmlwriter.c rename to lib/3rdparty/libxml2/xmlwriter.c diff --git a/reactos/lib/3rdparty/libxml2/xpath.c b/lib/3rdparty/libxml2/xpath.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/xpath.c rename to lib/3rdparty/libxml2/xpath.c diff --git a/reactos/lib/3rdparty/libxml2/xpointer.c b/lib/3rdparty/libxml2/xpointer.c similarity index 100% rename from reactos/lib/3rdparty/libxml2/xpointer.c rename to lib/3rdparty/libxml2/xpointer.c diff --git a/reactos/lib/3rdparty/mingw/CMakeLists.txt b/lib/3rdparty/mingw/CMakeLists.txt similarity index 100% rename from reactos/lib/3rdparty/mingw/CMakeLists.txt rename to lib/3rdparty/mingw/CMakeLists.txt diff --git a/reactos/lib/3rdparty/mingw/CRT_fp10.c b/lib/3rdparty/mingw/CRT_fp10.c similarity index 100% rename from reactos/lib/3rdparty/mingw/CRT_fp10.c rename to lib/3rdparty/mingw/CRT_fp10.c diff --git a/reactos/lib/3rdparty/mingw/CRT_fp8.c b/lib/3rdparty/mingw/CRT_fp8.c similarity index 100% rename from reactos/lib/3rdparty/mingw/CRT_fp8.c rename to lib/3rdparty/mingw/CRT_fp8.c diff --git a/reactos/lib/3rdparty/mingw/CRT_glob.c b/lib/3rdparty/mingw/CRT_glob.c similarity index 100% rename from reactos/lib/3rdparty/mingw/CRT_glob.c rename to lib/3rdparty/mingw/CRT_glob.c diff --git a/reactos/lib/3rdparty/mingw/CRT_noglob.c b/lib/3rdparty/mingw/CRT_noglob.c similarity index 100% rename from reactos/lib/3rdparty/mingw/CRT_noglob.c rename to lib/3rdparty/mingw/CRT_noglob.c diff --git a/reactos/lib/3rdparty/mingw/_newmode.c b/lib/3rdparty/mingw/_newmode.c similarity index 100% rename from reactos/lib/3rdparty/mingw/_newmode.c rename to lib/3rdparty/mingw/_newmode.c diff --git a/reactos/lib/3rdparty/mingw/atonexit.c b/lib/3rdparty/mingw/atonexit.c similarity index 100% rename from reactos/lib/3rdparty/mingw/atonexit.c rename to lib/3rdparty/mingw/atonexit.c diff --git a/reactos/lib/3rdparty/mingw/binmode.c b/lib/3rdparty/mingw/binmode.c similarity index 100% rename from reactos/lib/3rdparty/mingw/binmode.c rename to lib/3rdparty/mingw/binmode.c diff --git a/reactos/lib/3rdparty/mingw/charmax.c b/lib/3rdparty/mingw/charmax.c similarity index 100% rename from reactos/lib/3rdparty/mingw/charmax.c rename to lib/3rdparty/mingw/charmax.c diff --git a/reactos/lib/3rdparty/mingw/cinitexe.c b/lib/3rdparty/mingw/cinitexe.c similarity index 100% rename from reactos/lib/3rdparty/mingw/cinitexe.c rename to lib/3rdparty/mingw/cinitexe.c diff --git a/reactos/lib/3rdparty/mingw/crt0_c.c b/lib/3rdparty/mingw/crt0_c.c similarity index 100% rename from reactos/lib/3rdparty/mingw/crt0_c.c rename to lib/3rdparty/mingw/crt0_c.c diff --git a/reactos/lib/3rdparty/mingw/crt0_w.c b/lib/3rdparty/mingw/crt0_w.c similarity index 100% rename from reactos/lib/3rdparty/mingw/crt0_w.c rename to lib/3rdparty/mingw/crt0_w.c diff --git a/reactos/lib/3rdparty/mingw/crt_handler.c b/lib/3rdparty/mingw/crt_handler.c similarity index 100% rename from reactos/lib/3rdparty/mingw/crt_handler.c rename to lib/3rdparty/mingw/crt_handler.c diff --git a/reactos/lib/3rdparty/mingw/crtbegin.c b/lib/3rdparty/mingw/crtbegin.c similarity index 100% rename from reactos/lib/3rdparty/mingw/crtbegin.c rename to lib/3rdparty/mingw/crtbegin.c diff --git a/reactos/lib/3rdparty/mingw/crtdll.c b/lib/3rdparty/mingw/crtdll.c similarity index 100% rename from reactos/lib/3rdparty/mingw/crtdll.c rename to lib/3rdparty/mingw/crtdll.c diff --git a/reactos/lib/3rdparty/mingw/crtend.c b/lib/3rdparty/mingw/crtend.c similarity index 100% rename from reactos/lib/3rdparty/mingw/crtend.c rename to lib/3rdparty/mingw/crtend.c diff --git a/reactos/lib/3rdparty/mingw/crtexe.c b/lib/3rdparty/mingw/crtexe.c similarity index 100% rename from reactos/lib/3rdparty/mingw/crtexe.c rename to lib/3rdparty/mingw/crtexe.c diff --git a/reactos/lib/3rdparty/mingw/cxa_pure_virtual.c b/lib/3rdparty/mingw/cxa_pure_virtual.c similarity index 100% rename from reactos/lib/3rdparty/mingw/cxa_pure_virtual.c rename to lib/3rdparty/mingw/cxa_pure_virtual.c diff --git a/reactos/lib/3rdparty/mingw/dll_argv.c b/lib/3rdparty/mingw/dll_argv.c similarity index 100% rename from reactos/lib/3rdparty/mingw/dll_argv.c rename to lib/3rdparty/mingw/dll_argv.c diff --git a/reactos/lib/3rdparty/mingw/dllargv.c b/lib/3rdparty/mingw/dllargv.c similarity index 100% rename from reactos/lib/3rdparty/mingw/dllargv.c rename to lib/3rdparty/mingw/dllargv.c diff --git a/reactos/lib/3rdparty/mingw/dllentry.c b/lib/3rdparty/mingw/dllentry.c similarity index 100% rename from reactos/lib/3rdparty/mingw/dllentry.c rename to lib/3rdparty/mingw/dllentry.c diff --git a/reactos/lib/3rdparty/mingw/dllmain.c b/lib/3rdparty/mingw/dllmain.c similarity index 100% rename from reactos/lib/3rdparty/mingw/dllmain.c rename to lib/3rdparty/mingw/dllmain.c diff --git a/reactos/lib/3rdparty/mingw/gccmain.c b/lib/3rdparty/mingw/gccmain.c similarity index 100% rename from reactos/lib/3rdparty/mingw/gccmain.c rename to lib/3rdparty/mingw/gccmain.c diff --git a/reactos/lib/3rdparty/mingw/getopt.c b/lib/3rdparty/mingw/getopt.c similarity index 100% rename from reactos/lib/3rdparty/mingw/getopt.c rename to lib/3rdparty/mingw/getopt.c diff --git a/reactos/lib/3rdparty/mingw/gs_support.c b/lib/3rdparty/mingw/gs_support.c similarity index 100% rename from reactos/lib/3rdparty/mingw/gs_support.c rename to lib/3rdparty/mingw/gs_support.c diff --git a/reactos/lib/3rdparty/mingw/isascii.c b/lib/3rdparty/mingw/isascii.c similarity index 100% rename from reactos/lib/3rdparty/mingw/isascii.c rename to lib/3rdparty/mingw/isascii.c diff --git a/reactos/lib/3rdparty/mingw/iscsym.c b/lib/3rdparty/mingw/iscsym.c similarity index 100% rename from reactos/lib/3rdparty/mingw/iscsym.c rename to lib/3rdparty/mingw/iscsym.c diff --git a/reactos/lib/3rdparty/mingw/iscsymf.c b/lib/3rdparty/mingw/iscsymf.c similarity index 100% rename from reactos/lib/3rdparty/mingw/iscsymf.c rename to lib/3rdparty/mingw/iscsymf.c diff --git a/reactos/lib/3rdparty/mingw/merr.c b/lib/3rdparty/mingw/merr.c similarity index 100% rename from reactos/lib/3rdparty/mingw/merr.c rename to lib/3rdparty/mingw/merr.c diff --git a/reactos/lib/3rdparty/mingw/mingw.rbuild b/lib/3rdparty/mingw/mingw.rbuild similarity index 100% rename from reactos/lib/3rdparty/mingw/mingw.rbuild rename to lib/3rdparty/mingw/mingw.rbuild diff --git a/reactos/lib/3rdparty/mingw/mingw_custom.c b/lib/3rdparty/mingw/mingw_custom.c similarity index 100% rename from reactos/lib/3rdparty/mingw/mingw_custom.c rename to lib/3rdparty/mingw/mingw_custom.c diff --git a/reactos/lib/3rdparty/mingw/mingw_helpers.c b/lib/3rdparty/mingw/mingw_helpers.c similarity index 100% rename from reactos/lib/3rdparty/mingw/mingw_helpers.c rename to lib/3rdparty/mingw/mingw_helpers.c diff --git a/reactos/lib/3rdparty/mingw/moldname-msvcrt.def b/lib/3rdparty/mingw/moldname-msvcrt.def similarity index 100% rename from reactos/lib/3rdparty/mingw/moldname-msvcrt.def rename to lib/3rdparty/mingw/moldname-msvcrt.def diff --git a/reactos/lib/3rdparty/mingw/mscmain.c b/lib/3rdparty/mingw/mscmain.c similarity index 100% rename from reactos/lib/3rdparty/mingw/mscmain.c rename to lib/3rdparty/mingw/mscmain.c diff --git a/reactos/lib/3rdparty/mingw/natstart.c b/lib/3rdparty/mingw/natstart.c similarity index 100% rename from reactos/lib/3rdparty/mingw/natstart.c rename to lib/3rdparty/mingw/natstart.c diff --git a/reactos/lib/3rdparty/mingw/ofmt_stub.c b/lib/3rdparty/mingw/ofmt_stub.c similarity index 100% rename from reactos/lib/3rdparty/mingw/ofmt_stub.c rename to lib/3rdparty/mingw/ofmt_stub.c diff --git a/reactos/lib/3rdparty/mingw/pesect.c b/lib/3rdparty/mingw/pesect.c similarity index 100% rename from reactos/lib/3rdparty/mingw/pesect.c rename to lib/3rdparty/mingw/pesect.c diff --git a/reactos/lib/3rdparty/mingw/pseudo-reloc-list.c b/lib/3rdparty/mingw/pseudo-reloc-list.c similarity index 100% rename from reactos/lib/3rdparty/mingw/pseudo-reloc-list.c rename to lib/3rdparty/mingw/pseudo-reloc-list.c diff --git a/reactos/lib/3rdparty/mingw/pseudo-reloc.c b/lib/3rdparty/mingw/pseudo-reloc.c similarity index 100% rename from reactos/lib/3rdparty/mingw/pseudo-reloc.c rename to lib/3rdparty/mingw/pseudo-reloc.c diff --git a/reactos/lib/3rdparty/mingw/reactos.diff b/lib/3rdparty/mingw/reactos.diff similarity index 100% rename from reactos/lib/3rdparty/mingw/reactos.diff rename to lib/3rdparty/mingw/reactos.diff diff --git a/reactos/lib/3rdparty/mingw/strcasecmp.c b/lib/3rdparty/mingw/strcasecmp.c similarity index 100% rename from reactos/lib/3rdparty/mingw/strcasecmp.c rename to lib/3rdparty/mingw/strcasecmp.c diff --git a/reactos/lib/3rdparty/mingw/strncasecmp.c b/lib/3rdparty/mingw/strncasecmp.c similarity index 100% rename from reactos/lib/3rdparty/mingw/strncasecmp.c rename to lib/3rdparty/mingw/strncasecmp.c diff --git a/reactos/lib/3rdparty/mingw/tlsmcrt.c b/lib/3rdparty/mingw/tlsmcrt.c similarity index 100% rename from reactos/lib/3rdparty/mingw/tlsmcrt.c rename to lib/3rdparty/mingw/tlsmcrt.c diff --git a/reactos/lib/3rdparty/mingw/tlsmthread.c b/lib/3rdparty/mingw/tlsmthread.c similarity index 100% rename from reactos/lib/3rdparty/mingw/tlsmthread.c rename to lib/3rdparty/mingw/tlsmthread.c diff --git a/reactos/lib/3rdparty/mingw/tlssup.c b/lib/3rdparty/mingw/tlssup.c similarity index 100% rename from reactos/lib/3rdparty/mingw/tlssup.c rename to lib/3rdparty/mingw/tlssup.c diff --git a/reactos/lib/3rdparty/mingw/tlsthrd.c b/lib/3rdparty/mingw/tlsthrd.c similarity index 100% rename from reactos/lib/3rdparty/mingw/tlsthrd.c rename to lib/3rdparty/mingw/tlsthrd.c diff --git a/reactos/lib/3rdparty/mingw/toascii.c b/lib/3rdparty/mingw/toascii.c similarity index 100% rename from reactos/lib/3rdparty/mingw/toascii.c rename to lib/3rdparty/mingw/toascii.c diff --git a/reactos/lib/3rdparty/mingw/txtmode.c b/lib/3rdparty/mingw/txtmode.c similarity index 100% rename from reactos/lib/3rdparty/mingw/txtmode.c rename to lib/3rdparty/mingw/txtmode.c diff --git a/reactos/lib/3rdparty/mingw/ucrtexe.c b/lib/3rdparty/mingw/ucrtexe.c similarity index 100% rename from reactos/lib/3rdparty/mingw/ucrtexe.c rename to lib/3rdparty/mingw/ucrtexe.c diff --git a/reactos/lib/3rdparty/mingw/udll_argv.c b/lib/3rdparty/mingw/udll_argv.c similarity index 100% rename from reactos/lib/3rdparty/mingw/udll_argv.c rename to lib/3rdparty/mingw/udll_argv.c diff --git a/reactos/lib/3rdparty/mingw/udllargc.c b/lib/3rdparty/mingw/udllargc.c similarity index 100% rename from reactos/lib/3rdparty/mingw/udllargc.c rename to lib/3rdparty/mingw/udllargc.c diff --git a/reactos/lib/3rdparty/mingw/wcscmpi.c b/lib/3rdparty/mingw/wcscmpi.c similarity index 100% rename from reactos/lib/3rdparty/mingw/wcscmpi.c rename to lib/3rdparty/mingw/wcscmpi.c diff --git a/reactos/lib/3rdparty/mingw/wildcard.c b/lib/3rdparty/mingw/wildcard.c similarity index 100% rename from reactos/lib/3rdparty/mingw/wildcard.c rename to lib/3rdparty/mingw/wildcard.c diff --git a/reactos/lib/3rdparty/mingw/xncommod.c b/lib/3rdparty/mingw/xncommod.c similarity index 100% rename from reactos/lib/3rdparty/mingw/xncommod.c rename to lib/3rdparty/mingw/xncommod.c diff --git a/reactos/lib/3rdparty/mingw/xthdloc.c b/lib/3rdparty/mingw/xthdloc.c similarity index 100% rename from reactos/lib/3rdparty/mingw/xthdloc.c rename to lib/3rdparty/mingw/xthdloc.c diff --git a/reactos/lib/3rdparty/mingw/xtxtmode.c b/lib/3rdparty/mingw/xtxtmode.c similarity index 100% rename from reactos/lib/3rdparty/mingw/xtxtmode.c rename to lib/3rdparty/mingw/xtxtmode.c diff --git a/reactos/lib/3rdparty/stlport/CMakeLists.txt b/lib/3rdparty/stlport/CMakeLists.txt similarity index 100% rename from reactos/lib/3rdparty/stlport/CMakeLists.txt rename to lib/3rdparty/stlport/CMakeLists.txt diff --git a/reactos/lib/3rdparty/stlport/INSTALL b/lib/3rdparty/stlport/INSTALL similarity index 100% rename from reactos/lib/3rdparty/stlport/INSTALL rename to lib/3rdparty/stlport/INSTALL diff --git a/reactos/lib/3rdparty/stlport/INSTALL.unixes b/lib/3rdparty/stlport/INSTALL.unixes similarity index 100% rename from reactos/lib/3rdparty/stlport/INSTALL.unixes rename to lib/3rdparty/stlport/INSTALL.unixes diff --git a/reactos/lib/3rdparty/stlport/Makefile b/lib/3rdparty/stlport/Makefile similarity index 100% rename from reactos/lib/3rdparty/stlport/Makefile rename to lib/3rdparty/stlport/Makefile diff --git a/reactos/lib/3rdparty/stlport/README b/lib/3rdparty/stlport/README similarity index 100% rename from reactos/lib/3rdparty/stlport/README rename to lib/3rdparty/stlport/README diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/CC.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/CC.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/CC.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/CC.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/aCC.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/aCC.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/aCC.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/aCC.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/app/CC.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/app/CC.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/app/CC.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/app/CC.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/app/aCC.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/app/aCC.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/app/aCC.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/app/aCC.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/app/bcc.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/app/bcc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/app/bcc.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/app/bcc.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/app/dmc.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/app/dmc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/app/dmc.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/app/dmc.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/app/gcc.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/app/gcc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/app/gcc.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/app/gcc.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/app/icc.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/app/icc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/app/icc.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/app/icc.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/app/rules-install.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/app/rules-install.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/app/rules-install.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/app/rules-install.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/app/rules.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/app/rules.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/app/rules.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/app/rules.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/app/top.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/app/top.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/app/top.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/app/top.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/bcc.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/bcc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/bcc.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/bcc.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/clean.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/clean.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/clean.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/clean.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/cygming/extern.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/cygming/extern.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/cygming/extern.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/cygming/extern.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/cygming/lib.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/cygming/lib.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/cygming/lib.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/cygming/lib.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/cygming/rules-install-so.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/cygming/rules-install-so.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/cygming/rules-install-so.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/cygming/rules-install-so.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/cygming/rules-so.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/cygming/rules-so.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/cygming/rules-so.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/cygming/rules-so.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/cygming/sys.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/cygming/sys.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/cygming/sys.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/cygming/sys.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/cygming/targetsys.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/cygming/targetsys.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/cygming/targetsys.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/cygming/targetsys.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/darwin/lib.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/darwin/lib.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/darwin/lib.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/darwin/lib.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/darwin/sys.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/darwin/sys.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/darwin/sys.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/darwin/sys.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/darwin/targetsys.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/darwin/targetsys.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/darwin/targetsys.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/darwin/targetsys.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/depend.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/depend.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/depend.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/depend.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/dmc.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/dmc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/dmc.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/dmc.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/extern.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/extern.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/extern.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/extern.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/freebsd/sys.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/freebsd/sys.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/freebsd/sys.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/freebsd/sys.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/freebsd/targetsys.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/freebsd/targetsys.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/freebsd/targetsys.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/freebsd/targetsys.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/gcc.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/gcc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/gcc.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/gcc.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/hp-ux/sys.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/hp-ux/sys.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/hp-ux/sys.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/hp-ux/sys.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/hp-ux/targetsys.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/hp-ux/targetsys.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/hp-ux/targetsys.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/hp-ux/targetsys.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/icc.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/icc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/icc.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/icc.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/lib/CC.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/lib/CC.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/lib/CC.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/lib/CC.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/lib/aCC.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/lib/aCC.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/lib/aCC.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/lib/aCC.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/lib/bcc.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/lib/bcc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/lib/bcc.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/lib/bcc.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/lib/clean.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/lib/clean.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/lib/clean.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/lib/clean.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/lib/dmc.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/lib/dmc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/lib/dmc.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/lib/dmc.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/lib/gcc.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/lib/gcc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/lib/gcc.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/lib/gcc.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/lib/icc.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/lib/icc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/lib/icc.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/lib/icc.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/lib/rules-a.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/lib/rules-a.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/lib/rules-a.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/lib/rules-a.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/lib/rules-install-a.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/lib/rules-install-a.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/lib/rules-install-a.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/lib/rules-install-a.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/lib/top.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/lib/top.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/lib/top.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/lib/top.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/lib/vc6.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/lib/vc6.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/lib/vc6.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/lib/vc6.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/linux/sys.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/linux/sys.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/linux/sys.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/linux/sys.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/linux/targetsys.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/linux/targetsys.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/linux/targetsys.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/linux/targetsys.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/openbsd/sys.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/openbsd/sys.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/openbsd/sys.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/openbsd/sys.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/openbsd/targetsys.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/openbsd/targetsys.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/openbsd/targetsys.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/openbsd/targetsys.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/subdirs.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/subdirs.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/subdirs.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/subdirs.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/sunos/sys.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/sunos/sys.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/sunos/sys.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/sunos/sys.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/sunos/targetsys.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/sunos/targetsys.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/sunos/targetsys.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/sunos/targetsys.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/sysid.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/sysid.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/sysid.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/sysid.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/targetdirs.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/targetdirs.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/targetdirs.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/targetdirs.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/targets.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/targets.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/targets.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/targets.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/top.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/top.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/top.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/top.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/unix/lib.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/unix/lib.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/unix/lib.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/unix/lib.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/unix/rules-install-so.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/unix/rules-install-so.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/unix/rules-install-so.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/unix/rules-install-so.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/unix/rules-so.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/unix/rules-so.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/unix/rules-so.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/unix/rules-so.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/gmake/vc6.mak b/lib/3rdparty/stlport/build/Makefiles/gmake/vc6.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/gmake/vc6.mak rename to lib/3rdparty/stlport/build/Makefiles/gmake/vc6.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/clean.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/app/clean.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/clean.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/app/clean.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/evc-common.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/app/evc-common.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/evc-common.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/app/evc-common.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/evc3.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/app/evc3.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/evc3.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/app/evc3.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/evc4.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/app/evc4.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/evc4.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/app/evc4.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/evc8.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/app/evc8.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/evc8.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/app/evc8.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/evc9.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/app/evc9.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/evc9.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/app/evc9.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/icl.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/app/icl.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/icl.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/app/icl.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/macro.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/app/macro.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/macro.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/app/macro.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/rules-exe-windows.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/app/rules-exe-windows.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/rules-exe-windows.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/app/rules-exe-windows.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/rules-install-a.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/app/rules-install-a.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/rules-install-a.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/app/rules-install-a.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/rules-install-so.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/app/rules-install-so.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/rules-install-so.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/app/rules-install-so.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/top.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/app/top.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/top.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/app/top.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/vc-common.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/app/vc-common.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/vc-common.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/app/vc-common.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/vc6.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/app/vc6.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/vc6.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/app/vc6.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/vc70.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/app/vc70.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/vc70.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/app/vc70.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/vc71.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/app/vc71.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/vc71.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/app/vc71.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/vc8.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/app/vc8.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/vc8.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/app/vc8.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/vc9.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/app/vc9.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/app/vc9.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/app/vc9.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/clean.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/clean.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/clean.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/clean.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/evc-common.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/evc-common.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/evc-common.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/evc-common.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/evc3.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/evc3.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/evc3.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/evc3.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/evc4.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/evc4.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/evc4.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/evc4.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/evc8.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/evc8.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/evc8.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/evc8.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/evc9.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/evc9.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/evc9.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/evc9.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/extern.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/extern.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/extern.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/extern.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/icl.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/icl.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/icl.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/icl.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/clean.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/lib/clean.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/clean.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/lib/clean.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/evc-common.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/lib/evc-common.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/evc-common.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/lib/evc-common.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/evc3.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/lib/evc3.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/evc3.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/lib/evc3.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/evc4.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/lib/evc4.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/evc4.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/lib/evc4.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/evc8.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/lib/evc8.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/evc8.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/lib/evc8.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/evc9.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/lib/evc9.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/evc9.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/lib/evc9.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/icl.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/lib/icl.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/icl.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/lib/icl.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/macro.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/lib/macro.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/macro.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/lib/macro.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/rules-a.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/lib/rules-a.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/rules-a.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/lib/rules-a.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/rules-install-a.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/lib/rules-install-a.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/rules-install-a.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/lib/rules-install-a.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/rules-install-so.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/lib/rules-install-so.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/rules-install-so.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/lib/rules-install-so.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/rules-so.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/lib/rules-so.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/rules-so.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/lib/rules-so.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/top.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/lib/top.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/top.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/lib/top.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/vc-common.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/lib/vc-common.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/vc-common.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/lib/vc-common.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/vc6.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/lib/vc6.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/vc6.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/lib/vc6.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/vc70.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/lib/vc70.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/vc70.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/lib/vc70.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/vc71.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/lib/vc71.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/vc71.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/lib/vc71.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/vc8.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/lib/vc8.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/vc8.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/lib/vc8.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/vc9.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/lib/vc9.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/lib/vc9.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/lib/vc9.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/rules-o.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/rules-o.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/rules-o.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/rules-o.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/sys.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/sys.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/sys.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/sys.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/sysid.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/sysid.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/sysid.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/sysid.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/targetdirs.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/targetdirs.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/targetdirs.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/targetdirs.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/targets.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/targets.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/targets.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/targets.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/top.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/top.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/top.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/top.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/vc-common.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/vc-common.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/vc-common.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/vc-common.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/vc6.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/vc6.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/vc6.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/vc6.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/vc70.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/vc70.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/vc70.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/vc70.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/vc71.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/vc71.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/vc71.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/vc71.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/vc8.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/vc8.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/vc8.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/vc8.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/nmake/vc9.mak b/lib/3rdparty/stlport/build/Makefiles/nmake/vc9.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/nmake/vc9.mak rename to lib/3rdparty/stlport/build/Makefiles/nmake/vc9.mak diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/templates/Makefile-app.inc b/lib/3rdparty/stlport/build/Makefiles/templates/Makefile-app.inc similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/templates/Makefile-app.inc rename to lib/3rdparty/stlport/build/Makefiles/templates/Makefile-app.inc diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/templates/Makefile-gcc-app b/lib/3rdparty/stlport/build/Makefiles/templates/Makefile-gcc-app similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/templates/Makefile-gcc-app rename to lib/3rdparty/stlport/build/Makefiles/templates/Makefile-gcc-app diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/templates/Makefile-gcc-lib b/lib/3rdparty/stlport/build/Makefiles/templates/Makefile-gcc-lib similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/templates/Makefile-gcc-lib rename to lib/3rdparty/stlport/build/Makefiles/templates/Makefile-gcc-lib diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/templates/Makefile-lib.inc b/lib/3rdparty/stlport/build/Makefiles/templates/Makefile-lib.inc similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/templates/Makefile-lib.inc rename to lib/3rdparty/stlport/build/Makefiles/templates/Makefile-lib.inc diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/ut/app-c/Makefile b/lib/3rdparty/stlport/build/Makefiles/ut/app-c/Makefile similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/ut/app-c/Makefile rename to lib/3rdparty/stlport/build/Makefiles/ut/app-c/Makefile diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/ut/app-c/Makefile.inc b/lib/3rdparty/stlport/build/Makefiles/ut/app-c/Makefile.inc similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/ut/app-c/Makefile.inc rename to lib/3rdparty/stlport/build/Makefiles/ut/app-c/Makefile.inc diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/ut/app-c/test.c b/lib/3rdparty/stlport/build/Makefiles/ut/app-c/test.c similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/ut/app-c/test.c rename to lib/3rdparty/stlport/build/Makefiles/ut/app-c/test.c diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/ut/app1/Makefile b/lib/3rdparty/stlport/build/Makefiles/ut/app1/Makefile similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/ut/app1/Makefile rename to lib/3rdparty/stlport/build/Makefiles/ut/app1/Makefile diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/ut/app1/Makefile.inc b/lib/3rdparty/stlport/build/Makefiles/ut/app1/Makefile.inc similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/ut/app1/Makefile.inc rename to lib/3rdparty/stlport/build/Makefiles/ut/app1/Makefile.inc diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/ut/app1/test.cc b/lib/3rdparty/stlport/build/Makefiles/ut/app1/test.cc similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/ut/app1/test.cc rename to lib/3rdparty/stlport/build/Makefiles/ut/app1/test.cc diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/ut/app2-mult/Makefile b/lib/3rdparty/stlport/build/Makefiles/ut/app2-mult/Makefile similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/ut/app2-mult/Makefile rename to lib/3rdparty/stlport/build/Makefiles/ut/app2-mult/Makefile diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/ut/app2-mult/Makefile.inc b/lib/3rdparty/stlport/build/Makefiles/ut/app2-mult/Makefile.inc similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/ut/app2-mult/Makefile.inc rename to lib/3rdparty/stlport/build/Makefiles/ut/app2-mult/Makefile.inc diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/ut/app2-mult/test2.cc b/lib/3rdparty/stlport/build/Makefiles/ut/app2-mult/test2.cc similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/ut/app2-mult/test2.cc rename to lib/3rdparty/stlport/build/Makefiles/ut/app2-mult/test2.cc diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/ut/app2-mult/test3.cc b/lib/3rdparty/stlport/build/Makefiles/ut/app2-mult/test3.cc similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/ut/app2-mult/test3.cc rename to lib/3rdparty/stlport/build/Makefiles/ut/app2-mult/test3.cc diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/ut/app2-mult/test31.cc b/lib/3rdparty/stlport/build/Makefiles/ut/app2-mult/test31.cc similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/ut/app2-mult/test31.cc rename to lib/3rdparty/stlport/build/Makefiles/ut/app2-mult/test31.cc diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/ut/app2/Makefile b/lib/3rdparty/stlport/build/Makefiles/ut/app2/Makefile similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/ut/app2/Makefile rename to lib/3rdparty/stlport/build/Makefiles/ut/app2/Makefile diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/ut/app2/Makefile.inc b/lib/3rdparty/stlport/build/Makefiles/ut/app2/Makefile.inc similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/ut/app2/Makefile.inc rename to lib/3rdparty/stlport/build/Makefiles/ut/app2/Makefile.inc diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/ut/app2/test.cc b/lib/3rdparty/stlport/build/Makefiles/ut/app2/test.cc similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/ut/app2/test.cc rename to lib/3rdparty/stlport/build/Makefiles/ut/app2/test.cc diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/ut/app2/test2.cc b/lib/3rdparty/stlport/build/Makefiles/ut/app2/test2.cc similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/ut/app2/test2.cc rename to lib/3rdparty/stlport/build/Makefiles/ut/app2/test2.cc diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/ut/app2/test3.cc b/lib/3rdparty/stlport/build/Makefiles/ut/app2/test3.cc similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/ut/app2/test3.cc rename to lib/3rdparty/stlport/build/Makefiles/ut/app2/test3.cc diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/ut/app2/test31.cc b/lib/3rdparty/stlport/build/Makefiles/ut/app2/test31.cc similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/ut/app2/test31.cc rename to lib/3rdparty/stlport/build/Makefiles/ut/app2/test31.cc diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/ut/so1/Makefile b/lib/3rdparty/stlport/build/Makefiles/ut/so1/Makefile similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/ut/so1/Makefile rename to lib/3rdparty/stlport/build/Makefiles/ut/so1/Makefile diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/ut/so1/Makefile.inc b/lib/3rdparty/stlport/build/Makefiles/ut/so1/Makefile.inc similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/ut/so1/Makefile.inc rename to lib/3rdparty/stlport/build/Makefiles/ut/so1/Makefile.inc diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/ut/so1/test_c.cc b/lib/3rdparty/stlport/build/Makefiles/ut/so1/test_c.cc similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/ut/so1/test_c.cc rename to lib/3rdparty/stlport/build/Makefiles/ut/so1/test_c.cc diff --git a/reactos/lib/3rdparty/stlport/build/Makefiles/ut/so1/test_cc.cc b/lib/3rdparty/stlport/build/Makefiles/ut/so1/test_cc.cc similarity index 100% rename from reactos/lib/3rdparty/stlport/build/Makefiles/ut/so1/test_cc.cc rename to lib/3rdparty/stlport/build/Makefiles/ut/so1/test_cc.cc diff --git a/reactos/lib/3rdparty/stlport/build/lib/CC.mak b/lib/3rdparty/stlport/build/lib/CC.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/lib/CC.mak rename to lib/3rdparty/stlport/build/lib/CC.mak diff --git a/reactos/lib/3rdparty/stlport/build/lib/Makefile.inc b/lib/3rdparty/stlport/build/lib/Makefile.inc similarity index 100% rename from reactos/lib/3rdparty/stlport/build/lib/Makefile.inc rename to lib/3rdparty/stlport/build/lib/Makefile.inc diff --git a/reactos/lib/3rdparty/stlport/build/lib/README b/lib/3rdparty/stlport/build/lib/README similarity index 100% rename from reactos/lib/3rdparty/stlport/build/lib/README rename to lib/3rdparty/stlport/build/lib/README diff --git a/reactos/lib/3rdparty/stlport/build/lib/aCC.mak b/lib/3rdparty/stlport/build/lib/aCC.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/lib/aCC.mak rename to lib/3rdparty/stlport/build/lib/aCC.mak diff --git a/reactos/lib/3rdparty/stlport/build/lib/bcc.mak b/lib/3rdparty/stlport/build/lib/bcc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/lib/bcc.mak rename to lib/3rdparty/stlport/build/lib/bcc.mak diff --git a/reactos/lib/3rdparty/stlport/build/lib/dmc.mak b/lib/3rdparty/stlport/build/lib/dmc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/lib/dmc.mak rename to lib/3rdparty/stlport/build/lib/dmc.mak diff --git a/reactos/lib/3rdparty/stlport/build/lib/evc.mak b/lib/3rdparty/stlport/build/lib/evc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/lib/evc.mak rename to lib/3rdparty/stlport/build/lib/evc.mak diff --git a/reactos/lib/3rdparty/stlport/build/lib/gcc.mak b/lib/3rdparty/stlport/build/lib/gcc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/lib/gcc.mak rename to lib/3rdparty/stlport/build/lib/gcc.mak diff --git a/reactos/lib/3rdparty/stlport/build/lib/icc.mak b/lib/3rdparty/stlport/build/lib/icc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/lib/icc.mak rename to lib/3rdparty/stlport/build/lib/icc.mak diff --git a/reactos/lib/3rdparty/stlport/build/lib/icl.mak b/lib/3rdparty/stlport/build/lib/icl.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/lib/icl.mak rename to lib/3rdparty/stlport/build/lib/icl.mak diff --git a/reactos/lib/3rdparty/stlport/build/lib/msvc.mak b/lib/3rdparty/stlport/build/lib/msvc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/lib/msvc.mak rename to lib/3rdparty/stlport/build/lib/msvc.mak diff --git a/reactos/lib/3rdparty/stlport/build/lib/nmake-src-prefix.mak b/lib/3rdparty/stlport/build/lib/nmake-src-prefix.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/lib/nmake-src-prefix.mak rename to lib/3rdparty/stlport/build/lib/nmake-src-prefix.mak diff --git a/reactos/lib/3rdparty/stlport/build/misc/cxa_atexit/Makefile.inc b/lib/3rdparty/stlport/build/misc/cxa_atexit/Makefile.inc similarity index 100% rename from reactos/lib/3rdparty/stlport/build/misc/cxa_atexit/Makefile.inc rename to lib/3rdparty/stlport/build/misc/cxa_atexit/Makefile.inc diff --git a/reactos/lib/3rdparty/stlport/build/misc/cxa_atexit/gcc.mak b/lib/3rdparty/stlport/build/misc/cxa_atexit/gcc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/misc/cxa_atexit/gcc.mak rename to lib/3rdparty/stlport/build/misc/cxa_atexit/gcc.mak diff --git a/reactos/lib/3rdparty/stlport/build/test/eh/Makefile.inc b/lib/3rdparty/stlport/build/test/eh/Makefile.inc similarity index 100% rename from reactos/lib/3rdparty/stlport/build/test/eh/Makefile.inc rename to lib/3rdparty/stlport/build/test/eh/Makefile.inc diff --git a/reactos/lib/3rdparty/stlport/build/test/eh/bcc.mak b/lib/3rdparty/stlport/build/test/eh/bcc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/test/eh/bcc.mak rename to lib/3rdparty/stlport/build/test/eh/bcc.mak diff --git a/reactos/lib/3rdparty/stlport/build/test/eh/evc.mak b/lib/3rdparty/stlport/build/test/eh/evc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/test/eh/evc.mak rename to lib/3rdparty/stlport/build/test/eh/evc.mak diff --git a/reactos/lib/3rdparty/stlport/build/test/eh/gcc.mak b/lib/3rdparty/stlport/build/test/eh/gcc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/test/eh/gcc.mak rename to lib/3rdparty/stlport/build/test/eh/gcc.mak diff --git a/reactos/lib/3rdparty/stlport/build/test/eh/icl.mak b/lib/3rdparty/stlport/build/test/eh/icl.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/test/eh/icl.mak rename to lib/3rdparty/stlport/build/test/eh/icl.mak diff --git a/reactos/lib/3rdparty/stlport/build/test/eh/msvc.mak b/lib/3rdparty/stlport/build/test/eh/msvc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/test/eh/msvc.mak rename to lib/3rdparty/stlport/build/test/eh/msvc.mak diff --git a/reactos/lib/3rdparty/stlport/build/test/eh/nmake-src-prefix.mak b/lib/3rdparty/stlport/build/test/eh/nmake-src-prefix.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/test/eh/nmake-src-prefix.mak rename to lib/3rdparty/stlport/build/test/eh/nmake-src-prefix.mak diff --git a/reactos/lib/3rdparty/stlport/build/test/unit/CC.mak b/lib/3rdparty/stlport/build/test/unit/CC.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/test/unit/CC.mak rename to lib/3rdparty/stlport/build/test/unit/CC.mak diff --git a/reactos/lib/3rdparty/stlport/build/test/unit/Makefile.inc b/lib/3rdparty/stlport/build/test/unit/Makefile.inc similarity index 100% rename from reactos/lib/3rdparty/stlport/build/test/unit/Makefile.inc rename to lib/3rdparty/stlport/build/test/unit/Makefile.inc diff --git a/reactos/lib/3rdparty/stlport/build/test/unit/README b/lib/3rdparty/stlport/build/test/unit/README similarity index 100% rename from reactos/lib/3rdparty/stlport/build/test/unit/README rename to lib/3rdparty/stlport/build/test/unit/README diff --git a/reactos/lib/3rdparty/stlport/build/test/unit/STATUS b/lib/3rdparty/stlport/build/test/unit/STATUS similarity index 100% rename from reactos/lib/3rdparty/stlport/build/test/unit/STATUS rename to lib/3rdparty/stlport/build/test/unit/STATUS diff --git a/reactos/lib/3rdparty/stlport/build/test/unit/aCC.mak b/lib/3rdparty/stlport/build/test/unit/aCC.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/test/unit/aCC.mak rename to lib/3rdparty/stlport/build/test/unit/aCC.mak diff --git a/reactos/lib/3rdparty/stlport/build/test/unit/bcc.mak b/lib/3rdparty/stlport/build/test/unit/bcc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/test/unit/bcc.mak rename to lib/3rdparty/stlport/build/test/unit/bcc.mak diff --git a/reactos/lib/3rdparty/stlport/build/test/unit/dmc.mak b/lib/3rdparty/stlport/build/test/unit/dmc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/test/unit/dmc.mak rename to lib/3rdparty/stlport/build/test/unit/dmc.mak diff --git a/reactos/lib/3rdparty/stlport/build/test/unit/evc.mak b/lib/3rdparty/stlport/build/test/unit/evc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/test/unit/evc.mak rename to lib/3rdparty/stlport/build/test/unit/evc.mak diff --git a/reactos/lib/3rdparty/stlport/build/test/unit/gcc.mak b/lib/3rdparty/stlport/build/test/unit/gcc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/test/unit/gcc.mak rename to lib/3rdparty/stlport/build/test/unit/gcc.mak diff --git a/reactos/lib/3rdparty/stlport/build/test/unit/icc.mak b/lib/3rdparty/stlport/build/test/unit/icc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/test/unit/icc.mak rename to lib/3rdparty/stlport/build/test/unit/icc.mak diff --git a/reactos/lib/3rdparty/stlport/build/test/unit/icl.mak b/lib/3rdparty/stlport/build/test/unit/icl.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/test/unit/icl.mak rename to lib/3rdparty/stlport/build/test/unit/icl.mak diff --git a/reactos/lib/3rdparty/stlport/build/test/unit/msvc.mak b/lib/3rdparty/stlport/build/test/unit/msvc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/test/unit/msvc.mak rename to lib/3rdparty/stlport/build/test/unit/msvc.mak diff --git a/reactos/lib/3rdparty/stlport/build/test/unit/nmake-src-prefix.mak b/lib/3rdparty/stlport/build/test/unit/nmake-src-prefix.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/build/test/unit/nmake-src-prefix.mak rename to lib/3rdparty/stlport/build/test/unit/nmake-src-prefix.mak diff --git a/reactos/lib/3rdparty/stlport/configure b/lib/3rdparty/stlport/configure similarity index 100% rename from reactos/lib/3rdparty/stlport/configure rename to lib/3rdparty/stlport/configure diff --git a/reactos/lib/3rdparty/stlport/configure.bat b/lib/3rdparty/stlport/configure.bat similarity index 100% rename from reactos/lib/3rdparty/stlport/configure.bat rename to lib/3rdparty/stlport/configure.bat diff --git a/reactos/lib/3rdparty/stlport/doc/FAQ b/lib/3rdparty/stlport/doc/FAQ similarity index 100% rename from reactos/lib/3rdparty/stlport/doc/FAQ rename to lib/3rdparty/stlport/doc/FAQ diff --git a/reactos/lib/3rdparty/stlport/doc/README.borland b/lib/3rdparty/stlport/doc/README.borland similarity index 100% rename from reactos/lib/3rdparty/stlport/doc/README.borland rename to lib/3rdparty/stlport/doc/README.borland diff --git a/reactos/lib/3rdparty/stlport/doc/README.cygwin b/lib/3rdparty/stlport/doc/README.cygwin similarity index 100% rename from reactos/lib/3rdparty/stlport/doc/README.cygwin rename to lib/3rdparty/stlport/doc/README.cygwin diff --git a/reactos/lib/3rdparty/stlport/doc/README.dmc b/lib/3rdparty/stlport/doc/README.dmc similarity index 100% rename from reactos/lib/3rdparty/stlport/doc/README.dmc rename to lib/3rdparty/stlport/doc/README.dmc diff --git a/reactos/lib/3rdparty/stlport/doc/README.evc3 b/lib/3rdparty/stlport/doc/README.evc3 similarity index 100% rename from reactos/lib/3rdparty/stlport/doc/README.evc3 rename to lib/3rdparty/stlport/doc/README.evc3 diff --git a/reactos/lib/3rdparty/stlport/doc/README.evc4 b/lib/3rdparty/stlport/doc/README.evc4 similarity index 100% rename from reactos/lib/3rdparty/stlport/doc/README.evc4 rename to lib/3rdparty/stlport/doc/README.evc4 diff --git a/reactos/lib/3rdparty/stlport/doc/README.evc8 b/lib/3rdparty/stlport/doc/README.evc8 similarity index 100% rename from reactos/lib/3rdparty/stlport/doc/README.evc8 rename to lib/3rdparty/stlport/doc/README.evc8 diff --git a/reactos/lib/3rdparty/stlport/doc/README.evc9 b/lib/3rdparty/stlport/doc/README.evc9 similarity index 100% rename from reactos/lib/3rdparty/stlport/doc/README.evc9 rename to lib/3rdparty/stlport/doc/README.evc9 diff --git a/reactos/lib/3rdparty/stlport/doc/README.intel b/lib/3rdparty/stlport/doc/README.intel similarity index 100% rename from reactos/lib/3rdparty/stlport/doc/README.intel rename to lib/3rdparty/stlport/doc/README.intel diff --git a/reactos/lib/3rdparty/stlport/doc/README.mingw b/lib/3rdparty/stlport/doc/README.mingw similarity index 100% rename from reactos/lib/3rdparty/stlport/doc/README.mingw rename to lib/3rdparty/stlport/doc/README.mingw diff --git a/reactos/lib/3rdparty/stlport/doc/README.msvc b/lib/3rdparty/stlport/doc/README.msvc similarity index 100% rename from reactos/lib/3rdparty/stlport/doc/README.msvc rename to lib/3rdparty/stlport/doc/README.msvc diff --git a/reactos/lib/3rdparty/stlport/doc/README.utf8 b/lib/3rdparty/stlport/doc/README.utf8 similarity index 100% rename from reactos/lib/3rdparty/stlport/doc/README.utf8 rename to lib/3rdparty/stlport/doc/README.utf8 diff --git a/reactos/lib/3rdparty/stlport/doc/README.wince b/lib/3rdparty/stlport/doc/README.wince similarity index 100% rename from reactos/lib/3rdparty/stlport/doc/README.wince rename to lib/3rdparty/stlport/doc/README.wince diff --git a/reactos/lib/3rdparty/stlport/doc/README.windows b/lib/3rdparty/stlport/doc/README.windows similarity index 100% rename from reactos/lib/3rdparty/stlport/doc/README.windows rename to lib/3rdparty/stlport/doc/README.windows diff --git a/reactos/lib/3rdparty/stlport/doc/build_system.txt b/lib/3rdparty/stlport/doc/build_system.txt similarity index 100% rename from reactos/lib/3rdparty/stlport/doc/build_system.txt rename to lib/3rdparty/stlport/doc/build_system.txt diff --git a/reactos/lib/3rdparty/stlport/doc/pointer_specialization.txt b/lib/3rdparty/stlport/doc/pointer_specialization.txt similarity index 100% rename from reactos/lib/3rdparty/stlport/doc/pointer_specialization.txt rename to lib/3rdparty/stlport/doc/pointer_specialization.txt diff --git a/reactos/lib/3rdparty/stlport/doc/stlport_namespaces.txt b/lib/3rdparty/stlport/doc/stlport_namespaces.txt similarity index 100% rename from reactos/lib/3rdparty/stlport/doc/stlport_namespaces.txt rename to lib/3rdparty/stlport/doc/stlport_namespaces.txt diff --git a/reactos/lib/3rdparty/stlport/etc/ChangeLog b/lib/3rdparty/stlport/etc/ChangeLog similarity index 100% rename from reactos/lib/3rdparty/stlport/etc/ChangeLog rename to lib/3rdparty/stlport/etc/ChangeLog diff --git a/reactos/lib/3rdparty/stlport/etc/ChangeLog-4.0 b/lib/3rdparty/stlport/etc/ChangeLog-4.0 similarity index 100% rename from reactos/lib/3rdparty/stlport/etc/ChangeLog-4.0 rename to lib/3rdparty/stlport/etc/ChangeLog-4.0 diff --git a/reactos/lib/3rdparty/stlport/etc/ChangeLog-5.1 b/lib/3rdparty/stlport/etc/ChangeLog-5.1 similarity index 100% rename from reactos/lib/3rdparty/stlport/etc/ChangeLog-5.1 rename to lib/3rdparty/stlport/etc/ChangeLog-5.1 diff --git a/reactos/lib/3rdparty/stlport/etc/ReleaseNote.txt b/lib/3rdparty/stlport/etc/ReleaseNote.txt similarity index 100% rename from reactos/lib/3rdparty/stlport/etc/ReleaseNote.txt rename to lib/3rdparty/stlport/etc/ReleaseNote.txt diff --git a/reactos/lib/3rdparty/stlport/etc/STLport-4.5.1.spec b/lib/3rdparty/stlport/etc/STLport-4.5.1.spec similarity index 100% rename from reactos/lib/3rdparty/stlport/etc/STLport-4.5.1.spec rename to lib/3rdparty/stlport/etc/STLport-4.5.1.spec diff --git a/reactos/lib/3rdparty/stlport/etc/STLport-4.5.3.spec b/lib/3rdparty/stlport/etc/STLport-4.5.3.spec similarity index 100% rename from reactos/lib/3rdparty/stlport/etc/STLport-4.5.3.spec rename to lib/3rdparty/stlport/etc/STLport-4.5.3.spec diff --git a/reactos/lib/3rdparty/stlport/etc/STLport-4.6.spec b/lib/3rdparty/stlport/etc/STLport-4.6.spec similarity index 100% rename from reactos/lib/3rdparty/stlport/etc/STLport-4.6.spec rename to lib/3rdparty/stlport/etc/STLport-4.6.spec diff --git a/reactos/lib/3rdparty/stlport/etc/autoexp.dat b/lib/3rdparty/stlport/etc/autoexp.dat similarity index 100% rename from reactos/lib/3rdparty/stlport/etc/autoexp.dat rename to lib/3rdparty/stlport/etc/autoexp.dat diff --git a/reactos/lib/3rdparty/stlport/etc/msvcincl.dat b/lib/3rdparty/stlport/etc/msvcincl.dat similarity index 100% rename from reactos/lib/3rdparty/stlport/etc/msvcincl.dat rename to lib/3rdparty/stlport/etc/msvcincl.dat diff --git a/reactos/lib/3rdparty/stlport/etc/std_headers.txt b/lib/3rdparty/stlport/etc/std_headers.txt similarity index 100% rename from reactos/lib/3rdparty/stlport/etc/std_headers.txt rename to lib/3rdparty/stlport/etc/std_headers.txt diff --git a/reactos/lib/3rdparty/stlport/etc/std_headers_c.txt b/lib/3rdparty/stlport/etc/std_headers_c.txt similarity index 100% rename from reactos/lib/3rdparty/stlport/etc/std_headers_c.txt rename to lib/3rdparty/stlport/etc/std_headers_c.txt diff --git a/reactos/lib/3rdparty/stlport/etc/std_headers_c_h.txt b/lib/3rdparty/stlport/etc/std_headers_c_h.txt similarity index 100% rename from reactos/lib/3rdparty/stlport/etc/std_headers_c_h.txt rename to lib/3rdparty/stlport/etc/std_headers_c_h.txt diff --git a/reactos/lib/3rdparty/stlport/etc/std_headers_classic_iostreams.txt b/lib/3rdparty/stlport/etc/std_headers_classic_iostreams.txt similarity index 100% rename from reactos/lib/3rdparty/stlport/etc/std_headers_classic_iostreams.txt rename to lib/3rdparty/stlport/etc/std_headers_classic_iostreams.txt diff --git a/reactos/lib/3rdparty/stlport/etc/std_headers_cpp_runtime.txt b/lib/3rdparty/stlport/etc/std_headers_cpp_runtime.txt similarity index 100% rename from reactos/lib/3rdparty/stlport/etc/std_headers_cpp_runtime.txt rename to lib/3rdparty/stlport/etc/std_headers_cpp_runtime.txt diff --git a/reactos/lib/3rdparty/stlport/etc/std_headers_cpp_runtime_h.txt b/lib/3rdparty/stlport/etc/std_headers_cpp_runtime_h.txt similarity index 100% rename from reactos/lib/3rdparty/stlport/etc/std_headers_cpp_runtime_h.txt rename to lib/3rdparty/stlport/etc/std_headers_cpp_runtime_h.txt diff --git a/reactos/lib/3rdparty/stlport/src/_stdio_file.h b/lib/3rdparty/stlport/src/_stdio_file.h similarity index 100% rename from reactos/lib/3rdparty/stlport/src/_stdio_file.h rename to lib/3rdparty/stlport/src/_stdio_file.h diff --git a/reactos/lib/3rdparty/stlport/src/acquire_release.h b/lib/3rdparty/stlport/src/acquire_release.h similarity index 100% rename from reactos/lib/3rdparty/stlport/src/acquire_release.h rename to lib/3rdparty/stlport/src/acquire_release.h diff --git a/reactos/lib/3rdparty/stlport/src/aligned_buffer.h b/lib/3rdparty/stlport/src/aligned_buffer.h similarity index 100% rename from reactos/lib/3rdparty/stlport/src/aligned_buffer.h rename to lib/3rdparty/stlport/src/aligned_buffer.h diff --git a/reactos/lib/3rdparty/stlport/src/allocators.cpp b/lib/3rdparty/stlport/src/allocators.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/allocators.cpp rename to lib/3rdparty/stlport/src/allocators.cpp diff --git a/reactos/lib/3rdparty/stlport/src/bitset.cpp b/lib/3rdparty/stlport/src/bitset.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/bitset.cpp rename to lib/3rdparty/stlport/src/bitset.cpp diff --git a/reactos/lib/3rdparty/stlport/src/c_locale.c b/lib/3rdparty/stlport/src/c_locale.c similarity index 100% rename from reactos/lib/3rdparty/stlport/src/c_locale.c rename to lib/3rdparty/stlport/src/c_locale.c diff --git a/reactos/lib/3rdparty/stlport/src/c_locale.h b/lib/3rdparty/stlport/src/c_locale.h similarity index 100% rename from reactos/lib/3rdparty/stlport/src/c_locale.h rename to lib/3rdparty/stlport/src/c_locale.h diff --git a/reactos/lib/3rdparty/stlport/src/c_locale_dummy/c_locale_dummy.c b/lib/3rdparty/stlport/src/c_locale_dummy/c_locale_dummy.c similarity index 100% rename from reactos/lib/3rdparty/stlport/src/c_locale_dummy/c_locale_dummy.c rename to lib/3rdparty/stlport/src/c_locale_dummy/c_locale_dummy.c diff --git a/reactos/lib/3rdparty/stlport/src/c_locale_glibc/c_locale_glibc2.c b/lib/3rdparty/stlport/src/c_locale_glibc/c_locale_glibc2.c similarity index 100% rename from reactos/lib/3rdparty/stlport/src/c_locale_glibc/c_locale_glibc2.c rename to lib/3rdparty/stlport/src/c_locale_glibc/c_locale_glibc2.c diff --git a/reactos/lib/3rdparty/stlport/src/c_locale_win32/c_locale_win32.c b/lib/3rdparty/stlport/src/c_locale_win32/c_locale_win32.c similarity index 100% rename from reactos/lib/3rdparty/stlport/src/c_locale_win32/c_locale_win32.c rename to lib/3rdparty/stlport/src/c_locale_win32/c_locale_win32.c diff --git a/reactos/lib/3rdparty/stlport/src/c_locale_win32/c_wlocale_win32.c b/lib/3rdparty/stlport/src/c_locale_win32/c_wlocale_win32.c similarity index 100% rename from reactos/lib/3rdparty/stlport/src/c_locale_win32/c_wlocale_win32.c rename to lib/3rdparty/stlport/src/c_locale_win32/c_wlocale_win32.c diff --git a/reactos/lib/3rdparty/stlport/src/codecvt.cpp b/lib/3rdparty/stlport/src/codecvt.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/codecvt.cpp rename to lib/3rdparty/stlport/src/codecvt.cpp diff --git a/reactos/lib/3rdparty/stlport/src/collate.cpp b/lib/3rdparty/stlport/src/collate.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/collate.cpp rename to lib/3rdparty/stlport/src/collate.cpp diff --git a/reactos/lib/3rdparty/stlport/src/complex.cpp b/lib/3rdparty/stlport/src/complex.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/complex.cpp rename to lib/3rdparty/stlport/src/complex.cpp diff --git a/reactos/lib/3rdparty/stlport/src/complex_io.cpp b/lib/3rdparty/stlport/src/complex_io.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/complex_io.cpp rename to lib/3rdparty/stlport/src/complex_io.cpp diff --git a/reactos/lib/3rdparty/stlport/src/complex_trig.cpp b/lib/3rdparty/stlport/src/complex_trig.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/complex_trig.cpp rename to lib/3rdparty/stlport/src/complex_trig.cpp diff --git a/reactos/lib/3rdparty/stlport/src/ctype.cpp b/lib/3rdparty/stlport/src/ctype.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/ctype.cpp rename to lib/3rdparty/stlport/src/ctype.cpp diff --git a/reactos/lib/3rdparty/stlport/src/cxa.c b/lib/3rdparty/stlport/src/cxa.c similarity index 100% rename from reactos/lib/3rdparty/stlport/src/cxa.c rename to lib/3rdparty/stlport/src/cxa.c diff --git a/reactos/lib/3rdparty/stlport/src/details/fstream_stdio.cpp b/lib/3rdparty/stlport/src/details/fstream_stdio.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/details/fstream_stdio.cpp rename to lib/3rdparty/stlport/src/details/fstream_stdio.cpp diff --git a/reactos/lib/3rdparty/stlport/src/details/fstream_unistd.cpp b/lib/3rdparty/stlport/src/details/fstream_unistd.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/details/fstream_unistd.cpp rename to lib/3rdparty/stlport/src/details/fstream_unistd.cpp diff --git a/reactos/lib/3rdparty/stlport/src/details/fstream_win32io.cpp b/lib/3rdparty/stlport/src/details/fstream_win32io.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/details/fstream_win32io.cpp rename to lib/3rdparty/stlport/src/details/fstream_win32io.cpp diff --git a/reactos/lib/3rdparty/stlport/src/dll_main.cpp b/lib/3rdparty/stlport/src/dll_main.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/dll_main.cpp rename to lib/3rdparty/stlport/src/dll_main.cpp diff --git a/reactos/lib/3rdparty/stlport/src/facets_byname.cpp b/lib/3rdparty/stlport/src/facets_byname.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/facets_byname.cpp rename to lib/3rdparty/stlport/src/facets_byname.cpp diff --git a/reactos/lib/3rdparty/stlport/src/fstream.cpp b/lib/3rdparty/stlport/src/fstream.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/fstream.cpp rename to lib/3rdparty/stlport/src/fstream.cpp diff --git a/reactos/lib/3rdparty/stlport/src/ios.cpp b/lib/3rdparty/stlport/src/ios.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/ios.cpp rename to lib/3rdparty/stlport/src/ios.cpp diff --git a/reactos/lib/3rdparty/stlport/src/iostream.cpp b/lib/3rdparty/stlport/src/iostream.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/iostream.cpp rename to lib/3rdparty/stlport/src/iostream.cpp diff --git a/reactos/lib/3rdparty/stlport/src/istream.cpp b/lib/3rdparty/stlport/src/istream.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/istream.cpp rename to lib/3rdparty/stlport/src/istream.cpp diff --git a/reactos/lib/3rdparty/stlport/src/locale.cpp b/lib/3rdparty/stlport/src/locale.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/locale.cpp rename to lib/3rdparty/stlport/src/locale.cpp diff --git a/reactos/lib/3rdparty/stlport/src/locale_catalog.cpp b/lib/3rdparty/stlport/src/locale_catalog.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/locale_catalog.cpp rename to lib/3rdparty/stlport/src/locale_catalog.cpp diff --git a/reactos/lib/3rdparty/stlport/src/locale_impl.cpp b/lib/3rdparty/stlport/src/locale_impl.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/locale_impl.cpp rename to lib/3rdparty/stlport/src/locale_impl.cpp diff --git a/reactos/lib/3rdparty/stlport/src/locale_impl.h b/lib/3rdparty/stlport/src/locale_impl.h similarity index 100% rename from reactos/lib/3rdparty/stlport/src/locale_impl.h rename to lib/3rdparty/stlport/src/locale_impl.h diff --git a/reactos/lib/3rdparty/stlport/src/lock_free_slist.h b/lib/3rdparty/stlport/src/lock_free_slist.h similarity index 100% rename from reactos/lib/3rdparty/stlport/src/lock_free_slist.h rename to lib/3rdparty/stlport/src/lock_free_slist.h diff --git a/reactos/lib/3rdparty/stlport/src/message_facets.h b/lib/3rdparty/stlport/src/message_facets.h similarity index 100% rename from reactos/lib/3rdparty/stlport/src/message_facets.h rename to lib/3rdparty/stlport/src/message_facets.h diff --git a/reactos/lib/3rdparty/stlport/src/messages.cpp b/lib/3rdparty/stlport/src/messages.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/messages.cpp rename to lib/3rdparty/stlport/src/messages.cpp diff --git a/reactos/lib/3rdparty/stlport/src/monetary.cpp b/lib/3rdparty/stlport/src/monetary.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/monetary.cpp rename to lib/3rdparty/stlport/src/monetary.cpp diff --git a/reactos/lib/3rdparty/stlport/src/num_get.cpp b/lib/3rdparty/stlport/src/num_get.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/num_get.cpp rename to lib/3rdparty/stlport/src/num_get.cpp diff --git a/reactos/lib/3rdparty/stlport/src/num_get_float.cpp b/lib/3rdparty/stlport/src/num_get_float.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/num_get_float.cpp rename to lib/3rdparty/stlport/src/num_get_float.cpp diff --git a/reactos/lib/3rdparty/stlport/src/num_put.cpp b/lib/3rdparty/stlport/src/num_put.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/num_put.cpp rename to lib/3rdparty/stlport/src/num_put.cpp diff --git a/reactos/lib/3rdparty/stlport/src/num_put_float.cpp b/lib/3rdparty/stlport/src/num_put_float.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/num_put_float.cpp rename to lib/3rdparty/stlport/src/num_put_float.cpp diff --git a/reactos/lib/3rdparty/stlport/src/numpunct.cpp b/lib/3rdparty/stlport/src/numpunct.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/numpunct.cpp rename to lib/3rdparty/stlport/src/numpunct.cpp diff --git a/reactos/lib/3rdparty/stlport/src/ostream.cpp b/lib/3rdparty/stlport/src/ostream.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/ostream.cpp rename to lib/3rdparty/stlport/src/ostream.cpp diff --git a/reactos/lib/3rdparty/stlport/src/sparc_atomic.s b/lib/3rdparty/stlport/src/sparc_atomic.s similarity index 100% rename from reactos/lib/3rdparty/stlport/src/sparc_atomic.s rename to lib/3rdparty/stlport/src/sparc_atomic.s diff --git a/reactos/lib/3rdparty/stlport/src/sparc_atomic64.s b/lib/3rdparty/stlport/src/sparc_atomic64.s similarity index 100% rename from reactos/lib/3rdparty/stlport/src/sparc_atomic64.s rename to lib/3rdparty/stlport/src/sparc_atomic64.s diff --git a/reactos/lib/3rdparty/stlport/src/sstream.cpp b/lib/3rdparty/stlport/src/sstream.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/sstream.cpp rename to lib/3rdparty/stlport/src/sstream.cpp diff --git a/reactos/lib/3rdparty/stlport/src/stdio_streambuf.cpp b/lib/3rdparty/stlport/src/stdio_streambuf.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/stdio_streambuf.cpp rename to lib/3rdparty/stlport/src/stdio_streambuf.cpp diff --git a/reactos/lib/3rdparty/stlport/src/stdio_streambuf.h b/lib/3rdparty/stlport/src/stdio_streambuf.h similarity index 100% rename from reactos/lib/3rdparty/stlport/src/stdio_streambuf.h rename to lib/3rdparty/stlport/src/stdio_streambuf.h diff --git a/reactos/lib/3rdparty/stlport/src/stlport.rc b/lib/3rdparty/stlport/src/stlport.rc similarity index 100% rename from reactos/lib/3rdparty/stlport/src/stlport.rc rename to lib/3rdparty/stlport/src/stlport.rc diff --git a/reactos/lib/3rdparty/stlport/src/stlport_prefix.h b/lib/3rdparty/stlport/src/stlport_prefix.h similarity index 100% rename from reactos/lib/3rdparty/stlport/src/stlport_prefix.h rename to lib/3rdparty/stlport/src/stlport_prefix.h diff --git a/reactos/lib/3rdparty/stlport/src/string.cpp b/lib/3rdparty/stlport/src/string.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/string.cpp rename to lib/3rdparty/stlport/src/string.cpp diff --git a/reactos/lib/3rdparty/stlport/src/strstream.cpp b/lib/3rdparty/stlport/src/strstream.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/strstream.cpp rename to lib/3rdparty/stlport/src/strstream.cpp diff --git a/reactos/lib/3rdparty/stlport/src/time_facets.cpp b/lib/3rdparty/stlport/src/time_facets.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/src/time_facets.cpp rename to lib/3rdparty/stlport/src/time_facets.cpp diff --git a/reactos/lib/3rdparty/stlport/src/warning_disable.h b/lib/3rdparty/stlport/src/warning_disable.h similarity index 100% rename from reactos/lib/3rdparty/stlport/src/warning_disable.h rename to lib/3rdparty/stlport/src/warning_disable.h diff --git a/reactos/lib/3rdparty/stlport/test/compiler/Makefile.inc b/lib/3rdparty/stlport/test/compiler/Makefile.inc similarity index 100% rename from reactos/lib/3rdparty/stlport/test/compiler/Makefile.inc rename to lib/3rdparty/stlport/test/compiler/Makefile.inc diff --git a/reactos/lib/3rdparty/stlport/test/compiler/README b/lib/3rdparty/stlport/test/compiler/README similarity index 100% rename from reactos/lib/3rdparty/stlport/test/compiler/README rename to lib/3rdparty/stlport/test/compiler/README diff --git a/reactos/lib/3rdparty/stlport/test/compiler/StTerm-order/Makefile b/lib/3rdparty/stlport/test/compiler/StTerm-order/Makefile similarity index 100% rename from reactos/lib/3rdparty/stlport/test/compiler/StTerm-order/Makefile rename to lib/3rdparty/stlport/test/compiler/StTerm-order/Makefile diff --git a/reactos/lib/3rdparty/stlport/test/compiler/StTerm-order/Makefile.inc b/lib/3rdparty/stlport/test/compiler/StTerm-order/Makefile.inc similarity index 100% rename from reactos/lib/3rdparty/stlport/test/compiler/StTerm-order/Makefile.inc rename to lib/3rdparty/stlport/test/compiler/StTerm-order/Makefile.inc diff --git a/reactos/lib/3rdparty/stlport/test/compiler/StTerm-order/stterm-test.cc b/lib/3rdparty/stlport/test/compiler/StTerm-order/stterm-test.cc similarity index 100% rename from reactos/lib/3rdparty/stlport/test/compiler/StTerm-order/stterm-test.cc rename to lib/3rdparty/stlport/test/compiler/StTerm-order/stterm-test.cc diff --git a/reactos/lib/3rdparty/stlport/test/compiler/eh.cc b/lib/3rdparty/stlport/test/compiler/eh.cc similarity index 100% rename from reactos/lib/3rdparty/stlport/test/compiler/eh.cc rename to lib/3rdparty/stlport/test/compiler/eh.cc diff --git a/reactos/lib/3rdparty/stlport/test/compiler/gcc.mak b/lib/3rdparty/stlport/test/compiler/gcc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/compiler/gcc.mak rename to lib/3rdparty/stlport/test/compiler/gcc.mak diff --git a/reactos/lib/3rdparty/stlport/test/compiler/movable.cpp b/lib/3rdparty/stlport/test/compiler/movable.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/compiler/movable.cpp rename to lib/3rdparty/stlport/test/compiler/movable.cpp diff --git a/reactos/lib/3rdparty/stlport/test/compiler/partial_spec.cpp b/lib/3rdparty/stlport/test/compiler/partial_spec.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/compiler/partial_spec.cpp rename to lib/3rdparty/stlport/test/compiler/partial_spec.cpp diff --git a/reactos/lib/3rdparty/stlport/test/compiler/ttei1.cpp b/lib/3rdparty/stlport/test/compiler/ttei1.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/compiler/ttei1.cpp rename to lib/3rdparty/stlport/test/compiler/ttei1.cpp diff --git a/reactos/lib/3rdparty/stlport/test/compiler/ttei2.cpp b/lib/3rdparty/stlport/test/compiler/ttei2.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/compiler/ttei2.cpp rename to lib/3rdparty/stlport/test/compiler/ttei2.cpp diff --git a/reactos/lib/3rdparty/stlport/test/compiler/ttei3.cpp b/lib/3rdparty/stlport/test/compiler/ttei3.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/compiler/ttei3.cpp rename to lib/3rdparty/stlport/test/compiler/ttei3.cpp diff --git a/reactos/lib/3rdparty/stlport/test/compiler/ttei4.cpp b/lib/3rdparty/stlport/test/compiler/ttei4.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/compiler/ttei4.cpp rename to lib/3rdparty/stlport/test/compiler/ttei4.cpp diff --git a/reactos/lib/3rdparty/stlport/test/compiler/ttei5.cpp b/lib/3rdparty/stlport/test/compiler/ttei5.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/compiler/ttei5.cpp rename to lib/3rdparty/stlport/test/compiler/ttei5.cpp diff --git a/reactos/lib/3rdparty/stlport/test/compiler/ttei6.cpp b/lib/3rdparty/stlport/test/compiler/ttei6.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/compiler/ttei6.cpp rename to lib/3rdparty/stlport/test/compiler/ttei6.cpp diff --git a/reactos/lib/3rdparty/stlport/test/compiler/ttei7.cpp b/lib/3rdparty/stlport/test/compiler/ttei7.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/compiler/ttei7.cpp rename to lib/3rdparty/stlport/test/compiler/ttei7.cpp diff --git a/reactos/lib/3rdparty/stlport/test/eh/LeakCheck.h b/lib/3rdparty/stlport/test/eh/LeakCheck.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/LeakCheck.h rename to lib/3rdparty/stlport/test/eh/LeakCheck.h diff --git a/reactos/lib/3rdparty/stlport/test/eh/Prefix.h b/lib/3rdparty/stlport/test/eh/Prefix.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/Prefix.h rename to lib/3rdparty/stlport/test/eh/Prefix.h diff --git a/reactos/lib/3rdparty/stlport/test/eh/SortClass.h b/lib/3rdparty/stlport/test/eh/SortClass.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/SortClass.h rename to lib/3rdparty/stlport/test/eh/SortClass.h diff --git a/reactos/lib/3rdparty/stlport/test/eh/TestClass.cpp b/lib/3rdparty/stlport/test/eh/TestClass.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/TestClass.cpp rename to lib/3rdparty/stlport/test/eh/TestClass.cpp diff --git a/reactos/lib/3rdparty/stlport/test/eh/TestClass.h b/lib/3rdparty/stlport/test/eh/TestClass.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/TestClass.h rename to lib/3rdparty/stlport/test/eh/TestClass.h diff --git a/reactos/lib/3rdparty/stlport/test/eh/Tests.h b/lib/3rdparty/stlport/test/eh/Tests.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/Tests.h rename to lib/3rdparty/stlport/test/eh/Tests.h diff --git a/reactos/lib/3rdparty/stlport/test/eh/ThrowCompare.h b/lib/3rdparty/stlport/test/eh/ThrowCompare.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/ThrowCompare.h rename to lib/3rdparty/stlport/test/eh/ThrowCompare.h diff --git a/reactos/lib/3rdparty/stlport/test/eh/bcb.mak b/lib/3rdparty/stlport/test/eh/bcb.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/bcb.mak rename to lib/3rdparty/stlport/test/eh/bcb.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/bug.cpp b/lib/3rdparty/stlport/test/eh/bug.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/bug.cpp rename to lib/3rdparty/stlport/test/eh/bug.cpp diff --git a/reactos/lib/3rdparty/stlport/test/eh/como-linux.mak b/lib/3rdparty/stlport/test/eh/como-linux.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/como-linux.mak rename to lib/3rdparty/stlport/test/eh/como-linux.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/como.mak b/lib/3rdparty/stlport/test/eh/como.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/como.mak rename to lib/3rdparty/stlport/test/eh/como.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/cray.mak b/lib/3rdparty/stlport/test/eh/cray.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/cray.mak rename to lib/3rdparty/stlport/test/eh/cray.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/cygwin.mak b/lib/3rdparty/stlport/test/eh/cygwin.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/cygwin.mak rename to lib/3rdparty/stlport/test/eh/cygwin.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/deccxx.mak b/lib/3rdparty/stlport/test/eh/deccxx.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/deccxx.mak rename to lib/3rdparty/stlport/test/eh/deccxx.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/descrip.mms b/lib/3rdparty/stlport/test/eh/descrip.mms similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/descrip.mms rename to lib/3rdparty/stlport/test/eh/descrip.mms diff --git a/reactos/lib/3rdparty/stlport/test/eh/djgpp.mak b/lib/3rdparty/stlport/test/eh/djgpp.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/djgpp.mak rename to lib/3rdparty/stlport/test/eh/djgpp.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/egcs.mak b/lib/3rdparty/stlport/test/eh/egcs.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/egcs.mak rename to lib/3rdparty/stlport/test/eh/egcs.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/export b/lib/3rdparty/stlport/test/eh/export similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/export rename to lib/3rdparty/stlport/test/eh/export diff --git a/reactos/lib/3rdparty/stlport/test/eh/gcc-99r1.mak b/lib/3rdparty/stlport/test/eh/gcc-99r1.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/gcc-99r1.mak rename to lib/3rdparty/stlport/test/eh/gcc-99r1.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/gcc-amigaos-m68k.mak b/lib/3rdparty/stlport/test/eh/gcc-amigaos-m68k.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/gcc-amigaos-m68k.mak rename to lib/3rdparty/stlport/test/eh/gcc-amigaos-m68k.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/gcc-apple-macosx.mak b/lib/3rdparty/stlport/test/eh/gcc-apple-macosx.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/gcc-apple-macosx.mak rename to lib/3rdparty/stlport/test/eh/gcc-apple-macosx.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/gcc-freebsd.mak b/lib/3rdparty/stlport/test/eh/gcc-freebsd.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/gcc-freebsd.mak rename to lib/3rdparty/stlport/test/eh/gcc-freebsd.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/gcc-hp11.mak b/lib/3rdparty/stlport/test/eh/gcc-hp11.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/gcc-hp11.mak rename to lib/3rdparty/stlport/test/eh/gcc-hp11.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/gcc-irix.mak b/lib/3rdparty/stlport/test/eh/gcc-irix.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/gcc-irix.mak rename to lib/3rdparty/stlport/test/eh/gcc-irix.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/gcc-linux.mak b/lib/3rdparty/stlport/test/eh/gcc-linux.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/gcc-linux.mak rename to lib/3rdparty/stlport/test/eh/gcc-linux.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/gcc-netbsd.mak b/lib/3rdparty/stlport/test/eh/gcc-netbsd.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/gcc-netbsd.mak rename to lib/3rdparty/stlport/test/eh/gcc-netbsd.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/gcc.mak b/lib/3rdparty/stlport/test/eh/gcc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/gcc.mak rename to lib/3rdparty/stlport/test/eh/gcc.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/gcc7.mak b/lib/3rdparty/stlport/test/eh/gcc7.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/gcc7.mak rename to lib/3rdparty/stlport/test/eh/gcc7.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/hp.mak b/lib/3rdparty/stlport/test/eh/hp.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/hp.mak rename to lib/3rdparty/stlport/test/eh/hp.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/hpacc.mak b/lib/3rdparty/stlport/test/eh/hpacc.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/hpacc.mak rename to lib/3rdparty/stlport/test/eh/hpacc.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/intel.mak b/lib/3rdparty/stlport/test/eh/intel.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/intel.mak rename to lib/3rdparty/stlport/test/eh/intel.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/intel45.mak b/lib/3rdparty/stlport/test/eh/intel45.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/intel45.mak rename to lib/3rdparty/stlport/test/eh/intel45.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/intel50.mak b/lib/3rdparty/stlport/test/eh/intel50.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/intel50.mak rename to lib/3rdparty/stlport/test/eh/intel50.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/kai.mak b/lib/3rdparty/stlport/test/eh/kai.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/kai.mak rename to lib/3rdparty/stlport/test/eh/kai.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/locale.cpp b/lib/3rdparty/stlport/test/eh/locale.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/locale.cpp rename to lib/3rdparty/stlport/test/eh/locale.cpp diff --git a/reactos/lib/3rdparty/stlport/test/eh/main.cpp b/lib/3rdparty/stlport/test/eh/main.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/main.cpp rename to lib/3rdparty/stlport/test/eh/main.cpp diff --git a/reactos/lib/3rdparty/stlport/test/eh/mingw32.mak b/lib/3rdparty/stlport/test/eh/mingw32.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/mingw32.mak rename to lib/3rdparty/stlport/test/eh/mingw32.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/mwerks_console_OS_X.c b/lib/3rdparty/stlport/test/eh/mwerks_console_OS_X.c similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/mwerks_console_OS_X.c rename to lib/3rdparty/stlport/test/eh/mwerks_console_OS_X.c diff --git a/reactos/lib/3rdparty/stlport/test/eh/mwerks_debug_prefix.h b/lib/3rdparty/stlport/test/eh/mwerks_debug_prefix.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/mwerks_debug_prefix.h rename to lib/3rdparty/stlport/test/eh/mwerks_debug_prefix.h diff --git a/reactos/lib/3rdparty/stlport/test/eh/mwerks_nosgi_debug_prefix.h b/lib/3rdparty/stlport/test/eh/mwerks_nosgi_debug_prefix.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/mwerks_nosgi_debug_prefix.h rename to lib/3rdparty/stlport/test/eh/mwerks_nosgi_debug_prefix.h diff --git a/reactos/lib/3rdparty/stlport/test/eh/mwerks_nosgi_prefix.h b/lib/3rdparty/stlport/test/eh/mwerks_nosgi_prefix.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/mwerks_nosgi_prefix.h rename to lib/3rdparty/stlport/test/eh/mwerks_nosgi_prefix.h diff --git a/reactos/lib/3rdparty/stlport/test/eh/mwerks_prefix.h b/lib/3rdparty/stlport/test/eh/mwerks_prefix.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/mwerks_prefix.h rename to lib/3rdparty/stlport/test/eh/mwerks_prefix.h diff --git a/reactos/lib/3rdparty/stlport/test/eh/nc_alloc.cpp b/lib/3rdparty/stlport/test/eh/nc_alloc.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/nc_alloc.cpp rename to lib/3rdparty/stlport/test/eh/nc_alloc.cpp diff --git a/reactos/lib/3rdparty/stlport/test/eh/nc_alloc.h b/lib/3rdparty/stlport/test/eh/nc_alloc.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/nc_alloc.h rename to lib/3rdparty/stlport/test/eh/nc_alloc.h diff --git a/reactos/lib/3rdparty/stlport/test/eh/random_number.cpp b/lib/3rdparty/stlport/test/eh/random_number.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/random_number.cpp rename to lib/3rdparty/stlport/test/eh/random_number.cpp diff --git a/reactos/lib/3rdparty/stlport/test/eh/random_number.h b/lib/3rdparty/stlport/test/eh/random_number.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/random_number.h rename to lib/3rdparty/stlport/test/eh/random_number.h diff --git a/reactos/lib/3rdparty/stlport/test/eh/sgi_mipspro.mak b/lib/3rdparty/stlport/test/eh/sgi_mipspro.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/sgi_mipspro.mak rename to lib/3rdparty/stlport/test/eh/sgi_mipspro.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/sunpro-64.mak b/lib/3rdparty/stlport/test/eh/sunpro-64.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/sunpro-64.mak rename to lib/3rdparty/stlport/test/eh/sunpro-64.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/sunpro.mak b/lib/3rdparty/stlport/test/eh/sunpro.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/sunpro.mak rename to lib/3rdparty/stlport/test/eh/sunpro.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/sunpro42.mak b/lib/3rdparty/stlport/test/eh/sunpro42.mak similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/sunpro42.mak rename to lib/3rdparty/stlport/test/eh/sunpro42.mak diff --git a/reactos/lib/3rdparty/stlport/test/eh/test.cpp b/lib/3rdparty/stlport/test/eh/test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/test.cpp rename to lib/3rdparty/stlport/test/eh/test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/eh/test_algo.cpp b/lib/3rdparty/stlport/test/eh/test_algo.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/test_algo.cpp rename to lib/3rdparty/stlport/test/eh/test_algo.cpp diff --git a/reactos/lib/3rdparty/stlport/test/eh/test_algobase.cpp b/lib/3rdparty/stlport/test/eh/test_algobase.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/test_algobase.cpp rename to lib/3rdparty/stlport/test/eh/test_algobase.cpp diff --git a/reactos/lib/3rdparty/stlport/test/eh/test_assign_op.h b/lib/3rdparty/stlport/test/eh/test_assign_op.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/test_assign_op.h rename to lib/3rdparty/stlport/test/eh/test_assign_op.h diff --git a/reactos/lib/3rdparty/stlport/test/eh/test_bit_vector.cpp b/lib/3rdparty/stlport/test/eh/test_bit_vector.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/test_bit_vector.cpp rename to lib/3rdparty/stlport/test/eh/test_bit_vector.cpp diff --git a/reactos/lib/3rdparty/stlport/test/eh/test_bitset.cpp b/lib/3rdparty/stlport/test/eh/test_bitset.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/test_bitset.cpp rename to lib/3rdparty/stlport/test/eh/test_bitset.cpp diff --git a/reactos/lib/3rdparty/stlport/test/eh/test_construct.h b/lib/3rdparty/stlport/test/eh/test_construct.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/test_construct.h rename to lib/3rdparty/stlport/test/eh/test_construct.h diff --git a/reactos/lib/3rdparty/stlport/test/eh/test_deque.cpp b/lib/3rdparty/stlport/test/eh/test_deque.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/test_deque.cpp rename to lib/3rdparty/stlport/test/eh/test_deque.cpp diff --git a/reactos/lib/3rdparty/stlport/test/eh/test_hash_map.cpp b/lib/3rdparty/stlport/test/eh/test_hash_map.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/test_hash_map.cpp rename to lib/3rdparty/stlport/test/eh/test_hash_map.cpp diff --git a/reactos/lib/3rdparty/stlport/test/eh/test_hash_resize.h b/lib/3rdparty/stlport/test/eh/test_hash_resize.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/test_hash_resize.h rename to lib/3rdparty/stlport/test/eh/test_hash_resize.h diff --git a/reactos/lib/3rdparty/stlport/test/eh/test_hash_set.cpp b/lib/3rdparty/stlport/test/eh/test_hash_set.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/test_hash_set.cpp rename to lib/3rdparty/stlport/test/eh/test_hash_set.cpp diff --git a/reactos/lib/3rdparty/stlport/test/eh/test_insert.h b/lib/3rdparty/stlport/test/eh/test_insert.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/test_insert.h rename to lib/3rdparty/stlport/test/eh/test_insert.h diff --git a/reactos/lib/3rdparty/stlport/test/eh/test_list.cpp b/lib/3rdparty/stlport/test/eh/test_list.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/test_list.cpp rename to lib/3rdparty/stlport/test/eh/test_list.cpp diff --git a/reactos/lib/3rdparty/stlport/test/eh/test_map.cpp b/lib/3rdparty/stlport/test/eh/test_map.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/test_map.cpp rename to lib/3rdparty/stlport/test/eh/test_map.cpp diff --git a/reactos/lib/3rdparty/stlport/test/eh/test_push_back.h b/lib/3rdparty/stlport/test/eh/test_push_back.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/test_push_back.h rename to lib/3rdparty/stlport/test/eh/test_push_back.h diff --git a/reactos/lib/3rdparty/stlport/test/eh/test_push_front.h b/lib/3rdparty/stlport/test/eh/test_push_front.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/test_push_front.h rename to lib/3rdparty/stlport/test/eh/test_push_front.h diff --git a/reactos/lib/3rdparty/stlport/test/eh/test_rope.cpp b/lib/3rdparty/stlport/test/eh/test_rope.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/test_rope.cpp rename to lib/3rdparty/stlport/test/eh/test_rope.cpp diff --git a/reactos/lib/3rdparty/stlport/test/eh/test_set.cpp b/lib/3rdparty/stlport/test/eh/test_set.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/test_set.cpp rename to lib/3rdparty/stlport/test/eh/test_set.cpp diff --git a/reactos/lib/3rdparty/stlport/test/eh/test_slist.cpp b/lib/3rdparty/stlport/test/eh/test_slist.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/test_slist.cpp rename to lib/3rdparty/stlport/test/eh/test_slist.cpp diff --git a/reactos/lib/3rdparty/stlport/test/eh/test_string.cpp b/lib/3rdparty/stlport/test/eh/test_string.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/test_string.cpp rename to lib/3rdparty/stlport/test/eh/test_string.cpp diff --git a/reactos/lib/3rdparty/stlport/test/eh/test_valarray.cpp b/lib/3rdparty/stlport/test/eh/test_valarray.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/test_valarray.cpp rename to lib/3rdparty/stlport/test/eh/test_valarray.cpp diff --git a/reactos/lib/3rdparty/stlport/test/eh/test_vector.cpp b/lib/3rdparty/stlport/test/eh/test_vector.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/eh/test_vector.cpp rename to lib/3rdparty/stlport/test/eh/test_vector.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/_template.cpp b/lib/3rdparty/stlport/test/unit/_template.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/_template.cpp rename to lib/3rdparty/stlport/test/unit/_template.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/accum_test.cpp b/lib/3rdparty/stlport/test/unit/accum_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/accum_test.cpp rename to lib/3rdparty/stlport/test/unit/accum_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/adj_test.cpp b/lib/3rdparty/stlport/test/unit/adj_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/adj_test.cpp rename to lib/3rdparty/stlport/test/unit/adj_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/advance_test.cpp b/lib/3rdparty/stlport/test/unit/advance_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/advance_test.cpp rename to lib/3rdparty/stlport/test/unit/advance_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/alg_test.cpp b/lib/3rdparty/stlport/test/unit/alg_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/alg_test.cpp rename to lib/3rdparty/stlport/test/unit/alg_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/algorithm_header_test.cpp b/lib/3rdparty/stlport/test/unit/algorithm_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/algorithm_header_test.cpp rename to lib/3rdparty/stlport/test/unit/algorithm_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/allocator_test.cpp b/lib/3rdparty/stlport/test/unit/allocator_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/allocator_test.cpp rename to lib/3rdparty/stlport/test/unit/allocator_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/assert_header_test.c b/lib/3rdparty/stlport/test/unit/assert_header_test.c similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/assert_header_test.c rename to lib/3rdparty/stlport/test/unit/assert_header_test.c diff --git a/reactos/lib/3rdparty/stlport/test/unit/bcompos_test.cpp b/lib/3rdparty/stlport/test/unit/bcompos_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/bcompos_test.cpp rename to lib/3rdparty/stlport/test/unit/bcompos_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/bind_test.cpp b/lib/3rdparty/stlport/test/unit/bind_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/bind_test.cpp rename to lib/3rdparty/stlport/test/unit/bind_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/binsert_test.cpp b/lib/3rdparty/stlport/test/unit/binsert_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/binsert_test.cpp rename to lib/3rdparty/stlport/test/unit/binsert_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/bitset_header_test.cpp b/lib/3rdparty/stlport/test/unit/bitset_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/bitset_header_test.cpp rename to lib/3rdparty/stlport/test/unit/bitset_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/bitset_test.cpp b/lib/3rdparty/stlport/test/unit/bitset_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/bitset_test.cpp rename to lib/3rdparty/stlport/test/unit/bitset_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/bnegate_test.cpp b/lib/3rdparty/stlport/test/unit/bnegate_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/bnegate_test.cpp rename to lib/3rdparty/stlport/test/unit/bnegate_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/boost_check.cpp b/lib/3rdparty/stlport/test/unit/boost_check.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/boost_check.cpp rename to lib/3rdparty/stlport/test/unit/boost_check.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/bound_test.cpp b/lib/3rdparty/stlport/test/unit/bound_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/bound_test.cpp rename to lib/3rdparty/stlport/test/unit/bound_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/bsearch_test.cpp b/lib/3rdparty/stlport/test/unit/bsearch_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/bsearch_test.cpp rename to lib/3rdparty/stlport/test/unit/bsearch_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/bvector_test.cpp b/lib/3rdparty/stlport/test/unit/bvector_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/bvector_test.cpp rename to lib/3rdparty/stlport/test/unit/bvector_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/c_limits_header_test.c b/lib/3rdparty/stlport/test/unit/c_limits_header_test.c similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/c_limits_header_test.c rename to lib/3rdparty/stlport/test/unit/c_limits_header_test.c diff --git a/reactos/lib/3rdparty/stlport/test/unit/c_locale_header_test.c b/lib/3rdparty/stlport/test/unit/c_locale_header_test.c similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/c_locale_header_test.c rename to lib/3rdparty/stlport/test/unit/c_locale_header_test.c diff --git a/reactos/lib/3rdparty/stlport/test/unit/cassert_header_test.cpp b/lib/3rdparty/stlport/test/unit/cassert_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/cassert_header_test.cpp rename to lib/3rdparty/stlport/test/unit/cassert_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/cctype_header_test.cpp b/lib/3rdparty/stlport/test/unit/cctype_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/cctype_header_test.cpp rename to lib/3rdparty/stlport/test/unit/cctype_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/cerrno_header_test.cpp b/lib/3rdparty/stlport/test/unit/cerrno_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/cerrno_header_test.cpp rename to lib/3rdparty/stlport/test/unit/cerrno_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/cfloat_header_test.cpp b/lib/3rdparty/stlport/test/unit/cfloat_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/cfloat_header_test.cpp rename to lib/3rdparty/stlport/test/unit/cfloat_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/ciso646_header_test.cpp b/lib/3rdparty/stlport/test/unit/ciso646_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/ciso646_header_test.cpp rename to lib/3rdparty/stlport/test/unit/ciso646_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/climits_header_test.cpp b/lib/3rdparty/stlport/test/unit/climits_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/climits_header_test.cpp rename to lib/3rdparty/stlport/test/unit/climits_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/clocale_header_test.cpp b/lib/3rdparty/stlport/test/unit/clocale_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/clocale_header_test.cpp rename to lib/3rdparty/stlport/test/unit/clocale_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/cmath_header_test.cpp b/lib/3rdparty/stlport/test/unit/cmath_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/cmath_header_test.cpp rename to lib/3rdparty/stlport/test/unit/cmath_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/cmath_test.cpp b/lib/3rdparty/stlport/test/unit/cmath_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/cmath_test.cpp rename to lib/3rdparty/stlport/test/unit/cmath_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/codecvt_test.cpp b/lib/3rdparty/stlport/test/unit/codecvt_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/codecvt_test.cpp rename to lib/3rdparty/stlport/test/unit/codecvt_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/collate_facets_test.cpp b/lib/3rdparty/stlport/test/unit/collate_facets_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/collate_facets_test.cpp rename to lib/3rdparty/stlport/test/unit/collate_facets_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/complete_digits.h b/lib/3rdparty/stlport/test/unit/complete_digits.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/complete_digits.h rename to lib/3rdparty/stlport/test/unit/complete_digits.h diff --git a/reactos/lib/3rdparty/stlport/test/unit/complex_header_test.cpp b/lib/3rdparty/stlport/test/unit/complex_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/complex_header_test.cpp rename to lib/3rdparty/stlport/test/unit/complex_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/config_test.cpp b/lib/3rdparty/stlport/test/unit/config_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/config_test.cpp rename to lib/3rdparty/stlport/test/unit/config_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/copy_test.cpp b/lib/3rdparty/stlport/test/unit/copy_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/copy_test.cpp rename to lib/3rdparty/stlport/test/unit/copy_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/count_test.cpp b/lib/3rdparty/stlport/test/unit/count_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/count_test.cpp rename to lib/3rdparty/stlport/test/unit/count_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/cppunit/cppunit_mini.h b/lib/3rdparty/stlport/test/unit/cppunit/cppunit_mini.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/cppunit/cppunit_mini.h rename to lib/3rdparty/stlport/test/unit/cppunit/cppunit_mini.h diff --git a/reactos/lib/3rdparty/stlport/test/unit/cppunit/cppunit_proxy.h b/lib/3rdparty/stlport/test/unit/cppunit/cppunit_proxy.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/cppunit/cppunit_proxy.h rename to lib/3rdparty/stlport/test/unit/cppunit/cppunit_proxy.h diff --git a/reactos/lib/3rdparty/stlport/test/unit/cppunit/cppunit_timer.h b/lib/3rdparty/stlport/test/unit/cppunit/cppunit_timer.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/cppunit/cppunit_timer.h rename to lib/3rdparty/stlport/test/unit/cppunit/cppunit_timer.h diff --git a/reactos/lib/3rdparty/stlport/test/unit/cppunit/file_reporter.h b/lib/3rdparty/stlport/test/unit/cppunit/file_reporter.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/cppunit/file_reporter.h rename to lib/3rdparty/stlport/test/unit/cppunit/file_reporter.h diff --git a/reactos/lib/3rdparty/stlport/test/unit/cppunit/test_main.cpp b/lib/3rdparty/stlport/test/unit/cppunit/test_main.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/cppunit/test_main.cpp rename to lib/3rdparty/stlport/test/unit/cppunit/test_main.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/csetjmp_header_test.cpp b/lib/3rdparty/stlport/test/unit/csetjmp_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/csetjmp_header_test.cpp rename to lib/3rdparty/stlport/test/unit/csetjmp_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/csignal_header_test.cpp b/lib/3rdparty/stlport/test/unit/csignal_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/csignal_header_test.cpp rename to lib/3rdparty/stlport/test/unit/csignal_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/cstdarg_header_test.cpp b/lib/3rdparty/stlport/test/unit/cstdarg_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/cstdarg_header_test.cpp rename to lib/3rdparty/stlport/test/unit/cstdarg_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/cstddef_header_test.cpp b/lib/3rdparty/stlport/test/unit/cstddef_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/cstddef_header_test.cpp rename to lib/3rdparty/stlport/test/unit/cstddef_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/cstdio_header_test.cpp b/lib/3rdparty/stlport/test/unit/cstdio_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/cstdio_header_test.cpp rename to lib/3rdparty/stlport/test/unit/cstdio_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/cstdlib_header_test.cpp b/lib/3rdparty/stlport/test/unit/cstdlib_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/cstdlib_header_test.cpp rename to lib/3rdparty/stlport/test/unit/cstdlib_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/cstring_header_test.cpp b/lib/3rdparty/stlport/test/unit/cstring_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/cstring_header_test.cpp rename to lib/3rdparty/stlport/test/unit/cstring_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/cstring_test.cpp b/lib/3rdparty/stlport/test/unit/cstring_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/cstring_test.cpp rename to lib/3rdparty/stlport/test/unit/cstring_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/ctime_header_test.cpp b/lib/3rdparty/stlport/test/unit/ctime_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/ctime_header_test.cpp rename to lib/3rdparty/stlport/test/unit/ctime_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/ctype_facets_test.cpp b/lib/3rdparty/stlport/test/unit/ctype_facets_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/ctype_facets_test.cpp rename to lib/3rdparty/stlport/test/unit/ctype_facets_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/ctype_header_test.c b/lib/3rdparty/stlport/test/unit/ctype_header_test.c similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/ctype_header_test.c rename to lib/3rdparty/stlport/test/unit/ctype_header_test.c diff --git a/reactos/lib/3rdparty/stlport/test/unit/cwchar_header_test.cpp b/lib/3rdparty/stlport/test/unit/cwchar_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/cwchar_header_test.cpp rename to lib/3rdparty/stlport/test/unit/cwchar_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/cwctype_header_test.cpp b/lib/3rdparty/stlport/test/unit/cwctype_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/cwctype_header_test.cpp rename to lib/3rdparty/stlport/test/unit/cwctype_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/deque_header_test.cpp b/lib/3rdparty/stlport/test/unit/deque_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/deque_header_test.cpp rename to lib/3rdparty/stlport/test/unit/deque_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/deque_test.cpp b/lib/3rdparty/stlport/test/unit/deque_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/deque_test.cpp rename to lib/3rdparty/stlport/test/unit/deque_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/divides_test.cpp b/lib/3rdparty/stlport/test/unit/divides_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/divides_test.cpp rename to lib/3rdparty/stlport/test/unit/divides_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/epilog_test.cpp b/lib/3rdparty/stlport/test/unit/epilog_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/epilog_test.cpp rename to lib/3rdparty/stlport/test/unit/epilog_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/equal_test.cpp b/lib/3rdparty/stlport/test/unit/equal_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/equal_test.cpp rename to lib/3rdparty/stlport/test/unit/equal_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/errno_header_test.c b/lib/3rdparty/stlport/test/unit/errno_header_test.c similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/errno_header_test.c rename to lib/3rdparty/stlport/test/unit/errno_header_test.c diff --git a/reactos/lib/3rdparty/stlport/test/unit/exception_header_test.cpp b/lib/3rdparty/stlport/test/unit/exception_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/exception_header_test.cpp rename to lib/3rdparty/stlport/test/unit/exception_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/exception_test.cpp b/lib/3rdparty/stlport/test/unit/exception_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/exception_test.cpp rename to lib/3rdparty/stlport/test/unit/exception_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/fadapter.h b/lib/3rdparty/stlport/test/unit/fadapter.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/fadapter.h rename to lib/3rdparty/stlport/test/unit/fadapter.h diff --git a/reactos/lib/3rdparty/stlport/test/unit/fib.h b/lib/3rdparty/stlport/test/unit/fib.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/fib.h rename to lib/3rdparty/stlport/test/unit/fib.h diff --git a/reactos/lib/3rdparty/stlport/test/unit/fill_test.cpp b/lib/3rdparty/stlport/test/unit/fill_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/fill_test.cpp rename to lib/3rdparty/stlport/test/unit/fill_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/find_test.cpp b/lib/3rdparty/stlport/test/unit/find_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/find_test.cpp rename to lib/3rdparty/stlport/test/unit/find_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/finsert_test.cpp b/lib/3rdparty/stlport/test/unit/finsert_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/finsert_test.cpp rename to lib/3rdparty/stlport/test/unit/finsert_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/float_header_test.c b/lib/3rdparty/stlport/test/unit/float_header_test.c similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/float_header_test.c rename to lib/3rdparty/stlport/test/unit/float_header_test.c diff --git a/reactos/lib/3rdparty/stlport/test/unit/foreach_test.cpp b/lib/3rdparty/stlport/test/unit/foreach_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/foreach_test.cpp rename to lib/3rdparty/stlport/test/unit/foreach_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/fstream_header_test.cpp b/lib/3rdparty/stlport/test/unit/fstream_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/fstream_header_test.cpp rename to lib/3rdparty/stlport/test/unit/fstream_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/fstream_test.cpp b/lib/3rdparty/stlport/test/unit/fstream_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/fstream_test.cpp rename to lib/3rdparty/stlport/test/unit/fstream_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/full_streambuf.h b/lib/3rdparty/stlport/test/unit/full_streambuf.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/full_streambuf.h rename to lib/3rdparty/stlport/test/unit/full_streambuf.h diff --git a/reactos/lib/3rdparty/stlport/test/unit/func_test.cpp b/lib/3rdparty/stlport/test/unit/func_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/func_test.cpp rename to lib/3rdparty/stlport/test/unit/func_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/functional_header_test.cpp b/lib/3rdparty/stlport/test/unit/functional_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/functional_header_test.cpp rename to lib/3rdparty/stlport/test/unit/functional_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/generator_test.cpp b/lib/3rdparty/stlport/test/unit/generator_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/generator_test.cpp rename to lib/3rdparty/stlport/test/unit/generator_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/greater_test.cpp b/lib/3rdparty/stlport/test/unit/greater_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/greater_test.cpp rename to lib/3rdparty/stlport/test/unit/greater_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/hash_test.cpp b/lib/3rdparty/stlport/test/unit/hash_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/hash_test.cpp rename to lib/3rdparty/stlport/test/unit/hash_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/heap_test.cpp b/lib/3rdparty/stlport/test/unit/heap_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/heap_test.cpp rename to lib/3rdparty/stlport/test/unit/heap_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/includes_test.cpp b/lib/3rdparty/stlport/test/unit/includes_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/includes_test.cpp rename to lib/3rdparty/stlport/test/unit/includes_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/innerprod_test.cpp b/lib/3rdparty/stlport/test/unit/innerprod_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/innerprod_test.cpp rename to lib/3rdparty/stlport/test/unit/innerprod_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/inplace_test.cpp b/lib/3rdparty/stlport/test/unit/inplace_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/inplace_test.cpp rename to lib/3rdparty/stlport/test/unit/inplace_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/insert_test.cpp b/lib/3rdparty/stlport/test/unit/insert_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/insert_test.cpp rename to lib/3rdparty/stlport/test/unit/insert_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/ioiter_test.cpp b/lib/3rdparty/stlport/test/unit/ioiter_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/ioiter_test.cpp rename to lib/3rdparty/stlport/test/unit/ioiter_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/iomanip_header_test.cpp b/lib/3rdparty/stlport/test/unit/iomanip_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/iomanip_header_test.cpp rename to lib/3rdparty/stlport/test/unit/iomanip_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/ios_header_test.cpp b/lib/3rdparty/stlport/test/unit/ios_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/ios_header_test.cpp rename to lib/3rdparty/stlport/test/unit/ios_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/iosfwd_header_test.cpp b/lib/3rdparty/stlport/test/unit/iosfwd_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/iosfwd_header_test.cpp rename to lib/3rdparty/stlport/test/unit/iosfwd_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/iostream_header_test.cpp b/lib/3rdparty/stlport/test/unit/iostream_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/iostream_header_test.cpp rename to lib/3rdparty/stlport/test/unit/iostream_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/iostream_test.cpp b/lib/3rdparty/stlport/test/unit/iostream_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/iostream_test.cpp rename to lib/3rdparty/stlport/test/unit/iostream_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/iota.h b/lib/3rdparty/stlport/test/unit/iota.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/iota.h rename to lib/3rdparty/stlport/test/unit/iota.h diff --git a/reactos/lib/3rdparty/stlport/test/unit/iota_test.cpp b/lib/3rdparty/stlport/test/unit/iota_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/iota_test.cpp rename to lib/3rdparty/stlport/test/unit/iota_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/iso646_header_test.c b/lib/3rdparty/stlport/test/unit/iso646_header_test.c similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/iso646_header_test.c rename to lib/3rdparty/stlport/test/unit/iso646_header_test.c diff --git a/reactos/lib/3rdparty/stlport/test/unit/istmit_test.cpp b/lib/3rdparty/stlport/test/unit/istmit_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/istmit_test.cpp rename to lib/3rdparty/stlport/test/unit/istmit_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/istream_header_test.cpp b/lib/3rdparty/stlport/test/unit/istream_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/istream_header_test.cpp rename to lib/3rdparty/stlport/test/unit/istream_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/iter_test.cpp b/lib/3rdparty/stlport/test/unit/iter_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/iter_test.cpp rename to lib/3rdparty/stlport/test/unit/iter_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/iterator_header_test.cpp b/lib/3rdparty/stlport/test/unit/iterator_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/iterator_header_test.cpp rename to lib/3rdparty/stlport/test/unit/iterator_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/less_test.cpp b/lib/3rdparty/stlport/test/unit/less_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/less_test.cpp rename to lib/3rdparty/stlport/test/unit/less_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/lexcmp_test.cpp b/lib/3rdparty/stlport/test/unit/lexcmp_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/lexcmp_test.cpp rename to lib/3rdparty/stlport/test/unit/lexcmp_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/limits_header_test.cpp b/lib/3rdparty/stlport/test/unit/limits_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/limits_header_test.cpp rename to lib/3rdparty/stlport/test/unit/limits_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/limits_test.cpp b/lib/3rdparty/stlport/test/unit/limits_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/limits_test.cpp rename to lib/3rdparty/stlport/test/unit/limits_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/list_header_test.cpp b/lib/3rdparty/stlport/test/unit/list_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/list_header_test.cpp rename to lib/3rdparty/stlport/test/unit/list_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/list_test.cpp b/lib/3rdparty/stlport/test/unit/list_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/list_test.cpp rename to lib/3rdparty/stlport/test/unit/list_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/locale_header_test.cpp b/lib/3rdparty/stlport/test/unit/locale_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/locale_header_test.cpp rename to lib/3rdparty/stlport/test/unit/locale_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/locale_test.cpp b/lib/3rdparty/stlport/test/unit/locale_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/locale_test.cpp rename to lib/3rdparty/stlport/test/unit/locale_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/locale_test.h b/lib/3rdparty/stlport/test/unit/locale_test.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/locale_test.h rename to lib/3rdparty/stlport/test/unit/locale_test.h diff --git a/reactos/lib/3rdparty/stlport/test/unit/logic_test.cpp b/lib/3rdparty/stlport/test/unit/logic_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/logic_test.cpp rename to lib/3rdparty/stlport/test/unit/logic_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/macro_checks.cpp b/lib/3rdparty/stlport/test/unit/macro_checks.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/macro_checks.cpp rename to lib/3rdparty/stlport/test/unit/macro_checks.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/map_header_test.cpp b/lib/3rdparty/stlport/test/unit/map_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/map_header_test.cpp rename to lib/3rdparty/stlport/test/unit/map_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/map_test.cpp b/lib/3rdparty/stlport/test/unit/map_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/map_test.cpp rename to lib/3rdparty/stlport/test/unit/map_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/math_aux.h b/lib/3rdparty/stlport/test/unit/math_aux.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/math_aux.h rename to lib/3rdparty/stlport/test/unit/math_aux.h diff --git a/reactos/lib/3rdparty/stlport/test/unit/math_header_test.c b/lib/3rdparty/stlport/test/unit/math_header_test.c similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/math_header_test.c rename to lib/3rdparty/stlport/test/unit/math_header_test.c diff --git a/reactos/lib/3rdparty/stlport/test/unit/max_test.cpp b/lib/3rdparty/stlport/test/unit/max_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/max_test.cpp rename to lib/3rdparty/stlport/test/unit/max_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/memory_header_test.cpp b/lib/3rdparty/stlport/test/unit/memory_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/memory_header_test.cpp rename to lib/3rdparty/stlport/test/unit/memory_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/memory_test.cpp b/lib/3rdparty/stlport/test/unit/memory_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/memory_test.cpp rename to lib/3rdparty/stlport/test/unit/memory_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/merge_test.cpp b/lib/3rdparty/stlport/test/unit/merge_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/merge_test.cpp rename to lib/3rdparty/stlport/test/unit/merge_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/messages_facets_test.cpp b/lib/3rdparty/stlport/test/unit/messages_facets_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/messages_facets_test.cpp rename to lib/3rdparty/stlport/test/unit/messages_facets_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/mfunptr_test.cpp b/lib/3rdparty/stlport/test/unit/mfunptr_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/mfunptr_test.cpp rename to lib/3rdparty/stlport/test/unit/mfunptr_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/min_test.cpp b/lib/3rdparty/stlport/test/unit/min_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/min_test.cpp rename to lib/3rdparty/stlport/test/unit/min_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/mismatch_test.cpp b/lib/3rdparty/stlport/test/unit/mismatch_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/mismatch_test.cpp rename to lib/3rdparty/stlport/test/unit/mismatch_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/modulus_test.cpp b/lib/3rdparty/stlport/test/unit/modulus_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/modulus_test.cpp rename to lib/3rdparty/stlport/test/unit/modulus_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/money_facets_test.cpp b/lib/3rdparty/stlport/test/unit/money_facets_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/money_facets_test.cpp rename to lib/3rdparty/stlport/test/unit/money_facets_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/multiset_test.cpp b/lib/3rdparty/stlport/test/unit/multiset_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/multiset_test.cpp rename to lib/3rdparty/stlport/test/unit/multiset_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/mvctor_declaration_test.cpp b/lib/3rdparty/stlport/test/unit/mvctor_declaration_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/mvctor_declaration_test.cpp rename to lib/3rdparty/stlport/test/unit/mvctor_declaration_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/mvctor_test.cpp b/lib/3rdparty/stlport/test/unit/mvctor_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/mvctor_test.cpp rename to lib/3rdparty/stlport/test/unit/mvctor_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/mvctor_test.h b/lib/3rdparty/stlport/test/unit/mvctor_test.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/mvctor_test.h rename to lib/3rdparty/stlport/test/unit/mvctor_test.h diff --git a/reactos/lib/3rdparty/stlport/test/unit/mvctor_traits_test.cpp b/lib/3rdparty/stlport/test/unit/mvctor_traits_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/mvctor_traits_test.cpp rename to lib/3rdparty/stlport/test/unit/mvctor_traits_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/neq_test.cpp b/lib/3rdparty/stlport/test/unit/neq_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/neq_test.cpp rename to lib/3rdparty/stlport/test/unit/neq_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/new_header_test.cpp b/lib/3rdparty/stlport/test/unit/new_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/new_header_test.cpp rename to lib/3rdparty/stlport/test/unit/new_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/nthelm_test.cpp b/lib/3rdparty/stlport/test/unit/nthelm_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/nthelm_test.cpp rename to lib/3rdparty/stlport/test/unit/nthelm_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/num_facets_test.cpp b/lib/3rdparty/stlport/test/unit/num_facets_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/num_facets_test.cpp rename to lib/3rdparty/stlport/test/unit/num_facets_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/num_put_get_test.cpp b/lib/3rdparty/stlport/test/unit/num_put_get_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/num_put_get_test.cpp rename to lib/3rdparty/stlport/test/unit/num_put_get_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/numeric_header_test.cpp b/lib/3rdparty/stlport/test/unit/numeric_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/numeric_header_test.cpp rename to lib/3rdparty/stlport/test/unit/numeric_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/ostmit_test.cpp b/lib/3rdparty/stlport/test/unit/ostmit_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/ostmit_test.cpp rename to lib/3rdparty/stlport/test/unit/ostmit_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/ostream_header_test.cpp b/lib/3rdparty/stlport/test/unit/ostream_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/ostream_header_test.cpp rename to lib/3rdparty/stlport/test/unit/ostream_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/pair_test.cpp b/lib/3rdparty/stlport/test/unit/pair_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/pair_test.cpp rename to lib/3rdparty/stlport/test/unit/pair_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/partial_test.cpp b/lib/3rdparty/stlport/test/unit/partial_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/partial_test.cpp rename to lib/3rdparty/stlport/test/unit/partial_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/partition_test.cpp b/lib/3rdparty/stlport/test/unit/partition_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/partition_test.cpp rename to lib/3rdparty/stlport/test/unit/partition_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/perm_test.cpp b/lib/3rdparty/stlport/test/unit/perm_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/perm_test.cpp rename to lib/3rdparty/stlport/test/unit/perm_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/plusminus_test.cpp b/lib/3rdparty/stlport/test/unit/plusminus_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/plusminus_test.cpp rename to lib/3rdparty/stlport/test/unit/plusminus_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/ptr2_test.cpp b/lib/3rdparty/stlport/test/unit/ptr2_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/ptr2_test.cpp rename to lib/3rdparty/stlport/test/unit/ptr2_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/ptrspec_test.cpp b/lib/3rdparty/stlport/test/unit/ptrspec_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/ptrspec_test.cpp rename to lib/3rdparty/stlport/test/unit/ptrspec_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/queue_header_test.cpp b/lib/3rdparty/stlport/test/unit/queue_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/queue_header_test.cpp rename to lib/3rdparty/stlport/test/unit/queue_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/queue_test.cpp b/lib/3rdparty/stlport/test/unit/queue_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/queue_test.cpp rename to lib/3rdparty/stlport/test/unit/queue_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/rawriter_test.cpp b/lib/3rdparty/stlport/test/unit/rawriter_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/rawriter_test.cpp rename to lib/3rdparty/stlport/test/unit/rawriter_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/reference_wrapper_test.cpp b/lib/3rdparty/stlport/test/unit/reference_wrapper_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/reference_wrapper_test.cpp rename to lib/3rdparty/stlport/test/unit/reference_wrapper_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/resolve_name.cpp b/lib/3rdparty/stlport/test/unit/resolve_name.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/resolve_name.cpp rename to lib/3rdparty/stlport/test/unit/resolve_name.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/reviter_test.cpp b/lib/3rdparty/stlport/test/unit/reviter_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/reviter_test.cpp rename to lib/3rdparty/stlport/test/unit/reviter_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/rm_cp_test.cpp b/lib/3rdparty/stlport/test/unit/rm_cp_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/rm_cp_test.cpp rename to lib/3rdparty/stlport/test/unit/rm_cp_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/rndshf_test.cpp b/lib/3rdparty/stlport/test/unit/rndshf_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/rndshf_test.cpp rename to lib/3rdparty/stlport/test/unit/rndshf_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/rope_test.cpp b/lib/3rdparty/stlport/test/unit/rope_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/rope_test.cpp rename to lib/3rdparty/stlport/test/unit/rope_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/rotate_test.cpp b/lib/3rdparty/stlport/test/unit/rotate_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/rotate_test.cpp rename to lib/3rdparty/stlport/test/unit/rotate_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/search_test.cpp b/lib/3rdparty/stlport/test/unit/search_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/search_test.cpp rename to lib/3rdparty/stlport/test/unit/search_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/set_header_test.cpp b/lib/3rdparty/stlport/test/unit/set_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/set_header_test.cpp rename to lib/3rdparty/stlport/test/unit/set_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/set_test.cpp b/lib/3rdparty/stlport/test/unit/set_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/set_test.cpp rename to lib/3rdparty/stlport/test/unit/set_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/setdiff_test.cpp b/lib/3rdparty/stlport/test/unit/setdiff_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/setdiff_test.cpp rename to lib/3rdparty/stlport/test/unit/setdiff_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/setinter_test.cpp b/lib/3rdparty/stlport/test/unit/setinter_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/setinter_test.cpp rename to lib/3rdparty/stlport/test/unit/setinter_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/setjmp_header_test.c b/lib/3rdparty/stlport/test/unit/setjmp_header_test.c similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/setjmp_header_test.c rename to lib/3rdparty/stlport/test/unit/setjmp_header_test.c diff --git a/reactos/lib/3rdparty/stlport/test/unit/setjmp_header_test2.cpp b/lib/3rdparty/stlport/test/unit/setjmp_header_test2.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/setjmp_header_test2.cpp rename to lib/3rdparty/stlport/test/unit/setjmp_header_test2.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/setunion_test.cpp b/lib/3rdparty/stlport/test/unit/setunion_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/setunion_test.cpp rename to lib/3rdparty/stlport/test/unit/setunion_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/shared_ptr_test.cpp b/lib/3rdparty/stlport/test/unit/shared_ptr_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/shared_ptr_test.cpp rename to lib/3rdparty/stlport/test/unit/shared_ptr_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/signal_header_test.c b/lib/3rdparty/stlport/test/unit/signal_header_test.c similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/signal_header_test.c rename to lib/3rdparty/stlport/test/unit/signal_header_test.c diff --git a/reactos/lib/3rdparty/stlport/test/unit/slist_test.cpp b/lib/3rdparty/stlport/test/unit/slist_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/slist_test.cpp rename to lib/3rdparty/stlport/test/unit/slist_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/sort_test.cpp b/lib/3rdparty/stlport/test/unit/sort_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/sort_test.cpp rename to lib/3rdparty/stlport/test/unit/sort_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/sstream_header_test.cpp b/lib/3rdparty/stlport/test/unit/sstream_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/sstream_header_test.cpp rename to lib/3rdparty/stlport/test/unit/sstream_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/sstream_test.cpp b/lib/3rdparty/stlport/test/unit/sstream_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/sstream_test.cpp rename to lib/3rdparty/stlport/test/unit/sstream_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/stack_allocator.h b/lib/3rdparty/stlport/test/unit/stack_allocator.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/stack_allocator.h rename to lib/3rdparty/stlport/test/unit/stack_allocator.h diff --git a/reactos/lib/3rdparty/stlport/test/unit/stack_header_test.cpp b/lib/3rdparty/stlport/test/unit/stack_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/stack_header_test.cpp rename to lib/3rdparty/stlport/test/unit/stack_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/stack_test.cpp b/lib/3rdparty/stlport/test/unit/stack_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/stack_test.cpp rename to lib/3rdparty/stlport/test/unit/stack_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/stdarg_header_test.c b/lib/3rdparty/stlport/test/unit/stdarg_header_test.c similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/stdarg_header_test.c rename to lib/3rdparty/stlport/test/unit/stdarg_header_test.c diff --git a/reactos/lib/3rdparty/stlport/test/unit/stddef_header_test.c b/lib/3rdparty/stlport/test/unit/stddef_header_test.c similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/stddef_header_test.c rename to lib/3rdparty/stlport/test/unit/stddef_header_test.c diff --git a/reactos/lib/3rdparty/stlport/test/unit/stdexcept_header_test.cpp b/lib/3rdparty/stlport/test/unit/stdexcept_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/stdexcept_header_test.cpp rename to lib/3rdparty/stlport/test/unit/stdexcept_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/stdio_header_test.c b/lib/3rdparty/stlport/test/unit/stdio_header_test.c similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/stdio_header_test.c rename to lib/3rdparty/stlport/test/unit/stdio_header_test.c diff --git a/reactos/lib/3rdparty/stlport/test/unit/stdlib_header_test.c b/lib/3rdparty/stlport/test/unit/stdlib_header_test.c similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/stdlib_header_test.c rename to lib/3rdparty/stlport/test/unit/stdlib_header_test.c diff --git a/reactos/lib/3rdparty/stlport/test/unit/stldbg_include.cpp b/lib/3rdparty/stlport/test/unit/stldbg_include.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/stldbg_include.cpp rename to lib/3rdparty/stlport/test/unit/stldbg_include.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/streambuf_header_test.cpp b/lib/3rdparty/stlport/test/unit/streambuf_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/streambuf_header_test.cpp rename to lib/3rdparty/stlport/test/unit/streambuf_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/string_header_test.c b/lib/3rdparty/stlport/test/unit/string_header_test.c similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/string_header_test.c rename to lib/3rdparty/stlport/test/unit/string_header_test.c diff --git a/reactos/lib/3rdparty/stlport/test/unit/string_header_test.cpp b/lib/3rdparty/stlport/test/unit/string_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/string_header_test.cpp rename to lib/3rdparty/stlport/test/unit/string_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/string_test.cpp b/lib/3rdparty/stlport/test/unit/string_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/string_test.cpp rename to lib/3rdparty/stlport/test/unit/string_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/strstream_buffer_read_test.cpp b/lib/3rdparty/stlport/test/unit/strstream_buffer_read_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/strstream_buffer_read_test.cpp rename to lib/3rdparty/stlport/test/unit/strstream_buffer_read_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/strstream_header_test.cpp b/lib/3rdparty/stlport/test/unit/strstream_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/strstream_header_test.cpp rename to lib/3rdparty/stlport/test/unit/strstream_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/strstream_test.cpp b/lib/3rdparty/stlport/test/unit/strstream_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/strstream_test.cpp rename to lib/3rdparty/stlport/test/unit/strstream_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/swap_test.cpp b/lib/3rdparty/stlport/test/unit/swap_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/swap_test.cpp rename to lib/3rdparty/stlport/test/unit/swap_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/test_errno.cpp b/lib/3rdparty/stlport/test/unit/test_errno.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/test_errno.cpp rename to lib/3rdparty/stlport/test/unit/test_errno.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/time_facets_test.cpp b/lib/3rdparty/stlport/test/unit/time_facets_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/time_facets_test.cpp rename to lib/3rdparty/stlport/test/unit/time_facets_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/time_header_test.c b/lib/3rdparty/stlport/test/unit/time_header_test.c similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/time_header_test.c rename to lib/3rdparty/stlport/test/unit/time_header_test.c diff --git a/reactos/lib/3rdparty/stlport/test/unit/times_test.cpp b/lib/3rdparty/stlport/test/unit/times_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/times_test.cpp rename to lib/3rdparty/stlport/test/unit/times_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/transform_test.cpp b/lib/3rdparty/stlport/test/unit/transform_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/transform_test.cpp rename to lib/3rdparty/stlport/test/unit/transform_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/type_traits_test.cpp b/lib/3rdparty/stlport/test/unit/type_traits_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/type_traits_test.cpp rename to lib/3rdparty/stlport/test/unit/type_traits_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/typeinfo_header_test.cpp b/lib/3rdparty/stlport/test/unit/typeinfo_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/typeinfo_header_test.cpp rename to lib/3rdparty/stlport/test/unit/typeinfo_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/unary.h b/lib/3rdparty/stlport/test/unit/unary.h similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/unary.h rename to lib/3rdparty/stlport/test/unit/unary.h diff --git a/reactos/lib/3rdparty/stlport/test/unit/unary_test.cpp b/lib/3rdparty/stlport/test/unit/unary_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/unary_test.cpp rename to lib/3rdparty/stlport/test/unit/unary_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/uninitialized_test.cpp b/lib/3rdparty/stlport/test/unit/uninitialized_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/uninitialized_test.cpp rename to lib/3rdparty/stlport/test/unit/uninitialized_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/unique_test.cpp b/lib/3rdparty/stlport/test/unit/unique_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/unique_test.cpp rename to lib/3rdparty/stlport/test/unit/unique_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/unordered_test.cpp b/lib/3rdparty/stlport/test/unit/unordered_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/unordered_test.cpp rename to lib/3rdparty/stlport/test/unit/unordered_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/utility_header_test.cpp b/lib/3rdparty/stlport/test/unit/utility_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/utility_header_test.cpp rename to lib/3rdparty/stlport/test/unit/utility_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/valarray_header_test.cpp b/lib/3rdparty/stlport/test/unit/valarray_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/valarray_header_test.cpp rename to lib/3rdparty/stlport/test/unit/valarray_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/valarray_test.cpp b/lib/3rdparty/stlport/test/unit/valarray_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/valarray_test.cpp rename to lib/3rdparty/stlport/test/unit/valarray_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/vector_header_test.cpp b/lib/3rdparty/stlport/test/unit/vector_header_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/vector_header_test.cpp rename to lib/3rdparty/stlport/test/unit/vector_header_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/vector_test.cpp b/lib/3rdparty/stlport/test/unit/vector_test.cpp similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/vector_test.cpp rename to lib/3rdparty/stlport/test/unit/vector_test.cpp diff --git a/reactos/lib/3rdparty/stlport/test/unit/wchar_header_test.c b/lib/3rdparty/stlport/test/unit/wchar_header_test.c similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/wchar_header_test.c rename to lib/3rdparty/stlport/test/unit/wchar_header_test.c diff --git a/reactos/lib/3rdparty/stlport/test/unit/wctype_header_test.c b/lib/3rdparty/stlport/test/unit/wctype_header_test.c similarity index 100% rename from reactos/lib/3rdparty/stlport/test/unit/wctype_header_test.c rename to lib/3rdparty/stlport/test/unit/wctype_header_test.c diff --git a/reactos/lib/3rdparty/zlib/CMakeLists.txt b/lib/3rdparty/zlib/CMakeLists.txt similarity index 100% rename from reactos/lib/3rdparty/zlib/CMakeLists.txt rename to lib/3rdparty/zlib/CMakeLists.txt diff --git a/reactos/lib/3rdparty/zlib/ChangeLog b/lib/3rdparty/zlib/ChangeLog similarity index 100% rename from reactos/lib/3rdparty/zlib/ChangeLog rename to lib/3rdparty/zlib/ChangeLog diff --git a/reactos/lib/3rdparty/zlib/FAQ b/lib/3rdparty/zlib/FAQ similarity index 100% rename from reactos/lib/3rdparty/zlib/FAQ rename to lib/3rdparty/zlib/FAQ diff --git a/reactos/lib/3rdparty/zlib/INDEX b/lib/3rdparty/zlib/INDEX similarity index 100% rename from reactos/lib/3rdparty/zlib/INDEX rename to lib/3rdparty/zlib/INDEX diff --git a/reactos/lib/3rdparty/zlib/Makefile.in b/lib/3rdparty/zlib/Makefile.in similarity index 100% rename from reactos/lib/3rdparty/zlib/Makefile.in rename to lib/3rdparty/zlib/Makefile.in diff --git a/reactos/lib/3rdparty/zlib/README b/lib/3rdparty/zlib/README similarity index 100% rename from reactos/lib/3rdparty/zlib/README rename to lib/3rdparty/zlib/README diff --git a/reactos/lib/3rdparty/zlib/adler32.c b/lib/3rdparty/zlib/adler32.c similarity index 100% rename from reactos/lib/3rdparty/zlib/adler32.c rename to lib/3rdparty/zlib/adler32.c diff --git a/reactos/lib/3rdparty/zlib/algorithm.txt b/lib/3rdparty/zlib/algorithm.txt similarity index 100% rename from reactos/lib/3rdparty/zlib/algorithm.txt rename to lib/3rdparty/zlib/algorithm.txt diff --git a/reactos/lib/3rdparty/zlib/compress.c b/lib/3rdparty/zlib/compress.c similarity index 100% rename from reactos/lib/3rdparty/zlib/compress.c rename to lib/3rdparty/zlib/compress.c diff --git a/reactos/lib/3rdparty/zlib/configure b/lib/3rdparty/zlib/configure similarity index 100% rename from reactos/lib/3rdparty/zlib/configure rename to lib/3rdparty/zlib/configure diff --git a/reactos/lib/3rdparty/zlib/crc32.c b/lib/3rdparty/zlib/crc32.c similarity index 100% rename from reactos/lib/3rdparty/zlib/crc32.c rename to lib/3rdparty/zlib/crc32.c diff --git a/reactos/lib/3rdparty/zlib/crc32.h b/lib/3rdparty/zlib/crc32.h similarity index 100% rename from reactos/lib/3rdparty/zlib/crc32.h rename to lib/3rdparty/zlib/crc32.h diff --git a/reactos/lib/3rdparty/zlib/deflate.c b/lib/3rdparty/zlib/deflate.c similarity index 100% rename from reactos/lib/3rdparty/zlib/deflate.c rename to lib/3rdparty/zlib/deflate.c diff --git a/reactos/lib/3rdparty/zlib/deflate.h b/lib/3rdparty/zlib/deflate.h similarity index 100% rename from reactos/lib/3rdparty/zlib/deflate.h rename to lib/3rdparty/zlib/deflate.h diff --git a/reactos/lib/3rdparty/zlib/example.c b/lib/3rdparty/zlib/example.c similarity index 100% rename from reactos/lib/3rdparty/zlib/example.c rename to lib/3rdparty/zlib/example.c diff --git a/reactos/lib/3rdparty/zlib/gzclose.c b/lib/3rdparty/zlib/gzclose.c similarity index 100% rename from reactos/lib/3rdparty/zlib/gzclose.c rename to lib/3rdparty/zlib/gzclose.c diff --git a/reactos/lib/3rdparty/zlib/gzguts.h b/lib/3rdparty/zlib/gzguts.h similarity index 100% rename from reactos/lib/3rdparty/zlib/gzguts.h rename to lib/3rdparty/zlib/gzguts.h diff --git a/reactos/lib/3rdparty/zlib/gzlib.c b/lib/3rdparty/zlib/gzlib.c similarity index 100% rename from reactos/lib/3rdparty/zlib/gzlib.c rename to lib/3rdparty/zlib/gzlib.c diff --git a/reactos/lib/3rdparty/zlib/gzread.c b/lib/3rdparty/zlib/gzread.c similarity index 100% rename from reactos/lib/3rdparty/zlib/gzread.c rename to lib/3rdparty/zlib/gzread.c diff --git a/reactos/lib/3rdparty/zlib/gzwrite.c b/lib/3rdparty/zlib/gzwrite.c similarity index 100% rename from reactos/lib/3rdparty/zlib/gzwrite.c rename to lib/3rdparty/zlib/gzwrite.c diff --git a/reactos/lib/3rdparty/zlib/infback.c b/lib/3rdparty/zlib/infback.c similarity index 100% rename from reactos/lib/3rdparty/zlib/infback.c rename to lib/3rdparty/zlib/infback.c diff --git a/reactos/lib/3rdparty/zlib/inffast.c b/lib/3rdparty/zlib/inffast.c similarity index 100% rename from reactos/lib/3rdparty/zlib/inffast.c rename to lib/3rdparty/zlib/inffast.c diff --git a/reactos/lib/3rdparty/zlib/inffast.h b/lib/3rdparty/zlib/inffast.h similarity index 100% rename from reactos/lib/3rdparty/zlib/inffast.h rename to lib/3rdparty/zlib/inffast.h diff --git a/reactos/lib/3rdparty/zlib/inffixed.h b/lib/3rdparty/zlib/inffixed.h similarity index 100% rename from reactos/lib/3rdparty/zlib/inffixed.h rename to lib/3rdparty/zlib/inffixed.h diff --git a/reactos/lib/3rdparty/zlib/inflate.c b/lib/3rdparty/zlib/inflate.c similarity index 100% rename from reactos/lib/3rdparty/zlib/inflate.c rename to lib/3rdparty/zlib/inflate.c diff --git a/reactos/lib/3rdparty/zlib/inflate.h b/lib/3rdparty/zlib/inflate.h similarity index 100% rename from reactos/lib/3rdparty/zlib/inflate.h rename to lib/3rdparty/zlib/inflate.h diff --git a/reactos/lib/3rdparty/zlib/inftrees.c b/lib/3rdparty/zlib/inftrees.c similarity index 100% rename from reactos/lib/3rdparty/zlib/inftrees.c rename to lib/3rdparty/zlib/inftrees.c diff --git a/reactos/lib/3rdparty/zlib/inftrees.h b/lib/3rdparty/zlib/inftrees.h similarity index 100% rename from reactos/lib/3rdparty/zlib/inftrees.h rename to lib/3rdparty/zlib/inftrees.h diff --git a/reactos/lib/3rdparty/zlib/minigzip.c b/lib/3rdparty/zlib/minigzip.c similarity index 100% rename from reactos/lib/3rdparty/zlib/minigzip.c rename to lib/3rdparty/zlib/minigzip.c diff --git a/reactos/lib/3rdparty/zlib/trees.c b/lib/3rdparty/zlib/trees.c similarity index 100% rename from reactos/lib/3rdparty/zlib/trees.c rename to lib/3rdparty/zlib/trees.c diff --git a/reactos/lib/3rdparty/zlib/trees.h b/lib/3rdparty/zlib/trees.h similarity index 100% rename from reactos/lib/3rdparty/zlib/trees.h rename to lib/3rdparty/zlib/trees.h diff --git a/reactos/lib/3rdparty/zlib/uncompr.c b/lib/3rdparty/zlib/uncompr.c similarity index 100% rename from reactos/lib/3rdparty/zlib/uncompr.c rename to lib/3rdparty/zlib/uncompr.c diff --git a/reactos/lib/3rdparty/zlib/zconf.h b/lib/3rdparty/zlib/zconf.h similarity index 100% rename from reactos/lib/3rdparty/zlib/zconf.h rename to lib/3rdparty/zlib/zconf.h diff --git a/reactos/lib/3rdparty/zlib/zlib.h b/lib/3rdparty/zlib/zlib.h similarity index 100% rename from reactos/lib/3rdparty/zlib/zlib.h rename to lib/3rdparty/zlib/zlib.h diff --git a/reactos/lib/3rdparty/zlib/zlib.rbuild b/lib/3rdparty/zlib/zlib.rbuild similarity index 100% rename from reactos/lib/3rdparty/zlib/zlib.rbuild rename to lib/3rdparty/zlib/zlib.rbuild diff --git a/reactos/lib/3rdparty/zlib/zutil.c b/lib/3rdparty/zlib/zutil.c similarity index 100% rename from reactos/lib/3rdparty/zlib/zutil.c rename to lib/3rdparty/zlib/zutil.c diff --git a/reactos/lib/3rdparty/zlib/zutil.h b/lib/3rdparty/zlib/zutil.h similarity index 100% rename from reactos/lib/3rdparty/zlib/zutil.h rename to lib/3rdparty/zlib/zutil.h diff --git a/reactos/lib/CMakeLists.txt b/lib/CMakeLists.txt similarity index 100% rename from reactos/lib/CMakeLists.txt rename to lib/CMakeLists.txt diff --git a/reactos/lib/atl/CMakeLists.txt b/lib/atl/CMakeLists.txt similarity index 100% rename from reactos/lib/atl/CMakeLists.txt rename to lib/atl/CMakeLists.txt diff --git a/reactos/lib/atl/atl.rbuild b/lib/atl/atl.rbuild similarity index 100% rename from reactos/lib/atl/atl.rbuild rename to lib/atl/atl.rbuild diff --git a/reactos/lib/atl/atlbase.cpp b/lib/atl/atlbase.cpp similarity index 100% rename from reactos/lib/atl/atlbase.cpp rename to lib/atl/atlbase.cpp diff --git a/reactos/lib/atl/atlbase.h b/lib/atl/atlbase.h similarity index 100% rename from reactos/lib/atl/atlbase.h rename to lib/atl/atlbase.h diff --git a/reactos/lib/atl/atlcom.h b/lib/atl/atlcom.h similarity index 100% rename from reactos/lib/atl/atlcom.h rename to lib/atl/atlcom.h diff --git a/reactos/lib/atl/atlcore.cpp b/lib/atl/atlcore.cpp similarity index 100% rename from reactos/lib/atl/atlcore.cpp rename to lib/atl/atlcore.cpp diff --git a/reactos/lib/atl/atlcore.h b/lib/atl/atlcore.h similarity index 100% rename from reactos/lib/atl/atlcore.h rename to lib/atl/atlcore.h diff --git a/reactos/lib/atl/atlwin.h b/lib/atl/atlwin.h similarity index 100% rename from reactos/lib/atl/atlwin.h rename to lib/atl/atlwin.h diff --git a/reactos/lib/atl/statreg.h b/lib/atl/statreg.h similarity index 100% rename from reactos/lib/atl/statreg.h rename to lib/atl/statreg.h diff --git a/reactos/lib/cmlib/CMakeLists.txt b/lib/cmlib/CMakeLists.txt similarity index 100% rename from reactos/lib/cmlib/CMakeLists.txt rename to lib/cmlib/CMakeLists.txt diff --git a/reactos/lib/cmlib/cmdata.h b/lib/cmlib/cmdata.h similarity index 100% rename from reactos/lib/cmlib/cmdata.h rename to lib/cmlib/cmdata.h diff --git a/reactos/lib/cmlib/cminit.c b/lib/cmlib/cminit.c similarity index 100% rename from reactos/lib/cmlib/cminit.c rename to lib/cmlib/cminit.c diff --git a/reactos/lib/cmlib/cmlib.h b/lib/cmlib/cmlib.h similarity index 100% rename from reactos/lib/cmlib/cmlib.h rename to lib/cmlib/cmlib.h diff --git a/reactos/lib/cmlib/cmlib.rbuild b/lib/cmlib/cmlib.rbuild similarity index 100% rename from reactos/lib/cmlib/cmlib.rbuild rename to lib/cmlib/cmlib.rbuild diff --git a/reactos/lib/cmlib/hivebin.c b/lib/cmlib/hivebin.c similarity index 100% rename from reactos/lib/cmlib/hivebin.c rename to lib/cmlib/hivebin.c diff --git a/reactos/lib/cmlib/hivecell.c b/lib/cmlib/hivecell.c similarity index 100% rename from reactos/lib/cmlib/hivecell.c rename to lib/cmlib/hivecell.c diff --git a/reactos/lib/cmlib/hivedata.h b/lib/cmlib/hivedata.h similarity index 100% rename from reactos/lib/cmlib/hivedata.h rename to lib/cmlib/hivedata.h diff --git a/reactos/lib/cmlib/hiveinit.c b/lib/cmlib/hiveinit.c similarity index 100% rename from reactos/lib/cmlib/hiveinit.c rename to lib/cmlib/hiveinit.c diff --git a/reactos/lib/cmlib/hivesum.c b/lib/cmlib/hivesum.c similarity index 100% rename from reactos/lib/cmlib/hivesum.c rename to lib/cmlib/hivesum.c diff --git a/reactos/lib/cmlib/hivewrt.c b/lib/cmlib/hivewrt.c similarity index 100% rename from reactos/lib/cmlib/hivewrt.c rename to lib/cmlib/hivewrt.c diff --git a/reactos/lib/cportlib/CMakeLists.txt b/lib/cportlib/CMakeLists.txt similarity index 100% rename from reactos/lib/cportlib/CMakeLists.txt rename to lib/cportlib/CMakeLists.txt diff --git a/reactos/lib/cportlib/cport.c b/lib/cportlib/cport.c similarity index 100% rename from reactos/lib/cportlib/cport.c rename to lib/cportlib/cport.c diff --git a/reactos/lib/cportlib/cportlib.rbuild b/lib/cportlib/cportlib.rbuild similarity index 100% rename from reactos/lib/cportlib/cportlib.rbuild rename to lib/cportlib/cportlib.rbuild diff --git a/reactos/lib/debugsup/debugsup-ntos.spec b/lib/debugsup/debugsup-ntos.spec similarity index 100% rename from reactos/lib/debugsup/debugsup-ntos.spec rename to lib/debugsup/debugsup-ntos.spec diff --git a/reactos/lib/debugsup/debugsup.rbuild b/lib/debugsup/debugsup.rbuild similarity index 100% rename from reactos/lib/debugsup/debugsup.rbuild rename to lib/debugsup/debugsup.rbuild diff --git a/reactos/lib/dnslib/CMakeLists.txt b/lib/dnslib/CMakeLists.txt similarity index 100% rename from reactos/lib/dnslib/CMakeLists.txt rename to lib/dnslib/CMakeLists.txt diff --git a/reactos/lib/dnslib/addr.c b/lib/dnslib/addr.c similarity index 100% rename from reactos/lib/dnslib/addr.c rename to lib/dnslib/addr.c diff --git a/reactos/lib/dnslib/debug.c b/lib/dnslib/debug.c similarity index 100% rename from reactos/lib/dnslib/debug.c rename to lib/dnslib/debug.c diff --git a/reactos/lib/dnslib/dnsaddr.c b/lib/dnslib/dnsaddr.c similarity index 100% rename from reactos/lib/dnslib/dnsaddr.c rename to lib/dnslib/dnsaddr.c diff --git a/reactos/lib/dnslib/dnslib.rbuild b/lib/dnslib/dnslib.rbuild similarity index 100% rename from reactos/lib/dnslib/dnslib.rbuild rename to lib/dnslib/dnslib.rbuild diff --git a/reactos/lib/dnslib/dnsutil.c b/lib/dnslib/dnsutil.c similarity index 100% rename from reactos/lib/dnslib/dnsutil.c rename to lib/dnslib/dnsutil.c diff --git a/reactos/lib/dnslib/flatbuf.c b/lib/dnslib/flatbuf.c similarity index 100% rename from reactos/lib/dnslib/flatbuf.c rename to lib/dnslib/flatbuf.c diff --git a/reactos/lib/dnslib/hostent.c b/lib/dnslib/hostent.c similarity index 100% rename from reactos/lib/dnslib/hostent.c rename to lib/dnslib/hostent.c diff --git a/reactos/lib/dnslib/inc/dnslib.h b/lib/dnslib/inc/dnslib.h similarity index 100% rename from reactos/lib/dnslib/inc/dnslib.h rename to lib/dnslib/inc/dnslib.h diff --git a/reactos/lib/dnslib/inc/precomp.h b/lib/dnslib/inc/precomp.h similarity index 100% rename from reactos/lib/dnslib/inc/precomp.h rename to lib/dnslib/inc/precomp.h diff --git a/reactos/lib/dnslib/inc/windnsp.h b/lib/dnslib/inc/windnsp.h similarity index 100% rename from reactos/lib/dnslib/inc/windnsp.h rename to lib/dnslib/inc/windnsp.h diff --git a/reactos/lib/dnslib/ip6.c b/lib/dnslib/ip6.c similarity index 100% rename from reactos/lib/dnslib/ip6.c rename to lib/dnslib/ip6.c diff --git a/reactos/lib/dnslib/memory.c b/lib/dnslib/memory.c similarity index 100% rename from reactos/lib/dnslib/memory.c rename to lib/dnslib/memory.c diff --git a/reactos/lib/dnslib/name.c b/lib/dnslib/name.c similarity index 100% rename from reactos/lib/dnslib/name.c rename to lib/dnslib/name.c diff --git a/reactos/lib/dnslib/print.c b/lib/dnslib/print.c similarity index 100% rename from reactos/lib/dnslib/print.c rename to lib/dnslib/print.c diff --git a/reactos/lib/dnslib/record.c b/lib/dnslib/record.c similarity index 100% rename from reactos/lib/dnslib/record.c rename to lib/dnslib/record.c diff --git a/reactos/lib/dnslib/rrprint.c b/lib/dnslib/rrprint.c similarity index 100% rename from reactos/lib/dnslib/rrprint.c rename to lib/dnslib/rrprint.c diff --git a/reactos/lib/dnslib/sablob.c b/lib/dnslib/sablob.c similarity index 100% rename from reactos/lib/dnslib/sablob.c rename to lib/dnslib/sablob.c diff --git a/reactos/lib/dnslib/straddr.c b/lib/dnslib/straddr.c similarity index 100% rename from reactos/lib/dnslib/straddr.c rename to lib/dnslib/straddr.c diff --git a/reactos/lib/dnslib/string.c b/lib/dnslib/string.c similarity index 100% rename from reactos/lib/dnslib/string.c rename to lib/dnslib/string.c diff --git a/reactos/lib/dnslib/table.c b/lib/dnslib/table.c similarity index 100% rename from reactos/lib/dnslib/table.c rename to lib/dnslib/table.c diff --git a/reactos/lib/dnslib/utf8.c b/lib/dnslib/utf8.c similarity index 100% rename from reactos/lib/dnslib/utf8.c rename to lib/dnslib/utf8.c diff --git a/reactos/lib/drivers/CMakeLists.txt b/lib/drivers/CMakeLists.txt similarity index 100% rename from reactos/lib/drivers/CMakeLists.txt rename to lib/drivers/CMakeLists.txt diff --git a/reactos/lib/drivers/chew/CMakeLists.txt b/lib/drivers/chew/CMakeLists.txt similarity index 100% rename from reactos/lib/drivers/chew/CMakeLists.txt rename to lib/drivers/chew/CMakeLists.txt diff --git a/reactos/lib/drivers/chew/chew.rbuild b/lib/drivers/chew/chew.rbuild similarity index 100% rename from reactos/lib/drivers/chew/chew.rbuild rename to lib/drivers/chew/chew.rbuild diff --git a/reactos/lib/drivers/chew/workqueue.c b/lib/drivers/chew/workqueue.c similarity index 100% rename from reactos/lib/drivers/chew/workqueue.c rename to lib/drivers/chew/workqueue.c diff --git a/reactos/lib/drivers/csq/CMakeLists.txt b/lib/drivers/csq/CMakeLists.txt similarity index 100% rename from reactos/lib/drivers/csq/CMakeLists.txt rename to lib/drivers/csq/CMakeLists.txt diff --git a/reactos/lib/drivers/csq/SOURCES b/lib/drivers/csq/SOURCES similarity index 100% rename from reactos/lib/drivers/csq/SOURCES rename to lib/drivers/csq/SOURCES diff --git a/reactos/lib/drivers/csq/csq.c b/lib/drivers/csq/csq.c similarity index 100% rename from reactos/lib/drivers/csq/csq.c rename to lib/drivers/csq/csq.c diff --git a/reactos/lib/drivers/csq/csq.def b/lib/drivers/csq/csq.def similarity index 100% rename from reactos/lib/drivers/csq/csq.def rename to lib/drivers/csq/csq.def diff --git a/reactos/lib/drivers/csq/csq.rbuild b/lib/drivers/csq/csq.rbuild similarity index 100% rename from reactos/lib/drivers/csq/csq.rbuild rename to lib/drivers/csq/csq.rbuild diff --git a/reactos/lib/drivers/directory.rbuild b/lib/drivers/directory.rbuild similarity index 100% rename from reactos/lib/drivers/directory.rbuild rename to lib/drivers/directory.rbuild diff --git a/reactos/lib/drivers/ip/CMakeLists.txt b/lib/drivers/ip/CMakeLists.txt similarity index 100% rename from reactos/lib/drivers/ip/CMakeLists.txt rename to lib/drivers/ip/CMakeLists.txt diff --git a/reactos/lib/drivers/ip/ip.rbuild b/lib/drivers/ip/ip.rbuild similarity index 100% rename from reactos/lib/drivers/ip/ip.rbuild rename to lib/drivers/ip/ip.rbuild diff --git a/reactos/lib/drivers/ip/network/address.c b/lib/drivers/ip/network/address.c similarity index 100% rename from reactos/lib/drivers/ip/network/address.c rename to lib/drivers/ip/network/address.c diff --git a/reactos/lib/drivers/ip/network/arp.c b/lib/drivers/ip/network/arp.c similarity index 100% rename from reactos/lib/drivers/ip/network/arp.c rename to lib/drivers/ip/network/arp.c diff --git a/reactos/lib/drivers/ip/network/checksum.c b/lib/drivers/ip/network/checksum.c similarity index 100% rename from reactos/lib/drivers/ip/network/checksum.c rename to lib/drivers/ip/network/checksum.c diff --git a/reactos/lib/drivers/ip/network/i386/checksum.S b/lib/drivers/ip/network/i386/checksum.S similarity index 100% rename from reactos/lib/drivers/ip/network/i386/checksum.S rename to lib/drivers/ip/network/i386/checksum.S diff --git a/reactos/lib/drivers/ip/network/icmp.c b/lib/drivers/ip/network/icmp.c similarity index 100% rename from reactos/lib/drivers/ip/network/icmp.c rename to lib/drivers/ip/network/icmp.c diff --git a/reactos/lib/drivers/ip/network/interface.c b/lib/drivers/ip/network/interface.c similarity index 100% rename from reactos/lib/drivers/ip/network/interface.c rename to lib/drivers/ip/network/interface.c diff --git a/reactos/lib/drivers/ip/network/ip.c b/lib/drivers/ip/network/ip.c similarity index 100% rename from reactos/lib/drivers/ip/network/ip.c rename to lib/drivers/ip/network/ip.c diff --git a/reactos/lib/drivers/ip/network/loopback.c b/lib/drivers/ip/network/loopback.c similarity index 100% rename from reactos/lib/drivers/ip/network/loopback.c rename to lib/drivers/ip/network/loopback.c diff --git a/reactos/lib/drivers/ip/network/neighbor.c b/lib/drivers/ip/network/neighbor.c similarity index 100% rename from reactos/lib/drivers/ip/network/neighbor.c rename to lib/drivers/ip/network/neighbor.c diff --git a/reactos/lib/drivers/ip/network/ports.c b/lib/drivers/ip/network/ports.c similarity index 100% rename from reactos/lib/drivers/ip/network/ports.c rename to lib/drivers/ip/network/ports.c diff --git a/reactos/lib/drivers/ip/network/receive.c b/lib/drivers/ip/network/receive.c similarity index 100% rename from reactos/lib/drivers/ip/network/receive.c rename to lib/drivers/ip/network/receive.c diff --git a/reactos/lib/drivers/ip/network/router.c b/lib/drivers/ip/network/router.c similarity index 100% rename from reactos/lib/drivers/ip/network/router.c rename to lib/drivers/ip/network/router.c diff --git a/reactos/lib/drivers/ip/network/routines.c b/lib/drivers/ip/network/routines.c similarity index 100% rename from reactos/lib/drivers/ip/network/routines.c rename to lib/drivers/ip/network/routines.c diff --git a/reactos/lib/drivers/ip/network/transmit.c b/lib/drivers/ip/network/transmit.c similarity index 100% rename from reactos/lib/drivers/ip/network/transmit.c rename to lib/drivers/ip/network/transmit.c diff --git a/reactos/lib/drivers/ip/precomp.h b/lib/drivers/ip/precomp.h similarity index 100% rename from reactos/lib/drivers/ip/precomp.h rename to lib/drivers/ip/precomp.h diff --git a/reactos/lib/drivers/ip/transport/datagram/datagram.c b/lib/drivers/ip/transport/datagram/datagram.c similarity index 100% rename from reactos/lib/drivers/ip/transport/datagram/datagram.c rename to lib/drivers/ip/transport/datagram/datagram.c diff --git a/reactos/lib/drivers/ip/transport/rawip/rawip.c b/lib/drivers/ip/transport/rawip/rawip.c similarity index 100% rename from reactos/lib/drivers/ip/transport/rawip/rawip.c rename to lib/drivers/ip/transport/rawip/rawip.c diff --git a/reactos/lib/drivers/ip/transport/tcp/accept.c b/lib/drivers/ip/transport/tcp/accept.c similarity index 100% rename from reactos/lib/drivers/ip/transport/tcp/accept.c rename to lib/drivers/ip/transport/tcp/accept.c diff --git a/reactos/lib/drivers/ip/transport/tcp/event.c b/lib/drivers/ip/transport/tcp/event.c similarity index 100% rename from reactos/lib/drivers/ip/transport/tcp/event.c rename to lib/drivers/ip/transport/tcp/event.c diff --git a/reactos/lib/drivers/ip/transport/tcp/if.c b/lib/drivers/ip/transport/tcp/if.c similarity index 100% rename from reactos/lib/drivers/ip/transport/tcp/if.c rename to lib/drivers/ip/transport/tcp/if.c diff --git a/reactos/lib/drivers/ip/transport/tcp/tcp.c b/lib/drivers/ip/transport/tcp/tcp.c similarity index 100% rename from reactos/lib/drivers/ip/transport/tcp/tcp.c rename to lib/drivers/ip/transport/tcp/tcp.c diff --git a/reactos/lib/drivers/ip/transport/udp/udp.c b/lib/drivers/ip/transport/udp/udp.c similarity index 100% rename from reactos/lib/drivers/ip/transport/udp/udp.c rename to lib/drivers/ip/transport/udp/udp.c diff --git a/reactos/lib/drivers/lwip/CHANGELOG b/lib/drivers/lwip/CHANGELOG similarity index 100% rename from reactos/lib/drivers/lwip/CHANGELOG rename to lib/drivers/lwip/CHANGELOG diff --git a/reactos/lib/drivers/lwip/CMakeLists.txt b/lib/drivers/lwip/CMakeLists.txt similarity index 100% rename from reactos/lib/drivers/lwip/CMakeLists.txt rename to lib/drivers/lwip/CMakeLists.txt diff --git a/reactos/lib/drivers/lwip/COPYING b/lib/drivers/lwip/COPYING similarity index 100% rename from reactos/lib/drivers/lwip/COPYING rename to lib/drivers/lwip/COPYING diff --git a/reactos/lib/drivers/lwip/FILES b/lib/drivers/lwip/FILES similarity index 100% rename from reactos/lib/drivers/lwip/FILES rename to lib/drivers/lwip/FILES diff --git a/reactos/lib/drivers/lwip/README b/lib/drivers/lwip/README similarity index 100% rename from reactos/lib/drivers/lwip/README rename to lib/drivers/lwip/README diff --git a/reactos/lib/drivers/lwip/UPGRADING b/lib/drivers/lwip/UPGRADING similarity index 100% rename from reactos/lib/drivers/lwip/UPGRADING rename to lib/drivers/lwip/UPGRADING diff --git a/reactos/lib/drivers/lwip/doc/FILES b/lib/drivers/lwip/doc/FILES similarity index 100% rename from reactos/lib/drivers/lwip/doc/FILES rename to lib/drivers/lwip/doc/FILES diff --git a/reactos/lib/drivers/lwip/doc/contrib.txt b/lib/drivers/lwip/doc/contrib.txt similarity index 100% rename from reactos/lib/drivers/lwip/doc/contrib.txt rename to lib/drivers/lwip/doc/contrib.txt diff --git a/reactos/lib/drivers/lwip/doc/rawapi.txt b/lib/drivers/lwip/doc/rawapi.txt similarity index 100% rename from reactos/lib/drivers/lwip/doc/rawapi.txt rename to lib/drivers/lwip/doc/rawapi.txt diff --git a/reactos/lib/drivers/lwip/doc/savannah.txt b/lib/drivers/lwip/doc/savannah.txt similarity index 100% rename from reactos/lib/drivers/lwip/doc/savannah.txt rename to lib/drivers/lwip/doc/savannah.txt diff --git a/reactos/lib/drivers/lwip/doc/snmp_agent.txt b/lib/drivers/lwip/doc/snmp_agent.txt similarity index 100% rename from reactos/lib/drivers/lwip/doc/snmp_agent.txt rename to lib/drivers/lwip/doc/snmp_agent.txt diff --git a/reactos/lib/drivers/lwip/doc/sys_arch.txt b/lib/drivers/lwip/doc/sys_arch.txt similarity index 100% rename from reactos/lib/drivers/lwip/doc/sys_arch.txt rename to lib/drivers/lwip/doc/sys_arch.txt diff --git a/reactos/lib/drivers/lwip/lwip.rbuild b/lib/drivers/lwip/lwip.rbuild similarity index 100% rename from reactos/lib/drivers/lwip/lwip.rbuild rename to lib/drivers/lwip/lwip.rbuild diff --git a/reactos/lib/drivers/lwip/src/FILES b/lib/drivers/lwip/src/FILES similarity index 100% rename from reactos/lib/drivers/lwip/src/FILES rename to lib/drivers/lwip/src/FILES diff --git a/reactos/lib/drivers/lwip/src/api/api_lib.c b/lib/drivers/lwip/src/api/api_lib.c similarity index 100% rename from reactos/lib/drivers/lwip/src/api/api_lib.c rename to lib/drivers/lwip/src/api/api_lib.c diff --git a/reactos/lib/drivers/lwip/src/api/api_msg.c b/lib/drivers/lwip/src/api/api_msg.c similarity index 100% rename from reactos/lib/drivers/lwip/src/api/api_msg.c rename to lib/drivers/lwip/src/api/api_msg.c diff --git a/reactos/lib/drivers/lwip/src/api/err.c b/lib/drivers/lwip/src/api/err.c similarity index 100% rename from reactos/lib/drivers/lwip/src/api/err.c rename to lib/drivers/lwip/src/api/err.c diff --git a/reactos/lib/drivers/lwip/src/api/netbuf.c b/lib/drivers/lwip/src/api/netbuf.c similarity index 100% rename from reactos/lib/drivers/lwip/src/api/netbuf.c rename to lib/drivers/lwip/src/api/netbuf.c diff --git a/reactos/lib/drivers/lwip/src/api/netdb.c b/lib/drivers/lwip/src/api/netdb.c similarity index 100% rename from reactos/lib/drivers/lwip/src/api/netdb.c rename to lib/drivers/lwip/src/api/netdb.c diff --git a/reactos/lib/drivers/lwip/src/api/netifapi.c b/lib/drivers/lwip/src/api/netifapi.c similarity index 100% rename from reactos/lib/drivers/lwip/src/api/netifapi.c rename to lib/drivers/lwip/src/api/netifapi.c diff --git a/reactos/lib/drivers/lwip/src/api/sockets.c b/lib/drivers/lwip/src/api/sockets.c similarity index 100% rename from reactos/lib/drivers/lwip/src/api/sockets.c rename to lib/drivers/lwip/src/api/sockets.c diff --git a/reactos/lib/drivers/lwip/src/api/tcpip.c b/lib/drivers/lwip/src/api/tcpip.c similarity index 100% rename from reactos/lib/drivers/lwip/src/api/tcpip.c rename to lib/drivers/lwip/src/api/tcpip.c diff --git a/reactos/lib/drivers/lwip/src/core/def.c b/lib/drivers/lwip/src/core/def.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/def.c rename to lib/drivers/lwip/src/core/def.c diff --git a/reactos/lib/drivers/lwip/src/core/dhcp.c b/lib/drivers/lwip/src/core/dhcp.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/dhcp.c rename to lib/drivers/lwip/src/core/dhcp.c diff --git a/reactos/lib/drivers/lwip/src/core/dns.c b/lib/drivers/lwip/src/core/dns.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/dns.c rename to lib/drivers/lwip/src/core/dns.c diff --git a/reactos/lib/drivers/lwip/src/core/init.c b/lib/drivers/lwip/src/core/init.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/init.c rename to lib/drivers/lwip/src/core/init.c diff --git a/reactos/lib/drivers/lwip/src/core/ipv4/autoip.c b/lib/drivers/lwip/src/core/ipv4/autoip.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/ipv4/autoip.c rename to lib/drivers/lwip/src/core/ipv4/autoip.c diff --git a/reactos/lib/drivers/lwip/src/core/ipv4/icmp.c b/lib/drivers/lwip/src/core/ipv4/icmp.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/ipv4/icmp.c rename to lib/drivers/lwip/src/core/ipv4/icmp.c diff --git a/reactos/lib/drivers/lwip/src/core/ipv4/igmp.c b/lib/drivers/lwip/src/core/ipv4/igmp.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/ipv4/igmp.c rename to lib/drivers/lwip/src/core/ipv4/igmp.c diff --git a/reactos/lib/drivers/lwip/src/core/ipv4/inet.c b/lib/drivers/lwip/src/core/ipv4/inet.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/ipv4/inet.c rename to lib/drivers/lwip/src/core/ipv4/inet.c diff --git a/reactos/lib/drivers/lwip/src/core/ipv4/inet_chksum.c b/lib/drivers/lwip/src/core/ipv4/inet_chksum.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/ipv4/inet_chksum.c rename to lib/drivers/lwip/src/core/ipv4/inet_chksum.c diff --git a/reactos/lib/drivers/lwip/src/core/ipv4/ip.c b/lib/drivers/lwip/src/core/ipv4/ip.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/ipv4/ip.c rename to lib/drivers/lwip/src/core/ipv4/ip.c diff --git a/reactos/lib/drivers/lwip/src/core/ipv4/ip_addr.c b/lib/drivers/lwip/src/core/ipv4/ip_addr.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/ipv4/ip_addr.c rename to lib/drivers/lwip/src/core/ipv4/ip_addr.c diff --git a/reactos/lib/drivers/lwip/src/core/ipv4/ip_frag.c b/lib/drivers/lwip/src/core/ipv4/ip_frag.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/ipv4/ip_frag.c rename to lib/drivers/lwip/src/core/ipv4/ip_frag.c diff --git a/reactos/lib/drivers/lwip/src/core/ipv6/README b/lib/drivers/lwip/src/core/ipv6/README similarity index 100% rename from reactos/lib/drivers/lwip/src/core/ipv6/README rename to lib/drivers/lwip/src/core/ipv6/README diff --git a/reactos/lib/drivers/lwip/src/core/ipv6/icmp6.c b/lib/drivers/lwip/src/core/ipv6/icmp6.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/ipv6/icmp6.c rename to lib/drivers/lwip/src/core/ipv6/icmp6.c diff --git a/reactos/lib/drivers/lwip/src/core/ipv6/inet6.c b/lib/drivers/lwip/src/core/ipv6/inet6.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/ipv6/inet6.c rename to lib/drivers/lwip/src/core/ipv6/inet6.c diff --git a/reactos/lib/drivers/lwip/src/core/ipv6/ip6.c b/lib/drivers/lwip/src/core/ipv6/ip6.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/ipv6/ip6.c rename to lib/drivers/lwip/src/core/ipv6/ip6.c diff --git a/reactos/lib/drivers/lwip/src/core/ipv6/ip6_addr.c b/lib/drivers/lwip/src/core/ipv6/ip6_addr.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/ipv6/ip6_addr.c rename to lib/drivers/lwip/src/core/ipv6/ip6_addr.c diff --git a/reactos/lib/drivers/lwip/src/core/mem.c b/lib/drivers/lwip/src/core/mem.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/mem.c rename to lib/drivers/lwip/src/core/mem.c diff --git a/reactos/lib/drivers/lwip/src/core/memp.c b/lib/drivers/lwip/src/core/memp.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/memp.c rename to lib/drivers/lwip/src/core/memp.c diff --git a/reactos/lib/drivers/lwip/src/core/netif.c b/lib/drivers/lwip/src/core/netif.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/netif.c rename to lib/drivers/lwip/src/core/netif.c diff --git a/reactos/lib/drivers/lwip/src/core/pbuf.c b/lib/drivers/lwip/src/core/pbuf.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/pbuf.c rename to lib/drivers/lwip/src/core/pbuf.c diff --git a/reactos/lib/drivers/lwip/src/core/raw.c b/lib/drivers/lwip/src/core/raw.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/raw.c rename to lib/drivers/lwip/src/core/raw.c diff --git a/reactos/lib/drivers/lwip/src/core/snmp/asn1_dec.c b/lib/drivers/lwip/src/core/snmp/asn1_dec.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/snmp/asn1_dec.c rename to lib/drivers/lwip/src/core/snmp/asn1_dec.c diff --git a/reactos/lib/drivers/lwip/src/core/snmp/asn1_enc.c b/lib/drivers/lwip/src/core/snmp/asn1_enc.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/snmp/asn1_enc.c rename to lib/drivers/lwip/src/core/snmp/asn1_enc.c diff --git a/reactos/lib/drivers/lwip/src/core/snmp/mib2.c b/lib/drivers/lwip/src/core/snmp/mib2.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/snmp/mib2.c rename to lib/drivers/lwip/src/core/snmp/mib2.c diff --git a/reactos/lib/drivers/lwip/src/core/snmp/mib_structs.c b/lib/drivers/lwip/src/core/snmp/mib_structs.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/snmp/mib_structs.c rename to lib/drivers/lwip/src/core/snmp/mib_structs.c diff --git a/reactos/lib/drivers/lwip/src/core/snmp/msg_in.c b/lib/drivers/lwip/src/core/snmp/msg_in.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/snmp/msg_in.c rename to lib/drivers/lwip/src/core/snmp/msg_in.c diff --git a/reactos/lib/drivers/lwip/src/core/snmp/msg_out.c b/lib/drivers/lwip/src/core/snmp/msg_out.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/snmp/msg_out.c rename to lib/drivers/lwip/src/core/snmp/msg_out.c diff --git a/reactos/lib/drivers/lwip/src/core/stats.c b/lib/drivers/lwip/src/core/stats.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/stats.c rename to lib/drivers/lwip/src/core/stats.c diff --git a/reactos/lib/drivers/lwip/src/core/sys.c b/lib/drivers/lwip/src/core/sys.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/sys.c rename to lib/drivers/lwip/src/core/sys.c diff --git a/reactos/lib/drivers/lwip/src/core/tcp.c b/lib/drivers/lwip/src/core/tcp.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/tcp.c rename to lib/drivers/lwip/src/core/tcp.c diff --git a/reactos/lib/drivers/lwip/src/core/tcp_in.c b/lib/drivers/lwip/src/core/tcp_in.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/tcp_in.c rename to lib/drivers/lwip/src/core/tcp_in.c diff --git a/reactos/lib/drivers/lwip/src/core/tcp_out.c b/lib/drivers/lwip/src/core/tcp_out.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/tcp_out.c rename to lib/drivers/lwip/src/core/tcp_out.c diff --git a/reactos/lib/drivers/lwip/src/core/timers.c b/lib/drivers/lwip/src/core/timers.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/timers.c rename to lib/drivers/lwip/src/core/timers.c diff --git a/reactos/lib/drivers/lwip/src/core/udp.c b/lib/drivers/lwip/src/core/udp.c similarity index 100% rename from reactos/lib/drivers/lwip/src/core/udp.c rename to lib/drivers/lwip/src/core/udp.c diff --git a/reactos/lib/drivers/lwip/src/include/arch/bpstruct.h b/lib/drivers/lwip/src/include/arch/bpstruct.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/arch/bpstruct.h rename to lib/drivers/lwip/src/include/arch/bpstruct.h diff --git a/reactos/lib/drivers/lwip/src/include/arch/cc.h b/lib/drivers/lwip/src/include/arch/cc.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/arch/cc.h rename to lib/drivers/lwip/src/include/arch/cc.h diff --git a/reactos/lib/drivers/lwip/src/include/arch/epstruct.h b/lib/drivers/lwip/src/include/arch/epstruct.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/arch/epstruct.h rename to lib/drivers/lwip/src/include/arch/epstruct.h diff --git a/reactos/lib/drivers/lwip/src/include/arch/perf.h b/lib/drivers/lwip/src/include/arch/perf.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/arch/perf.h rename to lib/drivers/lwip/src/include/arch/perf.h diff --git a/reactos/lib/drivers/lwip/src/include/arch/sys_arch.h b/lib/drivers/lwip/src/include/arch/sys_arch.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/arch/sys_arch.h rename to lib/drivers/lwip/src/include/arch/sys_arch.h diff --git a/reactos/lib/drivers/lwip/src/include/ipv4/lwip/autoip.h b/lib/drivers/lwip/src/include/ipv4/lwip/autoip.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/ipv4/lwip/autoip.h rename to lib/drivers/lwip/src/include/ipv4/lwip/autoip.h diff --git a/reactos/lib/drivers/lwip/src/include/ipv4/lwip/icmp.h b/lib/drivers/lwip/src/include/ipv4/lwip/icmp.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/ipv4/lwip/icmp.h rename to lib/drivers/lwip/src/include/ipv4/lwip/icmp.h diff --git a/reactos/lib/drivers/lwip/src/include/ipv4/lwip/igmp.h b/lib/drivers/lwip/src/include/ipv4/lwip/igmp.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/ipv4/lwip/igmp.h rename to lib/drivers/lwip/src/include/ipv4/lwip/igmp.h diff --git a/reactos/lib/drivers/lwip/src/include/ipv4/lwip/inet.h b/lib/drivers/lwip/src/include/ipv4/lwip/inet.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/ipv4/lwip/inet.h rename to lib/drivers/lwip/src/include/ipv4/lwip/inet.h diff --git a/reactos/lib/drivers/lwip/src/include/ipv4/lwip/inet_chksum.h b/lib/drivers/lwip/src/include/ipv4/lwip/inet_chksum.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/ipv4/lwip/inet_chksum.h rename to lib/drivers/lwip/src/include/ipv4/lwip/inet_chksum.h diff --git a/reactos/lib/drivers/lwip/src/include/ipv4/lwip/ip.h b/lib/drivers/lwip/src/include/ipv4/lwip/ip.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/ipv4/lwip/ip.h rename to lib/drivers/lwip/src/include/ipv4/lwip/ip.h diff --git a/reactos/lib/drivers/lwip/src/include/ipv4/lwip/ip_addr.h b/lib/drivers/lwip/src/include/ipv4/lwip/ip_addr.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/ipv4/lwip/ip_addr.h rename to lib/drivers/lwip/src/include/ipv4/lwip/ip_addr.h diff --git a/reactos/lib/drivers/lwip/src/include/ipv4/lwip/ip_frag.h b/lib/drivers/lwip/src/include/ipv4/lwip/ip_frag.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/ipv4/lwip/ip_frag.h rename to lib/drivers/lwip/src/include/ipv4/lwip/ip_frag.h diff --git a/reactos/lib/drivers/lwip/src/include/ipv6/lwip/icmp.h b/lib/drivers/lwip/src/include/ipv6/lwip/icmp.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/ipv6/lwip/icmp.h rename to lib/drivers/lwip/src/include/ipv6/lwip/icmp.h diff --git a/reactos/lib/drivers/lwip/src/include/ipv6/lwip/inet.h b/lib/drivers/lwip/src/include/ipv6/lwip/inet.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/ipv6/lwip/inet.h rename to lib/drivers/lwip/src/include/ipv6/lwip/inet.h diff --git a/reactos/lib/drivers/lwip/src/include/ipv6/lwip/ip.h b/lib/drivers/lwip/src/include/ipv6/lwip/ip.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/ipv6/lwip/ip.h rename to lib/drivers/lwip/src/include/ipv6/lwip/ip.h diff --git a/reactos/lib/drivers/lwip/src/include/ipv6/lwip/ip_addr.h b/lib/drivers/lwip/src/include/ipv6/lwip/ip_addr.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/ipv6/lwip/ip_addr.h rename to lib/drivers/lwip/src/include/ipv6/lwip/ip_addr.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/api.h b/lib/drivers/lwip/src/include/lwip/api.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/api.h rename to lib/drivers/lwip/src/include/lwip/api.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/api_msg.h b/lib/drivers/lwip/src/include/lwip/api_msg.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/api_msg.h rename to lib/drivers/lwip/src/include/lwip/api_msg.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/arch.h b/lib/drivers/lwip/src/include/lwip/arch.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/arch.h rename to lib/drivers/lwip/src/include/lwip/arch.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/debug.h b/lib/drivers/lwip/src/include/lwip/debug.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/debug.h rename to lib/drivers/lwip/src/include/lwip/debug.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/def.h b/lib/drivers/lwip/src/include/lwip/def.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/def.h rename to lib/drivers/lwip/src/include/lwip/def.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/dhcp.h b/lib/drivers/lwip/src/include/lwip/dhcp.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/dhcp.h rename to lib/drivers/lwip/src/include/lwip/dhcp.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/dns.h b/lib/drivers/lwip/src/include/lwip/dns.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/dns.h rename to lib/drivers/lwip/src/include/lwip/dns.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/err.h b/lib/drivers/lwip/src/include/lwip/err.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/err.h rename to lib/drivers/lwip/src/include/lwip/err.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/init.h b/lib/drivers/lwip/src/include/lwip/init.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/init.h rename to lib/drivers/lwip/src/include/lwip/init.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/mem.h b/lib/drivers/lwip/src/include/lwip/mem.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/mem.h rename to lib/drivers/lwip/src/include/lwip/mem.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/memp.h b/lib/drivers/lwip/src/include/lwip/memp.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/memp.h rename to lib/drivers/lwip/src/include/lwip/memp.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/memp_std.h b/lib/drivers/lwip/src/include/lwip/memp_std.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/memp_std.h rename to lib/drivers/lwip/src/include/lwip/memp_std.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/netbuf.h b/lib/drivers/lwip/src/include/lwip/netbuf.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/netbuf.h rename to lib/drivers/lwip/src/include/lwip/netbuf.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/netdb.h b/lib/drivers/lwip/src/include/lwip/netdb.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/netdb.h rename to lib/drivers/lwip/src/include/lwip/netdb.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/netif.h b/lib/drivers/lwip/src/include/lwip/netif.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/netif.h rename to lib/drivers/lwip/src/include/lwip/netif.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/netifapi.h b/lib/drivers/lwip/src/include/lwip/netifapi.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/netifapi.h rename to lib/drivers/lwip/src/include/lwip/netifapi.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/opt.h b/lib/drivers/lwip/src/include/lwip/opt.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/opt.h rename to lib/drivers/lwip/src/include/lwip/opt.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/pbuf.h b/lib/drivers/lwip/src/include/lwip/pbuf.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/pbuf.h rename to lib/drivers/lwip/src/include/lwip/pbuf.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/raw.h b/lib/drivers/lwip/src/include/lwip/raw.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/raw.h rename to lib/drivers/lwip/src/include/lwip/raw.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/sio.h b/lib/drivers/lwip/src/include/lwip/sio.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/sio.h rename to lib/drivers/lwip/src/include/lwip/sio.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/snmp.h b/lib/drivers/lwip/src/include/lwip/snmp.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/snmp.h rename to lib/drivers/lwip/src/include/lwip/snmp.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/snmp_asn1.h b/lib/drivers/lwip/src/include/lwip/snmp_asn1.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/snmp_asn1.h rename to lib/drivers/lwip/src/include/lwip/snmp_asn1.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/snmp_msg.h b/lib/drivers/lwip/src/include/lwip/snmp_msg.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/snmp_msg.h rename to lib/drivers/lwip/src/include/lwip/snmp_msg.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/snmp_structs.h b/lib/drivers/lwip/src/include/lwip/snmp_structs.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/snmp_structs.h rename to lib/drivers/lwip/src/include/lwip/snmp_structs.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/sockets.h b/lib/drivers/lwip/src/include/lwip/sockets.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/sockets.h rename to lib/drivers/lwip/src/include/lwip/sockets.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/stats.h b/lib/drivers/lwip/src/include/lwip/stats.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/stats.h rename to lib/drivers/lwip/src/include/lwip/stats.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/sys.h b/lib/drivers/lwip/src/include/lwip/sys.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/sys.h rename to lib/drivers/lwip/src/include/lwip/sys.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/tcp.h b/lib/drivers/lwip/src/include/lwip/tcp.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/tcp.h rename to lib/drivers/lwip/src/include/lwip/tcp.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/tcp_impl.h b/lib/drivers/lwip/src/include/lwip/tcp_impl.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/tcp_impl.h rename to lib/drivers/lwip/src/include/lwip/tcp_impl.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/tcpip.h b/lib/drivers/lwip/src/include/lwip/tcpip.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/tcpip.h rename to lib/drivers/lwip/src/include/lwip/tcpip.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/timers.h b/lib/drivers/lwip/src/include/lwip/timers.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/timers.h rename to lib/drivers/lwip/src/include/lwip/timers.h diff --git a/reactos/lib/drivers/lwip/src/include/lwip/udp.h b/lib/drivers/lwip/src/include/lwip/udp.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwip/udp.h rename to lib/drivers/lwip/src/include/lwip/udp.h diff --git a/reactos/lib/drivers/lwip/src/include/lwipopts.h b/lib/drivers/lwip/src/include/lwipopts.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/lwipopts.h rename to lib/drivers/lwip/src/include/lwipopts.h diff --git a/reactos/lib/drivers/lwip/src/include/netif/etharp.h b/lib/drivers/lwip/src/include/netif/etharp.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/netif/etharp.h rename to lib/drivers/lwip/src/include/netif/etharp.h diff --git a/reactos/lib/drivers/lwip/src/include/netif/loopif.h b/lib/drivers/lwip/src/include/netif/loopif.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/netif/loopif.h rename to lib/drivers/lwip/src/include/netif/loopif.h diff --git a/reactos/lib/drivers/lwip/src/include/netif/ppp_oe.h b/lib/drivers/lwip/src/include/netif/ppp_oe.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/netif/ppp_oe.h rename to lib/drivers/lwip/src/include/netif/ppp_oe.h diff --git a/reactos/lib/drivers/lwip/src/include/netif/slipif.h b/lib/drivers/lwip/src/include/netif/slipif.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/netif/slipif.h rename to lib/drivers/lwip/src/include/netif/slipif.h diff --git a/reactos/lib/drivers/lwip/src/include/rosip.h b/lib/drivers/lwip/src/include/rosip.h similarity index 100% rename from reactos/lib/drivers/lwip/src/include/rosip.h rename to lib/drivers/lwip/src/include/rosip.h diff --git a/reactos/lib/drivers/lwip/src/netif/FILES b/lib/drivers/lwip/src/netif/FILES similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/FILES rename to lib/drivers/lwip/src/netif/FILES diff --git a/reactos/lib/drivers/lwip/src/netif/etharp.c b/lib/drivers/lwip/src/netif/etharp.c similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/etharp.c rename to lib/drivers/lwip/src/netif/etharp.c diff --git a/reactos/lib/drivers/lwip/src/netif/ethernetif.c b/lib/drivers/lwip/src/netif/ethernetif.c similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ethernetif.c rename to lib/drivers/lwip/src/netif/ethernetif.c diff --git a/reactos/lib/drivers/lwip/src/netif/loopif.c b/lib/drivers/lwip/src/netif/loopif.c similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/loopif.c rename to lib/drivers/lwip/src/netif/loopif.c diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/auth.c b/lib/drivers/lwip/src/netif/ppp/auth.c similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/auth.c rename to lib/drivers/lwip/src/netif/ppp/auth.c diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/auth.h b/lib/drivers/lwip/src/netif/ppp/auth.h similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/auth.h rename to lib/drivers/lwip/src/netif/ppp/auth.h diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/chap.c b/lib/drivers/lwip/src/netif/ppp/chap.c similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/chap.c rename to lib/drivers/lwip/src/netif/ppp/chap.c diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/chap.h b/lib/drivers/lwip/src/netif/ppp/chap.h similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/chap.h rename to lib/drivers/lwip/src/netif/ppp/chap.h diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/chpms.c b/lib/drivers/lwip/src/netif/ppp/chpms.c similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/chpms.c rename to lib/drivers/lwip/src/netif/ppp/chpms.c diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/chpms.h b/lib/drivers/lwip/src/netif/ppp/chpms.h similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/chpms.h rename to lib/drivers/lwip/src/netif/ppp/chpms.h diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/fsm.c b/lib/drivers/lwip/src/netif/ppp/fsm.c similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/fsm.c rename to lib/drivers/lwip/src/netif/ppp/fsm.c diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/fsm.h b/lib/drivers/lwip/src/netif/ppp/fsm.h similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/fsm.h rename to lib/drivers/lwip/src/netif/ppp/fsm.h diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/ipcp.c b/lib/drivers/lwip/src/netif/ppp/ipcp.c similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/ipcp.c rename to lib/drivers/lwip/src/netif/ppp/ipcp.c diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/ipcp.h b/lib/drivers/lwip/src/netif/ppp/ipcp.h similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/ipcp.h rename to lib/drivers/lwip/src/netif/ppp/ipcp.h diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/lcp.c b/lib/drivers/lwip/src/netif/ppp/lcp.c similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/lcp.c rename to lib/drivers/lwip/src/netif/ppp/lcp.c diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/lcp.h b/lib/drivers/lwip/src/netif/ppp/lcp.h similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/lcp.h rename to lib/drivers/lwip/src/netif/ppp/lcp.h diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/magic.c b/lib/drivers/lwip/src/netif/ppp/magic.c similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/magic.c rename to lib/drivers/lwip/src/netif/ppp/magic.c diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/magic.h b/lib/drivers/lwip/src/netif/ppp/magic.h similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/magic.h rename to lib/drivers/lwip/src/netif/ppp/magic.h diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/md5.c b/lib/drivers/lwip/src/netif/ppp/md5.c similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/md5.c rename to lib/drivers/lwip/src/netif/ppp/md5.c diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/md5.h b/lib/drivers/lwip/src/netif/ppp/md5.h similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/md5.h rename to lib/drivers/lwip/src/netif/ppp/md5.h diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/pap.c b/lib/drivers/lwip/src/netif/ppp/pap.c similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/pap.c rename to lib/drivers/lwip/src/netif/ppp/pap.c diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/pap.h b/lib/drivers/lwip/src/netif/ppp/pap.h similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/pap.h rename to lib/drivers/lwip/src/netif/ppp/pap.h diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/ppp.c b/lib/drivers/lwip/src/netif/ppp/ppp.c similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/ppp.c rename to lib/drivers/lwip/src/netif/ppp/ppp.c diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/ppp.h b/lib/drivers/lwip/src/netif/ppp/ppp.h similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/ppp.h rename to lib/drivers/lwip/src/netif/ppp/ppp.h diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/ppp_oe.c b/lib/drivers/lwip/src/netif/ppp/ppp_oe.c similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/ppp_oe.c rename to lib/drivers/lwip/src/netif/ppp/ppp_oe.c diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/pppdebug.h b/lib/drivers/lwip/src/netif/ppp/pppdebug.h similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/pppdebug.h rename to lib/drivers/lwip/src/netif/ppp/pppdebug.h diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/randm.c b/lib/drivers/lwip/src/netif/ppp/randm.c similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/randm.c rename to lib/drivers/lwip/src/netif/ppp/randm.c diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/randm.h b/lib/drivers/lwip/src/netif/ppp/randm.h similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/randm.h rename to lib/drivers/lwip/src/netif/ppp/randm.h diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/vj.c b/lib/drivers/lwip/src/netif/ppp/vj.c similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/vj.c rename to lib/drivers/lwip/src/netif/ppp/vj.c diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/vj.h b/lib/drivers/lwip/src/netif/ppp/vj.h similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/vj.h rename to lib/drivers/lwip/src/netif/ppp/vj.h diff --git a/reactos/lib/drivers/lwip/src/netif/ppp/vjbsdhdr.h b/lib/drivers/lwip/src/netif/ppp/vjbsdhdr.h similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/ppp/vjbsdhdr.h rename to lib/drivers/lwip/src/netif/ppp/vjbsdhdr.h diff --git a/reactos/lib/drivers/lwip/src/netif/slipif.c b/lib/drivers/lwip/src/netif/slipif.c similarity index 100% rename from reactos/lib/drivers/lwip/src/netif/slipif.c rename to lib/drivers/lwip/src/netif/slipif.c diff --git a/reactos/lib/drivers/lwip/src/rosip.c b/lib/drivers/lwip/src/rosip.c similarity index 100% rename from reactos/lib/drivers/lwip/src/rosip.c rename to lib/drivers/lwip/src/rosip.c diff --git a/reactos/lib/drivers/lwip/src/rosmem.c b/lib/drivers/lwip/src/rosmem.c similarity index 100% rename from reactos/lib/drivers/lwip/src/rosmem.c rename to lib/drivers/lwip/src/rosmem.c diff --git a/reactos/lib/drivers/lwip/src/rostcp.c b/lib/drivers/lwip/src/rostcp.c similarity index 100% rename from reactos/lib/drivers/lwip/src/rostcp.c rename to lib/drivers/lwip/src/rostcp.c diff --git a/reactos/lib/drivers/lwip/src/sys_arch.c b/lib/drivers/lwip/src/sys_arch.c similarity index 100% rename from reactos/lib/drivers/lwip/src/sys_arch.c rename to lib/drivers/lwip/src/sys_arch.c diff --git a/reactos/lib/drivers/lwip/test/unit/lwip_check.h b/lib/drivers/lwip/test/unit/lwip_check.h similarity index 100% rename from reactos/lib/drivers/lwip/test/unit/lwip_check.h rename to lib/drivers/lwip/test/unit/lwip_check.h diff --git a/reactos/lib/drivers/lwip/test/unit/lwip_unittests.c b/lib/drivers/lwip/test/unit/lwip_unittests.c similarity index 100% rename from reactos/lib/drivers/lwip/test/unit/lwip_unittests.c rename to lib/drivers/lwip/test/unit/lwip_unittests.c diff --git a/reactos/lib/drivers/lwip/test/unit/tcp/tcp_helper.c b/lib/drivers/lwip/test/unit/tcp/tcp_helper.c similarity index 100% rename from reactos/lib/drivers/lwip/test/unit/tcp/tcp_helper.c rename to lib/drivers/lwip/test/unit/tcp/tcp_helper.c diff --git a/reactos/lib/drivers/lwip/test/unit/tcp/tcp_helper.h b/lib/drivers/lwip/test/unit/tcp/tcp_helper.h similarity index 100% rename from reactos/lib/drivers/lwip/test/unit/tcp/tcp_helper.h rename to lib/drivers/lwip/test/unit/tcp/tcp_helper.h diff --git a/reactos/lib/drivers/lwip/test/unit/tcp/test_tcp.c b/lib/drivers/lwip/test/unit/tcp/test_tcp.c similarity index 100% rename from reactos/lib/drivers/lwip/test/unit/tcp/test_tcp.c rename to lib/drivers/lwip/test/unit/tcp/test_tcp.c diff --git a/reactos/lib/drivers/lwip/test/unit/tcp/test_tcp.h b/lib/drivers/lwip/test/unit/tcp/test_tcp.h similarity index 100% rename from reactos/lib/drivers/lwip/test/unit/tcp/test_tcp.h rename to lib/drivers/lwip/test/unit/tcp/test_tcp.h diff --git a/reactos/lib/drivers/lwip/test/unit/tcp/test_tcp_oos.c b/lib/drivers/lwip/test/unit/tcp/test_tcp_oos.c similarity index 100% rename from reactos/lib/drivers/lwip/test/unit/tcp/test_tcp_oos.c rename to lib/drivers/lwip/test/unit/tcp/test_tcp_oos.c diff --git a/reactos/lib/drivers/lwip/test/unit/tcp/test_tcp_oos.h b/lib/drivers/lwip/test/unit/tcp/test_tcp_oos.h similarity index 100% rename from reactos/lib/drivers/lwip/test/unit/tcp/test_tcp_oos.h rename to lib/drivers/lwip/test/unit/tcp/test_tcp_oos.h diff --git a/reactos/lib/drivers/lwip/test/unit/udp/test_udp.c b/lib/drivers/lwip/test/unit/udp/test_udp.c similarity index 100% rename from reactos/lib/drivers/lwip/test/unit/udp/test_udp.c rename to lib/drivers/lwip/test/unit/udp/test_udp.c diff --git a/reactos/lib/drivers/lwip/test/unit/udp/test_udp.h b/lib/drivers/lwip/test/unit/udp/test_udp.h similarity index 100% rename from reactos/lib/drivers/lwip/test/unit/udp/test_udp.h rename to lib/drivers/lwip/test/unit/udp/test_udp.h diff --git a/reactos/lib/drivers/sound/CMakeLists.txt b/lib/drivers/sound/CMakeLists.txt similarity index 100% rename from reactos/lib/drivers/sound/CMakeLists.txt rename to lib/drivers/sound/CMakeLists.txt diff --git a/reactos/lib/drivers/sound/legacy/CMakeLists.txt b/lib/drivers/sound/legacy/CMakeLists.txt similarity index 100% rename from reactos/lib/drivers/sound/legacy/CMakeLists.txt rename to lib/drivers/sound/legacy/CMakeLists.txt diff --git a/reactos/lib/drivers/sound/legacy/devname.c b/lib/drivers/sound/legacy/devname.c similarity index 100% rename from reactos/lib/drivers/sound/legacy/devname.c rename to lib/drivers/sound/legacy/devname.c diff --git a/reactos/lib/drivers/sound/legacy/hardware.c b/lib/drivers/sound/legacy/hardware.c similarity index 100% rename from reactos/lib/drivers/sound/legacy/hardware.c rename to lib/drivers/sound/legacy/hardware.c diff --git a/reactos/lib/drivers/sound/legacy/legacy.rbuild b/lib/drivers/sound/legacy/legacy.rbuild similarity index 100% rename from reactos/lib/drivers/sound/legacy/legacy.rbuild rename to lib/drivers/sound/legacy/legacy.rbuild diff --git a/reactos/lib/drivers/sound/mmebuddy/CMakeLists.txt b/lib/drivers/sound/mmebuddy/CMakeLists.txt similarity index 100% rename from reactos/lib/drivers/sound/mmebuddy/CMakeLists.txt rename to lib/drivers/sound/mmebuddy/CMakeLists.txt diff --git a/reactos/lib/drivers/sound/mmebuddy/auxiliary/auxMessage.c b/lib/drivers/sound/mmebuddy/auxiliary/auxMessage.c similarity index 100% rename from reactos/lib/drivers/sound/mmebuddy/auxiliary/auxMessage.c rename to lib/drivers/sound/mmebuddy/auxiliary/auxMessage.c diff --git a/reactos/lib/drivers/sound/mmebuddy/capabilities.c b/lib/drivers/sound/mmebuddy/capabilities.c similarity index 100% rename from reactos/lib/drivers/sound/mmebuddy/capabilities.c rename to lib/drivers/sound/mmebuddy/capabilities.c diff --git a/reactos/lib/drivers/sound/mmebuddy/deviceinstance.c b/lib/drivers/sound/mmebuddy/deviceinstance.c similarity index 100% rename from reactos/lib/drivers/sound/mmebuddy/deviceinstance.c rename to lib/drivers/sound/mmebuddy/deviceinstance.c diff --git a/reactos/lib/drivers/sound/mmebuddy/devicelist.c b/lib/drivers/sound/mmebuddy/devicelist.c similarity index 100% rename from reactos/lib/drivers/sound/mmebuddy/devicelist.c rename to lib/drivers/sound/mmebuddy/devicelist.c diff --git a/reactos/lib/drivers/sound/mmebuddy/functiontable.c b/lib/drivers/sound/mmebuddy/functiontable.c similarity index 100% rename from reactos/lib/drivers/sound/mmebuddy/functiontable.c rename to lib/drivers/sound/mmebuddy/functiontable.c diff --git a/reactos/lib/drivers/sound/mmebuddy/kernel.c b/lib/drivers/sound/mmebuddy/kernel.c similarity index 100% rename from reactos/lib/drivers/sound/mmebuddy/kernel.c rename to lib/drivers/sound/mmebuddy/kernel.c diff --git a/reactos/lib/drivers/sound/mmebuddy/midi/midMessage.c b/lib/drivers/sound/mmebuddy/midi/midMessage.c similarity index 100% rename from reactos/lib/drivers/sound/mmebuddy/midi/midMessage.c rename to lib/drivers/sound/mmebuddy/midi/midMessage.c diff --git a/reactos/lib/drivers/sound/mmebuddy/midi/modMessage.c b/lib/drivers/sound/mmebuddy/midi/modMessage.c similarity index 100% rename from reactos/lib/drivers/sound/mmebuddy/midi/modMessage.c rename to lib/drivers/sound/mmebuddy/midi/modMessage.c diff --git a/reactos/lib/drivers/sound/mmebuddy/mixer/mxdMessage.c b/lib/drivers/sound/mmebuddy/mixer/mxdMessage.c similarity index 100% rename from reactos/lib/drivers/sound/mmebuddy/mixer/mxdMessage.c rename to lib/drivers/sound/mmebuddy/mixer/mxdMessage.c diff --git a/reactos/lib/drivers/sound/mmebuddy/mmebuddy.rbuild b/lib/drivers/sound/mmebuddy/mmebuddy.rbuild similarity index 100% rename from reactos/lib/drivers/sound/mmebuddy/mmebuddy.rbuild rename to lib/drivers/sound/mmebuddy/mmebuddy.rbuild diff --git a/reactos/lib/drivers/sound/mmebuddy/mmewrap.c b/lib/drivers/sound/mmebuddy/mmewrap.c similarity index 100% rename from reactos/lib/drivers/sound/mmebuddy/mmewrap.c rename to lib/drivers/sound/mmebuddy/mmewrap.c diff --git a/reactos/lib/drivers/sound/mmebuddy/precomp.h b/lib/drivers/sound/mmebuddy/precomp.h similarity index 100% rename from reactos/lib/drivers/sound/mmebuddy/precomp.h rename to lib/drivers/sound/mmebuddy/precomp.h diff --git a/reactos/lib/drivers/sound/mmebuddy/readme.txt b/lib/drivers/sound/mmebuddy/readme.txt similarity index 100% rename from reactos/lib/drivers/sound/mmebuddy/readme.txt rename to lib/drivers/sound/mmebuddy/readme.txt diff --git a/reactos/lib/drivers/sound/mmebuddy/reentrancy.c b/lib/drivers/sound/mmebuddy/reentrancy.c similarity index 100% rename from reactos/lib/drivers/sound/mmebuddy/reentrancy.c rename to lib/drivers/sound/mmebuddy/reentrancy.c diff --git a/reactos/lib/drivers/sound/mmebuddy/thread.c b/lib/drivers/sound/mmebuddy/thread.c similarity index 100% rename from reactos/lib/drivers/sound/mmebuddy/thread.c rename to lib/drivers/sound/mmebuddy/thread.c diff --git a/reactos/lib/drivers/sound/mmebuddy/utility.c b/lib/drivers/sound/mmebuddy/utility.c similarity index 100% rename from reactos/lib/drivers/sound/mmebuddy/utility.c rename to lib/drivers/sound/mmebuddy/utility.c diff --git a/reactos/lib/drivers/sound/mmebuddy/wave/format.c b/lib/drivers/sound/mmebuddy/wave/format.c similarity index 100% rename from reactos/lib/drivers/sound/mmebuddy/wave/format.c rename to lib/drivers/sound/mmebuddy/wave/format.c diff --git a/reactos/lib/drivers/sound/mmebuddy/wave/header.c b/lib/drivers/sound/mmebuddy/wave/header.c similarity index 100% rename from reactos/lib/drivers/sound/mmebuddy/wave/header.c rename to lib/drivers/sound/mmebuddy/wave/header.c diff --git a/reactos/lib/drivers/sound/mmebuddy/wave/streaming.c b/lib/drivers/sound/mmebuddy/wave/streaming.c similarity index 100% rename from reactos/lib/drivers/sound/mmebuddy/wave/streaming.c rename to lib/drivers/sound/mmebuddy/wave/streaming.c diff --git a/reactos/lib/drivers/sound/mmebuddy/wave/widMessage.c b/lib/drivers/sound/mmebuddy/wave/widMessage.c similarity index 100% rename from reactos/lib/drivers/sound/mmebuddy/wave/widMessage.c rename to lib/drivers/sound/mmebuddy/wave/widMessage.c diff --git a/reactos/lib/drivers/sound/mmebuddy/wave/wodMessage.c b/lib/drivers/sound/mmebuddy/wave/wodMessage.c similarity index 100% rename from reactos/lib/drivers/sound/mmebuddy/wave/wodMessage.c rename to lib/drivers/sound/mmebuddy/wave/wodMessage.c diff --git a/reactos/lib/drivers/sound/mment4/CMakeLists.txt b/lib/drivers/sound/mment4/CMakeLists.txt similarity index 100% rename from reactos/lib/drivers/sound/mment4/CMakeLists.txt rename to lib/drivers/sound/mment4/CMakeLists.txt diff --git a/reactos/lib/drivers/sound/mment4/control.c b/lib/drivers/sound/mment4/control.c similarity index 100% rename from reactos/lib/drivers/sound/mment4/control.c rename to lib/drivers/sound/mment4/control.c diff --git a/reactos/lib/drivers/sound/mment4/detect.c b/lib/drivers/sound/mment4/detect.c similarity index 100% rename from reactos/lib/drivers/sound/mment4/detect.c rename to lib/drivers/sound/mment4/detect.c diff --git a/reactos/lib/drivers/sound/mment4/mment4.rbuild b/lib/drivers/sound/mment4/mment4.rbuild similarity index 100% rename from reactos/lib/drivers/sound/mment4/mment4.rbuild rename to lib/drivers/sound/mment4/mment4.rbuild diff --git a/reactos/lib/drivers/sound/mment4/precomp.h b/lib/drivers/sound/mment4/precomp.h similarity index 100% rename from reactos/lib/drivers/sound/mment4/precomp.h rename to lib/drivers/sound/mment4/precomp.h diff --git a/reactos/lib/drivers/sound/mment4/registry.c b/lib/drivers/sound/mment4/registry.c similarity index 100% rename from reactos/lib/drivers/sound/mment4/registry.c rename to lib/drivers/sound/mment4/registry.c diff --git a/reactos/lib/drivers/sound/mmixer/CMakeLists.txt b/lib/drivers/sound/mmixer/CMakeLists.txt similarity index 100% rename from reactos/lib/drivers/sound/mmixer/CMakeLists.txt rename to lib/drivers/sound/mmixer/CMakeLists.txt diff --git a/reactos/lib/drivers/sound/mmixer/TODO b/lib/drivers/sound/mmixer/TODO similarity index 100% rename from reactos/lib/drivers/sound/mmixer/TODO rename to lib/drivers/sound/mmixer/TODO diff --git a/reactos/lib/drivers/sound/mmixer/controls.c b/lib/drivers/sound/mmixer/controls.c similarity index 100% rename from reactos/lib/drivers/sound/mmixer/controls.c rename to lib/drivers/sound/mmixer/controls.c diff --git a/reactos/lib/drivers/sound/mmixer/filter.c b/lib/drivers/sound/mmixer/filter.c similarity index 100% rename from reactos/lib/drivers/sound/mmixer/filter.c rename to lib/drivers/sound/mmixer/filter.c diff --git a/reactos/lib/drivers/sound/mmixer/midi.c b/lib/drivers/sound/mmixer/midi.c similarity index 100% rename from reactos/lib/drivers/sound/mmixer/midi.c rename to lib/drivers/sound/mmixer/midi.c diff --git a/reactos/lib/drivers/sound/mmixer/mixer.c b/lib/drivers/sound/mmixer/mixer.c similarity index 100% rename from reactos/lib/drivers/sound/mmixer/mixer.c rename to lib/drivers/sound/mmixer/mixer.c diff --git a/reactos/lib/drivers/sound/mmixer/mmixer.h b/lib/drivers/sound/mmixer/mmixer.h similarity index 100% rename from reactos/lib/drivers/sound/mmixer/mmixer.h rename to lib/drivers/sound/mmixer/mmixer.h diff --git a/reactos/lib/drivers/sound/mmixer/mmixer.rbuild b/lib/drivers/sound/mmixer/mmixer.rbuild similarity index 100% rename from reactos/lib/drivers/sound/mmixer/mmixer.rbuild rename to lib/drivers/sound/mmixer/mmixer.rbuild diff --git a/reactos/lib/drivers/sound/mmixer/priv.h b/lib/drivers/sound/mmixer/priv.h similarity index 100% rename from reactos/lib/drivers/sound/mmixer/priv.h rename to lib/drivers/sound/mmixer/priv.h diff --git a/reactos/lib/drivers/sound/mmixer/sup.c b/lib/drivers/sound/mmixer/sup.c similarity index 100% rename from reactos/lib/drivers/sound/mmixer/sup.c rename to lib/drivers/sound/mmixer/sup.c diff --git a/reactos/lib/drivers/sound/mmixer/topology.c b/lib/drivers/sound/mmixer/topology.c similarity index 100% rename from reactos/lib/drivers/sound/mmixer/topology.c rename to lib/drivers/sound/mmixer/topology.c diff --git a/reactos/lib/drivers/sound/mmixer/wave.c b/lib/drivers/sound/mmixer/wave.c similarity index 100% rename from reactos/lib/drivers/sound/mmixer/wave.c rename to lib/drivers/sound/mmixer/wave.c diff --git a/reactos/lib/drivers/sound/shared/CMakeLists.txt b/lib/drivers/sound/shared/CMakeLists.txt similarity index 100% rename from reactos/lib/drivers/sound/shared/CMakeLists.txt rename to lib/drivers/sound/shared/CMakeLists.txt diff --git a/reactos/lib/drivers/sound/shared/shared.rbuild b/lib/drivers/sound/shared/shared.rbuild similarity index 100% rename from reactos/lib/drivers/sound/shared/shared.rbuild rename to lib/drivers/sound/shared/shared.rbuild diff --git a/reactos/lib/drivers/sound/shared/time.c b/lib/drivers/sound/shared/time.c similarity index 100% rename from reactos/lib/drivers/sound/shared/time.c rename to lib/drivers/sound/shared/time.c diff --git a/reactos/lib/drivers/sound/sound.rbuild b/lib/drivers/sound/sound.rbuild similarity index 100% rename from reactos/lib/drivers/sound/sound.rbuild rename to lib/drivers/sound/sound.rbuild diff --git a/reactos/lib/drivers/sound/soundblaster/CMakeLists.txt b/lib/drivers/sound/soundblaster/CMakeLists.txt similarity index 100% rename from reactos/lib/drivers/sound/soundblaster/CMakeLists.txt rename to lib/drivers/sound/soundblaster/CMakeLists.txt diff --git a/reactos/lib/drivers/sound/soundblaster/dsp_io.c b/lib/drivers/sound/soundblaster/dsp_io.c similarity index 100% rename from reactos/lib/drivers/sound/soundblaster/dsp_io.c rename to lib/drivers/sound/soundblaster/dsp_io.c diff --git a/reactos/lib/drivers/sound/soundblaster/mixer.c b/lib/drivers/sound/soundblaster/mixer.c similarity index 100% rename from reactos/lib/drivers/sound/soundblaster/mixer.c rename to lib/drivers/sound/soundblaster/mixer.c diff --git a/reactos/lib/drivers/sound/soundblaster/precomp.h b/lib/drivers/sound/soundblaster/precomp.h similarity index 100% rename from reactos/lib/drivers/sound/soundblaster/precomp.h rename to lib/drivers/sound/soundblaster/precomp.h diff --git a/reactos/lib/drivers/sound/soundblaster/rate.c b/lib/drivers/sound/soundblaster/rate.c similarity index 100% rename from reactos/lib/drivers/sound/soundblaster/rate.c rename to lib/drivers/sound/soundblaster/rate.c diff --git a/reactos/lib/drivers/sound/soundblaster/soundblaster.rbuild b/lib/drivers/sound/soundblaster/soundblaster.rbuild similarity index 100% rename from reactos/lib/drivers/sound/soundblaster/soundblaster.rbuild rename to lib/drivers/sound/soundblaster/soundblaster.rbuild diff --git a/reactos/lib/drivers/sound/soundblaster/speaker.c b/lib/drivers/sound/soundblaster/speaker.c similarity index 100% rename from reactos/lib/drivers/sound/soundblaster/speaker.c rename to lib/drivers/sound/soundblaster/speaker.c diff --git a/reactos/lib/drivers/sound/soundblaster/version.c b/lib/drivers/sound/soundblaster/version.c similarity index 100% rename from reactos/lib/drivers/sound/soundblaster/version.c rename to lib/drivers/sound/soundblaster/version.c diff --git a/reactos/lib/drivers/sound/uartmidi/CMakeLists.txt b/lib/drivers/sound/uartmidi/CMakeLists.txt similarity index 100% rename from reactos/lib/drivers/sound/uartmidi/CMakeLists.txt rename to lib/drivers/sound/uartmidi/CMakeLists.txt diff --git a/reactos/lib/drivers/sound/uartmidi/midiuart.c b/lib/drivers/sound/uartmidi/midiuart.c similarity index 100% rename from reactos/lib/drivers/sound/uartmidi/midiuart.c rename to lib/drivers/sound/uartmidi/midiuart.c diff --git a/reactos/lib/drivers/sound/uartmidi/uartmidi.rbuild b/lib/drivers/sound/uartmidi/uartmidi.rbuild similarity index 100% rename from reactos/lib/drivers/sound/uartmidi/uartmidi.rbuild rename to lib/drivers/sound/uartmidi/uartmidi.rbuild diff --git a/reactos/lib/epsapi/CMakeLists.txt b/lib/epsapi/CMakeLists.txt similarity index 100% rename from reactos/lib/epsapi/CMakeLists.txt rename to lib/epsapi/CMakeLists.txt diff --git a/reactos/lib/epsapi/enum/drivers.c b/lib/epsapi/enum/drivers.c similarity index 100% rename from reactos/lib/epsapi/enum/drivers.c rename to lib/epsapi/enum/drivers.c diff --git a/reactos/lib/epsapi/enum/modules.c b/lib/epsapi/enum/modules.c similarity index 100% rename from reactos/lib/epsapi/enum/modules.c rename to lib/epsapi/enum/modules.c diff --git a/reactos/lib/epsapi/enum/precomp.h b/lib/epsapi/enum/precomp.h similarity index 100% rename from reactos/lib/epsapi/enum/precomp.h rename to lib/epsapi/enum/precomp.h diff --git a/reactos/lib/epsapi/enum/processes.c b/lib/epsapi/enum/processes.c similarity index 100% rename from reactos/lib/epsapi/enum/processes.c rename to lib/epsapi/enum/processes.c diff --git a/reactos/lib/epsapi/epsapi.rbuild b/lib/epsapi/epsapi.rbuild similarity index 100% rename from reactos/lib/epsapi/epsapi.rbuild rename to lib/epsapi/epsapi.rbuild diff --git a/reactos/lib/fslib/CMakeLists.txt b/lib/fslib/CMakeLists.txt similarity index 100% rename from reactos/lib/fslib/CMakeLists.txt rename to lib/fslib/CMakeLists.txt diff --git a/reactos/lib/fslib/directory.rbuild b/lib/fslib/directory.rbuild similarity index 100% rename from reactos/lib/fslib/directory.rbuild rename to lib/fslib/directory.rbuild diff --git a/reactos/lib/fslib/ext2lib/Badblock.c b/lib/fslib/ext2lib/Badblock.c similarity index 100% rename from reactos/lib/fslib/ext2lib/Badblock.c rename to lib/fslib/ext2lib/Badblock.c diff --git a/reactos/lib/fslib/ext2lib/Bitmap.c b/lib/fslib/ext2lib/Bitmap.c similarity index 100% rename from reactos/lib/fslib/ext2lib/Bitmap.c rename to lib/fslib/ext2lib/Bitmap.c diff --git a/reactos/lib/fslib/ext2lib/Bitmap.h b/lib/fslib/ext2lib/Bitmap.h similarity index 100% rename from reactos/lib/fslib/ext2lib/Bitmap.h rename to lib/fslib/ext2lib/Bitmap.h diff --git a/reactos/lib/fslib/ext2lib/CMakeLists.txt b/lib/fslib/ext2lib/CMakeLists.txt similarity index 100% rename from reactos/lib/fslib/ext2lib/CMakeLists.txt rename to lib/fslib/ext2lib/CMakeLists.txt diff --git a/reactos/lib/fslib/ext2lib/Disk.c b/lib/fslib/ext2lib/Disk.c similarity index 100% rename from reactos/lib/fslib/ext2lib/Disk.c rename to lib/fslib/ext2lib/Disk.c diff --git a/reactos/lib/fslib/ext2lib/Disk.h b/lib/fslib/ext2lib/Disk.h similarity index 100% rename from reactos/lib/fslib/ext2lib/Disk.h rename to lib/fslib/ext2lib/Disk.h diff --git a/reactos/lib/fslib/ext2lib/Group.c b/lib/fslib/ext2lib/Group.c similarity index 100% rename from reactos/lib/fslib/ext2lib/Group.c rename to lib/fslib/ext2lib/Group.c diff --git a/reactos/lib/fslib/ext2lib/Inode.c b/lib/fslib/ext2lib/Inode.c similarity index 100% rename from reactos/lib/fslib/ext2lib/Inode.c rename to lib/fslib/ext2lib/Inode.c diff --git a/reactos/lib/fslib/ext2lib/Memory.c b/lib/fslib/ext2lib/Memory.c similarity index 100% rename from reactos/lib/fslib/ext2lib/Memory.c rename to lib/fslib/ext2lib/Memory.c diff --git a/reactos/lib/fslib/ext2lib/Mke2fs.c b/lib/fslib/ext2lib/Mke2fs.c similarity index 100% rename from reactos/lib/fslib/ext2lib/Mke2fs.c rename to lib/fslib/ext2lib/Mke2fs.c diff --git a/reactos/lib/fslib/ext2lib/Mke2fs.h b/lib/fslib/ext2lib/Mke2fs.h similarity index 100% rename from reactos/lib/fslib/ext2lib/Mke2fs.h rename to lib/fslib/ext2lib/Mke2fs.h diff --git a/reactos/lib/fslib/ext2lib/Super.c b/lib/fslib/ext2lib/Super.c similarity index 100% rename from reactos/lib/fslib/ext2lib/Super.c rename to lib/fslib/ext2lib/Super.c diff --git a/reactos/lib/fslib/ext2lib/Uuid.c b/lib/fslib/ext2lib/Uuid.c similarity index 100% rename from reactos/lib/fslib/ext2lib/Uuid.c rename to lib/fslib/ext2lib/Uuid.c diff --git a/reactos/lib/fslib/ext2lib/ext2_fs.h b/lib/fslib/ext2lib/ext2_fs.h similarity index 100% rename from reactos/lib/fslib/ext2lib/ext2_fs.h rename to lib/fslib/ext2lib/ext2_fs.h diff --git a/reactos/lib/fslib/ext2lib/ext2lib.rbuild b/lib/fslib/ext2lib/ext2lib.rbuild similarity index 100% rename from reactos/lib/fslib/ext2lib/ext2lib.rbuild rename to lib/fslib/ext2lib/ext2lib.rbuild diff --git a/reactos/lib/fslib/ext2lib/types.h b/lib/fslib/ext2lib/types.h similarity index 100% rename from reactos/lib/fslib/ext2lib/types.h rename to lib/fslib/ext2lib/types.h diff --git a/reactos/lib/fslib/ntfslib/CMakeLists.txt b/lib/fslib/ntfslib/CMakeLists.txt similarity index 100% rename from reactos/lib/fslib/ntfslib/CMakeLists.txt rename to lib/fslib/ntfslib/CMakeLists.txt diff --git a/reactos/lib/fslib/ntfslib/ntfslib.c b/lib/fslib/ntfslib/ntfslib.c similarity index 100% rename from reactos/lib/fslib/ntfslib/ntfslib.c rename to lib/fslib/ntfslib/ntfslib.c diff --git a/reactos/lib/fslib/ntfslib/ntfslib.h b/lib/fslib/ntfslib/ntfslib.h similarity index 100% rename from reactos/lib/fslib/ntfslib/ntfslib.h rename to lib/fslib/ntfslib/ntfslib.h diff --git a/reactos/lib/fslib/ntfslib/ntfslib.rbuild b/lib/fslib/ntfslib/ntfslib.rbuild similarity index 100% rename from reactos/lib/fslib/ntfslib/ntfslib.rbuild rename to lib/fslib/ntfslib/ntfslib.rbuild diff --git a/reactos/lib/fslib/vfatlib/CMakeLists.txt b/lib/fslib/vfatlib/CMakeLists.txt similarity index 100% rename from reactos/lib/fslib/vfatlib/CMakeLists.txt rename to lib/fslib/vfatlib/CMakeLists.txt diff --git a/reactos/lib/fslib/vfatlib/check/boot.c b/lib/fslib/vfatlib/check/boot.c similarity index 100% rename from reactos/lib/fslib/vfatlib/check/boot.c rename to lib/fslib/vfatlib/check/boot.c diff --git a/reactos/lib/fslib/vfatlib/check/boot.h b/lib/fslib/vfatlib/check/boot.h similarity index 100% rename from reactos/lib/fslib/vfatlib/check/boot.h rename to lib/fslib/vfatlib/check/boot.h diff --git a/reactos/lib/fslib/vfatlib/check/byteorder.h b/lib/fslib/vfatlib/check/byteorder.h similarity index 100% rename from reactos/lib/fslib/vfatlib/check/byteorder.h rename to lib/fslib/vfatlib/check/byteorder.h diff --git a/reactos/lib/fslib/vfatlib/check/byteswap.h b/lib/fslib/vfatlib/check/byteswap.h similarity index 100% rename from reactos/lib/fslib/vfatlib/check/byteswap.h rename to lib/fslib/vfatlib/check/byteswap.h diff --git a/reactos/lib/fslib/vfatlib/check/byteswap1.h b/lib/fslib/vfatlib/check/byteswap1.h similarity index 100% rename from reactos/lib/fslib/vfatlib/check/byteswap1.h rename to lib/fslib/vfatlib/check/byteswap1.h diff --git a/reactos/lib/fslib/vfatlib/check/check.c b/lib/fslib/vfatlib/check/check.c similarity index 100% rename from reactos/lib/fslib/vfatlib/check/check.c rename to lib/fslib/vfatlib/check/check.c diff --git a/reactos/lib/fslib/vfatlib/check/check.h b/lib/fslib/vfatlib/check/check.h similarity index 100% rename from reactos/lib/fslib/vfatlib/check/check.h rename to lib/fslib/vfatlib/check/check.h diff --git a/reactos/lib/fslib/vfatlib/check/common.c b/lib/fslib/vfatlib/check/common.c similarity index 100% rename from reactos/lib/fslib/vfatlib/check/common.c rename to lib/fslib/vfatlib/check/common.c diff --git a/reactos/lib/fslib/vfatlib/check/common.h b/lib/fslib/vfatlib/check/common.h similarity index 100% rename from reactos/lib/fslib/vfatlib/check/common.h rename to lib/fslib/vfatlib/check/common.h diff --git a/reactos/lib/fslib/vfatlib/check/compiler.h b/lib/fslib/vfatlib/check/compiler.h similarity index 100% rename from reactos/lib/fslib/vfatlib/check/compiler.h rename to lib/fslib/vfatlib/check/compiler.h diff --git a/reactos/lib/fslib/vfatlib/check/dosfsck.h b/lib/fslib/vfatlib/check/dosfsck.h similarity index 100% rename from reactos/lib/fslib/vfatlib/check/dosfsck.h rename to lib/fslib/vfatlib/check/dosfsck.h diff --git a/reactos/lib/fslib/vfatlib/check/fat.c b/lib/fslib/vfatlib/check/fat.c similarity index 100% rename from reactos/lib/fslib/vfatlib/check/fat.c rename to lib/fslib/vfatlib/check/fat.c diff --git a/reactos/lib/fslib/vfatlib/check/fat.h b/lib/fslib/vfatlib/check/fat.h similarity index 100% rename from reactos/lib/fslib/vfatlib/check/fat.h rename to lib/fslib/vfatlib/check/fat.h diff --git a/reactos/lib/fslib/vfatlib/check/file.c b/lib/fslib/vfatlib/check/file.c similarity index 100% rename from reactos/lib/fslib/vfatlib/check/file.c rename to lib/fslib/vfatlib/check/file.c diff --git a/reactos/lib/fslib/vfatlib/check/file.h b/lib/fslib/vfatlib/check/file.h similarity index 100% rename from reactos/lib/fslib/vfatlib/check/file.h rename to lib/fslib/vfatlib/check/file.h diff --git a/reactos/lib/fslib/vfatlib/check/io.c b/lib/fslib/vfatlib/check/io.c similarity index 100% rename from reactos/lib/fslib/vfatlib/check/io.c rename to lib/fslib/vfatlib/check/io.c diff --git a/reactos/lib/fslib/vfatlib/check/io.h b/lib/fslib/vfatlib/check/io.h similarity index 100% rename from reactos/lib/fslib/vfatlib/check/io.h rename to lib/fslib/vfatlib/check/io.h diff --git a/reactos/lib/fslib/vfatlib/check/lfn.c b/lib/fslib/vfatlib/check/lfn.c similarity index 100% rename from reactos/lib/fslib/vfatlib/check/lfn.c rename to lib/fslib/vfatlib/check/lfn.c diff --git a/reactos/lib/fslib/vfatlib/check/lfn.h b/lib/fslib/vfatlib/check/lfn.h similarity index 100% rename from reactos/lib/fslib/vfatlib/check/lfn.h rename to lib/fslib/vfatlib/check/lfn.h diff --git a/reactos/lib/fslib/vfatlib/check/msdos_fs.h b/lib/fslib/vfatlib/check/msdos_fs.h similarity index 100% rename from reactos/lib/fslib/vfatlib/check/msdos_fs.h rename to lib/fslib/vfatlib/check/msdos_fs.h diff --git a/reactos/lib/fslib/vfatlib/check/swab.h b/lib/fslib/vfatlib/check/swab.h similarity index 100% rename from reactos/lib/fslib/vfatlib/check/swab.h rename to lib/fslib/vfatlib/check/swab.h diff --git a/reactos/lib/fslib/vfatlib/check/version.h b/lib/fslib/vfatlib/check/version.h similarity index 100% rename from reactos/lib/fslib/vfatlib/check/version.h rename to lib/fslib/vfatlib/check/version.h diff --git a/reactos/lib/fslib/vfatlib/check/vfat.h b/lib/fslib/vfatlib/check/vfat.h similarity index 100% rename from reactos/lib/fslib/vfatlib/check/vfat.h rename to lib/fslib/vfatlib/check/vfat.h diff --git a/reactos/lib/fslib/vfatlib/fat12.c b/lib/fslib/vfatlib/fat12.c similarity index 100% rename from reactos/lib/fslib/vfatlib/fat12.c rename to lib/fslib/vfatlib/fat12.c diff --git a/reactos/lib/fslib/vfatlib/fat16.c b/lib/fslib/vfatlib/fat16.c similarity index 100% rename from reactos/lib/fslib/vfatlib/fat16.c rename to lib/fslib/vfatlib/fat16.c diff --git a/reactos/lib/fslib/vfatlib/fat32.c b/lib/fslib/vfatlib/fat32.c similarity index 100% rename from reactos/lib/fslib/vfatlib/fat32.c rename to lib/fslib/vfatlib/fat32.c diff --git a/reactos/lib/fslib/vfatlib/vfatlib.c b/lib/fslib/vfatlib/vfatlib.c similarity index 100% rename from reactos/lib/fslib/vfatlib/vfatlib.c rename to lib/fslib/vfatlib/vfatlib.c diff --git a/reactos/lib/fslib/vfatlib/vfatlib.h b/lib/fslib/vfatlib/vfatlib.h similarity index 100% rename from reactos/lib/fslib/vfatlib/vfatlib.h rename to lib/fslib/vfatlib/vfatlib.h diff --git a/reactos/lib/fslib/vfatlib/vfatlib.rbuild b/lib/fslib/vfatlib/vfatlib.rbuild similarity index 100% rename from reactos/lib/fslib/vfatlib/vfatlib.rbuild rename to lib/fslib/vfatlib/vfatlib.rbuild diff --git a/reactos/lib/fslib/vfatxlib/CMakeLists.txt b/lib/fslib/vfatxlib/CMakeLists.txt similarity index 100% rename from reactos/lib/fslib/vfatxlib/CMakeLists.txt rename to lib/fslib/vfatxlib/CMakeLists.txt diff --git a/reactos/lib/fslib/vfatxlib/fatx.c b/lib/fslib/vfatxlib/fatx.c similarity index 100% rename from reactos/lib/fslib/vfatxlib/fatx.c rename to lib/fslib/vfatxlib/fatx.c diff --git a/reactos/lib/fslib/vfatxlib/vfatxlib.c b/lib/fslib/vfatxlib/vfatxlib.c similarity index 100% rename from reactos/lib/fslib/vfatxlib/vfatxlib.c rename to lib/fslib/vfatxlib/vfatxlib.c diff --git a/reactos/lib/fslib/vfatxlib/vfatxlib.h b/lib/fslib/vfatxlib/vfatxlib.h similarity index 100% rename from reactos/lib/fslib/vfatxlib/vfatxlib.h rename to lib/fslib/vfatxlib/vfatxlib.h diff --git a/reactos/lib/fslib/vfatxlib/vfatxlib.rbuild b/lib/fslib/vfatxlib/vfatxlib.rbuild similarity index 100% rename from reactos/lib/fslib/vfatxlib/vfatxlib.rbuild rename to lib/fslib/vfatxlib/vfatxlib.rbuild diff --git a/reactos/lib/inflib/CMakeLists.txt b/lib/inflib/CMakeLists.txt similarity index 100% rename from reactos/lib/inflib/CMakeLists.txt rename to lib/inflib/CMakeLists.txt diff --git a/reactos/lib/inflib/README.txt b/lib/inflib/README.txt similarity index 100% rename from reactos/lib/inflib/README.txt rename to lib/inflib/README.txt diff --git a/reactos/lib/inflib/builddep.h b/lib/inflib/builddep.h similarity index 100% rename from reactos/lib/inflib/builddep.h rename to lib/inflib/builddep.h diff --git a/reactos/lib/inflib/infcommon.h b/lib/inflib/infcommon.h similarity index 100% rename from reactos/lib/inflib/infcommon.h rename to lib/inflib/infcommon.h diff --git a/reactos/lib/inflib/infcore.c b/lib/inflib/infcore.c similarity index 100% rename from reactos/lib/inflib/infcore.c rename to lib/inflib/infcore.c diff --git a/reactos/lib/inflib/infget.c b/lib/inflib/infget.c similarity index 100% rename from reactos/lib/inflib/infget.c rename to lib/inflib/infget.c diff --git a/reactos/lib/inflib/infhost.h b/lib/inflib/infhost.h similarity index 100% rename from reactos/lib/inflib/infhost.h rename to lib/inflib/infhost.h diff --git a/reactos/lib/inflib/infhostgen.c b/lib/inflib/infhostgen.c similarity index 100% rename from reactos/lib/inflib/infhostgen.c rename to lib/inflib/infhostgen.c diff --git a/reactos/lib/inflib/infhostget.c b/lib/inflib/infhostget.c similarity index 100% rename from reactos/lib/inflib/infhostget.c rename to lib/inflib/infhostget.c diff --git a/reactos/lib/inflib/infhostput.c b/lib/inflib/infhostput.c similarity index 100% rename from reactos/lib/inflib/infhostput.c rename to lib/inflib/infhostput.c diff --git a/reactos/lib/inflib/inflib.h b/lib/inflib/inflib.h similarity index 100% rename from reactos/lib/inflib/inflib.h rename to lib/inflib/inflib.h diff --git a/reactos/lib/inflib/inflib.mak b/lib/inflib/inflib.mak similarity index 100% rename from reactos/lib/inflib/inflib.mak rename to lib/inflib/inflib.mak diff --git a/reactos/lib/inflib/inflib.rbuild b/lib/inflib/inflib.rbuild similarity index 100% rename from reactos/lib/inflib/inflib.rbuild rename to lib/inflib/inflib.rbuild diff --git a/reactos/lib/inflib/infpriv.h b/lib/inflib/infpriv.h similarity index 100% rename from reactos/lib/inflib/infpriv.h rename to lib/inflib/infpriv.h diff --git a/reactos/lib/inflib/infput.c b/lib/inflib/infput.c similarity index 100% rename from reactos/lib/inflib/infput.c rename to lib/inflib/infput.c diff --git a/reactos/lib/inflib/infros.h b/lib/inflib/infros.h similarity index 100% rename from reactos/lib/inflib/infros.h rename to lib/inflib/infros.h diff --git a/reactos/lib/inflib/infrosgen.c b/lib/inflib/infrosgen.c similarity index 100% rename from reactos/lib/inflib/infrosgen.c rename to lib/inflib/infrosgen.c diff --git a/reactos/lib/inflib/infrosget.c b/lib/inflib/infrosget.c similarity index 100% rename from reactos/lib/inflib/infrosget.c rename to lib/inflib/infrosget.c diff --git a/reactos/lib/inflib/infrosput.c b/lib/inflib/infrosput.c similarity index 100% rename from reactos/lib/inflib/infrosput.c rename to lib/inflib/infrosput.c diff --git a/reactos/lib/lib.mak b/lib/lib.mak similarity index 100% rename from reactos/lib/lib.mak rename to lib/lib.mak diff --git a/reactos/lib/lib.rbuild b/lib/lib.rbuild similarity index 100% rename from reactos/lib/lib.rbuild rename to lib/lib.rbuild diff --git a/reactos/lib/lsalib/CMakeLists.txt b/lib/lsalib/CMakeLists.txt similarity index 100% rename from reactos/lib/lsalib/CMakeLists.txt rename to lib/lsalib/CMakeLists.txt diff --git a/reactos/lib/lsalib/lsa.c b/lib/lsalib/lsa.c similarity index 100% rename from reactos/lib/lsalib/lsa.c rename to lib/lsalib/lsa.c diff --git a/reactos/lib/lsalib/lsalib.rbuild b/lib/lsalib/lsalib.rbuild similarity index 100% rename from reactos/lib/lsalib/lsalib.rbuild rename to lib/lsalib/lsalib.rbuild diff --git a/reactos/lib/newinflib/CMakeLists.txt b/lib/newinflib/CMakeLists.txt similarity index 100% rename from reactos/lib/newinflib/CMakeLists.txt rename to lib/newinflib/CMakeLists.txt diff --git a/reactos/lib/newinflib/README.txt b/lib/newinflib/README.txt similarity index 100% rename from reactos/lib/newinflib/README.txt rename to lib/newinflib/README.txt diff --git a/reactos/lib/newinflib/builddep.h b/lib/newinflib/builddep.h similarity index 100% rename from reactos/lib/newinflib/builddep.h rename to lib/newinflib/builddep.h diff --git a/reactos/lib/newinflib/infcommon.h b/lib/newinflib/infcommon.h similarity index 100% rename from reactos/lib/newinflib/infcommon.h rename to lib/newinflib/infcommon.h diff --git a/reactos/lib/newinflib/infcore.c b/lib/newinflib/infcore.c similarity index 100% rename from reactos/lib/newinflib/infcore.c rename to lib/newinflib/infcore.c diff --git a/reactos/lib/newinflib/infget.c b/lib/newinflib/infget.c similarity index 100% rename from reactos/lib/newinflib/infget.c rename to lib/newinflib/infget.c diff --git a/reactos/lib/newinflib/infhost.h b/lib/newinflib/infhost.h similarity index 100% rename from reactos/lib/newinflib/infhost.h rename to lib/newinflib/infhost.h diff --git a/reactos/lib/newinflib/infhostgen.c b/lib/newinflib/infhostgen.c similarity index 100% rename from reactos/lib/newinflib/infhostgen.c rename to lib/newinflib/infhostgen.c diff --git a/reactos/lib/newinflib/infhostget.c b/lib/newinflib/infhostget.c similarity index 100% rename from reactos/lib/newinflib/infhostget.c rename to lib/newinflib/infhostget.c diff --git a/reactos/lib/newinflib/infhostput.c b/lib/newinflib/infhostput.c similarity index 100% rename from reactos/lib/newinflib/infhostput.c rename to lib/newinflib/infhostput.c diff --git a/reactos/lib/newinflib/infhostrtl.c b/lib/newinflib/infhostrtl.c similarity index 100% rename from reactos/lib/newinflib/infhostrtl.c rename to lib/newinflib/infhostrtl.c diff --git a/reactos/lib/newinflib/inflib.h b/lib/newinflib/inflib.h similarity index 100% rename from reactos/lib/newinflib/inflib.h rename to lib/newinflib/inflib.h diff --git a/reactos/lib/newinflib/inflib.mak b/lib/newinflib/inflib.mak similarity index 100% rename from reactos/lib/newinflib/inflib.mak rename to lib/newinflib/inflib.mak diff --git a/reactos/lib/newinflib/inflib.rbuild b/lib/newinflib/inflib.rbuild similarity index 100% rename from reactos/lib/newinflib/inflib.rbuild rename to lib/newinflib/inflib.rbuild diff --git a/reactos/lib/newinflib/infpriv.h b/lib/newinflib/infpriv.h similarity index 100% rename from reactos/lib/newinflib/infpriv.h rename to lib/newinflib/infpriv.h diff --git a/reactos/lib/newinflib/infput.c b/lib/newinflib/infput.c similarity index 100% rename from reactos/lib/newinflib/infput.c rename to lib/newinflib/infput.c diff --git a/reactos/lib/newinflib/infros.h b/lib/newinflib/infros.h similarity index 100% rename from reactos/lib/newinflib/infros.h rename to lib/newinflib/infros.h diff --git a/reactos/lib/newinflib/infrosgen.c b/lib/newinflib/infrosgen.c similarity index 100% rename from reactos/lib/newinflib/infrosgen.c rename to lib/newinflib/infrosgen.c diff --git a/reactos/lib/newinflib/infrosget.c b/lib/newinflib/infrosget.c similarity index 100% rename from reactos/lib/newinflib/infrosget.c rename to lib/newinflib/infrosget.c diff --git a/reactos/lib/newinflib/infrosput.c b/lib/newinflib/infrosput.c similarity index 100% rename from reactos/lib/newinflib/infrosput.c rename to lib/newinflib/infrosput.c diff --git a/reactos/lib/ppcmmu/CMakeLists.txt b/lib/ppcmmu/CMakeLists.txt similarity index 100% rename from reactos/lib/ppcmmu/CMakeLists.txt rename to lib/ppcmmu/CMakeLists.txt diff --git a/reactos/lib/ppcmmu/devint.s b/lib/ppcmmu/devint.s similarity index 100% rename from reactos/lib/ppcmmu/devint.s rename to lib/ppcmmu/devint.s diff --git a/reactos/lib/ppcmmu/dummy.c b/lib/ppcmmu/dummy.c similarity index 100% rename from reactos/lib/ppcmmu/dummy.c rename to lib/ppcmmu/dummy.c diff --git a/reactos/lib/ppcmmu/gdblib.c b/lib/ppcmmu/gdblib.c similarity index 100% rename from reactos/lib/ppcmmu/gdblib.c rename to lib/ppcmmu/gdblib.c diff --git a/reactos/lib/ppcmmu/ldscript b/lib/ppcmmu/ldscript similarity index 100% rename from reactos/lib/ppcmmu/ldscript rename to lib/ppcmmu/ldscript diff --git a/reactos/lib/ppcmmu/mmuobject.c b/lib/ppcmmu/mmuobject.c similarity index 100% rename from reactos/lib/ppcmmu/mmuobject.c rename to lib/ppcmmu/mmuobject.c diff --git a/reactos/lib/ppcmmu/mmuobject.h b/lib/ppcmmu/mmuobject.h similarity index 100% rename from reactos/lib/ppcmmu/mmuobject.h rename to lib/ppcmmu/mmuobject.h diff --git a/reactos/lib/ppcmmu/mmutest.c b/lib/ppcmmu/mmutest.c similarity index 100% rename from reactos/lib/ppcmmu/mmutest.c rename to lib/ppcmmu/mmutest.c diff --git a/reactos/lib/ppcmmu/mmuutil.c b/lib/ppcmmu/mmuutil.c similarity index 100% rename from reactos/lib/ppcmmu/mmuutil.c rename to lib/ppcmmu/mmuutil.c diff --git a/reactos/lib/ppcmmu/ppcmmu.mak b/lib/ppcmmu/ppcmmu.mak similarity index 100% rename from reactos/lib/ppcmmu/ppcmmu.mak rename to lib/ppcmmu/ppcmmu.mak diff --git a/reactos/lib/ppcmmu/ppcmmu.rbuild b/lib/ppcmmu/ppcmmu.rbuild similarity index 100% rename from reactos/lib/ppcmmu/ppcmmu.rbuild rename to lib/ppcmmu/ppcmmu.rbuild diff --git a/reactos/lib/pseh/CMakeLists.txt b/lib/pseh/CMakeLists.txt similarity index 100% rename from reactos/lib/pseh/CMakeLists.txt rename to lib/pseh/CMakeLists.txt diff --git a/reactos/lib/pseh/amd64/framebased.S b/lib/pseh/amd64/framebased.S similarity index 100% rename from reactos/lib/pseh/amd64/framebased.S rename to lib/pseh/amd64/framebased.S diff --git a/reactos/lib/pseh/amd64/seh.s b/lib/pseh/amd64/seh.s similarity index 100% rename from reactos/lib/pseh/amd64/seh.s rename to lib/pseh/amd64/seh.s diff --git a/reactos/lib/pseh/amd64/seh_prolog.s b/lib/pseh/amd64/seh_prolog.s similarity index 100% rename from reactos/lib/pseh/amd64/seh_prolog.s rename to lib/pseh/amd64/seh_prolog.s diff --git a/reactos/lib/pseh/dummy.c b/lib/pseh/dummy.c similarity index 100% rename from reactos/lib/pseh/dummy.c rename to lib/pseh/dummy.c diff --git a/reactos/lib/pseh/framebased.c b/lib/pseh/framebased.c similarity index 100% rename from reactos/lib/pseh/framebased.c rename to lib/pseh/framebased.c diff --git a/reactos/lib/pseh/i386/framebased-gcchack-asm.S b/lib/pseh/i386/framebased-gcchack-asm.S similarity index 100% rename from reactos/lib/pseh/i386/framebased-gcchack-asm.S rename to lib/pseh/i386/framebased-gcchack-asm.S diff --git a/reactos/lib/pseh/i386/framebased-gcchack.c b/lib/pseh/i386/framebased-gcchack.c similarity index 100% rename from reactos/lib/pseh/i386/framebased-gcchack.c rename to lib/pseh/i386/framebased-gcchack.c diff --git a/reactos/lib/pseh/i386/framebased.S b/lib/pseh/i386/framebased.S similarity index 100% rename from reactos/lib/pseh/i386/framebased.S rename to lib/pseh/i386/framebased.S diff --git a/reactos/lib/pseh/i386/seh.s b/lib/pseh/i386/seh.s similarity index 100% rename from reactos/lib/pseh/i386/seh.s rename to lib/pseh/i386/seh.s diff --git a/reactos/lib/pseh/i386/seh_prolog.s b/lib/pseh/i386/seh_prolog.s similarity index 100% rename from reactos/lib/pseh/i386/seh_prolog.s rename to lib/pseh/i386/seh_prolog.s diff --git a/reactos/lib/pseh/powerpc/framebased.S b/lib/pseh/powerpc/framebased.S similarity index 100% rename from reactos/lib/pseh/powerpc/framebased.S rename to lib/pseh/powerpc/framebased.S diff --git a/reactos/lib/pseh/pseh.rbuild b/lib/pseh/pseh.rbuild similarity index 100% rename from reactos/lib/pseh/pseh.rbuild rename to lib/pseh/pseh.rbuild diff --git a/reactos/lib/recyclebin/CMakeLists.txt b/lib/recyclebin/CMakeLists.txt similarity index 100% rename from reactos/lib/recyclebin/CMakeLists.txt rename to lib/recyclebin/CMakeLists.txt diff --git a/reactos/lib/recyclebin/guid.c b/lib/recyclebin/guid.c similarity index 100% rename from reactos/lib/recyclebin/guid.c rename to lib/recyclebin/guid.c diff --git a/reactos/lib/recyclebin/readme.txt b/lib/recyclebin/readme.txt similarity index 100% rename from reactos/lib/recyclebin/readme.txt rename to lib/recyclebin/readme.txt diff --git a/reactos/lib/recyclebin/recyclebin.c b/lib/recyclebin/recyclebin.c similarity index 100% rename from reactos/lib/recyclebin/recyclebin.c rename to lib/recyclebin/recyclebin.c diff --git a/reactos/lib/recyclebin/recyclebin.h b/lib/recyclebin/recyclebin.h similarity index 100% rename from reactos/lib/recyclebin/recyclebin.h rename to lib/recyclebin/recyclebin.h diff --git a/reactos/lib/recyclebin/recyclebin.rbuild b/lib/recyclebin/recyclebin.rbuild similarity index 100% rename from reactos/lib/recyclebin/recyclebin.rbuild rename to lib/recyclebin/recyclebin.rbuild diff --git a/reactos/lib/recyclebin/recyclebin_generic.c b/lib/recyclebin/recyclebin_generic.c similarity index 100% rename from reactos/lib/recyclebin/recyclebin_generic.c rename to lib/recyclebin/recyclebin_generic.c diff --git a/reactos/lib/recyclebin/recyclebin_generic_enumerator.c b/lib/recyclebin/recyclebin_generic_enumerator.c similarity index 100% rename from reactos/lib/recyclebin/recyclebin_generic_enumerator.c rename to lib/recyclebin/recyclebin_generic_enumerator.c diff --git a/reactos/lib/recyclebin/recyclebin_private.h b/lib/recyclebin/recyclebin_private.h similarity index 100% rename from reactos/lib/recyclebin/recyclebin_private.h rename to lib/recyclebin/recyclebin_private.h diff --git a/reactos/lib/recyclebin/recyclebin_v5.c b/lib/recyclebin/recyclebin_v5.c similarity index 100% rename from reactos/lib/recyclebin/recyclebin_v5.c rename to lib/recyclebin/recyclebin_v5.c diff --git a/reactos/lib/recyclebin/recyclebin_v5.h b/lib/recyclebin/recyclebin_v5.h similarity index 100% rename from reactos/lib/recyclebin/recyclebin_v5.h rename to lib/recyclebin/recyclebin_v5.h diff --git a/reactos/lib/recyclebin/recyclebin_v5_enumerator.c b/lib/recyclebin/recyclebin_v5_enumerator.c similarity index 100% rename from reactos/lib/recyclebin/recyclebin_v5_enumerator.c rename to lib/recyclebin/recyclebin_v5_enumerator.c diff --git a/reactos/lib/rossym/CMakeLists.txt b/lib/rossym/CMakeLists.txt similarity index 100% rename from reactos/lib/rossym/CMakeLists.txt rename to lib/rossym/CMakeLists.txt diff --git a/reactos/lib/rossym/compat.h b/lib/rossym/compat.h similarity index 100% rename from reactos/lib/rossym/compat.h rename to lib/rossym/compat.h diff --git a/reactos/lib/rossym/delete.c b/lib/rossym/delete.c similarity index 100% rename from reactos/lib/rossym/delete.c rename to lib/rossym/delete.c diff --git a/reactos/lib/rossym/dummy.c b/lib/rossym/dummy.c similarity index 100% rename from reactos/lib/rossym/dummy.c rename to lib/rossym/dummy.c diff --git a/reactos/lib/rossym/dwarf.h b/lib/rossym/dwarf.h similarity index 100% rename from reactos/lib/rossym/dwarf.h rename to lib/rossym/dwarf.h diff --git a/reactos/lib/rossym/dwarf386.c b/lib/rossym/dwarf386.c similarity index 100% rename from reactos/lib/rossym/dwarf386.c rename to lib/rossym/dwarf386.c diff --git a/reactos/lib/rossym/dwarfabbrev.c b/lib/rossym/dwarfabbrev.c similarity index 100% rename from reactos/lib/rossym/dwarfabbrev.c rename to lib/rossym/dwarfabbrev.c diff --git a/reactos/lib/rossym/dwarfaranges.c b/lib/rossym/dwarfaranges.c similarity index 100% rename from reactos/lib/rossym/dwarfaranges.c rename to lib/rossym/dwarfaranges.c diff --git a/reactos/lib/rossym/dwarfcfa.c b/lib/rossym/dwarfcfa.c similarity index 100% rename from reactos/lib/rossym/dwarfcfa.c rename to lib/rossym/dwarfcfa.c diff --git a/reactos/lib/rossym/dwarfdump.c b/lib/rossym/dwarfdump.c similarity index 100% rename from reactos/lib/rossym/dwarfdump.c rename to lib/rossym/dwarfdump.c diff --git a/reactos/lib/rossym/dwarfeval.c b/lib/rossym/dwarfeval.c similarity index 100% rename from reactos/lib/rossym/dwarfeval.c rename to lib/rossym/dwarfeval.c diff --git a/reactos/lib/rossym/dwarfget.c b/lib/rossym/dwarfget.c similarity index 100% rename from reactos/lib/rossym/dwarfget.c rename to lib/rossym/dwarfget.c diff --git a/reactos/lib/rossym/dwarfinfo.c b/lib/rossym/dwarfinfo.c similarity index 100% rename from reactos/lib/rossym/dwarfinfo.c rename to lib/rossym/dwarfinfo.c diff --git a/reactos/lib/rossym/dwarfopen.c b/lib/rossym/dwarfopen.c similarity index 100% rename from reactos/lib/rossym/dwarfopen.c rename to lib/rossym/dwarfopen.c diff --git a/reactos/lib/rossym/dwarfpc.c b/lib/rossym/dwarfpc.c similarity index 100% rename from reactos/lib/rossym/dwarfpc.c rename to lib/rossym/dwarfpc.c diff --git a/reactos/lib/rossym/dwarfpubnames.c b/lib/rossym/dwarfpubnames.c similarity index 100% rename from reactos/lib/rossym/dwarfpubnames.c rename to lib/rossym/dwarfpubnames.c diff --git a/reactos/lib/rossym/find.c b/lib/rossym/find.c similarity index 100% rename from reactos/lib/rossym/find.c rename to lib/rossym/find.c diff --git a/reactos/lib/rossym/fromfile.c b/lib/rossym/fromfile.c similarity index 100% rename from reactos/lib/rossym/fromfile.c rename to lib/rossym/fromfile.c diff --git a/reactos/lib/rossym/frommem.c b/lib/rossym/frommem.c similarity index 100% rename from reactos/lib/rossym/frommem.c rename to lib/rossym/frommem.c diff --git a/reactos/lib/rossym/fromraw.c b/lib/rossym/fromraw.c similarity index 100% rename from reactos/lib/rossym/fromraw.c rename to lib/rossym/fromraw.c diff --git a/reactos/lib/rossym/getraw.c b/lib/rossym/getraw.c similarity index 100% rename from reactos/lib/rossym/getraw.c rename to lib/rossym/getraw.c diff --git a/reactos/lib/rossym/init.c b/lib/rossym/init.c similarity index 100% rename from reactos/lib/rossym/init.c rename to lib/rossym/init.c diff --git a/reactos/lib/rossym/initkm.c b/lib/rossym/initkm.c similarity index 100% rename from reactos/lib/rossym/initkm.c rename to lib/rossym/initkm.c diff --git a/reactos/lib/rossym/initum.c b/lib/rossym/initum.c similarity index 100% rename from reactos/lib/rossym/initum.c rename to lib/rossym/initum.c diff --git a/reactos/lib/rossym/iofile.c b/lib/rossym/iofile.c similarity index 100% rename from reactos/lib/rossym/iofile.c rename to lib/rossym/iofile.c diff --git a/reactos/lib/rossym/pe.c b/lib/rossym/pe.c similarity index 100% rename from reactos/lib/rossym/pe.c rename to lib/rossym/pe.c diff --git a/reactos/lib/rossym/pe.h b/lib/rossym/pe.h similarity index 100% rename from reactos/lib/rossym/pe.h rename to lib/rossym/pe.h diff --git a/reactos/lib/rossym/rossym.rbuild b/lib/rossym/rossym.rbuild similarity index 100% rename from reactos/lib/rossym/rossym.rbuild rename to lib/rossym/rossym.rbuild diff --git a/reactos/lib/rossym/rossympriv.h b/lib/rossym/rossympriv.h similarity index 100% rename from reactos/lib/rossym/rossympriv.h rename to lib/rossym/rossympriv.h diff --git a/reactos/lib/rossym/zwfile.c b/lib/rossym/zwfile.c similarity index 100% rename from reactos/lib/rossym/zwfile.c rename to lib/rossym/zwfile.c diff --git a/reactos/lib/rossym_new/CMakeLists.txt b/lib/rossym_new/CMakeLists.txt similarity index 100% rename from reactos/lib/rossym_new/CMakeLists.txt rename to lib/rossym_new/CMakeLists.txt diff --git a/reactos/lib/rossym_new/compat.h b/lib/rossym_new/compat.h similarity index 100% rename from reactos/lib/rossym_new/compat.h rename to lib/rossym_new/compat.h diff --git a/reactos/lib/rossym_new/delete.c b/lib/rossym_new/delete.c similarity index 100% rename from reactos/lib/rossym_new/delete.c rename to lib/rossym_new/delete.c diff --git a/reactos/lib/rossym_new/dummy.c b/lib/rossym_new/dummy.c similarity index 100% rename from reactos/lib/rossym_new/dummy.c rename to lib/rossym_new/dummy.c diff --git a/reactos/lib/rossym_new/dwarf.h b/lib/rossym_new/dwarf.h similarity index 100% rename from reactos/lib/rossym_new/dwarf.h rename to lib/rossym_new/dwarf.h diff --git a/reactos/lib/rossym_new/dwarf386.c b/lib/rossym_new/dwarf386.c similarity index 100% rename from reactos/lib/rossym_new/dwarf386.c rename to lib/rossym_new/dwarf386.c diff --git a/reactos/lib/rossym_new/dwarfabbrev.c b/lib/rossym_new/dwarfabbrev.c similarity index 100% rename from reactos/lib/rossym_new/dwarfabbrev.c rename to lib/rossym_new/dwarfabbrev.c diff --git a/reactos/lib/rossym_new/dwarfaranges.c b/lib/rossym_new/dwarfaranges.c similarity index 100% rename from reactos/lib/rossym_new/dwarfaranges.c rename to lib/rossym_new/dwarfaranges.c diff --git a/reactos/lib/rossym_new/dwarfcfa.c b/lib/rossym_new/dwarfcfa.c similarity index 100% rename from reactos/lib/rossym_new/dwarfcfa.c rename to lib/rossym_new/dwarfcfa.c diff --git a/reactos/lib/rossym_new/dwarfdump.c b/lib/rossym_new/dwarfdump.c similarity index 100% rename from reactos/lib/rossym_new/dwarfdump.c rename to lib/rossym_new/dwarfdump.c diff --git a/reactos/lib/rossym_new/dwarfeval.c b/lib/rossym_new/dwarfeval.c similarity index 100% rename from reactos/lib/rossym_new/dwarfeval.c rename to lib/rossym_new/dwarfeval.c diff --git a/reactos/lib/rossym_new/dwarfget.c b/lib/rossym_new/dwarfget.c similarity index 100% rename from reactos/lib/rossym_new/dwarfget.c rename to lib/rossym_new/dwarfget.c diff --git a/reactos/lib/rossym_new/dwarfinfo.c b/lib/rossym_new/dwarfinfo.c similarity index 100% rename from reactos/lib/rossym_new/dwarfinfo.c rename to lib/rossym_new/dwarfinfo.c diff --git a/reactos/lib/rossym_new/dwarfopen.c b/lib/rossym_new/dwarfopen.c similarity index 100% rename from reactos/lib/rossym_new/dwarfopen.c rename to lib/rossym_new/dwarfopen.c diff --git a/reactos/lib/rossym_new/dwarfpc.c b/lib/rossym_new/dwarfpc.c similarity index 100% rename from reactos/lib/rossym_new/dwarfpc.c rename to lib/rossym_new/dwarfpc.c diff --git a/reactos/lib/rossym_new/dwarfpubnames.c b/lib/rossym_new/dwarfpubnames.c similarity index 100% rename from reactos/lib/rossym_new/dwarfpubnames.c rename to lib/rossym_new/dwarfpubnames.c diff --git a/reactos/lib/rossym_new/find.c b/lib/rossym_new/find.c similarity index 100% rename from reactos/lib/rossym_new/find.c rename to lib/rossym_new/find.c diff --git a/reactos/lib/rossym_new/fromfile.c b/lib/rossym_new/fromfile.c similarity index 100% rename from reactos/lib/rossym_new/fromfile.c rename to lib/rossym_new/fromfile.c diff --git a/reactos/lib/rossym_new/frommem.c b/lib/rossym_new/frommem.c similarity index 100% rename from reactos/lib/rossym_new/frommem.c rename to lib/rossym_new/frommem.c diff --git a/reactos/lib/rossym_new/fromraw.c b/lib/rossym_new/fromraw.c similarity index 100% rename from reactos/lib/rossym_new/fromraw.c rename to lib/rossym_new/fromraw.c diff --git a/reactos/lib/rossym_new/getraw.c b/lib/rossym_new/getraw.c similarity index 100% rename from reactos/lib/rossym_new/getraw.c rename to lib/rossym_new/getraw.c diff --git a/reactos/lib/rossym_new/init.c b/lib/rossym_new/init.c similarity index 100% rename from reactos/lib/rossym_new/init.c rename to lib/rossym_new/init.c diff --git a/reactos/lib/rossym_new/initkm.c b/lib/rossym_new/initkm.c similarity index 100% rename from reactos/lib/rossym_new/initkm.c rename to lib/rossym_new/initkm.c diff --git a/reactos/lib/rossym_new/initum.c b/lib/rossym_new/initum.c similarity index 100% rename from reactos/lib/rossym_new/initum.c rename to lib/rossym_new/initum.c diff --git a/reactos/lib/rossym_new/iofile.c b/lib/rossym_new/iofile.c similarity index 100% rename from reactos/lib/rossym_new/iofile.c rename to lib/rossym_new/iofile.c diff --git a/reactos/lib/rossym_new/pe.c b/lib/rossym_new/pe.c similarity index 100% rename from reactos/lib/rossym_new/pe.c rename to lib/rossym_new/pe.c diff --git a/reactos/lib/rossym_new/pe.h b/lib/rossym_new/pe.h similarity index 100% rename from reactos/lib/rossym_new/pe.h rename to lib/rossym_new/pe.h diff --git a/reactos/lib/rossym_new/precomp.h b/lib/rossym_new/precomp.h similarity index 100% rename from reactos/lib/rossym_new/precomp.h rename to lib/rossym_new/precomp.h diff --git a/reactos/lib/rossym_new/rossympriv.h b/lib/rossym_new/rossympriv.h similarity index 100% rename from reactos/lib/rossym_new/rossympriv.h rename to lib/rossym_new/rossympriv.h diff --git a/reactos/lib/rossym_new/zwfile.c b/lib/rossym_new/zwfile.c similarity index 100% rename from reactos/lib/rossym_new/zwfile.c rename to lib/rossym_new/zwfile.c diff --git a/reactos/lib/rtl/CMakeLists.txt b/lib/rtl/CMakeLists.txt similarity index 100% rename from reactos/lib/rtl/CMakeLists.txt rename to lib/rtl/CMakeLists.txt diff --git a/reactos/lib/rtl/access.c b/lib/rtl/access.c similarity index 100% rename from reactos/lib/rtl/access.c rename to lib/rtl/access.c diff --git a/reactos/lib/rtl/acl.c b/lib/rtl/acl.c similarity index 100% rename from reactos/lib/rtl/acl.c rename to lib/rtl/acl.c diff --git a/reactos/lib/rtl/actctx.c b/lib/rtl/actctx.c similarity index 100% rename from reactos/lib/rtl/actctx.c rename to lib/rtl/actctx.c diff --git a/reactos/lib/rtl/amd64/debug_asm.S b/lib/rtl/amd64/debug_asm.S similarity index 100% rename from reactos/lib/rtl/amd64/debug_asm.S rename to lib/rtl/amd64/debug_asm.S diff --git a/reactos/lib/rtl/amd64/except_asm.S b/lib/rtl/amd64/except_asm.S similarity index 100% rename from reactos/lib/rtl/amd64/except_asm.S rename to lib/rtl/amd64/except_asm.S diff --git a/reactos/lib/rtl/amd64/rtlmem.S b/lib/rtl/amd64/rtlmem.S similarity index 100% rename from reactos/lib/rtl/amd64/rtlmem.S rename to lib/rtl/amd64/rtlmem.S diff --git a/reactos/lib/rtl/amd64/slist.S b/lib/rtl/amd64/slist.S similarity index 100% rename from reactos/lib/rtl/amd64/slist.S rename to lib/rtl/amd64/slist.S diff --git a/reactos/lib/rtl/amd64/stubs.c b/lib/rtl/amd64/stubs.c similarity index 100% rename from reactos/lib/rtl/amd64/stubs.c rename to lib/rtl/amd64/stubs.c diff --git a/reactos/lib/rtl/amd64/unwind.c b/lib/rtl/amd64/unwind.c similarity index 100% rename from reactos/lib/rtl/amd64/unwind.c rename to lib/rtl/amd64/unwind.c diff --git a/reactos/lib/rtl/arm/debug_asm.S b/lib/rtl/arm/debug_asm.S similarity index 100% rename from reactos/lib/rtl/arm/debug_asm.S rename to lib/rtl/arm/debug_asm.S diff --git a/reactos/lib/rtl/assert.c b/lib/rtl/assert.c similarity index 100% rename from reactos/lib/rtl/assert.c rename to lib/rtl/assert.c diff --git a/reactos/lib/rtl/atom.c b/lib/rtl/atom.c similarity index 100% rename from reactos/lib/rtl/atom.c rename to lib/rtl/atom.c diff --git a/reactos/lib/rtl/avlsupp.c b/lib/rtl/avlsupp.c similarity index 100% rename from reactos/lib/rtl/avlsupp.c rename to lib/rtl/avlsupp.c diff --git a/reactos/lib/rtl/avltable.c b/lib/rtl/avltable.c similarity index 100% rename from reactos/lib/rtl/avltable.c rename to lib/rtl/avltable.c diff --git a/reactos/lib/rtl/bitmap.c b/lib/rtl/bitmap.c similarity index 100% rename from reactos/lib/rtl/bitmap.c rename to lib/rtl/bitmap.c diff --git a/reactos/lib/rtl/bootdata.c b/lib/rtl/bootdata.c similarity index 100% rename from reactos/lib/rtl/bootdata.c rename to lib/rtl/bootdata.c diff --git a/reactos/lib/rtl/byteswap.c b/lib/rtl/byteswap.c similarity index 100% rename from reactos/lib/rtl/byteswap.c rename to lib/rtl/byteswap.c diff --git a/reactos/lib/rtl/compress.c b/lib/rtl/compress.c similarity index 100% rename from reactos/lib/rtl/compress.c rename to lib/rtl/compress.c diff --git a/reactos/lib/rtl/condvar.c b/lib/rtl/condvar.c similarity index 100% rename from reactos/lib/rtl/condvar.c rename to lib/rtl/condvar.c diff --git a/reactos/lib/rtl/crc32.c b/lib/rtl/crc32.c similarity index 100% rename from reactos/lib/rtl/crc32.c rename to lib/rtl/crc32.c diff --git a/reactos/lib/rtl/critical.c b/lib/rtl/critical.c similarity index 100% rename from reactos/lib/rtl/critical.c rename to lib/rtl/critical.c diff --git a/reactos/lib/rtl/dbgbuffer.c b/lib/rtl/dbgbuffer.c similarity index 100% rename from reactos/lib/rtl/dbgbuffer.c rename to lib/rtl/dbgbuffer.c diff --git a/reactos/lib/rtl/debug.c b/lib/rtl/debug.c similarity index 100% rename from reactos/lib/rtl/debug.c rename to lib/rtl/debug.c diff --git a/reactos/lib/rtl/dos8dot3.c b/lib/rtl/dos8dot3.c similarity index 100% rename from reactos/lib/rtl/dos8dot3.c rename to lib/rtl/dos8dot3.c diff --git a/reactos/lib/rtl/encode.c b/lib/rtl/encode.c similarity index 100% rename from reactos/lib/rtl/encode.c rename to lib/rtl/encode.c diff --git a/reactos/lib/rtl/env.c b/lib/rtl/env.c similarity index 100% rename from reactos/lib/rtl/env.c rename to lib/rtl/env.c diff --git a/reactos/lib/rtl/error.c b/lib/rtl/error.c similarity index 100% rename from reactos/lib/rtl/error.c rename to lib/rtl/error.c diff --git a/reactos/lib/rtl/exception.c b/lib/rtl/exception.c similarity index 100% rename from reactos/lib/rtl/exception.c rename to lib/rtl/exception.c diff --git a/reactos/lib/rtl/generictable.c b/lib/rtl/generictable.c similarity index 100% rename from reactos/lib/rtl/generictable.c rename to lib/rtl/generictable.c diff --git a/reactos/lib/rtl/handle.c b/lib/rtl/handle.c similarity index 100% rename from reactos/lib/rtl/handle.c rename to lib/rtl/handle.c diff --git a/reactos/lib/rtl/heap.c b/lib/rtl/heap.c similarity index 100% rename from reactos/lib/rtl/heap.c rename to lib/rtl/heap.c diff --git a/reactos/lib/rtl/heap.h b/lib/rtl/heap.h similarity index 100% rename from reactos/lib/rtl/heap.h rename to lib/rtl/heap.h diff --git a/reactos/lib/rtl/heapdbg.c b/lib/rtl/heapdbg.c similarity index 100% rename from reactos/lib/rtl/heapdbg.c rename to lib/rtl/heapdbg.c diff --git a/reactos/lib/rtl/heappage.c b/lib/rtl/heappage.c similarity index 100% rename from reactos/lib/rtl/heappage.c rename to lib/rtl/heappage.c diff --git a/reactos/lib/rtl/i386/debug_asm.S b/lib/rtl/i386/debug_asm.S similarity index 100% rename from reactos/lib/rtl/i386/debug_asm.S rename to lib/rtl/i386/debug_asm.S diff --git a/reactos/lib/rtl/i386/except.c b/lib/rtl/i386/except.c similarity index 100% rename from reactos/lib/rtl/i386/except.c rename to lib/rtl/i386/except.c diff --git a/reactos/lib/rtl/i386/except_asm.s b/lib/rtl/i386/except_asm.s similarity index 100% rename from reactos/lib/rtl/i386/except_asm.s rename to lib/rtl/i386/except_asm.s diff --git a/reactos/lib/rtl/i386/interlck.S b/lib/rtl/i386/interlck.S similarity index 100% rename from reactos/lib/rtl/i386/interlck.S rename to lib/rtl/i386/interlck.S diff --git a/reactos/lib/rtl/i386/res_asm.s b/lib/rtl/i386/res_asm.s similarity index 100% rename from reactos/lib/rtl/i386/res_asm.s rename to lib/rtl/i386/res_asm.s diff --git a/reactos/lib/rtl/i386/rtlmem.s b/lib/rtl/i386/rtlmem.s similarity index 100% rename from reactos/lib/rtl/i386/rtlmem.s rename to lib/rtl/i386/rtlmem.s diff --git a/reactos/lib/rtl/i386/rtlswap.S b/lib/rtl/i386/rtlswap.S similarity index 100% rename from reactos/lib/rtl/i386/rtlswap.S rename to lib/rtl/i386/rtlswap.S diff --git a/reactos/lib/rtl/i386/thread.c b/lib/rtl/i386/thread.c similarity index 100% rename from reactos/lib/rtl/i386/thread.c rename to lib/rtl/i386/thread.c diff --git a/reactos/lib/rtl/image.c b/lib/rtl/image.c similarity index 100% rename from reactos/lib/rtl/image.c rename to lib/rtl/image.c diff --git a/reactos/lib/rtl/interlck.c b/lib/rtl/interlck.c similarity index 100% rename from reactos/lib/rtl/interlck.c rename to lib/rtl/interlck.c diff --git a/reactos/lib/rtl/largeint.c b/lib/rtl/largeint.c similarity index 100% rename from reactos/lib/rtl/largeint.c rename to lib/rtl/largeint.c diff --git a/reactos/lib/rtl/luid.c b/lib/rtl/luid.c similarity index 100% rename from reactos/lib/rtl/luid.c rename to lib/rtl/luid.c diff --git a/reactos/lib/rtl/mem.c b/lib/rtl/mem.c similarity index 100% rename from reactos/lib/rtl/mem.c rename to lib/rtl/mem.c diff --git a/reactos/lib/rtl/message.c b/lib/rtl/message.c similarity index 100% rename from reactos/lib/rtl/message.c rename to lib/rtl/message.c diff --git a/reactos/lib/rtl/network.c b/lib/rtl/network.c similarity index 100% rename from reactos/lib/rtl/network.c rename to lib/rtl/network.c diff --git a/reactos/lib/rtl/nls.c b/lib/rtl/nls.c similarity index 100% rename from reactos/lib/rtl/nls.c rename to lib/rtl/nls.c diff --git a/reactos/lib/rtl/path.c b/lib/rtl/path.c similarity index 100% rename from reactos/lib/rtl/path.c rename to lib/rtl/path.c diff --git a/reactos/lib/rtl/powerpc/debug.c b/lib/rtl/powerpc/debug.c similarity index 100% rename from reactos/lib/rtl/powerpc/debug.c rename to lib/rtl/powerpc/debug.c diff --git a/reactos/lib/rtl/powerpc/except.c b/lib/rtl/powerpc/except.c similarity index 100% rename from reactos/lib/rtl/powerpc/except.c rename to lib/rtl/powerpc/except.c diff --git a/reactos/lib/rtl/powerpc/interlocked.c b/lib/rtl/powerpc/interlocked.c similarity index 100% rename from reactos/lib/rtl/powerpc/interlocked.c rename to lib/rtl/powerpc/interlocked.c diff --git a/reactos/lib/rtl/powerpc/rtlmem.s b/lib/rtl/powerpc/rtlmem.s similarity index 100% rename from reactos/lib/rtl/powerpc/rtlmem.s rename to lib/rtl/powerpc/rtlmem.s diff --git a/reactos/lib/rtl/powerpc/rtlswap.s b/lib/rtl/powerpc/rtlswap.s similarity index 100% rename from reactos/lib/rtl/powerpc/rtlswap.s rename to lib/rtl/powerpc/rtlswap.s diff --git a/reactos/lib/rtl/powerpc/thread.c b/lib/rtl/powerpc/thread.c similarity index 100% rename from reactos/lib/rtl/powerpc/thread.c rename to lib/rtl/powerpc/thread.c diff --git a/reactos/lib/rtl/ppb.c b/lib/rtl/ppb.c similarity index 100% rename from reactos/lib/rtl/ppb.c rename to lib/rtl/ppb.c diff --git a/reactos/lib/rtl/process.c b/lib/rtl/process.c similarity index 100% rename from reactos/lib/rtl/process.c rename to lib/rtl/process.c diff --git a/reactos/lib/rtl/propvar.c b/lib/rtl/propvar.c similarity index 100% rename from reactos/lib/rtl/propvar.c rename to lib/rtl/propvar.c diff --git a/reactos/lib/rtl/random.c b/lib/rtl/random.c similarity index 100% rename from reactos/lib/rtl/random.c rename to lib/rtl/random.c diff --git a/reactos/lib/rtl/rangelist.c b/lib/rtl/rangelist.c similarity index 100% rename from reactos/lib/rtl/rangelist.c rename to lib/rtl/rangelist.c diff --git a/reactos/lib/rtl/readme.txt b/lib/rtl/readme.txt similarity index 100% rename from reactos/lib/rtl/readme.txt rename to lib/rtl/readme.txt diff --git a/reactos/lib/rtl/registry.c b/lib/rtl/registry.c similarity index 100% rename from reactos/lib/rtl/registry.c rename to lib/rtl/registry.c diff --git a/reactos/lib/rtl/res.c b/lib/rtl/res.c similarity index 100% rename from reactos/lib/rtl/res.c rename to lib/rtl/res.c diff --git a/reactos/lib/rtl/resource.c b/lib/rtl/resource.c similarity index 100% rename from reactos/lib/rtl/resource.c rename to lib/rtl/resource.c diff --git a/reactos/lib/rtl/rtl.h b/lib/rtl/rtl.h similarity index 100% rename from reactos/lib/rtl/rtl.h rename to lib/rtl/rtl.h diff --git a/reactos/lib/rtl/rtl.rbuild b/lib/rtl/rtl.rbuild similarity index 100% rename from reactos/lib/rtl/rtl.rbuild rename to lib/rtl/rtl.rbuild diff --git a/reactos/lib/rtl/rtlavl.h b/lib/rtl/rtlavl.h similarity index 100% rename from reactos/lib/rtl/rtlavl.h rename to lib/rtl/rtlavl.h diff --git a/reactos/lib/rtl/rtlp.h b/lib/rtl/rtlp.h similarity index 100% rename from reactos/lib/rtl/rtlp.h rename to lib/rtl/rtlp.h diff --git a/reactos/lib/rtl/sd.c b/lib/rtl/sd.c similarity index 100% rename from reactos/lib/rtl/sd.c rename to lib/rtl/sd.c diff --git a/reactos/lib/rtl/security.c b/lib/rtl/security.c similarity index 100% rename from reactos/lib/rtl/security.c rename to lib/rtl/security.c diff --git a/reactos/lib/rtl/sid.c b/lib/rtl/sid.c similarity index 100% rename from reactos/lib/rtl/sid.c rename to lib/rtl/sid.c diff --git a/reactos/lib/rtl/slist.c b/lib/rtl/slist.c similarity index 100% rename from reactos/lib/rtl/slist.c rename to lib/rtl/slist.c diff --git a/reactos/lib/rtl/splaytree.c b/lib/rtl/splaytree.c similarity index 100% rename from reactos/lib/rtl/splaytree.c rename to lib/rtl/splaytree.c diff --git a/reactos/lib/rtl/srw.c b/lib/rtl/srw.c similarity index 100% rename from reactos/lib/rtl/srw.c rename to lib/rtl/srw.c diff --git a/reactos/lib/rtl/thread.c b/lib/rtl/thread.c similarity index 100% rename from reactos/lib/rtl/thread.c rename to lib/rtl/thread.c diff --git a/reactos/lib/rtl/time.c b/lib/rtl/time.c similarity index 100% rename from reactos/lib/rtl/time.c rename to lib/rtl/time.c diff --git a/reactos/lib/rtl/timerqueue.c b/lib/rtl/timerqueue.c similarity index 100% rename from reactos/lib/rtl/timerqueue.c rename to lib/rtl/timerqueue.c diff --git a/reactos/lib/rtl/timezone.c b/lib/rtl/timezone.c similarity index 100% rename from reactos/lib/rtl/timezone.c rename to lib/rtl/timezone.c diff --git a/reactos/lib/rtl/unicode.c b/lib/rtl/unicode.c similarity index 100% rename from reactos/lib/rtl/unicode.c rename to lib/rtl/unicode.c diff --git a/reactos/lib/rtl/unicodeprefix.c b/lib/rtl/unicodeprefix.c similarity index 100% rename from reactos/lib/rtl/unicodeprefix.c rename to lib/rtl/unicodeprefix.c diff --git a/reactos/lib/rtl/vectoreh.c b/lib/rtl/vectoreh.c similarity index 100% rename from reactos/lib/rtl/vectoreh.c rename to lib/rtl/vectoreh.c diff --git a/reactos/lib/rtl/version.c b/lib/rtl/version.c similarity index 100% rename from reactos/lib/rtl/version.c rename to lib/rtl/version.c diff --git a/reactos/lib/rtl/wait.c b/lib/rtl/wait.c similarity index 100% rename from reactos/lib/rtl/wait.c rename to lib/rtl/wait.c diff --git a/reactos/lib/rtl/workitem.c b/lib/rtl/workitem.c similarity index 100% rename from reactos/lib/rtl/workitem.c rename to lib/rtl/workitem.c diff --git a/reactos/lib/sdk/CMakeLists.txt b/lib/sdk/CMakeLists.txt similarity index 100% rename from reactos/lib/sdk/CMakeLists.txt rename to lib/sdk/CMakeLists.txt diff --git a/reactos/lib/sdk/crt/CMakeLists.txt b/lib/sdk/crt/CMakeLists.txt similarity index 100% rename from reactos/lib/sdk/crt/CMakeLists.txt rename to lib/sdk/crt/CMakeLists.txt diff --git a/reactos/lib/sdk/crt/README.txt b/lib/sdk/crt/README.txt similarity index 100% rename from reactos/lib/sdk/crt/README.txt rename to lib/sdk/crt/README.txt diff --git a/reactos/lib/sdk/crt/conio/cgets.c b/lib/sdk/crt/conio/cgets.c similarity index 100% rename from reactos/lib/sdk/crt/conio/cgets.c rename to lib/sdk/crt/conio/cgets.c diff --git a/reactos/lib/sdk/crt/conio/cputs.c b/lib/sdk/crt/conio/cputs.c similarity index 100% rename from reactos/lib/sdk/crt/conio/cputs.c rename to lib/sdk/crt/conio/cputs.c diff --git a/reactos/lib/sdk/crt/conio/getch.c b/lib/sdk/crt/conio/getch.c similarity index 100% rename from reactos/lib/sdk/crt/conio/getch.c rename to lib/sdk/crt/conio/getch.c diff --git a/reactos/lib/sdk/crt/conio/getche.c b/lib/sdk/crt/conio/getche.c similarity index 100% rename from reactos/lib/sdk/crt/conio/getche.c rename to lib/sdk/crt/conio/getche.c diff --git a/reactos/lib/sdk/crt/conio/kbhit.c b/lib/sdk/crt/conio/kbhit.c similarity index 100% rename from reactos/lib/sdk/crt/conio/kbhit.c rename to lib/sdk/crt/conio/kbhit.c diff --git a/reactos/lib/sdk/crt/conio/putch.c b/lib/sdk/crt/conio/putch.c similarity index 100% rename from reactos/lib/sdk/crt/conio/putch.c rename to lib/sdk/crt/conio/putch.c diff --git a/reactos/lib/sdk/crt/conio/ungetch.c b/lib/sdk/crt/conio/ungetch.c similarity index 100% rename from reactos/lib/sdk/crt/conio/ungetch.c rename to lib/sdk/crt/conio/ungetch.c diff --git a/reactos/lib/sdk/crt/crt.cmake b/lib/sdk/crt/crt.cmake similarity index 100% rename from reactos/lib/sdk/crt/crt.cmake rename to lib/sdk/crt/crt.cmake diff --git a/reactos/lib/sdk/crt/crt.rbuild b/lib/sdk/crt/crt.rbuild similarity index 100% rename from reactos/lib/sdk/crt/crt.rbuild rename to lib/sdk/crt/crt.rbuild diff --git a/reactos/lib/sdk/crt/direct/chdir.c b/lib/sdk/crt/direct/chdir.c similarity index 100% rename from reactos/lib/sdk/crt/direct/chdir.c rename to lib/sdk/crt/direct/chdir.c diff --git a/reactos/lib/sdk/crt/direct/chdrive.c b/lib/sdk/crt/direct/chdrive.c similarity index 100% rename from reactos/lib/sdk/crt/direct/chdrive.c rename to lib/sdk/crt/direct/chdrive.c diff --git a/reactos/lib/sdk/crt/direct/getcwd.c b/lib/sdk/crt/direct/getcwd.c similarity index 100% rename from reactos/lib/sdk/crt/direct/getcwd.c rename to lib/sdk/crt/direct/getcwd.c diff --git a/reactos/lib/sdk/crt/direct/getdcwd.c b/lib/sdk/crt/direct/getdcwd.c similarity index 100% rename from reactos/lib/sdk/crt/direct/getdcwd.c rename to lib/sdk/crt/direct/getdcwd.c diff --git a/reactos/lib/sdk/crt/direct/getdfree.c b/lib/sdk/crt/direct/getdfree.c similarity index 100% rename from reactos/lib/sdk/crt/direct/getdfree.c rename to lib/sdk/crt/direct/getdfree.c diff --git a/reactos/lib/sdk/crt/direct/getdrive.c b/lib/sdk/crt/direct/getdrive.c similarity index 100% rename from reactos/lib/sdk/crt/direct/getdrive.c rename to lib/sdk/crt/direct/getdrive.c diff --git a/reactos/lib/sdk/crt/direct/mkdir.c b/lib/sdk/crt/direct/mkdir.c similarity index 100% rename from reactos/lib/sdk/crt/direct/mkdir.c rename to lib/sdk/crt/direct/mkdir.c diff --git a/reactos/lib/sdk/crt/direct/rmdir.c b/lib/sdk/crt/direct/rmdir.c similarity index 100% rename from reactos/lib/sdk/crt/direct/rmdir.c rename to lib/sdk/crt/direct/rmdir.c diff --git a/reactos/lib/sdk/crt/direct/wchdir.c b/lib/sdk/crt/direct/wchdir.c similarity index 100% rename from reactos/lib/sdk/crt/direct/wchdir.c rename to lib/sdk/crt/direct/wchdir.c diff --git a/reactos/lib/sdk/crt/direct/wgetcwd.c b/lib/sdk/crt/direct/wgetcwd.c similarity index 100% rename from reactos/lib/sdk/crt/direct/wgetcwd.c rename to lib/sdk/crt/direct/wgetcwd.c diff --git a/reactos/lib/sdk/crt/direct/wgetdcwd.c b/lib/sdk/crt/direct/wgetdcwd.c similarity index 100% rename from reactos/lib/sdk/crt/direct/wgetdcwd.c rename to lib/sdk/crt/direct/wgetdcwd.c diff --git a/reactos/lib/sdk/crt/direct/wmkdir.c b/lib/sdk/crt/direct/wmkdir.c similarity index 100% rename from reactos/lib/sdk/crt/direct/wmkdir.c rename to lib/sdk/crt/direct/wmkdir.c diff --git a/reactos/lib/sdk/crt/direct/wrmdir.c b/lib/sdk/crt/direct/wrmdir.c similarity index 100% rename from reactos/lib/sdk/crt/direct/wrmdir.c rename to lib/sdk/crt/direct/wrmdir.c diff --git a/reactos/lib/sdk/crt/except/amd64/chkstk_asm.s b/lib/sdk/crt/except/amd64/chkstk_asm.s similarity index 100% rename from reactos/lib/sdk/crt/except/amd64/chkstk_asm.s rename to lib/sdk/crt/except/amd64/chkstk_asm.s diff --git a/reactos/lib/sdk/crt/except/amd64/chkstk_ms.s b/lib/sdk/crt/except/amd64/chkstk_ms.s similarity index 100% rename from reactos/lib/sdk/crt/except/amd64/chkstk_ms.s rename to lib/sdk/crt/except/amd64/chkstk_ms.s diff --git a/reactos/lib/sdk/crt/except/amd64/cpp.s b/lib/sdk/crt/except/amd64/cpp.s similarity index 100% rename from reactos/lib/sdk/crt/except/amd64/cpp.s rename to lib/sdk/crt/except/amd64/cpp.s diff --git a/reactos/lib/sdk/crt/except/amd64/ehandler.c b/lib/sdk/crt/except/amd64/ehandler.c similarity index 100% rename from reactos/lib/sdk/crt/except/amd64/ehandler.c rename to lib/sdk/crt/except/amd64/ehandler.c diff --git a/reactos/lib/sdk/crt/except/amd64/seh.s b/lib/sdk/crt/except/amd64/seh.s similarity index 100% rename from reactos/lib/sdk/crt/except/amd64/seh.s rename to lib/sdk/crt/except/amd64/seh.s diff --git a/reactos/lib/sdk/crt/except/cpp.c b/lib/sdk/crt/except/cpp.c similarity index 100% rename from reactos/lib/sdk/crt/except/cpp.c rename to lib/sdk/crt/except/cpp.c diff --git a/reactos/lib/sdk/crt/except/cppexcept.c b/lib/sdk/crt/except/cppexcept.c similarity index 100% rename from reactos/lib/sdk/crt/except/cppexcept.c rename to lib/sdk/crt/except/cppexcept.c diff --git a/reactos/lib/sdk/crt/except/except.c b/lib/sdk/crt/except/except.c similarity index 100% rename from reactos/lib/sdk/crt/except/except.c rename to lib/sdk/crt/except/except.c diff --git a/reactos/lib/sdk/crt/except/i386/chkesp.s b/lib/sdk/crt/except/i386/chkesp.s similarity index 100% rename from reactos/lib/sdk/crt/except/i386/chkesp.s rename to lib/sdk/crt/except/i386/chkesp.s diff --git a/reactos/lib/sdk/crt/except/i386/chkstk_asm.s b/lib/sdk/crt/except/i386/chkstk_asm.s similarity index 100% rename from reactos/lib/sdk/crt/except/i386/chkstk_asm.s rename to lib/sdk/crt/except/i386/chkstk_asm.s diff --git a/reactos/lib/sdk/crt/except/i386/chkstk_ms.s b/lib/sdk/crt/except/i386/chkstk_ms.s similarity index 100% rename from reactos/lib/sdk/crt/except/i386/chkstk_ms.s rename to lib/sdk/crt/except/i386/chkstk_ms.s diff --git a/reactos/lib/sdk/crt/except/i386/cpp.s b/lib/sdk/crt/except/i386/cpp.s similarity index 100% rename from reactos/lib/sdk/crt/except/i386/cpp.s rename to lib/sdk/crt/except/i386/cpp.s diff --git a/reactos/lib/sdk/crt/except/i386/prolog.s b/lib/sdk/crt/except/i386/prolog.s similarity index 100% rename from reactos/lib/sdk/crt/except/i386/prolog.s rename to lib/sdk/crt/except/i386/prolog.s diff --git a/reactos/lib/sdk/crt/except/i386/seh.s b/lib/sdk/crt/except/i386/seh.s similarity index 100% rename from reactos/lib/sdk/crt/except/i386/seh.s rename to lib/sdk/crt/except/i386/seh.s diff --git a/reactos/lib/sdk/crt/except/i386/seh_prolog.s b/lib/sdk/crt/except/i386/seh_prolog.s similarity index 100% rename from reactos/lib/sdk/crt/except/i386/seh_prolog.s rename to lib/sdk/crt/except/i386/seh_prolog.s diff --git a/reactos/lib/sdk/crt/except/i386/unwind.c b/lib/sdk/crt/except/i386/unwind.c similarity index 100% rename from reactos/lib/sdk/crt/except/i386/unwind.c rename to lib/sdk/crt/except/i386/unwind.c diff --git a/reactos/lib/sdk/crt/except/matherr.c b/lib/sdk/crt/except/matherr.c similarity index 100% rename from reactos/lib/sdk/crt/except/matherr.c rename to lib/sdk/crt/except/matherr.c diff --git a/reactos/lib/sdk/crt/except/powerpc/chkstk_asm.s b/lib/sdk/crt/except/powerpc/chkstk_asm.s similarity index 100% rename from reactos/lib/sdk/crt/except/powerpc/chkstk_asm.s rename to lib/sdk/crt/except/powerpc/chkstk_asm.s diff --git a/reactos/lib/sdk/crt/except/powerpc/seh.s b/lib/sdk/crt/except/powerpc/seh.s similarity index 100% rename from reactos/lib/sdk/crt/except/powerpc/seh.s rename to lib/sdk/crt/except/powerpc/seh.s diff --git a/reactos/lib/sdk/crt/except/stack.c b/lib/sdk/crt/except/stack.c similarity index 100% rename from reactos/lib/sdk/crt/except/stack.c rename to lib/sdk/crt/except/stack.c diff --git a/reactos/lib/sdk/crt/except/xcptfil.c b/lib/sdk/crt/except/xcptfil.c similarity index 100% rename from reactos/lib/sdk/crt/except/xcptfil.c rename to lib/sdk/crt/except/xcptfil.c diff --git a/reactos/lib/sdk/crt/float/amd64/clearfp.S b/lib/sdk/crt/float/amd64/clearfp.S similarity index 100% rename from reactos/lib/sdk/crt/float/amd64/clearfp.S rename to lib/sdk/crt/float/amd64/clearfp.S diff --git a/reactos/lib/sdk/crt/float/amd64/fpreset.S b/lib/sdk/crt/float/amd64/fpreset.S similarity index 100% rename from reactos/lib/sdk/crt/float/amd64/fpreset.S rename to lib/sdk/crt/float/amd64/fpreset.S diff --git a/reactos/lib/sdk/crt/float/amd64/getsetfpcw.S b/lib/sdk/crt/float/amd64/getsetfpcw.S similarity index 100% rename from reactos/lib/sdk/crt/float/amd64/getsetfpcw.S rename to lib/sdk/crt/float/amd64/getsetfpcw.S diff --git a/reactos/lib/sdk/crt/float/amd64/logb.S b/lib/sdk/crt/float/amd64/logb.S similarity index 100% rename from reactos/lib/sdk/crt/float/amd64/logb.S rename to lib/sdk/crt/float/amd64/logb.S diff --git a/reactos/lib/sdk/crt/float/chgsign.c b/lib/sdk/crt/float/chgsign.c similarity index 100% rename from reactos/lib/sdk/crt/float/chgsign.c rename to lib/sdk/crt/float/chgsign.c diff --git a/reactos/lib/sdk/crt/float/copysign.c b/lib/sdk/crt/float/copysign.c similarity index 100% rename from reactos/lib/sdk/crt/float/copysign.c rename to lib/sdk/crt/float/copysign.c diff --git a/reactos/lib/sdk/crt/float/fpclass.c b/lib/sdk/crt/float/fpclass.c similarity index 100% rename from reactos/lib/sdk/crt/float/fpclass.c rename to lib/sdk/crt/float/fpclass.c diff --git a/reactos/lib/sdk/crt/float/fpecode.c b/lib/sdk/crt/float/fpecode.c similarity index 100% rename from reactos/lib/sdk/crt/float/fpecode.c rename to lib/sdk/crt/float/fpecode.c diff --git a/reactos/lib/sdk/crt/float/i386/clearfp.c b/lib/sdk/crt/float/i386/clearfp.c similarity index 100% rename from reactos/lib/sdk/crt/float/i386/clearfp.c rename to lib/sdk/crt/float/i386/clearfp.c diff --git a/reactos/lib/sdk/crt/float/i386/cntrlfp.c b/lib/sdk/crt/float/i386/cntrlfp.c similarity index 100% rename from reactos/lib/sdk/crt/float/i386/cntrlfp.c rename to lib/sdk/crt/float/i386/cntrlfp.c diff --git a/reactos/lib/sdk/crt/float/i386/fpreset.c b/lib/sdk/crt/float/i386/fpreset.c similarity index 100% rename from reactos/lib/sdk/crt/float/i386/fpreset.c rename to lib/sdk/crt/float/i386/fpreset.c diff --git a/reactos/lib/sdk/crt/float/i386/logb.c b/lib/sdk/crt/float/i386/logb.c similarity index 100% rename from reactos/lib/sdk/crt/float/i386/logb.c rename to lib/sdk/crt/float/i386/logb.c diff --git a/reactos/lib/sdk/crt/float/i386/statfp.c b/lib/sdk/crt/float/i386/statfp.c similarity index 100% rename from reactos/lib/sdk/crt/float/i386/statfp.c rename to lib/sdk/crt/float/i386/statfp.c diff --git a/reactos/lib/sdk/crt/float/isnan.c b/lib/sdk/crt/float/isnan.c similarity index 100% rename from reactos/lib/sdk/crt/float/isnan.c rename to lib/sdk/crt/float/isnan.c diff --git a/reactos/lib/sdk/crt/float/nafter.c b/lib/sdk/crt/float/nafter.c similarity index 100% rename from reactos/lib/sdk/crt/float/nafter.c rename to lib/sdk/crt/float/nafter.c diff --git a/reactos/lib/sdk/crt/float/scalb.c b/lib/sdk/crt/float/scalb.c similarity index 100% rename from reactos/lib/sdk/crt/float/scalb.c rename to lib/sdk/crt/float/scalb.c diff --git a/reactos/lib/sdk/crt/include/float.h b/lib/sdk/crt/include/float.h similarity index 100% rename from reactos/lib/sdk/crt/include/float.h rename to lib/sdk/crt/include/float.h diff --git a/reactos/lib/sdk/crt/include/internal/atexit.h b/lib/sdk/crt/include/internal/atexit.h similarity index 100% rename from reactos/lib/sdk/crt/include/internal/atexit.h rename to lib/sdk/crt/include/internal/atexit.h diff --git a/reactos/lib/sdk/crt/include/internal/console.h b/lib/sdk/crt/include/internal/console.h similarity index 100% rename from reactos/lib/sdk/crt/include/internal/console.h rename to lib/sdk/crt/include/internal/console.h diff --git a/reactos/lib/sdk/crt/include/internal/ieee.h b/lib/sdk/crt/include/internal/ieee.h similarity index 100% rename from reactos/lib/sdk/crt/include/internal/ieee.h rename to lib/sdk/crt/include/internal/ieee.h diff --git a/reactos/lib/sdk/crt/include/internal/math.h b/lib/sdk/crt/include/internal/math.h similarity index 100% rename from reactos/lib/sdk/crt/include/internal/math.h rename to lib/sdk/crt/include/internal/math.h diff --git a/reactos/lib/sdk/crt/include/internal/mbstring.h b/lib/sdk/crt/include/internal/mbstring.h similarity index 100% rename from reactos/lib/sdk/crt/include/internal/mbstring.h rename to lib/sdk/crt/include/internal/mbstring.h diff --git a/reactos/lib/sdk/crt/include/internal/mingw-w64/internal.h b/lib/sdk/crt/include/internal/mingw-w64/internal.h similarity index 100% rename from reactos/lib/sdk/crt/include/internal/mingw-w64/internal.h rename to lib/sdk/crt/include/internal/mingw-w64/internal.h diff --git a/reactos/lib/sdk/crt/include/internal/mingw-w64/oscalls.h b/lib/sdk/crt/include/internal/mingw-w64/oscalls.h similarity index 100% rename from reactos/lib/sdk/crt/include/internal/mingw-w64/oscalls.h rename to lib/sdk/crt/include/internal/mingw-w64/oscalls.h diff --git a/reactos/lib/sdk/crt/include/internal/mingw-w64/sect_attribs.h b/lib/sdk/crt/include/internal/mingw-w64/sect_attribs.h similarity index 100% rename from reactos/lib/sdk/crt/include/internal/mingw-w64/sect_attribs.h rename to lib/sdk/crt/include/internal/mingw-w64/sect_attribs.h diff --git a/reactos/lib/sdk/crt/include/internal/mtdll.h b/lib/sdk/crt/include/internal/mtdll.h similarity index 100% rename from reactos/lib/sdk/crt/include/internal/mtdll.h rename to lib/sdk/crt/include/internal/mtdll.h diff --git a/reactos/lib/sdk/crt/include/internal/rterror.h b/lib/sdk/crt/include/internal/rterror.h similarity index 100% rename from reactos/lib/sdk/crt/include/internal/rterror.h rename to lib/sdk/crt/include/internal/rterror.h diff --git a/reactos/lib/sdk/crt/include/internal/safecrt.h b/lib/sdk/crt/include/internal/safecrt.h similarity index 100% rename from reactos/lib/sdk/crt/include/internal/safecrt.h rename to lib/sdk/crt/include/internal/safecrt.h diff --git a/reactos/lib/sdk/crt/include/internal/time.h b/lib/sdk/crt/include/internal/time.h similarity index 100% rename from reactos/lib/sdk/crt/include/internal/time.h rename to lib/sdk/crt/include/internal/time.h diff --git a/reactos/lib/sdk/crt/include/internal/tls.h b/lib/sdk/crt/include/internal/tls.h similarity index 100% rename from reactos/lib/sdk/crt/include/internal/tls.h rename to lib/sdk/crt/include/internal/tls.h diff --git a/reactos/lib/sdk/crt/include/internal/wine/cppexcept.h b/lib/sdk/crt/include/internal/wine/cppexcept.h similarity index 100% rename from reactos/lib/sdk/crt/include/internal/wine/cppexcept.h rename to lib/sdk/crt/include/internal/wine/cppexcept.h diff --git a/reactos/lib/sdk/crt/include/internal/wine/eh.h b/lib/sdk/crt/include/internal/wine/eh.h similarity index 100% rename from reactos/lib/sdk/crt/include/internal/wine/eh.h rename to lib/sdk/crt/include/internal/wine/eh.h diff --git a/reactos/lib/sdk/crt/include/internal/wine/msvcrt.h b/lib/sdk/crt/include/internal/wine/msvcrt.h similarity index 100% rename from reactos/lib/sdk/crt/include/internal/wine/msvcrt.h rename to lib/sdk/crt/include/internal/wine/msvcrt.h diff --git a/reactos/lib/sdk/crt/include/internal/wine_msc.h b/lib/sdk/crt/include/internal/wine_msc.h similarity index 100% rename from reactos/lib/sdk/crt/include/internal/wine_msc.h rename to lib/sdk/crt/include/internal/wine_msc.h diff --git a/reactos/lib/sdk/crt/libcntpr.cmake b/lib/sdk/crt/libcntpr.cmake similarity index 100% rename from reactos/lib/sdk/crt/libcntpr.cmake rename to lib/sdk/crt/libcntpr.cmake diff --git a/reactos/lib/sdk/crt/libcntpr.rbuild b/lib/sdk/crt/libcntpr.rbuild similarity index 100% rename from reactos/lib/sdk/crt/libcntpr.rbuild rename to lib/sdk/crt/libcntpr.rbuild diff --git a/reactos/lib/sdk/crt/locale/locale.c b/lib/sdk/crt/locale/locale.c similarity index 100% rename from reactos/lib/sdk/crt/locale/locale.c rename to lib/sdk/crt/locale/locale.c diff --git a/reactos/lib/sdk/crt/math/abs.c b/lib/sdk/crt/math/abs.c similarity index 100% rename from reactos/lib/sdk/crt/math/abs.c rename to lib/sdk/crt/math/abs.c diff --git a/reactos/lib/sdk/crt/math/acos.c b/lib/sdk/crt/math/acos.c similarity index 100% rename from reactos/lib/sdk/crt/math/acos.c rename to lib/sdk/crt/math/acos.c diff --git a/reactos/lib/sdk/crt/math/adjust.c b/lib/sdk/crt/math/adjust.c similarity index 100% rename from reactos/lib/sdk/crt/math/adjust.c rename to lib/sdk/crt/math/adjust.c diff --git a/reactos/lib/sdk/crt/math/amd64/atan.S b/lib/sdk/crt/math/amd64/atan.S similarity index 100% rename from reactos/lib/sdk/crt/math/amd64/atan.S rename to lib/sdk/crt/math/amd64/atan.S diff --git a/reactos/lib/sdk/crt/math/amd64/atan2.S b/lib/sdk/crt/math/amd64/atan2.S similarity index 100% rename from reactos/lib/sdk/crt/math/amd64/atan2.S rename to lib/sdk/crt/math/amd64/atan2.S diff --git a/reactos/lib/sdk/crt/math/amd64/ceil.S b/lib/sdk/crt/math/amd64/ceil.S similarity index 100% rename from reactos/lib/sdk/crt/math/amd64/ceil.S rename to lib/sdk/crt/math/amd64/ceil.S diff --git a/reactos/lib/sdk/crt/math/amd64/ceilf.S b/lib/sdk/crt/math/amd64/ceilf.S similarity index 100% rename from reactos/lib/sdk/crt/math/amd64/ceilf.S rename to lib/sdk/crt/math/amd64/ceilf.S diff --git a/reactos/lib/sdk/crt/math/amd64/exp.S b/lib/sdk/crt/math/amd64/exp.S similarity index 100% rename from reactos/lib/sdk/crt/math/amd64/exp.S rename to lib/sdk/crt/math/amd64/exp.S diff --git a/reactos/lib/sdk/crt/math/amd64/fabs.S b/lib/sdk/crt/math/amd64/fabs.S similarity index 100% rename from reactos/lib/sdk/crt/math/amd64/fabs.S rename to lib/sdk/crt/math/amd64/fabs.S diff --git a/reactos/lib/sdk/crt/math/amd64/floor.S b/lib/sdk/crt/math/amd64/floor.S similarity index 100% rename from reactos/lib/sdk/crt/math/amd64/floor.S rename to lib/sdk/crt/math/amd64/floor.S diff --git a/reactos/lib/sdk/crt/math/amd64/floorf.S b/lib/sdk/crt/math/amd64/floorf.S similarity index 100% rename from reactos/lib/sdk/crt/math/amd64/floorf.S rename to lib/sdk/crt/math/amd64/floorf.S diff --git a/reactos/lib/sdk/crt/math/amd64/fmod.S b/lib/sdk/crt/math/amd64/fmod.S similarity index 100% rename from reactos/lib/sdk/crt/math/amd64/fmod.S rename to lib/sdk/crt/math/amd64/fmod.S diff --git a/reactos/lib/sdk/crt/math/amd64/fmodf.S b/lib/sdk/crt/math/amd64/fmodf.S similarity index 100% rename from reactos/lib/sdk/crt/math/amd64/fmodf.S rename to lib/sdk/crt/math/amd64/fmodf.S diff --git a/reactos/lib/sdk/crt/math/amd64/ldexp.S b/lib/sdk/crt/math/amd64/ldexp.S similarity index 100% rename from reactos/lib/sdk/crt/math/amd64/ldexp.S rename to lib/sdk/crt/math/amd64/ldexp.S diff --git a/reactos/lib/sdk/crt/math/amd64/log.S b/lib/sdk/crt/math/amd64/log.S similarity index 100% rename from reactos/lib/sdk/crt/math/amd64/log.S rename to lib/sdk/crt/math/amd64/log.S diff --git a/reactos/lib/sdk/crt/math/amd64/log10.S b/lib/sdk/crt/math/amd64/log10.S similarity index 100% rename from reactos/lib/sdk/crt/math/amd64/log10.S rename to lib/sdk/crt/math/amd64/log10.S diff --git a/reactos/lib/sdk/crt/math/amd64/pow.S b/lib/sdk/crt/math/amd64/pow.S similarity index 100% rename from reactos/lib/sdk/crt/math/amd64/pow.S rename to lib/sdk/crt/math/amd64/pow.S diff --git a/reactos/lib/sdk/crt/math/amd64/sqrt.S b/lib/sdk/crt/math/amd64/sqrt.S similarity index 100% rename from reactos/lib/sdk/crt/math/amd64/sqrt.S rename to lib/sdk/crt/math/amd64/sqrt.S diff --git a/reactos/lib/sdk/crt/math/amd64/sqrtf.S b/lib/sdk/crt/math/amd64/sqrtf.S similarity index 100% rename from reactos/lib/sdk/crt/math/amd64/sqrtf.S rename to lib/sdk/crt/math/amd64/sqrtf.S diff --git a/reactos/lib/sdk/crt/math/amd64/tan.S b/lib/sdk/crt/math/amd64/tan.S similarity index 100% rename from reactos/lib/sdk/crt/math/amd64/tan.S rename to lib/sdk/crt/math/amd64/tan.S diff --git a/reactos/lib/sdk/crt/math/asin.c b/lib/sdk/crt/math/asin.c similarity index 100% rename from reactos/lib/sdk/crt/math/asin.c rename to lib/sdk/crt/math/asin.c diff --git a/reactos/lib/sdk/crt/math/cabs.c b/lib/sdk/crt/math/cabs.c similarity index 100% rename from reactos/lib/sdk/crt/math/cabs.c rename to lib/sdk/crt/math/cabs.c diff --git a/reactos/lib/sdk/crt/math/cos.c b/lib/sdk/crt/math/cos.c similarity index 100% rename from reactos/lib/sdk/crt/math/cos.c rename to lib/sdk/crt/math/cos.c diff --git a/reactos/lib/sdk/crt/math/cosf.c b/lib/sdk/crt/math/cosf.c similarity index 100% rename from reactos/lib/sdk/crt/math/cosf.c rename to lib/sdk/crt/math/cosf.c diff --git a/reactos/lib/sdk/crt/math/cosh.c b/lib/sdk/crt/math/cosh.c similarity index 100% rename from reactos/lib/sdk/crt/math/cosh.c rename to lib/sdk/crt/math/cosh.c diff --git a/reactos/lib/sdk/crt/math/div.c b/lib/sdk/crt/math/div.c similarity index 100% rename from reactos/lib/sdk/crt/math/div.c rename to lib/sdk/crt/math/div.c diff --git a/reactos/lib/sdk/crt/math/fdivbug.c b/lib/sdk/crt/math/fdivbug.c similarity index 100% rename from reactos/lib/sdk/crt/math/fdivbug.c rename to lib/sdk/crt/math/fdivbug.c diff --git a/reactos/lib/sdk/crt/math/frexp.c b/lib/sdk/crt/math/frexp.c similarity index 100% rename from reactos/lib/sdk/crt/math/frexp.c rename to lib/sdk/crt/math/frexp.c diff --git a/reactos/lib/sdk/crt/math/huge_val.c b/lib/sdk/crt/math/huge_val.c similarity index 100% rename from reactos/lib/sdk/crt/math/huge_val.c rename to lib/sdk/crt/math/huge_val.c diff --git a/reactos/lib/sdk/crt/math/hypot.c b/lib/sdk/crt/math/hypot.c similarity index 100% rename from reactos/lib/sdk/crt/math/hypot.c rename to lib/sdk/crt/math/hypot.c diff --git a/reactos/lib/sdk/crt/math/i386/alldiv_asm.s b/lib/sdk/crt/math/i386/alldiv_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/alldiv_asm.s rename to lib/sdk/crt/math/i386/alldiv_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/alldvrm_asm.s b/lib/sdk/crt/math/i386/alldvrm_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/alldvrm_asm.s rename to lib/sdk/crt/math/i386/alldvrm_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/allmul_asm.s b/lib/sdk/crt/math/i386/allmul_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/allmul_asm.s rename to lib/sdk/crt/math/i386/allmul_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/allrem_asm.s b/lib/sdk/crt/math/i386/allrem_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/allrem_asm.s rename to lib/sdk/crt/math/i386/allrem_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/allshl_asm.s b/lib/sdk/crt/math/i386/allshl_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/allshl_asm.s rename to lib/sdk/crt/math/i386/allshl_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/allshr_asm.s b/lib/sdk/crt/math/i386/allshr_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/allshr_asm.s rename to lib/sdk/crt/math/i386/allshr_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/atan2.c b/lib/sdk/crt/math/i386/atan2.c similarity index 100% rename from reactos/lib/sdk/crt/math/i386/atan2.c rename to lib/sdk/crt/math/i386/atan2.c diff --git a/reactos/lib/sdk/crt/math/i386/atan2_asm.s b/lib/sdk/crt/math/i386/atan2_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/atan2_asm.s rename to lib/sdk/crt/math/i386/atan2_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/atan_asm.s b/lib/sdk/crt/math/i386/atan_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/atan_asm.s rename to lib/sdk/crt/math/i386/atan_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/aulldiv_asm.s b/lib/sdk/crt/math/i386/aulldiv_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/aulldiv_asm.s rename to lib/sdk/crt/math/i386/aulldiv_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/aulldvrm_asm.s b/lib/sdk/crt/math/i386/aulldvrm_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/aulldvrm_asm.s rename to lib/sdk/crt/math/i386/aulldvrm_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/aullrem_asm.s b/lib/sdk/crt/math/i386/aullrem_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/aullrem_asm.s rename to lib/sdk/crt/math/i386/aullrem_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/aullshr_asm.s b/lib/sdk/crt/math/i386/aullshr_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/aullshr_asm.s rename to lib/sdk/crt/math/i386/aullshr_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/ceil_asm.s b/lib/sdk/crt/math/i386/ceil_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/ceil_asm.s rename to lib/sdk/crt/math/i386/ceil_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/ceilf.S b/lib/sdk/crt/math/i386/ceilf.S similarity index 100% rename from reactos/lib/sdk/crt/math/i386/ceilf.S rename to lib/sdk/crt/math/i386/ceilf.S diff --git a/reactos/lib/sdk/crt/math/i386/ci.c b/lib/sdk/crt/math/i386/ci.c similarity index 100% rename from reactos/lib/sdk/crt/math/i386/ci.c rename to lib/sdk/crt/math/i386/ci.c diff --git a/reactos/lib/sdk/crt/math/i386/cos_asm.s b/lib/sdk/crt/math/i386/cos_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/cos_asm.s rename to lib/sdk/crt/math/i386/cos_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/exp.c b/lib/sdk/crt/math/i386/exp.c similarity index 100% rename from reactos/lib/sdk/crt/math/i386/exp.c rename to lib/sdk/crt/math/i386/exp.c diff --git a/reactos/lib/sdk/crt/math/i386/exp_asm.s b/lib/sdk/crt/math/i386/exp_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/exp_asm.s rename to lib/sdk/crt/math/i386/exp_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/fabs_asm.s b/lib/sdk/crt/math/i386/fabs_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/fabs_asm.s rename to lib/sdk/crt/math/i386/fabs_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/floor_asm.s b/lib/sdk/crt/math/i386/floor_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/floor_asm.s rename to lib/sdk/crt/math/i386/floor_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/floorf.S b/lib/sdk/crt/math/i386/floorf.S similarity index 100% rename from reactos/lib/sdk/crt/math/i386/floorf.S rename to lib/sdk/crt/math/i386/floorf.S diff --git a/reactos/lib/sdk/crt/math/i386/fmod.c b/lib/sdk/crt/math/i386/fmod.c similarity index 100% rename from reactos/lib/sdk/crt/math/i386/fmod.c rename to lib/sdk/crt/math/i386/fmod.c diff --git a/reactos/lib/sdk/crt/math/i386/fmod_asm.s b/lib/sdk/crt/math/i386/fmod_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/fmod_asm.s rename to lib/sdk/crt/math/i386/fmod_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/fmodf.c b/lib/sdk/crt/math/i386/fmodf.c similarity index 100% rename from reactos/lib/sdk/crt/math/i386/fmodf.c rename to lib/sdk/crt/math/i386/fmodf.c diff --git a/reactos/lib/sdk/crt/math/i386/fmodf_asm.s b/lib/sdk/crt/math/i386/fmodf_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/fmodf_asm.s rename to lib/sdk/crt/math/i386/fmodf_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/ftol2_asm.s b/lib/sdk/crt/math/i386/ftol2_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/ftol2_asm.s rename to lib/sdk/crt/math/i386/ftol2_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/ftol_asm.s b/lib/sdk/crt/math/i386/ftol_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/ftol_asm.s rename to lib/sdk/crt/math/i386/ftol_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/ldexp.c b/lib/sdk/crt/math/i386/ldexp.c similarity index 100% rename from reactos/lib/sdk/crt/math/i386/ldexp.c rename to lib/sdk/crt/math/i386/ldexp.c diff --git a/reactos/lib/sdk/crt/math/i386/log10_asm.s b/lib/sdk/crt/math/i386/log10_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/log10_asm.s rename to lib/sdk/crt/math/i386/log10_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/log_asm.s b/lib/sdk/crt/math/i386/log_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/log_asm.s rename to lib/sdk/crt/math/i386/log_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/pow_asm.s b/lib/sdk/crt/math/i386/pow_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/pow_asm.s rename to lib/sdk/crt/math/i386/pow_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/sin_asm.s b/lib/sdk/crt/math/i386/sin_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/sin_asm.s rename to lib/sdk/crt/math/i386/sin_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/sqrt_asm.s b/lib/sdk/crt/math/i386/sqrt_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/sqrt_asm.s rename to lib/sdk/crt/math/i386/sqrt_asm.s diff --git a/reactos/lib/sdk/crt/math/i386/sqrtf.c b/lib/sdk/crt/math/i386/sqrtf.c similarity index 100% rename from reactos/lib/sdk/crt/math/i386/sqrtf.c rename to lib/sdk/crt/math/i386/sqrtf.c diff --git a/reactos/lib/sdk/crt/math/i386/tan_asm.s b/lib/sdk/crt/math/i386/tan_asm.s similarity index 100% rename from reactos/lib/sdk/crt/math/i386/tan_asm.s rename to lib/sdk/crt/math/i386/tan_asm.s diff --git a/reactos/lib/sdk/crt/math/ieee754/ieee754.h b/lib/sdk/crt/math/ieee754/ieee754.h similarity index 100% rename from reactos/lib/sdk/crt/math/ieee754/ieee754.h rename to lib/sdk/crt/math/ieee754/ieee754.h diff --git a/reactos/lib/sdk/crt/math/ieee754/j0_y0.c b/lib/sdk/crt/math/ieee754/j0_y0.c similarity index 100% rename from reactos/lib/sdk/crt/math/ieee754/j0_y0.c rename to lib/sdk/crt/math/ieee754/j0_y0.c diff --git a/reactos/lib/sdk/crt/math/ieee754/j1_y1.c b/lib/sdk/crt/math/ieee754/j1_y1.c similarity index 100% rename from reactos/lib/sdk/crt/math/ieee754/j1_y1.c rename to lib/sdk/crt/math/ieee754/j1_y1.c diff --git a/reactos/lib/sdk/crt/math/ieee754/jn_yn.c b/lib/sdk/crt/math/ieee754/jn_yn.c similarity index 100% rename from reactos/lib/sdk/crt/math/ieee754/jn_yn.c rename to lib/sdk/crt/math/ieee754/jn_yn.c diff --git a/reactos/lib/sdk/crt/math/j0_y0.c b/lib/sdk/crt/math/j0_y0.c similarity index 100% rename from reactos/lib/sdk/crt/math/j0_y0.c rename to lib/sdk/crt/math/j0_y0.c diff --git a/reactos/lib/sdk/crt/math/j1_y1.c b/lib/sdk/crt/math/j1_y1.c similarity index 100% rename from reactos/lib/sdk/crt/math/j1_y1.c rename to lib/sdk/crt/math/j1_y1.c diff --git a/reactos/lib/sdk/crt/math/jn_yn.c b/lib/sdk/crt/math/jn_yn.c similarity index 100% rename from reactos/lib/sdk/crt/math/jn_yn.c rename to lib/sdk/crt/math/jn_yn.c diff --git a/reactos/lib/sdk/crt/math/labs.c b/lib/sdk/crt/math/labs.c similarity index 100% rename from reactos/lib/sdk/crt/math/labs.c rename to lib/sdk/crt/math/labs.c diff --git a/reactos/lib/sdk/crt/math/ldiv.c b/lib/sdk/crt/math/ldiv.c similarity index 100% rename from reactos/lib/sdk/crt/math/ldiv.c rename to lib/sdk/crt/math/ldiv.c diff --git a/reactos/lib/sdk/crt/math/logf.c b/lib/sdk/crt/math/logf.c similarity index 100% rename from reactos/lib/sdk/crt/math/logf.c rename to lib/sdk/crt/math/logf.c diff --git a/reactos/lib/sdk/crt/math/modf.c b/lib/sdk/crt/math/modf.c similarity index 100% rename from reactos/lib/sdk/crt/math/modf.c rename to lib/sdk/crt/math/modf.c diff --git a/reactos/lib/sdk/crt/math/powf.c b/lib/sdk/crt/math/powf.c similarity index 100% rename from reactos/lib/sdk/crt/math/powf.c rename to lib/sdk/crt/math/powf.c diff --git a/reactos/lib/sdk/crt/math/powl.c b/lib/sdk/crt/math/powl.c similarity index 100% rename from reactos/lib/sdk/crt/math/powl.c rename to lib/sdk/crt/math/powl.c diff --git a/reactos/lib/sdk/crt/math/rand.c b/lib/sdk/crt/math/rand.c similarity index 100% rename from reactos/lib/sdk/crt/math/rand.c rename to lib/sdk/crt/math/rand.c diff --git a/reactos/lib/sdk/crt/math/rand_nt.c b/lib/sdk/crt/math/rand_nt.c similarity index 100% rename from reactos/lib/sdk/crt/math/rand_nt.c rename to lib/sdk/crt/math/rand_nt.c diff --git a/reactos/lib/sdk/crt/math/s_modf.c b/lib/sdk/crt/math/s_modf.c similarity index 100% rename from reactos/lib/sdk/crt/math/s_modf.c rename to lib/sdk/crt/math/s_modf.c diff --git a/reactos/lib/sdk/crt/math/sin.c b/lib/sdk/crt/math/sin.c similarity index 100% rename from reactos/lib/sdk/crt/math/sin.c rename to lib/sdk/crt/math/sin.c diff --git a/reactos/lib/sdk/crt/math/sinf.c b/lib/sdk/crt/math/sinf.c similarity index 100% rename from reactos/lib/sdk/crt/math/sinf.c rename to lib/sdk/crt/math/sinf.c diff --git a/reactos/lib/sdk/crt/math/sinh.c b/lib/sdk/crt/math/sinh.c similarity index 100% rename from reactos/lib/sdk/crt/math/sinh.c rename to lib/sdk/crt/math/sinh.c diff --git a/reactos/lib/sdk/crt/math/sqrtf.c b/lib/sdk/crt/math/sqrtf.c similarity index 100% rename from reactos/lib/sdk/crt/math/sqrtf.c rename to lib/sdk/crt/math/sqrtf.c diff --git a/reactos/lib/sdk/crt/math/stubs.c b/lib/sdk/crt/math/stubs.c similarity index 100% rename from reactos/lib/sdk/crt/math/stubs.c rename to lib/sdk/crt/math/stubs.c diff --git a/reactos/lib/sdk/crt/math/tanh.c b/lib/sdk/crt/math/tanh.c similarity index 100% rename from reactos/lib/sdk/crt/math/tanh.c rename to lib/sdk/crt/math/tanh.c diff --git a/reactos/lib/sdk/crt/mbstring/hanzen.c b/lib/sdk/crt/mbstring/hanzen.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/hanzen.c rename to lib/sdk/crt/mbstring/hanzen.c diff --git a/reactos/lib/sdk/crt/mbstring/ischira.c b/lib/sdk/crt/mbstring/ischira.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/ischira.c rename to lib/sdk/crt/mbstring/ischira.c diff --git a/reactos/lib/sdk/crt/mbstring/iskana.c b/lib/sdk/crt/mbstring/iskana.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/iskana.c rename to lib/sdk/crt/mbstring/iskana.c diff --git a/reactos/lib/sdk/crt/mbstring/iskmoji.c b/lib/sdk/crt/mbstring/iskmoji.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/iskmoji.c rename to lib/sdk/crt/mbstring/iskmoji.c diff --git a/reactos/lib/sdk/crt/mbstring/iskpun.c b/lib/sdk/crt/mbstring/iskpun.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/iskpun.c rename to lib/sdk/crt/mbstring/iskpun.c diff --git a/reactos/lib/sdk/crt/mbstring/islead.c b/lib/sdk/crt/mbstring/islead.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/islead.c rename to lib/sdk/crt/mbstring/islead.c diff --git a/reactos/lib/sdk/crt/mbstring/islwr.c b/lib/sdk/crt/mbstring/islwr.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/islwr.c rename to lib/sdk/crt/mbstring/islwr.c diff --git a/reactos/lib/sdk/crt/mbstring/ismbal.c b/lib/sdk/crt/mbstring/ismbal.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/ismbal.c rename to lib/sdk/crt/mbstring/ismbal.c diff --git a/reactos/lib/sdk/crt/mbstring/ismbaln.c b/lib/sdk/crt/mbstring/ismbaln.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/ismbaln.c rename to lib/sdk/crt/mbstring/ismbaln.c diff --git a/reactos/lib/sdk/crt/mbstring/ismbc.c b/lib/sdk/crt/mbstring/ismbc.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/ismbc.c rename to lib/sdk/crt/mbstring/ismbc.c diff --git a/reactos/lib/sdk/crt/mbstring/ismbgra.c b/lib/sdk/crt/mbstring/ismbgra.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/ismbgra.c rename to lib/sdk/crt/mbstring/ismbgra.c diff --git a/reactos/lib/sdk/crt/mbstring/ismbkaln.c b/lib/sdk/crt/mbstring/ismbkaln.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/ismbkaln.c rename to lib/sdk/crt/mbstring/ismbkaln.c diff --git a/reactos/lib/sdk/crt/mbstring/ismblead.c b/lib/sdk/crt/mbstring/ismblead.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/ismblead.c rename to lib/sdk/crt/mbstring/ismblead.c diff --git a/reactos/lib/sdk/crt/mbstring/ismbpri.c b/lib/sdk/crt/mbstring/ismbpri.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/ismbpri.c rename to lib/sdk/crt/mbstring/ismbpri.c diff --git a/reactos/lib/sdk/crt/mbstring/ismbpun.c b/lib/sdk/crt/mbstring/ismbpun.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/ismbpun.c rename to lib/sdk/crt/mbstring/ismbpun.c diff --git a/reactos/lib/sdk/crt/mbstring/ismbtrl.c b/lib/sdk/crt/mbstring/ismbtrl.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/ismbtrl.c rename to lib/sdk/crt/mbstring/ismbtrl.c diff --git a/reactos/lib/sdk/crt/mbstring/isuppr.c b/lib/sdk/crt/mbstring/isuppr.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/isuppr.c rename to lib/sdk/crt/mbstring/isuppr.c diff --git a/reactos/lib/sdk/crt/mbstring/jistojms.c b/lib/sdk/crt/mbstring/jistojms.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/jistojms.c rename to lib/sdk/crt/mbstring/jistojms.c diff --git a/reactos/lib/sdk/crt/mbstring/jmstojis.c b/lib/sdk/crt/mbstring/jmstojis.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/jmstojis.c rename to lib/sdk/crt/mbstring/jmstojis.c diff --git a/reactos/lib/sdk/crt/mbstring/mbbtype.c b/lib/sdk/crt/mbstring/mbbtype.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbbtype.c rename to lib/sdk/crt/mbstring/mbbtype.c diff --git a/reactos/lib/sdk/crt/mbstring/mbccpy.c b/lib/sdk/crt/mbstring/mbccpy.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbccpy.c rename to lib/sdk/crt/mbstring/mbccpy.c diff --git a/reactos/lib/sdk/crt/mbstring/mbclen.c b/lib/sdk/crt/mbstring/mbclen.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbclen.c rename to lib/sdk/crt/mbstring/mbclen.c diff --git a/reactos/lib/sdk/crt/mbstring/mbscat.c b/lib/sdk/crt/mbstring/mbscat.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbscat.c rename to lib/sdk/crt/mbstring/mbscat.c diff --git a/reactos/lib/sdk/crt/mbstring/mbschr.c b/lib/sdk/crt/mbstring/mbschr.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbschr.c rename to lib/sdk/crt/mbstring/mbschr.c diff --git a/reactos/lib/sdk/crt/mbstring/mbscmp.c b/lib/sdk/crt/mbstring/mbscmp.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbscmp.c rename to lib/sdk/crt/mbstring/mbscmp.c diff --git a/reactos/lib/sdk/crt/mbstring/mbscoll.c b/lib/sdk/crt/mbstring/mbscoll.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbscoll.c rename to lib/sdk/crt/mbstring/mbscoll.c diff --git a/reactos/lib/sdk/crt/mbstring/mbscpy.c b/lib/sdk/crt/mbstring/mbscpy.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbscpy.c rename to lib/sdk/crt/mbstring/mbscpy.c diff --git a/reactos/lib/sdk/crt/mbstring/mbscspn.c b/lib/sdk/crt/mbstring/mbscspn.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbscspn.c rename to lib/sdk/crt/mbstring/mbscspn.c diff --git a/reactos/lib/sdk/crt/mbstring/mbsdec.c b/lib/sdk/crt/mbstring/mbsdec.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbsdec.c rename to lib/sdk/crt/mbstring/mbsdec.c diff --git a/reactos/lib/sdk/crt/mbstring/mbsdup.c b/lib/sdk/crt/mbstring/mbsdup.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbsdup.c rename to lib/sdk/crt/mbstring/mbsdup.c diff --git a/reactos/lib/sdk/crt/mbstring/mbsicmp.c b/lib/sdk/crt/mbstring/mbsicmp.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbsicmp.c rename to lib/sdk/crt/mbstring/mbsicmp.c diff --git a/reactos/lib/sdk/crt/mbstring/mbsicoll.c b/lib/sdk/crt/mbstring/mbsicoll.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbsicoll.c rename to lib/sdk/crt/mbstring/mbsicoll.c diff --git a/reactos/lib/sdk/crt/mbstring/mbsinc.c b/lib/sdk/crt/mbstring/mbsinc.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbsinc.c rename to lib/sdk/crt/mbstring/mbsinc.c diff --git a/reactos/lib/sdk/crt/mbstring/mbslen.c b/lib/sdk/crt/mbstring/mbslen.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbslen.c rename to lib/sdk/crt/mbstring/mbslen.c diff --git a/reactos/lib/sdk/crt/mbstring/mbslwr.c b/lib/sdk/crt/mbstring/mbslwr.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbslwr.c rename to lib/sdk/crt/mbstring/mbslwr.c diff --git a/reactos/lib/sdk/crt/mbstring/mbsncat.c b/lib/sdk/crt/mbstring/mbsncat.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbsncat.c rename to lib/sdk/crt/mbstring/mbsncat.c diff --git a/reactos/lib/sdk/crt/mbstring/mbsnccnt.c b/lib/sdk/crt/mbstring/mbsnccnt.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbsnccnt.c rename to lib/sdk/crt/mbstring/mbsnccnt.c diff --git a/reactos/lib/sdk/crt/mbstring/mbsncmp.c b/lib/sdk/crt/mbstring/mbsncmp.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbsncmp.c rename to lib/sdk/crt/mbstring/mbsncmp.c diff --git a/reactos/lib/sdk/crt/mbstring/mbsncoll.c b/lib/sdk/crt/mbstring/mbsncoll.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbsncoll.c rename to lib/sdk/crt/mbstring/mbsncoll.c diff --git a/reactos/lib/sdk/crt/mbstring/mbsncpy.c b/lib/sdk/crt/mbstring/mbsncpy.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbsncpy.c rename to lib/sdk/crt/mbstring/mbsncpy.c diff --git a/reactos/lib/sdk/crt/mbstring/mbsnextc.c b/lib/sdk/crt/mbstring/mbsnextc.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbsnextc.c rename to lib/sdk/crt/mbstring/mbsnextc.c diff --git a/reactos/lib/sdk/crt/mbstring/mbsnicmp.c b/lib/sdk/crt/mbstring/mbsnicmp.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbsnicmp.c rename to lib/sdk/crt/mbstring/mbsnicmp.c diff --git a/reactos/lib/sdk/crt/mbstring/mbsnicoll.c b/lib/sdk/crt/mbstring/mbsnicoll.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbsnicoll.c rename to lib/sdk/crt/mbstring/mbsnicoll.c diff --git a/reactos/lib/sdk/crt/mbstring/mbsninc.c b/lib/sdk/crt/mbstring/mbsninc.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbsninc.c rename to lib/sdk/crt/mbstring/mbsninc.c diff --git a/reactos/lib/sdk/crt/mbstring/mbsnset.c b/lib/sdk/crt/mbstring/mbsnset.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbsnset.c rename to lib/sdk/crt/mbstring/mbsnset.c diff --git a/reactos/lib/sdk/crt/mbstring/mbspbrk.c b/lib/sdk/crt/mbstring/mbspbrk.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbspbrk.c rename to lib/sdk/crt/mbstring/mbspbrk.c diff --git a/reactos/lib/sdk/crt/mbstring/mbsrchr.c b/lib/sdk/crt/mbstring/mbsrchr.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbsrchr.c rename to lib/sdk/crt/mbstring/mbsrchr.c diff --git a/reactos/lib/sdk/crt/mbstring/mbsrev.c b/lib/sdk/crt/mbstring/mbsrev.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbsrev.c rename to lib/sdk/crt/mbstring/mbsrev.c diff --git a/reactos/lib/sdk/crt/mbstring/mbsset.c b/lib/sdk/crt/mbstring/mbsset.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbsset.c rename to lib/sdk/crt/mbstring/mbsset.c diff --git a/reactos/lib/sdk/crt/mbstring/mbsspn.c b/lib/sdk/crt/mbstring/mbsspn.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbsspn.c rename to lib/sdk/crt/mbstring/mbsspn.c diff --git a/reactos/lib/sdk/crt/mbstring/mbsspnp.c b/lib/sdk/crt/mbstring/mbsspnp.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbsspnp.c rename to lib/sdk/crt/mbstring/mbsspnp.c diff --git a/reactos/lib/sdk/crt/mbstring/mbsstr.c b/lib/sdk/crt/mbstring/mbsstr.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbsstr.c rename to lib/sdk/crt/mbstring/mbsstr.c diff --git a/reactos/lib/sdk/crt/mbstring/mbstok.c b/lib/sdk/crt/mbstring/mbstok.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbstok.c rename to lib/sdk/crt/mbstring/mbstok.c diff --git a/reactos/lib/sdk/crt/mbstring/mbstrlen.c b/lib/sdk/crt/mbstring/mbstrlen.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbstrlen.c rename to lib/sdk/crt/mbstring/mbstrlen.c diff --git a/reactos/lib/sdk/crt/mbstring/mbsupr.c b/lib/sdk/crt/mbstring/mbsupr.c similarity index 100% rename from reactos/lib/sdk/crt/mbstring/mbsupr.c rename to lib/sdk/crt/mbstring/mbsupr.c diff --git a/reactos/lib/sdk/crt/mem/i386/memchr_asm.s b/lib/sdk/crt/mem/i386/memchr_asm.s similarity index 100% rename from reactos/lib/sdk/crt/mem/i386/memchr_asm.s rename to lib/sdk/crt/mem/i386/memchr_asm.s diff --git a/reactos/lib/sdk/crt/mem/i386/memcpy_asm.s b/lib/sdk/crt/mem/i386/memcpy_asm.s similarity index 100% rename from reactos/lib/sdk/crt/mem/i386/memcpy_asm.s rename to lib/sdk/crt/mem/i386/memcpy_asm.s diff --git a/reactos/lib/sdk/crt/mem/i386/memmove_asm.s b/lib/sdk/crt/mem/i386/memmove_asm.s similarity index 100% rename from reactos/lib/sdk/crt/mem/i386/memmove_asm.s rename to lib/sdk/crt/mem/i386/memmove_asm.s diff --git a/reactos/lib/sdk/crt/mem/i386/memset_asm.s b/lib/sdk/crt/mem/i386/memset_asm.s similarity index 100% rename from reactos/lib/sdk/crt/mem/i386/memset_asm.s rename to lib/sdk/crt/mem/i386/memset_asm.s diff --git a/reactos/lib/sdk/crt/mem/memccpy.c b/lib/sdk/crt/mem/memccpy.c similarity index 100% rename from reactos/lib/sdk/crt/mem/memccpy.c rename to lib/sdk/crt/mem/memccpy.c diff --git a/reactos/lib/sdk/crt/mem/memchr.c b/lib/sdk/crt/mem/memchr.c similarity index 100% rename from reactos/lib/sdk/crt/mem/memchr.c rename to lib/sdk/crt/mem/memchr.c diff --git a/reactos/lib/sdk/crt/mem/memcmp.c b/lib/sdk/crt/mem/memcmp.c similarity index 100% rename from reactos/lib/sdk/crt/mem/memcmp.c rename to lib/sdk/crt/mem/memcmp.c diff --git a/reactos/lib/sdk/crt/mem/memcpy.c b/lib/sdk/crt/mem/memcpy.c similarity index 100% rename from reactos/lib/sdk/crt/mem/memcpy.c rename to lib/sdk/crt/mem/memcpy.c diff --git a/reactos/lib/sdk/crt/mem/memicmp.c b/lib/sdk/crt/mem/memicmp.c similarity index 100% rename from reactos/lib/sdk/crt/mem/memicmp.c rename to lib/sdk/crt/mem/memicmp.c diff --git a/reactos/lib/sdk/crt/mem/memmove.c b/lib/sdk/crt/mem/memmove.c similarity index 100% rename from reactos/lib/sdk/crt/mem/memmove.c rename to lib/sdk/crt/mem/memmove.c diff --git a/reactos/lib/sdk/crt/mem/memset.c b/lib/sdk/crt/mem/memset.c similarity index 100% rename from reactos/lib/sdk/crt/mem/memset.c rename to lib/sdk/crt/mem/memset.c diff --git a/reactos/lib/sdk/crt/misc/amsg.c b/lib/sdk/crt/misc/amsg.c similarity index 100% rename from reactos/lib/sdk/crt/misc/amsg.c rename to lib/sdk/crt/misc/amsg.c diff --git a/reactos/lib/sdk/crt/misc/assert.c b/lib/sdk/crt/misc/assert.c similarity index 100% rename from reactos/lib/sdk/crt/misc/assert.c rename to lib/sdk/crt/misc/assert.c diff --git a/reactos/lib/sdk/crt/misc/environ.c b/lib/sdk/crt/misc/environ.c similarity index 100% rename from reactos/lib/sdk/crt/misc/environ.c rename to lib/sdk/crt/misc/environ.c diff --git a/reactos/lib/sdk/crt/misc/fltused.c b/lib/sdk/crt/misc/fltused.c similarity index 100% rename from reactos/lib/sdk/crt/misc/fltused.c rename to lib/sdk/crt/misc/fltused.c diff --git a/reactos/lib/sdk/crt/misc/getargs.c b/lib/sdk/crt/misc/getargs.c similarity index 100% rename from reactos/lib/sdk/crt/misc/getargs.c rename to lib/sdk/crt/misc/getargs.c diff --git a/reactos/lib/sdk/crt/misc/getopt.c b/lib/sdk/crt/misc/getopt.c similarity index 100% rename from reactos/lib/sdk/crt/misc/getopt.c rename to lib/sdk/crt/misc/getopt.c diff --git a/reactos/lib/sdk/crt/misc/i10output.c b/lib/sdk/crt/misc/i10output.c similarity index 100% rename from reactos/lib/sdk/crt/misc/i10output.c rename to lib/sdk/crt/misc/i10output.c diff --git a/reactos/lib/sdk/crt/misc/i386/readcr4.S b/lib/sdk/crt/misc/i386/readcr4.S similarity index 100% rename from reactos/lib/sdk/crt/misc/i386/readcr4.S rename to lib/sdk/crt/misc/i386/readcr4.S diff --git a/reactos/lib/sdk/crt/misc/initterm.c b/lib/sdk/crt/misc/initterm.c similarity index 100% rename from reactos/lib/sdk/crt/misc/initterm.c rename to lib/sdk/crt/misc/initterm.c diff --git a/reactos/lib/sdk/crt/misc/lock.c b/lib/sdk/crt/misc/lock.c similarity index 100% rename from reactos/lib/sdk/crt/misc/lock.c rename to lib/sdk/crt/misc/lock.c diff --git a/reactos/lib/sdk/crt/misc/ofmt_stub.c b/lib/sdk/crt/misc/ofmt_stub.c similarity index 100% rename from reactos/lib/sdk/crt/misc/ofmt_stub.c rename to lib/sdk/crt/misc/ofmt_stub.c diff --git a/reactos/lib/sdk/crt/misc/purecall.c b/lib/sdk/crt/misc/purecall.c similarity index 100% rename from reactos/lib/sdk/crt/misc/purecall.c rename to lib/sdk/crt/misc/purecall.c diff --git a/reactos/lib/sdk/crt/misc/stubs.c b/lib/sdk/crt/misc/stubs.c similarity index 100% rename from reactos/lib/sdk/crt/misc/stubs.c rename to lib/sdk/crt/misc/stubs.c diff --git a/reactos/lib/sdk/crt/misc/tls.c b/lib/sdk/crt/misc/tls.c similarity index 100% rename from reactos/lib/sdk/crt/misc/tls.c rename to lib/sdk/crt/misc/tls.c diff --git a/reactos/lib/sdk/crt/moldname-msvcrt.def b/lib/sdk/crt/moldname-msvcrt.def similarity index 100% rename from reactos/lib/sdk/crt/moldname-msvcrt.def rename to lib/sdk/crt/moldname-msvcrt.def diff --git a/reactos/lib/sdk/crt/msvcrtex.cmake b/lib/sdk/crt/msvcrtex.cmake similarity index 100% rename from reactos/lib/sdk/crt/msvcrtex.cmake rename to lib/sdk/crt/msvcrtex.cmake diff --git a/reactos/lib/sdk/crt/oldnames.cmake b/lib/sdk/crt/oldnames.cmake similarity index 100% rename from reactos/lib/sdk/crt/oldnames.cmake rename to lib/sdk/crt/oldnames.cmake diff --git a/reactos/lib/sdk/crt/precomp.h b/lib/sdk/crt/precomp.h similarity index 100% rename from reactos/lib/sdk/crt/precomp.h rename to lib/sdk/crt/precomp.h diff --git a/reactos/lib/sdk/crt/printf/_cprintf.c b/lib/sdk/crt/printf/_cprintf.c similarity index 100% rename from reactos/lib/sdk/crt/printf/_cprintf.c rename to lib/sdk/crt/printf/_cprintf.c diff --git a/reactos/lib/sdk/crt/printf/_cwprintf.c b/lib/sdk/crt/printf/_cwprintf.c similarity index 100% rename from reactos/lib/sdk/crt/printf/_cwprintf.c rename to lib/sdk/crt/printf/_cwprintf.c diff --git a/reactos/lib/sdk/crt/printf/_snprintf.c b/lib/sdk/crt/printf/_snprintf.c similarity index 100% rename from reactos/lib/sdk/crt/printf/_snprintf.c rename to lib/sdk/crt/printf/_snprintf.c diff --git a/reactos/lib/sdk/crt/printf/_snwprintf.c b/lib/sdk/crt/printf/_snwprintf.c similarity index 100% rename from reactos/lib/sdk/crt/printf/_snwprintf.c rename to lib/sdk/crt/printf/_snwprintf.c diff --git a/reactos/lib/sdk/crt/printf/_sxprintf.c b/lib/sdk/crt/printf/_sxprintf.c similarity index 100% rename from reactos/lib/sdk/crt/printf/_sxprintf.c rename to lib/sdk/crt/printf/_sxprintf.c diff --git a/reactos/lib/sdk/crt/printf/_vcprintf.c b/lib/sdk/crt/printf/_vcprintf.c similarity index 100% rename from reactos/lib/sdk/crt/printf/_vcprintf.c rename to lib/sdk/crt/printf/_vcprintf.c diff --git a/reactos/lib/sdk/crt/printf/_vcwprintf.c b/lib/sdk/crt/printf/_vcwprintf.c similarity index 100% rename from reactos/lib/sdk/crt/printf/_vcwprintf.c rename to lib/sdk/crt/printf/_vcwprintf.c diff --git a/reactos/lib/sdk/crt/printf/_vsnprintf.c b/lib/sdk/crt/printf/_vsnprintf.c similarity index 100% rename from reactos/lib/sdk/crt/printf/_vsnprintf.c rename to lib/sdk/crt/printf/_vsnprintf.c diff --git a/reactos/lib/sdk/crt/printf/_vsnwprintf.c b/lib/sdk/crt/printf/_vsnwprintf.c similarity index 100% rename from reactos/lib/sdk/crt/printf/_vsnwprintf.c rename to lib/sdk/crt/printf/_vsnwprintf.c diff --git a/reactos/lib/sdk/crt/printf/_vsprintf_p.c b/lib/sdk/crt/printf/_vsprintf_p.c similarity index 100% rename from reactos/lib/sdk/crt/printf/_vsprintf_p.c rename to lib/sdk/crt/printf/_vsprintf_p.c diff --git a/reactos/lib/sdk/crt/printf/fprintf.c b/lib/sdk/crt/printf/fprintf.c similarity index 100% rename from reactos/lib/sdk/crt/printf/fprintf.c rename to lib/sdk/crt/printf/fprintf.c diff --git a/reactos/lib/sdk/crt/printf/fprintf_s.c b/lib/sdk/crt/printf/fprintf_s.c similarity index 100% rename from reactos/lib/sdk/crt/printf/fprintf_s.c rename to lib/sdk/crt/printf/fprintf_s.c diff --git a/reactos/lib/sdk/crt/printf/fwprintf.c b/lib/sdk/crt/printf/fwprintf.c similarity index 100% rename from reactos/lib/sdk/crt/printf/fwprintf.c rename to lib/sdk/crt/printf/fwprintf.c diff --git a/reactos/lib/sdk/crt/printf/fwprintf_s.c b/lib/sdk/crt/printf/fwprintf_s.c similarity index 100% rename from reactos/lib/sdk/crt/printf/fwprintf_s.c rename to lib/sdk/crt/printf/fwprintf_s.c diff --git a/reactos/lib/sdk/crt/printf/printf.c b/lib/sdk/crt/printf/printf.c similarity index 100% rename from reactos/lib/sdk/crt/printf/printf.c rename to lib/sdk/crt/printf/printf.c diff --git a/reactos/lib/sdk/crt/printf/printf_s.c b/lib/sdk/crt/printf/printf_s.c similarity index 100% rename from reactos/lib/sdk/crt/printf/printf_s.c rename to lib/sdk/crt/printf/printf_s.c diff --git a/reactos/lib/sdk/crt/printf/sprintf.c b/lib/sdk/crt/printf/sprintf.c similarity index 100% rename from reactos/lib/sdk/crt/printf/sprintf.c rename to lib/sdk/crt/printf/sprintf.c diff --git a/reactos/lib/sdk/crt/printf/streamout.c b/lib/sdk/crt/printf/streamout.c similarity index 100% rename from reactos/lib/sdk/crt/printf/streamout.c rename to lib/sdk/crt/printf/streamout.c diff --git a/reactos/lib/sdk/crt/printf/swprintf.c b/lib/sdk/crt/printf/swprintf.c similarity index 100% rename from reactos/lib/sdk/crt/printf/swprintf.c rename to lib/sdk/crt/printf/swprintf.c diff --git a/reactos/lib/sdk/crt/printf/vfprintf.c b/lib/sdk/crt/printf/vfprintf.c similarity index 100% rename from reactos/lib/sdk/crt/printf/vfprintf.c rename to lib/sdk/crt/printf/vfprintf.c diff --git a/reactos/lib/sdk/crt/printf/vfprintf_s.c b/lib/sdk/crt/printf/vfprintf_s.c similarity index 100% rename from reactos/lib/sdk/crt/printf/vfprintf_s.c rename to lib/sdk/crt/printf/vfprintf_s.c diff --git a/reactos/lib/sdk/crt/printf/vfwprintf.c b/lib/sdk/crt/printf/vfwprintf.c similarity index 100% rename from reactos/lib/sdk/crt/printf/vfwprintf.c rename to lib/sdk/crt/printf/vfwprintf.c diff --git a/reactos/lib/sdk/crt/printf/vfwprintf_s.c b/lib/sdk/crt/printf/vfwprintf_s.c similarity index 100% rename from reactos/lib/sdk/crt/printf/vfwprintf_s.c rename to lib/sdk/crt/printf/vfwprintf_s.c diff --git a/reactos/lib/sdk/crt/printf/vprintf.c b/lib/sdk/crt/printf/vprintf.c similarity index 100% rename from reactos/lib/sdk/crt/printf/vprintf.c rename to lib/sdk/crt/printf/vprintf.c diff --git a/reactos/lib/sdk/crt/printf/vprintf_s.c b/lib/sdk/crt/printf/vprintf_s.c similarity index 100% rename from reactos/lib/sdk/crt/printf/vprintf_s.c rename to lib/sdk/crt/printf/vprintf_s.c diff --git a/reactos/lib/sdk/crt/printf/vsprintf.c b/lib/sdk/crt/printf/vsprintf.c similarity index 100% rename from reactos/lib/sdk/crt/printf/vsprintf.c rename to lib/sdk/crt/printf/vsprintf.c diff --git a/reactos/lib/sdk/crt/printf/vswprintf.c b/lib/sdk/crt/printf/vswprintf.c similarity index 100% rename from reactos/lib/sdk/crt/printf/vswprintf.c rename to lib/sdk/crt/printf/vswprintf.c diff --git a/reactos/lib/sdk/crt/printf/vwprintf.c b/lib/sdk/crt/printf/vwprintf.c similarity index 100% rename from reactos/lib/sdk/crt/printf/vwprintf.c rename to lib/sdk/crt/printf/vwprintf.c diff --git a/reactos/lib/sdk/crt/printf/vwprintf_s.c b/lib/sdk/crt/printf/vwprintf_s.c similarity index 100% rename from reactos/lib/sdk/crt/printf/vwprintf_s.c rename to lib/sdk/crt/printf/vwprintf_s.c diff --git a/reactos/lib/sdk/crt/printf/wprintf.c b/lib/sdk/crt/printf/wprintf.c similarity index 100% rename from reactos/lib/sdk/crt/printf/wprintf.c rename to lib/sdk/crt/printf/wprintf.c diff --git a/reactos/lib/sdk/crt/printf/wprintf_s.c b/lib/sdk/crt/printf/wprintf_s.c similarity index 100% rename from reactos/lib/sdk/crt/printf/wprintf_s.c rename to lib/sdk/crt/printf/wprintf_s.c diff --git a/reactos/lib/sdk/crt/printf/wsprintfA.c b/lib/sdk/crt/printf/wsprintfA.c similarity index 100% rename from reactos/lib/sdk/crt/printf/wsprintfA.c rename to lib/sdk/crt/printf/wsprintfA.c diff --git a/reactos/lib/sdk/crt/printf/wsprintfW.c b/lib/sdk/crt/printf/wsprintfW.c similarity index 100% rename from reactos/lib/sdk/crt/printf/wsprintfW.c rename to lib/sdk/crt/printf/wsprintfW.c diff --git a/reactos/lib/sdk/crt/printf/wstreamout.c b/lib/sdk/crt/printf/wstreamout.c similarity index 100% rename from reactos/lib/sdk/crt/printf/wstreamout.c rename to lib/sdk/crt/printf/wstreamout.c diff --git a/reactos/lib/sdk/crt/printf/wvsnprintfA.c b/lib/sdk/crt/printf/wvsnprintfA.c similarity index 100% rename from reactos/lib/sdk/crt/printf/wvsnprintfA.c rename to lib/sdk/crt/printf/wvsnprintfA.c diff --git a/reactos/lib/sdk/crt/printf/wvsnprintfW.c b/lib/sdk/crt/printf/wvsnprintfW.c similarity index 100% rename from reactos/lib/sdk/crt/printf/wvsnprintfW.c rename to lib/sdk/crt/printf/wvsnprintfW.c diff --git a/reactos/lib/sdk/crt/printf/wvsprintfA.c b/lib/sdk/crt/printf/wvsprintfA.c similarity index 100% rename from reactos/lib/sdk/crt/printf/wvsprintfA.c rename to lib/sdk/crt/printf/wvsprintfA.c diff --git a/reactos/lib/sdk/crt/printf/wvsprintfW.c b/lib/sdk/crt/printf/wvsprintfW.c similarity index 100% rename from reactos/lib/sdk/crt/printf/wvsprintfW.c rename to lib/sdk/crt/printf/wvsprintfW.c diff --git a/reactos/lib/sdk/crt/process/_cwait.c b/lib/sdk/crt/process/_cwait.c similarity index 100% rename from reactos/lib/sdk/crt/process/_cwait.c rename to lib/sdk/crt/process/_cwait.c diff --git a/reactos/lib/sdk/crt/process/_system.c b/lib/sdk/crt/process/_system.c similarity index 100% rename from reactos/lib/sdk/crt/process/_system.c rename to lib/sdk/crt/process/_system.c diff --git a/reactos/lib/sdk/crt/process/dll.c b/lib/sdk/crt/process/dll.c similarity index 100% rename from reactos/lib/sdk/crt/process/dll.c rename to lib/sdk/crt/process/dll.c diff --git a/reactos/lib/sdk/crt/process/process.c b/lib/sdk/crt/process/process.c similarity index 100% rename from reactos/lib/sdk/crt/process/process.c rename to lib/sdk/crt/process/process.c diff --git a/reactos/lib/sdk/crt/process/procid.c b/lib/sdk/crt/process/procid.c similarity index 100% rename from reactos/lib/sdk/crt/process/procid.c rename to lib/sdk/crt/process/procid.c diff --git a/reactos/lib/sdk/crt/process/thread.c b/lib/sdk/crt/process/thread.c similarity index 100% rename from reactos/lib/sdk/crt/process/thread.c rename to lib/sdk/crt/process/thread.c diff --git a/reactos/lib/sdk/crt/process/threadid.c b/lib/sdk/crt/process/threadid.c similarity index 100% rename from reactos/lib/sdk/crt/process/threadid.c rename to lib/sdk/crt/process/threadid.c diff --git a/reactos/lib/sdk/crt/process/threadx.c b/lib/sdk/crt/process/threadx.c similarity index 100% rename from reactos/lib/sdk/crt/process/threadx.c rename to lib/sdk/crt/process/threadx.c diff --git a/reactos/lib/sdk/crt/process/wprocess.c b/lib/sdk/crt/process/wprocess.c similarity index 100% rename from reactos/lib/sdk/crt/process/wprocess.c rename to lib/sdk/crt/process/wprocess.c diff --git a/reactos/lib/sdk/crt/search/bsearch.c b/lib/sdk/crt/search/bsearch.c similarity index 100% rename from reactos/lib/sdk/crt/search/bsearch.c rename to lib/sdk/crt/search/bsearch.c diff --git a/reactos/lib/sdk/crt/search/lfind.c b/lib/sdk/crt/search/lfind.c similarity index 100% rename from reactos/lib/sdk/crt/search/lfind.c rename to lib/sdk/crt/search/lfind.c diff --git a/reactos/lib/sdk/crt/search/lsearch.c b/lib/sdk/crt/search/lsearch.c similarity index 100% rename from reactos/lib/sdk/crt/search/lsearch.c rename to lib/sdk/crt/search/lsearch.c diff --git a/reactos/lib/sdk/crt/setjmp/amd64/setjmp.s b/lib/sdk/crt/setjmp/amd64/setjmp.s similarity index 100% rename from reactos/lib/sdk/crt/setjmp/amd64/setjmp.s rename to lib/sdk/crt/setjmp/amd64/setjmp.s diff --git a/reactos/lib/sdk/crt/setjmp/i386/setjmp.s b/lib/sdk/crt/setjmp/i386/setjmp.s similarity index 100% rename from reactos/lib/sdk/crt/setjmp/i386/setjmp.s rename to lib/sdk/crt/setjmp/i386/setjmp.s diff --git a/reactos/lib/sdk/crt/signal/signal.c b/lib/sdk/crt/signal/signal.c similarity index 100% rename from reactos/lib/sdk/crt/signal/signal.c rename to lib/sdk/crt/signal/signal.c diff --git a/reactos/lib/sdk/crt/signal/xcptinfo.c b/lib/sdk/crt/signal/xcptinfo.c similarity index 100% rename from reactos/lib/sdk/crt/signal/xcptinfo.c rename to lib/sdk/crt/signal/xcptinfo.c diff --git a/reactos/lib/sdk/crt/startup/_newmode.c b/lib/sdk/crt/startup/_newmode.c similarity index 100% rename from reactos/lib/sdk/crt/startup/_newmode.c rename to lib/sdk/crt/startup/_newmode.c diff --git a/reactos/lib/sdk/crt/startup/atonexit.c b/lib/sdk/crt/startup/atonexit.c similarity index 100% rename from reactos/lib/sdk/crt/startup/atonexit.c rename to lib/sdk/crt/startup/atonexit.c diff --git a/reactos/lib/sdk/crt/startup/charmax.c b/lib/sdk/crt/startup/charmax.c similarity index 100% rename from reactos/lib/sdk/crt/startup/charmax.c rename to lib/sdk/crt/startup/charmax.c diff --git a/reactos/lib/sdk/crt/startup/cinitexe.c b/lib/sdk/crt/startup/cinitexe.c similarity index 100% rename from reactos/lib/sdk/crt/startup/cinitexe.c rename to lib/sdk/crt/startup/cinitexe.c diff --git a/reactos/lib/sdk/crt/startup/crt0_c.c b/lib/sdk/crt/startup/crt0_c.c similarity index 100% rename from reactos/lib/sdk/crt/startup/crt0_c.c rename to lib/sdk/crt/startup/crt0_c.c diff --git a/reactos/lib/sdk/crt/startup/crt0_w.c b/lib/sdk/crt/startup/crt0_w.c similarity index 100% rename from reactos/lib/sdk/crt/startup/crt0_w.c rename to lib/sdk/crt/startup/crt0_w.c diff --git a/reactos/lib/sdk/crt/startup/crt_handler.c b/lib/sdk/crt/startup/crt_handler.c similarity index 100% rename from reactos/lib/sdk/crt/startup/crt_handler.c rename to lib/sdk/crt/startup/crt_handler.c diff --git a/reactos/lib/sdk/crt/startup/crtdll.c b/lib/sdk/crt/startup/crtdll.c similarity index 100% rename from reactos/lib/sdk/crt/startup/crtdll.c rename to lib/sdk/crt/startup/crtdll.c diff --git a/reactos/lib/sdk/crt/startup/crtexe.c b/lib/sdk/crt/startup/crtexe.c similarity index 100% rename from reactos/lib/sdk/crt/startup/crtexe.c rename to lib/sdk/crt/startup/crtexe.c diff --git a/reactos/lib/sdk/crt/startup/dll_argv.c b/lib/sdk/crt/startup/dll_argv.c similarity index 100% rename from reactos/lib/sdk/crt/startup/dll_argv.c rename to lib/sdk/crt/startup/dll_argv.c diff --git a/reactos/lib/sdk/crt/startup/dllargv.c b/lib/sdk/crt/startup/dllargv.c similarity index 100% rename from reactos/lib/sdk/crt/startup/dllargv.c rename to lib/sdk/crt/startup/dllargv.c diff --git a/reactos/lib/sdk/crt/startup/dllentry.c b/lib/sdk/crt/startup/dllentry.c similarity index 100% rename from reactos/lib/sdk/crt/startup/dllentry.c rename to lib/sdk/crt/startup/dllentry.c diff --git a/reactos/lib/sdk/crt/startup/gccmain.c b/lib/sdk/crt/startup/gccmain.c similarity index 100% rename from reactos/lib/sdk/crt/startup/gccmain.c rename to lib/sdk/crt/startup/gccmain.c diff --git a/reactos/lib/sdk/crt/startup/gs_support.c b/lib/sdk/crt/startup/gs_support.c similarity index 100% rename from reactos/lib/sdk/crt/startup/gs_support.c rename to lib/sdk/crt/startup/gs_support.c diff --git a/reactos/lib/sdk/crt/startup/merr.c b/lib/sdk/crt/startup/merr.c similarity index 100% rename from reactos/lib/sdk/crt/startup/merr.c rename to lib/sdk/crt/startup/merr.c diff --git a/reactos/lib/sdk/crt/startup/mingw_helpers.c b/lib/sdk/crt/startup/mingw_helpers.c similarity index 100% rename from reactos/lib/sdk/crt/startup/mingw_helpers.c rename to lib/sdk/crt/startup/mingw_helpers.c diff --git a/reactos/lib/sdk/crt/startup/mscmain.c b/lib/sdk/crt/startup/mscmain.c similarity index 100% rename from reactos/lib/sdk/crt/startup/mscmain.c rename to lib/sdk/crt/startup/mscmain.c diff --git a/reactos/lib/sdk/crt/startup/natstart.c b/lib/sdk/crt/startup/natstart.c similarity index 100% rename from reactos/lib/sdk/crt/startup/natstart.c rename to lib/sdk/crt/startup/natstart.c diff --git a/reactos/lib/sdk/crt/startup/pesect.c b/lib/sdk/crt/startup/pesect.c similarity index 100% rename from reactos/lib/sdk/crt/startup/pesect.c rename to lib/sdk/crt/startup/pesect.c diff --git a/reactos/lib/sdk/crt/startup/pseudo-reloc-list.c b/lib/sdk/crt/startup/pseudo-reloc-list.c similarity index 100% rename from reactos/lib/sdk/crt/startup/pseudo-reloc-list.c rename to lib/sdk/crt/startup/pseudo-reloc-list.c diff --git a/reactos/lib/sdk/crt/startup/pseudo-reloc.c b/lib/sdk/crt/startup/pseudo-reloc.c similarity index 100% rename from reactos/lib/sdk/crt/startup/pseudo-reloc.c rename to lib/sdk/crt/startup/pseudo-reloc.c diff --git a/reactos/lib/sdk/crt/startup/tlsmcrt.c b/lib/sdk/crt/startup/tlsmcrt.c similarity index 100% rename from reactos/lib/sdk/crt/startup/tlsmcrt.c rename to lib/sdk/crt/startup/tlsmcrt.c diff --git a/reactos/lib/sdk/crt/startup/tlsmthread.c b/lib/sdk/crt/startup/tlsmthread.c similarity index 100% rename from reactos/lib/sdk/crt/startup/tlsmthread.c rename to lib/sdk/crt/startup/tlsmthread.c diff --git a/reactos/lib/sdk/crt/startup/tlssup.c b/lib/sdk/crt/startup/tlssup.c similarity index 100% rename from reactos/lib/sdk/crt/startup/tlssup.c rename to lib/sdk/crt/startup/tlssup.c diff --git a/reactos/lib/sdk/crt/startup/tlsthrd.c b/lib/sdk/crt/startup/tlsthrd.c similarity index 100% rename from reactos/lib/sdk/crt/startup/tlsthrd.c rename to lib/sdk/crt/startup/tlsthrd.c diff --git a/reactos/lib/sdk/crt/startup/txtmode.c b/lib/sdk/crt/startup/txtmode.c similarity index 100% rename from reactos/lib/sdk/crt/startup/txtmode.c rename to lib/sdk/crt/startup/txtmode.c diff --git a/reactos/lib/sdk/crt/startup/wcrtexe.c b/lib/sdk/crt/startup/wcrtexe.c similarity index 100% rename from reactos/lib/sdk/crt/startup/wcrtexe.c rename to lib/sdk/crt/startup/wcrtexe.c diff --git a/reactos/lib/sdk/crt/startup/wdllargv.c b/lib/sdk/crt/startup/wdllargv.c similarity index 100% rename from reactos/lib/sdk/crt/startup/wdllargv.c rename to lib/sdk/crt/startup/wdllargv.c diff --git a/reactos/lib/sdk/crt/startup/wildcard.c b/lib/sdk/crt/startup/wildcard.c similarity index 100% rename from reactos/lib/sdk/crt/startup/wildcard.c rename to lib/sdk/crt/startup/wildcard.c diff --git a/reactos/lib/sdk/crt/stdio/_flsbuf.c b/lib/sdk/crt/stdio/_flsbuf.c similarity index 100% rename from reactos/lib/sdk/crt/stdio/_flsbuf.c rename to lib/sdk/crt/stdio/_flsbuf.c diff --git a/reactos/lib/sdk/crt/stdio/_flswbuf.c b/lib/sdk/crt/stdio/_flswbuf.c similarity index 100% rename from reactos/lib/sdk/crt/stdio/_flswbuf.c rename to lib/sdk/crt/stdio/_flswbuf.c diff --git a/reactos/lib/sdk/crt/stdio/access.c b/lib/sdk/crt/stdio/access.c similarity index 100% rename from reactos/lib/sdk/crt/stdio/access.c rename to lib/sdk/crt/stdio/access.c diff --git a/reactos/lib/sdk/crt/stdio/file.c b/lib/sdk/crt/stdio/file.c similarity index 100% rename from reactos/lib/sdk/crt/stdio/file.c rename to lib/sdk/crt/stdio/file.c diff --git a/reactos/lib/sdk/crt/stdio/find.c b/lib/sdk/crt/stdio/find.c similarity index 100% rename from reactos/lib/sdk/crt/stdio/find.c rename to lib/sdk/crt/stdio/find.c diff --git a/reactos/lib/sdk/crt/stdio/find64.c b/lib/sdk/crt/stdio/find64.c similarity index 100% rename from reactos/lib/sdk/crt/stdio/find64.c rename to lib/sdk/crt/stdio/find64.c diff --git a/reactos/lib/sdk/crt/stdio/findgen.c b/lib/sdk/crt/stdio/findgen.c similarity index 100% rename from reactos/lib/sdk/crt/stdio/findgen.c rename to lib/sdk/crt/stdio/findgen.c diff --git a/reactos/lib/sdk/crt/stdio/findi64.c b/lib/sdk/crt/stdio/findi64.c similarity index 100% rename from reactos/lib/sdk/crt/stdio/findi64.c rename to lib/sdk/crt/stdio/findi64.c diff --git a/reactos/lib/sdk/crt/stdio/fmode.c b/lib/sdk/crt/stdio/fmode.c similarity index 100% rename from reactos/lib/sdk/crt/stdio/fmode.c rename to lib/sdk/crt/stdio/fmode.c diff --git a/reactos/lib/sdk/crt/stdio/perror.c b/lib/sdk/crt/stdio/perror.c similarity index 100% rename from reactos/lib/sdk/crt/stdio/perror.c rename to lib/sdk/crt/stdio/perror.c diff --git a/reactos/lib/sdk/crt/stdio/popen.c b/lib/sdk/crt/stdio/popen.c similarity index 100% rename from reactos/lib/sdk/crt/stdio/popen.c rename to lib/sdk/crt/stdio/popen.c diff --git a/reactos/lib/sdk/crt/stdio/stat.c b/lib/sdk/crt/stdio/stat.c similarity index 100% rename from reactos/lib/sdk/crt/stdio/stat.c rename to lib/sdk/crt/stdio/stat.c diff --git a/reactos/lib/sdk/crt/stdio/stat64.c b/lib/sdk/crt/stdio/stat64.c similarity index 100% rename from reactos/lib/sdk/crt/stdio/stat64.c rename to lib/sdk/crt/stdio/stat64.c diff --git a/reactos/lib/sdk/crt/stdio/waccess.c b/lib/sdk/crt/stdio/waccess.c similarity index 100% rename from reactos/lib/sdk/crt/stdio/waccess.c rename to lib/sdk/crt/stdio/waccess.c diff --git a/reactos/lib/sdk/crt/stdio/wfind.c b/lib/sdk/crt/stdio/wfind.c similarity index 100% rename from reactos/lib/sdk/crt/stdio/wfind.c rename to lib/sdk/crt/stdio/wfind.c diff --git a/reactos/lib/sdk/crt/stdio/wfind64.c b/lib/sdk/crt/stdio/wfind64.c similarity index 100% rename from reactos/lib/sdk/crt/stdio/wfind64.c rename to lib/sdk/crt/stdio/wfind64.c diff --git a/reactos/lib/sdk/crt/stdio/wfindi64.c b/lib/sdk/crt/stdio/wfindi64.c similarity index 100% rename from reactos/lib/sdk/crt/stdio/wfindi64.c rename to lib/sdk/crt/stdio/wfindi64.c diff --git a/reactos/lib/sdk/crt/stdio/wpopen.c b/lib/sdk/crt/stdio/wpopen.c similarity index 100% rename from reactos/lib/sdk/crt/stdio/wpopen.c rename to lib/sdk/crt/stdio/wpopen.c diff --git a/reactos/lib/sdk/crt/stdio/wstat.c b/lib/sdk/crt/stdio/wstat.c similarity index 100% rename from reactos/lib/sdk/crt/stdio/wstat.c rename to lib/sdk/crt/stdio/wstat.c diff --git a/reactos/lib/sdk/crt/stdio/wstat64.c b/lib/sdk/crt/stdio/wstat64.c similarity index 100% rename from reactos/lib/sdk/crt/stdio/wstat64.c rename to lib/sdk/crt/stdio/wstat64.c diff --git a/reactos/lib/sdk/crt/stdlib/_exit.c b/lib/sdk/crt/stdlib/_exit.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/_exit.c rename to lib/sdk/crt/stdlib/_exit.c diff --git a/reactos/lib/sdk/crt/stdlib/abort.c b/lib/sdk/crt/stdlib/abort.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/abort.c rename to lib/sdk/crt/stdlib/abort.c diff --git a/reactos/lib/sdk/crt/stdlib/atexit.c b/lib/sdk/crt/stdlib/atexit.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/atexit.c rename to lib/sdk/crt/stdlib/atexit.c diff --git a/reactos/lib/sdk/crt/stdlib/atold.c b/lib/sdk/crt/stdlib/atold.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/atold.c rename to lib/sdk/crt/stdlib/atold.c diff --git a/reactos/lib/sdk/crt/stdlib/doserrmap.h b/lib/sdk/crt/stdlib/doserrmap.h similarity index 100% rename from reactos/lib/sdk/crt/stdlib/doserrmap.h rename to lib/sdk/crt/stdlib/doserrmap.h diff --git a/reactos/lib/sdk/crt/stdlib/ecvt.c b/lib/sdk/crt/stdlib/ecvt.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/ecvt.c rename to lib/sdk/crt/stdlib/ecvt.c diff --git a/reactos/lib/sdk/crt/stdlib/errno.c b/lib/sdk/crt/stdlib/errno.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/errno.c rename to lib/sdk/crt/stdlib/errno.c diff --git a/reactos/lib/sdk/crt/stdlib/fcvt.c b/lib/sdk/crt/stdlib/fcvt.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/fcvt.c rename to lib/sdk/crt/stdlib/fcvt.c diff --git a/reactos/lib/sdk/crt/stdlib/fcvtbuf.c b/lib/sdk/crt/stdlib/fcvtbuf.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/fcvtbuf.c rename to lib/sdk/crt/stdlib/fcvtbuf.c diff --git a/reactos/lib/sdk/crt/stdlib/fullpath.c b/lib/sdk/crt/stdlib/fullpath.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/fullpath.c rename to lib/sdk/crt/stdlib/fullpath.c diff --git a/reactos/lib/sdk/crt/stdlib/gcvt.c b/lib/sdk/crt/stdlib/gcvt.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/gcvt.c rename to lib/sdk/crt/stdlib/gcvt.c diff --git a/reactos/lib/sdk/crt/stdlib/getenv.c b/lib/sdk/crt/stdlib/getenv.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/getenv.c rename to lib/sdk/crt/stdlib/getenv.c diff --git a/reactos/lib/sdk/crt/stdlib/makepath.c b/lib/sdk/crt/stdlib/makepath.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/makepath.c rename to lib/sdk/crt/stdlib/makepath.c diff --git a/reactos/lib/sdk/crt/stdlib/makepath_s.c b/lib/sdk/crt/stdlib/makepath_s.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/makepath_s.c rename to lib/sdk/crt/stdlib/makepath_s.c diff --git a/reactos/lib/sdk/crt/stdlib/malloc.c b/lib/sdk/crt/stdlib/malloc.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/malloc.c rename to lib/sdk/crt/stdlib/malloc.c diff --git a/reactos/lib/sdk/crt/stdlib/mbstowcs.c b/lib/sdk/crt/stdlib/mbstowcs.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/mbstowcs.c rename to lib/sdk/crt/stdlib/mbstowcs.c diff --git a/reactos/lib/sdk/crt/stdlib/mbtowc.c b/lib/sdk/crt/stdlib/mbtowc.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/mbtowc.c rename to lib/sdk/crt/stdlib/mbtowc.c diff --git a/reactos/lib/sdk/crt/stdlib/obsol.c b/lib/sdk/crt/stdlib/obsol.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/obsol.c rename to lib/sdk/crt/stdlib/obsol.c diff --git a/reactos/lib/sdk/crt/stdlib/putenv.c b/lib/sdk/crt/stdlib/putenv.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/putenv.c rename to lib/sdk/crt/stdlib/putenv.c diff --git a/reactos/lib/sdk/crt/stdlib/qsort.c b/lib/sdk/crt/stdlib/qsort.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/qsort.c rename to lib/sdk/crt/stdlib/qsort.c diff --git a/reactos/lib/sdk/crt/stdlib/rot.c b/lib/sdk/crt/stdlib/rot.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/rot.c rename to lib/sdk/crt/stdlib/rot.c diff --git a/reactos/lib/sdk/crt/stdlib/senv.c b/lib/sdk/crt/stdlib/senv.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/senv.c rename to lib/sdk/crt/stdlib/senv.c diff --git a/reactos/lib/sdk/crt/stdlib/swab.c b/lib/sdk/crt/stdlib/swab.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/swab.c rename to lib/sdk/crt/stdlib/swab.c diff --git a/reactos/lib/sdk/crt/stdlib/wfulpath.c b/lib/sdk/crt/stdlib/wfulpath.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/wfulpath.c rename to lib/sdk/crt/stdlib/wfulpath.c diff --git a/reactos/lib/sdk/crt/stdlib/wmakpath.c b/lib/sdk/crt/stdlib/wmakpath.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/wmakpath.c rename to lib/sdk/crt/stdlib/wmakpath.c diff --git a/reactos/lib/sdk/crt/stdlib/wmakpath_s.c b/lib/sdk/crt/stdlib/wmakpath_s.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/wmakpath_s.c rename to lib/sdk/crt/stdlib/wmakpath_s.c diff --git a/reactos/lib/sdk/crt/stdlib/wputenv.c b/lib/sdk/crt/stdlib/wputenv.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/wputenv.c rename to lib/sdk/crt/stdlib/wputenv.c diff --git a/reactos/lib/sdk/crt/stdlib/wsenv.c b/lib/sdk/crt/stdlib/wsenv.c similarity index 100% rename from reactos/lib/sdk/crt/stdlib/wsenv.c rename to lib/sdk/crt/stdlib/wsenv.c diff --git a/reactos/lib/sdk/crt/string/atof.c b/lib/sdk/crt/string/atof.c similarity index 100% rename from reactos/lib/sdk/crt/string/atof.c rename to lib/sdk/crt/string/atof.c diff --git a/reactos/lib/sdk/crt/string/atoi.c b/lib/sdk/crt/string/atoi.c similarity index 100% rename from reactos/lib/sdk/crt/string/atoi.c rename to lib/sdk/crt/string/atoi.c diff --git a/reactos/lib/sdk/crt/string/atoi64.c b/lib/sdk/crt/string/atoi64.c similarity index 100% rename from reactos/lib/sdk/crt/string/atoi64.c rename to lib/sdk/crt/string/atoi64.c diff --git a/reactos/lib/sdk/crt/string/atol.c b/lib/sdk/crt/string/atol.c similarity index 100% rename from reactos/lib/sdk/crt/string/atol.c rename to lib/sdk/crt/string/atol.c diff --git a/reactos/lib/sdk/crt/string/ctype.c b/lib/sdk/crt/string/ctype.c similarity index 100% rename from reactos/lib/sdk/crt/string/ctype.c rename to lib/sdk/crt/string/ctype.c diff --git a/reactos/lib/sdk/crt/string/i386/strcat_asm.s b/lib/sdk/crt/string/i386/strcat_asm.s similarity index 100% rename from reactos/lib/sdk/crt/string/i386/strcat_asm.s rename to lib/sdk/crt/string/i386/strcat_asm.s diff --git a/reactos/lib/sdk/crt/string/i386/strchr_asm.s b/lib/sdk/crt/string/i386/strchr_asm.s similarity index 100% rename from reactos/lib/sdk/crt/string/i386/strchr_asm.s rename to lib/sdk/crt/string/i386/strchr_asm.s diff --git a/reactos/lib/sdk/crt/string/i386/strcmp_asm.s b/lib/sdk/crt/string/i386/strcmp_asm.s similarity index 100% rename from reactos/lib/sdk/crt/string/i386/strcmp_asm.s rename to lib/sdk/crt/string/i386/strcmp_asm.s diff --git a/reactos/lib/sdk/crt/string/i386/strcpy_asm.s b/lib/sdk/crt/string/i386/strcpy_asm.s similarity index 100% rename from reactos/lib/sdk/crt/string/i386/strcpy_asm.s rename to lib/sdk/crt/string/i386/strcpy_asm.s diff --git a/reactos/lib/sdk/crt/string/i386/strlen_asm.s b/lib/sdk/crt/string/i386/strlen_asm.s similarity index 100% rename from reactos/lib/sdk/crt/string/i386/strlen_asm.s rename to lib/sdk/crt/string/i386/strlen_asm.s diff --git a/reactos/lib/sdk/crt/string/i386/strncat_asm.s b/lib/sdk/crt/string/i386/strncat_asm.s similarity index 100% rename from reactos/lib/sdk/crt/string/i386/strncat_asm.s rename to lib/sdk/crt/string/i386/strncat_asm.s diff --git a/reactos/lib/sdk/crt/string/i386/strncmp_asm.s b/lib/sdk/crt/string/i386/strncmp_asm.s similarity index 100% rename from reactos/lib/sdk/crt/string/i386/strncmp_asm.s rename to lib/sdk/crt/string/i386/strncmp_asm.s diff --git a/reactos/lib/sdk/crt/string/i386/strncpy_asm.s b/lib/sdk/crt/string/i386/strncpy_asm.s similarity index 100% rename from reactos/lib/sdk/crt/string/i386/strncpy_asm.s rename to lib/sdk/crt/string/i386/strncpy_asm.s diff --git a/reactos/lib/sdk/crt/string/i386/strnlen_asm.s b/lib/sdk/crt/string/i386/strnlen_asm.s similarity index 100% rename from reactos/lib/sdk/crt/string/i386/strnlen_asm.s rename to lib/sdk/crt/string/i386/strnlen_asm.s diff --git a/reactos/lib/sdk/crt/string/i386/strrchr_asm.s b/lib/sdk/crt/string/i386/strrchr_asm.s similarity index 100% rename from reactos/lib/sdk/crt/string/i386/strrchr_asm.s rename to lib/sdk/crt/string/i386/strrchr_asm.s diff --git a/reactos/lib/sdk/crt/string/i386/tchar.h b/lib/sdk/crt/string/i386/tchar.h similarity index 100% rename from reactos/lib/sdk/crt/string/i386/tchar.h rename to lib/sdk/crt/string/i386/tchar.h diff --git a/reactos/lib/sdk/crt/string/i386/tcscat.inc b/lib/sdk/crt/string/i386/tcscat.inc similarity index 100% rename from reactos/lib/sdk/crt/string/i386/tcscat.inc rename to lib/sdk/crt/string/i386/tcscat.inc diff --git a/reactos/lib/sdk/crt/string/i386/tcschr.inc b/lib/sdk/crt/string/i386/tcschr.inc similarity index 100% rename from reactos/lib/sdk/crt/string/i386/tcschr.inc rename to lib/sdk/crt/string/i386/tcschr.inc diff --git a/reactos/lib/sdk/crt/string/i386/tcscmp.inc b/lib/sdk/crt/string/i386/tcscmp.inc similarity index 100% rename from reactos/lib/sdk/crt/string/i386/tcscmp.inc rename to lib/sdk/crt/string/i386/tcscmp.inc diff --git a/reactos/lib/sdk/crt/string/i386/tcscpy.inc b/lib/sdk/crt/string/i386/tcscpy.inc similarity index 100% rename from reactos/lib/sdk/crt/string/i386/tcscpy.inc rename to lib/sdk/crt/string/i386/tcscpy.inc diff --git a/reactos/lib/sdk/crt/string/i386/tcslen.inc b/lib/sdk/crt/string/i386/tcslen.inc similarity index 100% rename from reactos/lib/sdk/crt/string/i386/tcslen.inc rename to lib/sdk/crt/string/i386/tcslen.inc diff --git a/reactos/lib/sdk/crt/string/i386/tcsncat.inc b/lib/sdk/crt/string/i386/tcsncat.inc similarity index 100% rename from reactos/lib/sdk/crt/string/i386/tcsncat.inc rename to lib/sdk/crt/string/i386/tcsncat.inc diff --git a/reactos/lib/sdk/crt/string/i386/tcsncmp.inc b/lib/sdk/crt/string/i386/tcsncmp.inc similarity index 100% rename from reactos/lib/sdk/crt/string/i386/tcsncmp.inc rename to lib/sdk/crt/string/i386/tcsncmp.inc diff --git a/reactos/lib/sdk/crt/string/i386/tcsncpy.inc b/lib/sdk/crt/string/i386/tcsncpy.inc similarity index 100% rename from reactos/lib/sdk/crt/string/i386/tcsncpy.inc rename to lib/sdk/crt/string/i386/tcsncpy.inc diff --git a/reactos/lib/sdk/crt/string/i386/tcsnlen.inc b/lib/sdk/crt/string/i386/tcsnlen.inc similarity index 100% rename from reactos/lib/sdk/crt/string/i386/tcsnlen.inc rename to lib/sdk/crt/string/i386/tcsnlen.inc diff --git a/reactos/lib/sdk/crt/string/i386/tcsrchr.inc b/lib/sdk/crt/string/i386/tcsrchr.inc similarity index 100% rename from reactos/lib/sdk/crt/string/i386/tcsrchr.inc rename to lib/sdk/crt/string/i386/tcsrchr.inc diff --git a/reactos/lib/sdk/crt/string/i386/wcscat_asm.s b/lib/sdk/crt/string/i386/wcscat_asm.s similarity index 100% rename from reactos/lib/sdk/crt/string/i386/wcscat_asm.s rename to lib/sdk/crt/string/i386/wcscat_asm.s diff --git a/reactos/lib/sdk/crt/string/i386/wcschr_asm.s b/lib/sdk/crt/string/i386/wcschr_asm.s similarity index 100% rename from reactos/lib/sdk/crt/string/i386/wcschr_asm.s rename to lib/sdk/crt/string/i386/wcschr_asm.s diff --git a/reactos/lib/sdk/crt/string/i386/wcscmp_asm.s b/lib/sdk/crt/string/i386/wcscmp_asm.s similarity index 100% rename from reactos/lib/sdk/crt/string/i386/wcscmp_asm.s rename to lib/sdk/crt/string/i386/wcscmp_asm.s diff --git a/reactos/lib/sdk/crt/string/i386/wcscpy_asm.s b/lib/sdk/crt/string/i386/wcscpy_asm.s similarity index 100% rename from reactos/lib/sdk/crt/string/i386/wcscpy_asm.s rename to lib/sdk/crt/string/i386/wcscpy_asm.s diff --git a/reactos/lib/sdk/crt/string/i386/wcslen_asm.s b/lib/sdk/crt/string/i386/wcslen_asm.s similarity index 100% rename from reactos/lib/sdk/crt/string/i386/wcslen_asm.s rename to lib/sdk/crt/string/i386/wcslen_asm.s diff --git a/reactos/lib/sdk/crt/string/i386/wcsncat_asm.s b/lib/sdk/crt/string/i386/wcsncat_asm.s similarity index 100% rename from reactos/lib/sdk/crt/string/i386/wcsncat_asm.s rename to lib/sdk/crt/string/i386/wcsncat_asm.s diff --git a/reactos/lib/sdk/crt/string/i386/wcsncmp_asm.s b/lib/sdk/crt/string/i386/wcsncmp_asm.s similarity index 100% rename from reactos/lib/sdk/crt/string/i386/wcsncmp_asm.s rename to lib/sdk/crt/string/i386/wcsncmp_asm.s diff --git a/reactos/lib/sdk/crt/string/i386/wcsncpy_asm.s b/lib/sdk/crt/string/i386/wcsncpy_asm.s similarity index 100% rename from reactos/lib/sdk/crt/string/i386/wcsncpy_asm.s rename to lib/sdk/crt/string/i386/wcsncpy_asm.s diff --git a/reactos/lib/sdk/crt/string/i386/wcsnlen_asm.s b/lib/sdk/crt/string/i386/wcsnlen_asm.s similarity index 100% rename from reactos/lib/sdk/crt/string/i386/wcsnlen_asm.s rename to lib/sdk/crt/string/i386/wcsnlen_asm.s diff --git a/reactos/lib/sdk/crt/string/i386/wcsrchr_asm.s b/lib/sdk/crt/string/i386/wcsrchr_asm.s similarity index 100% rename from reactos/lib/sdk/crt/string/i386/wcsrchr_asm.s rename to lib/sdk/crt/string/i386/wcsrchr_asm.s diff --git a/reactos/lib/sdk/crt/string/itoa.c b/lib/sdk/crt/string/itoa.c similarity index 100% rename from reactos/lib/sdk/crt/string/itoa.c rename to lib/sdk/crt/string/itoa.c diff --git a/reactos/lib/sdk/crt/string/itow.c b/lib/sdk/crt/string/itow.c similarity index 100% rename from reactos/lib/sdk/crt/string/itow.c rename to lib/sdk/crt/string/itow.c diff --git a/reactos/lib/sdk/crt/string/mbstowcs_nt.c b/lib/sdk/crt/string/mbstowcs_nt.c similarity index 100% rename from reactos/lib/sdk/crt/string/mbstowcs_nt.c rename to lib/sdk/crt/string/mbstowcs_nt.c diff --git a/reactos/lib/sdk/crt/string/scanf.c b/lib/sdk/crt/string/scanf.c similarity index 100% rename from reactos/lib/sdk/crt/string/scanf.c rename to lib/sdk/crt/string/scanf.c diff --git a/reactos/lib/sdk/crt/string/scanf.h b/lib/sdk/crt/string/scanf.h similarity index 100% rename from reactos/lib/sdk/crt/string/scanf.h rename to lib/sdk/crt/string/scanf.h diff --git a/reactos/lib/sdk/crt/string/splitp.c b/lib/sdk/crt/string/splitp.c similarity index 100% rename from reactos/lib/sdk/crt/string/splitp.c rename to lib/sdk/crt/string/splitp.c diff --git a/reactos/lib/sdk/crt/string/strcat.c b/lib/sdk/crt/string/strcat.c similarity index 100% rename from reactos/lib/sdk/crt/string/strcat.c rename to lib/sdk/crt/string/strcat.c diff --git a/reactos/lib/sdk/crt/string/strchr.c b/lib/sdk/crt/string/strchr.c similarity index 100% rename from reactos/lib/sdk/crt/string/strchr.c rename to lib/sdk/crt/string/strchr.c diff --git a/reactos/lib/sdk/crt/string/strcmp.c b/lib/sdk/crt/string/strcmp.c similarity index 100% rename from reactos/lib/sdk/crt/string/strcmp.c rename to lib/sdk/crt/string/strcmp.c diff --git a/reactos/lib/sdk/crt/string/strcoll.c b/lib/sdk/crt/string/strcoll.c similarity index 100% rename from reactos/lib/sdk/crt/string/strcoll.c rename to lib/sdk/crt/string/strcoll.c diff --git a/reactos/lib/sdk/crt/string/strcpy.c b/lib/sdk/crt/string/strcpy.c similarity index 100% rename from reactos/lib/sdk/crt/string/strcpy.c rename to lib/sdk/crt/string/strcpy.c diff --git a/reactos/lib/sdk/crt/string/strcspn.c b/lib/sdk/crt/string/strcspn.c similarity index 100% rename from reactos/lib/sdk/crt/string/strcspn.c rename to lib/sdk/crt/string/strcspn.c diff --git a/reactos/lib/sdk/crt/string/strdup.c b/lib/sdk/crt/string/strdup.c similarity index 100% rename from reactos/lib/sdk/crt/string/strdup.c rename to lib/sdk/crt/string/strdup.c diff --git a/reactos/lib/sdk/crt/string/strerror.c b/lib/sdk/crt/string/strerror.c similarity index 100% rename from reactos/lib/sdk/crt/string/strerror.c rename to lib/sdk/crt/string/strerror.c diff --git a/reactos/lib/sdk/crt/string/stricmp.c b/lib/sdk/crt/string/stricmp.c similarity index 100% rename from reactos/lib/sdk/crt/string/stricmp.c rename to lib/sdk/crt/string/stricmp.c diff --git a/reactos/lib/sdk/crt/string/string.c b/lib/sdk/crt/string/string.c similarity index 100% rename from reactos/lib/sdk/crt/string/string.c rename to lib/sdk/crt/string/string.c diff --git a/reactos/lib/sdk/crt/string/strlen.c b/lib/sdk/crt/string/strlen.c similarity index 100% rename from reactos/lib/sdk/crt/string/strlen.c rename to lib/sdk/crt/string/strlen.c diff --git a/reactos/lib/sdk/crt/string/strlwr.c b/lib/sdk/crt/string/strlwr.c similarity index 100% rename from reactos/lib/sdk/crt/string/strlwr.c rename to lib/sdk/crt/string/strlwr.c diff --git a/reactos/lib/sdk/crt/string/strncat.c b/lib/sdk/crt/string/strncat.c similarity index 100% rename from reactos/lib/sdk/crt/string/strncat.c rename to lib/sdk/crt/string/strncat.c diff --git a/reactos/lib/sdk/crt/string/strncmp.c b/lib/sdk/crt/string/strncmp.c similarity index 100% rename from reactos/lib/sdk/crt/string/strncmp.c rename to lib/sdk/crt/string/strncmp.c diff --git a/reactos/lib/sdk/crt/string/strncoll.c b/lib/sdk/crt/string/strncoll.c similarity index 100% rename from reactos/lib/sdk/crt/string/strncoll.c rename to lib/sdk/crt/string/strncoll.c diff --git a/reactos/lib/sdk/crt/string/strncpy.c b/lib/sdk/crt/string/strncpy.c similarity index 100% rename from reactos/lib/sdk/crt/string/strncpy.c rename to lib/sdk/crt/string/strncpy.c diff --git a/reactos/lib/sdk/crt/string/strnicmp.c b/lib/sdk/crt/string/strnicmp.c similarity index 100% rename from reactos/lib/sdk/crt/string/strnicmp.c rename to lib/sdk/crt/string/strnicmp.c diff --git a/reactos/lib/sdk/crt/string/strnlen.c b/lib/sdk/crt/string/strnlen.c similarity index 100% rename from reactos/lib/sdk/crt/string/strnlen.c rename to lib/sdk/crt/string/strnlen.c diff --git a/reactos/lib/sdk/crt/string/strpbrk.c b/lib/sdk/crt/string/strpbrk.c similarity index 100% rename from reactos/lib/sdk/crt/string/strpbrk.c rename to lib/sdk/crt/string/strpbrk.c diff --git a/reactos/lib/sdk/crt/string/strrchr.c b/lib/sdk/crt/string/strrchr.c similarity index 100% rename from reactos/lib/sdk/crt/string/strrchr.c rename to lib/sdk/crt/string/strrchr.c diff --git a/reactos/lib/sdk/crt/string/strrev.c b/lib/sdk/crt/string/strrev.c similarity index 100% rename from reactos/lib/sdk/crt/string/strrev.c rename to lib/sdk/crt/string/strrev.c diff --git a/reactos/lib/sdk/crt/string/strset.c b/lib/sdk/crt/string/strset.c similarity index 100% rename from reactos/lib/sdk/crt/string/strset.c rename to lib/sdk/crt/string/strset.c diff --git a/reactos/lib/sdk/crt/string/strspn.c b/lib/sdk/crt/string/strspn.c similarity index 100% rename from reactos/lib/sdk/crt/string/strspn.c rename to lib/sdk/crt/string/strspn.c diff --git a/reactos/lib/sdk/crt/string/strstr.c b/lib/sdk/crt/string/strstr.c similarity index 100% rename from reactos/lib/sdk/crt/string/strstr.c rename to lib/sdk/crt/string/strstr.c diff --git a/reactos/lib/sdk/crt/string/strtod.c b/lib/sdk/crt/string/strtod.c similarity index 100% rename from reactos/lib/sdk/crt/string/strtod.c rename to lib/sdk/crt/string/strtod.c diff --git a/reactos/lib/sdk/crt/string/strtoi64.c b/lib/sdk/crt/string/strtoi64.c similarity index 100% rename from reactos/lib/sdk/crt/string/strtoi64.c rename to lib/sdk/crt/string/strtoi64.c diff --git a/reactos/lib/sdk/crt/string/strtok.c b/lib/sdk/crt/string/strtok.c similarity index 100% rename from reactos/lib/sdk/crt/string/strtok.c rename to lib/sdk/crt/string/strtok.c diff --git a/reactos/lib/sdk/crt/string/strtol.c b/lib/sdk/crt/string/strtol.c similarity index 100% rename from reactos/lib/sdk/crt/string/strtol.c rename to lib/sdk/crt/string/strtol.c diff --git a/reactos/lib/sdk/crt/string/strtold.c b/lib/sdk/crt/string/strtold.c similarity index 100% rename from reactos/lib/sdk/crt/string/strtold.c rename to lib/sdk/crt/string/strtold.c diff --git a/reactos/lib/sdk/crt/string/strtoul.c b/lib/sdk/crt/string/strtoul.c similarity index 100% rename from reactos/lib/sdk/crt/string/strtoul.c rename to lib/sdk/crt/string/strtoul.c diff --git a/reactos/lib/sdk/crt/string/strtoull.c b/lib/sdk/crt/string/strtoull.c similarity index 100% rename from reactos/lib/sdk/crt/string/strtoull.c rename to lib/sdk/crt/string/strtoull.c diff --git a/reactos/lib/sdk/crt/string/strupr.c b/lib/sdk/crt/string/strupr.c similarity index 100% rename from reactos/lib/sdk/crt/string/strupr.c rename to lib/sdk/crt/string/strupr.c diff --git a/reactos/lib/sdk/crt/string/strxfrm.c b/lib/sdk/crt/string/strxfrm.c similarity index 100% rename from reactos/lib/sdk/crt/string/strxfrm.c rename to lib/sdk/crt/string/strxfrm.c diff --git a/reactos/lib/sdk/crt/string/strxspn.h b/lib/sdk/crt/string/strxspn.h similarity index 100% rename from reactos/lib/sdk/crt/string/strxspn.h rename to lib/sdk/crt/string/strxspn.h diff --git a/reactos/lib/sdk/crt/string/tcscat.h b/lib/sdk/crt/string/tcscat.h similarity index 100% rename from reactos/lib/sdk/crt/string/tcscat.h rename to lib/sdk/crt/string/tcscat.h diff --git a/reactos/lib/sdk/crt/string/tcschr.h b/lib/sdk/crt/string/tcschr.h similarity index 100% rename from reactos/lib/sdk/crt/string/tcschr.h rename to lib/sdk/crt/string/tcschr.h diff --git a/reactos/lib/sdk/crt/string/tcscmp.h b/lib/sdk/crt/string/tcscmp.h similarity index 100% rename from reactos/lib/sdk/crt/string/tcscmp.h rename to lib/sdk/crt/string/tcscmp.h diff --git a/reactos/lib/sdk/crt/string/tcscpy.h b/lib/sdk/crt/string/tcscpy.h similarity index 100% rename from reactos/lib/sdk/crt/string/tcscpy.h rename to lib/sdk/crt/string/tcscpy.h diff --git a/reactos/lib/sdk/crt/string/tcslen.h b/lib/sdk/crt/string/tcslen.h similarity index 100% rename from reactos/lib/sdk/crt/string/tcslen.h rename to lib/sdk/crt/string/tcslen.h diff --git a/reactos/lib/sdk/crt/string/tcsncat.h b/lib/sdk/crt/string/tcsncat.h similarity index 100% rename from reactos/lib/sdk/crt/string/tcsncat.h rename to lib/sdk/crt/string/tcsncat.h diff --git a/reactos/lib/sdk/crt/string/tcsncmp.h b/lib/sdk/crt/string/tcsncmp.h similarity index 100% rename from reactos/lib/sdk/crt/string/tcsncmp.h rename to lib/sdk/crt/string/tcsncmp.h diff --git a/reactos/lib/sdk/crt/string/tcsncpy.h b/lib/sdk/crt/string/tcsncpy.h similarity index 100% rename from reactos/lib/sdk/crt/string/tcsncpy.h rename to lib/sdk/crt/string/tcsncpy.h diff --git a/reactos/lib/sdk/crt/string/tcsnlen.h b/lib/sdk/crt/string/tcsnlen.h similarity index 100% rename from reactos/lib/sdk/crt/string/tcsnlen.h rename to lib/sdk/crt/string/tcsnlen.h diff --git a/reactos/lib/sdk/crt/string/tcsrchr.h b/lib/sdk/crt/string/tcsrchr.h similarity index 100% rename from reactos/lib/sdk/crt/string/tcsrchr.h rename to lib/sdk/crt/string/tcsrchr.h diff --git a/reactos/lib/sdk/crt/string/wcs.c b/lib/sdk/crt/string/wcs.c similarity index 100% rename from reactos/lib/sdk/crt/string/wcs.c rename to lib/sdk/crt/string/wcs.c diff --git a/reactos/lib/sdk/crt/string/wcscat.c b/lib/sdk/crt/string/wcscat.c similarity index 100% rename from reactos/lib/sdk/crt/string/wcscat.c rename to lib/sdk/crt/string/wcscat.c diff --git a/reactos/lib/sdk/crt/string/wcschr.c b/lib/sdk/crt/string/wcschr.c similarity index 100% rename from reactos/lib/sdk/crt/string/wcschr.c rename to lib/sdk/crt/string/wcschr.c diff --git a/reactos/lib/sdk/crt/string/wcscmp.c b/lib/sdk/crt/string/wcscmp.c similarity index 100% rename from reactos/lib/sdk/crt/string/wcscmp.c rename to lib/sdk/crt/string/wcscmp.c diff --git a/reactos/lib/sdk/crt/string/wcscpy.c b/lib/sdk/crt/string/wcscpy.c similarity index 100% rename from reactos/lib/sdk/crt/string/wcscpy.c rename to lib/sdk/crt/string/wcscpy.c diff --git a/reactos/lib/sdk/crt/string/wcslen.c b/lib/sdk/crt/string/wcslen.c similarity index 100% rename from reactos/lib/sdk/crt/string/wcslen.c rename to lib/sdk/crt/string/wcslen.c diff --git a/reactos/lib/sdk/crt/string/wcsncat.c b/lib/sdk/crt/string/wcsncat.c similarity index 100% rename from reactos/lib/sdk/crt/string/wcsncat.c rename to lib/sdk/crt/string/wcsncat.c diff --git a/reactos/lib/sdk/crt/string/wcsncmp.c b/lib/sdk/crt/string/wcsncmp.c similarity index 100% rename from reactos/lib/sdk/crt/string/wcsncmp.c rename to lib/sdk/crt/string/wcsncmp.c diff --git a/reactos/lib/sdk/crt/string/wcsncpy.c b/lib/sdk/crt/string/wcsncpy.c similarity index 100% rename from reactos/lib/sdk/crt/string/wcsncpy.c rename to lib/sdk/crt/string/wcsncpy.c diff --git a/reactos/lib/sdk/crt/string/wcsnlen.c b/lib/sdk/crt/string/wcsnlen.c similarity index 100% rename from reactos/lib/sdk/crt/string/wcsnlen.c rename to lib/sdk/crt/string/wcsnlen.c diff --git a/reactos/lib/sdk/crt/string/wcsrchr.c b/lib/sdk/crt/string/wcsrchr.c similarity index 100% rename from reactos/lib/sdk/crt/string/wcsrchr.c rename to lib/sdk/crt/string/wcsrchr.c diff --git a/reactos/lib/sdk/crt/string/wcstod.c b/lib/sdk/crt/string/wcstod.c similarity index 100% rename from reactos/lib/sdk/crt/string/wcstod.c rename to lib/sdk/crt/string/wcstod.c diff --git a/reactos/lib/sdk/crt/string/wcstol.c b/lib/sdk/crt/string/wcstol.c similarity index 100% rename from reactos/lib/sdk/crt/string/wcstol.c rename to lib/sdk/crt/string/wcstol.c diff --git a/reactos/lib/sdk/crt/string/wcstombs_nt.c b/lib/sdk/crt/string/wcstombs_nt.c similarity index 100% rename from reactos/lib/sdk/crt/string/wcstombs_nt.c rename to lib/sdk/crt/string/wcstombs_nt.c diff --git a/reactos/lib/sdk/crt/string/wcstoul.c b/lib/sdk/crt/string/wcstoul.c similarity index 100% rename from reactos/lib/sdk/crt/string/wcstoul.c rename to lib/sdk/crt/string/wcstoul.c diff --git a/reactos/lib/sdk/crt/string/witoa.c b/lib/sdk/crt/string/witoa.c similarity index 100% rename from reactos/lib/sdk/crt/string/witoa.c rename to lib/sdk/crt/string/witoa.c diff --git a/reactos/lib/sdk/crt/string/witow.c b/lib/sdk/crt/string/witow.c similarity index 100% rename from reactos/lib/sdk/crt/string/witow.c rename to lib/sdk/crt/string/witow.c diff --git a/reactos/lib/sdk/crt/string/wsplitp.c b/lib/sdk/crt/string/wsplitp.c similarity index 100% rename from reactos/lib/sdk/crt/string/wsplitp.c rename to lib/sdk/crt/string/wsplitp.c diff --git a/reactos/lib/sdk/crt/string/wtoi.c b/lib/sdk/crt/string/wtoi.c similarity index 100% rename from reactos/lib/sdk/crt/string/wtoi.c rename to lib/sdk/crt/string/wtoi.c diff --git a/reactos/lib/sdk/crt/string/wtoi64.c b/lib/sdk/crt/string/wtoi64.c similarity index 100% rename from reactos/lib/sdk/crt/string/wtoi64.c rename to lib/sdk/crt/string/wtoi64.c diff --git a/reactos/lib/sdk/crt/string/wtol.c b/lib/sdk/crt/string/wtol.c similarity index 100% rename from reactos/lib/sdk/crt/string/wtol.c rename to lib/sdk/crt/string/wtol.c diff --git a/reactos/lib/sdk/crt/sys_stat/systime.c b/lib/sdk/crt/sys_stat/systime.c similarity index 100% rename from reactos/lib/sdk/crt/sys_stat/systime.c rename to lib/sdk/crt/sys_stat/systime.c diff --git a/reactos/lib/sdk/crt/time/asctime.c b/lib/sdk/crt/time/asctime.c similarity index 100% rename from reactos/lib/sdk/crt/time/asctime.c rename to lib/sdk/crt/time/asctime.c diff --git a/reactos/lib/sdk/crt/time/bitsfixup.h b/lib/sdk/crt/time/bitsfixup.h similarity index 100% rename from reactos/lib/sdk/crt/time/bitsfixup.h rename to lib/sdk/crt/time/bitsfixup.h diff --git a/reactos/lib/sdk/crt/time/clock.c b/lib/sdk/crt/time/clock.c similarity index 100% rename from reactos/lib/sdk/crt/time/clock.c rename to lib/sdk/crt/time/clock.c diff --git a/reactos/lib/sdk/crt/time/ctime.c b/lib/sdk/crt/time/ctime.c similarity index 100% rename from reactos/lib/sdk/crt/time/ctime.c rename to lib/sdk/crt/time/ctime.c diff --git a/reactos/lib/sdk/crt/time/ctime32.c b/lib/sdk/crt/time/ctime32.c similarity index 100% rename from reactos/lib/sdk/crt/time/ctime32.c rename to lib/sdk/crt/time/ctime32.c diff --git a/reactos/lib/sdk/crt/time/ctime64.c b/lib/sdk/crt/time/ctime64.c similarity index 100% rename from reactos/lib/sdk/crt/time/ctime64.c rename to lib/sdk/crt/time/ctime64.c diff --git a/reactos/lib/sdk/crt/time/difftime.c b/lib/sdk/crt/time/difftime.c similarity index 100% rename from reactos/lib/sdk/crt/time/difftime.c rename to lib/sdk/crt/time/difftime.c diff --git a/reactos/lib/sdk/crt/time/difftime32.c b/lib/sdk/crt/time/difftime32.c similarity index 100% rename from reactos/lib/sdk/crt/time/difftime32.c rename to lib/sdk/crt/time/difftime32.c diff --git a/reactos/lib/sdk/crt/time/difftime64.c b/lib/sdk/crt/time/difftime64.c similarity index 100% rename from reactos/lib/sdk/crt/time/difftime64.c rename to lib/sdk/crt/time/difftime64.c diff --git a/reactos/lib/sdk/crt/time/ftime.c b/lib/sdk/crt/time/ftime.c similarity index 100% rename from reactos/lib/sdk/crt/time/ftime.c rename to lib/sdk/crt/time/ftime.c diff --git a/reactos/lib/sdk/crt/time/ftime32.c b/lib/sdk/crt/time/ftime32.c similarity index 100% rename from reactos/lib/sdk/crt/time/ftime32.c rename to lib/sdk/crt/time/ftime32.c diff --git a/reactos/lib/sdk/crt/time/ftime64.c b/lib/sdk/crt/time/ftime64.c similarity index 100% rename from reactos/lib/sdk/crt/time/ftime64.c rename to lib/sdk/crt/time/ftime64.c diff --git a/reactos/lib/sdk/crt/time/futime.c b/lib/sdk/crt/time/futime.c similarity index 100% rename from reactos/lib/sdk/crt/time/futime.c rename to lib/sdk/crt/time/futime.c diff --git a/reactos/lib/sdk/crt/time/futime32.c b/lib/sdk/crt/time/futime32.c similarity index 100% rename from reactos/lib/sdk/crt/time/futime32.c rename to lib/sdk/crt/time/futime32.c diff --git a/reactos/lib/sdk/crt/time/futime64.c b/lib/sdk/crt/time/futime64.c similarity index 100% rename from reactos/lib/sdk/crt/time/futime64.c rename to lib/sdk/crt/time/futime64.c diff --git a/reactos/lib/sdk/crt/time/gmtime.c b/lib/sdk/crt/time/gmtime.c similarity index 100% rename from reactos/lib/sdk/crt/time/gmtime.c rename to lib/sdk/crt/time/gmtime.c diff --git a/reactos/lib/sdk/crt/time/localtime.c b/lib/sdk/crt/time/localtime.c similarity index 100% rename from reactos/lib/sdk/crt/time/localtime.c rename to lib/sdk/crt/time/localtime.c diff --git a/reactos/lib/sdk/crt/time/localtime32.c b/lib/sdk/crt/time/localtime32.c similarity index 100% rename from reactos/lib/sdk/crt/time/localtime32.c rename to lib/sdk/crt/time/localtime32.c diff --git a/reactos/lib/sdk/crt/time/localtime64.c b/lib/sdk/crt/time/localtime64.c similarity index 100% rename from reactos/lib/sdk/crt/time/localtime64.c rename to lib/sdk/crt/time/localtime64.c diff --git a/reactos/lib/sdk/crt/time/mktime.c b/lib/sdk/crt/time/mktime.c similarity index 100% rename from reactos/lib/sdk/crt/time/mktime.c rename to lib/sdk/crt/time/mktime.c diff --git a/reactos/lib/sdk/crt/time/strdate.c b/lib/sdk/crt/time/strdate.c similarity index 100% rename from reactos/lib/sdk/crt/time/strdate.c rename to lib/sdk/crt/time/strdate.c diff --git a/reactos/lib/sdk/crt/time/strftime.c b/lib/sdk/crt/time/strftime.c similarity index 100% rename from reactos/lib/sdk/crt/time/strftime.c rename to lib/sdk/crt/time/strftime.c diff --git a/reactos/lib/sdk/crt/time/strtime.c b/lib/sdk/crt/time/strtime.c similarity index 100% rename from reactos/lib/sdk/crt/time/strtime.c rename to lib/sdk/crt/time/strtime.c diff --git a/reactos/lib/sdk/crt/time/time.c b/lib/sdk/crt/time/time.c similarity index 100% rename from reactos/lib/sdk/crt/time/time.c rename to lib/sdk/crt/time/time.c diff --git a/reactos/lib/sdk/crt/time/time32.c b/lib/sdk/crt/time/time32.c similarity index 100% rename from reactos/lib/sdk/crt/time/time32.c rename to lib/sdk/crt/time/time32.c diff --git a/reactos/lib/sdk/crt/time/time64.c b/lib/sdk/crt/time/time64.c similarity index 100% rename from reactos/lib/sdk/crt/time/time64.c rename to lib/sdk/crt/time/time64.c diff --git a/reactos/lib/sdk/crt/time/timezone.c b/lib/sdk/crt/time/timezone.c similarity index 100% rename from reactos/lib/sdk/crt/time/timezone.c rename to lib/sdk/crt/time/timezone.c diff --git a/reactos/lib/sdk/crt/time/utime.c b/lib/sdk/crt/time/utime.c similarity index 100% rename from reactos/lib/sdk/crt/time/utime.c rename to lib/sdk/crt/time/utime.c diff --git a/reactos/lib/sdk/crt/time/utime32.c b/lib/sdk/crt/time/utime32.c similarity index 100% rename from reactos/lib/sdk/crt/time/utime32.c rename to lib/sdk/crt/time/utime32.c diff --git a/reactos/lib/sdk/crt/time/utime64.c b/lib/sdk/crt/time/utime64.c similarity index 100% rename from reactos/lib/sdk/crt/time/utime64.c rename to lib/sdk/crt/time/utime64.c diff --git a/reactos/lib/sdk/crt/time/wasctime.c b/lib/sdk/crt/time/wasctime.c similarity index 100% rename from reactos/lib/sdk/crt/time/wasctime.c rename to lib/sdk/crt/time/wasctime.c diff --git a/reactos/lib/sdk/crt/time/wcsftime.c b/lib/sdk/crt/time/wcsftime.c similarity index 100% rename from reactos/lib/sdk/crt/time/wcsftime.c rename to lib/sdk/crt/time/wcsftime.c diff --git a/reactos/lib/sdk/crt/time/wctime.c b/lib/sdk/crt/time/wctime.c similarity index 100% rename from reactos/lib/sdk/crt/time/wctime.c rename to lib/sdk/crt/time/wctime.c diff --git a/reactos/lib/sdk/crt/time/wctime32.c b/lib/sdk/crt/time/wctime32.c similarity index 100% rename from reactos/lib/sdk/crt/time/wctime32.c rename to lib/sdk/crt/time/wctime32.c diff --git a/reactos/lib/sdk/crt/time/wctime64.c b/lib/sdk/crt/time/wctime64.c similarity index 100% rename from reactos/lib/sdk/crt/time/wctime64.c rename to lib/sdk/crt/time/wctime64.c diff --git a/reactos/lib/sdk/crt/time/wstrdate.c b/lib/sdk/crt/time/wstrdate.c similarity index 100% rename from reactos/lib/sdk/crt/time/wstrdate.c rename to lib/sdk/crt/time/wstrdate.c diff --git a/reactos/lib/sdk/crt/time/wstrtime.c b/lib/sdk/crt/time/wstrtime.c similarity index 100% rename from reactos/lib/sdk/crt/time/wstrtime.c rename to lib/sdk/crt/time/wstrtime.c diff --git a/reactos/lib/sdk/crt/time/wutime.c b/lib/sdk/crt/time/wutime.c similarity index 100% rename from reactos/lib/sdk/crt/time/wutime.c rename to lib/sdk/crt/time/wutime.c diff --git a/reactos/lib/sdk/crt/time/wutime32.c b/lib/sdk/crt/time/wutime32.c similarity index 100% rename from reactos/lib/sdk/crt/time/wutime32.c rename to lib/sdk/crt/time/wutime32.c diff --git a/reactos/lib/sdk/crt/time/wutime64.c b/lib/sdk/crt/time/wutime64.c similarity index 100% rename from reactos/lib/sdk/crt/time/wutime64.c rename to lib/sdk/crt/time/wutime64.c diff --git a/reactos/lib/sdk/crt/wine/heap.c b/lib/sdk/crt/wine/heap.c similarity index 100% rename from reactos/lib/sdk/crt/wine/heap.c rename to lib/sdk/crt/wine/heap.c diff --git a/reactos/lib/sdk/crt/wine/undname.c b/lib/sdk/crt/wine/undname.c similarity index 100% rename from reactos/lib/sdk/crt/wine/undname.c rename to lib/sdk/crt/wine/undname.c diff --git a/reactos/lib/sdk/crt/wstring/wcscoll.c b/lib/sdk/crt/wstring/wcscoll.c similarity index 100% rename from reactos/lib/sdk/crt/wstring/wcscoll.c rename to lib/sdk/crt/wstring/wcscoll.c diff --git a/reactos/lib/sdk/crt/wstring/wcscspn.c b/lib/sdk/crt/wstring/wcscspn.c similarity index 100% rename from reactos/lib/sdk/crt/wstring/wcscspn.c rename to lib/sdk/crt/wstring/wcscspn.c diff --git a/reactos/lib/sdk/crt/wstring/wcsicmp.c b/lib/sdk/crt/wstring/wcsicmp.c similarity index 100% rename from reactos/lib/sdk/crt/wstring/wcsicmp.c rename to lib/sdk/crt/wstring/wcsicmp.c diff --git a/reactos/lib/sdk/crt/wstring/wcslwr.c b/lib/sdk/crt/wstring/wcslwr.c similarity index 100% rename from reactos/lib/sdk/crt/wstring/wcslwr.c rename to lib/sdk/crt/wstring/wcslwr.c diff --git a/reactos/lib/sdk/crt/wstring/wcsnicmp.c b/lib/sdk/crt/wstring/wcsnicmp.c similarity index 100% rename from reactos/lib/sdk/crt/wstring/wcsnicmp.c rename to lib/sdk/crt/wstring/wcsnicmp.c diff --git a/reactos/lib/sdk/crt/wstring/wcsspn.c b/lib/sdk/crt/wstring/wcsspn.c similarity index 100% rename from reactos/lib/sdk/crt/wstring/wcsspn.c rename to lib/sdk/crt/wstring/wcsspn.c diff --git a/reactos/lib/sdk/crt/wstring/wcsstr.c b/lib/sdk/crt/wstring/wcsstr.c similarity index 100% rename from reactos/lib/sdk/crt/wstring/wcsstr.c rename to lib/sdk/crt/wstring/wcsstr.c diff --git a/reactos/lib/sdk/crt/wstring/wcstok.c b/lib/sdk/crt/wstring/wcstok.c similarity index 100% rename from reactos/lib/sdk/crt/wstring/wcstok.c rename to lib/sdk/crt/wstring/wcstok.c diff --git a/reactos/lib/sdk/crt/wstring/wcsupr.c b/lib/sdk/crt/wstring/wcsupr.c similarity index 100% rename from reactos/lib/sdk/crt/wstring/wcsupr.c rename to lib/sdk/crt/wstring/wcsupr.c diff --git a/reactos/lib/sdk/crt/wstring/wcsxfrm.c b/lib/sdk/crt/wstring/wcsxfrm.c similarity index 100% rename from reactos/lib/sdk/crt/wstring/wcsxfrm.c rename to lib/sdk/crt/wstring/wcsxfrm.c diff --git a/reactos/lib/sdk/delayimp/CMakeLists.txt b/lib/sdk/delayimp/CMakeLists.txt similarity index 100% rename from reactos/lib/sdk/delayimp/CMakeLists.txt rename to lib/sdk/delayimp/CMakeLists.txt diff --git a/reactos/lib/sdk/delayimp/delayimp.c b/lib/sdk/delayimp/delayimp.c similarity index 100% rename from reactos/lib/sdk/delayimp/delayimp.c rename to lib/sdk/delayimp/delayimp.c diff --git a/reactos/lib/sdk/delayimp/delayimp.rbuild b/lib/sdk/delayimp/delayimp.rbuild similarity index 100% rename from reactos/lib/sdk/delayimp/delayimp.rbuild rename to lib/sdk/delayimp/delayimp.rbuild diff --git a/reactos/lib/sdk/dxguid/CMakeLists.txt b/lib/sdk/dxguid/CMakeLists.txt similarity index 100% rename from reactos/lib/sdk/dxguid/CMakeLists.txt rename to lib/sdk/dxguid/CMakeLists.txt diff --git a/reactos/lib/sdk/dxguid/dxguid-mingw.c b/lib/sdk/dxguid/dxguid-mingw.c similarity index 100% rename from reactos/lib/sdk/dxguid/dxguid-mingw.c rename to lib/sdk/dxguid/dxguid-mingw.c diff --git a/reactos/lib/sdk/dxguid/dxguid.rbuild b/lib/sdk/dxguid/dxguid.rbuild similarity index 100% rename from reactos/lib/sdk/dxguid/dxguid.rbuild rename to lib/sdk/dxguid/dxguid.rbuild diff --git a/reactos/lib/sdk/ioevent/CMakeLists.txt b/lib/sdk/ioevent/CMakeLists.txt similarity index 100% rename from reactos/lib/sdk/ioevent/CMakeLists.txt rename to lib/sdk/ioevent/CMakeLists.txt diff --git a/reactos/lib/sdk/ioevent/ioevent.c b/lib/sdk/ioevent/ioevent.c similarity index 100% rename from reactos/lib/sdk/ioevent/ioevent.c rename to lib/sdk/ioevent/ioevent.c diff --git a/reactos/lib/sdk/ioevent/ioevent.rbuild b/lib/sdk/ioevent/ioevent.rbuild similarity index 100% rename from reactos/lib/sdk/ioevent/ioevent.rbuild rename to lib/sdk/ioevent/ioevent.rbuild diff --git a/reactos/lib/sdk/nt/CMakeLists.txt b/lib/sdk/nt/CMakeLists.txt similarity index 100% rename from reactos/lib/sdk/nt/CMakeLists.txt rename to lib/sdk/nt/CMakeLists.txt diff --git a/reactos/lib/sdk/nt/entry_point.c b/lib/sdk/nt/entry_point.c similarity index 100% rename from reactos/lib/sdk/nt/entry_point.c rename to lib/sdk/nt/entry_point.c diff --git a/reactos/lib/sdk/nt/nt.rbuild b/lib/sdk/nt/nt.rbuild similarity index 100% rename from reactos/lib/sdk/nt/nt.rbuild rename to lib/sdk/nt/nt.rbuild diff --git a/reactos/lib/sdk/nt/readme.txt b/lib/sdk/nt/readme.txt similarity index 100% rename from reactos/lib/sdk/nt/readme.txt rename to lib/sdk/nt/readme.txt diff --git a/reactos/lib/sdk/scrnsave/CMakeLists.txt b/lib/sdk/scrnsave/CMakeLists.txt similarity index 100% rename from reactos/lib/sdk/scrnsave/CMakeLists.txt rename to lib/sdk/scrnsave/CMakeLists.txt diff --git a/reactos/lib/sdk/scrnsave/scrnsave.c b/lib/sdk/scrnsave/scrnsave.c similarity index 100% rename from reactos/lib/sdk/scrnsave/scrnsave.c rename to lib/sdk/scrnsave/scrnsave.c diff --git a/reactos/lib/sdk/scrnsave/scrnsave.rbuild b/lib/sdk/scrnsave/scrnsave.rbuild similarity index 100% rename from reactos/lib/sdk/scrnsave/scrnsave.rbuild rename to lib/sdk/scrnsave/scrnsave.rbuild diff --git a/reactos/lib/sdk/sdk.rbuild b/lib/sdk/sdk.rbuild similarity index 100% rename from reactos/lib/sdk/sdk.rbuild rename to lib/sdk/sdk.rbuild diff --git a/reactos/lib/sdk/strmiids/CMakeLists.txt b/lib/sdk/strmiids/CMakeLists.txt similarity index 100% rename from reactos/lib/sdk/strmiids/CMakeLists.txt rename to lib/sdk/strmiids/CMakeLists.txt diff --git a/reactos/lib/sdk/strmiids/strmiids.c b/lib/sdk/strmiids/strmiids.c similarity index 100% rename from reactos/lib/sdk/strmiids/strmiids.c rename to lib/sdk/strmiids/strmiids.c diff --git a/reactos/lib/sdk/strmiids/strmiids.rbuild b/lib/sdk/strmiids/strmiids.rbuild similarity index 100% rename from reactos/lib/sdk/strmiids/strmiids.rbuild rename to lib/sdk/strmiids/strmiids.rbuild diff --git a/reactos/lib/sdk/uuid/CMakeLists.txt b/lib/sdk/uuid/CMakeLists.txt similarity index 100% rename from reactos/lib/sdk/uuid/CMakeLists.txt rename to lib/sdk/uuid/CMakeLists.txt diff --git a/reactos/lib/sdk/uuid/bthguid.c b/lib/sdk/uuid/bthguid.c similarity index 100% rename from reactos/lib/sdk/uuid/bthguid.c rename to lib/sdk/uuid/bthguid.c diff --git a/reactos/lib/sdk/uuid/cguid_i.c b/lib/sdk/uuid/cguid_i.c similarity index 100% rename from reactos/lib/sdk/uuid/cguid_i.c rename to lib/sdk/uuid/cguid_i.c diff --git a/reactos/lib/sdk/uuid/cluscfgguids.c b/lib/sdk/uuid/cluscfgguids.c similarity index 100% rename from reactos/lib/sdk/uuid/cluscfgguids.c rename to lib/sdk/uuid/cluscfgguids.c diff --git a/reactos/lib/sdk/uuid/cmdtreeiid.c b/lib/sdk/uuid/cmdtreeiid.c similarity index 100% rename from reactos/lib/sdk/uuid/cmdtreeiid.c rename to lib/sdk/uuid/cmdtreeiid.c diff --git a/reactos/lib/sdk/uuid/hnclsid.c b/lib/sdk/uuid/hnclsid.c similarity index 100% rename from reactos/lib/sdk/uuid/hnclsid.c rename to lib/sdk/uuid/hnclsid.c diff --git a/reactos/lib/sdk/uuid/ieguids.c b/lib/sdk/uuid/ieguids.c similarity index 100% rename from reactos/lib/sdk/uuid/ieguids.c rename to lib/sdk/uuid/ieguids.c diff --git a/reactos/lib/sdk/uuid/iid.c b/lib/sdk/uuid/iid.c similarity index 100% rename from reactos/lib/sdk/uuid/iid.c rename to lib/sdk/uuid/iid.c diff --git a/reactos/lib/sdk/uuid/ncclsid.c b/lib/sdk/uuid/ncclsid.c similarity index 100% rename from reactos/lib/sdk/uuid/ncclsid.c rename to lib/sdk/uuid/ncclsid.c diff --git a/reactos/lib/sdk/uuid/ndisguid.c b/lib/sdk/uuid/ndisguid.c similarity index 100% rename from reactos/lib/sdk/uuid/ndisguid.c rename to lib/sdk/uuid/ndisguid.c diff --git a/reactos/lib/sdk/uuid/netfwv6clsid.c b/lib/sdk/uuid/netfwv6clsid.c similarity index 100% rename from reactos/lib/sdk/uuid/netfwv6clsid.c rename to lib/sdk/uuid/netfwv6clsid.c diff --git a/reactos/lib/sdk/uuid/oledbdat.c b/lib/sdk/uuid/oledbdat.c similarity index 100% rename from reactos/lib/sdk/uuid/oledbdat.c rename to lib/sdk/uuid/oledbdat.c diff --git a/reactos/lib/sdk/uuid/oledbdepiid.c b/lib/sdk/uuid/oledbdepiid.c similarity index 100% rename from reactos/lib/sdk/uuid/oledbdepiid.c rename to lib/sdk/uuid/oledbdepiid.c diff --git a/reactos/lib/sdk/uuid/oledbiid.c b/lib/sdk/uuid/oledbiid.c similarity index 100% rename from reactos/lib/sdk/uuid/oledbiid.c rename to lib/sdk/uuid/oledbiid.c diff --git a/reactos/lib/sdk/uuid/oledbnewiid.c b/lib/sdk/uuid/oledbnewiid.c similarity index 100% rename from reactos/lib/sdk/uuid/oledbnewiid.c rename to lib/sdk/uuid/oledbnewiid.c diff --git a/reactos/lib/sdk/uuid/otherguids.c b/lib/sdk/uuid/otherguids.c similarity index 100% rename from reactos/lib/sdk/uuid/otherguids.c rename to lib/sdk/uuid/otherguids.c diff --git a/reactos/lib/sdk/uuid/qosguid.c b/lib/sdk/uuid/qosguid.c similarity index 100% rename from reactos/lib/sdk/uuid/qosguid.c rename to lib/sdk/uuid/qosguid.c diff --git a/reactos/lib/sdk/uuid/shguids.c b/lib/sdk/uuid/shguids.c similarity index 100% rename from reactos/lib/sdk/uuid/shguids.c rename to lib/sdk/uuid/shguids.c diff --git a/reactos/lib/sdk/uuid/tapi3iid.c b/lib/sdk/uuid/tapi3iid.c similarity index 100% rename from reactos/lib/sdk/uuid/tapi3iid.c rename to lib/sdk/uuid/tapi3iid.c diff --git a/reactos/lib/sdk/uuid/undoc.c b/lib/sdk/uuid/undoc.c similarity index 100% rename from reactos/lib/sdk/uuid/undoc.c rename to lib/sdk/uuid/undoc.c diff --git a/reactos/lib/sdk/uuid/uuid.c b/lib/sdk/uuid/uuid.c similarity index 100% rename from reactos/lib/sdk/uuid/uuid.c rename to lib/sdk/uuid/uuid.c diff --git a/reactos/lib/sdk/uuid/uuid.rbuild b/lib/sdk/uuid/uuid.rbuild similarity index 100% rename from reactos/lib/sdk/uuid/uuid.rbuild rename to lib/sdk/uuid/uuid.rbuild diff --git a/reactos/lib/sdk/uuid/vcguids.c b/lib/sdk/uuid/vcguids.c similarity index 100% rename from reactos/lib/sdk/uuid/vcguids.c rename to lib/sdk/uuid/vcguids.c diff --git a/reactos/lib/sdk/uuid/wdmguids.c b/lib/sdk/uuid/wdmguids.c similarity index 100% rename from reactos/lib/sdk/uuid/wdmguids.c rename to lib/sdk/uuid/wdmguids.c diff --git a/reactos/lib/sdk/wdmguid/CMakeLists.txt b/lib/sdk/wdmguid/CMakeLists.txt similarity index 100% rename from reactos/lib/sdk/wdmguid/CMakeLists.txt rename to lib/sdk/wdmguid/CMakeLists.txt diff --git a/reactos/lib/sdk/wdmguid/wdmguid.c b/lib/sdk/wdmguid/wdmguid.c similarity index 100% rename from reactos/lib/sdk/wdmguid/wdmguid.c rename to lib/sdk/wdmguid/wdmguid.c diff --git a/reactos/lib/sdk/wdmguid/wdmguid.rbuild b/lib/sdk/wdmguid/wdmguid.rbuild similarity index 100% rename from reactos/lib/sdk/wdmguid/wdmguid.rbuild rename to lib/sdk/wdmguid/wdmguid.rbuild diff --git a/reactos/lib/smlib/CMakeLists.txt b/lib/smlib/CMakeLists.txt similarity index 100% rename from reactos/lib/smlib/CMakeLists.txt rename to lib/smlib/CMakeLists.txt diff --git a/reactos/lib/smlib/compses.c b/lib/smlib/compses.c similarity index 100% rename from reactos/lib/smlib/compses.c rename to lib/smlib/compses.c diff --git a/reactos/lib/smlib/connect.c b/lib/smlib/connect.c similarity index 100% rename from reactos/lib/smlib/connect.c rename to lib/smlib/connect.c diff --git a/reactos/lib/smlib/execpgm.c b/lib/smlib/execpgm.c similarity index 100% rename from reactos/lib/smlib/execpgm.c rename to lib/smlib/execpgm.c diff --git a/reactos/lib/smlib/lookupss.c b/lib/smlib/lookupss.c similarity index 100% rename from reactos/lib/smlib/lookupss.c rename to lib/smlib/lookupss.c diff --git a/reactos/lib/smlib/precomp.h b/lib/smlib/precomp.h similarity index 100% rename from reactos/lib/smlib/precomp.h rename to lib/smlib/precomp.h diff --git a/reactos/lib/smlib/smlib.rbuild b/lib/smlib/smlib.rbuild similarity index 100% rename from reactos/lib/smlib/smlib.rbuild rename to lib/smlib/smlib.rbuild diff --git a/reactos/lib/tdilib/CMakeLists.txt b/lib/tdilib/CMakeLists.txt similarity index 100% rename from reactos/lib/tdilib/CMakeLists.txt rename to lib/tdilib/CMakeLists.txt diff --git a/reactos/lib/tdilib/enum.c b/lib/tdilib/enum.c similarity index 100% rename from reactos/lib/tdilib/enum.c rename to lib/tdilib/enum.c diff --git a/reactos/lib/tdilib/handle.c b/lib/tdilib/handle.c similarity index 100% rename from reactos/lib/tdilib/handle.c rename to lib/tdilib/handle.c diff --git a/reactos/lib/tdilib/tdilib.h b/lib/tdilib/tdilib.h similarity index 100% rename from reactos/lib/tdilib/tdilib.h rename to lib/tdilib/tdilib.h diff --git a/reactos/lib/tdilib/tdilib.rbuild b/lib/tdilib/tdilib.rbuild similarity index 100% rename from reactos/lib/tdilib/tdilib.rbuild rename to lib/tdilib/tdilib.rbuild diff --git a/reactos/media/CMakeLists.txt b/media/CMakeLists.txt similarity index 100% rename from reactos/media/CMakeLists.txt rename to media/CMakeLists.txt diff --git a/reactos/media/doc/3rd Party Files.txt b/media/doc/3rd Party Files.txt similarity index 100% rename from reactos/media/doc/3rd Party Files.txt rename to media/doc/3rd Party Files.txt diff --git a/reactos/media/doc/DdCreateDirectDrawObject.txt b/media/doc/DdCreateDirectDrawObject.txt similarity index 100% rename from reactos/media/doc/DdCreateDirectDrawObject.txt rename to media/doc/DdCreateDirectDrawObject.txt diff --git a/reactos/media/doc/DdDeleteDirectDrawObject.txt b/media/doc/DdDeleteDirectDrawObject.txt similarity index 100% rename from reactos/media/doc/DdDeleteDirectDrawObject.txt rename to media/doc/DdDeleteDirectDrawObject.txt diff --git a/reactos/media/doc/HACKING b/media/doc/HACKING similarity index 100% rename from reactos/media/doc/HACKING rename to media/doc/HACKING diff --git a/reactos/media/doc/INDEX b/media/doc/INDEX similarity index 100% rename from reactos/media/doc/INDEX rename to media/doc/INDEX diff --git a/reactos/media/doc/INTERNALS b/media/doc/INTERNALS similarity index 100% rename from reactos/media/doc/INTERNALS rename to media/doc/INTERNALS diff --git a/reactos/media/doc/LPC.txt b/media/doc/LPC.txt similarity index 100% rename from reactos/media/doc/LPC.txt rename to media/doc/LPC.txt diff --git a/reactos/media/doc/README.WINE b/media/doc/README.WINE similarity index 100% rename from reactos/media/doc/README.WINE rename to media/doc/README.WINE diff --git a/reactos/media/doc/apc b/media/doc/apc similarity index 100% rename from reactos/media/doc/apc rename to media/doc/apc diff --git a/reactos/media/doc/books.txt b/media/doc/books.txt similarity index 100% rename from reactos/media/doc/books.txt rename to media/doc/books.txt diff --git a/reactos/media/doc/irp cancel boilerplate.c b/media/doc/irp cancel boilerplate.c similarity index 100% rename from reactos/media/doc/irp cancel boilerplate.c rename to media/doc/irp cancel boilerplate.c diff --git a/reactos/media/doc/locks.txt b/media/doc/locks.txt similarity index 100% rename from reactos/media/doc/locks.txt rename to media/doc/locks.txt diff --git a/reactos/media/doc/news1 b/media/doc/news1 similarity index 100% rename from reactos/media/doc/news1 rename to media/doc/news1 diff --git a/reactos/media/doc/news2 b/media/doc/news2 similarity index 100% rename from reactos/media/doc/news2 rename to media/doc/news2 diff --git a/reactos/media/doc/notes b/media/doc/notes similarity index 100% rename from reactos/media/doc/notes rename to media/doc/notes diff --git a/reactos/media/doc/todo b/media/doc/todo similarity index 100% rename from reactos/media/doc/todo rename to media/doc/todo diff --git a/reactos/media/doc/win32k_refs.txt b/media/doc/win32k_refs.txt similarity index 100% rename from reactos/media/doc/win32k_refs.txt rename to media/doc/win32k_refs.txt diff --git a/reactos/media/doc/winsta and desktops.txt b/media/doc/winsta and desktops.txt similarity index 100% rename from reactos/media/doc/winsta and desktops.txt rename to media/doc/winsta and desktops.txt diff --git a/reactos/media/drivers/drivers.rbuild b/media/drivers/drivers.rbuild similarity index 100% rename from reactos/media/drivers/drivers.rbuild rename to media/drivers/drivers.rbuild diff --git a/reactos/media/drivers/etc/KDBinit b/media/drivers/etc/KDBinit similarity index 100% rename from reactos/media/drivers/etc/KDBinit rename to media/drivers/etc/KDBinit diff --git a/reactos/media/drivers/etc/etc.rbuild b/media/drivers/etc/etc.rbuild similarity index 100% rename from reactos/media/drivers/etc/etc.rbuild rename to media/drivers/etc/etc.rbuild diff --git a/reactos/media/drivers/etc/hosts b/media/drivers/etc/hosts similarity index 100% rename from reactos/media/drivers/etc/hosts rename to media/drivers/etc/hosts diff --git a/reactos/media/drivers/etc/services b/media/drivers/etc/services similarity index 100% rename from reactos/media/drivers/etc/services rename to media/drivers/etc/services diff --git a/reactos/media/fonts/CMakeLists.txt b/media/fonts/CMakeLists.txt similarity index 100% rename from reactos/media/fonts/CMakeLists.txt rename to media/fonts/CMakeLists.txt diff --git a/reactos/media/fonts/DejaVuSans-Bold.ttf b/media/fonts/DejaVuSans-Bold.ttf similarity index 100% rename from reactos/media/fonts/DejaVuSans-Bold.ttf rename to media/fonts/DejaVuSans-Bold.ttf diff --git a/reactos/media/fonts/DejaVuSans-BoldOblique.ttf b/media/fonts/DejaVuSans-BoldOblique.ttf similarity index 100% rename from reactos/media/fonts/DejaVuSans-BoldOblique.ttf rename to media/fonts/DejaVuSans-BoldOblique.ttf diff --git a/reactos/media/fonts/DejaVuSans-Oblique.ttf b/media/fonts/DejaVuSans-Oblique.ttf similarity index 100% rename from reactos/media/fonts/DejaVuSans-Oblique.ttf rename to media/fonts/DejaVuSans-Oblique.ttf diff --git a/reactos/media/fonts/DejaVuSans.ttf b/media/fonts/DejaVuSans.ttf similarity index 100% rename from reactos/media/fonts/DejaVuSans.ttf rename to media/fonts/DejaVuSans.ttf diff --git a/reactos/media/fonts/DejaVuSansMono-Bold.ttf b/media/fonts/DejaVuSansMono-Bold.ttf similarity index 100% rename from reactos/media/fonts/DejaVuSansMono-Bold.ttf rename to media/fonts/DejaVuSansMono-Bold.ttf diff --git a/reactos/media/fonts/DejaVuSansMono-BoldOblique.ttf b/media/fonts/DejaVuSansMono-BoldOblique.ttf similarity index 100% rename from reactos/media/fonts/DejaVuSansMono-BoldOblique.ttf rename to media/fonts/DejaVuSansMono-BoldOblique.ttf diff --git a/reactos/media/fonts/DejaVuSansMono-Oblique.ttf b/media/fonts/DejaVuSansMono-Oblique.ttf similarity index 100% rename from reactos/media/fonts/DejaVuSansMono-Oblique.ttf rename to media/fonts/DejaVuSansMono-Oblique.ttf diff --git a/reactos/media/fonts/DejaVuSansMono.ttf b/media/fonts/DejaVuSansMono.ttf similarity index 100% rename from reactos/media/fonts/DejaVuSansMono.ttf rename to media/fonts/DejaVuSansMono.ttf diff --git a/reactos/media/fonts/DejaVuSerif-Bold.ttf b/media/fonts/DejaVuSerif-Bold.ttf similarity index 100% rename from reactos/media/fonts/DejaVuSerif-Bold.ttf rename to media/fonts/DejaVuSerif-Bold.ttf diff --git a/reactos/media/fonts/DejaVuSerif-BoldItalic.ttf b/media/fonts/DejaVuSerif-BoldItalic.ttf similarity index 100% rename from reactos/media/fonts/DejaVuSerif-BoldItalic.ttf rename to media/fonts/DejaVuSerif-BoldItalic.ttf diff --git a/reactos/media/fonts/DejaVuSerif-Italic.ttf b/media/fonts/DejaVuSerif-Italic.ttf similarity index 100% rename from reactos/media/fonts/DejaVuSerif-Italic.ttf rename to media/fonts/DejaVuSerif-Italic.ttf diff --git a/reactos/media/fonts/DejaVuSerif.ttf b/media/fonts/DejaVuSerif.ttf similarity index 100% rename from reactos/media/fonts/DejaVuSerif.ttf rename to media/fonts/DejaVuSerif.ttf diff --git a/reactos/media/fonts/FreeMono.ttf b/media/fonts/FreeMono.ttf similarity index 100% rename from reactos/media/fonts/FreeMono.ttf rename to media/fonts/FreeMono.ttf diff --git a/reactos/media/fonts/FreeMonoBold.ttf b/media/fonts/FreeMonoBold.ttf similarity index 100% rename from reactos/media/fonts/FreeMonoBold.ttf rename to media/fonts/FreeMonoBold.ttf diff --git a/reactos/media/fonts/FreeMonoBoldOblique.ttf b/media/fonts/FreeMonoBoldOblique.ttf similarity index 100% rename from reactos/media/fonts/FreeMonoBoldOblique.ttf rename to media/fonts/FreeMonoBoldOblique.ttf diff --git a/reactos/media/fonts/FreeMonoOblique.ttf b/media/fonts/FreeMonoOblique.ttf similarity index 100% rename from reactos/media/fonts/FreeMonoOblique.ttf rename to media/fonts/FreeMonoOblique.ttf diff --git a/reactos/media/fonts/LiberationMono-Bold.ttf b/media/fonts/LiberationMono-Bold.ttf similarity index 100% rename from reactos/media/fonts/LiberationMono-Bold.ttf rename to media/fonts/LiberationMono-Bold.ttf diff --git a/reactos/media/fonts/LiberationMono-BoldItalic.ttf b/media/fonts/LiberationMono-BoldItalic.ttf similarity index 100% rename from reactos/media/fonts/LiberationMono-BoldItalic.ttf rename to media/fonts/LiberationMono-BoldItalic.ttf diff --git a/reactos/media/fonts/LiberationMono-Italic.ttf b/media/fonts/LiberationMono-Italic.ttf similarity index 100% rename from reactos/media/fonts/LiberationMono-Italic.ttf rename to media/fonts/LiberationMono-Italic.ttf diff --git a/reactos/media/fonts/LiberationMono-Regular.ttf b/media/fonts/LiberationMono-Regular.ttf similarity index 100% rename from reactos/media/fonts/LiberationMono-Regular.ttf rename to media/fonts/LiberationMono-Regular.ttf diff --git a/reactos/media/fonts/LiberationSans-Bold.ttf b/media/fonts/LiberationSans-Bold.ttf similarity index 100% rename from reactos/media/fonts/LiberationSans-Bold.ttf rename to media/fonts/LiberationSans-Bold.ttf diff --git a/reactos/media/fonts/LiberationSans-BoldItalic.ttf b/media/fonts/LiberationSans-BoldItalic.ttf similarity index 100% rename from reactos/media/fonts/LiberationSans-BoldItalic.ttf rename to media/fonts/LiberationSans-BoldItalic.ttf diff --git a/reactos/media/fonts/LiberationSans-Italic.ttf b/media/fonts/LiberationSans-Italic.ttf similarity index 100% rename from reactos/media/fonts/LiberationSans-Italic.ttf rename to media/fonts/LiberationSans-Italic.ttf diff --git a/reactos/media/fonts/LiberationSans-Regular.ttf b/media/fonts/LiberationSans-Regular.ttf similarity index 100% rename from reactos/media/fonts/LiberationSans-Regular.ttf rename to media/fonts/LiberationSans-Regular.ttf diff --git a/reactos/media/fonts/LiberationSerif-Bold.ttf b/media/fonts/LiberationSerif-Bold.ttf similarity index 100% rename from reactos/media/fonts/LiberationSerif-Bold.ttf rename to media/fonts/LiberationSerif-Bold.ttf diff --git a/reactos/media/fonts/LiberationSerif-BoldItalic.ttf b/media/fonts/LiberationSerif-BoldItalic.ttf similarity index 100% rename from reactos/media/fonts/LiberationSerif-BoldItalic.ttf rename to media/fonts/LiberationSerif-BoldItalic.ttf diff --git a/reactos/media/fonts/LiberationSerif-Italic.ttf b/media/fonts/LiberationSerif-Italic.ttf similarity index 100% rename from reactos/media/fonts/LiberationSerif-Italic.ttf rename to media/fonts/LiberationSerif-Italic.ttf diff --git a/reactos/media/fonts/LiberationSerif-Regular.ttf b/media/fonts/LiberationSerif-Regular.ttf similarity index 100% rename from reactos/media/fonts/LiberationSerif-Regular.ttf rename to media/fonts/LiberationSerif-Regular.ttf diff --git a/reactos/media/fonts/Marlett.ttf b/media/fonts/Marlett.ttf similarity index 100% rename from reactos/media/fonts/Marlett.ttf rename to media/fonts/Marlett.ttf diff --git a/reactos/media/fonts/doc/DejaVu_AUTHORS.txt b/media/fonts/doc/DejaVu_AUTHORS.txt similarity index 100% rename from reactos/media/fonts/doc/DejaVu_AUTHORS.txt rename to media/fonts/doc/DejaVu_AUTHORS.txt diff --git a/reactos/media/fonts/doc/DejaVu_BUGS.txt b/media/fonts/doc/DejaVu_BUGS.txt similarity index 100% rename from reactos/media/fonts/doc/DejaVu_BUGS.txt rename to media/fonts/doc/DejaVu_BUGS.txt diff --git a/reactos/media/fonts/doc/DejaVu_LICENSE.txt b/media/fonts/doc/DejaVu_LICENSE.txt similarity index 100% rename from reactos/media/fonts/doc/DejaVu_LICENSE.txt rename to media/fonts/doc/DejaVu_LICENSE.txt diff --git a/reactos/media/fonts/doc/DejaVu_NEWS.txt b/media/fonts/doc/DejaVu_NEWS.txt similarity index 100% rename from reactos/media/fonts/doc/DejaVu_NEWS.txt rename to media/fonts/doc/DejaVu_NEWS.txt diff --git a/reactos/media/fonts/doc/DejaVu_README.txt b/media/fonts/doc/DejaVu_README.txt similarity index 100% rename from reactos/media/fonts/doc/DejaVu_README.txt rename to media/fonts/doc/DejaVu_README.txt diff --git a/reactos/media/fonts/doc/DejaVu_langcover.txt b/media/fonts/doc/DejaVu_langcover.txt similarity index 100% rename from reactos/media/fonts/doc/DejaVu_langcover.txt rename to media/fonts/doc/DejaVu_langcover.txt diff --git a/reactos/media/fonts/doc/DejaVu_status.txt b/media/fonts/doc/DejaVu_status.txt similarity index 100% rename from reactos/media/fonts/doc/DejaVu_status.txt rename to media/fonts/doc/DejaVu_status.txt diff --git a/reactos/media/fonts/doc/DejaVu_unicover.txt b/media/fonts/doc/DejaVu_unicover.txt similarity index 100% rename from reactos/media/fonts/doc/DejaVu_unicover.txt rename to media/fonts/doc/DejaVu_unicover.txt diff --git a/reactos/media/fonts/doc/FreeFont_AUTHORS.txt b/media/fonts/doc/FreeFont_AUTHORS.txt similarity index 100% rename from reactos/media/fonts/doc/FreeFont_AUTHORS.txt rename to media/fonts/doc/FreeFont_AUTHORS.txt diff --git a/reactos/media/fonts/doc/FreeFont_COPYING.txt b/media/fonts/doc/FreeFont_COPYING.txt similarity index 100% rename from reactos/media/fonts/doc/FreeFont_COPYING.txt rename to media/fonts/doc/FreeFont_COPYING.txt diff --git a/reactos/media/fonts/doc/FreeFont_CREDITS.txt b/media/fonts/doc/FreeFont_CREDITS.txt similarity index 100% rename from reactos/media/fonts/doc/FreeFont_CREDITS.txt rename to media/fonts/doc/FreeFont_CREDITS.txt diff --git a/reactos/media/fonts/doc/FreeFont_ChangeLog.txt b/media/fonts/doc/FreeFont_ChangeLog.txt similarity index 100% rename from reactos/media/fonts/doc/FreeFont_ChangeLog.txt rename to media/fonts/doc/FreeFont_ChangeLog.txt diff --git a/reactos/media/fonts/doc/FreeFont_readme.txt b/media/fonts/doc/FreeFont_readme.txt similarity index 100% rename from reactos/media/fonts/doc/FreeFont_readme.txt rename to media/fonts/doc/FreeFont_readme.txt diff --git a/reactos/media/fonts/doc/LICENSE_DejaVu.txt b/media/fonts/doc/LICENSE_DejaVu.txt similarity index 100% rename from reactos/media/fonts/doc/LICENSE_DejaVu.txt rename to media/fonts/doc/LICENSE_DejaVu.txt diff --git a/reactos/media/fonts/fonts.rbuild b/media/fonts/fonts.rbuild similarity index 100% rename from reactos/media/fonts/fonts.rbuild rename to media/fonts/fonts.rbuild diff --git a/reactos/media/fonts/symbol.ttf b/media/fonts/symbol.ttf similarity index 100% rename from reactos/media/fonts/symbol.ttf rename to media/fonts/symbol.ttf diff --git a/reactos/media/fonts/tahoma.ttf b/media/fonts/tahoma.ttf similarity index 100% rename from reactos/media/fonts/tahoma.ttf rename to media/fonts/tahoma.ttf diff --git a/reactos/media/fonts/tahomabd.ttf b/media/fonts/tahomabd.ttf similarity index 100% rename from reactos/media/fonts/tahomabd.ttf rename to media/fonts/tahomabd.ttf diff --git a/reactos/media/graphics/app-rosdebug.svg b/media/graphics/app-rosdebug.svg similarity index 100% rename from reactos/media/graphics/app-rosdebug.svg rename to media/graphics/app-rosdebug.svg diff --git a/reactos/media/graphics/dialog-question.svg b/media/graphics/dialog-question.svg similarity index 100% rename from reactos/media/graphics/dialog-question.svg rename to media/graphics/dialog-question.svg diff --git a/reactos/media/graphics/record-app.svg b/media/graphics/record-app.svg similarity index 100% rename from reactos/media/graphics/record-app.svg rename to media/graphics/record-app.svg diff --git a/reactos/media/graphics/system-shutdown.svg b/media/graphics/system-shutdown.svg similarity index 100% rename from reactos/media/graphics/system-shutdown.svg rename to media/graphics/system-shutdown.svg diff --git a/reactos/media/inf/CMakeLists.txt b/media/inf/CMakeLists.txt similarity index 100% rename from reactos/media/inf/CMakeLists.txt rename to media/inf/CMakeLists.txt diff --git a/reactos/media/inf/NET_NIC.inf b/media/inf/NET_NIC.inf similarity index 100% rename from reactos/media/inf/NET_NIC.inf rename to media/inf/NET_NIC.inf diff --git a/reactos/media/inf/acpi.inf b/media/inf/acpi.inf similarity index 100% rename from reactos/media/inf/acpi.inf rename to media/inf/acpi.inf diff --git a/reactos/media/inf/audio.inf b/media/inf/audio.inf similarity index 100% rename from reactos/media/inf/audio.inf rename to media/inf/audio.inf diff --git a/reactos/media/inf/battery.inf b/media/inf/battery.inf similarity index 100% rename from reactos/media/inf/battery.inf rename to media/inf/battery.inf diff --git a/reactos/media/inf/bda.inf b/media/inf/bda.inf similarity index 100% rename from reactos/media/inf/bda.inf rename to media/inf/bda.inf diff --git a/reactos/media/inf/cdrom.inf b/media/inf/cdrom.inf similarity index 100% rename from reactos/media/inf/cdrom.inf rename to media/inf/cdrom.inf diff --git a/reactos/media/inf/cpu.inf b/media/inf/cpu.inf similarity index 100% rename from reactos/media/inf/cpu.inf rename to media/inf/cpu.inf diff --git a/reactos/media/inf/disk.inf b/media/inf/disk.inf similarity index 100% rename from reactos/media/inf/disk.inf rename to media/inf/disk.inf diff --git a/reactos/media/inf/display.inf b/media/inf/display.inf similarity index 100% rename from reactos/media/inf/display.inf rename to media/inf/display.inf diff --git a/reactos/media/inf/fdc.inf b/media/inf/fdc.inf similarity index 100% rename from reactos/media/inf/fdc.inf rename to media/inf/fdc.inf diff --git a/reactos/media/inf/font.inf b/media/inf/font.inf similarity index 100% rename from reactos/media/inf/font.inf rename to media/inf/font.inf diff --git a/reactos/media/inf/hal.inf b/media/inf/hal.inf similarity index 100% rename from reactos/media/inf/hal.inf rename to media/inf/hal.inf diff --git a/reactos/media/inf/hdc.inf b/media/inf/hdc.inf similarity index 100% rename from reactos/media/inf/hdc.inf rename to media/inf/hdc.inf diff --git a/reactos/media/inf/inf.rbuild b/media/inf/inf.rbuild similarity index 100% rename from reactos/media/inf/inf.rbuild rename to media/inf/inf.rbuild diff --git a/reactos/media/inf/intl.inf b/media/inf/intl.inf similarity index 100% rename from reactos/media/inf/intl.inf rename to media/inf/intl.inf diff --git a/reactos/media/inf/keyboard.inf b/media/inf/keyboard.inf similarity index 100% rename from reactos/media/inf/keyboard.inf rename to media/inf/keyboard.inf diff --git a/reactos/media/inf/ks.inf b/media/inf/ks.inf similarity index 100% rename from reactos/media/inf/ks.inf rename to media/inf/ks.inf diff --git a/reactos/media/inf/kscaptur.inf b/media/inf/kscaptur.inf similarity index 100% rename from reactos/media/inf/kscaptur.inf rename to media/inf/kscaptur.inf diff --git a/reactos/media/inf/layout.inf b/media/inf/layout.inf similarity index 100% rename from reactos/media/inf/layout.inf rename to media/inf/layout.inf diff --git a/reactos/media/inf/machine.inf b/media/inf/machine.inf similarity index 100% rename from reactos/media/inf/machine.inf rename to media/inf/machine.inf diff --git a/reactos/media/inf/msmouse.inf b/media/inf/msmouse.inf similarity index 100% rename from reactos/media/inf/msmouse.inf rename to media/inf/msmouse.inf diff --git a/reactos/media/inf/netamd.inf b/media/inf/netamd.inf similarity index 100% rename from reactos/media/inf/netamd.inf rename to media/inf/netamd.inf diff --git a/reactos/media/inf/netisa.inf b/media/inf/netisa.inf similarity index 100% rename from reactos/media/inf/netisa.inf rename to media/inf/netisa.inf diff --git a/reactos/media/inf/netrtpnt.inf b/media/inf/netrtpnt.inf similarity index 100% rename from reactos/media/inf/netrtpnt.inf rename to media/inf/netrtpnt.inf diff --git a/reactos/media/inf/nettcpip.inf b/media/inf/nettcpip.inf similarity index 100% rename from reactos/media/inf/nettcpip.inf rename to media/inf/nettcpip.inf diff --git a/reactos/media/inf/ports.inf b/media/inf/ports.inf similarity index 100% rename from reactos/media/inf/ports.inf rename to media/inf/ports.inf diff --git a/reactos/media/inf/scsi.inf b/media/inf/scsi.inf similarity index 100% rename from reactos/media/inf/scsi.inf rename to media/inf/scsi.inf diff --git a/reactos/media/inf/syssetup.inf b/media/inf/syssetup.inf similarity index 100% rename from reactos/media/inf/syssetup.inf rename to media/inf/syssetup.inf diff --git a/reactos/media/inf/syssetup.inf.tpl b/media/inf/syssetup.inf.tpl similarity index 100% rename from reactos/media/inf/syssetup.inf.tpl rename to media/inf/syssetup.inf.tpl diff --git a/reactos/media/inf/unknown.inf b/media/inf/unknown.inf similarity index 100% rename from reactos/media/inf/unknown.inf rename to media/inf/unknown.inf diff --git a/reactos/media/inf/usb.inf b/media/inf/usb.inf similarity index 100% rename from reactos/media/inf/usb.inf rename to media/inf/usb.inf diff --git a/reactos/media/inf/usbport.inf b/media/inf/usbport.inf similarity index 100% rename from reactos/media/inf/usbport.inf rename to media/inf/usbport.inf diff --git a/reactos/media/inf/usbstor.inf b/media/inf/usbstor.inf similarity index 100% rename from reactos/media/inf/usbstor.inf rename to media/inf/usbstor.inf diff --git a/reactos/media/inf/xboxdisp.inf b/media/inf/xboxdisp.inf similarity index 100% rename from reactos/media/inf/xboxdisp.inf rename to media/inf/xboxdisp.inf diff --git a/reactos/media/media.rbuild b/media/media.rbuild similarity index 100% rename from reactos/media/media.rbuild rename to media/media.rbuild diff --git a/reactos/media/nls/CMakeLists.txt b/media/nls/CMakeLists.txt similarity index 100% rename from reactos/media/nls/CMakeLists.txt rename to media/nls/CMakeLists.txt diff --git a/reactos/media/nls/c_037.nls b/media/nls/c_037.nls similarity index 100% rename from reactos/media/nls/c_037.nls rename to media/nls/c_037.nls diff --git a/reactos/media/nls/c_10000.nls b/media/nls/c_10000.nls similarity index 100% rename from reactos/media/nls/c_10000.nls rename to media/nls/c_10000.nls diff --git a/reactos/media/nls/c_10006.nls b/media/nls/c_10006.nls similarity index 100% rename from reactos/media/nls/c_10006.nls rename to media/nls/c_10006.nls diff --git a/reactos/media/nls/c_10007.nls b/media/nls/c_10007.nls similarity index 100% rename from reactos/media/nls/c_10007.nls rename to media/nls/c_10007.nls diff --git a/reactos/media/nls/c_10029.nls b/media/nls/c_10029.nls similarity index 100% rename from reactos/media/nls/c_10029.nls rename to media/nls/c_10029.nls diff --git a/reactos/media/nls/c_1006.nls b/media/nls/c_1006.nls similarity index 100% rename from reactos/media/nls/c_1006.nls rename to media/nls/c_1006.nls diff --git a/reactos/media/nls/c_10079.nls b/media/nls/c_10079.nls similarity index 100% rename from reactos/media/nls/c_10079.nls rename to media/nls/c_10079.nls diff --git a/reactos/media/nls/c_10081.nls b/media/nls/c_10081.nls similarity index 100% rename from reactos/media/nls/c_10081.nls rename to media/nls/c_10081.nls diff --git a/reactos/media/nls/c_1026.nls b/media/nls/c_1026.nls similarity index 100% rename from reactos/media/nls/c_1026.nls rename to media/nls/c_1026.nls diff --git a/reactos/media/nls/c_1250.nls b/media/nls/c_1250.nls similarity index 100% rename from reactos/media/nls/c_1250.nls rename to media/nls/c_1250.nls diff --git a/reactos/media/nls/c_1251.nls b/media/nls/c_1251.nls similarity index 100% rename from reactos/media/nls/c_1251.nls rename to media/nls/c_1251.nls diff --git a/reactos/media/nls/c_1252.nls b/media/nls/c_1252.nls similarity index 100% rename from reactos/media/nls/c_1252.nls rename to media/nls/c_1252.nls diff --git a/reactos/media/nls/c_1253.nls b/media/nls/c_1253.nls similarity index 100% rename from reactos/media/nls/c_1253.nls rename to media/nls/c_1253.nls diff --git a/reactos/media/nls/c_1254.nls b/media/nls/c_1254.nls similarity index 100% rename from reactos/media/nls/c_1254.nls rename to media/nls/c_1254.nls diff --git a/reactos/media/nls/c_1255.nls b/media/nls/c_1255.nls similarity index 100% rename from reactos/media/nls/c_1255.nls rename to media/nls/c_1255.nls diff --git a/reactos/media/nls/c_1256.nls b/media/nls/c_1256.nls similarity index 100% rename from reactos/media/nls/c_1256.nls rename to media/nls/c_1256.nls diff --git a/reactos/media/nls/c_1257.nls b/media/nls/c_1257.nls similarity index 100% rename from reactos/media/nls/c_1257.nls rename to media/nls/c_1257.nls diff --git a/reactos/media/nls/c_1258.nls b/media/nls/c_1258.nls similarity index 100% rename from reactos/media/nls/c_1258.nls rename to media/nls/c_1258.nls diff --git a/reactos/media/nls/c_20866.nls b/media/nls/c_20866.nls similarity index 100% rename from reactos/media/nls/c_20866.nls rename to media/nls/c_20866.nls diff --git a/reactos/media/nls/c_21866.nls b/media/nls/c_21866.nls similarity index 100% rename from reactos/media/nls/c_21866.nls rename to media/nls/c_21866.nls diff --git a/reactos/media/nls/c_28591.nls b/media/nls/c_28591.nls similarity index 100% rename from reactos/media/nls/c_28591.nls rename to media/nls/c_28591.nls diff --git a/reactos/media/nls/c_28592.nls b/media/nls/c_28592.nls similarity index 100% rename from reactos/media/nls/c_28592.nls rename to media/nls/c_28592.nls diff --git a/reactos/media/nls/c_28593.nls b/media/nls/c_28593.nls similarity index 100% rename from reactos/media/nls/c_28593.nls rename to media/nls/c_28593.nls diff --git a/reactos/media/nls/c_28594.nls b/media/nls/c_28594.nls similarity index 100% rename from reactos/media/nls/c_28594.nls rename to media/nls/c_28594.nls diff --git a/reactos/media/nls/c_28595.nls b/media/nls/c_28595.nls similarity index 100% rename from reactos/media/nls/c_28595.nls rename to media/nls/c_28595.nls diff --git a/reactos/media/nls/c_28596.nls b/media/nls/c_28596.nls similarity index 100% rename from reactos/media/nls/c_28596.nls rename to media/nls/c_28596.nls diff --git a/reactos/media/nls/c_28597.nls b/media/nls/c_28597.nls similarity index 100% rename from reactos/media/nls/c_28597.nls rename to media/nls/c_28597.nls diff --git a/reactos/media/nls/c_28598.nls b/media/nls/c_28598.nls similarity index 100% rename from reactos/media/nls/c_28598.nls rename to media/nls/c_28598.nls diff --git a/reactos/media/nls/c_28599.nls b/media/nls/c_28599.nls similarity index 100% rename from reactos/media/nls/c_28599.nls rename to media/nls/c_28599.nls diff --git a/reactos/media/nls/c_28600.nls b/media/nls/c_28600.nls similarity index 100% rename from reactos/media/nls/c_28600.nls rename to media/nls/c_28600.nls diff --git a/reactos/media/nls/c_28603.nls b/media/nls/c_28603.nls similarity index 100% rename from reactos/media/nls/c_28603.nls rename to media/nls/c_28603.nls diff --git a/reactos/media/nls/c_28604.nls b/media/nls/c_28604.nls similarity index 100% rename from reactos/media/nls/c_28604.nls rename to media/nls/c_28604.nls diff --git a/reactos/media/nls/c_28605.nls b/media/nls/c_28605.nls similarity index 100% rename from reactos/media/nls/c_28605.nls rename to media/nls/c_28605.nls diff --git a/reactos/media/nls/c_28606.nls b/media/nls/c_28606.nls similarity index 100% rename from reactos/media/nls/c_28606.nls rename to media/nls/c_28606.nls diff --git a/reactos/media/nls/c_424.nls b/media/nls/c_424.nls similarity index 100% rename from reactos/media/nls/c_424.nls rename to media/nls/c_424.nls diff --git a/reactos/media/nls/c_437.nls b/media/nls/c_437.nls similarity index 100% rename from reactos/media/nls/c_437.nls rename to media/nls/c_437.nls diff --git a/reactos/media/nls/c_500.nls b/media/nls/c_500.nls similarity index 100% rename from reactos/media/nls/c_500.nls rename to media/nls/c_500.nls diff --git a/reactos/media/nls/c_737.nls b/media/nls/c_737.nls similarity index 100% rename from reactos/media/nls/c_737.nls rename to media/nls/c_737.nls diff --git a/reactos/media/nls/c_775.nls b/media/nls/c_775.nls similarity index 100% rename from reactos/media/nls/c_775.nls rename to media/nls/c_775.nls diff --git a/reactos/media/nls/c_850.nls b/media/nls/c_850.nls similarity index 100% rename from reactos/media/nls/c_850.nls rename to media/nls/c_850.nls diff --git a/reactos/media/nls/c_852.nls b/media/nls/c_852.nls similarity index 100% rename from reactos/media/nls/c_852.nls rename to media/nls/c_852.nls diff --git a/reactos/media/nls/c_855.nls b/media/nls/c_855.nls similarity index 100% rename from reactos/media/nls/c_855.nls rename to media/nls/c_855.nls diff --git a/reactos/media/nls/c_856.nls b/media/nls/c_856.nls similarity index 100% rename from reactos/media/nls/c_856.nls rename to media/nls/c_856.nls diff --git a/reactos/media/nls/c_857.nls b/media/nls/c_857.nls similarity index 100% rename from reactos/media/nls/c_857.nls rename to media/nls/c_857.nls diff --git a/reactos/media/nls/c_860.nls b/media/nls/c_860.nls similarity index 100% rename from reactos/media/nls/c_860.nls rename to media/nls/c_860.nls diff --git a/reactos/media/nls/c_861.nls b/media/nls/c_861.nls similarity index 100% rename from reactos/media/nls/c_861.nls rename to media/nls/c_861.nls diff --git a/reactos/media/nls/c_862.nls b/media/nls/c_862.nls similarity index 100% rename from reactos/media/nls/c_862.nls rename to media/nls/c_862.nls diff --git a/reactos/media/nls/c_863.nls b/media/nls/c_863.nls similarity index 100% rename from reactos/media/nls/c_863.nls rename to media/nls/c_863.nls diff --git a/reactos/media/nls/c_864.nls b/media/nls/c_864.nls similarity index 100% rename from reactos/media/nls/c_864.nls rename to media/nls/c_864.nls diff --git a/reactos/media/nls/c_865.nls b/media/nls/c_865.nls similarity index 100% rename from reactos/media/nls/c_865.nls rename to media/nls/c_865.nls diff --git a/reactos/media/nls/c_866.nls b/media/nls/c_866.nls similarity index 100% rename from reactos/media/nls/c_866.nls rename to media/nls/c_866.nls diff --git a/reactos/media/nls/c_869.nls b/media/nls/c_869.nls similarity index 100% rename from reactos/media/nls/c_869.nls rename to media/nls/c_869.nls diff --git a/reactos/media/nls/c_874.nls b/media/nls/c_874.nls similarity index 100% rename from reactos/media/nls/c_874.nls rename to media/nls/c_874.nls diff --git a/reactos/media/nls/c_875.nls b/media/nls/c_875.nls similarity index 100% rename from reactos/media/nls/c_875.nls rename to media/nls/c_875.nls diff --git a/reactos/media/nls/c_878.nls b/media/nls/c_878.nls similarity index 100% rename from reactos/media/nls/c_878.nls rename to media/nls/c_878.nls diff --git a/reactos/media/nls/c_932.nls b/media/nls/c_932.nls similarity index 100% rename from reactos/media/nls/c_932.nls rename to media/nls/c_932.nls diff --git a/reactos/media/nls/c_936.nls b/media/nls/c_936.nls similarity index 100% rename from reactos/media/nls/c_936.nls rename to media/nls/c_936.nls diff --git a/reactos/media/nls/c_949.nls b/media/nls/c_949.nls similarity index 100% rename from reactos/media/nls/c_949.nls rename to media/nls/c_949.nls diff --git a/reactos/media/nls/c_950.nls b/media/nls/c_950.nls similarity index 100% rename from reactos/media/nls/c_950.nls rename to media/nls/c_950.nls diff --git a/reactos/media/nls/l_intl.nls b/media/nls/l_intl.nls similarity index 100% rename from reactos/media/nls/l_intl.nls rename to media/nls/l_intl.nls diff --git a/reactos/media/nls/nls.rbuild b/media/nls/nls.rbuild similarity index 100% rename from reactos/media/nls/nls.rbuild rename to media/nls/nls.rbuild diff --git a/reactos/media/sounds/ReactOS_LogOn.wav b/media/sounds/ReactOS_LogOn.wav similarity index 100% rename from reactos/media/sounds/ReactOS_LogOn.wav rename to media/sounds/ReactOS_LogOn.wav diff --git a/reactos/media/sounds/error.mp3 b/media/sounds/error.mp3 similarity index 100% rename from reactos/media/sounds/error.mp3 rename to media/sounds/error.mp3 diff --git a/reactos/media/sounds/notice.mp3 b/media/sounds/notice.mp3 similarity index 100% rename from reactos/media/sounds/notice.mp3 rename to media/sounds/notice.mp3 diff --git a/reactos/media/sounds/sounds.rbuild b/media/sounds/sounds.rbuild similarity index 100% rename from reactos/media/sounds/sounds.rbuild rename to media/sounds/sounds.rbuild diff --git a/reactos/media/vgafonts/437-8x8.bin b/media/vgafonts/437-8x8.bin similarity index 100% rename from reactos/media/vgafonts/437-8x8.bin rename to media/vgafonts/437-8x8.bin diff --git a/reactos/media/vgafonts/737-8x8.bin b/media/vgafonts/737-8x8.bin similarity index 100% rename from reactos/media/vgafonts/737-8x8.bin rename to media/vgafonts/737-8x8.bin diff --git a/reactos/media/vgafonts/775-8x8.bin b/media/vgafonts/775-8x8.bin similarity index 100% rename from reactos/media/vgafonts/775-8x8.bin rename to media/vgafonts/775-8x8.bin diff --git a/reactos/media/vgafonts/850-8x8.bin b/media/vgafonts/850-8x8.bin similarity index 100% rename from reactos/media/vgafonts/850-8x8.bin rename to media/vgafonts/850-8x8.bin diff --git a/reactos/media/vgafonts/852-8x8.bin b/media/vgafonts/852-8x8.bin similarity index 100% rename from reactos/media/vgafonts/852-8x8.bin rename to media/vgafonts/852-8x8.bin diff --git a/reactos/media/vgafonts/865-8x8.bin b/media/vgafonts/865-8x8.bin similarity index 100% rename from reactos/media/vgafonts/865-8x8.bin rename to media/vgafonts/865-8x8.bin diff --git a/reactos/media/vgafonts/866-8x8.bin b/media/vgafonts/866-8x8.bin similarity index 100% rename from reactos/media/vgafonts/866-8x8.bin rename to media/vgafonts/866-8x8.bin diff --git a/reactos/media/vgafonts/932-8x8.bin b/media/vgafonts/932-8x8.bin similarity index 100% rename from reactos/media/vgafonts/932-8x8.bin rename to media/vgafonts/932-8x8.bin diff --git a/reactos/media/vgafonts/CMakeLists.txt b/media/vgafonts/CMakeLists.txt similarity index 100% rename from reactos/media/vgafonts/CMakeLists.txt rename to media/vgafonts/CMakeLists.txt diff --git a/reactos/media/vgafonts/vgafonts.rbuild b/media/vgafonts/vgafonts.rbuild similarity index 100% rename from reactos/media/vgafonts/vgafonts.rbuild rename to media/vgafonts/vgafonts.rbuild diff --git a/reactos/media/wallpapers/wallpapers.txt b/media/wallpapers/wallpapers.txt similarity index 100% rename from reactos/media/wallpapers/wallpapers.txt rename to media/wallpapers/wallpapers.txt diff --git a/reactos/modules/CMakeLists.txt b/modules/CMakeLists.txt similarity index 100% rename from reactos/modules/CMakeLists.txt rename to modules/CMakeLists.txt diff --git a/reactos/modules/directory.rbuild b/modules/directory.rbuild similarity index 100% rename from reactos/modules/directory.rbuild rename to modules/directory.rbuild diff --git a/reactos/modules/empty.rbuild b/modules/empty.rbuild similarity index 100% rename from reactos/modules/empty.rbuild rename to modules/empty.rbuild diff --git a/reactos/ntoskrnl/CMakeLists.txt b/ntoskrnl/CMakeLists.txt similarity index 100% rename from reactos/ntoskrnl/CMakeLists.txt rename to ntoskrnl/CMakeLists.txt diff --git a/reactos/ntoskrnl/KrnlFun.c b/ntoskrnl/KrnlFun.c similarity index 100% rename from reactos/ntoskrnl/KrnlFun.c rename to ntoskrnl/KrnlFun.c diff --git a/reactos/ntoskrnl/cache/cachesub.c b/ntoskrnl/cache/cachesub.c similarity index 100% rename from reactos/ntoskrnl/cache/cachesub.c rename to ntoskrnl/cache/cachesub.c diff --git a/reactos/ntoskrnl/cache/copysup.c b/ntoskrnl/cache/copysup.c similarity index 100% rename from reactos/ntoskrnl/cache/copysup.c rename to ntoskrnl/cache/copysup.c diff --git a/reactos/ntoskrnl/cache/fssup.c b/ntoskrnl/cache/fssup.c similarity index 100% rename from reactos/ntoskrnl/cache/fssup.c rename to ntoskrnl/cache/fssup.c diff --git a/reactos/ntoskrnl/cache/lazyrite.c b/ntoskrnl/cache/lazyrite.c similarity index 100% rename from reactos/ntoskrnl/cache/lazyrite.c rename to ntoskrnl/cache/lazyrite.c diff --git a/reactos/ntoskrnl/cache/logsup.c b/ntoskrnl/cache/logsup.c similarity index 100% rename from reactos/ntoskrnl/cache/logsup.c rename to ntoskrnl/cache/logsup.c diff --git a/reactos/ntoskrnl/cache/mdlsup.c b/ntoskrnl/cache/mdlsup.c similarity index 100% rename from reactos/ntoskrnl/cache/mdlsup.c rename to ntoskrnl/cache/mdlsup.c diff --git a/reactos/ntoskrnl/cache/newcc.h b/ntoskrnl/cache/newcc.h similarity index 100% rename from reactos/ntoskrnl/cache/newcc.h rename to ntoskrnl/cache/newcc.h diff --git a/reactos/ntoskrnl/cache/pinsup.c b/ntoskrnl/cache/pinsup.c similarity index 100% rename from reactos/ntoskrnl/cache/pinsup.c rename to ntoskrnl/cache/pinsup.c diff --git a/reactos/ntoskrnl/cache/section/data.c b/ntoskrnl/cache/section/data.c similarity index 100% rename from reactos/ntoskrnl/cache/section/data.c rename to ntoskrnl/cache/section/data.c diff --git a/reactos/ntoskrnl/cache/section/fault.c b/ntoskrnl/cache/section/fault.c similarity index 100% rename from reactos/ntoskrnl/cache/section/fault.c rename to ntoskrnl/cache/section/fault.c diff --git a/reactos/ntoskrnl/cache/section/io.c b/ntoskrnl/cache/section/io.c similarity index 100% rename from reactos/ntoskrnl/cache/section/io.c rename to ntoskrnl/cache/section/io.c diff --git a/reactos/ntoskrnl/cache/section/newmm.h b/ntoskrnl/cache/section/newmm.h similarity index 100% rename from reactos/ntoskrnl/cache/section/newmm.h rename to ntoskrnl/cache/section/newmm.h diff --git a/reactos/ntoskrnl/cache/section/reqtools.c b/ntoskrnl/cache/section/reqtools.c similarity index 100% rename from reactos/ntoskrnl/cache/section/reqtools.c rename to ntoskrnl/cache/section/reqtools.c diff --git a/reactos/ntoskrnl/cache/section/sptab.c b/ntoskrnl/cache/section/sptab.c similarity index 100% rename from reactos/ntoskrnl/cache/section/sptab.c rename to ntoskrnl/cache/section/sptab.c diff --git a/reactos/ntoskrnl/cache/section/swapout.c b/ntoskrnl/cache/section/swapout.c similarity index 100% rename from reactos/ntoskrnl/cache/section/swapout.c rename to ntoskrnl/cache/section/swapout.c diff --git a/reactos/ntoskrnl/cc/cacheman.c b/ntoskrnl/cc/cacheman.c similarity index 100% rename from reactos/ntoskrnl/cc/cacheman.c rename to ntoskrnl/cc/cacheman.c diff --git a/reactos/ntoskrnl/cc/copy.c b/ntoskrnl/cc/copy.c similarity index 100% rename from reactos/ntoskrnl/cc/copy.c rename to ntoskrnl/cc/copy.c diff --git a/reactos/ntoskrnl/cc/fs.c b/ntoskrnl/cc/fs.c similarity index 100% rename from reactos/ntoskrnl/cc/fs.c rename to ntoskrnl/cc/fs.c diff --git a/reactos/ntoskrnl/cc/mdl.c b/ntoskrnl/cc/mdl.c similarity index 100% rename from reactos/ntoskrnl/cc/mdl.c rename to ntoskrnl/cc/mdl.c diff --git a/reactos/ntoskrnl/cc/pin.c b/ntoskrnl/cc/pin.c similarity index 100% rename from reactos/ntoskrnl/cc/pin.c rename to ntoskrnl/cc/pin.c diff --git a/reactos/ntoskrnl/cc/view.c b/ntoskrnl/cc/view.c similarity index 100% rename from reactos/ntoskrnl/cc/view.c rename to ntoskrnl/cc/view.c diff --git a/reactos/ntoskrnl/config/arm/cmhardwr.c b/ntoskrnl/config/arm/cmhardwr.c similarity index 100% rename from reactos/ntoskrnl/config/arm/cmhardwr.c rename to ntoskrnl/config/arm/cmhardwr.c diff --git a/reactos/ntoskrnl/config/cmalloc.c b/ntoskrnl/config/cmalloc.c similarity index 100% rename from reactos/ntoskrnl/config/cmalloc.c rename to ntoskrnl/config/cmalloc.c diff --git a/reactos/ntoskrnl/config/cmapi.c b/ntoskrnl/config/cmapi.c similarity index 100% rename from reactos/ntoskrnl/config/cmapi.c rename to ntoskrnl/config/cmapi.c diff --git a/reactos/ntoskrnl/config/cmboot.c b/ntoskrnl/config/cmboot.c similarity index 100% rename from reactos/ntoskrnl/config/cmboot.c rename to ntoskrnl/config/cmboot.c diff --git a/reactos/ntoskrnl/config/cmcheck.c b/ntoskrnl/config/cmcheck.c similarity index 100% rename from reactos/ntoskrnl/config/cmcheck.c rename to ntoskrnl/config/cmcheck.c diff --git a/reactos/ntoskrnl/config/cmconfig.c b/ntoskrnl/config/cmconfig.c similarity index 100% rename from reactos/ntoskrnl/config/cmconfig.c rename to ntoskrnl/config/cmconfig.c diff --git a/reactos/ntoskrnl/config/cmcontrl.c b/ntoskrnl/config/cmcontrl.c similarity index 100% rename from reactos/ntoskrnl/config/cmcontrl.c rename to ntoskrnl/config/cmcontrl.c diff --git a/reactos/ntoskrnl/config/cmdata.c b/ntoskrnl/config/cmdata.c similarity index 100% rename from reactos/ntoskrnl/config/cmdata.c rename to ntoskrnl/config/cmdata.c diff --git a/reactos/ntoskrnl/config/cmdelay.c b/ntoskrnl/config/cmdelay.c similarity index 100% rename from reactos/ntoskrnl/config/cmdelay.c rename to ntoskrnl/config/cmdelay.c diff --git a/reactos/ntoskrnl/config/cmhook.c b/ntoskrnl/config/cmhook.c similarity index 100% rename from reactos/ntoskrnl/config/cmhook.c rename to ntoskrnl/config/cmhook.c diff --git a/reactos/ntoskrnl/config/cmhvlist.c b/ntoskrnl/config/cmhvlist.c similarity index 100% rename from reactos/ntoskrnl/config/cmhvlist.c rename to ntoskrnl/config/cmhvlist.c diff --git a/reactos/ntoskrnl/config/cmindex.c b/ntoskrnl/config/cmindex.c similarity index 100% rename from reactos/ntoskrnl/config/cmindex.c rename to ntoskrnl/config/cmindex.c diff --git a/reactos/ntoskrnl/config/cminit.c b/ntoskrnl/config/cminit.c similarity index 100% rename from reactos/ntoskrnl/config/cminit.c rename to ntoskrnl/config/cminit.c diff --git a/reactos/ntoskrnl/config/cmkcbncb.c b/ntoskrnl/config/cmkcbncb.c similarity index 100% rename from reactos/ntoskrnl/config/cmkcbncb.c rename to ntoskrnl/config/cmkcbncb.c diff --git a/reactos/ntoskrnl/config/cmkeydel.c b/ntoskrnl/config/cmkeydel.c similarity index 100% rename from reactos/ntoskrnl/config/cmkeydel.c rename to ntoskrnl/config/cmkeydel.c diff --git a/reactos/ntoskrnl/config/cmlazy.c b/ntoskrnl/config/cmlazy.c similarity index 100% rename from reactos/ntoskrnl/config/cmlazy.c rename to ntoskrnl/config/cmlazy.c diff --git a/reactos/ntoskrnl/config/cmmapvw.c b/ntoskrnl/config/cmmapvw.c similarity index 100% rename from reactos/ntoskrnl/config/cmmapvw.c rename to ntoskrnl/config/cmmapvw.c diff --git a/reactos/ntoskrnl/config/cmname.c b/ntoskrnl/config/cmname.c similarity index 100% rename from reactos/ntoskrnl/config/cmname.c rename to ntoskrnl/config/cmname.c diff --git a/reactos/ntoskrnl/config/cmnotify.c b/ntoskrnl/config/cmnotify.c similarity index 100% rename from reactos/ntoskrnl/config/cmnotify.c rename to ntoskrnl/config/cmnotify.c diff --git a/reactos/ntoskrnl/config/cmparse.c b/ntoskrnl/config/cmparse.c similarity index 100% rename from reactos/ntoskrnl/config/cmparse.c rename to ntoskrnl/config/cmparse.c diff --git a/reactos/ntoskrnl/config/cmquota.c b/ntoskrnl/config/cmquota.c similarity index 100% rename from reactos/ntoskrnl/config/cmquota.c rename to ntoskrnl/config/cmquota.c diff --git a/reactos/ntoskrnl/config/cmse.c b/ntoskrnl/config/cmse.c similarity index 100% rename from reactos/ntoskrnl/config/cmse.c rename to ntoskrnl/config/cmse.c diff --git a/reactos/ntoskrnl/config/cmsecach.c b/ntoskrnl/config/cmsecach.c similarity index 100% rename from reactos/ntoskrnl/config/cmsecach.c rename to ntoskrnl/config/cmsecach.c diff --git a/reactos/ntoskrnl/config/cmsysini.c b/ntoskrnl/config/cmsysini.c similarity index 100% rename from reactos/ntoskrnl/config/cmsysini.c rename to ntoskrnl/config/cmsysini.c diff --git a/reactos/ntoskrnl/config/cmvalche.c b/ntoskrnl/config/cmvalche.c similarity index 100% rename from reactos/ntoskrnl/config/cmvalche.c rename to ntoskrnl/config/cmvalche.c diff --git a/reactos/ntoskrnl/config/cmvalue.c b/ntoskrnl/config/cmvalue.c similarity index 100% rename from reactos/ntoskrnl/config/cmvalue.c rename to ntoskrnl/config/cmvalue.c diff --git a/reactos/ntoskrnl/config/cmwraprs.c b/ntoskrnl/config/cmwraprs.c similarity index 100% rename from reactos/ntoskrnl/config/cmwraprs.c rename to ntoskrnl/config/cmwraprs.c diff --git a/reactos/ntoskrnl/config/i386/cmhardwr.c b/ntoskrnl/config/i386/cmhardwr.c similarity index 100% rename from reactos/ntoskrnl/config/i386/cmhardwr.c rename to ntoskrnl/config/i386/cmhardwr.c diff --git a/reactos/ntoskrnl/config/ntapi.c b/ntoskrnl/config/ntapi.c similarity index 100% rename from reactos/ntoskrnl/config/ntapi.c rename to ntoskrnl/config/ntapi.c diff --git a/reactos/ntoskrnl/config/powerpc/cmhardwr.c b/ntoskrnl/config/powerpc/cmhardwr.c similarity index 100% rename from reactos/ntoskrnl/config/powerpc/cmhardwr.c rename to ntoskrnl/config/powerpc/cmhardwr.c diff --git a/reactos/ntoskrnl/dbgk/dbgkobj.c b/ntoskrnl/dbgk/dbgkobj.c similarity index 100% rename from reactos/ntoskrnl/dbgk/dbgkobj.c rename to ntoskrnl/dbgk/dbgkobj.c diff --git a/reactos/ntoskrnl/dbgk/dbgkutil.c b/ntoskrnl/dbgk/dbgkutil.c similarity index 100% rename from reactos/ntoskrnl/dbgk/dbgkutil.c rename to ntoskrnl/dbgk/dbgkutil.c diff --git a/reactos/ntoskrnl/ex/atom.c b/ntoskrnl/ex/atom.c similarity index 100% rename from reactos/ntoskrnl/ex/atom.c rename to ntoskrnl/ex/atom.c diff --git a/reactos/ntoskrnl/ex/callback.c b/ntoskrnl/ex/callback.c similarity index 100% rename from reactos/ntoskrnl/ex/callback.c rename to ntoskrnl/ex/callback.c diff --git a/reactos/ntoskrnl/ex/dbgctrl.c b/ntoskrnl/ex/dbgctrl.c similarity index 100% rename from reactos/ntoskrnl/ex/dbgctrl.c rename to ntoskrnl/ex/dbgctrl.c diff --git a/reactos/ntoskrnl/ex/efi.c b/ntoskrnl/ex/efi.c similarity index 100% rename from reactos/ntoskrnl/ex/efi.c rename to ntoskrnl/ex/efi.c diff --git a/reactos/ntoskrnl/ex/event.c b/ntoskrnl/ex/event.c similarity index 100% rename from reactos/ntoskrnl/ex/event.c rename to ntoskrnl/ex/event.c diff --git a/reactos/ntoskrnl/ex/evtpair.c b/ntoskrnl/ex/evtpair.c similarity index 100% rename from reactos/ntoskrnl/ex/evtpair.c rename to ntoskrnl/ex/evtpair.c diff --git a/reactos/ntoskrnl/ex/exintrin.c b/ntoskrnl/ex/exintrin.c similarity index 100% rename from reactos/ntoskrnl/ex/exintrin.c rename to ntoskrnl/ex/exintrin.c diff --git a/reactos/ntoskrnl/ex/fmutex.c b/ntoskrnl/ex/fmutex.c similarity index 100% rename from reactos/ntoskrnl/ex/fmutex.c rename to ntoskrnl/ex/fmutex.c diff --git a/reactos/ntoskrnl/ex/handle.c b/ntoskrnl/ex/handle.c similarity index 100% rename from reactos/ntoskrnl/ex/handle.c rename to ntoskrnl/ex/handle.c diff --git a/reactos/ntoskrnl/ex/harderr.c b/ntoskrnl/ex/harderr.c similarity index 100% rename from reactos/ntoskrnl/ex/harderr.c rename to ntoskrnl/ex/harderr.c diff --git a/reactos/ntoskrnl/ex/hdlsterm.c b/ntoskrnl/ex/hdlsterm.c similarity index 100% rename from reactos/ntoskrnl/ex/hdlsterm.c rename to ntoskrnl/ex/hdlsterm.c diff --git a/reactos/ntoskrnl/ex/i386/fastinterlck_asm.S b/ntoskrnl/ex/i386/fastinterlck_asm.S similarity index 100% rename from reactos/ntoskrnl/ex/i386/fastinterlck_asm.S rename to ntoskrnl/ex/i386/fastinterlck_asm.S diff --git a/reactos/ntoskrnl/ex/i386/ioport.S b/ntoskrnl/ex/i386/ioport.S similarity index 100% rename from reactos/ntoskrnl/ex/i386/ioport.S rename to ntoskrnl/ex/i386/ioport.S diff --git a/reactos/ntoskrnl/ex/init.c b/ntoskrnl/ex/init.c similarity index 100% rename from reactos/ntoskrnl/ex/init.c rename to ntoskrnl/ex/init.c diff --git a/reactos/ntoskrnl/ex/interlocked.c b/ntoskrnl/ex/interlocked.c similarity index 100% rename from reactos/ntoskrnl/ex/interlocked.c rename to ntoskrnl/ex/interlocked.c diff --git a/reactos/ntoskrnl/ex/keyedevt.c b/ntoskrnl/ex/keyedevt.c similarity index 100% rename from reactos/ntoskrnl/ex/keyedevt.c rename to ntoskrnl/ex/keyedevt.c diff --git a/reactos/ntoskrnl/ex/locale.c b/ntoskrnl/ex/locale.c similarity index 100% rename from reactos/ntoskrnl/ex/locale.c rename to ntoskrnl/ex/locale.c diff --git a/reactos/ntoskrnl/ex/lookas.c b/ntoskrnl/ex/lookas.c similarity index 100% rename from reactos/ntoskrnl/ex/lookas.c rename to ntoskrnl/ex/lookas.c diff --git a/reactos/ntoskrnl/ex/mutant.c b/ntoskrnl/ex/mutant.c similarity index 100% rename from reactos/ntoskrnl/ex/mutant.c rename to ntoskrnl/ex/mutant.c diff --git a/reactos/ntoskrnl/ex/powerpc/ioport.s b/ntoskrnl/ex/powerpc/ioport.s similarity index 100% rename from reactos/ntoskrnl/ex/powerpc/ioport.s rename to ntoskrnl/ex/powerpc/ioport.s diff --git a/reactos/ntoskrnl/ex/profile.c b/ntoskrnl/ex/profile.c similarity index 100% rename from reactos/ntoskrnl/ex/profile.c rename to ntoskrnl/ex/profile.c diff --git a/reactos/ntoskrnl/ex/pushlock.c b/ntoskrnl/ex/pushlock.c similarity index 100% rename from reactos/ntoskrnl/ex/pushlock.c rename to ntoskrnl/ex/pushlock.c diff --git a/reactos/ntoskrnl/ex/resource.c b/ntoskrnl/ex/resource.c similarity index 100% rename from reactos/ntoskrnl/ex/resource.c rename to ntoskrnl/ex/resource.c diff --git a/reactos/ntoskrnl/ex/rundown.c b/ntoskrnl/ex/rundown.c similarity index 100% rename from reactos/ntoskrnl/ex/rundown.c rename to ntoskrnl/ex/rundown.c diff --git a/reactos/ntoskrnl/ex/sem.c b/ntoskrnl/ex/sem.c similarity index 100% rename from reactos/ntoskrnl/ex/sem.c rename to ntoskrnl/ex/sem.c diff --git a/reactos/ntoskrnl/ex/shutdown.c b/ntoskrnl/ex/shutdown.c similarity index 100% rename from reactos/ntoskrnl/ex/shutdown.c rename to ntoskrnl/ex/shutdown.c diff --git a/reactos/ntoskrnl/ex/sysinfo.c b/ntoskrnl/ex/sysinfo.c similarity index 100% rename from reactos/ntoskrnl/ex/sysinfo.c rename to ntoskrnl/ex/sysinfo.c diff --git a/reactos/ntoskrnl/ex/time.c b/ntoskrnl/ex/time.c similarity index 100% rename from reactos/ntoskrnl/ex/time.c rename to ntoskrnl/ex/time.c diff --git a/reactos/ntoskrnl/ex/timer.c b/ntoskrnl/ex/timer.c similarity index 100% rename from reactos/ntoskrnl/ex/timer.c rename to ntoskrnl/ex/timer.c diff --git a/reactos/ntoskrnl/ex/uuid.c b/ntoskrnl/ex/uuid.c similarity index 100% rename from reactos/ntoskrnl/ex/uuid.c rename to ntoskrnl/ex/uuid.c diff --git a/reactos/ntoskrnl/ex/win32k.c b/ntoskrnl/ex/win32k.c similarity index 100% rename from reactos/ntoskrnl/ex/win32k.c rename to ntoskrnl/ex/win32k.c diff --git a/reactos/ntoskrnl/ex/work.c b/ntoskrnl/ex/work.c similarity index 100% rename from reactos/ntoskrnl/ex/work.c rename to ntoskrnl/ex/work.c diff --git a/reactos/ntoskrnl/ex/xipdisp.c b/ntoskrnl/ex/xipdisp.c similarity index 100% rename from reactos/ntoskrnl/ex/xipdisp.c rename to ntoskrnl/ex/xipdisp.c diff --git a/reactos/ntoskrnl/ex/zone.c b/ntoskrnl/ex/zone.c similarity index 100% rename from reactos/ntoskrnl/ex/zone.c rename to ntoskrnl/ex/zone.c diff --git a/reactos/ntoskrnl/ex/zw.S b/ntoskrnl/ex/zw.S similarity index 100% rename from reactos/ntoskrnl/ex/zw.S rename to ntoskrnl/ex/zw.S diff --git a/reactos/ntoskrnl/fsrtl/dbcsname.c b/ntoskrnl/fsrtl/dbcsname.c similarity index 100% rename from reactos/ntoskrnl/fsrtl/dbcsname.c rename to ntoskrnl/fsrtl/dbcsname.c diff --git a/reactos/ntoskrnl/fsrtl/fastio.c b/ntoskrnl/fsrtl/fastio.c similarity index 100% rename from reactos/ntoskrnl/fsrtl/fastio.c rename to ntoskrnl/fsrtl/fastio.c diff --git a/reactos/ntoskrnl/fsrtl/faulttol.c b/ntoskrnl/fsrtl/faulttol.c similarity index 100% rename from reactos/ntoskrnl/fsrtl/faulttol.c rename to ntoskrnl/fsrtl/faulttol.c diff --git a/reactos/ntoskrnl/fsrtl/filelock.c b/ntoskrnl/fsrtl/filelock.c similarity index 100% rename from reactos/ntoskrnl/fsrtl/filelock.c rename to ntoskrnl/fsrtl/filelock.c diff --git a/reactos/ntoskrnl/fsrtl/filter.c b/ntoskrnl/fsrtl/filter.c similarity index 100% rename from reactos/ntoskrnl/fsrtl/filter.c rename to ntoskrnl/fsrtl/filter.c diff --git a/reactos/ntoskrnl/fsrtl/filtrctx.c b/ntoskrnl/fsrtl/filtrctx.c similarity index 100% rename from reactos/ntoskrnl/fsrtl/filtrctx.c rename to ntoskrnl/fsrtl/filtrctx.c diff --git a/reactos/ntoskrnl/fsrtl/fsfilter.c b/ntoskrnl/fsrtl/fsfilter.c similarity index 100% rename from reactos/ntoskrnl/fsrtl/fsfilter.c rename to ntoskrnl/fsrtl/fsfilter.c diff --git a/reactos/ntoskrnl/fsrtl/fsrtlpc.c b/ntoskrnl/fsrtl/fsrtlpc.c similarity index 100% rename from reactos/ntoskrnl/fsrtl/fsrtlpc.c rename to ntoskrnl/fsrtl/fsrtlpc.c diff --git a/reactos/ntoskrnl/fsrtl/largemcb.c b/ntoskrnl/fsrtl/largemcb.c similarity index 100% rename from reactos/ntoskrnl/fsrtl/largemcb.c rename to ntoskrnl/fsrtl/largemcb.c diff --git a/reactos/ntoskrnl/fsrtl/name.c b/ntoskrnl/fsrtl/name.c similarity index 100% rename from reactos/ntoskrnl/fsrtl/name.c rename to ntoskrnl/fsrtl/name.c diff --git a/reactos/ntoskrnl/fsrtl/notify.c b/ntoskrnl/fsrtl/notify.c similarity index 100% rename from reactos/ntoskrnl/fsrtl/notify.c rename to ntoskrnl/fsrtl/notify.c diff --git a/reactos/ntoskrnl/fsrtl/oplock.c b/ntoskrnl/fsrtl/oplock.c similarity index 100% rename from reactos/ntoskrnl/fsrtl/oplock.c rename to ntoskrnl/fsrtl/oplock.c diff --git a/reactos/ntoskrnl/fsrtl/pnp.c b/ntoskrnl/fsrtl/pnp.c similarity index 100% rename from reactos/ntoskrnl/fsrtl/pnp.c rename to ntoskrnl/fsrtl/pnp.c diff --git a/reactos/ntoskrnl/fsrtl/stackovf.c b/ntoskrnl/fsrtl/stackovf.c similarity index 100% rename from reactos/ntoskrnl/fsrtl/stackovf.c rename to ntoskrnl/fsrtl/stackovf.c diff --git a/reactos/ntoskrnl/fsrtl/tunnel.c b/ntoskrnl/fsrtl/tunnel.c similarity index 100% rename from reactos/ntoskrnl/fsrtl/tunnel.c rename to ntoskrnl/fsrtl/tunnel.c diff --git a/reactos/ntoskrnl/fsrtl/unc.c b/ntoskrnl/fsrtl/unc.c similarity index 100% rename from reactos/ntoskrnl/fsrtl/unc.c rename to ntoskrnl/fsrtl/unc.c diff --git a/reactos/ntoskrnl/fstub/disksup.c b/ntoskrnl/fstub/disksup.c similarity index 100% rename from reactos/ntoskrnl/fstub/disksup.c rename to ntoskrnl/fstub/disksup.c diff --git a/reactos/ntoskrnl/fstub/fstubex.c b/ntoskrnl/fstub/fstubex.c similarity index 100% rename from reactos/ntoskrnl/fstub/fstubex.c rename to ntoskrnl/fstub/fstubex.c diff --git a/reactos/ntoskrnl/fstub/halstub.c b/ntoskrnl/fstub/halstub.c similarity index 100% rename from reactos/ntoskrnl/fstub/halstub.c rename to ntoskrnl/fstub/halstub.c diff --git a/reactos/ntoskrnl/fstub/translate.c b/ntoskrnl/fstub/translate.c similarity index 100% rename from reactos/ntoskrnl/fstub/translate.c rename to ntoskrnl/fstub/translate.c diff --git a/reactos/ntoskrnl/inbv/inbv.c b/ntoskrnl/inbv/inbv.c similarity index 100% rename from reactos/ntoskrnl/inbv/inbv.c rename to ntoskrnl/inbv/inbv.c diff --git a/reactos/ntoskrnl/inbv/inbvport.c b/ntoskrnl/inbv/inbvport.c similarity index 100% rename from reactos/ntoskrnl/inbv/inbvport.c rename to ntoskrnl/inbv/inbvport.c diff --git a/reactos/ntoskrnl/inbv/logo/1.bmp b/ntoskrnl/inbv/logo/1.bmp similarity index 100% rename from reactos/ntoskrnl/inbv/logo/1.bmp rename to ntoskrnl/inbv/logo/1.bmp diff --git a/reactos/ntoskrnl/inbv/logo/14.bmp b/ntoskrnl/inbv/logo/14.bmp similarity index 100% rename from reactos/ntoskrnl/inbv/logo/14.bmp rename to ntoskrnl/inbv/logo/14.bmp diff --git a/reactos/ntoskrnl/inbv/logo/15.bmp b/ntoskrnl/inbv/logo/15.bmp similarity index 100% rename from reactos/ntoskrnl/inbv/logo/15.bmp rename to ntoskrnl/inbv/logo/15.bmp diff --git a/reactos/ntoskrnl/inbv/logo/2.bmp b/ntoskrnl/inbv/logo/2.bmp similarity index 100% rename from reactos/ntoskrnl/inbv/logo/2.bmp rename to ntoskrnl/inbv/logo/2.bmp diff --git a/reactos/ntoskrnl/inbv/logo/3.bmp b/ntoskrnl/inbv/logo/3.bmp similarity index 100% rename from reactos/ntoskrnl/inbv/logo/3.bmp rename to ntoskrnl/inbv/logo/3.bmp diff --git a/reactos/ntoskrnl/inbv/logo/4.bmp b/ntoskrnl/inbv/logo/4.bmp similarity index 100% rename from reactos/ntoskrnl/inbv/logo/4.bmp rename to ntoskrnl/inbv/logo/4.bmp diff --git a/reactos/ntoskrnl/inbv/logo/5.bmp b/ntoskrnl/inbv/logo/5.bmp similarity index 100% rename from reactos/ntoskrnl/inbv/logo/5.bmp rename to ntoskrnl/inbv/logo/5.bmp diff --git a/reactos/ntoskrnl/inbv/logo/6.bmp b/ntoskrnl/inbv/logo/6.bmp similarity index 100% rename from reactos/ntoskrnl/inbv/logo/6.bmp rename to ntoskrnl/inbv/logo/6.bmp diff --git a/reactos/ntoskrnl/inbv/logo/7.bmp b/ntoskrnl/inbv/logo/7.bmp similarity index 100% rename from reactos/ntoskrnl/inbv/logo/7.bmp rename to ntoskrnl/inbv/logo/7.bmp diff --git a/reactos/ntoskrnl/inbv/logo/8.bmp b/ntoskrnl/inbv/logo/8.bmp similarity index 100% rename from reactos/ntoskrnl/inbv/logo/8.bmp rename to ntoskrnl/inbv/logo/8.bmp diff --git a/reactos/ntoskrnl/include/config.h b/ntoskrnl/include/config.h similarity index 100% rename from reactos/ntoskrnl/include/config.h rename to ntoskrnl/include/config.h diff --git a/reactos/ntoskrnl/include/internal/amd64/asmmacro.S b/ntoskrnl/include/internal/amd64/asmmacro.S similarity index 100% rename from reactos/ntoskrnl/include/internal/amd64/asmmacro.S rename to ntoskrnl/include/internal/amd64/asmmacro.S diff --git a/reactos/ntoskrnl/include/internal/amd64/intrin_i.h b/ntoskrnl/include/internal/amd64/intrin_i.h similarity index 100% rename from reactos/ntoskrnl/include/internal/amd64/intrin_i.h rename to ntoskrnl/include/internal/amd64/intrin_i.h diff --git a/reactos/ntoskrnl/include/internal/amd64/ke.h b/ntoskrnl/include/internal/amd64/ke.h similarity index 100% rename from reactos/ntoskrnl/include/internal/amd64/ke.h rename to ntoskrnl/include/internal/amd64/ke.h diff --git a/reactos/ntoskrnl/include/internal/amd64/mm.h b/ntoskrnl/include/internal/amd64/mm.h similarity index 100% rename from reactos/ntoskrnl/include/internal/amd64/mm.h rename to ntoskrnl/include/internal/amd64/mm.h diff --git a/reactos/ntoskrnl/include/internal/arch/intrin_i.h b/ntoskrnl/include/internal/arch/intrin_i.h similarity index 100% rename from reactos/ntoskrnl/include/internal/arch/intrin_i.h rename to ntoskrnl/include/internal/arch/intrin_i.h diff --git a/reactos/ntoskrnl/include/internal/arch/ke.h b/ntoskrnl/include/internal/arch/ke.h similarity index 100% rename from reactos/ntoskrnl/include/internal/arch/ke.h rename to ntoskrnl/include/internal/arch/ke.h diff --git a/reactos/ntoskrnl/include/internal/arch/mm.h b/ntoskrnl/include/internal/arch/mm.h similarity index 100% rename from reactos/ntoskrnl/include/internal/arch/mm.h rename to ntoskrnl/include/internal/arch/mm.h diff --git a/reactos/ntoskrnl/include/internal/arm/asmmacro.S b/ntoskrnl/include/internal/arm/asmmacro.S similarity index 100% rename from reactos/ntoskrnl/include/internal/arm/asmmacro.S rename to ntoskrnl/include/internal/arm/asmmacro.S diff --git a/reactos/ntoskrnl/include/internal/arm/intrin_i.h b/ntoskrnl/include/internal/arm/intrin_i.h similarity index 100% rename from reactos/ntoskrnl/include/internal/arm/intrin_i.h rename to ntoskrnl/include/internal/arm/intrin_i.h diff --git a/reactos/ntoskrnl/include/internal/arm/ke.h b/ntoskrnl/include/internal/arm/ke.h similarity index 100% rename from reactos/ntoskrnl/include/internal/arm/ke.h rename to ntoskrnl/include/internal/arm/ke.h diff --git a/reactos/ntoskrnl/include/internal/arm/ksarm.h b/ntoskrnl/include/internal/arm/ksarm.h similarity index 100% rename from reactos/ntoskrnl/include/internal/arm/ksarm.h rename to ntoskrnl/include/internal/arm/ksarm.h diff --git a/reactos/ntoskrnl/include/internal/arm/kxarm.h b/ntoskrnl/include/internal/arm/kxarm.h similarity index 100% rename from reactos/ntoskrnl/include/internal/arm/kxarm.h rename to ntoskrnl/include/internal/arm/kxarm.h diff --git a/reactos/ntoskrnl/include/internal/arm/mm.h b/ntoskrnl/include/internal/arm/mm.h similarity index 100% rename from reactos/ntoskrnl/include/internal/arm/mm.h rename to ntoskrnl/include/internal/arm/mm.h diff --git a/reactos/ntoskrnl/include/internal/cc.h b/ntoskrnl/include/internal/cc.h similarity index 100% rename from reactos/ntoskrnl/include/internal/cc.h rename to ntoskrnl/include/internal/cc.h diff --git a/reactos/ntoskrnl/include/internal/cm.h b/ntoskrnl/include/internal/cm.h similarity index 100% rename from reactos/ntoskrnl/include/internal/cm.h rename to ntoskrnl/include/internal/cm.h diff --git a/reactos/ntoskrnl/include/internal/cm_x.h b/ntoskrnl/include/internal/cm_x.h similarity index 100% rename from reactos/ntoskrnl/include/internal/cm_x.h rename to ntoskrnl/include/internal/cm_x.h diff --git a/reactos/ntoskrnl/include/internal/dbgk.h b/ntoskrnl/include/internal/dbgk.h similarity index 100% rename from reactos/ntoskrnl/include/internal/dbgk.h rename to ntoskrnl/include/internal/dbgk.h diff --git a/reactos/ntoskrnl/include/internal/ex.h b/ntoskrnl/include/internal/ex.h similarity index 100% rename from reactos/ntoskrnl/include/internal/ex.h rename to ntoskrnl/include/internal/ex.h diff --git a/reactos/ntoskrnl/include/internal/fsrtl.h b/ntoskrnl/include/internal/fsrtl.h similarity index 100% rename from reactos/ntoskrnl/include/internal/fsrtl.h rename to ntoskrnl/include/internal/fsrtl.h diff --git a/reactos/ntoskrnl/include/internal/hal.h b/ntoskrnl/include/internal/hal.h similarity index 100% rename from reactos/ntoskrnl/include/internal/hal.h rename to ntoskrnl/include/internal/hal.h diff --git a/reactos/ntoskrnl/include/internal/hdl.h b/ntoskrnl/include/internal/hdl.h similarity index 100% rename from reactos/ntoskrnl/include/internal/hdl.h rename to ntoskrnl/include/internal/hdl.h diff --git a/reactos/ntoskrnl/include/internal/i386/asmmacro.S b/ntoskrnl/include/internal/i386/asmmacro.S similarity index 100% rename from reactos/ntoskrnl/include/internal/i386/asmmacro.S rename to ntoskrnl/include/internal/i386/asmmacro.S diff --git a/reactos/ntoskrnl/include/internal/i386/callconv.s b/ntoskrnl/include/internal/i386/callconv.s similarity index 100% rename from reactos/ntoskrnl/include/internal/i386/callconv.s rename to ntoskrnl/include/internal/i386/callconv.s diff --git a/reactos/ntoskrnl/include/internal/i386/intrin_i.h b/ntoskrnl/include/internal/i386/intrin_i.h similarity index 100% rename from reactos/ntoskrnl/include/internal/i386/intrin_i.h rename to ntoskrnl/include/internal/i386/intrin_i.h diff --git a/reactos/ntoskrnl/include/internal/i386/ke.h b/ntoskrnl/include/internal/i386/ke.h similarity index 100% rename from reactos/ntoskrnl/include/internal/i386/ke.h rename to ntoskrnl/include/internal/i386/ke.h diff --git a/reactos/ntoskrnl/include/internal/i386/mm.h b/ntoskrnl/include/internal/i386/mm.h similarity index 100% rename from reactos/ntoskrnl/include/internal/i386/mm.h rename to ntoskrnl/include/internal/i386/mm.h diff --git a/reactos/ntoskrnl/include/internal/i386/trap_x.h b/ntoskrnl/include/internal/i386/trap_x.h similarity index 100% rename from reactos/ntoskrnl/include/internal/i386/trap_x.h rename to ntoskrnl/include/internal/i386/trap_x.h diff --git a/reactos/ntoskrnl/include/internal/inbv.h b/ntoskrnl/include/internal/inbv.h similarity index 100% rename from reactos/ntoskrnl/include/internal/inbv.h rename to ntoskrnl/include/internal/inbv.h diff --git a/reactos/ntoskrnl/include/internal/io.h b/ntoskrnl/include/internal/io.h similarity index 100% rename from reactos/ntoskrnl/include/internal/io.h rename to ntoskrnl/include/internal/io.h diff --git a/reactos/ntoskrnl/include/internal/io_i.h b/ntoskrnl/include/internal/io_i.h similarity index 100% rename from reactos/ntoskrnl/include/internal/io_i.h rename to ntoskrnl/include/internal/io_i.h diff --git a/reactos/ntoskrnl/include/internal/io_x.h b/ntoskrnl/include/internal/io_x.h similarity index 100% rename from reactos/ntoskrnl/include/internal/io_x.h rename to ntoskrnl/include/internal/io_x.h diff --git a/reactos/ntoskrnl/include/internal/kd.h b/ntoskrnl/include/internal/kd.h similarity index 100% rename from reactos/ntoskrnl/include/internal/kd.h rename to ntoskrnl/include/internal/kd.h diff --git a/reactos/ntoskrnl/include/internal/kd64.h b/ntoskrnl/include/internal/kd64.h similarity index 100% rename from reactos/ntoskrnl/include/internal/kd64.h rename to ntoskrnl/include/internal/kd64.h diff --git a/reactos/ntoskrnl/include/internal/ke.h b/ntoskrnl/include/internal/ke.h similarity index 100% rename from reactos/ntoskrnl/include/internal/ke.h rename to ntoskrnl/include/internal/ke.h diff --git a/reactos/ntoskrnl/include/internal/ke_x.h b/ntoskrnl/include/internal/ke_x.h similarity index 100% rename from reactos/ntoskrnl/include/internal/ke_x.h rename to ntoskrnl/include/internal/ke_x.h diff --git a/reactos/ntoskrnl/include/internal/ldr.h b/ntoskrnl/include/internal/ldr.h similarity index 100% rename from reactos/ntoskrnl/include/internal/ldr.h rename to ntoskrnl/include/internal/ldr.h diff --git a/reactos/ntoskrnl/include/internal/lpc.h b/ntoskrnl/include/internal/lpc.h similarity index 100% rename from reactos/ntoskrnl/include/internal/lpc.h rename to ntoskrnl/include/internal/lpc.h diff --git a/reactos/ntoskrnl/include/internal/lpc_x.h b/ntoskrnl/include/internal/lpc_x.h similarity index 100% rename from reactos/ntoskrnl/include/internal/lpc_x.h rename to ntoskrnl/include/internal/lpc_x.h diff --git a/reactos/ntoskrnl/include/internal/mm.h b/ntoskrnl/include/internal/mm.h similarity index 100% rename from reactos/ntoskrnl/include/internal/mm.h rename to ntoskrnl/include/internal/mm.h diff --git a/reactos/ntoskrnl/include/internal/napi.h b/ntoskrnl/include/internal/napi.h similarity index 100% rename from reactos/ntoskrnl/include/internal/napi.h rename to ntoskrnl/include/internal/napi.h diff --git a/reactos/ntoskrnl/include/internal/ntoskrnl.h b/ntoskrnl/include/internal/ntoskrnl.h similarity index 100% rename from reactos/ntoskrnl/include/internal/ntoskrnl.h rename to ntoskrnl/include/internal/ntoskrnl.h diff --git a/reactos/ntoskrnl/include/internal/ob.h b/ntoskrnl/include/internal/ob.h similarity index 100% rename from reactos/ntoskrnl/include/internal/ob.h rename to ntoskrnl/include/internal/ob.h diff --git a/reactos/ntoskrnl/include/internal/ob_x.h b/ntoskrnl/include/internal/ob_x.h similarity index 100% rename from reactos/ntoskrnl/include/internal/ob_x.h rename to ntoskrnl/include/internal/ob_x.h diff --git a/reactos/ntoskrnl/include/internal/po.h b/ntoskrnl/include/internal/po.h similarity index 100% rename from reactos/ntoskrnl/include/internal/po.h rename to ntoskrnl/include/internal/po.h diff --git a/reactos/ntoskrnl/include/internal/powerpc/intrin_i.h b/ntoskrnl/include/internal/powerpc/intrin_i.h similarity index 100% rename from reactos/ntoskrnl/include/internal/powerpc/intrin_i.h rename to ntoskrnl/include/internal/powerpc/intrin_i.h diff --git a/reactos/ntoskrnl/include/internal/powerpc/ke.h b/ntoskrnl/include/internal/powerpc/ke.h similarity index 100% rename from reactos/ntoskrnl/include/internal/powerpc/ke.h rename to ntoskrnl/include/internal/powerpc/ke.h diff --git a/reactos/ntoskrnl/include/internal/probe.h b/ntoskrnl/include/internal/probe.h similarity index 100% rename from reactos/ntoskrnl/include/internal/probe.h rename to ntoskrnl/include/internal/probe.h diff --git a/reactos/ntoskrnl/include/internal/ps.h b/ntoskrnl/include/internal/ps.h similarity index 100% rename from reactos/ntoskrnl/include/internal/ps.h rename to ntoskrnl/include/internal/ps.h diff --git a/reactos/ntoskrnl/include/internal/ps_i.h b/ntoskrnl/include/internal/ps_i.h similarity index 100% rename from reactos/ntoskrnl/include/internal/ps_i.h rename to ntoskrnl/include/internal/ps_i.h diff --git a/reactos/ntoskrnl/include/internal/ps_x.h b/ntoskrnl/include/internal/ps_x.h similarity index 100% rename from reactos/ntoskrnl/include/internal/ps_x.h rename to ntoskrnl/include/internal/ps_x.h diff --git a/reactos/ntoskrnl/include/internal/rtl.h b/ntoskrnl/include/internal/rtl.h similarity index 100% rename from reactos/ntoskrnl/include/internal/rtl.h rename to ntoskrnl/include/internal/rtl.h diff --git a/reactos/ntoskrnl/include/internal/se.h b/ntoskrnl/include/internal/se.h similarity index 100% rename from reactos/ntoskrnl/include/internal/se.h rename to ntoskrnl/include/internal/se.h diff --git a/reactos/ntoskrnl/include/internal/spinlock.h b/ntoskrnl/include/internal/spinlock.h similarity index 100% rename from reactos/ntoskrnl/include/internal/spinlock.h rename to ntoskrnl/include/internal/spinlock.h diff --git a/reactos/ntoskrnl/include/internal/tag.h b/ntoskrnl/include/internal/tag.h similarity index 100% rename from reactos/ntoskrnl/include/internal/tag.h rename to ntoskrnl/include/internal/tag.h diff --git a/reactos/ntoskrnl/include/internal/test.h b/ntoskrnl/include/internal/test.h similarity index 100% rename from reactos/ntoskrnl/include/internal/test.h rename to ntoskrnl/include/internal/test.h diff --git a/reactos/ntoskrnl/include/internal/vdm.h b/ntoskrnl/include/internal/vdm.h similarity index 100% rename from reactos/ntoskrnl/include/internal/vdm.h rename to ntoskrnl/include/internal/vdm.h diff --git a/reactos/ntoskrnl/include/ntoskrnl.h b/ntoskrnl/include/ntoskrnl.h similarity index 100% rename from reactos/ntoskrnl/include/ntoskrnl.h rename to ntoskrnl/include/ntoskrnl.h diff --git a/reactos/ntoskrnl/include/resource.h b/ntoskrnl/include/resource.h similarity index 100% rename from reactos/ntoskrnl/include/resource.h rename to ntoskrnl/include/resource.h diff --git a/reactos/ntoskrnl/include/sysfuncs.h b/ntoskrnl/include/sysfuncs.h similarity index 100% rename from reactos/ntoskrnl/include/sysfuncs.h rename to ntoskrnl/include/sysfuncs.h diff --git a/reactos/ntoskrnl/io/iomgr/adapter.c b/ntoskrnl/io/iomgr/adapter.c similarity index 100% rename from reactos/ntoskrnl/io/iomgr/adapter.c rename to ntoskrnl/io/iomgr/adapter.c diff --git a/reactos/ntoskrnl/io/iomgr/arcname.c b/ntoskrnl/io/iomgr/arcname.c similarity index 100% rename from reactos/ntoskrnl/io/iomgr/arcname.c rename to ntoskrnl/io/iomgr/arcname.c diff --git a/reactos/ntoskrnl/io/iomgr/bootlog.c b/ntoskrnl/io/iomgr/bootlog.c similarity index 100% rename from reactos/ntoskrnl/io/iomgr/bootlog.c rename to ntoskrnl/io/iomgr/bootlog.c diff --git a/reactos/ntoskrnl/io/iomgr/controller.c b/ntoskrnl/io/iomgr/controller.c similarity index 100% rename from reactos/ntoskrnl/io/iomgr/controller.c rename to ntoskrnl/io/iomgr/controller.c diff --git a/reactos/ntoskrnl/io/iomgr/device.c b/ntoskrnl/io/iomgr/device.c similarity index 100% rename from reactos/ntoskrnl/io/iomgr/device.c rename to ntoskrnl/io/iomgr/device.c diff --git a/reactos/ntoskrnl/io/iomgr/deviface.c b/ntoskrnl/io/iomgr/deviface.c similarity index 100% rename from reactos/ntoskrnl/io/iomgr/deviface.c rename to ntoskrnl/io/iomgr/deviface.c diff --git a/reactos/ntoskrnl/io/iomgr/driver.c b/ntoskrnl/io/iomgr/driver.c similarity index 100% rename from reactos/ntoskrnl/io/iomgr/driver.c rename to ntoskrnl/io/iomgr/driver.c diff --git a/reactos/ntoskrnl/io/iomgr/error.c b/ntoskrnl/io/iomgr/error.c similarity index 100% rename from reactos/ntoskrnl/io/iomgr/error.c rename to ntoskrnl/io/iomgr/error.c diff --git a/reactos/ntoskrnl/io/iomgr/file.c b/ntoskrnl/io/iomgr/file.c similarity index 100% rename from reactos/ntoskrnl/io/iomgr/file.c rename to ntoskrnl/io/iomgr/file.c diff --git a/reactos/ntoskrnl/io/iomgr/iocomp.c b/ntoskrnl/io/iomgr/iocomp.c similarity index 100% rename from reactos/ntoskrnl/io/iomgr/iocomp.c rename to ntoskrnl/io/iomgr/iocomp.c diff --git a/reactos/ntoskrnl/io/iomgr/ioevent.c b/ntoskrnl/io/iomgr/ioevent.c similarity index 100% rename from reactos/ntoskrnl/io/iomgr/ioevent.c rename to ntoskrnl/io/iomgr/ioevent.c diff --git a/reactos/ntoskrnl/io/iomgr/iofunc.c b/ntoskrnl/io/iomgr/iofunc.c similarity index 100% rename from reactos/ntoskrnl/io/iomgr/iofunc.c rename to ntoskrnl/io/iomgr/iofunc.c diff --git a/reactos/ntoskrnl/io/iomgr/iomdl.c b/ntoskrnl/io/iomgr/iomdl.c similarity index 100% rename from reactos/ntoskrnl/io/iomgr/iomdl.c rename to ntoskrnl/io/iomgr/iomdl.c diff --git a/reactos/ntoskrnl/io/iomgr/iomgr.c b/ntoskrnl/io/iomgr/iomgr.c similarity index 100% rename from reactos/ntoskrnl/io/iomgr/iomgr.c rename to ntoskrnl/io/iomgr/iomgr.c diff --git a/reactos/ntoskrnl/io/iomgr/iorsrce.c b/ntoskrnl/io/iomgr/iorsrce.c similarity index 100% rename from reactos/ntoskrnl/io/iomgr/iorsrce.c rename to ntoskrnl/io/iomgr/iorsrce.c diff --git a/reactos/ntoskrnl/io/iomgr/iotimer.c b/ntoskrnl/io/iomgr/iotimer.c similarity index 100% rename from reactos/ntoskrnl/io/iomgr/iotimer.c rename to ntoskrnl/io/iomgr/iotimer.c diff --git a/reactos/ntoskrnl/io/iomgr/iowork.c b/ntoskrnl/io/iomgr/iowork.c similarity index 100% rename from reactos/ntoskrnl/io/iomgr/iowork.c rename to ntoskrnl/io/iomgr/iowork.c diff --git a/reactos/ntoskrnl/io/iomgr/irp.c b/ntoskrnl/io/iomgr/irp.c similarity index 100% rename from reactos/ntoskrnl/io/iomgr/irp.c rename to ntoskrnl/io/iomgr/irp.c diff --git a/reactos/ntoskrnl/io/iomgr/irq.c b/ntoskrnl/io/iomgr/irq.c similarity index 100% rename from reactos/ntoskrnl/io/iomgr/irq.c rename to ntoskrnl/io/iomgr/irq.c diff --git a/reactos/ntoskrnl/io/iomgr/ramdisk.c b/ntoskrnl/io/iomgr/ramdisk.c similarity index 100% rename from reactos/ntoskrnl/io/iomgr/ramdisk.c rename to ntoskrnl/io/iomgr/ramdisk.c diff --git a/reactos/ntoskrnl/io/iomgr/rawfs.c b/ntoskrnl/io/iomgr/rawfs.c similarity index 100% rename from reactos/ntoskrnl/io/iomgr/rawfs.c rename to ntoskrnl/io/iomgr/rawfs.c diff --git a/reactos/ntoskrnl/io/iomgr/remlock.c b/ntoskrnl/io/iomgr/remlock.c similarity index 100% rename from reactos/ntoskrnl/io/iomgr/remlock.c rename to ntoskrnl/io/iomgr/remlock.c diff --git a/reactos/ntoskrnl/io/iomgr/symlink.c b/ntoskrnl/io/iomgr/symlink.c similarity index 100% rename from reactos/ntoskrnl/io/iomgr/symlink.c rename to ntoskrnl/io/iomgr/symlink.c diff --git a/reactos/ntoskrnl/io/iomgr/util.c b/ntoskrnl/io/iomgr/util.c similarity index 100% rename from reactos/ntoskrnl/io/iomgr/util.c rename to ntoskrnl/io/iomgr/util.c diff --git a/reactos/ntoskrnl/io/iomgr/volume.c b/ntoskrnl/io/iomgr/volume.c similarity index 100% rename from reactos/ntoskrnl/io/iomgr/volume.c rename to ntoskrnl/io/iomgr/volume.c diff --git a/reactos/ntoskrnl/io/pnpmgr/plugplay.c b/ntoskrnl/io/pnpmgr/plugplay.c similarity index 100% rename from reactos/ntoskrnl/io/pnpmgr/plugplay.c rename to ntoskrnl/io/pnpmgr/plugplay.c diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpdma.c b/ntoskrnl/io/pnpmgr/pnpdma.c similarity index 100% rename from reactos/ntoskrnl/io/pnpmgr/pnpdma.c rename to ntoskrnl/io/pnpmgr/pnpdma.c diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpinit.c b/ntoskrnl/io/pnpmgr/pnpinit.c similarity index 100% rename from reactos/ntoskrnl/io/pnpmgr/pnpinit.c rename to ntoskrnl/io/pnpmgr/pnpinit.c diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c b/ntoskrnl/io/pnpmgr/pnpmgr.c similarity index 100% rename from reactos/ntoskrnl/io/pnpmgr/pnpmgr.c rename to ntoskrnl/io/pnpmgr/pnpmgr.c diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpnotify.c b/ntoskrnl/io/pnpmgr/pnpnotify.c similarity index 100% rename from reactos/ntoskrnl/io/pnpmgr/pnpnotify.c rename to ntoskrnl/io/pnpmgr/pnpnotify.c diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpreport.c b/ntoskrnl/io/pnpmgr/pnpreport.c similarity index 100% rename from reactos/ntoskrnl/io/pnpmgr/pnpreport.c rename to ntoskrnl/io/pnpmgr/pnpreport.c diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpres.c b/ntoskrnl/io/pnpmgr/pnpres.c similarity index 100% rename from reactos/ntoskrnl/io/pnpmgr/pnpres.c rename to ntoskrnl/io/pnpmgr/pnpres.c diff --git a/reactos/ntoskrnl/io/pnpmgr/pnproot.c b/ntoskrnl/io/pnpmgr/pnproot.c similarity index 100% rename from reactos/ntoskrnl/io/pnpmgr/pnproot.c rename to ntoskrnl/io/pnpmgr/pnproot.c diff --git a/reactos/ntoskrnl/io/pnpmgr/pnputil.c b/ntoskrnl/io/pnpmgr/pnputil.c similarity index 100% rename from reactos/ntoskrnl/io/pnpmgr/pnputil.c rename to ntoskrnl/io/pnpmgr/pnputil.c diff --git a/reactos/ntoskrnl/kd/amd64/kd.c b/ntoskrnl/kd/amd64/kd.c similarity index 100% rename from reactos/ntoskrnl/kd/amd64/kd.c rename to ntoskrnl/kd/amd64/kd.c diff --git a/reactos/ntoskrnl/kd/amd64/kdmemsup.c b/ntoskrnl/kd/amd64/kdmemsup.c similarity index 100% rename from reactos/ntoskrnl/kd/amd64/kdmemsup.c rename to ntoskrnl/kd/amd64/kdmemsup.c diff --git a/reactos/ntoskrnl/kd/i386/kdmemsup.c b/ntoskrnl/kd/i386/kdmemsup.c similarity index 100% rename from reactos/ntoskrnl/kd/i386/kdmemsup.c rename to ntoskrnl/kd/i386/kdmemsup.c diff --git a/reactos/ntoskrnl/kd/kdinit.c b/ntoskrnl/kd/kdinit.c similarity index 100% rename from reactos/ntoskrnl/kd/kdinit.c rename to ntoskrnl/kd/kdinit.c diff --git a/reactos/ntoskrnl/kd/kdio.c b/ntoskrnl/kd/kdio.c similarity index 100% rename from reactos/ntoskrnl/kd/kdio.c rename to ntoskrnl/kd/kdio.c diff --git a/reactos/ntoskrnl/kd/kdmain.c b/ntoskrnl/kd/kdmain.c similarity index 100% rename from reactos/ntoskrnl/kd/kdmain.c rename to ntoskrnl/kd/kdmain.c diff --git a/reactos/ntoskrnl/kd/wrappers/bochs.c b/ntoskrnl/kd/wrappers/bochs.c similarity index 100% rename from reactos/ntoskrnl/kd/wrappers/bochs.c rename to ntoskrnl/kd/wrappers/bochs.c diff --git a/reactos/ntoskrnl/kd/wrappers/gdbstub.c b/ntoskrnl/kd/wrappers/gdbstub.c similarity index 100% rename from reactos/ntoskrnl/kd/wrappers/gdbstub.c rename to ntoskrnl/kd/wrappers/gdbstub.c diff --git a/reactos/ntoskrnl/kd/wrappers/gdbstub_powerpc.c b/ntoskrnl/kd/wrappers/gdbstub_powerpc.c similarity index 100% rename from reactos/ntoskrnl/kd/wrappers/gdbstub_powerpc.c rename to ntoskrnl/kd/wrappers/gdbstub_powerpc.c diff --git a/reactos/ntoskrnl/kd/wrappers/kdbg.c b/ntoskrnl/kd/wrappers/kdbg.c similarity index 100% rename from reactos/ntoskrnl/kd/wrappers/kdbg.c rename to ntoskrnl/kd/wrappers/kdbg.c diff --git a/reactos/ntoskrnl/kd64/amd64/kdx64.c b/ntoskrnl/kd64/amd64/kdx64.c similarity index 100% rename from reactos/ntoskrnl/kd64/amd64/kdx64.c rename to ntoskrnl/kd64/amd64/kdx64.c diff --git a/reactos/ntoskrnl/kd64/arm/kdarm.c b/ntoskrnl/kd64/arm/kdarm.c similarity index 100% rename from reactos/ntoskrnl/kd64/arm/kdarm.c rename to ntoskrnl/kd64/arm/kdarm.c diff --git a/reactos/ntoskrnl/kd64/i386/kdx86.c b/ntoskrnl/kd64/i386/kdx86.c similarity index 100% rename from reactos/ntoskrnl/kd64/i386/kdx86.c rename to ntoskrnl/kd64/i386/kdx86.c diff --git a/reactos/ntoskrnl/kd64/kdapi.c b/ntoskrnl/kd64/kdapi.c similarity index 100% rename from reactos/ntoskrnl/kd64/kdapi.c rename to ntoskrnl/kd64/kdapi.c diff --git a/reactos/ntoskrnl/kd64/kdbreak.c b/ntoskrnl/kd64/kdbreak.c similarity index 100% rename from reactos/ntoskrnl/kd64/kdbreak.c rename to ntoskrnl/kd64/kdbreak.c diff --git a/reactos/ntoskrnl/kd64/kddata.c b/ntoskrnl/kd64/kddata.c similarity index 100% rename from reactos/ntoskrnl/kd64/kddata.c rename to ntoskrnl/kd64/kddata.c diff --git a/reactos/ntoskrnl/kd64/kdinit.c b/ntoskrnl/kd64/kdinit.c similarity index 100% rename from reactos/ntoskrnl/kd64/kdinit.c rename to ntoskrnl/kd64/kdinit.c diff --git a/reactos/ntoskrnl/kd64/kdlock.c b/ntoskrnl/kd64/kdlock.c similarity index 100% rename from reactos/ntoskrnl/kd64/kdlock.c rename to ntoskrnl/kd64/kdlock.c diff --git a/reactos/ntoskrnl/kd64/kdprint.c b/ntoskrnl/kd64/kdprint.c similarity index 100% rename from reactos/ntoskrnl/kd64/kdprint.c rename to ntoskrnl/kd64/kdprint.c diff --git a/reactos/ntoskrnl/kd64/kdtrap.c b/ntoskrnl/kd64/kdtrap.c similarity index 100% rename from reactos/ntoskrnl/kd64/kdtrap.c rename to ntoskrnl/kd64/kdtrap.c diff --git a/reactos/ntoskrnl/kdbg/amd64/dis-asm.h b/ntoskrnl/kdbg/amd64/dis-asm.h similarity index 100% rename from reactos/ntoskrnl/kdbg/amd64/dis-asm.h rename to ntoskrnl/kdbg/amd64/dis-asm.h diff --git a/reactos/ntoskrnl/kdbg/amd64/i386-dis.c b/ntoskrnl/kdbg/amd64/i386-dis.c similarity index 100% rename from reactos/ntoskrnl/kdbg/amd64/i386-dis.c rename to ntoskrnl/kdbg/amd64/i386-dis.c diff --git a/reactos/ntoskrnl/kdbg/amd64/kdb.c b/ntoskrnl/kdbg/amd64/kdb.c similarity index 100% rename from reactos/ntoskrnl/kdbg/amd64/kdb.c rename to ntoskrnl/kdbg/amd64/kdb.c diff --git a/reactos/ntoskrnl/kdbg/amd64/kdb_help.S b/ntoskrnl/kdbg/amd64/kdb_help.S similarity index 100% rename from reactos/ntoskrnl/kdbg/amd64/kdb_help.S rename to ntoskrnl/kdbg/amd64/kdb_help.S diff --git a/reactos/ntoskrnl/kdbg/i386/dis-asm.h b/ntoskrnl/kdbg/i386/dis-asm.h similarity index 100% rename from reactos/ntoskrnl/kdbg/i386/dis-asm.h rename to ntoskrnl/kdbg/i386/dis-asm.h diff --git a/reactos/ntoskrnl/kdbg/i386/i386-dis.c b/ntoskrnl/kdbg/i386/i386-dis.c similarity index 100% rename from reactos/ntoskrnl/kdbg/i386/i386-dis.c rename to ntoskrnl/kdbg/i386/i386-dis.c diff --git a/reactos/ntoskrnl/kdbg/i386/kdb_help.S b/ntoskrnl/kdbg/i386/kdb_help.S similarity index 100% rename from reactos/ntoskrnl/kdbg/i386/kdb_help.S rename to ntoskrnl/kdbg/i386/kdb_help.S diff --git a/reactos/ntoskrnl/kdbg/i386/longjmp.S b/ntoskrnl/kdbg/i386/longjmp.S similarity index 100% rename from reactos/ntoskrnl/kdbg/i386/longjmp.S rename to ntoskrnl/kdbg/i386/longjmp.S diff --git a/reactos/ntoskrnl/kdbg/i386/setjmp.S b/ntoskrnl/kdbg/i386/setjmp.S similarity index 100% rename from reactos/ntoskrnl/kdbg/i386/setjmp.S rename to ntoskrnl/kdbg/i386/setjmp.S diff --git a/reactos/ntoskrnl/kdbg/kdb.c b/ntoskrnl/kdbg/kdb.c similarity index 100% rename from reactos/ntoskrnl/kdbg/kdb.c rename to ntoskrnl/kdbg/kdb.c diff --git a/reactos/ntoskrnl/kdbg/kdb.h b/ntoskrnl/kdbg/kdb.h similarity index 100% rename from reactos/ntoskrnl/kdbg/kdb.h rename to ntoskrnl/kdbg/kdb.h diff --git a/reactos/ntoskrnl/kdbg/kdb_cli.c b/ntoskrnl/kdbg/kdb_cli.c similarity index 100% rename from reactos/ntoskrnl/kdbg/kdb_cli.c rename to ntoskrnl/kdbg/kdb_cli.c diff --git a/reactos/ntoskrnl/kdbg/kdb_expr.c b/ntoskrnl/kdbg/kdb_expr.c similarity index 100% rename from reactos/ntoskrnl/kdbg/kdb_expr.c rename to ntoskrnl/kdbg/kdb_expr.c diff --git a/reactos/ntoskrnl/kdbg/kdb_keyboard.c b/ntoskrnl/kdbg/kdb_keyboard.c similarity index 100% rename from reactos/ntoskrnl/kdbg/kdb_keyboard.c rename to ntoskrnl/kdbg/kdb_keyboard.c diff --git a/reactos/ntoskrnl/kdbg/kdb_serial.c b/ntoskrnl/kdbg/kdb_serial.c similarity index 100% rename from reactos/ntoskrnl/kdbg/kdb_serial.c rename to ntoskrnl/kdbg/kdb_serial.c diff --git a/reactos/ntoskrnl/kdbg/kdb_symbols.c b/ntoskrnl/kdbg/kdb_symbols.c similarity index 100% rename from reactos/ntoskrnl/kdbg/kdb_symbols.c rename to ntoskrnl/kdbg/kdb_symbols.c diff --git a/reactos/ntoskrnl/kdbg/kdb_symbols.cmake.c b/ntoskrnl/kdbg/kdb_symbols.cmake.c similarity index 100% rename from reactos/ntoskrnl/kdbg/kdb_symbols.cmake.c rename to ntoskrnl/kdbg/kdb_symbols.cmake.c diff --git a/reactos/ntoskrnl/ke/amd64/boot.S b/ntoskrnl/ke/amd64/boot.S similarity index 100% rename from reactos/ntoskrnl/ke/amd64/boot.S rename to ntoskrnl/ke/amd64/boot.S diff --git a/reactos/ntoskrnl/ke/amd64/context.c b/ntoskrnl/ke/amd64/context.c similarity index 100% rename from reactos/ntoskrnl/ke/amd64/context.c rename to ntoskrnl/ke/amd64/context.c diff --git a/reactos/ntoskrnl/ke/amd64/cpu.c b/ntoskrnl/ke/amd64/cpu.c similarity index 100% rename from reactos/ntoskrnl/ke/amd64/cpu.c rename to ntoskrnl/ke/amd64/cpu.c diff --git a/reactos/ntoskrnl/ke/amd64/ctxswitch.S b/ntoskrnl/ke/amd64/ctxswitch.S similarity index 100% rename from reactos/ntoskrnl/ke/amd64/ctxswitch.S rename to ntoskrnl/ke/amd64/ctxswitch.S diff --git a/reactos/ntoskrnl/ke/amd64/except.c b/ntoskrnl/ke/amd64/except.c similarity index 100% rename from reactos/ntoskrnl/ke/amd64/except.c rename to ntoskrnl/ke/amd64/except.c diff --git a/reactos/ntoskrnl/ke/amd64/interrupt.c b/ntoskrnl/ke/amd64/interrupt.c similarity index 100% rename from reactos/ntoskrnl/ke/amd64/interrupt.c rename to ntoskrnl/ke/amd64/interrupt.c diff --git a/reactos/ntoskrnl/ke/amd64/irql.c b/ntoskrnl/ke/amd64/irql.c similarity index 100% rename from reactos/ntoskrnl/ke/amd64/irql.c rename to ntoskrnl/ke/amd64/irql.c diff --git a/reactos/ntoskrnl/ke/amd64/kiinit.c b/ntoskrnl/ke/amd64/kiinit.c similarity index 100% rename from reactos/ntoskrnl/ke/amd64/kiinit.c rename to ntoskrnl/ke/amd64/kiinit.c diff --git a/reactos/ntoskrnl/ke/amd64/krnlinit.c b/ntoskrnl/ke/amd64/krnlinit.c similarity index 100% rename from reactos/ntoskrnl/ke/amd64/krnlinit.c rename to ntoskrnl/ke/amd64/krnlinit.c diff --git a/reactos/ntoskrnl/ke/amd64/spinlock.c b/ntoskrnl/ke/amd64/spinlock.c similarity index 100% rename from reactos/ntoskrnl/ke/amd64/spinlock.c rename to ntoskrnl/ke/amd64/spinlock.c diff --git a/reactos/ntoskrnl/ke/amd64/stubs.c b/ntoskrnl/ke/amd64/stubs.c similarity index 100% rename from reactos/ntoskrnl/ke/amd64/stubs.c rename to ntoskrnl/ke/amd64/stubs.c diff --git a/reactos/ntoskrnl/ke/amd64/thrdini.c b/ntoskrnl/ke/amd64/thrdini.c similarity index 100% rename from reactos/ntoskrnl/ke/amd64/thrdini.c rename to ntoskrnl/ke/amd64/thrdini.c diff --git a/reactos/ntoskrnl/ke/amd64/trap.S b/ntoskrnl/ke/amd64/trap.S similarity index 100% rename from reactos/ntoskrnl/ke/amd64/trap.S rename to ntoskrnl/ke/amd64/trap.S diff --git a/reactos/ntoskrnl/ke/apc.c b/ntoskrnl/ke/apc.c similarity index 100% rename from reactos/ntoskrnl/ke/apc.c rename to ntoskrnl/ke/apc.c diff --git a/reactos/ntoskrnl/ke/arm/boot.s b/ntoskrnl/ke/arm/boot.s similarity index 100% rename from reactos/ntoskrnl/ke/arm/boot.s rename to ntoskrnl/ke/arm/boot.s diff --git a/reactos/ntoskrnl/ke/arm/cpu.c b/ntoskrnl/ke/arm/cpu.c similarity index 100% rename from reactos/ntoskrnl/ke/arm/cpu.c rename to ntoskrnl/ke/arm/cpu.c diff --git a/reactos/ntoskrnl/ke/arm/ctxswtch.s b/ntoskrnl/ke/arm/ctxswtch.s similarity index 100% rename from reactos/ntoskrnl/ke/arm/ctxswtch.s rename to ntoskrnl/ke/arm/ctxswtch.s diff --git a/reactos/ntoskrnl/ke/arm/exp.c b/ntoskrnl/ke/arm/exp.c similarity index 100% rename from reactos/ntoskrnl/ke/arm/exp.c rename to ntoskrnl/ke/arm/exp.c diff --git a/reactos/ntoskrnl/ke/arm/ke_i.h b/ntoskrnl/ke/arm/ke_i.h similarity index 100% rename from reactos/ntoskrnl/ke/arm/ke_i.h rename to ntoskrnl/ke/arm/ke_i.h diff --git a/reactos/ntoskrnl/ke/arm/kiinit.c b/ntoskrnl/ke/arm/kiinit.c similarity index 100% rename from reactos/ntoskrnl/ke/arm/kiinit.c rename to ntoskrnl/ke/arm/kiinit.c diff --git a/reactos/ntoskrnl/ke/arm/stubs_asm.s b/ntoskrnl/ke/arm/stubs_asm.s similarity index 100% rename from reactos/ntoskrnl/ke/arm/stubs_asm.s rename to ntoskrnl/ke/arm/stubs_asm.s diff --git a/reactos/ntoskrnl/ke/arm/thrdini.c b/ntoskrnl/ke/arm/thrdini.c similarity index 100% rename from reactos/ntoskrnl/ke/arm/thrdini.c rename to ntoskrnl/ke/arm/thrdini.c diff --git a/reactos/ntoskrnl/ke/arm/trap.s b/ntoskrnl/ke/arm/trap.s similarity index 100% rename from reactos/ntoskrnl/ke/arm/trap.s rename to ntoskrnl/ke/arm/trap.s diff --git a/reactos/ntoskrnl/ke/arm/trapc.c b/ntoskrnl/ke/arm/trapc.c similarity index 100% rename from reactos/ntoskrnl/ke/arm/trapc.c rename to ntoskrnl/ke/arm/trapc.c diff --git a/reactos/ntoskrnl/ke/arm/usercall.c b/ntoskrnl/ke/arm/usercall.c similarity index 100% rename from reactos/ntoskrnl/ke/arm/usercall.c rename to ntoskrnl/ke/arm/usercall.c diff --git a/reactos/ntoskrnl/ke/balmgr.c b/ntoskrnl/ke/balmgr.c similarity index 100% rename from reactos/ntoskrnl/ke/balmgr.c rename to ntoskrnl/ke/balmgr.c diff --git a/reactos/ntoskrnl/ke/bug.c b/ntoskrnl/ke/bug.c similarity index 100% rename from reactos/ntoskrnl/ke/bug.c rename to ntoskrnl/ke/bug.c diff --git a/reactos/ntoskrnl/ke/clock.c b/ntoskrnl/ke/clock.c similarity index 100% rename from reactos/ntoskrnl/ke/clock.c rename to ntoskrnl/ke/clock.c diff --git a/reactos/ntoskrnl/ke/config.c b/ntoskrnl/ke/config.c similarity index 100% rename from reactos/ntoskrnl/ke/config.c rename to ntoskrnl/ke/config.c diff --git a/reactos/ntoskrnl/ke/devqueue.c b/ntoskrnl/ke/devqueue.c similarity index 100% rename from reactos/ntoskrnl/ke/devqueue.c rename to ntoskrnl/ke/devqueue.c diff --git a/reactos/ntoskrnl/ke/dpc.c b/ntoskrnl/ke/dpc.c similarity index 100% rename from reactos/ntoskrnl/ke/dpc.c rename to ntoskrnl/ke/dpc.c diff --git a/reactos/ntoskrnl/ke/eventobj.c b/ntoskrnl/ke/eventobj.c similarity index 100% rename from reactos/ntoskrnl/ke/eventobj.c rename to ntoskrnl/ke/eventobj.c diff --git a/reactos/ntoskrnl/ke/except.c b/ntoskrnl/ke/except.c similarity index 100% rename from reactos/ntoskrnl/ke/except.c rename to ntoskrnl/ke/except.c diff --git a/reactos/ntoskrnl/ke/freeze.c b/ntoskrnl/ke/freeze.c similarity index 100% rename from reactos/ntoskrnl/ke/freeze.c rename to ntoskrnl/ke/freeze.c diff --git a/reactos/ntoskrnl/ke/gate.c b/ntoskrnl/ke/gate.c similarity index 100% rename from reactos/ntoskrnl/ke/gate.c rename to ntoskrnl/ke/gate.c diff --git a/reactos/ntoskrnl/ke/gmutex.c b/ntoskrnl/ke/gmutex.c similarity index 100% rename from reactos/ntoskrnl/ke/gmutex.c rename to ntoskrnl/ke/gmutex.c diff --git a/reactos/ntoskrnl/ke/i386/abios.c b/ntoskrnl/ke/i386/abios.c similarity index 100% rename from reactos/ntoskrnl/ke/i386/abios.c rename to ntoskrnl/ke/i386/abios.c diff --git a/reactos/ntoskrnl/ke/i386/context.c b/ntoskrnl/ke/i386/context.c similarity index 100% rename from reactos/ntoskrnl/ke/i386/context.c rename to ntoskrnl/ke/i386/context.c diff --git a/reactos/ntoskrnl/ke/i386/cpu.c b/ntoskrnl/ke/i386/cpu.c similarity index 100% rename from reactos/ntoskrnl/ke/i386/cpu.c rename to ntoskrnl/ke/i386/cpu.c diff --git a/reactos/ntoskrnl/ke/i386/ctxswitch.S b/ntoskrnl/ke/i386/ctxswitch.S similarity index 100% rename from reactos/ntoskrnl/ke/i386/ctxswitch.S rename to ntoskrnl/ke/i386/ctxswitch.S diff --git a/reactos/ntoskrnl/ke/i386/exp.c b/ntoskrnl/ke/i386/exp.c similarity index 100% rename from reactos/ntoskrnl/ke/i386/exp.c rename to ntoskrnl/ke/i386/exp.c diff --git a/reactos/ntoskrnl/ke/i386/irqobj.c b/ntoskrnl/ke/i386/irqobj.c similarity index 100% rename from reactos/ntoskrnl/ke/i386/irqobj.c rename to ntoskrnl/ke/i386/irqobj.c diff --git a/reactos/ntoskrnl/ke/i386/kiinit.c b/ntoskrnl/ke/i386/kiinit.c similarity index 100% rename from reactos/ntoskrnl/ke/i386/kiinit.c rename to ntoskrnl/ke/i386/kiinit.c diff --git a/reactos/ntoskrnl/ke/i386/ldt.c b/ntoskrnl/ke/i386/ldt.c similarity index 100% rename from reactos/ntoskrnl/ke/i386/ldt.c rename to ntoskrnl/ke/i386/ldt.c diff --git a/reactos/ntoskrnl/ke/i386/mtrr.c b/ntoskrnl/ke/i386/mtrr.c similarity index 100% rename from reactos/ntoskrnl/ke/i386/mtrr.c rename to ntoskrnl/ke/i386/mtrr.c diff --git a/reactos/ntoskrnl/ke/i386/patpge.c b/ntoskrnl/ke/i386/patpge.c similarity index 100% rename from reactos/ntoskrnl/ke/i386/patpge.c rename to ntoskrnl/ke/i386/patpge.c diff --git a/reactos/ntoskrnl/ke/i386/thrdini.c b/ntoskrnl/ke/i386/thrdini.c similarity index 100% rename from reactos/ntoskrnl/ke/i386/thrdini.c rename to ntoskrnl/ke/i386/thrdini.c diff --git a/reactos/ntoskrnl/ke/i386/trap.s b/ntoskrnl/ke/i386/trap.s similarity index 100% rename from reactos/ntoskrnl/ke/i386/trap.s rename to ntoskrnl/ke/i386/trap.s diff --git a/reactos/ntoskrnl/ke/i386/traphdlr.c b/ntoskrnl/ke/i386/traphdlr.c similarity index 100% rename from reactos/ntoskrnl/ke/i386/traphdlr.c rename to ntoskrnl/ke/i386/traphdlr.c diff --git a/reactos/ntoskrnl/ke/i386/usercall.c b/ntoskrnl/ke/i386/usercall.c similarity index 100% rename from reactos/ntoskrnl/ke/i386/usercall.c rename to ntoskrnl/ke/i386/usercall.c diff --git a/reactos/ntoskrnl/ke/i386/usercall_asm.S b/ntoskrnl/ke/i386/usercall_asm.S similarity index 100% rename from reactos/ntoskrnl/ke/i386/usercall_asm.S rename to ntoskrnl/ke/i386/usercall_asm.S diff --git a/reactos/ntoskrnl/ke/i386/v86vdm.c b/ntoskrnl/ke/i386/v86vdm.c similarity index 100% rename from reactos/ntoskrnl/ke/i386/v86vdm.c rename to ntoskrnl/ke/i386/v86vdm.c diff --git a/reactos/ntoskrnl/ke/ipi.c b/ntoskrnl/ke/ipi.c similarity index 100% rename from reactos/ntoskrnl/ke/ipi.c rename to ntoskrnl/ke/ipi.c diff --git a/reactos/ntoskrnl/ke/krnlinit.c b/ntoskrnl/ke/krnlinit.c similarity index 100% rename from reactos/ntoskrnl/ke/krnlinit.c rename to ntoskrnl/ke/krnlinit.c diff --git a/reactos/ntoskrnl/ke/mutex.c b/ntoskrnl/ke/mutex.c similarity index 100% rename from reactos/ntoskrnl/ke/mutex.c rename to ntoskrnl/ke/mutex.c diff --git a/reactos/ntoskrnl/ke/powerpc/cpu.c b/ntoskrnl/ke/powerpc/cpu.c similarity index 100% rename from reactos/ntoskrnl/ke/powerpc/cpu.c rename to ntoskrnl/ke/powerpc/cpu.c diff --git a/reactos/ntoskrnl/ke/powerpc/ctxhelp.S b/ntoskrnl/ke/powerpc/ctxhelp.S similarity index 100% rename from reactos/ntoskrnl/ke/powerpc/ctxhelp.S rename to ntoskrnl/ke/powerpc/ctxhelp.S diff --git a/reactos/ntoskrnl/ke/powerpc/ctxswitch.c b/ntoskrnl/ke/powerpc/ctxswitch.c similarity index 100% rename from reactos/ntoskrnl/ke/powerpc/ctxswitch.c rename to ntoskrnl/ke/powerpc/ctxswitch.c diff --git a/reactos/ntoskrnl/ke/powerpc/exp.c b/ntoskrnl/ke/powerpc/exp.c similarity index 100% rename from reactos/ntoskrnl/ke/powerpc/exp.c rename to ntoskrnl/ke/powerpc/exp.c diff --git a/reactos/ntoskrnl/ke/powerpc/kiinit.c b/ntoskrnl/ke/powerpc/kiinit.c similarity index 100% rename from reactos/ntoskrnl/ke/powerpc/kiinit.c rename to ntoskrnl/ke/powerpc/kiinit.c diff --git a/reactos/ntoskrnl/ke/powerpc/main_asm.S b/ntoskrnl/ke/powerpc/main_asm.S similarity index 100% rename from reactos/ntoskrnl/ke/powerpc/main_asm.S rename to ntoskrnl/ke/powerpc/main_asm.S diff --git a/reactos/ntoskrnl/ke/powerpc/ppc_irq.c b/ntoskrnl/ke/powerpc/ppc_irq.c similarity index 100% rename from reactos/ntoskrnl/ke/powerpc/ppc_irq.c rename to ntoskrnl/ke/powerpc/ppc_irq.c diff --git a/reactos/ntoskrnl/ke/powerpc/stubs.c b/ntoskrnl/ke/powerpc/stubs.c similarity index 100% rename from reactos/ntoskrnl/ke/powerpc/stubs.c rename to ntoskrnl/ke/powerpc/stubs.c diff --git a/reactos/ntoskrnl/ke/powerpc/systimer.c b/ntoskrnl/ke/powerpc/systimer.c similarity index 100% rename from reactos/ntoskrnl/ke/powerpc/systimer.c rename to ntoskrnl/ke/powerpc/systimer.c diff --git a/reactos/ntoskrnl/ke/powerpc/thrdini.c b/ntoskrnl/ke/powerpc/thrdini.c similarity index 100% rename from reactos/ntoskrnl/ke/powerpc/thrdini.c rename to ntoskrnl/ke/powerpc/thrdini.c diff --git a/reactos/ntoskrnl/ke/procobj.c b/ntoskrnl/ke/procobj.c similarity index 100% rename from reactos/ntoskrnl/ke/procobj.c rename to ntoskrnl/ke/procobj.c diff --git a/reactos/ntoskrnl/ke/profobj.c b/ntoskrnl/ke/profobj.c similarity index 100% rename from reactos/ntoskrnl/ke/profobj.c rename to ntoskrnl/ke/profobj.c diff --git a/reactos/ntoskrnl/ke/queue.c b/ntoskrnl/ke/queue.c similarity index 100% rename from reactos/ntoskrnl/ke/queue.c rename to ntoskrnl/ke/queue.c diff --git a/reactos/ntoskrnl/ke/semphobj.c b/ntoskrnl/ke/semphobj.c similarity index 100% rename from reactos/ntoskrnl/ke/semphobj.c rename to ntoskrnl/ke/semphobj.c diff --git a/reactos/ntoskrnl/ke/spinlock.c b/ntoskrnl/ke/spinlock.c similarity index 100% rename from reactos/ntoskrnl/ke/spinlock.c rename to ntoskrnl/ke/spinlock.c diff --git a/reactos/ntoskrnl/ke/thrdobj.c b/ntoskrnl/ke/thrdobj.c similarity index 100% rename from reactos/ntoskrnl/ke/thrdobj.c rename to ntoskrnl/ke/thrdobj.c diff --git a/reactos/ntoskrnl/ke/thrdschd.c b/ntoskrnl/ke/thrdschd.c similarity index 100% rename from reactos/ntoskrnl/ke/thrdschd.c rename to ntoskrnl/ke/thrdschd.c diff --git a/reactos/ntoskrnl/ke/time.c b/ntoskrnl/ke/time.c similarity index 100% rename from reactos/ntoskrnl/ke/time.c rename to ntoskrnl/ke/time.c diff --git a/reactos/ntoskrnl/ke/timerobj.c b/ntoskrnl/ke/timerobj.c similarity index 100% rename from reactos/ntoskrnl/ke/timerobj.c rename to ntoskrnl/ke/timerobj.c diff --git a/reactos/ntoskrnl/ke/wait.c b/ntoskrnl/ke/wait.c similarity index 100% rename from reactos/ntoskrnl/ke/wait.c rename to ntoskrnl/ke/wait.c diff --git a/reactos/ntoskrnl/lpc/close.c b/ntoskrnl/lpc/close.c similarity index 100% rename from reactos/ntoskrnl/lpc/close.c rename to ntoskrnl/lpc/close.c diff --git a/reactos/ntoskrnl/lpc/complete.c b/ntoskrnl/lpc/complete.c similarity index 100% rename from reactos/ntoskrnl/lpc/complete.c rename to ntoskrnl/lpc/complete.c diff --git a/reactos/ntoskrnl/lpc/connect.c b/ntoskrnl/lpc/connect.c similarity index 100% rename from reactos/ntoskrnl/lpc/connect.c rename to ntoskrnl/lpc/connect.c diff --git a/reactos/ntoskrnl/lpc/create.c b/ntoskrnl/lpc/create.c similarity index 100% rename from reactos/ntoskrnl/lpc/create.c rename to ntoskrnl/lpc/create.c diff --git a/reactos/ntoskrnl/lpc/listen.c b/ntoskrnl/lpc/listen.c similarity index 100% rename from reactos/ntoskrnl/lpc/listen.c rename to ntoskrnl/lpc/listen.c diff --git a/reactos/ntoskrnl/lpc/port.c b/ntoskrnl/lpc/port.c similarity index 100% rename from reactos/ntoskrnl/lpc/port.c rename to ntoskrnl/lpc/port.c diff --git a/reactos/ntoskrnl/lpc/reply.c b/ntoskrnl/lpc/reply.c similarity index 100% rename from reactos/ntoskrnl/lpc/reply.c rename to ntoskrnl/lpc/reply.c diff --git a/reactos/ntoskrnl/lpc/send.c b/ntoskrnl/lpc/send.c similarity index 100% rename from reactos/ntoskrnl/lpc/send.c rename to ntoskrnl/lpc/send.c diff --git a/reactos/ntoskrnl/mm/ARM3/arm/init.c b/ntoskrnl/mm/ARM3/arm/init.c similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/arm/init.c rename to ntoskrnl/mm/ARM3/arm/init.c diff --git a/reactos/ntoskrnl/mm/ARM3/contmem.c b/ntoskrnl/mm/ARM3/contmem.c similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/contmem.c rename to ntoskrnl/mm/ARM3/contmem.c diff --git a/reactos/ntoskrnl/mm/ARM3/drvmgmt.c b/ntoskrnl/mm/ARM3/drvmgmt.c similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/drvmgmt.c rename to ntoskrnl/mm/ARM3/drvmgmt.c diff --git a/reactos/ntoskrnl/mm/ARM3/dynamic.c b/ntoskrnl/mm/ARM3/dynamic.c similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/dynamic.c rename to ntoskrnl/mm/ARM3/dynamic.c diff --git a/reactos/ntoskrnl/mm/ARM3/expool.c b/ntoskrnl/mm/ARM3/expool.c similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/expool.c rename to ntoskrnl/mm/ARM3/expool.c diff --git a/reactos/ntoskrnl/mm/ARM3/hypermap.c b/ntoskrnl/mm/ARM3/hypermap.c similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/hypermap.c rename to ntoskrnl/mm/ARM3/hypermap.c diff --git a/reactos/ntoskrnl/mm/ARM3/i386/init.c b/ntoskrnl/mm/ARM3/i386/init.c similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/i386/init.c rename to ntoskrnl/mm/ARM3/i386/init.c diff --git a/reactos/ntoskrnl/mm/ARM3/iosup.c b/ntoskrnl/mm/ARM3/iosup.c similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/iosup.c rename to ntoskrnl/mm/ARM3/iosup.c diff --git a/reactos/ntoskrnl/mm/ARM3/largepag.c b/ntoskrnl/mm/ARM3/largepag.c similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/largepag.c rename to ntoskrnl/mm/ARM3/largepag.c diff --git a/reactos/ntoskrnl/mm/ARM3/mdlsup.c b/ntoskrnl/mm/ARM3/mdlsup.c similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/mdlsup.c rename to ntoskrnl/mm/ARM3/mdlsup.c diff --git a/reactos/ntoskrnl/mm/ARM3/miarm.h b/ntoskrnl/mm/ARM3/miarm.h similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/miarm.h rename to ntoskrnl/mm/ARM3/miarm.h diff --git a/reactos/ntoskrnl/mm/ARM3/miavl.h b/ntoskrnl/mm/ARM3/miavl.h similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/miavl.h rename to ntoskrnl/mm/ARM3/miavl.h diff --git a/reactos/ntoskrnl/mm/ARM3/mmdbg.c b/ntoskrnl/mm/ARM3/mmdbg.c similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/mmdbg.c rename to ntoskrnl/mm/ARM3/mmdbg.c diff --git a/reactos/ntoskrnl/mm/ARM3/mminit.c b/ntoskrnl/mm/ARM3/mminit.c similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/mminit.c rename to ntoskrnl/mm/ARM3/mminit.c diff --git a/reactos/ntoskrnl/mm/ARM3/mmsup.c b/ntoskrnl/mm/ARM3/mmsup.c similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/mmsup.c rename to ntoskrnl/mm/ARM3/mmsup.c diff --git a/reactos/ntoskrnl/mm/ARM3/ncache.c b/ntoskrnl/mm/ARM3/ncache.c similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/ncache.c rename to ntoskrnl/mm/ARM3/ncache.c diff --git a/reactos/ntoskrnl/mm/ARM3/pagfault.c b/ntoskrnl/mm/ARM3/pagfault.c similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/pagfault.c rename to ntoskrnl/mm/ARM3/pagfault.c diff --git a/reactos/ntoskrnl/mm/ARM3/pfnlist.c b/ntoskrnl/mm/ARM3/pfnlist.c similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/pfnlist.c rename to ntoskrnl/mm/ARM3/pfnlist.c diff --git a/reactos/ntoskrnl/mm/ARM3/pool.c b/ntoskrnl/mm/ARM3/pool.c similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/pool.c rename to ntoskrnl/mm/ARM3/pool.c diff --git a/reactos/ntoskrnl/mm/ARM3/procsup.c b/ntoskrnl/mm/ARM3/procsup.c similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/procsup.c rename to ntoskrnl/mm/ARM3/procsup.c diff --git a/reactos/ntoskrnl/mm/ARM3/section.c b/ntoskrnl/mm/ARM3/section.c similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/section.c rename to ntoskrnl/mm/ARM3/section.c diff --git a/reactos/ntoskrnl/mm/ARM3/special.c b/ntoskrnl/mm/ARM3/special.c similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/special.c rename to ntoskrnl/mm/ARM3/special.c diff --git a/reactos/ntoskrnl/mm/ARM3/sysldr.c b/ntoskrnl/mm/ARM3/sysldr.c similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/sysldr.c rename to ntoskrnl/mm/ARM3/sysldr.c diff --git a/reactos/ntoskrnl/mm/ARM3/syspte.c b/ntoskrnl/mm/ARM3/syspte.c similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/syspte.c rename to ntoskrnl/mm/ARM3/syspte.c diff --git a/reactos/ntoskrnl/mm/ARM3/vadnode.c b/ntoskrnl/mm/ARM3/vadnode.c similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/vadnode.c rename to ntoskrnl/mm/ARM3/vadnode.c diff --git a/reactos/ntoskrnl/mm/ARM3/virtual.c b/ntoskrnl/mm/ARM3/virtual.c similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/virtual.c rename to ntoskrnl/mm/ARM3/virtual.c diff --git a/reactos/ntoskrnl/mm/ARM3/zeropage.c b/ntoskrnl/mm/ARM3/zeropage.c similarity index 100% rename from reactos/ntoskrnl/mm/ARM3/zeropage.c rename to ntoskrnl/mm/ARM3/zeropage.c diff --git a/reactos/ntoskrnl/mm/amd64/init.c b/ntoskrnl/mm/amd64/init.c similarity index 100% rename from reactos/ntoskrnl/mm/amd64/init.c rename to ntoskrnl/mm/amd64/init.c diff --git a/reactos/ntoskrnl/mm/amd64/page.c b/ntoskrnl/mm/amd64/page.c similarity index 100% rename from reactos/ntoskrnl/mm/amd64/page.c rename to ntoskrnl/mm/amd64/page.c diff --git a/reactos/ntoskrnl/mm/anonmem.c b/ntoskrnl/mm/anonmem.c similarity index 100% rename from reactos/ntoskrnl/mm/anonmem.c rename to ntoskrnl/mm/anonmem.c diff --git a/reactos/ntoskrnl/mm/arm/page.c b/ntoskrnl/mm/arm/page.c similarity index 100% rename from reactos/ntoskrnl/mm/arm/page.c rename to ntoskrnl/mm/arm/page.c diff --git a/reactos/ntoskrnl/mm/arm/stubs.c b/ntoskrnl/mm/arm/stubs.c similarity index 100% rename from reactos/ntoskrnl/mm/arm/stubs.c rename to ntoskrnl/mm/arm/stubs.c diff --git a/reactos/ntoskrnl/mm/balance.c b/ntoskrnl/mm/balance.c similarity index 100% rename from reactos/ntoskrnl/mm/balance.c rename to ntoskrnl/mm/balance.c diff --git a/reactos/ntoskrnl/mm/freelist.c b/ntoskrnl/mm/freelist.c similarity index 100% rename from reactos/ntoskrnl/mm/freelist.c rename to ntoskrnl/mm/freelist.c diff --git a/reactos/ntoskrnl/mm/i386/page.c b/ntoskrnl/mm/i386/page.c similarity index 100% rename from reactos/ntoskrnl/mm/i386/page.c rename to ntoskrnl/mm/i386/page.c diff --git a/reactos/ntoskrnl/mm/i386/pagepae.c b/ntoskrnl/mm/i386/pagepae.c similarity index 100% rename from reactos/ntoskrnl/mm/i386/pagepae.c rename to ntoskrnl/mm/i386/pagepae.c diff --git a/reactos/ntoskrnl/mm/marea.c b/ntoskrnl/mm/marea.c similarity index 100% rename from reactos/ntoskrnl/mm/marea.c rename to ntoskrnl/mm/marea.c diff --git a/reactos/ntoskrnl/mm/mmfault.c b/ntoskrnl/mm/mmfault.c similarity index 100% rename from reactos/ntoskrnl/mm/mmfault.c rename to ntoskrnl/mm/mmfault.c diff --git a/reactos/ntoskrnl/mm/mminit.c b/ntoskrnl/mm/mminit.c similarity index 100% rename from reactos/ntoskrnl/mm/mminit.c rename to ntoskrnl/mm/mminit.c diff --git a/reactos/ntoskrnl/mm/pagefile.c b/ntoskrnl/mm/pagefile.c similarity index 100% rename from reactos/ntoskrnl/mm/pagefile.c rename to ntoskrnl/mm/pagefile.c diff --git a/reactos/ntoskrnl/mm/pageop.c b/ntoskrnl/mm/pageop.c similarity index 100% rename from reactos/ntoskrnl/mm/pageop.c rename to ntoskrnl/mm/pageop.c diff --git a/reactos/ntoskrnl/mm/powerpc/page.c b/ntoskrnl/mm/powerpc/page.c similarity index 100% rename from reactos/ntoskrnl/mm/powerpc/page.c rename to ntoskrnl/mm/powerpc/page.c diff --git a/reactos/ntoskrnl/mm/powerpc/pfault.c b/ntoskrnl/mm/powerpc/pfault.c similarity index 100% rename from reactos/ntoskrnl/mm/powerpc/pfault.c rename to ntoskrnl/mm/powerpc/pfault.c diff --git a/reactos/ntoskrnl/mm/region.c b/ntoskrnl/mm/region.c similarity index 100% rename from reactos/ntoskrnl/mm/region.c rename to ntoskrnl/mm/region.c diff --git a/reactos/ntoskrnl/mm/rmap.c b/ntoskrnl/mm/rmap.c similarity index 100% rename from reactos/ntoskrnl/mm/rmap.c rename to ntoskrnl/mm/rmap.c diff --git a/reactos/ntoskrnl/mm/section.c b/ntoskrnl/mm/section.c similarity index 100% rename from reactos/ntoskrnl/mm/section.c rename to ntoskrnl/mm/section.c diff --git a/reactos/ntoskrnl/ntdll.S b/ntoskrnl/ntdll.S similarity index 100% rename from reactos/ntoskrnl/ntdll.S rename to ntoskrnl/ntdll.S diff --git a/reactos/ntoskrnl/ntkrnlmp.rbuild b/ntoskrnl/ntkrnlmp.rbuild similarity index 100% rename from reactos/ntoskrnl/ntkrnlmp.rbuild rename to ntoskrnl/ntkrnlmp.rbuild diff --git a/reactos/ntoskrnl/ntoskrnl-generic.rbuild b/ntoskrnl/ntoskrnl-generic.rbuild similarity index 100% rename from reactos/ntoskrnl/ntoskrnl-generic.rbuild rename to ntoskrnl/ntoskrnl-generic.rbuild diff --git a/reactos/ntoskrnl/ntoskrnl.pspec b/ntoskrnl/ntoskrnl.pspec similarity index 100% rename from reactos/ntoskrnl/ntoskrnl.pspec rename to ntoskrnl/ntoskrnl.pspec diff --git a/reactos/ntoskrnl/ntoskrnl.rbuild b/ntoskrnl/ntoskrnl.rbuild similarity index 100% rename from reactos/ntoskrnl/ntoskrnl.rbuild rename to ntoskrnl/ntoskrnl.rbuild diff --git a/reactos/ntoskrnl/ntoskrnl.rc b/ntoskrnl/ntoskrnl.rc similarity index 100% rename from reactos/ntoskrnl/ntoskrnl.rc rename to ntoskrnl/ntoskrnl.rc diff --git a/reactos/ntoskrnl/ntoskrnl.spec b/ntoskrnl/ntoskrnl.spec similarity index 100% rename from reactos/ntoskrnl/ntoskrnl.spec rename to ntoskrnl/ntoskrnl.spec diff --git a/reactos/ntoskrnl/ntoskrnl_amd64.lnk b/ntoskrnl/ntoskrnl_amd64.lnk similarity index 100% rename from reactos/ntoskrnl/ntoskrnl_amd64.lnk rename to ntoskrnl/ntoskrnl_amd64.lnk diff --git a/reactos/ntoskrnl/ntoskrnl_arm.lnk b/ntoskrnl/ntoskrnl_arm.lnk similarity index 100% rename from reactos/ntoskrnl/ntoskrnl_arm.lnk rename to ntoskrnl/ntoskrnl_arm.lnk diff --git a/reactos/ntoskrnl/ntoskrnl_i386.lnk b/ntoskrnl/ntoskrnl_i386.lnk similarity index 100% rename from reactos/ntoskrnl/ntoskrnl_i386.lnk rename to ntoskrnl/ntoskrnl_i386.lnk diff --git a/reactos/ntoskrnl/ntoskrnl_powerpc.lnk b/ntoskrnl/ntoskrnl_powerpc.lnk similarity index 100% rename from reactos/ntoskrnl/ntoskrnl_powerpc.lnk rename to ntoskrnl/ntoskrnl_powerpc.lnk diff --git a/reactos/ntoskrnl/ob/obdir.c b/ntoskrnl/ob/obdir.c similarity index 100% rename from reactos/ntoskrnl/ob/obdir.c rename to ntoskrnl/ob/obdir.c diff --git a/reactos/ntoskrnl/ob/obhandle.c b/ntoskrnl/ob/obhandle.c similarity index 100% rename from reactos/ntoskrnl/ob/obhandle.c rename to ntoskrnl/ob/obhandle.c diff --git a/reactos/ntoskrnl/ob/obinit.c b/ntoskrnl/ob/obinit.c similarity index 100% rename from reactos/ntoskrnl/ob/obinit.c rename to ntoskrnl/ob/obinit.c diff --git a/reactos/ntoskrnl/ob/oblife.c b/ntoskrnl/ob/oblife.c similarity index 100% rename from reactos/ntoskrnl/ob/oblife.c rename to ntoskrnl/ob/oblife.c diff --git a/reactos/ntoskrnl/ob/oblink.c b/ntoskrnl/ob/oblink.c similarity index 100% rename from reactos/ntoskrnl/ob/oblink.c rename to ntoskrnl/ob/oblink.c diff --git a/reactos/ntoskrnl/ob/obname.c b/ntoskrnl/ob/obname.c similarity index 100% rename from reactos/ntoskrnl/ob/obname.c rename to ntoskrnl/ob/obname.c diff --git a/reactos/ntoskrnl/ob/obref.c b/ntoskrnl/ob/obref.c similarity index 100% rename from reactos/ntoskrnl/ob/obref.c rename to ntoskrnl/ob/obref.c diff --git a/reactos/ntoskrnl/ob/obsdcach.c b/ntoskrnl/ob/obsdcach.c similarity index 100% rename from reactos/ntoskrnl/ob/obsdcach.c rename to ntoskrnl/ob/obsdcach.c diff --git a/reactos/ntoskrnl/ob/obsecure.c b/ntoskrnl/ob/obsecure.c similarity index 100% rename from reactos/ntoskrnl/ob/obsecure.c rename to ntoskrnl/ob/obsecure.c diff --git a/reactos/ntoskrnl/ob/obwait.c b/ntoskrnl/ob/obwait.c similarity index 100% rename from reactos/ntoskrnl/ob/obwait.c rename to ntoskrnl/ob/obwait.c diff --git a/reactos/ntoskrnl/po/events.c b/ntoskrnl/po/events.c similarity index 100% rename from reactos/ntoskrnl/po/events.c rename to ntoskrnl/po/events.c diff --git a/reactos/ntoskrnl/po/guid.c b/ntoskrnl/po/guid.c similarity index 100% rename from reactos/ntoskrnl/po/guid.c rename to ntoskrnl/po/guid.c diff --git a/reactos/ntoskrnl/po/poshtdwn.c b/ntoskrnl/po/poshtdwn.c similarity index 100% rename from reactos/ntoskrnl/po/poshtdwn.c rename to ntoskrnl/po/poshtdwn.c diff --git a/reactos/ntoskrnl/po/povolume.c b/ntoskrnl/po/povolume.c similarity index 100% rename from reactos/ntoskrnl/po/povolume.c rename to ntoskrnl/po/povolume.c diff --git a/reactos/ntoskrnl/po/power.c b/ntoskrnl/po/power.c similarity index 100% rename from reactos/ntoskrnl/po/power.c rename to ntoskrnl/po/power.c diff --git a/reactos/ntoskrnl/ps/amd64/psctx.c b/ntoskrnl/ps/amd64/psctx.c similarity index 100% rename from reactos/ntoskrnl/ps/amd64/psctx.c rename to ntoskrnl/ps/amd64/psctx.c diff --git a/reactos/ntoskrnl/ps/arm/psctx.c b/ntoskrnl/ps/arm/psctx.c similarity index 100% rename from reactos/ntoskrnl/ps/arm/psctx.c rename to ntoskrnl/ps/arm/psctx.c diff --git a/reactos/ntoskrnl/ps/debug.c b/ntoskrnl/ps/debug.c similarity index 100% rename from reactos/ntoskrnl/ps/debug.c rename to ntoskrnl/ps/debug.c diff --git a/reactos/ntoskrnl/ps/i386/psctx.c b/ntoskrnl/ps/i386/psctx.c similarity index 100% rename from reactos/ntoskrnl/ps/i386/psctx.c rename to ntoskrnl/ps/i386/psctx.c diff --git a/reactos/ntoskrnl/ps/i386/psldt.c b/ntoskrnl/ps/i386/psldt.c similarity index 100% rename from reactos/ntoskrnl/ps/i386/psldt.c rename to ntoskrnl/ps/i386/psldt.c diff --git a/reactos/ntoskrnl/ps/job.c b/ntoskrnl/ps/job.c similarity index 100% rename from reactos/ntoskrnl/ps/job.c rename to ntoskrnl/ps/job.c diff --git a/reactos/ntoskrnl/ps/kill.c b/ntoskrnl/ps/kill.c similarity index 100% rename from reactos/ntoskrnl/ps/kill.c rename to ntoskrnl/ps/kill.c diff --git a/reactos/ntoskrnl/ps/process.c b/ntoskrnl/ps/process.c similarity index 100% rename from reactos/ntoskrnl/ps/process.c rename to ntoskrnl/ps/process.c diff --git a/reactos/ntoskrnl/ps/psmgr.c b/ntoskrnl/ps/psmgr.c similarity index 100% rename from reactos/ntoskrnl/ps/psmgr.c rename to ntoskrnl/ps/psmgr.c diff --git a/reactos/ntoskrnl/ps/psnotify.c b/ntoskrnl/ps/psnotify.c similarity index 100% rename from reactos/ntoskrnl/ps/psnotify.c rename to ntoskrnl/ps/psnotify.c diff --git a/reactos/ntoskrnl/ps/query.c b/ntoskrnl/ps/query.c similarity index 100% rename from reactos/ntoskrnl/ps/query.c rename to ntoskrnl/ps/query.c diff --git a/reactos/ntoskrnl/ps/quota.c b/ntoskrnl/ps/quota.c similarity index 100% rename from reactos/ntoskrnl/ps/quota.c rename to ntoskrnl/ps/quota.c diff --git a/reactos/ntoskrnl/ps/security.c b/ntoskrnl/ps/security.c similarity index 100% rename from reactos/ntoskrnl/ps/security.c rename to ntoskrnl/ps/security.c diff --git a/reactos/ntoskrnl/ps/state.c b/ntoskrnl/ps/state.c similarity index 100% rename from reactos/ntoskrnl/ps/state.c rename to ntoskrnl/ps/state.c diff --git a/reactos/ntoskrnl/ps/thread.c b/ntoskrnl/ps/thread.c similarity index 100% rename from reactos/ntoskrnl/ps/thread.c rename to ntoskrnl/ps/thread.c diff --git a/reactos/ntoskrnl/ps/win32.c b/ntoskrnl/ps/win32.c similarity index 100% rename from reactos/ntoskrnl/ps/win32.c rename to ntoskrnl/ps/win32.c diff --git a/reactos/ntoskrnl/rtl/arm/rtlexcpt.c b/ntoskrnl/rtl/arm/rtlexcpt.c similarity index 100% rename from reactos/ntoskrnl/rtl/arm/rtlexcpt.c rename to ntoskrnl/rtl/arm/rtlexcpt.c diff --git a/reactos/ntoskrnl/rtl/i386/stack.S b/ntoskrnl/rtl/i386/stack.S similarity index 100% rename from reactos/ntoskrnl/rtl/i386/stack.S rename to ntoskrnl/rtl/i386/stack.S diff --git a/reactos/ntoskrnl/rtl/libsupp.c b/ntoskrnl/rtl/libsupp.c similarity index 100% rename from reactos/ntoskrnl/rtl/libsupp.c rename to ntoskrnl/rtl/libsupp.c diff --git a/reactos/ntoskrnl/rtl/misc.c b/ntoskrnl/rtl/misc.c similarity index 100% rename from reactos/ntoskrnl/rtl/misc.c rename to ntoskrnl/rtl/misc.c diff --git a/reactos/ntoskrnl/se/access.c b/ntoskrnl/se/access.c similarity index 100% rename from reactos/ntoskrnl/se/access.c rename to ntoskrnl/se/access.c diff --git a/reactos/ntoskrnl/se/acl.c b/ntoskrnl/se/acl.c similarity index 100% rename from reactos/ntoskrnl/se/acl.c rename to ntoskrnl/se/acl.c diff --git a/reactos/ntoskrnl/se/audit.c b/ntoskrnl/se/audit.c similarity index 100% rename from reactos/ntoskrnl/se/audit.c rename to ntoskrnl/se/audit.c diff --git a/reactos/ntoskrnl/se/lsa.c b/ntoskrnl/se/lsa.c similarity index 100% rename from reactos/ntoskrnl/se/lsa.c rename to ntoskrnl/se/lsa.c diff --git a/reactos/ntoskrnl/se/priv.c b/ntoskrnl/se/priv.c similarity index 100% rename from reactos/ntoskrnl/se/priv.c rename to ntoskrnl/se/priv.c diff --git a/reactos/ntoskrnl/se/sd.c b/ntoskrnl/se/sd.c similarity index 100% rename from reactos/ntoskrnl/se/sd.c rename to ntoskrnl/se/sd.c diff --git a/reactos/ntoskrnl/se/semgr.c b/ntoskrnl/se/semgr.c similarity index 100% rename from reactos/ntoskrnl/se/semgr.c rename to ntoskrnl/se/semgr.c diff --git a/reactos/ntoskrnl/se/sid.c b/ntoskrnl/se/sid.c similarity index 100% rename from reactos/ntoskrnl/se/sid.c rename to ntoskrnl/se/sid.c diff --git a/reactos/ntoskrnl/se/token.c b/ntoskrnl/se/token.c similarity index 100% rename from reactos/ntoskrnl/se/token.c rename to ntoskrnl/se/token.c diff --git a/reactos/ntoskrnl/sysfuncs.lst b/ntoskrnl/sysfuncs.lst similarity index 100% rename from reactos/ntoskrnl/sysfuncs.lst rename to ntoskrnl/sysfuncs.lst diff --git a/reactos/ntoskrnl/tests/TestDebug.c b/ntoskrnl/tests/TestDebug.c similarity index 100% rename from reactos/ntoskrnl/tests/TestDebug.c rename to ntoskrnl/tests/TestDebug.c diff --git a/reactos/ntoskrnl/tests/TestTimer.c b/ntoskrnl/tests/TestTimer.c similarity index 100% rename from reactos/ntoskrnl/tests/TestTimer.c rename to ntoskrnl/tests/TestTimer.c diff --git a/reactos/ntoskrnl/tests/fsrtl.c b/ntoskrnl/tests/fsrtl.c similarity index 100% rename from reactos/ntoskrnl/tests/fsrtl.c rename to ntoskrnl/tests/fsrtl.c diff --git a/reactos/ntoskrnl/tests/setup.c b/ntoskrnl/tests/setup.c similarity index 100% rename from reactos/ntoskrnl/tests/setup.c rename to ntoskrnl/tests/setup.c diff --git a/reactos/ntoskrnl/tests/stubs.tst b/ntoskrnl/tests/stubs.tst similarity index 100% rename from reactos/ntoskrnl/tests/stubs.tst rename to ntoskrnl/tests/stubs.tst diff --git a/reactos/ntoskrnl/tests/symtest.c b/ntoskrnl/tests/symtest.c similarity index 100% rename from reactos/ntoskrnl/tests/symtest.c rename to ntoskrnl/tests/symtest.c diff --git a/reactos/ntoskrnl/tests/tests/VirtualMemory.c b/ntoskrnl/tests/tests/VirtualMemory.c similarity index 100% rename from reactos/ntoskrnl/tests/tests/VirtualMemory.c rename to ntoskrnl/tests/tests/VirtualMemory.c diff --git a/reactos/ntoskrnl/vdm/vdmexec.c b/ntoskrnl/vdm/vdmexec.c similarity index 100% rename from reactos/ntoskrnl/vdm/vdmexec.c rename to ntoskrnl/vdm/vdmexec.c diff --git a/reactos/ntoskrnl/vdm/vdmmain.c b/ntoskrnl/vdm/vdmmain.c similarity index 100% rename from reactos/ntoskrnl/vdm/vdmmain.c rename to ntoskrnl/vdm/vdmmain.c diff --git a/reactos/ntoskrnl/vf/driver.c b/ntoskrnl/vf/driver.c similarity index 100% rename from reactos/ntoskrnl/vf/driver.c rename to ntoskrnl/vf/driver.c diff --git a/reactos/ntoskrnl/wmi/wmi.c b/ntoskrnl/wmi/wmi.c similarity index 100% rename from reactos/ntoskrnl/wmi/wmi.c rename to ntoskrnl/wmi/wmi.c diff --git a/reactos/proxy.mak b/proxy.mak similarity index 100% rename from reactos/proxy.mak rename to proxy.mak diff --git a/reactos/base/applications/cacls/lang/.gitignore b/reactos/base/applications/cacls/lang/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/base/applications/calc/lang/.gitignore b/reactos/base/applications/calc/lang/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/base/applications/cmdutils/.gitignore b/reactos/base/applications/cmdutils/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/base/setup/.gitignore b/reactos/base/setup/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/base/shell/.gitignore b/reactos/base/shell/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/base/system/.gitignore b/reactos/base/system/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/dll/3rdparty/.gitignore b/reactos/dll/3rdparty/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/dll/win32/.gitignore b/reactos/dll/win32/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/dll/win32/browseui/.gitignore b/reactos/dll/win32/browseui/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/dll/win32/netshell/lang/.gitignore b/reactos/dll/win32/netshell/lang/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/dll/win32/odbccp32/.gitignore b/reactos/dll/win32/odbccp32/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/dll/win32/powrprof/.gitignore b/reactos/dll/win32/powrprof/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/dll/win32/shell32/authors.c b/reactos/dll/win32/shell32/authors.c deleted file mode 100644 index 3101d764863..00000000000 --- a/reactos/dll/win32/shell32/authors.c +++ /dev/null @@ -1,3 +0,0 @@ -#include - -const char * const SHELL_Authors[] = { "Copyright 1993-" COPYRIGHT_YEAR " WINE team", "Copyright 1998-" COPYRIGHT_YEAR " ReactOS Team", 0 }; diff --git a/reactos/dll/win32/shell32/autocomplete.c b/reactos/dll/win32/shell32/autocomplete.c deleted file mode 100644 index b05fd67641b..00000000000 --- a/reactos/dll/win32/shell32/autocomplete.c +++ /dev/null @@ -1,629 +0,0 @@ -/* - * AutoComplete interfaces implementation. - * - * Copyright 2004 Maxime Bellengé - * - * 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 - - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -typedef struct -{ - const IAutoCompleteVtbl *lpVtbl; - const IAutoComplete2Vtbl *lpvtblAutoComplete2; - LONG ref; - BOOL enabled; - HWND hwndEdit; - HWND hwndListBox; - WNDPROC wpOrigEditProc; - WNDPROC wpOrigLBoxProc; - WCHAR *txtbackup; - WCHAR *quickComplete; - IEnumString *enumstr; - AUTOCOMPLETEOPTIONS options; -} IAutoCompleteImpl; - -static const IAutoCompleteVtbl acvt; -static const IAutoComplete2Vtbl ac2vt; - -static IAutoCompleteImpl * impl_from_IAutoComplete2( IAutoComplete2 *iface ) -{ - return (IAutoCompleteImpl *)((char*)iface - FIELD_OFFSET(IAutoCompleteImpl, lpvtblAutoComplete2)); -} - - -/* - converts This to an interface pointer -*/ -#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) -#define _IAutoComplete2_(This) (IAutoComplete2*)&(This->lpvtblAutoComplete2) - -static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); -static LRESULT APIENTRY ACLBoxSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); - -/************************************************************************** - * IAutoComplete_Constructor - */ -HRESULT WINAPI IAutoComplete_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) -{ - IAutoCompleteImpl *lpac; - - if (pUnkOuter && !IsEqualIID (riid, &IID_IUnknown)) - return CLASS_E_NOAGGREGATION; - - lpac = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IAutoCompleteImpl)); - if (!lpac) - return E_OUTOFMEMORY; - - lpac->ref = 1; - lpac->lpVtbl = &acvt; - lpac->lpvtblAutoComplete2 = &ac2vt; - lpac->enabled = TRUE; - lpac->enumstr = NULL; - lpac->options = ACO_AUTOAPPEND; - lpac->wpOrigEditProc = NULL; - lpac->hwndListBox = NULL; - lpac->txtbackup = NULL; - lpac->quickComplete = NULL; - - if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (lpac), riid, ppv))) { - IUnknown_Release (_IUnknown_ (lpac)); - return E_NOINTERFACE; - } - - TRACE("-- (%p)->\n",lpac); - - return S_OK; -} - -/************************************************************************** - * AutoComplete_QueryInterface - */ -static HRESULT WINAPI IAutoComplete_fnQueryInterface( - IAutoComplete * iface, - REFIID riid, - LPVOID *ppvObj) -{ - IAutoCompleteImpl *This = (IAutoCompleteImpl *)iface; - - TRACE("(%p)->(\n\tIID:\t%s,%p)\n", This, shdebugstr_guid(riid), ppvObj); - *ppvObj = NULL; - - if(IsEqualIID(riid, &IID_IUnknown)) - { - *ppvObj = This; - } - else if(IsEqualIID(riid, &IID_IAutoComplete)) - { - *ppvObj = (IAutoComplete*)This; - } - else if(IsEqualIID(riid, &IID_IAutoComplete2)) - { - *ppvObj = _IAutoComplete2_ (This); - } - - if (*ppvObj) - { - IAutoComplete_AddRef((IAutoComplete*)*ppvObj); - TRACE("-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj); - return S_OK; - } - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -/****************************************************************************** - * IAutoComplete_fnAddRef - */ -static ULONG WINAPI IAutoComplete_fnAddRef( - IAutoComplete * iface) -{ - IAutoCompleteImpl *This = (IAutoCompleteImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE("(%p)->(%u)\n", This, refCount - 1); - - return refCount; -} - -/****************************************************************************** - * IAutoComplete_fnRelease - */ -static ULONG WINAPI IAutoComplete_fnRelease( - IAutoComplete * iface) -{ - IAutoCompleteImpl *This = (IAutoCompleteImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE("(%p)->(%u)\n", This, refCount + 1); - - if (!refCount) { - TRACE(" destroying IAutoComplete(%p)\n",This); - HeapFree(GetProcessHeap(), 0, This->quickComplete); - HeapFree(GetProcessHeap(), 0, This->txtbackup); - if (This->hwndListBox) - DestroyWindow(This->hwndListBox); - if (This->enumstr) - IEnumString_Release(This->enumstr); - HeapFree(GetProcessHeap(), 0, This); - } - return refCount; -} - -/****************************************************************************** - * IAutoComplete_fnEnable - */ -static HRESULT WINAPI IAutoComplete_fnEnable( - IAutoComplete * iface, - BOOL fEnable) -{ - IAutoCompleteImpl *This = (IAutoCompleteImpl *)iface; - - HRESULT hr = S_OK; - - TRACE("(%p)->(%s)\n", This, (fEnable)?"true":"false"); - - This->enabled = fEnable; - - return hr; -} - -/****************************************************************************** - * IAutoComplete_fnInit - */ -static HRESULT WINAPI IAutoComplete_fnInit( - IAutoComplete * iface, - HWND hwndEdit, - IUnknown *punkACL, - LPCOLESTR pwzsRegKeyPath, - LPCOLESTR pwszQuickComplete) -{ - IAutoCompleteImpl *This = (IAutoCompleteImpl *)iface; - 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 (This->options & ACO_AUTOSUGGEST) TRACE(" ACO_AUTOSUGGEST\n"); - if (This->options & ACO_AUTOAPPEND) TRACE(" ACO_AUTOAPPEND\n"); - if (This->options & ACO_SEARCH) FIXME(" ACO_SEARCH not supported\n"); - if (This->options & ACO_FILTERPREFIXES) FIXME(" ACO_FILTERPREFIXES not supported\n"); - if (This->options & ACO_USETAB) FIXME(" ACO_USETAB not supported\n"); - if (This->options & ACO_UPDOWNKEYDROPSLIST) TRACE(" ACO_UPDOWNKEYDROPSLIST\n"); - if (This->options & ACO_RTLREADING) FIXME(" ACO_RTLREADING not supported\n"); - - This->hwndEdit = hwndEdit; - - if (!SUCCEEDED (IUnknown_QueryInterface (punkACL, &IID_IEnumString, (LPVOID*)&This->enumstr))) { - TRACE("No IEnumString interface\n"); - return E_NOINTERFACE; - } - - This->wpOrigEditProc = (WNDPROC) SetWindowLongPtrW( hwndEdit, GWLP_WNDPROC, (LONG_PTR) ACEditSubclassProc); - SetWindowLongPtrW( hwndEdit, GWLP_USERDATA, (LONG_PTR)This); - - if (This->options & ACO_AUTOSUGGEST) { - HWND hwndParent; - - hwndParent = GetParent(This->hwndEdit); - - /* FIXME : The listbox should be resizable with the mouse. WS_THICKFRAME looks ugly */ - This->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 (This->hwndListBox) { - This->wpOrigLBoxProc = (WNDPROC) SetWindowLongPtrW( This->hwndListBox, GWLP_WNDPROC, (LONG_PTR) ACLBoxSubclassProc); - SetWindowLongPtrW( This->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 = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (wcslen(pwzsRegKeyPath)+1)*sizeof(WCHAR)); - wcscpy(key, pwzsRegKeyPath); - value = 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) { - This->quickComplete = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len*sizeof(WCHAR)); - wcscpy(This->quickComplete, result); - } - RegCloseKey(hKey); - } - HeapFree(GetProcessHeap(), 0, key); - } - - if ((pwszQuickComplete) && (!This->quickComplete)) { - This->quickComplete = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (wcslen(pwszQuickComplete)+1)*sizeof(WCHAR)); - wcscpy(This->quickComplete, pwszQuickComplete); - } - - return S_OK; -} - -/************************************************************************** - * IAutoComplete_fnVTable - */ -static const IAutoCompleteVtbl acvt = -{ - IAutoComplete_fnQueryInterface, - IAutoComplete_fnAddRef, - IAutoComplete_fnRelease, - IAutoComplete_fnInit, - IAutoComplete_fnEnable, -}; - -/************************************************************************** - * AutoComplete2_QueryInterface - */ -static HRESULT WINAPI IAutoComplete2_fnQueryInterface( - IAutoComplete2 * iface, - REFIID riid, - LPVOID *ppvObj) -{ - IAutoCompleteImpl *This = impl_from_IAutoComplete2(iface); - - TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); - - return IAutoComplete_QueryInterface((IAutoComplete*)This, riid, ppvObj); -} - -/****************************************************************************** - * IAutoComplete2_fnAddRef - */ -static ULONG WINAPI IAutoComplete2_fnAddRef( - IAutoComplete2 * iface) -{ - IAutoCompleteImpl *This = impl_from_IAutoComplete2(iface); - - TRACE ("(%p)->(count=%u)\n", This, This->ref); - - return IAutoComplete2_AddRef((IAutoComplete*)This); -} - -/****************************************************************************** - * IAutoComplete2_fnRelease - */ -static ULONG WINAPI IAutoComplete2_fnRelease( - IAutoComplete2 * iface) -{ - IAutoCompleteImpl *This = impl_from_IAutoComplete2(iface); - - TRACE ("(%p)->(count=%u)\n", This, This->ref); - - return IAutoComplete_Release((IAutoComplete*)This); -} - -/****************************************************************************** - * IAutoComplete2_fnEnable - */ -static HRESULT WINAPI IAutoComplete2_fnEnable( - IAutoComplete2 * iface, - BOOL fEnable) -{ - IAutoCompleteImpl *This = impl_from_IAutoComplete2(iface); - - TRACE ("(%p)->(%s)\n", This, (fEnable)?"true":"false"); - - return IAutoComplete_Enable((IAutoComplete*)This, fEnable); -} - -/****************************************************************************** - * IAutoComplete2_fnInit - */ -static HRESULT WINAPI IAutoComplete2_fnInit( - IAutoComplete2 * iface, - HWND hwndEdit, - IUnknown *punkACL, - LPCOLESTR pwzsRegKeyPath, - LPCOLESTR pwszQuickComplete) -{ - IAutoCompleteImpl *This = impl_from_IAutoComplete2(iface); - - TRACE("(%p)\n", This); - - return IAutoComplete_Init((IAutoComplete*)This, hwndEdit, punkACL, pwzsRegKeyPath, pwszQuickComplete); -} - -/************************************************************************** - * IAutoComplete_fnGetOptions - */ -static HRESULT WINAPI IAutoComplete2_fnGetOptions( - IAutoComplete2 * iface, - DWORD *pdwFlag) -{ - HRESULT hr = S_OK; - - IAutoCompleteImpl *This = impl_from_IAutoComplete2(iface); - - TRACE("(%p) -> (%p)\n", This, pdwFlag); - - *pdwFlag = This->options; - - return hr; -} - -/************************************************************************** - * IAutoComplete_fnSetOptions - */ -static HRESULT WINAPI IAutoComplete2_fnSetOptions( - IAutoComplete2 * iface, - DWORD dwFlag) -{ - HRESULT hr = S_OK; - - IAutoCompleteImpl *This = impl_from_IAutoComplete2(iface); - - TRACE("(%p) -> (0x%x)\n", This, dwFlag); - - This->options = dwFlag; - - return hr; -} - -/************************************************************************** - * IAutoComplete2_fnVTable - */ -static const IAutoComplete2Vtbl ac2vt = -{ - IAutoComplete2_fnQueryInterface, - IAutoComplete2_fnAddRef, - IAutoComplete2_fnRelease, - IAutoComplete2_fnInit, - IAutoComplete2_fnEnable, - /* IAutoComplete2 */ - IAutoComplete2_fnSetOptions, - IAutoComplete2_fnGetOptions, -}; - -/* - Window procedure for autocompletion - */ -static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - IAutoCompleteImpl *This = (IAutoCompleteImpl *)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 (!This->enabled) return CallWindowProcW(This->wpOrigEditProc, hwnd, uMsg, wParam, lParam); - - switch (uMsg) - { - case CB_SHOWDROPDOWN: - ShowWindow(This->hwndListBox, SW_HIDE); - break; - case WM_KILLFOCUS: - if ((This->options & ACO_AUTOSUGGEST) && - ((HWND)wParam != This->hwndListBox)) - { - ShowWindow(This->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 && This->quickComplete) { - hwndQCText = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, - (wcslen(This->quickComplete)+wcslen(hwndText))*sizeof(WCHAR)); - sel = swprintf(hwndQCText, This->quickComplete, hwndText); - SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)hwndQCText); - SendMessageW(hwnd, EM_SETSEL, 0, sel); - HeapFree(GetProcessHeap(), 0, hwndQCText); - } - - ShowWindow(This->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 ( (This->options & (ACO_AUTOSUGGEST | ACO_UPDOWNKEYDROPSLIST)) - && (!IsWindowVisible(This->hwndListBox) && (! *hwndText)) ) - { - /* We must display all the entries */ - displayall = TRUE; - } else { - if (IsWindowVisible(This->hwndListBox)) { - int count; - - count = SendMessageW(This->hwndListBox, LB_GETCOUNT, 0, 0); - /* Change the selection */ - sel = SendMessageW(This->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(This->hwndListBox, LB_SETCURSEL, sel, 0); - if (sel != -1) { - WCHAR *msg; - int len; - - len = SendMessageW(This->hwndListBox, LB_GETTEXTLEN, sel, (LPARAM)NULL); - msg = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (len+1)*sizeof(WCHAR)); - SendMessageW(This->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)This->txtbackup); - SendMessageW(hwnd, EM_SETSEL, wcslen(This->txtbackup), wcslen(This->txtbackup)); - } - } - return 0; - } - break; - case VK_BACK: - case VK_DELETE: - if ((! *hwndText) && (This->options & ACO_AUTOSUGGEST)) { - ShowWindow(This->hwndListBox, SW_HIDE); - return CallWindowProcW(This->wpOrigEditProc, hwnd, uMsg, wParam, lParam); - } - if (This->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(This->hwndListBox, LB_RESETCONTENT, 0, 0); - - HeapFree(GetProcessHeap(), 0, This->txtbackup); - This->txtbackup = HeapAlloc(GetProcessHeap(), - HEAP_ZERO_MEMORY, (wcslen(hwndText)+1)*sizeof(WCHAR)); - wcscpy(This->txtbackup, hwndText); - - /* Returns if there is no text to search and we doesn't want to display all the entries */ - if ((!displayall) && (! *hwndText) ) - break; - - IEnumString_Reset(This->enumstr); - filled = FALSE; - for(cpt = 0;;) { - hr = IEnumString_Next(This->enumstr, 1, &strs, NULL); - if (hr != S_OK) - break; - - if ((LPWSTR)strstrW(strs, hwndText) == strs) { - - if (This->options & ACO_AUTOAPPEND) { - SetWindowTextW(hwnd, strs); - SendMessageW(hwnd, EM_SETSEL, wcslen(hwndText), wcslen(strs)); - break; - } - - if (This->options & ACO_AUTOSUGGEST) { - SendMessageW(This->hwndListBox, LB_ADDSTRING, 0, (LPARAM)strs); - filled = TRUE; - cpt++; - } - } - } - - if (This->options & ACO_AUTOSUGGEST) { - if (filled) { - height = SendMessageW(This->hwndListBox, LB_GETITEMHEIGHT, 0, 0); - SendMessageW(This->hwndListBox, LB_CARETOFF, 0, 0); - GetWindowRect(hwnd, &r); - SetParent(This->hwndListBox, HWND_DESKTOP); - /* It seems that Windows XP displays 7 lines at most - and otherwise displays a vertical scroll bar */ - SetWindowPos(This->hwndListBox, HWND_TOP, - r.left, r.bottom + 1, r.right - r.left, min(height * 7, height*(cpt+1)), - SWP_SHOWWINDOW ); - } else { - ShowWindow(This->hwndListBox, SW_HIDE); - } - } - - break; - default: - return CallWindowProcW(This->wpOrigEditProc, hwnd, uMsg, wParam, lParam); - - } - - return 0; -} - -static LRESULT APIENTRY ACLBoxSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - IAutoCompleteImpl *This = (IAutoCompleteImpl *)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(This->hwndListBox, LB_GETTEXTLEN, sel, 0); - msg = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (len+1)*sizeof(WCHAR)); - SendMessageW(hwnd, LB_GETTEXT, sel, (LPARAM)msg); - SendMessageW(This->hwndEdit, WM_SETTEXT, 0, (LPARAM)msg); - SendMessageW(This->hwndEdit, EM_SETSEL, 0, wcslen(msg)); - ShowWindow(hwnd, SW_HIDE); - HeapFree(GetProcessHeap(), 0, msg); - break; - default: - return CallWindowProcW(This->wpOrigLBoxProc, hwnd, uMsg, wParam, lParam); - } - return 0; -} diff --git a/reactos/dll/win32/shell32/brsfolder.c b/reactos/dll/win32/shell32/brsfolder.c deleted file mode 100644 index 8409a3e5512..00000000000 --- a/reactos/dll/win32/shell32/brsfolder.c +++ /dev/null @@ -1,816 +0,0 @@ -/* - * 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 = IShellFolder_BindToObject(lpsfDesktop, pidlParent, 0, &IID_IShellFolder, (LPVOID*)&lpsfParent); - IShellFolder_Release(lpsfDesktop); - } - - if (!SUCCEEDED(hr)) { - WARN("Could not bind to parent shell folder! hr = %08x\n", hr); - return; - } - - if (pidlChild && pidlChild->mkid.cb) { - hr = IShellFolder_BindToObject(lpsfParent, pidlChild, 0, &IID_IShellFolder, (LPVOID*)&lpsfRoot); - } else { - lpsfRoot = lpsfParent; - hr = IShellFolder_AddRef(lpsfParent); - } - - if (!SUCCEEDED(hr)) { - WARN("Could not bind to root shell folder! hr = %08x\n", hr); - IShellFolder_Release(lpsfParent); - return; - } - - flags = BrowseFlagsToSHCONTF( info->lpBrowseInfo->ulFlags ); - hr = IShellFolder_EnumObjects( lpsfRoot, info->hWnd, flags, &pEnumChildren ); - if (!SUCCEEDED(hr)) { - WARN("Could not get child iterator! hr = %08x\n", hr); - IShellFolder_Release(lpsfParent); - IShellFolder_Release(lpsfRoot); - 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 ); - - IShellFolder_Release(lpsfRoot); - IShellFolder_Release(lpsfParent); -} - -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(IShellFolder_GetDisplayNameOf(lpsf, 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 = 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; - - IShellFolder_AddRef(lpsf); - lptvid->lpsfParent = lpsf; - lptvid->lpi = ILClone(pidl); - lptvid->lpifq = pidlParent ? ILCombine(pidlParent, pidl) : ILClone(pidl); - lptvid->pEnumIL = pEnumIL; - GetNormalAndSelectedIcons(lptvid->lpifq, &tvi); - - tvins.u.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 == IEnumIDList_Next(lpe,1,&pidlTemp,&ulFetched)) - { - ULONG ulAttrs = SFGAO_HASSUBFOLDER | SFGAO_FOLDER; - IEnumIDList* pEnumIL = NULL; - IShellFolder* pSFChild = NULL; - IShellFolder_GetAttributesOf(lpsf, 1, (LPCITEMIDLIST*)&pidlTemp, &ulAttrs); - if (ulAttrs & SFGAO_FOLDER) - { - hr = IShellFolder_BindToObject(lpsf,pidlTemp,NULL,&IID_IShellFolder,(LPVOID*)&pSFChild); - if (SUCCEEDED(hr)) - { - DWORD flags = BrowseFlagsToSHCONTF(info->lpBrowseInfo->ulFlags); - hr = IShellFolder_EnumObjects(pSFChild, hwnd, flags, &pEnumIL); - if (hr == S_OK) - { - if ((IEnumIDList_Skip(pEnumIL, 1) != S_OK) || - FAILED(IEnumIDList_Reset(pEnumIL))) - { - IEnumIDList_Release(pEnumIL); - pEnumIL = NULL; - } - } - IShellFolder_Release(pSFChild); - } - } - - 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 = IShellFolder_GetAttributesOf(lptvid->lpsfParent, 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 = IShellFolder_GetAttributesOf(lptvid->lpsfParent, 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); - - IShellFolder_Release(lptvid->lpsfParent); - if (lptvid->pEnumIL) - IEnumIDList_Release(lptvid->pEnumIL); - 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 = IShellFolder_BindToObject( lptvid->lpsfParent, lptvid->lpi, 0, - (REFIID)&IID_IShellFolder, (LPVOID *)&lpsf2 ); - } else { - lpsf2 = lptvid->lpsfParent; - r = IShellFolder_AddRef(lpsf2); - } - - 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 = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, - (LPOLESTR)selection, NULL, &pidlSelection, NULL); - IShellFolder_Release(psfDesktop); - 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 = 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 = 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 = 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/reactos/dll/win32/shell32/changenotify.c b/reactos/dll/win32/shell32/changenotify.c deleted file mode 100644 index 08a4637e946..00000000000 --- a/reactos/dll/win32/shell32/changenotify.c +++ /dev/null @@ -1,473 +0,0 @@ -/* - * 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); - -static CRITICAL_SECTION SHELL32_ChangenotifyCS; -static CRITICAL_SECTION_DEBUG critsect_debug = -{ - 0, 0, &SHELL32_ChangenotifyCS, - { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, - 0, 0, { (DWORD_PTR)(__FILE__ ": SHELL32_ChangenotifyCS") } -}; -static 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, - const SHChangeNotifyEntry *lpItems) -{ - LPNOTIFICATIONLIST item; - int i; - - item = 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 = 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] - */ -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. - */ -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 = 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] - */ -DWORD WINAPI NTSHChangeNotifyDeregister(ULONG x1) -{ - FIXME("(0x%08x):semi stub.\n",x1); - - return SHChangeNotifyDeregister( x1 ); -} diff --git a/reactos/dll/win32/shell32/classes.c b/reactos/dll/win32/shell32/classes.c deleted file mode 100644 index edc1eacf5c9..00000000000 --- a/reactos/dll/win32/shell32/classes.c +++ /dev/null @@ -1,507 +0,0 @@ -/* - * 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[5]; - - 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, 5)) - *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)) { - LPSHELLFOLDER psfDesktop, psfFolder; - HRESULT hr; - - RegCloseKey(hSFKey); - hr = SHGetDesktopFolder(&psfDesktop); - if (SUCCEEDED(hr)) { - hr = IShellFolder_BindToObject(psfDesktop, pidlFolder, NULL, &IID_IShellFolder, - (LPVOID*)&psfFolder); - if (SUCCEEDED(hr)) { - hr = IShellFolder_GetAttributesOf(psfFolder, 0, NULL, pdwAttributes); - IShellFolder_Release(psfFolder); - } - IShellFolder_Release(psfDesktop); - } - 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/reactos/dll/win32/shell32/clipboard.c b/reactos/dll/win32/shell32/clipboard.c deleted file mode 100644 index 24fd0d0f514..00000000000 --- a/reactos/dll/win32/shell32/clipboard.c +++ /dev/null @@ -1,240 +0,0 @@ -/* - * 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 size = 0; - WCHAR wszFileName[MAX_PATH]; - HGLOBAL hGlobal = NULL; - DROPFILES *pDropFiles; - int offset; - LPITEMIDLIST *pidls; - - TRACE("(%p,%p,%u)\n", pidlRoot, apidl, cidl); - - pidls = HeapAlloc(GetProcessHeap(), 0, cidl * sizeof(*pidls)); - if (!pidls) - goto cleanup; - - /* get the size needed */ - size = sizeof(DROPFILES); - - for (i=0; ipFiles = offset * sizeof(WCHAR); - pDropFiles->fWide = TRUE; - - 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/reactos/dll/win32/shell32/control.c b/reactos/dll/win32/shell32/control.c deleted file mode 100644 index 9b39b4ed642..00000000000 --- a/reactos/dll/win32/shell32/control.c +++ /dev/null @@ -1,522 +0,0 @@ -/* 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 = 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 = 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 i, 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 i, 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 = 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 = 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.@] - * - */ -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.@] - * - */ -void WINAPI Control_RunDLLA(HWND hWnd, HINSTANCE hInst, LPCSTR cmd, DWORD nCmdShow) -{ - DWORD len = MultiByteToWideChar(CP_ACP, 0, cmd, -1, NULL, 0 ); - LPWSTR wszCmd = 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.@] - * - */ -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.@] - * - */ -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 - */ -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 - * - */ -DWORD WINAPI CallCPLEntry16(HMODULE hMod, FARPROC pFunc, DWORD dw3, DWORD dw4, DWORD dw5, DWORD dw6) -{ - FIXME("(%p, %p, %08x, %08x, %08x, %08x): stub.\n", hMod, pFunc, dw3, dw4, dw5, dw6); - return 0x0deadbee; -} diff --git a/reactos/dll/win32/shell32/dataobject.c b/reactos/dll/win32/shell32/dataobject.c deleted file mode 100644 index 6da709528c8..00000000000 --- a/reactos/dll/win32/shell32/dataobject.c +++ /dev/null @@ -1,456 +0,0 @@ -/* - * 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 - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -/*********************************************************************** -* IEnumFORMATETC implementation -*/ - -typedef struct -{ - /* IUnknown fields */ - const IEnumFORMATETCVtbl *lpVtbl; - LONG ref; - /* IEnumFORMATETC fields */ - UINT posFmt; - UINT countFmt; - LPFORMATETC pFmt; -} IEnumFORMATETCImpl; - -static HRESULT WINAPI IEnumFORMATETC_fnQueryInterface( - LPENUMFORMATETC iface, REFIID riid, LPVOID* ppvObj) -{ - IEnumFORMATETCImpl *This = (IEnumFORMATETCImpl *)iface; - TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); - - *ppvObj = NULL; - - if(IsEqualIID(riid, &IID_IUnknown)) - { - *ppvObj = This; - } - else if(IsEqualIID(riid, &IID_IEnumFORMATETC)) - { - *ppvObj = (IEnumFORMATETC*)This; - } - - if(*ppvObj) - { - IUnknown_AddRef((IUnknown*)(*ppvObj)); - TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); - return S_OK; - } - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI IEnumFORMATETC_fnAddRef(LPENUMFORMATETC iface) -{ - IEnumFORMATETCImpl *This = (IEnumFORMATETCImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE("(%p)->(count=%u)\n", This, refCount - 1); - - return refCount; -} - -static ULONG WINAPI IEnumFORMATETC_fnRelease(LPENUMFORMATETC iface) -{ - IEnumFORMATETCImpl *This = (IEnumFORMATETCImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE("(%p)->(%u)\n", This, refCount + 1); - - if (!refCount) - { - TRACE(" destroying IEnumFORMATETC(%p)\n",This); - SHFree (This->pFmt); - HeapFree(GetProcessHeap(),0,This); - return 0; - } - return refCount; -} - -static HRESULT WINAPI IEnumFORMATETC_fnNext(LPENUMFORMATETC iface, ULONG celt, FORMATETC *rgelt, ULONG *pceltFethed) -{ - IEnumFORMATETCImpl *This = (IEnumFORMATETCImpl *)iface; - UINT i; - - TRACE("(%p)->(%u,%p)\n", This, celt, rgelt); - - if(!This->pFmt)return S_FALSE; - if(!rgelt) return E_INVALIDARG; - if (pceltFethed) *pceltFethed = 0; - - for(i = 0; This->posFmt < This->countFmt && celt > i; i++) - { - *rgelt++ = This->pFmt[This->posFmt++]; - } - - if (pceltFethed) *pceltFethed = i; - - return ((i == celt) ? S_OK : S_FALSE); -} - -static HRESULT WINAPI IEnumFORMATETC_fnSkip(LPENUMFORMATETC iface, ULONG celt) -{ - IEnumFORMATETCImpl *This = (IEnumFORMATETCImpl *)iface; - TRACE("(%p)->(num=%u)\n", This, celt); - - if((This->posFmt + celt) >= This->countFmt) return S_FALSE; - This->posFmt += celt; - return S_OK; -} - -static HRESULT WINAPI IEnumFORMATETC_fnReset(LPENUMFORMATETC iface) -{ - IEnumFORMATETCImpl *This = (IEnumFORMATETCImpl *)iface; - TRACE("(%p)->()\n", This); - - This->posFmt = 0; - return S_OK; -} - -static HRESULT WINAPI IEnumFORMATETC_fnClone(LPENUMFORMATETC iface, LPENUMFORMATETC* ppenum) -{ - IEnumFORMATETCImpl *This = (IEnumFORMATETCImpl *)iface; - TRACE("(%p)->(ppenum=%p)\n", This, ppenum); - - if (!ppenum) return E_INVALIDARG; - *ppenum = IEnumFORMATETC_Constructor(This->countFmt, This->pFmt); - if(*ppenum) - IEnumFORMATETC_fnSkip(*ppenum, This->posFmt); - return S_OK; -} - -static const IEnumFORMATETCVtbl efvt = -{ - IEnumFORMATETC_fnQueryInterface, - IEnumFORMATETC_fnAddRef, - IEnumFORMATETC_fnRelease, - IEnumFORMATETC_fnNext, - IEnumFORMATETC_fnSkip, - IEnumFORMATETC_fnReset, - IEnumFORMATETC_fnClone -}; - -LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT cfmt, const FORMATETC afmt[]) -{ - IEnumFORMATETCImpl* ef; - DWORD size=cfmt * sizeof(FORMATETC); - - ef = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IEnumFORMATETCImpl)); - - if(ef) - { - ef->ref=1; - ef->lpVtbl=&efvt; - - ef->countFmt = cfmt; - ef->pFmt = SHAlloc (size); - - if (ef->pFmt) - memcpy(ef->pFmt, afmt, size); - } - - TRACE("(%p)->(%u,%p)\n",ef, cfmt, afmt); - return (LPENUMFORMATETC)ef; -} - - -/*********************************************************************** -* IDataObject implementation -*/ - -/* number of supported formats */ -#define MAX_FORMATS 4 - -typedef struct -{ - /* IUnknown fields */ - const IDataObjectVtbl *lpVtbl; - LONG ref; - - /* IDataObject fields */ - LPITEMIDLIST pidl; - LPITEMIDLIST * apidl; - UINT cidl; - - FORMATETC pFormatEtc[MAX_FORMATS]; - UINT cfShellIDList; - UINT cfFileNameA; - UINT cfFileNameW; - -} IDataObjectImpl; - -/*************************************************************************** -* IDataObject_QueryInterface -*/ -static HRESULT WINAPI IDataObject_fnQueryInterface(LPDATAOBJECT iface, REFIID riid, LPVOID * ppvObj) -{ - IDataObjectImpl *This = (IDataObjectImpl *)iface; - TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); - - *ppvObj = NULL; - - if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/ - { - *ppvObj = This; - } - else if(IsEqualIID(riid, &IID_IDataObject)) /*IDataObject*/ - { - *ppvObj = (IDataObject*)This; - } - - if(*ppvObj) - { - IUnknown_AddRef((IUnknown*)*ppvObj); - TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); - return S_OK; - } - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -/************************************************************************** -* IDataObject_AddRef -*/ -static ULONG WINAPI IDataObject_fnAddRef(LPDATAOBJECT iface) -{ - IDataObjectImpl *This = (IDataObjectImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE("(%p)->(count=%u)\n", This, refCount - 1); - - return refCount; -} - -/************************************************************************** -* IDataObject_Release -*/ -static ULONG WINAPI IDataObject_fnRelease(LPDATAOBJECT iface) -{ - IDataObjectImpl *This = (IDataObjectImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE("(%p)->(%u)\n", This, refCount + 1); - - if (!refCount) - { - TRACE(" destroying IDataObject(%p)\n",This); - _ILFreeaPidl(This->apidl, This->cidl); - ILFree(This->pidl), - HeapFree(GetProcessHeap(),0,This); - } - return refCount; -} - -/************************************************************************** -* IDataObject_fnGetData -*/ -static HRESULT WINAPI IDataObject_fnGetData(LPDATAOBJECT iface, LPFORMATETC pformatetcIn, STGMEDIUM *pmedium) -{ - IDataObjectImpl *This = (IDataObjectImpl *)iface; - - 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 == This->cfShellIDList) - { - if (This->cidl < 1) return(E_UNEXPECTED); - pmedium->u.hGlobal = RenderSHELLIDLIST(This->pidl, This->apidl, This->cidl); - } - else if (pformatetcIn->cfFormat == CF_HDROP) - { - if (This->cidl < 1) return(E_UNEXPECTED); - pmedium->u.hGlobal = RenderHDROP(This->pidl, This->apidl, This->cidl); - } - else if (pformatetcIn->cfFormat == This->cfFileNameA) - { - if (This->cidl < 1) return(E_UNEXPECTED); - pmedium->u.hGlobal = RenderFILENAMEA(This->pidl, This->apidl, This->cidl); - } - else if (pformatetcIn->cfFormat == This->cfFileNameW) - { - if (This->cidl < 1) return(E_UNEXPECTED); - pmedium->u.hGlobal = RenderFILENAMEW(This->pidl, This->apidl, This->cidl); - } - else - { - FIXME("-- expected clipformat not implemented\n"); - return (E_INVALIDARG); - } - if (pmedium->u.hGlobal) - { - pmedium->tymed = TYMED_HGLOBAL; - pmedium->pUnkForRelease = NULL; - return S_OK; - } - return E_OUTOFMEMORY; -} - -static HRESULT WINAPI IDataObject_fnGetDataHere(LPDATAOBJECT iface, LPFORMATETC pformatetc, STGMEDIUM *pmedium) -{ - IDataObjectImpl *This = (IDataObjectImpl *)iface; - FIXME("(%p)->()\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI IDataObject_fnQueryGetData(LPDATAOBJECT iface, LPFORMATETC pformatetc) -{ - IDataObjectImpl *This = (IDataObjectImpl *)iface; - 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; ipFormatEtc[i].cfFormat == pformatetc->cfFormat) - && (This->pFormatEtc[i].tymed == pformatetc->tymed)) - { - return S_OK; - } - } - - return DV_E_TYMED; -} - -static HRESULT WINAPI IDataObject_fnGetCanonicalFormatEtc(LPDATAOBJECT iface, LPFORMATETC pformatectIn, LPFORMATETC pformatetcOut) -{ - IDataObjectImpl *This = (IDataObjectImpl *)iface; - FIXME("(%p)->()\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI IDataObject_fnSetData(LPDATAOBJECT iface, LPFORMATETC pformatetc, STGMEDIUM *pmedium, BOOL fRelease) -{ - IDataObjectImpl *This = (IDataObjectImpl *)iface; - FIXME("(%p)->()\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI IDataObject_fnEnumFormatEtc(LPDATAOBJECT iface, DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc) -{ - IDataObjectImpl *This = (IDataObjectImpl *)iface; - - TRACE("(%p)->()\n", This); - *ppenumFormatEtc=NULL; - - /* only get data */ - if (DATADIR_GET == dwDirection) - { - *ppenumFormatEtc = IEnumFORMATETC_Constructor(MAX_FORMATS, This->pFormatEtc); - return (*ppenumFormatEtc) ? S_OK : E_FAIL; - } - - return E_NOTIMPL; -} - -static HRESULT WINAPI IDataObject_fnDAdvise(LPDATAOBJECT iface, FORMATETC *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection) -{ - IDataObjectImpl *This = (IDataObjectImpl *)iface; - FIXME("(%p)->()\n", This); - return E_NOTIMPL; -} -static HRESULT WINAPI IDataObject_fnDUnadvise(LPDATAOBJECT iface, DWORD dwConnection) -{ - IDataObjectImpl *This = (IDataObjectImpl *)iface; - FIXME("(%p)->()\n", This); - return E_NOTIMPL; -} -static HRESULT WINAPI IDataObject_fnEnumDAdvise(LPDATAOBJECT iface, IEnumSTATDATA **ppenumAdvise) -{ - IDataObjectImpl *This = (IDataObjectImpl *)iface; - FIXME("(%p)->()\n", This); - return E_NOTIMPL; -} - -static const IDataObjectVtbl dtovt = -{ - IDataObject_fnQueryInterface, - IDataObject_fnAddRef, - IDataObject_fnRelease, - IDataObject_fnGetData, - IDataObject_fnGetDataHere, - IDataObject_fnQueryGetData, - IDataObject_fnGetCanonicalFormatEtc, - IDataObject_fnSetData, - IDataObject_fnEnumFormatEtc, - IDataObject_fnDAdvise, - IDataObject_fnDUnadvise, - IDataObject_fnEnumDAdvise -}; - -/************************************************************************** -* IDataObject_Constructor -*/ -LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, - LPCITEMIDLIST pMyPidl, LPCITEMIDLIST * apidl, UINT cidl) -{ - IDataObjectImpl* dto; - - dto = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDataObjectImpl)); - - if (dto) - { - dto->ref = 1; - dto->lpVtbl = &dtovt; - dto->pidl = ILClone(pMyPidl); - dto->apidl = _ILCopyaPidl(apidl, cidl); - dto->cidl = cidl; - - dto->cfShellIDList = RegisterClipboardFormatW(CFSTR_SHELLIDLIST); - dto->cfFileNameA = RegisterClipboardFormatA(CFSTR_FILENAMEA); - dto->cfFileNameW = RegisterClipboardFormatW(CFSTR_FILENAMEW); - InitFormatEtc(dto->pFormatEtc[0], dto->cfShellIDList, TYMED_HGLOBAL); - InitFormatEtc(dto->pFormatEtc[1], CF_HDROP, TYMED_HGLOBAL); - InitFormatEtc(dto->pFormatEtc[2], dto->cfFileNameA, TYMED_HGLOBAL); - InitFormatEtc(dto->pFormatEtc[3], dto->cfFileNameW, TYMED_HGLOBAL); - } - - TRACE("(%p)->(apidl=%p cidl=%u)\n",dto, apidl, cidl); - return (LPDATAOBJECT)dto; -} - -/************************************************************************* - * 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/reactos/dll/win32/shell32/dde.c b/reactos/dll/win32/shell32/dde.c deleted file mode 100644 index e2d1458b972..00000000000 --- a/reactos/dll/win32/shell32/dde.c +++ /dev/null @@ -1,170 +0,0 @@ -/* - * 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. - */ -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/reactos/dll/win32/shell32/debughlp.c b/reactos/dll/win32/shell32/debughlp.c deleted file mode 100644 index 8a2ad756f9c..00000000000 --- a/reactos/dll/win32/shell32/debughlp.c +++ /dev/null @@ -1,425 +0,0 @@ -/* - * 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"}, - {NULL,NULL}}; - -const char * shdebugstr_guid( const struct _GUID *id ) -{ - int i; - const char* name = NULL; - char clsidbuf[100]; - - if (!id) return "(null)"; - - for (i=0;InterfaceDesc[i].riid && !name;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/reactos/dll/win32/shell32/desktop.c b/reactos/dll/win32/shell32/desktop.c deleted file mode 100644 index cd21bcbae2a..00000000000 --- a/reactos/dll/win32/shell32/desktop.c +++ /dev/null @@ -1,779 +0,0 @@ -/* - * 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 - -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' -}; - -static const IShellBrowserVtbl SHDESK_Vtbl; -static const ICommDlgBrowserVtbl SHDESK_ICommDlgBrowser_Vtbl; -static const IServiceProviderVtbl SHDESK_IServiceProvider_Vtbl; - -typedef struct _SHDESK -{ - DWORD Tag; - const IShellBrowserVtbl *lpVtbl; - const ICommDlgBrowserVtbl *lpVtblCommDlgBrowser; - const IServiceProviderVtbl *lpVtblServiceProvider; - LONG Ref; - HWND hWnd; - HWND hWndShellView; - HWND hWndDesktopListView; - IShellDesktopTray *ShellDesk; - IShellView *DesktopView; - IShellBrowser *DefaultShellBrowser; - LPITEMIDLIST pidlDesktopDirectory; - LPITEMIDLIST pidlDesktop; -} SHDESK, *PSHDESK; - -static IUnknown * -IUnknown_from_impl(SHDESK *This) -{ - return (IUnknown *)&This->lpVtbl; -} - -static IShellBrowser * -IShellBrowser_from_impl(SHDESK *This) -{ - return (IShellBrowser *)&This->lpVtbl; -} - -static IOleWindow * -IOleWindow_from_impl(SHDESK *This) -{ - return (IOleWindow *)&This->lpVtbl; -} - -static ICommDlgBrowser * -ICommDlgBrowser_from_impl(SHDESK *This) -{ - return (ICommDlgBrowser *)&This->lpVtblCommDlgBrowser; -} - -static IServiceProvider * -IServiceProvider_from_impl(SHDESK *This) -{ - return (IServiceProvider *)&This->lpVtblServiceProvider; -} - -static SHDESK * -impl_from_IShellBrowser(IShellBrowser *iface) -{ - return (SHDESK *)((ULONG_PTR)iface - FIELD_OFFSET(SHDESK, lpVtbl)); -} - -static SHDESK * -impl_from_ICommDlgBrowser(ICommDlgBrowser *iface) -{ - return (SHDESK *)((ULONG_PTR)iface - FIELD_OFFSET(SHDESK, lpVtblCommDlgBrowser)); -} - -static SHDESK * -impl_from_IServiceProvider(IServiceProvider *iface) -{ - return (SHDESK *)((ULONG_PTR)iface - FIELD_OFFSET(SHDESK, lpVtblServiceProvider)); -} - -static void -SHDESK_Free(SHDESK *This) -{ - if (This->ShellDesk != NULL) - IShellDesktopTray_Release(This->ShellDesk); - - if (This->DesktopView != NULL) - { - if (This->hWndShellView != NULL) - IShellView_DestroyViewWindow(This->DesktopView); - - IShellView_Release(This->DesktopView); - This->DesktopView = NULL; - This->hWndShellView = NULL; - This->hWndDesktopListView = NULL; - } - - if (This->pidlDesktopDirectory != NULL) - { - ILFree(This->pidlDesktopDirectory); - This->pidlDesktopDirectory = NULL; - } - - if (This->pidlDesktop != NULL) - { - ILFree(This->pidlDesktop); - This->pidlDesktop = NULL; - } - - ZeroMemory(This, sizeof(SHDESK)); - LocalFree((HLOCAL)This); -} - -static ULONG STDMETHODCALLTYPE -SHDESK_Release(IShellBrowser *iface) -{ - SHDESK *This = impl_from_IShellBrowser(iface); - ULONG Ret; - - Ret = InterlockedDecrement(&This->Ref); - if (Ret == 0) - SHDESK_Free(This); - - return Ret; -} - -static ULONG STDMETHODCALLTYPE -SHDESK_AddRef(IShellBrowser *iface) -{ - SHDESK *This = impl_from_IShellBrowser(iface); - - return InterlockedIncrement(&This->Ref); -} - -static HRESULT STDMETHODCALLTYPE -SHDESK_QueryInterface(IShellBrowser *iface, REFIID riid, LPVOID *ppvObj) -{ - SHDESK *This; - - if (ppvObj == NULL) - return E_POINTER; - - This = impl_from_IShellBrowser(iface); - - if (IsEqualIID(riid, &IID_IUnknown)) - { - *ppvObj = IUnknown_from_impl(This); - } - else if (This->DefaultShellBrowser != NULL) - { - return IShellBrowser_QueryInterface(This->DefaultShellBrowser, riid, ppvObj); - } - else if (IsEqualIID(riid, &IID_IOleWindow)) - { - *ppvObj = IOleWindow_from_impl(This); - } - else if (IsEqualIID(riid, &IID_IShellBrowser)) - { - *ppvObj = IShellBrowser_from_impl(This); - } - else if (IsEqualIID(riid, &IID_ICommDlgBrowser)) - { - *ppvObj = ICommDlgBrowser_from_impl(This); - } - else if (IsEqualIID(riid, &IID_IServiceProvider)) - { - *ppvObj = IServiceProvider_from_impl(This); - } - else - { - *ppvObj = NULL; - return E_NOINTERFACE; - } - - SHDESK_AddRef(iface); - return S_OK; -} - -static PSHDESK -SHDESK_Create(HWND hWnd, LPCREATESTRUCT lpCreateStruct) -{ - IShellFolder *psfDesktopFolder; - IShellDesktopTray *ShellDesk; - CSFV csfv; - SHDESK *This; - HRESULT hRet; - - ShellDesk = (IShellDesktopTray *)lpCreateStruct->lpCreateParams; - if (ShellDesk == NULL) - { - WARN("No IShellDesk interface provided!"); - return NULL; - } - - This = (PSHDESK)LocalAlloc(LMEM_FIXED, sizeof(SHDESK)); - if (This == NULL) - return NULL; - - ZeroMemory(This, sizeof(SHDESK)); - This->Tag = SHDESK_TAG; - This->lpVtbl = &SHDESK_Vtbl; - This->lpVtblCommDlgBrowser = &SHDESK_ICommDlgBrowser_Vtbl; - This->lpVtblServiceProvider = &SHDESK_IServiceProvider_Vtbl; - This->Ref = 1; - This->hWnd = hWnd; - This->ShellDesk = ShellDesk; - IShellDesktopTray_AddRef(ShellDesk); - - This->pidlDesktopDirectory = SHCloneSpecialIDList(This->hWnd, CSIDL_DESKTOPDIRECTORY, FALSE); - hRet = SHGetSpecialFolderLocation(This->hWnd, CSIDL_DESKTOP, &This->pidlDesktop); - if (!SUCCEEDED(hRet)) - goto Fail; - - hRet = SHGetDesktopFolder(&psfDesktopFolder); - if (!SUCCEEDED(hRet)) - goto Fail; - - ZeroMemory(&csfv, sizeof(csfv)); - csfv.cbSize = sizeof(csfv); - csfv.pshf = psfDesktopFolder; - csfv.psvOuter = NULL; - - hRet = SHCreateShellFolderViewEx(&csfv, &This->DesktopView); - IShellFolder_Release(psfDesktopFolder); - - if (!SUCCEEDED(hRet)) - { -Fail: - SHDESK_Release(IShellBrowser_from_impl(This)); - return NULL; - } - - return This; -} - -static HWND -SHDESK_FindDesktopListView (SHDESK *This) -{ - return FindWindowExW(This->hWndShellView, - NULL, - WC_LISTVIEW, - NULL); -} - -static BOOL -SHDESK_CreateDeskWnd(SHDESK *This) -{ - IShellBrowser *ShellBrowser; - FOLDERSETTINGS fs; - RECT rcClient; - HRESULT hRet; - - if (!GetClientRect(This->hWnd, - &rcClient)) - { - return FALSE; - } - - ShellBrowser = IShellBrowser_from_impl(This); - - fs.ViewMode = FVM_ICON; - fs.fFlags = FWF_DESKTOP | FWF_NOCLIENTEDGE | FWF_NOSCROLL | FWF_TRANSPARENT; - hRet = IShellView_CreateViewWindow(This->DesktopView, NULL, &fs, ShellBrowser, &rcClient, &This->hWndShellView); - if (!SUCCEEDED(hRet)) - return FALSE; - - SetShellWindowEx (This->hWnd, - SHDESK_FindDesktopListView (This)); - - return TRUE; -} - -static HRESULT STDMETHODCALLTYPE -SHDESK_GetWindow(IShellBrowser *iface, HWND *phwnd) -{ - SHDESK *This = impl_from_IShellBrowser(iface); - - if (This->hWnd != NULL) - { - *phwnd = This->hWnd; - return S_OK; - } - - *phwnd = NULL; - return E_UNEXPECTED; -} - -static HRESULT STDMETHODCALLTYPE -SHDESK_ContextSensitiveHelp(IShellBrowser *iface, BOOL fEnterMode) -{ - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE -SHDESK_InsertMenusSB(IShellBrowser *iface, HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths) -{ - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE -SHDESK_SetMenuSB(IShellBrowser *iface, HMENU hmenuShared, HOLEMENU holemenuRes, HWND hwndActiveObject) -{ - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE -SHDESK_RemoveMenusSB(IShellBrowser *iface, HMENU hmenuShared) -{ - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE -SHDESK_SetStatusTextSB(IShellBrowser *iface, LPCOLESTR lpszStatusText) -{ - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE -SHDESK_EnableModelessSB(IShellBrowser *iface, BOOL fEnable) -{ - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE -SHDESK_TranslateAcceleratorSB(IShellBrowser *iface, LPMSG lpmsg, WORD wID) -{ - return S_FALSE; -} - -static HRESULT STDMETHODCALLTYPE -SHDESK_BrowseObject(IShellBrowser *iface, LPCITEMIDLIST pidl, UINT wFlags) -{ - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE -SHDESK_GetViewStateStream(IShellBrowser *iface, DWORD grfMode, IStream **ppStrm) -{ - return E_NOTIMPL; -} - -static HWND -DesktopGetWindowControl(IN SHDESK *This, - IN UINT id) -{ - switch (id) - { - case FCW_TOOLBAR: - case FCW_STATUS: - case FCW_TREE: - case FCW_PROGRESS: - return NULL; - - default: - return NULL; - } - -} - -static HRESULT STDMETHODCALLTYPE -SHDESK_GetControlWindow(IShellBrowser *iface, UINT id, HWND *lphwnd) -{ - SHDESK *This = impl_from_IShellBrowser(iface); - HWND hWnd; - - hWnd = DesktopGetWindowControl(This, - id); - if (hWnd != NULL) - { - *lphwnd = hWnd; - return S_OK; - } - - *lphwnd = NULL; - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE -SHDESK_SendControlMsg(IShellBrowser *iface, UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pret) -{ - SHDESK *This = impl_from_IShellBrowser(iface); - HWND hWnd; - - if (pret == NULL) - return E_POINTER; - - hWnd = DesktopGetWindowControl(This, - id); - if (hWnd != NULL) - { - *pret = SendMessageW(hWnd, - uMsg, - wParam, - lParam); - return S_OK; - } - - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE -SHDESK_QueryActiveShellView(IShellBrowser *iface, IShellView **ppshv) -{ - IShellView *ActiveView; - SHDESK *This = impl_from_IShellBrowser(iface); - - ActiveView = This->DesktopView; - SHDESK_AddRef(iface); - *ppshv = ActiveView; - - return S_OK; -} - -static HRESULT STDMETHODCALLTYPE -SHDESK_OnViewWindowActive(IShellBrowser *iface, IShellView *ppshv) -{ - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE -SHDESK_SetToolbarItems(IShellBrowser *iface, LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags) -{ - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE -SHDESK_ICommDlgBrowser_QueryInterface(ICommDlgBrowser *iface, REFIID riid, LPVOID *ppvObj) -{ - SHDESK *This = impl_from_ICommDlgBrowser(iface); - IShellBrowser *ShellBrowser = IShellBrowser_from_impl(This); - - return SHDESK_QueryInterface(ShellBrowser, riid, ppvObj); -} - -static ULONG STDMETHODCALLTYPE -SHDESK_ICommDlgBrowser_Release(ICommDlgBrowser *iface) -{ - SHDESK *This = impl_from_ICommDlgBrowser(iface); - IShellBrowser *ShellBrowser = IShellBrowser_from_impl(This); - - return SHDESK_Release(ShellBrowser); -} - -static ULONG STDMETHODCALLTYPE -SHDESK_ICommDlgBrowser_AddRef(ICommDlgBrowser *iface) -{ - SHDESK *This = impl_from_ICommDlgBrowser(iface); - IShellBrowser *ShellBrowser = IShellBrowser_from_impl(This); - - return SHDESK_AddRef(ShellBrowser); -} - -static HRESULT STDMETHODCALLTYPE -SHDESK_ICommDlgBrowser_OnDefaultCommand(ICommDlgBrowser *iface, IShellView *ppshv) -{ - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE -SHDESK_ICommDlgBrowser_OnStateChange(ICommDlgBrowser *iface, IShellView *ppshv, ULONG uChange) -{ - return S_OK; -} - -static HRESULT STDMETHODCALLTYPE -SHDESK_ICommDlgBrowser_IncludeObject(ICommDlgBrowser *iface, IShellView *ppshv, LPCITEMIDLIST pidl) -{ - return S_OK; -} - -static const ICommDlgBrowserVtbl SHDESK_ICommDlgBrowser_Vtbl = -{ - /* IUnknown */ - SHDESK_ICommDlgBrowser_QueryInterface, - SHDESK_ICommDlgBrowser_AddRef, - SHDESK_ICommDlgBrowser_Release, - /* ICommDlgBrowser */ - SHDESK_ICommDlgBrowser_OnDefaultCommand, - SHDESK_ICommDlgBrowser_OnStateChange, - SHDESK_ICommDlgBrowser_IncludeObject -}; - -static HRESULT STDMETHODCALLTYPE -SHDESK_IServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, LPVOID *ppvObj) -{ - SHDESK *This = impl_from_IServiceProvider(iface); - IShellBrowser *ShellBrowser = IShellBrowser_from_impl(This); - - return SHDESK_QueryInterface(ShellBrowser, riid, ppvObj); -} - -static ULONG STDMETHODCALLTYPE -SHDESK_IServiceProvider_Release(IServiceProvider *iface) -{ - SHDESK *This = impl_from_IServiceProvider(iface); - IShellBrowser *ShellBrowser = IShellBrowser_from_impl(This); - - return SHDESK_Release(ShellBrowser); -} - -static ULONG STDMETHODCALLTYPE -SHDESK_IServiceProvider_AddRef(IServiceProvider *iface) -{ - SHDESK *This = impl_from_IServiceProvider(iface); - IShellBrowser *ShellBrowser = IShellBrowser_from_impl(This); - - return SHDESK_AddRef(ShellBrowser); -} - -static HRESULT STDMETHODCALLTYPE -SHDESK_IServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, REFIID riid, PVOID *ppv) -{ - /* FIXME - handle guidService */ - return SHDESK_IServiceProvider_QueryInterface(iface, riid, ppv); -} - -static const IServiceProviderVtbl SHDESK_IServiceProvider_Vtbl = -{ - /* IUnknown */ - SHDESK_IServiceProvider_QueryInterface, - SHDESK_IServiceProvider_AddRef, - SHDESK_IServiceProvider_Release, - /* IServiceProvider */ - SHDESK_IServiceProvider_QueryService -}; - -static BOOL -SHDESK_MessageLoop(SHDESK *This) -{ - MSG Msg; - BOOL bRet; - - while ((bRet = GetMessageW(&Msg, NULL, 0, 0)) != 0) - { - if (bRet != -1) - { - TranslateMessage(&Msg); - DispatchMessageW(&Msg); - } - } - - return TRUE; -} - -static LRESULT CALLBACK -ProgmanWindowProc(IN HWND hwnd, - IN UINT uMsg, - IN WPARAM wParam, - IN LPARAM lParam) -{ - SHDESK *This = NULL; - LRESULT Ret = FALSE; - - if (uMsg != WM_NCCREATE) - { - This = (SHDESK*)GetWindowLongPtrW(hwnd, - 0); - if (This == NULL) - goto DefMsgHandler; - } - - if (This != NULL || uMsg == WM_NCCREATE) - { - switch (uMsg) - { - case WM_ERASEBKGND: - return (LRESULT)PaintDesktop((HDC)wParam); - - case WM_GETISHELLBROWSER: - Ret = (LRESULT)IShellBrowser_from_impl(This); - 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(This->hWnd, - NULL, - TRUE); - - if (This->hWndShellView != NULL) - { - /* Forward the message */ - SendMessageW(This->hWndShellView, - WM_SYSCOLORCHANGE, - wParam, - lParam); - } - break; - } - - case WM_CREATE: - { - IShellDesktopTray_RegisterDesktopWindow(This->ShellDesk, - This->hWnd); - - if (!SHDESK_CreateDeskWnd(This)) - WARN("Could not create the desktop view control!\n"); - break; - } - - case WM_NCCREATE: - { - LPCREATESTRUCT CreateStruct = (LPCREATESTRUCT)lParam; - This = SHDESK_Create(hwnd, CreateStruct); - if (This == NULL) - { - WARN("Failed to create desktop structure\n"); - break; - } - - SetWindowLongPtrW(hwnd, - 0, - (LONG_PTR)This); - Ret = TRUE; - break; - } - - case WM_NCDESTROY: - { - SHDESK_Free(This); - break; - } - - default: -DefMsgHandler: - Ret = DefWindowProcW(hwnd, uMsg, wParam, lParam); - break; - } - } - - return Ret; -} - -static BOOL -RegisterProgmanWindowClass(VOID) -{ - WNDCLASSW wcProgman; - - wcProgman.style = CS_DBLCLKS; - wcProgman.lpfnWndProc = ProgmanWindowProc; - wcProgman.cbClsExtra = 0; - wcProgman.cbWndExtra = sizeof(PSHDESK); - 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) -{ - PSHDESK Desk = (PSHDESK)hDesktop; - - if (Desk == NULL || Desk->Tag != SHDESK_TAG) - { - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - return SHDESK_MessageLoop(Desk); -} - -static const IShellBrowserVtbl SHDESK_Vtbl = -{ - /* IUnknown */ - SHDESK_QueryInterface, - SHDESK_AddRef, - SHDESK_Release, - /* IOleWindow */ - SHDESK_GetWindow, - SHDESK_ContextSensitiveHelp, - /* IShellBrowser */ - SHDESK_InsertMenusSB, - SHDESK_SetMenuSB, - SHDESK_RemoveMenusSB, - SHDESK_SetStatusTextSB, - SHDESK_EnableModelessSB, - SHDESK_TranslateAcceleratorSB, - SHDESK_BrowseObject, - SHDESK_GetViewStateStream, - SHDESK_GetControlWindow, - SHDESK_SendControlMsg, - SHDESK_QueryActiveShellView, - SHDESK_OnViewWindowActive, - SHDESK_SetToolbarItems -}; diff --git a/reactos/dll/win32/shell32/dialogs.c b/reactos/dll/win32/shell32/dialogs.c deleted file mode 100644 index 4ea9418bba6..00000000000 --- a/reactos/dll/win32/shell32/dialogs.c +++ /dev/null @@ -1,712 +0,0 @@ -/* - * 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 ; - LPCWSTR lpstrDirectory ; - LPCWSTR lpstrTitle ; - LPCWSTR lpstrDescription ; - UINT uFlags ; - } RUNFILEDLGPARAMS ; - -typedef BOOL (WINAPI * LPFNOFN) (OPENFILENAMEW *) ; - -WINE_DEFAULT_DEBUG_CHANNEL(shell); -static INT_PTR CALLBACK RunDlgProc (HWND, UINT, WPARAM, LPARAM) ; -static void FillList (HWND, char *, BOOL) ; - - -/************************************************************************* - * 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", 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, count; - 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); - - count = SendMessage(pIconContext->hDlgCtrl, LB_GETCOUNT, 0, 0); - if (count != LB_ERR) - { - if (count > pIconContext->Index) - SendMessageW(pIconContext->hDlgCtrl, LB_SETCURSEL, pIconContext->Index, 0); - else - SendMessageW(pIconContext->hDlgCtrl, LB_SETCURSEL, 0, 0); - } - return TRUE; - case WM_COMMAND: - switch(LOWORD(wParam)) - { - case IDOK: - index = SendMessageW(pIconContext->hDlgCtrl, LB_GETCURSEL, 0, 0); - pIconContext->Index = index; - 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 == -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 == 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 [internal] - * - * The Unicode function that is available as ordinal 61 on Windows NT/2000/XP/... - */ -void WINAPI RunFileDlg( - HWND hwndOwner, - HICON hIcon, - LPCWSTR lpstrDirectory, - LPCWSTR lpstrTitle, - LPCWSTR lpstrDescription, - UINT uFlags) -{ - static const WCHAR resnameW[] = {'S','H','E','L','L','_','R','U','N','_','D','L','G',0}; - RUNFILEDLGPARAMS rfdp; - HRSRC hRes; - LPVOID template; - TRACE("\n"); - - rfdp.hwndOwner = hwndOwner; - rfdp.hIcon = hIcon; - rfdp.lpstrDirectory = lpstrDirectory; - rfdp.lpstrTitle = lpstrTitle; - rfdp.lpstrDescription = lpstrDescription; - rfdp.uFlags = uFlags; - - if (!(hRes = FindResourceW(shell32_hInstance, resnameW, (LPWSTR)RT_DIALOG)) || - !(template = LoadResource(shell32_hInstance, hRes))) - { - ERR("Couldn't load SHELL_RUN_DLG resource\n"); - ShellMessageBoxW(shell32_hInstance, hwndOwner, MAKEINTRESOURCEW(IDS_RUNDLG_ERROR), NULL, MB_OK | MB_ICONERROR); - return; - } - - DialogBoxIndirectParamW(shell32_hInstance, - template, hwndOwner, RunDlgProc, (LPARAM)&rfdp); - -} - -/* find the directory that contains the file being run */ -static LPWSTR RunDlg_GetParentDir(LPCWSTR cmdline) -{ - const WCHAR *src; - WCHAR *dest, *result, *result_end=NULL; - static const WCHAR dotexeW[] = {'.','e','x','e',0}; - - result = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*(strlenW(cmdline)+5)); - - src = cmdline; - dest = result; - - if (*src == '"') - { - src++; - while (*src && *src != '"') - { - if (*src == '\\') - result_end = dest; - *dest++ = *src++; - } - } - else { - while (*src) - { - if (isspaceW(*src)) - { - *dest = 0; - if (INVALID_FILE_ATTRIBUTES != GetFileAttributesW(result)) - break; - strcatW(dest, dotexeW); - if (INVALID_FILE_ATTRIBUTES != GetFileAttributesW(result)) - break; - } - else if (*src == '\\') - result_end = dest; - *dest++ = *src++; - } - } - - if (result_end) - { - *result_end = 0; - return result; - } - else - { - HeapFree(GetProcessHeap(), 0, result); - return NULL; - } -} - -/* Dialog procedure for RunFileDlg */ -static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) - { - RUNFILEDLGPARAMS *prfdp = (RUNFILEDLGPARAMS *)GetWindowLongPtrW(hwnd, DWLP_USER); - - switch (message) - { - case WM_INITDIALOG : - prfdp = (RUNFILEDLGPARAMS *)lParam ; - SetWindowLongPtrW(hwnd, DWLP_USER, (LONG_PTR)prfdp); - - if (prfdp->lpstrTitle) - SetWindowTextW(hwnd, prfdp->lpstrTitle); - if (prfdp->lpstrDescription) - SetWindowTextW(GetDlgItem(hwnd, IDC_RUNDLG_DESCRIPTION), prfdp->lpstrDescription); - if (prfdp->uFlags & RFF_NOBROWSE) - { - HWND browse = GetDlgItem(hwnd, IDC_RUNDLG_BROWSE); - ShowWindow(browse, SW_HIDE); - EnableWindow(browse, FALSE); - } - if (prfdp->uFlags & RFF_NOLABEL) - ShowWindow(GetDlgItem(hwnd, IDC_RUNDLG_LABEL), SW_HIDE); - if (prfdp->uFlags & RFF_CALCDIRECTORY) - FIXME("RFF_CALCDIRECTORY not supported\n"); - - if (prfdp->hIcon == NULL) - prfdp->hIcon = LoadIconW(NULL, (LPCWSTR)IDI_WINLOGO); - SendMessageW(hwnd, WM_SETICON, ICON_BIG, (LPARAM)prfdp->hIcon); - SendMessageW(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)prfdp->hIcon); - SendMessageW(GetDlgItem(hwnd, IDC_RUNDLG_ICON), STM_SETICON, (WPARAM)prfdp->hIcon, 0); - - FillList (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH), NULL, (prfdp->uFlags & RFF_NODEFAULT) == 0) ; - SetFocus (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH)) ; - return TRUE ; - - case WM_COMMAND : - switch (LOWORD (wParam)) - { - case IDOK : - { - int ic ; - HWND htxt = GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH); - if ((ic = GetWindowTextLengthW (htxt))) - { - WCHAR *psz, *parent=NULL ; - SHELLEXECUTEINFOW sei ; - - ZeroMemory (&sei, sizeof(sei)) ; - sei.cbSize = sizeof(sei) ; - psz = HeapAlloc( GetProcessHeap(), 0, (ic + 1)*sizeof(WCHAR) ); - GetWindowTextW (htxt, psz, ic + 1) ; - - /* according to http://www.codeproject.com/KB/shell/runfiledlg.aspx we should send a - * WM_NOTIFY before execution */ - - sei.hwnd = hwnd; - sei.nShow = SW_SHOWNORMAL; - sei.lpFile = psz; - - if (prfdp->lpstrDirectory) - sei.lpDirectory = prfdp->lpstrDirectory; - else - sei.lpDirectory = parent = RunDlg_GetParentDir(sei.lpFile); - - if (!ShellExecuteExW( &sei )) - { - HeapFree(GetProcessHeap(), 0, psz); - HeapFree(GetProcessHeap(), 0, parent); - SendMessageA (htxt, CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; - return TRUE ; - } - - /* FillList is still ANSI */ - GetWindowTextA (htxt, (LPSTR)psz, ic + 1) ; - FillList (htxt, (LPSTR)psz, FALSE) ; - - HeapFree(GetProcessHeap(), 0, psz); - HeapFree(GetProcessHeap(), 0, parent); - EndDialog (hwnd, 0); - } - } - - case IDCANCEL : - EndDialog (hwnd, 0) ; - return TRUE ; - - case IDC_RUNDLG_BROWSE : - { - HMODULE hComdlg = NULL ; - LPFNOFN ofnProc = NULL ; - static const WCHAR comdlg32W[] = {'c','o','m','d','l','g','3','2',0}; - WCHAR szFName[1024] = {0}; - WCHAR filter[MAX_PATH], szCaption[MAX_PATH]; - OPENFILENAMEW ofn; - - LoadStringW(shell32_hInstance, IDS_RUNDLG_BROWSE_FILTER, filter, MAX_PATH); - LoadStringW(shell32_hInstance, IDS_RUNDLG_BROWSE_CAPTION, szCaption, MAX_PATH); - - ZeroMemory(&ofn, sizeof(ofn)); - ofn.lStructSize = sizeof(OPENFILENAMEW); - ofn.hwndOwner = hwnd; - ofn.lpstrFilter = filter; - ofn.lpstrFile = szFName; - ofn.nMaxFile = 1023; - ofn.lpstrTitle = szCaption; - ofn.Flags = OFN_ENABLESIZING | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST; - ofn.lpstrInitialDir = prfdp->lpstrDirectory; - - if (NULL == (hComdlg = LoadLibraryExW (comdlg32W, NULL, 0)) || - NULL == (ofnProc = (LPFNOFN)GetProcAddress (hComdlg, "GetOpenFileNameW"))) - { - ERR("Couldn't get GetOpenFileName function entry (lib=%p, proc=%p)\n", hComdlg, ofnProc); - ShellMessageBoxW(shell32_hInstance, hwnd, MAKEINTRESOURCEW(IDS_RUNDLG_BROWSE_ERROR), NULL, MB_OK | MB_ICONERROR); - return TRUE ; - } - - if (ofnProc(&ofn)) - { - SetFocus (GetDlgItem (hwnd, IDOK)) ; - SetWindowTextW (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH), szFName) ; - SendMessageW (GetDlgItem (hwnd, IDC_RUNDLG_EDITPATH), 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 */ -/* fShowDefault ignored if pszLatest != NULL */ -static void FillList (HWND hCb, char *pszLatest, BOOL fShowDefault) - { - 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 = 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 = 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 = HeapReAlloc(GetProcessHeap(), 0, pszCmd, icCmd) ; - else - pszCmd = 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 && fShowDefault) - { - 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 = HeapReAlloc(GetProcessHeap(), 0, pszList, ++icList) ; - else - pszList = 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] - */ - -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/reactos/dll/win32/shell32/dragdrophelper.c b/reactos/dll/win32/shell32/dragdrophelper.c deleted file mode 100644 index ebd39a3be37..00000000000 --- a/reactos/dll/win32/shell32/dragdrophelper.c +++ /dev/null @@ -1,168 +0,0 @@ -/* - * 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 - -WINE_DEFAULT_DEBUG_CHANNEL (shell); - -/*********************************************************************** -* IDropTargetHelper implementation -*/ - -typedef struct { - const IDropTargetHelperVtbl *lpVtbl; - LONG ref; -} IDropTargetHelperImpl; - -static const IDropTargetHelperVtbl vt_IDropTargetHelper; - -#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) -#define _IDropTargetHelper_(This) (IDropTargetHelper*)&(This->lpVtbl) - -/************************************************************************** -* IDropTargetHelper_Constructor -*/ -HRESULT WINAPI IDropTargetHelper_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) -{ - IDropTargetHelperImpl *dth; - - TRACE ("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid (riid)); - - if (!ppv) - return E_POINTER; - if (pUnkOuter) - return CLASS_E_NOAGGREGATION; - - dth = (IDropTargetHelperImpl *) LocalAlloc (LMEM_ZEROINIT, sizeof (IDropTargetHelperImpl)); - if (!dth) return E_OUTOFMEMORY; - - dth->ref = 0; - dth->lpVtbl = &vt_IDropTargetHelper; - - if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (dth), riid, ppv))) { - IUnknown_Release (_IUnknown_ (dth)); - return E_NOINTERFACE; - } - - TRACE ("--(%p)\n", dth); - return S_OK; -} - -/************************************************************************** - * IDropTargetHelper_fnQueryInterface - */ -static HRESULT WINAPI IDropTargetHelper_fnQueryInterface (IDropTargetHelper * iface, REFIID riid, LPVOID * ppvObj) -{ - IDropTargetHelperImpl *This = (IDropTargetHelperImpl *)iface; - - TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); - - *ppvObj = NULL; - - if (IsEqualIID (riid, &IID_IUnknown) || IsEqualIID (riid, &IID_IDropTargetHelper)) { - *ppvObj = This; - } - - if (*ppvObj) { - IUnknown_AddRef ((IUnknown *) (*ppvObj)); - TRACE ("-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj); - return S_OK; - } - FIXME ("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI IDropTargetHelper_fnAddRef (IDropTargetHelper * iface) -{ - IDropTargetHelperImpl *This = (IDropTargetHelperImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE ("(%p)->(count=%u)\n", This, refCount - 1); - - return refCount; -} - -static ULONG WINAPI IDropTargetHelper_fnRelease (IDropTargetHelper * iface) -{ - IDropTargetHelperImpl *This = (IDropTargetHelperImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE ("(%p)->(count=%u)\n", This, refCount + 1); - - if (!refCount) { - TRACE("-- destroying (%p)\n", This); - LocalFree ((HLOCAL) This); - return 0; - } - return refCount; -} - -static HRESULT WINAPI IDropTargetHelper_fnDragEnter ( - IDropTargetHelper * iface, - HWND hwndTarget, - IDataObject* pDataObject, - POINT* ppt, - DWORD dwEffect) -{ - IDropTargetHelperImpl *This = (IDropTargetHelperImpl *)iface; - FIXME ("(%p)->(%p %p %p 0x%08x)\n", This,hwndTarget, pDataObject, ppt, dwEffect); - return E_NOTIMPL; -} - -static HRESULT WINAPI IDropTargetHelper_fnDragLeave (IDropTargetHelper * iface) -{ - IDropTargetHelperImpl *This = (IDropTargetHelperImpl *)iface; - FIXME ("(%p)->()\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI IDropTargetHelper_fnDragOver (IDropTargetHelper * iface, POINT* ppt, DWORD dwEffect) -{ - IDropTargetHelperImpl *This = (IDropTargetHelperImpl *)iface; - FIXME ("(%p)->(%p 0x%08x)\n", This, ppt, dwEffect); - return E_NOTIMPL; -} - -static HRESULT WINAPI IDropTargetHelper_fnDrop (IDropTargetHelper * iface, IDataObject* pDataObject, POINT* ppt, DWORD dwEffect) -{ - IDropTargetHelperImpl *This = (IDropTargetHelperImpl *)iface; - FIXME ("(%p)->(%p %p 0x%08x)\n", This, pDataObject, ppt, dwEffect); - return E_NOTIMPL; -} - -static HRESULT WINAPI IDropTargetHelper_fnShow (IDropTargetHelper * iface, BOOL fShow) -{ - IDropTargetHelperImpl *This = (IDropTargetHelperImpl *)iface; - FIXME ("(%p)->(%u)\n", This, fShow); - return E_NOTIMPL; -} - -static const IDropTargetHelperVtbl vt_IDropTargetHelper = -{ - IDropTargetHelper_fnQueryInterface, - IDropTargetHelper_fnAddRef, - IDropTargetHelper_fnRelease, - IDropTargetHelper_fnDragEnter, - IDropTargetHelper_fnDragLeave, - IDropTargetHelper_fnDragOver, - IDropTargetHelper_fnDrop, - IDropTargetHelper_fnShow -}; diff --git a/reactos/dll/win32/shell32/drive.c b/reactos/dll/win32/shell32/drive.c deleted file mode 100644 index 240739c6c73..00000000000 --- a/reactos/dll/win32/shell32/drive.c +++ /dev/null @@ -1,1290 +0,0 @@ -/* - * 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); -HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY hKey, LPCWSTR pszSubKey, UINT max_iface, IDataObject *pDataObj); -HWND WINAPI -DeviceCreateHardwarePageEx(HWND hWndParent, - LPGUID lpGuids, - UINT uNumberOfGuids, - HWPAGE_DISPLAYMODE DisplayMode); - -HPROPSHEETPAGE SH_CreatePropertySheetPage(LPSTR 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; - 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(TotalNumberOfBytes.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, TotalNumberOfBytes.QuadPart, BytesReturned); - - 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]), - 0); - break; - } - - return FALSE; -} - -static -const -struct -{ - LPSTR 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->u3.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; - IDataObject * pDataObj = NULL; - UINT DriveType; - - ZeroMemory(&psh, sizeof(PROPSHEETHEADERW)); - psh.dwSize = sizeof(PROPSHEETHEADERW); - //psh.dwFlags = PSH_USECALLBACK | PSH_PROPTITLE; - psh.hwndParent = NULL; - psh.u2.nStartPage = 0; - psh.u3.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 (pDataObj) - IDataObject_Release(pDataObj); - - 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 (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 (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 (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 (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/reactos/dll/win32/shell32/enumidlist.c b/reactos/dll/win32/shell32/enumidlist.c deleted file mode 100644 index 22daeaf1720..00000000000 --- a/reactos/dll/win32/shell32/enumidlist.c +++ /dev/null @@ -1,388 +0,0 @@ -/* - * 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 - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -typedef struct tagENUMLIST -{ - struct tagENUMLIST *pNext; - LPITEMIDLIST pidl; - -} ENUMLIST, *LPENUMLIST; - -typedef struct -{ - const IEnumIDListVtbl *lpVtbl; - LONG ref; - LPENUMLIST mpFirst; - LPENUMLIST mpLast; - LPENUMLIST mpCurrent; - -} IEnumIDListImpl; - -static const IEnumIDListVtbl eidlvt; - -/************************************************************************** - * AddToEnumList() - */ -BOOL AddToEnumList( - IEnumIDList * iface, - LPITEMIDLIST pidl) -{ - IEnumIDListImpl *This = (IEnumIDListImpl *)iface; - - LPENUMLIST pNew; - - TRACE("(%p)->(pidl=%p)\n",This,pidl); - - if (!iface || !pidl) - return FALSE; - - pNew = (LPENUMLIST)SHAlloc(sizeof(ENUMLIST)); - if(pNew) - { - /*set the next pointer */ - pNew->pNext = NULL; - pNew->pidl = pidl; - - /*is This the first item in the list? */ - if(!This->mpFirst) - { - This->mpFirst = pNew; - This->mpCurrent = pNew; - } - - if(This->mpLast) - { - /*add the new item to the end of the list */ - This->mpLast->pNext = pNew; - } - - /*update the last item pointer */ - This->mpLast = pNew; - TRACE("-- (%p)->(first=%p, last=%p)\n",This,This->mpFirst,This->mpLast); - return TRUE; - } - return FALSE; -} -/************************************************************************** - * HasItemWithCLSID() - */ -BOOL HasItemWithCLSID(IEnumIDList *iface, LPITEMIDLIST pidl) -{ - IEnumIDListImpl *This = (IEnumIDListImpl *)iface; - LPENUMLIST pCur; - REFIID refid = _ILGetGUIDPointer(pidl); - - pCur = This->mpFirst; - - while(pCur) - { - LPGUID curid = _ILGetGUIDPointer(pCur->pidl); - if (curid && IsEqualGUID(curid, refid)) - { - return TRUE; - } - pCur = pCur->pNext; - } - return FALSE; -} - - -/************************************************************************** - * CreateFolderEnumList() - */ -BOOL CreateFolderEnumList( - IEnumIDList *list, - 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", list, 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(list, pidl); - } - else if (!(stffile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) - && dwFlags & SHCONTF_NONFOLDERS) - { - pidl = _ILCreateFromFindDataW(&stffile); - succeeded = succeeded && AddToEnumList(list, 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; -} - -/************************************************************************** -* DeleteList() -*/ -static BOOL DeleteList( - IEnumIDList * iface) -{ - IEnumIDListImpl *This = (IEnumIDListImpl *)iface; - - LPENUMLIST pDelete; - - TRACE("(%p)->()\n",This); - - while(This->mpFirst) - { pDelete = This->mpFirst; - This->mpFirst = pDelete->pNext; - SHFree(pDelete->pidl); - SHFree(pDelete); - } - This->mpFirst = This->mpLast = This->mpCurrent = NULL; - return TRUE; -} - -/************************************************************************** - * IEnumIDList_Folder_Constructor - * - */ - -IEnumIDList * IEnumIDList_Constructor(void) -{ - IEnumIDListImpl *lpeidl = HeapAlloc(GetProcessHeap(), - HEAP_ZERO_MEMORY, sizeof(IEnumIDListImpl)); - - if (lpeidl) - { - lpeidl->ref = 1; - lpeidl->lpVtbl = &eidlvt; - } - TRACE("-- (%p)->()\n",lpeidl); - - return (IEnumIDList*)lpeidl; -} - -/************************************************************************** - * EnumIDList_QueryInterface - */ -static HRESULT WINAPI IEnumIDList_fnQueryInterface( - IEnumIDList * iface, - REFIID riid, - LPVOID *ppvObj) -{ - IEnumIDListImpl *This = (IEnumIDListImpl *)iface; - - TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); - - *ppvObj = NULL; - - if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/ - { *ppvObj = This; - } - else if(IsEqualIID(riid, &IID_IEnumIDList)) /*IEnumIDList*/ - { *ppvObj = (IEnumIDList*)This; - } - - if(*ppvObj) - { IEnumIDList_AddRef((IEnumIDList*)*ppvObj); - TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); - return S_OK; - } - - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -/****************************************************************************** - * IEnumIDList_fnAddRef - */ -static ULONG WINAPI IEnumIDList_fnAddRef( - IEnumIDList * iface) -{ - IEnumIDListImpl *This = (IEnumIDListImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE("(%p)->(%u)\n", This, refCount - 1); - - return refCount; -} -/****************************************************************************** - * IEnumIDList_fnRelease - */ -static ULONG WINAPI IEnumIDList_fnRelease( - IEnumIDList * iface) -{ - IEnumIDListImpl *This = (IEnumIDListImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE("(%p)->(%u)\n", This, refCount + 1); - - if (!refCount) { - TRACE(" destroying IEnumIDList(%p)\n",This); - DeleteList((IEnumIDList*)This); - HeapFree(GetProcessHeap(),0,This); - } - return refCount; -} - -/************************************************************************** - * IEnumIDList_fnNext - */ - -static HRESULT WINAPI IEnumIDList_fnNext( - IEnumIDList * iface, - ULONG celt, - LPITEMIDLIST * rgelt, - ULONG *pceltFetched) -{ - IEnumIDListImpl *This = (IEnumIDListImpl *)iface; - - 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 && !This->mpCurrent) - { return S_FALSE; - } - - for(i = 0; i < celt; i++) - { if(!(This->mpCurrent)) - break; - - temp = ILClone(This->mpCurrent->pidl); - rgelt[i] = temp; - This->mpCurrent = This->mpCurrent->pNext; - } - if(pceltFetched) - { *pceltFetched = i; - } - - return hr; -} - -/************************************************************************** -* IEnumIDList_fnSkip -*/ -static HRESULT WINAPI IEnumIDList_fnSkip( - IEnumIDList * iface,ULONG celt) -{ - IEnumIDListImpl *This = (IEnumIDListImpl *)iface; - - DWORD dwIndex; - HRESULT hr = S_OK; - - TRACE("(%p)->(%u)\n",This,celt); - - for(dwIndex = 0; dwIndex < celt; dwIndex++) - { if(!This->mpCurrent) - { hr = S_FALSE; - break; - } - This->mpCurrent = This->mpCurrent->pNext; - } - return hr; -} -/************************************************************************** -* IEnumIDList_fnReset -*/ -static HRESULT WINAPI IEnumIDList_fnReset( - IEnumIDList * iface) -{ - IEnumIDListImpl *This = (IEnumIDListImpl *)iface; - - TRACE("(%p)\n",This); - This->mpCurrent = This->mpFirst; - return S_OK; -} -/************************************************************************** -* IEnumIDList_fnClone -*/ -static HRESULT WINAPI IEnumIDList_fnClone( - IEnumIDList * iface,LPENUMIDLIST * ppenum) -{ - IEnumIDListImpl *This = (IEnumIDListImpl *)iface; - - TRACE("(%p)->() to (%p)->() E_NOTIMPL\n",This,ppenum); - return E_NOTIMPL; -} - -/************************************************************************** - * IEnumIDList_fnVTable - */ -static const IEnumIDListVtbl eidlvt = -{ - IEnumIDList_fnQueryInterface, - IEnumIDList_fnAddRef, - IEnumIDList_fnRelease, - IEnumIDList_fnNext, - IEnumIDList_fnSkip, - IEnumIDList_fnReset, - IEnumIDList_fnClone, -}; diff --git a/reactos/dll/win32/shell32/extracticon.c b/reactos/dll/win32/shell32/extracticon.c deleted file mode 100644 index 576d46195b2..00000000000 --- a/reactos/dll/win32/shell32/extracticon.c +++ /dev/null @@ -1,546 +0,0 @@ -/* - * 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 - -#define CONST_VTABLE - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -struct IconLocation -{ - LPWSTR file; - UINT index; -}; - -struct IconExtraction -{ - LONG ref; - IDefaultExtractIconInit defaultExtractIconInitImpl; - IExtractIconW extractIconWImpl; - IExtractIconA extractIconAImpl; - IPersistFile persistFileImpl; - - UINT flags; - struct IconLocation defaultIcon; - struct IconLocation normalIcon; - struct IconLocation openIcon; - struct IconLocation shortcutIcon; -}; - -static VOID -DuplicateString( - LPCWSTR Source, - LPWSTR *Destination) -{ - SIZE_T cb; - - if (*Destination) - CoTaskMemFree(*Destination); - - cb = (wcslen(Source) + 1) * sizeof(WCHAR); - *Destination = CoTaskMemAlloc(cb); - if (!*Destination) - return; - CopyMemory(*Destination, Source, cb); -} - -static HRESULT STDMETHODCALLTYPE -IconExtraction_DefaultExtractIconInit_QueryInterface( - IDefaultExtractIconInit *This, - REFIID riid, - void **ppvObject) -{ - struct IconExtraction *s = CONTAINING_RECORD(This, struct IconExtraction, defaultExtractIconInitImpl); - - TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppvObject); - - if (!ppvObject) - return E_POINTER; - - if (IsEqualIID(riid, &IID_IUnknown)) - *ppvObject = &s->defaultExtractIconInitImpl; - else if (IsEqualIID(riid, &IID_IDefaultExtractIconInit)) - *ppvObject = &s->defaultExtractIconInitImpl; - else if (IsEqualIID(riid, &IID_IExtractIconW)) - *ppvObject = &s->extractIconWImpl; - else if (IsEqualIID(riid, &IID_IExtractIconA)) - *ppvObject = &s->extractIconAImpl; - else if (IsEqualIID(riid, &IID_IPersist)) - *ppvObject = &s->persistFileImpl; - else if (IsEqualIID(riid, &IID_IPersistFile)) - *ppvObject = &s->persistFileImpl; - else - { - *ppvObject = NULL; - return E_NOINTERFACE; - } - - IUnknown_AddRef(This); - return S_OK; -} - -static ULONG STDMETHODCALLTYPE -IconExtraction_DefaultExtractIconInit_AddRef( - IDefaultExtractIconInit *This) -{ - struct IconExtraction *s = CONTAINING_RECORD(This, struct IconExtraction, defaultExtractIconInitImpl); - ULONG refCount = InterlockedIncrement(&s->ref); - TRACE("(%p)\n", This); - return refCount; -} - -static ULONG STDMETHODCALLTYPE -IconExtraction_DefaultExtractIconInit_Release( - IDefaultExtractIconInit *This) -{ - struct IconExtraction *s = CONTAINING_RECORD(This, struct IconExtraction, defaultExtractIconInitImpl); - ULONG refCount; - - TRACE("(%p)\n", This); - - refCount = InterlockedDecrement(&s->ref); - if (refCount == 0) - { - if (s->defaultIcon.file) CoTaskMemFree(s->defaultIcon.file); - if (s->normalIcon.file) CoTaskMemFree(s->normalIcon.file); - if (s->openIcon.file) CoTaskMemFree(s->openIcon.file); - if (s->shortcutIcon.file) CoTaskMemFree(s->shortcutIcon.file); - CoTaskMemFree(s); - } - - return refCount; -} - -static HRESULT STDMETHODCALLTYPE -IconExtraction_DefaultExtractIconInit_SetDefaultIcon( - IDefaultExtractIconInit *This, - LPCWSTR pszFile, - int iIcon) -{ - struct IconExtraction *s = CONTAINING_RECORD(This, struct IconExtraction, defaultExtractIconInitImpl); - - TRACE("(%p, %s, %d)\n", This, debugstr_w(pszFile), iIcon); - - DuplicateString(pszFile, &s->defaultIcon.file); - if (!s->defaultIcon.file) - return E_OUTOFMEMORY; - s->defaultIcon.index = iIcon; - return S_OK; -} - -static HRESULT STDMETHODCALLTYPE -IconExtraction_DefaultExtractIconInit_SetFlags( - IDefaultExtractIconInit *This, - UINT uFlags) -{ - struct IconExtraction *s = CONTAINING_RECORD(This, struct IconExtraction, defaultExtractIconInitImpl); - - TRACE("(%p, 0x%x)\n", This, uFlags); - - s->flags = uFlags; - return S_OK; -} - -static HRESULT STDMETHODCALLTYPE -IconExtraction_DefaultExtractIconInit_SetKey( - IDefaultExtractIconInit *This, - HKEY hkey) -{ - FIXME("(%p, %p)\n", This, hkey); - UNIMPLEMENTED; - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE -IconExtraction_DefaultExtractIconInit_SetNormalIcon( - IDefaultExtractIconInit *This, - LPCWSTR pszFile, - int iIcon) -{ - struct IconExtraction *s = CONTAINING_RECORD(This, struct IconExtraction, defaultExtractIconInitImpl); - - TRACE("(%p, %s, %d)\n", This, debugstr_w(pszFile), iIcon); - - DuplicateString(pszFile, &s->normalIcon.file); - if (!s->normalIcon.file) - return E_OUTOFMEMORY; - s->normalIcon.index = iIcon; - return S_OK; -} - -static HRESULT STDMETHODCALLTYPE -IconExtraction_DefaultExtractIconInit_SetOpenIcon( - IDefaultExtractIconInit *This, - LPCWSTR pszFile, - int iIcon) -{ - struct IconExtraction *s = CONTAINING_RECORD(This, struct IconExtraction, defaultExtractIconInitImpl); - - TRACE("(%p, %s, %d)\n", This, debugstr_w(pszFile), iIcon); - - DuplicateString(pszFile, &s->openIcon.file); - if (!s->openIcon.file) - return E_OUTOFMEMORY; - s->openIcon.index = iIcon; - return S_OK; -} - -static HRESULT STDMETHODCALLTYPE -IconExtraction_DefaultExtractIconInit_SetShortcutIcon( - IDefaultExtractIconInit *This, - LPCWSTR pszFile, - int iIcon) -{ - struct IconExtraction *s = CONTAINING_RECORD(This, struct IconExtraction, defaultExtractIconInitImpl); - - TRACE("(%p, %s, %d)\n", This, debugstr_w(pszFile), iIcon); - - DuplicateString(pszFile, &s->shortcutIcon.file); - if (!s->shortcutIcon.file) - return E_OUTOFMEMORY; - s->shortcutIcon.index = iIcon; - return S_OK; -} - -static HRESULT STDMETHODCALLTYPE -IconExtraction_ExtractIconW_QueryInterface( - IExtractIconW *This, - REFIID riid, - void **ppvObject) -{ - struct IconExtraction *s = CONTAINING_RECORD(This, struct IconExtraction, extractIconWImpl); - return IconExtraction_DefaultExtractIconInit_QueryInterface(&s->defaultExtractIconInitImpl, riid, ppvObject); -} - -static ULONG STDMETHODCALLTYPE -IconExtraction_ExtractIconW_AddRef( - IExtractIconW *This) -{ - struct IconExtraction *s = CONTAINING_RECORD(This, struct IconExtraction, extractIconWImpl); - return IconExtraction_DefaultExtractIconInit_AddRef(&s->defaultExtractIconInitImpl); -} - -static ULONG STDMETHODCALLTYPE -IconExtraction_ExtractIconW_Release( - IExtractIconW *This) -{ - struct IconExtraction *s = CONTAINING_RECORD(This, struct IconExtraction, extractIconWImpl); - return IconExtraction_DefaultExtractIconInit_Release(&s->defaultExtractIconInitImpl); -} - -static HRESULT STDMETHODCALLTYPE -IconExtraction_ExtractIconW_GetIconLocation( - IExtractIconW *This, - UINT uFlags, - LPWSTR szIconFile, - UINT cchMax, - int *piIndex, - UINT *pwFlags) -{ - struct IconExtraction *s = CONTAINING_RECORD(This, struct IconExtraction, extractIconWImpl); - 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 = s->defaultIcon.file ? &s->defaultIcon : &s->normalIcon; - else if (uFlags & GIL_FORSHORTCUT) - icon = s->shortcutIcon.file ? &s->shortcutIcon : &s->normalIcon; - else if (uFlags & GIL_OPENICON) - icon = s->openIcon.file ? &s->openIcon : &s->normalIcon; - else - icon = &s->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 = s->flags; - return S_OK; -} - -static HRESULT STDMETHODCALLTYPE -IconExtraction_ExtractIconW_Extract( - IExtractIconW *This, - 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; -} - -static HRESULT STDMETHODCALLTYPE -IconExtraction_ExtractIconA_QueryInterface( - IExtractIconA *This, - REFIID riid, - void **ppvObject) -{ - struct IconExtraction *s = CONTAINING_RECORD(This, struct IconExtraction, extractIconAImpl); - return IconExtraction_DefaultExtractIconInit_QueryInterface(&s->defaultExtractIconInitImpl, riid, ppvObject); -} - -static ULONG STDMETHODCALLTYPE -IconExtraction_ExtractIconA_AddRef( - IExtractIconA *This) -{ - struct IconExtraction *s = CONTAINING_RECORD(This, struct IconExtraction, extractIconAImpl); - return IconExtraction_DefaultExtractIconInit_AddRef(&s->defaultExtractIconInitImpl); -} - -static ULONG STDMETHODCALLTYPE -IconExtraction_ExtractIconA_Release( - IExtractIconA *This) -{ - struct IconExtraction *s = CONTAINING_RECORD(This, struct IconExtraction, extractIconAImpl); - return IconExtraction_DefaultExtractIconInit_Release(&s->defaultExtractIconInitImpl); -} - -static HRESULT STDMETHODCALLTYPE -IconExtraction_ExtractIconA_GetIconLocation( - IExtractIconA *This, - UINT uFlags, - LPSTR szIconFile, - UINT cchMax, - int *piIndex, - UINT *pwFlags) -{ - struct IconExtraction *s = CONTAINING_RECORD(This, struct IconExtraction, extractIconAImpl); - LPWSTR szIconFileW = NULL; - HRESULT hr; - - if (cchMax > 0) - { - szIconFileW = CoTaskMemAlloc(cchMax * sizeof(WCHAR)); - if (!szIconFileW) - return E_OUTOFMEMORY; - } - - hr = IconExtraction_ExtractIconW_GetIconLocation( - &s->extractIconWImpl, 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; -} - -static HRESULT STDMETHODCALLTYPE -IconExtraction_ExtractIconA_Extract( - IExtractIconA *This, - LPCSTR pszFile, - UINT nIconIndex, - HICON *phiconLarge, - HICON *phiconSmall, - UINT nIconSize) -{ - struct IconExtraction *s = CONTAINING_RECORD(This, struct IconExtraction, extractIconAImpl); - 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 = CoTaskMemAlloc(nLength * sizeof(WCHAR)); - if (!pszFileW) - return E_OUTOFMEMORY; - if (!MultiByteToWideChar(CP_ACP, 0, pszFile, nLength, pszFileW, nLength)) - { - CoTaskMemFree(pszFileW); - return E_FAIL; - } - } - - hr = IconExtraction_ExtractIconW_Extract( - &s->extractIconWImpl, pszFileW, nIconIndex, phiconLarge, phiconSmall, nIconSize); - - if (pszFileW) - CoTaskMemFree(pszFileW); - return hr; -} - -static HRESULT STDMETHODCALLTYPE -IconExtraction_PersistFile_QueryInterface( - IPersistFile *This, - REFIID riid, - void **ppvObject) -{ - struct IconExtraction *s = CONTAINING_RECORD(This, struct IconExtraction, persistFileImpl); - return IconExtraction_DefaultExtractIconInit_QueryInterface(&s->defaultExtractIconInitImpl, riid, ppvObject); -} - -static ULONG STDMETHODCALLTYPE -IconExtraction_PersistFile_AddRef( - IPersistFile *This) -{ - struct IconExtraction *s = CONTAINING_RECORD(This, struct IconExtraction, persistFileImpl); - return IconExtraction_DefaultExtractIconInit_AddRef(&s->defaultExtractIconInitImpl); -} - -static ULONG STDMETHODCALLTYPE -IconExtraction_PersistFile_Release( - IPersistFile *This) -{ - struct IconExtraction *s = CONTAINING_RECORD(This, struct IconExtraction, persistFileImpl); - return IconExtraction_DefaultExtractIconInit_Release(&s->defaultExtractIconInitImpl); -} - -static HRESULT STDMETHODCALLTYPE -IconExtraction_PersistFile_GetClassID( - IPersistFile *This, - CLSID *pClassID) -{ - TRACE("(%p, %p)\n", This, pClassID); - - if (!pClassID) - return E_POINTER; - - *pClassID = GUID_NULL; - return S_OK; -} - -static HRESULT STDMETHODCALLTYPE -IconExtraction_PersistFile_IsDirty( - IPersistFile *This) -{ - FIXME("(%p)\n", This); - UNIMPLEMENTED; - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE -IconExtraction_PersistFile_Load( - IPersistFile *This, - LPCOLESTR pszFileName, - DWORD dwMode) -{ - FIXME("(%p, %s, %u)\n", This, debugstr_w(pszFileName), dwMode); - UNIMPLEMENTED; - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE -IconExtraction_PersistFile_Save( - IPersistFile *This, - LPCOLESTR pszFileName, - BOOL fRemember) -{ - FIXME("(%p, %s, %d)\n", This, debugstr_w(pszFileName), fRemember); - UNIMPLEMENTED; - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE -IconExtraction_PersistFile_SaveCompleted( - IPersistFile *This, - LPCOLESTR pszFileName) -{ - FIXME("(%p, %s)\n", This, debugstr_w(pszFileName)); - UNIMPLEMENTED; - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE -IconExtraction_PersistFile_GetCurFile( - IPersistFile *This, - LPOLESTR *ppszFileName) -{ - FIXME("(%p, %p)\n", This, ppszFileName); - UNIMPLEMENTED; - return E_NOTIMPL; -} - -static const IDefaultExtractIconInitVtbl IconExtractionDefaultExtractIconInitVtbl = -{ - IconExtraction_DefaultExtractIconInit_QueryInterface, - IconExtraction_DefaultExtractIconInit_AddRef, - IconExtraction_DefaultExtractIconInit_Release, - IconExtraction_DefaultExtractIconInit_SetDefaultIcon, - IconExtraction_DefaultExtractIconInit_SetFlags, - IconExtraction_DefaultExtractIconInit_SetKey, - IconExtraction_DefaultExtractIconInit_SetNormalIcon, - IconExtraction_DefaultExtractIconInit_SetOpenIcon, - IconExtraction_DefaultExtractIconInit_SetShortcutIcon, -}; - -static const IExtractIconWVtbl IconExtractionExtractIconWVtbl = -{ - IconExtraction_ExtractIconW_QueryInterface, - IconExtraction_ExtractIconW_AddRef, - IconExtraction_ExtractIconW_Release, - IconExtraction_ExtractIconW_GetIconLocation, - IconExtraction_ExtractIconW_Extract, -}; - -static const IExtractIconAVtbl IconExtractionExtractIconAVtbl = -{ - IconExtraction_ExtractIconA_QueryInterface, - IconExtraction_ExtractIconA_AddRef, - IconExtraction_ExtractIconA_Release, - IconExtraction_ExtractIconA_GetIconLocation, - IconExtraction_ExtractIconA_Extract, -}; - -static const IPersistFileVtbl IconExtractionPersistFileVtbl = -{ - IconExtraction_PersistFile_QueryInterface, - IconExtraction_PersistFile_AddRef, - IconExtraction_PersistFile_Release, - IconExtraction_PersistFile_GetClassID, - IconExtraction_PersistFile_IsDirty, - IconExtraction_PersistFile_Load, - IconExtraction_PersistFile_Save, - IconExtraction_PersistFile_SaveCompleted, - IconExtraction_PersistFile_GetCurFile, -}; - -HRESULT WINAPI -SHCreateDefaultExtractIcon( - REFIID riid, - void **ppv) -{ - struct IconExtraction *s; - - if (!ppv) - return E_POINTER; - - *ppv = NULL; - - s = CoTaskMemAlloc(sizeof(struct IconExtraction)); - if (!s) - return E_OUTOFMEMORY; - memset(s, 0, sizeof(struct IconExtraction)); - s->defaultExtractIconInitImpl.lpVtbl = (IDefaultExtractIconInitVtbl*)&IconExtractionDefaultExtractIconInitVtbl; - s->extractIconAImpl.lpVtbl = (IExtractIconAVtbl*)&IconExtractionExtractIconAVtbl; - s->extractIconWImpl.lpVtbl = (IExtractIconWVtbl*)&IconExtractionExtractIconWVtbl; - s->persistFileImpl.lpVtbl = (IPersistFileVtbl*)&IconExtractionPersistFileVtbl; - s->ref = 1; - *ppv = &s->defaultExtractIconInitImpl; - - return S_OK; -} diff --git a/reactos/dll/win32/shell32/folder_options.c b/reactos/dll/win32/shell32/folder_options.c deleted file mode 100644 index 3d72018dbd3..00000000000 --- a/reactos/dll/win32/shell32/folder_options.c +++ /dev/null @@ -1,829 +0,0 @@ -/* - * 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} - -}; -*/ - -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[255], FormatBuffer[255]; - 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); - - 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; - } - - 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.u3.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.@) - */ -VOID WINAPI Options_RunDLL(HWND hWnd, HINSTANCE hInst, LPCSTR cmd, DWORD nCmdShow) -{ - Options_RunDLLCommon(hWnd, hInst, StrToIntA(cmd), nCmdShow); -} -/************************************************************************* - * Options_RunDLLA (SHELL32.@) - */ -VOID WINAPI Options_RunDLLA(HWND hWnd, HINSTANCE hInst, LPCSTR cmd, DWORD nCmdShow) -{ - Options_RunDLLCommon(hWnd, hInst, StrToIntA(cmd), nCmdShow); -} - -/************************************************************************* - * Options_RunDLLW (SHELL32.@) - */ -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 = 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->u3.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; - IDataObject * pDataObj = NULL; - - 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.u3.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 (pDataObj) - IDataObject_Release(pDataObj); - - if (hpsx) - SHDestroyPropSheetExtArray(hpsx); - - if (ret < 0) - return FALSE; - else - return TRUE; -} - - diff --git a/reactos/dll/win32/shell32/folders.c b/reactos/dll/win32/shell32/folders.c deleted file mode 100644 index d1a6c672b51..00000000000 --- a/reactos/dll/win32/shell32/folders.c +++ /dev/null @@ -1,387 +0,0 @@ -/* - * 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 = 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]->lpVtbl->IsMemberOf(Handlers[Index], szPath, SFGAO_FILESYSTEM); - if (hResult == S_OK) - { - hResult = Handlers[Index]->lpVtbl->GetPriority(Handlers[Index], &Priority); - if (hResult == S_OK) - { - if (Priority < HighestPriority) - { - HighestPriority = Priority; - IconIndex = Index; - } - } - } - } - - if (IconIndex == NumIconOverlayHandlers) - return FALSE; - - hResult = Handlers[IconIndex]->lpVtbl->GetOverlayInfo(Handlers[IconIndex], wTemp, MAX_PATH, pIndex, &Flags); - - if (hResult == S_OK) - return TRUE; - else - return FALSE; -} - -/************************************************************************** -* IExtractIconW_Constructor -*/ -IExtractIconW* IExtractIconW_Constructor(LPCITEMIDLIST pidl) -{ - IDefaultExtractIconInit *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 (!SUCCEEDED(hr)) - return NULL; - - hr = IDefaultExtractIconInit_QueryInterface(initIcon, &IID_IExtractIconW, (void **)&extractIcon); - IDefaultExtractIconInit_Release(initIcon); - if (!SUCCEEDED(hr)) - return NULL; - - if (_ILIsDesktop(pSimplePidl)) - { - IDefaultExtractIconInit_SetNormalIcon(initIcon, 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)) - { - IDefaultExtractIconInit_SetNormalIcon(initIcon, wTemp, icon_idx); - } - else - { - if (IsEqualGUID(riid, &CLSID_MyComputer)) - IDefaultExtractIconInit_SetNormalIcon(initIcon, swShell32Name, -IDI_SHELL_MY_COMPUTER); - else if (IsEqualGUID(riid, &CLSID_MyDocuments)) - IDefaultExtractIconInit_SetNormalIcon(initIcon, swShell32Name, -IDI_SHELL_MY_DOCUMENTS); - else if (IsEqualGUID(riid, &CLSID_NetworkPlaces)) - IDefaultExtractIconInit_SetNormalIcon(initIcon, swShell32Name, -IDI_SHELL_MY_NETWORK_PLACES); - else if (IsEqualGUID(riid, &CLSID_UnixFolder) || - IsEqualGUID(riid, &CLSID_UnixDosFolder)) - IDefaultExtractIconInit_SetNormalIcon(initIcon, swShell32Name, -IDI_SHELL_DRIVE); - else - IDefaultExtractIconInit_SetNormalIcon(initIcon, 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) - { - IDefaultExtractIconInit_SetNormalIcon(initIcon, swShell32Name, -icon_idx); - } - else - { - if (HCR_GetDefaultIconW(drive, wTemp, MAX_PATH, &icon_idx)) - IDefaultExtractIconInit_SetNormalIcon(initIcon, wTemp, icon_idx); - else - IDefaultExtractIconInit_SetNormalIcon(initIcon, swShell32Name, -IDI_SHELL_DRIVE); - } - } - - else if (_ILIsFolder (pSimplePidl)) - { - if (SUCCEEDED(getIconLocationForFolder( - pidl, 0, wTemp, MAX_PATH, - &icon_idx, - &flags))) - { - IDefaultExtractIconInit_SetNormalIcon(initIcon, wTemp, icon_idx); - } - if (SUCCEEDED(getIconLocationForFolder( - pidl, GIL_DEFAULTICON, wTemp, MAX_PATH, - &icon_idx, - &flags))) - { - IDefaultExtractIconInit_SetDefaultIcon(initIcon, wTemp, icon_idx); - } - if (SUCCEEDED(getIconLocationForFolder( - pidl, GIL_FORSHORTCUT, wTemp, MAX_PATH, - &icon_idx, - &flags))) - { - IDefaultExtractIconInit_SetShortcutIcon(initIcon, wTemp, icon_idx); - } - if (SUCCEEDED(getIconLocationForFolder( - pidl, GIL_OPENICON, wTemp, MAX_PATH, - &icon_idx, - &flags))) - { - IDefaultExtractIconInit_SetOpenIcon(initIcon, 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 */ - IShellFolder* dsf; - IShellLinkW* psl; - - if (SUCCEEDED(SHGetDesktopFolder(&dsf))) - { - HRESULT hr = IShellFolder_GetUIObjectOf(dsf, NULL, 1, (LPCITEMIDLIST*)&pidl, &IID_IShellLinkW, NULL, (LPVOID*)&psl); - - if (SUCCEEDED(hr)) - { - hr = IShellLinkW_GetIconLocation(psl, wTemp, MAX_PATH, &icon_idx); - - if (SUCCEEDED(hr) && *sTemp) - found = TRUE; - - IShellLinkW_Release(psl); - } - - IShellFolder_Release(dsf); - } - } - } - - if (!found) - /* default icon */ - IDefaultExtractIconInit_SetNormalIcon(initIcon, swShell32Name, 0); - else - IDefaultExtractIconInit_SetNormalIcon(initIcon, 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->lpVtbl->QueryInterface(extractIconW, &IID_IExtractIconA, (void **)&extractIconA); - extractIconW->lpVtbl->Release(extractIconW); - if (!SUCCEEDED(hr)) - return NULL; - return extractIconA; -} diff --git a/reactos/dll/win32/shell32/fprop.c b/reactos/dll/win32/shell32/fprop.c deleted file mode 100644 index 3e324499808..00000000000 --- a/reactos/dll/win32/shell32/fprop.c +++ /dev/null @@ -1,879 +0,0 @@ -/* - * 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; - -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(LPSTR 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.u.pResource = 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; - HANDLE 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(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, 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, 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->u3.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; - IDataObject *pDataObj = NULL; - 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.u3.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]); - IDataObject_Release(pDataObj); - } - - return (res != -1); -} - -/*EOF */ diff --git a/reactos/dll/win32/shell32/iconcache.c b/reactos/dll/win32/shell32/iconcache.c deleted file mode 100644 index 01e84c99e75..00000000000 --- a/reactos/dll/win32/shell32/iconcache.c +++ /dev/null @@ -1,934 +0,0 @@ -/* - * 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; - -static CRITICAL_SECTION SHELL32_SicCS; -static CRITICAL_SECTION_DEBUG critsect_debug = -{ - 0, 0, &SHELL32_SicCS, - { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, - 0, 0, { (DWORD_PTR)(__FILE__ ": SHELL32_SicCS") } -}; -static 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 = SelectObject(SourceDC, SourceIconInfo.hbmMask); - if (NULL == OldSourceBitmap) goto fail; - - ShortcutDC = CreateCompatibleDC(NULL); - if (NULL == ShortcutDC) goto fail; - OldShortcutBitmap = 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 = 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(0xAA0000, SRCCOPY))) - { - 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 = 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) -{ - IExtractIconW *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 (IShellFolder_GetUIObjectOf(sh, 0, 1, &pidl, &IID_IExtractIconW, 0, (void **)&ei))) - { - if (SUCCEEDED(ei->lpVtbl->GetIconLocation(ei, uFlags, szIconFile, MAX_PATH, &iSourceIndex, &dwFlags))) - { - *pIndex = SIC_GetIconIndex(szIconFile, iSourceIndex, uFlags); - ret = TRUE; - } - ei->lpVtbl->Release(ei); - } - - 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] - */ -HRESULT WINAPI SHMapIDListToImageListIndexAsync(IUnknown *pts, IShellFolder *psf, - LPCITEMIDLIST pidl, UINT flags, - void *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 = 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); -} - -INT WINAPI Shell_GetCachedImageIndexAW(LPCVOID szPath, INT nIndex, BOOL bSimulateDoc) -{ if( SHELL_OsIsUnicode()) - return Shell_GetCachedImageIndexW(szPath, nIndex, bSimulateDoc); - return Shell_GetCachedImageIndexA(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 = 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 = 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. - */ -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. - */ -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 = 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 = 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. - */ -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. - */ -INT WINAPI SHGetIconOverlayIndexW(LPCWSTR pszIconPath, INT iIconIndex) -{ - FIXME("%s, %d\n", debugstr_w(pszIconPath), iIconIndex); - - return -1; -} diff --git a/reactos/dll/win32/shell32/pidl.c b/reactos/dll/win32/shell32/pidl.c deleted file mode 100644 index 59985de032b..00000000000 --- a/reactos/dll/win32/shell32/pidl.c +++ /dev/null @@ -1,2428 +0,0 @@ -/* - * 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 LPVOID WINAPI Alloc(INT); -extern 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) -{ - LPSHELLFOLDER psfParent, 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 = IShellFolder_GetDisplayNameOf(lsf, 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 = IShellFolder_GetDisplayNameOf(psfParent, pidllast, flag, &strret); - if (SUCCEEDED(ret)) - { - if(!StrRetToStrNW(path, MAX_PATH, &strret, pidllast)) - ret = E_FAIL; - } - IShellFolder_Release(psfParent); - } - } - } - - TRACE("%p %p %s\n", psf, pidl, debugstr_w(path)); - - if (!psf) - IShellFolder_Release(lsf); - 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, path, type); - return ILGetDisplayNameExA(psf, pidl, 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, path, ILGDN_FORPARSING); - return ILGetDisplayNameExA(NULL, pidl, 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 = 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 = 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; - - IStream_AddRef (pStream); - - if (SUCCEEDED(IStream_Read(pStream, &wLen, 2, &dwBytesRead))) - { - TRACE("PIDL length is %d\n", wLen); - if (wLen != 0) - { - *ppPidl = SHAlloc (wLen); - if (SUCCEEDED(IStream_Read(pStream, *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; - } - - IStream_Release (pStream); - 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); - - IStream_AddRef (pStream); - - wLen = ILGetSize(pPidl); - - if (SUCCEEDED(IStream_Write(pStream, &wLen, 2, NULL))) - { - if (SUCCEEDED(IStream_Write(pStream, pPidl, wLen, NULL))) - ret = S_OK; - } - IStream_Release (pStream); - - 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) -{ - LPSHELLFOLDER 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 = IShellFolder_ParseDisplayName(sf, 0, NULL, (LPWSTR)path, &pchEaten, ppidl, attributes); - IShellFolder_Release(sf); - } - return ret; -} - -HRESULT WINAPI SHILCreateFromPathAW (LPCVOID path, LPITEMIDLIST * ppidl, DWORD * attributes) -{ - if ( SHELL_OsIsUnicode()) - return SHILCreateFromPathW (path, ppidl, attributes); - return SHILCreateFromPathA (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 = 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 = 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) -{ - IDataObject* pDataObj; - HRESULT hr; - - hr = IShellFolder_GetUIObjectOf(lpsf, 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 = IDataObject_GetData(pDataObj, &fmt, &medium); - - IDataObject_Release(pDataObj); - - if (SUCCEEDED(hr)) - { - /*assert(pida->cidl==1);*/ - LPIDA pida = GlobalLock(medium.u.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.u.hGlobal); - GlobalFree(medium.u.hGlobal); - } - } - - return hr; -} - -/************************************************************************* - * SHLogILFromFSIL [SHELL32.95] - * - * NOTES - * pild = CSIDL_DESKTOP ret = 0 - * pild = CSIDL_DRIVES ret = 0 - */ -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! (???) - */ -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] - */ -LPITEMIDLIST WINAPI ILCreateFromPathAW (LPCVOID path) -{ - if ( SHELL_OsIsUnicode()) - return ILCreateFromPathW (path); - return ILCreateFromPathA (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) -{ - LPSHELLFOLDER pSF = NULL; - LPBC pBC = NULL; - 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 = IShellFolder_ParseDisplayName(pSF, 0, pBC, (LPOLESTR)path, NULL, ppidl, prgfInOut); - } - - if (pBC) - { - IBindCtx_Release(pBC); - pBC = NULL; - } - - IShellFolder_Release(pSF); - - 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 = 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; -} - -LPITEMIDLIST WINAPI SHSimpleIDListFromPathAW(LPCVOID lpszPath) -{ - if ( SHELL_OsIsUnicode()) - return SHSimpleIDListFromPathW (lpszPath); - return SHSimpleIDListFromPathA (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 = dest; - - if (_ILIsDrive(pidl) || _ILIsSpecialFolder(pidl)) - return E_INVALIDARG; - - if (len < 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 = 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 = dest; - - if (_ILIsDrive(pidl)) - return E_INVALIDARG; - - if (len < sizeof(WIN32_FIND_DATAW)) - return E_INVALIDARG; - - ZeroMemory(pfd, sizeof (WIN32_FIND_DATAW)); - _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; - LPSHELLFOLDER 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 = IShellFolder_GetAttributesOf(psfFolder, 1, &pidlLast, &dwAttributes); - if (FAILED(hr) || !(dwAttributes & SFGAO_FILESYSTEM)) { - IShellFolder_Release(psfFolder); - return FALSE; - } - - hr = IShellFolder_GetDisplayNameOf(psfFolder, pidlLast, SHGDN_FORPARSING, &strret); - IShellFolder_Release(psfFolder); - 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) -{ - IShellFolder * 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 = IShellFolder_QueryInterface(psfDesktop, riid, ppv); - } - else - { - LPITEMIDLIST pidlParent = ILClone(pidl); - ILRemoveLastID(pidlParent); - hr = IShellFolder_BindToObject(psfDesktop, pidlParent, NULL, riid, ppv); - SHFree (pidlParent); - } - - IShellFolder_Release(psfDesktop); - - 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 = 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 = 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, FIELD_OFFSET(FileStruct, szNames[alen + (alen & 1)]) + - FIELD_OFFSET(FileStructW, wszName[wlen]) + 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 = FIELD_OFFSET(FileStructW, wszName[wlen]) + 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) -{ - REFIID iid = _ILGetGUIDPointer(pidl); - - TRACE("(%p)\n",pidl); - - if (iid) - return IsEqualIID(iid, &CLSID_MyDocuments); - return FALSE; -} - -BOOL _ILIsControlPanel(LPCITEMIDLIST pidl) -{ - REFIID iid = _ILGetGUIDPointer(pidl); - - TRACE("(%p)\n",pidl); - - if (iid) - return IsEqualIID(iid, &CLSID_ControlPanel); - return FALSE; -} - -BOOL _ILIsNetHood(LPCITEMIDLIST pidl) -{ - REFIID 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) -{ - REFIID iid = _ILGetGUIDPointer(pidl); - - TRACE("(%p)\n",pidl); - - if (iid) - return IsEqualIID(iid, &CLSID_MyComputer); - return FALSE; -} - -BOOL _ILIsPrinter(LPCITEMIDLIST pidl) -{ - REFIID iid = _ILGetGUIDPointer(pidl); - - TRACE("(%p)\n",pidl); - - if (iid) - return IsEqualIID(iid, &CLSID_Printers); - return FALSE; -} - -BOOL _ILIsBitBucket(LPCITEMIDLIST pidl) -{ - REFIID iid = _ILGetGUIDPointer(pidl); - - TRACE("(%p)\n",pidl); - - if (iid) - return IsEqualIID(iid, &CLSID_RecycleBin); - return FALSE; -} - -BOOL _ILIsAdminTools(LPCITEMIDLIST pidl) -{ - REFIID 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 = 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 = 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/reactos/dll/win32/shell32/ros-systray.c b/reactos/dll/win32/shell32/ros-systray.c deleted file mode 100644 index f560b498e03..00000000000 --- a/reactos/dll/win32/shell32/ros-systray.c +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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/reactos/dll/win32/shell32/she_ocmenu.c b/reactos/dll/win32/shell32/she_ocmenu.c deleted file mode 100644 index 9aea9e1b48e..00000000000 --- a/reactos/dll/win32/shell32/she_ocmenu.c +++ /dev/null @@ -1,1339 +0,0 @@ -/* - * 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 (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 -{ - const IContextMenu2Vtbl *lpVtblContextMenu; - const IShellExtInitVtbl *lpvtblShellExtInit; - LONG wId; - volatile LONG ref; - BOOL NoOpen; - UINT count; - WCHAR szPath[MAX_PATH]; - HMENU hSubMenu; -} SHEOWImpl, *LPSHEOWImpl; - -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; - -typedef struct { - DWORD cbSize; - DWORD uMax; - DWORD fFlags; - HKEY hKey; - LPWSTR lpszSubKey; - PROC lpfnCompare; -} MRUINFO, *LPMRUINFO; - -#define MRUF_STRING_LIST 0 - -typedef HANDLE (WINAPI *CREATEMRULISTPROCW)( - LPMRUINFO lpmi -); - -typedef int (WINAPI *ENUMMRULISTW)( - HANDLE hMRU, - int nItem, - void *lpData, - UINT uLen -); - -typedef int (WINAPI *ADDMRUSTRINGW)( - HANDLE hMRU, - LPCWSTR szString -); - -typedef void (WINAPI *FREEMRULIST)( - HANDLE hList); - -static const IShellExtInitVtbl eivt; -static const IContextMenu2Vtbl cmvt; -static HRESULT WINAPI SHEOWCm_fnQueryInterface(IContextMenu2 *iface, REFIID riid, LPVOID *ppvObj); -static ULONG WINAPI SHEOWCm_fnRelease(IContextMenu2 *iface); - -HANDLE OpenMRUList(HKEY hKey); -void LoadItemFromHKCU(POPEN_WITH_CONTEXT pContext, WCHAR * szExt); -void LoadItemFromHKCR(POPEN_WITH_CONTEXT pContext, WCHAR * szExt); -void InsertOpenWithItem(POPEN_WITH_CONTEXT pContext, WCHAR * szAppName); - -static HMODULE hModule = NULL; -static CREATEMRULISTPROCW CreateMRUListProcW = NULL; -static ENUMMRULISTW EnumMRUListW = NULL; -static FREEMRULIST FreeMRUListProc = NULL; -static ADDMRUSTRINGW AddMRUStringW = NULL; - - -HRESULT WINAPI SHEOW_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv) -{ - SHEOWImpl * ow; - HRESULT res; - - ow = LocalAlloc(LMEM_ZEROINIT, sizeof(SHEOWImpl)); - if (!ow) - { - return E_OUTOFMEMORY; - } - - ow->ref = 1; - ow->lpVtblContextMenu = &cmvt; - ow->lpvtblShellExtInit = &eivt; - - TRACE("(%p)->()\n",ow); - - res = SHEOWCm_fnQueryInterface( (IContextMenu2*)&ow->lpVtblContextMenu, riid, ppv ); - SHEOWCm_fnRelease( (IContextMenu2*)&ow->lpVtblContextMenu ); - return res; -} - -static LPSHEOWImpl __inline impl_from_IShellExtInit( IShellExtInit *iface ) -{ - return (SHEOWImpl *)((char*)iface - FIELD_OFFSET(SHEOWImpl, lpvtblShellExtInit)); -} - -static LPSHEOWImpl __inline impl_from_IContextMenu( IContextMenu2 *iface ) -{ - return (SHEOWImpl *)((char*)iface - FIELD_OFFSET(SHEOWImpl, lpVtblContextMenu)); -} - -static HRESULT WINAPI SHEOWCm_fnQueryInterface(IContextMenu2 *iface, REFIID riid, LPVOID *ppvObj) -{ - SHEOWImpl *This = impl_from_IContextMenu(iface); - - TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); - - *ppvObj = NULL; - - if(IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IContextMenu) || - IsEqualIID(riid, &IID_IContextMenu2)) - { - *ppvObj = (void *)&This->lpVtblContextMenu; - } - else if(IsEqualIID(riid, &IID_IShellExtInit)) - { - *ppvObj = (void *)&This->lpvtblShellExtInit; - } - - if(*ppvObj) - { - IUnknown_AddRef((IUnknown*)*ppvObj); - TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); - return S_OK; - } - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI SHEOWCm_fnAddRef(IContextMenu2 *iface) -{ - SHEOWImpl *This = impl_from_IContextMenu(iface); - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE("(%p)->(count=%u)\n", This, refCount - 1); - - return refCount; -} - -static ULONG WINAPI SHEOWCm_fnRelease(IContextMenu2 *iface) -{ - SHEOWImpl *This = impl_from_IContextMenu(iface); - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE("(%p)->(count=%i)\n", This, refCount + 1); - - if (!refCount) - { - TRACE(" destroying IContextMenu(%p)\n",This); - HeapFree(GetProcessHeap(),0,This); - } - return refCount; -} - -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) -{ - 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); - } -} - - - -static HRESULT WINAPI SHEOWCm_fnQueryContextMenu( - IContextMenu2 *iface, - 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; - SHEOWImpl *This = impl_from_IContextMenu(iface); - - 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, This->szPath); - if (!Context.Count) - { - DestroyMenu(hSubMenu); - hSubMenu = NULL; - This->wId = 0; - This->count = 0; - } - else - { - AddItem(hSubMenu, Context.idCmdFirst++); - This->count = Context.idCmdFirst - idCmdFirst; - /* verb start at index zero */ - This->wId = This->count -1; - This->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, 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\\"}; - 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 */ - (*FreeMRUListProc)((HANDLE)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; - 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[64] = {0}; - WCHAR szFilter[256] = {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 (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 (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); - } - } -} - - -static HRESULT WINAPI -SHEOWCm_fnInvokeCommand( IContextMenu2* iface, LPCMINVOKECOMMANDINFO lpici ) -{ - MENUITEMINFOW mii; - SHEOWImpl *This = impl_from_IContextMenu(iface); - - ERR("This %p wId %x count %u verb %x\n", This, This->wId, This->count, LOWORD(lpici->lpVerb)); - - if (This->wId < LOWORD(lpici->lpVerb)) - return E_FAIL; - - if (This->wId == LOWORD(lpici->lpVerb)) - { - OPENASINFO info; - - info.pcszFile = This->szPath; - info.oaifInFlags = OAIF_ALLOW_REGISTRATION | OAIF_REGISTER_EXT | OAIF_EXEC; - info.pcszClass = NULL; - FreeMenuItemContext(This->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(This->hSubMenu, LOWORD(lpici->lpVerb), TRUE, &mii)) - { - POPEN_ITEM_CONTEXT pItemContext = (POPEN_ITEM_CONTEXT)mii.dwItemData; - if (pItemContext) - { - /* launch item with specified app */ - ExecuteOpenItem(pItemContext, This->szPath); - } - } - /* free menu item context */ - FreeMenuItemContext(This->hSubMenu); - return S_OK; -} - -static HRESULT WINAPI -SHEOWCm_fnGetCommandString( IContextMenu2* iface, UINT_PTR idCmd, UINT uType, - UINT* pwReserved, LPSTR pszName, UINT cchMax ) -{ - SHEOWImpl *This = impl_from_IContextMenu(iface); - - FIXME("%p %lu %u %p %p %u\n", This, - idCmd, uType, pwReserved, pszName, cchMax ); - - return E_NOTIMPL; -} - -static HRESULT WINAPI SHEOWCm_fnHandleMenuMsg( - IContextMenu2 *iface, - UINT uMsg, - WPARAM wParam, - LPARAM lParam) -{ - SHEOWImpl *This = impl_from_IContextMenu(iface); - - TRACE("This %p uMsg %x\n",This, uMsg); - - return E_NOTIMPL; -} - -static const IContextMenu2Vtbl cmvt = -{ - SHEOWCm_fnQueryInterface, - SHEOWCm_fnAddRef, - SHEOWCm_fnRelease, - SHEOWCm_fnQueryContextMenu, - SHEOWCm_fnInvokeCommand, - SHEOWCm_fnGetCommandString, - SHEOWCm_fnHandleMenuMsg -}; - -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, 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 = 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) -{ - MRUINFO info; - - if (!hModule) - { - WCHAR szPath[MAX_PATH]; - if (!GetSystemDirectoryW(szPath, MAX_PATH)) - return 0; - PathAddBackslashW(szPath); - wcscat(szPath, L"comctl32.dll"); - hModule = LoadLibraryExW(szPath, NULL, 0); - } - CreateMRUListProcW = (CREATEMRULISTPROCW)GetProcAddress(hModule, MAKEINTRESOURCEA(400)); - EnumMRUListW = (ENUMMRULISTW)GetProcAddress(hModule, MAKEINTRESOURCEA(403)); - FreeMRUListProc = (FREEMRULIST)GetProcAddress(hModule, MAKEINTRESOURCEA(152)); - AddMRUStringW = (ADDMRUSTRINGW)GetProcAddress(hModule, MAKEINTRESOURCEA(401)); - - if (!CreateMRUListProcW || !EnumMRUListW || !FreeMRUListProc || !AddMRUStringW) - return 0; - - /* initialize mru list info */ - info.cbSize = sizeof(MRUINFO); - info.uMax = 32; - info.fFlags = MRUF_STRING_LIST; - info.hKey = hKey; - info.lpszSubKey = L"OpenWithList"; - info.lpfnCompare = NULL; - - /* load list */ - return (*CreateMRUListProcW)(&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)((HANDLE)hList, -1, NULL, 0); - - for(nItem = 0; nItem < nCount; nItem++) - { - nResult = (*EnumMRUListW)((HANDLE)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)((HANDLE)hList); -} - - - -void -LoadItemFromHKCR(POPEN_WITH_CONTEXT pContext, 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, 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 -SHEOW_LoadOpenWithItems(SHEOWImpl *This, 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 = IDataObject_GetData(pdtobj, &fmt, &medium); - - if (FAILED(hr)) - { - ERR("IDataObject_GetData failed with 0x%x\n", hr); - return hr; - } - - /*assert(pida->cidl==1);*/ - pida = (LPIDA)GlobalLock(medium.u.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.u.hGlobal); - GlobalFree(medium.u.hGlobal); - - if (!pidl) - { - ERR("no mem\n"); - return E_OUTOFMEMORY; - } - if (_ILIsDesktop(pidl) || _ILIsMyDocuments(pidl) || _ILIsControlPanel(pidl) || _ILIsNetHood(pidl) || - _ILIsBitBucket(pidl) || _ILIsDrive(pidl) || _ILIsCPanelStruct(pidl) || _ILIsFolder(pidl) || _ILIsControlPanel(pidl)) - { - TRACE("pidl is a folder\n"); - SHFree((void*)pidl); - return E_FAIL; - } - - if (!SHGetPathFromIDListW(pidl, This->szPath)) - { - SHFree((void*)pidl); - ERR("SHGetPathFromIDListW failed\n"); - return E_FAIL; - } - - SHFree((void*)pidl); - TRACE("szPath %s\n", debugstr_w(This->szPath)); - - if (GetBinaryTypeW(This->szPath, &dwPath)) - { - TRACE("path is a executable %x\n", dwPath); - return E_FAIL; - } - - szPtr = wcsrchr(This->szPath, '.'); - if (szPtr) - { - if (!_wcsicmp(szPtr, szShortCut)) - { - FIXME("pidl is a shortcut\n"); - return E_FAIL; - } - } - return S_OK; -} - -static HRESULT WINAPI -SHEOW_ExtInit_Initialize( IShellExtInit* iface, LPCITEMIDLIST pidlFolder, - IDataObject *pdtobj, HKEY hkeyProgID ) -{ - SHEOWImpl *This = impl_from_IShellExtInit(iface); - - TRACE("This %p\n", This); - - return SHEOW_LoadOpenWithItems(This, pdtobj); -} - -static ULONG WINAPI SHEOW_ExtInit_AddRef(IShellExtInit *iface) -{ - SHEOWImpl *This = impl_from_IShellExtInit(iface); - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE("(%p)->(count=%u)\n", This, refCount - 1); - - return refCount; -} - -static ULONG WINAPI SHEOW_ExtInit_Release(IShellExtInit *iface) -{ - SHEOWImpl *This = impl_from_IShellExtInit(iface); - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE("(%p)->(count=%i)\n", This, refCount + 1); - - if (!refCount) - { - HeapFree(GetProcessHeap(),0,This); - } - return refCount; -} - -static HRESULT WINAPI -SHEOW_ExtInit_QueryInterface( IShellExtInit* iface, REFIID riid, void** ppvObject ) -{ - SHEOWImpl *This = impl_from_IShellExtInit(iface); - return SHEOWCm_fnQueryInterface((IContextMenu2*)This, riid, ppvObject); -} - -static const IShellExtInitVtbl eivt = -{ - SHEOW_ExtInit_QueryInterface, - SHEOW_ExtInit_AddRef, - SHEOW_ExtInit_Release, - SHEOW_ExtInit_Initialize -}; - - -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/reactos/dll/win32/shell32/shell.c b/reactos/dll/win32/shell32/shell.c deleted file mode 100644 index 71761fc49ad..00000000000 --- a/reactos/dll/win32/shell32/shell.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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/reactos/dll/win32/shell32/shell32_main.c b/reactos/dll/win32/shell32/shell32_main.c deleted file mode 100644 index 2bf6502443f..00000000000 --- a/reactos/dll/win32/shell32/shell32_main.c +++ /dev/null @@ -1,1370 +0,0 @@ -/* - * 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 - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -extern const char * const SHELL_Authors[]; - -#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=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=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=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; - IShellFolder * psfParent = NULL; - IExtractIconW * pei = NULL; - 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 (!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) - IShellFolder_GetAttributesOf( psfParent, 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 = IShellFolder_GetDisplayNameOf( psfParent, 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 = IShellFolder_GetUIObjectOf(psfParent, 0, 1, - (LPCITEMIDLIST*)&pidlLast, &IID_IExtractIconW, - &uDummy, (LPVOID*)&pei); - if (SUCCEEDED(hr)) - { - hr = IExtractIconW_GetIconLocation(pei, uGilFlags, - szLocation, MAX_PATH, &iIndex, &uFlags); - - if (uFlags & GIL_NOTFILENAME) - ret = FALSE; - else - { - wcscpy (psfi->szDisplayName, szLocation); - psfi->iIcon = iIndex; - } - IExtractIconW_Release(pei); - } - } - } - - /* 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 (psfParent) - IShellFolder_Release(psfParent); - - 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 = 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.@] - */ -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 = 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] - */ -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 = LoadImageW(shell32_hInstance, - (LPCWSTR) MAKEINTRESOURCE(iconindex), IMAGE_ICON, - 0, 0, LR_DEFAULTCOLOR|LR_DEFAULTSIZE); - - if(pSmallIcon != NULL) - *pSmallIcon = 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 - */ -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] - */ -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.@] - * - */ -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.@] - * - */ -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 - */ -HRESULT WINAPI SHLoadInProc (REFCLSID rclsid) -{ - void *ptr = NULL; - - TRACE("%s\n", debugstr_guid(rclsid)); - - CoCreateInstance(rclsid, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown,&ptr); - if(ptr) - { - IUnknown * pUnk = ptr; - IUnknown_Release(pUnk); - return NOERROR; - } - return DISP_E_MEMBERNOTFOUND; -} - -static VOID SetRegTextData(HWND hWnd, HKEY hKey, LPWSTR Value, UINT uID) -{ - DWORD dwBufferSize; - DWORD dwType; - LPWSTR lpBuffer; - - if( RegQueryValueExW(hKey, Value, NULL, &dwType, NULL, &dwBufferSize) == ERROR_SUCCESS ) - { - if(dwType == REG_SZ) - { - lpBuffer = 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 = 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 = 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 = 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; - LPVOID 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 = (LPVOID)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.@) - */ -void WINAPI FreeIconList( DWORD dw ) -{ - FIXME("%x: stub\n",dw); -} - -/************************************************************************* - * SHLoadNonloadedIconOverlayIdentifiers (SHELL32.@) - */ -HRESULT WINAPI SHLoadNonloadedIconOverlayIdentifiers( VOID ) -{ - FIXME("stub\n"); - return S_OK; -} - -/*********************************************************************** - * 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. - */ - -HRESULT WINAPI 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 = 0; -HIMAGELIST ShellSmallIconList = 0; -HIMAGELIST ShellBigIconList = 0; - - -/************************************************************************* - * SHELL32 DllMain - * - * NOTES - * calling oleinitialize here breaks sone apps. - */ -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) -{ - TRACE("%p 0x%x %p\n", hinstDLL, fdwReason, fImpLoad); - - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - shell32_hInstance = hinstDLL; - DisableThreadLibraryCalls(shell32_hInstance); - - /* get full path to this DLL for IExtractIconW_fnGetIconLocation() */ - GetModuleFileNameW(hinstDLL, swShell32Name, MAX_PATH); - swShell32Name[MAX_PATH - 1] = '\0'; - - InitCommonControlsEx(NULL); - - SIC_Initialize(); - InitChangeNotifications(); - InitIconOverlays(); - break; - - case DLL_PROCESS_DETACH: - shell32_hInstance = 0; - SIC_Destroy(); - FreeChangeNotifications(); - break; - } - return TRUE; -} - -/************************************************************************* - * 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 */ -} - -/*********************************************************************** - * DllCanUnloadNow (SHELL32.@) - */ -HRESULT WINAPI DllCanUnloadNow(void) -{ - TRACE("stub\n"); - return S_FALSE; -} diff --git a/reactos/dll/win32/shell32/shellitem.c b/reactos/dll/win32/shell32/shellitem.c deleted file mode 100644 index 620f854efed..00000000000 --- a/reactos/dll/win32/shell32/shellitem.c +++ /dev/null @@ -1,382 +0,0 @@ -/* - * IShellItem implementation - * - * Copyright 2008 Vincent Povirk 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 "precomp.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -typedef struct _ShellItem { - const IShellItemVtbl *lpIShellItemVtbl; - LONG ref; - LPITEMIDLIST pidl; - const IPersistIDListVtbl *lpIPersistIDListVtbl; -} ShellItem; - -HRESULT WINAPI SHCreateShellItem(LPCITEMIDLIST pidlParent, - IShellFolder *psfParent, LPCITEMIDLIST pidl, IShellItem **ppsi); - - -static inline ShellItem *impl_from_IPersistIDList( IPersistIDList *iface ) -{ - return (ShellItem*)((char*)iface - FIELD_OFFSET(ShellItem, lpIPersistIDListVtbl)); -} - - -static HRESULT WINAPI ShellItem_QueryInterface(IShellItem *iface, REFIID riid, - void **ppv) -{ - ShellItem *This = (ShellItem*)iface; - - TRACE("(%p,%p,%p)\n", iface, riid, ppv); - - if (!ppv) return E_INVALIDARG; - - if (IsEqualIID(&IID_IUnknown, riid) || IsEqualIID(&IID_IShellItem, riid)) - { - *ppv = This; - } - else if (IsEqualIID(&IID_IPersist, riid) || IsEqualIID(&IID_IPersistIDList, riid)) - { - *ppv = (IPersistIDListVtbl *)&(This->lpIPersistIDListVtbl); - } - else { - FIXME("not implemented for %s\n", shdebugstr_guid(riid)); - *ppv = NULL; - return E_NOINTERFACE; - } - - IUnknown_AddRef((IUnknown*)*ppv); - return S_OK; -} - -static ULONG WINAPI ShellItem_AddRef(IShellItem *iface) -{ - ShellItem *This = (ShellItem*)iface; - ULONG ref = InterlockedIncrement(&This->ref); - - TRACE("(%p), new refcount=%i\n", iface, ref); - - return ref; -} - -static ULONG WINAPI ShellItem_Release(IShellItem *iface) -{ - ShellItem *This = (ShellItem*)iface; - ULONG ref = InterlockedDecrement(&This->ref); - - TRACE("(%p), new refcount=%i\n", iface, ref); - - if (ref == 0) - { - ILFree(This->pidl); - HeapFree(GetProcessHeap(), 0, This); - } - - return ref; -} - -static HRESULT ShellItem_get_parent_pidl(ShellItem *This, LPITEMIDLIST *parent_pidl) -{ - *parent_pidl = ILClone(This->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; - } -} - -static HRESULT ShellItem_get_parent_shellfolder(ShellItem *This, IShellFolder **ppsf) -{ - LPITEMIDLIST parent_pidl; - IShellFolder *desktop; - HRESULT ret; - - ret = ShellItem_get_parent_pidl(This, &parent_pidl); - if (SUCCEEDED(ret)) - { - ret = SHGetDesktopFolder(&desktop); - if (SUCCEEDED(ret)) - { - ret = IShellFolder_BindToObject(desktop, parent_pidl, NULL, &IID_IShellFolder, (void**)ppsf); - IShellFolder_Release(desktop); - } - ILFree(parent_pidl); - } - - return ret; -} - -static HRESULT WINAPI ShellItem_BindToHandler(IShellItem *iface, IBindCtx *pbc, - REFGUID rbhid, REFIID riid, void **ppvOut) -{ - FIXME("(%p,%p,%s,%p,%p)\n", iface, pbc, shdebugstr_guid(rbhid), riid, ppvOut); - - *ppvOut = NULL; - - return E_NOTIMPL; -} - -static HRESULT WINAPI ShellItem_GetParent(IShellItem *iface, IShellItem **ppsi) -{ - ShellItem *This = (ShellItem*)iface; - LPITEMIDLIST parent_pidl; - HRESULT ret; - - TRACE("(%p,%p)\n", iface, ppsi); - - ret = ShellItem_get_parent_pidl(This, &parent_pidl); - if (SUCCEEDED(ret)) - { - ret = SHCreateShellItem(NULL, NULL, parent_pidl, ppsi); - ILFree(parent_pidl); - } - - return ret; -} - -static HRESULT WINAPI ShellItem_GetDisplayName(IShellItem *iface, SIGDN sigdnName, - LPWSTR *ppszName) -{ - FIXME("(%p,%x,%p)\n", iface, sigdnName, ppszName); - - *ppszName = NULL; - - return E_NOTIMPL; -} - -static HRESULT WINAPI ShellItem_GetAttributes(IShellItem *iface, SFGAOF sfgaoMask, - SFGAOF *psfgaoAttribs) -{ - ShellItem *This = (ShellItem*)iface; - IShellFolder *parent_folder; - LPITEMIDLIST child_pidl; - HRESULT ret; - - TRACE("(%p,%x,%p)\n", iface, sfgaoMask, psfgaoAttribs); - - ret = ShellItem_get_parent_shellfolder(This, &parent_folder); - if (SUCCEEDED(ret)) - { - child_pidl = ILFindLastID(This->pidl); - *psfgaoAttribs = sfgaoMask; - ret = IShellFolder_GetAttributesOf(parent_folder, 1, (LPCITEMIDLIST*)&child_pidl, psfgaoAttribs); - IShellFolder_Release(parent_folder); - } - - return ret; -} - -static HRESULT WINAPI ShellItem_Compare(IShellItem *iface, IShellItem *oth, - SICHINTF hint, int *piOrder) -{ - FIXME("(%p,%p,%x,%p)\n", iface, oth, hint, piOrder); - - return E_NOTIMPL; -} - -static const IShellItemVtbl ShellItem_Vtbl = { - ShellItem_QueryInterface, - ShellItem_AddRef, - ShellItem_Release, - ShellItem_BindToHandler, - ShellItem_GetParent, - ShellItem_GetDisplayName, - ShellItem_GetAttributes, - ShellItem_Compare -}; - - -static HRESULT ShellItem_GetClassID(ShellItem* This, CLSID *pClassID) -{ - TRACE("(%p,%p)\n", This, pClassID); - - *pClassID = CLSID_ShellItem; - return S_OK; -} - - -static HRESULT WINAPI ShellItem_IPersistIDList_QueryInterface(IPersistIDList *iface, - REFIID riid, void **ppv) -{ - ShellItem *This = impl_from_IPersistIDList(iface); - return ShellItem_QueryInterface((IShellItem*)This, riid, ppv); -} - -static ULONG WINAPI ShellItem_IPersistIDList_AddRef(IPersistIDList *iface) -{ - ShellItem *This = impl_from_IPersistIDList(iface); - return ShellItem_AddRef((IShellItem*)This); -} - -static ULONG WINAPI ShellItem_IPersistIDList_Release(IPersistIDList *iface) -{ - ShellItem *This = impl_from_IPersistIDList(iface); - return ShellItem_Release((IShellItem*)This); -} - -static HRESULT WINAPI ShellItem_IPersistIDList_GetClassID(IPersistIDList* iface, - CLSID *pClassID) -{ - ShellItem *This = impl_from_IPersistIDList(iface); - - return ShellItem_GetClassID(This, pClassID); -} - -static HRESULT WINAPI ShellItem_IPersistIDList_SetIDList(IPersistIDList* iface, - LPCITEMIDLIST pidl) -{ - ShellItem *This = impl_from_IPersistIDList(iface); - LPITEMIDLIST new_pidl; - - TRACE("(%p,%p)\n", This, pidl); - - new_pidl = ILClone(pidl); - - if (new_pidl) - { - ILFree(This->pidl); - This->pidl = new_pidl; - return S_OK; - } - else - return E_OUTOFMEMORY; -} - -static HRESULT WINAPI ShellItem_IPersistIDList_GetIDList(IPersistIDList* iface, - LPITEMIDLIST *ppidl) -{ - ShellItem *This = impl_from_IPersistIDList(iface); - - TRACE("(%p,%p)\n", This, ppidl); - - *ppidl = ILClone(This->pidl); - if (*ppidl) - return S_OK; - else - return E_OUTOFMEMORY; -} - -static const IPersistIDListVtbl ShellItem_IPersistIDList_Vtbl = { - ShellItem_IPersistIDList_QueryInterface, - ShellItem_IPersistIDList_AddRef, - ShellItem_IPersistIDList_Release, - ShellItem_IPersistIDList_GetClassID, - ShellItem_IPersistIDList_SetIDList, - ShellItem_IPersistIDList_GetIDList -}; - - -HRESULT WINAPI IShellItem_Constructor(IUnknown *pUnkOuter, REFIID riid, void **ppv) -{ - ShellItem *This; - HRESULT ret; - - TRACE("(%p,%s)\n",pUnkOuter, debugstr_guid(riid)); - - *ppv = NULL; - - if (pUnkOuter) return CLASS_E_NOAGGREGATION; - - This = HeapAlloc(GetProcessHeap(), 0, sizeof(ShellItem)); - This->lpIShellItemVtbl = &ShellItem_Vtbl; - This->ref = 1; - This->pidl = NULL; - This->lpIPersistIDListVtbl = &ShellItem_IPersistIDList_Vtbl; - - ret = ShellItem_QueryInterface((IShellItem*)This, riid, ppv); - ShellItem_Release((IShellItem*)This); - - return ret; -} - -HRESULT WINAPI SHCreateShellItem(LPCITEMIDLIST pidlParent, - IShellFolder *psfParent, LPCITEMIDLIST pidl, IShellItem **ppsi) -{ - ShellItem *This; - LPITEMIDLIST new_pidl; - 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) - { - IPersistFolder2* ppf2Parent; - - if (FAILED(IPersistFolder2_QueryInterface(psfParent, &IID_IPersistFolder2, (void**)&ppf2Parent))) - { - FIXME("couldn't get IPersistFolder2 interface of parent\n"); - return E_NOINTERFACE; - } - - if (FAILED(IPersistFolder2_GetCurFolder(ppf2Parent, &temp_parent))) - { - FIXME("couldn't get parent PIDL\n"); - IPersistFolder2_Release(ppf2Parent); - return E_NOINTERFACE; - } - - pidlParent = temp_parent; - IPersistFolder2_Release(ppf2Parent); - } - - 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 = IShellItem_Constructor(NULL, &IID_IShellItem, (void**)&This); - if (This) - { - *ppsi = (IShellItem*)This; - This->pidl = new_pidl; - } - else - { - *ppsi = NULL; - ILFree(new_pidl); - } - return ret; -} diff --git a/reactos/dll/win32/shell32/shelllink.c b/reactos/dll/win32/shell32/shelllink.c deleted file mode 100644 index 78c25c45ffc..00000000000 --- a/reactos/dll/win32/shell32/shelllink.c +++ /dev/null @@ -1,2989 +0,0 @@ -/* - * - * Copyright 1997 Marcus Meissner - * Copyright 1998 Juergen Schmied - * Copyright 2005 Mike McCormack - * - * 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 - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -/* link file formats */ - -#include "pshpack1.h" - -typedef 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 */ -} LINK_HEADER, * PLINK_HEADER; - -#define SHLINK_LOCAL 0 -#define SHLINK_REMOTE 1 -#define MAX_PROPERTY_SHEET_PAGE 32 - -typedef struct _LOCATION_INFO -{ - DWORD dwTotalSize; - DWORD dwHeaderSize; - DWORD dwFlags; - DWORD dwVolTableOfs; - DWORD dwLocalPathOfs; - DWORD dwNetworkVolTableOfs; - DWORD dwFinalPathOfs; -} LOCATION_INFO; - -typedef struct _LOCAL_VOLUME_INFO -{ - DWORD dwSize; - DWORD dwType; - DWORD dwVolSerial; - DWORD dwVolLabelOfs; -} LOCAL_VOLUME_INFO; - -typedef struct volume_info_t -{ - DWORD type; - DWORD serial; - WCHAR label[12]; /* assume 8.3 */ -} volume_info; - -#include "poppack.h" - -static const IShellLinkAVtbl slvt; -static const IShellLinkWVtbl slvtw; -static const IPersistFileVtbl pfvt; -static const IPersistStreamVtbl psvt; -static const IShellLinkDataListVtbl dlvt; -static const IShellExtInitVtbl eivt; -static const IContextMenuVtbl cmvt; -static const IObjectWithSiteVtbl owsvt; -static const IShellPropSheetExtVtbl pse; - -/* IShellLink Implementation */ - -typedef struct -{ - const IShellLinkAVtbl *lpVtbl; - const IShellLinkWVtbl *lpvtblw; - const IPersistFileVtbl *lpvtblPersistFile; - const IPersistStreamVtbl *lpvtblPersistStream; - const IShellLinkDataListVtbl *lpvtblShellLinkDataList; - const IShellExtInitVtbl *lpvtblShellExtInit; - const IContextMenuVtbl *lpvtblContextMenu; - const IObjectWithSiteVtbl *lpvtblObjectWithSite; - const IShellPropSheetExtVtbl * lpvtblPropSheetExt; - - LONG ref; - - /* 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 */ - IUnknown *site; -} IShellLinkImpl, *LPIShellLinkImpl; - -static LPIShellLinkImpl __inline impl_from_IShellLinkW( IShellLinkW *iface ) -{ - return (IShellLinkImpl *)((char*)iface - FIELD_OFFSET(IShellLinkImpl, lpvtblw)); -} - -static LPIShellLinkImpl __inline impl_from_IPersistFile( IPersistFile *iface ) -{ - return (IShellLinkImpl *)((char*)iface - FIELD_OFFSET(IShellLinkImpl, lpvtblPersistFile)); -} - -static LPIShellLinkImpl __inline impl_from_IPersistStream( IPersistStream *iface ) -{ - return (IShellLinkImpl *)((char*)iface - FIELD_OFFSET(IShellLinkImpl, lpvtblPersistStream)); -} - -static LPIShellLinkImpl __inline impl_from_IShellLinkDataList( IShellLinkDataList *iface ) -{ - return (IShellLinkImpl *)((char*)iface - FIELD_OFFSET(IShellLinkImpl, lpvtblShellLinkDataList)); -} - -static LPIShellLinkImpl __inline impl_from_IShellExtInit( IShellExtInit *iface ) -{ - return (IShellLinkImpl *)((char*)iface - FIELD_OFFSET(IShellLinkImpl, lpvtblShellExtInit)); -} - -static LPIShellLinkImpl __inline impl_from_IContextMenu( IContextMenu *iface ) -{ - return (IShellLinkImpl *)((char*)iface - FIELD_OFFSET(IShellLinkImpl, lpvtblContextMenu)); -} - -static LPIShellLinkImpl __inline impl_from_IObjectWithSite( IObjectWithSite *iface ) -{ - return (IShellLinkImpl *)((char*)iface - FIELD_OFFSET(IShellLinkImpl, lpvtblObjectWithSite)); -} - -static LPIShellLinkImpl __inline impl_from_IShellPropSheetExt( IShellPropSheetExt *iface ) -{ - return (IShellLinkImpl *)((char*)iface - FIELD_OFFSET(IShellLinkImpl, lpvtblPropSheetExt)); -} - - -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) -{ - INT len; - LPWSTR p; - - assert(str); - - len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 ); - p = 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 = HeapAlloc( GetProcessHeap(), 0, (wcslen(src)+1)*sizeof(WCHAR) ); - if (dest) - wcscpy(dest, src); - return dest; -} - -/************************************************************************** - * ShellLink::QueryInterface implementation - */ -static HRESULT ShellLink_QueryInterface( IShellLinkImpl *This, REFIID riid, LPVOID *ppvObj) -{ - TRACE("(%p)->(\n\tIID:\t%s)\n",This,debugstr_guid(riid)); - - *ppvObj = NULL; - - if(IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IShellLinkA)) - { - *ppvObj = This; - } - else if(IsEqualIID(riid, &IID_IShellLinkW)) - { - *ppvObj = &(This->lpvtblw); - } - else if(IsEqualIID(riid, &IID_IPersistFile)) - { - *ppvObj = &(This->lpvtblPersistFile); - } - else if(IsEqualIID(riid, &IID_IPersistStream)) - { - *ppvObj = &(This->lpvtblPersistStream); - } - else if(IsEqualIID(riid, &IID_IShellLinkDataList)) - { - *ppvObj = &(This->lpvtblShellLinkDataList); - } - else if(IsEqualIID(riid, &IID_IShellExtInit)) - { - *ppvObj = &(This->lpvtblShellExtInit); - } - else if(IsEqualIID(riid, &IID_IContextMenu)) - { - *ppvObj = &(This->lpvtblContextMenu); - } - else if(IsEqualIID(riid, &IID_IObjectWithSite)) - { - *ppvObj = &(This->lpvtblObjectWithSite); - } - else if(IsEqualIID(riid, &IID_IShellPropSheetExt)) - { - *ppvObj = &(This->lpvtblPropSheetExt); - } - - if(*ppvObj) - { - IUnknown_AddRef((IUnknown*)(*ppvObj)); - TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); - return S_OK; - } - ERR("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -/************************************************************************** - * ShellLink::AddRef implementation - */ -static ULONG ShellLink_AddRef( IShellLinkImpl *This ) -{ - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE("(%p)->(count=%u)\n", This, refCount - 1); - - return refCount; -} - -/************************************************************************** - * ShellLink::Release implementation - */ -static ULONG ShellLink_Release( IShellLinkImpl *This ) -{ - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE("(%p)->(count=%u)\n", This, refCount + 1); - - if (refCount) - return refCount; - - TRACE("-- destroying IShellLink(%p)\n",This); - - HeapFree(GetProcessHeap(), 0, This->sIcoPath); - HeapFree(GetProcessHeap(), 0, This->sArgs); - HeapFree(GetProcessHeap(), 0, This->sWorkDir); - HeapFree(GetProcessHeap(), 0, This->sDescription); - HeapFree(GetProcessHeap(),0,This->sPath); - HeapFree(GetProcessHeap(),0,This->sLinkPath); - - if (This->site) - IUnknown_Release( This->site ); - - if (This->pPidl) - ILFree(This->pPidl); - - LocalFree(This); - - return 0; -} - -static HRESULT ShellLink_GetClassID( IShellLinkImpl *This, CLSID *pclsid ) -{ - TRACE("%p %p\n", This, pclsid); - - *pclsid = CLSID_ShellLink; - return S_OK; -} - -/************************************************************************** - * IPersistFile_QueryInterface - */ -static HRESULT WINAPI IPersistFile_fnQueryInterface( - IPersistFile* iface, - REFIID riid, - LPVOID *ppvObj) -{ - IShellLinkImpl *This = impl_from_IPersistFile(iface); - return ShellLink_QueryInterface( This, riid, ppvObj ); -} - -/****************************************************************************** - * IPersistFile_AddRef - */ -static ULONG WINAPI IPersistFile_fnAddRef(IPersistFile* iface) -{ - IShellLinkImpl *This = impl_from_IPersistFile(iface); - return ShellLink_AddRef( This ); -} - -/****************************************************************************** - * IPersistFile_Release - */ -static ULONG WINAPI IPersistFile_fnRelease(IPersistFile* iface) -{ - IShellLinkImpl *This = impl_from_IPersistFile(iface); - return IShellLinkA_Release((IShellLinkA*)This); -} - -static HRESULT WINAPI IPersistFile_fnGetClassID(IPersistFile* iface, CLSID *pClassID) -{ - IShellLinkImpl *This = impl_from_IPersistFile(iface); - return ShellLink_GetClassID( This, pClassID ); -} - -static HRESULT WINAPI IPersistFile_fnIsDirty(IPersistFile* iface) -{ - IShellLinkImpl *This = impl_from_IPersistFile(iface); - - TRACE("(%p)\n",This); - - if (This->bDirty) - return S_OK; - - return S_FALSE; -} - -static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile* iface, LPCOLESTR pszFileName, DWORD dwMode) -{ - IShellLinkImpl *This = impl_from_IPersistFile(iface); - IPersistStream *StreamThis = (IPersistStream *)&This->lpvtblPersistStream; - HRESULT r; - IStream *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, This->sLinkPath); - This->sLinkPath = strdupW(pszFileName); - r = IPersistStream_Load(StreamThis, stm); - ShellLink_UpdatePath(This->sPathRel, pszFileName, This->sWorkDir, &This->sPath); - IStream_Release( stm ); - This->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 = 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; -} - -static HRESULT WINAPI IPersistFile_fnSave(IPersistFile* iface, LPCOLESTR pszFileName, BOOL fRemember) -{ - IShellLinkImpl *This = impl_from_IPersistFile(iface); - IPersistStream *StreamThis = (IPersistStream *)&This->lpvtblPersistStream; - HRESULT r; - IStream *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 = IPersistStream_Save(StreamThis, stm, FALSE); - IStream_Release( stm ); - - if( SUCCEEDED( r ) ) - { - if ( This->sLinkPath ) - { - HeapFree(GetProcessHeap(), 0, This->sLinkPath); - } - This->sLinkPath = HeapAlloc(GetProcessHeap(), 0, (wcslen(pszFileName)+1) * sizeof(WCHAR)); - if ( This->sLinkPath ) - { - wcscpy(This->sLinkPath, pszFileName); - } - - StartLinkProcessor( pszFileName ); - - This->bDirty = FALSE; - } - else - { - DeleteFileW( pszFileName ); - WARN("Failed to create shortcut %s\n", debugstr_w(pszFileName) ); - } - } - - return r; -} - -static HRESULT WINAPI IPersistFile_fnSaveCompleted(IPersistFile* iface, LPCOLESTR pszFileName) -{ - IShellLinkImpl *This = impl_from_IPersistFile(iface); - FIXME("(%p)->(%s)\n",This,debugstr_w(pszFileName)); - return NOERROR; -} - -static HRESULT WINAPI IPersistFile_fnGetCurFile(IPersistFile* iface, LPOLESTR *ppszFileName) -{ - IShellLinkImpl *This = impl_from_IPersistFile(iface); - - *ppszFileName = NULL; - - if ( !This->sLinkPath) - { - /* IPersistFile::GetCurFile called before IPersistFile::Save */ - return S_FALSE; - } - - *ppszFileName = CoTaskMemAlloc((wcslen(This->sLinkPath)+1) * sizeof(WCHAR)); - if (!*ppszFileName) - { - /* out of memory */ - return E_OUTOFMEMORY; - } - - /* copy last saved filename */ - wcscpy(*ppszFileName, This->sLinkPath); - - return NOERROR; -} - -static const IPersistFileVtbl pfvt = -{ - IPersistFile_fnQueryInterface, - IPersistFile_fnAddRef, - IPersistFile_fnRelease, - IPersistFile_fnGetClassID, - IPersistFile_fnIsDirty, - IPersistFile_fnLoad, - IPersistFile_fnSave, - IPersistFile_fnSaveCompleted, - IPersistFile_fnGetCurFile -}; - -/************************************************************************ - * IPersistStream_QueryInterface - */ -static HRESULT WINAPI IPersistStream_fnQueryInterface( - IPersistStream* iface, - REFIID riid, - VOID** ppvObj) -{ - IShellLinkImpl *This = impl_from_IPersistStream(iface); - return ShellLink_QueryInterface( This, riid, ppvObj ); -} - -/************************************************************************ - * IPersistStream_Release - */ -static ULONG WINAPI IPersistStream_fnRelease( - IPersistStream* iface) -{ - IShellLinkImpl *This = impl_from_IPersistStream(iface); - return IShellLinkA_Release((IShellLinkA*)This); -} - -/************************************************************************ - * IPersistStream_AddRef - */ -static ULONG WINAPI IPersistStream_fnAddRef( - IPersistStream* iface) -{ - IShellLinkImpl *This = impl_from_IPersistStream(iface); - return ShellLink_AddRef( This ); -} - -/************************************************************************ - * IPersistStream_GetClassID - * - */ -static HRESULT WINAPI IPersistStream_fnGetClassID( - IPersistStream* iface, - CLSID* pClassID) -{ - IShellLinkImpl *This = impl_from_IPersistStream(iface); - return ShellLink_GetClassID( This, pClassID ); -} - -/************************************************************************ - * IPersistStream_IsDirty (IPersistStream) - */ -static HRESULT WINAPI IPersistStream_fnIsDirty( - IPersistStream* iface) -{ - IShellLinkImpl *This = impl_from_IPersistStream(iface); - - TRACE("(%p)\n", This); - - return S_OK; -} - - -static HRESULT Stream_LoadString( IStream* stm, BOOL unicode, LPWSTR *pstr ) -{ - DWORD count; - USHORT len; - LPVOID temp; - LPWSTR str; - HRESULT r; - - TRACE("%p\n", stm); - - count = 0; - r = IStream_Read(stm, &len, sizeof(len), &count); - if ( FAILED (r) || ( count != sizeof(len) ) ) - return E_FAIL; - - if( unicode ) - len *= sizeof (WCHAR); - - TRACE("reading %d\n", len); - temp = HeapAlloc(GetProcessHeap(), 0, len+sizeof(WCHAR)); - if( !temp ) - return E_OUTOFMEMORY; - count = 0; - r = IStream_Read(stm, 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 = 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 = 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 = IStream_Read( stm, &size, sizeof(size), &count ); - if( FAILED( r ) || count != sizeof(size) ) - return E_FAIL; - - chunk = HeapAlloc( GetProcessHeap(), 0, size ); - if( !chunk ) - return E_OUTOFMEMORY; - - chunk->size = size; - r = IStream_Read( stm, 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, 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 ) -{ - int len = 0, wlen; - LPWSTR path; - - while( p[len] && (len < maxlen) ) - len++; - - wlen = MultiByteToWideChar(CP_ACP, 0, p, len, NULL, 0); - path = 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, - 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 = IStream_Read( stm, &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 = IStream_Read( stm, &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 = HeapAlloc( GetProcessHeap(), 0, - (wcslen(buffer.szwDarwinID)+1) * sizeof(WCHAR) ); - wcscpy( *str, buffer.szwDarwinID ); - - return S_OK; -} - -/************************************************************************ - * IPersistStream_Load (IPersistStream) - */ -static HRESULT WINAPI IPersistStream_fnLoad( - IPersistStream* iface, - IStream* stm) -{ - LINK_HEADER hdr; - ULONG dwBytesRead; - BOOL unicode; - HRESULT r; - DWORD zero; - - IShellLinkImpl *This = impl_from_IPersistStream(iface); - - TRACE("%p %p\n", This, stm); - - if( !stm ) - return STG_E_INVALIDPOINTER; - - dwBytesRead = 0; - r = IStream_Read(stm, &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(This->pPidl); - This->pPidl = NULL; - memset( &This->volume, 0, sizeof This->volume ); - HeapFree(GetProcessHeap(), 0, This->sPath); - This->sPath = NULL; - HeapFree(GetProcessHeap(), 0, This->sDescription); - This->sDescription = NULL; - HeapFree(GetProcessHeap(), 0, This->sPathRel); - This->sPathRel = NULL; - HeapFree(GetProcessHeap(), 0, This->sWorkDir); - This->sWorkDir = NULL; - HeapFree(GetProcessHeap(), 0, This->sArgs); - This->sArgs = NULL; - HeapFree(GetProcessHeap(), 0, This->sIcoPath); - This->sIcoPath = NULL; - HeapFree(GetProcessHeap(), 0, This->sProduct); - This->sProduct = NULL; - HeapFree(GetProcessHeap(), 0, This->sComponent); - This->sComponent = NULL; - - This->wHotKey = (WORD)hdr.wHotKey; - This->iIcoNdx = hdr.nIcon; - FileTimeToSystemTime (&hdr.Time1, &This->time1); - FileTimeToSystemTime (&hdr.Time2, &This->time2); - FileTimeToSystemTime (&hdr.Time3, &This->time3); - if (TRACE_ON(shell)) - { - WCHAR sTemp[MAX_PATH]; - GetDateFormatW(LOCALE_USER_DEFAULT,DATE_SHORTDATE, &This->time1, - NULL, sTemp, sizeof(sTemp)/sizeof(*sTemp)); - TRACE("-- time1: %s\n", debugstr_w(sTemp) ); - GetDateFormatW(LOCALE_USER_DEFAULT,DATE_SHORTDATE, &This->time2, - NULL, sTemp, sizeof(sTemp)/sizeof(*sTemp)); - TRACE("-- time2: %s\n", debugstr_w(sTemp) ); - GetDateFormatW(LOCALE_USER_DEFAULT,DATE_SHORTDATE, &This->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, &This->pPidl ); - if( FAILED( r ) ) - return r; - } - pdump(This->pPidl); - - /* load the location information */ - if( hdr.dwFlags & SLDF_HAS_LINK_INFO ) - r = Stream_LoadLocation( stm, &This->volume, &This->sPath ); - if( FAILED( r ) ) - goto end; - - unicode = hdr.dwFlags & SLDF_UNICODE; - if( hdr.dwFlags & SLDF_HAS_NAME ) - { - r = Stream_LoadString( stm, unicode, &This->sDescription ); - TRACE("Description -> %s\n",debugstr_w(This->sDescription)); - } - if( FAILED( r ) ) - goto end; - - if( hdr.dwFlags & SLDF_HAS_RELPATH ) - { - r = Stream_LoadString( stm, unicode, &This->sPathRel ); - TRACE("Relative Path-> %s\n",debugstr_w(This->sPathRel)); - } - if( FAILED( r ) ) - goto end; - - if( hdr.dwFlags & SLDF_HAS_WORKINGDIR ) - { - r = Stream_LoadString( stm, unicode, &This->sWorkDir ); - TRACE("Working Dir -> %s\n",debugstr_w(This->sWorkDir)); - } - if( FAILED( r ) ) - goto end; - - if( hdr.dwFlags & SLDF_HAS_ARGS ) - { - r = Stream_LoadString( stm, unicode, &This->sArgs ); - TRACE("Working Dir -> %s\n",debugstr_w(This->sArgs)); - } - if( FAILED( r ) ) - goto end; - - if( hdr.dwFlags & SLDF_HAS_ICONLOCATION ) - { - r = Stream_LoadString( stm, unicode, &This->sIcoPath ); - TRACE("Icon file -> %s\n",debugstr_w(This->sIcoPath)); - } - if( FAILED( r ) ) - goto end; - -#if (NTDDI_VERSION < NTDDI_LONGHORN) - if( hdr.dwFlags & SLDF_HAS_LOGO3ID ) - { - r = Stream_LoadAdvertiseInfo( stm, &This->sProduct ); - TRACE("Product -> %s\n",debugstr_w(This->sProduct)); - } - if( FAILED( r ) ) - goto end; -#endif - - if( hdr.dwFlags & SLDF_HAS_DARWINID ) - { - r = Stream_LoadAdvertiseInfo( stm, &This->sComponent ); - TRACE("Component -> %s\n",debugstr_w(This->sComponent)); - } - if( hdr.dwFlags & SLDF_RUNAS_USER ) - { - This->bRunAs = TRUE; - } - else - { - This->bRunAs = FALSE; - } - - if( FAILED( r ) ) - goto end; - - r = IStream_Read(stm, &zero, sizeof zero, &dwBytesRead); - if( FAILED( r ) || zero || dwBytesRead != sizeof zero ) - ERR("Last word was not zero\n"); - - TRACE("OK\n"); - - pdump (This->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 = IStream_Write( stm, &len, sizeof(len), &count ); - if( FAILED( r ) ) - return r; - - len *= sizeof(WCHAR); - - r = IStream_Write( stm, 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, - 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 = 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 = IStream_Write( stm, 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 = 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 IStream_Write( stm, buffer, buffer->dbh.cbSize, &count ); -} - -/************************************************************************ - * IPersistStream_Save (IPersistStream) - * - * FIXME: makes assumptions about byte order - */ -static HRESULT WINAPI IPersistStream_fnSave( - IPersistStream* iface, - IStream* stm, - BOOL fClearDirty) -{ - LINK_HEADER header; - ULONG count; - DWORD zero; - HRESULT r; - - IShellLinkImpl *This = impl_from_IPersistStream(iface); - - TRACE("%p %p %x\n", This, stm, fClearDirty); - - memset(&header, 0, sizeof(header)); - header.dwSize = sizeof(header); - header.fStartup = This->iShowCmd; - header.MagicGuid = CLSID_ShellLink; - - header.wHotKey = This->wHotKey; - header.nIcon = This->iIcoNdx; - header.dwFlags = SLDF_UNICODE; /* strings are in unicode */ - if( This->pPidl ) - header.dwFlags |= SLDF_HAS_ID_LIST; - if( This->sPath ) - header.dwFlags |= SLDF_HAS_LINK_INFO; - if( This->sDescription ) - header.dwFlags |= SLDF_HAS_NAME; - if( This->sWorkDir ) - header.dwFlags |= SLDF_HAS_WORKINGDIR; - if( This->sArgs ) - header.dwFlags |= SLDF_HAS_ARGS; - if( This->sIcoPath ) - header.dwFlags |= SLDF_HAS_ICONLOCATION; -#if (NTDDI_VERSION < NTDDI_LONGHORN) - if( This->sProduct ) - header.dwFlags |= SLDF_HAS_LOGO3ID; -#endif - if( This->sComponent ) - header.dwFlags |= SLDF_HAS_DARWINID; - if( This->bRunAs ) - header.dwFlags |= SLDF_RUNAS_USER; - - SystemTimeToFileTime ( &This->time1, &header.Time1 ); - SystemTimeToFileTime ( &This->time2, &header.Time2 ); - SystemTimeToFileTime ( &This->time3, &header.Time3 ); - - /* write the Shortcut header */ - r = IStream_Write( stm, &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( This->pPidl ) - { - r = ILSaveToStream( stm, This->pPidl ); - if( FAILED( r ) ) - { - ERR("Failed to write PIDL at %d\n",__LINE__); - return r; - } - } - - if( This->sPath ) - Stream_WriteLocationInfo( stm, This->sPath, &This->volume ); - - if( This->sDescription ) - r = Stream_WriteString( stm, This->sDescription ); - - if( This->sPathRel ) - r = Stream_WriteString( stm, This->sPathRel ); - - if( This->sWorkDir ) - r = Stream_WriteString( stm, This->sWorkDir ); - - if( This->sArgs ) - r = Stream_WriteString( stm, This->sArgs ); - - if( This->sIcoPath ) - r = Stream_WriteString( stm, This->sIcoPath ); - - if( This->sProduct ) - r = Stream_WriteAdvertiseInfo( stm, This->sProduct, EXP_SZ_ICON_SIG ); - - if( This->sComponent ) - r = Stream_WriteAdvertiseInfo( stm, This->sComponent, EXP_DARWIN_ID_SIG ); - - /* the last field is a single zero dword */ - zero = 0; - r = IStream_Write( stm, &zero, sizeof zero, &count ); - - return S_OK; -} - -/************************************************************************ - * IPersistStream_GetSizeMax (IPersistStream) - */ -static HRESULT WINAPI IPersistStream_fnGetSizeMax( - IPersistStream* iface, - ULARGE_INTEGER* pcbSize) -{ - IShellLinkImpl *This = impl_from_IPersistStream(iface); - - TRACE("(%p)\n", This); - - return E_NOTIMPL; -} - -static const IPersistStreamVtbl psvt = -{ - IPersistStream_fnQueryInterface, - IPersistStream_fnAddRef, - IPersistStream_fnRelease, - IPersistStream_fnGetClassID, - IPersistStream_fnIsDirty, - IPersistStream_fnLoad, - IPersistStream_fnSave, - IPersistStream_fnGetSizeMax -}; - -/************************************************************************** - * IShellLink_Constructor - */ -HRESULT WINAPI IShellLink_Constructor( IUnknown *pUnkOuter, - REFIID riid, LPVOID *ppv ) -{ - IShellLinkImpl * sl; - HRESULT r; - - TRACE("unkOut=%p riid=%s\n",pUnkOuter, debugstr_guid(riid)); - - *ppv = NULL; - - if (pUnkOuter) - return CLASS_E_NOAGGREGATION; - sl = LocalAlloc(LMEM_ZEROINIT,sizeof(IShellLinkImpl)); - if (!sl) - return E_OUTOFMEMORY; - - sl->ref = 1; - sl->lpVtbl = &slvt; - sl->lpvtblw = &slvtw; - sl->lpvtblPersistFile = &pfvt; - sl->lpvtblPersistStream = &psvt; - sl->lpvtblShellLinkDataList = &dlvt; - sl->lpvtblShellExtInit = &eivt; - sl->lpvtblContextMenu = &cmvt; - sl->lpvtblObjectWithSite = &owsvt; - sl->lpvtblPropSheetExt = &pse; - sl->iShowCmd = SW_SHOWNORMAL; - sl->bDirty = FALSE; - sl->iIdOpen = -1; - sl->site = NULL; - sl->bRunAs = FALSE; - - TRACE("(%p)->()\n",sl); - - r = ShellLink_QueryInterface( sl, riid, ppv ); - ShellLink_Release( sl ); - return r; -} - - -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 = HeapAlloc(GetProcessHeap(), 0, (wcslen(abs_path)+1)*sizeof(WCHAR)); - if (!*psPath) - return E_OUTOFMEMORY; - - wcscpy(*psPath, abs_path); - } - - return S_OK; -} - -/************************************************************************** - * IShellLink_ConstructFromFile - */ -HRESULT WINAPI IShellLink_ConstructFromFile( IUnknown* pUnkOuter, REFIID riid, - LPCITEMIDLIST pidl, LPVOID* ppv) -{ - IShellLinkW* psl; - - HRESULT hr = IShellLink_Constructor(NULL, riid, (LPVOID*)&psl); - - if (SUCCEEDED(hr)) { - IPersistFile* ppf; - - *ppv = NULL; - - hr = IShellLinkW_QueryInterface(psl, &IID_IPersistFile, (LPVOID*)&ppf); - - if (SUCCEEDED(hr)) { - WCHAR path[MAX_PATH]; - - if (SHGetPathFromIDListW(pidl, path)) - hr = IPersistFile_Load(ppf, path, 0); - else - hr = E_FAIL; - - if (SUCCEEDED(hr)) - *ppv = psl; - - IPersistFile_Release(ppf); - } - - if (!*ppv) - IShellLinkW_Release(psl); - } - - return hr; -} - -/************************************************************************** - * IShellLinkA_QueryInterface - */ -static HRESULT WINAPI IShellLinkA_fnQueryInterface( IShellLinkA * iface, REFIID riid, LPVOID *ppvObj) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - return ShellLink_QueryInterface( This, riid, ppvObj ); -} - -/****************************************************************************** - * IShellLinkA_AddRef - */ -static ULONG WINAPI IShellLinkA_fnAddRef(IShellLinkA * iface) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - return ShellLink_AddRef( This ); -} - -/****************************************************************************** - * IShellLinkA_Release - */ -static ULONG WINAPI IShellLinkA_fnRelease(IShellLinkA * iface) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - return ShellLink_Release( This ); -} - -static HRESULT WINAPI IShellLinkA_fnGetPath(IShellLinkA * iface, LPSTR pszFile, - INT cchMaxPath, WIN32_FIND_DATAA *pfd, DWORD fFlags) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(pfile=%p len=%u find_data=%p flags=%u)(%s)\n", - This, pszFile, cchMaxPath, pfd, fFlags, debugstr_w(This->sPath)); - - if (cchMaxPath) - pszFile[0] = 0; - if (This->sPath) - WideCharToMultiByte( CP_ACP, 0, This->sPath, -1, - pszFile, cchMaxPath, NULL, NULL); - - if (pfd) FIXME("(%p): WIN32_FIND_DATA is not yet filled.\n", This); - - return S_OK; -} - -static HRESULT WINAPI IShellLinkA_fnGetIDList(IShellLinkA * iface, LPITEMIDLIST * ppidl) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(ppidl=%p)\n",This, ppidl); - - return IShellLinkW_GetIDList((IShellLinkW*)&(This->lpvtblw), ppidl); -} - -static HRESULT WINAPI IShellLinkA_fnSetIDList(IShellLinkA * iface, LPCITEMIDLIST pidl) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(pidl=%p)\n",This, pidl); - - if (This->pPidl) - ILFree(This->pPidl); - This->pPidl = ILClone (pidl); - This->bDirty = TRUE; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkA_fnGetDescription(IShellLinkA * iface, LPSTR pszName,INT cchMaxName) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(%p len=%u)\n",This, pszName, cchMaxName); - - if( cchMaxName ) - pszName[0] = 0; - if( This->sDescription ) - WideCharToMultiByte( CP_ACP, 0, This->sDescription, -1, - pszName, cchMaxName, NULL, NULL); - - return S_OK; -} - -static HRESULT WINAPI IShellLinkA_fnSetDescription(IShellLinkA * iface, LPCSTR pszName) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(pName=%s)\n", This, pszName); - - HeapFree(GetProcessHeap(), 0, This->sDescription); - This->sDescription = NULL; - - if ( pszName ) { - This->sDescription = HEAP_strdupAtoW( GetProcessHeap(), 0, pszName); - if ( !This->sDescription ) - return E_OUTOFMEMORY; - } - This->bDirty = TRUE; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkA_fnGetWorkingDirectory(IShellLinkA * iface, LPSTR pszDir,INT cchMaxPath) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(%p len=%u)\n", This, pszDir, cchMaxPath); - - if( cchMaxPath ) - pszDir[0] = 0; - if( This->sWorkDir ) - WideCharToMultiByte( CP_ACP, 0, This->sWorkDir, -1, - pszDir, cchMaxPath, NULL, NULL); - - return S_OK; -} - -static HRESULT WINAPI IShellLinkA_fnSetWorkingDirectory(IShellLinkA * iface, LPCSTR pszDir) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(dir=%s)\n",This, pszDir); - - HeapFree(GetProcessHeap(), 0, This->sWorkDir); - This->sWorkDir = NULL; - - if ( pszDir ) { - This->sWorkDir = HEAP_strdupAtoW( GetProcessHeap(), 0, pszDir); - if ( !This->sWorkDir ) - return E_OUTOFMEMORY; - } - This->bDirty = TRUE; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkA_fnGetArguments(IShellLinkA * iface, LPSTR pszArgs,INT cchMaxPath) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(%p len=%u)\n", This, pszArgs, cchMaxPath); - - if( cchMaxPath ) - pszArgs[0] = 0; - if( This->sArgs ) - WideCharToMultiByte( CP_ACP, 0, This->sArgs, -1, - pszArgs, cchMaxPath, NULL, NULL); - - return S_OK; -} - -static HRESULT WINAPI IShellLinkA_fnSetArguments(IShellLinkA * iface, LPCSTR pszArgs) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(args=%s)\n",This, pszArgs); - - HeapFree(GetProcessHeap(), 0, This->sArgs); - This->sArgs = NULL; - - if ( pszArgs ) { - This->sArgs = HEAP_strdupAtoW( GetProcessHeap(), 0, pszArgs); - if( !This->sArgs ) - return E_OUTOFMEMORY; - } - - This->bDirty = TRUE; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkA_fnGetHotkey(IShellLinkA * iface, WORD *pwHotkey) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(%p)(0x%08x)\n",This, pwHotkey, This->wHotKey); - - *pwHotkey = This->wHotKey; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkA_fnSetHotkey(IShellLinkA * iface, WORD wHotkey) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(hotkey=%x)\n",This, wHotkey); - - This->wHotKey = wHotkey; - This->bDirty = TRUE; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkA_fnGetShowCmd(IShellLinkA * iface, INT *piShowCmd) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(%p)\n",This, piShowCmd); - *piShowCmd = This->iShowCmd; - return S_OK; -} - -static HRESULT WINAPI IShellLinkA_fnSetShowCmd(IShellLinkA * iface, INT iShowCmd) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p) %d\n",This, iShowCmd); - - This->iShowCmd = iShowCmd; - This->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)) { - IExtractIconA* pei; - - hr = IShellFolder_GetUIObjectOf(psf, 0, 1, &pidlLast, &IID_IExtractIconA, NULL, (LPVOID*)&pei); - - if (SUCCEEDED(hr)) { - hr = IExtractIconA_GetIconLocation(pei, 0, pszIconPath, MAX_PATH, piIcon, NULL); - - IExtractIconA_Release(pei); - } - - IShellFolder_Release(psf); - } - - return hr; -} - -static HRESULT WINAPI IShellLinkA_fnGetIconLocation(IShellLinkA * iface, LPSTR pszIconPath,INT cchIconPath,INT *piIcon) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(%p len=%u iicon=%p)\n", This, pszIconPath, cchIconPath, piIcon); - - pszIconPath[0] = 0; - *piIcon = This->iIcoNdx; - - if (This->sIcoPath) - { - WideCharToMultiByte(CP_ACP, 0, This->sIcoPath, -1, pszIconPath, cchIconPath, NULL, NULL); - return S_OK; - } - - if (This->pPidl || This->sPath) - { - IShellFolder* pdsk; - - HRESULT hr = SHGetDesktopFolder(&pdsk); - - if (SUCCEEDED(hr)) - { - /* first look for an icon using the PIDL (if present) */ - if (This->pPidl) - hr = SHELL_PidlGeticonLocationA(pdsk, This->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) && This->sPath) - { - LPITEMIDLIST pidl; - - hr = IShellFolder_ParseDisplayName(pdsk, 0, NULL, This->sPath, NULL, &pidl, NULL); - - if (SUCCEEDED(hr)) { - hr = SHELL_PidlGeticonLocationA(pdsk, pidl, pszIconPath, cchIconPath, piIcon); - - SHFree(pidl); - } - } - - IShellFolder_Release(pdsk); - } - - return hr; - } - return S_OK; -} - -static HRESULT WINAPI IShellLinkA_fnSetIconLocation(IShellLinkA * iface, LPCSTR pszIconPath,INT iIcon) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(path=%s iicon=%u)\n",This, pszIconPath, iIcon); - - HeapFree(GetProcessHeap(), 0, This->sIcoPath); - This->sIcoPath = NULL; - - if ( pszIconPath ) { - This->sIcoPath = HEAP_strdupAtoW(GetProcessHeap(), 0, pszIconPath); - if ( !This->sIcoPath ) - return E_OUTOFMEMORY; - } - - This->iIcoNdx = iIcon; - This->bDirty = TRUE; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkA_fnSetRelativePath(IShellLinkA * iface, LPCSTR pszPathRel, DWORD dwReserved) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(path=%s %x)\n",This, pszPathRel, dwReserved); - - HeapFree(GetProcessHeap(), 0, This->sPathRel); - This->sPathRel = NULL; - - if ( pszPathRel ) { - This->sPathRel = HEAP_strdupAtoW(GetProcessHeap(), 0, pszPathRel); - - if ( !This->sPathRel ) - return E_OUTOFMEMORY; - } - - This->bDirty = TRUE; - - return ShellLink_UpdatePath(This->sPathRel, This->sPath, This->sWorkDir, &This->sPath); -} - -static HRESULT WINAPI IShellLinkA_fnResolve(IShellLinkA * iface, HWND hwnd, DWORD fFlags) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(hwnd=%p flags=%x)\n",This, hwnd, fFlags); - - return IShellLinkW_Resolve( (IShellLinkW*)&(This->lpvtblw), hwnd, fFlags ); -} - -static HRESULT WINAPI IShellLinkA_fnSetPath(IShellLinkA * iface, LPCSTR pszFile) -{ - HRESULT r; - LPWSTR str; - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(path=%s)\n",This, pszFile); - - if (!pszFile) return E_INVALIDARG; - - str = HEAP_strdupAtoW(GetProcessHeap(), 0, pszFile); - if( !str ) - return E_OUTOFMEMORY; - - r = IShellLinkW_SetPath((IShellLinkW*)&(This->lpvtblw), str); - HeapFree( GetProcessHeap(), 0, str ); - - return r; -} - -/************************************************************************** -* IShellLink Implementation -*/ - -static const IShellLinkAVtbl slvt = -{ - IShellLinkA_fnQueryInterface, - IShellLinkA_fnAddRef, - IShellLinkA_fnRelease, - IShellLinkA_fnGetPath, - IShellLinkA_fnGetIDList, - IShellLinkA_fnSetIDList, - IShellLinkA_fnGetDescription, - IShellLinkA_fnSetDescription, - IShellLinkA_fnGetWorkingDirectory, - IShellLinkA_fnSetWorkingDirectory, - IShellLinkA_fnGetArguments, - IShellLinkA_fnSetArguments, - IShellLinkA_fnGetHotkey, - IShellLinkA_fnSetHotkey, - IShellLinkA_fnGetShowCmd, - IShellLinkA_fnSetShowCmd, - IShellLinkA_fnGetIconLocation, - IShellLinkA_fnSetIconLocation, - IShellLinkA_fnSetRelativePath, - IShellLinkA_fnResolve, - IShellLinkA_fnSetPath -}; - - -/************************************************************************** - * IShellLinkW_fnQueryInterface - */ -static HRESULT WINAPI IShellLinkW_fnQueryInterface( - IShellLinkW * iface, REFIID riid, LPVOID *ppvObj) -{ - IShellLinkImpl *This = impl_from_IShellLinkW(iface); - return ShellLink_QueryInterface( This, riid, ppvObj ); -} - -/****************************************************************************** - * IShellLinkW_fnAddRef - */ -static ULONG WINAPI IShellLinkW_fnAddRef(IShellLinkW * iface) -{ - IShellLinkImpl *This = impl_from_IShellLinkW(iface); - return ShellLink_AddRef( This ); -} - -/****************************************************************************** - * IShellLinkW_fnRelease - */ -static ULONG WINAPI IShellLinkW_fnRelease(IShellLinkW * iface) -{ - IShellLinkImpl *This = impl_from_IShellLinkW(iface); - return ShellLink_Release( This ); -} - -static HRESULT WINAPI IShellLinkW_fnGetPath(IShellLinkW * iface, LPWSTR pszFile,INT cchMaxPath, WIN32_FIND_DATAW *pfd, DWORD fFlags) -{ - IShellLinkImpl *This = impl_from_IShellLinkW(iface); - - TRACE("(%p)->(pfile=%p len=%u find_data=%p flags=%u)(%s)\n", - This, pszFile, cchMaxPath, pfd, fFlags, debugstr_w(This->sPath)); - - if (This->sComponent || This->sProduct) - return S_FALSE; - - if (cchMaxPath) - pszFile[0] = 0; - if (This->sPath) - lstrcpynW( pszFile, This->sPath, cchMaxPath ); - - if (pfd) FIXME("(%p): WIN32_FIND_DATA is not yet filled.\n", This); - - return S_OK; -} - -static HRESULT WINAPI IShellLinkW_fnGetIDList(IShellLinkW * iface, LPITEMIDLIST * ppidl) -{ - IShellLinkImpl *This = impl_from_IShellLinkW(iface); - - TRACE("(%p)->(ppidl=%p)\n",This, ppidl); - - if (!This->pPidl) - { - *ppidl = NULL; - return S_FALSE; - } - *ppidl = ILClone(This->pPidl); - return S_OK; -} - -static HRESULT WINAPI IShellLinkW_fnSetIDList(IShellLinkW * iface, LPCITEMIDLIST pidl) -{ - IShellLinkImpl *This = impl_from_IShellLinkW(iface); - - TRACE("(%p)->(pidl=%p)\n",This, pidl); - - if( This->pPidl ) - ILFree( This->pPidl ); - This->pPidl = ILClone( pidl ); - if( !This->pPidl ) - return E_FAIL; - - This->bDirty = TRUE; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkW_fnGetDescription(IShellLinkW * iface, LPWSTR pszName,INT cchMaxName) -{ - IShellLinkImpl *This = impl_from_IShellLinkW(iface); - - TRACE("(%p)->(%p len=%u)\n",This, pszName, cchMaxName); - - pszName[0] = 0; - if( This->sDescription ) - lstrcpynW( pszName, This->sDescription, cchMaxName ); - - return S_OK; -} - -static HRESULT WINAPI IShellLinkW_fnSetDescription(IShellLinkW * iface, LPCWSTR pszName) -{ - IShellLinkImpl *This = impl_from_IShellLinkW(iface); - - TRACE("(%p)->(desc=%s)\n",This, debugstr_w(pszName)); - - HeapFree(GetProcessHeap(), 0, This->sDescription); - This->sDescription = HeapAlloc( GetProcessHeap(), 0, - (wcslen( pszName )+1)*sizeof(WCHAR) ); - if ( !This->sDescription ) - return E_OUTOFMEMORY; - - wcscpy( This->sDescription, pszName ); - This->bDirty = TRUE; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkW_fnGetWorkingDirectory(IShellLinkW * iface, LPWSTR pszDir,INT cchMaxPath) -{ - IShellLinkImpl *This = impl_from_IShellLinkW(iface); - - TRACE("(%p)->(%p len %u)\n", This, pszDir, cchMaxPath); - - if( cchMaxPath ) - pszDir[0] = 0; - if( This->sWorkDir ) - lstrcpynW( pszDir, This->sWorkDir, cchMaxPath ); - - return S_OK; -} - -static HRESULT WINAPI IShellLinkW_fnSetWorkingDirectory(IShellLinkW * iface, LPCWSTR pszDir) -{ - IShellLinkImpl *This = impl_from_IShellLinkW(iface); - - TRACE("(%p)->(dir=%s)\n",This, debugstr_w(pszDir)); - - HeapFree(GetProcessHeap(), 0, This->sWorkDir); - This->sWorkDir = HeapAlloc( GetProcessHeap(), 0, - (wcslen( pszDir )+1)*sizeof (WCHAR) ); - if ( !This->sWorkDir ) - return E_OUTOFMEMORY; - wcscpy( This->sWorkDir, pszDir ); - This->bDirty = TRUE; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkW_fnGetArguments(IShellLinkW * iface, LPWSTR pszArgs,INT cchMaxPath) -{ - IShellLinkImpl *This = impl_from_IShellLinkW(iface); - - TRACE("(%p)->(%p len=%u)\n", This, pszArgs, cchMaxPath); - - if( cchMaxPath ) - pszArgs[0] = 0; - if( This->sArgs ) - lstrcpynW( pszArgs, This->sArgs, cchMaxPath ); - - return NOERROR; -} - -static HRESULT WINAPI IShellLinkW_fnSetArguments(IShellLinkW * iface, LPCWSTR pszArgs) -{ - IShellLinkImpl *This = impl_from_IShellLinkW(iface); - - TRACE("(%p)->(args=%s)\n",This, debugstr_w(pszArgs)); - - HeapFree(GetProcessHeap(), 0, This->sArgs); - This->sArgs = HeapAlloc( GetProcessHeap(), 0, - (wcslen( pszArgs )+1)*sizeof (WCHAR) ); - if ( !This->sArgs ) - return E_OUTOFMEMORY; - wcscpy( This->sArgs, pszArgs ); - This->bDirty = TRUE; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkW_fnGetHotkey(IShellLinkW * iface, WORD *pwHotkey) -{ - IShellLinkImpl *This = impl_from_IShellLinkW(iface); - - TRACE("(%p)->(%p)\n",This, pwHotkey); - - *pwHotkey=This->wHotKey; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkW_fnSetHotkey(IShellLinkW * iface, WORD wHotkey) -{ - IShellLinkImpl *This = impl_from_IShellLinkW(iface); - - TRACE("(%p)->(hotkey=%x)\n",This, wHotkey); - - This->wHotKey = wHotkey; - This->bDirty = TRUE; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkW_fnGetShowCmd(IShellLinkW * iface, INT *piShowCmd) -{ - IShellLinkImpl *This = impl_from_IShellLinkW(iface); - - TRACE("(%p)->(%p)\n",This, piShowCmd); - - *piShowCmd = This->iShowCmd; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkW_fnSetShowCmd(IShellLinkW * iface, INT iShowCmd) -{ - IShellLinkImpl *This = impl_from_IShellLinkW(iface); - - This->iShowCmd = iShowCmd; - This->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)) { - IExtractIconW* pei; - - hr = IShellFolder_GetUIObjectOf(psf, 0, 1, &pidlLast, &IID_IExtractIconW, NULL, (LPVOID*)&pei); - - if (SUCCEEDED(hr)) { - hr = IExtractIconW_GetIconLocation(pei, 0, pszIconPath, MAX_PATH, piIcon, &wFlags); - - IExtractIconW_Release(pei); - } - - IShellFolder_Release(psf); - } - - return hr; -} - -static HRESULT WINAPI IShellLinkW_fnGetIconLocation(IShellLinkW * iface, LPWSTR pszIconPath,INT cchIconPath,INT *piIcon) -{ - IShellLinkImpl *This = impl_from_IShellLinkW(iface); - - TRACE("(%p)->(%p len=%u iicon=%p)\n", This, pszIconPath, cchIconPath, piIcon); - - pszIconPath[0] = 0; - *piIcon = This->iIcoNdx; - - if (This->sIcoPath) - { - lstrcpynW(pszIconPath, This->sIcoPath, cchIconPath); - return S_OK; - } - - if (This->pPidl || This->sPath) - { - IShellFolder* pdsk; - - HRESULT hr = SHGetDesktopFolder(&pdsk); - - if (SUCCEEDED(hr)) - { - /* first look for an icon using the PIDL (if present) */ - if (This->pPidl) - hr = SHELL_PidlGeticonLocationW(pdsk, This->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) && This->sPath) - { - LPITEMIDLIST pidl; - - hr = IShellFolder_ParseDisplayName(pdsk, 0, NULL, This->sPath, NULL, &pidl, NULL); - - if (SUCCEEDED(hr)) - { - hr = SHELL_PidlGeticonLocationW(pdsk, pidl, pszIconPath, cchIconPath, piIcon); - - SHFree(pidl); - } - } - - IShellFolder_Release(pdsk); - } - return hr; - } - return S_OK; -} - -static HRESULT WINAPI IShellLinkW_fnSetIconLocation(IShellLinkW * iface, LPCWSTR pszIconPath,INT iIcon) -{ - IShellLinkImpl *This = impl_from_IShellLinkW(iface); - - TRACE("(%p)->(path=%s iicon=%u)\n",This, debugstr_w(pszIconPath), iIcon); - - HeapFree(GetProcessHeap(), 0, This->sIcoPath); - This->sIcoPath = HeapAlloc( GetProcessHeap(), 0, - (wcslen( pszIconPath )+1)*sizeof (WCHAR) ); - if ( !This->sIcoPath ) - return E_OUTOFMEMORY; - wcscpy( This->sIcoPath, pszIconPath ); - - This->iIcoNdx = iIcon; - This->bDirty = TRUE; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkW_fnSetRelativePath(IShellLinkW * iface, LPCWSTR pszPathRel, DWORD dwReserved) -{ - IShellLinkImpl *This = impl_from_IShellLinkW(iface); - - TRACE("(%p)->(path=%s %x)\n",This, debugstr_w(pszPathRel), dwReserved); - - HeapFree(GetProcessHeap(), 0, This->sPathRel); - This->sPathRel = HeapAlloc( GetProcessHeap(), 0, - (wcslen( pszPathRel )+1) * sizeof (WCHAR) ); - if ( !This->sPathRel ) - return E_OUTOFMEMORY; - wcscpy( This->sPathRel, pszPathRel ); - This->bDirty = TRUE; - - return ShellLink_UpdatePath(This->sPathRel, This->sPath, This->sWorkDir, &This->sPath); -} - -static HRESULT WINAPI IShellLinkW_fnResolve(IShellLinkW * iface, HWND hwnd, DWORD fFlags) -{ - HRESULT hr = S_OK; - BOOL bSuccess; - - IShellLinkImpl *This = impl_from_IShellLinkW(iface); - - TRACE("(%p)->(hwnd=%p flags=%x)\n",This, hwnd, fFlags); - - /*FIXME: use IResolveShellLink interface */ - - if (!This->sPath && This->pPidl) { - WCHAR buffer[MAX_PATH]; - - bSuccess = SHGetPathFromIDListW(This->pPidl, buffer); - - if (bSuccess && *buffer) { - This->sPath = HeapAlloc(GetProcessHeap(), 0, (wcslen(buffer)+1)*sizeof(WCHAR)); - if (!This->sPath) - return E_OUTOFMEMORY; - - wcscpy(This->sPath, buffer); - - This->bDirty = TRUE; - } else - hr = S_OK; /* don't report an error occurred while just caching information */ - } - - if (!This->sIcoPath && This->sPath) { - This->sIcoPath = HeapAlloc(GetProcessHeap(), 0, (wcslen(This->sPath)+1)*sizeof(WCHAR)); - if (!This->sIcoPath) - return E_OUTOFMEMORY; - - wcscpy(This->sIcoPath, This->sPath); - This->iIcoNdx = 0; - - This->bDirty = TRUE; - } - - return hr; -} - -static LPWSTR 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 = HeapAlloc( GetProcessHeap(), 0, sizeof(WCHAR)*(len+1)); - if( !ret ) - return ret; - memcpy( ret, str, sizeof(WCHAR)*len ); - ret[len] = 0; - return ret; -} - -static HRESULT ShellLink_SetAdvertiseInfo(IShellLinkImpl *This, 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; - - This->sComponent = ShellLink_GetAdvertisedArg( szComponent ); - This->sProduct = ShellLink_GetAdvertisedArg( szProduct ); - - TRACE("Component = %s\n", debugstr_w(This->sComponent)); - TRACE("Product = %s\n", debugstr_w(This->sProduct)); - - return S_OK; -} - -static BOOL ShellLink_GetVolumeInfo(LPCWSTR path, 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; -} - -static HRESULT WINAPI IShellLinkW_fnSetPath(IShellLinkW * iface, LPCWSTR pszFile) -{ - IShellLinkImpl *This = impl_from_IShellLinkW(iface); - 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, This->sPath); - This->sPath = NULL; - - HeapFree(GetProcessHeap(), 0, This->sComponent); - This->sComponent = NULL; - - if (This->pPidl) - ILFree(This->pPidl); - This->pPidl = NULL; - - if (S_OK != ShellLink_SetAdvertiseInfo( This, 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; - - This->pPidl = SHSimpleIDListFromPathW(pszFile); - ShellLink_GetVolumeInfo(buffer, &This->volume); - - This->sPath = HeapAlloc( GetProcessHeap(), 0, - (wcslen( buffer )+1) * sizeof (WCHAR) ); - if (!This->sPath) - return E_OUTOFMEMORY; - - wcscpy(This->sPath, buffer); - } - This->bDirty = TRUE; - HeapFree(GetProcessHeap(), 0, unquoted); - - return hr; -} - -/************************************************************************** -* IShellLinkW Implementation -*/ - -static const IShellLinkWVtbl slvtw = -{ - IShellLinkW_fnQueryInterface, - IShellLinkW_fnAddRef, - IShellLinkW_fnRelease, - IShellLinkW_fnGetPath, - IShellLinkW_fnGetIDList, - IShellLinkW_fnSetIDList, - IShellLinkW_fnGetDescription, - IShellLinkW_fnSetDescription, - IShellLinkW_fnGetWorkingDirectory, - IShellLinkW_fnSetWorkingDirectory, - IShellLinkW_fnGetArguments, - IShellLinkW_fnSetArguments, - IShellLinkW_fnGetHotkey, - IShellLinkW_fnSetHotkey, - IShellLinkW_fnGetShowCmd, - IShellLinkW_fnSetShowCmd, - IShellLinkW_fnGetIconLocation, - IShellLinkW_fnSetIconLocation, - IShellLinkW_fnSetRelativePath, - IShellLinkW_fnResolve, - IShellLinkW_fnSetPath -}; - -static HRESULT WINAPI -ShellLink_DataList_QueryInterface( IShellLinkDataList* iface, REFIID riid, void** ppvObject) -{ - IShellLinkImpl *This = impl_from_IShellLinkDataList(iface); - return IShellLinkA_QueryInterface((IShellLinkA*)This, riid, ppvObject); -} - -static ULONG WINAPI -ShellLink_DataList_AddRef( IShellLinkDataList* iface ) -{ - IShellLinkImpl *This = impl_from_IShellLinkDataList(iface); - return IShellLinkA_AddRef((IShellLinkA*)This); -} - -static ULONG WINAPI -ShellLink_DataList_Release( IShellLinkDataList* iface ) -{ - IShellLinkImpl *This = impl_from_IShellLinkDataList(iface); - return ShellLink_Release( This ); -} - -static HRESULT WINAPI -ShellLink_AddDataBlock( IShellLinkDataList* iface, void* pDataBlock ) -{ - FIXME("\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI -ShellLink_CopyDataBlock( IShellLinkDataList* iface, DWORD dwSig, void** ppDataBlock ) -{ - IShellLinkImpl *This = impl_from_IShellLinkDataList(iface); - LPVOID block = NULL; - HRESULT r = E_FAIL; - - TRACE("%p %08x %p\n", iface, dwSig, ppDataBlock ); - - switch (dwSig) - { - case EXP_DARWIN_ID_SIG: - if (!This->sComponent) - break; - block = shelllink_build_darwinid( This->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; -} - -static HRESULT WINAPI -ShellLink_RemoveDataBlock( IShellLinkDataList* iface, DWORD dwSig ) -{ - FIXME("\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI -ShellLink_GetFlags( IShellLinkDataList* iface, DWORD* pdwFlags ) -{ - IShellLinkImpl *This = impl_from_IShellLinkDataList(iface); - DWORD flags = 0; - - FIXME("%p %p\n", This, pdwFlags ); - - /* FIXME: add more */ - if (This->sArgs) - flags |= SLDF_HAS_ARGS; - if (This->sComponent) - flags |= SLDF_HAS_DARWINID; - if (This->sIcoPath) - flags |= SLDF_HAS_ICONLOCATION; -#if (NTDDI_VERSION < NTDDI_LONGHORN) - if (This->sProduct) - flags |= SLDF_HAS_LOGO3ID; -#endif - if (This->pPidl) - flags |= SLDF_HAS_ID_LIST; - - *pdwFlags = flags; - - return S_OK; -} - -static HRESULT WINAPI -ShellLink_SetFlags( IShellLinkDataList* iface, DWORD dwFlags ) -{ - FIXME("\n"); - return E_NOTIMPL; -} - -static const IShellLinkDataListVtbl dlvt = -{ - ShellLink_DataList_QueryInterface, - ShellLink_DataList_AddRef, - ShellLink_DataList_Release, - ShellLink_AddDataBlock, - ShellLink_CopyDataBlock, - ShellLink_RemoveDataBlock, - ShellLink_GetFlags, - ShellLink_SetFlags -}; - -static HRESULT WINAPI -ShellLink_ExtInit_QueryInterface( IShellExtInit* iface, REFIID riid, void** ppvObject ) -{ - IShellLinkImpl *This = impl_from_IShellExtInit(iface); - return IShellLinkA_QueryInterface((IShellLinkA*)This, riid, ppvObject); -} - -static ULONG WINAPI -ShellLink_ExtInit_AddRef( IShellExtInit* iface ) -{ - IShellLinkImpl *This = impl_from_IShellExtInit(iface); - return IShellLinkA_AddRef((IShellLinkA*)This); -} - -static ULONG WINAPI -ShellLink_ExtInit_Release( IShellExtInit* iface ) -{ - IShellLinkImpl *This = impl_from_IShellExtInit(iface); - return ShellLink_Release( This ); -} - -/************************************************************************** - * ShellLink implementation of IShellExtInit::Initialize() - * - * Loads the shelllink from the dataobject the shell is pointing to. - */ -static HRESULT WINAPI -ShellLink_ExtInit_Initialize( IShellExtInit* iface, LPCITEMIDLIST pidlFolder, - IDataObject *pdtobj, HKEY hkeyProgID ) -{ - IShellLinkImpl *This = impl_from_IShellExtInit(iface); - 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( IDataObject_GetData( pdtobj, &format, &stgm ) ) ) - return r; - - count = DragQueryFileW( stgm.u.hGlobal, -1, NULL, 0 ); - if( count == 1 ) - { - LPWSTR path; - - count = DragQueryFileW( stgm.u.hGlobal, 0, NULL, 0 ); - count++; - path = HeapAlloc( GetProcessHeap(), 0, count*sizeof(WCHAR) ); - if( path ) - { - IPersistFile *pf = (IPersistFile*) &This->lpvtblPersistFile; - - count = DragQueryFileW( stgm.u.hGlobal, 0, path, count ); - r = IPersistFile_Load( pf, path, 0 ); - HeapFree( GetProcessHeap(), 0, path ); - } - } - ReleaseStgMedium( &stgm ); - - return r; -} - -static const IShellExtInitVtbl eivt = -{ - ShellLink_ExtInit_QueryInterface, - ShellLink_ExtInit_AddRef, - ShellLink_ExtInit_Release, - ShellLink_ExtInit_Initialize -}; - -static HRESULT WINAPI -ShellLink_ContextMenu_QueryInterface( IContextMenu* iface, REFIID riid, void** ppvObject ) -{ - IShellLinkImpl *This = impl_from_IContextMenu(iface); - return IShellLinkA_QueryInterface((IShellLinkA*)This, riid, ppvObject); -} - -static ULONG WINAPI -ShellLink_ContextMenu_AddRef( IContextMenu* iface ) -{ - IShellLinkImpl *This = impl_from_IContextMenu(iface); - return IShellLinkA_AddRef((IShellLinkA*)This); -} - -static ULONG WINAPI -ShellLink_ContextMenu_Release( IContextMenu* iface ) -{ - IShellLinkImpl *This = impl_from_IContextMenu(iface); - return ShellLink_Release( This ); -} - -static HRESULT WINAPI -ShellLink_QueryContextMenu( IContextMenu* iface, HMENU hmenu, UINT indexMenu, - UINT idCmdFirst, UINT idCmdLast, UINT uFlags ) -{ - IShellLinkImpl *This = impl_from_IContextMenu(iface); - 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; - This->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 = 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; -} - -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 -SH_ShellLinkDlgProc( - HWND hwndDlg, - UINT uMsg, - WPARAM wParam, - LPARAM lParam -) -{ - LPPROPSHEETPAGEW ppsp; - LPPSHNOTIFY lppsn; - IShellLinkImpl *This; - HWND hDlgCtrl; - WCHAR szBuffer[MAX_PATH]; - WCHAR * ptr; - int IconIndex; - INT_PTR result; - - This = (IShellLinkImpl *)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); - - This = (IShellLinkImpl *)ppsp->lParam; - SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)This); - - TRACE("sArgs: %S sComponent: %S sDescription: %S sIcoPath: %S sPath: %S sPathRel: %S sProduct: %S sWorkDir: %S\n", This->sArgs, This->sComponent ,This->sDescription, - This->sIcoPath, This->sPath, This->sPathRel, This->sProduct, This->sWorkDir); - - /* target path */ - hDlgCtrl = GetDlgItem( hwndDlg, 14009 ); - if ( hDlgCtrl != NULL ) - SendMessageW( hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)This->sPath ); - - /* working dir */ - hDlgCtrl = GetDlgItem( hwndDlg, 14011 ); - if ( hDlgCtrl != NULL ) - SendMessageW( hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)This->sWorkDir ); - - /* description */ - hDlgCtrl = GetDlgItem( hwndDlg, 14019 ); - if ( hDlgCtrl != NULL ) - SendMessageW( hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)This->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 ); - IShellLinkW_fnSetWorkingDirectory((IShellLinkW*)&This->lpvtblw, 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; - } - - IShellLinkW_fnSetPath((IShellLinkW*)&This->lpvtblw, szBuffer); - - TRACE("This %p sLinkPath %S\n", This, This->sLinkPath); - IPersistFile_fnSave( (IPersistFile*)&This->lpvtblPersistFile, This->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 (This->sIcoPath) - wcscpy(szBuffer, This->sIcoPath); - else - wcscpy(szBuffer, This->sPath); - - IconIndex = This->iIcoNdx; - if (PickIconDlg(hwndDlg, szBuffer, MAX_PATH, &IconIndex)) - { - IShellLinkW_fnSetIconLocation((IShellLinkW*)&This->lpvtblw, szBuffer, IconIndex); - /// - /// FIXME redraw icon - } - return TRUE; - case 14022: - result = DialogBoxParamW(shell32_hInstance, MAKEINTRESOURCEW(SHELL_EXTENDED_SHORTCUT_DLG), hwndDlg, ExtendedShortcutProc, (LPARAM)This->bRunAs); - if (result == 1 || result == 0) - { - if ( This->bRunAs != result ) - { - PropSheet_Changed(GetParent(hwndDlg), hwndDlg); - } - - This->bRunAs = result; - } - return TRUE; - } - switch(HIWORD(wParam)) - { - case EN_CHANGE: - PropSheet_Changed(GetParent(hwndDlg), hwndDlg); - break; - } - break; - default: - break; - } - return FALSE; -} - -/************************************************************************** - * ShellLink_IShellPropSheetExt interface - */ - -static HRESULT WINAPI - ShellLink_IShellPropSheetExt_QueryInterface( IShellPropSheetExt* iface, REFIID riid, void** ppvObject ) -{ - IShellLinkImpl *This = impl_from_IShellPropSheetExt(iface); - return ShellLink_QueryInterface( This, riid, ppvObject ); -} - -static ULONG WINAPI - ShellLink_IShellPropSheetExt_AddRef( IShellPropSheetExt* iface ) -{ - IShellLinkImpl *This = impl_from_IShellPropSheetExt(iface); - return ShellLink_AddRef( This ); -} - -static ULONG WINAPI - ShellLink_IShellPropSheetExt_Release( IShellPropSheetExt* iface ) -{ - IShellLinkImpl *This = impl_from_IShellPropSheetExt(iface); - return ShellLink_Release( This ); -} - -static HRESULT WINAPI - ShellLink_IShellPropSheetExt_AddPages( IShellPropSheetExt *iface, LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam) -{ - HPROPSHEETPAGE hPage; - BOOL bRet; - IShellLinkImpl *This = impl_from_IShellPropSheetExt(iface); - - 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; -} - -static HRESULT WINAPI - ShellLink_IShellPropSheetExt_ReplacePages( IShellPropSheetExt *iface, UINT uPageID, LPFNADDPROPSHEETPAGE pfnReplacePage, LPARAM lParam) -{ - IShellLinkImpl *This = impl_from_IShellPropSheetExt(iface); - TRACE("(%p) (uPageID %u, pfnReplacePage %p lParam %p\n", This, uPageID, pfnReplacePage, lParam); - return E_NOTIMPL; -} - -static const IShellPropSheetExtVtbl pse = -{ - ShellLink_IShellPropSheetExt_QueryInterface, - ShellLink_IShellPropSheetExt_AddRef, - ShellLink_IShellPropSheetExt_Release, - ShellLink_IShellPropSheetExt_AddPages, - ShellLink_IShellPropSheetExt_ReplacePages -}; - -static HRESULT WINAPI -ShellLink_InvokeCommand( IContextMenu* iface, LPCMINVOKECOMMANDINFO lpici ) -{ - IShellLinkImpl *This = impl_from_IContextMenu(iface); - 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 = IShellLinkW_Resolve( (IShellLinkW*)&(This->lpvtblw), hwnd, 0 ); - if ( FAILED( r ) ) - { - TRACE("failed to resolve component with error 0x%08x", r); - return r; - } - if ( This->sComponent ) - { - path = shelllink_get_msi_component_path( This->sComponent ); - if (!path) - return E_FAIL; - } - else - path = strdupW( This->sPath ); - - if ( lpici->cbSize == sizeof (CMINVOKECOMMANDINFOEX) && - ( lpici->fMask & CMIC_MASK_UNICODE ) ) - { - LPCMINVOKECOMMANDINFOEX iciex = (LPCMINVOKECOMMANDINFOEX) lpici; - DWORD len = 2; - - if ( This->sArgs ) - len += wcslen( This->sArgs ); - if ( iciex->lpParametersW ) - len += wcslen( iciex->lpParametersW ); - - args = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) ); - args[0] = 0; - if ( This->sArgs ) - wcscat( args, This->sArgs ); - if ( iciex->lpParametersW ) - { - static const WCHAR space[] = { ' ', 0 }; - wcscat( args, space ); - wcscat( args, iciex->lpParametersW ); - } - } - else if (This->sArgs != NULL) - { - args = strdupW( This->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 = This->iShowCmd; - sei.lpDirectory = This->sWorkDir; - sei.lpParameters = args; - sei.lpVerb = szOpen; - - // HACK for ShellExecuteExW - if (!wcsstr(This->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; -} - -static HRESULT WINAPI -ShellLink_GetCommandString( IContextMenu* iface, UINT_PTR idCmd, UINT uType, - UINT* pwReserved, LPSTR pszName, UINT cchMax ) -{ - IShellLinkImpl *This = impl_from_IContextMenu(iface); - - FIXME("%p %lu %u %p %p %u\n", This, - idCmd, uType, pwReserved, pszName, cchMax ); - - return E_NOTIMPL; -} - -static const IContextMenuVtbl cmvt = -{ - ShellLink_ContextMenu_QueryInterface, - ShellLink_ContextMenu_AddRef, - ShellLink_ContextMenu_Release, - ShellLink_QueryContextMenu, - ShellLink_InvokeCommand, - ShellLink_GetCommandString -}; - -static HRESULT WINAPI -ShellLink_ObjectWithSite_QueryInterface( IObjectWithSite* iface, REFIID riid, void** ppvObject ) -{ - IShellLinkImpl *This = impl_from_IObjectWithSite(iface); - return ShellLink_QueryInterface( This, riid, ppvObject ); -} - -static ULONG WINAPI -ShellLink_ObjectWithSite_AddRef( IObjectWithSite* iface ) -{ - IShellLinkImpl *This = impl_from_IObjectWithSite(iface); - return ShellLink_AddRef( This ); -} - -static ULONG WINAPI -ShellLink_ObjectWithSite_Release( IObjectWithSite* iface ) -{ - IShellLinkImpl *This = impl_from_IObjectWithSite(iface); - return ShellLink_Release( This ); -} - -static HRESULT WINAPI -ShellLink_GetSite( IObjectWithSite *iface, REFIID iid, void ** ppvSite ) -{ - IShellLinkImpl *This = impl_from_IObjectWithSite(iface); - - TRACE("%p %s %p\n", This, debugstr_guid( iid ), ppvSite ); - - if ( !This->site ) - return E_FAIL; - return IUnknown_QueryInterface( This->site, iid, ppvSite ); -} - -static HRESULT WINAPI -ShellLink_SetSite( IObjectWithSite *iface, IUnknown *punk ) -{ - IShellLinkImpl *This = impl_from_IObjectWithSite(iface); - - TRACE("%p %p\n", iface, punk); - - if ( punk ) - IUnknown_AddRef( punk ); - This->site = punk; - - return S_OK; -} - -static const IObjectWithSiteVtbl owsvt = -{ - ShellLink_ObjectWithSite_QueryInterface, - ShellLink_ObjectWithSite_AddRef, - ShellLink_ObjectWithSite_Release, - ShellLink_SetSite, - ShellLink_GetSite, -}; diff --git a/reactos/dll/win32/shell32/shellole.c b/reactos/dll/win32/shell32/shellole.c deleted file mode 100644 index 37a3334d310..00000000000 --- a/reactos/dll/win32/shell32/shellole.c +++ /dev/null @@ -1,673 +0,0 @@ -/* - * 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 - -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'}; -static const GUID dummy1 = {0xD969A300, 0xE7FF, 0x11d0, {0xA9, 0x3B, 0x00, 0xA0, 0xC9, 0x0F, 0x27, 0x19} }; - -/************************************************************************** - * Default ClassFactory types - */ -typedef HRESULT (CALLBACK *LPFNCREATEINSTANCE)(IUnknown* pUnkOuter, REFIID riid, LPVOID* ppvObject); -static IClassFactory * IDefClF_fnConstructor(LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll, REFIID riidInst); - -/* this table contains all CLSID's of shell32 objects */ -static const struct { - REFIID riid; - LPFNCREATEINSTANCE lpfnCI; -} InterfaceTable[] = { - {&CLSID_ShellFSFolder, &IFSFolder_Constructor}, - {&CLSID_MyComputer, &ISF_MyComputer_Constructor}, - {&CLSID_NetworkPlaces, &ISF_NetworkPlaces_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}, -#if 0 - {&CLSID_UnixFolder, &UnixFolder_Constructor}, - {&CLSID_UnixDosFolder, &UnixDosFolder_Constructor}, - {&CLSID_FolderShortcut, &FolderShortcut_Constructor}, -#endif - {&CLSID_MyDocuments, &ISF_MyDocuments_Constructor}, - {&CLSID_FontsFolderShortcut, &ISF_Fonts_Constructor}, - {&CLSID_Printers, &ISF_Printers_Constructor}, - {&CLSID_AdminFolderShortcut, &ISF_AdminTools_Constructor}, - {&CLSID_RecycleBin, &RecycleBin_Constructor}, - {&CLSID_OpenWith, &SHEOW_Constructor}, - {&dummy1, &INewItem_Constructor}, - {&CLSID_StartMenu, &StartMenu_Constructor}, - {&CLSID_MenuBandSite, &MenuBandSite_Constructor}, - {NULL,NULL} -}; - - -/* 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; - IClassFactory * pcf = NULL; - - 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 */ - HANDLE 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 (FAILED(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 = IClassFactory_CreateInstance(pcf, pUnkOuter, refiid, ppv); - IClassFactory_Release(pcf); -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; -} - -/************************************************************************* - * DllGetClassObject [SHELL32.@] - * SHDllGetClassObject [SHELL32.128] - */ -HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) -{ - HRESULT hres = E_OUTOFMEMORY; - IClassFactory * pcf = NULL; - int i; - - TRACE("CLSID:%s,IID:%s\n",shdebugstr_guid(rclsid),shdebugstr_guid(iid)); - - if (!ppv) return E_INVALIDARG; - *ppv = NULL; - - /* search our internal interface table */ - for(i=0;InterfaceTable[i].riid;i++) { - if(IsEqualIID(InterfaceTable[i].riid, rclsid)) { - TRACE("index[%u]\n", i); - pcf = IDefClF_fnConstructor(InterfaceTable[i].lpfnCI, NULL, NULL); - } - } - - if (!pcf) { - FIXME("failed for CLSID=%s\n", shdebugstr_guid(rclsid)); - return CLASS_E_CLASSNOTAVAILABLE; - } - - hres = IClassFactory_QueryInterface(pcf, iid, ppv); - IClassFactory_Release(pcf); - - TRACE("-- pointer to class factory: %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); -} -DWORD WINAPI SHCLSIDFromStringAW (LPCVOID clsid, CLSID *id) -{ - if (SHELL_OsIsUnicode()) - return SHCLSIDFromStringW (clsid, id); - return SHCLSIDFromStringA (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 = ISF_Desktop_Constructor(NULL, &IID_IShellFolder,(LPVOID*)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. - */ - -typedef struct -{ - const IClassFactoryVtbl *lpVtbl; - LONG ref; - CLSID *rclsid; - LPFNCREATEINSTANCE lpfnCI; - const IID * riidInst; - LONG * pcRefDll; /* pointer to refcounter in external dll (ugrrr...) */ -} IDefClFImpl; - -static const IClassFactoryVtbl dclfvt; - -/************************************************************************** - * IDefClF_fnConstructor - */ - -static IClassFactory * IDefClF_fnConstructor(LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll, REFIID riidInst) -{ - IDefClFImpl* lpclf; - - lpclf = HeapAlloc(GetProcessHeap(),0,sizeof(IDefClFImpl)); - lpclf->ref = 1; - lpclf->lpVtbl = &dclfvt; - lpclf->lpfnCI = lpfnCI; - lpclf->pcRefDll = pcRefDll; - - if (pcRefDll) InterlockedIncrement(pcRefDll); - lpclf->riidInst = riidInst; - - TRACE("(%p)%s\n",lpclf, shdebugstr_guid(riidInst)); - return (LPCLASSFACTORY)lpclf; -} -/************************************************************************** - * IDefClF_fnQueryInterface - */ -static HRESULT WINAPI IDefClF_fnQueryInterface( - LPCLASSFACTORY iface, REFIID riid, LPVOID *ppvObj) -{ - IDefClFImpl *This = (IDefClFImpl *)iface; - - TRACE("(%p)->(%s)\n",This,shdebugstr_guid(riid)); - - *ppvObj = NULL; - - if(IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IClassFactory)) { - *ppvObj = This; - InterlockedIncrement(&This->ref); - return S_OK; - } - - TRACE("-- E_NOINTERFACE\n"); - return E_NOINTERFACE; -} -/****************************************************************************** - * IDefClF_fnAddRef - */ -static ULONG WINAPI IDefClF_fnAddRef(LPCLASSFACTORY iface) -{ - IDefClFImpl *This = (IDefClFImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE("(%p)->(count=%u)\n", This, refCount - 1); - - return refCount; -} -/****************************************************************************** - * IDefClF_fnRelease - */ -static ULONG WINAPI IDefClF_fnRelease(LPCLASSFACTORY iface) -{ - IDefClFImpl *This = (IDefClFImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE("(%p)->(count=%u)\n", This, refCount + 1); - - if (!refCount) - { - if (This->pcRefDll) InterlockedDecrement(This->pcRefDll); - - TRACE("-- destroying IClassFactory(%p)\n",This); - HeapFree(GetProcessHeap(),0,This); - return 0; - } - return refCount; -} -/****************************************************************************** - * IDefClF_fnCreateInstance - */ -static HRESULT WINAPI IDefClF_fnCreateInstance( - LPCLASSFACTORY iface, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObject) -{ - IDefClFImpl *This = (IDefClFImpl *)iface; - - TRACE("%p->(%p,%s,%p)\n",This,pUnkOuter,shdebugstr_guid(riid),ppvObject); - - *ppvObject = NULL; - - if ( This->riidInst==NULL || - IsEqualCLSID(riid, This->riidInst) || - IsEqualCLSID(riid, &IID_IUnknown) ) - { - return This->lpfnCI(pUnkOuter, riid, ppvObject); - } - - ERR("unknown IID requested %s\n",shdebugstr_guid(riid)); - return E_NOINTERFACE; -} -/****************************************************************************** - * IDefClF_fnLockServer - */ -static HRESULT WINAPI IDefClF_fnLockServer(LPCLASSFACTORY iface, BOOL fLock) -{ - IDefClFImpl *This = (IDefClFImpl *)iface; - TRACE("%p->(0x%x), not implemented\n",This, fLock); - return E_NOTIMPL; -} - -static const IClassFactoryVtbl dclfvt = -{ - IDefClF_fnQueryInterface, - IDefClF_fnAddRef, - IDefClF_fnRelease, - IDefClF_fnCreateInstance, - IDefClF_fnLockServer -}; - -/****************************************************************************** - * 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; - - TRACE("%s %p %p %p %s\n", - shdebugstr_guid(riid), ppv, lpfnCI, pcRefDll, shdebugstr_guid(riidInst)); - - if (! IsEqualCLSID(riid, &IID_IClassFactory) ) return E_NOINTERFACE; - if (! (pcf = IDefClF_fnConstructor(lpfnCI, (PLONG)pcRefDll, riidInst))) return E_OUTOFMEMORY; - *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(h); -} - -/************************************************************************* - * DragQueryPoint [SHELL32.@] - */ -BOOL WINAPI DragQueryPoint(HDROP hDrop, POINT *p) -{ - DROPFILES *lpDropFileStruct; - BOOL bRet; - - TRACE("\n"); - - lpDropFileStruct = 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 = 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 = 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 = 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 = 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/reactos/dll/win32/shell32/shellord.c b/reactos/dll/win32/shell32/shellord.c deleted file mode 100644 index b1f5aed4dba..00000000000 --- a/reactos/dll/win32/shell32/shellord.c +++ /dev/null @@ -1,2323 +0,0 @@ -/* - * The parameters of many functions changes between different OS versions - * (NT uses Unicode strings, 95 uses ASCII strings) - * - * Copyright 1997 Marcus Meissner - * 1998 Jürgen 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 - -#define COBJMACROS - -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wine/debug.h" -#include "winnls.h" -#include "winternl.h" - -#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" -#include "commoncontrols.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 HANDLE WINAPI CreateMRUListA(LPCREATEMRULISTA lpcml); -extern DWORD WINAPI FreeMRUList(HANDLE hMRUList); -extern INT WINAPI AddMRUData(HANDLE hList, LPCVOID lpData, DWORD cbData); -extern INT WINAPI FindMRUData(HANDLE hList, LPCVOID lpData, DWORD cbData, LPINT lpRegNum); -extern INT WINAPI EnumMRUListA(HANDLE hList, INT nItemPos, LPVOID lpBuffer, DWORD nBufferSize); - - -/* Get a function pointer from a DLL handle */ -#define GET_FUNC(func, module, name, fail) \ - do { \ - if (!func) { \ - if (!SHELL32_h##module && !(SHELL32_h##module = LoadLibraryA(#module ".dll"))) return fail; \ - func = (void*)GetProcAddress(SHELL32_h##module, name); \ - if (!func) return fail; \ - } \ - } while (0) - -/* Function pointers for GET_FUNC macro */ -static HMODULE SHELL32_hshlwapi=NULL; -static HANDLE (WINAPI *pSHAllocShared)(LPCVOID,DWORD,DWORD); -static LPVOID (WINAPI *pSHLockShared)(HANDLE,DWORD); -static BOOL (WINAPI *pSHUnlockShared)(LPVOID); -static BOOL (WINAPI *pSHFreeShared)(HANDLE,DWORD); - - -/************************************************************************* - * 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] - */ -DWORD WINAPI ParseFieldAW(LPCVOID src, DWORD nField, LPVOID dst, DWORD len) -{ - if (SHELL_OsIsUnicode()) - return ParseFieldW(src, nField, dst, len); - return ParseFieldA(src, nField, dst, len); -} - -/************************************************************************* - * GetFileNameFromBrowse [SHELL32.63] - * - */ -BOOL WINAPI GetFileNameFromBrowse( - HWND hwndOwner, - LPWSTR lpstrFile, - UINT nMaxFile, - LPCWSTR lpstrInitialDir, - LPCWSTR lpstrDefExt, - LPCWSTR lpstrFilter, - LPCWSTR lpstrTitle) -{ - HMODULE hmodule; - FARPROC 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 = 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] - */ -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 - * - */ -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. - */ -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 - */ -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 - */ -DWORD 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(data1, 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]; - CHAR * ext; - IMalloc *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); - IMalloc_Free(ppM, pidl); - } - else { - /* serious issues */ - link_dir[0] = 0; - ERR("serious issues 1\n"); - } - IMalloc_Release(ppM); - } - 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(pv, doc_name); - break; - - case SHARD_PATHA: - lstrcpynA(doc_name, pv, MAX_PATH); - break; - - case SHARD_PATHW: - WideCharToMultiByte(CP_ACP, 0, 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)); - - /* check if file is a shortcut */ - ext = strrchr(doc_name, '.'); - if (!lstrcmpiA(ext, ".lnk")) - { - IShellLinkA * ShellLink; - - IShellLink_ConstructFromFile(NULL, &IID_IShellLinkA, (LPCITEMIDLIST)SHSimpleIDListFromPathA(doc_name), (LPVOID*)&ShellLink); - IShellLinkA_GetPath(ShellLink, doc_name, MAX_PATH, NULL, 0); - - IShellLinkA_Release(ShellLink); - } - - ext = strrchr(doc_name, '.'); - if (!lstrcmpiA(ext, ".exe")) - { - /* executables are not added */ - return; - } - - 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 - */ - IShellLinkA *psl = NULL; - IPersistFile *pPf = NULL; - HRESULT hres; - CHAR desc[MAX_PATH]; - WCHAR widelink[MAX_PATH]; - - CoInitialize(0); - - hres = CoCreateInstance( &CLSID_ShellLink, - NULL, - CLSCTX_INPROC_SERVER, - &IID_IShellLinkA, - (LPVOID )&psl); - if(SUCCEEDED(hres)) { - - hres = IShellLinkA_QueryInterface(psl, &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 = IShellLinkA_SetIDList(psl, pv); - } else { - hres = IShellLinkA_SetPath(psl, pv); - } - if(FAILED(hres)) { - /* bombed */ - ERR("failed Set{IDList|Path} %08x\n", hres); - goto fail; - } - - lstrcpyA(desc, "Shortcut to "); - lstrcatA(desc, doc_name); - hres = IShellLinkA_SetDescription(psl, 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 = IPersistFile_Save(pPf, widelink, TRUE); - if(FAILED(hres)) { - /* bombed */ - ERR("failed IPersistFile::Save %08x\n", hres); - IPersistFile_Release(pPf); - IShellLinkA_Release(psl); - goto fail; - } - hres = IPersistFile_SaveCompleted(pPf, widelink); - IPersistFile_Release(pPf); - IShellLinkA_Release(psl); - 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); - - psf = IShellView_Constructor(psvcbi->pshf); - - if (!psf) - return E_OUTOFMEMORY; - - IShellView_AddRef(psf); - hRes = IShellView_QueryInterface(psf, &IID_IShellView, (LPVOID *)ppv); - IShellView_Release(psf); - - return hRes; -} -/************************************************************************* - * SHWinHelp [SHELL32.127] - * - */ -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] - * - */ -HRESULT 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; - - IUnknown_AddRef(SHELL32_IExplorerInterface); - 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 = 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) -{ - GET_FUNC(pSHAllocShared, shlwapi, (char*)7, NULL); - return pSHAllocShared(lpvData, dwSize, dwProcId); -} - -/************************************************************************* - * SHLockShared [SHELL32.521] - * - * See shlwapi.SHLockShared - */ -LPVOID WINAPI SHLockShared(HANDLE hShared, DWORD dwProcId) -{ - GET_FUNC(pSHLockShared, shlwapi, (char*)8, NULL); - return pSHLockShared(hShared, dwProcId); -} - -/************************************************************************* - * SHUnlockShared [SHELL32.522] - * - * See shlwapi.SHUnlockShared - */ -BOOL WINAPI SHUnlockShared(LPVOID lpView) -{ - GET_FUNC(pSHUnlockShared, shlwapi, (char*)9, FALSE); - return pSHUnlockShared(lpView); -} - -/************************************************************************* - * SHFreeShared [SHELL32.523] - * - * See shlwapi.SHFreeShared - */ -BOOL WINAPI SHFreeShared(HANDLE hShared, DWORD dwProcId) -{ - GET_FUNC(pSHFreeShared, shlwapi, (char*)10, FALSE); - return pSHFreeShared(hShared, dwProcId); -} - -/************************************************************************* - * SetAppStartingCursor [SHELL32.99] - */ -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] - * - */ -HRESULT WINAPI DriveType(int DriveType) -{ - WCHAR root[] = L"A:\\"; - root[0] = L'A' + DriveType; - return GetDriveTypeW(root); -} -/************************************************************************* - * InvalidateDriveType [SHELL32.65] - * Unimplemented in XP SP3 - */ -int WINAPI InvalidateDriveType(int u) -{ - TRACE("0x%08x stub\n",u); - return 0; -} -/************************************************************************* - * SHAbortInvokeCommand [SHELL32.198] - * - */ -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] - * - */ -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 - */ -DWORD WINAPI RLBuildListOfPaths (void) -{ FIXME("stub\n"); - return 0; -} -/************************************************************************ - * SHValidateUNC [SHELL32.173] - * - */ -HRESULT 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 - */ -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 = 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. - */ -DWORD WINAPI DoEnvironmentSubstW(LPWSTR pszString, UINT cchString) -{ - LPWSTR dst; - BOOL res = FALSE; - FIXME("(%s, %d): stub\n", debugstr_w(pszString), cchString); - if ((dst = 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(x, y); - return DoEnvironmentSubstA(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] - */ -BOOL WINAPI PathIsTemporaryW(LPWSTR Str) -{ - FIXME("(%s)stub\n", debugstr_w(Str)); - return FALSE; -} - -/************************************************************************* - * PathIsTemporaryA [SHELL32.713] - */ -BOOL WINAPI PathIsTemporaryA(LPSTR Str) -{ - FIXME("(%s)stub\n", debugstr_a(Str)); - return FALSE; -} - -typedef struct _PSXA -{ - UINT uiCount; - UINT uiAllocated; - IShellPropSheetExt *pspsx[1]; -} 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]->lpVtbl->AddPages(psxa->pspsx[i], 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] - */ -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; - IShellExtInit *psxi; - IShellPropSheetExt *pspsx; - 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 = LocalAlloc(LMEM_FIXED, FIELD_OFFSET(PSXA, pspsx[max_iface])); - if (psxa) - { - ZeroMemory(psxa, FIELD_OFFSET(PSXA, pspsx[max_iface])); - 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)) - { - /* 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->lpVtbl->QueryInterface(pspsx, &IID_IShellExtInit, (PVOID *)&psxi))) - { - if (SUCCEEDED(psxi->lpVtbl->Initialize(psxi, NULL, pDataObj, hKey))) - { - /* Add the IShellPropSheetExt instance to the array */ - psxa->pspsx[psxa->uiCount++] = pspsx; - } - else - { - psxi->lpVtbl->Release(psxi); - pspsx->lpVtbl->Release(pspsx); - } - } - else - pspsx->lpVtbl->Release(pspsx); - } - } - } 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]->lpVtbl->ReplacePage(psxa->pspsx[i], 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]->lpVtbl->Release(psxa->pspsx[i]); - } - - LocalFree(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 */ - - TRACE("(%p, %d, %p, %p)\n", pidlFolder, cpidlFiles, lppidlFiles, ppdataObject); - if (TRACE_ON(pidl)) - { - pdump (pidlFolder); - for (i=0; icbSize) - 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 = 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 = 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.@) - */ -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) - */ -BOOL WINAPI LinkWindow_RegisterClass(void) -{ - FIXME("()\n"); - return TRUE; -} - -/************************************************************************* - * LinkWindow_UnregisterClass (SHELL32.259) - */ -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. - */ -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) -{ - 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; -} - -/************************************************************************* - * SHParseDisplayName [shell version 6.0] - */ -HRESULT WINAPI SHParseDisplayName(LPCWSTR pszName, IBindCtx *pbc, -LPITEMIDLIST *ppidl, SFGAOF sfgaoIn, SFGAOF *psfgaoOut) -{ - IShellFolder * 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 = IShellFolder_ParseDisplayName(psfDesktop, (HWND)NULL, pbc, (LPOLESTR)pszName, (ULONG *)NULL, ppidl, &dwAttr); - - IShellFolder_Release(psfDesktop); - - if (SUCCEEDED(hr)) - *psfgaoOut = dwAttr; - else - *ppidl = NULL; - - return hr; -} diff --git a/reactos/dll/win32/shell32/shellpath.c b/reactos/dll/win32/shell32/shellpath.c deleted file mode 100644 index 76fc17c3bf2..00000000000 --- a/reactos/dll/win32/shell32/shellpath.c +++ /dev/null @@ -1,2029 +0,0 @@ -/* - * 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(lpszPath1, lpszPath2); - return PathAppendA(lpszPath1, lpszPath2); -} - -/************************************************************************* - * PathBuildRoot [SHELL32.30] - */ -LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive) -{ - if(SHELL_OsIsUnicode()) - return PathBuildRootW(lpszPath, drive); - return PathBuildRootA(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] - */ -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(lpszPath); - return PathRemoveFileSpecA(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] - */ -VOID WINAPI PathGetShortPathAW(LPVOID pszPath) -{ - if(SHELL_OsIsUnicode()) - PathGetShortPathW(pszPath); - PathGetShortPathA(pszPath); -} - -/* - ########## Path Testing ########## -*/ - -/************************************************************************* - * PathIsRoot [SHELL32.29] - */ -BOOL WINAPI PathIsRootAW(LPCVOID lpszPath) -{ - if (SHELL_OsIsUnicode()) - return PathIsRootW(lpszPath); - return PathIsRootA(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 (path); - return PathIsExeA(path); -} - -/************************************************************************* - * PathFileExists [SHELL32.45] - */ -BOOL WINAPI PathFileExistsAW (LPCVOID lpszPath) -{ - if (SHELL_OsIsUnicode()) - return PathFileExistsW (lpszPath); - return PathFileExistsA (lpszPath); -} - -/************************************************************************* - * PathIsSameRoot [SHELL32.650] - */ -BOOL WINAPI PathIsSameRootAW(LPCVOID lpszPath1, LPCVOID lpszPath2) -{ - if (SHELL_OsIsUnicode()) - return PathIsSameRootW(lpszPath1, lpszPath2); - return PathIsSameRootA(lpszPath1, lpszPath2); -} - -/************************************************************************* - * IsLFNDriveA [SHELL32.41] - */ -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] - */ -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] - */ -BOOL WINAPI IsLFNDriveAW(LPCVOID lpszPath) -{ - if (SHELL_OsIsUnicode()) - return IsLFNDriveW(lpszPath); - return IsLFNDriveA(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(lpszBuffer,dwBuffSize, lpszShortName,lpszLongName,lpszPathName); - return PathMakeUniqueNameA(lpszBuffer,dwBuffSize, lpszShortName,lpszLongName,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(pszPath); - return PathQualifyA(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(lpszPath, (LPCWSTR*)alpszPaths, dwFlags); - return PathResolveA(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(lpszPath, lpszBuff, dwBuffSize, dwFlags); - return PathProcessCommandA(lpszPath, 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 = 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 = 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/reactos/dll/win32/shell32/shellreg.c b/reactos/dll/win32/shell32/shellreg.c deleted file mode 100644 index 812566cd7fd..00000000000 --- a/reactos/dll/win32/shell32/shellreg.c +++ /dev/null @@ -1,144 +0,0 @@ -/* - * 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] - * - */ -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 - * - */ -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] - * - */ -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] - * - */ -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 - * - */ -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. - */ -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, 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] - */ -HRESULT WINAPI SHRegDeleteKeyW( - HKEY hkey, - LPCWSTR pszSubKey) -{ - FIXME("hkey=%p, %s\n", hkey, debugstr_w(pszSubKey)); - return 0; -} - -/************************************************************************* - * SHRegCloseKey [SHELL32.505] NT 4.0 - * - */ -HRESULT WINAPI SHRegCloseKey (HKEY hkey) -{ - TRACE("%p\n",hkey); - return RegCloseKey( hkey ); -} diff --git a/reactos/dll/win32/shell32/shellstring.c b/reactos/dll/win32/shell32/shellstring.c deleted file mode 100644 index 153807ac250..00000000000 --- a/reactos/dll/win32/shell32/shellstring.c +++ /dev/null @@ -1,264 +0,0 @@ -/* - * 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->u.pOleStr, -1, dest, len, NULL, NULL); - CoTaskMemFree(src->u.pOleStr); - break; - - case STRRET_CSTR: - lstrcpynA(dest, src->u.cStr, len); - break; - - case STRRET_OFFSET: - lstrcpynA(dest, ((LPCSTR)&pidl->mkid)+src->u.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->u.pOleStr, len); - CoTaskMemFree(src->u.pOleStr); - break; - - case STRRET_CSTR: - if (!MultiByteToWideChar( CP_ACP, 0, src->u.cStr, -1, dest, len ) && len) - dest[len-1] = 0; - break; - - case STRRET_OFFSET: - if (!MultiByteToWideChar( CP_ACP, 0, ((LPCSTR)&pidl->mkid)+src->u.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 - */ -BOOL WINAPI StrRetToStrNAW(LPVOID dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl) -{ - if(SHELL_OsIsUnicode()) - return StrRetToStrNW(dest, len, src, pidl); - else - return StrRetToStrNA(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); -} - -BOOL WINAPI StrToOleStrAW (LPWSTR lpWideCharStr, LPCVOID lpString) -{ - if (SHELL_OsIsUnicode()) - return StrToOleStrW (lpWideCharStr, lpString); - return StrToOleStrA (lpWideCharStr, 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; -} - -BOOL WINAPI StrToOleStrNAW (LPWSTR lpWide, INT nWide, LPCVOID lpStr, INT nStr) -{ - if (SHELL_OsIsUnicode()) - return StrToOleStrNW (lpWide, nWide, lpStr, nStr); - return StrToOleStrNA (lpWide, nWide, 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; -} - -BOOL WINAPI OleStrToStrNAW (LPVOID lpOut, INT nOut, LPCVOID lpIn, INT nIn) -{ - if (SHELL_OsIsUnicode()) - return OleStrToStrNW (lpOut, nOut, lpIn, nIn); - return OleStrToStrNA (lpOut, nOut, 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/reactos/dll/win32/shell32/shfldr_admintools.c b/reactos/dll/win32/shell32/shfldr_admintools.c deleted file mode 100644 index df02e28a1fa..00000000000 --- a/reactos/dll/win32/shell32/shfldr_admintools.c +++ /dev/null @@ -1,775 +0,0 @@ -/* - * Virtual Admin Tools Folder - * - * Copyright 2008 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); - - -/* List shortcuts of - * CSIDL_COMMON_ADMINTOOLS - * Note: CSIDL_ADMINTOOLS is ignored, tested with Window XP SP3+ - */ - -/*********************************************************************** - * AdminTools folder implementation - */ - -typedef struct { - IShellFolder2Vtbl *lpVtbl; - IPersistFolder2Vtbl *lpVtblPersistFolder2; - - LONG ref; - - CLSID *pclsid; - - LPITEMIDLIST pidlRoot; /* absolute pidl */ - LPWSTR szTarget; - - int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */ -} IGenericSFImpl; - -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) - - -#define _IPersistFolder2_Offset ((INT_PTR)(&(((IGenericSFImpl*)0)->lpVtblPersistFolder2))) -#define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder2_Offset); - -#define _IUnknown_(This) (IShellFolder*)&(This->lpVtbl) -#define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl) - -#define _IPersist_(This) (IPersist*)&(This->lpVtblPersistFolder2) -#define _IPersistFolder_(This) (IPersistFolder*)&(This->lpVtblPersistFolder2) -#define _IPersistFolder2_(This) (IPersistFolder2*)&(This->lpVtblPersistFolder2) - -/************************************************************************** - * ISF_AdminTools_fnQueryInterface - * - * NOTE does not support IPersist/IPersistFolder - */ -static HRESULT WINAPI ISF_AdminTools_fnQueryInterface( - IShellFolder2 * iface, REFIID riid, LPVOID * ppvObj) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); - - *ppvObj = NULL; - - if (IsEqualIID (riid, &IID_IUnknown) || - IsEqualIID (riid, &IID_IShellFolder) || - IsEqualIID (riid, &IID_IShellFolder2)) - { - *ppvObj = This; - } - - else if (IsEqualIID (riid, &IID_IPersist) || - IsEqualIID (riid, &IID_IPersistFolder) || - IsEqualIID (riid, &IID_IPersistFolder2)) - { - *ppvObj = _IPersistFolder2_ (This); - } - - if (*ppvObj) - { - IUnknown_AddRef ((IUnknown *) (*ppvObj)); - TRACE ("-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj); - return S_OK; - } - TRACE ("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI ISF_AdminTools_fnAddRef (IShellFolder2 * iface) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE ("(%p)->(count=%lu)\n", This, refCount - 1); - - return refCount; -} - -static ULONG WINAPI ISF_AdminTools_fnRelease (IShellFolder2 * iface) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE ("(%p)->(count=%lu)\n", This, refCount + 1); - - if (!refCount) - { - TRACE ("-- destroying IShellFolder(%p)\n", This); - if (This->pidlRoot) - SHFree (This->pidlRoot); - HeapFree(GetProcessHeap(), 0, This->szTarget); - HeapFree(GetProcessHeap(), 0, This); - return 0; - } - return refCount; -} - -/************************************************************************** - * ISF_AdminTools_fnParseDisplayName - * - */ -static HRESULT WINAPI ISF_AdminTools_fnParseDisplayName (IShellFolder2 * iface, - HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, - DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - 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; -} - -/************************************************************************** - * CreateAdminToolsEnumList() - */ -static BOOL CreateAdminToolsEnumList(IEnumIDList *list, IGenericSFImpl *This, DWORD dwFlags) -{ - TRACE("(%p)->(flags=0x%08x)\n", list, dwFlags); - /* enumerate the elements in %windir%\desktop */ - return CreateFolderEnumList(list, This->szTarget, dwFlags); -} - -/************************************************************************** - * ISF_AdminTools_fnEnumObjects - */ -static HRESULT WINAPI ISF_AdminTools_fnEnumObjects (IShellFolder2 * iface, - HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(HWND=%p flags=0x%08lx pplist=%p)\n", - This, hwndOwner, dwFlags, ppEnumIDList); - - if(!ppEnumIDList) return E_OUTOFMEMORY; - *ppEnumIDList = IEnumIDList_Constructor(); - if (*ppEnumIDList) - CreateAdminToolsEnumList(*ppEnumIDList, This, dwFlags); - - TRACE ("-- (%p)->(new ID List: %p)\n", This, *ppEnumIDList); - - return (*ppEnumIDList) ? S_OK : E_OUTOFMEMORY; -} - -/************************************************************************** - * ISF_AdminTools_fnBindToObject - */ -static HRESULT WINAPI ISF_AdminTools_fnBindToObject (IShellFolder2 * iface, - LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", This, - pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); - - return SHELL32_BindToChild (This->pidlRoot, NULL, pidl, riid, ppvOut); -} - -/************************************************************************** - * ISF_AdminTools_fnBindToStorage - */ -static HRESULT WINAPI ISF_AdminTools_fnBindToStorage (IShellFolder2 * iface, - LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", - This, pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); - - *ppvOut = NULL; - return E_NOTIMPL; -} - -/************************************************************************** - * ISF_AdminTools_fnCompareIDs - */ -static HRESULT WINAPI ISF_AdminTools_fnCompareIDs (IShellFolder2 * iface, - LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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_AdminTools_fnCreateViewObject - */ -static HRESULT WINAPI ISF_AdminTools_fnCreateViewObject (IShellFolder2 * iface, - HWND hwndOwner, REFIID riid, LPVOID * ppvOut) -{ - - LPSHELLVIEW pShellView; - HRESULT hr = E_INVALIDARG; - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - 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)) - { - pShellView = IShellView_Constructor ((IShellFolder *) iface); - if (pShellView) - { - hr = IShellView_QueryInterface (pShellView, riid, ppvOut); - IShellView_Release (pShellView); - } - } - TRACE ("-- (%p)->(interface=%p)\n", This, ppvOut); - return hr; -} - -/************************************************************************** - * ISF_AdminTools_fnGetAttributesOf - */ -static HRESULT WINAPI ISF_AdminTools_fnGetAttributesOf (IShellFolder2 * iface, - UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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 (_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_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 - * - */ -static HRESULT WINAPI ISF_AdminTools_fnGetUIObjectOf (IShellFolder2 * iface, - HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl, - REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - 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(This->pidlRoot, hwndOwner, cidl, apidl, (IShellFolder*)iface, NULL, 0, NULL, (IContextMenu**)&pObj); - } - else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) - { - pObj = (LPUNKNOWN) IDataObject_Constructor( hwndOwner, - This->pidlRoot, apidl, cidl); - hr = S_OK; - } - else if (IsEqualIID (riid, &IID_IExtractIconA) && (cidl == 1)) - { - pidl = ILCombine (This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl); - SHFree (pidl); - hr = S_OK; - } - else if (IsEqualIID (riid, &IID_IExtractIconW) && (cidl == 1)) - { - pidl = ILCombine (This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl); - SHFree (pidl); - hr = S_OK; - } - else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) - { - hr = IShellFolder_QueryInterface (iface, - &IID_IDropTarget, (LPVOID *) & pObj); - } - else if ((IsEqualIID(riid,&IID_IShellLinkW) || - IsEqualIID(riid,&IID_IShellLinkA)) && (cidl == 1)) - { - pidl = ILCombine (This->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_AdminTools_fnGetDisplayNameOf - * - */ -static HRESULT WINAPI ISF_AdminTools_fnGetDisplayNameOf (IShellFolder2 * iface, - LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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 = 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, This->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) && - This->szTarget) - { - wcscpy(pszPath, This->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, This->szTarget); - PathAddBackslashW(pszPath); - len = wcslen(pszPath); - - if (!SUCCEEDED(SHELL32_GetDisplayNameOfChild(iface, pidl, dwFlags | SHGDN_INFOLDER, pszPath + len, MAX_PATH + 1 - len))) - { - CoTaskMemFree(pszPath); - return E_OUTOFMEMORY; - } - - } - } - - if (SUCCEEDED(hr)) - { - strRet->uType = STRRET_WSTR; - strRet->u.pOleStr = pszPath; - TRACE ("-- (%p)->(%s,0x%08x)\n", This, debugstr_w(strRet->u.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 - */ -static HRESULT WINAPI ISF_AdminTools_fnSetNameOf (IShellFolder2 * iface, - HWND hwndOwner, LPCITEMIDLIST pidl, /* simple pidl */ - LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - FIXME ("(%p)->(%p,pidl=%p,%s,%lu,%p)\n", This, hwndOwner, pidl, - debugstr_w (lpName), dwFlags, pPidlOut); - - return E_FAIL; -} - -static HRESULT WINAPI ISF_AdminTools_fnGetDefaultSearchGUID(IShellFolder2 *iface, - GUID * pguid) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_AdminTools_fnEnumSearches (IShellFolder2 *iface, - IEnumExtraSearch ** ppenum) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_AdminTools_fnGetDefaultColumn (IShellFolder2 * iface, - DWORD dwRes, ULONG * pSort, ULONG * pDisplay) -{ - if (pSort) - *pSort = 0; - if (pDisplay) - *pDisplay = 0; - - return S_OK; -} -static HRESULT WINAPI ISF_AdminTools_fnGetDefaultColumnState ( - IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags) -{ - if (!pcsFlags || iColumn >= AdminToolsHELLVIEWCOLUMNS) - return E_INVALIDARG; - *pcsFlags = AdminToolsSFHeader[iColumn].pcsFlags; - return S_OK; - -} - -static HRESULT WINAPI ISF_AdminTools_fnGetDetailsEx (IShellFolder2 * iface, - LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p): stub\n", This); - - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_AdminTools_fnGetDetailsOf (IShellFolder2 * iface, - LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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.u.pOleStr); - - return hr; - } - - psd->str.uType = STRRET_CSTR; - switch (iColumn) - { - case COLUMN_NAME: - psd->str.uType = STRRET_WSTR; - hr = IShellFolder_GetDisplayNameOf(iface, pidl, - SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str); - break; - case COLUMN_SIZE: - _ILGetFileSize (pidl, psd->str.u.cStr, MAX_PATH); - break; - case COLUMN_TYPE: - _ILGetFileType (pidl, psd->str.u.cStr, MAX_PATH); - break; - case COLUMN_DATE: - _ILGetFileDate (pidl, psd->str.u.cStr, MAX_PATH); - break; - } - - return hr; -} - -static HRESULT WINAPI ISF_AdminTools_fnMapColumnToSCID ( - IShellFolder2 * iface, UINT column, SHCOLUMNID * pscid) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p): stub\n", This); - return E_NOTIMPL; -} - -static IShellFolder2Vtbl vt_ShellFolder2 = -{ - ISF_AdminTools_fnQueryInterface, - ISF_AdminTools_fnAddRef, - ISF_AdminTools_fnRelease, - ISF_AdminTools_fnParseDisplayName, - ISF_AdminTools_fnEnumObjects, - ISF_AdminTools_fnBindToObject, - ISF_AdminTools_fnBindToStorage, - ISF_AdminTools_fnCompareIDs, - ISF_AdminTools_fnCreateViewObject, - ISF_AdminTools_fnGetAttributesOf, - ISF_AdminTools_fnGetUIObjectOf, - ISF_AdminTools_fnGetDisplayNameOf, - ISF_AdminTools_fnSetNameOf, - /* ShellFolder2 */ - ISF_AdminTools_fnGetDefaultSearchGUID, - ISF_AdminTools_fnEnumSearches, - ISF_AdminTools_fnGetDefaultColumn, - ISF_AdminTools_fnGetDefaultColumnState, - ISF_AdminTools_fnGetDetailsEx, - ISF_AdminTools_fnGetDetailsOf, - ISF_AdminTools_fnMapColumnToSCID -}; - -/************************************************************************ - * IPF_AdminTools_QueryInterface - */ -static HRESULT WINAPI IPF_AdminTools_QueryInterface ( - IPersistFolder2 * iface, REFIID iid, LPVOID * ppvObj) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - TRACE ("(%p)\n", This); - - return IUnknown_QueryInterface (_IUnknown_ (This), iid, ppvObj); -} - -/************************************************************************ - * IPF_AdminTools_AddRef - */ -static ULONG WINAPI IPF_AdminTools_AddRef (IPersistFolder2 * iface) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - TRACE ("(%p)->(count=%lu)\n", This, This->ref); - - return IUnknown_AddRef (_IUnknown_ (This)); -} - -/************************************************************************ - * IPF_AdminTools_Release - */ -static ULONG WINAPI IPF_AdminTools_Release (IPersistFolder2 * iface) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - TRACE ("(%p)->(count=%lu)\n", This, This->ref); - - return IUnknown_Release (_IUnknown_ (This)); -} - -/************************************************************************ - * IPF_AdminTools_GetClassID - */ -static HRESULT WINAPI IPF_AdminTools_GetClassID ( - IPersistFolder2 * iface, CLSID * lpClassId) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - TRACE ("(%p)\n", This); - - memcpy(lpClassId, &CLSID_AdminFolderShortcut, sizeof(CLSID)); - - return S_OK; -} - -/************************************************************************ - * IPF_AdminTools_Initialize - * - */ -static HRESULT WINAPI IPF_AdminTools_Initialize ( - IPersistFolder2 * iface, LPCITEMIDLIST pidl) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - if (This->pidlRoot) - SHFree((LPVOID)This->pidlRoot); - - This->pidlRoot = ILClone(pidl); - return S_OK; -} - -/************************************************************************** - * IPF_AdminTools_fnGetCurFolder - */ -static HRESULT WINAPI IPF_AdminTools_GetCurFolder ( - IPersistFolder2 * iface, LPITEMIDLIST * pidl) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - TRACE ("(%p)->(%p)\n", This, pidl); - - *pidl = ILClone (This->pidlRoot); - return S_OK; -} - -static IPersistFolder2Vtbl vt_PersistFolder2 = -{ - IPF_AdminTools_QueryInterface, - IPF_AdminTools_AddRef, - IPF_AdminTools_Release, - IPF_AdminTools_GetClassID, - IPF_AdminTools_Initialize, - IPF_AdminTools_GetCurFolder -}; - -/************************************************************************** - * ISF_AdminTools_Constructor - */ -HRESULT WINAPI ISF_AdminTools_Constructor ( - IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) -{ - IGenericSFImpl *sf; - HRESULT hr; - - TRACE ("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid (riid)); - - if (pUnkOuter) - return CLASS_E_NOAGGREGATION; - - sf = HeapAlloc( GetProcessHeap(), 0, sizeof(*sf) ); - if (!sf) - return E_OUTOFMEMORY; - - sf->szTarget = HeapAlloc( GetProcessHeap(), 0, MAX_PATH * sizeof(WCHAR) ); - if (!sf->szTarget) - { - HeapFree(GetProcessHeap(), 0, sf); - return E_OUTOFMEMORY; - } - if (!SHGetSpecialFolderPathW(NULL, sf->szTarget, CSIDL_COMMON_ADMINTOOLS, FALSE)) - { - HeapFree(GetProcessHeap(), 0, sf->szTarget); - HeapFree(GetProcessHeap(), 0, sf); - return E_FAIL; - } - - sf->ref = 1; - sf->lpVtbl = &vt_ShellFolder2; - sf->lpVtblPersistFolder2 = &vt_PersistFolder2; - sf->pidlRoot = _ILCreateAdminTools(); /* my qualified pidl */ - - hr = IUnknown_QueryInterface( _IUnknown_(sf), riid, ppv ); - IUnknown_Release( _IUnknown_(sf) ); - - TRACE ("--(%p)\n", *ppv); - return hr; -} diff --git a/reactos/dll/win32/shell32/shfldr_cpanel.c b/reactos/dll/win32/shell32/shfldr_cpanel.c deleted file mode 100644 index c9f5b932de6..00000000000 --- a/reactos/dll/win32/shell32/shfldr_cpanel.c +++ /dev/null @@ -1,1413 +0,0 @@ -/* - * Control panel folder - * - * Copyright 2003 Martin Fuchs - * - * 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); - -/*********************************************************************** -* control panel implementation in shell namespace -*/ - -typedef struct { - const IShellFolder2Vtbl *lpVtbl; - LONG ref; - const IPersistFolder2Vtbl *lpVtblPersistFolder2; - const IShellExecuteHookWVtbl *lpVtblShellExecuteHookW; - const IShellExecuteHookAVtbl *lpVtblShellExecuteHookA; - const IContextMenu2Vtbl *lpVtblContextMenu; - IUnknown *pUnkOuter; /* used for aggregation */ - - /* both paths are parsible from the desktop */ - LPITEMIDLIST pidlRoot; /* absolute pidl */ - int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */ - LPCITEMIDLIST *apidl; - UINT cidl; -} ICPanelImpl, *LPICPanelImpl; - -static const IShellFolder2Vtbl vt_ShellFolder2; -static const IPersistFolder2Vtbl vt_PersistFolder2; -static const IShellExecuteHookWVtbl vt_ShellExecuteHookW; -static const IShellExecuteHookAVtbl vt_ShellExecuteHookA; -static const IContextMenu2Vtbl vt_ContextMenu; - -static LPICPanelImpl __inline impl_from_IPersistFolder2( IPersistFolder2 *iface ) -{ - return (LPICPanelImpl)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblPersistFolder2)); -} - -static LPICPanelImpl __inline impl_from_IContextMenu( IContextMenu2 *iface ) -{ - return (LPICPanelImpl)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblContextMenu)); -} - - -static LPICPanelImpl __inline impl_from_IShellExecuteHookW( IShellExecuteHookW *iface ) -{ - return (LPICPanelImpl)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblShellExecuteHookW)); -} - -static LPICPanelImpl __inline impl_from_IShellExecuteHookA( IShellExecuteHookA *iface ) -{ - return (LPICPanelImpl)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblShellExecuteHookA)); -} - - -/* - converts This to an interface pointer -*/ -#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) -#define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl) -#define _IShellFolder2_(This) (IShellFolder2*)&(This->lpVtbl) - -#define _IPersist_(This) (IPersist*)&(This->lpVtblPersistFolder2) -#define _IPersistFolder_(This) (IPersistFolder*)&(This->lpVtblPersistFolder2) -#define _IPersistFolder2_(This) (IPersistFolder2*)&(This->lpVtblPersistFolder2) -#define _IShellExecuteHookW_(This) (IShellExecuteHookW*)&(This->lpVtblShellExecuteHookW) -#define _IShellExecuteHookA_(This) (IShellExecuteHookA*)&(This->lpVtblShellExecuteHookA) - - -/*********************************************************************** -* 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 - -/************************************************************************** -* IControlPanel_Constructor -*/ -HRESULT WINAPI IControlPanel_Constructor(IUnknown* pUnkOuter, REFIID riid, LPVOID * ppv) -{ - ICPanelImpl *sf; - - TRACE("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid(riid)); - - if (!ppv) - return E_POINTER; - if (pUnkOuter && !IsEqualIID (riid, &IID_IUnknown)) - return CLASS_E_NOAGGREGATION; - - sf = (ICPanelImpl *) LocalAlloc(LMEM_ZEROINIT, sizeof(ICPanelImpl)); - if (!sf) - return E_OUTOFMEMORY; - - sf->ref = 0; - sf->apidl = NULL; - sf->cidl = 0; - sf->lpVtbl = &vt_ShellFolder2; - sf->lpVtblPersistFolder2 = &vt_PersistFolder2; - sf->lpVtblShellExecuteHookW = &vt_ShellExecuteHookW; - sf->lpVtblShellExecuteHookA = &vt_ShellExecuteHookA; - sf->lpVtblContextMenu = &vt_ContextMenu; - sf->pidlRoot = _ILCreateControlPanel(); /* my qualified pidl */ - sf->pUnkOuter = pUnkOuter ? pUnkOuter : _IUnknown_ (sf); - - if (!SUCCEEDED(IUnknown_QueryInterface(_IUnknown_(sf), riid, ppv))) { - IUnknown_Release(_IUnknown_(sf)); - return E_NOINTERFACE; - } - - TRACE("--(%p)\n", sf); - return S_OK; -} - -/************************************************************************** - * ISF_ControlPanel_fnQueryInterface - * - * NOTES supports not IPersist/IPersistFolder - */ -static HRESULT WINAPI ISF_ControlPanel_fnQueryInterface(IShellFolder2 * iface, REFIID riid, LPVOID * ppvObject) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - TRACE("(%p)->(%s,%p)\n", This, shdebugstr_guid(riid), ppvObject); - - *ppvObject = NULL; - - if (IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IShellFolder) || IsEqualIID(riid, &IID_IShellFolder2)) - *ppvObject = This; - else if (IsEqualIID(riid, &IID_IPersist) || - IsEqualIID(riid, &IID_IPersistFolder) || IsEqualIID(riid, &IID_IPersistFolder2)) - *ppvObject = _IPersistFolder2_(This); - else if (IsEqualIID(riid, &IID_IShellExecuteHookW)) - *ppvObject = _IShellExecuteHookW_(This); - else if (IsEqualIID(riid, &IID_IShellExecuteHookA)) - *ppvObject = _IShellExecuteHookA_(This); - - if (*ppvObject) { - IUnknown_AddRef((IUnknown *)(*ppvObject)); - TRACE("-- Interface:(%p)->(%p)\n", ppvObject, *ppvObject); - return S_OK; - } - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI ISF_ControlPanel_fnAddRef(IShellFolder2 * iface) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE("(%p)->(count=%u)\n", This, refCount - 1); - - return refCount; -} - -static ULONG WINAPI ISF_ControlPanel_fnRelease(IShellFolder2 * iface) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE("(%p)->(count=%u)\n", This, refCount + 1); - - if (!refCount) { - TRACE("-- destroying IShellFolder(%p)\n", This); - SHFree(This->pidlRoot); - LocalFree((HLOCAL) This); - } - return refCount; -} - -/************************************************************************** -* ISF_ControlPanel_fnParseDisplayName -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnParseDisplayName(IShellFolder2 * iface, - HWND hwndOwner, - LPBC pbc, - LPOLESTR lpszDisplayName, - DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - 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(iface, 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; -} - -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 = 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; -} - -static BOOL SHELL_RegisterCPanelApp(IEnumIDList* list, 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; icount; ++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(list, pidl); - } - Control_UnloadApplet(applet); - } - return TRUE; -} - -static int SHELL_RegisterRegistryCPanelApps(IEnumIDList* list, 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(list, value)) - ++cnt; - } - RegCloseKey(hkey); - } - - return cnt; -} - -static int SHELL_RegisterCPanelFolders(IEnumIDList* list, 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(list, pidl)) - ++cnt; - } - } - - RegCloseKey(hkey); - } - - return cnt; -} - -/************************************************************************** - * CreateCPanelEnumList() - */ -static BOOL CreateCPanelEnumList( - IEnumIDList * iface, - DWORD dwFlags) -{ - CHAR szPath[MAX_PATH]; - WIN32_FIND_DATAA wfd; - HANDLE hFile; - - TRACE("(%p)->(flags=0x%08x)\n", iface, dwFlags); - - /* enumerate control panel folders */ - if (dwFlags & SHCONTF_FOLDERS) - SHELL_RegisterCPanelFolders(iface, 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",iface,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((IEnumIDList*)iface, szPath); - } - } while(FindNextFileA(hFile, &wfd)); - FindClose(hFile); - } - - SHELL_RegisterRegistryCPanelApps((IEnumIDList*)iface, HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Cpls"); - SHELL_RegisterRegistryCPanelApps((IEnumIDList*)iface, HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Cpls"); - } - return TRUE; -} - -/************************************************************************** -* ISF_ControlPanel_fnEnumObjects -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnEnumObjects(IShellFolder2 * iface, HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - TRACE("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", This, hwndOwner, dwFlags, ppEnumIDList); - - *ppEnumIDList = IEnumIDList_Constructor(); - if (*ppEnumIDList) - CreateCPanelEnumList(*ppEnumIDList, dwFlags); - - TRACE("--(%p)->(new ID List: %p)\n", This, *ppEnumIDList); - - return(*ppEnumIDList) ? S_OK : E_OUTOFMEMORY; -} - -/************************************************************************** -* ISF_ControlPanel_fnBindToObject -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnBindToObject(IShellFolder2 * iface, LPCITEMIDLIST pidl, - LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - TRACE("(%p)->(pidl=%p,%p,%s,%p)\n", This, pidl, pbcReserved, shdebugstr_guid(riid), ppvOut); - - return SHELL32_BindToChild(This->pidlRoot, NULL, pidl, riid, ppvOut); -} - -/************************************************************************** -* ISF_ControlPanel_fnBindToStorage -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnBindToStorage(IShellFolder2 * iface, - LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - FIXME("(%p)->(pidl=%p,%p,%s,%p) stub\n", This, pidl, pbcReserved, shdebugstr_guid(riid), ppvOut); - - *ppvOut = NULL; - return E_NOTIMPL; -} - -/************************************************************************** -* ISF_ControlPanel_fnCompareIDs -*/ - -static HRESULT WINAPI -ISF_ControlPanel_fnCompareIDs(IShellFolder2 * iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - 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_ControlPanel_fnCreateViewObject -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnCreateViewObject(IShellFolder2 * iface, HWND hwndOwner, REFIID riid, LPVOID * ppvOut) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - 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)) { - 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)) { - pShellView = IShellView_Constructor((IShellFolder *) iface); - if (pShellView) { - hr = IShellView_QueryInterface(pShellView, riid, ppvOut); - IShellView_Release(pShellView); - } - } - } - TRACE("--(%p)->(interface=%p)\n", This, ppvOut); - return hr; -} - -/************************************************************************** -* ISF_ControlPanel_fnGetAttributesOf -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnGetAttributesOf(IShellFolder2 * iface, UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - 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(_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_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 -* -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnGetUIObjectOf(IShellFolder2 * iface, - HWND hwndOwner, - UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - 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 = (IUnknown*)(&This->lpVtblContextMenu); - This->apidl = apidl; - This->cidl = cidl; - IUnknown_AddRef(pObj); - hr = S_OK; - } else if (IsEqualIID(riid, &IID_IDataObject) &&(cidl >= 1)) { - pObj = (LPUNKNOWN) IDataObject_Constructor(hwndOwner, This->pidlRoot, apidl, cidl); - hr = S_OK; - } else if (IsEqualIID(riid, &IID_IExtractIconA) &&(cidl == 1)) { - pidl = ILCombine(This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconA_Constructor(pidl); - SHFree(pidl); - hr = S_OK; - } else if (IsEqualIID(riid, &IID_IExtractIconW) &&(cidl == 1)) { - pidl = ILCombine(This->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(This->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 -*/ -static HRESULT WINAPI ISF_ControlPanel_fnGetDisplayNameOf(IShellFolder2 * iface, LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - 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(iface, 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->u.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 -*/ -static HRESULT WINAPI ISF_ControlPanel_fnSetNameOf(IShellFolder2 * iface, HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */ - LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - FIXME("(%p)->(%p,pidl=%p,%s,%u,%p)\n", This, hwndOwner, pidl, debugstr_w(lpName), dwFlags, pPidlOut); - return E_FAIL; -} - -static HRESULT WINAPI ISF_ControlPanel_fnGetDefaultSearchGUID(IShellFolder2 * iface, GUID * pguid) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - FIXME("(%p)\n", This); - return E_NOTIMPL; -} -static HRESULT WINAPI ISF_ControlPanel_fnEnumSearches(IShellFolder2 * iface, IEnumExtraSearch ** ppenum) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - FIXME("(%p)\n", This); - return E_NOTIMPL; -} -static HRESULT WINAPI ISF_ControlPanel_fnGetDefaultColumn(IShellFolder2 * iface, DWORD dwRes, ULONG * pSort, ULONG * pDisplay) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - TRACE("(%p)\n", This); - - if (pSort) *pSort = 0; - if (pDisplay) *pDisplay = 0; - return S_OK; -} -static HRESULT WINAPI ISF_ControlPanel_fnGetDefaultColumnState(IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - TRACE("(%p)\n", This); - - if (!pcsFlags || iColumn >= CONROLPANELSHELLVIEWCOLUMNS) return E_INVALIDARG; - *pcsFlags = ControlPanelSFHeader[iColumn].pcsFlags; - return S_OK; -} -static HRESULT WINAPI ISF_ControlPanel_fnGetDetailsEx(IShellFolder2 * iface, LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - FIXME("(%p)\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_ControlPanel_fnGetDetailsOf(IShellFolder2 * iface, LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - 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.u.cStr, MAX_PATH); - return S_OK; - } else { - psd->str.u.cStr[0] = 0x00; - psd->str.uType = STRRET_CSTR; - switch(iColumn) { - case 0: /* name */ - hr = IShellFolder_GetDisplayNameOf(iface, pidl, SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str); - break; - case 1: /* comment */ - _ILGetFileType(pidl, psd->str.u.cStr, MAX_PATH); - break; - } - hr = S_OK; - } - - return hr; -} -static HRESULT WINAPI ISF_ControlPanel_fnMapColumnToSCID(IShellFolder2 * iface, UINT column, SHCOLUMNID * pscid) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - FIXME("(%p)\n", This); - return E_NOTIMPL; -} - -static const IShellFolder2Vtbl vt_ShellFolder2 = -{ - - ISF_ControlPanel_fnQueryInterface, - ISF_ControlPanel_fnAddRef, - ISF_ControlPanel_fnRelease, - ISF_ControlPanel_fnParseDisplayName, - ISF_ControlPanel_fnEnumObjects, - ISF_ControlPanel_fnBindToObject, - ISF_ControlPanel_fnBindToStorage, - ISF_ControlPanel_fnCompareIDs, - ISF_ControlPanel_fnCreateViewObject, - ISF_ControlPanel_fnGetAttributesOf, - ISF_ControlPanel_fnGetUIObjectOf, - ISF_ControlPanel_fnGetDisplayNameOf, - ISF_ControlPanel_fnSetNameOf, - - /* ShellFolder2 */ - ISF_ControlPanel_fnGetDefaultSearchGUID, - ISF_ControlPanel_fnEnumSearches, - ISF_ControlPanel_fnGetDefaultColumn, - ISF_ControlPanel_fnGetDefaultColumnState, - ISF_ControlPanel_fnGetDetailsEx, - ISF_ControlPanel_fnGetDetailsOf, - ISF_ControlPanel_fnMapColumnToSCID -}; - -/************************************************************************ - * ICPanel_PersistFolder2_QueryInterface - */ -static HRESULT WINAPI ICPanel_PersistFolder2_QueryInterface(IPersistFolder2 * iface, REFIID iid, LPVOID * ppvObject) -{ - ICPanelImpl *This = impl_from_IPersistFolder2(iface); - - TRACE("(%p)\n", This); - - return IUnknown_QueryInterface(_IUnknown_(This), iid, ppvObject); -} - -/************************************************************************ - * ICPanel_PersistFolder2_AddRef - */ -static ULONG WINAPI ICPanel_PersistFolder2_AddRef(IPersistFolder2 * iface) -{ - ICPanelImpl *This = impl_from_IPersistFolder2(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_AddRef(_IUnknown_(This)); -} - -/************************************************************************ - * ISFPersistFolder_Release - */ -static ULONG WINAPI ICPanel_PersistFolder2_Release(IPersistFolder2 * iface) -{ - ICPanelImpl *This = impl_from_IPersistFolder2(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_Release(_IUnknown_(This)); -} - -/************************************************************************ - * ICPanel_PersistFolder2_GetClassID - */ -static HRESULT WINAPI ICPanel_PersistFolder2_GetClassID(IPersistFolder2 * iface, CLSID * lpClassId) -{ - ICPanelImpl *This = impl_from_IPersistFolder2(iface); - - 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 - */ -static HRESULT WINAPI ICPanel_PersistFolder2_Initialize(IPersistFolder2 * iface, LPCITEMIDLIST pidl) -{ - ICPanelImpl *This = impl_from_IPersistFolder2(iface); - if (This->pidlRoot) - SHFree((LPVOID)This->pidlRoot); - - This->pidlRoot = ILClone(pidl); - return S_OK; -} - -/************************************************************************** - * IPersistFolder2_fnGetCurFolder - */ -static HRESULT WINAPI ICPanel_PersistFolder2_GetCurFolder(IPersistFolder2 * iface, LPITEMIDLIST * pidl) -{ - ICPanelImpl *This = impl_from_IPersistFolder2(iface); - - TRACE("(%p)->(%p)\n", This, pidl); - - if (!pidl) - return E_POINTER; - *pidl = ILClone(This->pidlRoot); - return S_OK; -} - -static const IPersistFolder2Vtbl vt_PersistFolder2 = -{ - - ICPanel_PersistFolder2_QueryInterface, - ICPanel_PersistFolder2_AddRef, - ICPanel_PersistFolder2_Release, - ICPanel_PersistFolder2_GetClassID, - ICPanel_PersistFolder2_Initialize, - ICPanel_PersistFolder2_GetCurFolder -}; - -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 = pcpanel->iconIdx!=-1? pcpanel->iconIdx: 0; - - return S_OK; -} - - -/************************************************************************** -* IShellExecuteHookW Implementation -*/ - -static HRESULT WINAPI IShellExecuteHookW_fnQueryInterface( - IShellExecuteHookW* iface, REFIID riid, void** ppvObject) -{ - ICPanelImpl *This = impl_from_IShellExecuteHookW(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_QueryInterface(This->pUnkOuter, riid, ppvObject); -} - -static ULONG STDMETHODCALLTYPE IShellExecuteHookW_fnAddRef(IShellExecuteHookW* iface) -{ - ICPanelImpl *This = impl_from_IShellExecuteHookW(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_AddRef(This->pUnkOuter); -} - -static ULONG STDMETHODCALLTYPE IShellExecuteHookW_fnRelease(IShellExecuteHookW* iface) -{ - ICPanelImpl *This = impl_from_IShellExecuteHookW(iface); - - TRACE("(%p)\n", This); - - return IUnknown_Release(This->pUnkOuter); -} - -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) - { - wcscpy(szCmd, L"%SystemRoot%\\Explorer.exe ::"); - wcscat(szCmd, pOleStr); - } - -#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; -} - - -static HRESULT WINAPI IShellExecuteHookW_fnExecute(IShellExecuteHookW* iface, LPSHELLEXECUTEINFOW psei) -{ - static const WCHAR wCplopen[] = {'c','p','l','o','p','e','n','\0'}; - ICPanelImpl *This = (ICPanelImpl *)iface; - - 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(psei->lpIDList)); - - if (!pcpanel) - { - LPOLESTR pOleStr; - - IID * iid = _ILGetGUIDPointer(ILFindLastID(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; -} - -static const IShellExecuteHookWVtbl vt_ShellExecuteHookW = -{ - - IShellExecuteHookW_fnQueryInterface, - IShellExecuteHookW_fnAddRef, - IShellExecuteHookW_fnRelease, - - IShellExecuteHookW_fnExecute -}; - - -/************************************************************************** -* IShellExecuteHookA Implementation -*/ - -static HRESULT WINAPI IShellExecuteHookA_fnQueryInterface(IShellExecuteHookA* iface, REFIID riid, void** ppvObject) -{ - ICPanelImpl *This = impl_from_IShellExecuteHookA(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_QueryInterface(This->pUnkOuter, riid, ppvObject); -} - -static ULONG STDMETHODCALLTYPE IShellExecuteHookA_fnAddRef(IShellExecuteHookA* iface) -{ - ICPanelImpl *This = impl_from_IShellExecuteHookA(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_AddRef(This->pUnkOuter); -} - -static ULONG STDMETHODCALLTYPE IShellExecuteHookA_fnRelease(IShellExecuteHookA* iface) -{ - ICPanelImpl *This = impl_from_IShellExecuteHookA(iface); - - TRACE("(%p)\n", This); - - return IUnknown_Release(This->pUnkOuter); -} - -static HRESULT WINAPI IShellExecuteHookA_fnExecute(IShellExecuteHookA* iface, LPSHELLEXECUTEINFOA psei) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - 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(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; -} - -static const IShellExecuteHookAVtbl vt_ShellExecuteHookA = -{ - IShellExecuteHookA_fnQueryInterface, - IShellExecuteHookA_fnAddRef, - IShellExecuteHookA_fnRelease, - IShellExecuteHookA_fnExecute -}; - -/************************************************************************** -* IContextMenu2 Implementation -*/ - -/************************************************************************ - * ICPanel_IContextMenu_QueryInterface - */ -static HRESULT WINAPI ICPanel_IContextMenu2_QueryInterface(IContextMenu2 * iface, REFIID iid, LPVOID * ppvObject) -{ - ICPanelImpl *This = impl_from_IContextMenu(iface); - - TRACE("(%p)\n", This); - - return IUnknown_QueryInterface(_IUnknown_(This), iid, ppvObject); -} - -/************************************************************************ - * ICPanel_IContextMenu_AddRef - */ -static ULONG WINAPI ICPanel_IContextMenu2_AddRef(IContextMenu2 * iface) -{ - ICPanelImpl *This = impl_from_IContextMenu(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_AddRef(_IUnknown_(This)); -} - -/************************************************************************ - * ICPanel_IContextMenu_Release - */ -static ULONG WINAPI ICPanel_IContextMenu2_Release(IContextMenu2 * iface) -{ - ICPanelImpl *This = impl_from_IContextMenu(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_Release(_IUnknown_(This)); -} - -/************************************************************************** -* ICPanel_IContextMenu_QueryContextMenu() -*/ -static HRESULT WINAPI ICPanel_IContextMenu2_QueryContextMenu( - IContextMenu2 *iface, - HMENU hMenu, - UINT indexMenu, - UINT idCmdFirst, - UINT idCmdLast, - UINT uFlags) -{ - WCHAR szBuffer[30] = {0}; - ULONG Count = 1; - - ICPanelImpl *This = impl_from_IContextMenu(iface); - - 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() -*/ -static HRESULT WINAPI ICPanel_IContextMenu2_InvokeCommand( - IContextMenu2 *iface, - LPCMINVOKECOMMANDINFO lpcmi) -{ - SHELLEXECUTEINFOW sei; - WCHAR szPath[MAX_PATH]; - char szTarget[MAX_PATH]; - STRRET strret; - WCHAR* pszPath; - INT Length, cLength; - PIDLCPanelStruct *pcpanel; - IPersistFile * ppf; - IShellLinkA * isl; - ICPanelImpl *This = impl_from_IContextMenu(iface); - - 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(This->pidlRoot, This->apidl[0]); - sei.hwnd = lpcmi->hwnd; - sei.nShow = SW_SHOWNORMAL; - sei.lpVerb = L"open"; - - if (ShellExecuteExW(&sei) == 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 (IShellFolder_GetDisplayNameOf((IShellFolder*)This, This->apidl[0], SHGDN_FORPARSING, &strret) != S_OK) - return E_FAIL; - - Length = MAX_PATH - (pszPath - szPath); - cLength = strlen(strret.u.cStr); - if (Length < cLength + 5) - { - FIXME("\n"); - return E_FAIL; - } - - if (MultiByteToWideChar(CP_ACP, 0, strret.u.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(This->apidl[0])); - if (pcpanel) - { - strncpy(szTarget, pcpanel->szName, MAX_PATH); - } - else - { - FIXME("Couldn't retrieve pointer to cpl structure\n"); - return E_FAIL; - } - if (SUCCEEDED(IShellLink_Constructor(NULL, &IID_IShellLinkA, (LPVOID*)&isl))) - { - IShellLinkA_SetPath(isl, szTarget); - if (SUCCEEDED(IShellLinkA_QueryInterface(isl, &IID_IPersistFile, (LPVOID*)&ppf))) - { - IPersistFile_Save(ppf, szPath, TRUE); - IPersistFile_Release(ppf); - } - IShellLinkA_Release(isl); - } - return NOERROR; - } - return S_OK; -} - -/************************************************************************** - * ICPanel_IContextMenu_GetCommandString() - * - */ -static HRESULT WINAPI ICPanel_IContextMenu2_GetCommandString( - IContextMenu2 *iface, - UINT_PTR idCommand, - UINT uFlags, - UINT* lpReserved, - LPSTR lpszName, - UINT uMaxNameLen) -{ - ICPanelImpl *This = impl_from_IContextMenu(iface); - - 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() -*/ -static HRESULT WINAPI ICPanel_IContextMenu2_HandleMenuMsg( - IContextMenu2 *iface, - UINT uMsg, - WPARAM wParam, - LPARAM lParam) -{ - ICPanelImpl *This = impl_from_IContextMenu(iface); - - TRACE("ICPanel_IContextMenu_HandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n",This, uMsg, wParam, lParam); - - return E_NOTIMPL; -} - -static const IContextMenu2Vtbl vt_ContextMenu = -{ - ICPanel_IContextMenu2_QueryInterface, - ICPanel_IContextMenu2_AddRef, - ICPanel_IContextMenu2_Release, - ICPanel_IContextMenu2_QueryContextMenu, - ICPanel_IContextMenu2_InvokeCommand, - ICPanel_IContextMenu2_GetCommandString, - ICPanel_IContextMenu2_HandleMenuMsg -}; - diff --git a/reactos/dll/win32/shell32/shfldr_desktop.c b/reactos/dll/win32/shell32/shfldr_desktop.c deleted file mode 100644 index cdcae285023..00000000000 --- a/reactos/dll/win32/shell32/shfldr_desktop.c +++ /dev/null @@ -1,1487 +0,0 @@ - -/* - * Virtual Desktop 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 - -WINE_DEFAULT_DEBUG_CHANNEL (shell); - -/*********************************************************************** -* Desktopfolder implementation -*/ - -typedef struct { - const IShellFolder2Vtbl *lpVtbl; - const IPersistFolder2Vtbl *lpPF2; - const ISFHelperVtbl *lpvtblSFHelper; - LONG ref; - - /* 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 */ -} IGenericSFImpl, *LPIGenericSFImpl; - -WCHAR *build_paths_list(LPCWSTR wszBasePath, int cidl, LPCITEMIDLIST *pidls); -int SHELL_ConfirmMsgBox(HWND hWnd, LPWSTR lpszText, LPWSTR lpszCaption, HICON hIcon, BOOL bYesToAll); - -#define _IUnknown_(This) (IShellFolder*)&(This->lpVtbl) -#define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl) - -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 - -/************************************************************************** - * ISF_Desktop_fnQueryInterface - * - * NOTES supports not IPersist/IPersistFolder - */ -static HRESULT WINAPI ISF_Desktop_fnQueryInterface( - IShellFolder2 * iface, REFIID riid, LPVOID * ppvObj) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); - - *ppvObj = NULL; - - if (IsEqualIID (riid, &IID_IUnknown) || - IsEqualIID (riid, &IID_IShellFolder) || - IsEqualIID (riid, &IID_IShellFolder2)) - { - *ppvObj = This; - } - else if (IsEqualIID (riid, &IID_IPersistFolder) || - IsEqualIID (riid, &IID_IPersistFolder2)) - { - *ppvObj = (void *)&This->lpPF2; - } - else if (IsEqualIID(riid, &IID_ISFHelper)) - { - *ppvObj = (void *)&This->lpvtblSFHelper; - } - if (*ppvObj) - { - IUnknown_AddRef ((IUnknown *) (*ppvObj)); - TRACE ("-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj); - return S_OK; - } - TRACE ("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -static LPIGenericSFImpl __inline impl_from_ISFHelper( ISFHelper *iface ) -{ - return (IGenericSFImpl *)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpvtblSFHelper)); -} - -static ULONG WINAPI ISF_Desktop_fnAddRef (IShellFolder2 * iface) -{ - return 2; /* non-heap based object */ -} - -static ULONG WINAPI ISF_Desktop_fnRelease (IShellFolder2 * iface) -{ - return 1; /* non-heap based object */ -} - -/************************************************************************** - * ISF_Desktop_fnParseDisplayName - * - * NOTES - * "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}" and "" binds - * to MyComputer - */ -static HRESULT WINAPI ISF_Desktop_fnParseDisplayName (IShellFolder2 * iface, - HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, - DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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 */ -#if 0 - if (UNIXFS_is_rooted_at_desktop()) - pidlTemp = _ILCreateGuid(PT_GUID, &CLSID_UnixDosFolder); - else -#endif - 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, This->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(iface, 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; -} - -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(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' }; - -static BOOL CreateDesktopEnumList(IEnumIDList *list, DWORD dwFlags) -{ - BOOL ret = TRUE; - WCHAR szPath[MAX_PATH]; - - static WCHAR MyDocumentsClassString[] = L"{450D8FBA-AD25-11D0-98A8-0800361B1103}"; - - - TRACE("(%p)->(flags=0x%08x)\n", list, 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(list, _ILCreateMyDocuments()); - } - ret = AddToEnumList(list, _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 (!HasItemWithCLSID(list, pidl)) - { - ret = AddToEnumList(list, 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 (!HasItemWithCLSID(list, pidl)) - { - AddToEnumList(list, pidl); - } - else - { - SHFree(pidl); - } - } - } - else if (ERROR_NO_MORE_ITEMS == r) - break; - else - ret = FALSE; - } - } - - } - } - - /* enumerate the elements in %windir%\desktop */ - ret = ret && SHGetSpecialFolderPathW(0, szPath, CSIDL_DESKTOPDIRECTORY, FALSE); - ret = ret && CreateFolderEnumList(list, szPath, dwFlags); - - ret = ret && SHGetSpecialFolderPathW(0, szPath, CSIDL_COMMON_DESKTOPDIRECTORY, FALSE); - ret = ret && CreateFolderEnumList(list, szPath, dwFlags); - - return ret; -} - -/************************************************************************** - * ISF_Desktop_fnEnumObjects - */ -static HRESULT WINAPI ISF_Desktop_fnEnumObjects (IShellFolder2 * iface, - HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", - This, hwndOwner, dwFlags, ppEnumIDList); - - *ppEnumIDList = IEnumIDList_Constructor(); - if (*ppEnumIDList) - CreateDesktopEnumList(*ppEnumIDList, dwFlags); - - TRACE ("-- (%p)->(new ID List: %p)\n", This, *ppEnumIDList); - - return *ppEnumIDList ? S_OK : E_OUTOFMEMORY; -} - -/************************************************************************** - * ISF_Desktop_fnBindToObject - */ -static HRESULT WINAPI ISF_Desktop_fnBindToObject (IShellFolder2 * iface, - LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", - This, pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); - - return SHELL32_BindToChild( This->pidlRoot, This->sPathTarget, pidl, riid, ppvOut ); -} - -/************************************************************************** - * ISF_Desktop_fnBindToStorage - */ -static HRESULT WINAPI ISF_Desktop_fnBindToStorage (IShellFolder2 * iface, - LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", - This, pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); - - *ppvOut = NULL; - return E_NOTIMPL; -} - -/************************************************************************** - * ISF_Desktop_fnCompareIDs - */ -static HRESULT WINAPI ISF_Desktop_fnCompareIDs (IShellFolder2 * iface, - LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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 - */ -static HRESULT WINAPI ISF_Desktop_fnCreateViewObject (IShellFolder2 * iface, - HWND hwndOwner, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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)) - { - pShellView = IShellView_Constructor ((IShellFolder *) iface); - if (pShellView) - { - hr = IShellView_QueryInterface (pShellView, riid, ppvOut); - IShellView_Release (pShellView); - } - } - TRACE ("-- (%p)->(interface=%p)\n", This, ppvOut); - return hr; -} - -/************************************************************************** - * ISF_Desktop_fnGetAttributesOf - */ -static HRESULT WINAPI ISF_Desktop_fnGetAttributesOf (IShellFolder2 * iface, - UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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 - * - */ -static HRESULT WINAPI ISF_Desktop_fnGetUIObjectOf (IShellFolder2 * iface, - HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl, - REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - 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(This->pidlRoot, hwndOwner, cidl, apidl, (IShellFolder*)iface, NULL, 0, NULL, (IContextMenu**)&pObj); - } - else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) - { - pObj = (LPUNKNOWN) IDataObject_Constructor( hwndOwner, - This->pidlRoot, apidl, cidl); - hr = S_OK; - } - else if (IsEqualIID (riid, &IID_IExtractIconA) && (cidl == 1)) - { - pidl = ILCombine (This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl); - SHFree (pidl); - hr = S_OK; - } - else if (IsEqualIID (riid, &IID_IExtractIconW) && (cidl == 1)) - { - pidl = ILCombine (This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl); - SHFree (pidl); - hr = S_OK; - } - else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) - { - hr = IShellFolder_QueryInterface (iface, - &IID_IDropTarget, (LPVOID *) & pObj); - } - else if ((IsEqualIID(riid,&IID_IShellLinkW) || - IsEqualIID(riid,&IID_IShellLinkA)) && (cidl == 1)) - { - pidl = ILCombine (This->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 - */ -static HRESULT WINAPI ISF_Desktop_fnGetDisplayNameOf (IShellFolder2 * iface, - LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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 = 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, This->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 (iface, 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, This->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 (iface, 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->u.cStr, MAX_PATH, - NULL, NULL)) - strRet->u.cStr[0] = '\0'; - CoTaskMemFree(pszPath); - } - else - { - strRet->uType = STRRET_WSTR; - strRet->u.pOleStr = pszPath; - } - } - else - CoTaskMemFree(pszPath); - - TRACE ("-- (%p)->(%s,0x%08x)\n", This, - strRet->uType == STRRET_CSTR ? strRet->u.cStr : - debugstr_w(strRet->u.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 - */ -static HRESULT WINAPI ISF_Desktop_fnSetNameOf (IShellFolder2 * iface, - HWND hwndOwner, LPCITEMIDLIST pidl, /* simple pidl */ - LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - IShellFolder2 * 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(IShellFolder2_BindToObject(iface, pidl, NULL, &IID_IShellFolder2, (LPVOID*)&psf))) - { - hr = IShellFolder2_SetNameOf(psf, hwndOwner, pidl, lpName, dwFlags, pPidlOut); - IShellFolder2_Release(psf); - return hr; - } - } - - /* build source path */ - lstrcpynW(szSrc, This->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, This->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; -} -static HRESULT WINAPI ISF_Desktop_fnGetDefaultSearchGUID(IShellFolder2 *iface, - GUID * pguid) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_Desktop_fnEnumSearches (IShellFolder2 *iface, - IEnumExtraSearch ** ppenum) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_Desktop_fnGetDefaultColumn (IShellFolder2 * iface, - DWORD dwRes, ULONG * pSort, ULONG * pDisplay) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)\n", This); - - if (pSort) - *pSort = 0; - if (pDisplay) - *pDisplay = 0; - - return S_OK; -} -static HRESULT WINAPI ISF_Desktop_fnGetDefaultColumnState ( - IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)\n", This); - - if (!pcsFlags || iColumn >= DESKTOPSHELLVIEWCOLUMNS) - return E_INVALIDARG; - - *pcsFlags = DesktopSFHeader[iColumn].pcsFlags; - - return S_OK; -} - -static HRESULT WINAPI ISF_Desktop_fnGetDetailsEx (IShellFolder2 * iface, - LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_Desktop_fnGetDetailsOf (IShellFolder2 * iface, - LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - 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.u.cStr, MAX_PATH); - return S_OK; - } - - /* the data from the pidl */ - psd->str.uType = STRRET_CSTR; - switch (iColumn) - { - case 0: /* name */ - hr = IShellFolder_GetDisplayNameOf(iface, pidl, - SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str); - break; - case 1: /* size */ - _ILGetFileSize (pidl, psd->str.u.cStr, MAX_PATH); - break; - case 2: /* type */ - _ILGetFileType (pidl, psd->str.u.cStr, MAX_PATH); - break; - case 3: /* date */ - _ILGetFileDate (pidl, psd->str.u.cStr, MAX_PATH); - break; - case 4: /* attributes */ - _ILGetFileAttributes (pidl, psd->str.u.cStr, MAX_PATH); - break; - } - - return hr; -} - -static HRESULT WINAPI ISF_Desktop_fnMapColumnToSCID ( - IShellFolder2 * iface, UINT column, SHCOLUMNID * pscid) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -static const IShellFolder2Vtbl vt_MCFldr_ShellFolder2 = -{ - ISF_Desktop_fnQueryInterface, - ISF_Desktop_fnAddRef, - ISF_Desktop_fnRelease, - ISF_Desktop_fnParseDisplayName, - ISF_Desktop_fnEnumObjects, - ISF_Desktop_fnBindToObject, - ISF_Desktop_fnBindToStorage, - ISF_Desktop_fnCompareIDs, - ISF_Desktop_fnCreateViewObject, - ISF_Desktop_fnGetAttributesOf, - ISF_Desktop_fnGetUIObjectOf, - ISF_Desktop_fnGetDisplayNameOf, - ISF_Desktop_fnSetNameOf, - /* ShellFolder2 */ - ISF_Desktop_fnGetDefaultSearchGUID, - ISF_Desktop_fnEnumSearches, - ISF_Desktop_fnGetDefaultColumn, - ISF_Desktop_fnGetDefaultColumnState, - ISF_Desktop_fnGetDetailsEx, - ISF_Desktop_fnGetDetailsOf, - ISF_Desktop_fnMapColumnToSCID -}; - -static LPIGenericSFImpl __inline impl_from_IPersistFolder2( IPersistFolder2 *iface ) -{ - return (IGenericSFImpl *)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpPF2)); -} - -static HRESULT WINAPI -ISF_Desktop_PersistFolder2_fnQueryInterface (IPersistFolder2 * iface, REFIID iid, - LPVOID * ppvObj) -{ - IGenericSFImpl *This = impl_from_IPersistFolder2(iface); - - TRACE ("(%p)\n", This); - - return ISF_Desktop_fnQueryInterface ((IShellFolder2*)This, iid, ppvObj); -} - -static ULONG WINAPI -ISF_Desktop_PersistFolder2_fnAddRef (IPersistFolder2 * iface) -{ - IGenericSFImpl *This = impl_from_IPersistFolder2(iface); - - TRACE ("(%p)->(count=%u)\n", This, This->ref); - - return ISF_Desktop_fnAddRef((IShellFolder2*)This); -} - -static ULONG WINAPI -ISF_Desktop_PersistFolder2_fnRelease (IPersistFolder2 * iface) -{ - IGenericSFImpl *This = impl_from_IPersistFolder2(iface); - - TRACE ("(%p)->(count=%u)\n", This, This->ref); - - return ISF_Desktop_fnRelease ((IShellFolder2*)This); -} - -static HRESULT WINAPI -ISF_Desktop_PersistFolder2_fnGetClassID (IPersistFolder2 * iface, CLSID * lpClassId) -{ - static GUID const CLSID_Desktop = - { 0x00021400, 0x0000, 0x0000, {0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} }; - - IGenericSFImpl *This = impl_from_IPersistFolder2(iface); - - TRACE ("(%p)\n", This); - - if (!lpClassId) - return E_POINTER; - - memcpy(lpClassId, &CLSID_Desktop, sizeof(GUID)); - - return S_OK; -} -static HRESULT WINAPI -ISF_Desktop_PersistFolder2_fnInitialize (IPersistFolder2 * iface, LPCITEMIDLIST pidl) -{ - IGenericSFImpl *This = impl_from_IPersistFolder2(iface); - - TRACE ("(%p)->(%p)\n", This, pidl); - - return E_NOTIMPL; -} - -static HRESULT WINAPI -ISF_Desktop_PersistFolder2_fnGetCurFolder (IPersistFolder2 * iface, - LPITEMIDLIST * pidl) -{ - IGenericSFImpl *This = impl_from_IPersistFolder2(iface); - - TRACE ("(%p)->(%p)\n", This, pidl); - - if (!pidl) return E_POINTER; - *pidl = ILClone (This->pidlRoot); - return S_OK; -} - -static const IPersistFolder2Vtbl vt_FSFldr_PersistFolder2 = -{ - ISF_Desktop_PersistFolder2_fnQueryInterface, - ISF_Desktop_PersistFolder2_fnAddRef, - ISF_Desktop_PersistFolder2_fnRelease, - ISF_Desktop_PersistFolder2_fnGetClassID, - ISF_Desktop_PersistFolder2_fnInitialize, - ISF_Desktop_PersistFolder2_fnGetCurFolder, -}; - -static HRESULT WINAPI -ISF_Desktop_ISFHelper_fnQueryInterface (ISFHelper * iface, REFIID riid, LPVOID * ppvObj) -{ - IGenericSFImpl *This = impl_from_ISFHelper(iface); - - TRACE ("(%p)->(count=%u)\n", This, This->ref); - - return ISF_Desktop_fnQueryInterface ((IShellFolder2*)This, riid, ppvObj); -} - -static ULONG WINAPI -ISF_Desktop_ISFHelper_fnAddRef (ISFHelper * iface) -{ - IGenericSFImpl *This = impl_from_ISFHelper(iface); - - TRACE ("(%p)->(count=%u)\n", This, This->ref); - - return ISF_Desktop_fnAddRef((IShellFolder2*)This); -} - -static ULONG WINAPI -ISF_Desktop_ISFHelper_fnRelease (ISFHelper * iface) -{ - IGenericSFImpl *This = impl_from_ISFHelper(iface); - - TRACE ("(%p)\n", This); - - return ISF_Desktop_fnRelease ((IShellFolder2*)This); -} - -static HRESULT WINAPI -ISF_Desktop_ISFHelper_fnGetUniqueName (ISFHelper * iface, LPWSTR pwszName, UINT uLen) -{ - IGenericSFImpl *This = impl_from_ISFHelper(iface); - 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 = IShellFolder_EnumObjects ((IShellFolder2*)This, 0, - SHCONTF_FOLDERS | SHCONTF_NONFOLDERS | SHCONTF_INCLUDEHIDDEN, &penum); - if (penum) { - LPITEMIDLIST pidl; - DWORD dwFetched; - int i = 1; - -next: - IEnumIDList_Reset (penum); - while (S_OK == IEnumIDList_Next (penum, 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; - } - } - - IEnumIDList_Release (penum); - } - return hr; -} - -static HRESULT WINAPI -ISF_Desktop_ISFHelper_fnAddFolder (ISFHelper * iface, HWND hwnd, LPCWSTR pwszName, - LPITEMIDLIST * ppidlOut) -{ - IGenericSFImpl *This = impl_from_ISFHelper(iface); - WCHAR wszNewDir[MAX_PATH]; - DWORD bRes; - HRESULT hres = E_FAIL; - - TRACE ("(%p)(%s %p)\n", This, debugstr_w(pwszName), ppidlOut); - - wszNewDir[0] = 0; - if (This->sPathTarget) - lstrcpynW(wszNewDir, This->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; -} -static HRESULT WINAPI -ISF_Desktop_ISFHelper_fnDeleteItems (ISFHelper * iface, UINT cidl, LPCITEMIDLIST * apidl) -{ - IGenericSFImpl *This = impl_from_ISFHelper(iface); - 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 (This->sPathTarget) - lstrcpynW(wszPath, This->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(This->pidlRoot, apidl[i]); - SHChangeNotify(wEventId, SHCNF_IDLIST, pidl, NULL); - SHFree(pidl); - } - - wszCurrentPath += wcslen(wszCurrentPath)+1; - } - HeapFree(GetProcessHeap(), 0, wszPathsList); - return ret; -} - -static HRESULT WINAPI -ISF_Desktop_ISFHelper_fnCopyItems (ISFHelper * iface, 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; - STRRET strRet; - IGenericSFImpl *This = impl_from_ISFHelper(iface); - - TRACE ("(%p)->(%p,%u,%p)\n", This, pSFFrom, cidl, apidl); - - IShellFolder_QueryInterface (pSFFrom, &IID_IPersistFolder2, (LPVOID *) & ppf2); - if (ppf2) - { - if (FAILED(IPersistFolder2_GetCurFolder (ppf2, &pidl))) - { - IPersistFolder2_Release(ppf2); - return E_FAIL; - } - IPersistFolder2_Release(ppf2); - - if (FAILED(IShellFolder_GetDisplayNameOf(pSFFrom, 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, This->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); - IPersistFolder2_Release (ppf2); - 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; -} - -static const ISFHelperVtbl vt_FSFldr_ISFHelper = -{ - ISF_Desktop_ISFHelper_fnQueryInterface, - ISF_Desktop_ISFHelper_fnAddRef, - ISF_Desktop_ISFHelper_fnRelease, - ISF_Desktop_ISFHelper_fnGetUniqueName, - ISF_Desktop_ISFHelper_fnAddFolder, - ISF_Desktop_ISFHelper_fnDeleteItems, - ISF_Desktop_ISFHelper_fnCopyItems -}; - - -/************************************************************************** - * ISF_Desktop_Constructor - */ -HRESULT WINAPI ISF_Desktop_Constructor ( - IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) -{ - static IGenericSFImpl *cached_sf; - WCHAR szMyPath[MAX_PATH]; - - TRACE ("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid (riid)); - - if (!ppv) - return E_POINTER; - if (pUnkOuter) - return CLASS_E_NOAGGREGATION; - - if (!cached_sf) - { - IGenericSFImpl *sf; - - if (!SHGetSpecialFolderPathW( 0, szMyPath, CSIDL_DESKTOPDIRECTORY, TRUE )) - return E_UNEXPECTED; - - sf = LocalAlloc( LMEM_ZEROINIT, sizeof (IGenericSFImpl) ); - if (!sf) - return E_OUTOFMEMORY; - - sf->ref = 1; - sf->lpVtbl = &vt_MCFldr_ShellFolder2; - sf->lpPF2 = &vt_FSFldr_PersistFolder2; - sf->lpvtblSFHelper = &vt_FSFldr_ISFHelper; - sf->pidlRoot = _ILCreateDesktop(); /* my qualified pidl */ - sf->sPathTarget = SHAlloc( (wcslen(szMyPath) + 1)*sizeof(WCHAR) ); - wcscpy( sf->sPathTarget, szMyPath ); - - if (InterlockedCompareExchangePointer((void *)&cached_sf, sf, NULL) != NULL) - { - /* some other thread already been here */ - SHFree( sf->pidlRoot ); - SHFree( sf->sPathTarget ); - LocalFree( sf ); - } - } - - return IUnknown_QueryInterface( _IUnknown_(cached_sf), riid, ppv ); -} diff --git a/reactos/dll/win32/shell32/shfldr_fonts.c b/reactos/dll/win32/shell32/shfldr_fonts.c deleted file mode 100644 index 4ec244f00ab..00000000000 --- a/reactos/dll/win32/shell32/shfldr_fonts.c +++ /dev/null @@ -1,1057 +0,0 @@ -/* - * Fonts folder - * - * Copyright 2008 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 (shell); - -/*********************************************************************** -* IShellFolder implementation -*/ - -typedef struct { - const IShellFolder2Vtbl *lpVtbl; - LONG ref; - const IContextMenu2Vtbl *lpVtblContextMenuFontItem; - const IPersistFolder2Vtbl *lpVtblPersistFolder2; - - /* both paths are parsible from the desktop */ - LPITEMIDLIST pidlRoot; /* absolute pidl */ - LPCITEMIDLIST apidl; /* currently focused font item */ -} IGenericSFImpl, *LPIGenericSFImpl; - -static const IShellFolder2Vtbl vt_ShellFolder2; -static const IPersistFolder2Vtbl vt_NP_PersistFolder2; -static const IContextMenu2Vtbl vt_ContextMenu2FontItem; - -#define _IPersistFolder2_Offset ((INT_PTR)(&(((IGenericSFImpl*)0)->lpVtblPersistFolder2))) -#define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder2_Offset); -#define _IContextMenuFontItem_Offset ((INT_PTR)(&(((IGenericSFImpl*)0)->lpVtblContextMenuFontItem))) -#define _ICOM_THIS_From_IContextMenu2FontItem(class, name) class* This = (class*)(((char*)name)-_IContextMenuFontItem_Offset); - -#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) -#define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl) -#define _IPersistFolder2_(This) (IPersistFolder2*)&(This->lpVtblPersistFolder2) - -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) - - -static LPIGenericSFImpl __inline impl_from_IPersistFolder2( IPersistFolder2 *iface ) -{ - return (LPIGenericSFImpl)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpVtblPersistFolder2)); -} - -static LPIGenericSFImpl __inline impl_from_IContextMenu2(IContextMenu2 *iface) -{ - return (LPIGenericSFImpl)((char *)iface - FIELD_OFFSET(IGenericSFImpl, lpVtblContextMenuFontItem)); -} - -/************************************************************************** -* ISF_Fonts_Constructor -*/ -HRESULT WINAPI ISF_Fonts_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) -{ - IGenericSFImpl *sf; - - TRACE ("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid (riid)); - - if (!ppv) - return E_POINTER; - if (pUnkOuter) - return CLASS_E_NOAGGREGATION; - - sf = (IGenericSFImpl *) HeapAlloc ( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof (IGenericSFImpl)); - if (!sf) - return E_OUTOFMEMORY; - - sf->ref = 0; - sf->lpVtbl = &vt_ShellFolder2; - sf->lpVtblPersistFolder2 = &vt_NP_PersistFolder2; - sf->lpVtblContextMenuFontItem = &vt_ContextMenu2FontItem; - sf->pidlRoot = _ILCreateFont(); /* my qualified pidl */ - - if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (sf), riid, ppv))) - { - IUnknown_Release (_IUnknown_ (sf)); - return E_NOINTERFACE; - } - - TRACE ("--(%p)\n", sf); - return S_OK; -} - -/************************************************************************** - * ISF_Fonts_fnQueryInterface - * - * NOTE - * supports not IPersist/IPersistFolder - */ -static HRESULT WINAPI ISF_Fonts_fnQueryInterface (IShellFolder2 *iface, REFIID riid, LPVOID *ppvObj) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); - - *ppvObj = NULL; - - if (IsEqualIID (riid, &IID_IUnknown) || - IsEqualIID (riid, &IID_IShellFolder) || - IsEqualIID (riid, &IID_IShellFolder2)) - { - *ppvObj = This; - } - else if (IsEqualIID (riid, &IID_IPersist) || - IsEqualIID (riid, &IID_IPersistFolder) || - IsEqualIID (riid, &IID_IPersistFolder2)) - { - *ppvObj = _IPersistFolder2_ (This); - } - - if (*ppvObj) - { - IUnknown_AddRef ((IUnknown *) (*ppvObj)); - TRACE ("-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj); - return S_OK; - } - TRACE ("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI ISF_Fonts_fnAddRef (IShellFolder2 * iface) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE ("(%p)->(count=%u)\n", This, refCount - 1); - - return refCount; -} - -static ULONG WINAPI ISF_Fonts_fnRelease (IShellFolder2 * iface) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE ("(%p)->(count=%u)\n", This, refCount + 1); - - if (!refCount) { - TRACE ("-- destroying IShellFolder(%p)\n", This); - SHFree (This->pidlRoot); - HeapFree (GetProcessHeap(), 0, This); - } - return refCount; -} - -/************************************************************************** -* ISF_Fonts_fnParseDisplayName -*/ -static HRESULT WINAPI ISF_Fonts_fnParseDisplayName (IShellFolder2 * iface, - HWND hwndOwner, LPBC pbcReserved, LPOLESTR lpszDisplayName, - DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - 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; -} - -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() - */ -static BOOL CreateFontsEnumList(IEnumIDList *list, 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, (LPVOID)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(list, pidl)) - SHFree(pidl); - } - } - } - }while(ret != ERROR_NO_MORE_ITEMS); - RegCloseKey(hKey); - - } - return TRUE; -} - -/************************************************************************** -* ISF_Fonts_fnEnumObjects -*/ -static HRESULT WINAPI ISF_Fonts_fnEnumObjects (IShellFolder2 * iface, - HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", This, - hwndOwner, dwFlags, ppEnumIDList); - - *ppEnumIDList = IEnumIDList_Constructor(); - if(*ppEnumIDList) - CreateFontsEnumList(*ppEnumIDList, dwFlags); - - TRACE ("-- (%p)->(new ID List: %p)\n", This, *ppEnumIDList); - - return (*ppEnumIDList) ? S_OK : E_OUTOFMEMORY; -} - -/************************************************************************** -* ISF_Fonts_fnBindToObject -*/ -static HRESULT WINAPI ISF_Fonts_fnBindToObject (IShellFolder2 * iface, - LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", This, - pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); - - return SHELL32_BindToChild (This->pidlRoot, NULL, pidl, riid, ppvOut); -} - -/************************************************************************** -* ISF_Fonts_fnBindToStorage -*/ -static HRESULT WINAPI ISF_Fonts_fnBindToStorage (IShellFolder2 * iface, - LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", This, - pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); - - *ppvOut = NULL; - return E_NOTIMPL; -} - -/************************************************************************** -* ISF_Fonts_fnCompareIDs -*/ - -static HRESULT WINAPI ISF_Fonts_fnCompareIDs (IShellFolder2 * iface, - LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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_Fonts_fnCreateViewObject -*/ -static HRESULT WINAPI ISF_Fonts_fnCreateViewObject (IShellFolder2 * iface, - HWND hwndOwner, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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)) - { - pShellView = IShellView_Constructor ((IShellFolder *) iface); - if (pShellView) - { - hr = IShellView_QueryInterface (pShellView, riid, ppvOut); - IShellView_Release (pShellView); - } - } - TRACE ("-- (%p)->(interface=%p)\n", This, ppvOut); - return hr; -} - -/************************************************************************** -* ISF_Fonts_fnGetAttributesOf -*/ -static HRESULT WINAPI ISF_Fonts_fnGetAttributesOf (IShellFolder2 * iface, - UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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(This->pidlRoot, &IID_IShellFolder, (LPVOID*)&psfParent, (LPCITEMIDLIST*)&rpidl); - if(SUCCEEDED(hr)) - { - SHELL32_GetItemAttributes (psfParent, rpidl, rgfInOut); - IShellFolder_Release(psfParent); - } - } - else - { - while (cidl > 0 && *apidl) - { - pdump (*apidl); - 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_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 -* -*/ -static HRESULT WINAPI ISF_Fonts_fnGetUIObjectOf (IShellFolder2 * iface, - HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, - UINT * prgfInOut, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - 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)) - { - pObj = (IUnknown*)(&This->lpVtblContextMenuFontItem); - This->apidl = apidl[0]; - IUnknown_AddRef(pObj); - hr = S_OK; - } - else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) - { - pObj = (LPUNKNOWN) IDataObject_Constructor (hwndOwner, This->pidlRoot, apidl, cidl); - hr = S_OK; - } - else if (IsEqualIID (riid, &IID_IExtractIconA) && (cidl == 1)) - { - pidl = ILCombine (This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl); - SHFree (pidl); - hr = S_OK; - } - else if (IsEqualIID (riid, &IID_IExtractIconW) && (cidl == 1)) - { - pidl = ILCombine (This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl); - SHFree (pidl); - hr = S_OK; - } - else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) - { - hr = IShellFolder_QueryInterface (iface, &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_Fonts_fnGetDisplayNameOf -* -*/ -static HRESULT WINAPI ISF_Fonts_fnGetDisplayNameOf (IShellFolder2 * iface, - LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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->u.pOleStr = CoTaskMemAlloc((wcslen(pfont->szName)+1) * sizeof(WCHAR)); - if (!strRet->u.pOleStr) - return E_OUTOFMEMORY; - - wcscpy(strRet->u.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 -*/ -static HRESULT WINAPI ISF_Fonts_fnSetNameOf (IShellFolder2 * iface, - HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */ - LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)->(%p,pidl=%p,%s,%u,%p)\n", This, - hwndOwner, pidl, debugstr_w (lpName), dwFlags, pPidlOut); - return E_FAIL; -} - -static HRESULT WINAPI ISF_Fonts_fnGetDefaultSearchGUID ( - IShellFolder2 * iface, GUID * pguid) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_Fonts_fnEnumSearches (IShellFolder2 * iface, - IEnumExtraSearch ** ppenum) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_Fonts_fnGetDefaultColumn (IShellFolder2 * iface, - DWORD dwRes, ULONG * pSort, ULONG * pDisplay) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)\n", This); - - if (pSort) - *pSort = 0; - if (pDisplay) - *pDisplay = 0; - - return S_OK; -} - -static HRESULT WINAPI ISF_Fonts_fnGetDefaultColumnState ( - IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)\n", This); - - if (!pcsFlags || iColumn >= FontsSHELLVIEWCOLUMNS) - return E_INVALIDARG; - *pcsFlags = FontsSFHeader[iColumn].pcsFlags; - return S_OK; -} - -static HRESULT WINAPI ISF_Fonts_fnGetDetailsEx (IShellFolder2 * iface, - LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_Fonts_fnGetDetailsOf (IShellFolder2 * iface, - LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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.u.pOleStr); - - return hr; - } - - if (iColumn == COLUMN_NAME) - { - psd->str.uType = STRRET_WSTR; - return IShellFolder2_GetDisplayNameOf(iface, pidl, SHGDN_NORMAL, &psd->str); - } - - psd->str.uType = STRRET_CSTR; - psd->str.u.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.u.pOleStr = CoTaskMemAlloc((wcslen(fi.szTypeName)+1) * sizeof(WCHAR)); - if (!psd->str.u.pOleStr) - return E_OUTOFMEMORY; - wcscpy(psd->str.u.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.u.pOleStr = CoTaskMemAlloc(wcslen(buffer) + 1); - if (!psd->str.u.pOleStr) - return E_OUTOFMEMORY; - wcscpy(psd->str.u.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.u.pOleStr = CoTaskMemAlloc((wcslen(pfont->szName + pfont->offsFile) + 1) * sizeof(WCHAR)); - if (psd->str.u.pOleStr) - { - psd->str.uType = STRRET_WSTR; - wcscpy(psd->str.u.pOleStr, pfont->szName + pfont->offsFile); - return S_OK; - } - else - return E_OUTOFMEMORY; - } - break; - } - - return E_FAIL; -} - -static HRESULT WINAPI ISF_Fonts_fnMapColumnToSCID (IShellFolder2 * iface, - UINT column, SHCOLUMNID * pscid) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - FIXME ("(%p)\n", This); - - return E_NOTIMPL; -} - -static const IShellFolder2Vtbl vt_ShellFolder2 = { - ISF_Fonts_fnQueryInterface, - ISF_Fonts_fnAddRef, - ISF_Fonts_fnRelease, - ISF_Fonts_fnParseDisplayName, - ISF_Fonts_fnEnumObjects, - ISF_Fonts_fnBindToObject, - ISF_Fonts_fnBindToStorage, - ISF_Fonts_fnCompareIDs, - ISF_Fonts_fnCreateViewObject, - ISF_Fonts_fnGetAttributesOf, - ISF_Fonts_fnGetUIObjectOf, - ISF_Fonts_fnGetDisplayNameOf, - ISF_Fonts_fnSetNameOf, - /* ShellFolder2 */ - ISF_Fonts_fnGetDefaultSearchGUID, - ISF_Fonts_fnEnumSearches, - ISF_Fonts_fnGetDefaultColumn, - ISF_Fonts_fnGetDefaultColumnState, - ISF_Fonts_fnGetDetailsEx, - ISF_Fonts_fnGetDetailsOf, - ISF_Fonts_fnMapColumnToSCID -}; - -/************************************************************************ - * INPFldr_PersistFolder2_QueryInterface - */ -static HRESULT WINAPI INPFldr_PersistFolder2_QueryInterface (IPersistFolder2 * iface, - REFIID iid, LPVOID * ppvObj) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - TRACE ("(%p)\n", This); - - return IUnknown_QueryInterface (_IUnknown_ (This), iid, ppvObj); -} - -/************************************************************************ - * INPFldr_PersistFolder2_AddRef - */ -static ULONG WINAPI INPFldr_PersistFolder2_AddRef (IPersistFolder2 * iface) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - TRACE ("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_AddRef (_IUnknown_ (This)); -} - -/************************************************************************ - * ISFPersistFolder_Release - */ -static ULONG WINAPI INPFldr_PersistFolder2_Release (IPersistFolder2 * iface) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - TRACE ("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_Release (_IUnknown_ (This)); -} - -/************************************************************************ - * INPFldr_PersistFolder2_GetClassID - */ -static HRESULT WINAPI INPFldr_PersistFolder2_GetClassID ( - IPersistFolder2 * iface, CLSID * lpClassId) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - 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 - */ -static HRESULT WINAPI INPFldr_PersistFolder2_Initialize ( - IPersistFolder2 * iface, LPCITEMIDLIST pidl) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - TRACE ("(%p)->(%p)\n", This, pidl); - - return E_NOTIMPL; -} - -/************************************************************************** - * IPersistFolder2_fnGetCurFolder - */ -static HRESULT WINAPI INPFldr_PersistFolder2_GetCurFolder ( - IPersistFolder2 * iface, LPITEMIDLIST * pidl) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - TRACE ("(%p)->(%p)\n", This, pidl); - - if (!pidl) - return E_POINTER; - - *pidl = ILClone (This->pidlRoot); - - return S_OK; -} - -static const IPersistFolder2Vtbl vt_NP_PersistFolder2 = -{ - INPFldr_PersistFolder2_QueryInterface, - INPFldr_PersistFolder2_AddRef, - INPFldr_PersistFolder2_Release, - INPFldr_PersistFolder2_GetClassID, - INPFldr_PersistFolder2_Initialize, - INPFldr_PersistFolder2_GetCurFolder -}; - -/************************************************************************** -* IContextMenu2 Implementation -*/ - -/************************************************************************ - * ISF_Fonts_IContextMenu_QueryInterface - */ -static HRESULT WINAPI ISF_Fonts_IContextMenu2_QueryInterface(IContextMenu2 * iface, REFIID iid, LPVOID * ppvObject) -{ - _ICOM_THIS_From_IContextMenu2FontItem(IGenericSFImpl, iface); - - TRACE("(%p)\n", This); - - return IUnknown_QueryInterface(_IUnknown_(This), iid, ppvObject); -} - -/************************************************************************ - * ISF_Fonts_IContextMenu_AddRef - */ -static ULONG WINAPI ISF_Fonts_IContextMenu2_AddRef(IContextMenu2 * iface) -{ - _ICOM_THIS_From_IContextMenu2FontItem(IGenericSFImpl, iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_AddRef(_IUnknown_(This)); -} - -/************************************************************************ - * ISF_Fonts_IContextMenu_Release - */ -static ULONG WINAPI ISF_Fonts_IContextMenu2_Release(IContextMenu2 * iface) -{ - _ICOM_THIS_From_IContextMenu2FontItem(IGenericSFImpl, iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_Release(_IUnknown_(This)); -} - -/************************************************************************** -* ISF_Fonts_IContextMenu_QueryContextMenu() -*/ -static HRESULT WINAPI ISF_Fonts_IContextMenu2_QueryContextMenu( - IContextMenu2 *iface, - HMENU hMenu, - UINT indexMenu, - UINT idCmdFirst, - UINT idCmdLast, - UINT uFlags) -{ - WCHAR szBuffer[30] = {0}; - ULONG Count = 1; - - _ICOM_THIS_From_IContextMenu2FontItem(IGenericSFImpl, iface); - - 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() -*/ -static HRESULT WINAPI ISF_Fonts_IContextMenu2_InvokeCommand( - IContextMenu2 *iface, - LPCMINVOKECOMMANDINFO lpcmi) -{ - SHELLEXECUTEINFOW sei; - PIDLFontStruct * pfont; - SHFILEOPSTRUCTW op; - IGenericSFImpl * This = impl_from_IContextMenu2(iface); - - - 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(This->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(This->apidl); - op.pFrom = pfont->szName + pfont->offsFile; - SHFileOperationW(&op); - } - - return S_OK; -} - -/************************************************************************** - * ISF_Fonts_IContextMenu_GetCommandString() - * - */ -static HRESULT WINAPI ISF_Fonts_IContextMenu2_GetCommandString( - IContextMenu2 *iface, - UINT_PTR idCommand, - UINT uFlags, - UINT* lpReserved, - LPSTR lpszName, - UINT uMaxNameLen) -{ - _ICOM_THIS_From_IContextMenu2FontItem(IGenericSFImpl, iface); - - 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() -*/ -static HRESULT WINAPI ISF_Fonts_IContextMenu2_HandleMenuMsg( - IContextMenu2 *iface, - UINT uMsg, - WPARAM wParam, - LPARAM lParam) -{ - _ICOM_THIS_From_IContextMenu2FontItem(IGenericSFImpl, iface); - - TRACE("ISF_Fonts_IContextMenu_HandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n",This, uMsg, wParam, lParam); - - return E_NOTIMPL; -} - -static const IContextMenu2Vtbl vt_ContextMenu2FontItem = -{ - ISF_Fonts_IContextMenu2_QueryInterface, - ISF_Fonts_IContextMenu2_AddRef, - ISF_Fonts_IContextMenu2_Release, - ISF_Fonts_IContextMenu2_QueryContextMenu, - ISF_Fonts_IContextMenu2_InvokeCommand, - ISF_Fonts_IContextMenu2_GetCommandString, - ISF_Fonts_IContextMenu2_HandleMenuMsg -}; - - - - - - diff --git a/reactos/dll/win32/shell32/shfldr_fs.c b/reactos/dll/win32/shell32/shfldr_fs.c deleted file mode 100644 index 6a0c9537f2f..00000000000 --- a/reactos/dll/win32/shell32/shfldr_fs.c +++ /dev/null @@ -1,1715 +0,0 @@ - -/* - * 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 - -WINE_DEFAULT_DEBUG_CHANNEL (shell); - -/*********************************************************************** -* IShellFolder implementation -*/ - -typedef struct { - const IUnknownVtbl *lpVtbl; - LONG ref; - const IShellFolder2Vtbl *lpvtblShellFolder; - const IPersistFolder3Vtbl *lpvtblPersistFolder3; - const IDropTargetVtbl *lpvtblDropTarget; - const ISFHelperVtbl *lpvtblSFHelper; - - IUnknown *pUnkOuter; /* used for aggregation */ - - 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 */ -} IGenericSFImpl, *LPIGenericSFImpl; - -static const IUnknownVtbl unkvt; -static const IShellFolder2Vtbl sfvt; -static const IPersistFolder3Vtbl vt_FSFldr_PersistFolder3; /* IPersistFolder3 for a FS_Folder */ -static const IDropTargetVtbl dtvt; -static const ISFHelperVtbl shvt; - -static LPIGenericSFImpl __inline impl_from_IShellFolder2( IShellFolder2 *iface ) -{ - return (LPIGenericSFImpl)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpvtblShellFolder)); -} - -static LPIGenericSFImpl __inline impl_from_IPersistFolder3( IPersistFolder3 *iface ) -{ - return (LPIGenericSFImpl)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpvtblPersistFolder3)); -} - -static LPIGenericSFImpl __inline impl_from_IDropTarget( IDropTarget *iface ) -{ - return (LPIGenericSFImpl)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpvtblDropTarget)); -} - -static LPIGenericSFImpl __inline impl_from_ISFHelper( ISFHelper *iface ) -{ - return (LPIGenericSFImpl)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpvtblSFHelper)); -} - - -/* - converts This to an interface pointer -*/ -#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) -#define _IShellFolder_(This) (IShellFolder*)&(This->lpvtblShellFolder) -#define _IShellFolder2_(This) (IShellFolder2*)&(This->lpvtblShellFolder) -#define _IPersist_(This) (IPersist*)&(This->lpvtblPersistFolder3) -#define _IPersistFolder_(This) (IPersistFolder*)&(This->lpvtblPersistFolder3) -#define _IPersistFolder2_(This) (IPersistFolder2*)&(This->lpvtblPersistFolder3) -#define _IPersistFolder3_(This) (IPersistFolder3*)&(This->lpvtblPersistFolder3) -#define _IDropTarget_(This) (IDropTarget*)&(This->lpvtblDropTarget) -#define _ISFHelper_(This) (ISFHelper*)&(This->lpvtblSFHelper) - -/************************************************************************** -* registers clipboardformat once -*/ -static void SF_RegisterClipFmt (IGenericSFImpl * This) -{ - TRACE ("(%p)\n", This); - - if (!This->cfShellIDList) { - This->cfShellIDList = RegisterClipboardFormatW (CFSTR_SHELLIDLIST); - } -} - -/************************************************************************** -* we need a separate IUnknown to handle aggregation -* (inner IUnknown) -*/ -static HRESULT WINAPI IUnknown_fnQueryInterface (IUnknown * iface, REFIID riid, LPVOID * ppvObj) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); - - *ppvObj = NULL; - - if (IsEqualIID (riid, &IID_IUnknown)) - *ppvObj = _IUnknown_ (This); - else if (IsEqualIID (riid, &IID_IShellFolder)) - *ppvObj = _IShellFolder_ (This); - else if (IsEqualIID (riid, &IID_IShellFolder2)) - *ppvObj = _IShellFolder_ (This); - else if (IsEqualIID (riid, &IID_IPersist)) - *ppvObj = _IPersist_ (This); - else if (IsEqualIID (riid, &IID_IPersistFolder)) - *ppvObj = _IPersistFolder_ (This); - else if (IsEqualIID (riid, &IID_IPersistFolder2)) - *ppvObj = _IPersistFolder2_ (This); - else if (IsEqualIID (riid, &IID_IPersistFolder3)) - *ppvObj = _IPersistFolder3_ (This); - else if (IsEqualIID (riid, &IID_ISFHelper)) - *ppvObj = _ISFHelper_ (This); - else if (IsEqualIID (riid, &IID_IDropTarget)) { - *ppvObj = _IDropTarget_ (This); - SF_RegisterClipFmt (This); - } - - if (*ppvObj) { - IUnknown_AddRef ((IUnknown *) (*ppvObj)); - TRACE ("-- Interface = %p\n", *ppvObj); - return S_OK; - } - TRACE ("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI IUnknown_fnAddRef (IUnknown * iface) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE ("(%p)->(count=%u)\n", This, refCount - 1); - - return refCount; -} - -static ULONG WINAPI IUnknown_fnRelease (IUnknown * iface) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE ("(%p)->(count=%u)\n", This, refCount + 1); - - if (!refCount) { - TRACE ("-- destroying IShellFolder(%p)\n", This); - - SHFree (This->pidlRoot); - SHFree (This->sPathTarget); - LocalFree ((HLOCAL) This); - } - return refCount; -} - -static const IUnknownVtbl unkvt = -{ - IUnknown_fnQueryInterface, - IUnknown_fnAddRef, - IUnknown_fnRelease, -}; - -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 - -/************************************************************************** -* IFSFolder_Constructor -* -* NOTES -* creating undocumented ShellFS_Folder as part of an aggregation -* {F3364BA0-65B9-11CE-A9BA-00AA004AE837} -* -*/ -HRESULT WINAPI -IFSFolder_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) -{ - IGenericSFImpl *sf; - - TRACE ("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid (riid)); - - if (pUnkOuter && !IsEqualIID (riid, &IID_IUnknown)) - return CLASS_E_NOAGGREGATION; - sf = (IGenericSFImpl *) LocalAlloc (LMEM_ZEROINIT, sizeof (IGenericSFImpl)); - if (!sf) - return E_OUTOFMEMORY; - - sf->ref = 0; - sf->lpVtbl = &unkvt; - sf->lpvtblShellFolder = &sfvt; - sf->lpvtblPersistFolder3 = &vt_FSFldr_PersistFolder3; - sf->lpvtblDropTarget = &dtvt; - sf->lpvtblSFHelper = &shvt; - sf->pclsid = (CLSID *) & CLSID_ShellFSFolder; - sf->pUnkOuter = pUnkOuter ? pUnkOuter : _IUnknown_ (sf); - - if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (sf), riid, ppv))) { - IUnknown_Release (_IUnknown_ (sf)); - return E_NOINTERFACE; - } - - TRACE ("--%p\n", *ppv); - return S_OK; -} - -/************************************************************************** - * IShellFolder_fnQueryInterface - * - * PARAMETERS - * REFIID riid [in ] Requested InterfaceID - * LPVOID* ppvObject [out] Interface* to hold the result - */ -static HRESULT WINAPI -IShellFolder_fnQueryInterface (IShellFolder2 * iface, REFIID riid, - LPVOID * ppvObj) -{ - IGenericSFImpl *This = impl_from_IShellFolder2(iface); - - TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); - - return IUnknown_QueryInterface (This->pUnkOuter, riid, ppvObj); -} - -/************************************************************************** -* IShellFolder_AddRef -*/ - -static ULONG WINAPI IShellFolder_fnAddRef (IShellFolder2 * iface) -{ - IGenericSFImpl *This = impl_from_IShellFolder2(iface); - - TRACE ("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_AddRef (This->pUnkOuter); -} - -/************************************************************************** - * IShellFolder_fnRelease - */ -static ULONG WINAPI IShellFolder_fnRelease (IShellFolder2 * iface) -{ - IGenericSFImpl *This = impl_from_IShellFolder2(iface); - - TRACE ("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_Release (This->pUnkOuter); -} - -/************************************************************************** - * 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 = IBindCtx_GetObjectParam( pbc, (LPOLESTR) szfsbc, ¶m ); - if (FAILED(r)) - return NULL; - - r = IUnknown_QueryInterface( param, &IID_IFileSystemBindData, - (LPVOID*) &fsbd ); - if (SUCCEEDED(r)) - { - r = IFileSystemBindData_GetFindData( fsbd, &wfd ); - if (SUCCEEDED(r)) - { - lstrcpynW( &wfd.cFileName[0], path, MAX_PATH ); - pidl = _ILCreateFromFindDataW( &wfd ); - } - IFileSystemBindData_Release( fsbd ); - } - - 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 -*/ -static HRESULT WINAPI -IShellFolder_fnParseDisplayName (IShellFolder2 * iface, - HWND hwndOwner, - LPBC pbc, - LPOLESTR lpszDisplayName, - DWORD * pchEaten, LPITEMIDLIST * ppidl, - DWORD * pdwAttributes) -{ - IGenericSFImpl *This = impl_from_IShellFolder2(iface); - - 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, This->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 (iface, hwndOwner, pbc, - &pidlTemp, (LPOLESTR) szNext, pchEaten, pdwAttributes); - } else { - /* it's the last element */ - if (pdwAttributes && *pdwAttributes) { - hr = SHELL32_GetItemAttributes (_IShellFolder_ (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 -*/ -static HRESULT WINAPI -IShellFolder_fnEnumObjects (IShellFolder2 * iface, HWND hwndOwner, - DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) -{ - IGenericSFImpl *This = impl_from_IShellFolder2(iface); - - TRACE ("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", This, hwndOwner, - dwFlags, ppEnumIDList); - - *ppEnumIDList = IEnumIDList_Constructor(); - if (*ppEnumIDList) - CreateFolderEnumList(*ppEnumIDList, This->sPathTarget, dwFlags); - - TRACE ("-- (%p)->(new ID List: %p)\n", This, *ppEnumIDList); - - return *ppEnumIDList ? S_OK : E_OUTOFMEMORY; -} - -/************************************************************************** -* 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* -*/ -static HRESULT WINAPI -IShellFolder_fnBindToObject (IShellFolder2 * iface, LPCITEMIDLIST pidl, - LPBC pbc, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = impl_from_IShellFolder2(iface); - - TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", This, pidl, pbc, - shdebugstr_guid (riid), ppvOut); - - return SHELL32_BindToChild (This->pidlRoot, This->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 -*/ -static HRESULT WINAPI -IShellFolder_fnBindToStorage (IShellFolder2 * iface, LPCITEMIDLIST pidl, - LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = impl_from_IShellFolder2(iface); - - FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", This, pidl, pbcReserved, - shdebugstr_guid (riid), ppvOut); - - *ppvOut = NULL; - return E_NOTIMPL; -} - -/************************************************************************** -* IShellFolder_fnCompareIDs -*/ - -static HRESULT WINAPI -IShellFolder_fnCompareIDs (IShellFolder2 * iface, LPARAM lParam, - LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) -{ - IGenericSFImpl *This = impl_from_IShellFolder2(iface); - - 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; -} - -/************************************************************************** -* IShellFolder_fnCreateViewObject -*/ -static HRESULT WINAPI -IShellFolder_fnCreateViewObject (IShellFolder2 * iface, HWND hwndOwner, - REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = impl_from_IShellFolder2(iface); - - 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 = IShellFolder_QueryInterface (iface, &IID_IDropTarget, ppvOut); - } else if (IsEqualIID (riid, &IID_IContextMenu)) { - FIXME ("IContextMenu not implemented\n"); - hr = E_NOTIMPL; - } else if (IsEqualIID (riid, &IID_IShellView)) { - pShellView = IShellView_Constructor ((IShellFolder *) iface); - if (pShellView) { - hr = IShellView_QueryInterface (pShellView, riid, ppvOut); - IShellView_Release (pShellView); - } - } - } - 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 -* -*/ -static HRESULT WINAPI -IShellFolder_fnGetAttributesOf (IShellFolder2 * iface, UINT cidl, - LPCITEMIDLIST * apidl, DWORD * rgfInOut) -{ - IGenericSFImpl *This = impl_from_IShellFolder2(iface); - - 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(This->pidlRoot, &IID_IShellFolder, (LPVOID*)&psfParent, (LPCITEMIDLIST*)&rpidl); - if(SUCCEEDED(hr)) { - SHELL32_GetItemAttributes (psfParent, rpidl, rgfInOut); - IShellFolder_Release(psfParent); - } - } - else { - while (cidl > 0 && *apidl) { - pdump (*apidl); - 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; -} - -/************************************************************************** -* 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. -*/ -static HRESULT WINAPI -IShellFolder_fnGetUIObjectOf (IShellFolder2 * iface, - HWND hwndOwner, - UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, - UINT * prgfInOut, LPVOID * ppvOut) -{ - IGenericSFImpl *This = impl_from_IShellFolder2(iface); - - 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(This->pidlRoot, hwndOwner, cidl, apidl, (IShellFolder*)iface, NULL, 0, NULL, (IContextMenu**)&pObj); - } else if (IsEqualIID (riid, &IID_IDataObject)){ - if (cidl >= 1) { - pObj = (LPUNKNOWN) IDataObject_Constructor (hwndOwner, - This->pidlRoot, apidl, cidl); - hr = S_OK; - } - else - { - pObj = (LPUNKNOWN) IDataObject_Constructor (hwndOwner, This->pidlRoot, (LPCITEMIDLIST*)&This->pidlRoot, 1); - hr = S_OK; - } - } else if (IsEqualIID (riid, &IID_IExtractIconA) && (cidl == 1)) { - pidl = ILCombine (This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl); - SHFree (pidl); - hr = S_OK; - } else if (IsEqualIID (riid, &IID_IExtractIconW) && (cidl == 1)) { - pidl = ILCombine (This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl); - SHFree (pidl); - hr = S_OK; - } else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) { - hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, - (LPVOID *) & pObj); - } else if ((IsEqualIID(riid,&IID_IShellLinkW) || - IsEqualIID(riid,&IID_IShellLinkA)) && (cidl == 1)) { - pidl = ILCombine (This->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 -*/ - -static HRESULT WINAPI -IShellFolder_fnGetDisplayNameOf (IShellFolder2 * iface, LPCITEMIDLIST pidl, - DWORD dwFlags, LPSTRRET strRet) -{ - IGenericSFImpl *This = impl_from_IShellFolder2(iface); - 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 = 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 (This->sPathTarget) - lstrcpynW(pszPath, This->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) && - This->sPathTarget) - { - lstrcpynW(pszPath, This->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(iface, 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->u.cStr, MAX_PATH, - NULL, NULL)) - strRet->u.cStr[0] = '\0'; - CoTaskMemFree(pszPath); - } else { - strRet->uType = STRRET_WSTR; - strRet->u.pOleStr = pszPath; - } - } else - CoTaskMemFree(pszPath); - - TRACE ("-- (%p)->(%s)\n", This, strRet->uType == STRRET_CSTR ? strRet->u.cStr : debugstr_w(strRet->u.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 -*/ -static HRESULT WINAPI IShellFolder_fnSetNameOf (IShellFolder2 * iface, - HWND hwndOwner, - LPCITEMIDLIST pidl, - LPCOLESTR lpName, - DWORD dwFlags, - LPITEMIDLIST * pPidlOut) -{ - IGenericSFImpl *This = impl_from_IShellFolder2(iface); - 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, This->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, This->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; -} - -static HRESULT WINAPI IShellFolder_fnGetDefaultSearchGUID (IShellFolder2 *iface, - GUID * pguid) -{ - IGenericSFImpl *This = impl_from_IShellFolder2(iface); - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} -static HRESULT WINAPI IShellFolder_fnEnumSearches (IShellFolder2 * iface, - IEnumExtraSearch ** ppenum) -{ - IGenericSFImpl *This = impl_from_IShellFolder2(iface); - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI -IShellFolder_fnGetDefaultColumn (IShellFolder2 * iface, DWORD dwRes, - ULONG * pSort, ULONG * pDisplay) -{ - IGenericSFImpl *This = impl_from_IShellFolder2(iface); - - TRACE ("(%p)\n", This); - - if (pSort) - *pSort = 0; - if (pDisplay) - *pDisplay = 0; - - return S_OK; -} - -static HRESULT WINAPI -IShellFolder_fnGetDefaultColumnState (IShellFolder2 * iface, UINT iColumn, - DWORD * pcsFlags) -{ - IGenericSFImpl *This = impl_from_IShellFolder2(iface); - - TRACE ("(%p)\n", This); - - if (!pcsFlags || iColumn >= GENERICSHELLVIEWCOLUMNS) - return E_INVALIDARG; - - *pcsFlags = GenericSFHeader[iColumn].pcsFlags; - - return S_OK; -} - -static HRESULT WINAPI -IShellFolder_fnGetDetailsEx (IShellFolder2 * iface, LPCITEMIDLIST pidl, - const SHCOLUMNID * pscid, VARIANT * pv) -{ - IGenericSFImpl *This = impl_from_IShellFolder2(iface); - FIXME ("(%p)\n", This); - - return E_NOTIMPL; -} - -static HRESULT WINAPI -IShellFolder_fnGetDetailsOf (IShellFolder2 * iface, LPCITEMIDLIST pidl, - UINT iColumn, SHELLDETAILS * psd) -{ - IGenericSFImpl *This = impl_from_IShellFolder2(iface); - 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.u.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 = IShellFolder_GetDisplayNameOf (iface, pidl, - SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str); - break; - case 1: /* size */ - _ILGetFileSize (pidl, psd->str.u.cStr, MAX_PATH); - break; - case 2: /* type */ - _ILGetFileType (pidl, psd->str.u.cStr, MAX_PATH); - break; - case 3: /* date */ - _ILGetFileDate (pidl, psd->str.u.cStr, MAX_PATH); - break; - case 4: /* attributes */ - _ILGetFileAttributes (pidl, psd->str.u.cStr, MAX_PATH); - break; - } - } - - return hr; -} - -static HRESULT WINAPI -IShellFolder_fnMapColumnToSCID (IShellFolder2 * iface, UINT column, - SHCOLUMNID * pscid) -{ - IGenericSFImpl *This = impl_from_IShellFolder2(iface); - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -static const IShellFolder2Vtbl sfvt = -{ - IShellFolder_fnQueryInterface, - IShellFolder_fnAddRef, - IShellFolder_fnRelease, - IShellFolder_fnParseDisplayName, - IShellFolder_fnEnumObjects, - IShellFolder_fnBindToObject, - IShellFolder_fnBindToStorage, - IShellFolder_fnCompareIDs, - IShellFolder_fnCreateViewObject, - IShellFolder_fnGetAttributesOf, - IShellFolder_fnGetUIObjectOf, - IShellFolder_fnGetDisplayNameOf, - IShellFolder_fnSetNameOf, - /* ShellFolder2 */ - IShellFolder_fnGetDefaultSearchGUID, - IShellFolder_fnEnumSearches, - IShellFolder_fnGetDefaultColumn, - IShellFolder_fnGetDefaultColumnState, - IShellFolder_fnGetDetailsEx, - IShellFolder_fnGetDetailsOf, - IShellFolder_fnMapColumnToSCID -}; - -/**************************************************************************** - * ISFHelper for IShellFolder implementation - */ - -static HRESULT WINAPI -ISFHelper_fnQueryInterface (ISFHelper * iface, REFIID riid, LPVOID * ppvObj) -{ - IGenericSFImpl *This = impl_from_ISFHelper(iface); - - TRACE ("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_QueryInterface (This->pUnkOuter, riid, ppvObj); -} - -static ULONG WINAPI ISFHelper_fnAddRef (ISFHelper * iface) -{ - IGenericSFImpl *This = impl_from_ISFHelper(iface); - - TRACE ("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_AddRef (This->pUnkOuter); -} - -static ULONG WINAPI ISFHelper_fnRelease (ISFHelper * iface) -{ - IGenericSFImpl *This = impl_from_ISFHelper(iface); - - TRACE ("(%p)\n", This); - - return IUnknown_Release (This->pUnkOuter); -} - -/**************************************************************************** - * ISFHelper_fnAddFolder - * - * creates a unique folder name - */ - -static HRESULT WINAPI -ISFHelper_fnGetUniqueName (ISFHelper * iface, LPWSTR pwszName, UINT uLen) -{ - IGenericSFImpl *This = impl_from_ISFHelper(iface); - 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 = IShellFolder_fnEnumObjects (_IShellFolder2_ (This), 0, - SHCONTF_FOLDERS | SHCONTF_NONFOLDERS | SHCONTF_INCLUDEHIDDEN, &penum); - if (penum) { - LPITEMIDLIST pidl; - DWORD dwFetched; - int i = 1; - -next: - IEnumIDList_Reset (penum); - while (S_OK == IEnumIDList_Next (penum, 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; - } - } - - IEnumIDList_Release (penum); - } - return hr; -} - -/**************************************************************************** - * ISFHelper_fnAddFolder - * - * adds a new folder. - */ - -static HRESULT WINAPI -ISFHelper_fnAddFolder (ISFHelper * iface, HWND hwnd, LPCWSTR pwszName, - LPITEMIDLIST * ppidlOut) -{ - IGenericSFImpl *This = impl_from_ISFHelper(iface); - WCHAR wszNewDir[MAX_PATH]; - DWORD bRes; - HRESULT hres = E_FAIL; - - TRACE ("(%p)(%s %p)\n", This, debugstr_w(pwszName), ppidlOut); - - wszNewDir[0] = 0; - if (This->sPathTarget) - lstrcpynW(wszNewDir, This->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 = 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 - */ -static HRESULT WINAPI -ISFHelper_fnDeleteItems (ISFHelper * iface, UINT cidl, LPCITEMIDLIST * apidl) -{ - IGenericSFImpl *This = impl_from_ISFHelper(iface); - 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 (This->sPathTarget) - lstrcpynW(wszPath, This->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(This->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 - */ -static HRESULT WINAPI -ISFHelper_fnCopyItems (ISFHelper * iface, 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; - - IGenericSFImpl *This = impl_from_ISFHelper(iface); - - TRACE ("(%p)->(%p,%u,%p)\n", This, pSFFrom, cidl, apidl); - - hr = IShellFolder_QueryInterface (pSFFrom, &IID_IPersistFolder2, (LPVOID *) & ppf2); - if (SUCCEEDED(hr)) - { - if (FAILED(IPersistFolder2_GetCurFolder (ppf2, &pidl))) - { - IPersistFolder2_Release(ppf2); - return E_FAIL; - } - IPersistFolder2_Release(ppf2); - - if (FAILED(IShellFolder_GetDisplayNameOf(pSFFrom, 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, This->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); - IPersistFolder2_Release (ppf2); - 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; -} - -static const ISFHelperVtbl shvt = -{ - ISFHelper_fnQueryInterface, - ISFHelper_fnAddRef, - ISFHelper_fnRelease, - ISFHelper_fnGetUniqueName, - ISFHelper_fnAddFolder, - ISFHelper_fnDeleteItems, - ISFHelper_fnCopyItems -}; - -/************************************************************************ - * IFSFldr_PersistFolder3_QueryInterface - * - */ -static HRESULT WINAPI -IFSFldr_PersistFolder3_QueryInterface (IPersistFolder3 * iface, REFIID iid, - LPVOID * ppvObj) -{ - IGenericSFImpl *This = impl_from_IPersistFolder3(iface); - - TRACE ("(%p)\n", This); - - return IUnknown_QueryInterface (This->pUnkOuter, iid, ppvObj); -} - -/************************************************************************ - * IFSFldr_PersistFolder3_AddRef - * - */ -static ULONG WINAPI -IFSFldr_PersistFolder3_AddRef (IPersistFolder3 * iface) -{ - IGenericSFImpl *This = impl_from_IPersistFolder3(iface); - - TRACE ("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_AddRef (This->pUnkOuter); -} - -/************************************************************************ - * IFSFldr_PersistFolder3_Release - * - */ -static ULONG WINAPI -IFSFldr_PersistFolder3_Release (IPersistFolder3 * iface) -{ - IGenericSFImpl *This = impl_from_IPersistFolder3(iface); - - TRACE ("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_Release (This->pUnkOuter); -} - -/************************************************************************ - * IFSFldr_PersistFolder3_GetClassID - */ -static HRESULT WINAPI -IFSFldr_PersistFolder3_GetClassID (IPersistFolder3 * iface, CLSID * lpClassId) -{ - IGenericSFImpl *This = impl_from_IPersistFolder3(iface); - - TRACE ("(%p)\n", This); - - if (!lpClassId) - return E_POINTER; - *lpClassId = *This->pclsid; - - return S_OK; -} - -/************************************************************************ - * IFSFldr_PersistFolder3_Initialize - * - * NOTES - * sPathTarget is not set. Don't know how to handle in a non rooted environment. - */ -static HRESULT WINAPI -IFSFldr_PersistFolder3_Initialize (IPersistFolder3 * iface, LPCITEMIDLIST pidl) -{ - WCHAR wszTemp[MAX_PATH]; - - IGenericSFImpl *This = impl_from_IPersistFolder3(iface); - - TRACE ("(%p)->(%p)\n", This, pidl); - - SHFree (This->pidlRoot); /* free the old pidl */ - This->pidlRoot = ILClone (pidl); /* set my pidl */ - - SHFree (This->sPathTarget); - This->sPathTarget = NULL; - - /* set my path */ - if (SHGetPathFromIDListW (pidl, wszTemp)) { - int len = wcslen(wszTemp); - This->sPathTarget = SHAlloc((len + 1) * sizeof(WCHAR)); - if (!This->sPathTarget) - return E_OUTOFMEMORY; - memcpy(This->sPathTarget, wszTemp, (len + 1) * sizeof(WCHAR)); - } - - TRACE ("--(%p)->(%s)\n", This, debugstr_w(This->sPathTarget)); - return S_OK; -} - -/************************************************************************** - * IFSFldr_PersistFolder3_GetCurFolder - */ -static HRESULT WINAPI -IFSFldr_PersistFolder3_fnGetCurFolder (IPersistFolder3 * iface, - LPITEMIDLIST * pidl) -{ - IGenericSFImpl *This = impl_from_IPersistFolder3(iface); - - TRACE ("(%p)->(%p)\n", This, pidl); - - if (!pidl) return E_POINTER; - *pidl = ILClone (This->pidlRoot); - return S_OK; -} - -/************************************************************************** - * IFSFldr_PersistFolder3_InitializeEx - * - * FIXME: error handling - */ -static HRESULT WINAPI -IFSFldr_PersistFolder3_InitializeEx (IPersistFolder3 * iface, - IBindCtx * pbc, LPCITEMIDLIST pidlRoot, - const PERSIST_FOLDER_TARGET_INFO * ppfti) -{ - WCHAR wszTemp[MAX_PATH]; - - IGenericSFImpl *This = impl_from_IPersistFolder3(iface); - - TRACE ("(%p)->(%p,%p,%p)\n", This, pbc, pidlRoot, 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 (pidlRoot); - if (ppfti && ppfti->pidlTargetFolder) - pdump (ppfti->pidlTargetFolder); - - if (This->pidlRoot) - __SHFreeAndNil (&This->pidlRoot); /* free the old */ - if (This->sPathTarget) - __SHFreeAndNil (&This->sPathTarget); - - /* - * Root path and pidl - */ - This->pidlRoot = ILClone (pidlRoot); - - /* - * 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); - This->sPathTarget = SHAlloc((len + 1) * sizeof(WCHAR)); - if (!This->sPathTarget) - return E_OUTOFMEMORY; - memcpy(This->sPathTarget, wszTemp, (len + 1) * sizeof(WCHAR)); - } - } else if (ppfti->szTargetParsingName[0]) { - int len = wcslen(ppfti->szTargetParsingName); - This->sPathTarget = SHAlloc((len + 1) * sizeof(WCHAR)); - if (!This->sPathTarget) - return E_OUTOFMEMORY; - memcpy(This->sPathTarget, ppfti->szTargetParsingName, - (len + 1) * sizeof(WCHAR)); - } else if (ppfti->pidlTargetFolder) { - if (SHGetPathFromIDListW(ppfti->pidlTargetFolder, wszTemp)) { - int len = wcslen(wszTemp); - This->sPathTarget = SHAlloc((len + 1) * sizeof(WCHAR)); - if (!This->sPathTarget) - return E_OUTOFMEMORY; - memcpy(This->sPathTarget, wszTemp, (len + 1) * sizeof(WCHAR)); - } - } - } - - TRACE ("--(%p)->(target=%s)\n", This, debugstr_w(This->sPathTarget)); - pdump (This->pidlRoot); - return (This->sPathTarget) ? S_OK : E_FAIL; -} - -static HRESULT WINAPI -IFSFldr_PersistFolder3_GetFolderTargetInfo (IPersistFolder3 * iface, - PERSIST_FOLDER_TARGET_INFO * ppfti) -{ - IGenericSFImpl *This = impl_from_IPersistFolder3(iface); - FIXME ("(%p)->(%p)\n", This, ppfti); - ZeroMemory (ppfti, sizeof (*ppfti)); - return E_NOTIMPL; -} - -static const IPersistFolder3Vtbl vt_FSFldr_PersistFolder3 = -{ - IFSFldr_PersistFolder3_QueryInterface, - IFSFldr_PersistFolder3_AddRef, - IFSFldr_PersistFolder3_Release, - IFSFldr_PersistFolder3_GetClassID, - IFSFldr_PersistFolder3_Initialize, - IFSFldr_PersistFolder3_fnGetCurFolder, - IFSFldr_PersistFolder3_InitializeEx, - IFSFldr_PersistFolder3_GetFolderTargetInfo -}; - -/**************************************************************************** - * ISFDropTarget implementation - */ -static BOOL -ISFDropTarget_QueryDrop (IDropTarget * iface, DWORD dwKeyState, - LPDWORD pdwEffect) -{ - DWORD dwEffect = *pdwEffect; - - IGenericSFImpl *This = impl_from_IDropTarget(iface); - - *pdwEffect = DROPEFFECT_NONE; - - if (This->fAcceptFmt) { /* Does our interpretation of the keystate ... */ - *pdwEffect = KeyStateToDropEffect (dwKeyState); - - /* ... matches the desired effect ? */ - if (dwEffect & *pdwEffect) { - return TRUE; - } - } - return FALSE; -} - -static HRESULT WINAPI -ISFDropTarget_QueryInterface (IDropTarget * iface, REFIID riid, LPVOID * ppvObj) -{ - IGenericSFImpl *This = impl_from_IDropTarget(iface); - - TRACE ("(%p)\n", This); - - return IUnknown_QueryInterface (This->pUnkOuter, riid, ppvObj); -} - -static ULONG WINAPI ISFDropTarget_AddRef (IDropTarget * iface) -{ - IGenericSFImpl *This = impl_from_IDropTarget(iface); - - TRACE ("(%p)\n", This); - - return IUnknown_AddRef (This->pUnkOuter); -} - -static ULONG WINAPI ISFDropTarget_Release (IDropTarget * iface) -{ - IGenericSFImpl *This = impl_from_IDropTarget(iface); - - TRACE ("(%p)\n", This); - - return IUnknown_Release (This->pUnkOuter); -} - -static HRESULT WINAPI -ISFDropTarget_DragEnter (IDropTarget * iface, IDataObject * pDataObject, - DWORD dwKeyState, POINTL pt, DWORD * pdwEffect) -{ - FORMATETC fmt; - - IGenericSFImpl *This = impl_from_IDropTarget(iface); - - TRACE ("(%p)->(DataObject=%p)\n", This, pDataObject); - - InitFormatEtc (fmt, This->cfShellIDList, TYMED_HGLOBAL); - - This->fAcceptFmt = (S_OK == IDataObject_QueryGetData (pDataObject, &fmt)) ? - TRUE : FALSE; - - ISFDropTarget_QueryDrop (iface, dwKeyState, pdwEffect); - - return S_OK; -} - -static HRESULT WINAPI -ISFDropTarget_DragOver (IDropTarget * iface, DWORD dwKeyState, POINTL pt, - DWORD * pdwEffect) -{ - IGenericSFImpl *This = impl_from_IDropTarget(iface); - - TRACE ("(%p)\n", This); - - if (!pdwEffect) - return E_INVALIDARG; - - ISFDropTarget_QueryDrop (iface, dwKeyState, pdwEffect); - - return S_OK; -} - -static HRESULT WINAPI ISFDropTarget_DragLeave (IDropTarget * iface) -{ - IGenericSFImpl *This = impl_from_IDropTarget(iface); - - TRACE ("(%p)\n", This); - - This->fAcceptFmt = FALSE; - - return S_OK; -} - -static HRESULT WINAPI -ISFDropTarget_Drop (IDropTarget * iface, IDataObject * pDataObject, - DWORD dwKeyState, POINTL pt, DWORD * pdwEffect) -{ - IGenericSFImpl *This = impl_from_IDropTarget(iface); - - FIXME ("(%p) object dropped\n", This); - - return E_NOTIMPL; -} - -static const IDropTargetVtbl dtvt = { - ISFDropTarget_QueryInterface, - ISFDropTarget_AddRef, - ISFDropTarget_Release, - ISFDropTarget_DragEnter, - ISFDropTarget_DragOver, - ISFDropTarget_DragLeave, - ISFDropTarget_Drop -}; diff --git a/reactos/dll/win32/shell32/shfldr_mycomp.c b/reactos/dll/win32/shell32/shfldr_mycomp.c deleted file mode 100644 index 8a80035db23..00000000000 --- a/reactos/dll/win32/shell32/shfldr_mycomp.c +++ /dev/null @@ -1,1038 +0,0 @@ -/* - * Virtual Workplace 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 - -WINE_DEFAULT_DEBUG_CHANNEL (shell); - -/*********************************************************************** -* IShellFolder implementation -*/ - -typedef struct { - const IShellFolder2Vtbl *lpVtbl; - LONG ref; - const IPersistFolder2Vtbl *lpVtblPersistFolder2; - - /* both paths are parsible from the desktop */ - LPITEMIDLIST pidlRoot; /* absolute pidl */ - LPWSTR sName; -} IGenericSFImpl, *LPIGenericSFImpl; - -static const IShellFolder2Vtbl vt_ShellFolder2; -static const IPersistFolder2Vtbl vt_PersistFolder2; - -static LPIGenericSFImpl __inline impl_from_IPersistFolder2( IPersistFolder2 *iface ) -{ - return (LPIGenericSFImpl)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpVtblPersistFolder2)); -} - - -/* - converts This to an interface pointer -*/ -#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) -#define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl) -#define _IShellFolder2_(This) (IShellFolder2*)&(This->lpVtbl) - -#define _IPersist_(This) (IPersist*)&(This->lpVtblPersistFolder2) -#define _IPersistFolder_(This) (IPersistFolder*)&(This->lpVtblPersistFolder2) -#define _IPersistFolder2_(This) (IPersistFolder2*)&(This->lpVtblPersistFolder2) - -/*********************************************************************** -* 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 - -/************************************************************************** -* ISF_MyComputer_Constructor -*/ -HRESULT WINAPI ISF_MyComputer_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) -{ - IGenericSFImpl *sf; - DWORD dwSize; - WCHAR szName[MAX_PATH]; - TRACE ("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid (riid)); - - if (!ppv) - return E_POINTER; - if (pUnkOuter) - return CLASS_E_NOAGGREGATION; - - sf = LocalAlloc (LMEM_ZEROINIT, sizeof (IGenericSFImpl)); - if (!sf) - return E_OUTOFMEMORY; - - sf->ref = 0; - sf->lpVtbl = &vt_ShellFolder2; - sf->lpVtblPersistFolder2 = &vt_PersistFolder2; - sf->pidlRoot = _ILCreateMyComputer (); /* my qualified pidl */ - - if (FAILED (IUnknown_QueryInterface (_IUnknown_ (sf), riid, ppv))) - { - IUnknown_Release (_IUnknown_ (sf)); - return E_NOINTERFACE; - } - - 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; - sf->sName = SHAlloc((wcslen(szName)+1) * sizeof(WCHAR)); - if (sf->sName) - { - wcscpy( sf->sName, szName ); - } - TRACE("sName %s\n", debugstr_w(sf->sName)); - } - - TRACE ("--(%p)\n", sf); - return S_OK; -} - -/************************************************************************** - * ISF_MyComputer_fnQueryInterface - * - * NOTES supports not IPersist/IPersistFolder - */ -static HRESULT WINAPI ISF_MyComputer_fnQueryInterface (IShellFolder2 *iface, - REFIID riid, LPVOID *ppvObj) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); - - *ppvObj = NULL; - - if (IsEqualIID (riid, &IID_IUnknown) || - IsEqualIID (riid, &IID_IShellFolder) || - IsEqualIID (riid, &IID_IShellFolder2)) - { - *ppvObj = This; - } - else if (IsEqualIID (riid, &IID_IPersist) || - IsEqualIID (riid, &IID_IPersistFolder) || - IsEqualIID (riid, &IID_IPersistFolder2)) - { - *ppvObj = _IPersistFolder2_ (This); - } - - if (*ppvObj) - { - IUnknown_AddRef ((IUnknown *) (*ppvObj)); - TRACE ("-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj); - return S_OK; - } - TRACE ("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI ISF_MyComputer_fnAddRef (IShellFolder2 * iface) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE ("(%p)->(count=%u)\n", This, refCount - 1); - - return refCount; -} - -static ULONG WINAPI ISF_MyComputer_fnRelease (IShellFolder2 * iface) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE ("(%p)->(count=%u)\n", This, refCount + 1); - - if (!refCount) - { - TRACE ("-- destroying IShellFolder(%p)\n", This); - SHFree (This->pidlRoot); - LocalFree (This); - } - return refCount; -} - -/************************************************************************** -* ISF_MyComputer_fnParseDisplayName -*/ -static HRESULT WINAPI ISF_MyComputer_fnParseDisplayName (IShellFolder2 *iface, - HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, - DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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 (iface, hwndOwner, pbc, &pidlTemp, - (LPOLESTR) szNext, pchEaten, pdwAttributes); - } - else - { - if (pdwAttributes && *pdwAttributes) - SHELL32_GetItemAttributes (_IShellFolder_ (This), - pidlTemp, pdwAttributes); - hr = S_OK; - } - - *ppidl = pidlTemp; - - TRACE ("(%p)->(-- ret=0x%08x)\n", This, hr); - - return hr; -} - -/************************************************************************** - * 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' }; - -static BOOL CreateMyCompEnumList(IEnumIDList *list, DWORD dwFlags) -{ - BOOL ret = TRUE; - - TRACE("(%p)->(flags=0x%08x)\n", list, 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(list, _ILCreateDrive(wszDriveName)); - wszDriveName[0]++; - dwDrivemap = dwDrivemap >> 1; - } - - TRACE("-- (%p)-> enumerate (mycomputer shell extensions)\n",list); - 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? */ - ret = AddToEnumList(list, _ILCreateGuidFromStrW(iid)); - i++; - } - else if (ERROR_NO_MORE_ITEMS == r) - break; - else - ret = FALSE; - } - RegCloseKey(hkey); - } - } - } - return ret; -} - -/************************************************************************** -* ISF_MyComputer_fnEnumObjects -*/ -static HRESULT WINAPI ISF_MyComputer_fnEnumObjects (IShellFolder2 *iface, - HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", This, - hwndOwner, dwFlags, ppEnumIDList); - - *ppEnumIDList = IEnumIDList_Constructor(); - if (*ppEnumIDList) - CreateMyCompEnumList(*ppEnumIDList, dwFlags); - - TRACE ("-- (%p)->(new ID List: %p)\n", This, *ppEnumIDList); - - return (*ppEnumIDList) ? S_OK : E_OUTOFMEMORY; -} - -/************************************************************************** -* ISF_MyComputer_fnBindToObject -*/ -static HRESULT WINAPI ISF_MyComputer_fnBindToObject (IShellFolder2 *iface, - LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE("(%p)->(pidl=%p,%p,%s,%p)\n", This, - pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); - - return SHELL32_BindToChild (This->pidlRoot, NULL, pidl, riid, ppvOut); -} - -/************************************************************************** -* ISF_MyComputer_fnBindToStorage -*/ -static HRESULT WINAPI ISF_MyComputer_fnBindToStorage (IShellFolder2 * iface, - LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - FIXME("(%p)->(pidl=%p,%p,%s,%p) stub\n", This, - pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); - - *ppvOut = NULL; - return E_NOTIMPL; -} - -/************************************************************************** -* ISF_MyComputer_fnCompareIDs -*/ - -static HRESULT WINAPI ISF_MyComputer_fnCompareIDs (IShellFolder2 *iface, - LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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_MyComputer_fnCreateViewObject -*/ -static HRESULT WINAPI ISF_MyComputer_fnCreateViewObject (IShellFolder2 *iface, - HWND hwndOwner, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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)) - { - pShellView = IShellView_Constructor ((IShellFolder *) iface); - if (pShellView) - { - hr = IShellView_QueryInterface (pShellView, riid, ppvOut); - IShellView_Release (pShellView); - } - } - TRACE ("-- (%p)->(interface=%p)\n", This, ppvOut); - return hr; -} - -/************************************************************************** -* ISF_MyComputer_fnGetAttributesOf -*/ -static HRESULT WINAPI ISF_MyComputer_fnGetAttributesOf (IShellFolder2 * iface, - UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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 (_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_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 -* -*/ -static HRESULT WINAPI ISF_MyComputer_fnGetUIObjectOf (IShellFolder2 * iface, - HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, - UINT * prgfInOut, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - 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(This->pidlRoot, hwndOwner, cidl, apidl, (IShellFolder*)iface, NULL, 0, NULL, (IContextMenu**)&pObj); - } - else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) - { - pObj = (LPUNKNOWN) IDataObject_Constructor (hwndOwner, - This->pidlRoot, apidl, cidl); - hr = S_OK; - } - else if (IsEqualIID (riid, &IID_IExtractIconA) && (cidl == 1)) - { - pidl = ILCombine (This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl); - SHFree (pidl); - hr = S_OK; - } - else if (IsEqualIID (riid, &IID_IExtractIconW) && (cidl == 1)) - { - pidl = ILCombine (This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl); - SHFree (pidl); - hr = S_OK; - } - else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) - { - hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, - (LPVOID *) &pObj); - } - else if ((IsEqualIID(riid,&IID_IShellLinkW) || - IsEqualIID(riid,&IID_IShellLinkA)) && (cidl == 1)) - { - pidl = ILCombine (This->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 -*/ -static HRESULT WINAPI ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2 *iface, - LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - 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 = 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 (iface, 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) && This->sName) - wcscpy(pszPath, This->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(iface, pidl, dwFlags, pszPath, MAX_PATH); - } - - if (SUCCEEDED (hr)) - { - strRet->uType = STRRET_WSTR; - strRet->u.pOleStr = pszPath; - } - else - CoTaskMemFree(pszPath); - - TRACE ("-- (%p)->(%s)\n", This, strRet->uType == STRRET_CSTR ? strRet->u.cStr : debugstr_w(strRet->u.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 -*/ -static HRESULT WINAPI ISF_MyComputer_fnSetNameOf ( - IShellFolder2 * iface, HWND hwndOwner, LPCITEMIDLIST pidl, - LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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 = 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(This->sName); - This->sName = sName; - TRACE("result %s\n", debugstr_w(This->sName)); - return S_OK; -} - -static HRESULT WINAPI ISF_MyComputer_fnGetDefaultSearchGUID ( - IShellFolder2 * iface, GUID * pguid) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} -static HRESULT WINAPI ISF_MyComputer_fnEnumSearches ( - IShellFolder2 * iface, IEnumExtraSearch ** ppenum) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} -static HRESULT WINAPI ISF_MyComputer_fnGetDefaultColumn ( - IShellFolder2 *iface, DWORD dwRes, ULONG *pSort, ULONG *pDisplay) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)\n", This); - - if (pSort) - *pSort = 0; - if (pDisplay) - *pDisplay = 0; - return S_OK; -} -static HRESULT WINAPI ISF_MyComputer_fnGetDefaultColumnState ( - IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)\n", This); - - if (!pcsFlags || iColumn >= MYCOMPUTERSHELLVIEWCOLUMNS) - return E_INVALIDARG; - *pcsFlags = MyComputerSFHeader[iColumn].pcsFlags; - return S_OK; -} - -static HRESULT WINAPI ISF_MyComputer_fnGetDetailsEx (IShellFolder2 * iface, - LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -/* FIXME: drive size >4GB is rolling over */ -static HRESULT WINAPI ISF_MyComputer_fnGetDetailsOf (IShellFolder2 * iface, - LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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.u.cStr, MAX_PATH); - return S_OK; - } - else - { - char szPath[MAX_PATH]; - ULARGE_INTEGER ulBytes; - - psd->str.u.cStr[0] = 0x00; - psd->str.uType = STRRET_CSTR; - switch (iColumn) - { - case 0: /* name */ - hr = IShellFolder_GetDisplayNameOf (iface, pidl, - SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str); - break; - case 1: /* type */ - _ILGetFileType (pidl, psd->str.u.cStr, MAX_PATH); - break; - case 2: /* total size */ - if (_ILIsDrive (pidl)) - { - _ILSimpleGetText (pidl, szPath, MAX_PATH); - GetDiskFreeSpaceExA (szPath, NULL, &ulBytes, NULL); - StrFormatByteSizeA (ulBytes.u.LowPart, psd->str.u.cStr, MAX_PATH); - } - break; - case 3: /* free size */ - if (_ILIsDrive (pidl)) - { - _ILSimpleGetText (pidl, szPath, MAX_PATH); - GetDiskFreeSpaceExA (szPath, &ulBytes, NULL, NULL); - StrFormatByteSizeA (ulBytes.u.LowPart, psd->str.u.cStr, MAX_PATH); - } - break; - } - hr = S_OK; - } - - return hr; -} - -static HRESULT WINAPI ISF_MyComputer_fnMapColumnToSCID ( - IShellFolder2 * iface, UINT column, SHCOLUMNID * pscid) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -static const IShellFolder2Vtbl vt_ShellFolder2 = -{ - ISF_MyComputer_fnQueryInterface, - ISF_MyComputer_fnAddRef, - ISF_MyComputer_fnRelease, - ISF_MyComputer_fnParseDisplayName, - ISF_MyComputer_fnEnumObjects, - ISF_MyComputer_fnBindToObject, - ISF_MyComputer_fnBindToStorage, - ISF_MyComputer_fnCompareIDs, - ISF_MyComputer_fnCreateViewObject, - ISF_MyComputer_fnGetAttributesOf, - ISF_MyComputer_fnGetUIObjectOf, - ISF_MyComputer_fnGetDisplayNameOf, - ISF_MyComputer_fnSetNameOf, - /* ShellFolder2 */ - ISF_MyComputer_fnGetDefaultSearchGUID, - ISF_MyComputer_fnEnumSearches, - ISF_MyComputer_fnGetDefaultColumn, - ISF_MyComputer_fnGetDefaultColumnState, - ISF_MyComputer_fnGetDetailsEx, - ISF_MyComputer_fnGetDetailsOf, - ISF_MyComputer_fnMapColumnToSCID -}; - -/************************************************************************ - * IMCFldr_PersistFolder2_QueryInterface - */ -static HRESULT WINAPI IMCFldr_PersistFolder2_QueryInterface ( - IPersistFolder2 * iface, REFIID iid, LPVOID * ppvObj) -{ - IGenericSFImpl *This = impl_from_IPersistFolder2(iface); - - TRACE ("(%p)\n", This); - - return IUnknown_QueryInterface (_IUnknown_ (This), iid, ppvObj); -} - -/************************************************************************ - * IMCFldr_PersistFolder2_AddRef - */ -static ULONG WINAPI IMCFldr_PersistFolder2_AddRef (IPersistFolder2 * iface) -{ - IGenericSFImpl *This = impl_from_IPersistFolder2(iface); - - TRACE ("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_AddRef (_IUnknown_ (This)); -} - -/************************************************************************ - * ISFPersistFolder_Release - */ -static ULONG WINAPI IMCFldr_PersistFolder2_Release (IPersistFolder2 * iface) -{ - IGenericSFImpl *This = impl_from_IPersistFolder2(iface); - - TRACE ("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_Release (_IUnknown_ (This)); -} - -/************************************************************************ - * IMCFldr_PersistFolder2_GetClassID - */ -static HRESULT WINAPI IMCFldr_PersistFolder2_GetClassID ( - IPersistFolder2 * iface, CLSID * lpClassId) -{ - IGenericSFImpl *This = impl_from_IPersistFolder2(iface); - - 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 - */ -static HRESULT WINAPI IMCFldr_PersistFolder2_Initialize ( - IPersistFolder2 * iface, LPCITEMIDLIST pidl) -{ - IGenericSFImpl *This = impl_from_IPersistFolder2(iface); - TRACE ("(%p)->(%p)\n", This, pidl); - - if (This->pidlRoot) - SHFree((LPVOID)This->pidlRoot); - - This->pidlRoot = ILClone(pidl); - return S_OK; -} - -/************************************************************************** - * IPersistFolder2_fnGetCurFolder - */ -static HRESULT WINAPI IMCFldr_PersistFolder2_GetCurFolder ( - IPersistFolder2 * iface, LPITEMIDLIST * pidl) -{ - IGenericSFImpl *This = impl_from_IPersistFolder2(iface); - - TRACE ("(%p)->(%p)\n", This, pidl); - - if (!pidl) - return E_POINTER; - *pidl = ILClone (This->pidlRoot); - return S_OK; -} - -static const IPersistFolder2Vtbl vt_PersistFolder2 = -{ - IMCFldr_PersistFolder2_QueryInterface, - IMCFldr_PersistFolder2_AddRef, - IMCFldr_PersistFolder2_Release, - IMCFldr_PersistFolder2_GetClassID, - IMCFldr_PersistFolder2_Initialize, - IMCFldr_PersistFolder2_GetCurFolder -}; diff --git a/reactos/dll/win32/shell32/shfldr_mydocuments.c b/reactos/dll/win32/shell32/shfldr_mydocuments.c deleted file mode 100644 index 8290a411e02..00000000000 --- a/reactos/dll/win32/shell32/shfldr_mydocuments.c +++ /dev/null @@ -1,889 +0,0 @@ - -/* - * Virtual MyDocuments Folder - * - * 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 (mydocs); - -/*********************************************************************** -* MyDocumentsfolder implementation -*/ - -typedef struct { - const IShellFolder2Vtbl *lpVtbl; - const IPersistFolder2Vtbl *lpPF2; - LONG ref; - - /* both paths are parsible from the MyDocuments */ - 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 */ -} IGenericSFImpl, *LPIGenericSFImpl; - -#define _IUnknown_(This) (IShellFolder*)&(This->lpVtbl) -#define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl) - -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 - -/************************************************************************** - * ISF_MyDocuments_fnQueryInterface - * - * NOTES supports not IPersist/IPersistFolder - */ -static HRESULT WINAPI ISF_MyDocuments_fnQueryInterface( - IShellFolder2 * iface, REFIID riid, LPVOID * ppvObj) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); - - *ppvObj = NULL; - - if (IsEqualIID (riid, &IID_IUnknown) || - IsEqualIID (riid, &IID_IShellFolder) || - IsEqualIID (riid, &IID_IShellFolder2)) - { - *ppvObj = This; - } - else if (IsEqualIID (riid, &IID_IPersistFolder) || - IsEqualIID (riid, &IID_IPersistFolder2)) - { - *ppvObj = (void *)&This->lpPF2; - } - if (*ppvObj) - { - IUnknown_AddRef ((IUnknown *) (*ppvObj)); - TRACE ("-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj); - return S_OK; - } - TRACE ("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI ISF_MyDocuments_fnAddRef (IShellFolder2 * iface) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE ("(%p)->(count=%u)\n", This, refCount - 1); - - return refCount; -} - -static ULONG WINAPI ISF_MyDocuments_fnRelease (IShellFolder2 * iface) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE ("(%p)->(count=%u)\n", This, refCount + 1); - - if (!refCount) - { - TRACE ("-- destroying IShellFolder(%p)\n", This); - SHFree (This->pidlRoot); - HeapFree(GetProcessHeap(), 0, This->sPathTarget); - HeapFree(GetProcessHeap(), 0, This); - } - return refCount; -} - -static -HRESULT -WINAPI ISF_MyDocuments_fnParseDisplayName (IShellFolder2 * iface, - HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, - DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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, This->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(iface, 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; -} - -/************************************************************************** - * CreateMyDocumentsEnumList() - */ -static BOOL CreateMyDocumentsEnumList(IEnumIDList *list, DWORD dwFlags) -{ - BOOL ret = TRUE; - WCHAR szPath[MAX_PATH] = {0}; - - TRACE("(%p)->(flags=0x%08x)\n", list, dwFlags); - - /* enumerate the elements in %windir%\desktop */ - ret = SHGetSpecialFolderPathW(0, szPath, CSIDL_PERSONAL, FALSE); - ret = ret && CreateFolderEnumList(list, szPath, dwFlags); - - return ret; -} - -/************************************************************************** - * ISF_MyDocuments_fnEnumObjects - */ -static HRESULT WINAPI ISF_MyDocuments_fnEnumObjects (IShellFolder2 * iface, - HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", - This, hwndOwner, dwFlags, ppEnumIDList); - - *ppEnumIDList = IEnumIDList_Constructor(); - if (*ppEnumIDList) - CreateMyDocumentsEnumList(*ppEnumIDList, dwFlags); - - TRACE ("-- (%p)->(new ID List: %p)\n", This, *ppEnumIDList); - - return *ppEnumIDList ? S_OK : E_OUTOFMEMORY; -} - -/************************************************************************** - * ISF_MyDocuments_fnBindToObject - */ -static HRESULT WINAPI ISF_MyDocuments_fnBindToObject (IShellFolder2 * iface, - LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", - This, pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); - - return SHELL32_BindToChild( This->pidlRoot, This->sPathTarget, pidl, riid, ppvOut ); -} - -/************************************************************************** - * ISF_MyDocuments_fnBindToStorage - */ -static -HRESULT -WINAPI -ISF_MyDocuments_fnBindToStorage (IShellFolder2 * iface, - LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", - This, pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); - - *ppvOut = NULL; - return E_NOTIMPL; -} - -/************************************************************************** - * ISF_MyDocuments_fnCompareIDs - */ -static HRESULT WINAPI ISF_MyDocuments_fnCompareIDs (IShellFolder2 * iface, - LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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_MyDocuments_fnCreateViewObject - */ -static HRESULT WINAPI ISF_MyDocuments_fnCreateViewObject (IShellFolder2 * iface, - HWND hwndOwner, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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)) - { - pShellView = IShellView_Constructor ((IShellFolder *) iface); - if (pShellView) - { - hr = IShellView_QueryInterface (pShellView, riid, ppvOut); - IShellView_Release (pShellView); - } - } - TRACE ("-- (%p)->(interface=%p)\n", This, ppvOut); - return hr; -} - -/************************************************************************** - * ISF_MyDocuments_fnGetAttributesOf - */ -static HRESULT WINAPI ISF_MyDocuments_fnGetAttributesOf (IShellFolder2 * iface, - UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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 (_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_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 - * - */ -static HRESULT WINAPI ISF_MyDocuments_fnGetUIObjectOf (IShellFolder2 * iface, - HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl, - REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - 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(This->pidlRoot, hwndOwner, cidl, apidl, (IShellFolder*)iface, NULL, 0, NULL, (IContextMenu**)&pObj); - } - else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) - { - pObj = (LPUNKNOWN) IDataObject_Constructor( hwndOwner, - This->pidlRoot, apidl, cidl); - hr = S_OK; - } - else if (IsEqualIID (riid, &IID_IExtractIconA) && (cidl == 1)) - { - pidl = ILCombine (This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl); - SHFree (pidl); - hr = S_OK; - } - else if (IsEqualIID (riid, &IID_IExtractIconW) && (cidl == 1)) - { - pidl = ILCombine (This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl); - SHFree (pidl); - hr = S_OK; - } - else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) - { - hr = IShellFolder_QueryInterface (iface, - &IID_IDropTarget, (LPVOID *) & pObj); - } - else if ((IsEqualIID(riid,&IID_IShellLinkW) || - IsEqualIID(riid,&IID_IShellLinkA)) && (cidl == 1)) - { - pidl = ILCombine (This->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 -HRESULT -WINAPI ISF_MyDocuments_fnGetDisplayNameOf (IShellFolder2 * iface, - LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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 = 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, This->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 (iface, 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, This->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 (iface, pidl, dwFlags, - pszPath, MAX_PATH); - TRACE("CP\n"); - } - - if (SUCCEEDED(hr)) - { - strRet->uType = STRRET_WSTR; - strRet->u.pOleStr = pszPath; - } - else - CoTaskMemFree(pszPath); - - TRACE ("-- (%p)->(%s,0x%08x)\n", This, debugstr_w(strRet->u.pOleStr), hr); - return hr; -} - -static HRESULT WINAPI ISF_MyDocuments_fnSetNameOf (IShellFolder2 * iface, - HWND hwndOwner, LPCITEMIDLIST pidl, /* simple pidl */ - LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - FIXME ("(%p)->(%p,pidl=%p,%s,%u,%p)\n", This, hwndOwner, pidl, - debugstr_w (lpName), dwFlags, pPidlOut); - - return E_FAIL; -} - -static HRESULT WINAPI ISF_MyDocuments_fnGetDefaultSearchGUID(IShellFolder2 *iface, - GUID * pguid) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_MyDocuments_fnEnumSearches (IShellFolder2 *iface, - IEnumExtraSearch ** ppenum) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -static -HRESULT -WINAPI -ISF_MyDocuments_fnGetDefaultColumn (IShellFolder2 * iface, - DWORD dwRes, ULONG * pSort, ULONG * pDisplay) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)\n", This); - - if (pSort) - *pSort = 0; - if (pDisplay) - *pDisplay = 0; - - return S_OK; -} -static -HRESULT -WINAPI -ISF_MyDocuments_fnGetDefaultColumnState (IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)\n", This); - - if (!pcsFlags || iColumn >= MYDOCUMENTSSHELLVIEWCOLUMNS) - return E_INVALIDARG; - - *pcsFlags = MyDocumentsSFHeader[iColumn].pcsFlags; - - return S_OK; -} - -static -HRESULT -WINAPI -ISF_MyDocuments_fnGetDetailsEx (IShellFolder2 * iface, LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - - return E_NOTIMPL; -} - -static -HRESULT -WINAPI -ISF_MyDocuments_fnGetDetailsOf (IShellFolder2 * iface, LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - 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.u.cStr, MAX_PATH); - return S_OK; - } - - /* the data from the pidl */ - psd->str.uType = STRRET_CSTR; - switch (iColumn) - { - case 0: /* name */ - hr = IShellFolder_GetDisplayNameOf(iface, pidl, - SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str); - break; - case 1: /* size */ - _ILGetFileSize (pidl, psd->str.u.cStr, MAX_PATH); - break; - case 2: /* type */ - _ILGetFileType (pidl, psd->str.u.cStr, MAX_PATH); - break; - case 3: /* date */ - _ILGetFileDate (pidl, psd->str.u.cStr, MAX_PATH); - break; - case 4: /* attributes */ - _ILGetFileAttributes (pidl, psd->str.u.cStr, MAX_PATH); - break; - } - - return hr; -} - -static -HRESULT -WINAPI -ISF_MyDocuments_fnMapColumnToSCID (IShellFolder2 * iface, UINT column, SHCOLUMNID * pscid) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -static const IShellFolder2Vtbl vt_MCFldr_ShellFolder2 = -{ - ISF_MyDocuments_fnQueryInterface, - ISF_MyDocuments_fnAddRef, - ISF_MyDocuments_fnRelease, - ISF_MyDocuments_fnParseDisplayName, - ISF_MyDocuments_fnEnumObjects, - ISF_MyDocuments_fnBindToObject, - ISF_MyDocuments_fnBindToStorage, - ISF_MyDocuments_fnCompareIDs, - ISF_MyDocuments_fnCreateViewObject, - ISF_MyDocuments_fnGetAttributesOf, - ISF_MyDocuments_fnGetUIObjectOf, - ISF_MyDocuments_fnGetDisplayNameOf, - ISF_MyDocuments_fnSetNameOf, - /* ShellFolder2 */ - ISF_MyDocuments_fnGetDefaultSearchGUID, - ISF_MyDocuments_fnEnumSearches, - ISF_MyDocuments_fnGetDefaultColumn, - ISF_MyDocuments_fnGetDefaultColumnState, - ISF_MyDocuments_fnGetDetailsEx, - ISF_MyDocuments_fnGetDetailsOf, - ISF_MyDocuments_fnMapColumnToSCID -}; - -static LPIGenericSFImpl __inline impl_from_IPersistFolder2( IPersistFolder2 *iface ) -{ - return (LPIGenericSFImpl)((char*)iface - FIELD_OFFSET(IGenericSFImpl, lpPF2)); -} - -static HRESULT WINAPI -ISF_MyDocuments_PersistFolder2_fnQueryInterface (IPersistFolder2 * iface, REFIID iid, LPVOID * ppvObj) -{ - IGenericSFImpl *This = impl_from_IPersistFolder2(iface); - - TRACE ("(%p)\n", This); - - return ISF_MyDocuments_fnQueryInterface ((IShellFolder2*)This, iid, ppvObj); -} - -static ULONG WINAPI -ISF_MyDocuments_PersistFolder2_fnAddRef (IPersistFolder2 * iface) -{ - IGenericSFImpl *This = impl_from_IPersistFolder2(iface); - - TRACE ("(%p)->(count=%u)\n", This, This->ref); - - return ISF_MyDocuments_fnAddRef((IShellFolder2*)This); -} - -static ULONG WINAPI -ISF_MyDocuments_PersistFolder2_fnRelease (IPersistFolder2 * iface) -{ - IGenericSFImpl *This = impl_from_IPersistFolder2(iface); - - TRACE ("(%p)->(count=%u)\n", This, This->ref); - - return ISF_MyDocuments_fnRelease ((IShellFolder2*)This); -} - -static HRESULT WINAPI -ISF_MyDocuments_PersistFolder2_fnGetClassID (IPersistFolder2 * iface, CLSID * lpClassId) -{ - IGenericSFImpl *This = impl_from_IPersistFolder2(iface); - - 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; -} -static HRESULT WINAPI -ISF_MyDocuments_PersistFolder2_fnInitialize (IPersistFolder2 * iface, LPCITEMIDLIST pidl) -{ - IGenericSFImpl *This = impl_from_IPersistFolder2(iface); - - TRACE ("(%p)->(%p)\n", This, pidl); - - return E_NOTIMPL; -} - -static HRESULT WINAPI -ISF_MyDocuments_PersistFolder2_fnGetCurFolder (IPersistFolder2 * iface, - LPITEMIDLIST * pidl) -{ - IGenericSFImpl *This = impl_from_IPersistFolder2(iface); - - TRACE ("(%p)->(%p)\n", This, pidl); - - if (!pidl) return E_POINTER; - *pidl = ILClone (This->pidlRoot); - return S_OK; -} - -static const IPersistFolder2Vtbl vt_FSFldr_PersistFolder2 = -{ - ISF_MyDocuments_PersistFolder2_fnQueryInterface, - ISF_MyDocuments_PersistFolder2_fnAddRef, - ISF_MyDocuments_PersistFolder2_fnRelease, - ISF_MyDocuments_PersistFolder2_fnGetClassID, - ISF_MyDocuments_PersistFolder2_fnInitialize, - ISF_MyDocuments_PersistFolder2_fnGetCurFolder, -}; - - -/************************************************************************** - * ISF_MyDocuments_Constructor - */ -HRESULT WINAPI ISF_MyDocuments_Constructor ( - IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) -{ - static IGenericSFImpl *cached_sf; - WCHAR szMyPath[MAX_PATH]; - - TRACE ("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid (riid)); - - if (!ppv) - return E_POINTER; - if (pUnkOuter) - return CLASS_E_NOAGGREGATION; - - if (!cached_sf) - { - IGenericSFImpl *sf; - - if (!SHGetSpecialFolderPathW( 0, szMyPath, CSIDL_PERSONAL, TRUE )) - return E_UNEXPECTED; - - sf = LocalAlloc( LMEM_ZEROINIT, sizeof (IGenericSFImpl) ); - if (!sf) - return E_OUTOFMEMORY; - - sf->ref = 1; - sf->lpVtbl = &vt_MCFldr_ShellFolder2; - sf->lpPF2 = &vt_FSFldr_PersistFolder2; - sf->pidlRoot = _ILCreateMyDocuments(); /* my qualified pidl */ - sf->sPathTarget = SHAlloc( (wcslen(szMyPath) + 1)*sizeof(WCHAR) ); - wcscpy( sf->sPathTarget, szMyPath ); - - if (InterlockedCompareExchangePointer((void *)&cached_sf, sf, NULL) != NULL) - { - /* some other thread already been here */ - SHFree( sf->pidlRoot ); - SHFree( sf->sPathTarget ); - LocalFree( sf ); - } - } - - return IUnknown_QueryInterface( _IUnknown_(cached_sf), riid, ppv ); -} diff --git a/reactos/dll/win32/shell32/shfldr_netplaces.c b/reactos/dll/win32/shell32/shfldr_netplaces.c deleted file mode 100644 index 07811d0f0d0..00000000000 --- a/reactos/dll/win32/shell32/shfldr_netplaces.c +++ /dev/null @@ -1,651 +0,0 @@ -/* - * Network Places (Neighbourhood) folder - * - * Copyright 1997 Marcus Meissner - * Copyright 1998, 1999, 2002 Juergen Schmied - * Copyright 2003 Mike McCormack 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 - -WINE_DEFAULT_DEBUG_CHANNEL (shell); - -/*********************************************************************** -* IShellFolder implementation -*/ - -typedef struct { - const IShellFolder2Vtbl *lpVtbl; - LONG ref; - const IPersistFolder2Vtbl *lpVtblPersistFolder2; - - /* both paths are parsible from the desktop */ - LPITEMIDLIST pidlRoot; /* absolute pidl */ -} IGenericSFImpl; - -static const IShellFolder2Vtbl vt_ShellFolder2; -static const IPersistFolder2Vtbl vt_NP_PersistFolder2; - - -#define _IPersistFolder2_Offset ((INT_PTR)(&(((IGenericSFImpl*)0)->lpVtblPersistFolder2))) -#define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder2_Offset); - -#define _IUnknown_(This) ((IUnknown*)&(This)->lpVtbl) -#define _IShellFolder_(This) ((IShellFolder*)&(This)->lpVtbl) -#define _IPersistFolder2_(This) (&(This)->lpVtblPersistFolder2) - -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 - -/************************************************************************** -* ISF_NetworkPlaces_Constructor -*/ -HRESULT WINAPI ISF_NetworkPlaces_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) -{ - IGenericSFImpl *sf; - - TRACE ("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid (riid)); - - if (!ppv) - return E_POINTER; - if (pUnkOuter) - return CLASS_E_NOAGGREGATION; - - sf = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof (IGenericSFImpl)); - if (!sf) - return E_OUTOFMEMORY; - - sf->ref = 0; - sf->lpVtbl = &vt_ShellFolder2; - sf->lpVtblPersistFolder2 = &vt_NP_PersistFolder2; - sf->pidlRoot = _ILCreateNetHood(); /* my qualified pidl */ - - if (FAILED (IUnknown_QueryInterface (_IUnknown_ (sf), riid, ppv))) - { - IUnknown_Release (_IUnknown_ (sf)); - return E_NOINTERFACE; - } - - TRACE ("--(%p)\n", sf); - return S_OK; -} - -/************************************************************************** - * ISF_NetworkPlaces_fnQueryInterface - * - * NOTE - * supports not IPersist/IPersistFolder - */ -static HRESULT WINAPI ISF_NetworkPlaces_fnQueryInterface (IShellFolder2 *iface, REFIID riid, LPVOID *ppvObj) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); - - *ppvObj = NULL; - - if (IsEqualIID (riid, &IID_IUnknown) || - IsEqualIID (riid, &IID_IShellFolder) || - IsEqualIID (riid, &IID_IShellFolder2)) - { - *ppvObj = This; - } - else if (IsEqualIID (riid, &IID_IPersist) || - IsEqualIID (riid, &IID_IPersistFolder) || - IsEqualIID (riid, &IID_IPersistFolder2)) - { - *ppvObj = (void *)_IPersistFolder2_ (This); - } - - if (*ppvObj) - { - IUnknown_AddRef ((IUnknown *) (*ppvObj)); - TRACE ("-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj); - return S_OK; - } - TRACE ("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI ISF_NetworkPlaces_fnAddRef (IShellFolder2 * iface) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE ("(%p)->(count=%u)\n", This, refCount - 1); - - return refCount; -} - -static ULONG WINAPI ISF_NetworkPlaces_fnRelease (IShellFolder2 * iface) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE ("(%p)->(count=%u)\n", This, refCount + 1); - - if (!refCount) { - TRACE ("-- destroying IShellFolder(%p)\n", This); - SHFree (This->pidlRoot); - HeapFree (GetProcessHeap(), 0, This); - } - return refCount; -} - -/************************************************************************** -* ISF_NetworkPlaces_fnParseDisplayName -*/ -static HRESULT WINAPI ISF_NetworkPlaces_fnParseDisplayName (IShellFolder2 * iface, - HWND hwndOwner, LPBC pbcReserved, LPOLESTR lpszDisplayName, - DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - 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 -*/ -static HRESULT WINAPI ISF_NetworkPlaces_fnEnumObjects (IShellFolder2 * iface, - HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - 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 -*/ -static HRESULT WINAPI ISF_NetworkPlaces_fnBindToObject (IShellFolder2 * iface, - LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", This, - pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); - - return SHELL32_BindToChild (This->pidlRoot, NULL, pidl, riid, ppvOut); -} - -/************************************************************************** -* ISF_NetworkPlaces_fnBindToStorage -*/ -static HRESULT WINAPI ISF_NetworkPlaces_fnBindToStorage (IShellFolder2 * iface, - LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", This, - pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); - - *ppvOut = NULL; - return E_NOTIMPL; -} - -/************************************************************************** -* ISF_NetworkPlaces_fnCompareIDs -*/ - -static HRESULT WINAPI ISF_NetworkPlaces_fnCompareIDs (IShellFolder2 * iface, - LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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_NetworkPlaces_fnCreateViewObject -*/ -static HRESULT WINAPI ISF_NetworkPlaces_fnCreateViewObject (IShellFolder2 * iface, - HWND hwndOwner, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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)) - { - pShellView = IShellView_Constructor ((IShellFolder *) iface); - if (pShellView) - { - hr = IShellView_QueryInterface (pShellView, riid, ppvOut); - IShellView_Release (pShellView); - } - } - TRACE ("-- (%p)->(interface=%p)\n", This, ppvOut); - return hr; -} - -/************************************************************************** -* ISF_NetworkPlaces_fnGetAttributesOf -*/ -static HRESULT WINAPI ISF_NetworkPlaces_fnGetAttributesOf (IShellFolder2 * iface, - UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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 (_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_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 -* -*/ -static HRESULT WINAPI ISF_NetworkPlaces_fnGetUIObjectOf (IShellFolder2 * iface, - HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, - UINT * prgfInOut, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - 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(This->pidlRoot, hwndOwner, cidl, apidl, (IShellFolder*)iface, NULL, 0, NULL, (IContextMenu**)&pObj); - } - else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) - { - pObj = (LPUNKNOWN) IDataObject_Constructor (hwndOwner, This->pidlRoot, apidl, cidl); - hr = S_OK; - } - else if (IsEqualIID (riid, &IID_IExtractIconA) && (cidl == 1)) - { - pidl = ILCombine (This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl); - SHFree (pidl); - hr = S_OK; - } - else if (IsEqualIID (riid, &IID_IExtractIconW) && (cidl == 1)) - { - pidl = ILCombine (This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl); - SHFree (pidl); - hr = S_OK; - } - else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) - { - hr = IShellFolder_QueryInterface (iface, &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 -* -*/ -static HRESULT WINAPI ISF_NetworkPlaces_fnGetDisplayNameOf (IShellFolder2 * iface, - LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - 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 -*/ -static HRESULT WINAPI ISF_NetworkPlaces_fnSetNameOf (IShellFolder2 * iface, - HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */ - LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)->(%p,pidl=%p,%s,%u,%p)\n", This, - hwndOwner, pidl, debugstr_w (lpName), dwFlags, pPidlOut); - return E_FAIL; -} - -static HRESULT WINAPI ISF_NetworkPlaces_fnGetDefaultSearchGUID ( - IShellFolder2 * iface, GUID * pguid) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_NetworkPlaces_fnEnumSearches (IShellFolder2 * iface, - IEnumExtraSearch ** ppenum) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_NetworkPlaces_fnGetDefaultColumn (IShellFolder2 * iface, - DWORD dwRes, ULONG * pSort, ULONG * pDisplay) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)\n", This); - - if (pSort) - *pSort = 0; - if (pDisplay) - *pDisplay = 0; - - return S_OK; -} - -static HRESULT WINAPI ISF_NetworkPlaces_fnGetDefaultColumnState ( - IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)\n", This); - - if (!pcsFlags || iColumn >= NETWORKPLACESSHELLVIEWCOLUMNS) - return E_INVALIDARG; - *pcsFlags = NetworkPlacesSFHeader[iColumn].pcsFlags; - return S_OK; -} - -static HRESULT WINAPI ISF_NetworkPlaces_fnGetDetailsEx (IShellFolder2 * iface, - LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_NetworkPlaces_fnGetDetailsOf (IShellFolder2 * iface, - LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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.u.pOleStr); - - return hr; - } - - if (iColumn == COLUMN_NAME) - return IShellFolder2_GetDisplayNameOf(iface, pidl, SHGDN_NORMAL, &psd->str); - - FIXME ("(%p)->(%p %i %p)\n", This, pidl, iColumn, psd); - - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_NetworkPlaces_fnMapColumnToSCID (IShellFolder2 * iface, - UINT column, SHCOLUMNID * pscid) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - FIXME ("(%p)\n", This); - - return E_NOTIMPL; -} - -static const IShellFolder2Vtbl vt_ShellFolder2 = { - ISF_NetworkPlaces_fnQueryInterface, - ISF_NetworkPlaces_fnAddRef, - ISF_NetworkPlaces_fnRelease, - ISF_NetworkPlaces_fnParseDisplayName, - ISF_NetworkPlaces_fnEnumObjects, - ISF_NetworkPlaces_fnBindToObject, - ISF_NetworkPlaces_fnBindToStorage, - ISF_NetworkPlaces_fnCompareIDs, - ISF_NetworkPlaces_fnCreateViewObject, - ISF_NetworkPlaces_fnGetAttributesOf, - ISF_NetworkPlaces_fnGetUIObjectOf, - ISF_NetworkPlaces_fnGetDisplayNameOf, - ISF_NetworkPlaces_fnSetNameOf, - /* ShellFolder2 */ - ISF_NetworkPlaces_fnGetDefaultSearchGUID, - ISF_NetworkPlaces_fnEnumSearches, - ISF_NetworkPlaces_fnGetDefaultColumn, - ISF_NetworkPlaces_fnGetDefaultColumnState, - ISF_NetworkPlaces_fnGetDetailsEx, - ISF_NetworkPlaces_fnGetDetailsOf, - ISF_NetworkPlaces_fnMapColumnToSCID -}; - -/************************************************************************ - * INPFldr_PersistFolder2_QueryInterface - */ -static HRESULT WINAPI INPFldr_PersistFolder2_QueryInterface (IPersistFolder2 * iface, - REFIID iid, LPVOID * ppvObj) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - TRACE ("(%p)\n", This); - - return IUnknown_QueryInterface (_IUnknown_ (This), iid, ppvObj); -} - -/************************************************************************ - * INPFldr_PersistFolder2_AddRef - */ -static ULONG WINAPI INPFldr_PersistFolder2_AddRef (IPersistFolder2 * iface) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - TRACE ("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_AddRef (_IUnknown_ (This)); -} - -/************************************************************************ - * ISFPersistFolder_Release - */ -static ULONG WINAPI INPFldr_PersistFolder2_Release (IPersistFolder2 * iface) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - TRACE ("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_Release (_IUnknown_ (This)); -} - -/************************************************************************ - * INPFldr_PersistFolder2_GetClassID - */ -static HRESULT WINAPI INPFldr_PersistFolder2_GetClassID ( - IPersistFolder2 * iface, CLSID * lpClassId) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - 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 - */ -static HRESULT WINAPI INPFldr_PersistFolder2_Initialize ( - IPersistFolder2 * iface, LPCITEMIDLIST pidl) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - TRACE ("(%p)->(%p)\n", This, pidl); - - return E_NOTIMPL; -} - -/************************************************************************** - * IPersistFolder2_fnGetCurFolder - */ -static HRESULT WINAPI INPFldr_PersistFolder2_GetCurFolder ( - IPersistFolder2 * iface, LPITEMIDLIST * pidl) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - TRACE ("(%p)->(%p)\n", This, pidl); - - if (!pidl) - return E_POINTER; - - *pidl = ILClone (This->pidlRoot); - - return S_OK; -} - -static const IPersistFolder2Vtbl vt_NP_PersistFolder2 = -{ - INPFldr_PersistFolder2_QueryInterface, - INPFldr_PersistFolder2_AddRef, - INPFldr_PersistFolder2_Release, - INPFldr_PersistFolder2_GetClassID, - INPFldr_PersistFolder2_Initialize, - INPFldr_PersistFolder2_GetCurFolder -}; diff --git a/reactos/dll/win32/shell32/shfldr_printers.c b/reactos/dll/win32/shell32/shfldr_printers.c deleted file mode 100644 index c7ffbfbc071..00000000000 --- a/reactos/dll/win32/shell32/shfldr_printers.c +++ /dev/null @@ -1,984 +0,0 @@ -/* - * Virtual Printers Folder - * - * Copyright 1997 Marcus Meissner - * Copyright 1998, 1999, 2002 Juergen Schmied - * Copyright 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 Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include - -WINE_DEFAULT_DEBUG_CHANNEL (shell); - -/*********************************************************************** - * Printers_IExtractIconW implementation - */ -typedef struct -{ - IExtractIconWVtbl *lpVtbl; - IExtractIconAVtbl *lpvtblExtractIconA; - volatile LONG ref; - LPITEMIDLIST pidl; -} IExtractIconWImpl; - -#define _IExtractIconA_Offset ((INT_PTR)(&(((IExtractIconWImpl*)0)->lpvtblExtractIconA))) -#define _ICOM_THIS_From_IExtractIconA(class, name) class* This = (class*)(((char*)name)-_IExtractIconA_Offset); - -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) - - -/************************************************************************** - * IExtractIconW_QueryInterface - */ -static HRESULT WINAPI IEI_Printers_fnQueryInterface(IExtractIconW *iface, REFIID riid, LPVOID *ppvObj) -{ - IExtractIconWImpl *This = (IExtractIconWImpl *)iface; - - TRACE("(%p)->(\n\tIID:\t%s,%p)\n", This, debugstr_guid(riid), ppvObj); - - *ppvObj = NULL; - - if (IsEqualIID(riid, &IID_IUnknown)) - { - *ppvObj = This; - } - else if (IsEqualIID(riid, &IID_IExtractIconW)) - { - *ppvObj = (IExtractIconW*)This; - } - else if (IsEqualIID(riid, &IID_IExtractIconA)) - { - *ppvObj = (IExtractIconA*)&(This->lpvtblExtractIconA); - } - - if(*ppvObj) - { - ((IExtractIconW*)*ppvObj)->lpVtbl->AddRef(*ppvObj); - TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); - return S_OK; - } - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -/************************************************************************** - * IExtractIconW_AddRef - */ -static ULONG WINAPI IEI_Printers_fnAddRef(IExtractIconW * iface) -{ - IExtractIconWImpl *This = (IExtractIconWImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE("(%p)->(count=%lu)\n", This, refCount - 1); - - return refCount; -} - -/************************************************************************** - * IExtractIconW_Release - */ -static ULONG WINAPI IEI_Printers_fnRelease(IExtractIconW * iface) -{ - IExtractIconWImpl *This = (IExtractIconWImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE("(%p)->(count=%lu)\n", This, refCount + 1); - - if (!refCount) - { - TRACE(" destroying IExtractIcon(%p)\n",This); - SHFree(This->pidl); - HeapFree(GetProcessHeap(),0,This); - return 0; - } - return refCount; -} - -/************************************************************************** - * IExtractIconW_GetIconLocation - * - * mapping filetype to icon - */ -static HRESULT WINAPI IEI_Printers_fnGetIconLocation( - IExtractIconW * iface, - UINT uFlags, /* GIL_ flags */ - LPWSTR szIconFile, - UINT cchMax, - int *piIndex, - UINT *pwFlags) /* returned GIL_ flags */ -{ - IExtractIconWImpl *This = (IExtractIconWImpl *)iface; - - 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 - */ -static HRESULT WINAPI IEI_Printers_fnExtract(IExtractIconW *iface, LPCWSTR pszFile, - UINT nIconIndex, HICON *phiconLarge, - HICON *phiconSmall, UINT nIconSize) -{ - IExtractIconWImpl *This = (IExtractIconWImpl *)iface; - 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; -} - -static struct IExtractIconWVtbl eivt = -{ - IEI_Printers_fnQueryInterface, - IEI_Printers_fnAddRef, - IEI_Printers_fnRelease, - IEI_Printers_fnGetIconLocation, - IEI_Printers_fnExtract -}; - -/************************************************************************** - * IExtractIconA_QueryInterface - */ -static HRESULT WINAPI IEIA_Printers_fnQueryInterface(IExtractIconA * iface, REFIID riid, LPVOID *ppvObj) -{ - _ICOM_THIS_From_IExtractIconA(IExtractIconW, iface); - - return This->lpVtbl->QueryInterface(This, riid, ppvObj); -} - -/************************************************************************** - * IExtractIconA_AddRef - */ -static ULONG WINAPI IEIA_Printers_fnAddRef(IExtractIconA * iface) -{ - _ICOM_THIS_From_IExtractIconA(IExtractIconW, iface); - - return This->lpVtbl->AddRef(This); -} -/************************************************************************** - * IExtractIconA_Release - */ -static ULONG WINAPI IEIA_Printers_fnRelease(IExtractIconA * iface) -{ - _ICOM_THIS_From_IExtractIconA(IExtractIconW, iface); - - return This->lpVtbl->AddRef(This); -} - -/************************************************************************** - * IExtractIconA_GetIconLocation - */ -static HRESULT WINAPI IEIA_Printers_fnGetIconLocation( - IExtractIconA * iface, - UINT uFlags, - LPSTR szIconFile, - UINT cchMax, - int * piIndex, - UINT * pwFlags) -{ - HRESULT ret; - LPWSTR lpwstrFile = HeapAlloc(GetProcessHeap(), 0, cchMax * sizeof(WCHAR)); - _ICOM_THIS_From_IExtractIconA(IExtractIconW, iface); - - TRACE("(%p) (flags=%u %p %u %p %p)\n", This, uFlags, szIconFile, cchMax, piIndex, pwFlags); - - ret = This->lpVtbl->GetIconLocation(This, 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 - */ -static HRESULT WINAPI IEIA_Printers_fnExtract(IExtractIconA *iface, LPCSTR pszFile, - UINT nIconIndex, HICON *phiconLarge, - HICON *phiconSmall, UINT nIconSize) -{ - HRESULT ret; - INT len = MultiByteToWideChar(CP_ACP, 0, pszFile, -1, NULL, 0); - LPWSTR lpwstrFile = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); - _ICOM_THIS_From_IExtractIconA(IExtractIconW, iface); - - 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 = This->lpVtbl->Extract(This, lpwstrFile, nIconIndex, phiconLarge, phiconSmall, nIconSize); - HeapFree(GetProcessHeap(), 0, lpwstrFile); - return ret; -} - -static struct IExtractIconAVtbl eiavt = -{ - IEIA_Printers_fnQueryInterface, - IEIA_Printers_fnAddRef, - IEIA_Printers_fnRelease, - IEIA_Printers_fnGetIconLocation, - IEIA_Printers_fnExtract -}; - -/************************************************************************** - * IExtractIcon_Constructor - */ -static IUnknown *IEI_Printers_Constructor(LPCITEMIDLIST pidl) -{ - IExtractIconWImpl* ei; - - TRACE("%p\n", pidl); - - ei = HeapAlloc(GetProcessHeap(),0,sizeof(IExtractIconWImpl)); - ei->ref = 1; - ei->lpVtbl = &eivt; - ei->lpvtblExtractIconA = &eiavt; - ei->pidl=ILClone(pidl); - - pdump(pidl); - - TRACE("(%p)\n", ei); - return (IUnknown *)ei; -} - -/*********************************************************************** - * Printers folder implementation - */ - -typedef struct { - IShellFolder2Vtbl *lpVtbl; - IPersistFolder2Vtbl *lpVtblPersistFolder2; - - LONG ref; - - CLSID *pclsid; - - LPITEMIDLIST pidlRoot; /* absolute pidl */ - - int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */ -} IGenericSFImpl; - -#define _IPersistFolder2_Offset ((INT_PTR)(&(((IGenericSFImpl*)0)->lpVtblPersistFolder2))) -#define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder2_Offset); - -#define _IUnknown_(This) (IShellFolder*)&(This->lpVtbl) -#define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl) - -#define _IPersist_(This) (IPersist*)&(This->lpVtblPersistFolder2) -#define _IPersistFolder_(This) (IPersistFolder*)&(This->lpVtblPersistFolder2) -#define _IPersistFolder2_(This) (IPersistFolder2*)&(This->lpVtblPersistFolder2) - -/************************************************************************** - * ISF_Printers_fnQueryInterface - * - * NOTE does not support IPersist/IPersistFolder - */ -static HRESULT WINAPI ISF_Printers_fnQueryInterface( - IShellFolder2 * iface, REFIID riid, LPVOID * ppvObj) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); - - *ppvObj = NULL; - - if (IsEqualIID (riid, &IID_IUnknown) || - IsEqualIID (riid, &IID_IShellFolder) || - IsEqualIID (riid, &IID_IShellFolder2)) - { - *ppvObj = _IShellFolder_(This); - } - - else if (IsEqualIID (riid, &IID_IPersist) || - IsEqualIID (riid, &IID_IPersistFolder) || - IsEqualIID (riid, &IID_IPersistFolder2)) - { - *ppvObj = _IPersistFolder2_ (This); - } - - if (*ppvObj) - { - IUnknown_AddRef ((IUnknown *) (*ppvObj)); - TRACE ("-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj); - return S_OK; - } - TRACE ("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI ISF_Printers_fnAddRef (IShellFolder2 * iface) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE ("(%p)->(count=%lu)\n", This, refCount - 1); - - return refCount; -} - -static ULONG WINAPI ISF_Printers_fnRelease (IShellFolder2 * iface) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE ("(%p)->(count=%lu)\n", This, refCount + 1); - - if (!refCount) - { - TRACE ("-- destroying IShellFolder(%p)\n", This); - if (This->pidlRoot) - SHFree (This->pidlRoot); - LocalFree ((HLOCAL) This); - return 0; - } - return refCount; -} - -/************************************************************************** - * ISF_Printers_fnParseDisplayName - * - * This is E_NOTIMPL in Windows too. - */ -static HRESULT WINAPI ISF_Printers_fnParseDisplayName (IShellFolder2 * iface, - HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, - DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - 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 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; -} - -static PIDLPrinterStruct * _ILGetPrinterStruct(LPCITEMIDLIST pidl) -{ - LPPIDLDATA pdata = _ILGetDataPointer(pidl); - - if (pdata && pdata->type==0x00) - return (PIDLPrinterStruct*)&(pdata->u.cfont); - - return NULL; -} - -/************************************************************************** - * CreatePrintersEnumList() - */ -static BOOL CreatePrintersEnumList(IEnumIDList *list, DWORD dwFlags) -{ - BOOL ret = TRUE; - - TRACE("(%p)->(flags=0x%08lx) \n",list,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 = 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(list, pidl)) - SHFree(pidl); - } - } - HeapFree(GetProcessHeap(), 0, pi); - } - return ret; -} - -/************************************************************************** - * ISF_Printers_fnEnumObjects - */ -static HRESULT WINAPI ISF_Printers_fnEnumObjects (IShellFolder2 * iface, - HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(HWND=%p flags=0x%08lx pplist=%p)\n", - This, hwndOwner, dwFlags, ppEnumIDList); - - if(!ppEnumIDList) return E_OUTOFMEMORY; - *ppEnumIDList = IEnumIDList_Constructor(); - if (*ppEnumIDList) - CreatePrintersEnumList(*ppEnumIDList, dwFlags); - - TRACE ("-- (%p)->(new ID List: %p)\n", This, *ppEnumIDList); - - return (*ppEnumIDList) ? S_OK : E_OUTOFMEMORY; -} - -/************************************************************************** - * ISF_Printers_fnBindToObject - */ -static HRESULT WINAPI ISF_Printers_fnBindToObject (IShellFolder2 * iface, - LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", This, - pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); - - return SHELL32_BindToChild (This->pidlRoot, NULL, pidl, riid, ppvOut); -} - -/************************************************************************** - * ISF_Printers_fnBindToStorage - */ -static HRESULT WINAPI ISF_Printers_fnBindToStorage (IShellFolder2 * iface, - LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", - This, pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); - - *ppvOut = NULL; - return E_NOTIMPL; -} - -/************************************************************************** - * ISF_Printers_fnCompareIDs - */ -static HRESULT WINAPI ISF_Printers_fnCompareIDs (IShellFolder2 * iface, - LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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_Printers_fnCreateViewObject - */ -static HRESULT WINAPI ISF_Printers_fnCreateViewObject (IShellFolder2 * iface, - HWND hwndOwner, REFIID riid, LPVOID * ppvOut) -{ - - LPSHELLVIEW pShellView; - HRESULT hr = E_INVALIDARG; - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - 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)) - { - pShellView = IShellView_Constructor ((IShellFolder *) iface); - if (pShellView) - { - hr = IShellView_QueryInterface (pShellView, riid, ppvOut); - IShellView_Release (pShellView); - } - } - TRACE ("-- (%p)->(interface=%p)\n", This, ppvOut); - return hr; -} - -/************************************************************************** - * ISF_Printers_fnGetAttributesOf - */ -static HRESULT WINAPI ISF_Printers_fnGetAttributesOf (IShellFolder2 * iface, - 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; - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - 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 - * - */ -static HRESULT WINAPI ISF_Printers_fnGetUIObjectOf (IShellFolder2 * iface, - HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl, - REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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)) - { - IUnknown *pUnk = IEI_Printers_Constructor(apidl[0]); - hr = IUnknown_QueryInterface(pUnk, riid, (void**)&pObj); - IUnknown_Release(pUnk); - } - 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 - * - */ -static HRESULT WINAPI ISF_Printers_fnGetDisplayNameOf (IShellFolder2 * iface, - LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) -{ - LPWSTR pszName; - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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 = 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->u.pOleStr = pszName; - return S_OK; - } - CoTaskMemFree(pszName); - return E_FAIL; - } - - p = _ILGetPrinterStruct(pidl); - if (!p) - { - WARN("no printer struct\n"); - return E_INVALIDARG; - } - strRet->u.pOleStr = SHAlloc(p->offsServer * sizeof(WCHAR)); - if (!strRet->u.pOleStr) - return E_OUTOFMEMORY; - - memcpy((LPVOID)strRet->u.pOleStr, (LPVOID)p->szName, p->offsServer * sizeof(WCHAR)); - TRACE("ret %s\n", debugstr_w(strRet->u.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 - */ -static HRESULT WINAPI ISF_Printers_fnSetNameOf (IShellFolder2 * iface, - HWND hwndOwner, LPCITEMIDLIST pidl, /* simple pidl */ - LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - FIXME ("(%p)->(%p,pidl=%p,%s,%lu,%p)\n", This, hwndOwner, pidl, - debugstr_w (lpName), dwFlags, pPidlOut); - - return E_FAIL; -} - -static HRESULT WINAPI ISF_Printers_fnGetDefaultSearchGUID(IShellFolder2 *iface, - GUID * pguid) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_Printers_fnEnumSearches (IShellFolder2 *iface, - IEnumExtraSearch ** ppenum) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_Printers_fnGetDefaultColumn (IShellFolder2 * iface, - DWORD dwRes, ULONG * pSort, ULONG * pDisplay) -{ - if (pSort) - *pSort = 0; - if (pDisplay) - *pDisplay = 0; - - return S_OK; -} -static HRESULT WINAPI ISF_Printers_fnGetDefaultColumnState ( - IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags) -{ - if (!pcsFlags || iColumn >= PrinterSHELLVIEWCOLUMNS) - return E_INVALIDARG; - *pcsFlags = PrinterSFHeader[iColumn].pcsFlags; - return S_OK; - -} - -static HRESULT WINAPI ISF_Printers_fnGetDetailsEx (IShellFolder2 * iface, - LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p): stub\n", This); - - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_Printers_fnGetDetailsOf (IShellFolder2 * iface, - LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - 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.u.pOleStr); - - return hr; - } - - if (iColumn == COLUMN_NAME) - { - psd->str.uType = STRRET_WSTR; - return IShellFolder2_GetDisplayNameOf(iface, pidl, SHGDN_NORMAL, &psd->str); - } - - psd->str.uType = STRRET_CSTR; - psd->str.u.cStr[0] = '\0'; - - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_Printers_fnMapColumnToSCID ( - IShellFolder2 * iface, UINT column, SHCOLUMNID * pscid) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p): stub\n", This); - return E_NOTIMPL; -} - -static IShellFolder2Vtbl vt_ShellFolder2 = -{ - ISF_Printers_fnQueryInterface, - ISF_Printers_fnAddRef, - ISF_Printers_fnRelease, - ISF_Printers_fnParseDisplayName, - ISF_Printers_fnEnumObjects, - ISF_Printers_fnBindToObject, - ISF_Printers_fnBindToStorage, - ISF_Printers_fnCompareIDs, - ISF_Printers_fnCreateViewObject, - ISF_Printers_fnGetAttributesOf, - ISF_Printers_fnGetUIObjectOf, - ISF_Printers_fnGetDisplayNameOf, - ISF_Printers_fnSetNameOf, - /* ShellFolder2 */ - ISF_Printers_fnGetDefaultSearchGUID, - ISF_Printers_fnEnumSearches, - ISF_Printers_fnGetDefaultColumn, - ISF_Printers_fnGetDefaultColumnState, - ISF_Printers_fnGetDetailsEx, - ISF_Printers_fnGetDetailsOf, - ISF_Printers_fnMapColumnToSCID -}; - -/************************************************************************ - * IPF_Printers_QueryInterface - */ -static HRESULT WINAPI IPF_Printers_QueryInterface ( - IPersistFolder2 * iface, REFIID iid, LPVOID * ppvObj) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - TRACE ("(%p)\n", This); - - return IUnknown_QueryInterface (_IUnknown_ (This), iid, ppvObj); -} - -/************************************************************************ - * IPF_Printers_AddRef - */ -static ULONG WINAPI IPF_Printers_AddRef (IPersistFolder2 * iface) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - TRACE ("(%p)->(count=%lu)\n", This, This->ref); - - return IUnknown_AddRef (_IUnknown_ (This)); -} - -/************************************************************************ - * IPF_Printers_Release - */ -static ULONG WINAPI IPF_Printers_Release (IPersistFolder2 * iface) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - TRACE ("(%p)->(count=%lu)\n", This, This->ref); - - return IUnknown_Release (_IUnknown_ (This)); -} - -/************************************************************************ - * IPF_Printers_GetClassID - */ -static HRESULT WINAPI IPF_Printers_GetClassID ( - IPersistFolder2 * iface, CLSID * lpClassId) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - TRACE ("(%p)\n", This); - - *lpClassId = CLSID_Printers; - - return S_OK; -} - -/************************************************************************ - * IPF_Printers_Initialize - * - */ -static HRESULT WINAPI IPF_Printers_Initialize ( - IPersistFolder2 * iface, LPCITEMIDLIST pidl) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - if (This->pidlRoot) - SHFree((LPVOID)This->pidlRoot); - - This->pidlRoot = ILClone(pidl); - return S_OK; -} - -/************************************************************************** - * IPF_Printers_fnGetCurFolder - */ -static HRESULT WINAPI IPF_Printers_GetCurFolder ( - IPersistFolder2 * iface, LPITEMIDLIST * pidl) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - TRACE ("(%p)->(%p)\n", This, pidl); - - *pidl = ILClone (This->pidlRoot); - return S_OK; -} - -static IPersistFolder2Vtbl vt_PersistFolder2 = -{ - IPF_Printers_QueryInterface, - IPF_Printers_AddRef, - IPF_Printers_Release, - IPF_Printers_GetClassID, - IPF_Printers_Initialize, - IPF_Printers_GetCurFolder -}; - -/************************************************************************** - * ISF_Printers_Constructor - */ -HRESULT WINAPI ISF_Printers_Constructor ( - IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) -{ - IGenericSFImpl *sf; - HRESULT hr; - - TRACE ("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid (riid)); - - if (pUnkOuter) - return CLASS_E_NOAGGREGATION; - - sf = HeapAlloc( GetProcessHeap(), 0, sizeof(*sf) ); - if (!sf) - return E_OUTOFMEMORY; - - sf->ref = 1; - sf->lpVtbl = &vt_ShellFolder2; - sf->lpVtblPersistFolder2 = &vt_PersistFolder2; - - sf->pidlRoot = _ILCreatePrinters(); /* my qualified pidl */ - - hr = IUnknown_QueryInterface( _IUnknown_(sf), riid, ppv ); - IUnknown_Release( _IUnknown_(sf) ); - - TRACE ("--(%p)\n", *ppv); - return hr; -} diff --git a/reactos/dll/win32/shell32/shfldr_recyclebin.c b/reactos/dll/win32/shell32/shfldr_recyclebin.c deleted file mode 100644 index 855f4accd1e..00000000000 --- a/reactos/dll/win32/shell32/shfldr_recyclebin.c +++ /dev/null @@ -1,1614 +0,0 @@ -/* - * Trash virtual folder support. The trashing engine is implemented in trash.c - * - * Copyright (C) 2006 Mikolaj Zalewski - * - * 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 - -WINE_DEFAULT_DEBUG_CHANNEL(recyclebin); - -typedef struct -{ - int column_name_id; - const GUID *fmtId; - DWORD pid; - int pcsFlags; - int fmt; - int cxChars; -} columninfo; - -static const columninfo RecycleBinColumns[] = -{ - {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 - */ - -typedef struct tagRecycleBin -{ - const IShellFolder2Vtbl *lpVtbl; - const IPersistFolder2Vtbl *lpPersistFolderVtbl; - const IContextMenu2Vtbl *lpContextMenu2; - const IShellExtInitVtbl *lpSEI; - LONG refCount; - INT iIdEmpty; - LPITEMIDLIST pidl; - LPCITEMIDLIST apidl; -} RecycleBin, *LPRecycleBin; - -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; - - -static const IContextMenu2Vtbl recycleBincmVtblFolder; -static const IContextMenu2Vtbl recycleBincmVtblBitbucketItem; -static const IShellFolder2Vtbl recycleBinVtbl; -static const IPersistFolder2Vtbl recycleBinPersistVtbl; -static const IShellExtInitVtbl eivt; - -static LPRecycleBin __inline impl_from_IContextMenu2(IContextMenu2 *iface) -{ - return (RecycleBin *)((char *)iface - FIELD_OFFSET(RecycleBin, lpContextMenu2)); -} - -static LPRecycleBin __inline impl_from_IPersistFolder(IPersistFolder2 *iface) -{ - return (RecycleBin *)((char *)iface - FIELD_OFFSET(RecycleBin, lpPersistFolderVtbl)); -} - -static LPRecycleBin __inline impl_from_IShellExtInit( IShellExtInit *iface ) -{ - return (RecycleBin *)((char*)iface - FIELD_OFFSET(RecycleBin, lpSEI)); -} - -static void RecycleBin_Destructor(RecycleBin *This); - -HRESULT WINAPI RecycleBin_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppOutput) -{ - RecycleBin *obj; - HRESULT ret; - if (pUnkOuter) - return CLASS_E_NOAGGREGATION; - - obj = SHAlloc(sizeof(RecycleBin)); - if (obj == NULL) - return E_OUTOFMEMORY; - ZeroMemory(obj, sizeof(RecycleBin)); - obj->lpVtbl = &recycleBinVtbl; - obj->lpSEI = &eivt; - obj->lpPersistFolderVtbl = &recycleBinPersistVtbl; - obj->lpContextMenu2 = NULL; - if (FAILED(ret = IUnknown_QueryInterface((IUnknown *)obj, riid, ppOutput))) - { - RecycleBin_Destructor(obj); - return ret; - } -/* InterlockedIncrement(&objCount);*/ - return S_OK; -} - -static void RecycleBin_Destructor(RecycleBin *This) -{ -/* InterlockedDecrement(&objCount);*/ - SHFree(This->pidl); - SHFree(This); -} - -static HRESULT WINAPI RecycleBin_QueryInterface(IShellFolder2 *iface, REFIID riid, void **ppvObject) -{ - RecycleBin *This = (RecycleBin *)iface; - TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppvObject); - - *ppvObject = NULL; - if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IShellFolder) - || IsEqualGUID(riid, &IID_IShellFolder2)) - *ppvObject = This; - - if (IsEqualGUID(riid, &IID_IPersist) || IsEqualGUID(riid, &IID_IPersistFolder) - || IsEqualGUID(riid, &IID_IPersistFolder2)) - *ppvObject = (void *)&This->lpPersistFolderVtbl; - - else if (IsEqualIID(riid, &IID_IContextMenu) || IsEqualGUID(riid, &IID_IContextMenu2)) - { - This->lpContextMenu2 = &recycleBincmVtblFolder; - *ppvObject = (void *)&This->lpContextMenu2; - } - else if(IsEqualIID(riid, &IID_IShellExtInit)) - { - *ppvObject = (void *)&(This->lpSEI); - } - - if (*ppvObject != NULL) - { - IUnknown_AddRef((IUnknown *)*ppvObject); - return S_OK; - } - WARN("no interface %s\n", debugstr_guid(riid)); - return E_NOINTERFACE; -} - -static ULONG WINAPI RecycleBin_AddRef(IShellFolder2 *iface) -{ - RecycleBin *This = (RecycleBin *)iface; - TRACE("(%p)\n", This); - return InterlockedIncrement(&This->refCount); -} - -static ULONG WINAPI RecycleBin_Release(IShellFolder2 *iface) -{ - RecycleBin *This = (RecycleBin *)iface; - LONG result; - - TRACE("(%p)\n", This); - result = InterlockedDecrement(&This->refCount); - if (result == 0) - { - TRACE("Destroy object\n"); - RecycleBin_Destructor(This); - } - return result; -} - -static HRESULT WINAPI RecycleBin_ParseDisplayName(IShellFolder2 *This, 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; -} - -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; -} - -static PIDLRecycleStruct * _ILGetRecycleStruct(LPCITEMIDLIST pidl) -{ - LPPIDLDATA pdata = _ILGetDataPointer(pidl); - - if (pdata && pdata->type==0x00) - return (PIDLRecycleStruct*)&(pdata->u.crecycle); - - return NULL; -} - -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 = 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; -} - - - -BOOL -WINAPI -CBEnumBitBucket(IN PVOID Context, 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 = 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((IEnumIDList*)Context, pidl); - - if (!ret) - SHFree(pidl); - SHFree(pFileDetails); - TRACE("Returning %d\n", ret); - CloseRecycleBinHandle(hDeletedFile); - return ret; -} - -static HRESULT WINAPI RecycleBin_EnumObjects(IShellFolder2 *iface, HWND hwnd, SHCONTF grfFlags, IEnumIDList **ppenumIDList) -{ - RecycleBin *This = (RecycleBin *)iface; - IEnumIDList *list; - static LPCWSTR szDrive = L"C:\\"; - - TRACE("(%p, %p, %x, %p)\n", This, hwnd, (unsigned int)grfFlags, ppenumIDList); - - if (grfFlags & SHCONTF_NONFOLDERS) - { - TRACE("Starting Enumeration\n"); - *ppenumIDList = NULL; - list = IEnumIDList_Constructor(); - if (list == NULL) - return E_OUTOFMEMORY; - - if (!EnumerateRecycleBinW(szDrive, //FIXME - CBEnumBitBucket, - (PVOID)list)) - { - WARN("Error: EnumerateRecycleBinW failed\n"); - } - *ppenumIDList = list; - } - else - { - *ppenumIDList = IEnumIDList_Constructor(); - if (*ppenumIDList == NULL) - return E_OUTOFMEMORY; - } - - return S_OK; - -} - -static HRESULT WINAPI RecycleBin_BindToObject(IShellFolder2 *This, 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; -} - -static HRESULT WINAPI RecycleBin_BindToStorage(IShellFolder2 *This, 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; -} - -static HRESULT WINAPI RecycleBin_CompareIDs(IShellFolder2 *iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) -{ - RecycleBin *This = (RecycleBin *)iface; - - /* 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)); -} - -static HRESULT WINAPI RecycleBin_CreateViewObject(IShellFolder2 *iface, HWND hwndOwner, REFIID riid, void **ppv) -{ - RecycleBin *This = (RecycleBin *)iface; - 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)) - { - This->lpContextMenu2 = &recycleBincmVtblFolder; - *ppv = (void *)&This->lpContextMenu2; - This->refCount++; - hr = S_OK; - } - else if (IsEqualIID (riid, &IID_IShellView)) - { - pShellView = IShellView_Constructor ((IShellFolder *) iface); - if (pShellView) - { - hr = IShellView_QueryInterface (pShellView, riid, ppv); - IShellView_Release (pShellView); - } - } - else - return hr; - TRACE ("-- (%p)->(interface=%p)\n", This, ppv); - return hr; - -} - -static HRESULT WINAPI RecycleBin_GetAttributesOf(IShellFolder2 *This, UINT cidl, LPCITEMIDLIST *apidl, - SFGAOF *rgfInOut) -{ - TRACE("(%p, %d, {%p, ...}, {%x})\n", This, cidl, apidl[0], (unsigned int)*rgfInOut); - *rgfInOut &= SFGAO_CANMOVE|SFGAO_CANDELETE|SFGAO_HASPROPSHEET|SFGAO_FILESYSTEM; - return S_OK; -} - -static HRESULT WINAPI RecycleBin_GetUIObjectOf(IShellFolder2 *iface, HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, - REFIID riid, UINT *prgfInOut, void **ppv) -{ - IUnknown *pObj = NULL; - HRESULT hr = E_INVALIDARG; - RecycleBin * This = (RecycleBin*)iface; - - 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)) - { - This->lpContextMenu2 = &recycleBincmVtblBitbucketItem; - pObj = (IUnknown*)(&This->lpContextMenu2); - This->apidl = apidl[0]; - IUnknown_AddRef(pObj); - hr = S_OK; - } - else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) - { - hr = IShellFolder_QueryInterface (iface, &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; -} - -static HRESULT WINAPI RecycleBin_GetDisplayNameOf(IShellFolder2 *This, 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->u.pOleStr = StrDupW(pszPath); - return S_OK; - } - } - - pFileDetails = _ILGetRecycleStruct(pidl); - if (!pFileDetails) - { - pName->u.cStr[0] = 0; - pName->uType = STRRET_CSTR; - return E_INVALIDARG; - } - - pFileName = wcsrchr(pFileDetails->szName, L'\\'); - if (!pFileName) - { - pName->u.cStr[0] = 0; - pName->uType = STRRET_CSTR; - return E_UNEXPECTED; - } - - pName->u.pOleStr = StrDupW(pFileName + 1); - if (pName->u.pOleStr == NULL) - return E_OUTOFMEMORY; - - pName->uType = STRRET_WSTR; - return S_OK; -} - -static HRESULT WINAPI RecycleBin_SetNameOf(IShellFolder2 *This, HWND hwnd, LPCITEMIDLIST pidl, LPCOLESTR pszName, - SHGDNF uFlags, LPITEMIDLIST *ppidlOut) -{ - TRACE("\n"); - return E_FAIL; /* not supported */ -} - -static HRESULT WINAPI RecycleBin_GetDefaultSearchGUID(IShellFolder2 *iface, GUID *pguid) -{ - FIXME("stub\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI RecycleBin_EnumSearches(IShellFolder2 *iface, IEnumExtraSearch **ppEnum) -{ - FIXME("stub\n"); - *ppEnum = NULL; - return E_NOTIMPL; -} - -static HRESULT WINAPI RecycleBin_GetDefaultColumn(IShellFolder2 *iface, DWORD dwReserved, ULONG *pSort, ULONG *pDisplay) -{ - RecycleBin *This = (RecycleBin *)iface; - TRACE("(%p, %x, %p, %p)\n", This, (unsigned int)dwReserved, pSort, pDisplay); - *pSort = 0; - *pDisplay = 0; - return S_OK; -} - -static HRESULT WINAPI RecycleBin_GetDefaultColumnState(IShellFolder2 *iface, UINT iColumn, SHCOLSTATEF *pcsFlags) -{ - RecycleBin *This = (RecycleBin *)iface; - TRACE("(%p, %d, %p)\n", This, iColumn, pcsFlags); - if (iColumn >= COLUMNS_COUNT) - return E_INVALIDARG; - *pcsFlags = RecycleBinColumns[iColumn].pcsFlags; - return S_OK; -} - -static HRESULT WINAPI RecycleBin_GetDetailsEx(IShellFolder2 *iface, 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 = RecycleBinColumns[iColumn].fmt; - pDetails->cxChar = RecycleBinColumns[iColumn].cxChars; - if (pidl == NULL) - { - pDetails->str.uType = STRRET_WSTR; - LoadStringW(shell32_hInstance, RecycleBinColumns[iColumn].column_name_id, buffer, MAX_PATH); - return SHStrDupW(buffer, &pDetails->str.u.pOleStr); - } - - if (iColumn == COLUMN_NAME) - return RecycleBin_GetDisplayNameOf(iface, 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.u.pOleStr); - break; - default: - return E_FAIL; - } - - pDetails->str.uType = STRRET_WSTR; - return SHStrDupW(buffer, &pDetails->str.u.pOleStr); -} - -static HRESULT WINAPI RecycleBin_MapColumnToSCID(IShellFolder2 *iface, UINT iColumn, SHCOLUMNID *pscid) -{ - RecycleBin *This = (RecycleBin *)iface; - TRACE("(%p, %d, %p)\n", This, iColumn, pscid); - if (iColumn>=COLUMNS_COUNT) - return E_INVALIDARG; - pscid->fmtid = *RecycleBinColumns[iColumn].fmtId; - pscid->pid = RecycleBinColumns[iColumn].pid; - return S_OK; -} - -static const IShellFolder2Vtbl recycleBinVtbl = -{ - /* IUnknown */ - RecycleBin_QueryInterface, - RecycleBin_AddRef, - RecycleBin_Release, - - /* IShellFolder */ - RecycleBin_ParseDisplayName, - RecycleBin_EnumObjects, - RecycleBin_BindToObject, - RecycleBin_BindToStorage, - RecycleBin_CompareIDs, - RecycleBin_CreateViewObject, - RecycleBin_GetAttributesOf, - RecycleBin_GetUIObjectOf, - RecycleBin_GetDisplayNameOf, - RecycleBin_SetNameOf, - - /* IShellFolder2 */ - RecycleBin_GetDefaultSearchGUID, - RecycleBin_EnumSearches, - RecycleBin_GetDefaultColumn, - RecycleBin_GetDefaultColumnState, - RecycleBin_GetDetailsEx, - RecycleBin_GetDetailsOf, - RecycleBin_MapColumnToSCID -}; - -static HRESULT WINAPI RecycleBin_IPersistFolder2_GetClassID(IPersistFolder2 *This, CLSID *pClassID) -{ - TRACE("(%p, %p)\n", This, pClassID); - if (This == NULL || pClassID == NULL) - return E_INVALIDARG; - memcpy(pClassID, &CLSID_RecycleBin, sizeof(CLSID)); - return S_OK; -} - -static HRESULT WINAPI RecycleBin_IPersistFolder2_Initialize(IPersistFolder2 *iface, LPCITEMIDLIST pidl) -{ - RecycleBin *This = impl_from_IPersistFolder(iface); - TRACE("(%p, %p)\n", This, pidl); - - SHFree((LPVOID)This->pidl); - This->pidl = ILClone(pidl); - if (This->pidl == NULL) - return E_OUTOFMEMORY; - return S_OK; -} - -static HRESULT WINAPI RecycleBin_IPersistFolder2_GetCurFolder(IPersistFolder2 *iface, LPITEMIDLIST *ppidl) -{ - RecycleBin *This = impl_from_IPersistFolder(iface); - TRACE("\n"); - *ppidl = ILClone(This->pidl); - return S_OK; -} - -static HRESULT WINAPI RecycleBin_IPersistFolder2_QueryInterface(IPersistFolder2 *This, REFIID riid, void **ppvObject) -{ - return RecycleBin_QueryInterface((IShellFolder2 *)impl_from_IPersistFolder(This), riid, ppvObject); -} - -static ULONG WINAPI RecycleBin_IPersistFolder2_AddRef(IPersistFolder2 *This) -{ - return RecycleBin_AddRef((IShellFolder2 *)impl_from_IPersistFolder(This)); -} - -static ULONG WINAPI RecycleBin_IPersistFolder2_Release(IPersistFolder2 *This) -{ - return RecycleBin_Release((IShellFolder2 *)impl_from_IPersistFolder(This)); -} - -static const IPersistFolder2Vtbl recycleBinPersistVtbl = -{ - /* IUnknown */ - RecycleBin_IPersistFolder2_QueryInterface, - RecycleBin_IPersistFolder2_AddRef, - RecycleBin_IPersistFolder2_Release, - - /* IPersist */ - RecycleBin_IPersistFolder2_GetClassID, - /* IPersistFolder */ - RecycleBin_IPersistFolder2_Initialize, - /* IPersistFolder2 */ - RecycleBin_IPersistFolder2_GetCurFolder -}; - -/************************************************************************* - * BitBucket IShellExtInit interface - */ - -static HRESULT WINAPI -RecycleBin_ExtInit_QueryInterface( IShellExtInit* iface, REFIID riid, void** ppvObject ) -{ - return RecycleBin_QueryInterface((IShellFolder2 *)impl_from_IShellExtInit(iface), riid, ppvObject); -} - -static ULONG WINAPI -RecycleBin_ExtInit_AddRef( IShellExtInit* iface ) -{ - return RecycleBin_AddRef((IShellFolder2 *)impl_from_IShellExtInit(iface)); -} - -static ULONG WINAPI -RecycleBin_ExtInit_Release( IShellExtInit* iface ) -{ - return RecycleBin_Release((IShellFolder2 *)impl_from_IShellExtInit(iface)); -} - -static HRESULT WINAPI -RecycleBin_ExtInit_Initialize( IShellExtInit* iface, LPCITEMIDLIST pidlFolder, - IDataObject *pdtobj, HKEY hkeyProgID ) -{ - RecycleBin *This = impl_from_IShellExtInit(iface); - - TRACE("%p %p %p %p\n", This, pidlFolder, pdtobj, hkeyProgID ); - return S_OK; -} - - -static const IShellExtInitVtbl eivt = -{ - RecycleBin_ExtInit_QueryInterface, - RecycleBin_ExtInit_AddRef, - RecycleBin_ExtInit_Release, - RecycleBin_ExtInit_Initialize -}; - - -/************************************************************************* - * BitBucket context menu - * - */ - -static HRESULT WINAPI -RecycleBin_IContextMenu2Folder_QueryInterface( IContextMenu2* iface, REFIID riid, void** ppvObject ) -{ - return RecycleBin_QueryInterface((IShellFolder2 *)impl_from_IContextMenu2(iface), riid, ppvObject); -} - -static ULONG WINAPI -RecycleBin_IContextMenu2Folder_AddRef( IContextMenu2* iface ) -{ - return RecycleBin_AddRef((IShellFolder2 *)impl_from_IContextMenu2(iface)); -} - -static ULONG WINAPI -RecycleBin_IContextMenu2Folder_Release( IContextMenu2* iface ) -{ - return RecycleBin_Release((IShellFolder2 *)impl_from_IContextMenu2(iface)); -} - -static HRESULT WINAPI -RecycleBin_IContextMenu2Folder_QueryContextMenu( IContextMenu2* iface, HMENU hmenu, UINT indexMenu, - UINT idCmdFirst, UINT idCmdLast, UINT uFlags ) -{ - WCHAR szBuffer[100]; - MENUITEMINFOW mii; - int id = 1; - RecycleBin * This = impl_from_IContextMenu2(iface); - - 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; - This->iIdEmpty = 1; - - if (!InsertMenuItemW( hmenu, indexMenu, TRUE, &mii )) - return E_FAIL; - - return MAKE_HRESULT( SEVERITY_SUCCESS, 0, id ); -} - -static HRESULT WINAPI -RecycleBin_IContextMenu2Folder_InvokeCommand( IContextMenu2* iface, LPCMINVOKECOMMANDINFO lpici ) -{ - HRESULT hr; - LPSHELLBROWSER lpSB; - LPSHELLVIEW lpSV = NULL; - RecycleBin * This = impl_from_IContextMenu2(iface); - - TRACE("%p %p verb %p\n", This, lpici, lpici->lpVerb); - - if ( LOWORD(lpici->lpVerb) == This->iIdEmpty) - { - // FIXME - // path & flags - hr = SHEmptyRecycleBinW(lpici->hwnd, L"C:\\", 0); - TRACE("result %x\n", hr); - if (hr != S_OK) - { - return hr; - } - - if((lpSB = (LPSHELLBROWSER)SendMessageA(lpici->hwnd, CWM_GETISHELLBROWSER,0,0))) - { - if(SUCCEEDED(IShellBrowser_QueryActiveShellView(lpSB, &lpSV))) - { - IShellView_Refresh(lpSV); - } - } - } - return S_OK; -} - -static HRESULT WINAPI -RecycleBin_IContextMenu2Folder_GetCommandString( IContextMenu2* iface, UINT_PTR idCmd, UINT uType, - UINT* pwReserved, LPSTR pszName, UINT cchMax ) -{ - RecycleBin * This = impl_from_IContextMenu2(iface); - - FIXME("%p %lu %u %p %p %u\n", This, - idCmd, uType, pwReserved, pszName, cchMax ); - - return E_NOTIMPL; -} - -/************************************************************************** -* RecycleBin_IContextMenu2Item_HandleMenuMsg() -*/ -static HRESULT WINAPI RecycleBin_IContextMenu2Folder_HandleMenuMsg( - IContextMenu2 *iface, - UINT uMsg, - WPARAM wParam, - LPARAM lParam) -{ - RecycleBin * This = impl_from_IContextMenu2(iface); - - TRACE("RecycleBin_IContextMenu2Item_IContextMenu2Folder_HandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n",This, uMsg, wParam, lParam); - - return E_NOTIMPL; -} - - -static const IContextMenu2Vtbl recycleBincmVtblFolder = -{ - RecycleBin_IContextMenu2Folder_QueryInterface, - RecycleBin_IContextMenu2Folder_AddRef, - RecycleBin_IContextMenu2Folder_Release, - RecycleBin_IContextMenu2Folder_QueryContextMenu, - RecycleBin_IContextMenu2Folder_InvokeCommand, - RecycleBin_IContextMenu2Folder_GetCommandString, - RecycleBin_IContextMenu2Folder_HandleMenuMsg -}; - - -/************************************************************************** -* IContextMenu2 Bitbucket Item Implementation -*/ - -/************************************************************************ - * RecycleBin_IContextMenu2Item_QueryInterface - */ -static HRESULT WINAPI RecycleBin_IContextMenu2Item_QueryInterface(IContextMenu2 * iface, REFIID iid, LPVOID * ppvObject) -{ - RecycleBin * This = impl_from_IContextMenu2(iface); - - TRACE("(%p)\n", This); - - return RecycleBin_QueryInterface((IShellFolder2*)This, iid, ppvObject); -} - -/************************************************************************ - * RecycleBin_IContextMenu2Item_AddRef - */ -static ULONG WINAPI RecycleBin_IContextMenu2Item_AddRef(IContextMenu2 * iface) -{ - RecycleBin * This = impl_from_IContextMenu2(iface); - - TRACE("(%p)->(count=%u)\n", This, This->refCount); - - return RecycleBin_AddRef((IShellFolder2*)This); -} - -/************************************************************************ - * RecycleBin_IContextMenu2Item_Release - */ -static ULONG WINAPI RecycleBin_IContextMenu2Item_Release(IContextMenu2 * iface) -{ - RecycleBin * This = impl_from_IContextMenu2(iface); - - TRACE("(%p)->(count=%u)\n", This, This->refCount); - - return RecycleBin_Release((IShellFolder2*)This); -} - -/************************************************************************** -* RecycleBin_IContextMenu2Item_QueryContextMenu() -*/ -static HRESULT WINAPI RecycleBin_IContextMenu2Item_QueryContextMenu( - IContextMenu2 *iface, - HMENU hMenu, - UINT indexMenu, - UINT idCmdFirst, - UINT idCmdLast, - UINT uFlags) -{ - WCHAR szBuffer[30] = {0}; - ULONG Count = 1; - - RecycleBin * This = impl_from_IContextMenu2(iface); - - 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); -} - - -/************************************************************************** -* RecycleBin_IContextMenu2Item_InvokeCommand() -*/ -static HRESULT WINAPI RecycleBin_IContextMenu2Item_InvokeCommand( - IContextMenu2 *iface, - LPCMINVOKECOMMANDINFO lpcmi) -{ - - SEARCH_CONTEXT Context; - RecycleBin * This = impl_from_IContextMenu2(iface); - 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(This->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; -} - -/************************************************************************** - * RecycleBin_IContextMenu2Item_GetCommandString() - * - */ -static HRESULT WINAPI RecycleBin_IContextMenu2Item_GetCommandString( - IContextMenu2 *iface, - UINT_PTR idCommand, - UINT uFlags, - UINT* lpReserved, - LPSTR lpszName, - UINT uMaxNameLen) -{ - RecycleBin * This = impl_from_IContextMenu2(iface); - - TRACE("(%p)->(idcom=%lx flags=%x %p name=%p len=%x)\n",This, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen); - - - return E_FAIL; -} - - - -/************************************************************************** -* RecycleBin_IContextMenu2Item_HandleMenuMsg() -*/ -static HRESULT WINAPI RecycleBin_IContextMenu2Item_HandleMenuMsg( - IContextMenu2 *iface, - UINT uMsg, - WPARAM wParam, - LPARAM lParam) -{ - RecycleBin * This = impl_from_IContextMenu2(iface); - - TRACE("RecycleBin_IContextMenu2Item_HandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n",This, uMsg, wParam, lParam); - - return E_NOTIMPL; -} - -static const IContextMenu2Vtbl recycleBincmVtblBitbucketItem = -{ - RecycleBin_IContextMenu2Item_QueryInterface, - RecycleBin_IContextMenu2Item_AddRef, - RecycleBin_IContextMenu2Item_Release, - RecycleBin_IContextMenu2Item_QueryContextMenu, - RecycleBin_IContextMenu2Item_InvokeCommand, - RecycleBin_IContextMenu2Item_GetCommandString, - RecycleBin_IContextMenu2Item_HandleMenuMsg -}; - - -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 = 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, (LPVOID)&pItem->dwNukeOnDelete, dwSize); - dwSize = sizeof(DWORD); - RegSetValueExW(hSubKey, L"MaxCapacity", 0, REG_DWORD, (LPVOID)&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.u3.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 DeleteFileToRecycleBinW(wszPath); -} - -/************************************************************************* - * SHUpdateRecycleBinIcon [SHELL32.@] - * - * Undocumented - */ -HRESULT WINAPI SHUpdateRecycleBinIcon(void) -{ - FIXME("stub\n"); - - - - return S_OK; -} diff --git a/reactos/dll/win32/shell32/shfldr_unixfs.c b/reactos/dll/win32/shell32/shfldr_unixfs.c deleted file mode 100644 index 95e4defc81e..00000000000 --- a/reactos/dll/win32/shell32/shfldr_unixfs.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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/reactos/dll/win32/shell32/shlexec.c b/reactos/dll/win32/shell32/shlexec.c deleted file mode 100644 index e1f183fc96e..00000000000 --- a/reactos/dll/win32/shell32/shlexec.c +++ /dev/null @@ -1,2018 +0,0 @@ -/* - * 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, int 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) { - INT 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 = IShellFolder_GetDisplayNameOf(desktop, pidl, SHGDN_FORPARSING, &strret); - - if (SUCCEEDED(hr)) - StrRetToStrNW(pszPath, uOutSize, &strret, pidl); - - IShellFolder_Release(desktop); - } - - 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 void *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 = 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, int 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 }; - int 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=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 = 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 = 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]; - LONG 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, &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, 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 = strstrW(key, wCommand); - assert(tmp); - wcscpy(tmp, wDdeexec); - - if (RegQueryValueW(HKEY_CLASSES_ROOT, key, ddeexec, &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, 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 = 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 = 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; - - IShellFolder_GetUIObjectOf( shf, NULL, 1, &pidllast, - &IID_IDataObject, NULL, (LPVOID*) &dataobj ); - -end: - if ( pidl != sei->lpIDList ) - ILFree( pidl ); - if ( shf ) - IShellFolder_Release( shf ); - 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 = IShellExtInit_QueryInterface( obj, &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 = IContextMenu_QueryContextMenu( cm, 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 = IContextMenu_InvokeCommand( cm, (LPCMINVOKECOMMANDINFO) &ici ); - - TRACE("invoke command returned %08x\n", r ); - -end: - if ( hmenu ) - DestroyMenu( hmenu ); - if ( cm ) - IContextMenu_Release( cm ); - 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 = IShellExtInit_Initialize( obj, NULL, dataobj, hkey ); - if ( FAILED( r ) ) - goto end; - - r = IShellExtInit_QueryInterface( obj, &IID_IObjectWithSite, (LPVOID*) &ows ); - if ( FAILED( r ) ) - goto end; - - IObjectWithSite_SetSite( ows, NULL ); - - r = shellex_run_context_menu_default( obj, sei ); - -end: - if ( ows ) - IObjectWithSite_Release( ows ); - if ( dataobj ) - IDataObject_Release( dataobj ); - if ( obj ) - IShellExtInit_Release( obj ); - 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, 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(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, 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 = 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 = 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* filename) -{ - WCHAR msg[2048]; - DWORD_PTR msgArguments[3] = { (DWORD_PTR)filename, 0, 0 }; - DWORD error_code; - - 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 | FORMAT_MESSAGE_ARGUMENT_ARRAY, - NULL, - error_code, - LANG_USER_DEFAULT, - msg, - sizeof(msg)/sizeof(WCHAR), - (va_list*)msgArguments); - - 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 = 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 = 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 = 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 = 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 = 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(sei_tmp.lpIDList, &IID_IShellExecuteHookW, (LPVOID*)&pSEH, NULL); - - if (SUCCEEDED(hr)) - { - hr = IShellExecuteHookW_Execute(pSEH, &sei_tmp); - - IShellExecuteHookW_Release(pSEH); - - 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(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, wszApplicationName); - } - 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 = 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 = 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 = 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=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 = 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, 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 = 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, wszApplicationName); - } - - 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. - */ -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, callback ); - - SHFree(wVerb); - SHFree(wFile); - SHFree(wParameters); - SHFree(wDirectory); - return seiW.hInstApp; -} - -/************************************************************************* - * OpenAs_RunDLLA [SHELL32.@] - */ -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.@] - */ -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/reactos/dll/win32/shell32/shlfileop.c b/reactos/dll/win32/shell32/shlfileop.c deleted file mode 100644 index f22b7225a00..00000000000 --- a/reactos/dll/win32/shell32/shlfileop.c +++ /dev/null @@ -1,1881 +0,0 @@ -/* - * 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 = SelectObject(hdc, (HFONT)SendDlgItemMessageW(hDlg, IDD_MESSAGE, WM_GETFONT, 0, 0)); - DrawTextW(hdc, 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 = 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 = 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); -} - -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(); -} - -/**********************************************************************/ - -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(); -} - -/***********************************************************************/ - -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(); -} - -/***********************************************************************/ - -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 = NULL; - BOOL bRet = FALSE; - - if (Context->Index >= Context->from->dwNumFiles) - return FALSE; - - /* get current file */ - from = &Context->from->feFiles[Context->Index]; - - if (Context->op->req->wFunc != 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 - */ -DWORD 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 = 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 *new = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, list->feFiles, - list->num_alloc * 2 * sizeof(*new) ); - list->feFiles = new; - 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 = HeapAlloc(GetProcessHeap(), 0, dwLen * sizeof(WCHAR)); - lstrcpyW(feFile->szFullPath, szFile); - - ptr = StrRChrW(szFile, NULL, '\\'); - if (ptr) - { - dwLen = ptr - szFile + 1; - feFile->szDirectory = HeapAlloc(GetProcessHeap(), 0, dwLen * sizeof(WCHAR)); - lstrcpynW(feFile->szDirectory, szFile, dwLen); - - dwLen = lstrlenW(feFile->szFullPath) - dwLen + 1; - feFile->szFilename = 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 = 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 = 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 = DSA_GetItemPtr(hNameMapping, i); - - SHFree(lp->pszOldPath); - SHFree(lp->pszNewPath); - } - DSA_Destroy(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 -*/ -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 - */ -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 - */ -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 - */ -DWORD WINAPI SheChangeDirW(LPWSTR path) -{ - if (SetCurrentDirectoryW(path)) - return 0; - else - return GetLastError(); -} - -/************************************************************************* - * IsNetDrive [SHELL32.66] - */ -BOOL WINAPI IsNetDrive(DWORD drive) -{ - char root[4]; - strcpy(root, "A:\\"); - root[0] += (char)drive; - return (GetDriveTypeA(root) == DRIVE_REMOTE); -} - - -/************************************************************************* - * RealDriveType [SHELL32.524] - */ -INT WINAPI RealDriveType(INT drive, BOOL bQueryNet) -{ - char root[] = "A:\\"; - root[0] += (char)drive; - return GetDriveTypeA(root); -} - -/*********************************************************************** - * SHPathPrepareForWriteW (SHELL32.@) - */ -HRESULT WINAPI SHPathPrepareForWriteW(HWND hwnd, IUnknown *modless, LPCWSTR path, DWORD flags) -{ - HRESULT 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 = 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.@) - */ -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/reactos/dll/win32/shell32/shlfolder.c b/reactos/dll/win32/shell32/shlfolder.c deleted file mode 100644 index f9d5c1eea5e..00000000000 --- a/reactos/dll/win32/shell32/shlfolder.c +++ /dev/null @@ -1,564 +0,0 @@ -/* - * 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 = IShellFolder_BindToObject (psf, *pidlInOut, pbc, &IID_IShellFolder, (LPVOID *) & psfChild); - - if (SUCCEEDED(hr)) { - hr = IShellFolder_ParseDisplayName (psfChild, hwndOwner, pbc, szNext, pEaten, &pidlOut, pdwAttributes); - IShellFolder_Release (psfChild); - - 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_QueryInterface ((IUnknown *) * ppvOut, &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; - } - - IPersistFolder3_InitializeEx (ppf, NULL, pidlAbsolute, &ppfti); - IPersistFolder3_Release (ppf); - } - else if (SUCCEEDED ((hr = IUnknown_QueryInterface ((IUnknown *) * ppvOut, &IID_IPersistFolder, (LPVOID *) & pPF)))) { - IPersistFolder_Initialize (pPF, pidlAbsolute); - IPersistFolder_Release (pPF); - } - 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 = IShellFolder_QueryInterface (pSF, riid, ppvOut); - } else { - /* go deeper */ - hr = IShellFolder_BindToObject (pSF, ILGetNext (pidlComplete), NULL, riid, ppvOut); - } - IShellFolder_Release (pSF); - } - - 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 = IShellFolder_BindToObject (psf, pidlFirst, NULL, &IID_IShellFolder, (LPVOID *) & psfChild); - if (SUCCEEDED (hr)) { - STRRET strTemp; - LPITEMIDLIST pidlNext = ILGetNext (pidl); - - hr = IShellFolder_GetDisplayNameOf (psfChild, pidlNext, dwFlags, &strTemp); - if (SUCCEEDED (hr)) { - if(!StrRetToStrNW (szOut, dwOutLen, &strTemp, pidlNext)) - hr = E_FAIL; - } - IShellFolder_Release (psfChild); - } - 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 = IShellFolder_GetDisplayNameOf(psf, 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(IShellFolder_BindToObject(psf, pidl, 0, (REFIID)&IID_IShellFolder, (LPVOID *)&psf2))) - { - IEnumIDList *pEnumIL = NULL; - if (SUCCEEDED(IShellFolder_EnumObjects(psf2, 0, SHCONTF_FOLDERS, &pEnumIL))) - { - if (IEnumIDList_Skip(pEnumIL, 1) != S_OK) - *pdwAttributes &= ~SFGAO_HASSUBFOLDER; - IEnumIDList_Release(pEnumIL); - } - IShellFolder_Release(psf2); - } - } - } 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 (IShellFolder_BindToObject (iface, firstpidl, NULL, &IID_IShellFolder, (LPVOID *) & psf))) { - nReturn = IShellFolder_CompareIDs (psf, lParam, nextpidl1, nextpidl2); - IShellFolder_Release (psf); - } - 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. - */ -HRESULT -WINAPI -SHOpenFolderAndSelectItems(LPITEMIDLIST pidlFolder, - UINT cidl, - PCUITEMID_CHILD_ARRAY *apidl, - DWORD dwFlags) -{ - FIXME("SHOpenFolderAndSelectItems() stub\n"); - return E_NOTIMPL; -} diff --git a/reactos/dll/win32/shell32/shlfsbind.c b/reactos/dll/win32/shell32/shlfsbind.c deleted file mode 100644 index a9bf8f0af6c..00000000000 --- a/reactos/dll/win32/shell32/shlfsbind.c +++ /dev/null @@ -1,213 +0,0 @@ -/* - * 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 - -WINE_DEFAULT_DEBUG_CHANNEL(pidl); - -/*********************************************************************** - * IFileSystemBindData implementation - */ -typedef struct -{ - const IFileSystemBindDataVtbl *lpVtbl; - LONG ref; - WIN32_FIND_DATAW findFile; -} IFileSystemBindDataImpl; - -static HRESULT WINAPI IFileSystemBindData_fnQueryInterface(IFileSystemBindData *, REFIID, LPVOID*); -static ULONG WINAPI IFileSystemBindData_fnAddRef(IFileSystemBindData *); -static ULONG WINAPI IFileSystemBindData_fnRelease(IFileSystemBindData *); -static HRESULT WINAPI IFileSystemBindData_fnGetFindData(IFileSystemBindData *, WIN32_FIND_DATAW *); -static HRESULT WINAPI IFileSystemBindData_fnSetFindData(IFileSystemBindData *, const WIN32_FIND_DATAW *); - -static const IFileSystemBindDataVtbl sbvt = -{ - IFileSystemBindData_fnQueryInterface, - IFileSystemBindData_fnAddRef, - IFileSystemBindData_fnRelease, - IFileSystemBindData_fnSetFindData, - IFileSystemBindData_fnGetFindData, -}; - -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) -{ - IFileSystemBindDataImpl *sb; - HRESULT ret = E_OUTOFMEMORY; - - TRACE("%p, %p\n", pfd, ppV); - - if (!ppV) - return E_INVALIDARG; - - *ppV = NULL; - - sb = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IFileSystemBindDataImpl)); - if (!sb) - return ret; - - sb->lpVtbl = &sbvt; - sb->ref = 1; - IFileSystemBindData_fnSetFindData((IFileSystemBindData*)sb, pfd); - - ret = CreateBindCtx(0, ppV); - if (SUCCEEDED(ret)) - { - BIND_OPTS bindOpts; - - bindOpts.cbStruct = sizeof(BIND_OPTS); - bindOpts.grfFlags = 0; - bindOpts.grfMode = STGM_CREATE; - bindOpts.dwTickCountDeadline = 0; - IBindCtx_SetBindOptions(*ppV, &bindOpts); - IBindCtx_RegisterObjectParam(*ppV, (LPOLESTR)wFileSystemBindData, (LPUNKNOWN)sb); - - IFileSystemBindData_Release((IFileSystemBindData*)sb); - } - else - HeapFree(GetProcessHeap(), 0, sb); - return ret; -} - -HRESULT WINAPI FileSystemBindData_GetFindData(LPBC pbc, WIN32_FIND_DATAW *pfd) -{ - LPUNKNOWN pUnk; - IFileSystemBindData *pfsbd = NULL; - HRESULT ret; - - TRACE("%p, %p\n", pbc, pfd); - - if (!pfd) - return E_INVALIDARG; - - ret = IBindCtx_GetObjectParam(pbc, (LPOLESTR)wFileSystemBindData, &pUnk); - if (SUCCEEDED(ret)) - { - ret = IUnknown_QueryInterface(pUnk, &IID_IFileSystemBindData, (LPVOID *)&pfsbd); - if (SUCCEEDED(ret)) - { - ret = IFileSystemBindData_GetFindData(pfsbd, pfd); - IFileSystemBindData_Release(pfsbd); - } - IUnknown_Release(pUnk); - } - return ret; -} - -HRESULT WINAPI FileSystemBindData_SetFindData(LPBC pbc, const WIN32_FIND_DATAW *pfd) -{ - LPUNKNOWN pUnk; - IFileSystemBindData *pfsbd = NULL; - HRESULT ret; - - TRACE("%p, %p\n", pbc, pfd); - - ret = IBindCtx_GetObjectParam(pbc, (LPOLESTR)wFileSystemBindData, &pUnk); - if (SUCCEEDED(ret)) - { - ret = IUnknown_QueryInterface(pUnk, &IID_IFileSystemBindData, (LPVOID *)&pfsbd); - if (SUCCEEDED(ret)) - { - ret = IFileSystemBindData_SetFindData(pfsbd, pfd); - IFileSystemBindData_Release(pfsbd); - } - IUnknown_Release(pUnk); - } - return ret; -} - -static HRESULT WINAPI IFileSystemBindData_fnQueryInterface( - IFileSystemBindData *iface, REFIID riid, LPVOID *ppV) -{ - IFileSystemBindDataImpl *This = (IFileSystemBindDataImpl *)iface; - TRACE("(%p)->(\n\tIID:\t%s, %p)\n", This, debugstr_guid(riid), ppV); - - *ppV = NULL; - - if (IsEqualIID(riid, &IID_IUnknown)) - *ppV = This; - else if (IsEqualIID(riid, &IID_IFileSystemBindData)) - *ppV = (IFileSystemBindData*)This; - - if (*ppV) - { - IUnknown_AddRef((IUnknown*)(*ppV)); - TRACE("-- Interface: (%p)->(%p)\n", ppV, *ppV); - return S_OK; - } - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI IFileSystemBindData_fnAddRef(IFileSystemBindData *iface) -{ - IFileSystemBindDataImpl *This = (IFileSystemBindDataImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE("(%p)->(count=%i)\n", This, refCount - 1); - - return refCount; -} - -static ULONG WINAPI IFileSystemBindData_fnRelease(IFileSystemBindData *iface) -{ - IFileSystemBindDataImpl *This = (IFileSystemBindDataImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE("(%p)->(count=%i)\n", This, refCount + 1); - - if (!refCount) - { - TRACE(" destroying ISFBindPidl(%p)\n",This); - HeapFree(GetProcessHeap(), 0, This); - } - return refCount; -} - -static HRESULT WINAPI IFileSystemBindData_fnGetFindData( - IFileSystemBindData *iface, WIN32_FIND_DATAW *pfd) -{ - IFileSystemBindDataImpl *This = (IFileSystemBindDataImpl *)iface; - TRACE("(%p), %p\n", This, pfd); - - if (!pfd) - return E_INVALIDARG; - - memcpy(pfd, &This->findFile, sizeof(WIN32_FIND_DATAW)); - return NOERROR; -} - -static HRESULT WINAPI IFileSystemBindData_fnSetFindData( - IFileSystemBindData *iface, const WIN32_FIND_DATAW *pfd) -{ - IFileSystemBindDataImpl *This = (IFileSystemBindDataImpl *)iface; - TRACE("(%p), %p\n", This, pfd); - - if (pfd) - memcpy(&This->findFile, pfd, sizeof(WIN32_FIND_DATAW)); - else - memset(&This->findFile, 0, sizeof(WIN32_FIND_DATAW)); - return NOERROR; -} diff --git a/reactos/dll/win32/shell32/shlmenu.c b/reactos/dll/win32/shell32/shlmenu.c deleted file mode 100644 index 821bf50687a..00000000000 --- a/reactos/dll/win32/shell32/shlmenu.c +++ /dev/null @@ -1,985 +0,0 @@ -/* - * 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(IShellFolder_BindToObject(lpsf, pidl,0,&IID_IShellFolder,(LPVOID *)&lpsf2))) - { - IEnumIDList *lpe = NULL; - - if (SUCCEEDED (IShellFolder_EnumObjects(lpsf2, 0, uEnumFlags, &lpe ))) - { - - LPITEMIDLIST pidlTemp = NULL; - ULONG ulFetched; - - while ((!bAbortInit) && (NOERROR == IEnumIDList_Next(lpe,1,&pidlTemp,&ulFetched))) - { - if (SUCCEEDED (IShellFolder_GetAttributesOf(lpsf, 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 = 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++; - } - IEnumIDList_Release (lpe); - } - IShellFolder_Release(lpsf2); - } - IShellFolder_Release(lpsf); - } - - 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 = 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 = SHAlloc(sizeof(FMITEM) + len*sizeof(WCHAR)); - strcpyW (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; - -} - -/**********************************************************************/ - -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, lpText, uID, icon, hMenuPopup, nItemHeight); - else - { - DWORD len = MultiByteToWideChar( CP_ACP, 0, lpText, -1, NULL, 0 ); - LPWSTR lpszText = HeapAlloc ( GetProcessHeap(), 0, len*sizeof(WCHAR) ); - if (!lpszText) return FALSE; - MultiByteToWideChar( CP_ACP, 0, 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] - */ -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. - */ -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 (nItem == -1) - return uIDMax; - - 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) - { - miiSrc.wID += uIDAdjust; /* add uIDAdjust to the ID */ - - if (uIDAdjustMax != 0xFFFF && 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 (uIDAdjustMax != 0xFFFF && 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/reactos/dll/win32/shell32/shlview.c b/reactos/dll/win32/shell32/shlview.c deleted file mode 100644 index f731b0b535b..00000000000 --- a/reactos/dll/win32/shell32/shlview.c +++ /dev/null @@ -1,2823 +0,0 @@ -/* - * 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: Load/Save the view state from/into the stream provided by - * the ShellBrowser - * - * FIXME: CheckToolbar: handle the "new folder" and "folder up" button - * - * FIXME: ShellView_FillList: consider sort orders - * - * FIXME: implement the drag and drop in the old (msg-based) way - * - * FIXME: when the ShellView_WndProc gets a WM_NCDESTROY should we do a - * Release() ??? - */ - -#include - -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; - -typedef struct -{ - const IShellViewVtbl* lpVtbl; - LONG ref; - const IOleCommandTargetVtbl* lpvtblOleCommandTarget; - const IDropTargetVtbl* lpvtblDropTarget; - const IDropSourceVtbl* lpvtblDropSource; - const IViewObjectVtbl* lpvtblViewObject; - IShellFolder* pSFParent; - IShellFolder2* pSF2Parent; - IShellBrowser* pShellBrowser; - ICommDlgBrowser* pCommDlgBrowser; - HWND hWnd; /* SHELLDLL_DefView */ - 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; - IAdviseSink *pAdvSink; - IDropTarget* pCurDropTarget; /* The sub-item, which is currently dragged over */ - IDataObject* 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 */ - IContextMenu2 *pCM; -} IShellViewImpl, *LPIShellViewImpl; - -static const IShellViewVtbl svvt; -static const IOleCommandTargetVtbl ctvt; -static const IDropTargetVtbl dtvt; -static const IDropSourceVtbl dsvt; -static const IViewObjectVtbl vovt; - - -static LPIShellViewImpl __inline impl_from_IOleCommandTarget( IOleCommandTarget *iface ) -{ - return (LPIShellViewImpl)((char*)iface - FIELD_OFFSET(IShellViewImpl, lpvtblOleCommandTarget)); -} - -static LPIShellViewImpl __inline impl_from_IDropTarget( IDropTarget *iface ) -{ - return (LPIShellViewImpl)((char*)iface - FIELD_OFFSET(IShellViewImpl, lpvtblDropTarget)); -} - -static LPIShellViewImpl __inline impl_from_IDropSource( IDropSource *iface ) -{ - return (LPIShellViewImpl)((char*)iface - FIELD_OFFSET(IShellViewImpl, lpvtblDropSource)); -} - -static LPIShellViewImpl __inline impl_from_IViewObject( IViewObject *iface ) -{ - return (LPIShellViewImpl)((char*)iface - FIELD_OFFSET(IShellViewImpl, lpvtblViewObject)); -} - -/* 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 - -#define SHV_CHANGE_NOTIFY WM_USER + 0x1111 - -/*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); - -/********************************************************** - * IShellView_Constructor - */ -IShellView * IShellView_Constructor( IShellFolder * pFolder) -{ IShellViewImpl * sv; - sv=HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IShellViewImpl)); - sv->ref=1; - sv->lpVtbl=&svvt; - sv->lpvtblOleCommandTarget=&ctvt; - sv->lpvtblDropTarget=&dtvt; - sv->lpvtblDropSource=&dsvt; - sv->lpvtblViewObject=&vovt; - - sv->pSFParent = pFolder; - if(pFolder) IShellFolder_AddRef(pFolder); - IShellFolder_QueryInterface(sv->pSFParent, &IID_IShellFolder2, (LPVOID*)&sv->pSF2Parent); - - sv->pCurDropTarget = NULL; - sv->pCurDataObject = NULL; - sv->iDragOverItem = 0; - sv->cScrollDelay = 0; - sv->ptLastMousePos.x = 0; - sv->ptLastMousePos.y = 0; - - TRACE("(%p)->(%p)\n",sv, pFolder); - return (IShellView *) sv; -} - -/********************************************************** - * - * ##### helperfunctions for communication with ICommDlgBrowser ##### - */ -static BOOL IsInCommDlg(IShellViewImpl * This) -{ return(This->pCommDlgBrowser != NULL); -} - -static HRESULT IncludeObject(IShellViewImpl * This, LPCITEMIDLIST pidl) -{ - HRESULT ret = S_OK; - - if ( IsInCommDlg(This) ) - { - TRACE("ICommDlgBrowser::IncludeObject pidl=%p\n", pidl); - ret = ICommDlgBrowser_IncludeObject(This->pCommDlgBrowser, (IShellView*)This, pidl); - TRACE("--0x%08x\n", ret); - } - return ret; -} - -static HRESULT OnDefaultCommand(IShellViewImpl * This) -{ - HRESULT ret = S_FALSE; - - if (IsInCommDlg(This)) - { - TRACE("ICommDlgBrowser::OnDefaultCommand\n"); - ret = ICommDlgBrowser_OnDefaultCommand(This->pCommDlgBrowser, (IShellView*)This); - TRACE("-- returns %08x\n", ret); - } - return ret; -} - -static HRESULT OnStateChange(IShellViewImpl * This, UINT uFlags) -{ - HRESULT ret = S_FALSE; - - if (IsInCommDlg(This)) - { - TRACE("ICommDlgBrowser::OnStateChange flags=%x\n", uFlags); - ret = ICommDlgBrowser_OnStateChange(This->pCommDlgBrowser, (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 - */ -static void CheckToolbar(IShellViewImpl * This) -{ - LRESULT result; - - TRACE("\n"); - - if (IsInCommDlg(This)) - { - IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_CHECKBUTTON, - FCIDM_TB_SMALLICON, (This->FolderSettings.ViewMode==FVM_LIST)? TRUE : FALSE, &result); - IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_CHECKBUTTON, - FCIDM_TB_REPORTVIEW, (This->FolderSettings.ViewMode==FVM_DETAILS)? TRUE : FALSE, &result); - IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_ENABLEBUTTON, - FCIDM_TB_SMALLICON, TRUE, &result); - IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_ENABLEBUTTON, - FCIDM_TB_REPORTVIEW, TRUE, &result); - } -} - -/********************************************************** - * - * ##### helperfunctions for initializing the view ##### - */ -/********************************************************** - * change the style of the listview control - */ -static void SetStyle(IShellViewImpl * This, DWORD dwAdd, DWORD dwRemove) -{ - DWORD tmpstyle; - - TRACE("(%p)\n", This); - - tmpstyle = GetWindowLongPtrW(This->hWndList, GWL_STYLE); - SetWindowLongPtrW(This->hWndList, GWL_STYLE, dwAdd | (tmpstyle & ~dwRemove)); -} - -/********************************************************** -* ShellView_CreateList() -* -* - creates the list view window -*/ -static BOOL ShellView_CreateList (IShellViewImpl * This) -{ DWORD dwStyle, dwExStyle; - - TRACE("%p\n",This); - - dwStyle = WS_TABSTOP | WS_VISIBLE | WS_CHILDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | - LVS_SHAREIMAGELISTS | LVS_EDITLABELS | LVS_AUTOARRANGE; - dwExStyle = WS_EX_CLIENTEDGE; - - if (This->FolderSettings.fFlags & FWF_DESKTOP) - dwStyle |= LVS_ALIGNLEFT; - else - dwStyle |= LVS_ALIGNTOP; - - switch (This->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 (This->FolderSettings.fFlags & FWF_AUTOARRANGE) dwStyle |= LVS_AUTOARRANGE; - if (This->FolderSettings.fFlags & FWF_DESKTOP) - This->FolderSettings.fFlags |= FWF_NOCLIENTEDGE | FWF_NOSCROLL; - if (This->FolderSettings.fFlags & FWF_SINGLESEL) dwStyle |= LVS_SINGLESEL; - if (This->FolderSettings.fFlags & FWF_NOCLIENTEDGE) - dwExStyle &= ~WS_EX_CLIENTEDGE; - - This->hWndList=CreateWindowExW( dwExStyle, - WC_LISTVIEWW, - NULL, - dwStyle, - 0,0,0,0, - This->hWnd, - (HMENU)ID_LISTVIEW, - shell32_hInstance, - NULL); - - if(!This->hWndList) - return FALSE; - - This->ListViewSortInfo.bIsAscending = TRUE; - This->ListViewSortInfo.nHeaderID = -1; - This->ListViewSortInfo.nLastHeaderID = -1; - - if (This->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 (1) - { - SendMessageW(This->hWndList, LVM_SETTEXTBKCOLOR, 0, CLR_NONE); - SendMessageW(This->hWndList, LVM_SETBKCOLOR, 0, CLR_NONE); - } - else - { - SendMessageW(This->hWndList, LVM_SETTEXTBKCOLOR, 0, GetSysColor(COLOR_DESKTOP)); - SendMessageW(This->hWndList, LVM_SETBKCOLOR, 0, GetSysColor(COLOR_DESKTOP)); - } - - SendMessageW(This->hWndList, LVM_SETTEXTCOLOR, 0, RGB(255,255,255)); - } - - /* UpdateShellSettings(); */ - return TRUE; -} - -/********************************************************** -* ShellView_InitList() -* -* - adds all needed columns to the shellview -*/ -static BOOL ShellView_InitList(IShellViewImpl * This) -{ - LVCOLUMNW lvColumn; - SHELLDETAILS sd; - int i; - WCHAR szTemp[50]; - - TRACE("%p\n",This); - - SendMessageW(This->hWndList, LVM_DELETEALLITEMS, 0, 0); - - lvColumn.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT; - lvColumn.pszText = szTemp; - - if (This->pSF2Parent) - { - for (i=0; 1; i++) - { - if (FAILED(IShellFolder2_GetDetailsOf(This->pSF2Parent, NULL, i, &sd))) - break; - lvColumn.fmt = sd.fmt; - lvColumn.cx = sd.cxChar*8; /* chars->pixel */ - StrRetToStrNW( szTemp, 50, &sd.str, NULL); - SendMessageW(This->hWndList, LVM_INSERTCOLUMNW, i, (LPARAM) &lvColumn); - } - } - else - { - FIXME("no SF2\n"); - } - - SendMessageW(This->hWndList, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM)ShellSmallIconList); - SendMessageW(This->hWndList, LVM_SETIMAGELIST, LVSIL_NORMAL, (LPARAM)ShellBigIconList); - - return TRUE; -} -/********************************************************** -* ShellView_CompareItems() -* -* NOTES -* internal, CALLBACK for DSA_Sort -*/ -static INT CALLBACK ShellView_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_CompareIDs((LPSHELLFOLDER)lpData, 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) - */ -static INT CALLBACK ShellView_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 = lParam1; - LPITEMIDLIST pItemIdList2 = 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() -*/ -static int LV_FindItemByPidl( - IShellViewImpl * This, - LPCITEMIDLIST pidl) -{ - LVITEMW lvItem; - lvItem.iSubItem = 0; - lvItem.mask = LVIF_PARAM; - for(lvItem.iItem = 0; - SendMessageW(This->hWndList, LVM_GETITEMW, 0, (LPARAM) &lvItem); - lvItem.iItem++) - { - LPITEMIDLIST currentpidl = (LPITEMIDLIST) lvItem.lParam; - HRESULT hr = IShellFolder_CompareIDs(This->pSFParent, 0, pidl, currentpidl); - if(SUCCEEDED(hr) && !HRESULT_CODE(hr)) - { - return lvItem.iItem; - } - } - return -1; -} - -/********************************************************** -* LV_AddItem() -*/ -static BOOLEAN LV_AddItem(IShellViewImpl * This, 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(This->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(This->hWndList, LVM_INSERTITEMW, 0, (LPARAM)&lvItem) == -1) - return FALSE; - else - return TRUE; -} - -/********************************************************** -* LV_DeleteItem() -*/ -static BOOLEAN LV_DeleteItem(IShellViewImpl * This, LPCITEMIDLIST pidl) -{ - int nIndex; - - TRACE("(%p)(pidl=%p)\n", This, pidl); - - nIndex = LV_FindItemByPidl(This, ILFindLastID(pidl)); - return (-1==ListView_DeleteItem(This->hWndList, nIndex))? FALSE: TRUE; -} - -/********************************************************** -* LV_RenameItem() -*/ -static BOOLEAN LV_RenameItem(IShellViewImpl * This, LPCITEMIDLIST pidlOld, LPCITEMIDLIST pidlNew ) -{ - int nItem; - LVITEMW lvItem; - - TRACE("(%p)(pidlold=%p pidlnew=%p)\n", This, pidlOld, pidlNew); - - nItem = LV_FindItemByPidl(This, ILFindLastID(pidlOld)); - if ( -1 != nItem ) - { - lvItem.mask = LVIF_PARAM; /* only the pidl */ - lvItem.iItem = nItem; - SendMessageW(This->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(This->hWndList, LVM_SETITEMW, 0, (LPARAM) &lvItem); - SendMessageW(This->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 -*/ - -static INT CALLBACK fill_list( LPVOID ptr, LPVOID arg ) -{ - LPITEMIDLIST pidl = ptr; - IShellViewImpl *This = arg; - /* in a commdlg This works as a filemask*/ - if ( IncludeObject(This, pidl)==S_OK ) LV_AddItem(This, pidl); - SHFree(pidl); - return TRUE; -} - -static HRESULT ShellView_FillList(IShellViewImpl * This) -{ - LPENUMIDLIST pEnumIDList; - LPITEMIDLIST pidl; - DWORD dwFetched; - HRESULT hRes; - HDPA hdpa; - - TRACE("%p\n",This); - - /* get the itemlist from the shfolder*/ - hRes = IShellFolder_EnumObjects(This->pSFParent,This->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 == IEnumIDList_Next(pEnumIDList,1, &pidl, &dwFetched)) && dwFetched) - { - if (DPA_InsertPtr(hdpa, 0x7fff, pidl) == -1) - { - SHFree(pidl); - } - } - - /* sort the array */ - DPA_Sort(hdpa, ShellView_CompareItems, (LPARAM)This->pSFParent); - - /*turn the listview's redrawing off*/ - SendMessageA(This->hWndList, WM_SETREDRAW, FALSE, 0); - - DPA_DestroyCallback( hdpa, fill_list, This ); - - /*turn the listview's redrawing back on and force it to draw*/ - SendMessageA(This->hWndList, WM_SETREDRAW, TRUE, 0); - - IEnumIDList_Release(pEnumIDList); /* destroy the list*/ - - return S_OK; -} - -/********************************************************** -* ShellView_OnCreate() -*/ -static LRESULT ShellView_OnCreate(IShellViewImpl * This) -{ - IDropTarget* pdt; - SHChangeNotifyEntry ntreg; - IPersistFolder2 * ppf2 = NULL; - - TRACE("%p\n",This); - - if(ShellView_CreateList(This)) - { - if(ShellView_InitList(This)) - { - ShellView_FillList(This); - } - } - - if (SUCCEEDED(IUnknown_QueryInterface((IUnknown*)&This->lpVtbl, &IID_IDropTarget, (LPVOID*)&pdt))) - { - RegisterDragDrop(This->hWnd, pdt); - IDropTarget_Release(pdt); - } - - /* register for receiving notifications */ - IShellFolder_QueryInterface(This->pSFParent, &IID_IPersistFolder2, (LPVOID*)&ppf2); - if (ppf2) - { - IPersistFolder2_GetCurFolder(ppf2, (LPITEMIDLIST*)&ntreg.pidl); - ntreg.fRecursive = TRUE; - This->hNotify = SHChangeNotifyRegister(This->hWnd, SHCNF_IDLIST, SHCNE_ALLEVENTS, SHV_CHANGE_NOTIFY, 1, &ntreg); - SHFree((LPITEMIDLIST)ntreg.pidl); - IPersistFolder2_Release(ppf2); - } - - This->hAccel = LoadAcceleratorsA(shell32_hInstance, "shv_accel"); - - return S_OK; -} - -/********************************************************** - * #### Handling of the menus #### - */ - -/********************************************************** -* ShellView_BuildFileMenu() -*/ -static HMENU ShellView_BuildFileMenu(IShellViewImpl * This) -{ 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() -*/ -static void ShellView_MergeFileMenu(IShellViewImpl * This, 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() -*/ - -static void ShellView_MergeViewMenu(IShellViewImpl * This, 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 -*/ -static UINT ShellView_GetSelections(IShellViewImpl * This) -{ - LVITEMW lvItem; - UINT i = 0; - - SHFree(This->apidl); - - This->cidl = ListView_GetSelectedCount(This->hWndList); - This->apidl = (LPITEMIDLIST*)SHAlloc(This->cidl * sizeof(LPITEMIDLIST)); - - TRACE("selected=%i\n", This->cidl); - - if(This->apidl) - { - TRACE("-- Items selected =%u\n", This->cidl); - - lvItem.mask = LVIF_STATE | LVIF_PARAM; - lvItem.stateMask = LVIS_SELECTED; - lvItem.iItem = 0; - lvItem.iSubItem = 0; - - while(SendMessageW(This->hWndList, LVM_GETITEMW, 0, (LPARAM)&lvItem) && (i < This->cidl)) - { - if(lvItem.state & LVIS_SELECTED) - { - This->apidl[i] = (LPITEMIDLIST)lvItem.lParam; - i++; - if (i == This->cidl) - break; - TRACE("-- selected Item found\n"); - } - lvItem.iItem++; - } - } - return This->cidl; - -} - -/********************************************************** - * ShellView_OpenSelectedItems() - */ -static HRESULT ShellView_OpenSelectedItems(IShellViewImpl * This) -{ - static UINT CF_IDLIST = 0; - HRESULT hr; - IDataObject* selection; - IContextMenu * 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 == ShellView_GetSelections(This)) - { - return S_OK; - } - - hr = IShellFolder_GetUIObjectOf(This->pSFParent, This->hWnd, This->cidl, - (LPCITEMIDLIST*)This->apidl, &IID_IContextMenu, - 0, (LPVOID *)&cm); - - if (SUCCEEDED(hr)) - { - hmenu = CreatePopupMenu(); - if (hmenu) - { - if (SUCCEEDED(IContextMenu_QueryContextMenu( cm, 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 = This->hWnd; - - if (IContextMenu_InvokeCommand(cm, (LPCMINVOKECOMMANDINFO) &ici ) == S_OK) - { - IContextMenu_Release(cm); - DestroyMenu( hmenu ); - return S_OK; - } - } - - } - DestroyMenu( hmenu ); - } - IContextMenu_Release(cm); - } - - - - hr = IShellFolder_GetUIObjectOf(This->pSFParent, This->hWnd, This->cidl, - (LPCITEMIDLIST*)This->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 = IDataObject_QueryGetData(selection, &fetc); - if (FAILED(hr)) - return hr; - - hr = IDataObject_GetData(selection, &fetc, &stgm); - if (FAILED(hr)) - return hr; - - pIDList = GlobalLock(stgm.u.hGlobal); - - parent_pidl = (LPCITEMIDLIST) ((LPBYTE)pIDList+pIDList->aoffset[0]); - hr = IShellFolder_GetAttributesOf(This->pSFParent, 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 = IShellFolder_GetAttributesOf(This->pSFParent, 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.u.hGlobal); - ReleaseStgMedium(&stgm); - - IDataObject_Release(selection); - - return S_OK; -} - -/********************************************************** - * ShellView_DoContextMenu() - */ -static void ShellView_DoContextMenu(IShellViewImpl * This, WORD x, WORD y, BOOL bDefault) -{ UINT uCommand; - DWORD wFlags; - HMENU hMenu; - BOOL fExplore = FALSE; - HWND hwndTree = 0; - CMINVOKECOMMANDINFO cmi; - - TRACE("(%p)->(0x%08x 0x%08x 0x%08x) stub\n",This, x, y, bDefault); - - /* look, what's selected and create a context menu object of it*/ - if( ShellView_GetSelections(This) ) - { - IShellFolder_GetUIObjectOf( This->pSFParent, This->hWndParent, This->cidl, (LPCITEMIDLIST*)This->apidl, - (REFIID)&IID_IContextMenu, NULL, (LPVOID *)&This->pCM); - - if(This->pCM) - { - TRACE("-- pContextMenu\n"); - hMenu = CreatePopupMenu(); - - if( hMenu ) - { - /* See if we are in Explore or Open mode. If the browser's tree is present, we are in Explore mode.*/ - if(SUCCEEDED(IShellBrowser_GetControlWindow(This->pShellBrowser,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 | (This->cidl != 1 ? 0 : CMF_CANRENAME) | (fExplore ? CMF_EXPLORE : 0); - - /* let the ContextMenu merge its items in */ - if (SUCCEEDED(IContextMenu_QueryContextMenu( This->pCM, hMenu, 0, FCIDM_SHVIEWFIRST, FCIDM_SHVIEWLAST, wFlags ))) - { - if (This->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,This->hWnd,NULL); - } - - if(uCommand > 0) - { - TRACE("-- uCommand=%u\n", uCommand); - if (uCommand==FCIDM_SHVIEW_OPEN && IsInCommDlg(This)) - { - TRACE("-- dlg: OnDefaultCommand\n"); - if (OnDefaultCommand(This) != S_OK) - { - ShellView_OpenSelectedItems(This); - } - } - else - { - TRACE("-- explore -- invoke command\n"); - ZeroMemory(&cmi, sizeof(cmi)); - cmi.cbSize = sizeof(cmi); - cmi.hwnd = This->hWndParent; /* this window has to answer CWM_GETISHELLBROWSER */ - cmi.lpVerb = (LPCSTR)MAKEINTRESOURCEA(uCommand); - IContextMenu_InvokeCommand(This->pCM, &cmi); - } - } - DestroyMenu(hMenu); - } - } - if (This->pCM) - { - IContextMenu_Release(This->pCM); - This->pCM = NULL; - } - } - } - else /* background context menu */ - { - hMenu = CreatePopupMenu(); - - CDefFolderMenu_Create2(NULL, NULL, This->cidl, (LPCITEMIDLIST*)This->apidl, This->pSFParent, NULL, 0, NULL, (IContextMenu**)&This->pCM); - IContextMenu2_QueryContextMenu(This->pCM, hMenu, 0, FCIDM_SHVIEWFIRST, FCIDM_SHVIEWLAST, 0); - - uCommand = TrackPopupMenu( hMenu, TPM_LEFTALIGN | TPM_RETURNCMD,x,y,0,This->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 = This->hWndParent; - IContextMenu2_InvokeCommand(This->pCM, &cmi); - - IContextMenu2_Release(This->pCM); - This->pCM = NULL; - } -} - -/********************************************************** - * ##### message handling ##### - */ - -/********************************************************** -* ShellView_OnSize() -*/ -static LRESULT ShellView_OnSize(IShellViewImpl * This, WORD wWidth, WORD wHeight) -{ - TRACE("%p width=%u height=%u\n",This, wWidth,wHeight); - - /*resize the ListView to fit our window*/ - if(This->hWndList) - { - MoveWindow(This->hWndList, 0, 0, wWidth, wHeight, TRUE); - } - - return S_OK; -} -/********************************************************** -* ShellView_OnDeactivate() -* -* NOTES -* internal -*/ -static void ShellView_OnDeactivate(IShellViewImpl * This) -{ - TRACE("%p\n",This); - - if(This->uState != SVUIA_DEACTIVATE) - { - if(This->hMenu) - { - IShellBrowser_SetMenuSB(This->pShellBrowser,0, 0, 0); - IShellBrowser_RemoveMenusSB(This->pShellBrowser,This->hMenu); - DestroyMenu(This->hMenu); - This->hMenu = 0; - } - - This->uState = SVUIA_DEACTIVATE; - } -} - -/********************************************************** -* ShellView_OnActivate() -*/ -static LRESULT ShellView_OnActivate(IShellViewImpl * This, 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(This->uState == uState) - { - return S_OK; - } - - ShellView_OnDeactivate(This); - - /*only do This if we are active */ - if(uState != SVUIA_DEACTIVATE) - { - /*merge the menus */ - This->hMenu = CreateMenu(); - - if(This->hMenu) - { - IShellBrowser_InsertMenusSB(This->pShellBrowser, This->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 = ShellView_BuildFileMenu(This); - - /*insert our menu into the menu bar*/ - if(mii.hSubMenu) - { - InsertMenuItemA(This->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(This->hMenu, FCIDM_MENU_VIEW, FALSE, &mii)) - { - ShellView_MergeViewMenu(This, 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(This->hMenu, FCIDM_MENU_FILE, FALSE, &mii)) - { - ShellView_MergeFileMenu(This, mii.hSubMenu); - } - } - TRACE("-- before fnSetMenuSB\n"); - IShellBrowser_SetMenuSB(This->pShellBrowser, This->hMenu, 0, This->hWnd); - } - } - This->uState = uState; - TRACE("--\n"); - return S_OK; -} - -/********************************************************** -* ShellView_OnSetFocus() -* -*/ -static LRESULT ShellView_OnSetFocus(IShellViewImpl * This) -{ - 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.*/ - - IShellBrowser_OnViewWindowActive(This->pShellBrowser,(IShellView*) This); - ShellView_OnActivate(This, SVUIA_ACTIVATE_FOCUS); - - /* Set the focus to the listview */ - SetFocus(This->hWndList); - - /* Notify the ICommDlgBrowser interface */ - OnStateChange(This,CDBOSC_SETFOCUS); - - return 0; -} - -/********************************************************** -* ShellView_OnKillFocus() -*/ -static LRESULT ShellView_OnKillFocus(IShellViewImpl * This) -{ - TRACE("(%p) stub\n",This); - - ShellView_OnActivate(This, SVUIA_ACTIVATE_NOFOCUS); - /* Notify the ICommDlgBrowser */ - OnStateChange(This,CDBOSC_KILLFOCUS); - - return 0; -} - -/********************************************************** -* ShellView_OnCommand() -* -* NOTES -* the CmdID's are the ones from the context menu -*/ -static LRESULT ShellView_OnCommand(IShellViewImpl * This,DWORD dwCmdID, DWORD dwCmd, HWND hwndCmd) -{ - TRACE("(%p)->(0x%08x 0x%08x %p) stub\n",This, dwCmdID, dwCmd, hwndCmd); - - switch(dwCmdID) - { - case FCIDM_SHVIEW_SMALLICON: - This->FolderSettings.ViewMode = FVM_SMALLICON; - SetStyle (This, LVS_SMALLICON, LVS_TYPEMASK); - CheckToolbar(This); - break; - - case FCIDM_SHVIEW_BIGICON: - This->FolderSettings.ViewMode = FVM_ICON; - SetStyle (This, LVS_ICON, LVS_TYPEMASK); - CheckToolbar(This); - break; - - case FCIDM_SHVIEW_LISTVIEW: - This->FolderSettings.ViewMode = FVM_LIST; - SetStyle (This, LVS_LIST, LVS_TYPEMASK); - CheckToolbar(This); - break; - - case FCIDM_SHVIEW_REPORTVIEW: - This->FolderSettings.ViewMode = FVM_DETAILS; - SetStyle (This, LVS_REPORT, LVS_TYPEMASK); - CheckToolbar(This); - break; - - /* the menu-ID's for sorting are 0x30... see shrec.rc */ - case 0x30: - case 0x31: - case 0x32: - case 0x33: - This->ListViewSortInfo.nHeaderID = (LPARAM) (dwCmdID - 0x30); - This->ListViewSortInfo.bIsAscending = TRUE; - This->ListViewSortInfo.nLastHeaderID = This->ListViewSortInfo.nHeaderID; - SendMessageA(This->hWndList, LVM_SORTITEMS, (WPARAM) &This->ListViewSortInfo, (LPARAM)ShellView_ListViewCompareItems); - break; - - default: - TRACE("-- COMMAND 0x%04x unhandled\n", dwCmdID); - } - return 0; -} - -/********************************************************** -* ShellView_OnNotify() -*/ - -static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpnmh) -{ LPNMLISTVIEW lpnmlv = (LPNMLISTVIEW)lpnmh; - NMLVDISPINFOW *lpdi = (NMLVDISPINFOW *)lpnmh; - LPITEMIDLIST pidl; - - TRACE("%p CtlID=%u lpnmh->code=%x\n",This,CtlID,lpnmh->code); - - switch(lpnmh->code) - { - case NM_SETFOCUS: - TRACE("-- NM_SETFOCUS %p\n",This); - ShellView_OnSetFocus(This); - break; - - case NM_KILLFOCUS: - TRACE("-- NM_KILLFOCUS %p\n",This); - ShellView_OnDeactivate(This); - /* Notify the ICommDlgBrowser interface */ - OnStateChange(This,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(This) != S_OK) ShellView_OpenSelectedItems(This); - break; - - case NM_RETURN: - TRACE("-- NM_RETURN %p\n",This); - if (OnDefaultCommand(This) != S_OK) ShellView_OpenSelectedItems(This); - break; - - case HDN_ENDTRACKW: - TRACE("-- HDN_ENDTRACKW %p\n",This); - /*nColumn1 = ListView_GetColumnWidth(This->hWndList, 0); - nColumn2 = ListView_GetColumnWidth(This->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(This, CDBOSC_SELCHANGE); /* the browser will get the IDataObject now */ - break; - - case LVN_COLUMNCLICK: - This->ListViewSortInfo.nHeaderID = lpnmlv->iSubItem; - if(This->ListViewSortInfo.nLastHeaderID == This->ListViewSortInfo.nHeaderID) - { - This->ListViewSortInfo.bIsAscending = !This->ListViewSortInfo.bIsAscending; - } - else - { - This->ListViewSortInfo.bIsAscending = TRUE; - } - This->ListViewSortInfo.nLastHeaderID = This->ListViewSortInfo.nHeaderID; - - SendMessageW(lpnmlv->hdr.hwndFrom, LVM_SORTITEMS, (WPARAM) &This->ListViewSortInfo, (LPARAM)ShellView_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 (This->pSF2Parent) - { - SHELLDETAILS sd; - IShellFolder2_GetDetailsOf(This->pSF2Parent, 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(This->pSFParent, pidl, 0); - } - break; - - case LVN_ITEMCHANGED: - TRACE("-- LVN_ITEMCHANGED %p\n",This); - OnStateChange(This, CDBOSC_SELCHANGE); /* the browser will get the IDataObject now */ - break; - - case LVN_BEGINDRAG: - case LVN_BEGINRDRAG: - TRACE("-- LVN_BEGINDRAG\n"); - - if (ShellView_GetSelections(This)) - { - IDataObject * pda; - DWORD dwAttributes = SFGAO_CANLINK; - DWORD dwEffect = DROPEFFECT_COPY | DROPEFFECT_MOVE; - - if (SUCCEEDED(IShellFolder_GetUIObjectOf(This->pSFParent, This->hWnd, This->cidl, (LPCITEMIDLIST*)This->apidl, &IID_IDataObject,0,(LPVOID *)&pda))) - { - IDropSource * pds = (IDropSource*)&(This->lpvtblDropSource); /* own DropSource interface */ - - if (SUCCEEDED(IShellFolder_GetAttributesOf(This->pSFParent, This->cidl, (LPCITEMIDLIST*)This->apidl, &dwAttributes))) - { - if (dwAttributes & SFGAO_CANLINK) - { - dwEffect |= DROPEFFECT_LINK; - } - } - - if (pds) - { - DWORD dwEffect2; - DoDragDrop(pda, pds, dwEffect, &dwEffect2); - } - IDataObject_Release(pda); - } - } - break; - - case LVN_BEGINLABELEDITW: - { - DWORD dwAttr = SFGAO_CANRENAME; - pidl = (LPITEMIDLIST)lpdi->item.lParam; - - TRACE("-- LVN_BEGINLABELEDITW %p\n",This); - - IShellFolder_GetAttributesOf(This->pSFParent, 1, (LPCITEMIDLIST*)&pidl, &dwAttr); - if (SFGAO_CANRENAME & dwAttr) - { - return FALSE; - } - return TRUE; - } - - case LVN_ENDLABELEDITW: - { - TRACE("-- LVN_ENDLABELEDITW %p\n",This); - if (lpdi->item.pszText) - { - HRESULT hr; - LVITEMW lvItem; - - lvItem.iItem = lpdi->item.iItem; - lvItem.iSubItem = 0; - lvItem.mask = LVIF_PARAM; - SendMessageW(This->hWndList, LVM_GETITEMW, 0, (LPARAM) &lvItem); - - pidl = (LPITEMIDLIST)lpdi->item.lParam; - hr = IShellFolder_SetNameOf(This->pSFParent, 0, pidl, lpdi->item.pszText, SHGDN_INFOLDER, &pidl); - - if(SUCCEEDED(hr) && pidl) - { - lvItem.mask = LVIF_PARAM; - lvItem.lParam = (LPARAM)pidl; - SendMessageW(This->hWndList, LVM_SETITEMW, 0, (LPARAM) &lvItem); - return TRUE; - } - } - return FALSE; - } - - case LVN_KEYDOWN: - { - /* MSG msg; - msg.hwnd = This->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(This->hWndList); - - /* get selected item */ - if(i == 1) - { - /* get selected item */ - i = ListView_GetNextItem(This->hWndList, -1, - LVNI_SELECTED); - - SendMessageW(This->hWndList, LVM_ENSUREVISIBLE, i, 0); - SendMessageW(This->hWndList, LVM_EDITLABELW, i, 0); - } - } -#if 0 - TranslateAccelerator(This->hWnd, This->hAccel, &msg) -#endif - else if(plvKeyDown->wVKey == VK_DELETE) - { - UINT i; - int item_index; - LVITEMA item; - LPITEMIDLIST* pItems; - ISFHelper *psfhlp; - - IShellFolder_QueryInterface(This->pSFParent, &IID_ISFHelper, - (LPVOID*)&psfhlp); - - if (psfhlp == NULL) - break; - - if(!(i = ListView_GetSelectedCount(This->hWndList))) - break; - - /* allocate memory for the pidl array */ - pItems = HeapAlloc(GetProcessHeap(), 0, - sizeof(LPITEMIDLIST) * i); - - /* retrieve all selected items */ - i = 0; - item_index = -1; - while(ListView_GetSelectedCount(This->hWndList) > i) - { - /* get selected item */ - item_index = ListView_GetNextItem(This->hWndList, - item_index, LVNI_SELECTED); - item.iItem = item_index; - item.mask = LVIF_PARAM; - SendMessageA(This->hWndList, LVM_GETITEMA, 0, (LPARAM) &item); - - /* get item pidl */ - pItems[i] = (LPITEMIDLIST)item.lParam; - - i++; - } - - /* perform the item deletion */ - ISFHelper_DeleteItems(psfhlp, i, (LPCITEMIDLIST*)pItems); - - /* free pidl array memory */ - HeapFree(GetProcessHeap(), 0, pItems); - } - - /* Initiate a refresh */ - else if(plvKeyDown->wVKey == VK_F5) - { - IShellView_Refresh((IShellView*)This); - } - else if(plvKeyDown->wVKey == VK_BACK) - { - LPSHELLBROWSER lpSb; - if((lpSb = (LPSHELLBROWSER)SendMessageW(This->hWndParent, CWM_GETISHELLBROWSER, 0, 0))) - { - IShellBrowser_BrowseObject(lpSb, NULL, SBSP_PARENT); - } - } - else if(plvKeyDown->wVKey == 'C' && ctrl) - { - if (ShellView_GetSelections(This)) - { - IDataObject * pda; - - if (SUCCEEDED(IShellFolder_GetUIObjectOf(This->pSFParent, This->hWnd, This->cidl, (LPCITEMIDLIST*)This->apidl, &IID_IDataObject,0,(LPVOID *)&pda))) - { - HRESULT hr = OleSetClipboard(pda); - if (FAILED(hr)) - { - WARN("OleSetClipboard failed"); - } - IDataObject_Release(pda); - } - } - break; - } - else if(plvKeyDown->wVKey == 'V' && ctrl) - { - IDataObject * pda; - STGMEDIUM medium; - FORMATETC formatetc; - LPITEMIDLIST * apidl; - LPITEMIDLIST pidl; - IShellFolder *psfFrom = NULL, *psfDesktop, *psfTarget = NULL; - LPIDA lpcida; - ISFHelper *psfhlpdst, *psfhlpsrc; - HRESULT hr; - - hr = OleGetClipboard(&pda); - if (hr != S_OK) - { - ERR("Failed to get clipboard with %lx\n", hr); - return E_FAIL; - } - - InitFormatEtc(formatetc, RegisterClipboardFormatW(CFSTR_SHELLIDLIST), TYMED_HGLOBAL); - hr = IDataObject_GetData(pda,&formatetc,&medium); - - if (FAILED(hr)) - { - ERR("Failed to get clipboard data with %lx\n", hr); - IDataObject_Release(pda); - return E_FAIL; - } - - /* lock the handle */ - lpcida = GlobalLock(medium.u.hGlobal); - if (!lpcida) - { - ERR("failed to lock pidl\n"); - ReleaseStgMedium(&medium); - IDataObject_Release(pda); - return E_FAIL; - } - - /* convert the data into pidl */ - apidl = _ILCopyCidaToaPidl(&pidl, lpcida); - - if (!apidl) - { - ERR("failed to copy pidl\n"); - return E_FAIL; - } - - if (FAILED(SHGetDesktopFolder(&psfDesktop))) - { - ERR("failed to get desktop folder\n"); - SHFree(pidl); - _ILFreeaPidl(apidl, lpcida->cidl); - ReleaseStgMedium(&medium); - IDataObject_Release(pda); - return E_FAIL; - } - - if (_ILIsDesktop(pidl)) - { - /* use desktop shellfolder */ - psfFrom = psfDesktop; - } - else if (FAILED(IShellFolder_BindToObject(psfDesktop, pidl, NULL, &IID_IShellFolder, (LPVOID*)&psfFrom))) - { - ERR("no IShellFolder\n"); - - IShellFolder_Release(psfDesktop); - SHFree(pidl); - _ILFreeaPidl(apidl, lpcida->cidl); - ReleaseStgMedium(&medium); - IDataObject_Release(pda); - - return E_FAIL; - } - - psfTarget = This->pSFParent; - - - /* get source and destination shellfolder */ - if (FAILED(IShellFolder_QueryInterface(psfTarget, &IID_ISFHelper, (LPVOID*)&psfhlpdst))) - { - ERR("no IID_ISFHelper for destination\n"); - - IShellFolder_Release(psfFrom); - IShellFolder_Release(psfTarget); - SHFree(pidl); - _ILFreeaPidl(apidl, lpcida->cidl); - ReleaseStgMedium(&medium); - IDataObject_Release(pda); - - return E_FAIL; - } - - if (FAILED(IShellFolder_QueryInterface(psfFrom, &IID_ISFHelper, (LPVOID*)&psfhlpsrc))) - { - ERR("no IID_ISFHelper for source\n"); - - ISFHelper_Release(psfhlpdst); - IShellFolder_Release(psfFrom); - IShellFolder_Release(psfTarget); - SHFree(pidl); - _ILFreeaPidl(apidl, lpcida->cidl); - ReleaseStgMedium(&medium); - IDataObject_Release(pda); - return E_FAIL; - } - - /* FIXXME - * do we want to perform a copy or move ??? - */ - hr = ISFHelper_CopyItems(psfhlpdst, psfFrom, lpcida->cidl, (LPCITEMIDLIST*)apidl); - - ISFHelper_Release(psfhlpdst); - ISFHelper_Release(psfhlpsrc); - IShellFolder_Release(psfFrom); - SHFree(pidl); - _ILFreeaPidl(apidl, lpcida->cidl); - ReleaseStgMedium(&medium); - IDataObject_Release(pda); - TRACE("paste end hr %x\n", hr); - break; - } - 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() -*/ - -static LRESULT ShellView_OnChange(IShellViewImpl * This, LPITEMIDLIST * Pidls, LONG wEventId) -{ - - TRACE("(%p)(%p,%p,0x%08x)\n", This, Pidls[0], Pidls[1], wEventId); - switch(wEventId) - { - case SHCNE_MKDIR: - case SHCNE_CREATE: - LV_AddItem(This, Pidls[0]); - break; - case SHCNE_RMDIR: - case SHCNE_DELETE: - LV_DeleteItem(This, Pidls[0]); - break; - case SHCNE_RENAMEFOLDER: - case SHCNE_RENAMEITEM: - LV_RenameItem(This, Pidls[0], Pidls[1]); - break; - case SHCNE_UPDATEITEM: - break; - } - return TRUE; -} - -/********************************************************** -* ShellView_DoMeasureItem -*/ - -static LRESULT ShellView_DoCustomItem(IShellViewImpl * pThis, HWND hWnd, UINT uMsg, LPARAM lParam) -{ - if (!pThis->pCM) - { - /* no menu */ - ERR("no menu!!!\n"); - return FALSE; - } - - if (pThis->pCM->lpVtbl->HandleMenuMsg(pThis->pCM, uMsg, (WPARAM)hWnd, lParam) == S_OK) - return TRUE; - else - return FALSE; -} - -/********************************************************** -* ShellView_WndProc -*/ - -static LRESULT CALLBACK ShellView_WndProc(HWND hWnd, UINT uMessage, WPARAM wParam, LPARAM lParam) -{ - IShellViewImpl * pThis = (IShellViewImpl*)GetWindowLongPtrW(hWnd, GWLP_USERDATA); - LPCREATESTRUCTW lpcs; - - TRACE("(hwnd=%p msg=%x wparm=%lx lparm=%lx)\n",hWnd, uMessage, wParam, lParam); - - switch (uMessage) - { - case WM_NCCREATE: - lpcs = (LPCREATESTRUCTW)lParam; - pThis = (IShellViewImpl*)(lpcs->lpCreateParams); - SetWindowLongPtrW(hWnd, GWLP_USERDATA, (ULONG_PTR)pThis); - pThis->hWnd = hWnd; /*set the window handle*/ - break; - - case WM_SIZE: return ShellView_OnSize(pThis,LOWORD(lParam), HIWORD(lParam)); - case WM_SETFOCUS: return ShellView_OnSetFocus(pThis); - case WM_KILLFOCUS: return ShellView_OnKillFocus(pThis); - case WM_CREATE: return ShellView_OnCreate(pThis); - case WM_ACTIVATE: return ShellView_OnActivate(pThis, SVUIA_ACTIVATE_FOCUS); - case WM_NOTIFY: return ShellView_OnNotify(pThis,(UINT)wParam, (LPNMHDR)lParam); - case WM_COMMAND: return ShellView_OnCommand(pThis, - GET_WM_COMMAND_ID(wParam, lParam), - GET_WM_COMMAND_CMD(wParam, lParam), - GET_WM_COMMAND_HWND(wParam, lParam)); - case SHV_CHANGE_NOTIFY: return ShellView_OnChange(pThis, (LPITEMIDLIST*)wParam, (LONG)lParam); - - case WM_CONTEXTMENU: ShellView_DoContextMenu(pThis, LOWORD(lParam), HIWORD(lParam), FALSE); - return 0; - case WM_DRAWITEM: - case WM_MEASUREITEM: - return ShellView_DoCustomItem(pThis, hWnd, uMessage, lParam); - - case WM_SHOWWINDOW: UpdateWindow(pThis->hWndList); - break; - - case WM_GETDLGCODE: return SendMessageW(pThis->hWndList,uMessage,0,0); - - case WM_DESTROY: - RevokeDragDrop(pThis->hWnd); - SHChangeNotifyDeregister(pThis->hNotify); - break; - - case WM_ERASEBKGND: - if ((pThis->FolderSettings.fFlags & FWF_DESKTOP) || - (pThis->FolderSettings.fFlags & FWF_TRANSPARENT)) - return SendMessageW(pThis->hWndParent, WM_ERASEBKGND, wParam, lParam); /* redirect to parent */ - break; - - case WM_SYSCOLORCHANGE: - /* Forward WM_SYSCOLORCHANGE to common controls */ - SendMessage(pThis->hWndList, WM_SYSCOLORCHANGE, 0, 0); - break; - - case CWM_GETISHELLBROWSER: - return (LRESULT)pThis->pShellBrowser; - } - return DefWindowProcW(hWnd, uMessage, wParam, lParam); -} -/********************************************************** -* -* -* The INTERFACE of the IShellView object -* -* -********************************************************** -* IShellView_QueryInterface -*/ -static HRESULT WINAPI IShellView_fnQueryInterface(IShellView * iface,REFIID riid, LPVOID *ppvObj) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - - TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); - - *ppvObj = NULL; - - if(IsEqualIID(riid, &IID_IUnknown)) - { - *ppvObj = This; - } - else if(IsEqualIID(riid, &IID_IShellView)) - { - *ppvObj = (IShellView*)This; - } - else if(IsEqualIID(riid, &IID_IOleCommandTarget)) - { - *ppvObj = (IOleCommandTarget*)&(This->lpvtblOleCommandTarget); - } - else if(IsEqualIID(riid, &IID_IDropTarget)) - { - *ppvObj = (IDropTarget*)&(This->lpvtblDropTarget); - } - else if(IsEqualIID(riid, &IID_IDropSource)) - { - *ppvObj = (IDropSource*)&(This->lpvtblDropSource); - } - else if(IsEqualIID(riid, &IID_IViewObject)) - { - *ppvObj = (IViewObject*)&(This->lpvtblViewObject); - } - - if(*ppvObj) - { - IUnknown_AddRef( (IUnknown*)*ppvObj ); - TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); - return S_OK; - } - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -/********************************************************** -* IShellView_AddRef -*/ -static ULONG WINAPI IShellView_fnAddRef(IShellView * iface) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE("(%p)->(count=%u)\n", This, refCount - 1); - - return refCount; -} -/********************************************************** -* IShellView_Release -*/ -static ULONG WINAPI IShellView_fnRelease(IShellView * iface) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE("(%p)->(count=%i)\n", This, refCount + 1); - - if (!refCount) - { - TRACE(" destroying IShellView(%p)\n",This); - - DestroyWindow(This->hWndList); - - if(This->pSFParent) - IShellFolder_Release(This->pSFParent); - - if(This->pSF2Parent) - IShellFolder2_Release(This->pSF2Parent); - - SHFree(This->apidl); - - if(This->pAdvSink) - IAdviseSink_Release(This->pAdvSink); - - if (This->pCM) - IContextMenu_Release(This->pCM); - - HeapFree(GetProcessHeap(),0,This); - } - return refCount; -} - -/********************************************************** -* ShellView_GetWindow -*/ -static HRESULT WINAPI IShellView_fnGetWindow(IShellView * iface,HWND * phWnd) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - - TRACE("(%p)\n",This); - - *phWnd = This->hWnd; - - return S_OK; -} - -static HRESULT WINAPI IShellView_fnContextSensitiveHelp(IShellView * iface,BOOL fEnterMode) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - - FIXME("(%p) stub\n",This); - - return E_NOTIMPL; -} - -/********************************************************** -* IShellView_TranslateAccelerator -* -* FIXME: -* use the accel functions -*/ -static HRESULT WINAPI IShellView_fnTranslateAccelerator(IShellView * iface,LPMSG lpmsg) -{ -#if 0 - IShellViewImpl *This = (IShellViewImpl *)iface; - - 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 */ -} - -static HRESULT WINAPI IShellView_fnEnableModeless(IShellView * iface,BOOL fEnable) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - - FIXME("(%p) stub\n",This); - - return E_NOTIMPL; -} - -static HRESULT WINAPI IShellView_fnUIActivate(IShellView * iface,UINT uState) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - -/* - 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(This->uState == uState) - { - return S_OK; - } - - /*OnActivate handles the menu merging and internal state*/ - ShellView_OnActivate(This, uState); - - /*only do This if we are active*/ - if(uState != SVUIA_DEACTIVATE) - { - -/* - GetFolderPath is not a method of IShellFolder - IShellFolder_GetFolderPath( This->pSFParent, szName, sizeof(szName) ); -*/ - /* set the number of parts */ - IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_STATUS, SB_SETPARTS, 1, - (LPARAM)nPartArray, &lResult); - - /* set the text for the parts */ -/* - IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_STATUS, SB_SETTEXTA, - 0, (LPARAM)szName, &lResult); -*/ - } - - return S_OK; -} - -static HRESULT WINAPI IShellView_fnRefresh(IShellView * iface) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - - TRACE("(%p)\n",This); - - SendMessageW(This->hWndList, LVM_DELETEALLITEMS, 0, 0); - ShellView_FillList(This); - - return S_OK; -} - -static HRESULT WINAPI IShellView_fnCreateViewWindow( - IShellView * iface, - IShellView *lpPrevView, - LPCFOLDERSETTINGS lpfs, - IShellBrowser * psb, - RECT * prcView, - HWND *phWnd) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - - WNDCLASSW wc; - *phWnd = 0; - - - TRACE("(%p)->(shlview=%p set=%p shlbrs=%p rec=%p hwnd=%p) incomplete\n",This, lpPrevView,lpfs, psb, prcView, phWnd); - if (lpfs != NULL) - TRACE("-- vmode=%x flags=%x\n", lpfs->ViewMode, lpfs->fFlags); - if (prcView != NULL) - TRACE("-- left=%i top=%i right=%i bottom=%i\n", prcView->left, prcView->top, prcView->right, prcView->bottom); - - /* Validate the Shell Browser */ - if (psb == NULL) - return E_UNEXPECTED; - - /*set up the member variables*/ - This->pShellBrowser = psb; - This->FolderSettings = *lpfs; - - /*get our parent window*/ - IShellBrowser_AddRef(This->pShellBrowser); - IShellBrowser_GetWindow(This->pShellBrowser, &(This->hWndParent)); - - /* try to get the ICommDlgBrowserInterface, adds a reference !!! */ - This->pCommDlgBrowser=NULL; - if ( SUCCEEDED (IShellBrowser_QueryInterface( This->pShellBrowser, - (REFIID)&IID_ICommDlgBrowser, (LPVOID*) &This->pCommDlgBrowser))) - { - TRACE("-- CommDlgBrowser\n"); - } - - /*if our window class has not been registered, then do so*/ - if(!GetClassInfoW(shell32_hInstance, SV_CLASS_NAME, &wc)) - { - ZeroMemory(&wc, sizeof(wc)); - wc.style = 0; - wc.lpfnWndProc = ShellView_WndProc; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = shell32_hInstance; - wc.hIcon = 0; - wc.hCursor = LoadCursorW(0, (LPWSTR)IDC_ARROW); - wc.hbrBackground = (HBRUSH) (COLOR_BACKGROUND+1); - wc.lpszMenuName = NULL; - wc.lpszClassName = SV_CLASS_NAME; - - if(!RegisterClassW(&wc)) - return E_FAIL; - } - - *phWnd = CreateWindowExW(0, - SV_CLASS_NAME, - NULL, - WS_CHILD | WS_TABSTOP, - prcView->left, - prcView->top, - prcView->right - prcView->left, - prcView->bottom - prcView->top, - This->hWndParent, - 0, - shell32_hInstance, - (LPVOID)This); - - CheckToolbar(This); - - if(!*phWnd) return E_FAIL; - - SetWindowPos(*phWnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW); - UpdateWindow(*phWnd); - - return S_OK; -} - -static HRESULT WINAPI IShellView_fnDestroyViewWindow(IShellView * iface) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - - TRACE("(%p)\n",This); - - /*Make absolutely sure all our UI is cleaned up.*/ - IShellView_UIActivate((IShellView*)This, SVUIA_DEACTIVATE); - - if(This->hMenu) - { - DestroyMenu(This->hMenu); - } - - DestroyWindow(This->hWnd); - if(This->pShellBrowser) IShellBrowser_Release(This->pShellBrowser); - if(This->pCommDlgBrowser) ICommDlgBrowser_Release(This->pCommDlgBrowser); - - - return S_OK; -} - -static HRESULT WINAPI IShellView_fnGetCurrentInfo(IShellView * iface, LPFOLDERSETTINGS lpfs) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - - TRACE("(%p)->(%p) vmode=%x flags=%x\n",This, lpfs, - This->FolderSettings.ViewMode, This->FolderSettings.fFlags); - - if (!lpfs) return E_INVALIDARG; - - *lpfs = This->FolderSettings; - return NOERROR; -} - -static HRESULT WINAPI IShellView_fnAddPropertySheetPages(IShellView * iface, DWORD dwReserved,LPFNADDPROPSHEETPAGE lpfn, LPARAM lparam) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - - FIXME("(%p) stub\n",This); - - return E_NOTIMPL; -} - -static HRESULT WINAPI IShellView_fnSaveViewState(IShellView * iface) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - - FIXME("(%p) stub\n",This); - - return S_OK; -} - -static HRESULT WINAPI IShellView_fnSelectItem( - IShellView * iface, - LPCITEMIDLIST pidl, - UINT uFlags) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - int i; - - TRACE("(%p)->(pidl=%p, 0x%08x) stub\n",This, pidl, uFlags); - - i = LV_FindItemByPidl(This, pidl); - - if (i != -1) - { - LVITEMW lvItem; - - if(uFlags & SVSI_ENSUREVISIBLE) - SendMessageW(This->hWndList, LVM_ENSUREVISIBLE, i, 0); - - lvItem.mask = LVIF_STATE; - lvItem.stateMask = LVIS_SELECTED | LVIS_FOCUSED; - lvItem.iItem = 0; - lvItem.iSubItem = 0; - - while(SendMessageW(This->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(This->hWndList, LVM_SETITEMW, 0, (LPARAM) &lvItem); - lvItem.iItem++; - } - - - if(uFlags & SVSI_EDIT) - SendMessageW(This->hWndList, LVM_EDITLABELW, i, 0); - - } - return S_OK; -} - -static HRESULT WINAPI IShellView_fnGetItemObject(IShellView * iface, UINT uItem, REFIID riid, LPVOID *ppvOut) -{ - HRESULT hr = E_FAIL; - IShellViewImpl *This = (IShellViewImpl *)iface; - - TRACE("(%p)->(uItem=0x%08x,\n\tIID=%s, ppv=%p)\n",This, uItem, debugstr_guid(riid), ppvOut); - - *ppvOut = NULL; - - switch(uItem) - { - case SVGIO_BACKGROUND: - //*ppvOut = ISvBgCm_Constructor(This->pSFParent, FALSE); - CDefFolderMenu_Create2(NULL, NULL, This->cidl, (LPCITEMIDLIST*)This->apidl, This->pSFParent, NULL, 0, NULL, (IContextMenu**)ppvOut); - if (!ppvOut) hr = E_OUTOFMEMORY; - break; - - case SVGIO_SELECTION: - ShellView_GetSelections(This); - hr = IShellFolder_GetUIObjectOf(This->pSFParent, This->hWnd, This->cidl, (LPCITEMIDLIST*)This->apidl, riid, 0, ppvOut); - break; - } - TRACE("-- (%p)->(interface=%p)\n",This, *ppvOut); - - return hr; -} - -static const IShellViewVtbl svvt = -{ - IShellView_fnQueryInterface, - IShellView_fnAddRef, - IShellView_fnRelease, - IShellView_fnGetWindow, - IShellView_fnContextSensitiveHelp, - IShellView_fnTranslateAccelerator, - IShellView_fnEnableModeless, - IShellView_fnUIActivate, - IShellView_fnRefresh, - IShellView_fnCreateViewWindow, - IShellView_fnDestroyViewWindow, - IShellView_fnGetCurrentInfo, - IShellView_fnAddPropertySheetPages, - IShellView_fnSaveViewState, - IShellView_fnSelectItem, - IShellView_fnGetItemObject -}; - - -/********************************************************** - * ISVOleCmdTarget_QueryInterface (IUnknown) - */ -static HRESULT WINAPI ISVOleCmdTarget_QueryInterface( - IOleCommandTarget * iface, - REFIID iid, - LPVOID* ppvObj) -{ - IShellViewImpl *This = impl_from_IOleCommandTarget(iface); - - return IShellFolder_QueryInterface((IShellFolder*)This, iid, ppvObj); -} - -/********************************************************** - * ISVOleCmdTarget_AddRef (IUnknown) - */ -static ULONG WINAPI ISVOleCmdTarget_AddRef( - IOleCommandTarget * iface) -{ - IShellViewImpl *This = impl_from_IOleCommandTarget(iface); - - return IShellFolder_AddRef((IShellFolder*)This); -} - -/********************************************************** - * ISVOleCmdTarget_Release (IUnknown) - */ -static ULONG WINAPI ISVOleCmdTarget_Release( - IOleCommandTarget * iface) -{ - IShellViewImpl *This = impl_from_IOleCommandTarget(iface); - - return IShellFolder_Release((IShellFolder*)This); -} - -/********************************************************** - * ISVOleCmdTarget_QueryStatus (IOleCommandTarget) - */ -static HRESULT WINAPI ISVOleCmdTarget_QueryStatus( - IOleCommandTarget *iface, - const GUID* pguidCmdGroup, - ULONG cCmds, - OLECMD * prgCmds, - OLECMDTEXT* pCmdText) -{ - UINT i; - IShellViewImpl *This = impl_from_IOleCommandTarget(iface); - - 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 - */ -static HRESULT WINAPI ISVOleCmdTarget_Exec( - IOleCommandTarget *iface, - const GUID* pguidCmdGroup, - DWORD nCmdID, - DWORD nCmdexecopt, - VARIANT* pvaIn, - VARIANT* pvaOut) -{ - IShellViewImpl *This = impl_from_IOleCommandTarget(iface); - - 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; -} - -static const IOleCommandTargetVtbl ctvt = -{ - ISVOleCmdTarget_QueryInterface, - ISVOleCmdTarget_AddRef, - ISVOleCmdTarget_Release, - ISVOleCmdTarget_QueryStatus, - ISVOleCmdTarget_Exec -}; - -/********************************************************** - * ISVDropTarget implementation - */ - -static HRESULT WINAPI ISVDropTarget_QueryInterface( - IDropTarget *iface, - REFIID riid, - LPVOID *ppvObj) -{ - IShellViewImpl *This = impl_from_IDropTarget(iface); - - TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); - - return IShellFolder_QueryInterface((IShellFolder*)This, riid, ppvObj); -} - -static ULONG WINAPI ISVDropTarget_AddRef( IDropTarget *iface) -{ - IShellViewImpl *This = impl_from_IDropTarget(iface); - - TRACE("(%p)->(count=%u)\n",This,This->ref); - - return IShellFolder_AddRef((IShellFolder*)This); -} - -static ULONG WINAPI ISVDropTarget_Release( IDropTarget *iface) -{ - IShellViewImpl *This = impl_from_IDropTarget(iface); - - TRACE("(%p)->(count=%u)\n",This,This->ref); - - return IShellFolder_Release((IShellFolder*)This); -} - -/****************************************************************************** - * 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 - -static HRESULT drag_notify_subitem(IShellViewImpl *This, 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(This->hWndList, &htinfo.pt); - lResult = SendMessageW(This->hWndList, LVM_HITTEST, 0, (LPARAM)&htinfo); - - /* Send WM_*SCROLL messages every 250 ms during drag-scrolling */ - GetClientRect(This->hWndList, &clientRect); - if (htinfo.pt.x == This->ptLastMousePos.x && htinfo.pt.y == This->ptLastMousePos.y && - (htinfo.pt.x < SCROLLAREAWIDTH || htinfo.pt.x > clientRect.right - SCROLLAREAWIDTH || - htinfo.pt.y < SCROLLAREAWIDTH || htinfo.pt.y > clientRect.bottom - SCROLLAREAWIDTH )) - { - This->cScrollDelay = (This->cScrollDelay + 1) % 5; /* DragOver is called every 50 ms */ - if (This->cScrollDelay == 0) { /* Mouse did hover another 250 ms over the scroll-area */ - if (htinfo.pt.x < SCROLLAREAWIDTH) - SendMessageW(This->hWndList, WM_HSCROLL, SB_LINEUP, 0); - if (htinfo.pt.x > clientRect.right - SCROLLAREAWIDTH) - SendMessageW(This->hWndList, WM_HSCROLL, SB_LINEDOWN, 0); - if (htinfo.pt.y < SCROLLAREAWIDTH) - SendMessageW(This->hWndList, WM_VSCROLL, SB_LINEUP, 0); - if (htinfo.pt.y > clientRect.bottom - SCROLLAREAWIDTH) - SendMessageW(This->hWndList, WM_VSCROLL, SB_LINEDOWN, 0); - } - } else { - This->cScrollDelay = 0; /* Reset, if the cursor is not over the listview's scroll-area */ - } - This->ptLastMousePos = htinfo.pt; - - /* If we are still over the previous sub-item, notify it via DragOver and return. */ - if (This->pCurDropTarget && lResult == This->iDragOverItem) - return IDropTarget_DragOver(This->pCurDropTarget, grfKeyState, pt, pdwEffect); - - /* We've left the previous sub-item, notify it via DragLeave and Release it. */ - if (This->pCurDropTarget) { - IDropTarget_DragLeave(This->pCurDropTarget); - IDropTarget_Release(This->pCurDropTarget); - This->pCurDropTarget = NULL; - } - - This->iDragOverItem = lResult; - if (lResult == -1) { - /* We are not above one of the listview's subitems. Bind to the parent folder's - * DropTarget interface. */ - hr = IShellFolder_QueryInterface(This->pSFParent, &IID_IDropTarget, - (LPVOID*)&This->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(This->hWndList, LVM_GETITEMW, 0, (LPARAM) &lvItem); - - /* ... and bind pCurDropTarget to the IDropTarget interface of an UIObject of this object */ - hr = IShellFolder_GetUIObjectOf(This->pSFParent, This->hWndList, 1, - (LPCITEMIDLIST*)&lvItem.lParam, &IID_IDropTarget, NULL, (LPVOID*)&This->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 IDropTarget_DragEnter(This->pCurDropTarget, This->pCurDataObject, grfKeyState, pt, pdwEffect); -} - -static HRESULT WINAPI ISVDropTarget_DragEnter(IDropTarget *iface, IDataObject *pDataObject, - DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) -{ - IShellViewImpl *This = impl_from_IDropTarget(iface); - - /* Get a hold on the data object for later calls to DragEnter on the sub-folders */ - This->pCurDataObject = pDataObject; - IDataObject_AddRef(pDataObject); - - return drag_notify_subitem(This, grfKeyState, pt, pdwEffect); -} - -static HRESULT WINAPI ISVDropTarget_DragOver(IDropTarget *iface, DWORD grfKeyState, POINTL pt, - DWORD *pdwEffect) -{ - IShellViewImpl *This = impl_from_IDropTarget(iface); - return drag_notify_subitem(This, grfKeyState, pt, pdwEffect); -} - -static HRESULT WINAPI ISVDropTarget_DragLeave(IDropTarget *iface) { - IShellViewImpl *This = impl_from_IDropTarget(iface); - - if (This->pCurDropTarget) - { - IDropTarget_DragLeave(This->pCurDropTarget); - IDropTarget_Release(This->pCurDropTarget); - This->pCurDropTarget = NULL; - } - - if (This->pCurDataObject != NULL) - { - IDataObject_Release(This->pCurDataObject); - This->pCurDataObject = NULL; - } - - This->iDragOverItem = 0; - - return S_OK; -} - -static HRESULT WINAPI ISVDropTarget_Drop(IDropTarget *iface, IDataObject* pDataObject, - DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) -{ - IShellViewImpl *This = impl_from_IDropTarget(iface); - - if (This->pCurDropTarget) - { - IDropTarget_Drop(This->pCurDropTarget, pDataObject, grfKeyState, pt, pdwEffect); - IDropTarget_Release(This->pCurDropTarget); - This->pCurDropTarget = NULL; - } - - if (This->pCurDataObject != NULL) - { - IDataObject_Release(This->pCurDataObject); - This->pCurDataObject = NULL; - } - - This->iDragOverItem = 0; - - return S_OK; -} - -static const IDropTargetVtbl dtvt = -{ - ISVDropTarget_QueryInterface, - ISVDropTarget_AddRef, - ISVDropTarget_Release, - ISVDropTarget_DragEnter, - ISVDropTarget_DragOver, - ISVDropTarget_DragLeave, - ISVDropTarget_Drop -}; - -/********************************************************** - * ISVDropSource implementation - */ - -static HRESULT WINAPI ISVDropSource_QueryInterface( - IDropSource *iface, - REFIID riid, - LPVOID *ppvObj) -{ - IShellViewImpl *This = impl_from_IDropSource(iface); - - TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); - - return IShellFolder_QueryInterface((IShellFolder*)This, riid, ppvObj); -} - -static ULONG WINAPI ISVDropSource_AddRef( IDropSource *iface) -{ - IShellViewImpl *This = impl_from_IDropSource(iface); - - TRACE("(%p)->(count=%u)\n",This,This->ref); - - return IShellFolder_AddRef((IShellFolder*)This); -} - -static ULONG WINAPI ISVDropSource_Release( IDropSource *iface) -{ - IShellViewImpl *This = impl_from_IDropSource(iface); - - TRACE("(%p)->(count=%u)\n",This,This->ref); - - return IShellFolder_Release((IShellFolder*)This); -} -static HRESULT WINAPI ISVDropSource_QueryContinueDrag( - IDropSource *iface, - BOOL fEscapePressed, - DWORD grfKeyState) -{ - IShellViewImpl *This = impl_from_IDropSource(iface); - 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; -} - -static HRESULT WINAPI ISVDropSource_GiveFeedback( - IDropSource *iface, - DWORD dwEffect) -{ - IShellViewImpl *This = impl_from_IDropSource(iface); - TRACE("(%p)\n",This); - - return DRAGDROP_S_USEDEFAULTCURSORS; -} - -static const IDropSourceVtbl dsvt = -{ - ISVDropSource_QueryInterface, - ISVDropSource_AddRef, - ISVDropSource_Release, - ISVDropSource_QueryContinueDrag, - ISVDropSource_GiveFeedback -}; -/********************************************************** - * ISVViewObject implementation - */ - -static HRESULT WINAPI ISVViewObject_QueryInterface( - IViewObject *iface, - REFIID riid, - LPVOID *ppvObj) -{ - IShellViewImpl *This = impl_from_IViewObject(iface); - - TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); - - return IShellFolder_QueryInterface((IShellFolder*)This, riid, ppvObj); -} - -static ULONG WINAPI ISVViewObject_AddRef( IViewObject *iface) -{ - IShellViewImpl *This = impl_from_IViewObject(iface); - - TRACE("(%p)->(count=%u)\n",This,This->ref); - - return IShellFolder_AddRef((IShellFolder*)This); -} - -static ULONG WINAPI ISVViewObject_Release( IViewObject *iface) -{ - IShellViewImpl *This = impl_from_IViewObject(iface); - - TRACE("(%p)->(count=%u)\n",This,This->ref); - - return IShellFolder_Release((IShellFolder*)This); -} - -static HRESULT WINAPI ISVViewObject_Draw( - IViewObject *iface, - 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) -{ - - IShellViewImpl *This = impl_from_IViewObject(iface); - - FIXME("Stub: This=%p\n",This); - - return E_NOTIMPL; -} -static HRESULT WINAPI ISVViewObject_GetColorSet( - IViewObject *iface, - DWORD dwDrawAspect, - LONG lindex, - void *pvAspect, - DVTARGETDEVICE* ptd, - HDC hicTargetDevice, - LOGPALETTE** ppColorSet) -{ - - IShellViewImpl *This = impl_from_IViewObject(iface); - - FIXME("Stub: This=%p\n",This); - - return E_NOTIMPL; -} -static HRESULT WINAPI ISVViewObject_Freeze( - IViewObject *iface, - DWORD dwDrawAspect, - LONG lindex, - void* pvAspect, - DWORD* pdwFreeze) -{ - - IShellViewImpl *This = impl_from_IViewObject(iface); - - FIXME("Stub: This=%p\n",This); - - return E_NOTIMPL; -} -static HRESULT WINAPI ISVViewObject_Unfreeze( - IViewObject *iface, - DWORD dwFreeze) -{ - - IShellViewImpl *This = impl_from_IViewObject(iface); - - FIXME("Stub: This=%p\n",This); - - return E_NOTIMPL; -} -static HRESULT WINAPI ISVViewObject_SetAdvise( - IViewObject *iface, - DWORD aspects, - DWORD advf, - IAdviseSink* pAdvSink) -{ - - IShellViewImpl *This = impl_from_IViewObject(iface); - - 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 */ - This->pAdvSink = pAdvSink; - This->dwAspects = aspects; - This->dwAdvf = advf; - - return S_OK; -} - -static HRESULT WINAPI ISVViewObject_GetAdvise( - IViewObject *iface, - DWORD* pAspects, - DWORD* pAdvf, - IAdviseSink** ppAdvSink) -{ - - IShellViewImpl *This = impl_from_IViewObject(iface); - - TRACE("This=%p pAspects=%p pAdvf=%p ppAdvSink=%p\n", - This, pAspects, pAdvf, ppAdvSink); - - if( ppAdvSink ) - { - IAdviseSink_AddRef( This->pAdvSink ); - *ppAdvSink = This->pAdvSink; - } - if( pAspects ) - *pAspects = This->dwAspects; - if( pAdvf ) - *pAdvf = This->dwAdvf; - - return S_OK; -} - - -static const IViewObjectVtbl vovt = -{ - ISVViewObject_QueryInterface, - ISVViewObject_AddRef, - ISVViewObject_Release, - ISVViewObject_Draw, - ISVViewObject_GetColorSet, - ISVViewObject_Freeze, - ISVViewObject_Unfreeze, - ISVViewObject_SetAdvise, - ISVViewObject_GetAdvise -}; diff --git a/reactos/dll/win32/shell32/shpolicy.c b/reactos/dll/win32/shell32/shpolicy.c deleted file mode 100644 index 9678fb39cee..00000000000 --- a/reactos/dll/win32/shell32/shpolicy.c +++ /dev/null @@ -1,905 +0,0 @@ -/* - * 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 -{ - DWORD 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 - }, - { - 0x50000024, - strExplorer, - strNoFileURL, - SHELL_NO_POLICY - }, - { - 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/reactos/dll/win32/shell32/shv_def_cmenu.c b/reactos/dll/win32/shell32/shv_def_cmenu.c deleted file mode 100644 index 701a3caffb6..00000000000 --- a/reactos/dll/win32/shell32/shv_def_cmenu.c +++ /dev/null @@ -1,1783 +0,0 @@ -/* - * 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) - */ - -#include - -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; - - -typedef struct -{ - const IContextMenu2Vtbl *lpVtbl; - LONG ref; - 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 */ -}IDefaultContextMenuImpl, *LPIDefaultContextMenuImpl; - -static LPIDefaultContextMenuImpl __inline impl_from_IContextMenu( IContextMenu2 *iface ) -{ - return (LPIDefaultContextMenuImpl)((char*)iface - FIELD_OFFSET(IDefaultContextMenuImpl, lpVtbl)); -} - -VOID INewItem_SetCurrentShellFolder(IShellFolder * psfParent); // HACK -WCHAR *build_paths_list(LPCWSTR wszBasePath, int cidl, LPCITEMIDLIST *pidls); - -static -HRESULT -WINAPI -IDefaultContextMenu_fnQueryInterface( - IContextMenu2 *iface, - REFIID riid, - LPVOID *ppvObj) -{ - IDefaultContextMenuImpl *This = (IDefaultContextMenuImpl *)iface; - - TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); - - *ppvObj = NULL; - - if(IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IContextMenu) || - IsEqualIID(riid, &IID_IContextMenu2)) - { - *ppvObj = This; - } - - if(*ppvObj) - { - IUnknown_AddRef((IUnknown*)*ppvObj); - TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); - return S_OK; - } - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - - -static -ULONG -WINAPI -IDefaultContextMenu_fnAddRef( - IContextMenu2 *iface) -{ - IDefaultContextMenuImpl *This = (IDefaultContextMenuImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE("(%p)->(count=%u)\n", This, refCount - 1); - - return refCount; -} - -static -ULONG -WINAPI -IDefaultContextMenu_fnRelease( - IContextMenu2 *iface) -{ - PDynamicShellEntry dEntry, dNext; - PStaticShellEntry sEntry, sNext; - IDefaultContextMenuImpl *This = (IDefaultContextMenuImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE("(%p)->(count=%u)\n", This, refCount + 1); - if (!refCount) - { - /* free dynamic shell extension entries */ - dEntry = This->dhead; - while(dEntry) - { - dNext = dEntry->Next; - IContextMenu_Release(dEntry->CMenu); - HeapFree(GetProcessHeap(), 0, dEntry); - dEntry = dNext; - } - /* free static shell extension entries */ - sEntry = This->shead; - while(sEntry) - { - sNext = sEntry->Next; - HeapFree(GetProcessHeap(), 0, sEntry->szClass); - HeapFree(GetProcessHeap(), 0, sEntry->szVerb); - HeapFree(GetProcessHeap(), 0, sEntry); - sEntry = sNext; - } - HeapFree(GetProcessHeap(),0,This); - } - - return refCount; -} - -static -void -SH_AddStaticEntry(IDefaultContextMenuImpl * This, WCHAR *szVerb, WCHAR * szClass) -{ - PStaticShellEntry curEntry; - PStaticShellEntry lastEntry = NULL; - - curEntry = This->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 = HeapAlloc(GetProcessHeap(), 0, sizeof(StaticShellEntry)); - if (curEntry) - { - curEntry->Next = NULL; - curEntry->szVerb = HeapAlloc(GetProcessHeap(), 0, (wcslen(szVerb)+1) * sizeof(WCHAR)); - if (curEntry->szVerb) - wcscpy(curEntry->szVerb, szVerb); - curEntry->szClass = 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 = This->shead; - This->shead = curEntry; - return; - } - - - - if (lastEntry) - { - lastEntry->Next = curEntry; - } - else - { - This->shead = curEntry; - } -} - -static -void -SH_AddStaticEntryForKey(IDefaultContextMenuImpl * This, HKEY hKey, 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(This, szName, szClass); - } - dwIndex++; - }while(result == ERROR_SUCCESS); -} - -static -void -SH_AddStaticEntryForFileClass(IDefaultContextMenuImpl * This, 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(This, 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(This, 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[(sizeof(szShellAssoc)/sizeof(WCHAR))], &dwBuffer); - if (result == ERROR_SUCCESS) - { - Length = wcslen(&szBuffer[(sizeof(szShellAssoc)/sizeof(WCHAR))]) + (sizeof(szShellAssoc)/sizeof(WCHAR)); - wcscat(&szBuffer[(sizeof(szShellAssoc)/sizeof(WCHAR))], 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(This, 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(IDataObject_GetData(pda,&formatetc,&medium))) - { - ret = TRUE; - ReleaseStgMedium(&medium); - } - - IDataObject_Release(pda); - } - - 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 -IsShellExtensionAlreadyLoaded(IDefaultContextMenuImpl * This, const CLSID * szClass) -{ - PDynamicShellEntry curEntry = This->dhead; - - while(curEntry) - { - if (!memcmp(&curEntry->ClassID, szClass, sizeof(CLSID))) - return TRUE; - curEntry = curEntry->Next; - } - return FALSE; -} - - -static -HRESULT -SH_LoadDynamicContextMenuHandler(IDefaultContextMenuImpl * This, 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(This, 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 = IContextMenu_QueryInterface(cmobj, &IID_IShellExtInit, (void**)&shext); - if (hr != S_OK) - { - TRACE("Failed to query for interface IID_IShellExtInit\n"); - IContextMenu_Release(cmobj); - return FALSE; - } - hr = IShellExtInit_Initialize(shext, NULL, This->pDataObj, hKey); - IShellExtInit_Release(shext); - if (hr != S_OK) - { - TRACE("Failed to initialize shell extension error %x\n", hr); - IContextMenu_Release(cmobj); - return hr; - } - } - - curEntry = HeapAlloc(GetProcessHeap(), 0, sizeof(DynamicShellEntry)); - if(!curEntry) - { - IContextMenu_Release(cmobj); - return E_OUTOFMEMORY; - } - - curEntry->iIdCmdFirst = 0; - curEntry->Next = NULL; - curEntry->NumIds = 0; - curEntry->CMenu = cmobj; - memcpy(&curEntry->ClassID, szClass, sizeof(CLSID)); - - if (This->dhead) - { - PDynamicShellEntry pEntry = This->dhead; - - while(pEntry->Next) - { - pEntry = pEntry->Next; - } - - pEntry->Next = curEntry; - } - else - { - This->dhead = curEntry; - } - - - if (!memcmp(szClass, &CLSID_NewMenu, sizeof(CLSID))) - { - /* A REAL UGLY HACK */ - INewItem_SetCurrentShellFolder(This->dcm.psf); - } - - - return hr; -} - -static -UINT -EnumerateDynamicContextHandlerForKey(IDefaultContextMenuImpl *This, 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 (This->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(This, hKey, &clsid, TRUE); - } - } - else - { - SH_LoadDynamicContextMenuHandler(This, hKey, &clsid, TRUE); - } - } - } - dwIndex++; - }while(res == ERROR_SUCCESS); - - RegCloseKey(hKey); - return index; -} - - -static -UINT -InsertMenuItemsOfDynamicContextMenuExtension(IDefaultContextMenuImpl * This, HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast) -{ - PDynamicShellEntry curEntry; - HRESULT hResult; - - if (!This->dhead) - { - This->iIdSHEFirst = 0; - This->iIdSHELast = 0; - return indexMenu; - } - - curEntry = This->dhead; - idCmdFirst = 0x5000; - idCmdLast = 0x6000; - This->iIdSHEFirst = idCmdFirst; - do - { - hResult = IContextMenu_QueryContextMenu(curEntry->CMenu, 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); - - This->iIdSHELast = idCmdFirst; - TRACE("SH_LoadContextMenuHandlers first %x last %x\n", This->iIdSHEFirst, This->iIdSHELast); - return indexMenu; -} - -UINT -BuildBackgroundContextMenu( - IDefaultContextMenuImpl * This, - 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(This->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(This, 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(This, hKey, &CLSID_NewMenu, TRUE); - RegCloseKey(hKey); - } - - if (InsertMenuItemsOfDynamicContextMenuExtension(This, 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; -} - -static -UINT -AddStaticContextMenusToMenu( - HMENU hMenu, - UINT indexMenu, - IDefaultContextMenuImpl * This) -{ - 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; - This->iIdSCMFirst = mii.wID; - - curEntry = This->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 - 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; - } - This->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 -BuildShellItemContextMenu( - IDefaultContextMenuImpl * This, - 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 (IShellFolder2_GetDisplayNameOf(This->dcm.psf, This->dcm.apidl[0], SHGDN_FORPARSING, &strFile) == S_OK) - { - if (StrRetToBufW(&strFile, This->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(This, pOffset); - /* load dynamic extensions from file extension key */ - EnumerateDynamicContextHandlerForKey(This, 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(This, szTemp); - /* load dynamic extensions from progid key */ - EnumerateDynamicContextHandlerForKey(This, hKey); - RegCloseKey(hKey); - } - } - } - if (RegOpenKeyExW(HKEY_CLASSES_ROOT, L"*", 0, KEY_READ, &hKey) == ERROR_SUCCESS) - { - /* load default extensions */ - EnumerateDynamicContextHandlerForKey(This, hKey); - RegCloseKey(hKey); - } - } - } - - guid = _ILGetGUIDPointer(This->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(This, hKey); - SH_AddStaticEntryForFileClass(This, buffer); - RegCloseKey(hKey); - } - CoTaskMemFree(pwszCLSID); - } - } - - - if (_ILIsDrive(This->dcm.apidl[0])) - { - SH_AddStaticEntryForFileClass(This, L"Drive"); - if (RegOpenKeyExW(HKEY_CLASSES_ROOT, L"Drive", 0, KEY_READ, &hKey) == ERROR_SUCCESS) - { - EnumerateDynamicContextHandlerForKey(This, 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 = IShellFolder_GetAttributesOf(This->dcm.psf, This->dcm.cidl, This->dcm.apidl, &rfg); - if (!SUCCEEDED(hr)) - rfg = 0; - - if (rfg & SFGAO_FOLDER) - { - /* add the default verbs open / explore */ - SH_AddStaticEntryForFileClass(This, L"Folder"); - SH_AddStaticEntryForFileClass(This, L"Directory"); - if (RegOpenKeyExW(HKEY_CLASSES_ROOT, L"Folder", 0, KEY_READ, &hKey) == ERROR_SUCCESS) - { - EnumerateDynamicContextHandlerForKey(This, hKey); - RegCloseKey(hKey); - } - if (RegOpenKeyExW(HKEY_CLASSES_ROOT, L"Directory", 0, KEY_READ, &hKey) == ERROR_SUCCESS) - { - EnumerateDynamicContextHandlerForKey(This, 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(This, hKey); - RegCloseKey(hKey); - } - } - - /* add static context menu handlers */ - indexMenu = AddStaticContextMenusToMenu(hMenu, 0, This); - /* now process dynamic context menu handlers */ - indexMenu = InsertMenuItemsOfDynamicContextMenuExtension(This, hMenu, indexMenu, iIdCmdFirst, iIdCmdLast); - TRACE("indexMenu %d\n", indexMenu); - - if (_ILIsDrive(This->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; -} - -static -HRESULT -WINAPI -IDefaultContextMenu_fnQueryContextMenu( - IContextMenu2 *iface, - HMENU hmenu, - UINT indexMenu, - UINT idCmdFirst, - UINT idCmdLast, - UINT uFlags) -{ - IDefaultContextMenuImpl * This = impl_from_IContextMenu(iface); - if (This->dcm.cidl) - { - idCmdFirst = BuildShellItemContextMenu(This, hmenu, idCmdFirst, idCmdLast, uFlags); - } - else - { - idCmdFirst = BuildBackgroundContextMenu(This, 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(IShellBrowser_QueryActiveShellView(lpSB, &lpSV))) - { - IShellView_GetWindow(lpSV, &hwndSV); - } - } - - if (LOWORD(lpcmi->lpVerb) == FCIDM_SHVIEW_REFRESH || bRefresh) - { - if (lpSV) - IShellView_Refresh(lpSV); - - return S_OK; - } - - SendMessageW(hwndSV, WM_COMMAND, MAKEWPARAM(LOWORD(lpcmi->lpVerb), 0), 0); - - return S_OK; -} - -static -HRESULT -DoPaste( - IDefaultContextMenuImpl *This, - 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 = IDataObject_GetData(pda,&formatetc,&medium); - - if (FAILED(hr)) - { - IDataObject_Release(pda); - return E_FAIL; - } - - /* lock the handle */ - lpcida = GlobalLock(medium.u.hGlobal); - if (!lpcida) - { - ReleaseStgMedium(&medium); - IDataObject_Release(pda); - 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); - IDataObject_Release(pda); - return E_FAIL; - } - - if (_ILIsDesktop(pidl)) - { - /* use desktop shellfolder */ - psfFrom = psfDesktop; - } - else if (FAILED(IShellFolder_BindToObject(psfDesktop, pidl, NULL, &IID_IShellFolder, (LPVOID*)&psfFrom))) - { - ERR("no IShellFolder\n"); - - IShellFolder_Release(psfDesktop); - SHFree(pidl); - _ILFreeaPidl(apidl, lpcida->cidl); - ReleaseStgMedium(&medium); - IDataObject_Release(pda); - - return E_FAIL; - } - - if (This->dcm.cidl) - { - IShellFolder_Release(psfDesktop); - hr = IShellFolder_BindToObject(This->dcm.psf, This->dcm.apidl[0], NULL, &IID_IShellFolder, (LPVOID*)&psfTarget); - } - else - { - IPersistFolder2 *ppf2 = NULL; - LPITEMIDLIST pidl; - - /* cidl is zero due to explorer view */ - hr = IShellFolder_QueryInterface (This->dcm.psf, &IID_IPersistFolder2, (LPVOID *) &ppf2); - if (SUCCEEDED(hr)) - { - hr = IPersistFolder2_GetCurFolder (ppf2, &pidl); - IPersistFolder2_Release(ppf2); - if (SUCCEEDED(hr)) - { - if (_ILIsDesktop(pidl)) - { - /* use desktop shellfolder */ - psfTarget = psfDesktop; - } - else - { - /* retrieve target desktop folder */ - hr = IShellFolder_BindToObject(psfDesktop, 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"); - - IShellFolder_Release(psfFrom); - SHFree(pidl); - _ILFreeaPidl(apidl, lpcida->cidl); - ReleaseStgMedium(&medium); - IDataObject_Release(pda); - - return E_FAIL; - } - - - /* get source and destination shellfolder */ - if (FAILED(IShellFolder_QueryInterface(psfTarget, &IID_ISFHelper, (LPVOID*)&psfhlpdst))) - { - ERR("no IID_ISFHelper for destination\n"); - - IShellFolder_Release(psfFrom); - IShellFolder_Release(psfTarget); - SHFree(pidl); - _ILFreeaPidl(apidl, lpcida->cidl); - ReleaseStgMedium(&medium); - IDataObject_Release(pda); - - return E_FAIL; - } - - if (FAILED(IShellFolder_QueryInterface(psfFrom, &IID_ISFHelper, (LPVOID*)&psfhlpsrc))) - { - ERR("no IID_ISFHelper for source\n"); - - ISFHelper_Release(psfhlpdst); - IShellFolder_Release(psfFrom); - IShellFolder_Release(psfTarget); - SHFree(pidl); - _ILFreeaPidl(apidl, lpcida->cidl); - ReleaseStgMedium(&medium); - IDataObject_Release(pda); - return E_FAIL; - } - - /* FIXXME - * do we want to perform a copy or move ??? - */ - hr = ISFHelper_CopyItems(psfhlpdst, psfFrom, lpcida->cidl, (LPCITEMIDLIST*)apidl); - - ISFHelper_Release(psfhlpdst); - ISFHelper_Release(psfhlpsrc); - IShellFolder_Release(psfFrom); - IShellFolder_Release(psfTarget); - SHFree(pidl); - _ILFreeaPidl(apidl, lpcida->cidl); - ReleaseStgMedium(&medium); - IDataObject_Release(pda); - TRACE("CP result %x\n",hr); - return S_OK; -} - -static -HRESULT -DoOpenOrExplore( - IDefaultContextMenuImpl *iface, - 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; - -} - -static -HRESULT -DoCreateLink( - IDefaultContextMenuImpl *This, - 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 (IShellFolder2_GetDisplayNameOf(This->dcm.psf, This->dcm.apidl[0], SHGDN_FORPARSING, &strFile) != S_OK) - { - ERR("IShellFolder_GetDisplayNameOf failed for apidl\n"); - return E_FAIL; - } - - if (StrRetToBufW(&strFile, This->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, This->dcm.apidl[0], (LPVOID*)&ipf); - if (hr != S_OK) - { - return hr; - } - hr = IPersistFile_Save(ipf, szTarget, FALSE); - IPersistFile_Release(ipf); - NotifyShellViewWindow(lpcmi, TRUE); - return hr; - } - else - { - if (!GetUniqueFileName(szPath, szLnk, szTarget, TRUE)) - return E_FAIL; - - hr = IShellLink_Constructor(NULL, &IID_IShellLinkW, (LPVOID*)&nLink); - if (hr != S_OK) - { - return E_FAIL; - } - - GetFullPathName(szPath, MAX_PATH, szDirPath, &pszFile); - if (pszFile) pszFile[0] = 0; - - if (SUCCEEDED(IShellLinkW_SetPath(nLink, szPath)) && - SUCCEEDED(IShellLinkW_SetWorkingDirectory(nLink, szDirPath))) - { - if (SUCCEEDED(IShellLinkW_QueryInterface(nLink, &IID_IPersistFile, (LPVOID*)&ipf))) - { - hr = IPersistFile_Save(ipf, szTarget, TRUE); - IPersistFile_Release(ipf); - } - } - IShellLinkW_Release(nLink); - NotifyShellViewWindow(lpcmi, TRUE); - return hr; - } -} - -static -HRESULT -DoDelete( - IDefaultContextMenuImpl *This, - LPCMINVOKECOMMANDINFO lpcmi) -{ - HRESULT hr; - STRRET strTemp; - WCHAR szPath[MAX_PATH]; - LPWSTR wszPath, wszPos; - SHFILEOPSTRUCTW op; - int ret; - LPSHELLBROWSER lpSB; - HWND hwnd; - - hr = IShellFolder2_GetDisplayNameOf(This->dcm.psf, This->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, This->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, This->dcm.cidl, This->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(IShellBrowser_GetControlWindow(lpSB, 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; - -} - -static -HRESULT -DoCopyOrCut( - IDefaultContextMenuImpl *iface, - LPCMINVOKECOMMANDINFO lpcmi, - BOOL bCopy) -{ - LPSHELLBROWSER lpSB; - LPSHELLVIEW lpSV; - LPDATAOBJECT pDataObj; - HRESULT hr; - - if (SUCCEEDED(SHCreateDataObject(iface->dcm.pidlFolder, iface->dcm.cidl, iface->dcm.apidl, NULL, &IID_IDataObject, (void**)&pDataObj))) - { - hr = OleSetClipboard(pDataObj); - IDataObject_Release(pDataObj); - return hr; - } - - lpSB = (LPSHELLBROWSER)SendMessageA(lpcmi->hwnd, CWM_GETISHELLBROWSER,0,0); - if (!lpSB) - { - TRACE("failed to get shellbrowser\n"); - return E_FAIL; - } - - hr = IShellBrowser_QueryActiveShellView(lpSB, &lpSV); - if (FAILED(hr)) - { - TRACE("failed to query the active shellview\n"); - return hr; - } - - hr = IShellView_GetItemObject(lpSV, 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"); - } - IDataObject_Release(pDataObj); - IShellView_Release(lpSV); - return S_OK; -} - -static -HRESULT -DoRename( - IDefaultContextMenuImpl *This, - 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(IShellBrowser_GetControlWindow(lpSB, FCW_TREE, &hwnd))) - { - HTREEITEM hItem = TreeView_GetSelection(hwnd); - if (hItem) - { - (void)TreeView_EditLabel(hwnd, hItem); - } - } - - if(SUCCEEDED(IShellBrowser_QueryActiveShellView(lpSB, &lpSV))) - { - IShellView_SelectItem(lpSV, This->dcm.apidl[0], - SVSI_DESELECTOTHERS|SVSI_EDIT|SVSI_ENSUREVISIBLE|SVSI_FOCUSED|SVSI_SELECT); - IShellView_Release(lpSV); - return S_OK; - } - } - return E_FAIL; -} - -static -HRESULT -DoProperties( - IDefaultContextMenuImpl *This, - LPCMINVOKECOMMANDINFO lpcmi) -{ - WCHAR szDrive[MAX_PATH]; - STRRET strFile; - - if (This->dcm.cidl &&_ILIsMyComputer(This->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 (This->dcm.cidl == 0 && _ILIsDesktop(This->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(This->dcm.apidl[0])) - { - ILGetDisplayName(This->dcm.apidl[0], szDrive); - SH_ShowDriveProperties(szDrive, This->dcm.pidlFolder, This->dcm.apidl); - return S_OK; - } - else if (_ILIsNetHood(This->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(This->dcm.apidl[0])) - { - /* FIXME - * detect the drive path of bitbucket if appropiate - */ - - SH_ShowRecycleBinProperties(L'C'); - return S_OK; - } - - if (This->dcm.cidl > 1) - WARN("SHMultiFileProperties is not yet implemented\n"); - - if (IShellFolder2_GetDisplayNameOf(This->dcm.psf, This->dcm.apidl[0], SHGDN_FORPARSING, &strFile) != S_OK) - { - ERR("IShellFolder_GetDisplayNameOf failed for apidl\n"); - return E_FAIL; - } - - if (StrRetToBufW(&strFile, This->dcm.apidl[0], szDrive, MAX_PATH) != S_OK) - return E_FAIL; - - return SH_ShowPropertiesDialog(szDrive, This->dcm.pidlFolder, This->dcm.apidl); -} - -static -HRESULT -DoFormat( - IDefaultContextMenuImpl *This, - LPCMINVOKECOMMANDINFO lpcmi) -{ - char sDrive[5] = {0}; - - if (!_ILGetDrive(This->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; -} - -static -HRESULT -DoDynamicShellExtensions( - IDefaultContextMenuImpl *This, - LPCMINVOKECOMMANDINFO lpcmi) -{ - UINT verb = LOWORD(lpcmi->lpVerb); - PDynamicShellEntry pCurrent = This->dhead; - - TRACE("verb %p first %x last %x", lpcmi->lpVerb, This->iIdSHEFirst, This->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 IContextMenu_InvokeCommand(pCurrent->CMenu, lpcmi); - } - - return E_FAIL; -} - - -static -HRESULT -DoStaticShellExtensions( - IDefaultContextMenuImpl *This, - LPCMINVOKECOMMANDINFO lpcmi) -{ - STRRET strFile; - WCHAR szPath[MAX_PATH]; - WCHAR szDir[MAX_PATH]; - SHELLEXECUTEINFOW sei; - PStaticShellEntry pCurrent = This->shead; - int verb = LOWORD(lpcmi->lpVerb) - This->iIdSCMFirst; - - - while(pCurrent && verb-- > 0) - pCurrent = pCurrent->Next; - - if (verb > 0) - return E_FAIL; - - - if (IShellFolder2_GetDisplayNameOf(This->dcm.psf, This->dcm.apidl[0], SHGDN_FORPARSING, &strFile) != S_OK) - { - ERR("IShellFolder_GetDisplayNameOf failed for apidl\n"); - return E_FAIL; - } - - if (StrRetToBufW(&strFile, This->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; - -} - -static -HRESULT -WINAPI -IDefaultContextMenu_fnInvokeCommand( - IContextMenu2 *iface, - LPCMINVOKECOMMANDINFO lpcmi) -{ - IDefaultContextMenuImpl * This = impl_from_IContextMenu(iface); - - 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(This, lpcmi); - case FCIDM_SHVIEW_OPEN: - case FCIDM_SHVIEW_EXPLORE: - return DoOpenOrExplore(This, lpcmi); - case FCIDM_SHVIEW_COPY: - case FCIDM_SHVIEW_CUT: - return DoCopyOrCut(This, lpcmi, LOWORD(lpcmi->lpVerb) == FCIDM_SHVIEW_COPY); - case FCIDM_SHVIEW_CREATELINK: - return DoCreateLink(This, lpcmi); - case FCIDM_SHVIEW_DELETE: - return DoDelete(This, lpcmi); - case FCIDM_SHVIEW_RENAME: - return DoRename(This, lpcmi); - case FCIDM_SHVIEW_PROPERTIES: - return DoProperties(This, lpcmi); - case 0x7ABC: - return DoFormat(This, lpcmi); - } - - if (This->iIdSHEFirst && This->iIdSHELast) - { - if (LOWORD(lpcmi->lpVerb) >= This->iIdSHEFirst && LOWORD(lpcmi->lpVerb) <= This->iIdSHELast) - { - return DoDynamicShellExtensions(This, lpcmi); - } - } - - if (This->iIdSCMFirst && This->iIdSCMLast) - { - if (LOWORD(lpcmi->lpVerb) >= This->iIdSCMFirst && LOWORD(lpcmi->lpVerb) <= This->iIdSCMLast) - { - return DoStaticShellExtensions(This, lpcmi); - } - } - - FIXME("Unhandled Verb %xl\n",LOWORD(lpcmi->lpVerb)); - return E_UNEXPECTED; -} - -static -HRESULT -WINAPI -IDefaultContextMenu_fnGetCommandString( - IContextMenu2 *iface, - UINT_PTR idCommand, - UINT uFlags, - UINT* lpReserved, - LPSTR lpszName, - UINT uMaxNameLen) -{ - - return S_OK; -} - -static -HRESULT -WINAPI -IDefaultContextMenu_fnHandleMenuMsg( - IContextMenu2 *iface, - UINT uMsg, - WPARAM wParam, - LPARAM lParam) -{ - - return S_OK; -} - -static const IContextMenu2Vtbl cmvt = -{ - IDefaultContextMenu_fnQueryInterface, - IDefaultContextMenu_fnAddRef, - IDefaultContextMenu_fnRelease, - IDefaultContextMenu_fnQueryContextMenu, - IDefaultContextMenu_fnInvokeCommand, - IDefaultContextMenu_fnGetCommandString, - IDefaultContextMenu_fnHandleMenuMsg -}; -static -HRESULT -IDefaultContextMenu_Constructor( - const DEFCONTEXTMENU *pdcm, - REFIID riid, - void **ppv) -{ - IDefaultContextMenuImpl * This; - HRESULT hr = E_FAIL; - IDataObject * pDataObj; - - This = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDefaultContextMenuImpl)); - if (This) - { - This->lpVtbl = &cmvt; - This->ref = 1; - TRACE("cidl %u\n", This->dcm.cidl); - if (SUCCEEDED(SHCreateDataObject(pdcm->pidlFolder, pdcm->cidl, pdcm->apidl, NULL, &IID_IDataObject, (void**)&pDataObj))) - { - This->pDataObj = pDataObj; - } - CopyMemory(&This->dcm, pdcm, sizeof(DEFCONTEXTMENU)); - hr = IDefaultContextMenu_fnQueryInterface((IContextMenu2*)This, riid, ppv); - if (SUCCEEDED(hr)) - IContextMenu_Release((IContextMenu2*)This); - } - - TRACE("This(%p)(%x) cidl %u\n",This, hr, This->dcm.cidl); - return hr; -} - -/************************************************************************* - * 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/reactos/dll/win32/shell32/shv_item_new.c b/reactos/dll/win32/shell32/shv_item_new.c deleted file mode 100644 index 228efd27316..00000000000 --- a/reactos/dll/win32/shell32/shv_item_new.c +++ /dev/null @@ -1,847 +0,0 @@ -/* - * PROJECT: shell32 - * LICENSE: GPL - See COPYING in the top level directory - * FILE: dll/win32/shell32/shv_item_new.c - * PURPOSE: provides new shell item service - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) - */ - -#include - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -typedef enum -{ - SHELLNEW_TYPE_COMMAND = 1, - SHELLNEW_TYPE_DATA = 2, - SHELLNEW_TYPE_FILENAME = 4, - SHELLNEW_TYPE_NULLFILE = 8 -}SHELLNEW_TYPE; - - -typedef struct __SHELLNEW_ITEM__ -{ - SHELLNEW_TYPE Type; - LPWSTR szExt; - LPWSTR szTarget; - LPWSTR szDesc; - LPWSTR szIcon; - struct __SHELLNEW_ITEM__ * Next; -}SHELLNEW_ITEM, *PSHELLNEW_ITEM; - -typedef struct -{ - const IContextMenu2Vtbl *lpVtblContextMenu; - const IShellExtInitVtbl *lpvtblShellExtInit; - LPWSTR szPath; - IShellFolder *pSFParent; - PSHELLNEW_ITEM s_SnHead; -}INewMenuImpl, *LPINewMenuImpl; - -//static const IContextMenu2Vtbl cmvt; -//static const IShellExtInitVtbl sei; -static WCHAR szNew[MAX_PATH]; - - -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; -} - - -PSHELLNEW_ITEM 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; - PSHELLNEW_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) - { - long type = -1; - 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 != -1) - { - pNewItem = 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 -LoadShellNewItems(INewMenuImpl * This) -{ - DWORD dwIndex; - WCHAR szName[MAX_PATH]; - LONG result; - PSHELLNEW_ITEM pNewItem; - PSHELLNEW_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 (This->s_SnHead) - { - pNewItem->Next = This->s_SnHead; - This->s_SnHead = pNewItem; - } - else - { - This->s_SnHead = pCurItem = pNewItem; - } - } - else - { - if (pCurItem) - { - pCurItem->Next = pNewItem; - pCurItem = pNewItem; - } - else - { - pCurItem = This->s_SnHead = pNewItem; - } - } - } - } - dwIndex++; - }while(result != ERROR_NO_MORE_ITEMS); - - if (This->s_SnHead == NULL) - return FALSE; - else - return TRUE; -} - -UINT -InsertShellNewItems(HMENU hMenu, UINT idFirst, UINT idMenu, INewMenuImpl * This) -{ - MENUITEMINFOW mii; - PSHELLNEW_ITEM pCurItem; - UINT i; - WCHAR szBuffer[MAX_PATH]; - - if (This->s_SnHead == NULL) - { - if (!LoadShellNewItems(This)) - 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 = This->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 -DoShellNewCmd(INewMenuImpl * This, LPCMINVOKECOMMANDINFO lpcmi) -{ - PSHELLNEW_ITEM pCurItem = This->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; - - 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 (IShellFolder2_QueryInterface(This->pSFParent, &IID_IPersistFolder2, (LPVOID*)&psf) != S_OK) - { - ERR("Failed to get interface IID_IPersistFolder2\n"); - return E_FAIL; - } - if (IPersistFolder2_GetCurFolder(psf, &pidl) != S_OK) - { - ERR("IPersistFolder2_GetCurFolder failed\n"); - return E_FAIL; - } - - if (IShellFolder2_GetDisplayNameOf(This->pSFParent, 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; - } - } - return S_OK; -} -/************************************************************************** -* DoMeasureItem -*/ -HRESULT -DoMeasureItem(INewMenuImpl *This, HWND hWnd, MEASUREITEMSTRUCT * lpmis) -{ - PSHELLNEW_ITEM pCurItem; - PSHELLNEW_ITEM pItem; - UINT i; - HDC hDC; - SIZE size; - - TRACE("DoMeasureItem entered with id %x\n", lpmis->itemID); - - pCurItem = This->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 -DoDrawItem(INewMenuImpl *This, HWND hWnd, DRAWITEMSTRUCT * drawItem) -{ - PSHELLNEW_ITEM pCurItem; - PSHELLNEW_ITEM pItem; - UINT i; - pCurItem = This->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 -*/ -static void DoNewFolder( - INewMenuImpl *This, - IShellView *psv) -{ - ISFHelper * psfhlp; - WCHAR wszName[MAX_PATH]; - - IShellFolder_QueryInterface(This->pSFParent, &IID_ISFHelper, (LPVOID*)&psfhlp); - if (psfhlp) - { - LPITEMIDLIST pidl; - - if (ISFHelper_GetUniqueName(psfhlp, wszName, MAX_PATH) != S_OK) - return; - if (ISFHelper_AddFolder(psfhlp, 0, wszName, &pidl) != S_OK) - return; - - if(psv) - { - IShellView_Refresh(psv); - /* if we are in a shellview do labeledit */ - IShellView_SelectItem(psv, - pidl,(SVSI_DESELECTOTHERS | SVSI_EDIT | SVSI_ENSUREVISIBLE - |SVSI_FOCUSED|SVSI_SELECT)); - IShellView_Refresh(psv); - } - SHFree(pidl); - - ISFHelper_Release(psfhlp); - } -} - - -static LPINewMenuImpl __inline impl_from_IShellExtInit( IShellExtInit *iface ) -{ - return (INewMenuImpl *)((char*)iface - FIELD_OFFSET(INewMenuImpl, lpvtblShellExtInit)); -} - -static LPINewMenuImpl __inline impl_from_IContextMenu( IContextMenu2 *iface ) -{ - return (INewMenuImpl *)((char*)iface - FIELD_OFFSET(INewMenuImpl, lpVtblContextMenu)); -} - -static HRESULT WINAPI INewItem_fnQueryInterface(INewMenuImpl * This, REFIID riid, LPVOID *ppvObj) -{ - TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); - - *ppvObj = NULL; - - if(IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IContextMenu) || - IsEqualIID(riid, &IID_IContextMenu2)) - { - *ppvObj = (void *)&This->lpVtblContextMenu; - } - else if(IsEqualIID(riid, &IID_IShellExtInit)) - { - *ppvObj = (void *)&This->lpvtblShellExtInit; - } - - - if(*ppvObj) - { - IUnknown_AddRef((IUnknown*)*ppvObj); - TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); - return S_OK; - } - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI INewItem_fnAddRef(INewMenuImpl *iface) -{ - /* INewItem service is singleton */ - return 2; -} - -static ULONG WINAPI INewItem_fnRelease(INewMenuImpl *This) -{ - /* INewItem service is singleton */ - return 1; -} - -static -HRESULT -WINAPI -INewItem_IContextMenu_fnQueryInterface( IContextMenu2* iface, REFIID riid, void** ppvObject ) -{ - INewMenuImpl *This = impl_from_IContextMenu(iface); - return INewItem_fnQueryInterface(This, riid, ppvObject); -} - -static -ULONG -WINAPI -INewItem_IContextMenu_fnAddRef(IContextMenu2 *iface) -{ - INewMenuImpl *This = impl_from_IContextMenu(iface); - return INewItem_fnAddRef(This); -} - -static -ULONG -WINAPI -INewItem_IContextMenu_fnRelease(IContextMenu2 *iface) -{ - INewMenuImpl *This = impl_from_IContextMenu(iface); - return INewItem_fnRelease(This); -} - -static -HRESULT -WINAPI -INewItem_IContextMenu_fnQueryContextMenu(IContextMenu2 *iface, - HMENU hmenu, - UINT indexMenu, - UINT idCmdFirst, - UINT idCmdLast, - UINT uFlags) -{ - WCHAR szBuffer[200]; - MENUITEMINFOW mii; - HMENU hSubMenu; - int id = 1; - INewMenuImpl *This = impl_from_IContextMenu(iface); - - 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, This); - mii.fMask |= MIIM_SUBMENU; - mii.hSubMenu = hSubMenu; - } - - - if (!InsertMenuItemW( hmenu, indexMenu, TRUE, &mii )) - return E_FAIL; - - return MAKE_HRESULT( SEVERITY_SUCCESS, 0, id ); -} - -static -HRESULT -WINAPI -INewItem_IContextMenu_fnInvokeCommand( IContextMenu2* iface, - LPCMINVOKECOMMANDINFO lpici ) -{ - LPSHELLBROWSER lpSB; - LPSHELLVIEW lpSV = NULL; - HRESULT hr; - INewMenuImpl *This = impl_from_IContextMenu(iface); - - if((lpSB = (LPSHELLBROWSER)SendMessageA(lpici->hwnd, CWM_GETISHELLBROWSER,0,0))) - { - IShellBrowser_QueryActiveShellView(lpSB, &lpSV); - } - - if (LOWORD(lpici->lpVerb) == 0) - { - DoNewFolder(This, lpSV); - return S_OK; - } - - hr = DoShellNewCmd(This, lpici); - if (SUCCEEDED(hr) && lpSV) - { - IShellView_Refresh(lpSV); - } - - TRACE("INewItem_IContextMenu_fnInvokeCommand %x\n", hr); - return hr; -} - -static -HRESULT -WINAPI -INewItem_IContextMenu_fnGetCommandString( IContextMenu2* iface, - UINT_PTR idCmd, - UINT uType, - UINT* pwReserved, - LPSTR pszName, - UINT cchMax ) -{ - INewMenuImpl *This = impl_from_IContextMenu(iface); - - FIXME("%p %lu %u %p %p %u\n", This, - idCmd, uType, pwReserved, pszName, cchMax ); - - return E_NOTIMPL; -} - -static -HRESULT -WINAPI -INewItem_IContextMenu_fnHandleMenuMsg(IContextMenu2 *iface, - UINT uMsg, - WPARAM wParam, - LPARAM lParam) -{ - INewMenuImpl *This = impl_from_IContextMenu(iface); - 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(This, (HWND)wParam, lpmis); - break; - case WM_DRAWITEM: - return DoDrawItem(This, (HWND)wParam, lpids); - break; - } - return S_OK; - - return E_UNEXPECTED; -} - -static const IContextMenu2Vtbl cmvt = -{ - INewItem_IContextMenu_fnQueryInterface, - INewItem_IContextMenu_fnAddRef, - INewItem_IContextMenu_fnRelease, - INewItem_IContextMenu_fnQueryContextMenu, - INewItem_IContextMenu_fnInvokeCommand, - INewItem_IContextMenu_fnGetCommandString, - INewItem_IContextMenu_fnHandleMenuMsg -}; - -static HRESULT WINAPI -INewItem_ExtInit_fnQueryInterface( IShellExtInit* iface, REFIID riid, void** ppvObject ) -{ - return INewItem_fnQueryInterface(impl_from_IShellExtInit(iface), riid, ppvObject); -} - -static ULONG WINAPI -INewItem_ExtInit_AddRef( IShellExtInit* iface ) -{ - return INewItem_fnAddRef(impl_from_IShellExtInit(iface)); -} - -static ULONG WINAPI -INewItem_ExtInit_Release( IShellExtInit* iface ) -{ - return INewItem_fnRelease(impl_from_IShellExtInit(iface)); -} - -static HRESULT WINAPI -INewItem_ExtInit_Initialize( IShellExtInit* iface, LPCITEMIDLIST pidlFolder, - IDataObject *pdtobj, HKEY hkeyProgID ) -{ - - return S_OK; -} - -static const IShellExtInitVtbl sei = -{ - INewItem_ExtInit_fnQueryInterface, - INewItem_ExtInit_AddRef, - INewItem_ExtInit_Release, - INewItem_ExtInit_Initialize -}; -static INewMenuImpl *cached_ow = NULL; - -VOID -INewItem_SetCurrentShellFolder(IShellFolder * psfParent) -{ - if (cached_ow) - cached_ow->pSFParent = psfParent; -} - -HRESULT WINAPI INewItem_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv) -{ - INewMenuImpl * ow; - HRESULT res; - - if (!cached_ow) - { - ow = LocalAlloc(LMEM_ZEROINIT, sizeof(INewMenuImpl)); - if (!ow) - { - return E_OUTOFMEMORY; - } - - ow->lpVtblContextMenu = &cmvt; - ow->lpvtblShellExtInit = &sei; - ow->s_SnHead = NULL; - ow->szPath = NULL; - - if (InterlockedCompareExchangePointer((void *)&cached_ow, ow, NULL) != NULL) - { - /* some other thread already been here */ - LocalFree( ow ); - } - } - - res = INewItem_fnQueryInterface( cached_ow, riid, ppv ); - return res; -} diff --git a/reactos/dll/win32/shell32/startmenu.c b/reactos/dll/win32/shell32/startmenu.c deleted file mode 100644 index 5e81610deb7..00000000000 --- a/reactos/dll/win32/shell32/startmenu.c +++ /dev/null @@ -1,583 +0,0 @@ -/* - * Start menu object - * - * Copyright 2007 Hervé Poussineau - * - * 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(shell32start); - -typedef struct _tagStartMenu { - const IMenuPopupVtbl *vtbl; - const IObjectWithSiteVtbl *objectSiteVtbl; - const IInitializeObjectVtbl *initObjectVtbl; - const IMenuBandVtbl *menuBandVtbl; - IUnknown *pUnkSite; - LONG refCount; - IBandSite * pBandSite; -} StartMenu, *LPStartMenu; - -typedef struct _tagMenuBandSite { - const IBandSiteVtbl * lpVtbl; - LONG refCount; - - IUnknown ** Objects; - LONG ObjectsCount; - -} MenuBandSite, *LPMenuBandSite; - -static const IMenuPopupVtbl StartMenuVtbl; -static const IObjectWithSiteVtbl StartMenu_ObjectWithSiteVtbl; -static const IInitializeObjectVtbl StartMenu_InitializeObjectVtbl; -static const IBandSiteVtbl StartMenu_BandSiteVtbl; -static const IMenuBandVtbl StartMenu_MenuBandVtbl; - -static LPStartMenu __inline impl_from_IMenuPopup(IMenuPopup *iface) -{ - return (LPStartMenu)((char *)iface - FIELD_OFFSET(StartMenu, vtbl)); -} - -static LPStartMenu __inline impl_from_IObjectWithSite(IObjectWithSite *iface) -{ - return (LPStartMenu)((char *)iface - FIELD_OFFSET(StartMenu, objectSiteVtbl)); -} - -static LPStartMenu __inline impl_from_IInitializeObject(IInitializeObject *iface) -{ - return (LPStartMenu)((char *)iface - FIELD_OFFSET(StartMenu, initObjectVtbl)); -} - -HRESULT WINAPI StartMenu_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv) -{ - StartMenu *This; - - TRACE("StartMenu_Constructor(%p, %s, %p)\n", pUnkOuter, debugstr_guid(riid), ppv); - - if (pUnkOuter) - return E_POINTER; - - This = CoTaskMemAlloc(sizeof(StartMenu)); - if (!This) - return E_OUTOFMEMORY; - ZeroMemory(This, sizeof(*This)); - This->vtbl = &StartMenuVtbl; - This->objectSiteVtbl = &StartMenu_ObjectWithSiteVtbl; - This->initObjectVtbl = &StartMenu_InitializeObjectVtbl; - This->menuBandVtbl = &StartMenu_MenuBandVtbl; - This->refCount = 1; - - TRACE("StartMenu_Constructor returning %p\n", This); - *ppv = (IUnknown *)This; - return S_OK; -} - -static void WINAPI StartMenu_Destructor(StartMenu *This) -{ - TRACE("destroying %p\n", This); - if (This->pUnkSite) IUnknown_Release(This->pUnkSite); - CoTaskMemFree(This); -} - -static HRESULT WINAPI StartMenu_QueryInterface(IMenuPopup *iface, REFIID iid, LPVOID *ppvOut) -{ - StartMenu *This = impl_from_IMenuPopup(iface); - *ppvOut = NULL; - - TRACE("StartMenu_QueryInterface (%p, %s, %p)\n", iface, debugstr_guid(iid), ppvOut); - - if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_IOleWindow) - || IsEqualIID(iid, &IID_IDeskBar) || IsEqualIID(iid, &IID_IMenuPopup)) - { - *ppvOut = (void *)&This->vtbl; - } - else if (IsEqualIID(iid, &IID_IObjectWithSite)) - { - *ppvOut = (void *)&This->objectSiteVtbl; - } - else if (IsEqualIID(iid, &IID_IInitializeObject)) - { - *ppvOut = (void *)&This->initObjectVtbl; - } - - if (*ppvOut) - { - IUnknown_AddRef(iface); - return S_OK; - } - - WARN("unsupported interface: %s\n", debugstr_guid(iid)); - return E_NOINTERFACE; -} - -static ULONG WINAPI StartMenu_AddRef(IMenuPopup *iface) -{ - StartMenu *This = impl_from_IMenuPopup(iface); - TRACE("StartMenu_AddRef(%p)\n", iface); - return InterlockedIncrement(&This->refCount); -} - -static ULONG WINAPI StartMenu_Release(IMenuPopup *iface) -{ - StartMenu *This = impl_from_IMenuPopup(iface); - ULONG ret; - - TRACE("StartMenu_Release(%p)\n", iface); - - ret = InterlockedDecrement(&This->refCount); - if (ret == 0) - StartMenu_Destructor(This); - return ret; -} - -static HRESULT WINAPI StartMenu_GetWindow(IMenuPopup *iface, HWND *phwnd) -{ - FIXME("(%p, %p)\n", iface, phwnd); - return E_NOTIMPL; -} - -static HRESULT WINAPI StartMenu_ContextSensitiveHelp(IMenuPopup *iface, BOOL fEnterMode) -{ - FIXME("(%p, %d)\n", iface, fEnterMode); - return E_NOTIMPL; -} - -static HRESULT WINAPI StartMenu_SetClient(IMenuPopup *iface, IUnknown *punkClient) -{ - FIXME("(%p, %p)\n", iface, punkClient); - return E_NOTIMPL; -} - -static HRESULT WINAPI StartMenu_GetClient(IMenuPopup *iface, IUnknown **ppunkClient) -{ - StartMenu * This = (StartMenu*)iface; - - TRACE("StartMenu_GetClient (%p, %p)\n", iface, ppunkClient); - - *ppunkClient = (IUnknown*)This->pBandSite; - IUnknown_AddRef(*ppunkClient); - return S_OK; -} - -static HRESULT WINAPI StartMenu_OnPosRectChangeDB(IMenuPopup *iface, LPRECT prc) -{ - FIXME("(%p, %p)\n", iface, prc); - return E_NOTIMPL; -} - -static HRESULT WINAPI StartMenu_Popup(IMenuPopup *iface, POINTL *ppt, RECTL *prcExclude, MP_POPUPFLAGS dwFlags) -{ - FIXME("(%p, %p, %p, %x)\n", iface, ppt, prcExclude, dwFlags); - return E_NOTIMPL; -} - -static HRESULT WINAPI StartMenu_OnSelect(IMenuPopup *iface, DWORD dwSelectType) -{ - FIXME("(%p, %u)\n", iface, dwSelectType); - return E_NOTIMPL; -} - -static HRESULT WINAPI StartMenu_SetSubMenu(IMenuPopup *iface, IMenuPopup *pmp, BOOL fSet) -{ - FIXME("(%p, %p, %d)\n", iface, pmp, fSet); - return E_NOTIMPL; -} - -static const IMenuPopupVtbl StartMenuVtbl = -{ - /* IUnknown */ - StartMenu_QueryInterface, - StartMenu_AddRef, - StartMenu_Release, - - /* IOleWindow */ - StartMenu_GetWindow, - StartMenu_ContextSensitiveHelp, - - /* IDeskBar */ - StartMenu_SetClient, - StartMenu_GetClient, - StartMenu_OnPosRectChangeDB, - - /* IMenuPopup */ - StartMenu_Popup, - StartMenu_OnSelect, - StartMenu_SetSubMenu, -}; - -static HRESULT WINAPI StartMenu_IObjectWithSite_QueryInterface(IObjectWithSite *iface, REFIID iid, LPVOID *ppvOut) -{ - StartMenu *This = impl_from_IObjectWithSite(iface); - TRACE("(%p, %s, %p)\n", iface, debugstr_guid(iid), ppvOut); - return StartMenu_QueryInterface((IMenuPopup *)This, iid, ppvOut); -} - -static ULONG WINAPI StartMenu_IObjectWithSite_AddRef(IObjectWithSite *iface) -{ - StartMenu *This = impl_from_IObjectWithSite(iface); - TRACE("(%p)\n", iface); - return StartMenu_AddRef((IMenuPopup *)This); -} - -static ULONG WINAPI StartMenu_IObjectWithSite_Release(IObjectWithSite *iface) -{ - StartMenu *This = impl_from_IObjectWithSite(iface); - TRACE("StartMenu_IObjectWithSite_Release (%p)\n", iface); - return StartMenu_Release((IMenuPopup *)This); -} - -static HRESULT WINAPI StartMenu_IObjectWithSite_SetSite(IObjectWithSite *iface, IUnknown *pUnkSite) -{ - StartMenu *This = impl_from_IObjectWithSite(iface); - - TRACE("StartMenu_IObjectWithSite_SetSite(%p, %p)\n", iface, pUnkSite); - - if (This->pUnkSite) - IUnknown_Release(This->pUnkSite); - This->pUnkSite = pUnkSite; - if (This->pUnkSite) - IUnknown_AddRef(This->pUnkSite); - return S_OK; -} - -static HRESULT WINAPI StartMenu_IObjectWithSite_GetSite(IObjectWithSite *iface, REFIID riid, void **ppvSite) -{ - StartMenu *This = impl_from_IObjectWithSite(iface); - - TRACE("(%p, %s, %p)\n", iface, debugstr_guid(riid), ppvSite); - - if (!This->pUnkSite) - return E_FAIL; - - return IUnknown_QueryInterface(This->pUnkSite, riid, ppvSite); -} - -static const IObjectWithSiteVtbl StartMenu_ObjectWithSiteVtbl = -{ - StartMenu_IObjectWithSite_QueryInterface, - StartMenu_IObjectWithSite_AddRef, - StartMenu_IObjectWithSite_Release, - - StartMenu_IObjectWithSite_SetSite, - StartMenu_IObjectWithSite_GetSite, -}; - -static HRESULT WINAPI StartMenu_IInitializeObject_QueryInterface(IInitializeObject *iface, REFIID iid, LPVOID *ppvOut) -{ - StartMenu *This = impl_from_IInitializeObject(iface); - TRACE("(%p, %s, %p)\n", iface, debugstr_guid(iid), ppvOut); - return StartMenu_QueryInterface((IMenuPopup *)This, iid, ppvOut); -} - -static ULONG WINAPI StartMenu_IInitializeObject_AddRef(IInitializeObject *iface) -{ - StartMenu *This = impl_from_IInitializeObject(iface); - TRACE("StartMenu_IInitializeObject_AddRef(%p)\n", iface); - return StartMenu_AddRef((IMenuPopup *)This); -} - -static ULONG WINAPI StartMenu_IInitializeObject_Release(IInitializeObject *iface) -{ - StartMenu *This = impl_from_IInitializeObject(iface); - TRACE("StartMenu_IInitializeObject_Release (%p)\n", iface); - return StartMenu_Release((IMenuPopup *)This); -} - -static HRESULT WINAPI StartMenu_IInitializeObject_Initialize(IInitializeObject *iface) -{ - HRESULT hr; - StartMenu *This = impl_from_IInitializeObject(iface); - TRACE("StartMenu_IInitializeObject_Initialize (%p)\n", iface); - - hr = MenuBandSite_Constructor(NULL, &IID_IBandSite, (LPVOID*)&This->pBandSite); - if (FAILED(hr)) - return hr; - - return IBandSite_AddBand(This->pBandSite, (IUnknown*)&This->menuBandVtbl); -} - -static const IInitializeObjectVtbl StartMenu_InitializeObjectVtbl = -{ - StartMenu_IInitializeObject_QueryInterface, - StartMenu_IInitializeObject_AddRef, - StartMenu_IInitializeObject_Release, - - StartMenu_IInitializeObject_Initialize, -}; - -//-------------------------------------------------------------- -// IMenuBand interface - - -static HRESULT STDMETHODCALLTYPE StartMenu_IMenuBand_QueryInterface(IMenuBand *iface, REFIID iid, LPVOID *ppvOut) -{ - StartMenu *This = (StartMenu*)CONTAINING_RECORD(iface, StartMenu, menuBandVtbl); - - if (IsEqualIID(iid, &IID_IUnknown) || - IsEqualIID(iid, &IID_IMenuBand)) - { - *ppvOut = &This->menuBandVtbl; - IUnknown_AddRef((IUnknown*)*ppvOut); - return S_OK; - } - - WARN("unsupported interface:(%p, %s, %p)\n", iface, debugstr_guid(iid), ppvOut); - return E_NOINTERFACE; -} - -static ULONG STDMETHODCALLTYPE StartMenu_IMenuBand_AddRef(IMenuBand *iface) -{ - StartMenu *This = (StartMenu*)CONTAINING_RECORD(iface, StartMenu, menuBandVtbl); - TRACE("StartMenu_IInitializeObject_AddRef(%p)\n", This); - return StartMenu_AddRef((IMenuPopup *)This); -} - -static ULONG STDMETHODCALLTYPE StartMenu_IMenuBand_Release(IMenuBand *iface) -{ - StartMenu *This = (StartMenu*)CONTAINING_RECORD(iface, StartMenu, menuBandVtbl); - TRACE("StartMenu_IInitializeObject_Release (%p)\n", This); - return StartMenu_Release((IMenuPopup *)This); -} - -HRESULT STDMETHODCALLTYPE StartMenu_IMenuBand_IsMenuMessage(IMenuBand *iface, MSG *pmsg) -{ - StartMenu *This = (StartMenu*)CONTAINING_RECORD(iface, StartMenu, menuBandVtbl); - TRACE("StartMenu_IMenuBand_IsMenuMessage Stub(%p)\n", This); - return E_NOTIMPL; -} - -HRESULT STDMETHODCALLTYPE StartMenu_IMenuBand_TranslateMenuMessage(IMenuBand *iface, MSG *pmsg, LRESULT *plRet) -{ - StartMenu *This = (StartMenu*)CONTAINING_RECORD(iface, StartMenu, menuBandVtbl); - TRACE("StartMenu_IMenuBand_TranslateMenuMessage Stub(%p)\n", This); - return E_NOTIMPL; -} - - -static const IMenuBandVtbl StartMenu_MenuBandVtbl = -{ - /* IUnknown methods */ - StartMenu_IMenuBand_QueryInterface, - StartMenu_IMenuBand_AddRef, - StartMenu_IMenuBand_Release, - /* IMenuBand methods */ - StartMenu_IMenuBand_IsMenuMessage, - StartMenu_IMenuBand_TranslateMenuMessage, -}; - - -//--------------------------------------------------------------------------------------------------------- -// IBandSite interface - - -HRESULT WINAPI MenuBandSite_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv) -{ - MenuBandSite *This; - HRESULT hr; - - TRACE("StartMenu_Constructor(%p, %s, %p)\n", pUnkOuter, debugstr_guid(riid), ppv); - - if (pUnkOuter) - return E_POINTER; - - This = CoTaskMemAlloc(sizeof(MenuBandSite)); - if (!This) - return E_OUTOFMEMORY; - - ZeroMemory(This, sizeof(MenuBandSite)); - This->lpVtbl = &StartMenu_BandSiteVtbl; - - hr = IUnknown_QueryInterface((IUnknown*)&This->lpVtbl, riid, ppv); - - if (FAILED(hr)) - { - CoTaskMemFree(This); - return hr; - } - - TRACE("StartMenu_Constructor returning %p\n", This); - *ppv = (IUnknown *)This; - return S_OK; -} - -static HRESULT WINAPI BandSite_QueryInterface(IBandSite *iface, REFIID iid, LPVOID *ppvOut) -{ - MenuBandSite *This = (MenuBandSite*)CONTAINING_RECORD(iface, MenuBandSite, lpVtbl); - - if (IsEqualIID(iid, &IID_IUnknown) || - IsEqualIID(iid, &IID_IBandSite)) - { - *ppvOut = &This->lpVtbl; - IUnknown_AddRef((IUnknown*)*ppvOut); - return S_OK; - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI BandSite_AddRef(IBandSite *iface) -{ - MenuBandSite *This = (MenuBandSite*)CONTAINING_RECORD(iface, MenuBandSite, lpVtbl); - TRACE("BandSite_AddRef(%p)\n", iface); - return InterlockedIncrement(&This->refCount); -} - -static ULONG WINAPI BandSite_Release(IBandSite *iface) -{ - LONG ret; - MenuBandSite *This = (MenuBandSite*)CONTAINING_RECORD(iface, MenuBandSite, lpVtbl); - - ret = InterlockedDecrement(&This->refCount); - TRACE("BandSite_Release refCount %u\n", ret); - - if (ret == 0) - { - CoTaskMemFree(This->Objects); - CoTaskMemFree(This); - } - - return ret; -} - - -static HRESULT STDMETHODCALLTYPE BandSite_AddBand(IBandSite *iface, IUnknown *punk) -{ - IUnknown ** Objects; - MenuBandSite *This = (MenuBandSite*)CONTAINING_RECORD(iface, MenuBandSite, lpVtbl); - - TRACE("StartMenu_IBandSite_AddBand Stub punk %p\n", punk); - - if (!punk) - return E_FAIL; - - Objects = (IUnknown**) CoTaskMemAlloc(sizeof(IUnknown*) * (This->ObjectsCount + 1)); - if (!Objects) - return E_FAIL; - - RtlMoveMemory(Objects, This->Objects, sizeof(IUnknown*) * This->ObjectsCount); - - CoTaskMemFree(This->Objects); - - This->Objects = Objects; - Objects[This->ObjectsCount] = punk; - - IUnknown_AddRef(punk); - - This->ObjectsCount++; - - - return S_OK; -} - -static HRESULT STDMETHODCALLTYPE BandSite_EnumBands(IBandSite *iface, UINT uBand, DWORD *pdwBandID) -{ - ULONG Index, ObjectCount; - MenuBandSite *This = (MenuBandSite*)CONTAINING_RECORD(iface, MenuBandSite, lpVtbl); - - TRACE("StartMenu_IBandSite_EnumBands Stub uBand %uu pdwBandID %p\n", uBand, pdwBandID); - - if (uBand == (UINT)-1) - return This->ObjectsCount; - - ObjectCount = 0; - - for(Index = 0; Index < This->ObjectsCount; Index++) - { - if (This->Objects[Index] != NULL) - { - if (uBand == ObjectCount) - { - *pdwBandID = Index; - return S_OK; - } - ObjectCount++; - } - } - return E_FAIL; -} - -static HRESULT STDMETHODCALLTYPE BandSite_QueryBand(IBandSite *iface, DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName) -{ - FIXME("StartMenu_IBandSite_QueryBand Stub dwBandID %u IDeskBand %p pdwState %p Name %p cchName %u\n", dwBandID, ppstb, pdwState, pszName, cchName); - return E_FAIL; -} - -static HRESULT STDMETHODCALLTYPE BandSite_SetBandState(IBandSite *iface, DWORD dwBandID, DWORD dwMask, DWORD dwState) -{ - FIXME("StartMenu_IBandSite_SetBandState Stub dwBandID %u dwMask %x dwState %u\n", dwBandID, dwMask, dwState); - return E_FAIL; -} -static HRESULT STDMETHODCALLTYPE BandSite_RemoveBand(IBandSite *iface, DWORD dwBandID) -{ - MenuBandSite *This = (MenuBandSite*)CONTAINING_RECORD(iface, MenuBandSite, lpVtbl); - TRACE("StartMenu_IBandSite_RemoveBand Stub dwBandID %u\n", dwBandID); - - if (This->ObjectsCount <= dwBandID) - return E_FAIL; - - if (This->Objects[dwBandID]) - { - This->Objects[dwBandID]->lpVtbl->Release(This->Objects[dwBandID]); - This->Objects[dwBandID] = NULL; - } - - return S_OK; -} - -static HRESULT STDMETHODCALLTYPE BandSite_GetBandObject(IBandSite *iface, DWORD dwBandID, REFIID riid, void **ppv) -{ - MenuBandSite *This = (MenuBandSite*)CONTAINING_RECORD(iface, MenuBandSite, lpVtbl); - - TRACE("StartMenu_IBandSite_GetBandObject Stub dwBandID %u riid %p ppv %p\n", dwBandID, riid, ppv); - - if (This->ObjectsCount <= dwBandID) - return E_FAIL; - - if (This->Objects[dwBandID]) - { - return IUnknown_QueryInterface(This->Objects[dwBandID], riid, ppv); - } - - return E_FAIL; -} -static HRESULT STDMETHODCALLTYPE BandSite_SetBandSiteInfo(IBandSite *iface, const BANDSITEINFO *pbsinfo) -{ - FIXME("StartMenu_IBandSite_SetBandSiteInfo Stub pbsinfo %p\n", pbsinfo); - return E_FAIL; - -} -static HRESULT STDMETHODCALLTYPE BandSite_GetBandSiteInfo(IBandSite *iface, BANDSITEINFO *pbsinfo) -{ - FIXME("StartMenu_IBandSite_GetBandSiteInfo Stub pbsinfo %p\n", pbsinfo); - return E_FAIL; -} - -static const IBandSiteVtbl StartMenu_BandSiteVtbl = -{ - BandSite_QueryInterface, - BandSite_AddRef, - BandSite_Release, - BandSite_AddBand, - BandSite_EnumBands, - BandSite_QueryBand, - BandSite_SetBandState, - BandSite_RemoveBand, - BandSite_GetBandObject, - BandSite_SetBandSiteInfo, - BandSite_GetBandSiteInfo -}; - diff --git a/reactos/dll/win32/shell32/stubs.c b/reactos/dll/win32/shell32/stubs.c deleted file mode 100644 index b3192ea2c25..00000000000 --- a/reactos/dll/win32/shell32/stubs.c +++ /dev/null @@ -1,1419 +0,0 @@ -/* - * 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 - */ -HLOCAL -WINAPI -SHLocalAlloc(UINT uFlags, SIZE_T uBytes) -{ - FIXME("SHLocalAlloc() stub\n"); - return NULL; -} - -/* - * Unimplemented - */ -HLOCAL -WINAPI -SHLocalFree(HLOCAL hMem) -{ - FIXME("SHLocalFree() stub\n"); - return NULL; -} - -/* - * Unimplemented - */ -HLOCAL -WINAPI -SHLocalReAlloc(HLOCAL hMem, - SIZE_T uBytes, - UINT uFlags) -{ - FIXME("SHLocalReAlloc() stub\n"); - return NULL; -} - -/* - * Unimplemented - */ -LPWSTR -WINAPI -AddCommasW(DWORD dwUnknown, LPWSTR lpNumber) -{ - LPWSTR lpRetBuf = L"0"; - - FIXME("AddCommasW() stub\n"); - return lpRetBuf; -} - -/* - * Unimplemented - */ -LPWSTR -WINAPI -ShortSizeFormatW(LONGLONG llNumber) -{ - FIXME("ShortSizeFormatW() stub\n"); - return NULL; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -SHFindComputer(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) -{ - FIXME("SHFindComputer() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -SHLimitInputEdit(HWND hWnd, LPVOID lpUnknown) -{ - FIXME("SHLimitInputEdit() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -SHLimitInputCombo(HWND hWnd, LPVOID lpUnknown) -{ - FIXME("SHLimitInputCombo() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -PathIsEqualOrSubFolder(LPWSTR lpFolder, LPWSTR lpSubFolder) -{ - FIXME("PathIsEqualOrSubFolder() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -HRESULT -WINAPI -SHCreateFileExtractIconW(LPCWSTR pszPath, - DWORD dwFileAttributes, - LPVOID lpUnknown1, - LPVOID lpUnknown2) -{ - FIXME("SHCreateFileExtractIconW() stub\n"); - return E_FAIL; -} - -HRESULT -WINAPI -SHGetUnreadMailCountW(HKEY hKeyUser, - LPCWSTR pszMailAddress, - DWORD *pdwCount, - FILETIME *pFileTime, - LPCWSTR pszShellExecuteCommand, - int cchShellExecuteCommand) -{ - FIXME("SHGetUnreadMailCountW() stub\n"); - return E_FAIL; -} - -/* - * Unimplemented - */ -HRESULT -WINAPI -SHSetUnreadMailCountW(LPCWSTR pszMailAddress, - DWORD dwCount, - LPCWSTR pszShellExecuteCommand) -{ - FIXME("SHSetUnreadMailCountW() stub\n"); - return E_FAIL; -} - -/* - * Unimplemented - */ -VOID -WINAPI -CheckDiskSpace(VOID) -{ - FIXME("CheckDiskSpace() stub\n"); -} - -/* - * Unimplemented - */ -VOID -WINAPI -SHReValidateDarwinCache(VOID) -{ - FIXME("SHReValidateDarwinCache() stub\n"); -} - -/* - * Unimplemented - */ -HRESULT -WINAPI -CopyStreamUI(IStream *pSrc, IStream *pDst, IProgressDialog *pProgDlg) -{ - FIXME("CopyStreamUI() stub\n"); - return E_FAIL; -} - -/* - * Unimplemented - */ -FILEDESCRIPTOR* -WINAPI -GetFileDescriptor(FILEGROUPDESCRIPTOR *pFileGroupDesc, BOOL bUnicode, INT iIndex, LPWSTR lpName) -{ - FIXME("GetFileDescriptor() stub\n"); - return NULL; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -SHIsTempDisplayMode(VOID) -{ - FIXME("SHIsTempDisplayMode() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -LONG -WINAPI -SHCreateSessionKey(REGSAM regSam, PHKEY phKey) -{ - FIXME("SHCreateSessionKey() stub\n"); - return 0; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -MakeShellURLFromPathW(LPCWSTR lpPath, LPWSTR lpUrl, INT cchMax) -{ - FIXME("MakeShellURLFromPathW() stub\n"); - lpUrl = NULL; - return FALSE; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -MakeShellURLFromPathA(LPCSTR lpPath, LPSTR lpUrl, INT cchMax) -{ - FIXME("MakeShellURLFromPathA() stub\n"); - lpUrl = NULL; - return FALSE; -} - -/* - * Unimplemented - */ -HRESULT -WINAPI -SHParseDarwinIDFromCacheW(LPCWSTR lpUnknown1, LPWSTR lpUnknown2) -{ - FIXME("SHParseDarwinIDFromCacheW() stub\n"); - lpUnknown2 = NULL; - return E_FAIL; -} - -/* - * Unimplemented - */ -HRESULT -WINAPI -SHMultiFileProperties(IDataObject *pDataObject, DWORD dwFlags) -{ - FIXME("SHMultiFileProperties() stub\n"); - return E_FAIL; -} - -/* - * Unimplemented - */ -HRESULT -WINAPI -SHCreatePropertyBag(REFIID refIId, LPVOID *lpUnknown) -{ - /* Call SHCreatePropertyBagOnMemory() from shlwapi.dll */ - FIXME("SHCreatePropertyBag() stub\n"); - return E_FAIL; -} - -/* - * Unimplemented - */ -HRESULT -WINAPI -SHCopyMonikerToTemp(IMoniker *pMoniker, LPCWSTR lpInput, LPWSTR lpOutput, INT cchMax) -{ - /* Unimplemented in XP SP3 */ - TRACE("SHCopyMonikerToTemp() stub\n"); - return E_FAIL; -} - -/* - * Unimplemented - */ -HLOCAL -WINAPI -CheckWinIniForAssocs(VOID) -{ - FIXME("CheckWinIniForAssocs() stub\n"); - return NULL; -} - -/* - * Unimplemented - */ -HRESULT -WINAPI -SHGetSetFolderCustomSettingsW(LPSHFOLDERCUSTOMSETTINGSW pfcs, - LPCWSTR pszPath, - DWORD dwReadWrite) -{ - FIXME("SHGetSetFolderCustomSettingsW() stub\n"); - return E_FAIL; -} - -/* - * Unimplemented - */ -HRESULT -WINAPI -SHGetSetFolderCustomSettingsA(LPSHFOLDERCUSTOMSETTINGSA pfcs, - LPCSTR pszPath, - DWORD dwReadWrite) -{ - FIXME("SHGetSetFolderCustomSettingsA() stub\n"); - return E_FAIL; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -SHOpenPropSheetA(LPSTR lpCaption, - HKEY hKeys[], - UINT uCount, - CLSID *pClsID, - IDataObject *pDataObject, - IShellBrowser *pShellBrowser, - LPSTR lpStartPage) -{ - FIXME("SHOpenPropSheetA() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -SHOpenPropSheetW(LPWSTR lpCaption, - HKEY hKeys[], - UINT uCount, - CLSID *pClsID, - IDataObject *pDataObject, - IShellBrowser *pShellBrowser, - LPWSTR lpStartPage) -{ - FIXME("SHOpenPropSheetW() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -VOID -WINAPI -CDefFolderMenu_MergeMenu(HINSTANCE hInstance, - UINT uMainMerge, - UINT uPopupMerge, - LPQCMINFO lpQcmInfo) -{ - FIXME("CDefFolderMenu_MergeMenu() stub\n"); -} - -/* - * Unimplemented - */ -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 - */ -BOOL -WINAPI -SHChangeRegistrationReceive(LPVOID lpUnknown1, DWORD dwUnknown2) -{ - FIXME("SHChangeRegistrationReceive() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -VOID -WINAPI -SHWaitOp_Operate(LPVOID lpUnknown1, DWORD dwUnknown2) -{ - FIXME("SHWaitOp_Operate() stub\n"); -} - -/* - * Unimplemented - */ -VOID -WINAPI -SHChangeNotifyReceive(LONG lUnknown, UINT uUnknown, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) -{ - FIXME("SHChangeNotifyReceive() stub\n"); -} - -/* - * Unimplemented - */ -INT -WINAPI -RealDriveTypeFlags(INT iDrive, BOOL bUnknown) -{ - FIXME("RealDriveTypeFlags() stub\n"); - return 1; -} - -/* - * Unimplemented - */ -LPWSTR -WINAPI -StrRStrW(LPWSTR lpSrc, LPWSTR lpLast, LPWSTR lpSearch) -{ - FIXME("StrRStrW() stub\n"); - return NULL; -} - -/* - * Unimplemented - */ -LPWSTR -WINAPI -StrRStrA(LPSTR lpSrc, LPSTR lpLast, LPSTR lpSearch) -{ - FIXME("StrRStrA() stub\n"); - return NULL; -} - -/* - * Unimplemented - */ -LONG -WINAPI -ShellHookProc(INT iCode, WPARAM wParam, LPARAM lParam) -{ - /* Unimplemented in WinXP SP3 */ - TRACE("ShellHookProc() stub\n"); - return 0; -} - -/* - * Unimplemented - */ -VOID -WINAPI -ShellExec_RunDLL(HWND hwnd, HINSTANCE hInstance, LPWSTR pszCmdLine, int nCmdShow) -{ - FIXME("ShellExec_RunDLL() stub\n"); -} - -/* - * Unimplemented - */ -VOID -WINAPI -ShellExec_RunDLLA(HWND hwnd, HINSTANCE hInstance, LPSTR pszCmdLine, int nCmdShow) -{ - FIXME("ShellExec_RunDLLA() stub\n"); -} - -/* - * Unimplemented - */ -VOID -WINAPI -ShellExec_RunDLLW(HWND hwnd, HINSTANCE hInstance, LPWSTR pszCmdLine, int nCmdShow) -{ - FIXME("ShellExec_RunDLLW() stub\n"); -} - -/* - * Unimplemented - */ -BOOL -WINAPI -SheShortenPathW(LPWSTR lpPath, BOOL bShorten) -{ - FIXME("SheShortenPathW() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -SheShortenPathA(LPSTR lpPath, BOOL bShorten) -{ - FIXME("SheShortenPathA() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -INT -WINAPI -SheSetCurDrive(INT iIndex) -{ - FIXME("SheSetCurDrive() stub\n"); - return 1; -} - -/* - * Unimplemented - */ -LPWSTR -WINAPI -SheRemoveQuotesW(LPWSTR lpInput) -{ - FIXME("SheRemoveQuotesW() stub\n"); - return NULL; -} - -/* - * Unimplemented - */ -LPSTR -WINAPI -SheRemoveQuotesA(LPSTR lpInput) -{ - FIXME("SheRemoveQuotesA() stub\n"); - return NULL; -} - -/* - * Unimplemented - */ -INT -WINAPI -SheGetPathOffsetW(LPWSTR lpPath) -{ - FIXME("SheGetPathOffsetW() stub\n"); - return 0; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -SheGetDirExW(LPWSTR lpDrive, - LPDWORD lpCurDirLen, - LPWSTR lpCurDir) -{ - FIXME("SheGetDirExW() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -INT -WINAPI -SheGetCurDrive(VOID) -{ - FIXME("SheGetCurDrive() stub\n"); - return 1; -} - -/* - * Unimplemented - */ -INT -WINAPI -SheFullPathW(LPWSTR lpFullName, DWORD dwPathSize, LPWSTR lpBuffer) -{ - FIXME("SheFullPathW() stub\n"); - return 0; -} - -/* - * Unimplemented - */ -INT -WINAPI -SheFullPathA(LPSTR lpFullName, DWORD dwPathSize, LPSTR lpBuffer) -{ - FIXME("SheFullPathA() stub\n"); - return 0; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -SheConvertPathW(LPWSTR lpCmd, LPWSTR lpFileName, UINT uCmdLen) -{ - FIXME("SheConvertPathW() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -INT -WINAPI -SheChangeDirExW(LPWSTR lpDir) -{ - FIXME("SheChangeDirExW() stub\n"); - return 0; -} - -/* - * Unimplemented - */ -INT -WINAPI -SheChangeDirExA(LPSTR lpDir) -{ - FIXME("SheChangeDirExA() stub\n"); - return 0; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -SHInvokePrinterCommandW(HWND hwnd, - UINT uAction, - LPCWSTR lpBuf1, - LPCWSTR lpBuf2, - BOOL fModal) -{ - FIXME("SHInvokePrinterCommandW() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -SHInvokePrinterCommandA(HWND hwnd, - UINT uAction, - LPCSTR lpBuf1, - LPCSTR lpBuf2, - BOOL fModal) -{ - FIXME("SHInvokePrinterCommandA() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -HRESULT -WINAPI -SHCreateQueryCancelAutoPlayMoniker(IMoniker **ppmoniker) -{ - FIXME("SHCreateQueryCancelAutoPlayMoniker() stub\n"); - return E_FAIL; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -SHCreateProcessAsUserW(PSHCREATEPROCESSINFOW pscpi) -{ - FIXME("SHCreateProcessAsUserW() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -SHChangeNotifySuspendResume(BOOL bSuspend, - LPITEMIDLIST pidl, - BOOL bRecursive, - DWORD dwReserved) -{ - FIXME("SHChangeNotifySuspendResume() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -RegenerateUserEnvironment(LPVOID *lpUnknown, BOOL bUnknown) -{ - FIXME("RegenerateUserEnvironment() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -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 - */ -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 - */ -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 - */ -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 - */ -VOID -WINAPI -PrintersGetCommand_RunDLL(HWND hwnd, HINSTANCE hInstance, LPWSTR pszCmdLine, int nCmdShow) -{ - FIXME("PrintersGetCommand_RunDLL() stub\n"); -} - -/* - * Unimplemented - */ -VOID -WINAPI -PrintersGetCommand_RunDLLA(HWND hwnd, HINSTANCE hInstance, LPSTR pszCmdLine, int nCmdShow) -{ - FIXME("PrintersGetCommand_RunDLLA() stub\n"); -} - -/* - * Unimplemented - */ -VOID -WINAPI -PrintersGetCommand_RunDLLW(HWND hwnd, HINSTANCE hInstance, LPWSTR pszCmdLine, int nCmdShow) -{ - FIXME("PrintersGetCommand_RunDLLW() stub\n"); -} - -/* - * Unimplemented - */ -IShellFolderViewCB* -WINAPI -SHGetShellFolderViewCB(HWND hwnd) -{ - FIXME("SHGetShellFolderViewCB() stub\n"); - return NULL; -} - -/* - * Unimplemented - */ -INT -WINAPI -SHLookupIconIndexA(LPCSTR lpName, INT iIndex, UINT uFlags) -{ - FIXME("SHLookupIconIndexA() stub\n"); - return 0; -} - -/* - * Unimplemented - */ -INT -WINAPI -SHLookupIconIndexW(LPCWSTR lpName, INT iIndex, UINT uFlags) -{ - FIXME("SHLookupIconIndexW() stub\n"); - return 0; -} - -/* - * Unimplemented - */ -HANDLE -WINAPI -PifMgr_OpenProperties(LPWSTR lpAppPath, LPWSTR lpPifPath, UINT hInfIndex, UINT uUnknown) -{ - FIXME("PifMgr_OpenProperties() stub\n"); - return 0; -} - -/* - * Unimplemented - */ -INT -WINAPI -PifMgr_GetProperties(HANDLE hHandle, LPWSTR lpName, LPVOID lpUnknown, INT iUnknown, UINT uUnknown) -{ - FIXME("PifMgr_GetProperties() stub\n"); - return 0; -} - -/* - * Unimplemented - */ -INT -WINAPI -PifMgr_SetProperties(HANDLE hHandle, LPWSTR lpName, LPVOID lpUnknown, INT iUnknown, UINT uUnknown) -{ - FIXME("PifMgr_SetProperties() stub\n"); - return 0; -} - -/* - * Unimplemented - */ -HRESULT -WINAPI -SHStartNetConnectionDialogA(HWND hwnd, - LPCSTR pszRemoteName, - DWORD dwType) -{ - FIXME("SHStartNetConnectionDialogA() stub\n"); - return E_FAIL; -} - -/* - * Unimplemented - */ -HRESULT -WINAPI -SHStartNetConnectionDialogW(HWND hwnd, - LPCWSTR pszRemoteName, - DWORD dwType) -{ - FIXME("SHStartNetConnectionDialogW() stub\n"); - return E_FAIL; -} - -/* - * Unimplemented - */ -HANDLE -WINAPI -PifMgr_CloseProperties(HANDLE hHandle, UINT uUnknown) -{ - FIXME("PifMgr_CloseProperties() stub\n"); - return NULL; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -DAD_DragEnterEx2(HWND hwndTarget, - POINT ptStart, - IDataObject *pdtObject) -{ - FIXME("DAD_DragEnterEx2() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -IsSuspendAllowed(VOID) -{ - FIXME("IsSuspendAllowed() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -UINT -WINAPI -SHGetNetResource(LPVOID lpUnknown1, UINT iIndex, LPVOID lpUnknown2, UINT cchMax) -{ - FIXME("SHGetNetResource() stub\n"); - return 0; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -DragQueryInfo(HDROP hDrop, DRAGINFO *pDragInfo) -{ - FIXME("DragQueryInfo() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -LPVOID -WINAPI -DDECreatePostNotify(LPVOID lpUnknown) -{ - FIXME("DDECreatePostNotify() stub\n"); - return NULL; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -SHIsBadInterfacePtr(LPVOID pv, UINT ucb) -{ - FIXME("SHIsBadInterfacePtr() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -Activate_RunDLL(DWORD dwProcessId, LPVOID lpUnused1, LPVOID lpUnused2, LPVOID lpUnused3) -{ - FIXME("Activate_RunDLL() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -VOID -WINAPI -AppCompat_RunDLLW(HWND hwnd, HINSTANCE hInstance, LPWSTR pszCmdLine, int nCmdShow) -{ - FIXME("AppCompat_RunDLLW() stub\n"); -} - -/* - * Unimplemented - */ -VOID -WINAPI -Control_RunDLLAsUserW(HWND hwnd, HINSTANCE hInstance, LPWSTR pszCmdLine, int nCmdShow) -{ - FIXME("Control_RunDLLAsUserW() stub\n"); -} - -/* - * Unimplemented - */ -UINT -WINAPI -DragQueryFileAorW(HDROP hDrop, UINT iIndex, LPWSTR lpFile, UINT ucb, BOOL bUnicode, BOOL bShorten) -{ - FIXME("DragQueryFileAorW() stub\n"); - return 0; -} - -/* - * Unimplemented - */ -DWORD -WINAPI -SHNetConnectionDialog(HWND hwndOwner, - LPCWSTR lpstrRemoteName, - DWORD dwType) -{ - FIXME("SHNetConnectionDialog() stub\n"); - return ERROR_INVALID_PARAMETER; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -DAD_SetDragImageFromListView(HWND hwnd, POINT pt) -{ - FIXME("DAD_SetDragImageFromListView() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -void -WINAPI -SHHandleDiskFull(HWND hwndOwner, UINT uDrive) -{ - FIXME("SHHandleDiskFull() stub\n"); -} - -/* - * Unimplemented - */ -BOOL -WINAPI -ILGetPseudoNameW(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2, LPWSTR szStr, INT iUnknown) -{ - /* Unimplemented in WinXP SP3 */ - TRACE("ILGetPseudoNameW() stub\n"); - *szStr = 0; - return FALSE; -} - -/* - * Unimplemented - */ -VOID -WINAPI -SHGlobalDefect(DWORD dwUnknown) -{ - /* Unimplemented in WinXP SP3 */ - TRACE("SHGlobalDefect() stub\n"); -} - -/* - * Unimplemented - */ -LPITEMIDLIST -WINAPI -Printers_GetPidl(LPCITEMIDLIST pidl, LPCWSTR lpName) -{ - FIXME("Printers_GetPidl() stub\n"); - return NULL; -} - -/* - * Unimplemented - */ -INT -WINAPI -Int64ToString(LONGLONG llInt64, - LPWSTR lpOut, - UINT uSize, - BOOL bUseFormat, - NUMBERFMT *pNumberFormat, - DWORD dwNumberFlags) -{ - FIXME("Int64ToString() stub\n"); - return 0; -} - -/* - * Unimplemented - */ -INT -WINAPI -LargeIntegerToString(LARGE_INTEGER *pLargeInt, - LPWSTR lpOut, - UINT uSize, - BOOL bUseFormat, - NUMBERFMT *pNumberFormat, - DWORD dwNumberFlags) -{ - FIXME("LargeIntegerToString() stub\n"); - return 0; -} - -/* - * Unimplemented - */ -LONG -WINAPI -Printers_AddPrinterPropPages(LPVOID lpUnknown1, LPVOID lpUnknown2) -{ - FIXME("Printers_AddPrinterPropPages() stub\n"); - return 0; -} - -/* - * Unimplemented - */ -WORD -WINAPI -ExtractIconResInfoA(HANDLE hHandle, - LPSTR lpFile, - WORD wIndex, - LPWORD lpSize, - LPHANDLE lpIcon) -{ - FIXME("ExtractIconResInfoA() stub\n"); - return 0; -} - -/* - * Unimplemented - */ -WORD -WINAPI -ExtractIconResInfoW(HANDLE hHandle, - LPWSTR lpFile, - WORD wIndex, - LPWORD lpSize, - LPHANDLE lpIcon) -{ - FIXME("ExtractIconResInfoW() stub\n"); - return 0; -} - -/* - * Unimplemented - */ -DWORD -WINAPI -ExtractVersionResource16W(LPWSTR lpName, LPHANDLE lpHandle) -{ - FIXME("ExtractVersionResource16W() stub\n"); - return 0; -} - -/* - * Unimplemented - */ -BOOL* -WINAPI -FindExeDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - FIXME("FindExeDlgProc() stub\n"); - return 0; -} - -/* - * Unimplemented - */ -HANDLE -WINAPI -InternalExtractIconListW(HANDLE hHandle, - LPWSTR lpFileName, - LPINT lpCount) -{ - FIXME("InternalExtractIconListW() stub\n"); - return NULL; -} - -/* - * Unimplemented - */ -HANDLE -WINAPI -InternalExtractIconListA(HANDLE hHandle, - LPSTR lpFileName, - LPINT lpCount) -{ - FIXME("InternalExtractIconListA() stub\n"); - return NULL; -} - -/* - * Unimplemented - */ -HRESULT -WINAPI -FirstUserLogon(LPWSTR lpUnknown1, LPWSTR lpUnknown2) -{ - FIXME("FirstUserLogon() stub\n"); - return E_FAIL; -} - -/* - * Unimplemented - */ -HRESULT -WINAPI -SHSetFolderPathA(int csidl, - HANDLE hToken, - DWORD dwFlags, - LPCSTR pszPath) -{ - FIXME("SHSetFolderPathA() stub\n"); - return E_FAIL; -} - -/* - * Unimplemented - */ -HRESULT -WINAPI -SHSetFolderPathW(int csidl, - HANDLE hToken, - DWORD dwFlags, - LPCWSTR pszPath) -{ - FIXME("SHSetFolderPathW() stub\n"); - return E_FAIL; -} - -/* - * Unimplemented - */ -HRESULT -WINAPI -SHGetUserPicturePathW(LPCWSTR lpPath, int csidl, LPVOID lpUnknown) -{ - FIXME("SHGetUserPicturePathW() stub\n"); - return E_FAIL; -} - -/* - * Unimplemented - */ -HRESULT -WINAPI -SHSetUserPicturePathW(LPCWSTR lpPath, int csidl, LPVOID lpUnknown) -{ - FIXME("SHGetUserPicturePathA() stub\n"); - return E_FAIL; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -SHOpenEffectiveToken(LPVOID Token) -{ - FIXME("SHOpenEffectiveToken() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -SHTestTokenPrivilegeW(HANDLE hToken, LPDWORD ReturnLength) -{ - FIXME("SHTestTokenPrivilegeW() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -SHShouldShowWizards(LPVOID lpUnknown) -{ - FIXME("SHShouldShowWizards() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -PathIsSlowW(LPCWSTR pszFile, DWORD dwFileAttr) -{ - FIXME("PathIsSlowW() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -PathIsSlowA(LPCSTR pszFile, DWORD dwFileAttr) -{ - FIXME("PathIsSlowA() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -DWORD -WINAPI -SHGetUserDisplayName(LPWSTR lpName, PULONG puSize) -{ - FIXME("SHGetUserDisplayName() stub\n"); - wcscpy(lpName, L"UserName"); - return ERROR_SUCCESS; -} - -/* - * Unimplemented - */ -DWORD -WINAPI -SHGetProcessDword(DWORD dwUnknown1, DWORD dwUnknown2) -{ - /* Unimplemented in WinXP SP3 */ - TRACE("SHGetProcessDword() stub\n"); - return 0; -} - -/* - * Unimplemented - */ -BOOL -WINAPI -SHTestTokenMembership(HANDLE TokenHandle, PSID SidToCheck) -{ - FIXME("SHTestTokenMembership() stub\n"); - return FALSE; -} - -/* - * Unimplemented - */ -LPVOID -WINAPI -SHGetUserSessionId(HANDLE hHandle) -{ - FIXME("SHGetUserSessionId() stub\n"); - return NULL; -} diff --git a/reactos/dll/win32/shell32/systray.c b/reactos/dll/win32/shell32/systray.c deleted file mode 100644 index 81297a78907..00000000000 --- a/reactos/dll/win32/shell32/systray.c +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 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/reactos/drivers/ksfilter/swenum/.gitignore b/reactos/drivers/ksfilter/swenum/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/drivers/multimedia/portcls.NEW/adapter.c b/reactos/drivers/multimedia/portcls.NEW/adapter.c deleted file mode 100644 index 5a96bd0629d..00000000000 --- a/reactos/drivers/multimedia/portcls.NEW/adapter.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - ReactOS Kernel Streaming - Port Class API: Adapter initialization - - Author: Andrew Greenwood - -*/ - -#include - - -NTSTATUS -PcStartIo( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) -{ - /* Internal function */ - return STATUS_UNSUCCESSFUL; -} - -NTSTATUS -PcUnload( - IN PDRIVER_OBJECT DriverObject) -{ - /* Internal function */ - return STATUS_UNSUCCESSFUL; -} - - -/* - * @unimplemented - */ -PORTCLASSAPI NTSTATUS NTAPI -PcInitializeAdapterDriver( - IN PDRIVER_OBJECT DriverObject, - IN PUNICODE_STRING RegistryPathName, - IN PDRIVER_ADD_DEVICE AddDevice) -{ - /* - This is effectively a common DriverEntry function for PortCls drivers. - So it has similar responsibilities to a normal driver. - - First 2 parameters are from DriverEntry. - Installs the supplied AddDevice routine in the driver object?s driver extension and installs the PortCls driver?s IRP handlers in the driver object itself. - */ - - DriverObject->DriverExtension->AddDevice = AddDevice; - - /* - TODO: (* = implement here, otherwise KS default) - IRP_MJ_CLOSE - * IRP_MJ_CREATE - IRP_MJ_DEVICE_CONTROL - IRP_MJ_FLUSH_BUFFERS - * IRP_MJ_PNP - * IRP_MJ_POWER - IRP_MJ_QUERY_SECURITY - IRP_MJ_READ - IRP_MJ_SET_SECURITY - * IRP_MJ_SYSTEM_CONTROL - IRP_MJ_WRITE - */ - - UNIMPLEMENTED; - - return STATUS_SUCCESS; -} - -/* - * @unimplemented - */ -PORTCLASSAPI NTSTATUS NTAPI -PcAddAdapterDevice( - IN PDRIVER_OBJECT DriverObject, - IN PDEVICE_OBJECT PhysicalDeviceObject, - IN PCPFNSTARTDEVICE StartDevice, - IN ULONG MaxObjects, - IN ULONG DeviceExtensionSize) -{ - /* - Note - after this has been called, we can - handle IRP_MN_START_DEVICE by calling StartDevice - */ - - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} diff --git a/reactos/drivers/multimedia/portcls.NEW/dll.c b/reactos/drivers/multimedia/portcls.NEW/dll.c deleted file mode 100644 index 5d602533081..00000000000 --- a/reactos/drivers/multimedia/portcls.NEW/dll.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - ReactOS Kernel Streaming - Port Class / Library Init and Cleanup - - Author: Andrew Greenwood - - Notes: - - -*/ - -#include - -/* - * @implemented - */ -ULONG STDCALL -DllInitialize(ULONG Unknown) -{ - return 0; -} - -/* - * @implemented - */ -ULONG STDCALL -DllUnload(VOID) -{ - return 0; -} diff --git a/reactos/drivers/multimedia/portcls.NEW/drm.c b/reactos/drivers/multimedia/portcls.NEW/drm.c deleted file mode 100644 index 3aae56dd4d0..00000000000 --- a/reactos/drivers/multimedia/portcls.NEW/drm.c +++ /dev/null @@ -1,73 +0,0 @@ -/* - ReactOS Kernel Streaming - Port Class / Digital Rights Management - - Author: Andrew Greenwood - - Notes: - These are convenience functions for accessing DRM facilities, as - documented here: - http://www.osronline.com/ddkx/stream/aud-prop_9f77.htm -*/ - -#include -#include - -PORTCLASSAPI NTSTATUS NTAPI -PcAddContentHandlers( - IN ULONG ContentId, - IN PVOID *paHandlers, - IN ULONG NumHandlers) -{ - return DrmAddContentHandlers(ContentId, paHandlers, NumHandlers); -} - -PORTCLASSAPI NTSTATUS NTAPI -PcCreateContentMixed( - IN PULONG paContentId, - IN ULONG cContentId, - OUT PULONG pMixedContentId) -{ - return DrmCreateContentMixed(paContentId, cContentId, pMixedContentId); -} - -PORTCLASSAPI NTSTATUS NTAPI -PcDestroyContent( - IN ULONG ContentId) -{ - return DrmDestroyContent(ContentId); -} - -PORTCLASSAPI NTSTATUS NTAPI -PcForwardContentToDeviceObject( - IN ULONG ContentId, - IN PVOID Reserved, - IN PCDRMFORWARD DrmForward) -{ - return DrmForwardContentToDeviceObject(ContentId, Reserved, DrmForward); -} - -PORTCLASSAPI NTSTATUS NTAPI -PcForwardContentToFileObject( - IN ULONG ContentId, - IN PFILE_OBJECT FileObject) -{ - return DrmForwardContentToFileObject(ContentId, FileObject); -} - -PORTCLASSAPI NTSTATUS NTAPI -PcForwardContentToInterface( - IN ULONG ContentId, - IN PUNKNOWN pUnknown, - IN ULONG NumMethods) -{ - return DrmForwardContentToInterface(ContentId, pUnknown, NumMethods); -} - -PORTCLASSAPI NTSTATUS NTAPI -PcGetContentRights( - IN ULONG ContentId, - OUT PDRMRIGHTS DrmRights) -{ - return DrmGetContentRights(ContentId, DrmRights); -} diff --git a/reactos/drivers/multimedia/portcls.NEW/portcls.c b/reactos/drivers/multimedia/portcls.NEW/portcls.c deleted file mode 100644 index 68fc51fe9cb..00000000000 --- a/reactos/drivers/multimedia/portcls.NEW/portcls.c +++ /dev/null @@ -1,489 +0,0 @@ -/* - * PROJECT: ReactOS Sound System - * LICENSE: GPL - See COPYING in the top level directory - * FILE: drivers/multimedia/portcls/portcls.c - * PURPOSE: Audio Port Class Functions - * PROGRAMMERS: - * - */ - -#include "portcls.h" - - -#define NDEBUG -#include - - -NTSTATUS STDCALL -DriverEntry(PDRIVER_OBJECT DriverObject, - PUNICODE_STRING RegistryPath) -{ - return STATUS_SUCCESS; -} - -/* - * @implemented - */ -ULONG STDCALL -DllInitialize(ULONG Unknown) -{ - return 0; -} - -/* - * @implemented - */ -ULONG STDCALL -DllUnload(VOID) -{ - return 0; -} - - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcAddAdapterDevice( - ULONG DriverObject, - ULONG PhysicalDeviceObject, - ULONG StartDevice, - ULONG MaxObjects, - ULONG DeviceExtensionSize -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcAddContentHandlers( - ULONG ContentId, - ULONG paHandlers, - ULONG NumHandlers -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcCompleteIrp( - ULONG DeviceObject, - ULONG Irp, - ULONG Status -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcCompletePendingPropertyRequest( - ULONG PropertyRequest, - ULONG NtStatus -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcCreateContentMixed( - ULONG paContentId, - ULONG cContentId, - ULONG pMixedContentId -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcDestroyContent( - ULONG ContentId -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcDispatchIrp( - ULONG DeviceObject, - ULONG Irp -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcForwardContentToDeviceObject( - ULONG ContentId, - ULONG Reserved, - ULONG DrmForward -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcForwardContentToFileObject( - ULONG ContentId, - ULONG FileObject -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcForwardContentToInterface( - ULONG ContentId, - ULONG Unknown, - ULONG NumMethods -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcForwardIrpSynchronous( - ULONG DeviceObject, - ULONG Irp -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcGetContentRights( - ULONG ContentId, - ULONG DrmRights -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcGetDeviceProperty( - ULONG DeviceObject, - ULONG DeviceProperty, - ULONG BufferLength, - ULONG PropertyBuffer, - ULONG ResultLength -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @implemented - */ -ULONGLONG STDCALL -PcGetTimeInterval( - ULONGLONG Timei -) -{ - LARGE_INTEGER CurrentTime; - - KeQuerySystemTime( &CurrentTime); - - return (Timei - CurrentTime.QuadPart); -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcInitializeAdapterDriver( - ULONG DriverObject, - ULONG RegistryPathName, - ULONG AddDevice -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcNewDmaChannel( - ULONG OutDmaChannel, - ULONG Unknown, - ULONG PoolType, - ULONG DeviceDescription, - ULONG DeviceObject -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcNewInterruptSync( - ULONG OutInterruptSync, - ULONG Unknown, - ULONG ResourceList, - ULONG ResourceIndex, - ULONG Mode -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcNewMiniport( - ULONG OutMiniport, - ULONG ClassId -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcNewPort( - ULONG OutPort, - ULONG ClassId -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcNewRegistryKey( - ULONG OutRegistryKey, - ULONG Unknown, - ULONG RegistryKeyType, - ULONG DesiredAccess, - ULONG DeviceObject, - ULONG SubDevice, - ULONG ObjectAttributes, - ULONG CreateOptions, - ULONG Disposition -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcNewResourceList( - ULONG OutResourceList, - ULONG Unknown, - ULONG PoolType, - ULONG TranslatedResources, - ULONG UntranslatedResources -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcNewResourceSublist( - ULONG OutResourceList, - ULONG Unknown, - ULONG PoolType, - ULONG ParentList, - ULONG MaximumEntries -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcNewServiceGroup( - ULONG OutServiceGroup, - ULONG Unknown -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcRegisterAdapterPowerManagement( - ULONG Unknown, - ULONG pvContext -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcRegisterIoTimeout( - ULONG pDeviceObject, - ULONG pTimerRoutine, - ULONG pContext -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcRegisterPhysicalConnection( - ULONG DeviceObject, - ULONG FromUnknown, - ULONG FromPin, - ULONG ToUnknown, - ULONG ToPin -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcRegisterPhysicalConnectionFromExternal( - ULONG DeviceObject, - ULONG FromString, - ULONG FromPin, - ULONG ToUnknown, - ULONG ToPin -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcRegisterPhysicalConnectionToExternal( - ULONG DeviceObject, - ULONG FromUnknown, - ULONG FromPin, - ULONG ToString, - ULONG ToPin -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcRegisterSubdevice( - ULONG DeviceObject, - ULONG SubdevName, - ULONG Unknown -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcRequestNewPowerState( - ULONG pDeviceObject, - ULONG RequestedNewState -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -NTSTATUS STDCALL -PcUnregisterIoTimeout( - ULONG pDeviceObject, - ULONG pTimerRoutine, - ULONG pContext -) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - diff --git a/reactos/drivers/multimedia/portcls.NEW/portcls.def b/reactos/drivers/multimedia/portcls.NEW/portcls.def deleted file mode 100644 index 4ad6a010c50..00000000000 --- a/reactos/drivers/multimedia/portcls.NEW/portcls.def +++ /dev/null @@ -1,55 +0,0 @@ -; -; Exports definition file for portcls.sys -; -EXPORTS -DllInitialize@4 -DllUnload@0 - -; Adapters (adapter.c) -PcAddAdapterDevice@20 -PcInitializeAdapterDriver@12 - -; Factories -PcNewDmaChannel@20 -PcNewInterruptSync@20 -PcNewMiniport@8 -PcNewPort@8 -PcNewRegistryKey@36 -PcNewResourceList@20 -PcNewResourceSublist@20 -PcNewServiceGroup@8 - -; Digital Rights Management (drm.c) -PcAddContentHandlers@12 -PcCreateContentMixed@12 -PcDestroyContent@4 -PcForwardContentToDeviceObject@12 -PcForwardContentToFileObject@8 -PcForwardContentToInterface@12 -PcGetContentRights@8 - -; IRP Helpers -PcCompleteIrp@12 -PcDispatchIrp@8 -PcForwardIrpSynchronous@8 - -; Misc -PcGetTimeInterval@8 -PcRegisterSubdevice@12 - -; Physical Connections -PcRegisterPhysicalConnection@20 -PcRegisterPhysicalConnectionFromExternal@20 -PcRegisterPhysicalConnectionToExternal@20 - -; Power Management -PcRegisterAdapterPowerManagement@8 -PcRequestNewPowerState@8 - -; Properties -PcCompletePendingPropertyRequest@8 -PcGetDeviceProperty@20 - -; Timeouts -PcRegisterIoTimeout@12 -PcUnregisterIoTimeout@12 diff --git a/reactos/drivers/multimedia/portcls.NEW/portcls.h b/reactos/drivers/multimedia/portcls.NEW/portcls.h deleted file mode 100644 index 4dc027db331..00000000000 --- a/reactos/drivers/multimedia/portcls.NEW/portcls.h +++ /dev/null @@ -1,253 +0,0 @@ -/* - - Move to w32api when it is ready. - - */ -#ifndef _PORTCLS_H -#define _PORTCLS_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* This header is total bull**** */ - -#include - -#define PORTCLASSAPI extern - -PORTCLASSAPI NTSTATUS STDCALL -PcAddAdapterDevice( - ULONG DriverObject, - ULONG PhysicalDeviceObject, - ULONG StartDevice, - ULONG MaxObjects, - ULONG DeviceExtensionSize -); - -PORTCLASSAPI NTSTATUS STDCALL -PcAddContentHandlers( - ULONG ContentId, - ULONG paHandlers, - ULONG NumHandlers -); - -PORTCLASSAPI NTSTATUS STDCALL -PcCompleteIrp( - ULONG DeviceObject, - ULONG Irp, - ULONG Status -); - -PORTCLASSAPI NTSTATUS STDCALL -PcCompletePendingPropertyRequest( - ULONG PropertyRequest, - ULONG NtStatus -); - -PORTCLASSAPI NTSTATUS STDCALL -PcCreateContentMixed( - ULONG paContentId, - ULONG cContentId, - ULONG pMixedContentId -); - -PORTCLASSAPI NTSTATUS STDCALL -PcDestroyContent( - ULONG ContentId -); - -PORTCLASSAPI NTSTATUS STDCALL -PcDispatchIrp( - ULONG DeviceObject, - ULONG Irp -); - -PORTCLASSAPI NTSTATUS STDCALL -PcForwardContentToDeviceObject( - ULONG ContentId, - ULONG Reserved, - ULONG DrmForward -); - -PORTCLASSAPI NTSTATUS STDCALL -PcForwardContentToFileObject( - ULONG ContentId, - ULONG FileObject -); - -PORTCLASSAPI NTSTATUS STDCALL -PcForwardContentToInterface( - ULONG ContentId, - ULONG Unknown, - ULONG NumMethods -); - -PORTCLASSAPI NTSTATUS STDCALL -PcForwardIrpSynchronous( - ULONG DeviceObject, - ULONG Irp -); - -PORTCLASSAPI NTSTATUS STDCALL -PcGetContentRights( - ULONG ContentId, - ULONG DrmRights -); - -PORTCLASSAPI NTSTATUS STDCALL -PcGetDeviceProperty( - ULONG DeviceObject, - ULONG DeviceProperty, - ULONG BufferLength, - ULONG PropertyBuffer, - ULONG ResultLength -); - -PORTCLASSAPI ULONGLONG STDCALL -PcGetTimeInterval( - ULONGLONG Timei -); - -PORTCLASSAPI NTSTATUS STDCALL -PcInitializeAdapterDriver( - ULONG DriverObject, - ULONG RegistryPathName, - ULONG AddDevice -); - -PORTCLASSAPI NTSTATUS STDCALL -PcNewDmaChannel( - ULONG OutDmaChannel, - ULONG Unknown, - ULONG PoolType, - ULONG DeviceDescription, - ULONG DeviceObject -); - -PORTCLASSAPI NTSTATUS STDCALL -PcNewInterruptSync( - ULONG OutInterruptSync, - ULONG Unknown, - ULONG ResourceList, - ULONG ResourceIndex, - ULONG Mode -); - -PORTCLASSAPI NTSTATUS STDCALL -PcNewMiniport( - ULONG OutMiniport, - ULONG ClassId -); - -PORTCLASSAPI NTSTATUS STDCALL -PcNewPort( - ULONG OutPort, - ULONG ClassId -); - -PORTCLASSAPI NTSTATUS STDCALL -PcNewRegistryKey( - ULONG OutRegistryKey, - ULONG Unknown, - ULONG RegistryKeyType, - ULONG DesiredAccess, - ULONG DeviceObject, - ULONG SubDevice, - ULONG ObjectAttributes, - ULONG CreateOptions, - ULONG Disposition -); - -PORTCLASSAPI NTSTATUS STDCALL -PcNewResourceList( - ULONG OutResourceList, - ULONG Unknown, - ULONG PoolType, - ULONG TranslatedResources, - ULONG UntranslatedResources -); - -PORTCLASSAPI NTSTATUS STDCALL -PcNewResourceSublist( - ULONG OutResourceList, - ULONG Unknown, - ULONG PoolType, - ULONG ParentList, - ULONG MaximumEntries -); - -PORTCLASSAPI NTSTATUS STDCALL -PcNewServiceGroup( - ULONG OutServiceGroup, - ULONG Unknown -); - -PORTCLASSAPI NTSTATUS STDCALL -PcRegisterAdapterPowerManagement( - ULONG Unknown, - ULONG pvContext -); - -PORTCLASSAPI NTSTATUS STDCALL -PcRegisterIoTimeout( - ULONG pDeviceObject, - ULONG pTimerRoutine, - ULONG pContext -); - -PORTCLASSAPI NTSTATUS STDCALL -PcRegisterPhysicalConnection( - ULONG DeviceObject, - ULONG FromUnknown, - ULONG FromPin, - ULONG ToUnknown, - ULONG ToPin -); - -PORTCLASSAPI NTSTATUS STDCALL -PcRegisterPhysicalConnectionFromExternal( - ULONG DeviceObject, - ULONG FromString, - ULONG FromPin, - ULONG ToUnknown, - ULONG ToPin -); - -PORTCLASSAPI NTSTATUS STDCALL -PcRegisterPhysicalConnectionToExternal( - ULONG DeviceObject, - ULONG FromUnknown, - ULONG FromPin, - ULONG ToString, - ULONG ToPin -); - -PORTCLASSAPI NTSTATUS STDCALL -PcRegisterSubdevice( - ULONG DeviceObject, - ULONG SubdevName, - ULONG Unknown -); - -PORTCLASSAPI NTSTATUS STDCALL -PcRequestNewPowerState( - ULONG pDeviceObject, - ULONG RequestedNewState -); - -PORTCLASSAPI NTSTATUS STDCALL -PcUnregisterIoTimeout( - ULONG pDeviceObject, - ULONG pTimerRoutine, - ULONG pContext -); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/reactos/drivers/multimedia/portcls.NEW/portcls.rbuild b/reactos/drivers/multimedia/portcls.NEW/portcls.rbuild deleted file mode 100644 index 950265286c1..00000000000 --- a/reactos/drivers/multimedia/portcls.NEW/portcls.rbuild +++ /dev/null @@ -1,12 +0,0 @@ - - - - ../include - ntoskrnl - drmk - dll.c - adapter.c - drm.c - stubs.c - portcls.rc - diff --git a/reactos/drivers/multimedia/portcls.NEW/stubs.c b/reactos/drivers/multimedia/portcls.NEW/stubs.c deleted file mode 100644 index 36d59b75631..00000000000 --- a/reactos/drivers/multimedia/portcls.NEW/stubs.c +++ /dev/null @@ -1,338 +0,0 @@ -/* - Port Class API - Stubbed functions -*/ - -#include - -/* - Factory Stubs -*/ - -/* - * @unimplemented - */ -PORTCLASSAPI NTSTATUS NTAPI -PcNewDmaChannel( - OUT PDMACHANNEL* OutDmaChannel, - IN PUNKNOWN OuterUnknown OPTIONAL, - IN POOL_TYPE PoolType, - IN PDEVICE_DESCRIPTION DeviceDescription, - IN PDEVICE_OBJECT DeviceObject) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -PORTCLASSAPI NTSTATUS NTAPI -PcNewInterruptSync( - OUT PINTERRUPTSYNC* OUtInterruptSync, - IN PUNKNOWN OuterUnknown OPTIONAL, - IN PRESOURCELIST ResourceList, - IN ULONG ResourceIndex, - IN INTERRUPTSYNCMODE Mode) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -PORTCLASSAPI NTSTATUS NTAPI -PcNewMiniport( - OUT PMINIPORT* OutMiniport, - IN REFCLSID ClassId) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -PORTCLASSAPI NTSTATUS NTAPI -PcNewPort( - OUT PPORT* OutPort, - IN REFCLSID ClassId) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -PORTCLASSAPI NTSTATUS NTAPI -PcNewRegistryKey( - OUT PREGISTRYKEY* OutRegistryKey, - IN PUNKNOWN OuterUnknown OPTIONAL, - IN ULONG RegistryKeyType, - IN ACCESS_MASK DesiredAccess, - IN PVOID DeviceObject OPTIONAL, - IN PVOID SubDevice OPTIONAL, - IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, - IN ULONG CreateOptions OPTIONAL, - OUT PULONG Disposition OPTIONAL) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -PORTCLASSAPI NTSTATUS NTAPI -PcNewResourceList( - OUT PRESOURCELIST* OutResourceList, - IN PUNKNOWN OuterUnknown OPTIONAL, - IN POOL_TYPE PoolType, - IN PCM_RESOURCE_LIST TranslatedResources, - IN PCM_RESOURCE_LIST UntranslatedResources) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -PORTCLASSAPI NTSTATUS NTAPI -PcNewResourceSublist( - OUT PRESOURCELIST* OutResourceList, - IN PUNKNOWN OuterUnknown OPTIONAL, - IN POOL_TYPE PoolType, - IN PRESOURCELIST ParentList, - IN ULONG MaximumEntries) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -PORTCLASSAPI NTSTATUS NTAPI -PcNewServiceGroup( - OUT PSERVICEGROUP* OutServiceGroup, - IN PUNKNOWN OuterUnknown OPTIONAL) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - - -/* =============================================================== - IRP Handling -*/ - -/* - * @unimplemented - */ -PORTCLASSAPI NTSTATUS NTAPI -PcDispatchIrp( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -PORTCLASSAPI NTSTATUS NTAPI -PcCompleteIrp( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp, - IN NTSTATUS Status) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -PORTCLASSAPI NTSTATUS NTAPI -PcForwardIrpSynchronous( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - - -/* =============================================================== - Power Management -*/ - -/* - * @unimplemented - */ -PORTCLASSAPI NTSTATUS NTAPI -PcRegisterAdapterPowerManagement( - IN PUNKNOWN pUnknown, - IN PVOID pvContext1) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -PORTCLASSAPI NTSTATUS NTAPI -PcRequestNewPowerState( - IN PDEVICE_OBJECT pDeviceObject, - IN DEVICE_POWER_STATE RequestedNewState) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - - -/* =============================================================== - Properties -*/ - -/* - * @unimplemented - */ -PORTCLASSAPI NTSTATUS NTAPI -PcGetDeviceProperty( - IN PVOID DeviceObject, - IN DEVICE_REGISTRY_PROPERTY DeviceProperty, - IN ULONG BufferLength, - OUT PVOID PropertyBuffer, - OUT PULONG ResultLength) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -PORTCLASSAPI NTSTATUS NTAPI -PcCompletePendingPropertyRequest( - IN PPCPROPERTY_REQUEST PropertyRequest, - IN NTSTATUS NtStatus) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - - -/* =============================================================== - I/O Timeouts -*/ - -/* - * @unimplemented - */ -PORTCLASSAPI NTSTATUS NTAPI -PcRegisterIoTimeout( - IN PDEVICE_OBJECT pDeviceObject, - IN PIO_TIMER_ROUTINE pTimerRoutine, - IN PVOID pContext) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -PORTCLASSAPI NTSTATUS NTAPI -PcUnregisterIoTimeout( - IN PDEVICE_OBJECT pDeviceObject, - IN PIO_TIMER_ROUTINE pTimerRoutine, - IN PVOID pContext) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - - -/* =============================================================== - Physical Connections -*/ - -/* - * @unimplemented - */ -PORTCLASSAPI NTSTATUS NTAPI -PcRegisterPhysicalConnection( - IN PDEVICE_OBJECT DeviceObject, - IN PUNKNOWN FromUnknown, - IN ULONG FromPin, - IN PUNKNOWN ToUnknown, - IN ULONG ToPin) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -PORTCLASSAPI NTSTATUS NTAPI -PcRegisterPhysicalConnectionFromExternal( - IN PDEVICE_OBJECT DeviceObject, - IN PUNICODE_STRING FromString, - IN ULONG FromPin, - IN PUNKNOWN ToUnknown, - IN ULONG ToPin) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -PORTCLASSAPI NTSTATUS NTAPI -PcRegisterPhysicalConnectionToExternal( - IN PDEVICE_OBJECT DeviceObject, - IN PUNKNOWN FromUnknown, - IN ULONG FromPin, - IN PUNICODE_STRING ToString, - IN ULONG ToPin) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - - -/* =============================================================== - Misc -*/ - -/* - * @unimplemented - */ -PORTCLASSAPI ULONGLONG NTAPI -PcGetTimeInterval( - IN ULONGLONG Since) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - * @unimplemented - */ -PORTCLASSAPI NTSTATUS NTAPI -PcRegisterSubdevice( - IN PDEVICE_OBJECT DeviceObject, - IN PWCHAR Name, - IN PUNKNOWN Unknown) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} diff --git a/reactos/drivers/multimedia/x/allocators.c b/reactos/drivers/multimedia/x/allocators.c deleted file mode 100644 index 4fc778b75dc..00000000000 --- a/reactos/drivers/multimedia/x/allocators.c +++ /dev/null @@ -1,70 +0,0 @@ -/* =============================================================== - Allocator Functions -*/ - -#include - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsCreateAllocator( - IN HANDLE ConnectionHandle, - IN PKSALLOCATOR_FRAMING AllocatorFraming, - OUT PHANDLE AllocatorHandle) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsCreateDefaultAllocator( - IN PIRP Irp) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsValidateAllocatorCreateRequest( - IN PIRP Irp, - OUT PKSALLOCATOR_FRAMING* AllocatorFraming) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsCreateDefaultAllocatorEx( - IN PIRP Irp, - IN PVOID InitializeContext OPTIONAL, - IN PFNKSDEFAULTALLOCATE DefaultAllocate OPTIONAL, - IN PFNKSDEFAULTFREE DefaultFree OPTIONAL, - IN PFNKSINITIALIZEALLOCATOR InitializeAllocator OPTIONAL, - IN PFNKSDELETEALLOCATOR DeleteAllocator OPTIONAL) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsValidateAllocatorFramingEx( - IN PKSALLOCATOR_FRAMING_EX Framing, - IN ULONG BufferSize, - IN const KSALLOCATOR_FRAMING_EX* PinFraming) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} diff --git a/reactos/drivers/multimedia/x/clocks.c b/reactos/drivers/multimedia/x/clocks.c deleted file mode 100644 index a075bbff966..00000000000 --- a/reactos/drivers/multimedia/x/clocks.c +++ /dev/null @@ -1,124 +0,0 @@ -/* =============================================================== - Clock Functions -*/ - -#include - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsCreateClock( - IN HANDLE ConnectionHandle, - IN PKSCLOCK_CREATE ClockCreate, - OUT PHANDLE ClockHandle) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsCreateDefaultClock( - IN PIRP Irp, - IN PKSDEFAULTCLOCK DefaultClock) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsAllocateDefaultClock( - OUT PKSDEFAULTCLOCK* DefaultClock) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsAllocateDefaultClockEx( - OUT PKSDEFAULTCLOCK* DefaultClock, - IN PVOID Context OPTIONAL, - IN PFNKSSETTIMER SetTimer OPTIONAL, - IN PFNKSCANCELTIMER CancelTimer OPTIONAL, - IN PFNKSCORRELATEDTIME CorrelatedTime OPTIONAL, - IN const KSRESOLUTION* Resolution OPTIONAL, - IN ULONG Flags) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI VOID NTAPI -KsFreeDefaultClock( - IN PKSDEFAULTCLOCK DefaultClock) -{ - UNIMPLEMENTED; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsValidateClockCreateRequest( - IN PIRP Irp, - OUT PKSCLOCK_CREATE* ClockCreate) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI KSSTATE NTAPI -KsGetDefaultClockState( - IN PKSDEFAULTCLOCK DefaultClock) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI VOID NTAPI -KsSetDefaultClockState( - IN PKSDEFAULTCLOCK DefaultClock, - IN KSSTATE State) -{ - UNIMPLEMENTED; -} - -/* - @unimplemented -*/ -KSDDKAPI LONGLONG NTAPI -KsGetDefaultClockTime( - IN PKSDEFAULTCLOCK DefaultClock) -{ - UNIMPLEMENTED; - return 0; -} - -/* - @unimplemented -*/ -KSDDKAPI VOID NTAPI -KsSetDefaultClockTime( - IN PKSDEFAULTCLOCK DefaultClock, - IN LONGLONG Time) -{ - UNIMPLEMENTED; -} diff --git a/reactos/drivers/multimedia/x/connectivity.c b/reactos/drivers/multimedia/x/connectivity.c deleted file mode 100644 index 23defde4f8f..00000000000 --- a/reactos/drivers/multimedia/x/connectivity.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - KsCreatePin - KsValidateConnectRequest - KsPinPropertyHandler - KsPinDataIntersection - KsHandleSizedListQuery -*/ - -#include - -KSDDKAPI NTSTATUS NTAPI -KsCreatePin( - IN HANDLE FilterHandle, - IN PKSPIN_CONNECT Connect, - IN ACCESS_MASK DesiredAccess, - OUT PHANDLE ConnectionHandle) -{ - return STATUS_SUCCESS; -} - -KSDDKAPI NTSTATUS NTAPI -KsValidateConnectRequest( - IN PIRP Irp, - IN ULONG DescriptorsCount, - IN KSPIN_DESCRIPTOR* Descriptor, - OUT PKSPIN_CONNECT* Connect) -{ - return STATUS_SUCCESS; -} - -KSDDKAPI NTSTATUS NTAPI -KsPinPropertyHandler( - IN PIRP Irp, - IN PKSPROPERTY Property, - IN OUT PVOID Data, - IN ULONG DescriptorsCount, - IN const KSPIN_DESCRIPTOR* Descriptor) -{ - return STATUS_SUCCESS; -} - -KSDDKAPI NTSTATUS NTAPI -KsPinDataIntersection( - IN PIRP Irp, - IN PKSPIN Pin, - OUT PVOID Data, - IN ULONG DescriptorsCount, - IN const KSPIN_DESCRIPTOR* Descriptor, - IN PFNKSINTERSECTHANDLER IntersectHandler) -{ - return STATUS_SUCCESS; -} - -/* Does this belong here? */ - -KSDDKAPI NTSTATUS NTAPI -KsHandleSizedListQuery( - IN PIRP Irp, - IN ULONG DataItemsCount, - IN ULONG DataItemSize, - IN const VOID* DataItems) -{ - return STATUS_SUCCESS; -} diff --git a/reactos/drivers/multimedia/x/events.c b/reactos/drivers/multimedia/x/events.c deleted file mode 100644 index 814d65e8c7a..00000000000 --- a/reactos/drivers/multimedia/x/events.c +++ /dev/null @@ -1,100 +0,0 @@ -#include - -/* =============================================================== - Event Functions -*/ - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsGenerateEvent( - IN PKSEVENT_ENTRY EntryEvent) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsEnableEventWithAllocator( - IN PIRP Irp, - IN ULONG EventSetsCount, - IN PKSEVENT_SET EventSet, - IN OUT PLIST_ENTRY EventsList OPTIONAL, - IN KSEVENTS_LOCKTYPE EventsFlags OPTIONAL, - IN PVOID EventsLock OPTIONAL, - IN PFNKSALLOCATOR Allocator OPTIONAL, - IN ULONG EventItemSize OPTIONAL) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsGenerateDataEvent( - IN PKSEVENT_ENTRY EventEntry, - IN ULONG DataSize, - IN PVOID Data) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsEnableEvent( - IN PIRP Irp, - IN ULONG EventSetsCount, - IN KSEVENT_SET* EventSet, - IN OUT PLIST_ENTRY EventsList OPTIONAL, - IN KSEVENTS_LOCKTYPE EventsFlags OPTIONAL, - IN PVOID EventsLock OPTIONAL) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI VOID NTAPI -KsDiscardEvent( - IN PKSEVENT_ENTRY EventEntry) -{ - UNIMPLEMENTED; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsDisableEvent( - IN PIRP Irp, - IN OUT PLIST_ENTRY EventsList, - IN KSEVENTS_LOCKTYPE EventsFlags, - IN PVOID EventsLock) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI VOID NTAPI -KsFreeEventList( - IN PFILE_OBJECT FileObject, - IN OUT PLIST_ENTRY EventsList, - IN KSEVENTS_LOCKTYPE EVentsFlags, - IN PVOID EventsLock) -{ - UNIMPLEMENTED; -} diff --git a/reactos/drivers/multimedia/x/irp.c b/reactos/drivers/multimedia/x/irp.c deleted file mode 100644 index 8924ee6db3e..00000000000 --- a/reactos/drivers/multimedia/x/irp.c +++ /dev/null @@ -1,479 +0,0 @@ -/* - ReactOS Kernel Streaming - IRP Helpers -*/ - -#include - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsAcquireResetValue( - IN PIRP Irp, - OUT KSRESET* ResetValue) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI VOID NTAPI -KsAddIrpToCancelableQueue( - IN OUT PLIST_ENTRY QueueHead, - IN PKSPIN_LOCK SpinLock, - IN PIRP Irp, - IN KSLIST_ENTRY_LOCATION ListLocation, - IN PDRIVER_CANCEL DriverCancel OPTIONAL) -{ - UNIMPLEMENTED; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsAddObjectCreateItemToDeviceHeader( - IN KSDEVICE_HEADER Header, - IN PDRIVER_DISPATCH Create, - IN PVOID Context, - IN PWCHAR ObjectClass, - IN PSECURITY_DESCRIPTOR SecurityDescriptor) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsAddObjectCreateItemToObjectHeader( - IN KSOBJECT_HEADER Header, - IN PDRIVER_DISPATCH Create, - IN PVOID Context, - IN PWCHAR ObjectClass, - IN PSECURITY_DESCRIPTOR SecurityDescriptor) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsAllocateDeviceHeader( - OUT PVOID Header, - IN ULONG ItemsCount, - IN PKSOBJECT_CREATE_ITEM ItemsList OPTIONAL) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsAllocateExtraData( - IN PIRP Irp, - IN ULONG ExtraSize, - OUT PVOID* ExtraBuffer) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsAllocateObjectCreateItem( - IN KSDEVICE_HEADER Header, - IN PKSOBJECT_CREATE_ITEM CreateItem, - IN BOOL AllocateEntry, - IN PFNKSITEMFREECALLBACK ItemFreeCallback OPTIONAL) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsAllocateObjectHeader( - OUT PVOID Header, - IN ULONG ItemsCount, - IN PKSOBJECT_CREATE_ITEM ItemsList OPTIONAL, - IN PIRP Irp, - IN KSDISPATCH_TABLE* Table) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI VOID NTAPI -KsCancelIo( - IN OUT PLIST_ENTRY QueueHead, - IN PKSPIN_LOCK SpinLock) -{ - UNIMPLEMENTED; -} - -/* - @unimplemented -*/ -KSDDKAPI VOID NTAPI -KsCancelRoutine( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) -{ - UNIMPLEMENTED; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsDefaultDeviceIoCompletion( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI BOOLEAN NTAPI -KsDispatchFastIoDeviceControlFailure( - IN PFILE_OBJECT FileObject, - IN BOOLEAN Wait, - IN PVOID InputBuffer OPTIONAL, - IN ULONG InputBufferLength, - OUT PVOID OutputBuffer OPTIONAL, - IN ULONG OutputBufferLength, - IN ULONG IoControlCode, - OUT PIO_STATUS_BLOCK IoStatus, - IN PDEVICE_OBJECT DeviceObject) /* always return false */ -{ - return FALSE; -} - -/* - @unimplemented -*/ -KSDDKAPI BOOLEAN NTAPI -KsDispatchFastReadFailure( - IN PFILE_OBJECT FileObject, - IN PLARGE_INTEGER FileOffset, - IN ULONG Length, - IN BOOLEAN Wait, - IN ULONG LockKey, - OUT PVOID Buffer, - OUT PIO_STATUS_BLOCK IoStatus, - IN PDEVICE_OBJECT DeviceObject) /* always return false */ -{ - return FALSE; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsDispatchInvalidDeviceRequest( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsDispatchIrp( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsDispatchSpecificMethod( - IN PIRP Irp, - IN PFNKSHANDLER Handler) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsDispatchSpecificProperty( - IN PIRP Irp, - IN PFNKSHANDLER Handler) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsForwardAndCatchIrp( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp, - IN PFILE_OBJECT FileObject, - IN KSSTACK_USE StackUse) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsForwardIrp( - IN PIRP Irp, - IN PFILE_OBJECT FileObject, - IN BOOLEAN ReuseStackLocation) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI VOID NTAPI -KsFreeDeviceHeader( - IN PVOID Header) -{ - UNIMPLEMENTED; -} - -/* - @unimplemented -*/ -KSDDKAPI VOID NTAPI -KsFreeObjectHeader( - IN PVOID Header) -{ - UNIMPLEMENTED; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsGetChildCreateParameter( - IN PIRP Irp, - OUT PVOID* CreateParameter) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsMoveIrpsOnCancelableQueue( - IN OUT PLIST_ENTRY SourceList, - IN PKSPIN_LOCK SourceLock, - IN OUT PLIST_ENTRY DestinationList, - IN PKSPIN_LOCK DestinationLock OPTIONAL, - IN KSLIST_ENTRY_LOCATION ListLocation, - IN PFNKSIRPLISTCALLBACK ListCallback, - IN PVOID Context) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsProbeStreamIrp( - IN PIRP Irp, - IN ULONG ProbeFlags, - IN ULONG HeaderSize) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsQueryInformationFile( - IN PFILE_OBJECT FileObject, - OUT PVOID FileInformation, - IN ULONG Length, - IN FILE_INFORMATION_CLASS FileInformationClass) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI ACCESS_MASK NTAPI -KsQueryObjectAccessMask( - IN KSOBJECT_HEADER Header) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI PKSOBJECT_CREATE_ITEM NTAPI -KsQueryObjectCreateItem( - IN KSOBJECT_HEADER Header) -{ - UNIMPLEMENTED; -/* return STATUS_UNSUCCESSFUL; */ - return NULL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsReadFile( - IN PFILE_OBJECT FileObject, - IN PKEVENT Event OPTIONAL, - IN PVOID PortContext OPTIONAL, - OUT PIO_STATUS_BLOCK IoStatusBlock, - OUT PVOID Buffer, - IN ULONG Length, - IN ULONG Key OPTIONAL, - IN KPROCESSOR_MODE RequestorMode) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI VOID NTAPI -KsReleaseIrpOnCancelableQueue( - IN PIRP Irp, - IN PDRIVER_CANCEL DriverCancel OPTIONAL) -{ - UNIMPLEMENTED; -} - -/* - @unimplemented -*/ -KSDDKAPI PIRP NTAPI -KsRemoveIrpFromCancelableQueue( - IN OUT PLIST_ENTRY QueueHead, - IN PKSPIN_LOCK SpinLock, - IN KSLIST_ENTRY_LOCATION ListLocation, - IN KSIRP_REMOVAL_OPERATION RemovalOperation) -{ - UNIMPLEMENTED; - return NULL; - /*return STATUS_UNSUCCESSFUL; */ -} - -/* - @unimplemented -*/ -KSDDKAPI VOID NTAPI -KsRemoveSpecificIrpFromCancelableQueue( - IN PIRP Irp) -{ - UNIMPLEMENTED; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsSetInformationFile( - IN PFILE_OBJECT FileObject, - IN PVOID FileInformation, - IN ULONG Length, - IN FILE_INFORMATION_CLASS FileInformationClass) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsSetMajorFunctionHandler( - IN PDRIVER_OBJECT DriverObject, - IN ULONG MajorFunction) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsStreamIo( - IN PFILE_OBJECT FileObject, - IN PKEVENT Event OPTIONAL, - IN PVOID PortContext OPTIONAL, - IN PIO_COMPLETION_ROUTINE CompletionRoutine OPTIONAL, - IN PVOID CompletionContext OPTIONAL, - IN KSCOMPLETION_INVOCATION CompletionInvocationFlags OPTIONAL, - OUT PIO_STATUS_BLOCK IoStatusBlock, - IN OUT PVOID StreamHeaders, - IN ULONG Length, - IN ULONG Flags, - IN KPROCESSOR_MODE RequestorMode) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI - KsWriteFile( - IN PFILE_OBJECT FileObject, - IN PKEVENT Event OPTIONAL, - IN PVOID PortContext OPTIONAL, - OUT PIO_STATUS_BLOCK IoStatusBlock, - IN PVOID Buffer, - IN ULONG Length, - IN ULONG Key OPTIONAL, - IN KPROCESSOR_MODE RequestorMode) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} diff --git a/reactos/drivers/multimedia/x/ks.def b/reactos/drivers/multimedia/x/ks.def deleted file mode 100644 index f146fc5f53f..00000000000 --- a/reactos/drivers/multimedia/x/ks.def +++ /dev/null @@ -1,111 +0,0 @@ -; -; Exports definition file for ks.sys -; - -EXPORTS -KsCreateAllocator@12 -KsCreateDefaultAllocator@4 -KsValidateAllocatorCreateRequest@8 -KsCreateDefaultAllocatorEx@24 -KsValidateAllocatorFramingEx@12 - -KsCreateClock@12 -KsCreateDefaultClock@8 -KsAllocateDefaultClock@4 -KsAllocateDefaultClockEx@28 -KsFreeDefaultClock@4 -KsValidateClockCreateRequest@8 -KsGetDefaultClockState@4 -KsSetDefaultClockState@8 -KsGetDefaultClockTime@4 -KsSetDefaultClockTime@12 - -KsMethodHandler@12 -KsMethodHandlerWithAllocator@20 -KsFastMethodHandler@32 - -KsPropertyHandler@12 -KsPropertyHandlerWithAllocator@20 -KsUnserializeObjectPropertiesFromRegistry@12 -KsFastPropertyHandler@32 - -KsGenerateEvent@4 -KsEnableEventWithAllocator@32 -KsGenerateDataEvent@12 -KsEnableEvent@24 -KsDiscardEvent@4 -KsDisableEvent@16 -KsFreeEventList@16 - -KsValidateTopologyNodeCreateRequest@12 -KsCreateTopologyNode@16 -KsTopologyPropertyHandler@16 - -KsCreatePin@16 -KsValidateConnectRequest@16 -KsPinPropertyHandler@20 -KsPinDataIntersection@24 - -KsHandleSizedListQuery@16 - -KsAcquireResetValue@8 -KsAddIrpToCancelableQueue@20 -KsAddObjectCreateItemToDeviceHeader@20 -KsAddObjectCreateItemToObjectHeader@20 -KsAllocateDeviceHeader@12 -KsAllocateExtraData@12 -KsAllocateObjectCreateItem@16 -KsAllocateObjectHeader@20 -KsCancelIo@8 -KsCancelRoutine@8 -KsDefaultDeviceIoCompletion@8 -KsDispatchFastIoDeviceControlFailure@36 -KsDispatchFastReadFailure@32 -; KsDispatchFastWriteFailure@32 -KsDispatchInvalidDeviceRequest@8 -KsDispatchIrp@8 -KsDispatchSpecificMethod@8 -KsDispatchSpecificProperty@8 -KsForwardAndCatchIrp@16 -KsForwardIrp@12 -KsFreeDeviceHeader@4 -KsFreeObjectHeader@4 -KsGetChildCreateParameter@8 -KsMoveIrpsOnCancelableQueue@28 -KsProbeStreamIrp@12 -KsQueryInformationFile@16 -KsQueryObjectAccessMask@4 -KsQueryObjectCreateItem@4 -KsReadFile@32 -KsReleaseIrpOnCancelableQueue@8 -KsRemoveIrpFromCancelableQueue@16 -KsRemoveSpecificIrpFromCancelableQueue@4 -KsSetInformationFile@16 -KsSetMajorFunctionHandler@8 -KsStreamIo@44 -KsWriteFile@32 - -KsRegisterWorker@8 -KsUnregisterWorker@4 -KsRegisterCountedWorker@12 -KsDecrementCountedWorker@4 -KsIncrementCountedWorker@4 -KsQueueWorkItem@8 - -KsCacheMedium@12 -KsDefaultDispatchPnp@8 -KsSetDevicePnpAndBaseObject@12 -KsDefaultDispatchPower@8 -KsSetPowerDispatch@12 -KsReferenceBusObject@4 -KsDereferenceBusObject@4 -KsFreeObjectCreateItem@8 -KsFreeObjectCreateItemsByContext@8 -KsLoadResource@24 -; KsNullDriverUnload@4 -KsPinDataIntersectionEx@32 -KsQueryDevicePnpObject@4 -KsRecalculateStackDepth@8 -KsSetTargetDeviceObject@8 -KsSetTargetState@8 -KsSynchronousIoControlDevice@32 diff --git a/reactos/drivers/multimedia/x/ks.rbuild b/reactos/drivers/multimedia/x/ks.rbuild deleted file mode 100644 index cf7675c08be..00000000000 --- a/reactos/drivers/multimedia/x/ks.rbuild +++ /dev/null @@ -1,20 +0,0 @@ - - . - .. - ../include - - ntoskrnl - - - ks.rc - allocators.c - clocks.c - connectivity.c - events.c - irp.c - methods.c - misc.c - properties.c - topology.c - worker.c - diff --git a/reactos/drivers/multimedia/x/ks.rc b/reactos/drivers/multimedia/x/ks.rc deleted file mode 100644 index 197b8208366..00000000000 --- a/reactos/drivers/multimedia/x/ks.rc +++ /dev/null @@ -1,5 +0,0 @@ -#define REACTOS_VERSION_DLL -#define REACTOS_STR_FILE_DESCRIPTION "Kernel Streaming API\0" -#define REACTOS_STR_INTERNAL_NAME "ks\0" -#define REACTOS_STR_ORIGINAL_FILENAME "ks.sys\0" -#include diff --git a/reactos/drivers/multimedia/x/methods.c b/reactos/drivers/multimedia/x/methods.c deleted file mode 100644 index f766c1b41dd..00000000000 --- a/reactos/drivers/multimedia/x/methods.c +++ /dev/null @@ -1,51 +0,0 @@ -/* =============================================================== - Method Functions -*/ - -#include - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsMethodHandler( - IN PIRP Irp, - IN ULONG MethodSetsCount, - IN PKSMETHOD_SET MethodSet) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsMethodHandlerWithAllocator( - IN PIRP Irp, - IN ULONG MethodSetsCount, - IN PKSMETHOD_SET MethodSet, - IN PFNKSALLOCATOR Allocator OPTIONAL, - IN ULONG MethodItemSize OPTIONAL) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI BOOLEAN NTAPI -KsFastMethodHandler( - IN PFILE_OBJECT FileObject, - IN PKSMETHOD UNALIGNED Method, - IN ULONG MethodLength, - IN OUT PVOID UNALIGNED Data, - IN ULONG DataLength, - OUT PIO_STATUS_BLOCK IoStatus, - IN ULONG MethodSetsCount, - IN const KSMETHOD_SET* MethodSet) -{ - UNIMPLEMENTED; - return FALSE; -} diff --git a/reactos/drivers/multimedia/x/misc.c b/reactos/drivers/multimedia/x/misc.c deleted file mode 100644 index 7e5303ec6e3..00000000000 --- a/reactos/drivers/multimedia/x/misc.c +++ /dev/null @@ -1,218 +0,0 @@ -#include - -/* =============================================================== - Misc. Helper Functions -*/ - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsCacheMedium( - IN PUNICODE_STRING SymbolicLink, - IN PKSPIN_MEDIUM Medium, - IN DWORD PinDirection) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsDefaultDispatchPnp( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI VOID NTAPI -KsSetDevicePnpAndBaseObject( - IN KSDEVICE_HEADER Header, - IN PDEVICE_OBJECT PnpDeviceObject, - IN PDEVICE_OBJECT BaseDevice) -{ - UNIMPLEMENTED; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsDefaultDispatchPower( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI VOID NTAPI -KsSetPowerDispatch( - IN KSOBJECT_HEADER Header, - IN PFNKSCONTEXT_DISPATCH PowerDispatch OPTIONAL, - IN PVOID PowerContext OPTIONAL) -{ - UNIMPLEMENTED; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsReferenceBusObject( - IN KSDEVICE_HEADER Header) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI VOID NTAPI -KsDereferenceBusObject( - IN KSDEVICE_HEADER Header) -{ - UNIMPLEMENTED; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsFreeObjectCreateItem( - IN KSDEVICE_HEADER Header, - IN PUNICODE_STRING CreateItem) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsFreeObjectCreateItemsByContext( - IN KSDEVICE_HEADER Header, - IN PVOID Context) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsLoadResource( - IN PVOID ImageBase, - IN POOL_TYPE PoolType, - IN ULONG_PTR ResourceName, - IN ULONG ResourceType, - OUT PVOID* Resource, - OUT PULONG ResourceSize) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -VOID -KsNullDriverUnload( - IN PDRIVER_OBJECT DriverObject) -{ - UNIMPLEMENTED; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsPinDataIntersectionEx( - IN PIRP Irp, - IN PKSP_PIN Pin, - OUT PVOID Data, - IN ULONG DescriptorsCount, - IN const KSPIN_DESCRIPTOR* Descriptor, - IN ULONG DescriptorSize, - IN PFNKSINTERSECTHANDLEREX IntersectHandler OPTIONAL, - IN PVOID HandlerContext OPTIONAL) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI PDEVICE_OBJECT NTAPI -KsQueryDevicePnpObject( - IN KSDEVICE_HEADER Header) -{ - UNIMPLEMENTED; - return NULL; -} - -/* - @unimplemented -*/ -KSDDKAPI VOID NTAPI -KsRecalculateStackDepth( - IN KSDEVICE_HEADER Header, - IN BOOLEAN ReuseStackLocation) -{ - UNIMPLEMENTED; -} - -/* - @unimplemented -*/ -KSDDKAPI VOID NTAPI -KsSetTargetDeviceObject( - IN KSOBJECT_HEADER Header, - IN PDEVICE_OBJECT TargetDevice OPTIONAL) -{ - UNIMPLEMENTED; -} - -/* - @unimplemented -*/ -KSDDKAPI VOID NTAPI -KsSetTargetState( - IN KSOBJECT_HEADER Header, - IN KSTARGET_STATE TargetState) -{ - UNIMPLEMENTED; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsSynchronousIoControlDevice( - IN PFILE_OBJECT FileObject, - IN KPROCESSOR_MODE RequestorMode, - IN DWORD IoControl, - IN PVOID InBuffer, - IN ULONG InSize, - OUT PVOID OutBuffer, - IN ULONG OUtSize, - OUT PULONG BytesReturned) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - diff --git a/reactos/drivers/multimedia/x/properties.c b/reactos/drivers/multimedia/x/properties.c deleted file mode 100644 index 84a223784e6..00000000000 --- a/reactos/drivers/multimedia/x/properties.c +++ /dev/null @@ -1,64 +0,0 @@ -#include - -/* =============================================================== - Property Functions -*/ - -/* - @unimplemented -*/ -KSDDKAPI BOOLEAN NTAPI -KsFastPropertyHandler( - IN PFILE_OBJECT FileObject, - IN PKSPROPERTY UNALIGNED Property, - IN ULONG PropertyLength, - IN OUT PVOID UNALIGNED Data, - IN ULONG DataLength, - OUT PIO_STATUS_BLOCK IoStatus, - IN ULONG PropertySetsCount, - IN const KSPROPERTY_SET* PropertySet) -{ - UNIMPLEMENTED; - return FALSE; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsPropertyHandler( - IN PIRP Irp, - IN ULONG PropertySetsCount, - IN const KSPROPERTY_SET* PropertySet) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsPropertyHandlerWithAllocator( - IN PIRP Irp, - IN ULONG PropertySetsCount, - IN PKSPROPERTY_SET PropertySet, - IN PFNKSALLOCATOR Allocator OPTIONAL, - IN ULONG PropertyItemSize OPTIONAL) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsUnserializeObjectPropertiesFromRegistry( - IN PFILE_OBJECT FileObject, - IN HANDLE ParentKey OPTIONAL, - IN PUNICODE_STRING RegistryPath OPTIONAL) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} diff --git a/reactos/drivers/multimedia/x/topology.c b/reactos/drivers/multimedia/x/topology.c deleted file mode 100644 index df5049444ab..00000000000 --- a/reactos/drivers/multimedia/x/topology.c +++ /dev/null @@ -1,46 +0,0 @@ -#include - -/* =============================================================== - Topology Functions -*/ - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsCreateTopologyNode( - IN HANDLE ParentHandle, - IN PKSNODE_CREATE NodeCreate, - IN ACCESS_MASK DesiredAccess, - OUT PHANDLE NodeHandle) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsValidateTopologyNodeCreateRequest( - IN PIRP Irp, - IN PKSTOPOLOGY Topology, - OUT PKSNODE_CREATE* NodeCreate) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsTopologyPropertyHandler( - IN PIRP Irp, - IN PKSPROPERTY Property, - IN OUT PVOID Data, - IN const KSTOPOLOGY* Topology) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} diff --git a/reactos/drivers/multimedia/x/worker.c b/reactos/drivers/multimedia/x/worker.c deleted file mode 100644 index f47e9a2780d..00000000000 --- a/reactos/drivers/multimedia/x/worker.c +++ /dev/null @@ -1,74 +0,0 @@ -/* =============================================================== - Worker Management Functions -*/ - -#include - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsRegisterWorker( - IN WORK_QUEUE_TYPE WorkQueueType, - OUT PKSWORKER* Worker) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI VOID NTAPI -KsUnregisterWorker( - IN PKSWORKER Worker) -{ - UNIMPLEMENTED; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsRegisterCountedWorker( - IN WORK_QUEUE_TYPE WorkQueueType, - IN PWORK_QUEUE_ITEM CountedWorkItem, - OUT PKSWORKER* Worker) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} - -/* - @unimplemented -*/ -KSDDKAPI ULONG NTAPI -KsDecrementCountedWorker( - IN PKSWORKER Worker) -{ - UNIMPLEMENTED; - return 0; -} - -/* - @unimplemented -*/ -KSDDKAPI ULONG NTAPI -KsIncrementCountedWorker( - IN PKSWORKER Worker) -{ - UNIMPLEMENTED; - return 0; -} - -/* - @unimplemented -*/ -KSDDKAPI NTSTATUS NTAPI -KsQueueWorkItem( - IN PKSWORKER Worker, - IN PWORK_QUEUE_ITEM WorkItem) -{ - UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; -} diff --git a/reactos/drivers/parallel/parclass/.gitignore b/reactos/drivers/parallel/parclass/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/drivers/parallel/parport/.gitignore b/reactos/drivers/parallel/parport/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/drivers/storage/classpnp/.gitignore b/reactos/drivers/storage/classpnp/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/drivers/storage/fdc/fdc/.gitignore b/reactos/drivers/storage/fdc/fdc/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/drivers/storage/fdc/flpydisk/.gitignore b/reactos/drivers/storage/fdc/flpydisk/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/drivers/wdm/audio/backpln/adapters/dmusic/.gitignore b/reactos/drivers/wdm/audio/backpln/adapters/dmusic/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/drivers/wdm/audio/backpln/portcls/portcls.rc b/reactos/drivers/wdm/audio/backpln/portcls/portcls.rc deleted file mode 100644 index 03edd6d1341..00000000000 --- a/reactos/drivers/wdm/audio/backpln/portcls/portcls.rc +++ /dev/null @@ -1,5 +0,0 @@ -#define REACTOS_VERSION_DLL -#define REACTOS_STR_FILE_DESCRIPTION "PORTCLS Port Class Driver API\0" -#define REACTOS_STR_INTERNAL_NAME "portcls\0" -#define REACTOS_STR_ORIGINAL_FILENAME "portcls.sys\0" -#include diff --git a/reactos/drivers/wdm/audio/filters/kmixer/.gitignore b/reactos/drivers/wdm/audio/filters/kmixer/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/drivers/wdm/audio/filters/splitter/.gitignore b/reactos/drivers/wdm/audio/filters/splitter/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/drivers/wdm/audio/filters/swmidi/.gitignore b/reactos/drivers/wdm/audio/filters/swmidi/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/drivers/wdm/audio/sysaudio/.gitignore b/reactos/drivers/wdm/audio/sysaudio/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/importlibs/.gitignore b/reactos/importlibs/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/include/dxsdk/DShowIDL/.gitignore b/reactos/include/dxsdk/DShowIDL/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/include/reactos/elf/elf/.gitignore b/reactos/include/reactos/elf/elf/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/include/reactos/winsock/.gitignore b/reactos/include/reactos/winsock/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/lib/3rdparty/.gitignore b/reactos/lib/3rdparty/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/lib/dnslib/.gitignore b/reactos/lib/dnslib/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/ntoskrnl/mm/ARM3/.gitignore b/reactos/ntoskrnl/mm/ARM3/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/ntoskrnl/mm/ARM3/arm/.gitignore b/reactos/ntoskrnl/mm/ARM3/arm/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/ntoskrnl/mm/ARM3/i386/.gitignore b/reactos/ntoskrnl/mm/ARM3/i386/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/subsystems/.gitignore b/reactos/subsystems/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/subsystems/win32/.gitignore b/reactos/subsystems/win32/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/tools/CMakeLists.txt b/reactos/tools/CMakeLists.txt deleted file mode 100644 index 13354b748b2..00000000000 --- a/reactos/tools/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ - -#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) -add_subdirectory(mkshelllink) - -if(NOT MSVC) -add_subdirectory(rsym) -add_subdirectory(widl) -add_subdirectory(wpp) -add_subdirectory(wrc) -endif() diff --git a/reactos/tools/bin2c.c b/reactos/tools/bin2c.c deleted file mode 100644 index c5dd0744866..00000000000 --- a/reactos/tools/bin2c.c +++ /dev/null @@ -1,48 +0,0 @@ -#include - -FILE *in; -FILE *out; - -int main(int argc, char *argv[]) -{ - unsigned char ch; - int cnt = 0; - - if (argc < 4) - { - printf("usage: bin2c infile.bin outfile.h array_name\n"); - return -1; - } - - if ((in = fopen(argv[1], "rb")) == NULL) - { - printf("Couldn't open data file.\n"); - return -1; - } - if ((out = fopen(argv[2], "wb")) == NULL) - { - printf("Couldn't open output file.\n"); - return -1; - } - - fprintf(out, "unsigned char %s[] = {\n", argv[3]); - - ch = fgetc(in); - while (!feof(in)) - { - if (cnt != 0) - fprintf(out, ", "); - if (!(cnt % 16)) - fprintf(out, "\n"); - fprintf(out, "0x%02x", (int)ch); - cnt++; - ch = fgetc(in); - } - - fprintf(out, "\n};\n"); - - fclose(in); - fclose(out); - - return 0; -} diff --git a/reactos/tools/bin2c.mak b/reactos/tools/bin2c.mak deleted file mode 100644 index 2236efe89df..00000000000 --- a/reactos/tools/bin2c.mak +++ /dev/null @@ -1,36 +0,0 @@ -BIN2C_BASE = $(TOOLS_BASE) -BIN2C_BASE_ = $(BIN2C_BASE)$(SEP) - -BIN2C_INT = $(INTERMEDIATE_)$(BIN2C_BASE) -BIN2C_INT_ = $(BIN2C_INT)$(SEP) -BIN2C_OUT = $(OUTPUT_)$(BIN2C_BASE) -BIN2C_OUT_ = $(BIN2C_OUT)$(SEP) - -BIN2C_TARGET = \ - $(BIN2C_OUT_)bin2c$(EXEPOSTFIX) - -BIN2C_SOURCES = \ - $(BIN2C_BASE_)bin2c.c - -BIN2C_OBJECTS = \ - $(addprefix $(INTERMEDIATE_), $(BIN2C_SOURCES:.c=.o)) - -BIN2C_HOST_CFLAGS = $(TOOLS_CFLAGS) - -BIN2C_HOST_LFLAGS = $(TOOLS_LFLAGS) - -.PHONY: bin2c -bin2c: $(BIN2C_TARGET) - -$(BIN2C_TARGET): $(BIN2C_OBJECTS) | $(BIN2C_OUT) - $(ECHO_HOSTLD) - ${host_gcc} $(BIN2C_OBJECTS) $(BIN2C_HOST_LFLAGS) -o $@ - -$(BIN2C_INT_)bin2c.o: $(BIN2C_BASE_)bin2c.c | $(BIN2C_INT) - $(ECHO_HOSTCC) - ${host_gcc} $(BIN2C_HOST_CFLAGS) -c $< -o $@ - -.PHONY: bin2c_clean -bin2c_clean: - -@$(rm) $(BIN2C_TARGET) $(BIN2C_OBJECTS) 2>$(NUL) -clean: bin2c_clean diff --git a/reactos/tools/buildno/buildno.cpp b/reactos/tools/buildno/buildno.cpp deleted file mode 100644 index f211163b437..00000000000 --- a/reactos/tools/buildno/buildno.cpp +++ /dev/null @@ -1,421 +0,0 @@ -/* - * buildno - Generate the build number for ReactOS - * - * Copyright (c) 1999,2000 Emanuele Aliberti - * Copyright (c) 2006 Christoph von Wittich - * Copyright (c) 2008 Hervé Poussineau - * - * The build number is the day on which the build took - * place, as YYYYMMDD - * - * The build number is stored in the output file as a set of macros - * - * REVISIONS - * --------- - * 2008-01-12 (hpoussin) - * Add -t option to change the build tag - * 2006-09-09 (cwittich) - * Read binary entries files from SVN 1.4.x - * 2000-01-22 (ea) - * Fixed bugs: tm_year is (current_year - 1900), - * tm_month is 0-11 not 1-12 and code ignored TZ. - * 2000-12-10 (ea) - * Added -p option to make it simply print the - * version number, but skip buildno.h generation. - */ -#include -#include -#include -#include -#include "version.h" -#include "xml.h" - -#define FALSE 0 -#define TRUE 1 - -static const char * argv0 = ""; -static char * filename = NULL; -static char * build_tag = NULL; - -int count_wide_string( const wchar_t *str ) -{ - int i; - for( i = 0; str[i]; i++ ) - ; - return i; -} - -long -GetRev(char *Revision, size_t length) -{ - long revno = 0; - char *p; - - FILE *fp = NULL; - fp = fopen(".svn/entries", "r"); - if (fp != NULL) - { - if (fgets(Revision, length, fp) != NULL) - { - /* If the first character of the file is not a digit, - then it is probably in XML format. */ - if (isdigit(Revision[0])) - { - while (fgets(Revision, length, fp) != NULL) - { - revno = strtol(Revision, &p, 10); - if (revno != 0) - { - *p = '\0'; - fclose(fp); - return revno; - } - } - } - } - fclose(fp); - } - - try - { - XMLElement *head; - - try - { - head = XMLLoadFile(".svn/entries"); - } - catch(XMLFileNotFoundException) - { - head = XMLLoadFile("_svn/entries"); - } - XMLElement *entries = head->subElements[0]; - for (size_t i = 0; i < entries->subElements.size(); i++) - { - XMLElement *entry = entries->subElements[i]; - if ("entry" == entry->name) - { - bool GotName = false; - bool GotKind = false; - bool GotRevision = false; - for (size_t j = 0; j < entry->attributes.size(); j++) - { - XMLAttribute *Attribute = entry->attributes[j]; - if ("name" == Attribute->name && "" == Attribute->value) - { - GotName = true; - } - if ("kind" == Attribute->name && "dir" == Attribute->value) - { - GotKind = true; - } - if ("revision" == Attribute->name) - { - if (length <= Attribute->value.length() + 1) - { - strcpy(Revision, "revtoobig"); - } - else - { - strcpy(Revision, Attribute->value.c_str()); - revno = strtol(Revision, NULL, 10); - } - GotRevision = true; - } - if (GotName && GotKind && GotRevision) - { - delete head; - return revno; - } - } - } - } - - delete head; - } - catch(...) - { - ; - } - - strcpy(Revision, "UNKNOWN"); - return revno; -} - -void -write_h (int build, char *buildstr, long revno) -{ - FILE *h = NULL; - char* s; - char* s1; - unsigned int length; - int dllversion = KERNEL_VERSION_MAJOR + 42; - - s1 = s = (char *) malloc(256 * 1024); - - s = s + sprintf (s, "/* Do not edit - Machine generated */\n"); - - s = s + sprintf (s, "#ifndef _INC_REACTOS_BUILDNO\n" ); - s = s + sprintf (s, "#define _INC_REACTOS_BUILDNO\n" ); - - s = s + sprintf (s, "#define KERNEL_VERSION_BUILD\t%d\n", build); - s = s + sprintf (s, "#define KERNEL_VERSION_BUILD_HEX\t0x%lx\n", revno); - s = s + sprintf (s, "#define KERNEL_VERSION_BUILD_STR\t\"%s\"\n", buildstr); - s = s + sprintf (s, "#define KERNEL_VERSION_BUILD_RC\t\"%s\\0\"\n", buildstr); - s = s + sprintf (s, "#define KERNEL_RELEASE_RC\t\"%d.%d", - KERNEL_VERSION_MAJOR, KERNEL_VERSION_MINOR); - if (0 != KERNEL_VERSION_PATCH_LEVEL) - { - s = s + sprintf (s, ".%d", KERNEL_VERSION_PATCH_LEVEL); - } - s = s + sprintf (s, "%s\\0\"\n", build_tag); - s = s + sprintf (s, "#define KERNEL_RELEASE_STR\t\"%d.%d", - KERNEL_VERSION_MAJOR, - KERNEL_VERSION_MINOR); - if (0 != KERNEL_VERSION_PATCH_LEVEL) - { - s = s + sprintf (s, ".%d", KERNEL_VERSION_PATCH_LEVEL); - } - s = s + sprintf (s, "%s\"\n", build_tag); - s = s + sprintf (s, "#define KERNEL_VERSION_RC\t\"%d.%d", - KERNEL_VERSION_MAJOR, - KERNEL_VERSION_MINOR); - if (0 != KERNEL_VERSION_PATCH_LEVEL) - { - s = s + sprintf (s, ".%d", KERNEL_VERSION_PATCH_LEVEL); - } - s = s + sprintf (s, "%s\\0\"\n", build_tag); - s = s + sprintf (s, "#define KERNEL_VERSION_STR\t\"%d.%d", - KERNEL_VERSION_MAJOR, - KERNEL_VERSION_MINOR); - if (0 != KERNEL_VERSION_PATCH_LEVEL) - { - s = s + sprintf (s, ".%d", KERNEL_VERSION_PATCH_LEVEL); - } - s = s + sprintf (s, "%s\"\n", build_tag); - s = s + sprintf (s, "#define REACTOS_DLL_VERSION_MAJOR\t%d\n", dllversion); - s = s + sprintf (s, "#define REACTOS_DLL_RELEASE_RC\t\"%d.%d", - dllversion, KERNEL_VERSION_MINOR); - if (0 != KERNEL_VERSION_PATCH_LEVEL) - { - s = s + sprintf (s, ".%d", KERNEL_VERSION_PATCH_LEVEL); - } - s = s + sprintf (s, "%s\\0\"\n", build_tag); - s = s + sprintf (s, "#define REACTOS_DLL_RELEASE_STR\t\"%d.%d", - dllversion, - KERNEL_VERSION_MINOR); - if (0 != KERNEL_VERSION_PATCH_LEVEL) - { - s = s + sprintf (s, ".%d", KERNEL_VERSION_PATCH_LEVEL); - } - s = s + sprintf (s, "%s\"\n", build_tag); - s = s + sprintf (s, "#define REACTOS_DLL_VERSION_RC\t\"%d.%d", - dllversion, - KERNEL_VERSION_MINOR); - if (0 != KERNEL_VERSION_PATCH_LEVEL) - { - s = s + sprintf (s, ".%d", KERNEL_VERSION_PATCH_LEVEL); - } - s = s + sprintf (s, "%s\\0\"\n", build_tag); - s = s + sprintf (s, "#define REACTOS_DLL_VERSION_STR\t\"%d.%d", - dllversion, - KERNEL_VERSION_MINOR); - if (0 != KERNEL_VERSION_PATCH_LEVEL) - { - s = s + sprintf (s, ".%d", KERNEL_VERSION_PATCH_LEVEL); - } - s = s + sprintf (s, "%s\"\n", build_tag); - s = s + sprintf (s, "#endif\n/* EOF */\n"); - - h = fopen (filename, "rb"); - if (h != NULL) - { - fseek(h, 0, SEEK_END); - length = ftell(h); - if (length == strlen(s1)) - { - char* orig; - - orig = (char *) malloc(length); - if (orig == NULL) - { - fclose(h); - free(s1); - return; - } - fseek(h, 0, SEEK_SET); - fread(orig, 1, length, h); - if (memcmp(s1, orig, length) == 0) - { - fclose(h); - free(s1); - free(orig); - return; - } - free(orig); - } - fclose(h); - } - - h = fopen (filename, "wb"); - if (!h) - { - fprintf (stderr, - "%s: can not create file \"%s\"!\n", - argv0, - filename); - free(s1); - return; - } - fwrite(s1, 1, strlen(s1), h); - fclose(h); -} - -void -usage (void) -{ - fprintf ( - stderr, - "Usage: %s [-{p|q}] [-t tag] path-to-header\n\n" - " -p print version number and exit\n" - " -q run in quiet mode\n" - " -t specify a build tag\n", - argv0); - exit (EXIT_SUCCESS); -} - - -int -main (int argc, char * argv []) -{ - int i, length; - int print_only = FALSE; - int quiet = FALSE; - - int build = 0; - long revno; - char buildstr[64], revision[10]; - - time_t t1 = 0; - struct tm * t1_tm = NULL; - - argv0 = argv[0]; - - /* Check arguments */ - for (i = 1; i < argc; i++) - { - if (*argv[i] == '-') - { - switch (argv[i][1]) - { - case 'p': - print_only = TRUE; - break; - case 'q': - quiet = TRUE; - break; - case 't': - if (i + 1 != argc) - { - build_tag = argv[++i]; - break; - } - /* fall through */ - default: - usage(); - return EXIT_SUCCESS; - } - } - else if (!filename) - filename = argv[i]; - else - { - usage(); - return EXIT_SUCCESS; - } - } - if (!filename) - { - usage(); - return EXIT_SUCCESS; - } - - /* Set TZ information. */ - tzset (); - /* We are building TODAY! */ - if (! quiet) - { - printf ( "\nReactOS Build Number Generator\n\n"); - } - - time (& t1); /* current build time */ - t1_tm = gmtime (& t1); - - t1_tm->tm_year += 1900; - if (! quiet) - { - printf ( - "Current date: %4d-%02d-%02d\n\n", - t1_tm->tm_year, - (t1_tm->tm_mon + 1), - t1_tm->tm_mday); - } - - /* Compute build number. */ - build = t1_tm->tm_year * 10000 + (t1_tm->tm_mon + 1) * 100 + t1_tm->tm_mday; - - if (!build_tag) - { - /* Create default build tag */ - length = count_wide_string(KERNEL_VERSION_BUILD_TYPE); - build_tag = (char *)malloc(length+2); - if (length > 0) - { - build_tag[0] = '-'; - for (i = 0; KERNEL_VERSION_BUILD_TYPE[i]; i++) - { - build_tag[i + 1] = KERNEL_VERSION_BUILD_TYPE[i]; - } - build_tag[i+1] = 0; - } - else - build_tag[0] = 0; - } - else if (*build_tag) - { - /* Prepend '-' */ - length = strlen(build_tag); - char *new_build_tag = (char *)malloc(length + 2); - strcpy(new_build_tag, "-"); - strcat(new_build_tag, build_tag); - build_tag = new_build_tag; - } - - revno = GetRev(revision, sizeof(revision)); - sprintf(buildstr, "%d-r%s", build, revision); - - if (! quiet) - { - printf ( - "ROS Version : %d.%d", - KERNEL_VERSION_MAJOR, - KERNEL_VERSION_MINOR); - if (0 != KERNEL_VERSION_PATCH_LEVEL) - { - printf(".%d", KERNEL_VERSION_PATCH_LEVEL); - } - printf("%s (Build %s)\n\n", build_tag, buildstr); - } - /* (Over)write the include file, unless the user switched on -p. */ - if (! print_only) - { - write_h (build, buildstr, revno); - } - else - { - printf ("%s: no code generated", argv [0]); - } - - return EXIT_SUCCESS; -} - -/* EOF */ diff --git a/reactos/tools/buildno/buildno.mak b/reactos/tools/buildno/buildno.mak deleted file mode 100644 index e24d218b97d..00000000000 --- a/reactos/tools/buildno/buildno.mak +++ /dev/null @@ -1,57 +0,0 @@ -BUILDNO_BASE = $(TOOLS_BASE_)buildno -BUILDNO_BASE_ = $(BUILDNO_BASE)$(SEP) -BUILDNO_INT = $(INTERMEDIATE_)$(BUILDNO_BASE) -BUILDNO_INT_ = $(BUILDNO_INT)$(SEP) -BUILDNO_OUT = $(OUTPUT_)$(BUILDNO_BASE) -BUILDNO_OUT_ = $(BUILDNO_OUT)$(SEP) - -$(BUILDNO_INT): | $(TOOLS_INT) - $(ECHO_MKDIR) - ${mkdir} $@ - -ifneq ($(INTERMEDIATE),$(OUTPUT)) -$(BUILDNO_OUT): | $(TOOLS_OUT) - $(ECHO_MKDIR) - ${mkdir} $@ -endif - -BUILDNO_TARGET = \ - $(BUILDNO_OUT_)buildno$(EXEPOSTFIX) - -BUILDNO_SOURCES = $(addprefix $(BUILDNO_BASE_), \ - buildno.cpp \ - ) - -BUILDNO_OBJECTS = \ - $(addprefix $(INTERMEDIATE_), $(BUILDNO_SOURCES:.cpp=.o)) - -BUILDNO_HOST_CXXFLAGS = -I$(TOOLS_BASE) -Iinclude/reactos $(TOOLS_CPPFLAGS) - -BUILDNO_HOST_LFLAGS = $(TOOLS_LFLAGS) - -BUILDNO_VERSION = include$(SEP)reactos$(SEP)version.h - -.PHONY: buildno -buildno: $(BUILDNO_TARGET) - -$(BUILDNO_TARGET): $(BUILDNO_OBJECTS) $(XML_SSPRINTF_OBJECTS) | $(BUILDNO_OUT) - $(ECHO_HOSTLD) - ${host_gpp} $^ $(BUILDNO_HOST_LFLAGS) -o $@ - -$(BUILDNO_INT_)buildno.o: $(BUILDNO_BASE_)buildno.cpp $(BUILDNO_VERSION) | $(BUILDNO_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(BUILDNO_HOST_CXXFLAGS) -c $< -o $@ - -.PHONY: buildno_clean -buildno_clean: - -@$(rm) $(BUILDNO_TARGET) $(BUILDNO_OBJECTS) 2>$(NUL) -clean: buildno_clean - -# Uncomment the following line if you want to automatically -# update build number after SVN update -#.PHONY: $(BUILDNO_TARGET) - -$(BUILDNO_H): $(BUILDNO_TARGET) - ${mkdir} $(INTERMEDIATE_)include$(SEP)reactos 2>$(NUL) - $(ECHO_BUILDNO) - $(Q)$(BUILDNO_TARGET) $(BUILDNO_QUIET) $(BUILDNO_H) diff --git a/reactos/tools/buildno/pch.h b/reactos/tools/buildno/pch.h deleted file mode 100644 index 1ffb3dfd38f..00000000000 --- a/reactos/tools/buildno/pch.h +++ /dev/null @@ -1,44 +0,0 @@ -// pre-compiled header stuff - -#pragma once - -#ifdef _MSC_VER -#pragma warning ( disable : 4786 ) // identifier was truncated to '255' characters in the debug information -#endif//_MSC_VER - -#include -#include -#include -#include - -#include -#ifndef RBUILD -#include -#include -#endif - -#ifdef _MSC_VER -#define MAX_PATH _MAX_PATH -#endif - -#ifndef WIN32 -#include -#include - -inline char * strlwr(char *x) -{ - char *y=x; - - while (*y) { - *y=tolower(*y); - y++; - } - return x; -} - -#define _finite __finite -#define _isnan __isnan -#define stricmp strcasecmp -#define MAX_PATH PATH_MAX -#define _MAX_PATH PATH_MAX -#endif diff --git a/reactos/tools/cabman/CMakeLists.txt b/reactos/tools/cabman/CMakeLists.txt deleted file mode 100644 index fd580af1d5a..00000000000 --- a/reactos/tools/cabman/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -list(APPEND SOURCE - cabinet.cxx - dfp.cxx - main.cxx - mszip.cxx - raw.cxx) - -include_directories(${REACTOS_SOURCE_DIR}/lib/3rdparty/zlib) - -add_executable(cabman ${SOURCE}) - -target_link_libraries(cabman zlibhost) \ No newline at end of file diff --git a/reactos/tools/cabman/cabinet.cxx b/reactos/tools/cabman/cabinet.cxx deleted file mode 100644 index dbc9338648a..00000000000 --- a/reactos/tools/cabman/cabinet.cxx +++ /dev/null @@ -1,3758 +0,0 @@ -/* - * 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())); - CloseFile(DestFile); - return CAB_STATUS_INVALID_CAB; - } -#else - if (fseek(FileHandle, (off_t)File->DataBlock->AbsoluteOffset, SEEK_SET) != 0) - { - DPRINT(MIN_TRACE, ("fseek() failed.\n")); - CloseFile(DestFile); - 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); - CloseFile(SrcFile); - 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); - CloseFile(SrcFile); - return CAB_STATUS_CANNOT_READ; - } - - if (GetFileTimes(SrcFile, FileNode) != CAB_STATUS_SUCCESS) - { - DPRINT(MIN_TRACE, ("Cannot read file times.\n")); - FreeMemory(NewFileName); - CloseFile(SrcFile); - return CAB_STATUS_CANNOT_READ; - } - - if (GetAttributesOnFile(FileNode) != CAB_STATUS_SUCCESS) - { - DPRINT(MIN_TRACE, ("Cannot read file attributes.\n")); - FreeMemory(NewFileName); - CloseFile(SrcFile); - 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/reactos/tools/cabman/cabinet.h b/reactos/tools/cabman/cabinet.h deleted file mode 100644 index cf62ae91157..00000000000 --- a/reactos/tools/cabman/cabinet.h +++ /dev/null @@ -1,499 +0,0 @@ -/* - * 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/reactos/tools/cabman/cabman.h b/reactos/tools/cabman/cabman.h deleted file mode 100644 index 0c887cb0daf..00000000000 --- a/reactos/tools/cabman/cabman.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS cabinet manager - * FILE: tools/cabman/cabman.h - * PURPOSE: Cabinet manager header - */ - -#pragma once - -#include "cabinet.h" -#include "dfp.h" - -/* Cabinet manager modes */ -#define CM_MODE_CREATE 0 -#define CM_MODE_DISPLAY 1 -#define CM_MODE_EXTRACT 2 -#define CM_MODE_CREATE_SIMPLE 3 - -/* Classes */ - -class CCABManager : public CDFParser { -public: - CCABManager(); - virtual ~CCABManager(); - bool ParseCmdline(int argc, char* argv[]); - bool Run(); -private: - void Usage(); - bool CreateCabinet(); - bool DisplayCabinet(); - bool ExtractFromCabinet(); - /* Event handlers */ - virtual bool OnOverwrite(PCFFILE File, char* FileName); - virtual void OnExtract(PCFFILE File, char* FileName); - virtual void OnDiskChange(char* CabinetName, char* DiskLabel); - virtual void OnAdd(PCFFILE Entry, char* FileName); - /* Configuration */ - bool ProcessAll; - ULONG Mode; - bool PromptOnOverwrite; - char FileName[MAX_PATH]; -}; - -/* EOF */ diff --git a/reactos/tools/cabman/cabman.rbuild b/reactos/tools/cabman/cabman.rbuild deleted file mode 100644 index ef058bbbb92..00000000000 --- a/reactos/tools/cabman/cabman.rbuild +++ /dev/null @@ -1,11 +0,0 @@ - - - - . - zlibhost - cabinet.cxx - dfp.cxx - main.cxx - mszip.cxx - raw.cxx - diff --git a/reactos/tools/cabman/dff.txt b/reactos/tools/cabman/dff.txt deleted file mode 100644 index a400e0a652e..00000000000 --- a/reactos/tools/cabman/dff.txt +++ /dev/null @@ -1,55 +0,0 @@ -Directive File Format for ReactOS Cabinet Manager -------------------------------------------------- - -Directives begin with a period ("."), and are followed by a command -name, and possibly blank delimited arguments. Commands and variable names are -case insensitive. - -Syntax Description -------------------------------------------------------------------------------- -; Anything on a line after this is a comment - [destination] [options] File copy command (options: optional) -.Define variable=[value] Define variable to be equal to value (*) -.Delete variable Delete a variable definition (*) -.New Disk|Cabinet|Folder Start a new disk, cabinet or folder (* -- new disk will work) -.Set variable=[value] Set variable to be equal to value (*) -%variable% Substitute value of variable (*) - Blank lines are ignored -------------------------------------------------------------------------------- - - -Standard variable Description -------------------------------------------------------------------------------- -Cabinet=ON|OFF Turns cabinet mode on or off (* -- currently always on) -CabinetFileCountThreshold=count Threshold count of files per cabinet (*) -CabinetNamen=filename Cabinet file name for cabinet number n -CabinetNameTemplate=template Cabinet file name template - * is replaced by cabinet number -Compress=ON|OFF Turns compression on or off (* -- currently always on) -CompressionType=NONE|MSZIP Compression engine to use (* -- currently always mszip) -DiskLabeln=label Printed disk label name for disk n -DiskLabelTemplate=template Printed disk label name template - * is replaced by disk number -FolderFileCountThreshold=count Threshold count of files per folder (*) -FolderSizeThreshold=size Threshold folder size for current folder (*) -MaxDiskFileCount=count Maximum count of files per disk (*) -MaxDiskSize[n]=size Maximum disk size (for disk n) -ReservePerCabinetSize=size Amount of space to reserve in each cabinet (*) -ReservePerDataBlockSize=size Amount of space to reserve in each data block (*) -ReservePerFolderSize=size Amount of space to reserve in each folder (*) -SourceDir=path Default path for source files (*) -------------------------------------------------------------------------------- -(*) = not implemented - - -MaxDiskSize ------------ -0 means disk size is unlimited. Standard sizes available are: - - 2.88M - 1.44M - 1.25M - 1.2M - 720K - 360K - CDROM diff --git a/reactos/tools/cabman/dfp.cxx b/reactos/tools/cabman/dfp.cxx deleted file mode 100644 index 72e14fdcd85..00000000000 --- a/reactos/tools/cabman/dfp.cxx +++ /dev/null @@ -1,1395 +0,0 @@ -/* - * 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/reactos/tools/cabman/dfp.h b/reactos/tools/cabman/dfp.h deleted file mode 100644 index bf50caac230..00000000000 --- a/reactos/tools/cabman/dfp.h +++ /dev/null @@ -1,141 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS cabinet manager - * FILE: tools/cabman/dfp.h - * PURPOSE: Directive file parser header - */ - -#pragma once - -#include "cabinet.h" - -typedef struct _CABINET_NAME { - struct _CABINET_NAME *Next; - ULONG DiskNumber; - char Name[128]; -} CABINET_NAME, *PCABINET_NAME; - -typedef struct _DISK_NUMBER { - struct _DISK_NUMBER *Next; - ULONG DiskNumber; - ULONG Number; -} DISK_NUMBER, *PDISK_NUMBER; - -typedef enum { - TokenUnknown, - TokenInteger, - TokenIdentifier, - TokenString, - TokenSpace, - TokenSemi, - TokenEqual, - TokenPeriod, - TokenBackslash, - TokenEnd, -} DFP_TOKEN; - - -typedef enum { - stCabinetName, - stCabinetNameTemplate, - stDiskLabel, - stDiskLabelTemplate, - stMaxDiskSize, - stInfFileName -} SETTYPE; - - -typedef enum { - ntDisk, - ntCabinet, - ntFolder, -} NEWTYPE; - - -/* Classes */ - -class CDFParser : public CCabinet { -public: - CDFParser(); - virtual ~CDFParser(); - ULONG Load(char* FileName); - ULONG Parse(); - void SetFileRelativePath(char* Path); - bool InfFileOnly; - bool DontGenerateInf; - char FileRelativePath[300]; -private: - /* Event handlers */ - virtual bool OnDiskLabel(ULONG Number, char* Label); - virtual bool OnCabinetName(ULONG Number, char* Name); - - void WriteInfLine(char* InfLine); - bool SetDiskName(PCABINET_NAME *List, ULONG Number, char* String); - bool GetDiskName(PCABINET_NAME *List, ULONG Number, char* String); - bool SetDiskNumber(PDISK_NUMBER *List, ULONG Number, ULONG Value); - bool GetDiskNumber(PDISK_NUMBER *List, ULONG Number, PULONG Value); - bool DoDiskLabel(ULONG Number, char* Label); - void DoDiskLabelTemplate(char* Template); - bool DoCabinetName(ULONG Number, char* Name); - void DoCabinetNameTemplate(char* Template); - void DoInfFileName(char* InfFileName); - ULONG DoMaxDiskSize(bool NumberValid, ULONG Number); - ULONG SetupNewDisk(); - ULONG PerformSetCommand(); - ULONG PerformNewCommand(); - ULONG PerformInfBeginCommand(); - ULONG PerformInfEndCommand(); - ULONG PerformCommand(); - ULONG PerformFileCopy(); - void SkipSpaces(); - bool IsNextToken(DFP_TOKEN Token, bool NoSpaces); - bool ReadLine(); - void NextToken(); - /* Parsing */ - bool FileLoaded; - FILEHANDLE FileHandle; - char* FileBuffer; - ULONG FileBufferSize; - ULONG CurrentOffset; - char Line[128]; - ULONG LineLength; - ULONG CurrentLine; - ULONG CurrentChar; - /* Token */ - DFP_TOKEN CurrentToken; - ULONG CurrentInteger; - char CurrentString[256]; - - /* State */ - bool CabinetCreated; - bool DiskCreated; - bool FolderCreated; - /* Standard directive variable */ - bool Cabinet; - ULONG CabinetFileCountThreshold; - PCABINET_NAME CabinetName; - bool CabinetNameTemplateSet; - char CabinetNameTemplate[128]; - bool InfFileNameSet; - char InfFileName[256]; - bool Compress; - ULONG CompressionType; - PCABINET_NAME DiskLabel; - bool DiskLabelTemplateSet; - char DiskLabelTemplate[128]; - ULONG FolderFileCountThreshold; - ULONG FolderSizeThreshold; - ULONG MaxCabinetSize; - ULONG MaxDiskFileCount; - PDISK_NUMBER MaxDiskSize; - bool MaxDiskSizeAllSet; - ULONG MaxDiskSizeAll; - ULONG ReservePerCabinetSize; - ULONG ReservePerDataBlockSize; - ULONG ReservePerFolderSize; - char SourceDir[256]; - FILEHANDLE InfFileHandle; - bool InfModeEnabled; -}; - -/* EOF */ diff --git a/reactos/tools/cabman/main.cxx b/reactos/tools/cabman/main.cxx deleted file mode 100644 index 88f0f151ad2..00000000000 --- a/reactos/tools/cabman/main.cxx +++ /dev/null @@ -1,652 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS cabinet manager - * FILE: tools/cabman/main.cpp - * PURPOSE: Main program - * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net) - * Colin Finck - * 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 -#include -#include "cabman.h" - - -#if DBG - -ULONG DebugTraceLevel = MIN_TRACE; -//ULONG DebugTraceLevel = MID_TRACE; -//ULONG DebugTraceLevel = MAX_TRACE; - -#endif /* DBG */ - - -char* Pad(char* Str, char PadChar, ULONG Length) -/* - * FUNCTION: Pads a string with a character to make a given length - * ARGUMENTS: - * Str = Pointer to string to pad - * PadChar = Character to pad with - * Length = Disired length of string - * RETURNS: - * Pointer to string - * NOTES: - * Str must be at least Length + 1 bytes - */ -{ - ULONG Len; - - Len = (ULONG)strlen(Str); - - if (Len < Length) - { - memcpy(&Str[Length - Len], Str, Len + 1); - memset(Str, PadChar, Length - Len); - } - return Str; -} - - -char* Date2Str(char* Str, USHORT Date) -/* - * FUNCTION: Converts a DOS style date to a string - * ARGUMENTS: - * Str = Pointer to destination string - * Date = DOS style date - * RETURNS: - * Pointer to string - */ -{ - ULONG dw; - - /* Month */ - Str[0] = (char)('0' + ((Date & 0x01E0) >> 5) / 10); - Str[1] = (char)('0' + ((Date & 0x01E0) >> 5) % 10); - Str[2] = '-'; - /* Day */ - Str[3] = (char)('0' + (Date & 0x001F) / 10); - Str[4] = (char)('0' + (Date & 0x001F) % 10); - Str[5] = '-'; - /* Year */ - dw = 1980 + ((Date & 0xFE00) >> 9); - Str[6] = (char)('0' + dw / 1000); dw %= 1000; - Str[7] = (char)('0' + dw / 100); dw %= 100; - Str[8] = (char)('0' + dw / 10); dw %= 10; - Str[9] = (char)('0' + dw % 10); - Str[10] = '\0'; - return Str; -} - - -char* Time2Str(char* Str, USHORT Time) -/* - * FUNCTION: Converts a DOS style time to a string - * ARGUMENTS: - * Str = Pointer to destination string - * Time = DOS style time - * RETURNS: - * Pointer to string - */ -{ - bool PM; - ULONG Hour; - ULONG dw; - - Hour = ((Time & 0xF800) >> 11); - PM = (Hour >= 12); - Hour %= 12; - if (Hour == 0) - Hour = 12; - - if (Hour >= 10) - Str[0] = (char)('0' + Hour / 10); - else Str[0] = ' '; - Str[1] = (char)('0' + Hour % 10); - Str[2] = ':'; - /* Minute */ - Str[3] = (char)('0' + ((Time & 0x07E0) >> 5) / 10); - Str[4] = (char)('0' + ((Time & 0x07E0) >> 5) % 10); - Str[5] = ':'; - /* Second */ - dw = 2 * (Time & 0x001F); - Str[6] = (char)('0' + dw / 10); - Str[7] = (char)('0' + dw % 10); - - Str[8] = PM? 'p' : 'a'; - Str[9] = '\0'; - return Str; -} - - -char* Attr2Str(char* Str, USHORT Attr) -/* - * FUNCTION: Converts attributes to a string - * ARGUMENTS: - * Str = Pointer to destination string - * Attr = Attributes - * RETURNS: - * Pointer to string - */ -{ - /* Archive */ - if (Attr & CAB_ATTRIB_ARCHIVE) - Str[0] = 'A'; - else - Str[0] = '-'; - - /* Hidden */ - if (Attr & CAB_ATTRIB_HIDDEN) - Str[1] = 'H'; - else - Str[1] = '-'; - - /* Read only */ - if (Attr & CAB_ATTRIB_READONLY) - Str[2] = 'R'; - else - Str[2] = '-'; - - /* System */ - if (Attr & CAB_ATTRIB_SYSTEM) - Str[3] = 'S'; - else - Str[3] = '-'; - - Str[4] = '\0'; - return Str; -} - - -/* CCABManager */ - -CCABManager::CCABManager() -/* - * FUNCTION: Default constructor - */ -{ - ProcessAll = false; - InfFileOnly = false; - Mode = CM_MODE_DISPLAY; - FileName[0] = 0; -} - - -CCABManager::~CCABManager() -/* - * FUNCTION: Default destructor - */ -{ -} - - -void CCABManager::Usage() -/* - * FUNCTION: Display usage information on screen - */ -{ - printf("ReactOS Cabinet Manager\n\n"); - printf("CABMAN [-D | -E] [-A] [-L dir] cabinet [filename ...]\n"); - printf("CABMAN [-M mode] -C dirfile [-I] [-RC file] [-P dir]\n"); - printf("CABMAN [-M mode] -S cabinet filename [...]\n"); - printf(" cabinet Cabinet file.\n"); - printf(" filename Name of the file to add to or extract from the cabinet.\n"); - printf(" Wild cards and multiple filenames\n"); - printf(" (separated by blanks) may be used.\n\n"); - - printf(" dirfile Name of the directive file to use.\n"); - - printf(" -A Process ALL cabinets. Follows cabinet chain\n"); - printf(" starting in first cabinet mentioned.\n"); - printf(" -C Create cabinet.\n"); - printf(" -D Display cabinet directory.\n"); - printf(" -E Extract files from cabinet.\n"); - printf(" -I Don't create the cabinet, only the .inf file.\n"); - printf(" -L dir Location to place extracted or generated files\n"); - printf(" (default is current directory).\n"); - printf(" -M mode Specify the compression method to use:\n"); - printf(" raw - No compression\n"); - printf(" mszip - MsZip compression (default)\n"); - printf(" -N Don't create the .inf file, only the cabinet.\n"); - printf(" -RC Specify file to put in cabinet reserved area\n"); - printf(" (size must be less than 64KB).\n"); - printf(" -S Create simple cabinet.\n"); - printf(" -P dir Files in the .dff are relative to this directory\n"); -} - -bool CCABManager::ParseCmdline(int argc, char* argv[]) -/* - * FUNCTION: Parse command line arguments - * ARGUMENTS: - * argc = Number of arguments on command line - * argv = Pointer to list of command line arguments - * RETURNS: - * true if command line arguments was successfully parsed, false if not - */ -{ - int i; - bool ShowUsage; - bool FoundCabinet = false; - - ShowUsage = (argc < 2); - - for (i = 1; i < argc; i++) - { - if (argv[i][0] == '-') - { - switch (argv[i][1]) - { - case 'a': - case 'A': - ProcessAll = true; - break; - - case 'c': - case 'C': - Mode = CM_MODE_CREATE; - break; - - case 'd': - case 'D': - Mode = CM_MODE_DISPLAY; - break; - - case 'e': - case 'E': - Mode = CM_MODE_EXTRACT; - break; - - case 'i': - case 'I': - InfFileOnly = true; - break; - - case 'l': - case 'L': - if (argv[i][2] == 0) - { - i++; - SetDestinationPath(&argv[i][0]); - } - else - SetDestinationPath(&argv[i][2]); - - break; - - case 'm': - case 'M': - // Set the compression codec (only affects compression, not decompression) - if(argv[i][2] == 0) - { - i++; - - if( !SetCompressionCodec(&argv[i][0]) ) - return false; - } - else - { - if( !SetCompressionCodec(&argv[i][2]) ) - return false; - } - - break; - - case 'n': - case 'N': - DontGenerateInf = true; - break; - - case 'R': - switch (argv[i][2]) - { - case 'C': /* File to put in cabinet reserved area */ - if (argv[i][3] == 0) - { - i++; - if (!SetCabinetReservedFile(&argv[i][0])) - { - printf("Cannot open cabinet reserved area file.\n"); - return false; - } - } - else - { - if (!SetCabinetReservedFile(&argv[i][3])) - { - printf("Cannot open cabinet reserved area file.\n"); - return false; - } - } - break; - - default: - printf("Bad parameter %s.\n", argv[i]); - return false; - } - break; - - case 's': - case 'S': - Mode = CM_MODE_CREATE_SIMPLE; - break; - - case 'P': - if (argv[i][2] == 0) - { - i++; - SetFileRelativePath(&argv[i][0]); - } - else - SetFileRelativePath(&argv[i][2]); - - break; - - default: - printf("Bad parameter %s.\n", argv[i]); - return false; - } - } - else - { - if(Mode == CM_MODE_CREATE) - { - if(FileName[0]) - { - printf("You may only specify one directive file!\n"); - return false; - } - else - { - // For creating cabinets, this argument is the path to the directive file - strcpy(FileName, argv[i]); - } - } - else if(FoundCabinet) - { - // For creating simple cabinets, displaying or extracting them, add the argument as a search criteria - AddSearchCriteria(argv[i]); - } - else - { - SetCabinetName(argv[i]); - FoundCabinet = true; - } - } - } - - if (ShowUsage) - { - Usage(); - return false; - } - - // Select MsZip by default for creating cabinets - if( (Mode == CM_MODE_CREATE || Mode == CM_MODE_CREATE_SIMPLE) && !IsCodecSelected() ) - SelectCodec(CAB_CODEC_MSZIP); - - // Search criteria (= the filename argument) is necessary for creating a simple cabinet - if( Mode == CM_MODE_CREATE_SIMPLE && !HasSearchCriteria()) - { - printf("You have to enter input file names!\n"); - return false; - } - - return true; -} - - -bool CCABManager::CreateCabinet() -/* - * FUNCTION: Create cabinet - */ -{ - ULONG Status; - - Status = Load(FileName); - if (Status != CAB_STATUS_SUCCESS) - { - printf("Specified directive file could not be found: %s.\n", FileName); - return false; - } - - Status = Parse(); - - return (Status == CAB_STATUS_SUCCESS ? true : false); -} - -bool CCABManager::DisplayCabinet() -/* - * FUNCTION: Display cabinet contents - */ -{ - CAB_SEARCH Search; - char Str[20]; - ULONG FileCount = 0; - ULONG ByteCount = 0; - - if (Open() == CAB_STATUS_SUCCESS) - { - printf("Cabinet %s\n\n", GetCabinetName()); - - if (FindFirst(&Search) == CAB_STATUS_SUCCESS) - { - do - { - if (Search.File->FileControlID != CAB_FILE_CONTINUED) - { - printf("%s ", Date2Str(Str, Search.File->FileDate)); - printf("%s ", Time2Str(Str, Search.File->FileTime)); - printf("%s ", Attr2Str(Str, Search.File->Attributes)); - sprintf(Str, "%u", (UINT)Search.File->FileSize); - printf("%s ", Pad(Str, ' ', 13)); - printf("%s\n", Search.FileName); - - FileCount++; - ByteCount += Search.File->FileSize; - } - } while (FindNext(&Search) == CAB_STATUS_SUCCESS); - } - - DestroySearchCriteria(); - - if (FileCount > 0) { - if (FileCount == 1) - printf(" 1 file "); - else - { - sprintf(Str, "%u", (UINT)FileCount); - printf(" %s files ", Pad(Str, ' ', 12)); - } - - if (ByteCount == 1) - printf(" 1 byte\n"); - else - { - sprintf(Str, "%u", (UINT)ByteCount); - printf("%s bytes\n", Pad(Str, ' ', 12)); - } - } - else - { - /* There should be at least one file in a cabinet */ - printf("No files in cabinet."); - } - return true; - } - else - printf("Cannot open file: %s\n", GetCabinetName()); - - return false; -} - - -bool CCABManager::ExtractFromCabinet() -/* - * FUNCTION: Extract file(s) from cabinet - */ -{ - bool bRet = true; - CAB_SEARCH Search; - ULONG Status; - - if (Open() == CAB_STATUS_SUCCESS) - { - printf("Cabinet %s\n\n", GetCabinetName()); - - if (FindFirst(&Search) == CAB_STATUS_SUCCESS) - { - do - { - switch (Status = ExtractFile(Search.FileName)) - { - case CAB_STATUS_SUCCESS: - break; - - case CAB_STATUS_INVALID_CAB: - printf("Cabinet contains errors.\n"); - bRet = false; - break; - - case CAB_STATUS_UNSUPPCOMP: - printf("Cabinet uses unsupported compression type.\n"); - bRet = false; - break; - - case CAB_STATUS_CANNOT_WRITE: - printf("You've run out of free space on the destination volume or the volume is damaged.\n"); - bRet = false; - break; - - default: - printf("Unspecified error code (%u).\n", (UINT)Status); - bRet = false; - break; - } - - if(!bRet) - break; - } while (FindNext(&Search) == CAB_STATUS_SUCCESS); - - DestroySearchCriteria(); - } - - return bRet; - } - else - printf("Cannot open file: %s.\n", GetCabinetName()); - - return false; -} - - -bool CCABManager::Run() -/* - * FUNCTION: Process cabinet - */ -{ - printf("ReactOS Cabinet Manager\n\n"); - - switch (Mode) - { - case CM_MODE_CREATE: - return CreateCabinet(); - - case CM_MODE_DISPLAY: - return DisplayCabinet(); - - case CM_MODE_EXTRACT: - return ExtractFromCabinet(); - - case CM_MODE_CREATE_SIMPLE: - return CreateSimpleCabinet(); - - default: - break; - } - return false; -} - - -/* Event handlers */ - -bool CCABManager::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 - */ -{ - if (Mode == CM_MODE_CREATE) - return true; - - /* Always overwrite */ - return true; -} - - -void CCABManager::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) - */ -{ - printf("Extracting %s\n", GetFileName(FileName)); -} - - - -void CCABManager::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 - */ -{ - printf("\nChanging to cabinet %s - %s\n\n", CabinetName, DiskLabel); -} - - -void CCABManager::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) - */ -{ - printf("Adding %s\n", GetFileName(FileName)); -} - - -int main(int argc, char * argv[]) -/* - * FUNCTION: Main entry point - * ARGUMENTS: - * argc = Number of arguments on command line - * argv = Pointer to list of command line arguments - */ -{ - CCABManager CABMgr; - bool status = false; - - if (CABMgr.ParseCmdline(argc, argv)) - status = CABMgr.Run(); - - return (status ? 0 : 1); -} - -/* EOF */ diff --git a/reactos/tools/cabman/makefile.win32 b/reactos/tools/cabman/makefile.win32 deleted file mode 100644 index fca4c8e2645..00000000000 --- a/reactos/tools/cabman/makefile.win32 +++ /dev/null @@ -1,29 +0,0 @@ -# $Id$ - -PATH_TO_TOP = ../.. - -TARGET_TYPE = program - -TARGET_APPTYPE = console - -TARGET_NAME = cabman -#TARGET_NAME = test - -TARGET_CPPAPP = yes - -TARGET_OBJECTS = cabinet.o mszip.o raw.o main.o dfp.o - -TARGET_SDKLIBS = zlib.a - -TARGET_CFLAGS = -I$(PATH_TO_TOP)/lib/zlib -Werror -Wall - -TARGET_CPPFLAGS = $(TARGET_CFLAGS) - -TARGET_GCCLIBS = stdc++ - -TARGET_NORC = yes - -include $(PATH_TO_TOP)/rules.mak - -include $(TOOLS_PATH)/helper.mk - diff --git a/reactos/tools/cabman/mszip.cxx b/reactos/tools/cabman/mszip.cxx deleted file mode 100644 index 45e87f1c06a..00000000000 --- a/reactos/tools/cabman/mszip.cxx +++ /dev/null @@ -1,182 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS cabinet manager - * FILE: tools/cabman/mszip.cpp - * PURPOSE: CAB codec for MSZIP compressed data - * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net) - * Colin Finck - * NOTES: The ZLIB does the real work. Get the full version - * from http://www.cdrom.com/pub/infozip/zlib/ - * 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 "mszip.h" - - -/* Memory functions */ - -voidpf MSZipAlloc(voidpf opaque, uInt items, uInt size) -{ - DPRINT(DEBUG_MEMORY, ("items = (%d) size = (%d)\n", items, size)); - return AllocateMemory(items * size); -} - -void MSZipFree (voidpf opaque, voidpf address) -{ - DPRINT(DEBUG_MEMORY, ("\n")); - FreeMemory(address); -} - - -/* CMSZipCodec */ - -CMSZipCodec::CMSZipCodec() -/* - * FUNCTION: Default constructor - */ -{ - ZStream.zalloc = MSZipAlloc; - ZStream.zfree = MSZipFree; - ZStream.opaque = (voidpf)0; -} - - -CMSZipCodec::~CMSZipCodec() -/* - * FUNCTION: Default destructor - */ -{ -} - - -ULONG CMSZipCodec::Compress(void* OutputBuffer, - void* InputBuffer, - ULONG InputLength, - PULONG OutputLength) -/* - * FUNCTION: Compresses data in a buffer - * ARGUMENTS: - * OutputBuffer = Pointer to buffer to place compressed data - * InputBuffer = Pointer to buffer with data to be compressed - * InputLength = Length of input buffer - * OutputLength = Address of buffer to place size of compressed data - */ -{ - PUSHORT Magic; - - DPRINT(MAX_TRACE, ("InputLength (%u).\n", (UINT)InputLength)); - - Magic = (PUSHORT)OutputBuffer; - *Magic = MSZIP_MAGIC; - - ZStream.next_in = (unsigned char*)InputBuffer; - ZStream.avail_in = InputLength; - ZStream.next_out = (unsigned char*)((unsigned long)OutputBuffer + 2); - ZStream.avail_out = CAB_BLOCKSIZE + 12; - - /* WindowBits is passed < 0 to tell that there is no zlib header */ - Status = deflateInit2(&ZStream, - Z_BEST_COMPRESSION, - Z_DEFLATED, - -MAX_WBITS, - 8, /* memLevel */ - Z_DEFAULT_STRATEGY); - if (Status != Z_OK) - { - DPRINT(MIN_TRACE, ("deflateInit() returned (%d).\n", Status)); - return CS_NOMEMORY; - } - - Status = deflate(&ZStream, Z_FINISH); - if ((Status != Z_OK) && (Status != Z_STREAM_END)) - { - DPRINT(MIN_TRACE, ("deflate() returned (%d) (%s).\n", Status, ZStream.msg)); - if (Status == Z_MEM_ERROR) - return CS_NOMEMORY; - return CS_BADSTREAM; - } - - *OutputLength = ZStream.total_out + 2; - - Status = deflateEnd(&ZStream); - if (Status != Z_OK) - { - DPRINT(MIN_TRACE, ("deflateEnd() returned (%d).\n", Status)); - return CS_BADSTREAM; - } - - return CS_SUCCESS; -} - - -ULONG CMSZipCodec::Uncompress(void* OutputBuffer, - void* InputBuffer, - ULONG InputLength, - PULONG OutputLength) -/* - * FUNCTION: Uncompresses data in a buffer - * ARGUMENTS: - * OutputBuffer = Pointer to buffer to place uncompressed data - * InputBuffer = Pointer to buffer with data to be uncompressed - * InputLength = Length of input buffer - * OutputLength = Address of buffer to place size of uncompressed data - */ -{ - USHORT Magic; - - DPRINT(MAX_TRACE, ("InputLength (%u).\n", (UINT)InputLength)); - - Magic = *((PUSHORT)InputBuffer); - - if (Magic != MSZIP_MAGIC) - { - DPRINT(MID_TRACE, ("Bad MSZIP block header magic (0x%X)\n", Magic)); - return CS_BADSTREAM; - } - - ZStream.next_in = (unsigned char*)((unsigned long)InputBuffer + 2); - ZStream.avail_in = InputLength - 2; - ZStream.next_out = (unsigned char*)OutputBuffer; - ZStream.avail_out = CAB_BLOCKSIZE + 12; - - /* WindowBits is passed < 0 to tell that there is no zlib header. - * Note that in this case inflate *requires* an extra "dummy" byte - * after the compressed stream in order to complete decompression and - * return Z_STREAM_END. - */ - Status = inflateInit2(&ZStream, -MAX_WBITS); - if (Status != Z_OK) - { - DPRINT(MIN_TRACE, ("inflateInit2() returned (%d).\n", Status)); - return CS_BADSTREAM; - } - - while ((ZStream.total_out < CAB_BLOCKSIZE + 12) && - (ZStream.total_in < InputLength - 2)) - { - Status = inflate(&ZStream, Z_NO_FLUSH); - if (Status == Z_STREAM_END) break; - if (Status != Z_OK) - { - DPRINT(MIN_TRACE, ("inflate() returned (%d) (%s).\n", Status, ZStream.msg)); - if (Status == Z_MEM_ERROR) - return CS_NOMEMORY; - return CS_BADSTREAM; - } - } - - *OutputLength = ZStream.total_out; - - Status = inflateEnd(&ZStream); - if (Status != Z_OK) - { - DPRINT(MIN_TRACE, ("inflateEnd() returned (%d).\n", Status)); - return CS_BADSTREAM; - } - return CS_SUCCESS; -} - -/* EOF */ diff --git a/reactos/tools/cabman/mszip.h b/reactos/tools/cabman/mszip.h deleted file mode 100644 index da5c59f0a8e..00000000000 --- a/reactos/tools/cabman/mszip.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS cabinet manager - * FILE: tools/cabman/mszip.h - * PURPOSE: CAB codec for MSZIP compressed data - */ - -#pragma once - -#include "cabinet.h" -#include - -#define MSZIP_MAGIC 0x4B43 - - -/* Classes */ - -class CMSZipCodec : public CCABCodec { -public: - /* Default constructor */ - CMSZipCodec(); - /* Default destructor */ - virtual ~CMSZipCodec(); - /* Compresses a data block */ - virtual ULONG Compress(void* OutputBuffer, - void* InputBuffer, - ULONG InputLength, - PULONG OutputLength); - /* Uncompresses a data block */ - virtual ULONG Uncompress(void* OutputBuffer, - void* InputBuffer, - ULONG InputLength, - PULONG OutputLength); -private: - int Status; - z_stream ZStream; /* Zlib stream */ -}; - -/* EOF */ diff --git a/reactos/tools/cabman/raw.cxx b/reactos/tools/cabman/raw.cxx deleted file mode 100644 index bf4b0fe9871..00000000000 --- a/reactos/tools/cabman/raw.cxx +++ /dev/null @@ -1,70 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS cabinet manager - * FILE: tools/cabman/raw.cpp - * PURPOSE: CAB codec for uncompressed "raw" data - * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net) - * Colin Finck - * 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 "raw.h" - - -/* CRawCodec */ - -CRawCodec::CRawCodec() -/* - * FUNCTION: Default constructor - */ -{ -} - - -CRawCodec::~CRawCodec() -/* - * FUNCTION: Default destructor - */ -{ -} - - -ULONG CRawCodec::Compress(void* OutputBuffer, - void* InputBuffer, - ULONG InputLength, - PULONG OutputLength) -/* - * FUNCTION: Compresses data in a buffer - * ARGUMENTS: - * OutputBuffer = Pointer to buffer to place compressed data - * InputBuffer = Pointer to buffer with data to be compressed - * InputLength = Length of input buffer - * OutputLength = Address of buffer to place size of compressed data - */ -{ - memcpy(OutputBuffer, InputBuffer, InputLength); - *OutputLength = InputLength; - return CS_SUCCESS; -} - -ULONG CRawCodec::Uncompress(void* OutputBuffer, - void* InputBuffer, - ULONG InputLength, - PULONG OutputLength) -/* - * FUNCTION: Uncompresses data in a buffer - * ARGUMENTS: - * OutputBuffer = Pointer to buffer to place uncompressed data - * InputBuffer = Pointer to buffer with data to be uncompressed - * InputLength = Length of input buffer - * OutputLength = Address of buffer to place size of uncompressed data - */ -{ - memcpy(OutputBuffer, InputBuffer, InputLength); - *OutputLength = InputLength; - return CS_SUCCESS; -} - -/* EOF */ diff --git a/reactos/tools/cabman/raw.h b/reactos/tools/cabman/raw.h deleted file mode 100644 index 0b79efb7cd9..00000000000 --- a/reactos/tools/cabman/raw.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS cabinet manager - * FILE: tools/cabman/raw.h - * PURPOSE: CAB codec for uncompressed data - */ - -#pragma once - -#include "cabinet.h" - - -/* Classes */ - -class CRawCodec : public CCABCodec { -public: - /* Default constructor */ - CRawCodec(); - /* Default destructor */ - virtual ~CRawCodec(); - /* Compresses a data block */ - virtual ULONG Compress(void* OutputBuffer, - void* InputBuffer, - ULONG InputLength, - PULONG OutputLength); - /* Uncompresses a data block */ - virtual ULONG Uncompress(void* OutputBuffer, - void* InputBuffer, - ULONG InputLength, - PULONG OutputLength); -}; - -/* EOF */ diff --git a/reactos/tools/cdmake/CMakeLists.txt b/reactos/tools/cdmake/CMakeLists.txt deleted file mode 100644 index bb3669b5d64..00000000000 --- a/reactos/tools/cdmake/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ - -add_executable(cdmake cdmake.c llmosrt.c) diff --git a/reactos/tools/cdmake/cdmake.c b/reactos/tools/cdmake/cdmake.c deleted file mode 100644 index 4f6ff6488b0..00000000000 --- a/reactos/tools/cdmake/cdmake.c +++ /dev/null @@ -1,1685 +0,0 @@ -/* - * 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/reactos/tools/cdmake/cdmake.rbuild b/reactos/tools/cdmake/cdmake.rbuild deleted file mode 100644 index 49fb45312ff..00000000000 --- a/reactos/tools/cdmake/cdmake.rbuild +++ /dev/null @@ -1,6 +0,0 @@ - - - - cdmake.c - llmosrt.c - diff --git a/reactos/tools/cdmake/llmosrt.c b/reactos/tools/cdmake/llmosrt.c deleted file mode 100644 index ef2e1794b79..00000000000 --- a/reactos/tools/cdmake/llmosrt.c +++ /dev/null @@ -1,106 +0,0 @@ -/* $Id$ */ -/* A Linked-List Memory Sort - by Philip J. Erdelsky - pje@acm.org - http://www.alumni.caltech.edu/~pje/ -*/ - -/* According to his website, this file was released into the public domain by Phillip J. Erdelsky */ - - -#include - -void *sort_linked_list(void *p, unsigned index, int (*compare)(void *, void *)) -{ - unsigned base; - unsigned long block_size; - - struct record - { - struct record *next[1]; - /* other members not directly accessed by this function */ - }; - - struct tape - { - struct record *first, *last; - unsigned long count; - } tape[4]; - - /* Distribute the records alternately to tape[0] and tape[1]. */ - - tape[0].count = tape[1].count = 0L; - tape[0].first = NULL; - base = 0; - while (p != NULL) - { - struct record *next = ((struct record *)p)->next[index]; - ((struct record *)p)->next[index] = tape[base].first; - tape[base].first = ((struct record *)p); - tape[base].count++; - p = next; - base ^= 1; - } - - /* If the list is empty or contains only a single record, then */ - /* tape[1].count == 0L and this part is vacuous. */ - - for (base = 0, block_size = 1L; tape[base+1].count != 0L; - base ^= 2, block_size <<= 1) - { - int dest; - struct tape *tape0, *tape1; - tape0 = tape + base; - tape1 = tape + base + 1; - dest = base ^ 2; - tape[dest].count = tape[dest+1].count = 0; - for (; tape0->count != 0; dest ^= 1) - { - unsigned long n0, n1; - struct tape *output_tape = tape + dest; - n0 = n1 = block_size; - while (1) - { - struct record *chosen_record; - struct tape *chosen_tape; - if (n0 == 0 || tape0->count == 0) - { - if (n1 == 0 || tape1->count == 0) - break; - chosen_tape = tape1; - n1--; - } - else if (n1 == 0 || tape1->count == 0) - { - chosen_tape = tape0; - n0--; - } - else if ((*compare)(tape0->first, tape1->first) > 0) - { - chosen_tape = tape1; - n1--; - } - else - { - chosen_tape = tape0; - n0--; - } - chosen_tape->count--; - chosen_record = chosen_tape->first; - chosen_tape->first = chosen_record->next[index]; - if (output_tape->count == 0) - output_tape->first = chosen_record; - else - output_tape->last->next[index] = chosen_record; - output_tape->last = chosen_record; - output_tape->count++; - } - } - } - - if (tape[base].count > 1L) - tape[base].last->next[index] = NULL; - return tape[base].first; -} - -/* EOF */ diff --git a/reactos/tools/cdmake/readme.txt b/reactos/tools/cdmake/readme.txt deleted file mode 100644 index 4ddb07389eb..00000000000 --- a/reactos/tools/cdmake/readme.txt +++ /dev/null @@ -1,96 +0,0 @@ - CD-ROM Maker - Philip J. Erdelsky - -The CDMAKE utility converts files from DOS/Windows format to ISO9660 -(CD-ROM) format. - -First, gather all the files to be converted and put them into a single -base directory and its subdirectories, arranged just the way you want -them on the CD-ROM. Remember that ISO9660 allows subdirectories to be -nested only eight levels deep. Therefore, if the base directory is -C:\CDROM, - - C:\CDROM\D2\D3\D4\D5\D6\D7\D8\FOO.TXT is permitted, but - - C:\CDROM\D2\D3\D4\D5\D6\D7\D8\D9\FOO.TXT is forbidden. - -Also, ISO9660 does not allow directories to have extensions, although -DOS does. - -Finally, the characters in file and directory names and file extensions -must be letters, digits or underscores. Other punctuation marks -permitted by DOS/Windows are forbidden by ISO9660. You can use the -c -option to override this restriction, but the resulting CD-ROM may not be -readable on systems other than DOS/Windows. - -Files in the base directory will be written to the root directory of the -CD-ROM image. All subdirectories of the base directory will appear as -subdirectories of the root directory of the CD-ROM image. Their -contents, and the contents of their subdirectories, down to the eighth -level, will be faithfully copied to the CD-ROM image. - -System files will not be written to the CD-ROM image. Hidden files will -be written to the CD-ROM image, and will retain their hidden attributes. -Read-only files will be written, and will remain read-only on the -CD-ROM, but this does not distinguish them in any way, because on a -CD-ROM all files are read-only. The archive attribute will be lost. - -File and directory date and time stamps will be preserved in the CD-ROM -image. - -The utility is called up by a command line of the following form: - - CDMAKE [-q] [-v] [-p] [-s N] [-m] [-j] [-b bootimage] source volume image - - source specifications of base directory containing all files to - be written to CD-ROM image - - volume volume label - - image image file or device - - -q quiet mode - display nothing but error messages - - -v verbose mode - display file information as files are - scanned and written - overrides -p option - - -p show progress while writing - - -s N abort operation before beginning write if image will be - larger than N megabytes (i.e. 1024*1024*N bytes) - - -m accept punctuation marks other than underscores in - names and extensions - - -j generates Joliet filename records - - -b bootimage create bootable ElTorito CD-ROM using 'no emulation' mode - - -The utility makes three passes over the source files: - - (1) The scanning pass, in which the names and extensions are - checked for validity, and the names, extensions, sizes, dates, - times and attributes are recorded internally. The files are not - actually read during this pass. - - (2) The layout pass, in which the sizes and positions of - directories, files and other items in the CD-ROM image are - determined. - - (3) The writing pass, in which the files are actually read and the - CD-ROM image is actually written to the specified file or - device. The image is always written sequentially. - -If neither the -q nor the -v option is used, CDMAKE will display the -volume label, size, number of files and directories and the total bytes -in each at the end of the layout pass. - -If the -p option is used, and is not overridden by the -v option, then -during the writing pass, CDMAKE will display the number of bytes still -to be written to the CD-ROM image, updating it frequently. The number -will decrease as the operation progresses, and will reach zero when the -operation is complete. - -The operation of CDMAKE can be aborted by typing Ctrl-C when the utility -is displaying text of any kind. diff --git a/reactos/tools/create_nls/Readme b/reactos/tools/create_nls/Readme deleted file mode 100644 index e72804b6b74..00000000000 --- a/reactos/tools/create_nls/Readme +++ /dev/null @@ -1,23 +0,0 @@ -Create_nls - .nls file creation tool ------------------------------------- - -Create_nls is a tool to create binary .nls files from codepage mapping -files provided by Unicode Inc. Due to the confusing license these files -are not part of the ReactOS source tree. - - -You can easily download the files from 'http://www.unicode.org/public' or -'ftp://ftp.unicode.org/pub'. Download the directory structure of the web/ftp -site into the unicode.org subdirectory and create_nls will build the .nls -files. - -Makefile targets: - 'make': builds create_nls tool. - 'make clean': deletes all executable and object files - 'make nls': generates binary .nls files. - 'make clean_nls': deletes binary .nls files. - -Since the binary .nls files are part of the ReactOS source tree it is not -necessary to build these files yourself. Therefore create_nls is not -integrated with the main makefile. You will have to build and run it -separately. diff --git a/reactos/tools/create_nls/create_nls.c b/reactos/tools/create_nls/create_nls.c deleted file mode 100644 index 4e21ce31b0f..00000000000 --- a/reactos/tools/create_nls/create_nls.c +++ /dev/null @@ -1,969 +0,0 @@ -/* - * Tool for creating NT-like NLS files for Unicode <-> Codepage conversions. - * Tool for creating NT-like l_intl.nls file for case mapping of unicode - * characters. - * Copyright 2000 Timoshkov Dmitry - * Copyright 2001 Matei Alexandru - * - * Sources of information: - * Andrew Kozin's YAW project http://www.chat.ru/~stanson/yaw_en.html - * Ove Kõven's investigations http://www.ping.uio.no/~ovehk/nls - */ -#include -#include -#include -#include -#include -#include - -static const WCHAR * const uprtable[256]; -static const WCHAR * const lwrtable[256]; - -#define NLSDIR "../../media/nls" -#define LIBDIR "unicode.org/" - -typedef struct { - WORD wSize; /* in words 0x000D */ - WORD CodePage; - WORD MaxCharSize; /* 1 or 2 */ - BYTE DefaultChar[MAX_DEFAULTCHAR]; - WCHAR UnicodeDefaultChar; - WCHAR unknown1; - WCHAR unknown2; - BYTE LeadByte[MAX_LEADBYTES]; -} __attribute__((packed)) NLS_FILE_HEADER; - -/* -Support for translation from the multiple unicode chars -to the single code page char. - -002D;HYPHEN-MINUS;Pd;0;ET;;;;;N;;;;; -00AD;SOFT HYPHEN;Pd;0;ON;;;;;N;;;;; -2010;HYPHEN;Pd;0;ON;;;;;N;;;;; -2011;NON-BREAKING HYPHEN;Pd;0;ON; 2010;;;;N;;;;; -2013;EN DASH;Pd;0;ON;;;;;N;;;;; -2014;EM DASH;Pd;0;ON;;;;;N;;;;; -2015;HORIZONTAL BAR;Pd;0;ON;;;;;N;QUOTATION DASH;;;; -*/ - -/* HYPHEN-MINUS aliases */ -static WCHAR hyphen_aliases[] = {0x00AD,0x2010,0x2011,0x2013,0x2014,0x2015,0}; - -static struct { - WCHAR cp_char; - WCHAR *alias; /* must be 0 terminated */ -} u2cp_alias[] = { -/* HYPHEN-MINUS aliases */ -{0x002D, hyphen_aliases} -}; - -static void patch_aliases(void *u2cp, CPINFOEXA *cpi) -{ - int i, j; - WCHAR *wc, *alias; - BYTE *c; - - if(cpi->MaxCharSize == 2) { - wc = (WCHAR *)u2cp; - for(i = 0; i < 65536; i++) { - for(j = 0; j < sizeof(u2cp_alias)/sizeof(u2cp_alias[0]); j++) { - alias = u2cp_alias[j].alias; - while(*alias) { - if(*alias == i && wc[i] == *(WCHAR *)cpi->DefaultChar) { - wc[i] = u2cp_alias[j].cp_char; - } - alias++; - } - } - } - } - else { - c = (BYTE *)u2cp; - for(i = 0; i < 65536; i++) { - for(j = 0; j < sizeof(u2cp_alias)/sizeof(u2cp_alias[0]); j++) { - alias = u2cp_alias[j].alias; - while(*alias) { - if(*alias == i && c[i] == cpi->DefaultChar[0] && u2cp_alias[j].cp_char < 256) { - c[i] = (BYTE)u2cp_alias[j].cp_char; - } - alias++; - } - } - } - } -} - -static BOOL write_unicode2cp_table(FILE *out, CPINFOEXA *cpi, WCHAR *table) -{ - void *u2cp; - WCHAR *wc; - CHAR *c; - int i; - BOOL ret = TRUE; - - u2cp = malloc(cpi->MaxCharSize * 65536); - if(!u2cp) { - printf("Not enough memory for Unicode to Codepage table\n"); - return FALSE; - } - - if(cpi->MaxCharSize == 2) { - wc = (WCHAR *)u2cp; - for(i = 0; i < 65536; i++) - wc[i] = *(WCHAR *)cpi->DefaultChar; - - for(i = 0; i < 65536; i++) - if (table[i] != '?') - wc[table[i]] = (WCHAR)i; - } - else { - c = (CHAR *)u2cp; - for(i = 0; i < 65536; i++) - c[i] = cpi->DefaultChar[0]; - - for(i = 0; i < 256; i++) - if (table[i] != '?') - c[table[i]] = (CHAR)i; - } - - patch_aliases(u2cp, cpi); - - if(fwrite(u2cp, 1, cpi->MaxCharSize * 65536, out) != cpi->MaxCharSize * 65536) - ret = FALSE; - - free(u2cp); - - return ret; -} - -static BOOL write_lb_ranges(FILE *out, CPINFOEXA *cpi, WCHAR *table) -{ - WCHAR sub_table[256]; - WORD offset, offsets[256]; - int i, j, range; - - memset(offsets, 0, sizeof(offsets)); - - offset = 0; - - for(i = 0; i < MAX_LEADBYTES; i += 2) { - for(range = cpi->LeadByte[i]; range != 0 && range <= cpi->LeadByte[i + 1]; range++) { - offset += 256; - offsets[range] = offset; - } - } - - if(fwrite(offsets, 1, sizeof(offsets), out) != sizeof(offsets)) - return FALSE; - - for(i = 0; i < MAX_LEADBYTES; i += 2) { - for(range = cpi->LeadByte[i]; range != 0 && range <= cpi->LeadByte[i + 1]; range++) { - /*printf("Writing sub table for LeadByte %02X\n", range);*/ - for(j = MAKEWORD(0, range); j <= MAKEWORD(0xFF, range); j++) { - sub_table[j - MAKEWORD(0, range)] = table[j]; - } - - if(fwrite(sub_table, 1, sizeof(sub_table), out) != sizeof(sub_table)) - return FALSE; - } - } - - return TRUE; -} - -static BOOL create_nls_file(char *name, CPINFOEXA *cpi, WCHAR *table, WCHAR *oemtable) -{ - FILE *out; - NLS_FILE_HEADER nls; - WORD wValue, number_of_lb_ranges, number_of_lb_subtables, i; - - printf("Creating NLS table \"%s\"\n", name); - - if(!(out = fopen(name, "wb"))) { - printf("Could not create file \"%s\"\n", name); - return FALSE; - } - - memset(&nls, 0, sizeof(nls)); - - nls.wSize = sizeof(nls) / sizeof(WORD); - nls.CodePage = cpi->CodePage; - nls.MaxCharSize = cpi->MaxCharSize; - memcpy(nls.DefaultChar, cpi->DefaultChar, MAX_DEFAULTCHAR); - nls.UnicodeDefaultChar = cpi->UnicodeDefaultChar; - nls.unknown1 = '?'; - nls.unknown2 = '?'; - memcpy(nls.LeadByte, cpi->LeadByte, MAX_LEADBYTES); - - if(fwrite(&nls, 1, sizeof(nls), out) != sizeof(nls)) { - fclose(out); - printf("Could not write to file \"%s\"\n", name); - return FALSE; - } - - number_of_lb_ranges = 0; - number_of_lb_subtables = 0; - - for(i = 0; i < MAX_LEADBYTES; i += 2) { - if(cpi->LeadByte[i] != 0 && cpi->LeadByte[i + 1] > cpi->LeadByte[i]) { - number_of_lb_ranges++; - number_of_lb_subtables += cpi->LeadByte[i + 1] - cpi->LeadByte[i] + 1; - } - } - - /*printf("Number of LeadByte ranges %d\n", number_of_lb_ranges);*/ - /*printf("Number of LeadByte subtables %d\n", number_of_lb_subtables);*/ - - /* Calculate offset to Unicode to CP table in words: - * 1. (256 * sizeof(WORD)) primary CP to Unicode table + - * 2. (WORD) optional OEM glyph table size in words + - * 3. OEM glyph table size in words * sizeof(WORD) + - * 4. (WORD) Number of DBCS LeadByte ranges + - * 5. if (Number of DBCS LeadByte ranges != 0) 256 * sizeof(WORD) offsets of lead byte sub tables - * 6. (Number of DBCS LeadByte sub tables * 256 * sizeof(WORD)) LeadByte sub tables + - * 7. (WORD) Unknown flag - */ - - wValue = (256 * sizeof(WORD) + /* 1 */ - sizeof(WORD) + /* 2 */ - ((oemtable !=NULL) ? (256 * sizeof(WORD)) : 0) + /* 3 */ - sizeof(WORD) + /* 4 */ - ((number_of_lb_subtables != 0) ? 256 * sizeof(WORD) : 0) + /* 5 */ - number_of_lb_subtables * 256 * sizeof(WORD) + /* 6 */ - sizeof(WORD) /* 7 */ - ) / sizeof(WORD); - - /* offset of Unicode to CP table in words */ - fwrite(&wValue, 1, sizeof(wValue), out); - - /* primary CP to Unicode table */ - if(fwrite(table, 1, 256 * sizeof(WCHAR), out) != 256 * sizeof(WCHAR)) { - fclose(out); - printf("Could not write to file \"%s\"\n", name); - return FALSE; - } - - /* optional OEM glyph table size in words */ - wValue = (oemtable != NULL) ? (256 * sizeof(WORD)) : 0; - fwrite(&wValue, 1, sizeof(wValue), out); - - /* optional OEM to Unicode table */ - if (oemtable) { - if(fwrite(oemtable, 1, 256 * sizeof(WCHAR), out) != 256 * sizeof(WCHAR)) { - fclose(out); - printf("Could not write to file \"%s\"\n", name); - return FALSE; - } - } - - /* Number of DBCS LeadByte ranges */ - fwrite(&number_of_lb_ranges, 1, sizeof(number_of_lb_ranges), out); - - /* offsets of lead byte sub tables and lead byte sub tables */ - if(number_of_lb_ranges > 0) { - if(!write_lb_ranges(out, cpi, table)) { - fclose(out); - printf("Could not write to file \"%s\"\n", name); - return FALSE; - } - } - - /* Unknown flag */ - wValue = 0; - fwrite(&wValue, 1, sizeof(wValue), out); - - if(!write_unicode2cp_table(out, cpi, table)) { - fclose(out); - printf("Could not write to file \"%s\"\n", name); - return FALSE; - } - - fclose(out); - return TRUE; -} - -/* correct the codepage information such as default chars */ -static void patch_codepage_info(CPINFOEXA *cpi) -{ - /* currently nothing */ -} - -static WCHAR *Load_CP2Unicode_Table(char *table_name, UINT cp, CPINFOEXA *cpi) -{ - char buf[256]; - char *p; - DWORD n, value; - FILE *file; - WCHAR *table; - int lb_ranges, lb_range_started, line; - - printf("Loading translation table \"%s\"\n", table_name); - - /* Init to default values */ - memset(cpi, 0, sizeof(CPINFOEXA)); - cpi->CodePage = cp; - *(WCHAR *)cpi->DefaultChar = '?'; - cpi->MaxCharSize = 1; - cpi->UnicodeDefaultChar = '?'; - - patch_codepage_info(cpi); - - table = (WCHAR *)malloc(sizeof(WCHAR) * 65536); - if(!table) { - printf("Not enough memory for Codepage to Unicode table\n"); - return NULL; - } - - for(n = 0; n < 256; n++) - table[n] = (WCHAR)n; - - for(n = 256; n < 65536; n++) - table[n] = cpi->UnicodeDefaultChar; - - file = fopen(table_name, "r"); - if(file == NULL) { - free(table); - return NULL; - } - - line = 0; - lb_ranges = 0; - lb_range_started = 0; - - while(fgets(buf, sizeof(buf), file)) { - line++; - p = buf; - while(isspace(*p)) p++; - - if(!*p || p[0] == '#') - continue; - - n = strtol(p, &p, 0); - if(n > 0xFFFF) { - printf("Line %d: Entry 0x%06lX: File \"%s\" corrupted\n", line, n, table_name); - continue; - } - - if(n > 0xFF && cpi->MaxCharSize != 2) { - /*printf("Line %d: Entry 0x%04lX: Switching to DBCS\n", line, n);*/ - cpi->MaxCharSize = 2; - } - - while(isspace(*p)) p++; - - if(!*p || p[0] == '#') { - /*printf("Line %d: Entry 0x%02lX has no Unicode value\n", line, n);*/ - } - else { - value = strtol(p, &p, 0); - if(value > 0xFFFF) { - printf("Line %d: Entry 0x%06lX unicode value: File \"%s\" corrupted\n", line, n, table_name); - } - table[n] = (WCHAR)value; - } - - /* wait for comment */ - while(*p && *p != '#') p++; - - if(*p == '#' && strstr(p, "DBCS LEAD BYTE")) { - /*printf("Line %d, entry 0x%02lX DBCS LEAD BYTE\n", line, n);*/ - if(n > 0xFF) { - printf("Line %d: Entry 0x%04lX: Error: DBCS lead byte overflowed\n", line, n); - continue; - } - - table[n] = (WCHAR)0; - - if(lb_range_started) { - cpi->LeadByte[(lb_ranges - 1) * 2 + 1] = (BYTE)n; - } - else { - /*printf("Line %d: Starting new DBCS lead byte range, entry 0x%02lX\n", line, n);*/ - if(lb_ranges < MAX_LEADBYTES/2) { - lb_ranges++; - lb_range_started = 1; - cpi->LeadByte[(lb_ranges - 1) * 2] = (BYTE)n; - } - else - printf("Line %d: Error: could not start new lead byte range\n", line); - } - } - else { - if(lb_range_started) - lb_range_started = 0; - } - } - - fclose(file); - - return table; -} - -static WCHAR *Load_OEM2Unicode_Table(char *table_name, WCHAR *def_table, UINT cp, CPINFOEXA *cpi) -{ - char buf[256]; - char *p; - DWORD n, value; - FILE *file; - WCHAR *table; - int line; - - printf("Loading oem glyph table \"%s\"\n", table_name); - - table = (WCHAR *)malloc(sizeof(WCHAR) * 65536); - if(!table) { - printf("Not enough memory for Codepage to Unicode table\n"); - return NULL; - } - - memcpy(table, def_table, 65536 * sizeof(WCHAR)); - - file = fopen(table_name, "r"); - if(file == NULL) { - free(table); - return NULL; - } - - while(fgets(buf, sizeof(buf), file)) { - line++; - p = buf; - while(isspace(*p)) p++; - - if(!*p || p[0] == '#') - continue; - - value = strtol(p, &p, 16); - if(value > 0xFFFF) { - printf("Line %d: Entry 0x%06lX: File \"%s\" corrupted\n", line, value, table_name); - continue; - } - - while(isspace(*p)) p++; - - if(!*p || p[0] == '#') { - /*printf("Line %d: Entry 0x%02lX has no Unicode value\n", line, n);*/ - continue; - } - else { - n = strtol(p, &p, 16); - if(n > 0xFFFF) { - printf("Line %d: Entry 0x%06lX unicode value: File \"%s\" corrupted\n", line, value, table_name); - continue; - } - } - - if (cpi->CodePage == 864) { - while(isspace(*p)) p++; - - if(!*p || p[0] == '#' || p[0] == '-') { - /*printf("Line %d: Entry 0x%02lX has no Unicode value\n", line, n);*/ - continue; - } - else { - n = strtol(p, &p, 16); - if(n > 0xFFFF) { - printf("Line %d: Entry 0x%06lX oem value: File \"%s\" corrupted\n", line, value, table_name); - } - continue; - } - } - - table[n] = (WCHAR)value; - } - - fclose(file); - - return table; -} - -int write_nls_files() -{ - WCHAR *table; - WCHAR *oemtable; - char nls_filename[256]; - CPINFOEXA cpi; - int i; - struct code_page { - UINT cp; - BOOL oem; - char *table_filename; - char *comment; - } pages[] = { - {37, FALSE, LIBDIR"MAPPINGS/VENDORS/MICSFT/EBCDIC/CP037.TXT", "IBM EBCDIC US Canada"}, - {424, FALSE, LIBDIR"MAPPINGS/VENDORS/MISC/CP424.TXT", "IBM EBCDIC Hebrew"}, - {437, TRUE, LIBDIR"MAPPINGS/VENDORS/MICSFT/PC/CP437.TXT", "OEM United States"}, - {500, FALSE, LIBDIR"MAPPINGS/VENDORS/MICSFT/EBCDIC/CP500.TXT", "IBM EBCDIC International"}, - /*{708, FALSE, "", "Arabic ASMO"},*/ - /*{720, FALSE, "", "Arabic Transparent ASMO"},*/ - {737, TRUE, LIBDIR"MAPPINGS/VENDORS/MICSFT/PC/CP737.TXT", "OEM Greek 437G"}, - {775, TRUE, LIBDIR"MAPPINGS/VENDORS/MICSFT/PC/CP775.TXT", "OEM Baltic"}, - {850, TRUE, LIBDIR"MAPPINGS/VENDORS/MICSFT/PC/CP850.TXT", "OEM Multilingual Latin 1"}, - {852, TRUE, LIBDIR"MAPPINGS/VENDORS/MICSFT/PC/CP852.TXT", "OEM Slovak Latin 2"}, - {855, TRUE, LIBDIR"MAPPINGS/VENDORS/MICSFT/PC/CP855.TXT", "OEM Cyrillic" }, - {856, TRUE, LIBDIR"MAPPINGS/VENDORS/MISC/CP856.TXT", "Hebrew PC"}, - {857, TRUE, LIBDIR"MAPPINGS/VENDORS/MICSFT/PC/CP857.TXT", "OEM Turkish"}, - {860, TRUE, LIBDIR"MAPPINGS/VENDORS/MICSFT/PC/CP860.TXT", "OEM Portuguese"}, - {861, TRUE, LIBDIR"MAPPINGS/VENDORS/MICSFT/PC/CP861.TXT", "OEM Icelandic"}, - {862, TRUE, LIBDIR"MAPPINGS/VENDORS/MICSFT/PC/CP862.TXT", "OEM Hebrew"}, - {863, TRUE, LIBDIR"MAPPINGS/VENDORS/MICSFT/PC/CP863.TXT", "OEM Canadian French"}, - {864, TRUE, LIBDIR"MAPPINGS/VENDORS/MICSFT/PC/CP864.TXT", "OEM Arabic"}, - {865, TRUE, LIBDIR"MAPPINGS/VENDORS/MICSFT/PC/CP865.TXT", "OEM Nordic"}, - {866, TRUE, LIBDIR"MAPPINGS/VENDORS/MICSFT/PC/CP866.TXT", "OEM Russian"}, - {869, TRUE, LIBDIR"MAPPINGS/VENDORS/MICSFT/PC/CP869.TXT", "OEM Greek"}, - /*{870, FALSE, "", "IBM EBCDIC Multilingual/ROECE (Latin 2)"},*/ - {874, FALSE, LIBDIR"MAPPINGS/VENDORS/MICSFT/PC/CP874.TXT", "ANSI/OEM Thai"}, - {875, FALSE, LIBDIR"MAPPINGS/VENDORS/MICSFT/EBCDIC/CP875.TXT", "IBM EBCDIC Greek"}, - {878, FALSE, LIBDIR"MAPPINGS/VENDORS/MISC/KOI8-R.TXT", "Russian KOI8"}, - {932, FALSE, LIBDIR"MAPPINGS/VENDORS/MICSFT/WINDOWS/CP932.TXT", "ANSI/OEM Japanese Shift-JIS"}, - {936, FALSE, LIBDIR"MAPPINGS/VENDORS/MICSFT/WINDOWS/CP936.TXT", "ANSI/OEM Simplified Chinese GBK"}, - {949, FALSE, LIBDIR"MAPPINGS/VENDORS/MICSFT/WINDOWS/CP949.TXT", "ANSI/OEM Korean Unified Hangul"}, - {950, FALSE, LIBDIR"MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT", "ANSI/OEM Traditional Chinese Big5"}, - {1006, FALSE, LIBDIR"MAPPINGS/VENDORS/MISC/CP1006.TXT", "IBM Arabic"}, - {1026, FALSE, LIBDIR"MAPPINGS/VENDORS/MICSFT/EBCDIC/CP1026.TXT", "IBM EBCDIC Latin 5 Turkish"}, - {1250, FALSE, LIBDIR"MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1250.TXT", "ANSI Eastern Europe"}, - {1251, FALSE, LIBDIR"MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1251.TXT", "ANSI Cyrillic"}, - {1252, FALSE, LIBDIR"MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1252.TXT", "ANSI Latin 1"}, - {1253, FALSE, LIBDIR"MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1253.TXT", "ANSI Greek"}, - {1254, FALSE, LIBDIR"MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1254.TXT", "ANSI Turkish"}, - {1255, FALSE, LIBDIR"MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1255.TXT", "ANSI Hebrew"}, - {1256, FALSE, LIBDIR"MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1256.TXT", "ANSI Arabic"}, - {1257, FALSE, LIBDIR"MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1257.TXT", "ANSI Baltic"}, - {1258, FALSE, LIBDIR"MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1258.TXT", "ANSI/OEM Viet Nam"}, - {10000, FALSE, LIBDIR"MAPPINGS/VENDORS/MICSFT/MAC/ROMAN.TXT", "Mac Roman"}, - {10006, FALSE, LIBDIR"MAPPINGS/VENDORS/MICSFT/MAC/GREEK.TXT", "Mac Greek"}, - {10007, FALSE, LIBDIR"MAPPINGS/VENDORS/MICSFT/MAC/CYRILLIC.TXT", "Mac Cyrillic"}, - {10029, FALSE, LIBDIR"MAPPINGS/VENDORS/MICSFT/MAC/LATIN2.TXT", "Mac Latin 2"}, - {10079, FALSE, LIBDIR"MAPPINGS/VENDORS/MICSFT/MAC/ICELAND.TXT", "Mac Icelandic"}, - {10081, FALSE, LIBDIR"MAPPINGS/VENDORS/MICSFT/MAC/TURKISH.TXT", "Mac Turkish"}, - /*{20000, FALSE, "", "CNS Taiwan"},*/ - /*{20001, FALSE, "", "TCA Taiwan"},*/ - /*{20002, FALSE, "", "Eten Taiwan"},*/ - /*{20003, FALSE, "", "IBM5550 Taiwan"},*/ - /*{20004, FALSE, "", "TeleText Taiwan"},*/ - /*{20005, FALSE, "", "Wang Taiwan"},*/ - /*{20105, FALSE, "", "IA5 IRV International Alphabet No.5"},*/ - /*{20106, FALSE, "", "IA5 German"},*/ - /*{20107, FALSE, "", "IA5 Swedish"},*/ - /*{20108, FALSE, "", "IA5 Norwegian"},*/ - /*{20127, FALSE, "", "US ASCII"}, */ - /*{20261, FALSE, "", "T.61"},*/ - /*{20269, FALSE, "", "ISO 6937 NonSpacing Accent"},*/ - /*{20273, FALSE, "", "IBM EBCDIC Germany"},*/ - /*{20277, FALSE, "", "IBM EBCDIC Denmark/Norway"},*/ - /*{20278, FALSE, "", "IBM EBCDIC Finland/Sweden"},*/ - /*{20280, FALSE, "", "IBM EBCDIC Italy"},*/ - /*{20284, FALSE, "", "IBM EBCDIC Latin America/Spain"},*/ - /*{20285, FALSE, "", "IBM EBCDIC United Kingdom"},*/ - /*{20290, FALSE, "", "IBM EBCDIC Japanese Katakana Extended"},*/ - /*{20297, FALSE, "", "IBM EBCDIC France"},*/ - /*{20420, FALSE, "", "IBM EBCDIC Arabic"},*/ - /*{20423, FALSE, "IBM869.TXT", "IBM EBCDIC Greek"},*/ - /*{20424, FALSE, "", "IBM EBCDIC Hebrew"},*/ - /*{20833, FALSE, "", "IBM EBCDIC Korean Extended"},*/ - /*{20838, FALSE, "", "IBM EBCDIC Thai"},*/ - {20871, FALSE, "ReactOS/IBMCP861.TXT", "IBM EBCDIC Icelandic"}, - /*{20880, FALSE, "", "IBM EBCDIC Cyrillic (Russian)"},*/ - {20866, FALSE, LIBDIR"MAPPINGS/VENDORS/MISC/KOI8-R.TXT", "Russian KOI8"}, - /*{20905, FALSE, "", "IBM EBCDIC Turkish"},*/ - /*{21025, FALSE, "", "IBM EBCDIC Cyrillic (Serbian, Bulgarian)"},*/ - /*{21027, FALSE, "", "Ext Alpha Lowercase"},*/ - {28591, FALSE, LIBDIR"MAPPINGS/ISO8859/8859-1.TXT", "ISO 8859-1 Latin 1"}, - {28592, FALSE, LIBDIR"MAPPINGS/ISO8859/8859-2.TXT", "ISO 8859-2 Eastern Europe"}, - {28593, FALSE, LIBDIR"MAPPINGS/ISO8859/8859-3.TXT", "ISO 8859-3 Turkish"}, - {28594, FALSE, LIBDIR"MAPPINGS/ISO8859/8859-4.TXT", "ISO 8859-4 Baltic"}, - {28595, FALSE, LIBDIR"MAPPINGS/ISO8859/8859-5.TXT", "ISO 8859-5 Cyrillic"}, - {28596, FALSE, LIBDIR"MAPPINGS/ISO8859/8859-6.TXT", "ISO 8859-6 Arabic"}, - {28597, FALSE, LIBDIR"MAPPINGS/ISO8859/8859-7.TXT", "ISO 8859-7 Greek"}, - {28598, FALSE, LIBDIR"MAPPINGS/ISO8859/8859-8.TXT", "ISO 8859-8 Hebrew"}, - {28599, FALSE, LIBDIR"MAPPINGS/ISO8859/8859-9.TXT", "ISO 8859-9 Latin 5"} - }; - - for(i = 0; i < sizeof(pages)/sizeof(pages[0]); i++) { - table = Load_CP2Unicode_Table(pages[i].table_filename, pages[i].cp, &cpi); - if(!table) { - printf("Could not load \"%s\" (%s)\n", pages[i].table_filename, pages[i].comment); - continue; - } - - if (pages[i].oem) { - oemtable = Load_OEM2Unicode_Table(LIBDIR"MAPPINGS/VENDORS/MISC/IBMGRAPH.TXT", table, pages[i].cp, &cpi); - if(!oemtable) { - printf("Could not load \"%s\" (%s)\n", LIBDIR"MAPPINGS/VENDORS/MISC/IBMGRAPH.TXT", "IBM OEM glyph table"); - continue; - } - } - - sprintf(nls_filename, "%s/c_%03d.nls", NLSDIR, cpi.CodePage); - if(!create_nls_file(nls_filename, &cpi, table, pages[i].oem ? oemtable : NULL)) { - printf("Could not write \"%s\" (%s)\n", nls_filename, pages[i].comment); - } - - if (pages[i].oem) - free(oemtable); - - free(table); - } - - return 0; -} - - - -static WORD *to_upper_org = NULL, *to_lower_org = NULL; - -#if 0 -static WORD diffs[256]; -static int number_of_diffs; -#endif - -static WORD number_of_subtables_with_diffs; -/* pointers to subtables with 16 elements in each to the main table */ -static WORD *subtables_with_diffs[4096]; - -static WORD number_of_subtables_with_offsets; -/* subtables with 16 elements */ -static WORD subtables_with_offsets[4096 * 16]; - -static void test_packed_table(WCHAR *table) -{ - WCHAR test_str[] = L"This is an English text. \x0CF\x0EE-\x0F0\x0F3\x0F1\x0F1\x0EA\x0E8 \x0FF \x0EF\x0E8\x0F1\x0E0\x0F2\x0FC \x0F3\x0EC\x0E5\x0FE \x0ED\x0E5\x0EC\x0ED\x0EE\x0E6\x0EA\x0EE. 1234567890"; - //WORD diff, off; - //WORD *sub_table; - DWORD i, len; - - len = lstrlenW(test_str); - - for(i = 0; i < len + 1; i++) { - /*off = table[HIBYTE(test_str[i])]; - - sub_table = table + off; - off = sub_table[LOBYTE(test_str[i]) >> 4]; - - sub_table = table + off; - off = LOBYTE(test_str[i]) & 0x0F; - - diff = sub_table[off]; - - test_str[i] += diff;*/ - test_str[i] += table[table[table[HIBYTE(test_str[i])] + (LOBYTE(test_str[i]) >> 4)] + (LOBYTE(test_str[i]) & 0x0F)]; - } -/* - { - FILE *file; - static int n = 0; - char name[20]; - - sprintf(name, "text%02d.dat", n++); - file = fopen(name, "wb"); - fwrite(test_str, len * sizeof(WCHAR), 1, file); - fclose(file); - }*/ -} - -static BOOL CreateCaseDiff(char *table_name) -{ - char buf[256]; - char *p; - WORD code, case_mapping; - FILE *file; - int line; - - to_upper_org = (WORD *)calloc(65536, sizeof(WORD)); - if(!to_upper_org) { - printf("Not enough memory for to upper table\n"); - return FALSE; - } - - to_lower_org = (WORD *)calloc(65536, sizeof(WORD)); - if(!to_lower_org) { - printf("Not enough memory for to lower table\n"); - return FALSE; - } - - file = fopen(table_name, "r"); - if(file == NULL) { - printf("Could not open file \"%s\"\n", table_name); - return FALSE; - } - - line = 0; - - while(fgets(buf, sizeof(buf), file)) { - line++; - p = buf; - while(*p && isspace(*p)) p++; - - if(!*p) - continue; - - /* 0. Code value */ - code = (WORD)strtol(p, &p, 16); - - //if(code != 0x9A0 && code != 0xBA0) - //continue; - - while(*p && *p != ';') p++; - if(!*p) - continue; - p++; - - /* 1. Character name */ - while(*p && *p != ';') p++; - if(!*p) - continue; - p++; - - /* 2. General Category */ - while(*p && *p != ';') p++; - if(!*p) - continue; - p++; - - /* 3. Canonical Combining Classes */ - while(*p && *p != ';') p++; - if(!*p) - continue; - p++; - - /* 4. Bidirectional Category */ - while(*p && *p != ';') p++; - if(!*p) - continue; - p++; - - /* 5. Character Decomposition Mapping */ - while(*p && *p != ';') p++; - if(!*p) - continue; - p++; - - /* 6. Decimal digit value */ - while(*p && *p != ';') p++; - if(!*p) - continue; - p++; - - /* 7. Digit value */ - while(*p && *p != ';') p++; - if(!*p) - continue; - p++; - - /* 8. Numeric value */ - while(*p && *p != ';') p++; - if(!*p) - continue; - p++; - - /* 9. Mirrored */ - while(*p && *p != ';') p++; - if(!*p) - continue; - p++; - - /* 10. Unicode 1.0 Name */ - while(*p && *p != ';') p++; - if(!*p) - continue; - p++; - - /* 11. 10646 comment field */ - while(*p && *p != ';') p++; - if(!*p) - continue; - p++; - - /* 12. Uppercase Mapping */ - while(*p && isspace(*p)) p++; - if(!*p) continue; - if(*p != ';') { - case_mapping = (WORD)strtol(p, &p, 16); - to_upper_org[code] = case_mapping - code; - while(*p && *p != ';') p++; - } - else - p++; - - /* 13. Lowercase Mapping */ - while(*p && isspace(*p)) p++; - if(!*p) continue; - if(*p != ';') { - case_mapping = (WORD)strtol(p, &p, 16); - to_lower_org[code] = case_mapping - code; - while(*p && *p != ';') p++; - } - else - p++; - - /* 14. Titlecase Mapping */ - while(*p && *p != ';') p++; - if(!*p) - continue; - p++; - } - - fclose(file); - - return TRUE; -} - -#if 0 -static int find_diff(WORD diff) -{ - int i; - - for(i = 0; i < number_of_diffs; i++) { - if(diffs[i] == diff) - return i; - } - - return -1; -} -#endif - -static WORD find_subtable_with_diffs(WORD *table, WORD *subtable) -{ - WORD index; - - for(index = 0; index < number_of_subtables_with_diffs; index++) { - if(memcmp(subtables_with_diffs[index], subtable, 16 * sizeof(WORD)) == 0) { - return index; - } - } - - if(number_of_subtables_with_diffs >= 4096) { - printf("Could not add new subtable with diffs, storage is full\n"); - return 0; - } - - subtables_with_diffs[number_of_subtables_with_diffs] = subtable; - number_of_subtables_with_diffs++; - - return index; -} - -static WORD find_subtable_with_offsets(WORD *subtable) -{ - WORD index; - - for(index = 0; index < number_of_subtables_with_offsets; index++) { - if(memcmp(&subtables_with_offsets[index * 16], subtable, 16 * sizeof(WORD)) == 0) { - return index; - } - } - - if(number_of_subtables_with_offsets >= 4096) { - printf("Could not add new subtable with offsets, storage is full\n"); - return 0; - } - - memcpy(&subtables_with_offsets[number_of_subtables_with_offsets * 16], subtable, 16 * sizeof(WORD)); - number_of_subtables_with_offsets++; - - return index; -} - -static WORD *pack_table(WORD *table, WORD *packed_size_in_words) -{ - WORD high, low4, index; - WORD main_index[256]; - WORD temp_subtable[16]; - WORD *packed_table; - WORD *subtable_src, *subtable_dst; - - memset(subtables_with_diffs, 0, sizeof(subtables_with_diffs)); - number_of_subtables_with_diffs = 0; - - memset(subtables_with_offsets, 0, sizeof(subtables_with_offsets)); - number_of_subtables_with_offsets = 0; - - for(high = 0; high < 256; high++) { - for(low4 = 0; low4 < 256; low4 += 16) { - index = find_subtable_with_diffs(table, &table[MAKEWORD(low4, high)]); - - temp_subtable[low4 >> 4] = index; - } - - index = find_subtable_with_offsets(temp_subtable); - main_index[high] = index; - } - - *packed_size_in_words = 0x100 + number_of_subtables_with_offsets * 16 + number_of_subtables_with_diffs * 16; - packed_table = calloc(*packed_size_in_words, sizeof(WORD)); - - /* fill main index according to the subtables_with_offsets */ - for(high = 0; high < 256; high++) { - packed_table[high] = 0x100 + main_index[high] * 16; - } - - //memcpy(sub_table, subtables_with_offsets, number_of_subtables_with_offsets * 16); - - /* fill subtable index according to the subtables_with_diffs */ - for(index = 0; index < number_of_subtables_with_offsets; index++) { - subtable_dst = packed_table + 0x100 + index * 16; - subtable_src = &subtables_with_offsets[index * 16]; - - for(low4 = 0; low4 < 16; low4++) { - subtable_dst[low4] = 0x100 + number_of_subtables_with_offsets * 16 + subtable_src[low4] * 16; - } - } - - - for(index = 0; index < number_of_subtables_with_diffs; index++) { - subtable_dst = packed_table + 0x100 + number_of_subtables_with_offsets * 16 + index * 16; - memcpy(subtable_dst, subtables_with_diffs[index], 16 * sizeof(WORD)); - - } - - - test_packed_table(packed_table); - - return packed_table; -} - -int write_casemap_file(void) -{ - WORD packed_size_in_words, offset_to_next_table_in_words; - WORD *packed_table, value; - FILE *file; - - if(!CreateCaseDiff(LIBDIR"UnicodeData.txt")) - return -1; - - file = fopen(NLSDIR"/l_intl.nls", "wb"); - - /* write version number */ - value = 1; - fwrite(&value, 1, sizeof(WORD), file); - - /* pack upper case table */ - packed_table = pack_table(to_upper_org, &packed_size_in_words); - offset_to_next_table_in_words = packed_size_in_words + 1; - fwrite(&offset_to_next_table_in_words, 1, sizeof(WORD), file); - /* write packed upper case table */ - fwrite(packed_table, sizeof(WORD), packed_size_in_words, file); - free(packed_table); - - /* pack lower case table */ - packed_table = pack_table(to_lower_org, &packed_size_in_words); - offset_to_next_table_in_words = packed_size_in_words + 1; - fwrite(&offset_to_next_table_in_words, 1, sizeof(WORD), file); - /* write packed lower case table */ - fwrite(packed_table, sizeof(WORD), packed_size_in_words, file); - free(packed_table); - - fclose(file); - - free(to_upper_org); - free(to_lower_org); - - return 0; -} - -int main() -{ - write_nls_files(); - write_casemap_file(); - - return 0; -} diff --git a/reactos/tools/create_nls/unicode.org/ReactOS/ReadMe b/reactos/tools/create_nls/unicode.org/ReactOS/ReadMe deleted file mode 100644 index 27d34546efc..00000000000 --- a/reactos/tools/create_nls/unicode.org/ReactOS/ReadMe +++ /dev/null @@ -1,7 +0,0 @@ -To applay these patch - -copy MAPPINGS/VENDORS/MICSFT/PC/CP861.TXT -to here and rename it to ibmcp861.txt -and applay the patch ibm861.patch to ibmcp861.txt - - diff --git a/reactos/tools/create_nls/unicode.org/ReactOS/ibmcp861.diff b/reactos/tools/create_nls/unicode.org/ReactOS/ibmcp861.diff deleted file mode 100644 index 099b3e47a19..00000000000 --- a/reactos/tools/create_nls/unicode.org/ReactOS/ibmcp861.diff +++ /dev/null @@ -1,23 +0,0 @@ ---- cp861.txt 2001-02-27 00:00:00.000000000 +0100 -+++ ibmcp861.txt 2005-11-12 19:27:38.578125000 +0100 -@@ -41,9 +41,9 @@ - 0x17 0x0017 #END OF TRANSMISSION BLOCK - 0x18 0x0018 #CANCEL - 0x19 0x0019 #END OF MEDIUM --0x1a 0x001a #SUBSTITUTE -+0x1a 0x001c #FILE SEPARATOR - 0x1b 0x001b #ESCAPE --0x1c 0x001c #FILE SEPARATOR -+0x1c 0x007f #DELETE - 0x1d 0x001d #GROUP SEPARATOR - 0x1e 0x001e #RECORD SEPARATOR - 0x1f 0x001f #UNIT SEPARATOR -@@ -245,7 +245,7 @@ - 0xe3 0x03c0 #GREEK SMALL LETTER PI - 0xe4 0x03a3 #GREEK CAPITAL LETTER SIGMA - 0xe5 0x03c3 #GREEK SMALL LETTER SIGMA --0xe6 0x00b5 #MICRO SIGN -+0xe6 0x03bc #GREEK SMALL LETTER MU - 0xe7 0x03c4 #GREEK SMALL LETTER TAU - 0xe8 0x03a6 #GREEK CAPITAL LETTER PHI - 0xe9 0x0398 #GREEK CAPITAL LETTER THETA diff --git a/reactos/tools/dumpstab.c b/reactos/tools/dumpstab.c deleted file mode 100644 index 66733e51117..00000000000 --- a/reactos/tools/dumpstab.c +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Usage: dumpstab input-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" - -const char* -stab_type_name ( int stab_type ) -{ - static char buf[32]; - switch ( stab_type ) - { -#define X(n) case n: return #n; - X(N_GYSM) - X(N_FNAME) - X(N_FUN) - X(N_STSYM) - X(N_LCSYM) - X(N_MAIN) - X(N_PC) - X(N_NSYMS) - X(N_NOMAP) - X(N_RSYM) - X(N_M2C) - X(N_SLINE) - X(N_DSLINE) - X(N_BSLINE) - //X(N_BROWS) - X(N_DEFD) - X(N_EHDECL) - //X(N_MOD2) - X(N_CATCH) - X(N_SSYM) - X(N_SO) - X(N_LSYM) - X(N_BINCL) - X(N_SOL) - X(N_PSYM) - X(N_EINCL) - X(N_ENTRY) - X(N_LBRAC) - X(N_EXCL) - X(N_SCOPE) - X(N_RBRAC) - X(N_BCOMM) - X(N_ECOMM) - X(N_ECOML) - X(N_LENG) - } - sprintf ( buf, "%lu", stab_type ); - return buf; -} - -static int -GetStabInfo(void *FileData, PIMAGE_FILE_HEADER PEFileHeader, - PIMAGE_SECTION_HEADER PESectionHeaders, - ULONG *StabSymbolsLength, void **StabSymbolsBase, - ULONG *StabStringsLength, void **StabStringsBase) -{ - ULONG Idx; - - /* Load .stab and .stabstr sections if available */ - *StabSymbolsBase = NULL; - *StabSymbolsLength = 0; - *StabStringsBase = NULL; - *StabStringsLength = 0; - - for (Idx = 0; Idx < PEFileHeader->NumberOfSections; Idx++) - { - /* printf("section: '%.08s'\n", PESectionHeaders[Idx].Name); */ - if ((strncmp((char*)PESectionHeaders[Idx].Name, ".stab", 5) == 0) - && (PESectionHeaders[Idx].Name[5] == 0)) - { - /* printf(".stab section found. Size %d\n", - PESectionHeaders[Idx].SizeOfRawData); */ - - *StabSymbolsLength = PESectionHeaders[Idx].SizeOfRawData; - *StabSymbolsBase = (void *)((char *) FileData + PESectionHeaders[Idx].PointerToRawData); - } - - if (strncmp((char*)PESectionHeaders[Idx].Name, ".stabstr", 8) == 0) - { - /* printf(".stabstr section found. Size %d\n", - PESectionHeaders[Idx].SizeOfRawData); */ - - *StabStringsLength = PESectionHeaders[Idx].SizeOfRawData; - *StabStringsBase = (void *)((char *) FileData + PESectionHeaders[Idx].PointerToRawData); - } - } - - return 0; -} - -static void -IterateStabs(ULONG StabSymbolsLength, void *StabSymbolsBase, - ULONG StabStringsLength, void *StabStringsBase, - ULONG_PTR ImageBase, PIMAGE_FILE_HEADER PEFileHeader, - PIMAGE_SECTION_HEADER PESectionHeaders) -{ - PSTAB_ENTRY e; - ULONG Count, i; - - e = StabSymbolsBase; - Count = StabSymbolsLength / sizeof(STAB_ENTRY); - if (Count == 0) /* No symbol info */ - return; - - printf ( "type,other,desc,value,str\n" ); - for (i = 0; i < Count; i++) - { - printf ( "%s,%lu(0x%x),%lu(0x%x),%lu(0x%x),%s\n", - stab_type_name(e[i].n_type), - e[i].n_other, - e[i].n_other, - e[i].n_desc, - e[i].n_desc, - e[i].n_value, - e[i].n_value, - (char *) StabStringsBase + e[i].n_strx ); - } -} - -int main(int argc, char* argv[]) -{ - PIMAGE_DOS_HEADER PEDosHeader; - PIMAGE_FILE_HEADER PEFileHeader; - PIMAGE_OPTIONAL_HEADER PEOptHeader; - PIMAGE_SECTION_HEADER PESectionHeaders; - ULONG ImageBase; - void *StabBase; - ULONG StabsLength; - void *StabStringBase; - ULONG StabStringsLength; - char* path1; - size_t FileSize; - void *FileData; - - if (2 != argc) - { - fprintf(stderr, "Usage: dumpstabs \n"); - exit(1); - } - - path1 = convert_path(argv[1]); - - 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) - { - 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); - ImageBase = PEOptHeader->ImageBase; - - /* Locate PE section headers */ - PESectionHeaders = (PIMAGE_SECTION_HEADER)((char *) PEOptHeader + PEFileHeader->SizeOfOptionalHeader); - - if (GetStabInfo(FileData, PEFileHeader, PESectionHeaders, &StabsLength, &StabBase, - &StabStringsLength, &StabStringBase)) - { - free(FileData); - exit(1); - } - - IterateStabs( StabsLength, StabBase, StabStringsLength, StabStringBase, - ImageBase, PEFileHeader, PESectionHeaders); - - free(FileData); - - return 0; -} diff --git a/reactos/tools/gendib/CMakeLists.txt b/reactos/tools/gendib/CMakeLists.txt deleted file mode 100644 index b78ad2a51d4..00000000000 --- a/reactos/tools/gendib/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ - -add_executable(gendib gendib.c) diff --git a/reactos/tools/gendib/gendib.c b/reactos/tools/gendib/gendib.c deleted file mode 100644 index ea0ab54f8cb..00000000000 --- a/reactos/tools/gendib/gendib.c +++ /dev/null @@ -1,1043 +0,0 @@ -/* - * Copyright 2005 Ge van Geldorp (gvg@reactos.com). - * - * This program 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 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser 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 - */ -/* - * This is a code generator. It outputs C code which can be compiled using the - * standard build tools. It is used to generate code for the DIB Blt routines. - * There are a lot of possible Blt routines (256 rop codes, for 6 different - * bit depths). It is possible to use a generic Blt routine which handles all - * rop codes and all depths. The drawback is that it will be relatively slow. - * The other extreme is to write (generate) a separate Blt routine for each - * rop code/depth combination. This will result in a extremely large amount - * of code. So, we opt for something in between: named rops get their own - * routine, unnamed rops are handled by a generic routine. - * Basically, what happens is that generic code which looks like: - * - * for (...) - * { - * if (CondA) - * { - * doSomethingA; - * } - * for (...) - * { - * if (CondB) - * { - * doSomethingB; - * } - * else - * { - * doSomethingElseB; - * } - * } - * } - * - * is specialized for named rops to look like: - * - * if (condC) - * { - * if (condD) - * { - * for (...) - * { - * for (...) - * { - * pumpSomeBytes; - * } - * } - * } - * else - * { - * for (...) - * { - * for (...) - * { - * pumpSomeBytesSlightlyDifferentE; - * } - * } - * } - * } - * - * i.e. we make the inner loops as tight as possible. - * Another optimization is to try to load/store 32 alligned bits at a time from - * video memory. Accessing video memory from the CPU is slooooooow, so let's - * try to do this as little as possible, even if that means we have to do some - * extra operations using main memory. - */ - -#include -#include -#include -#include - -#define NDEBUG - -#define USES_DEST(RopCode) ((((RopCode) & 0xaa) >> 1) != ((RopCode) & 0x55)) -#define USES_SOURCE(RopCode) ((((RopCode) & 0xcc) >> 2) != ((RopCode) & 0x33)) -#define USES_PATTERN(RopCode) ((((RopCode) & 0xf0) >> 4) != ((RopCode) & 0x0f)) - -#ifdef NDEBUG -#define MARK(Out) -#else -#define MARK(Out) Output((Out), "/* Generated by %s line %d*/\n", \ - __FUNCTION__, __LINE__); -#endif - -#define ROPCODE_BLACKNESS 0x00 -#define ROPCODE_NOTSRCERASE 0x11 -#define ROPCODE_NOTSRCCOPY 0x33 -#define ROPCODE_SRCERASE 0x44 -#define ROPCODE_DSTINVERT 0x55 -#define ROPCODE_PATINVERT 0x5a -#define ROPCODE_SRCINVERT 0x66 -#define ROPCODE_SRCAND 0x88 -#define ROPCODE_NOOP 0xaa -#define ROPCODE_MERGEPAINT 0xbb -#define ROPCODE_MERGECOPY 0xc0 -#define ROPCODE_SRCCOPY 0xcc -#define ROPCODE_SRCPAINT 0xee -#define ROPCODE_PATCOPY 0xf0 -#define ROPCODE_PATPAINT 0xfb -#define ROPCODE_WHITENESS 0xff - -#define ROPCODE_GENERIC 256 /* Special case */ - -typedef struct _ROPINFO - { - unsigned RopCode; - const char *Name; - const char *Operation; - int UsesDest; - int UsesSource; - int UsesPattern; - } -ROPINFO, *PROPINFO; - -#define FLAG_PATTERNSURFACE 0x01 -#define FLAG_TRIVIALXLATE 0x02 -#define FLAG_BOTTOMUP 0x04 -#define FLAG_FORCENOUSESSOURCE 0x08 -#define FLAG_FORCERAWSOURCEAVAIL 0x10 - -static PROPINFO -FindRopInfo(unsigned RopCode) -{ - static ROPINFO KnownCodes[] = - { - { ROPCODE_BLACKNESS, "BLACKNESS", "0", 0, 0, 0 }, - { ROPCODE_NOTSRCERASE, "NOTSRCERASE","~(D | S)", 1, 1, 0 }, - { ROPCODE_NOTSRCCOPY, "NOTSRCCOPY", "~S", 0, 1, 0 }, - { ROPCODE_SRCERASE, "SRCERASE", "(~D) & S", 1, 1, 0 }, - { ROPCODE_DSTINVERT, "DSTINVERT", "~D", 1, 0, 0 }, - { ROPCODE_PATINVERT, "PATINVERT", "D ^ P", 1, 0, 1 }, - { ROPCODE_SRCINVERT, "SRCINVERT", "D ^ S", 1, 1, 0 }, - { ROPCODE_SRCAND, "SRCAND", "D & S", 1, 1, 0 }, - { ROPCODE_NOOP, "NOOP", "D", 1, 0, 0 }, - { ROPCODE_MERGEPAINT, "MERGEPAINT", "D | (~S)", 1, 1, 0 }, - { ROPCODE_MERGECOPY, "MERGECOPY", "S & P", 0, 1, 1 }, - { ROPCODE_SRCCOPY, "SRCCOPY", "S", 0, 1, 0 }, - { ROPCODE_SRCPAINT, "SRCPAINT", "D | S", 1, 1, 0 }, - { ROPCODE_PATCOPY, "PATCOPY", "P", 0, 0, 1 }, - { ROPCODE_PATPAINT, "PATPAINT", "D | (~S) | P", 1, 1, 1 }, - { ROPCODE_WHITENESS, "WHITENESS", "0xffffffff", 0, 0, 0 }, - { ROPCODE_GENERIC, NULL, NULL, 1, 1, 1 } - }; - unsigned Index; - - for (Index = 0; Index < sizeof(KnownCodes) / sizeof(KnownCodes[0]); Index++) - { - if (RopCode == KnownCodes[Index].RopCode) - { - return KnownCodes + Index; - } - } - - return NULL; -} - -static void -Output(FILE *Out, const char *Fmt, ...) -{ - static unsigned Indent = 0; - static int AtBOL = 1; - unsigned n; - va_list Args; - - if (NULL != strchr(Fmt, '{') && 0 != Indent) - { - Indent += 2; - } - else if (NULL != strchr(Fmt, '}')) - { - Indent -= 2; - } - if (AtBOL) - { - for (n = 0; n < Indent; n++) - { - putc(' ', Out); - } - AtBOL = 0; - } - - va_start(Args, Fmt); - vfprintf(Out, Fmt, Args); - va_end(Args); - - if (NULL != strchr(Fmt, '{')) - { - Indent += 2; - } - else if (NULL != strchr(Fmt, '}') && 0 != Indent) - { - Indent -= 2; - } - AtBOL = '\n' == Fmt[strlen(Fmt) - 1]; -} - -static void -PrintRoutineName(FILE *Out, unsigned Bpp, PROPINFO RopInfo) -{ - if (NULL != RopInfo && ROPCODE_GENERIC != RopInfo->RopCode) - { - Output(Out, "DIB_%uBPP_BitBlt_%s", Bpp, RopInfo->Name); - } - else - { - Output(Out, "DIB_%uBPP_BitBlt_Generic", Bpp); - } -} - -static void -CreateShiftTables(FILE *Out) -{ - Output(Out, "\n"); - Output(Out, "static unsigned Shift1Bpp[] =\n"); - Output(Out, "{\n"); - Output(Out, "0,\n"); - Output(Out, "24, 25, 26, 27, 28, 29, 30, 31, 16, 17, 18, 19, 20, 21, 22, 23,\n"); - Output(Out, "8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7\n"); - Output(Out, "};\n"); - Output(Out, "static unsigned Shift4Bpp[] =\n"); - Output(Out, "{\n"); - Output(Out, "0,\n"); - Output(Out, "24, 28, 16, 20, 8, 12, 0, 4\n"); - Output(Out, "};\n"); - Output(Out, "static unsigned Shift8Bpp[] =\n"); - Output(Out, "{\n"); - Output(Out, "0,\n"); - Output(Out, "24, 16, 8, 0\n"); - Output(Out, "};\n"); - Output(Out, "static unsigned Shift16Bpp[] =\n"); - Output(Out, "{\n"); - Output(Out, "0,\n"); - Output(Out, "16, 0\n"); - Output(Out, "};\n"); -} - -static void -CreateOperation(FILE *Out, unsigned Bpp, PROPINFO RopInfo, unsigned SourceBpp, - unsigned Bits) -{ - const char *Cast; - const char *Dest; - const char *Template; - - MARK(Out); - if (32 == Bits) - { - Cast = ""; - Dest = "*DestPtr"; - } - else if (16 == Bpp) - { - Cast = "(USHORT) "; - Dest = "*((PUSHORT) DestPtr)"; - } - else - { - Cast = "(UCHAR) "; - Dest = "*((PUCHAR) DestPtr)"; - } - Output(Out, "%s = ", Dest); - if (ROPCODE_GENERIC == RopInfo->RopCode) - { - Output(Out, "%sDIB_DoRop(BltInfo->Rop4, %s, Source, Pattern)", - Cast, Dest); - } - else - { - Template = RopInfo->Operation; - while ('\0' != *Template) - { - switch(*Template) - { - case 'S': - Output(Out, "%sSource", Cast); - break; - case 'P': - Output(Out, "%sPattern", Cast); - break; - case 'D': - Output(Out, "%s", Dest); - break; - default: - Output(Out, "%c", *Template); - break; - } - Template++; - } - } -} - -static void -CreateBase(FILE *Out, int Source, int Flags, unsigned Bpp) -{ - const char *What = (Source ? "Source" : "Dest"); - - MARK(Out); - Output(Out, "%sBase = (char *) BltInfo->%sSurface->pvScan0 +\n", What, What); - if (0 == (Flags & FLAG_BOTTOMUP)) - { - if (Source) - { - Output(Out, " BltInfo->SourcePoint.y *\n"); - } - else - { - Output(Out, " BltInfo->DestRect.top *\n"); - } - } - else - { - if (Source) - { - Output(Out, " (BltInfo->SourcePoint.y +\n"); - Output(Out, " BltInfo->DestRect.bottom -\n"); - Output(Out, " BltInfo->DestRect.top - 1) *\n"); - } - else - { - Output(Out, " (BltInfo->DestRect.bottom - 1) *\n"); - } - } - Output(Out, " %sBltInfo->%sSurface->lDelta +\n", - Source ? " " : "", What); - if (Source) - { - Output(Out, " %sBltInfo->SourcePoint.x", - 16 < Bpp ? "" : "(("); - } - else - { - Output(Out, " BltInfo->DestRect.left"); - } - if (Bpp < 8) - { - Output(Out, " / %u", 8 / Bpp); - } - else if (8 < Bpp) - { - Output(Out, " * %u", Bpp / 8); - } - if (Source && Bpp <= 16) - { - Output(Out, ") & ~ 0x3)"); - } - Output(Out, ";\n", Bpp / 8); - if (Source && Bpp <= 16) - { - Output(Out, "BaseSourcePixels = %u - (BltInfo->SourcePoint.x & 0x%x);\n", - 32 / Bpp, 32 / Bpp - 1); - } -} - -static void -CreateGetSource(FILE *Out, unsigned Bpp, PROPINFO RopInfo, int Flags, - unsigned SourceBpp, unsigned Shift) -{ - const char *AssignOp; - const char *Before; - char After[8]; - - MARK(Out); - if (0 == Shift) - { - AssignOp = "="; - Before = ""; - After[0] = '\0'; - } - else - { - AssignOp = "|="; - Before = "("; - sprintf(After, ") << %u", Shift); - } - - if (ROPCODE_SRCCOPY != RopInfo->RopCode || - 0 == (Flags & FLAG_TRIVIALXLATE) || Bpp != SourceBpp) - { - if (0 == (Flags & FLAG_FORCERAWSOURCEAVAIL) && SourceBpp <= 16) - { - Output(Out, "if (0 == SourcePixels)\n"); - Output(Out, "{\n"); - Output(Out, "RawSource = *SourcePtr++;\n"); - Output(Out, "SourcePixels = %u;\n", 32 / SourceBpp); - Output(Out, "}\n"); - } - Output(Out, "Source %s (%s", AssignOp, Before); - if (0 == (Flags & FLAG_TRIVIALXLATE)) - { - Output(Out, "XLATEOBJ_iXlate(BltInfo->XlateSourceToDest, %s", - 16 < SourceBpp ? "" : "("); - } - if (32 == SourceBpp) - { - Output(Out, "*SourcePtr++"); - } - else if (24 == SourceBpp) - { - Output(Out, "*(PUSHORT) SourcePtr + (*((PBYTE) SourcePtr + 2) << 16)"); - } - else - { - Output(Out, "RawSource >> Shift%uBpp[SourcePixels]", SourceBpp); - } - if (0 == (Flags & FLAG_TRIVIALXLATE)) - { - if (16 < SourceBpp) - { - Output(Out, ")"); - } - else - { - Output(Out, ") & 0x%x)", (1 << SourceBpp) - 1); - } - } - if (32 == Bpp) - { - Output(Out, ")%s;\n", After); - } - else - { - Output(Out, " & 0x%x)%s;\n", (1 << Bpp) - 1, After); - } - if (SourceBpp <= 16) - { - Output(Out, "SourcePixels--;\n"); - } - else if (24 == SourceBpp) - { - Output(Out, "SourcePtr = (PULONG)((char *) SourcePtr + 3);\n"); - } - } -} - -static void -CreateCounts(FILE *Out, unsigned Bpp) -{ - MARK(Out); - if (32 != Bpp) - { - if (8 < Bpp) - { - Output(Out, "LeftCount = ((ULONG_PTR) DestBase >> 1) & 0x01;\n"); - } - else - { - Output(Out, "LeftCount = (ULONG_PTR) DestBase & 0x03;\n"); - Output(Out, "if (BltInfo->DestRect.right - BltInfo->DestRect.left < " - "LeftCount)\n"); - Output(Out, "{\n"); - Output(Out, "LeftCount = BltInfo->DestRect.right - " - "BltInfo->DestRect.left;\n"); - Output(Out, "}\n"); - } - Output(Out, "CenterCount = (BltInfo->DestRect.right - BltInfo->DestRect.left -\n"); - Output(Out, " LeftCount) / %u;\n", 32 / Bpp); - Output(Out, "RightCount = (BltInfo->DestRect.right - BltInfo->DestRect.left -\n"); - Output(Out, " LeftCount - %u * CenterCount);\n", 32 / Bpp); - } - else - { - Output(Out, "CenterCount = BltInfo->DestRect.right - BltInfo->DestRect.left;\n"); - } -} - -static void -CreateSetSinglePixel(FILE *Out, unsigned Bpp, PROPINFO RopInfo, int Flags, - unsigned SourceBpp) -{ - if (RopInfo->UsesSource && 0 == (Flags & FLAG_FORCENOUSESSOURCE)) - { - CreateGetSource(Out, Bpp, RopInfo, Flags, SourceBpp, 0); - MARK(Out); - } - if (RopInfo->UsesPattern && 0 != (Flags & FLAG_PATTERNSURFACE)) - { - Output(Out, "Pattern = DIB_GetSourceIndex(BltInfo->PatternSurface, PatternX, PatternY);\n"); - Output(Out, "if (BltInfo->PatternSurface->sizlBitmap.cx <= ++PatternX)\n"); - Output(Out, "{\n"); - Output(Out, "PatternX -= BltInfo->PatternSurface->sizlBitmap.cx;\n"); - Output(Out, "}\n"); - } - if ((RopInfo->UsesSource && 0 == (Flags & FLAG_FORCENOUSESSOURCE) && - Bpp != SourceBpp) || - (RopInfo->UsesPattern && 0 != (Flags & FLAG_PATTERNSURFACE))) - { - Output(Out, "\n"); - } - CreateOperation(Out, Bpp, RopInfo, SourceBpp, 16); - Output(Out, ";\n"); - MARK(Out); - Output(Out, "\n"); - Output(Out, "DestPtr = (PULONG)((char *) DestPtr + %u);\n", Bpp / 8); -} - -static void -CreateBitCase(FILE *Out, unsigned Bpp, PROPINFO RopInfo, int Flags, - unsigned SourceBpp) -{ - unsigned Partial; - - MARK(Out); - if (RopInfo->UsesSource) - { - if (0 == (Flags & FLAG_FORCENOUSESSOURCE)) - { - CreateBase(Out, 1, Flags, SourceBpp); - } - CreateBase(Out, 0, Flags, Bpp); - CreateCounts(Out, Bpp); - MARK(Out); - } - if (RopInfo->UsesPattern && 0 != (Flags & FLAG_PATTERNSURFACE)) - { - if (0 == (Flags & FLAG_BOTTOMUP)) - { - Output(Out, "PatternY = (BltInfo->DestRect.top - BltInfo->BrushOrigin.y) %%\n"); - Output(Out, " BltInfo->PatternSurface->sizlBitmap.cy;\n"); - } - else - { - Output(Out, "PatternY = (BltInfo->DestRect.bottom - 1 -\n"); - Output(Out, " BltInfo->BrushOrigin.y) %%\n"); - Output(Out, " BltInfo->PatternSurface->sizlBitmap.cy;\n"); - } - } - if (ROPCODE_SRCCOPY == RopInfo->RopCode && - 0 != (Flags & FLAG_TRIVIALXLATE) && Bpp == SourceBpp) - { - Output(Out, "CenterCount = %u * (BltInfo->DestRect.right -\n", Bpp >> 3); - Output(Out, " BltInfo->DestRect.left);\n"); - } - if (RopInfo->UsesPattern && 0 != (Flags & FLAG_PATTERNSURFACE)) - { - Output(Out, "BasePatternX = (BltInfo->DestRect.left - BltInfo->BrushOrigin.x) %%\n"); - Output(Out, " BltInfo->PatternSurface->sizlBitmap.cx;\n"); - } - - Output(Out, "for (LineIndex = 0; LineIndex < LineCount; LineIndex++)\n"); - Output(Out, "{\n"); - if (ROPCODE_SRCCOPY != RopInfo->RopCode || - 0 == (Flags & FLAG_TRIVIALXLATE) || Bpp != SourceBpp) - { - if (RopInfo->UsesSource && 0 == (Flags & FLAG_FORCENOUSESSOURCE)) - { - Output(Out, "SourcePtr = (PULONG) SourceBase;\n"); - if (SourceBpp <= 16) - { - Output(Out, "RawSource = *SourcePtr++;\n"); - Output(Out, "SourcePixels = BaseSourcePixels;\n"); - } - } - Output(Out, "DestPtr = (PULONG) DestBase;\n"); - } - - if (RopInfo->UsesPattern && 0 != (Flags & FLAG_PATTERNSURFACE)) - { - Output(Out, "PatternX = BasePatternX;\n"); - } - - if (ROPCODE_SRCCOPY == RopInfo->RopCode && - 0 != (Flags & FLAG_TRIVIALXLATE) && Bpp == SourceBpp) - { - Output(Out, "RtlMoveMemory(DestBase, SourceBase, CenterCount);\n"); - Output(Out, "\n"); - } - else - { - Output(Out, "\n"); - if (32 != Bpp) - { - if (16 == Bpp) - { - Output(Out, "if (0 != LeftCount)\n"); - } - else - { - Output(Out, "for (i = 0; i < LeftCount; i++)\n"); - } - Output(Out, "{\n"); - CreateSetSinglePixel(Out, Bpp, RopInfo, - (16 == Bpp ? Flags | FLAG_FORCERAWSOURCEAVAIL : - Flags), SourceBpp); - MARK(Out); - Output(Out, "}\n"); - Output(Out, "\n"); - } - Output(Out, "for (i = 0; i < CenterCount; i++)\n"); - Output(Out, "{\n"); - if (RopInfo->UsesSource && 0 == (Flags & FLAG_FORCENOUSESSOURCE)) - { - for (Partial = 0; Partial < 32 / Bpp; Partial++) - { - CreateGetSource(Out, Bpp, RopInfo, Flags, SourceBpp, - Partial * Bpp); - MARK(Out); - } - Output(Out, "\n"); - } - if (RopInfo->UsesPattern && 0 != (Flags & FLAG_PATTERNSURFACE)) - { - for (Partial = 0; Partial < 32 / Bpp; Partial++) - { - if (0 == Partial) - { - Output(Out, "Pattern = DIB_GetSourceIndex(BltInfo->PatternSurface, PatternX, PatternY);\n"); - } - else - { - Output(Out, "Pattern |= DIB_GetSourceIndex(BltInfo->PatternSurface, PatternX, PatternY) << %u;\n", Partial * Bpp); - } - Output(Out, "if (BltInfo->PatternSurface->sizlBitmap.cx <= ++PatternX)\n"); - Output(Out, "{\n"); - Output(Out, "PatternX -= BltInfo->PatternSurface->sizlBitmap.cx;\n"); - Output(Out, "}\n"); - } - Output(Out, "\n"); - } - CreateOperation(Out, Bpp, RopInfo, SourceBpp, 32); - Output(Out, ";\n"); - MARK(Out); - Output(Out, "\n"); - Output(Out, "DestPtr++;\n"); - Output(Out, "}\n"); - Output(Out, "\n"); - if (32 != Bpp) - { - if (16 == Bpp) - { - Output(Out, "if (0 != RightCount)\n"); - } - else - { - Output(Out, "for (i = 0; i < RightCount; i++)\n"); - } - Output(Out, "{\n"); - CreateSetSinglePixel(Out, Bpp, RopInfo, Flags, SourceBpp); - MARK(Out); - Output(Out, "}\n"); - Output(Out, "\n"); - } - if (RopInfo->UsesPattern && 0 != (Flags & FLAG_PATTERNSURFACE)) - { - if (0 == (Flags & FLAG_BOTTOMUP)) - { - Output(Out, "if (BltInfo->PatternSurface->sizlBitmap.cy <= ++PatternY)\n"); - Output(Out, "{\n"); - Output(Out, "PatternY -= BltInfo->PatternSurface->sizlBitmap.cy;\n"); - Output(Out, "}\n"); - } - else - { - Output(Out, "if (0 == PatternY--)\n"); - Output(Out, "{\n"); - Output(Out, "PatternY = BltInfo->PatternSurface->sizlBitmap.cy - 1;\n"); - Output(Out, "}\n"); - } - } - } - if (RopInfo->UsesSource && 0 == (Flags & FLAG_FORCENOUSESSOURCE)) - { - Output(Out, "SourceBase %c= BltInfo->SourceSurface->lDelta;\n", - 0 == (Flags & FLAG_BOTTOMUP) ? '+' : '-'); - } - Output(Out, "DestBase %c= BltInfo->DestSurface->lDelta;\n", - 0 == (Flags & FLAG_BOTTOMUP) ? '+' : '-'); - Output(Out, "}\n"); -} - -static void -CreateActionBlock(FILE *Out, unsigned Bpp, PROPINFO RopInfo, - int Flags) -{ - static unsigned SourceBpp[ ] = - { 1, 4, 8, 16, 24, 32 }; - unsigned BppIndex; - - MARK(Out); - if (RopInfo->UsesSource) - { - if (ROPCODE_GENERIC == RopInfo->RopCode) - { - Output(Out, "if (UsesSource)\n"); - Output(Out, "{\n"); - } - Output(Out, "switch (BltInfo->SourceSurface->iBitmapFormat)\n"); - Output(Out, "{\n"); - for (BppIndex = 0; - BppIndex < sizeof(SourceBpp) / sizeof(unsigned); - BppIndex++) - { - Output(Out, "case BMF_%uBPP:\n", SourceBpp[BppIndex]); - Output(Out, "{\n"); - if (Bpp == SourceBpp[BppIndex]) - { - Output(Out, "if (NULL == BltInfo->XlateSourceToDest ||\n"); - Output(Out, " 0 != (BltInfo->XlateSourceToDest->flXlate & XO_TRIVIAL))\n"); - Output(Out, "{\n"); - Output(Out, "if (BltInfo->DestRect.top < BltInfo->SourcePoint.y)\n"); - Output(Out, "{\n"); - CreateBitCase(Out, Bpp, RopInfo, - Flags | FLAG_TRIVIALXLATE, - SourceBpp[BppIndex]); - MARK(Out); - Output(Out, "}\n"); - Output(Out, "else\n"); - Output(Out, "{\n"); - CreateBitCase(Out, Bpp, RopInfo, - Flags | FLAG_BOTTOMUP | FLAG_TRIVIALXLATE, - SourceBpp[BppIndex]); - MARK(Out); - Output(Out, "}\n"); - Output(Out, "}\n"); - Output(Out, "else\n"); - Output(Out, "{\n"); - Output(Out, "if (BltInfo->DestRect.top < BltInfo->SourcePoint.y)\n"); - Output(Out, "{\n"); - CreateBitCase(Out, Bpp, RopInfo, Flags, SourceBpp[BppIndex]); - MARK(Out); - Output(Out, "}\n"); - Output(Out, "else\n"); - Output(Out, "{\n"); - CreateBitCase(Out, Bpp, RopInfo, - Flags | FLAG_BOTTOMUP, - SourceBpp[BppIndex]); - MARK(Out); - Output(Out, "}\n"); - Output(Out, "}\n"); - } - else - { - CreateBitCase(Out, Bpp, RopInfo, Flags, - SourceBpp[BppIndex]); - MARK(Out); - } - Output(Out, "break;\n"); - Output(Out, "}\n"); - } - Output(Out, "}\n"); - if (ROPCODE_GENERIC == RopInfo->RopCode) - { - Output(Out, "}\n"); - Output(Out, "else\n"); - Output(Out, "{\n"); - CreateBitCase(Out, Bpp, RopInfo, Flags | FLAG_FORCENOUSESSOURCE, 0); - MARK(Out); - Output(Out, "}\n"); - } - } - else - { - CreateBitCase(Out, Bpp, RopInfo, Flags, 0); - } -} - -static void -CreatePrimitive(FILE *Out, unsigned Bpp, PROPINFO RopInfo) -{ - int First; - unsigned Partial; - - MARK(Out); - Output(Out, "\n"); - Output(Out, "static void\n"); - PrintRoutineName(Out, Bpp, RopInfo); - Output(Out, "(PBLTINFO BltInfo)\n"); - Output(Out, "{\n"); - if (ROPCODE_BLACKNESS == RopInfo->RopCode) - { - Output(Out, "DIB_%uBPP_ColorFill(BltInfo->DestSurface, " - "&BltInfo->DestRect, 0x0);\n", Bpp); - } - else if (ROPCODE_WHITENESS == RopInfo->RopCode) - { - Output(Out, "DIB_%uBPP_ColorFill(BltInfo->DestSurface, " - "&BltInfo->DestRect, ~0);\n", Bpp); - } - else if (ROPCODE_NOOP == RopInfo->RopCode) - { - Output(Out, "return;\n"); - } - else - { - Output(Out, "ULONG LineIndex, LineCount;\n"); - Output(Out, "ULONG i;\n"); - if (RopInfo->UsesPattern) - { - Output(Out, "ULONG PatternX =0, PatternY = 0, BasePatternX = 0;\n"); - } - First = 1; - if (RopInfo->UsesSource) - { - Output(Out, "ULONG Source = 0"); - First = 0; - } - if (RopInfo->UsesPattern) - { - Output(Out, "%s Pattern = 0", First ? "ULONG" : ","); - First = 0; - } - if (! First) - { - Output(Out, ";\n"); - } - Output(Out, "char *DestBase;\n"); - Output(Out, "PULONG DestPtr;\n"); - if (RopInfo->UsesSource) - { - Output(Out, "char *SourceBase;\n"); - Output(Out, "PULONG SourcePtr;\n"); - Output(Out, "ULONG RawSource;\n"); - Output(Out, "unsigned SourcePixels, BaseSourcePixels;\n"); - } - if (32 == Bpp) - { - Output(Out, "ULONG CenterCount;\n"); - } - else - { - Output(Out, "ULONG LeftCount, CenterCount, RightCount;\n"); - } - if (ROPCODE_GENERIC == RopInfo->RopCode) - { - Output(Out, "BOOLEAN UsesSource, UsesPattern;\n"); - Output(Out, "\n"); - Output(Out, "UsesSource = ROP4_USES_SOURCE(BltInfo->Rop4);\n"); - Output(Out, "UsesPattern = ROP4_USES_PATTERN(BltInfo->Rop4);\n"); - } - Output(Out, "\n"); - if (! RopInfo->UsesSource) - { - CreateBase(Out, 0, 0, Bpp); - CreateCounts(Out, Bpp); - MARK(Out); - } - Output(Out, "LineCount = BltInfo->DestRect.bottom - BltInfo->DestRect.top;\n"); - - Output(Out, "\n"); - if (RopInfo->UsesPattern) - { - if (ROPCODE_GENERIC == RopInfo->RopCode) - { - Output(Out, "if (UsesPattern && NULL != BltInfo->PatternSurface)\n"); - } - else - { - Output(Out, "if (NULL != BltInfo->PatternSurface)\n"); - } - Output(Out, "{\n"); - CreateActionBlock(Out, Bpp, RopInfo, FLAG_PATTERNSURFACE); - MARK(Out); - Output(Out, "}\n"); - Output(Out, "else\n"); - Output(Out, "{\n"); - if (ROPCODE_GENERIC == RopInfo->RopCode) - { - Output(Out, "if (UsesPattern)\n"); - Output(Out, "{\n"); - } - for (Partial = 0; Partial < 32 / Bpp; Partial++) - { - if (0 == Partial) - { - Output(Out, "if (!BltInfo->Brush)\n"); - Output(Out, "{\n"); - Output(Out, "Pattern = 0;\n"); - Output(Out, "}\n"); - Output(Out, "else\n"); - Output(Out, "{\n"); - Output(Out, "Pattern = BltInfo->Brush->iSolidColor"); - } - else - { - Output(Out, " (BltInfo->Brush->iSolidColor << %d)", - Partial * Bpp); - } - if (32 / Bpp <= Partial + 1) - { - Output(Out, ";\n"); - Output(Out, "}\n"); - } - else - { - Output(Out, " |\n"); - } - } - if (ROPCODE_PATINVERT == RopInfo->RopCode || - ROPCODE_MERGECOPY == RopInfo->RopCode) - { - Output(Out, "if (0 == Pattern)\n"); - Output(Out, "{\n"); - if (ROPCODE_MERGECOPY == RopInfo->RopCode) - { - Output(Out, "DIB_%uBPP_ColorFill(BltInfo->DestSurface, " - "&BltInfo->DestRect, 0x0);\n", Bpp); - } - Output(Out, "return;\n"); - Output(Out, "}\n"); - } - else if (ROPCODE_PATPAINT == RopInfo->RopCode) - { - Output(Out, "if ((~0) == Pattern)\n"); - Output(Out, "{\n"); - Output(Out, "DIB_%uBPP_ColorFill(BltInfo->DestSurface, " - "&BltInfo->DestRect, ~0);\n", Bpp); - Output(Out, "return;\n"); - Output(Out, "}\n"); - } - if (ROPCODE_GENERIC == RopInfo->RopCode) - { - Output(Out, "}\n"); - } - CreateActionBlock(Out, Bpp, RopInfo, 0); - MARK(Out); - Output(Out, "}\n"); - } - else - { - CreateActionBlock(Out, Bpp, RopInfo, 0); - MARK(Out); - } - } - Output(Out, "}\n"); -} - -static void -CreateTable(FILE *Out, unsigned Bpp) -{ - unsigned RopCode; - - MARK(Out); - Output(Out, "\n"); - Output(Out, "static void (*PrimitivesTable[256])(PBLTINFO) =\n"); - Output(Out, "{\n"); - for (RopCode = 0; RopCode < 256; RopCode++) - { - PrintRoutineName(Out, Bpp, FindRopInfo(RopCode)); - if (RopCode < 255) - { - Output(Out, ","); - } - Output(Out, "\n"); - } - Output(Out, "};\n"); -} - -static void -CreateBitBlt(FILE *Out, unsigned Bpp) -{ - MARK(Out); - Output(Out, "\n"); - Output(Out, "BOOLEAN\n"); - Output(Out, "DIB_%uBPP_BitBlt(PBLTINFO BltInfo)\n", Bpp); - Output(Out, "{\n"); - Output(Out, "PrimitivesTable[BltInfo->Rop4 & 0xff](BltInfo);\n"); - Output(Out, "\n"); - Output(Out, "return TRUE;\n"); - Output(Out, "}\n"); -} - -static void -Generate(char *OutputDir, unsigned Bpp) -{ - FILE *Out; - unsigned RopCode; - PROPINFO RopInfo; - char *FileName; - - FileName = malloc(strlen(OutputDir) + 12); - if (NULL == FileName) - { - fprintf(stderr, "Out of memory\n"); - exit(1); - } - strcpy(FileName, OutputDir); - if ('/' != FileName[strlen(FileName) - 1]) - { - strcat(FileName, "/"); - } - sprintf(FileName + strlen(FileName), "dib%ugen.c", Bpp); - - Out = fopen(FileName, "w"); - free(FileName); - if (NULL == Out) - { - perror("Error opening output file"); - exit(1); - } - - MARK(Out); - Output(Out, "/* This is a generated file. Please do not edit */\n"); - Output(Out, "\n"); - Output(Out, "#include \n"); - CreateShiftTables(Out); - - RopInfo = FindRopInfo(ROPCODE_GENERIC); - CreatePrimitive(Out, Bpp, RopInfo); - for (RopCode = 0; RopCode < 256; RopCode++) - { - RopInfo = FindRopInfo(RopCode); - if (NULL != RopInfo) - { - CreatePrimitive(Out, Bpp, RopInfo); - } - } - CreateTable(Out, Bpp); - CreateBitBlt(Out, Bpp); - - fclose(Out); -} - -int -main(int argc, char *argv[]) -{ - unsigned Index; - static unsigned DestBpp[] = - { 8, 16, 32 }; - - if (argc < 2) - return 0; - - for (Index = 0; Index < sizeof(DestBpp) / sizeof(DestBpp[0]); Index++) - { - Generate(argv[1], DestBpp[Index]); - } - - return 0; -} diff --git a/reactos/tools/gendib/gendib.mak b/reactos/tools/gendib/gendib.mak deleted file mode 100644 index 0f625325792..00000000000 --- a/reactos/tools/gendib/gendib.mak +++ /dev/null @@ -1,57 +0,0 @@ -GENDIB_BASE = $(TOOLS_BASE_)gendib -GENDIB_BASE_ = $(GENDIB_BASE)$(SEP) -GENDIB_INT = $(INTERMEDIATE_)$(GENDIB_BASE) -GENDIB_INT_ = $(GENDIB_INT)$(SEP) -GENDIB_OUT = $(OUTPUT_)$(GENDIB_BASE) -GENDIB_OUT_ = $(GENDIB_OUT)$(SEP) - -$(GENDIB_INT): | $(TOOLS_INT) - $(ECHO_MKDIR) - ${mkdir} $@ - -ifneq ($(INTERMEDIATE),$(OUTPUT)) -$(GENDIB_OUT): | $(TOOLS_OUT) - $(ECHO_MKDIR) - ${mkdir} $@ -endif - -GENDIB_TARGET = \ - $(GENDIB_OUT_)gendib$(EXEPOSTFIX) - -GENDIB_SOURCES = \ - $(GENDIB_BASE_)gendib.c - -GENDIB_OBJECTS = \ - $(addprefix $(INTERMEDIATE_), $(GENDIB_SOURCES:.c=.o)) - -GENDIB_HOST_CFLAGS = $(TOOLS_CFLAGS) - -GENDIB_HOST_LFLAGS = $(TOOLS_LFLAGS) - -$(GENDIB_TARGET): $(GENDIB_OBJECTS) | $(GENDIB_OUT) - $(ECHO_HOSTLD) - ${host_gcc} $(GENDIB_OBJECTS) $(GENDIB_HOST_LFLAGS) -o $@ - -$(GENDIB_INT_)gendib.o: $(GENDIB_BASE_)gendib.c | $(GENDIB_INT) - $(ECHO_HOSTCC) - ${host_gcc} $(GENDIB_HOST_CFLAGS) -c $< -o $@ - -.PHONY: gendib -gendib: $(GENDIB_TARGET) - -.PHONY: gendib_clean -gendib_clean: - -@$(rm) $(GENDIB_TARGET) $(GENDIB_OBJECTS) 2>$(NUL) -clean: gendib_clean - -GENDIB_DIB_DIR = $(INTERMEDIATE_)subsystems$(SEP)win32$(SEP)win32k$(SEP)dib - -GENDIB_DIB_FILES = \ - $(GENDIB_DIB_DIR)$(SEP)dib32gen.c \ - $(GENDIB_DIB_DIR)$(SEP)dib16gen.c \ - $(GENDIB_DIB_DIR)$(SEP)dib8gen.c - -$(GENDIB_DIB_FILES): $(GENDIB_TARGET) - ${mkdir} $(GENDIB_DIB_DIR) 2>$(NUL) - $(ECHO_GENDIB) - $(Q)$(GENDIB_TARGET) $(GENDIB_DIB_DIR) diff --git a/reactos/tools/geninc/CMakeLists.txt b/reactos/tools/geninc/CMakeLists.txt deleted file mode 100644 index dedf28f4b54..00000000000 --- a/reactos/tools/geninc/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ - -add_executable(geninc geninc.c) diff --git a/reactos/tools/geninc/data.c b/reactos/tools/geninc/data.c deleted file mode 100644 index b53807109d3..00000000000 --- a/reactos/tools/geninc/data.c +++ /dev/null @@ -1,1567 +0,0 @@ -#undef __MSVCRT__ -#include - -/* DDK/IFS/NDK Headers */ -#include -#include -#include -#include -#include -#include - -/* KD Support */ -#define NOEXTAPI -#include -#include -#include - -typedef struct -{ - UCHAR Type; - CHAR Name[60]; - ULONGLONG Value; -} ASMGENDATA; - -#define RAW(x) {0, #x, 0} -#define CONSTANT(name) {1, #name, name} -#define OFFSET(name, struct, member) {1, #name, FIELD_OFFSET(struct, member)} -#define RELOFFSET(name, struct, member, to) {1, #name, FIELD_OFFSET(struct, member) - FIELD_OFFSET(struct, to)} -#define SIZE(name, struct) {1, #name, sizeof(struct)} -#define HEADER(x) {2, x, 0} - -ASMGENDATA Table[] = -{ - -/* PORTABLE CONSTANTS ********************************************************/ - - HEADER("Pointer size"), - SIZE(SizeofPointer, PVOID), - - HEADER("Breakpoints"), - CONSTANT(BREAKPOINT_BREAK), - CONSTANT(BREAKPOINT_PRINT), - CONSTANT(BREAKPOINT_PROMPT), - CONSTANT(BREAKPOINT_LOAD_SYMBOLS), - CONSTANT(BREAKPOINT_UNLOAD_SYMBOLS), - CONSTANT(BREAKPOINT_COMMAND_STRING), - - HEADER("Context Frame Flags"), - CONSTANT(CONTEXT_FULL), - CONSTANT(CONTEXT_CONTROL), - CONSTANT(CONTEXT_INTEGER), - CONSTANT(CONTEXT_SEGMENTS), - CONSTANT(CONTEXT_FLOATING_POINT), - CONSTANT(CONTEXT_DEBUG_REGISTERS), - - HEADER("Exception flags"), - CONSTANT(EXCEPTION_NONCONTINUABLE), - CONSTANT(EXCEPTION_UNWINDING), - CONSTANT(EXCEPTION_EXIT_UNWIND), - CONSTANT(EXCEPTION_STACK_INVALID), - CONSTANT(EXCEPTION_NESTED_CALL), - CONSTANT(EXCEPTION_TARGET_UNWIND), - CONSTANT(EXCEPTION_COLLIDED_UNWIND), - CONSTANT(EXCEPTION_UNWIND), - CONSTANT(EXCEPTION_EXECUTE_HANDLER), - CONSTANT(EXCEPTION_CONTINUE_SEARCH), - CONSTANT(EXCEPTION_CONTINUE_EXECUTION), -#ifdef _X86_ - //CONSTANT(EXCEPTION_CHAIN_END), - //CONSTANT(FIXED_NTVDMSTATE_LINEAR), -#endif - - HEADER("Exception types"), - CONSTANT(ExceptionContinueExecution), - CONSTANT(ExceptionContinueSearch), - CONSTANT(ExceptionNestedException), - CONSTANT(ExceptionCollidedUnwind), - - HEADER("Lock Queue"), - CONSTANT(LOCK_QUEUE_WAIT), - CONSTANT(LOCK_QUEUE_OWNER), - CONSTANT(LockQueueDispatcherLock), - - HEADER("Performance Definitions"), -// CONSTANT(PERF_CONTEXTSWAP_OFFSET), -// CONSTANT(PERF_CONTEXTSWAP_FLAG), -// CONSTANT(PERF_INTERRUPT_OFFSET), -// CONSTANT(PERF_INTERRUPT_FLAG), -// CONSTANT(PERF_PROFILE_OFFSET), -// CONSTANT(PERF_PROFILE_FLAG), -// CONSTANT(PERF_SYSCALL_OFFSET), -// CONSTANT(PERF_SYSCALL_FLAG), -// CONSTANT(PERF_SPINLOCK_OFFSET), -// CONSTANT(PERF_SPINLOCK_FLAG), -// CONSTANT(NTOS_YIELD_MACRO), - - HEADER("Process states"), - CONSTANT(ProcessInMemory), - CONSTANT(ProcessOutOfMemory), - CONSTANT(ProcessInTransition), - - HEADER("Processor mode"), - CONSTANT(KernelMode), - CONSTANT(UserMode), - - HEADER("Status codes"), - CONSTANT(STATUS_ACCESS_VIOLATION), - CONSTANT(STATUS_ASSERTION_FAILURE), - CONSTANT(STATUS_ARRAY_BOUNDS_EXCEEDED), - CONSTANT(STATUS_BAD_COMPRESSION_BUFFER), - CONSTANT(STATUS_BREAKPOINT), - CONSTANT(STATUS_CALLBACK_POP_STACK), - CONSTANT(STATUS_DATATYPE_MISALIGNMENT), - CONSTANT(STATUS_FLOAT_DENORMAL_OPERAND), - CONSTANT(STATUS_FLOAT_DIVIDE_BY_ZERO), - CONSTANT(STATUS_FLOAT_INEXACT_RESULT), - CONSTANT(STATUS_FLOAT_INVALID_OPERATION), - CONSTANT(STATUS_FLOAT_OVERFLOW), - CONSTANT(STATUS_FLOAT_STACK_CHECK), - CONSTANT(STATUS_FLOAT_UNDERFLOW), - CONSTANT(STATUS_FLOAT_MULTIPLE_FAULTS), - CONSTANT(STATUS_FLOAT_MULTIPLE_TRAPS), - CONSTANT(STATUS_GUARD_PAGE_VIOLATION), - CONSTANT(STATUS_ILLEGAL_FLOAT_CONTEXT), - CONSTANT(STATUS_ILLEGAL_INSTRUCTION), - CONSTANT(STATUS_INSTRUCTION_MISALIGNMENT), - CONSTANT(STATUS_INVALID_HANDLE), - CONSTANT(STATUS_INVALID_LOCK_SEQUENCE), - CONSTANT(STATUS_INVALID_OWNER), - CONSTANT(STATUS_INVALID_PARAMETER), - CONSTANT(STATUS_INVALID_PARAMETER_1), - CONSTANT(STATUS_INVALID_SYSTEM_SERVICE), -// CONSTANT(STATUS_INVALID_THREAD), - CONSTANT(STATUS_INTEGER_DIVIDE_BY_ZERO), - CONSTANT(STATUS_INTEGER_OVERFLOW), - CONSTANT(STATUS_IN_PAGE_ERROR), - CONSTANT(STATUS_KERNEL_APC), - CONSTANT(STATUS_LONGJUMP), - CONSTANT(STATUS_NO_CALLBACK_ACTIVE), - CONSTANT(STATUS_NO_EVENT_PAIR), - CONSTANT(STATUS_PRIVILEGED_INSTRUCTION), - CONSTANT(STATUS_SINGLE_STEP), - CONSTANT(STATUS_STACK_BUFFER_OVERRUN), - CONSTANT(STATUS_STACK_OVERFLOW), - CONSTANT(STATUS_SUCCESS), - CONSTANT(STATUS_THREAD_IS_TERMINATING), - CONSTANT(STATUS_TIMEOUT), - CONSTANT(STATUS_UNWIND), - CONSTANT(STATUS_UNWIND_CONSOLIDATE), - CONSTANT(STATUS_USER_APC), - CONSTANT(STATUS_WAKE_SYSTEM_DEBUGGER), - - HEADER("TLS defines"), - CONSTANT(TLS_MINIMUM_AVAILABLE), - CONSTANT(TLS_EXPANSION_SLOTS), - - HEADER("Thread states"), - CONSTANT(Initialized), - CONSTANT(Ready), - CONSTANT(Running), - CONSTANT(Standby), - CONSTANT(Terminated), - CONSTANT(Waiting), - - HEADER("Wait type / reason"), - CONSTANT(WrExecutive), - CONSTANT(WrMutex), - CONSTANT(WrDispatchInt), - CONSTANT(WrQuantumEnd), - CONSTANT(WrEventPair), - CONSTANT(WaitAny), - CONSTANT(WaitAll), - - HEADER("Interrupt object types"), -// CONSTANT(InLevelSensitive), -// CONSTANT(InLatched), - - HEADER("Bug Check Codes"), - CONSTANT(APC_INDEX_MISMATCH), - CONSTANT(INVALID_AFFINITY_SET), - CONSTANT(INVALID_DATA_ACCESS_TRAP), - CONSTANT(IRQL_NOT_GREATER_OR_EQUAL), - CONSTANT(IRQL_NOT_LESS_OR_EQUAL), - CONSTANT(NO_USER_MODE_CONTEXT), - CONSTANT(SPIN_LOCK_ALREADY_OWNED), - CONSTANT(SPIN_LOCK_NOT_OWNED), - CONSTANT(THREAD_NOT_MUTEX_OWNER), - CONSTANT(TRAP_CAUSE_UNKNOWN), - CONSTANT(KMODE_EXCEPTION_NOT_HANDLED), - CONSTANT(KERNEL_APC_PENDING_DURING_EXIT), - CONSTANT(PANIC_STACK_SWITCH), - CONSTANT(DATA_BUS_ERROR), - CONSTANT(INSTRUCTION_BUS_ERROR), - CONSTANT(SYSTEM_EXIT_OWNED_MUTEX), -// CONSTANT(SYSTEM_UNWIND_PREVIOUS_USER), -// CONSTANT(SYSTEM_SERVICE_EXCEPTION), -// CONSTANT(INTERRUPT_UNWIND_ATTEMPTED), -// CONSTANT(INTERRUPT_EXCEPTION_NOT_HANDLED), - CONSTANT(PAGE_FAULT_WITH_INTERRUPTS_OFF), - CONSTANT(IRQL_GT_ZERO_AT_SYSTEM_SERVICE), - CONSTANT(DATA_COHERENCY_EXCEPTION), - CONSTANT(INSTRUCTION_COHERENCY_EXCEPTION), - CONSTANT(HAL1_INITIALIZATION_FAILED), - CONSTANT(UNEXPECTED_KERNEL_MODE_TRAP), - CONSTANT(NMI_HARDWARE_FAILURE), - CONSTANT(SPIN_LOCK_INIT_FAILURE), - CONSTANT(ATTEMPTED_SWITCH_FROM_DPC), -// CONSTANT(MUTEX_ALREADY_OWNED), -// CONSTANT(HARDWARE_INTERRUPT_STORM), -// CONSTANT(RECURSIVE_MACHINE_CHECK), -// CONSTANT(RECURSIVE_NMI), - - HEADER("IRQL"), - CONSTANT(PASSIVE_LEVEL), - CONSTANT(APC_LEVEL), - CONSTANT(DISPATCH_LEVEL), -#ifdef _M_AMD64 - CONSTANT(CLOCK_LEVEL), -#else - CONSTANT(CLOCK1_LEVEL), - CONSTANT(CLOCK2_LEVEL), -#endif - CONSTANT(IPI_LEVEL), - CONSTANT(POWER_LEVEL), - CONSTANT(PROFILE_LEVEL), - CONSTANT(HIGH_LEVEL), - RAW("#ifdef NT_UP"), - {1, "SYNCH_LEVEL", DISPATCH_LEVEL}, - RAW("#else"), - {1, "SYNCH_LEVEL", (IPI_LEVEL - 2)}, - RAW("#endif"), - - HEADER("Stack sizes"), - CONSTANT(KERNEL_STACK_SIZE), - CONSTANT(KERNEL_LARGE_STACK_SIZE), - CONSTANT(KERNEL_LARGE_STACK_COMMIT), -// CONSTANT(DOUBLE_FAULT_STACK_SIZE), -#ifdef _M_AMD64 - CONSTANT(KERNEL_MCA_EXCEPTION_STACK_SIZE), - CONSTANT(NMI_STACK_SIZE), -#endif - - HEADER("Thread flags"), -// CONSTANT(THREAD_FLAGS_CYCLE_PROFILING), -// CONSTANT(THREAD_FLAGS_CYCLE_PROFILING_LOCK_BIT), -// CONSTANT(THREAD_FLAGS_CYCLE_PROFILING_LOCK), -// CONSTANT(THREAD_FLAGS_COUNTER_PROFILING), -// CONSTANT(THREAD_FLAGS_COUNTER_PROFILING_LOCK_BIT), -// CONSTANT(THREAD_FLAGS_COUNTER_PROFILING_LOCK), -// CONSTANT(THREAD_FLAGS_CPU_THROTTLED), -// CONSTANT(THREAD_FLAGS_CPU_THROTTLED_BIT), -// CONSTANT(THREAD_FLAGS_ACCOUNTING_ANY), - - HEADER("Miscellaneous Definitions"), -// CONSTANT(BASE_PRIORITY_THRESHOLD), -// CONSTANT(EVENT_PAIR_INCREMENT), - CONSTANT(LOW_REALTIME_PRIORITY), - CONSTANT(CLOCK_QUANTUM_DECREMENT), -// CONSTANT(READY_SKIP_QUANTUM), -// CONSTANT(THREAD_QUANTUM), - CONSTANT(WAIT_QUANTUM_DECREMENT), -// CONSTANT(ROUND_TRIP_DECREMENT_COUNT), - CONSTANT(MAXIMUM_PROCESSORS), - CONSTANT(INITIAL_STALL_COUNT), - CONSTANT(EXCEPTION_EXECUTE_FAULT), -// CONSTANT(KCACHE_ERRATA_MONITOR_FLAGS), -// CONSTANT(KI_EXCEPTION_GP_FAULT), -// CONSTANT(KI_EXCEPTION_INVALID_OP), -// CONSTANT(KI_EXCEPTION_INTEGER_DIVIDE_BY_ZERO), - CONSTANT(KI_EXCEPTION_ACCESS_VIOLATION), -// CONSTANT(TARGET_FREEZE), -// CONSTANT(BlackHole), - CONSTANT(Executive), - CONSTANT(FALSE), - CONSTANT(TRUE), - CONSTANT(DBG_STATUS_CONTROL_C), - CONSTANT(USER_SHARED_DATA), -// CONSTANT(MM_SHARED_USER_DATA_VA), - CONSTANT(PAGE_SIZE), -// CONSTANT(KERNEL_STACK_CONTROL_LARGE_STACK), -// CONSTANT(KI_DPC_ALL_FLAGS), -// CONSTANT(DISPATCH_LENGTH), - CONSTANT(MAXIMUM_IDTVECTOR), -// CONSTANT(MAXIMUM_PRIMARY_VECTOR), - CONSTANT(PRIMARY_VECTOR_BASE), - CONSTANT(RPL_MASK), - CONSTANT(MODE_MASK), -// CONSTANT(KTHREAD_AUTO_ALIGNMENT_BIT), -// CONSTANT(KTHREAD_GUI_THREAD_MASK), -// CONSTANT(KI_SLIST_FAULT_COUNT_MAXIMUM), - CONSTANT(NUMBER_SERVICE_TABLES), - CONSTANT(SERVICE_NUMBER_MASK), - CONSTANT(SERVICE_TABLE_SHIFT), - CONSTANT(SERVICE_TABLE_MASK), - CONSTANT(SERVICE_TABLE_TEST), - -/* ARCHITECTURE SPECIFIC CONTSTANTS ******************************************/ - -#if defined(_M_AMD64) || defined(_M_IX86) - - HEADER("CR0 flags"), - CONSTANT(CR0_PE), - CONSTANT(CR0_MP), - CONSTANT(CR0_EM), - CONSTANT(CR0_TS), - CONSTANT(CR0_ET), - CONSTANT(CR0_NE), - CONSTANT(CR0_WP), - CONSTANT(CR0_AM), - CONSTANT(CR0_NW), - CONSTANT(CR0_CD), - CONSTANT(CR0_PG), - - HEADER("CR4 flags"), - CONSTANT(CR4_VME), - CONSTANT(CR4_PVI), - CONSTANT(CR4_TSD), - CONSTANT(CR4_DE), - CONSTANT(CR4_PSE), - CONSTANT(CR4_PAE), - CONSTANT(CR4_MCE), - CONSTANT(CR4_PGE), - CONSTANT(CR4_FXSR), - CONSTANT(CR4_XMMEXCPT), -#if defined(_M_IX86) -// CONSTANT(CR4_PGE_V), -// CONSTANT(CR4_XSAVE), -#elif defined(_M_AMD64) - CONSTANT(CR4_CHANNELS), -#endif - - HEADER("KeFeatureBits flags"), - CONSTANT(KF_RDTSC), - CONSTANT(KF_CR4), - CONSTANT(KF_GLOBAL_PAGE), - CONSTANT(KF_LARGE_PAGE), - CONSTANT(KF_CMPXCHG8B), - CONSTANT(KF_FAST_SYSCALL), -#ifdef _M_IX86 - CONSTANT(KF_V86_VIS), -// CONSTANT(KF_XSTATE), -#endif - - HEADER("Machine type definitions"), - CONSTANT(MACHINE_TYPE_ISA), - CONSTANT(MACHINE_TYPE_EISA), - CONSTANT(MACHINE_TYPE_MCA), - -#endif - -#ifdef _M_IX86 - - HEADER("EFLAGS"), - CONSTANT(EFLAGS_TF), - CONSTANT(EFLAGS_INTERRUPT_MASK), - CONSTANT(EFLAGS_V86_MASK), - CONSTANT(EFLAGS_ALIGN_CHECK), - CONSTANT(EFLAGS_VIF), - CONSTANT(EFLAGS_VIP), - CONSTANT(EFLAGS_USER_SANITIZE), - - HEADER("KDGT selectors"), - CONSTANT(KGDT_R3_DATA), - CONSTANT(KGDT_R3_CODE), - CONSTANT(KGDT_R0_CODE), - CONSTANT(KGDT_R0_DATA), - CONSTANT(KGDT_R0_PCR), -// CONSTANT(KGDT_STACK16), -// CONSTANT(KGDT_CODE16), - CONSTANT(KGDT_TSS), - CONSTANT(KGDT_R3_TEB), - CONSTANT(KGDT_DF_TSS), - CONSTANT(KGDT_NMI_TSS), - CONSTANT(KGDT_LDT), - - CONSTANT(NPX_STATE_NOT_LOADED), - CONSTANT(NPX_STATE_LOADED), -// CONSTANT(NPX_MASK_LAZY), - -/* - HEADER("VDM constants"), - CONSTANT(VDM_INDEX_Invalid), - CONSTANT(VDM_INDEX_0F), - CONSTANT(VDM_INDEX_ESPrefix), - CONSTANT(VDM_INDEX_CSPrefix), - CONSTANT(VDM_INDEX_SSPrefix), - CONSTANT(VDM_INDEX_DSPrefix), - CONSTANT(VDM_INDEX_FSPrefix), - CONSTANT(VDM_INDEX_GSPrefix), - CONSTANT(VDM_INDEX_OPER32Prefix), - CONSTANT(VDM_INDEX_ADDR32Prefix), - CONSTANT(VDM_INDEX_INSB), - CONSTANT(VDM_INDEX_INSW), - CONSTANT(VDM_INDEX_OUTSB), - CONSTANT(VDM_INDEX_OUTSW), - CONSTANT(VDM_INDEX_PUSHF), - CONSTANT(VDM_INDEX_POPF), - CONSTANT(VDM_INDEX_INTnn), - CONSTANT(VDM_INDEX_INTO), - CONSTANT(VDM_INDEX_IRET), - CONSTANT(VDM_INDEX_NPX), - CONSTANT(VDM_INDEX_INBimm), - CONSTANT(VDM_INDEX_INWimm), - CONSTANT(VDM_INDEX_OUTBimm), - CONSTANT(VDM_INDEX_OUTWimm), - CONSTANT(VDM_INDEX_INB), - CONSTANT(VDM_INDEX_INW), - CONSTANT(VDM_INDEX_OUTB), - CONSTANT(VDM_INDEX_OUTW), - CONSTANT(VDM_INDEX_LOCKPrefix), - CONSTANT(VDM_INDEX_REPNEPrefix), - CONSTANT(VDM_INDEX_REPPrefix), - CONSTANT(VDM_INDEX_CLI), - CONSTANT(VDM_INDEX_STI), - CONSTANT(VDM_INDEX_HLT), - CONSTANT(MAX_VDM_INDEX), -*/ - CONSTANT(PF_XMMI_INSTRUCTIONS_AVAILABLE), - CONSTANT(EFLAG_SELECT), -// CONSTANT(IPI_FREEZE), -// CONSTANT(XSAVE_PRESENT), - -#elif defined(_M_AMD64) - - HEADER("EFLAGS"), - CONSTANT(EFLAGS_TF_MASK), - CONSTANT(EFLAGS_TF_SHIFT), - CONSTANT(EFLAGS_IF_MASK), - CONSTANT(EFLAGS_IF_SHIFT), - CONSTANT(EFLAGS_ID_MASK), - - HEADER("Hypervisor Enlightenment Definitions"), - CONSTANT(HV_MMU_USE_HYPERCALL_FOR_ADDRESS_SWITCH), - CONSTANT(HV_MMU_USE_HYPERCALL_FOR_LOCAL_FLUSH), - CONSTANT(HV_MMU_USE_HYPERCALL_FOR_REMOTE_FLUSH), - CONSTANT(HV_X64_MSR_APIC_EOI), - CONSTANT(HV_APIC_ENLIGHTENED), - CONSTANT(HV_KE_USE_HYPERCALL_FOR_LONG_SPIN_WAIT), - CONSTANT(HV_VIRTUAL_APIC_NO_EOI_REQUIRED_V), - CONSTANT(HvApicFlags), - - HEADER("KDGT selectors"), - CONSTANT(KGDT64_NULL), - CONSTANT(KGDT64_R0_CODE), - CONSTANT(KGDT64_R0_DATA), - CONSTANT(KGDT64_R3_CMCODE), - CONSTANT(KGDT64_R3_DATA), - CONSTANT(KGDT64_R3_CODE), - CONSTANT(KGDT64_SYS_TSS), - CONSTANT(KGDT64_R3_CMTEB), - - HEADER("Machine Specific Register Numbers"), - CONSTANT(MSR_EFER), - CONSTANT(MSR_STAR), - CONSTANT(MSR_LSTAR), - CONSTANT(MSR_CSTAR), - CONSTANT(MSR_SYSCALL_MASK), - CONSTANT(MSR_FS_BASE), - CONSTANT(MSR_GS_BASE), - CONSTANT(MSR_GS_SWAP), - CONSTANT(MSR_MCG_STATUS), - CONSTANT(MSR_AMD_ACCESS), - - HEADER("Flags for MSR_EFER"), - CONSTANT(MSR_LMA), - CONSTANT(MSR_LME), - CONSTANT(MSR_SCE), - CONSTANT(MSR_NXE), - CONSTANT(MSR_PAT), - CONSTANT(MSR_DEGUG_CTL), - CONSTANT(MSR_LAST_BRANCH_FROM), - CONSTANT(MSR_LAST_BRANCH_TO), - CONSTANT(MSR_LAST_EXCEPTION_FROM), - CONSTANT(MSR_LAST_EXCEPTION_TO), - - HEADER("Flags for MSR_DEGUG_CTL"), - CONSTANT(MSR_DEBUG_CTL_LBR), - CONSTANT(MSR_DEBUG_CRL_BTF), - -#endif - -#if 0 - HEADER("Fatal exception codes"), - CONSTANT(EXCEPTION_DIVIDED_BY_ZERO), - CONSTANT(EXCEPTION_DEBUG), - CONSTANT(EXCEPTION_NMI), - CONSTANT(EXCEPTION_INT3), - CONSTANT(EXCEPTION_BOUND_CHECK), - CONSTANT(EXCEPTION_INVALID_OPCODE), - CONSTANT(EXCEPTION_NPX_NOT_AVAILABLE), - CONSTANT(EXCEPTION_DOUBLE_FAULT), - CONSTANT(EXCEPTION_NPX_OVERRUN), - CONSTANT(EXCEPTION_INVALID_TSS), - CONSTANT(EXCEPTION_SEGMENT_NOT_PRESENT), - CONSTANT(EXCEPTION_STACK_FAULT), - CONSTANT(EXCEPTION_GP_FAULT), - CONSTANT(EXCEPTION_RESERVED_TRAP), - CONSTANT(EXCEPTION_NPX_ERROR), - CONSTANT(EXCEPTION_ALIGNMENT_CHECK), -#endif - - -/* STRUCTURE OFFSETS *********************************************************/ - - HEADER("KAFFINITY_EX"), -// OFFSET(AfBitmap, KAFFINITY_EX, Bitmap), - - HEADER("Aligned Affinity"), -// OFFSET(AfsCpuSet, ???, CpuSet), - - HEADER("KAPC"), - OFFSET(ApType, KAPC, Type), - OFFSET(ApSize, KAPC, Size), - OFFSET(ApThread, KAPC, Thread), - OFFSET(ApApcListEntry, KAPC, ApcListEntry), - OFFSET(ApKernelRoutine, KAPC, KernelRoutine), - OFFSET(ApRundownRoutine, KAPC, RundownRoutine), - OFFSET(ApNormalRoutine, KAPC, NormalRoutine), - OFFSET(ApNormalContext, KAPC, NormalContext), - OFFSET(ApSystemArgument1, KAPC, SystemArgument1), - OFFSET(ApSystemArgument2, KAPC, SystemArgument2), - OFFSET(ApApcStateIndex, KAPC, ApcStateIndex), - OFFSET(ApApcMode, KAPC, ApcMode), - OFFSET(ApInserted, KAPC, Inserted), - SIZE(ApcObjectLength, KAPC), - - HEADER("KAPC_STATE"), - OFFSET(AsApcListHead, KAPC_STATE, ApcListHead), - OFFSET(AsProcess, KAPC_STATE, Process), - OFFSET(AsKernelApcInProgress, KAPC_STATE, KernelApcInProgress), - OFFSET(AsKernelApcPending, KAPC_STATE, KernelApcPending), - OFFSET(AsUserApcPending, KAPC_STATE, UserApcPending), - - HEADER("CLIENT_ID"), - OFFSET(CidUniqueProcess, CLIENT_ID, UniqueProcess), - OFFSET(CidUniqueThread, CLIENT_ID, UniqueThread), - - HEADER("RTL_CRITICAL_SECTION"), - OFFSET(CsDebugInfo, RTL_CRITICAL_SECTION, DebugInfo), - OFFSET(CsLockCount, RTL_CRITICAL_SECTION, LockCount), - OFFSET(CsRecursionCount, RTL_CRITICAL_SECTION, RecursionCount), - OFFSET(CsOwningThread, RTL_CRITICAL_SECTION, OwningThread), - OFFSET(CsLockSemaphore, RTL_CRITICAL_SECTION, LockSemaphore), - OFFSET(CsSpinCount, RTL_CRITICAL_SECTION, SpinCount), - - HEADER("RTL_CRITICAL_SECTION_DEBUG"), - OFFSET(CsType, RTL_CRITICAL_SECTION_DEBUG, Type), - OFFSET(CsCreatorBackTraceIndex, RTL_CRITICAL_SECTION_DEBUG, CreatorBackTraceIndex), - OFFSET(CsCriticalSection, RTL_CRITICAL_SECTION_DEBUG, CriticalSection), - OFFSET(CsProcessLocksList, RTL_CRITICAL_SECTION_DEBUG, ProcessLocksList), - OFFSET(CsEntryCount, RTL_CRITICAL_SECTION_DEBUG, EntryCount), - OFFSET(CsContentionCount, RTL_CRITICAL_SECTION_DEBUG, ContentionCount), - - HEADER("KDEVICE_QUEUE_ENTRY"), - OFFSET(DeDeviceListEntry, KDEVICE_QUEUE_ENTRY, DeviceListEntry), - OFFSET(DeSortKey, KDEVICE_QUEUE_ENTRY, SortKey), - OFFSET(DeInserted, KDEVICE_QUEUE_ENTRY, Inserted), - SIZE(DeviceQueueEntryLength, KDEVICE_QUEUE_ENTRY), - - HEADER("KDPC"), - OFFSET(DpType, KDPC, Type), - OFFSET(DpImportance, KDPC, Importance), - OFFSET(DpNumber, KDPC, Number), - OFFSET(DpDpcListEntry, KDPC, DpcListEntry), - OFFSET(DpDeferredRoutine, KDPC, DeferredRoutine), - OFFSET(DpDeferredContext, KDPC, DeferredContext), - OFFSET(DpSystemArgument1, KDPC, SystemArgument1), - OFFSET(DpSystemArgument2, KDPC, SystemArgument2), - OFFSET(DpDpcData, KDPC, DpcData), - SIZE(DpcObjectLength, KDPC), - - HEADER("KDEVICE_QUEUE"), - OFFSET(DvType, KDEVICE_QUEUE, Type), - OFFSET(DvSize, KDEVICE_QUEUE, Size), - OFFSET(DvDeviceListHead, KDEVICE_QUEUE, DeviceListHead), - OFFSET(DvSpinLock, KDEVICE_QUEUE, Lock), - OFFSET(DvBusy, KDEVICE_QUEUE, Busy), - SIZE(DeviceQueueObjectLength, KDEVICE_QUEUE), - - HEADER("EXCEPTION_RECORD"), - OFFSET(ErExceptionCode, EXCEPTION_RECORD, ExceptionCode), - OFFSET(ErExceptionFlags, EXCEPTION_RECORD, ExceptionFlags), - OFFSET(ErExceptionRecord, EXCEPTION_RECORD, ExceptionRecord), - OFFSET(ErExceptionAddress, EXCEPTION_RECORD, ExceptionAddress), - OFFSET(ErNumberParameters, EXCEPTION_RECORD, NumberParameters), - OFFSET(ErExceptionInformation, EXCEPTION_RECORD, ExceptionInformation), - SIZE(ExceptionRecordLength, EXCEPTION_RECORD), - SIZE(EXCEPTION_RECORD_LENGTH, EXCEPTION_RECORD), - - HEADER("EPROCESS"), - OFFSET(EpDebugPort, EPROCESS, DebugPort), - OFFSET(EpVdmObjects, EPROCESS, VdmObjects), - SIZE(ExecutiveProcessObjectLength, EPROCESS), - - HEADER("KEVENT"), - OFFSET(EvType, KEVENT, Header.Type), - OFFSET(EvSize, KEVENT, Header.Size), - OFFSET(EvSignalState, KEVENT, Header.SignalState), - OFFSET(EvWaitListHead, KEVENT, Header.WaitListHead), - SIZE(EventObjectLength, KEVENT), - - HEADER("FAST_MUTEX"), - OFFSET(FmCount, FAST_MUTEX, Count), - OFFSET(FmOwner, FAST_MUTEX, Owner), - OFFSET(FmContention, FAST_MUTEX, Contention), - OFFSET(FmGate, FAST_MUTEX, Gate), - OFFSET(FmOldIrql, FAST_MUTEX, OldIrql), - - HEADER("KINTERRUPT"), - OFFSET(InType, KINTERRUPT, Type), - OFFSET(InSize, KINTERRUPT, Size), - OFFSET(InInterruptListEntry, KINTERRUPT, InterruptListEntry), - OFFSET(InServiceRoutine, KINTERRUPT, ServiceRoutine), - OFFSET(InServiceContext, KINTERRUPT, ServiceContext), - OFFSET(InSpinLock, KINTERRUPT, SpinLock), - OFFSET(InTickCount, KINTERRUPT, TickCount), - OFFSET(InActualLock, KINTERRUPT, ActualLock), - OFFSET(InDispatchAddress, KINTERRUPT, DispatchAddress), - OFFSET(InVector, KINTERRUPT, Vector), - OFFSET(InIrql, KINTERRUPT, Irql), - OFFSET(InSynchronizeIrql, KINTERRUPT, SynchronizeIrql), - OFFSET(InFloatingSave, KINTERRUPT, FloatingSave), - OFFSET(InConnected, KINTERRUPT, Connected), - OFFSET(InNumber, KINTERRUPT, Number), - OFFSET(InShareVector, KINTERRUPT, ShareVector), - OFFSET(InMode, KINTERRUPT, Mode), - OFFSET(InServiceCount, KINTERRUPT, ServiceCount), - OFFSET(InDispatchCount, KINTERRUPT, DispatchCount), -// OFFSET(InTrapFrame, KINTERRUPT, TrapFrame), - OFFSET(InDispatchCode, KINTERRUPT, DispatchCode), - SIZE(InterruptObjectLength, KINTERRUPT), - - HEADER("IO_STATUS_BLOCK"), - OFFSET(IoStatus, IO_STATUS_BLOCK, Status), - OFFSET(IoPointer, IO_STATUS_BLOCK, Pointer), - OFFSET(IoInformation, IO_STATUS_BLOCK, Information), - -#ifdef _M_IX86 -// Kernel Stack Control Structure Offset (relative to initial stack pointer) Definitions -// RELOFFSET(KcPreviousBase, KERNEL_STACK_CONTROL, PreviousBase, ???), -// RELOFFSET(KcPreviousLimit, KERNEL_STACK_CONTROL, PreviousBase, ???), -// RELOFFSET(KcPreviousKernel, KERNEL_STACK_CONTROL, PreviousBase, ???), -// RELOFFSET(KcPreviousInitial, KERNEL_STACK_CONTROL, PreviousBase, ???), -#else - HEADER("KERNEL_STACK_CONTROL"), -// OFFSET(KcPreviousBase, KERNEL_STACK_CONTROL, PreviousBase), -// OFFSET(KcPreviousLimit, KERNEL_STACK_CONTROL, PreviousLimit), -// OFFSET(KcPreviousKernel, KERNEL_STACK_CONTROL, PreviousKernel), -// OFFSET(KcPreviousInitial, KERNEL_STACK_CONTROL, PreviousInitial), -// SIZE(KERNEL_STACK_CONTROL_LENGTH, KERNEL_STACK_CONTROL), -#endif - - HEADER("KNODE"), -// OFFSET(KnRight, KNODE, Right), -// OFFSET(KnLeft, KNODE, Left), - OFFSET(KnPfnDereferenceSListHead, KNODE, PfnDereferenceSListHead), - OFFSET(KnProcessorMask, KNODE, ProcessorMask), - OFFSET(KnColor, KNODE, Color), - OFFSET(KnSeed, KNODE, Seed), - OFFSET(KnNodeNumber, KNODE, NodeNumber), - OFFSET(KnFlags, KNODE, Flags), - OFFSET(knMmShiftedColor, KNODE, MmShiftedColor), - OFFSET(KnFreeCount, KNODE, FreeCount), - OFFSET(KnPfnDeferredList, KNODE, PfnDeferredList), - SIZE(KNODE_SIZE, KNODE), - - HEADER("KSPIN_LOCK_QUEUE"), - OFFSET(LqNext, KSPIN_LOCK_QUEUE, Next), - OFFSET(LqLock, KSPIN_LOCK_QUEUE, Lock), - - HEADER("KLOCK_QUEUE_HANDLE"), - OFFSET(LqhNext, KLOCK_QUEUE_HANDLE, LockQueue.Next), - OFFSET(LqhLock, KLOCK_QUEUE_HANDLE, LockQueue.Lock), - OFFSET(LqhOldIrql, KLOCK_QUEUE_HANDLE, OldIrql), - SIZE(LOCK_QUEUE_HEADER_SIZE, KLOCK_QUEUE_HANDLE), - - HEADER("LARGE_INTEGER"), - OFFSET(LiLowPart, LARGE_INTEGER, LowPart), - OFFSET(LiHighPart, LARGE_INTEGER, HighPart), -#if 0 - HEADER("LOADER_PARAMETER_BLOCK (rel. to LoadOrderListHead)"), - RELOFFSET(LpbLoadOrderListHead, LOADER_PARAMETER_BLOCK, LoadOrderListHead, LoadOrderListHead), - RELOFFSET(LpbMemoryDescriptorListHead, LOADER_PARAMETER_BLOCK, MemoryDescriptorListHead, LoadOrderListHead), - RELOFFSET(LpbKernelStack, LOADER_PARAMETER_BLOCK, KernelStack, LoadOrderListHead), - RELOFFSET(LpbPrcb, LOADER_PARAMETER_BLOCK, Prcb, LoadOrderListHead), - RELOFFSET(LpbProcess, LOADER_PARAMETER_BLOCK, Process, LoadOrderListHead), - RELOFFSET(LpbThread, LOADER_PARAMETER_BLOCK, Thread, LoadOrderListHead), - RELOFFSET(LpbI386, LOADER_PARAMETER_BLOCK, u.I386, LoadOrderListHead), - RELOFFSET(LpbRegistryLength, LOADER_PARAMETER_BLOCK, RegistryLength, LoadOrderListHead), - RELOFFSET(LpbRegistryBase, LOADER_PARAMETER_BLOCK, RegistryBase, LoadOrderListHead), - RELOFFSET(LpbConfigurationRoot, LOADER_PARAMETER_BLOCK, ConfigurationRoot, LoadOrderListHead), - RELOFFSET(LpbArcBootDeviceName, LOADER_PARAMETER_BLOCK, ArcBootDeviceName, LoadOrderListHead), - RELOFFSET(LpbArcHalDeviceName, LOADER_PARAMETER_BLOCK, ArcHalDeviceName, LoadOrderListHead), - RELOFFSET(LpbLoadOptions, LOADER_PARAMETER_BLOCK, LoadOptions, LoadOrderListHead), - RELOFFSET(LpbExtension, LOADER_PARAMETER_BLOCK, Extension, LoadOrderListHead), -#endif - - HEADER("LIST_ENTRY"), - OFFSET(LsFlink, LIST_ENTRY, Flink), - OFFSET(LsBlink, LIST_ENTRY, Blink), - - HEADER("PEB"), - OFFSET(PeKernelCallbackTable, PEB, KernelCallbackTable), - SIZE(ProcessEnvironmentBlockLength, PEB), - - HEADER("KPROFILE"), - OFFSET(PfType, KPROFILE, Type), - OFFSET(PfSize, KPROFILE, Size), - OFFSET(PfProfileListEntry, KPROFILE, ProfileListEntry), - OFFSET(PfProcess, KPROFILE, Process), - OFFSET(PfRangeBase, KPROFILE, RangeBase), - OFFSET(PfRangeLimit, KPROFILE, RangeLimit), - OFFSET(PfBucketShift, KPROFILE, BucketShift), - OFFSET(PfBuffer, KPROFILE, Buffer), - OFFSET(PfSegment, KPROFILE, Segment), - OFFSET(PfAffinity, KPROFILE, Affinity), - OFFSET(PfSource, KPROFILE, Source), - OFFSET(PfStarted, KPROFILE, Started), - SIZE(ProfileObjectLength, KPROFILE), - - HEADER("PORT_MESSAGE"), - OFFSET(PmLength, PORT_MESSAGE, u1.Length), - OFFSET(PmZeroInit, PORT_MESSAGE, u2.ZeroInit), - OFFSET(PmClientId, PORT_MESSAGE, ClientId), - OFFSET(PmProcess, PORT_MESSAGE, ClientId.UniqueProcess), - OFFSET(PmThread, PORT_MESSAGE, ClientId.UniqueThread), - OFFSET(PmMessageId, PORT_MESSAGE, MessageId), - OFFSET(PmClientViewSize, PORT_MESSAGE, ClientViewSize), - SIZE(PortMessageLength, PORT_MESSAGE), - - HEADER("KPROCESS"), - OFFSET(PrType, KPROCESS, Header.Type), - OFFSET(PrSize, KPROCESS, Header.Size), - OFFSET(PrSignalState, KPROCESS, Header.SignalState), - OFFSET(PrProfileListHead, KPROCESS, ProfileListHead), - OFFSET(PrDirectoryTableBase, KPROCESS, DirectoryTableBase), -#ifdef _M_IX86 - OFFSET(PrLdtDescriptor, KPROCESS, LdtDescriptor), -#endif - OFFSET(PrIopmOffset, KPROCESS, IopmOffset), -#ifdef _M_IX86 - OFFSET(PrInt21Descriptor, KPROCESS, Int21Descriptor), - OFFSET(PrVdmTrapcHandler, KPROCESS, VdmTrapcHandler), -// OFFSET(PrVdmObjects, KPROCESS, VdmObjects), - OFFSET(PrFlags, KPROCESS, Flags), -#endif -// OFFSET(PrInstrumentationCallback, KPROCESS, InstrumentationCallback), - OFFSET(PrActiveProcessors, KPROCESS, ActiveProcessors), - OFFSET(PrKernelTime, KPROCESS, KernelTime), - OFFSET(PrUserTime, KPROCESS, UserTime), - OFFSET(PrReadyListHead, KPROCESS, ReadyListHead), - OFFSET(PrSwapListEntry, KPROCESS, SwapListEntry), - OFFSET(PrThreadListHead, KPROCESS, ThreadListHead), - OFFSET(PrProcessLock, KPROCESS, ProcessLock), - OFFSET(PrAffinity, KPROCESS, Affinity), - OFFSET(PrProcessFlags, KPROCESS, ProcessFlags), - OFFSET(PrBasePriority, KPROCESS, BasePriority), - OFFSET(PrQuantumReset, KPROCESS, QuantumReset), - OFFSET(PrState, KPROCESS, State), - OFFSET(PrStackCount, KPROCESS, StackCount), -#if (NTDDI_VERSION >= NTDDI_LONGHORN) - OFFSET(PrCycleTime, KPROCESS, CycleTime), -#endif - SIZE(KernelProcessObjectLength, KPROCESS), - - HEADER("KQUEUE"), - OFFSET(QuType, KQUEUE, Header.Type), - OFFSET(QuSize, KQUEUE, Header.Size), - OFFSET(QuSignalState, KQUEUE, Header.SignalState), - OFFSET(QuEntryListHead, KQUEUE, EntryListHead), - OFFSET(QuCurrentCount, KQUEUE, CurrentCount), - OFFSET(QuMaximumCount, KQUEUE, MaximumCount), - OFFSET(QuThreadListHead, KQUEUE, ThreadListHead), - SIZE(QueueObjectLength, KQUEUE), - - HEADER("STRING"), - OFFSET(StrLength, STRING, Length), - OFFSET(StrMaximumLength, STRING, MaximumLength), - OFFSET(StrBuffer, STRING, Buffer), - - HEADER("TEB"), - OFFSET(TeCmTeb, TEB, Tib), -#ifdef _M_IX86 - OFFSET(TeExceptionList, TEB, Tib.ExceptionList), -#endif - OFFSET(TeStackBase, TEB, Tib.StackBase), - OFFSET(TeStackLimit, TEB, Tib.StackLimit), - OFFSET(TeFiberData, TEB, Tib.FiberData), - OFFSET(TeSelf, TEB, Tib.Self), - OFFSET(TeEnvironmentPointer, TEB, EnvironmentPointer), - OFFSET(TeClientId, TEB, ClientId), - OFFSET(TeActiveRpcHandle, TEB, ActiveRpcHandle), - OFFSET(TeThreadLocalStoragePointer, TEB, ThreadLocalStoragePointer), - OFFSET(TeCountOfOwnedCriticalSections, TEB, CountOfOwnedCriticalSections), - OFFSET(TePeb, TEB, ProcessEnvironmentBlock), - OFFSET(TeCsrClientThread, TEB, CsrClientThread), - OFFSET(TeWOW32Reserved, TEB, WOW32Reserved), -// OFFSET(TeSoftFpcr, TEB, SoftFpcr), - OFFSET(TeExceptionCode, TEB, ExceptionCode), - OFFSET(TeActivationContextStackPointer, TEB, ActivationContextStackPointer), - OFFSET(TeGdiClientPID, TEB, GdiClientPID), - OFFSET(TeGdiClientTID, TEB, GdiClientTID), - OFFSET(TeGdiThreadLocalInfo, TEB, GdiThreadLocalInfo), - OFFSET(TeglDispatchTable, TEB, glDispatchTable), - OFFSET(TeglReserved1, TEB, glReserved1), - OFFSET(TeglReserved2, TEB, glReserved2), - OFFSET(TeglSectionInfo, TEB, glSectionInfo), - OFFSET(TeglSection, TEB, glSection), - OFFSET(TeglTable, TEB, glTable), - OFFSET(TeglCurrentRC, TEB, glCurrentRC), - OFFSET(TeglContext, TEB, glContext), - OFFSET(TeDeallocationStack, TEB, DeallocationStack), - OFFSET(TeTlsSlots, TEB, TlsSlots), - OFFSET(TeTlsExpansionSlots, TEB, TlsExpansionSlots), - OFFSET(TeLastErrorValue, TEB, LastErrorValue), - OFFSET(TeVdm, TEB, Vdm), - OFFSET(TeInstrumentation, TEB, Instrumentation), - OFFSET(TeGdiBatchCount, TEB, GdiBatchCount), - OFFSET(TeGuaranteedStackBytes, TEB, GuaranteedStackBytes), - OFFSET(TeFlsData, TEB, FlsData), -// OFFSET(TeProcessRundown, TEB, ProcessRundown), - SIZE(ThreadEnvironmentBlockLength, TEB), - - HEADER("TIME_FIELDS"), - OFFSET(TfSecond, TIME_FIELDS, Second), - OFFSET(TfMinute, TIME_FIELDS, Minute), - OFFSET(TfHour, TIME_FIELDS, Hour), - OFFSET(TfWeekday, TIME_FIELDS, Weekday), - OFFSET(TfDay, TIME_FIELDS, Day), - OFFSET(TfMonth, TIME_FIELDS, Month), - OFFSET(TfYear, TIME_FIELDS, Year), - OFFSET(TfMilliseconds, TIME_FIELDS, Milliseconds), - - HEADER("KTHREAD"), - OFFSET(ThType, KTHREAD, DispatcherHeader.Type), -// OFFSET(ThNpxIrql, KTHREAD, NpxIrql), - OFFSET(ThSize, KTHREAD, DispatcherHeader.Size), - OFFSET(ThLock, KTHREAD, DispatcherHeader.Lock), - OFFSET(ThDebugActive, KTHREAD, DispatcherHeader.DebugActive), -// OFFSET(ThThreadControlFlags, KTHREAD, DispatcherHeader.ThreadControlFlags), - OFFSET(ThSignalState, KTHREAD, DispatcherHeader.SignalState), -#if (NTDDI_VERSION >= NTDDI_LONGHORN) - OFFSET(ThCycleTime, KTHREAD, CycleTime), - OFFSET(ThHighCycleTime, KTHREAD, HighCycleTime), -#endif - OFFSET(ThInitialStack, KTHREAD, InitialStack), - OFFSET(ThStackLimit, KTHREAD, StackLimit), - OFFSET(ThKernelStack, KTHREAD, KernelStack), - OFFSET(ThThreadLock, KTHREAD, ThreadLock), -// OFFSET(ThRunning, KTHREAD, Running), - OFFSET(ThAlerted, KTHREAD, Alerted), -// OFFSET(ThMiscFlags, KTHREAD, MiscFlags), - OFFSET(ThApcState, KTHREAD, ApcState), - OFFSET(ThPriority, KTHREAD, Priority), - OFFSET(ThSwapBusy, KTHREAD, SwapBusy), - OFFSET(ThNextProcessor, KTHREAD, NextProcessor), - OFFSET(ThDeferredProcessor, KTHREAD, DeferredProcessor), - OFFSET(ThApcQueueLock, KTHREAD, ApcQueueLock), - OFFSET(ThContextSwitches, KTHREAD, ContextSwitches), - OFFSET(ThState, KTHREAD, State), - OFFSET(ThNpxState, KTHREAD, NpxState), - OFFSET(ThWaitIrql, KTHREAD, WaitIrql), - OFFSET(ThWaitMode, KTHREAD, WaitMode), - OFFSET(ThWaitStatus, KTHREAD, WaitStatus), - OFFSET(ThWaitBlockList, KTHREAD, WaitBlockList), - OFFSET(ThGateObject, KTHREAD, GateObject), - OFFSET(ThWaitListEntry, KTHREAD, WaitListEntry), - OFFSET(ThSwapListEntry, KTHREAD, SwapListEntry), - OFFSET(ThQueue, KTHREAD, Queue), - OFFSET(ThWaitTime, KTHREAD, WaitTime), - OFFSET(ThCombinedApcDisable, KTHREAD, CombinedApcDisable), - OFFSET(ThKernelApcDisable, KTHREAD, KernelApcDisable), - OFFSET(ThSpecialApcDisable, KTHREAD, SpecialApcDisable), - OFFSET(ThTeb, KTHREAD, Teb), - OFFSET(ThTimer, KTHREAD, Timer), - OFFSET(ThThreadFlags, KTHREAD, ThreadFlags), - OFFSET(ThServiceTable, KTHREAD, ServiceTable), - OFFSET(ThWaitBlock, KTHREAD, WaitBlock), - OFFSET(ThResourceIndex, KTHREAD, ResourceIndex), - OFFSET(ThQueueListEntry, KTHREAD, QueueListEntry), - OFFSET(ThTrapFrame, KTHREAD, TrapFrame), -#if (NTDDI_VERSION >= NTDDI_LONGHORN) - OFFSET(ThFirstArgument, KTHREAD, FirstArgument), -#endif - OFFSET(ThCallbackStack, KTHREAD, CallbackStack), -// OFFSET(ThCallbackDepth, KTHREAD, CallbackDepth), - OFFSET(ThApcStateIndex, KTHREAD, ApcStateIndex), - OFFSET(ThIdealProcessor, KTHREAD, IdealProcessor), - OFFSET(ThBasePriority, KTHREAD, BasePriority), - OFFSET(ThPriorityDecrement, KTHREAD, PriorityDecrement), - OFFSET(ThAdjustReason, KTHREAD, AdjustReason), - OFFSET(ThAdjustIncrement, KTHREAD, AdjustIncrement), - OFFSET(ThPreviousMode, KTHREAD, PreviousMode), - OFFSET(ThSaturation, KTHREAD, Saturation), -#if (NTDDI_VERSION >= NTDDI_LONGHORN) - OFFSET(ThSystemCallNumber, KTHREAD, SystemCallNumber), -#endif - OFFSET(ThFreezeCount, KTHREAD, FreezeCount), - OFFSET(ThUserAffinity, KTHREAD, UserAffinity), - OFFSET(ThProcess, KTHREAD, Process), - OFFSET(ThAffinity, KTHREAD, Affinity), - OFFSET(ThUserIdealProcessor, KTHREAD, UserIdealProcessor), - OFFSET(ThApcStatePointer, KTHREAD, ApcStatePointer), - OFFSET(ThSavedApcState, KTHREAD, SavedApcState), - OFFSET(ThWaitReason, KTHREAD, WaitReason), - OFFSET(ThSuspendCount, KTHREAD, SuspendCount), -// OFFSET(ThCodePatchInProgress, KTHREAD, CodePatchInProgress), - OFFSET(ThWin32Thread, KTHREAD, Win32Thread), - OFFSET(ThStackBase, KTHREAD, StackBase), - OFFSET(ThSuspendApc, KTHREAD, SuspendApc), - OFFSET(ThPowerState, KTHREAD, PowerState), - OFFSET(ThKernelTime, KTHREAD, KernelTime), - OFFSET(ThLegoData, KTHREAD, LegoData), - OFFSET(ThLargeStack, KTHREAD, LargeStack), - OFFSET(ThUserTime, KTHREAD, UserTime), - OFFSET(ThSuspendSemaphore, KTHREAD, SuspendSemaphore), - OFFSET(ThSListFaultCount, KTHREAD, SListFaultCount), - OFFSET(ThThreadListEntry, KTHREAD, ThreadListEntry), - OFFSET(ThMutantListHead, KTHREAD, MutantListHead), - OFFSET(ThSListFaultAddress, KTHREAD, SListFaultAddress), - SIZE(KernelThreadObjectLength, KTHREAD), - SIZE(ExecutiveThreadObjectLength, ETHREAD), - - HEADER("KTIMER"), - OFFSET(TiType, KTIMER, Header.Type), - OFFSET(TiSize, KTIMER, Header.Size), - OFFSET(TiInserted, KTIMER, Header.Inserted), - OFFSET(TiSignalState, KTIMER, Header.SignalState), - OFFSET(TiDueTime, KTIMER, DueTime), - OFFSET(TiTimerListEntry, KTIMER, TimerListEntry), - OFFSET(TiDpc, KTIMER, Dpc), - OFFSET(TiPeriod, KTIMER, Period), - SIZE(TimerObjectLength, KTIMER), - - HEADER("TIME"), -// OFFSET(TmLowTime, TIME, LowTime), -// OFFSET(TmHighTime, TIME, HighTime), - -#if 0 - HEADER("SYSTEM_CONTEXT_SWITCH_INFORMATION (relative to FindAny)"), - RELOFFSET(TwFindAny, SYSTEM_CONTEXT_SWITCH_INFORMATION, FindAny, FindAny), - RELOFFSET(TwFindIdeal, SYSTEM_CONTEXT_SWITCH_INFORMATION, FindIdeal, FindAny), - RELOFFSET(TwFindLast, SYSTEM_CONTEXT_SWITCH_INFORMATION, FindLast, FindAny), - RELOFFSET(TwIdleAny, SYSTEM_CONTEXT_SWITCH_INFORMATION, IdleAny, FindAny), - RELOFFSET(TwIdleCurrent, SYSTEM_CONTEXT_SWITCH_INFORMATION, IdleCurrent, FindAny), - RELOFFSET(TwIdleIdeal, SYSTEM_CONTEXT_SWITCH_INFORMATION, IdleIdeal, FindAny), - RELOFFSET(TwIdleLast, SYSTEM_CONTEXT_SWITCH_INFORMATION, IdleLast, FindAny), - RELOFFSET(TwPreemptAny, SYSTEM_CONTEXT_SWITCH_INFORMATION, PreemptAny, FindAny), - RELOFFSET(TwPreemptCurrent, SYSTEM_CONTEXT_SWITCH_INFORMATION, PreemptCurrent, FindAny), - RELOFFSET(TwPreemptLast, SYSTEM_CONTEXT_SWITCH_INFORMATION, PreemptLast, FindAny), - RELOFFSET(TwSwitchToIdle, SYSTEM_CONTEXT_SWITCH_INFORMATION, SwitchToIdle, FindAny), -#endif - - HEADER("KUSER_SHARED_DATA"), - OFFSET(UsTickCountMultiplier, KUSER_SHARED_DATA, TickCountMultiplier), - OFFSET(UsInterruptTime, KUSER_SHARED_DATA, InterruptTime), - OFFSET(UsSystemTime, KUSER_SHARED_DATA, SystemTime), - OFFSET(UsTimeZoneBias, KUSER_SHARED_DATA, TimeZoneBias), - OFFSET(UsImageNumberLow, KUSER_SHARED_DATA, ImageNumberLow), - OFFSET(UsImageNumberHigh, KUSER_SHARED_DATA, ImageNumberHigh), - OFFSET(UsNtSystemRoot, KUSER_SHARED_DATA, NtSystemRoot), - OFFSET(UsMaxStackTraceDepth, KUSER_SHARED_DATA, MaxStackTraceDepth), - OFFSET(UsCryptoExponent, KUSER_SHARED_DATA, CryptoExponent), - OFFSET(UsTimeZoneId, KUSER_SHARED_DATA, TimeZoneId), - OFFSET(UsLargePageMinimum, KUSER_SHARED_DATA, LargePageMinimum), - OFFSET(UsReserved2, KUSER_SHARED_DATA, Reserved2), - OFFSET(UsNtProductType, KUSER_SHARED_DATA, NtProductType), - OFFSET(UsProductTypeIsValid, KUSER_SHARED_DATA, ProductTypeIsValid), - OFFSET(UsNtMajorVersion, KUSER_SHARED_DATA, NtMajorVersion), - OFFSET(UsNtMinorVersion, KUSER_SHARED_DATA, NtMinorVersion), - OFFSET(UsProcessorFeatures, KUSER_SHARED_DATA, ProcessorFeatures), - OFFSET(UsReserved1, KUSER_SHARED_DATA, Reserved1), - OFFSET(UsReserved3, KUSER_SHARED_DATA, Reserved3), - OFFSET(UsTimeSlip, KUSER_SHARED_DATA, TimeSlip), - OFFSET(UsAlternativeArchitecture, KUSER_SHARED_DATA, AlternativeArchitecture), - OFFSET(UsSystemExpirationDate, KUSER_SHARED_DATA, SystemExpirationDate), - OFFSET(UsSuiteMask, KUSER_SHARED_DATA, SuiteMask), - OFFSET(UsKdDebuggerEnabled, KUSER_SHARED_DATA, KdDebuggerEnabled), - OFFSET(UsActiveConsoleId, KUSER_SHARED_DATA, ActiveConsoleId), - OFFSET(UsDismountCount, KUSER_SHARED_DATA, DismountCount), - OFFSET(UsComPlusPackage, KUSER_SHARED_DATA, ComPlusPackage), - OFFSET(UsLastSystemRITEventTickCount, KUSER_SHARED_DATA, LastSystemRITEventTickCount), - OFFSET(UsNumberOfPhysicalPages, KUSER_SHARED_DATA, NumberOfPhysicalPages), - OFFSET(UsSafeBootMode, KUSER_SHARED_DATA, SafeBootMode), -// OFFSET(UsTscQpcData, KUSER_SHARED_DATA, TscQpcData), - OFFSET(UsTestRetInstruction, KUSER_SHARED_DATA, TestRetInstruction), - OFFSET(UsSystemCall, KUSER_SHARED_DATA, SystemCall), - OFFSET(UsSystemCallReturn, KUSER_SHARED_DATA, SystemCallReturn), - OFFSET(UsSystemCallPad, KUSER_SHARED_DATA, SystemCallPad), - OFFSET(UsTickCount, KUSER_SHARED_DATA, TickCount), - OFFSET(UsTickCountQuad, KUSER_SHARED_DATA, TickCountQuad), - OFFSET(UsWow64SharedInformation, KUSER_SHARED_DATA, Wow64SharedInformation), - - HEADER("KWAIT_BLOCK"), - OFFSET(WbWaitListEntry, KWAIT_BLOCK, WaitListEntry), - OFFSET(WbThread, KWAIT_BLOCK, Thread), - OFFSET(WbObject, KWAIT_BLOCK, Object), - OFFSET(WbNextWaitBlock, KWAIT_BLOCK, NextWaitBlock), - OFFSET(WbWaitKey, KWAIT_BLOCK, WaitKey), - OFFSET(WbWaitType, KWAIT_BLOCK, WaitType), - -#if defined(_M_IX86) - - HEADER("CONTEXT"), - OFFSET(CsContextFlags, CONTEXT, ContextFlags), - OFFSET(CsDr0, CONTEXT, Dr0), - OFFSET(CsDr1, CONTEXT, Dr1), - OFFSET(CsDr2, CONTEXT, Dr2), - OFFSET(CsDr3, CONTEXT, Dr3), - OFFSET(CsDr6, CONTEXT, Dr6), - OFFSET(CsDr7, CONTEXT, Dr7), - OFFSET(CsFloatSave, CONTEXT, FloatSave), - OFFSET(CsSegGs, CONTEXT, SegGs), - OFFSET(CsSegFs, CONTEXT, SegFs), - OFFSET(CsSegEs, CONTEXT, SegEs), - OFFSET(CsSegDs, CONTEXT, SegDs), - OFFSET(CsEdi, CONTEXT, Edi), - OFFSET(CsEsi, CONTEXT, Esi), - OFFSET(CsEbx, CONTEXT, Ebx), - OFFSET(CsEdx, CONTEXT, Edx), - OFFSET(CsEcx, CONTEXT, Ecx), - OFFSET(CsEax, CONTEXT, Eax), - OFFSET(CsEbp, CONTEXT, Ebp), - OFFSET(CsEip, CONTEXT, Eip), - OFFSET(CsSegCs, CONTEXT, SegCs), - OFFSET(CsEflags, CONTEXT, EFlags), - OFFSET(CsEsp, CONTEXT, Esp), - OFFSET(CsSegSs, CONTEXT, SegSs), - OFFSET(CsExtendedRegisters, CONTEXT, ExtendedRegisters), - SIZE(ContextFrameLength, CONTEXT), - SIZE(CONTEXT_LENGTH, CONTEXT), - - HEADER("KGDTENTRY"), - OFFSET(KgdtBaseLow, KGDTENTRY, BaseLow), - OFFSET(KgdtBaseMid, KGDTENTRY, HighWord.Bytes.BaseMid), - OFFSET(KgdtBaseHi, KGDTENTRY, HighWord.Bytes.BaseHi), - OFFSET(KgdtLimitHi, KGDTENTRY, HighWord.Bytes.Flags2), - OFFSET(KgdtLimitLow, KGDTENTRY, LimitLow), - - HEADER("KTRAP_FRAME"), - OFFSET(TsExceptionList, KTRAP_FRAME, ExceptionList), - OFFSET(TsPreviousPreviousMode, KTRAP_FRAME, PreviousPreviousMode), - OFFSET(TsSegGs, KTRAP_FRAME, SegGs), - OFFSET(TsSegFs, KTRAP_FRAME, SegFs), - OFFSET(TsSegEs, KTRAP_FRAME, SegEs), - OFFSET(TsSegDs, KTRAP_FRAME, SegDs), - OFFSET(TsEdi, KTRAP_FRAME, Edi), - OFFSET(TsEsi, KTRAP_FRAME, Esi), - OFFSET(TsEbp, KTRAP_FRAME, Ebp), - OFFSET(TsEbx, KTRAP_FRAME, Ebx), - OFFSET(TsEdx, KTRAP_FRAME, Edx), - OFFSET(TsEcx, KTRAP_FRAME, Ecx), - OFFSET(TsEax, KTRAP_FRAME, Eax), - OFFSET(TsErrCode, KTRAP_FRAME, ErrCode), - OFFSET(TsEip, KTRAP_FRAME, Eip), - OFFSET(TsSegCs, KTRAP_FRAME, SegCs), - OFFSET(TsEflags, KTRAP_FRAME, EFlags), - OFFSET(TsHardwareEsp, KTRAP_FRAME, HardwareEsp), - OFFSET(TsHardwareSegSs, KTRAP_FRAME, HardwareSegSs), - OFFSET(TsTempSegCs, KTRAP_FRAME, TempSegCs), -// OFFSET(TsLogging, KTRAP_FRAME, Logging), - OFFSET(TsTempEsp, KTRAP_FRAME, TempEsp), - OFFSET(TsDbgEbp, KTRAP_FRAME, DbgEbp), - OFFSET(TsDbgEip, KTRAP_FRAME, DbgEip), - OFFSET(TsDbgArgMark, KTRAP_FRAME, DbgArgMark), - OFFSET(TsDbgArgPointer, KTRAP_FRAME, DbgArgPointer), - OFFSET(TsDr0, KTRAP_FRAME, Dr0), - OFFSET(TsDr1, KTRAP_FRAME, Dr1), - OFFSET(TsDr2, KTRAP_FRAME, Dr2), - OFFSET(TsDr3, KTRAP_FRAME, Dr3), - OFFSET(TsDr6, KTRAP_FRAME, Dr6), - OFFSET(TsDr7, KTRAP_FRAME, Dr7), - OFFSET(TsV86Es, KTRAP_FRAME, V86Es), - OFFSET(TsV86Ds, KTRAP_FRAME, V86Ds), - OFFSET(TsV86Fs, KTRAP_FRAME, V86Fs), - OFFSET(TsV86Gs, KTRAP_FRAME, V86Gs), - SIZE(KTRAP_FRAME_LENGTH, KTRAP_FRAME), - CONSTANT(KTRAP_FRAME_ALIGN), - CONSTANT(FRAME_EDITED), - - HEADER("KTSS"), - OFFSET(TssEsp0, KTSS, Esp0), - OFFSET(TssCR3, KTSS, CR3), - OFFSET(TssEip, KTSS, Eip), - OFFSET(TssEFlags, KTSS, EFlags), - OFFSET(TssEax, KTSS, Eax), - OFFSET(TssEbx, KTSS, Ebx), - OFFSET(TssEcx, KTSS, Ecx), - OFFSET(TssEdx, KTSS, Edx), - OFFSET(TssEsp, KTSS, Esp), - OFFSET(TssEbp, KTSS, Ebp), - OFFSET(TssEsi, KTSS, Esi), - OFFSET(TssEdi, KTSS, Edi), - OFFSET(TssEs, KTSS, Es), - OFFSET(TssCs, KTSS, Cs), - OFFSET(TssSs, KTSS, Ss), - OFFSET(TssDs, KTSS, Ds), - OFFSET(TssFs, KTSS, Fs), - OFFSET(TssGs, KTSS, Gs), - OFFSET(TssLDT, KTSS, LDT), - OFFSET(TssIoMapBase, KTSS, IoMapBase), - OFFSET(TssIoMaps, KTSS, IoMaps), - SIZE(TssLength, KTSS), - -#elif defined(_M_AMD64) - - HEADER("Argument Home Address"), - OFFSET(P1Home, CONTEXT, P1Home), - OFFSET(P2Home, CONTEXT, P1Home), - OFFSET(P3Home, CONTEXT, P1Home), - OFFSET(P4Home, CONTEXT, P1Home), - - HEADER("CONTEXT"), - OFFSET(CxP1Home, CONTEXT, P1Home), - OFFSET(CxP2Home, CONTEXT, P2Home), - OFFSET(CxP3Home, CONTEXT, P3Home), - OFFSET(CxP4Home, CONTEXT, P4Home), - OFFSET(CxP5Home, CONTEXT, P5Home), - OFFSET(CxP6Home, CONTEXT, P6Home), - OFFSET(CxContextFlags, CONTEXT, ContextFlags), - OFFSET(CxMxCsr, CONTEXT, MxCsr), - OFFSET(CxSegCs, CONTEXT, SegCs), - OFFSET(CxSegDs, CONTEXT, SegDs), - OFFSET(CxSegEs, CONTEXT, SegEs), - OFFSET(CxSegFs, CONTEXT, SegFs), - OFFSET(CxSegGs, CONTEXT, SegGs), - OFFSET(CxSegSs, CONTEXT, SegSs), - OFFSET(CxEFlags, CONTEXT, EFlags), - OFFSET(CxDr0, CONTEXT, Dr0), - OFFSET(CxDr1, CONTEXT, Dr1), - OFFSET(CxDr2, CONTEXT, Dr2), - OFFSET(CxDr3, CONTEXT, Dr3), - OFFSET(CxDr6, CONTEXT, Dr6), - OFFSET(CxDr7, CONTEXT, Dr7), - OFFSET(CxRax, CONTEXT, Rax), - OFFSET(CxRcx, CONTEXT, Rcx), - OFFSET(CxRdx, CONTEXT, Rdx), - OFFSET(CxRbx, CONTEXT, Rbx), - OFFSET(CxRsp, CONTEXT, Rsp), - OFFSET(CxRbp, CONTEXT, Rbp), - OFFSET(CxRsi, CONTEXT, Rsi), - OFFSET(CxRdi, CONTEXT, Rdi), - OFFSET(CxR8, CONTEXT, R8), - OFFSET(CxR9, CONTEXT, R9), - OFFSET(CxR10, CONTEXT, R10), - OFFSET(CxR11, CONTEXT, R11), - OFFSET(CxR12, CONTEXT, R12), - OFFSET(CxR13, CONTEXT, R13), - OFFSET(CxR14, CONTEXT, R14), - OFFSET(CxR15, CONTEXT, R15), - OFFSET(CxRip, CONTEXT, Rip), - OFFSET(CxFltSave, CONTEXT, FltSave), - OFFSET(CxXmm0, CONTEXT, Xmm0), - OFFSET(CxXmm1, CONTEXT, Xmm1), - OFFSET(CxXmm2, CONTEXT, Xmm2), - OFFSET(CxXmm3, CONTEXT, Xmm3), - OFFSET(CxXmm4, CONTEXT, Xmm4), - OFFSET(CxXmm5, CONTEXT, Xmm5), - OFFSET(CxXmm6, CONTEXT, Xmm6), - OFFSET(CxXmm7, CONTEXT, Xmm7), - OFFSET(CxXmm8, CONTEXT, Xmm8), - OFFSET(CxXmm9, CONTEXT, Xmm9), - OFFSET(CxXmm10, CONTEXT, Xmm10), - OFFSET(CxXmm11, CONTEXT, Xmm11), - OFFSET(CxXmm12, CONTEXT, Xmm12), - OFFSET(CxXmm13, CONTEXT, Xmm13), - OFFSET(CxXmm14, CONTEXT, Xmm14), - OFFSET(CxXmm15, CONTEXT, Xmm15), - OFFSET(CxDebugControl, CONTEXT, DebugControl), - OFFSET(CxLastBranchToRip, CONTEXT, LastBranchToRip), - OFFSET(CxLastBranchFromRip, CONTEXT, LastBranchFromRip), - OFFSET(CxLastExceptionToRip, CONTEXT, LastExceptionToRip), - OFFSET(CxLastExceptionFromRip, CONTEXT, LastExceptionFromRip), - OFFSET(CxVectorControl, CONTEXT, VectorControl), - OFFSET(CxVectorRegister, CONTEXT, VectorRegister), - SIZE(CONTEXT_FRAME_LENGTH, CONTEXT), - - HEADER("DISPATCHER_CONTEXT"), - OFFSET(DcControlPc, TYPE, ControlPc), - OFFSET(DcImageBase, TYPE, ImageBase), - OFFSET(DcFunctionEntry, TYPE, FunctionEntry), - OFFSET(DcEstablisherFrame, TYPE, EstablisherFrame), - OFFSET(DcTargetIp, TYPE, TargetIp), - OFFSET(DcContextRecord, TYPE, ContextRecord), - OFFSET(DcLanguageHandler, TYPE, LanguageHandler), - OFFSET(DcHandlerData, TYPE, HandlerData), - OFFSET(DcHistoryTable, TYPE, HistoryTable), - OFFSET(DcScopeIndex, TYPE, ScopeIndex), - - HEADER("KEXCEPTION_FRAME"), - OFFSET(ExP1Home, KEXCEPTION_FRAME, P1Home), - OFFSET(ExP2Home, KEXCEPTION_FRAME, P2Home), - OFFSET(ExP3Home, KEXCEPTION_FRAME, P3Home), - OFFSET(ExP4Home, KEXCEPTION_FRAME, P4Home), - OFFSET(ExP5, KEXCEPTION_FRAME, P5), - OFFSET(ExXmm6, KEXCEPTION_FRAME, Xmm6), - OFFSET(ExXmm7, KEXCEPTION_FRAME, Xmm7), - OFFSET(ExXmm8, KEXCEPTION_FRAME, Xmm8), - OFFSET(ExXmm9, KEXCEPTION_FRAME, Xmm9), - OFFSET(ExXmm10, KEXCEPTION_FRAME, Xmm10), - OFFSET(ExXmm11, KEXCEPTION_FRAME, Xmm11), - OFFSET(ExXmm12, KEXCEPTION_FRAME, Xmm12), - OFFSET(ExXmm13, KEXCEPTION_FRAME, Xmm13), - OFFSET(ExXmm14, KEXCEPTION_FRAME, Xmm14), - OFFSET(ExXmm15, KEXCEPTION_FRAME, Xmm15), - OFFSET(ExMxCsr, KEXCEPTION_FRAME, MxCsr), - OFFSET(ExRbp, KEXCEPTION_FRAME, Rbp), - OFFSET(ExRbx, KEXCEPTION_FRAME, Rbx), - OFFSET(ExRdi, KEXCEPTION_FRAME, Rdi), - OFFSET(ExRsi, KEXCEPTION_FRAME, Rsi), - OFFSET(ExR12, KEXCEPTION_FRAME, R12), - OFFSET(ExR13, KEXCEPTION_FRAME, R13), - OFFSET(ExR14, KEXCEPTION_FRAME, R14), - OFFSET(ExR15, KEXCEPTION_FRAME, R15), - OFFSET(ExReturn, KEXCEPTION_FRAME, Return), - OFFSET(CuInitialStack, KEXCEPTION_FRAME, InitialStack), - OFFSET(CuTrapFrame, KEXCEPTION_FRAME, TrapFrame), - OFFSET(CuCallbackStack, KEXCEPTION_FRAME, CallbackStack), - OFFSET(CuOutputBuffer, KEXCEPTION_FRAME, OutputBuffer), - OFFSET(CuOutputLength, KEXCEPTION_FRAME, OutputLength), - SIZE(KEXCEPTION_FRAME_LENGTH, KEXCEPTION_FRAME), - - HEADER("JUMP_BUFFER"), - OFFSET(JbFrame, JUMP_BUFFER, Frame), - OFFSET(JbRbx, JUMP_BUFFER, Rbx), - OFFSET(JbRsp, JUMP_BUFFER, Rsp), - OFFSET(JbRbp, JUMP_BUFFER, Rbp), - OFFSET(JbRsi, JUMP_BUFFER, Rsi), - OFFSET(JbRdi, JUMP_BUFFER, Rdi), - OFFSET(JbR12, JUMP_BUFFER, R12), - OFFSET(JbR13, JUMP_BUFFER, R13), - OFFSET(JbR14, JUMP_BUFFER, R14), - OFFSET(JbR15, JUMP_BUFFER, R15), - OFFSET(JbRip, JUMP_BUFFER, Rip), - OFFSET(JbMxCsr, JUMP_BUFFER, MxCsr), - OFFSET(JbFpCsr, JUMP_BUFFER, FpCsr), - OFFSET(JbXmm6, JUMP_BUFFER, Xmm6), - OFFSET(JbXmm7, JUMP_BUFFER, Xmm7), - OFFSET(JbXmm8, JUMP_BUFFER, Xmm8), - OFFSET(JbXmm9, JUMP_BUFFER, Xmm9), - OFFSET(JbXmm10, JUMP_BUFFER, Xmm10), - OFFSET(JbXmm11, JUMP_BUFFER, Xmm11), - OFFSET(JbXmm12, JUMP_BUFFER, Xmm12), - OFFSET(JbXmm13, JUMP_BUFFER, Xmm13), - OFFSET(JbXmm14, JUMP_BUFFER, Xmm14), - OFFSET(JbXmm15, JUMP_BUFFER, Xmm15), - - HEADER("KGDT64"), - OFFSET(KgdtBaseLow, KGDT64, BaseLow), - OFFSET(KgdtBaseMiddle, KGDT64, BaseMiddle), - OFFSET(KgdtBaseHigh, KGDT64, BaseHigh), - OFFSET(KgdtBaseUpper, KGDT64, BaseUpper), - OFFSET(KgdtLimitHigh, KGDT64, LimitHigh), - OFFSET(KgdtLimitLow, KGDT64, LimitLow), - CONSTANT(KGDT_LIMIT_ENCODE_MASK), - - HEADER("KPRCB"), - OFFSET(PbMxCsr, KPRCB, MxCsr), - OFFSET(PbNumber, KPRCB, Number), - OFFSET(PbInterruptRequest, KPRCB, InterruptRequest), - OFFSET(PbIdleHalt, KPRCB, IdleHalt), - OFFSET(PbCurrentThread, KPRCB, CurrentThread), - OFFSET(PbNextThread, KPRCB, NextThread), - OFFSET(PbIdleThread, KPRCB, IdleThread), - OFFSET(PbNestingLevel, KPRCB, NestingLevel), - OFFSET(PbRspBase, KPRCB, RspBase), - OFFSET(PbPrcbLock, KPRCB, PrcbLock), - OFFSET(PbSetMember, KPRCB, SetMember), - OFFSET(PbProcessorState, KPRCB, ProcessorState), - OFFSET(PbCpuType, KPRCB, CpuType), - OFFSET(PbCpuID, KPRCB, CpuID), - OFFSET(PbCpuStep, KPRCB, CpuStep), - OFFSET(PbHalReserved, KPRCB, HalReserved), - OFFSET(PbMinorVersion, KPRCB, MinorVersion), - OFFSET(PbMajorVersion, KPRCB, MajorVersion), - OFFSET(PbBuildType, KPRCB, BuildType), - OFFSET(PbCpuVendor, KPRCB, CpuVendor), - OFFSET(PbCoresPerPhysicalProcessor, KPRCB, CoresPerPhysicalProcessor), - OFFSET(PbLogicalProcessorsPerCore, KPRCB, LogicalProcessorsPerCore), - OFFSET(PbApicMask, KPRCB, ApicMask), - OFFSET(PbCFlushSize, KPRCB, CFlushSize), - OFFSET(PbAcpiReserved, KPRCB, AcpiReserved), - OFFSET(PbInitialApicId, KPRCB, InitialApicId), - OFFSET(PbStride, KPRCB, Stride), - OFFSET(PbLockQueue, KPRCB, LockQueue), - OFFSET(PbPPLookasideList, KPRCB, PPLookasideList), - OFFSET(PbPPNPagedLookasideList, KPRCB, PPNPagedLookasideList), - OFFSET(PbPPPagedLookasideList, KPRCB, PPPagedLookasideList), - OFFSET(PbPacketBarrier, KPRCB, PacketBarrier), - OFFSET(PbDeferredReadyListHead, KPRCB, DeferredReadyListHead), - OFFSET(PbLookasideIrpFloat, KPRCB, LookasideIrpFloat), - OFFSET(PbSystemCalls, KPRCB, SystemCalls), - OFFSET(PbReadOperationCount, KPRCB, ReadOperationCount), - OFFSET(PbWriteOperationCount, KPRCB, WriteOperationCount), - OFFSET(PbOtherOperationCount, KPRCB, OtherOperationCount), - OFFSET(PbReadTransferCount, KPRCB, ReadTransferCount), - OFFSET(PbWriteTransferCount, KPRCB, WriteTransferCount), - OFFSET(PbOtherTransferCount, KPRCB, OtherTransferCount), - OFFSET(PbContextSwitches, KPRCB, ContextSwitches), - OFFSET(PbTargetSet, KPRCB, TargetSet), - OFFSET(PbIpiFrozen, KPRCB, IpiFrozen), - OFFSET(PbRequestMailbox, KPRCB, RequestMailbox), - OFFSET(PbSenderSummary, KPRCB, SenderSummary), - OFFSET(PbDpcListHead, KPRCB, DpcListHead), - OFFSET(PbDpcLock, KPRCB, DpcLock), - OFFSET(PbDpcQueueDepth, KPRCB, DpcQueueDepth), - OFFSET(PbDpcCount, KPRCB, DpcCount), - OFFSET(PbDpcStack, KPRCB, DpcStack), - OFFSET(PbMaximumDpcQueueDepth, KPRCB, MaximumDpcQueueDepth), - OFFSET(PbDpcRequestRate, KPRCB, DpcRequestRate), - OFFSET(PbMinimumDpcRate, KPRCB, MinimumDpcRate), - OFFSET(PbDpcInterruptRequested, KPRCB, DpcInterruptRequested), - OFFSET(PbDpcThreadRequested, KPRCB, DpcThreadRequested), - OFFSET(PbDpcRoutineActive, KPRCB, DpcRoutineActive), - OFFSET(PbDpcThreadActive, KPRCB, DpcThreadActive), - OFFSET(PbTimerHand, KPRCB, TimerHand), - OFFSET(PbTimerRequest, KPRCB, TimerRequest), - OFFSET(PbTickOffset, KPRCB, TickOffset), - OFFSET(PbMasterOffset, KPRCB, MasterOffset), - OFFSET(PbDpcLastCount, KPRCB, DpcLastCount), - OFFSET(PbQuantumEnd, KPRCB, QuantumEnd), - OFFSET(PbDpcSetEventRequest, KPRCB, DpcSetEventRequest), - OFFSET(PbIdleSchedule, KPRCB, IdleSchedule), - OFFSET(PbReadySummary, KPRCB, ReadySummary), - OFFSET(PbDispatcherReadyListHead, KPRCB, DispatcherReadyListHead), - OFFSET(PbInterruptCount, KPRCB, InterruptCount), - OFFSET(PbKernelTime, KPRCB, KernelTime), - OFFSET(PbUserTime, KPRCB, UserTime), - OFFSET(PbDpcTime, KPRCB, DpcTime), - OFFSET(PbInterruptTime, KPRCB, InterruptTime), - OFFSET(PbAdjustDpcThreshold, KPRCB, AdjustDpcThreshold), - OFFSET(PbSkipTick, KPRCB, SkipTick), - OFFSET(PbPollSlot, KPRCB, PollSlot), - OFFSET(PbParentNode, KPRCB, ParentNode), - OFFSET(PbMultiThreadProcessorSet, KPRCB, MultiThreadProcessorSet), - OFFSET(PbMultiThreadSetMaster, KPRCB, MultiThreadSetMaster), - OFFSET(PbStartCycles, KPRCB, StartCycles), - OFFSET(PbPageColor, KPRCB, PageColor), - OFFSET(PbNodeColor, KPRCB, NodeColor), - OFFSET(PbNodeShiftedColor, KPRCB,NodeShiftedColor), - OFFSET(PbSecondaryColorMask, KPRCB, SecondaryColorMask), - OFFSET(PbSleeping, KPRCB, Sleeping), - OFFSET(PbCycleTime, KPRCB, CycleTime), - OFFSET(PbFastReadNoWait, KPRCB, FastReadNoWait), - OFFSET(PbFastReadWait, KPRCB, FastReadWait), - OFFSET(PbFastReadNotPossible, KPRCB, FastReadNotPossible), - OFFSET(PbCopyReadNoWait, KPRCB, CopyReadNoWait), - OFFSET(PbCopyReadWait, KPRCB, CopyReadWait), - OFFSET(PbCopyReadNoWaitMiss, KPRCB, CopyReadNoWaitMiss), - OFFSET(PbAlignmentFixupCount, KPRCB, AlignmentFixupCount), - OFFSET(PbExceptionDispatchCount, KPRCB, ExceptionDispatchCount), - OFFSET(PbVendorString, KPRCB, VendorString), - OFFSET(PbPowerState, KPRCB, PowerState), - SIZE(ProcessorBlockLength, KPRCB), - - HEADER("KPCR"), - OFFSET(PcGdt, KPCR, Gdt), - OFFSET(PcTss, KPCR, Tss), - OFFSET(PcUserRsp, KPCR, UserRsp), - OFFSET(PcSelf, KPCR, Self), - OFFSET(PcCurrentPrcb, KPCR, CurrentPrcb), - OFFSET(PcLockArray, KPCR, LockArray), - OFFSET(PcTeb, KPCR, Teb), - OFFSET(PcIdt, KPCR, Idt), - OFFSET(PcIrql, KPCR, Irql), - OFFSET(PcStallScaleFactor, KPCR, StallScaleFactor), - OFFSET(PcHalReserved, KPCR, HalReserved), - OFFSET(PcPrcb, KPCR, Prcb), - OFFSET(PcMxCsr, KPCR, MxCsr), - OFFSET(PcNumber, KPCR, Number), - OFFSET(PcInterruptRequest, KPCR, InterruptRequest), - OFFSET(PcIdleHalt, KPCR, IdleHalt), - OFFSET(PcCurrentThread, KPCR, CurrentThread), - OFFSET(PcNextThread, KPCR, NextThread), - OFFSET(PcIdleThread, KPCR, IdleThread), - OFFSET(PcIpiFrozen, KPCR, IpiFrozen), - OFFSET(PcNestingLevel, KPCR, NestingLevel), - OFFSET(PcRspBase, KPCR, RspBase), - OFFSET(PcPrcbLock, KPCR, PrcbLock), - OFFSET(PcSetMember, KPCR, SetMember), - OFFSET(PcCr0, KPCR, Cr0), - OFFSET(PcCr2, KPCR, Cr2), - OFFSET(PcCr3, KPCR, Cr3), - OFFSET(PcCr4, KPCR, Cr4), - OFFSET(PcKernelDr0, KPCR, KernelDr0), - OFFSET(PcKernelDr1, KPCR, KernelDr1), - OFFSET(PcKernelDr2, KPCR, KernelDr2), - OFFSET(PcKernelDr3, KPCR, KernelDr3), - OFFSET(PcKernelDr7, KPCR, KernelDr7), - OFFSET(PcGdtrLimit, KPCR, GdtrLimit), - OFFSET(PcGdtrBase, KPCR, GdtrBase), - OFFSET(PcIdtrLimit, KPCR, IdtrLimit), - OFFSET(PcIdtrBase, KPCR, IdtrBase), - OFFSET(PcTr, KPCR, Tr), - OFFSET(PcLdtr, KPCR, Ldtr), - OFFSET(PcDebugControl, KPCR, DebugControl), - OFFSET(PcLastBranchToRip, KPCR, LastBranchToRip), - OFFSET(PcLastBranchFromRip, KPCR, LastBranchFromRip), - OFFSET(PcLastExceptionToRip, KPCR, LastExceptionToRip), - OFFSET(PcLastExceptionFromRip, KPCR, LastExceptionFromRip), - OFFSET(PcCr8, KPCR, Cr8), - OFFSET(PcCpuType, KPCR, CpuType), - OFFSET(PcCpuID, KPCR, CpuID), - OFFSET(PcCpuStep, KPCR, CpuStep), - OFFSET(PcCpuVendor, KPCR, CpuVendor), - OFFSET(PcVirtualApicAssist, KPCR, VirtualApicAssist), - OFFSET(PcCFlushSize, KPCR, CFlushSize), - OFFSET(PcDeferredReadyListHead, KPCR, DeferredReadyListHead), - OFFSET(PcSystemCalls, KPCR, SystemCalls), - OFFSET(PcDpcRoutineActive, KPCR, DpcRoutineActive), - OFFSET(PcInterruptCount, KPCR, InterruptCount), - OFFSET(PcDebuggerSavedIRQL, KPCR, DebuggerSavedIRQL), - OFFSET(PcTickOffset, KPCR, TickOffset), - OFFSET(PcMasterOffset, KPCR, MasterOffset), - OFFSET(PcSkipTick, KPCR, SkipTick), - OFFSET(PcStartCycles, KPCR, StartCycles), - SIZE(ProcessorControlRegisterLength, KPCR), - - HEADER("KPROCESSOR_STATE"), - OFFSET(PsSpecialRegisters, KPROCESSOR_STATE, SpecialRegisters), - OFFSET(PsCr0, KPROCESSOR_STATE, Cr0), - OFFSET(PsCr2, KPROCESSOR_STATE, Cr2), - OFFSET(PsCr3, KPROCESSOR_STATE, Cr3), - OFFSET(PsCr4, KPROCESSOR_STATE, Cr4), - OFFSET(PsKernelDr0, KPROCESSOR_STATE, KernelDr0), - OFFSET(PsKernelDr1, KPROCESSOR_STATE, KernelDr1), - OFFSET(PsKernelDr2, KPROCESSOR_STATE, KernelDr2), - OFFSET(PsKernelDr3, KPROCESSOR_STATE, KernelDr3), - OFFSET(PsKernelDr6, KPROCESSOR_STATE, KernelDr6), - OFFSET(PsKernelDr7, KPROCESSOR_STATE, KernelDr7), - OFFSET(PsGdtr, KPROCESSOR_STATE, Gdtr), - OFFSET(PsIdtr, KPROCESSOR_STATE, Idtr), - OFFSET(PsTr, KPROCESSOR_STATE, Tr), - OFFSET(PsLdtr, KPROCESSOR_STATE, Ldtr), - OFFSET(PsMxCsr, KPROCESSOR_STATE, MxCsr), - OFFSET(PsContextFrame, KPROCESSOR_STATE, ContextFrame), - OFFSET(PsDebugControl, KPROCESSOR_STATE, DebugControl), - OFFSET(PsLastBranchToRip, KPROCESSOR_STATE, LastBranchToRip), - OFFSET(PsLastBranchFromRip, KPROCESSOR_STATE, LastBranchFromRip), - OFFSET(PsLastExceptionToRip, KPROCESSOR_STATE, LastExceptionToRip), - OFFSET(PsLastExceptionFromRip, KPROCESSOR_STATE, LastExceptionFromRip), - OFFSET(PsCr8, KPROCESSOR_STATE, Cr8), - SIZE(ProcessorStateLength, KPROCESSOR_STATE), - - HEADER("KSTART_FRAME"), - OFFSET(SfP1Home, KSTART_FRAME, P1Home), - OFFSET(SfP2Home, KSTART_FRAME, P2Home), - OFFSET(SfP3Home, KSTART_FRAME, P3Home), - OFFSET(SfP4Home, KSTART_FRAME, P4Home), - OFFSET(SfReturn, KSTART_FRAME, Return), - SIZE(KSTART_FRAME_LENGTH, KSTART_FRAME), - - HEADER("KSPECIAL_REGISTERS"), - OFFSET(SrKernelDr0, KSPECIAL_REGISTERS, KernelDr0), - OFFSET(SrKernelDr1, KSPECIAL_REGISTERS, KernelDr1), - OFFSET(SrKernelDr2, KSPECIAL_REGISTERS, KernelDr2), - OFFSET(SrKernelDr3, KSPECIAL_REGISTERS, KernelDr3), - OFFSET(SrKernelDr6, KSPECIAL_REGISTERS, KernelDr6), - OFFSET(SrKernelDr7, KSPECIAL_REGISTERS, KernelDr7), - OFFSET(SrGdtr, KSPECIAL_REGISTERS, Gdtr), - OFFSET(SrIdtr, KSPECIAL_REGISTERS, Idtr), - OFFSET(SrTr, KSPECIAL_REGISTERS, Tr), - OFFSET(SrMxCsr, KSPECIAL_REGISTERS, MxCsr), - OFFSET(SrMsrGsBase, KSPECIAL_REGISTERS, MsrGsBase), - OFFSET(SrMsrGsSwap, KSPECIAL_REGISTERS, MsrGsSwap), - OFFSET(SrMsrStar, KSPECIAL_REGISTERS, MsrStar), - OFFSET(SrMsrLStar, KSPECIAL_REGISTERS, MsrLStar), - OFFSET(SrMsrCStar, KSPECIAL_REGISTERS, MsrCStar), - OFFSET(SrMsrSyscallMask, KSPECIAL_REGISTERS, MsrSyscallMask), - - HEADER("KSYSTEM_TIME"), - OFFSET(StLowTime, KSYSTEM_TIME, LowTime), - OFFSET(StHigh1Time, KSYSTEM_TIME, High1Time), - OFFSET(StHigh2Time, KSYSTEM_TIME, High2Time), - - HEADER("KSWITCH_FRAME"), - OFFSET(SwP5Home, KSWITCH_FRAME, P5Home), - OFFSET(SwApcBypass, KSWITCH_FRAME, ApcBypass), - OFFSET(SwRbp, KSWITCH_FRAME, Rbp), - OFFSET(SwReturn, KSWITCH_FRAME, Return), - SIZE(SwitchFrameLength, KSWITCH_FRAME), - SIZE(KSWITCH_FRAME_LENGTH, KSWITCH_FRAME), - - HEADER("KTRAP_FRAME"), - OFFSET(TrP1Home, KTRAP_FRAME, P1Home), - OFFSET(TrP2Home, KTRAP_FRAME, P2Home), - OFFSET(TrP3Home, KTRAP_FRAME, P3Home), - OFFSET(TrP4Home, KTRAP_FRAME, P4Home), - OFFSET(TrP5, KTRAP_FRAME, P5), - OFFSET(TrPreviousMode, KTRAP_FRAME, PreviousMode), - OFFSET(TrPreviousIrql, KTRAP_FRAME, PreviousIrql), - OFFSET(TrFaultIndicator, KTRAP_FRAME, FaultIndicator), - OFFSET(TrExceptionActive, KTRAP_FRAME, ExceptionActive), - OFFSET(TrMxCsr, KTRAP_FRAME, MxCsr), - OFFSET(TrRax, KTRAP_FRAME, Rax), - OFFSET(TrRcx, KTRAP_FRAME, Rcx), - OFFSET(TrRdx, KTRAP_FRAME, Rdx), - OFFSET(TrR8, KTRAP_FRAME, R8), - OFFSET(TrR9, KTRAP_FRAME, R9), - OFFSET(TrR10, KTRAP_FRAME, R10), - OFFSET(TrR11, KTRAP_FRAME, R11), - OFFSET(TrGsBase, KTRAP_FRAME, GsBase), - OFFSET(TrGsSwap, KTRAP_FRAME,GsSwap), - OFFSET(TrXmm0, KTRAP_FRAME, Xmm0), - OFFSET(TrXmm1, KTRAP_FRAME, Xmm1), - OFFSET(TrXmm2, KTRAP_FRAME, Xmm2), - OFFSET(TrXmm3, KTRAP_FRAME, Xmm3), - OFFSET(TrXmm4, KTRAP_FRAME, Xmm4), - OFFSET(TrXmm5, KTRAP_FRAME, Xmm5), - OFFSET(TrFaultAddress, KTRAP_FRAME, FaultAddress), - OFFSET(TrTimeStampCKCL, KTRAP_FRAME, TimeStampCKCL), - OFFSET(TrDr0, KTRAP_FRAME, Dr0), - OFFSET(TrDr1, KTRAP_FRAME, Dr1), - OFFSET(TrDr2, KTRAP_FRAME, Dr2), - OFFSET(TrDr3, KTRAP_FRAME, Dr3), - OFFSET(TrDr6, KTRAP_FRAME, Dr6), - OFFSET(TrDr7, KTRAP_FRAME, Dr7), - OFFSET(TrDebugControl, KTRAP_FRAME, DebugControl), - OFFSET(TrLastBranchToRip, KTRAP_FRAME, LastBranchToRip), - OFFSET(TrLastBranchFromRip, KTRAP_FRAME, LastBranchFromRip), - OFFSET(TrLastExceptionToRip, KTRAP_FRAME, LastExceptionToRip), - OFFSET(TrLastExceptionFromRip, KTRAP_FRAME, LastExceptionFromRip), - OFFSET(TrLastBranchControl, KTRAP_FRAME, LastBranchControl), - OFFSET(TrLastBranchMSR, KTRAP_FRAME, LastBranchMSR), - OFFSET(TrSegDs, KTRAP_FRAME, SegDs), - OFFSET(TrSegEs, KTRAP_FRAME, SegEs), - OFFSET(TrSegFs, KTRAP_FRAME, SegFs), - OFFSET(TrSegGs, KTRAP_FRAME, SegGs), - OFFSET(TrTrapFrame, KTRAP_FRAME, TrapFrame), - OFFSET(TrRbx, KTRAP_FRAME, Rbx), - OFFSET(TrRdi, KTRAP_FRAME, Rdi), - OFFSET(TrRsi, KTRAP_FRAME, Rsi), - OFFSET(TrRbp, KTRAP_FRAME, Rbp), - OFFSET(TrErrorCode, KTRAP_FRAME, ErrorCode), - OFFSET(TrTimeStampKlog, KTRAP_FRAME, TimeStampKlog), - OFFSET(TrRip, KTRAP_FRAME, Rip), - OFFSET(TrSegCs, KTRAP_FRAME, SegCs), - OFFSET(TrLogging, KTRAP_FRAME, Logging), - OFFSET(TrEFlags, KTRAP_FRAME, EFlags), - OFFSET(TrRsp, KTRAP_FRAME, Rsp), - OFFSET(TrSegSs, KTRAP_FRAME, SegSs), - OFFSET(TrCodePatchCycle, KTRAP_FRAME, CodePatchCycle), - SIZE(KTRAP_FRAME_LENGTH, KTRAP_FRAME), - - HEADER("KTIMER_TABLE"), - OFFSET(TtEntry, KTIMER_TABLE, TimerEntries), - OFFSET(TtTime, KTIMER_TABLE, Time), - SIZE(TIMER_ENTRY_SIZE, KTIMER_ENTRY), - SIZE(TIMER_TABLE_SIZE, KTIMER_TABLE), - SIZE(KTIMER_TABLE_SIZE, KTIMER_TABLE), - - HEADER("KTSS"), - OFFSET(TssRsp0, TYPE, Rsp0), - OFFSET(TssRsp1, TYPE, Rsp1), - OFFSET(TssRsp2, TYPE, Rsp2), - OFFSET(TssPanicStack, TYPE, PanicStack), - OFFSET(TssMcaStack, TYPE, McaStack), - OFFSET(TssNmiStack, TYPE, NmiStack), - OFFSET(TssIoMapBase, TYPE, IoMapBase), - SIZE(TssLength, TYPE), - -#endif - - /* End of list */ - {-1, "", 0} -}; - diff --git a/reactos/tools/geninc/geninc.c b/reactos/tools/geninc/geninc.c deleted file mode 100644 index 67971cfb771..00000000000 --- a/reactos/tools/geninc/geninc.c +++ /dev/null @@ -1,214 +0,0 @@ - - -#include -#include -#include - -#ifdef _WIN32 -#define PRIx64 "I64x" -typedef unsigned __int16 uint16_t; -typedef unsigned __int32 uint32_t; -typedef unsigned __int64 uint64_t; -#else -#include -#define PRIx64 "llx" -#define _stricmp strcasecmp -#endif - -typedef struct -{ - char Type; - char Name[55]; - uint64_t Value; -} ASMGENDATA; - -#define TYPE_END 0 -#define TYPE_RAW 1 -#define TYPE_CONSTANT 2 -#define TYPE_HEADER 3 - -int main(int argc, char* argv[]) -{ - FILE *input, *output; - ASMGENDATA data; - int i, result = -1; - int ms_format = 0; - char header[20]; - uint32_t e_lfanew, signature; - uint16_t Machine, NumberOfSections, SizeOfOptionalHeader; - typedef struct - { - char Name[8]; - uint32_t VirtualSize; - uint32_t VirtualAddress; - uint32_t RawSize; - uint32_t RawAddress; - uint32_t RelocAddress; - uint32_t LineNumbers; - uint16_t RelocationsNumber; - uint16_t LineNumbersNumber; - uint32_t Characteristics; - } SECTION; - SECTION section; - - if (argc >= 4 && _stricmp(argv[3], "-ms") == 0) ms_format = 1; - - /* Open the input file */ - input = fopen(argv[1], "rb"); - if (!input) - { - fprintf(stderr, "Could not open input file '%s'\n", argv[1]); - return -1; - } - - /* Open the output file */ - output = fopen(argv[2], "w"); - if (!output) - { - fclose(input); - fprintf(stderr, "Could not open output file '%s'\n", argv[2]); - return -1; - } - - /* Read the DOS header */ - if (fread(&header, 1, 2, input) != 2) - { - fprintf(stderr, "Error reading header.\n"); - goto quit; - } - - if (header[0] != 0x4d || header[1] != 0x5a) - { - fprintf(stderr, "Not a PE file.\n"); - goto quit; - } - - fseek(input, 0x3C, SEEK_SET); - if (fread(&e_lfanew, 1, 4, input) != 4) - { - fprintf(stderr, "Could not read e_lfanew.\n"); - goto quit; - } - - fseek(input, e_lfanew, SEEK_SET); - if (fread(&signature, 1, 4, input) != 4) - { - fprintf(stderr, "Could not read signature.\n"); - goto quit; - } - - /* Verify the PE signature */ - if (signature != 0x4550) - { - fprintf(stderr, "Invalid signature: 0x%lx.\n", signature); - goto quit; - } - - /* Read Machine */ - fseek(input, e_lfanew + 4, SEEK_SET); - if (fread(&Machine, 1, 2, input) != 2) - { - fprintf(stderr, "Could not read ExportDirectoryRVA.\n"); - goto quit; - } - - if (Machine != 0x14c && Machine != 0x8664) - { - fprintf(stderr, "Invalid Machine: 0x%x.\n", Machine); - goto quit; - } - - /* Read NumberOfSections */ - if (fread(&NumberOfSections, 1, 2, input) != 2) - { - fprintf(stderr, "Could not read NumberOfSections.\n"); - goto quit; - } - - fseek(input, e_lfanew + 0x14, SEEK_SET); - if (fread(&SizeOfOptionalHeader, 1, 2, input) != 2) - { - fprintf(stderr, "Could not read SizeOfOptionalHeader.\n"); - goto quit; - } - - /* Read the section table */ - fseek(input, e_lfanew + 0x18 + SizeOfOptionalHeader, SEEK_SET); - - /* Search for the .asmdef section */ - for (i = 0; i < NumberOfSections; i++) - { - if (fread(§ion, 1, sizeof(SECTION), input) != sizeof(SECTION)) - { - fprintf(stderr, "Could not read section.\n"); - goto quit; - } - - if (strcmp(section.Name, ".asmdef") == 0) - { - break; - } - } - - if (i == NumberOfSections) - { - fprintf(stderr, "Could not find section.\n"); - goto quit; - } - - /* Read the section table */ - fseek(input, section.RawAddress, SEEK_SET); - - while (1) - { - /* Read one entry */ - if (fread(&data, 1, sizeof(data), input) != sizeof(data)) - { - fprintf(stderr, "Error reading input file.\n"); - goto quit; - } - - switch(data.Type) - { - case TYPE_END: - break; - - case TYPE_RAW: - fprintf(output, "%s\n", data.Name); - continue; - - case TYPE_CONSTANT: - if (ms_format) - { - fprintf(output, "%s equ 0%"PRIx64"h\n", data.Name, data.Value); - } - else - { - fprintf(output, "%s = 0x%"PRIx64"\n", data.Name, data.Value); - } - continue; - - case TYPE_HEADER: - if (ms_format) - { - fprintf(output, "\n; %s\n", data.Name); - } - else - { - fprintf(output, "\n/* %s */\n", data.Name); - } - continue; - } - - break; - } - - result = 0; - -quit: - /* Close files */ - fclose(input); - fclose(output); - - return result; -} diff --git a/reactos/tools/geninc/geninc.rbuild b/reactos/tools/geninc/geninc.rbuild deleted file mode 100644 index 9d2be75348d..00000000000 --- a/reactos/tools/geninc/geninc.rbuild +++ /dev/null @@ -1,10 +0,0 @@ - - - - - geninc.c - - - data.c - - diff --git a/reactos/tools/getdate.c b/reactos/tools/getdate.c deleted file mode 100644 index 892a8ea40fa..00000000000 --- a/reactos/tools/getdate.c +++ /dev/null @@ -1,13 +0,0 @@ -#include -#include -void main() -{ - char curdate[9]; - time_t now; - struct tm *tm_now; - - time(&now); - tm_now=localtime(&now); - strftime(curdate, sizeof(curdate), "%Y%m%d", tm_now); - printf("%s", curdate); -} diff --git a/reactos/tools/getdate.cmd b/reactos/tools/getdate.cmd deleted file mode 100644 index 324e24d6ece..00000000000 --- a/reactos/tools/getdate.cmd +++ /dev/null @@ -1 +0,0 @@ -gcc getdate.c -o getdate.exe -s diff --git a/reactos/tools/getdate.exe b/reactos/tools/getdate.exe deleted file mode 100644 index d3e80076f83..00000000000 Binary files a/reactos/tools/getdate.exe and /dev/null differ diff --git a/reactos/tools/hpp/hpp.c b/reactos/tools/hpp/hpp.c deleted file mode 100644 index 07267e68997..00000000000 --- a/reactos/tools/hpp/hpp.c +++ /dev/null @@ -1,541 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: Header preprocessor - * PURPOSE: Generates header files from other header files - * PROGRAMMER; Timo Kreuzer - * - */ - -#include -#include -#include -#include -#include - -//#define DBG 1 - -#if DBG -#define trace printf -#else -#define trace if (0) printf -#endif - -typedef struct _DEFINE -{ - struct _DEFINE *pNext; - int len; - int val; - char szName[1]; -} DEFINE, *PDEFINE; - -DEFINE *gpDefines = 0; -int iLine; -const char *gpszCurFile; - -char* -convert_path(const char* origpath) -{ - char* newpath; - int i; - - newpath = strdup(origpath); - - i = 0; - while (newpath[i] != 0) - { -#ifdef UNIX_PATHS - if (newpath[i] == '\\') - { - newpath[i] = '/'; - } -#else -#ifdef DOS_PATHS - if (newpath[i] == '/') - { - newpath[i] = '\\'; - } -#endif -#endif - i++; - } - return(newpath); -} - -char* -GetFolder(const char* pszFullPath) -{ - return "."; -} - -void* -LoadFile(const char* pszFileName, size_t* pFileSize) -{ - FILE* file; - void* pFileData = NULL; - int iFileSize; - - trace("Loading file..."); - - file = fopen(pszFileName, "rb"); - if (!file) - { - trace("Could not open file\n"); - return NULL; - } - - fseek(file, 0L, SEEK_END); - iFileSize = ftell(file); - fseek(file, 0L, SEEK_SET); - *pFileSize = iFileSize; - trace("ok. Size is %d\n", iFileSize); - - pFileData = malloc(iFileSize + 1); - - if (pFileData != NULL) - { - if (iFileSize != fread(pFileData, 1, iFileSize, file)) - { - free(pFileData); - pFileData = NULL; - } - } - else - { - trace("Could not allocate memory for file\n"); - } - - fclose(file); - - return pFileData; -} - - -int -error(char *format, ...) -{ - va_list valist; - int res; - va_start(valist, format); - res = vfprintf(stderr, format, valist); - va_end(valist); - return res; -} - -char* -GetNextChar(const char *psz) -{ - while (*psz == ' ' || *psz == '\t') psz++; - return (char*)psz; -} - -char* -GetNextLine(char *pszLine) -{ - /* Walk to the end of the line */ - while (*pszLine != 13 && *pszLine != 10 && *pszLine != 0) pszLine++; - - /* Skip one CR/LF */ - if (pszLine[0] == 13 && pszLine[1] == 10) - pszLine += 2; - else if (pszLine[0] == 13 || pszLine[0] == 10) - pszLine++; - - if (*pszLine == 0) - { - return 0; - } - - return pszLine; -} - -int -strxlen(const char *psz) -{ - int len = 0; - while (isalnum(*psz) || *psz == '_') - { - psz++; - len++; - } - return len; -} - - -void -WriteLine(char *pszLine, FILE *fileOut) -{ - char * pszEnd; - - pszEnd = strchr(pszLine, '\n'); - if (pszEnd) - { - int len = pszEnd - pszLine + 1; - fwrite(pszLine, 1, len, fileOut); - } -} - -int -EvaluateConstant(const char *p, char **pNext) -{ - PDEFINE pDefine; - int len; - - len = strxlen(p); - if (pNext) - *pNext = (char*)p + len; - - /* search for the define in the global list */ - pDefine = gpDefines; - while (pDefine != 0) - { - trace("found a define: %s\n", pDefine->szName); - if (pDefine->len == len) - { - if (strncmp(p, pDefine->szName, len) == 0) - { - return pDefine->val; - } - } - pDefine = pDefine->pNext; - } - return 0; -} - -int -EvaluateExpression(char *pExpression, char **pNext) -{ - char *p, *pstart; - int inv, thisval, val = 0; - - trace("evaluating expression\n"); - - pstart = GetNextChar(pExpression); - if (*pstart != '(') - { - error("Parse error: expected '(' \n"); - return -1; - } - - while (1) - { - /* Get the start of the real expression */ - p = pstart; - if ((p[0] == '&' && p[1] == '&') || - (p[0] == '|' && p[1] == '|')) - { - p++; - } - p = GetNextChar(p + 1); - - /* Check for inversion modifier */ - if (*p == '!') - { - inv = 1; - p = GetNextChar(p + 1); - } - else - inv = 0; - - /* Beginning of a new subexpression? */ - if (*p == '(') - { - /* Evaluate subexpression */ - thisval = EvaluateExpression(p, &p); - } - else if (isdigit(*p)) - { - thisval = strtod(p, &p); - trace("found a num: %d\n", thisval); - } - else if (isalpha(*p) || *p == '_') - { - thisval = EvaluateConstant(p, &p); - } - else - { - error("..Parse error, expected '(' or constant in line %d\n", - iLine); - return -1; - } - - if (inv) - thisval = !thisval; - - /* Check how to combine the current value */ - if (pstart[0] == '(') - { - val = thisval; - } - else if (pstart[0] == '&' && pstart[1] == '&') - { - val = val && thisval; - } - else if (pstart[0] == '&' && pstart[1] != '&') - { - val = val & thisval; - } - else if (pstart[0] == '|' && pstart[1] == '|') - { - trace("found || val = %d, thisval = %d\n", val, thisval); - val = val || thisval; - } - else if (pstart[0] == '|' && pstart[1] != '|') - { - val = val | thisval; - } - else if (pstart[0] == '+') - { - val = val + thisval; - } - else - { - error("+Parse error: expected '(' or operator in Line %d, got %c\n", - iLine, pstart[0]); - return -1; - } - - p = GetNextChar(p); - - /* End of current subexpression? */ - if (*p == ')') - { - if (pNext) - { - *pNext = p + 1; - } - return val; - } - - /* Continue with a new start position */ - pstart = p; - } - - return val; -} - -int -ParseInputFile(const char *pszInFile, FILE *fileOut) -{ - char* pInputData, *pCurrentLine, *p1, *p2; - size_t cbInFileLenth, len; - int iIfLevel, iCopyLevel; - - trace("parsing input file: %s\n", pszInFile); - - /* Set the global file name */ - gpszCurFile = pszInFile; - - /* Load the input file into memory */ - pInputData = LoadFile(pszInFile, &cbInFileLenth); - if (!pInputData) - { - error("Could not load input file %s\n", pszInFile); - return -1; - } - - /* Zero terminate the file */ - pInputData[cbInFileLenth] = 0; - - pCurrentLine = pInputData; - iLine = 1; - iCopyLevel = iIfLevel = 0; - - /* The main processing loop */ - do - { - trace("line %d: ", iLine); - - /* If this is a normal line ... */ - if (pCurrentLine[0] != '$') - { - /* Check if we are to copy this line */ - if (iCopyLevel == iIfLevel) - { - trace("copying\n"); - WriteLine(pCurrentLine, fileOut); - } - else - trace("skipping\n"); - - /* Continue with next line */ - continue; - } - - /* Check for $endif */ - if (strncmp(pCurrentLine, "$endif", 6) == 0) - { - trace("found $endif\n"); - if (iIfLevel <= 0) - { - error("Parse error: $endif without $if in %s:%d\n", pszInFile, iLine); - return -1; - } - if (iCopyLevel == iIfLevel) - { - iCopyLevel--; - } - iIfLevel--; - - /* Continue with next line */ - continue; - } - - /* The rest is only parsed when we are in a true block */ - if (iCopyLevel < iIfLevel) - { - trace("skipping\n"); - - /* Continue with next line */ - continue; - } - - /* Check for $define */ - if (strncmp(pCurrentLine, "$define", 7) == 0) - { - PDEFINE pDefine; - - trace("found $define\n"); - p1 = GetNextChar(pCurrentLine + 7); - if (*p1 != '(') - { - error("Parse error: expected '(' at %s:%d\n", - pszInFile, iLine); - return -1; - } - p1 = GetNextChar(p1 + 1); - len = strxlen(p1); - p2 = p1 + len; - if (*p2 != ')') - { - error("Parse error: expected ')' at %s:%d\n", - pszInFile, iLine); - return -1; - } - - /* Insert the new define into the global list */ - pDefine = malloc(sizeof(DEFINE) + len); - strncpy(pDefine->szName, p1, len); - pDefine->szName[len] = 0; - pDefine->len = len; - pDefine->val = 1; - pDefine->pNext = gpDefines; - gpDefines = pDefine; - } - - /* Check for $if */ - else if (strncmp(pCurrentLine, "$if", 3) == 0) - { - int val; - - trace("found $if\n"); - /* Increase the if-level */ - iIfLevel++; - - /* Get beginning of the expression */ - p1 = GetNextChar(pCurrentLine + 3); - - /* evaluate the expression */ - val = EvaluateExpression(p1, 0); - - if (val) - { - iCopyLevel = iIfLevel; - } - else if (val == -1) - { - /* Parse error */ - return -1; - } - } - - /* Check for $include */ - else if (strncmp(pCurrentLine, "$include", 8) == 0) - { - int ret; - - trace("found $include\n"); - p1 = GetNextChar(pCurrentLine + 8); - if (*p1 != '(') - { - error("Parse error: expected '(' at %s:%d, found '%c'\n", - pszInFile, iLine, *p1); - return -1; - } - p1++; - p2 = strchr(p1, ')'); - *p2 = 0; - - /* Parse the included file */ - ret = ParseInputFile(p1, fileOut); - - /* Restore the global file name */ - gpszCurFile = pszInFile; - - /* Restore the zeroed character */ - *p2 = ')'; - - if (ret == -1) - { - return -1; - } - } - - /* Check for $$ comment */ - else if (strncmp(pCurrentLine, "$$", 2) == 0) - { - trace("$$ ignored\n"); - /* continue with next line */ - continue; - } - - else - { - trace("wot:%s\n", pCurrentLine); - } - - /* Continue with next line */ - } - while (pCurrentLine = GetNextLine(pCurrentLine), - iLine++, - pCurrentLine != 0); - - /* Free the file data */ - free(pInputData); - - trace("Done with file.\n\n"); - - return 0; -} - - -int -main(int argc, char* argv[]) -{ - char *pszInFile, *pszOutFile; - FILE* fileOut; - int ret; - - if (argc != 3) - { - error("Usage: hpp \n"); - exit(1); - } - - pszInFile = convert_path(argv[1]); - pszOutFile = convert_path(argv[2]); - - fileOut = fopen(pszOutFile, "wb"); - if (fileOut == NULL) - { - error("Cannot open output file %s", pszOutFile); - exit(1); - } - - ret = ParseInputFile(pszInFile, fileOut); - - fclose(fileOut); - free(pszInFile); - free(pszOutFile); - - return ret; -} diff --git a/reactos/tools/hpp/hpp.rbuild b/reactos/tools/hpp/hpp.rbuild deleted file mode 100644 index 165dd0c3d11..00000000000 --- a/reactos/tools/hpp/hpp.rbuild +++ /dev/null @@ -1,6 +0,0 @@ - - - - . - hpp.c - diff --git a/reactos/tools/kbdtool/data.c b/reactos/tools/kbdtool/data.c deleted file mode 100644 index 5de3b13d72d..00000000000 --- a/reactos/tools/kbdtool/data.c +++ /dev/null @@ -1,263 +0,0 @@ -/* - * PROJECT: ReactOS Build Tools [Keyboard Layout Compiler] - * LICENSE: BSD - See COPYING.BSD in the top level directory - * FILE: tools/kbdtool/data.c - * PURPOSE: Internal Keyboard (Scancode/Virtual Key) Tables - * PROGRAMMERS: ReactOS Foundation - */ - -/* INCLUDES *******************************************************************/ - -#include "kbdtool.h" - -/* GLOBALS ********************************************************************/ - -/* Table of Virtual Key Names */ -VKNAME VKName[] = -{ - {0x08, "BACK"}, - {0x03, "CANCEL"}, - {0x1b, "ESCAPE"}, - {0x0d, "RETURN"}, - {0x20, "SPACE"}, - {0x6e, "DECIMAL"}, - {0xba, "OEM_1"}, - {0xbb, "OEM_PLUS"}, - {0xbc, "OEM_COMMA"}, - {0xbd, "OEM_MINUS"}, - {0xbe, "OEM_PERIOD"}, - {0xbf, "OEM_2"}, - {0xc0, "OEM_3"}, - {0xdb, "OEM_4"}, - {0xdc, "OEM_5"}, - {0xdd, "OEM_6"}, - {0xde, "OEM_7"}, - {0xdf, "OEM_8"}, - {0xe2, "OEM_102"}, - {0xc1, "ABNT_C1"}, - {0xc2, "ABNT_C2"}, - {0x10, "SHIFT"}, - {0xa0, "LSHIFT"}, - {0xa1, "RSHIFT"}, - {0x12, "MENU"}, - {0xa4, "LMENU"}, - {0xa5, "RMENU"}, - {0x11, "CONTROL"}, - {0xa2, "LCONTROL"}, - {0xa3, "RCONTROL"}, - {0x6c, "SEPARATOR"}, - {0xe4, "ICO_00"}, - {0x2e, "DELETE"}, - {0x2d, "INSERT"}, - {0xe5, "GROUPSHIFT"}, - {0xe6, "RGROUPSHIFT"} -}; -/* Table of modifiers */ -VKNAME Modifiers[] = -{ - {0x10, "KBDSHIFT"}, - {0x11, "KBDCTRL"}, - {0x12, "KBDALT"} -}; - -/* Table of states */ -PCHAR StateLabel[] = -{ - "", - "Shift", - " Ctrl", - "S+Ctrl", - " Alt", - "Shift+Alt", - " Ctl+Alt", - "S+Ctl+Alt", - " X1 ", - "S+ X1 ", - " C+ X1 ", - "S+C+ X1 ", - " A+X1 ", - "S+ A+X1 ", - " C+A+X1 ", - "S+C+A+X1 ", - " X2 ", - "S+ X2 ", - " C+ X2 ", - "S+C+ X2 ", - " A+ X2 ", - "S+ A+ X2 ", - " C+A+ X2 ", - "S+C+A+ X2 ", - " X1+X2 ", - "S+ X1+X2 ", - " C+ X1+X2 ", - "S+C+ X1+X2 ", - " A+X1+X2 ", - "S+ A+X1+X2 ", - " C+A+X1+X2 ", - "S+C+A+X1+X2 ", - " X3", - "S+ X3", - " C+ X3", - "S+C+ X3", - " A+ X3", - "S+ A+ X3", - " C+A+ X3", - "S+C+A+ X3", - " X1+ X3", - "S+ X1+ X3", - " C+ X1+ X3", - "S+C+ X1+ X3", - " A+X1+ X3", - "S+ A+X1+ X3", - " C+A+X1+ X3", - "S+C+A+X1+ X3", - " X2+X3", - "S+ X2+X3", - " C+ X2+X3", - "S+C+ X2+X3", - " A+ X2+X3", - "S+ A+ X2+X3", - " C+A+ X2+X3", - "S+C+A+ X2+X3", - " X1+X2+X3", - "S+ X1+X2+X3", - " C+ X1+X2+X3", - "S+C+ X1+X2+X3", - " A+X1+X2+X3", - "S+ A+X1+X2+X3", - " C+A+X1+X2+X3", - "S+C+A+X1+X2+X3", - "unexpected", - "unexpected" -}; - -/* Table of Cap States */ -PCHAR CapState[] = -{ - "0", - "CAPLOK", - "SGCAPS", - "CAPLOCK | SGCAPS", - "CAPLOKALTGR", - "CAPLOK | CAPLOKALTGR" -}; - -/* ISO 110-key Keyboard Scancode to Virtual Key Conversion Table */ -SCVK ScVk[] = -{ - {0x02, '1', NULL, FALSE}, - {0x03, '2', NULL, FALSE}, - {0x04, '3', NULL, FALSE}, - {0x05, '4', NULL, FALSE}, - {0x06, '5', NULL, FALSE}, - {0x07, '6', NULL, FALSE}, - {0x08, '7', NULL, FALSE}, - {0x09, '8', NULL, FALSE}, - {0x0a, '9', NULL, FALSE}, - {0x0b, '0', NULL, FALSE}, - {0x0c, 0xbd, NULL, FALSE}, - {0x0d, 0xbb, NULL, FALSE}, - {0x10, 'Q', NULL, FALSE}, - {0x11, 'W', NULL, FALSE}, - {0x12, 'E', NULL, FALSE}, - {0x13, 'R', NULL, FALSE}, - {0x14, 'T', NULL, FALSE}, - {0x15, 'Y', NULL, FALSE}, - {0x16, 'U', NULL, FALSE}, - {0x17, 'I', NULL, FALSE}, - {0x18, 'O', NULL, FALSE}, - {0x19, 'P', NULL, FALSE}, - {0x1a, 0xdb, NULL, FALSE}, - {0x1b, 0xdd, NULL, FALSE}, - {0x1e, 'A', NULL, FALSE}, - {0x1f, 'S', NULL, FALSE}, - {0x20, 'D', NULL, FALSE}, - {0x21, 'F', NULL, FALSE}, - {0x22, 'G', NULL, FALSE}, - {0x23, 'H', NULL, FALSE}, - {0x24, 'J', NULL, FALSE}, - {0x25, 'K', NULL, FALSE}, - {0x26, 'L', NULL, FALSE}, - {0x27, 0xba, NULL, FALSE}, - {0x28, 0xde, NULL, FALSE}, - {0x29, 0xc0, NULL, FALSE}, - {0x2b, 0xdc, NULL, FALSE}, - {0x2c, 'Z', NULL, FALSE}, - {0x2d, 'X', NULL, FALSE}, - {0x2e, 'C', NULL, FALSE}, - {0x2f, 'V', NULL, FALSE}, - {0x30, 'B', NULL, FALSE}, - {0x31, 'N', NULL, FALSE}, - {0x32, 'M', NULL, FALSE}, - {0x33, 0xbc, NULL, FALSE}, - {0x34, 0xbe, NULL, FALSE}, - {0x35, 0xbf, NULL, FALSE}, - {0x53, 0x6e, NULL, FALSE}, - {0x56, 0xe2, NULL, FALSE}, - {0x73, 0xc1, NULL, FALSE}, - {0x7e, 0xc2, NULL, FALSE}, - {0xe010, 0xb1, "Speedracer: Previous Track", FALSE}, - {0xe019, 0xb0, "Speedracer: Next Track", FALSE}, - {0xe01d, 0xa3, "RControl", FALSE}, - {0xe020, 0xad, "Speedracer: Volume Mute", FALSE}, - {0xe021, 0xb7, "Speedracer: Launch App 2", FALSE}, - {0xe022, 0xb3, "Speedracer: Media Play/Pause", FALSE}, - {0xe024, 0xb2, "Speedracer: Media Stop", FALSE}, - {0xe02e, 0xae, "Speedracer: Volume Up", FALSE}, - {0xe030, 0xaf, "Speedracer: Volume Down", FALSE}, - {0xe032, 0xac, "Speedracer: Browser Home", FALSE}, - {0xe035, 0x6f, "Numpad Divide", FALSE}, - {0xe037, 0x2c, "Snapshot", FALSE}, - {0xe038, 0xa5, "RMenu", FALSE}, - {0xe047, 0x24, "Home", FALSE}, - {0xe048, 0x26, "Up", FALSE}, - {0xe049, 0x21, "Prior", FALSE}, - {0xe04b, 0x25, "Left", FALSE}, - {0xe04d, 0x27, "Right", FALSE}, - {0xe04f, 0x23, "End", FALSE}, - {0xe050, 0x28, "Down", FALSE}, - {0xe051, 0x22, "Next", FALSE}, - {0xe052, 0x2d, "Insert", FALSE}, - {0xe053, 0x2e, "Delete", FALSE}, - {0xe05b, 0x5b, "Left Win", FALSE}, - {0xe05c, 0x5c, "Right Win", FALSE}, - {0xe05d, 0x5d, "Application", FALSE}, - {0xe05e, 0xff, "Power", FALSE}, - {0xe05f, 0x5f, "Speedracer: Sleep", FALSE}, - {0xe060, 0xff, "BAD SCANCODE", FALSE}, - {0xe061, 0xff, "BAD SCANCODE", FALSE}, - {0xe065, 0xaa, "Speedracer: Browser Search", FALSE}, - {0xe066, 0xab, "Speedracer: Browser Favorites", FALSE}, - {0xe067, 0xa8, "Speedracer: Browser Refresh", FALSE}, - {0xe068, 0xa9, "Speedracer: Browser Stop", FALSE}, - {0xe069, 0xa7, "Speedracer: Browser Foward", FALSE}, - {0xe06a, 0xa6, "Speedracer: Browser Back", FALSE}, - {0xe06b, 0xb6, "Speedracer: Launch App 1", FALSE}, - {0xe06c, 0xb4, "Speedracer: Launch Mail", FALSE}, - {0xe06d, 0xb5, "Speedracer: Launch Media Selector", FALSE}, - {0x53, 0x6e, NULL, FALSE}, - {0x0e, 0x08, NULL, FALSE}, - {0x01, 0x1b, NULL, FALSE}, - {0xe01c, 0x0d, "Numpad Enter", FALSE}, - {0x1c, 0x0d, NULL, FALSE}, - {0x39, 0x20, NULL, FALSE}, - {0xe046, 0x03, "Break (Ctrl + Pause)", FALSE}, - {0xFFFF, 0x00, NULL, FALSE}, - {0xFFFF, 0x00, NULL, FALSE}, - {0xFFFF, 0x00, NULL, FALSE}, - {0xFFFF, 0x00, NULL, FALSE}, - {0xFFFF, 0x00, NULL, FALSE}, - {0xFFFF, 0x00, NULL, FALSE}, - {0xFFFF, 0x00, NULL, FALSE}, - {0xFFFF, 0x00, NULL, FALSE}, - {0xFFFF, 0x00, NULL, FALSE}, - {0xFFFF, 0x00, NULL, FALSE}, - {0xFFFF, 0x00, NULL, FALSE}, - {0xFFFF, 0x00, NULL, FALSE}, - {0xFFFF, 0x00, NULL, FALSE}, - {0xFFFF, 0x00, NULL, FALSE} -}; - -/* FUNCTIONS ******************************************************************/ - -/* EOF */ diff --git a/reactos/tools/kbdtool/kbdtool.h b/reactos/tools/kbdtool/kbdtool.h deleted file mode 100644 index 5d36972fb64..00000000000 --- a/reactos/tools/kbdtool/kbdtool.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 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 - -#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/reactos/tools/kbdtool/kbdtool.rbuild b/reactos/tools/kbdtool/kbdtool.rbuild deleted file mode 100644 index ac715ddac17..00000000000 --- a/reactos/tools/kbdtool/kbdtool.rbuild +++ /dev/null @@ -1,8 +0,0 @@ - - - - data.c - main.c - output.c - parser.c - \ No newline at end of file diff --git a/reactos/tools/kbdtool/main.c b/reactos/tools/kbdtool/main.c deleted file mode 100644 index 68fcf034648..00000000000 --- a/reactos/tools/kbdtool/main.c +++ /dev/null @@ -1,242 +0,0 @@ -/* - * PROJECT: ReactOS Build Tools [Keyboard Layout Compiler] - * LICENSE: BSD - See COPYING.BSD in the top level directory - * FILE: tools/kbdtool/main.c - * PURPOSE: Main Logic Loop - * PROGRAMMERS: ReactOS Foundation - */ - -/* INCLUDES *******************************************************************/ - -#include "kbdtool.h" - -/* GLOBALS ********************************************************************/ - -/* Internal tool data */ -ULONG gVersion = 3; -ULONG gSubVersion = 40; - -/* Input file */ -PCHAR gpszFileName; -FILE* gfpInput; - -/* Command-line parameters */ -BOOLEAN UnicodeFile, Verbose, NoLogo, FallbackDriver, SanityCheck, SourceOnly; -ULONG BuildType; - -/* FUNCTIONS ******************************************************************/ - -VOID -PrintUsage(VOID) -{ - /* This is who we are */ - printf("\nKbdTool v%d.%02d - convert keyboard text file to C file or a keyboard layout DLL\n\n", - gVersion, gSubVersion); - - /* This is what we do */ - printf("Usage: KbdTool [-v] [-n] [-w] [-k] [-n] [-u|a] [-i|x|m|o|s] FILE\n\n"); - printf("\t[-?] display this message\n"); - printf("\t[-n] no logo or normal build information displayed\n\n"); - printf("\t[-a] Uses non-Unicode source files (default)\n"); - printf("\t[-u] Uses Unicode source files\n\n"); - printf("\t[-v] Verbose diagnostics (and warnings, with -w)\n"); - printf("\t[-w] display extended Warnings\n\n"); - printf("\t[-x] Builds for x86 (default)\n"); - printf("\t[-i] Builds for IA64\n"); - printf("\t[-m] Builds for AMD64\n"); - printf("\t[-o] Builds for WOW64\n"); - printf("\t[-s] Generate Source files (no build)\n\n"); - printf("\tFILE The source keyboard file (required)\n\n"); - - /* Extra hints */ - printf("\t-u/-a are mutually exclusive; kbdutool will use the last one if you specify more than one.\n"); - printf("\t-i/-x/-m/-o-s will exhibit the same behavior when than one of them is specified.\n\n"); - - /* Quit */ - exit(1); - printf("should not be here"); -} - -INT -main(INT argc, - PCHAR* argv) -{ - ULONG i, ErrorCode, FailureCode; - CHAR Option; - PCHAR OpenFlags; - CHAR BuildOptions[16] = {0}; - - /* Loop for parameter */ - for (i = 1; i < argc; ++i) - { - if (argv[i][0] != '/' && argv[i][0] != '-') - break; - - if (argv[i][1] && !argv[i][2]) - Option = argv[i][1]; - else - Option = 0; - - /* Check supported options */ - switch (Option) - { - /* ASCII File */ - case 'A': - case 'a': - UnicodeFile = 0; - break; - - /* UNICODE File */ - case 'U': - case 'u': - UnicodeFile = 1; - break; - - /* Verbose */ - case 'V': - case 'v': - Verbose = 1; - break; - - /* No logo */ - case 'N': - case 'n': - NoLogo = 1; - break; - - /* Fallback driver */ - case 'K': - case 'k': - FallbackDriver = 1; - break; - - /* Sanity Check */ - case 'W': - case 'w': - SanityCheck = 1; - break; - - /* Itanium */ - case 'I': - case 'i': - BuildType = 1; - break; - - /* X86 */ - case 'X': - case 'x': - BuildType = 0; - break; - - /* AMD64 */ - case 'M': - case 'm': - BuildType = 2; - break; - - /* WOW64 */ - case 'O': - case 'o': - BuildType = 3; - break; - - /* Source only */ - case 'S': - case 's': - SourceOnly = 1; - break; - - default: - /* If you got here, the options are invalid or missing */ - PrintUsage(); - break; - } - } - - /* Do we have no options? */ - if (i == argc) PrintUsage(); - - /* Should we announce ourselves? */ - if (!NoLogo) - { - /* This is who we are */ - printf("\nKbdTool v%d.%02d - convert keyboard text file to C file or a keyboard layout DLL\n\n", - gVersion, gSubVersion); - } - - /* Save the file name */ - gpszFileName = argv[i]; - - /* Open either as binary or text */ - OpenFlags = "rb"; - if (!UnicodeFile) OpenFlags = "rt"; - - /* Open a handle to the file */ - gfpInput = fopen(gpszFileName, OpenFlags); - if (!gfpInput) - { - /* Couldn't open it */ - printf("Unable to open '%s' for read.\n", gpszFileName); - exit(1); - } - - /* Should we print out what we're doing? */ - if (!NoLogo) - { - /* Are we only building the source files? */ - if (SourceOnly) - { - /* Then there's no target architecture */ - strcpy(BuildOptions, "source files"); - } - else - { - /* Take a look at the target architecture*/ - switch (BuildType) - { - /* Print the appropriate message depending on what was chosen */ - case 0: - strcpy(BuildOptions, "i386/x86"); - break; - case 1: - strcpy(BuildOptions, "ia64"); - break; - case 2: - strcpy(BuildOptions, "amd64/x64"); - break; - case 3: - strcpy(BuildOptions, "wow64"); - break; - default: - strcpy(BuildOptions, "unknown purpose"); - break; - } - } - - /* Now inform the user */ - printf("Compiling layout information from '%s' for %s.\n", gpszFileName, BuildOptions); - } - - /* Now parse the keywords */ - FailureCode = DoParsing(); - - /* Should we build? */ - if (!(SourceOnly) && !(FallbackDriver)) ErrorCode = 0;//DoBuild(); - - /* Did everything work? */ - if (FailureCode == 0) - { - /* Tell the user, if he cares */ - if (!NoLogo) printf("All tasks completed successfully.\n"); - } - else - { - /* Print the failure code */ - printf("\n %13d\n", FailureCode); - } - - /* Return the error code */ - return ErrorCode; -} - -/* EOF */ diff --git a/reactos/tools/kbdtool/output.c b/reactos/tools/kbdtool/output.c deleted file mode 100644 index 8f7eaa9681b..00000000000 --- a/reactos/tools/kbdtool/output.c +++ /dev/null @@ -1,1322 +0,0 @@ -/* - * PROJECT: ReactOS Build Tools [Keyboard Layout Compiler] - * LICENSE: BSD - See COPYING.BSD in the top level directory - * FILE: tools/kbdtool/output.c - * PURPOSE: Output Logic (Source Builder) - * PROGRAMMERS: ReactOS Foundation - */ - -/* INCLUDES *******************************************************************/ - -#include "kbdtool.h" - -/* GLOBALS ********************************************************************/ - -ULONG gStringIdForDescriptions = 1000; -ULONG gStringIdForLanguageNames = 1100; -ULONG gStringIdForLocaleName = 1200; -time_t Clock; -struct tm *Now; -CHAR gCharName[32]; - -/* FUNCTIONS ******************************************************************/ - -PCHAR -WChName(IN ULONG Char, - IN BOOLEAN AddZero) -{ - PCHAR p; - - /* Check for invalid character */ - if (Char == -1) - { - /* No name */ - strcpy(gCharName, "WCH_NONE"); - } - else if ((Char > 31) && (Char < 128)) - { - /* Use our global buffer */ - p = gCharName; - - /* Add the first quote unless this was a zero-string */ - if (!AddZero) *p++ = '\''; - - /* Now replace any other quote or comment character with a slash */ - if ((Char == '\"') || (Char == '\'') || (Char == '\\')) *p++ = '\\'; - - /* Now plug in the character */ - *p++ = Char; - - /* And add the terminating quote, unless this was a zero-string */ - if (!AddZero) *p++ = '\''; - - /* Terminate the buffer */ - *p = '\0'; - } - else - { - /* Handle special cases */ - if (Char == '\b') - { - /* Bell */ - strcpy(gCharName, "'\\b'"); - } - else if (Char == '\n') - { - /* New line */ - strcpy(gCharName, "'\\n'"); - } - else if (Char == '\r') - { - /* Return */ - strcpy(gCharName, "'\\r'"); - } - else if (!AddZero) - { - /* Char value, in hex */ - sprintf(gCharName, "0x%04x", Char); - } - else - { - /* Char value, C-style */ - sprintf(gCharName, "\\x%04x", Char); - } - } - - /* Return the name */ - return gCharName; -} - -VOID -PrintNameTable(FILE* FileHandle, - PKEYNAME KeyName, - BOOL DeadKey) -{ - CHAR CharBuffer[255]; - PKEYNAME NextName; - PCHAR Name, Buffer; - ULONG i; - - /* Loop all key names */ - while (KeyName) - { - /* Go to the next key name */ - NextName = KeyName->Next; - - /* Remember the name and our buffer address */ - Name = KeyName->Name; - Buffer = CharBuffer; - - /* Check if it's an IDS name */ - if (strncmp(Name, "IDS_", 4)) - { - /* No, so start parsing it. First, handle initial quote */ - if (*Name != '\"') *Buffer++ = '\"'; - - /* Next, parse the name */ - while (*Name) - { - /* Check if this is a C-style hex string */ - if ((*Name != '\\') || ((*(Name + 1) != 'x') && (*(Name + 1) != 'X'))) - { - /* It's not, so just copy straight into our buffer */ - *Buffer++ = *Name++; - } - else - { - /* Continue scanning as long as this is a C-style hex string */ - while ((*Name == '\\') && ((*(Name + 1) == 'x') || (*(Name + 1) == 'X'))) - { - /* Copy 6 characters */ - for (i = 0; (*Name) && (i < 6); i++) *Buffer++ = *Name++; - } - - /* Check if we still have something at the end */ - if (*Name) - { - /* Terminate our buffer */ - *Buffer++ = '\"'; - *Buffer++ = ' '; - *Buffer++ = 'L'; - *Buffer++ = '\"'; - } - } - } - - /* Check for terminating quote */ - if (*(Buffer - 1) != '\"') *Buffer++ = '\"'; - - /* Terminate the buffer */ - *Buffer++ = '\0'; - } - else - { - /* Not yet supported */ - printf("IDS Entries not yet handled!\n"); - exit(1); - } - - /* Is this a dead key? */ - if (DeadKey) - { - /* Not yet handled */ - printf("Dead keys not yet handled\n"); - exit(1); - } - else - { - /* Print the entry */ - fprintf(FileHandle, " 0x%02x, L%s,\n", KeyName->Code, CharBuffer); - } - - /* Cleanup allocation */ - free(KeyName->Name); - free(KeyName); - - /* Move on */ - KeyName = NextName; - } - - /* Is this a dead key? */ - if (DeadKey) - { - /* Not yet handled */ - printf("Dead keys not yet handled\n"); - exit(1); - } - else - { - /* Terminate the table */ - fprintf(FileHandle, " 0 , NULL\n"); - } -} - -BOOLEAN -kbd_h(IN PLAYOUT Layout) -{ - CHAR OutputFile[13]; - FILE *FileHandle; - ULONG i; - CHAR UndefChar; - USHORT SubCode; - - /* Build the keyboard name */ - strcpy(OutputFile, gKBDName); - strcat(OutputFile, ".H"); - - /* Open it */ - FileHandle = fopen(OutputFile, "wt"); - if (!FileHandle) - { - /* Fail */ - printf(" %12s : can't open for write.\n", OutputFile); - return FALSE; - } - - /* Print the module header */ - fprintf(FileHandle, - "/****************************** Module Header ******************************\\\n" - "* Module Name: %s\n*\n* keyboard layout header\n" - "*\n" - "* Copyright (c) 2009, ReactOS Foundation\n" - "*\n" - "* Various defines for use by keyboard input code.\n*\n* History:\n" - "*\n" - "* created by KBDTOOL v%d.%02d %s*\n" - "\\***************************************************************************/\n\n", - OutputFile, - gVersion, - gSubVersion, - asctime(Now)); - - /* Print out the includes and defines */ - fprintf(FileHandle, - "/*\n" - " * kbd type should be controlled by cl command-line argument\n" - " *\\n" - "#define KBD_TYPE 4\n\n" - "/*\n" - "* Include the basis of all keyboard table values\n" - "*/\n" - "#include \"kbd.h\"\n"); - - /* Now print out the virtual key conversion table */ - fprintf(FileHandle, - "/***************************************************************************\\\n" - "* The table below defines the virtual keys for various keyboard types where\n" - "* the keyboard differ from the US keyboard.\n" - "*\n" - "* _EQ() : all keyboard types have the same virtual key for this scancode\n" - "* _NE() : different virtual keys for this scancode, depending on kbd type\n" - "*\n" - "* +------+ +----------+----------+----------+----------+----------+----------+\n" - "* | Scan | | kbd | kbd | kbd | kbd | kbd | kbd |\n" - "* | code | | type 1 | type 2 | type 3 | type 4 | type 5 | type 6 |\n" - "\\****+-------+_+----------+----------+----------+----------+----------+----------+*/\n\n"); - - /* Loop all keys */ - for (i = 0; i < 110; i++) - { - /* Check if we processed this key */ - if (Layout->Entry[i].Processed) - { - /* Check if it redefined a virtual key */ - if (Layout->Entry[i].VirtualKey != Layout->Entry[i].OriginalVirtualKey) - { - /* Do we have a subcode? */ - SubCode = Layout->Entry[i].ScanCode & 0xFF00; - if (SubCode) - { - /* Which kind is it? */ - if (SubCode == 0xE000) - { - /* Extended 0 */ - UndefChar = 'X'; - } - else - { - /* Illegal */ - if (SubCode != 0xE100) - { - /* Unrecognized */ - printf("Weird scancode value %04x: expected xx, E0xx, or E1xx\n", SubCode); - exit(1); - } - - /* Extended 1 */ - UndefChar = 'Y'; - } - } - else - { - /* Normal key */ - UndefChar = 'T'; - } - - /* Print out the virtual key redefinition */ - fprintf(FileHandle, - "#undef %c%02X\n#define %c%02X _EQ(%43s%23s\n", - UndefChar, - Layout->Entry[i].ScanCode, - UndefChar, - Layout->Entry[i].ScanCode, - getVKName(Layout->Entry[i].VirtualKey, 0), - ")"); - } - } - } - - /* Cleanup and close */ - fprintf(FileHandle,"\n"); - fclose(FileHandle); - - /* We made it */ - return TRUE; -} - -BOOLEAN -kbd_rc(IN PKEYNAME DescriptionData, - IN PKEYNAME LanguageData) -{ - CHAR OutputFile[13]; - CHAR InternalName[13]; - CHAR TimeBuffer[5]; - FILE *FileHandle; - ULONG Length; - PCHAR p; - PKEYNAME NextDescription, NextLanguage; - - /* Build the keyboard name and internal name */ - strcpy(OutputFile, gKBDName); - strcat(OutputFile, ".RC"); - strcpy(InternalName, gKBDName); - for (p = InternalName; *p; p++) *p = tolower(*p); - - /* Open it */ - FileHandle = fopen(OutputFile, "wb"); - if (!FileHandle) - { - /* Fail */ - printf(" %12s : can't open for write.\n", OutputFile); - return FALSE; - } - - /* Check if we have copyright */ - Length = strlen(gCopyright); - if (!Length) - { - /* Set time string */ - strftime(TimeBuffer, 5, "%Y", Now); - - /* Add copyright character */ - strcpy(gCopyright, "(C)"); - - /* Add the year */ - strcat(gCopyright, TimeBuffer); - - /* Add blank company */ - strcat(gCopyright, " "); - } - - /* Write the resource file header */ - fprintf(FileHandle, - "#include \"winver.h\"\r\n" - "1 VERSIONINFO\r\n" - " FILEVERSION 1,0,%d,%d\r\n" - " PRODUCTVERSION 1,0,%d,%d\r\n" - " FILEFLAGSMASK 0x3fL\r\n" - " FILEFLAGS 0x0L\r\n" - "FILEOS 0x40004L\r\n" - " FILETYPE VFT_DLL\r\n" - " FILESUBTYPE VFT2_DRV_KEYBOARD\r\n" - "BEGIN\r\n" - " BLOCK \"StringFileInfo\"\r\n" - " BEGIN\r\n" - " BLOCK \"000004B0\"\r\n" - " BEGIN\r\n" - " VALUE \"CompanyName\", \"%s\\0\"\r\n" - " VALUE \"FileDescription\", \"%s Keyboard Layout\\0\"\r\n" - " VALUE \"FileVersion\", \"1, 0, %d, %d\\0\"\r\n", - gVersion, - gSubVersion, - gVersion, - gSubVersion, - gCompany, - gDescription, - gVersion, - gSubVersion); - - /* Continue writing it */ - fprintf(FileHandle, - " VALUE \"InternalName\", \"%s (%d.%d)\\0\"\r\n" - " VALUE \"ProductName\",\"%s\\0\"\r\n" - " VALUE \"Release Information\",\"%s\\0\"\r\n" - " VALUE \"LegalCopyright\", \"%s\\0\"\r\n" - " VALUE \"OriginalFilename\",\"%s\\0\"\r\n" - " VALUE \"ProductVersion\", \"1, 0, %d, %d\\0\"\r\n" - " END\r\n" - " END\r\n" - " BLOCK \"VarFileInfo\"\r\n" - " BEGIN\r\n" - " VALUE \"Translation\", 0x0000, 0x04B0\r\n" - " END\r\n" - "END\r\n", - InternalName, - gVersion, - gSubVersion, - "Created by ReactOS KbdTool", - "Created by ReactOS KbdTool", - gCopyright, - InternalName, - gVersion, - gSubVersion); - - /* Now check if we have a locale name */ - Length = strlen(gLocaleName); - if (Length) - { - /* Write the stringtable header */ - fprintf(FileHandle, - "\r\nSTRINGTABLE DISCARDABLE\r\nLANGUAGE %d, %d\r\n", - 9, - 1); - fprintf(FileHandle, "BEGIN\r\n"); - - /* Language or locale? */ - if (strchr(gLocaleName, '\"')) - { - /* Write the language name */ - fprintf(FileHandle, " %d %s\r\n", gStringIdForLanguageNames, gLocaleName); - } - else - { - /* Write the locale name */ - fprintf(FileHandle, " %d \"%s\"\r\n", gStringIdForLocaleName, gLocaleName); - } - - /* Terminate the entry */ - fprintf(FileHandle, "END\r\n\r\n"); - } - - /* Check for description information */ - while (DescriptionData) - { - /* Remember the next pointer */ - NextDescription = DescriptionData->Next; - - /* Write the header */ - fprintf(FileHandle, - "\r\nSTRINGTABLE DISCARDABLE\r\nLANGUAGE %d, %d\r\n", - DescriptionData->Code & 0x3FF, - DescriptionData->Code >> 10); - fprintf(FileHandle, "BEGIN\r\n"); - - /* Quoted string or not? */ - if (strchr(DescriptionData->Name, '\"')) - { - /* Write the description name */ - fprintf(FileHandle, " %d %s\r\n", gStringIdForDescriptions, DescriptionData->Name); - } - else - { - /* Write the description name */ - fprintf(FileHandle, " %d \"%s\"\r\n", gStringIdForDescriptions, DescriptionData->Name); - } - - /* Terminate the entry */ - fprintf(FileHandle, "END\r\n\r\n"); - - /* Free the allocation */ - free(DescriptionData->Name); - free(DescriptionData); - - /* Move to the next entry */ - DescriptionData = NextDescription; - } - - /* Check for language information */ - while (LanguageData) - { - /* Remember the next pointer */ - NextLanguage = LanguageData->Next; - - /* Write the header */ - fprintf(FileHandle, - "\r\nSTRINGTABLE DISCARDABLE\r\nLANGUAGE %d, %d\r\n", - LanguageData->Code & 0x3FF, - LanguageData->Code >> 10); - fprintf(FileHandle, "BEGIN\r\n"); - - /* Quoted string or not? */ - if (strchr(LanguageData->Name, '\"')) - { - /* Write the language name */ - fprintf(FileHandle, " %d %s\r\n", gStringIdForLanguageNames, LanguageData->Name); - } - else - { - /* Write the language name */ - fprintf(FileHandle, " %d \"%s\"\r\n", gStringIdForLanguageNames, LanguageData->Name); - } - - /* Terminate the entry */ - fprintf(FileHandle, "END\r\n\r\n"); - - /* Free the allocation */ - free(LanguageData->Name); - free(LanguageData); - - /* Move to the next entry */ - LanguageData = NextLanguage; - } - - /* We're done! */ - fclose(FileHandle); - return TRUE; -} - -BOOLEAN -kbd_def(VOID) -{ - CHAR OutputFile[13]; - FILE *FileHandle; - - /* Build the keyboard name and internal name */ - strcpy(OutputFile, gKBDName); - strcat(OutputFile, ".DEF"); - - /* Open it */ - FileHandle = fopen(OutputFile, "wt"); - if (!FileHandle) - { - /* Fail */ - printf(" %12s : can't open for write.\n", OutputFile); - return FALSE; - } - - /* Write the file exports */ - fprintf(FileHandle, - "LIBRARY %s\n\n" - "EXPORTS\n" - " KbdLayerDescriptor @1\n", - gKBDName); - - /* Clean up */ - fclose(FileHandle); - return TRUE; -} - -BOOLEAN -kbd_c(IN ULONG StateCount, - IN PULONG ShiftStates, - IN PVOID AttributeData, - IN PLAYOUT Layout, - IN PVOID DeadKeyData, - IN PVOID LigatureData, - IN PKEYNAME KeyNameData, - IN PKEYNAME KeyNameExtData, - IN PKEYNAME KeyNameDeadData) -{ - CHAR OutputFile[13]; - CHAR KeyNameBuffer[50]; - CHAR LineBuffer[256]; - BOOLEAN NeedPlus; - FILE *FileHandle; - ULONG States[8]; - ULONG i, j, k; - ULONG HighestState; - PVKNAME Entry; - PCHAR p; - - /* Build the keyboard name and internal name */ - strcpy(OutputFile, gKBDName); - strcat(OutputFile, ".C"); - - /* Open it */ - FileHandle = fopen(OutputFile, "wt"); - if (!FileHandle) - { - /* Fail */ - printf(" %12s : can't open for write.\n", OutputFile); - return FALSE; - } - - /* Print the header */ - fprintf(FileHandle, - "/***************************************************************************\\\n" - "* Module Name: %s\n*\n* keyboard layout\n" - "*\n" - "* Copyright (c) 2009, ReactOS Foundation\n" - "*\n" - "* History:\n" - "* KBDTOOL v%d.%02d - Created %s" - "\\***************************************************************************/\n\n", - OutputFile, - gVersion, - gSubVersion, - asctime(Now)); - - /* What kind of driver is this? */ - if (FallbackDriver) - { - /* Fallback only */ - fprintf(FileHandle, "#include \"precomp.h\"\n"); - } - else - { - /* Add the includes */ - fprintf(FileHandle, - "#include \n" - "#include \"kbd.h\"\n" - "#include \"%s.h\"\n\n", - gKBDName); - } - - /* What kind of driver is this? */ - if (FallbackDriver) - { - /* Only one section */ - fprintf(FileHandle, - "#pragma data_seg(\"%s\")\n#define ALLOC_SECTION_LDATA\n\n", - ".kbdfallback"); - } - else - { - /* Section and attributes depend on architecture */ - fprintf(FileHandle, - "#if defined(_M_IA64)\n" - "#pragma section(\"%s\")\n" - "#define ALLOC_SECTION_LDATA __declspec(allocate(\"%s\"))\n" - "#else\n" - "#pragma data_seg(\"%s\")\n" - "#define ALLOC_SECTION_LDATA\n" - "#endif\n\n", - ".data", - ".data", - ".data"); - } - - /* Scan code to virtual key conversion table header */ - fprintf(FileHandle, - "/***************************************************************************\\\n" - "* ausVK[] - Virtual Scan Code to Virtual Key conversion table\n" - "\\***************************************************************************/\n\n"); - - /* Table begin */ - fprintf(FileHandle, - "static ALLOC_SECTION_LDATA USHORT ausVK[] = {\n" - " T00, T01, T02, T03, T04, T05, T06, T07,\n" - " T08, T09, T0A, T0B, T0C, T0D, T0E, T0F,\n" - " T10, T11, T12, T13, T14, T15, T16, T17,\n" - " T18, T19, T1A, T1B, T1C, T1D, T1E, T1F,\n" - " T20, T21, T22, T23, T24, T25, T26, T27,\n" - " T28, T29, T2A, T2B, T2C, T2D, T2E, T2F,\n" - " T30, T31, T32, T33, T34, T35,\n\n"); - - /* Table continue */ - fprintf(FileHandle, - " /*\n" - " * Right-hand Shift key must have KBDEXT bit set.\n" - " */\n" - " T36 | KBDEXT,\n\n" - " T37 | KBDMULTIVK, // numpad_* + Shift/Alt -> SnapShot\n\n" - " T38, T39, T3A, T3B, T3C, T3D, T3E,\n" - " T3F, T40, T41, T42, T43, T44,\n\n"); - - /* Table continue */ - fprintf(FileHandle, - " /*\n" - " * NumLock Key:\n" - " * KBDEXT - VK_NUMLOCK is an Extended key\n" - " * KBDMULTIVK - VK_NUMLOCK or VK_PAUSE (without or with CTRL)\n" - " */\n" - " T45 | KBDEXT | KBDMULTIVK,\n\n" - " T46 | KBDMULTIVK,\n\n"); - - /* Numpad table */ - fprintf(FileHandle, - " /*\n" - " * Number Pad keys:\n" - " * KBDNUMPAD - digits 0-9 and decimal point.\n" - " * KBDSPECIAL - require special processing by Windows\n" - " */\n" - " T47 | KBDNUMPAD | KBDSPECIAL, // Numpad 7 (Home)\n" - " T48 | KBDNUMPAD | KBDSPECIAL, // Numpad 8 (Up),\n" - " T49 | KBDNUMPAD | KBDSPECIAL, // Numpad 9 (PgUp),\n" - " T4A,\n" - " T4B | KBDNUMPAD | KBDSPECIAL, // Numpad 4 (Left),\n" - " T4C | KBDNUMPAD | KBDSPECIAL, // Numpad 5 (Clear),\n" - " T4D | KBDNUMPAD | KBDSPECIAL, // Numpad 6 (Right),\n" - " T4E,\n" - " T4F | KBDNUMPAD | KBDSPECIAL, // Numpad 1 (End),\n" - " T50 | KBDNUMPAD | KBDSPECIAL, // Numpad 2 (Down),\n" - " T51 | KBDNUMPAD | KBDSPECIAL, // Numpad 3 (PgDn),\n" - " T52 | KBDNUMPAD | KBDSPECIAL, // Numpad 0 (Ins),\n" - " T53 | KBDNUMPAD | KBDSPECIAL, // Numpad . (Del),\n\n"); - - /* Table finish */ - fprintf(FileHandle, - " T54, T55, T56, T57, T58, T59, T5A, T5B,\n" - " T5C, T5D, T5E, T5F, T60, T61, T62, T63,\n" - " T64, T65, T66, T67, T68, T69, T6A, T6B,\n" - " T6C, T6D, T6E, T6F, T70, T71, T72, T73,\n" - " T74, T75, T76, T77, T78, T79, T7A, T7B,\n" - " T7C, T7D, T7E\n\n" - "};\n\n"); - - /* Key name table header */ - fprintf(FileHandle, "static ALLOC_SECTION_LDATA VSC_VK aE0VscToVk[] = {\n"); - - /* Loop 110-key table */ - for (i = 0; i < 110; i++) - { - /* Check for non-extended keys */ - if ((Layout->Entry[i].ScanCode & 0xFF00) == 0xE000) - { - /* Which are valid */ - if (Layout->Entry[i].ScanCode != 0xFF) - { - /* And mapped */ - if (Layout->Entry[i].VirtualKey != 0xFF) - { - /* Output them */ - fprintf(FileHandle, - " { 0x%02X, X%02X | KBDEXT }, // %s\n", - Layout->Entry[i].ScanCode, - Layout->Entry[i].ScanCode, - Layout->Entry[i].Name); - } - } - } - } - - /* Key name table finish */ - fprintf(FileHandle, " { 0, 0 }\n};\n\n"); - - /* Extended key name table header */ - fprintf(FileHandle, "static ALLOC_SECTION_LDATA VSC_VK aE1VscToVk[] = {\n"); - - /* Loop 110-key table */ - for (i = 0; i < 110; i++) - { - /* Check for extended keys */ - if ((Layout->Entry[i].ScanCode & 0xFF00) == 0xE100) - { - /* Which are valid */ - if (Layout->Entry[i].ScanCode != 0xFF) - { - /* And mapped */ - if (Layout->Entry[i].VirtualKey != 0xFF) - { - /* Output them */ - fprintf(FileHandle, - " { 0x%02X, Y%02X | KBDEXT }, // %s\n", - Layout->Entry[i].ScanCode, - Layout->Entry[i].ScanCode, - Layout->Entry[i].Name); - } - } - } - } - - /* Extended key name table finish */ - fprintf(FileHandle, - " { 0x1D, Y1D }, // Pause\n" - " { 0 , 0 }\n};\n\n"); - - /* Modifier table description */ - fprintf(FileHandle, - "/***************************************************************************\\\n" - "* aVkToBits[] - map Virtual Keys to Modifier Bits\n" - "*\n" - "* See kbd.h for a full description.\n" - "*\n" - "* The keyboard has only three shifter keys:\n" - "* SHIFT (L & R) affects alphabnumeric keys,\n" - "* CTRL (L & R) is used to generate control characters\n" - "* ALT (L & R) used for generating characters by number with numpad\n" - "\\***************************************************************************/\n"); - - /* Modifier table header */ - fprintf(FileHandle, "static ALLOC_SECTION_LDATA VK_TO_BIT aVkToBits[] = {\n"); - - /* Loop modifier table */ - i = 0; - Entry = &Modifiers[0]; - while (Entry->VirtualKey) - { - /* Print out entry */ - fprintf(FileHandle, - " { %-12s, %-12s },\n", - getVKName(Entry->VirtualKey, 1), - Entry->Name); - - /* Move to the next one */ - Entry = &Modifiers[++i]; - } - - /* Modifier table finish */ - fprintf(FileHandle, " { 0, 0 }\n};\n\n"); - - /* Modifier conversion table description */ - fprintf(FileHandle, - "/***************************************************************************\\\n" - "* aModification[] - map character modifier bits to modification number\n" - "*\n" - "* See kbd.h for a full description.\n" - "*\n" - "\\***************************************************************************/\n\n"); - - /* Zero out local state data */ - for (i = 0; i < 8; i++) States[i] = -1; - - /* Find the highest set state */ - for (HighestState = 1, i = 0; (i < 8) && (ShiftStates[i] != -1); i++) - { - /* Save all state values */ - States[ShiftStates[i]] = i; - if (ShiftStates[i] > HighestState) HighestState = ShiftStates[i]; - } - - /* Modifier conversion table header */ - fprintf(FileHandle, - "static ALLOC_SECTION_LDATA MODIFIERS CharModifiers = {\n" - " &aVkToBits[0],\n" - " %d,\n" - " {\n" - " // Modification# // Keys Pressed\n" - " // ============= // =============\n", - HighestState); - - /* Loop states */ - for (i = 0; i <= HighestState; i++) - { - /* Check for invalid state */ - if (States[i] == -1) - { - /* Invalid state header */ - fprintf(FileHandle, " SHFT_INVALID, // "); - } - else - { - /* Is this the last one? */ - if (i == HighestState) - { - /* Last state header */ - fprintf(FileHandle, " %d // ", States[i]); - } - else - { - /* Normal state header */ - fprintf(FileHandle, " %d, // ", States[i]); - } - - /* State 1 or higher? */ - if (i >= 1) - { - /* J is the loop variable, K is the double */ - for (NeedPlus = 0, j = 0, k = 1; (1 << j) <= i; j++, k = (1 << j)) - { - /* Do we need to add a plus? */ - if (NeedPlus) - { - /* Add it */ - fprintf(FileHandle, "+"); - NeedPlus = FALSE; - } - - /* Check if it's time to add a modifier */ - if (i & k) - { - /* Get the key state name and copy it into our buffer */ - strcpy(KeyNameBuffer, getVKName(Modifiers[j].VirtualKey, 1)); - - /* Go go the 4th char (past the "KBD") and lower name */ - for (p = &KeyNameBuffer[4]; *p; p++) *p = tolower(*p); - - /* Print it */ - fprintf(FileHandle, "%s", &KeyNameBuffer[3]); - - /* We'll need a plus sign next */ - NeedPlus = TRUE; - } - } - } - - /* Terminate the entry */ - fprintf(FileHandle, "\n"); - } - } - - - /* Modifier conversion table end */ - fprintf(FileHandle," }\n" "};\n\n"); - - /* Shift state translation table description */ - fprintf(FileHandle, - "/***************************************************************************\\\n" - "*\n" - "* aVkToWch2[] - Virtual Key to WCHAR translation for 2 shift states\n" - "* aVkToWch3[] - Virtual Key to WCHAR translation for 3 shift states\n" - "* aVkToWch4[] - Virtual Key to WCHAR translation for 4 shift states\n"); - - /* Check if there's exta shift states */ - for (i = 5; i < HighestState; i++) - { - /* Print out extra information */ - fprintf(FileHandle, - "* aVkToWch%d[] - Virtual Key to WCHAR translation for %d shift states\n", - i, - i); - } - - /* Shift state translation table description continue */ - fprintf(FileHandle, - "*\n" - "* Table attributes: Unordered Scan, null-terminated\n" - "*\n" - "* Search this table for an entry with a matching Virtual Key to find the\n" - "* corresponding unshifted and shifted WCHAR characters.\n" - "*\n" - "* Special values for VirtualKey (column 1)\n" - "* 0xff - dead chars for the previous entry\n" - "* 0 - terminate the list\n" - "*\n" - "* Special values for Attributes (column 2)\n" - "* CAPLOK bit - CAPS-LOCK affect this key like SHIFT\n" - "*\n" - "* Special values for wch[*] (column 3 & 4)\n" - "* WCH_NONE - No character\n" - "* WCH_DEAD - Dead Key (diaresis) or invalid (US keyboard has none)\n" - "* WCH_LGTR - Ligature (generates multiple characters)\n" - "*\n" - "\\***************************************************************************/\n\n"); - - /* Loop all the states */ - for (i = 2; i <= StateCount; i++) - { - /* Check if this something else than state 2 */ - if (i != 2) - { - /* Loop all the scan codes */ - for (j = 0; j < 110; j++) - { - /* Check if this is the state for the entry */ - if (i == Layout->Entry[j].StateCount) break; - } - } - - /* Print the table header */ - fprintf(FileHandle, - "static ALLOC_SECTION_LDATA VK_TO_WCHARS%d aVkToWch%d[] = {\n" - "// | | Shift |", - i, - i); - - /* Print the correct state label */ - for (k = 2; k < i; k++) fprintf(FileHandle, "%-9.9s|", - StateLabel[ShiftStates[k]]); - - /* Print the next separator */ - fprintf(FileHandle, "\n// |=========|=========|"); - - /* Check for extra states and print their separators too */ - for (k = 2; k < i; k++) fprintf(FileHandle, "=========|"); - - /* Finalize the separator header */ - fprintf(FileHandle, "\n"); - - /* Loop all the scan codes */ - for (j = 0; j < 110; j++) - { - /* Check if this is the state for the entry */ - if (i != Layout->Entry[j].StateCount) continue; - - /* Print out the entry for this key */ - fprintf(FileHandle, - " {%-13s,%-7s", - getVKName(Layout->Entry[j].VirtualKey, 1), - CapState[Layout->Entry[j].Cap]); - - /* Initialize the buffer for this line */ - *LineBuffer = '\0'; - - /* Loop states */ - for (k = 0; k < i; k++) - { - /* Check for dead key data */ - if (DeadKeyData) - { - /* Not yet supported */ - printf("Dead key data not supported!\n"); - exit(1); - } - - /* Check if it's a ligature key */ - if (Layout->Entry[j].LigatureCharData[k]) - { - /* Not yet supported */ - printf("Ligature key data not supported!\n"); - exit(1); - } - - /* Print out the WCH_ name */ - fprintf(FileHandle, - ",%-9s", - WChName(Layout->Entry[j].CharData[k], 0)); - - /* If we have something on the line buffer by now, add WCH_NONE */ - if (*LineBuffer != '\0') strcpy(LineBuffer, "WCH_NONE "); - } - - /* Finish the line */ - fprintf(FileHandle, "},\n"); - - /* Do we have any data at all? */ - if (*LineBuffer != '\0') - { - /* Print it, we're done */ - fprintf(FileHandle, "%s},\n", LineBuffer); - continue; - } - - /* Otherwise, we're done, unless this requires SGCAP data */ - if (Layout->Entry[j].Cap != 2) continue; - - /* Not yet supported */ - printf("SGCAP not yet supported!\n"); - exit(1); - } - - /* Did we only have two states? */ - if (i == 2) - { - /* Print out the built-in table */ - fprintf(FileHandle, - " {VK_TAB ,0 ,'\\t' ,'\\t' },\n" - " {VK_ADD ,0 ,'+' ,'+' },\n" - " {VK_DIVIDE ,0 ,'/' ,'/' },\n" - " {VK_MULTIPLY ,0 ,'*' ,'*' },\n" - " {VK_SUBTRACT ,0 ,'-' ,'-' },\n"); - } - - /* Terminate the table */ - fprintf(FileHandle, " {0 ,0 "); - for (k = 0; k < i; k++) fprintf(FileHandle, ",0 "); - - /* Terminate the structure */ - fprintf(FileHandle, "}\n" "};\n\n"); - } - - /* Numpad translation table */ - fprintf(FileHandle, - "// Put this last so that VkKeyScan interprets number characters\n" - "// as coming from the main section of the kbd (aVkToWch2 and\n" - "// aVkToWch5) before considering the numpad (aVkToWch1).\n\n" - "static ALLOC_SECTION_LDATA VK_TO_WCHARS1 aVkToWch1[] = {\n" - " { VK_NUMPAD0 , 0 , '0' },\n" - " { VK_NUMPAD1 , 0 , '1' },\n" - " { VK_NUMPAD2 , 0 , '2' },\n" - " { VK_NUMPAD3 , 0 , '3' },\n" - " { VK_NUMPAD4 , 0 , '4' },\n" - " { VK_NUMPAD5 , 0 , '5' },\n" - " { VK_NUMPAD6 , 0 , '6' },\n" - " { VK_NUMPAD7 , 0 , '7' },\n" - " { VK_NUMPAD8 , 0 , '8' },\n" - " { VK_NUMPAD9 , 0 , '9' },\n" - " { 0 , 0 , '\\0' }\n" - "};\n\n"); - - /* Translation tables header */ - fprintf(FileHandle,"static ALLOC_SECTION_LDATA VK_TO_WCHAR_TABLE aVkToWcharTable[] = {\n"); - - /* Loop states higher than 3 */ - for (i = 3; i <= StateCount; i++) - { - /* Print out the extra tables */ - fprintf(FileHandle, - " { (PVK_TO_WCHARS1)aVkToWch%d, %d, sizeof(aVkToWch%d[0]) },\n", - i, - i, - i); - } - - /* Array of translation tables */ - fprintf(FileHandle, - " { (PVK_TO_WCHARS1)aVkToWch2, 2, sizeof(aVkToWch2[0]) },\n" - " { (PVK_TO_WCHARS1)aVkToWch1, 1, sizeof(aVkToWch1[0]) },\n" - " { NULL, 0, 0 },\n" - "};\n\n"); - - /* Scan code to key name conversion table description */ - fprintf(FileHandle, - "/***************************************************************************\\\n" - "* aKeyNames[], aKeyNamesExt[] - Virtual Scancode to Key Name tables\n" - "*\n" - "* Table attributes: Ordered Scan (by scancode), null-terminated\n" - "*\n" - "* Only the names of Extended, NumPad, Dead and Non-Printable keys are here.\n" - "* (Keys producing printable characters are named by that character)\n" - "\\***************************************************************************/\n\n"); - - /* Check for key name data */ - if (KeyNameData) - { - /* Table header */ - fprintf(FileHandle, "static ALLOC_SECTION_LDATA VSC_LPWSTR aKeyNames[] = {\n"); - - /* Print table */ - PrintNameTable(FileHandle, KeyNameData, FALSE); - - /* Table end */ - fprintf(FileHandle, "};\n\n"); - } - - /* Check for extended key name data */ - if (KeyNameExtData) - { - /* Table header */ - fprintf(FileHandle, "static ALLOC_SECTION_LDATA VSC_LPWSTR aKeyNamesExt[] = {\n"); - - /* Print table */ - PrintNameTable(FileHandle, KeyNameExtData, FALSE); - - /* Table end */ - fprintf(FileHandle, "};\n\n"); - } - - /* Check for dead key name data */ - if (KeyNameDeadData) - { - /* Not yet supported */ - printf("Dead key name data not supported!\n"); - exit(1); - } - - /* Check for dead key data */ - if (DeadKeyData) - { - /* Not yet supported */ - printf("Dead key data not supported!\n"); - exit(1); - } - - /* Check for ligature data */ - if (LigatureData) - { - /* Not yet supported */ - printf("Ligature key data not supported!\n"); - exit(1); - } - - /* Main keyboard table descriptor type */ - fprintf(FileHandle, "static "); - - /* FIXME? */ - - /* Main keyboard table descriptor header */ - fprintf(FileHandle, - "ALLOC_SECTION_LDATA KBDTABLES KbdTables%s = {\n" - " /*\n" - " * Modifier keys\n" - " */\n" - " &CharModifiers,\n\n" - " /*\n" - " * Characters tables\n" - " */\n" - " aVkToWcharTable,\n\n" - " /*\n" - " * Diacritics\n" - " */\n", - FallbackDriver ? "Fallback" : "" ); - - /* Descriptor dead key data section */ - if (DeadKeyData) - { - fprintf(FileHandle, " aDeadKey,\n\n"); - } - else - { - fprintf(FileHandle, " NULL,\n\n"); - } - - /* Descriptor key name comment */ - fprintf(FileHandle, - " /*\n" - " * Names of Keys\n" - " */\n"); - - /* Descriptor key name section */ - if (KeyNameData) - { - fprintf(FileHandle, " aKeyNames,\n"); - } - else - { - fprintf(FileHandle, " NULL,\n"); - } - - /* Descriptor extended key name section */ - if (KeyNameExtData) - { - fprintf(FileHandle, " aKeyNamesExt,\n"); - } - else - { - fprintf(FileHandle, " NULL,\n"); - } - - /* Descriptor dead key name section */ - if ((DeadKeyData) && (KeyNameDeadData)) - { - fprintf(FileHandle, " aKeyNamesDead,\n\n"); - } - else - { - fprintf(FileHandle, " NULL,\n\n"); - } - - /* Descriptor conversion table section */ - fprintf(FileHandle, - " /*\n" - " * Scan codes to Virtual Keys\n" - " */\n" - " ausVK,\n" - " sizeof(ausVK) / sizeof(ausVK[0]),\n" - " aE0VscToVk,\n" - " aE1VscToVk,\n\n" - " /*\n" - " * Locale-specific special processing\n" - " */\n"); - - /* FIXME: AttributeData and KLLF_ALTGR stuff */ - - /* Descriptor locale-specific section */ - fprintf(FileHandle, " MAKELONG(%s, KBD_VERSION),\n\n", "0"); /* FIXME */ - - /* Descriptor ligature data comment */ - fprintf(FileHandle, " /*\n * Ligatures\n */\n %d,\n", 0); /* FIXME */ - - /* Descriptor ligature data section */ - if (!LigatureData) - { - fprintf(FileHandle, " 0,\n"); - fprintf(FileHandle, " NULL\n"); - } - else - { - fprintf(FileHandle, " sizeof(aLigature[0]),\n"); - fprintf(FileHandle, " (PLIGATURE1)aLigature\n"); - } - - /* Descriptor finish */ - fprintf(FileHandle, "};\n\n"); - - /* Keyboard layout callback function */ - if (!FallbackDriver) fprintf(FileHandle, - "PKBDTABLES KbdLayerDescriptor(VOID)\n" - "{\n" - " return &KbdTables;\n" - "}\n"); - - /* Clean up */ - fclose(FileHandle); - return TRUE; -} - -ULONG -DoOutput(IN ULONG StateCount, - IN PULONG ShiftStates, - IN PKEYNAME DescriptionData, - IN PKEYNAME LanguageData, - IN PVOID AttributeData, - IN PVOID DeadKeyData, - IN PVOID LigatureData, - IN PKEYNAME KeyNameData, - IN PKEYNAME KeyNameExtData, - IN PKEYNAME KeyNameDeadData) -{ - ULONG FailureCode = 0; - - /* Take the time */ - time(&Clock); - Now = localtime(&Clock); - - /* Check if this just a fallback driver*/ - if (!FallbackDriver) - { - /* It's not, create header file */ - if (!kbd_h(&g_Layout)) FailureCode = 1; - - /* Create the resource file */ - if (!kbd_rc(DescriptionData, LanguageData)) FailureCode = 2; - } - - /* Create the C file */ - if (!kbd_c(StateCount, - ShiftStates, - AttributeData, - &g_Layout, - DeadKeyData, - LigatureData, - KeyNameData, - KeyNameExtData, - KeyNameDeadData)) - { - /* Failed in C file generation */ - FailureCode = 3; - } - - /* Check if this just a fallback driver*/ - if (!FallbackDriver) - { - /* Generate the definition file */ - if (!kbd_def()) FailureCode = 4; - } - - /* Done */ - return FailureCode; -} - - -/* EOF */ diff --git a/reactos/tools/kbdtool/parser.c b/reactos/tools/kbdtool/parser.c deleted file mode 100644 index 8e3a664e065..00000000000 --- a/reactos/tools/kbdtool/parser.c +++ /dev/null @@ -1,1151 +0,0 @@ -/* - * PROJECT: ReactOS Build Tools [Keyboard Layout Compiler] - * LICENSE: BSD - See COPYING.BSD in the top level directory - * FILE: tools/kbdtool/parser.c - * PURPOSE: Parsing Logic - * PROGRAMMERS: ReactOS Foundation - */ - -/* INCLUDES *******************************************************************/ - -#include "kbdtool.h" - -/* GLOBALS ********************************************************************/ - -/* Internal parser data about everything that was parsed */ -CHAR gBuf[256]; -CHAR gKBDName[10]; -CHAR gCopyright[256]; -CHAR gDescription[256]; -CHAR gCompany[256]; -CHAR gLocaleName[256]; -CHAR gVKeyName[32]; -ULONG gID = 0; -ULONG gKbdLayoutVersion; -LAYOUT g_Layout; -ULONG gLineCount; - -/* Table of keywords the parser recognizes */ -PCHAR KeyWordList[KEYWORD_COUNT] = -{ - "KBD", - "VERSION", - "COPYRIGHT", - "COMPANY", - "LOCALENAME", - "MODIIFERS", - "SHIFTSTATE", - "ATTRIBUTES", - "LAYOUT", - "DEADKEY", - "LIGATURE", - "KEYNAME", - "KEYNAME_EXT", - "KEYNAME_DEAD", - "DESCRIPTIONS", - "LANGUAGENAMES", - "ENDKBD", -}; - -/* FUNCTIONS ******************************************************************/ - -ULONG -isKeyWord(PCHAR p) -{ - ULONG i; - - /* Check if we know this keyword */ - for (i = 0; i < KEYWORD_COUNT; i++) if (strcmp(KeyWordList[i], p) == 0) break; - - /* If we didn't find anything, i will be KEYWORD_COUNT, which is invalid */ - return i; -} - -PCHAR -getVKName(IN ULONG VirtualKey, - IN BOOLEAN Prefix) -{ - ULONG i; - - /* Loop for standard virtual key */ - if (((VirtualKey >= 'A') && (VirtualKey <= 'Z')) || - ((VirtualKey >= '0') && (VirtualKey <= '9'))) - { - /* Fill out the name */ - gVKeyName[0] = '\''; - gVKeyName[1] = VirtualKey; - gVKeyName[2] = '\''; - gVKeyName[3] = '\0'; - return gVKeyName; - } - - /* Check if a prefix is required */ - if (Prefix) - { - /* Add it */ - strcpy(gVKeyName, "VK_"); - } - else - { - /* Otherwise, don't add anything */ - strcpy(gVKeyName, ""); - } - - /* Loop all virtual keys */ - for (i = 0; i < 36; i++) - { - /* Check if this key matches */ - if (VKName[i].VirtualKey == VirtualKey) - { - /* Copy the key's name into the buffer */ - strcat(gVKeyName, VKName[i].Name); - return gVKeyName; - } - } - - /* If we got here, then we failed, so print out an error name */ - strcpy(gVKeyName, "#ERROR#"); - return gVKeyName; -} - -ULONG -getVKNum(IN PCHAR p) -{ - ULONG Length; - ULONG i; - ULONG KeyNumber; - - /* Compute the length of the string */ - Length = strlen(p); - if (!Length) return -1; - - /* Check if this is is a simple key */ - if (Length == 1) - { - /* If it's a number, return it now */ - if ((*p >= '0') && (*p <= '9')) return *p; - - /* Otherwise, convert the letter to upper case */ - *p = toupper(*p); - - /* And make sure it's a valid letter */ - if ((*p >= 'A') && (*p <='Z')) return *p; - - /* Otherwise, fail */ - return -1; - } - - /* Otherwise, scan our virtual key names */ - for (i = 0; i < 36; i++) - { - /* Check if we have a match */ - if (!strcmp(VKName[i].Name, p)) return VKName[i].VirtualKey; - } - - /* Check if this is a hex string */ - if ((*p == '0') && ((*(p + 1) == 'x') || (*(p + 1) == 'X'))) - { - /* Get the key number from the hex string */ - *(p + 1) = 'x'; - if (sscanf(p, "0x%x", &KeyNumber) == 1) return KeyNumber; - } - - /* No hope: fail */ - return -1; -} - -UCHAR -getCharacterInfo(IN PCHAR State, - OUT PULONG EntryChar, - OUT PCHAR LigatureChar) -{ - ULONG Length; - ULONG CharInfo = CHAR_NORMAL_KEY; - UCHAR StateChar; - ULONG CharCode; - - /* Calculate the length of the state */ - Length = strlen(State); - - /* Check if this is at least a simple key state */ - if (Length > 1) - { - /* Read the first character and check if it's a dead key */ - StateChar = State[Length - 1]; - if (StateChar == '@') - { - /* This is a dead key */ - CharInfo = CHAR_DEAD_KEY; - } - else if (StateChar == '%') - { - /* This is another key */ - CharInfo = CHAR_OTHER_KEY; - } - } - - /* Check if this is a numerical key state */ - if ((Length - 1) >= 2) - { - /* Scan for extended character code entry */ - if ((sscanf(State, "%6x", &CharCode) == 1) && - ((Length == 5) && (State[0] == '0') || - (Length == 6) && ((State[0] == '0') && (State[1] == '0')))) - { - /* Handle a ligature key */ - CharInfo = CHAR_LIGATURE_KEY; - - /* Not yet handled */ - printf("Ligatured character entries not yet supported!\n"); - exit(1); - } - else - { - /* Get the normal character entry */ - if (sscanf(State, "%4x", &CharCode) == 1) - { - /* Does the caller want the key? */ - if (EntryChar) *EntryChar = CharCode; - } - else - { - /* The entry is totally invalid */ - if (Verbose) printf("An unparseable character entry '%s' was found.\n", State); - if (EntryChar) *EntryChar = 0; - CharInfo = CHAR_INVALID_KEY; - } - } - } - else - { - /* Save the key if the caller requested it */ - if (EntryChar) *EntryChar = *State; - } - - /* Return the type of character this is */ - return CharInfo; -} - -BOOLEAN -NextLine(PCHAR LineBuffer, - ULONG BufferSize, - FILE *File) -{ - PCHAR p, pp; - - /* Scan each line */ - while (fgets(LineBuffer, BufferSize, File)) - { - /* Remember it */ - gLineCount++; - - /* Reset the pointer at the beginning of the line */ - p = LineBuffer; - - /* Now bypass all whitespace (and tabspace) */ - while ((*p) && ((*p == ' ') || (*p == '\t'))) p++; - - /* If this is an old-style comment, skip the line */ - if (*p == ';') continue; - - /* Otherwise, check for new-style comment */ - pp = strstr(p, "//"); - if (pp) - { - /* We have a comment, so terminate there (unless the whole line is one) */ - if (pp == p) continue; - *pp = '\0'; - } - else - { - /* No comment, so find the new line and terminate there */ - p = strchr(p, '\n'); - if (p) *p = '\0'; - } - - /* We have a line! */ - return TRUE; - } - - /* No line found */ - return FALSE; -} - -ULONG -SkipLines(VOID) -{ - ULONG KeyWord; - CHAR KeyWordChars[32]; - - /* Scan each line, skipping it if it's not a keyword */ - while (NextLine(gBuf, sizeof(gBuf), gfpInput)) - { - /* Read a single word */ - if (sscanf(gBuf, "%s", KeyWordChars) == 1) - { - /* If the word is a keyword, stop skipping lines */ - KeyWord = isKeyWord(KeyWordChars); - if (KeyWord < KEYWORD_COUNT) return KeyWord; - } - } - - /* We skipped all the possible lines, not finding anything */ - return KEYWORD_COUNT; -} - -ULONG -DoKBD(VOID) -{ - /* On Unicode files, we need to find the Unicode marker (FEEF) */ - ASSERT(UnicodeFile == FALSE); - - /* Initial values */ - *gKBDName = '\0'; - *gDescription = '\0'; - - /* Scan for the values */ - if (sscanf(gBuf, "KBD %8s \"%40[^\"]\" %d", gKBDName, gDescription, &gID) < 2) - { - /* Couldn't find them */ - printf("Unable to read keyboard name or description.\n"); - exit(1); - } - - /* Debug only */ - DPRINT1("KBD Name: [%8s] Description: [%40s] ID: [%d]\n", gKBDName, gDescription, gID); - return SkipLines(); -} - -ULONG -DoVERSION(VOID) -{ - /* Scan for the value */ - if (sscanf(gBuf, "VERSION %d", &gKbdLayoutVersion) < 1) - { - /* Couldn't find them */ - printf("Unable to read keyboard version information.\n"); - } - - /* Debug only */ - DPRINT1("VERSION [%d]\n", gKbdLayoutVersion); - return SkipLines(); -} - -ULONG -DoCOPYRIGHT(VOID) -{ - /* Initial values */ - *gCopyright = '\0'; - - /* Scan for the value */ - if (sscanf(gBuf, "COPYRIGHT \"%40[^\"]\"", gCopyright) < 1) - { - /* Couldn't find them */ - printf("Unable to read the specified COPYRIGHT string.\n"); - } - - /* Debug only */ - DPRINT1("COPYRIGHT [%40s]\n", gCopyright); - return SkipLines(); -} - -ULONG -DoCOMPANY(VOID) -{ - /* Initial values */ - *gCompany = '\0'; - - /* Scan for the value */ - if (sscanf(gBuf, "COMPANY \"%85[^\"]\"", gCompany) < 1) - { - /* Couldn't find them */ - printf("Unable to read the specified COMPANY name.\n"); - } - - /* Debug only */ - DPRINT1("COMPANY [%85s]\n", gCompany); - return SkipLines(); -} - -ULONG -DoLOCALENAME(VOID) -{ - /* Initial values */ - *gLocaleName = '\0'; - - /* Scan for the value */ - if (sscanf(gBuf, "LOCALENAME \"%40[^\"]\"", gLocaleName) < 1) - { - /* Couldn't find them */ - printf("Unable to read the specified COPYRIGHT string.\n"); - } - - /* Debug only */ - DPRINT1("LOCALENAME [%40s]\n", gLocaleName); - return SkipLines(); -} - -ULONG -DoDESCRIPTIONS(IN PKEYNAME* DescriptionData) -{ - ULONG KeyWord = 0; - CHAR Token[32]; - ULONG LanguageCode; - PCHAR p, pp; - PKEYNAME Description; - - /* Assume nothing */ - *DescriptionData = 0; - - /* Start scanning */ - while (NextLine(gBuf, 256, gfpInput)) - { - /* Search for token */ - if (sscanf(gBuf, "%s", Token) != 1) continue; - - /* Make sure it's not just a comment */ - if (*Token == ';') continue; - - /* Make sure it's not a keyword */ - KeyWord = isKeyWord(Token); - if (KeyWord < KEYWORD_COUNT) break; - - /* Now scan for the language code */ - if (sscanf(Token, " %4x", &LanguageCode) != 1) - { - /* Skip */ - printf("An invalid LANGID was specified.\n"); - continue; - } - - /* Now get the actual description */ - if (sscanf(gBuf, " %*4x %s[^\n]", Token) != 1) - { - /* Skip */ - printf("A language description is missing.\n"); - continue; - } - - /* Get the description string and find the ending */ - p = strstr(gBuf, Token); - pp = strchr(p, '\n'); - if (!pp) pp = strchr(p, '\r'); - - /* Terminate the description string here */ - if (pp) *pp = 0; - - /* Now allocate the description */ - Description = malloc(sizeof(KEYNAME)); - if (!Description) - { - /* Fail */ - printf("Unable to allocate the KEYNAME struct (out of memory?).\n"); - exit(1); - } - - /* Fill out the structure */ - Description->Code = LanguageCode; - Description->Name = strdup(p); - Description->Next = NULL; - - /* Debug only */ - DPRINT1("LANGID: [%4x] Description: [%s]\n", Description->Code, Description->Name); - - /* Point to it and advance the pointer */ - *DescriptionData = Description; - DescriptionData = &Description->Next; - } - - /* We are done */ - return KeyWord; -} - -ULONG -DoLANGUAGENAMES(IN PKEYNAME* LanguageData) -{ - ULONG KeyWord = 0; - CHAR Token[32]; - ULONG LanguageCode; - PCHAR p, pp; - PKEYNAME Language; - - /* Assume nothing */ - *LanguageData = 0; - - /* Start scanning */ - while (NextLine(gBuf, 256, gfpInput)) - { - /* Search for token */ - if (sscanf(gBuf, "%s", Token) != 1) continue; - - /* Make sure it's not just a comment */ - if (*Token == ';') continue; - - /* Make sure it's not a keyword */ - KeyWord = isKeyWord(Token); - if (KeyWord < KEYWORD_COUNT) break; - - /* Now scan for the language code */ - if (sscanf(Token, " %4x", &LanguageCode) != 1) - { - /* Skip */ - printf("An invalid LANGID was specified.\n"); - continue; - } - - /* Now get the actual language */ - if (sscanf(gBuf, " %*4x %s[^\n]", Token) != 1) - { - /* Skip */ - printf("A language name is missing\n"); - continue; - } - - /* Get the language string and find the ending */ - p = strstr(gBuf, Token); - pp = strchr(p, '\n'); - if (!pp) pp = strchr(p, '\r'); - - /* Terminate the language string here */ - if (pp) *pp = 0; - - /* Now allocate the language */ - Language = malloc(sizeof(KEYNAME)); - if (!Language) - { - /* Fail */ - printf("Unable to allocate the KEYNAME struct (out of memory?).\n"); - exit(1); - } - - /* Fill out the structure */ - Language->Code = LanguageCode; - Language->Name = strdup(p); - Language->Next = NULL; - - /* Debug only */ - DPRINT1("LANGID: [%4x] Name: [%s]\n", Language->Code, Language->Name); - - /* Point to it and advance the pointer */ - *LanguageData = Language; - LanguageData = &Language->Next; - } - - /* We are done */ - return KeyWord; -} - -ULONG -DoKEYNAME(IN PKEYNAME* KeyNameData) -{ - ULONG KeyWord = 0; - CHAR Token[32]; - ULONG CharacterCode; - PCHAR p, pp; - PKEYNAME KeyName; - - /* Assume nothing */ - *KeyNameData = 0; - - /* Start scanning */ - while (NextLine(gBuf, 256, gfpInput)) - { - /* Search for token */ - if (sscanf(gBuf, "%s", Token) != 1) continue; - - /* Make sure it's not just a comment */ - if (*Token == ';') continue; - - /* Make sure it's not a keyword */ - KeyWord = isKeyWord(Token); - if (KeyWord < KEYWORD_COUNT) break; - - /* Now scan for the character code */ - if (sscanf(Token, " %4x", &CharacterCode) != 1) - { - /* Skip */ - printf("An invalid character code was specified.\n"); - continue; - } - - /* Now get the actual key name */ - if (sscanf(gBuf, " %*4x %s[^\n]", Token) != 1) - { - /* Skip */ - printf("A key name is missing\n"); - continue; - } - - /* Get the key name string and find the ending */ - p = strstr(gBuf, Token); - pp = strchr(p, '\n'); - if (!pp) pp = strchr(p, '\r'); - - /* Terminate the key name string here */ - if (pp) *pp = 0; - - /* Now allocate the language */ - KeyName = malloc(sizeof(KEYNAME)); - if (!KeyName) - { - /* Fail */ - printf("Unable to allocate the KEYNAME struct (out of memory?).\n"); - exit(1); - } - - /* Fill out the structure */ - KeyName->Code = CharacterCode; - KeyName->Name = strdup(p); - KeyName->Next = NULL; - - /* Debug only */ - DPRINT1("CHARCODE: [%4x] Name: [%s]\n", KeyName->Code, KeyName->Name); - - /* Point to it and advance the pointer */ - *KeyNameData = KeyName; - KeyNameData = &KeyName->Next; - } - - /* We are done */ - return KeyWord; -} - -ULONG -DoSHIFTSTATE(IN PULONG StateCount, - IN OUT PULONG ShiftStates) -{ - ULONG KeyWord; - ULONG i; - ULONG ShiftState; - CHAR Token[32]; - - /* Reset the shift states */ - for (i = 0; i < 8; i++) ShiftStates[i] = -1; - - /* Start with no states */ - *StateCount = 0; - - /* Scan for shift states */ - while (NextLine(gBuf, 256, gfpInput)) - { - /* Search for token */ - if (sscanf(gBuf, "%s", Token) != 1) continue; - - /* Make sure it's not a keyword */ - KeyWord = isKeyWord(Token); - if (KeyWord < KEYWORD_COUNT) break; - - /* Now scan for the shift state */ - if (sscanf(gBuf, " %1s[012367]", Token) != 1) - { - /* We failed -- should we warn? */ - if (Verbose) printf("An invalid shift state '%s' was found (use 0, 1, 2, 3, 6, or 7.)\n", Token); - continue; - } - - /* Now read the state */ - ShiftState = atoi(Token); - - /* Scan existing states */ - for (i = 0; i < *StateCount; i++) - { - /* Check for duplicate */ - if ((ShiftStates[i] == ShiftState) && (Verbose)) - { - /* Warn user */ - printf("The state '%d' was duplicated for this Virtual Key.\n", ShiftStates[i]); - break; - } - } - - /* Make sure we won't overflow */ - if (*StateCount < 8) - { - /* Save this state */ - ShiftStates[(*StateCount)++] = ShiftState; - } - else - { - /* Too many states -- should we warn? */ - if (Verbose) printf("There were too many states (you defined %d).\n", *StateCount); - } - } - - /* Debug only */ - DPRINT1("Found %d Shift States: [", *StateCount); - for (i = 0; i < *StateCount; i++) DPRINT1("%d ", ShiftStates[i]); - DPRINT1("]\n"); - - /* We are done */ - return KeyWord; -} - -ULONG -DoLIGATURE(PVOID LigatureData) -{ - printf("LIGATURE support is not yet implemented. Please bug Arch to fix it\n"); - return SkipLines(); -} - -ULONG -DoATTRIBUTES(PVOID AttributeData) -{ - printf("ATTRIBUTES support is not yet implemented. Please bug Arch to fix it\n"); - return SkipLines(); -} - -ULONG -DoMODIFIERS(VOID) -{ - printf("MODIFIERS support is not yet implemented. Please bug Arch to fix it\n"); - return SkipLines(); -} - -ULONG -DoDEADKEY(PVOID DeadKeyData) -{ - printf("DEADKEY support is not yet implemented. Please bug Arch to fix it\n"); - return SkipLines(); -} - -ULONG -DoLAYOUT(IN PLAYOUT LayoutData, - IN PVOID LigatureData, - IN PULONG ShiftStates, - IN ULONG StateCount) -{ - CHAR Token[32]; - CHAR Cap[8]; - ULONG KeyWord; - ULONG ScanCode, CurrentCode; - ULONG TokenCount; - ULONG VirtualKey; - ULONG i; - ULONG Count; - BOOLEAN FullEntry; - CHAR State[8][8]; - ULONG ScanCodeCount = -1; - PLAYOUTENTRY Entry; - UCHAR CharacterType, LigatureChar; - - /* Zero out the layout */ - memset(LayoutData, 0, sizeof(LAYOUT)); - - /* Read each line */ - Entry = &LayoutData->Entry[0]; - while (NextLine(gBuf, 256, gfpInput)) - { - /* Search for token */ - if (sscanf(gBuf, "%s", Token) != 1) continue; - - /* Make sure it's not just a comment */ - if (*Token == ';') continue; - - /* Make sure it's not a keyword */ - KeyWord = isKeyWord(Token); - if (KeyWord < KEYWORD_COUNT) break; - - /* Now read the entry */ - TokenCount = sscanf(gBuf, " %x %s %s", &ScanCode, Token, Cap); - if (TokenCount == 3) - { - /* Full entry with cap */ - FullEntry = TRUE; - } - else if (TokenCount != 2) - { - /* Fail, invalid LAYOUT entry */ - printf("There are not enough columns in the layout list.\n"); - exit(1); - } - else - { - /* Simplified layout with no cap */ - FullEntry = FALSE; - } - - /* One more */ - DPRINT1("RAW ENTRY: [%x %s %s]\n", ScanCode, Token, Cap); - Entry++; - if (++ScanCodeCount >= 110) - { - /* Too many! */ - printf("ScanCode %02x - too many scancodes here to parse.\n", ScanCode); - exit(1); - } - - /* Fill out this entry */ - Entry->ScanCode = ScanCode; - Entry->LineCount = gLineCount; - - /* Loop scancode table */ - for (i = 0; i < 110; i++) - { - /* Get the current code */ - CurrentCode = ScVk[i].ScanCode; - if (CurrentCode == 0xFFFF) - { - /* New code */ - if (Verbose) printf("A new scancode is being defined: 0x%2X, %s\n", Entry->ScanCode, Token); - - /* Fill out the entry */ - Entry->VirtualKey = getVKNum(Token); - break; - } - else if (ScanCode == CurrentCode) - { - /* Make sure we didn't already process it */ - if (ScVk[i].Processed) - { - /* Fail */ - printf("Scancode %X was previously defined.\n", ScanCode); - exit(1); - } - - /* Check if there is a valid virtual key */ - if (ScVk[i].VirtualKey == 0xFFFF) - { - /* Fail */ - printf("The Scancode you tried to use (%X) is reserved.\n", ScanCode); - exit(1); - } - - /* Fill out the entry */ - Entry->OriginalVirtualKey = ScVk[i].VirtualKey; - Entry->Name = ScVk[i].Name; - break; - } - } - - /* The entry is now processed */ - Entry->Processed = TRUE; - ScVk[i].Processed = TRUE; - - /* Get the virtual key from the entry */ - VirtualKey = getVKNum(Token); - Entry->VirtualKey = VirtualKey; - DPRINT1("ENTRY: [%x %x %x %s] with ", - Entry->VirtualKey, Entry->OriginalVirtualKey, Entry->ScanCode, Entry->Name); - - /* Make sure it's valid */ - if (VirtualKey == 0xFFFF) - { - /* Warn the user */ - if (Verbose) printf("An invalid Virtual Key '%s' was defined.\n", Token); - continue; - } - - /* Is this a full entry */ - if (FullEntry) - { - /* Do we have SGCAP data? Set cap mode to 2 */ - if (!strcmp(Cap, "SGCAP")) *Cap = '2'; - - /* Read the cap mode */ - if (sscanf(Cap, "%1d[012]", &Entry->Cap) != 1) - { - /* Invalid cap mode */ - printf("invalid Cap specified (%s). Must be 0, 1, or 2.\n", Cap); - exit(1); - } - } - - /* Read the states */ - Count = sscanf(gBuf, - " %*s %*s %*s %s %s %s %s %s %s %s %s", - State[0], - State[1], - State[2], - State[3], - State[4], - State[5], - State[6], - State[7]); - Entry->StateCount = Count; - DPRINT1("%d STATES: [", Count); - - /* Check if there are less than 2 states */ - if ((Count < 2) && (FullEntry)) - { - /* Fail */ - printf("You must have at least 2 characters.\n"); - exit(1); - } - - /* Loop all states */ - for (i = 0; i < Count; i++) - { - /* Check if this is an undefined state */ - DPRINT1("%s ", State[i]); - if (!strcmp(State[i], "-1")) - { - /* No data for this state */ - Entry->CharData[i] = -1; - continue; - } - - /* Otherwise, check what kind of character this is */ - CharacterType = getCharacterInfo(State[i], - &Entry->CharData[i], - &LigatureChar); - if (CharacterType == CHAR_DEAD_KEY) - { - /* Save it as such */ - Entry->DeadCharData[i] = 1; - } - else if (CharacterType == CHAR_OTHER_KEY) - { - /* Save it as such */ - Entry->OtherCharData[i] = 1; - } - } - - /* Check for sanity checks */ - DPRINT1("]\n"); - if (SanityCheck) - { - /* Not yet handled... */ - printf("Sanity checks not yet handled!\n"); - exit(1); - } - - /* Check if we had SGCAP data */ - if (Entry->Cap & 2) - { - /* Not yet handled... */ - printf("SGCAP state not yet handled!\n"); - exit(1); - } - } - - /* Process the scan code table */ - Entry = &LayoutData->Entry[ScanCodeCount]; - for (i = 0; i < 110; i++) - { - /* Get the scan code */ - CurrentCode = ScVk[i].ScanCode; - if (CurrentCode == 0xFFFF) break; - - /* Check if this entry had been processed */ - if (ScVk[i].Processed) - { - /* Skip it */ - ScVk[i].Processed = FALSE; - } - else - { - /* Do we have too many? */ - if (++ScanCodeCount >= 110) - { - /* Fail */ - printf("ScanCode %02x - too many scancodes here to parse.\n", CurrentCode); - exit(1); - } - - /* Build an entry for it */ - Entry++; - Entry->ScanCode = CurrentCode; - Entry->VirtualKey = ScVk[i].VirtualKey; - Entry->OriginalVirtualKey = ScVk[i].VirtualKey; - Entry->Name = ScVk[i].Name; - Entry->Processed = TRUE; - Entry->LineCount = 0; - DPRINT1("AUTOMATIC ENTRY: [%x %x %s]\n", - Entry->VirtualKey, Entry->ScanCode, Entry->Name); - } - } - - /* Skip what's left */ - return KeyWord; -} - -ULONG -DoParsing(VOID) -{ - ULONG KeyWords[KEYWORD_COUNT]; - ULONG KeyWord; - ULONG StateCount; - ULONG ShiftStates[8]; - PKEYNAME DescriptionData = NULL, LanguageData = NULL; - PKEYNAME KeyNameData = NULL, KeyNameExtData = NULL, KeyNameDeadData = NULL; - PVOID AttributeData = NULL, LigatureData = NULL, DeadKeyData = NULL; - - /* Parse keywords */ - gLineCount = 0; - KeyWord = SkipLines(); - if (KeyWord >= KEYWORD_COUNT) - { - /* Invalid keyword count, fail */ - fclose(gfpInput); - printf("No keywords were found in '%s'.\n", gpszFileName); - exit(1); - } - - /* Now parse the keywords */ - while (KeyWord < (KEYWORD_COUNT - 1)) - { - /* Save this keyword */ - KeyWords[KeyWord]++; - - /* Check for duplicate entires, other than DEADKEY, which is okay */ - if ((KeyWord != 9) && (KeyWords[KeyWord] > 1) && (Verbose)) - { - /* On a verbose run, warn the user */ - printf("The '%s' keyword appeared multiple times.\n", - KeyWordList[KeyWord]); - } - - /* Now parse this keyword */ - switch (KeyWord) - { - /* KBD */ - case 0: - - DPRINT1("Found KBD section\n"); - KeyWord = DoKBD(); - break; - - /* VERSION */ - case 1: - - DPRINT1("Found VERSION section\n"); - KeyWord = DoVERSION(); - break; - - /* COPYRIGHT */ - case 2: - - DPRINT1("Found COPYRIGHT section\n"); - KeyWord = DoCOPYRIGHT(); - break; - - /* COMPANY */ - case 3: - - DPRINT1("Found COMPANY section\n"); - KeyWord = DoCOMPANY(); - break; - - /* LOCALENAME */ - case 4: - - DPRINT1("Found LOCALENAME section\n"); - KeyWord = DoLOCALENAME(); - break; - - /* MODIFIERS */ - case 5: - - DPRINT1("Found MODIFIERS section\n"); - KeyWord = DoMODIFIERS(); - break; - - /* SHIFTSTATE */ - case 6: - - DPRINT1("Found SHIFTSTATE section\n"); - KeyWord = DoSHIFTSTATE(&StateCount, ShiftStates); - if (StateCount < 2) - { - /* Fail */ - fclose(gfpInput); - printf("ERROR"); - exit(1); - } - break; - - /* ATTRIBUTES */ - case 7: - - DPRINT1("Found ATTRIBUTES section\n"); - KeyWord = DoATTRIBUTES(&AttributeData); - break; - - /* LAYOUT */ - case 8: - - DPRINT1("Found LAYOUT section\n"); - KeyWord = DoLAYOUT(&g_Layout, - &LigatureData, - ShiftStates, - StateCount); - break; - - /* DEADKEY */ - case 9: - - DPRINT1("Found DEADKEY section\n"); - KeyWord = DoDEADKEY(&DeadKeyData); - break; - - /* LIGATURE */ - case 10: - - DPRINT1("Found LIGATURE section\n"); - KeyWord = DoLIGATURE(&LigatureData); - break; - - /* KEYNAME */ - case 11: - - DPRINT1("Found KEYNAME section\n"); - KeyWord = DoKEYNAME(&KeyNameData); - break; - - /* KEYNAME_EXT */ - case 12: - - DPRINT1("Found KEYNAME_EXT section\n"); - KeyWord = DoKEYNAME(&KeyNameExtData); - break; - - /* KEYNAME_DEAD */ - case 13: - - DPRINT1("Found KEYNAME_DEAD section\n"); - KeyWord = DoKEYNAME(&KeyNameDeadData); - break; - - /* DESCRIPTIONS */ - case 14: - - DPRINT1("Found DESCRIPTIONS section\n"); - KeyWord = DoDESCRIPTIONS(&DescriptionData); - break; - - /* LANGUAGENAMES */ - case 15: - - DPRINT1("Found LANGUAGENAMES section\n"); - KeyWord = DoLANGUAGENAMES(&LanguageData); - break; - - /* ENDKBD */ - case 16: - - DPRINT1("Found ENDKBD section\n"); - KeyWord = SkipLines(); - break; - - - default: - break; - } - } - - /* We are done */ - fclose(gfpInput); - - /* Now enter the output phase */ - return DoOutput(StateCount, - ShiftStates, - DescriptionData, - LanguageData, - AttributeData, - DeadKeyData, - LigatureData, - KeyNameData, - KeyNameExtData, - KeyNameDeadData); -} -/* EOF */ diff --git a/reactos/tools/kbdtool/test.klc b/reactos/tools/kbdtool/test.klc deleted file mode 100644 index 22b0079d524..00000000000 --- a/reactos/tools/kbdtool/test.klc +++ /dev/null @@ -1,162 +0,0 @@ -KBD Layout01 "US - Custom" - -COPYRIGHT "(c) 2009 Company" - -COMPANY "Company" - -LOCALENAME "en-US" - -LOCALEID "00000409" - -VERSION 1.0 - -SHIFTSTATE - -0 //Column 4 -1 //Column 5 : Shft -2 //Column 6 : Ctrl - -LAYOUT ;an extra '@' at the end is a dead key - -//SC VK_ Cap 0 1 2 -//-- ---- ---- ---- ---- ---- - -02 1 0 1 0021 -1 // DIGIT ONE, EXCLAMATION MARK, -03 2 0 2 0040 -1 // DIGIT TWO, COMMERCIAL AT, -04 3 0 3 0023 -1 // DIGIT THREE, NUMBER SIGN, -05 4 0 4 0024 -1 // DIGIT FOUR, DOLLAR SIGN, -06 5 0 5 0025 -1 // DIGIT FIVE, PERCENT SIGN, -07 6 0 6 005e -1 // DIGIT SIX, CIRCUMFLEX ACCENT, -08 7 0 7 0026 -1 // DIGIT SEVEN, AMPERSAND, -09 8 0 8 002a -1 // DIGIT EIGHT, ASTERISK, -0a 9 0 9 0028 -1 // DIGIT NINE, LEFT PARENTHESIS, -0b 0 0 0 0029 -1 // DIGIT ZERO, RIGHT PARENTHESIS, -0c OEM_MINUS 0 002d 005f -1 // HYPHEN-MINUS, LOW LINE, -0d OEM_PLUS 0 003d 002b -1 // EQUALS SIGN, PLUS SIGN, -10 Q 1 q Q -1 // LATIN SMALL LETTER Q, LATIN CAPITAL LETTER Q, -11 W 1 w W -1 // LATIN SMALL LETTER W, LATIN CAPITAL LETTER W, -12 E 1 e E -1 // LATIN SMALL LETTER E, LATIN CAPITAL LETTER E, -13 R 1 r R -1 // LATIN SMALL LETTER R, LATIN CAPITAL LETTER R, -14 T 1 t T -1 // LATIN SMALL LETTER T, LATIN CAPITAL LETTER T, -15 Y 1 y Y -1 // LATIN SMALL LETTER Y, LATIN CAPITAL LETTER Y, -16 U 1 u U -1 // LATIN SMALL LETTER U, LATIN CAPITAL LETTER U, -17 I 1 i I -1 // LATIN SMALL LETTER I, LATIN CAPITAL LETTER I, -18 O 1 o O -1 // LATIN SMALL LETTER O, LATIN CAPITAL LETTER O, -19 P 1 p P -1 // LATIN SMALL LETTER P, LATIN CAPITAL LETTER P, -1a OEM_4 0 005b 007b 001b // LEFT SQUARE BRACKET, LEFT CURLY BRACKET, ESCAPE -1b OEM_6 0 005d 007d 001d // RIGHT SQUARE BRACKET, RIGHT CURLY BRACKET, INFORMATION SEPARATOR THREE -1e A 1 a A -1 // LATIN SMALL LETTER A, LATIN CAPITAL LETTER A, -1f S 1 s S -1 // LATIN SMALL LETTER S, LATIN CAPITAL LETTER S, -20 D 1 d D -1 // LATIN SMALL LETTER D, LATIN CAPITAL LETTER D, -21 F 1 f F -1 // LATIN SMALL LETTER F, LATIN CAPITAL LETTER F, -22 G 1 g G -1 // LATIN SMALL LETTER G, LATIN CAPITAL LETTER G, -23 H 1 h H -1 // LATIN SMALL LETTER H, LATIN CAPITAL LETTER H, -24 J 1 j J -1 // LATIN SMALL LETTER J, LATIN CAPITAL LETTER J, -25 K 1 k K -1 // LATIN SMALL LETTER K, LATIN CAPITAL LETTER K, -26 L 1 l L -1 // LATIN SMALL LETTER L, LATIN CAPITAL LETTER L, -27 OEM_1 0 003b 003a -1 // SEMICOLON, COLON, -28 OEM_7 0 0027 0022 -1 // APOSTROPHE, QUOTATION MARK, -29 OEM_3 0 0060 007e -1 // GRAVE ACCENT, TILDE, -2b OEM_5 0 005c 007c 001c // REVERSE SOLIDUS, VERTICAL LINE, INFORMATION SEPARATOR FOUR -2c Z 1 z Z -1 // LATIN SMALL LETTER Z, LATIN CAPITAL LETTER Z, -2d X 1 x X -1 // LATIN SMALL LETTER X, LATIN CAPITAL LETTER X, -2e C 1 c C -1 // LATIN SMALL LETTER C, LATIN CAPITAL LETTER C, -2f V 1 v V -1 // LATIN SMALL LETTER V, LATIN CAPITAL LETTER V, -30 B 1 b B -1 // LATIN SMALL LETTER B, LATIN CAPITAL LETTER B, -31 N 1 n N -1 // LATIN SMALL LETTER N, LATIN CAPITAL LETTER N, -32 M 1 m M -1 // LATIN SMALL LETTER M, LATIN CAPITAL LETTER M, -33 OEM_COMMA 0 002c 003c -1 // COMMA, LESS-THAN SIGN, -34 OEM_PERIOD 0 002e 003e -1 // FULL STOP, GREATER-THAN SIGN, -35 OEM_2 0 002f 003f -1 // SOLIDUS, QUESTION MARK, -39 SPACE 0 0020 0020 0020 // SPACE, SPACE, SPACE -56 OEM_102 0 005c 007c 001c // REVERSE SOLIDUS, VERTICAL LINE, INFORMATION SEPARATOR FOUR -53 DECIMAL 0 002e 002e -1 // FULL STOP, FULL STOP, - - -KEYNAME - -01 Esc -0e Backspace -0f Tab -1c Enter -1d Ctrl -2a Shift -36 "Right Shift" -37 "Num *" -38 Alt -39 Space -3a "Caps Lock" -3b F1 -3c F2 -3d F3 -3e F4 -3f F5 -40 F6 -41 F7 -42 F8 -43 F9 -44 F10 -45 Pause -46 "Scroll Lock" -47 "Num 7" -48 "Num 8" -49 "Num 9" -4a "Num -" -4b "Num 4" -4c "Num 5" -4d "Num 6" -4e "Num +" -4f "Num 1" -50 "Num 2" -51 "Num 3" -52 "Num 0" -53 "Num Del" -54 "Sys Req" -57 F11 -58 F12 -7c F13 -7d F14 -7e F15 -7f F16 -80 F17 -81 F18 -82 F19 -83 F20 -84 F21 -85 F22 -86 F23 -87 F24 - -KEYNAME_EXT - -1c "Num Enter" -1d "Right Ctrl" -35 "Num /" -37 "Prnt Scrn" -38 "Right Alt" -45 "Num Lock" -46 Break -47 Home -48 Up -49 "Page Up" -4b Left -4d Right -4f End -50 Down -51 "Page Down" -52 Insert -53 Delete -54 <00> -56 Help -5b "Left Windows" -5c "Right Windows" -5d Application - -DESCRIPTIONS - -0409 US - Custom -LANGUAGENAMES - -0409 English (United States) -ENDKBD - diff --git a/reactos/tools/log2lines/cache.c b/reactos/tools/log2lines/cache.c deleted file mode 100644 index 5f255308425..00000000000 --- a/reactos/tools/log2lines/cache.c +++ /dev/null @@ -1,287 +0,0 @@ -/* - * ReactOS log2lines - * Written by Jan Roeloffzen - * - * - Image directory caching - */ - -#include -#include -#include - -#include "util.h" -#include "version.h" -#include "compat.h" -#include "options.h" -#include "help.h" -#include "image.h" - -#include "log2lines.h" - -static char *cache_name; -static char *tmp_name; - -static int -unpack_iso(char *dir, char *iso) -{ - char Line[LINESIZE]; - int res = 0; - char iso_tmp[MAX_PATH]; - int iso_copied = 0; - FILE *fiso; - - strcpy(iso_tmp, iso); - if ((fiso = fopen(iso, "a")) == NULL) - { - l2l_dbg(1, "Open of %s failed (locked for writing?), trying to copy first\n", iso); - - strcat(iso_tmp, "~"); - if (copy_file(iso, iso_tmp)) - return 3; - iso_copied = 1; - } - else - fclose(fiso); - - sprintf(Line, UNZIP_FMT, opt_7z, iso_tmp, dir); - if (system(Line) < 0) - { - l2l_dbg(0, "\nCannot unpack %s (check 7z path!)\n", iso_tmp); - l2l_dbg(1, "Failed to execute: '%s'\n", Line); - res = 1; - } - else - { - l2l_dbg(2, "\nUnpacking reactos.cab in %s\n", dir); - sprintf(Line, UNZIP_FMT_CAB, opt_7z, dir, dir); - if (system(Line) < 0) - { - l2l_dbg(0, "\nCannot unpack reactos.cab in %s\n", dir); - l2l_dbg(1, "Failed to execute: '%s'\n", Line); - res = 2; - } - } - if (iso_copied) - remove(iso_tmp); - return res; -} - -int -cleanable(char *path) -{ - if (strcmp(basename(path),DEF_OPT_DIR) == 0) - return 1; - return 0; -} - -int -check_directory(int force) -{ - char Line[LINESIZE]; - char freeldr_path[MAX_PATH]; - char iso_path[MAX_PATH]; - char compressed_7z_path[MAX_PATH]; - char *check_iso; - char *check_dir; - - check_iso = strrchr(opt_dir, '.'); - l2l_dbg(1, "Checking directory: %s\n", opt_dir); - if (check_iso && PATHCMP(check_iso, ".7z") == 0) - { - l2l_dbg(1, "Checking 7z image: %s\n", opt_dir); - - // First attempt to decompress to an .iso image - strcpy(compressed_7z_path, opt_dir); - if ((check_dir = strrchr(compressed_7z_path, PATH_CHAR))) - *check_dir = '\0'; - else - strcpy(compressed_7z_path, "."); // default to current dir - - sprintf(Line, UNZIP_FMT_7Z, opt_7z, opt_dir, compressed_7z_path); - - /* This of course only works if the .7z and .iso basenames are identical - * which is normally true for ReactOS trunk builds: - */ - strcpy(check_iso, ".iso"); - if (!file_exists(opt_dir) || force) - { - l2l_dbg(1, "Decompressing 7z image: %s\n", opt_dir); - if (system(Line) < 0) - { - l2l_dbg(0, "\nCannot decompress to iso image %s\n", opt_dir); - l2l_dbg(1, "Failed to execute: '%s'\n", Line); - return 2; - } - } - else - l2l_dbg(2, "%s already decompressed\n", opt_dir); - } - - if (check_iso && PATHCMP(check_iso, ".iso") == 0) - { - l2l_dbg(1, "Checking ISO image: %s\n", opt_dir); - if (file_exists(opt_dir)) - { - l2l_dbg(2, "ISO image exists: %s\n", opt_dir); - strcpy(iso_path, opt_dir); - *check_iso = '\0'; - sprintf(freeldr_path, "%s" PATH_STR "freeldr.ini", opt_dir); - if (!file_exists(freeldr_path) || force) - { - l2l_dbg(0, "Unpacking %s to: %s ...", iso_path, opt_dir); - unpack_iso(opt_dir, iso_path); - l2l_dbg(0, "... done\n"); - } - else - l2l_dbg(2, "%s already unpacked in: %s\n", iso_path, opt_dir); - } - else - { - l2l_dbg(0, "ISO image not found: %s\n", opt_dir); - return 1; - } - } - cache_name = malloc(MAX_PATH); - tmp_name = malloc(MAX_PATH); - strcpy(cache_name, opt_dir); - if (cleanable(opt_dir)) - strcat(cache_name, ALT_PATH_STR CACHEFILE); - else - strcat(cache_name, PATH_STR CACHEFILE); - strcpy(tmp_name, cache_name); - strcat(tmp_name, "~"); - return 0; -} - -int -read_cache(void) -{ - FILE *fr; - LIST_MEMBER *pentry; - char *Line = NULL; - int result = 0; - - Line = malloc(LINESIZE + 1); - if (!Line) - { - l2l_dbg(1, "Alloc Line failed\n"); - return 1; - } - Line[LINESIZE] = '\0'; - - fr = fopen(cache_name, "r"); - if (!fr) - { - l2l_dbg(1, "Open %s failed\n", cache_name); - free(Line); - return 2; - } - cache.phead = cache.ptail = NULL; - - while (fgets(Line, LINESIZE, fr) != NULL) - { - pentry = cache_entry_create(Line); - if (!pentry) - { - l2l_dbg(2, "** Create entry failed of: %s\n", Line); - } - else - entry_insert(&cache, pentry); - } - - fclose(fr); - free(Line); - return result; -} - -int -create_cache(int force, int skipImageBase) -{ - FILE *fr, *fw; - char *Line = NULL, *Fname = NULL; - int len, err; - size_t ImageBase; - - if ((fw = fopen(tmp_name, "w")) == NULL) - { - l2l_dbg(1, "Apparently %s is not writable (mounted ISO?), using current dir\n", tmp_name); - cache_name = basename(cache_name); - tmp_name = basename(tmp_name); - } - else - { - l2l_dbg(3, "%s is writable\n", tmp_name); - fclose(fw); - remove(tmp_name); - } - - if (force) - { - l2l_dbg(3, "Removing %s ...\n", cache_name); - remove(cache_name); - } - else - { - if (file_exists(cache_name)) - { - l2l_dbg(3, "Cache %s already exists\n", cache_name); - return 0; - } - } - - Line = malloc(LINESIZE + 1); - if (!Line) - return 1; - Line[LINESIZE] = '\0'; - - remove(tmp_name); - l2l_dbg(0, "Scanning %s ...\n", opt_dir); - snprintf(Line, LINESIZE, DIR_FMT, opt_dir, tmp_name); - l2l_dbg(1, "Executing: %s\n", Line); - if (system(Line) != 0) - { - l2l_dbg(0, "Cannot list directory %s\n", opt_dir); - l2l_dbg(1, "Failed to execute: '%s'\n", Line); - remove(tmp_name); - free(Line); - return 2; - } - l2l_dbg(0, "Creating cache ..."); - - if ((fr = fopen(tmp_name, "r")) != NULL) - { - if ((fw = fopen(cache_name, "w")) != NULL) - { - while (fgets(Line, LINESIZE, fr) != NULL) - { - len = strlen(Line); - if (!len) - continue; - - Fname = Line + len - 1; - if (*Fname == '\n') - *Fname = '\0'; - - while (Fname > Line && *Fname != PATH_CHAR) - Fname--; - if (*Fname == PATH_CHAR) - Fname++; - if (*Fname && !skipImageBase) - { - if ((err = get_ImageBase(Line, &ImageBase)) == 0) - fprintf(fw, "%s|%s|%0x\n", Fname, Line, (unsigned int)ImageBase); - else - l2l_dbg(3, "%s|%s|%0x, ERR=%d\n", Fname, Line, (unsigned int)ImageBase, err); - } - } - fclose(fw); - } - l2l_dbg(0, "... done\n"); - fclose(fr); - } - remove(tmp_name); - free(Line); - return 0; -} - -/* EOF */ diff --git a/reactos/tools/log2lines/cache.h b/reactos/tools/log2lines/cache.h deleted file mode 100644 index 0acdd4c0f68..00000000000 --- a/reactos/tools/log2lines/cache.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * ReactOS log2lines - * Written by Jan Roeloffzen - * - * - Image directory caching - */ - -#pragma once - -int check_directory(int force); -int read_cache(void); -int create_cache(int force, int skipImageBase); -int cleanable(char *path); - -/* EOF */ diff --git a/reactos/tools/log2lines/cmd.c b/reactos/tools/log2lines/cmd.c deleted file mode 100644 index ca7afaa8749..00000000000 --- a/reactos/tools/log2lines/cmd.c +++ /dev/null @@ -1,343 +0,0 @@ -/* - * ReactOS log2lines - * Written by Jan Roeloffzen - * - * - Cli for escape commands - */ - -#include -#include -#include - -#include "util.h" -#include "cmd.h" -#include "options.h" -#include "log2lines.h" -#include "help.h" - -/* When you edit the cmd line and/or use the history instead of just typing, - * a bunch of editing BS and space characters - * is inserted, so the string looks right on the console but still - * contains the original string, plus other garbage: - */ -static char -*backSpaceEdit(char *s) -{ - char c; - char *edit = s; - char *text = s; - - while (( c = *edit++ )) - { - switch (c) - { - case KDBG_BS_CHAR: - if (text > s) - text --; - break; - default: - *text++ = c; - } - } - *text = '\0'; - - return s; -} - -static int -handle_switch(FILE *outFile, int *sw, char *arg, char *desc) -{ - int changed =0; - int x = 0; - - if (arg && (strcmp(arg,"") != 0)) - { - x = atoi(arg); - if (x != *sw) - { - *sw = x; - changed = 1; - } - } - if (desc) - { - esclog(outFile, "%s is %d (%s)\n", desc, *sw, changed ? "changed":"unchanged"); - if (!arg) - esclog(outFile, "(readonly)\n"); - } - - return changed; -} - -static int -handle_switch_str(FILE *outFile, char *sw, char *arg, char *desc) -{ - int changed =0; - - if (arg) - { - if (strcmp(arg,"") != 0) - { - if (strcmp(arg,KDBG_ESC_OFF) == 0) - { - if (*sw) - changed = 1; - *sw = '\0'; - } - else if (strcmp(arg, sw) != 0) - { - strcpy(sw, arg); - changed = 1; - } - } - } - if (desc) - { - esclog(outFile, "%s is \"%s\" (%s)\n", desc, sw, changed ? "changed":"unchanged"); - if (!arg) - esclog(outFile, "(readonly)\n"); - } - - return changed; -} - -static int -handle_switch_pstr(FILE *outFile, char **psw, char *arg, char *desc) -{ - int changed =0; - - if (arg) - { - if (strcmp(arg,"") != 0) - { - if (strcmp(arg,KDBG_ESC_OFF) == 0) - { - if (*psw) - changed = 1; - free(*psw); - *psw = NULL; - } - else - { - if (!*psw) - { - *psw = malloc(LINESIZE); - **psw = '\0'; - } - - if (strcmp(arg, *psw) != 0) - { - strcpy(*psw, arg); - changed = 1; - } - } - } - } - if (desc) - { - esclog(outFile, "%s is \"%s\" (%s)\n", desc, *psw, changed ? "changed":"unchanged"); - if (!arg) - esclog(outFile, "(readonly)\n"); - } - - return changed; -} - -static int -handle_address_cmd(FILE *outFile, char *arg) -{ - PLIST_MEMBER plm; - char Image[NAMESIZE]; - DWORD Offset; - int cnt; - char *s; - - if(( s = strchr(arg, ':') )) - { - *s = ' '; - if ( (cnt = sscanf(arg,"%20s %lx", Image, &Offset)) == 2) - { - if (( plm = entry_lookup(&cache, Image) )) - { - if (plm->RelBase != INVALID_BASE) - esclog(outFile, "Address: 0x%lx\n", plm->RelBase + Offset) - else - esclog(outFile, "Relocated base missing for '%s' ('mod' will update)\n", Image); - } - else - esclog(outFile, "Image '%s' not found\n", Image); - } - else - esclog(outFile, "usage: `a :\n"); - } - else - esclog(outFile, "':' expected\n"); - - return 1; -} - -char -handle_escape_cmd(FILE *outFile, char *Line, char *path, char *LineOut) -{ - char cmd; - char sep = '\n'; - char *arg; - char *l = Line; - int res = 1; - int cnt = 0; - int changed = 0; - - l = backSpaceEdit(l); - if (l[1] != KDBG_ESC_CHAR) - return l[1]; //for reprocessing as not escaped - - log(outFile, "\n"); - - l += 2; //skip space+escape character - if ( (cnt=sscanf(l,"%c%c",&cmd,&sep)) < 1) - { - esclog(outFile, "Command expected\n"); - res = 0; - } - - if (res && cnt==2 && sep != ' ') - { - esclog(outFile, "' ' expected\n"); - res = 0; - } - l++; //skip cmd - while ( *l == ' ')l++; //skip more spaces - arg = l; - opt_cli = 1; - switch (cmd) - { - case 'a': - handle_address_cmd(outFile, arg); - break; - case 'h': - usage(1); - break; - case 'b': - if (handle_switch(outFile, &opt_buffered, arg, "-b Logfile buffering")) - set_LogFile(&logFile); //re-open same logfile - break; - case 'c': - handle_switch(outFile, &opt_console, NULL, "-c Console option"); - break; - case 'd': - handle_switch_str(outFile, opt_dir, NULL, "-d Directory option"); - break; - case 'l': - if (handle_switch_str(outFile, opt_logFile, arg, "-l logfile") || (strcmp(opt_mod,"a")!=0)) - { - opt_mod = "a"; - set_LogFile(&logFile); //open new logfile - } - break; - case 'L': - if (handle_switch_str(outFile, opt_logFile, arg, "-L logfile") || (strcmp(opt_mod,"w")!=0)) - { - opt_mod = "w"; - set_LogFile(&logFile); //open new logfile - } - break; - case 'm': - handle_switch(outFile, &opt_Mark, arg, "-m mark (*)"); - break; - case 'M': - handle_switch(outFile, &opt_Mark, arg, "-M Mark (?)"); - break; - case 'P': - handle_switch_str(outFile, opt_Pipe, NULL, "-P Pipeline option"); - break; - case 'q': - opt_quit = 1; - esclog(outFile, "Bye!\n"); - break; - case 'r': - handle_switch(outFile, &opt_raw, arg, "-r Raw"); - break; - case 'R': - changed = handle_switch_pstr(outFile, &opt_Revision, arg, NULL); - opt_Revision_check = 0; - if (opt_Revision) - { - opt_Revision_check = 1; - if (strstr(opt_Revision, "check") == opt_Revision) - { - esclog(outFile, "-R is \"%s\" (%s)\n", opt_Revision, changed ? "changed":"unchanged"); - } - else if (strstr(opt_Revision, "regscan") == opt_Revision) - { - char *s = strchr(opt_Revision, ','); - - revinfo.range = DEF_RANGE; - if (s) - { - *s++ = '\0'; - revinfo.range = atoi(s); - } - regscan(outFile); - } - else if (strstr(opt_Revision, "regclear") == opt_Revision) - { - list_clear(&sources); - summ.regfound = 0; - esclog(outFile, "cleared regression scan results\n"); - } - } - break; - case 's': - if (strcmp(arg,"clear") == 0) - { - memset(&summ, 0, sizeof(SUMM)); - esclog(outFile, "Statistics cleared\n"); - } - else - stat_print(outFile, &summ); - break; - case 'S': - cnt = sscanf(arg, "%d+%d", &opt_Source, &opt_SrcPlus); - if (opt_Source) - { - handle_switch(outFile, &opt_undo, "1", "-u Undo"); - handle_switch(outFile, &opt_redo, "1", "-U Undo and reprocess"); - opt_Revision_check = 1; - } - esclog(outFile, "-S Sources option is %d+%d,\"%s\"\n", opt_Source, opt_SrcPlus, opt_SourcesPath); - esclog(outFile, "(Setting source tree not implemented)\n"); - break; - case 't': - handle_switch(outFile, &opt_twice, arg, "-t Translate twice"); - break; - case 'T': - handle_switch(outFile, &opt_twice, arg, NULL); - handle_switch(outFile, &opt_Twice, arg, "-T Translate for (address-1)"); - break; - case 'u': - handle_switch(outFile, &opt_undo, arg, "-u undo"); - break; - case 'U': - handle_switch(outFile, &opt_undo, arg, NULL); - handle_switch(outFile, &opt_redo, arg, "-U Undo and reprocess"); - break; - case 'v': - handle_switch(outFile, &opt_verbose, arg, "-v Verbosity"); - break; - case 'z': - handle_switch_str(outFile, opt_7z, NULL, "-z 7z path"); - break; - default: - if (strchr(optchars, cmd)) - esclog(outFile, "Command not implemented in cli: %c %s\n",cmd, arg) - else - esclog(outFile, "Unknown command: %c %s\n",cmd, arg); - } - opt_cli = 0; - - memset(Line, '\0', LINESIZE); // flushed - - return KDBG_ESC_CHAR; //handled escaped command -} - -/* EOF */ diff --git a/reactos/tools/log2lines/cmd.h b/reactos/tools/log2lines/cmd.h deleted file mode 100644 index c2380b2b894..00000000000 --- a/reactos/tools/log2lines/cmd.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * ReactOS log2lines - * Written by Jan Roeloffzen - * - * - Cli for escape commands - */ - -#pragma once - -#include - -#define KDBG_BS_CHAR 0x08 -#define KDBG_ESC_CHAR '`' -#define KDBG_ESC_STR "`" -#define KDBG_ESC_RESP "| L2L- " -#define KDBG_ESC_OFF "off" -#define KDBG_PROMPT "kdb:>" //Start interactive (-c) after this pattern -#define KDBG_CONT "---" //Also after this pattern (prompt with no line ending) -#define KDBG_DISCARD "Command '" KDBG_ESC_STR //Discard responses at l2l escape commands - -char handle_escape_cmd(FILE *outFile, char *Line, char *path, char *LineOut); - -/* EOF */ diff --git a/reactos/tools/log2lines/compat.h b/reactos/tools/log2lines/compat.h deleted file mode 100644 index 1b364db725b..00000000000 --- a/reactos/tools/log2lines/compat.h +++ /dev/null @@ -1,37 +0,0 @@ -#pragma once - -#if defined (__DJGPP__) || defined (__WIN32__) - -#include - -#define POPEN _popen -#define PCLOSE _pclose -#define MKDIR(d) _mkdir(d) -#define DEV_NULL "NUL" -#define DOS_PATHS -#define PATH_CHAR '\\' -#define PATH_STR "\\" -#define PATHCMP strcasecmp -#define CP_CMD "copy /Y " -#define DIR_FMT "dir /a:-d /s /b %s > %s" - -#else /* not defined (__DJGPP__) || defined (__WIN32__) */ - -#include -#include - -#define MAX_PATH PATH_MAX -#define POPEN popen -#define PCLOSE pclose -#define MKDIR(d) mkdir(d, S_IRWXU|S_IRWXG|S_IROTH|S_IXOTH) -#define DEV_NULL "/dev/null" -#define UNIX_PATHS -#define PATH_CHAR '/' -#define PATH_STR "/" -#define PATHCMP strcasecmp -#define CP_CMD "cp -f " -#define DIR_FMT "find %s -type f > %s" - -#endif /* not defined (__DJGPP__) || defined (__WIN32__) */ - -/* EOF */ diff --git a/reactos/tools/log2lines/config.h b/reactos/tools/log2lines/config.h deleted file mode 100644 index d1c73898e94..00000000000 --- a/reactos/tools/log2lines/config.h +++ /dev/null @@ -1,37 +0,0 @@ -#pragma once - -/* Assume if an offset > ABS_TRESHOLD, then it must be absolute */ -#define ABS_TRESHOLD 0x00400000L -#define INVALID_BASE 0xFFFFFFFFL - -#define LOGBOTTOM "--------" -#define SVNDB "svndb.log" -#define SVNDB_INX "svndb.inx" -#define DEF_RANGE 500 -#define MAGIC_INX 0x494E585F //'INX_' -#define DEF_OPT_DIR "output-i386" -#define SOURCES_ENV "_ROSBE_ROSSOURCEDIR" -#define CACHEFILE "log2lines.cache" -#define TRKBUILDPREFIX "bootcd-" -#define SVN_PREFIX "/trunk/reactos/" -#define PIPEREAD_CMD "piperead -c" - - -#define CP_FMT CP_CMD "%s %s > " DEV_NULL - -#define CMD_7Z "7z" -#define UNZIP_FMT_7Z "%s e -y %s -o%s > " DEV_NULL -#define UNZIP_FMT "%s x -y -r %s -o%s > " DEV_NULL -#define UNZIP_FMT_CAB \ -"%s x -y -r %s" PATH_STR "reactos" PATH_STR "reactos.cab -o%s" \ -PATH_STR "reactos" PATH_STR "reactos > " DEV_NULL - -/* When we can't use a normal path, because it gets cleaned, - * fallback to name mangling: - */ -#define ALT_PATH_STR "#" - -#define LINESIZE 1024 -#define NAMESIZE 80 - -/* EOF */ diff --git a/reactos/tools/log2lines/help.c b/reactos/tools/log2lines/help.c deleted file mode 100644 index c036d4857c7..00000000000 --- a/reactos/tools/log2lines/help.c +++ /dev/null @@ -1,264 +0,0 @@ -/* - * ReactOS log2lines - * Written by Jan Roeloffzen - * - * - Help text and functions - */ - -#include - -#include "version.h" -#include "compat.h" -#include "config.h" -#include "options.h" -#include "cmd.h" -#include "help.h" - -char *verboseUsage = -"\n" -"Description:\n" -" When are given, log2lines works like raddr2line:\n" -" - The combination can be repeated\n" -" - Also, can be repeated for each \n" -" - NOTE: Some of the options below will have no effect in this form.\n" -" Otherwise it reads stdin and tries to translate lines of the form:\n" -" \n" -" The result is written to stdout.\n\n" -" or
can be absolute or relative with the restrictions:\n" -" - An image with base < 0x400000 MUST be relocated to a > 0x400000 address.\n" -" - The offset of a relocated image MUST be relative.\n\n" -" log2lines uses a cache in order to avoid a directory scan at each\n" -" image lookup, greatly increasing performance. Only image path and its\n" -" base address are cached.\n\n" -"Options:\n" -" -b Use this combined with '-l'. Enable buffering on logFile.\n" -" This may solve loosing output on real hardware (ymmv).\n\n" -" -c Console mode. Outputs text per character instead of per line.\n" -" This is slightly slower but enables to see what you type.\n\n" -" -d |\n" -" : Directory to scan for images. (Do not append a '" PATH_STR "')\n" -" : This option also takes an ISO image as argument:\n" -" - The image is recognized by the '.iso' or '.7z' extension.\n" -" - NOTE: The '.7z' and extracted '.iso' basenames must be identical,\n" -" which is normally true for ReactOS trunk builds.\n" -" - The image will be unpacked to a directory with the same name.\n" -" - The embedded reactos.cab file will also be unpacked.\n" -" - Combined with -f the file will be re-unpacked.\n" -" - NOTE: this ISO unpack feature needs 7z to be in the PATH.\n" -" Default: " DEF_OPT_DIR "\n\n" -" -f Force creating new cache.\n\n" -" -F As -f but exits immediately after creating cache.\n\n" -" -h This text.\n\n" -" -l \n" -" : Append copy to specified logFile.\n" -" Default: no logFile\n\n" -" -L \n" -" : (Over)write copy to specified logFile.\n" -" Default: no logFile\n\n" -" -m Prefix (mark) each translated line with '* '.\n\n" -" -M Prefix (mark) each NOT translated line with '? '.\n" -" ( Only for lines of the form: )\n\n" -" -P \n" -" Pipeline command line. Spawn and pipeline its output to\n" -" log2lines (as stdin). This is for shells lacking support of (one of):\n" -" - Input file redirection.\n" -" - Pipelining byte streams, needed for the -c option.\n\n" -" -r Raw output without translation.\n\n" -" -R \n" -" Revision commands interfacing with SVN. is one of:\n" -" - check:\n" -" To be combined with -S. Check each source file in the log and issue\n" -" a warning if its revision is higher than that of the tested build.\n" -" Also when the revison of the source tree is lower than that of the\n" -" tested build (for every source file).\n" -" In both cases the source file's -S output would be unreliable.\n" -" - update:\n" -" Updates the SVN log file. Currently only generates the index file\n" -" The SVN log file itself must be generated by hand in the sources\n" -" directory like this (-v is mandatory here):\n" -" svn log -v > svndb.log ('svn log' accepts also a range)\n" -" 'svndb.log' and its index are needed for '-R regscan'\n" -" - regscan[,]:\n" -" Scan for regression candidates. Essentially it tries to find\n" -" matches between the SVN log entries and the sources hit by\n" -" a backtrace (bt) command.\n" -" is the amount of revisions to look back from the build\n" -" revision (default 500)\n" -" The output of '-R regscan' is printed after EOF. The 'Changed path'\n" -" lists will contain only matched files.\n" -" Limitations:\n" -" - The bug should really be a regression.\n" -" - Expect a number of false positives.\n" -" - The offending change must be in the sources hit by the backtrace.\n" -" This mostly excludes changes in headerfiles for example.\n" -" - Must be combined with -S.\n" -" Can be combined with -tTS.\n\n" -" -s Statistics. A summary with the following info is printed after EOF:\n" -" *** LOG2LINES SUMMARY ***\n" -" - Translated: Translated lines.\n" -" - Reverted: Lines translated back. See -u option\n" -" - Retranslated: Lines retranslated. See -U option\n" -" - Skipped: Lines not translated.\n" -" - Differ: Lines where (addr-1) info differs. See -tT options\n" -" - Differ(func/src):Lines where also function or source info differ.\n" -" - Rev conflicts: Source files conflicting with build. See '-R check'\n" -" - Reg candidates: Regression candidates. See '-R regscan'\n" -" - Offset error: Image exists, but error retrieving offset info.\n" -" - Total: Total number of lines attempted to translate.\n" -" Also some version info is displayed.\n\n" -" -S [+][,]\n" -" Source line options:\n" -" : Source lines. Display up to lines until linenumber.\n" -" : Optional. Display additional lines after linenumber.\n" -" : Optional. Specify alternate source tree.\n" -" The environment variable " SOURCES_ENV " should be correctly set\n" -" or specify . Use double quotes if the path contains spaces.\n" -" For a reliable result, these sources should be up to date with\n" -" the tested revision (or try '-R check').\n" -" Can be combined with -tTR.\n" -" Implies -U (For retrieving source info) and -R check.\n\n" -" -t Translate twice. The address itself and for (address-1).\n" -" Show extra filename, func and linenumber between [..] if they differ\n" -" So if only the linenumbers differ, then only show the extra\n" -" linenumber.\n\n" -" -T As -t, but show only filename+func+linenumber for (address-1)\n\n" -" -u Undo translations.\n" -" Lines are translated back (reverted) to the form \n" -" Also removes all lines previously added by this tool (e.g. see -S)\n\n" -" -U Undo and reprocess.\n" -" Reverted to the form , and then retranslated\n" -" Implies -u.\n\n" -" -v Show detailed errors and tracing.\n" -" Repeating this option adds more verbosity.\n" -" Default: only (major) errors\n\n" -" -z \n" -" : Specify path to 7z. See also option -d.\n" -" Default: '7z'\n" -"\n" -"CLI escape commands:\n" -" It is possible to change options and perform actions from the 'kdb:>' prompt\n" -" By prepending the `(backquote) character to the option.\n" -" Example: 'kdb:> `l new.log' changes the current logfile to 'new.log'.\n" -" Flag options like 'b' are given a numeric value of 0 (off) or 1 (on).\n" -" Options accepting a string as argument can be cleared by the value '" KDBG_ESC_OFF "'.\n" -" Some ClI commands are read only or not (entirely) implemented.\n" -" If no value is provided, the current one is printed.\n" -" There are a few extra ClI commands or with different behaviour:\n" -" - `a ::\n" -" - Outputs absolute address e.g. for setting breakpoints.\n" -" - Do a 'mod' first to retrieve relocation info.\n" -" - `h : shows this helptext (without exiting)\n" -" - `q : quits log2lines\n" -" - `R regscan : the output is printed immediately (do a 'bt' first)\n" -" - `R regclear : clears previous regscan matches\n" -" - `s : the output is printed immediately\n" -" - `s clear : clears all statistics.\n" -" - `S : only and can be set.\n" -" - `v : sets the current debug loglevel\n" -"\n" -"Option Examples:\n" -" Setup: A VMware machine with its serial port set to: '\\\\.\\pipe\\kdbg'.\n\n" -" Just recreate cache after a svn update or a new module has been added:\n" -" log2lines -F\n\n" -" Use kdbg debugger via console (interactive):\n" -" log2lines -c < \\\\.\\pipe\\kdbg\n\n" -" Use kdbg debugger via console, and append copy to logFile:\n" -" log2lines -c -l dbg.log < \\\\.\\pipe\\kdbg\n\n" -" Same as above, but for PowerShell:\n" -" log2lines -c -l dbg.log -P \"piperead -c \\\\.\\pipe\\kdbg\"\n\n" -" Use kdbg debugger to send output to logfile:\n" -" log2lines < \\\\.\\pipe\\kdbg > dbg.log\n\n" -" Re-translate a debug log:\n" -" log2lines -U -d bootcd-38701-dbg.iso < bugxxxx.log\n\n" -" Re-translate a debug log. Specify a 7z file, which wil be decompressed.\n" -" Also check for (address) - (address-1) differences:\n" -" log2lines -U -t -d bootcd-38701-dbg.7z < bugxxxx.log\n" -" Output:\n" -" \n\n" -" The following commands are equivalent:\n" -" log2lines msi.dll 2e35d msi.dll 2235 msiexec.exe 30a8 msiexec.exe 2e89\n" -" log2lines msi.dll 2e35d 2235 msiexec.exe 30a8 2e89\n\n" -" Generate source lines from backtrace ('bt') output. Show 2 lines of context:\n" -" log2lines -S 2 -d bootcd-38701-dbg.7z < bugxxxx.log\n" -" Output:\n" -" \n" -" | 0258 #else\n" -" | 0259 mainret = main (\n" -" \n" -" | 0159 return __tmainCRTStartup ();\n" -" | 0160 }\n\n" -" Generate source lines. Show 2 lines of context plus 1 additional line and\n" -" specify an alternate source tree:\n" -" log2lines -S 2+1,\"c:\\ros trees\\r44000\" -d bootcd-44000-dbg < dbg.log\n" -" Output:\n" -" \n" -" | 0188 {\n" -" | 0189 r = MSI_ViewFetch( view, &rec );\n" -" | ----\n" -" | 0190 if( r != ERROR_SUCCESS )\n\n" -" Use '-R check' to show that action.c has been changed after the build:\n" -" log2lines -s -d bootcd-43850-dbg.iso -R check -S 2 < dbg.log\n" -" Output:\n" -" \n" -" | 0780 if (create)\n" -" | 0781 rc = RegCreateKeyW(HKEY_LOCAL_MACHINE, keypath, key);\n" -" \n" -" | R--- Conflict : source(44191) > build(43850)\n" -" | 2664 else\n" -" | 2665 rc = MSIREG_OpenUserDataKey(comp->ComponentId,\n\n" -"CLI Examples: (some are based on the option examples above)\n" -" Use '`R check' to show that action.c has been changed after the build:\n" -" kdb:> `R check\n" -" | L2L- -R is \"check\" (changed)\n" -" kdb:> bt\n" -" \n" -" | 0780 if (create)\n" -" | 0781 rc = RegCreateKeyW(HKEY_LOCAL_MACHINE, keypath, key);\n" -" \n" -" | R--- Conflict : source(44191) > build(43850)\n" -" | 2664 else\n" -" | 2665 rc = MSIREG_OpenUserDataKey(comp->ComponentId,\n\n" -" kdb:>\n\n" -" Generate source lines. Show 2 lines of context plus 1 additional line.\n" -" The -Uu options are dependent on -S:\n" -" kdb:> `S 2+1\n" -" | L2L- -u Undo is 1 (changed)\n" -" | L2L- -U Undo and reprocess is 1 (changed)\n" -" | L2L- -S Sources option is 2+1,\"C:\\ROS\\reactos\\\" \n" -" | L2L- (Setting source tree not implemented)\n" -" kdb:> bt\n" -" \n" -" | 0188 {\n" -" | 0189 r = MSI_ViewFetch( view, &rec );\n" -" | ----\n" -" | 0190 if( r != ERROR_SUCCESS )\n" -" kdb:>\n\n" -" Change logfile:\n" -" kdb:> `l\n" -" | L2L- -l logfile is "" (unchanged)\n" -" kdb:> `l new.log\n" -" | L2L- -l logfile is \"new.log\" (changed)\n" -" kdb:> `l off\n" -" | L2L- -l logfile is "" (changed)\n" -" kdb:>\n\n" -" Set a breakpoint with help of 'mod' and '`a':\n" -" \n" -" kdb:> mod (for kernel tracing usually only needed once)\n" -" -- mod output with reloc info\n" -" kdb:> `a msi.dll:2e35d\n" -" | L2L- Address: 0x00096ca0\n" -" kdb:> bpx 0x00096ca0\n\n" -"\n"; - -void -usage(int verbose) -{ - fprintf(stderr, "log2lines " LOG2LINES_VERSION "\n\n"); - fprintf(stderr, "Usage: log2lines -%s { {}}\n", optchars); - if (verbose) - fprintf(stderr, "%s", verboseUsage); - else - fprintf(stderr, "Try log2lines -h\n"); -} - -/* EOF */ diff --git a/reactos/tools/log2lines/help.h b/reactos/tools/log2lines/help.h deleted file mode 100644 index 9f08f57897f..00000000000 --- a/reactos/tools/log2lines/help.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * ReactOS log2lines - * Written by Jan Roeloffzen - * - * - Help text and functions - */ - -#pragma once - -extern char *verboseUsage; - -void usage(int verbose); - -/* EOF */ diff --git a/reactos/tools/log2lines/image.c b/reactos/tools/log2lines/image.c deleted file mode 100644 index bae302b8d51..00000000000 --- a/reactos/tools/log2lines/image.c +++ /dev/null @@ -1,168 +0,0 @@ -/* - * ReactOS log2lines - * Written by Jan Roeloffzen - * - * - Image functions for symbol info - */ - -#include -#include -#include - -#include "compat.h" -#include "util.h" -#include "options.h" -#include "log2lines.h" - -static PIMAGE_SECTION_HEADER -find_rossym_section(PIMAGE_FILE_HEADER PEFileHeader, PIMAGE_SECTION_HEADER PESectionHeaders) -{ - size_t i; - for (i = 0; i < PEFileHeader->NumberOfSections; i++) - { - if (0 == strcmp((char *)PESectionHeaders[i].Name, ".rossym")) - return &PESectionHeaders[i]; - } - return NULL; -} - -size_t -fixup_offset(size_t ImageBase, size_t offset) -{ - if (offset > ABS_TRESHOLD) - offset -= ImageBase; - return offset; -} - -PROSSYM_ENTRY -find_offset(void *data, size_t offset) -{ - PSYMBOLFILE_HEADER RosSymHeader = (PSYMBOLFILE_HEADER)data; - PROSSYM_ENTRY Entries = (PROSSYM_ENTRY)((char *)data + RosSymHeader->SymbolsOffset); - size_t symbols = RosSymHeader->SymbolsLength / sizeof(ROSSYM_ENTRY); - size_t i; - - for (i = 0; i < symbols; i++) - { - if (Entries[i].Address > offset) - { - if (!i--) - return NULL; - else - return &Entries[i]; - } - } - return NULL; -} - -PIMAGE_SECTION_HEADER -get_sectionheader(const void *FileData) -{ - PIMAGE_DOS_HEADER PEDosHeader; - PIMAGE_FILE_HEADER PEFileHeader; - PIMAGE_OPTIONAL_HEADER PEOptHeader; - PIMAGE_SECTION_HEADER PESectionHeaders; - PIMAGE_SECTION_HEADER PERosSymSectionHeader; - size_t ImageBase; - - /* Check if MZ header exists */ - PEDosHeader = (PIMAGE_DOS_HEADER)FileData; - if (PEDosHeader->e_magic != IMAGE_DOS_MAGIC || PEDosHeader->e_lfanew == 0L) - { - l2l_dbg(0, "Input file is not a PE image.\n"); - summ.offset_errors++; - return NULL; - } - - /* Locate PE file header */ - /* sizeof(ULONG) = sizeof(MAGIC) */ - PEFileHeader = (PIMAGE_FILE_HEADER)((char *)FileData + PEDosHeader->e_lfanew + sizeof(ULONG)); - - /* Locate optional header */ - PEOptHeader = (PIMAGE_OPTIONAL_HEADER)(PEFileHeader + 1); - ImageBase = PEOptHeader->ImageBase; - - /* Locate PE section headers */ - PESectionHeaders = (PIMAGE_SECTION_HEADER)((char *)PEOptHeader + PEFileHeader->SizeOfOptionalHeader); - - /* find rossym section */ - PERosSymSectionHeader = find_rossym_section(PEFileHeader, PESectionHeaders); - if (!PERosSymSectionHeader) - { - l2l_dbg(0, "Couldn't find rossym section in executable\n"); - summ.offset_errors++; - return NULL; - } - - return PERosSymSectionHeader; -} - -int -get_ImageBase(char *fname, size_t *ImageBase) -{ - IMAGE_DOS_HEADER PEDosHeader; - IMAGE_FILE_HEADER PEFileHeader; - IMAGE_OPTIONAL_HEADER PEOptHeader; - - FILE *fr; - off_t readLen; - int res; - - *ImageBase = INVALID_BASE; - fr = fopen(fname, "rb"); - if (!fr) - { - l2l_dbg(3, "get_ImageBase, cannot open '%s' (%s)\n", fname, strerror(errno)); - return 1; - } - - readLen = fread(&PEDosHeader, sizeof(IMAGE_DOS_HEADER), 1, fr); - if (1 != readLen) - { - l2l_dbg(1, "get_ImageBase %s, read error IMAGE_DOS_HEADER (%s)\n", fname, strerror(errno)); - fclose(fr); - return 2; - } - - /* Check if MZ header exists */ - if (PEDosHeader.e_magic != IMAGE_DOS_MAGIC || PEDosHeader.e_lfanew == 0L) - { - l2l_dbg(2, "get_ImageBase %s, MZ header missing\n", fname); - fclose(fr); - return 3; - } - - /* Locate PE file header */ - res = fseek(fr, PEDosHeader.e_lfanew + sizeof(ULONG), SEEK_SET); - readLen = fread(&PEFileHeader, sizeof(IMAGE_FILE_HEADER), 1, fr); - if (1 != readLen) - { - l2l_dbg(1, "get_ImageBase %s, read error IMAGE_FILE_HEADER (%s)\n", fname, strerror(errno)); - fclose(fr); - return 4; - } - - /* Locate optional header */ - readLen = fread(&PEOptHeader, sizeof(IMAGE_OPTIONAL_HEADER), 1, fr); - if (1 != readLen) - { - l2l_dbg(1, "get_ImageBase %s, read error IMAGE_OPTIONAL_HEADER (%s)\n", fname, strerror(errno)); - fclose(fr); - return 5; - } - - /* Check if it's really an IMAGE_OPTIONAL_HEADER we are interested in */ - if (PEOptHeader.Magic != IMAGE_NT_OPTIONAL_HDR32_MAGIC && - PEOptHeader.Magic != IMAGE_NT_OPTIONAL_HDR64_MAGIC) - { - l2l_dbg(2, "get_ImageBase %s, not an IMAGE_NT_OPTIONAL_HDR 32/64 bit\n", fname); - fclose(fr); - return 6; - } - - *ImageBase = PEOptHeader.ImageBase; - fclose(fr); - return 0; -} - -/* EOF */ diff --git a/reactos/tools/log2lines/image.h b/reactos/tools/log2lines/image.h deleted file mode 100644 index f9371e0c0eb..00000000000 --- a/reactos/tools/log2lines/image.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ReactOS log2lines - * Written by Jan Roeloffzen - * - * - Image functions for symbol info - */ - -#pragma once - -#include - -size_t fixup_offset(size_t ImageBase, size_t offset); - -PROSSYM_ENTRY find_offset(void *data, size_t offset); - -PIMAGE_SECTION_HEADER get_sectionheader(const void *FileData); - -int get_ImageBase(char *fname, size_t *ImageBase); - -/* EOF */ diff --git a/reactos/tools/log2lines/list.c b/reactos/tools/log2lines/list.c deleted file mode 100644 index 3fdd22b564d..00000000000 --- a/reactos/tools/log2lines/list.c +++ /dev/null @@ -1,219 +0,0 @@ -/* - * ReactOS log2lines - * Written by Jan Roeloffzen - * - * - List handling - */ - -#include -#include -#include - -#include "config.h" -#include "compat.h" -#include "list.h" -#include "util.h" -#include "options.h" - -PLIST_MEMBER -entry_lookup(PLIST list, char *name) -{ - PLIST_MEMBER pprev = NULL; - PLIST_MEMBER pnext; - - if (!name || !name[0]) - return NULL; - - pnext = list->phead; - while (pnext != NULL) - { - if (PATHCMP(name, pnext->name) == 0) - { - if (pprev) - { // move to head for faster lookup next time - pprev->pnext = pnext->pnext; - pnext->pnext = list->phead; - list->phead = pnext; - } - return pnext; - } - pprev = pnext; - pnext = pnext->pnext; - } - return NULL; -} - -PLIST_MEMBER -entry_delete(PLIST_MEMBER pentry) -{ - if (!pentry) - return NULL; - if (pentry->buf) - free(pentry->buf); - free(pentry); - return NULL; -} - -PLIST_MEMBER -entry_insert(PLIST list, PLIST_MEMBER pentry) -{ - if (!pentry) - return NULL; - - pentry->pnext = list->phead; - list->phead = pentry; - if (!list->ptail) - list->ptail = pentry; - return pentry; -} - -void list_clear(PLIST list) -{ - PLIST_MEMBER pentry = list->phead; - PLIST_MEMBER pnext; - while (pentry) - { - pnext = pentry->pnext; - entry_delete(pentry); - pentry = pnext; - } - list->phead = list->ptail = NULL; -} - -#if 0 -LIST_MEMBER * -entry_remove(LIST *list, LIST_MEMBER *pentry) -{ - LIST_MEMBER *pprev = NULL, *p = NULL; - - if (!pentry) - return NULL; - - if (pentry == list->phead) - { - list->phead = pentry->pnext; - p = pentry; - } - else - { - pprev = list->phead; - while (pprev->pnext) - { - if (pprev->pnext == pentry) - { - pprev->pnext = pentry->pnext; - p = pentry; - break; - } - pprev = pprev->pnext; - } - } - if (pentry == list->ptail) - list->ptail = pprev; - - return p; -} -#endif - -PLIST_MEMBER -cache_entry_create(char *Line) -{ - PLIST_MEMBER pentry; - char *s = NULL; - int l; - - if (!Line) - return NULL; - - pentry = malloc(sizeof(LIST_MEMBER)); - if (!pentry) - return NULL; - - l = strlen(Line); - pentry->buf = s = malloc(l + 1); - if (!s) - { - l2l_dbg(1, "Alloc entry failed\n"); - return entry_delete(pentry); - } - - strcpy(s, Line); - if (s[l] == '\n') - s[l] = '\0'; - - pentry->name = s; - s = strchr(s, '|'); - if (!s) - { - l2l_dbg(1, "Name field missing\n"); - return entry_delete(pentry); - } - *s++ = '\0'; - - pentry->path = s; - s = strchr(s, '|'); - if (!s) - { - l2l_dbg(1, "Path field missing\n"); - return entry_delete(pentry); - } - *s++ = '\0'; - if (1 != sscanf(s, "%x", (unsigned int *)(&pentry->ImageBase))) - { - l2l_dbg(1, "ImageBase field missing\n"); - return entry_delete(pentry); - } - pentry->RelBase = INVALID_BASE; - pentry->Size = 0; - return pentry; -} - - -PLIST_MEMBER -sources_entry_create(PLIST list, char *path, char *prefix) -{ - PLIST_MEMBER pentry; - char *s = NULL; - int l; - - if (!path) - return NULL; - if (!prefix) - prefix = ""; - - pentry = malloc(sizeof(LIST_MEMBER)); - if (!pentry) - return NULL; - - l = strlen(path) + strlen(prefix); - pentry->buf = s = malloc(l + 1); - if (!s) - { - l2l_dbg(1, "Alloc entry failed\n"); - return entry_delete(pentry); - } - - strcpy(s, prefix); - strcat(s, path); - if (s[l] == '\n') - s[l] = '\0'; - - pentry->name = s; - if (list) - { - if (entry_lookup(list, pentry->name)) - { - l2l_dbg(1, "Entry %s exists\n", pentry->name); - pentry = entry_delete(pentry); - } - else - { - l2l_dbg(1, "Inserting entry %s\n", pentry->name); - entry_insert(list, pentry); - } - } - - return pentry; -} - -/* EOF */ diff --git a/reactos/tools/log2lines/list.h b/reactos/tools/log2lines/list.h deleted file mode 100644 index fa426d4c0c0..00000000000 --- a/reactos/tools/log2lines/list.h +++ /dev/null @@ -1,27 +0,0 @@ -#pragma once - -typedef struct entry_struct -{ - char *buf; - char *name; - char *path; - size_t ImageBase; - size_t RelBase; - size_t Size; - struct entry_struct *pnext; -} LIST_MEMBER, *PLIST_MEMBER; - -typedef struct list_struct -{ - PLIST_MEMBER phead; - PLIST_MEMBER ptail; -} LIST, *PLIST; - -PLIST_MEMBER entry_lookup(PLIST list, char *name); -PLIST_MEMBER entry_delete(PLIST_MEMBER pentry); -PLIST_MEMBER entry_insert(PLIST list, PLIST_MEMBER pentry); -PLIST_MEMBER cache_entry_create(char *Line); -PLIST_MEMBER sources_entry_create(PLIST list, char *path, char *prefix); -void list_clear(PLIST list); - -/* EOF */ diff --git a/reactos/tools/log2lines/log2lines.c b/reactos/tools/log2lines/log2lines.c deleted file mode 100644 index c00cfd378b5..00000000000 --- a/reactos/tools/log2lines/log2lines.c +++ /dev/null @@ -1,672 +0,0 @@ -/* - * ReactOS log2lines - * Written by Jan Roeloffzen - * - * - Initialization, translation and main loop - */ - -#include -#include -#include -#include - -#include "util.h" -#include "version.h" -#include "compat.h" -#include "options.h" -#include "image.h" -#include "cache.h" -#include "log2lines.h" -#include "help.h" -#include "cmd.h" -#include "match.h" - - -static FILE *dbgIn = NULL; -static FILE *dbgOut = NULL; -static FILE *conIn = NULL; -static FILE *conOut = NULL; -static const char *kdbg_prompt = KDBG_PROMPT; -static const char *kdbg_cont = KDBG_CONT; - -LIST sources; -LINEINFO lastLine; -FILE *logFile = NULL; -LIST cache; -SUMM summ; -REVINFO revinfo; - - -static void -clearLastLine(void) -{ - memset(&lastLine, 0, sizeof(LINEINFO)); -} - -static void -log_file(FILE *outFile, char *fileName, int line) -{ - int i = 0, min = 0, max = 0; - char s[LINESIZE]; - FILE *src; - - strcpy(s, opt_SourcesPath); - strcat(s, fileName); - - max = line + opt_SrcPlus; - if ((src = fopen(s, "r"))) - { - min = line - opt_Source; - min = (min < 0) ? 0 : min; - while (i < max && fgets(s, LINESIZE, src)) - { - if (i >= min) - { - if (i == line) - log(outFile, "| ----\n"); - log(outFile, "| %4.4d %s", i + 1, s); - } - i++; - } - fclose(src); - if ( i < min ) - log(outFile, "| S--- source has only %d lines! (check source/revision)\n", i); - } - else - l2l_dbg(1, "Can't open: %s (check " SOURCES_ENV ")\n", s); -} - -static void -logSource(FILE *outFile) -{ - log_file(outFile, lastLine.file1, lastLine.nr1); - if (lastLine.nr2) - { - log(outFile, "| ---- [%u] ----\n", lastLine.nr2); - log_file(outFile, lastLine.file2, lastLine.nr2); - } -} - -static void -reportSource(FILE *outFile) -{ - if (!opt_Source) - return; - if (lastLine.valid) - logSource(outFile); -} - -static void -report(FILE *outFile) -{ - reportRevision(outFile); - reportSource(outFile); - clearLastLine(); -} - - -static int -print_offset(void *data, size_t offset, char *toString) -{ - PSYMBOLFILE_HEADER RosSymHeader = (PSYMBOLFILE_HEADER)data; - PROSSYM_ENTRY e = NULL; - PROSSYM_ENTRY e2 = NULL; - int bFileOffsetChanged = 0; - char fmt[LINESIZE]; - char *Strings = (char *)data + RosSymHeader->StringsOffset; - - fmt[0] = '\0'; - e = find_offset(data, offset); - if (opt_twice) - { - e2 = find_offset(data, offset - 1); - - if (e == e2) - e2 = NULL; - else - summ.diff++; - - if (opt_Twice && e2) - { - e = e2; - e2 = NULL; - /* replaced (transparantly), but updated stats */ - } - } - if (e || e2) - { - strcpy(lastLine.file1, &Strings[e->FileOffset]); - strcpy(lastLine.func1, &Strings[e->FunctionOffset]); - lastLine.nr1 = e->SourceLine; - sources_entry_create(&sources, lastLine.file1, SVN_PREFIX); - lastLine.valid = 1; - if (e2) - { - strcpy(lastLine.file2, &Strings[e2->FileOffset]); - strcpy(lastLine.func2, &Strings[e2->FunctionOffset]); - lastLine.nr2 = e2->SourceLine; - sources_entry_create(&sources, lastLine.file2, SVN_PREFIX); - bFileOffsetChanged = e->FileOffset != e2->FileOffset; - if (e->FileOffset != e2->FileOffset || e->FunctionOffset != e2->FunctionOffset) - summ.majordiff++; - - /* - * - "%.0s" displays nothing, but processes argument - * - bFileOffsetChanged implies always display 2nd SourceLine even if the same - * - also for FunctionOffset - */ - strcat(fmt, "%s"); - if (bFileOffsetChanged) - strcat(fmt, "[%s]"); - else - strcat(fmt, "%.0s"); - - strcat(fmt, ":%u"); - if (e->SourceLine != e2->SourceLine || bFileOffsetChanged) - strcat(fmt, "[%u]"); - else - strcat(fmt, "%.0u"); - - strcat(fmt, " (%s"); - if (e->FunctionOffset != e2->FunctionOffset || bFileOffsetChanged) - strcat(fmt, "[%s])"); - else - strcat(fmt, "%.0s)"); - - if (toString) - { // put in toString if provided - snprintf(toString, LINESIZE, fmt, - &Strings[e->FileOffset], - &Strings[e2->FileOffset], - (unsigned int)e->SourceLine, - (unsigned int)e2->SourceLine, - &Strings[e->FunctionOffset], - &Strings[e2->FunctionOffset]); - } - else - { - strcat(fmt, "\n"); - printf(fmt, - &Strings[e->FileOffset], - &Strings[e2->FileOffset], - (unsigned int)e->SourceLine, - (unsigned int)e2->SourceLine, - &Strings[e->FunctionOffset], - &Strings[e2->FunctionOffset]); - } - } - else - { - if (toString) - { // put in toString if provided - snprintf(toString, LINESIZE, "%s:%u (%s)", - &Strings[e->FileOffset], - (unsigned int)e->SourceLine, - &Strings[e->FunctionOffset]); - } - else - { - printf("%s:%u (%s)\n", - &Strings[e->FileOffset], - (unsigned int)e->SourceLine, - &Strings[e->FunctionOffset]); - } - } - return 0; - } - return 1; -} - -static int -process_data(const void *FileData, size_t offset, char *toString) -{ - int res; - - PIMAGE_SECTION_HEADER PERosSymSectionHeader = get_sectionheader((char *)FileData); - if (!PERosSymSectionHeader) - return 2; - - res = print_offset((char *)FileData + PERosSymSectionHeader->PointerToRawData, offset, toString); - if (res) - { - if (toString) - sprintf(toString, "??:0"); - else - printf("??:0"); - l2l_dbg(1, "Offset not found: %x\n", (unsigned int)offset); - summ.offset_errors++; - } - - return res; -} - -static int -process_file(const char *file_name, size_t offset, char *toString) -{ - void *FileData; - size_t FileSize; - int res = 1; - - FileData = load_file(file_name, &FileSize); - if (!FileData) - { - l2l_dbg(0, "An error occured loading '%s'\n", file_name); - } - else - { - res = process_data(FileData, offset, toString); - free(FileData); - } - return res; -} - -static int -translate_file(const char *cpath, size_t offset, char *toString) -{ - size_t base = 0; - LIST_MEMBER *pentry = NULL; - int res = 0; - char *path, *dpath; - - dpath = path = convert_path(cpath); - if (!path) - return 1; - - // The path could be absolute: - if (get_ImageBase(path, &base)) - { - pentry = entry_lookup(&cache, path); - if (pentry) - { - path = pentry->path; - base = pentry->ImageBase; - if (base == INVALID_BASE) - { - l2l_dbg(1, "No, or invalid base address: %s\n", path); - res = 2; - } - } - else - { - l2l_dbg(1, "Not found in cache: %s\n", path); - res = 3; - } - } - - if (!res) - { - res = process_file(path, offset, toString); - } - - free(dpath); - return res; -} - -static void -translate_char(int c, FILE *outFile) -{ - fputc(c, outFile); - if (logFile) - fputc(c, logFile); -} - -static char * -remove_mark(char *Line) -{ - if (Line[1] == ' ' && Line[2] == '<') - if (Line[0] == '*' || Line[0] == '?') - return Line + 2; - return Line; -} - -static void -translate_line(FILE *outFile, char *Line, char *path, char *LineOut) -{ - size_t offset; - int cnt, res; - char *sep, *tail, *mark, *s; - unsigned char ch; - - if (!*Line) - return; - - res = 1; - mark = ""; - s = remove_mark(Line); - if (opt_undo) - { - /* Strip all lines added by this tool: */ - char buf[NAMESIZE]; - if (sscanf(s, "| %s", buf) == 1) - if (buf[0] == '0' || strcmp(buf, "----") == 0 || strcmp(buf, "L2L-") == 0 || strcmp(buf, "S---") == 0 || strcmp(buf, "R---") == 0 || atoi(buf)) - res = 0; - } - - sep = strchr(s, ':'); - if (sep) - { - *sep = ' '; - cnt = sscanf(s, "<%s %x%c", path, (unsigned int *)(&offset), &ch); - if (opt_undo) - { - if (cnt == 3 && ch == ' ') - { - tail = strchr(s, '>'); - tail = tail ? tail - 1 : tail; - if (tail && tail[0] == ')' && tail[1] == '>') - { - res = 0; - tail += 2; - mark = opt_mark ? "* " : ""; - if (opt_redo && !(res = translate_file(path, offset, LineOut))) - { - log(outFile, "%s<%s:%x (%s)>%s", mark, path, (unsigned int)offset, LineOut, tail); - summ.redo++; - } - else - { - log(outFile, "%s<%s:%x>%s", mark, path, (unsigned int)offset, tail); - summ.undo++; - } - } - else - { - mark = opt_Mark ? "? " : ""; - summ.skipped++; - } - summ.total++; - } - } - - if (!opt_undo || opt_redo) - { - if (cnt == 3 && ch == '>') - { - tail = strchr(s, '>') + 1; - if (!(res = translate_file(path, offset, LineOut))) - { - mark = opt_mark ? "* " : ""; - log(outFile, "%s<%s:%x (%s)>%s", mark, path, (unsigned int)offset, LineOut, tail); - summ.translated++; - } - else - { - mark = opt_Mark ? "? " : ""; - summ.skipped++; - } - summ.total++; - } - } - } - if (res) - { - if (sep) - *sep = ':'; // restore because not translated - log(outFile, "%s%s", mark, s); - } - memset(Line, '\0', LINESIZE); // flushed -} - -static int -translate_files(FILE *inFile, FILE *outFile) -{ - char *Line = malloc(LINESIZE + 1); - char *path = malloc(LINESIZE + 1); - char *LineOut = malloc(LINESIZE + 1); - int c; - unsigned char ch; - int i = 0; - const char *pc = kdbg_cont; - const char *p = kdbg_prompt; - const char *p_eos = p + sizeof(KDBG_PROMPT) - 1; //end of string pos - - if (Line && path && LineOut) - { - memset(Line, '\0', LINESIZE + 1); - if (opt_console) - { - while ((c = fgetc(inFile)) != EOF) - { - if (opt_quit)break; - - ch = (unsigned char)c; - if (!opt_raw) - { - switch (ch) - { - case '\n': - if ( strncmp(Line, KDBG_DISCARD, sizeof(KDBG_DISCARD)-1) == 0 ) - { - memset(Line, '\0', LINESIZE); // flushed - } - else - { - Line[1] = handle_escape_cmd(outFile, Line, path, LineOut); - if (Line[1] != KDBG_ESC_CHAR) - { - if (p == p_eos) - { - // kdbg prompt, so already echoed char by char - memset(Line, '\0', LINESIZE); - translate_char(c, outFile); - } - else - { - if (match_line(outFile, Line)) - { - translate_line(outFile, Line, path, LineOut); - translate_char(c, outFile); - report(outFile); - } - } - } - } - i = 0; - p = kdbg_prompt; - pc = kdbg_cont; - break; - case '<': - i = 0; - Line[i++] = ch; - break; - case '>': - if (ch == *p) - { - p = p_eos; - translate_line(outFile, Line, path, LineOut); - } - - if (p != p_eos) - { - if (i < LINESIZE) - { - Line[i++] = ch; - translate_line(outFile, Line, path, LineOut); - } - else - { - translate_line(outFile, Line, path, LineOut); - translate_char(c, outFile); - } - } - else - translate_char(c, outFile); - i = 0; - break; - default: - if (ch == *p)p++; - if (ch == *pc)pc++; - if (i < LINESIZE) - { - Line[i++] = ch; - if (p == p_eos) - { - translate_char(c, outFile); - } - else if (!*pc) - { - translate_line(outFile, Line, path, LineOut); - i = 0; - } - } - else - { - translate_line(outFile, Line, path, LineOut); - translate_char(c, outFile); - i = 0; - } - } - } - else - translate_char(c, outFile); - } - } - else - { // Line by line, slightly faster but less interactive - while (fgets(Line, LINESIZE, inFile) != NULL) - { - if (opt_quit)break; - - if (!opt_raw) - { - translate_line(outFile, Line, path, LineOut); - report(outFile); - } - else - log(outFile, "%s", Line); - } - } - } - - if (opt_Revision && (strstr(opt_Revision, "regscan") == opt_Revision)) - { - char *s = strchr(opt_Revision, ','); - if (s) - { - *s++ = '\0'; - revinfo.range = atoi(s); - } - regscan(outFile); - } - - if (opt_stats) - { - stat_print(outFile, &summ); - if (logFile) - stat_print(logFile, &summ); - } - free(LineOut); - free(Line); - free(path); - return 0; -} - - -int -main(int argc, const char **argv) -{ - int res = 0; - int optCount = 0; - - dbgIn = stdin; - conOut = stdout; - (void)conIn; - (void)dbgOut; - - memset(&cache, 0, sizeof(LIST)); - memset(&sources, 0, sizeof(LIST)); - stat_clear(&summ); - memset(&revinfo, 0, sizeof(REVINFO)); - clearLastLine(); - - optionInit(argc, argv); - optCount = optionParse(argc, argv); - if (optCount < 0) - { - return optCount; - } - - argc -= optCount; - - if (opt_Revision && (strcmp(opt_Revision, "update") == 0)) - { - res = updateSvnlog(); - return res; - } - - if (check_directory(opt_force)) - return 3; - - create_cache(opt_force, 0); - if (opt_exit) - return 0; - - read_cache(); - l2l_dbg(4, "Cache read complete\n"); - - if (set_LogFile(&logFile)) - return 2; - l2l_dbg(4, "opt_logFile processed\n"); - - if (opt_Pipe) - { - l2l_dbg(3, "Command line: \"%s\"\n",opt_Pipe); - - if (!(dbgIn = POPEN(opt_Pipe, "r"))) - { - dbgIn = stdin; //restore - l2l_dbg(0, "Could not popen '%s' (%s)\n", opt_Pipe, strerror(errno)); - free(opt_Pipe); opt_Pipe = NULL; - } - } - l2l_dbg(4, "opt_Pipe processed\n"); - - if (argc > 1) - { // translate { } - int i = 1; - const char *exefile = NULL; - const char *offset = NULL; - char Line[LINESIZE + 1]; - - while (i < argc) - { - Line[0] = '\0'; - offset = argv[optCount + i++]; - if (isOffset(offset)) - { - if (exefile) - { - l2l_dbg(2, "translating %s %s\n", exefile, offset); - translate_file(exefile, my_atoi(offset), Line); - printf("%s\n", Line); - report(conOut); - } - else - { - l2l_dbg(0, " expected\n"); - res = 3; - break; - } - } - else - { - // Not an offset so must be an exefile: - exefile = offset; - } - } - } - else - { // translate logging from stdin - translate_files(dbgIn, conOut); - } - - if (logFile) - fclose(logFile); - - if (opt_Pipe) - PCLOSE(dbgIn); - - return res; -} - -/* EOF */ diff --git a/reactos/tools/log2lines/log2lines.h b/reactos/tools/log2lines/log2lines.h deleted file mode 100644 index f7fd9ff8e87..00000000000 --- a/reactos/tools/log2lines/log2lines.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once - -#include -#include - -#include "config.h" -#include "revision.h" -#include "stat.h" -#include "list.h" - - -struct lineinfo_struct -{ - int valid; - char file1[LINESIZE]; - char func1[NAMESIZE]; - int nr1; - char file2[LINESIZE]; - char func2[NAMESIZE]; - int nr2; -}; - -typedef struct lineinfo_struct LINEINFO; - -extern SUMM summ; -extern REVINFO revinfo; -extern LIST cache; -extern FILE *logFile; -extern LINEINFO lastLine; -extern LIST sources; - -/* EOF */ diff --git a/reactos/tools/log2lines/log2lines.mak b/reactos/tools/log2lines/log2lines.mak deleted file mode 100644 index d19d6c09a9a..00000000000 --- a/reactos/tools/log2lines/log2lines.mak +++ /dev/null @@ -1,99 +0,0 @@ -RSYM_BASE = $(TOOLS_BASE)$(SEP)rsym -RSYM_BASE_ = $(RSYM_BASE)$(SEP) -LOG2LINES_BASE = $(TOOLS_BASE_)log2lines -LOG2LINES_BASE_ = $(LOG2LINES_BASE)$(SEP) - -LOG2LINES_INT = $(INTERMEDIATE_)$(LOG2LINES_BASE) -LOG2LINES_INT_ = $(LOG2LINES_INT)$(SEP) -LOG2LINES_OUT = $(OUTPUT_)$(LOG2LINES_BASE) -LOG2LINES_OUT_ = $(LOG2LINES_OUT)$(SEP) - -$(LOG2LINES_INT): | $(TOOLS_INT) - $(ECHO_MKDIR) - ${mkdir} $@ - -ifneq ($(INTERMEDIATE),$(OUTPUT)) -$(LOG2LINES_OUT): | $(TOOLS_OUT) - $(ECHO_MKDIR) - ${mkdir} $@ -endif - -LOG2LINES_TARGET = \ - $(LOG2LINES_OUT_)log2lines$(EXEPOSTFIX) - -LOG2LINES_SOURCES = \ - $(LOG2LINES_BASE_)list.c \ - $(LOG2LINES_BASE_)util.c \ - $(LOG2LINES_BASE_)options.c \ - $(LOG2LINES_BASE_)help.c \ - $(LOG2LINES_BASE_)cache.c \ - $(LOG2LINES_BASE_)image.c \ - $(LOG2LINES_BASE_)stat.c \ - $(LOG2LINES_BASE_)revision.c \ - $(LOG2LINES_BASE_)cmd.c \ - $(LOG2LINES_BASE_)match.c \ - $(LOG2LINES_BASE_)log2lines.c \ - $(RSYM_BASE_)rsym_common.c - -LOG2LINES_OBJECTS = \ - $(addprefix $(INTERMEDIATE_), $(LOG2LINES_SOURCES:.c=.o)) - -LOG2LINES_HOST_CFLAGS = $(TOOLS_CFLAGS) -I $(RSYM_BASE) - -LOG2LINES_HOST_LFLAGS = $(TOOLS_LFLAGS) - -.PHONY: log2lines -log2lines: $(LOG2LINES_TARGET) - -$(LOG2LINES_TARGET): $(LOG2LINES_OBJECTS) | $(LOG2LINES_OUT) - $(ECHO_HOSTLD) - ${host_gcc} $(LOG2LINES_OBJECTS) $(LOG2LINES_HOST_LFLAGS) -o $@ - -$(LOG2LINES_INT_)log2lines.o: $(LOG2LINES_BASE_)log2lines.c | $(LOG2LINES_INT) - $(ECHO_HOSTCC) - ${host_gcc} $(LOG2LINES_HOST_CFLAGS) -c $< -o $@ - -$(LOG2LINES_INT_)util.o: $(LOG2LINES_BASE_)util.c | $(LOG2LINES_INT) - $(ECHO_HOSTCC) - ${host_gcc} $(LOG2LINES_HOST_CFLAGS) -c $< -o $@ - -$(LOG2LINES_INT_)list.o: $(LOG2LINES_BASE_)list.c | $(LOG2LINES_INT) - $(ECHO_HOSTCC) - ${host_gcc} $(LOG2LINES_HOST_CFLAGS) -c $< -o $@ - -$(LOG2LINES_INT_)options.o: $(LOG2LINES_BASE_)options.c | $(LOG2LINES_INT) - $(ECHO_HOSTCC) - ${host_gcc} $(LOG2LINES_HOST_CFLAGS) -c $< -o $@ - -$(LOG2LINES_INT_)help.o: $(LOG2LINES_BASE_)help.c | $(LOG2LINES_INT) - $(ECHO_HOSTCC) - ${host_gcc} $(LOG2LINES_HOST_CFLAGS) -c $< -o $@ - -$(LOG2LINES_INT_)cache.o: $(LOG2LINES_BASE_)cache.c | $(LOG2LINES_INT) - $(ECHO_HOSTCC) - ${host_gcc} $(LOG2LINES_HOST_CFLAGS) -c $< -o $@ - -$(LOG2LINES_INT_)image.o: $(LOG2LINES_BASE_)image.c | $(LOG2LINES_INT) - $(ECHO_HOSTCC) - ${host_gcc} $(LOG2LINES_HOST_CFLAGS) -c $< -o $@ - -$(LOG2LINES_INT_)stat.o: $(LOG2LINES_BASE_)stat.c | $(LOG2LINES_INT) - $(ECHO_HOSTCC) - ${host_gcc} $(LOG2LINES_HOST_CFLAGS) -c $< -o $@ - -$(LOG2LINES_INT_)revision.o: $(LOG2LINES_BASE_)revision.c | $(LOG2LINES_INT) - $(ECHO_HOSTCC) - ${host_gcc} $(LOG2LINES_HOST_CFLAGS) -c $< -o $@ - -$(LOG2LINES_INT_)cmd.o: $(LOG2LINES_BASE_)cmd.c | $(LOG2LINES_INT) - $(ECHO_HOSTCC) - ${host_gcc} $(LOG2LINES_HOST_CFLAGS) -c $< -o $@ - -$(LOG2LINES_INT_)match.o: $(LOG2LINES_BASE_)match.c | $(LOG2LINES_INT) - $(ECHO_HOSTCC) - ${host_gcc} $(LOG2LINES_HOST_CFLAGS) -c $< -o $@ - -.PHONY: log2lines_clean -log2lines_clean: - -@$(rm) $(LOG2LINES_TARGET) $(LOG2LINES_OBJECTS) 2>$(NUL) -clean: log2lines_clean diff --git a/reactos/tools/log2lines/match.c b/reactos/tools/log2lines/match.c deleted file mode 100644 index 256a8b71902..00000000000 --- a/reactos/tools/log2lines/match.c +++ /dev/null @@ -1,91 +0,0 @@ -/* - * ReactOS log2lines - * Written by Jan Roeloffzen - * - * - Custom match routines - */ - -#include - -#include "config.h" -#include "log2lines.h" -#include "match.h" - -// break pattern: show source+line -static int match_break(FILE *outFile, char *Line, int processed) -{ - static int state = 0; - - if ( processed ) return processed; - switch (state) - { - case 1: - state = 0; - break; - default: - state = 0; - } - return 1; -} -// "mod" command: update relocated addresses -static int match_mod(FILE *outFile, char *Line, int processed) -{ - static int state = 0; - char Image[NAMESIZE]; - DWORD Base; - DWORD Size; - PLIST_MEMBER plm; - - int cnt; - - if ( processed ) return processed; - if ( (cnt = sscanf(Line," Base Size %5s", Image)) == 1 ) - { - l2l_dbg(1, "Module relocate list:\n"); - state = 1; - return 0; - } - switch (state) - { - case 1: - if ( (cnt = sscanf(Line,"%lx %lx %20s", &Base, &Size, Image)) == 3 ) - { - if (( plm = entry_lookup(&cache, Image) )) - { - plm->RelBase = Base; - plm->Size = Size; - l2l_dbg(1, "Relocated: %s %08x -> %08x\n", Image, plm->ImageBase, plm->RelBase); - } - return 0; - } - else - { - state = 0; - } - break; - default: - state = 0; - } - return 1; -} - -int match_line(FILE *outFile, char *Line) -{ - int processed = 1; - - if ( *Line == '\n' || *Line == '\0' ) - return 1; - if ( strncmp(Line, KDBG_CONT, sizeof(KDBG_CONT)-1 ) == 0 ) - return 1; - - processed = match_mod(outFile, Line, processed); - processed = match_break(outFile, Line, processed); - /* more to be appended here: - * processed = match_xxx(outFile, Line, processed ); - * ... - */ - - return (int)(Line[0]); -} - -/* EOF */ diff --git a/reactos/tools/log2lines/match.h b/reactos/tools/log2lines/match.h deleted file mode 100644 index 436c0134fc5..00000000000 --- a/reactos/tools/log2lines/match.h +++ /dev/null @@ -1,5 +0,0 @@ -#include "util.h" - -int match_line(FILE *outFile, char *Line); - -/* EOF */ diff --git a/reactos/tools/log2lines/options.c b/reactos/tools/log2lines/options.c deleted file mode 100644 index efa77e44d18..00000000000 --- a/reactos/tools/log2lines/options.c +++ /dev/null @@ -1,222 +0,0 @@ -/* - * ReactOS log2lines - * Written by Jan Roeloffzen - * - * - Option init and parsing - */ - -#include -#include -#include -#include - -#include "util.h" -#include "compat.h" -#include "config.h" -#include "help.h" -#include "log2lines.h" -#include "options.h" - -char *optchars = "bcd:fFhl:L:mMP:rR:sS:tTuUvz:"; -int opt_buffered = 0; // -b -int opt_help = 0; // -h -int opt_force = 0; // -f -int opt_exit = 0; // -e -int opt_verbose = 0; // -v -int opt_console = 0; // -c -int opt_mark = 0; // -m -int opt_Mark = 0; // -M -char *opt_Pipe = NULL; // -P -int opt_quit = 0; // -q (cli only) -int opt_cli = 0; // (cli internal) -int opt_raw = 0; // -r -int opt_stats = 0; // -s -int opt_Source = 0; // -S [+][,] -int opt_SrcPlus = 0; // -S [+][,] -int opt_twice = 0; // -t -int opt_Twice = 0; // -T -int opt_undo = 0; // -u -int opt_redo = 0; // -U -char *opt_Revision = NULL; // -R -int opt_Revision_check = 0; // -R check -char opt_dir[MAX_PATH]; // -d -char opt_logFile[MAX_PATH]; // -l|L -char *opt_mod = NULL; // -mod for opt_logFile -char opt_7z[MAX_PATH]; // -z -char opt_scanned[LINESIZE]; // all scanned options -char opt_SourcesPath[LINESIZE]; //sources path - -int optionInit(int argc, const char **argv) -{ - int i; - char *s; - - opt_mod = "a"; - strcpy(opt_dir, ""); - strcpy(opt_logFile, ""); - strcpy(opt_7z, CMD_7Z); - strcpy(opt_SourcesPath, ""); - if ((s = getenv(SOURCES_ENV))) - strcpy(opt_SourcesPath, s); - revinfo.rev = getRevision(NULL, 1); - revinfo.range = DEF_RANGE; - revinfo.buildrev = getTBRevision(opt_dir); - l2l_dbg(1, "Trunk build revision: %d\n", revinfo.buildrev); - - strcpy(opt_scanned, ""); - for (i = 1; i < argc; i++) - { - if ((argv[i][0] == '-') && (i+1 < argc)) - { - //Because these arguments can contain spaces we cant use getopt(), a known bug: - switch (argv[i][1]) - { - case 'd': - strcpy(opt_dir, argv[i+1]); - break; - case 'L': - opt_mod = "w"; - //fall through - case 'l': - strcpy(opt_logFile, argv[i+1]); - break; - case 'P': - free(opt_Pipe); - opt_Pipe = malloc(LINESIZE); - strcpy(opt_Pipe, argv[i+1]); - break; - case 'z': - strcpy(opt_7z, argv[i+1]); - break; - } - } - strcat(opt_scanned, argv[i]); - strcat(opt_scanned, " "); - } - - l2l_dbg(4,"opt_scanned=[%s]\n",opt_scanned); - - return 0; -} - -int optionParse(int argc, const char **argv) -{ - int i; - int optCount = 0; - int opt; - - while (-1 != (opt = getopt(argc, (char **const)argv, optchars))) - { - switch (opt) - { - case 'b': - opt_buffered++; - break; - case 'c': - opt_console++; - break; - case 'd': - optCount++; - //just count, see optionInit() - break; - case 'f': - opt_force++; - break; - case 'h': - opt_help++; - usage(1); - return -1; - break; - case 'F': - opt_exit++; - opt_force++; - break; - case 'l': - optCount++; - //just count, see optionInit() - break; - case 'm': - opt_mark++; - break; - case 'M': - opt_Mark++; - break; - case 'r': - opt_raw++; - break; - case 'P': - optCount++; - //just count, see optionInit() - break; - case 'R': - optCount++; - free(opt_Revision); - opt_Revision = malloc(LINESIZE); - sscanf(optarg, "%s", opt_Revision); - if (strcmp(opt_Revision, "check") == 0) - opt_Revision_check ++; - break; - case 's': - opt_stats++; - break; - case 'S': - optCount++; - i = sscanf(optarg, "%d+%d,%s", &opt_Source, &opt_SrcPlus, opt_SourcesPath); - if (i == 1) - sscanf(optarg, "%*d,%s", opt_SourcesPath); - l2l_dbg(3, "Sources option parse result: %d+%d,\"%s\"\n", opt_Source, opt_SrcPlus, opt_SourcesPath); - if (opt_Source) - { - /* need to retranslate for source info: */ - opt_undo++; - opt_redo++; - opt_Revision_check ++; - } - break; - case 't': - opt_twice++; - break; - case 'T': - opt_twice++; - opt_Twice++; - break; - case 'u': - opt_undo++; - break; - case 'U': - opt_undo++; - opt_redo++; - break; - case 'v': - opt_verbose++; - break; - case 'z': - optCount++; - strcpy(opt_7z, optarg); - break; - default: - usage(0); - return -2; - break; - } - optCount++; - } - if(opt_console) - { - l2l_dbg(2, "Note: use 's' command in console mode. Statistics option disabled\n"); - opt_stats = 0; - } - if (opt_SourcesPath[0]) - { - strcat(opt_SourcesPath, PATH_STR); - } - if (!opt_dir[0]) - { - strcpy(opt_dir, opt_SourcesPath); - strcat(opt_dir, DEF_OPT_DIR); - } - - return optCount; -} - -/* EOF */ diff --git a/reactos/tools/log2lines/options.h b/reactos/tools/log2lines/options.h deleted file mode 100644 index a3f2d75ba83..00000000000 --- a/reactos/tools/log2lines/options.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * ReactOS log2lines - * Written by Jan Roeloffzen - * - * - Option parsing - */ - -#pragma once - -extern char *optchars; -extern int opt_buffered; // -b -extern int opt_help; // -h -extern int opt_force; // -f -extern int opt_exit; // -e -extern int opt_verbose; // -v -extern int opt_console; // -c -extern int opt_mark; // -m -extern int opt_Mark; // -M -extern char *opt_Pipe; // -P -extern int opt_quit; // -q (cli only) -extern int opt_cli; // (cli internal) -extern int opt_raw; // -r -extern int opt_stats; // -s -extern int opt_Source; // -S [+][,] -extern int opt_SrcPlus; // -S [+][,] -extern int opt_twice; // -t -extern int opt_Twice ; // -T -extern int opt_undo ; // -u -extern int opt_redo ; // -U -extern char *opt_Revision; // -R -extern int opt_Revision_check; // -R check -extern char opt_dir[]; // -d -extern char opt_logFile[]; // -l -extern char *opt_mod; // mod for opt_logFile -extern char opt_7z[]; // -z -extern char opt_scanned[]; // all scanned options - -extern char opt_SourcesPath[]; //sources path - -int optionInit(int argc, const char **argv); -int optionParse(int argc, const char **argv); - -/* EOF */ diff --git a/reactos/tools/log2lines/revision.c b/reactos/tools/log2lines/revision.c deleted file mode 100644 index ae5fa17da37..00000000000 --- a/reactos/tools/log2lines/revision.c +++ /dev/null @@ -1,299 +0,0 @@ -/* - * ReactOS log2lines - * Written by Jan Roeloffzen - * - * - SVN interface and revision analysis - */ - -#include -#include -#include - -#include "version.h" -#include "compat.h" -#include "util.h" -#include "options.h" -#include "log2lines.h" - -static void -log_rev_check(FILE *outFile, char *fileName, int showfile) -{ - int rev = 0; - char s[LINESIZE]; - - strcpy(s, opt_SourcesPath); - strcat(s, fileName); - rev = getRevision(s, 1); - if (!showfile) - s[0] = '\0'; - if (revinfo.opt_verbose) - log(outFile, "| R--- %s Last Changed Rev: %d\n", s, rev); - - if (rev && opt_Revision_check) - { - if (revinfo.rev < revinfo.buildrev) - { - summ.revconflicts++; - log(outFile, "| R--- Conflict %s: source tree(%d) < build(%d)\n", s, rev, revinfo.buildrev); - } - else if (rev > revinfo.buildrev) - { - summ.revconflicts++; - log(outFile, "| R--- Conflict %s: file(%d) > build(%d)\n", s, rev, revinfo.buildrev); - } - } -} - -static void -logRevCheck(FILE *outFile) -{ - int twice = 0; - - twice = (lastLine.nr2 && strcmp(lastLine.file1, lastLine.file2) != 0); - log_rev_check(outFile, lastLine.file1, twice); - if (twice) - { - log_rev_check(outFile, lastLine.file2, twice); - } -} - -int -getRevision(char *fileName, int lastChanged) -{ - char s[LINESIZE]; - FILE *psvn; - int rev = 0; - - if (!fileName) - fileName = opt_SourcesPath; - sprintf(s, "svn info %s", fileName); - if ((psvn = POPEN(s, "r"))) - { - while (fgets(s, LINESIZE, psvn)) - { - if (lastChanged) - { - if (sscanf(s, "Last Changed Rev: %d", &rev)) - break; - } - else - { - if (sscanf(s, "Revision: %d", &rev)) - break; - } - } - } - else - l2l_dbg(1, "Can't popen: \"%s\"\n", s); - - if (psvn) - PCLOSE(psvn); - - return rev; -} - -int -getTBRevision(char *fileName) -{ - char *s; - int rev = 0; - - s = strrchr(fileName, PATH_CHAR); - if (s) - s += 1; - else - s = fileName; - - sscanf(s, TRKBUILDPREFIX "%d", &rev); - if (!rev) - { - s = strrchr(fileName, PATH_CHAR); - if (s) - *s = '\0'; // clear, so we have the parent dir - else - { - // where else to look? - fileName = opt_SourcesPath; - } - rev = getRevision(fileName, 1); - if (s) - *s = PATH_CHAR; // restore - } - - l2l_dbg(1, "TBRevision: %d\n", rev); - return rev; -} - - -void -reportRevision(FILE *outFile) -{ - if (opt_Revision_check) - { - if (lastLine.valid) - logRevCheck(outFile); - } -} - -unsigned long -findRev(FILE *finx, int *rev) -{ - unsigned long pos = 0L; - - while (!fseek(finx, (*rev) * sizeof(unsigned long), SEEK_SET)) - { - fread(&pos, sizeof(long), 1, finx); - (*rev)--; - if (pos) - break; - } - return pos; -} - -int -regscan(FILE *outFile) -{ - int res = 0; - char logname[MAX_PATH]; - char inxname[MAX_PATH]; - char line[LINESIZE + 1]; - char line2[LINESIZE + 1]; - FILE *flog = NULL; - FILE *finx = NULL; - unsigned long pos = 0L; - int r; - - sprintf(logname, "%s" PATH_STR "%s", opt_SourcesPath, SVNDB); - sprintf(inxname, "%s" PATH_STR "%s", opt_SourcesPath, SVNDB_INX); - flog = fopen(logname, "rb"); - finx = fopen(inxname, "rb"); - - if (flog && finx) - { - r = revinfo.buildrev; - if (!fread(&pos, sizeof(long), 1, finx)) - { - res = 2; - l2l_dbg(0, "Cannot read magic number\n"); - } - - if (!res) - { - if (pos != MAGIC_INX) - { - res = 3; - l2l_dbg(0, "Incorrect magic number (%lx)\n", pos); - } - } - - if (!res) - { - char flag[2]; - char path[MAX_PATH]; - char path2[MAX_PATH]; - int wflag = 0; - clilog(outFile, "Regression candidates:\n"); - while (( pos = findRev(finx, &r) )) - { - if (r < (revinfo.buildrev - revinfo.range)) - { - l2l_dbg(1, "r%d is outside range of %d revisions\n", r, revinfo.range); - break; - } - fseek(flog, pos, SEEK_SET); - wflag = 1; - fgets(line, LINESIZE, flog); - fgets(line2, LINESIZE, flog); - while (fgets(line2, LINESIZE, flog)) - { - path2[0] = '\0'; - if (sscanf(line2, "%1s %s %s", flag, path, path2) >= 2) - { - if (entry_lookup(&sources, path) || entry_lookup(&sources, path2)) - { - if (wflag == 1) - { - clilog(outFile, "%sChanged paths:\n", line); - summ.regfound++; - wflag = 2; - } - clilog(outFile, "%s", line2); - } - } - else - break; - } - if (wflag == 2) - { - int i = 0; - clilog(outFile, "\n"); - while (fgets(line2, LINESIZE, flog)) - { - i++; - clilog(outFile, "%s", line2); - if (strncmp(LOGBOTTOM, line2, sizeof(LOGBOTTOM) - 1) == 0) - break; - } - } - } - } - } - else - { - res = 1; - l2l_dbg(0, "Cannot open %s or %s\n", logname, inxname); - } - - if (flog) - fclose(flog); - if (finx) - fclose(finx); - - return res; -} - - -int -updateSvnlog(void) -{ - int res = 0; - char logname[MAX_PATH]; - char inxname[MAX_PATH]; - char line[LINESIZE + 1]; - FILE *flog = NULL; - FILE *finx = NULL; - unsigned long pos; - int r, y, m, d; - char name[NAMESIZE]; - - sprintf(logname, "%s" PATH_STR "%s", opt_SourcesPath, SVNDB); - sprintf(inxname, "%s" PATH_STR "%s", opt_SourcesPath, SVNDB_INX); - flog = fopen(logname, "rb"); - finx = fopen(inxname, "wb"); - - if (flog && finx) - { - pos = MAGIC_INX; - fwrite(&pos, sizeof(long), 1, finx); - pos = ftell(flog); - while (fgets(line, LINESIZE, flog)) - { - if (sscanf(line, "r%d | %s | %d-%d-%d", &r, name, &y, &m, &d) == 5) - { - l2l_dbg(1, "%ld r%d | %s | %d-%d-%d\n", pos, r, name, y, m, d); - fseek(finx, r * sizeof(unsigned long), SEEK_SET); - fwrite(&pos, sizeof(unsigned long), 1, finx); - } - pos = ftell(flog); - } - } - - if (flog) - fclose(flog); - if (finx) - fclose(finx); - - return res; -} - -/* EOF */ diff --git a/reactos/tools/log2lines/revision.h b/reactos/tools/log2lines/revision.h deleted file mode 100644 index 6da59ad03e3..00000000000 --- a/reactos/tools/log2lines/revision.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * ReactOS log2lines - * Written by Jan Roeloffzen - * - * - SVN interface and revision analysis - */ - -#pragma once - -#include - -typedef struct revinfo_struct -{ - int rev; - int buildrev; - int range; - int opt_verbose; -} REVINFO, *PREVINFO; - -int getRevision(char *fileName, int lastChanged); -int getTBRevision(char *fileName); -void reportRevision(FILE *outFile); -unsigned long findRev(FILE *finx, int *rev); -int regscan(FILE *outFile); -int updateSvnlog(void); - -/* EOF */ diff --git a/reactos/tools/log2lines/stat.c b/reactos/tools/log2lines/stat.c deleted file mode 100644 index 801f693bde2..00000000000 --- a/reactos/tools/log2lines/stat.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * ReactOS log2lines - * Written by Jan Roeloffzen - * - * - Statistics - */ - -#include -#include - -#include "version.h" -#include "options.h" -#include "util.h" -#include "log2lines.h" - -void -stat_print(FILE *outFile, PSUMM psumm) -{ - if (outFile) - { - clilog(outFile, "*** LOG2LINES SUMMARY ***\n"); - clilog(outFile, "Translated: %d\n", psumm->translated); - clilog(outFile, "Reverted: %d\n", psumm->undo); - clilog(outFile, "Retranslated: %d\n", psumm->redo); - clilog(outFile, "Skipped: %d\n", psumm->skipped); - clilog(outFile, "Differ: %d\n", psumm->diff); - clilog(outFile, "Differ (function/source): %d\n", psumm->majordiff); - clilog(outFile, "Revision conflicts: %d\n", psumm->revconflicts); - clilog(outFile, "Regression candidates: %d\n", psumm->regfound); - clilog(outFile, "Offset error: %d\n", psumm->offset_errors); - clilog(outFile, "Total: %d\n", psumm->total); - clilog(outFile, "-------------------------------\n"); - clilog(outFile, "Log2lines version: " LOG2LINES_VERSION "\n"); - clilog(outFile, "Directory: %s\n", opt_dir); - clilog(outFile, "Passed options: %s\n", opt_scanned); - clilog(outFile, "-------------------------------\n"); - } -} - -void -stat_clear(PSUMM psumm) -{ - memset(psumm, 0, sizeof(SUMM)); -} - -/* EOF */ diff --git a/reactos/tools/log2lines/stat.h b/reactos/tools/log2lines/stat.h deleted file mode 100644 index 2b870285604..00000000000 --- a/reactos/tools/log2lines/stat.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * ReactOS log2lines - * Written by Jan Roeloffzen - * - * - Statistics - */ - -#pragma once - -#include - -typedef struct summ_struct -{ - int translated; - int undo; - int redo; - int skipped; - int diff; - int majordiff; - int revconflicts; - int regfound; - int offset_errors; - int total; -} SUMM, *PSUMM; - -void stat_print(FILE *outFile, PSUMM psumm); -void stat_clear(PSUMM psumm); - -/* EOF */ diff --git a/reactos/tools/log2lines/util.c b/reactos/tools/log2lines/util.c deleted file mode 100644 index 19e6342934a..00000000000 --- a/reactos/tools/log2lines/util.c +++ /dev/null @@ -1,190 +0,0 @@ -/* - * ReactOS log2lines - * Written by Jan Roeloffzen - * - * - Misc utils - */ - -#include -#include -#include -#include - -#include "config.h" -#include "compat.h" -#include "util.h" -#include "options.h" - -int -set_LogFile(FILE **plogFile) -{ - if (*opt_logFile) - { - if (*plogFile) - fclose(*plogFile); - *plogFile = NULL; - - if (strcmp(opt_logFile,"none") == 0) - return 0; //just close - - *plogFile = fopen(opt_logFile, opt_mod ? opt_mod : "a"); - if (*plogFile) - { - // disable buffering so fflush is not needed - if (!opt_buffered) - { - l2l_dbg(1, "Disabling log buffering on %s\n", opt_logFile); - setbuf(*plogFile, NULL); - } - else - l2l_dbg(1, "Enabling log buffering on %s\n", opt_logFile); - } - else - { - l2l_dbg(0, "Could not open logfile %s (%s)\n", opt_logFile, strerror(errno)); - return 2; - } - } - return 0; -} - -int -file_exists(char *name) -{ - FILE *f; - - f = fopen(name, "r"); - if (!f) - return 0; - fclose(f); - return 1; -} - -/* Do this in reverse (recursively) - This saves many system calls if the path is likely - to already exist (creating large trees). -*/ -int -mkPath(char *path, int isDir) -{ - char *s; - int res = 0; - - if (isDir) - { - res = MKDIR(path); - if (!res || (res == -1 && errno == EEXIST)) - return 0; - } - // create parent dir - if ((s = strrchr(path, PATH_CHAR))) - { - *s = '\0'; - res = mkPath(path, 1); - *s = PATH_CHAR; - } - - if (!res && isDir) - res = MKDIR(path); - - return res; -} - -#if 0 -static FILE * -rfopen(char *path, char *mode) -{ - FILE *f = NULL; - char tmppath[MAX_PATH]; // Don't modify const strings - - strcpy(tmppath, path); - f = fopen(tmppath, mode); - if (!f && !mkPath(tmppath, 0)) - f = fopen(tmppath, mode); - return f; -} -#endif - - -char * -basename(char *path) -{ - char *base; - - base = strrchr(path, PATH_CHAR); - if (base) - return ++base; - return path; -} - -const char * -getFmt(const char *a) -{ - const char *fmt = "%x"; - - if (*a == '0') - { - switch (*++a) - { - case 'x': - fmt = "%x"; - ++a; - break; - case 'd': - fmt = "%d"; - ++a; - break; - default: - fmt = "%o"; - break; - } - } - return fmt; -} - -long -my_atoi(const char *a) -{ - int i = 0; - sscanf(a, getFmt(a), &i); - return i; -} - -int -isOffset(const char *a) -{ - int i = 0; - if (strchr(a, '.')) - return 0; - return sscanf(a, getFmt(a), &i); -} - -int -copy_file(char *src, char *dst) -{ - char Line[LINESIZE]; - - sprintf(Line, CP_FMT, src, dst); - l2l_dbg(2, "Executing: %s\n", Line); - remove(dst); - if (file_exists(dst)) - { - l2l_dbg(0, "Cannot remove dst %s before copy\n", dst); - return 1; - } - if (system(Line) < 0) - { - l2l_dbg(0, "Cannot copy %s to %s\n", src, dst); - l2l_dbg(1, "Failed to execute: '%s'\n", Line); - return 2; - } - - if (!file_exists(dst)) - { - l2l_dbg(0, "Dst %s does not exist after copy\n", dst); - return 2; - } - return 0; -} - -/* EOF */ diff --git a/reactos/tools/log2lines/util.h b/reactos/tools/log2lines/util.h deleted file mode 100644 index 8df1181b4f7..00000000000 --- a/reactos/tools/log2lines/util.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * ReactOS log2lines - * Written by Jan Roeloffzen - * - * - Misc utils - */ - -#pragma once - -#include - -#include "cmd.h" -#include "options.h" - -#define log(outFile, fmt, ...) \ - { \ - fprintf(outFile, fmt, ##__VA_ARGS__); \ - if (logFile) \ - fprintf(logFile, fmt, ##__VA_ARGS__); \ - } - -#define esclog(outFile, fmt, ...) \ - { \ - log(outFile, KDBG_ESC_RESP fmt, ##__VA_ARGS__); \ - } - -#define clilog(outFile, fmt, ...) \ - { \ - if (opt_cli) \ - esclog(outFile, fmt, ##__VA_ARGS__) \ - else \ - log(outFile, fmt, ##__VA_ARGS__); \ - } - -#define l2l_dbg(level, ...) \ - { \ - if (opt_verbose >= level) \ - fprintf(stderr, ##__VA_ARGS__); \ - } - -int file_exists(char *name); -int mkPath(char *path, int isDir); -char *basename(char *path); -const char *getFmt(const char *a); -long my_atoi(const char *a); -int isOffset(const char *a); -int copy_file(char *src, char *dst); -int set_LogFile(FILE **plogFile); - -/* EOF */ diff --git a/reactos/tools/log2lines/version.h b/reactos/tools/log2lines/version.h deleted file mode 100644 index ad1e9299af0..00000000000 --- a/reactos/tools/log2lines/version.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - * ReactOS log2lines - * Written by Jan Roeloffzen - * - * - Version - */ - -#pragma once - -#define LOG2LINES_VERSION "2.2" - -/* EOF */ diff --git a/reactos/tools/mkconfig.c b/reactos/tools/mkconfig.c deleted file mode 100644 index 08efbc29331..00000000000 --- a/reactos/tools/mkconfig.c +++ /dev/null @@ -1,139 +0,0 @@ -#include -#include -#include - -#ifndef max -#define max(a, b) ((a) > (b) ? (a) : (b)) -#endif - -int -write_if_change(char* outbuf, char* filename) -{ - FILE* out; - unsigned int end; - char* cmpbuf; - unsigned int stat; - - out = fopen(filename, "rb"); - if (out == NULL) - { - out = fopen(filename, "wb"); - if (out == NULL) - { - fprintf(stderr, "Unable to create output file\n"); - return(1); - } - fputs(outbuf, out); - fclose(out); - return(0); - } - - fseek(out, 0, SEEK_END); - end = ftell(out); - cmpbuf = malloc(end); - if (cmpbuf == NULL) - { - fprintf(stderr, "Out of memory\n"); - fclose(out); - return(1); - } - - fseek(out, 0, SEEK_SET); - stat = fread(cmpbuf, 1, end, out); - if (stat != end) - { - fprintf(stderr, "Failed to read data\n"); - fclose(out); - free(cmpbuf); - return(1); - } - if (end == strlen(outbuf) && memcmp(cmpbuf, outbuf, end) == 0) - { - fclose(out); - free(cmpbuf); - return(0); - } - - fclose(out); - free(cmpbuf); - out = fopen(filename, "wb"); - if (out == NULL) - { - fprintf(stderr, "Unable to create output file\n"); - return(1); - } - - stat = fwrite(outbuf, 1, strlen(outbuf), out); - if (strlen(outbuf) != stat) - { - fprintf(stderr, "Unable to write output file\n"); - fclose(out); - return(1); - } - fclose(out); - return(0); -} - -int -main(int argc, char* argv[]) -{ - int include_tests; - unsigned int i; - char* outbuf; - char* s; - char config[512]; - - if (argc == 1) - { - fprintf(stderr, "Not enough arguments\n"); - return(1); - } - - outbuf = malloc(256 * 1024); - if (outbuf == NULL) - { - fprintf(stderr, "Out of memory 1\n"); - return(1); - } - - s = outbuf; - s = s + sprintf(s, "/* Automatically generated, "); - s = s + sprintf(s, "Edit the Makefile to change configuration */\n"); - s = s + sprintf(s, "#ifndef __INCLUDE_CONFIG_H\n"); - s = s + sprintf(s, "#define __INCLUDE_CONFIG_H\n"); - strcpy(config, ""); - include_tests = 0; - for (i = 2; i < argc; i++) - { - if (strcmp(argv[i], "REGTESTS") == 0) - { - include_tests = 1; - } - else - { - s = s + sprintf(s, "#ifndef %s\n", argv[i]); - s = s + sprintf(s, "#define %s\n", argv[i]); - s = s + sprintf(s, "#endif /* %s */\n", argv[i]); - } - strcat(config, argv[i]); - if (i != (argc - 1)) - { - strcat(config, " "); - } - } - if (include_tests) - { - s = s + sprintf(s, "#ifndef __ASM__\n"); - s = s + sprintf(s, "extern void PrepareTests();\n"); - s = s + sprintf(s, "#define PREPARE_TESTS PrepareTests();\n"); - s = s + sprintf(s, "#endif /* __ASM__ */\n"); - } - else - { - s = s + sprintf(s, "#define PREPARE_TESTS\n"); - } - s = s + sprintf(s, "#define CONFIG \"%s\"\n", config); - s = s + sprintf(s, "#endif /* __INCLUDE_CONFIG_H */\n"); - - return(write_if_change(outbuf, argv[1])); -} diff --git a/reactos/tools/mkhive/CMakeLists.txt b/reactos/tools/mkhive/CMakeLists.txt deleted file mode 100644 index 13e04297c1d..00000000000 --- a/reactos/tools/mkhive/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ - -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/reactos/tools/mkhive/binhive.c b/reactos/tools/mkhive/binhive.c deleted file mode 100644 index 0921160aa18..00000000000 --- a/reactos/tools/mkhive/binhive.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * ReactOS kernel - * Copyright (C) 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/binhive.c - * PURPOSE: Binary hive export code - * PROGRAMMER: Hervé Poussineau - */ - -/* INCLUDES *****************************************************************/ - -#include - -#include "mkhive.h" - -BOOL -ExportBinaryHive( - IN PCSTR FileName, - IN PCMHIVE Hive) -{ - FILE *File; - BOOL ret; - - printf (" Creating binary hive: %s\n", FileName); - - /* Create new hive file */ - File = fopen (FileName, "w+b"); - if (File == NULL) - { - printf(" Error creating/opening file\n"); - return FALSE; - } - - fseek (File, 0, SEEK_SET); - - Hive->FileHandles[HFILE_TYPE_PRIMARY] = (HANDLE)File; - ret = HvWriteHive(&Hive->Hive); - fclose (File); - return ret; -} - -/* EOF */ diff --git a/reactos/tools/mkhive/binhive.h b/reactos/tools/mkhive/binhive.h deleted file mode 100644 index 43becbf9abd..00000000000 --- a/reactos/tools/mkhive/binhive.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * ReactOS kernel - * Copyright (C) 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/binhive.h - * PURPOSE: Binary hive export code - * PROGRAMMER: Hervé Poussineau - */ - -#pragma once - -BOOL -ExportBinaryHive( - IN PCSTR FileName, - IN PCMHIVE Hive); - -/* EOF */ diff --git a/reactos/tools/mkhive/cmi.c b/reactos/tools/mkhive/cmi.c deleted file mode 100644 index bb8f48fba9c..00000000000 --- a/reactos/tools/mkhive/cmi.c +++ /dev/null @@ -1,839 +0,0 @@ -/* - * ReactOS kernel - * Copyright (C) 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/cmi.c - * PURPOSE: Registry file manipulation routines - * PROGRAMMER: Hervé Poussineau - */ - -#define NDEBUG -#include "mkhive.h" - -static PVOID -NTAPI -CmpAllocate( - IN SIZE_T Size, - IN BOOLEAN Paged, - IN ULONG Tag) -{ - return (PVOID) malloc((size_t)Size); -} - -static VOID -NTAPI -CmpFree( - IN PVOID Ptr, - IN ULONG Quota) -{ - free(Ptr); -} - -static BOOLEAN -NTAPI -CmpFileRead( - IN PHHIVE RegistryHive, - IN ULONG FileType, - IN PULONG FileOffset, - OUT PVOID Buffer, - IN SIZE_T BufferLength) -{ - DPRINT1("CmpFileRead() unimplemented\n"); - return FALSE; -} - -static BOOLEAN -NTAPI -CmpFileWrite( - IN PHHIVE RegistryHive, - IN ULONG FileType, - IN PULONG FileOffset, - IN PVOID Buffer, - IN SIZE_T BufferLength) -{ - PCMHIVE CmHive = (PCMHIVE)RegistryHive; - FILE *File = CmHive->FileHandles[HFILE_TYPE_PRIMARY]; - if (0 != fseek (File, *FileOffset, SEEK_SET)) - return FALSE; - return BufferLength == fwrite (Buffer, 1, BufferLength, File); -} - -static BOOLEAN -NTAPI -CmpFileSetSize( - IN PHHIVE RegistryHive, - IN ULONG FileType, - IN ULONG FileSize, - IN ULONG OldFileSize) -{ - DPRINT1("CmpFileSetSize() unimplemented\n"); - return FALSE; -} - -static BOOLEAN -NTAPI -CmpFileFlush( - IN PHHIVE RegistryHive, - IN ULONG FileType, - PLARGE_INTEGER FileOffset, - ULONG Length) -{ - PCMHIVE CmHive = (PCMHIVE)RegistryHive; - FILE *File = CmHive->FileHandles[HFILE_TYPE_PRIMARY]; - return 0 == fflush (File); -} - -NTSTATUS -CmiInitializeTempHive( - IN OUT PCMHIVE Hive) -{ - NTSTATUS Status; - - RtlZeroMemory ( - Hive, - sizeof(CMHIVE)); - - DPRINT("Hive 0x%p\n", Hive); - - Status = HvInitialize(&Hive->Hive, - HINIT_CREATE, - 0, - 0, - 0, - CmpAllocate, - CmpFree, - CmpFileSetSize, - CmpFileWrite, - CmpFileRead, - CmpFileFlush, - 1, - NULL); - if (!NT_SUCCESS(Status)) - { - return Status; - } - - if (!CmCreateRootNode (&Hive->Hive, L"")) - { - HvFree (&Hive->Hive); - return STATUS_INSUFFICIENT_RESOURCES; - } - - Hive->Flags = HIVE_NO_FILE; - - /* Add the new hive to the hive list */ - InsertTailList ( - &CmiHiveListHead, - &Hive->HiveList); - - VERIFY_REGISTRY_HIVE (Hive); - - return STATUS_SUCCESS; -} - -static NTSTATUS -CmiAddKeyToHashTable( - IN PCMHIVE RegistryHive, - IN OUT PCM_KEY_FAST_INDEX HashCell, - IN HCELL_INDEX HashCellIndex, - IN PCM_KEY_NODE NewKeyCell, - IN HCELL_INDEX NKBOffset) -{ - ULONG i; - ULONG HashKey = 0; - - if (NewKeyCell->Flags & KEY_COMP_NAME) - { - RtlCopyMemory( - &HashKey, - NewKeyCell->Name, - min(NewKeyCell->NameLength, sizeof(ULONG))); - } - - for (i = 0; i < HashCell->Count; i++) - { - if (HashCell->List[i].HashKey > HashKey) - break; - } - - if (i < HashCell->Count) - { - RtlMoveMemory(HashCell->List + i + 1, - HashCell->List + i, - (HashCell->Count - i) * - sizeof(HashCell->List[0])); - } - - HashCell->List[i].Cell = NKBOffset; - HashCell->List[i].HashKey = HashKey; - HashCell->Count++; - HvMarkCellDirty(&RegistryHive->Hive, HashCellIndex, FALSE); - return STATUS_SUCCESS; -} - -static NTSTATUS -CmiAllocateHashTableCell ( - IN PCMHIVE RegistryHive, - OUT PCM_KEY_FAST_INDEX *HashBlock, - OUT HCELL_INDEX *HBOffset, - IN USHORT SubKeyCount, - IN HSTORAGE_TYPE Storage) -{ - PCM_KEY_FAST_INDEX NewHashBlock; - ULONG NewHashSize; - NTSTATUS Status; - - Status = STATUS_SUCCESS; - *HashBlock = NULL; - NewHashSize = FIELD_OFFSET(CM_KEY_FAST_INDEX, List) + - (SubKeyCount * sizeof(CM_INDEX)); - *HBOffset = HvAllocateCell(&RegistryHive->Hive, NewHashSize, Storage, HCELL_NIL); - - if (*HBOffset == HCELL_NIL) - { - Status = STATUS_INSUFFICIENT_RESOURCES; - } - else - { - NewHashBlock = (PCM_KEY_FAST_INDEX)HvGetCell (&RegistryHive->Hive, *HBOffset); - NewHashBlock->Signature = CM_KEY_FAST_LEAF; - NewHashBlock->Count = 0; - *HashBlock = NewHashBlock; - } - - return Status; -} - -NTSTATUS -CmiAddSubKey( - IN PCMHIVE RegistryHive, - IN PCM_KEY_NODE ParentKeyCell, - IN HCELL_INDEX ParentKeyCellOffset, - IN PCUNICODE_STRING SubKeyName, - IN ULONG CreateOptions, - OUT PCM_KEY_NODE *pSubKeyCell, - OUT HCELL_INDEX *pBlockOffset) -{ - PCM_KEY_FAST_INDEX HashBlock; - HCELL_INDEX NKBOffset; - PCM_KEY_NODE NewKeyCell; - ULONG NewBlockSize; - NTSTATUS Status; - USHORT NameLength; - PWSTR NamePtr; - BOOLEAN Packable; - HSTORAGE_TYPE Storage; - ULONG i; - - VERIFY_KEY_CELL(ParentKeyCell); - - /* Skip leading backslash */ - if (SubKeyName->Buffer[0] == L'\\') - { - NamePtr = &SubKeyName->Buffer[1]; - NameLength = SubKeyName->Length - sizeof(WCHAR); - } - else - { - NamePtr = SubKeyName->Buffer; - NameLength = SubKeyName->Length; - } - - /* Check whether key name can be packed */ - Packable = TRUE; - for (i = 0; i < NameLength / sizeof(WCHAR); i++) - { - if (NamePtr[i] & 0xFF00) - { - Packable = FALSE; - break; - } - } - - /* Adjust name size */ - if (Packable) - { - NameLength = NameLength / sizeof(WCHAR); - } - - Status = STATUS_SUCCESS; - - Storage = (CreateOptions & REG_OPTION_VOLATILE) ? Volatile : Stable; - NewBlockSize = FIELD_OFFSET(CM_KEY_NODE, Name) + NameLength; - NKBOffset = HvAllocateCell(&RegistryHive->Hive, NewBlockSize, Storage, HCELL_NIL); - if (NKBOffset == HCELL_NIL) - { - Status = STATUS_INSUFFICIENT_RESOURCES; - } - else - { - NewKeyCell = (PCM_KEY_NODE)HvGetCell (&RegistryHive->Hive, NKBOffset); - NewKeyCell->Signature = CM_KEY_NODE_SIGNATURE; - if (CreateOptions & REG_OPTION_VOLATILE) - { - NewKeyCell->Flags = KEY_IS_VOLATILE; - } - else - { - NewKeyCell->Flags = 0; - } - KeQuerySystemTime(&NewKeyCell->LastWriteTime); - NewKeyCell->Parent = HCELL_NIL; - NewKeyCell->SubKeyCounts[Stable] = 0; - NewKeyCell->SubKeyCounts[Volatile] = 0; - NewKeyCell->SubKeyLists[Stable] = HCELL_NIL; - NewKeyCell->SubKeyLists[Volatile] = HCELL_NIL; - NewKeyCell->ValueList.Count = 0; - NewKeyCell->ValueList.List = HCELL_NIL; - NewKeyCell->Security = HCELL_NIL; - NewKeyCell->Class = HCELL_NIL; - - /* Pack the key name */ - NewKeyCell->NameLength = NameLength; - if (Packable) - { - NewKeyCell->Flags |= KEY_COMP_NAME; - for (i = 0; i < NameLength; i++) - { - ((PCHAR)NewKeyCell->Name)[i] = (CHAR)(NamePtr[i] & 0x00FF); - } - } - else - { - RtlCopyMemory( - NewKeyCell->Name, - NamePtr, - NameLength); - } - - VERIFY_KEY_CELL(NewKeyCell); - } - - if (!NT_SUCCESS(Status)) - { - return Status; - } - - if (ParentKeyCell->SubKeyLists[Storage] == HCELL_NIL) - { - Status = CmiAllocateHashTableCell ( - RegistryHive, - &HashBlock, - &ParentKeyCell->SubKeyLists[Storage], - REG_INIT_HASH_TABLE_SIZE, - Storage); - if (!NT_SUCCESS(Status)) - { - return(Status); - } - } - else - { - HashBlock = (PCM_KEY_FAST_INDEX)HvGetCell ( - &RegistryHive->Hive, - ParentKeyCell->SubKeyLists[Storage]); - ASSERT(HashBlock->Signature == CM_KEY_FAST_LEAF); - - if (HashBlock->Count == - ((HvGetCellSize(&RegistryHive->Hive, HashBlock) - FIELD_OFFSET(CM_KEY_FAST_INDEX, List)) / sizeof(CM_INDEX))) - { - PCM_KEY_FAST_INDEX NewHashBlock; - HCELL_INDEX HTOffset; - - /* Reallocate the hash table cell */ - Status = CmiAllocateHashTableCell ( - RegistryHive, - &NewHashBlock, - &HTOffset, - HashBlock->Count + - REG_EXTEND_HASH_TABLE_SIZE, - Storage); - if (!NT_SUCCESS(Status)) - { - return Status; - } - RtlCopyMemory( - &NewHashBlock->List[0], - &HashBlock->List[0], - sizeof(NewHashBlock->List[0]) * HashBlock->Count); - NewHashBlock->Count = HashBlock->Count; - HvFreeCell (&RegistryHive->Hive, ParentKeyCell->SubKeyLists[Storage]); - ParentKeyCell->SubKeyLists[Storage] = HTOffset; - HashBlock = NewHashBlock; - } - } - - Status = CmiAddKeyToHashTable( - RegistryHive, - HashBlock, - ParentKeyCell->SubKeyLists[Storage], - NewKeyCell, - NKBOffset); - if (NT_SUCCESS(Status)) - { - ParentKeyCell->SubKeyCounts[Storage]++; - if (Packable) - { - if (NameLength*sizeof(WCHAR) > ParentKeyCell->MaxNameLen) - ParentKeyCell->MaxNameLen = NameLength*sizeof(WCHAR); - } - else - { - if (NameLength > ParentKeyCell->MaxNameLen) - ParentKeyCell->MaxNameLen = NameLength; - } - if (NewKeyCell->ClassLength > ParentKeyCell->MaxClassLen) - ParentKeyCell->MaxClassLen = NewKeyCell->ClassLength; - - *pSubKeyCell = NewKeyCell; - *pBlockOffset = NKBOffset; - } - - KeQuerySystemTime(&ParentKeyCell->LastWriteTime); - HvMarkCellDirty(&RegistryHive->Hive, ParentKeyCellOffset, FALSE); - - return Status; -} - -static BOOLEAN -CmiCompareHash( - IN PCUNICODE_STRING KeyName, - IN PCHAR HashString) -{ - CHAR Buffer[4]; - - Buffer[0] = (KeyName->Length >= 2) ? (CHAR)KeyName->Buffer[0] : 0; - Buffer[1] = (KeyName->Length >= 4) ? (CHAR)KeyName->Buffer[1] : 0; - Buffer[2] = (KeyName->Length >= 6) ? (CHAR)KeyName->Buffer[2] : 0; - Buffer[3] = (KeyName->Length >= 8) ? (CHAR)KeyName->Buffer[3] : 0; - - return (strncmp(Buffer, HashString, 4) == 0); -} - - -BOOLEAN -CmiCompareHashI( - IN PCUNICODE_STRING KeyName, - IN PCHAR HashString) -{ - CHAR Buffer[4]; - - Buffer[0] = (KeyName->Length >= 2) ? (CHAR)KeyName->Buffer[0] : 0; - Buffer[1] = (KeyName->Length >= 4) ? (CHAR)KeyName->Buffer[1] : 0; - Buffer[2] = (KeyName->Length >= 6) ? (CHAR)KeyName->Buffer[2] : 0; - Buffer[3] = (KeyName->Length >= 8) ? (CHAR)KeyName->Buffer[3] : 0; - - return (strncasecmp(Buffer, HashString, 4) == 0); -} - -static BOOLEAN -CmiCompareKeyNames( - IN PCUNICODE_STRING KeyName, - IN PCM_KEY_NODE KeyCell) -{ - PWCHAR UnicodeName; - USHORT i; - - if (KeyCell->Flags & KEY_COMP_NAME) - { - if (KeyName->Length != KeyCell->NameLength * sizeof(WCHAR)) - return FALSE; - - for (i = 0; i < KeyCell->NameLength; i++) - { - if (KeyName->Buffer[i] != ((PCHAR)KeyCell->Name)[i]) - return FALSE; - } - } - else - { - if (KeyName->Length != KeyCell->NameLength) - return FALSE; - - UnicodeName = (PWCHAR)KeyCell->Name; - for (i = 0; i < KeyCell->NameLength / sizeof(WCHAR); i++) - { - if (KeyName->Buffer[i] != UnicodeName[i]) - return FALSE; - } - } - - return TRUE; -} - -static BOOLEAN -CmiCompareKeyNamesI( - IN PCUNICODE_STRING KeyName, - IN PCM_KEY_NODE KeyCell) -{ - PWCHAR UnicodeName; - USHORT i; - - DPRINT("Flags: %hx\n", KeyCell->Flags); - - if (KeyCell->Flags & KEY_COMP_NAME) - { - if (KeyName->Length != KeyCell->NameLength * sizeof(WCHAR)) - return FALSE; - - /* FIXME: use _strnicmp */ - for (i = 0; i < KeyCell->NameLength; i++) - { - if (RtlUpcaseUnicodeChar(KeyName->Buffer[i]) != - RtlUpcaseUnicodeChar(((PCHAR)KeyCell->Name)[i])) - return FALSE; - } - } - else - { - if (KeyName->Length != KeyCell->NameLength) - return FALSE; - - UnicodeName = (PWCHAR)KeyCell->Name; - /* FIXME: use _strnicmp */ - for (i = 0; i < KeyCell->NameLength / sizeof(WCHAR); i++) - { - if (RtlUpcaseUnicodeChar(KeyName->Buffer[i]) != - RtlUpcaseUnicodeChar(UnicodeName[i])) - return FALSE; - } - } - - return TRUE; -} - -NTSTATUS -CmiScanForSubKey( - IN PCMHIVE RegistryHive, - IN PCM_KEY_NODE KeyCell, - IN PCUNICODE_STRING SubKeyName, - IN ULONG Attributes, - OUT PCM_KEY_NODE *pSubKeyCell, - OUT HCELL_INDEX *pBlockOffset) -{ - PCM_KEY_FAST_INDEX HashBlock; - PCM_KEY_NODE CurSubKeyCell; - ULONG Storage; - ULONG i; - - VERIFY_KEY_CELL(KeyCell); - - ASSERT(RegistryHive); - - *pSubKeyCell = NULL; - - for (Storage = Stable; Storage < HTYPE_COUNT; Storage++) - { - if (KeyCell->SubKeyLists[Storage] == HCELL_NIL) - { - /* The key does not have any subkeys */ - continue; - } - - /* Get hash table */ - HashBlock = (PCM_KEY_FAST_INDEX)HvGetCell (&RegistryHive->Hive, KeyCell->SubKeyLists[Storage]); - if (!HashBlock || HashBlock->Signature != CM_KEY_FAST_LEAF) - return STATUS_UNSUCCESSFUL; - - for (i = 0; i < KeyCell->SubKeyCounts[Storage]; i++) - { - if (Attributes & OBJ_CASE_INSENSITIVE) - { - if ((HashBlock->List[i].HashKey == 0 - || CmiCompareHashI(SubKeyName, (PCHAR)&HashBlock->List[i].HashKey))) - { - CurSubKeyCell = (PCM_KEY_NODE)HvGetCell ( - &RegistryHive->Hive, - HashBlock->List[i].Cell); - - if (CmiCompareKeyNamesI(SubKeyName, CurSubKeyCell)) - { - *pSubKeyCell = CurSubKeyCell; - *pBlockOffset = HashBlock->List[i].Cell; - return STATUS_SUCCESS; - } - } - } - else - { - if ((HashBlock->List[i].HashKey == 0 - || CmiCompareHash(SubKeyName, (PCHAR)&HashBlock->List[i].HashKey))) - { - CurSubKeyCell = (PCM_KEY_NODE)HvGetCell ( - &RegistryHive->Hive, - HashBlock->List[i].Cell); - - if (CmiCompareKeyNames(SubKeyName, CurSubKeyCell)) - { - *pSubKeyCell = CurSubKeyCell; - *pBlockOffset = HashBlock->List[i].Cell; - return STATUS_SUCCESS; - } - } - } - } - } - - return STATUS_OBJECT_NAME_NOT_FOUND; -} - -static USHORT -CmiGetPackedNameLength( - IN PCUNICODE_STRING Name, - OUT PBOOLEAN pPackable) -{ - USHORT i; - - *pPackable = TRUE; - - for (i = 0; i < Name->Length / sizeof(WCHAR); i++) - { - if (Name->Buffer[i] & 0xFF00) - { - *pPackable = FALSE; - return Name->Length; - } - } - - return (Name->Length / sizeof(WCHAR)); -} - -static NTSTATUS -CmiAllocateValueCell( - IN PCMHIVE RegistryHive, - OUT PCM_KEY_VALUE *ValueCell, - OUT HCELL_INDEX *VBOffset, - IN PCUNICODE_STRING ValueName, - IN HSTORAGE_TYPE Storage) -{ - PCM_KEY_VALUE NewValueCell; - BOOLEAN Packable; - USHORT NameLength, i; - NTSTATUS Status; - - Status = STATUS_SUCCESS; - - NameLength = CmiGetPackedNameLength(ValueName, &Packable); - - DPRINT("ValueName->Length %u NameLength %u\n", ValueName->Length, NameLength); - - *VBOffset = HvAllocateCell(&RegistryHive->Hive, sizeof(CM_KEY_VALUE) + NameLength, Storage, HCELL_NIL); - if (*VBOffset == HCELL_NIL) - { - Status = STATUS_INSUFFICIENT_RESOURCES; - } - else - { - NewValueCell = (PCM_KEY_VALUE)HvGetCell (&RegistryHive->Hive, *VBOffset); - NewValueCell->Signature = CM_KEY_VALUE_SIGNATURE; - NewValueCell->NameLength = (USHORT)NameLength; - if (Packable) - { - /* Pack the value name */ - for (i = 0; i < NameLength; i++) - ((PCHAR)NewValueCell->Name)[i] = (CHAR)ValueName->Buffer[i]; - NewValueCell->Flags |= VALUE_COMP_NAME; - } - else - { - /* Copy the value name */ - RtlCopyMemory( - NewValueCell->Name, - ValueName->Buffer, - NameLength); - NewValueCell->Flags = 0; - } - NewValueCell->Type = 0; - NewValueCell->DataLength = 0; - NewValueCell->Data = HCELL_NIL; - *ValueCell = NewValueCell; - } - - return Status; -} - -NTSTATUS -CmiAddValueKey( - IN PCMHIVE RegistryHive, - IN PCM_KEY_NODE KeyCell, - IN HCELL_INDEX KeyCellOffset, - IN PCUNICODE_STRING ValueName, - OUT PCM_KEY_VALUE *pValueCell, - OUT HCELL_INDEX *pValueCellOffset) -{ - PVALUE_LIST_CELL ValueListCell; - PCM_KEY_VALUE NewValueCell; - HCELL_INDEX ValueListCellOffset; - HCELL_INDEX NewValueCellOffset; - ULONG CellSize; - HSTORAGE_TYPE Storage; - NTSTATUS Status; - - Storage = (KeyCell->Flags & KEY_IS_VOLATILE) ? Volatile : Stable; - if (KeyCell->ValueList.List == HCELL_NIL) - { - /* Allocate some room for the value list */ - CellSize = sizeof(VALUE_LIST_CELL) + (3 * sizeof(HCELL_INDEX)); - ValueListCellOffset = HvAllocateCell(&RegistryHive->Hive, CellSize, Storage, HCELL_NIL); - if (ValueListCellOffset == HCELL_NIL) - return STATUS_INSUFFICIENT_RESOURCES; - - ValueListCell = (PVALUE_LIST_CELL)HvGetCell(&RegistryHive->Hive, ValueListCellOffset); - if (!ValueListCell) - return STATUS_UNSUCCESSFUL; - KeyCell->ValueList.List = ValueListCellOffset; - HvMarkCellDirty(&RegistryHive->Hive, KeyCellOffset, FALSE); - } - else - { - ValueListCell = (PVALUE_LIST_CELL)HvGetCell(&RegistryHive->Hive, KeyCell->ValueList.List); - if (!ValueListCell) - return STATUS_UNSUCCESSFUL; - CellSize = ABS_VALUE(HvGetCellSize(&RegistryHive->Hive, ValueListCell)); - - if (KeyCell->ValueList.Count >= CellSize / sizeof(HCELL_INDEX)) - { - CellSize *= 2; - ValueListCellOffset = HvReallocateCell(&RegistryHive->Hive, KeyCell->ValueList.List, CellSize); - if (ValueListCellOffset == HCELL_NIL) - return STATUS_INSUFFICIENT_RESOURCES; - - ValueListCell = (PVALUE_LIST_CELL)HvGetCell(&RegistryHive->Hive, ValueListCellOffset); - if (!ValueListCell) - return STATUS_UNSUCCESSFUL; - KeyCell->ValueList.List = ValueListCellOffset; - HvMarkCellDirty(&RegistryHive->Hive, KeyCellOffset, FALSE); - } - } - - Status = CmiAllocateValueCell( - RegistryHive, - &NewValueCell, - &NewValueCellOffset, - ValueName, - Storage); - if (!NT_SUCCESS(Status)) - return Status; - - ValueListCell->ValueOffset[KeyCell->ValueList.Count] = NewValueCellOffset; - KeyCell->ValueList.Count++; - if (NewValueCell->Flags & VALUE_COMP_NAME) - { - if (NewValueCell->NameLength*sizeof(WCHAR) > KeyCell->MaxValueNameLen) - KeyCell->MaxValueNameLen = NewValueCell->NameLength*sizeof(WCHAR); - } - else - { - if (NewValueCell->NameLength > KeyCell->MaxValueNameLen) - KeyCell->MaxValueNameLen = NewValueCell->NameLength; - } - - HvMarkCellDirty(&RegistryHive->Hive, KeyCellOffset, FALSE); - HvMarkCellDirty(&RegistryHive->Hive, KeyCell->ValueList.List, FALSE); - HvMarkCellDirty(&RegistryHive->Hive, NewValueCellOffset, FALSE); - - *pValueCell = NewValueCell; - *pValueCellOffset = NewValueCellOffset; - - return STATUS_SUCCESS; -} - -static BOOLEAN -CmiComparePackedNames( - IN PCUNICODE_STRING Name, - IN PUCHAR NameBuffer, - IN USHORT NameBufferSize, - IN BOOLEAN NamePacked) -{ - PWCHAR UNameBuffer; - ULONG i; - - if (NamePacked == TRUE) - { - if (Name->Length != NameBufferSize * sizeof(WCHAR)) - return FALSE; - - for (i = 0; i < Name->Length / sizeof(WCHAR); i++) - { - if (RtlUpcaseUnicodeChar(Name->Buffer[i]) != RtlUpcaseUnicodeChar((WCHAR)NameBuffer[i])) - return FALSE; - } - } - else - { - if (Name->Length != NameBufferSize) - return FALSE; - - UNameBuffer = (PWCHAR)NameBuffer; - - for (i = 0; i < Name->Length / sizeof(WCHAR); i++) - { - if (RtlUpcaseUnicodeChar(Name->Buffer[i]) != RtlUpcaseUnicodeChar(UNameBuffer[i])) - return FALSE; - } - } - - return TRUE; -} - -NTSTATUS -CmiScanForValueKey( - IN PCMHIVE RegistryHive, - IN PCM_KEY_NODE KeyCell, - IN PCUNICODE_STRING ValueName, - OUT PCM_KEY_VALUE *pValueCell, - OUT HCELL_INDEX *pValueCellOffset) -{ - PVALUE_LIST_CELL ValueListCell; - PCM_KEY_VALUE CurValueCell; - ULONG i; - - *pValueCell = NULL; - *pValueCellOffset = HCELL_NIL; - - /* The key does not have any values */ - if (KeyCell->ValueList.List == HCELL_NIL) - { - return STATUS_OBJECT_NAME_NOT_FOUND; - } - - ValueListCell = (PVALUE_LIST_CELL)HvGetCell(&RegistryHive->Hive, KeyCell->ValueList.List); - - VERIFY_VALUE_LIST_CELL(ValueListCell); - - for (i = 0; i < KeyCell->ValueList.Count; i++) - { - CurValueCell = (PCM_KEY_VALUE)HvGetCell( - &RegistryHive->Hive, - ValueListCell->ValueOffset[i]); - - if (CmiComparePackedNames( - ValueName, - (PUCHAR)CurValueCell->Name, - CurValueCell->NameLength, - (BOOLEAN)((CurValueCell->Flags & VALUE_COMP_NAME) ? TRUE : FALSE))) - { - *pValueCell = CurValueCell; - *pValueCellOffset = ValueListCell->ValueOffset[i]; - return STATUS_SUCCESS; - } - } - - return STATUS_OBJECT_NAME_NOT_FOUND; -} diff --git a/reactos/tools/mkhive/cmi.h b/reactos/tools/mkhive/cmi.h deleted file mode 100644 index 6186b3cbc8b..00000000000 --- a/reactos/tools/mkhive/cmi.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * ReactOS kernel - * Copyright (C) 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/cmi.h - * PURPOSE: Registry file manipulation routines - * PROGRAMMER: Hervé Poussineau - */ - -#define VERIFY_KEY_CELL(key) -#define VERIFY_VALUE_LIST_CELL(cell) - -NTSTATUS -CmiInitializeTempHive( - IN OUT PCMHIVE Hive); - -NTSTATUS -CmiAddSubKey( - IN PCMHIVE RegistryHive, - IN PCM_KEY_NODE ParentKeyCell, - IN HCELL_INDEX ParentKeyCellOffset, - IN PCUNICODE_STRING SubKeyName, - IN ULONG CreateOptions, - OUT PCM_KEY_NODE *pSubKeyCell, - OUT HCELL_INDEX *pBlockOffset); - -NTSTATUS -CmiScanForSubKey( - IN PCMHIVE RegistryHive, - IN PCM_KEY_NODE KeyCell, - IN PCUNICODE_STRING SubKeyName, - IN ULONG Attributes, - OUT PCM_KEY_NODE *pSubKeyCell, - OUT HCELL_INDEX *pBlockOffset); - -NTSTATUS -CmiAddValueKey( - IN PCMHIVE RegistryHive, - IN PCM_KEY_NODE KeyCell, - IN HCELL_INDEX KeyCellOffset, - IN PCUNICODE_STRING ValueName, - OUT PCM_KEY_VALUE *pValueCell, - OUT HCELL_INDEX *pValueCellOffset); - -NTSTATUS -CmiScanForValueKey( - IN PCMHIVE RegistryHive, - IN PCM_KEY_NODE KeyCell, - IN PCUNICODE_STRING ValueName, - OUT PCM_KEY_VALUE *pValueCell, - OUT HCELL_INDEX *pValueCellOffset); diff --git a/reactos/tools/mkhive/mkhive.c b/reactos/tools/mkhive/mkhive.c deleted file mode 100644 index 3d94e74bd67..00000000000 --- a/reactos/tools/mkhive/mkhive.c +++ /dev/null @@ -1,153 +0,0 @@ -/* - * 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.c - * PURPOSE: Hive maker - * PROGRAMMER: Eric Kohl - * Hervé Poussineau - */ - -#include -#include -#include - -#include "mkhive.h" - -#ifdef _MSC_VER -#include -#define PATH_MAX _MAX_PATH -#endif//_MSC_VER - -#ifndef _WIN32 -#ifndef PATH_MAX -#define PATH_MAX 260 -#endif -#define DIR_SEPARATOR_CHAR '/' -#define DIR_SEPARATOR_STRING "/" -#else -#define DIR_SEPARATOR_CHAR '\\' -#define DIR_SEPARATOR_STRING "\\" -#endif - - -void usage (void) -{ - printf ("Usage: mkhive \n\n"); - printf (" dstdir - binary hive files are created in this directory\n"); - printf (" inffiles - inf files with full path\n"); -} - -void convert_path(char *dst, char *src) -{ - int i; - - i = 0; - while (src[i] != 0) - { -#ifdef _WIN32 - if (src[i] == '/') - { - dst[i] = '\\'; - } -#else - if (src[i] == '\\') - { - dst[i] = '/'; - } -#endif - else - { - dst[i] = src[i]; - } - - i++; - } - dst[i] = 0; -} - -int main (int argc, char *argv[]) -{ - char FileName[PATH_MAX]; - int i; - - if (argc < 3) - { - usage (); - return 1; - } - - printf ("Binary hive maker\n"); - - RegInitializeRegistry (); - - for (i = 2; i < argc; i++) - { - convert_path (FileName, argv[i]); - ImportRegistryFile (FileName); - } - - convert_path (FileName, argv[1]); - strcat (FileName, DIR_SEPARATOR_STRING); - strcat (FileName, "default"); - if (!ExportBinaryHive (FileName, &DefaultHive)) - { - return 1; - } - - convert_path (FileName, argv[1]); - strcat (FileName, DIR_SEPARATOR_STRING); - strcat (FileName, "sam"); - if (!ExportBinaryHive (FileName, &SamHive)) - { - return 1; - } - - convert_path (FileName, argv[1]); - strcat (FileName, DIR_SEPARATOR_STRING); - strcat (FileName, "security"); - if (!ExportBinaryHive (FileName, &SecurityHive)) - { - return 1; - } - - convert_path (FileName, argv[1]); - strcat (FileName, DIR_SEPARATOR_STRING); - strcat (FileName, "software"); - if (!ExportBinaryHive (FileName, &SoftwareHive)) - { - return 1; - } - - convert_path (FileName, argv[1]); - strcat (FileName, DIR_SEPARATOR_STRING); - strcat (FileName, "system"); - if (!ExportBinaryHive (FileName, &SystemHive)) - { - return 1; - } - - RegShutdownRegistry (); - - printf (" Done.\n"); - - return 0; -} - -/* EOF */ diff --git a/reactos/tools/mkhive/mkhive.h b/reactos/tools/mkhive/mkhive.h deleted file mode 100644 index eb45beee6c4..00000000000 --- a/reactos/tools/mkhive/mkhive.h +++ /dev/null @@ -1,136 +0,0 @@ -/* - * 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/reactos/tools/mkhive/mkhive.rbuild b/reactos/tools/mkhive/mkhive.rbuild deleted file mode 100644 index 26a95fa232c..00000000000 --- a/reactos/tools/mkhive/mkhive.rbuild +++ /dev/null @@ -1,19 +0,0 @@ - - - - . - . - . - . - - -fshort-wchar - newinflibhost - cmlibhost - unicode - binhive.c - cmi.c - mkhive.c - reginf.c - registry.c - rtl.c - diff --git a/reactos/tools/mkhive/reginf.c b/reactos/tools/mkhive/reginf.c deleted file mode 100644 index 330afc0a4ae..00000000000 --- a/reactos/tools/mkhive/reginf.c +++ /dev/null @@ -1,507 +0,0 @@ -/* - * 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/reginf.h - * PURPOSE: Inf file import code - * PROGRAMMER: Eric Kohl - * Hervé Poussineau - */ - -/* INCLUDES *****************************************************************/ - -#include -#include -#include - -#define NDEBUG -#include "mkhive.h" - -#define FLG_ADDREG_BINVALUETYPE 0x00000001 -#define FLG_ADDREG_NOCLOBBER 0x00000002 -#define FLG_ADDREG_DELVAL 0x00000004 -#define FLG_ADDREG_APPEND 0x00000008 -#define FLG_ADDREG_KEYONLY 0x00000010 -#define FLG_ADDREG_OVERWRITEONLY 0x00000020 -#define FLG_ADDREG_TYPE_SZ 0x00000000 -#define FLG_ADDREG_TYPE_MULTI_SZ 0x00010000 -#define FLG_ADDREG_TYPE_EXPAND_SZ 0x00020000 -#define FLG_ADDREG_TYPE_BINARY (0x00000000 | FLG_ADDREG_BINVALUETYPE) -#define FLG_ADDREG_TYPE_DWORD (0x00010000 | FLG_ADDREG_BINVALUETYPE) -#define FLG_ADDREG_TYPE_NONE (0x00020000 | FLG_ADDREG_BINVALUETYPE) -#define FLG_ADDREG_TYPE_MASK (0xFFFF0000 | FLG_ADDREG_BINVALUETYPE) - - -static const WCHAR HKCR[] = {'H','K','C','R',0}; -static const WCHAR HKCU[] = {'H','K','C','U',0}; -static const WCHAR HKLM[] = {'H','K','L','M',0}; -static const WCHAR HKU[] = {'H','K','U',0}; -static const WCHAR HKR[] = {'H','K','R',0}; - -static const WCHAR HKCRPath[] = {'\\','R','e','g','i','s','t','r','y','\\','M','a','c','h','i','n','e','\\','S','O','F','T','W','A','R','E','\\','C','l','a','s','s','e','s','\\',0}; -static const WCHAR HKCUPath[] = {'\\','R','e','g','i','s','t','r','y','\\','U','s','e','r','\\','.','D','E','F','A','U','L','T','\\',0}; -static const WCHAR HKLMPath[] = {'\\','R','e','g','i','s','t','r','y','\\','M','a','c','h','i','n','e','\\',0}; -static const WCHAR HKUPath[] = {'\\','R','e','g','i','s','t','r','y','\\','U','s','e','r','\\',0}; - -static const WCHAR AddReg[] = {'A','d','d','R','e','g',0}; -static const WCHAR DelReg[] = {'D','e','l','R','e','g',0}; - -/* FUNCTIONS ****************************************************************/ - -static BOOL -GetRootKey (PWCHAR Name) -{ - if (!strcmpiW (Name, HKCR)) - { - strcpyW (Name, HKCRPath); - return TRUE; - } - - if (!strcmpiW (Name, HKCU)) - { - strcpyW (Name, HKCUPath); - return TRUE; - } - - if (!strcmpiW (Name, HKLM)) - { - strcpyW (Name, HKLMPath); - return TRUE; - } - - if (!strcmpiW (Name, HKU)) - { - strcpyW (Name, HKUPath); - return TRUE; - } - -#if 0 - if (!strcmpiW (Name, HKR)) - return FALSE; -#endif - - return FALSE; -} - - -/*********************************************************************** - * AppendMultiSzValue - * - * Append a multisz string to a multisz registry value. - */ -static VOID -AppendMultiSzValue ( - IN HKEY KeyHandle, - IN PWCHAR ValueName, - IN PWCHAR Strings, - IN SIZE_T StringSize) -{ - SIZE_T Size; - ULONG Type; - size_t Total; - PWCHAR Buffer; - PWCHAR p; - size_t len; - LONG Error; - - Error = RegQueryValueExW ( - KeyHandle, - ValueName, - NULL, - &Type, - NULL, - &Size); - if ((Error != ERROR_SUCCESS) || - (Type != REG_MULTI_SZ)) - return; - - Buffer = malloc ((Size + StringSize) * sizeof(WCHAR)); - if (Buffer == NULL) - return; - - Error = RegQueryValueExW ( - KeyHandle, - ValueName, - NULL, - NULL, - (PUCHAR)Buffer, - &Size); - if (Error != ERROR_SUCCESS) - goto done; - - /* compare each string against all the existing ones */ - Total = Size; - while (*Strings != 0) - { - len = strlenW(Strings) + 1; - - for (p = Buffer; *p != 0; p += strlenW(p) + 1) - if (!strcmpiW(p, Strings)) - break; - - if (*p == 0) /* not found, need to append it */ - { - memcpy (p, Strings, len); - p[len] = 0; - Total += len; - } - Strings += len; - } - - if (Total != Size) - { - DPRINT ("setting value %S to %S\n", ValueName, Buffer); - RegSetValueExW ( - KeyHandle, - ValueName, - 0, - REG_MULTI_SZ, - (PUCHAR)Buffer, - (ULONG)Total * sizeof(WCHAR)); - } - -done: - free (Buffer); -} - - -/*********************************************************************** - * do_reg_operation - * - * Perform an add/delete registry operation depending on the flags. - */ -static BOOL -do_reg_operation( - IN HKEY KeyHandle, - IN PWCHAR ValueName, - IN PINFCONTEXT Context, - IN ULONG Flags) -{ - WCHAR EmptyStr = (CHAR)0; - ULONG Type; - ULONG Size; - LONG Error; - - if (Flags & FLG_ADDREG_DELVAL) /* deletion */ - { - if (ValueName) - { - RegDeleteValueW (KeyHandle, ValueName); - } - else - { - RegDeleteKeyW (KeyHandle, NULL); - } - - return TRUE; - } - - if (Flags & FLG_ADDREG_KEYONLY) - return TRUE; - - if (Flags & (FLG_ADDREG_NOCLOBBER | FLG_ADDREG_OVERWRITEONLY)) - { - Error = RegQueryValueExW ( - KeyHandle, - ValueName, - NULL, - NULL, - NULL, - NULL); - if ((Error == ERROR_SUCCESS) && - (Flags & FLG_ADDREG_NOCLOBBER)) - return TRUE; - - if ((Error != ERROR_SUCCESS) && - (Flags & FLG_ADDREG_OVERWRITEONLY)) - return TRUE; - } - - switch (Flags & FLG_ADDREG_TYPE_MASK) - { - case FLG_ADDREG_TYPE_SZ: - Type = REG_SZ; - break; - - case FLG_ADDREG_TYPE_MULTI_SZ: - Type = REG_MULTI_SZ; - break; - - case FLG_ADDREG_TYPE_EXPAND_SZ: - Type = REG_EXPAND_SZ; - break; - - case FLG_ADDREG_TYPE_BINARY: - Type = REG_BINARY; - break; - - case FLG_ADDREG_TYPE_DWORD: - Type = REG_DWORD; - break; - - case FLG_ADDREG_TYPE_NONE: - Type = REG_NONE; - break; - - default: - Type = Flags >> 16; - break; - } - - if (!(Flags & FLG_ADDREG_BINVALUETYPE) || - (Type == REG_DWORD && InfHostGetFieldCount (Context) == 5)) - { - PWCHAR Str = NULL; - - if (Type == REG_MULTI_SZ) - { - if (InfHostGetMultiSzField (Context, 5, NULL, 0, &Size) != 0) - Size = 0; - - if (Size) - { - Str = malloc (Size * sizeof(WCHAR)); - if (Str == NULL) - return FALSE; - - InfHostGetMultiSzField (Context, 5, Str, (ULONG)Size, NULL); - } - - if (Flags & FLG_ADDREG_APPEND) - { - if (Str == NULL) - return TRUE; - - AppendMultiSzValue ( - KeyHandle, - ValueName, - Str, - Size); - - free (Str); - return TRUE; - } - /* else fall through to normal string handling */ - } - else - { - if (InfHostGetStringField (Context, 5, NULL, 0, &Size) != 0) - Size = 0; - - if (Size) - { - Str = malloc (Size * sizeof(WCHAR)); - if (Str == NULL) - return FALSE; - - InfHostGetStringField (Context, 5, Str, (ULONG)Size, NULL); - } - } - - if (Type == REG_DWORD) - { - ULONG dw = Str ? strtoulW (Str, NULL, 0) : 0; - - DPRINT("setting dword %S to %x\n", ValueName, dw); - - RegSetValueExW ( - KeyHandle, - ValueName, - 0, - Type, - (const PUCHAR)&dw, - sizeof(ULONG)); - } - else - { - DPRINT("setting value %S to %S\n", ValueName, Str); - - if (Str) - { - RegSetValueExW ( - KeyHandle, - ValueName, - 0, - Type, - (PVOID)Str, - (ULONG)Size * sizeof(WCHAR)); - } - else - { - RegSetValueExW ( - KeyHandle, - ValueName, - 0, - Type, - (PVOID)&EmptyStr, - (ULONG)sizeof(WCHAR)); - } - } - free (Str); - } - else /* get the binary data */ - { - PUCHAR Data = NULL; - - if (InfHostGetBinaryField (Context, 5, NULL, 0, &Size) != 0) - Size = 0; - - if (Size) - { - Data = malloc (Size); - if (Data == NULL) - return FALSE; - - DPRINT("setting binary data %S len %d\n", ValueName, Size); - InfHostGetBinaryField (Context, 5, Data, Size, NULL); - } - - RegSetValueExW ( - KeyHandle, - ValueName, - 0, - Type, - (PVOID)Data, - (ULONG)Size); - - free (Data); - } - - return TRUE; -} - -/*********************************************************************** - * registry_callback - * - * Called once for each AddReg and DelReg entry in a given section. - */ -static BOOL -registry_callback (HINF hInf, PWCHAR Section, BOOL Delete) -{ - WCHAR Buffer[MAX_INF_STRING_LENGTH]; - PWCHAR ValuePtr; - ULONG Flags; - size_t Length; - - PINFCONTEXT Context = NULL; - HKEY KeyHandle; - BOOL Ok; - - - Ok = InfHostFindFirstLine (hInf, Section, NULL, &Context) == 0; - if (!Ok) - return TRUE; /* Don't fail if the section isn't present */ - - for (;Ok; Ok = (InfHostFindNextLine (Context, Context) == 0)) - { - /* get root */ - if (InfHostGetStringField (Context, 1, Buffer, MAX_INF_STRING_LENGTH, NULL) != 0) - continue; - if (!GetRootKey (Buffer)) - continue; - - /* get key */ - Length = strlenW (Buffer); - if (InfHostGetStringField (Context, 2, Buffer + Length, MAX_INF_STRING_LENGTH - (ULONG)Length, NULL) != 0) - *Buffer = 0; - - DPRINT("KeyName: <%S>\n", Buffer); - - if (Delete) - { - Flags = FLG_ADDREG_DELVAL; - } - else - { - /* get flags */ - if (InfHostGetIntField (Context, 4, &Flags) != 0) - Flags = 0; - } - - DPRINT("Flags: 0x%x\n", Flags); - - if (Delete || (Flags & FLG_ADDREG_OVERWRITEONLY)) - { - if (RegOpenKeyW (NULL, Buffer, &KeyHandle) != ERROR_SUCCESS) - { - DPRINT("RegOpenKey(%S) failed\n", Buffer); - continue; /* ignore if it doesn't exist */ - } - } - else - { - if (RegCreateKeyW (NULL, Buffer, &KeyHandle) != ERROR_SUCCESS) - { - DPRINT("RegCreateKey(%S) failed\n", Buffer); - continue; - } - } - - /* get value name */ - if (InfHostGetStringField (Context, 3, Buffer, MAX_INF_STRING_LENGTH, NULL) == 0) - { - ValuePtr = Buffer; - } - else - { - ValuePtr = NULL; - } - - /* and now do it */ - if (!do_reg_operation (KeyHandle, ValuePtr, Context, Flags)) - { - return FALSE; - } - } - - InfHostFreeContext(Context); - - return TRUE; -} - - -BOOL -ImportRegistryFile(PCHAR FileName) -{ - HINF hInf; - ULONG ErrorLine; - - /* Load inf file from install media. */ - if (InfHostOpenFile(&hInf, FileName, 0, &ErrorLine) != 0) - { - DPRINT1 ("InfHostOpenFile(%s) failed\n", FileName); - return FALSE; - } - - if (!registry_callback (hInf, (PWCHAR)DelReg, TRUE)) - { - DPRINT1 ("registry_callback() for DelReg failed\n"); - } - - if (!registry_callback (hInf, (PWCHAR)AddReg, FALSE)) - { - DPRINT1 ("registry_callback() for AddReg failed\n"); - } - - InfHostCloseFile (hInf); - - return TRUE; -} - -/* EOF */ diff --git a/reactos/tools/mkhive/reginf.h b/reactos/tools/mkhive/reginf.h deleted file mode 100644 index f84f6ed464b..00000000000 --- a/reactos/tools/mkhive/reginf.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * ReactOS kernel - * Copyright (C) 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/reginf.h - * PURPOSE: Inf file import code - * PROGRAMMER: Hervé Poussineau - */ - -#pragma once - -BOOL -ImportRegistryFile(PCHAR Filename); - -/* EOF */ diff --git a/reactos/tools/mkhive/registry.c b/reactos/tools/mkhive/registry.c deleted file mode 100644 index b232ef957d0..00000000000 --- a/reactos/tools/mkhive/registry.c +++ /dev/null @@ -1,698 +0,0 @@ -/* - * ReactOS kernel - * Copyright (C) 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/registry.c - * PURPOSE: Registry code - * PROGRAMMER: Hervé Poussineau - */ - -/* - * TODO: - * - Implement RegDeleteKeyW() - * - Implement RegEnumValue() - * - Implement RegQueryValueExW() - */ - -#include -#include -#include - -#define NDEBUG -#include "mkhive.h" - -#define REG_DATA_SIZE_MASK 0x7FFFFFFF -#define REG_DATA_IN_OFFSET 0x80000000 - -static CMHIVE RootHive; -static MEMKEY RootKey; -CMHIVE DefaultHive; /* \Registry\User\.DEFAULT */ -CMHIVE SamHive; /* \Registry\Machine\SAM */ -CMHIVE SecurityHive; /* \Registry\Machine\SECURITY */ -CMHIVE SoftwareHive; /* \Registry\Machine\SOFTWARE */ -CMHIVE SystemHive; /* \Registry\Machine\SYSTEM */ - -static MEMKEY -CreateInMemoryStructure( - IN PCMHIVE RegistryHive, - IN HCELL_INDEX KeyCellOffset, - IN PCUNICODE_STRING KeyName) -{ - MEMKEY Key; - - Key = (MEMKEY) malloc (sizeof(KEY)); - if (!Key) - return NULL; - - InitializeListHead (&Key->SubKeyList); - InitializeListHead (&Key->ValueList); - InitializeListHead (&Key->KeyList); - - Key->SubKeyCount = 0; - Key->ValueCount = 0; - - Key->NameSize = KeyName->Length; - /* FIXME: It's not enough to allocate this way, because later - this memory gets overwritten with bigger names */ - Key->Name = malloc (Key->NameSize); - if (!Key->Name) - return NULL; - memcpy(Key->Name, KeyName->Buffer, KeyName->Length); - - Key->DataType = 0; - Key->DataSize = 0; - Key->Data = NULL; - - Key->RegistryHive = RegistryHive; - Key->KeyCellOffset = KeyCellOffset; - Key->KeyCell = (PCM_KEY_NODE)HvGetCell (&RegistryHive->Hive, Key->KeyCellOffset); - if (!Key->KeyCell) - { - free(Key->Name); - free(Key); - return NULL; - } - Key->LinkedKey = NULL; - return Key; -} - -static LONG -RegpOpenOrCreateKey( - IN HKEY hParentKey, - IN PCWSTR KeyName, - IN BOOL AllowCreation, - OUT PHKEY Key) -{ - PWSTR LocalKeyName; - PWSTR End; - UNICODE_STRING KeyString; - NTSTATUS Status; - MEMKEY ParentKey; - MEMKEY CurrentKey; - PLIST_ENTRY Ptr; - PCM_KEY_NODE SubKeyCell; - HCELL_INDEX BlockOffset; - - DPRINT("RegpCreateOpenKey('%S')\n", KeyName); - - if (*KeyName == L'\\') - { - KeyName++; - ParentKey = RootKey; - } - else if (hParentKey == NULL) - { - ParentKey = RootKey; - } - else - { - ParentKey = HKEY_TO_MEMKEY(RootKey); - } - - LocalKeyName = (PWSTR)KeyName; - for (;;) - { - End = (PWSTR)strchrW(LocalKeyName, '\\'); - if (End) - { - KeyString.Buffer = LocalKeyName; - KeyString.Length = KeyString.MaximumLength = - (USHORT)((ULONG_PTR)End - (ULONG_PTR)LocalKeyName); - } - else - RtlInitUnicodeString(&KeyString, LocalKeyName); - - /* Redirect from 'CurrentControlSet' to 'ControlSet001' */ - if (!strncmpW(LocalKeyName, L"CurrentControlSet", 17) && - ParentKey->NameSize == 12 && - !memcmp(ParentKey->Name, L"SYSTEM", 12)) - RtlInitUnicodeString(&KeyString, L"ControlSet001"); - - /* Check subkey in memory structure */ - Ptr = ParentKey->SubKeyList.Flink; - while (Ptr != &ParentKey->SubKeyList) - { - CurrentKey = CONTAINING_RECORD(Ptr, KEY, KeyList); - if (CurrentKey->NameSize == KeyString.Length - && memcmp(CurrentKey->Name, KeyString.Buffer, KeyString.Length) == 0) - { - goto nextsubkey; - } - - Ptr = Ptr->Flink; - } - - Status = CmiScanForSubKey( - ParentKey->RegistryHive, - ParentKey->KeyCell, - &KeyString, - OBJ_CASE_INSENSITIVE, - &SubKeyCell, - &BlockOffset); - if (AllowCreation && Status == STATUS_OBJECT_NAME_NOT_FOUND) - { - Status = CmiAddSubKey( - ParentKey->RegistryHive, - ParentKey->KeyCell, - ParentKey->KeyCellOffset, - &KeyString, - 0, - &SubKeyCell, - &BlockOffset); - } - if (!NT_SUCCESS(Status)) - return ERROR_UNSUCCESSFUL; - - /* Now, SubKeyCell/BlockOffset are valid */ - CurrentKey = CreateInMemoryStructure( - ParentKey->RegistryHive, - BlockOffset, - &KeyString); - if (!CurrentKey) - return ERROR_OUTOFMEMORY; - - /* Add CurrentKey in ParentKey */ - InsertTailList(&ParentKey->SubKeyList, &CurrentKey->KeyList); - ParentKey->SubKeyCount++; - -nextsubkey: - ParentKey = CurrentKey; - if (End) - LocalKeyName = End + 1; - else - break; - } - - *Key = MEMKEY_TO_HKEY(ParentKey); - - return ERROR_SUCCESS; -} - -LONG WINAPI -RegCreateKeyW( - IN HKEY hKey, - IN LPCWSTR lpSubKey, - OUT PHKEY phkResult) -{ - return RegpOpenOrCreateKey(hKey, lpSubKey, TRUE, phkResult); -} - -static PWSTR -MultiByteToWideChar( - IN PCSTR MultiByteString) -{ - ANSI_STRING Source; - UNICODE_STRING Destination; - NTSTATUS Status; - - RtlInitAnsiString(&Source, MultiByteString); - Status = RtlAnsiStringToUnicodeString(&Destination, &Source, TRUE); - if (!NT_SUCCESS(Status)) - return NULL; - return Destination.Buffer; -} - -LONG WINAPI -RegCreateKeyA( - IN HKEY hKey, - IN LPCSTR lpSubKey, - OUT PHKEY phkResult) -{ - PWSTR lpSubKeyW; - LONG rc; - - lpSubKeyW = MultiByteToWideChar(lpSubKey); - if (!lpSubKeyW) - return ERROR_OUTOFMEMORY; - - rc = RegCreateKeyW(hKey, lpSubKeyW, phkResult); - free(lpSubKeyW); - return rc; -} - -LONG WINAPI -RegDeleteKeyW( - IN HKEY hKey, - IN LPCWSTR lpSubKey) -{ - DPRINT1("FIXME: implement RegDeleteKeyW!\n"); - return ERROR_SUCCESS; -} - -LONG WINAPI -RegDeleteKeyA( - IN HKEY hKey, - IN LPCSTR lpSubKey) -{ - PWSTR lpSubKeyW = NULL; - LONG rc; - - if (lpSubKey != NULL && strchr(lpSubKey, '\\') != NULL) - return ERROR_INVALID_PARAMETER; - - if (lpSubKey) - { - lpSubKeyW = MultiByteToWideChar(lpSubKey); - if (!lpSubKeyW) - return ERROR_OUTOFMEMORY; - } - - rc = RegDeleteKeyW(hKey, lpSubKeyW); - - if (lpSubKey) - free(lpSubKeyW); - - return rc; -} - -LONG WINAPI -RegOpenKeyW( - IN HKEY hKey, - IN LPCWSTR lpSubKey, - OUT PHKEY phkResult) -{ - return RegpOpenOrCreateKey(hKey, lpSubKey, FALSE, phkResult); -} - -LONG WINAPI -RegOpenKeyA( - IN HKEY hKey, - IN LPCSTR lpSubKey, - OUT PHKEY phkResult) -{ - PWSTR lpSubKeyW; - LONG rc; - - lpSubKeyW = MultiByteToWideChar(lpSubKey); - if (!lpSubKeyW) - return ERROR_OUTOFMEMORY; - - rc = RegOpenKeyW(hKey, lpSubKeyW, phkResult); - free(lpSubKeyW); - return rc; -} - -static LONG -RegpOpenOrCreateValue( - IN HKEY hKey, - IN LPCWSTR ValueName, - IN BOOL AllowCreation, - OUT PCM_KEY_VALUE *ValueCell, - OUT PHCELL_INDEX ValueCellOffset) -{ - MEMKEY ParentKey; - UNICODE_STRING ValueString; - NTSTATUS Status; - - ParentKey = HKEY_TO_MEMKEY(hKey); - RtlInitUnicodeString(&ValueString, ValueName); - - Status = CmiScanForValueKey( - ParentKey->RegistryHive, - ParentKey->KeyCell, - &ValueString, - ValueCell, - ValueCellOffset); - if (AllowCreation && Status == STATUS_OBJECT_NAME_NOT_FOUND) - { - Status = CmiAddValueKey( - ParentKey->RegistryHive, - ParentKey->KeyCell, - ParentKey->KeyCellOffset, - &ValueString, - ValueCell, - ValueCellOffset); - } - if (!NT_SUCCESS(Status)) - return ERROR_UNSUCCESSFUL; - return ERROR_SUCCESS; -} - -LONG WINAPI -RegSetValueExW( - IN HKEY hKey, - IN LPCWSTR lpValueName OPTIONAL, - IN ULONG Reserved, - IN ULONG dwType, - IN const UCHAR* lpData, - IN USHORT cbData) -{ - MEMKEY Key, DestKey; - PHKEY phKey; - PCM_KEY_VALUE ValueCell; - HCELL_INDEX ValueCellOffset; - PVOID DataCell; - LONG DataCellSize; - NTSTATUS Status; - - if (dwType == REG_LINK) - { - /* Special handling of registry links */ - if (cbData != sizeof(PVOID)) - return STATUS_INVALID_PARAMETER; - phKey = (PHKEY)lpData; - Key = HKEY_TO_MEMKEY(hKey); - DestKey = HKEY_TO_MEMKEY(*phKey); - - /* Create the link in memory */ - Key->DataType = REG_LINK; - Key->LinkedKey = DestKey; - - /* Create the link in registry hive (if applicable) */ - if (Key->RegistryHive != DestKey->RegistryHive) - return STATUS_SUCCESS; - DPRINT1("Save link to registry\n"); - return STATUS_NOT_IMPLEMENTED; - } - - if ((cbData & REG_DATA_SIZE_MASK) != cbData) - return STATUS_UNSUCCESSFUL; - - Key = HKEY_TO_MEMKEY(hKey); - - Status = RegpOpenOrCreateValue(hKey, lpValueName, TRUE, &ValueCell, &ValueCellOffset); - if (!NT_SUCCESS(Status)) - return ERROR_UNSUCCESSFUL; - - /* Get size of the allocated cellule (if any) */ - if (!(ValueCell->DataLength & REG_DATA_IN_OFFSET) && - (ValueCell->DataLength & REG_DATA_SIZE_MASK) != 0) - { - DataCell = HvGetCell(&Key->RegistryHive->Hive, ValueCell->Data); - if (!DataCell) - return ERROR_UNSUCCESSFUL; - DataCellSize = -HvGetCellSize(&Key->RegistryHive->Hive, DataCell); - } - else - { - DataCell = NULL; - DataCellSize = 0; - } - - if (cbData <= sizeof(HCELL_INDEX)) - { - /* If data size <= sizeof(HCELL_INDEX) then store data in the data offset */ - DPRINT("ValueCell->DataLength %u\n", ValueCell->DataLength); - if (DataCell) - HvFreeCell(&Key->RegistryHive->Hive, ValueCell->Data); - - RtlCopyMemory(&ValueCell->Data, lpData, cbData); - ValueCell->DataLength = (ULONG)(cbData | REG_DATA_IN_OFFSET); - ValueCell->Type = dwType; - HvMarkCellDirty(&Key->RegistryHive->Hive, ValueCellOffset, FALSE); - } - else - { - if (cbData > (SIZE_T)DataCellSize) - { - /* New data size is larger than the current, destroy current - * data block and allocate a new one. */ - HCELL_INDEX NewOffset; - - DPRINT("ValueCell->DataLength %u\n", ValueCell->DataLength); - - NewOffset = HvAllocateCell(&Key->RegistryHive->Hive, cbData, Stable, HCELL_NIL); - if (NewOffset == HCELL_NIL) - { - DPRINT("HvAllocateCell() failed with status 0x%08x\n", Status); - return ERROR_UNSUCCESSFUL; - } - - if (DataCell) - HvFreeCell(&Key->RegistryHive->Hive, ValueCell->Data); - - ValueCell->Data = NewOffset; - DataCell = (PVOID)HvGetCell(&Key->RegistryHive->Hive, NewOffset); - } - - /* Copy new contents to cellule */ - RtlCopyMemory(DataCell, lpData, cbData); - ValueCell->DataLength = (ULONG)(cbData & REG_DATA_SIZE_MASK); - ValueCell->Type = dwType; - HvMarkCellDirty(&Key->RegistryHive->Hive, ValueCell->Data, FALSE); - HvMarkCellDirty(&Key->RegistryHive->Hive, ValueCellOffset, FALSE); - } - - if (cbData > Key->KeyCell->MaxValueDataLen) - Key->KeyCell->MaxValueDataLen = cbData; - - HvMarkCellDirty(&Key->RegistryHive->Hive, Key->KeyCellOffset, FALSE); - - DPRINT("Return status 0x%08x\n", Status); - return Status; -} - -LONG WINAPI -RegSetValueExA( - IN HKEY hKey, - IN LPCSTR lpValueName OPTIONAL, - IN ULONG Reserved, - IN ULONG dwType, - IN const UCHAR* lpData, - IN ULONG cbData) -{ - LPWSTR lpValueNameW = NULL; - const UCHAR* lpDataW; - USHORT cbDataW; - LONG rc = ERROR_SUCCESS; - - DPRINT("RegSetValueA(%s)\n", lpValueName); - if (lpValueName) - { - lpValueNameW = MultiByteToWideChar(lpValueName); - if (!lpValueNameW) - return ERROR_OUTOFMEMORY; - } - - if ((dwType == REG_SZ || dwType == REG_EXPAND_SZ || dwType == REG_MULTI_SZ) - && cbData != 0) - { - ANSI_STRING AnsiString; - UNICODE_STRING Data; - - if (lpData[cbData - 1] != '\0') - cbData++; - RtlInitAnsiString(&AnsiString, NULL); - AnsiString.Buffer = (PSTR)lpData; - AnsiString.Length = (USHORT)cbData - 1; - AnsiString.MaximumLength = (USHORT)cbData; - RtlAnsiStringToUnicodeString (&Data, &AnsiString, TRUE); - lpDataW = (const UCHAR*)Data.Buffer; - cbDataW = Data.MaximumLength; - } - else - { - lpDataW = lpData; - cbDataW = (USHORT)cbData; - } - - if (rc == ERROR_SUCCESS) - rc = RegSetValueExW(hKey, lpValueNameW, 0, dwType, lpDataW, cbDataW); - if (lpValueNameW) - free(lpValueNameW); - if (lpData != lpDataW) - free((PVOID)lpDataW); - return rc; -} - -LONG WINAPI -RegQueryValueExW( - IN HKEY hKey, - IN LPCWSTR lpValueName, - IN PULONG lpReserved, - OUT PULONG lpType, - OUT PUCHAR lpData, - OUT PSIZE_T lpcbData) -{ - //ParentKey = HKEY_TO_MEMKEY(RootKey); - PCM_KEY_VALUE ValueCell; - HCELL_INDEX ValueCellOffset; - LONG rc; - - rc = RegpOpenOrCreateValue( - hKey, - lpValueName, - FALSE, - &ValueCell, - &ValueCellOffset); - if (rc != ERROR_SUCCESS) - return rc; - - DPRINT1("RegQueryValueExW(%S) not implemented\n", lpValueName); - /* ValueCell and ValueCellOffset are valid */ - - return ERROR_UNSUCCESSFUL; -} - -LONG WINAPI -RegQueryValueExA( - IN HKEY hKey, - IN LPCSTR lpValueName, - IN PULONG lpReserved, - OUT PULONG lpType, - OUT PUCHAR lpData, - OUT PSIZE_T lpcbData) -{ - LPWSTR lpValueNameW = NULL; - LONG rc; - - if (lpValueName) - { - lpValueNameW = MultiByteToWideChar(lpValueName); - if (!lpValueNameW) - return ERROR_OUTOFMEMORY; - } - - rc = RegQueryValueExW(hKey, lpValueNameW, lpReserved, lpType, lpData, lpcbData); - if (lpValueNameW) - free(lpValueNameW); - return ERROR_UNSUCCESSFUL; -} - -LONG WINAPI -RegDeleteValueW( - IN HKEY hKey, - IN LPCWSTR lpValueName OPTIONAL) -{ - DPRINT1("RegDeleteValueW() unimplemented\n"); - return ERROR_UNSUCCESSFUL; -} - -LONG WINAPI -RegDeleteValueA( - IN HKEY hKey, - IN LPCSTR lpValueName OPTIONAL) -{ - LPWSTR lpValueNameW; - LONG rc; - - if (lpValueName) - { - lpValueNameW = MultiByteToWideChar(lpValueName); - if (!lpValueNameW) - return ERROR_OUTOFMEMORY; - rc = RegDeleteValueW(hKey, lpValueNameW); - free(lpValueNameW); - } - else - rc = RegDeleteValueW(hKey, NULL); - return rc; -} - -static BOOL -ConnectRegistry( - IN HKEY RootKey, - IN PCMHIVE HiveToConnect, - IN LPCWSTR Path) -{ - NTSTATUS Status; - MEMKEY NewKey; - LONG rc; - - Status = CmiInitializeTempHive(HiveToConnect); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CmiInitializeTempHive() failed with status 0x%08x\n", Status); - return FALSE; - } - - /* Create key */ - rc = RegCreateKeyW( - RootKey, - Path, - (PHKEY)&NewKey); - if (rc != ERROR_SUCCESS) - return FALSE; - - NewKey->RegistryHive = HiveToConnect; - NewKey->KeyCellOffset = HiveToConnect->Hive.BaseBlock->RootCell; - NewKey->KeyCell = (PCM_KEY_NODE)HvGetCell (&HiveToConnect->Hive, NewKey->KeyCellOffset); - return TRUE; -} - -LIST_ENTRY CmiHiveListHead; - -VOID -RegInitializeRegistry(VOID) -{ - UNICODE_STRING RootKeyName = RTL_CONSTANT_STRING(L"\\"); - NTSTATUS Status; - HKEY ControlSetKey; - - InitializeListHead(&CmiHiveListHead); - - Status = CmiInitializeTempHive(&RootHive); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CmiInitializeTempHive() failed with status 0x%08x\n", Status); - return; - } - - RootKey = CreateInMemoryStructure( - &RootHive, - RootHive.Hive.BaseBlock->RootCell, - &RootKeyName); - - /* Create DEFAULT key */ - ConnectRegistry( - NULL, - &DefaultHive, - L"Registry\\User\\.DEFAULT"); - - /* Create SAM key */ - ConnectRegistry( - NULL, - &SamHive, - L"Registry\\Machine\\SAM"); - - /* Create SECURITY key */ - ConnectRegistry( - NULL, - &SecurityHive, - L"Registry\\Machine\\SECURITY"); - - /* Create SOFTWARE key */ - ConnectRegistry( - NULL, - &SoftwareHive, - L"Registry\\Machine\\SOFTWARE"); - - /* Create SYSTEM key */ - ConnectRegistry( - NULL, - &SystemHive, - L"Registry\\Machine\\SYSTEM"); - - /* Create 'ControlSet001' key */ - RegCreateKeyW( - NULL, - L"Registry\\Machine\\SYSTEM\\ControlSet001", - &ControlSetKey); -} - -VOID -RegShutdownRegistry(VOID) -{ - /* FIXME: clean up the complete hive */ - - free(RootKey->Name); - free(RootKey); -} - -/* EOF */ diff --git a/reactos/tools/mkhive/registry.h b/reactos/tools/mkhive/registry.h deleted file mode 100644 index 40df369b54d..00000000000 --- a/reactos/tools/mkhive/registry.h +++ /dev/null @@ -1,127 +0,0 @@ -/* COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS hive maker - * FILE: tools/mkhive/registry.h - * PURPOSE: Registry code - */ - -#pragma once - -typedef struct _REG_VALUE -{ - LIST_ENTRY ValueList; - - /* value name */ - ULONG NameSize; - PCHAR Name; - - /* value data */ - ULONG DataType; - ULONG DataSize; - PCHAR Data; -} VALUE, *PVALUE; - -typedef struct _REG_KEY -{ - LIST_ENTRY KeyList; - LIST_ENTRY SubKeyList; - LIST_ENTRY ValueList; - - ULONG SubKeyCount; - ULONG ValueCount; - - ULONG NameSize; - PWCHAR Name; - - /* default data */ - ULONG DataType; - ULONG DataSize; - PCHAR Data; - - /* Information on hard disk structure */ - HCELL_INDEX KeyCellOffset; - PCM_KEY_NODE KeyCell; - PCMHIVE RegistryHive; - - /* Used when linking to another key */ - struct _REG_KEY* LinkedKey; -} KEY, *FRLDRHKEY, **PFRLDRHKEY, *MEMKEY, **PMEMKEY; - -#define HKEY_TO_MEMKEY(hKey) ((MEMKEY)(hKey)) -#define MEMKEY_TO_HKEY(memKey) ((HKEY)(memKey)) - -extern CMHIVE DefaultHive; /* \Registry\User\.DEFAULT */ -extern CMHIVE SamHive; /* \Registry\Machine\SAM */ -extern CMHIVE SecurityHive; /* \Registry\Machine\SECURITY */ -extern CMHIVE SoftwareHive; /* \Registry\Machine\SOFTWARE */ -extern CMHIVE SystemHive; /* \Registry\Machine\SYSTEM */ - -#define ERROR_SUCCESS 0L -#define ERROR_UNSUCCESSFUL 1L -#define ERROR_OUTOFMEMORY 14L -#define ERROR_INVALID_PARAMETER 87L -#define ERROR_MORE_DATA 234L -#define ERROR_NO_MORE_ITEMS 259L - -#define REG_NONE 0 -#define REG_SZ 1 -#define REG_EXPAND_SZ 2 -#define REG_BINARY 3 -#define REG_DWORD 4 -#define REG_DWORD_BIG_ENDIAN 5 -#define REG_DWORD_LITTLE_ENDIAN 4 -#define REG_LINK 6 -#define REG_MULTI_SZ 7 -#define REG_RESOURCE_LIST 8 -#define REG_FULL_RESOURCE_DESCRIPTOR 9 -#define REG_RESOURCE_REQUIREMENTS_LIST 10 - -LONG WINAPI -RegCreateKeyA( - IN HKEY hKey, - IN LPCSTR lpSubKey, - OUT PHKEY phkResult); - -LONG WINAPI -RegOpenKeyA( - IN HKEY hKey, - IN LPCSTR lpSubKey, - OUT PHKEY phkResult); - -LONG WINAPI -RegQueryValueExA(HKEY Key, - LPCSTR ValueName, - PULONG Reserved, - PULONG Type, - PUCHAR Data, - PSIZE_T DataSize); - -LONG WINAPI -RegSetValueExA( - IN HKEY hKey, - IN LPCSTR lpValueName OPTIONAL, - ULONG Reserved, - IN ULONG dwType, - IN const UCHAR* lpData, - IN ULONG cbData); - -LONG WINAPI -RegDeleteValueA(HKEY Key, - LPCSTR ValueName); - -LONG WINAPI -RegDeleteKeyA(HKEY Key, - LPCSTR Name); - -USHORT -RegGetSubKeyCount (HKEY Key); - -ULONG -RegGetValueCount (HKEY Key); - -VOID -RegInitializeRegistry(VOID); - -VOID -RegShutdownRegistry(VOID); - -/* EOF */ diff --git a/reactos/tools/mkhive/rtl.c b/reactos/tools/mkhive/rtl.c deleted file mode 100644 index 4a186e253f6..00000000000 --- a/reactos/tools/mkhive/rtl.c +++ /dev/null @@ -1,209 +0,0 @@ -/* COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS hive maker - * FILE: tools/mkhive/rtl.c - * PURPOSE: Runtime Library - */ - -#include -#include - -/* gcc defaults to cdecl */ -#if defined(__GNUC__) -#undef __cdecl -#define __cdecl -#endif - -#include "mkhive.h" -#include - -/* - * @implemented - * - * NOTES - * If source is NULL the length of source is assumed to be 0. - */ -VOID NTAPI -RtlInitAnsiString( - IN OUT PANSI_STRING DestinationString, - IN PCSTR SourceString) -{ - SIZE_T DestSize; - - if(SourceString) - { - DestSize = strlen(SourceString); - DestinationString->Length = (USHORT)DestSize; - DestinationString->MaximumLength = (USHORT)DestSize + sizeof(CHAR); - } - else - { - DestinationString->Length = 0; - DestinationString->MaximumLength = 0; - } - - DestinationString->Buffer = (PCHAR)SourceString; -} - -/* - * @implemented - * - * NOTES - * If source is NULL the length of source is assumed to be 0. - */ -VOID NTAPI -RtlInitUnicodeString( - IN OUT PUNICODE_STRING DestinationString, - IN PCWSTR SourceString) -{ - SIZE_T DestSize; - - if(SourceString) - { - DestSize = strlenW(SourceString) * sizeof(WCHAR); - DestinationString->Length = (USHORT)DestSize; - DestinationString->MaximumLength = (USHORT)DestSize + sizeof(WCHAR); - } - else - { - DestinationString->Length = 0; - DestinationString->MaximumLength = 0; - } - - DestinationString->Buffer = (PWCHAR)SourceString; -} - -NTSTATUS NTAPI -RtlAnsiStringToUnicodeString( - IN OUT PUNICODE_STRING UniDest, - IN PANSI_STRING AnsiSource, - IN BOOLEAN AllocateDestinationString) -{ - ULONG Length; - PUCHAR WideString; - USHORT i; - - Length = AnsiSource->Length * sizeof(WCHAR); - if (Length > MAXUSHORT) return STATUS_INVALID_PARAMETER_2; - UniDest->Length = (USHORT)Length; - - if (AllocateDestinationString) - { - UniDest->MaximumLength = (USHORT)Length + sizeof(WCHAR); - UniDest->Buffer = (PWSTR) malloc(UniDest->MaximumLength); - if (!UniDest->Buffer) - return STATUS_NO_MEMORY; - } - else if (UniDest->Length >= UniDest->MaximumLength) - { - return STATUS_BUFFER_OVERFLOW; - } - - WideString = (PUCHAR)UniDest->Buffer; - for (i = 0; i <= AnsiSource->Length; i++) - { - WideString[2 * i + 0] = AnsiSource->Buffer[i]; - WideString[2 * i + 1] = 0; - } - return STATUS_SUCCESS; -} - -WCHAR NTAPI -RtlUpcaseUnicodeChar( - IN WCHAR Source) -{ - USHORT Offset; - - if (Source < 'a') - return Source; - - if (Source <= 'z') - return (Source - ('a' - 'A')); - - Offset = 0; - - return Source + (SHORT)Offset; -} - -VOID NTAPI -KeQuerySystemTime( - OUT PLARGE_INTEGER CurrentTime) -{ - CurrentTime->QuadPart = 0; -} - -PVOID NTAPI -ExAllocatePool( - IN POOL_TYPE PoolType, - IN SIZE_T NumberOfBytes) -{ - return (PVOID) malloc(NumberOfBytes); -} - -VOID NTAPI -ExFreePool( - IN PVOID p) -{ - free(p); -} - -ULONG -__cdecl -DbgPrint( - IN CHAR *Format, - IN ...) -{ - va_list ap; - va_start(ap, Format); - vprintf(Format, ap); - va_end(ap); - - return 0; -} - -VOID -NTAPI -RtlAssert(PVOID FailedAssertion, - PVOID FileName, - ULONG LineNumber, - PCHAR Message) -{ - if (NULL != Message) - { - DbgPrint("Assertion \'%s\' failed at %s line %d: %s\n", - (PCHAR)FailedAssertion, - (PCHAR)FileName, - LineNumber, - Message); - } - else - { - DbgPrint("Assertion \'%s\' failed at %s line %d\n", - (PCHAR)FailedAssertion, - (PCHAR)FileName, - LineNumber); - } - - //DbgBreakPoint(); -} - -unsigned char BitScanForward(ULONG * Index, unsigned long Mask) -{ - *Index = 0; - while (Mask && ((Mask & 1) == 0)) - { - Mask >>= 1; - ++(*Index); - } - return Mask ? 1 : 0; -} - -unsigned char BitScanReverse(ULONG * const Index, unsigned long Mask) -{ - *Index = 0; - while (Mask && ((Mask & (1 << 31)) == 0)) - { - Mask <<= 1; - ++(*Index); - } - return Mask ? 1 : 0; -} diff --git a/reactos/tools/mkshelllink/CMakeLists.txt b/reactos/tools/mkshelllink/CMakeLists.txt deleted file mode 100644 index 1f4814cd595..00000000000 --- a/reactos/tools/mkshelllink/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ - -add_executable(mkshelllink mkshelllink.c) diff --git a/reactos/tools/mkshelllink/mkshelllink.c b/reactos/tools/mkshelllink/mkshelllink.c deleted file mode 100644 index 7f5cda40875..00000000000 --- a/reactos/tools/mkshelllink/mkshelllink.c +++ /dev/null @@ -1,354 +0,0 @@ -/* COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS Shell Link maker - * FILE: tools/mkshelllink/mkshelllink.c - * PURPOSE: Shell Link maker - * PROGRAMMER: Rafal Harabien - */ - -#include -#include -#include -#ifndef _MSC_VER -#include -#else -typedef unsigned __int8 uint8_t; -typedef unsigned __int16 uint16_t; -typedef unsigned __int32 uint32_t; -#endif - -#define SW_SHOWNORMAL 1 -#define SW_SHOWMINNOACTIVE 7 - -typedef struct _GUID { - uint32_t Data1; - uint16_t Data2; - uint16_t Data3; - uint8_t Data4[8]; -} GUID; - -typedef struct _FILETIME { - uint32_t dwLowDateTime; - uint32_t dwHighDateTime; -} FILETIME, *PFILETIME; - -#define DEFINE_GUID2(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) const GUID name = { l,w1,w2,{ b1,b2,b3,b4,b5,b6,b7,b8 } } -DEFINE_GUID2(CLSID_ShellLink,0x00021401L,0,0,0xC0,0,0,0,0,0,0,0x46); -DEFINE_GUID2(CLSID_MyComputer,0x20D04FE0,0x3AEA,0x1069,0xA2,0xD8,0x08,0x00,0x2B,0x30,0x30,0x9D); - -#define LINK_ID_LIST 0x01 -#define LINK_FILE 0x02 -#define LINK_DESCRIPTION 0x04 -#define LINK_RELATIVE_PATH 0x08 -#define LINK_WORKING_DIR 0x10 -#define LINK_CMD_LINE_ARGS 0x20 -#define LINK_ICON 0x40 -#define LINK_UNICODE 0x80 - -#define LOCATOR_LOCAL 0x1 -#define LOCATOR_NETWORK 0x2 - -#pragma pack(push, 1) - -/* Specification: http://ithreats.files.wordpress.com/2009/05/lnk_the_windows_shortcut_file_format.pdf */ - -typedef struct _LNK_HEADER -{ - uint32_t Signature; - GUID Guid; - uint32_t Flags; - uint32_t Attributes; - FILETIME CreationTime; - FILETIME ModificationTime; - FILETIME LastAccessTime; - uint32_t FileSize; - uint32_t IconNr; - uint32_t Show; - uint32_t Hotkey; - uint32_t Unknown; - uint32_t Unknown2; -} LNK_HEADER; - -typedef struct _LNK_LOCATOR_INFO -{ - uint32_t Size; - uint32_t DataOffset; - uint32_t Flags; - uint32_t LocalVolumeInfoOffset; - uint32_t LocalBasePathnameOffset; - uint32_t NetworkVolumeInfoOffset; - uint32_t RemainingPathnameOffset; - char Data[0]; -} LNK_LOCATOR_INFO; - -typedef struct _LNK_LOCAL_VOLUME_INFO -{ - uint32_t Size; - uint32_t VolumeType; /* See GetDriveType */ - uint32_t SerialNumber; - uint32_t VolumeNameOffset; - char VolumeLabel[0]; -} LNK_LOCAL_VOLUME_INFO; - -#define PT_GUID 0x1F -#define PT_DRIVE1 0x2F -#define PT_FOLDER 0x31 -#define PT_VALUE 0x32 - -typedef struct _ID_LIST_FILE -{ - uint16_t Size; - uint8_t Type; - uint8_t dummy; - uint32_t dwFileSize; - uint16_t uFileDate; - uint16_t uFileTime; - uint16_t uFileAttribs; - char szName[0]; -} ID_LIST_FILE; - -typedef struct _ID_LIST_GUID -{ - uint16_t Size; - uint8_t Type; - uint8_t dummy; - GUID guid; -} ID_LIST_GUID; - -typedef struct _ID_LIST_DRIVE -{ - uint16_t Size; - uint8_t Type; - char szDriveName[20]; - uint16_t unknown; -} ID_LIST_DRIVE; - -#pragma pack(pop) - -int main(int argc, const char *argv[]) -{ - unsigned i; - const char *pszOutputPath = "shortcut.lnk"; - const char *pszTarget = NULL; - const char *pszDescription = "Description"; - const char *pszWorkingDir = NULL; - const char *pszCmdLineArgs = NULL; - const char *pszIcon = NULL; - int IconNr = 0; - GUID Guid = CLSID_MyComputer; - int bHelp = 0, bMinimized = 0; - FILE *pFile; - LNK_HEADER Header; - uint16_t uhTmp; - uint32_t dwTmp; - - for (i = 1; i < argc; ++i) - { - if (argv[i][0] != '-' && argv[i][0] != '/') - pszTarget = argv[i]; - else if (!strcmp(argv[i] + 1, "h")) - bHelp = 1; - else if (!strcmp(argv[i] + 1, "o") && i + 1 < argc) - pszOutputPath = argv[++i]; - else if (!strcmp(argv[i] + 1, "d") && i + 1 < argc) - pszDescription = argv[++i]; - else if (!strcmp(argv[i] + 1, "w") && i + 1 < argc) - pszWorkingDir = argv[++i]; - else if (!strcmp(argv[i] + 1, "c") && i + 1 < argc) - pszCmdLineArgs = argv[++i]; - else if (!strcmp(argv[i] + 1, "i") && i + 1 < argc) - { - pszIcon = argv[++i]; - if (i + 1 < argc && isdigit(argv[i + 1][0])) - IconNr = atoi(argv[++i]); - } - else if (!strcmp(argv[i] + 1, "m")) - bMinimized = 1; - else if (!strcmp(argv[i] + 1, "g") && i + 1 < argc) - { - unsigned Data4Tmp[8], j; - - sscanf(argv[++i], "{%8lx-%4hx-%4hx-%2x%2x-%2x%2x%2x%2x%2x%2x}", - &Guid.Data1, &Guid.Data2, &Guid.Data3, - &Data4Tmp[0], &Data4Tmp[1], &Data4Tmp[2], &Data4Tmp[3], - &Data4Tmp[4], &Data4Tmp[5], &Data4Tmp[6], &Data4Tmp[7]); - for (j = 0; j < 8; ++j) - Guid.Data4[j] = (uint8_t)Data4Tmp[j]; - } - else - printf("Invalid option: %s\n", argv[i]); - } - - if (!pszTarget || bHelp) - { - printf("Usage: %s [-o path][-d descr][-w path][-c cmd_line_args][-i icon_path [nr]][-h][-g guid] target\n" - "-o path\tSets output path\n" - "-d descr\tSets shortcut description\n" - "-w path\tSets working directory for executable\n" - "-c cmd_line_args\tSets command line arguments passed to program\n" - "-i icon_path [nr]\tSets icon file and optionally icon index\n" - "-m\tStart minimized\n" - "-g guid\tSets GUID to which target path is relative. Default value is MyComputer GUID.\n" - "target\tAbsolute or relative to guid specified with -g option path\n", argv[0]); - return 0; - } - - pFile = fopen(pszOutputPath, "wb"); - if (!pFile) - { - printf("Failed to open %s\n", pszOutputPath); - return -1; - } - - // Header - memset(&Header, 0, sizeof(Header)); - Header.Signature = (uint32_t)'L'; - Header.Guid = CLSID_ShellLink; - Header.Flags = LINK_ID_LIST; - if (pszDescription) - Header.Flags |= LINK_DESCRIPTION; - if (pszWorkingDir) - Header.Flags |= LINK_WORKING_DIR; - if (pszCmdLineArgs) - Header.Flags |= LINK_CMD_LINE_ARGS; - if (pszIcon) - Header.Flags |= LINK_ICON; - Header.IconNr = IconNr; - Header.Show = bMinimized ? SW_SHOWMINNOACTIVE : SW_SHOWNORMAL; - fwrite(&Header, sizeof(Header), 1, pFile); - - if (Header.Flags & LINK_ID_LIST) - { - ID_LIST_FILE IdListFile; - ID_LIST_GUID IdListGuid; - ID_LIST_DRIVE IdListDrive; - unsigned cbListSize = sizeof(IdListGuid) + sizeof(uint16_t), cchName; - const char *pszName = pszTarget; - - // ID list - // It seems explorer does not accept links without id list. List is relative to desktop. - - pszName = pszTarget; - - if (pszName[0] && pszName[1] == ':') - { - cbListSize += sizeof(IdListDrive); - pszName += 2; - while (*pszName == '\\' || *pszName == '/') - ++pszName; - } - - while (*pszName) - { - cchName = 0; - while (pszName[cchName] && pszName[cchName] != '\\' && pszName[cchName] != '/') - ++cchName; - - if (cchName != 1 || pszName[0] != '.') - cbListSize += sizeof(IdListFile) + 2 * (cchName + 1); - - pszName += cchName; - while (*pszName == '\\' || *pszName == '/') - ++pszName; - } - - uhTmp = cbListSize; - fwrite(&uhTmp, sizeof(uhTmp), 1, pFile); // size - - IdListGuid.Size = sizeof(IdListGuid); - IdListGuid.Type = PT_GUID; - IdListGuid.dummy = 0x50; - IdListGuid.guid = Guid; - fwrite(&IdListGuid, sizeof(IdListGuid), 1, pFile); - - pszName = pszTarget; - - if (isalpha(pszName[0]) && pszName[1] == ':') - { - memset(&IdListDrive, 0, sizeof(IdListDrive)); - IdListDrive.Size = sizeof(IdListDrive); - IdListDrive.Type = PT_DRIVE1; - sprintf(IdListDrive.szDriveName, "%c:\\", pszName[0]); - fwrite(&IdListDrive, sizeof(IdListDrive), 1, pFile); - pszName += 2; - while(*pszName == '\\' || *pszName == '/') - ++pszName; - } - - while (*pszName) - { - cchName = 0; - while (pszName[cchName] && pszName[cchName] != '\\' && pszName[cchName] != '/') - ++cchName; - - if (cchName != 1 || pszName[0] != '.') - { - memset(&IdListFile, 0, sizeof(IdListFile)); - IdListFile.Size = sizeof(IdListFile) + 2 * (cchName + 1); - if (!pszName[cchName]) - IdListFile.Type = PT_VALUE; // File - else - IdListFile.Type = PT_FOLDER; - fwrite(&IdListFile, sizeof(IdListFile), 1, pFile); - fwrite(pszName, cchName, 1, pFile); - fputc(0, pFile); - fwrite(pszName, cchName, 1, pFile); - fputc(0, pFile); - } - - pszName += cchName; - while (*pszName == '\\' || *pszName == '/') - ++pszName; - } - - uhTmp = 0; // list end - fwrite(&uhTmp, sizeof(uhTmp), 1, pFile); - } - - if (Header.Flags & LINK_DESCRIPTION) - { - // Dscription - uhTmp = strlen(pszDescription); - fwrite(&uhTmp, sizeof(uhTmp), 1, pFile); - fputs(pszDescription, pFile); - } - - if (Header.Flags & LINK_RELATIVE_PATH) - { - // Relative Path - uhTmp = strlen(pszTarget); - fwrite(&uhTmp, sizeof(uhTmp), 1, pFile); - fputs(pszTarget, pFile); - } - - if (Header.Flags & LINK_WORKING_DIR) - { - // Working Dir - uhTmp = strlen(pszWorkingDir); - fwrite(&uhTmp, sizeof(uhTmp), 1, pFile); - fputs(pszWorkingDir, pFile); - } - - if (Header.Flags & LINK_CMD_LINE_ARGS) - { - // Command line arguments - uhTmp = strlen(pszCmdLineArgs); - fwrite(&uhTmp, sizeof(uhTmp), 1, pFile); - fputs(pszCmdLineArgs, pFile); - } - - if (Header.Flags & LINK_ICON) - { - // Command line arguments - uhTmp = strlen(pszIcon); - fwrite(&uhTmp, sizeof(uhTmp), 1, pFile); - fputs(pszIcon, pFile); - } - - // Extra stuff - dwTmp = 0; - fwrite(&dwTmp, sizeof(dwTmp), 1, pFile); - - fclose(pFile); - - return 0; -} diff --git a/reactos/tools/mkshelllink/mkshelllink.rbuild b/reactos/tools/mkshelllink/mkshelllink.rbuild deleted file mode 100644 index afa27014578..00000000000 --- a/reactos/tools/mkshelllink/mkshelllink.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - - - mkshelllink.c - diff --git a/reactos/tools/ms2ps/ms2ps.cpp b/reactos/tools/ms2ps/ms2ps.cpp deleted file mode 100644 index cb61cb97666..00000000000 --- a/reactos/tools/ms2ps/ms2ps.cpp +++ /dev/null @@ -1,431 +0,0 @@ -/* - * ReactOS kernel - * Copyright (C) 2004 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. - */ -/* $Id$ - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS seh conversion tool - * FILE: tools/ms2ps/ms2ps.cpp - * PURPOSE: Conversion tool from msvc to pseh style seh - * PROGRAMMER: Art Yerkes - */ - -#include -#include -#include -#include -#include -#include -#include - -#define MAYBE(x) - -using std::string; -using std::cin; -using std::cout; -using std::cerr; -using std::endl; -using std::istream; - -typedef std::list sl_t; -typedef sl_t::iterator sl_it; - -string TRY_TOKEN = "__try"; -string EXCEPT_TOKEN = "__except"; -string FINALLY_TOKEN = "__finally"; -char *c_operators[] = { - "{", - "}", - "(", - ")", - NULL -}; - -int isident( int c ) { - return (c != '{') && (c != '}') && (c != '(') && (c != ')') && - (c != '\'') && (c != '\"') && !isspace(c); -} - -bool areinclass( string str, int (*isclass)(int) ) { - int i; - - for( i = 0; i < (int)str.size(); i++ ) - if( !isclass( str[i] ) ) return false; - - return true; -} - -bool areident( string s ) { return areinclass( s, isident ); } - -bool isop( string tok ) { - int i; - for( i = 0; c_operators[i] && tok != c_operators[i]; i++ ); - if( c_operators[i] ) return true; else return false; -} - -enum fstate { EMPTY, INT, FRAC, EXP }; - -string generic_match( string tok, string la, - bool (*mf)( string ) ) { - if( tok.size() < 1 ) return ""; - if( mf(tok) && !mf(la) ) return tok; else return ""; -} - -string match_operator( string tok, string la ) { - return generic_match( tok, la, isop ); -} - -string match_ident( string tok, string la ) { - return generic_match( tok, la, areident ); -} - -string match_quoted_const( string tok, string la, char q ) { - if( ((tok.size() && tok[0] == q) || - ((tok.size() > 2) && tok[0] == 'L' && tok[1] == q)) && - (tok.rfind(q) == (tok.size() - 1)) ) { - if( (tok.rfind("\\") != (tok.size() - 2)) || - (tok.size() > 3 && tok.rfind("\\\\") == (tok.size() - 3)) ) - return tok; - else return ""; - } - else return ""; -} - -sl_t snarf_tokens( string line ) { - int i; - sl_t out; - string curtok, la, op, ident, qconst; - - line += " "; - - for( i = 0; i < (int)line.size() - 1; i++ ) { - /*cout << "Char [" << line[i] << "] and [" << line[i+1] << "]" - << endl; */ - - if( (!curtok.size() || - (curtok[0] != '\'' && curtok[0] != '\"')) && - (curtok.size() <= 2 || - curtok[0] != 'L' || - (curtok[1] != '\'' && curtok[1] != '\"')) && - isspace(line[i]) ) { - if( curtok.size() ) out.push_back( curtok ); - curtok = ""; - continue; - } - - curtok.push_back( line[i] ); - - la = curtok + line[i+1]; - - op = match_operator( curtok, la ); - - if( op != "" ) { - out.push_back( op MAYBE(+ "O") ); - curtok = ""; - continue; - } - - if( la != "L\"" && la != "L\'" ) { - ident = match_ident( curtok, la ); - - if( ident != "" ) { - out.push_back( ident MAYBE(+ "I") ); - curtok = ""; - continue; - } - } - - qconst = match_quoted_const( curtok, la, '\'' ); - - if( qconst != "" ) { - out.push_back( qconst MAYBE(+ "q") ); - curtok = ""; - continue; - } - - qconst = match_quoted_const( curtok, la, '\"' ); - - if( qconst != "" ) { - out.push_back( qconst MAYBE(+ "Q") ); - curtok = ""; - continue; - } - } - - return out; -} - -istream &getline_no_comments( istream &is, string &line ) { - string buf; - int ch; - int seen_slash = false; - - while( (ch = is.get()) != -1 ) { - if( seen_slash ) { - if( ch == '/' ) { - do { - ch = is.get(); - } while( ch != -1 && ch != '\n' && ch != '\r' ); - break; - } else if( ch == '*' ) { - ch = is.get(); /* Skip one char */ - do { - while( ch != '*' ) - ch = is.get(); - ch = is.get(); - } while( ch != '/' ); - buf += ' '; - } else { - buf += '/'; buf += (char)ch; - } - seen_slash = false; - } else { - if( ch == '/' ) seen_slash = true; - else if( ch == '\r' || ch == '\n' ) break; - else buf += (char)ch; - } - } - - line = buf; - - return is; -} - -bool expand_input( sl_t &tok ) { - string line; - sl_t new_tokens; - bool out = false; - - out = getline_no_comments( cin, line ); - while( line.size() && isspace( line[0] ) ) - line = line.substr( 1 ); - if( line[0] == '#' ) { - tok.push_back( line ); - while( line[line.size()-1] == '\\' ) { - getline_no_comments( cin, line ); - tok.push_back( line ); - tok.push_back( "\n" ); - } - tok.push_back( "\n" ); - } else { - new_tokens = snarf_tokens( line ); - tok.splice( tok.end(), new_tokens ); - tok.push_back( "\n" ); - } - - return out; -} - -sl_it -complete_block( sl_it i, - sl_it end, - string start_ch, string end_ch) { - int bc = 1; - - for( i++; i != end && bc; i++ ) { - if( *i == start_ch ) bc++; - if( *i == end_ch ) bc--; - } - - return i; -} - -string makename( string intro ) { - static int i = 0; - char buf[100]; - - sprintf( buf, "%s%d", intro.c_str(), i++ ); - - return buf; -} - -void append_block( sl_t &t, sl_it b, sl_it e ) { - while( b != e ) { - t.push_back( *b ); - b++; - } -} - -void error( sl_t &container, sl_it it, string l ) { - int line = 0; - for( sl_it i = container.begin(); i != it; i++ ) - if( (*i)[0] == '#' ) { - sscanf( i->substr(1).c_str(), "%d", &line ); - cerr << "*standard-input*:" << line << ": " << l; - } -} - -/* Goal: match and transform one __try { a } __except [ (foo) ] { b } - * [ __finally { c } ] - * - * into - * - * _SEH_FINALLY(name1) { c } - * _SEH_FILTER(name2) { return (foo | EXCEPTION_EXECUTE_HANDLER); } - * _SEH_TRY_FILTER_FINALLY(name1,name2) { - * a - * } _SEH_HANDLE { - * b - * } _SEH_END; - */ - -void handle_try( sl_t &container, sl_it try_kw, sl_it end ) { - string temp; - sl_t pseh_clause, temp_tok; - string finally_name, filter_name; - sl_it try_block, try_block_end, except_kw, paren, end_paren, - except_block, except_block_end, todelete, - finally_kw, finally_block, finally_block_end, clause_end; - - try_block = try_kw; - try_block++; - try_block_end = complete_block( try_block, end, "{", "}" ); - - if( try_block_end == end ) - error( container, try_block, "unclosed try block"); - - except_kw = try_block_end; - - if( *except_kw == FINALLY_TOKEN ) { - finally_kw = except_kw; - except_kw = end; - paren = end; - end_paren = end; - except_block = end; - except_block_end = end; - } else if( *except_kw == EXCEPT_TOKEN ) { - paren = except_kw; - paren++; - if( *paren == "(" ) { - end_paren = complete_block( paren, end, "(", ")" ); - except_block = end_paren; - } else { - except_block = paren; - paren = end; - end_paren = end; - } - except_block_end = complete_block( except_block, end, "{", "}" ); - finally_kw = except_block_end; - } else { - except_kw = paren = end_paren = except_block = except_block_end = - finally_kw = finally_block = finally_block_end = end; - } - - if( finally_kw != end && *finally_kw != FINALLY_TOKEN ) { - finally_kw = end; - finally_block = end; - finally_block_end = end; - } else { - finally_block = finally_kw; - finally_block++; - finally_block_end = complete_block( finally_block, end, "{", "}" ); - } - - if( finally_block_end != end ) clause_end = finally_block_end; - else if( except_block_end != end ) clause_end = except_block_end; - else clause_end = try_block_end; - - /* Skip one so that we can do != on clause_end */ - - /* Now for the output phase -- we've collected the whole seh clause - * and it lies between try_kw and clause_end */ - - finally_name = makename("_Finally"); - filter_name = makename("_Filter"); - - pseh_clause.push_back( "_SEH_FINALLY" ); - pseh_clause.push_back( "(" ); - pseh_clause.push_back( finally_name ); - pseh_clause.push_back( ")" ); - if( finally_kw != end ) - append_block( pseh_clause, finally_block, finally_block_end ); - else { - pseh_clause.push_back( "{" ); - pseh_clause.push_back( "}" ); - } - - pseh_clause.push_back( "_SEH_FILTER" ); - pseh_clause.push_back( "(" ); - pseh_clause.push_back( filter_name ); - pseh_clause.push_back( ")" ); - pseh_clause.push_back( "{" ); - pseh_clause.push_back( "return" ); - if( paren != end ) - append_block( pseh_clause, paren, end_paren ); - else - pseh_clause.push_back( "EXCEPTION_EXECUTE_HANDLER" ); - pseh_clause.push_back( ";" ); - pseh_clause.push_back( "}" ); - - pseh_clause.push_back( "_SEH_TRY_FILTER_FINALLY" ); - pseh_clause.push_back( "(" ); - pseh_clause.push_back( filter_name ); - pseh_clause.push_back( "," ); - pseh_clause.push_back( finally_name ); - pseh_clause.push_back( ")" ); - append_block( pseh_clause, try_block, try_block_end ); - pseh_clause.push_back( "_SEH_HANDLE" ); - pseh_clause.push_back( "{" ); - if( except_block != end ) - append_block( pseh_clause, except_block, except_block_end ); - pseh_clause.push_back( "}" ); - pseh_clause.push_back( "_SEH_END" ); - pseh_clause.push_back( ";" ); - - container.splice( try_kw, pseh_clause ); - while( try_kw != clause_end ) { - todelete = try_kw; - try_kw++; - container.erase( todelete ); - } -} - -void print_tokens( sl_it begin, sl_it end ) { - for( sl_it i = begin; i != end; i++ ) - if( *i == "\n" ) cout << *i; - else cout << /*"[" <<*/ *i << /*"]" <<*/ " "; -} - -int main( int argc, char **argv ) { - sl_t tok; - sl_it try_found; - int i; - - for( i = 1; i < argc; i++ ) { - if( string(argv[i]) == "-try" && i < argc - 1 ) { - i++; - TRY_TOKEN = argv[i]; - } else if( string(argv[i]) == "-except" && i < argc - 1 ) { - i++; - EXCEPT_TOKEN = argv[i]; - } else if( string(argv[i]) == "-finally" && i < argc - 1 ) { - i++; - FINALLY_TOKEN = argv[i]; - } - } - - /* XXX Uses much memory for large files */ - while( expand_input(tok) ); - - while( (try_found = find( tok.begin(), tok.end(), TRY_TOKEN )) != - tok.end() ) { - handle_try( tok, try_found, tok.end() ); - } - - tok.push_front("#include \n"); - print_tokens( tok.begin(), tok.end() ); -} diff --git a/reactos/tools/nandflash/main.c b/reactos/tools/nandflash/main.c deleted file mode 100644 index 012fc54b3db..00000000000 --- a/reactos/tools/nandflash/main.c +++ /dev/null @@ -1,191 +0,0 @@ -/* - * PROJECT: OMAP3 NAND Flashing Utility - * LICENSE: BSD - See COPYING.ARM in the top level directory - * FILE: tools/nandflash/main.c - * PURPOSE: Flashes OmapLDR, FreeLDR and a Root FS into a NAND image - * PROGRAMMERS: ReactOS Portable Systems Group - */ - -/* INCLUDES *******************************************************************/ - -#include "nandflash.h" - -/* GLOBALS ********************************************************************/ - -/* File Names */ -PCHAR NandImageName = "reactos.bin"; -PCHAR LlbImageName = "./output-arm/boot/armllb/armllb.bin"; -PCHAR BootLdrImageName = "./output-arm/boot/freeldr/freeldr/freeldr.sys"; -PCHAR FsImageName = "ramdisk.img"; -PCHAR RamImageName = "ramdisk.bin"; - -/* NAND On-Disk Memory Map */ -ULONG LlbStart = 0x00000000, LlbEnd = 0x00010000; // 64 KB -ULONG BootLdrStart = 0x00010000, BootLdrEnd = 0x00090000; // 512 KB -ULONG FsStart = 0x00090000, FsEnd = 0x10000000; // 255 MB - -/* Should we write OOB data? */ -ULONG NeedsOob = TRUE; - -/* FUNCTIONS ******************************************************************/ - -INT -NTAPI -CreateFlashFile(VOID) -{ - INT FileDescriptor, i; - CHAR Buffer[NAND_PAGE_SIZE + NAND_OOB_SIZE]; - - /* Try open NAND image */ - FileDescriptor = open(NandImageName, O_RDWR); - if (FileDescriptor) - { - /* Create NAND image */ - FileDescriptor = open(NandImageName, O_RDWR | O_CREAT); - if (FileDescriptor) return FileDescriptor; - - /* Create zero buffer */ - memset(Buffer, 0xff, sizeof(Buffer)); - - /* Write zero buffer */ - for (i = 0; i < NAND_PAGES; i++) write(FileDescriptor, Buffer, sizeof(Buffer)); - } - - /* Return NAND descriptor */ - return FileDescriptor; -} - -VOID -NTAPI -WriteToFlash(IN INT NandImageFile, - IN INT ImageFile, - IN ULONG ImageStart, - IN ULONG ImageEnd) -{ - CHAR Data[NAND_PAGE_SIZE], Oob[NAND_OOB_SIZE]; - ULONG StartPage, EndPage, i, OobSize = 0; - BOOLEAN KeepGoing = TRUE; - - /* Offset to NAND Page convert */ - StartPage = ImageStart / NAND_PAGE_SIZE; - EndPage = ImageEnd / NAND_PAGE_SIZE; - - /* Jump to NAND offset */ - if (NeedsOob) OobSize = NAND_OOB_SIZE; - lseek(NandImageFile, StartPage * (NAND_PAGE_SIZE + OobSize), SEEK_SET); - - /* Set input image offset */ - lseek(ImageFile, 0, SEEK_SET); - - /* Create zero buffer */ - memset(Data, 0xff, NAND_PAGE_SIZE); - memset(Oob, 0xff, NAND_OOB_SIZE); - - /* Parse NAND Pages */ - for (i = StartPage; i < EndPage; i++) - { - /* Read NAND page from input image */ - if (read(ImageFile, Data, NAND_PAGE_SIZE) < NAND_PAGE_SIZE) - { - /* Do last write and quit after */ - KeepGoing = FALSE; - } - - /* Write OOB and NAND Data */ - write(NandImageFile, Data, NAND_PAGE_SIZE); - if (NeedsOob) write(NandImageFile, Oob, NAND_OOB_SIZE); - - /* Next page if data continues */ - if (!KeepGoing) break; - } -} - -VOID -NTAPI -WriteLlb(IN INT NandImageFile) -{ - INT FileDescriptor; - - /* Open LLB and write it */ - FileDescriptor = open(LlbImageName, O_RDWR); - WriteToFlash(NandImageFile, FileDescriptor, LlbStart, LlbEnd); - close(FileDescriptor); -} - -VOID -NTAPI -WriteBootLdr(IN INT NandImageFile) -{ - INT FileDescriptor; - - /* Open FreeLDR and write it */ - FileDescriptor = open(BootLdrImageName, O_RDWR); - WriteToFlash(NandImageFile, FileDescriptor, BootLdrStart, BootLdrEnd); - close(FileDescriptor); -} - -VOID -NTAPI -WriteFileSystem(IN INT NandImageFile) -{ - INT FileDescriptor; - - /* Open FS image and write it */ - FileDescriptor = open(FsImageName, O_RDWR); - WriteToFlash(NandImageFile, FileDescriptor, FsStart, FsEnd); - close(FileDescriptor); -} - -VOID -NTAPI -WriteRamDisk(IN INT RamDiskFile) -{ - INT FileDescriptor; - - /* Open FS image and write it 16MB later */ - FileDescriptor = open(FsImageName, O_RDWR); - WriteToFlash(RamDiskFile, FileDescriptor, 16 * 1024 * 1024, (32 + 16) * 1024 * 1024); - close(FileDescriptor); -} - -int -main(ULONG argc, - char **argv) -{ - INT NandImageFile, RamDiskFile; - - /* Flat NAND, no OOB */ - if (argc == 2) NeedsOob = FALSE; - - /* Open or create NAND Image File */ - NandImageFile = CreateFlashFile(); - if (!NandImageFile) exit(-1); - - /* Write components */ - WriteLlb(NandImageFile); - WriteBootLdr(NandImageFile); - if (NeedsOob) - { - /* Write the ramdisk normaly */ - WriteFileSystem(NandImageFile); - } - else - { - /* Open a new file for the ramdisk */ - RamDiskFile = open(RamImageName, O_RDWR | O_CREAT); - if (!RamDiskFile) exit(-1); - - /* Write it */ - WriteRamDisk(RamDiskFile); - - /* Close */ - close(RamDiskFile); - } - - - /* Close and return */ - close(NandImageFile); - return 0; -} - -/* EOF */ diff --git a/reactos/tools/nandflash/nandflash.h b/reactos/tools/nandflash/nandflash.h deleted file mode 100644 index 59f68448a75..00000000000 --- a/reactos/tools/nandflash/nandflash.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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/reactos/tools/nandflash/nandflash.rbuild b/reactos/tools/nandflash/nandflash.rbuild deleted file mode 100644 index b8529b7c846..00000000000 --- a/reactos/tools/nandflash/nandflash.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - - - main.c - diff --git a/reactos/tools/obj2bin/CMakeLists.txt b/reactos/tools/obj2bin/CMakeLists.txt deleted file mode 100644 index 83edc3254d7..00000000000 --- a/reactos/tools/obj2bin/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_executable(obj2bin obj2bin.c) diff --git a/reactos/tools/obj2bin/obj2bin.c b/reactos/tools/obj2bin/obj2bin.c deleted file mode 100644 index 478487401f3..00000000000 --- a/reactos/tools/obj2bin/obj2bin.c +++ /dev/null @@ -1,165 +0,0 @@ -#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) - { - fclose(pSourceFile); - fprintf(stderr, "Failed to allocate %ld bytes\n", nFileSize); - return -3; - } - - /* Read the whole source file */ - if (!fread(pData, nFileSize, 1, pSourceFile)) - { - free(pData); - fclose(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 (!pDestFile) - { - free(pData); - 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)) - { - free(pData); - fclose(pDestFile); - fprintf(stderr, "Failed to write data %ld\n", - pSectionHeader->SizeOfRawData); - return -6; - } - - nBaseAddress += pSectionHeader->SizeOfRawData; - } - - pSectionHeader++; - } - - free(pData); - fclose(pDestFile); - - return 0; -} - diff --git a/reactos/tools/ofw_interface/calls.ofw b/reactos/tools/ofw_interface/calls.ofw deleted file mode 100644 index 00273f1a426..00000000000 --- a/reactos/tools/ofw_interface/calls.ofw +++ /dev/null @@ -1,16 +0,0 @@ -# Function Args Returns Types -# Real OFW functions to proxy -finddevice 1 1 char* int -open 1 1 char* int -getprop 4 1 int char* char*:arg3 int int -nextprop 3 1 int char* char* int -getproplen 2 1 int char* int -write 3 1 int char*:arg2 int int -read 3 1 int char*:arg2 int int -exit 0 0 -child 1 1 int int -peer 1 1 int int -parent 1 1 int int -seek 3 1 int int int int -package-to-path 3 1 int char*:arg2 int int -claim 3 1 int int int int diff --git a/reactos/tools/ofw_interface/ofw_interface.cpp b/reactos/tools/ofw_interface/ofw_interface.cpp deleted file mode 100644 index 5946c7b3e08..00000000000 --- a/reactos/tools/ofw_interface/ofw_interface.cpp +++ /dev/null @@ -1,316 +0,0 @@ -#include -#include -#include -#include -#include -#include - -class ofw_wrappers { -public: - int base, ctindex, method_ctindex; - std::string functions; - std::string names; - std::string calltable; - std::string le_stubs; - std::string of_call; -}; - -class vartype { -public: - vartype( const std::string &typestr ) { - size_t amp = typestr.find('&'); - size_t col = typestr.find(':'); - if( amp != std::string::npos ) { - if( col > amp && col != std::string::npos ) - lit_value = typestr.substr(amp+1,col-amp+1); - else lit_value = typestr.substr(amp+1); - } - if( col != std::string::npos ) { - if( amp > col && amp != std::string::npos ) - len = typestr.substr(col+1,amp-col+1); - else len = typestr.substr(col+1); - } - - if( amp != std::string::npos && amp < col ) col = amp; - if( col == std::string::npos ) col = typestr.size(); - c_type = typestr.substr(0,col); - } - - vartype( const vartype &other ) - : c_type(other.c_type), - len(other.len), - lit_value(other.lit_value) { - } - - vartype &operator = ( const vartype &other ) { - c_type = other.c_type; - len = other.len; - lit_value = other.lit_value; - return *this; - } - - std::string c_type; - std::string len; - std::string lit_value; -}; - -std::string uppercase( const std::string &toucase ) { - std::vector ucase_work(toucase.size()); - for( size_t i = 0; i < toucase.size(); i++ ) { - ucase_work[i] = toupper(toucase[i]); - } - return std::string(&ucase_work[0], toucase.size()); -} - -std::string clip_eol( std::string in, const std::string &eol_marks ) { - size_t found; - for( size_t i = 0; i < eol_marks.size(); i++ ) { - found = in.find( eol_marks[i] ); - if( found != std::string::npos ) - in = in.substr( 0, found ); - } - return in; -} - -int round_up( int x, int factor ) { - return (x + (factor - 1)) & ~(factor - 1); -} - -void populate_definition( ofw_wrappers &wrapper, const std::string &line ) { - std::istringstream iss(line); - bool make_function = true, method_call = false, make_stub = true, comma; - std::string name, nametext, argtype, rettype; - std::vector argtypes; - int args, rets, i, local_offset, total_stack, userarg_start = 0; - size_t f; - std::ostringstream function, ct_csource, le_stub, of_call; - - iss >> name >> args >> rets; - - if( !name.size() ) return; - - if( (f = name.find('!')) != std::string::npos ) { - nametext = name.substr(f+1); - name = name.substr(0,f); - } - if( name[0] == '-' ) { - name = name.substr(1); - make_function = false; - } - if( name[0] == '+' ) { - name = name.substr(1); - make_stub = false; - } - if( name[0] == '@' ) { - name = name.substr(1); - method_call = true; - make_function = false; - } - - if( !nametext.size() ) nametext = name; - - for( i = 1; i < (int)name.size(); i++ ) - if( name[i] == '-' ) name[i] = '_'; - - if( nametext == "call-method" ) - wrapper.method_ctindex = wrapper.ctindex; - - for( i = 0; i < args; i++ ) { - iss >> argtype; - argtypes.push_back(vartype(argtype)); - } - - if( method_call ) { - userarg_start = 1; - args += 2; - } - - iss >> rettype; - if( !rettype.size() ) rettype = "void"; - - local_offset = (3 + rets + args) * 4; - total_stack = round_up(12 + local_offset, 16); - - function << "asm_ofw_" << name << ":\n" - << "\t/* Reserve stack space */\n" - << "\tsubi %r1,%r1," << total_stack << "\n" - << "\t/* Store r8, r9, lr */\n" - << "\tstw %r8," << (local_offset + 0) << "(%r1)\n" - << "\tstw %r9," << (local_offset + 4) << "(%r1)\n" - << "\tmflr %r8\n" - << "\tstw %r8," << (local_offset + 8) << "(%r1)\n" - << "\t/* Get read name */\n" - << "\tlis %r8," << name << "_ofw_name@ha\n" - << "\taddi %r9,%r8," << name << "_ofw_name@l\n" - << "\tstw %r9,0(%r1)\n" - << "\t/* " << args << " arguments and " << rets << " return */\n" - << "\tli %r9," << args << "\n" - << "\tstw %r9,4(%r1)\n" - << "\tli %r9," << rets << "\n" - << "\tstw %r9,8(%r1)\n"; - - for( int i = 0; i < args; i++ ) - function << "\tstw %r" << (i+3) << "," << (4 * (i + 3)) << "(%r1)\n"; - - function << "\t/* Load up the call address */\n" - << "\tlis %r10,ofw_call_addr@ha\n" - << "\tlwz %r9,ofw_call_addr@l(%r10)\n" - << "\tmtlr %r9\n" - << "\t/* Set argument */\n" - << "\tmr %r3,%r1\n" - << "\t/* Fire */\n" - << "\tblrl\n" - << "\tlwz %r3," << (local_offset - 4) << "(%r1)\n" - << "\t/* Restore registers */\n" - << "\tlwz %r8," << (local_offset + 8) << "(%r1)\n" - << "\tmtlr %r8\n" - << "\tlwz %r9," << (local_offset + 4) << "(%r1)\n" - << "\tlwz %r8," << (local_offset + 0) << "(%r1)\n" - << "\t/* Return */\n" - << "\taddi %r1,%r1," << total_stack << "\n" - << "\tblr\n"; - - if( method_call ) { - argtypes.insert(argtypes.begin(),vartype("int")); - argtypes.insert(argtypes.begin(),vartype("char*")); - } - - le_stub << rettype << " ofw_" << name << "("; - - comma = false; - for( i = userarg_start; i < args; i++ ) { - if( !argtypes[i].lit_value.size() ) { - if( !comma ) comma = true; else le_stub << ","; - le_stub << argtypes[i].c_type << " arg" << i; - } - } - le_stub << ")"; - of_call << le_stub.str() << ";\n"; - - le_stub << " {\n"; - if( rettype != "void" ) - le_stub << "\t" << rettype << " ret;\n"; - - if( method_call ) { - le_stub << "\tchar arg0[" - << round_up(nametext.size()+1,8) - << "] = \"" << nametext << "\";\n"; - } - - for( i = 0; i < args; i++ ) { - if( argtypes[i].lit_value.size() ) { - le_stub << "\t" << argtypes[i].c_type << " arg" << i << " = " - << argtypes[i].lit_value << ";\n"; - } - } - - le_stub << "\t"; - if( rettype != "void" ) le_stub << "ret = (" << rettype << ")"; - - le_stub << "ofproxy(" << - (method_call ? (wrapper.method_ctindex * 4) : (wrapper.ctindex * 4)); - - for( i = 0; i < 6; i++ ) { - if( i < args ) le_stub << ",(void *)arg" << i; - else le_stub << ",NULL"; - } - - le_stub << ");\n"; - - if( rettype != "void" ) - le_stub << "\treturn ret;\n"; - - le_stub << "}\n"; - - if( make_function ) wrapper.functions += function.str(); - if( make_stub ) { - wrapper.le_stubs += le_stub.str(); - wrapper.of_call += of_call.str(); - } - if( !method_call ) { - wrapper.names += name + "_ofw_name:\n\t.asciz \"" + nametext + "\"\n"; - wrapper.calltable += std::string("\t.long asm_ofw_") + name + "\n"; - wrapper.ctindex++; - } -} - -int main( int argc, char **argv ) { - int status = 0; - std::ifstream in; - std::ofstream out, outcsource, outcheader; - std::string line; - const char *eol_marks = "#\r\n"; - ofw_wrappers wrappers; - - wrappers.base = 0xe00000; - wrappers.ctindex = 0; - - if( argc < 5 ) { - fprintf( stderr, "%s [interface.ofw] [ofw.s] [le_stub.c] [le_stub.h]\n", argv[0] ); - return 1; - } - - in.open( argv[1] ); - if( !in ) { - fprintf( stderr, "can't open %s\n", argv[1] ); - status = 1; - goto error; - } - - out.open( argv[2] ); - if( !out ) { - fprintf( stderr, "can't open %s\n", argv[2] ); - status = 1; - goto error; - } - - outcsource.open( argv[3] ); - if( !outcsource ) { - fprintf( stderr, "can't open %s\n", argv[3] ); - status = 1; - goto error; - } - - outcheader.open( argv[4] ); - if( !outcheader ) { - fprintf( stderr, "can't open %s\n", argv[4] ); - status = 1; - goto error; - } - - while( std::getline( in, line ) ) { - line = clip_eol( line, eol_marks ); - if( line.size() ) populate_definition( wrappers, line ); - } - - out << "/* AUTOMATICALLY GENERATED BY ofw_interface */\n" - << "\t.section .text\n" - << "\t.align 4\n" - << "\t.globl _start\n" - << "\t.globl ofw_functions\n" - << "\t.globl ofw_call_addr\n" - << "ofw_call_addr:\n" - << "\t.long 0\n" - << "\n/* Function Wrappers */\n\n" - << wrappers.functions - << "\n/* Function Names */\n\n" - << wrappers.names - << "\n/* Function Call Table for Freeldr */\n\n" - << "\t.align 4\n" - << "ofw_functions:\n" - << wrappers.calltable - << "\n/* End */\n"; - - outcsource << "/* AUTOMATICALLY GENERATED BY ofw_interface */\n" - << "#include \"of.h\"\n" - << wrappers.le_stubs; - - outcheader << "/* AUTOMATICALLY GENERATE BY ofw_interface */\n" - << "#ifndef _OFW_CALLS_H\n" - << "#define _OFW_CALLS_H\n" - << wrappers.of_call - << "#endif/*_OFW_CALLS_H*/\n"; - -error: - return status; -} diff --git a/reactos/tools/ofw_interface/ofw_interface.mak b/reactos/tools/ofw_interface/ofw_interface.mak deleted file mode 100644 index a6b2f8698fd..00000000000 --- a/reactos/tools/ofw_interface/ofw_interface.mak +++ /dev/null @@ -1,63 +0,0 @@ -OFW_INTERFACE_BASE = $(TOOLS_BASE_)ofw_interface -OFW_INTERFACE_BASE_ = $(OFW_INTERFACE_BASE)$(SEP) -OFW_INTERFACE_INT = $(INTERMEDIATE_)$(OFW_INTERFACE_BASE) -OFW_INTERFACE_INT_ = $(OFW_INTERFACE_INT)$(SEP) -OFW_INTERFACE_OUT = $(OUTPUT_)$(OFW_INTERFACE_BASE) -OFW_INTERFACE_OUT_ = $(OFW_INTERFACE_OUT)$(SEP) - -OFW_INTERFACE_OUTPUT = boot/freeldr/freeldr/arch/powerpc/ofw_calls.s -OFW_INTERFACE_SOURCE = boot/freeldr/freeldr/arch/powerpc/ofw.c -OFW_INTERFACE_HEADER = boot/freeldr/freeldr/include/of_call.h -OFW_INTERFACE_INPUT = $(OFW_INTERFACE_BASE_)calls.ofw -OFW_INTERFACE_SERVICE_FILES = \ - $(OFW_INTERFACE_OUTPUT) \ - $(OFW_INTERFACE_SOURCE) \ - $(OFW_INTERFACE_HEADER) - -$(OFW_INTERFACE_INT): | $(TOOLS_INT) - $(ECHO_MKDIR) - ${mkdir} $@ - -ifneq ($(INTERMEDIATE),$(OUTPUT)) -$(OFW_INTERFACE_OUT): | $(TOOLS_OUT) - $(ECHO_MKDIR) - ${mkdir} $@ -endif - -OFW_INTERFACE_TARGET = \ - $(OFW_INTERFACE_OUT_)ofw_interface$(EXEPOSTFIX) - -OFW_INTERFACE_SOURCES = $(addprefix $(OFW_INTERFACE_BASE_), \ - ofw_interface.cpp \ - ) - -OFW_INTERFACE_OBJECTS = \ - $(addprefix $(INTERMEDIATE_), $(OFW_INTERFACE_SOURCES:.cpp=.o)) - -OFW_INTERFACE_HOST_CFLAGS = $(TOOLS_CFLAGS) - -OFW_INTERFACE_HOST_LFLAGS = $(TOOLS_LFLAGS) - -$(OFW_INTERFACE_TARGET): $(OFW_INTERFACE_OBJECTS) | $(OFW_INTERFACE_OUT) - $(ECHO_HOSTLD) - ${host_gpp} $(OFW_INTERFACE_OBJECTS) $(OFW_INTERFACE_HOST_LFLAGS) -o $@ - -$(OFW_INTERFACE_INT_)ofw_interface.o: $(OFW_INTERFACE_BASE_)ofw_interface.cpp | $(OFW_INTERFACE_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(OFW_INTERFACE_HOST_CFLAGS) -c $< -o $@ - -$(OFW_INTERFACE_SERVICE_FILES): $(OFW_INTERFACE_TARGET) $(OFW_INTERFACE_INPUT) - $(ECHO_OFW) - $(Q)$(OFW_INTERFACE_TARGET) \ - $(OFW_INTERFACE_INPUT) \ - $(OFW_INTERFACE_OUTPUT) \ - $(OFW_INTERFACE_SOURCE) \ - $(OFW_INTERFACE_HEADER) - -.PHONY: ofw_interface -ofw_interface: $(OFW_INTERFACE_TARGET) - -.PHONY: ofw_interface_clean -ofw_interface_clean: - -@$(rm) $(OFW_INTERFACE_TARGET) $(OFW_INTERFACE_OBJECTS) 2>$(NUL) -clean: ofw_interface_clean diff --git a/reactos/tools/pecoff.h b/reactos/tools/pecoff.h deleted file mode 100644 index ff0bfdf3e36..00000000000 --- a/reactos/tools/pecoff.h +++ /dev/null @@ -1,246 +0,0 @@ -#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/reactos/tools/pefixup.c b/reactos/tools/pefixup.c deleted file mode 100644 index aa1c998488f..00000000000 --- a/reactos/tools/pefixup.c +++ /dev/null @@ -1,421 +0,0 @@ -/* - * PE Fixup Utility - * Copyright (C) 2005 Filip Navara - * - * The purpose of this utility is fix PE binaries generated by binutils and - * to manipulate flags that can't be set by binutils. - * - * Currently two features are implemented: - * - * - Setting flags on PE sections for use by drivers. The sections - * .text, .data, .idata, .bss are marked as non-pageable and - * non-discarable, section PAGE is marked as pageable and section - * INIT is marked as discaradable. - * - * - Sorting of export name table in executables. DLLTOOL has bug - * in sorting algorithm when the --kill-at flag is used. The exports - * are sorted in the decorated form and so the fastcall symbols are - * incorrectly put at the beginning of export table. This option - * allow to correct sort the table, so binary search can be used - * to process them. - */ - -#include -#include -#include -#include -#include - -#ifndef O_BINARY -#define O_BINARY 0 -#endif - -/* The following definitions are ripped from MinGW W32API headers. We don't - use these headers directly in order to allow compilation on Linux hosts. */ - -typedef unsigned char BYTE, *PBYTE; -typedef unsigned short WORD; -typedef unsigned int DWORD; -typedef int LONG; -typedef long LONG_PTR; - -#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16 -#define IMAGE_SIZEOF_SHORT_NAME 8 -#define IMAGE_DOS_SIGNATURE 0x5A4D -#define IMAGE_NT_SIGNATURE 0x00004550 -#define IMAGE_SCN_MEM_DISCARDABLE 0x2000000 -#define IMAGE_SCN_MEM_NOT_PAGED 0x8000000 -#define FIELD_OFFSET(t,f) ((LONG)(LONG_PTR)&(((t*)0)->f)) -#define IMAGE_FIRST_SECTION(h) ((PIMAGE_SECTION_HEADER) ((unsigned long)h+FIELD_OFFSET(IMAGE_NT_HEADERS,OptionalHeader)+((PIMAGE_NT_HEADERS)(h))->FileHeader.SizeOfOptionalHeader)) -#define IMAGE_DIRECTORY_ENTRY_EXPORT 0 - -#pragma pack(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(4) -#pragma pack(4) -typedef struct _IMAGE_EXPORT_DIRECTORY { - DWORD Characteristics; - DWORD TimeDateStamp; - WORD MajorVersion; - WORD MinorVersion; - DWORD Name; - DWORD Base; - DWORD NumberOfFunctions; - DWORD NumberOfNames; - DWORD AddressOfFunctions; - DWORD AddressOfNames; - DWORD AddressOfNameOrdinals; -} IMAGE_EXPORT_DIRECTORY,*PIMAGE_EXPORT_DIRECTORY; -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; -typedef struct _IMAGE_DATA_DIRECTORY { - DWORD VirtualAddress; - DWORD Size; -} IMAGE_DATA_DIRECTORY,*PIMAGE_DATA_DIRECTORY; -typedef struct _IMAGE_OPTIONAL_HEADER { - 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 Reserved1; - 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_HEADER,*PIMAGE_OPTIONAL_HEADER; -typedef struct _IMAGE_NT_HEADERS { - DWORD Signature; - IMAGE_FILE_HEADER FileHeader; - IMAGE_OPTIONAL_HEADER OptionalHeader; -} IMAGE_NT_HEADERS,*PIMAGE_NT_HEADERS; -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(4) - -/* End of ripped definitions */ - -typedef struct _export_t { - DWORD name; - WORD ordinal; -} export_t; - -unsigned char *buffer; -PIMAGE_DOS_HEADER dos_header; -PIMAGE_NT_HEADERS nt_header; - -static inline WORD dtohs(WORD in) -{ - PBYTE in_ptr = (PBYTE)∈ - return in_ptr[0] | (in_ptr[1] << 8); -} - -static inline WORD htods(WORD in) -{ - WORD out; - PBYTE out_ptr = (PBYTE)&out; - out_ptr[0] = in; out_ptr[1] = in >> 8; - return out; -} - -static inline DWORD dtohl(DWORD in) -{ - PBYTE in_ptr = (PBYTE)∈ - return in_ptr[0] | (in_ptr[1] << 8) | (in_ptr[2] << 16) | (in_ptr[3] << 24); -} - -static inline DWORD htodl(DWORD in) -{ - DWORD out; - PBYTE out_ptr = (PBYTE)&out; - out_ptr[0] = in ; out_ptr[1] = in >> 8; - out_ptr[2] = in >> 16; out_ptr[3] = in >> 24; - return out; -} - -void *rva_to_ptr(DWORD rva) -{ - PIMAGE_SECTION_HEADER section_header; - unsigned int i; - - for (i = 0, section_header = IMAGE_FIRST_SECTION(nt_header); - i < dtohl(nt_header->FileHeader.NumberOfSections); - i++, section_header++) - { - if (rva >= dtohl(section_header->VirtualAddress) && - rva < dtohl(section_header->VirtualAddress) + - dtohl(section_header->Misc.VirtualSize)) - { - return buffer + rva - dtohl(section_header->VirtualAddress) + - dtohl(section_header->PointerToRawData); - } - } - - return NULL; -} - -int export_compare_func(const void *a, const void *b) -{ - const export_t *ap = a; - const export_t *bp = b; - char *an = rva_to_ptr(ap->name); - char *bn = rva_to_ptr(bp->name); - return strcmp(an, bn); -} - -int main(int argc, char **argv) -{ - int fd_in, fd_out; - long len; - char hdrbuf[4] = { }, elfhdr[4] = { '\177', 'E', 'L', 'F' }; - PIMAGE_SECTION_HEADER section_header; - PIMAGE_DATA_DIRECTORY data_dir; - unsigned int i; - unsigned long checksum; - int fixup_exports = 0; - int fixup_sections = 0; - - /* - * Process parameters. - */ - - if (argc < 2) - { - printf("Usage: %s \n" - "Options:\n" - " -sections Sets section flags for PE image.\n" - " -exports Sort the names in export table.\n", - argv[0]); - return 1; - } - - for (i = 2; i < argc; i++) - { - if (!strcmp(argv[i], "-sections")) - fixup_sections = 1; - else if (!strcmp(argv[i], "-exports")) - fixup_exports = 1; - else - { fprintf(stderr, "Invalid option: %s\n", argv[i]); return 1; } - } - - /* - * Nothing to do. - */ - if (fixup_sections == 0 && fixup_exports == 0) - return 0; - - /* - * Read the whole file to memory. - */ - - fd_in = open(argv[1], O_RDONLY | O_BINARY); - if (fd_in == 0) - { - fprintf(stderr, "Can't open input file.\n"); - return 1; - } - - /* - * PowerPC ReactOS uses elf, so doesn't need pefixup - */ - len = read(fd_in, hdrbuf, sizeof(elfhdr)); - if (!memcmp(hdrbuf, elfhdr, sizeof(elfhdr))) - { - close(fd_in); - return 0; - } - - len = lseek(fd_in, 0, SEEK_END); - if (len < sizeof(IMAGE_DOS_HEADER)) - { - close(fd_in); - fprintf(stderr, "'%s' isn't a PE image (too short)\n", argv[1]); - return 1; - } - - /* Lower down we overwrite the byte at len, so here, we need at least - * one more byte than len. We'll be guaranteed one or two now. */ - buffer = malloc((len + 2) & ~1); - if (buffer == NULL) - { - close(fd_in); - fprintf(stderr, "Not enough memory available.\n"); - return 1; - } - - /* Read the whole input file into a buffer */ - lseek(fd_in, 0, SEEK_SET); - read(fd_in, buffer, len); - /* Here is where the block end overwrite was */ - if (len & 1) - buffer[len] = 0; - - close(fd_in); - - /* - * Check the headers and save pointers to them. - */ - - dos_header = (PIMAGE_DOS_HEADER)buffer; - nt_header = (PIMAGE_NT_HEADERS)(buffer + dtohl(dos_header->e_lfanew)); - - if (dtohs(dos_header->e_magic) != IMAGE_DOS_SIGNATURE || - dtohl(nt_header->Signature) != IMAGE_NT_SIGNATURE) - { - fprintf(stderr, "'%s' isn't a PE image (bad headers)\n", argv[1]); - free(buffer); - return 1; - } - - if (fixup_exports) - { - /* Sort export directory */ - data_dir = &nt_header->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT]; - if (dtohl(data_dir->Size) != 0) - { - PIMAGE_EXPORT_DIRECTORY export_directory; - DWORD *name_ptr; - WORD *ordinal_ptr; - export_t *exports; - - export_directory = (PIMAGE_EXPORT_DIRECTORY)rva_to_ptr(dtohl(data_dir->VirtualAddress)); - if (export_directory != NULL) - { - exports = malloc(sizeof(export_t) * dtohl(export_directory->NumberOfNames)); - if (exports == NULL) - { - fprintf(stderr, "Not enough memory.\n"); - free(buffer); - return 1; - } - - name_ptr = (DWORD *)rva_to_ptr(dtohl(export_directory->AddressOfNames)); - ordinal_ptr = (WORD *)rva_to_ptr(dtohl(export_directory->AddressOfNameOrdinals)); - - for (i = 0; i < dtohl(export_directory->NumberOfNames); i++) - { - exports[i].name = dtohl(name_ptr[i]); - exports[i].ordinal = dtohl(ordinal_ptr[i]); - } - - qsort(exports, dtohl(export_directory->NumberOfNames), sizeof(export_t), - export_compare_func); - - for (i = 0; i < dtohl(export_directory->NumberOfNames); i++) - { - name_ptr[i] = htodl(exports[i].name); - ordinal_ptr[i] = htodl(exports[i].ordinal); - } - - free(exports); - } - } - } - - if (fixup_sections) - { - /* Update section flags */ - for (i = 0, section_header = IMAGE_FIRST_SECTION(nt_header); - i < dtohl(nt_header->OptionalHeader.NumberOfRvaAndSizes); - i++, section_header++) - { - if (!strcmp((char*)section_header->Name, ".text") || - !strcmp((char*)section_header->Name, ".data") || - !strcmp((char*)section_header->Name, ".idata") || - !strcmp((char*)section_header->Name, ".rdata") || - !strcmp((char*)section_header->Name, ".bss")) - { - section_header->Characteristics |= htodl(IMAGE_SCN_MEM_NOT_PAGED); - section_header->Characteristics &= htodl(~IMAGE_SCN_MEM_DISCARDABLE); - } - else if (!strcmp((char*)section_header->Name, "INIT")) - { - section_header->Characteristics |= htodl(IMAGE_SCN_MEM_DISCARDABLE); - } - else if (!strcmp((char*)section_header->Name, "PAGE")) - { - section_header->Characteristics |= htodl(IMAGE_SCN_MEM_NOT_PAGED); - } - } - } - - /* Recalculate checksum */ - nt_header->OptionalHeader.CheckSum = 0; - checksum = 0; - for (i = 0; i < len; i += 2) - { - checksum += *(unsigned short *)(buffer + i); - checksum = (checksum + (checksum >> 16)) & 0xffff; - } - checksum += len; - nt_header->OptionalHeader.CheckSum = htods(checksum); - - /* Write the output file */ - fd_out = open(argv[1], O_WRONLY | O_BINARY); - write(fd_out, buffer, len); - close(fd_out); - - return 0; -} diff --git a/reactos/tools/pefixup.mak b/reactos/tools/pefixup.mak deleted file mode 100644 index aae563adb42..00000000000 --- a/reactos/tools/pefixup.mak +++ /dev/null @@ -1,36 +0,0 @@ -PEFIXUP_BASE = $(TOOLS_BASE) -PEFIXUP_BASE_ = $(PEFIXUP_BASE)$(SEP) - -PEFIXUP_INT = $(INTERMEDIATE_)$(PEFIXUP_BASE) -PEFIXUP_INT_ = $(PEFIXUP_INT)$(SEP) -PEFIXUP_OUT = $(OUTPUT_)$(PEFIXUP_BASE) -PEFIXUP_OUT_ = $(PEFIXUP_OUT)$(SEP) - -PEFIXUP_TARGET = \ - $(PEFIXUP_OUT_)pefixup$(EXEPOSTFIX) - -PEFIXUP_SOURCES = \ - $(PEFIXUP_BASE_)pefixup.c - -PEFIXUP_OBJECTS = \ - $(addprefix $(INTERMEDIATE_), $(PEFIXUP_SOURCES:.c=.o)) - -PEFIXUP_HOST_CFLAGS = $(TOOLS_CFLAGS) - -PEFIXUP_HOST_LFLAGS = $(TOOLS_LFLAGS) - -.PHONY: pefixup -pefixup: $(PEFIXUP_TARGET) - -$(PEFIXUP_TARGET): $(PEFIXUP_OBJECTS) | $(PEFIXUP_OUT) - $(ECHO_HOSTLD) - ${host_gcc} $(PEFIXUP_OBJECTS) $(PEFIXUP_HOST_LFLAGS) -o $@ - -$(PEFIXUP_INT_)pefixup.o: $(PEFIXUP_BASE_)pefixup.c | $(PEFIXUP_INT) - $(ECHO_HOSTCC) - ${host_gcc} $(PEFIXUP_HOST_CFLAGS) -c $< -o $@ - -.PHONY: pefixup_clean -pefixup_clean: - -@$(rm) $(PEFIXUP_TARGET) $(PEFIXUP_OBJECTS) 2>$(NUL) -clean: pefixup_clean diff --git a/reactos/tools/pipetools/piperead.cpp b/reactos/tools/pipetools/piperead.cpp deleted file mode 100644 index 3ab4c4ccb73..00000000000 --- a/reactos/tools/pipetools/piperead.cpp +++ /dev/null @@ -1,236 +0,0 @@ -// -// piperead.cpp -// -// Martin Fuchs, 30.11.2003 -// -// Jan Roeloffzen, 26.1.2010 -// Pipe client, based on msdn example - - -#define WIN32_LEAN_AND_MEAN -#include -#include -#include - -#define PIPEREAD_VERSION "0.3" -#define PIPEREAD_NOPIPE (-101) - - // This definition currently missing in MinGW. -#ifndef FILE_FLAG_FIRST_PIPE_INSTANCE -#define FILE_FLAG_FIRST_PIPE_INSTANCE 0x00080000 -#endif - - -#define BUFSIZE 1024 - -static void print_error(DWORD win32_error) -{ - fprintf(stderr, "WIN32 error %lu\n", win32_error); -} - -static int pipeServer(char *path) -{ - HANDLE hPipe = CreateNamedPipe(path, PIPE_ACCESS_DUPLEX|FILE_FLAG_FIRST_PIPE_INSTANCE, PIPE_WAIT|PIPE_TYPE_BYTE, 1, 4096, 4096, 30000, NULL); - - if (hPipe == INVALID_HANDLE_VALUE) { - print_error(GetLastError()); - return 1; - } - - for(;;) { - DWORD read; - BYTE buffer[BUFSIZE]; - - if (!ReadFile(hPipe, buffer, sizeof(buffer), &read, NULL)) { - DWORD error = GetLastError(); - - if (error == ERROR_PIPE_LISTENING) { - Sleep(1000); - } else if (error == ERROR_BROKEN_PIPE) { - CloseHandle(hPipe); - - hPipe = CreateNamedPipe(path, PIPE_ACCESS_DUPLEX|FILE_FLAG_FIRST_PIPE_INSTANCE, PIPE_WAIT|PIPE_TYPE_BYTE, 1, 4096, 4096, 30000, NULL); - - if (hPipe == INVALID_HANDLE_VALUE) { - fprintf(stderr,"INVALID_HANDLE_VALUE\n"); - print_error(GetLastError()); - return 1; - } - } else { - fprintf(stderr,"error %lu\n",error); - print_error(error); - break; - } - } - - if (read) - fwrite(buffer, read, 1, stdout); - } - - if (!CloseHandle(hPipe)) - print_error(GetLastError()); - - return 0; -} - - -static int pipeClient(char *path) -{ - HANDLE hPipe=INVALID_HANDLE_VALUE; - TCHAR chBuf[BUFSIZE]; - BOOL fSuccess = FALSE; - DWORD cbRead; - DWORD Err; - int res = 0; - - setvbuf(stdout, NULL, _IONBF, 0); - while (1) { - hPipe = CreateFile( - path, // pipe name - GENERIC_READ, - 0, // no sharing - NULL, // default security attributes - OPEN_EXISTING, // opens existing pipe - 0, // default attributes - NULL); // no template file - - // Break if the pipe handle is valid. - if (hPipe != INVALID_HANDLE_VALUE) - break; - - // Exit if an error other than ERROR_PIPE_BUSY occurs. - Err = GetLastError(); - if (Err != ERROR_PIPE_BUSY) { - if (ERROR_FILE_NOT_FOUND == Err) - { - res = PIPEREAD_NOPIPE; - return res; - } - else - { - fprintf(stderr,"Could not open pipe %s. Error=%lu\n", path, Err ); - res = -1; - } - break; - } - - // All pipe instances are busy, so wait for 20 seconds. - if ( ! WaitNamedPipe(path, 20000)) { - fprintf(stderr,"Could not open pipe: 20 second wait timed out."); - res = -2; - break; - } - } - - if (!res) do { - fSuccess = ReadFile( - hPipe, // pipe handle - chBuf, // buffer to receive reply - BUFSIZE, // size of buffer - &cbRead, // number of bytes read - NULL); // not overlapped - - if ( ! fSuccess ) { - Err = GetLastError(); - if ( Err == ERROR_MORE_DATA ) { - fSuccess = TRUE; - } else { - fprintf(stderr, "ReadFile: Error %lu \n", Err ); - res = -9; - break; - } - } - - fwrite(chBuf,1,cbRead,stdout); - } while ( fSuccess); - - if ( ! fSuccess) { - fprintf(stderr, "ReadFile from pipe failed. Error=%lu\n", GetLastError() ); - } - - if (hPipe != INVALID_HANDLE_VALUE) - CloseHandle(hPipe); - - return res; - -} - -static int fileClient(const char *path) -{ - int res = 0; - FILE *fin; - int c; - - setvbuf(stdout, NULL, _IONBF, 0); - if (!(fin = fopen(path, "r"))) { - fprintf(stderr,"Could not fopen %s (%s)\n", path, strerror(errno) ); - return -1; - } - - while ((c = fgetc(fin)) != EOF) { - fputc(c, stdout); - } - - fclose(fin); - return res; -} - -void usage(void) -{ - fprintf(stderr, "piperead " PIPEREAD_VERSION "\n\n"); - fprintf(stderr, "Usage: piperead [-c] \n"); - fprintf(stderr, "-c means Client mode\n"); - fprintf(stderr, "Example: piperead -c \\\\.\\pipe\\kdbg | log2lines -c\n\n"); -} - -int main(int argc, char** argv) -{ - char path[MAX_PATH]; - const char* pipe_name; - const char* clientMode; - int res = 0; - - pipe_name = "com_1"; - clientMode = NULL; - switch (argc) { - case 3: - clientMode = *++argv; - if (strcmp(clientMode,"-c") != 0) { - clientMode = NULL; - fprintf(stderr,"Invalid option: %s\n", clientMode); - res = -6; - } - //fall through - case 2: - pipe_name = *++argv; - if (strcmp(pipe_name,"-h") == 0) { - res = -7; - } - break; - default: - res = -8; - break; - } - if (res) { - usage(); - return res; - } - - if ( pipe_name[0] == '\\' ) { - //assume caller specified full path - sprintf(path, "%s", pipe_name); - } else { - sprintf(path, "\\\\.\\pipe\\%s", pipe_name); - } - - if ( clientMode ) { - res = pipeClient(path); - if (res == PIPEREAD_NOPIPE) { - res = fileClient(pipe_name); - } - } else { - res = pipeServer(path); - } - - return res; -} diff --git a/reactos/tools/pipetools/pipespy.cpp b/reactos/tools/pipetools/pipespy.cpp deleted file mode 100644 index 653c7f1def4..00000000000 --- a/reactos/tools/pipetools/pipespy.cpp +++ /dev/null @@ -1,251 +0,0 @@ -/* - * PipeSpy - * Copyright (c) 2004, Skywing (skywing@valhallalegends.com) - * Released under the GNU GPL for the ReactOS project - * - * This program can be used to spy on a named pipe in Windows NT(+) - * or ReactOS. It is particularly intended to be used for - * understanding the remote kernel debugging protocol used - * by windows kd. - * - * USE: - * - * PipeSpy \\.\pipe\debug_server \\.\pipe\debug_client > PipeSpy.log - * - * VMware: act as client, connect to \\.\pipe\debug_server, pipe is connected - * to application - * - * WinDbg -k com:pipe,port=\\.\pipe\debug_client,resets=0 - * - * NOTE: - * - * This program hasn't really been tested against ReactOS, and has only - * been built with Visual Studio .NET 2003. - */ -#include -#include -#include - -HANDLE g_DebugServerPipe, g_DebugClientPipe; -CRITICAL_SECTION g_OutputLock; - -void dumphex(const char *buf, int len, int pos) -{ - int i, j; - for(j = 0; j < len; j += 16) { - for(i = 0; i < 16; i++) { - if(i + j < len) - printf("%02x%c", (unsigned char)buf[i + j], j + i + 1 == pos ? '*' : ' '); - else - printf(" "); - } - for(i = 0; i < 16; i++) { - if(i + j < len) - printf("%c", buf[i + j] >= ' ' ? buf[i + j] : '.'); - else - printf(" "); - } - printf("\n"); - } -} - -enum { - PIPEBUF_INITIAL_SIZE = 4096, - PIPEBUF_MAX_SIZE = 16384 -}; - -typedef struct _READ_OVERLAPPED { - OVERLAPPED ReadOverlapped; - char* Buffer; - HANDLE Pipe, OtherPipe; - bool Server; - bool Connected; -} READ_OVERLAPPED; - -VOID WINAPI WritePipeCompletion(DWORD dwErrorCode, DWORD dwNumberOfBytesTransferred, LPOVERLAPPED lpOverlapped) -{ - if(dwErrorCode) { - EnterCriticalSection(&g_OutputLock); - printf(lpOverlapped->hEvent ? "Server> Error %u writing to client pipe\n" : "Client> Error %u writing to server pipe\n", dwErrorCode); - LeaveCriticalSection(&g_OutputLock); - } - - free((void*)lpOverlapped); -} - -VOID WINAPI ReadPipeCompletion(DWORD dwErrorCode, DWORD dwNumberOfBytesTransferred, LPOVERLAPPED lpOverlapped) -{ - READ_OVERLAPPED* ReadOverlapped = (READ_OVERLAPPED*)lpOverlapped; - LPOVERLAPPED WriteOverlapped; - - EnterCriticalSection(&g_OutputLock); - - if(dwErrorCode) { - printf(ReadOverlapped->Server ? "Server> Error %u reading from pipe\n" : "Client> Error %u reading from pipe\n", dwErrorCode); - ReadOverlapped->Connected = false; - } else { - SYSTEMTIME SystemTime; - - GetLocalTime(&SystemTime); - printf(ReadOverlapped->Server ? "Server> [%02u:%02u:%02u.%03u] Received %u byte message:\n" : "Client> [%02u:%02u:%02u.%03u] Received %u byte message:\n", - SystemTime.wHour, SystemTime.wMinute, SystemTime.wSecond, SystemTime.wMilliseconds, dwNumberOfBytesTransferred); - dumphex(ReadOverlapped->Buffer, (int)dwNumberOfBytesTransferred, -1); - printf("\n"); - } - - LeaveCriticalSection(&g_OutputLock); - - WriteOverlapped = (LPOVERLAPPED)malloc(sizeof(OVERLAPPED)+dwNumberOfBytesTransferred); - - if(!WriteOverlapped) - printf(ReadOverlapped->Server ? "Server> Out of memory\n" : "Client> Out of memory\n"); - else { - ZeroMemory(WriteOverlapped, sizeof(OVERLAPPED)); - WriteOverlapped->hEvent = (HANDLE)ReadOverlapped->Server; - memcpy(((char*)WriteOverlapped)+sizeof(OVERLAPPED), ReadOverlapped->Buffer, dwNumberOfBytesTransferred); - WriteFileEx(ReadOverlapped->OtherPipe, ((char*)WriteOverlapped)+sizeof(OVERLAPPED), dwNumberOfBytesTransferred, WriteOverlapped, - WritePipeCompletion); - } - - if(!dwErrorCode) { - ZeroMemory(ReadOverlapped, sizeof(OVERLAPPED)); - ReadFileEx(ReadOverlapped->Pipe, ReadOverlapped->Buffer, PIPEBUF_INITIAL_SIZE, &ReadOverlapped->ReadOverlapped, ReadPipeCompletion); - } -} - -void __cdecl pipeserver(void* param) -{ - READ_OVERLAPPED ReadOverlapped; - - ReadOverlapped.Pipe = (HANDLE)param, ReadOverlapped.OtherPipe = ReadOverlapped.Pipe == g_DebugServerPipe ? g_DebugClientPipe : g_DebugServerPipe; - ReadOverlapped.Server = ReadOverlapped.Pipe == g_DebugServerPipe; - ReadOverlapped.Buffer = (char*)malloc(PIPEBUF_INITIAL_SIZE); - - for(;;) { - if(!ConnectNamedPipe(ReadOverlapped.Pipe, 0) && GetLastError() != ERROR_PIPE_CONNECTED) { - printf(ReadOverlapped.Server ? "Server> Error %u accepting pipe connection\n" : "Client> Error %u accepting pipe connection\n", - GetLastError()); - break; - } - - ReadOverlapped.Connected = true; - printf(ReadOverlapped.Server ? "Server> Connected\n" : "Client> Connected\n"); - - ZeroMemory(&ReadOverlapped.ReadOverlapped, sizeof(OVERLAPPED)); - ReadFileEx(ReadOverlapped.Pipe, ReadOverlapped.Buffer, PIPEBUF_INITIAL_SIZE, &ReadOverlapped.ReadOverlapped, ReadPipeCompletion); - - do { - SleepEx(INFINITE, TRUE); - } while(ReadOverlapped.Connected) ; - - DisconnectNamedPipe(ReadOverlapped.Pipe); - printf(ReadOverlapped.Server ? "Server> Disconnected\n" : "Client> Disconnected\n"); - } - - printf(ReadOverlapped.Server ? "Server> Shutting down\n" : "Client> Shutting down\n"); - - free(ReadOverlapped.Buffer); - CloseHandle(ReadOverlapped.Pipe); - SleepEx(0, TRUE); -} - -int main(int ac, char **av) -{ - if(ac != 3) { - printf("syntax: pipespy serverpipe clientpipe\n"); - return 0; - } - - g_DebugServerPipe = CreateNamedPipe(av[1], PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT, - 1, 4096, 4096, NMPWAIT_WAIT_FOREVER, 0); - - if(g_DebugServerPipe == INVALID_HANDLE_VALUE) { - printf("Error %u creating server pipe\n", GetLastError()); - return 0; - } - - g_DebugClientPipe = CreateNamedPipe(av[2], PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT, - 1, 4096, 4096, NMPWAIT_WAIT_FOREVER, 0); - - if(g_DebugClientPipe == INVALID_HANDLE_VALUE) { - printf("Error %u creating client pipe\n", GetLastError()); - CloseHandle(g_DebugServerPipe); - return 0; - } - - InitializeCriticalSection(&g_OutputLock); - _beginthread(pipeserver, 0, (void*)g_DebugServerPipe); - pipeserver((void*)g_DebugClientPipe); - DeleteCriticalSection(&g_OutputLock); - return 0; -} - - -/* - while(!Error) { - SleepEx(0, TRUE); - BufferPos = 0; - - if(BufferSize > PIPEBUF_MAX_SIZE) { - char* NewBuf = (char*)realloc(Buffer, PIPEBUF_MAX_SIZE); - - if(NewBuf) { - Buffer = NewBuf; - BufferSize = PIPEBUF_MAX_SIZE; - } - } - - for(;;) { - char* NewBuf; - - if(ReadFile(Pipe, Buffer+BufferPos, BufferSize-BufferPos, &Read, 0)) { - BufferPos += Read; - Error = 0; - break; - } - - Error = GetLastError(); - - printf("Error=%u read=%u\n", Error, Read); - - if(Error != ERROR_MORE_DATA) { - printf(Server ? "Server> Error %u reading from pipe\n" : "Client> Error %u reading from pipe\n", GetLastError()); - break; - } - - NewBuf = (char*)realloc(Buffer, BufferSize << 1); - - if(!NewBuf) { - printf(Server ? "Server> Out of memory\n" : "Client> Out of memory\n"); - break; - } - - BufferSize <<= 1; - BufferPos += Read; - Error = 0; - } - - if(Error) - break; - - WriteOverlapped = (LPOVERLAPPED)malloc(sizeof(OVERLAPPED)+BufferPos); - - if(!WriteOverlapped) - printf(Server ? "Server> Out of memory\n" : "Client> Out of memory\n"); - else { - ZeroMemory(WriteOverlapped, sizeof(OVERLAPPED)); - memcpy(((char*)WriteOverlapped)+sizeof(OVERLAPPED), Buffer, BufferPos); - WriteFileEx(OtherPipe, ((char*)WriteOverlapped)+sizeof(OVERLAPPED), BufferPos, WriteOverlapped, WritePipeCompletion); - } - - EnterCriticalSection(&g_OutputLock); - printf(Server ? "Server> Received %u byte message:\n" : "Client> Received %u byte message:\n", BufferPos); - dumphex(Buffer, (int)BufferPos, -1); - printf("\n"); - LeaveCriticalSection(&g_OutputLock); - } - - DisconnectNamedPipe(Pipe); - printf(Server ? "Server> Disconnected\n" : "Client> Disconnected\n"); - - */ diff --git a/reactos/tools/pipetools/pipetools.mak b/reactos/tools/pipetools/pipetools.mak deleted file mode 100644 index 22eca3d6cbf..00000000000 --- a/reactos/tools/pipetools/pipetools.mak +++ /dev/null @@ -1,47 +0,0 @@ -PIPETOOLS_BASE = $(TOOLS_BASE)$(SEP)pipetools -PIPETOOLS_BASE_ = $(PIPETOOLS_BASE)$(SEP) -PIPETOOLS_INT = $(INTERMEDIATE_)$(PIPETOOLS_BASE) -PIPETOOLS_INT_ = $(PIPETOOLS_INT)$(SEP) -PIPETOOLS_OUT = $(OUTPUT_)$(PIPETOOLS_BASE) -PIPETOOLS_OUT_ = $(PIPETOOLS_OUT)$(SEP) - -$(PIPETOOLS_INT): | $(TOOLS_INT) - $(ECHO_MKDIR) - ${mkdir} $@ - -ifneq ($(INTERMEDIATE),$(OUTPUT)) -$(PIPETOOLS_OUT): | $(TOOLS_OUT) - $(ECHO_MKDIR) - ${mkdir} $@ -endif - - -PIPETOOLS_TARGET = \ - $(PIPETOOLS_OUT_)piperead$(EXEPOSTFIX) - -PIPETOOLS_SOURCES = \ - $(PIPETOOLS_BASE_)piperead.cpp - -PIPETOOLS_OBJECTS = \ - $(addprefix $(INTERMEDIATE_), $(PIPETOOLS_SOURCES:.cpp=.o)) - -PIPETOOLS_HOST_CFLAGS = $(TOOLS_CFLAGS) - -PIPETOOLS_HOST_LFLAGS = $(TOOLS_LFLAGS) - -.PHONY: pipetools -pipetools: $(PIPETOOLS_TARGET) - -$(PIPETOOLS_TARGET): $(PIPETOOLS_OBJECTS) | $(PIPETOOLS_OUT) - $(ECHO_HOSTLD) - ${host_gcc} $(PIPETOOLS_OBJECTS) $(PIPETOOLS_HOST_LFLAGS) -o $@ - -$(PIPETOOLS_INT_)piperead.o: $(PIPETOOLS_BASE_)piperead.cpp | $(PIPETOOLS_INT) - $(ECHO_HOSTCC) - ${host_gcc} $(PIPETOOLS_HOST_CFLAGS) -c $< -o $@ - - -.PHONY: pipetools_clean -pipetools_clean: - -@$(rm) $(PIPETOOLS_TARGET) $(PIPETOOLS_OBJECTS) 2>$(NUL) -clean: pipetools_clean diff --git a/reactos/tools/pipetools/pipetunnel.cpp b/reactos/tools/pipetools/pipetunnel.cpp deleted file mode 100644 index 23643ff5776..00000000000 --- a/reactos/tools/pipetools/pipetunnel.cpp +++ /dev/null @@ -1,317 +0,0 @@ -// -// pipetunnel.cpp -// -// Martin Fuchs, 30.11.2003 -// - -// -// Invoke as: "pipetunnel [pipe_name]", -// for example: "pipetunnel com_2" -// -// Then start up RectOS in VMWare, wait for the serial connect. -// After that you can connect GDB using the command "target remote :9999". -// - - -#define WIN32_LEAN_AND_MEAN -#include - -#include - -#ifdef _MSC_VER -#pragma comment(lib, "wsock32") -#endif - -#include -#include - - - // This definition currently missing in MinGW. -#ifndef FILE_FLAG_FIRST_PIPE_INSTANCE -#define FILE_FLAG_FIRST_PIPE_INSTANCE 0x00080000 -#endif - - -static void print_error(DWORD win32_error) -{ - fprintf(stderr, "WIN32 error %lu\n", win32_error); -} - - -#ifdef _DEBUG - - // critical section wrapper -struct CritSect : public CRITICAL_SECTION -{ - CritSect() - { - InitializeCriticalSection(this); - } - - ~CritSect() - { - DeleteCriticalSection(this); - } -}; - -static void dbg_trace(char mode, const char* buffer, int l) -{ - static char s_mode = '\0'; - static CritSect crit_sect; - - EnterCriticalSection(&crit_sect); - - if (l) { - for(const char*p=buffer; l--; ++p) { - if (mode != s_mode) { - putchar('\n'); - putchar(mode); - putchar(' '); - - s_mode = mode; - } - - if (*p=='\n' || !*p /*|| *p=='#'*/) { - /*if (*p == '#') - putchar(*p);*/ - - s_mode = '\0'; - } else - putchar(*p); - } - } - - LeaveCriticalSection(&crit_sect); -} - -#endif - - -static SOCKET s_srv_socket = (SOCKET)-1; - -SOCKET open_tcp_connect() -{ - if (s_srv_socket == (SOCKET)-1) { - SOCKADDR_IN srv_addr = {0}; - - srv_addr.sin_family = AF_INET; - srv_addr.sin_addr.s_addr = htonl(INADDR_ANY); - srv_addr.sin_port = htons(9999); - - s_srv_socket = socket(PF_INET, SOCK_STREAM, 0); - if (s_srv_socket == (SOCKET)-1) { - perror("socket()"); - return 0; - } - - if (bind(s_srv_socket, (struct sockaddr*) &srv_addr, sizeof(srv_addr)) == -1) { - perror("bind()"); - return 0; - } - - if (listen(s_srv_socket, 4) == -1) { - perror("listen()"); - return 0; - } - } - - SOCKADDR_IN rem_addr; - int rem_len = sizeof(rem_addr); - - for(;;) { - SOCKET sock = accept(s_srv_socket, (struct sockaddr*)&rem_addr, &rem_len); - - if (sock < 0) { - if (errno == EINTR) - continue; - - perror("accept()"); - return 0; - } - - return sock; - } -} - - - -struct WriterThread -{ - WriterThread(SOCKET sock, HANDLE hPipe) - : _sock(sock), - _hPipe(hPipe) - { - DWORD tid; - - HANDLE hThread = CreateThread(NULL, 0, WriterThreadRoutine, this, 0, &tid); - - if (hThread) { - SetThreadPriority(hThread, THREAD_PRIORITY_HIGHEST); - - CloseHandle(hThread); - } else - delete this; - } - -protected: - SOCKET _sock; - HANDLE _hPipe; - - static DWORD WINAPI WriterThreadRoutine(LPVOID param) - { - WriterThread* pThis = (WriterThread*) param; - - DWORD ret = pThis->Run(); - - delete pThis; - - return ret; - } - - DWORD Run() - { - char buffer[1024]; - - for(;;) { - int r = recv(_sock, buffer, sizeof(buffer), 0); - - if (r == -1) { - perror("recv()"); - fprintf(stderr, "debugger connection broken\n"); - _sock = (SOCKET)-1; - return 1; - } - - if (r) { - DWORD wrote; - - if (!WriteFile(_hPipe, buffer, r, &wrote, NULL)) - break; - -#ifdef _DEBUG - dbg_trace('<', buffer, r); -#endif - } - } - - return 0; - } -}; - - -LONG read_pipe(HANDLE hPipe, SOCKET sock) -{ - for(;;) { - DWORD read; - char buffer[1024]; - - // wait for input data - WaitForSingleObject(hPipe, INFINITE); - - if (!ReadFile(hPipe, buffer, sizeof(buffer), &read, NULL)) { - DWORD error = GetLastError(); - - if (error == ERROR_PIPE_LISTENING) - Sleep(1000); - else - return error; - } - - if (read) { -#ifdef _DEBUG - dbg_trace('>', buffer, read); -#endif - - if (!send(sock, buffer, read, 0)) { - perror("send()"); - return GetLastError(); - } - } - } -} - - -int main(int argc, char** argv) -{ - char path[MAX_PATH]; - const char* pipe_name; - - if (argc > 1) - pipe_name = *++argv; - else - pipe_name = "com_2"; - - sprintf(path, "\\\\.\\pipe\\%s", pipe_name); - - - // initialize winsock - WSADATA wsa_data; - - if (WSAStartup(MAKEWORD(2,2), &wsa_data)) { - fprintf(stderr, "WSAStartup() failed\n"); - return 0; - } - - - // increment priority to be faster than the cpu eating VMWare process - SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS); - SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_HIGHEST); - - - HANDLE hPipe = INVALID_HANDLE_VALUE; - - for(;;) { - DWORD read; - - if (hPipe == INVALID_HANDLE_VALUE) { - hPipe = CreateNamedPipe(path, PIPE_ACCESS_DUPLEX|FILE_FLAG_FIRST_PIPE_INSTANCE|FILE_FLAG_OVERLAPPED, PIPE_WAIT|PIPE_TYPE_BYTE, 1, 4096, 4096, 30000, NULL); - - if (hPipe == INVALID_HANDLE_VALUE) { - print_error(GetLastError()); - return 1; - } - } - - // wait for the client side of the pipe - while(!ReadFile(hPipe, NULL, 0, &read, NULL) && - GetLastError()==ERROR_PIPE_LISTENING) - Sleep(1000); - - puts("\nnamed pipe connected, now waiting for TCP connection..."); - - SOCKET sock = open_tcp_connect(); - if (sock == (SOCKET)-1) - break; - - puts("TCP connection established."); - - // launch writer thread - new WriterThread(sock, hPipe); - - // launch reader loop - LONG error = read_pipe(hPipe, sock); - - - // close TCP connectiom - closesocket(sock); - sock = (SOCKET)-1; - - // close named pipe - CloseHandle(hPipe); - hPipe = INVALID_HANDLE_VALUE; - - - if (error == ERROR_BROKEN_PIPE) - puts("\nconnection closed."); // normal connection termination - else { - print_error(GetLastError()); - break; - } - } - - if (hPipe != INVALID_HANDLE_VALUE) - if (!CloseHandle(hPipe)) - print_error(GetLastError()); - - return 0; -} diff --git a/reactos/tools/rbuild/automaticdependency.cpp b/reactos/tools/rbuild/automaticdependency.cpp deleted file mode 100644 index 65b5f0165f5..00000000000 --- a/reactos/tools/rbuild/automaticdependency.cpp +++ /dev/null @@ -1,560 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * Copyright (C) 2007 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. - */ -#include "pch.h" -#include -#include - -#include "rbuild.h" - -/* Read at most this amount of bytes from each file and assume that all #includes are located within this block */ -#define MAX_BYTES_TO_READ 4096 - -using std::string; -using std::vector; -using std::map; - -SourceFile::SourceFile ( AutomaticDependency* automaticDependency, - const Module& module, - const File& file, - SourceFile* parent ) - : file ( file ), - automaticDependency ( automaticDependency), - module ( module ), - youngestLastWriteTime ( 0 ) -{ - if (parent != NULL ) - parents.push_back ( parent ); -} - -void -SourceFile::Close () -{ - buf.resize ( 0 ); - p = end = NULL; -} - -void -SourceFile::Open () -{ - struct stat statbuf; - string filename = file.GetFullPath (); - - Close (); - FILE* f = fopen ( filename.c_str (), "rb" ); - if ( !f ) - throw FileNotFoundException ( filename ); - - if ( fstat ( fileno ( f ), &statbuf ) != 0 ) - { - fclose ( f ); - throw AccessDeniedException ( filename ); - } - lastWriteTime = statbuf.st_mtime; - - unsigned long len = (unsigned long) filelen ( f ); - if ( len > MAX_BYTES_TO_READ ) - len = MAX_BYTES_TO_READ; - buf.resize ( len ); - fread ( &buf[0], 1, len, f ); - fclose ( f ); - p = buf.c_str (); - end = p + len; -} - -void -SourceFile::SkipWhitespace () -{ - while ( p < end && isspace ( *p )) - p++; -} - -bool -SourceFile::ReadInclude ( string& filename, - bool& searchCurrentDirectory, - bool& includeNext) -{ - while ( p < end ) - { - if ( p != buf.c_str () ) - { - /* Go to end of line */ - while ( *p != '\n' && p < end ) - p++; - SkipWhitespace (); - } - if ( ( end - p > 13 ) && ( *p == '#') ) - { - bool include = false; - p++; - SkipWhitespace (); - if ( *p == 'i' ) - { - if ( strncmp ( p, "include ", 8 ) == 0 ) - { - p += 8; - includeNext = false; - include = true; - } - if ( strncmp ( p, "include_next ", 13 ) == 0 ) - { - p += 13; - includeNext = true; - include = true; - } - - if ( include ) - { - SkipWhitespace (); - if ( p < end ) - { - register char ch = *p; - if ( ch == '<' || ch == '"' ) - { - searchCurrentDirectory = (ch == '"'); - p++; - filename.resize ( MAX_PATH ); - int i = 0; - ch = *p; - while ( p < end && ch != '>' && ch != '"' && ch != '\n' ) - { - filename[i++] = *p; - p++; - if ( p < end ) - ch = *p; - } - filename.resize ( i ); - return true; - } - } - } - } - } - p++; - } - filename = ""; - searchCurrentDirectory = false; - includeNext = false; - return false; -} - -bool -SourceFile::IsParentOf ( const SourceFile* parent, - const SourceFile* child ) -{ - size_t i; - for ( i = 0; i < child->parents.size (); i++ ) - { - if ( child->parents[i] != NULL ) - { - if ( child->parents[i] == parent ) - return true; - } - } - for ( i = 0; i < child->parents.size (); i++ ) - { - if ( child->parents[i] != NULL ) - { - if ( IsParentOf ( parent, - child->parents[i] ) ) - return true; - } - } - return false; -} - -bool -SourceFile::IsIncludedFrom ( const File& file ) -{ - SourceFile* sourceFile = automaticDependency->RetrieveFromCache ( file ); - if ( sourceFile == NULL ) - return false; - - if ( sourceFile == this ) - return true; - - return IsParentOf ( sourceFile, - this ); -} - -bool -SourceFile::CanProcessFile ( const File& file ) -{ - string extension = GetExtension ( file.file ); - std::transform ( extension.begin (), extension.end (), extension.begin (), tolower ); - if ( extension == ".h" ) - return true; - if ( extension == ".c" ) - return true; - if ( extension == ".cpp" ) - return true; - if ( extension == ".rc" ) - return true; - if ( extension == ".s" ) - return true; - if ( extension == ".nls" ) - return true; - if ( extension == ".idl" ) - return true; - if ( automaticDependency->project.configuration.Verbose ) - printf ( "Skipping file %s, as its extension is not recognized\n", file.file.name.c_str () ); - return false; -} - -SourceFile* -SourceFile::ParseFile ( const File& file ) -{ - if ( !CanProcessFile ( file ) ) - return NULL; - - if ( IsIncludedFrom ( file ) ) - return NULL; - - SourceFile* sourceFile = automaticDependency->RetrieveFromCacheOrParse ( module, - file, - this ); - return sourceFile; -} - -void -SourceFile::Parse () -{ - Open (); - while ( p < end ) - { - string includedFilename; - - bool searchCurrentDirectory; - bool includeNext; - while ( ReadInclude ( includedFilename, - searchCurrentDirectory, - includeNext ) ) - { - File resolvedFile ( SourceDirectory, "", "", false, "", false ) ; - bool locatedFile = automaticDependency->LocateIncludedFile ( this, - module, - includedFilename, - searchCurrentDirectory, - includeNext, - resolvedFile ); - if ( locatedFile ) - { - SourceFile* sourceFile = ParseFile ( *new File ( resolvedFile ) ); - if ( sourceFile != NULL ) - files.push_back ( sourceFile ); - } else if ( automaticDependency->project.configuration.Verbose ) - printf ( "Unable to find %c%s%c, included in %s%c%s\n", - searchCurrentDirectory ? '\"' : '<', - includedFilename.c_str (), - searchCurrentDirectory ? '\"' : '>', - this->file.file.relative_path.c_str (), - cSep, - this->file.file.name.c_str () ); - } - p++; - } - Close (); -} - -AutomaticDependency::AutomaticDependency ( const Project& project ) - : project ( project ) -{ -} - -AutomaticDependency::~AutomaticDependency () -{ - std::map::iterator theIterator; - for ( theIterator = sourcefile_map.begin (); theIterator != sourcefile_map.end (); theIterator++ ) - delete theIterator->second; -} - -void -AutomaticDependency::ParseFiles () -{ - for( std::map::const_iterator p = project.modules.begin(); p != project.modules.end(); ++ p ) - ParseFiles ( *p->second ); -} - -void -AutomaticDependency::GetModuleFiles ( const Module& module, - vector& files ) const -{ - for ( size_t i = 0; i < module.non_if_data.files.size (); i++ ) - files.push_back ( module.non_if_data.files[i] ); - - /* FIXME: Collect files in IFs here */ - - if ( module.pch != NULL ) - { - const FileLocation& pch = *module.pch->file; - File *file = new File ( pch.directory, pch.relative_path, pch.name , false, "", true ); - files.push_back ( file ); - } -} - -void -AutomaticDependency::ParseFiles ( const Module& module ) -{ - vector files; - GetModuleFiles ( module, files ); - for ( size_t i = 0; i < files.size (); i++ ) - ParseFile ( module, *files[i] ); -} - -void -AutomaticDependency::ParseFile ( const Module& module, - const File& file ) -{ - RetrieveFromCacheOrParse ( module, - file, - NULL ); -} - -bool -AutomaticDependency::LocateIncludedFile ( const FileLocation& directory, - const string& includedFilename ) -{ - string path; - switch ( directory.directory ) - { - case SourceDirectory: - path = ""; - break; - case IntermediateDirectory: - path = Environment::GetIntermediatePath (); - break; - case OutputDirectory: - path = Environment::GetOutputPath (); - break; - default: - throw InvalidOperationException ( __FILE__, - __LINE__, - "Invalid directory %d.", - directory.directory ); - } - if ( directory.relative_path.length () > 0 ) - { - if ( path.length () > 0 ) - path += sSep; - path += directory.relative_path; - } - - string normalizedFilename = NormalizeFilename ( path + sSep + includedFilename ); - FILE* f = fopen ( normalizedFilename.c_str (), "rb" ); - if ( f != NULL ) - { - fclose ( f ); - return true; - } - return false; -} - -void -AutomaticDependency::GetIncludeDirectories ( vector& includes, - const Module& module ) -{ - size_t i; - for ( i = 0; i < module.non_if_data.includes.size (); i++ ) - includes.push_back( module.non_if_data.includes[i] ); - for ( i = 0; i < module.project.non_if_data.includes.size (); i++ ) - includes.push_back( module.project.non_if_data.includes[i] ); -} - -bool -AutomaticDependency::LocateIncludedFile ( SourceFile* sourceFile, - const Module& module, - const string& includedFilename, - bool searchCurrentDirectory, - bool includeNext, - File& resolvedFile ) -{ - vector includes; - string includedFileDir; - Include currentDirectory ( module.project, SourceDirectory, sourceFile->file.file.relative_path ); - if ( searchCurrentDirectory ) - includes.push_back ( ¤tDirectory ); - GetIncludeDirectories ( includes, module ); - - for ( size_t j = 0; j < includes.size (); j++ ) - { - Include& include = *includes[j]; - if ( LocateIncludedFile ( *include.directory, - includedFilename ) ) - { - if ( includeNext && - include.directory->directory == sourceFile->file.file.directory && - include.directory->relative_path == sourceFile->file.file.relative_path ) - { - includeNext = false; - continue; - } - resolvedFile.file.directory = include.directory->directory; - size_t index = includedFilename.find_last_of ( "/\\" ); - if ( index == string::npos ) - { - resolvedFile.file.name = includedFilename; - resolvedFile.file.relative_path = include.directory->relative_path; - } - else - { - resolvedFile.file.relative_path = NormalizeFilename ( - include.directory->relative_path + sSep + - includedFilename.substr ( 0, index ) ); - resolvedFile.file.name = includedFilename.substr ( index + 1 ); - } - return true; - } - } - return false; -} - -SourceFile* -AutomaticDependency::RetrieveFromCacheOrParse ( const Module& module, - const File& file, - SourceFile* parentSourceFile ) -{ - string filename = file.GetFullPath(); - SourceFile* sourceFile = sourcefile_map[filename]; - if ( sourceFile == NULL ) - { - sourceFile = new SourceFile ( this, - module, - file, - parentSourceFile ); - sourcefile_map[filename] = sourceFile; - sourceFile->Parse (); - } - else if ( parentSourceFile != NULL ) - sourceFile->parents.push_back ( parentSourceFile ); - return sourceFile; -} - -SourceFile* -AutomaticDependency::RetrieveFromCache ( const File& file ) -{ - string filename = file.GetFullPath(); - return sourcefile_map[filename]; -} - -void -AutomaticDependency::CheckAutomaticDependencies ( bool verbose ) -{ - ParseFiles (); - for( std::map::const_iterator p = project.modules.begin(); p != project.modules.end(); ++ p ) - { - Module& module = *p->second; - CheckAutomaticDependencies ( module, verbose ); - } -} - -void -AutomaticDependency::GetModulesToCheck ( Module& module, vector& modules ) -{ - modules.push_back ( &module ); - for ( size_t i = 0; i < module.non_if_data.libraries.size (); i++ ) - { - Library& library = *module.non_if_data.libraries[i]; - if ( library.importedModule->type != ObjectLibrary ) - break; - modules.push_back ( library.importedModule ); - } - - /* FIXME: Collect libraries in IFs here */ -} - -void -AutomaticDependency::CheckAutomaticDependenciesForModule ( Module& module, - bool verbose ) -{ - size_t mi; - vector modules; - GetModulesToCheck ( module, modules ); - for ( mi = 0; mi < modules.size (); mi++ ) - ParseFiles ( *modules[mi] ); - for ( mi = 0; mi < modules.size (); mi++ ) - CheckAutomaticDependencies ( *modules[mi], verbose ); -} - -void -AutomaticDependency::CheckAutomaticDependencies ( const Module& module, - bool verbose ) -{ - struct utimbuf timebuf; - vector files; - GetModuleFiles ( module, files ); - for ( size_t fi = 0; fi < files.size (); fi++ ) - { - File& file = *files[fi]; - SourceFile* sourceFile = RetrieveFromCache ( file ); - if ( sourceFile != NULL ) - { - CheckAutomaticDependenciesForFile ( sourceFile ); - assert ( sourceFile->youngestLastWriteTime != 0 ); - if ( sourceFile->youngestLastWriteTime > sourceFile->lastWriteTime ) - { - if ( verbose ) - { - printf ( "Marking %s%c%s for rebuild due to younger file %s%c%s\n", - sourceFile->file.file.relative_path.c_str (), - cSep, sourceFile->file.file.name.c_str (), - sourceFile->youngestFile->file.file.relative_path.c_str (), - cSep, sourceFile->youngestFile->file.file.name.c_str () ); - } - timebuf.actime = sourceFile->youngestLastWriteTime; - timebuf.modtime = sourceFile->youngestLastWriteTime; - utime ( sourceFile->file.GetFullPath ().c_str (), - &timebuf ); - } - } - } -} - -void -AutomaticDependency::CheckAutomaticDependenciesForFile ( SourceFile* sourceFile ) -{ - if ( sourceFile->youngestLastWriteTime > 0 ) - return; - - if ( sourceFile->files.size () == 0 ) - { - sourceFile->youngestLastWriteTime = sourceFile->lastWriteTime; - sourceFile->youngestFile = sourceFile; - return; - } - - for ( size_t i = 0; i < sourceFile->files.size (); i++ ) - { - SourceFile* childSourceFile = sourceFile->files[i]; - - CheckAutomaticDependenciesForFile ( childSourceFile ); - if ( ( childSourceFile->youngestLastWriteTime > sourceFile->youngestLastWriteTime ) || - ( childSourceFile->lastWriteTime > sourceFile->youngestLastWriteTime ) ) - { - if ( childSourceFile->youngestLastWriteTime > childSourceFile->lastWriteTime ) - { - sourceFile->youngestLastWriteTime = childSourceFile->youngestLastWriteTime; - sourceFile->youngestFile = childSourceFile->youngestFile; - } - else - { - sourceFile->youngestLastWriteTime = childSourceFile->lastWriteTime; - sourceFile->youngestFile = childSourceFile; - } - } - } -} diff --git a/reactos/tools/rbuild/autoregister.cpp b/reactos/tools/rbuild/autoregister.cpp deleted file mode 100644 index 2a5bdc436f2..00000000000 --- a/reactos/tools/rbuild/autoregister.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "pch.h" - -#include "rbuild.h" - -using std::string; - -AutoRegister::AutoRegister ( const Project& project_, - const Module* module_, - const XMLElement& node_ ) - : XmlNode(project_, node_), - module(module_) -{ - Initialize(); -} - -bool -AutoRegister::IsSupportedModuleType ( ModuleType type ) -{ - if ( type == Win32DLL || - type == Win32OCX ) - { - return true; - } - else - { - return false; - } -} - -AutoRegisterType -AutoRegister::GetAutoRegisterType( const string& type ) -{ - if ( type == "DllRegisterServer" ) - return DllRegisterServer; - if ( type == "DllInstall" ) - return DllInstall; - if ( type == "Both" ) - return Both; - throw XMLInvalidBuildFileException ( - node.location, - " type attribute must be DllRegisterServer, DllInstall or Both." ); -} - -void -AutoRegister::Initialize () -{ - if ( !IsSupportedModuleType ( module->type ) ) - { - throw XMLInvalidBuildFileException ( - node.location, - " is not applicable for this module type." ); - } - - const XMLAttribute* att = node.GetAttribute ( "infsection", true ); - if ( !att ) - { - throw XMLInvalidBuildFileException ( - node.location, - " must have a 'infsection' attribute." ); - } - infSection = att->value; - - att = node.GetAttribute ( "type", true ); - if ( !att ) - { - throw XMLInvalidBuildFileException ( - node.location, - " must have a 'type' attribute." ); - } - type = GetAutoRegisterType ( att->value ); -} diff --git a/reactos/tools/rbuild/backend/backend.cpp b/reactos/tools/rbuild/backend/backend.cpp deleted file mode 100644 index 61d467ecf55..00000000000 --- a/reactos/tools/rbuild/backend/backend.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "../pch.h" - -#include "../rbuild.h" -#include "backend.h" - -using std::string; -using std::vector; -using std::map; - -map* -Backend::Factory::factories = NULL; -int -Backend::Factory::ref = 0; - -Backend::Factory::Factory ( const std::string& name_, const std::string& description_ ) -{ - string name(name_); - strlwr ( &name[0] ); - if ( !ref++ ) - factories = new map; - (*factories)[name] = this; - m_name = name; - m_description = description_; -} - -Backend::Factory::~Factory () -{ - if ( !--ref ) - { - delete factories; - factories = NULL; - } -} - -/*static*/ Backend* -Backend::Factory::Create ( const string& name, - Project& project, - Configuration& configuration ) -{ - string sname ( name ); - strlwr ( &sname[0] ); - if ( !factories || !factories->size () ) - throw InvalidOperationException ( __FILE__, - __LINE__, - "No registered factories" ); - Backend::Factory* f = (*factories)[sname]; - if ( !f ) - { - throw UnknownBackendException ( sname ); - return NULL; - } - return (*f) ( project, configuration ); -} - -Backend::Backend ( Project& project, - Configuration& configuration ) - : ProjectNode ( project ), - configuration ( configuration ) -{ -} - -Backend::~Backend() -{ -} - -string -Backend::GetFullPath ( const FileLocation& file ) const -{ - string directory; - switch ( file.directory ) - { - case SourceDirectory: - directory = ""; - break; - case IntermediateDirectory: - directory = Environment::GetIntermediatePath (); - break; - case OutputDirectory: - directory = Environment::GetOutputPath (); - break; - case InstallDirectory: - directory = Environment::GetInstallPath (); - break; - default: - throw InvalidOperationException ( __FILE__, - __LINE__, - "Invalid directory %d.", - file.directory ); - } - - if ( file.relative_path.length () > 0 ) - { - if ( directory.length () > 0 ) - directory += sSep; - directory += file.relative_path; - } - return directory; -} - -string -Backend::GetFullName ( const FileLocation& file ) const -{ - string directory = GetFullPath ( file ); - - if ( directory.length () > 0 ) - directory += sSep; - - return directory + file.name; -} diff --git a/reactos/tools/rbuild/backend/backend.h b/reactos/tools/rbuild/backend/backend.h deleted file mode 100644 index 7e9da13ed1d..00000000000 --- a/reactos/tools/rbuild/backend/backend.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 - -#include "../rbuild.h" - -class Backend; - -typedef Backend* BackendFactory ( Project& project, - Configuration& configuration ); - -class Backend -{ -public: - class Factory - { - static std::map* factories; - static int ref; - std::string m_name; - std::string m_description; - - protected: - - Factory ( const std::string& name_, const std::string& description_ ); - virtual ~Factory(); - - virtual Backend* operator() ( Project&, - Configuration& configuration ) = 0; - - public: - static Backend* Create ( const std::string& name, - Project& project, - Configuration& configuration ); - - static std::map::iterator map_begin(void) - { - return factories->begin(); - } - - static std::map::iterator map_end(void) - { - return factories->end(); - } - - const char *Name(void) { return m_name.c_str(); } - const char *Description(void) { return m_description.c_str(); } - }; - -protected: - Backend ( Project& project, - Configuration& configuration ); - -public: - virtual ~Backend(); - - virtual std::string GetFullName ( const FileLocation& file ) const; - virtual std::string GetFullPath ( const FileLocation& file ) const; - virtual void Process () = 0; - Project& ProjectNode; - Configuration& configuration; -}; diff --git a/reactos/tools/rbuild/backend/dependencymap/dependencymap.cpp b/reactos/tools/rbuild/backend/dependencymap/dependencymap.cpp deleted file mode 100644 index f12fa77b7d6..00000000000 --- a/reactos/tools/rbuild/backend/dependencymap/dependencymap.cpp +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Copyright (C) 2007 Christoph von Wittich - * - * 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. - */ -#ifdef _MSC_VER -#pragma warning ( disable : 4786 ) -#endif//_MSC_VER - -#include -#include -#include -#include -#include - -#include - -#include "dependencymap.h" -#include "../mingw/mingw.h" - -using std::string; -using std::vector; -using std::map; -using std::ifstream; - -#ifdef OUT -#undef OUT -#endif//OUT - - -static class DepMapFactory : public Backend::Factory -{ - public: - - DepMapFactory() : Factory("DepMap", "Dependency Map") {} - Backend *operator() (Project &project, - Configuration& configuration) - { - return new DepMapBackend(project, configuration); - } - -} factory; - - -DepMapBackend::DepMapBackend(Project &project, - Configuration& configuration) : Backend(project, configuration) -{ - -} - -void DepMapBackend::Process() -{ - string filename_depmap ( "dependencymap.xml" ); - printf ( "Creating dependecy map: %s\n", filename_depmap.c_str() ); - - m_DepMapFile = fopen ( filename_depmap.c_str(), "wb" ); - - if ( !m_DepMapFile ) - { - printf ( "Could not create file '%s'.\n", filename_depmap.c_str() ); - return; - } - - _generate_depmap ( m_DepMapFile ); - - fclose ( m_DepMapFile ); - printf ( "Done.\n" ); -} - -void -DepMapBackend::_clean_project_files ( void ) -{ - remove ( "dependencymap.xml" ); -} - - -void -DepMapBackend::_generate_depmap ( FILE* OUT ) -{ - /* add dependencies */ - - typedef map ModuleMap; - ModuleMap module_map; - - for( std::map::const_iterator p = ProjectNode.modules.begin(); p != ProjectNode.modules.end(); ++ p ) - { - Module& module = *p->second; - if ((module.type != Iso) && - (module.type != LiveIso)) - { - vector ifs_list; - ifs_list.push_back ( &module.project.non_if_data ); - ifs_list.push_back ( &module.non_if_data ); - - module_data * current_data; - ModuleMap::iterator mod_it = module_map.find ( module.name ); - if (mod_it != module_map.end ()) - { - current_data = mod_it->second; - } - else - { - current_data = new module_data(); - if (current_data) - { - module_map.insert (std::make_pair(module.name, current_data)); - } - } - while ( ifs_list.size() ) - { - const IfableData& data = *ifs_list.back(); - ifs_list.pop_back(); - const vector& libs = data.libraries; - for ( size_t j = 0; j < libs.size(); j++ ) - { - ModuleMap::iterator it = module_map.find ( libs[j]->name ); - - if ( it != module_map.end ()) - { - module_data * data = it->second; - data->references.push_back ( module.name ); - } - else - { - module_data * data = new module_data(); - if ( data ) - { - data->references.push_back ( module.name ); - } - module_map.insert ( std::make_pair( libs[j]->name, data ) ); - } - current_data->libraries.push_back ( libs[j]->name ); - } - } - } - } - - fprintf ( m_DepMapFile, "\r\n" ); - fprintf ( m_DepMapFile, "\r\n" ); - fprintf ( m_DepMapFile, "\r\n" ); - - for( std::map::const_iterator p = ProjectNode.modules.begin(); p != ProjectNode.modules.end(); ++ p ) - { - Module& module = *p->second; - - ModuleMap::iterator it = module_map.find ( module.name ); - if ( it != module_map.end () ) - { - module_data * data = it->second; - - - - fprintf ( m_DepMapFile, "\t\r\n" ); - fprintf ( m_DepMapFile, "\t\t%s\r\n", module.name.c_str () ); - fprintf ( m_DepMapFile, "\t\t%s\r\n", module.output->relative_path.c_str () ); - fprintf ( m_DepMapFile, "\t\t%u\r\n", (unsigned int)data->references.size () ); - fprintf ( m_DepMapFile, "\t\t%u\r\n", (unsigned int)data->libraries.size () ); -#if 0 - if ( data->references.size () ) - { - fprintf ( m_DepMapFile, "\t\r\n" ); - for ( size_t j = 0; j < data->references.size (); j++ ) - { - fprintf ( m_DepMapFile, "\t\t\r\n", data->references[j].c_str () ); - } - fprintf ( m_DepMapFile, "\t\r\n" ); - } - - if ( data->libraries.size () ) - { - fprintf ( m_DepMapFile, "\t\r\n" ); - for ( size_t j = 0; j < data->libraries.size (); j++ ) - { - fprintf ( m_DepMapFile, "\t\t\r\n", data->libraries[j].c_str () ); - } - fprintf ( m_DepMapFile, "\t\r\n" ); - } -#endif - fprintf ( m_DepMapFile, "\t\r\n" ); - } - } - - fprintf ( m_DepMapFile, "" ); -} - - -DepMapConfiguration::DepMapConfiguration ( const std::string &name ) -{ - /* nothing to do here */ -} - - diff --git a/reactos/tools/rbuild/backend/dependencymap/dependencymap.h b/reactos/tools/rbuild/backend/dependencymap/dependencymap.h deleted file mode 100644 index 96114f514fd..00000000000 --- a/reactos/tools/rbuild/backend/dependencymap/dependencymap.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2007 Christoph von Wittich - * - * 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 - -#include -#include -#include - -#include "../backend.h" - -class DepMapConfiguration -{ - public: - DepMapConfiguration(const std::string &name = ""); - virtual ~DepMapConfiguration() {} - std::string name; -}; - -class DepMapBackend : public Backend -{ - public: - - DepMapBackend(Project &project, - Configuration& configuration); - virtual ~DepMapBackend() {} - - virtual void Process(); - - private: - - FILE* m_DepMapFile; - - std::vector m_configurations; - void _generate_depmap ( FILE* OUT ); - void _clean_project_files ( void ); - - struct module_data - { - std::vector libraries; - std::vector references; - - module_data() - {} - ~module_data() - {} - }; - -}; diff --git a/reactos/tools/rbuild/backend/mingw/compilers/gcc.mak b/reactos/tools/rbuild/backend/mingw/compilers/gcc.mak deleted file mode 100644 index 074d107a262..00000000000 --- a/reactos/tools/rbuild/backend/mingw/compilers/gcc.mak +++ /dev/null @@ -1,158 +0,0 @@ -CFLAG_WERROR:=-Werror -CFLAG_CRTDLL:=-D_DLL -D__USE_CRTIMP - -CXXFLAG_WERROR:=-Werror -CXXFLAG_CRTDLL:=-D_DLL -D__USE_CRTIMP - -CPPFLAG_WERROR:=-Werror -CPPFLAG_UNICODE:=-DUNICODE -D_UNICODE - -# FIXME: disabled until RosBE stops sucking -# BUILTIN_CPPFLAGS+= -nostdinc - -#(module, source, dependencies, cflags, output) -define RBUILD_DEPENDS - -$(5): $(2) $(3) | ${call RBUILD_dir,$(5)} - $$(ECHO_DEPENDS) - $${gcc} -xc -MF $$@ $(4) -M -MP -MT $$@ $$< - -endef - -#(module, source, dependencies, cflags, output) -define RBUILD_CXX_DEPENDS - -$(5): $(2) $(3) | ${call RBUILD_dir,$(5)} - $$(ECHO_DEPENDS) - $${gpp} -MF $$@ $(4) -M -MP -MT $$@ $$< - -endef - -#(source, cflags) -RBUILD_PIPE_CPP=$${gcc} $(2) -xc -E $(1) -RBUILD_PIPE_CXX_CPP=$${gpp} $(2) -E $(1) - -#(module, source, dependencies, cflags, output) -define RBUILD_CPP - -$(5): $(2) $(3) | ${call RBUILD_dir,$(5)} - $$(ECHO_CPP) - ${call RBUILD_PIPE_CPP,$$<,$(4)} > $$@ - -endef - -#(module, source, dependencies, cflags, output) -define RBUILD_CXX_CPP - -$(5): $(2) $(3) | ${call RBUILD_dir,$(5)} - $$(ECHO_CPP) - ${call RBUILD_PIPE_CXX_CPP,$$<,$(4)} > $$@ - -endef - -#(module, source, dependencies, cflags, output) -define RBUILD_CC - -$(2): $${$(1)_precondition} - -ifeq ($(ROS_BUILDDEPS),full) - -${call RBUILD_DEPENDS,$(1),$(2),,${call RBUILD_cflags,$(1),$(4)},$(5).d} --include $(5).d - -$(5): $(2) $(5).d $(3) | ${call RBUILD_dir,$(5)} - $$(ECHO_CC) - $${gcc} -o $$@ ${call RBUILD_cflags,$(1),$(4)} -c $$< - -else - -$(5): $(2) $(3) | ${call RBUILD_dir,$(5)} - $$(ECHO_CC) - $${gcc} -o $$@ ${call RBUILD_cflags,$(1),$(4)} -c $$< - -endif - -endef - -#(module, source, dependencies, cflags, output) -define RBUILD_CXX - -$(2): $${$(1)_precondition} - -ifeq ($(ROS_BUILDDEPS),full) - -${call RBUILD_CXX_DEPENDS,$(1),$(2),,${call RBUILD_cxxflags,$(1),$(4)},$(5).d} --include $(5).d - -$(5): $(2) $(5).d $(3) | ${call RBUILD_dir,$(5)} - $$(ECHO_CC) - $${gpp} -o $$@ ${call RBUILD_cxxflags,$(1),$(4)} -c $$< - -else - -$(5): $(2) $(3) | ${call RBUILD_dir,$(5)} - $$(ECHO_CC) - $${gpp} -o $$@ ${call RBUILD_cxxflags,$(1),$(4)} -c $$< - -endif - -endef - -#(module, source, dependencies, cflags) -RBUILD_CC_RULE=${call RBUILD_CC,$(1),$(2),$(3),$(4),${call RBUILD_intermediate_path_unique,$(1),$(2)}.o} -RBUILD_CXX_RULE=${call RBUILD_CXX,$(1),$(2),$(3),$(4),${call RBUILD_intermediate_path_unique,$(1),$(2)}.o} - -#(module, source, dependencies, cflags) -define RBUILD_CC_PCH_RULE - -$(2): $${$(1)_precondition} - -ifeq ($$(ROS_BUILDDEPS),full) - -${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1)$$(SEP)$(notdir $(2)).gch.d: $(2) | ${call RBUILD_intermediate_dir,$(2)} - $$(ECHO_DEPENDS) - $${gcc} -MF $$@ ${call RBUILD_cflags,$(1),$(4)} -x c-header -M -MP -MT $$@ $$< - --include $$(intermediate_dir)$$(SEP).gch_$$(module_name)$$(SEP)$(notdir $(2)).gch.d - -${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1)$$(SEP)$(notdir $(2)).gch: $(2) ${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1)$$(SEP)$(notdir $(2)).gch.d $(3) | ${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1) - $$(ECHO_PCH) - $${gcc} -o $$@ ${call RBUILD_cflags,$(1),$(4)} -x c-header $$< - -else - -${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1)$$(SEP)$(notdir $(2)).gch: $(2) $(3) | ${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1) - $$(ECHO_PCH) - $${gcc} -o $$@ ${call RBUILD_cflags,$(1),$(4)} -x c-header $$< - -endif - -endef - -#(module, source, dependencies, cflags) -define RBUILD_CXX_PCH_RULE - -$(2): $${$(1)_precondition} - -ifeq ($$(ROS_BUILDDEPS),full) - -${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1)$$(SEP)$(notdir $(2)).gch.d: $(2) | ${call RBUILD_intermediate_dir,$(2)} - $$(ECHO_DEPENDS) - $${gpp} -MF $$@ ${call RBUILD_cxxflags,$(1),$(4)} -x c++-header -M -MP -MT $$@ $$< - --include $$(intermediate_dir)$$(SEP).gch_$$(module_name)$$(SEP)$(notdir $(2)).gch.d - -${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1)$$(SEP)$(notdir $(2)).gch: $(2) ${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1)$$(SEP)$(notdir $(2)).gch.d $(3) | ${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1) - $$(ECHO_PCH) - $${gpp} -o $$@ ${call RBUILD_cxxflags,$(1),$(4)} -x c++-header $$< - -else - -${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1)$$(SEP)$(notdir $(2)).gch: $(2) $(3) | ${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1) - $$(ECHO_PCH) - $${gpp} -o $$@ ${call RBUILD_cxxflags,$(1),$(4)} -x c++-header $$< - -endif - -endef - diff --git a/reactos/tools/rbuild/backend/mingw/compilers/msc.mak b/reactos/tools/rbuild/backend/mingw/compilers/msc.mak deleted file mode 100644 index 53d520553a5..00000000000 --- a/reactos/tools/rbuild/backend/mingw/compilers/msc.mak +++ /dev/null @@ -1,101 +0,0 @@ -CFLAGS+= $(_CL_) -_CL_= - -CINCLUDES:=$(INCLUDE) $(CINCLUDES) -INCLUDE= - -CFLAG_WERROR:=/WX -CFLAG_CRTDLL:=/D_DLL /D__USE_CRTIMP /MD - -CXXFLAG_WERROR:=/WX -CXXFLAG_CRTDLL:=/D_DLL /D__USE_CRTIMP /MD - -CPPFLAG_WERROR:=/WX -CPPFLAG_UNICODE:=/DUNICODE /D_UNICODE - -BUILTIN_CPPFLAGS+= /X - -cl=$(Q)$(rbuild_helper_TARGET) "RBUILD_CL_" "$(notdir $<)" cl /nologo - -#(module, source, dependencies, cflags, output) -#TODO -RBUILD_CL_DEPENDS=$$(error Full dependencies are not implemented for Microsoft C/C++ Compiler yet) -RBUILD_DEPENDS=${call RBUILD_CL_DEPENDS,$(1),$(2),$(3),$(4) /TC,$(5)} -RBUILD_CXX_DEPENDS=${call RBUILD_CL_DEPENDS,$(1),$(2),$(3),$(4) /TP,$(5)} - -#(source, cflags) -RBUILD_PIPE_CL_CPP=$${cl} $(2) /E $(1) -RBUILD_PIPE_CPP=${call RBUILD_PIPE_CL_CPP,$(1),$(2) /TC} -RBUILD_PIPE_CXX_CPP=${call RBUILD_PIPE_CL_CPP,$(1),$(2) /TP} - -#(module, source, dependencies, cflags, output) -define RBUILD_CL_CPP - -$(5): $(2) $(3) $$(rbuild_helper_TARGET) | ${call RBUILD_dir,$(5)} - $$(ECHO_CPP) - ${call RBUILD_PIPE_CL_CPP,$$<,$(4)} > $$@ - -endef - -RBUILD_CPP=${call RBUILD_CL_CPP,$(1),$(2),$(3),$(4) /TC,$(5)} -RBUILD_CXX_CPP=${call RBUILD_CL_CPP,$(1),$(2),$(3),$(4) /TP,$(5)} - -#(module, source, dependencies, cflags, output) -define RBUILD_CC - -$(2): $${$(1)_precondition} - -ifeq ($(ROS_BUILDDEPS),full) - -${call RBUILD_DEPENDS,$(1),$(2),,${call RBUILD_cflags,$(1),$(4)},$(5).d} --include $(5).d - -$(5): $(2) $(5).d $(3) $$(rbuild_helper_TARGET) | ${call RBUILD_dir,$(5)} - $$(ECHO_CC) - $${cl} /TC /Fo$$@ /Fd$(basename $$@).pdb ${call RBUILD_cflags,$(1),$(4)} /c $$< - -else - -$(5): $(2) $(3) $$(rbuild_helper_TARGET) | ${call RBUILD_dir,$(5)} - $$(ECHO_CC) - $${cl} /TC /Fo$$@ /Fd$(basename $$@).pdb ${call RBUILD_cflags,$(1),$(4)} /c $$< - -endif - -endef - -#(module, source, dependencies, cflags, output) -define RBUILD_CXX - -$(2): $${$(1)_precondition} - -ifeq ($(ROS_BUILDDEPS),full) - -${call RBUILD_CXX_DEPENDS,$(1),$(2),,${call RBUILD_cflags,$(1),$(4)},$(5).d} --include $(5).d - -$(5): $(2) $(5).d $(3) $$(rbuild_helper_TARGET) | ${call RBUILD_dir,$(5)} - $$(ECHO_CC) - $${cl} /TP /Fo$$@ /Fd$(basename $$@).pdb ${call RBUILD_cxxflags,$(1),$(4)} /c $$< - -else - -$(5): $(2) $(3) $$(rbuild_helper_TARGET) | ${call RBUILD_dir,$(5)} - $$(ECHO_CC) - $${cl} /TP /Fo$$@ /Fd$(basename $$@).pdb ${call RBUILD_cxxflags,$(1),$(4)} /c $$< - -endif - -endef - -#(module, source, dependencies, cflags) -RBUILD_CC_RULE=${call RBUILD_CC,$(1),$(2),$(3),$(4),${call RBUILD_intermediate_path_unique,$(1),$(2)}.o} -RBUILD_CXX_RULE=${call RBUILD_CXX,$(1),$(2),$(3),$(4),${call RBUILD_intermediate_path_unique,$(1),$(2)}.o} - -#(module, source, dependencies, cflags) -#TODO -RBUILD_CC_PCH_RULE=$$(error Precompiled headers are not implemented for Microsoft C/C++ Compiler yet) - -#(module, source, dependencies, cflags) -#TODO -RBUILD_CXX_PCH_RULE=$$(error Precompiled headers are not implemented for Microsoft C/C++ Compiler yet) diff --git a/reactos/tools/rbuild/backend/mingw/linkers/ld.mak b/reactos/tools/rbuild/backend/mingw/linkers/ld.mak deleted file mode 100644 index d7fc3b78e40..00000000000 --- a/reactos/tools/rbuild/backend/mingw/linkers/ld.mak +++ /dev/null @@ -1,90 +0,0 @@ -# -exclude-all-symbols disables autoexporting all symbols *if none were found* (either in a DEF file or using __declspec(dllexport) -LDFLAG_DLL:=--shared --exclude-all-symbols -LDFLAG_DRIVER:=--shared --subsystem=native --exclude-all-symbols -LDFLAG_NOSTDLIB:=--nostartfiles --nostdlib -LDFLAG_CONSOLE:=--subsystem=console -LDFLAG_WINDOWS:=--subsystem=windows -LDFLAG_NATIVE:=--subsystem=native - -LDFLAG_EXCLUDE_ALL_SYMBOLS=--exclude-all-symbols -DLLTOOL_FLAGS=--kill-at -ifeq ($(ARCH),amd64) - DLLTOOL_FLAGS= --no-leading-underscore -endif - -#~ #(module, objs, deps, ldflags, output, def, libs, entry, base) -#(module, objs, deps, ldflags, output, def, libs, entry, base, extralibs) -define RBUILD_LINK - -ifneq ($(6),) -${call RBUILD_intermediate_dir,$(5)}$$(SEP)lib${call RBUILD_name,$(5)}.a: $(6) | ${call RBUILD_intermediate_path,$(5)} - $$(ECHO_IMPLIB) - $${dlltool} --def $(6) $(DLLTOOL_FLAGS) --output-lib=$$@ - -${call RBUILD_intermediate_dir,$(5)}$$(SEP)lib${call RBUILD_name,$(5)}.delayimp.a: $(6) | ${call RBUILD_intermediate_path,$(5)} - $$(ECHO_IMPLIB) - $${dlltool} --def $(6) $(DLLTOOL_FLAGS) --output-delaylib=$$@ - -${call RBUILD_intermediate_path_noext,$(5)}.exp: $(6) | ${call RBUILD_intermediate_path,$(5)} - $$(ECHO_IMPLIB) - $${dlltool} --def $(6) $(DLLTOOL_FLAGS) --output-exp=$$@ - -$(1)_CLEANFILES+=\ - ${call RBUILD_intermediate_dir,$(5)}$$(SEP)lib$(notdir $(5)).a \ - ${call RBUILD_intermediate_dir,$(5)}$$(SEP)lib$(notdir $(5)).delayimp.a \ - ${call RBUILD_intermediate_path_noext,$(5)}.exp -endif - -# TODO: refactor this out of here and into rules.mak -${call RBUILD_intermediate_dir,$(5)}$$(SEP)$(1)_objs.rsp: $(2) $$(if $(6),${call RBUILD_intermediate_path_noext,$(5)}.exp) $(3) | ${call RBUILD_intermediate_dir,$(5)} - $$(ECHO_RSP) - -@$${rm} $$@ 2>$$(NUL) - $${cp} $$(NUL) $$@ >$$(NUL) - $$(foreach obj,$(2) $$(if $(6),${call RBUILD_intermediate_path_noext,$(5)}.exp),$$(Q)echo $$(QUOTE)$$(subst \,\\,$$(obj))$$(QUOTE)>>$$@$$(NL)) - -$(1)_CLEANFILES+=${call RBUILD_intermediate_dir,$(5)}$$(SEP)$(1)_objs.rsp - -$(5): ${call RBUILD_intermediate_dir,$(5)}$$(SEP)$(1)_objs.rsp $(7) $(3) $$(RSYM_TARGET) $$(PEFIXUP_TARGET) | ${call RBUILD_dir,$(5)} - $$(ECHO_LD) -#~ $${ld} --entry=$(8) --image-base=$(9) @${call RBUILD_intermediate_dir,$(5)}$$(SEP)$(1)_objs.rsp $(7) ${call RBUILD_ldflags,$(1),$(4)} -o $$@ - $${ld} --entry=$(8) --image-base=$(9) @${call RBUILD_intermediate_dir,$(5)}$$(SEP)$(1)_objs.rsp --start-group $(10) $(7) --end-group ${call RBUILD_ldflags,$(1),$(4)} -o $$@ -ifneq ($(or $(6),$$(MODULETYPE$$($(1)_TYPE)_KMODE)),) - $$(ECHO_PEFIXUP) - $$(Q)$$(PEFIXUP_TARGET) $$@ $(if $(6),-exports) $$(if $$(MODULETYPE$($(1)_TYPE)_KMODE),-sections) -endif -ifeq ($(ROS_BUILDMAP),full) - $$(ECHO_OBJDUMP) - $${objdump} -d -S $$@ > ${call RBUILD_output_path_noext,$(5)}.map -else -ifeq ($(ROS_BUILDMAP),yes) - $$(ECHO_NM) - $${nm} --numeric-sort $$@ > ${call RBUILD_output_path_noext,$(5)}.map -endif -endif -ifeq ($(ROS_BUILDNOSTRIP),yes) - $$(ECHO_CP) - $${cp} $(5) $(basename $(5)).nostrip$(suffix $(5)) 1>$(NUL) -endif -ifneq ($(ROS_GENERATE_RSYM),no) - $$(ECHO_RSYM) - $$(Q)$$(RSYM_TARGET) $$@ $$@ -endif -ifeq ($(ROS_LEAN_AND_MEAN),yes) - $$(ECHO_STRIP) - $${strip} -s -x -X $$@ -endif - -ifneq ($(ROS_BUILDMAP),) -$(1)_CLEANFILES+=${call RBUILD_output_path_noext,$(5)}.map -endif - -ifeq ($(ROS_BUILDNOSTRIP),yes) -$(1)_CLEANFILES+=$(basename $(5)).nostrip$(suffix $(5)) -endif - -endef - -#~ #(module, def, deps, ldflags, libs, entry, base) -#~ RBUILD_LINK_RULE=${call RBUILD_LINK,$(1),$(value $(1)_OBJS),$(3),$(4),$(value $(1)_TARGET),$(2),$(5) $(value $(1)_LIBS) $(5),$(6),$(7)} -#(module, def, deps, ldflags, libs, entry, base, extralibs) -RBUILD_LINK_RULE=${call RBUILD_LINK,$(1),$(value $(1)_OBJS),$(3),$(4),$(value $(1)_TARGET),$(2),$(value $(1)_LIBS),$(6),$(7),$(5)} diff --git a/reactos/tools/rbuild/backend/mingw/linkers/mslink.mak b/reactos/tools/rbuild/backend/mingw/linkers/mslink.mak deleted file mode 100644 index 464090415c4..00000000000 --- a/reactos/tools/rbuild/backend/mingw/linkers/mslink.mak +++ /dev/null @@ -1 +0,0 @@ -# TODO diff --git a/reactos/tools/rbuild/backend/mingw/mingw.cpp b/reactos/tools/rbuild/backend/mingw/mingw.cpp deleted file mode 100644 index 4d29b3e20c5..00000000000 --- a/reactos/tools/rbuild/backend/mingw/mingw.cpp +++ /dev/null @@ -1,1377 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * 2006 Christoph von Wittich - * - * 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 "../../pch.h" - -#include "mingw.h" -#include -#include "modulehandler.h" - -#ifdef _MSC_VER -#define popen _popen -#define pclose _pclose -#endif//_MSC_VER - -using std::string; -using std::vector; -using std::set; -using std::map; - -typedef set set_string; - -const struct ModuleHandlerInformations ModuleHandlerInformations[] = { - { HostTrue, "", "", "" }, // BuildTool - { HostFalse, "", "", "" }, // StaticLibrary - { HostFalse, "", "", "" }, // ObjectLibrary - { HostFalse, "", "", "$(LDFLAG_DRIVER)" }, // Kernel - { HostFalse, "", "", "$(LDFLAG_DRIVER)" }, // KernelModeDLL - { HostFalse, "-D__NTDRIVER__", "", "$(LDFLAG_DRIVER)" }, // KernelModeDriver - { HostFalse, "", "", "$(LDFLAG_DLL)" }, // NativeDLL - { HostFalse, "-D__NTAPP__", "", "$(LDFLAG_NATIVE)" }, // NativeCUI - { HostFalse, "", "", "$(LDFLAG_DLL)" }, // Win32DLL - { HostFalse, "", "", "$(LDFLAG_DLL)" }, // Win32OCX - { HostFalse, "", "", "$(LDFLAG_CONSOLE)" }, // Win32CUI - { HostFalse, "", "", "$(LDFLAG_WINDOWS)" }, // Win32GUI - { HostFalse, "", "", "$(LDFLAG_DRIVER)" }, // BootLoader - { HostFalse, "", "-f bin", "" }, // BootSector - { HostFalse, "", "", "" }, // Iso - { HostFalse, "", "", "" }, // LiveIso - { HostFalse, "", "", "" }, // Test - { HostFalse, "", "", "" }, // RpcServer - { HostFalse, "", "", "" }, // RpcClient - { HostFalse, "", "", "" }, // Alias - { HostFalse, "", "", "" }, // BootProgram - { HostFalse, "", "", "$(LDFLAG_WINDOWS)" }, // Win32SCR - { HostFalse, "", "", "" }, // IdlHeader - { HostFalse, "", "", "" }, // IdlInterface - { HostFalse, "", "", "" }, // EmbeddedTypeLib - { HostFalse, "", "", "" }, // ElfExecutable - { HostFalse, "", "", "" }, // RpcProxy - { HostTrue, "", "", "" }, // HostStaticLibrary - { HostFalse, "", "", "" }, // Cabinet - { HostFalse, "", "", "$(LDFLAG_DLL)" }, // KeyboardLayout - { HostFalse, "", "", "" }, // MessageHeader -}; - -static std::string mscPath; -static std::string mslinkPath; - -string -MingwBackend::GetFullPath ( const FileLocation& file ) const -{ - MingwModuleHandler::PassThruCacheDirectory ( &file ); - - string directory; - switch ( file.directory ) - { - case SourceDirectory: - directory = ""; - break; - case IntermediateDirectory: - directory = "$(INTERMEDIATE)"; - break; - case OutputDirectory: - directory = "$(OUTPUT)"; - break; - case InstallDirectory: - directory = "$(INSTALL)"; - break; - case TemporaryDirectory: - directory = "$(TEMPORARY)"; - break; - default: - throw InvalidOperationException ( __FILE__, - __LINE__, - "Invalid directory %d.", - file.directory ); - } - - if ( file.relative_path.length () > 0 ) - { - if ( directory.length () > 0 ) - directory += sSep; - directory += file.relative_path; - } - return directory; -} - -string -MingwBackend::GetFullName ( const FileLocation& file ) const -{ - string directory; - switch ( file.directory ) - { - case SourceDirectory: - directory = ""; - break; - case IntermediateDirectory: - directory = "$(INTERMEDIATE)"; - break; - case OutputDirectory: - directory = "$(OUTPUT)"; - break; - case InstallDirectory: - directory = "$(INSTALL)"; - break; - case TemporaryDirectory: - directory = "$(TEMPORARY)"; - break; - default: - throw InvalidOperationException ( __FILE__, - __LINE__, - "Invalid directory %d.", - file.directory ); - } - - if ( file.relative_path.length () > 0 ) - { - if ( directory.length () > 0 ) - directory += sSep; - directory += file.relative_path; - } - - if ( directory.length () > 0 ) - directory += sSep; - - return directory + file.name; -} - -string -MingwBackend::GetFullNamePrefixSpaces ( const FileLocation& file ) const -{ - string fullname = GetFullName ( file ); - - size_t pos = 0; - while ( true ) - { - pos = fullname.find ( ' ', pos ); - if ( pos == fullname.npos ) - break; - fullname.replace ( pos, 1, "\\ " ); - pos += 2; - } - - return fullname; -} - -string -MingwBackend::v2s ( const vector& files, int wrap_at, bool prefixSpaces ) const -{ - if ( !files.size() ) - return ""; - string s; - int wrap_count = 0; - for ( size_t i = 0; i < files.size(); i++ ) - { - const FileLocation& file = files[i]; - if ( wrap_at > 0 && wrap_count++ == wrap_at ) - { - s += " \\\n\t\t"; - wrap_count = 1; - } - else if ( s.size() ) - s += " "; - if (prefixSpaces) - s += GetFullNamePrefixSpaces ( file ); - else - s += GetFullName ( file ); - } - return s; -} - -string -MingwBackend::v2s ( const string_list& v, int wrap_at ) const -{ - if ( !v.size() ) - return ""; - string s; - int wrap_count = 0; - for ( size_t i = 0; i < v.size(); i++ ) - { - if ( !v[i].size() ) - continue; - if ( wrap_at > 0 && wrap_count++ == wrap_at ) - { - s += " \\\n\t\t"; - wrap_count = 1; - } - else if ( s.size() ) - s += " "; - s += v[i]; - } - return s; -} - -static class MingwFactory : public Backend::Factory -{ -public: - MingwFactory() : Factory ( "mingw", "Minimalist GNU Win32" ) {} - Backend* operator() ( Project& project, - Configuration& configuration ) - { - return new MingwBackend ( project, - configuration ); - } -} factory; - - -MingwBackend::MingwBackend ( Project& project, - Configuration& configuration ) - : Backend ( project, configuration ), - manualBinutilsSetting( false ), - intermediateDirectory ( new Directory ( "" ) ), - outputDirectory ( new Directory ( "" ) ), - installDirectory ( new Directory ( "" ) ) -{ - compilerPrefix = ""; -} - -MingwBackend::~MingwBackend() -{ - delete intermediateDirectory; - delete outputDirectory; - delete installDirectory; -} - -string -MingwBackend::AddDirectoryTarget ( const string& directory, - Directory* directoryTree ) -{ - if ( directory.length () > 0) - directoryTree->Add ( directory.c_str() ); - return directoryTree->name; -} - -bool -MingwBackend::CanEnablePreCompiledHeaderSupportForModule ( const Module& module ) -{ - if ( !configuration.CompilationUnitsEnabled ) - return true; - - const vector& compilationUnits = module.non_if_data.compilationUnits; - size_t i; - for ( i = 0; i < compilationUnits.size (); i++ ) - { - CompilationUnit& compilationUnit = *compilationUnits[i]; - if ( compilationUnit.GetFiles ().size () != 1 ) - return false; - } - return true; -} - -void -MingwBackend::ProcessModules () -{ - printf ( "Processing modules..." ); - - vector v; - size_t i; - - for ( std::map::iterator p = ProjectNode.modules.begin (); p != ProjectNode.modules.end (); ++ p ) - fprintf ( fMakefile, "%s_TYPE:=%u\n", p->second->name.c_str(), p->second->type ); - - for ( std::map::iterator p = ProjectNode.modules.begin (); p != ProjectNode.modules.end (); ++ p ) - { - Module& module = *p->second; - if ( !module.enabled ) - continue; - MingwModuleHandler* h = MingwModuleHandler::InstanciateHandler ( - module, - this ); - h->AddImplicitLibraries ( module ); - if ( use_pch && CanEnablePreCompiledHeaderSupportForModule ( module ) ) - h->EnablePreCompiledHeaderSupport (); - v.push_back ( h ); - } - - size_t iend = v.size (); - - for ( i = 0; i < iend; i++ ) - v[i]->GenerateSourceMacro(); - for ( i = 0; i < iend; i++ ) - v[i]->GenerateObjectMacro(); - fprintf ( fMakefile, "\n" ); - for ( i = 0; i < iend; i++ ) - v[i]->GenerateTargetMacro(); - fprintf ( fMakefile, "\n" ); - - GenerateAllTarget ( v ); - GenerateRegTestsRunTarget (); - - for ( i = 0; i < iend; i++ ) - v[i]->GenerateOtherMacros(); - - for ( i = 0; i < iend; i++ ) - { - MingwModuleHandler& h = *v[i]; - h.GeneratePreconditionDependencies (); - h.Process (); - h.GenerateInvocations (); - h.GenerateCleanTarget (); - h.GenerateInstallTarget (); - h.GenerateDependsTarget (); - delete v[i]; - } - - printf ( "done\n" ); -} - -void -MingwBackend::Process () -{ - if ( configuration.CheckDependenciesForModuleOnly ) - CheckAutomaticDependenciesForModuleOnly (); - else - ProcessNormal (); -} - -void -MingwBackend::CheckAutomaticDependenciesForModuleOnly () -{ - if ( configuration.Dependencies == AutomaticDependencies ) - { - Module* module = ProjectNode.LocateModule ( configuration.CheckDependenciesForModuleOnlyModule ); - if ( module == NULL ) - { - printf ( "Module '%s' does not exist\n", - configuration.CheckDependenciesForModuleOnlyModule.c_str () ); - return; - } - - printf ( "Checking automatic dependencies for module '%s'...", - module->name.c_str () ); - AutomaticDependency automaticDependency ( ProjectNode ); - automaticDependency.CheckAutomaticDependenciesForModule ( *module, - configuration.Verbose ); - printf ( "done\n" ); - } -} - -void -MingwBackend::ProcessNormal () -{ - assert(sizeof(ModuleHandlerInformations)/sizeof(ModuleHandlerInformations[0]) == TypeDontCare); - - DetectCompiler (); - DetectBinutils (); - DetectNetwideAssembler (); - DetectPipeSupport (); - DetectPCHSupport (); - CreateMakefile (); - GenerateHeader (); - GenerateGlobalVariables (); - GenerateXmlBuildFilesMacro (); - ProcessModules (); - GenerateInstallTarget (); - GenerateTestTarget (); - GenerateDirectoryTargets (); - GenerateDirectories (); - GenerateTestSupportCode (); - GenerateCompilationUnitSupportCode (); - GenerateSysSetup (); - GenerateProxyMakefiles (); - CheckAutomaticDependencies (); - CloseMakefile (); -} - -void -MingwBackend::CreateMakefile () -{ - fMakefile = fopen ( ProjectNode.makefile.c_str (), "w" ); - if ( !fMakefile ) - throw AccessDeniedException ( ProjectNode.makefile ); - MingwModuleHandler::SetBackend ( this ); - MingwModuleHandler::SetMakefile ( fMakefile ); -} - -void -MingwBackend::CloseMakefile () const -{ - if (fMakefile) - fclose ( fMakefile ); -} - -void -MingwBackend::GenerateHeader () const -{ - fprintf ( fMakefile, "# THIS FILE IS AUTOMATICALLY GENERATED, EDIT '%s' INSTEAD\n\n", - ProjectNode.GetProjectFilename ().c_str () ); -} - -void -MingwBackend::GenerateGlobalProperties ( - const char* assignmentOperation, - const IfableData& data ) const -{ - for ( std::map::const_iterator p = data.properties.begin(); p != data.properties.end(); ++ p ) - { - Property& prop = *p->second; - - if (!prop.isInternal) - { - fprintf ( fMakefile, "%s := %s\n", - prop.name.c_str(), - prop.value.c_str() ); - } - } -} - -string -MingwBackend::GenerateProjectLDFLAGS () const -{ - string ldflags; - for ( size_t i = 0; i < ProjectNode.linkerFlags.size (); i++ ) - { - LinkerFlag& linkerFlag = *ProjectNode.linkerFlags[i]; - if ( ldflags.length () > 0 ) - ldflags += " "; - ldflags += linkerFlag.flag; - } - return ldflags; -} - -void -MingwBackend::GenerateGlobalVariables () const -{ - fputs ( "include tools$(SEP)rbuild$(SEP)backend$(SEP)mingw$(SEP)rules.mak\n", fMakefile ); - fprintf ( fMakefile, "include tools$(SEP)rbuild$(SEP)backend$(SEP)mingw$(SEP)linkers$(SEP)%s.mak\n", ProjectNode.GetLinkerSet ().c_str () ); - fprintf ( fMakefile, "include tools$(SEP)rbuild$(SEP)backend$(SEP)mingw$(SEP)compilers$(SEP)%s.mak\n", ProjectNode.GetCompilerSet ().c_str () ); - - if ( mscPath.length() ) - fprintf ( fMakefile, "export RBUILD_CL_PATH=%s\n", mscPath.c_str () ); - - if ( mslinkPath.length() ) - fprintf ( fMakefile, "export RBUILD_LINK_PATH=%s\n", mslinkPath.c_str () ); - - if ( configuration.Dependencies == FullDependencies ) - { - fprintf ( fMakefile, - "ifeq ($(ROS_BUILDDEPS),)\n" - "ROS_BUILDDEPS:=%s\n" - "endif\n", - "full" ); - } - - fprintf ( fMakefile, - "PREFIX := %s\n", - compilerPrefix.c_str () ); - fprintf ( fMakefile, - "nasm := $(Q)%s\n", - nasmCommand.c_str () ); - - GenerateGlobalProperties ( "=", ProjectNode.non_if_data ); - - if ( ProjectNode.configuration.Compiler == GnuGcc ) - { - fprintf ( fMakefile, "ifneq ($(OARCH),)\n" ); - fprintf ( fMakefile, "PROJECT_ASFLAGS += -march=$(OARCH)\n" ); - fprintf ( fMakefile, "PROJECT_CFLAGS += -march=$(OARCH)\n" ); - fprintf ( fMakefile, "PROJECT_CXXFLAGS += -march=$(OARCH)\n" ); - fprintf ( fMakefile, "endif\n" ); - fprintf ( fMakefile, "ifneq ($(TUNE),)\n" ); - fprintf ( fMakefile, "PROJECT_CFLAGS += -mtune=$(TUNE)\n" ); - fprintf ( fMakefile, "PROJECT_CXXFLAGS += -mtune=$(TUNE)\n" ); - fprintf ( fMakefile, "endif\n" ); - - if ( usePipe ) - { - fprintf ( fMakefile, "PROJECT_CFLAGS += -pipe\n" ); - fprintf ( fMakefile, "PROJECT_CXXFLAGS += -pipe\n" ); - fprintf ( fMakefile, "PROJECT_ASFLAGS += -pipe\n" ); - } - - // Would be nice to have our own C++ runtime - fputs ( "BUILTIN_CXXINCLUDES+= $(TARGET_CPPFLAGS)\n", fMakefile ); - - fprintf ( fMakefile, "PROJECT_CCLIBS := \"$(shell ${TARGET_CC} -print-libgcc-file-name)\"\n" ); - - fprintf ( fMakefile, "PROJECT_CXXLIBS := \"$(shell ${TARGET_CPP} -print-file-name=libsupc++.a)\" \"$(shell ${TARGET_CPP} -print-file-name=libstdc++.a)\" \"$(shell ${TARGET_CPP} -print-libgcc-file-name)\" \"$(shell ${TARGET_CPP} -print-file-name=libmingw32.a)\" \"$(shell ${TARGET_CPP} -print-file-name=libmingwex.a)\"" ); - - /* hack to get _get_output_format, needed by libmingwex */ - if (Environment::GetArch() == "i386") - fprintf ( fMakefile, " \"$(shell ${TARGET_CPP} -print-file-name=libcoldname.a)\" "); - fprintf ( fMakefile,"\n"); - } - MingwModuleHandler::GenerateParameters ( "PROJECT", "+=", ProjectNode.non_if_data ); - MingwModuleHandler::GenerateParameters ( "PROJECT_HOST", "+=", ProjectNode.host_non_if_data ); - - fprintf ( fMakefile, "PROJECT_LDFLAGS := %s\n", GenerateProjectLDFLAGS ().c_str () ); - - // TODO: use symbolic names for module types - for ( size_t i = 0; i < sizeof(ModuleHandlerInformations) / sizeof(ModuleHandlerInformations[0]); ++ i ) - { - if ( ModuleHandlerInformations[i].cflags && ModuleHandlerInformations[i].cflags[0] ) - { - fprintf ( fMakefile, - "MODULETYPE%d_%sFLAGS:=%s\n", - (int)i, - "C", - ModuleHandlerInformations[i].cflags ); - } - - if ( ModuleHandlerInformations[i].nasmflags && ModuleHandlerInformations[i].nasmflags[0] ) - { - fprintf ( fMakefile, - "MODULETYPE%d_%sFLAGS:=%s\n", - (int)i, - "NASM", - ModuleHandlerInformations[i].nasmflags ); - } - - if ( ModuleHandlerInformations[i].linkerflags && ModuleHandlerInformations[i].linkerflags[0] ) - { - fprintf ( fMakefile, - "MODULETYPE%d_%sFLAGS:=%s\n", - (int)i, - "LD", - ModuleHandlerInformations[i].linkerflags ); - } - } - - fprintf ( fMakefile, - "MODULETYPE%d_KMODE:=yes\n", - (int)Kernel ); - - fprintf ( fMakefile, - "MODULETYPE%d_KMODE:=yes\n", - (int)KernelModeDLL ); - - fprintf ( fMakefile, - "MODULETYPE%d_KMODE:=yes\n", - (int)KernelModeDriver ); - - fprintf ( fMakefile, "\n" ); -} - -bool -MingwBackend::IncludeInAllTarget ( const Module& module ) const -{ - if ( MingwModuleHandler::ReferenceObjects ( module ) ) - return false; - if ( module.type == BootSector ) - return false; - if ( module.type == Iso ) - return false; - if ( module.type == LiveIso ) - return false; - if ( module.type == Test ) - return false; - if ( module.type == Alias ) - return false; - return true; -} - -void -MingwBackend::GenerateAllTarget ( const vector& handlers ) const -{ - fprintf ( fMakefile, "all:" ); - int wrap_count = 0; - size_t iend = handlers.size (); - for ( size_t i = 0; i < iend; i++ ) - { - const Module& module = handlers[i]->module; - if ( IncludeInAllTarget ( module ) ) - { - if ( wrap_count++ == 5 ) - fprintf ( fMakefile, " \\\n\t\t" ), wrap_count = 0; - fprintf ( fMakefile, - " %s", - GetTargetMacro(module).c_str () ); - } - } - fprintf ( fMakefile, "\n\t\n\n" ); -} - -void -MingwBackend::GenerateRegTestsRunTarget () const -{ - fprintf ( fMakefile, - "REGTESTS_RUN_TARGET = regtests.dll\n" ); - fprintf ( fMakefile, - "$(REGTESTS_RUN_TARGET): $(REGTESTS_TARGET)\n" ); - fprintf ( fMakefile, - "\t$(cp) $(REGTESTS_TARGET) $(REGTESTS_RUN_TARGET)\n" ); - fprintf ( fMakefile, "\n" ); -} - -void -MingwBackend::GenerateXmlBuildFilesMacro() const -{ - fprintf ( fMakefile, - "XMLBUILDFILES = %s \\\n", - ProjectNode.GetProjectFilename ().c_str () ); - string xmlbuildFilenames; - int numberOfExistingFiles = 0; - struct stat statbuf; - time_t SystemTime, lastWriteTime; - - for ( size_t i = 0; i < ProjectNode.xmlbuildfiles.size (); i++ ) - { - XMLInclude& xmlbuildfile = *ProjectNode.xmlbuildfiles[i]; - if ( !xmlbuildfile.fileExists ) - continue; - numberOfExistingFiles++; - if ( xmlbuildFilenames.length () > 0 ) - xmlbuildFilenames += " "; - - FILE* f = fopen ( xmlbuildfile.topIncludeFilename.c_str (), "rb" ); - if ( !f ) - throw FileNotFoundException ( NormalizeFilename ( xmlbuildfile.topIncludeFilename ) ); - - if ( fstat ( fileno ( f ), &statbuf ) != 0 ) - { - fclose ( f ); - throw AccessDeniedException ( NormalizeFilename ( xmlbuildfile.topIncludeFilename ) ); - } - - lastWriteTime = statbuf.st_mtime; - SystemTime = time(NULL); - - if (SystemTime != -1) - { - if (difftime (lastWriteTime, SystemTime) > 0) - throw InvalidDateException ( NormalizeFilename ( xmlbuildfile.topIncludeFilename ) ); - } - - fclose ( f ); - - xmlbuildFilenames += NormalizeFilename ( xmlbuildfile.topIncludeFilename ); - if ( numberOfExistingFiles % 5 == 4 || i == ProjectNode.xmlbuildfiles.size () - 1 ) - { - fprintf ( fMakefile, - "\t%s", - xmlbuildFilenames.c_str ()); - if ( i == ProjectNode.xmlbuildfiles.size () - 1 ) - { - fprintf ( fMakefile, "\n" ); - } - else - { - fprintf ( fMakefile, - " \\\n" ); - } - xmlbuildFilenames.resize ( 0 ); - } - numberOfExistingFiles++; - } - fprintf ( fMakefile, "\n" ); -} - -void -MingwBackend::GenerateTestSupportCode () -{ - printf ( "Generating test support code..." ); - TestSupportCode testSupportCode ( ProjectNode ); - testSupportCode.GenerateTestSupportCode ( configuration.Verbose ); - printf ( "done\n" ); -} - -void -MingwBackend::GenerateCompilationUnitSupportCode () -{ - if ( configuration.CompilationUnitsEnabled ) - { - printf ( "Generating compilation unit support code..." ); - CompilationUnitSupportCode compilationUnitSupportCode ( ProjectNode ); - compilationUnitSupportCode.Generate ( configuration.Verbose ); - printf ( "done\n" ); - } -} - -void -MingwBackend::GenerateSysSetup () -{ - printf ( "Generating syssetup.inf..." ); - SysSetupGenerator sysSetupGenerator ( ProjectNode ); - sysSetupGenerator.Generate (); - printf ( "done\n" ); -} - -string -MingwBackend::GetProxyMakefileTree () const -{ - if ( configuration.GenerateProxyMakefilesInSourceTree ) - return ""; - else - return Environment::GetOutputPath (); -} - -void -MingwBackend::GenerateProxyMakefiles () -{ - printf ( "Generating proxy makefiles..." ); - ProxyMakefile proxyMakefile ( ProjectNode ); - proxyMakefile.GenerateProxyMakefiles ( configuration.Verbose, - GetProxyMakefileTree () ); - printf ( "done\n" ); -} - -void -MingwBackend::CheckAutomaticDependencies () -{ - if ( configuration.Dependencies == AutomaticDependencies ) - { - printf ( "Checking automatic dependencies..." ); - AutomaticDependency automaticDependency ( ProjectNode ); - automaticDependency.CheckAutomaticDependencies ( configuration.Verbose ); - printf ( "done\n" ); - } -} - -void -MingwBackend::GenerateDirectories () -{ - printf ( "Creating directories..." ); - intermediateDirectory->GenerateTree ( IntermediateDirectory, configuration.Verbose ); - outputDirectory->GenerateTree ( OutputDirectory, configuration.Verbose ); - if ( !configuration.MakeHandlesInstallDirectories ) - installDirectory->GenerateTree ( InstallDirectory, configuration.Verbose ); - printf ( "done\n" ); -} - -bool -MingwBackend::TryToDetectThisCompiler ( const string& compiler ) -{ - string command = ssprintf ( - "%s -v 1>%s 2>%s", - FixSeparatorForSystemCommand(compiler).c_str (), - NUL, - NUL ); - int exitcode = system ( command.c_str () ); - return (bool) (exitcode == 0); -} - -void -MingwBackend::DetectCompiler () -{ - printf ( "Detecting compiler..." ); - - bool detectedCompiler = false; - bool supportedCompiler = false; - string compilerVersion; - - if ( ProjectNode.configuration.Compiler == GnuGcc ) - { - const string& TARGET_CCValue = Environment::GetVariable ( "TARGET_CC" ); - const string& ROS_PREFIXValue = Environment::GetVariable ( "ROS_PREFIX" ); - - if ( TARGET_CCValue.length () > 0 ) - { - compilerPrefix = ""; - compilerCommand = TARGET_CCValue; - detectedCompiler = TryToDetectThisCompiler ( compilerCommand ); - } - - if ( !detectedCompiler ) - { - if ( ROS_PREFIXValue.length () > 0 ) - { - compilerPrefix = ROS_PREFIXValue; - compilerCommand = compilerPrefix + "-gcc"; - detectedCompiler = TryToDetectThisCompiler ( compilerCommand ); - } - } -#if defined(WIN32) - if ( !detectedCompiler ) - { - compilerPrefix = ""; - compilerCommand = "gcc"; - detectedCompiler = TryToDetectThisCompiler ( compilerCommand ); - } -#endif - if ( !detectedCompiler ) - { - compilerPrefix = "mingw32"; - compilerCommand = compilerPrefix + "-gcc"; - detectedCompiler = TryToDetectThisCompiler ( compilerCommand ); - } - - if ( detectedCompiler ) - compilerVersion = GetCompilerVersion ( compilerCommand ); - - supportedCompiler = IsSupportedCompilerVersion ( compilerVersion ); - } - else if ( ProjectNode.configuration.Compiler == MicrosoftC ) - { - compilerCommand = "cl"; - detectedCompiler = DetectMicrosoftCompiler ( compilerVersion, mscPath ); - supportedCompiler = true; // TODO - } - - if ( detectedCompiler ) - { - if ( supportedCompiler ) - printf ( "detected (%s %s)\n", compilerCommand.c_str (), compilerVersion.c_str() ); - else - { - printf ( "detected (%s), but with unsupported version (%s)\n", - compilerCommand.c_str (), - compilerVersion.c_str () ); - throw UnsupportedBuildToolException ( compilerCommand, compilerVersion ); - } - } - else - printf ( "not detected\n" ); - -} - -bool -MingwBackend::TryToDetectThisNetwideAssembler ( const string& assembler ) -{ - string command = ssprintf ( - "%s -h 1>%s 2>%s", - FixSeparatorForSystemCommand(assembler).c_str (), - NUL, - NUL ); - int exitcode = system ( command.c_str () ); - return (bool) (exitcode == 0); -} - -string -MingwBackend::GetVersionString ( const string& versionCommand ) -{ - FILE *fp; - int ch, i; - size_t newline; - char buffer[81]; - - fp = popen ( versionCommand.c_str () , "r" ); - for( i = 0; - ( i < 80 ) && - ( feof ( fp ) == 0 && - ( ( ch = fgetc( fp ) ) != -1 ) ); - i++ ) - { - buffer[i] = (char) ch; - } - buffer[i] = '\0'; - pclose ( fp ); - - char separators[] = " ()\n"; - char *token; - char *prevtoken = NULL; - - string version; - - token = strtok ( buffer, separators ); - while ( token != NULL ) - { - prevtoken = token; - version = string( prevtoken ); - if ( (newline = version.find('\n')) != std::string::npos ) - version.erase(newline, 1); - if ( version.find('.') != std::string::npos ) - break; - token = strtok ( NULL, separators ); - } - return version; -} - -string -MingwBackend::GetNetwideAssemblerVersion ( const string& nasmCommand ) -{ - string versionCommand; - if ( nasmCommand.find("yasm") != std::string::npos ) - { - versionCommand = ssprintf ( "%s --version", - nasmCommand.c_str (), - NUL, - NUL ); - } - else - { - versionCommand = ssprintf ( "%s -v", - nasmCommand.c_str (), - NUL, - NUL ); - } - return GetVersionString( versionCommand ); -} - -string -MingwBackend::GetCompilerVersion ( const string& compilerCommand ) -{ - string versionCommand = ssprintf ( "%s --version", - compilerCommand.c_str (), - NUL, - NUL ); - return GetVersionString( versionCommand ); -} - -string -MingwBackend::GetBinutilsVersion ( const string& binutilsCommand ) -{ - string versionCommand = ssprintf ( "%s -v", - binutilsCommand.c_str (), - NUL, - NUL ); - return GetVersionString( versionCommand ); -} - -bool -MingwBackend::IsSupportedCompilerVersion ( const string& compilerVersion ) -{ - if ( strcmp ( compilerVersion.c_str (), "4.4.0") < 0 ) - return false; - else - return true; -} - -bool -MingwBackend::TryToDetectThisBinutils ( const string& binutils ) -{ - string command = ssprintf ( - "%s -v 1>%s 2>%s", - FixSeparatorForSystemCommand(binutils).c_str (), - NUL, - NUL ); - int exitcode = system ( command.c_str () ); - return (exitcode == 0); -} - -string -MingwBackend::GetBinutilsVersionDate ( const string& binutilsCommand ) -{ - FILE *fp; - int ch, i; - char buffer[81]; - - string versionCommand = ssprintf ( "%s -v", - binutilsCommand.c_str (), - NUL, - NUL ); - fp = popen ( versionCommand.c_str () , "r" ); - for( i = 0; - ( i < 80 ) && - ( feof ( fp ) == 0 && - ( ( ch = fgetc( fp ) ) != -1 ) ); - i++ ) - { - buffer[i] = (char) ch; - } - buffer[i] = '\0'; - pclose ( fp ); - - char separators[] = " "; - char *token; - char *prevtoken = NULL; - - token = strtok ( buffer, separators ); - while ( token != NULL ) - { - prevtoken = token; - token = strtok ( NULL, separators ); - } - string version = string ( prevtoken ); - int lastDigit = version.find_last_not_of ( "\t\r\n" ); - if ( lastDigit != -1 ) - return string ( version, 0, lastDigit+1 ); - else - return version; -} - -bool -MingwBackend::IsSupportedBinutilsVersion ( const string& binutilsVersion ) -{ - int digit = binutilsVersion.find_last_of("."); - if(digit == -1) - { - printf("Unable to detect binutils version!\n"); - return false; - } - - string date = string(binutilsVersion, digit + 1); - if(date.length() == 8) - { - /* This is a real date in the format YYYYMMDD. - Check whether we have at least Binutils 20091016 (the oldest one - we were still using after upgrading to RosBE 1.5). */ - if(strcmp(date.c_str(), "20091016") < 0) - return false; - } - else - { - /* This is no date, so binutilsVersion should just contain the version - number. - Binutils 2.20 will hopefully contain the required features. */ - if(strcmp(binutilsVersion.c_str(), "2.20") < 0) - return false; - } - - return true; -} - -void -MingwBackend::DetectBinutils () -{ - printf ( "Detecting binutils..." ); - - bool detectedBinutils = false; - bool supportedBinutils = false; - string binutilsVersion; - - if ( ProjectNode.configuration.Linker == GnuLd ) - { - const string& ROS_PREFIXValue = Environment::GetVariable ( "ROS_PREFIX" ); - - if ( ROS_PREFIXValue.length () > 0 ) - { - binutilsPrefix = ROS_PREFIXValue; - binutilsCommand = binutilsPrefix + "-ld"; - manualBinutilsSetting = true; - detectedBinutils = true; - } -#if defined(WIN32) - if ( !detectedBinutils ) - { - binutilsPrefix = ""; - binutilsCommand = "ld"; - detectedBinutils = TryToDetectThisBinutils ( binutilsCommand ); - } -#endif - if ( !detectedBinutils ) - { - binutilsPrefix = "mingw32"; - binutilsCommand = binutilsPrefix + "-ld"; - detectedBinutils = TryToDetectThisBinutils ( binutilsCommand ); - } - if ( detectedBinutils ) - { - binutilsVersion = GetBinutilsVersionDate ( binutilsCommand ); - supportedBinutils = IsSupportedBinutilsVersion ( binutilsVersion ); - } - } - else if ( ProjectNode.configuration.Linker == MicrosoftLink ) - { - compilerCommand = "link"; - detectedBinutils = DetectMicrosoftLinker ( binutilsVersion, mslinkPath ); - supportedBinutils = true; // TODO - } - - if ( detectedBinutils ) - { - if ( supportedBinutils ) - printf ( "detected (%s %s)\n", binutilsCommand.c_str (), binutilsVersion.c_str() ); - else - { - printf ( "detected (%s), but with unsupported version (%s)\n", - binutilsCommand.c_str (), - binutilsVersion.c_str () ); - throw UnsupportedBuildToolException ( binutilsCommand, binutilsVersion ); - } - } - else - printf ( "not detected\n" ); - -} - -void -MingwBackend::DetectNetwideAssembler () -{ - printf ( "Detecting netwide assembler..." ); - - nasmCommand = "nasm"; - bool detectedNasm = TryToDetectThisNetwideAssembler ( nasmCommand ); -#if defined(WIN32) - if ( !detectedNasm ) - { - nasmCommand = "nasmw"; - detectedNasm = TryToDetectThisNetwideAssembler ( nasmCommand ); - } -#endif - if ( !detectedNasm ) - { - nasmCommand = "yasm"; - detectedNasm = TryToDetectThisNetwideAssembler ( nasmCommand ); - } - if ( detectedNasm ) - printf ( "detected (%s %s)\n", nasmCommand.c_str (), GetNetwideAssemblerVersion( nasmCommand ).c_str() ); - else - printf ( "not detected\n" ); -} - -void -MingwBackend::DetectPipeSupport () -{ - if ( ProjectNode.configuration.Compiler == GnuGcc ) - { - printf ( "Detecting compiler -pipe support..." ); - - string pipe_detection = "tools" + sSep + "rbuild" + sSep + "backend" + sSep + "mingw" + sSep + "pipe_detection.c"; - string pipe_detectionObjectFilename = ReplaceExtension ( pipe_detection, - ".o" ); - string command = ssprintf ( - "%s -pipe -c %s -o %s 1>%s 2>%s", - FixSeparatorForSystemCommand(compilerCommand).c_str (), - pipe_detection.c_str (), - pipe_detectionObjectFilename.c_str (), - NUL, - NUL ); - int exitcode = system ( command.c_str () ); - FILE* f = fopen ( pipe_detectionObjectFilename.c_str (), "rb" ); - if ( f ) - { - usePipe = (exitcode == 0); - fclose ( f ); - unlink ( pipe_detectionObjectFilename.c_str () ); - } - else - usePipe = false; - - if ( usePipe ) - printf ( "detected\n" ); - else - printf ( "not detected\n" ); - } - else - usePipe = false; -} - -void -MingwBackend::DetectPCHSupport () -{ - printf ( "Detecting compiler pre-compiled header support..." ); - - if ( configuration.PrecompiledHeadersEnabled && ProjectNode.configuration.Compiler == GnuGcc ) - { - string path = "tools" + sSep + "rbuild" + sSep + "backend" + sSep + "mingw" + sSep + "pch_detection.h"; - string cmd = ssprintf ( - "%s -c %s 1>%s 2>%s", - FixSeparatorForSystemCommand(compilerCommand).c_str (), - path.c_str (), - NUL, - NUL ); - system ( cmd.c_str () ); - path += ".gch"; - - FILE* f = fopen ( path.c_str (), "rb" ); - if ( f ) - { - use_pch = true; - fclose ( f ); - unlink ( path.c_str () ); - } - else - use_pch = false; - - if ( use_pch ) - printf ( "detected\n" ); - else - printf ( "not detected\n" ); - } - else - { - use_pch = false; - printf ( "disabled\n" ); - } -} - -void -MingwBackend::GetNonModuleInstallTargetFiles ( - vector& out ) const -{ - for ( size_t i = 0; i < ProjectNode.installfiles.size (); i++ ) - { - const InstallFile& installfile = *ProjectNode.installfiles[i]; - out.push_back ( *installfile.target ); - } -} - -void -MingwBackend::GetModuleInstallTargetFiles ( - vector& out ) const -{ - for ( std::map::const_iterator p = ProjectNode.modules.begin (); p != ProjectNode.modules.end (); ++ p ) - { - const Module& module = *p->second; - if ( !module.enabled ) - continue; - if ( module.install ) - out.push_back ( *module.install ); - } -} - -void -MingwBackend::GetInstallTargetFiles ( - vector& out ) const -{ - GetNonModuleInstallTargetFiles ( out ); - GetModuleInstallTargetFiles ( out ); -} - -void -MingwBackend::OutputInstallTarget ( const FileLocation& source, - const FileLocation& target ) -{ - fprintf ( fMakefile, - "%s: %s | %s\n", - GetFullName ( target ).c_str (), - GetFullName ( source ).c_str (), - GetFullPath ( target ).c_str () ); - fprintf ( fMakefile, - "\t$(ECHO_CP)\n" ); - fprintf ( fMakefile, - "\t${cp} %s %s 1>$(NUL)\n", - GetFullName ( source ).c_str (), - GetFullName ( target ).c_str () ); -} - -void -MingwBackend::OutputNonModuleInstallTargets () -{ - for ( size_t i = 0; i < ProjectNode.installfiles.size (); i++ ) - { - const InstallFile& installfile = *ProjectNode.installfiles[i]; - OutputInstallTarget ( *installfile.source, *installfile.target ); - } -} - -const Module& -MingwBackend::GetAliasedModuleOrModule ( const Module& module ) const -{ - if ( module.aliasedModuleName.size () > 0 ) - { - const Module* aliasedModule = ProjectNode.LocateModule ( module.aliasedModuleName ); - assert ( aliasedModule ); - return *aliasedModule; - } - else - return module; -} - -void -MingwBackend::OutputModuleInstallTargets () -{ - for ( std::map::const_iterator p = ProjectNode.modules.begin (); p != ProjectNode.modules.end (); ++ p ) - { - const Module& module = *p->second; - if ( !module.enabled ) - continue; - if ( module.install ) - { - const Module& aliasedModule = GetAliasedModuleOrModule ( module ); - OutputInstallTarget ( *aliasedModule.output, *module.install ); - } - } -} - -string -MingwBackend::GetRegistrySourceFiles () const -{ - return "boot" + sSep + "bootdata" + sSep + "hivecls_$(ARCH).inf " - "boot" + sSep + "bootdata" + sSep + "hivedef_$(ARCH).inf " - "boot" + sSep + "bootdata" + sSep + "hivesft_$(ARCH).inf " - "boot" + sSep + "bootdata" + sSep + "hivesys_$(ARCH).inf " - "boot" + sSep + "bootdata" + sSep + "hiveinst_$(ARCH).inf "; -} - -string -MingwBackend::GetRegistryTargetFiles () const -{ - string system32ConfigDirectory = "system32" + sSep + "config"; - FileLocation system32 ( InstallDirectory, system32ConfigDirectory, "" ); - - vector registry_files; - registry_files.push_back ( FileLocation ( InstallDirectory, system32ConfigDirectory, "default" ) ); - registry_files.push_back ( FileLocation ( InstallDirectory, system32ConfigDirectory, "sam" ) ); - registry_files.push_back ( FileLocation ( InstallDirectory, system32ConfigDirectory, "security" ) ); - registry_files.push_back ( FileLocation ( InstallDirectory, system32ConfigDirectory, "software" ) ); - registry_files.push_back ( FileLocation ( InstallDirectory, system32ConfigDirectory, "system" ) ); - - return v2s( registry_files, 6, true ); -} - -void -MingwBackend::OutputRegistryInstallTarget () -{ - FileLocation system32 ( InstallDirectory, "system32" + sSep + "config", "" ); - - string registrySourceFiles = GetRegistrySourceFiles (); - string registryTargetFiles = GetRegistryTargetFiles (); - fprintf ( fMakefile, - "install_registry: %s\n", - registryTargetFiles.c_str () ); - fprintf ( fMakefile, - "%s: %s %s $(mkhive_TARGET)\n", - registryTargetFiles.c_str (), - registrySourceFiles.c_str (), - GetFullPath ( system32 ).c_str () ); - fprintf ( fMakefile, - "\t$(ECHO_MKHIVE)\n" ); - fprintf ( fMakefile, - "\t$(mkhive_TARGET) %s %s\n", - GetFullPath ( system32 ).c_str (), - registrySourceFiles.c_str() ); - fprintf ( fMakefile, - "\n" ); -} - -void -MingwBackend::GenerateInstallTarget () -{ - vector vInstallTargetFiles; - GetInstallTargetFiles ( vInstallTargetFiles ); - string installTargetFiles = v2s ( vInstallTargetFiles, 5, true ); - string registryTargetFiles = GetRegistryTargetFiles (); - - fprintf ( fMakefile, - "install: %s %s\n", - installTargetFiles.c_str (), - registryTargetFiles.c_str () ); - OutputNonModuleInstallTargets (); - OutputModuleInstallTargets (); - OutputRegistryInstallTarget (); - fprintf ( fMakefile, - "\n" ); -} - -void -MingwBackend::GetModuleTestTargets ( - vector& out ) const -{ - for ( std::map::const_iterator p = ProjectNode.modules.begin (); p != ProjectNode.modules.end (); ++ p ) - { - const Module& module = *p->second; - if ( !module.enabled ) - continue; - if ( module.type == Test ) - out.push_back ( module.name ); - } -} - -void -MingwBackend::GenerateTestTarget () -{ - vector vTestTargets; - GetModuleTestTargets ( vTestTargets ); - string testTargets = v2s ( vTestTargets, 5 ); - - fprintf ( fMakefile, - "test: %s\n", - testTargets.c_str () ); - fprintf ( fMakefile, - "\n" ); -} - -void -MingwBackend::GenerateDirectoryTargets () -{ - intermediateDirectory->CreateRule ( fMakefile, "$(INTERMEDIATE)" ); - outputDirectory->CreateRule ( fMakefile, "$(OUTPUT)" ); - installDirectory->CreateRule ( fMakefile, "$(INSTALL)" ); -} diff --git a/reactos/tools/rbuild/backend/mingw/mingw.h b/reactos/tools/rbuild/backend/mingw/mingw.h deleted file mode 100644 index cd3fecf7c6f..00000000000 --- a/reactos/tools/rbuild/backend/mingw/mingw.h +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 - -#include "../backend.h" - -#ifdef WIN32 - #define NUL "NUL" -#else - #define NUL "/dev/null" -#endif - -class Directory; -class MingwModuleHandler; - - -class MingwBackend : public Backend -{ -public: - MingwBackend ( Project& project, - Configuration& configuration ); - ~MingwBackend (); - virtual void Process (); - std::string AddDirectoryTarget ( const std::string& directory, - Directory* directoryTree ); - const Module& GetAliasedModuleOrModule ( const Module& module ) const; - bool compilerNeedsHelper; - std::string compilerPrefix; - std::string compilerCommand; - std::string nasmCommand; - std::string binutilsPrefix; - bool binutilsNeedsHelper; - std::string binutilsCommand; - bool usePipe, manualBinutilsSetting; - Directory* intermediateDirectory; - Directory* outputDirectory; - Directory* installDirectory; - - std::string GetFullName ( const FileLocation& file ) const; - std::string GetFullPath ( const FileLocation& file ) const; - std::string GetFullNamePrefixSpaces ( const FileLocation& file ) const; - std::string GetRegistrySourceFiles () const; - std::string GetRegistryTargetFiles () const; - std::string v2s ( const std::vector& files, int wrap_at, bool prefixSpaces = false ) const; - std::string v2s ( const string_list& v, int wrap_at ) const; - -private: - void CreateMakefile (); - void CloseMakefile () const; - void GenerateHeader () const; - void GenerateGlobalProperties ( const char* assignmentOperation, - const IfableData& data ) const; - std::string GenerateProjectLDFLAGS () const; - void GenerateDirectories (); - void GenerateGlobalVariables () const; - bool IncludeInAllTarget ( const Module& module ) const; - void GenerateAllTarget ( const std::vector& handlers ) const; - void GenerateRegTestsRunTarget () const; - void GenerateXmlBuildFilesMacro() const; - void GenerateTestSupportCode (); - void GenerateCompilationUnitSupportCode (); - void GenerateSysSetup (); - std::string GetProxyMakefileTree () const; - void GenerateProxyMakefiles (); - void CheckAutomaticDependencies (); - bool TryToDetectThisCompiler ( const std::string& compiler ); - void DetectCompiler (); - std::string GetCompilerVersion ( const std::string& compilerCommand ); - bool IsSupportedCompilerVersion ( const std::string& compilerVersion ); - bool TryToDetectThisNetwideAssembler ( const std::string& assembler ); - bool TryToDetectThisBinutils ( const std::string& binutils ); - std::string GetBinutilsVersion ( const std::string& binutilsCommand ); - std::string GetBinutilsVersionDate ( const std::string& binutilsCommand ); - bool IsSupportedBinutilsVersion ( const std::string& binutilsVersion ); - std::string GetVersionString ( const std::string& versionCommand ); - std::string GetNetwideAssemblerVersion ( const std::string& nasmCommand ); - void DetectBinutils (); - void DetectNetwideAssembler (); - void DetectPipeSupport (); - void DetectPCHSupport (); - bool CanEnablePreCompiledHeaderSupportForModule ( const Module& module ); - void ProcessModules (); - void CheckAutomaticDependenciesForModuleOnly (); - void ProcessNormal (); - std::string GetNonModuleInstallDirectories ( const std::string& installDirectory ); - std::string GetInstallDirectories ( const std::string& installDirectory ); - void GetNonModuleInstallFiles ( std::vector& out ) const; - void GetInstallFiles ( std::vector& out ) const; - void GetNonModuleInstallTargetFiles ( std::vector& out ) const; - void GetModuleInstallTargetFiles ( std::vector& out ) const; - void GetInstallTargetFiles ( std::vector& out ) const; - void OutputInstallTarget ( const FileLocation& source, const FileLocation& target ); - void OutputNonModuleInstallTargets (); - void OutputModuleInstallTargets (); - void OutputRegistryInstallTarget (); - void GenerateInstallTarget (); - void GetModuleTestTargets ( std::vector& out ) const; - void GenerateTestTarget (); - void GenerateDirectoryTargets (); - FILE* fMakefile; - bool use_pch; - bool DetectMicrosoftCompiler ( std::string& version, std::string& path ); - bool DetectMicrosoftLinker ( std::string& version, std::string& path ); -}; - - -class ProxyMakefile -{ -public: - ProxyMakefile ( const Project& project ); - ~ProxyMakefile (); - void GenerateProxyMakefiles ( bool verbose, - std::string outputTree ); - static bool GenerateProxyMakefile ( const Module& module ); - -private: - std::string GeneratePathToParentDirectory ( int numberOfParentDirectories ); - std::string GetPathToTopDirectory ( Module& module ); - void GenerateProxyMakefileForModule ( Module& module, - bool verbose, - std::string outputTree ); - const Project& project; -}; - -struct ModuleHandlerInformations -{ - HostType DefaultHost; - const char* cflags; - const char* nasmflags; - const char* linkerflags; -}; - -extern const struct ModuleHandlerInformations ModuleHandlerInformations[]; diff --git a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp deleted file mode 100644 index ff6c993b0d4..00000000000 --- a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp +++ /dev/null @@ -1,3185 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * 2007-2008 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. - */ -#include "../../pch.h" -#include -#include - -#include "../../rbuild.h" -#include "mingw.h" -#include "modulehandler.h" -#include "rule.h" - -using std::set; -using std::string; -using std::vector; - -#define CLEAN_FILE(f) clean_files.push_back ( (f).name.length () > 0 ? backend->GetFullName ( f ) : backend->GetFullPath ( f ) ); -#define IsStaticLibrary( module ) ( ( module.type == StaticLibrary ) || ( module.type == HostStaticLibrary ) ) - -MingwBackend* -MingwModuleHandler::backend = NULL; -FILE* -MingwModuleHandler::fMakefile = NULL; - -string -PrefixFilename ( - const string& filename, - const string& prefix ) -{ - if ( !prefix.length() ) - return filename; - string out; - const char* pfilename = filename.c_str(); - const char* p1 = strrchr ( pfilename, '/' ); - const char* p2 = strrchr ( pfilename, '\\' ); - if ( p1 || p2 ) - { - if ( p2 > p1 ) - p1 = p2; - out += string(pfilename,p1-pfilename) + cSep; - pfilename = p1 + 1; - } - out += prefix + pfilename; - return out; -} - -string -GetTargetMacro ( const Module& module, bool with_dollar ) -{ - string s ( module.name ); - s += "_TARGET"; - if ( with_dollar ) - return ssprintf ( "$(%s)", s.c_str() ); - return s; -} - -MingwModuleHandler::MingwModuleHandler ( - const Module& module_ ) - - : module(module_) -{ - use_pch = false; -} - -MingwModuleHandler::~MingwModuleHandler() -{ -} - -/*static*/ void -MingwModuleHandler::SetBackend ( MingwBackend* backend_ ) -{ - backend = backend_; -} - -/*static*/ void -MingwModuleHandler::SetMakefile ( FILE* f ) -{ - fMakefile = f; -} - -void -MingwModuleHandler::EnablePreCompiledHeaderSupport () -{ - use_pch = true; -} - -/*static*/ const FileLocation* -MingwModuleHandler::PassThruCacheDirectory (const FileLocation* file ) -{ - switch ( file->directory ) - { - case SourceDirectory: - break; - case IntermediateDirectory: - backend->AddDirectoryTarget ( file->relative_path, backend->intermediateDirectory ); - break; - case OutputDirectory: - backend->AddDirectoryTarget ( file->relative_path, backend->outputDirectory ); - break; - case InstallDirectory: - backend->AddDirectoryTarget ( file->relative_path, backend->installDirectory ); - break; - default: - throw InvalidOperationException ( __FILE__, - __LINE__, - "Invalid directory %d.", - file->directory ); - } - - return file; -} - -/* caller needs to delete the returned object */ -const FileLocation* -MingwModuleHandler::GetTargetFilename ( - const Module& module, - string_list* pclean_files ) -{ - FileLocation *target = new FileLocation ( *module.output ); - if ( pclean_files ) - { - string_list& clean_files = *pclean_files; - CLEAN_FILE ( *target ); - } - return target; -} - -/* caller needs to delete the returned object */ -const FileLocation* -MingwModuleHandler::GetImportLibraryFilename ( - const Module& module, - string_list* pclean_files, - bool delayimp ) -{ - FileLocation *target; - - if (module.HasImportLibrary()) - { - if (delayimp) - { - target = new FileLocation ( *module.delayImportLibrary->target ); - } - else - target = new FileLocation ( *module.importLibrary->target ); - } - else - target = new FileLocation ( *module.dependency ); - - if ( pclean_files ) - { - string_list& clean_files = *pclean_files; - CLEAN_FILE ( *target ); - } - return target; -} - -/* caller needs to delete the returned object */ -MingwModuleHandler* -MingwModuleHandler::InstanciateHandler ( - const Module& module, - MingwBackend* backend ) -{ - MingwModuleHandler* handler; - switch ( module.type ) - { - case StaticLibrary: - case HostStaticLibrary: - case ObjectLibrary: - case RpcServer: - case RpcClient: - case RpcProxy: - case MessageHeader: - case IdlHeader: - case IdlInterface: - case EmbeddedTypeLib: - case BootSector: - handler = new MingwModuleHandler( module ); - break; - case BuildTool: - handler = new MingwBuildToolModuleHandler ( module ); - break; - case Kernel: - handler = new MingwKernelModuleHandler ( module ); - break; - case NativeCUI: - handler = new MingwNativeCUIModuleHandler ( module ); - break; - case Win32CUI: - handler = new MingwWin32CUIModuleHandler ( module ); - break; - case Win32SCR: - case Win32GUI: - handler = new MingwWin32GUIModuleHandler ( module ); - break; - case KeyboardLayout: - case KernelModeDLL: - case KernelModeDriver: - handler = new MingwKernelModeDLLModuleHandler ( module ); - break; - case NativeDLL: - handler = new MingwNativeDLLModuleHandler ( module ); - break; - case Win32DLL: - handler = new MingwWin32DLLModuleHandler ( module ); - break; - case Win32OCX: - handler = new MingwWin32OCXModuleHandler ( module ); - break; - case BootLoader: - handler = new MingwBootLoaderModuleHandler ( module ); - break; - case BootProgram: - handler = new MingwBootProgramModuleHandler ( module ); - break; - case Iso: - handler = new MingwIsoModuleHandler ( module ); - break; - case LiveIso: - handler = new MingwLiveIsoModuleHandler ( module ); - break; - case Test: - handler = new MingwTestModuleHandler ( module ); - break; - case Alias: - handler = new MingwAliasModuleHandler ( module ); - break; - case Cabinet: - handler = new MingwCabinetModuleHandler ( module ); - break; - case ElfExecutable: - handler = new MingwElfExecutableModuleHandler ( module ); - break; - default: - throw UnknownModuleTypeException ( - module.node.location, - module.type ); - break; - } - return handler; -} - -string -MingwModuleHandler::GetWorkingDirectory () const -{ - return "."; -} - -string -MingwModuleHandler::GetBasename ( const string& filename ) const -{ - size_t index = filename.find_last_of ( '.' ); - if ( index != string::npos ) - return filename.substr ( 0, index ); - return ""; -} - -string -MingwModuleHandler::GetCompilationUnitDependencies ( - const CompilationUnit& compilationUnit ) const -{ - if ( compilationUnit.GetFiles ().size () <= 1 ) - return ""; - vector sourceFiles; - for ( size_t i = 0; i < compilationUnit.GetFiles ().size (); i++ ) - { - const File& file = *compilationUnit.GetFiles ()[i]; - sourceFiles.push_back ( backend->GetFullName ( file.file ) ); - } - return string ( " " ) + backend->v2s ( sourceFiles, 10 ); -} - -/* caller needs to delete the returned object */ -const FileLocation* -MingwModuleHandler::GetModuleArchiveFilename () const -{ - if ( IsStaticLibrary ( module ) ) - return GetTargetFilename ( module, NULL ); - return NULL; -} - -/*static*/ bool -MingwModuleHandler::ReferenceObjects ( - const Module& module ) -{ - if ( module.type == ObjectLibrary ) - return true; - if ( module.type == RpcServer ) - return true; - if ( module.type == RpcClient ) - return true; - if ( module.type == RpcProxy ) - return true; - if ( module.type == IdlHeader ) - return true; - if ( module.type == IdlInterface ) - return true; - if ( module.type == MessageHeader) - return true; - return false; -} - -void -MingwModuleHandler::OutputCopyCommand ( const FileLocation& source, - const FileLocation& destination ) -{ - fprintf ( fMakefile, "# OUTPUT COPY COMMAND\n" ); - fprintf ( fMakefile, - "\t$(ECHO_CP)\n" ); - fprintf ( fMakefile, - "\t${cp} \"%s\" \"%s\" 1>$(NUL)\n", - backend->GetFullName ( source ).c_str (), - backend->GetFullName ( *PassThruCacheDirectory ( &destination ) ).c_str () ); -} - -void -MingwModuleHandler::OutputCopyCommandSingle ( const FileLocation& source, - const FileLocation& destination ) -{ - fprintf ( fMakefile, - "%s : %s\n", - backend->GetFullNamePrefixSpaces ( *PassThruCacheDirectory ( &destination ) ).c_str (), - backend->GetFullNamePrefixSpaces ( source ).c_str () ); - fprintf ( fMakefile, - "\t$(ECHO_CP)\n" ); - fprintf ( fMakefile, - "\t${cp} \"%s\" \"%s\" 1>$(NUL)\n", - backend->GetFullName ( source ).c_str (), - backend->GetFullName ( *PassThruCacheDirectory ( &destination ) ).c_str () ); -} - -string -MingwModuleHandler::GetImportLibraryDependency ( - const Module& importedModule, - bool delayimp ) -{ - string dep; - if ( ReferenceObjects ( importedModule ) ) - { - const vector& compilationUnits = importedModule.non_if_data.compilationUnits; - size_t i; - - dep = GetTargetMacro ( importedModule ); - for ( i = 0; i < compilationUnits.size (); i++ ) - { - CompilationUnit& compilationUnit = *compilationUnits[i]; - const FileLocation& compilationName = compilationUnit.GetFilename (); - const FileLocation *objectFilename = GetObjectFilename ( &compilationName, importedModule ); - if ( GetExtension ( *objectFilename ) == ".h" ) - dep += ssprintf ( " $(%s_HEADERS)", importedModule.name.c_str () ); - else if ( GetExtension ( *objectFilename ) == ".rc" ) - dep += ssprintf ( " $(%s_MCHEADERS)", importedModule.name.c_str () ); - delete objectFilename; - } - } - else - { - const FileLocation *library_target = GetImportLibraryFilename ( importedModule, NULL, delayimp ); - dep = backend->GetFullName ( *library_target ); - delete library_target; - } - - if ( IsStaticLibrary ( importedModule ) || importedModule.type == ObjectLibrary ) - { - const std::vector& libraries = importedModule.non_if_data.libraries; - - for ( size_t i = 0; i < libraries.size (); ++ i ) - { - dep += " "; - dep += GetImportLibraryDependency ( *libraries[i]->importedModule, libraries[i]->delayimp ); - } - } - - return dep; -} - -void -MingwModuleHandler::GetTargets ( const Module& dependencyModule, - string_list& targets ) -{ - if ( dependencyModule.invocations.size () > 0 ) - { - for ( size_t i = 0; i < dependencyModule.invocations.size (); i++ ) - { - Invoke& invoke = *dependencyModule.invocations[i]; - invoke.GetTargets ( targets ); - } - } - else - targets.push_back ( GetImportLibraryDependency ( dependencyModule, false ) ); -} - -void -MingwModuleHandler::GetModuleDependencies ( - string_list& dependencies ) -{ - size_t iend = module.dependencies.size (); - - if ( iend == 0 ) - return; - - for ( size_t i = 0; i < iend; i++ ) - { - const Dependency& dependency = *module.dependencies[i]; - const Module& dependencyModule = *dependency.dependencyModule; - GetTargets ( dependencyModule, - dependencies ); - } - vector v; - GetDefinitionDependencies ( v ); - - for ( size_t i = 0; i < v.size (); i++ ) - { - const FileLocation& file = v[i]; - dependencies.push_back ( backend->GetFullName ( file ) ); - } -} - -/* caller needs to delete the returned object */ -const FileLocation* -MingwModuleHandler::GetObjectFilename ( - const FileLocation* sourceFile, - const Module& module ) const -{ - DirectoryLocation destination_directory; - string newExtension; - string extension = GetExtension ( *sourceFile ); - - if ( module.type == BootSector ) - return new FileLocation ( *module.output ); - else if (extension == ".rc") - newExtension = "_" + module.name + ".coff"; - else if (extension == ".mc") - newExtension = ".rc"; - else if (extension == ".idl") - { - if ( module.type == RpcServer ) - newExtension = "_s.o"; - else if ( module.type == RpcClient ) - newExtension = "_c.o"; - else if ( module.type == RpcProxy ) - newExtension = "_p.o"; - else if ( module.type == IdlInterface ) - newExtension = "_i.o"; - else - newExtension = ".h"; - } - else - newExtension = "_" + module.name + ".o"; - - if ( module.type == BootSector ) - destination_directory = OutputDirectory; - else - destination_directory = IntermediateDirectory; - - const FileLocation *obj_file = new FileLocation( - destination_directory, - sourceFile->relative_path, - ReplaceExtension ( sourceFile->name, newExtension ) ); - PassThruCacheDirectory ( obj_file ); - - return obj_file; -} - -string -MingwModuleHandler::GetModuleCleanTarget ( const Module& module ) const -{ - return module.name + "_clean"; -} - -void -MingwModuleHandler::GetReferencedObjectLibraryModuleCleanTargets ( vector& moduleNames ) const -{ - for ( size_t i = 0; i < module.non_if_data.libraries.size (); i++ ) - { - Library& library = *module.non_if_data.libraries[i]; - if ( library.importedModule->type == ObjectLibrary ) - moduleNames.push_back ( GetModuleCleanTarget ( *library.importedModule ) ); - } -} - -void -MingwModuleHandler::GenerateCleanTarget () const -{ - if ( module.type == Alias ) - return; - - fprintf ( fMakefile, "# CLEAN TARGET\n" ); - fprintf ( fMakefile, - ".PHONY: %s_clean\n", - module.name.c_str() ); - vector referencedModuleNames; - GetReferencedObjectLibraryModuleCleanTargets ( referencedModuleNames ); - fprintf ( fMakefile, - "%s: %s\n\t-@${rm}", - GetModuleCleanTarget ( module ).c_str(), - backend->v2s ( referencedModuleNames, 10 ).c_str () ); - for ( size_t i = 0; i < clean_files.size(); i++ ) - { - if ( ( i + 1 ) % 10 == 9 ) - fprintf ( fMakefile, " 2>$(NUL)\n\t-@${rm}" ); - fprintf ( fMakefile, " %s", clean_files[i].c_str() ); - } - fprintf ( fMakefile, " 2>$(NUL)\n" ); - - // Clean files generated by external rules - fprintf ( fMakefile, "\t-@${rm} $(%s_CLEANFILES) 2>$(NUL)\n", module.name.c_str() ); - - if( ProxyMakefile::GenerateProxyMakefile(module) ) - { - DirectoryLocation root; - - if ( backend->configuration.GenerateProxyMakefilesInSourceTree ) - root = SourceDirectory; - else - root = OutputDirectory; - - FileLocation proxyMakefile ( root, - module.output->relative_path, - "GNUmakefile" ); - fprintf ( fMakefile, "\t-@${rm} %s 2>$(NUL)\n", - backend->GetFullName ( proxyMakefile ).c_str () ); - } - - fprintf ( fMakefile, "clean: %s_clean\n\n", module.name.c_str() ); -} - -void -MingwModuleHandler::GenerateInstallTarget () const -{ - if ( !module.install ) - return; - fprintf ( fMakefile, "# INSTALL TARGET\n" ); - fprintf ( fMakefile, ".PHONY: %s_install\n", module.name.c_str() ); - fprintf ( fMakefile, - "%s_install: %s\n", - module.name.c_str (), - backend->GetFullName ( *module.install ).c_str () ); -} - -void -MingwModuleHandler::GenerateDependsTarget () const -{ - fprintf ( fMakefile, "# DEPENDS TARGET\n" ); - fprintf ( fMakefile, - ".PHONY: %s_depends\n", - module.name.c_str() ); - fprintf ( fMakefile, - "%s_depends: $(RBUILD_TARGET)\n", - module.name.c_str () ); - fprintf ( fMakefile, - "\t$(ECHO_RBUILD)\n" ); - fprintf ( fMakefile, - "\t$(Q)$(RBUILD_TARGET) $(RBUILD_FLAGS) -dm%s mingw\n", - module.name.c_str () ); -} - -static -const char * const CompilerPrefixTable [ CompilerTypesCount ] = -{ - "C", - "CXX", - "CPP", - "AS", - "MIDL", - "RC", - "NASM", -}; - -/* static */ void -MingwModuleHandler::GenerateParameters ( - const char* prefix, - const char* assignmentOperation, - const IfableData& data ) -{ - for ( unsigned type = CompilerTypeCC; type < CompilerTypesCount; ++ type ) - { - CompilerType compiler = static_cast < CompilerType > ( type ); - - // Includes - std::string includes = GenerateIncludeParametersFromVector ( data.includes, compiler ); - - if ( includes.size() ) - { - fprintf ( fMakefile, - "%s_%sINCLUDES%s%s\n", - prefix, - CompilerPrefixTable [ compiler ], - assignmentOperation, - includes.c_str () ); - } - - // Defines - std::string defines = GenerateDefineParametersFromVector ( data.defines, compiler ); - - if ( defines.size() ) - { - fprintf ( fMakefile, - "%s_%sDEFINES%s%s\n", - prefix, - CompilerPrefixTable [ compiler ], - assignmentOperation, - defines.c_str () ); - } - - // Flags - std::string flags = GenerateCompilerParametersFromVector ( data.compilerFlags, compiler ); - - if ( flags.size() ) - { - fprintf ( fMakefile, - "%s_%sFLAGS%s%s\n", - prefix, - CompilerPrefixTable [ compiler ], - assignmentOperation, - flags.c_str () ); - } - } -} - -/* static */ string -MingwModuleHandler::GenerateGccDefineParametersFromVector ( - const vector& defines, - set& used_defs) -{ - string parameters; - - for ( size_t i = 0; i < defines.size (); i++ ) - { - Define& define = *defines[i]; - if (used_defs.find(define.name) != used_defs.end()) - continue; - if (define.redefine) - { - if (parameters.length () > 0) - parameters += " "; - parameters += "-U"; - parameters += define.name; - } - if (parameters.length () > 0) - parameters += " "; - if (define.arguments.length ()) - parameters += "$(QT)"; - parameters += "-D"; - parameters += define.name; - parameters += define.arguments; - if (define.value.length () > 0) - { - parameters += "="; - parameters += define.value; - } - if (define.arguments.length ()) - parameters += "$(QT)"; - used_defs.insert(used_defs.begin(),define.name); - } - return parameters; -} - -/* static */ string -MingwModuleHandler::GenerateDefineParametersFromVector ( - const std::vector& defines, - CompilerType compiler ) -{ - string parameters; - - for ( size_t i = 0; i < defines.size (); i++ ) - { - Define& define = *defines[i]; - if (!define.IsCompilerSet (compiler)) - continue; - if (define.redefine) - { - if (parameters.length () > 0) - parameters += " "; - parameters += "-U"; - parameters += define.name; - } - if (parameters.length () > 0) - parameters += " "; - if (define.arguments.length ()) - parameters += "$(QT)"; - parameters += "-D"; - parameters += define.name; - parameters += define.arguments; - if (define.value.length () > 0) - { - parameters += "="; - parameters += define.value; - } - if (define.arguments.length ()) - parameters += "$(QT)"; - } - return parameters; -} - -string -MingwModuleHandler::ConcatenatePaths ( - const string& path1, - const string& path2 ) const -{ - if ( ( path1.length () == 0 ) || ( path1 == "." ) || ( path1 == "./" ) ) - return path2; - if ( path1[path1.length ()] == cSep ) - return path1 + path2; - else - return path1 + cSep + path2; -} - -/* static */ string -MingwModuleHandler::GenerateIncludeParametersFromVector ( const vector& includes, const CompilerType type ) -{ - string parameters, path_prefix; - for ( size_t i = 0; i < includes.size (); i++ ) - { - Include& include = *includes[i]; - if ( include.IsCompilerSet( type ) ) - parameters += " -I" + backend->GetFullPath ( *include.directory ); - } - return parameters; -} - -/* static */ string -MingwModuleHandler::GenerateCompilerParametersFromVector ( const vector& compilerFlags, const CompilerType type ) -{ - string parameters; - for ( size_t i = 0; i < compilerFlags.size (); i++ ) - { - CompilerFlag& compilerFlag = *compilerFlags[i]; - if ( compilerFlag.IsCompilerSet( type ) ) - parameters += " " + compilerFlag.flag; - } - return parameters; -} - -string -MingwModuleHandler::GenerateLinkerParametersFromVector ( const vector& linkerFlags ) const -{ - string parameters; - for ( size_t i = 0; i < linkerFlags.size (); i++ ) - { - LinkerFlag& linkerFlag = *linkerFlags[i]; - if ( parameters.length () > 0 ) - parameters += " "; - parameters += linkerFlag.flag; - } - return parameters; -} - -string -MingwModuleHandler::GenerateImportLibraryDependenciesFromVector ( - const vector& libraries ) -{ - string dependencies ( "" ); - int wrap_count = 0; - for ( size_t i = 0; i < libraries.size (); i++ ) - { - if ( wrap_count++ == 5 ) - dependencies += " \\\n\t\t", wrap_count = 0; - else if ( dependencies.size () > 0 ) - dependencies += " "; - dependencies += GetImportLibraryDependency ( *libraries[i]->importedModule, libraries[i]->delayimp ); - } - return dependencies; -} - -string -MingwModuleHandler::GenerateLinkerParameters () const -{ - return GenerateLinkerParametersFromVector ( module.linkerFlags ); -} - -void -MingwModuleHandler::GenerateMacros ( - const char* assignmentOperation, - const IfableData& data, - const vector* linkerFlags, - set& used_defs ) -{ - if ( linkerFlags != NULL ) - { - string linkerParameters = GenerateLinkerParametersFromVector ( *linkerFlags ); - if ( linkerParameters.size () > 0 ) - { - fprintf ( - fMakefile, - "%s %s %s\n", - linkerflagsMacro.c_str (), - assignmentOperation, - linkerParameters.c_str() ); - } - } - - if ( data.libraries.size () > 0 ) - { - // Check if host and target modules are not mixed up - HostType current = ModuleHandlerInformations[module.type].DefaultHost; - std::vector::const_iterator it; - for ( it = data.libraries.begin(); it != data.libraries.end(); ++it ) - { - HostType imported = ModuleHandlerInformations[(*it)->importedModule->type].DefaultHost; - if (current != imported) - { - throw InvalidOperationException ( __FILE__, - __LINE__, - "Module '%s' imports module '%s', which is not of the right type", - module.name.c_str (), - (*it)->importedModule->name.c_str () ); - } - } - - string deps = GenerateImportLibraryDependenciesFromVector ( data.libraries ); - if ( deps.size () > 0 ) - { - fprintf ( - fMakefile, - "%s %s %s\n", - libsMacro.c_str(), - assignmentOperation, - deps.c_str() ); - } - } -} - -void -MingwModuleHandler::CleanupCompilationUnitVector ( vector& compilationUnits ) -{ - for ( size_t i = 0; i < compilationUnits.size (); i++ ) - delete compilationUnits[i]; -} - -void -MingwModuleHandler::GetModuleSpecificCompilationUnits ( vector& compilationUnits ) -{ -} - -void -MingwModuleHandler::GenerateSourceMacros ( - const IfableData& data ) -{ - size_t i; - - const vector& compilationUnits = data.compilationUnits; - vector headers; - if ( compilationUnits.size () > 0 ) - { - fprintf ( - fMakefile, - "%s =", - sourcesMacro.c_str () ); - for ( i = 0; i < compilationUnits.size(); i++ ) - { - CompilationUnit& compilationUnit = *compilationUnits[i]; - const FileLocation& compilationName = compilationUnit.GetFilename (); - fprintf ( - fMakefile, - "%s%s", - ( i%10 == 9 ? " \\\n\t" : " " ), - backend->GetFullName ( compilationName ).c_str () ); - } - fprintf ( fMakefile, "\n" ); - } - - vector sourceCompilationUnits; - GetModuleSpecificCompilationUnits ( sourceCompilationUnits ); - for ( i = 0; i < sourceCompilationUnits.size (); i++ ) - { - const FileLocation& compilationName = sourceCompilationUnits[i]->GetFilename (); - fprintf ( - fMakefile, - "%s += %s\n", - sourcesMacro.c_str(), - backend->GetFullName ( compilationName ).c_str () ); - } - CleanupCompilationUnitVector ( sourceCompilationUnits ); -} - -void -MingwModuleHandler::GenerateObjectMacros ( - const IfableData& data ) -{ - size_t i; - const char* assignmentOperation = "="; - - const vector& compilationUnits = data.compilationUnits; - vector headers; - vector mcheaders; - vector mcresources; - if ( compilationUnits.size () > 0 ) - { - for ( i = 0; i < compilationUnits.size (); i++ ) - { - CompilationUnit& compilationUnit = *compilationUnits[i]; - if ( compilationUnit.IsFirstFile () ) - { - const FileLocation& compilationName = compilationUnit.GetFilename (); - const FileLocation *object_file = GetObjectFilename ( &compilationName, module ); - fprintf ( fMakefile, - "%s := %s\n", - objectsMacro.c_str(), - backend->GetFullName ( *object_file ).c_str () ); - delete object_file; - assignmentOperation = "+="; - break; - } - } - fprintf ( - fMakefile, - "%s %s", - objectsMacro.c_str (), - assignmentOperation ); - for ( i = 0; i < compilationUnits.size(); i++ ) - { - CompilationUnit& compilationUnit = *compilationUnits[i]; - if ( !compilationUnit.IsFirstFile () ) - { - const FileLocation& compilationName = compilationUnit.GetFilename (); - const FileLocation *objectFilename = GetObjectFilename ( &compilationName, module ); - if ( GetExtension ( *objectFilename ) == ".h" ) - headers.push_back ( objectFilename ); - else if ( GetExtension ( *objectFilename ) == ".rc" ) - { - const FileLocation *headerFilename = GetMcHeaderFilename ( &compilationUnit.GetFilename () ); - mcheaders.push_back ( headerFilename ); - mcresources.push_back ( objectFilename ); - } - else - { - fprintf ( - fMakefile, - "%s%s", - ( i%10 == 9 ? " \\\n\t" : " " ), - backend->GetFullName ( *objectFilename ).c_str () ); - delete objectFilename; - } - } - } - fprintf ( fMakefile, "\n" ); - } - if ( headers.size () > 0 ) - { - fprintf ( - fMakefile, - "%s_HEADERS %s", - module.name.c_str (), - assignmentOperation ); - for ( i = 0; i < headers.size (); i++ ) - { - fprintf ( - fMakefile, - "%s%s", - ( i%10 == 9 ? " \\\n\t" : " " ), - backend->GetFullName ( *headers[i] ).c_str () ); - delete headers[i]; - } - fprintf ( fMakefile, "\n" ); - } - - if ( mcheaders.size () > 0 ) - { - fprintf ( - fMakefile, - "%s_MCHEADERS %s", - module.name.c_str (), - assignmentOperation ); - for ( i = 0; i < mcheaders.size (); i++ ) - { - fprintf ( - fMakefile, - "%s%s", - ( i%10 == 9 ? " \\\n\t" : " " ), - backend->GetFullName ( *mcheaders[i] ).c_str () ); - delete mcheaders[i]; - } - fprintf ( fMakefile, "\n" ); - } - - if ( mcresources.size () > 0 ) - { - fprintf ( - fMakefile, - "%s_RESOURCES %s", - module.name.c_str (), - assignmentOperation ); - for ( i = 0; i < mcresources.size (); i++ ) - { - fprintf ( - fMakefile, - "%s%s", - ( i%10 == 9 ? " \\\n\t" : " " ), - backend->GetFullName ( *mcresources[i] ).c_str () ); - delete mcresources[i]; - } - fprintf ( fMakefile, "\n" ); - } - - vector sourceCompilationUnits; - GetModuleSpecificCompilationUnits ( sourceCompilationUnits ); - for ( i = 0; i < sourceCompilationUnits.size (); i++ ) - { - const FileLocation& compilationName = sourceCompilationUnits[i]->GetFilename (); - const FileLocation *object_file = GetObjectFilename ( &compilationName, module ); - fprintf ( - fMakefile, - "%s += %s\n", - objectsMacro.c_str(), - backend->GetFullName ( *object_file ).c_str () ); - delete object_file; - } - CleanupCompilationUnitVector ( sourceCompilationUnits ); - - if ( module.IsSpecDefinitionFile() ) - { - const FileLocation *stubs_file = new FileLocation( - IntermediateDirectory, - module.importLibrary->source->relative_path, - ReplaceExtension ( module.importLibrary->source->name, "_" + module.name + ".stubs.o" ) ); - - fprintf ( - fMakefile, - "%s += %s\n", - objectsMacro.c_str(), - backend->GetFullName ( *stubs_file ).c_str () ); - - delete stubs_file; - } - - if ( module.type == RpcProxy ) - { - const FileLocation *dlldata_file = GetDlldataFilename(); - - fprintf ( - fMakefile, - "%s += %s\n", - objectsMacro.c_str(), - ReplaceExtension ( backend->GetFullName ( *dlldata_file ), ".o" ).c_str() ); - - delete dlldata_file; - } -} - -const FileLocation* -MingwModuleHandler::GetDlldataFilename() const -{ - std::string dlldata_path = ""; - size_t dlldata_path_len = module.xmlbuildFile.find_last_of(cSep); - - if ( dlldata_path_len != std::string::npos && dlldata_path_len != 0 ) - dlldata_path = module.xmlbuildFile.substr(0, dlldata_path_len); - - return new FileLocation( IntermediateDirectory, dlldata_path, module.name + ".dlldata.c" ); -} - -const FileLocation* -MingwModuleHandler::GetPrecompiledHeaderPath () const -{ - if ( !module.pch || !use_pch ) - return NULL; - return new FileLocation ( IntermediateDirectory, - module.pch->file->relative_path, - ".gch_" + module.name ); -} - -const FileLocation* -MingwModuleHandler::GetPrecompiledHeaderFilename () const -{ - if ( !module.pch || !use_pch ) - return NULL; - return new FileLocation ( IntermediateDirectory, - module.pch->file->relative_path + "/.gch_" + module.name, - module.pch->file->name + ".gch" ); -} - -Rule windresRule ( "$(eval $(call RBUILD_WRC_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", - "$(intermediate_path_unique).coff", - "$(intermediate_path_unique).res", - "$(intermediate_path_unique).res.d", - "$(intermediate_dir)$(SEP)", NULL ); -Rule winebuildPRule ( "$(eval $(call RBUILD_WINEBUILD_WITH_CPP_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags),$(module_dllname)))\n", - "$(intermediate_path_unique).spec", - "$(intermediate_path_unique).spec.d", - "$(intermediate_path_unique).auto.def", - "$(intermediate_path_unique).stubs.c", - "$(intermediate_path_unique).stubs.o", - "$(intermediate_path_unique).stubs.o.d", - "$(intermediate_dir)$(SEP)", NULL ); -Rule winebuildRule ( "$(eval $(call RBUILD_WINEBUILD_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags),$(module_dllname)))\n", - "$(intermediate_path_unique).auto.def", - "$(intermediate_path_unique).stubs.c", - "$(intermediate_path_unique).stubs.o", - "$(intermediate_path_unique).stubs.o.d", - "$(intermediate_dir)$(SEP)", NULL ); -Rule gasRule ( "$(eval $(call RBUILD_GAS_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", - "$(intermediate_path_unique).o", - "$(intermediate_path_unique).o.d", NULL ); -Rule gccRule ( "$(eval $(call RBUILD_CC_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", - "$(intermediate_path_unique).o", - "$(intermediate_path_unique).o.d", NULL ); -Rule gccHostRule ( "$(eval $(call RBUILD_HOST_GCC_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", - "$(intermediate_path_unique).o", NULL ); -Rule gppRule ( "$(eval $(call RBUILD_CXX_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", - "$(intermediate_path_unique).o", - "$(intermediate_path_unique).o.d", NULL ); -Rule gppHostRule ( "$(eval $(call RBUILD_HOST_GPP_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", - "$(intermediate_path_unique).o", NULL ); -Rule widlHeaderRule ( "$(eval $(call RBUILD_WIDL_HEADER_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", - "$(intermediate_path_noext).h", - "$(intermediate_dir)$(SEP)", NULL ); -Rule widlServerRule ( "$(eval $(call RBUILD_WIDL_SERVER_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", - "$(intermediate_path_noext)_s.h", - "$(intermediate_path_noext)_s.c", - "$(intermediate_path_noext)_s.o", - "$(intermediate_dir)$(SEP)", NULL ); -Rule widlClientRule ( "$(eval $(call RBUILD_WIDL_CLIENT_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", - "$(intermediate_path_noext)_c.h", - "$(intermediate_path_noext)_c.c", - "$(intermediate_path_noext)_c.o", - "$(intermediate_dir)$(SEP)", NULL ); -Rule widlProxyRule ( "$(eval $(call RBUILD_WIDL_PROXY_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", - "$(intermediate_path_noext)_p.h", - "$(intermediate_path_noext)_p.c", - "$(intermediate_path_noext)_p.o", - "$(intermediate_dir)$(SEP)", NULL ); -Rule widlInterfaceRule ( "$(eval $(call RBUILD_WIDL_INTERFACE_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", - "$(intermediate_path_noext)_i.c", - "$(intermediate_path_noext)_i.o", - "$(intermediate_dir)$(SEP)", NULL ); -Rule widlDlldataRule ( "$(eval $(call RBUILD_WIDL_DLLDATA_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags),$(bare_dependencies)))\n", - "$(intermediate_path_noext).o", NULL ); -Rule widlTlbRule ( "$(eval $(call RBUILD_WIDL_TLB_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", - "$(intermediate_dir)$(SEP)", NULL ); -Rule pchRule ( "$(eval $(call RBUILD_CC_PCH_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", - "$(intermediate_dir)$(SEP).gch_$(module_name)$(SEP)$(source_name).gch", - "$(intermediate_dir)$(SEP).gch_$(module_name)$(SEP)$(source_name).gch.d", - "$(intermediate_dir)$(SEP).gch_$(module_name)$(SEP)", NULL ); -Rule pchCxxRule ( "$(eval $(call RBUILD_CXX_PCH_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", - "$(intermediate_dir)$(SEP).gch_$(module_name)$(SEP)$(source_name).gch", - "$(intermediate_dir)$(SEP).gch_$(module_name)$(SEP)$(source_name).gch.d", - "$(intermediate_dir)$(SEP).gch_$(module_name)$(SEP)", NULL ); -Rule bootRule ( "$(eval $(call RBUILD_NASM,$(module_name),$(source),$(dependencies),,$(module_output)))\n", - "$(module_output)", - "$(OUTPUT)$(SEP)$(source_dir)$(SEP)", NULL ); -Rule nasmRule ( "$(eval $(call RBUILD_NASM,$(module_name),$(source),$(dependencies),,$(intermediate_path_unique).o))\n", - "$(intermediate_path_unique).o", - "$(intermediate_dir)$(SEP)", NULL ); - -/* TODO: move these to rules.mak */ -Rule wmcRule ( "$(intermediate_path_noext).rc $(INTERMEDIATE)$(SEP)include$(SEP)reactos$(SEP)$(source_name_noext).h: $(wmc_TARGET) $(source) | $(intermediate_dir)\n" - "\t$(ECHO_WMC)\n" - "\t$(Q)$(wmc_TARGET) -i -H $(INTERMEDIATE)$(SEP)include$(SEP)reactos$(SEP)$(source_name_noext).h -o $(intermediate_path_noext).rc $(source)\n", - "$(intermediate_path_noext).rc", - "$(INTERMEDIATE)$(SEP)include$(SEP)reactos$(SEP)$(source_name_noext).h", - "$(intermediate_dir)$(SEP)", NULL ); -/* TODO: if possible, move these to rules.mak */ -Rule arRule1 ( "$(intermediate_path_noext).a: $($(module_name)_OBJS) $(dependencies) | $(intermediate_dir)\n", - "$(intermediate_path_noext).a", - "$(intermediate_dir)$(SEP)", NULL ); -Rule arRule2 ( "\t$(ECHO_AR)\n" - "\t${ar} -rc $@ $($(module_name)_OBJS)\n", - NULL ); -Rule arHostRule2 ( "\t$(ECHO_HOSTAR)\n" - "\t${host_ar} -rc $@ $($(module_name)_OBJS)\n", - NULL ); - -Rule emptyRule ( "", NULL ); - -void -MingwModuleHandler::GenerateGccCommand ( - const FileLocation* sourceFile, - const Rule *rule, - const string& extraDependencies ) -{ - const FileLocation *pchFilename = GetPrecompiledHeaderFilename (); - string dependencies = extraDependencies; - - if ( pchFilename ) - { - dependencies += " " + backend->GetFullName ( *pchFilename ); - delete pchFilename; - } - - /* WIDL generated headers may be used */ - vector rpcDependencies; - GetRpcHeaderDependencies ( rpcDependencies ); - if ( rpcDependencies.size () > 0 ) - dependencies += " " + backend->v2s ( rpcDependencies, 5 ); - - rule->Execute ( fMakefile, backend, module, sourceFile, clean_files, dependencies ); -} - -string -MingwModuleHandler::GetPropertyValue ( const Module& module, const std::string& name ) -{ - const Property* property = module.project.LookupProperty(name); - - if (property) - return property->value; - else - return string ( "" ); -} - -/* caller needs to delete the returned object */ -const FileLocation* -MingwModuleHandler::GetRpcServerHeaderFilename ( const FileLocation *base ) const -{ - string newname = GetBasename ( base->name ) + "_s.h"; - return new FileLocation ( IntermediateDirectory, base->relative_path, newname ); -} - -/* caller needs to delete the returned object */ -const FileLocation* -MingwModuleHandler::GetRpcClientHeaderFilename ( const FileLocation *base ) const -{ - string newname = GetBasename ( base->name ) + "_c.h"; - return new FileLocation ( IntermediateDirectory, base->relative_path, newname ); -} - -/* caller needs to delete the returned object */ -const FileLocation* -MingwModuleHandler::GetRpcProxyHeaderFilename ( const FileLocation *base ) const -{ - string newname = GetBasename ( base->name ) + "_p.h"; - return new FileLocation ( IntermediateDirectory, base->relative_path, newname ); -} - -/* caller needs to delete the returned object */ -const FileLocation* -MingwModuleHandler::GetIdlHeaderFilename ( const FileLocation *base ) const -{ - string newname = GetBasename ( base->name ) + ".h"; - return new FileLocation ( IntermediateDirectory, base->relative_path, newname ); -} - -/* caller needs to delete the returned object */ -const FileLocation* -MingwModuleHandler::GetMcHeaderFilename ( const FileLocation *base ) const -{ - string newname = GetBasename ( base->name ) + ".h"; - return new FileLocation ( IntermediateDirectory, "include/reactos" , newname ); -} - -void -MingwModuleHandler::GenerateCommands ( - const CompilationUnit& compilationUnit, - const string& extraDependencies ) -{ - const FileLocation& sourceFile = compilationUnit.GetFilename (); - string extension = GetExtension ( sourceFile ); - std::transform ( extension.begin (), extension.end (), extension.begin (), tolower ); - - struct - { - HostType host; - ModuleType type; - string extension; - Rule* rule; - } rules[] = { - { HostDontCare, TypeDontCare, ".s", &gasRule }, - { HostDontCare, BootSector, ".asm", &bootRule }, - { HostDontCare, TypeDontCare, ".asm", &nasmRule }, - { HostDontCare, TypeDontCare, ".rc", &windresRule }, - { HostDontCare, TypeDontCare, ".mc", &wmcRule }, - { HostDontCare, RpcServer, ".idl", &widlServerRule }, - { HostDontCare, RpcClient, ".idl", &widlClientRule }, - { HostDontCare, RpcProxy, ".idl", &widlProxyRule }, - { HostDontCare, IdlInterface, ".idl", &widlInterfaceRule }, - { HostDontCare, EmbeddedTypeLib, ".idl", &widlTlbRule }, - { HostDontCare, TypeDontCare, ".idl", &widlHeaderRule }, - { HostTrue, TypeDontCare, ".c", &gccHostRule }, - { HostTrue, TypeDontCare, ".cc", &gppHostRule }, - { HostTrue, TypeDontCare, ".cpp", &gppHostRule }, - { HostTrue, TypeDontCare, ".cxx", &gppHostRule }, - { HostFalse, TypeDontCare, ".c", &gccRule }, - { HostFalse, TypeDontCare, ".cc", &gppRule }, - { HostFalse, TypeDontCare, ".cpp", &gppRule }, - { HostFalse, TypeDontCare, ".cxx", &gppRule }, - { HostFalse, Cabinet, ".*", &emptyRule } - }; - size_t i; - Rule *customRule = NULL; - - for ( i = 0; i < sizeof ( rules ) / sizeof ( rules[0] ); i++ ) - { - if ( rules[i].host != HostDontCare && rules[i].host != ModuleHandlerInformations[module.type].DefaultHost ) - continue; - if ( rules[i].type != TypeDontCare && rules[i].type != module.type ) - continue; - if ( rules[i].extension != extension && rules[i].extension != ".*") - continue; - customRule = rules[i].rule; - break; - } - - if ( extension == ".c" || extension == ".cc" || extension == ".cpp" || extension == ".cxx" ) - { - GenerateGccCommand ( &sourceFile, - customRule, - GetCompilationUnitDependencies ( compilationUnit ) + extraDependencies ); - } - else if ( customRule ) - customRule->Execute ( fMakefile, backend, module, &sourceFile, clean_files ); - else - { - throw InvalidOperationException ( __FILE__, - __LINE__, - "Unsupported filename extension '%s' in file '%s'", - extension.c_str (), - backend->GetFullName ( sourceFile ).c_str () ); - } -} - -void -MingwModuleHandler::GenerateBuildMapCode ( const FileLocation *mapTarget ) -{ - fprintf ( fMakefile, "# BUILD MAP CODE\n" ); - - fprintf ( fMakefile, - "ifeq ($(ROS_BUILDMAP),full)\n" ); - - FileLocation mapFilename ( OutputDirectory, - module.output->relative_path, - GetBasename ( module.output->name ) + ".map" ); - CLEAN_FILE ( mapFilename ); - - fprintf ( fMakefile, - "\t$(ECHO_OBJDUMP)\n" ); - fprintf ( fMakefile, - "\t$(Q)${objdump} -d -S %s > %s\n", - mapTarget ? backend->GetFullName ( *mapTarget ).c_str () : "$@", - backend->GetFullName ( mapFilename ).c_str () ); - - fprintf ( fMakefile, - "else\n" ); - fprintf ( fMakefile, - "ifeq ($(ROS_BUILDMAP),yes)\n" ); - - fprintf ( fMakefile, - "\t$(ECHO_NM)\n" ); - fprintf ( fMakefile, - "\t$(Q)${nm} --numeric-sort %s > %s\n", - mapTarget ? backend->GetFullName ( *mapTarget ).c_str () : "$@", - backend->GetFullName ( mapFilename ).c_str () ); - - fprintf ( fMakefile, - "endif\n" ); - - fprintf ( fMakefile, - "endif\n" ); -} - -void -MergeStringVector ( const Backend* backend, - const vector& input, - vector& output ) -{ - int wrap_at = 25; - string s; - int wrap_count = -1; - for ( size_t i = 0; i < input.size (); i++ ) - { - if ( wrap_count++ == wrap_at ) - { - output.push_back ( s ); - s = ""; - wrap_count = 0; - } - else if ( s.size () > 0) - s += " "; - s += backend->GetFullName ( input[i] ); - } - if ( s.length () > 0 ) - output.push_back ( s ); -} - -void -MingwModuleHandler::GetObjectsVector ( const IfableData& data, - vector& objectFiles ) const -{ - for ( size_t i = 0; i < data.compilationUnits.size (); i++ ) - { - CompilationUnit& compilationUnit = *data.compilationUnits[i]; - const FileLocation& compilationName = compilationUnit.GetFilename (); - const FileLocation *object_file = GetObjectFilename ( &compilationName, module ); - objectFiles.push_back ( *object_file ); - delete object_file; - } -} - -void -MingwModuleHandler::GenerateCleanObjectsAsYouGoCode () const -{ - if ( backend->configuration.CleanAsYouGo ) - { - vector objectFiles; - GetObjectsVector ( module.non_if_data, - objectFiles ); - vector lines; - MergeStringVector ( backend, - objectFiles, - lines ); - for ( size_t i = 0; i < lines.size (); i++ ) - { - fprintf ( fMakefile, - "\t-@${rm} %s 2>$(NUL)\n", - lines[i].c_str () ); - } - } -} - -void -MingwModuleHandler::GenerateLinkerCommand () const -{ - string definitionFilename; - - const FileLocation *DefinitionFilename = GetDefinitionFilename (); - - if ( DefinitionFilename ) { - definitionFilename = backend->GetFullName (*DefinitionFilename); - delete DefinitionFilename; - } - - string linkerScriptArgument; - if ( module.linkerScript != NULL ) { - if ( module.project.configuration.Linker == GnuLd ) - linkerScriptArgument = ssprintf ( " -T %s", backend->GetFullName ( *module.linkerScript->file ).c_str () ); - else - fprintf ( stderr, - "Linker doesn't support linker scripts: linker script %s ignored for module %s\n", - backend->GetFullName ( *module.linkerScript->file ).c_str (), - module.name.c_str() ); - } - - string extraLibraries; - if ( ModuleHandlerInformations[module.type].DefaultHost == HostFalse ) { - if ( module.cplusplus ) { - switch ( module.type ) - { - case Win32DLL: - case Win32OCX: - case Win32CUI: - case Win32GUI: - case Win32SCR: - extraLibraries = "$$(PROJECT_CXXLIBS)"; - break; - - default: - extraLibraries = "$$(PROJECT_CCLIBS)"; - break; - } - } else - extraLibraries = "$$(PROJECT_CCLIBS)"; - } - - delete PassThruCacheDirectory ( new FileLocation ( module.output->directory, module.output->relative_path, "" ) ); - delete PassThruCacheDirectory ( new FileLocation ( IntermediateDirectory, module.output->relative_path, "" ) ); - - fprintf ( fMakefile, - "$(eval $(call RBUILD_LINK_RULE,%s,%s,%s,%s,%s,%s,%s))\n", - module.name.c_str(), - definitionFilename.c_str(), - module.xmlbuildFile.c_str(), - linkerScriptArgument.c_str(), - extraLibraries.c_str(), - module.GetEntryPoint().c_str(), - module.baseaddress.c_str() ); -} - -void -MingwModuleHandler::GenerateObjectFileTargets ( const IfableData& data ) -{ - size_t i; - string moduleDependencies; - - const vector& compilationUnits = data.compilationUnits; - for ( i = 0; i < compilationUnits.size (); i++ ) - { - CompilationUnit& compilationUnit = *compilationUnits[i]; - const FileLocation& compilationName = compilationUnit.GetFilename (); - const FileLocation *objectFilename = GetObjectFilename ( &compilationName, module ); - if ( GetExtension ( *objectFilename ) == ".h" ) - moduleDependencies += ssprintf ( " $(%s_HEADERS)", module.name.c_str () ); - else if ( GetExtension ( *objectFilename ) == ".rc" ) - moduleDependencies += ssprintf ( " $(%s_RESOURCES)", module.name.c_str () ); - delete objectFilename; - } - - for ( i = 0; i < compilationUnits.size (); i++ ) - { - GenerateCommands ( *compilationUnits[i], - moduleDependencies ); - } - - vector sourceCompilationUnits; - GetModuleSpecificCompilationUnits ( sourceCompilationUnits ); - for ( i = 0; i < sourceCompilationUnits.size (); i++ ) - { - GenerateCommands ( *sourceCompilationUnits[i], - moduleDependencies ); - } - CleanupCompilationUnitVector ( sourceCompilationUnits ); - - if ( module.type == RpcProxy ) - { - widlDlldataRule.Execute ( fMakefile, - backend, - module, - GetDlldataFilename(), - clean_files, - ssprintf ( "$(%s_SOURCES)", module.name.c_str ()) ); - } -} - -void -MingwModuleHandler::GenerateObjectFileTargets () -{ - if ( module.pch && use_pch ) - { - - std::map vars; - - /* WIDL generated headers may be used */ - string dependencies; - vector rpcDependencies; - GetRpcHeaderDependencies ( rpcDependencies ); - if ( rpcDependencies.size () > 0 ) - dependencies = " " + backend->v2s ( rpcDependencies, 5 ); - - if ( module.cplusplus ) - pchCxxRule.Execute ( fMakefile, backend, module, module.pch->file, clean_files, dependencies ); - else - pchRule.Execute ( fMakefile, backend, module, module.pch->file, clean_files, dependencies ); - } - - GenerateObjectFileTargets ( module.non_if_data ); -} - -/* caller needs to delete the returned object */ -const FileLocation* -MingwModuleHandler::GenerateArchiveTarget () -{ - const FileLocation *archiveFilename = GetModuleArchiveFilename (); - - if ( archiveFilename == NULL ) - return NULL; - - const FileLocation *definitionFilename = GetDefinitionFilename (); - - fprintf ( fMakefile, "# ARCHIVE TARGET\n" ); - - if ( IsStaticLibrary ( module ) && definitionFilename ) - { - arRule1.Execute ( fMakefile, - backend, - module, - archiveFilename, - clean_files, - backend->GetFullName ( *definitionFilename ).c_str () ); - - fprintf ( fMakefile, - "\t${dlltool} --def %s --kill-at --output-lib $@\n", - backend->GetFullName ( *definitionFilename ).c_str () ); - } - else - arRule1.Execute ( fMakefile, backend, module, archiveFilename, clean_files ); - - if ( definitionFilename ) - delete definitionFilename; - - if(module.type == HostStaticLibrary) - arHostRule2.Execute ( fMakefile, backend, module, archiveFilename, clean_files ); - else - arRule2.Execute ( fMakefile, backend, module, archiveFilename, clean_files ); - - GenerateCleanObjectsAsYouGoCode (); - - fprintf ( fMakefile, "\n" ); - - return archiveFilename; -} - -/*static*/ string -MingwModuleHandler::GetObjectsMacro ( const Module& module ) -{ - return ssprintf ( "$(%s_OBJS)", - module.name.c_str () ); -} - -string -MingwModuleHandler::GetLibsMacro () const -{ - return ssprintf ( "$(%s_LIBS)", module.name.c_str () ); -} - -string -MingwModuleHandler::GetLinkerMacro () const -{ - return ssprintf ( "$(%s_LDFLAGS)", - module.name.c_str () ); -} - -string -MingwModuleHandler::GetDebugFormat () -{ - if (Environment::GetArch() == "amd64") - { - return "dwarf-2"; - } - return "stabs+"; -} - -string -MingwModuleHandler::GetModuleTargets ( const Module& module ) -{ - if ( ReferenceObjects ( module ) ) - return GetObjectsMacro ( module ); - else - { - const FileLocation *target_file = GetTargetFilename ( module, NULL ); - string target = backend->GetFullName ( *target_file ).c_str (); - delete target_file; - return target; - } -} - -void -MingwModuleHandler::GenerateSourceMacro () -{ - sourcesMacro = ssprintf ( "%s_SOURCES", module.name.c_str ()); - - if ( module.type == RpcProxy || module.type == Cabinet ) - GenerateSourceMacros ( module.non_if_data ); - - // future references to the macro will be to get its values - sourcesMacro = ssprintf ("$(%s)", sourcesMacro.c_str ()); -} - -void -MingwModuleHandler::GenerateObjectMacro () -{ - objectsMacro = ssprintf ("%s_OBJS", module.name.c_str ()); - - GenerateObjectMacros ( module.non_if_data ); - - // future references to the macro will be to get its values - objectsMacro = ssprintf ("$(%s)", objectsMacro.c_str ()); -} - -void -MingwModuleHandler::GenerateTargetMacro () -{ - fprintf ( fMakefile, - "%s := %s\n", - GetTargetMacro ( module, false ).c_str (), - GetModuleTargets ( module ).c_str () ); -} - -void -MingwModuleHandler::GetRpcHeaderDependencies ( - vector& dependencies ) const -{ - for ( size_t i = 0; i < module.non_if_data.libraries.size (); i++ ) - { - Library& library = *module.non_if_data.libraries[i]; - if ( library.importedModule->type == RpcServer || - library.importedModule->type == RpcClient || - library.importedModule->type == RpcProxy || - library.importedModule->type == IdlHeader ) - { - for ( size_t j = 0; j < library.importedModule->non_if_data.compilationUnits.size (); j++ ) - { - CompilationUnit& compilationUnit = *library.importedModule->non_if_data.compilationUnits[j]; - const FileLocation& sourceFile = compilationUnit.GetFilename (); - string extension = GetExtension ( sourceFile ); - if ( extension == ".idl" || extension == ".IDL" ) - { - string basename = GetBasename ( sourceFile.name ); - if ( library.importedModule->type == RpcServer ) - { - const FileLocation *header = GetRpcServerHeaderFilename ( &sourceFile ); - dependencies.push_back ( *header ); - delete header; - } - if ( library.importedModule->type == RpcClient ) - { - const FileLocation *header = GetRpcClientHeaderFilename ( &sourceFile ); - dependencies.push_back ( *header ); - delete header; - } - if ( library.importedModule->type == RpcProxy ) - { - const FileLocation *header = GetRpcProxyHeaderFilename ( &sourceFile ); - dependencies.push_back ( *header ); - delete header; - } - if ( library.importedModule->type == IdlHeader ) - { - const FileLocation *header = GetIdlHeaderFilename ( &sourceFile ); - dependencies.push_back ( *header ); - delete header; - } - } - } - } - } -} - -void -MingwModuleHandler::GenerateOtherMacros () -{ - set used_defs; - - linkerflagsMacro = ssprintf ("%s_LDFLAGS", module.name.c_str ()); - libsMacro = ssprintf("%s_LIBS", module.name.c_str ()); - - const FileLocation * pchPath = GetPrecompiledHeaderPath (); - - if ( pchPath ) - { - string pchPathStr = backend->GetFullName ( *pchPath ); - delete pchPath; - - fprintf ( fMakefile, - "%s_%sINCLUDES+= -I%s\n", - module.name.c_str(), - CompilerPrefixTable[CompilerTypeCC], - pchPathStr.c_str() ); - - fprintf ( fMakefile, - "%s_%sINCLUDES+= -I%s\n", - module.name.c_str(), - CompilerPrefixTable[CompilerTypeCXX], - pchPathStr.c_str() ); - } - - const char * toolPrefix = ""; - - if ( ModuleHandlerInformations[module.type].DefaultHost == HostTrue ) - toolPrefix = "HOST_"; - - // FIXME: this is very ugly and generates lots of useless entries - for ( unsigned type = CompilerTypeCC; type < CompilerTypesCount; ++ type ) - { - string flags; - - if ( module.dynamicCRT ) - flags += ssprintf ( " $(%s%sFLAG_CRTDLL)", toolPrefix, CompilerPrefixTable[type] ); - - // FIXME: this duplicates the flag for CPP and C/CXX - if ( !module.allowWarnings ) - flags += ssprintf ( " $(%s%sFLAG_WERROR)", toolPrefix, CompilerPrefixTable[type] ); - - if ( module.isUnicode ) - flags += ssprintf ( " $(%s%sFLAG_UNICODE)", toolPrefix, CompilerPrefixTable[type] ); - - if ( flags.size() ) - { - fprintf ( fMakefile, - "%s_%sFLAGS+=%s\n", - module.name.c_str(), - CompilerPrefixTable[type], - flags.c_str() ); - } - } - - GenerateParameters ( module.name.c_str(), "+=", module.non_if_data ); - - GenerateMacros ( - "+=", - module.non_if_data, - &module.linkerFlags, - used_defs ); - - fprintf ( fMakefile, "\n\n" ); -} - -void -MingwModuleHandler::GenerateRules () -{ - SpecFileType spec; - - fprintf ( fMakefile, "# RULES\n" ); - string targetMacro = GetTargetMacro ( module ); - //CLEAN_FILE ( targetMacro ); - CLEAN_FILE ( FileLocation ( SourceDirectory, "", targetMacro ) ); - - // generate phony target for module name - fprintf ( fMakefile, ".PHONY: %s\n", - module.name.c_str () ); - string dependencies = GetTargetMacro ( module ); - if ( module.type == Test ) - dependencies += " $(regtests_run_TARGET)"; - fprintf ( fMakefile, "%s: %s\n\n", - module.name.c_str (), - dependencies.c_str () ); - if ( module.type == Test ) - { - fprintf ( fMakefile, - "\t@%s\n", - targetMacro.c_str ()); - } - - if ( !ReferenceObjects ( module ) ) - { - const FileLocation* ar_target = GenerateArchiveTarget (); - - if ( ar_target ) - delete ar_target; - } - - - spec = module.IsSpecDefinitionFile(); - - if(spec) - { - Rule * defRule; - - if (spec == PSpec) - defRule = &winebuildPRule; - else - defRule = &winebuildRule; - - defRule->Execute ( fMakefile, backend, module, module.importLibrary->source, clean_files ); - } - - GenerateObjectFileTargets (); -} - -void -MingwModuleHandler::GetInvocationDependencies ( - const Module& module, - string_list& dependencies ) -{ - for ( size_t i = 0; i < module.invocations.size (); i++ ) - { - Invoke& invoke = *module.invocations[i]; - if ( invoke.invokeModule == &module ) - /* Protect against circular dependencies */ - continue; - invoke.GetTargets ( dependencies ); - } -} - -void -MingwModuleHandler::GenerateInvocations () const -{ - if ( module.invocations.size () == 0 ) - return; - - fprintf ( fMakefile, "# INVOCATIONS\n" ); - - size_t iend = module.invocations.size (); - for ( size_t i = 0; i < iend; i++ ) - { - const Invoke& invoke = *module.invocations[i]; - - if ( invoke.invokeModule->type != BuildTool ) - { - throw XMLInvalidBuildFileException ( - module.node.location, - "Only modules of type buildtool can be invoked." ); - } - - string invokeTarget = module.GetInvocationTarget ( i ); - string_list invoke_targets; - assert ( invoke_targets.size() ); - invoke.GetTargets ( invoke_targets ); - fprintf ( fMakefile, - ".PHONY: %s\n\n", - invokeTarget.c_str () ); - fprintf ( fMakefile, - "%s:", - invokeTarget.c_str () ); - size_t j, jend = invoke_targets.size(); - for ( j = 0; j < jend; j++ ) - { - fprintf ( fMakefile, - " %s", - invoke_targets[i].c_str () ); - } - fprintf ( fMakefile, "\n\n%s", invoke_targets[0].c_str () ); - for ( j = 1; j < jend; j++ ) - fprintf ( fMakefile, - " %s", - invoke_targets[i].c_str () ); - fprintf ( fMakefile, - ": %s\n", - NormalizeFilename ( backend->GetFullName ( *invoke.invokeModule->output ) ).c_str () ); - fprintf ( fMakefile, "\t$(ECHO_INVOKE)\n" ); - fprintf ( fMakefile, - "\t%s %s\n\n", - NormalizeFilename ( backend->GetFullName ( *invoke.invokeModule->output ) ).c_str (), - invoke.GetParameters ().c_str () ); - } -} - -string -MingwModuleHandler::GetPreconditionDependenciesName () const -{ - return module.name + "_precondition"; -} - -void -MingwModuleHandler::GetDefaultDependencies ( - string_list& dependencies ) const -{ - /* Avoid circular dependency */ - if ( ModuleHandlerInformations[module.type].DefaultHost == HostTrue ) - return; - - if (module.name != "psdk" && - module.name != "dxsdk") - { - dependencies.push_back ( "$(psdk_TARGET) $(psdk_HEADERS)" ); - dependencies.push_back ( "$(dxsdk_TARGET) $(dxsdk_HEADERS)" ); - } - - if (module.name != "errcodes" && - module.name != "bugcodes" && - module.name != "ntstatus") - { - dependencies.push_back ( "$(errcodes_TARGET) $(ERRCODES_MCHEADERS)" ); - dependencies.push_back ( "$(bugcodes_TARGET) $(BUGCODES_MCHEADERS)" ); - dependencies.push_back ( "$(ntstatus_TARGET) $(NTSTATUS_MCHEADERS)" ); - } - - ///* Check if any dependent library relies on the generated headers */ - //for ( size_t i = 0; i < module.project.modules.size (); i++ ) - //{ - // const Module& m = *module.project.modules[i]; - // for ( size_t j = 0; j < m.non_if_data.compilationUnits.size (); j++ ) - // { - // CompilationUnit& compilationUnit = *m.non_if_data.compilationUnits[j]; - // const FileLocation& sourceFile = compilationUnit.GetFilename (); - // string extension = GetExtension ( sourceFile ); - // if (extension == ".mc" || extension == ".MC" ) - // { - // string dependency = ssprintf ( "$(%s_MCHEADERS)", m.name.c_str () ); - // dependencies.push_back ( dependency ); - // } - // } - //} -} - -void -MingwModuleHandler::GeneratePreconditionDependencies () -{ - fprintf ( fMakefile, "# PRECONDITION DEPENDENCIES\n" ); - string preconditionDependenciesName = GetPreconditionDependenciesName (); - string_list dependencies; - GetDefaultDependencies ( dependencies ); - GetModuleDependencies ( dependencies ); - - GetInvocationDependencies ( module, dependencies ); - - if ( dependencies.size() ) - { - fprintf ( fMakefile, - "%s =", - preconditionDependenciesName.c_str () ); - for ( size_t i = 0; i < dependencies.size(); i++ ) - fprintf ( fMakefile, - " %s", - dependencies[i].c_str () ); - fprintf ( fMakefile, "\n\n" ); - } - - fprintf ( fMakefile, "\n" ); -} - -/* caller needs to delete the returned object */ -const FileLocation* -MingwModuleHandler::GetDefinitionFilename () const -{ - if ( module.importLibrary == NULL ) - return NULL; - - if ( module.IsSpecDefinitionFile () ) - { - return new FileLocation ( IntermediateDirectory, - module.importLibrary->source->relative_path, - GetBasename ( module.importLibrary->source->name ) + "_" + module.name + ".auto.def" ); - } - else - { - return new FileLocation ( SourceDirectory, - module.importLibrary->source->relative_path, - module.importLibrary->source->name ); - } -} - -void -MingwModuleHandler::GetSpecObjectDependencies ( - vector& dependencies, - const FileLocation *file ) const -{ - dependencies.push_back ( FileLocation ( IntermediateDirectory, - file->relative_path, - GetBasename ( file->name ) + "_" + module.name + ".stubs.c" ) ); -} - -void -MingwModuleHandler::GetMcObjectDependencies ( - vector& dependencies, - const FileLocation *file ) const -{ - string basename = GetBasename ( file->name ); - - FileLocation defDependency ( IntermediateDirectory, - "include/reactos", - basename + ".h" ); - dependencies.push_back ( defDependency ); - - FileLocation stubsDependency ( IntermediateDirectory, - file->relative_path, - basename + ".rc" ); - dependencies.push_back ( stubsDependency ); -} - -void -MingwModuleHandler::GetWidlObjectDependencies ( - vector& dependencies, - const FileLocation *file ) const -{ - string basename = GetBasename ( file->name ); - const FileLocation *generatedHeaderFilename = GetRpcServerHeaderFilename ( file ); - - FileLocation serverSourceDependency ( IntermediateDirectory, - file->relative_path, - basename + "_s.c" ); - dependencies.push_back ( serverSourceDependency ); - dependencies.push_back ( *generatedHeaderFilename ); - - delete generatedHeaderFilename; -} - -void -MingwModuleHandler::GetDefinitionDependencies ( - vector& dependencies ) const -{ - const vector& compilationUnits = module.non_if_data.compilationUnits; - for ( size_t i = 0; i < compilationUnits.size (); i++ ) - { - const CompilationUnit& compilationUnit = *compilationUnits[i]; - const FileLocation& sourceFile = compilationUnit.GetFilename (); - string extension = GetExtension ( sourceFile ); - - if (extension == ".spec" || extension == ".pspec") - GetSpecObjectDependencies ( dependencies, &sourceFile ); - - if (extension == ".idl") - { - if ( ( module.type == RpcServer ) || ( module.type == RpcClient ) || ( module.type == RpcProxy ) ) - GetWidlObjectDependencies ( dependencies, &sourceFile ); - } - } -} - -enum DebugSupportType -{ - DebugKernelMode, - DebugUserMode -}; - -static void -MingwAddDebugSupportLibraries ( Module& module, DebugSupportType type ) -{ - Library* pLibrary; - - switch(type) - { - case DebugKernelMode: - pLibrary = new Library ( module, "debugsup_ntoskrnl" ); - break; - - case DebugUserMode: - pLibrary = new Library ( module, "debugsup_ntdll" ); - break; - - default: - assert(0); - } - - module.non_if_data.libraries.push_back(pLibrary); -} - -static void -MingwAddCRTLibrary( Module &module ) -{ - const char * crtAttr = module.CRT.c_str (); - const char * crtLib = NULL; - - if ( stricmp ( crtAttr, "libc" ) == 0 ) - crtLib = "crt"; - else if ( stricmp ( crtAttr, "msvcrt" ) == 0 ) - crtLib = "msvcrt"; - else if ( stricmp ( crtAttr, "libcntpr" ) == 0 ) - crtLib = "libcntpr"; - else if ( stricmp ( crtAttr, "ntdll" ) == 0 ) - crtLib = "ntdll"; - - if ( crtLib ) - { - Library* pLibrary = new Library ( module, std::string ( crtLib ) ); - - if ( pLibrary->importedModule == NULL) - { - throw XMLInvalidBuildFileException ( - module.node.location, - "module '%s' trying to import non-existant C runtime module '%s'", - module.name.c_str(), - crtLib ); - } - - module.non_if_data.libraries.push_back ( pLibrary ); - } -} - -MingwBuildToolModuleHandler::MingwBuildToolModuleHandler ( const Module& module_ ) - : MingwModuleHandler ( module_ ) -{ -} - -void -MingwBuildToolModuleHandler::Process () -{ - GenerateBuildToolModuleTarget (); -} - -void -MingwBuildToolModuleHandler::GenerateBuildToolModuleTarget () -{ - string targetMacro ( GetTargetMacro (module) ); - string objectsMacro = GetObjectsMacro ( module ); - string libsMacro = GetLibsMacro (); - - GenerateRules (); - - fprintf ( fMakefile, "# BUILD TOOL MODULE TARGET\n" ); - - string linker; - if ( module.cplusplus ) - linker = "${host_gpp}"; - else - linker = "${host_gcc}"; - - const FileLocation *target_file = GetTargetFilename ( module, NULL ); - fprintf ( fMakefile, "%s: %s %s | %s\n", - targetMacro.c_str (), - objectsMacro.c_str (), - libsMacro.c_str (), - backend->GetFullPath ( *target_file ).c_str () ); - fprintf ( fMakefile, "\t$(ECHO_HOSTLD)\n" ); - fprintf ( fMakefile, - "\t%s %s -o $@ %s %s\n\n", - linker.c_str (), - GetLinkerMacro ().c_str (), - objectsMacro.c_str (), - libsMacro.c_str () ); - - delete target_file; -} - - -MingwKernelModuleHandler::MingwKernelModuleHandler ( - const Module& module_ ) - - : MingwModuleHandler ( module_ ) -{ -} - -void -MingwKernelModuleHandler::Process () -{ - GenerateKernelModuleTarget (); -} - -void -MingwKernelModuleHandler::GenerateKernelModuleTarget () -{ - GenerateRules (); - GenerateLinkerCommand (); -} - - -MingwKernelModeDLLModuleHandler::MingwKernelModeDLLModuleHandler ( - const Module& module_ ) - - : MingwModuleHandler ( module_ ) -{ -} - - -void -MingwKernelModeDLLModuleHandler::AddImplicitLibraries ( Module& module ) -{ - MingwAddCRTLibrary ( module ); - MingwAddDebugSupportLibraries ( module, DebugKernelMode ); -} - -void -MingwKernelModeDLLModuleHandler::Process () -{ - GenerateKernelModeDLLModuleTarget (); -} - -void -MingwKernelModeDLLModuleHandler::GenerateKernelModeDLLModuleTarget () -{ - GenerateRules (); - GenerateLinkerCommand (); -} - - -MingwNativeDLLModuleHandler::MingwNativeDLLModuleHandler ( - const Module& module_ ) - - : MingwModuleHandler ( module_ ) -{ -} - -void -MingwNativeDLLModuleHandler::AddImplicitLibraries ( Module& module ) -{ - MingwAddCRTLibrary ( module ); - MingwAddDebugSupportLibraries ( module, DebugUserMode ); -} - -void -MingwNativeDLLModuleHandler::Process () -{ - GenerateNativeDLLModuleTarget (); -} - -void -MingwNativeDLLModuleHandler::GenerateNativeDLLModuleTarget () -{ - GenerateRules (); - GenerateLinkerCommand (); -} - - -MingwNativeCUIModuleHandler::MingwNativeCUIModuleHandler ( - const Module& module_ ) - - : MingwModuleHandler ( module_ ) -{ -} - -void -MingwNativeCUIModuleHandler::AddImplicitLibraries ( Module& module ) -{ - MingwAddCRTLibrary ( module ); - MingwAddDebugSupportLibraries ( module, DebugUserMode ); -} - -void -MingwNativeCUIModuleHandler::Process () -{ - GenerateNativeCUIModuleTarget (); -} - -void -MingwNativeCUIModuleHandler::GenerateNativeCUIModuleTarget () -{ - GenerateRules (); - GenerateLinkerCommand (); -} - - -MingwWin32DLLModuleHandler::MingwWin32DLLModuleHandler ( - const Module& module_ ) - - : MingwModuleHandler ( module_ ) -{ -} - -MingwWin32OCXModuleHandler::MingwWin32OCXModuleHandler ( - const Module& module_ ) - - : MingwModuleHandler ( module_ ) -{ -} - -static void -MingwAddImplicitLibraries( Module &module ) -{ - Library* pLibrary; - - if ( module.type != Win32DLL - && module.type != Win32OCX - && module.type != Win32CUI - && module.type != Win32GUI - && module.type != Win32SCR) - { - return; - } - - if ( module.isDefaultEntryPoint ) - { - if ( module.IsDLL () ) - { - //pLibrary = new Library ( module, "__mingw_dllmain" ); - //module.non_if_data.libraries.insert ( module.non_if_data.libraries.begin(), pLibrary ); - } - else - { - pLibrary = new Library ( module, module.isUnicode ? "mingw_wmain" : "mingw_main" ); - module.non_if_data.libraries.insert ( module.non_if_data.libraries.begin(), pLibrary ); - } - } - - pLibrary = new Library ( module, "mingw_common" ); - module.non_if_data.libraries.push_back ( pLibrary ); - - MingwAddCRTLibrary ( module ); - MingwAddDebugSupportLibraries ( module, DebugUserMode ); -} - -void -MingwWin32DLLModuleHandler::AddImplicitLibraries ( Module& module ) -{ - MingwAddImplicitLibraries ( module ); -} - -void -MingwWin32DLLModuleHandler::Process () -{ - GenerateWin32DLLModuleTarget (); -} - -void -MingwWin32DLLModuleHandler::GenerateWin32DLLModuleTarget () -{ - GenerateRules (); - GenerateLinkerCommand (); -} - - -void -MingwWin32OCXModuleHandler::AddImplicitLibraries ( Module& module ) -{ - MingwAddImplicitLibraries ( module ); -} - -void -MingwWin32OCXModuleHandler::Process () -{ - GenerateWin32OCXModuleTarget (); -} - -void -MingwWin32OCXModuleHandler::GenerateWin32OCXModuleTarget () -{ - GenerateRules (); - GenerateLinkerCommand (); -} - - -MingwWin32CUIModuleHandler::MingwWin32CUIModuleHandler ( - const Module& module_ ) - - : MingwModuleHandler ( module_ ) -{ -} - -void -MingwWin32CUIModuleHandler::AddImplicitLibraries ( Module& module ) -{ - MingwAddImplicitLibraries ( module ); -} - -void -MingwWin32CUIModuleHandler::Process () -{ - GenerateWin32CUIModuleTarget (); -} - -void -MingwWin32CUIModuleHandler::GenerateWin32CUIModuleTarget () -{ - GenerateRules (); - GenerateLinkerCommand (); -} - - -MingwWin32GUIModuleHandler::MingwWin32GUIModuleHandler ( - const Module& module_ ) - - : MingwModuleHandler ( module_ ) -{ -} - -void -MingwWin32GUIModuleHandler::AddImplicitLibraries ( Module& module ) -{ - MingwAddImplicitLibraries ( module ); -} - -void -MingwWin32GUIModuleHandler::Process () -{ - GenerateWin32GUIModuleTarget (); -} - -void -MingwWin32GUIModuleHandler::GenerateWin32GUIModuleTarget () -{ - GenerateRules (); - GenerateLinkerCommand (); -} - - -MingwBootLoaderModuleHandler::MingwBootLoaderModuleHandler ( - const Module& module_ ) - - : MingwModuleHandler ( module_ ) -{ -} - -void -MingwBootLoaderModuleHandler::Process () -{ - GenerateBootLoaderModuleTarget (); -} - -void -MingwBootLoaderModuleHandler::GenerateBootLoaderModuleTarget () -{ - fprintf ( fMakefile, "# BOOT LOADER MODULE TARGET\n" ); - string targetMacro ( GetTargetMacro (module) ); - string objectsMacro = GetObjectsMacro ( module ); - string libsMacro = GetLibsMacro (); - - GenerateRules (); - - string objectsDir = "${call RBUILD_intermediate_dir,$(" + module.name + "_TARGET)}"; - string rspFile = objectsDir + "$(SEP)" + module.name + "_objs.rsp"; - - /* Generate the rsp rule */ - fprintf(fMakefile, "%s: $(%s_OBJS) %s | %s\n" - "\t$(ECHO_RSP)\n" - "\t-@${rm} $@ 2>$(NUL)\n" - "\t${cp} $(NUL) $@ >$(NUL)\n" - "\t$(foreach obj,$(%s_LIBS),$(Q)echo $(QUOTE)$(subst \\,\\\\,$(obj))$(QUOTE)>>$@$(NL))\n\n", - rspFile.c_str(), - module.name.c_str(), - module.xmlbuildFile.c_str(), - objectsDir.c_str(), - module.name.c_str()); - - const FileLocation *target_file = GetTargetFilename ( module, NULL ); - fprintf ( fMakefile, "%s: %s %s | %s\n", - targetMacro.c_str (), - rspFile.c_str(), - libsMacro.c_str (), - backend->GetFullPath ( *target_file ).c_str () ); - - fprintf ( fMakefile, "\t$(ECHO_LD)\n" ); - - string linkerScriptArgument; - if ( module.linkerScript != NULL ) { - linkerScriptArgument = ssprintf(" -T %s", backend->GetFullName(*module.linkerScript->file).c_str()); - } - - /* Link the stripped booloader */ - fprintf(fMakefile, - "\t${ld} --strip-all --subsystem native --entry=%s --image-base=%s @%s $(PROJECT_CCLIBS) " - "$(BUILTIN_LDFLAGS) $(PROJECT_LDFLAGS) $(LDFLAG_DRIVER) %s -o $@\n", - module.GetEntryPoint().c_str(), - module.baseaddress.c_str(), - rspFile.c_str(), - linkerScriptArgument.c_str() ); - - /* Link an unstripped version */ - fprintf(fMakefile, - "ifeq ($(ROS_BUILDNOSTRIP),yes)\n" - "\t${ld} --subsystem native --entry=%s --image-base=%s @%s $(PROJECT_CCLIBS) " - "$(BUILTIN_LDFLAGS) $(PROJECT_LDFLAGS) $(LDFLAG_DRIVER) %s -o %s$(SEP)%s.nostrip.sys\n" - "endif\n", - module.GetEntryPoint().c_str(), - module.baseaddress.c_str(), - rspFile.c_str(), - linkerScriptArgument.c_str(), - backend->GetFullPath(*target_file).c_str(), - module.name.c_str()); -} - - -MingwBootProgramModuleHandler::MingwBootProgramModuleHandler ( - const Module& module_ ) - : MingwModuleHandler ( module_ ) -{ -} - -void -MingwBootProgramModuleHandler::Process () -{ - GenerateBootProgramModuleTarget (); -} - -void -MingwBootProgramModuleHandler::GenerateBootProgramModuleTarget () -{ - fprintf ( fMakefile, "# BOOT PROGRAM MODULE TARGET\n" ); - - string targetName ( module.output->name ); - string targetMacro ( GetTargetMacro (module) ); - string workingDirectory = GetWorkingDirectory (); - FileLocation junk_tmp ( TemporaryDirectory, - "", - module.name + ".junk.tmp" ); - FileLocation junk_elf ( TemporaryDirectory, - "", - module.name + ".junk.elf" ); - FileLocation junk_cpy ( TemporaryDirectory, - "", - module.name + ".junk.elf" ); - CLEAN_FILE ( junk_tmp ); - CLEAN_FILE ( junk_elf ); - CLEAN_FILE ( junk_cpy ); - string objectsMacro = GetObjectsMacro ( module ); - string libsMacro = GetLibsMacro (); - const Module *payload = module.project.LocateModule ( module.payload ); - - GenerateRules (); - - const FileLocation *target_file = GetTargetFilename ( module, NULL ); - fprintf ( fMakefile, "%s: %s %s %s | %s\n", - targetMacro.c_str (), - objectsMacro.c_str (), - libsMacro.c_str (), - payload->name.c_str (), - backend->GetFullPath ( *target_file ).c_str () ); - - fprintf ( fMakefile, "\t$(ECHO_BOOTPROG)\n" ); - - fprintf ( fMakefile, "\t$(%s_PREPARE) $(OUTPUT)$(SEP)%s %s\n", - module.buildtype.c_str (), - NormalizeFilename( backend->GetFullName ( *payload->output ) ).c_str (), - backend->GetFullName ( junk_cpy ).c_str () ); - - fprintf ( fMakefile, "\t${objcopy} $(%s_FLATFORMAT) %s %s\n", - module.buildtype.c_str (), - backend->GetFullName ( junk_cpy ).c_str (), - backend->GetFullName ( junk_tmp ).c_str () ); - - fprintf ( fMakefile, "\t${ld} $(%s_LINKFORMAT) %s %s -o %s\n", - module.buildtype.c_str (), - libsMacro.c_str (), - backend->GetFullName ( junk_tmp ).c_str (), - backend->GetFullName ( junk_elf ).c_str () ); - - fprintf ( fMakefile, "\t${objcopy} $(%s_COPYFORMAT) %s $(INTERMEDIATE)$(SEP)%s\n", - module.buildtype.c_str (), - backend->GetFullName ( junk_elf ).c_str (), - backend->GetFullName ( *module.output ) .c_str () ); - - fprintf ( fMakefile, - "\t-@${rm} %s %s %s 2>$(NUL)\n", - backend->GetFullName ( junk_tmp ).c_str (), - backend->GetFullName ( junk_elf ).c_str (), - backend->GetFullName ( junk_cpy ).c_str () ); - - delete target_file; -} - - -MingwIsoModuleHandler::MingwIsoModuleHandler ( - const Module& module_ ) - - : MingwModuleHandler ( module_ ) -{ -} - -void -MingwIsoModuleHandler::Process () -{ - GenerateIsoModuleTarget (); -} - -void -MingwIsoModuleHandler::OutputBootstrapfileCopyCommands ( - const string& bootcdDirectory, - vector& destinations ) -{ - for ( std::map::const_iterator p = module.project.modules.begin (); p != module.project.modules.end (); ++ p ) - { - const Module& m = *p->second; - if ( !m.enabled ) - continue; - if ( m.bootstrap != NULL ) - { - FileLocation targetFile ( OutputDirectory, - m.bootstrap->base.length () > 0 - ? bootcdDirectory + sSep + m.bootstrap->base - : bootcdDirectory, - m.bootstrap->nameoncd ); - OutputCopyCommandSingle ( *m.output, targetFile ); - destinations.push_back ( targetFile ); - } - } -} - -void -MingwIsoModuleHandler::OutputCdfileCopyCommands ( - const string& bootcdDirectory, - std::vector& destinations ) -{ - for ( size_t i = 0; i < module.project.cdfiles.size (); i++ ) - { - const CDFile& cdfile = *module.project.cdfiles[i]; - FileLocation targetFile ( OutputDirectory, - cdfile.target->relative_path.length () > 0 - ? bootcdDirectory + sSep + cdfile.target->relative_path - : bootcdDirectory, - cdfile.target->name ); - OutputCopyCommandSingle ( *cdfile.source, targetFile ); - destinations.push_back ( targetFile ); - } - for ( size_t i = 0; i < module.cdfiles.size (); i++ ) - { - const CDFile& cdfile = *module.cdfiles[i]; - FileLocation targetFile ( OutputDirectory, - cdfile.target->relative_path.length () > 0 - ? bootcdDirectory + sSep + cdfile.target->relative_path - : bootcdDirectory, - cdfile.target->name ); - OutputCopyCommandSingle ( *cdfile.source, targetFile ); - destinations.push_back ( targetFile ); - } -} - -void -MingwIsoModuleHandler::GetBootstrapCdDirectories ( vector& out, - const string& bootcdDirectory ) -{ - for ( std::map::const_iterator p = module.project.modules.begin (); p != module.project.modules.end (); ++ p ) - { - const Module& m = *p->second; - if ( !m.enabled ) - continue; - if ( m.bootstrap != NULL ) - { - FileLocation targetDirectory ( OutputDirectory, - m.bootstrap->base.length () > 0 - ? bootcdDirectory + sSep + m.bootstrap->base - : bootcdDirectory, - "" ); - out.push_back ( targetDirectory ); - } - } -} - -void -MingwIsoModuleHandler::GetNonModuleCdDirectories ( vector& out, - const string& bootcdDirectory ) -{ - for ( size_t i = 0; i < module.project.cdfiles.size (); i++ ) - { - const CDFile& cdfile = *module.project.cdfiles[i]; - FileLocation targetDirectory ( OutputDirectory, - cdfile.target->relative_path.length () > 0 - ? bootcdDirectory + sSep + cdfile.target->relative_path - : bootcdDirectory, - "" ); - out.push_back( targetDirectory ); - } -} - -void -MingwIsoModuleHandler::GetCdDirectories ( vector& out, - const string& bootcdDirectory ) -{ - GetBootstrapCdDirectories ( out, bootcdDirectory ); - GetNonModuleCdDirectories ( out, bootcdDirectory ); -} - -void -MingwIsoModuleHandler::GetBootstrapCdFiles ( - vector& out ) const -{ - for ( std::map::const_iterator p = module.project.modules.begin (); p != module.project.modules.end (); ++ p ) - { - const Module& m = *p->second; - if ( !m.enabled ) - continue; - if ( m.bootstrap != NULL ) - { - out.push_back ( *m.output ); - } - } -} - -void -MingwIsoModuleHandler::GetNonModuleCdFiles ( - vector& out ) const -{ - for ( size_t i = 0; i < module.project.cdfiles.size (); i++ ) - { - const CDFile& cdfile = *module.project.cdfiles[i]; - out.push_back ( *cdfile.source ); - } -} - -void -MingwIsoModuleHandler::GetCdFiles ( - vector& out ) const -{ - GetBootstrapCdFiles ( out ); - GetNonModuleCdFiles ( out ); -} - -void -MingwIsoModuleHandler::GenerateIsoModuleTarget () -{ - fprintf ( fMakefile, "# ISO MODULE TARGET\n" ); - string bootcdDirectory = module.name; - FileLocation bootcd ( OutputDirectory, - bootcdDirectory, - "" ); - FileLocation bootcdReactos ( OutputDirectory, - bootcdDirectory + sSep + Environment::GetCdOutputPath (), - "" ); - - // bootsector - const Module* bootModule = module.bootSector->bootSectorModule; - - if (!bootModule) - { - throw InvalidOperationException ( module.node.location.c_str(), - 0, - "Invalid bootsector. module '%s' requires ", - module.name.c_str ()); - } - - const FileLocation *isoboot = bootModule->output; - - // prepare reactos.dff and reactos.inf - FileLocation reactosDff ( SourceDirectory, - "boot" + sSep + "bootdata" + sSep + "packages", - "reactos.dff" ); - FileLocation reactosInf ( bootcdReactos.directory, - bootcdReactos.relative_path, - "reactos.inf" ); - - /* - We use only the name and not full FileLocation(ouput) because Iso/LiveIso are an exception to the general rule. - Iso/LiveIso outputs are generated in code base root - */ - string IsoName = module.output->name; - - fprintf ( fMakefile, ".PHONY: %s_CABINET\n\n", - module.name.c_str () ); - fprintf ( fMakefile, "%s_CABINET: all $(cabman_TARGET) %s | %s\n", - module.name.c_str (), - backend->GetFullName ( reactosDff ).c_str (), - backend->GetFullPath ( bootcdReactos ).c_str () ); - fprintf ( fMakefile, - "\t$(Q)$(cabman_TARGET) -C %s -L %s -I -P $(OUTPUT)\n", - backend->GetFullName ( reactosDff ).c_str (), - backend->GetFullPath ( bootcdReactos ).c_str () ); - fprintf ( fMakefile, - "\t$(Q)$(cabman_TARGET) -C %s -RC %s -L %s -N -P $(OUTPUT)\n", - backend->GetFullName ( reactosDff ).c_str (), - backend->GetFullName ( reactosInf ).c_str (), - backend->GetFullPath ( bootcdReactos ).c_str ()); - fprintf ( fMakefile, - "\t-@${rm} %s 2>$(NUL)\n\n", - backend->GetFullName ( reactosInf ).c_str () ); - - std::vector sourceFiles; - OutputBootstrapfileCopyCommands ( bootcdDirectory, sourceFiles ); - OutputCdfileCopyCommands ( bootcdDirectory, sourceFiles ); - - fprintf( fMakefile, - "\n%s_OBJS := %s\n\n", - module.name.c_str (), - backend->v2s ( sourceFiles, 5, true ).c_str () ); - - fprintf ( fMakefile, ".PHONY: %s\n\n", - module.name.c_str ()); - fprintf ( fMakefile, - "%s: $(%s_OBJS) %s_CABINET %s $(cdmake_TARGET) | %s\n", - module.name.c_str (), - module.name.c_str (), - module.name.c_str (), - backend->GetFullName ( *isoboot ).c_str (), - backend->GetFullPath ( FileLocation ( OutputDirectory, - bootcdDirectory, - "" ) ).c_str () ); - - fprintf ( fMakefile, "\t$(ECHO_CDMAKE)\n" ); - fprintf ( fMakefile, - "\t$(Q)$(cdmake_TARGET) -v -j -m -b %s %s REACTOS %s\n", - backend->GetFullName ( *isoboot ).c_str (), - backend->GetFullPath ( bootcd ).c_str (), - IsoName.c_str() ); - fprintf ( fMakefile, - "\n" ); -} - - -MingwLiveIsoModuleHandler::MingwLiveIsoModuleHandler ( - const Module& module_ ) - - : MingwModuleHandler ( module_ ) -{ -} - -void -MingwLiveIsoModuleHandler::Process () -{ - GenerateLiveIsoModuleTarget (); -} - -void -MingwLiveIsoModuleHandler::CreateDirectory ( const string& directory ) -{ - FileLocation dir ( OutputDirectory, - directory, - "" ); - MingwModuleHandler::PassThruCacheDirectory ( &dir ); -} - -void -MingwLiveIsoModuleHandler::OutputModuleCopyCommands ( string& livecdDirectory, - string& reactosDirectory, - std::vector& destinations ) -{ - for ( std::map::const_iterator p = module.project.modules.begin (); p != module.project.modules.end (); ++ p ) - { - const Module& m = *p->second; - if ( !m.enabled ) - continue; - if ( m.install ) - { - const Module& aliasedModule = backend->GetAliasedModuleOrModule ( m ); - FileLocation destination ( OutputDirectory, - m.install->relative_path.length () > 0 - ? livecdDirectory + sSep + reactosDirectory + sSep + m.install->relative_path - : livecdDirectory + sSep + reactosDirectory, - m.install->name ); - OutputCopyCommandSingle ( *aliasedModule.output, - destination); - destinations.push_back ( destination ); - } - } -} - -void -MingwLiveIsoModuleHandler::OutputNonModuleCopyCommands ( string& livecdDirectory, - string& reactosDirectory, - std::vector& destinations ) -{ - for ( size_t i = 0; i < module.project.installfiles.size (); i++ ) - { - const InstallFile& installfile = *module.project.installfiles[i]; - FileLocation target ( OutputDirectory, - installfile.target->relative_path.length () > 0 - ? livecdDirectory + sSep + reactosDirectory + sSep + installfile.target->relative_path - : livecdDirectory + sSep + reactosDirectory, - installfile.target->name ); - OutputCopyCommandSingle ( *installfile.source, target ); - destinations.push_back ( target ); - } -} - -void -MingwLiveIsoModuleHandler::OutputProfilesDirectoryCommands ( string& livecdDirectory, - vector& destinations ) -{ - CreateDirectory ( livecdDirectory + sSep + "Profiles" ); - CreateDirectory ( livecdDirectory + sSep + "Profiles" + sSep + "All Users") ; - CreateDirectory ( livecdDirectory + sSep + "Profiles" + sSep + "All Users" + sSep + "Desktop" ); - CreateDirectory ( livecdDirectory + sSep + "Profiles" + sSep + "Default User" ); - CreateDirectory ( livecdDirectory + sSep + "Profiles" + sSep + "Default User" + sSep + "Desktop" ); - CreateDirectory ( livecdDirectory + sSep + "Profiles" + sSep + "Default User" + sSep + "My Documents" ); - - FileLocation livecdIni ( SourceDirectory, - "boot" + sSep + "bootdata", - "livecd.ini" ); - FileLocation destination ( OutputDirectory, - livecdDirectory, - "freeldr.ini" ); - OutputCopyCommandSingle ( livecdIni, - destination ); - destinations.push_back ( destination ); -} - -void -MingwLiveIsoModuleHandler::OutputLoaderCommands ( string& livecdDirectory, - std::vector& destinations ) -{ - FileLocation freeldr ( OutputDirectory, - "boot" + sSep + "freeldr" + sSep + "freeldr", - "freeldr.sys" ); - FileLocation destination ( OutputDirectory, - livecdDirectory + sSep + "loader", - "setupldr.sys" ); - OutputCopyCommandSingle ( freeldr, - destination ); - destinations.push_back ( destination ); -} - -void -MingwLiveIsoModuleHandler::OutputMakeLinkCommand ( const string name, - const string application, - const string &path, - vector& destinations ) -{ - FileLocation location ( OutputDirectory, path, name + ".lnk" ); - fprintf ( fMakefile, - "%s : $(mkshelllink_TARGET)\n", - backend->GetFullNamePrefixSpaces ( *PassThruCacheDirectory ( &location ) ).c_str () ); - fprintf ( fMakefile, - "\t$(Q)$(mkshelllink_TARGET) -o \"%s\" -g {450D8FBA-AD25-11D0-98A8-0800361B1103} -c %s -i %s -m livecd_start.cmd\n", - backend->GetFullName ( location ).c_str (), - application.c_str (), - application.c_str () ); - destinations.push_back ( location ); -} - -void -MingwLiveIsoModuleHandler::OutputShortcutCommands ( string& livecdDirectory, - vector& destinations ) -{ - string allUsersDir = livecdDirectory + sSep + "Profiles" + sSep + "All Users"; - string defaultUserDir = livecdDirectory + sSep + "Profiles" + sSep + "Default User"; - FileLocation helperSource ( SourceDirectory, "boot" + sSep + "bootdata", "livecd_start.cmd" ); - FileLocation helperDest ( OutputDirectory, defaultUserDir + sSep + "My Documents", "livecd_start.cmd" ); - OutputCopyCommandSingle ( helperSource, helperDest ); - destinations.push_back ( helperDest ); - - string desktopDir = allUsersDir + sSep + "Desktop"; - OutputMakeLinkCommand ( "Command Prompt", "cmd.exe", desktopDir, destinations ); - - string startMenuDir = allUsersDir + sSep + "Start Menu"; - OutputMakeLinkCommand ( "ReactOS Explorer", "explorer.exe", startMenuDir + sSep + "Programs", destinations ); - - string adminToolsDir = startMenuDir + sSep + "Programs" + sSep + "Administrative Tools"; - OutputMakeLinkCommand ( "Device Manager", "devmgmt.exe", adminToolsDir, destinations ); - OutputMakeLinkCommand ( "Event Viewer", "eventvwr.exe", adminToolsDir, destinations ); - OutputMakeLinkCommand ( "Service Manager", "servman.exe", adminToolsDir, destinations ); - OutputMakeLinkCommand ( "System Configuration", "msconfig.exe", adminToolsDir, destinations ); - - string accessibilityDir = startMenuDir + sSep + "Programs" + sSep + "Accessibility"; - OutputMakeLinkCommand ( "Magnify", "magnify.exe", accessibilityDir, destinations ); - - string accessoriesDir = startMenuDir + sSep + "Programs" + sSep + "Accessories"; - OutputMakeLinkCommand ( "Calculator", "calc.exe", accessoriesDir, destinations ); - OutputMakeLinkCommand ( "Command Prompt", "cmd.exe", accessoriesDir, destinations ); - OutputMakeLinkCommand ( "Paint", "mspaint.exe", accessoriesDir, destinations ); - OutputMakeLinkCommand ( "Notepad", "notepad.exe", accessoriesDir, destinations ); - OutputMakeLinkCommand ( "Remote desktop", "mstsc.exe", accessoriesDir, destinations ); - OutputMakeLinkCommand ( "WordPad", "wordpad.exe", accessoriesDir, destinations ); - - string entertainmentDir = startMenuDir + sSep + "Programs" + sSep + "Entertainment"; - OutputMakeLinkCommand ( "Audiorecorder", "sndrec32.exe", entertainmentDir, destinations ); - OutputMakeLinkCommand ( "Multimedia Player", "mplay32.exe", entertainmentDir, destinations ); - OutputMakeLinkCommand ( "Volume Control", "sndvol32.exe", entertainmentDir, destinations ); - - string gamesDir = startMenuDir + sSep + "Programs" + sSep + "Games"; - OutputMakeLinkCommand ( "Solitaire", "sol.exe", gamesDir, destinations ); - OutputMakeLinkCommand ( "Spider Solitaire", "spider.exe", gamesDir, destinations ); - OutputMakeLinkCommand ( "WineMine", "winmine.exe", gamesDir, destinations ); - - string sysToolsDir = startMenuDir + sSep + "Programs" + sSep + "System Tools"; - OutputMakeLinkCommand ( "Character Map", "charmap.exe", sysToolsDir, destinations ); - OutputMakeLinkCommand ( "Keyboard Layout Switcher", "kbswitch.exe", sysToolsDir, destinations ); - OutputMakeLinkCommand ( "ReactX Diagnostic", "dxdiag.exe", sysToolsDir, destinations ); - OutputMakeLinkCommand ( "Regedit", "regedit.exe", sysToolsDir, destinations ); -} - -void -MingwLiveIsoModuleHandler::OutputRegistryCommands ( string& livecdDirectory ) -{ - string registrySourceFiles = backend->GetRegistrySourceFiles (); - fprintf ( fMakefile, "# REGISTRY COMMANDS\n" ); - FileLocation reactosSystem32ConfigDirectory ( OutputDirectory, - livecdDirectory + sSep + "reactos" + sSep + "system32" + sSep + "config", - "" ); - fprintf ( fMakefile, - "\t$(ECHO_MKHIVE)\n" ); - fprintf ( fMakefile, - "\t$(Q)$(mkhive_TARGET) %s %s boot%cbootdata%clivecd.inf\n", - backend->GetFullPath ( reactosSystem32ConfigDirectory ).c_str (), - registrySourceFiles.c_str(), - cSep, cSep ); -} - -void -MingwLiveIsoModuleHandler::GenerateLiveIsoModuleTarget () -{ - fprintf ( fMakefile, "# LIVE ISO MODULE TARGET\n" ); - string livecdDirectory = module.name; - FileLocation livecd ( OutputDirectory, livecdDirectory, "" ); - - string IsoName; - - // bootsector - const Module* bootModule = module.bootSector->bootSectorModule; - - if (!bootModule) - { - throw InvalidOperationException ( module.node.location.c_str(), - 0, - "Invalid bootsector. module '%s' requires ", - module.name.c_str ()); - } - - const FileLocation *isoboot = bootModule->output; - - /* - We use only the name and not full FileLocation(ouput) because Iso/LiveIso are an exception to the general rule. - Iso/LiveIso outputs are generated in code base root - */ - IsoName = module.output->name; - - string reactosDirectory = "reactos"; - string livecdReactosNoFixup = livecdDirectory + sSep + reactosDirectory; - FileLocation livecdReactos ( OutputDirectory, - livecdReactosNoFixup, - "" ); - CLEAN_FILE ( livecdReactos ); - - std::vector sourceFiles; - OutputModuleCopyCommands ( livecdDirectory, - reactosDirectory, - sourceFiles ); - OutputNonModuleCopyCommands ( livecdDirectory, - reactosDirectory, - sourceFiles ); - OutputProfilesDirectoryCommands ( livecdDirectory, sourceFiles ); - OutputLoaderCommands ( livecdDirectory, sourceFiles ); - OutputShortcutCommands ( livecdDirectory, sourceFiles ); - - fprintf( fMakefile, - "\n%s_OBJS := %s\n\n", - module.name.c_str (), - backend->v2s ( sourceFiles, 5, true ).c_str () ); - - fprintf ( fMakefile, ".PHONY: %s\n\n", - module.name.c_str ()); - fprintf ( fMakefile, - "%s : $(%s_OBJS) %s %s $(mkhive_TARGET) $(cdmake_TARGET)\n", - module.name.c_str (), - module.name.c_str (), - backend->GetFullName ( *isoboot) .c_str (), - backend->GetFullPath ( FileLocation ( OutputDirectory, - livecdDirectory, - "" ) ).c_str () ); - OutputRegistryCommands ( livecdDirectory ); - fprintf ( fMakefile, "\t$(ECHO_CDMAKE)\n" ); - fprintf ( fMakefile, - "\t$(Q)$(cdmake_TARGET) -v -m -j -b %s %s REACTOS %s\n", - backend->GetFullName( *isoboot ).c_str (), - backend->GetFullPath ( livecd ).c_str (), - IsoName.c_str() ); - fprintf ( fMakefile, - "\n" ); -} - - -MingwTestModuleHandler::MingwTestModuleHandler ( - const Module& module_ ) - - : MingwModuleHandler ( module_ ) -{ -} - -void -MingwTestModuleHandler::Process () -{ - GenerateTestModuleTarget (); -} - -/* caller needs to delete the returned object */ -void -MingwTestModuleHandler::GetModuleSpecificCompilationUnits ( vector& compilationUnits ) -{ - compilationUnits.push_back ( new CompilationUnit ( new File ( IntermediateDirectory, module.output->relative_path + sSep + "..", module.name + "_hooks.c", false, "", false ) ) ); - compilationUnits.push_back ( new CompilationUnit ( new File ( IntermediateDirectory, module.output->relative_path + sSep + "..", module.name + "_stubs.S", false, "", false ) ) ); - compilationUnits.push_back ( new CompilationUnit ( new File ( IntermediateDirectory, module.output->relative_path + sSep + "..", module.name + "_startup.c", false, "", false ) ) ); -} - -void -MingwTestModuleHandler::GenerateTestModuleTarget () -{ - GenerateRules (); - GenerateLinkerCommand (); -} - - -MingwAliasModuleHandler::MingwAliasModuleHandler ( - const Module& module_ ) - - : MingwModuleHandler ( module_ ) -{ -} - -void -MingwAliasModuleHandler::Process () -{ -} - - -MingwCabinetModuleHandler::MingwCabinetModuleHandler ( - const Module& module_ ) - - : MingwModuleHandler ( module_ ) -{ -} - -void -MingwCabinetModuleHandler::Process () -{ - fprintf ( fMakefile, "# CABINET MODULE TARGET\n" ); - string targetMacro ( GetTargetMacro (module) ); - - GenerateRules (); - - const FileLocation *target_file = GetTargetFilename ( module, NULL ); - fprintf ( fMakefile, "%s: $(cabman_TARGET) | %s\n", - targetMacro.c_str (), - backend->GetFullPath ( *target_file ).c_str () ); - - fprintf ( fMakefile, "\t$(ECHO_CABMAN)\n" ); - fprintf ( fMakefile, - "\t$(Q)$(cabman_TARGET) -M raw -S %s $(%s_SOURCES)\n", // Escape the asterisk for Make - targetMacro.c_str (), - module.name.c_str()); -} - -MingwElfExecutableModuleHandler::MingwElfExecutableModuleHandler ( - const Module& module_ ) - - : MingwModuleHandler ( module_ ) -{ -} - -void -MingwElfExecutableModuleHandler::Process () -{ - string targetName ( module.output->name ); - string targetMacro ( GetTargetMacro (module) ); - string workingDirectory = GetWorkingDirectory (); - string objectsMacro = GetObjectsMacro ( module ); - string libsMacro = GetLibsMacro (); - string debugFormat = GetDebugFormat (); - - fprintf ( fMakefile, "# ELF EXECUTABLE TARGET\n" ); - GenerateRules (); - - const FileLocation *target_file = GetTargetFilename ( module, NULL ); - fprintf ( fMakefile, "%s: %s %s | %s\n", - targetMacro.c_str (), - objectsMacro.c_str (), - libsMacro.c_str (), - backend->GetFullPath ( *target_file ).c_str () ); - - fprintf ( fMakefile, "\t$(ECHO_BOOTPROG)\n" ); - - fprintf ( fMakefile, "\t${gcc} $(%s_LINKFORMAT) %s %s -g%s -o %s\n", - module.buildtype.c_str(), - objectsMacro.c_str(), - libsMacro.c_str(), - debugFormat.c_str(), - targetMacro.c_str () ); - - delete target_file; - fprintf ( fMakefile, "#/ELF EXECUTABLE TARGET\n" ); -} diff --git a/reactos/tools/rbuild/backend/mingw/modulehandler.h b/reactos/tools/rbuild/backend/mingw/modulehandler.h deleted file mode 100644 index e4536d245f5..00000000000 --- a/reactos/tools/rbuild/backend/mingw/modulehandler.h +++ /dev/null @@ -1,378 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 - -#include "../backend.h" -#include "mingw.h" - -class MingwBackend; -class Rule; - -extern std::string -GetTargetMacro ( const Module&, bool with_dollar = true ); - -extern std::string -PrefixFilename ( - const std::string& filename, - const std::string& prefix ); - -class MingwModuleHandler -{ -public: - MingwModuleHandler ( const Module& module_ ); - virtual ~MingwModuleHandler(); - - static void SetBackend ( MingwBackend* backend_ ); - static void SetMakefile ( FILE* f ); - void EnablePreCompiledHeaderSupport (); - - static const FileLocation* PassThruCacheDirectory (const FileLocation* fileLocation ); - - static const FileLocation* GetTargetFilename ( - const Module& module, - string_list* pclean_files ); - - static const FileLocation* GetImportLibraryFilename ( - const Module& module, - string_list* pclean_files, - bool delayimp ); - - static std::string GenerateGccDefineParametersFromVector ( const std::vector& defines, std::set &used_defs ); - static std::string GenerateDefineParametersFromVector ( const std::vector& defines, CompilerType compiler ); - static std::string GenerateCompilerParametersFromVector ( const std::vector& compilerFlags, const CompilerType type ); - static std::string GenerateIncludeParametersFromVector ( const std::vector& includes, CompilerType compiler ); - - static void GenerateParameters ( const char* prefix, - const char* assignmentOperation, - const IfableData& data ); - - std::string GetModuleTargets ( const Module& module ); - void GetObjectsVector ( const IfableData& data, - std::vector& objectFiles ) const; - void GenerateSourceMacro(); - void GenerateObjectMacro(); - void GenerateTargetMacro(); - void GenerateOtherMacros(); - - static MingwModuleHandler* InstanciateHandler ( const Module& module_, - MingwBackend* backend_ ); - void GeneratePreconditionDependencies (); - virtual void Process () { GenerateRules (); } - void GenerateInvocations () const; - void GenerateCleanTarget () const; - void GenerateInstallTarget () const; - void GenerateDependsTarget () const; - static bool ReferenceObjects ( const Module& module ); - virtual void AddImplicitLibraries ( Module& module ) { return; } - - void OutputCopyCommand ( const FileLocation& source, - const FileLocation& destination ); - void OutputCopyCommandSingle ( const FileLocation& source, - const FileLocation& destination ); -protected: - virtual void GetModuleSpecificCompilationUnits ( std::vector& compilationUnits ); - std::string GetWorkingDirectory () const; - std::string GetBasename ( const std::string& filename ) const; - std::string GetCompilationUnitDependencies ( const CompilationUnit& compilationUnit ) const; - const FileLocation* GetModuleArchiveFilename () const; - std::string GetImportLibraryDependency ( const Module& importedModule, bool delayimp ); - void GetTargets ( const Module& dependencyModule, - string_list& targets ); - void GetModuleDependencies ( string_list& dependencies ); - std::string GetAllDependencies () const; - const FileLocation* GetObjectFilename ( const FileLocation* sourceFile, - const Module& module ) const; - - std::string GetPreconditionDependenciesName () const; - static std::string GetObjectsMacro ( const Module& ); - std::string GetLinkingDependenciesMacro () const; - std::string GetLibsMacro () const; - std::string GetLinkerMacro () const; - static std::string GetDebugFormat (); - void GenerateCleanObjectsAsYouGoCode () const; - void GenerateLinkerCommand () const; - void GenerateBuildMapCode ( const FileLocation *mapTarget = NULL ); - void GenerateRules (); - void GenerateImportLibraryTargetIfNeeded (); - void GetDefinitionDependencies ( std::vector& dependencies ) const; - std::string GetLinkingDependencies () const; - static MingwBackend* backend; - static FILE* fMakefile; - bool use_pch; -private: - std::string ConcatenatePaths ( const std::string& path1, - const std::string& path2 ) const; - std::string GenerateLinkerParametersFromVector ( const std::vector& linkerFlags ) const; - std::string GenerateImportLibraryDependenciesFromVector ( const std::vector& libraries ); - std::string GenerateLinkerParameters () const; - void GenerateMacros ( const char* op, - const IfableData& data, - const std::vector* linkerFlags, - std::set& used_defs ); - void GenerateSourceMacros ( const IfableData& data ); - void GenerateObjectMacros ( const IfableData& data ); - const FileLocation* GetPrecompiledHeaderFilename () const; - const FileLocation* GetPrecompiledHeaderPath () const; - const FileLocation* GetDlldataFilename () const; - void GenerateGccCommand ( const FileLocation* sourceFile, - const Rule *rule, - const std::string& extraDependencies ); - void GenerateCommands ( const CompilationUnit& compilationUnit, - const std::string& extraDependencies ); - void GenerateObjectFileTargets ( const IfableData& data ); - void GenerateObjectFileTargets (); - const FileLocation* GenerateArchiveTarget (); - void GetMcObjectDependencies ( std::vector& dependencies, - const FileLocation *file ) const; - void GetSpecObjectDependencies ( std::vector& dependencies, - const FileLocation *file ) const; - void GetSpecImplibDependencies ( std::vector& dependencies, - const FileLocation *file ) const; - void GetWidlObjectDependencies ( std::vector& dependencies, - const FileLocation *file ) const; - void GetDefaultDependencies ( string_list& dependencies ) const; - void GetInvocationDependencies ( const Module& module, string_list& dependencies ); - SpecFileType IsSpecDefinitionFile () const; - const FileLocation* GetDefinitionFilename () const; - void GenerateBuildNonSymbolStrippedCode (); - void CleanupCompilationUnitVector ( std::vector& compilationUnits ); - void GetRpcHeaderDependencies ( std::vector& dependencies ) const; - void GetMcHeaderDependencies ( std::vector& dependencies ) const; - static std::string GetPropertyValue ( const Module& module, const std::string& name ); - const FileLocation* GetRpcServerHeaderFilename ( const FileLocation *base ) const; - const FileLocation* GetRpcClientHeaderFilename ( const FileLocation *base ) const; - const FileLocation* GetRpcProxyHeaderFilename ( const FileLocation *base ) const; - const FileLocation* GetIdlHeaderFilename ( const FileLocation *base ) const; - const FileLocation* GetMcHeaderFilename ( const FileLocation *base ) const; - std::string GetModuleCleanTarget ( const Module& module ) const; - void GetReferencedObjectLibraryModuleCleanTargets ( std::vector& moduleNames ) const; -public: - const Module& module; - string_list clean_files; - std::string commonflagsMacro; - std::string cflagsMacro; - std::string cxxflagsMacro; - std::string nasmflagsMacro; - std::string windresflagsMacro; - std::string widlflagsMacro; - std::string linkerflagsMacro; - std::string sourcesMacro; - std::string objectsMacro; - std::string libsMacro; - std::string linkDepsMacro; -}; - - -class MingwBuildToolModuleHandler : public MingwModuleHandler -{ -public: - MingwBuildToolModuleHandler ( const Module& module ); - virtual void Process (); -private: - void GenerateBuildToolModuleTarget (); -}; - - -class MingwKernelModuleHandler : public MingwModuleHandler -{ -public: - MingwKernelModuleHandler ( const Module& module ); - virtual void Process (); -private: - void GenerateKernelModuleTarget (); -}; - - -class MingwKernelModeDLLModuleHandler : public MingwModuleHandler -{ -public: - MingwKernelModeDLLModuleHandler ( const Module& module ); - virtual void Process (); - void AddImplicitLibraries ( Module& module ); -private: - void GenerateKernelModeDLLModuleTarget (); -}; - - -class MingwNativeDLLModuleHandler : public MingwModuleHandler -{ -public: - MingwNativeDLLModuleHandler ( const Module& module ); - virtual void Process (); - void AddImplicitLibraries ( Module& module ); -private: - void GenerateNativeDLLModuleTarget (); -}; - - -class MingwNativeCUIModuleHandler : public MingwModuleHandler -{ -public: - MingwNativeCUIModuleHandler ( const Module& module ); - virtual void Process (); - void AddImplicitLibraries ( Module& module ); -private: - void GenerateNativeCUIModuleTarget (); -}; - - -class MingwWin32DLLModuleHandler : public MingwModuleHandler -{ -public: - MingwWin32DLLModuleHandler ( const Module& module ); - virtual void Process (); - void AddImplicitLibraries ( Module& module ); -private: - void GenerateWin32DLLModuleTarget (); -}; - - -class MingwWin32OCXModuleHandler : public MingwModuleHandler -{ -public: - MingwWin32OCXModuleHandler ( const Module& module ); - virtual void Process (); - void AddImplicitLibraries ( Module& module ); -private: - void GenerateWin32OCXModuleTarget (); -}; - - -class MingwWin32CUIModuleHandler : public MingwModuleHandler -{ -public: - MingwWin32CUIModuleHandler ( const Module& module ); - virtual void Process (); - void AddImplicitLibraries ( Module& module ); -private: - void GenerateWin32CUIModuleTarget (); -}; - - -class MingwWin32GUIModuleHandler : public MingwModuleHandler -{ -public: - MingwWin32GUIModuleHandler ( const Module& module ); - virtual void Process (); - void AddImplicitLibraries ( Module& module ); -private: - void GenerateWin32GUIModuleTarget (); -}; - - -class MingwBootLoaderModuleHandler : public MingwModuleHandler -{ -public: - MingwBootLoaderModuleHandler ( const Module& module ); - virtual void Process (); -private: - void GenerateBootLoaderModuleTarget (); -}; - - -class MingwBootProgramModuleHandler : public MingwModuleHandler -{ -public: - MingwBootProgramModuleHandler ( const Module& module ); - virtual void Process (); - std::string GetProgTextAddrMacro (); -private: - void GenerateBootProgramModuleTarget (); -}; - - -class MingwIsoModuleHandler : public MingwModuleHandler -{ -public: - MingwIsoModuleHandler ( const Module& module ); - virtual void Process (); -private: - void GenerateIsoModuleTarget (); - void GetBootstrapCdDirectories ( std::vector& out, const std::string& bootcdDirectory ); - void GetNonModuleCdDirectories ( std::vector& out, const std::string& bootcdDirectory ); - void GetCdDirectories ( std::vector& out, const std::string& bootcdDirectory ); - void GetBootstrapCdFiles ( std::vector& out ) const; - void GetNonModuleCdFiles ( std::vector& out ) const; - void GetCdFiles ( std::vector& out ) const; - void OutputBootstrapfileCopyCommands ( const std::string& bootcdDirectory, - std::vector& destinations ); - void OutputCdfileCopyCommands ( const std::string& bootcdDirectory, - std::vector& destinations ); -}; - - -class MingwLiveIsoModuleHandler : public MingwModuleHandler -{ -public: - MingwLiveIsoModuleHandler ( const Module& module ); - virtual void Process (); -private: - void GenerateLiveIsoModuleTarget (); - void CreateDirectory ( const std::string& directory ); - void OutputModuleCopyCommands ( std::string& livecdDirectory, - std::string& livecdReactos, - std::vector& destinations ); - void OutputNonModuleCopyCommands ( std::string& livecdDirectory, - std::string& livecdReactos, - std::vector& destinations ); - void OutputProfilesDirectoryCommands ( std::string& livecdDirectory, - std::vector& destinations ); - void OutputLoaderCommands ( std::string& livecdDirectory, - std::vector& destinations ); - void OutputMakeLinkCommand ( const std::string name, - const std::string application, - const std::string &path, - std::vector& destinations ); - void OutputShortcutCommands ( std::string& livecdDirectory, - std::vector& destinations ); - void OutputRegistryCommands ( std::string& livecdDirectory ); -}; - - -class MingwTestModuleHandler : public MingwModuleHandler -{ -public: - MingwTestModuleHandler ( const Module& module ); - virtual void Process (); -protected: - virtual void GetModuleSpecificCompilationUnits ( std::vector& compilationUnits ); -private: - void GenerateTestModuleTarget (); -}; - -class MingwAliasModuleHandler : public MingwModuleHandler -{ -public: - MingwAliasModuleHandler ( const Module& module ); - virtual void Process (); -}; - -class MingwCabinetModuleHandler : public MingwModuleHandler -{ -public: - MingwCabinetModuleHandler ( const Module& module ); - virtual void Process (); -}; - -class MingwElfExecutableModuleHandler : public MingwModuleHandler -{ -public: - MingwElfExecutableModuleHandler ( const Module& module ); - virtual void Process (); -}; diff --git a/reactos/tools/rbuild/backend/mingw/mstools_detection.cpp b/reactos/tools/rbuild/backend/mingw/mstools_detection.cpp deleted file mode 100644 index bc8ea8b68ad..00000000000 --- a/reactos/tools/rbuild/backend/mingw/mstools_detection.cpp +++ /dev/null @@ -1,2295 +0,0 @@ -/* - * Copyright (C) 2009 KJK::Hyperion - * - * 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. - */ - -#if defined(WIN32) - -#define UNICODE -#define _UNICODE - -#define NOMINMAX - -#include "../../pch.h" - -#include "mingw.h" - -#ifndef ARRAYSIZE -#define ARRAYSIZE(X_) (sizeof(X_) / sizeof((X_)[0])) -#endif - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(_CPPLIB_VER) -#include -typedef std::filebuf stdio_filebuf; -#elif defined(__GLIBCXX__) -#include -typedef __gnu_cxx::stdio_sync_filebuf stdio_filebuf; -#else -#error Unknown or unsupported C++ standard library -#endif - - - -namespace -{ - -#if 1 -HRESULT dispPropGet(IDispatch * object, DISPID dispid, VARIANTARG * args, UINT ccArgs, VARTYPE vt, VARIANT& result) -{ - HRESULT hr; - - DISPPARAMS params = {}; - params.rgvarg = args; - params.cArgs = ccArgs; - - hr = object->Invoke(dispid, IID_NULL, 0, DISPATCH_PROPERTYGET | (ccArgs ? DISPATCH_METHOD : 0), ¶ms, &result, NULL, NULL); - - if(SUCCEEDED(hr)) - hr = VariantChangeType(&result, &result, 0, vt); - - return hr; -} - -HRESULT dispPropGet(IDispatch * object, const OLECHAR * name, VARIANTARG * args, UINT ccArgs, VARTYPE vt, VARIANT& result) -{ - HRESULT hr; - - DISPID dispid; - hr = object->GetIDsOfNames(IID_NULL, const_cast(&name), 1, 0, &dispid); - - if(SUCCEEDED(hr)) - hr = dispPropGet(object, dispid, args, ccArgs, vt, result); - - return hr; -} - -VARIANT dispPropGet(HRESULT& hr, IDispatch * object, DISPID dispid, VARTYPE vt) -{ - VARIANT ret; - VariantInit(&ret); - - if(SUCCEEDED(hr)) - hr = dispPropGet(object, dispid, 0, 0, vt, ret); - - return ret; -} - -VARIANT dispPropGet(HRESULT& hr, IDispatch * object, const OLECHAR * name, VARTYPE vt) -{ - VARIANT ret; - VariantInit(&ret); - - if(SUCCEEDED(hr)) - hr = dispPropGet(object, name, 0, 0, vt, ret); - - return ret; -} - -HRESULT dispInvoke(IDispatch * object, DISPID dispid, VARIANTARG * args, UINT ccArgs, VARTYPE vt, VARIANT& result) -{ - HRESULT hr; - - DISPPARAMS params = {}; - params.rgvarg = args; - params.cArgs = ccArgs; - - hr = object->Invoke(dispid, IID_NULL, 0, DISPATCH_METHOD, ¶ms, &result, NULL, NULL); - - if(SUCCEEDED(hr)) - hr = VariantChangeType(&result, &result, 0, vt); - - return hr; -} - -HRESULT dispInvoke(IDispatch * object, DISPID dispid, const VARIANTARG& arg, VARTYPE vt, VARIANT& result) -{ - return dispInvoke(object, dispid, const_cast(&arg), 1, vt, result); -} - -HRESULT dispInvoke(IDispatch * object, DISPID dispid, VARTYPE vt, VARIANT& result) -{ - return dispInvoke(object, dispid, NULL, 0, vt, result); -} - -HRESULT dispInvoke(IDispatch * object, VARIANTARG * args, UINT ccArgs, VARTYPE vt, VARIANT& result) -{ - return dispInvoke(object, DISPID_VALUE, args, ccArgs, vt, result); -} - -HRESULT dispInvoke(IDispatch * object, VARTYPE vt, VARIANT& result) -{ - return dispInvoke(object, DISPID_VALUE, NULL, 0, vt, result); -} - -HRESULT dispInvoke(IDispatch * object, const VARIANTARG& arg, VARTYPE vt, VARIANT& result) -{ - return dispInvoke(object, DISPID_VALUE, const_cast(&arg), 1, vt, result); -} - -HRESULT dispInvoke(IDispatch * object, const OLECHAR * name, VARIANTARG * args, UINT ccArgs, VARTYPE vt, VARIANT& result) -{ - HRESULT hr; - - DISPID dispid; - hr = object->GetIDsOfNames(IID_NULL, const_cast(&name), 1, 0, &dispid); - - if(SUCCEEDED(hr)) - hr = dispInvoke(object, dispid, args, ccArgs, vt, result); - - return hr; -} - -HRESULT dispInvoke(IDispatch * object, const OLECHAR * name, const VARIANTARG& arg, VARTYPE vt, VARIANT& result) -{ - return dispInvoke(object, name, const_cast(&arg), 1, vt, result); -} - -HRESULT dispInvoke(IDispatch * object, const OLECHAR * name, VARTYPE vt, VARIANT& result) -{ - return dispInvoke(object, name, NULL, 0, vt, result); -} - -VARIANT dispInvoke(HRESULT& hr, IDispatch * object, DISPID dispid, VARIANTARG * args, UINT ccArgs, VARTYPE vt) -{ - VARIANT ret; - VariantInit(&ret); - - if(SUCCEEDED(hr)) - hr = dispInvoke(object, dispid, args, ccArgs, vt, ret); - - return ret; -} - -VARIANT dispInvoke(HRESULT& hr, IDispatch * object, const OLECHAR * name, VARIANTARG * args, UINT ccArgs, VARTYPE vt) -{ - VARIANT ret; - VariantInit(&ret); - - if(SUCCEEDED(hr)) - hr = dispInvoke(object, name, args, ccArgs, vt, ret); - - return ret; -} - -VARIANT dispInvoke(HRESULT& hr, IDispatch * object, DISPID dispid, const VARIANTARG& arg, VARTYPE vt) -{ - return dispInvoke(hr, object, dispid, const_cast(&arg), 1, vt); -} - -VARIANT dispInvoke(HRESULT& hr, IDispatch * object, DISPID dispid, VARTYPE vt) -{ - return dispInvoke(hr, object, dispid, NULL, 0, vt); -} - -VARIANT dispInvoke(HRESULT& hr, IDispatch * object, VARIANTARG * args, UINT ccArgs, VARTYPE vt) -{ - return dispInvoke(hr, object, DISPID(DISPID_VALUE), args, ccArgs, vt); -} - -VARIANT dispInvoke(HRESULT& hr, IDispatch * object, VARTYPE vt) -{ - return dispInvoke(hr, object, DISPID(DISPID_VALUE), NULL, 0, vt); -} - -VARIANT dispInvoke(HRESULT& hr, IDispatch * object, const VARIANTARG& arg, VARTYPE vt) -{ - return dispInvoke(hr, object, DISPID(DISPID_VALUE), const_cast(&arg), 1, vt); -} - -VARIANT dispInvoke(HRESULT& hr, IDispatch * object, const OLECHAR * name, const VARIANTARG& arg, VARTYPE vt) -{ - return dispInvoke(hr, object, name, const_cast(&arg), 1, vt); -} - -VARIANT dispInvoke(HRESULT& hr, IDispatch * object, const OLECHAR * name, VARTYPE vt) -{ - return dispInvoke(hr, object, name, NULL, 0, vt); -} - -VARIANT oleString(HRESULT& hr, const OLECHAR * sz) -{ - VARIANT v; - VariantInit(&v); - - if(SUCCEEDED(hr)) - { - V_VT(&v) = VT_BSTR; - V_BSTR(&v) = SysAllocString(sz); - - if(!V_BSTR(&v)) - hr = E_OUTOFMEMORY; - } - - if(FAILED(hr)) - { - V_VT(&v) = VT_ERROR; - V_ERROR(&v) = hr; - } - - return v; -} - -#endif - -#if 1 -namespace knuth_morris_pratt -{ - -namespace details -{ - -template -typename std::iterator_traits::iterator_category iterator_category(const Iter&) -{ - return typename std::iterator_traits::iterator_category(); -} - -template -struct type_equals -{ - enum { value = 0 }; -}; - -template -struct type_equals -{ - enum { value = 1 }; -}; - -template -void advance_substr(Iter& pos, Iter, diff_type, diff_type rel, const std::bidirectional_iterator_tag&) -{ - std::advance(pos, rel); -} - -template -void advance_substr(Iter& pos, Iter begin, diff_type absol, diff_type rel, const std::forward_iterator_tag&) -{ - if(rel > 0) - std::advance(pos, rel); - else - { - pos = begin; - std::advance(pos, absol); - } -} - -template -void advance_substr(Iter& pos, Iter begin, diff_type absol, diff_type rel) -{ - advance_substr(pos, begin, absol, rel, iterator_category(pos)); -} - -template -struct fixed_table -{ -public: - typedef typename std::iterator_traits::difference_type value_type; - typedef value_type * pointer; - typedef value_type& reference; - typedef const value_type * const_pointer; - typedef const value_type& const_reference; - typedef typename std::allocator::difference_type difference_type; - typedef typename std::allocator::size_type size_type; - -private: - value_type m_table[(N)]; - -public: - static pointer address(reference r) { return &r; } - static const_pointer address(const_reference r) { return &r; } - static size_type max_size() { return (N); } - static void construct(pointer p, const T& v) { p->T(v); } - static void destroy(pointer p) { p->~T(); } - template struct rebind { typedef fixed_table other; }; - - template pointer allocate(size_type n, const Other * hint) - { - assert(n <= (N)); - assert(hint == 0); - return m_table; - } - - pointer allocate(size_type n) - { - assert(n <= (N)); - return m_table; - } - - void deallocate(pointer p, size_type n) const - { - assert(p == m_table); - assert(n <= (N)); - } -}; - -void validate_range_iterator_category(const std::input_iterator_tag&) { } -void validate_substr_iterator_category(const std::forward_iterator_tag&) { } - -template -RangeIter search_cornercase_neg(RangeIter, RangeIter end, SubstrIter) -{ - return end; -} - -template -RangeIter search_cornercase0(RangeIter begin, RangeIter, SubstrIter) -{ - return begin; -} - -template -RangeIter search_cornercase1(RangeIter begin, RangeIter end, SubstrIter substrBegin) -{ - RangeIter pos = std::find(begin, end, *substrBegin); - - if(type_equals::iterator_category, std::input_iterator_tag>::value && pos != end) - ++ pos; - - return pos; -} - -template -void search_createtable_dynamic -( - SubstrIter beginSubstr, - typename std::iterator_traits::difference_type substrSize, - TableType table, - TableSize -) -{ - typedef typename std::iterator_traits::difference_type substr_diff_type; - typedef typename TableType::pointer table_type; - typedef TableSize table_size_type; - - substr_diff_type i(2); - SubstrIter pi = beginSubstr; - std::advance(pi, substr_diff_type(1)); - - substr_diff_type j(0); - SubstrIter pj = beginSubstr; - std::advance(pj, substr_diff_type(0)); - - while(i < substrSize) - { - if(*pi == *pj) - { - substr_diff_type new_j = j; - ++ new_j; - - table[static_cast(i)] = new_j; - - ++ i; ++ pi; - ++ j; ++ pj; - } - else if(j > 0) - { - substr_diff_type new_j = table[i]; - details::advance_substr(pj, beginSubstr, new_j, new_j - j); - j = new_j; - } - else - { - table[i] = 0; - ++ i; ++ pi; - } - } -} - -template -void search_createtable_static -( - const S (& substr)[N], - D (& table)[N] -) -{ - typedef std::ptrdiff_t substr_diff_type; - - table[0] = substr_diff_type(-1); - table[1] = substr_diff_type(0); - - substr_diff_type pos = 2; - substr_diff_type cnd = 0; - - while(pos < static_cast(N)) - { - if(substr[pos - 1] == substr[cnd]) - { - table[pos] = cnd + 1; - ++ pos; - ++ cnd; - } - else if(cnd > 0) - cnd = table[cnd]; - else - { - table[pos] = 0; - ++ pos; - } - } -} - -template -RangeIter search -( - const RangeIter& begin, - const RangeIter& end, - const SubstrIter beginSubstr, - typename std::iterator_traits::difference_type substrSize, - Table table, - TableSize -) -{ - details::validate_range_iterator_category(details::iterator_category(begin)); - details::validate_substr_iterator_category(details::iterator_category(beginSubstr)); - - typedef typename std::iterator_traits::difference_type substr_diff_type; - typedef Table table_type; - typedef TableSize table_size_type; - - // Find the next match - substr_diff_type iSubstr(0); // i - RangeIter pCurMatch = begin; // m - RangeIter pCurElem = begin; // m + i - SubstrIter pCurSubstrElem = beginSubstr; // i - - while(pCurElem != end) - { - if(*pCurSubstrElem == *pCurElem) - { - ++ iSubstr; // ++ i - - if(iSubstr == substrSize) - { - // For input iterators, we return the end of the match - if(type_equals::iterator_category, std::input_iterator_tag>::value) - ++ pCurElem; // return m + i + 1 - // For all other iterators, we return the beginning of the match - else - pCurElem = pCurMatch; // return m - - break; - } - - ++ pCurElem; // ++ i - ++ pCurSubstrElem; // ++ i - } - else - { - substr_diff_type table_iSubstr = table[static_cast(iSubstr)]; // T[i] - substr_diff_type iSubstr_backtracked = iSubstr - table_iSubstr; // i - T[i] - assert(iSubstr_backtracked >= substr_diff_type(0)); - - if(!type_equals::iterator_category, std::input_iterator_tag>::value) - std::advance(pCurMatch, iSubstr_backtracked); // m = m + i - T[i] - - if(iSubstr > substr_diff_type(0)) // i > 0 - { - iSubstr = table_iSubstr; // i = T[i] - pCurSubstrElem = beginSubstr; - std::advance(pCurSubstrElem, iSubstr); // i = T[i] - } - else - std::advance(pCurElem, iSubstr_backtracked); - } - } - - return pCurElem; -} - -}; - -template -RangeIter search(RangeIter begin, RangeIter end, SubstrIter beginSubstr, SubstrIter endSubstr, AllocTable& allocTable) -{ - typename std::iterator_traits::difference_type substrSize = std::distance(beginSubstr, endSubstr); - - if(substrSize < 0) - return knuth_morris_pratt::details::search_cornercase_neg(begin, end, beginSubstr); - - if(substrSize == 0) - return knuth_morris_pratt::details::search_cornercase0(begin, end, beginSubstr); - - if(substrSize == 1) - return knuth_morris_pratt::details::search_cornercase1(begin, end, beginSubstr); - - typedef typename AllocTable::size_type table_size; - typedef typename AllocTable::pointer table_type; - - table_size tableSize = static_cast(substrSize); - table_type table = allocTable.allocate(tableSize); - - RangeIter pos = knuth_morris_pratt::details::search(begin, end, beginSubstr, substrSize, table, tableSize); - - allocTable.deallocate(table, tableSize); - - return pos; -} - -template -RangeIter search(RangeIter begin, RangeIter end, SubstrIter beginSubstr, SubstrIter endSubstr) -{ - std::allocator::difference_type> allocTable; - return knuth_morris_pratt::search(begin, end, beginSubstr, endSubstr, allocTable); -} - -template -RangeIter search(RangeIter begin, RangeIter end, const SubstrElem (& substr)[(N)]) -{ - if((N) == 0) - return knuth_morris_pratt::details::search_cornercase0(begin, end, substr); - - if((N) == 1) - return knuth_morris_pratt::details::search_cornercase1(begin, end, substr); - - if((N) * sizeof(SubstrElem) <= 4096) - { - ptrdiff_t table[N]; - knuth_morris_pratt::details::search_createtable_static(substr, table); - return knuth_morris_pratt::details::search(begin, end, substr, (N), table, sizeof(table)); - } - else - return knuth_morris_pratt::search(begin, end, substr, substr + (N)); -} - -} -#endif - -#if 1 -template -std::basic_string replace(const std::basic_string& str, const CharT (& substr)[(N)], ReplIter replBegin, ReplIter replEnd) -{ - if((N) == 0) - return str; - - std::basic_string newStr; - typename std::basic_string::const_iterator cur = str.begin(); - typename std::basic_string::const_iterator end = str.end(); - - while(cur != end) - { - typename std::basic_string::const_iterator found = knuth_morris_pratt::search(cur, end, *reinterpret_cast(&substr)); - - newStr.append(cur, found); - cur = found; - - if(found != end) - { - newStr.append(replBegin, replEnd); - advance(cur, (N) - 1); - } - } - - return newStr; -} - -template -std::basic_string replace(const std::basic_string& str, const CharT (& substr)[(N)], const CharT (& repl)[(M)]) -{ - return replace(str, substr, repl, repl + ((M) - 1)); -} - -template -std::basic_string replace(const std::basic_string& str, const CharT (& substr)[(N)], const std::basic_string& repl) -{ - return replace(str, substr, repl.begin(), repl.end()); -} - -template -std::basic_string replace(const std::basic_string& str, const std::basic_string& substr, const CharT (& repl)[(M)]) -{ - return replace(str, substr.begin(), substr.end(), repl, repl + ((M) - 1)); -} - -template -std::basic_string replace(const std::basic_string& str, const std::basic_string& substr, const std::basic_string& repl) -{ - return replace(str, substr.begin(), substr.end(), repl.begin(), repl.end()); -} - -template -struct type_equals -{ - enum { value = 0 }; -}; - -template -struct type_equals -{ - enum { value = 1 }; -}; - -template -bool advance_between_impl(InIter& cur, const InIter& begin, const InIter& end, Dist off, const std::input_iterator_tag&) -{ - if(Dist(0) < off) - for(; off != Dist(0) && cur != end; -- off) - ++ cur; - - return off == Dist(0); -} - -template -bool advance_between_impl(InIter& cur, const InIter& begin, const InIter& end, Dist off, const std::bidirectional_iterator_tag&) -{ - if(Dist(0) < off) - for(; off != Dist(0) && cur != end; -- off) - ++ cur; - else - for(; off != Dist(0) && cur != begin; ++ off) - ++ cur; - - return off == Dist(0); -} - -template -bool advance_between_impl(InIter& cur, const InIter& begin, const InIter& end, Dist off, const std::random_access_iterator_tag&) -{ - bool ret; - - if(Dist(0) < off) - { - Dist max = distance(cur, end); - ret = off == max || off < max; - } - else - { - Dist max = distance(cur, end); - ret = abs(off) == max || abs(off) < max; - } - - if(ret) - advance(cur, off); - - return ret; -} - -template -bool advance_between(InIter& cur, const InIter& begin, const InIter& end, Dist off) -{ - return advance_between_impl(cur, begin, end, off, typename std::iterator_traits::iterator_category()); -} - -template -class range_streambuf_base: public std::basic_streambuf -{ -public: - typedef typename std::basic_streambuf::int_type int_type; - typedef typename std::basic_streambuf::pos_type pos_type; - typedef typename std::basic_streambuf::off_type off_type; - -protected: - InIter m_cur; - InIter m_end; - int_type m_ungetc; - int_type m_putbackc; - - int_type get_char() - { - int_type c = m_ungetc; - - if(c == Traits::eof()) - { - if(m_cur != m_end) - { - c = *m_cur; - ++ m_cur; - } - } - else - m_ungetc = Traits::eof(); - - return c; - } - - int_type unget_char(int_type c) - { - if(c == Traits::eof()) - return c; - - if(m_ungetc == Traits::eof()) - m_ungetc = c; - else - return Traits::eof(); - - return c; - } - -protected: - range_streambuf_base(const InIter& begin, const InIter& end): - m_cur(begin), - m_end(end), - m_ungetc(Traits::eof()), - m_putbackc(Traits::eof()) - { - } - -public: - virtual int_type pbackfail(int_type c) - { - int_type ret; - - if(Traits::eq_int_type(c, Traits::eof())) - { - if(!Traits::eq_int_type(m_putbackc, Traits::eof())) - ret = unget_char(m_putbackc); - else - ret = Traits::eof(); - } - else - ret = unget_char(c); - - m_putbackc = Traits::eof(); - return ret; - } - - virtual std::streamsize showmanyc() const - { - return std::streamsize(-1); - } - - virtual int_type underflow() - { - return unget_char(get_char()); - } - - virtual int_type uflow() - { - m_putbackc = get_char(); - return m_putbackc; - } - - virtual std::streamsize xsgetn(Elem * p, std::streamsize n) - { - return _Xsgetn_s(p, std::numeric_limits::max(), n); - } - - virtual std::streamsize _Xsgetn_s(Elem * p, size_t cb, std::streamsize n) - { - std::streamsize i; - size_t ib; - - for(i = 0, ib = 0; i < n && ib < cb; ++ i, ++ ib, ++ p) - { - int_type c = get_char(); - - if(c == Traits::eof()) - break; - - *p = Traits::to_char_type(c); - } - - if(i > 0) - m_putbackc = p[-1]; - else - m_putbackc = Traits::eof(); - - return i; - } - - virtual pos_type seekoff(off_type off, std::ios_base::seekdir dir, std::ios_base::openmode mode) - { - if(((off == 0 && dir == std::ios_base::end) || (off >= 0 && dir == std::ios_base::cur)) && !(mode & std::ios_base::out)) - { - m_ungetc = Traits::eof(); - - if(dir == std::ios_base::end) - m_cur = m_end; - - advance_between(m_cur, m_cur, m_end, off); - } - - return pos_type(-1); - } -}; - -template -class range_streambuf_base: - public range_streambuf_base -{ -public: - typedef typename range_streambuf_base::int_type int_type; - typedef typename range_streambuf_base::pos_type pos_type; - typedef typename range_streambuf_base::off_type off_type; - -private: - typedef range_streambuf_base super; - InIter m_begin; - -protected: - range_streambuf_base(const InIter& begin, const InIter& end): - m_begin(begin), - range_streambuf_base(begin, end) - { - } - -public: - virtual pos_type seekoff(off_type off, std::ios_base::seekdir dir, std::ios_base::openmode mode) - { - if(!(mode & std::ios_base::out) && off >= 0) - { - if(dir == std::ios_base::beg) - super::m_cur = m_begin; - else if(dir != std::ios_base::cur) - super::m_cur = super::m_end; - - advance_between(super::m_cur, m_begin, super::m_end, off); - } - - return pos_type(-1); - } -}; - -template -class range_streambuf_base: public std::basic_streambuf -{ -public: - typedef typename std::basic_streambuf::int_type int_type; - typedef typename std::basic_streambuf::pos_type pos_type; - typedef typename std::basic_streambuf::off_type off_type; - -protected: - InIter m_begin; - InIter m_cur; - InIter m_end; - -protected: - range_streambuf_base(const InIter& begin, const InIter& end): - m_begin(begin), - m_cur(begin), - m_end(end) - { - } - -public: - virtual int_type pbackfail(int_type c) - { - int_type ret = Traits::eof(); - - if(m_cur != m_begin) - { - InIter prev = m_cur; - -- prev; - - if(Traits::eq_int_type(c, Traits::eof()) || Traits::eq_int_type(c, Traits::to_int_type(*prev))) - { - -- m_cur; - ret = Traits::to_int_type(*m_cur); - } - } - - return ret; - } - - virtual std::streamsize showmanyc() const - { - return std::streamsize(-1); - } - - virtual int_type underflow() - { - if(m_cur != m_end) - return *m_cur; - else - return Traits::eof(); - } - - virtual int_type uflow() - { - int_type c = Traits::eof(); - - if(m_cur != m_end) - { - c = *m_cur; - ++ m_cur; - } - - return c; - } - - virtual std::streamsize xsgetn(Elem * p, std::streamsize n) - { - return _Xsgetn_s(p, std::numeric_limits::max(), n); - } - - virtual std::streamsize _Xsgetn_s(Elem * p, size_t cb, std::streamsize n) - { - std::streamsize i; - size_t ib; - - for(i = 0, ib = 0; i < n && ib < cb && m_cur != m_end; ++ i, ++ ib, ++ p, ++ m_cur) - *p = Traits::to_char_type(*m_cur); - - return i; - } - - virtual pos_type seekoff(off_type off, std::ios_base::seekdir dir, std::ios_base::openmode mode) - { - if(mode & std::ios_base::out) - return pos_type(-1); - - if(dir == std::ios_base::beg) - m_cur = m_begin; - else if(dir != std::ios_base::cur) - m_cur = m_end; - - if(!advance_between(m_cur, m_begin, m_end, off)) - return pos_type(-1); - - return m_cur - m_begin; - } -}; - -template -class range_streambuf_base: - public range_streambuf_base -{ -private: - typedef range_streambuf_base super; - -protected: - range_streambuf_base(const InIter& begin, const InIter& end): - range_streambuf_base(begin, end) - { - } - -public: - virtual std::streamsize showmanyc() const - { - return distance(super::m_cur, super::m_end); - } - - virtual std::streamsize _Xsgetn_s(Elem * p, size_t cb, std::streamsize n) - { - std::streamsize maxn = showmanyc(); - - if(n > maxn) - n = maxn; - - if(cb > static_cast(n)) - cb = static_cast(n); - - std::copy(super::m_cur, super::m_cur + cb, p); - return cb; - } -}; - -template::value_type, class Traits = typename std::char_traits > -class range_streambuf: - public range_streambuf_base::iterator_category> -{ -public: - range_streambuf(const InIter& begin, const InIter& end): - range_streambuf_base::iterator_category>(begin, end) { } -}; - -#endif - -struct version_tuple -{ -private: - unsigned short m_fields[4]; - -public: - version_tuple(): m_fields() {} - - version_tuple(unsigned short major, unsigned short minor, unsigned short build_major = 0, unsigned short build_minor = 0) - { - m_fields[0] = major; - m_fields[1] = minor; - m_fields[2] = build_major; - m_fields[3] = build_minor; - } - - version_tuple(const version_tuple& That) - { - m_fields[0] = That.m_fields[0]; - m_fields[1] = That.m_fields[1]; - m_fields[2] = That.m_fields[2]; - m_fields[3] = That.m_fields[3]; - } - - const version_tuple& operator=(const version_tuple& That) - { - m_fields[0] = That.m_fields[0]; - m_fields[1] = That.m_fields[1]; - m_fields[2] = That.m_fields[2]; - m_fields[3] = That.m_fields[3]; - return *this; - } - - unsigned short get_major() const - { - return m_fields[0]; - } - - unsigned short get_minor() const - { - return m_fields[1]; - } - - unsigned short get_build_major() const - { - return m_fields[2]; - } - - unsigned short get_build_minor() const - { - return m_fields[3]; - } - - bool operator==(const version_tuple& That) const - { - return memcmp(this->m_fields, That.m_fields, sizeof(this->m_fields)) == 0; - } - - bool operator<(const version_tuple& That) const - { - return std::lexicographical_compare - ( - &(this->m_fields[0]) + 0, - &(this->m_fields[0]) + ARRAYSIZE(this->m_fields), - &(That.m_fields[0]) + 0, - &(That.m_fields[0]) + ARRAYSIZE(That.m_fields) - ); - } - - bool operator<=(const version_tuple& That) const - { - return (*this == That) || (*this < That); - } - - bool operator>(const version_tuple& That) const - { - return !(*this <= That); - } - - bool operator>=(const version_tuple& That) const - { - return !(*this < That); - } -}; - -template std::basic_ostream& operator<<(std::basic_ostream& ostr, const version_tuple& v) -{ - std::ios_base::fmtflags flags = ostr.flags(); - ostr.flags(std::ios_base::dec); - ostr << v.get_major(); - ostr << Tr::to_char_type('.'); - ostr << v.get_minor(); - ostr << Tr::to_char_type('.'); - ostr << v.get_build_major(); - ostr << Tr::to_char_type('.'); - ostr << v.get_build_minor(); - ostr.flags(flags); - return ostr; -} - -template std::basic_istream& operator>>(std::basic_istream& istr, version_tuple& v) -{ - const std::ctype& ct = std::use_facet >(istr.getloc()); - unsigned short a = 0, b = 0, c = 0, d = 0; - Elem ch; - - std::ios_base::fmtflags flags = istr.setf(std::ios_base::dec); - - if(istr >> a) - { - istr >> ch; - - if(ch == ct.widen('.')) - { - if(istr >> b) - { - istr >> ch; - - if(ch == ct.widen('.')) - { - if(istr >> c) - { - istr >> ch; - - if(ch == ct.widen('.')) - istr >> d; - else - istr.putback(ch); - } - } - else - istr.putback(ch); - - if(istr) - { - v = version_tuple(a, b, c, d); - istr.flags(flags); - return istr; - } - } - } - else - istr.putback(ch); - } - - istr.flags(flags); - istr.setstate(std::ios_base::failbit); - return istr; -} - -struct cl_version: public version_tuple -{ -private: - bool m_optimizing; - -public: - cl_version(): m_optimizing() {} - - cl_version(const version_tuple& version_number, bool optimizing = false): - version_tuple(version_number), m_optimizing(optimizing) {} - - cl_version - ( - unsigned short major, - unsigned short minor, - unsigned short build_major = 0, - unsigned short build_minor = 0, - bool optimizing = false, - bool analyze = false - ): - version_tuple(major, minor, build_major, build_minor), m_optimizing(optimizing) {} - - cl_version(const cl_version& That): version_tuple(That), m_optimizing(That.m_optimizing) {} - - const cl_version& operator=(const cl_version& That) - { - version_tuple::operator=(That); - m_optimizing = That.m_optimizing; - return *this; - } - - bool is_optimizing() const - { - return m_optimizing; - } - - bool operator==(const cl_version& That) const - { - return this->m_optimizing == That.m_optimizing && this->version_tuple::operator==(That); - } - - bool operator<(const cl_version& That) const - { - return (!this->m_optimizing && That.m_optimizing) || this->version_tuple::operator<(That); - } - - bool operator<=(const cl_version& That) const - { - return (*this == That) || (*this < That); - } - - bool operator>(const cl_version& That) const - { - return !(*this <= That); - } - - bool operator>=(const cl_version& That) const - { - return !(*this < That); - } - - operator bool() const - { - return get_major() || get_minor() || get_build_major() || get_build_minor(); - } -}; - -struct link_version: public version_tuple -{ -public: - link_version() {} - - link_version(const version_tuple& version_number): version_tuple(version_number) {} - - link_version - ( - unsigned short major, - unsigned short minor, - unsigned short build_major = 0, - unsigned short build_minor = 0 - ): - version_tuple(major, minor, build_major, build_minor) {} - - link_version(const link_version& That): version_tuple(That) {} - - const link_version& operator=(const link_version& That) - { - version_tuple::operator=(That); - return *this; - } - - bool operator==(const cl_version& That) const - { - return this->version_tuple::operator==(That); - } - - bool operator<(const cl_version& That) const - { - return this->version_tuple::operator<(That); - } - - bool operator<=(const cl_version& That) const - { - return (*this == That) || (*this < That); - } - - bool operator>(const cl_version& That) const - { - return !(*this <= That); - } - - bool operator>=(const cl_version& That) const - { - return !(*this < That); - } - - operator bool() const - { - return get_major() || get_minor() || get_build_major() || get_build_minor(); - } -}; - -template -struct type_holder -{ - typedef T type; -}; - -template -std::basic_string get_env(const Elem * name, const type_holder&, const type_holder&) -{ - DWORD cchValue = 0; - std::vector value; - - for(;;) - { - value.resize(cchValue); - - if(type_equals::value) - cchValue = GetEnvironmentVariableA(reinterpret_cast(name), reinterpret_cast(cchValue ? &(value[0]) : NULL), cchValue); - else if(type_equals::value) - cchValue = GetEnvironmentVariableW(reinterpret_cast(name), reinterpret_cast(cchValue ? &(value[0]) : NULL), cchValue); - - if(cchValue == 0) - return std::basic_string(); - - if(cchValue <= value.size()) - break; - } - - value.resize(cchValue); - return std::basic_string(value.begin(), value.end()); -} - -template -std::basic_string get_env(const Elem * name) -{ - return get_env(name, type_holder(), type_holder()); -} - -template -std::basic_string get_env(const Elem * name) -{ - return get_env(name, type_holder(), type_holder::allocator_type>()); -} - -template -std::basic_string get_env(const Elem * name) -{ - return get_env(name, type_holder::traits_type>(), type_holder::allocator_type>()); -} - -template -void set_env(const Elem * name, const Elem * value) -{ - if(type_equals::value) - SetEnvironmentVariableA(reinterpret_cast(name), reinterpret_cast(value)); - else if(type_equals::value) - SetEnvironmentVariableW(reinterpret_cast(name), reinterpret_cast(value)); -} - -template -FILE * pipe_open(const CharT * commandLine, const CharT * mode) -{ - if(type_equals::value) - return _popen(reinterpret_cast(commandLine), reinterpret_cast(mode)); - else if(type_equals::value) - return _wpopen(reinterpret_cast(commandLine), reinterpret_cast(mode)); - else - return NULL; -} - -template -FILE * pipe_open_override_path(const CharT * commandLine, const CharT * mode, const CharT2 * newPath) -{ - FILE * pipe = NULL; - const CharT2 path[] = { 'P', 'A', 'T', 'H', 0 }; - - std::basic_string oldPath; - - if(newPath) - { - oldPath = get_env(path); - set_env(path, newPath); - } - - try - { - pipe = pipe_open(commandLine, mode); - } - catch(...) - { - if(pipe != NULL) - fclose(pipe); - - if(newPath) - set_env(path, oldPath.c_str()); - - throw; - } - - if(newPath) - set_env(path, oldPath.c_str()); - - return pipe; -} - -template -std::pair tokenize(InIter begin, InIter end, IsSep isSeparator) -{ - InIter beginToken = std::find_if(begin, end, std::not1(isSeparator)); - InIter endToken = std::find_if(beginToken, end, isSeparator); - return std::make_pair(beginToken, endToken); -} - -std::locale clocale("C"); -const std::ctype& cctype = std::use_facet >(clocale); - -template -struct is_ctype_l: public std::binary_function -{ -public: - result_type operator()(const first_argument_type& locale, second_argument_type c) const - { - return std::use_facet >(locale).is(Mask, c); - } -}; - -typedef is_ctype_l is_space_l; - -template -struct is_ctype: public std::unary_function -{ -private: - const std::locale& m_locale; - is_ctype_l m_is_ctype_l; - -public: - is_ctype(const std::locale& locale): m_locale(locale) {} - - result_type operator()(argument_type c) const - { - return m_is_ctype_l(m_locale, c); - } -}; - -typedef is_ctype is_space; - -template -std::pair string_literal_token(const Elem (& lit)[N]) -{ - return std::make_pair(lit, lit + ((N) - 1)); -} - -template -bool token_equals(const std::pair& tokenX, const std::pair& tokenY) -{ - return std::distance(tokenX.first, tokenX.second) == std::distance(tokenY.first, tokenY.second) && std::equal(tokenX.first, tokenX.second, tokenY.first); -} - -std::pair GetClArchToken(const std::string& arch) -{ - if(arch == "i386") - return string_literal_token("80x86"); - else if(arch == "amd64") - return string_literal_token("x64"); - else if(arch == "arm") - return string_literal_token("ARM"); - else - return string_literal_token(""); -} - -template -cl_version CheckClVersion(const std::string& arch, const Elem * pathOverride) -{ - stdio_filebuf clVersionInfoBuf(pipe_open_override_path(_T("cl /nologo- 2>&1 >nul archToken = GetClArchToken(arch); - - version_tuple clVersionNumber; - bool clOptimizing = false; - bool clTargetArch = false; - - std::string clVersionLine; - getline(clVersionInfo, clVersionLine); - - for - ( - std::pair token = tokenize(clVersionLine.begin(), clVersionLine.end(), is_space(clocale)); - token.first != token.second; - token = tokenize(token.second, clVersionLine.end(), is_space(clocale)) - ) - { - // Is the compiler optimizing? - if(token_equals(token, string_literal_token("Optimizing"))) - { - clOptimizing = true; - continue; - } - - // Is this the version number? - range_streambuf tokenBuf(token.first, token.second); - std::istream tokenStream(&tokenBuf); - - if(tokenStream >> clVersionNumber) - continue; - - // Does the compiler support the target architecture? - if(token_equals(token, archToken)) - { - clTargetArch = true; - continue; - } - } - - if(clTargetArch) - return cl_version(clVersionNumber, clOptimizing); - else - return cl_version(); -} - -cl_version CheckClVersion(const std::string& arch) -{ - return CheckClVersion(arch, (const char *)0); -} - -std::pair GetLinkArchToken(const std::string& arch) -{ - if(arch == "i386") - return string_literal_token(_T("X86")); - else if(arch == "amd64") - return string_literal_token(_T("X64")); - else if(arch == "arm") - return string_literal_token(_T("ARM")); - else - return string_literal_token(_T("")); -} - -template -link_version CheckLinkVersion(const std::string& arch, const Elem * pathOverride) -{ - std::pair archToken = GetLinkArchToken(arch); - - std::basic_string<_TCHAR> linkCmdLine; - linkCmdLine.append(_T("link /nologo- /machine:\"")); - linkCmdLine.append(archToken.first, archToken.second); - linkCmdLine.append(_T("\" nul")); - - stdio_filebuf linkOutputBuf(pipe_open_override_path(linkCmdLine.c_str(), _T("rt"), pathOverride)); - std::istream linkOutput(&linkOutputBuf); - - link_version linkVersion; - - std::string linkOutputLine; - - if(getline(linkOutput, linkOutputLine)) - { - for - ( - std::pair token = tokenize(linkOutputLine.begin(), linkOutputLine.end(), is_space(clocale)); - token.first != token.second; - token = tokenize(token.second, linkOutputLine.end(), is_space(clocale)) - ) - { - range_streambuf tokenBuf(token.first, token.second); - std::istream tokenStream(&tokenBuf); - - version_tuple linkVersionNumber; - - if(tokenStream >> linkVersionNumber) - { - linkVersion = linkVersionNumber; - break; - } - } - } - - if(linkVersion) - { - bool linkArchCheckFail = false; - - while(!linkArchCheckFail && getline(linkOutput, linkOutputLine)) - { - linkArchCheckFail = - knuth_morris_pratt::search(linkOutputLine.begin(), linkOutputLine.end(), "LNK4012") != linkOutputLine.end() || - knuth_morris_pratt::search(linkOutputLine.begin(), linkOutputLine.end(), "LNK1146") != linkOutputLine.end(); - } - - if(linkArchCheckFail) - linkVersion = link_version(); - } - - return linkVersion; -} - -link_version CheckLinkVersion(const std::string& arch) -{ - return CheckLinkVersion(arch, (const char *)0); -} - -template -void CharsToString(HRESULT& hr, std::basic_string& str, const Elem * beginChars, const Elem * endChars) -{ - if(SUCCEEDED(hr)) - str = std::basic_string(beginChars, endChars); -} - -template -void CharsToString(HRESULT& hr, std::basic_string& str, const WCHAR * beginChars, const WCHAR * endChars) -{ - if(!SUCCEEDED(hr)) - return; - - UINT cchChars = endChars - beginChars; - int cch = WideCharToMultiByte(CP_ACP, 0, beginChars, cchChars, NULL, 0, NULL, NULL); - - if(cch <= 0) - { - hr = HRESULT_FROM_WIN32(GetLastError()); - return; - } - - CHAR * psz = new CHAR[cch]; - - if(psz == NULL) - { - hr = E_OUTOFMEMORY; - return; - } - - cch = WideCharToMultiByte(CP_ACP, 0, beginChars, cchChars, psz, cch, NULL, NULL); - - if(cch <= 0) - hr = HRESULT_FROM_WIN32(GetLastError()); - else - str = std::basic_string(psz, psz + cch); - - delete[] psz; -} - -template -void CharsToString(HRESULT& hr, std::basic_string& str, const CHAR * beginChars, const CHAR * endChars) -{ - if(!SUCCEEDED(hr)) - return; - - UINT cchChars = endChars - beginChars; - int cch = MultiByteToWideChar(CP_ACP, 0, beginChars, cchChars, NULL, 0); - - if(cch <= 0) - { - hr = HRESULT_FROM_WIN32(GetLastError()); - return; - } - - WCHAR * psz = new WCHAR[cch]; - - if(psz == NULL) - { - hr = E_OUTOFMEMORY; - return; - } - - cch = MultiByteToWideChar(CP_ACP, 0, beginChars, cchChars, psz, cch); - - if(cch <= 0) - hr = HRESULT_FROM_WIN32(GetLastError()); - else - str = std::basic_string(psz, psz + cch); - - delete[] psz; -} - -template -void BSTRToString(HRESULT& hr, std::basic_string& str, BSTR bstr) -{ - CharsToString(hr, str, bstr, bstr + SysStringLen(bstr)); -} - -std::vector SplitPath(const std::string& strPath) -{ - std::vector path; - std::string::const_iterator cur = strPath.begin(); - std::string::const_iterator end = strPath.end(); - - while(!(cur == end)) - { - std::string::const_iterator itemBegin = cur; - std::string::const_iterator itemEnd = std::find(cur, end, ';'); - - if(!(itemBegin == itemEnd)) - path.push_back(std::string(itemBegin, itemEnd)); - - cur = itemEnd; - - if(!(cur == end)) - ++ cur; - } - - return path; -} - -std::vector ParsePlatformPath(HRESULT& hr, IDispatch * pPlatform, BSTR bstrPath) -{ - std::vector path; - - if(FAILED(hr)) - return path; - - VARIANT varPath; - VariantInit(&varPath); - V_VT(&varPath) = VT_BSTR; - V_BSTR(&varPath) = bstrPath; - - VARIANT varRet = dispInvoke(hr, pPlatform, OLESTR("Evaluate"), varPath, VT_BSTR); - - std::string strPath; - BSTRToString(hr, strPath, V_BSTR(&varRet)); - - VariantClear(&varRet); - - path = SplitPath(strPath); - return path; -} - -VARIANT GetDTEProjectEngine(HRESULT& hr, IDispatch * pDTE) -{ - VARIANT varVCProjects = oleString(hr, OLESTR("VCProjects")); - VARIANT varVCProjectEngine = oleString(hr, OLESTR("VCProjectEngine")); - VARIANT varProjects = dispInvoke(hr, pDTE, OLESTR("GetObject"), varVCProjects, VT_DISPATCH); - VARIANT varProjectsProperties = dispPropGet(hr, V_DISPATCH(&varProjects), OLESTR("Properties"), VT_DISPATCH); - VARIANT varProjectEngineProperty = dispInvoke(hr, V_DISPATCH(&varProjectsProperties), varVCProjectEngine, VT_DISPATCH); - VARIANT varRet = dispPropGet(hr, V_DISPATCH(&varProjectEngineProperty), OLESTR("Object"), VT_DISPATCH); - VariantClear(&varProjectEngineProperty); - VariantClear(&varProjectsProperties); - VariantClear(&varProjects); - VariantClear(&varVCProjectEngine); - VariantClear(&varVCProjects); - return varRet; -} - -VARIANT GetDTEPlatformPath(HRESULT& hr, IDispatch * pDTE, BSTR bstrPlatformName, const OLECHAR * pszPathName) -{ - VARIANTARG argsProperties[2] = { oleString(hr, OLESTR("VCDirectories")), oleString(hr, OLESTR("Projects")) }; - - VARIANT varProperties; - VariantInit(&varProperties); - - if(SUCCEEDED(hr)) - hr = dispPropGet(pDTE, OLESTR("Properties"), argsProperties, ARRAYSIZE(argsProperties), VT_DISPATCH, varProperties); - - VARIANT varPathName = oleString(hr, pszPathName); - VARIANT varPath = dispInvoke(hr, V_DISPATCH(&varProperties), varPathName, VT_BSTR); - - VARIANT varRet; - VariantInit(&varRet); - - if(SUCCEEDED(hr)) - { - const OLECHAR * pCur = V_BSTR(&varPath); - const OLECHAR * pEnd = V_BSTR(&varPath) + SysStringLen(V_BSTR(&varPath)); - - while(!(pCur == pEnd)) - { - const OLECHAR * pBeginName = pCur; - const OLECHAR * pEndName = std::find(pBeginName, pEnd, OLESTR('|')); - const OLECHAR * pBeginValue = pEndName == pEnd ? pEndName : pEndName + 1; - const OLECHAR * pEndValue = std::find(pBeginValue, pEnd, OLESTR('|')); - - pCur = pEndValue; - - if(!(pCur == pEnd)) - ++ pCur; - - BSTR bstrName = SysAllocStringLen(pBeginName, pEndName - pBeginName); - - if(bstrName) - { - hr = VarBstrCmp(bstrName, bstrPlatformName, 0, NORM_IGNORECASE); - - if(hr == VARCMP_EQ) - { - BSTR bstrRet = SysAllocStringLen(pBeginValue, pEndValue - pBeginValue); - - if(bstrRet) - { - V_VT(&varRet) = VT_BSTR; - V_BSTR(&varRet) = bstrRet; - } - else - hr = E_OUTOFMEMORY; - } - - SysFreeString(bstrName); - - if(FAILED(hr) || hr == VARCMP_EQ) - break; - } - else - { - hr = E_OUTOFMEMORY; - break; - } - } - } - - VariantClear(&varPath); - VariantClear(&varPathName); - VariantClear(&varProperties); - VariantClear(&argsProperties[1]); - VariantClear(&argsProperties[0]); - - if(SUCCEEDED(hr) && V_VT(&varRet) != VT_BSTR) - { - VariantClear(&varRet); - varRet = oleString(hr, OLESTR("")); - } - - return varRet; -} - -cl_version msCompilerVersion; -std::string msCompilerPath; -std::vector msCompilerIncludeDirs; // TODO: use this -std::string msCompilerSource; // TODO: use this - -link_version msLinkerVersion; -std::string msLinkerPath; -std::vector msLinkerLibDirs; // TODO: use this -std::string msLinkerSource; // TODO: use this - -void ProcessVCPlatform(HRESULT& hr, const std::string& arch, bool wantCompiler, bool wantLinker, IDispatch * pVCProjectEngine, IDispatch * pPlatform, BSTR bstrPath, BSTR bstrInclude, BSTR bstrLib) -{ - if(FAILED(hr)) - return; - - std::basic_string strPath = replace(std::basic_string(bstrPath, SysStringLen(bstrPath)), OLESTR("$(PATH)"), OLESTR("%PATH%")); - - VARIANT varPath; - VariantInit(&varPath); - V_VT(&varPath) = VT_BSTR; - V_BSTR(&varPath) = SysAllocStringLen(strPath.c_str(), strPath.size()); - - if(!V_BSTR(&varPath)) - hr = E_OUTOFMEMORY; - - VARIANT varRet = dispInvoke(hr, pPlatform, OLESTR("Evaluate"), varPath, VT_BSTR); - - if(SUCCEEDED(hr)) - { - std::basic_string strPathOverride = replace - ( - std::basic_string(V_BSTR(&varRet), V_BSTR(&varRet) + SysStringLen(V_BSTR(&varRet))), - OLESTR("%PATH%"), - get_env(OLESTR("PATH")) - ); - - cl_version clVersion; - link_version linkVersion; - - if(wantCompiler) - clVersion = CheckClVersion(arch, strPathOverride.c_str()); - - if(wantLinker) - linkVersion = CheckLinkVersion(arch, strPathOverride.c_str()); - - // TODO: need a way to choose the desired tools and which version - // BUGBUG: for now, only set the new version if both tools are the highest version yet - if((!wantCompiler || (clVersion && clVersion > msCompilerVersion)) && (!wantLinker || (linkVersion && linkVersion > msLinkerVersion))) - { - std::string strPath; - BSTRToString(hr, strPath, V_BSTR(&varRet)); - strPath = replace(strPath, "%PATH%", "$(PATH)"); - - std::vector include = ParsePlatformPath(hr, pPlatform, bstrInclude); - std::vector lib = ParsePlatformPath(hr, pPlatform, bstrLib); - - if(SUCCEEDED(hr)) - { - if(wantCompiler) - { - msCompilerVersion = clVersion; - msCompilerPath = strPath; - msCompilerIncludeDirs = include; - //msCompilerSource; // TODO: fill this in - } - - if(wantLinker) - { - msLinkerVersion = linkVersion; - msLinkerPath = strPath; - msLinkerLibDirs = lib; - //msLinkerSource; // TODO: fill this in - } - } - } - } - - VariantClear(&varPath); - VariantClear(&varRet); -} - -bool IsVCPlatformSupported(HRESULT& hr, const std::string& arch, IDispatch * pPlatform) -{ - bool ret = false; - - VARIANT varPlatformName = dispPropGet(hr, pPlatform, OLESTR("Name"), VT_BSTR); - - if(arch == "i386") - { - VARIANT varWin32 = oleString(hr, OLESTR("Win32")); - - if(SUCCEEDED(hr)) - { - hr = VarBstrCmp(V_BSTR(&varWin32), V_BSTR(&varPlatformName), 0, NORM_IGNORECASE); - ret = hr == VARCMP_EQ; - } - - VariantClear(&varWin32); - } - else if(arch == "amd64") - { - VARIANT varX64 = oleString(hr, OLESTR("x64")); - - if(SUCCEEDED(hr)) - { - hr = VarBstrCmp(V_BSTR(&varX64), V_BSTR(&varPlatformName), 0, NORM_IGNORECASE); - ret = hr == VARCMP_EQ; - } - - VariantClear(&varX64); - } - else if(arch == "arm") - { - VARIANT varARM = oleString(hr, OLESTR("ARM")); - VARIANT varARCHFAM = oleString(hr, OLESTR("ARCHFAM")); - VARIANT varArchFamily = dispInvoke(hr, pPlatform, OLESTR("GetMacroValue"), varARCHFAM, VT_BSTR); - - if(SUCCEEDED(hr)) - { - hr = VarBstrCmp(V_BSTR(&varARM), V_BSTR(&varArchFamily), 0, NORM_IGNORECASE); - ret = hr == VARCMP_EQ; - } - - VariantClear(&varArchFamily); - VariantClear(&varARCHFAM); - VariantClear(&varARM); - } - - VariantClear(&varPlatformName); - - return SUCCEEDED(hr) && ret; -} - -void EnumerateVCTools(const std::string& arch, bool wantCompiler, bool wantLinker, const OLECHAR * szProductTag) -{ - size_t cchProductTag = std::wcslen(szProductTag); - HRESULT hr; - - hr = OleInitialize(NULL); - - if(SUCCEEDED(hr)) - { - std::basic_string strProductKey; - CharsToString(hr, strProductKey, szProductTag, szProductTag + cchProductTag); - - if(SUCCEEDED(hr)) - { - strProductKey = TEXT("SOFTWARE\\Microsoft\\") + strProductKey; - - HKEY hkVisualStudio; - hr = HRESULT_FROM_WIN32(RegOpenKeyEx(HKEY_LOCAL_MACHINE, strProductKey.c_str(), 0, KEY_ENUMERATE_SUB_KEYS, &hkVisualStudio)); - - if(SUCCEEDED(hr)) - { - for(DWORD i = 0; ; ++ i) - { - TCHAR szProductVersion[255 + 1]; - DWORD cchProductVersion = ARRAYSIZE(szProductVersion); - - hr = HRESULT_FROM_WIN32(RegEnumKeyEx(hkVisualStudio, i, szProductVersion, &cchProductVersion, NULL, NULL, NULL, NULL)); - - if(SUCCEEDED(hr)) - { - std::basic_string strProductVersion; - CharsToString(hr, strProductVersion, szProductVersion, szProductVersion + cchProductVersion); - - if(SUCCEEDED(hr)) - { - std::basic_string strDTEProgId(szProductTag, szProductTag + cchProductTag); - strDTEProgId += OLESTR(".DTE."); - strDTEProgId += strProductVersion; - - CLSID clsidDTE; - hr = CLSIDFromProgID(strDTEProgId.c_str(), &clsidDTE); - - if(SUCCEEDED(hr)) - { - IDispatch * pDTE; - hr = CoCreateInstance(clsidDTE, NULL, CLSCTX_ALL, IID_IDispatch, (void **)(void *)&pDTE); - - if(SUCCEEDED(hr)) - { - VARIANT varProjectEngine = GetDTEProjectEngine(hr, pDTE); - VARIANT varPlatforms = dispPropGet(hr, V_DISPATCH(&varProjectEngine), OLESTR("Platforms"), VT_DISPATCH); - VARIANT varCount = dispPropGet(hr, V_DISPATCH(&varPlatforms), OLESTR("Count"), VT_I4); - VARIANT varI; - VariantInit(&varI); - V_VT(&varI) = VT_I4; - - for(V_I4(&varI) = 1; V_I4(&varI) <= V_I4(&varCount); ++ V_I4(&varI)) - { - VARIANT varPlatform = dispInvoke(hr, V_DISPATCH(&varPlatforms), varI, VT_DISPATCH); - - if(IsVCPlatformSupported(hr, arch, V_DISPATCH(&varPlatform))) - { - VARIANT varPlatformName = dispPropGet(hr, V_DISPATCH(&varPlatform), OLESTR("Name"), VT_BSTR); - VARIANT varPath = GetDTEPlatformPath(hr, pDTE, V_BSTR(&varPlatformName), OLESTR("ExecutableDirectories")); - VARIANT varInclude = GetDTEPlatformPath(hr, pDTE, V_BSTR(&varPlatformName), OLESTR("IncludeDirectories")); - VARIANT varLib = GetDTEPlatformPath(hr, pDTE, V_BSTR(&varPlatformName), OLESTR("LibraryDirectories")); - - ProcessVCPlatform(hr, arch, wantCompiler, wantLinker, V_DISPATCH(&varProjectEngine), V_DISPATCH(&varPlatform), V_BSTR(&varPath), V_BSTR(&varInclude), V_BSTR(&varLib)); - - VariantClear(&varLib); - VariantClear(&varInclude); - VariantClear(&varPath); - VariantClear(&varPlatformName); - } - - VariantClear(&varPlatform); - } - - VariantClear(&varI); - VariantClear(&varCount); - VariantClear(&varPlatforms); - VariantClear(&varProjectEngine); - - pDTE->Release(); - } - } - - // TODO: print an error message here - } - - hr = S_OK; - } - else if(hr == HRESULT_FROM_WIN32(ERROR_NO_MORE_ITEMS)) - { - hr = S_OK; - break; - } - else - break; - } - } - } - - OleUninitialize(); - } -} - -const TCHAR * GetDDKArchPath(const std::string& arch) -{ - if(arch == "i386") - return TEXT("x86"); - else if(arch == "amd64") - return TEXT("amd64"); - else - return NULL; -} - -void EnumerateDDKTools(const std::string& arch, bool wantCompiler, bool wantLinker) -{ - const TCHAR * pszArchPath = GetDDKArchPath(arch); - - if(pszArchPath == NULL) - return; - - HRESULT hr; - - HKEY hkDDK; - hr = HRESULT_FROM_WIN32(RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Microsoft\\WINDDK"), 0, KEY_ENUMERATE_SUB_KEYS, &hkDDK)); - - if(SUCCEEDED(hr)) - { - for(DWORD i = 0; ; ++ i) - { - TCHAR szDDKVersion[255 + ARRAYSIZE(TEXT("\\Setup"))]; - DWORD cchDDKVersion = ARRAYSIZE(szDDKVersion); - - hr = HRESULT_FROM_WIN32(RegEnumKeyEx(hkDDK, i, szDDKVersion, &cchDDKVersion, NULL, NULL, NULL, NULL)); - - if(SUCCEEDED(hr)) - { - memcpy(szDDKVersion + cchDDKVersion, TEXT("\\Setup"), sizeof(TEXT("\\Setup"))); - - HKEY hkDDKVersion; - hr = HRESULT_FROM_WIN32(RegOpenKeyEx(hkDDK, szDDKVersion, 0, KEY_QUERY_VALUE, &hkDDKVersion)); - - if(SUCCEEDED(hr)) - { - TCHAR szDDKPath[MAX_PATH]; - DWORD cbDDKPath = sizeof(szDDKPath); - DWORD dwType = 0; - - hr = HRESULT_FROM_WIN32(RegQueryValueEx(hkDDKVersion, TEXT("BUILD"), NULL, &dwType, reinterpret_cast(szDDKPath), &cbDDKPath)); - - if(SUCCEEDED(hr) && dwType == REG_SZ) - { -#if defined(_X86_) - static const TCHAR * const a_szBinPaths[] = { TEXT("x86") }; -#elif defined(_AMD64_) - // Prefer native tools, fall back on x86 if necessary - static const TCHAR * const a_szBinPaths[] = { TEXT("amd64"), TEXT("x86") }; -#elif defined(_IA64_) - // Prefer native tools, fall back on x86 if necessary - static const TCHAR * const a_szBinPaths[] = { TEXT("ia64"), TEXT("x86") }; -#endif - szDDKPath[cbDDKPath / sizeof(TCHAR)] = 0; - std::basic_string strDDKPath(szDDKPath); - strDDKPath += TEXT("\\bin\\"); - - std::basic_string::size_type cchCutoff = strDDKPath.length(); - - for(unsigned i = 0; i < ARRAYSIZE(a_szBinPaths); ++ i) - { - strDDKPath.resize(cchCutoff); - strDDKPath += a_szBinPaths[i]; - strDDKPath += TEXT("\\"); - strDDKPath += pszArchPath; - - cl_version clVersion; - link_version linkVersion; - - if(wantCompiler) - clVersion = CheckClVersion(arch, strDDKPath.c_str()); - - if(wantLinker) - linkVersion = CheckLinkVersion(arch, strDDKPath.c_str()); - - if((!wantCompiler || (clVersion && clVersion > msCompilerVersion)) && (!wantLinker || (linkVersion && linkVersion > msLinkerVersion))) - { - std::string strPath; - CharsToString(hr, strPath, strDDKPath.c_str(), strDDKPath.c_str() + strDDKPath.length()); - - if(SUCCEEDED(hr)) - { - if(wantCompiler) - { - msCompilerVersion = clVersion; - msCompilerPath = strPath; - msCompilerIncludeDirs.clear(); - //msCompilerSource; // TODO: fill this in - } - - if(wantLinker) - { - msLinkerVersion = linkVersion; - msLinkerPath = strPath; - msLinkerLibDirs.clear(); - //msLinkerSource; // TODO: fill this in - } - } - else - break; - } - } - } - - RegCloseKey(hkDDKVersion); - } - } - else if(hr == HRESULT_FROM_WIN32(ERROR_NO_MORE_ITEMS)) - { - hr = S_OK; - break; - } - - if(FAILED(hr)) - break; - } - - RegCloseKey(hkDDK); - } -} - -void DetectEnvironmentVCTools(const std::string& arch, bool wantCompiler, bool wantLinker) -{ - cl_version clVersion; - link_version linkVersion; - - if(wantCompiler) - clVersion = CheckClVersion(arch); - - if(wantLinker) - linkVersion = CheckLinkVersion(arch); - - if((!wantCompiler || (clVersion && clVersion > msCompilerVersion)) && (!wantLinker || (linkVersion && linkVersion > msLinkerVersion))) - { - if(wantCompiler) - { - msCompilerVersion = clVersion; - msCompilerPath.clear(); - msCompilerIncludeDirs = SplitPath(get_env("INCLUDE")); - msCompilerSource = "environment"; - } - - if(wantLinker) - { - msLinkerVersion = linkVersion; - msLinkerPath.clear(); - msLinkerLibDirs = SplitPath(get_env("LIB")); - msLinkerSource = "environment"; - } - } -} - -void EnumerateMicrosoftTools(const std::string& arch, bool wantCompiler, bool wantLinker) -{ - DetectEnvironmentVCTools(arch, wantCompiler, wantLinker); - - if(!msCompilerVersion || !msLinkerVersion) - { - EnumerateVCTools(arch, wantCompiler, wantLinker, OLESTR("VisualStudio")); - EnumerateVCTools(arch, wantCompiler, wantLinker, OLESTR("VCExpress")); - EnumerateDDKTools(arch, wantCompiler, wantLinker); - } -} - -} - -bool -MingwBackend::DetectMicrosoftCompiler ( std::string& version, std::string& path ) -{ - bool wantCompiler = ProjectNode.configuration.Compiler == MicrosoftC; - bool wantLinker = ProjectNode.configuration.Linker == MicrosoftLink; - - if ( wantCompiler && !msCompilerVersion ) - EnumerateMicrosoftTools ( Environment::GetArch(), wantCompiler, wantLinker ); - - bool ret = wantCompiler && msCompilerVersion; - - if ( ret ) - { - compilerNeedsHelper = true; - compilerCommand = "cl"; - - std::ostringstream compilerVersion; - compilerVersion << msCompilerVersion; - version = compilerVersion.str(); - path = msCompilerPath; - } - - return ret; -} - -bool -MingwBackend::DetectMicrosoftLinker ( std::string& version, std::string& path ) -{ - bool wantCompiler = ProjectNode.configuration.Compiler == MicrosoftC; - bool wantLinker = ProjectNode.configuration.Linker == MicrosoftLink; - - if ( wantLinker && !msLinkerVersion ) - EnumerateMicrosoftTools ( Environment::GetArch(), wantCompiler, wantLinker ); - - bool ret = wantLinker && msLinkerVersion; - - if ( ret ) - { - binutilsNeedsHelper = msLinkerPath.length() != 0; - binutilsCommand = "link"; - - std::ostringstream linkerVersion; - linkerVersion << msLinkerVersion; - version = linkerVersion.str(); - path = msLinkerPath; - } - - return ret; -} - -#endif - -// TODO? attempt to support Microsoft tools on non-Windows? -#if !defined(WIN32) - -#include "../../pch.h" - -#include "mingw.h" - -bool -MingwBackend::DetectMicrosoftCompiler ( std::string&, std::string& ) -{ - return false; -} - -bool -MingwBackend::DetectMicrosoftLinker ( std::string&, std::string& ) -{ - return false; -} - -#endif - -// EOF diff --git a/reactos/tools/rbuild/backend/mingw/pch_detection.h b/reactos/tools/rbuild/backend/mingw/pch_detection.h deleted file mode 100644 index 3c26c8e4494..00000000000 --- a/reactos/tools/rbuild/backend/mingw/pch_detection.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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. - */ - -/* This file is intentionally left empty */ diff --git a/reactos/tools/rbuild/backend/mingw/pipe_detection.c b/reactos/tools/rbuild/backend/mingw/pipe_detection.c deleted file mode 100644 index 229c4a56d42..00000000000 --- a/reactos/tools/rbuild/backend/mingw/pipe_detection.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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. - */ - -int -main ( int argc, char** argv ) -{ - return 0; -} diff --git a/reactos/tools/rbuild/backend/mingw/proxymakefile.cpp b/reactos/tools/rbuild/backend/mingw/proxymakefile.cpp deleted file mode 100644 index 9e3c9dbf0b5..00000000000 --- a/reactos/tools/rbuild/backend/mingw/proxymakefile.cpp +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "../../pch.h" - -#include "mingw.h" -#include - -using std::string; -using std::vector; - -ProxyMakefile::ProxyMakefile ( const Project& project ) - : project ( project ) -{ -} - -ProxyMakefile::~ProxyMakefile () -{ -} - -bool -ProxyMakefile::GenerateProxyMakefile ( const Module& module ) -{ - return module.output->directory == OutputDirectory; -} - -void -ProxyMakefile::GenerateProxyMakefiles ( bool verbose, - string outputTree ) -{ - for ( std::map::const_iterator p = project.modules.begin (); p != project.modules.end (); ++ p ) - { - Module& module = *p->second; - if ( !module.enabled ) - continue; - if ( !GenerateProxyMakefile ( module ) ) - continue; - GenerateProxyMakefileForModule ( module, - verbose, - outputTree ); - } -} - -string -ProxyMakefile::GeneratePathToParentDirectory ( int numberOfParentDirectories ) -{ - string path = ""; - for ( int i = 0; i < numberOfParentDirectories; i++ ) - { - if ( path != "" ) - path += sSep; - path += ".."; - } - return path; -} - -string -ProxyMakefile::GetPathToTopDirectory ( Module& module ) -{ - int numberOfDirectories = 1; - string basePath = module.output->relative_path; - for ( size_t i = 0; i < basePath.length (); i++ ) - { - if ( basePath[i] == cSep ) - numberOfDirectories++; - } - return GeneratePathToParentDirectory ( numberOfDirectories ); -} - -void -ProxyMakefile::GenerateProxyMakefileForModule ( Module& module, - bool verbose, - string outputTree ) -{ - char* buf; - char* s; - - if ( verbose ) - { - printf ( "\nGenerating proxy makefile for %s", - module.name.c_str () ); - } - - string base; - string pathToTopDirectory; - if ( outputTree.length () > 0 ) - { - base = outputTree + sSep + module.output->relative_path; - pathToTopDirectory = working_directory; - } - else - { - base = module.output->relative_path; - pathToTopDirectory = GetPathToTopDirectory ( module ); - } - string proxyMakefile = NormalizeFilename ( base + sSep + "GNUmakefile" ); - string defaultTarget = module.name; - - buf = (char*) malloc ( 10*1024 ); - if ( buf == NULL ) - throw OutOfMemoryException (); - - s = buf; - s = s + sprintf ( s, "# This file is automatically generated.\n" ); - s = s + sprintf ( s, "\n" ); - s = s + sprintf ( s, "TOP = %s\n", pathToTopDirectory.c_str () ); - s = s + sprintf ( s, "DEFAULT = %s\n", defaultTarget.c_str () ); - s = s + sprintf ( s, "include $(TOP)/proxy.mak\n" ); - - FileSupportCode::WriteIfChanged ( buf, proxyMakefile, true ); - - free ( buf ); -} diff --git a/reactos/tools/rbuild/backend/mingw/rule.cpp b/reactos/tools/rbuild/backend/mingw/rule.cpp deleted file mode 100644 index 12199dc03a7..00000000000 --- a/reactos/tools/rbuild/backend/mingw/rule.cpp +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (C) 2008 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. - */ - -#include "../../rbuild.h" -#include "modulehandler.h" -#include "rule.h" - -using std::string; - -static void -ReplaceVariable( string& str, - const string& name, - const string& value ) -{ - size_t i = str.find ( name ); - while ( i != string::npos ) - { - str.replace ( i, name.length (), value ); - i = str.find ( name ); - } -} - -static std::string -FixString ( const string& str, Backend *backend, const Module& module, const FileLocation *source, - const std::string& additional_dependencies, const std::string& compiler_flags, - const std::map& custom_variables ) -{ - string ret = str; - - for ( std::map::const_iterator p = custom_variables.begin(); p != custom_variables.end(); ++ p ) - { - ReplaceVariable ( ret, "$(" + p->first + ")", p->second ); - } - - string dep = additional_dependencies; - - dep += " " + module.xmlbuildFile; - - if ( source ) - { - ReplaceVariable ( ret, "$(source_noext)", ReplaceExtension ( backend->GetFullName ( *source ), "" ) ); - ReplaceVariable ( ret, "$(source)", backend->GetFullName ( *source ) ); - ReplaceVariable ( ret, "$(source_dir)", source->relative_path ); - ReplaceVariable ( ret, "$(source_name)", source->name ); - ReplaceVariable ( ret, "$(source_name_noext)", ReplaceExtension ( source->name , "" ) ); - ReplaceVariable ( ret, "$(source_path)", backend->GetFullPath ( *source ) ); - ReplaceVariable ( ret, "$(intermediate_dir)", backend->GetFullPath ( FileLocation ( IntermediateDirectory, source->relative_path, "" ) ) ); - ReplaceVariable ( ret, "$(intermediate_path_noext)", ReplaceExtension ( backend->GetFullName ( FileLocation ( IntermediateDirectory, source->relative_path, source->name ) ), "" ) ); - ReplaceVariable ( ret, "$(intermediate_path_unique)", ReplaceExtension ( backend->GetFullName ( FileLocation ( IntermediateDirectory, source->relative_path, source->name ) ), "" ) + "_" + module.name ); - } - ReplaceVariable ( ret, "$(dependencies)", dep ); - ReplaceVariable ( ret, "$(bare_dependencies)", additional_dependencies ); - ReplaceVariable ( ret, "$(module_name)", module.name ); - ReplaceVariable ( ret, "$(module_dllname)", module.GetDllName() ); - ReplaceVariable ( ret, "$(module_output)", GetTargetMacro ( module, true ) ); - ReplaceVariable ( ret, "$(SEP)", sSep ); - - ReplaceVariable ( ret, "$(compiler_flags)", compiler_flags ); - - return ret; -} - -Rule::Rule( const std::string& command, const char *generatedFile1, ... ) - : command ( command ) -{ - va_list ap; - const char *s; - - s = generatedFile1; - va_start ( ap, generatedFile1 ); - while ( s ) - { - generatedFiles.push_back ( s ); - s = va_arg ( ap, const char* ); - } - va_end ( ap ); -} - - -void Rule::Execute ( FILE *outputFile, - MingwBackend *backend, - const Module& module, - const FileLocation *source, - string_list& clean_files, - const std::string& additional_dependencies, - const std::string& compiler_flags, - const std::map& custom_variables ) const -{ - string cmd = FixString ( command, backend, module, source, additional_dependencies, compiler_flags, custom_variables ); - - fprintf ( outputFile, "%s", cmd.c_str () ); - - for ( size_t i = 0; i < generatedFiles.size (); i++ ) - { - string file = FixString ( generatedFiles[i], backend, module, source, "", "", custom_variables ); - if ( file[file.length () - 1] != cSep ) - { - clean_files.push_back ( file ); - continue; - } - - if ( file[0] != '$' ) - throw InvalidOperationException ( __FILE__, - __LINE__, - "Invalid directory %s.", - file.c_str () ); - - size_t pos = file.find_first_of ( cSep ); - string relative_path = file.substr ( pos + 1, file.length () - pos - 2 ); - string dir = file.substr ( 0, pos ); - if ( dir == "$(INTERMEDIATE)" ) - backend->AddDirectoryTarget ( relative_path, backend->intermediateDirectory ); - else if ( dir == "$(OUTPUT)" ) - backend->AddDirectoryTarget ( relative_path, backend->outputDirectory ); - else if ( dir == "$(INSTALL)" ) - backend->AddDirectoryTarget ( relative_path, backend->installDirectory ); - else - throw InvalidOperationException ( __FILE__, - __LINE__, - "Invalid directory %s.", - dir.c_str () ); - } -} - - -void Rule::Execute ( FILE *outputFile, - MingwBackend *backend, - const Module& module, - const FileLocation *source, - string_list& clean_files, - const std::string& additional_dependencies, - const std::string& compiler_flags ) const -{ - this->Execute ( outputFile, - backend, - module, - source, - clean_files, - additional_dependencies, - compiler_flags, - std::map() ); -} diff --git a/reactos/tools/rbuild/backend/mingw/rule.h b/reactos/tools/rbuild/backend/mingw/rule.h deleted file mode 100644 index 1c9c9a5bf86..00000000000 --- a/reactos/tools/rbuild/backend/mingw/rule.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2008 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. - */ - -#pragma once - -#include "mingw.h" - -#include - -class Rule -{ -public: - Rule ( const std::string& command, const char *generatedFile1, ... ); - void Execute ( FILE *outputFile, - MingwBackend *backend, - const Module& module, - const FileLocation *source, - string_list& clean_files, - const std::string& additional_dependencies = "", - const std::string& compiler_flags = "" ) const; - void Execute ( FILE *outputFile, - MingwBackend *backend, - const Module& module, - const FileLocation *source, - string_list& clean_files, - const std::string& additional_dependencies, - const std::string& compiler_flags, - const std::map& custom_variables ) const; -private: - const std::string command; - string_list generatedFiles; -}; diff --git a/reactos/tools/rbuild/backend/mingw/rules.mak b/reactos/tools/rbuild/backend/mingw/rules.mak deleted file mode 100644 index 9ea5eb46916..00000000000 --- a/reactos/tools/rbuild/backend/mingw/rules.mak +++ /dev/null @@ -1,364 +0,0 @@ -RBUILD_fullpath=${subst <<<,,${subst $(SEP)<<<,,${subst /,$(SEP),${subst \\,$(SEP),$(1)}}<<<}} - -RBUILD_compress_prefix=${subst >>>,,${subst >>>$($(2)),$$($(2)),>>>$(1)}} -RBUILD_compress_prefixes=${call RBUILD_compress_prefix,${call RBUILD_compress_prefix,${call RBUILD_compress_prefix,${call RBUILD_compress_prefix,${call RBUILD_compress_prefix,$(1),INTERMEDIATE},OUTPUT},CDOUTPUT},TEMPORARY},INSTALL} - -RBUILD_strip_prefix=${subst >>>,,${subst >>>$($(2)),,>>>$(1)}} -RBUILD_strip_prefixes=${subst >>>,,${subst >>>$(SEP),,>>>${call RBUILD_strip_prefix,${call RBUILD_strip_prefix,${call RBUILD_strip_prefix,${call RBUILD_strip_prefix,${call RBUILD_strip_prefix,$(1),INTERMEDIATE},OUTPUT},CDOUTPUT},TEMPORARY},INSTALL}}} - -#(source) -RBUILD_intermediate_path_noext=${call RBUILD_intermediate_dir,$(1)}$(SEP)$(basename $(notdir $(1))) -RBUILD_output_path_noext=${call RBUILD_output_dir,$(1)}$(SEP)$(basename $(notdir $(1))) - -#(module, source) -RBUILD_intermediate_path_unique=${call RBUILD_intermediate_path_noext,$(2)}_$(1) -RBUILD_output_dir=${call RBUILD_output_path_noext,$(2)}_$(1) - -#(source) -RBUILD_intermediate_dir=${call RBUILD_fullpath,$(value INTERMEDIATE)$(SEP)$(dir ${call RBUILD_strip_prefixes,$(1)})} -RBUILD_output_dir=${call RBUILD_fullpath,$(value OUTPUT)$(SEP)$(dir ${call RBUILD_strip_prefixes,$(1)})} - -#(source) -RBUILD_name=$(basename $(notdir $(1))) -RBUILD_noext=$(dir $(1))$(basename $(notdir $(1))) - -#(source) -RBUILD_dir=${call RBUILD_fullpath,$(dir ${call RBUILD_compress_prefixes,$(1)})} - -#(module, flags, includes, compiler, prefix) -RBUILD_compiler_flags=\ -$$(BUILTIN_$(5)$(4)FLAGS) \ -$$(PROJECT_$(5)$(4)FLAGS) \ -$$(MODULETYPE$($(1)_TYPE)_$(4)FLAGS) \ -$$($(1)_$(4)FLAGS) \ -$(2) \ -$$($(5)$(4)FLAGS) - -#(module, flags, includes, compiler, prefix) -RBUILD_compiler_flags_with_cpp=\ -$$($(5)$(4)INCLUDES) $$(CPPINCLUDES) \ -$(3) \ -$$($(1)_$(4)INCLUDES) $$($(1)_CPPINCLUDES) \ -$$(MODULETYPE$($(1)_TYPE)_$(4)INCLUDES) $$(MODULETYPE$($(1)_TYPE)_CPPINCLUDES) \ -$$(PROJECT_$(5)$(4)INCLUDES) $$(PROJECT_$(5)CPPINCLUDES) \ -$$(BUILTIN_$(5)$(4)INCLUDES) $$(BUILTIN_$(5)CPPINCLUDES) \ -$$(BUILTIN_$(5)CPPDEFINES) $$(BUILTIN_$(5)CPPFLAGS) $$(BUILTIN_$(5)$(4)DEFINES) $$(BUILTIN_$(5)$(4)FLAGS) \ -$$(PROJECT_$(5)CPPDEFINES) $$(PROJECT_$(5)CPPFLAGS) $$(PROJECT_$(5)$(4)DEFINES) $$(PROJECT_$(5)$(4)FLAGS) \ -$$(MODULETYPE$($(1)_TYPE)_CPPDEFINES) $$(MODULETYPE$($(1)_TYPE)_CPPFLAGS) $$(MODULETYPE$($(1)_TYPE)_$(4)DEFINES) $$(MODULETYPE$($(1)_TYPE)_$(4)FLAGS) \ -$$($(1)_CPPDEFINES) $$($(1)_CPPFLAGS) $$($(1)_$(4)DEFINES) $$($(1)_$(4)FLAGS) \ -$(2) \ -$$(CPPDEFINES) $$(CPPFLAGS) $$($(5)$(4)DEFINES) $$($(5)$(4)FLAGS) - -#(module, flags, includes, compiler, prefix) -RBUILD_compiler_flags_builtin_cpp=\ -$$($(5)$(4)INCLUDES) $$(CPPINCLUDES) \ -$(3) \ -$$($(1)_$(4)INCLUDES) $$($(1)_CPPINCLUDES) \ -$$(MODULETYPE$($(1)_TYPE)_$(4)INCLUDES) $$(MODULETYPE$($(1)_TYPE)_CPPINCLUDES) \ -$$(PROJECT_$(5)$(4)INCLUDES) $$(PROJECT_$(5)CPPINCLUDES) \ -$$(BUILTIN_$(5)$(4)INCLUDES) $$(BUILTIN_$(5)CPPINCLUDES) \ -$$(BUILTIN_$(5)CPPDEFINES) $$(BUILTIN_$(5)$(4)DEFINES) $$(BUILTIN_$(5)$(4)FLAGS) \ -$$(PROJECT_$(5)CPPDEFINES) $$(PROJECT_$(5)$(4)DEFINES) $$(PROJECT_$(5)$(4)FLAGS) \ -$$(MODULETYPE$($(1)_TYPE)_CPPDEFINES) $$(MODULETYPE$($(1)_TYPE)_$(4)DEFINES) $$(MODULETYPE$($(1)_TYPE)_$(4)FLAGS) \ -$$($(1)_CPPDEFINES) $$($(1)_$(4)DEFINES) $$($(1)_$(4)FLAGS) \ -$(2) \ -$$(CPPDEFINES) $$($(5)$(4)DEFINES) $$($(5)$(4)FLAGS) - -#(module, flags, includes, compiler, prefix) -RBUILD_compiler_flags_with_includes=\ -$$($(5)$(4)INCLUDES) \ -$(3) \ -$$($(1)_$(4)INCLUDES) $$($(1)_CPPINCLUDES) \ -$$(MODULETYPE$($(1)_TYPE)_$(4)INCLUDES) \ -$$(PROJECT_$(5)$(4)INCLUDES) \ -$$(BUILTIN_$(5)$(4)INCLUDES) \ -$$(BUILTIN_$(5)$(4)FLAGS) \ -$$(PROJECT_$(5)$(4)FLAGS) \ -$$(MODULETYPE$($(1)_TYPE)_$(4)FLAGS) \ -$$($(1)_$(4)FLAGS) \ -$(2) \ -$$($(5)$(4)FLAGS) - -#(module, flags, includes, compiler, prefix) -RBUILD_compiler_flags_cpp=\ -$$($(5)$(4)INCLUDES) $$(CPPINCLUDES) \ -$(3) \ -$$($(1)_$(4)INCLUDES) $$($(1)_CPPINCLUDES) \ -$$(MODULETYPE$($(1)_TYPE)_$(4)INCLUDES) $$(MODULETYPE$($(1)_TYPE)_CPPINCLUDES) \ -$$(PROJECT_$(5)$(4)INCLUDES) $$(PROJECT_$(5)CPPINCLUDES) \ -$$(BUILTIN_$(5)$(4)INCLUDES) $$(BUILTIN_$(5)CPPINCLUDES) \ -$$(BUILTIN_$(5)CPPFLAGS) $$(BUILTIN_$(5)CPPDEFINES) $$(BUILTIN_$(5)$(4)DEFINES) \ -$$(PROJECT_$(5)CPPFLAGS) $$(PROJECT_$(5)CPPDEFINES) $$(PROJECT_$(5)$(4)DEFINES) \ -$$(MODULETYPE$($(1)_TYPE)_CPPFLAGS) $$(MODULETYPE$($(1)_TYPE)_CPPDEFINES) $$(MODULETYPE$($(1)_TYPE)_$(4)DEFINES) \ -$$($(1)_CPPFLAGS) $$($(1)_CPPDEFINES) $$($(1)_$(4)DEFINES) \ -$(2) \ -$$(CPPFLAGS) $$(CPPDEFINES) $$($(5)$(4)DEFINES) - -#(module, flags, includes) -RBUILD_cflags=${call RBUILD_compiler_flags_with_cpp,$(1),$(2),$(3),C} -RBUILD_cxxflags=${call RBUILD_compiler_flags_with_cpp,$(1),$(2),$(3),CXX} -#~ RBUILD_asflags=${call RBUILD_compiler_flags_with_cpp,$(1),$(2),$(3),AS} -RBUILD_asflags=${call RBUILD_compiler_flags_builtin_cpp,$(1),$(2),$(3),AS} -RBUILD_nasmflags=${call RBUILD_compiler_flags_builtin_cpp,$(1),$(2),$(3),NASM} -RBUILD_rc_pp_flags=${call RBUILD_compiler_flags_cpp,$(1),-DRC_INVOKED=1 -D__WIN32__=1 -D__FLAT__=1,$(3) -I.,RC} -RBUILD_rc_flags=${call RBUILD_compiler_flags_with_includes,$(1),$(2),$(3),RC} -RBUILD_spec_pp_flags=${call RBUILD_compiler_flags_cpp,$(1),,$(3),SPEC} -RBUILD_spec_flags=${call RBUILD_compiler_flags,$(1),$(2),,SPEC} -RBUILD_midlflags=${call RBUILD_compiler_flags_builtin_cpp,$(1),$(2),$(3),MIDL} -RBUILD_host_cflags=${call RBUILD_compiler_flags_with_cpp,$(1),$(2),$(3),C,HOST_} -RBUILD_host_cxxflags=${call RBUILD_compiler_flags_with_cpp,$(1),$(2),$(3),CXX,HOST_} -RBUILD_ldflags=${call RBUILD_compiler_flags,$(1),$(2),,LD} - -RCFLAG_UNICODE:=-DUNICODE -D_UNICODE - -BUILTIN_ASDEFINES+= -D__ASM__ -BUILTIN_RCFLAGS+= --nostdinc -BUILTIN_RCDEFINES+= -DRC_INVOKED -BUILTIN_NASMFLAGS+= -f win32 - -#(module, source, dependencies, cflags, output) -define RBUILD_GAS - -$(2): $${$(1)_precondition} - -ifeq ($(ROS_BUILDDEPS),full) - -$(5).d: $(2) | ${call RBUILD_dir,$(5)} - $$(ECHO_DEPENDS) - $${gas} -MF $$@ ${call RBUILD_asflags,$(1),$(4)} -M -MP -MT $$@ $$< - --include $(5).d - -$(5): $(2) $(5).d $(3) | ${call RBUILD_dir,$(5)} - $$(ECHO_AS) - $${gas} -o $$@ ${call RBUILD_asflags,$(1),$(4)} -c $$< - -else - -$(5): $(2) $(3) | ${call RBUILD_dir,$(5)} - $$(ECHO_AS) - $${gas} -o $$@ ${call RBUILD_asflags,$(1),$(4)} -c $$< - -endif - -endef - -#(module, source, dependencies, cflags) -RBUILD_GAS_RULE=${call RBUILD_GAS,$(1),$(2),$(3),$(4),${call RBUILD_intermediate_path_unique,$(1),$(2)}.o} - -#(module, source, dependencies, cflags, output) -define RBUILD_NASM - -$(2): $${$(1)_precondition} - -$(5): $(2) $(3) | ${call RBUILD_dir,$(5)} - $$(ECHO_NASM) - $${nasm} -o $$@ ${call RBUILD_nasmflags,$(1),$(4)} $$< - -endef - -# TODO: module_dllname -> ${call RBUILD_module_dllname,$(1)} - -#(module, source, dependencies, cflags, module_dllname, output) -define RBUILD_WINEBUILD_DEF - -$(6): $(2) $$(winebuild_TARGET) | ${call RBUILD_intermediate_dir,$(6)} - $$(ECHO_WINEBLD) - $$(Q)$$(winebuild_TARGET) $$(WINEBUILD_FLAGS) -o $$@ --def -E $$< --filename $(5) ${call RBUILD_spec_flags,$(1),$(4)} - -endef - -#(module, source, dependencies, cflags, module_dllname, output) -define RBUILD_WINEBUILD_STUBS - -$(6): $(2) $$(winebuild_TARGET) | ${call RBUILD_intermediate_dir,$(6)} - $$(ECHO_WINEBLD) - $$(Q)$$(winebuild_TARGET) $$(WINEBUILD_FLAGS) -o $$@ --pedll $$< --filename $(5) ${call RBUILD_spec_flags,$(1),$(4)} - -endef - -#(module, source, dependencies, cflags, module_dllname) -define RBUILD_WINEBUILD_WITH_CPP_RULE - -ifeq ($$(ROS_BUILDDEPS),full) - -${call RBUILD_DEPENDS,$(1),$(2),,${call RBUILD_spec_pp_flags,$(1),$(4)},${call RBUILD_intermediate_path_unique,$(1),$(2)}.spec.d} --include ${call RBUILD_intermediate_path_unique,$(1),$(2)}.spec.d - -${call RBUILD_CPP,$(1),$(2),${call RBUILD_intermediate_path_unique,$(1),$(2)}.spec.d $(3),${call RBUILD_spec_pp_flags,$(1),$(4)},${call RBUILD_intermediate_path_unique,$(1),$(2)}.spec} - -else - -${call RBUILD_CPP,$(1),$(2),$(3),${call RBUILD_spec_pp_flags,$(1),$(4)},${call RBUILD_intermediate_path_unique,$(1),$(2)}.spec} - -endif - -${call RBUILD_WINEBUILD_DEF,$(1),${call RBUILD_intermediate_path_unique,$(1),$(2)}.spec,,$(4),$(5),${call RBUILD_intermediate_path_unique,$(1),$(2)}.auto.def} -${call RBUILD_WINEBUILD_STUBS,$(1),${call RBUILD_intermediate_path_unique,$(1),$(2)}.spec,,$(4),$(5),${call RBUILD_intermediate_path_unique,$(1),$(2)}.stubs.c} -${call RBUILD_CC,$(1),${call RBUILD_intermediate_path_unique,$(1),$(2)}.stubs.c,,,${call RBUILD_intermediate_path_unique,$(1),$(2)}.stubs.o} - -endef - -#(module, source, dependencies, cflags, module_dllname) -define RBUILD_WINEBUILD_RULE - -${call RBUILD_WINEBUILD_DEF,$(1),$(2),$(3),$(4),$(5),${call RBUILD_intermediate_path_unique,$(1),$(2)}.auto.def} -${call RBUILD_WINEBUILD_STUBS,$(1),$(2),$(3),$(4),$(5),${call RBUILD_intermediate_path_unique,$(1),$(2)}.stubs.c} -${call RBUILD_CC,$(1),${call RBUILD_intermediate_path_unique,$(1),$(2)}.stubs.c,,,${call RBUILD_intermediate_path_unique,$(1),$(2)}.stubs.o} - -endef - -# FIXME: wrc butchers localized strings and doesn't implement -M, so we have to use an external preprocessor -#(module, source, dependencies, cflags) -define RBUILD_WRC_RULE - -$(2): $${$(1)_precondition} - -ifeq ($$(ROS_BUILDDEPS),full) - -${call RBUILD_DEPENDS,$(1),$(2),,${call RBUILD_rc_pp_flags,$(1),$(4)},${call RBUILD_intermediate_path_unique,$(1),$(2)}.res.d} --include ${call RBUILD_intermediate_path_unique,$(1),$(2)}.coff.d - -${call RBUILD_intermediate_path_unique,$(1),$(2)}.res: $(2) ${call RBUILD_intermediate_path_unique,$(1),$(2)}.res.d $(3) $$(wrc_TARGET) | ${call RBUILD_intermediate_dir,$(2)} - $$(ECHO_RC) - ${call RBUILD_PIPE_CPP,$$<,${call RBUILD_rc_pp_flags,$(1),$(4)}} | $$(wrc_TARGET) -o $$@ ${call RBUILD_rc_flags,$(1),$(4),-I${call RBUILD_dir,$(2)}} - -else - -${call RBUILD_intermediate_path_unique,$(1),$(2)}.res: $(2) $(3) $$(wrc_TARGET) | ${call RBUILD_intermediate_dir,$(2)} - $$(ECHO_RC) -ifeq ($(ARCH),amd64) - $$(Q)$$(wrc_TARGET) --input=$$< -o $$@ ${call RBUILD_rc_pp_flags,$(1),$(4)} ${call RBUILD_rc_flags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -else - ${call RBUILD_PIPE_CPP,$$<,${call RBUILD_rc_pp_flags,$(1),$(4)}} | $$(wrc_TARGET) -o $$@ ${call RBUILD_rc_flags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -endif - -endif - -${call RBUILD_intermediate_path_unique,$(1),$(2)}.coff: ${call RBUILD_intermediate_path_unique,$(1),$(2)}.res | ${call RBUILD_intermediate_dir,$(2)} - $$(ECHO_CVTRES) - $${windres} -i $$< -o $$@ -J res -O coff - -endef - -define RBUILD_WIDL - -endef - -define RBUILD_WIDL_HEADER_RULE - -$(2): $${$(1)_precondition} - -${call RBUILD_intermediate_path_noext,$(2)}.h: $(2) $(3) $$(widl_TARGET) | ${call RBUILD_intermediate_dir,$(2)} - $$(ECHO_WIDL) - $$(Q)$$(widl_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -h -o $$@ $$< - -endef - -#(module, source, dependencies, cflags) -define RBUILD_WIDL_CLIENT_RULE - -$(2): $${$(1)_precondition} - -${call RBUILD_intermediate_path_noext,$(2)}_c.c ${call RBUILD_intermediate_path_noext,$(2)}_c.h: ${call RBUILD_intermediate_path_noext,$(2)}_c - -${call RBUILD_intermediate_path_noext,$(2)}_c: $(2) $(3) $$(widl_TARGET) | ${call RBUILD_intermediate_dir,$(2)} - $$(ECHO_WIDL) - $$(Q)$$(widl_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -Oif -h -H ${call RBUILD_intermediate_path_noext,$(2)}_c.h -c -C ${call RBUILD_intermediate_path_noext,$(2)}_c.c $(2) - $${checkpoint} $$@>$(NUL) - -${call RBUILD_CC,$(1),${call RBUILD_intermediate_path_noext,$(2)}_c.c,,,${call RBUILD_intermediate_path_noext,$(2)}_c.o} - -endef - -#(module, source, dependencies, cflags) -define RBUILD_WIDL_SERVER_RULE - -$(2): $${$(1)_precondition} - -${call RBUILD_intermediate_path_noext,$(2)}_s.c ${call RBUILD_intermediate_path_noext,$(2)}_s.h: ${call RBUILD_intermediate_path_noext,$(2)}_s - -${call RBUILD_intermediate_path_noext,$(2)}_s: $(2) $(3) $$(widl_TARGET) | ${call RBUILD_intermediate_dir,$(2)} - $$(ECHO_WIDL) - $$(Q)$$(widl_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -Oif -h -H ${call RBUILD_intermediate_path_noext,$(2)}_s.h -s -S ${call RBUILD_intermediate_path_noext,$(2)}_s.c $(2) - $${checkpoint} $$@>$(NUL) - -${call RBUILD_CC,$(1),${call RBUILD_intermediate_path_noext,$(2)}_s.c,,,${call RBUILD_intermediate_path_noext,$(2)}_s.o} - -endef - -#(module, source, dependencies, cflags) -define RBUILD_WIDL_PROXY_RULE - -$(2): $${$(1)_precondition} - -${call RBUILD_intermediate_path_noext,$(2)}_p.c ${call RBUILD_intermediate_path_noext,$(2)}_p.h: ${call RBUILD_intermediate_path_noext,$(2)}_p - -${call RBUILD_intermediate_path_noext,$(2)}_p: $(2) $(3) $$(widl_TARGET) | ${call RBUILD_intermediate_dir,$(2)} - $$(ECHO_WIDL) - $$(Q)$$(widl_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -h -H ${call RBUILD_intermediate_path_noext,$(2)}_p.h -p -P ${call RBUILD_intermediate_path_noext,$(2)}_p.c $(2) - $${checkpoint} $$@>$(NUL) - -${call RBUILD_CC,$(1),${call RBUILD_intermediate_path_noext,$(2)}_p.c,,,${call RBUILD_intermediate_path_noext,$(2)}_p.o} - -endef - -#(module, source, dependencies, cflags) -define RBUILD_WIDL_INTERFACE_RULE - -$(2): $${$(1)_precondition} - -${call RBUILD_intermediate_path_noext,$(2)}_i.c: $(2) $(3) $$(widl_TARGET) | ${call RBUILD_intermediate_dir,$(2)} - $$(ECHO_WIDL) - $$(Q)$$(widl_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -u -o $$@ $$< - -${call RBUILD_CC,$(1),${call RBUILD_intermediate_path_noext,$(2)}_i.c,,,${call RBUILD_intermediate_path_noext,$(2)}_i.o} - -endef - -# FIXME: this rule sucks -#(module, source, dependencies, cflags, bare_dependencies) -define RBUILD_WIDL_DLLDATA_RULE - -$(2): $(3) ${$(1)_precondition} $$(widl_TARGET) | ${call RBUILD_intermediate_dir,$(2)} - $$(ECHO_WIDL) - $$(Q)$$(widl_TARGET) ${call RBUILD_midlflags,$(1),$(4)} --dlldata-only -o $(2) $(5) - -${call RBUILD_CC,$(1),$(2),,,${call RBUILD_intermediate_path_noext,$(2)}.o} - -endef - -#(module, source, dependencies, cflags) -define RBUILD_WIDL_TLB_RULE - -$(2): $${$(1)_precondition} - -${call RBUILD_intermediate_dir,$(2)}$$(SEP)$(1).tlb: $(2) $(3) $$(widl_TARGET) | ${call RBUILD_intermediate_dir,$(2)} - $$(ECHO_WIDL) - $$(Q)$$(widl_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -t -o $$@ $$< - -endef - -#(module, source, dependencies, cflags) -define RBUILD_HOST_GCC_RULE - -$(2): $${$(1)_precondition} - -${call RBUILD_intermediate_path_unique,$(1),$(2)}.o: $(2) $(3) | ${call RBUILD_intermediate_dir,$(2)} - $$(ECHO_HOSTCC) - $${host_gcc} -o $$@ ${call RBUILD_host_cflags,$(1),$(4)} -c $$< - -endef - -#(module, source, dependencies, cflags) -define RBUILD_HOST_GPP_RULE - -$(2): $${$(1)_precondition} - -${call RBUILD_intermediate_path_unique,$(1),$(2)}.o: $(2) $(3) | ${call RBUILD_intermediate_dir,$(2)} - $$(ECHO_HOSTCC) - $${host_gpp} -o $$@ ${call RBUILD_host_cxxflags,$(1),$(4)} -c $$< - -endef - -# EOF diff --git a/reactos/tools/rbuild/backend/msbuild/msbuild.cpp b/reactos/tools/rbuild/backend/msbuild/msbuild.cpp deleted file mode 100644 index 82a009371ab..00000000000 --- a/reactos/tools/rbuild/backend/msbuild/msbuild.cpp +++ /dev/null @@ -1,270 +0,0 @@ -/* - * Copyright (C) 2007 Christoph von Wittich - * - * 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. - */ -#ifdef _MSC_VER -#pragma warning ( disable : 4786 ) -#endif//_MSC_VER - -#include -#include -#include -#include - -#include - -#include "msbuild.h" -#include "../mingw/mingw.h" - -using std::string; -using std::vector; -using std::map; -using std::ifstream; - -#ifdef OUT -#undef OUT -#endif//OUT - - -static class MsBuildFactory : public Backend::Factory -{ - public: - - MsBuildFactory() : Factory("MsBuild", "Ms Build") {} - Backend *operator() (Project &project, - Configuration& configuration) - { - return new MsBuildBackend(project, configuration); - } - -} factory; - - -MsBuildBackend::MsBuildBackend(Project &project, - Configuration& configuration) : Backend(project, configuration) -{ - -} - -void MsBuildBackend::Process() -{ - if ( configuration.CleanAsYouGo ) { - _clean_project_files(); - return; - } - - ProcessModules(); -} - -void -MsBuildBackend::_generate_makefile ( const Module& module ) -{ - string makefile = module.output->relative_path + "\\makefile"; - FILE* OUT = fopen ( makefile.c_str(), "wb" ); - fprintf ( OUT, "!INCLUDE $(NTMAKEENV)\\makefile.def\r\n" ); - fclose ( OUT ); -} - -void -MsBuildBackend::_generate_sources ( const Module& module ) -{ - size_t i; - - string module_type = GetExtension(*module.output); - vector source_files, resource_files, includes, libraries; - vector header_files, common_defines, compiler_flags; - vector vars, values; - string sourcesfile = module.output->relative_path + "\\sources"; - string proj_path = module.output->relative_path; - - FILE* OUT = fopen ( sourcesfile.c_str(), "wb" ); - fprintf ( OUT, "TARGETNAME=%s\r\n", module.name.c_str() ); - - vector ifs_list; - ifs_list.push_back ( &module.project.non_if_data ); - ifs_list.push_back ( &module.non_if_data ); - while ( ifs_list.size() ) - { - const IfableData& data = *ifs_list.back(); - ifs_list.pop_back(); - const vector& files = data.files; - for ( i = 0; i < files.size(); i++ ) - { - source_files.push_back ( files[i]->file.name ); - } - const vector& incs = data.includes; - for ( i = 0; i < incs.size(); i++ ) - { - string path = Path::RelativeFromDirectory ( - incs[i]->directory->relative_path, - module.output->relative_path ); - - includes.push_back ( path ); - } - const vector& libs = data.libraries; - for ( i = 0; i < libs.size(); i++ ) - { - libraries.push_back ( libs[i]->name ); - } - const vector& cflags = data.compilerFlags; - for ( i = 0; i < cflags.size(); i++ ) - { - compiler_flags.push_back ( cflags[i]->flag ); - } - const vector& defs = data.defines; - for ( i = 0; i < defs.size(); i++ ) - { - if ( defs[i]->value[0] ) - { - const string& escaped = _replace_str(defs[i]->value, "\"","""); - common_defines.push_back( defs[i]->name + "=" + escaped ); - } - else - { - common_defines.push_back( defs[i]->name ); - } - } - } - - if (module_type == ".sys") - fprintf ( OUT, "TARGETTYPE=DRIVER\r\n" ); - else if (module_type == ".dll") - { - fprintf ( OUT, "TARGETTYPE=LIBRARY\r\n" ); - - } - else if (module_type == ".exe") - fprintf ( OUT, "TARGETTYPE=PROGRAM\r\n" ); - - fprintf ( OUT, "\r\nMSC_WARNING_LEVEL=/W3 /WX\r\n\r\n" ); - - /* Disable deprecated function uage warnings */ - fprintf ( OUT, "C_DEFINES=$(C_DEFINES) /DSTDCALL=__stdcall /DDDKAPI=__stdcall /wd4996\r\n" ); - - - /* includes */ - fprintf ( OUT, "INCLUDES=.; \\\r\n" ); - for ( i = 1; i < includes.size() -1; i++ ) - { - const string& include = includes[i]; - - /* don't include psdk / ddk / crt */ - std::string::size_type pos = include.find("ddk"); - std::string::size_type pos2 = include.find("psdk"); - std::string::size_type pos3 = include.find("crt"); - if ((std::string::npos == pos) && (std::string::npos == pos2) && (std::string::npos == pos3)) - fprintf ( OUT, "\t%s; \\\r\n", include.c_str() ); - } - if (includes.size() > 1) - { - const string& include = includes[includes.size()-1]; - fprintf ( OUT, "\t%s \r\n\r\n", include.c_str() ); - } - - fprintf ( OUT, "TARGETLIBS= $(DDK_LIB_PATH)\\ntstrsafe.lib\r\n\r\n" ); - - string source_file = ""; - if (source_files.size() > 0) - { - source_file = DosSeparator(source_files[0]); - fprintf ( OUT, "SOURCES=%s \\\r\n", source_file.c_str() ); - - for ( size_t isrcfile = 1; isrcfile < source_files.size()-1; isrcfile++ ) - { - source_file = DosSeparator(source_files[isrcfile]); - fprintf ( OUT, "\t%s \\\r\n", source_file.c_str() ); - } - } - if (source_files.size() > 1) - { - source_file = DosSeparator(source_files[source_files.size()-1]); - fprintf ( OUT, "\t%s \r\n", source_file.c_str() ); - } - - fprintf ( OUT, "TARGET_DESTINATION=retail\r\n" ); - - - fclose ( OUT ); -} - -void MsBuildBackend::ProcessModules() -{ - for( std::map::const_iterator p = ProjectNode.modules.begin(); p != ProjectNode.modules.end(); ++ p ) - { - Module &module = *p->second; - _generate_makefile ( module ); - _generate_sources ( module ); - } -} - -void -MsBuildBackend::_clean_project_files ( void ) -{ - for( std::map::const_iterator p = ProjectNode.modules.begin(); p != ProjectNode.modules.end(); ++ p ) - { - Module& module = *p->second; - printf("Cleaning project %s %s\n", module.name.c_str (), module.output->relative_path.c_str () ); - - string makefile = module.output->relative_path + "\\makefile"; - string sourcesfile = module.output->relative_path + "\\sources"; - - string basepath = module.output->relative_path; - remove ( makefile.c_str() ); - remove ( sourcesfile.c_str() ); - } -} - -MsBuildConfiguration::MsBuildConfiguration ( const std::string &name ) -{ - /* nothing to do here */ -} - -const Property* -MsBuildBackend::_lookup_property ( const Module& module, const std::string& name ) const -{ - std::map::const_iterator p; - - /* Check local values */ - p = module.non_if_data.properties.find(name); - - if ( p != module.non_if_data.properties.end() ) - return p->second; - - // TODO FIXME - should we check local if-ed properties? - p = module.project.non_if_data.properties.find(name); - - if ( p != module.project.non_if_data.properties.end() ) - return p->second; - - // TODO FIXME - should we check global if-ed properties? - return NULL; -} - -std::string -MsBuildBackend::_replace_str(std::string string1, const std::string &find_str, const std::string &replace_str) -{ - std::string::size_type pos = string1.find(find_str, 0); - int intLen = find_str.length(); - - while(std::string::npos != pos) - { - string1.replace(pos, intLen, replace_str); - pos = string1.find(find_str, intLen + pos); - } - - return string1; -} - diff --git a/reactos/tools/rbuild/backend/msbuild/msbuild.h b/reactos/tools/rbuild/backend/msbuild/msbuild.h deleted file mode 100644 index d1cd1f08fe6..00000000000 --- a/reactos/tools/rbuild/backend/msbuild/msbuild.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2007 Christoph von Wittich - * - * 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 - -#include -#include -#include - -#include "../backend.h" - -class MsBuildConfiguration -{ - public: - MsBuildConfiguration(const std::string &name = ""); - virtual ~MsBuildConfiguration() {} - std::string name; -}; - -class MsBuildBackend : public Backend -{ - public: - - MsBuildBackend(Project &project, - Configuration& configuration); - virtual ~MsBuildBackend() {} - - virtual void Process(); - - private: - - FILE* m_MsBuildFile; - - std::vector m_configurations; - void _generate_makefile ( const Module& module ); - void _generate_sources ( const Module& module ); - void _clean_project_files ( void ); - void ProcessModules(); - const Property* _lookup_property ( const Module& module, const std::string& name ) const; - std::string _replace_str(std::string string1, const std::string &find_str, const std::string &replace_str); - - struct module_data - { - std::vector libraries; - std::vector references; - - module_data() - {} - ~module_data() - {} - }; - -}; diff --git a/reactos/tools/rbuild/backend/msvc/genguid.cpp b/reactos/tools/rbuild/backend/msvc/genguid.cpp deleted file mode 100644 index 5dedb375ef8..00000000000 --- a/reactos/tools/rbuild/backend/msvc/genguid.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Based on the genguid utility for WINE and ReactOS - * - * Copyright 2003 Jonathan Wilson - * Copyright 2005 Steven Edwards - * - * 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 "../../pch.h" -#include "msvc.h" -#include - -using std::string; - -#ifdef _WIN32 -#include -#include - -typedef HRESULT _stdcall CoInitializeFunc ( PVOID ); -typedef void _stdcall CoUninitializeFunc ( void ); -typedef HRESULT _stdcall CoCreateGuidFunc ( GUID* ); - -static CoInitializeFunc *pCoInitialize = NULL; -static CoUninitializeFunc *pCoUninitialize = NULL; -static CoCreateGuidFunc *pCoCreateGuid = NULL; - - -std::string -MSVCBackend::_gen_guid() -{ - GUID m_guid; - HRESULT result; - bool good_guid = false; - static char guid[38]; - - // Load ole32. We will need it later on - HMODULE olelib = LoadLibrary ( "ole32.dll" ); - if ( olelib != NULL ) - { - pCoInitialize = (CoInitializeFunc *)GetProcAddress( olelib, "CoInitialize" ); - pCoUninitialize = (CoUninitializeFunc *)GetProcAddress( olelib, "CoUninitialize" ); - pCoCreateGuid = (CoCreateGuidFunc *)GetProcAddress( olelib, "CoCreateGuid" ); - if ( !pCoInitialize || !pCoUninitialize || !pCoCreateGuid ) - printf ( "Missing exports from ole32.dll\n" ); - else - { - if (pCoInitialize(NULL) != S_OK) - printf("Unable to initalize OLE libraries\n"); - else - { - result = pCoCreateGuid(&m_guid); - if (result != S_OK) - printf("Unable to create GUID\n"); - else - good_guid = true; - pCoUninitialize(); - } - } - FreeLibrary ( olelib ); - } - if ( !good_guid ) - { - // TODO FIXME - fall-back to random #'s - } - const char* strfmt = "%08lX-%04X-%04x-%02X%02X-%02X%02X%02X%02X%02X%02X"; - sprintf(guid, strfmt,m_guid.Data1,m_guid.Data2,m_guid.Data3,m_guid.Data4[0], - m_guid.Data4[1],m_guid.Data4[2],m_guid.Data4[3],m_guid.Data4[4],m_guid.Data4[5], - m_guid.Data4[6],m_guid.Data4[7],m_guid.Data1,m_guid.Data2,m_guid.Data3,m_guid.Data4[0], - m_guid.Data4[1],m_guid.Data4[2],m_guid.Data4[3],m_guid.Data4[4],m_guid.Data4[5], - m_guid.Data4[6],m_guid.Data4[7]); - - return guid; -} - -#else /* Linux, etc */ - -std::string -MSVCBackend::_gen_guid() -{ - return std::string(); -} -#endif /* WIN32/Linux */ diff --git a/reactos/tools/rbuild/backend/msvc/msvc.cpp b/reactos/tools/rbuild/backend/msvc/msvc.cpp deleted file mode 100644 index 6fc993d06b3..00000000000 --- a/reactos/tools/rbuild/backend/msvc/msvc.cpp +++ /dev/null @@ -1,568 +0,0 @@ -/* - * Copyright (C) 2005 Trevor McCort - * Copyright (C) 2005 Casper S. Hornstrup - * Copyright (C) 2005 Steven Edwards - * Copyright (C) 2005 Royce Mitchell - * Copyright (C) 2006 Christoph von Wittich - * Copyright (C) 2009 Ged Murphy - * - * 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. - */ -#ifdef _MSC_VER -#pragma warning ( disable : 4786 ) -#pragma warning ( disable : 4996 ) -#endif//_MSC_VER - -#include -#include -#include -#include - -#include "msvc.h" - -using std::string; -using std::vector; -using std::ifstream; - -static class MSVCFactory : public Backend::Factory -{ - public: - - MSVCFactory() : Factory("MSVC", "Microsoft Visual C") {} - Backend *operator() (Project &project, - Configuration& configuration) - { - return new MSVCBackend(project, configuration); - } - -} factory; - -MSVCConfiguration::MSVCConfiguration ( const OptimizationType optimization, const HeadersType headers, const std::string &name ) -{ - this->optimization = optimization; - this->headers = headers; - if ( name != "" ) - this->name = name; - else - { - std::string headers_name; - if ( headers == MSVCHeaders ) - headers_name = ""; - else - headers_name = " - ReactOS headers"; - if ( optimization == Debug ) - this->name = "Debug" + headers_name; - else if ( optimization == Release ) - this->name = "Release" + headers_name; - else if ( optimization == Speed ) - this->name = "Speed" + headers_name; - else if ( optimization == RosBuild ) - this->name = "RosBuild"; - else - this->name = "Unknown" + headers_name; - } -} - -MSVCBackend::MSVCBackend(Project &project, - Configuration& configuration) : Backend(project, configuration) -{ - m_unitCount = 0; -} - -void MSVCBackend::Process() -{ - while ( m_configurations.size () > 0 ) - { - const MSVCConfiguration* cfg = m_configurations.back(); - m_configurations.pop_back(); - delete cfg; - } - - //Don't generate configurations that require WDK if it can't be found - if(getenv ( "BASEDIR" ) != NULL) - { - m_configurations.push_back ( new MSVCConfiguration( Debug )); - m_configurations.push_back ( new MSVCConfiguration( Release )); - } - m_configurations.push_back ( new MSVCConfiguration( RosBuild )); - m_configurations.push_back ( new MSVCConfiguration( Debug, ReactOSHeaders )); - m_configurations.push_back ( new MSVCConfiguration( Release, ReactOSHeaders )); - // m_configurations.push_back ( new MSVCConfiguration( Speed )); - // m_configurations.push_back ( new MSVCConfiguration( Speed, ReactOSHeaders )); - - if ( configuration.CleanAsYouGo ) { - _clean_project_files(); - return; - } - if ( configuration.InstallFiles ) { - _install_files( _get_vc_dir(), configuration.VSConfigurationType ); - return; - } - string filename_sln ( ProjectNode.name ); - - filename_sln += "_auto.sln"; - printf ( "Creating MSVC workspace: %s\n", filename_sln.c_str() ); - - if (configuration.VSProjectVersion == "10.00") - { - PropsMaker propsMaker( &ProjectNode, "reactos.props", m_configurations ); - propsMaker._generate_props( _get_solution_version(), _get_studio_version() ); - } - else - { - //Write a property page for each configuration - for ( size_t icfg = 0; icfg < m_configurations.size(); icfg++ ) - { - MSVCConfiguration* cfg = m_configurations[icfg]; - - //RosBuild doesn't need a property page - if(cfg->optimization == RosBuild) - continue; - - //Write the propery pages files - string filename_props( cfg->name ); - - filename_props = filename_props + ".vsprops"; - VSPropsMaker propsMaker( configuration, &ProjectNode, filename_props, cfg ); - propsMaker._generate_props( _get_solution_version(), _get_studio_version() ); - } - } - // Write out the project files - ProcessModules(); - - printf ( "Done.\n" ); -} - -void MSVCBackend::ProcessModules() -{ - string filename_sln ( ProjectNode.name ); - - filename_sln += "_auto.sln"; - - // Write the solution file - SlnMaker slnMaker( configuration, m_configurations, filename_sln, _get_solution_version(), _get_studio_version() ); - - for(std::map::const_iterator p = ProjectNode.modules.begin(); p != ProjectNode.modules.end(); ++ p) - { - Module &module = *p->second; - - module.guid = _gen_guid(); - - ProjMaker *projMaker; - - if (configuration.VSProjectVersion == "10.00") - { - string vcxproj_file = VcxprojFileName(module); - projMaker = new VCXProjMaker( configuration, m_configurations, vcxproj_file, module ); - } - else - { - string vcproj_file = VcprojFileName(module); - projMaker = new VCProjMaker( configuration, m_configurations, vcproj_file, module ); - } - - projMaker->_generate_proj_file ( module ); - - slnMaker._add_project(*projMaker, module); - - delete projMaker; - } - -} - -static bool FileExists(string &filename) -{ - ifstream file(filename.c_str()); - - if(!file.is_open()) - return false; - - file.close(); - return true; -} - -void MSVCBackend::ProcessFile(string &filepath) -{ - // Remove the .\ at the start of the filenames - if ( filepath[0] == '.' && strchr ( "/\\", filepath[1] ) ) - filepath.erase(0, 2); - - if(!FileExists(filepath)) - return; - - // Change the \ to / - for(size_t i = 0; i < filepath.length(); i++) - { - if(filepath[i] == '\\') - filepath[i] = '/'; - } - - // Remove the filename from the path - string folder = ""; - - size_t pos = filepath.rfind(string("/"), filepath.length() - 1); - - if(pos != string::npos) - { - folder = filepath; - folder.erase(pos, folder.length() - pos); - } - - FileUnit fileUnit; - fileUnit.filename = filepath; - fileUnit.folder = folder; - - m_fileUnits.push_back(fileUnit); - - if(folder != "") - AddFolders(folder); - - m_unitCount++; -} - -bool MSVCBackend::CheckFolderAdded(string &folder) -{ - for(size_t i = 0; i < m_folders.size(); i++) - { - if(m_folders[i] == folder) - return true; - } - - return false; -} - -void MSVCBackend::AddFolders(string &folder) -{ - // Check if this folder was already added. true if it was, false otherwise. - if(CheckFolderAdded(folder)) - return; - - m_folders.push_back(folder); - - size_t pos = folder.rfind(string("/"), folder.length() - 1); - - if(pos == string::npos) - return; - - folder.erase(pos, folder.length() - pos); - AddFolders(folder); -} - -void MSVCBackend::OutputFolders() -{ -#if 0 - m_devFile << "Folders="; - - for(size_t i = 0; i < m_folders.size(); i++) - { - if(i > 0) - m_devFile << ","; - - m_devFile << m_folders[i]; - } -#endif -} - -std::string -MSVCBackend::UserFileName ( const Module& module, std::string vcproj_file ) const -{ - string computername; - string username; - - if (getenv ( "USERNAME" ) != NULL) - username = getenv ( "USERNAME" ); - if (getenv ( "COMPUTERNAME" ) != NULL) - computername = getenv ( "COMPUTERNAME" ); - else if (getenv ( "HOSTNAME" ) != NULL) - computername = getenv ( "HOSTNAME" ); - - if ((computername != "") && (username != "")) - return vcproj_file + "." + computername + "." + username + ".user"; - else - return ""; -} - -std::string -MSVCBackend::SuoFileName ( const Module& module ) const -{ - return FixSeparatorForSystemCommand( - ReplaceExtension ( module.output->relative_path + "\\" + module.output->name, "_" + _get_vc_dir() + "_auto.suo" ) - ); -} - -std::string -MSVCBackend::SlnFileName ( const Module& module ) const -{ - return FixSeparatorForSystemCommand( - ReplaceExtension ( module.output->relative_path + "\\" + module.output->name, "_" + _get_vc_dir() + "_auto.sln" ) - ); -} - -std::string -MSVCBackend::NcbFileName ( const Module& module ) const -{ - return FixSeparatorForSystemCommand( - ReplaceExtension ( module.output->relative_path + "\\" + module.output->name, "_" + _get_vc_dir() + "_auto.ncb" ) - ); -} - -std::string -MSVCBackend::VcprojFileName ( const Module& module ) const -{ - return FixSeparatorForSystemCommand( - ReplaceExtension ( module.output->relative_path + "\\" + module.name, "_" + _get_vc_dir() + "_auto.vcproj" ) - ); -} - -std::string -MSVCBackend::VcxprojFileName ( const Module& module ) const -{ - return FixSeparatorForSystemCommand( - ReplaceExtension ( module.output->relative_path + "\\" + module.name, "_" + _get_vc_dir() + "_auto.vcxproj" ) - ); -} - -std::string MSVCBackend::_get_vc_dir ( void ) const -{ - if ( configuration.VSProjectVersion == "8.00" ) - return "vc8"; - else if ( configuration.VSProjectVersion == "10.00" ) - return "vc10"; - else /* default to VS2008 */ - return "vc9"; -} - -void -MSVCBackend::_get_object_files ( const Module& module, vector& out) const -{ - string basepath = module.output->relative_path; - string vcdir = _get_vc_dir (); - size_t i; - string intenv = Environment::GetIntermediatePath () + DEF_SSEP + basepath + DEF_SSEP; - string outenv = Environment::GetOutputPath () + DEF_SSEP + basepath + DEF_SSEP; - - if ( configuration.UseVSVersionInPath ) - { - intenv += vcdir + DEF_SSEP; - outenv += vcdir + DEF_SSEP; - } - - string dbg = vcdir.substr ( 0, 3 ); - - vector cfgs; - - if ( configuration.UseConfigurationInPath ) - { - cfgs.push_back ( intenv + "Debug" ); - cfgs.push_back ( intenv + "Release" ); - cfgs.push_back ( intenv + "Speed" ); - cfgs.push_back ( outenv + "Debug" ); - cfgs.push_back ( outenv + "Release" ); - cfgs.push_back ( outenv + "Speed" ); - } - else - { - cfgs.push_back ( intenv ); - cfgs.push_back ( outenv ); - } - - vector ifs_list; - ifs_list.push_back ( &module.project.non_if_data ); - ifs_list.push_back ( &module.non_if_data ); - while ( ifs_list.size () ) - { - const IfableData& data = *ifs_list.back(); - ifs_list.pop_back(); - const vector& files = data.files; - for ( i = 0; i < files.size (); i++ ) - { - string file = files[i]->file.relative_path + sSep + files[i]->file.name; - string::size_type pos = file.find_last_of (DEF_SSEP); - if ( pos != string::npos ) - file.erase ( 0, pos+1 ); - if ( !stricmp ( Right(file,3).c_str(), ".rc" ) ) - file = ReplaceExtension ( file, ".res" ); - else - file = ReplaceExtension ( file, ".obj" ); - for ( size_t j = 0; j < cfgs.size () / 2; j++ ) - out.push_back ( cfgs[j] + file ); - } - - } - //common files in intermediate dir - for ( i = 0; i < cfgs.size () / 2; i++) - { - out.push_back ( cfgs[i] + "BuildLog.htm" ); - out.push_back ( cfgs[i] + dbg + "0.pdb" ); - out.push_back ( cfgs[i] + dbg + "0.idb" ); - out.push_back ( cfgs[i] + module.name + ".pch" ); - } - //files in the output dir - for ( i = cfgs.size () / 2; i < cfgs.size (); i++ ) - { - out.push_back ( cfgs[i] + module.output->name ); - out.push_back ( cfgs[i] + module.name + ".pdb" ); - out.push_back ( cfgs[i] + module.name + ".lib" ); - out.push_back ( cfgs[i] + module.name + ".exp" ); - out.push_back ( cfgs[i] + module.name + ".ilk" ); - } -} - -void -MSVCBackend::_get_def_files ( const Module& module, vector& out) const -{ - if (module.HasImportLibrary()) - { -#if 0 - string modulename = module.GetBasePath (); - string file = module.importLibrary->definition; - size_t pos = file.find (".def"); - if (pos != string::npos) - { - file.insert (pos, "_msvc"); - } - modulename += DEF_SSEP + file; - out.push_back (modulename); -#endif - } -} - -void -MSVCBackend::_clean_project_files ( void ) -{ - for( std::map::const_iterator p = ProjectNode.modules.begin(); p != ProjectNode.modules.end(); ++ p ) - { - Module& module = *p->second; - vector out; - printf("Cleaning project %s %s %s\n", module.name.c_str (), module.output->relative_path.c_str (), NcbFileName ( module ).c_str () ); - - string vcproj_file_user = UserFileName(module, VcprojFileName ( module )); - if(vcproj_file_user != "") - remove ( vcproj_file_user.c_str () ); - - _get_object_files ( module, out ); - _get_def_files ( module, out ); - for ( size_t j = 0; j < out.size (); j++) - { - printf("Cleaning file %s\n", out[j].c_str () ); - remove ( out[j].c_str () ); - } - } - - string filename_sln = ProjectNode.name + ".sln"; - - remove ( filename_sln.c_str () ); -} - -bool -MSVCBackend::_copy_file ( const std::string& inputname, const std::string& targetname ) const -{ - FILE * input = fopen ( inputname.c_str (), "rb" ); - if ( !input ) - return false; - - FILE * output = fopen ( targetname.c_str (), "wb+" ); - if ( !output ) - { - fclose ( input ); - return false; - } - - char buffer[256]; - int num_read; - while ( (num_read = fread( buffer, sizeof(char), 256, input) ) || !feof( input ) ) - fwrite( buffer, sizeof(char), num_read, output ); - - fclose ( input ); - fclose ( output ); - return true; -} - -void -MSVCBackend::_install_files (const std::string& vcdir, const::string& config) -{ - for( std::map::const_iterator p = ProjectNode.modules.begin(); p != ProjectNode.modules.end(); ++ p ) - { - Module& module = *p->second; - if ( !module.install ) - continue; - - string inputname = Environment::GetOutputPath () + DEF_SSEP + module.output->relative_path + DEF_SSEP + vcdir + DEF_SSEP + config + DEF_SSEP + module.output->name; - string installdir = Environment::GetInstallPath () + DEF_SSEP + module.install->relative_path + DEF_SSEP + module.install->name; - if ( _copy_file( inputname, installdir ) ) - printf ("Installed File :'%s'\n",installdir.c_str () ); - } -} - -std::string -MSVCBackend::_get_solution_version ( void ) -{ - string version; - - if (configuration.VSProjectVersion.empty()) - configuration.VSProjectVersion = MS_VS_DEF_VERSION; - - else if (configuration.VSProjectVersion == "8.00") - version = "9.00"; - - else if (configuration.VSProjectVersion == "9.00") - version = "10.00"; - - else if (configuration.VSProjectVersion == "10.00") - version = "11.00"; - - return version; -} - -std::string -MSVCBackend::_get_studio_version ( void ) -{ - string version; - - if (configuration.VSProjectVersion.empty()) - configuration.VSProjectVersion = MS_VS_DEF_VERSION; - - else if (configuration.VSProjectVersion == "8.00") - version = "2005"; - - else if (configuration.VSProjectVersion == "9.00") - version = "2008"; - - else if (configuration.VSProjectVersion == "10.00") - version = "2010"; - - return version; -} - -const Property* -MSVCBackend::_lookup_property ( const Module& module, const std::string& name ) const -{ - std::map::const_iterator p; - - /* Check local values */ - p = module.non_if_data.properties.find(name); - - if ( p != module.non_if_data.properties.end() ) - return p->second; - - // TODO FIXME - should we check local if-ed properties? - p = module.project.non_if_data.properties.find(name); - - if ( p != module.project.non_if_data.properties.end() ) - return p->second; - - // TODO FIXME - should we check global if-ed properties? - return NULL; -} diff --git a/reactos/tools/rbuild/backend/msvc/msvc.h b/reactos/tools/rbuild/backend/msvc/msvc.h deleted file mode 100644 index 25bc70d0aa6..00000000000 --- a/reactos/tools/rbuild/backend/msvc/msvc.h +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Copyright (C) 2005 Trevor McCort - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 - -#include -#include -#include - -#include "../backend.h" - -#ifdef OUT -#undef OUT -#endif//OUT - - -class FileUnit -{ - public: - std::string filename; - std::string folder; -}; - -enum OptimizationType -{ - RosBuild, - Debug, - Release, - Speed, -}; - -enum ConfigurationType -{ - ConfigUnknown, - ConfigApp, - ConfigDll, - ConfigEmpty, - ConfigLib -}; - -enum BinaryType -{ - BinUnknown, - Lib, - Dll, - Exe, - Sys -}; - -enum HeadersType -{ - MSVCHeaders, - ReactOSHeaders -}; - -class MSVCConfiguration -{ - public: - MSVCConfiguration(const OptimizationType optimization, - const HeadersType headers = MSVCHeaders, - const std::string &name = ""); - virtual ~MSVCConfiguration() {} - std::string name; - OptimizationType optimization; - HeadersType headers; -}; - -class MSVCBackend : public Backend -{ - public: - - MSVCBackend(Project &project, - Configuration& configuration); - virtual ~MSVCBackend() {} - - virtual void Process(); - - private: - - void ProcessModules(); - void ProcessFile(std::string &filename); - - bool CheckFolderAdded(std::string &folder); - void AddFolders(std::string &folder); - - void OutputFolders(); - void OutputFileUnits(); - - std::string VcprojFileName ( const Module& module ) const; - std::string VcxprojFileName ( const Module& module ) const; - std::string SlnFileName ( const Module& module ) const; - std::string SuoFileName ( const Module& module ) const; - std::string UserFileName ( const Module& module, std::string vcproj_file ) const; - std::string NcbFileName ( const Module& module ) const; - - std::vector m_configurations; - - std::vector m_fileUnits; - std::vector m_folders; - - int m_unitCount; - - std::string _gen_guid(); - - std::string _get_solution_version ( void ); - std::string _get_studio_version ( void ); - std::string _get_vc_dir ( void ) const; - - void _clean_project_files ( void ); - void _get_object_files ( const Module& module, std::vector& out ) const; - void _get_def_files ( const Module& module, std::vector& out ) const; - void _install_files ( const std::string& vcdir, const std::string& config ); - bool _copy_file ( const std::string& inputname, const std::string& targetname ) const; - const Property* _lookup_property ( const Module& module, const std::string& name ) const; -}; - - -// Abstract class -class ProjMaker -{ - public: - ProjMaker ( ); - ProjMaker ( Configuration& buildConfig, const std::vector& msvc_configs, std::string filename ); - virtual ~ProjMaker() {} - - virtual void _generate_proj_file ( const Module& module ) = 0; - virtual void _generate_user_configuration (); - - std::string VcprojFileName ( const Module& module ) const; - - protected: - Configuration configuration; - std::vector m_configurations; - std::string vcproj_file; - FILE* OUT; - - std::vector header_files; - std::vector source_files; - std::vector resource_files; - std::vector generated_files; - std::vector defines; - std::vector includes; - std::vector libraries; - - std::string baseaddr; - BinaryType binaryType; - - std::string _get_vc_dir ( void ) const; - std::string _strip_gcc_deffile(std::string Filename, std::string sourcedir, std::string objdir); - std::string _get_solution_version ( void ); - std::string _get_studio_version ( void ); - std::string _replace_str( std::string string1, const std::string &find_str, const std::string &replace_str); - std::string _get_file_path( FileLocation* file, std::string relative_path); - - void _collect_files(const Module& module); - void _generate_standard_configuration( const Module& module, const MSVCConfiguration& cfg, BinaryType binaryType ); - void _generate_makefile_configuration( const Module& module, const MSVCConfiguration& cfg ); -}; - -class VCProjMaker : public ProjMaker -{ - public: - VCProjMaker ( ); - VCProjMaker ( Configuration& buildConfig, const std::vector& msvc_configs, std::string filename, const Module& module ); - virtual ~VCProjMaker (); - - void _generate_proj_file ( const Module& module ); - void _generate_user_configuration (); - - private: - - void _generate_standard_configuration( const Module& module, const MSVCConfiguration& cfg, BinaryType binaryType ); - void _generate_makefile_configuration( const Module& module, const MSVCConfiguration& cfg ); - std::string _get_file_path( FileLocation* file, std::string relative_path); -}; - -class VCXProjMaker : public ProjMaker -{ - public: - VCXProjMaker ( ); - VCXProjMaker ( Configuration& buildConfig, const std::vector& msvc_configs, std::string filename, const Module& module ); - virtual ~VCXProjMaker (); - - void _generate_proj_file ( const Module& module ); - void _generate_user_configuration (); - - private: - std::string _get_configuration_type (); - void _generate_item_group (std::vector); - void _generate_standard_configuration( const Module& module, const MSVCConfiguration& cfg, BinaryType binaryType ); - void _generate_makefile_configuration( const Module& module, const MSVCConfiguration& cfg ); -}; - -class SlnMaker -{ - public: - SlnMaker ( Configuration& buildConfig, const std::vector& configurations, std::string filename_sln, std::string solution_version, std::string studio_version); - ~SlnMaker (); - - void _add_project(ProjMaker &project, Module &module); - private: - Configuration m_configuration; - std::vector m_configurations; - FILE* OUT; - std::vector modules; - - void _generate_sln_header ( std::string solution_version, std::string studio_version ); - void _generate_sln_footer ( ); - void _generate_sln_configurations ( std::string vcproj_guid ); -}; - -class VSPropsMaker -{ - public: - VSPropsMaker ( Configuration& buildConfig, - Project* ProjectNode, - std::string filename_props, - MSVCConfiguration* msvc_configs); - - ~VSPropsMaker (); - - void _generate_props ( std::string solution_version, std::string studio_version ); - - private: - Configuration m_configuration; - Project* m_ProjectNode; - FILE* OUT; - MSVCConfiguration* m_msvc_config; - bool debug; - bool release; - bool speed; - bool use_ros_headers; - - void _generate_header(); - void _generate_tools_defaults(); - void _generate_macro(std::string Name, std::string Value, bool EvairomentVariable); - void _generate_global_includes(); - void _generate_global_definitions(); - void _generate_footer(); - -}; - - -class PropsMaker -{ - public: - PropsMaker ( Project* ProjectNode, - std::string filename_props, - std::vector configurations); - - ~PropsMaker (); - - void _generate_props ( std::string solution_version, std::string studio_version ); - - private: - Project* m_ProjectNode; - FILE* OUT; - std::vector m_configurations; - - void _generate_macro(std::string Name, std::string Value); - void _generate_global_includes(bool debug, bool use_ros_headers); - void _generate_global_definitions(bool debug, bool use_ros_headers); - void _generate_header(); - void _generate_footer(); - -}; \ No newline at end of file diff --git a/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp b/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp deleted file mode 100644 index 82bd3ee600d..00000000000 --- a/reactos/tools/rbuild/backend/msvc/msvcmaker.cpp +++ /dev/null @@ -1,872 +0,0 @@ -/* - * Copyright (C) 2002 Patrik Stridvall - * Copyright (C) 2005 Royce Mitchell III - * - * 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. - */ - -#ifdef _MSC_VER -#pragma warning ( disable : 4786 ) -#endif//_MSC_VER - -#include -#include -#include - -#include - -#include "msvc.h" - -using std::string; -using std::vector; -using std::set; - -typedef set StringSet; - -#ifdef OUT -#undef OUT -#endif//OUT - -void -MSVCBackend::_generate_dsp ( const Module& module ) -{ - size_t i; - // TODO FIXME wine hack? - const bool wine = false; - - string dsp_file = DspFileName(module); - printf ( "Creating MSVC project: '%s'\n", dsp_file.c_str() ); - FILE* OUT = fopen ( dsp_file.c_str(), "wb" ); - - vector imports; - for ( i = 0; i < module.non_if_data.libraries.size(); i++ ) - { - imports.push_back ( module.non_if_data.libraries[i]->name ); - } - - string module_type = GetExtension(*module.output); - bool lib = (module_type == ".lib") || (module_type == ".a"); - bool dll = (module_type == ".dll") || (module_type == ".cpl"); - bool exe = (module_type == ".exe") || (module_type == ".scr"); - // TODO FIXME - need more checks here for 'sys' and possibly 'drv'? - - bool console = exe && (module.type == Win32CUI); - - // TODO FIXME - not sure if the count here is right... - int parts = 0; - const char* p = strpbrk ( dsp_file.c_str(), "/\\" ); - while ( p ) - { - ++parts; - p = strpbrk ( p+1, "/\\" ); - } - string msvc_wine_dir = ".."; - while ( --parts ) - msvc_wine_dir += "\\.."; - - string wine_include_dir = msvc_wine_dir + "\\include"; - - //$progress_current++; - //$output->progress("$dsp_file (file $progress_current of $progress_max)"); - - // TODO FIXME - what's diff. betw. 'c_srcs' and 'source_files'? - vector c_srcs, source_files, header_files, resource_files, includes, libraries; - StringSet common_defines; - vector ifs_list; - ifs_list.push_back ( &module.project.non_if_data ); - ifs_list.push_back ( &module.non_if_data ); - - // this is a define in MinGW w32api, but not Microsoft's headers - common_defines.insert ( "STDCALL=__stdcall" ); - - while ( ifs_list.size() ) - { - const IfableData& data = *ifs_list.back(); - ifs_list.pop_back(); - const vector& files = data.files; - for ( i = 0; i < files.size(); i++ ) - { - if (files[i]->file.directory != SourceDirectory) - continue; - - // We want the full path here for directory support later on - string path = Path::RelativeFromDirectory ( - files[i]->file.relative_path, - module.output->relative_path ); - string file = path + std::string("\\") + files[i]->file.name; - - source_files.push_back ( file ); - if ( !stricmp ( Right(file,2).c_str(), ".c" ) ) - c_srcs.push_back ( file ); - if ( !stricmp ( Right(file,2).c_str(), ".h" ) ) - header_files.push_back ( file ); - if ( !stricmp ( Right(file,3).c_str(), ".rc" ) ) - resource_files.push_back ( file ); - } - const vector& incs = data.includes; - for ( i = 0; i < incs.size(); i++ ) - { - string path = Path::RelativeFromDirectory ( - incs[i]->directory->relative_path, - module.output->relative_path ); - includes.push_back ( path ); - } - const vector& libs = data.libraries; - for ( i = 0; i < libs.size(); i++ ) - { - libraries.push_back ( libs[i]->name + ".lib" ); - } - const vector& defs = data.defines; - for ( i = 0; i < defs.size(); i++ ) - { - if ( defs[i]->value[0] ) - common_defines.insert( defs[i]->name + "=" + defs[i]->value ); - else - common_defines.insert( defs[i]->name ); - } - } - // TODO FIXME - we don't include header files in our build system - //my @header_files = @{module->{header_files}}; - //vector header_files; - - // TODO FIXME - wine hack? - /*if (module.name !~ /^wine(?:_unicode|build|runtests|test)?$/ && - module.name !~ /^(?:gdi32)_.+?$/ && - Right ( module.name, 5 ) == "_test" ) - { - source_files.push_back ( module.name + ".spec" ); - @source_files = sort(@source_files); - }*/ - - bool no_cpp = true; - bool no_msvc_headers = true; - // TODO FIXME - wine hack? - /*if (module.name =~ /^wine(?:runtests|test)$/ - || Right ( module.name, 5 ) == "_test" ) - { - no_msvc_headers = false; - }*/ - - std::vector cfgs; - - cfgs.push_back ( module.name + " - Win32" ); - - if (!no_cpp) - { - std::vector _cfgs; - for ( i = 0; i < cfgs.size(); i++ ) - { - _cfgs.push_back ( cfgs[i] + " C" ); - _cfgs.push_back ( cfgs[i] + " C++" ); - } - cfgs.resize(0); - cfgs = _cfgs; - } - - // TODO FIXME - wine hack? - /*if (!no_release) - { - std::vector _cfgs; - for ( i = 0; i < cfgs.size(); i++ ) - { - _cfgs.push_back ( cfgs[i] + " Debug" ); - _cfgs.push_back ( cfgs[i] + " Release" ); - } - cfgs.resize(0); - cfgs = _cfgs; - }*/ - - if (!no_msvc_headers) - { - std::vector _cfgs; - for ( i = 0; i < cfgs.size(); i++ ) - { - _cfgs.push_back ( cfgs[i] + " MSVC Headers" ); - _cfgs.push_back ( cfgs[i] + " Wine Headers" ); - } - cfgs.resize(0); - cfgs = _cfgs; - } - - string default_cfg = cfgs.back(); - - fprintf ( OUT, "# Microsoft Developer Studio Project File - Name=\"%s\" - Package Owner=<4>\r\n", module.name.c_str() ); - fprintf ( OUT, "# Microsoft Developer Studio Generated Build File, Format Version 6.00\r\n" ); - fprintf ( OUT, "# ** DO NOT EDIT **\r\n" ); - fprintf ( OUT, "\r\n" ); - - if ( lib ) - { - fprintf ( OUT, "# TARGTYPE \"Win32 (x86) Static Library\" 0x0104\r\n" ); - } - else if ( dll ) - { - fprintf ( OUT, "# TARGTYPE \"Win32 (x86) Dynamic-Link Library\" 0x0102\r\n" ); - } - else - { - fprintf ( OUT, "# TARGTYPE \"Win32 (x86) Console Application\" 0x0103\r\n" ); - } - fprintf ( OUT, "\r\n" ); - - fprintf ( OUT, "CFG=%s\r\n", default_cfg.c_str() ); - fprintf ( OUT, "!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r\n" ); - fprintf ( OUT, "!MESSAGE use the Export Makefile command and run\r\n" ); - fprintf ( OUT, "!MESSAGE \r\n" ); - fprintf ( OUT, "!MESSAGE NMAKE /f \"%s.mak\".\r\n", module.name.c_str() ); - fprintf ( OUT, "!MESSAGE \r\n" ); - fprintf ( OUT, "!MESSAGE You can specify a configuration when running NMAKE\r\n" ); - fprintf ( OUT, "!MESSAGE by defining the macro CFG on the command line. For example:\r\n" ); - fprintf ( OUT, "!MESSAGE \r\n" ); - fprintf ( OUT, "!MESSAGE NMAKE /f \"%s.mak\" CFG=\"%s\"\r\n", module.name.c_str(), default_cfg.c_str() ); - fprintf ( OUT, "!MESSAGE \r\n" ); - fprintf ( OUT, "!MESSAGE Possible choices for configuration are:\r\n" ); - fprintf ( OUT, "!MESSAGE \r\n" ); - for ( i = 0; i < cfgs.size(); i++ ) - { - const string& cfg = cfgs[i]; - if ( lib ) - { - fprintf ( OUT, "!MESSAGE \"%s\" (based on \"Win32 (x86) Static Library\")\r\n", cfg.c_str() ); - } - else if ( dll ) - { - fprintf ( OUT, "!MESSAGE \"%s\" (based on \"Win32 (x86) Dynamic-Link Library\")\r\n", cfg.c_str() ); - } - else - { - fprintf ( OUT, "!MESSAGE \"%s\" (based on \"Win32 (x86) Console Application\")\r\n", cfg.c_str() ); - } - } - fprintf ( OUT, "!MESSAGE \r\n" ); - fprintf ( OUT, "\r\n" ); - - fprintf ( OUT, "# Begin Project\r\n" ); - fprintf ( OUT, "# PROP AllowPerConfigDependencies 0\r\n" ); - fprintf ( OUT, "# PROP Scc_ProjName \"\"\r\n" ); - fprintf ( OUT, "# PROP Scc_LocalPath \"\"\r\n" ); - fprintf ( OUT, "CPP=cl.exe\r\n" ); - if ( !lib && !exe ) fprintf ( OUT, "MTL=midl.exe\r\n" ); - fprintf ( OUT, "RSC=rc.exe\r\n" ); - - std::string output_dir; - for ( size_t icfg = 0; icfg < cfgs.size(); icfg++ ) - { - std::string& cfg = cfgs[icfg]; - if ( icfg == 0 ) - { - fprintf ( OUT, "!IF \"$(CFG)\" == \"%s\"\r\n", cfg.c_str() ); - fprintf ( OUT, "\r\n" ); - } - else - { - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "!ELSEIF \"$(CFG)\" == \"%s\"\r\n", cfg.c_str() ); - fprintf ( OUT, "\r\n" ); - } - - bool debug = !strstr ( cfg.c_str(), "Release" ); - bool msvc_headers = ( 0 != strstr ( cfg.c_str(), "MSVC Headers" ) ); - - fprintf ( OUT, "# PROP BASE Use_MFC 0\r\n" ); - - if ( debug ) - { - fprintf ( OUT, "# PROP BASE Use_Debug_Libraries 1\r\n" ); - } - else - { - fprintf ( OUT, "# PROP BASE Use_Debug_Libraries 0\r\n" ); - } - - output_dir = Replace(cfg,module.name + " - ",""); - output_dir = Replace(output_dir," ","_"); - output_dir = Replace(output_dir,"C++","Cxx"); - // TODO FIXME - wine hack? - //if ( output_prefix_dir.size() ) - // output_dir = output_prefix_dir + "\\" + output_dir; - - fprintf ( OUT, "# PROP BASE Output_Dir \"%s\"\r\n", output_dir.c_str() ); - fprintf ( OUT, "# PROP BASE Intermediate_Dir \"%s\"\r\n", output_dir.c_str() ); - - fprintf ( OUT, "# PROP BASE Target_Dir \"\"\r\n" ); - - fprintf ( OUT, "# PROP Use_MFC 0\r\n" ); - if ( debug ) - { - fprintf ( OUT, "# PROP Use_Debug_Libraries 1\r\n" ); - } - else - { - fprintf ( OUT, "# PROP Use_Debug_Libraries 0\r\n" ); - } - fprintf ( OUT, "# PROP Output_Dir \"%s\"\r\n", output_dir.c_str() ); - fprintf ( OUT, "# PROP Intermediate_Dir \"%s\"\r\n", output_dir.c_str() ); - - if ( dll ) fprintf ( OUT, "# PROP Ignore_Export_Lib 0\r\n" ); - fprintf ( OUT, "# PROP Target_Dir \"\"\r\n" ); - - StringSet defines = common_defines; - - if ( debug ) - { - defines.insert ( "_DEBUG" ); - if ( lib || exe ) - { - fprintf ( OUT, "# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od" ); - defines.insert ( "_LIB" ); - } - else - { - fprintf ( OUT, "# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od" ); - defines.insert ( "_WINDOWS" ); - defines.insert ( "_USRDLL" ); - // TODO FIXME - wine hack? - //defines.insert ( string("\U") + module.name + "\E_EXPORTS" ); - } - } - else - { - defines.insert ( "NDEBUG" ); - if ( lib || exe ) - { - fprintf ( OUT, "# ADD BASE CPP /nologo /W3 /GX /O2" ); - defines.insert ( "_LIB" ); - } - else - { - fprintf ( OUT, "# ADD BASE CPP /nologo /MT /W3 /GX /O2" ); - defines.insert ( "_WINDOWS" ); - defines.insert ( "_USRDLL" ); - // TODO FIXME - wine hack? - //defines.insert ( string("\U") + module.name + "\E_EXPORTS" ); - } - } - - for ( StringSet::const_iterator it1=defines.begin(); it1!=defines.end(); it1++ ) - { - fprintf ( OUT, " /D \"%s\"", it1->c_str() ); - } - if ( lib || exe ) fprintf ( OUT, " /YX" ); - fprintf ( OUT, " /FD" ); - if ( debug ) - { - fprintf ( OUT, " /GZ" ); - if ( lib || exe ) fprintf ( OUT, " " ); - } - fprintf ( OUT, " /c" ); - fprintf ( OUT, "\r\n" ); - - if ( debug ) - { - defines.insert ( "_DEBUG" ); - if(lib) - { - fprintf ( OUT, "# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od" ); - defines.insert ( "_LIB" ); - } - else - { - fprintf ( OUT, "# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od" ); - defines.insert ( "_USRDLL" ); - } - } - else - { - defines.insert ( "NDEBUG" ); - if(lib) - { - fprintf ( OUT, "# ADD CPP /nologo /MT /W3 /GX /O2" ); - defines.insert ( "_LIB" ); - } - else - { - fprintf ( OUT, "# ADD CPP /nologo /MT /W3 /GX /O2" ); - defines.insert ( "_USRDLL" ); - } - } - - // TODO FIXME - wine hack? - if ( wine ) - { - // TODO FIXME - wine hack? - //defines.insert ( string("_\U") + module.name + "\E_" ); - // TODO FIXME - wine hack? - /*if ( module.name !~ /^(?:wine(?:build|test)|.*?_test)$/ ) - defines.insert ( "__WINESRC__" );*/ - if ( msvc_headers ) - defines.insert ( "__WINE_USE_NATIVE_HEADERS" ); - string output_dir2 = Replace(output_dir,"\\","\\\\"); - defines.insert ( ssprintf("__WINETEST_OUTPUT_DIR=\\\"%s\\\"",output_dir.c_str()) ); - defines.insert ( "__i386__" ); - defines.insert ( "_X86_" ); - - // TODO FIXME - wine hacks? - /*if(module.name =~ /^gdi32_(?:enhmfdrv|mfdrv)$/) { - push @includes, ".." ); - } - - if ( strstr ( module.name.c_str(), "_test" ) - { - include.push_back ( msvc_wine_dir + "\\" + output_dir ); - } - - if (!msvc_headers || module.name == "winetest") - { - includes.push_back ( wine_include_dir ); - }*/ - } - - //if ( wine ) - { - for ( i = 0; i < includes.size(); i++ ) - { - const string& include = includes[i]; - if ( strpbrk ( include.c_str(), "[\\\"]" ) || !strncmp ( include.c_str(), "../", 3 ) ) - { - fprintf ( OUT, " /I \"%s\"", include.c_str() ); - } - else - { - fprintf ( OUT, " /I %s", include.c_str() ); - } - } - } - - fprintf ( OUT, " /I \".\"" ); - for ( StringSet::const_iterator it2=defines.begin(); it2!=defines.end(); it2++ ) - { - const string& define = *it2; - if ( strpbrk ( define.c_str(), "[\\\"]" ) ) - { - fprintf ( OUT, " /D \"%s\"", define.c_str() ); - } - else - { - fprintf ( OUT, " /D %s", define.c_str() ); - } - } - if ( wine ) fprintf ( OUT, " /D inline=__inline" ); - if ( 0 && wine ) fprintf ( OUT, " /D \"__STDC__\"" ); - - fprintf ( OUT, lib ? " /YX" : " /FR" ); - fprintf ( OUT, " /FD" ); - if ( debug ) fprintf ( OUT, " /GZ" ); - if ( debug && lib ) fprintf ( OUT, " " ); - fprintf ( OUT, " /c" ); - if ( !no_cpp ) fprintf ( OUT, " /TP" ); - fprintf ( OUT, "\r\n" ); - - if ( debug ) - { - if ( dll ) - { - fprintf ( OUT, "# SUBTRACT CPP /X /YX\r\n" ); - fprintf ( OUT, "# ADD BASE MTL /nologo /D \"_DEBUG\" /mktyplib203 /win32\r\n" ); - fprintf ( OUT, "# ADD MTL /nologo /D \"_DEBUG\" /mktyplib203 /win32\r\n" ); - } - fprintf ( OUT, "# ADD BASE RSC /l 0x41d /d \"_DEBUG\"\r\n" ); - fprintf ( OUT, "# ADD RSC /l 0x41d" ); - /*if ( wine )*/ - { - for ( i = 0; i < includes.size(); i++ ) - { - fprintf ( OUT, " /i \"%s\"", includes[i].c_str() ); - } - } - - for ( StringSet::const_iterator it3=defines.begin(); it3!=defines.end(); it3++ ) - { - fprintf ( OUT, " /D \"%s\"", it3->c_str() ); - } - fprintf ( OUT, " /d \"_DEBUG\"\r\n" ); - } - else - { - if ( dll ) - { - fprintf ( OUT, "# SUBTRACT CPP /YX\r\n" ); - fprintf ( OUT, "# ADD BASE MTL /nologo /D \"NDEBUG\" /mktyplib203 /win32\r\n" ); - fprintf ( OUT, "# ADD MTL /nologo /D \"NDEBUG\" /mktyplib203 /win32\r\n" ); - } - fprintf ( OUT, "# ADD BASE RSC /l 0x41d /d \"NDEBUG\"\r\n" ); - fprintf ( OUT, "# ADD RSC /l 0x41d" ); - if ( wine ) - { - for ( i = 0; i < includes.size(); i++ ) - fprintf ( OUT, " /i \"%s\"", includes[i].c_str() ); - } - - for ( StringSet::const_iterator it4=defines.begin(); it4!=defines.end(); it4++ ) - { - fprintf ( OUT, " /D \"%s\"", it4->c_str() ); - } - - - fprintf ( OUT, "/d \"NDEBUG\"\r\n" ); - } - fprintf ( OUT, "BSC32=bscmake.exe\r\n" ); - fprintf ( OUT, "# ADD BASE BSC32 /nologo\r\n" ); - fprintf ( OUT, "# ADD BSC32 /nologo\r\n" ); - - if ( exe || dll ) - { - fprintf ( OUT, "LINK32=link.exe\r\n" ); - fprintf ( OUT, "# ADD BASE LINK32 " ); - - for ( i = 0; i < libraries.size(); i++ ) - { - fprintf ( OUT, "%s ", libraries[i].c_str() ); - } - fprintf ( OUT, " /nologo" ); - if ( dll ) fprintf ( OUT, " /dll" ); - if ( console ) fprintf ( OUT, " /subsystem:console" ); - if ( debug ) fprintf ( OUT, " /debug" ); - fprintf ( OUT, " /machine:I386" ); - if ( debug ) fprintf ( OUT, " /pdbtype:sept" ); - fprintf ( OUT, "\r\n" ); - - fprintf ( OUT, "# ADD LINK32" ); - fprintf ( OUT, " /nologo" ); - // TODO FIXME - do we need their kludge? - //if ( module.name == "ntdll" ) fprintf ( OUT, " libcmt.lib" ); // FIXME: Kludge - for ( i = 0; i < imports.size(); i++ ) - { - const string& import = imports[i]; - if ( import != "msvcrt" ) - fprintf ( OUT, " %s.lib", import.c_str() ); - } - if ( dll ) fprintf ( OUT, " /dll" ); - if ( console ) fprintf ( OUT, " /subsystem:console" ); - if ( debug ) fprintf ( OUT, " /debug" ); - fprintf ( OUT, " /machine:I386" ); - // TODO FIXME - do we need their kludge? - //if ( module.name == "ntdll" ) fprintf ( OUT, " /nodefaultlib" ); // FIXME: Kludge - if ( dll ) fprintf ( OUT, " /def:\"%s.def\"", module.name.c_str() ); - if (( dll ) && ( module_type == ".cpl")) fprintf ( OUT, " /out:\"Win32\\%s%s\"", module.name.c_str(), module_type.c_str() ); - if ( debug ) fprintf ( OUT, " /pdbtype:sept" ); - fprintf ( OUT, "\r\n" ); - } - else - { - fprintf ( OUT, "LIB32=link.exe -lib\r\n" ); - fprintf ( OUT, "# ADD BASE LIB32 /nologo\r\n" ); - fprintf ( OUT, "# ADD LIB32 /nologo\r\n" ); - } - } - - if ( cfgs.size() != 0 ) - { - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "!ENDIF \r\n" ); - fprintf ( OUT, "\r\n" ); - } -#if 0 - if ( module.name == "winebuild" ) - { - fprintf ( OUT, "# Begin Special Build Tool\r\n" ); - fprintf ( OUT, "SOURCE=\"$(InputPath)\"\r\n" ); - fprintf ( OUT, "PostBuild_Desc=Copying wine.dll and wine_unicode.dll ...\r\n" ); - fprintf ( OUT, "PostBuild_Cmds=" ); - fprintf ( OUT, "copy ..\\..\\library\\%s\\wine.dll $(OutDir)\t", - output_dir.c_str() ); - fprintf ( OUT, "copy ..\\..\\unicode\\%s\\wine_unicode.dll $(OutDir)\r\n", - output_dir.c_str() ); - fprintf ( OUT, "# End Special Build Tool\r\n" ); - } -#endif - fprintf ( OUT, "# Begin Target\r\n" ); - fprintf ( OUT, "\r\n" ); - for ( i = 0; i < cfgs.size(); i++ ) - { - fprintf ( OUT, "# Name \"%s\"\r\n", cfgs[i].c_str() ); - } - - fprintf ( OUT, "# Begin Group \"Source Files\"\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "# PROP Default_Filter \"cpp;c;cxx;rc;def;r;odl;idl;hpj;bat\"\r\n" ); - - for ( size_t isrcfile = 0; isrcfile < source_files.size(); isrcfile++ ) - { - string source_file = DosSeparator(source_files[isrcfile]); - - if ( strncmp ( source_file.c_str(), ".\\", 2 ) ) - { - source_file = string(".\\") + source_file; - } -#if 0 - if ( !strcmp ( &source_file[source_file.size()-5], ".spec" ) ) - { - string basename = string ( source_file.c_str(), source_file.size() - 5 ); - - // TODO FIXME - not sure what this is doing? wine hack maybe? - //if ( basename !~ /\..{1,3}$/; ) basename += string(".dll"); - string dbg_c_file = basename + ".dbg.c"; - - fprintf ( OUT, "# Begin Source File\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "SOURCE=%s\r\n", dbg_c_file.c_str() ); - fprintf ( OUT, "# End Source File\r\n" ); - } -#endif - fprintf ( OUT, "# Begin Source File\r\n" ); - fprintf ( OUT, "\r\n" ); - - fprintf ( OUT, "SOURCE=%s\r\n", source_file.c_str() ); - - if ( !strcmp ( &source_file[source_file.size()-5], ".spec" ) ) - { -#if 0 - string basename = string ( source_file.c_str(), source_file.size() - 5 ); - - string spec_file = source_file; - string def_file = basename + ".def"; - - // TODO FIXME - not sure what this is doing? wine hack maybe? - //if ( basename !~ /\..{1,3}$/; ) basename += ".dll"; - string dbg_file = basename + ".dbg"; - string dbg_c_file = basename + ".dbg.c"; - - string srcdir = "."; // FIXME: Is this really always correct? - - fprintf ( OUT, "# Begin Custom Build\r\n" ); - fprintf ( OUT, "InputPath=%s\r\n", spec_file.c_str() ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "BuildCmds= \\\r\n" ); - fprintf ( OUT, "\t..\\..\\tools\\winebuild\\%s\\winebuild.exe --def %s > %s \\\r\n", - output_dir.c_str(), - spec_file.c_str(), - def_file.c_str() ); - - if ( module.name == "ntdll" ) - { - int n = 0; - for ( i = 0; i < c_srcs.size(); i++ ) - { - const string& c_src = c_srcs[i]; - if(n++ > 0) - { - fprintf ( OUT, "\techo %s >> %s \\\r\n", c_src.c_str(), dbg_file.c_str() ); - } - else - { - fprintf ( OUT, "\techo %s > %s \\\r\n", c_src.c_str(), dbg_file.c_str() ); - } - } - fprintf ( OUT, "\t..\\..\\tools\\winebuild\\%s\\winebuild.exe", - output_dir.c_str() ); - fprintf ( OUT, " -o %s --debug -C%s %s \\\r\n", - dbg_c_file.c_str(), - srcdir.c_str(), - dbg_file.c_str() ); - } - else - { - string sc_srcs; - for ( i = 0; i < c_srcs.size(); i++ ) - { - const string& c_src = c_srcs[i]; - if ( !strcmp ( &c_src[c_src.size()-2], ".c" ) ) - { - if ( sc_srcs.size() ) - sc_srcs += " "; - sc_srcs += c_src; - } - } - - fprintf ( OUT, "\t..\\..\\tools\\winebuild\\%s\\winebuild.exe", - output_dir.c_str() ); - fprintf ( OUT, " -o %s --debug -C%s %s \\\r\n", - dbg_c_file.c_str(), - srcdir.c_str(), - sc_srcs.c_str() ); - } - - fprintf ( OUT, "\t\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "\"%s\" : $(SOURCE) \"$(INTDIR)\" \"$(OUTDIR)\"\r\n", def_file.c_str() ); - fprintf ( OUT, " $(BuildCmds)\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "\"%s\" : $(SOURCE) \"$(INTDIR)\" \"$(OUTDIR)\"\r\n", dbg_c_file.c_str() ); - fprintf ( OUT, " $(BuildCmds)\r\n" ); - fprintf ( OUT, "# End Custom Build\r\n" ); -#endif - } - /*else if ( source_file =~ /([^\\]*?\.h)$/ ) - { - my $h_file = $1; - - foreach my $cfg (@cfgs) { - if($#cfgs == 0) { - # Nothing - } elsif($n == 0) { - fprintf ( OUT, "!IF \"$(CFG)\" == \"$cfg\"\r\n" ); - fprintf ( OUT, "\r\n" ); - } else { - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "!ELSEIF \"$(CFG)\" == \"$cfg\"\r\n" ); - fprintf ( OUT, "\r\n" ); - } - - $output_dir = $cfg; - $output_dir =~ s/^$project - //; - $output_dir =~ s/ /_/g; - $output_dir =~ s/C\+\+/Cxx/g; - if($output_prefix_dir) { - $output_dir = "$output_prefix_dir\\$output_dir" ); - } - - fprintf ( OUT, "# Begin Custom Build\r\n" ); - fprintf ( OUT, "OutDir=%s\r\n", output_dir.c_str() ); - fprintf ( OUT, "InputPath=%s\r\n", source_file.c_str() ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "\"$(OutDir)\\wine\\%s\" : $(SOURCE) \"$(INTDIR)\" \"$(OUTDIR)\"\r\n", h_file.c_str() ); - fprintf ( OUT, "\tcopy \"$(InputPath)\" \"$(OutDir)\\wine\"\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "# End Custom Build\r\n" ); - } - - if ( cfgs.size() != 0) - { - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "!ENDIF \r\n" ); - fprintf ( OUT, "\r\n" ); - } - }*/ - - fprintf ( OUT, "# End Source File\r\n" ); - } - fprintf ( OUT, "# End Group\r\n" ); - fprintf ( OUT, "# Begin Group \"Header Files\"\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "# PROP Default_Filter \"h;hpp;hxx;hm;inl\"\r\n" ); - for ( i = 0; i < header_files.size(); i++ ) - { - const string& header_file = header_files[i]; - fprintf ( OUT, "# Begin Source File\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "SOURCE=.\\%s\r\n", header_file.c_str() ); - fprintf ( OUT, "# End Source File\r\n" ); - } - fprintf ( OUT, "# End Group\r\n" ); - - - - fprintf ( OUT, "# Begin Group \"Resource Files\"\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "# PROP Default_Filter \"ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe\"\r\n" ); -/* for ( i = 0; i < resource_files.size(); i++ ) - { - const string& resource_file = resource_files[i]; - fprintf ( OUT, "# Begin Source File\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "SOURCE=.\\%s\r\n", resource_file.c_str() ); - fprintf ( OUT, "# End Source File\r\n" ); - } -*/ fprintf ( OUT, "# End Group\r\n" ); - - fprintf ( OUT, "# End Target\r\n" ); - fprintf ( OUT, "# End Project\r\n" ); - - fclose(OUT); -} - -void -MSVCBackend::_generate_dsw_header ( FILE* OUT ) -{ - fprintf ( OUT, "Microsoft Developer Studio Workspace File, Format Version 6.00\r\n" ); - fprintf ( OUT, "# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\r\n" ); - fprintf ( OUT, "\r\n" ); -} - -void -MSVCBackend::_generate_dsw_project ( - FILE* OUT, - const Module& module, - std::string dsp_file, - const std::vector& dependencies ) -{ - dsp_file = DosSeparator ( std::string(".\\") + dsp_file ); - - // TODO FIXME - must they be sorted? - //@dependencies = sort(@dependencies); - - fprintf ( OUT, "###############################################################################\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "Project: \"%s\"=%s - Package Owner=<4>\r\n", module.name.c_str(), dsp_file.c_str() ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "Package=<5>\r\n" ); - fprintf ( OUT, "{{{\r\n" ); - fprintf ( OUT, "}}}\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "Package=<4>\r\n" ); - fprintf ( OUT, "{{{\r\n" ); - for ( size_t i = 0; i < dependencies.size(); i++ ) - { - Dependency& dependency = *dependencies[i]; - fprintf ( OUT, " Begin Project Dependency\r\n" ); - fprintf ( OUT, " Project_Dep_Name %s\r\n", dependency.module.name.c_str() ); - fprintf ( OUT, " End Project Dependency\r\n" ); - } - fprintf ( OUT, "}}}\r\n" ); - fprintf ( OUT, "\r\n" ); -} - -void -MSVCBackend::_generate_dsw_footer ( FILE* OUT ) -{ - fprintf ( OUT, "###############################################################################\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "Global:\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "Package=<5>\r\n" ); - fprintf ( OUT, "{{{\r\n" ); - fprintf ( OUT, "}}}\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "Package=<3>\r\n" ); - fprintf ( OUT, "{{{\r\n" ); - fprintf ( OUT, "}}}\r\n" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "###############################################################################\r\n" ); - fprintf ( OUT, "\r\n" ); -} - -void -MSVCBackend::_generate_wine_dsw ( FILE* OUT ) -{ - _generate_dsw_header(OUT); - // TODO FIXME - is it necessary to sort them? - for( std::map::const_iterator p = ProjectNode.modules.begin(); p != ProjectNode.modules.end(); ++ p ) - { - Module& module = *p->second; - - std::string dsp_file = DspFileName ( module ); - - // TODO FIXME - more wine hacks? - /*if ( module.name == "gdi32" ) - { - for ( size_t idir = 0; idir < gdi32_dirs.size(); idir++ ) - { - string dir2 = gdi32_dirs[idir]; - $dir2 =~ s%^.*?/([^/]+)$%$1%; - - dependencies.push_back ( Replace ( "gdi32_" + dir2, "/", "_" ) ); - } - }*/ - - _generate_dsw_project ( OUT, module, dsp_file, module.dependencies ); - } - _generate_dsw_footer ( OUT ); -} diff --git a/reactos/tools/rbuild/backend/msvc/projmaker.cpp b/reactos/tools/rbuild/backend/msvc/projmaker.cpp deleted file mode 100644 index 2986e859d04..00000000000 --- a/reactos/tools/rbuild/backend/msvc/projmaker.cpp +++ /dev/null @@ -1,330 +0,0 @@ -/* - * Copyright (C) 2002 Patrik Stridvall - * Copyright (C) 2005 Royce Mitchell III - * Copyright (C) 2006 Hervé Poussineau - * Copyright (C) 2006 Christoph von Wittich - * Copyright (C) 2009 Ged Murphy - * - * 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. - */ - -#ifdef _MSC_VER -#pragma warning ( disable : 4786 ) -#endif//_MSC_VER - -#include -#include -#include -#include -#include -#include - -#include - -#include "msvc.h" - -using std::string; -using std::vector; -using std::set; - -typedef set StringSet; - -#ifdef OUT -#undef OUT -#endif//OUT - -ProjMaker::ProjMaker ( ) -{ - vcproj_file = ""; -} - -ProjMaker::ProjMaker ( Configuration& buildConfig, - const std::vector& msvc_configs, - std::string filename ) -{ - configuration = buildConfig; - m_configurations = msvc_configs; - vcproj_file = filename; -} - -void -ProjMaker::_generate_proj_file ( const Module& module ) -{ - printf("_generate_proj_file not implemented for the base class\n"); -} - -void -ProjMaker::_generate_user_configuration() -{ -#if 0 - string computername; - string username; - string vcproj_file_user = ""; - - if (getenv ( "USERNAME" ) != NULL) - username = getenv ( "USERNAME" ); - if (getenv ( "COMPUTERNAME" ) != NULL) - computername = getenv ( "COMPUTERNAME" ); - else if (getenv ( "HOSTNAME" ) != NULL) - computername = getenv ( "HOSTNAME" ); - - if ((computername != "") && (username != "")) - vcproj_file_user = vcproj_file + "." + computername + "." + username + ".user"; - - /* User configuration file */ - if (vcproj_file_user != "") - { - OUT = fopen ( vcproj_file_user.c_str(), "wb" ); - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "\r\n" ); - - fprintf ( OUT, "\t\r\n" ); - for ( size_t icfg = 0; icfg < m_configurations.size(); icfg++ ) - { - const MSVCConfiguration& cfg = *m_configurations[icfg]; - fprintf ( OUT, "\t\t\r\n" ); - fprintf ( OUT, "\t\t\t\r\n" ); - fprintf ( OUT, "\t\t\r\n" ); - } - fprintf ( OUT, "\t\r\n" ); - fprintf ( OUT, "\r\n" ); - fclose ( OUT ); - } -#endif -} - - -void -ProjMaker::_generate_standard_configuration( const Module& module, const MSVCConfiguration& cfg, BinaryType binaryType ) -{ - printf("_generate_standard_configuration not implemented for the base class\n"); -} - -void -ProjMaker::_generate_makefile_configuration( const Module& module, const MSVCConfiguration& cfg ) -{ - printf("_generate_makefile_configuration not implemented for the base class\n"); -} - -std::string -ProjMaker::_get_vc_dir ( void ) const -{ - if ( configuration.VSProjectVersion == "8.00" ) - return "vc8"; - else if ( configuration.VSProjectVersion == "10.00" ) - return "vc10"; - else /* default to VS2008 */ - return "vc9"; -} - -std::string -ProjMaker::VcprojFileName ( const Module& module ) const -{ - return FixSeparatorForSystemCommand( - ReplaceExtension ( module.output->relative_path + "\\" + module.name, "_" + _get_vc_dir() + "_auto.vcproj" ) - ); -} - -std::string -ProjMaker::_strip_gcc_deffile(std::string Filename, std::string sourcedir, std::string objdir) -{ - std::string NewFilename = Environment::GetIntermediatePath () + "\\" + objdir + "\\" + Filename; - // we don't like infinite loops - so replace it in two steps - NewFilename = _replace_str(NewFilename, ".def", "_msvc.de"); - NewFilename = _replace_str(NewFilename, "_msvc.de", "_msvc.def"); - Filename = sourcedir + "\\" + Filename; - - Directory dir(objdir); - dir.GenerateTree(IntermediateDirectory, false); - - std::fstream in_file(Filename.c_str(), std::ios::in); - std::fstream out_file(NewFilename.c_str(), std::ios::out); - std::string::size_type pos; - DWORD i = 0; - - std::string line; - while (std::getline(in_file, line)) - { - pos = line.find("@", 0); - while (std::string::npos != pos) - { - if (pos > 1) - { - // make sure it is stdcall and no ordinal - if (line[pos -1] != ' ') - { - i = 0; - while (true) - { - i++; - if ((line[pos + i] < '0') || (line[pos + i] > '9')) - break; - } - line.replace(pos, i, ""); - } - } - pos = line.find("@", pos + 1); - } - - line += "\n"; - out_file << line; - } - in_file.close(); - out_file.close(); - - return NewFilename; -} - -std::string -ProjMaker::_replace_str(std::string string1, const std::string &find_str, const std::string &replace_str) -{ - std::string::size_type pos = string1.find(find_str, 0); - int intLen = find_str.length(); - - while(std::string::npos != pos) - { - string1.replace(pos, intLen, replace_str); - pos = string1.find(find_str, intLen + pos); - } - - return string1; -} - - -std::string -ProjMaker::_get_file_path( FileLocation* file, std::string relative_path) -{ - if (file->directory == SourceDirectory) - { - // We want the full path here for directory support later on - return Path::RelativeFromDirectory (file->relative_path, relative_path ); - } - else if(file->directory == IntermediateDirectory) - { - return std::string("$(RootIntDir)\\") + file->relative_path; - } - else if(file->directory == OutputDirectory) - { - return std::string("$(RootOutDir)\\") + file->relative_path; - } - - return std::string(""); -} - -void -ProjMaker::_collect_files(const Module& module) -{ - size_t i; - const IfableData& data = module.non_if_data; - const vector& files = data.files; - for ( i = 0; i < files.size(); i++ ) - { - string path = _get_file_path(&files[i]->file, module.output->relative_path); - string file = path + std::string("\\") + files[i]->file.name; - - if (files[i]->file.directory != SourceDirectory) - generated_files.push_back ( file ); - else if ( !stricmp ( Right(file,3).c_str(), ".rc" ) ) - resource_files.push_back ( file ); - else if ( !stricmp ( Right(file,2).c_str(), ".h" ) ) - header_files.push_back ( file ); - else - source_files.push_back ( file ); - } - const vector& incs = data.includes; - for ( i = 0; i < incs.size(); i++ ) - { - includes.push_back ( _get_file_path(incs[i]->directory, module.output->relative_path) ); - } - const vector& libs = data.libraries; - for ( i = 0; i < libs.size(); i++ ) - { - string libpath = "$(RootOutDir)\\" + libs[i]->importedModule->output->relative_path + "\\" + _get_vc_dir() + "\\$(ConfigurationName)\\" + libs[i]->name + ".lib"; - libraries.push_back ( libpath ); - } - const vector& defs = data.defines; - for ( i = 0; i < defs.size(); i++ ) - { - if ( defs[i]->backend != "" && defs[i]->backend != "msvc" ) - continue; - - if( module.isUnicode && (defs[i]->name == "UNICODE" || defs[i]->name == "_UNICODE")) - continue; - - if ( defs[i]->value != "" ) - defines.push_back( defs[i]->name + "=" + defs[i]->value ); - else - defines.push_back( defs[i]->name ); - } - for ( std::map::const_iterator p = data.properties.begin(); p != data.properties.end(); ++ p ) - { - Property& prop = *p->second; - if ( strstr ( module.baseaddress.c_str(), prop.name.c_str() ) ) - baseaddr = prop.value; - } - - if(module.importLibrary) - { - std::string ImportLibraryPath = _get_file_path(module.importLibrary->source, module.output->relative_path); - - switch (module.IsSpecDefinitionFile()) - { - case PSpec: - generated_files.push_back("$(IntDir)\\" + ReplaceExtension(module.importLibrary->source->name,".spec")); - case Spec: - generated_files.push_back("$(IntDir)\\" + ReplaceExtension(module.importLibrary->source->name,".stubs.c")); - generated_files.push_back("$(IntDir)\\" + ReplaceExtension(module.importLibrary->source->name,".def")); - default: - source_files.push_back(ImportLibraryPath + std::string("\\") + module.importLibrary->source->name); - } - } -} \ No newline at end of file diff --git a/reactos/tools/rbuild/backend/msvc/propsmaker.cpp b/reactos/tools/rbuild/backend/msvc/propsmaker.cpp deleted file mode 100644 index 70f2427555b..00000000000 --- a/reactos/tools/rbuild/backend/msvc/propsmaker.cpp +++ /dev/null @@ -1,195 +0,0 @@ -#ifdef _MSC_VER -#pragma warning ( disable : 4786 ) -#endif//_MSC_VER - -#include -#include -#include -#include -#include -#include - -#include - -#include "msvc.h" - -using std::string; -using std::vector; -using std::set; - -typedef set StringSet; - -#ifdef OUT -#undef OUT -#endif//OUT - - -PropsMaker::PropsMaker (Project* ProjectNode, - std::string filename_props, - std::vector configurations) -{ - m_ProjectNode = ProjectNode; - m_configurations = configurations; - - OUT = fopen ( filename_props.c_str(), "wb" ); - - if ( !OUT ) - { - printf ( "Could not create file '%s'.\n", filename_props.c_str() ); - } -} - -PropsMaker::~PropsMaker ( ) -{ - fclose ( OUT ); -} - -void -PropsMaker::_generate_header() -{ - fprintf ( OUT, "\r\n"); - fprintf ( OUT, "\r\n"); -} - -void -PropsMaker::_generate_footer() -{ - fprintf ( OUT, "\r\n"); -} - -void -PropsMaker::_generate_macro(std::string Name, std::string Value) -{ - fprintf ( OUT, "\t\t<%s>%s\r\n", Name.c_str(), Value.c_str(), Name.c_str()); -} - -void -PropsMaker::_generate_global_includes(bool debug, bool use_ros_headers) -{ - fprintf ( OUT, "\t\t"); - - const IfableData& data = m_ProjectNode->non_if_data; - //const vector& files = data.files; - size_t i; - const vector& incs = data.includes; - for ( i = 0; i < incs.size(); i++ ) - { - if ((incs[i]->directory->relative_path == "include\\crt" || - incs[i]->directory->relative_path == "include\\ddk" || - incs[i]->directory->relative_path == "include\\GL" || - incs[i]->directory->relative_path == "include\\psdk") && - ! use_ros_headers) - { - continue; - } - - if(incs[i]->directory->directory == SourceDirectory) - fprintf ( OUT, "\"$(RootSrcDir)\\"); - else if (incs[i]->directory->directory == IntermediateDirectory) - fprintf ( OUT, "\"$(RootIntDir)\\"); - else if (incs[i]->directory->directory == OutputDirectory) - fprintf ( OUT, "\"$(RootOutDir)\\"); - else - continue; - - fprintf ( OUT, "%s\" ; ", incs[i]->directory->relative_path.c_str()); - } - - fprintf ( OUT, "\"$(RootIntDir)\\include\" ; "); - fprintf ( OUT, "\"$(RootIntDir)\\include\\reactos\" ; "); - - if ( !use_ros_headers ) - { - // Add WDK or PSDK paths, if user provides them - if (getenv ( "BASEDIR" ) != NULL) - { - string WdkBase = getenv ( "BASEDIR" ); - fprintf ( OUT, "\"%s\\inc\\api\" ; ", WdkBase.c_str()); - fprintf ( OUT, "\"%s\\inc\\crt\" ; ", WdkBase.c_str()); - fprintf ( OUT, "\"%s\\inc\\ddk\" ; ", WdkBase.c_str()); - } - } - fprintf ( OUT, "\t\r\n"); -} - -void -PropsMaker::_generate_global_definitions(bool debug, bool use_ros_headers) -{ - fprintf ( OUT, "\t\t"); - - // Always add _CRT_SECURE_NO_WARNINGS to disable warnings about not - // using the safe functions introduced in MSVC8. - fprintf ( OUT, "_CRT_SECURE_NO_WARNINGS ; ") ; - - if ( debug ) - { - fprintf ( OUT, "_DEBUG ; "); - } - - if ( !use_ros_headers ) - { - // this is a define in MinGW w32api, but not Microsoft's headers - fprintf ( OUT, "STDCALL=__stdcall ; "); - } - - const IfableData& data = m_ProjectNode->non_if_data; - const vector& defs = data.defines; - size_t i; - - for ( i = 0; i < defs.size(); i++ ) - { - if ( defs[i]->backend != "" && defs[i]->backend != "msvc" ) - continue; - - if ( defs[i]->value != "" ) - fprintf ( OUT, "%s=%s ; ",defs[i]->name.c_str(), defs[i]->value.c_str()); - else - fprintf ( OUT, "%s ; ", defs[i]->name.c_str()); - } - - fprintf ( OUT, "\t\r\n"); -} - -void -PropsMaker::_generate_props ( std::string solution_version, std::string studio_version ) -{ - - string srcdir = Environment::GetSourcePath(); - string intdir = Environment::GetIntermediatePath (); - string outdir = Environment::GetOutputPath (); - string rosbedir = Environment::GetVariable("_ROSBE_BASEDIR"); - - if ( intdir == "obj-i386" ) - intdir = srcdir + "\\obj-i386"; /* append relative dir from project dir */ - - if ( outdir == "output-i386" ) - outdir = srcdir + "\\output-i386"; - - _generate_header(); - - fprintf ( OUT, "\t\r\n"); - _generate_macro("RootSrcDir", srcdir); - _generate_macro("RootOutDir", outdir); - _generate_macro("RootIntDir", intdir); - _generate_macro("Tools", "$(RootOutDir)\\tools"); - _generate_macro("RosBE", rosbedir); - fprintf ( OUT, "\t\r\n"); - - for ( size_t icfg = 0; icfg < m_configurations.size(); icfg++ ) - { - MSVCConfiguration* cfg = m_configurations[icfg]; - - if(cfg->optimization == RosBuild) - continue; - - fprintf ( OUT, "\t\r\n", cfg->name.c_str() ); - _generate_global_includes(cfg->optimization == Debug, cfg->headers == ReactOSHeaders); - _generate_global_definitions(cfg->optimization == Debug, cfg->headers == ReactOSHeaders); - fprintf ( OUT, "\t\r\n"); - } - - _generate_footer(); -} diff --git a/reactos/tools/rbuild/backend/msvc/rules/reactos.defaults.props b/reactos/tools/rbuild/backend/msvc/rules/reactos.defaults.props deleted file mode 100644 index 205d35ad44b..00000000000 --- a/reactos/tools/rbuild/backend/msvc/rules/reactos.defaults.props +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - $(globalIncludes);$(IncludePath) - - - - $(globalIncludes);$(ProjectIncludes);%(AdditionalIncludeDirectories) - $(ProjectDefines);$(globalDefines);%(PreprocessorDefinitions) - true - CompileAsC - Cdecl - - - $(globalIncludes);$(ProjectIncludes) - __ASM__ - - - $(globalIncludes);$(ProjectIncludes) - - - $(globalIncludes);$(ProjectIncludes);%(AdditionalIncludeDirectories) - - - \ No newline at end of file diff --git a/reactos/tools/rbuild/backend/msvc/rules/reactos.targets b/reactos/tools/rbuild/backend/msvc/rules/reactos.targets deleted file mode 100644 index e7b583b4f0c..00000000000 --- a/reactos/tools/rbuild/backend/msvc/rules/reactos.targets +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/reactos/tools/rbuild/backend/msvc/rules/s_as_mscpp.props b/reactos/tools/rbuild/backend/msvc/rules/s_as_mscpp.props deleted file mode 100644 index 67e87c81933..00000000000 --- a/reactos/tools/rbuild/backend/msvc/rules/s_as_mscpp.props +++ /dev/null @@ -1,21 +0,0 @@ - - - - Midl - CustomBuild - - - _SelectedFiles;$(s_as_mscppDependsOn) - - - - $(IntDir)%(Filename).obj - $(globalIncludes) - cl /nologo /E [sIncPaths] [sPPDefs] "%(FullPath)" | "$(RosBE)\i386\bin\as" -o [sOutF] - %(sOutF) - Assembling - - - \ No newline at end of file diff --git a/reactos/tools/rbuild/backend/msvc/rules/s_as_mscpp.rules b/reactos/tools/rbuild/backend/msvc/rules/s_as_mscpp.rules deleted file mode 100644 index ec4a41b742c..00000000000 --- a/reactos/tools/rbuild/backend/msvc/rules/s_as_mscpp.rules +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - diff --git a/reactos/tools/rbuild/backend/msvc/rules/s_as_mscpp.targets b/reactos/tools/rbuild/backend/msvc/rules/s_as_mscpp.targets deleted file mode 100644 index 731117271f0..00000000000 --- a/reactos/tools/rbuild/backend/msvc/rules/s_as_mscpp.targets +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - _s_as_mscpp - - - - $(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml - - - - - - - - @(s_as_mscpp, '|') - - - - - - - - - $(ComputeLinkInputsTargets); - Computes_as_mscppOutput; - - - $(ComputeLibInputsTargets); - Computes_as_mscppOutput; - - - - - - - - - - - - \ No newline at end of file diff --git a/reactos/tools/rbuild/backend/msvc/rules/s_as_mscpp.xml b/reactos/tools/rbuild/backend/msvc/rules/s_as_mscpp.xml deleted file mode 100644 index b2a71f56073..00000000000 --- a/reactos/tools/rbuild/backend/msvc/rules/s_as_mscpp.xml +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - - - - General - - - - - Command Line - - - - - - - - - - - - - - - Execute Before - - - Specifies the targets for the build customization to run before. - - - - - - - - - - - Execute After - - - Specifies the targets for the build customization to run after. - - - - - - - - - - - - - - Additional Options - - - Additional Options - - - - - - - \ No newline at end of file diff --git a/reactos/tools/rbuild/backend/msvc/rules/spec.props b/reactos/tools/rbuild/backend/msvc/rules/spec.props deleted file mode 100644 index 5e738c7db6f..00000000000 --- a/reactos/tools/rbuild/backend/msvc/rules/spec.props +++ /dev/null @@ -1,38 +0,0 @@ - - - - Midl - Pspec - - - _SelectedFiles;$(specDependsOn) - - - - $(IntDir)%(Filename).def - $(IntDir)%(Filename).stubs.c - "$(Tools)\winebuild\winebuild.exe" -F $(TargetFileName) -o [DefFile] --def -k -E [inputs] | "$(Tools)\winebuild\winebuild.exe" -F $(TargetFileName) -o [StubsFile] --pedll -k -E [inputs] - [DefFile] - Generating module definition file - - - - spec - CustomBuild - - - _SelectedFiles;$(PspecDependsOn) - - - - $(IntDir)%(Filename).spec - cl /nologo /EP [includes] [inputs] > [Specfile] - [Specfile] - Generating module definition file - - - \ No newline at end of file diff --git a/reactos/tools/rbuild/backend/msvc/rules/spec.rules b/reactos/tools/rbuild/backend/msvc/rules/spec.rules deleted file mode 100644 index ef13f59e885..00000000000 --- a/reactos/tools/rbuild/backend/msvc/rules/spec.rules +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/reactos/tools/rbuild/backend/msvc/rules/spec.targets b/reactos/tools/rbuild/backend/msvc/rules/spec.targets deleted file mode 100644 index 4671ea1cd36..00000000000 --- a/reactos/tools/rbuild/backend/msvc/rules/spec.targets +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - _spec - - - _Pspec - - - - $(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml - - - $(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml - - - - - - - - @(spec, '|') - - - - - - - - - $(ComputeLinkInputsTargets); - ComputespecOutput; - - - $(ComputeLibInputsTargets); - ComputespecOutput; - - - - - - - - - - - - - - - - - - @(Pspec, '|') - - - - - - - - - $(ComputeLinkInputsTargets); - ComputePspecOutput; - - - $(ComputeLibInputsTargets); - ComputePspecOutput; - - - - - - - - - - - - \ No newline at end of file diff --git a/reactos/tools/rbuild/backend/msvc/rules/spec.xml b/reactos/tools/rbuild/backend/msvc/rules/spec.xml deleted file mode 100644 index db15656b23b..00000000000 --- a/reactos/tools/rbuild/backend/msvc/rules/spec.xml +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - - - - - General - - - - - Command Line - - - - - - - - - - - - - - Execute Before - - - Specifies the targets for the build customization to run before. - - - - - - - - - - - Execute After - - - Specifies the targets for the build customization to run after. - - - - - - - - - - - - - - Additional Options - - - Additional Options - - - - - - - - - - - - - - General - - - - - Command Line - - - - - - - - - - - - - - Execute Before - - - Specifies the targets for the build customization to run before. - - - - - - - - - - - Execute After - - - Specifies the targets for the build customization to run after. - - - - - - - - - - - - - - Additional Options - - - Additional Options - - - - - - - \ No newline at end of file diff --git a/reactos/tools/rbuild/backend/msvc/slnmaker.cpp b/reactos/tools/rbuild/backend/msvc/slnmaker.cpp deleted file mode 100644 index ebc2dc8d6c5..00000000000 --- a/reactos/tools/rbuild/backend/msvc/slnmaker.cpp +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (C) 2002 Patrik Stridvall - * Copyright (C) 2005 Royce Mitchell III - * Copyright (C) 2006 Hervé Poussineau - * Copyright (C) 2006 Christoph von Wittich - * Copyright (C) 2009 Ged Murphy - * - * 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. - */ - -#ifdef _MSC_VER -#pragma warning ( disable : 4786 ) -#endif//_MSC_VER - -#include -#include -#include -#include -#include -#include - -#include - -#include "msvc.h" - -using std::string; -using std::vector; -using std::set; - - - -SlnMaker::SlnMaker ( Configuration& buildConfig, - const std::vector& configurations, - std::string filename_sln, - std::string solution_version, - std::string studio_version) -{ - m_configuration = buildConfig; - m_configurations = configurations; - - OUT = fopen ( filename_sln.c_str(), "wb" ); - - if ( !OUT ) - { - printf ( "Could not create file '%s'.\n", filename_sln.c_str() ); - } - - _generate_sln_header( solution_version, studio_version); -} - -SlnMaker::~SlnMaker() -{ - _generate_sln_footer ( ); - fclose ( OUT ); -} - -void -SlnMaker::_generate_sln_header ( std::string solution_version, std::string studio_version ) -{ - //fprintf ( OUT, "Microsoft Visual Studio Solution File, Format Version %s\r\n", _get_solution_version().c_str() ); - //fprintf ( OUT, "# Visual Studio %s\r\n", _get_studio_version().c_str() ); - fprintf ( OUT, "Microsoft Visual Studio Solution File, Format Version %s\r\n", solution_version.c_str() ); - fprintf ( OUT, "# Visual Studio %s\r\n", studio_version.c_str() ); - fprintf ( OUT, "\r\n" ); -} - -void -SlnMaker::_generate_sln_footer ( ) -{ - fprintf ( OUT, "Global\r\n" ); - fprintf ( OUT, "\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n" ); - for ( size_t i = 0; i < m_configurations.size(); i++ ) - fprintf ( OUT, "\t\t%s = %s\r\n", m_configurations[i]->name.c_str(), m_configurations[i]->name.c_str() ); - fprintf ( OUT, "\tEndGlobalSection\r\n" ); - - fprintf ( OUT, "\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n" ); - for ( size_t i = 0; i < modules.size (); i++) - { - _generate_sln_configurations ( modules[i]->guid.c_str() ); - } - fprintf ( OUT, "\tEndGlobalSection\r\n" ); -/* - fprintf ( OUT, "\tGlobalSection(ExtensibilityGlobals) = postSolution\r\n" ); - fprintf ( OUT, "\tEndGlobalSection\r\n" ); - fprintf ( OUT, "\tGlobalSection(ExtensibilityAddIns) = postSolution\r\n" ); - fprintf ( OUT, "\tEndGlobalSection\r\n" ); -*/ - - if (m_configuration.VSProjectVersion == "7.00") { - fprintf ( OUT, "\tGlobalSection(ProjectDependencies) = postSolution\r\n" ); - //FIXME: Add dependencies for VS 2002 - fprintf ( OUT, "\tEndGlobalSection\r\n" ); - } - else { - fprintf ( OUT, "\tGlobalSection(SolutionProperties) = preSolution\r\n" ); - fprintf ( OUT, "\t\tHideSolutionNode = FALSE\r\n" ); - fprintf ( OUT, "\tEndGlobalSection\r\n" ); - } - - fprintf ( OUT, "EndGlobal\r\n" ); - fprintf ( OUT, "\r\n" ); -} - - -void -SlnMaker::_generate_sln_configurations ( std::string vcproj_guid ) -{ - for ( size_t i = 0; i < m_configurations.size (); i++) - { - const MSVCConfiguration& cfg = *m_configurations[i]; - fprintf ( OUT, "\t\t%s.%s|Win32.ActiveCfg = %s|Win32\r\n", vcproj_guid.c_str(), cfg.name.c_str(), cfg.name.c_str() ); - fprintf ( OUT, "\t\t%s.%s|Win32.Build.0 = %s|Win32\r\n", vcproj_guid.c_str(), cfg.name.c_str(), cfg.name.c_str() ); - } -} - -void -SlnMaker::_add_project(ProjMaker &project, Module &module) -{ - string sln_guid = "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}"; - - fprintf ( OUT, "Project(\"%s\") = \"%s\", \".\\%s\",\"%s\"\n", sln_guid.c_str(), module.name.c_str() , project.VcprojFileName(module).c_str() , module.guid.c_str()); - fprintf ( OUT, "EndProject\r\n" ); - - modules.push_back(&module); -} diff --git a/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp b/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp deleted file mode 100644 index b09658d18df..00000000000 --- a/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp +++ /dev/null @@ -1,674 +0,0 @@ -/* - * Copyright (C) 2002 Patrik Stridvall - * Copyright (C) 2005 Royce Mitchell III - * Copyright (C) 2006 Hervé Poussineau - * Copyright (C) 2006 Christoph von Wittich - * Copyright (C) 2009 Ged Murphy - * - * 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. - */ - -#ifdef _MSC_VER -#pragma warning ( disable : 4786 ) -#endif//_MSC_VER - -#include -#include -#include -#include -#include -#include - -#include - -#include "msvc.h" - -using std::string; -using std::vector; -using std::set; - -typedef set StringSet; - -#ifdef OUT -#undef OUT -#endif//OUT - -struct SortFilesAscending -{ - bool operator()(const string& rhs, const string& lhs) - { - return rhs < lhs; - } -}; - - -VCProjMaker::VCProjMaker ( ) -{ - vcproj_file = ""; -} - -VCProjMaker::VCProjMaker ( Configuration& buildConfig, - const std::vector& msvc_configs, - std::string filename, - const Module& module) -{ - configuration = buildConfig; - m_configurations = msvc_configs; - vcproj_file = filename; - - OUT = fopen ( vcproj_file.c_str(), "wb" ); - - if ( !OUT ) - { - printf ( "Could not create file '%s'.\n", vcproj_file.c_str() ); - } - - // Set the binary type - string module_type = GetExtension(*module.output); - - if ((module.type == ObjectLibrary) || (module.type == RpcClient) ||(module.type == RpcServer) || (module_type == ".lib") || (module_type == ".a")) - binaryType = Lib; - else if ((module_type == ".dll") || (module_type == ".cpl")) - binaryType = Dll; - else if ((module_type == ".exe") || (module_type == ".scr")) - binaryType = Exe; - else if (module_type == ".sys") - binaryType = Sys; - else - binaryType = BinUnknown; - -} - -VCProjMaker::~VCProjMaker() -{ - fclose ( OUT ); -} - -void -VCProjMaker::_generate_proj_file ( const Module& module ) -{ - size_t i; - - printf ( "Creating MSVC project: '%s'\n", vcproj_file.c_str() ); - - string path_basedir = module.GetPathToBaseDir (); - - _collect_files(module); - - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "\r\n" ); - - fprintf ( OUT, "\t\r\n" ); - fprintf ( OUT, "\t\t\r\n" ); - fprintf ( OUT, "\t\r\n" ); - - fprintf ( OUT, "\t\r\n" ); - fprintf ( OUT, "\t\t\r\n" ); - fprintf ( OUT, "\t\t\r\n" ); - fprintf ( OUT, "\t\r\n" ); - - // Write out all the configurations - fprintf ( OUT, "\t\r\n" ); - for ( size_t icfg = 0; icfg < m_configurations.size(); icfg++ ) - { - const MSVCConfiguration& cfg = *m_configurations[icfg]; - - if ( cfg.optimization == RosBuild ) - { - _generate_makefile_configuration( module, cfg ); - } - else - { - _generate_standard_configuration( module, cfg, binaryType ); - } - } - fprintf ( OUT, "\t\r\n" ); - - // Write out the project files - fprintf ( OUT, "\t\r\n" ); - - // Generated files - fprintf ( OUT, "\t\t\r\n" ); - for( i = 0; i < generated_files.size(); i++) - { - string source_file = DosSeparator(generated_files[i]); - - fprintf ( OUT, "\t\t\t\r\n", source_file.c_str() ); - fprintf ( OUT, "\t\t\t\r\n"); - } - fprintf ( OUT, "\t\t\r\n" ); - - // Source files - fprintf ( OUT, "\t\t\r\n" ); - - std::sort(source_files.begin(), source_files.end(), SortFilesAscending()); - vector last_folder; - vector split_path; - string indent_tab("\t\t\t"); - - for ( size_t isrcfile = 0; isrcfile < source_files.size(); isrcfile++ ) - { - string source_file = DosSeparator(source_files[isrcfile]); - - Path::Split(split_path, source_file, false); - size_t same_folder_index = 0; - for ( size_t ifolder = 0; ifolder < last_folder.size(); ifolder++ ) - { - if ( ifolder < split_path.size() && last_folder[ifolder] == split_path[ifolder] ) - ++same_folder_index; - else - break; - } - - if ( same_folder_index < split_path.size() || last_folder.size() > split_path.size() ) - { - int tabStart = 1; - if ( split_path.size() > last_folder.size() ) - { - for ( size_t ifolder = last_folder.size(); ifolder < split_path.size(); ifolder++ ) - indent_tab.push_back('\t'); - tabStart = split_path.size() - last_folder.size() + 1; - } - else if ( split_path.size() < last_folder.size() ) - { - indent_tab.resize( split_path.size() + 3 ); - tabStart = split_path.size() - last_folder.size() + 1; - } - - for ( size_t ifolder = last_folder.size(), itab = tabStart; ifolder > same_folder_index; ifolder--, itab++ ) - { - fprintf ( OUT, "%s\r\n", indent_tab.substr(0, indent_tab.size() - itab).c_str() ); - } - - for ( size_t ifolder = same_folder_index, itab = split_path.size() - same_folder_index; ifolder < split_path.size(); ifolder++, itab-- ) - { - const string tab = indent_tab.substr(0, indent_tab.size() - itab); - fprintf ( OUT, "%s\r\n", tab.c_str(), split_path[ifolder].c_str() ); - } - - last_folder = split_path; - } - - fprintf ( OUT, "%s\r\n", indent_tab.c_str(), source_file.c_str() ); - - for ( size_t iconfig = 0; iconfig < m_configurations.size(); iconfig++ ) - { - const MSVCConfiguration& config = *m_configurations[iconfig]; - - //if (configuration.VSProjectVersion < "8.00") { - if ((source_file.find(".idl") != string::npos) || ((source_file.find(".asm") != string::npos))) - { - fprintf ( OUT, "%s\t\r\n" ); -#if 0 - fprintf ( OUT, "%s\t\t\r\n", indent_tab.c_str() ); - } - else if ((source_file.find(".asm") != string::npos)) - { - fprintf ( OUT, "%s\t\t\tName=\"VCCustomBuildTool\"\r\n", indent_tab.c_str() ); - fprintf ( OUT, "%s\t\t\tCommandLine=\"nasmw $(InputPath) -f coff -o "$(OutDir)\\$(InputName).obj"\"\r\n", indent_tab.c_str() ); - fprintf ( OUT, "%s\t\t\tOutputs=\"$(OutDir)\\$(InputName).obj\"/>\r\n", indent_tab.c_str() ); - } -#endif - fprintf ( OUT, "%s\t\r\n", indent_tab.c_str() ); - } - //} - } - fprintf ( OUT, "%s\r\n", indent_tab.c_str() ); - } - - for ( size_t ifolder = last_folder.size(); ifolder > 0; ifolder-- ) - { - indent_tab.resize( ifolder + 2 ); - fprintf ( OUT, "%s\r\n", indent_tab.c_str() ); - } - - fprintf ( OUT, "\t\t\r\n" ); - - // Header files - fprintf ( OUT, "\t\t\r\n" ); - for ( i = 0; i < header_files.size(); i++ ) - { - fprintf ( OUT, "\t\t\t\r\n", header_files[i].c_str() ); - fprintf ( OUT, "\t\t\t\r\n" ); - } - fprintf ( OUT, "\t\t\r\n" ); - - // Resource files - fprintf ( OUT, "\t\t\r\n" ); - for ( i = 0; i < resource_files.size(); i++ ) - { - fprintf ( OUT, "\t\t\t\r\n", resource_files[i].c_str() ); - fprintf ( OUT, "\t\t\t\r\n" ); - } - fprintf ( OUT, "\t\t\r\n" ); - - fprintf ( OUT, "\t\r\n" ); - fprintf ( OUT, "\t\r\n" ); - fprintf ( OUT, "\t\r\n" ); - fprintf ( OUT, "\r\n" ); -} - -void VCProjMaker::_generate_user_configuration () -{ - // Call base implementation - ProjMaker::_generate_user_configuration (); -} - -void VCProjMaker::_generate_standard_configuration( const Module& module, - const MSVCConfiguration& cfg, - BinaryType binaryType ) -{ - string path_basedir = module.GetPathToBaseDir (); - string vcdir; - - bool include_idl = false; - - size_t i; - string intermediatedir = ""; - string importLib; - - if ( configuration.UseVSVersionInPath ) - { - vcdir = DEF_SSEP + _get_vc_dir(); - } - - if(module.IsSpecDefinitionFile()) - { - importLib = "$(IntDir)\\$(ProjectName).def"; - } - else if (module.importLibrary != NULL) - { - intermediatedir = module.output->relative_path + vcdir; - importLib = _strip_gcc_deffile(module.importLibrary->source->name, module.importLibrary->source->relative_path, intermediatedir); - importLib = Path::RelativeFromDirectory ( - importLib, - module.output->relative_path ); - } - - string module_type = GetExtension(*module.output); - - // Set the configuration type for this config - ConfigurationType CfgType; - if ( binaryType == Exe ) - CfgType = ConfigApp; - else if ( binaryType == Lib ) - CfgType = ConfigLib; - else if ( binaryType == Dll || binaryType == Sys ) - CfgType = ConfigDll; - else - CfgType = ConfigUnknown; - - fprintf ( OUT, "\t\trelative_path.c_str (), vcdir.c_str () ); - fprintf ( OUT, "\t\t\tIntermediateDirectory=\"$(RootIntDir)\\%s%s\\$(ConfigurationName)\"\r\n", module.output->relative_path.c_str (), vcdir.c_str () ); - } - else - { - fprintf ( OUT, "\t\t\tOutputDirectory=\"$(RootOutDir)\\%s%s\"\r\n", module.output->relative_path.c_str (), vcdir.c_str () ); - fprintf ( OUT, "\t\t\tIntermediateDirectory=\"$(RootIntDir)\\%s%s\"\r\n", module.output->relative_path.c_str (), vcdir.c_str () ); - } - - fprintf ( OUT, "\t\t\tConfigurationType=\"%d\"\r\n", CfgType ); - - fprintf ( OUT, "\t\t\tInheritedPropertySheets=\"%s\\%s.vsprops\"\r\n", path_basedir.c_str (), cfg.name.c_str ()); - fprintf ( OUT, "\t\t\tCharacterSet=\"%s\"\r\n", module.isUnicode ? "1" : "2" ); - fprintf ( OUT, "\t\t\t>\r\n" ); - - fprintf ( OUT, "\t\t\t\r\n" ); - - fprintf ( OUT, "\t\t\t\r\n" ); - - - fprintf ( OUT, "\t\t\tfile->name, - module.output->relative_path ); - string::size_type pos = pch_path.find_last_of ("/"); - if ( pos != string::npos ) - pch_path.erase(0, pos+1); - fprintf ( OUT, "\t\t\t\tPrecompiledHeaderThrough=\"%s\"\r\n", pch_path.c_str() ); - - // Only include from the same module - pos = pch_path.find("../"); - if (pos == string::npos && std::find(header_files.begin(), header_files.end(), pch_path) == header_files.end()) - header_files.push_back(pch_path); - } -#endif - - if ( module.cplusplus ) - fprintf ( OUT, "\t\t\t\tCompileAs=\"2\"\r\n" ); - - fprintf ( OUT, "\t\t\t/>\r\n"); - - fprintf ( OUT, "\t\t\t\r\n" ); - - if ( binaryType != Lib ) - { - fprintf ( OUT, "\t\t\t 0 ) - fprintf ( OUT, " " ); - string libpath = libraries[i].c_str(); - libpath = libpath.erase (0, libpath.find_last_of ("\\") + 1 ); - if ( libpath == "msvcrt.lib" ) - { - use_msvcrt_lib = true; - } - fprintf ( OUT, "%s", libpath.c_str() ); - } - fprintf ( OUT, "\"\r\n" ); - - fprintf ( OUT, "\t\t\t\tAdditionalLibraryDirectories=\"" ); - - // Add conventional libraries dirs - for (i = 0; i < libraries.size (); i++) - { - if ( i > 0 ) - fprintf ( OUT, ";" ); - - string libpath = libraries[i].c_str(); - libpath = libpath.substr (0, libpath.find_last_of ("\\") ); - fprintf ( OUT, "%s", libpath.c_str() ); - } - - fprintf ( OUT, "\"\r\n" ); - - fprintf ( OUT, "\t\t\t\tOutputFile=\"$(OutDir)/%s%s\"\r\n", module.name.c_str(), module_type.c_str() ); - if ( binaryType == Sys ) - { - if (module.GetEntryPoint() == "0") - fprintf ( OUT, "\t\t\t\tAdditionalOptions=\" /noentry /ALIGN:0x20 /SECTION:INIT,D /IGNORE:4001,4037,4039,4065,4070,4078,4087,4089,4096\"\r\n" ); - else - fprintf ( OUT, "\t\t\t\tAdditionalOptions=\" /ALIGN:0x20 /SECTION:INIT,D /IGNORE:4001,4037,4039,4065,4070,4078,4087,4089,4096\"\r\n" ); - fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" ); - fprintf ( OUT, "\t\t\t\tGenerateManifest=\"FALSE\"\r\n" ); - fprintf ( OUT, "\t\t\t\tSubSystem=\"%d\"\r\n", 3 ); - fprintf ( OUT, "\t\t\t\tDriver=\"%d\"\r\n", 1 ); - fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"%s\"\r\n", module.GetEntryPoint() == "" ? "DriverEntry" : module.GetEntryPoint().c_str ()); - fprintf ( OUT, "\t\t\t\tBaseAddress=\"%s\"\r\n", baseaddr == "" ? "0x10000" : baseaddr.c_str ()); - } - else if ( binaryType == Exe ) - { - if ( module.type == Kernel ) - { - fprintf ( OUT, "\t\t\t\tAdditionalOptions=\" /SECTION:INIT,D /ALIGN:0x80\"\r\n" ); - fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" ); - fprintf ( OUT, "\t\t\t\tGenerateManifest=\"FALSE\"\r\n" ); - fprintf ( OUT, "\t\t\t\tSubSystem=\"%d\"\r\n", 3 ); - fprintf ( OUT, "\t\t\t\tDriver=\"%d\"\r\n", 1 ); - fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"KiSystemStartup\"\r\n" ); - fprintf ( OUT, "\t\t\t\tBaseAddress=\"%s\"\r\n", baseaddr.c_str ()); - } - else if ( module.type == NativeCUI ) - { - fprintf ( OUT, "\t\t\t\tAdditionalOptions=\" /ALIGN:0x20\"\r\n" ); - fprintf ( OUT, "\t\t\t\tSubSystem=\"%d\"\r\n", 1 ); - fprintf ( OUT, "\t\t\t\tGenerateManifest=\"FALSE\"\r\n" ); - fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" ); - fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"NtProcessStartup\"\r\n" ); - fprintf ( OUT, "\t\t\t\tBaseAddress=\"%s\"\r\n", baseaddr.c_str ()); - } - else if ( module.type == Win32CUI || module.type == Win32GUI || module.type == Win32SCR) - { - if ( use_msvcrt_lib ) - { - fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" ); - } - fprintf ( OUT, "\t\t\t\tSubSystem=\"%d\"\r\n", 2 ); - } - } - else if ( binaryType == Dll ) - { - if (module.GetEntryPoint() == "0") - fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"\"\r\n" ); - else - { - // get rid of DllMain@12 because MSVC needs to link to _DllMainCRTStartup@12 - // when using CRT - if (module.GetEntryPoint() == "DllMain@12") - fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"\"\r\n" ); - else - fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"%s\"\r\n", module.GetEntryPoint().c_str ()); - } - fprintf ( OUT, "\t\t\t\tBaseAddress=\"%s\"\r\n", baseaddr == "" ? "0x40000" : baseaddr.c_str ()); - if ( use_msvcrt_lib ) - { - fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" ); - } - } - fprintf ( OUT, "\t\t\t/>\r\n" ); - } - - fprintf ( OUT, "\t\t\t\r\n " ); - - fprintf ( OUT, "\t\t\t\r\n" ); - if (configuration.VSProjectVersion == "8.00") - { - fprintf ( OUT, "\t\t\t\r\n" ); - } - fprintf ( OUT, "\t\t\r\n" ); -} - - -void -VCProjMaker::_generate_makefile_configuration( const Module& module, const MSVCConfiguration& cfg ) -{ - string path_basedir = module.GetPathToBaseDir (); - string intenv = Environment::GetIntermediatePath (); - string outenv = Environment::GetOutputPath (); - - string outdir; - string intdir; - - if ( intenv == "obj-i386" ) - intdir = path_basedir + "obj-i386"; /* append relative dir from project dir */ - else - intdir = intenv; - - if ( outenv == "output-i386" ) - outdir = path_basedir + "output-i386"; - else - outdir = outenv; - - fprintf ( OUT, "\t\trelative_path.c_str (), cfg.name.c_str() ); - fprintf ( OUT, "\t\t\tIntermediateDirectory=\"%s\\%s\\%s\"\r\n", intdir.c_str (), module.output->relative_path.c_str (), cfg.name.c_str() ); - } - else - { - fprintf ( OUT, "\t\t\tOutputDirectory=\"%s\\%s\"\r\n", outdir.c_str (), module.output->relative_path.c_str () ); - fprintf ( OUT, "\t\t\tIntermediateDirectory=\"%s\\%s\"\r\n", intdir.c_str (), module.output->relative_path.c_str () ); - } - - fprintf ( OUT, "\t\t\tConfigurationType=\"0\"\r\n"); - fprintf ( OUT, "\t\t\t>\r\n" ); - - fprintf ( OUT, "\t\t\t\r\n" ); - fprintf ( OUT, "\t\t\r\n" ); -} diff --git a/reactos/tools/rbuild/backend/msvc/vcxprojmaker.cpp b/reactos/tools/rbuild/backend/msvc/vcxprojmaker.cpp deleted file mode 100644 index 33331130043..00000000000 --- a/reactos/tools/rbuild/backend/msvc/vcxprojmaker.cpp +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Copyright (C) 2002 Patrik Stridvall - * Copyright (C) 2005 Royce Mitchell III - * Copyright (C) 2006 Hervé Poussineau - * Copyright (C) 2006 Christoph von Wittich - * Copyright (C) 2009 Ged Murphy - * - * 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. - */ - -#ifdef _MSC_VER -#pragma warning ( disable : 4786 ) -#endif//_MSC_VER - -#include -#include -#include -#include -#include -#include - -#include - -#include "msvc.h" - -using std::string; -using std::vector; -using std::set; - -typedef set StringSet; - -#ifdef OUT -#undef OUT -#endif//OUT - - -VCXProjMaker::VCXProjMaker ( ) -{ - vcproj_file = ""; -} - -VCXProjMaker::VCXProjMaker ( Configuration& buildConfig, - const std::vector& msvc_configs, - std::string filename, - const Module& module) -{ - configuration = buildConfig; - m_configurations = msvc_configs; - vcproj_file = filename; - - OUT = fopen ( vcproj_file.c_str(), "wb" ); - - if ( !OUT ) - { - printf ( "Could not create file '%s'.\n", vcproj_file.c_str() ); - } - - // Set the binary type - string module_type = GetExtension(*module.output); - - if ((module.type == ObjectLibrary) || (module.type == RpcClient) ||(module.type == RpcServer) || (module_type == ".lib") || (module_type == ".a")) - binaryType = Lib; - else if ((module_type == ".dll") || (module_type == ".cpl")) - binaryType = Dll; - else if ((module_type == ".exe") || (module_type == ".scr")) - binaryType = Exe; - else if (module_type == ".sys") - binaryType = Sys; - else - binaryType = BinUnknown; -} - -VCXProjMaker::~VCXProjMaker() -{ - fclose ( OUT ); -} - -void -VCXProjMaker::_generate_item_group (std::vector files) -{ - size_t i; - - for( i = 0; i\r\n", files[i].c_str()); - else if( extension == ".s") - fprintf ( OUT, "\t\t\r\n", files[i].c_str()); - else if( extension == ".spec") - fprintf ( OUT, "\t\t\r\n", files[i].c_str()); - else if( extension == ".pspec") - fprintf ( OUT, "\t\t\r\n", files[i].c_str()); - else if( extension == ".rc") - fprintf ( OUT, "\t\t\r\n", files[i].c_str()); - else if( extension == ".h") - fprintf ( OUT, "\t\t\r\n", files[i].c_str()); - else - fprintf ( OUT, "\t\t\r\n", files[i].c_str()); - } -} - -string -VCXProjMaker::_get_configuration_type () -{ - switch (binaryType) - { - case Exe: - return "Application"; - case Dll: - case Sys: - return "DynamicLibrary"; - case Lib: - return "StaticLibrary"; - default: - return ""; - } -} - -void -VCXProjMaker::_generate_proj_file ( const Module& module ) -{ - string path_basedir = module.GetPathToBaseDir (); - size_t i; - string vcdir; - - if ( configuration.UseVSVersionInPath ) - { - vcdir = DEF_SSEP + _get_vc_dir(); - } - - printf ( "Creating MSVC project: '%s'\n", vcproj_file.c_str() ); - - _collect_files(module); - - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "\r\n" ); - - if (configuration.VSProjectVersion.empty()) - configuration.VSProjectVersion = "10.00"; - - // Write out the configurations - fprintf ( OUT, "\t\r\n" ); - for ( size_t icfg = 0; icfg < m_configurations.size(); icfg++ ) - { - const MSVCConfiguration& cfg = *m_configurations[icfg]; - - if ( cfg.optimization == RosBuild ) - _generate_makefile_configuration( module, cfg ); - else - _generate_standard_configuration( module, cfg, binaryType ); - } - fprintf ( OUT, "\t\r\n\r\n" ); - - // Write out the global info - fprintf ( OUT, "\t\r\n" ); - fprintf ( OUT, "\t\t{%s}\r\n", module.guid.c_str() ); - fprintf ( OUT, "\t\t%s\r\n", "Win32Proj" ); //FIXME: Win32Proj??? - fprintf ( OUT, "\t\t%s\r\n", module.name.c_str() ); //FIXME: shouldn't this be the soltion name? - fprintf ( OUT, "\t\r\n" ); - fprintf ( OUT, "\r\n" ); - - fprintf ( OUT, "\t\r\n"); - if( binaryType != BinUnknown) - fprintf ( OUT, "\t\t%s\r\n" , _get_configuration_type().c_str()); - fprintf ( OUT, "\t\t%s\r\n", module.isUnicode ? "Unicode" : "MultiByte"); - fprintf ( OUT, "\t\r\n"); - - fprintf ( OUT, "\t\r\n" ); - fprintf ( OUT, "\t\r\n" ); - fprintf ( OUT, "\t\r\n"); - fprintf ( OUT, "\t\t\r\n", path_basedir.c_str()); - fprintf ( OUT, "\t\t\r\n", path_basedir.c_str()); - fprintf ( OUT, "\t\r\n"); - - fprintf ( OUT, "\t\r\n"); - fprintf ( OUT, "\t\t$(RootOutDir)\\%s%s\\$(Configuration)\\\r\n", module.output->relative_path.c_str (), vcdir.c_str ()); - fprintf ( OUT, "\t\t$(RootIntDir)\\%s%s\\$(Configuration)\\\r\n", module.output->relative_path.c_str (), vcdir.c_str ()); - - if( includes.size() != 0) - { - fprintf( OUT, "\t\t"); - for ( i = 0; i < includes.size(); i++ ) - fprintf ( OUT, "%s;", includes[i].c_str() ); - fprintf( OUT, "\r\n"); - } - - if(defines.size() != 0) - { - fprintf( OUT, "\t\t"); - for ( i = 0; i < defines.size(); i++ ) - fprintf ( OUT, "%s;", defines[i].c_str() ); - fprintf( OUT, "\r\n"); - } - - fprintf ( OUT, "\t\r\n\r\n"); - - fprintf ( OUT, "\t\r\n"); - fprintf ( OUT, "\t\t\r\n"); - if ( module.cplusplus ) - fprintf ( OUT, "\t\t\tCompileAsCpp\r\n"); - fprintf ( OUT, "\t\t\r\n"); - - fprintf ( OUT, "\t\t\r\n"); - if(libraries.size() != 0) - { - fprintf ( OUT, "\t\t\t"); - for ( i = 0; i < libraries.size(); i++ ) - { - string libpath = libraries[i].c_str(); - libpath = libpath.erase (0, libpath.find_last_of ("\\") + 1 ); - fprintf ( OUT, "%s;", libpath.c_str() ); - } - fprintf ( OUT, "%%(AdditionalDependencies)\r\n"); - - fprintf ( OUT, "\t\t\t"); - for ( i = 0; i < libraries.size(); i++ ) - { - string libpath = libraries[i].c_str(); - libpath = libpath.substr (0, libpath.find_last_of ("\\") ); - fprintf ( OUT, "%s;", libpath.c_str() ); - } - fprintf ( OUT, "%%(AdditionalLibraryDirectories)\r\n"); - } - - if( module.CRT != "msvcrt") - fprintf ( OUT, "\t\t\ttrue\r\n"); - - fprintf ( OUT, "\t\t\r\n"); - fprintf ( OUT, "\t\r\n"); - - fprintf ( OUT, "\t\r\n"); - _generate_item_group(header_files); - _generate_item_group(source_files); - _generate_item_group(resource_files); - _generate_item_group(generated_files); - fprintf ( OUT, "\t\r\n\r\n"); - - fprintf ( OUT, "\t\r\n"); - fprintf ( OUT, "\t\r\n", path_basedir.c_str()); - - fprintf ( OUT, "\r\n"); -} - -void -VCXProjMaker::_generate_user_configuration () -{ - // Call base implementation - ProjMaker::_generate_user_configuration (); -} - -void -VCXProjMaker::_generate_standard_configuration( const Module& module, const MSVCConfiguration& cfg, BinaryType binaryType ) -{ - fprintf ( OUT, "\t\t\r\n", cfg.name.c_str() ); - fprintf ( OUT, "\t\t%s\r\n", cfg.name.c_str() ); - fprintf ( OUT, "\t\tWin32\r\n" ); - fprintf ( OUT, "\t\r\n" ); -} - -void -VCXProjMaker::_generate_makefile_configuration( const Module& module, const MSVCConfiguration& cfg ) -{ - // TODO: Implement me - ProjMaker::_generate_makefile_configuration ( module, cfg ); -} diff --git a/reactos/tools/rbuild/backend/msvc/vspropsmaker.cpp b/reactos/tools/rbuild/backend/msvc/vspropsmaker.cpp deleted file mode 100644 index 7f03ec36d10..00000000000 --- a/reactos/tools/rbuild/backend/msvc/vspropsmaker.cpp +++ /dev/null @@ -1,268 +0,0 @@ -#ifdef _MSC_VER -#pragma warning ( disable : 4786 ) -#endif//_MSC_VER - -#include -#include -#include -#include -#include -#include - -#include - -#include "msvc.h" - -using std::string; -using std::vector; -using std::set; - -typedef set StringSet; - -#ifdef OUT -#undef OUT -#endif//OUT - -VSPropsMaker::VSPropsMaker ( Configuration& buildConfig, - Project* ProjectNode, - std::string filename_props, - MSVCConfiguration* msvc_configs) -{ - m_configuration = buildConfig; - m_ProjectNode = ProjectNode; - - m_msvc_config = msvc_configs; - - debug = ( m_msvc_config->optimization == Debug ); - release = ( m_msvc_config->optimization == Release ); - speed = ( m_msvc_config->optimization == Speed ); - use_ros_headers = (m_msvc_config->headers == ReactOSHeaders); - - OUT = fopen ( filename_props.c_str(), "wb" ); - - if ( !OUT ) - { - printf ( "Could not create file '%s'.\n", filename_props.c_str() ); - } -} - -VSPropsMaker::~VSPropsMaker ( ) -{ - fclose ( OUT ); -} - -void -VSPropsMaker::_generate_header() -{ - fprintf ( OUT, "\r\n" ); - fprintf ( OUT, "\r\n", m_msvc_config->name.c_str() ); -} - -void -VSPropsMaker::_generate_tools_defaults() -{ - fprintf ( OUT, "\t\r\n"); - - //Linker - fprintf ( OUT, "\t\r\n"); - - //Librarian - fprintf ( OUT, "\t\r\n"); - - //Resource compiler - fprintf ( OUT, "\t\t\t\r\n"); -} - -void -VSPropsMaker::_generate_macro(std::string Name, - std::string Value, - bool EvairomentVariable) -{ - fprintf ( OUT, "\t\r\n"); -} - -void -VSPropsMaker::_generate_global_includes() -{ - //Generate global includes - //they will be used by the c compiler, the resource compiler - //and the preprocessor for .s and .pspec files - - fprintf ( OUT, "\tnon_if_data; - //const vector& files = data.files; - size_t i; - const vector& incs = data.includes; - for ( i = 0; i < incs.size(); i++ ) - { - if ((incs[i]->directory->relative_path == "include\\crt" || - incs[i]->directory->relative_path == "include\\ddk" || - incs[i]->directory->relative_path == "include\\GL" || - incs[i]->directory->relative_path == "include\\psdk") && - ! use_ros_headers) - { - continue; - } - - if(incs[i]->directory->directory == SourceDirectory) - fprintf ( OUT, "$(RootSrcDir)\\"); - else if (incs[i]->directory->directory == IntermediateDirectory) - fprintf ( OUT, "$(RootIntDir)\\"); - else if (incs[i]->directory->directory == OutputDirectory) - fprintf ( OUT, "$(RootOutDir)\\"); - else - continue; - - fprintf ( OUT, "%s ; ", incs[i]->directory->relative_path.c_str()); - } - - fprintf ( OUT, "$(RootIntDir)\\include ; "); - fprintf ( OUT, "$(RootIntDir)\\include\\reactos ; "); - - if ( !use_ros_headers ) - { - // Add WDK or PSDK paths, if user provides them - if (getenv ( "BASEDIR" ) != NULL) - { - string WdkBase = getenv ( "BASEDIR" ); - fprintf ( OUT, "%s\\inc\\api ; ", WdkBase.c_str()); - fprintf ( OUT, "%s\\inc\\crt ; ", WdkBase.c_str()); - fprintf ( OUT, "%s\\inc\\ddk ; ", WdkBase.c_str()); - } - } - fprintf ( OUT, "\"\r\n"); - fprintf ( OUT, "\t\tPerformEnvironmentSet=\"true\"\r\n"); - fprintf( OUT, "\t/>\r\n"); -} - -void -VSPropsMaker::_generate_global_definitions() -{ - fprintf ( OUT, "\tnon_if_data; - const vector& defs = data.defines; - size_t i; - - for ( i = 0; i < defs.size(); i++ ) - { - if ( defs[i]->backend != "" && defs[i]->backend != "msvc" ) - continue; - - if ( defs[i]->value != "" ) - fprintf ( OUT, "%s=%s ; ",defs[i]->name.c_str(), defs[i]->value.c_str()); - else - fprintf ( OUT, "%s ; ", defs[i]->name.c_str()); - } - - fprintf ( OUT, "\"\r\n"); - fprintf ( OUT, "\t\tPerformEnvironmentSet=\"true\"\r\n"); - fprintf( OUT, "\t/>\r\n"); -} - -void -VSPropsMaker::_generate_footer() -{ - fprintf ( OUT, "\r\n"); -} - - -void -VSPropsMaker::_generate_props ( std::string solution_version, - std::string studio_version ) -{ - _generate_header(); - _generate_tools_defaults(); - - string srcdir = Environment::GetSourcePath(); - string intdir = Environment::GetIntermediatePath (); - string outdir = Environment::GetOutputPath (); - string rosbedir = Environment::GetVariable("_ROSBE_BASEDIR"); - - if ( intdir == "obj-i386" ) - intdir = srcdir + "\\obj-i386"; /* append relative dir from project dir */ - - if ( outdir == "output-i386" ) - outdir = srcdir + "\\output-i386"; - - //Generate global macros - _generate_macro("RootSrcDir", srcdir, true); - _generate_macro("RootOutDir", outdir, true); - _generate_macro("RootIntDir", intdir, true); - _generate_macro("Tools", "$(RootOutDir)\\tools", true); - _generate_macro("RosBE", rosbedir, true); - - _generate_global_includes(); - _generate_global_definitions(); - _generate_footer(); -} diff --git a/reactos/tools/rbuild/backend/versionreport/versionreport.cpp b/reactos/tools/rbuild/backend/versionreport/versionreport.cpp deleted file mode 100644 index 80516635489..00000000000 --- a/reactos/tools/rbuild/backend/versionreport/versionreport.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (C) 2007 Marc Piulachs (marc.piulachs [at] codexchange [dot] net) - * - * 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. - */ -#ifdef _MSC_VER -#pragma warning ( disable : 4786 ) -#endif//_MSC_VER - -#include -#include -#include -#include -#include - -#include - -#include "versionreport.h" -#include "../mingw/mingw.h" - -using std::string; -using std::vector; -using std::map; -using std::ifstream; - -#ifdef OUT -#undef OUT -#endif//OUT - - -static class VReportFactory : public Backend::Factory -{ - public: - - VReportFactory() : Factory("VReport", "Version Report") {} - Backend *operator() (Project &project, - Configuration& configuration) - { - return new VReportBackend(project, configuration); - } - -} factory; - - -VReportBackend::VReportBackend(Project &project, - Configuration& configuration) : Backend(project, configuration) -{ - -} - -void VReportBackend::Process() -{ - string filename_depmap ( "versionreport.xml" ); - printf ( "Creating version report: %s\n", filename_depmap.c_str() ); - - m_VReportFile = fopen ( filename_depmap.c_str(), "wb" ); - - if ( !m_VReportFile ) - { - printf ( "Could not create file '%s'.\n", filename_depmap.c_str() ); - return; - } - - GenerateReport ( m_VReportFile ); - - fclose ( m_VReportFile ); - printf ( "Done.\n" ); -} - -void -VReportBackend::CleanFiles ( void ) -{ - remove ( "versionreport.xml" ); -} - -void -VReportBackend::GenerateReport ( FILE* OUT ) -{ - fprintf ( m_VReportFile, "\r\n" ); - fprintf ( m_VReportFile, "\r\n" ); - fprintf ( m_VReportFile, "\r\n" ); - - for( std::map::const_iterator p = ProjectNode.modules.begin(); p != ProjectNode.modules.end(); ++ p ) - { - Module& module = *p->second; - if ((module.type != Iso) && - (module.type != LiveIso)) - { - Module& module = *p->second; - - if (module.metadata) - { - if (module.metadata->version.length() > 0) - { - fprintf ( m_VReportFile, "\t\r\n" ); - fprintf ( m_VReportFile, "\t\t%s\r\n", module.name.c_str () ); - fprintf ( m_VReportFile, "\t\t%s\r\n", module.output->relative_path.c_str () ); - fprintf ( m_VReportFile, "\t\t%s\r\n", module.metadata->version.c_str () ); - fprintf ( m_VReportFile, "\t\t%s\r\n", module.metadata->date.c_str () ); - fprintf ( m_VReportFile, "\t\t%s\r\n", module.metadata->owner.c_str () ); - fprintf ( m_VReportFile, "\t\r\n" ); - } - } - } - } - - fprintf ( m_VReportFile, "" ); -} - - -VReportConfiguration::VReportConfiguration ( const std::string &name ) -{ - /* nothing to do here */ -} diff --git a/reactos/tools/rbuild/backend/versionreport/versionreport.h b/reactos/tools/rbuild/backend/versionreport/versionreport.h deleted file mode 100644 index 24d4addefb1..00000000000 --- a/reactos/tools/rbuild/backend/versionreport/versionreport.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2007 Marc Piulachs (marc.piulachs [at] codexchange [dot] net) - * - * 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 - -#include -#include -#include - -#include "../backend.h" - -class VReportConfiguration -{ - public: - VReportConfiguration(const std::string &name = ""); - virtual ~VReportConfiguration() {} - std::string name; -}; - -class VReportBackend : public Backend -{ - public: - - VReportBackend(Project &project, - Configuration& configuration); - virtual ~VReportBackend() {} - - virtual void Process(); - - private: - - FILE* m_VReportFile; - - std::vector m_configurations; - - void GenerateReport ( FILE* OUT ); - void CleanFiles ( void ); - - struct module_data - { - std::vector libraries; - std::vector references; - - module_data() - {} - ~module_data() - {} - }; - -}; diff --git a/reactos/tools/rbuild/bootstrap.cpp b/reactos/tools/rbuild/bootstrap.cpp deleted file mode 100644 index f02132f261c..00000000000 --- a/reactos/tools/rbuild/bootstrap.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "pch.h" -#include - -#include "rbuild.h" - -using std::string; - -Bootstrap::Bootstrap ( const Project& project_, - const Module* module_, - const XMLElement& bootstrapNode ) - : project(project_), - module(module_), - node(bootstrapNode) -{ - Initialize(); -} - -Bootstrap::~Bootstrap () -{ -} - -bool -Bootstrap::IsSupportedModuleType ( ModuleType type ) -{ - switch ( type ) - { - case Kernel: - case KernelModeDLL: - case KeyboardLayout: - case NativeDLL: - case NativeCUI: - case Win32DLL: - case Win32OCX: - case Win32CUI: - case Win32SCR: - case Win32GUI: - case KernelModeDriver: - case BootSector: - case BootLoader: - case BootProgram: - case Cabinet: - return true; - case BuildTool: - case StaticLibrary: - case HostStaticLibrary: - case ObjectLibrary: - case Iso: - case LiveIso: - case Test: - case RpcServer: - case RpcClient: - case RpcProxy: - case Alias: - case IdlHeader: - case IdlInterface: - case MessageHeader: - case EmbeddedTypeLib: - case ElfExecutable: - return false; - case TypeDontCare: - break; - } - throw InvalidOperationException ( __FILE__, - __LINE__ ); -} - -string -Bootstrap::ReplaceVariable ( const string& name, - const string& value, - string path ) -{ - size_t i = path.find ( name ); - if ( i != string::npos ) - return path.replace ( i, name.length (), value ); - else - return path; -} - -void -Bootstrap::Initialize () -{ - if ( !IsSupportedModuleType ( module->type ) ) - { - throw XMLInvalidBuildFileException ( - node.location, - " is not applicable for this module type." ); - } - - const XMLAttribute* att = node.GetAttribute ( "installbase", false ); - if ( att != NULL ) - base = ReplaceVariable ( "$(CDOUTPUT)", Environment::GetCdOutputPath (), att->value ); - else - base = ""; - - att = node.GetAttribute ( "nameoncd", false ); - if ( att != NULL ) - nameoncd = att->value; - else - nameoncd = module->output->name; -} - -void -Bootstrap::ProcessXML() -{ -} diff --git a/reactos/tools/rbuild/cdfile.cpp b/reactos/tools/rbuild/cdfile.cpp deleted file mode 100644 index 65b19d1b178..00000000000 --- a/reactos/tools/rbuild/cdfile.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "pch.h" -#include - -#include "rbuild.h" - -using std::string; - -string -CDFile::ReplaceVariable ( const string& name, - const string& value, - string path ) -{ - size_t i = path.find ( name ); - if ( i != string::npos ) - return path.replace ( i, name.length (), value ); - else - return path; -} - -CDFile::~CDFile () -{ - delete source; - delete target; -} - -CDFile::CDFile ( const Project& project, - const XMLElement& cdfileNode, - const string& path ) - : XmlNode ( project, cdfileNode ) -{ - const XMLAttribute* att = cdfileNode.GetAttribute ( "installbase", false ); - string target_relative_directory; - if ( att != NULL ) - target_relative_directory = ReplaceVariable ( "$(CDOUTPUT)", Environment::GetCdOutputPath (), att->value ); - else - target_relative_directory = ""; - - const XMLAttribute* nameoncd = cdfileNode.GetAttribute ( "nameoncd", false ); - - source = new FileLocation ( SourceDirectory, - path, - cdfileNode.value, - &cdfileNode ); - target = new FileLocation ( OutputDirectory, - target_relative_directory, - nameoncd ? nameoncd->value : cdfileNode.value, - &cdfileNode ); -} diff --git a/reactos/tools/rbuild/compilationunit.cpp b/reactos/tools/rbuild/compilationunit.cpp deleted file mode 100644 index b5d1105f302..00000000000 --- a/reactos/tools/rbuild/compilationunit.cpp +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "pch.h" -#include - -#include "rbuild.h" - -using std::string; -using std::vector; - -CompilationUnit::CompilationUnit ( const File* file ) - : project(NULL), - module(NULL), - node(NULL) -{ - default_name = new FileLocation ( IntermediateDirectory, - "", - file->file.name ); - - name = file->file.relative_path + sSep + file->file.name; - files.push_back ( file ); -} - -CompilationUnit::CompilationUnit ( const Project* project, - const Module* module, - const XMLElement* node ) - : project(project), - module(module), - node(node) -{ - const XMLAttribute* att = node->GetAttribute ( "name", true ); - assert(att); - - default_name = new FileLocation ( IntermediateDirectory, - module ? module->output->relative_path : "", - att->value, - node ); - name = module->output->relative_path + cSep + att->value; -} - -CompilationUnit::~CompilationUnit () -{ - size_t i; - for ( i = 0; i < files.size (); i++ ) - delete files[i]; - - delete default_name; -} - -void -CompilationUnit::ProcessXML () -{ - size_t i; - for ( i = 0; i < files.size (); i++ ) - const_cast ( files[i] )->ProcessXML (); -} - -bool -CompilationUnit::IsGeneratedFile () const -{ - if ( files.size () != 1 ) - return false; - const File* file = files[0]; - string extension = GetExtension ( file->file ); - return ( extension == ".spec" || extension == ".pspec" || extension == ".mc"); -} - -bool -CompilationUnit::HasFileWithExtension ( const std::string& extension ) const -{ - size_t i; - for ( i = 0; i < files.size (); i++ ) - { - const File& file = *files[i]; - string fileExtension = GetExtension ( file.file ); - if ( !stricmp ( fileExtension.c_str (), extension.c_str () ) ) - return true; - } - return false; -} - -bool -CompilationUnit::IsFirstFile () const -{ - if ( files.size () == 0 || files.size () > 1 ) - return false; - const File* file = files[0]; - return file->first; -} - - -const FileLocation& -CompilationUnit::GetFilename () const -{ - if ( files.size () == 0 || files.size () > 1 ) - return *default_name; - - const File* file = files[0]; - return file->file; -} - -const std::string& -CompilationUnit::GetSwitches () const -{ - static const std::string empty_string = std::string(""); - if ( files.size () == 0 || files.size () > 1 ) - return empty_string; - const File* file = files[0]; - return file->switches; -} - -void -CompilationUnit::AddFile ( const File * file ) -{ - files.push_back ( file ); -} - -const std::vector -CompilationUnit::GetFiles () const -{ - return files; -} diff --git a/reactos/tools/rbuild/compilationunitsupportcode.cpp b/reactos/tools/rbuild/compilationunitsupportcode.cpp deleted file mode 100644 index c6e76fdc880..00000000000 --- a/reactos/tools/rbuild/compilationunitsupportcode.cpp +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "pch.h" -#include - -#include "rbuild.h" - -using std::string; -using std::vector; - -CompilationUnitSupportCode::CompilationUnitSupportCode ( const Project& project ) - : project ( project ) -{ -} - -CompilationUnitSupportCode::~CompilationUnitSupportCode () -{ -} - -void -CompilationUnitSupportCode::Generate ( bool verbose ) -{ - for( std::map::const_iterator p = project.modules.begin(); p != project.modules.end(); ++ p ) - { - GenerateForModule ( *p->second, - verbose ); - } -} - -void -CompilationUnitSupportCode::GenerateForModule ( Module& module, - bool verbose ) -{ - if ( verbose ) - { - printf ( "\nGenerating compilation unit support code for %s", - module.name.c_str () ); - } - - for ( size_t i = 0; i < module.non_if_data.compilationUnits.size () ; i++ ) - { - CompilationUnit& compilationUnit = *module.non_if_data.compilationUnits[i]; - if ( compilationUnit.GetFiles ().size () <= 1 ) - continue; - WriteCompilationUnitFile ( module, compilationUnit ); - } -} - -string -CompilationUnitSupportCode::GetCompilationUnitFilename ( Module& module, - CompilationUnit& compilationUnit ) -{ - return NormalizeFilename ( Environment::GetIntermediatePath () + sSep + compilationUnit.name ); -} - -void -CompilationUnitSupportCode::WriteCompilationUnitFile ( Module& module, - CompilationUnit& compilationUnit ) -{ - char* buf; - char* s; - - buf = (char*) malloc ( 512*1024 ); - if ( buf == NULL ) - throw OutOfMemoryException (); - - s = buf; - s = s + sprintf ( s, "/* This file is automatically generated. */\n" ); - s = s + sprintf ( s, "#define ONE_COMPILATION_UNIT\n" ); - - for ( size_t i = 0; i < compilationUnit.GetFiles ().size () ; i++ ) - { - const File& file = *compilationUnit.GetFiles ()[i]; - s = s + sprintf ( s, "#include <%s/%s>\n", ChangeSeparator ( file.file.relative_path, '\\', '/' ).c_str (), file.file.name.c_str () ); - } - - s = s + sprintf ( s, "\n" ); - - FileSupportCode::WriteIfChanged ( buf, GetCompilationUnitFilename ( module, compilationUnit ) ); - - free ( buf ); -} diff --git a/reactos/tools/rbuild/compilerdirective.cpp b/reactos/tools/rbuild/compilerdirective.cpp deleted file mode 100644 index c8ceebd18ea..00000000000 --- a/reactos/tools/rbuild/compilerdirective.cpp +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (C) 2009 KJK::Hyperion - * - * 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 "pch.h" -#include - -#include "rbuild.h" - -#include - -void -CompilerDirective::SetCompiler ( CompilerType compiler ) -{ - assert ( compiler < CompilerTypesCount ); - compilersSet.set ( compiler ); -} - -void -CompilerDirective::UnsetCompiler ( CompilerType compiler ) -{ - assert ( compiler < CompilerTypesCount ); - compilersSet.reset ( compiler ); -} - -void -CompilerDirective::SetAllCompilers () -{ - compilersSet.set (); -} - -void -CompilerDirective::UnsetAllCompilers () -{ - compilersSet.reset (); -} - -bool -CompilerDirective::IsCompilerSet ( CompilerType compiler ) const -{ - assert ( compiler < CompilerTypesCount ); - return compilersSet.test ( compiler ); -} - -template < std::size_t N > -static -bool -CompareStringElement ( const std::string::const_iterator& begin, const std::string::const_iterator& end, const char (& compareTo)[(N)] ) -{ - return !std::use_facet < std::collate < char > > ( std::locale::classic () ) - .compare ( &(*begin), - &(*(end - 1)), - &compareTo[0], - &compareTo[(N) - 2] ); -} - -void -CompilerDirective::ParseCompilers ( const XMLElement& node, const std::string& defaultValue ) -{ - const XMLAttribute* att = node.GetAttribute ( "compiler", false ); - const std::string& value = att ? att->value : defaultValue; - - if ( value == "*" ) - SetAllCompilers (); - else - { - UnsetAllCompilers (); - - std::string::const_iterator beginString; - - beginString = value.begin(); - - do - { - for ( ; beginString != value.end(); ++ beginString ) - { - if ( *beginString != ',' ) - break; - } - - if ( beginString == value.end() ) - break; - - std::string::const_iterator endString = beginString; - - for ( ; endString != value.end(); ++ endString ) - { - if ( *endString == ',' ) - break; - } - - assert ( endString != beginString ); - - CompilerType compiler; - - if ( CompareStringElement ( beginString, endString, "cc" ) ) - compiler = CompilerTypeCC; - else if ( CompareStringElement ( beginString, endString, "cxx" ) ) - compiler = CompilerTypeCXX; - else if ( CompareStringElement ( beginString, endString, "cpp" ) ) - compiler = CompilerTypeCPP; - else if ( CompareStringElement ( beginString, endString, "as" ) ) - compiler = CompilerTypeAS; - else if ( CompareStringElement ( beginString, endString, "midl" ) ) - compiler = CompilerTypeMIDL; - else if ( CompareStringElement ( beginString, endString, "rc" ) ) - compiler = CompilerTypeRC; - else if ( CompareStringElement ( beginString, endString, "nasm" ) ) - compiler = CompilerTypeNASM; - else - { - throw InvalidAttributeValueException ( - node.location, - "compiler", - value ); - } - - SetCompiler ( compiler ); - - beginString = endString; - } - while ( beginString != value.end() ); - - if ( !compilersSet.any() ) - { - throw InvalidAttributeValueException ( - node.location, - "compiler", - value ); - } - } -} diff --git a/reactos/tools/rbuild/compilerflag.cpp b/reactos/tools/rbuild/compilerflag.cpp deleted file mode 100644 index 081b30fcfee..00000000000 --- a/reactos/tools/rbuild/compilerflag.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "pch.h" -#include - -#include "rbuild.h" - -using std::string; -using std::vector; - -CompilerFlag::CompilerFlag ( const Project& project_, - const XMLElement& compilerFlagNode ) - : project(project_), - module(NULL), - node(compilerFlagNode) -{ - Initialize(); -} - -CompilerFlag::CompilerFlag ( const Project& project_, - const Module* module_, - const XMLElement& compilerFlagNode ) - : project(project_), - module(module_), - node(compilerFlagNode) -{ - Initialize(); -} - -CompilerFlag::~CompilerFlag () -{ -} - -void -CompilerFlag::Initialize () -{ - if (node.value.size () == 0) - { - throw XMLInvalidBuildFileException ( - node.location, - " is empty." ); - } - - flag = node.value; - - ParseCompilers ( node, "cc,cxx" ); -} - -void -CompilerFlag::ProcessXML () -{ -} diff --git a/reactos/tools/rbuild/configuration.cpp b/reactos/tools/rbuild/configuration.cpp deleted file mode 100644 index 222c982e30b..00000000000 --- a/reactos/tools/rbuild/configuration.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "pch.h" -#include - -#include "rbuild.h" - -Configuration::Configuration () -{ - Verbose = false; - CleanAsYouGo = false; - Dependencies = AutomaticDependencies; - CheckDependenciesForModuleOnly = false; - CompilationUnitsEnabled = true; - PrecompiledHeadersEnabled = true; - MakeHandlesInstallDirectories = false; - GenerateProxyMakefilesInSourceTree = false; - InstallFiles = false; - UseConfigurationInPath = false; - UseVSVersionInPath = false; - Compiler = GnuGcc; - Linker = GnuLd; -} - -Configuration::~Configuration () -{ -} diff --git a/reactos/tools/rbuild/define.cpp b/reactos/tools/rbuild/define.cpp deleted file mode 100644 index 13ee819983f..00000000000 --- a/reactos/tools/rbuild/define.cpp +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "pch.h" -#include - -#include "rbuild.h" - -using std::string; -using std::vector; - -Define::Define ( const Project& project, - const XMLElement& defineNode ) - : project(project), - module(NULL), - node(&defineNode) -{ - Initialize(); -} - -Define::Define ( const Project& project, - const Module* module, - const XMLElement& defineNode ) - : project(project), - module(module), - node(&defineNode) -{ - Initialize(); -} - -Define::Define ( const Project& project, - const Module* module, - const std::string& name_, - const std::string& backend_, - bool redefine_) - : project(project), - module(module), - node(NULL) -{ - name = name_; - value = ""; - backend = backend_; - redefine = redefine_; -} - -Define::~Define () -{ -// if ( node ) -// delete node; -// if ( module ) -// delete module; -} - -void -Define::Initialize() -{ - redefine = node->name == "redefine"; - - const XMLAttribute* att = node->GetAttribute ( "name", true ); - - att = node->GetAttribute ( "name", true ); - assert(att); - - size_t name_len = att->value.find ( '(' ); - - name = att->value.substr ( 0, name_len ); - - if ( name_len != std::string::npos ) - arguments = att->value.substr ( att->value.find ( '(' ) ); - - value = node->value; - - att = node->GetAttribute ( "backend", false ); - if ( att ) - backend = att->value; - - ParseCompilers ( *node, "cpp" ); -} - -void -Define::ProcessXML() -{ -} diff --git a/reactos/tools/rbuild/directory.cpp b/reactos/tools/rbuild/directory.cpp deleted file mode 100644 index 9e4ed41b179..00000000000 --- a/reactos/tools/rbuild/directory.cpp +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "pch.h" -#include - -#include "rbuild.h" -#ifdef _MSC_VER -#include -#else -#include -#endif//_MSC_VER - -#ifdef WIN32 -#define MKDIR(s) mkdir(s) -#else -#define MKDIR(s) mkdir(s, 0755) -#endif - -using std::string; -using std::vector; - -Directory::Directory ( const string& name_ ) - : name(name_) -{ - size_t pos = name.find_first_of ( "$:" ); - if ( pos != string::npos ) - { - throw InvalidOperationException ( __FILE__, - __LINE__, - "Invalid directory name '%s'", - name.c_str() ); - } - - const char* p = strpbrk ( name_.c_str (), "/\\" ); - if ( name_.c_str () == p ) - { - throw InvalidOperationException ( __FILE__, - __LINE__, - "Invalid relative path '%s'", - name_.c_str () ); - } - - if ( p ) - { - name.erase ( p - name_.c_str ()); - Add ( p + 1 ); - } -} - -void -Directory::Add ( const char* subdir ) -{ - size_t i; - string s1 = string ( subdir ); - if ( ( i = s1.find ( '$' ) ) != string::npos ) - { - throw InvalidOperationException ( __FILE__, - __LINE__, - "No environment variables can be used here. Path was %s", - subdir ); - } - - const char* p = strpbrk ( subdir, "/\\" ); - if ( subdir == p || ( *subdir && subdir[1] == ':' ) ) - { - throw InvalidOperationException ( __FILE__, - __LINE__, - "Invalid relative path '%s'", - subdir ); - } - - if ( !p ) - p = subdir + strlen(subdir); - string s ( subdir, p-subdir ); - if ( subdirs.find(s) == subdirs.end() ) - subdirs[s] = new Directory(s); - if ( *p && *++p ) - subdirs[s]->Add ( p ); -} - -bool -Directory::mkdir_p ( const char* path ) -{ -#ifndef _MSC_VER - DIR *directory; - directory = opendir ( path ); - if ( directory != NULL ) - { - closedir ( directory ); - return false; - } -#endif//_MSC_VER - - if ( MKDIR ( path ) != 0 ) - { -#ifdef _MSC_VER - if ( errno == EEXIST ) - return false; -#endif//_MSC_VER - throw AccessDeniedException ( string ( path ) ); - } - return true; -} - -bool -Directory::CreateDirectory ( const string& path ) -{ - size_t index = 0; - size_t nextIndex; - if ( isalpha ( path[0] ) && path[1] == ':' && path[2] == cSep ) - { - nextIndex = path.find ( cSep, 3); - index = path.find ( cSep ); - } - else - nextIndex = path.find ( cSep ); - - bool directoryWasCreated = false; - while ( nextIndex != string::npos ) - { - nextIndex = path.find ( cSep, index + 1 ); - directoryWasCreated = mkdir_p ( path.substr ( 0, nextIndex ).c_str () ); - index = nextIndex; - } - return directoryWasCreated; -} - -void -Directory::GenerateTree ( DirectoryLocation root, - bool verbose ) -{ - switch ( root ) - { - case IntermediateDirectory: - return GenerateTree ( Environment::GetIntermediatePath (), verbose ); - case OutputDirectory: - return GenerateTree ( Environment::GetOutputPath (), verbose ); - case InstallDirectory: - return GenerateTree ( Environment::GetInstallPath (), verbose ); - default: - throw InvalidOperationException ( __FILE__, - __LINE__, - "Invalid directory %d.", - root ); - } -} - -void -Directory::GenerateTree ( const string& parent, - bool verbose ) -{ - string path; - - if ( parent.size () > 0 ) - { - if ( name.size () > 0 ) - path = parent + sSep + name; - else - path = parent; - if ( CreateDirectory ( path ) && verbose ) - printf ( "Created %s\n", path.c_str () ); - } - else - path = name; - - for ( directory_map::iterator i = subdirs.begin (); - i != subdirs.end (); - ++i ) - { - i->second->GenerateTree ( path, verbose ); - } -} - -string -Directory::EscapeSpaces ( const string& path ) -{ - string newpath; - const char* p = &path[0]; - while ( *p != 0 ) - { - if ( *p == ' ' ) - newpath = newpath + "\\ "; - else - newpath = newpath + *p; - p++; - } - return newpath; -} - -void -Directory::CreateRule ( FILE* f, - const string& parent ) -{ - string path; - string escapedName = EscapeSpaces ( name ); - - if ( escapedName.size() > 0 ) - { - if ( ! (escapedName == "tools" && - ( parent == "$(OUTPUT)" || parent == "$(INTERMEDIATE)" ) ) ) - { - fprintf ( f, - "%s%c%s: | %s\n", - parent.c_str (), - cSep, - escapedName.c_str (), - parent.c_str () ); - - fprintf ( f, - "\t$(ECHO_MKDIR)\n" ); - - fprintf ( f, - "\t${mkdir} $@\n" ); - } - - path = parent + sSep + escapedName; - } - else - path = parent; - - for ( directory_map::iterator i = subdirs.begin(); - i != subdirs.end(); - ++i ) - { - i->second->CreateRule ( f, path ); - } -} - -Directory::~Directory() -{ - std::map::iterator theIterator; - for ( theIterator = subdirs.begin (); theIterator != subdirs.end (); theIterator++ ) - delete theIterator->second; -} diff --git a/reactos/tools/rbuild/doc/rbuild.dbk b/reactos/tools/rbuild/doc/rbuild.dbk deleted file mode 100644 index 692db206722..00000000000 --- a/reactos/tools/rbuild/doc/rbuild.dbk +++ /dev/null @@ -1,1809 +0,0 @@ - - - - ReactOS Build System Documentation - - - $Id$ - - - Casper - - Hornstrup - - - - Emanuele - - Aliberti - - - - 2005 - - - - - Building ReactOS - -
- Building ReactOS - - To generate GNU make makefiles and building ReactOS, do the - following: - - Go to the top-level reactos - directory; - - - - Run the command:mingw32-make - - This will start building ReactOS. - - - - To build a bootable CD, run the following command:mingw32-make bootcdThis - will create ReactOS.iso in the top-level - reactos directory. -
-
- - - How build directions are stored - - XML files are used throughout the ReactOS source tree to drive the - build system. - -
- Top-level XML Build File - - The top-level XML build file (ReactOS.rbuild) is - processed by rbuild. The following is an example of - how it could look like:<?xml version="1.0"?> -<!DOCTYPE project SYSTEM "tools/rbuild/project.dtd"> -<project name="ReactOS" makefile="Makefile.auto" xmlns:xi="http://www.w3.org/2001/XInclude"> - <xi:include href="config.rbuild"> - <xi:fallback> - <xi:include href="config.template.rbuild" /> - </xi:fallback> - </xi:include> - - <define name="_M_IX86" /> - <if property="DBG" value="1"> - <define name="DBG" value="1" /> - <property name="DBG_OR_KDBG" value="true" /> - </if> - - <include base="ReactOS">include</include> - - <directory name="boot"> - <xi:include href="boot/boot.rbuild" /> - </directory> - - <module name="bootcd" type="iso"> - </module> -</project> -
- -
- XInclude - - XML files used by rbuild are modular and use - XInclude to include other chunks of XML in the top-level - ReactOS.rbuild file. The namespace used by XInclude is - xi. - -
- xi:include - - It is possible to split an XML build file over several files. - The include element in the xi namespace is used to - accomplish this. - -
- Syntax - - <xi:include href="config.rbuild"> - <xi:fallback> - <xi:include href="config.template.rbuild" /> - </xi:fallback> -</xi:include> -
- -
- Attributes - - - - href - - - Name of XML build file to include. The filename is - relative to the location of the current XML build - file. - - - -
- -
- Content - - None. -
- -
- Children - - xi:fallback. -
-
- -
- xi:fallback - - This element is used to provide the name of an alternate file - that is to be included if the first include file did not - exists. - -
- Syntax - - <xi:fallback> - <xi:include href="config.template.rbuild" /> -</xi:fallback> -
- -
- Attributes - - None. -
- -
- Content - - None. -
- -
- Parents - - xi:include. -
- -
- Children - - xi:include. -
-
-
- -
- Element reference - -
- Bootstrap element - - A bootstrap element specifies that the generated file should be - put on the bootable CD as a bootstrap file. - -
- Syntax - - <bootstrap base="reactos" nameoncd="halmp.dll" /> -
- -
- Attributes - - - - base - - - Put file in this directory on the bootable CD. This - attribute is optional. - - - - - nameoncd - - - Name of file on the bootable CD. This attribute is - optional. - - - -
- -
- Content - - None. -
- -
- Parents - - module. -
- -
- Children - - None. -
-
- -
- CDFile element - - A cdfile element specifies the name of a file that is to be put - on the bootable CD. - -
- Syntax - - <cdfile base="reactos" nameoncd="ReadMe.txt">ReadMe.txt</cdfile> -
- -
- Attributes - - - - base - - - Put file in this directory on the bootable CD. This - attribute is optional. - - - - - nameoncd - - - Name of file on the bootable CD. This attribute is - optional. - - - -
- -
- Content - - Name of file. -
- -
- Children - - None. -
-
- -
- Compilerflag element - - A compilerflag element specifies additional flags to be bassed - to the compiler. - -
- Syntax - - <compilerflags>-Wpointer-arith</compilerflag> -
- -
- Attributes. - - None. -
- -
- Content - - The compiler flags. -
- -
- Parents - - if, project. -
- -
- Children - - None. -
-
- -
- Component element - - A component element specifies that imports from a library are to - be stubbed so tests can be run without actually calling the functions - in the library. This element can only be used for modules of type - test. - -
- Syntax - - <component name="ntdll.dll"> - ... -</component> -
- -
- Attributes - - - - name - - - Name of library. - - - -
- -
- Content - - None. -
- -
- Children - - symbol. -
-
- -
- Define element - - A define element specifies the name and (optionally) value of a - define for the C/C++ compiler and resource compiler. - -
- Syntax - - <define name="WINVER">0x501</define> -
- -
- Attributes - - - - name - - - Name of define. - - - -
- -
- Content - - Value of define. The value is optional. -
- -
- Parents - - project, module. -
- -
- Children - - None. -
-
- -
- Dependency element - - A dependency element specifies the name of a module (usually of - type buildtool) that is to be processed before the current - module. - -
- Syntax - - <dependency>OtherModule</dependency> -
- -
- Attributes - - None. -
- -
- Content - - Name of module. -
- -
- Children - - None. -
-
- -
- Directory element - - A directory element specifies the name of a subdirectory. - -
- Syntax - - <directory name="MyDirectory"> - ... -</directory> -
- -
- Attributes - - - - name - - - Name of directory. - - - -
- -
- Content - - None. -
- -
- Parents - - directory, if, project. -
- -
- Children - - cdfile, directory, file, if, pch, property. -
-
- -
- File element - - A file element specifies the name of a file that is to be - processed. - -
- Syntax - - <file>MyFile.c</file> -
- -
- Attributes - - None. -
- -
- Content - - Name of file. -
- -
- Parents - - directory, module. -
- -
- Children - - None. -
-
- -
- Group element - - A group element's purpose is grouping subelements. - -
- Syntax - - <group> - <file>i386-dis.c</file> - <file>kdb_help.S</file> - <file>longjmp.S</file> - <file>setjmp.S</file> -</group> -
- -
- Attributes - - None. -
- -
- Content - - None. -
- -
- Parents - - if. -
- -
- Children - - file. -
-
- -
- If element - - An if element allows for conditional processing of other - elements. - -
- Syntax - - <if property="DBG" value="1"> - ... -</if> -
- -
- Attributes - - - - property - - - Name of the property that is to be evaluated. - - - - - value - - - Value to compare to the value of the property. If the - property has the specified value, then the subelements are - processed. - - - -
- -
- Content - - None. -
- -
- Parents - - project, directory. -
- -
- Children - - compilerflag, - define, directory, file, if, include, property. -
-
- -
- Importlibrary element - - An importlibrary element specifies that an import library should - be generated which other modules can use to link with the current - module. - -
- Syntax - - <importlibrary definition="MyModule.def" /> -
- -
- Attributes - - - - definition - - - Filename of definition file - (.def) used to generate the import - library. The filename is relative to the current - module. - - - -
- -
- Content - - None. -
- -
- Parents - - module. -
- -
- Children - - None. -
-
- -
- Include element - - An include element specifies an include directory for the C/C++ - compiler and resource compiler. - -
- Syntax - - <include base="MyLibraryModule">include</include> -
- -
- Attributes - - - - base - - - Module or project which the value of this element is - relative to. This attribute is optional. If left out, the - include directory is relative to the position of the - top-level XML build file. - - - -
- -
- Content - - Relative include directory. -
- -
- Parents - - project, module. -
- -
- Children - - None. -
-
- -
- Input element - - An input element specifies a group of filenames that is to be - passed as parameters to a build tool. Input filename parameters are - located after output filename parameters on the command line. - -
- Syntax - - <input> - ... -</input> -
- -
- Attributes - - None. -
- -
- Content - - None. -
- -
- Parents - - invoke. -
- -
- Children - - inputfile. -
-
- -
- Inputfile element - - An inputfile element specifies a filename that is to be passed - as a parameter to a build tool. - -
- Syntax - - <inputfile>ntoskrnl.mc</inputfile> -
- -
- Attributes - - - - switches - - - Switches that is passed as parameters just before the - filename. This attribute is optional. - - - -
- -
- Content - - Name of file that is to be passed as a parameter to the build - tool. -
- -
- Parents - - input. -
- -
- Children - - None. -
-
- -
- Installfile element - - An installfile element specifies the name of a file that is to - be installed when using 'make install'. - -
- Syntax - - <installfile base="reactos" newname="ReadMe.txt">ReadMe.txt</installfile> -
- -
- Attributes - - - - base - - - Put file in this directory within the install - directory. This attribute is optional. - - - - - newname - - - Name of file within the install directory. This - attribute is optional. - - - -
- -
- Content - - Name of file. -
- -
- Children - - None. -
-
- -
- Invoke element - - An invoke element specifies the name of a module which is to be - executed before the current module is processed. - -
- Syntax - - <invoke module="wmc"> - <input> - <inputfile>ntoskrnl.mc</inputfile> - </input> - <output> - <outputfile switches="-H">../include/reactos/bugcodes.h</outputfile> - <outputfile switches="-o">bugcodes.rc</outputfile> - </output> -</invoke> -
- -
- Attributes - - - - module - - - Name of the module to execute. - - - -
- -
- Content - - None. -
- -
- Children - - input, output. -
-
- -
- Library element - - A library element specifies the name of another module which is - to be linked with the current module. - -
- Syntax - - <library>MyLibraryModule</library> -
- -
- Attributes - - None.section -
- -
- Parents - - module. -
- -
- Children - - None. -
-
- -
- Linkerflag element - - A likerflag element specifies flags to be passed to the linker - tool. - -
- Syntax - - <linkerflag>-lgcc</linkerflag> -
- -
- Attributes - - None. -
- -
- Content - - The switches to pass to the linker. -
- -
- Parents - - module. -
- -
- Children - - None. -
-
- -
- Module element - - There can be zero or more modules per XML build file. - -
- Syntax - - <module if="${MP}" ifnot="${MP}" name="msvcrt" type="win32dll" extension=".dll" entrypoint="_DllMain@12" baseaddress="0x70000000" mangledsymbols="true" installbase="system32" installname="msvcrt.dll" usewrc="false" allowwarnings="true" aliasof="module1"> - ... -</module> -
- -
- Attributes - - - - if - - - If the value is 1, then the module is enabled, - otherwise it is disabled. A disabled module is not - processed. - - - - - ifnot - - - If the value is 1, then the module is disabled, - otherwise it is enabled. A disabled module is not - processed. - - - - - name - - - Name of the module. Also the base name of the - generated file if such file is generated for the particular - module type. - - - - - type - - - Type of module. See below for an explanation of module - types. The module type determines the - actions that is to be carried out to process the module. The - defined module types are seen - below: - - - Module Types - - - - - Value - - Output name suffix - - Entrypoint - - Baseaddress - - Mangledsymbols - - Description - - - - - - buildtool - - - - - .exe (Windows) - - none (Linux) - - - - - - - - - - - - - - Builds a tool that can be run (invoked) when - building ReactOS. - - - - staticlibrary - - .a - - - - - - - - - - - Builds a static library containing object - files that can be linked together with other - modules. - - - - objectlibrary - - .o - - - - - - - - - - - Builds object files that can be linked - together with other modules. - - - - kernel - - .exe - - _NtProcessStartup - - - - - - - - Builds - ntoskrnl.exe. - - - - kernelmodedll - - .dll - - _DriverEntry@8 - - - - - - - - Builds a kernel-mode DLL. - - - - kernelmodedriver - - .sys - - _DriverEntry@8 - - - - - - - - Builds a kernel-mode driver. - - - - nativecui - - .exe - - _NtProcessStartup - - - - - - - - Build a native NT/ROS program (no enviroment - subsystem required to run). - - - - nativedll - - .dll - - _DllMainCRTStartup@12 - - - - - - - - Builds a native DLL. - - - - win32dll - - .dll - - _DllMain@12 - - - - - - - - Builds a Win32 DLL. - - - - win32cui - - .exe - - _mainCRTStartup - - - - - - - - Builds a Win32 console executable. - - - - win32gui - - .exe - - _WinMainCRTStartup - - - - - - - - Builds a Win32 GUI executable. - - - - bootloader - - - - - - - - - - - - - - Builds a bootloader. - - - - bootsector - - - - - - - - - - - - - - Builds one or more bootsector - binaries. - - - - iso - - - - - - - - - - - -. - - Builds a bootable CD. - - - - test - - .exe - - _mainCRTStartup - - - - - - - - Builds a testsuite. - - - - rpcserver - - .o - - - - - - - - - - - Generates and builds server code for an RPC - interface. - - - - rpcclient - - .o - - - - - - - - - - - Generates and builds client code for an RPC - interface. - - - - alias - - - - - - - - - - - - - - Module is an alias for another module. This - module type is the only module type for which the - aliasof attribute is applicable. Only the module - install functionality is aliased. - - - -
-
-
- - - extension - - - Extension of the generated file if such file is - generated for the particular module type. - - - - - entrypoint - - - Entrypoint symbol of the generated file if such file - is generated for the particular module type. - - - - - baseaddress - - - Base address of the generated file if such file is - generated for the particular module type. - - - - - mangledsymbols - - - Controls wether or not to pass --kill-at to dlltool. - If this attribute has the value false then --kill-at is - passed to dlltool. If the value is true, then --kill-at is - not passed to dlltool. If the generated file exports C++ - classes then this need to be true. - - - - - installbase - - - Base directory of the generated file in the - installation directory. This attribute is optional. - - - - - installname - - - Name of generated file in the installation directory. - This attribute is optional, but if not specified, the - generated file is not copied to the installation - directory. - - - - - usewrc - - - Use WRC to compile resources if true. If false, - windres is used. This attribute is optional. If not - specified, WRC will be used. - - - - - allowwarnings - - - Error out if false and at least one warning is emitted - during building of this module. This attribute is optional. - If not specified, it is assumed to be false. - - - - - aliasof - - - Name of module that is aliased. - - -
-
- -
- Content - - None. -
- -
- Parents - - project, directory. -
- -
- Children - - bootstrap, component, define, dependency, directory, file, if, importlibrary, include, invoke, library, linkerflag, property. -
-
- -
- Output element - - An output element specifies a group of filenames that is to be - passed as parameters to a build tool. Output filename parameters are - located before input filename parameters on the command line. - -
- Syntax - - <output> - ... -</output> -
- -
- Attributes - - None. -
- -
- Content - - None. -
- -
- Parents - - invoke -
- -
- Children - - outputfile. -
-
- -
- Outputfile element - - An outputfile element specifies a filename that is to be passed - as a parameter to a build tool. - -
- Syntax - - <outputfile switches="-H">../include/reactos/bugcodes.h</outputfile> -
- -
- Attributes - - - - switches - - - Switches that are passed as parameters just before the - filename. This attribute is optional. - - - -
- -
- Content - - Name of file that is to be passed as a parameter to the build - tool. -
- -
- Parents - - output. -
- -
- Children - - None. -
-
- -
- Pch element - - A pch element specifies a GCC precompiled header file. - -
- Syntax - - <pch>ntdll.h</pch> -
- -
- Attributes - - None. -
- -
- Content - - Name of the include file to be precompiled. -
- -
- Parents - - directory. -
- -
- Children - - None. -
-
- -
- Project element - - There can be one project per - top-level XML build file. A project can only be defined in a top-level - XML build file. - -
- Syntax - - <project name="ReactOS" makefile="Makefile.auto" xmlns:xi="http://www.w3.org/2001/XInclude"> - ... -</project> -
- -
- Attributes - - - - name - - - Name of the project. - - - - - makefile - - - Filename of the GNU makefile that is to be - created. - - - -
- -
- Content - - None. -
- -
- Parents - - None. This is the top-level (root) element of - ReactOS.rbuild file. -
- -
- Children - - define, directory, if, include, module, property. -
-
- -
- Property element - - A property element specifies the name and value of a property - that can be used for conditional processing of the XML build - file. - -
- Syntax - - <property name="mypropertyname" value="mypropertyvalue" /> -
- -
- Attributes - - - - name - - - Name of property. - - - - - value - - - Value of property. - - - -
- -
- Content - - None. -
- -
- Parents - - -
- -
- Children - - None. -
-
- -
- Symbol element - - A symbol element specifies an imported function from a library - that is to be stubbed so tests can be run without actually calling the - function in the library. - -
- Syntax - - <symbol newname="RtlAllocateHeap">HeapAlloc@12</symbol> -
- -
- Attributes - - - - newname - - - New name of symbol. This attribute is optional. - - - -
- -
- Content - - Name of symbol. -
- -
- Children - - None. -
-
-
-
- - - Bibliography - - <ulink - url="http://www.w3.org/TR/2004/REC-xml-20040204/">Extensible Markup - Language (XML) 1.0 (Third Edition)</ulink>W3C - Recommendation - François - - Yergeau - - Tim - - Bray - - Jean - - Paoli - - C. M. - - Sperberg-McQueen - - Eve - - Maler - 4th February 2004 - - <ulink - url="http://www.w3.org/TR/2004/REC-xinclude-20041220/">XML Inclusions - (XInclude) Version 1.0 </ulink>W3C - Recommendation - Jonathan - - Marsh - - - Microsoft - - - jmarsh@microsoft.com - - David - - Orchard - - - BEA Systems - - - dorchard@bea.com - 20 December 2004 - -
\ No newline at end of file diff --git a/reactos/tools/rbuild/doc/rbuild.txt b/reactos/tools/rbuild/doc/rbuild.txt deleted file mode 100644 index ffe0a711a12..00000000000 --- a/reactos/tools/rbuild/doc/rbuild.txt +++ /dev/null @@ -1,538 +0,0 @@ -ReactOS Build System Documentation -================================== - -Building ReactOS ----------------- -To generate GNU make makefiles and building ReactOS do the following: - - 1) Go to the top-level reactos directory - 2) Run the command: mingw32-make - -This will start building ReactOS. - -To build a bootable CD run the following command: - - mingw32-make bootcd - -This will create ReactOS.iso in the top-level reactos directory. - - -Top-level XML Build File ------------------------- -The top-level xml build file (ReactOS.rbuild) is processed by rbuild. The following is an example of how it could look like: - - - - - - - - - - - - - - - - - include - - - - - - - - - - -xi:include ----------- -It is possible to split an xml build file over several files. The include element in the xi namespace is used to accomplish this. - -Syntax: - - - - - - -Attributes: - href - Name of xml build file to include. The filename is relative to the location of the current xml build file. - -Value: - None. - -Elements: - xi:fallback - - -xi:fallback ------------ -This element is used to provide the name of an alternate file that is to be included if the first include file did not exists. - -Attributes: - None. - -Value: - None. - -Elements: - xi:include. - - -Project element ---------------- -There can be one project per top-level XML build file. A project can only be defined in a top-level xml build file. - -Syntax: - - ... - - -Attributes: - name - Name of the project. - makefile - Filename of the GNU makefile that is to be created. - -Value: - None. - -Elements: - define, directory, if, include, module, property - - -Module element --------------- -There can be zero or more modules per xml build file. - -Syntax: - - ... - - -Attributes: - if - If the value is 1, then the module is enabled, otherwise it is disabled. A disabled module is not processed. - ifnot - If the value is 1, then the module is disabled, otherwise it is enabled. A disabled module is not processed. - name - Name of the module. Also the base name of the generated file if such file is generated for the particular module type. - type - Type of module. See below for an explanation of module types. - extension - Extension of the generated file if such file is generated for the particular module type. - entrypoint - Entrypoint symbol of the generated file if such file is generated for the particular module type. - baseaddress - Base address of the generated file if such file is generated for the particular module type. - mangledsymbols - Controls wether or not to pass --kill-at to dlltool. If this attribute has the value false then --kill-at is passed to dlltool. If the value is true, then --kill-at is not passed to dlltool. If the generated file exports C++ classes then this need to be true. - installbase - Base directory of the generated file in the installation directory. This attribute is optional. - installname - Name of generated file in the installation directory. This attribute is optional, but if not specified, the generated file is not copied to the installation directory. - usewrc - Use WRC to compile resources if true. If false, windres is used. This attribute is optional. If not specified, WRC will be used. - allowwarnings - Error out if false and at least one warning is emitted during building of this module. This attribute is optional. If not specified, it is assumed to be false. - aliasof - Name of module that is aliased. -Value: - None. - -Elements: - autoregister, bootstrap, component, compilationunit, define, dependency, directory, file, if, importlibrary, include, invoke, library, linkerscript, property. - - -Module types ------------- -The module type determines the actions that is to be carried out to process the module. The defined module types are seen below: - buildtool - Builds a tool that can be run (invoked) when building ReactOS. Default extension is .exe when building on Windows and nothing when building on Linux. The entrypoint, baseaddress, and mangledsymbols module attributes are not applicable for this module type. - staticlibrary - Builds a static library containing object files that can be linked together with other modules. Default extension is .a. The entrypoint, baseaddress, and mangledsymbols module attributes are not applicable for this module type. - objectlibrary - Builds object files that can be linked together with other modules. Default extension is .o. The entrypoint, baseaddress, and mangledsymbols module attributes are not applicable for this module type. - kernel - Builds ntoskrnl.exe. Default extension is .exe. Default entrypoint is _NtProcessStartup. - kernelmodedll - Builds a kernel-mode DLL. Default extension is .dll. Default entrypoint is _DriverEntry@8. - kernelmodedriver - Builds a kernel-mode driver. Default extension is .sys. Default entrypoint is _DriverEntry@8. - nativedll - Builds a native DLL. Default extension is .dll. Default entrypoint is _DllMainCRTStartup@12. - win32dll - Builds a Win32 DLL. Default extension is .dll. Default entrypoint is _DllMain@12. - win32cui - Builds a Win32 console executable. Default extension is .exe. Default entrypoint is _mainCRTStartup. The baseaddress module attribute is not applicable for this module type. - win32gui - Builds a Win32 GUI executable. Default extension is .exe. Default entrypoint is _WinMainCRTStartup. The baseaddress module attribute is not applicable for this module type. - bootloader - Builds a bootloader. The entrypoint, baseaddress, and mangledsymbols module attributes are not applicable for this module type. - bootsector - Builds one or more bootsector binaries. The entrypoint, baseaddress, and mangledsymbols module attributes are not applicable for this module type. - iso - Builds a bootable CD. The entrypoint, baseaddress, and mangledsymbols module attributes are not applicable for this module type. - test - Builds a testsuite. Default extension is .exe. Default entrypoint is _mainCRTStartup. The baseaddress module attribute is not applicable for this module type. - rpcserver - Generates and builds server code for an RPC interface. Default extension is .o. The entrypoint, baseaddress, and mangledsymbols module attributes are not applicable for this module type. - rpcclient - Generates and builds client code for an RPC interface. Default extension is .o. The entrypoint, baseaddress, and mangledsymbols module attributes are not applicable for this module type. - alias - Module is an alias for another module. This module type is the only module type for which the aliasof attribute is applicable. Only the module install functionality is aliased. - - -Autoregister element --------------------- -An autoregister element specifies that the generated executable should be registered in the registry during second stage setup. - -Syntax: - - -Attributes: - infsection - Name of section in syssetup.inf. - type - Type of registration. Can be either DllRegisterServer, DllInstall, or Both. - -Value: - None. - -Elements: - None. - - -Bootstrap element ------------------ -A bootstrap element specifies that the generated file should be put on the bootable CD as a bootstrap file. - -Syntax: - - -Attributes: - installbase - Put file in this directory on the bootable CD. This attribute is optional. - nameoncd - Name of file on the bootable CD. This attribute is optional. - -Value: - None. - -Elements: - None. - - -CDFile element --------------- -A cdfile element specifies the name of a file that is to be put on the bootable CD. - -Syntax: - ReadMe.txt - -Attributes: - installbase - Put file in this directory on the bootable CD. This attribute is optional. - nameoncd - Name of file on the bootable CD. This attribute is optional. - -Value: - Name of file. - -Elements: - None. - - -CompilationUnit element ------------------------ -A compilationunit element specifies that one or more source code files are to be compiled as a single compilation unit. - -Syntax: - - ... - - -Attributes: - name - Name of generated source code file. - -Value: - None. - -Elements: - directory, file, if. - - -Component element ------------------ -A component element specifies that imports from a library are to be stubbed so tests can be run without actually calling the functions in the library. This element can only be used for modules of type test. - -Syntax: - - ... - - -Attributes: - name - Name of library. - -Value: - None. - -Elements: - Symbol. - - -Symbol element --------------- -A symbol element specifies an imported function from a library that is to be stubbed so tests can be run without actually calling the function in the library. - -Syntax: - HeapAlloc@12 - -Attributes: - newname - New name of symbol. This attribute is optional. - -Value: - Name of symbol. - -Elements: - None. - - -Define element --------------- -A define element specifies the name and (optionally) value of a define for the C/C++ compiler and resource compiler. - -Syntax: - 0x501 - -Attributes: - name - Name of define. - -Value: - Value of define. The value is optional. - -Elements: - None. - - -Dependency element ------------------- -A dependency element specifies the name of a module (usually of type buildtool) that is to be processed before the current module. - -Syntax: - OtherModule - -Attributes: - None. - -Value: - Name of module. - -Elements: - None. - - -Directory element ------------------ -A directory element specifies the name of a subdirectory. - -Syntax: - - ... - - -Attributes: - name - Name of directory. - -Value: - None. - -Elements: - cdfile, directory, file, if, property. - - -File element ------------- -A file element specifies the name of a file that is to be processed. - -Syntax: - MyFile.c - -Attributes: - None. - -Value: - Name of file. - -Elements: - None. - - -If element ----------- -An if element allows for conditional processing of other elements. - -Syntax: - - ... - - -Attributes: - property - Name of the property that is to be evaluated. - value - Value to compare to the value of the property. If the property has the specified value, then the subelements are processed. - -Value: - None. - -Elements: - compilationunit, compilerflag, define, directory, file, if, include, property. - - -Importlibrary element ---------------------- -An importlibrary element specifies that an import library should be generated which other modules can use to link with the current module. - -Syntax: - - -Attributes: - definition - Filename of definition file (.def) used to generate the import library. The filename is relative to the current module. - -Value: - None. - -Elements: - None. - - -Include element ---------------- -An include element specifies an include directory for the C/C++ compiler and resource compiler. - -Syntax: - include - -Attributes: - base - Module or project which the value of this element is relative to. This attribute is optional. If left out, the include directory is relative to the position of the top-level xml build file. - -Value: - Relative include directory. - -Elements: - None. - - -Installfile element -------------------- -An installfile element specifies the name of a file that is to be installed when using 'make install'. - -Syntax: - ReadMe.txt - -Attributes: - installbase - Put file in this directory within the install directory. This attribute is optional. - newname - Name of file within the install directory. This attribute is optional. - -Value: - Name of file. - -Elements: - None. - - -Invoke element --------------- -An invoke element specifies the name of a module which is to be executed before the current module is processed. - -Syntax: - - - ntoskrnl.mc - - - ../include/reactos/bugcodes.h - bugcodes.rc - - - -Attributes: - None. - -Value: - Name of the module to execute. - -Elements: - input, output. - - -Input element -------------- -An input element specifies a group of filenames that is to be passed as parameters to a build tool. Input filename parameters are located after output filename parameters on the command line. - -Attributes: - None. - -Value: - None. - -Elements: - inputfile. - - -Inputfile element ------------------ -An inputfile element specifies a filename that is to be passed as a parameter to a build tool. - -Attributes: - switches - Switches that is passed as parameters just before the filename. This attribute is optional. - -Value: - Name of file that is to be passed as a parameter to the build tool. - -Elements: - None. - - -Output element --------------- -An output element specifies a group of filenames that is to be passed as parameters to a build tool. Output filename parameters are located before input filename parameters on the command line. - -Attributes: - None. - -Value: - None. - -Elements: - outputfile. - - -Outputfile element ------------------- -An outputfile element specifies a filename that is to be passed as a parameter to a build tool. - -Attributes: - switches - Switches that is passed as parameters just before the filename. This attribute is optional. - -Value: - Name of file that is to be passed as a parameter to the build tool. - -Elements: - None. - - -Library -------- -An importlibrary element specifies the name of another module which is to be linked with the current module. - -Syntax: - MyLibraryModule - -Attributes: - None. - -Value: - Name of the module to link with. - -Elements: - None. - - -Linkerscript ------------- -A linkerscript element specifies the filename of a binutils linker script. - -Syntax: - MyLinkerScript - -Attributes: - base - Module which the value of this element is relative to. This attribute is optional. If left out, the linker script is relative to the position of the top-level xml build file. - -Value: - Relative linker script filename. - -Elements: - None. - - -Property --------- -A property element specifies the name and value of a property that can be used for conditional processing of the xml build file. - -Syntax: - - -Attributes: - name - Name of property. - value - Value of property. - -Value: - None. - -Elements: - None. diff --git a/reactos/tools/rbuild/empty.def b/reactos/tools/rbuild/empty.def deleted file mode 100644 index aabd2247c04..00000000000 --- a/reactos/tools/rbuild/empty.def +++ /dev/null @@ -1 +0,0 @@ -EXPORTS diff --git a/reactos/tools/rbuild/exception.cpp b/reactos/tools/rbuild/exception.cpp deleted file mode 100644 index 4c6f4611842..00000000000 --- a/reactos/tools/rbuild/exception.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "pch.h" -#include "rbuild.h" - -using std::string; - -Exception::Exception () -{ -} - -Exception::Exception ( const string& message ) -{ - _e = message; -} - -Exception::Exception ( const char* format, ...) -{ - va_list args; - va_start ( args, format); - _e = ssvprintf ( format, args); - va_end ( args ); -} - -void Exception::SetMessage ( const char* format, ...) -{ - va_list args; - va_start ( args, format); - _e = ssvprintf ( format, args); - va_end ( args ); -} - -void Exception::SetMessageV ( const char* message, va_list args ) -{ - _e = ssvprintf ( message, args); -} - - -MissingArgumentException::MissingArgumentException ( const string& argument ) - : Exception ( "Argument '%s' is missing", - argument.c_str () ) -{ -} - - -OutOfMemoryException::OutOfMemoryException () - : Exception ( "Out of memory" ) -{ -} - - -InvalidOperationException::InvalidOperationException ( - const char* filename, - const int linenumber ) - : Exception ( "%s:%d", filename, linenumber ) -{ -} - -InvalidDateException::InvalidDateException ( const string& filename) - : Exception ( "File '%s' has an invalid date.", - filename.c_str() ) -{ - Filename = filename; -} - -InvalidOperationException::InvalidOperationException ( - const char* filename, - const int linenumber, - const char* message, - ... ) -{ - string errorMessage; - va_list args; - va_start ( args, message ); - errorMessage = ssvprintf ( message, args ); - va_end ( args ); - SetMessage ( - "%s:%d %s", - filename, - linenumber, - errorMessage.c_str () ); -} - - -FileNotFoundException::FileNotFoundException ( const string& filename ) - : Exception ( "File '%s' not found.", - filename.c_str() ) -{ - Filename = filename; -} - - -AccessDeniedException::AccessDeniedException ( const string& filename) - : Exception ( "Access denied to file or directory '%s'.", - filename.c_str() ) -{ - Filename = filename; -} - - -RequiredAttributeNotFoundException::RequiredAttributeNotFoundException ( - const string& location, - const string& attributeName, - const string& elementName ) - : XMLInvalidBuildFileException ( - location, - "Required attribute '%s' not found on '%s'.", - attributeName.c_str (), - elementName.c_str ()) -{ -} - -InvalidAttributeValueException::InvalidAttributeValueException ( - const string& location, - const string& name, - const string& value ) - : XMLInvalidBuildFileException ( - location, - "Attribute '%s' has an invalid value '%s'.", - name.c_str (), - value.c_str () ) -{ - -} - -BackendNameConflictException::BackendNameConflictException ( const string& name ) - : Exception ( "Backend name conflict: '%s'", - name.c_str() ) -{ -} - - -UnknownBackendException::UnknownBackendException ( const string& name ) - : Exception ( "Unknown Backend requested: '%s'", - name.c_str() ) -{ -} - - -UnknownModuleTypeException::UnknownModuleTypeException ( const string& location, - int moduletype ) - : XMLInvalidBuildFileException ( - location, - "module type requested: %i", - moduletype ) -{ -} - - -InvocationFailedException::InvocationFailedException ( const std::string& command, - int exitcode ) - : Exception ( "Failed to execute '%s' (exit code %d)", - command.c_str (), - exitcode ) -{ - Command = command; - ExitCode = exitcode; -} - - -UnsupportedBuildToolException::UnsupportedBuildToolException ( const std::string& buildTool, - const std::string& version ) - : Exception ( "Build tool '%s' with version '%s' is unsupported. Please upgrade your build tool.", - buildTool.c_str (), - version.c_str () ) -{ - BuildTool = buildTool; - Version = version; -} diff --git a/reactos/tools/rbuild/exception.h b/reactos/tools/rbuild/exception.h deleted file mode 100644 index c09528553f5..00000000000 --- a/reactos/tools/rbuild/exception.h +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 - -#include "pch.h" -#include "xml.h" - -class Exception -{ -public: - Exception ( const std::string& message ); - Exception ( const char* format, - ...); - const std::string& operator *() { return _e; } - -protected: - Exception (); - void SetMessage ( const char* message, ... ); - void SetMessageV ( const char* message, va_list args ); - -private: - std::string _e; -}; - - -class MissingArgumentException : public Exception -{ -public: - MissingArgumentException ( const std::string& argument ); -}; - - -class InvalidOperationException : public Exception -{ -public: - InvalidOperationException ( const char* filename, - const int linenumber); - InvalidOperationException ( const char* filename, - const int linenumber, - const char* message, - ... ); -}; - - -class OutOfMemoryException : public Exception -{ -public: - OutOfMemoryException (); -}; - - -class FileNotFoundException : public Exception -{ -public: - FileNotFoundException ( const std::string& filename ); - std::string Filename; -}; - - -class AccessDeniedException : public Exception -{ -public: - AccessDeniedException ( const std::string& filename ); - std::string Filename; -}; - -class InvalidDateException : public Exception -{ -public: - InvalidDateException ( const std::string& filename ); - std::string Filename; -}; - -class RequiredAttributeNotFoundException : public XMLInvalidBuildFileException -{ -public: - RequiredAttributeNotFoundException ( const std::string& location, - const std::string& attributeName, - const std::string& elementName ); -}; - - -class InvalidAttributeValueException : public XMLInvalidBuildFileException -{ -public: - InvalidAttributeValueException ( const std::string& location, - const std::string& name, - const std::string& value ); -}; - - -class BackendNameConflictException : public Exception -{ -public: - BackendNameConflictException ( const std::string& name ); -}; - - -class UnknownBackendException : public Exception -{ -public: - UnknownBackendException ( const std::string& name ); -}; - -class UnknownModuleTypeException : public XMLInvalidBuildFileException -{ -public: - UnknownModuleTypeException ( const std::string& location, - int moduletype ); -}; - - -class InvocationFailedException : public Exception -{ -public: - InvocationFailedException ( const std::string& command, - int exitcode ); - std::string Command; - int ExitCode; -}; - - -class UnsupportedBuildToolException : public Exception -{ -public: - UnsupportedBuildToolException ( const std::string& buildtool, - const std::string& version ); - std::string BuildTool; - std::string Version; -}; diff --git a/reactos/tools/rbuild/filesupportcode.cpp b/reactos/tools/rbuild/filesupportcode.cpp deleted file mode 100644 index f247ad908f6..00000000000 --- a/reactos/tools/rbuild/filesupportcode.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "pch.h" -#include - -#include "rbuild.h" - -using std::string; - -/* static */ void -FileSupportCode::WriteIfChanged ( char* outbuf, - const string& filename, - bool ignoreError ) -{ - FILE* out; - unsigned int end; - char* cmpbuf; - unsigned int stat; - - out = fopen ( filename.c_str (), "rb" ); - if ( out == NULL ) - { - out = fopen ( filename.c_str (), "wb" ); - if ( out == NULL ) - { - if ( ignoreError ) - return; - throw AccessDeniedException ( filename ); - } - fputs ( outbuf, out ); - fclose ( out ); - return; - } - - fseek ( out, 0, SEEK_END ); - end = ftell ( out ); - cmpbuf = (char*) malloc ( end ); - if ( cmpbuf == NULL ) - { - fclose ( out ); - throw OutOfMemoryException (); - } - - fseek ( out, 0, SEEK_SET ); - stat = fread ( cmpbuf, 1, end, out ); - if ( stat != end ) - { - free ( cmpbuf ); - fclose ( out ); - throw AccessDeniedException ( filename ); - } - if ( end == strlen ( outbuf ) && memcmp ( cmpbuf, outbuf, end ) == 0 ) - { - free ( cmpbuf ); - fclose ( out ); - return; - } - - free ( cmpbuf ); - fclose ( out ); - out = fopen ( filename.c_str (), "wb" ); - if ( out == NULL ) - { - throw AccessDeniedException ( filename ); - } - - stat = fwrite ( outbuf, 1, strlen ( outbuf ), out); - if ( strlen ( outbuf ) != stat ) - { - fclose ( out ); - throw AccessDeniedException ( filename ); - } - - fclose ( out ); -} diff --git a/reactos/tools/rbuild/global.cpp b/reactos/tools/rbuild/global.cpp deleted file mode 100644 index 088cf14c0ee..00000000000 --- a/reactos/tools/rbuild/global.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "rbuild.h" - -using std::string; -using std::vector; - -string ExePrefix; -string ExePostfix; -string sSep; -string sBadSep; -char cSep; -char cBadSep; - - -void -InitializeEnvironment () -{ - char *SepValue, *ExePostfixValue, *ExePrefixValue; - - SepValue = getenv ( "SEP" ); - if ( SepValue && ( 0 == strcmp ( SepValue, DEF_SSEP ) || 0 == strcmp ( SepValue, DEF_SBAD_SEP ) ) ) - { - cSep = SepValue[0]; - sSep = SepValue; - } - else - { - cSep = DEF_CSEP; - sSep = DEF_SSEP; - } - if ( cSep == DEF_CSEP ) - { - cBadSep = DEF_CBAD_SEP; - sBadSep = DEF_SBAD_SEP; - } - else - { - cBadSep = DEF_CSEP; - sBadSep = DEF_SSEP; - } - ExePostfixValue = getenv ( "EXEPOSTFIX" ); - ExePrefixValue = getenv ( "EXEPREFIX" ); - if ( ( ExePostfixValue == NULL || 0 == strlen ( ExePostfixValue ) ) && - ( ExePrefixValue == NULL || 0 == strlen ( ExePrefixValue ) ) ) - { - ExePostfix = DEF_EXEPOSTFIX; - ExePrefix = DEF_EXEPREFIX; - } - else - { - ExePostfix = ExePostfixValue ? ExePostfixValue : ""; - ExePrefix = ExePrefixValue ? ExePrefixValue : ""; - } -} diff --git a/reactos/tools/rbuild/include.cpp b/reactos/tools/rbuild/include.cpp deleted file mode 100644 index 699f8e4e332..00000000000 --- a/reactos/tools/rbuild/include.cpp +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "pch.h" -#include - -#include "rbuild.h" - -using std::string; -using std::vector; - -Include::Include ( const Project& project, - const XMLElement* includeNode ) - : directory ( NULL ), - project ( project ), - node ( includeNode ), - module ( NULL ) -{ - Initialize (); -} - -Include::Include ( const Project& project, - const XMLElement* includeNode, - const Module* module ) - : directory ( NULL ), - project ( project ), - node ( includeNode ), - module ( module ) -{ - Initialize (); -} - -Include::Include ( const Project& project, - DirectoryLocation root, - const std::string& relative_path ) - : project ( project ), - node ( NULL ) -{ - directory = new FileLocation ( root, relative_path, "" ); -} - -Include::~Include() -{ - if ( directory ) - delete directory; -} - -void -Include::ProcessXML () -{ - DirectoryLocation root = SourceDirectory; - const Module *base = module; - - string relative_path; - const XMLAttribute* att = node->GetAttribute ( "base", false ); - if ( att ) - { - if ( !module ) - throw XMLInvalidBuildFileException ( - node->location, - "'base' attribute illegal from global " ); - - if ( att->value == project.name ) - base = NULL; - else - { - base = project.LocateModule ( att->value ); - if ( !base ) - throw XMLInvalidBuildFileException ( - node->location, - " attribute 'base' references non-existant project or module '%s'", - att->value.c_str() ); - root = GetDefaultDirectoryTree ( base ); - } - } - - if ( base ) - { - relative_path = base->output->relative_path; - if ( node->value.length () > 0 && node->value != "." ) - relative_path += sSep + node->value; - } - else - relative_path = node->value; - - att = node->GetAttribute ( "root", false ); - if ( att ) - { - if ( att->value == "intermediate" ) - root = IntermediateDirectory; - else if ( att->value == "output" ) - root = OutputDirectory; - else - throw InvalidAttributeValueException ( node->location, - "root", - att->value ); - } - - directory = new FileLocation ( root, - relative_path, - "", - node ); -} - -DirectoryLocation -Include::GetDefaultDirectoryTree ( const Module* module ) const -{ - if ( module != NULL && - ( module->type == RpcServer || - module->type == RpcClient || - module->type == RpcProxy || - module->type == IdlHeader || - module->type == IdlInterface) ) - return IntermediateDirectory; - else - return SourceDirectory; -} - -void -Include::Initialize () -{ - ParseCompilers ( *node, "cpp" ); -} diff --git a/reactos/tools/rbuild/installfile.cpp b/reactos/tools/rbuild/installfile.cpp deleted file mode 100644 index 0083340b7b7..00000000000 --- a/reactos/tools/rbuild/installfile.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "pch.h" -#include - -#include "rbuild.h" - -using std::string; - -InstallFile::~InstallFile() -{ - delete source; - delete target; -} - -InstallFile::InstallFile ( const Project& project, - const XMLElement& installfileNode, - const string& path ) - : XmlNode(project, installfileNode ) -{ - const XMLAttribute* base = node.GetAttribute ( "installbase", false ); - const XMLAttribute* newname = node.GetAttribute ( "newname", false ); - - DirectoryLocation source_directory = SourceDirectory; - const XMLAttribute* att = node.GetAttribute ( "root", false ); - if ( att != NULL) - { - if ( att->value == "intermediate" ) - source_directory = IntermediateDirectory; - else if ( att->value == "output" ) - source_directory = OutputDirectory; - else - { - throw InvalidAttributeValueException ( - node.location, - "root", - att->value ); - } - } - - source = new FileLocation ( source_directory, - path, - node.value, - &node ); - target = new FileLocation ( InstallDirectory, - base && base->value != "." - ? base->value - : "", - newname - ? newname->value - : node.value, - &node ); -} diff --git a/reactos/tools/rbuild/linkerflag.cpp b/reactos/tools/rbuild/linkerflag.cpp deleted file mode 100644 index a949401b1c6..00000000000 --- a/reactos/tools/rbuild/linkerflag.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "pch.h" -#include - -#include "rbuild.h" - -using std::string; -using std::vector; - -LinkerFlag::LinkerFlag ( const Project& project_, - const XMLElement& linkerFlagNode ) - : project(project_), - module(NULL), - node(linkerFlagNode) -{ - Initialize(); -} - -LinkerFlag::LinkerFlag ( const Project& project_, - const Module* module_, - const XMLElement& linkerFlagNode ) - : project(project_), - module(module_), - node(linkerFlagNode) -{ - Initialize(); -} - -LinkerFlag::~LinkerFlag () -{ -} - -void -LinkerFlag::Initialize () -{ -} - -void -LinkerFlag::ProcessXML () -{ - if ( node.value.size () == 0 ) - { - throw XMLInvalidBuildFileException ( - node.location, - " is empty." ); - } - flag = node.value; -} diff --git a/reactos/tools/rbuild/linkerscript.cpp b/reactos/tools/rbuild/linkerscript.cpp deleted file mode 100644 index 26b84d09c16..00000000000 --- a/reactos/tools/rbuild/linkerscript.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "pch.h" -#include - -#include "rbuild.h" - -LinkerScript::LinkerScript ( const XMLElement& node_, - const Module& module_, - const FileLocation *file_ ) - : node(node_), module(module_), file(file_) -{ -} - -LinkerScript::~LinkerScript () -{ - delete file; -} - -void -LinkerScript::ProcessXML() -{ -} diff --git a/reactos/tools/rbuild/makefile b/reactos/tools/rbuild/makefile deleted file mode 100644 index 58ea26d26e8..00000000000 --- a/reactos/tools/rbuild/makefile +++ /dev/null @@ -1,3 +0,0 @@ -TOP = ../.. -DEFAULT = rbuild -include $(TOP)/proxy.mak diff --git a/reactos/tools/rbuild/module.cpp b/reactos/tools/rbuild/module.cpp deleted file mode 100644 index f050640e68c..00000000000 --- a/reactos/tools/rbuild/module.cpp +++ /dev/null @@ -1,1981 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * Copyright (C) 2008 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. - */ -#include "pch.h" -#include - -#include "rbuild.h" - -using std::string; -using std::vector; - -string -Right ( const string& s, size_t n ) -{ - if ( n > s.size() ) - return s; - return string ( &s[s.size()-n] ); -} - -string -Replace ( const string& s, const string& find, const string& with ) -{ - string ret; - const char* p = s.c_str(); - while ( p ) - { - const char* p2 = strstr ( p, find.c_str() ); - if ( !p2 ) - break; - if ( p2 > p ) - ret += string ( p, p2-p ); - ret += with; - p = p2 + find.size(); - } - if ( *p ) - ret += p; - return ret; -} - -string -ChangeSeparator ( const string& s, - const char fromSeparator, - const char toSeparator ) -{ - string s2(s); - char* p = strchr ( &s2[0], fromSeparator ); - while ( p ) - { - *p++ = toSeparator; - p = strchr ( p, fromSeparator ); - } - return s2; -} - -string -FixSeparator ( const string& s ) -{ - return ChangeSeparator ( s, cBadSep, cSep ); -} - -string -FixSeparatorForSystemCommand ( const string& s ) -{ - string s2(s); - char* p = strchr ( &s2[0], DEF_CBAD_SEP ); - while ( p ) - { - *p++ = DEF_CSEP; - p = strchr ( p, DEF_CBAD_SEP ); - } - return s2; -} - -string -DosSeparator ( const string& s ) -{ - string s2(s); - char* p = strchr ( &s2[0], '/' ); - while ( p ) - { - *p++ = '\\'; - p = strchr ( p, '/' ); - } - return s2; -} - -string -ReplaceExtension ( - const string& filename, - const string& newExtension ) -{ - size_t index = filename.find_last_of ( '/' ); - if ( index == string::npos ) - index = 0; - size_t index2 = filename.find_last_of ( '\\' ); - if ( index2 != string::npos && index2 > index ) - index = index2; - string tmp = filename.substr( index /*, filename.size() - index*/ ); - size_t ext_index = tmp.find_last_of( '.' ); - if ( ext_index != string::npos ) - return filename.substr ( 0, index + ext_index ) + newExtension; - return filename + newExtension; -} - -string -GetSubPath ( - const Project& project, - const string& location, - const string& path, - const string& att_value ) -{ - if ( !att_value.size() ) - throw XMLInvalidBuildFileException ( - location, - " tag has empty 'name' attribute" ); - if ( strpbrk ( att_value.c_str (), "/\\?*:<>|" ) ) - throw XMLInvalidBuildFileException ( - location, - " tag has invalid characters in 'name' attribute" ); - if ( !path.size() ) - return att_value; - - return FixSeparator(path + cSep + att_value); -} - -string -GetExtension ( const string& filename ) -{ - size_t index = filename.find_last_of ( '/' ); - if (index == string::npos) index = 0; - string tmp = filename.substr( index, filename.size() - index ); - size_t ext_index = tmp.find_last_of( '.' ); - if (ext_index != string::npos) - return filename.substr ( index + ext_index, filename.size() ); - return ""; -} - -string -GetExtension ( const FileLocation& file ) -{ - return GetExtension ( file.name ); -} - -string -NormalizeFilename ( const string& filename ) -{ - if ( filename == "" ) - return ""; - Path path; - string normalizedPath = path.Fixup ( filename, true ); - string relativeNormalizedPath = path.RelativeFromWorkingDirectory ( normalizedPath ); - return FixSeparator ( relativeNormalizedPath ); -} - -bool -GetBooleanValue ( const string& value ) -{ - if ( value == "1" ) - return true; - else - return false; -} - -string -ToLower ( string filename ) -{ - for ( size_t i = 1; i < filename.length (); i++ ) - filename[i] = tolower ( filename[i] ); - return filename; -} - -IfableData::IfableData( ) - : asmFiles ( 0 ) -{ -} - -void IfableData::ExtractModules( std::map &modules ) -{ - size_t i; - for ( i = 0; i < this->modules.size (); i++ ) - modules.insert(std::make_pair(this->modules[i]->name, this->modules[i])); -} - -IfableData::~IfableData() -{ - size_t i; - for ( i = 0; i < includes.size (); i++ ) - delete includes[i]; - for ( i = 0; i < defines.size (); i++ ) - delete defines[i]; - for ( i = 0; i < libraries.size (); i++ ) - delete libraries[i]; - for ( std::map::const_iterator p = properties.begin(); p != properties.end(); ++ p ) - delete p->second; - for ( i = 0; i < compilerFlags.size (); i++ ) - delete compilerFlags[i]; - for ( i = 0; i < modules.size(); i++ ) - delete modules[i]; - for ( i = 0; i < compilationUnits.size (); i++ ) - delete compilationUnits[i]; -} - -void IfableData::ProcessXML () -{ - size_t i; - for ( i = 0; i < includes.size (); i++ ) - includes[i]->ProcessXML (); - for ( i = 0; i < defines.size (); i++ ) - defines[i]->ProcessXML (); - for ( i = 0; i < libraries.size (); i++ ) - libraries[i]->ProcessXML (); - for ( std::map::const_iterator p = properties.begin(); p != properties.end(); ++ p ) - p->second->ProcessXML (); - for ( i = 0; i < compilerFlags.size(); i++ ) - compilerFlags[i]->ProcessXML (); - for ( i = 0; i < compilationUnits.size (); i++ ) - compilationUnits[i]->ProcessXML (); -} - -bool Module::GetBooleanAttribute ( const XMLElement& moduleNode, const char * name, bool default_value ) -{ - const XMLAttribute* att = moduleNode.GetAttribute ( name, false ); - if ( att != NULL ) - { - const char* p = att->value.c_str(); - if ( !stricmp ( p, "true" ) || !stricmp ( p, "yes" ) ) - return true; - else if ( !stricmp ( p, "false" ) || !stricmp ( p, "no" ) ) - return false; - else - { - throw InvalidAttributeValueException ( - moduleNode.location, - name, - att->value ); - } - } - else - return default_value; -} - -Module::Module ( const Project& project, - const XMLElement& moduleNode, - const string& modulePath ) - : project (project), - node (moduleNode), - importLibrary (NULL), - delayImportLibrary (NULL), - metadata (NULL), - bootSector (NULL), - bootstrap (NULL), - autoRegister(NULL), - linkerScript (NULL), - pch (NULL), - cplusplus (false), - output (NULL), - install (NULL) -{ - if ( node.name != "module" ) - throw InvalidOperationException ( __FILE__, - __LINE__, - "Module created with non- node" ); - - xmlbuildFile = FixSeparator ( Path::RelativeFromWorkingDirectory ( moduleNode.xmlFile->filename () ) ); - - const XMLAttribute* att = moduleNode.GetAttribute ( "name", true ); - assert(att); - name = att->value; - - enabled = true; - - att = moduleNode.GetAttribute ( "if", false ); - if ( att != NULL ) - enabled = GetBooleanValue ( project.ResolveProperties ( att->value ) ); - - att = moduleNode.GetAttribute ( "ifnot", false ); - if ( att != NULL ) - enabled = !GetBooleanValue ( project.ResolveProperties ( att->value ) ); - - if ( !enabled && project.configuration.Verbose ) - printf("Module '%s' has been disabled.\n", name.c_str () ); - - att = moduleNode.GetAttribute ( "type", true ); - assert(att); - type = GetModuleType ( node.location, *att ); - - att = moduleNode.GetAttribute ( "extension", false ); - if ( att != NULL ) - extension = att->value; - else - extension = GetDefaultModuleExtension (); - - isUnicode = GetBooleanAttribute ( moduleNode, "unicode" ); - - if (isUnicode) - { - // Always define UNICODE and _UNICODE - Define* pDefine = new Define ( project, this, "UNICODE" ); - non_if_data.defines.push_back ( pDefine ); - - pDefine = new Define ( project, this, "_UNICODE" ); - non_if_data.defines.push_back ( pDefine ); - } - - att = moduleNode.GetAttribute ( "entrypoint", false ); - if ( att != NULL ) - { - if ( att->value == "" ) - { - throw InvalidAttributeValueException ( - moduleNode.location, - "entrypoint", - att->value ); - } - - entrypoint = att->value; - isDefaultEntryPoint = false; - } - else - { - entrypoint = GetDefaultModuleEntrypoint (); - isDefaultEntryPoint = true; - } - - att = moduleNode.GetAttribute ( "baseaddress", false ); - if ( att != NULL ) - baseaddress = att->value; - else - baseaddress = GetDefaultModuleBaseaddress (); - - isStartupLib = GetBooleanAttribute ( moduleNode, "isstartuplib" ); - isCRT = GetBooleanAttribute ( moduleNode, "iscrt", GetDefaultModuleIsCRT () ); - - att = moduleNode.GetAttribute ( "crt", false ); - if ( att != NULL) - { - CRT = att->value; - - if ( stricmp ( CRT.c_str (), "auto" ) == 0 ) - CRT = GetDefaultModuleCRT (); - } - else - CRT = GetDefaultModuleCRT (); - - const char * crtAttr = CRT.c_str (); - if ( crtAttr == NULL || stricmp ( crtAttr, "none" ) == 0 ) - dynamicCRT = false; - else if ( stricmp ( crtAttr, "libc" ) == 0 ) - dynamicCRT = false; - else if ( stricmp ( crtAttr, "msvcrt" ) == 0 ) - dynamicCRT = true; - else if ( stricmp ( crtAttr, "libcntpr" ) == 0 ) - dynamicCRT = false; - else if ( stricmp ( crtAttr, "ntdll" ) == 0 ) - dynamicCRT = true; - else if ( stricmp ( crtAttr, "static" ) == 0 ) - dynamicCRT = false; - else if ( stricmp ( crtAttr, "dll" ) == 0 ) - dynamicCRT = true; - else - { - throw InvalidAttributeValueException ( - moduleNode.location, - "crt", - std::string ( crtAttr ) ); - } - - if ( isCRT && dynamicCRT ) - { - throw XMLInvalidBuildFileException ( - moduleNode.location, - "C runtime module '%s' cannot be compiled for a dynamically-linked C runtime", - name.c_str() ); - } - - att = moduleNode.GetAttribute ( "prefix", false ); - if ( att != NULL ) - prefix = att->value; - - att = moduleNode.GetAttribute ( "installname", false ); - if ( att != NULL ) - { - const XMLAttribute* installbase = moduleNode.GetAttribute ( "installbase", false ); - install = new FileLocation ( InstallDirectory, - installbase ? installbase->value : "", - att->value, - &moduleNode ); - - output = new FileLocation ( GetTargetDirectoryTree (), - modulePath, - att->value, - &moduleNode ); - } - - att = moduleNode.GetAttribute ( "output", false ); - if ( att != NULL ) - { - if (output != NULL) - { - printf ( "%s: WARNING: 'installname' overrides 'output' also defined for this module.\n", - moduleNode.location.c_str() ); - } - else - { - output = new FileLocation ( GetTargetDirectoryTree (), - modulePath, - att->value, - &moduleNode ); - } - } - - /* If no one has set the output file for this module set it automatically */ - if (output == NULL) - { - output = new FileLocation ( GetTargetDirectoryTree (), - modulePath, - name + extension, - &moduleNode ); - } - - att = moduleNode.GetAttribute ( "allowwarnings", false ); - if ( att == NULL ) - { - att = moduleNode.GetAttribute ( "warnings", false ); - if ( att != NULL ) - { - printf ( "%s: WARNING: 'warnings' attribute of is deprecated, use 'allowwarnings' instead\n", - moduleNode.location.c_str() ); - } - } - if ( att != NULL ) - allowWarnings = att->value == "true"; - else if ( project.allowWarningsSet ) - allowWarnings = project.allowWarnings; - else - allowWarnings = false; - - att = moduleNode.GetAttribute ( "aliasof", false ); - if ( type == Alias && att != NULL ) - aliasedModuleName = att->value; - else - aliasedModuleName = ""; - - if ( type == BootProgram ) - { - att = moduleNode.GetAttribute ( "payload", true ); - payload = att->value; - } - - if ( type == BootProgram || type == ElfExecutable ) - { - att = moduleNode.GetAttribute ( "buildtype", false ); - if ( att != NULL ) - { - buildtype = att->value; - } - else - { - buildtype = "BOOTPROG"; - } - } - - att = moduleNode.GetAttribute ( "description", false ); - if (att != NULL ) - { - description = project.ResolveProperties(att->value); - } - else - description = ""; - - att = moduleNode.GetAttribute ( "lcid", false ); - if (type == KeyboardLayout && att != NULL ) - lcid = att->value; - else - lcid = ""; - - att = moduleNode.GetAttribute ( "layoutid", false ); - if (type == KeyboardLayout && att != NULL ) - layoutId = att->value; - else - layoutId = ""; - - att = moduleNode.GetAttribute ( "layoutnameresid", false ); - if (type == KeyboardLayout && att != NULL ) - layoutNameResId = att->value; - else - layoutNameResId = ""; - - SetImportLibrary ( NULL ); -} - -Module::~Module () -{ - size_t i; - for ( i = 0; i < invocations.size(); i++ ) - delete invocations[i]; - for ( i = 0; i < dependencies.size(); i++ ) - delete dependencies[i]; - for ( i = 0; i < compilerFlags.size(); i++ ) - delete compilerFlags[i]; - for ( i = 0; i < linkerFlags.size(); i++ ) - delete linkerFlags[i]; - for ( i = 0; i < stubbedComponents.size(); i++ ) - delete stubbedComponents[i]; - for ( i = 0; i < cdfiles.size (); i++ ) - delete cdfiles[i]; - if ( linkerScript ) - delete linkerScript; - if ( pch ) - delete pch; - if ( install ) - delete install; - if ( metadata ) - delete metadata; - if ( bootstrap ) - delete bootstrap; - if ( importLibrary ) - delete importLibrary; - if ( bootSector ) - delete bootSector; - if ( dependency ) - delete dependency; - if ( autoRegister ) - delete autoRegister; - if ( output ) - delete output; -} - -void -Module::ProcessXML() -{ - if ( type == Alias ) - { - aliasedModuleName = project.ResolveProperties ( aliasedModuleName ); - if ( aliasedModuleName == name ) - { - throw XMLInvalidBuildFileException ( - node.location, - "module '%s' cannot link against itself", - name.c_str() ); - } - const Module* m = project.LocateModule ( aliasedModuleName ); - if ( !m && enabled ) - { - throw XMLInvalidBuildFileException ( - node.location, - "module '%s' trying to alias non-existant module '%s'", - name.c_str(), - aliasedModuleName.c_str() ); - } - } - - size_t i; - for ( i = 0; i < node.subElements.size(); i++ ) - { - ParseContext parseContext; - ProcessXMLSubElement ( *node.subElements[i], SourceDirectory, output->relative_path, parseContext ); - } - for ( i = 0; i < invocations.size(); i++ ) - invocations[i]->ProcessXML (); - for ( i = 0; i < dependencies.size(); i++ ) - dependencies[i]->ProcessXML (); - for ( i = 0; i < compilerFlags.size(); i++ ) - compilerFlags[i]->ProcessXML(); - for ( i = 0; i < linkerFlags.size(); i++ ) - linkerFlags[i]->ProcessXML(); - for ( i = 0; i < stubbedComponents.size(); i++ ) - stubbedComponents[i]->ProcessXML(); - non_if_data.ProcessXML(); - if ( linkerScript ) - linkerScript->ProcessXML(); - if ( pch ) - pch->ProcessXML(); - if ( autoRegister ) - autoRegister->ProcessXML(); -} - -void -Module::ProcessXMLSubElement ( const XMLElement& e, - DirectoryLocation directory, - const string& relative_path, - ParseContext& parseContext ) -{ - const XMLAttribute* att; - - att = e.GetAttribute ( "compilerset", false ); - - if ( att ) - { - CompilerSet compilerSet; - - if ( att->value == "msc" ) - compilerSet = MicrosoftC; - else if ( att->value == "gcc" ) - compilerSet = GnuGcc; - else - throw InvalidAttributeValueException ( - e.location, - "compilerset", - att->value ); - - if ( compilerSet != project.configuration.Compiler ) - return; - } - - att = e.GetAttribute ( "linkerset", false ); - - if ( att ) - { - LinkerSet linkerSet; - - if ( att->value == "mslink" ) - linkerSet = MicrosoftLink; - else if ( att->value == "ld" ) - linkerSet = GnuLd; - else - throw InvalidAttributeValueException ( - e.location, - "linkerset", - att->value ); - - if ( linkerSet != project.configuration.Linker ) - return; - } - - CompilationUnit* pOldCompilationUnit = parseContext.compilationUnit; - bool subs_invalid = false; - string subpath ( relative_path ); - DirectoryLocation subdirectory = SourceDirectory; - if ( e.name == "file" && e.value.size () > 0 ) - { - bool first = false; - const XMLAttribute* att = e.GetAttribute ( "first", false ); - if ( att != NULL ) - { - if ( !stricmp ( att->value.c_str(), "true" ) ) - first = true; - else if ( stricmp ( att->value.c_str(), "false" ) ) - { - throw XMLInvalidBuildFileException ( - e.location, - "attribute 'first' of element can only be 'true' or 'false'" ); - } - } - string switches = ""; - att = e.GetAttribute ( "switches", false ); - if ( att != NULL ) - switches = att->value; - if ( !cplusplus ) - { - // check for c++ file - string ext = GetExtension ( e.value ); - if ( !stricmp ( ext.c_str(), ".cpp" ) ) - cplusplus = true; - else if ( !stricmp ( ext.c_str(), ".cc" ) ) - cplusplus = true; - else if ( !stricmp ( ext.c_str(), ".cxx" ) ) - cplusplus = true; - } - File* pFile = new File ( directory, - relative_path, - e.value, - first, - switches, - false ); - if ( parseContext.compilationUnit ) - parseContext.compilationUnit->AddFile ( pFile ); - else - { - CompilationUnit* pCompilationUnit = new CompilationUnit ( pFile ); - string ext = ToLower ( GetExtension ( e.value ) ); - if ( ext == ".idl" ) - { - // put .idl files at the start of the module - non_if_data.compilationUnits.insert ( - non_if_data.compilationUnits.begin(), - pCompilationUnit ); - } - else if ( ext == ".asm" || ext == ".s" ) - { - // put .asm files at the end of the module - non_if_data.compilationUnits.push_back ( pCompilationUnit ); - non_if_data.asmFiles++; - } - else - { - // put other files in the middle - non_if_data.compilationUnits.insert ( - non_if_data.compilationUnits.end() - non_if_data.asmFiles, - pCompilationUnit ); - } - } - non_if_data.files.push_back ( pFile ); - subs_invalid = true; - } - else if ( e.name == "library" && e.value.size () ) - { - const XMLAttribute* att = e.GetAttribute ( "delayimport", false ); - Library* pLibrary = new Library ( e, *this, e.value ); - if ( att && !stricmp ( att->value.c_str(), "true" ) ) - pLibrary->delayimp = true; - non_if_data.libraries.push_back ( pLibrary ); - subs_invalid = true; - } - else if ( e.name == "directory" ) - { - const XMLAttribute* att = e.GetAttribute ( "name", true ); - const XMLAttribute* root = e.GetAttribute ( "root", false ); - assert(att); - if ( root ) - { - if ( root->value == "intermediate" ) - subdirectory = IntermediateDirectory; - else if ( root->value == "output" ) - subdirectory = OutputDirectory; - else - { - throw InvalidAttributeValueException ( - e.location, - "root", - root->value ); - } - } - subpath = GetSubPath ( this->project, e.location, relative_path, att->value ); - } - else if ( e.name == "include" ) - { - Include* include = new Include ( project, &e, this ); - non_if_data.includes.push_back ( include ); - subs_invalid = true; - } - else if ( e.name == "define" || e.name == "redefine" ) - { - Define* pDefine = new Define ( project, this, e ); - non_if_data.defines.push_back ( pDefine ); - subs_invalid = true; - } - else if ( e.name == "metadata" ) - { - metadata = new Metadata ( e, *this ); - subs_invalid = false; - } - else if ( e.name == "invoke" ) - { - invocations.push_back ( new Invoke ( e, *this ) ); - subs_invalid = false; - } - else if ( e.name == "dependency" ) - { - dependencies.push_back ( new Dependency ( e, *this ) ); - subs_invalid = true; - } - else if ( e.name == "bootsector" ) - { - bootSector = new Bootsector ( e, this ); - subs_invalid = true; - } - else if ( e.name == "importlibrary" ) - { - if ( importLibrary ) - { - throw XMLInvalidBuildFileException ( - e.location, - "Only one is valid per module" ); - } - SetImportLibrary ( new ImportLibrary ( project, e, this, false ) ); - SetDelayImportLibrary ( new ImportLibrary ( project, e, this, true ) ); - subs_invalid = true; - } - else if ( e.name == "if" || e.name == "ifnot" ) - { - const XMLAttribute* name; - name = e.GetAttribute ( "property", true ); - assert( name ); - const Property *property = project.LookupProperty( name->value ); - const string *PropertyValue; - const string EmptyString; - - if (property) - { - PropertyValue = &property->value; - } - else - { - // Property does not exist, treat it as being empty - PropertyValue = &EmptyString; - } - - const XMLAttribute* value; - value = e.GetAttribute ( "value", true ); - assert( value ); - - bool negate = ( e.name == "ifnot" ); - bool equality = ( *PropertyValue == value->value ); - if ( equality == negate ) - { - // Failed, skip this element - if ( project.configuration.Verbose ) - printf("Skipping 'If' at %s\n", e.location.c_str () ); - return; - } - subs_invalid = false; - } - else if ( e.name == "compilerflag" ) - { - CompilerFlag* pCompilerFlag = new CompilerFlag ( project, this, e ); - non_if_data.compilerFlags.push_back ( pCompilerFlag ); - subs_invalid = true; - } - else if ( e.name == "linkerflag" ) - { - linkerFlags.push_back ( new LinkerFlag ( project, this, e ) ); - subs_invalid = true; - } - else if ( e.name == "linkerscript" ) - { - if ( linkerScript ) - { - throw XMLInvalidBuildFileException ( - e.location, - "Only one is valid per module" ); - } - size_t pos = e.value.find_last_of ( "/\\" ); - if ( pos == string::npos ) - { - linkerScript = new LinkerScript ( - e, *this, new FileLocation ( SourceDirectory, relative_path, e.value, &e ) ); - } - else - { - string dir = e.value.substr ( 0, pos ); - string name = e.value.substr ( pos + 1); - linkerScript = new LinkerScript ( - e, *this, new FileLocation ( SourceDirectory, relative_path + sSep + dir, name, &e ) ); - } - subs_invalid = true; - } - else if ( e.name == "component" ) - { - stubbedComponents.push_back ( new StubbedComponent ( this, e ) ); - subs_invalid = false; - } - else if ( e.name == "property" ) - { - throw XMLInvalidBuildFileException ( - e.location, - " is not a valid sub-element of " ); - } - else if ( e.name == "bootstrap" ) - { - bootstrap = new Bootstrap ( project, this, e ); - subs_invalid = true; - } - else if ( e.name == "pch" ) - { - if ( pch ) - { - throw XMLInvalidBuildFileException ( - e.location, - "Only one is valid per module" ); - } - size_t pos = e.value.find_last_of ( "/\\" ); - if ( pos == string::npos ) - { - pch = new PchFile ( - e, *this, new FileLocation ( SourceDirectory, relative_path, e.value, &e ) ); - } - else - { - string dir = e.value.substr ( 0, pos ); - string name = e.value.substr ( pos + 1); - pch = new PchFile ( - e, *this, new FileLocation ( SourceDirectory, relative_path + sSep + dir, name, &e ) ); - } - subs_invalid = true; - } - else if ( e.name == "compilationunit" ) - { - if ( project.configuration.CompilationUnitsEnabled ) - { - CompilationUnit* pCompilationUnit = new CompilationUnit ( &project, this, &e ); - non_if_data.compilationUnits.push_back ( pCompilationUnit ); - parseContext.compilationUnit = pCompilationUnit; - } - subs_invalid = false; - } - else if ( e.name == "autoregister" ) - { - if ( autoRegister != NULL) - { - throw XMLInvalidBuildFileException ( - e.location, - "there can be only one <%s> element for a module", - e.name.c_str() ); - } - autoRegister = new AutoRegister ( project, this, e ); - subs_invalid = true; - } - else if ( e.name == "cdfile" ) - { - CDFile* cdfile = new CDFile ( project, e, subpath ); - cdfiles.push_back ( cdfile ); - subs_invalid = true; - } - if ( subs_invalid && e.subElements.size() > 0 ) - { - throw XMLInvalidBuildFileException ( - e.location, - "<%s> cannot have sub-elements", - e.name.c_str() ); - } - for ( size_t i = 0; i < cdfiles.size (); i++ ) - cdfiles[i]->ProcessXML (); - for ( size_t i = 0; i < e.subElements.size (); i++ ) - ProcessXMLSubElement ( *e.subElements[i], subdirectory, subpath, parseContext ); - parseContext.compilationUnit = pOldCompilationUnit; -} - -ModuleType -Module::GetModuleType ( const string& location, const XMLAttribute& attribute ) -{ - if ( attribute.value == "buildtool" ) - return BuildTool; - if ( attribute.value == "staticlibrary" ) - return StaticLibrary; - if ( attribute.value == "hoststaticlibrary" ) - return HostStaticLibrary; - if ( attribute.value == "objectlibrary" ) - return ObjectLibrary; - if ( attribute.value == "kernel" ) - return Kernel; - if ( attribute.value == "kernelmodedll" ) - return KernelModeDLL; - if ( attribute.value == "kernelmodedriver" ) - return KernelModeDriver; - if ( attribute.value == "nativedll" ) - return NativeDLL; - if ( attribute.value == "nativecui" ) - return NativeCUI; - if ( attribute.value == "keyboardlayout" ) - return KeyboardLayout; - if ( attribute.value == "win32dll" ) - return Win32DLL; - if ( attribute.value == "win32ocx" ) - return Win32OCX; - if ( attribute.value == "win32cui" ) - return Win32CUI; - if ( attribute.value == "win32gui" ) - return Win32GUI; - if ( attribute.value == "win32scr" ) - return Win32SCR; - if ( attribute.value == "bootloader" ) - return BootLoader; - if ( attribute.value == "bootsector" ) - return BootSector; - if ( attribute.value == "bootprogram" ) - return BootProgram; - if ( attribute.value == "iso" ) - return Iso; - if ( attribute.value == "liveiso" ) - return LiveIso; - if ( attribute.value == "test" ) - return Test; - if ( attribute.value == "rpcserver" ) - return RpcServer; - if ( attribute.value == "rpcclient" ) - return RpcClient; - if ( attribute.value == "rpcproxy" ) - return RpcProxy; - if ( attribute.value == "alias" ) - return Alias; - if ( attribute.value == "idlheader" ) - return IdlHeader; - if ( attribute.value == "idlinterface" ) - return IdlInterface; - if ( attribute.value == "embeddedtypelib" ) - return EmbeddedTypeLib; - if ( attribute.value == "elfexecutable" ) - return ElfExecutable; - if ( attribute.value == "cabinet" ) - return Cabinet; - if ( attribute.value == "messageheader" ) - return MessageHeader; - throw InvalidAttributeValueException ( location, - attribute.name, - attribute.value ); -} - -DirectoryLocation -Module::GetTargetDirectoryTree () const -{ - switch ( type ) - { - case Kernel: - case KernelModeDLL: - case KeyboardLayout: - case NativeDLL: - case Win32DLL: - case Win32OCX: - case KernelModeDriver: - case NativeCUI: - case Win32CUI: - case Test: - case Win32SCR: - case Win32GUI: - case BuildTool: - case BootLoader: - case BootSector: - case BootProgram: - case Iso: - case LiveIso: - case ElfExecutable: - case Cabinet: - return OutputDirectory; - case EmbeddedTypeLib: - case StaticLibrary: - case HostStaticLibrary: - case ObjectLibrary: - case RpcServer: - case RpcClient: - case RpcProxy: - case Alias: - case IdlHeader: - case IdlInterface: - case MessageHeader: - return IntermediateDirectory; - case TypeDontCare: - break; - } - throw InvalidOperationException ( __FILE__, - __LINE__, - "Invalid module type %d.", - type ); -} - -string -Module::GetDefaultModuleExtension () const -{ - switch (type) - { - case BuildTool: - return ExePostfix; - case BootProgram: - case StaticLibrary: - case HostStaticLibrary: - return ".a"; - case ObjectLibrary: - return ".o"; - case Kernel: - case NativeCUI: - case Win32CUI: - case Win32GUI: - return ".exe"; - case Win32SCR: - return ".scr"; - - case KernelModeDLL: - case NativeDLL: - case KeyboardLayout: - case Win32DLL: - return ".dll"; - case Win32OCX: - return ".ocx"; - case KernelModeDriver: - case BootLoader: - return ".sys"; - case Cabinet: - return ".cab"; - case BootSector: - return ".o"; - case Iso: - case LiveIso: - return ".iso"; - case Test: - return ".exe"; - case RpcServer: - case RpcClient: - case RpcProxy: - case IdlInterface: - return ".o"; - case Alias: - case ElfExecutable: - case IdlHeader: - case MessageHeader: - return ""; - case EmbeddedTypeLib: - return ".tlb"; - case TypeDontCare: - break; - } - throw InvalidOperationException ( __FILE__, - __LINE__ ); -} - -string -Module::GetDefaultModuleEntrypoint () const -{ - switch ( type ) - { - case Kernel: - if (Environment::GetArch() == "i386") return "KiSystemStartup@4"; - return "KiSystemStartup"; - case KeyboardLayout: - case KernelModeDLL: - case KernelModeDriver: - if (Environment::GetArch() == "i386") return "DriverEntry@8"; - return "DriverEntry"; - case NativeDLL: - if (Environment::GetArch() == "i386") return "DllMainCRTStartup@12"; - return "DllMainCRTStartup"; - case NativeCUI: - if (Environment::GetArch() == "i386") return "NtProcessStartup@4"; - return "NtProcessStartup"; - case Win32DLL: - case Win32OCX: - if (Environment::GetArch() == "i386") return "DllMain@12"; - return "DllMain"; - case Win32CUI: - case Test: - case BootLoader: - return "mainCRTStartup"; - case Win32SCR: - case Win32GUI: - return "WinMainCRTStartup"; - case BuildTool: - case StaticLibrary: - case HostStaticLibrary: - case ObjectLibrary: - case BootSector: - case Iso: - case LiveIso: - case RpcServer: - case RpcClient: - case RpcProxy: - case Alias: - case BootProgram: - case IdlHeader: - case IdlInterface: - case MessageHeader: - case ElfExecutable: - case EmbeddedTypeLib: - case Cabinet: - return ""; - case TypeDontCare: - break; - } - throw InvalidOperationException ( __FILE__, - __LINE__ ); -} - -string -Module::GetDefaultModuleBaseaddress () const -{ - switch ( type ) - { - case Kernel: - return "0x80800000"; - case Win32DLL: - case Win32OCX: - return "0x10000000"; - case NativeDLL: - case NativeCUI: - case Win32CUI: - case Test: - return "0x00400000"; - case Win32SCR: - case Win32GUI: - return "0x00400000"; - case KeyboardLayout: - case KernelModeDLL: - case KernelModeDriver: - return "0x00010000"; - case ElfExecutable: - return "0xe00000"; - case BootLoader: - return "0x8000"; - case BuildTool: - case StaticLibrary: - case HostStaticLibrary: - case ObjectLibrary: - case BootSector: - case Iso: - case LiveIso: - case RpcServer: - case RpcClient: - case RpcProxy: - case Alias: - case BootProgram: - case IdlHeader: - case IdlInterface: - case MessageHeader: - case EmbeddedTypeLib: - case Cabinet: - return ""; - case TypeDontCare: - break; - } - throw InvalidOperationException ( __FILE__, - __LINE__ ); -} - -std::string -Module::GetDefaultModuleCRT () const -{ - if ( isCRT ) - return "static"; - - switch ( type ) - { - case Kernel: - return "static"; - case Win32DLL: - case Win32OCX: - return "msvcrt"; - case NativeDLL: - case NativeCUI: - return "ntdll"; - case Win32CUI: - case Win32SCR: - case Win32GUI: - return "msvcrt"; - case Test: - return "msvcrt"; // BUGBUG: not sure about this - case KeyboardLayout: - return "none"; - case KernelModeDLL: - case KernelModeDriver: - return "dll"; - case BootLoader: - return "libcntpr"; - case ElfExecutable: - case BuildTool: - case StaticLibrary: - case HostStaticLibrary: - case ObjectLibrary: - case BootSector: - case Iso: - case LiveIso: - case RpcServer: - case RpcClient: - case RpcProxy: - case Alias: - case BootProgram: - case IdlHeader: - case IdlInterface: - case MessageHeader: - case EmbeddedTypeLib: - case Cabinet: - case TypeDontCare: - return "none"; - } - throw InvalidOperationException ( __FILE__, - __LINE__ ); -} - -bool -Module::GetDefaultModuleIsCRT () const -{ - return type == Kernel; -} - -bool -Module::HasImportLibrary () const -{ - return importLibrary != NULL && type != StaticLibrary && type != HostStaticLibrary; -} - -bool -Module::IsDLL () const -{ - switch ( type ) - { - case Kernel: - case KernelModeDLL: - case NativeDLL: - case KeyboardLayout: - case Win32DLL: - case Win32OCX: - case KernelModeDriver: - return true; - case NativeCUI: - case Win32CUI: - case Test: - case Win32SCR: - case Win32GUI: - case BuildTool: - case StaticLibrary: - case HostStaticLibrary: - case ObjectLibrary: - case BootLoader: - case BootSector: - case BootProgram: - case Iso: - case LiveIso: - case RpcServer: - case RpcClient: - case RpcProxy: - case Alias: - case IdlHeader: - case IdlInterface: - case MessageHeader: - case EmbeddedTypeLib: - case ElfExecutable: - case Cabinet: - return false; - case TypeDontCare: - break; - } - throw InvalidOperationException ( __FILE__, - __LINE__ ); -} - -string -Module::GetPathWithPrefix ( const string& prefix ) const -{ - return output->relative_path + cSep + prefix + output->name; -} - -string -Module::GetPathToBaseDir () const -{ - string temp_path = output->relative_path; - string result = "..\\"; - while(temp_path.find ('\\') != string::npos) - { - temp_path.erase (0, temp_path.find('\\')+1); - result += "..\\"; - } - return result; -} - -string -Module::GetInvocationTarget ( const int index ) const -{ - return ssprintf ( "%s_invoke_%d", - name.c_str (), - index ); -} - -string -Module::GetEntryPoint() const -{ - string result = ""; - if (entrypoint == "0" || entrypoint == "0x0") - return "0"; - - if (Environment::GetArch() != "arm" && Environment::GetArch() != "amd64") - result = "_"; - - result += entrypoint; - - if (Environment::GetArch() == "amd64") - { - size_t at_index = result.find_last_of( '@' ); - if ( at_index != result.npos ) - return result.substr (0, at_index ); - } - - return result; -} - -bool -Module::HasFileWithExtension ( - const IfableData& data, - const std::string& extension ) const -{ - size_t i; - for ( i = 0; i < data.compilationUnits.size (); i++ ) - { - CompilationUnit* compilationUnit = data.compilationUnits[i]; - if ( compilationUnit->HasFileWithExtension ( extension ) ) - return true; - } - return false; -} - -void -Module::InvokeModule () const -{ - for ( size_t i = 0; i < invocations.size (); i++ ) - { - Invoke& invoke = *invocations[i]; - string command = FixSeparatorForSystemCommand(invoke.invokeModule->output->relative_path + "/" + invoke.invokeModule->output->name ) + " " + invoke.GetParameters (); - printf ( "Executing '%s'\n\n", command.c_str () ); - int exitcode = system ( command.c_str () ); - if ( exitcode != 0 ) - throw InvocationFailedException ( command, - exitcode ); - } -} - - -void -Module::SetImportLibrary ( ImportLibrary* importLibrary ) -{ - this->importLibrary = importLibrary; - dependency = new FileLocation ( HasImportLibrary () ? IntermediateDirectory : output->directory, - output->relative_path, - HasImportLibrary () ? "lib" + name + ".a" : output->name ); -} - -void -Module::SetDelayImportLibrary ( ImportLibrary* importLibrary ) -{ - this->delayImportLibrary = importLibrary; -} - -std::string -Module::GetDllName () const -{ - if ( importLibrary && !importLibrary->dllname.empty() ) - return importLibrary->dllname; - else if ( output ) - return output->name; - else - throw new InvalidOperationException ( __FILE__, __LINE__, "Module %s has no dllname." ); -} - -SpecFileType -Module::IsSpecDefinitionFile () const -{ - if(!importLibrary) - return None; - - std::string ext = GetExtension ( *importLibrary->source ); - - if ( ext == ".spec" ) - return Spec; - - if ( ext == ".pspec" ) - return PSpec; - - return None; -} - - -File::File ( DirectoryLocation directory, - const string& relative_path, - const string& name, - bool _first, - const string& _switches, - bool _isPreCompiledHeader ) - : file ( directory, relative_path, name ), - first(_first), - switches(_switches), - isPreCompiledHeader(_isPreCompiledHeader) -{ -} - - -void -File::ProcessXML() -{ -} - - -std::string File::GetFullPath () const -{ - string directory ( "" ); - switch ( file.directory ) - { - case SourceDirectory: - break; - case IntermediateDirectory: - directory = Environment::GetIntermediatePath () + sSep; - break; - default: - throw InvalidOperationException ( __FILE__, - __LINE__, - "Invalid directory %d.", - file.directory ); - } - - if ( file.relative_path.length () > 0 ) - directory += file.relative_path + sSep; - - - return directory + file.name; -} - - -Library::Library ( const XMLElement& _node, - const Module& _module, - const string& _name ) - : node(&_node), - module(_module), - name(_name), - importedModule(_module.project.LocateModule(_name)), - delayimp(false) -{ - if ( module.name == name ) - { - throw XMLInvalidBuildFileException ( - node->location, - "module '%s' cannot link against itself", - name.c_str() ); - } - if ( !importedModule ) - { - throw XMLInvalidBuildFileException ( - node->location, - "module '%s' trying to import non-existant module '%s'", - module.name.c_str(), - name.c_str() ); - } -} - -Library::Library ( const Module& _module, - const string& _name ) - : node(NULL), - module(_module), - name(_name), - importedModule(_module.project.LocateModule(_name)), - delayimp(false) -{ - if ( !importedModule ) - { - throw XMLInvalidBuildFileException ( - "", - "module '%s' trying to import non-existant module '%s'", - module.name.c_str(), - name.c_str() ); - } -} - -void -Library::ProcessXML() -{ - if ( node && !module.project.LocateModule ( name ) ) - { - throw XMLInvalidBuildFileException ( - node->location, - "module '%s' is trying to link against non-existant module '%s'", - module.name.c_str(), - name.c_str() ); - } -} - - -Invoke::Invoke ( const XMLElement& _node, - const Module& _module ) - : node (_node), - module (_module) -{ -} - -void -Invoke::ProcessXML() -{ - const XMLAttribute* att = node.GetAttribute ( "module", false ); - if (att == NULL) - invokeModule = &module; - else - { - invokeModule = module.project.LocateModule ( att->value ); - if ( invokeModule == NULL ) - { - throw XMLInvalidBuildFileException ( - node.location, - "module '%s' is trying to invoke non-existant module '%s'", - module.name.c_str(), - att->value.c_str() ); - } - } - - for ( size_t i = 0; i < node.subElements.size (); i++ ) - ProcessXMLSubElement ( *node.subElements[i] ); -} - -void -Invoke::ProcessXMLSubElement ( const XMLElement& e ) -{ - bool subs_invalid = false; - if ( e.name == "input" ) - { - for ( size_t i = 0; i < e.subElements.size (); i++ ) - ProcessXMLSubElementInput ( *e.subElements[i] ); - } - else if ( e.name == "output" ) - { - for ( size_t i = 0; i < e.subElements.size (); i++ ) - ProcessXMLSubElementOutput ( *e.subElements[i] ); - } - if ( subs_invalid && e.subElements.size() > 0 ) - { - throw XMLInvalidBuildFileException ( - e.location, - "<%s> cannot have sub-elements", - e.name.c_str() ); - } -} - -void -Invoke::ProcessXMLSubElementInput ( const XMLElement& e ) -{ - bool subs_invalid = false; - if ( e.name == "inputfile" && e.value.size () > 0 ) - { - input.push_back ( new InvokeFile ( - e, FixSeparator ( module.output->relative_path + cSep + e.value ) ) ); - subs_invalid = true; - } - if ( subs_invalid && e.subElements.size() > 0 ) - { - throw XMLInvalidBuildFileException ( - e.location, - "<%s> cannot have sub-elements", - e.name.c_str() ); - } -} - -void -Invoke::ProcessXMLSubElementOutput ( const XMLElement& e ) -{ - bool subs_invalid = false; - if ( e.name == "outputfile" && e.value.size () > 0 ) - { - output.push_back ( new InvokeFile ( - e, FixSeparator ( module.output->relative_path + cSep + e.value ) ) ); - subs_invalid = true; - } - if ( subs_invalid && e.subElements.size() > 0 ) - { - throw XMLInvalidBuildFileException ( - e.location, - "<%s> cannot have sub-elements", - e.name.c_str() ); - } -} - -void -Invoke::GetTargets ( string_list& targets ) const -{ - for ( size_t i = 0; i < output.size (); i++ ) - { - InvokeFile& file = *output[i]; - targets.push_back ( NormalizeFilename ( file.name ) ); - } -} - -string -Invoke::GetParameters () const -{ - string parameters ( "" ); - size_t i; - for ( i = 0; i < output.size (); i++ ) - { - if ( parameters.length () > 0) - parameters += " "; - InvokeFile& invokeFile = *output[i]; - if ( invokeFile.switches.length () > 0 ) - { - parameters += invokeFile.switches + " "; - } - parameters += invokeFile.name; - } - - for ( i = 0; i < input.size (); i++ ) - { - if ( parameters.length () > 0 ) - parameters += " "; - InvokeFile& invokeFile = *input[i]; - if ( invokeFile.switches.length () > 0 ) - { - parameters += invokeFile.switches; - parameters += " "; - } - parameters += invokeFile.name ; - } - - return parameters; -} - - -InvokeFile::InvokeFile ( const XMLElement& _node, - const string& _name ) - : node (_node), - name (_name) -{ - const XMLAttribute* att = _node.GetAttribute ( "switches", false ); - if (att != NULL) - switches = att->value; - else - switches = ""; -} - -void -InvokeFile::ProcessXML() -{ -} - - -Dependency::Dependency ( const XMLElement& _node, - const Module& _module ) - : node (_node), - module (_module), - dependencyModule (NULL) -{ -} - -void -Dependency::ProcessXML() -{ - dependencyModule = module.project.LocateModule ( node.value ); - if ( dependencyModule == NULL ) - { - throw XMLInvalidBuildFileException ( - node.location, - "module '%s' depend on non-existant module '%s'", - module.name.c_str(), - node.value.c_str() ); - } -} - -Bootsector::Bootsector ( const XMLElement& _node, - const Module* _module ) - : node (_node), - module (_module), - bootSectorModule (NULL) -{ - if ( !IsSupportedModuleType ( module->type ) ) - { - throw XMLInvalidBuildFileException ( - node.location, - " is not applicable for this module type." ); - } - - bootSectorModule = module->project.LocateModule ( node.value ); - if ( bootSectorModule == NULL ) - { - throw XMLInvalidBuildFileException ( - node.location, - "module '%s' depend on non-existant module '%s'", - module->name.c_str(), - node.value.c_str() ); - } - - if (bootSectorModule->type != BootSector) - { - throw XMLInvalidBuildFileException ( - node.location, - "module '%s' is referencing non BootSector module '%s'", - module->name.c_str(), - node.value.c_str() ); - } -} - -void -Bootsector::ProcessXML() -{ -} - -bool -Bootsector::IsSupportedModuleType ( ModuleType type ) -{ - if ( type == Iso || - type == LiveIso ) - { - return true; - } - - return false; -} - -Metadata::Metadata ( const XMLElement& _node, - const Module& _module ) - : node (_node), - module (_module) -{ - /* The module name */ - const XMLAttribute* att = _node.GetAttribute ( "name", false ); - if (att != NULL) - name = att->value; - else - name = module.name; - - /* The module description */ - att = _node.GetAttribute ( "description", false ); - if (att != NULL) - description = att->value; - else - description = ""; - - /* The module version */ - att = _node.GetAttribute ( "version", false ); - if (att != NULL) - version = att->value; - else - version = ""; - - /* The module copyright */ - att = _node.GetAttribute ( "copyright", false ); - if (att != NULL) - copyright = att->value; - else - copyright = ""; - - att = _node.GetAttribute ( "url", false ); - if (att != NULL) - url = att->value; - else - url = ""; - - /* When was this module updated */ - att = _node.GetAttribute ( "date", false ); - if (att != NULL) - date = att->value; - else - date = "?"; - - /* When was this module updated */ - att = _node.GetAttribute ( "owner", false ); - if (att != NULL) - owner = att->value; - else - owner = "ReactOS"; -} - - -ImportLibrary::~ImportLibrary () -{ - delete source; - delete target; -} - - -ImportLibrary::ImportLibrary ( const Project& project, - const XMLElement& node, - const Module* module, - bool delayimp ) - : XmlNode ( project, node ), - module (module) -{ - DirectoryLocation directory = SourceDirectory; - const Module* base = module; - const XMLAttribute* dllname = node.GetAttribute ( "dllname", false ); - const XMLAttribute* definition = node.GetAttribute ( "definition", true ); - assert ( definition ); - - string relative_path; - const XMLAttribute* att = node.GetAttribute ( "base", false ); - if ( att ) - { - base = project.LocateModule ( att->value ); - if ( !base ) - throw XMLInvalidBuildFileException ( - node.location, - " attribute 'base' references non-existant module '%s'", - att->value.c_str() ); - - } - - if ( base ) - { - relative_path = base->output->relative_path; - if ( node.value.length () > 0 && node.value != "." ) - relative_path += sSep + node.value; - } - else - relative_path = node.value; - - att = node.GetAttribute ( "root", false ); - if ( att ) - { - if ( att->value == "intermediate" ) - directory = IntermediateDirectory; - else - throw InvalidAttributeValueException ( node.location, - "root", - att->value ); - } - - if ( dllname ) - this->dllname = dllname->value; - - size_t index = definition->value.find_last_of ( "/\\" ); - if ( index == string::npos ) - { - source = new FileLocation ( directory, - base->output->relative_path, - definition->value, - &node ); - } - else - { - string dir = definition->value.substr ( 0, index ); - string name = definition->value.substr ( index + 1); - source = new FileLocation ( directory, - NormalizeFilename ( base->output->relative_path + sSep + dir ), - name, - &node ); - } - - target = new FileLocation ( IntermediateDirectory, - base->output->relative_path, - "lib" + module->name + (delayimp ? ".delayimp.a" : ".a" )); - -} - - -Property::Property ( const XMLElement& node_, - const Project& project_, - const Module* module_ ) - : project(project_), module(module_) -{ - const XMLAttribute* att; - - att = node_.GetAttribute ( "name", true ); - assert(att); - name = project.ResolveProperties ( att->value ); - - att = node_.GetAttribute ( "value", true ); - assert(att); - value = att->value; - - att = node_.GetAttribute ( "internal", false ); - if ( att != NULL ) - { - const char* p = att->value.c_str(); - if ( !stricmp ( p, "true" ) || !stricmp ( p, "yes" ) ) - isInternal = true; - else if ( !stricmp ( p, "false" ) || !stricmp ( p, "no" ) ) - isInternal = false; - else - { - throw InvalidAttributeValueException ( - node_.location, - "internal", - att->value ); - } - } - else - isInternal = false; -} - -Property::Property ( const Project& project_, - const Module* module_, - const std::string& name_, - const std::string& value_ ) - : project(project_), module(module_), name(name_), value(value_) -{ -} - -void -Property::ProcessXML() -{ -} - - -PchFile::PchFile ( - const XMLElement& node_, - const Module& module_, - const FileLocation *file_ ) - : node(node_), module(module_), file(file_) -{ -} - -PchFile::~PchFile() -{ - delete file; -} - -void -PchFile::ProcessXML() -{ -} diff --git a/reactos/tools/rbuild/pch.h b/reactos/tools/rbuild/pch.h deleted file mode 100644 index e98342b1b8b..00000000000 --- a/reactos/tools/rbuild/pch.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 - -#ifdef _MSC_VER -#pragma warning ( disable : 4786 ) // identifier was truncated to '255' characters in the debug information -#pragma warning ( disable : 4996 ) // CRT deprecate -#endif//_MSC_VER - -#include -#include -#include -#include -#include -#include - -#ifdef WIN32 -#include -#ifndef MAX_PATH -#define MAX_PATH _MAX_PATH -#endif//MAX_PATH -#else -#include -#include -typedef LONG *PLONG; - -#endif//WIN32 - -#include -#include - -#ifndef WIN32 -#include -#include -#include -#include - -inline char * strlwr(char *x) -{ - char *y=x; - - while (*y) { - *y=tolower(*y); - y++; - } - return x; -} - -inline char *strupr(char *x) -{ - char *y=x; - - while (*y) { - *y=toupper(*y); - y++; - } - return x; -} - -#define _finite __finite -#define _isnan __isnan -#define stricmp strcasecmp -#define MAX_PATH PATH_MAX -#define _MAX_PATH PATH_MAX -#endif diff --git a/reactos/tools/rbuild/project.cpp b/reactos/tools/rbuild/project.cpp deleted file mode 100644 index 894c8dca515..00000000000 --- a/reactos/tools/rbuild/project.cpp +++ /dev/null @@ -1,549 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * Copyright (C) 2008 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. - */ -#include "pch.h" -#include - -#include "rbuild.h" -#include "backend/backend.h" - -using std::string; -using std::vector; - -/* static */ string -Environment::GetVariable ( const string& name ) -{ - char* value = getenv ( name.c_str () ); - if ( value != NULL && strlen ( value ) > 0 ) - return ssprintf ( "%s", - value ); - else - return ""; -} - -string -Environment::GetArch () -{ - return GetEnvironmentVariablePathOrDefault ( "ROS_ARCH", "i386" ); -} - -/* static */ string -Environment::GetEnvironmentVariablePathOrDefault ( const string& name, - const string& defaultValue ) -{ - const string& environmentVariableValue = Environment::GetVariable ( name ); - if ( environmentVariableValue.length () > 0 ) - return NormalizeFilename ( environmentVariableValue ); - else - return defaultValue; -} - -/* static */ string -Environment::GetIntermediatePath () -{ - string defaultIntermediate = - string( "obj-" ) + GetArch (); - return GetEnvironmentVariablePathOrDefault ( "ROS_INTERMEDIATE", - defaultIntermediate ); -} - -/* static */ string -Environment::GetSourcePath () -{ - char temp[_MAX_PATH]; - getcwd(temp, _MAX_PATH); - return string(temp); -} - -string -Environment::GetOutputPath () -{ - string defaultOutput = - string( "output-" ) + GetArch (); - return GetEnvironmentVariablePathOrDefault ( "ROS_OUTPUT", - defaultOutput ); -} - -/* static */ string -Environment::GetInstallPath () -{ - string defaultInstall = GetCdOutputPath (); - return GetEnvironmentVariablePathOrDefault ( "ROS_INSTALL", - defaultInstall ); -} - -/* static */ string -Environment::GetCdOutputPath () -{ - return GetEnvironmentVariablePathOrDefault ( "ROS_CDOUTPUT", - "reactos" ); -} - -/* static */ string -Environment::GetAutomakeFile ( const std::string& defaultFile ) -{ - return GetEnvironmentVariablePathOrDefault ( "ROS_AUTOMAKE", - defaultFile ); -} - -ParseContext::ParseContext () - : compilationUnit (NULL) -{ -} - - -FileLocation::FileLocation ( const DirectoryLocation directory, - const std::string& relative_path, - const std::string& name, - const XMLElement *node ) - : directory ( directory ), - relative_path ( NormalizeFilename ( relative_path ) ), - name ( name ) -{ - if ( relative_path[0] == '/' || - relative_path[0] == '\\' || - relative_path.find ( '$' ) != string::npos || - ( relative_path.length () > 1 && ( relative_path[1] == ':' || - relative_path.find_last_of ( "/\\" ) == relative_path.length () - 1 ) ) || - ( relative_path.length () > 3 && relative_path.find ( ':' ) != string::npos ) - ) - { - if ( node ) - throw InvalidOperationException ( __FILE__, - __LINE__, - "Invalid relative path '%s' at %s", - relative_path.c_str (), - node->location.c_str () ); - else - throw InvalidOperationException ( __FILE__, - __LINE__, - "Invalid relative path '%s'", - relative_path.c_str () ); - } - - if ( name.find_first_of ( "/\\:" ) != string::npos ) - { - if ( node ) - throw InvalidOperationException ( __FILE__, - __LINE__, - "Invalid file name '%s' at %s", - name.c_str (), - node->location.c_str () ); - else - throw InvalidOperationException ( __FILE__, - __LINE__, - "Invalid file name '%s'", - name.c_str () ); - } -} - - -FileLocation::FileLocation ( const FileLocation& other ) - : directory ( other.directory ), - relative_path ( other.relative_path ), - name ( other.name ) -{ -} - - -Project::Project ( const Configuration& configuration, - const string& filename, - const std::map* properties ) - : xmlfile (filename), - node (NULL), - head (NULL), - configuration (configuration) -{ - _backend = NULL; - - if ( properties ) - { - std::map::const_iterator it; - for (it = properties->begin (); it != properties->end (); it++) - { - const Property *existing = LookupProperty( it->first ); - if ( !existing ) - { - Property* property = new Property ( *this, NULL, it->first, it->second ); - non_if_data.properties.insert ( std::make_pair ( property->name, property ) ); - } - } - } - - ReadXml(); -} - -Project::~Project () -{ - size_t i; - if ( _backend ) - delete _backend; -#ifdef NOT_NEEDED_SINCE_THESE_ARE_CLEANED_BY_IFABLE_DATA - for ( i = 0; i < modules.size (); i++ ) - delete modules[i]; -#endif - for ( i = 0; i < linkerFlags.size (); i++ ) - delete linkerFlags[i]; - for ( i = 0; i < cdfiles.size (); i++ ) - delete cdfiles[i]; - for ( i = 0; i < installfiles.size (); i++ ) - delete installfiles[i]; - if ( head ) - delete head; -} - -const Property* -Project::LookupProperty ( const string& name ) const -{ - std::map::const_iterator p = non_if_data.properties.find(name); - - if ( p == non_if_data.properties.end () ) - return NULL; - - return p->second; -} - -string -Project::ResolveNextProperty ( const string& s ) const -{ - size_t i = s.find ( "${" ); - if ( i == string::npos ) - i = s.find ( "$(" ); - if ( i != string::npos ) - { - string endCharacter; - if ( s[i + 1] == '{' ) - endCharacter = "}"; - else - endCharacter = ")"; - size_t j = s.find ( endCharacter ); - if ( j != string::npos ) - { - int propertyNameLength = j - i - 2; - string propertyName = s.substr ( i + 2, propertyNameLength ); - const Property* property = LookupProperty ( propertyName ); - if ( property != NULL ) - return string ( s ).replace ( i, propertyNameLength + 3, property->value ); - } - } - return s; -} - -string -Project::ResolveProperties ( const string& s ) const -{ - string s2 = s; - string s3; - do - { - s3 = s2; - s2 = ResolveNextProperty ( s3 ); - } while ( s2 != s3 ); - return s2; -} - -void -Project::ExecuteInvocations () -{ - for( std::map::const_iterator p = modules.begin(); p != modules.end(); ++ p ) - p->second->InvokeModule (); -} - -void -Project::ReadXml () -{ - Path path; - head = XMLLoadFile ( xmlfile, path, xmlbuildfiles ); - node = NULL; - for ( size_t i = 0; i < head->subElements.size (); i++ ) - { - if ( head->subElements[i]->name == "project" ) - { - node = head->subElements[i]; - string path; - ProcessXML ( path ); - return; - } - } - - if (node == NULL) - node = head->subElements[0]; - - throw XMLInvalidBuildFileException ( - node->location, - "Document contains no 'project' tag." ); -} - -void -Project::ProcessXML ( const string& path ) -{ - const XMLAttribute *att; - if ( node->name != "project" ) - throw Exception ( "internal tool error: Project::ProcessXML() called with non- node" ); - - att = node->GetAttribute ( "name", false ); - if ( !att ) - name = "Unnamed"; - else - name = att->value; - - att = node->GetAttribute ( "makefile", true ); - assert(att); - makefile = Environment::GetAutomakeFile ( att->value ); - - att = node->GetAttribute ( "allowwarnings", false ); - allowWarningsSet = att != NULL; - if ( att != NULL ) - allowWarnings = att->value == "true"; - - size_t i; - for ( i = 0; i < node->subElements.size (); i++ ) - { - ParseContext parseContext; - ProcessXMLSubElement ( *node->subElements[i], path, parseContext ); - } - - non_if_data.ProcessXML (); - host_non_if_data.ProcessXML (); - - non_if_data.ExtractModules( modules ); - - for ( i = 0; i < linkerFlags.size (); i++ ) - linkerFlags[i]->ProcessXML (); - for( std::map::const_iterator p = modules.begin(); p != modules.end(); ++ p ) - p->second->ProcessXML (); - for ( i = 0; i < cdfiles.size (); i++ ) - cdfiles[i]->ProcessXML (); - for ( i = 0; i < installfiles.size (); i++ ) - installfiles[i]->ProcessXML (); -} - -void -Project::ProcessXMLSubElement ( const XMLElement& e, - const string& path, - ParseContext& parseContext ) -{ - const XMLAttribute* att; - - att = e.GetAttribute ( "compilerset", false ); - - if ( att ) - { - CompilerSet compilerSet; - - if ( att->value == "msc" ) - compilerSet = MicrosoftC; - else if ( att->value == "gcc" ) - compilerSet = GnuGcc; - else - throw InvalidAttributeValueException ( - e.location, - "compilerset", - att->value ); - - if ( compilerSet != configuration.Compiler ) - return; - } - - att = e.GetAttribute ( "linkerset", false ); - - if ( att ) - { - LinkerSet linkerSet; - - if ( att->value == "mslink" ) - linkerSet = MicrosoftLink; - else if ( att->value == "ld" ) - linkerSet = GnuLd; - else - throw InvalidAttributeValueException ( - e.location, - "linkerset", - att->value ); - - if ( linkerSet != configuration.Linker ) - return; - } - - bool subs_invalid = false; - - string subpath(path); - if ( e.name == "module" ) - { - Module* module = new Module ( *this, e, path ); - if ( LocateModule ( module->name ) ) - throw XMLInvalidBuildFileException ( - node->location, - "module name conflict: '%s' (originally defined at %s)", - module->name.c_str(), - module->node.location.c_str() ); - non_if_data.modules.push_back ( module ); - return; // defer processing until later - } - else if ( e.name == "cdfile" ) - { - CDFile* cdfile = new CDFile ( *this, e, path ); - cdfiles.push_back ( cdfile ); - subs_invalid = true; - } - else if ( e.name == "installfile" ) - { - InstallFile* installfile = new InstallFile ( *this, e, path ); - installfiles.push_back ( installfile ); - subs_invalid = true; - } - else if ( e.name == "directory" ) - { - const XMLAttribute* att = e.GetAttribute ( "name", true ); - assert(att); - subpath = GetSubPath ( *this, e.location, path, att->value ); - } - else if ( e.name == "include" ) - { - const XMLAttribute* host = e.GetAttribute("host", false); - Include* include = new Include ( *this, &e ); - - if(host && host->value == "true") - host_non_if_data.includes.push_back(include); - else - non_if_data.includes.push_back ( include ); - - subs_invalid = true; - } - else if ( e.name == "define" || e.name == "redefine" ) - { - const XMLAttribute* host = e.GetAttribute("host", false); - Define* define = new Define ( *this, e ); - - if(host && host->value == "true") - host_non_if_data.defines.push_back(define); - else - non_if_data.defines.push_back ( define ); - - subs_invalid = true; - } - else if ( e.name == "compilerflag" ) - { - CompilerFlag* pCompilerFlag = new CompilerFlag ( *this, e ); - non_if_data.compilerFlags.push_back ( pCompilerFlag ); - subs_invalid = true; - } - else if ( e.name == "linkerflag" ) - { - linkerFlags.push_back ( new LinkerFlag ( *this, e ) ); - subs_invalid = true; - } - else if ( e.name == "if" || e.name == "ifnot" ) - { - const XMLAttribute* name; - name = e.GetAttribute ( "property", true ); - assert( name ); - const Property *property = LookupProperty( name->value ); - const string *PropertyValue; - const string EmptyString; - - if (property) - { - PropertyValue = &property->value; - } - else - { - // Property does not exist, treat it as being empty - PropertyValue = &EmptyString; - } - - const XMLAttribute* value; - value = e.GetAttribute ( "value", true ); - assert( value ); - - bool negate = ( e.name == "ifnot" ); - bool equality = ( *PropertyValue == value->value ); - if ( equality == negate ) - { - // Failed, skip this element - if ( configuration.Verbose ) - printf("Skipping 'If' at %s\n", e.location.c_str () ); - return; - } - subs_invalid = false; - } - else if ( e.name == "property" ) - { - Property* property = new Property ( e, *this, NULL ); - non_if_data.properties.insert ( std::make_pair ( property->name, property ) ); - } - if ( subs_invalid && e.subElements.size() ) - { - throw XMLInvalidBuildFileException ( - e.location, - "<%s> cannot have sub-elements", - e.name.c_str() ); - } - for ( size_t i = 0; i < e.subElements.size (); i++ ) - ProcessXMLSubElement ( *e.subElements[i], subpath, parseContext ); -} - -Module* -Project::LocateModule ( const string& name ) -{ - std::map::const_iterator p = modules.find(name); - - if ( p == modules.end() ) - return NULL; - - return p->second; -} - -const Module* -Project::LocateModule ( const string& name ) const -{ - std::map::const_iterator p = modules.find(name); - - if ( p == modules.end() ) - return NULL; - - return p->second; -} - -const std::string& -Project::GetProjectFilename () const -{ - return xmlfile; -} - -std::string -Project::GetCompilerSet () const -{ - switch ( configuration.Compiler ) - { - case GnuGcc: return "gcc"; - case MicrosoftC: return "msc"; - default: assert ( false ); - } -} - -std::string -Project::GetLinkerSet () const -{ - switch ( configuration.Linker ) - { - case GnuLd: return "ld"; - case MicrosoftLink: return "mslink"; - default: assert ( false ); - } -} diff --git a/reactos/tools/rbuild/project.dtd b/reactos/tools/rbuild/project.dtd deleted file mode 100644 index dad95b0f4d0..00000000000 --- a/reactos/tools/rbuild/project.dtd +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/reactos/tools/rbuild/rbuild.cpp b/reactos/tools/rbuild/rbuild.cpp deleted file mode 100644 index dc098a819c4..00000000000 --- a/reactos/tools/rbuild/rbuild.cpp +++ /dev/null @@ -1,422 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "pch.h" -#include -#include - -#include -#ifdef WIN32 -#include -#endif -#include - -#include "rbuild.h" -#include "backend/backend.h" -#include "backend/mingw/mingw.h" - -using std::string; -using std::vector; - -static string BuildSystem; -static string RootXmlFile; -static Configuration configuration; -static std::map properties; - -bool -ParseAutomaticDependencySwitch ( - char switchChar2, - char* switchStart ) -{ - switch ( switchChar2 ) - { - case 'd': - configuration.Dependencies = NoDependencies; - break; - case 'a': - configuration.Dependencies = AutomaticDependencies; - break; - case 'f': - configuration.Dependencies = FullDependencies; - break; - case 'm': - if ( strlen ( switchStart ) <= 3 ) - { - printf ( "Switch -dm requires a module name\n" ); - return false; - } - configuration.CheckDependenciesForModuleOnly = true; - configuration.CheckDependenciesForModuleOnlyModule = string(&switchStart[3]); - break; - default: - printf ( "Unknown switch -d%c\n", - switchChar2 ); - return false; - } - return true; -} - -bool -ParseCompilationUnitSwitch ( - char switchChar2, - char* switchStart ) -{ - switch ( switchChar2 ) - { - case 'd': - configuration.CompilationUnitsEnabled = false; - break; - default: - printf ( "Unknown switch -u%c\n", - switchChar2 ); - return false; - } - return true; -} - -bool -ParsePrecompiledHeaderSwitch ( - char switchChar2, - char* switchStart ) -{ - switch ( switchChar2 ) - { - case 'd': - configuration.PrecompiledHeadersEnabled = false; - break; - default: - printf ( "Unknown switch -h%c\n", - switchChar2 ); - return false; - } - return true; -} - -bool -ParseVCProjectSwitch ( - char switchChar2, - char* switchStart ) -{ - string temp; - - switch ( switchChar2 ) - { - case 's': - if ( strlen ( switchStart ) <= 3 ) - { - printf ( "Switch -dm requires a module name\n" ); - return false; - } - configuration.VSProjectVersion = string(&switchStart[3]); - - if (configuration.VSProjectVersion.at(0) == '{') { - printf ( "Error: invalid char {\n" ); - return false; - } - - if (configuration.VSProjectVersion.length() == 1) //7,8 - configuration.VSProjectVersion.append(".00"); - - if (configuration.VSProjectVersion.length() == 3) //7.1 - configuration.VSProjectVersion.append("0"); - - //We should set this here because in the end we will use - //msc sompiler so we need to parse msc specidic - //definitions and includes - configuration.Compiler = MicrosoftC; - - break; - case 'c': - configuration.VSConfigurationType = string (&switchStart[3]); - configuration.InstallFiles = true; - break; - case 'o': - if ( strlen ( switchStart ) <= 3 ) - { - printf ( "Invalid switch\n" ); - return false; - } - temp = string (&switchStart[3]); - if ( temp.find ("configuration") != string::npos ) - configuration.UseConfigurationInPath = true; - - if ( temp.find ("version") != string::npos ) - configuration.UseVSVersionInPath = true; - break; - default: - printf ( "Unknown switch -d%c\n", - switchChar2 ); - return false; - } - return true; -} - -bool -ParseMingwSwitch ( char* switchStart ) -{ - switchStart += 2; - - if ( *switchStart == 'c' ) - { - ++ switchStart; - - if ( strcmp ( switchStart, "msc" ) == 0 ) - configuration.Compiler = MicrosoftC; - else if ( strcmp ( switchStart, "gcc" ) == 0 ) - configuration.Compiler = GnuGcc; - else - { - printf ( "Unknown value of -Mc: %s\n", switchStart ); - return false; - } - } - else if ( *switchStart == 'l' ) - { - ++ switchStart; - - if ( strcmp ( switchStart, "mslink" ) == 0 ) - configuration.Linker = MicrosoftLink; - else if ( strcmp ( switchStart, "ld" ) == 0 ) - configuration.Linker = GnuLd; - else - { - printf ( "Unknown value of -Ml: %s\n", switchStart ); - return false; - } - } - else if ( strcmp ( switchStart, "microsoft" ) == 0 ) - { - configuration.Compiler = MicrosoftC; - configuration.Linker = MicrosoftLink; - } - else if ( strcmp ( switchStart, "gnu" ) == 0 ) - { - configuration.Compiler = GnuGcc; - configuration.Linker = GnuLd; - } - else - { - printf ( "Unknown value of -M: %s\n", switchStart ); - return false; - } - - return true; -} - -bool -ParseMakeSwitch ( char switchChar2 ) -{ - switch ( switchChar2 ) - { - case 'i': - configuration.MakeHandlesInstallDirectories = true; - break; - default: - printf ( "Unknown switch -m%c\n", - switchChar2 ); - return false; - } - return true; -} - -bool -ParseProxyMakefileSwitch ( char switchChar2 ) -{ - switch ( switchChar2 ) - { - case 's': - configuration.GenerateProxyMakefilesInSourceTree = true; - break; - default: - printf ( "Unknown switch -p%c\n", - switchChar2 ); - return false; - } - return true; -} - -bool -ParseDefineSwitch ( char* switchStart ) -{ - string s = string ( switchStart + 2 ); - string::size_type separator = s.find ( '=' ); - if ( separator == string::npos || separator == 0 ) - { - printf ( "Invalid define switch: '%s'\n", switchStart ); - return false; - } - if ( s.find ( '=', separator + 1 ) != string::npos ) - { - printf ( "Invalid define switch: '%s'\n", switchStart ); - return false; - } - - string var = s.substr ( 0, separator ); - string val = s.substr ( separator + 1 ); - properties.insert ( std::pair ( var, val ) ); - return true; -} - -bool -ParseSwitch ( int argc, char** argv, int index ) -{ - char switchChar = strlen ( argv[index] ) > 1 ? argv[index][1] : ' '; - char switchChar2 = strlen ( argv[index] ) > 2 ? argv[index][2] : ' '; - switch ( switchChar ) - { - case 'v': - if (switchChar2 == 's' || switchChar2 == 'c' || switchChar2 == 'o') - { - return ParseVCProjectSwitch ( - switchChar2, - argv[index] ); - } - else - configuration.Verbose = true; - break; - case 'c': - configuration.CleanAsYouGo = true; - break; - case 'd': - return ParseAutomaticDependencySwitch ( - switchChar2, - argv[index] ); - case 'h': - return ParsePrecompiledHeaderSwitch ( - switchChar2, - argv[index] ); - - case 'u': - return ParseCompilationUnitSwitch ( - switchChar2, - argv[index] ); - case 'r': - RootXmlFile = string(&argv[index][2]); - break; - case 'm': - return ParseMakeSwitch ( switchChar2 ); - case 'M': - return ParseMingwSwitch ( argv[index] ); - case 'p': - return ParseProxyMakefileSwitch ( switchChar2 ); - case 'D': - return ParseDefineSwitch ( argv[index] ); - default: - printf ( - "Unknown switch -%c\n", - switchChar ); - return false; - } - return true; -} - -bool -ParseArguments ( int argc, char** argv ) -{ - if ( argc < 2 ) - return false; - - for ( int i = 1; i < argc; i++ ) - { - if ( argv[i][0] == '-' ) - { - if ( !ParseSwitch ( argc, argv, i ) ) - return false; - } - else - BuildSystem = argv[i]; - } - - return true; -} - -int -main ( int argc, char** argv ) -{ - InitializeEnvironment (); - - if ( !ParseArguments ( argc, argv ) ) - { - printf ( "Generates project files for buildsystems\n\n" ); - printf ( " rbuild [switches] -r{rootfile.rbuild} buildsystem\n\n" ); - printf ( "Switches:\n" ); - printf ( " -v Be verbose.\n" ); - printf ( " -c Clean as you go. Delete generated files as soon as they are not\n" ); - printf ( " needed anymore.\n" ); - printf ( " -dd Disable automatic dependencies.\n" ); - printf ( " -da Enable automatic dependencies.\n" ); - printf ( " -df Enable full dependencies.\n" ); - printf ( " -dm{module} Check only automatic dependencies for this module.\n" ); - printf ( " -ud Disable multiple source files per compilation unit.\n" ); - printf ( " -mi Let make handle creation of install directories. Rbuild will\n" ); - printf ( " not generate the directories.\n" ); - printf ( " -ps Generate proxy makefiles in source tree instead of the output.\n" ); - printf ( " tree.\n" ); - printf ( " -vs{version} Version of MS VS project files. Default is %s.\n", MS_VS_DEF_VERSION ); - printf ( " -vo{version|configuration} Adds subdirectory path to the default Intermediate-Outputdirectory.\n" ); - printf ( " -Mc{compiler} Compiler to use for mingw backend. Can be one of:\n" ); - printf ( " %-10s %s (default)\n", "gcc", "GNU compiler collection (gcc, g++)\n"); - printf ( " %-10s %s\n", "msc", "Microsoft Visual C++ (cl)\n"); - printf ( " -Ml{compiler} Linker to use for mingw backend. Can be one of:\n" ); - printf ( " %-10s %s (default)\n", "ld", "GNU binutils (ld, dlltool)\n"); - printf ( " %-10s %s\n", "mslink", "Microsoft Linker (link, lib)\n"); - printf ( " -Mmicrosoft Same as -Mcmsc -Mlmslink\n" ); - printf ( " -Mgnu Same as -Mcgcc -Mlld\n" ); - printf ( " -Dvar=val Set the value of 'var' variable to 'val'.\n" ); - printf ( "\n" ); - printf ( " buildsystem Target build system. Can be one of:\n" ); - - std::map::iterator iter; - for (iter = Backend::Factory::map_begin(); iter != Backend::Factory::map_end(); iter++) - { - Backend::Factory *factory = iter->second; - printf ( " %-10s %s\n", factory->Name(), factory->Description()); - } - return 1; - } - try - { - if ( RootXmlFile.length () == 0 ) - throw MissingArgumentException ( "-r" ); - - string projectFilename ( RootXmlFile ); - - printf ( "Reading build files..." ); - Project project ( configuration, projectFilename, &properties ); - printf ( "done\n" ); - - project.SetBackend ( Backend::Factory::Create ( - BuildSystem, - project, - configuration ) ); - - project.ExecuteInvocations (); - project.GetBackend().Process(); - - return 0; - } - catch ( Exception& ex ) - { - printf ( "%s\n", (*ex).c_str () ); - return 1; - } - catch ( XMLException& ex ) - { - printf ( "%s\n", (*ex).c_str () ); - return 1; - } -} diff --git a/reactos/tools/rbuild/rbuild.dsp b/reactos/tools/rbuild/rbuild.dsp deleted file mode 100644 index f9700359f38..00000000000 --- a/reactos/tools/rbuild/rbuild.dsp +++ /dev/null @@ -1,360 +0,0 @@ -# Microsoft Developer Studio Project File - Name="rbuild" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=rbuild - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "rbuild.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "rbuild.mak" CFG="rbuild - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "rbuild - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "rbuild - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "rbuild - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "rbuild - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I ".." /I "../../lib/inflib" /I "../../include/reactos" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "INFLIB_HOST" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "rbuild - Win32 Release" -# Name "rbuild - Win32 Debug" -# Begin Group "backends" - -# PROP Default_Filter "" -# Begin Group "devcpp" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\backend\devcpp\devcpp.cpp -# End Source File -# Begin Source File - -SOURCE=.\backend\devcpp\devcpp.h -# End Source File -# End Group -# Begin Group "msvc" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\backend\msvc\genguid.cpp -# End Source File -# Begin Source File - -SOURCE=.\backend\msvc\msvc.cpp -# End Source File -# Begin Source File - -SOURCE=.\backend\msvc\msvc.h -# End Source File -# Begin Source File - -SOURCE=.\backend\msvc\msvcmaker.cpp -# End Source File -# Begin Source File - -SOURCE=.\backend\msvc\vcprojmaker.cpp -# End Source File -# End Group -# Begin Group "mingw" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\backend\mingw\mingw.cpp -# End Source File -# Begin Source File - -SOURCE=.\backend\mingw\mingw.h -# End Source File -# Begin Source File - -SOURCE=.\backend\mingw\modulehandler.cpp -# End Source File -# Begin Source File - -SOURCE=.\backend\mingw\modulehandler.h -# End Source File -# Begin Source File - -SOURCE=.\backend\mingw\pch_detection.h -# End Source File -# Begin Source File - -SOURCE=.\backend\mingw\proxymakefile.cpp -# End Source File -# End Group -# Begin Group "backend_sources" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\backend\backend.cpp -# End Source File -# End Group -# Begin Group "backend_headers" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\backend\backend.h -# End Source File -# End Group -# End Group -# Begin Group "rbuild_sources" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\automaticdependency.cpp -# End Source File -# Begin Source File - -SOURCE=.\bootstrap.cpp -# End Source File -# Begin Source File - -SOURCE=.\cdfile.cpp -# End Source File -# Begin Source File - -SOURCE=.\compilationunit.cpp -# End Source File -# Begin Source File - -SOURCE=.\compilationunitsupportcode.cpp -# End Source File -# Begin Source File - -SOURCE=.\compilerdirective.cpp -# End Source File -# Begin Source File - -SOURCE=.\compilerflag.cpp -# End Source File -# Begin Source File - -SOURCE=.\configuration.cpp -# End Source File -# Begin Source File - -SOURCE=.\define.cpp -# End Source File -# Begin Source File - -SOURCE=.\directory.cpp -# End Source File -# Begin Source File - -SOURCE=.\exception.cpp -# End Source File -# Begin Source File - -SOURCE=.\filesupportcode.cpp -# End Source File -# Begin Source File - -SOURCE=.\global.cpp -# End Source File -# Begin Source File - -SOURCE=.\include.cpp -# End Source File -# Begin Source File - -SOURCE=.\installfile.cpp -# End Source File -# Begin Source File - -SOURCE=.\linkerflag.cpp -# End Source File -# Begin Source File - -SOURCE=.\linkerscript.cpp -# End Source File -# Begin Source File - -SOURCE=.\module.cpp -# End Source File -# Begin Source File - -SOURCE=.\project.cpp -# End Source File -# Begin Source File - -SOURCE=.\rbuild.cpp -# End Source File -# Begin Source File - -SOURCE=.\stubbedcomponent.cpp -# End Source File -# Begin Source File - -SOURCE=.\syssetupgenerator.cpp -# End Source File -# Begin Source File - -SOURCE=.\testsupportcode.cpp -# End Source File -# Begin Source File - -SOURCE=.\wineresource.cpp -# End Source File -# End Group -# Begin Group "rbuild_headers" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\exception.h -# End Source File -# Begin Source File - -SOURCE=.\pch.h -# End Source File -# Begin Source File - -SOURCE=.\rbuild.h -# End Source File -# Begin Source File - -SOURCE=.\test.h -# End Source File -# End Group -# Begin Group "inflib" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\lib\inflib\builddep.h -# End Source File -# Begin Source File - -SOURCE=..\..\lib\inflib\infcommon.h -# End Source File -# Begin Source File - -SOURCE=..\..\lib\inflib\infcore.c -# End Source File -# Begin Source File - -SOURCE=..\..\lib\inflib\infget.c -# End Source File -# Begin Source File - -SOURCE=..\..\lib\inflib\infhost.h -# End Source File -# Begin Source File - -SOURCE=..\..\lib\inflib\infhostgen.c -# End Source File -# Begin Source File - -SOURCE=..\..\lib\inflib\infhostget.c -# End Source File -# Begin Source File - -SOURCE=..\..\lib\inflib\infhostglue.c -# End Source File -# Begin Source File - -SOURCE=..\..\lib\inflib\infhostput.c -# End Source File -# Begin Source File - -SOURCE=..\..\lib\inflib\inflib.h -# End Source File -# Begin Source File - -SOURCE=..\..\lib\inflib\infpriv.h -# End Source File -# Begin Source File - -SOURCE=..\..\lib\inflib\infput.c -# End Source File -# End Group -# Begin Group "tools" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\ssprintf.cpp -# End Source File -# Begin Source File - -SOURCE=..\ssprintf.h -# End Source File -# Begin Source File - -SOURCE=..\xml.cpp -# End Source File -# Begin Source File - -SOURCE=..\xml.h -# End Source File -# End Group -# End Target -# End Project diff --git a/reactos/tools/rbuild/rbuild.dsw b/reactos/tools/rbuild/rbuild.dsw deleted file mode 100644 index f1c3863426c..00000000000 --- a/reactos/tools/rbuild/rbuild.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "rbuild"=.\rbuild.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/reactos/tools/rbuild/rbuild.h b/reactos/tools/rbuild/rbuild.h deleted file mode 100644 index 04d2d69e7f7..00000000000 --- a/reactos/tools/rbuild/rbuild.h +++ /dev/null @@ -1,1100 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 - -#include "pch.h" - -#ifdef WIN32 -#include -#include -#endif/*WIN32*/ -#include -#include -#ifdef _MSC_VER -#include -#else/*_MSC_VER*/ -#include -#ifdef WIN32 -#include -#endif/*WIN32*/ -#endif/*_MSC_VER*/ - -#include - -#include "ssprintf.h" -#include "exception.h" -#include "xml.h" - -class Backend; // forward declaration - -typedef std::vector string_list; - -extern std::string ExePrefix; -extern std::string ExePostfix; -extern std::string sSep; -extern std::string sBadSep; -extern char cSep; -extern char cBadSep; - -#ifdef WIN32 -#define DEF_EXEPREFIX "" -#define DEF_EXEPOSTFIX ".exe" -#define DEF_CSEP '\\' -#define DEF_CBAD_SEP '/' -#define DEF_SSEP "\\" -#define DEF_SBAD_SEP "/" -#else -#define DEF_EXEPREFIX "./" -#define DEF_EXEPOSTFIX "" -#define DEF_CSEP '/' -#define DEF_CBAD_SEP '\\' -#define DEF_SSEP "/" -#define DEF_SBAD_SEP "\\" -#endif - -#define MS_VS_DEF_VERSION "9.00" - -class XmlNode; -class Directory; -class Project; -class IfableData; -class Module; -class Include; -class Define; -class File; -class Library; -class Invoke; -class InvokeFile; -class Dependency; -class ImportLibrary; -class CompilerFlag; -class LinkerFlag; -class LinkerScript; -class Property; -class TestSupportCode; -class AutomaticDependency; -class Bootstrap; -class CDFile; -class InstallFile; -class PchFile; -class StubbedComponent; -class StubbedSymbol; -class CompilationUnit; -class FileLocation; -class AutoRegister; - -class SourceFileTest; -class Metadata; -class Bootsector; - -typedef std::map directory_map; - -class XmlNode -{ -protected: - const Project& project; - const XMLElement& node; - - XmlNode ( const Project& project_, - const XMLElement& node_ ); - virtual ~XmlNode(); - -public: - virtual void ProcessXML(); -}; - -enum DirectoryLocation -{ - SourceDirectory, - IntermediateDirectory, - OutputDirectory, - InstallDirectory, - TemporaryDirectory, -}; - -class Directory -{ -public: - std::string name; - directory_map subdirs; - Directory ( const std::string& name ); - ~Directory(); - void Add ( const char* subdir ); - void GenerateTree ( DirectoryLocation root, - bool verbose ); - void CreateRule ( FILE* f, - const std::string& parent ); -private: - bool mkdir_p ( const char* path ); - bool CreateDirectory ( const std::string& path ); - std::string EscapeSpaces ( const std::string& path ); - void GenerateTree ( const std::string& parent, - bool verbose ); -}; - -enum DependenciesType -{ - NoDependencies, - AutomaticDependencies, - FullDependencies -}; - -enum CompilerSet -{ - GnuGcc, - MicrosoftC -}; - -enum LinkerSet -{ - GnuLd, - MicrosoftLink -}; - -enum SpecFileType -{ - None, - Spec = 1, - PSpec = 2 -}; - -class Configuration -{ -public: - Configuration (); - ~Configuration (); - bool Verbose; - bool CleanAsYouGo; - DependenciesType Dependencies; - bool CheckDependenciesForModuleOnly; - bool CompilationUnitsEnabled; - bool PrecompiledHeadersEnabled; - std::string CheckDependenciesForModuleOnlyModule; - std::string VSProjectVersion; - std::string VSConfigurationType; - bool UseVSVersionInPath; - bool UseConfigurationInPath; - bool MakeHandlesInstallDirectories; - bool GenerateProxyMakefilesInSourceTree; - bool InstallFiles; - CompilerSet Compiler; - LinkerSet Linker; -}; - -class Environment -{ -public: - static std::string GetVariable ( const std::string& name ); - static std::string GetArch (); - static std::string GetIntermediatePath (); - static std::string GetOutputPath (); - static std::string GetSourcePath (); - static std::string GetCdOutputPath (); - static std::string GetInstallPath (); - static std::string GetAutomakeFile ( const std::string& defaultFile ); - static std::string GetEnvironmentVariablePathOrDefault ( const std::string& name, - const std::string& defaultValue ); -}; - - -class FileSupportCode -{ -public: - static void WriteIfChanged ( char* outbuf, - const std::string& filename, - bool ignoreError = false ); -}; - - -class ParseContext -{ -public: - CompilationUnit* compilationUnit; - ParseContext (); -}; - - -class IfableData -{ -public: - std::vector compilationUnits; - std::vector files; - std::vector includes; - std::vector defines; - std::vector libraries; - std::map properties; - std::vector modules; - std::vector compilerFlags; - int asmFiles; // number of .asm files in compilationUnits - - IfableData(); - ~IfableData(); - void ProcessXML(); - void ExtractModules( std::map &modules ); -}; - -class Project -{ - std::string xmlfile; - XMLElement *node, *head; - Backend* _backend; -public: - const Configuration& configuration; - std::string name; - std::string makefile; - XMLIncludes xmlbuildfiles; - std::vector linkerFlags; - std::vector cdfiles; - std::vector installfiles; - std::map modules; - IfableData non_if_data; - IfableData host_non_if_data; - bool allowWarnings; - bool allowWarningsSet; - - Project ( const Configuration& configuration, - const std::string& filename, - const std::map* properties = NULL ); - ~Project (); - void SetBackend ( Backend* backend ) { _backend = backend; } - Backend& GetBackend() { return *_backend; } - void ExecuteInvocations (); - - void ProcessXML ( const std::string& path ); - Module* LocateModule ( const std::string& name ); - const Module* LocateModule ( const std::string& name ) const; - const std::string& GetProjectFilename () const; - std::string ResolveProperties ( const std::string& s ) const; - const Property* LookupProperty ( const std::string& name ) const; - std::string GetCompilerSet () const; - std::string GetLinkerSet () const; -private: - std::string ResolveNextProperty ( const std::string& s ) const; - void ReadXml (); - void ProcessXMLSubElement ( const XMLElement& e, - const std::string& path, - ParseContext& parseContext ); - - // disable copy semantics - Project ( const Project& ); - Project& operator = ( const Project& ); -}; - - -enum ModuleType -{ - BuildTool, - StaticLibrary, - ObjectLibrary, - Kernel, - KernelModeDLL, - KernelModeDriver, - NativeDLL, - NativeCUI, - Win32DLL, - Win32OCX, - Win32CUI, - Win32GUI, - BootLoader, - BootSector, - Iso, - LiveIso, - Test, - RpcServer, - RpcClient, - Alias, - BootProgram, - Win32SCR, - IdlHeader, - IdlInterface, - EmbeddedTypeLib, - ElfExecutable, - RpcProxy, - HostStaticLibrary, - Cabinet, - KeyboardLayout, - MessageHeader, - TypeDontCare, // always at the end -}; - -enum HostType -{ - HostFalse, - HostDefault, - HostTrue, - HostDontCare, -}; - -enum CompilerType -{ - CompilerTypeCC, - CompilerTypeCXX, - CompilerTypeCPP, - CompilerTypeAS, - CompilerTypeMIDL, - CompilerTypeRC, - CompilerTypeNASM, - - CompilerTypesCount -}; - -class FileLocation -{ -public: - DirectoryLocation directory; - std::string relative_path; - std::string name; - - FileLocation ( const DirectoryLocation directory, - const std::string& relative_path, - const std::string& name, - const XMLElement *node = NULL ); - - FileLocation ( const FileLocation& other ); -}; - -class Module -{ -public: - const Project& project; - const XMLElement& node; - std::string xmlbuildFile; - std::string name; - std::string guid; - std::string extension; - std::string baseaddress; - std::string payload; - std::string buildtype; - ModuleType type; - ImportLibrary* importLibrary; - ImportLibrary* delayImportLibrary; - Metadata* metadata; - Bootsector* bootSector; - bool isUnicode; - bool isDefaultEntryPoint; - Bootstrap* bootstrap; - AutoRegister* autoRegister; // node - IfableData non_if_data; - std::vector invocations; - std::vector dependencies; - std::vector compilerFlags; - std::vector linkerFlags; - std::vector stubbedComponents; - std::vector cdfiles; - LinkerScript* linkerScript; - PchFile* pch; - bool cplusplus; - std::string prefix; - std::string aliasedModuleName; - bool allowWarnings; - bool enabled; - bool isStartupLib; - bool isCRT; - std::string CRT; - bool dynamicCRT; - FileLocation *output; // "path/foo.exe" - FileLocation *dependency; // "path/foo.exe" or "path/libfoo.a" - FileLocation *install; - std::string description; - std::string lcid; - std::string layoutId; - std::string layoutNameResId; - - Module ( const Project& project, - const XMLElement& moduleNode, - const std::string& modulePath ); - ~Module (); - ModuleType GetModuleType ( const std::string& location, - const XMLAttribute& attribute ); - bool HasImportLibrary () const; - bool IsDLL () const; - std::string GetPathWithPrefix ( const std::string& prefix ) const; // "path/prefixfoo.exe" - std::string GetPathToBaseDir() const; // "../" offset to rootdirectory - std::string GetEntryPoint() const; - void GetTargets ( string_list& ) const; - std::string GetInvocationTarget ( const int index ) const; - bool HasFileWithExtension ( const IfableData&, const std::string& extension ) const; - void InvokeModule () const; - void ProcessXML (); - std::string GetDllName() const; - SpecFileType IsSpecDefinitionFile () const; -private: - void SetImportLibrary ( ImportLibrary* importLibrary ); - void SetDelayImportLibrary ( ImportLibrary* importLibrary ); - DirectoryLocation GetTargetDirectoryTree () const; - std::string GetDefaultModuleExtension () const; - std::string GetDefaultModuleEntrypoint () const; - std::string GetDefaultModuleBaseaddress () const; - std::string GetDefaultModuleCRT () const; - bool GetDefaultModuleIsCRT () const; - std::string entrypoint; - void ProcessXMLSubElement ( const XMLElement& e, - DirectoryLocation directory, - const std::string& relative_path, - ParseContext& parseContext ); - bool GetBooleanAttribute ( const XMLElement& moduleNode, - const char * name, - bool default_value = false ); -}; - -class ToolsetDirective -{ -private: - bool enabled; - -protected: - void ParseToolsets ( const Project& project, const XMLElement& node ); - -public: - virtual ~ToolsetDirective() { } - bool IsEnabled () const; -}; - -class CompilerDirective -{ -private: - std::bitset compilersSet; - bool enabled; - -protected: - void ParseCompilers ( const XMLElement& node, const std::string& defaultValue ); - -public: - CompilerDirective (): enabled ( true ) { } - virtual ~CompilerDirective() { } - void SetCompiler ( CompilerType compiler ); - void UnsetCompiler ( CompilerType compiler ); - void SetAllCompilers (); - void UnsetAllCompilers (); - bool IsCompilerSet ( CompilerType compiler ) const; -}; - -class Include: public CompilerDirective, public ToolsetDirective -{ -public: - FileLocation *directory; - - Include ( const Project& project, - const XMLElement* includeNode ); - Include ( const Project& project, - const XMLElement* includeNode, - const Module* module ); - Include ( const Project& project, - DirectoryLocation directory, - const std::string& relative_path ); - ~Include (); - void ProcessXML (); -private: - const Project& project; - const XMLElement* node; - const Module* module; - DirectoryLocation GetDefaultDirectoryTree ( const Module* module ) const; - void Initialize (); -}; - - -class Define: public CompilerDirective, public ToolsetDirective -{ -public: - const Project& project; - const Module* module; - const XMLElement* node; - std::string name; - std::string arguments; - std::string value; - std::string backend; - bool redefine; - - Define ( const Project& project, - const XMLElement& defineNode ); - Define ( const Project& project, - const Module* module, - const XMLElement& defineNode ); - Define ( const Project& project, - const Module* module, - const std::string& name_, - const std::string& backend_ = "", - bool redefine_ = false ); - ~Define(); - void ProcessXML(); -private: - void Initialize(); -}; - - -class File -{ -public: - FileLocation file; - bool first; - std::string switches; - bool isPreCompiledHeader; - - File ( DirectoryLocation directory, - const std::string& relative_path, - const std::string& name, - bool _first, - const std::string& _switches, - bool _isPreCompiledHeader ); - - void ProcessXML(); - std::string GetFullPath () const; -}; - - -class Library -{ - const XMLElement *node; -public: - const Module& module; - std::string name; - const Module* importedModule; - bool delayimp; - - Library ( const XMLElement& _node, - const Module& _module, - const std::string& _name ); - Library ( const Module& _module, - const std::string& _name ); - - void ProcessXML(); -}; - - -class Invoke -{ -public: - const XMLElement& node; - const Module& module; - const Module* invokeModule; - std::vector input; - std::vector output; - - Invoke ( const XMLElement& _node, - const Module& _module ); - - void ProcessXML(); - void GetTargets ( string_list& targets ) const; - std::string GetParameters () const; -private: - void ProcessXMLSubElement ( const XMLElement& e ); - void ProcessXMLSubElementInput ( const XMLElement& e ); - void ProcessXMLSubElementOutput ( const XMLElement& e ); -}; - - -class InvokeFile -{ -public: - const XMLElement& node; - std::string name; - std::string switches; - - InvokeFile ( const XMLElement& _node, - const std::string& _name ); - - void ProcessXML (); -}; - - -class Dependency -{ -public: - const XMLElement& node; - const Module& module; - const Module* dependencyModule; - - Dependency ( const XMLElement& _node, - const Module& _module ); - - void ProcessXML(); -}; - -class Bootsector -{ -public: - const XMLElement& node; - const Module* module; - const Module* bootSectorModule; - - Bootsector ( const XMLElement& _node, - const Module* _module ); - - void ProcessXML(); -private: - bool IsSupportedModuleType ( ModuleType type ); -}; - -class Metadata -{ -public: - const XMLElement& node; - const Module& module; - std::string name; - std::string description; - std::string version; - std::string copyright; - std::string url; - std::string date; - std::string owner; - - Metadata ( const XMLElement& _node, - const Module& _module ); - - void ProcessXML(); -}; - -class ImportLibrary : public XmlNode -{ -public: - const Module* module; - std::string dllname; - FileLocation *source; - FileLocation *target; - - ImportLibrary ( const Project& project, - const XMLElement& node, - const Module* module, - bool delayimp ); - ~ImportLibrary (); -}; - - -class CompilerFlag: public CompilerDirective, public ToolsetDirective -{ -public: - const Project& project; - const Module* module; - const XMLElement& node; - std::string flag; - - CompilerFlag ( const Project& project, - const XMLElement& compilerFlagNode ); - CompilerFlag ( const Project& project, - const Module* module, - const XMLElement& compilerFlagNode ); - ~CompilerFlag (); - void ProcessXML(); -private: - void Initialize(); -}; - - -class LinkerFlag: public ToolsetDirective -{ -public: - const Project& project; - const Module* module; - const XMLElement& node; - std::string flag; - - LinkerFlag ( const Project& project, - const XMLElement& linkerFlagNode ); - LinkerFlag ( const Project& project, - const Module* module, - const XMLElement& linkerFlagNode ); - ~LinkerFlag (); - void ProcessXML(); -private: - void Initialize(); -}; - - -class LinkerScript -{ -public: - const XMLElement& node; - const Module& module; - const FileLocation *file; - - LinkerScript ( const XMLElement& node, - const Module& module, - const FileLocation *file ); - ~LinkerScript (); - void ProcessXML(); -}; - - -class Property -{ -public: - const Project& project; - const Module* module; - std::string name, value; - bool isInternal; - - Property ( const XMLElement& node_, - const Project& project_, - const Module* module_ ); - - Property ( const Project& project_, - const Module* module_, - const std::string& name_, - const std::string& value_ ); - - void ProcessXML(); -}; - - -class TestSupportCode -{ -public: - const Project& project; - - TestSupportCode ( const Project& project ); - ~TestSupportCode (); - void GenerateTestSupportCode ( bool verbose ); -private: - bool IsTestModule ( const Module& module ); - void GenerateTestSupportCodeForModule ( Module& module, - bool verbose ); - std::string GetHooksFilename ( Module& module ); - char* WriteStubbedSymbolToHooksFile ( char* buffer, - const StubbedComponent& component, - const StubbedSymbol& symbol ); - char* WriteStubbedComponentToHooksFile ( char* buffer, - const StubbedComponent& component ); - void WriteHooksFile ( Module& module ); - std::string GetStubsFilename ( Module& module ); - char* WriteStubbedSymbolToStubsFile ( char* buffer, - const StubbedComponent& component, - const StubbedSymbol& symbol, - int stubIndex ); - char* WriteStubbedComponentToStubsFile ( char* buffer, - const StubbedComponent& component, - int* stubIndex ); - void WriteStubsFile ( Module& module ); - std::string GetStartupFilename ( Module& module ); - bool IsUnknownCharacter ( char ch ); - std::string GetTestDispatcherName ( std::string filename ); - bool IsTestFile ( std::string& filename ) const; - void GetSourceFilenames ( string_list& list, - Module& module ) const; - char* WriteTestDispatcherPrototypesToStartupFile ( char* buffer, - Module& module ); - char* WriteRegisterTestsFunctionToStartupFile ( char* buffer, - Module& module ); - void WriteStartupFile ( Module& module ); -}; - - -class SourceFile -{ -public: - SourceFile ( AutomaticDependency* automaticDependency, - const Module& module, - const File& file, - SourceFile* parent ); - void Parse (); - std::vector files; /* List of files included in this file */ - const File& file; - AutomaticDependency* automaticDependency; - const Module& module; - std::vector parents; /* List of files, this file is included from */ - time_t lastWriteTime; - time_t youngestLastWriteTime; /* Youngest last write time of this file and all children */ - SourceFile* youngestFile; -private: - void Close (); - void Open (); - void SkipWhitespace (); - bool ReadInclude ( std::string& filename, - bool& searchCurrentDirectory, - bool& includeNext ); - bool IsIncludedFrom ( const File& file ); - SourceFile* ParseFile(const File& file); - bool CanProcessFile ( const File& file ); - bool IsParentOf ( const SourceFile* parent, - const SourceFile* child ); - std::string buf; - const char *p; - const char *end; -}; - - -class AutomaticDependency -{ - friend class SourceFileTest; -public: - const Project& project; - - AutomaticDependency ( const Project& project ); - ~AutomaticDependency (); - bool LocateIncludedFile ( const FileLocation& directory, - const std::string& includedFilename ); - bool LocateIncludedFile ( SourceFile* sourceFile, - const Module& module, - const std::string& includedFilename, - bool searchCurrentDirectory, - bool includeNext, - File& resolvedFile ); - SourceFile* RetrieveFromCacheOrParse ( const Module& module, - const File& file, - SourceFile* parentSourceFile ); - SourceFile* RetrieveFromCache ( const File& file ); - void CheckAutomaticDependencies ( bool verbose ); - void CheckAutomaticDependenciesForModule ( Module& module, - bool verbose ); -private: - void GetModulesToCheck ( Module& module, std::vector& modules ); - void CheckAutomaticDependencies ( const Module& module, - bool verbose ); - void CheckAutomaticDependenciesForFile ( SourceFile* sourceFile ); - void GetIncludeDirectories ( std::vector& includes, - const Module& module ); - void GetModuleFiles ( const Module& module, - std::vector& files ) const; - void ParseFiles (); - void ParseFiles ( const Module& module ); - void ParseFile ( const Module& module, - const File& file ); - std::map sourcefile_map; -}; - - -class Bootstrap -{ -public: - const Project& project; - const Module* module; - const XMLElement& node; - std::string base; - std::string nameoncd; - - Bootstrap ( const Project& project, - const Module* module, - const XMLElement& bootstrapNode ); - ~Bootstrap (); - void ProcessXML(); -private: - bool IsSupportedModuleType ( ModuleType type ); - void Initialize(); - static std::string ReplaceVariable ( const std::string& name, - const std::string& value, - std::string path ); -}; - - -class CDFile : public XmlNode -{ -public: - FileLocation *source; - FileLocation *target; - - CDFile ( const Project& project, - const XMLElement& bootstrapNode, - const std::string& path ); - ~CDFile (); -private: - static std::string ReplaceVariable ( const std::string& name, - const std::string& value, - std::string path ); -}; - - -class InstallFile : public XmlNode -{ -public: - FileLocation *source; - FileLocation *target; - - InstallFile ( const Project& project, - const XMLElement& bootstrapNode, - const std::string& path ); - ~InstallFile (); -}; - - -class PchFile -{ -public: - const XMLElement& node; - const Module& module; - const FileLocation *file; - - PchFile ( - const XMLElement& node, - const Module& module, - const FileLocation *file ); - ~PchFile(); - void ProcessXML(); -}; - - -class StubbedComponent -{ -public: - const Module* module; - const XMLElement& node; - std::string name; - std::vector symbols; - - StubbedComponent ( const Module* module_, - const XMLElement& stubbedComponentNode ); - ~StubbedComponent (); - void ProcessXML (); - void ProcessXMLSubElement ( const XMLElement& e ); -}; - - -class StubbedSymbol -{ -public: - const XMLElement& node; - std::string symbol; - std::string newname; - std::string strippedName; - - StubbedSymbol ( const XMLElement& stubbedSymbolNode ); - ~StubbedSymbol (); - void ProcessXML(); -private: - std::string StripSymbol ( std::string symbol ); -}; - - -class CompilationUnit -{ -public: - std::string name; - - CompilationUnit ( const File* file ); - CompilationUnit ( const Project* project, - const Module* module, - const XMLElement* node ); - ~CompilationUnit (); - void ProcessXML(); - bool IsGeneratedFile () const; - bool HasFileWithExtension ( const std::string& extension ) const; - bool IsFirstFile () const; - const FileLocation& GetFilename () const; - const std::string& GetSwitches () const; - void AddFile ( const File * file ); - const std::vector GetFiles () const; -private: - const Project* project; - const Module* module; - const XMLElement* node; - std::vector files; - FileLocation *default_name; -}; - - -class CompilationUnitSupportCode -{ -public: - const Project& project; - - CompilationUnitSupportCode ( const Project& project ); - ~CompilationUnitSupportCode (); - void Generate ( bool verbose ); -private: - void GenerateForModule ( Module& module, - bool verbose ); - std::string GetCompilationUnitFilename ( Module& module, - CompilationUnit& compilationUnit ); - void WriteCompilationUnitFile ( Module& module, - CompilationUnit& compilationUnit ); -}; - - -enum AutoRegisterType -{ - DllRegisterServer, - DllInstall, - Both -}; - -class AutoRegister : public XmlNode -{ -public: - const Module* module; - std::string infSection; - AutoRegisterType type; - AutoRegister ( const Project& project_, - const Module* module_, - const XMLElement& node_ ); -private: - bool IsSupportedModuleType ( ModuleType type ); - AutoRegisterType GetAutoRegisterType( const std::string& type ); - void Initialize (); -}; - - -class SysSetupGenerator -{ -public: - const Project& project; - SysSetupGenerator ( const Project& project ); - ~SysSetupGenerator (); - void Generate (); -private: - std::string GetDirectoryId ( const Module& module ); - std::string GetFlags ( const Module& module ); - void Generate ( HINF inf, - const Module& module ); -}; - - -extern void -InitializeEnvironment (); - -extern std::string -Right ( const std::string& s, size_t n ); - -extern std::string -Replace ( const std::string& s, const std::string& find, const std::string& with ); - -extern std::string -ChangeSeparator ( const std::string& s, - const char fromSeparator, - const char toSeparator ); - -extern std::string -FixSeparator ( const std::string& s ); - -extern std::string -FixSeparatorForSystemCommand ( const std::string& s ); - -extern std::string -DosSeparator ( const std::string& s ); - -extern std::string -ReplaceExtension ( - const std::string& filename, - const std::string& newExtension ); - -extern std::string -GetSubPath ( - const Project& project, - const std::string& location, - const std::string& path, - const std::string& att_value ); - -extern std::string -GetExtension ( const std::string& filename ); - -extern std::string -GetExtension ( const FileLocation& file ); - -extern std::string -NormalizeFilename ( const std::string& filename ); - -extern std::string -ToLower ( std::string filename ); diff --git a/reactos/tools/rbuild/rbuild.mak b/reactos/tools/rbuild/rbuild.mak deleted file mode 100644 index a2d422d908e..00000000000 --- a/reactos/tools/rbuild/rbuild.mak +++ /dev/null @@ -1,560 +0,0 @@ -# Copyright (C) 2005 Casper S. Hornstrup -# -# 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. - -RBUILD_BASE = $(TOOLS_BASE_)rbuild -RBUILD_BASE_ = $(RBUILD_BASE)$(SEP) -RBUILD_INT = $(INTERMEDIATE_)$(RBUILD_BASE) -RBUILD_INT_ = $(RBUILD_INT)$(SEP) -RBUILD_OUT = $(OUTPUT_)$(RBUILD_BASE) -RBUILD_OUT_ = $(RBUILD_OUT)$(SEP) - -$(RBUILD_INT): | $(TOOLS_INT) - $(ECHO_MKDIR) - ${mkdir} $@ - -ifneq ($(INTERMEDIATE),$(OUTPUT)) -$(RBUILD_OUT): | $(TOOLS_OUT) - $(ECHO_MKDIR) - ${mkdir} $@ -endif - - -RBUILD_BACKEND_BASE = $(RBUILD_BASE_)backend -RBUILD_BACKEND_BASE_ = $(RBUILD_BACKEND_BASE)$(SEP) -RBUILD_BACKEND_INT = $(INTERMEDIATE_)$(RBUILD_BACKEND_BASE) -RBUILD_BACKEND_INT_ = $(RBUILD_BACKEND_INT)$(SEP) -RBUILD_BACKEND_OUT = $(OUTPUT_)$(RBUILD_BACKEND_BASE) -RBUILD_BACKEND_OUT_ = $(RBUILD_BACKEND_OUT)$(SEP) - -$(RBUILD_BACKEND_INT): | $(RBUILD_INT) - $(ECHO_MKDIR) - ${mkdir} $@ - -ifneq ($(INTERMEDIATE),$(OUTPUT)) -$(RBUILD_BACKEND_OUT): | $(RBUILD_OUT) - $(ECHO_MKDIR) - ${mkdir} $@ -endif - - -RBUILD_MINGW_BASE = $(RBUILD_BACKEND_BASE_)mingw -RBUILD_MINGW_BASE_ = $(RBUILD_MINGW_BASE)$(SEP) -RBUILD_MINGW_INT = $(INTERMEDIATE_)$(RBUILD_MINGW_BASE) -RBUILD_MINGW_INT_ = $(RBUILD_MINGW_INT)$(SEP) -RBUILD_MINGW_OUT = $(OUTPUT_)$(RBUILD_MINGW_BASE) -RBUILD_MINGW_OUT_ = $(RBUILD_MINGW_OUT)$(SEP) - -$(RBUILD_MINGW_INT): | $(RBUILD_BACKEND_INT) - $(ECHO_MKDIR) - ${mkdir} $@ - -ifneq ($(INTERMEDIATE),$(OUTPUT)) -$(RBUILD_MINGW_OUT): | $(RBUILD_BACKEND_OUT) - $(ECHO_MKDIR) - ${mkdir} $@ -endif - - -RBUILD_TESTS_BASE = $(RBUILD_BASE_)tests -RBUILD_TESTS_BASE_ = $(RBUILD_TESTS_BASE)$(SEP) -RBUILD_TESTS_INT = $(INTERMEDIATE_)$(RBUILD_TESTS_BASE) -RBUILD_TESTS_INT_ = $(RBUILD_TESTS_INT)$(SEP) -RBUILD_TESTS_OUT = $(OUTPUT_)$(RBUILD_TESTS_BASE) - -$(RBUILD_TESTS_INT): | $(RBUILD_INT) - $(ECHO_MKDIR) - ${mkdir} $@ - -ifneq ($(INTERMEDIATE),$(OUTPUT)) -$(RBUILD_TESTS_OUT): | $(RBUILD_OUT) - $(ECHO_MKDIR) - ${mkdir} $@ -endif - -RBUILD_MSBUILD_BASE = $(RBUILD_BACKEND_BASE_)msbuild -RBUILD_MSBUILD_BASE_ = $(RBUILD_MSBUILD_BASE)$(SEP) -RBUILD_MSBUILD_INT = $(INTERMEDIATE_)$(RBUILD_MSBUILD_BASE) -RBUILD_MSBUILD_INT_ = $(RBUILD_MSBUILD_INT)$(SEP) -RBUILD_MSBUILD_OUT = $(OUTPUT_)$(RBUILD_MSBUILD_BASE) -RBUILD_MSBUILD_OUT_ = $(RBUILD_MSBUILD_OUT)$(SEP) - -$(RBUILD_MSBUILD_INT): | $(RBUILD_BACKEND_INT) - $(ECHO_MKDIR) - ${mkdir} $@ - -ifneq ($(INTERMEDIATE),$(OUTPUT)) -$(RBUILD_MSBUILD_OUT): | $(RBUILD_BACKEND_OUT) - $(ECHO_MKDIR) - ${mkdir} $@ -endif - -RBUILD_DEPMAP_BASE = $(RBUILD_BACKEND_BASE_)dependencymap -RBUILD_DEPMAP_BASE_ = $(RBUILD_DEPMAP_BASE)$(SEP) -RBUILD_DEPMAP_INT = $(INTERMEDIATE_)$(RBUILD_DEPMAP_BASE) -RBUILD_DEPMAP_INT_ = $(RBUILD_DEPMAP_INT)$(SEP) -RBUILD_DEPMAP_OUT = $(OUTPUT_)$(RBUILD_DEPMAP_BASE) -RBUILD_DEPMAP_OUT_ = $(RBUILD_DEPMAP_OUT)$(SEP) - -$(RBUILD_DEPMAP_INT): | $(RBUILD_BACKEND_INT) - $(ECHO_MKDIR) - ${mkdir} $@ - -ifneq ($(INTERMEDIATE),$(OUTPUT)) -$(RBUILD_DEPMAP_OUT): | $(RBUILD_BACKEND_OUT) - $(ECHO_MKDIR) - ${mkdir} $@ -endif - -RBUILD_VREPORT_BASE = $(RBUILD_BACKEND_BASE_)versionreport -RBUILD_VREPORT_BASE_ = $(RBUILD_VREPORT_BASE)$(SEP) -RBUILD_VREPORT_INT = $(INTERMEDIATE_)$(RBUILD_VREPORT_BASE) -RBUILD_VREPORT_INT_ = $(RBUILD_VREPORT_INT)$(SEP) -RBUILD_VREPORT_OUT = $(OUTPUT_)$(RBUILD_VREPORT_BASE) -RBUILD_VREPORT_OUT_ = $(RBUILD_VREPORT_OUT)$(SEP) - -$(RBUILD_VREPORT_INT): | $(RBUILD_BACKEND_INT) - $(ECHO_MKDIR) - ${mkdir} $@ - -ifneq ($(INTERMEDIATE),$(OUTPUT)) -$(RBUILD_VREPORT_OUT): | $(RBUILD_BACKEND_OUT) - $(ECHO_MKDIR) - ${mkdir} $@ -endif - - -RBUILD_MSVC_BASE = $(RBUILD_BACKEND_BASE_)msvc -RBUILD_MSVC_BASE_ = $(RBUILD_MSVC_BASE)$(SEP) -RBUILD_MSVC_INT = $(INTERMEDIATE_)$(RBUILD_MSVC_BASE) -RBUILD_MSVC_INT_ = $(RBUILD_MSVC_INT)$(SEP) -RBUILD_MSVC_OUT = $(OUTPUT_)$(RBUILD_MSVC_BASE) -RBUILD_MSVC_OUT_ = $(RBUILD_MSVC_OUT)$(SEP) - -$(RBUILD_MSVC_INT): | $(RBUILD_BACKEND_INT) - $(ECHO_MKDIR) - ${mkdir} $@ - -ifneq ($(INTERMEDIATE),$(OUTPUT)) -$(RBUILD_MSVC_OUT): | $(RBUILD_BACKEND_OUT) - $(ECHO_MKDIR) - ${mkdir} $@ -endif - - -RBUILD_TARGET = \ - $(RBUILD_OUT_)rbuild$(EXEPOSTFIX) - -RBUILD_TEST_TARGET = \ - $(RBUILD_OUT_)rbuild_test$(EXEPOSTFIX) - -RBUILD_BACKEND_MINGW_BASE_SOURCES = $(addprefix $(RBUILD_MINGW_BASE_), \ - mingw.cpp \ - modulehandler.cpp \ - mstools_detection.cpp \ - proxymakefile.cpp \ - rule.cpp \ - ) - -RBUILD_BACKEND_DEPMAP_BASE_SOURCES = $(addprefix $(RBUILD_DEPMAP_BASE_), \ - dependencymap.cpp \ - ) - -RBUILD_BACKEND_VREPORT_BASE_SOURCES = $(addprefix $(RBUILD_VREPORT_BASE_), \ - versionreport.cpp \ - ) - -RBUILD_BACKEND_MSBUILD_BASE_SOURCES = $(addprefix $(RBUILD_MSBUILD_BASE_), \ - msbuild.cpp \ - ) - -RBUILD_BACKEND_MSVC_BASE_SOURCES = $(addprefix $(RBUILD_MSVC_BASE_), \ - genguid.cpp \ - msvc.cpp \ - projmaker.cpp \ - propsmaker.cpp \ - slnmaker.cpp \ - vcprojmaker.cpp \ - vcxprojmaker.cpp \ - vspropsmaker.cpp \ - ) - -RBUILD_BACKEND_SOURCES = \ - $(RBUILD_BACKEND_MINGW_BASE_SOURCES) \ - $(RBUILD_BACKEND_MSVC_BASE_SOURCES) \ - $(RBUILD_BACKEND_DEPMAP_BASE_SOURCES) \ - $(RBUILD_BACKEND_VREPORT_BASE_SOURCES) \ - $(RBUILD_BACKEND_MSBUILD_BASE_SOURCES) \ - $(RBUILD_BACKEND_BASE_)backend.cpp - -RBUILD_SOURCES = \ - $(RBUILD_BACKEND_SOURCES) \ - $(addprefix $(RBUILD_BASE_), \ - global.cpp \ - automaticdependency.cpp \ - autoregister.cpp \ - bootstrap.cpp \ - cdfile.cpp \ - compilationunit.cpp \ - compilationunitsupportcode.cpp \ - compilerdirective.cpp \ - compilerflag.cpp \ - configuration.cpp \ - define.cpp \ - directory.cpp \ - exception.cpp \ - filesupportcode.cpp \ - include.cpp \ - installfile.cpp \ - linkerflag.cpp \ - linkerscript.cpp \ - module.cpp \ - project.cpp \ - rbuild.cpp \ - stubbedcomponent.cpp \ - syssetupgenerator.cpp \ - testsupportcode.cpp \ - xmlnode.cpp \ - ) - -RBUILD_OBJECTS = \ - $(addprefix $(INTERMEDIATE_), $(RBUILD_SOURCES:.cpp=.o)) - -RBUILD_BACKEND_MSVCCPP_HEADERS = \ - msvc.h - -RBUILD_BACKEND_DEPMAP_HEADERS = \ - dependencymap.h - -RBUILD_BACKEND_VREPORT_HEADERS = \ - versionreport.h - -RBUILD_BACKEND_MSBUILD_HEADERS = \ - msbuild.h - -RBUILD_BACKEND_MINGW_HEADERS = \ - mingw.h \ - modulehandler.h \ - rule.h - -RBUILD_BACKEND_HEADERS = \ - backend.h \ - $(addprefix msvc$(SEP), $(RBUILD_BACKEND_MSVC_HEADERS)) \ - $(addprefix mingw$(SEP), $(RBUILD_BACKEND_MINGW_HEADERS)) \ - $(addprefix msbuild$(SEP), $(RBUILD_BACKEND_MSBUILD_HEADERS)) \ - $(addprefix versionreport$(SEP), $(RBUILD_BACKEND_VREPORT_HEADERS)) \ - $(addprefix dependencymap$(SEP), $(RBUILD_BACKEND_DEPMAP_HEADERS)) - -RBUILD_HEADERS = \ - $(addprefix $(RBUILD_BASE_), \ - exception.h \ - pch.h \ - rbuild.h \ - test.h \ - $(addprefix backend$(SEP), $(RBUILD_BACKEND_HEADERS)) \ - ) \ - $(XML_SSPRINTF_HEADERS) - -RBUILD_TESTS = \ - tests$(SEP)cdfiletest.cpp \ - tests$(SEP)compilationunittest.cpp \ - tests$(SEP)definetest.cpp \ - tests$(SEP)functiontest.cpp \ - tests$(SEP)iftest.cpp \ - tests$(SEP)includetest.cpp \ - tests$(SEP)invoketest.cpp \ - tests$(SEP)linkerflagtest.cpp \ - tests$(SEP)moduletest.cpp \ - tests$(SEP)projecttest.cpp \ - tests$(SEP)sourcefiletest.cpp \ - tests$(SEP)symboltest.cpp - -RBUILD_TEST_SPECIAL_SOURCES = \ - $(addprefix $(RBUILD_BASE_), $(RBUILD_TESTS)) \ - $(RBUILD_BASE_)tests$(SEP)alltests.cpp - -RBUILD_TEST_SOURCES = \ - $(RBUILD_COMMON_SOURCES) \ - $(RBUILD_TEST_SPECIAL_SOURCES) - -RBUILD_TEST_SPECIAL_OBJECTS = \ - $(addprefix $(INTERMEDIATE_), $(RBUILD_TEST_SPECIAL_SOURCES:.cpp=.o)) - -RBUILD_TEST_OBJECTS = \ - $(RBUILD_COMMON_OBJECTS) \ - $(RBUILD_TEST_SPECIAL_OBJECTS) - -RBUILD_HOST_CXXFLAGS = -I$(RBUILD_BASE) -I$(TOOLS_BASE) -I$(INFLIB_BASE) $(TOOLS_CPPFLAGS) -Iinclude -Iinclude/reactos -Iinclude/host - -RBUILD_HOST_LFLAGS = $(TOOLS_LFLAGS) - -ifeq ($(HOST),mingw32-windows) -RBUILD_HOST_LFLAGS += -loleaut32 -lole32 -luuid -endif - -.PHONY: rbuild -rbuild: $(RBUILD_TARGET) -host_gpp += -g - -$(RBUILD_TARGET): $(RBUILD_OBJECTS) $(XML_SSPRINTF_OBJECTS) $(INFLIB_HOST_OBJECTS) | $(RBUILD_OUT) - $(ECHO_HOSTLD) - ${host_gpp} $^ $(RBUILD_HOST_LFLAGS) -o $@ - -$(RBUILD_INT_)global.o: $(RBUILD_BASE_)global.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)automaticdependency.o: $(RBUILD_BASE_)automaticdependency.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)autoregister.o: $(RBUILD_BASE_)autoregister.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)bootstrap.o: $(RBUILD_BASE_)bootstrap.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)cdfile.o: $(RBUILD_BASE_)cdfile.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)compilationunit.o: $(RBUILD_BASE_)compilationunit.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)compilationunitsupportcode.o: $(RBUILD_BASE_)compilationunitsupportcode.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)compilerdirective.o: $(RBUILD_BASE_)compilerdirective.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)compilerflag.o: $(RBUILD_BASE_)compilerflag.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)configuration.o: $(RBUILD_BASE_)configuration.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)define.o: $(RBUILD_BASE_)define.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)directory.o: $(RBUILD_BASE_)directory.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)exception.o: $(RBUILD_BASE_)exception.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)filesupportcode.o: $(RBUILD_BASE_)filesupportcode.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)include.o: $(RBUILD_BASE_)include.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)installfile.o: $(RBUILD_BASE_)installfile.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)linkerflag.o: $(RBUILD_BASE_)linkerflag.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)linkerscript.o: $(RBUILD_BASE_)linkerscript.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)module.o: $(RBUILD_BASE_)module.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)project.o: $(RBUILD_BASE_)project.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)rbuild.o: $(RBUILD_BASE_)rbuild.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)rule.o: $(RBUILD_BASE_)rule.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)stubbedcomponent.o: $(RBUILD_BASE_)stubbedcomponent.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)syssetupgenerator.o: $(RBUILD_BASE_)syssetupgenerator.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)wineresource.o: $(RBUILD_BASE_)wineresource.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)xmlnode.o: $(RBUILD_BASE_)xmlnode.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_INT_)testsupportcode.o: $(RBUILD_BASE_)testsupportcode.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_BACKEND_INT_)backend.o: $(RBUILD_BACKEND_BASE_)backend.cpp $(RBUILD_HEADERS) | $(RBUILD_BACKEND_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_MINGW_INT_)mingw.o: $(RBUILD_MINGW_BASE_)mingw.cpp $(RBUILD_HEADERS) | $(RBUILD_MINGW_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_MINGW_INT_)modulehandler.o: $(RBUILD_MINGW_BASE_)modulehandler.cpp $(RBUILD_HEADERS) | $(RBUILD_MINGW_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_MINGW_INT_)mstools_detection.o: $(RBUILD_MINGW_BASE_)mstools_detection.cpp $(RBUILD_HEADERS) | $(RBUILD_MINGW_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_MINGW_INT_)proxymakefile.o: $(RBUILD_MINGW_BASE_)proxymakefile.cpp $(RBUILD_HEADERS) | $(RBUILD_MINGW_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_MINGW_INT_)rule.o: $(RBUILD_MINGW_BASE_)rule.cpp $(RBUILD_HEADERS) | $(RBUILD_MINGW_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_DEPMAP_INT_)dependencymap.o: $(RBUILD_DEPMAP_BASE_)dependencymap.cpp $(RBUILD_HEADERS) | $(RBUILD_DEPMAP_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_VREPORT_INT_)versionreport.o: $(RBUILD_VREPORT_BASE_)versionreport.cpp $(RBUILD_HEADERS) | $(RBUILD_VREPORT_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_MSBUILD_INT_)msbuild.o: $(RBUILD_MSBUILD_BASE_)msbuild.cpp $(RBUILD_HEADERS) | $(RBUILD_MSBUILD_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_MSVC_INT_)genguid.o: $(RBUILD_MSVC_BASE_)genguid.cpp $(RBUILD_HEADERS) | $(RBUILD_MSVC_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_MSVC_INT_)msvc.o: $(RBUILD_MSVC_BASE_)msvc.cpp $(RBUILD_HEADERS) | $(RBUILD_MSVC_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_MSVC_INT_)projmaker.o: $(RBUILD_MSVC_BASE_)projmaker.cpp $(RBUILD_HEADERS) | $(RBUILD_MSVC_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_MSVC_INT_)vspropsmaker.o: $(RBUILD_MSVC_BASE_)vspropsmaker.cpp $(RBUILD_HEADERS) | $(RBUILD_MSVC_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_MSVC_INT_)propsmaker.o: $(RBUILD_MSVC_BASE_)propsmaker.cpp $(RBUILD_HEADERS) | $(RBUILD_MSVC_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_MSVC_INT_)slnmaker.o: $(RBUILD_MSVC_BASE_)slnmaker.cpp $(RBUILD_HEADERS) | $(RBUILD_MSVC_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_MSVC_INT_)vcprojmaker.o: $(RBUILD_MSVC_BASE_)vcprojmaker.cpp $(RBUILD_HEADERS) | $(RBUILD_MSVC_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_MSVC_INT_)vcxprojmaker.o: $(RBUILD_MSVC_BASE_)vcxprojmaker.cpp $(RBUILD_HEADERS) | $(RBUILD_MSVC_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_TEST_TARGET): $(RBUILD_TEST_OBJECTS) $(INFLIB_HOST_OBJECTS) $(RBUILD_HEADERS) | $(RBUILD_OUT) - $(ECHO_HOSTLD) - ${host_gpp} $(RBUILD_TEST_OBJECTS) $(INFLIB_HOST_OBJECTS) $(RBUILD_HOST_LFLAGS) -o $@ - -$(RBUILD_TESTS_INT_)cdfiletest.o: $(RBUILD_TESTS_BASE_)cdfiletest.cpp $(RBUILD_HEADERS) | $(RBUILD_TESTS_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_TESTS_INT_)compilationunittest.o: $(RBUILD_TESTS_BASE_)compilationunittest.cpp $(RBUILD_HEADERS) | $(RBUILD_TESTS_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_TESTS_INT_)definetest.o: $(RBUILD_TESTS_BASE_)definetest.cpp $(RBUILD_HEADERS) | $(RBUILD_TESTS_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_TESTS_INT_)functiontest.o: $(RBUILD_TESTS_BASE_)functiontest.cpp $(RBUILD_HEADERS) | $(RBUILD_TESTS_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_TESTS_INT_)iftest.o: $(RBUILD_TESTS_BASE_)iftest.cpp $(RBUILD_HEADERS) | $(RBUILD_TESTS_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_TESTS_INT_)includetest.o: $(RBUILD_TESTS_BASE_)includetest.cpp $(RBUILD_HEADERS) | $(RBUILD_TESTS_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_TESTS_INT_)invoketest.o: $(RBUILD_TESTS_BASE_)invoketest.cpp $(RBUILD_HEADERS) | $(RBUILD_TESTS_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_TESTS_INT_)linkerflagtest.o: $(RBUILD_TESTS_BASE_)linkerflagtest.cpp $(RBUILD_HEADERS) | $(RBUILD_TESTS_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_TESTS_INT_)moduletest.o: $(RBUILD_TESTS_BASE_)moduletest.cpp $(RBUILD_HEADERS) | $(RBUILD_TESTS_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_TESTS_INT_)projecttest.o: $(RBUILD_TESTS_BASE_)projecttest.cpp $(RBUILD_HEADERS) | $(RBUILD_TESTS_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_TESTS_INT_)sourcefiletest.o: $(RBUILD_TESTS_BASE_)sourcefiletest.cpp $(RBUILD_HEADERS) | $(RBUILD_TESTS_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_TESTS_INT_)symboltest.o: $(RBUILD_TESTS_BASE_)symboltest.cpp $(RBUILD_HEADERS) | $(RBUILD_TESTS_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - -$(RBUILD_TESTS_INT_)alltests.o: $(RBUILD_TESTS_BASE_)alltests.cpp $(RBUILD_HEADERS) | $(RBUILD_TESTS_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ - - -.PHONY: rbuild_test -rbuild_test: $(RBUILD_TEST_TARGET) - $(ECHO_TEST) - $(Q)$(RBUILD_TEST_TARGET) - -.PHONY: rbuild_test_clean -rbuild_test_clean: $(RBUILD_TEST_TARGET) $(RBUILD_TESTS_INT) - -@$(rm) $(RBUILD_TEST_TARGET) $(RBUILD_TEST_SPECIAL_OBJECTS) 2>$(NUL) - -.PHONY: rbuild_clean -rbuild_clean: $(RBUILD_TARGET) $(RBUILD_OBJECTS) $(RBUILD_TESTS_INT) - -@$(rm) $(RBUILD_TARGET) $(RBUILD_OBJECTS) 2>$(NUL) -clean: rbuild_clean diff --git a/reactos/tools/rbuild/rbuild.sln b/reactos/tools/rbuild/rbuild.sln deleted file mode 100644 index b3fc0e817cb..00000000000 --- a/reactos/tools/rbuild/rbuild.sln +++ /dev/null @@ -1,19 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rbuild", "rbuild.vcproj", "{D9305AFB-499E-49F1-A865-99DD7E19E762}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D9305AFB-499E-49F1-A865-99DD7E19E762}.Debug|Win32.ActiveCfg = Debug|Win32 - {D9305AFB-499E-49F1-A865-99DD7E19E762}.Debug|Win32.Build.0 = Debug|Win32 - {D9305AFB-499E-49F1-A865-99DD7E19E762}.Release|Win32.ActiveCfg = Release|Win32 - {D9305AFB-499E-49F1-A865-99DD7E19E762}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/reactos/tools/rbuild/rbuild.vcproj b/reactos/tools/rbuild/rbuild.vcproj deleted file mode 100644 index cd7ff0494cc..00000000000 --- a/reactos/tools/rbuild/rbuild.vcproj +++ /dev/null @@ -1,1286 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/reactos/tools/rbuild/stubbedcomponent.cpp b/reactos/tools/rbuild/stubbedcomponent.cpp deleted file mode 100644 index 1444d6b830d..00000000000 --- a/reactos/tools/rbuild/stubbedcomponent.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "pch.h" -#include - -#include "rbuild.h" - -using std::string; -using std::vector; - -StubbedComponent::StubbedComponent ( const Module* module_, - const XMLElement& stubbedComponentNode ) - : module(module_), - node(stubbedComponentNode) -{ - const XMLAttribute* att = node.GetAttribute ( "name", true ); - assert ( att ); - name = att->value; -} - -StubbedComponent::~StubbedComponent () -{ - for ( size_t i = 0; i < symbols.size(); i++ ) - delete symbols[i]; -} - -void -StubbedComponent::ProcessXML () -{ - size_t i; - for ( i = 0; i < node.subElements.size (); i++ ) - ProcessXMLSubElement ( *node.subElements[i] ); - for ( i = 0; i < symbols.size (); i++ ) - symbols[i]->ProcessXML (); -} - -void -StubbedComponent::ProcessXMLSubElement ( const XMLElement& e ) -{ - bool subs_invalid = false; - if ( e.name == "symbol" ) - { - symbols.push_back ( new StubbedSymbol ( e ) ); - subs_invalid = false; - } - if ( subs_invalid && e.subElements.size () > 0 ) - { - throw XMLInvalidBuildFileException ( - e.location, - "<%s> cannot have sub-elements", - e.name.c_str() ); - } - for ( size_t i = 0; i < e.subElements.size (); i++ ) - ProcessXMLSubElement ( *e.subElements[i] ); -} - - - -StubbedSymbol::StubbedSymbol ( const XMLElement& stubbedSymbolNode ) - : node(stubbedSymbolNode) -{ -} - -StubbedSymbol::~StubbedSymbol () -{ -} - -void -StubbedSymbol::ProcessXML () -{ - if ( node.value.size () == 0 ) - { - throw XMLInvalidBuildFileException ( - node.location, - " is empty." ); - } - symbol = node.value; - - strippedName = StripSymbol ( symbol ); - - const XMLAttribute* att = node.GetAttribute ( "newname", false ); - if ( att != NULL ) - newname = att->value; - else - newname = strippedName; -} - -string -StubbedSymbol::StripSymbol ( string symbol ) -{ - size_t start = 0; - while ( start < symbol.length () && symbol[start] == '@') - start++; - size_t end = symbol.length () - 1; - while ( end > 0 && isdigit ( symbol[end] ) ) - end--; - if ( end > 0 && symbol[end] == '@' ) - end--; - if ( end > 0 ) - return symbol.substr ( start, end - start + 1 ); - else - return ""; -} diff --git a/reactos/tools/rbuild/syssetupgenerator.cpp b/reactos/tools/rbuild/syssetupgenerator.cpp deleted file mode 100644 index c7e64e8cf7a..00000000000 --- a/reactos/tools/rbuild/syssetupgenerator.cpp +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "pch.h" -#include - -#include "rbuild.h" - -using std::string; -using std::vector; - -SysSetupGenerator::SysSetupGenerator ( const Project& project ) - : project ( project ) -{ -} - -SysSetupGenerator::~SysSetupGenerator () -{ -} - -void -SysSetupGenerator::Generate () -{ - HINF inf; - ULONG errorLine; - - string syssetupTemplate = "media" + sSep + "inf" + sSep + "syssetup.inf.tpl"; - string syssetup = Environment::GetOutputPath() + sSep + "media" + sSep + "inf" + sSep + "syssetup.inf"; - - if ( 0 != InfHostOpenFile ( &inf, syssetupTemplate.c_str (), &errorLine ) ) - throw new FileNotFoundException ( syssetupTemplate ); - - for( std::map::const_iterator p = project.modules.begin(); p != project.modules.end(); ++ p ) - { - const Module& module = *p->second; - if ( module.autoRegister != NULL ) - Generate ( inf, module ); - } - - if ( 0 != InfHostWriteFile ( inf, syssetup.c_str (), "" ) ) - { - InfHostCloseFile ( inf ); - throw new AccessDeniedException ( syssetup ); - } - - InfHostCloseFile ( inf ); -} - -#define DIRECTORYID_SYSTEM32 "11" - -string -SysSetupGenerator::GetDirectoryId ( const Module& module ) -{ - if ( module.install && ToLower ( module.install->relative_path ) == "system32" ) - return DIRECTORYID_SYSTEM32; - throw InvalidOperationException ( __FILE__, - __LINE__ ); -} - -#define FLG_REGSVR_DLLREGISTER "1" -#define FLG_REGSVR_DLLINSTALL "2" -#define FLG_REGSVR_BOTH "3" - -string -SysSetupGenerator::GetFlags ( const Module& module ) -{ - if ( module.autoRegister->type == DllRegisterServer ) - return FLG_REGSVR_DLLREGISTER; - if ( module.autoRegister->type == DllInstall ) - return FLG_REGSVR_DLLINSTALL; - if ( module.autoRegister->type == Both ) - return FLG_REGSVR_BOTH; - throw InvalidOperationException ( __FILE__, - __LINE__ ); -} - -void -SysSetupGenerator::Generate ( HINF inf, - const Module& module ) -{ - PINFCONTEXT context; - - string infSection = module.autoRegister->infSection; - if ( 0 != InfHostFindOrAddSection ( inf, infSection.c_str (), &context ) ) - { - throw new Exception ( ".inf section '%s' not found", infSection.c_str () ); - InfHostCloseFile ( inf ); - } - - if ( 0 != InfHostAddLine ( context, NULL ) || - 0 != InfHostAddField ( context, GetDirectoryId ( module ).c_str () ) || - 0 != InfHostAddField ( context, "" ) || - ( module.install && 0 != InfHostAddField ( context, module.install->name.c_str () ) ) || - 0 != InfHostAddField ( context, GetFlags ( module ).c_str () ) ) - { - InfHostFreeContext ( context ); - InfHostCloseFile ( inf ); - throw InvalidOperationException ( __FILE__, - __LINE__ ); - } - - InfHostFreeContext ( context ); -} diff --git a/reactos/tools/rbuild/test.h b/reactos/tools/rbuild/test.h deleted file mode 100644 index 69e131f44ed..00000000000 --- a/reactos/tools/rbuild/test.h +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 - -#include "rbuild.h" -#include "backend/mingw/mingw.h" - -#define SSEP DEF_SSEP - -#define RBUILD_BASE "tools" SSEP "rbuild" SSEP - -class BaseTest -{ -public: - bool Failed; - BaseTest (); - virtual ~BaseTest (); - virtual void Run () = 0; -protected: - void Assert ( const char *message, - ... ); - void IsNull ( void* reference, - const char* file, - int line ); - void IsNotNull ( void* reference, - const char* file, - int line ); - void IsTrue ( bool condition, - const char* file, - int line ); - void IsFalse ( bool condition, - const char* file, - int line ); - void AreEqual ( int expected, - int actual, - const char* file, - int line ); - void AreEqual ( const std::string& expected, - const std::string& actual, - const char* file, - int line ); - void AreNotEqual ( int expected, - int actual, - const char* file, - int line ); -private: - void Fail (); -}; - -#define IS_NULL(reference) IsNull((void*)reference,__FILE__,__LINE__) -#define IS_NOT_NULL(reference) IsNotNull((void*)reference,__FILE__,__LINE__) -#define IS_TRUE(condition) IsTrue(condition,__FILE__,__LINE__) -#define IS_FALSE(condition) IsFalse(condition,__FILE__,__LINE__) -#define ARE_EQUAL(expected,actual) AreEqual(expected,actual,__FILE__,__LINE__) -#define ARE_NOT_EQUAL(expected,actual) AreNotEqual(expected,actual,__FILE__,__LINE__) - -class ProjectTest : public BaseTest -{ -public: - void Run (); -}; - - -class ModuleTest : public BaseTest -{ -public: - void Run (); -}; - - -class DefineTest : public BaseTest -{ -public: - void Run (); -}; - - -class IncludeTest : public BaseTest -{ -public: - void Run (); -}; - - -class InvokeTest : public BaseTest -{ -public: - void Run (); -}; - - -class LinkerFlagTest : public BaseTest -{ -public: - void Run (); -}; - - -class IfTest : public BaseTest -{ -public: - void Run (); -private: - void TestProjectIf ( Project& project ); - void TestModuleIf ( Project& project ); -}; - - -class FunctionTest : public BaseTest -{ -public: - void Run (); -}; - - -class SourceFileTest : public BaseTest -{ -public: - void Run (); - void IncludeTest (); - void FullParseTest (); -private: - bool IsParentOf ( const SourceFile* parent, - const SourceFile* child ); - -}; - - -class CDFileTest : public BaseTest -{ -public: - void Run (); -}; - - -class SymbolTest : public BaseTest -{ -public: - void Run (); -}; - -class CompilationUnitTest : public BaseTest -{ -public: - void Run (); -}; diff --git a/reactos/tools/rbuild/tests/alltests.cpp b/reactos/tools/rbuild/tests/alltests.cpp deleted file mode 100644 index 5451d81b0fb..00000000000 --- a/reactos/tools/rbuild/tests/alltests.cpp +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "pch.h" - -#include "rbuild.h" -#include "test.h" - -BaseTest::BaseTest() -{ - Failed = false; -} - -BaseTest::~BaseTest() -{ -} - -void BaseTest::Assert(const char *message, ...) -{ - va_list args; - va_start ( args, message ); - vprintf(message, args); - va_end ( args ); - Fail(); -} - -void BaseTest::IsNull(void* reference, - const char* file, - int line) -{ - if (reference != NULL) - { - Assert("Condition was not NULL at %s:%d\n", - file, - line); - } -} - -void BaseTest::IsNotNull(void* reference, - const char* file, - int line) -{ - if (reference == NULL) - { - Assert("Condition was NULL at %s:%d\n", - file, - line); - } -} - -void BaseTest::IsTrue(bool condition, - const char* file, - int line) -{ - if (!condition) - { - Assert("Condition was not true at %s:%d\n", - file, - line); - } -} - -void BaseTest::IsFalse(bool condition, - const char* file, - int line) -{ - if (condition) - { - Assert("Condition was not false at %s:%d\n", - file, - line); - } -} - -void BaseTest::AreEqual(int expected, - int actual, - const char* file, - int line) -{ - if (actual != expected) - { - Assert("Expected %d/0x%.08x was %d/0x%.08x at %s:%d\n", - expected, - expected, - actual, - actual, - file, - line); - } -} - -void BaseTest::AreEqual(const std::string& expected, - const std::string& actual, - const char* file, - int line) -{ - if (actual != expected) - { - Assert("Expected '%s' was '%s' at %s:%d\n", - expected.c_str(), - actual.c_str(), - file, - line); - } -} - -void BaseTest::AreNotEqual(int expected, - int actual, - const char* file, - int line) -{ - if (actual == expected) - { - Assert("Actual value expected to be different from %d/0x%.08x at %s:%d\n", - expected, - expected, - file, - line); - } -} - -void BaseTest::Fail() -{ - Failed = true; -} - -class BaseTestList : public std::vector -{ -public: - ~BaseTestList() - { - for ( size_t i = 0; i < size(); i++ ) - { - delete (*this)[i]; - } - } -}; - -class TestDispatcher -{ -public: - void Run() - { - int numberOfFailedTests = 0; - BaseTestList tests; - GetTests(tests); - for (size_t i = 0; i < tests.size(); i++) - { - try - { - BaseTest& test = *tests[i]; - test.Run(); - if (test.Failed) - numberOfFailedTests++; - } - catch ( Exception& ex ) - { - printf ( "%s\n", (*ex).c_str () ); - numberOfFailedTests++; - } - catch ( XMLException& ex ) - { - printf ( "%s\n", (*ex).c_str () ); - numberOfFailedTests++; - } - } - - if (numberOfFailedTests > 0) - printf("%d tests failed\n", - numberOfFailedTests); - else - printf("All tests succeeded\n"); - } - -private: - void GetTests ( BaseTestList& tests ) - { - tests.push_back(new ProjectTest()); - tests.push_back(new ModuleTest()); - tests.push_back(new DefineTest()); - tests.push_back(new IncludeTest()); - tests.push_back(new InvokeTest()); - tests.push_back(new LinkerFlagTest()); - tests.push_back(new IfTest()); - tests.push_back(new FunctionTest()); - tests.push_back(new SourceFileTest()); - tests.push_back(new CDFileTest()); - tests.push_back(new SymbolTest()); - tests.push_back(new CompilationUnitTest()); - } -}; - - -int main(int argc, - char** argv) -{ - InitializeEnvironment (); - TestDispatcher testDispatcher; - testDispatcher.Run(); - return 0; -}; diff --git a/reactos/tools/rbuild/tests/cdfiletest.cpp b/reactos/tools/rbuild/tests/cdfiletest.cpp deleted file mode 100644 index 56cf6740191..00000000000 --- a/reactos/tools/rbuild/tests/cdfiletest.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "test.h" - -using std::string; - -void CDFileTest::Run() -{ - string projectFilename ( RBUILD_BASE "tests/data/cdfile.xml" ); - Configuration configuration; - Project project ( configuration, projectFilename ); - ARE_EQUAL ( 3, project.cdfiles.size () ); - - CDFile& cdfile1 = *project.cdfiles[0]; - ARE_EQUAL("dir1", cdfile1.base); - ARE_EQUAL("ReadMe1.txt", cdfile1.nameoncd); - - CDFile& cdfile2 = *project.cdfiles[1]; - ARE_EQUAL("dir2", cdfile2.base); - ARE_EQUAL("readme2.txt", cdfile2.nameoncd); - - CDFile& cdfile3 = *project.cdfiles[2]; - //ARE_EQUAL("", cdfile3.base); - ARE_EQUAL("readme3.txt", cdfile3.nameoncd); -} diff --git a/reactos/tools/rbuild/tests/compilationunittest.cpp b/reactos/tools/rbuild/tests/compilationunittest.cpp deleted file mode 100644 index a74d99d0bf3..00000000000 --- a/reactos/tools/rbuild/tests/compilationunittest.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "test.h" - -using std::string; - -void CompilationUnitTest::Run() -{ - string projectFilename ( RBUILD_BASE "tests/data/compilationunit.xml" ); - Configuration configuration; - Project project ( configuration, projectFilename ); - ARE_EQUAL ( 1, project.modules.size () ); - - Module& module1 = *project.modules[0]; - IS_TRUE ( module1.type == BuildTool ); - - ARE_EQUAL ( 3, module1.non_if_data.files.size()); - ARE_EQUAL ( "dir1" SSEP "file1.c", module1.non_if_data.files[0]->name ); - ARE_EQUAL ( "dir1" SSEP "file2.c", module1.non_if_data.files[1]->name ); - ARE_EQUAL ( "dir1" SSEP "file3.c", module1.non_if_data.files[2]->name ); - - ARE_EQUAL ( 2, module1.non_if_data.compilationUnits.size () ); - - CompilationUnit& compilationUnit1 = *module1.non_if_data.compilationUnits[0]; - ARE_EQUAL ( 2, compilationUnit1.files.size () ); - - ARE_EQUAL ( "dir1" SSEP "file1.c", compilationUnit1.files[0]->name ); - ARE_EQUAL ( "dir1" SSEP "file2.c", compilationUnit1.files[1]->name ); - - CompilationUnit& compilationUnit2 = *module1.non_if_data.compilationUnits[1]; - ARE_EQUAL ( 1, compilationUnit2.files.size () ); - - ARE_EQUAL ( "dir1" SSEP "file3.c", compilationUnit2.files[0]->name ); -} diff --git a/reactos/tools/rbuild/tests/data/automaticdependency.rbuild b/reactos/tools/rbuild/tests/data/automaticdependency.rbuild deleted file mode 100644 index 6612ba36a02..00000000000 --- a/reactos/tools/rbuild/tests/data/automaticdependency.rbuild +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - . - sourcefile1.c - - - - - - diff --git a/reactos/tools/rbuild/tests/data/automaticdependency_include.rbuild b/reactos/tools/rbuild/tests/data/automaticdependency_include.rbuild deleted file mode 100644 index 0fda1c24f56..00000000000 --- a/reactos/tools/rbuild/tests/data/automaticdependency_include.rbuild +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - . - sourcefile1 - sourcefile_include.c - - - - - - diff --git a/reactos/tools/rbuild/tests/data/cdfile.rbuild b/reactos/tools/rbuild/tests/data/cdfile.rbuild deleted file mode 100644 index 42c4a71a157..00000000000 --- a/reactos/tools/rbuild/tests/data/cdfile.rbuild +++ /dev/null @@ -1,9 +0,0 @@ - - - - - readme1.txt - readme2.txt - readme3.txt - - diff --git a/reactos/tools/rbuild/tests/data/compilationunit.rbuild b/reactos/tools/rbuild/tests/data/compilationunit.rbuild deleted file mode 100644 index 3fb03d2ef0f..00000000000 --- a/reactos/tools/rbuild/tests/data/compilationunit.rbuild +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - file1.c - file2.c - - file3.c - - - diff --git a/reactos/tools/rbuild/tests/data/define.rbuild b/reactos/tools/rbuild/tests/data/define.rbuild deleted file mode 100644 index 2dc1fa334cd..00000000000 --- a/reactos/tools/rbuild/tests/data/define.rbuild +++ /dev/null @@ -1,10 +0,0 @@ - - - - value1 - - - value2 - - - diff --git a/reactos/tools/rbuild/tests/data/if.rbuild b/reactos/tools/rbuild/tests/data/if.rbuild deleted file mode 100644 index 415d1bf98cd..00000000000 --- a/reactos/tools/rbuild/tests/data/if.rbuild +++ /dev/null @@ -1,14 +0,0 @@ - - - - - compilerflag1 - - - - compilerflag2 - file1.c - - file2.c - - diff --git a/reactos/tools/rbuild/tests/data/include.rbuild b/reactos/tools/rbuild/tests/data/include.rbuild deleted file mode 100644 index 62ac296fc2a..00000000000 --- a/reactos/tools/rbuild/tests/data/include.rbuild +++ /dev/null @@ -1,15 +0,0 @@ - - - - include1 - - - include2 - - - - - include3 - - - diff --git a/reactos/tools/rbuild/tests/data/invoke.rbuild b/reactos/tools/rbuild/tests/data/invoke.rbuild deleted file mode 100644 index 39d8a65674f..00000000000 --- a/reactos/tools/rbuild/tests/data/invoke.rbuild +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - file1.c - - - file1.c - - - - - diff --git a/reactos/tools/rbuild/tests/data/linkerflag.rbuild b/reactos/tools/rbuild/tests/data/linkerflag.rbuild deleted file mode 100644 index 3abff97e74f..00000000000 --- a/reactos/tools/rbuild/tests/data/linkerflag.rbuild +++ /dev/null @@ -1,8 +0,0 @@ - - - - -lgcc1 - - -lgcc2 - - diff --git a/reactos/tools/rbuild/tests/data/module.rbuild b/reactos/tools/rbuild/tests/data/module.rbuild deleted file mode 100644 index 905affd95a7..00000000000 --- a/reactos/tools/rbuild/tests/data/module.rbuild +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - file1.c - file2.c - - - - - module1 - module1 - file3.c - file4.c - - - diff --git a/reactos/tools/rbuild/tests/data/project.rbuild b/reactos/tools/rbuild/tests/data/project.rbuild deleted file mode 100644 index 30cb97f060a..00000000000 --- a/reactos/tools/rbuild/tests/data/project.rbuild +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/reactos/tools/rbuild/tests/data/sourcefile1.c b/reactos/tools/rbuild/tests/data/sourcefile1.c deleted file mode 100644 index 28af7778e50..00000000000 --- a/reactos/tools/rbuild/tests/data/sourcefile1.c +++ /dev/null @@ -1,13 +0,0 @@ -/* - * ReactOS kernel - */ -/* $Id: main.c 12694 2005-01-01 11:47:33Z hbirr $ - * FILE: ntoskrnl/ke/main.c - */ - -/* INCLUDES *****************************************************************/ - -#include -#include - -/* GLOBALS *******************************************************************/ diff --git a/reactos/tools/rbuild/tests/data/sourcefile1/sourcefile1_header3.h b/reactos/tools/rbuild/tests/data/sourcefile1/sourcefile1_header3.h deleted file mode 100644 index 40a8c178f10..00000000000 --- a/reactos/tools/rbuild/tests/data/sourcefile1/sourcefile1_header3.h +++ /dev/null @@ -1 +0,0 @@ -/* empty */ diff --git a/reactos/tools/rbuild/tests/data/sourcefile1/sourcefile_includenext.h b/reactos/tools/rbuild/tests/data/sourcefile1/sourcefile_includenext.h deleted file mode 100644 index 40a8c178f10..00000000000 --- a/reactos/tools/rbuild/tests/data/sourcefile1/sourcefile_includenext.h +++ /dev/null @@ -1 +0,0 @@ -/* empty */ diff --git a/reactos/tools/rbuild/tests/data/sourcefile1_header1.h b/reactos/tools/rbuild/tests/data/sourcefile1_header1.h deleted file mode 100644 index c4261ef88cb..00000000000 --- a/reactos/tools/rbuild/tests/data/sourcefile1_header1.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/reactos/tools/rbuild/tests/data/sourcefile1_header2.h b/reactos/tools/rbuild/tests/data/sourcefile1_header2.h deleted file mode 100644 index 212537b619a..00000000000 --- a/reactos/tools/rbuild/tests/data/sourcefile1_header2.h +++ /dev/null @@ -1,3 +0,0 @@ -#include "sourcefile1/sourcefile1_header3.h" -#include -#include diff --git a/reactos/tools/rbuild/tests/data/sourcefile1_recurse.h b/reactos/tools/rbuild/tests/data/sourcefile1_recurse.h deleted file mode 100644 index 0ce390cf892..00000000000 --- a/reactos/tools/rbuild/tests/data/sourcefile1_recurse.h +++ /dev/null @@ -1,2 +0,0 @@ -#include -#include diff --git a/reactos/tools/rbuild/tests/data/sourcefile_include.c b/reactos/tools/rbuild/tests/data/sourcefile_include.c deleted file mode 100644 index 8ee9670f406..00000000000 --- a/reactos/tools/rbuild/tests/data/sourcefile_include.c +++ /dev/null @@ -1,2 +0,0 @@ -# include -#include diff --git a/reactos/tools/rbuild/tests/data/sourcefile_include.h b/reactos/tools/rbuild/tests/data/sourcefile_include.h deleted file mode 100644 index 40a8c178f10..00000000000 --- a/reactos/tools/rbuild/tests/data/sourcefile_include.h +++ /dev/null @@ -1 +0,0 @@ -/* empty */ diff --git a/reactos/tools/rbuild/tests/data/sourcefile_includenext.h b/reactos/tools/rbuild/tests/data/sourcefile_includenext.h deleted file mode 100644 index 0f4f8e730b5..00000000000 --- a/reactos/tools/rbuild/tests/data/sourcefile_includenext.h +++ /dev/null @@ -1 +0,0 @@ -#include_next diff --git a/reactos/tools/rbuild/tests/data/symbol.rbuild b/reactos/tools/rbuild/tests/data/symbol.rbuild deleted file mode 100644 index 7f08a286e6b..00000000000 --- a/reactos/tools/rbuild/tests/data/symbol.rbuild +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - HeapAlloc@12 - LdrAccessResource@16 - - - diff --git a/reactos/tools/rbuild/tests/definetest.cpp b/reactos/tools/rbuild/tests/definetest.cpp deleted file mode 100644 index 6af2d872381..00000000000 --- a/reactos/tools/rbuild/tests/definetest.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "test.h" - -using std::string; - -void DefineTest::Run() -{ - string projectFilename ( RBUILD_BASE "tests/data/define.xml" ); - Configuration configuration; - Project project ( configuration, projectFilename ); - ARE_EQUAL(1, project.non_if_data.defines.size()); - Define& define1 = *project.non_if_data.defines[0]; - ARE_EQUAL("define1", define1.name); - ARE_EQUAL("value1", define1.value); - - ARE_EQUAL(1, project.modules.size()); - Module& module1 = *project.modules[0]; - - ARE_EQUAL(1, module1.non_if_data.defines.size()); - Define& define2 = *module1.non_if_data.defines[0]; - ARE_EQUAL("define2", define2.name); - ARE_EQUAL("value2", define2.value); -} diff --git a/reactos/tools/rbuild/tests/functiontest.cpp b/reactos/tools/rbuild/tests/functiontest.cpp deleted file mode 100644 index 7a60d33f114..00000000000 --- a/reactos/tools/rbuild/tests/functiontest.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "test.h" - -using std::string; - -void FunctionTest::Run () -{ - string fixedupFilename = NormalizeFilename ( "." SSEP "dir1" SSEP "dir2" SSEP ".." SSEP "filename.txt" ); - ARE_EQUAL ( "dir1" SSEP "filename.txt", fixedupFilename ); - ARE_EQUAL ( "file.txt", GetFilename ( "file.txt" ) ); - ARE_EQUAL ( "file.txt", GetFilename ( "dir" SSEP "file.txt" ) ); -} diff --git a/reactos/tools/rbuild/tests/iftest.cpp b/reactos/tools/rbuild/tests/iftest.cpp deleted file mode 100644 index 4e8574d2c4d..00000000000 --- a/reactos/tools/rbuild/tests/iftest.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "test.h" - -using std::string; - -void -IfTest::TestProjectIf ( Project& project ) -{ - ARE_EQUAL ( 1, project.non_if_data.ifs.size () ); - If& if1 = *project.non_if_data.ifs[0]; - ARE_EQUAL ( "VAR1", if1.property ); - ARE_EQUAL ( "value1", if1.value ); - - ARE_EQUAL ( 1, if1.data.compilerFlags.size () ); - CompilerFlag& compilerFlag1 = *if1.data.compilerFlags[0]; - ARE_EQUAL( "compilerflag1", compilerFlag1.flag ); -} - -void -IfTest::TestModuleIf ( Project& project ) -{ - ARE_EQUAL ( 1, project.modules.size () ); - Module& module1 = *project.modules[0]; - - ARE_EQUAL ( 1, module1.non_if_data.ifs.size () ); - If& if1 = *module1.non_if_data.ifs[0]; - ARE_EQUAL ( "VAR2", if1.property ); - ARE_EQUAL ( "value2", if1.value ); - - ARE_EQUAL ( 1, if1.data.files.size () ); - File& file1 = *if1.data.files[0]; - ARE_EQUAL( SSEP "file1.c", file1.name ); - - ARE_EQUAL ( 1, module1.non_if_data.files.size () ); - File& file2 = *module1.non_if_data.files[0]; - ARE_EQUAL( SSEP "file2.c", file2.name ); - - ARE_EQUAL ( 1, if1.data.compilerFlags.size () ); - CompilerFlag& compilerFlag2 = *if1.data.compilerFlags[0]; - ARE_EQUAL( "compilerflag2", compilerFlag2.flag ); -} - -void -IfTest::Run () -{ - string projectFilename ( RBUILD_BASE "tests/data/if.xml" ); - Configuration configuration; - Project project ( configuration, projectFilename ); - - TestProjectIf ( project ); - TestModuleIf ( project ); -} diff --git a/reactos/tools/rbuild/tests/includetest.cpp b/reactos/tools/rbuild/tests/includetest.cpp deleted file mode 100644 index d31aa081ff3..00000000000 --- a/reactos/tools/rbuild/tests/includetest.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "test.h" - -using std::string; - -void IncludeTest::Run() -{ - string projectFilename ( RBUILD_BASE "tests/data/include.xml" ); - Configuration configuration; - Project project ( configuration, projectFilename ); - ARE_EQUAL(1, project.non_if_data.includes.size()); - Include& include1 = *project.non_if_data.includes[0]; - ARE_EQUAL("include1", include1.directory); - - ARE_EQUAL(2, project.modules.size()); - Module& module1 = *project.modules[0]; - Module& module2 = *project.modules[1]; - - ARE_EQUAL(1, module1.non_if_data.includes.size()); - Include& include2 = *module1.non_if_data.includes[0]; - ARE_EQUAL("include2", include2.directory); - - ARE_EQUAL(1, module2.non_if_data.includes.size()); - Include& include3 = *module2.non_if_data.includes[0]; - ARE_EQUAL(FixSeparator("dir1/include3"), include3.directory); -} diff --git a/reactos/tools/rbuild/tests/invoketest.cpp b/reactos/tools/rbuild/tests/invoketest.cpp deleted file mode 100644 index f1aec754ec1..00000000000 --- a/reactos/tools/rbuild/tests/invoketest.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "test.h" - -using std::string; - -void InvokeTest::Run() -{ - string projectFilename ( RBUILD_BASE "tests/data/invoke.xml" ); - Configuration configuration; - Project project ( configuration, projectFilename ); - ARE_EQUAL(1, project.modules.size()); - - Module& module1 = *project.modules[0]; - ARE_EQUAL(1, module1.invocations.size()); - - Invoke& invoke1 = *module1.invocations[0]; - ARE_EQUAL(1, invoke1.output.size()); - - InvokeFile& file1 = *invoke1.output[0]; - ARE_EQUAL(FixSeparator("dir1/file1.c"), file1.name); -} diff --git a/reactos/tools/rbuild/tests/linkerflagtest.cpp b/reactos/tools/rbuild/tests/linkerflagtest.cpp deleted file mode 100644 index 6040a4e35bf..00000000000 --- a/reactos/tools/rbuild/tests/linkerflagtest.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "test.h" - -using std::string; - -void LinkerFlagTest::Run() -{ - string projectFilename ( RBUILD_BASE "tests/data/linkerflag.xml" ); - Configuration configuration; - Project project ( configuration, projectFilename ); - ARE_EQUAL(1, project.linkerFlags.size()); - LinkerFlag& linkerFlag1 = *project.linkerFlags[0]; - ARE_EQUAL("-lgcc1", linkerFlag1.flag); - - ARE_EQUAL(1, project.modules.size()); - Module& module1 = *project.modules[0]; - - ARE_EQUAL(1, module1.linkerFlags.size()); - LinkerFlag& linkerFlag2 = *module1.linkerFlags[0]; - ARE_EQUAL("-lgcc2", linkerFlag2.flag); -} diff --git a/reactos/tools/rbuild/tests/moduletest.cpp b/reactos/tools/rbuild/tests/moduletest.cpp deleted file mode 100644 index 4bf0abecd18..00000000000 --- a/reactos/tools/rbuild/tests/moduletest.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "test.h" - -using std::string; - -void ModuleTest::Run() -{ - string projectFilename ( RBUILD_BASE "tests/data/module.xml" ); - Configuration configuration; - Project project ( configuration, projectFilename ); - ARE_EQUAL(2, project.modules.size()); - - Module& module1 = *project.modules[0]; - IS_TRUE(module1.type == BuildTool); - - ARE_EQUAL(2, module1.non_if_data.files.size()); - ARE_EQUAL("dir1" SSEP "file1.c", module1.non_if_data.files[0]->name); - ARE_EQUAL("dir1" SSEP "file2.c", module1.non_if_data.files[1]->name); - - ARE_EQUAL(0, module1.non_if_data.libraries.size()); - - Module& module2 = *project.modules[1]; - IS_TRUE(module2.type == KernelModeDLL); - ARE_EQUAL("reactos", module2.installBase); - ARE_EQUAL("module2.ext", module2.installName); - - ARE_EQUAL(2, module2.non_if_data.files.size()); - ARE_EQUAL("dir2" SSEP "file3.c", module2.non_if_data.files[0]->name); - ARE_EQUAL("dir2" SSEP "file4.c", module2.non_if_data.files[1]->name); - - ARE_EQUAL(1, module2.non_if_data.libraries.size()); - Library& library1 = *module2.non_if_data.libraries[0]; - ARE_EQUAL("module1", library1.name); - - ARE_EQUAL(1, module2.dependencies.size()); - Dependency& module1dependency = *module2.dependencies[0]; - IS_NOT_NULL(module1dependency.dependencyModule); - ARE_EQUAL("module1", module1dependency.dependencyModule->name); -} diff --git a/reactos/tools/rbuild/tests/projecttest.cpp b/reactos/tools/rbuild/tests/projecttest.cpp deleted file mode 100644 index 9e188653b7a..00000000000 --- a/reactos/tools/rbuild/tests/projecttest.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "test.h" - -using std::string; - -void ProjectTest::Run() -{ - string projectFilename ( RBUILD_BASE "tests/data/project.xml" ); - Configuration configuration; - Project project ( configuration, projectFilename ); - ARE_EQUAL(2, project.modules.size()); -} diff --git a/reactos/tools/rbuild/tests/sourcefiletest.cpp b/reactos/tools/rbuild/tests/sourcefiletest.cpp deleted file mode 100644 index f7dfb23d604..00000000000 --- a/reactos/tools/rbuild/tests/sourcefiletest.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "test.h" - -using std::string; - -bool -SourceFileTest::IsParentOf ( const SourceFile* parent, - const SourceFile* child ) -{ - size_t i; - for ( i = 0; i < child->parents.size (); i++ ) - { - if ( child->parents[i] != NULL ) - { - if ( child->parents[i] == parent ) - { - return true; - } - } - } - for ( i = 0; i < child->parents.size (); i++ ) - { - if ( child->parents[i] != NULL ) - { - if ( IsParentOf ( parent, - child->parents[i] ) ) - { - return true; - } - } - } - return false; -} - -void -SourceFileTest::IncludeTest () -{ - const string projectFilename = RBUILD_BASE "tests" SSEP "data" SSEP "automaticdependency_include.xml"; - Configuration configuration; - Project project ( configuration, projectFilename ); - AutomaticDependency automaticDependency ( project ); - automaticDependency.ParseFiles (); - ARE_EQUAL( 4, automaticDependency.sourcefile_map.size () ); - const SourceFile* include = automaticDependency.RetrieveFromCache ( RBUILD_BASE "tests" SSEP "data" SSEP "sourcefile_include.h" ); - IS_NOT_NULL( include ); - const SourceFile* includenext = automaticDependency.RetrieveFromCache ( RBUILD_BASE "tests" SSEP "data" SSEP "sourcefile1" SSEP "sourcefile_includenext.h" ); - IS_NOT_NULL( includenext ); -} - -void -SourceFileTest::FullParseTest () -{ - const string projectFilename = RBUILD_BASE "tests" SSEP "data" SSEP "automaticdependency.xml"; - Configuration configuration; - Project project ( configuration, projectFilename ); - AutomaticDependency automaticDependency ( project ); - automaticDependency.ParseFiles (); - ARE_EQUAL( 5, automaticDependency.sourcefile_map.size () ); - const SourceFile* header1 = automaticDependency.RetrieveFromCache ( RBUILD_BASE "tests" SSEP "data" SSEP "sourcefile1_header1.h" ); - IS_NOT_NULL( header1 ); - const SourceFile* recurse = automaticDependency.RetrieveFromCache ( RBUILD_BASE "tests" SSEP "data" SSEP "sourcefile1_recurse.h" ); - IS_NOT_NULL( recurse ); - IS_TRUE( IsParentOf ( header1, - recurse ) ); - IS_FALSE( IsParentOf ( recurse, - header1 ) ); - -} - -void -SourceFileTest::Run () -{ - IncludeTest (); - FullParseTest (); -} diff --git a/reactos/tools/rbuild/tests/symboltest.cpp b/reactos/tools/rbuild/tests/symboltest.cpp deleted file mode 100644 index e9259590237..00000000000 --- a/reactos/tools/rbuild/tests/symboltest.cpp +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "test.h" - -using std::string; - -void SymbolTest::Run() -{ - string projectFilename ( RBUILD_BASE "tests/data/symbol.xml" ); - Configuration configuration; - Project project ( configuration, projectFilename ); - - ARE_EQUAL ( 1, project.modules.size () ); - Module& module1 = *project.modules[0]; - - ARE_EQUAL ( 1, module1.stubbedComponents.size () ); - StubbedComponent& component1 = *module1.stubbedComponents[0]; - ARE_EQUAL ( "ntdll.dll", component1.name ); - - ARE_EQUAL ( 2, component1.symbols.size () ); - StubbedSymbol& symbol1 = *component1.symbols[0]; - ARE_EQUAL ( "HeapAlloc@12", symbol1.symbol ); - ARE_EQUAL ( "RtlAllocateHeap", symbol1.newname ); - - StubbedSymbol& symbol2 = *component1.symbols[1]; - ARE_EQUAL ( "LdrAccessResource@16", symbol2.symbol ); - ARE_EQUAL ( "LdrAccessResource", symbol2.newname ); -} diff --git a/reactos/tools/rbuild/testsupportcode.cpp b/reactos/tools/rbuild/testsupportcode.cpp deleted file mode 100644 index acd062e5f4f..00000000000 --- a/reactos/tools/rbuild/testsupportcode.cpp +++ /dev/null @@ -1,413 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * 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 "pch.h" -#include - -#include "rbuild.h" - -using std::string; -using std::vector; - -static std::string -GetFilename ( const std::string& filename ) -{ - size_t index = filename.find_last_of ( cSep ); - if ( index == string::npos ) - return filename; - else - return filename.substr ( index + 1, filename.length () - index ); -} - -TestSupportCode::TestSupportCode ( const Project& project ) - : project ( project ) -{ -} - -TestSupportCode::~TestSupportCode () -{ -} - -bool -TestSupportCode::IsTestModule ( const Module& module ) -{ - return module.type == Test; -} - -void -TestSupportCode::GenerateTestSupportCode ( bool verbose ) -{ - for( std::map::const_iterator p = project.modules.begin(); p != project.modules.end(); ++ p ) - { - if ( IsTestModule ( *p->second ) ) - { - GenerateTestSupportCodeForModule ( *p->second, - verbose ); - } - } -} - -void -TestSupportCode::GenerateTestSupportCodeForModule ( Module& module, - bool verbose ) -{ - if ( verbose ) - { - printf ( "\nGenerating test support code for %s", - module.name.c_str () ); - } - - WriteHooksFile ( module ); - WriteStubsFile ( module ); - WriteStartupFile ( module ); -} - -string -TestSupportCode::GetHooksFilename ( Module& module ) -{ - return NormalizeFilename ( Environment::GetIntermediatePath () + sSep + module.output->relative_path + sSep + "_hooks.c" ); -} - -char* -TestSupportCode::WriteStubbedSymbolToHooksFile ( char* buffer, - const StubbedComponent& component, - const StubbedSymbol& symbol ) -{ - buffer = buffer + sprintf ( buffer, - " {\"%s\", \"%s\", NULL, NULL, NULL},\n", - component.name.c_str (), - symbol.newname.c_str () ); - return buffer; -} - -char* -TestSupportCode::WriteStubbedComponentToHooksFile ( char* buffer, - const StubbedComponent& component ) -{ - for ( size_t i = 0; i < component.symbols.size () ; i++ ) - buffer = WriteStubbedSymbolToHooksFile ( buffer, - component, - *component.symbols[i] ); - return buffer; -} - -void -TestSupportCode::WriteHooksFile ( Module& module ) -{ - char* buf; - char* s; - - buf = (char*) malloc ( 50*1024 ); - if ( buf == NULL ) - throw OutOfMemoryException (); - - s = buf; - s = s + sprintf ( s, "/* This file is automatically generated. */\n" ); - s = s + sprintf ( s, "#include \n" ); - s = s + sprintf ( s, "#include \"regtests.h\"\n" ); - s = s + sprintf ( s, "\n" ); - s = s + sprintf ( s, "_API_DESCRIPTION ExternalDependencies[] =\n" ); - s = s + sprintf ( s, "{\n" ); - - int symbolCount = 0; - for ( size_t i = 0; i < module.stubbedComponents.size () ; i++ ) - { - s = WriteStubbedComponentToHooksFile ( s, - *module.stubbedComponents[i] ); - symbolCount += module.stubbedComponents[i]->symbols.size (); - } - - s = s + sprintf ( s, "};\n" ); - s = s + sprintf ( s, "\n" ); - s = s + sprintf ( s, "#define ExternalDependencyCount %d\n", symbolCount ); - s = s + sprintf ( s, "ULONG MaxExternalDependency = ExternalDependencyCount - 1;\n" ); - s = s + sprintf ( s, "\n" ); - - FileSupportCode::WriteIfChanged ( buf, GetHooksFilename ( module ) ); - - free ( buf ); -} - -string -TestSupportCode::GetStubsFilename ( Module& module ) -{ - return NormalizeFilename ( Environment::GetIntermediatePath () + sSep + module.output->relative_path + sSep + "_stubs.S" ); -} - -string -GetLinkerSymbol ( const StubbedSymbol& symbol ) -{ - if (symbol.symbol[0] == '@') - return symbol.symbol; - else - return "_" + symbol.symbol; -} - -string -GetLinkerImportSymbol ( const StubbedSymbol& symbol ) -{ - if (symbol.symbol[0] == '@') - return "__imp_" + symbol.symbol; - else - return "__imp__" + symbol.symbol; -} - -string -GetIndirectCallTargetSymbol ( const StubbedSymbol& symbol ) -{ - return GetLinkerSymbol ( symbol ) + "_"; -} - -char* -TestSupportCode::WriteStubbedSymbolToStubsFile ( char* buffer, - const StubbedComponent& component, - const StubbedSymbol& symbol, - int stubIndex ) -{ - string linkerSymbol = GetLinkerSymbol ( symbol ); - string linkerImportSymbol = GetLinkerImportSymbol ( symbol ); - string indirectCallTargetSymbol = GetIndirectCallTargetSymbol ( symbol ); - buffer = buffer + sprintf ( buffer, - ".globl %s\n", - linkerSymbol.c_str () ); - buffer = buffer + sprintf ( buffer, - ".globl %s\n", - linkerImportSymbol.c_str () ); - buffer = buffer + sprintf ( buffer, - "%s:\n", - linkerSymbol.c_str () ); - buffer = buffer + sprintf ( buffer, - "%s:\n", - linkerImportSymbol.c_str () ); - buffer = buffer + sprintf ( buffer, - " .long %s\n", - indirectCallTargetSymbol.c_str () ); - buffer = buffer + sprintf ( buffer, - "%s:\n", - indirectCallTargetSymbol.c_str () ); - buffer = buffer + sprintf ( buffer, - " pushl $%d\n", - stubIndex ); - buffer = buffer + sprintf ( buffer, - " jmp passthrough\n" ); - buffer = buffer + sprintf ( buffer, "\n" ); - return buffer; -} - -char* -TestSupportCode::WriteStubbedComponentToStubsFile ( char* buffer, - const StubbedComponent& component, - int* stubIndex ) -{ - for ( size_t i = 0; i < component.symbols.size () ; i++ ) - buffer = WriteStubbedSymbolToStubsFile ( buffer, - component, - *component.symbols[i], - (*stubIndex)++ ); - return buffer; -} - -void -TestSupportCode::WriteStubsFile ( Module& module ) -{ - char* buf; - char* s; - - buf = (char*) malloc ( 512*1024 ); - if ( buf == NULL ) - throw OutOfMemoryException (); - - s = buf; - s = s + sprintf ( s, "/* This file is automatically generated. */\n" ); - s = s + sprintf ( s, "passthrough:\n" ); - s = s + sprintf ( s, " call _FrameworkGetHook@4\n" ); - s = s + sprintf ( s, " test %%eax, %%eax\n" ); - s = s + sprintf ( s, " je .return\n" ); - s = s + sprintf ( s, " jmp *%%eax\n" ); - s = s + sprintf ( s, ".return:\n" ); - s = s + sprintf ( s, " /* This will most likely corrupt the stack */\n" ); - s = s + sprintf ( s, " ret\n" ); - s = s + sprintf ( s, "\n" ); - - int stubIndex = 0; - for ( size_t i = 0; i < module.stubbedComponents.size () ; i++ ) - { - s = WriteStubbedComponentToStubsFile ( s, - *module.stubbedComponents[i], - &stubIndex ); - } - - FileSupportCode::WriteIfChanged ( buf, GetStubsFilename ( module ) ); - - free ( buf ); -} - -string -TestSupportCode::GetStartupFilename ( Module& module ) -{ - return NormalizeFilename ( Environment::GetIntermediatePath () + sSep + module.output->relative_path + sSep + "_startup.c" ); -} - -bool -TestSupportCode::IsUnknownCharacter ( char ch ) -{ - if ( ch >= 'a' && ch <= 'z' ) - return false; - if ( ch >= 'A' && ch <= 'Z' ) - return false; - if ( ch >= '0' && ch <= '9' ) - return false; - return true; -} - -string -TestSupportCode::GetTestDispatcherName ( string filename ) -{ - string filenamePart = ReplaceExtension ( GetFilename ( filename ), "" ); - if ( filenamePart.length () > 0 ) - filenamePart[0] = toupper ( filenamePart[0] ); - for ( size_t i = 1; i < filenamePart.length (); i++ ) - { - if ( IsUnknownCharacter ( filenamePart[i] ) ) - filenamePart[i] = '_'; - else - filenamePart[i] = tolower ( filenamePart[i] ); - } - return filenamePart + "Test"; -} - -bool -TestSupportCode::IsTestFile ( string& filename ) const -{ - if ( stricmp ( GetFilename ( filename ).c_str (), "setup.c" ) == 0 ) - return false; - return true; -} - -void -TestSupportCode::GetSourceFilenames ( string_list& list, - Module& module ) const -{ - size_t i; - - const vector& compilationUnits = module.non_if_data.compilationUnits; - for ( i = 0; i < compilationUnits.size (); i++ ) - { - const FileLocation& sourceFileLocation = compilationUnits[i]->GetFilename (); - string filename = sourceFileLocation.relative_path + sSep + sourceFileLocation.name; - if ( !compilationUnits[i]->IsGeneratedFile () && IsTestFile ( filename ) ) - list.push_back ( filename ); - } -} - -char* -TestSupportCode::WriteTestDispatcherPrototypesToStartupFile ( char* buffer, - Module& module ) -{ - string_list files; - GetSourceFilenames ( files, - module ); - for ( size_t i = 0; i < files.size (); i++ ) - { - buffer = buffer + sprintf ( buffer, - "extern void %s(int Command, char *Buffer);\n", - GetTestDispatcherName ( files[i] ).c_str () ); - } - buffer = buffer + sprintf ( buffer, "\n" ); - return buffer; -} - -char* -TestSupportCode::WriteRegisterTestsFunctionToStartupFile ( char* buffer, - Module& module ) -{ - buffer = buffer + sprintf ( buffer, - "extern void AddTest(TestRoutine Routine);\n" ); - buffer = buffer + sprintf ( buffer, - "\n" ); - - buffer = buffer + sprintf ( buffer, - "void\n" ); - buffer = buffer + sprintf ( buffer, - "RegisterTests()\n" ); - buffer = buffer + sprintf ( buffer, - "{\n" ); - - string_list files; - GetSourceFilenames ( files, - module ); - for ( size_t i = 0; i < files.size (); i++ ) - { - buffer = buffer + sprintf ( buffer, - "AddTest((TestRoutine)%s);\n", - GetTestDispatcherName ( files[i]).c_str () ); - } - buffer = buffer + sprintf ( buffer, - "}\n" ); - buffer = buffer + sprintf ( buffer, "\n" ); - return buffer; -} - -void -TestSupportCode::WriteStartupFile ( Module& module ) -{ - char* buf; - char* s; - - buf = (char*) malloc ( 50*1024 ); - if ( buf == NULL ) - throw OutOfMemoryException (); - - s = buf; - s = s + sprintf ( s, "/* This file is automatically generated. */\n" ); - s = s + sprintf ( s, "\n" ); - s = s + sprintf ( s, "#include \n" ); - s = s + sprintf ( s, "#include \"regtests.h\"\n" ); - s = s + sprintf ( s, "\n" ); - s = WriteTestDispatcherPrototypesToStartupFile ( s, - module ); - s = WriteRegisterTestsFunctionToStartupFile ( s, - module ); - s = s + sprintf ( s, "\n" ); - s = s + sprintf ( s, "void\n" ); - s = s + sprintf ( s, "ConsoleWrite(char *Buffer)\n" ); - s = s + sprintf ( s, "{\n" ); - s = s + sprintf ( s, " printf(Buffer);\n" ); - s = s + sprintf ( s, "}\n" ); - s = s + sprintf ( s, "\n" ); - s = s + sprintf ( s, "int\n" ); - s = s + sprintf ( s, "WINAPI\n" ); - s = s + sprintf ( s, "WinMain(HINSTANCE hInstance,\n" ); - s = s + sprintf ( s, " HINSTANCE hPrevInstance,\n" ); - s = s + sprintf ( s, " LPSTR lpszCmdParam,\n" ); - s = s + sprintf ( s, " int nCmdShow)\n" ); - s = s + sprintf ( s, "{\n" ); - s = s + sprintf ( s, " _SetPriorityClass(_GetCurrentProcess(), HIGH_PRIORITY_CLASS);\n" ); - s = s + sprintf ( s, " _SetThreadPriority(_GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);\n" ); - s = s + sprintf ( s, " InitializeTests();\n" ); - s = s + sprintf ( s, " RegisterTests();\n" ); - s = s + sprintf ( s, " SetupOnce();\n" ); - s = s + sprintf ( s, " PerformTests(ConsoleWrite, NULL);\n" ); - s = s + sprintf ( s, " _ExitProcess(0);\n" ); - s = s + sprintf ( s, " return 0;\n" ); - s = s + sprintf ( s, "}\n" ); - s = s + sprintf ( s, "\n" ); - - FileSupportCode::WriteIfChanged ( buf, GetStartupFilename ( module ) ); - - free ( buf ); -} diff --git a/reactos/tools/rbuild/xmlnode.cpp b/reactos/tools/rbuild/xmlnode.cpp deleted file mode 100644 index cf1c749de90..00000000000 --- a/reactos/tools/rbuild/xmlnode.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2007 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. - */ -#include "pch.h" - -#include "rbuild.h" - -using std::string; - -XmlNode::XmlNode ( const Project& project_, - const XMLElement& node ) - : project(project_), - node(node) -{ -} - -XmlNode::~XmlNode () -{ -} - -void -XmlNode::ProcessXML () -{ -} diff --git a/reactos/tools/rbuild_helper/argv_parser.h b/reactos/tools/rbuild_helper/argv_parser.h deleted file mode 100644 index 97c506d12a9..00000000000 --- a/reactos/tools/rbuild_helper/argv_parser.h +++ /dev/null @@ -1,159 +0,0 @@ -/* - 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/reactos/tools/rbuild_helper/null_output_iterator.h b/reactos/tools/rbuild_helper/null_output_iterator.h deleted file mode 100644 index 43b960f6ed5..00000000000 --- a/reactos/tools/rbuild_helper/null_output_iterator.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - 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/reactos/tools/rbuild_helper/rbuild_helper.cpp b/reactos/tools/rbuild_helper/rbuild_helper.cpp deleted file mode 100644 index 2d374b6dfac..00000000000 --- a/reactos/tools/rbuild_helper/rbuild_helper.cpp +++ /dev/null @@ -1,549 +0,0 @@ -/* - 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/reactos/tools/rbuild_helper/rbuild_helper.rbuild b/reactos/tools/rbuild_helper/rbuild_helper.rbuild deleted file mode 100644 index fa9af2680e4..00000000000 --- a/reactos/tools/rbuild_helper/rbuild_helper.rbuild +++ /dev/null @@ -1,7 +0,0 @@ - - - . - - - rbuild_helper.cpp - diff --git a/reactos/tools/rbuild_helper/stringz_iterator.h b/reactos/tools/rbuild_helper/stringz_iterator.h deleted file mode 100644 index d84fae12087..00000000000 --- a/reactos/tools/rbuild_helper/stringz_iterator.h +++ /dev/null @@ -1,130 +0,0 @@ -/* - 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/reactos/tools/regtests2xml/regtests2xml.c b/reactos/tools/regtests2xml/regtests2xml.c deleted file mode 100644 index 3a079b302d4..00000000000 --- a/reactos/tools/regtests2xml/regtests2xml.c +++ /dev/null @@ -1,448 +0,0 @@ -/* - * Convert debug output from running the regression tests - * on ReactOS to an xml document. - * Casper S. Hornstrup - */ - -#include -#include -#include -#include -#include - -#ifdef WIN32 -#include -#include -#else -#include -#include -#include -#include -#include -#endif -#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 struct _TEST_RESULT_INFO -{ - struct _TEST_RESULT_INFO *next; - char testname[100]; - char result[200]; - int succeeded; /* 0 = failed, 1 = succeeded */ -} TEST_RESULT_INFO, *PTEST_RESULT_INFO; - - -static FILE *out; -static FILE *file_handle = NULL; -static char *file_buffer = NULL; -static unsigned int file_size = 0; -static int file_pointer = 0; -static PTEST_RESULT_INFO test_result_info_list = NULL; - - -static char* -convert_path(char* origpath) -{ - char* newpath; - int i; - - newpath = strdup(origpath); - - i = 0; - while (newpath[i] != 0) - { -#ifndef WIN32 - if (newpath[i] == '\\') - { - newpath[i] = '/'; - } -#else -#ifdef WIN32 - if (newpath[i] == '/') - { - newpath[i] = '\\'; - } -#endif -#endif - i++; - } - return(newpath); -} - -static void -write_line(char *line) -{ - char buf[200]; - - memset(buf, 0, sizeof(buf)); - strcpy(buf, line); - /* Terminate the line */ - buf[strlen(buf)] = '\r'; - buf[strlen(buf)] = '\n'; - - (void)fwrite(&buf[0], 1, strlen(buf), out); -} - - -static void -read_file(char *filename) -{ - file_handle = fopen(filename, "rb"); - if (file_handle == NULL) - { - printf("Can't open %s\n", filename); - exit(1); - } - - // Get the size of the file - fseek(file_handle, 0, SEEK_END); - file_size = ftell(file_handle); - - // Load it all into memory - file_buffer = malloc(file_size); - if (file_buffer == NULL) - { - fclose(file_handle); - printf("Out of memory\n"); - exit(1); - } - fseek(file_handle, 0, SEEK_SET); - if (file_size > 0) - { - if (fread (file_buffer, 1, file_size, file_handle) < 1) - { - fclose(file_handle); - printf("Read error in file %s\n", filename); - exit(1); - } - } - - file_pointer = 0; -} - -static void -close_file() -{ - free(file_buffer); - file_buffer = NULL; - fclose(file_handle); - file_handle = NULL; - file_pointer = 0; -} - -static int -is_whitespace(char ch) -{ - if (ch == ' ') - { - return 1; - } - if (ch == '\t') - { - return 1; - } - return 0; -} - -static int -is_eol_char(char ch) -{ - if (ch == '\r') - { - return 1; - } - if (ch == '\n') - { - return 1; - } - return 0; -} - -static void -skip_line() -{ - while ((file_pointer < file_size) && (!is_eol_char(file_buffer[file_pointer]))) - { - file_pointer++; - } - if ((file_pointer < file_size) && (is_eol_char(file_buffer[file_pointer]))) - { - file_pointer++; - if ((file_pointer < file_size) && (file_buffer[file_pointer] == '\n')) - { - file_pointer++; - } - } -} - -static void -skip_whitespace() -{ - while ((file_pointer < file_size) && !is_eol_char(file_buffer[file_pointer]) - && is_whitespace(file_buffer[file_pointer])) - { - file_pointer++; - } -} - -static int -skip_to_next_test() -{ - static char test_marker[] = "ROSREGTEST:"; - int found_test = 0; - - while ((file_pointer < file_size) && (!found_test)) - { - skip_whitespace(); - found_test = 1; - int i = 0; - while (1) - { - if (i >= strlen(test_marker)) - { - break; - } - if (is_eol_char(file_buffer[file_pointer])) - { - found_test = 0; - break; - } - if (file_buffer[file_pointer] != test_marker[i]) - { - found_test = 0; - break; - } - file_pointer++; - i++; - } - if (!found_test) - { - skip_line(); - } - } - return found_test; -} - -static int -read_until(char ch, char* buf) -{ - int start = file_pointer; - while ((file_pointer < file_size)) - { - if (file_buffer[file_pointer] == ch) - { - strncpy(buf, &file_buffer[start], file_pointer - start); - buf[file_pointer - start] = 0; - return 1; - } - file_pointer++; - } - return 0; -} - -static int -read_until_end(char* buf) -{ - int start = file_pointer; - while ((file_pointer < file_size)) - { - if (is_eol_char(file_buffer[file_pointer])) - { - strncpy(buf, &file_buffer[start], file_pointer - start); - buf[file_pointer - start] = 0; - skip_line(); - return 1; - } - file_pointer++; - } - return 0; -} - -static void -parse_file(char *filename) -{ - PTEST_RESULT_INFO test_result_info; - - read_file(filename); - - do - { - if (!skip_to_next_test()) - { - break; - } - - /* - * FORMAT: - * [ROSREGTEST:][space][|][][|][space][Status:][space][] - */ - - test_result_info = malloc(sizeof(TEST_RESULT_INFO)); - if (test_result_info == NULL) - { - printf("Out of memory\n"); - exit(1); - } - - /* Skip whitespaces */ - skip_whitespace(); - - /* [|] */ - file_pointer++; - - /* */ - read_until(')', test_result_info->testname); - - /* [|] */ - file_pointer++; - - /* [space] */ - file_pointer++; - - /* Status: */ - file_pointer += 7; - - /* [space] */ - file_pointer++; - - /* */ - read_until_end(test_result_info->result); - - if (strncmp(test_result_info->result, "Success", 7) == 0) - { - test_result_info->succeeded = 1; - } - else - { - test_result_info->succeeded = 0; - } - - test_result_info->next = test_result_info_list; - test_result_info_list = test_result_info; - } while (1); - - close_file(); -} - -static void -generate_xml() -{ - PTEST_RESULT_INFO test_result_info; - char buf[200]; - int success_rate; - int succeeded_total; - int failed_total; - - succeeded_total = 0; - failed_total = 0; - - test_result_info = test_result_info_list; - while (test_result_info != NULL) - { - if (test_result_info->succeeded) - { - succeeded_total++; - } - else - { - failed_total++; - } - test_result_info = test_result_info->next; - } - - if (succeeded_total + failed_total > 0) - { - success_rate = ((succeeded_total) * 100) / (succeeded_total + failed_total); - } - else - { - success_rate = 100; - } - - write_line(""); - write_line(""); - - sprintf(buf, "", - success_rate, succeeded_total, failed_total); - write_line(buf); - - if (test_result_info_list != NULL) - { - test_result_info = test_result_info_list; - while (test_result_info != NULL) - { - sprintf(buf, "", - test_result_info->testname, - test_result_info->succeeded == 1 ? "true" : "false", - test_result_info->result); - write_line(buf); - write_line(""); - test_result_info = test_result_info->next; - } - } - - write_line(""); -} - -static char HELP[] = - "REGTESTS2XML input-filename output-filename\n" - "\n" - " input-filename File containing output from running regression tests\n" - " output-filename File to create\n"; - -int main(int argc, char **argv) -{ - char *input_file; - char *output_file; - - if (argc < 3) - { - puts(HELP); - return 1; - } - - input_file = convert_path(argv[1]); - if (input_file[0] == 0) - { - free(input_file); - printf("Missing input-filename\n"); - return 1; - } - - output_file = convert_path(argv[2]); - if (output_file[0] == 0) - { - free(output_file); - free(input_file); - printf("Missing output-filename\n"); - return 1; - } - - out = fopen(output_file, "wb"); - if (out == NULL) - { - free(input_file); - free(output_file); - printf("Cannot open output file"); - return 1; - } - - parse_file(input_file); - - generate_xml(); - - free(input_file); - free(output_file); - fclose(out); - - return 0; -} diff --git a/reactos/tools/rgenstat/llmosrt.c b/reactos/tools/rgenstat/llmosrt.c deleted file mode 100644 index ef2e1794b79..00000000000 --- a/reactos/tools/rgenstat/llmosrt.c +++ /dev/null @@ -1,106 +0,0 @@ -/* $Id$ */ -/* A Linked-List Memory Sort - by Philip J. Erdelsky - pje@acm.org - http://www.alumni.caltech.edu/~pje/ -*/ - -/* According to his website, this file was released into the public domain by Phillip J. Erdelsky */ - - -#include - -void *sort_linked_list(void *p, unsigned index, int (*compare)(void *, void *)) -{ - unsigned base; - unsigned long block_size; - - struct record - { - struct record *next[1]; - /* other members not directly accessed by this function */ - }; - - struct tape - { - struct record *first, *last; - unsigned long count; - } tape[4]; - - /* Distribute the records alternately to tape[0] and tape[1]. */ - - tape[0].count = tape[1].count = 0L; - tape[0].first = NULL; - base = 0; - while (p != NULL) - { - struct record *next = ((struct record *)p)->next[index]; - ((struct record *)p)->next[index] = tape[base].first; - tape[base].first = ((struct record *)p); - tape[base].count++; - p = next; - base ^= 1; - } - - /* If the list is empty or contains only a single record, then */ - /* tape[1].count == 0L and this part is vacuous. */ - - for (base = 0, block_size = 1L; tape[base+1].count != 0L; - base ^= 2, block_size <<= 1) - { - int dest; - struct tape *tape0, *tape1; - tape0 = tape + base; - tape1 = tape + base + 1; - dest = base ^ 2; - tape[dest].count = tape[dest+1].count = 0; - for (; tape0->count != 0; dest ^= 1) - { - unsigned long n0, n1; - struct tape *output_tape = tape + dest; - n0 = n1 = block_size; - while (1) - { - struct record *chosen_record; - struct tape *chosen_tape; - if (n0 == 0 || tape0->count == 0) - { - if (n1 == 0 || tape1->count == 0) - break; - chosen_tape = tape1; - n1--; - } - else if (n1 == 0 || tape1->count == 0) - { - chosen_tape = tape0; - n0--; - } - else if ((*compare)(tape0->first, tape1->first) > 0) - { - chosen_tape = tape1; - n1--; - } - else - { - chosen_tape = tape0; - n0--; - } - chosen_tape->count--; - chosen_record = chosen_tape->first; - chosen_tape->first = chosen_record->next[index]; - if (output_tape->count == 0) - output_tape->first = chosen_record; - else - output_tape->last->next[index] = chosen_record; - output_tape->last = chosen_record; - output_tape->count++; - } - } - } - - if (tape[base].count > 1L) - tape[base].last->next[index] = NULL; - return tape[base].first; -} - -/* EOF */ diff --git a/reactos/tools/rgenstat/module_list.txt b/reactos/tools/rgenstat/module_list.txt deleted file mode 100644 index 269ab99ab9d..00000000000 --- a/reactos/tools/rgenstat/module_list.txt +++ /dev/null @@ -1,137 +0,0 @@ -clb base\applications\regedit\clb -notifyhook base\shell\explorer\notifyhook -mesa32 dll\3rdparty\mesa32 -access dll\cpl\access -appwiz dll\cpl\appwiz -desk dll\cpl\desk -hdwwiz dll\cpl\hdwwiz -intl dll\cpl\intl -main dll\cpl\main -mmsys dll\cpl\mmsys -ncpa dll\cpl\ncpa -powercfg dll\cpl\powercfg -sysdm dll\cpl\sysdm -timedate dll\cpl\timedate -d3d8thk dll\directx\d3d8thk -devenum dll\directx\devenum -ddraw dll\directx\ddraw -dinput dll\directx\dinput -dinput8 dll\directx\dinput8 -dplay dll\directx\dplay -dplayx dll\directx\dplayx -dsound dll\directx\dsound -dxdiagn dll\directx\dxdiagn -kbdda dll\keyboard\kbdda -kbddv dll\keyboard\kbddv -kbdes dll\keyboard\kbdes -kbdfr dll\keyboard\kbdfr -kbdgr dll\keyboard\kbdgr -kbdhe dll\keyboard\kbdhe -kbdheb dll\keyboard\kbdheb -kbdhu dll\keyboard\kbdhu -kbdru dll\keyboard\kbdru -kbdsg dll\keyboard\kbdsg -kbdsk dll\keyboard\kbdsk -kbduk dll\keyboard\kbduk -kbdus dll\keyboard\kbdus -kbdbe dll\keyboard\kbdbe -kbdur dll\keyboard\kbdur -kbdpo dll\keyboard\kbdpo -ntdll dll\ntdll -acledit dll\win32\acledit -aclui dll\win32\aclui -advapi32 dll\win32\advapi32 -advpack dll\win32\advpack -authz dll\win32\authz -avifil32 dll\win32\avifil32 -cabinet dll\win32\cabinet -cards dll\win32\cards -cfgmgr32 dll\win32\cfgmgr32 -console dll\cpl\console -slayer dll\shellext\slayer -comctl32 dll\win32\comctl32 -comdlg32 dll\win32\comdlg32 -crtdll dll\win32\crtdll -crypt32 dll\win32\crypt32 -cryptdll dll\win32\cryptdll -dbghelp dll\win32\dbghelp -devmgr dll\win32\devmgr -dhcpcsvc dll\win32\dhcpcsvc -dnsapi dll\win32\dnsapi -fmifs dll\win32\fmifs -gdi32 dll\win32\gdi32 -gdiplus dll\win32\gdiplus -glu32 dll\win32\glu32 -hid dll\win32\hid -icmp dll\win32\icmp -imagehlp dll\win32\imagehlp -imm32 dll\win32\imm32 -iphlpapi dll\win32\iphlpapi -kernel32 dll\win32\kernel32 -lsasrv dll\win32\lsasrv -lz32 dll\win32\lz32 -mapi32 dll\win32\mapi32 -mmdrv dll\win32\mmdrv -mpr dll\win32\mpr -msacm32 dll\win32\msacm32 -msafd dll\win32\msafd -msgina dll\win32\msgina -msi dll\win32\msi -msimg32 dll\win32\msimg32 -msvcrt dll\win32\msvcrt -msvcrt20 dll\win32\msvcrt20 -msvfw32 dll\win32\msvfw32 -mswsock dll\win32\mswsock -netapi32 dll\win32\netapi32 -netcfgx dll\win32\netcfgx -newdev dll\win32\newdev -ntmarta dll\win32\ntmarta -objsel dll\win32\objsel -ole32 dll\win32\ole32 -oleacc dll\win32\oleacc -oleaut32 dll\win32\oleaut32 -oledlg dll\win32\oledlg -olepro32 dll\win32\olepro32 -opengl32 dll\win32\opengl32 -powrprof dll\win32\powrprof -psapi dll\win32\psapi -riched20 dll\win32\riched20 -riched32 dll\win32\riched32 -rpcrt4 dll\win32\rpcrt4 -samlib dll\win32\samlib -samsrv dll\win32\samsrv -secur32 dll\win32\secur32 -security dll\win32\security -serialui dll\win32\serialui -setupapi dll\win32\setupapi -shdocvw dll\win32\shdocvw -shell32 dll\win32\shell32 -shfolder dll\win32\shfolder -shlwapi dll\win32\shlwapi -smdll dll\win32\smdll -snmpapi dll\win32\snmpapi -syssetup dll\win32\syssetup -twain_32 dll\win32\twain_32 -urlmon dll\win32\urlmon -user32 dll\win32\user32 -userenv dll\win32\userenv -uxtheme dll\win32\uxtheme -vdmdbg dll\win32\vdmdbg -version dll\win32\version -wininet dll\win32\wininet -midimap dll\win32\winmm\midimap -wavemap dll\win32\msacm32\msacm32.drv -winmm dll\win32\winmm -winspool dll\win32\winspool -wintrust dll\win32\wintrust -ws2_32 dll\win32\ws2_32 -ws2_32_new dll\win32\ws2_32_new -ws2help dll\win32\ws2help -wshirda dll\win32\wshirda -wsock32 dll\win32\wsock32 -wshtcpip dll\win32\wshtcpip -bda drivers\multimedia\bdasup -framebuf drivers\video\displays\framebuf -ks drivers\ksfilter\ks -portcls drivers\wdm\audio\backpln\portcls -vgaddi drivers\video\displays\vga diff --git a/reactos/tools/rgenstat/rgenstat.c b/reactos/tools/rgenstat/rgenstat.c deleted file mode 100644 index ea3ed91e12e..00000000000 --- a/reactos/tools/rgenstat/rgenstat.c +++ /dev/null @@ -1,922 +0,0 @@ -/* - * Generate a file with API status information from a list - * of files in a directory. - * Casper S. Hornstrup - */ - -#include -#include -#include -#include -#include - -#ifdef WIN32 -#include -#include -#include -int __cdecl strcasecmp (const char * __sz1, const char * __sz2) - {return _stricmp (__sz1, __sz2);} -#else -#if !defined(__FreeBSD__) && !defined(__APPLE__) -#include -#endif -#include -#include -#include -#include -#endif -#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 - -#define TAG_UNKNOWN -1 -#define TAG_IMPLEMENTED 0 -#define TAG_UNIMPLEMENTED 1 - -typedef struct _API_INFO -{ - struct _API_INFO *next; - int tag_id; - char name[100]; - char filename[MAX_PATH]; -} API_INFO, *PAPI_INFO; - - -PAPI_INFO sort_linked_list(PAPI_INFO, - unsigned, int (*)(PAPI_INFO, PAPI_INFO)); - - -static FILE *in; -static FILE *out; -static FILE *file_handle = NULL; -static char *file_buffer = NULL; -static unsigned int file_size = 0; -static unsigned int file_pointer = 0; -static char tagname[200]; -static PAPI_INFO api_info_list = NULL; - - -static char* -convert_path(char* origpath) -{ - char* newpath; - int i; - - newpath = strdup(origpath); - - i = 0; - while (newpath[i] != 0) - { -#ifndef WIN32 - if (newpath[i] == '\\') - { - newpath[i] = '/'; - } -#else -#ifdef WIN32 - if (newpath[i] == '/') - { - newpath[i] = '\\'; - } -#endif -#endif - i++; - } - return(newpath); -} - -static char* -path_to_url(char* path) -{ - int i; - - i = 0; - while (path[i] != 0) - { - if (path[i] == '\\') - { - path[i] = '/'; - } - i++; - } - return(path); -} - -static void -write_line(char *line) -{ - char buf[200]; - - memset(buf, 0, sizeof(buf)); - strcpy(buf, line); - /* Terminate the line */ - buf[strlen(buf)] = '\r'; - buf[strlen(buf)] = '\n'; - - (void)fwrite(&buf[0], 1, strlen(buf), out); -} - - -static void -read_file(char *filename) -{ - file_handle = fopen(filename, "rb"); - if (file_handle == NULL) - { - printf("Can't open %s\n", filename); - exit(1); - } - - // Get the size of the file - fseek(file_handle, 0, SEEK_END); - file_size = ftell(file_handle); - - // Load it all into memory - file_buffer = malloc(file_size); - if (file_buffer == NULL) - { - fclose(file_handle); - printf("Out of memory\n"); - exit(1); - } - fseek(file_handle, 0, SEEK_SET); - if (file_size > 0) - { - if (fread (file_buffer, 1, file_size, file_handle) < 1) - { - fclose(file_handle); - printf("Read error in file %s\n", filename); - exit(1); - } - } - - file_pointer = 0; -} - -static void -close_file() -{ - free(file_buffer); - file_buffer = NULL; - fclose(file_handle); - file_handle = NULL; - file_pointer = 0; -} - -static int -is_whitespace(char ch) -{ - if (ch == ' ') - { - return 1; - } - if (ch == '\t') - { - return 1; - } - return 0; -} - -static int -is_eol_char(char ch) -{ - if (ch == '\r') - { - return 1; - } - if (ch == '\n') - { - return 1; - } - return 0; -} - -static int -is_end_of_tag(char ch) -{ - if ((ch >= 'a') && (ch <= 'z')) - { - return 0; - } - if ((ch >= 'A') && (ch <= 'Z')) - { - return 0; - } - if ((ch >= '0') && (ch <= '9')) - { - return 0; - } - if (ch == '_') - { - return 0; - } - return 1; -} - -static int -is_end_of_name(char ch) -{ - /* Currently the same as is_end_of_tag() */ - return is_end_of_tag(ch); -} - -static int -is_valid_file(char *filename) -{ - char ext[MAX_PATH]; - int i; - - i = strlen(filename); - while (i > 0 && filename[i] != '.') - { - i--; - } - if (i > 0) - { - memset(ext, 0, sizeof(ext)); - strncpy(&ext[0], &filename[i], strlen(&filename[i])); - - if ((strncmp(ext, ".c", 2) == 0) || (strncmp(ext, ".C", 2) == 0)) - { - return 1; - } - } - return 0; -} - -static int -get_tag_id(char *tag) -{ - if (strcasecmp(tag, "implemented") == 0) - { - return TAG_IMPLEMENTED; - } - if (strcasecmp(tag, "unimplemented") == 0) - { - return TAG_UNIMPLEMENTED; - } - return TAG_UNKNOWN; -} - -static int -skip_to_next_tag() -{ - unsigned int start; - int end_of_tag; - int found_tag = 0; - int tag_id; - int len; - - tagname[0] = 0; - while ((file_pointer < file_size) && (!found_tag)) - { - if (file_buffer[file_pointer] == '@') - { - file_pointer++; - start = file_pointer; - end_of_tag = 0; - while ((file_pointer < file_size) && (!end_of_tag)) - { - end_of_tag = is_end_of_tag(file_buffer[file_pointer]); - file_pointer++; - } - len = file_pointer > start ? file_pointer - start - 1 : 0; - strncpy(tagname, &file_buffer[start], len); - tagname[len] = 0; - - tag_id = get_tag_id(tagname); - if (tag_id != TAG_UNKNOWN) - { - return tag_id; - } - } - file_pointer++; - } - - return TAG_UNKNOWN; -} - -static void -skip_line() -{ - while ((file_pointer < file_size) && (!is_eol_char(file_buffer[file_pointer]))) - { - file_pointer++; - } - if ((file_pointer < file_size) && (file_buffer[file_pointer] == '\n')) - { - file_pointer++; - } -} - -static void -skip_comments() -{ - while ((file_pointer < file_size)) - { - if (file_buffer[file_pointer] == '*') - { - if ((file_pointer + 1 < file_size)) - { - if (file_buffer[file_pointer + 1] == '/') - { - skip_line(); - return; - } - } - } - file_pointer++; - } -} - -static int -get_previous_identifier(unsigned int end, char *name) -{ - unsigned int my_file_pointer = end; - int len; - - name[0] = 0; - - while ((my_file_pointer > 0) && (is_whitespace(file_buffer[my_file_pointer]) - || is_eol_char(file_buffer[my_file_pointer]))) - { - my_file_pointer--; - } - - /* Skip any comments between function name and it's parameters */ - if ((my_file_pointer > 0) && (file_buffer[my_file_pointer] == '/')) - { - if ((my_file_pointer > 0) && (file_buffer[my_file_pointer - 1] == '*')) - { - my_file_pointer--; - while ((my_file_pointer > 0) && !((file_buffer[my_file_pointer] == '*') - && (file_buffer[my_file_pointer - 1] == '/'))) - { - my_file_pointer--; - } - my_file_pointer -= 2; - } - } - - /* Skip any remaining whitespace */ - while ((my_file_pointer > 0) && (is_whitespace(file_buffer[my_file_pointer]))) - { - my_file_pointer--; - } - - end = my_file_pointer; - while ((my_file_pointer > 0)) - { - if (is_end_of_name(file_buffer[my_file_pointer])) - { - len = end - my_file_pointer; - strncpy(name, &file_buffer[my_file_pointer + 1], len); - name[len] = 0; - return 1; - } - my_file_pointer--; - } - - return 0; -} - -static int -skip_to_next_name(char *name) -{ - while ((file_pointer < file_size)) - { - if (file_buffer[file_pointer] == '(') - { - return get_previous_identifier(file_pointer - 1, name); - } - file_pointer++; - } - return 0; -} - -// Build a path and filename so it is of the format [module][directory][filename]. -// Also convert all backslashes into forward slashes. -static void -get_filename(char *cvspath, char *filename, char *result) -{ - strcpy(result, cvspath); - strcat(result, filename); - path_to_url(result); -} - -static void -parse_file(char *fullname, char *cvspath, char *filename) -{ - PAPI_INFO api_info; - char prev[200]; - char name[200]; - int tag_id; - - read_file(fullname); - - prev[0] = 0; - do - { - tag_id = skip_to_next_tag(); - if (tag_id == TAG_UNKNOWN) - { - break; - } - - /* Skip rest of the comments between the tag and the function name */ - skip_comments(); - - if (skip_to_next_name(name)) - { - if (strlen(name) == 0) - { - printf("Warning: empty function name in file %s. Previous function name was %s.\n", - fullname, prev); - } - api_info = malloc(sizeof(API_INFO)); - if (api_info == NULL) - { - printf("Out of memory\n"); - exit(1); - } - - api_info->tag_id = tag_id; - strcpy(api_info->name, name); - - get_filename(cvspath, filename, api_info->filename); - - api_info->next = api_info_list; - api_info_list = api_info; - strcpy(prev, name); - } - } while (1); - - close_file(); -} - -#ifdef WIN32 - -/* Win32 version */ -static void -process_directory (char *path, char *cvspath) -{ - struct _finddata_t f; - int findhandle; - char searchbuf[MAX_PATH]; - char buf[MAX_PATH]; - char newcvspath[MAX_PATH]; - - strcpy(searchbuf, path); - strcat(searchbuf, "*.*"); - - findhandle =_findfirst(searchbuf, &f); - if (findhandle != -1) - { - do - { - if (f.attrib & _A_SUBDIR) - { - if (f.name[0] != '.') - { - strcpy(buf, path); - strcat(buf, f.name); - strcat(buf, DIR_SEPARATOR_STRING); - - strcpy(newcvspath, cvspath); - strcat(newcvspath, f.name); - strcat(newcvspath, "/"); - - process_directory(buf, newcvspath); - } - continue; - } - - strcpy(buf, path); - strcat(buf, f.name); - - /* Must be a .c file */ - if (!is_valid_file(buf)) - { - continue; - } - - parse_file(buf, cvspath, f.name); - } - while (_findnext(findhandle, &f) == 0); - _findclose(findhandle); - } - else - { - printf("Cannot open directory '%s'", path); - exit(1); - } -} - -#else - -/* Linux version */ -static void -process_directory (char *path, char *cvspath) -{ - DIR *dirp; - struct dirent *entry; - struct stat stbuf; - char buf[MAX_PATH]; - char newcvspath[MAX_PATH]; - -#ifdef HAVE_D_TYPE - dirp = opendir(path); - 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 (path[0] == DIR_SEPARATOR_CHAR) - { - strcpy(buf, path); - strcat(buf, DIR_SEPARATOR_STRING); - strcat(buf, entry->d_name); - } - else - { - if (!getcwd(buf, sizeof(buf))) - { - printf("Can't get CWD: %s\n", strerror(errno)); - return; - } - strcat(buf, DIR_SEPARATOR_STRING); - strcat(buf, path); - strcat(buf, entry->d_name); - } - - if (stat(buf, &stbuf) == -1) - { - printf("Can't access '%s' (%s)\n", buf, strerror(errno)); - return; - } - - if (S_ISDIR(stbuf.st_mode)) - { - strcpy(newcvspath, cvspath); - strcat(newcvspath, f.name); - strcat(newcvspath, "/"); - - process_directory(buf, newcvspath); - continue; - } - - /* Must be a .c file */ - if (!is_valid_file(buf)) - { - continue; - } - - parse_file(buf, cvspath, entry->d_name); - } - } - closedir(dirp); - } - else - { - printf("Can't open %s\n", path); - exit(1); - } - -#else - - dirp = opendir(path); - 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 (path[0] == DIR_SEPARATOR_CHAR) - { - strcpy(buf, path); - strcat(buf, DIR_SEPARATOR_STRING); - strcat(buf, entry->d_name); - } - else - { - if (!getcwd(buf, sizeof(buf))) - { - printf("Can't get CWD: %s\n", strerror(errno)); - return; - } - strcat(buf, DIR_SEPARATOR_STRING); - strcat(buf, path); - strcat(buf, entry->d_name); - } - - if (stat(buf, &stbuf) == -1) - { - printf("Can't access '%s' (%s)\n", buf, strerror(errno)); - return; - } - - if (S_ISDIR(stbuf.st_mode)) - { - strcpy(newcvspath, cvspath); - strcat(newcvspath, entry->d_name); - strcat(newcvspath, "/"); - - process_directory(buf, newcvspath); - continue; - } - - /* Must be a .c file */ - if (!is_valid_file(buf)) - { - continue; - } - - parse_file(buf, cvspath, entry->d_name); - } - closedir(dirp); - } - else - { - printf("Can't open %s\n", path); - exit(1); - } - -#endif -} - -#endif - -/* - * This function compares two API entries. It returns a negative value if p is - * before q, or a positive value if p is after q. - */ -static int -compare_api_order(PAPI_INFO p, PAPI_INFO q) -{ - return strcmp(p->name, q->name); -} - -char * -get_filename_without_base(char *component_base, - char *filename) -{ - return &filename[strlen(component_base)]; -} - -static void -generate_xml_for_component(char *component_name, - char *component_base) -{ - PAPI_INFO api_info; - char canonical_base[MAX_PATH]; - char buf[200]; - int complete; - int implemented_total; - int unimplemented_total; - - // Sort list - api_info_list = sort_linked_list(api_info_list, 0, compare_api_order); - - implemented_total = 0; - unimplemented_total = 0; - - api_info = api_info_list; - while (api_info != NULL) - { - if (api_info->tag_id == TAG_IMPLEMENTED) - implemented_total ++; - else if (api_info->tag_id == TAG_UNIMPLEMENTED) - unimplemented_total ++; - - api_info = api_info->next; - } - - if (implemented_total + unimplemented_total > 0) - complete = ((implemented_total) * 100) / (implemented_total + unimplemented_total); - else - complete = 100; - - strcpy(canonical_base, component_base); - path_to_url(canonical_base); - - sprintf(buf, "", - component_name, canonical_base, complete, implemented_total, unimplemented_total); - write_line(buf); - - if (api_info_list != NULL) - { - write_line(""); - - api_info = api_info_list; - while (api_info != NULL) - { - sprintf(buf, "", - api_info->name, - api_info->tag_id == TAG_IMPLEMENTED ? "true" : "false", - get_filename_without_base(component_base, - api_info->filename)); - write_line(buf); - api_info = api_info->next; - } - - write_line(""); - } - - write_line(""); -} - -static void -read_input_file(char *input_file) -{ - char component_name[MAX_PATH]; - char component_path[MAX_PATH]; - char *canonical_path; - unsigned int index; - unsigned int start; - PAPI_INFO api_info; - PAPI_INFO next_api_info; - char *buffer; - unsigned int size; - int len; - - in = fopen(input_file, "rb"); - if (in == NULL) - { - printf("Cannot open input file"); - exit(1); - } - - // Get the size of the file - fseek(in, 0, SEEK_END); - size = ftell(in); - - // Load it all into memory - buffer = malloc(size); - if (buffer == NULL) - { - fclose(in); - printf("Out of memory\n"); - exit(1); - } - fseek(in, 0, SEEK_SET); - if (fread (buffer, 1, size, in) < 1) - { - fclose(in); - printf("Read error in file %s\n", input_file); - exit(1); - } - - index = 0; - - write_line(""); - write_line(""); - write_line(""); - write_line(""); - - while (1) - { - /* Free previous list */ - for (api_info = api_info_list; api_info != NULL; api_info = next_api_info) - { - next_api_info = api_info->next; - free(api_info); - } - api_info_list = NULL; - - /* Skip whitespace and eol characters */ - while ((index < size) && (is_whitespace(buffer[index]) || (is_eol_char(buffer[index])))) - index++; - if ((file_pointer < size) && (buffer[index] == '\n')) - index++; - - if (buffer[index] == ';') - { - /* Skip comments */ - while ((index < size) && (!is_eol_char(buffer[index]))) - index++; - if ((index < size) && (buffer[index] == '\n')) - index++; - continue; - } - - /* Get component name */ - start = index; - while ((index < size) && (!is_whitespace(buffer[index]))) - index++; - if (index >= size) - break; - - len = index - start; - strncpy(component_name, &buffer[start], len); - component_name[len] = 0; - - /* Skip whitespace */ - while ((index < size) && (is_whitespace(buffer[index]))) - index++; - if (index >= size) - break; - - /* Get component path */ - start = index; - while ((index < size) && (!is_whitespace(buffer[index]) && !is_eol_char(buffer[index]))) - index++; - - len = index - start; - strncpy(component_path, &buffer[start], len); - component_path[len] = 0; - - /* Append directory separator if needed */ - if (component_path[strlen(component_path)] != DIR_SEPARATOR_CHAR) - { - int i = strlen(component_path); - component_path[strlen(component_path)] = DIR_SEPARATOR_CHAR; - component_path[i + 1] = 0; - } - - /* Skip to end of line */ - while ((index < size) && (!is_eol_char(buffer[index]))) - index++; - if ((index < size) && (buffer[index] == '\n')) - index++; - - canonical_path = convert_path(component_path); - if (canonical_path != NULL) - { - process_directory(canonical_path, canonical_path); - free(canonical_path); - generate_xml_for_component(component_name, - component_path); - } - } - - write_line(""); -} - -static char HELP[] = - "RGENSTAT input-filename output-filename\n" - "\n" - " input-filename File containing list of components to process\n" - " output-filename File to create\n"; - -int main(int argc, char **argv) -{ - char *input_file; - char *output_file; - - if (argc != 3) - { - puts(HELP); - return 1; - } - - input_file = convert_path(argv[1]); - if (input_file[0] == 0) - { - free(input_file); - printf("Missing input-filename\n"); - return 1; - } - - output_file = convert_path(argv[2]); - if (output_file[0] == 0) - { - free(input_file); - free(output_file); - printf("Missing output-filename\n"); - return 1; - } - - out = fopen(output_file, "wb"); - if (out == NULL) - { - free(input_file); - free(output_file); - printf("Cannot open output file"); - return 1; - } - - read_input_file(input_file); - - free(input_file); - free(output_file); - fclose(out); - - return 0; -} - -/* EOF */ diff --git a/reactos/tools/rgenstat/rgenstat.rbuild b/reactos/tools/rgenstat/rgenstat.rbuild deleted file mode 100644 index 6de3bef7407..00000000000 --- a/reactos/tools/rgenstat/rgenstat.rbuild +++ /dev/null @@ -1,6 +0,0 @@ - - - - rgenstat.c - llmosrt.c - diff --git a/reactos/tools/rgenstat/web/c.gif b/reactos/tools/rgenstat/web/c.gif deleted file mode 100644 index 08f00d4ea11..00000000000 Binary files a/reactos/tools/rgenstat/web/c.gif and /dev/null differ diff --git a/reactos/tools/rgenstat/web/f.gif b/reactos/tools/rgenstat/web/f.gif deleted file mode 100644 index 75fe3586d48..00000000000 Binary files a/reactos/tools/rgenstat/web/f.gif and /dev/null differ diff --git a/reactos/tools/rgenstat/web/i.gif b/reactos/tools/rgenstat/web/i.gif deleted file mode 100644 index 2c8ca547929..00000000000 Binary files a/reactos/tools/rgenstat/web/i.gif and /dev/null differ diff --git a/reactos/tools/rgenstat/web/index.html b/reactos/tools/rgenstat/web/index.html deleted file mode 100644 index 2231c3a002d..00000000000 --- a/reactos/tools/rgenstat/web/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - -If your browser do not support XSLT click here. - - - diff --git a/reactos/tools/rgenstat/web/rapistatus.css b/reactos/tools/rgenstat/web/rapistatus.css deleted file mode 100644 index a429226f4bb..00000000000 --- a/reactos/tools/rgenstat/web/rapistatus.css +++ /dev/null @@ -1,57 +0,0 @@ -.c IMG -{ - border: 0px; -} - -.c, .c_, -.f, .f_, -.i, .i_, -.u, .u_ -{ - FONT: 10px 'Verdana'; - margin-left: 20px; -} - -.c_ .f, -.c_ .f_ -{ - display: none; -} - -.h -{ - display: none; -} - -.t -{ - cursor: pointer; - margin-right: 8px; -} - -.filter -{ - cursor: pointer; - vertical-align: middle; -} - - -.st -{ - margin-left: 20px; -} - -.i -{ - margin-left: 20px; -} - -.u -{ - margin-left: 20px; -} - -.l -{ - cursor: pointer; -} diff --git a/reactos/tools/rgenstat/web/rapistatus.js b/reactos/tools/rgenstat/web/rapistatus.js deleted file mode 100644 index 0657dbd4604..00000000000 --- a/reactos/tools/rgenstat/web/rapistatus.js +++ /dev/null @@ -1,291 +0,0 @@ -function toggle (elt) -{ - if (elt == null) - return; - - var eltLink = elt.firstChild; - if (eltLink != null && eltLink.className == 't') // toggle - { - var ich = elt.className.indexOf ('_'); - if (ich < 0) - { - eltLink.src = 'tp.gif'; - elt.className += '_'; - } - else - { - eltLink.src = 'tm.gif'; - elt.className = elt.className.slice (0, ich); - } - } -} - -function setView (elt, fView) -{ - var eltLink = elt.firstChild; - if (eltLink != null && eltLink.className == 't') // toggle - { - var ich = elt.className.indexOf ('_'); - if (ich < 0 && !fView) - { - eltLink.src = 'tp.gif'; - elt.className += '_'; - } - else if (ich >= 0 && fView) - { - eltLink.src = 'tm.gif'; - elt.className = elt.className.slice (0, ich); - } - } -} - -function trimSrc (strSrc) -{ - return strSrc.slice (strSrc.lastIndexOf ('/') + 1, strSrc.lastIndexOf ('.')); -} - -function getChildrenByTagName (elt, strTag) -{ - strTag = strTag.toLowerCase (); - var rgChildren = new Array (); - var eltChild = elt.firstChild; - while (eltChild) - { - if (eltChild.tagName && eltChild.tagName.toLowerCase () == strTag) - rgChildren.push (eltChild); - eltChild = eltChild.nextSibling; - } - return rgChildren; -} - -function viewAll (elt, dictTypes) -{ - var fView = false; - var rgImages = getChildrenByTagName (elt, 'IMG'); - var cImages = rgImages.length; - for (var iImage = 0; iImage < cImages; iImage++) - { - var strImage = trimSrc (rgImages [iImage].src); - if (dictTypes [strImage]) - { - fView = true; - break; - } - } - var rgElts = getChildrenByTagName (elt, 'DIV'); - var cElts = rgElts.length; - if (cElts != 0) - { - var iElt; - for (iElt = 0; iElt < cElts; iElt ++) - fView |= viewAll (rgElts [iElt], dictTypes); - } - elt.style.display = fView ? '' : 'none'; - return fView; -} - -function getView (elt) -{ - var eltLink = elt.firstChild; - if (eltLink != null && eltLink.className == 't') // toggle - { - var ich = elt.className.indexOf ('_'); - if (ich < 0) - return true; - } - return false; -} - -function getParentDiv (elt) -{ - if (elt) - { - do - { - elt = elt.parentNode; - } - while (elt && elt.tagName != 'DIV'); - } - - return elt; -} - -function getName (elt) -{ - var rgSpans = getChildrenByTagName (elt, 'SPAN'); - for (var iSpan = 0; iSpan < rgSpans.length; iSpan ++) - { - var span = rgSpans [iSpan]; - if (span.className == 'l') // label - { - if (span.innerText) - return span.innerText; - else - return span.firstChild.nodeValue; - } - } - return null; -} - -function clickHandler (evt) -{ - var elt; - if (document.layers) - elt = evt.taget; - else if (window.event && window.event.srcElement) - { - elt = window.event.srcElement; - evt = window.event; - } - else if (evt && evt.stopPropagation) - elt = evt.target; - - if (!elt.className && elt.parentNode) - elt = elt.parentNode; - - if (elt.className == 'l') // label - { - var strName; - - eltDiv = getParentDiv (elt); - var strEltClass = eltDiv.className; - if (strEltClass.charAt (strEltClass.length - 1) == '_') - strEltClass = strEltClass.slice (0, strEltClass.length - 1); - strName = getName (eltDiv); - - if (strEltClass == 'f') // Function - { - var strFilename = elt.nextSibling; - if (strFilename && strFilename.innerText) - { - var strRoot = 'http://svn.reactos.org/svn/reactos/trunk/reactos/'; - var strExtra = '?view=markup'; - window.open (strRoot + strFilename.innerText + strExtra, 'SVN'); - } - } - } - else - { - if (elt.parentNode && elt.parentNode.className == 't') // toggle - elt = elt.parentNode; - else if (elt.className != 't') // toggle - return; - - while (elt != null && elt.tagName != 'DIV') - elt = elt.parentNode; - - if (evt.shiftKey) - { - var rgElts = getChildrenByTagName (elt, 'DIV'); - var cElts = rgElts.length; - if (cElts != 0) - { - var fView = false; - var iElt; - for (iElt = 0; iElt < cElts; iElt ++) - { - if (getView (rgElts [iElt])) - { - fView = true; - break; - } - } - for (iElt = 0; iElt < cElts; iElt ++) - { - setView (rgElts [iElt], !fView); - } - } - } - else if (evt.ctrlKey) - { - setView (elt, true); - var eltParent = getParentDiv (elt); - while (eltParent) - { - var rgSiblings = getChildrenByTagName (eltParent, 'DIV'); - var cSiblings = rgSiblings.length; - for (var iSibling = 0; iSibling < cSiblings; iSibling++) - { - var eltSibling = rgSiblings [iSibling]; - if (eltSibling != elt) - { - setView (eltSibling, false); - } - } - elt = eltParent; - eltParent = getParentDiv (elt); - } - } - else - toggle (elt); - } - - return false; -} - -function filterTree () -{ - var eltImplemented = document.getElementById ('implemented'); - var eltUnimplemented = document.getElementById ('unimplemented'); - - var dictTypes = new Object (); - if (eltImplemented.checked) - dictTypes ['i'] = true; - if (eltUnimplemented.checked) - dictTypes ['u'] = true; - - viewAll (document.getElementById ('ROOT'), dictTypes); -} - -function selectImplemented () -{ - toggleFilter ('implemented'); -} - -function selectUnimplemented () -{ - toggleFilter ('unimplemented'); -} - -function toggleFilter (strFilter) -{ - var eltImplemented = document.getElementById ('implemented'); - var eltUnimplemented = document.getElementById ('unimplemented'); - - var eltToggle = document.getElementById (strFilter); - if (window && window.event && window.event.shiftKey) - { - eltImplemented.checked = eltUnimplemented.checked; - eltUnimplemented.checked = true; - } - else - if (!eltUnimplemented.checked && !eltImplemented.checked) - { - eltImplemented.checked = eltUnimplemented.checked = true; - eltToggle.checked = false; - } - filterTree (); -} - -function onLoad () -{ - var eltImplemented = document.getElementById ('implemented'); - var eltUnimplemented = document.getElementById ('unimplemented'); - eltImplemented.checked = eltUnimplemented.checked = true; -} - -if (document.layers) -{ - document.captureEvents (Event.MOUSEUP); - document.onmouseup = clickHandler; -} -else if (document.attachEvent) -{ - document.attachEvent('onclick', clickHandler); -} -else if (document.addEventListener) -{ - document.addEventListener('click', clickHandler, false); -} -else - document.onclick = clickHandler; diff --git a/reactos/tools/rgenstat/web/rapistatus.xsl b/reactos/tools/rgenstat/web/rapistatus.xsl deleted file mode 100644 index 4eb01432956..00000000000 --- a/reactos/tools/rgenstat/web/rapistatus.xsl +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - - - - - ReactOS API Status - - - - - -

-

ReactOS API Status

-

-

- - - - - - - - - - - -
Implemented -
Unimplemented -
-

-
- -
-

- Legend :
- - - - - - - - - - - - - - - - - -
Component Implemented Complete
Function Unimplemented
- -

- - -
- - - - - - - - - - -
- - c - - - - -
-
- - - - - - - - - - - - - -
- - f - - - -
-
- - - - - - - - - - - _ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - : - - % - - - - - : - - - - - : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/reactos/tools/rgenstat/web/sc.gif b/reactos/tools/rgenstat/web/sc.gif deleted file mode 100644 index b02afd9b2e0..00000000000 Binary files a/reactos/tools/rgenstat/web/sc.gif and /dev/null differ diff --git a/reactos/tools/rgenstat/web/tb.gif b/reactos/tools/rgenstat/web/tb.gif deleted file mode 100644 index ee68c5a356b..00000000000 Binary files a/reactos/tools/rgenstat/web/tb.gif and /dev/null differ diff --git a/reactos/tools/rgenstat/web/tm.gif b/reactos/tools/rgenstat/web/tm.gif deleted file mode 100644 index 3c8f18aecea..00000000000 Binary files a/reactos/tools/rgenstat/web/tm.gif and /dev/null differ diff --git a/reactos/tools/rgenstat/web/tp.gif b/reactos/tools/rgenstat/web/tp.gif deleted file mode 100644 index 8b7435361b7..00000000000 Binary files a/reactos/tools/rgenstat/web/tp.gif and /dev/null differ diff --git a/reactos/tools/rgenstat/web/u.gif b/reactos/tools/rgenstat/web/u.gif deleted file mode 100644 index 0c7194786d5..00000000000 Binary files a/reactos/tools/rgenstat/web/u.gif and /dev/null differ diff --git a/reactos/tools/rsym/CMakeLists.txt b/reactos/tools/rsym/CMakeLists.txt deleted file mode 100644 index fff410ad553..00000000000 --- a/reactos/tools/rsym/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ - -if(ARCH MATCHES i386) - add_executable(rsym rsym_common.c rsym.c) -elseif(ARCH MATCHES amd64) - add_executable(rsym rsym_common.c rsym64.c) -endif() -add_executable(raddr2line rsym_common.c raddr2line.c) diff --git a/reactos/tools/rsym/dwarf2.h b/reactos/tools/rsym/dwarf2.h deleted file mode 100644 index f07054d6ebc..00000000000 --- a/reactos/tools/rsym/dwarf2.h +++ /dev/null @@ -1,839 +0,0 @@ -/* Declarations and definitions of codes relating to the DWARF2 symbolic - debugging information format. - Copyright (C) 1992, 1993, 1995, 1996, 1997, 1999, 2000, 2001, 2002, - 2003, 2004 Free Software Foundation, Inc. - - Written by Gary Funck (gary@intrepid.com) The Ada Joint Program - Office (AJPO), Florida State University and Silicon Graphics Inc. - provided support for this effort -- June 21, 1995. - - Derived from the DWARF 1 implementation written by Ron Guilmette - (rfg@netcom.com), November 1990. - - This file is part of GCC. - - GCC 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, or (at your option) any later - version. - - GCC 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. -*/ - -/* This file is derived from the DWARF specification (a public document) - Revision 2.0.0 (July 27, 1993) developed by the UNIX International - Programming Languages Special Interest Group (UI/PLSIG) and distributed - by UNIX International. Copies of this specification are available from - UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054. - - This file also now contains definitions from the DWARF 3 specification. */ - -/* This file is shared between GCC and GDB, and should not contain - prototypes. */ - -#pragma once - -//#include "list.h" - -#include -/* Structure found in the .debug_line section. */ -typedef struct -{ - unsigned char li_length [4]; - unsigned char li_version [2]; - unsigned char li_prologue_length [4]; - unsigned char li_min_insn_length [1]; - unsigned char li_default_is_stmt [1]; - unsigned char li_line_base [1]; - unsigned char li_line_range [1]; - unsigned char li_opcode_base [1]; -} -DWARF2_External_LineInfo; - -typedef struct -{ - unsigned long li_length; - unsigned short li_version; - unsigned int li_prologue_length; - unsigned char li_min_insn_length; - unsigned char li_default_is_stmt; - int li_line_base; - unsigned char li_line_range; - unsigned char li_opcode_base; -} -DWARF2_Internal_LineInfo; - -/* Structure found in .debug_pubnames section. */ -typedef struct -{ - unsigned char pn_length [4]; - unsigned char pn_version [2]; - unsigned char pn_offset [4]; - unsigned char pn_size [4]; -} -DWARF2_External_PubNames; - -typedef struct -{ - unsigned long pn_length; - unsigned short pn_version; - unsigned long pn_offset; - unsigned long pn_size; -} -DWARF2_Internal_PubNames; - -/* Structure found in .debug_info section. */ -typedef struct -{ - unsigned char cu_length [4]; - unsigned char cu_version [2]; - unsigned char cu_abbrev_offset [4]; - unsigned char cu_pointer_size [1]; -} -DWARF2_External_CompUnit; - -typedef struct -{ - unsigned long cu_length; - unsigned short cu_version; - unsigned long cu_abbrev_offset; - unsigned char cu_pointer_size; -} -DWARF2_Internal_CompUnit; - -typedef struct -{ - unsigned char ar_length [4]; - unsigned char ar_version [2]; - unsigned char ar_info_offset [4]; - unsigned char ar_pointer_size [1]; - unsigned char ar_segment_size [1]; -} -DWARF2_External_ARange; - -typedef struct -{ - unsigned long ar_length; - unsigned short ar_version; - unsigned long ar_info_offset; - unsigned char ar_pointer_size; - unsigned char ar_segment_size; -} -DWARF2_Internal_ARange; -#include - -/* Tag names and codes. */ -enum dwarf_tag - { - DW_TAG_padding = 0x00, - DW_TAG_array_type = 0x01, - DW_TAG_class_type = 0x02, - DW_TAG_entry_point = 0x03, - DW_TAG_enumeration_type = 0x04, - DW_TAG_formal_parameter = 0x05, - DW_TAG_imported_declaration = 0x08, - DW_TAG_label = 0x0a, - DW_TAG_lexical_block = 0x0b, - DW_TAG_member = 0x0d, - DW_TAG_pointer_type = 0x0f, - DW_TAG_reference_type = 0x10, - DW_TAG_compile_unit = 0x11, - DW_TAG_string_type = 0x12, - DW_TAG_structure_type = 0x13, - DW_TAG_subroutine_type = 0x15, - DW_TAG_typedef = 0x16, - DW_TAG_union_type = 0x17, - DW_TAG_unspecified_parameters = 0x18, - DW_TAG_variant = 0x19, - DW_TAG_common_block = 0x1a, - DW_TAG_common_inclusion = 0x1b, - DW_TAG_inheritance = 0x1c, - DW_TAG_inlined_subroutine = 0x1d, - DW_TAG_module = 0x1e, - DW_TAG_ptr_to_member_type = 0x1f, - DW_TAG_set_type = 0x20, - DW_TAG_subrange_type = 0x21, - DW_TAG_with_stmt = 0x22, - DW_TAG_access_declaration = 0x23, - DW_TAG_base_type = 0x24, - DW_TAG_catch_block = 0x25, - DW_TAG_const_type = 0x26, - DW_TAG_constant = 0x27, - DW_TAG_enumerator = 0x28, - DW_TAG_file_type = 0x29, - DW_TAG_friend = 0x2a, - DW_TAG_namelist = 0x2b, - DW_TAG_namelist_item = 0x2c, - DW_TAG_packed_type = 0x2d, - DW_TAG_subprogram = 0x2e, - DW_TAG_template_type_param = 0x2f, - DW_TAG_template_value_param = 0x30, - DW_TAG_thrown_type = 0x31, - DW_TAG_try_block = 0x32, - DW_TAG_variant_part = 0x33, - DW_TAG_variable = 0x34, - DW_TAG_volatile_type = 0x35, - /* DWARF 3. */ - DW_TAG_dwarf_procedure = 0x36, - DW_TAG_restrict_type = 0x37, - DW_TAG_interface_type = 0x38, - DW_TAG_namespace = 0x39, - DW_TAG_imported_module = 0x3a, - DW_TAG_unspecified_type = 0x3b, - DW_TAG_partial_unit = 0x3c, - DW_TAG_imported_unit = 0x3d, - /* SGI/MIPS Extensions. */ - DW_TAG_MIPS_loop = 0x4081, - /* HP extensions. See: ftp://ftp.hp.com/pub/lang/tools/WDB/wdb-4.0.tar.gz . */ - DW_TAG_HP_array_descriptor = 0x4090, - /* GNU extensions. */ - DW_TAG_format_label = 0x4101, /* For FORTRAN 77 and Fortran 90. */ - DW_TAG_function_template = 0x4102, /* For C++. */ - DW_TAG_class_template = 0x4103, /* For C++. */ - DW_TAG_GNU_BINCL = 0x4104, - DW_TAG_GNU_EINCL = 0x4105, - /* Extensions for UPC. See: http://upc.gwu.edu/~upc. */ - DW_TAG_upc_shared_type = 0x8765, - DW_TAG_upc_strict_type = 0x8766, - DW_TAG_upc_relaxed_type = 0x8767, - /* PGI (STMicroelectronics) extensions. No documentation available. */ - DW_TAG_PGI_kanji_type = 0xA000, - DW_TAG_PGI_interface_block = 0xA020 - }; - -#define DW_TAG_lo_user 0x4080 -#define DW_TAG_hi_user 0xffff - -/* Flag that tells whether entry has a child or not. */ -#define DW_children_no 0 -#define DW_children_yes 1 - -/* Form names and codes. */ -enum dwarf_form - { - DW_FORM_addr = 0x01, - DW_FORM_block2 = 0x03, - DW_FORM_block4 = 0x04, - DW_FORM_data2 = 0x05, - DW_FORM_data4 = 0x06, - DW_FORM_data8 = 0x07, - DW_FORM_string = 0x08, - DW_FORM_block = 0x09, - DW_FORM_block1 = 0x0a, - DW_FORM_data1 = 0x0b, - DW_FORM_flag = 0x0c, - DW_FORM_sdata = 0x0d, - DW_FORM_strp = 0x0e, - DW_FORM_udata = 0x0f, - DW_FORM_ref_addr = 0x10, - DW_FORM_ref1 = 0x11, - DW_FORM_ref2 = 0x12, - DW_FORM_ref4 = 0x13, - DW_FORM_ref8 = 0x14, - DW_FORM_ref_udata = 0x15, - DW_FORM_indirect = 0x16 - }; - -/* Attribute names and codes. */ -enum dwarf_attribute - { - DW_AT_sibling = 0x01, - DW_AT_location = 0x02, - DW_AT_name = 0x03, - DW_AT_ordering = 0x09, - DW_AT_subscr_data = 0x0a, - DW_AT_byte_size = 0x0b, - DW_AT_bit_offset = 0x0c, - DW_AT_bit_size = 0x0d, - DW_AT_element_list = 0x0f, - DW_AT_stmt_list = 0x10, - DW_AT_low_pc = 0x11, - DW_AT_high_pc = 0x12, - DW_AT_language = 0x13, - DW_AT_member = 0x14, - DW_AT_discr = 0x15, - DW_AT_discr_value = 0x16, - DW_AT_visibility = 0x17, - DW_AT_import = 0x18, - DW_AT_string_length = 0x19, - DW_AT_common_reference = 0x1a, - DW_AT_comp_dir = 0x1b, - DW_AT_const_value = 0x1c, - DW_AT_containing_type = 0x1d, - DW_AT_default_value = 0x1e, - DW_AT_inline = 0x20, - DW_AT_is_optional = 0x21, - DW_AT_lower_bound = 0x22, - DW_AT_producer = 0x25, - DW_AT_prototyped = 0x27, - DW_AT_return_addr = 0x2a, - DW_AT_start_scope = 0x2c, - DW_AT_stride_size = 0x2e, - DW_AT_upper_bound = 0x2f, - DW_AT_abstract_origin = 0x31, - DW_AT_accessibility = 0x32, - DW_AT_address_class = 0x33, - DW_AT_artificial = 0x34, - DW_AT_base_types = 0x35, - DW_AT_calling_convention = 0x36, - DW_AT_count = 0x37, - DW_AT_data_member_location = 0x38, - DW_AT_decl_column = 0x39, - DW_AT_decl_file = 0x3a, - DW_AT_decl_line = 0x3b, - DW_AT_declaration = 0x3c, - DW_AT_discr_list = 0x3d, - DW_AT_encoding = 0x3e, - DW_AT_external = 0x3f, - DW_AT_frame_base = 0x40, - DW_AT_friend = 0x41, - DW_AT_identifier_case = 0x42, - DW_AT_macro_info = 0x43, - DW_AT_namelist_items = 0x44, - DW_AT_priority = 0x45, - DW_AT_segment = 0x46, - DW_AT_specification = 0x47, - DW_AT_static_link = 0x48, - DW_AT_type = 0x49, - DW_AT_use_location = 0x4a, - DW_AT_variable_parameter = 0x4b, - DW_AT_virtuality = 0x4c, - DW_AT_vtable_elem_location = 0x4d, - /* DWARF 3 values. */ - DW_AT_allocated = 0x4e, - DW_AT_associated = 0x4f, - DW_AT_data_location = 0x50, - DW_AT_stride = 0x51, - DW_AT_entry_pc = 0x52, - DW_AT_use_UTF8 = 0x53, - DW_AT_extension = 0x54, - DW_AT_ranges = 0x55, - DW_AT_trampoline = 0x56, - DW_AT_call_column = 0x57, - DW_AT_call_file = 0x58, - DW_AT_call_line = 0x59, - /* SGI/MIPS extensions. */ - DW_AT_MIPS_fde = 0x2001, - DW_AT_MIPS_loop_begin = 0x2002, - DW_AT_MIPS_tail_loop_begin = 0x2003, - DW_AT_MIPS_epilog_begin = 0x2004, - DW_AT_MIPS_loop_unroll_factor = 0x2005, - DW_AT_MIPS_software_pipeline_depth = 0x2006, - DW_AT_MIPS_linkage_name = 0x2007, - DW_AT_MIPS_stride = 0x2008, - DW_AT_MIPS_abstract_name = 0x2009, - DW_AT_MIPS_clone_origin = 0x200a, - DW_AT_MIPS_has_inlines = 0x200b, - /* HP extensions. */ - DW_AT_HP_block_index = 0x2000, - DW_AT_HP_unmodifiable = 0x2001, /* Same as DW_AT_MIPS_fde. */ - DW_AT_HP_actuals_stmt_list = 0x2010, - DW_AT_HP_proc_per_section = 0x2011, - DW_AT_HP_raw_data_ptr = 0x2012, - DW_AT_HP_pass_by_reference = 0x2013, - DW_AT_HP_opt_level = 0x2014, - DW_AT_HP_prof_version_id = 0x2015, - DW_AT_HP_opt_flags = 0x2016, - DW_AT_HP_cold_region_low_pc = 0x2017, - DW_AT_HP_cold_region_high_pc = 0x2018, - DW_AT_HP_all_variables_modifiable = 0x2019, - DW_AT_HP_linkage_name = 0x201a, - DW_AT_HP_prof_flags = 0x201b, /* In comp unit of procs_info for -g. */ - /* GNU extensions. */ - DW_AT_sf_names = 0x2101, - DW_AT_src_info = 0x2102, - DW_AT_mac_info = 0x2103, - DW_AT_src_coords = 0x2104, - DW_AT_body_begin = 0x2105, - DW_AT_body_end = 0x2106, - DW_AT_GNU_vector = 0x2107, - /* VMS extensions. */ - DW_AT_VMS_rtnbeg_pd_address = 0x2201, - /* UPC extension. */ - DW_AT_upc_threads_scaled = 0x3210, - /* PGI (STMicroelectronics) extensions. */ - DW_AT_PGI_lbase = 0x3a00, - DW_AT_PGI_soffset = 0x3a01, - DW_AT_PGI_lstride = 0x3a02 - }; - -#define DW_AT_lo_user 0x2000 /* Implementation-defined range start. */ -#define DW_AT_hi_user 0x3ff0 /* Implementation-defined range end. */ - -/* Location atom names and codes. */ -enum dwarf_location_atom - { - DW_OP_addr = 0x03, - DW_OP_deref = 0x06, - DW_OP_const1u = 0x08, - DW_OP_const1s = 0x09, - DW_OP_const2u = 0x0a, - DW_OP_const2s = 0x0b, - DW_OP_const4u = 0x0c, - DW_OP_const4s = 0x0d, - DW_OP_const8u = 0x0e, - DW_OP_const8s = 0x0f, - DW_OP_constu = 0x10, - DW_OP_consts = 0x11, - DW_OP_dup = 0x12, - DW_OP_drop = 0x13, - DW_OP_over = 0x14, - DW_OP_pick = 0x15, - DW_OP_swap = 0x16, - DW_OP_rot = 0x17, - DW_OP_xderef = 0x18, - DW_OP_abs = 0x19, - DW_OP_and = 0x1a, - DW_OP_div = 0x1b, - DW_OP_minus = 0x1c, - DW_OP_mod = 0x1d, - DW_OP_mul = 0x1e, - DW_OP_neg = 0x1f, - DW_OP_not = 0x20, - DW_OP_or = 0x21, - DW_OP_plus = 0x22, - DW_OP_plus_uconst = 0x23, - DW_OP_shl = 0x24, - DW_OP_shr = 0x25, - DW_OP_shra = 0x26, - DW_OP_xor = 0x27, - DW_OP_bra = 0x28, - DW_OP_eq = 0x29, - DW_OP_ge = 0x2a, - DW_OP_gt = 0x2b, - DW_OP_le = 0x2c, - DW_OP_lt = 0x2d, - DW_OP_ne = 0x2e, - DW_OP_skip = 0x2f, - DW_OP_lit0 = 0x30, - DW_OP_lit1 = 0x31, - DW_OP_lit2 = 0x32, - DW_OP_lit3 = 0x33, - DW_OP_lit4 = 0x34, - DW_OP_lit5 = 0x35, - DW_OP_lit6 = 0x36, - DW_OP_lit7 = 0x37, - DW_OP_lit8 = 0x38, - DW_OP_lit9 = 0x39, - DW_OP_lit10 = 0x3a, - DW_OP_lit11 = 0x3b, - DW_OP_lit12 = 0x3c, - DW_OP_lit13 = 0x3d, - DW_OP_lit14 = 0x3e, - DW_OP_lit15 = 0x3f, - DW_OP_lit16 = 0x40, - DW_OP_lit17 = 0x41, - DW_OP_lit18 = 0x42, - DW_OP_lit19 = 0x43, - DW_OP_lit20 = 0x44, - DW_OP_lit21 = 0x45, - DW_OP_lit22 = 0x46, - DW_OP_lit23 = 0x47, - DW_OP_lit24 = 0x48, - DW_OP_lit25 = 0x49, - DW_OP_lit26 = 0x4a, - DW_OP_lit27 = 0x4b, - DW_OP_lit28 = 0x4c, - DW_OP_lit29 = 0x4d, - DW_OP_lit30 = 0x4e, - DW_OP_lit31 = 0x4f, - DW_OP_reg0 = 0x50, - DW_OP_reg1 = 0x51, - DW_OP_reg2 = 0x52, - DW_OP_reg3 = 0x53, - DW_OP_reg4 = 0x54, - DW_OP_reg5 = 0x55, - DW_OP_reg6 = 0x56, - DW_OP_reg7 = 0x57, - DW_OP_reg8 = 0x58, - DW_OP_reg9 = 0x59, - DW_OP_reg10 = 0x5a, - DW_OP_reg11 = 0x5b, - DW_OP_reg12 = 0x5c, - DW_OP_reg13 = 0x5d, - DW_OP_reg14 = 0x5e, - DW_OP_reg15 = 0x5f, - DW_OP_reg16 = 0x60, - DW_OP_reg17 = 0x61, - DW_OP_reg18 = 0x62, - DW_OP_reg19 = 0x63, - DW_OP_reg20 = 0x64, - DW_OP_reg21 = 0x65, - DW_OP_reg22 = 0x66, - DW_OP_reg23 = 0x67, - DW_OP_reg24 = 0x68, - DW_OP_reg25 = 0x69, - DW_OP_reg26 = 0x6a, - DW_OP_reg27 = 0x6b, - DW_OP_reg28 = 0x6c, - DW_OP_reg29 = 0x6d, - DW_OP_reg30 = 0x6e, - DW_OP_reg31 = 0x6f, - DW_OP_breg0 = 0x70, - DW_OP_breg1 = 0x71, - DW_OP_breg2 = 0x72, - DW_OP_breg3 = 0x73, - DW_OP_breg4 = 0x74, - DW_OP_breg5 = 0x75, - DW_OP_breg6 = 0x76, - DW_OP_breg7 = 0x77, - DW_OP_breg8 = 0x78, - DW_OP_breg9 = 0x79, - DW_OP_breg10 = 0x7a, - DW_OP_breg11 = 0x7b, - DW_OP_breg12 = 0x7c, - DW_OP_breg13 = 0x7d, - DW_OP_breg14 = 0x7e, - DW_OP_breg15 = 0x7f, - DW_OP_breg16 = 0x80, - DW_OP_breg17 = 0x81, - DW_OP_breg18 = 0x82, - DW_OP_breg19 = 0x83, - DW_OP_breg20 = 0x84, - DW_OP_breg21 = 0x85, - DW_OP_breg22 = 0x86, - DW_OP_breg23 = 0x87, - DW_OP_breg24 = 0x88, - DW_OP_breg25 = 0x89, - DW_OP_breg26 = 0x8a, - DW_OP_breg27 = 0x8b, - DW_OP_breg28 = 0x8c, - DW_OP_breg29 = 0x8d, - DW_OP_breg30 = 0x8e, - DW_OP_breg31 = 0x8f, - DW_OP_regx = 0x90, - DW_OP_fbreg = 0x91, - DW_OP_bregx = 0x92, - DW_OP_piece = 0x93, - DW_OP_deref_size = 0x94, - DW_OP_xderef_size = 0x95, - DW_OP_nop = 0x96, - /* DWARF 3 extensions. */ - DW_OP_push_object_address = 0x97, - DW_OP_call2 = 0x98, - DW_OP_call4 = 0x99, - DW_OP_call_ref = 0x9a, - /* GNU extensions. */ - DW_OP_GNU_push_tls_address = 0xe0, - /* HP extensions. */ - DW_OP_HP_unknown = 0xe0, /* Ouch, the same as GNU_push_tls_address. */ - DW_OP_HP_is_value = 0xe1, - DW_OP_HP_fltconst4 = 0xe2, - DW_OP_HP_fltconst8 = 0xe3, - DW_OP_HP_mod_range = 0xe4, - DW_OP_HP_unmod_range = 0xe5, - DW_OP_HP_tls = 0xe6 - }; - -#define DW_OP_lo_user 0xe0 /* Implementation-defined range start. */ -#define DW_OP_hi_user 0xff /* Implementation-defined range end. */ - -/* Type encodings. */ -enum dwarf_type - { - DW_ATE_void = 0x0, - DW_ATE_address = 0x1, - DW_ATE_boolean = 0x2, - DW_ATE_complex_float = 0x3, - DW_ATE_float = 0x4, - DW_ATE_signed = 0x5, - DW_ATE_signed_char = 0x6, - DW_ATE_unsigned = 0x7, - DW_ATE_unsigned_char = 0x8, - /* DWARF 3. */ - DW_ATE_imaginary_float = 0x9, - /* HP extensions. */ - DW_ATE_HP_float80 = 0x80, /* Floating-point (80 bit). */ - DW_ATE_HP_complex_float80 = 0x81, /* Complex floating-point (80 bit). */ - DW_ATE_HP_float128 = 0x82, /* Floating-point (128 bit). */ - DW_ATE_HP_complex_float128 = 0x83, /* Complex floating-point (128 bit). */ - DW_ATE_HP_floathpintel = 0x84, /* Floating-point (82 bit IA64). */ - DW_ATE_HP_imaginary_float80 = 0x85, - DW_ATE_HP_imaginary_float128 = 0x86 - }; - -#define DW_ATE_lo_user 0x80 -#define DW_ATE_hi_user 0xff - -/* Array ordering names and codes. */ -enum dwarf_array_dim_ordering - { - DW_ORD_row_major = 0, - DW_ORD_col_major = 1 - }; - -/* Access attribute. */ -enum dwarf_access_attribute - { - DW_ACCESS_public = 1, - DW_ACCESS_protected = 2, - DW_ACCESS_private = 3 - }; - -/* Visibility. */ -enum dwarf_visibility_attribute - { - DW_VIS_local = 1, - DW_VIS_exported = 2, - DW_VIS_qualified = 3 - }; - -/* Virtuality. */ -enum dwarf_virtuality_attribute - { - DW_VIRTUALITY_none = 0, - DW_VIRTUALITY_virtual = 1, - DW_VIRTUALITY_pure_virtual = 2 - }; - -/* Case sensitivity. */ -enum dwarf_id_case - { - DW_ID_case_sensitive = 0, - DW_ID_up_case = 1, - DW_ID_down_case = 2, - DW_ID_case_insensitive = 3 - }; - -/* Calling convention. */ -enum dwarf_calling_convention - { - DW_CC_normal = 0x1, - DW_CC_program = 0x2, - DW_CC_nocall = 0x3, - DW_CC_GNU_renesas_sh = 0x40 - }; - -#define DW_CC_lo_user 0x40 -#define DW_CC_hi_user 0xff - -/* Inline attribute. */ -enum dwarf_inline_attribute - { - DW_INL_not_inlined = 0, - DW_INL_inlined = 1, - DW_INL_declared_not_inlined = 2, - DW_INL_declared_inlined = 3 - }; - -/* Discriminant lists. */ -enum dwarf_discrim_list - { - DW_DSC_label = 0, - DW_DSC_range = 1 - }; - -/* Line number opcodes. */ -enum dwarf_line_number_ops - { - DW_LNS_extended_op = 0, - DW_LNS_copy = 1, - DW_LNS_advance_pc = 2, - DW_LNS_advance_line = 3, - DW_LNS_set_file = 4, - DW_LNS_set_column = 5, - DW_LNS_negate_stmt = 6, - DW_LNS_set_basic_block = 7, - DW_LNS_const_add_pc = 8, - DW_LNS_fixed_advance_pc = 9, - /* DWARF 3. */ - DW_LNS_set_prologue_end = 10, - DW_LNS_set_epilogue_begin = 11, - DW_LNS_set_isa = 12 - }; - -/* Line number extended opcodes. */ -enum dwarf_line_number_x_ops - { - DW_LNE_end_sequence = 1, - DW_LNE_set_address = 2, - DW_LNE_define_file = 3, - /* HP extensions. */ - DW_LNE_HP_negate_is_UV_update = 0x11, - DW_LNE_HP_push_context = 0x12, - DW_LNE_HP_pop_context = 0x13, - DW_LNE_HP_set_file_line_column = 0x14, - DW_LNE_HP_set_routine_name = 0x15, - DW_LNE_HP_set_sequence = 0x16, - DW_LNE_HP_negate_post_semantics = 0x17, - DW_LNE_HP_negate_function_exit = 0x18, - DW_LNE_HP_negate_front_end_logical = 0x19, - DW_LNE_HP_define_proc = 0x20 - }; - -/* Call frame information. */ -enum dwarf_call_frame_info - { - DW_CFA_advance_loc = 0x40, - DW_CFA_offset = 0x80, - DW_CFA_restore = 0xc0, - DW_CFA_nop = 0x00, - DW_CFA_set_loc = 0x01, - DW_CFA_advance_loc1 = 0x02, - DW_CFA_advance_loc2 = 0x03, - DW_CFA_advance_loc4 = 0x04, - DW_CFA_offset_extended = 0x05, - DW_CFA_restore_extended = 0x06, - DW_CFA_undefined = 0x07, - DW_CFA_same_value = 0x08, - DW_CFA_register = 0x09, - DW_CFA_remember_state = 0x0a, - DW_CFA_restore_state = 0x0b, - DW_CFA_def_cfa = 0x0c, - DW_CFA_def_cfa_register = 0x0d, - DW_CFA_def_cfa_offset = 0x0e, - /* DWARF 3. */ - DW_CFA_def_cfa_expression = 0x0f, - DW_CFA_expression = 0x10, - DW_CFA_offset_extended_sf = 0x11, - DW_CFA_def_cfa_sf = 0x12, - DW_CFA_def_cfa_offset_sf = 0x13, - /* SGI/MIPS specific. */ - DW_CFA_MIPS_advance_loc8 = 0x1d, - /* GNU extensions. */ - DW_CFA_GNU_window_save = 0x2d, - DW_CFA_GNU_args_size = 0x2e, - DW_CFA_GNU_negative_offset_extended = 0x2f - }; - -#define DW_CIE_ID 0xffffffff -#define DW_CIE_VERSION 1 - -#define DW_CFA_extended 0 -#define DW_CFA_lo_user 0x1c -#define DW_CFA_hi_user 0x3f - -#define DW_CHILDREN_no 0x00 -#define DW_CHILDREN_yes 0x01 - -#define DW_ADDR_none 0 - -/* Source language names and codes. */ -enum dwarf_source_language - { - DW_LANG_C89 = 0x0001, - DW_LANG_C = 0x0002, - DW_LANG_Ada83 = 0x0003, - DW_LANG_C_plus_plus = 0x0004, - DW_LANG_Cobol74 = 0x0005, - DW_LANG_Cobol85 = 0x0006, - DW_LANG_Fortran77 = 0x0007, - DW_LANG_Fortran90 = 0x0008, - DW_LANG_Pascal83 = 0x0009, - DW_LANG_Modula2 = 0x000a, - DW_LANG_Java = 0x000b, - /* DWARF 3. */ - DW_LANG_C99 = 0x000c, - DW_LANG_Ada95 = 0x000d, - DW_LANG_Fortran95 = 0x000e, - /* MIPS. */ - DW_LANG_Mips_Assembler = 0x8001, - /* UPC. */ - DW_LANG_Upc = 0x8765 - }; - -#define DW_LANG_lo_user 0x8000 /* Implementation-defined range start. */ -#define DW_LANG_hi_user 0xffff /* Implementation-defined range start. */ - -/* Names and codes for macro information. */ -enum dwarf_macinfo_record_type - { - DW_MACINFO_define = 1, - DW_MACINFO_undef = 2, - DW_MACINFO_start_file = 3, - DW_MACINFO_end_file = 4, - DW_MACINFO_vendor_ext = 255 - }; - -/* @@@ For use with GNU frame unwind information. */ - -#define DW_EH_PE_absptr 0x00 -#define DW_EH_PE_omit 0xff - -#define DW_EH_PE_uleb128 0x01 -#define DW_EH_PE_udata2 0x02 -#define DW_EH_PE_udata4 0x03 -#define DW_EH_PE_udata8 0x04 -#define DW_EH_PE_sleb128 0x09 -#define DW_EH_PE_sdata2 0x0A -#define DW_EH_PE_sdata4 0x0B -#define DW_EH_PE_sdata8 0x0C -#define DW_EH_PE_signed 0x08 - -#define DW_EH_PE_pcrel 0x10 -#define DW_EH_PE_textrel 0x20 -#define DW_EH_PE_datarel 0x30 -#define DW_EH_PE_funcrel 0x40 -#define DW_EH_PE_aligned 0x50 - -#define DW_EH_PE_indirect 0x80 - -/** Private definitions ***/ - -typedef struct -{ - ULONG Length; - ULONG CiePointer; -} DW2CIEFDE; - -typedef struct -{ - ULONG Length; - char *Next; - ULONG CieId; - char Version; - ULONG ReturnAddressRegister; - ULONG AugStringLength; - char *AugString; - ULONG AugLength; - char *AugData; - ULONG CodeAlign; - LONG DataAlign; - char *Instructions; -} DW2CIE, *PDW2CIE; - -typedef struct -{ - unsigned long Length; - char *Next; - char *CiePointer; - unsigned long PcBegin; - unsigned long PcRange; - unsigned long AugLength; - char *AugData; - char *Instructions; -} DW2FDE, *PDW2FDE; - -typedef struct _SEHBLOCK -{ - unsigned long BeginTry; - unsigned long EndTry; - unsigned long Target; - unsigned long Handler; - unsigned long End; -} SEHBLOCK, *PSEHBLOCK; - -typedef struct _CFSTATE -{ - unsigned long Location; - unsigned long Code; - unsigned long Reg; - unsigned long Reg2; - long FramePtr; - long FramePtrDiff; - long Offset; - unsigned long IsUwop; - unsigned long Scope; - unsigned long cScopes; - unsigned long TryLevel; - SEHBLOCK SehBlock[20]; -} DW2CFSTATE, *PDW2CFSTATE; - -#define NextCIE(p) ((void*)((char*)p + p->Length + 4)) diff --git a/reactos/tools/rsym/raddr2line.c b/reactos/tools/rsym/raddr2line.c deleted file mode 100644 index 437d8d59ce7..00000000000 --- a/reactos/tools/rsym/raddr2line.c +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Usage: raddr2line input-file address/offset - * - * 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 "rsym.h" - -/* Assume if an offset > ABS_TRESHOLD, then it must be absolute */ -#define ABS_TRESHOLD 0x00400000L - -size_t fixup_offset ( size_t ImageBase, size_t offset ) -{ - if (offset > ABS_TRESHOLD) - offset -= ImageBase; - - return offset; -} - -long -my_atoi ( const char* a ) -{ - int i = 0; - const char* fmt = "%x"; - - if ( *a == '0' ) - { - switch ( *++a ) - { - case 'x': - fmt = "%x"; - ++a; - break; - case 'd': - fmt = "%d"; - ++a; - break; - default: - fmt = "%o"; - break; - } - } - sscanf ( a, fmt, &i ); - return i; -} - -PIMAGE_SECTION_HEADER -find_rossym_section ( PIMAGE_FILE_HEADER PEFileHeader, - PIMAGE_SECTION_HEADER PESectionHeaders ) -{ - size_t i; - for ( i = 0; i < PEFileHeader->NumberOfSections; i++ ) - { - if ( 0 == strcmp ( (char*)PESectionHeaders[i].Name, ".rossym" ) ) - return &PESectionHeaders[i]; - } - return NULL; -} - -int -find_and_print_offset ( - void* data, - size_t offset ) -{ - PSYMBOLFILE_HEADER RosSymHeader = (PSYMBOLFILE_HEADER)data; - PROSSYM_ENTRY Entries = (PROSSYM_ENTRY)((char*)data + RosSymHeader->SymbolsOffset); - char* Strings = (char*)data + RosSymHeader->StringsOffset; - size_t symbols = RosSymHeader->SymbolsLength / sizeof(ROSSYM_ENTRY); - size_t i; - - //if ( RosSymHeader->SymbolsOffset ) - - for ( i = 0; i < symbols; i++ ) - { - if ( Entries[i].Address > offset ) - { - if ( !i-- ) - return 1; - else - { - PROSSYM_ENTRY e = &Entries[i]; - printf ( "%s:%u (%s)\n", - &Strings[e->FileOffset], - (unsigned int)e->SourceLine, - &Strings[e->FunctionOffset] ); - return 0; - } - } - } - return 1; -} - -int -process_data ( const void* FileData, size_t offset ) -{ - PIMAGE_DOS_HEADER PEDosHeader; - PIMAGE_FILE_HEADER PEFileHeader; - PIMAGE_OPTIONAL_HEADER PEOptHeader; - PIMAGE_SECTION_HEADER PESectionHeaders; - PIMAGE_SECTION_HEADER PERosSymSectionHeader; - size_t ImageBase; - int res; - - /* Check if MZ header exists */ - PEDosHeader = (PIMAGE_DOS_HEADER)FileData; - if (PEDosHeader->e_magic != IMAGE_DOS_MAGIC || PEDosHeader->e_lfanew == 0L) - { - perror("Input file is not a PE image.\n"); - return 1; - } - - /* Locate PE file header */ - /* sizeof(ULONG) = sizeof(MAGIC) */ - PEFileHeader = (PIMAGE_FILE_HEADER)((char *)FileData + PEDosHeader->e_lfanew + sizeof(ULONG)); - - /* Locate optional header */ - PEOptHeader = (PIMAGE_OPTIONAL_HEADER)(PEFileHeader + 1); - ImageBase = PEOptHeader->ImageBase; - - /* Locate PE section headers */ - PESectionHeaders = (PIMAGE_SECTION_HEADER)((char *) PEOptHeader + PEFileHeader->SizeOfOptionalHeader); - - /* make sure offset is what we want */ - offset = fixup_offset ( ImageBase, offset ); - - /* find rossym section */ - PERosSymSectionHeader = find_rossym_section ( - PEFileHeader, PESectionHeaders ); - if ( !PERosSymSectionHeader ) - { - fprintf ( stderr, "Couldn't find rossym section in executable\n" ); - return 1; - } - res = find_and_print_offset ( (char*)FileData + PERosSymSectionHeader->PointerToRawData, - offset ); - if ( res ) - printf ( "??:0\n" ); - return res; -} - -int -process_file ( const char* file_name, size_t offset ) -{ - void* FileData; - size_t FileSize; - int res = 1; - - FileData = load_file ( file_name, &FileSize ); - if ( !FileData ) - { - fprintf ( stderr, "An error occured loading '%s'\n", file_name ); - } - else - { - res = process_data ( FileData, offset ); - free ( FileData ); - } - - return res; -} - -int main ( int argc, const char** argv ) -{ - char* path; - size_t offset; - int res; - - if ( argc != 3 ) - { - fprintf(stderr, "Usage: raddr2line \n"); - exit(1); - } - - path = convert_path ( argv[1] ); - offset = my_atoi ( argv[2] ); - - res = process_file ( path, offset ); - - free ( path ); - - return res; -} diff --git a/reactos/tools/rsym/raddr2line.mak b/reactos/tools/rsym/raddr2line.mak deleted file mode 100644 index df00e8d02d1..00000000000 --- a/reactos/tools/rsym/raddr2line.mak +++ /dev/null @@ -1,41 +0,0 @@ -RADDR2LINE_BASE = $(TOOLS_BASE)$(SEP)rsym -RADDR2LINE_BASE_ = $(RADDR2LINE_BASE)$(SEP) - -RADDR2LINE_INT = $(INTERMEDIATE_)$(RADDR2LINE_BASE) -RADDR2LINE_INT_ = $(RADDR2LINE_INT)$(SEP) -RADDR2LINE_OUT = $(OUTPUT_)$(RADDR2LINE_BASE) -RADDR2LINE_OUT_ = $(RADDR2LINE_OUT)$(SEP) - -RADDR2LINE_TARGET = \ - $(RADDR2LINE_OUT_)raddr2line$(EXEPOSTFIX) - -RADDR2LINE_SOURCES = \ - $(RADDR2LINE_BASE_)raddr2line.c \ - $(RADDR2LINE_BASE_)rsym_common.c - -RADDR2LINE_OBJECTS = \ - $(addprefix $(INTERMEDIATE_), $(RADDR2LINE_SOURCES:.c=.o)) - -RADDR2LINE_HOST_CFLAGS = $(TOOLS_CFLAGS) - -RADDR2LINE_HOST_LFLAGS = $(TOOLS_LFLAGS) - -.PHONY: raddr2line -raddr2line: $(RADDR2LINE_TARGET) - -$(RADDR2LINE_TARGET): $(RADDR2LINE_OBJECTS) | $(RADDR2LINE_OUT) - $(ECHO_HOSTLD) - ${host_gcc} $(RADDR2LINE_OBJECTS) $(RADDR2LINE_HOST_LFLAGS) -o $@ - -$(RADDR2LINE_INT_)raddr2line.o: $(RADDR2LINE_BASE_)raddr2line.c | $(RADDR2LINE_INT) - $(ECHO_HOSTCC) - ${host_gcc} $(RADDR2LINE_HOST_CFLAGS) -c $< -o $@ - -#$(RADDR2LINE_INT_)rsym_common.o: $(RADDR2LINE_BASE_)rsym_common.c | $(RADDR2LINE_INT) -# $(ECHO_HOSTCC) -# ${host_gcc} $(RADDR2LINE_HOST_CFLAGS) -c $< -o $@ - -.PHONY: raddr2line_clean -raddr2line_clean: - -@$(rm) $(RADDR2LINE_TARGET) $(RADDR2LINE_OBJECTS) 2>$(NUL) -clean: raddr2line_clean diff --git a/reactos/tools/rsym/rsym.c b/reactos/tools/rsym/rsym.c deleted file mode 100644 index 3894d406dea..00000000000 --- a/reactos/tools/rsym/rsym.c +++ /dev/null @@ -1,956 +0,0 @@ -/* - * 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" - -static int -CompareSymEntry(const PROSSYM_ENTRY SymEntry1, const PROSSYM_ENTRY SymEntry2) -{ - if (SymEntry1->Address < SymEntry2->Address) - { - return -1; - } - - if (SymEntry2->Address < SymEntry1->Address) - { - return +1; - } - - return 0; -} - -static int -GetStabInfo(void *FileData, PIMAGE_FILE_HEADER PEFileHeader, - PIMAGE_SECTION_HEADER PESectionHeaders, - ULONG *StabSymbolsLength, void **StabSymbolsBase, - ULONG *StabStringsLength, void **StabStringsBase) -{ - ULONG Idx; - - /* Load .stab and .stabstr sections if available */ - *StabSymbolsBase = NULL; - *StabSymbolsLength = 0; - *StabStringsBase = NULL; - *StabStringsLength = 0; - - for (Idx = 0; Idx < PEFileHeader->NumberOfSections; Idx++) - { - /* printf("section: '%.08s'\n", PESectionHeaders[Idx].Name); */ - if ((strncmp((char*)PESectionHeaders[Idx].Name, ".stab", 5) == 0) - && (PESectionHeaders[Idx].Name[5] == 0)) - { - /* printf(".stab section found. Size %d\n", - PESectionHeaders[Idx].SizeOfRawData); */ - - *StabSymbolsLength = PESectionHeaders[Idx].SizeOfRawData; - *StabSymbolsBase = (void *)((char *) FileData + PESectionHeaders[Idx].PointerToRawData); - } - - if (strncmp((char*)PESectionHeaders[Idx].Name, ".stabstr", 8) == 0) - { - /* printf(".stabstr section found. Size %d\n", - PESectionHeaders[Idx].SizeOfRawData); */ - - *StabStringsLength = PESectionHeaders[Idx].SizeOfRawData; - *StabStringsBase = (void *)((char *) FileData + PESectionHeaders[Idx].PointerToRawData); - } - } - - return 0; -} - -static int -GetCoffInfo(void *FileData, PIMAGE_FILE_HEADER PEFileHeader, - PIMAGE_SECTION_HEADER PESectionHeaders, - ULONG *CoffSymbolsLength, void **CoffSymbolsBase, - ULONG *CoffStringsLength, void **CoffStringsBase) -{ - - if (0 == PEFileHeader->PointerToSymbolTable || 0 == PEFileHeader->NumberOfSymbols) - { - /* No COFF symbol table */ - *CoffSymbolsLength = 0; - *CoffStringsLength = 0; - } - else - { - *CoffSymbolsLength = PEFileHeader->NumberOfSymbols * sizeof(COFF_SYMENT); - *CoffSymbolsBase = (void *)((char *) FileData + PEFileHeader->PointerToSymbolTable); - *CoffStringsLength = *((ULONG *) ((char *) *CoffSymbolsBase + *CoffSymbolsLength)); - *CoffStringsBase = (void *)((char *) *CoffSymbolsBase + *CoffSymbolsLength); - } - - return 0; -} - -static ULONG -FindOrAddString(char *StringToFind, ULONG *StringsLength, void *StringsBase) -{ - char *Search, *End; - - Search = (char *) StringsBase; - End = Search + *StringsLength; - - while (Search < End) - { - if (0 == strcmp(Search, StringToFind)) - { - return Search - (char *) StringsBase; - } - Search += strlen(Search) + 1; - } - - strcpy(Search, StringToFind); - *StringsLength += strlen(StringToFind) + 1; - - return Search - (char *) StringsBase; -} - -static int -ConvertStabs(ULONG *SymbolsCount, PROSSYM_ENTRY *SymbolsBase, - ULONG *StringsLength, void *StringsBase, - ULONG StabSymbolsLength, void *StabSymbolsBase, - ULONG StabStringsLength, void *StabStringsBase, - ULONG_PTR ImageBase, PIMAGE_FILE_HEADER PEFileHeader, - PIMAGE_SECTION_HEADER PESectionHeaders) -{ - PSTAB_ENTRY StabEntry; - ULONG Count, i; - ULONG_PTR Address, LastFunctionAddress; - int First = 1; - char *Name; - ULONG NameLen; - char FuncName[256]; - PROSSYM_ENTRY Current; - - StabEntry = StabSymbolsBase; - Count = StabSymbolsLength / sizeof(STAB_ENTRY); - *SymbolsCount = 0; - if (Count == 0) - { - /* No symbol info */ - *SymbolsBase = NULL; - return 0; - } - - *SymbolsBase = malloc(Count * sizeof(ROSSYM_ENTRY)); - if (NULL == *SymbolsBase) - { - fprintf(stderr, "Failed to allocate memory for converted .stab symbols\n"); - return 1; - } - Current = *SymbolsBase; - memset ( Current, 0, sizeof(*Current) ); - - LastFunctionAddress = 0; - for (i = 0; i < Count; i++) - { - if ( 0 == LastFunctionAddress ) - { - Address = StabEntry[i].n_value - ImageBase; - } - else - { - Address = LastFunctionAddress + StabEntry[i].n_value; - } - switch (StabEntry[i].n_type) - { - case N_SO: - case N_SOL: - case N_BINCL: - Name = (char *) StabStringsBase + StabEntry[i].n_strx; - if (StabStringsLength < StabEntry[i].n_strx - ||'\0' == *Name || '/' == Name[strlen(Name) - 1] - || '\\' == Name[strlen(Name) - 1] - || StabEntry[i].n_value < ImageBase) - { - continue; - } - if ( First || Address != Current->Address ) - { - if ( !First ) - { - memset ( ++Current, 0, sizeof(*Current) ); - Current->FunctionOffset = Current[-1].FunctionOffset; - } - else - First = 0; - Current->Address = Address; - } - Current->FileOffset = FindOrAddString((char *)StabStringsBase - + StabEntry[i].n_strx, - StringsLength, - StringsBase); - break; - case N_FUN: - if (0 == StabEntry[i].n_desc || StabEntry[i].n_value < ImageBase) - { - LastFunctionAddress = 0; /* line # 0 = end of function */ - continue; - } - if ( First || Address != Current->Address ) - { - if ( !First ) - memset ( ++Current, 0, sizeof(*Current) ); - else - First = 0; - Current->Address = Address; - Current->FileOffset = Current[-1].FileOffset; - } - Name = (char *) StabStringsBase + StabEntry[i].n_strx; - NameLen = strcspn(Name, ":"); - if (sizeof(FuncName) <= NameLen) - { - free(*SymbolsBase); - fprintf(stderr, "Function name too long\n"); - return 1; - } - memcpy(FuncName, Name, NameLen); - FuncName[NameLen] = '\0'; - Current->FunctionOffset = FindOrAddString(FuncName, - StringsLength, - StringsBase); - Current->SourceLine = 0; - LastFunctionAddress = Address; - break; - case N_SLINE: - if ( First || Address != Current->Address ) - { - if ( !First ) - { - memset ( ++Current, 0, sizeof(*Current) ); - Current->FileOffset = Current[-1].FileOffset; - Current->FunctionOffset = Current[-1].FunctionOffset; - } - else - First = 0; - Current->Address = Address; - } - Current->SourceLine = StabEntry[i].n_desc; - break; - default: - continue; - } - } - *SymbolsCount = (Current - *SymbolsBase + 1); - - qsort(*SymbolsBase, *SymbolsCount, sizeof(ROSSYM_ENTRY), (int (*)(const void *, const void *)) CompareSymEntry); - - return 0; -} - -static int -ConvertCoffs(ULONG *SymbolsCount, PROSSYM_ENTRY *SymbolsBase, - ULONG *StringsLength, void *StringsBase, - ULONG CoffSymbolsLength, void *CoffSymbolsBase, - ULONG CoffStringsLength, void *CoffStringsBase, - ULONG_PTR ImageBase, PIMAGE_FILE_HEADER PEFileHeader, - PIMAGE_SECTION_HEADER PESectionHeaders) -{ - ULONG Count, i; - PCOFF_SYMENT CoffEntry; - char FuncName[256]; - char *p; - PROSSYM_ENTRY Current; - - CoffEntry = (PCOFF_SYMENT) CoffSymbolsBase; - Count = CoffSymbolsLength / sizeof(COFF_SYMENT); - *SymbolsBase = malloc(Count * sizeof(ROSSYM_ENTRY)); - if (NULL == *SymbolsBase) - { - fprintf(stderr, "Unable to allocate memory for converted COFF symbols\n"); - return 1; - } - *SymbolsCount = 0; - Current = *SymbolsBase; - - for (i = 0; i < Count; i++) - { - if (ISFCN(CoffEntry[i].e_type) || C_EXT == CoffEntry[i].e_sclass) - { - Current->Address = CoffEntry[i].e_value; - if (0 < CoffEntry[i].e_scnum) - { - if (PEFileHeader->NumberOfSections < CoffEntry[i].e_scnum) - { - free(*SymbolsBase); - fprintf(stderr, "Invalid section number %d in COFF symbols (only %d sections present)\n", - CoffEntry[i].e_scnum, PEFileHeader->NumberOfSections); - return 1; - } - Current->Address += PESectionHeaders[CoffEntry[i].e_scnum - 1].VirtualAddress; - } - Current->FileOffset = 0; - if (0 == CoffEntry[i].e.e.e_zeroes) - { - if (sizeof(FuncName) <= strlen((char *) CoffStringsBase + CoffEntry[i].e.e.e_offset)) - { - free(*SymbolsBase); - fprintf(stderr, "Function name too long\n"); - return 1; - } - strcpy(FuncName, (char *) CoffStringsBase + CoffEntry[i].e.e.e_offset); - } - else - { - memcpy(FuncName, CoffEntry[i].e.e_name, E_SYMNMLEN); - FuncName[E_SYMNMLEN] = '\0'; - } - - /* Name demangling: stdcall */ - p = strrchr(FuncName, '@'); - if (NULL != p) - { - *p = '\0'; - } - p = ('_' == FuncName[0] || '@' == FuncName[0] ? FuncName + 1 : FuncName); - Current->FunctionOffset = FindOrAddString(p, - StringsLength, - StringsBase); - Current->SourceLine = 0; - memset ( ++Current, 0, sizeof(*Current) ); - } - i += CoffEntry[i].e_numaux; - } - - *SymbolsCount = (Current - *SymbolsBase + 1); - qsort(*SymbolsBase, *SymbolsCount, sizeof(ROSSYM_ENTRY), (int (*)(const void *, const void *)) CompareSymEntry); - - return 0; -} - -static int -MergeStabsAndCoffs(ULONG *MergedSymbolCount, PROSSYM_ENTRY *MergedSymbols, - ULONG StabSymbolsCount, PROSSYM_ENTRY StabSymbols, - ULONG CoffSymbolsCount, PROSSYM_ENTRY CoffSymbols) -{ - ULONG StabIndex, j; - ULONG CoffIndex; - ULONG_PTR StabFunctionStartAddress; - ULONG StabFunctionStringOffset, NewStabFunctionStringOffset; - - *MergedSymbolCount = 0; - if (StabSymbolsCount == 0) - { - *MergedSymbols = NULL; - return 0; - } - *MergedSymbols = malloc(StabSymbolsCount * sizeof(ROSSYM_ENTRY)); - if (NULL == *MergedSymbols) - { - fprintf(stderr, "Unable to allocate memory for merged symbols\n"); - return 1; - } - - StabFunctionStartAddress = 0; - StabFunctionStringOffset = 0; - CoffIndex = 0; - for (StabIndex = 0; StabIndex < StabSymbolsCount; StabIndex++) - { - (*MergedSymbols)[*MergedSymbolCount] = StabSymbols[StabIndex]; - for (j = StabIndex + 1; - j < StabSymbolsCount && StabSymbols[j].Address == StabSymbols[StabIndex].Address; - j++) - { - if (0 != StabSymbols[j].FileOffset && 0 == (*MergedSymbols)[*MergedSymbolCount].FileOffset) - { - (*MergedSymbols)[*MergedSymbolCount].FileOffset = StabSymbols[j].FileOffset; - } - if (0 != StabSymbols[j].FunctionOffset && 0 == (*MergedSymbols)[*MergedSymbolCount].FunctionOffset) - { - (*MergedSymbols)[*MergedSymbolCount].FunctionOffset = StabSymbols[j].FunctionOffset; - } - if (0 != StabSymbols[j].SourceLine && 0 == (*MergedSymbols)[*MergedSymbolCount].SourceLine) - { - (*MergedSymbols)[*MergedSymbolCount].SourceLine = StabSymbols[j].SourceLine; - } - } - StabIndex = j - 1; - while (CoffIndex < CoffSymbolsCount - && CoffSymbols[CoffIndex + 1].Address <= (*MergedSymbols)[*MergedSymbolCount].Address) - { - CoffIndex++; - } - NewStabFunctionStringOffset = (*MergedSymbols)[*MergedSymbolCount].FunctionOffset; - if (CoffSymbolsCount > 0 && - CoffSymbols[CoffIndex].Address < (*MergedSymbols)[*MergedSymbolCount].Address - && StabFunctionStartAddress < CoffSymbols[CoffIndex].Address - && 0 != CoffSymbols[CoffIndex].FunctionOffset) - { - (*MergedSymbols)[*MergedSymbolCount].FunctionOffset = CoffSymbols[CoffIndex].FunctionOffset; - } - if (StabFunctionStringOffset != NewStabFunctionStringOffset) - { - StabFunctionStartAddress = (*MergedSymbols)[*MergedSymbolCount].Address; - } - StabFunctionStringOffset = NewStabFunctionStringOffset; - (*MergedSymbolCount)++; - } - - return 0; -} - -static PIMAGE_SECTION_HEADER -FindSectionForRVA(DWORD RVA, unsigned NumberOfSections, PIMAGE_SECTION_HEADER SectionHeaders) -{ - unsigned Section; - - for (Section = 0; Section < NumberOfSections; Section++) - { - if (SectionHeaders[Section].VirtualAddress <= RVA && - RVA < SectionHeaders[Section].VirtualAddress + SectionHeaders[Section].Misc.VirtualSize) - { - return SectionHeaders + Section; - } - } - - return NULL; -} - -static int -ProcessRelocations(ULONG *ProcessedRelocsLength, void **ProcessedRelocs, - void *RawData, PIMAGE_OPTIONAL_HEADER OptHeader, - unsigned NumberOfSections, PIMAGE_SECTION_HEADER SectionHeaders) -{ - PIMAGE_SECTION_HEADER RelocSectionHeader, TargetSectionHeader; - PIMAGE_BASE_RELOCATION BaseReloc, End, AcceptedRelocs; - int Found; - - if (OptHeader->NumberOfRvaAndSizes < IMAGE_DIRECTORY_ENTRY_BASERELOC - || 0 == OptHeader->DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress) - { - /* No relocation entries */ - *ProcessedRelocsLength = 0; - *ProcessedRelocs = NULL; - return 0; - } - - RelocSectionHeader = FindSectionForRVA(OptHeader->DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress, - NumberOfSections, SectionHeaders); - if (NULL == RelocSectionHeader) - { - fprintf(stderr, "Can't find section header for relocation data\n"); - return 1; - } - - *ProcessedRelocs = malloc(RelocSectionHeader->SizeOfRawData); - if (NULL == *ProcessedRelocs) - { - fprintf(stderr, "Failed to allocate %u bytes for relocations\n", (unsigned int)RelocSectionHeader->SizeOfRawData); - return 1; - } - *ProcessedRelocsLength = 0; - - BaseReloc = (PIMAGE_BASE_RELOCATION) ((char *) RawData - + RelocSectionHeader->PointerToRawData - + (OptHeader->DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress - - RelocSectionHeader->VirtualAddress)); - End = (PIMAGE_BASE_RELOCATION) ((char *) BaseReloc - + OptHeader->DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].Size); - - while (BaseReloc < End && 0 < BaseReloc->SizeOfBlock) - { - TargetSectionHeader = FindSectionForRVA(BaseReloc->VirtualAddress, NumberOfSections, - SectionHeaders); - if (NULL != TargetSectionHeader) - { - AcceptedRelocs = *ProcessedRelocs; - Found = 0; - while (AcceptedRelocs < (PIMAGE_BASE_RELOCATION) ((char *) *ProcessedRelocs + - *ProcessedRelocsLength) - && ! Found) - { - Found = BaseReloc->SizeOfBlock == AcceptedRelocs->SizeOfBlock - && 0 == memcmp(BaseReloc, AcceptedRelocs, AcceptedRelocs->SizeOfBlock); - AcceptedRelocs= (PIMAGE_BASE_RELOCATION) ((char *) AcceptedRelocs + - AcceptedRelocs->SizeOfBlock); - } - if (! Found) - { - memcpy((char *) *ProcessedRelocs + *ProcessedRelocsLength, - BaseReloc, BaseReloc->SizeOfBlock); - *ProcessedRelocsLength += BaseReloc->SizeOfBlock; - } - } - BaseReloc = (PIMAGE_BASE_RELOCATION)((char *) BaseReloc + BaseReloc->SizeOfBlock); - } - - return 0; -} - -static int -CreateOutputFile(FILE *OutFile, void *InData, - PIMAGE_DOS_HEADER InDosHeader, PIMAGE_FILE_HEADER InFileHeader, - PIMAGE_OPTIONAL_HEADER InOptHeader, PIMAGE_SECTION_HEADER InSectionHeaders, - ULONG RosSymLength, void *RosSymSection) -{ - ULONG StartOfRawData; - unsigned Section; - void *OutHeader, *ProcessedRelocs, *PaddedRosSym, *Data; - PIMAGE_DOS_HEADER OutDosHeader; - PIMAGE_FILE_HEADER OutFileHeader; - PIMAGE_OPTIONAL_HEADER OutOptHeader; - PIMAGE_SECTION_HEADER OutSectionHeaders, CurrentSectionHeader; - DWORD CheckSum; - ULONG Length, i; - ULONG ProcessedRelocsLength; - ULONG RosSymOffset, RosSymFileLength; - int InRelocSectionIndex; - PIMAGE_SECTION_HEADER OutRelocSection; - - StartOfRawData = 0; - for (Section = 0; Section < InFileHeader->NumberOfSections; Section++) - { - if ((0 == StartOfRawData - || InSectionHeaders[Section].PointerToRawData < StartOfRawData) - && 0 != InSectionHeaders[Section].PointerToRawData - && 0 != (strncmp(InSectionHeaders[Section].Name, ".stab", 5))) - { - StartOfRawData = InSectionHeaders[Section].PointerToRawData; - } - } - OutHeader = malloc(StartOfRawData); - if (NULL == OutHeader) - { - fprintf(stderr, "Failed to allocate %u bytes for output file header\n", (unsigned int)StartOfRawData); - return 1; - } - memset(OutHeader, '\0', StartOfRawData); - - OutDosHeader = (PIMAGE_DOS_HEADER) OutHeader; - memcpy(OutDosHeader, InDosHeader, InDosHeader->e_lfanew + sizeof(ULONG)); - - OutFileHeader = (PIMAGE_FILE_HEADER)((char *) OutHeader + OutDosHeader->e_lfanew + sizeof(ULONG)); - memcpy(OutFileHeader, InFileHeader, sizeof(IMAGE_FILE_HEADER)); - OutFileHeader->PointerToSymbolTable = 0; - OutFileHeader->NumberOfSymbols = 0; - OutFileHeader->Characteristics &= ~(IMAGE_FILE_LINE_NUMS_STRIPPED | IMAGE_FILE_LOCAL_SYMS_STRIPPED | - IMAGE_FILE_DEBUG_STRIPPED); - - OutOptHeader = (PIMAGE_OPTIONAL_HEADER)(OutFileHeader + 1); - memcpy(OutOptHeader, InOptHeader, sizeof(IMAGE_OPTIONAL_HEADER)); - OutOptHeader->CheckSum = 0; - - OutSectionHeaders = (PIMAGE_SECTION_HEADER)((char *) OutOptHeader + OutFileHeader->SizeOfOptionalHeader); - - if (ProcessRelocations(&ProcessedRelocsLength, &ProcessedRelocs, InData, InOptHeader, - InFileHeader->NumberOfSections, InSectionHeaders)) - { - return 1; - } - if (InOptHeader->NumberOfRvaAndSizes < IMAGE_DIRECTORY_ENTRY_BASERELOC - || 0 == InOptHeader->DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress) - { - InRelocSectionIndex = -1; - } - else - { - InRelocSectionIndex = FindSectionForRVA(InOptHeader->DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress, - InFileHeader->NumberOfSections, InSectionHeaders) - InSectionHeaders; - } - - OutFileHeader->NumberOfSections = 0; - CurrentSectionHeader = OutSectionHeaders; - OutOptHeader->SizeOfImage = 0; - RosSymOffset = 0; - OutRelocSection = NULL; - for (Section = 0; Section < InFileHeader->NumberOfSections; Section++) - { - if (0 != (strncmp(InSectionHeaders[Section].Name, ".stab", 5))) - { - *CurrentSectionHeader = InSectionHeaders[Section]; - CurrentSectionHeader->PointerToLinenumbers = 0; - CurrentSectionHeader->NumberOfLinenumbers = 0; - if (OutOptHeader->SizeOfImage < CurrentSectionHeader->VirtualAddress + - CurrentSectionHeader->Misc.VirtualSize) - { - OutOptHeader->SizeOfImage = ROUND_UP(CurrentSectionHeader->VirtualAddress + - CurrentSectionHeader->Misc.VirtualSize, - OutOptHeader->SectionAlignment); - } - if (RosSymOffset < CurrentSectionHeader->PointerToRawData + CurrentSectionHeader->SizeOfRawData) - { - RosSymOffset = CurrentSectionHeader->PointerToRawData + CurrentSectionHeader->SizeOfRawData; - } - if (Section == (ULONG)InRelocSectionIndex) - { - OutRelocSection = CurrentSectionHeader; - } - (OutFileHeader->NumberOfSections) ++; - CurrentSectionHeader++; - } - } - - if (OutRelocSection == CurrentSectionHeader - 1) - { - OutOptHeader->DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].Size = ProcessedRelocsLength; - if (OutOptHeader->SizeOfImage == OutRelocSection->VirtualAddress + - ROUND_UP(OutRelocSection->Misc.VirtualSize, - OutOptHeader->SectionAlignment)) - { - OutOptHeader->SizeOfImage = OutRelocSection->VirtualAddress + - ROUND_UP(ProcessedRelocsLength, - OutOptHeader->SectionAlignment); - } - OutRelocSection->Misc.VirtualSize = ProcessedRelocsLength; - if (RosSymOffset == OutRelocSection->PointerToRawData - + OutRelocSection->SizeOfRawData) - { - RosSymOffset = OutRelocSection->PointerToRawData + - ROUND_UP(ProcessedRelocsLength, OutOptHeader->FileAlignment); - } - OutRelocSection->SizeOfRawData = ROUND_UP(ProcessedRelocsLength, - OutOptHeader->FileAlignment); - } - - if (RosSymLength > 0) - { - RosSymFileLength = ROUND_UP(RosSymLength, OutOptHeader->FileAlignment); - memcpy(CurrentSectionHeader->Name, ".rossym", 8); /* We're lucky: string is exactly 8 bytes long */ - CurrentSectionHeader->Misc.VirtualSize = RosSymLength; - CurrentSectionHeader->VirtualAddress = OutOptHeader->SizeOfImage; - CurrentSectionHeader->SizeOfRawData = RosSymFileLength; - CurrentSectionHeader->PointerToRawData = RosSymOffset; - CurrentSectionHeader->PointerToRelocations = 0; - CurrentSectionHeader->PointerToLinenumbers = 0; - CurrentSectionHeader->NumberOfRelocations = 0; - CurrentSectionHeader->NumberOfLinenumbers = 0; - CurrentSectionHeader->Characteristics = IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_DISCARDABLE - | IMAGE_SCN_LNK_REMOVE | IMAGE_SCN_TYPE_NOLOAD; - OutOptHeader->SizeOfImage = ROUND_UP(CurrentSectionHeader->VirtualAddress + - CurrentSectionHeader->Misc.VirtualSize, - OutOptHeader->SectionAlignment); - (OutFileHeader->NumberOfSections)++; - - PaddedRosSym = malloc(RosSymFileLength); - if (NULL == PaddedRosSym) - { - fprintf(stderr, "Failed to allocate %u bytes for padded .rossym\n", (unsigned int)RosSymFileLength); - return 1; - } - memcpy(PaddedRosSym, RosSymSection, RosSymLength); - memset((char *) PaddedRosSym + RosSymLength, '\0', RosSymFileLength - RosSymLength); - } - else - { - PaddedRosSym = NULL; - } - CheckSum = 0; - for (i = 0; i < StartOfRawData / 2; i++) - { - CheckSum += ((unsigned short*) OutHeader)[i]; - CheckSum = 0xffff & (CheckSum + (CheckSum >> 16)); - } - Length = StartOfRawData; - for (Section = 0; Section < OutFileHeader->NumberOfSections; Section++) - { - DWORD SizeOfRawData; - if (OutRelocSection == OutSectionHeaders + Section) - { - Data = (void *) ProcessedRelocs; - SizeOfRawData = ProcessedRelocsLength; - } - else if (RosSymLength > 0 && Section + 1 == OutFileHeader->NumberOfSections) - { - Data = (void *) PaddedRosSym; - SizeOfRawData = OutSectionHeaders[Section].SizeOfRawData; - } - else - { - Data = (void *) ((char *) InData + OutSectionHeaders[Section].PointerToRawData); - SizeOfRawData = OutSectionHeaders[Section].SizeOfRawData; - } - for (i = 0; i < SizeOfRawData / 2; i++) - { - CheckSum += ((unsigned short*) Data)[i]; - CheckSum = 0xffff & (CheckSum + (CheckSum >> 16)); - } - Length += OutSectionHeaders[Section].SizeOfRawData; - } - CheckSum += Length; - OutOptHeader->CheckSum = CheckSum; - - if (fwrite(OutHeader, 1, StartOfRawData, OutFile) != StartOfRawData) - { - perror("Error writing output header\n"); - free(OutHeader); - return 1; - } - - for (Section = 0; Section < OutFileHeader->NumberOfSections; Section++) - { - if (0 != OutSectionHeaders[Section].SizeOfRawData) - { - DWORD SizeOfRawData; - fseek(OutFile, OutSectionHeaders[Section].PointerToRawData, SEEK_SET); - if (OutRelocSection == OutSectionHeaders + Section) - { - Data = (void *) ProcessedRelocs; - SizeOfRawData = ProcessedRelocsLength; - } - else if (RosSymLength > 0 && Section + 1 == OutFileHeader->NumberOfSections) - { - Data = (void *) PaddedRosSym; - SizeOfRawData = OutSectionHeaders[Section].SizeOfRawData; - } - else - { - Data = (void *) ((char *) InData + OutSectionHeaders[Section].PointerToRawData); - SizeOfRawData = OutSectionHeaders[Section].SizeOfRawData; - } - if (fwrite(Data, 1, SizeOfRawData, OutFile) != SizeOfRawData) - { - perror("Error writing section data\n"); - free(PaddedRosSym); - free(OutHeader); - return 1; - } - } - } - - if (PaddedRosSym) - { - free(PaddedRosSym); - } - free(OutHeader); - - return 0; -} - -int main(int argc, char* argv[]) -{ - PSYMBOLFILE_HEADER SymbolFileHeader; - PIMAGE_DOS_HEADER PEDosHeader; - PIMAGE_FILE_HEADER PEFileHeader; - PIMAGE_OPTIONAL_HEADER PEOptHeader; - PIMAGE_SECTION_HEADER PESectionHeaders; - ULONG ImageBase; - void *StabBase; - ULONG StabsLength; - void *StabStringBase; - ULONG StabStringsLength; - void *CoffBase = NULL; - ULONG CoffsLength; - void *CoffStringBase = NULL; - ULONG CoffStringsLength; - char* path1; - char* path2; - FILE* out; - void *StringBase; - ULONG StringsLength; - ULONG StabSymbolsCount; - PROSSYM_ENTRY StabSymbols; - ULONG CoffSymbolsCount; - PROSSYM_ENTRY CoffSymbols; - ULONG MergedSymbolsCount; - PROSSYM_ENTRY MergedSymbols; - size_t FileSize; - void *FileData; - ULONG RosSymLength; - void *RosSymSection; - char elfhdr[4] = { '\177', '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); - ImageBase = PEOptHeader->ImageBase; - - /* Locate PE section headers */ - PESectionHeaders = (PIMAGE_SECTION_HEADER)((char *) PEOptHeader + PEFileHeader->SizeOfOptionalHeader); - - if (GetStabInfo(FileData, PEFileHeader, PESectionHeaders, &StabsLength, &StabBase, - &StabStringsLength, &StabStringBase)) - { - free(FileData); - exit(1); - } - - if (GetCoffInfo(FileData, PEFileHeader, PESectionHeaders, &CoffsLength, &CoffBase, - &CoffStringsLength, &CoffStringBase)) - { - free(FileData); - exit(1); - } - - StringBase = malloc(1 + StabStringsLength + CoffStringsLength + - (CoffsLength / sizeof(ROSSYM_ENTRY)) * (E_SYMNMLEN + 1)); - if (NULL == StringBase) - { - free(FileData); - fprintf(stderr, "Failed to allocate memory for strings table\n"); - exit(1); - } - /* Make offset 0 into an empty string */ - *((char *) StringBase) = '\0'; - StringsLength = 1; - - if (ConvertStabs(&StabSymbolsCount, &StabSymbols, &StringsLength, StringBase, - StabsLength, StabBase, StabStringsLength, StabStringBase, - ImageBase, PEFileHeader, PESectionHeaders)) - { - free(StringBase); - free(FileData); - fprintf(stderr, "Failed to allocate memory for strings table\n"); - exit(1); - } - - if (ConvertCoffs(&CoffSymbolsCount, &CoffSymbols, &StringsLength, StringBase, - CoffsLength, CoffBase, CoffStringsLength, CoffStringBase, - ImageBase, PEFileHeader, PESectionHeaders)) - { - if (StabSymbols) - { - free(StabSymbols); - } - free(StringBase); - free(FileData); - exit(1); - } - - if (MergeStabsAndCoffs(&MergedSymbolsCount, &MergedSymbols, - StabSymbolsCount, StabSymbols, - CoffSymbolsCount, CoffSymbols)) - { - if (CoffSymbols) - { - free(CoffSymbols); - } - if (StabSymbols) - { - free(StabSymbols); - } - free(StringBase); - free(FileData); - exit(1); - } - - if (CoffSymbols) - { - free(CoffSymbols); - } - if (StabSymbols) - { - free(StabSymbols); - } - if (MergedSymbolsCount == 0) - { - RosSymLength = 0; - RosSymSection = NULL; - } - else - { - RosSymLength = sizeof(SYMBOLFILE_HEADER) + MergedSymbolsCount * sizeof(ROSSYM_ENTRY) - + StringsLength; - RosSymSection = malloc(RosSymLength); - if (NULL == RosSymSection) - { - free(MergedSymbols); - free(StringBase); - free(FileData); - fprintf(stderr, "Unable to allocate memory for .rossym section\n"); - exit(1); - } - memset(RosSymSection, '\0', RosSymLength); - - SymbolFileHeader = (PSYMBOLFILE_HEADER) RosSymSection; - SymbolFileHeader->SymbolsOffset = sizeof(SYMBOLFILE_HEADER); - SymbolFileHeader->SymbolsLength = MergedSymbolsCount * sizeof(ROSSYM_ENTRY); - SymbolFileHeader->StringsOffset = SymbolFileHeader->SymbolsOffset + SymbolFileHeader->SymbolsLength; - SymbolFileHeader->StringsLength = StringsLength; - - memcpy((char *) RosSymSection + SymbolFileHeader->SymbolsOffset, MergedSymbols, - SymbolFileHeader->SymbolsLength); - memcpy((char *) RosSymSection + SymbolFileHeader->StringsOffset, StringBase, - SymbolFileHeader->StringsLength); - - free(MergedSymbols); - } - free(StringBase); - out = fopen(path2, "wb"); - if (out == NULL) - { - perror("Cannot open output file"); - free(RosSymSection); - free(FileData); - exit(1); - } - - if (CreateOutputFile(out, FileData, PEDosHeader, PEFileHeader, PEOptHeader, - PESectionHeaders, RosSymLength, RosSymSection)) - { - fclose(out); - if (RosSymSection) - { - free(RosSymSection); - } - free(FileData); - exit(1); - } - - fclose(out); - if (RosSymSection) - { - free(RosSymSection); - } - free(FileData); - - return 0; -} - -/* EOF */ diff --git a/reactos/tools/rsym/rsym.cmake.c b/reactos/tools/rsym/rsym.cmake.c deleted file mode 100644 index a5160fac42e..00000000000 --- a/reactos/tools/rsym/rsym.cmake.c +++ /dev/null @@ -1,116 +0,0 @@ -/* - * 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/reactos/tools/rsym/rsym.h b/reactos/tools/rsym/rsym.h deleted file mode 100644 index 6b91d6e6fed..00000000000 --- a/reactos/tools/rsym/rsym.h +++ /dev/null @@ -1,172 +0,0 @@ -/* 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/reactos/tools/rsym/rsym.mak b/reactos/tools/rsym/rsym.mak deleted file mode 100644 index 0adacedcae2..00000000000 --- a/reactos/tools/rsym/rsym.mak +++ /dev/null @@ -1,64 +0,0 @@ -RSYM_BASE = $(TOOLS_BASE)$(SEP)rsym -RSYM_BASE_ = $(RSYM_BASE)$(SEP) -RSYM_INT = $(INTERMEDIATE_)$(RSYM_BASE) -RSYM_INT_ = $(RSYM_INT)$(SEP) -RSYM_OUT = $(OUTPUT_)$(RSYM_BASE) -RSYM_OUT_ = $(RSYM_OUT)$(SEP) - -$(RSYM_INT): | $(TOOLS_INT) - $(ECHO_MKDIR) - ${mkdir} $@ - -ifneq ($(INTERMEDIATE),$(OUTPUT)) -$(RSYM_OUT): | $(TOOLS_OUT) - $(ECHO_MKDIR) - ${mkdir} $@ -endif - -RSYM_TARGET = \ - $(RSYM_OUT_)rsym$(EXEPOSTFIX) - -ifeq ($(ARCH),amd64) -RSYM_SOURCES = \ - $(RSYM_BASE_)rsym64.c \ - $(RSYM_BASE_)rsym_common.c -else -RSYM_SOURCES = \ - $(RSYM_BASE_)rsym.c \ - $(RSYM_BASE_)rsym_common.c -endif - -RSYM_OBJECTS = \ - $(addprefix $(INTERMEDIATE_), $(RSYM_SOURCES:.c=.o)) - -ifeq ($(ARCH),amd64) -RSYM_HOST_CFLAGS = $(TOOLS_CFLAGS) -D_TARGET_PE64 -else -RSYM_HOST_CFLAGS = $(TOOLS_CFLAGS) -endif - -RSYM_HOST_LFLAGS = $(TOOLS_LFLAGS) - -.PHONY: rsym -rsym: $(RSYM_TARGET) - -$(RSYM_TARGET): $(RSYM_OBJECTS) | $(RSYM_OUT) - $(ECHO_LD) - ${host_gcc} $(RSYM_OBJECTS) $(RSYM_HOST_LFLAGS) -o $@ - -$(RSYM_INT_)rsym.o: $(RSYM_BASE_)rsym.c | $(RSYM_INT) - $(ECHO_CC) - ${host_gcc} $(RSYM_HOST_CFLAGS) -c $< -o $@ - -$(RSYM_INT_)rsym64.o: $(RSYM_BASE_)rsym64.c | $(RSYM_INT) - $(ECHO_CC) - ${host_gcc} $(RSYM_HOST_CFLAGS) -c $< -o $@ - -$(RSYM_INT_)rsym_common.o: $(RSYM_BASE_)rsym_common.c | $(RSYM_INT) - $(ECHO_CC) - ${host_gcc} $(RSYM_HOST_CFLAGS) -c $< -o $@ - -.PHONY: rsym_clean -rsym_clean: - -@$(rm) $(RSYM_TARGET) $(RSYM_OBJECTS) 2>$(NUL) -clean: rsym_clean diff --git a/reactos/tools/rsym/rsym64.c b/reactos/tools/rsym/rsym64.c deleted file mode 100644 index aba6e2b6197..00000000000 --- a/reactos/tools/rsym/rsym64.c +++ /dev/null @@ -1,910 +0,0 @@ -#include -#include -#include - -#include "rsym.h" -#include "rsym64.h" -#include "dwarf2.h" - -char DoPrint = 0; -ULONG g_ehframep; - -#define DPRINT if(DoPrint) printf - -struct {char *name; char regnt;} regs[] = -{ {"rax", REG_RAX}, {"rdx", REG_RDX}, {"rcx", REG_RCX}, {"rbx", REG_RBX}, - {"rsi", REG_RSI}, {"rdi", REG_RDI}, {"rbp", REG_RBP}, {"rsp", REG_RSP}, - {"r8", REG_R8}, {"r9", REG_R9}, {"r10", REG_R10}, {"r11", REG_R11}, - {"r12", REG_R12}, {"r13", REG_R13}, {"r14", REG_R14}, {"r15", REG_R15}, - {"xmm0", REG_XMM0}, {"xmm1", REG_XMM1}, {"xmm2", REG_XMM2}, {"xmm3", REG_XMM3}, - {"xmm4", REG_XMM4}, {"xmm5", REG_XMM5}, {"xmm6", REG_XMM6}, {"xmm7", REG_XMM7}, - {"xmm8", REG_XMM8}, {"xmm9", REG_XMM9}, {"xmm10",REG_XMM10},{"xmm11",REG_XMM11}, - {"xmm12",REG_XMM12},{"xmm13",REG_XMM13},{"xmm14",REG_XMM14},{"xmm15",REG_XMM15}, -// "st0", "st1", "st2", "st3", -// "st4", "st5", "st6", "st7", -// "mm0", "mm1", "mm2", "mm3", -// "mm4", "mm5", "mm6", "mm7" -}; - -/** Functions for DWARF2 ******************************************************/ - -unsigned long -DwDecodeUleb128(unsigned long *pResult, char *pc) -{ - unsigned long ulResult = 0; - unsigned long ulShift = 0; - unsigned char current; - unsigned long ulSize = 0; - - do - { - current = pc[ulSize]; - ulSize++; - ulResult |= (current & 0x7f) << ulShift; - ulShift += 7; - } - while (current & 0x80); - - *pResult = ulResult; - return ulSize; -} - -unsigned long -DwDecodeSleb128(long *pResult, char *pc) -{ - long lResult = 0; - unsigned long ulShift = 0; - unsigned char current; - unsigned long ulSize = 0; - - do - { - current = pc[ulSize]; - ulSize++; - lResult |= (current & 0x7f) << ulShift; - ulShift += 7; - } - while (current & 0x80); - - if (current & 0x40) - lResult |= - (1 << (ulShift)); - - *pResult = lResult; - - return ulSize; -} - -unsigned long -DwDecodeCie(PDW2CIE Cie, char *pc) -{ - Cie->Length = *(ULONG*)pc; - Cie->Next = pc + 4 + Cie->Length; - Cie->CieId = *(ULONG*)(pc + 4); - Cie->Version = pc[8]; - Cie->AugString = pc + 9; - Cie->AugStringLength = strlen(Cie->AugString); - pc = Cie->AugString + Cie->AugStringLength + 1; - pc += DwDecodeUleb128(&Cie->CodeAlign, pc); - pc += DwDecodeSleb128(&Cie->DataAlign, pc); - pc += DwDecodeUleb128(&Cie->ReturnAddressRegister, pc); - pc += DwDecodeUleb128(&Cie->AugLength, pc); - Cie->AugData = pc; - pc += Cie->AugLength; - Cie->Instructions = pc; - - return Cie->Length + 4; -} - -unsigned long -DwDecodeFde(PDW2FDE Fde, char *pc) -{ - Fde->Length = *(ULONG*)pc; - Fde->Next = pc + 4 + Fde->Length; - Fde->CiePointer = pc + 4 - *(ULONG*)(pc + 4); - Fde->PcBegin = *(ULONG*)(pc + 8); - Fde->PcRange = *(ULONG*)(pc + 12); - pc += 16; - pc += DwDecodeUleb128(&Fde->AugLength, pc); - Fde->AugData = pc; - Fde->Instructions = Fde->AugData + Fde->AugLength; - - return Fde->Length + 4; -} - -unsigned long -DwExecIntruction(PDW2CFSTATE State, char *pc) -{ - unsigned char Code; - unsigned long Length; - unsigned long PrevFramePtr = State->FramePtr; - - State->Scope = 0; - State->IsUwop = 0; - State->Code = Code = *pc; - Length = 1; - if ((Code & 0xc0) == DW_CFA_advance_loc) - { - State->Code = DW_CFA_advance_loc; - State->Location += Code & 0x3f; - } - else if ((Code & 0xc0) == DW_CFA_offset) - { - State->Code = DW_CFA_offset; - State->Reg = Code & 0x3f; - Length += DwDecodeUleb128((unsigned long*)&State->Offset, pc + 1); - State->Offset *= 8; // fixme data alignment - State->IsUwop = 1; - } - else if ((Code & 0xc0) == DW_CFA_restore) - { - State->Code = DW_CFA_restore; - State->Reg = Code & 0x3f; - } - else switch (Code) - { - case DW_CFA_nop: - break; - case DW_CFA_set_loc: - Length = 9; // address - State->Location = *(DWORD*)(pc + 1); - break; - case DW_CFA_advance_loc1: - Length = 2; - State->Location += pc[1]; - break; - case DW_CFA_advance_loc2: - Length = 3; -// printf("Found a DW_CFA_advance_loc2 : 0x%lx ->", *(WORD*)(pc + 1)); - State->Location += *(WORD*)(pc + 1); -// printf(" 0x%lx\n", State->Location); - break; - case DW_CFA_advance_loc4: - Length = 5; -// printf("Found a DW_CFA_advance_loc4 : 0x%lx ->", *(DWORD*)(pc + 1)); - State->Location += *(DWORD*)(pc + 1); -// printf(" 0x%lx\n", State->Location); - break; - case DW_CFA_offset_extended: - Length += DwDecodeUleb128(&State->Reg, pc + Length); - Length += DwDecodeUleb128((unsigned long*)&State->Offset, pc + Length); - State->IsUwop = 1; - break; - case DW_CFA_offset_extended_sf: - Length += DwDecodeUleb128(&State->Reg, pc + Length); - Length += DwDecodeSleb128(&State->Offset, pc + Length); - State->IsUwop = 1; - break; - case DW_CFA_restore_extended: - Length += DwDecodeUleb128(&State->Reg, pc + Length); - break; - case DW_CFA_undefined: - Length += DwDecodeUleb128(&State->Reg, pc + Length); - break; - case DW_CFA_same_value: - Length += DwDecodeUleb128(&State->Reg, pc + Length); - break; - case DW_CFA_register: - Length += DwDecodeUleb128(&State->Reg, pc + Length); - Length += DwDecodeUleb128(&State->Reg2, pc + Length); - break; - case DW_CFA_remember_state: - break; - case DW_CFA_restore_state: - break; - case DW_CFA_def_cfa: - Length += DwDecodeUleb128(&State->Reg, pc + Length); - Length += DwDecodeUleb128((unsigned long*)&State->FramePtr, pc + Length); - State->IsUwop = 1; - break; - case DW_CFA_def_cfa_register: - Length += DwDecodeUleb128(&State->Reg, pc + Length); - break; - case DW_CFA_def_cfa_offset: - Length += DwDecodeUleb128((unsigned long*)&State->FramePtr, pc + Length); - State->IsUwop = 1; - break; - case DW_CFA_def_cfa_sf: - Length += DwDecodeUleb128(&State->Reg, pc + Length); - Length += DwDecodeSleb128(&State->FramePtr, pc + Length); - State->FramePtr *= 8; // data alignment - State->IsUwop = 1; - break; - case DW_CFA_GNU_args_size: - { - unsigned long argsize; - printf("Warning, DW_CFA_GNU_args_size is unimplemented\n"); - Length += DwDecodeUleb128(&argsize, pc + Length); - break; - } - /* PSEH */ - case 0x21: - { - unsigned long SehType; - -// printf("found 0x21 at %lx\n", State->Location); - Length += DwDecodeUleb128(&SehType, pc + Length); - switch (SehType) - { - case 1: /* Begin Try */ - State->TryLevel++; - if (State->TryLevel >= 20) - { - printf("WTF? Trylevel of 20 exceeded...\n"); - exit(1); - } - State->SehBlock[State->TryLevel-1].BeginTry = State->Location; -// printf("Found begintry at 0x%lx\n", State->Location); - State->Scope = 1; - break; - - case 2: /* End Try */ - State->SehBlock[State->TryLevel-1].EndTry = State->Location; - State->Scope = 2; - break; - - case 3: /* Jump target */ - State->SehBlock[State->TryLevel-1].Target = State->Location; - State->Scope = 3; - break; - - case 4: /* SEH End */ - if (State->TryLevel == 20) - { - printf("Ooops, end of SEH with trylevel at 0!\n"); - exit(1); - } - State->SehBlock[State->TryLevel-1].End = State->Location; - State->TryLevel--; - State->cScopes++; - State->Scope = 0; - break; - - case 5: /* Constant filter */ - { - unsigned long value; - Length += DwDecodeUleb128(&value, pc + Length); - State->SehBlock[State->TryLevel-1].Handler = value; -// printf("Found a constant filter at 0x%lx\n", State->Location); - break; - } - - /* These work differently. We are in a new function. - * We have to parse a lea opcode to find the adress of - * the jump target. This is the reference to find the - * appropriate C_SCOPE_TABLE. */ - case 6: /* Filter func */ -// printf("Found a filter func at 0x%lx\n", State->Location); - break; - - case 7: /* Finally func */ - { -// printf("Found a finally func at 0x%lx\n", State->Location); - break; - } - - default: - printf("Found unknow PSEH code 0x%lx\n", SehType); - exit(1); - } - break; - } - default: - fprintf(stderr, "unknown instruction 0x%x at 0x%p\n", Code, pc); - exit(1); - } - - State->FramePtrDiff = State->FramePtr - PrevFramePtr; - DPRINT("@%p: code=%x, Loc=%lx, offset=%lx, reg=0x%lx:%s\n", - (void*)((ULONG)pc - g_ehframep), Code, State->Location, State->Offset, State->Reg, regs[State->Reg].name); - return Length; -} - -/** Windows unwind data functions *********************************************/ - -ULONG -StoreUnwindCodes(PUNWIND_INFO Info, PDW2CFSTATE State, ULONG FunctionStart) -{ - ULONG cCodes = 0; - ULONG AllocSize; - UNWIND_CODE Code[3]; - int i; - - Code[0].CodeOffset = State->Location - FunctionStart; - - switch (State->Code) - { - case DW_CFA_offset: - case DW_CFA_offset_extended: - // save register at offset - Code[0].OpInfo = regs[State->Reg].regnt; - if (State->Offset <= 0x7FFF8) - { - Code[0].UnwindOp = UWOP_SAVE_NONVOL; - Code[1].FrameOffset = State->Offset / 8; - cCodes = 2; - } - else - { - Code[0].UnwindOp = UWOP_SAVE_NONVOL_FAR; - Code[1].FrameOffset = (State->Offset / 8); - Code[2].FrameOffset = (State->Offset / 8) >> 16; - cCodes = 3; - } - break; - - case DW_CFA_def_cfa: - //case DW_CFA_def_cfa_register: - case DW_CFA_def_cfa_offset: - case DW_CFA_def_cfa_sf: - AllocSize = State->FramePtrDiff; - if (AllocSize <= 128) - { - Code[0].UnwindOp = UWOP_ALLOC_SMALL; - Code[0].OpInfo = (AllocSize / 8) - 1; - cCodes = 1; - } - else if (AllocSize <= 0x7FFF8) - { - Code[0].UnwindOp = UWOP_ALLOC_LARGE; - Code[0].OpInfo = 0; - Code[1].FrameOffset = AllocSize / 8; - cCodes = 2; - } - else // if (AllocSize > 0x7FFF8) - { - Code[0].UnwindOp = UWOP_ALLOC_LARGE; - Code[0].OpInfo = 1; - Code[1].FrameOffset = (USHORT)AllocSize; - Code[2].FrameOffset = (USHORT)(AllocSize >> 16); - cCodes = 3; - } - break; - } - - if (Info) - { - /* Move old codes */ - for (i = Info->CountOfCodes - 1; i >= 0; i--) - { - Info->UnwindCode[i + cCodes] = Info->UnwindCode[i]; - } - - /* Copy new codes */ - for (i = 0; i < cCodes; i++) - { - Info->UnwindCode[i] = Code[i]; - } - - Info->CountOfCodes += cCodes; - } - - return cCodes; -} - -#define GetxdataSize(cFuncs, cUWOP, cScopes) \ - ( cFuncs * (sizeof(UNWIND_INFO) + 2 + 4 + 4) \ - + cUWOP * sizeof(UNWIND_CODE) \ - + cScopes * sizeof(C_SCOPE_TABLE_ENTRY) ) - -ULONG -StoreUnwindInfo(PUNWIND_INFO Info, PDW2FDE pFde, ULONG FunctionStart) -{ - ULONG cbSize; - DW2CFSTATE State; - char *pInst; - ULONG c; - DW2CIE Cie; - - cbSize = 4; // sizeof(UNWIND_INFO); - Info->Version = 1; - Info->Flags = 0; - Info->SizeOfProlog = 0; - Info->CountOfCodes = 0; - Info->FrameRegister = 0; - Info->FrameOffset = 0; - - /* Decode the CIE */ - DwDecodeCie(&Cie, pFde->CiePointer); - - /* Initialize state */ - State.Location = FunctionStart; - State.FramePtr = 0; - State.TryLevel = 0; - State.cScopes = 0; - - /* Parse the CIE's initial instructions */ - pInst = Cie.Instructions; - while (pInst < Cie.Next) - { - pInst += DwExecIntruction(&State, pInst); - } - - /* Parse the FDE instructions */ - pInst = pFde->Instructions; - while (pInst < pFde->Next) - { - pInst += DwExecIntruction(&State, pInst); - - if (State.IsUwop) - { - c = StoreUnwindCodes(Info, &State, FunctionStart); - cbSize += c * sizeof(UNWIND_CODE); - Info->SizeOfProlog = State.Location - FunctionStart; - } - } - cbSize = ROUND_UP(cbSize, 4); - - /* Do we have scope table to write? */ - if (State.cScopes > 0) - { - unsigned long i; - ULONG *pExceptionHandler; - PC_SCOPE_TABLE pScopeTable; - - /* Set flag for exception handler */ - Info->Flags |= UNW_FLAG_EHANDLER; - - /* Store address of handler and number of scope tables */ - pExceptionHandler = (ULONG*)((char*)Info + cbSize); - // HACK for testing purpose - *pExceptionHandler = FunctionStart; // _C_specific_handler - - pScopeTable = (PC_SCOPE_TABLE)(pExceptionHandler + 1); - pScopeTable->NumEntries = State.cScopes; - - /* Store the scope table entries */ - for (i = 0; i < State.cScopes; i++) - { - pScopeTable->Entry[i].Begin = State.SehBlock[i].BeginTry; - pScopeTable->Entry[i].End = State.SehBlock[i].EndTry; - pScopeTable->Entry[i].Handler = 1;//State.SehBlock[i].Handler; - pScopeTable->Entry[i].Target = State.SehBlock[i].Target; - } - - /* Update size */ - cbSize += 8 + State.cScopes * sizeof(C_SCOPE_TABLE_ENTRY); - } - - return cbSize; -} - -void -CountUnwindData(PFILE_INFO File) -{ - DW2CIEFDE *p; - DW2FDE Fde; - char *pInst, *pmax; - DW2CFSTATE State; - - File->cFuncs = 0; - File->cScopes = 0; - File->cUWOP = 0; - State.FramePtr = 0; - State.TryLevel = 0; - - p = File->eh_frame.p; - pmax = (char*)p + File->eh_frame.psh->Misc.VirtualSize; - for (; p->Length && (char*)p < pmax; p = NextCIE(p)) - { - /* Is this an FDE? */ - if (p->CiePointer != 0) - { - File->cFuncs++; - DwDecodeFde(&Fde, (char*)p); - - pInst = Fde.Instructions; - while (pInst < Fde.Next) - { - pInst += DwExecIntruction(&State, pInst); - File->cUWOP += StoreUnwindCodes(NULL, &State, 0); - File->cScopes += State.Scope ? 1 : 0; - } - } - } - - return; -} - -int CompFunc(const void *p1, const void *p2) -{ - PRUNTIME_FUNCTION prf1 = (void*)p1, prf2 = (void*)p2; - return (prf1->FunctionStart > prf2->FunctionStart ? 1 : -1); -} - -void -GeneratePData(PFILE_INFO File) -{ - DW2CIEFDE *p; - DW2FDE Fde; - PIMAGE_DATA_DIRECTORY Dir; - ULONG i, Offset; - void * eh_frame; - PRUNTIME_FUNCTION pdata; - ULONG xdata_va; - char *xdata_p; - ULONG cbSize; - PIMAGE_SECTION_HEADER pshp, pshx; - ULONG FileAlignment; - char *pmax; - - FileAlignment = File->OptionalHeader->FileAlignment; - - /* Get pointer to eh_frame section */ - eh_frame = File->eh_frame.p; - g_ehframep = (ULONG)eh_frame; - - /* Get sizes */ - CountUnwindData(File); -// printf("cFuncs = %ld, cUWOPS = %ld, cScopes = %ld\n", -// File->cFuncs, File->cUWOP, File->cScopes); - - /* Initialize section header for .pdata */ - i = File->pdata.idx = File->UsedSections; - pshp = File->pdata.psh = &File->NewSectionHeaders[i]; - memcpy(pshp->Name, ".pdata", 7); - pshp->Misc.VirtualSize = (File->cFuncs + 1) * sizeof(RUNTIME_FUNCTION); - pshp->VirtualAddress = File->NewSectionHeaders[i - 1].VirtualAddress + - File->NewSectionHeaders[i - 1].SizeOfRawData; - pshp->SizeOfRawData = ROUND_UP(pshp->Misc.VirtualSize, FileAlignment); - pshp->PointerToRawData = File->NewSectionHeaders[i - 1].PointerToRawData + - File->NewSectionHeaders[i - 1].SizeOfRawData; - pshp->PointerToRelocations = 0; - pshp->PointerToLinenumbers = 0; - pshp->NumberOfRelocations = 0; - pshp->NumberOfLinenumbers = 0; - pshp->Characteristics = IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_NOT_PAGED | - IMAGE_SCN_CNT_INITIALIZED_DATA; - - /* Allocate .pdata buffer */ - pdata = File->pdata.p = malloc(pshp->SizeOfRawData); - memset(File->pdata.p, pshp->SizeOfRawData, 0); - - /* Init exception data dir */ - Dir = &File->OptionalHeader->DataDirectory[IMAGE_DIRECTORY_ENTRY_EXCEPTION]; - Dir->VirtualAddress = pshp->VirtualAddress; - Dir->Size = pshp->Misc.VirtualSize; - - /* Initialize section header for .xdata */ - File->xdata.idx = File->pdata.idx + 1; - pshx = File->xdata.psh = &File->NewSectionHeaders[File->xdata.idx]; - memcpy(pshx->Name, ".xdata", 7); - pshx->Misc.VirtualSize = GetxdataSize(File->cFuncs, File->cUWOP, File->cScopes); - pshx->VirtualAddress = pshp->VirtualAddress + pshp->SizeOfRawData; - pshx->SizeOfRawData = ROUND_UP(pshx->Misc.VirtualSize, FileAlignment); - pshx->PointerToRawData = pshp->PointerToRawData + pshp->SizeOfRawData; - pshx->PointerToRelocations = 0; - pshx->PointerToLinenumbers = 0; - pshx->NumberOfRelocations = 0; - pshx->NumberOfLinenumbers = 0; - pshx->Characteristics = IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_NOT_PAGED | - IMAGE_SCN_CNT_INITIALIZED_DATA; - - /* Allocate .xdata buffer */ - File->xdata.p = malloc(pshx->SizeOfRawData); - memset(File->xdata.p, pshx->SizeOfRawData, 0); - - i = 0; - Offset = File->eh_frame.psh->VirtualAddress; - xdata_va = pshx->VirtualAddress; - xdata_p = File->xdata.p; - pmax = (char*)eh_frame + File->eh_frame.psh->Misc.VirtualSize - 100; - - for (p = eh_frame; p->Length && (char*)p < pmax; p = NextCIE(p)) - { - /* Is this an FDE? */ - if (p->CiePointer != 0) - { - DwDecodeFde(&Fde, (char*)p); - pdata[i].FunctionStart = Offset + 8 + Fde.PcBegin; - pdata[i].FunctionEnd = pdata[i].FunctionStart + Fde.PcRange; - pdata[i].UnwindInfo = xdata_va; - -// printf("%ld: RUNTIME_FUNCTION: {0x%lx, 0x%lx, 0x%lx}\n", i, pdata[i].FunctionStart, pdata[i].FunctionEnd, pdata[i].UnwindInfo); - - cbSize = StoreUnwindInfo((void*)xdata_p, &Fde, pdata[i].FunctionStart); - xdata_va += cbSize; - xdata_p += cbSize; - i++; - } - Offset += 4 + p->Length; - } - - /* Sort the RUNTIME_FUNCTIONS */ - qsort(pdata, i, sizeof(RUNTIME_FUNCTION), CompFunc); - -} - -/** Functions for COFF ********************************************************/ - - -WORD -CalculateChecksum(DWORD Start, void *pFile, ULONG cbSize) -{ - WORD *Ptr = pFile; - DWORD i; - DWORD checksum = Start; - - for (i = 0; i < (cbSize + 1) / sizeof(WORD); i++) - { - checksum += Ptr[i]; - checksum = (checksum + (checksum >> 16)) & 0xffff; - } - - return checksum ; -} - -void -WriteOutFile(FILE *handle, PFILE_INFO File) -{ - int ret, Size, Pos = 0; - DWORD CheckSum; - ULONG i, Alignment; - - Alignment = File->OptionalHeader->FileAlignment; - - /* Update section count */ - File->FileHeader->NumberOfSections = File->UsedSections + 2; // FIXME!!! - - /* Update SizeOfImage */ - Size = File->xdata.psh->VirtualAddress - + File->xdata.psh->SizeOfRawData; - File->OptionalHeader->SizeOfImage = Size; - - /* Recalculate checksum */ - CheckSum = CalculateChecksum(0, File->FilePtr, File->HeaderSize); - for (i = 0; i < File->AllSections; i++) - { - if (File->UseSection[i]) - { - Size = File->SectionHeaders[i].SizeOfRawData; - if (Size) - { - void *p; - p = File->FilePtr + File->SectionHeaders[i].PointerToRawData; - CheckSum = CalculateChecksum(CheckSum, p, Size); - } - } - } - Size = File->pdata.psh->Misc.VirtualSize; - CheckSum = CalculateChecksum(CheckSum, File->pdata.p, Size); - Size = File->xdata.psh->Misc.VirtualSize; - CheckSum = CalculateChecksum(CheckSum, File->xdata.p, Size); - CheckSum += File->HeaderSize; - CheckSum += File->pdata.psh->Misc.VirtualSize; - CheckSum += File->xdata.psh->Misc.VirtualSize; - File->OptionalHeader->CheckSum = CheckSum; - - /* Write file header */ - Size = File->HeaderSize; - ret = fwrite(File->DosHeader, 1, Size, handle); - Pos = Size; - - /* Write Section headers */ - Size = File->NewSectionHeaderSize; - ret = fwrite(File->NewSectionHeaders, 1, Size, handle); - Pos += Size; - - /* Fill up to next alignement */ - Size = ROUND_UP(Pos, Alignment) - Pos; - ret = fwrite(File->AlignBuf, 1, Size, handle); - Pos += Size; - - /* Write sections */ - for (i = 0; i < File->AllSections; i++) - { - if (File->UseSection[i]) - { - void *p; - Size = File->SectionHeaders[i].SizeOfRawData; - if (Size) - { - p = File->FilePtr + File->SectionHeaders[i].PointerToRawData; - ret = fwrite(p, 1, Size, handle); - Pos += Size; - } - } - } - - /* Write .pdata section */ - Size = File->pdata.psh->SizeOfRawData; - ret = fwrite(File->pdata.p, 1, Size, handle); - Pos += Size; - - /* Write .xdata section */ - Size = File->xdata.psh->SizeOfRawData; - ret = fwrite(File->xdata.p, 1, Size, handle); - Pos += Size; - -} - - -int -ParsePEHeaders(PFILE_INFO File) -{ - DWORD OldChecksum, Checksum; - ULONG Alignment, CurrentPos; - int i, j; - - /* Check if MZ header exists */ - File->DosHeader = (PIMAGE_DOS_HEADER)File->FilePtr; - if ((File->DosHeader->e_magic != IMAGE_DOS_MAGIC) || - (File->DosHeader->e_lfanew == 0L)) - { - perror("Input file is not a PE image.\n"); - return -1; - } - - /* Locate PE file header */ - File->FileHeader = (PIMAGE_FILE_HEADER)(File->FilePtr + - File->DosHeader->e_lfanew + sizeof(ULONG)); - - /* Check for x64 image */ - if (File->FileHeader->Machine != IMAGE_FILE_MACHINE_AMD64) - { - perror("Input file is not an x64 image.\n"); - return -1; - } - - /* Locate optional header */ - File->OptionalHeader = (PIMAGE_OPTIONAL_HEADER64)(File->FileHeader + 1); - - /* Check if checksum is correct */ - OldChecksum = File->OptionalHeader->CheckSum; - File->OptionalHeader->CheckSum = 0; - Checksum = CalculateChecksum(0, File->FilePtr, File->cbInFileSize); - Checksum += File->cbInFileSize; - if ((Checksum & 0xffff) != (OldChecksum & 0xffff)) - { - fprintf(stderr, "Input file has incorrect PE checksum: 0x%lx (calculated: 0x%lx)\n", - OldChecksum, Checksum); -// return 0; - } - - /* Locate PE section headers */ - File->SectionHeaders = (PIMAGE_SECTION_HEADER)((char*)File->OptionalHeader - + File->FileHeader->SizeOfOptionalHeader); - - File->HeaderSize = File->DosHeader->e_lfanew - + sizeof(ULONG) - + sizeof(IMAGE_FILE_HEADER) - + File->FileHeader->SizeOfOptionalHeader; - - if (!File->FileHeader->PointerToSymbolTable) - { - fprintf(stderr, "No symbol table.\n"); - return -1; - } - - /* Create some shortcuts */ - File->ImageBase = File->OptionalHeader->ImageBase; - File->Symbols = File->FilePtr + File->FileHeader->PointerToSymbolTable; - File->Strings = (char*)File->Symbols + File->FileHeader->NumberOfSymbols * 18; - - /* Check section names */ - File->AllSections = File->FileHeader->NumberOfSections; - Alignment = File->OptionalHeader->FileAlignment; - File->NewSectionHeaders = malloc((File->AllSections+2) * sizeof(IMAGE_SECTION_HEADER)); - File->UsedSections = 0; - File->eh_frame.idx = -1; - - /* Allocate array of chars, specifiying wheter to copy the section */ - File->UseSection = malloc(File->AllSections); - - for (i = 0; i < File->AllSections; i++) - { - char *pName = (char*)File->SectionHeaders[i].Name; - File->UseSection[i] = 1; - - /* Check for long name */ - if (pName[0] == '/') - { - unsigned long index = strtoul(pName+1, 0, 10); - pName = File->Strings + index; - - // Hack, simply remove all sections with long names - File->UseSection[i] = 0; - } - - /* Chek if we have the eh_frame section */ - if (strcmp(pName, ".eh_frame") == 0) - { - File->eh_frame.psh = &File->SectionHeaders[i]; - File->eh_frame.idx = i; - File->eh_frame.p = File->FilePtr + File->eh_frame.psh->PointerToRawData; - } - - /* Increase number of used sections */ - if (File->UseSection[i]) - File->UsedSections = i+1; - - } - - /* This is the actual size of the new section headers */ - File->NewSectionHeaderSize = - (File->UsedSections+2) * sizeof(IMAGE_SECTION_HEADER); - - /* Calculate the position to start writing the sections to */ - CurrentPos = File->HeaderSize + File->NewSectionHeaderSize; - CurrentPos = ROUND_UP(CurrentPos, Alignment); - - /* Create new section headers */ - for (i = 0, j = 0; i < File->UsedSections; i++) - { - /* Copy section header */ - File->NewSectionHeaders[j] = File->SectionHeaders[i]; - - /* Shall we strip the section? */ - if (File->UseSection[i] == 0) - { - /* Make it a bss section */ - File->NewSectionHeaders[j].PointerToRawData = 0; - File->NewSectionHeaders[j].SizeOfRawData = 0; - File->NewSectionHeaders[j].Characteristics = 0xC0500080; - } - - /* Fix Offset into File */ - File->NewSectionHeaders[j].PointerToRawData = - File->NewSectionHeaders[j].PointerToRawData ? CurrentPos : 0; - CurrentPos += File->NewSectionHeaders[j].SizeOfRawData; - j++; - } - - if (File->eh_frame.idx == -1) - { - //fprintf(stderr, "No .eh_frame section found\n"); - return 0; - } - - return 1; -} - -int main(int argc, char* argv[]) -{ - char* pszInFile; - char* pszOutFile; - FILE_INFO File; - FILE* outfile; - int ret; - - if (argc != 3) - { - fprintf(stderr, "Usage: rsym \n"); - exit(1); - } - - pszInFile = convert_path(argv[1]); - pszOutFile = convert_path(argv[2]); - - File.FilePtr = load_file(pszInFile, &File.cbInFileSize); - if (!File.FilePtr) - { - fprintf(stderr, "An error occured loading '%s'\n", pszInFile); - exit(1); - } - - ret = ParsePEHeaders(&File); - if (ret != 1) - { - free(File.FilePtr); - exit(ret == -1 ? 1 : 0); - } - - File.AlignBuf = malloc(File.OptionalHeader->FileAlignment); - memset(File.AlignBuf, File.OptionalHeader->FileAlignment, 0); - - GeneratePData(&File); - - outfile = fopen(pszOutFile, "wb"); - if (outfile == NULL) - { - perror("Cannot open output file"); - free(File.FilePtr); - exit(1); - } - - WriteOutFile(outfile, &File); - - fclose(outfile); - - return 0; -} diff --git a/reactos/tools/rsym/rsym64.h b/reactos/tools/rsym/rsym64.h deleted file mode 100644 index 0249ebc7945..00000000000 --- a/reactos/tools/rsym/rsym64.h +++ /dev/null @@ -1,186 +0,0 @@ -#pragma once - -//C_ASSERT(sizeof(ULONG) == 4); -typedef unsigned char UBYTE; -#if defined(_MSC_VER) || defined(__MINGW32__) -typedef unsigned __int64 ULONG64; -#else -#include -typedef uint64_t ULONG64; -#endif - - -#define IMAGE_FILE_MACHINE_I386 0x14c -#define IMAGE_FILE_MACHINE_AMD64 0x8664 -#define IMAGE_DIRECTORY_ENTRY_IMPORT 1 -#define IMAGE_DIRECTORY_ENTRY_EXCEPTION 3 - -#define UWOP_PUSH_NONVOL 0 -#define UWOP_ALLOC_LARGE 1 -#define UWOP_ALLOC_SMALL 2 -#define UWOP_SET_FPREG 3 -#define UWOP_SAVE_NONVOL 4 -#define UWOP_SAVE_NONVOL_FAR 5 -#define UWOP_SAVE_XMM 6 -#define UWOP_SAVE_XMM_FAR 7 -#define UWOP_SAVE_XMM128 8 -#define UWOP_SAVE_XMM128_FAR 9 -#define UWOP_PUSH_MACHFRAME 10 - -#define REG_RAX 0 -#define REG_RCX 1 -#define REG_RDX 2 -#define REG_RBX 3 -#define REG_RSP 4 -#define REG_RBP 5 -#define REG_RSI 6 -#define REG_RDI 7 -#define REG_R8 8 -#define REG_R9 9 -#define REG_R10 10 -#define REG_R11 11 -#define REG_R12 12 -#define REG_R13 13 -#define REG_R14 14 -#define REG_R15 15 - -#define REG_XMM0 0 -#define REG_XMM1 1 -#define REG_XMM2 2 -#define REG_XMM3 3 -#define REG_XMM4 4 -#define REG_XMM5 5 -#define REG_XMM6 6 -#define REG_XMM7 7 -#define REG_XMM8 8 -#define REG_XMM9 9 -#define REG_XMM10 10 -#define REG_XMM11 11 -#define REG_XMM12 12 -#define REG_XMM13 13 -#define REG_XMM14 14 -#define REG_XMM15 15 - - -typedef struct _IMAGE_IMPORT_DESCRIPTOR -{ - union { - DWORD Characteristics; - DWORD OriginalFirstThunk; - }; - DWORD TimeDateStamp; - DWORD ForwarderChain; - DWORD Name; - DWORD FirstThunk; -} IMAGE_IMPORT_DESCRIPTOR, *PIMAGE_IMPORT_DESCRIPTOR; - -typedef struct _IMAGE_THUNK_DATA64 -{ - union { - ULONGLONG ForwarderString; - ULONGLONG Function; - ULONGLONG Ordinal; - ULONGLONG AddressOfData; - } u1; -} IMAGE_THUNK_DATA64, *PIMAGE_THUNK_DATA64; - -typedef struct _RUNTIME_FUNCTION -{ - ULONG FunctionStart; - ULONG FunctionEnd; - ULONG UnwindInfo; -} RUNTIME_FUNCTION, *PRUNTIME_FUNCTION; - -typedef union _UNWIND_CODE -{ - struct - { - UBYTE CodeOffset; - UBYTE UnwindOp:4; - UBYTE OpInfo:4; - }; - USHORT FrameOffset; -} UNWIND_CODE, *PUNWIND_CODE; - -enum -{ - UNW_FLAG_EHANDLER = 0x01, - UNW_FLAG_UHANDLER = 0x02, - UNW_FLAG_CHAININFO = 0x03, -}; - -typedef struct _UNWIND_INFO -{ - UBYTE Version:3; - UBYTE Flags:5; - UBYTE SizeOfProlog; - UBYTE CountOfCodes; - UBYTE FrameRegister:4; - UBYTE FrameOffset:4; - UNWIND_CODE UnwindCode[1]; -/* union { - OPTIONAL ULONG ExceptionHandler; - OPTIONAL ULONG FunctionEntry; - }; - OPTIONAL ULONG ExceptionData[]; -*/ -} UNWIND_INFO, *PUNWIND_INFO; - -typedef struct _C_SCOPE_TABLE_ENTRY -{ - ULONG Begin; - ULONG End; - ULONG Handler; - ULONG Target; -} C_SCOPE_TABLE_ENTRY, *PC_SCOPE_TABLE_ENTRY; - -typedef struct _C_SCOPE_TABLE -{ - ULONG NumEntries; - C_SCOPE_TABLE_ENTRY Entry[1]; -} C_SCOPE_TABLE, *PC_SCOPE_TABLE; - - -typedef struct -{ - IMAGE_SECTION_HEADER *psh; - char *pName; - void *p; - ULONG idx; -} SECTION; - -typedef struct -{ - char* FilePtr; - size_t cbInFileSize; - size_t cbNewFileSize; - - /* PE data pointers */ - PIMAGE_DOS_HEADER DosHeader; - PIMAGE_FILE_HEADER FileHeader; - PIMAGE_OPTIONAL_HEADER64 OptionalHeader; - PIMAGE_SECTION_HEADER SectionHeaders; - PIMAGE_SECTION_HEADER NewSectionHeaders; - ULONG NewSectionHeaderSize; - PIMAGE_BASE_RELOCATION Relocations; - void *Symbols; - char *Strings; - ULONG64 ImageBase; - ULONG HeaderSize; - char *UseSection; - - /* Sections */ - ULONG AllSections; - ULONG UsedSections; - - SECTION eh_frame; - SECTION pdata; - SECTION xdata; - - char *AlignBuf; - - ULONG cFuncs; - ULONG cUWOP; - ULONG cScopes; - -} FILE_INFO, *PFILE_INFO; diff --git a/reactos/tools/rsym/rsym_common.c b/reactos/tools/rsym/rsym_common.c deleted file mode 100644 index 875463fe920..00000000000 --- a/reactos/tools/rsym/rsym_common.c +++ /dev/null @@ -1,62 +0,0 @@ -/* rsym_common.c */ - -#include -#include -#include - -#include "rsym.h" - -char* -convert_path ( const char* origpath ) -{ - char* newpath; - int i; - - newpath = strdup(origpath); - - i = 0; - while (newpath[i] != 0) - { -#ifdef UNIX_PATHS - if (newpath[i] == '\\') - { - newpath[i] = '/'; - } -#else -#ifdef DOS_PATHS - if (newpath[i] == '/') - { - newpath[i] = '\\'; - } -#endif -#endif - i++; - } - return(newpath); -} - -void* -load_file ( const char* file_name, size_t* file_size ) -{ - FILE* f; - void* FileData = NULL; - - f = fopen ( file_name, "rb" ); - if (f != NULL) - { - fseek(f, 0L, SEEK_END); - *file_size = ftell(f); - fseek(f, 0L, SEEK_SET); - FileData = malloc(*file_size); - if (FileData != NULL) - { - if ( *file_size != fread(FileData, 1, *file_size, f) ) - { - free(FileData); - FileData = NULL; - } - } - fclose(f); - } - return FileData; -} diff --git a/reactos/tools/spec2def/CMakeLists.txt b/reactos/tools/spec2def/CMakeLists.txt deleted file mode 100644 index 15be2cdbb02..00000000000 --- a/reactos/tools/spec2def/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_executable(spec2def spec2def.c) diff --git a/reactos/tools/spec2def/spec2def.c b/reactos/tools/spec2def/spec2def.c deleted file mode 100644 index e9ef4071131..00000000000 --- a/reactos/tools/spec2def/spec2def.c +++ /dev/null @@ -1,886 +0,0 @@ -#include -#include -#include -#include - -#ifdef _MSC_VER -#define strcasecmp _stricmp -#endif - -typedef struct -{ - char *pcName; - size_t nNameLength; - char *pcRedirection; - int nRedirectionLength; - int nCallingConvention; - int nOrdinal; - int nStackBytes; - int nArgCount; - int anArgs[30]; - unsigned int uFlags; - int nNumber; -} EXPORT; - -enum _ARCH -{ - ARCH_X86, - ARCH_AMD64, - ARCH_IA64, - ARCH_ARM, - ARCH_PPC -}; - -typedef int (*PFNOUTLINE)(FILE *, EXPORT *); -int gbKillAt = 0; -int gbMSComp = 0; -int gbImportLib = 0; -int no_redirections = 0; -int giArch = ARCH_X86; -char *pszArchString = "i386"; -char *pszArchString2; -char *pszDllName = 0; -char *gpszUnderscore = ""; - -enum -{ - FL_PRIVATE = 1, - FL_STUB = 2, - FL_NONAME = 4, -}; - -enum -{ - CC_STDCALL, - CC_CDECL, - CC_FASTCALL, - CC_THISCALL, - CC_EXTERN, - CC_STUB, -}; - -enum -{ - ARG_LONG, - ARG_PTR, - ARG_STR, - ARG_WSTR, - ARG_DBL, - ARG_INT64, - ARG_FLOAT -}; - -char* astrCallingConventions[] = -{ - "STDCALL", - "CDECL", - "FASTCALL", - "THISCALL", - "EXTERN" -}; - -static -int -IsSeparator(char chr) -{ - return ((chr <= ',' && chr != '$') || - (chr >= ':' && chr < '?') ); -} - -int -CompareToken(const char *token, const char *comparand) -{ - while (*comparand) - { - if (*token != *comparand) return 0; - token++; - comparand++; - } - if (!IsSeparator(*token)) return 0; - return 1; -} - -int -ScanToken(const char *token, char chr) -{ - while (!IsSeparator(*token)) - { - if (*token++ == chr) return 1; - } - return 0; -} - -char * -NextLine(char *pc) -{ - while (*pc != 0) - { - if (pc[0] == '\n' && pc[1] == '\r') return pc + 2; - else if (pc[0] == '\n') return pc + 1; - pc++; - } - return pc; -} - -int -TokenLength(char *pc) -{ - int length = 0; - - while (!IsSeparator(*pc++)) length++; - - return length; -} - -char * -NextToken(char *pc) -{ - /* Skip token */ - while (!IsSeparator(*pc)) pc++; - - /* Skip white spaces */ - while (*pc == ' ' || *pc == '\t') pc++; - - /* Check for end of line */ - if (*pc == '\n' || *pc == '\r' || *pc == 0) return 0; - - /* Check for comment */ - if (*pc == '#' || *pc == ';') return 0; - - return pc; -} - -void -OutputHeader_stub(FILE *file) -{ - fprintf(file, "/* This file is autogenerated, do not edit. */\n\n" - "#include \n\n"); -} - -int -OutputLine_stub(FILE *file, EXPORT *pexp) -{ - int i; - - if (pexp->nCallingConvention != CC_STUB && - (pexp->uFlags & FL_STUB) == 0) return 0; - - fprintf(file, "int "); - if ((giArch == ARCH_X86) && - pexp->nCallingConvention == CC_STDCALL) - { - fprintf(file, "__stdcall "); - } - - /* Check for C++ */ - if (pexp->pcName[0] == '?') - { - fprintf(file, "stub_function%d(", pexp->nNumber); - } - else - { - fprintf(file, "%.*s(", pexp->nNameLength, pexp->pcName); - } - - for (i = 0; i < pexp->nArgCount; i++) - { - if (i != 0) fprintf(file, ", "); - switch (pexp->anArgs[i]) - { - case ARG_LONG: fprintf(file, "long"); break; - case ARG_PTR: fprintf(file, "void*"); break; - case ARG_STR: fprintf(file, "char*"); break; - case ARG_WSTR: fprintf(file, "wchar_t*"); break; - case ARG_DBL: case ARG_INT64 : fprintf(file, "__int64"); break; - case ARG_FLOAT: fprintf(file, "float"); break; - } - fprintf(file, " a%d", i); - } - fprintf(file, ")\n{\n\tDPRINT1(\"WARNING: calling stub %.*s(", - pexp->nNameLength, pexp->pcName); - - for (i = 0; i < pexp->nArgCount; i++) - { - if (i != 0) fprintf(file, ","); - switch (pexp->anArgs[i]) - { - case ARG_LONG: fprintf(file, "0x%%lx"); break; - case ARG_PTR: fprintf(file, "0x%%p"); break; - case ARG_STR: fprintf(file, "'%%s'"); break; - case ARG_WSTR: fprintf(file, "'%%ws'"); break; - case ARG_DBL: fprintf(file, "%%f"); break; - case ARG_INT64: fprintf(file, "%%\"PRix64\""); break; - case ARG_FLOAT: fprintf(file, "%%f"); break; - } - } - fprintf(file, ")\\n\""); - - for (i = 0; i < pexp->nArgCount; i++) - { - fprintf(file, ", "); - switch (pexp->anArgs[i]) - { - case ARG_LONG: fprintf(file, "(long)a%d", i); break; - case ARG_PTR: fprintf(file, "(void*)a%d", i); break; - case ARG_STR: fprintf(file, "(char*)a%d", i); break; - case ARG_WSTR: fprintf(file, "(wchar_t*)a%d", i); break; - case ARG_DBL: fprintf(file, "(double)a%d", i); break; - case ARG_INT64: fprintf(file, "(__int64)a%d", i); break; - case ARG_FLOAT: fprintf(file, "(float)a%d", i); break; - } - } - fprintf(file, ");\n"); - - if (pexp->nCallingConvention == CC_STUB) - { - fprintf(file, "\t__wine_spec_unimplemented_stub(\"%s\", __FUNCTION__);\n", pszDllName); - } - - fprintf(file, "\treturn 0;\n}\n\n"); - - return 1; -} - -void -OutputHeader_asmstub(FILE *file, char *libname) -{ - fprintf(file, "; File generated automatically, do not edit! \n\n"); - - if (giArch == ARCH_X86) - fprintf(file, ".586\n.model flat\n"); - - fprintf(file, ".code\n"); -} - -int -OutputLine_asmstub(FILE *fileDest, EXPORT *pexp) -{ - /* Handle autoname */ - if (pexp->nNameLength == 1 && pexp->pcName[0] == '@') - { - fprintf(fileDest, "PUBLIC %sordinal%d\n%sordinal%d: nop\n", - gpszUnderscore, pexp->nOrdinal, gpszUnderscore, pexp->nOrdinal); - } - else if (giArch != ARCH_X86) - { - fprintf(fileDest, "PUBLIC _stub_%.*s\n_stub_%.*s: nop\n", - pexp->nNameLength, pexp->pcName, - pexp->nNameLength, pexp->pcName); - } - else if (pexp->nCallingConvention == CC_STDCALL) - { - fprintf(fileDest, "PUBLIC __stub_%.*s@%d\n__stub_%.*s@%d: nop\n", - pexp->nNameLength, pexp->pcName, pexp->nStackBytes, - pexp->nNameLength, pexp->pcName, pexp->nStackBytes); - } - else if (pexp->nCallingConvention == CC_FASTCALL) - { - fprintf(fileDest, "PUBLIC @_stub_%.*s@%d\n@_stub_%.*s@%d: nop\n", - pexp->nNameLength, pexp->pcName, pexp->nStackBytes, - pexp->nNameLength, pexp->pcName, pexp->nStackBytes); - } - else if (pexp->nCallingConvention == CC_CDECL || - pexp->nCallingConvention == CC_STUB) - { - fprintf(fileDest, "PUBLIC __stub_%.*s\n__stub_%.*s: nop\n", - pexp->nNameLength, pexp->pcName, - pexp->nNameLength, pexp->pcName); - } - else if (pexp->nCallingConvention == CC_EXTERN) - { - fprintf(fileDest, "PUBLIC __stub_%.*s\n__stub_%.*s:\n", - pexp->nNameLength, pexp->pcName, - pexp->nNameLength, pexp->pcName); - } - - return 1; -} - -void -OutputHeader_def(FILE *file, char *libname) -{ - fprintf(file, - "; File generated automatically, do not edit!\n\n" - "LIBRARY %s\n\n" - "EXPORTS\n", - libname); -} - -void -PrintName(FILE *fileDest, EXPORT *pexp, char *pszPrefix, int fRedir, int fDeco) -{ - char *pcName = fRedir ? pexp->pcRedirection : pexp->pcName; - size_t nNameLength = fRedir ? pexp->nRedirectionLength : pexp->nNameLength; - - /* Handle autoname */ - if (nNameLength == 1 && pcName[0] == '@') - { - fprintf(fileDest, "ordinal%d", pexp->nOrdinal); - } - else - { - if (fDeco && pexp->nCallingConvention == CC_FASTCALL) - fprintf(fileDest, "@"); - fprintf(fileDest, "%s%.*s", pszPrefix, nNameLength, pcName); - if ((pexp->nCallingConvention == CC_STDCALL || - pexp->nCallingConvention == CC_FASTCALL) && fDeco) - { - fprintf(fileDest, "@%d", pexp->nStackBytes); - } - } -} - -int -OutputLine_def(FILE *fileDest, EXPORT *pexp) -{ - fprintf(fileDest, " "); - - PrintName(fileDest, pexp, "", 0, (giArch == ARCH_X86) && !gbKillAt); - - if (gbImportLib) - { - fprintf(fileDest, "="); - PrintName(fileDest, pexp, "_stub_", 0, 0); - } - else if (pexp->pcRedirection) - { - if (gbMSComp && (pexp->pcName[0] == '?')) - { - /* ignore c++ redirection, since link doesn't like that! */ - } - else - { - int fDeco; - - fDeco = ((giArch == ARCH_X86) && !ScanToken(pexp->pcRedirection, '.')); - fprintf(fileDest, "="); - PrintName(fileDest, pexp, "", 1, fDeco && !gbMSComp); - } - } - else if (((pexp->uFlags & FL_STUB) || (pexp->nCallingConvention == CC_STUB)) && - (pexp->pcName[0] == '?')) - { - /* C++ stubs are forwarded to C stubs */ - fprintf(fileDest, "="); - fprintf(fileDest, "stub_function%d", pexp->nNumber); - } - else if ((giArch == ARCH_X86) && gbKillAt && !gbMSComp && - (pexp->nCallingConvention == CC_STDCALL || - pexp->nCallingConvention == CC_FASTCALL)) - { - fprintf(fileDest, "="); - PrintName(fileDest, pexp, "", 0, 1); - } - - if (pexp->nOrdinal != -1) - { - fprintf(fileDest, " @%d", pexp->nOrdinal); - } - - if (pexp->nCallingConvention == CC_EXTERN) - { - fprintf(fileDest, " DATA"); - } - - if (pexp->uFlags & FL_PRIVATE) - { - fprintf(fileDest, " PRIVATE"); - } - - if (pexp->uFlags & FL_NONAME) - { - fprintf(fileDest, " NONAME"); - } - - fprintf(fileDest, "\n"); - - return 1; -} - -int -ParseFile(char* pcStart, FILE *fileDest, PFNOUTLINE OutputLine) -{ - char *pc, *pcLine; - int nLine; - EXPORT exp; - int included; - - //fprintf(stderr, "info: line %d, pcStart:'%.30s'\n", nLine, pcStart); - - /* Loop all lines */ - nLine = 1; - exp.nNumber = 0; - for (pcLine = pcStart; *pcLine; pcLine = NextLine(pcLine), nLine++) - { - pc = pcLine; - - exp.nArgCount = 0; - exp.uFlags = 0; - exp.nNumber++; - - //fprintf(stderr, "info: line %d, token:'%d, %.20s'\n", - // nLine, TokenLength(pcLine), pcLine); - - /* Skip white spaces */ - while (*pc == ' ' || *pc == '\t') pc++; - - /* Skip empty lines, stop at EOF */ - if (*pc == ';' || *pc <= '#') continue; - if (*pc == 0) return 0; - - //fprintf(stderr, "info: line %d, token:'%.*s'\n", - // nLine, TokenLength(pc), pc); - - /* Now we should get either an ordinal or @ */ - if (*pc == '@') exp.nOrdinal = -1; - else exp.nOrdinal = atol(pc); - - /* Go to next token (type) */ - if (!(pc = NextToken(pc))) - { - fprintf(stderr, "error: line %d, unexpected end of line\n", nLine); - return -10; - } - - //fprintf(stderr, "info: Token:'%.10s'\n", pc); - - /* Now we should get the type */ - if (CompareToken(pc, "stdcall")) - { - exp.nCallingConvention = CC_STDCALL; - } - else if (CompareToken(pc, "cdecl") || - CompareToken(pc, "varargs")) - { - exp.nCallingConvention = CC_CDECL; - } - else if (CompareToken(pc, "fastcall")) - { - exp.nCallingConvention = CC_FASTCALL; - } - else if (CompareToken(pc, "thiscall")) - { - exp.nCallingConvention = CC_THISCALL; - } - else if (CompareToken(pc, "extern")) - { - exp.nCallingConvention = CC_EXTERN; - } - else if (CompareToken(pc, "stub")) - { - exp.nCallingConvention = CC_STUB; - } - else - { - fprintf(stderr, "error: line %d, expected type, got '%.*s' %d\n", - nLine, TokenLength(pc), pc, *pc); - return -11; - } - - //fprintf(stderr, "info: nCallingConvention: %d\n", exp.nCallingConvention); - - /* Go to next token (options or name) */ - if (!(pc = NextToken(pc))) - { - fprintf(stderr, "fail2\n"); - return -12; - } - - /* Handle options */ - included = 1; - while (*pc == '-') - { - if (CompareToken(pc, "-arch")) - { - /* Default to not included */ - included = 0; - pc += 5; - - /* Look if we are included */ - while (*pc == '=' || *pc == ',') - { - pc++; - if (CompareToken(pc, pszArchString) || - CompareToken(pc, pszArchString2)) - { - included = 1; - } - - /* Skip to next arch or end */ - while (*pc > ',') pc++; - } - } - else if (CompareToken(pc, "-i386")) - { - if (giArch != ARCH_X86) included = 0; - } - else if (CompareToken(pc, "-private")) - { - exp.uFlags |= FL_PRIVATE; - } - else if (CompareToken(pc, "-noname") || - CompareToken(pc, "-ordinal")) - { - exp.uFlags |= FL_NONAME; - } - else if (CompareToken(pc, "-stub")) - { - exp.uFlags |= FL_STUB; - } - else if (CompareToken(pc, "-norelay") || - CompareToken(pc, "-register") || - CompareToken(pc, "-ret64")) - { - /* silently ignore these */ - } - else - { - fprintf(stderr, "info: ignored option: '%.*s'\n", - TokenLength(pc), pc); - } - - /* Go to next token */ - pc = NextToken(pc); - } - - //fprintf(stderr, "info: Name:'%.10s'\n", pc); - - /* If arch didn't match ours, skip this entry */ - if (!included) continue; - - /* Get name */ - exp.pcName = pc; - exp.nNameLength = TokenLength(pc); - - /* Handle parameters */ - exp.nStackBytes = 0; - if (exp.nCallingConvention != CC_EXTERN && - exp.nCallingConvention != CC_STUB) - { - //fprintf(stderr, "info: options:'%.10s'\n", pc); - /* Go to next token */ - if (!(pc = NextToken(pc))) - { - fprintf(stderr, "fail4\n"); - return -13; - } - - /* Verify syntax */ - if (*pc++ != '(') - { - fprintf(stderr, "error: line %d, expected '('\n", nLine); - return -14; - } - - /* Skip whitespaces */ - while (*pc == ' ' || *pc == '\t') pc++; - - exp.nStackBytes = 0; - while (*pc >= '0') - { - if (CompareToken(pc, "long")) - { - exp.nStackBytes += 4; - exp.anArgs[exp.nArgCount] = ARG_LONG; - } - else if (CompareToken(pc, "double")) - { - exp.nStackBytes += 8; - exp.anArgs[exp.nArgCount] = ARG_DBL; - } - else if (CompareToken(pc, "ptr") || - CompareToken(pc, "str") || - CompareToken(pc, "wstr")) - { - exp.nStackBytes += 4; // sizeof(void*) on x86 - exp.anArgs[exp.nArgCount] = ARG_PTR; // FIXME: handle strings - } - else if (CompareToken(pc, "int64")) - { - exp.nStackBytes += 8; - exp.anArgs[exp.nArgCount] = ARG_INT64; - } - else if (CompareToken(pc, "float")) - { - exp.nStackBytes += 4; - exp.anArgs[exp.nArgCount] = ARG_FLOAT; - } - else - fprintf(stderr, "error: line %d, expected type, got: %.10s\n", nLine, pc); - - exp.nArgCount++; - - /* Go to next parameter */ - if (!(pc = NextToken(pc))) - { - fprintf(stderr, "fail5\n"); - return -15; - } - } - - /* Check syntax */ - if (*pc++ != ')') - { - fprintf(stderr, "error: line %d, expected ')'\n", nLine); - return -16; - } - } - - /* Handle special stub cases */ - if (exp.nCallingConvention == CC_STUB) - { - /* Check for c++ mangled name */ - if (pc[0] == '?') - { - //printf("Found c++ mangled name...\n"); - // - } - else - { - /* Check for stdcall name */ - char *p = strchr(pc, '@'); - if (p && ((size_t)(p - pc) < exp.nNameLength)) - { - int i; - exp.nNameLength = p - pc; - if (exp.nNameLength < 1) - { - fprintf(stderr, "error, @ in line %d\n", nLine); - return -1; - } - exp.nStackBytes = atoi(p + 1); - exp.nArgCount = exp.nStackBytes / 4; - exp.nCallingConvention = CC_STDCALL; - exp.uFlags |= FL_STUB; - for (i = 0; i < exp.nArgCount; i++) - exp.anArgs[i] = ARG_LONG; - } - } - } - - /* Get optional redirection */ - if ((pc = NextToken(pc))) - { - exp.pcRedirection = pc; - exp.nRedirectionLength = TokenLength(pc); - - /* Check syntax (end of line) */ - if (NextToken(pc)) - { - fprintf(stderr, "error: line %d, additional tokens after ')'\n", nLine); - return -17; - } - } - else - { - exp.pcRedirection = 0; - exp.nRedirectionLength = 0; - } - - OutputLine(fileDest, &exp); - } - - return 0; -} - - -void usage(void) -{ - printf("syntax: spec2pdef [ ...] \n" - "Possible options:\n" - " -h --help prints this screen\n" - " -l= generates an asm lib stub\n" - " -d= generates a def file\n" - " -s= generates a stub file\n" - " --ms msvc compatibility\n" - " -n= name of the dll\n" - " --kill-at removes @xx decorations from exports\n" - " -r removes redirections from def file\n" - " -a= Set architecture to . (i386, x86_64, arm)\n"); -} - -int main(int argc, char *argv[]) -{ - size_t nFileSize; - char *pszSource, *pszDefFileName = 0, *pszStubFileName = 0, *pszLibStubName = 0; - char achDllName[40]; - FILE *file; - int result, i; - - if (argc < 2) - { - usage(); - return -1; - } - - /* Read options */ - for (i = 1; i < argc && *argv[i] == '-'; i++) - { - if ((strcasecmp(argv[i], "--help") == 0) || - (strcasecmp(argv[i], "-h") == 0)) - { - usage(); - return 0; - } - else if (argv[i][1] == 'd' && argv[i][2] == '=') - { - pszDefFileName = argv[i] + 3; - } - else if (argv[i][1] == 'l' && argv[i][2] == '=') - { - pszLibStubName = argv[i] + 3; - } - else if (argv[i][1] == 's' && argv[i][2] == '=') - { - pszStubFileName = argv[i] + 3; - } - else if (argv[i][1] == 'n' && argv[i][2] == '=') - { - pszDllName = argv[i] + 3; - } - else if ((strcasecmp(argv[i], "--implib") == 0)) - { - no_redirections = 1; - gbImportLib = 1; - } - else if ((strcasecmp(argv[i], "--kill-at") == 0)) - { - gbKillAt = 1; - } - else if ((strcasecmp(argv[i], "--ms") == 0)) - { - gbMSComp = 1; - } - else if ((strcasecmp(argv[i], "-r") == 0)) - { - no_redirections = 1; - } - else if (argv[i][1] == 'a' && argv[i][2] == '=') - { - pszArchString = argv[i] + 3; - } - else - { - fprintf(stderr, "Unrecognized option: %s\n", argv[i]); - return -1; - } - } - - if (strcasecmp(pszArchString, "i386") == 0) - { - giArch = ARCH_X86; - gpszUnderscore = "_"; - } - else if (strcasecmp(pszArchString, "x86_64") == 0) giArch = ARCH_AMD64; - else if (strcasecmp(pszArchString, "ia64") == 0) giArch = ARCH_IA64; - else if (strcasecmp(pszArchString, "arm") == 0) giArch = ARCH_ARM; - else if (strcasecmp(pszArchString, "ppc") == 0) giArch = ARCH_PPC; - - if ((giArch == ARCH_AMD64) || (giArch == ARCH_IA64)) - { - pszArchString2 = "win64"; - } - else - pszArchString2 = "win32"; - - /* Set a default dll name */ - if (!pszDllName) - { - char *p1, *p2; - size_t len; - - p1 = strrchr(argv[i], '\\'); - if (!p1) p1 = strrchr(argv[i], '/'); - p2 = p1 = p1 ? p1 + 1 : argv[i]; - - /* walk up to '.' */ - while (*p2 != '.' && *p2 != 0) p2++; - len = p2 - p1; - if (len >= sizeof(achDllName) - 5) - { - fprintf(stderr, "name too long: %s\n", p1); - return -2; - } - - strncpy(achDllName, p1, len); - strncpy(achDllName + len, ".dll", sizeof(achDllName) - len); - pszDllName = achDllName; - } - - /* Open input file argv[1] */ - file = fopen(argv[i], "r"); - if (!file) - { - fprintf(stderr, "error: could not open file %s ", argv[i]); - return -3; - } - - /* Get file size */ - fseek(file, 0, SEEK_END); - nFileSize = ftell(file); - rewind(file); - - /* Allocate memory buffer */ - pszSource = malloc(nFileSize + 1); - if (!pszSource) - { - fclose(file); - return -4; - } - - /* Load input file into memory */ - nFileSize = fread(pszSource, 1, nFileSize, file); - fclose(file); - - /* Zero terminate the source */ - pszSource[nFileSize] = '\0'; - - if (pszDefFileName) - { - /* Open output file */ - file = fopen(pszDefFileName, "w"); - if (!file) - { - fprintf(stderr, "error: could not open output file %s ", argv[i + 1]); - return -5; - } - - OutputHeader_def(file, pszDllName); - result = ParseFile(pszSource, file, OutputLine_def); - fclose(file); - } - - if (pszStubFileName) - { - /* Open output file */ - file = fopen(pszStubFileName, "w"); - if (!file) - { - fprintf(stderr, "error: could not open output file %s ", argv[i + 1]); - return -5; - } - - OutputHeader_stub(file); - result = ParseFile(pszSource, file, OutputLine_stub); - fclose(file); - } - - if (pszLibStubName) - { - /* Open output file */ - file = fopen(pszLibStubName, "w"); - if (!file) - { - fprintf(stderr, "error: could not open output file %s ", argv[i + 1]); - return -5; - } - - OutputHeader_asmstub(file, pszDllName); - result = ParseFile(pszSource, file, OutputLine_asmstub); - fprintf(file, "\nEND\n"); - fclose(file); - } - - - return result; -} diff --git a/reactos/tools/ssprintf.cpp b/reactos/tools/ssprintf.cpp deleted file mode 100644 index 6ddf195a4b3..00000000000 --- a/reactos/tools/ssprintf.cpp +++ /dev/null @@ -1,1969 +0,0 @@ -/* - * 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. - */ - -// For character conversion functions like "wctomb" and "alloca" under Unix -#include - -#if defined(WIN32) - // Under Win32 hosts, "alloca" is not defined by stdlib.h, but by malloc.h - // On the other hand, malloc.h is deprecated under some Unix hosts, so only include it for Win32 hosts. - #include -#endif - -#include -#include -#include -#include -#include "ssprintf.h" - -#ifndef WIN32 -#define _finite __finite -#define _isnan __isnan -#endif - -#ifndef __APPLE__ -inline int iswdigit ( wchar_t c ) -{ - return ( c >= L'0' && c <= L'9' ); -} -#endif - -#if defined(__sun__) -#include -#include -#endif - -#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__sun__) || defined(__CYGWIN__) -# define __isnan isnan -# define __finite finite -# define powl __builtin_powl -# define modfl __builtin_modfl -#endif // _FreeBSD__ - -#ifdef _MSC_VER -#define alloca _alloca -#endif//_MSC_VER - -#ifdef _MSC_VER -typedef __int64 LONGLONG; -typedef unsigned __int64 ULONGLONG; -#else -typedef long long LONGLONG; -typedef unsigned long long ULONGLONG; -#endif - -typedef struct { - unsigned int mantissa:23; - unsigned int exponent:8; - unsigned int sign:1; -} ieee_float_t; - -typedef struct { - unsigned int mantissal:32; - unsigned int mantissah:20; - unsigned int exponent:11; - unsigned int sign:1; -} ieee_double_t; - -typedef struct { - unsigned int mantissal:32; - unsigned int mantissah:32; - unsigned int exponent:15; - unsigned int sign:1; - unsigned int empty:16; -} ieee_long_double_t; - -std::string -ssprintf ( const char* fmt, ... ) -{ - va_list arg; - va_start(arg, fmt); - std::string f = ssvprintf ( fmt, arg ); - va_end(arg); - return f; -} - -std::wstring -sswprintf ( const wchar_t* fmt, ... ) -{ - va_list arg; - va_start(arg, fmt); - std::wstring f = sswvprintf ( fmt, arg ); - va_end(arg); - return f; -} - -#define ZEROPAD 1 /* pad with zero */ -#define SIGN 2 /* unsigned/signed long */ -#define PLUS 4 /* show plus */ -#define SPACE 8 /* space if plus */ -#define LEFT 16 /* left justified */ -#define SPECIAL 32 /* 0x */ -#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */ -#define ZEROTRUNC 128 /* truncate zero 's */ - - -static int -skip_atoi(const char **s) -{ - int i=0; - - while (isdigit(**s)) - i = i*10 + *((*s)++) - '0'; - return i; -} - -static int -skip_wtoi(const wchar_t **s) -{ - int i=0; - - while (iswdigit(**s)) - i = i*10 + *((*s)++) - L'0'; - return i; -} - - -static int -do_div(LONGLONG *n,int base) -{ - int __res = ((ULONGLONG) *n) % (unsigned) base; - *n = ((ULONGLONG) *n) / (unsigned) base; - return __res; -} - - -static bool -number(std::string& f, LONGLONG num, int base, int size, int precision ,int type) -{ - char c,sign,tmp[66]; - const char *digits="0123456789abcdefghijklmnopqrstuvwxyz"; - int i; - - if (type & LARGE) - digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - if (type & LEFT) - type &= ~ZEROPAD; - if (base < 2 || base > 36) - return false; - c = (type & ZEROPAD) ? '0' : ' '; - sign = 0; - if (type & SIGN) { - if (num < 0) { - sign = '-'; - num = -num; - size--; - } else if (type & PLUS) { - sign = '+'; - size--; - } else if (type & SPACE) { - sign = ' '; - size--; - } - } - if (type & SPECIAL) { - if (base == 16) - size -= 2; - else if (base == 8) - size--; - } - i = 0; - if (num == 0) - tmp[i++]='0'; - else while (num != 0) - tmp[i++] = digits[do_div(&num,base)]; - if (i > precision) - precision = i; - size -= precision; - if (!(type&(ZEROPAD+LEFT))) - while(size-->0) - f += ' '; - if (sign) - f += sign; - if (type & SPECIAL) - { - if (base==8) - f += '0'; - else if (base==16) - { - f += '0'; - f += digits[33]; - } - } - if (!(type & LEFT)) - { - while (size-- > 0) - f += c; - } - while (i < precision--) - { - f += '0'; - } - while (i-- > 0) - { - f += tmp[i]; - } - while (size-- > 0) - { - f += ' '; - } - return true; -} - -static bool -wnumber(std::wstring& f, LONGLONG num, int base, int size, int precision ,int type) -{ - wchar_t c,sign,tmp[66]; - const wchar_t *digits = L"0123456789abcdefghijklmnopqrstuvwxyz"; - int i; - - if (type & LARGE) - digits = L"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - if (type & LEFT) - type &= ~ZEROPAD; - if (base < 2 || base > 36) - return 0; - c = (type & ZEROPAD) ? L'0' : L' '; - sign = false; - if (type & SIGN) { - if (num < 0) { - sign = L'-'; - num = -num; - size--; - } else if (type & PLUS) { - sign = L'+'; - size--; - } else if (type & SPACE) { - sign = L' '; - size--; - } - } - if (type & SPECIAL) { - if (base == 16) - size -= 2; - else if (base == 8) - size--; - } - i = 0; - if (num == 0) - tmp[i++]=L'0'; - else while (num != 0) - tmp[i++] = digits[do_div(&num,base)]; - if (i > precision) - precision = i; - size -= precision; - if (!(type&(ZEROPAD+LEFT))) - while(size-->0) - f += L' '; - if (sign) - f += sign; - if (type & SPECIAL) - { - if (base==8) - f += L'0'; - else if (base==16) - { - f += L'0'; - f += digits[33]; - } - } - if (!(type & LEFT)) - { - while (size-- > 0) - f += c; - } - while (i < precision--) - { - f += L'0'; - } - while (i-- > 0) - { - f += tmp[i]; - } - while (size-- > 0) - { - f += L' '; - } - return true; -} - - -static bool -numberf(std::string& f, double __n, char exp_sign, int size, int precision, int type) -{ - double exponent = 0.0; - double e; - long ie; - - int i = 0; - int j = 0; - int ro = 0; - - double frac, intr; - double p; - char *buf, *tmp, sign, c; - int result; - - union - { - double* __n; - ieee_double_t* n; - } n; - - n.__n = &__n; - - if ( exp_sign == 'g' || exp_sign == 'G' || exp_sign == 'e' || exp_sign == 'E' ) - { - ie = ((unsigned int)n.n->exponent - (unsigned int)0x3ff); - exponent = ie/3.321928; - } - - if ( exp_sign == 'g' || exp_sign == 'G' ) - { - type |= ZEROTRUNC; - if ( exponent < -4 || fabs(exponent) >= precision ) - exp_sign -= 2; // g -> e and G -> E - else - exp_sign = 'f'; - } - - if ( exp_sign == 'e' || exp_sign == 'E' ) - { - frac = modf(exponent,&e); - if ( frac > 0.5 ) - e++; - else if ( frac < -0.5 ) - e--; - - result = numberf(f,__n/pow(10.0L,(long double)e),'f',size-4, precision, type); - if (result < 0) - return false; - f += exp_sign; - size--; - ie = (long)e; - type = LEFT | PLUS; - if ( ie < 0 ) - type |= SIGN; - - result = number(f,ie, 10,2, 2,type ); - if (result < 0) - return false; - return true; - } - - if ( exp_sign == 'f' ) - { - buf = (char*)alloca(4096); - if (type & LEFT) - type &= ~ZEROPAD; - - c = (type & ZEROPAD) ? '0' : ' '; - sign = 0; - if (type & SIGN) - { - if (__n < 0) - { - sign = '-'; - __n = fabs(__n); - size--; - } - else if (type & PLUS) - { - sign = '+'; - size--; - } - else if (type & SPACE) - { - sign = ' '; - size--; - } - } - - frac = modf(__n,&intr); - - // # flags forces a . and prevents trucation of trailing zero's - if ( precision > 0 ) - { - i = precision-1; - while ( i >= 0 ) - { - frac*=10.0L; - frac = modf(frac, &p); - buf[i] = (int)p + '0'; - i--; - } - i = precision; - size -= precision; - - ro = 0; - if ( frac > 0.5 ) - ro = 1; - - if ( precision >= 1 || type & SPECIAL) - { - buf[i++] = '.'; - size--; - } - } - - if ( intr == 0.0 ) - { - buf[i++] = '0'; - size--; - } - else - { - while ( intr > 0.0 ) - { - p = intr; - intr/=10.0L; - modf(intr, &intr); - - p -= 10.0*intr; - - buf[i++] = (int)p + '0'; - size--; - } - } - - j = 0; - while ( j < i && ro == 1) - { - if ( buf[j] >= '0' && buf[j] <= '8' ) - { - buf[j]++; - ro = 0; - } - else if ( buf[j] == '9' ) - { - buf[j] = '0'; - } - j++; - } - if ( ro == 1 ) - buf[i++] = '1'; - - buf[i] = 0; - - if (!(type&(ZEROPAD+LEFT))) - { - while(size-->0) - f += ' '; - } - if (sign) - { - f += sign; - } - - if (!(type&(ZEROPAD+LEFT))) - { - while(size-->0) - f += ' '; - } - - if (!(type & LEFT)) - { - while (size-- > 0) - f += c; - } - - tmp = buf; - if ( type & ZEROTRUNC && ((type & SPECIAL) != SPECIAL) ) - { - j = 0; - while ( j < i && ( *tmp == '0' || *tmp == '.' )) - { - tmp++; - i--; - } - } - while (i-- > 0) - { - f += tmp[i]; - } - while (size-- > 0) - { - f += ' '; - } - } - return true; -} - -static bool -wnumberf(std::wstring& f, double __n, wchar_t exp_sign, int size, int precision, int type) -{ - double exponent = 0.0; - double e; - long ie; - - int i = 0; - int j = 0; - int ro = 0; - - double frac, intr; - double p; - wchar_t *buf, *tmp, sign, c; - int result; - - union - { - double* __n; - ieee_double_t* n; - } n; - - n.__n = &__n; - - if ( exp_sign == L'g' || exp_sign == L'G' || exp_sign == L'e' || exp_sign == L'E' ) - { - ie = ((unsigned int)n.n->exponent - (unsigned int)0x3ff); - exponent = ie/3.321928; - } - - if ( exp_sign == L'g' || exp_sign == L'G' ) - { - type |= ZEROTRUNC; - if ( exponent < -4 || fabs(exponent) >= precision ) - exp_sign -= 2; // g -> e and G -> E - else - exp_sign = L'f'; - } - - if ( exp_sign == L'e' || exp_sign == L'E' ) - { - frac = modf(exponent,&e); - if ( frac > 0.5 ) - e++; - else if ( frac < -0.5 ) - e--; - - result = wnumberf(f,__n/pow(10.0L,(long double) e),L'f',size-4, precision, type); - if (result < 0) - return false; - f += exp_sign; - size--; - ie = (long)e; - type = LEFT | PLUS; - if ( ie < 0 ) - type |= SIGN; - - result = wnumber(f,ie, 10,2, 2,type ); - if (result < 0) - return false; - return true; - } - - if ( exp_sign == L'f' ) - { - buf = (wchar_t*)alloca(4096*sizeof(wchar_t)); - if (type & LEFT) - type &= ~ZEROPAD; - - c = (type & ZEROPAD) ? L'0' : L' '; - sign = 0; - if (type & SIGN) - { - if (__n < 0) - { - sign = L'-'; - __n = fabs(__n); - size--; - } - else if (type & PLUS) - { - sign = L'+'; - size--; - } - else if (type & SPACE) - { - sign = L' '; - size--; - } - } - - frac = modf(__n,&intr); - - // # flags forces a . and prevents trucation of trailing zero's - if ( precision > 0 ) - { - i = precision-1; - while ( i >= 0 ) - { - frac*=10.0L; - frac = modf(frac, &p); - buf[i] = (int)p + L'0'; - i--; - } - i = precision; - size -= precision; - - ro = 0; - if ( frac > 0.5 ) - ro = 1; - - if ( precision >= 1 || type & SPECIAL) - { - buf[i++] = L'.'; - size--; - } - } - - if ( intr == 0.0 ) - { - buf[i++] = L'0'; - size--; - } - else - { - while ( intr > 0.0 ) - { - p = intr; - intr/=10.0L; - modf(intr, &intr); - - p -= 10.0*intr; - - buf[i++] = (int)p + L'0'; - size--; - } - } - - j = 0; - while ( j < i && ro == 1) - { - if ( buf[j] >= L'0' && buf[j] <= L'8' ) - { - buf[j]++; - ro = 0; - } - else if ( buf[j] == L'9' ) - { - buf[j] = L'0'; - } - j++; - } - if ( ro == 1 ) - buf[i++] = L'1'; - - buf[i] = 0; - - if (!(type&(ZEROPAD+LEFT))) - { - while(size-->0) - f += L' '; - } - if (sign) - { - f += sign; - } - - if (!(type&(ZEROPAD+LEFT))) - { - while(size-->0) - f += L' '; - } - - if (!(type & LEFT)) - { - while (size-- > 0) - f += c; - } - - tmp = buf; - if ( type & ZEROTRUNC && ((type & SPECIAL) != SPECIAL) ) - { - j = 0; - while ( j < i && ( *tmp == L'0' || *tmp == L'.' )) - { - tmp++; - i--; - } - } - while (i-- > 0) - { - f += tmp[i]; - } - while (size-- > 0) - { - f += L' '; - } - } - return true; -} - -static bool -numberfl(std::string& f, long double __n, char exp_sign, int size, int precision, int type) -{ - long double exponent = 0.0; - long double e; - long ie; - - int i = 0; - int j = 0; - int ro = 0; - - long double frac, intr; - long double p; - char *buf, *tmp, sign, c; - int result; - - union - { - long double* __n; - ieee_long_double_t* n; - } n; - - n.__n = &__n; - - if ( exp_sign == 'g' || exp_sign == 'G' || exp_sign == 'e' || exp_sign == 'E' ) - { - ie = ((unsigned int)n.n->exponent - (unsigned int)0x3fff); - exponent = ie/3.321928; - } - - if ( exp_sign == 'g' || exp_sign == 'G' ) - { - type |= ZEROTRUNC; - if ( exponent < -4 || fabs(exponent) >= precision ) - exp_sign -= 2; // g -> e and G -> E - else - exp_sign = 'f'; - } - - if ( exp_sign == 'e' || exp_sign == 'E' ) - { - frac = modfl(exponent,&e); - if ( frac > 0.5 ) - e++; - else if ( frac < -0.5 ) - e--; - - result = numberf(f,__n/powl(10.0L,e),'f',size-4, precision, type); - if (result < 0) - return false; - f += exp_sign; - size--; - ie = (long)e; - type = LEFT | PLUS; - if ( ie < 0 ) - type |= SIGN; - - result = number(f,ie, 10,2, 2,type ); - if (result < 0) - return false; - return true; - } - - if ( exp_sign == 'f' ) - { - buf = (char*)alloca(4096); - if (type & LEFT) - type &= ~ZEROPAD; - - c = (type & ZEROPAD) ? '0' : ' '; - sign = 0; - if (type & SIGN) - { - if (__n < 0) - { - sign = '-'; - __n = fabs(__n); - size--; - } - else if (type & PLUS) - { - sign = '+'; - size--; - } - else if (type & SPACE) - { - sign = ' '; - size--; - } - } - - frac = modfl(__n,&intr); - - // # flags forces a . and prevents trucation of trailing zero's - if ( precision > 0 ) - { - i = precision-1; - while ( i >= 0 ) - { - frac*=10.0L; - frac = modfl((long double)frac, &p); - buf[i] = (int)p + '0'; - i--; - } - i = precision; - size -= precision; - - ro = 0; - if ( frac > 0.5 ) - ro = 1; - - if ( precision >= 1 || type & SPECIAL) - { - buf[i++] = '.'; - size--; - } - } - - if ( intr == 0.0 ) - { - buf[i++] = '0'; - size--; - } - else - { - while ( intr > 0.0 ) - { - p = intr; - intr/=10.0L; - modfl(intr, &intr); - - p -= 10.0L*intr; - - buf[i++] = (int)p + '0'; - size--; - } - } - - j = 0; - while ( j < i && ro == 1) - { - if ( buf[j] >= '0' && buf[j] <= '8' ) - { - buf[j]++; - ro = 0; - } - else if ( buf[j] == '9' ) - { - buf[j] = '0'; - } - j++; - } - if ( ro == 1 ) - buf[i++] = '1'; - - buf[i] = 0; - - if (!(type&(ZEROPAD+LEFT))) - { - while(size-->0) - f += ' '; - } - if (sign) - { - f += sign; - } - - if (!(type&(ZEROPAD+LEFT))) - { - while(size-->0) - f += ' '; - } - - if (!(type & LEFT)) - { - while (size-- > 0) - f += c; - } - - tmp = buf; - if ( type & ZEROTRUNC && ((type & SPECIAL) != SPECIAL) ) - { - j = 0; - while ( j < i && ( *tmp == '0' || *tmp == '.' )) - { - tmp++; - i--; - } - } - while (i-- > 0) - { - f += tmp[i]; - } - while (size-- > 0) - { - f += ' '; - } - } - return true; -} - -static bool -wnumberfl(std::wstring& f, long double __n, wchar_t exp_sign, int size, int precision, int type) -{ - long double exponent = 0.0; - long double e; - long ie; - - int i = 0; - int j = 0; - int ro = 0; - - long double frac, intr; - long double p; - wchar_t *buf, *tmp, sign, c; - int result; - - union - { - long double* __n; - ieee_long_double_t* n; - } n; - - n.__n = &__n; - - if ( exp_sign == L'g' || exp_sign == L'G' || exp_sign == L'e' || exp_sign == L'E' ) - { - ie = ((unsigned int)n.n->exponent - (unsigned int)0x3fff); - exponent = ie/3.321928; - } - - if ( exp_sign == L'g' || exp_sign == L'G' ) - { - type |= ZEROTRUNC; - if ( exponent < -4 || fabs(exponent) >= precision ) - exp_sign -= 2; // g -> e and G -> E - else - exp_sign = 'f'; - } - - if ( exp_sign == L'e' || exp_sign == L'E' ) - { - frac = modfl(exponent,&e); - if ( frac > 0.5 ) - e++; - else if ( frac < -0.5 ) - e--; - - result = wnumberf(f,__n/powl(10.0L,e),L'f',size-4, precision, type); - if (result < 0) - return false; - f += exp_sign; - size--; - ie = (long)e; - type = LEFT | PLUS; - if ( ie < 0 ) - type |= SIGN; - - result = wnumber(f,ie, 10,2, 2,type ); - if (result < 0) - return false; - return true; - } - - if ( exp_sign == L'f' ) - { - buf = (wchar_t*)alloca(4096*sizeof(wchar_t)); - if (type & LEFT) - type &= ~ZEROPAD; - - c = (type & ZEROPAD) ? L'0' : L' '; - sign = 0; - if (type & SIGN) - { - if (__n < 0) - { - sign = L'-'; - __n = fabs(__n); - size--; - } - else if (type & PLUS) - { - sign = L'+'; - size--; - } - else if (type & SPACE) - { - sign = L' '; - size--; - } - } - - frac = modfl(__n,&intr); - - // # flags forces a . and prevents trucation of trailing zero's - if ( precision > 0 ) - { - i = precision-1; - while ( i >= 0 ) - { - frac*=10.0L; - frac = modfl((long double)frac, &p); - buf[i] = (int)p + L'0'; - i--; - } - i = precision; - size -= precision; - - ro = 0; - if ( frac > 0.5 ) - ro = 1; - - if ( precision >= 1 || type & SPECIAL) - { - buf[i++] = L'.'; - size--; - } - } - - if ( intr == 0.0 ) - { - buf[i++] = L'0'; - size--; - } - else - { - while ( intr > 0.0 ) - { - p = intr; - intr/=10.0L; - modfl(intr, &intr); - - p -= 10.0L*intr; - - buf[i++] = (int)p + L'0'; - size--; - } - } - - j = 0; - while ( j < i && ro == 1) - { - if ( buf[j] >= L'0' && buf[j] <= L'8' ) - { - buf[j]++; - ro = 0; - } - else if ( buf[j] == L'9' ) - { - buf[j] = L'0'; - } - j++; - } - if ( ro == 1 ) - buf[i++] = L'1'; - - buf[i] = 0; - - if (!(type&(ZEROPAD+LEFT))) - { - while(size-->0) - f += L' '; - } - if (sign) - { - f += sign; - } - - if (!(type&(ZEROPAD+LEFT))) - { - while(size-->0) - f += L' '; - } - - if (!(type & LEFT)) - { - while (size-- > 0) - f += c; - } - - tmp = buf; - if ( type & ZEROTRUNC && ((type & SPECIAL) != SPECIAL) ) - { - j = 0; - while ( j < i && ( *tmp == L'0' || *tmp == L'.' )) - { - tmp++; - i--; - } - } - while (i-- > 0) - { - f += tmp[i]; - } - while (size-- > 0) - { - f += L' '; - } - } - return true; -} - -static int -do_string(std::string& f, const char* s, int len, int field_width, int precision, int flags) -{ - int i, done = 0; - if (s == NULL) - { - s = ""; - len = 6; - } - else - { - if (len == -1) - { - len = 0; - while ((unsigned int)len < (unsigned int)precision && s[len]) - len++; - } - else - { - if ((unsigned int)len > (unsigned int)precision) - len = precision; - } - } - if (!(flags & LEFT)) - while (len < field_width--) - { - f += ' '; - done++; - } - for (i = 0; i < len; ++i) - { - f += *s++; - done++; - } - while (len < field_width--) - { - f += ' '; - done++; - } - return done; -} - -static int -do_wstring(std::wstring& f, const wchar_t* s, int len, int field_width, int precision, int flags) -{ - int i, done = 0; - if (s == NULL) - { - s = L""; - len = 6; - } - else - { - if (len == -1) - { - len = 0; - while ((unsigned int)len < (unsigned int)precision && s[len]) - len++; - } - else - { - if ((unsigned int)len > (unsigned int)precision) - len = precision; - } - } - if (!(flags & LEFT)) - while (len < field_width--) - { - f += L' '; - done++; - } - for (i = 0; i < len; ++i) - { - f += *s++; - done++; - } - while (len < field_width--) - { - f += L' '; - done++; - } - return done; -} - -static int -stringw(std::string& f, const wchar_t* sw, int len, int field_width, int precision, int flags) -{ - int i, done = 0; - if (sw == NULL) - { - sw = L""; - len = 6; - } - else - { - if (len == -1) - { - len = 0; - while ((unsigned int)len < (unsigned int)precision && sw[len]) - len++; - } - else - { - if ((unsigned int)len > (unsigned int)precision) - len = precision; - } - } - if (!(flags & LEFT)) - while (len < field_width--) - { - f += ' '; - done++; - } - for (i = 0; i < len; ++i) - { -#define MY_MB_CUR_MAX 1 - char mb[MY_MB_CUR_MAX]; - int mbcount, j; - mbcount = wctomb(mb, *sw++); - if (mbcount <= 0) - { - break; - } - for (j = 0; j < mbcount; j++) - { - f += mb[j]; - done++; - } - } - while (len < field_width--) - { - f += ' '; - done++; - } - return done; -} - -static int -wstringa(std::wstring& f, const char* sa, int len, int field_width, int precision, int flags) -{ - int i, done = 0; - if (sa == NULL) - { - sa = ""; - len = 6; - } - else - { - if (len == -1) - { - len = 0; - while ((unsigned int)len < (unsigned int)precision && sa[len]) - len++; - } - else - { - if ((unsigned int)len > (unsigned int)precision) - len = precision; - } - } - if (!(flags & LEFT)) - while (len < field_width--) - { - f += L' '; - done++; - } - for (i = 0; i < len;) - { - wchar_t w; - int mbcount; - mbcount = mbtowc(&w, sa+i, len-i); - if (mbcount <= 0) - break; - f += w; - done++; - i += mbcount; - } - while (len < field_width--) - { - f += L' '; - done++; - } - return done; -} - -#define _isnanl _isnan -#define _finitel _finite - -std::string -ssvprintf ( const char *fmt, va_list args ) -{ - ULONGLONG num; - int base; - long double _ldouble; - double _double; - const char *s; - const wchar_t* sw; - int result; - std::string f; - - int flags; /* flags to number() */ - - int field_width; /* width of output field */ - int precision; /* min. # of digits for integers; max - number of chars for from string */ - int qualifier = 0; /* 'h', 'l', 'L' or 'I64' for integer fields */ - - for (; *fmt ; ++fmt) - { - if (*fmt != '%') - { - f += *fmt; - continue; - } - - /* process flags */ - flags = 0; - repeat: - ++fmt; /* this also skips first '%' */ - switch (*fmt) { - case '-': flags |= LEFT; goto repeat; - case '+': flags |= PLUS; goto repeat; - case ' ': flags |= SPACE; goto repeat; - case '#': flags |= SPECIAL; goto repeat; - case '0': flags |= ZEROPAD; goto repeat; - } - - /* get field width */ - field_width = -1; - if (isdigit(*fmt)) - field_width = skip_atoi(&fmt); - else if (*fmt == '*') { - ++fmt; - /* it's the next argument */ - field_width = va_arg(args, int); - if (field_width < 0) { - field_width = -field_width; - flags |= LEFT; - } - } - - /* get the precision */ - precision = -1; - if (*fmt == '.') { - ++fmt; - if (isdigit(*fmt)) - precision = skip_atoi(&fmt); - else if (*fmt == '*') { - ++fmt; - /* it's the next argument */ - precision = va_arg(args, int); - } - if (precision < 0) - precision = 0; - } - - /* get the conversion qualifier */ - qualifier = 0; - // %Z can be just stand alone or as size_t qualifier - if ( *fmt == 'Z' ) { - qualifier = *fmt; - switch ( *(fmt+1)) { - case 'o': - case 'b': - case 'X': - case 'x': - case 'd': - case 'i': - case 'u': - ++fmt; - break; - default: - break; - } - } else if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || *fmt == 'w') { - qualifier = *fmt; - ++fmt; - } else if (*fmt == 'I' && *(fmt+1) == '6' && *(fmt+2) == '4') { - qualifier = *fmt; - fmt += 3; - } - - // go fine with ll instead of L - if ( *fmt == 'l' ) { - ++fmt; - qualifier = 'L'; - } - - /* default base */ - base = 10; - - switch (*fmt) { - case 'c': - if (!(flags & LEFT)) - while (--field_width > 0) - { - f += ' '; - } - if (qualifier == 'l' || qualifier == 'w') - { - f += (char)(unsigned char)(wchar_t) va_arg(args,int); - } - else - { - f += (char)(unsigned char) va_arg(args,int); - } - while (--field_width > 0) - { - f += ' '; - } - continue; - - case 'C': - if (!(flags & LEFT)) - while (--field_width > 0) - { - f += ' '; - } - if (qualifier == 'h') - { - f += (char)(unsigned char) va_arg(args,int); - } - else - { - f += (char)(unsigned char)(wchar_t) va_arg(args,int); - } - while (--field_width > 0) - { - f += ' '; - } - continue; - - case 's': - if (qualifier == 'l' || qualifier == 'w') { - /* print unicode string */ - sw = va_arg(args, wchar_t *); - result = stringw(f, sw, -1, field_width, precision, flags); - } else { - /* print ascii string */ - s = va_arg(args, char *); - result = do_string(f, s, -1, field_width, precision, flags); - } - if (result < 0) - { - assert(!"TODO FIXME handle error better"); - return f; - } - continue; - - case 'S': - if (qualifier == 'h') { - /* print ascii string */ - s = va_arg(args, char *); - result = do_string(f, s, -1, field_width, precision, flags); - } else { - /* print unicode string */ - sw = va_arg(args, wchar_t *); - result = stringw(f, sw, -1, field_width, precision, flags); - } - if (result < 0) - { - assert(!"TODO FIXME handle error better"); - return f; - } - continue; - - /*case 'Z': - if (qualifier == 'w') { - // print counted unicode string - PUNICODE_STRING pus = va_arg(args, PUNICODE_STRING); - if ((pus == NULL) || (pus->Buffer == NULL)) { - sw = NULL; - len = -1; - } else { - sw = pus->Buffer; - len = pus->Length / sizeof(WCHAR); - } - result = stringw(f, sw, len, field_width, precision, flags); - } else { - // print counted ascii string - PANSI_STRING pas = va_arg(args, PANSI_STRING); - if ((pas == NULL) || (pas->Buffer == NULL)) { - s = NULL; - len = -1; - } else { - s = pas->Buffer; - len = pas->Length; - } - result = string(f, s, -1, field_width, precision, flags); - } - if (result < 0) - return -1; - continue;*/ - - case 'e': - case 'E': - case 'f': - case 'g': - case 'G': - if (qualifier == 'l' || qualifier == 'L' ) { - _ldouble = va_arg(args, long double); - - if ( _isnanl(_ldouble) ) - { - f += "Nan"; - } - else if ( !_finitel(_ldouble) ) - { - if ( _ldouble < 0 ) - f += "-Inf"; - else - f += "+Inf"; - } else { - if ( precision == -1 ) - precision = 6; - result = numberfl(f,_ldouble,*fmt,field_width,precision,flags); - if (result < 0) - { - assert(!"TODO FIXME handle error better"); - return f; - } - } - } else { - _double = (double)va_arg(args, double); - - if ( _isnan(_double) ) - { - f += "Nan"; - } - else if ( !_finite(_double) ) - { - if ( _double < 0 ) - f += "-Inf"; - else - f += "+Inf"; - } - else - { - if ( precision == -1 ) - precision = 6; - result = numberf(f,_double,*fmt,field_width,precision,flags); - if (result < 0) - { - assert(!"TODO FIXME handle error better"); - return f; - } - } - } - continue; - - case 'p': - if (field_width == -1) { - field_width = 2*sizeof(void *); - flags |= ZEROPAD; - } - result = number(f, - (size_t) va_arg(args, void *), 16, - field_width, precision, flags); - if (result < 0) - { - assert(!"TODO FIXME handle error better"); - return f; - } - continue; - - case 'n': - if (qualifier == 'l') { - long * ip = va_arg(args, long *); - *ip = 0; - } else { - int * ip = va_arg(args, int *); - *ip = 0; - } - continue; - - /* integer number formats - set up the flags and "break" */ - case 'o': - base = 8; - break; - - case 'b': - base = 2; - break; - - case 'X': - flags |= LARGE; - case 'x': - base = 16; - break; - - case 'd': - case 'i': - flags |= SIGN; - case 'u': - break; - - default: - if (*fmt != '%') - { - f += '%'; - } - if (*fmt) - { - f += *fmt; - } - else - --fmt; - continue; - } - - if (qualifier == 'I') - num = va_arg(args, ULONGLONG); - else if (qualifier == 'l') { - if (flags & SIGN) - num = va_arg(args, long); - else - num = va_arg(args, unsigned long); - } - else if (qualifier == 'h') { - if (flags & SIGN) - num = va_arg(args, int); - else - num = va_arg(args, unsigned int); - } - else if (flags & SIGN) - num = va_arg(args, int); - else - num = va_arg(args, unsigned int); - result = number(f, num, base, field_width, precision, flags); - if (result < 0) - { - assert(!"TODO FIXME handle error better"); - return f; - } - } - //putc('\0',f); - return f; -} - -std::wstring -sswvprintf ( const wchar_t* fmt, va_list args ) -{ - ULONGLONG num; - int base; - long double _ldouble; - double _double; - const wchar_t* s; - const char* sa; - int result; - std::wstring f; - - int flags; /* flags to number() */ - - int field_width; /* width of output field */ - int precision; /* min. # of digits for integers; max - number of chars for from string */ - int qualifier = 0; /* 'h', 'l', 'L' or 'I64' for integer fields */ - - for (; *fmt ; ++fmt) - { - if (*fmt != L'%') - { - f += *fmt; - continue; - } - - /* process flags */ - flags = 0; - repeat: - ++fmt; /* this also skips first '%' */ - switch (*fmt) { - case L'-': flags |= LEFT; goto repeat; - case L'+': flags |= PLUS; goto repeat; - case L' ': flags |= SPACE; goto repeat; - case L'#': flags |= SPECIAL; goto repeat; - case L'0': flags |= ZEROPAD; goto repeat; - } - - /* get field width */ - field_width = -1; - if (isdigit(*fmt)) - field_width = skip_wtoi(&fmt); - else if (*fmt == L'*') { - ++fmt; - /* it's the next argument */ - field_width = va_arg(args, int); - if (field_width < 0) { - field_width = -field_width; - flags |= LEFT; - } - } - - /* get the precision */ - precision = -1; - if (*fmt == L'.') { - ++fmt; - if (iswdigit(*fmt)) - precision = skip_wtoi(&fmt); - else if (*fmt == L'*') { - ++fmt; - /* it's the next argument */ - precision = va_arg(args, int); - } - if (precision < 0) - precision = 0; - } - - /* get the conversion qualifier */ - qualifier = 0; - // %Z can be just stand alone or as size_t qualifier - if ( *fmt == L'Z' ) { - qualifier = *fmt; - switch ( *(fmt+1)) { - case L'o': - case L'b': - case L'X': - case L'x': - case L'd': - case L'i': - case L'u': - ++fmt; - break; - default: - break; - } - } else if (*fmt == L'h' || *fmt == L'l' || *fmt == L'L' || *fmt == L'w') { - qualifier = *fmt; - ++fmt; - } else if (*fmt == L'I' && *(fmt+1) == L'6' && *(fmt+2) == L'4') { - qualifier = *fmt; - fmt += 3; - } - - // go fine with ll instead of L - if ( *fmt == L'l' ) { - ++fmt; - qualifier = L'L'; - } - - /* default base */ - base = 10; - - switch (*fmt) { - case L'c': - if (!(flags & LEFT)) - while (--field_width > 0) - { - f += L' '; - } - if ( qualifier == L'h' ) - { - f += (wchar_t)(char)(unsigned char) va_arg(args,int); - } - else - { - f += (wchar_t) va_arg(args,int); - } - while (--field_width > 0) - { - f += ' '; - } - continue; - - case 'C': - if (!(flags & LEFT)) - while (--field_width > 0) - { - f += L' '; - } - if (qualifier == L'l' || qualifier == L'w') - { - f += (wchar_t) va_arg(args,int); - } - else - { - f += (wchar_t)(char)(unsigned char) va_arg(args,int); - } - while (--field_width > 0) - { - f += L' '; - } - continue; - - case 's': - if (qualifier == L'h') { - /* print ascii string */ - sa = va_arg(args, char *); - result = wstringa(f, sa, -1, field_width, precision, flags); - } else { - /* print unicode string */ - s = va_arg(args, wchar_t *); - result = do_wstring(f, s, -1, field_width, precision, flags); - } - if (result < 0) - { - assert(!"TODO FIXME handle error better"); - return f; - } - continue; - - case 'S': - if (qualifier == L'l' || qualifier == L'w') { - /* print unicode string */ - s = va_arg(args, wchar_t *); - result = do_wstring(f, s, -1, field_width, precision, flags); - } else { - /* print ascii string */ - sa = va_arg(args, char *); - result = wstringa(f, sa, -1, field_width, precision, flags); - } - if (result < 0) - { - assert(!"TODO FIXME handle error better"); - return f; - } - continue; - - case L'e': - case L'E': - case L'f': - case L'g': - case L'G': - if (qualifier == L'l' || qualifier == L'L' ) - { - _ldouble = va_arg(args, long double); - - if ( _isnanl(_ldouble) ) - { - f += L"Nan"; - } - else if ( !_finitel(_ldouble) ) - { - if ( _ldouble < 0 ) - f += L"-Inf"; - else - f += L"+Inf"; - } else { - if ( precision == -1 ) - precision = 6; - result = wnumberfl(f,_ldouble,*fmt,field_width,precision,flags); - if (result < 0) - { - assert(!"TODO FIXME handle error better"); - return f; - } - } - } else { - _double = (double)va_arg(args, double); - - if ( _isnan(_double) ) - { - f += L"Nan"; - } - else if ( !_finite(_double) ) - { - if ( _double < 0 ) - f += L"-Inf"; - else - f += L"+Inf"; - } - else - { - if ( precision == -1 ) - precision = 6; - result = wnumberf(f,_double,*fmt,field_width,precision,flags); - if (result < 0) - { - assert(!"TODO FIXME handle error better"); - return f; - } - } - } - continue; - - case L'p': - if (field_width == -1) { - field_width = 2*sizeof(void *); - flags |= ZEROPAD; - } - result = wnumber(f, - (size_t) va_arg(args, void *), 16, - field_width, precision, flags); - if (result < 0) - { - assert(!"TODO FIXME handle error better"); - return f; - } - continue; - - case L'n': - if (qualifier == L'l') { - long * ip = va_arg(args, long *); - *ip = 0; - } else { - int * ip = va_arg(args, int *); - *ip = 0; - } - continue; - - /* integer number formats - set up the flags and "break" */ - case L'o': - base = 8; - break; - - case L'b': - base = 2; - break; - - case L'X': - flags |= LARGE; - case L'x': - base = 16; - break; - - case L'd': - case L'i': - flags |= SIGN; - case L'u': - break; - - default: - if (*fmt != L'%') - { - f += L'%'; - } - if (*fmt) - { - f += *fmt; - } - else - --fmt; - continue; - } - - if (qualifier == L'I') - num = va_arg(args, ULONGLONG); - else if (qualifier == L'l') { - if (flags & SIGN) - num = va_arg(args, long); - else - num = va_arg(args, unsigned long); - } - else if (qualifier == L'h') { - if (flags & SIGN) - num = va_arg(args, int); - else - num = va_arg(args, unsigned int); - } - else if (flags & SIGN) - num = va_arg(args, int); - else - num = va_arg(args, unsigned int); - result = wnumber(f, num, base, field_width, precision, flags); - if (result < 0) - { - assert(!"TODO FIXME handle error better"); - return f; - } - } - //putc('\0',f); - return f; -} diff --git a/reactos/tools/ssprintf.h b/reactos/tools/ssprintf.h deleted file mode 100644 index 6e105542be0..00000000000 --- a/reactos/tools/ssprintf.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 - -#include -#include - -#ifdef __CYGWIN__ -namespace std { - typedef basic_string wstring; -} -#endif - -std::string ssprintf ( const char* fmt, ... ); -std::string ssvprintf ( const char* fmt, va_list args ); - -std::wstring sswprintf ( const wchar_t* fmt, ... ); -std::wstring sswvprintf ( const wchar_t* fmt, va_list args ); - -#ifdef _UNICODE -#define sstprintf sswprintf -#define sstvprintf sswvprintf -#else -#define sstprintf ssprintf -#define sstvprintf ssvprintf -#endif diff --git a/reactos/tools/stubgen.c b/reactos/tools/stubgen.c deleted file mode 100644 index 86bb8de9671..00000000000 --- a/reactos/tools/stubgen.c +++ /dev/null @@ -1,174 +0,0 @@ -#include -#include -#include -#include - -#ifdef _WIN32 -#define popen _popen -#define snprintf _snprintf -#endif - -typedef struct _stub { - char *name; - char *origin; - struct _stub *next; -} stub; - -void usage( char *name ) { - fprintf( stderr, - "Usage: %s [-n nm] [-m make] libs...\n" - "nm -- The command used to run nm on reactos objects\n" - "make -- The command used to build reactos\n\n" - "libs are import libraries (.a files) typically from\n" - "dk/lib/nkm and dk/lib/w32\n", - name ); -} - -int main( int argc, char **argv ) { - char line[1024]; - char *make = "make"; - char *nm = "nm"; - char *origin = "unknown.a"; - stub *functions = NULL, *new_f, *imports = NULL, *search; - FILE *make_f, *nm_f; - int i, libstart = argc; - FILE *out = fopen("tests/stubs.tst","w"); - - if( argc == 1 ) { - if( out ) fclose( out ); - usage(argv[0]); - return 1; - } - - if( !out ) { - fprintf( stderr, "Could not write file tests/stubs.tst\n" ); - return 1; - } - - fprintf( out, "# Automatically generated by stubgen\n" ); - - for( i = 1; i < argc; i++ ) { - if( !strcmp( argv[i], "-m" ) ) { - make = argv[i+1]; - i++; - } else if( !strcmp( argv[i], "-n" ) ) { - nm = argv[i+1]; - i++; - } else { libstart = i; break; } - } - - snprintf( line, sizeof(line), "%s test 2>&1", make ); - make_f = popen( line, "r" ); - - if( !make_f ) { - fclose( out ); - fprintf( stderr, "Could not run %s test\n", make ); - return 1; - } - - while( fgets( line, sizeof(line), make_f ) ) { - char *end_of_location; - char *begin_q, *end_q; - - if( !strstr( line, "undefined reference to" ) ) continue; - - end_of_location = strrchr( line, ':' ); - - if( !end_of_location ) continue; - - begin_q = strchr( end_of_location, '`' ); - end_q = strchr( end_of_location, '\'' ); - - if( !begin_q || !end_q ) continue; - - begin_q += 2; /* skip `_ */ - - memmove( line, begin_q, end_q - begin_q ); - line[end_q - begin_q] = 0; - - for( new_f = functions; new_f; new_f = new_f->next ) - if( !strcmp( new_f->name, line ) ) break; - - if( new_f ) continue; - - new_f = (stub *)malloc( sizeof(stub) ); - if( !new_f ) - { - fprintf( stderr, "Out of memory\n" ); - fclose( out ); - pclose( make_f ); - return 1; - } - - new_f->name = strdup( line ); - new_f->next = functions; - functions = new_f; - } - - /* Scan libraries and collect available import sections */ - for( i = libstart; i < argc; i++ ) { - snprintf( line, sizeof(line), "%s %s", nm, argv[i] ); - nm_f = popen( line, "r" ); - - for( origin = argv[i]; *argv[i]; argv[i]++ ) - if( *argv[i] == '/' || *argv[i] == '\\' ) - origin = argv[i] + 1; - - - if( !nm_f ) { - fprintf( stderr, "Could not run %s\n", line ); - continue; - } - - while( fgets( line, sizeof(line), nm_f ) ) { - char *import_sign, *eol; - - if( !(import_sign = strstr( line, " I " )) ) continue; - - import_sign += 3; - while( *import_sign && isspace(*import_sign) ) import_sign++; - - /* Strip ws after name */ - for( eol = import_sign; *eol && !isspace(*eol); eol++ ); - - *eol = 0; - - for( new_f = imports; new_f; new_f = new_f->next ) - if( !strcmp( new_f->name, import_sign ) ) break; - - if( new_f ) continue; - - new_f = (stub *)malloc( sizeof(stub) ); - if( !new_f ) - { - fprintf( stderr, "Out of memory\n" ); - fclose( out ); - pclose( make_f ); - pclose( nm_f ); - return 1; - } - - new_f->name = strdup( import_sign + 1 ); - new_f->origin = origin; - new_f->next = imports; - imports = new_f; - } - - pclose( nm_f ); - } - - /* Now we have a list of unique functions and a list of imports, - lookup each function and output the entry from the import list. */ - for( new_f = functions; new_f; new_f = new_f->next ) { - for( search = imports; search; search = search->next ) { - if( !strcmp( new_f->name, search->name ) ) { - fprintf( out, "%s %s\n", search->origin, search->name ); - continue; - } - } - } - - fclose( out ); - pclose( make_f ); - return 0; -} diff --git a/reactos/tools/sysgen/FileSystemTreeView/App.ico b/reactos/tools/sysgen/FileSystemTreeView/App.ico deleted file mode 100644 index 3a5525fd794..00000000000 Binary files a/reactos/tools/sysgen/FileSystemTreeView/App.ico and /dev/null differ diff --git a/reactos/tools/sysgen/FileSystemTreeView/AssemblyInfo.cs b/reactos/tools/sysgen/FileSystemTreeView/AssemblyInfo.cs deleted file mode 100644 index 9f89a3282c5..00000000000 --- a/reactos/tools/sysgen/FileSystemTreeView/AssemblyInfo.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// -[assembly: AssemblyTitle("")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion("1.0.*")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] diff --git a/reactos/tools/sysgen/FileSystemTreeView/Backup/App.ico b/reactos/tools/sysgen/FileSystemTreeView/Backup/App.ico deleted file mode 100644 index 3a5525fd794..00000000000 Binary files a/reactos/tools/sysgen/FileSystemTreeView/Backup/App.ico and /dev/null differ diff --git a/reactos/tools/sysgen/FileSystemTreeView/Backup/AssemblyInfo.cs b/reactos/tools/sysgen/FileSystemTreeView/Backup/AssemblyInfo.cs deleted file mode 100644 index 9f89a3282c5..00000000000 --- a/reactos/tools/sysgen/FileSystemTreeView/Backup/AssemblyInfo.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// -[assembly: AssemblyTitle("")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion("1.0.*")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] diff --git a/reactos/tools/sysgen/FileSystemTreeView/Backup/FileSystemTreeView.cs b/reactos/tools/sysgen/FileSystemTreeView/Backup/FileSystemTreeView.cs deleted file mode 100644 index e6c055e9b12..00000000000 --- a/reactos/tools/sysgen/FileSystemTreeView/Backup/FileSystemTreeView.cs +++ /dev/null @@ -1,201 +0,0 @@ -using System; -using System.IO; -using System.Windows.Forms; -using System.ComponentModel; -using System.Collections; -using System.Drawing; - -namespace C2C.FileSystem -{ - /// - /// Summary description for DirectoryTreeView. - /// - /// - - public class FileSystemTreeView : TreeView - { - private bool _showFiles = true; - private ImageList _imageList = new ImageList(); - private Hashtable _systemIcons = new Hashtable(); - - public static readonly int Folder = 0; - - public FileSystemTreeView() - { - this.ImageList = _imageList; - this.MouseDown += new MouseEventHandler(FileSystemTreeView_MouseDown); - this.BeforeExpand += new TreeViewCancelEventHandler(FileSystemTreeView_BeforeExpand); - } - - void FileSystemTreeView_MouseDown(object sender, MouseEventArgs e) - { - TreeNode node = this.GetNodeAt(e.X, e.Y); - - if (node == null) - return; - - this.SelectedNode = node; //select the node under the mouse - } - - void FileSystemTreeView_BeforeExpand(object sender, TreeViewCancelEventArgs e) - { - if( e.Node is FileNode ) return; - - DirectoryNode node = (DirectoryNode)e.Node; - - if (!node.Loaded) - { - node.Nodes[0].Remove(); //remove the fake child node used for virtualization - node.LoadDirectory(); - if( this._showFiles == true ) - node.LoadFiles(); - } - } - - public void Load( string directoryPath ) - { - if( Directory.Exists( directoryPath ) == false ) - throw new DirectoryNotFoundException( "Directory Not Found" ); - - _systemIcons.Clear(); - _imageList.Images.Clear(); - Nodes.Clear(); - - Icon folderIcon = new Icon( typeof( FileSystemTreeView ), "icons.folder.ico"); - - _imageList.Images.Add( folderIcon ); - _systemIcons.Add( FileSystemTreeView.Folder, 0 ); - - DirectoryNode node = new DirectoryNode( this, new DirectoryInfo( directoryPath ) ); - node.Expand(); - } - - public int GetIconImageIndex( string path ) - { - string extension = Path.GetExtension( path ); - - if( _systemIcons.ContainsKey( extension ) == false ) - { - Icon icon = ShellIcon.GetSmallIcon( path ); - _imageList.Images.Add( icon ); - _systemIcons.Add( extension, _imageList.Images.Count-1 ); - } - - return (int)_systemIcons[ Path.GetExtension( path )]; - } - - public bool ShowFiles - { - get{ return this._showFiles; } - set{ this._showFiles = value; } - } - } - - public class DirectoryNode : TreeNode - { - private DirectoryInfo _directoryInfo; - - public DirectoryNode( DirectoryNode parent, DirectoryInfo directoryInfo ) : base( directoryInfo.Name ) - { - this._directoryInfo = directoryInfo; - - this.ImageIndex = FileSystemTreeView.Folder; - this.SelectedImageIndex = this.ImageIndex; - - parent.Nodes.Add( this ); - - Virtualize(); - } - - public DirectoryNode( FileSystemTreeView treeView, DirectoryInfo directoryInfo ) : base( directoryInfo.Name ) - { - this._directoryInfo = directoryInfo; - - this.ImageIndex = FileSystemTreeView.Folder; - this.SelectedImageIndex = this.ImageIndex; - - treeView.Nodes.Add( this ); - - Virtualize(); - - } - - void Virtualize() - { - int fileCount = 0; - - try - { - if( this.TreeView.ShowFiles == true ) - fileCount = this._directoryInfo.GetFiles().Length; - - if( (fileCount + this._directoryInfo.GetDirectories().Length) > 0 ) - new FakeChildNode( this ); - } - catch - { - } - } - - public void LoadDirectory() - { - foreach( DirectoryInfo directoryInfo in _directoryInfo.GetDirectories() ) - { - new DirectoryNode( this, directoryInfo ); - } - } - - public void LoadFiles() - { - foreach( FileInfo file in _directoryInfo.GetFiles() ) - { - new FileNode( this, file ); - } - } - - public bool Loaded - { - get - { - if( this.Nodes.Count != 0 ) - { - if( this.Nodes[0] is FakeChildNode ) - return false; - } - - return true; - } - } - - public new FileSystemTreeView TreeView - { - get{ return (FileSystemTreeView)base.TreeView; } - } - } - - public class FileNode : TreeNode - { - private FileInfo _fileInfo; - private DirectoryNode _directoryNode; - - public FileNode( DirectoryNode directoryNode, FileInfo fileInfo ) : base( fileInfo.Name ) - { - this._directoryNode = directoryNode; - this._fileInfo = fileInfo; - - this.ImageIndex = ((FileSystemTreeView)_directoryNode.TreeView).GetIconImageIndex( _fileInfo.FullName ); - this.SelectedImageIndex = this.ImageIndex; - - _directoryNode.Nodes.Add( this ); - } - } - - public class FakeChildNode : TreeNode - { - public FakeChildNode( TreeNode parent ) : base() - { - parent.Nodes.Add( this ); - } - } - -} diff --git a/reactos/tools/sysgen/FileSystemTreeView/Backup/FileSystemTreeView.csproj b/reactos/tools/sysgen/FileSystemTreeView/Backup/FileSystemTreeView.csproj deleted file mode 100644 index ccafd2eb14c..00000000000 --- a/reactos/tools/sysgen/FileSystemTreeView/Backup/FileSystemTreeView.csproj +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/reactos/tools/sysgen/FileSystemTreeView/Backup/FileSystemTreeView.csproj.user b/reactos/tools/sysgen/FileSystemTreeView/Backup/FileSystemTreeView.csproj.user deleted file mode 100644 index 69ac1936f52..00000000000 --- a/reactos/tools/sysgen/FileSystemTreeView/Backup/FileSystemTreeView.csproj.user +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - diff --git a/reactos/tools/sysgen/FileSystemTreeView/Backup/FileSystemTreeView.resx b/reactos/tools/sysgen/FileSystemTreeView/Backup/FileSystemTreeView.resx deleted file mode 100644 index 3f337e081da..00000000000 --- a/reactos/tools/sysgen/FileSystemTreeView/Backup/FileSystemTreeView.resx +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 1.0.0.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - diff --git a/reactos/tools/sysgen/FileSystemTreeView/Backup/Form1.cs b/reactos/tools/sysgen/FileSystemTreeView/Backup/Form1.cs deleted file mode 100644 index b825eb838c0..00000000000 --- a/reactos/tools/sysgen/FileSystemTreeView/Backup/Form1.cs +++ /dev/null @@ -1,178 +0,0 @@ -using System; -using System.Drawing; -using System.Collections; -using System.ComponentModel; -using System.Windows.Forms; -using System.Data; -using C2C.FileSystem; - -namespace DirectoryTreeView -{ - /// - /// Summary description for Form1. - /// - public class Form1 : System.Windows.Forms.Form - { - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.TextBox txtDirectory; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Button btnDirectory; - private C2C.FileSystem.FileSystemTreeView tree; - private System.Windows.Forms.Panel treePanel; - /// - /// Required designer variable. - /// - private System.ComponentModel.Container components = null; - - public Form1() - { - // - // Required for Windows Form Designer support - // - InitializeComponent(); - - // - // TODO: Add any constructor code after InitializeComponent call - // - } - - /// - /// Clean up any resources being used. - /// - protected override void Dispose( bool disposing ) - { - if( disposing ) - { - if (components != null) - { - components.Dispose(); - } - } - base.Dispose( disposing ); - } - - #region Windows Form Designer generated code - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.panel1 = new System.Windows.Forms.Panel(); - this.btnDirectory = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); - this.txtDirectory = new System.Windows.Forms.TextBox(); - this.treePanel = new System.Windows.Forms.Panel(); - this.panel1.SuspendLayout(); - this.SuspendLayout(); - // - // panel1 - // - this.panel1.Controls.Add(this.btnDirectory); - this.panel1.Controls.Add(this.label1); - this.panel1.Controls.Add(this.txtDirectory); - this.panel1.Dock = System.Windows.Forms.DockStyle.Top; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(721, 57); - this.panel1.TabIndex = 0; - // - // btnDirectory - // - this.btnDirectory.Location = new System.Drawing.Point(615, 27); - this.btnDirectory.Name = "btnDirectory"; - this.btnDirectory.Size = new System.Drawing.Size(30, 21); - this.btnDirectory.TabIndex = 2; - this.btnDirectory.Text = "..."; - this.btnDirectory.Click += new System.EventHandler(this.btnDirectory_Click); - // - // label1 - // - this.label1.Location = new System.Drawing.Point(9, 9); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(102, 18); - this.label1.TabIndex = 1; - this.label1.Text = "Directory:"; - // - // txtDirectory - // - this.txtDirectory.Location = new System.Drawing.Point(9, 27); - this.txtDirectory.Name = "txtDirectory"; - this.txtDirectory.Size = new System.Drawing.Size(603, 20); - this.txtDirectory.TabIndex = 0; - this.txtDirectory.Text = ""; - this.txtDirectory.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtDirectory_KeyDown); - this.txtDirectory.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtDirectory_KeyPress); - // - // treePanel - // - this.treePanel.Dock = System.Windows.Forms.DockStyle.Fill; - this.treePanel.Location = new System.Drawing.Point(0, 57); - this.treePanel.Name = "treePanel"; - this.treePanel.Size = new System.Drawing.Size(721, 530); - this.treePanel.TabIndex = 1; - // - // Form1 - // - this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); - this.ClientSize = new System.Drawing.Size(721, 587); - this.Controls.Add(this.treePanel); - this.Controls.Add(this.panel1); - this.Name = "Form1"; - this.Text = "Demo Application"; - this.Load += new System.EventHandler(this.Form1_Load); - this.panel1.ResumeLayout(false); - this.ResumeLayout(false); - - } - #endregion - - /// - /// The main entry point for the application. - /// - [STAThread] - static void Main() - { - Application.Run(new Form1()); - } - - private void Form1_Load(object sender, System.EventArgs e) - { - tree = new C2C.FileSystem.FileSystemTreeView(); - treePanel.Controls.Add( tree ); - tree.Dock = DockStyle.Fill; - //tree.ShowFiles = false; - } - - - private void btnDirectory_Click(object sender, System.EventArgs e) - { - FolderBrowserDialog dlg = new FolderBrowserDialog(); - - if( dlg.ShowDialog() == DialogResult.OK ) - { - txtDirectory.Text = dlg.SelectedPath; - tree.Load( txtDirectory.Text ); - } - } - - private void txtDirectory_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e) - { - - - } - - private void txtDirectory_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) - { - if( e.KeyData == Keys.Enter ) - { - if( System.IO.Directory.Exists( txtDirectory.Text ) == false ) - { - MessageBox.Show( "Directory Does Not Exist", "Invalid Directory", MessageBoxButtons.OK, MessageBoxIcon.Information ); - return; - } - tree.Load( txtDirectory.Text ); - } - } - } -} diff --git a/reactos/tools/sysgen/FileSystemTreeView/Backup/Form1.resx b/reactos/tools/sysgen/FileSystemTreeView/Backup/Form1.resx deleted file mode 100644 index 161c002f2c3..00000000000 --- a/reactos/tools/sysgen/FileSystemTreeView/Backup/Form1.resx +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - - True - - - Private - - - 3, 3 - - - True - - - Private - - - False - - - Private - - - Private - - - False - - - Private - - - Private - - - Private - - - False - - - Private - - - False - - - True - - - Private - - - 3, 3 - - - True - - - Private - - - False - - - (Default) - - - False - - - False - - - 3, 3 - - - True - - - 80 - - - Form1 - - - True - - - Private - - \ No newline at end of file diff --git a/reactos/tools/sysgen/FileSystemTreeView/Backup/ShellIcon.cs b/reactos/tools/sysgen/FileSystemTreeView/Backup/ShellIcon.cs deleted file mode 100644 index 6dd9f867916..00000000000 --- a/reactos/tools/sysgen/FileSystemTreeView/Backup/ShellIcon.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.Drawing; -using System.Runtime.InteropServices; - -namespace C2C.FileSystem -{ - /// - /// Summary description for ShellIcon. - /// - /// - /// Summary description for ShellIcon. Get a small or large Icon with an easy C# function call - /// that returns a 32x32 or 16x16 System.Drawing.Icon depending on which function you call - /// either GetSmallIcon(string fileName) or GetLargeIcon(string fileName) - /// - public class ShellIcon - { - [StructLayout(LayoutKind.Sequential)] - public struct SHFILEINFO - { - public IntPtr hIcon; - public IntPtr iIcon; - public uint dwAttributes; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)] - public string szDisplayName; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)] - public string szTypeName; - }; - - - class Win32 - { - public const uint SHGFI_ICON = 0x100; - public const uint SHGFI_LARGEICON = 0x0; // 'Large icon - public const uint SHGFI_SMALLICON = 0x1; // 'Small icon - - - [DllImport("shell32.dll")] - public static extern IntPtr SHGetFileInfo(string pszPath, uint dwFileAttributes, ref SHFILEINFO psfi, uint cbSizeFileInfo, uint uFlags); - } - - - public ShellIcon() - { - // - // TODO: Add constructor logic here - // - } - - - public static Icon GetSmallIcon(string fileName) - { - IntPtr hImgSmall; //the handle to the system image list - SHFILEINFO shinfo = new SHFILEINFO(); - - - //Use this to get the small Icon - hImgSmall = Win32.SHGetFileInfo(fileName, 0, ref shinfo,(uint)Marshal.SizeOf(shinfo),Win32.SHGFI_ICON | Win32.SHGFI_SMALLICON); - - - //The icon is returned in the hIcon member of the shinfo struct - return System.Drawing.Icon.FromHandle(shinfo.hIcon); - } - - - public static Icon GetLargeIcon(string fileName) - { - IntPtr hImgLarge; //the handle to the system image list - SHFILEINFO shinfo = new SHFILEINFO(); - - - //Use this to get the large Icon - hImgLarge = Win32.SHGetFileInfo(fileName, 0, ref shinfo, (uint)Marshal.SizeOf(shinfo), Win32.SHGFI_ICON | Win32.SHGFI_LARGEICON); - - - //The icon is returned in the hIcon member of the shinfo struct - return System.Drawing.Icon.FromHandle(shinfo.hIcon); - } - } -} diff --git a/reactos/tools/sysgen/FileSystemTreeView/Backup/icons/folder.ico b/reactos/tools/sysgen/FileSystemTreeView/Backup/icons/folder.ico deleted file mode 100644 index c9e4b0b4a38..00000000000 Binary files a/reactos/tools/sysgen/FileSystemTreeView/Backup/icons/folder.ico and /dev/null differ diff --git a/reactos/tools/sysgen/FileSystemTreeView/FileSystemTreeView.cs b/reactos/tools/sysgen/FileSystemTreeView/FileSystemTreeView.cs deleted file mode 100644 index f3da9388b71..00000000000 --- a/reactos/tools/sysgen/FileSystemTreeView/FileSystemTreeView.cs +++ /dev/null @@ -1,202 +0,0 @@ -using System; -using System.IO; -using System.Windows.Forms; -using System.ComponentModel; -using System.Collections; -using System.Drawing; - -namespace C2C.FileSystem -{ - /// - /// Summary description for DirectoryTreeView. - /// - /// - - public class FileSystemTreeView : TreeView - { - private bool _showFiles = true; - private ImageList _imageList = new ImageList(); - private Hashtable _systemIcons = new Hashtable(); - - public static readonly int Folder = 0; - - public FileSystemTreeView() - { - this.CheckBoxes = true; - this.ImageList = _imageList; - this.MouseDown += new MouseEventHandler(FileSystemTreeView_MouseDown); - this.BeforeExpand += new TreeViewCancelEventHandler(FileSystemTreeView_BeforeExpand); - } - - void FileSystemTreeView_MouseDown(object sender, MouseEventArgs e) - { - TreeNode node = this.GetNodeAt(e.X, e.Y); - - if (node == null) - return; - - this.SelectedNode = node; //select the node under the mouse - } - - void FileSystemTreeView_BeforeExpand(object sender, TreeViewCancelEventArgs e) - { - if( e.Node is FileNode ) return; - - DirectoryNode node = (DirectoryNode)e.Node; - - if (!node.Loaded) - { - node.Nodes[0].Remove(); //remove the fake child node used for virtualization - node.LoadDirectory(); - if( this._showFiles == true ) - node.LoadFiles(); - } - } - - public void Load( string directoryPath ) - { - if( Directory.Exists( directoryPath ) == false ) - throw new DirectoryNotFoundException( "Directory Not Found" ); - - _systemIcons.Clear(); - _imageList.Images.Clear(); - Nodes.Clear(); - - Icon folderIcon = new Icon( typeof( FileSystemTreeView ), "icons.folder.ico"); - - _imageList.Images.Add( folderIcon ); - _systemIcons.Add( FileSystemTreeView.Folder, 0 ); - - DirectoryNode node = new DirectoryNode( this, new DirectoryInfo( directoryPath ) ); - node.Expand(); - } - - public int GetIconImageIndex( string path ) - { - string extension = Path.GetExtension( path ); - - if( _systemIcons.ContainsKey( extension ) == false ) - { - Icon icon = ShellIcon.GetSmallIcon( path ); - _imageList.Images.Add( icon ); - _systemIcons.Add( extension, _imageList.Images.Count-1 ); - } - - return (int)_systemIcons[ Path.GetExtension( path )]; - } - - public bool ShowFiles - { - get{ return this._showFiles; } - set{ this._showFiles = value; } - } - } - - public class DirectoryNode : TreeNode - { - private DirectoryInfo _directoryInfo; - - public DirectoryNode( DirectoryNode parent, DirectoryInfo directoryInfo ) : base( directoryInfo.Name ) - { - this._directoryInfo = directoryInfo; - - this.ImageIndex = FileSystemTreeView.Folder; - this.SelectedImageIndex = this.ImageIndex; - - parent.Nodes.Add( this ); - - Virtualize(); - } - - public DirectoryNode( FileSystemTreeView treeView, DirectoryInfo directoryInfo ) : base( directoryInfo.Name ) - { - this._directoryInfo = directoryInfo; - - this.ImageIndex = FileSystemTreeView.Folder; - this.SelectedImageIndex = this.ImageIndex; - - treeView.Nodes.Add( this ); - - Virtualize(); - - } - - void Virtualize() - { - int fileCount = 0; - - try - { - if( this.TreeView.ShowFiles == true ) - fileCount = this._directoryInfo.GetFiles().Length; - - if( (fileCount + this._directoryInfo.GetDirectories().Length) > 0 ) - new FakeChildNode( this ); - } - catch - { - } - } - - public void LoadDirectory() - { - foreach( DirectoryInfo directoryInfo in _directoryInfo.GetDirectories() ) - { - new DirectoryNode( this, directoryInfo ); - } - } - - public void LoadFiles() - { - foreach( FileInfo file in _directoryInfo.GetFiles() ) - { - new FileNode( this, file ); - } - } - - public bool Loaded - { - get - { - if( this.Nodes.Count != 0 ) - { - if( this.Nodes[0] is FakeChildNode ) - return false; - } - - return true; - } - } - - public new FileSystemTreeView TreeView - { - get{ return (FileSystemTreeView)base.TreeView; } - } - } - - public class FileNode : TreeNode - { - private FileInfo _fileInfo; - private DirectoryNode _directoryNode; - - public FileNode( DirectoryNode directoryNode, FileInfo fileInfo ) : base( fileInfo.Name ) - { - this._directoryNode = directoryNode; - this._fileInfo = fileInfo; - - this.ImageIndex = ((FileSystemTreeView)_directoryNode.TreeView).GetIconImageIndex( _fileInfo.FullName ); - this.SelectedImageIndex = this.ImageIndex; - - _directoryNode.Nodes.Add( this ); - } - } - - public class FakeChildNode : TreeNode - { - public FakeChildNode( TreeNode parent ) : base() - { - parent.Nodes.Add( this ); - } - } - -} diff --git a/reactos/tools/sysgen/FileSystemTreeView/FileSystemTreeView.csproj b/reactos/tools/sysgen/FileSystemTreeView/FileSystemTreeView.csproj deleted file mode 100644 index 66d811ad0ab..00000000000 --- a/reactos/tools/sysgen/FileSystemTreeView/FileSystemTreeView.csproj +++ /dev/null @@ -1,124 +0,0 @@ - - - Local - 8.0.50727 - 2.0 - {83281176-6B39-4EB8-8CDC-82F018DEED68} - Debug - AnyCPU - App.ico - - - DirectoryTreeView - - - JScript - Grid - IE50 - false - WinExe - C2C.FileSystem - OnBuildSuccess - - - - - - - - - bin\Debug\ - false - 285212672 - false - - - DEBUG;TRACE - - - true - 4096 - false - - - false - false - false - false - 4 - full - prompt - - - bin\Release\ - false - 285212672 - false - - - TRACE - - - false - 4096 - false - - - true - false - false - false - 4 - none - prompt - - - - System - - - System.Data - - - System.DirectoryServices - - - System.Drawing - - - System.Windows.Forms - - - System.XML - - - - - - Code - - - Component - - - Form - - - Code - - - FileSystemTreeView.cs - - - Form1.cs - - - - - - - - - - - \ No newline at end of file diff --git a/reactos/tools/sysgen/FileSystemTreeView/FileSystemTreeView.csproj.user b/reactos/tools/sysgen/FileSystemTreeView/FileSystemTreeView.csproj.user deleted file mode 100644 index d9bb8387dbc..00000000000 --- a/reactos/tools/sysgen/FileSystemTreeView/FileSystemTreeView.csproj.user +++ /dev/null @@ -1,58 +0,0 @@ - - - 7.10.3077 - Debug - AnyCPU - - - - - - - 0 - ProjectFiles - 0 - - - false - false - false - false - false - - - Project - - - - - - - - - - - false - - - false - false - false - false - false - - - Project - - - - - - - - - - - false - - \ No newline at end of file diff --git a/reactos/tools/sysgen/FileSystemTreeView/FileSystemTreeView.resx b/reactos/tools/sysgen/FileSystemTreeView/FileSystemTreeView.resx deleted file mode 100644 index 3f337e081da..00000000000 --- a/reactos/tools/sysgen/FileSystemTreeView/FileSystemTreeView.resx +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 1.0.0.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - diff --git a/reactos/tools/sysgen/FileSystemTreeView/FileSystemTreeView.suo b/reactos/tools/sysgen/FileSystemTreeView/FileSystemTreeView.suo deleted file mode 100644 index df5e95f4d88..00000000000 Binary files a/reactos/tools/sysgen/FileSystemTreeView/FileSystemTreeView.suo and /dev/null differ diff --git a/reactos/tools/sysgen/FileSystemTreeView/Form1.cs b/reactos/tools/sysgen/FileSystemTreeView/Form1.cs deleted file mode 100644 index b825eb838c0..00000000000 --- a/reactos/tools/sysgen/FileSystemTreeView/Form1.cs +++ /dev/null @@ -1,178 +0,0 @@ -using System; -using System.Drawing; -using System.Collections; -using System.ComponentModel; -using System.Windows.Forms; -using System.Data; -using C2C.FileSystem; - -namespace DirectoryTreeView -{ - /// - /// Summary description for Form1. - /// - public class Form1 : System.Windows.Forms.Form - { - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.TextBox txtDirectory; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Button btnDirectory; - private C2C.FileSystem.FileSystemTreeView tree; - private System.Windows.Forms.Panel treePanel; - /// - /// Required designer variable. - /// - private System.ComponentModel.Container components = null; - - public Form1() - { - // - // Required for Windows Form Designer support - // - InitializeComponent(); - - // - // TODO: Add any constructor code after InitializeComponent call - // - } - - /// - /// Clean up any resources being used. - /// - protected override void Dispose( bool disposing ) - { - if( disposing ) - { - if (components != null) - { - components.Dispose(); - } - } - base.Dispose( disposing ); - } - - #region Windows Form Designer generated code - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.panel1 = new System.Windows.Forms.Panel(); - this.btnDirectory = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); - this.txtDirectory = new System.Windows.Forms.TextBox(); - this.treePanel = new System.Windows.Forms.Panel(); - this.panel1.SuspendLayout(); - this.SuspendLayout(); - // - // panel1 - // - this.panel1.Controls.Add(this.btnDirectory); - this.panel1.Controls.Add(this.label1); - this.panel1.Controls.Add(this.txtDirectory); - this.panel1.Dock = System.Windows.Forms.DockStyle.Top; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(721, 57); - this.panel1.TabIndex = 0; - // - // btnDirectory - // - this.btnDirectory.Location = new System.Drawing.Point(615, 27); - this.btnDirectory.Name = "btnDirectory"; - this.btnDirectory.Size = new System.Drawing.Size(30, 21); - this.btnDirectory.TabIndex = 2; - this.btnDirectory.Text = "..."; - this.btnDirectory.Click += new System.EventHandler(this.btnDirectory_Click); - // - // label1 - // - this.label1.Location = new System.Drawing.Point(9, 9); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(102, 18); - this.label1.TabIndex = 1; - this.label1.Text = "Directory:"; - // - // txtDirectory - // - this.txtDirectory.Location = new System.Drawing.Point(9, 27); - this.txtDirectory.Name = "txtDirectory"; - this.txtDirectory.Size = new System.Drawing.Size(603, 20); - this.txtDirectory.TabIndex = 0; - this.txtDirectory.Text = ""; - this.txtDirectory.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtDirectory_KeyDown); - this.txtDirectory.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtDirectory_KeyPress); - // - // treePanel - // - this.treePanel.Dock = System.Windows.Forms.DockStyle.Fill; - this.treePanel.Location = new System.Drawing.Point(0, 57); - this.treePanel.Name = "treePanel"; - this.treePanel.Size = new System.Drawing.Size(721, 530); - this.treePanel.TabIndex = 1; - // - // Form1 - // - this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); - this.ClientSize = new System.Drawing.Size(721, 587); - this.Controls.Add(this.treePanel); - this.Controls.Add(this.panel1); - this.Name = "Form1"; - this.Text = "Demo Application"; - this.Load += new System.EventHandler(this.Form1_Load); - this.panel1.ResumeLayout(false); - this.ResumeLayout(false); - - } - #endregion - - /// - /// The main entry point for the application. - /// - [STAThread] - static void Main() - { - Application.Run(new Form1()); - } - - private void Form1_Load(object sender, System.EventArgs e) - { - tree = new C2C.FileSystem.FileSystemTreeView(); - treePanel.Controls.Add( tree ); - tree.Dock = DockStyle.Fill; - //tree.ShowFiles = false; - } - - - private void btnDirectory_Click(object sender, System.EventArgs e) - { - FolderBrowserDialog dlg = new FolderBrowserDialog(); - - if( dlg.ShowDialog() == DialogResult.OK ) - { - txtDirectory.Text = dlg.SelectedPath; - tree.Load( txtDirectory.Text ); - } - } - - private void txtDirectory_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e) - { - - - } - - private void txtDirectory_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) - { - if( e.KeyData == Keys.Enter ) - { - if( System.IO.Directory.Exists( txtDirectory.Text ) == false ) - { - MessageBox.Show( "Directory Does Not Exist", "Invalid Directory", MessageBoxButtons.OK, MessageBoxIcon.Information ); - return; - } - tree.Load( txtDirectory.Text ); - } - } - } -} diff --git a/reactos/tools/sysgen/FileSystemTreeView/Form1.resx b/reactos/tools/sysgen/FileSystemTreeView/Form1.resx deleted file mode 100644 index 161c002f2c3..00000000000 --- a/reactos/tools/sysgen/FileSystemTreeView/Form1.resx +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - - True - - - Private - - - 3, 3 - - - True - - - Private - - - False - - - Private - - - Private - - - False - - - Private - - - Private - - - Private - - - False - - - Private - - - False - - - True - - - Private - - - 3, 3 - - - True - - - Private - - - False - - - (Default) - - - False - - - False - - - 3, 3 - - - True - - - 80 - - - Form1 - - - True - - - Private - - \ No newline at end of file diff --git a/reactos/tools/sysgen/FileSystemTreeView/ShellIcon.cs b/reactos/tools/sysgen/FileSystemTreeView/ShellIcon.cs deleted file mode 100644 index 6dd9f867916..00000000000 --- a/reactos/tools/sysgen/FileSystemTreeView/ShellIcon.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.Drawing; -using System.Runtime.InteropServices; - -namespace C2C.FileSystem -{ - /// - /// Summary description for ShellIcon. - /// - /// - /// Summary description for ShellIcon. Get a small or large Icon with an easy C# function call - /// that returns a 32x32 or 16x16 System.Drawing.Icon depending on which function you call - /// either GetSmallIcon(string fileName) or GetLargeIcon(string fileName) - /// - public class ShellIcon - { - [StructLayout(LayoutKind.Sequential)] - public struct SHFILEINFO - { - public IntPtr hIcon; - public IntPtr iIcon; - public uint dwAttributes; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)] - public string szDisplayName; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)] - public string szTypeName; - }; - - - class Win32 - { - public const uint SHGFI_ICON = 0x100; - public const uint SHGFI_LARGEICON = 0x0; // 'Large icon - public const uint SHGFI_SMALLICON = 0x1; // 'Small icon - - - [DllImport("shell32.dll")] - public static extern IntPtr SHGetFileInfo(string pszPath, uint dwFileAttributes, ref SHFILEINFO psfi, uint cbSizeFileInfo, uint uFlags); - } - - - public ShellIcon() - { - // - // TODO: Add constructor logic here - // - } - - - public static Icon GetSmallIcon(string fileName) - { - IntPtr hImgSmall; //the handle to the system image list - SHFILEINFO shinfo = new SHFILEINFO(); - - - //Use this to get the small Icon - hImgSmall = Win32.SHGetFileInfo(fileName, 0, ref shinfo,(uint)Marshal.SizeOf(shinfo),Win32.SHGFI_ICON | Win32.SHGFI_SMALLICON); - - - //The icon is returned in the hIcon member of the shinfo struct - return System.Drawing.Icon.FromHandle(shinfo.hIcon); - } - - - public static Icon GetLargeIcon(string fileName) - { - IntPtr hImgLarge; //the handle to the system image list - SHFILEINFO shinfo = new SHFILEINFO(); - - - //Use this to get the large Icon - hImgLarge = Win32.SHGetFileInfo(fileName, 0, ref shinfo, (uint)Marshal.SizeOf(shinfo), Win32.SHGFI_ICON | Win32.SHGFI_LARGEICON); - - - //The icon is returned in the hIcon member of the shinfo struct - return System.Drawing.Icon.FromHandle(shinfo.hIcon); - } - } -} diff --git a/reactos/tools/sysgen/FileSystemTreeView/UpgradeLog.XML b/reactos/tools/sysgen/FileSystemTreeView/UpgradeLog.XML deleted file mode 100644 index e913238577e..00000000000 --- a/reactos/tools/sysgen/FileSystemTreeView/UpgradeLog.XML +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/reactos/tools/sysgen/FileSystemTreeView/_UpgradeReport_Files/UpgradeReport.css b/reactos/tools/sysgen/FileSystemTreeView/_UpgradeReport_Files/UpgradeReport.css deleted file mode 100644 index fae98af0a86..00000000000 --- a/reactos/tools/sysgen/FileSystemTreeView/_UpgradeReport_Files/UpgradeReport.css +++ /dev/null @@ -1,207 +0,0 @@ -BODY -{ - BACKGROUND-COLOR: white; - FONT-FAMILY: "Verdana", sans-serif; - FONT-SIZE: 100%; - MARGIN-LEFT: 0px; - MARGIN-TOP: 0px -} -P -{ - FONT-FAMILY: "Verdana", sans-serif; - FONT-SIZE: 70%; - LINE-HEIGHT: 12pt; - MARGIN-BOTTOM: 0px; - MARGIN-LEFT: 10px; - MARGIN-TOP: 10px -} -.note -{ - BACKGROUND-COLOR: #ffffff; - COLOR: #336699; - FONT-FAMILY: "Verdana", sans-serif; - FONT-SIZE: 100%; - MARGIN-BOTTOM: 0px; - MARGIN-LEFT: 0px; - MARGIN-TOP: 0px; - PADDING-RIGHT: 10px -} -.infotable -{ - BACKGROUND-COLOR: #f0f0e0; - BORDER-BOTTOM: #ffffff 0px solid; - BORDER-COLLAPSE: collapse; - BORDER-LEFT: #ffffff 0px solid; - BORDER-RIGHT: #ffffff 0px solid; - BORDER-TOP: #ffffff 0px solid; - FONT-SIZE: 70%; - MARGIN-LEFT: 10px -} -.issuetable -{ - BACKGROUND-COLOR: #ffffe8; - BORDER-COLLAPSE: collapse; - COLOR: #000000; - FONT-SIZE: 100%; - MARGIN-BOTTOM: 10px; - MARGIN-LEFT: 13px; - MARGIN-TOP: 0px -} -.issuetitle -{ - BACKGROUND-COLOR: #ffffff; - BORDER-BOTTOM: #dcdcdc 1px solid; - BORDER-TOP: #dcdcdc 1px; - COLOR: #003366; - FONT-WEIGHT: normal -} -.header -{ - BACKGROUND-COLOR: #cecf9c; - BORDER-BOTTOM: #ffffff 1px solid; - BORDER-LEFT: #ffffff 1px solid; - BORDER-RIGHT: #ffffff 1px solid; - BORDER-TOP: #ffffff 1px solid; - COLOR: #000000; - FONT-WEIGHT: bold -} -.issuehdr -{ - BACKGROUND-COLOR: #E0EBF5; - BORDER-BOTTOM: #dcdcdc 1px solid; - BORDER-TOP: #dcdcdc 1px solid; - COLOR: #000000; - FONT-WEIGHT: normal -} -.issuenone -{ - BACKGROUND-COLOR: #ffffff; - BORDER-BOTTOM: 0px; - BORDER-LEFT: 0px; - BORDER-RIGHT: 0px; - BORDER-TOP: 0px; - COLOR: #000000; - FONT-WEIGHT: normal -} -.content -{ - BACKGROUND-COLOR: #e7e7ce; - BORDER-BOTTOM: #ffffff 1px solid; - BORDER-LEFT: #ffffff 1px solid; - BORDER-RIGHT: #ffffff 1px solid; - BORDER-TOP: #ffffff 1px solid; - PADDING-LEFT: 3px -} -.issuecontent -{ - BACKGROUND-COLOR: #ffffff; - BORDER-BOTTOM: #dcdcdc 1px solid; - BORDER-TOP: #dcdcdc 1px solid; - PADDING-LEFT: 3px -} -A:link -{ - COLOR: #cc6633; - TEXT-DECORATION: underline -} -A:visited -{ - COLOR: #cc6633; -} -A:active -{ - COLOR: #cc6633; -} -A:hover -{ - COLOR: #cc3300; - TEXT-DECORATION: underline -} -H1 -{ - BACKGROUND-COLOR: #003366; - BORDER-BOTTOM: #336699 6px solid; - COLOR: #ffffff; - FONT-SIZE: 130%; - FONT-WEIGHT: normal; - MARGIN: 0em 0em 0em -20px; - PADDING-BOTTOM: 8px; - PADDING-LEFT: 30px; - PADDING-TOP: 16px -} -H2 -{ - COLOR: #000000; - FONT-SIZE: 80%; - FONT-WEIGHT: bold; - MARGIN-BOTTOM: 3px; - MARGIN-LEFT: 10px; - MARGIN-TOP: 20px; - PADDING-LEFT: 0px -} -H3 -{ - COLOR: #000000; - FONT-SIZE: 80%; - FONT-WEIGHT: bold; - MARGIN-BOTTOM: -5px; - MARGIN-LEFT: 10px; - MARGIN-TOP: 20px -} -H4 -{ - COLOR: #000000; - FONT-SIZE: 70%; - FONT-WEIGHT: bold; - MARGIN-BOTTOM: 0px; - MARGIN-TOP: 15px; - PADDING-BOTTOM: 0px -} -UL -{ - COLOR: #000000; - FONT-SIZE: 70%; - LIST-STYLE: square; - MARGIN-BOTTOM: 0pt; - MARGIN-TOP: 0pt -} -OL -{ - COLOR: #000000; - FONT-SIZE: 70%; - LIST-STYLE: square; - MARGIN-BOTTOM: 0pt; - MARGIN-TOP: 0pt -} -LI -{ - LIST-STYLE: square; - MARGIN-LEFT: 0px -} -.expandable -{ - CURSOR: hand -} -.expanded -{ - color: black -} -.collapsed -{ - DISPLAY: none -} -.foot -{ -BACKGROUND-COLOR: #ffffff; -BORDER-BOTTOM: #cecf9c 1px solid; -BORDER-TOP: #cecf9c 2px solid -} -.settings -{ -MARGIN-LEFT: 25PX; -} -.help -{ -TEXT-ALIGN: right; -margin-right: 10px; -} diff --git a/reactos/tools/sysgen/FileSystemTreeView/_UpgradeReport_Files/UpgradeReport.xslt b/reactos/tools/sysgen/FileSystemTreeView/_UpgradeReport_Files/UpgradeReport.xslt deleted file mode 100644 index 83f4304ab60..00000000000 --- a/reactos/tools/sysgen/FileSystemTreeView/_UpgradeReport_Files/UpgradeReport.xslt +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- Solution: - Project: - - - - - - - -

- - - - - - - - - - - - - - - - - - - - - - - - src - - - - - - - - - - - - -
FilenameStatusErrorsWarnings
- javascript:document.images[''].click()src - - - - Converted - - - - Converted - -
- - files - - - 1 file - - - Converted:
- Not converted -
-
-
- - - - : - - - - - - - - - Conversion Report - <xsl:if test="Properties/Property[@Name='LogNumber']"> - <xsl:value-of select="Properties/Property[@Name='LogNumber']/@Value"/> - </xsl:if> - - - - -

Conversion Report -

- -

- Time of Conversion:
-

- - - - - - - - - - - - - - - - - - - - - - - - -

- - - - - -
- Conversion Settings -

- - -
-
diff --git a/reactos/tools/sysgen/FileSystemTreeView/_UpgradeReport_Files/UpgradeReport_Minus.gif b/reactos/tools/sysgen/FileSystemTreeView/_UpgradeReport_Files/UpgradeReport_Minus.gif deleted file mode 100644 index 17751cb2fd5..00000000000 Binary files a/reactos/tools/sysgen/FileSystemTreeView/_UpgradeReport_Files/UpgradeReport_Minus.gif and /dev/null differ diff --git a/reactos/tools/sysgen/FileSystemTreeView/_UpgradeReport_Files/UpgradeReport_Plus.gif b/reactos/tools/sysgen/FileSystemTreeView/_UpgradeReport_Files/UpgradeReport_Plus.gif deleted file mode 100644 index f6009ca3f6b..00000000000 Binary files a/reactos/tools/sysgen/FileSystemTreeView/_UpgradeReport_Files/UpgradeReport_Plus.gif and /dev/null differ diff --git a/reactos/tools/sysgen/FileSystemTreeView/bin/Debug/DirectoryTreeView.exe b/reactos/tools/sysgen/FileSystemTreeView/bin/Debug/DirectoryTreeView.exe deleted file mode 100644 index c893a8ea121..00000000000 Binary files a/reactos/tools/sysgen/FileSystemTreeView/bin/Debug/DirectoryTreeView.exe and /dev/null differ diff --git a/reactos/tools/sysgen/FileSystemTreeView/bin/Debug/DirectoryTreeView.pdb b/reactos/tools/sysgen/FileSystemTreeView/bin/Debug/DirectoryTreeView.pdb deleted file mode 100644 index 0baced4e8e9..00000000000 Binary files a/reactos/tools/sysgen/FileSystemTreeView/bin/Debug/DirectoryTreeView.pdb and /dev/null differ diff --git a/reactos/tools/sysgen/FileSystemTreeView/bin/Debug/DirectoryTreeView.vshost.exe b/reactos/tools/sysgen/FileSystemTreeView/bin/Debug/DirectoryTreeView.vshost.exe deleted file mode 100644 index ce3f102c36b..00000000000 Binary files a/reactos/tools/sysgen/FileSystemTreeView/bin/Debug/DirectoryTreeView.vshost.exe and /dev/null differ diff --git a/reactos/tools/sysgen/FileSystemTreeView/icons/folder.ico b/reactos/tools/sysgen/FileSystemTreeView/icons/folder.ico deleted file mode 100644 index c9e4b0b4a38..00000000000 Binary files a/reactos/tools/sysgen/FileSystemTreeView/icons/folder.ico and /dev/null differ diff --git a/reactos/tools/sysgen/RosBuilder/Controls/CatalogTriStateTreeView.cs b/reactos/tools/sysgen/RosBuilder/Controls/CatalogTriStateTreeView.cs deleted file mode 100644 index c4309b01166..00000000000 --- a/reactos/tools/sysgen/RosBuilder/Controls/CatalogTriStateTreeView.cs +++ /dev/null @@ -1,220 +0,0 @@ -using System; -using System.Drawing; -using System.Text; -using System.Collections.Generic; -using System.IO; -using System.Windows.Forms; - -using SIL.FieldWorks.Common.Controls; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine; -using SysGen.BuildEngine.Tasks; - -namespace TriStateTreeViewDemo -{ - public class CatalogTriStateTreeView : TriStateTreeView - { - private ISysGenDesigner m_SysGenDesigner = null; - private TreeNode m_PlatformNode = null; - - public CatalogTriStateTreeView() - { - } - - private void CatalogTriStateTreeView_BeforeCheck(object sender, TreeViewCancelEventArgs e) - { - if (m_SysGenDesigner.SysGenEngine.Project != null) - { - if (e.Node is ModuleTreeNode) - { - //Get the underlying module - ModuleTreeNode moduleNode = e.Node as ModuleTreeNode; - - if (GetChecked(e.Node) == CheckState.Unchecked) - { - //Add the selected node and dependencies - m_SysGenDesigner.PlatformController.Add(moduleNode.Module); - } - else - { - //Remove the module from our platform - m_SysGenDesigner.PlatformController.Remove(moduleNode.Module); - } - - //Update current module status - UpdateCatalogTree(); - } - else if (e.Node is FolderTreeNode) - { - if (m_AutoUpdatingParents == false) - { - //e.Cancel = (AddTreeNodeModules(e.Node) == false); - } - } - } - else - { - MessageBox.Show("Cannot modify a catalog tree without platform associated"); - } - } - - public void SetCatalog(ISysGenDesigner sysGenDesigner) - { - //Set the software catalog - m_SysGenDesigner = sysGenDesigner; - - //Load the platform tree catalog - LoadCatalogTree(); - UpdateCatalogTree(); - - NodeMouseClick += new TreeNodeMouseClickEventHandler(CatalogTriStateTreeView_NodeMouseClick); - } - - void CatalogTriStateTreeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) - { - ModuleTreeNode moduleNode = e.Node as ModuleTreeNode; - - if (moduleNode != null) - m_SysGenDesigner.InspectedObject = moduleNode.Module; - } - - private void LoadCatalogTree() - { - m_PlatformNode = new TreeNode(); - - LoadPlatformModules(m_PlatformNode, m_SysGenDesigner.SysGenEngine.ProjectTask); - - Nodes.Clear(); - Nodes.Add(m_PlatformNode); - - m_PlatformNode.Text = RootNodeText; - m_PlatformNode.Expand(); - } - - private void UpdateCatalogTree() - { - BeginUpdate(); - BeforeCheck -= new TreeViewCancelEventHandler(CatalogTriStateTreeView_BeforeCheck); - - m_PlatformNode.Text = RootNodeText; - m_PlatformNode.Expand(); - - UpdatePlatformModules(m_PlatformNode); - - EndUpdate(); - BeforeCheck += new TreeViewCancelEventHandler(CatalogTriStateTreeView_BeforeCheck); - } - - private string RootNodeText - { - get - { - return string.Format("Catalog ({0} Modules-{1} Available)", - m_SysGenDesigner.PlatformController.Project.Platform.Modules.Count, - m_SysGenDesigner.PlatformController.Project.Modules.Count); - } - } - - private void UpdatePlatformModules(TreeNode node) - { - if (node is ModuleTreeNode) - { - //Get the underlying module - ModuleTreeNode moduleNode = node as ModuleTreeNode; - - if (moduleNode != null) - { - if (m_SysGenDesigner.PlatformController.Project.Platform.Modules.Contains(moduleNode.Module)) - { - SetChecked(moduleNode, CheckState.Checked); - } - else - { - SetChecked(moduleNode, CheckState.Unchecked); - } - } - } - else - { - foreach (TreeNode subNode in node.Nodes) - { - UpdatePlatformModules(subNode); - } - } - } - - private void LoadPlatformModules(TreeNode node, Task task) - { - if (task is ModuleTask) - { - RBuildModule module = ((ModuleTask)task).Module; - - node.Nodes.Add(new ModuleTreeNode(module)); - } - else if (task is ITaskContainer) - { - if (task is DirectoryTask) - { - FolderTreeNode taskNode = new FolderTreeNode(((DirectoryTask)task).Name); - - node.Nodes.Add(taskNode); - - foreach (Task innerTask in ((ITaskContainer)task).ChildTasks) - { - LoadPlatformModules(taskNode, innerTask); - } - } - else - { - foreach (Task innerTask in ((ITaskContainer)task).ChildTasks) - { - LoadPlatformModules(node, innerTask); - } - } - } - } - - public abstract class CatalogTreeNode : TreeNode - { - public abstract string NodeName { get; } - } - - public class ModuleTreeNode : CatalogTreeNode - { - RBuildModule m_Module = null; - - public ModuleTreeNode(RBuildModule module) - { - m_Module = module; - Text = module.Name; - } - - public RBuildModule Module - { - get { return m_Module; } - } - - public override string NodeName - { - get { return Module.Name; } - } - } - - public class FolderTreeNode : CatalogTreeNode - { - private string m_FolderName = null; - - public FolderTreeNode(string name) - { - m_FolderName = name; - Text = name; - } - - public override string NodeName - { - get { return m_FolderName; } - } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/RosBuilder/Controls/ModuleFiltersListView.cs b/reactos/tools/sysgen/RosBuilder/Controls/ModuleFiltersListView.cs deleted file mode 100644 index 2228f2b729d..00000000000 --- a/reactos/tools/sysgen/RosBuilder/Controls/ModuleFiltersListView.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Text; -using System.Windows.Forms; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine; -using SysGen.BuildEngine.Tasks; - -namespace TriStateTreeViewDemo -{ - public class ModuleFiltersListViewItem : ListViewItem - { - private ModuleFilter m_ModuleFilter = null; - - public ModuleFiltersListViewItem(ModuleFilter filter) - { - m_ModuleFilter = filter; - - Text = filter.Name; - SubItems.Add(filter.Modules.Count.ToString()); - } - - public ModuleFilter Filter - { - get { return m_ModuleFilter; } - } - } - - public class ModuleFiltersListView : ListView - { - private ISysGenDesigner m_SysGenDesigner = null; - - public ModuleFiltersListView() - { - View = View.Details; - - FullRowSelect = true; - CheckBoxes = true; - - Columns.Add("Name", 200); - Columns.Add("Modules", 100); - } - - public void SetCatalog(ISysGenDesigner sysGenDesigner) - { - //Set the software catalog - m_SysGenDesigner = sysGenDesigner; - //m_SysGenDesigner.PlatformController.PlatformModulesUpdated += new EventHandler(PlatformController_PlatformModulesUpdated); - - foreach (ModuleFilter filter in sysGenDesigner.ModuleFilterController.ModuleFilters) - { - Items.Add(new ModuleFiltersListViewItem(filter)); - } - } - - //protected override void OnItemCheck(ItemCheckEventArgs ice) - //{ - // base.OnItemCheck(ice); - //} - - //protected override void OnItemChecked(ItemCheckedEventArgs e) - //{ - // base.OnItemChecked(e); - //} - - private void PlatformController_PlatformModulesUpdated(object sender, EventArgs e) - { - BeginUpdate(); - - foreach (ModuleFiltersListViewItem filterItem in Items) - { - foreach (RBuildModule module in m_SysGenDesigner.ProjectController.Project.Platform.Modules) - { - if (!filterItem.Filter.Modules.Contains(module)) - { - filterItem.Checked = false; - break; - } - } - - filterItem.Checked = true; - } - - EndUpdate(); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/RosBuilder/Controls/NewItemListView.cs b/reactos/tools/sysgen/RosBuilder/Controls/NewItemListView.cs deleted file mode 100644 index e2e28dc11f5..00000000000 --- a/reactos/tools/sysgen/RosBuilder/Controls/NewItemListView.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Text; -using System.Windows.Forms; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine; -using SysGen.BuildEngine.Tasks; - -namespace TriStateTreeViewDemo -{ - public abstract class NewItemListViewItem : ListViewItem - { - protected ISysGenDesigner m_SysGenDesigner = null; - - public NewItemListViewItem(ISysGenDesigner designer) - { - m_SysGenDesigner = designer; - } - - public abstract string Description { get; } - public abstract string DefaultFileName { get; } - - public virtual void Apply() - { - } - } - - public class ModuleFiltersNewItemListViewItem : NewItemListViewItem - { - private ModuleFilter m_ModuleFilter = null; - - public ModuleFiltersNewItemListViewItem(ISysGenDesigner designer ,ModuleFilter filter): base(designer) - { - m_ModuleFilter = filter; - - Text = filter.Name; - } - - public override string Description - { - get { return m_ModuleFilter.Name; } - } - - public override string DefaultFileName - { - get { return null; } - } - - public override void Apply() - { - m_SysGenDesigner.ModuleFilterController.Apply(m_ModuleFilter); - } - } - - public class LanguageNewItemListViewItem : NewItemListViewItem - { - private RBuildLanguage m_Language = null; - - public LanguageNewItemListViewItem(ISysGenDesigner designer, RBuildLanguage language) - : base(designer) - { - m_Language = language; - - Text = language.Name; - } - - public override string Description - { - get { return m_Language.Name; } - } - - public override string DefaultFileName - { - get { return null; } - } - - public override void Apply() - { - m_SysGenDesigner.ProjectController.AddLanguage(m_Language); - } - } - - public class DebugChannelNewItemListViewItem : NewItemListViewItem - { - private RBuildDebugChannel m_DebugChannel = null; - - public DebugChannelNewItemListViewItem(ISysGenDesigner designer, RBuildDebugChannel channel) - : base(designer) - { - m_DebugChannel = channel; - - Text = channel.Name; - } - - public override string Description - { - get { return m_DebugChannel.Name; } - } - - public override string DefaultFileName - { - get { return null; } - } - - public override void Apply() - { - m_SysGenDesigner.ProjectController.AddDebugChannel(m_DebugChannel); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/RosBuilder/Controls/PlatformTreeView.cs b/reactos/tools/sysgen/RosBuilder/Controls/PlatformTreeView.cs deleted file mode 100644 index 1f12d95df50..00000000000 --- a/reactos/tools/sysgen/RosBuilder/Controls/PlatformTreeView.cs +++ /dev/null @@ -1,306 +0,0 @@ -using System; -using System.Drawing; -using System.Text; -using System.Collections.Generic; -using System.IO; -using System.Windows.Forms; - -using SIL.FieldWorks.Common.Controls; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine; -using SysGen.BuildEngine.Tasks; - -namespace TriStateTreeViewDemo -{ - public class PlatformTreeView : TriStateTreeView - { - private ISysGenDesigner m_SysGenDesigner = null; - private PlatformTreeNode m_PlatformNode = null; - - public PlatformTreeView() - { - } - - private void CatalogTriStateTreeView_BeforeCheck(object sender, TreeViewCancelEventArgs e) - { - if (m_SysGenDesigner.ProjectController.Project != null) - { - if (e.Node is ModuleTreeNode) - { - //Get the underlying module - ModuleTreeNode moduleNode = e.Node as ModuleTreeNode; - - if (GetChecked(e.Node) == CheckState.Unchecked) - { - //Add the selected node and dependencies - m_SysGenDesigner.ProjectController.Add(moduleNode.Module); - } - else - { - //Remove the module from our platform - m_SysGenDesigner.ProjectController.Remove(moduleNode.Module); - } - - } - else if (e.Node is FolderTreeNode) - { - } - } - else - { - MessageBox.Show("Cannot modify a catalog tree without platform associated"); - } - - /* cancel the paint event*/ - e.Cancel = true; - } - - public void SetCatalog(ISysGenDesigner sysGenDesigner) - { - //Set the software catalog - m_SysGenDesigner = sysGenDesigner; - - m_SysGenDesigner.ProjectController.PlatformModulesUpdated += new EventHandler(PlatformController_PlatformModulesUpdated); - - //Load the platform tree catalog - LoadCatalogTree(); - UpdateCatalogTree(); - - NodeMouseClick += new TreeNodeMouseClickEventHandler(CatalogTriStateTreeView_NodeMouseClick); - } - - void PlatformController_PlatformModulesUpdated(object sender, EventArgs e) - { - //Update current module status - UpdateCatalogTree(); - } - - void CatalogTriStateTreeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) - { - CatalogTreeNode catalogNode = e.Node as CatalogTreeNode; - - if (catalogNode != null) - m_SysGenDesigner.InspectedObject = catalogNode.NodeObject; - } - - private void LoadCatalogTree() - { - m_PlatformNode = new PlatformTreeNode(m_SysGenDesigner.ProjectController.Project.Platform); - - LoadPlatformModules(m_PlatformNode); - //LoadPlatformModules(m_PlatformNode, m_SysGenDesigner.SysGenEngine.ProjectTask); - - Nodes.Clear(); - Nodes.Add(m_PlatformNode); - - m_PlatformNode.Text = RootNodeText; - m_PlatformNode.Expand(); - } - - private void UpdateCatalogTree() - { - BeginUpdate(); - BeforeCheck -= new TreeViewCancelEventHandler(CatalogTriStateTreeView_BeforeCheck); - - m_PlatformNode.Text = RootNodeText; - m_PlatformNode.Expand(); - - UpdatePlatformModules(m_PlatformNode); - - EndUpdate(); - BeforeCheck += new TreeViewCancelEventHandler(CatalogTriStateTreeView_BeforeCheck); - } - - private string RootNodeText - { - get - { - return string.Format("Catalog ({0} Modules-{1} Available)", - m_SysGenDesigner.ProjectController.Project.Platform.Modules.Count, - m_SysGenDesigner.ProjectController.Project.Modules.Count); - } - } - - private void UpdatePlatformModules(TreeNode node) - { - if (node is ModuleTreeNode) - { - //Get the underlying module - ModuleTreeNode moduleNode = node as ModuleTreeNode; - - if (moduleNode != null) - { - if (m_SysGenDesigner.ProjectController.Project.Platform.Modules.Contains(moduleNode.Module)) - { - SetChecked(moduleNode, CheckState.Checked); - } - else - { - SetChecked(moduleNode, CheckState.Unchecked); - } - } - } - else - { - foreach (TreeNode subNode in node.Nodes) - { - UpdatePlatformModules(subNode); - } - } - } - - private void LoadPlatformModules(TreeNode node) - { - foreach (RBuildModule module in m_SysGenDesigner.ProjectController.AvailableModules) - { - TreeNode parent = node; - - foreach (string part in module.CatalogPath.Split(new char[] { '\\' })) - { - if (part.Length > 0) - { - parent = GetFolderNode(parent, part); - } - } - - parent.Nodes.Add(new ModuleTreeNode(module)); - } - } - - private TreeNode GetFolderNode(TreeNode parent, string name) - { - foreach (TreeNode node in parent.Nodes) - { - CatalogTreeNode folderNode = node as CatalogTreeNode; - - if (folderNode != null) - { - if (folderNode.NodeName == name) - { - return folderNode; - } - } - } - - FolderTreeNode newNode = new FolderTreeNode(name); - - parent.Nodes.Add(newNode); - - return newNode; - } - - //private void LoadPlatformModules(TreeNode node, Task task) - //{ - // foreach (string path in - // /* - // if (task is ModuleTask) - // { - // RBuildModule module = ((ModuleTask)task).Module; - - // node.Nodes.Add(new ModuleTreeNode(module)); - // } - // else if (task is ITaskContainer) - // { - // if (task is DirectoryTask) - // { - // FolderTreeNode taskNode = new FolderTreeNode(((DirectoryTask)task).Name); - - // node.Nodes.Add(taskNode); - - // foreach (Task innerTask in ((ITaskContainer)task).ChildTasks) - // { - // LoadPlatformModules(taskNode, innerTask); - // } - // } - // else - // { - // foreach (Task innerTask in ((ITaskContainer)task).ChildTasks) - // { - // LoadPlatformModules(node, innerTask); - // } - // } - // } - // */ - //} - - public abstract class CatalogTreeNode : TreeNode - { - public abstract string NodeName { get; } - public abstract object NodeObject { get;} - } - - public class PlatformTreeNode : CatalogTreeNode - { - RBuildPlatform m_Platform = null; - - public PlatformTreeNode(RBuildPlatform platform) - { - m_Platform = platform; - Text = platform.Name; - } - - public RBuildPlatform Platform - { - get { return m_Platform; } - } - - public override string NodeName - { - get { return m_Platform.Name; } - } - - public override object NodeObject - { - get { return Platform; } - } - } - - public class ModuleTreeNode : CatalogTreeNode - { - RBuildModule m_Module = null; - - public ModuleTreeNode(RBuildModule module) - { - m_Module = module; - Text = module.Name; - } - - public RBuildModule Module - { - get { return m_Module; } - } - - public override string NodeName - { - get { return Module.Name; } - } - - public override object NodeObject - { - get { return Module; } - } - } - - public class FolderTreeNode : CatalogTreeNode - { - private string m_FolderName = null; - - public FolderTreeNode(string name) - { - m_FolderName = name; - Text = name; - } - - public override string NodeName - { - get { return m_FolderName; } - } - - public override object NodeObject - { - get { return NodeName; } - } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/RosBuilder/Controls/ProjectTreeView.cs b/reactos/tools/sysgen/RosBuilder/Controls/ProjectTreeView.cs deleted file mode 100644 index 35f827319a4..00000000000 --- a/reactos/tools/sysgen/RosBuilder/Controls/ProjectTreeView.cs +++ /dev/null @@ -1,161 +0,0 @@ -using System; -using System.Windows.Forms; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine; -using SysGen.BuildEngine.Tasks; - -namespace TriStateTreeViewDemo -{ - public class ProjectTreeView : TreeView - { - private ISysGenDesigner m_SysGenDesigner = null; - private TreeNode m_Project = new TreeNode("Project"); - private TreeNode m_Platforms = new TreeNode("Platform"); - private TreeNode m_Languages = new TreeNode("Languages"); - private TreeNode m_DebugChannels = new TreeNode("Debug Channels"); - //private TreeNode m_Filters = new TreeNode("Filters"); - private TreeNode m_Files = new TreeNode("Files"); - private TreeNode m_Registry = new TreeNode("Registry"); - //private TreeNode m_Filters = new TreeNode("Filters"); - - public ProjectTreeView() - { - } - - public void SetCatalog(ISysGenDesigner sysGenDesigner) - { - //Set the software catalog - m_SysGenDesigner = sysGenDesigner; - m_SysGenDesigner.ProjectController.ProjectLoaded += new EventHandler(PlatformController_ProjectLoaded); - m_SysGenDesigner.ProjectController.ProjectUpdated += new EventHandler(PlatformController_ProjectUpdated); - - - LoadProject(); - } - - void PlatformController_ProjectLoaded(object sender, EventArgs e) - { - LoadProject(); - UpdateProject(); - } - - void PlatformController_ProjectUpdated(object sender, EventArgs e) - { - UpdateProject(); - } - - private void LoadProject() - { - Nodes.Clear(); - - m_Project = new ProjectTreeNode(m_SysGenDesigner.ProjectController.SysGenProject); - m_Project.Nodes.Add(m_Platforms); - m_Project.Nodes.Add(m_Languages); - m_Project.Nodes.Add(m_DebugChannels); -// m_Project.Nodes.Add(m_Filters); - m_Project.Nodes.Add(m_Files); - m_Project.Nodes.Add(m_Registry); - m_Project.Expand(); - - Nodes.Add(m_Project); - } - - private void UpdateProject() - { - m_Languages.Nodes.Clear(); - m_DebugChannels.Nodes.Clear(); - - foreach (RBuildLanguage language in m_SysGenDesigner.ProjectController.Project.Platform.Languages) - { - m_Languages.Nodes.Add(language.Name); - } - - foreach (RBuildDebugChannel channel in m_SysGenDesigner.ProjectController.Project.Platform.DebugChannels) - { - m_DebugChannels.Nodes.Add(channel.Name); - } - } - - public abstract class CatalogTreeNode : TreeNode - { - public abstract string NodeName { get; } - public abstract object NodeObject { get;} - } - - public class ProjectTreeNode : CatalogTreeNode - { - Project m_Platform = null; - - public ProjectTreeNode(Project platform) - { - m_Platform = platform; - Text = platform.FileName; - } - - public Project Platform - { - get { return m_Platform; } - } - - public override string NodeName - { - get { return m_Platform.Name; } - } - - public override object NodeObject - { - get { return Platform; } - } - } - - public class ModuleTreeNode : CatalogTreeNode - { - RBuildModule m_Module = null; - - public ModuleTreeNode(RBuildModule module) - { - m_Module = module; - Text = module.Name; - } - - public RBuildModule Module - { - get { return m_Module; } - } - - public override string NodeName - { - get { return Module.Name; } - } - - public override object NodeObject - { - get { return Module; } - } - } - - public class FolderTreeNode : CatalogTreeNode - { - private string m_FolderName = null; - - public FolderTreeNode(string name) - { - m_FolderName = name; - Text = name; - } - - public override string NodeName - { - get { return m_FolderName; } - } - - public override object NodeObject - { - get { return NodeName; } - } - } - } -} diff --git a/reactos/tools/sysgen/RosBuilder/Controls/RegistryEditor.Designer.cs b/reactos/tools/sysgen/RosBuilder/Controls/RegistryEditor.Designer.cs deleted file mode 100644 index 1c20f5713ba..00000000000 --- a/reactos/tools/sysgen/RosBuilder/Controls/RegistryEditor.Designer.cs +++ /dev/null @@ -1,118 +0,0 @@ -namespace RosBuilder.Controls -{ - partial class RegistryEditor - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.listView1 = new System.Windows.Forms.ListView(); - this.treeView1 = new System.Windows.Forms.TreeView(); - this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); - this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); - this.columnHeader3 = new System.Windows.Forms.ColumnHeader(); - this.splitContainer1.Panel1.SuspendLayout(); - this.splitContainer1.Panel2.SuspendLayout(); - this.splitContainer1.SuspendLayout(); - this.SuspendLayout(); - // - // splitContainer1 - // - this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer1.Location = new System.Drawing.Point(0, 0); - this.splitContainer1.Name = "splitContainer1"; - // - // splitContainer1.Panel1 - // - this.splitContainer1.Panel1.Controls.Add(this.treeView1); - // - // splitContainer1.Panel2 - // - this.splitContainer1.Panel2.Controls.Add(this.listView1); - this.splitContainer1.Size = new System.Drawing.Size(623, 542); - this.splitContainer1.SplitterDistance = 207; - this.splitContainer1.TabIndex = 0; - // - // listView1 - // - this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader1, - this.columnHeader2, - this.columnHeader3}); - this.listView1.Dock = System.Windows.Forms.DockStyle.Fill; - this.listView1.Location = new System.Drawing.Point(0, 0); - this.listView1.Name = "listView1"; - this.listView1.Size = new System.Drawing.Size(412, 542); - this.listView1.TabIndex = 0; - this.listView1.UseCompatibleStateImageBehavior = false; - this.listView1.View = System.Windows.Forms.View.Details; - // - // treeView1 - // - this.treeView1.Dock = System.Windows.Forms.DockStyle.Fill; - this.treeView1.Location = new System.Drawing.Point(0, 0); - this.treeView1.Name = "treeView1"; - this.treeView1.Size = new System.Drawing.Size(207, 542); - this.treeView1.TabIndex = 0; - // - // columnHeader1 - // - this.columnHeader1.Text = "Name"; - this.columnHeader1.Width = 159; - // - // columnHeader2 - // - this.columnHeader2.Text = "Type"; - this.columnHeader2.Width = 130; - // - // columnHeader3 - // - this.columnHeader3.Text = "Data"; - // - // RegistryEditor - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.splitContainer1); - this.Name = "RegistryEditor"; - this.Size = new System.Drawing.Size(623, 542); - this.splitContainer1.Panel1.ResumeLayout(false); - this.splitContainer1.Panel2.ResumeLayout(false); - this.splitContainer1.ResumeLayout(false); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.SplitContainer splitContainer1; - private System.Windows.Forms.TreeView treeView1; - private System.Windows.Forms.ListView listView1; - private System.Windows.Forms.ColumnHeader columnHeader1; - private System.Windows.Forms.ColumnHeader columnHeader2; - private System.Windows.Forms.ColumnHeader columnHeader3; - } -} diff --git a/reactos/tools/sysgen/RosBuilder/Controls/RegistryEditor.cs b/reactos/tools/sysgen/RosBuilder/Controls/RegistryEditor.cs deleted file mode 100644 index 738adfbefc0..00000000000 --- a/reactos/tools/sysgen/RosBuilder/Controls/RegistryEditor.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Text; -using System.Windows.Forms; - -namespace RosBuilder.Controls -{ - public partial class RegistryEditor : UserControl - { - public RegistryEditor() - { - InitializeComponent(); - } - } -} diff --git a/reactos/tools/sysgen/RosBuilder/Controls/RegistryEditor.resx b/reactos/tools/sysgen/RosBuilder/Controls/RegistryEditor.resx deleted file mode 100644 index 19dc0dd8b39..00000000000 --- a/reactos/tools/sysgen/RosBuilder/Controls/RegistryEditor.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/reactos/tools/sysgen/RosBuilder/Form1.Designer.cs b/reactos/tools/sysgen/RosBuilder/Form1.Designer.cs deleted file mode 100644 index 04418fb8104..00000000000 --- a/reactos/tools/sysgen/RosBuilder/Form1.Designer.cs +++ /dev/null @@ -1,38 +0,0 @@ -namespace RosBuilder -{ - partial class Form1 - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Text = "Form1"; - } - - #endregion - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/RosBuilder/Form1.cs b/reactos/tools/sysgen/RosBuilder/Form1.cs deleted file mode 100644 index a11fbad5119..00000000000 --- a/reactos/tools/sysgen/RosBuilder/Form1.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; -using System.Windows.Forms; - -namespace RosBuilder -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/RosBuilder/Form1.resx b/reactos/tools/sysgen/RosBuilder/Form1.resx deleted file mode 100644 index 19dc0dd8b39..00000000000 --- a/reactos/tools/sysgen/RosBuilder/Form1.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/reactos/tools/sysgen/RosBuilder/Inspectors/PlatformInspector.cs b/reactos/tools/sysgen/RosBuilder/Inspectors/PlatformInspector.cs deleted file mode 100644 index 7d798289853..00000000000 --- a/reactos/tools/sysgen/RosBuilder/Inspectors/PlatformInspector.cs +++ /dev/null @@ -1,155 +0,0 @@ -using System; -using System.Windows.Forms; -using System.ComponentModel; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace TriStateTreeViewDemo -{ - public class PlatformInspector - { - private RBuildPlatform m_Platform = null; - - public PlatformInspector(RBuildPlatform platform) - { - m_Platform = platform; - } - - [Category("Info")] - public string Name - { - get { return m_Platform.Name; } - set { m_Platform.Name = value; } - } - - [Category("Info")] - public string Description - { - get { return m_Platform.Description; } - set { m_Platform.Description = value; } - } - - [Category("Applications")] - [Description("The module to be used as a shell for the platform")] - public string Shell - { - set - { - if (value != string.Empty) - { - try - { - RBuildModule module = m_Platform.Modules.GetByName(value); - - if (module == null) - throw new ArgumentException("Unknown '" + value + "' shell module"); - - if (module.Type != ModuleType.Win32CUI && - module.Type != ModuleType.Win32GUI) - throw new ArgumentException("Only Win32 GUI and CUI applications can be set as shell"); - - /* set the shell to use */ - m_Platform.Shell = module; - } - catch (ArgumentException e) - { - MessageBox.Show(e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - } - get - { - if (m_Platform.Shell != null) - return m_Platform.Shell.Name; - - return string.Empty; - } - } - - [Category("Applications")] - [Description("The module to be used as a screensaver for the platform")] - public string Screensaver - { - set - { - if (value != string.Empty) - { - try - { - RBuildModule module = m_Platform.Modules.GetByName(value); - - if (module == null) - throw new ArgumentException("Unknown '" + value + "' screen saver module"); - - if (module.Type != ModuleType.Win32SCR) - throw new ArgumentException("Only Win32 SCR applications can be set as shell"); - - /* set the shell to use */ - m_Platform.Screensaver = module; - } - catch (ArgumentException e) - { - MessageBox.Show(e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - } - get - { - if (m_Platform.Screensaver != null) - return m_Platform.Screensaver.Name; - - return string.Empty; - } - } - - //public IList DebugChannels - //{ - // get { return m_Platform.DebugChannels; } - //} - - [Category("Appareance")] - [Description("The module to be used as a screensaver for the platform")] - public string Wallpaper - { - set - { - if (value != string.Empty) - { - RBuildWallpaperFile iW = new RBuildWallpaperFile(); - - iW.Name = value; - - m_Platform.Wallpaper = iW; - - //foreach (RBuildModule module in m_Platform.Modules) - //{ - // foreach (RBuildFile file in module.Files) - // { - // RBuildInstallWallpaperFile wallpaper = file as RBuildInstallWallpaperFile; - - // if (wallpaper != null) - // { - // if (wallpaper.ID.ToLower() == value.ToLower()) - // { - // m_Platform.Wallpaper = wallpaper; - // } - // } - // } - //} - - // specified wallpaper not found - //throw new ArgumentException(); - } - } - get - { - if (m_Platform.Wallpaper != null) - return m_Platform.Wallpaper.ID; - - return string.Empty; - } - } - } -} diff --git a/reactos/tools/sysgen/RosBuilder/MainForm.Designer.cs b/reactos/tools/sysgen/RosBuilder/MainForm.Designer.cs deleted file mode 100644 index 9ebe4ebeefd..00000000000 --- a/reactos/tools/sysgen/RosBuilder/MainForm.Designer.cs +++ /dev/null @@ -1,654 +0,0 @@ -namespace TriStateTreeViewDemo -{ - partial class MainForm - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); - this.statusStrip1 = new System.Windows.Forms.StatusStrip(); - this.toolStrip1 = new System.Windows.Forms.ToolStrip(); - this.newToolStripButton = new System.Windows.Forms.ToolStripButton(); - this.openToolStripButton = new System.Windows.Forms.ToolStripButton(); - this.saveToolStripButton = new System.Windows.Forms.ToolStripButton(); - this.toolStripSeparator = new System.Windows.Forms.ToolStripSeparator(); - this.cutToolStripButton = new System.Windows.Forms.ToolStripButton(); - this.copyToolStripButton = new System.Windows.Forms.ToolStripButton(); - this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator(); - this.saveConfigToolStripButton = new System.Windows.Forms.ToolStripButton(); - this.cmbArchitecture = new System.Windows.Forms.ToolStripComboBox(); - this.cmbDebug = new System.Windows.Forms.ToolStripComboBox(); - this.cmbOptimization = new System.Windows.Forms.ToolStripComboBox(); - this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.helpToolStripButton = new System.Windows.Forms.ToolStripButton(); - this.menuStrip1 = new System.Windows.Forms.MenuStrip(); - this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); - this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); - this.printToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.printPreviewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); - this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.platformToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.addFiltersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.addLanguagesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.addDebToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.undoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.redoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); - this.cutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.pasteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); - this.selectAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.customizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.contentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.indexToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.searchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator(); - this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.pgProperties = new System.Windows.Forms.PropertyGrid(); - this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.splitContainer2 = new System.Windows.Forms.SplitContainer(); - this.tvPlatform = new TriStateTreeViewDemo.PlatformTreeView(); - this.tvProject = new TriStateTreeViewDemo.ProjectTreeView(); - this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); - this.statusStrip1.SuspendLayout(); - this.toolStrip1.SuspendLayout(); - this.menuStrip1.SuspendLayout(); - this.splitContainer1.Panel1.SuspendLayout(); - this.splitContainer1.Panel2.SuspendLayout(); - this.splitContainer1.SuspendLayout(); - this.splitContainer2.Panel1.SuspendLayout(); - this.splitContainer2.Panel2.SuspendLayout(); - this.splitContainer2.SuspendLayout(); - this.SuspendLayout(); - // - // statusStrip1 - // - this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.toolStripStatusLabel1}); - this.statusStrip1.Location = new System.Drawing.Point(0, 601); - this.statusStrip1.Name = "statusStrip1"; - this.statusStrip1.Size = new System.Drawing.Size(820, 22); - this.statusStrip1.TabIndex = 5; - this.statusStrip1.Text = "statusStrip1"; - // - // toolStrip1 - // - this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.newToolStripButton, - this.openToolStripButton, - this.saveToolStripButton, - this.toolStripSeparator, - this.cutToolStripButton, - this.copyToolStripButton, - this.toolStripSeparator8, - this.saveConfigToolStripButton, - this.cmbArchitecture, - this.cmbDebug, - this.cmbOptimization, - this.toolStripSeparator1, - this.helpToolStripButton}); - this.toolStrip1.Location = new System.Drawing.Point(0, 24); - this.toolStrip1.Name = "toolStrip1"; - this.toolStrip1.Size = new System.Drawing.Size(820, 25); - this.toolStrip1.TabIndex = 6; - this.toolStrip1.Text = "toolStrip1"; - // - // newToolStripButton - // - this.newToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.newToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("newToolStripButton.Image"))); - this.newToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.newToolStripButton.Name = "newToolStripButton"; - this.newToolStripButton.Size = new System.Drawing.Size(23, 22); - this.newToolStripButton.Text = "&New"; - this.newToolStripButton.Click += new System.EventHandler(this.newToolStripButton_Click); - // - // openToolStripButton - // - this.openToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.openToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("openToolStripButton.Image"))); - this.openToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.openToolStripButton.Name = "openToolStripButton"; - this.openToolStripButton.Size = new System.Drawing.Size(23, 22); - this.openToolStripButton.Text = "&Open"; - this.openToolStripButton.Click += new System.EventHandler(this.openToolStripButton_Click); - // - // saveToolStripButton - // - this.saveToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.saveToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("saveToolStripButton.Image"))); - this.saveToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.saveToolStripButton.Name = "saveToolStripButton"; - this.saveToolStripButton.Size = new System.Drawing.Size(23, 22); - this.saveToolStripButton.Text = "&Save"; - this.saveToolStripButton.Click += new System.EventHandler(this.saveToolStripButton_Click); - // - // toolStripSeparator - // - this.toolStripSeparator.Name = "toolStripSeparator"; - this.toolStripSeparator.Size = new System.Drawing.Size(6, 25); - // - // cutToolStripButton - // - this.cutToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.cutToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("cutToolStripButton.Image"))); - this.cutToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.cutToolStripButton.Name = "cutToolStripButton"; - this.cutToolStripButton.Size = new System.Drawing.Size(23, 22); - this.cutToolStripButton.Text = "C&ut"; - // - // copyToolStripButton - // - this.copyToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.copyToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("copyToolStripButton.Image"))); - this.copyToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.copyToolStripButton.Name = "copyToolStripButton"; - this.copyToolStripButton.Size = new System.Drawing.Size(23, 22); - this.copyToolStripButton.Text = "&Copy"; - // - // toolStripSeparator8 - // - this.toolStripSeparator8.Name = "toolStripSeparator8"; - this.toolStripSeparator8.Size = new System.Drawing.Size(6, 25); - // - // saveConfigToolStripButton - // - this.saveConfigToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.saveConfigToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("saveConfigToolStripButton.Image"))); - this.saveConfigToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.saveConfigToolStripButton.Name = "saveConfigToolStripButton"; - this.saveConfigToolStripButton.Size = new System.Drawing.Size(69, 22); - this.saveConfigToolStripButton.Text = "&Save Config"; - this.saveConfigToolStripButton.Click += new System.EventHandler(this.saveConfigToolStripButton_Click); - // - // cmbArchitecture - // - this.cmbArchitecture.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cmbArchitecture.Name = "cmbArchitecture"; - this.cmbArchitecture.Size = new System.Drawing.Size(150, 25); - // - // cmbDebug - // - this.cmbDebug.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cmbDebug.Name = "cmbDebug"; - this.cmbDebug.Size = new System.Drawing.Size(75, 25); - // - // cmbOptimization - // - this.cmbOptimization.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cmbOptimization.Name = "cmbOptimization"; - this.cmbOptimization.Size = new System.Drawing.Size(75, 25); - // - // toolStripSeparator1 - // - this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); - // - // helpToolStripButton - // - this.helpToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.helpToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("helpToolStripButton.Image"))); - this.helpToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.helpToolStripButton.Name = "helpToolStripButton"; - this.helpToolStripButton.Size = new System.Drawing.Size(23, 22); - this.helpToolStripButton.Text = "He&lp"; - // - // menuStrip1 - // - this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.fileToolStripMenuItem, - this.platformToolStripMenuItem, - this.editToolStripMenuItem, - this.toolsToolStripMenuItem, - this.helpToolStripMenuItem}); - this.menuStrip1.Location = new System.Drawing.Point(0, 0); - this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Size = new System.Drawing.Size(820, 24); - this.menuStrip1.TabIndex = 7; - this.menuStrip1.Text = "menuStrip1"; - // - // fileToolStripMenuItem - // - this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.newToolStripMenuItem, - this.openToolStripMenuItem, - this.toolStripSeparator2, - this.saveToolStripMenuItem, - this.saveAsToolStripMenuItem, - this.toolStripSeparator3, - this.printToolStripMenuItem, - this.printPreviewToolStripMenuItem, - this.toolStripSeparator4, - this.exitToolStripMenuItem}); - this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; - this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20); - this.fileToolStripMenuItem.Text = "&File"; - // - // newToolStripMenuItem - // - this.newToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("newToolStripMenuItem.Image"))); - this.newToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; - this.newToolStripMenuItem.Name = "newToolStripMenuItem"; - this.newToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N))); - this.newToolStripMenuItem.Size = new System.Drawing.Size(151, 22); - this.newToolStripMenuItem.Text = "&New"; - // - // openToolStripMenuItem - // - this.openToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("openToolStripMenuItem.Image"))); - this.openToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; - this.openToolStripMenuItem.Name = "openToolStripMenuItem"; - this.openToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); - this.openToolStripMenuItem.Size = new System.Drawing.Size(151, 22); - this.openToolStripMenuItem.Text = "&Open"; - // - // toolStripSeparator2 - // - this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(148, 6); - // - // saveToolStripMenuItem - // - this.saveToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("saveToolStripMenuItem.Image"))); - this.saveToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; - this.saveToolStripMenuItem.Name = "saveToolStripMenuItem"; - this.saveToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S))); - this.saveToolStripMenuItem.Size = new System.Drawing.Size(151, 22); - this.saveToolStripMenuItem.Text = "&Save"; - // - // saveAsToolStripMenuItem - // - this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem"; - this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(151, 22); - this.saveAsToolStripMenuItem.Text = "Save &As"; - // - // toolStripSeparator3 - // - this.toolStripSeparator3.Name = "toolStripSeparator3"; - this.toolStripSeparator3.Size = new System.Drawing.Size(148, 6); - // - // printToolStripMenuItem - // - this.printToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("printToolStripMenuItem.Image"))); - this.printToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; - this.printToolStripMenuItem.Name = "printToolStripMenuItem"; - this.printToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.P))); - this.printToolStripMenuItem.Size = new System.Drawing.Size(151, 22); - this.printToolStripMenuItem.Text = "&Print"; - // - // printPreviewToolStripMenuItem - // - this.printPreviewToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("printPreviewToolStripMenuItem.Image"))); - this.printPreviewToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; - this.printPreviewToolStripMenuItem.Name = "printPreviewToolStripMenuItem"; - this.printPreviewToolStripMenuItem.Size = new System.Drawing.Size(151, 22); - this.printPreviewToolStripMenuItem.Text = "Print Pre&view"; - // - // toolStripSeparator4 - // - this.toolStripSeparator4.Name = "toolStripSeparator4"; - this.toolStripSeparator4.Size = new System.Drawing.Size(148, 6); - // - // exitToolStripMenuItem - // - this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; - this.exitToolStripMenuItem.Size = new System.Drawing.Size(151, 22); - this.exitToolStripMenuItem.Text = "E&xit"; - // - // platformToolStripMenuItem - // - this.platformToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.addFiltersToolStripMenuItem, - this.addLanguagesToolStripMenuItem, - this.addDebToolStripMenuItem}); - this.platformToolStripMenuItem.Name = "platformToolStripMenuItem"; - this.platformToolStripMenuItem.Size = new System.Drawing.Size(59, 20); - this.platformToolStripMenuItem.Text = "&Platform"; - // - // addFiltersToolStripMenuItem - // - this.addFiltersToolStripMenuItem.Name = "addFiltersToolStripMenuItem"; - this.addFiltersToolStripMenuItem.Size = new System.Drawing.Size(185, 22); - this.addFiltersToolStripMenuItem.Text = "&Add Filters"; - this.addFiltersToolStripMenuItem.Click += new System.EventHandler(this.addFiltersToolStripMenuItem_Click); - // - // addLanguagesToolStripMenuItem - // - this.addLanguagesToolStripMenuItem.Name = "addLanguagesToolStripMenuItem"; - this.addLanguagesToolStripMenuItem.Size = new System.Drawing.Size(185, 22); - this.addLanguagesToolStripMenuItem.Text = "&Add Languages"; - this.addLanguagesToolStripMenuItem.Click += new System.EventHandler(this.addLanguagesToolStripMenuItem_Click); - // - // addDebToolStripMenuItem - // - this.addDebToolStripMenuItem.Name = "addDebToolStripMenuItem"; - this.addDebToolStripMenuItem.Size = new System.Drawing.Size(185, 22); - this.addDebToolStripMenuItem.Text = "&Add Debug Channels"; - this.addDebToolStripMenuItem.Click += new System.EventHandler(this.addDebToolStripMenuItem_Click); - // - // editToolStripMenuItem - // - this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.undoToolStripMenuItem, - this.redoToolStripMenuItem, - this.toolStripSeparator5, - this.cutToolStripMenuItem, - this.copyToolStripMenuItem, - this.pasteToolStripMenuItem, - this.toolStripSeparator6, - this.selectAllToolStripMenuItem}); - this.editToolStripMenuItem.Name = "editToolStripMenuItem"; - this.editToolStripMenuItem.Size = new System.Drawing.Size(37, 20); - this.editToolStripMenuItem.Text = "&Edit"; - // - // undoToolStripMenuItem - // - this.undoToolStripMenuItem.Name = "undoToolStripMenuItem"; - this.undoToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Z))); - this.undoToolStripMenuItem.Size = new System.Drawing.Size(150, 22); - this.undoToolStripMenuItem.Text = "&Undo"; - // - // redoToolStripMenuItem - // - this.redoToolStripMenuItem.Name = "redoToolStripMenuItem"; - this.redoToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Y))); - this.redoToolStripMenuItem.Size = new System.Drawing.Size(150, 22); - this.redoToolStripMenuItem.Text = "&Redo"; - // - // toolStripSeparator5 - // - this.toolStripSeparator5.Name = "toolStripSeparator5"; - this.toolStripSeparator5.Size = new System.Drawing.Size(147, 6); - // - // cutToolStripMenuItem - // - this.cutToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("cutToolStripMenuItem.Image"))); - this.cutToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; - this.cutToolStripMenuItem.Name = "cutToolStripMenuItem"; - this.cutToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.X))); - this.cutToolStripMenuItem.Size = new System.Drawing.Size(150, 22); - this.cutToolStripMenuItem.Text = "Cu&t"; - // - // copyToolStripMenuItem - // - this.copyToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("copyToolStripMenuItem.Image"))); - this.copyToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; - this.copyToolStripMenuItem.Name = "copyToolStripMenuItem"; - this.copyToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C))); - this.copyToolStripMenuItem.Size = new System.Drawing.Size(150, 22); - this.copyToolStripMenuItem.Text = "&Copy"; - // - // pasteToolStripMenuItem - // - this.pasteToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("pasteToolStripMenuItem.Image"))); - this.pasteToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta; - this.pasteToolStripMenuItem.Name = "pasteToolStripMenuItem"; - this.pasteToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V))); - this.pasteToolStripMenuItem.Size = new System.Drawing.Size(150, 22); - this.pasteToolStripMenuItem.Text = "&Paste"; - // - // toolStripSeparator6 - // - this.toolStripSeparator6.Name = "toolStripSeparator6"; - this.toolStripSeparator6.Size = new System.Drawing.Size(147, 6); - // - // selectAllToolStripMenuItem - // - this.selectAllToolStripMenuItem.Name = "selectAllToolStripMenuItem"; - this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(150, 22); - this.selectAllToolStripMenuItem.Text = "Select &All"; - // - // toolsToolStripMenuItem - // - this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.customizeToolStripMenuItem, - this.optionsToolStripMenuItem}); - this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem"; - this.toolsToolStripMenuItem.Size = new System.Drawing.Size(44, 20); - this.toolsToolStripMenuItem.Text = "&Tools"; - // - // customizeToolStripMenuItem - // - this.customizeToolStripMenuItem.Name = "customizeToolStripMenuItem"; - this.customizeToolStripMenuItem.Size = new System.Drawing.Size(134, 22); - this.customizeToolStripMenuItem.Text = "&Customize"; - // - // optionsToolStripMenuItem - // - this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem"; - this.optionsToolStripMenuItem.Size = new System.Drawing.Size(134, 22); - this.optionsToolStripMenuItem.Text = "&Options"; - // - // helpToolStripMenuItem - // - this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.contentsToolStripMenuItem, - this.indexToolStripMenuItem, - this.searchToolStripMenuItem, - this.toolStripSeparator7, - this.aboutToolStripMenuItem}); - this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; - this.helpToolStripMenuItem.Size = new System.Drawing.Size(40, 20); - this.helpToolStripMenuItem.Text = "&Help"; - // - // contentsToolStripMenuItem - // - this.contentsToolStripMenuItem.Name = "contentsToolStripMenuItem"; - this.contentsToolStripMenuItem.Size = new System.Drawing.Size(129, 22); - this.contentsToolStripMenuItem.Text = "&Contents"; - // - // indexToolStripMenuItem - // - this.indexToolStripMenuItem.Name = "indexToolStripMenuItem"; - this.indexToolStripMenuItem.Size = new System.Drawing.Size(129, 22); - this.indexToolStripMenuItem.Text = "&Index"; - // - // searchToolStripMenuItem - // - this.searchToolStripMenuItem.Name = "searchToolStripMenuItem"; - this.searchToolStripMenuItem.Size = new System.Drawing.Size(129, 22); - this.searchToolStripMenuItem.Text = "&Search"; - // - // toolStripSeparator7 - // - this.toolStripSeparator7.Name = "toolStripSeparator7"; - this.toolStripSeparator7.Size = new System.Drawing.Size(126, 6); - // - // aboutToolStripMenuItem - // - this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; - this.aboutToolStripMenuItem.Size = new System.Drawing.Size(129, 22); - this.aboutToolStripMenuItem.Text = "&About..."; - // - // pgProperties - // - this.pgProperties.Dock = System.Windows.Forms.DockStyle.Fill; - this.pgProperties.Location = new System.Drawing.Point(0, 0); - this.pgProperties.Name = "pgProperties"; - this.pgProperties.Size = new System.Drawing.Size(348, 304); - this.pgProperties.TabIndex = 9; - // - // splitContainer1 - // - this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer1.Location = new System.Drawing.Point(0, 49); - this.splitContainer1.Name = "splitContainer1"; - // - // splitContainer1.Panel1 - // - this.splitContainer1.Panel1.Controls.Add(this.tvPlatform); - // - // splitContainer1.Panel2 - // - this.splitContainer1.Panel2.Controls.Add(this.splitContainer2); - this.splitContainer1.Size = new System.Drawing.Size(820, 552); - this.splitContainer1.SplitterDistance = 468; - this.splitContainer1.TabIndex = 11; - // - // splitContainer2 - // - this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer2.Location = new System.Drawing.Point(0, 0); - this.splitContainer2.Name = "splitContainer2"; - this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; - // - // splitContainer2.Panel1 - // - this.splitContainer2.Panel1.Controls.Add(this.tvProject); - // - // splitContainer2.Panel2 - // - this.splitContainer2.Panel2.Controls.Add(this.pgProperties); - this.splitContainer2.Size = new System.Drawing.Size(348, 552); - this.splitContainer2.SplitterDistance = 244; - this.splitContainer2.TabIndex = 0; - // - // tvPlatform - // - this.tvPlatform.Dock = System.Windows.Forms.DockStyle.Fill; - this.tvPlatform.ImageIndex = 1; - this.tvPlatform.Location = new System.Drawing.Point(0, 0); - this.tvPlatform.Name = "tvPlatform"; - this.tvPlatform.SelectedImageIndex = 1; - this.tvPlatform.Size = new System.Drawing.Size(468, 552); - this.tvPlatform.TabIndex = 1; - // - // tvProject - // - this.tvProject.Dock = System.Windows.Forms.DockStyle.Fill; - this.tvProject.Location = new System.Drawing.Point(0, 0); - this.tvProject.Name = "tvProject"; - this.tvProject.Size = new System.Drawing.Size(348, 244); - this.tvProject.TabIndex = 10; - // - // toolStripStatusLabel1 - // - this.toolStripStatusLabel1.Name = "toolStripStatusLabel1"; - this.toolStripStatusLabel1.Size = new System.Drawing.Size(109, 17); - this.toolStripStatusLabel1.Text = "toolStripStatusLabel1"; - // - // MainForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(820, 623); - this.Controls.Add(this.splitContainer1); - this.Controls.Add(this.toolStrip1); - this.Controls.Add(this.statusStrip1); - this.Controls.Add(this.menuStrip1); - this.MainMenuStrip = this.menuStrip1; - this.Name = "MainForm"; - this.Text = "SysGen Platform Designer"; - this.Load += new System.EventHandler(this.MainForm_Load); - this.statusStrip1.ResumeLayout(false); - this.statusStrip1.PerformLayout(); - this.toolStrip1.ResumeLayout(false); - this.toolStrip1.PerformLayout(); - this.menuStrip1.ResumeLayout(false); - this.menuStrip1.PerformLayout(); - this.splitContainer1.Panel1.ResumeLayout(false); - this.splitContainer1.Panel2.ResumeLayout(false); - this.splitContainer1.ResumeLayout(false); - this.splitContainer2.Panel1.ResumeLayout(false); - this.splitContainer2.Panel2.ResumeLayout(false); - this.splitContainer2.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private TriStateTreeViewDemo.PlatformTreeView tvPlatform; - private System.Windows.Forms.StatusStrip statusStrip1; - private System.Windows.Forms.ToolStrip toolStrip1; - private System.Windows.Forms.ToolStripButton newToolStripButton; - private System.Windows.Forms.ToolStripButton openToolStripButton; - private System.Windows.Forms.ToolStripButton saveToolStripButton; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator; - private System.Windows.Forms.ToolStripButton cutToolStripButton; - private System.Windows.Forms.ToolStripButton copyToolStripButton; - private System.Windows.Forms.ToolStripButton saveConfigToolStripButton; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; - private System.Windows.Forms.ToolStripButton helpToolStripButton; - private System.Windows.Forms.ToolStripComboBox cmbArchitecture; - private System.Windows.Forms.ToolStripComboBox cmbDebug; - private System.Windows.Forms.MenuStrip menuStrip1; - private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; - private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem saveAsToolStripMenuItem; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; - private System.Windows.Forms.ToolStripMenuItem printToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem printPreviewToolStripMenuItem; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; - private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem undoToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem redoToolStripMenuItem; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator5; - private System.Windows.Forms.ToolStripMenuItem cutToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem copyToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem pasteToolStripMenuItem; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator6; - private System.Windows.Forms.ToolStripMenuItem selectAllToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem toolsToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem customizeToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem contentsToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem indexToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem searchToolStripMenuItem; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator7; - private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem; - private System.Windows.Forms.PropertyGrid pgProperties; - private System.Windows.Forms.ToolStripComboBox cmbOptimization; - private ProjectTreeView tvProject; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator8; - private System.Windows.Forms.SplitContainer splitContainer1; - private System.Windows.Forms.SplitContainer splitContainer2; - private System.Windows.Forms.ToolStripMenuItem platformToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem addFiltersToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem addLanguagesToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem addDebToolStripMenuItem; - private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1; - } -} - diff --git a/reactos/tools/sysgen/RosBuilder/MainForm.cs b/reactos/tools/sysgen/RosBuilder/MainForm.cs deleted file mode 100644 index c001ba7d016..00000000000 --- a/reactos/tools/sysgen/RosBuilder/MainForm.cs +++ /dev/null @@ -1,362 +0,0 @@ -using System; -using System.Xml; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; -using System.Windows.Forms; - -using TriStateTreeViewDemo; - -using SysGen.Framework.Catalog; -using SysGen.BuildEngine; -using SysGen.BuildEngine.Log; -using SysGen.BuildEngine.Framework; -using SysGen.RBuild.Framework; - -namespace TriStateTreeViewDemo -{ - public interface ISysGenDesigner - { - ModuleFilterController ModuleFilterController { get; } - ProjectController ProjectController { get; } - object InspectedObject { set; } - } - - public partial class MainForm : Form, ISysGenDesigner - { - ProjectController m_ProjectController = null; - ModuleFilterController m_FilterController = null; - - public MainForm() - { - InitializeComponent(); - - m_ProjectController = new ProjectController(this); - m_FilterController = new ModuleFilterController(this); - - tvPlatform.SetCatalog(this); - tvProject.SetCatalog(this); - tvProject.DoubleClick += new EventHandler(tvProject_DoubleClick); - //lvModuleFilters.SetCatalog(this); - } - - private void button1_Click(object sender, EventArgs e) - { - //m_project = new RBuildProject(); - - m_ProjectController = new ProjectController(this); - m_FilterController = new ModuleFilterController(this); - - tvPlatform.SetCatalog(this); - tvProject.SetCatalog(this); - //lvModuleFilters.SetCatalog(this); - - //PlatformCatalogReader m_Reader = new PlatformCatalogReader(@"C:\Ros\trunk\reactos\rbuilddb.xml"); - - /* - BuildLog.Listeners.Clear(); - - m_SysGenEngine.SetDefaults = false; - m_SysGenEngine.RunBackends = false; - m_SysGenEngine.CleanCustomConfigs(); - m_SysGenEngine.ReadBuildFiles(); - - m_PlatformController = new PlatformController(this); - m_FilterController = new ModuleFilterController(this); - - catalogTriStateTreeView1.SetCatalog(this); - lvModuleFilters.SetCatalog(this); - */ - - } - - void tvProject_DoubleClick(object sender, EventArgs e) - { - } - - private void button2_Click(object sender, EventArgs e) - { - using (XmlTextWriter writer = new XmlTextWriter(@"c:\pkg.rbuild", Encoding.ASCII)) - { - writer.Indentation = 4; - writer.Formatting = Formatting.Indented; - - // Starts a new document - writer.WriteStartDocument(); - writer.WriteStartElement("module"); - writer.WriteAttributeString("name", ""); - writer.WriteAttributeString("type", "modulegroup"); - - foreach (RBuildModule module in m_ProjectController.Project.Platform.Modules) - { - writer.WriteElementString("requires", module.Name); - } - - writer.WriteEndElement(); - writer.WriteEndDocument(); - } - - } - - private void button3_Click(object sender, EventArgs e) - { - } - - public ModuleFilterController ModuleFilterController - { - get { return m_FilterController; } - } - - public ProjectController ProjectController - { - get { return m_ProjectController; } - } - - private void lvModuleFilters_SelectedIndexChanged(object sender, EventArgs e) - { - - } - - //private void lvModuleFilters_ItemCheck(object sender, ItemCheckEventArgs e) - //{ - // ModuleFiltersListViewItem filerListViewItem = lvModuleFilters.FocusedItem as ModuleFiltersListViewItem; - - // if (filerListViewItem != null) - // { - // if (e.NewValue == CheckState.Checked) - // { - // m_FilterController.Apply(filerListViewItem.Filter); - // } - // } - //} - - private void MainForm_Load(object sender, EventArgs e) - { - cmbArchitecture.Items.Add("x86 - (i486)"); - cmbArchitecture.Items.Add("x86 - (i586)"); - cmbArchitecture.Items.Add("x86 - (Pentium)"); - cmbArchitecture.Items.Add("x86 - (Pentium2)"); - cmbArchitecture.Items.Add("x86 - (Pentium3)"); - cmbArchitecture.Items.Add("x86 - (Pentium4)"); - cmbArchitecture.Items.Add("x86 - (athlon-xp)"); - cmbArchitecture.Items.Add("x86 - (athlon-mp)"); - cmbArchitecture.Items.Add("x86 - (k6-2)"); - cmbArchitecture.Items.Add("x86 - Xbox"); - cmbArchitecture.Items.Add("Power PC"); - cmbArchitecture.Items.Add("ARM"); - cmbArchitecture.SelectedIndex = 2; - - cmbDebug.Items.Add("Debug"); - cmbDebug.Items.Add("Release"); - cmbDebug.SelectedIndex = 0; - - cmbOptimization.Items.Add("Level 0"); - cmbOptimization.Items.Add("Level 1"); - cmbOptimization.Items.Add("Level 2"); - cmbOptimization.Items.Add("Level 3"); - cmbOptimization.Items.Add("Level 4"); - cmbOptimization.Items.Add("Level 5"); - cmbOptimization.SelectedIndex = 1; - } - - public object InspectedObject - { - set - { - if (value is RBuildPlatform) - { - pgProperties.SelectedObject = new PlatformInspector(m_ProjectController.Project.Platform); - } - else - pgProperties.SelectedObject = value; - } - } - - private void openToolStripButton_Click(object sender, EventArgs e) - { - m_ProjectController.Open(); - } - - private void saveToolStripButton_Click(object sender, EventArgs e) - { - m_ProjectController.Save(); - } - - private void saveConfigToolStripButton_Click(object sender, EventArgs e) - { - //if (MessageBox.Show("Your platform does not have a default shell selected ¿are you sure you want to continue?", - // "Question", - // MessageBoxButtons.YesNo, - // MessageBoxIcon.Question) == DialogResult.OK) - //{ - // Creates an XML file is not exist - using (XmlTextWriter writer = new XmlTextWriter(m_ProjectController.SysGenProject.Source + @"\config.rbuild", Encoding.ASCII)) - { - writer.Indentation = 4; - writer.Formatting = Formatting.Indented; - - // Starts a new document - writer.WriteStartDocument(); - writer.WriteStartElement("group"); - - writer.WriteComment("Platform information"); - writer.WriteElementString("platformname", m_ProjectController.Project.Platform.Name); - writer.WriteElementString("platformdescription", m_ProjectController.Project.Platform.Description); - - writer.WriteComment("Default applications"); - - if (m_ProjectController.Project.Platform.Shell != null) - { - writer.WriteElementString("platformshell", m_ProjectController.Project.Platform.Shell.Name); - } - - if (m_ProjectController.Project.Platform.Screensaver != null) - { - writer.WriteElementString("platformscreensaver", m_ProjectController.Project.Platform.Screensaver.Name); - } - - if (m_ProjectController.Project.Platform.Wallpaper != null) - { - writer.WriteElementString("platformwallpaper", m_ProjectController.Project.Platform.Wallpaper.ID); - } - - writer.WriteComment("Modules incuded in the platform"); - foreach (RBuildModule module in m_ProjectController.Project.Platform.Modules) - { - writer.WriteElementString("platformmodule", module.Name); - } - - writer.WriteComment("Languages incuded in the platform"); - foreach (RBuildLanguage language in m_ProjectController.Project.Platform.Languages) - { - writer.WriteElementString("platformlanguage", language.Name); - } - - writer.WriteComment("Debug Channels incuded in the platform"); - foreach (RBuildDebugChannel debugChannel in m_ProjectController.Project.Platform.DebugChannels) - { - writer.WriteElementString("platformdebugchhanel", debugChannel.Name); - } - - writer.WriteComment("Platform RBuild Properties"); - writer.WriteComment("Properties"); - writer.WriteStartElement("property"); - writer.WriteAttributeString("name", "SARCH"); - writer.WriteAttributeString("value", ""); - writer.WriteEndElement(); - - writer.WriteStartElement("property"); - writer.WriteAttributeString("name", "OARCH"); - writer.WriteAttributeString("value", "pentium"); - writer.WriteEndElement(); - - writer.WriteStartElement("property"); - writer.WriteAttributeString("name", "OPTIMIZE"); - writer.WriteAttributeString("value", ((int)m_ProjectController.SysGenProject.OptimizeLevel).ToString()); - writer.WriteEndElement(); - - writer.WriteStartElement("property"); - writer.WriteAttributeString("name", "KDBG"); - writer.WriteAttributeString("value", m_ProjectController.SysGenProject.KDebug ? "1" : "0"); - writer.WriteEndElement(); - - writer.WriteStartElement("property"); - writer.WriteAttributeString("name", "DBG"); - writer.WriteAttributeString("value", m_ProjectController.SysGenProject.Debug ? "1" : "0"); - writer.WriteEndElement(); - - writer.WriteStartElement("property"); - writer.WriteAttributeString("name", "GDB"); - writer.WriteAttributeString("value", m_ProjectController.SysGenProject.GDB ? "1" : "0"); - writer.WriteEndElement(); - - writer.WriteStartElement("property"); - writer.WriteAttributeString("name", "NSWPAT"); - writer.WriteAttributeString("value", m_ProjectController.SysGenProject.NSWPAT ? "1" : "0"); - writer.WriteEndElement(); - - writer.WriteStartElement("property"); - writer.WriteAttributeString("name", "_WINKD_"); - writer.WriteAttributeString("value", m_ProjectController.SysGenProject.WINKD ? "1" : "0"); - writer.WriteEndElement(); - - writer.WriteEndElement(); - writer.WriteEndDocument(); - // } - } - } - - private void newToolStripButton_Click(object sender, EventArgs e) - { - m_ProjectController.New(); - } - - private void addFiltersToolStripMenuItem_Click(object sender, EventArgs e) - { - using (NewItemForm newItem = new NewItemForm()) - { - foreach (ModuleFilter filter in ModuleFilterController.ModuleFilters) - { - newItem.ListView.Items.Add(new ModuleFiltersNewItemListViewItem(this, filter)); - } - - if (newItem.ShowDialog() == DialogResult.OK) - { - foreach (ListViewItem lvItem in newItem.ListView.SelectedItems) - { - NewItemListViewItem item = lvItem as NewItemListViewItem; - - if (item != null) - item.Apply(); - } - } - } - } - - private void addLanguagesToolStripMenuItem_Click(object sender, EventArgs e) - { - using (NewItemForm newItem = new NewItemForm()) - { - foreach (RBuildLanguage language in m_ProjectController.Project.Languages) - { - newItem.ListView.Items.Add(new LanguageNewItemListViewItem(this, language)); - } - - if (newItem.ShowDialog() == DialogResult.OK) - { - foreach (ListViewItem lvItem in newItem.ListView.SelectedItems) - { - NewItemListViewItem item = lvItem as NewItemListViewItem; - - if (item != null) - item.Apply(); - } - } - } - } - - private void addDebToolStripMenuItem_Click(object sender, EventArgs e) - { - using (NewItemForm newItem = new NewItemForm()) - { - foreach (RBuildDebugChannel channel in m_ProjectController.Project.DebugChannels) - { - newItem.ListView.Items.Add(new DebugChannelNewItemListViewItem(this, channel)); - } - - if (newItem.ShowDialog() == DialogResult.OK) - { - foreach (ListViewItem lvItem in newItem.ListView.SelectedItems) - { - NewItemListViewItem item = lvItem as NewItemListViewItem; - - if (item != null) - item.Apply(); - } - } - } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/RosBuilder/MainForm.resx b/reactos/tools/sysgen/RosBuilder/MainForm.resx deleted file mode 100644 index 222877d4dd7..00000000000 --- a/reactos/tools/sysgen/RosBuilder/MainForm.resx +++ /dev/null @@ -1,353 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - 127, 17 - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAQ9JREFUOE+t09lq - wkAUBmBfyr5DfY32jaReSOmFCyKCgkKLFrVUBZeKiEbshqRuaNw1xiXmLxMJBJ0Zc+GBw9zMfDPnHMZm - u1ZE35s4zXCqjmC8Al+sgHLjD9y7yGFWPIbecOO45yORtMAEHnxxJHL1IyKI9JeEXqtMwOl50Q8bSS0l - 8PzBBPbqAQQxICrgjeapgKZpkJUdBmNZB+y3d/QSnsIZKrDdqZjMFYj9OR9wB1NngHrQsJC36EkrfIkT - PuDyJ84AZbOHNF2j1Z2h9i3xAVKfOUjjZssN2oMFmq0xSkLfOmBu3E97iurnENlKxzpgbpzwO0Kh1kOy - KFoDjHmzVuYYjRmTDZfyWh9Yd/4B2Mz2w1z7EGUAAAAASUVORK5CYII= - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAlpJREFUOE+tk21I - k1EYhif0oyA0sqIQCix/+GcQFFH9CCmiUBTLLEjShJofVBgL2fxoU9Pp5ubUlS5rU9f8rCyjsA+pUCRC - TR1ppmVFUSlmhq78unrnQF1KGHTg/nEOz30993PO+7qJFrmUeiv2n+Mij+XLRLLYULdF2pxlEVIDcw0p - AsyxD5fmI/rQ94pqi26eOlsfuZj+7BgSm01QdA4ih7m73Yx9qGpavwatjPebqCzOprPt8YKQgzFagqL0 - BEjyEFWVaBkdLHMxT34uYNwWR9nVTEoL0zHlp2DMSeaSRk6eKt4VWm5WM/rVPNN5SjDTLQebZEHNA1wr - UvHjk3E6tsNcV62e1r3KLGqtKm6WplNpSsVqVFJsOM8VfSKFWjkGtcyZptSYzvC7XByx3zQoqCnTMvlG - CX1prnornPUmQJcUXsbSVhGK5bIOkcmQyveeTHiv4VZ5Nk33Nc6iuSO8CIfmECYa/bE/8ON1iRipJNh5 - F0V6Bd86lfQ1JlFj1TDVq4COKCegLVIwHmGiKRB7/V6G7+5koHozymgfYRy5E1CgTWKgXcZ1i5qWp0KS - rjgBcAJawph6FszYk/2M1O1isGYLX8p9ab6wgqP+3rMvYciS01GfzA1LFvQkQ6sQ9/khxhoCGHnox1Dt - NvorxXw0b8Km8UQh2cip6GOzgNyMeKqKM7HdjqFZJ5pRk2YJ9aql3EnxoCJxNaZ4Ly6e3UDY3O6OEXRp - 59ApTpIhiyDh9GHORAZyPHQPB/ZtZ/cOMVvFPvh6e7F+3SrWrHRnraf7Xz/xf/rJ/kvxb84I3U1y+9/W - AAAAAElFTkSuQmCC - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAixJREFUOE+tk91L - k3EUx/cvdN9N0EW3NTWGa7EaPOUcyqphWBG9PZEv5dJlmqhYmUYtXyBb4dJJy+kknFT4BqZIjaFMJUsz - V7TEoabYRDD49ju/6Pm1Mi+iH5zLz+c855zvo1L9j/fsaRRUvvZltHmX8Ni9gMaGCO47ZlBb8wn22yHc - KJ9CackECgteIy93FBfOB6H0JrC3B6ipXsVGb2V1Dca0XhxOe8JLEXhbF7mgsuLLX3mCIwsr2G1+DrVa - huWQRwjcj+a5oLTk87qCn/D78CLiTD4UXJ7GAXOTEDjrZ7ngku3dH4Jf4ZHJCLZJXlhzxpGa4hSCurth - LsjOGo0R/A4PBsPYrHdDlgMwmRxCUF31kQvkMwFFsB7c4/+ATYkNOHL0BZKSaoXgZuU0urvATgkcP/kK - lmMDfNu0MJqZPps6/4D7cNDSCUmyC8HVskl0+MAyADS5vrG7f0X59Tm+VFoYzZyZEVTg5NR2GAwVQnCl - cByeZuChc40FJwpjek5MmU/YkH6uiHdOTmHwfg/0+jIhsOWNMRiouhPlnUnAQoI4rYSht7MYm5qDnHsN - e41tHNbucUGnKxICiqXjHpTPJgHBZ/Nv4U1oHqGZJVwstiNe72JwI+J3PYA2MV8IMjOG2dzLfOatBg+2 - 7JDQ0tEPX9cguvv8GHg5hH0mC9S6eiQweLumDhqNVQgo06dP9fN4UsIoJHRnOhVtmxZGM1NXKoJ3JmTH - Cv71r/4OTrQ4xWMwWlcAAAAASUVORK5CYII= - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAYdJREFUOE+t001L - QlEQBuB+TdCmRVEJRRIWtRAUlKsQhFmkpZQtIiWyAlMwP5KkXS0shLqGFkgoFqWQmaRR2qIvU7FMwWhd - 8JZXkFx0uVGzOcNh5jkDw6mr+++4SN7B6fbju/uQecYm6a25+/Hdl2IJptWNmmJyL4DwWZwZUJbtayT8 - RxGqIV8oQaaaRfrxkTmw4z2G+WuKbC6PYDgOkUSJp6ccc+AgdI4luwPbHh/UCxb0S0aZN5fHTmefMTVv - wfDEHIiBMegMpt8BZUShNoGQTIKQGxA8TTIHMoUPGF1vEOvTWHTcgqeJQahNwLqVQiRRpIdS+XcM2l4h - 1t2DI3WAP7oGoSYE3kwSPQofljcqm/kxjK4SCH0OXSMetItsUC26wZuOVptYhI0eEOuz1YI2gZnKBdpr - 6iR9V2jkKOkBQpeiCryhFFr4eioft16iU7qNho4h1Dc00QOqlRuwpSSa+UawuZXdByIZsPoUaOmWwrUf - owcOozlwZeto7ZXDuXvCfHV/+dGfqqrf44qgu28AAAAASUVORK5CYII= - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAeJJREFUOE+lk9FP - klEYxv1TSsecde0f0FpZrTbbal7URVvZuuJCr7pq2WzLNWy0iSHNwtIB9qG0ltLSYRJpBomUgZPMGSyU - 8SmJIOiv7zssCdrAzXd77s77e5/nnPdUVR20HBPfUCWNB4QsI176HB8IL/9iX2y1ubTMwx6utz0nuLhc - GWIfCxT153Z26ep/g9Md4FJLZ2WIZdQnAM4QSJ/BH5Z5aH6NNCljm0hgdSV4MppAPxQXCq5kil31OTx7 - DjLbOeSNNJFYUgBKq31glfpmN76F9QLEZHOJc73ubXQjMreln7Q+DdP/du0/QIsxhmNK5mjTMJ/m43mI - Qcmr5t5MZVlNpFiKrPM1vIbpVVQAOqSckF+ZekUX5UjTS+ouDFLb+CwPUPNupbN7k7WmEDcMX3hgXSpy - IP/OsrCyhXtuA6M0g+bc4wJATqaZ/x7DF4zg8f9g/OMibb355701kERriHL5fojzd2aFjNI0mjPdBUD9 - 6auUqlU/KwBZJV4skWUuvMmYV8b+Ls6jQQ81DfryO3KtfUoA/p3810G37T3VJ3TlARdvukhldjANeemx - z2B8MS0mq80GyySHj98rD2jQOpXbtgrVNprRnO2h5lQX1Sc7leYODh27W3nN9/WZDnroDx0A5wwhdtmt - AAAAAElFTkSuQmCC - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAlBJREFUOE+1k1lI - lGEUhn/owm6KFuqqq4LoJooIqouMwixMM4zEjKyJGJUSlcnSITU1RSe3SdPGyGVQc6tEUSkSIXFo13CM - FonUyGmy5p9xz+Lp/z8ZbGjzpgMv5+a8z1n4Pkn6H9HZnEH7zVQayxKYF7+hMg+3ynKO4LBVMWa7xmBf - Nme1vuSl67hi0GNMj/sVqBon5XqmnXVMOqoxF+sYH6kgJyWKF13xnD/tT7xmM7bOY4y0riY6bL8nRAWo - 5mlnDUUZR+m2ZCO/L2C4T89bywmaSgIJD/WmKnEVT/MkIg/v8wTUVeTMAuQbGBLDSNaFoI8K5lxkEDpt - IDEafyJCfciPXiMAIX7enoDqUgNTci1TdhPjQ5nYn0dhrVgu1Fu+jO7iRTwyegmzKp9tGz0BZlMGE/Yy - JgbSGH95irFnB5GbF5Nb3kqmqZELl2uJN5iJSS0hPMFIWGyWJ6C0MJXRQSNjfVpGH/vjur+Jj7dXCLM7 - pme+4XBOMjDsIDgihYDj+jlISW4S8qs0XA99cXWsx9m2ksFySXRWo/RWp5Cppp3efpsw3+2ysidIMwsp - zErgc88ZnO3rkFuWYq/3ov+6JMb+OvOdLy6l8wcHvW9sWHre4Rcag69i3rX3AN7bdyDlX4zD/iBCMS/h - U8NChioXYC2SiFZ2Vsd2T3BVmaDA3EZTh1VkVVs3rEW6lBwrHoj7yu6sVQ72c+d7ltfCXH+nm5rWJ3MA - dY3cpJPKCwtEE7SbgJ1bBFm9trqzu9vvspjgT3FIubZa8C/N67P9regHTvjvLQ3rR38AAAAASUVORK5C - YII= - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAhhJREFUOE+1U09r - E0EU70fIR9iPUBQ8eMrR46IN5JhCDz2oBA8SBHEpCMFgG5GiwdJdq2Ijqe6ldo3Wrmhri0gXazW2YbMt - UdNmm45ulf7R/HwzU1hLIzn54LFvhvn9eW9nOjr+R0wvBLhTXEf6bgV9w0sYLJQx/uoz2mq9c7eRn2pA - L67Bq+/i29YeWLBL9Q6u5ktI6w6Kr1dbE3HwA3sT/o8mbAfQRgE1LZPXtsPgbjZxaXAG4y/Kh0m48sbP - JgwbiKYAwwLYNkR4DEje5HsMFSI5l3l2kGD6/RYezzeEMgfzwzzMWSCRlV9OFk0xqhl06wNy+Tchyb2n - dXxhv4TVaFLazppAJ9VKL0MySxYoVI0hkXaw5AbovjAWEmTur4qBqZoEdfbKVCgTBObqdolBUW0ocRs1 - P8Cx2PWQ4PJtl6a9J+xLIB1OMHIilU2b1gSMqCZ9TdTq33FEHQgJcg8rWPF3qHcJVOKeyOyoJIioDqUk - UFM2SuUqus4YIcHEzFdYji8GxIGROAc41JJHc6E1B58wRRqWhzFrEVduTR78E5mRBSz7v0l1H0AgXgsH - +2DNcPBp3cep0/rhezA5V0Vfbg5ug+4CqaiaI/rmyWu+t1zdQIysDxdmW9/GiZcVnO+fgvHkI+YXV7BG - 067VA9Ezt91Fyvq/wH8/lKHCW/RcfITj8Rs4evIaYmdHkBl63v4xtX1tLQ78AZ3a8qxOv4hDAAAAAElF - TkSuQmCC - - - - 226, 17 - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAQ9JREFUOE+t09lq - wkAUBmBfyr5DfY32jaReSOmFCyKCgkKLFrVUBZeKiEbshqRuaNw1xiXmLxMJBJ0Zc+GBw9zMfDPnHMZm - u1ZE35s4zXCqjmC8Al+sgHLjD9y7yGFWPIbecOO45yORtMAEHnxxJHL1IyKI9JeEXqtMwOl50Q8bSS0l - 8PzBBPbqAQQxICrgjeapgKZpkJUdBmNZB+y3d/QSnsIZKrDdqZjMFYj9OR9wB1NngHrQsJC36EkrfIkT - PuDyJ84AZbOHNF2j1Z2h9i3xAVKfOUjjZssN2oMFmq0xSkLfOmBu3E97iurnENlKxzpgbpzwO0Kh1kOy - KFoDjHmzVuYYjRmTDZfyWh9Yd/4B2Mz2w1z7EGUAAAAASUVORK5CYII= - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAlpJREFUOE+tk21I - k1EYhif0oyA0sqIQCix/+GcQFFH9CCmiUBTLLEjShJofVBgL2fxoU9Pp5ubUlS5rU9f8rCyjsA+pUCRC - TR1ppmVFUSlmhq78unrnQF1KGHTg/nEOz30993PO+7qJFrmUeiv2n+Mij+XLRLLYULdF2pxlEVIDcw0p - AsyxD5fmI/rQ94pqi26eOlsfuZj+7BgSm01QdA4ih7m73Yx9qGpavwatjPebqCzOprPt8YKQgzFagqL0 - BEjyEFWVaBkdLHMxT34uYNwWR9nVTEoL0zHlp2DMSeaSRk6eKt4VWm5WM/rVPNN5SjDTLQebZEHNA1wr - UvHjk3E6tsNcV62e1r3KLGqtKm6WplNpSsVqVFJsOM8VfSKFWjkGtcyZptSYzvC7XByx3zQoqCnTMvlG - CX1prnornPUmQJcUXsbSVhGK5bIOkcmQyveeTHiv4VZ5Nk33Nc6iuSO8CIfmECYa/bE/8ON1iRipJNh5 - F0V6Bd86lfQ1JlFj1TDVq4COKCegLVIwHmGiKRB7/V6G7+5koHozymgfYRy5E1CgTWKgXcZ1i5qWp0KS - rjgBcAJawph6FszYk/2M1O1isGYLX8p9ab6wgqP+3rMvYciS01GfzA1LFvQkQ6sQ9/khxhoCGHnox1Dt - NvorxXw0b8Km8UQh2cip6GOzgNyMeKqKM7HdjqFZJ5pRk2YJ9aql3EnxoCJxNaZ4Ly6e3UDY3O6OEXRp - 59ApTpIhiyDh9GHORAZyPHQPB/ZtZ/cOMVvFPvh6e7F+3SrWrHRnraf7Xz/xf/rJ/kvxb84I3U1y+9/W - AAAAAElFTkSuQmCC - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAixJREFUOE+tk91L - k3EUx/cvdN9N0EW3NTWGa7EaPOUcyqphWBG9PZEv5dJlmqhYmUYtXyBb4dJJy+kknFT4BqZIjaFMJUsz - V7TEoabYRDD49ju/6Pm1Mi+iH5zLz+c855zvo1L9j/fsaRRUvvZltHmX8Ni9gMaGCO47ZlBb8wn22yHc - KJ9CackECgteIy93FBfOB6H0JrC3B6ipXsVGb2V1Dca0XhxOe8JLEXhbF7mgsuLLX3mCIwsr2G1+DrVa - huWQRwjcj+a5oLTk87qCn/D78CLiTD4UXJ7GAXOTEDjrZ7ngku3dH4Jf4ZHJCLZJXlhzxpGa4hSCurth - LsjOGo0R/A4PBsPYrHdDlgMwmRxCUF31kQvkMwFFsB7c4/+ATYkNOHL0BZKSaoXgZuU0urvATgkcP/kK - lmMDfNu0MJqZPps6/4D7cNDSCUmyC8HVskl0+MAyADS5vrG7f0X59Tm+VFoYzZyZEVTg5NR2GAwVQnCl - cByeZuChc40FJwpjek5MmU/YkH6uiHdOTmHwfg/0+jIhsOWNMRiouhPlnUnAQoI4rYSht7MYm5qDnHsN - e41tHNbucUGnKxICiqXjHpTPJgHBZ/Nv4U1oHqGZJVwstiNe72JwI+J3PYA2MV8IMjOG2dzLfOatBg+2 - 7JDQ0tEPX9cguvv8GHg5hH0mC9S6eiQweLumDhqNVQgo06dP9fN4UsIoJHRnOhVtmxZGM1NXKoJ3JmTH - Cv71r/4OTrQ4xWMwWlcAAAAASUVORK5CYII= - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAi1JREFUOE+1k/9P - UlEYxv2nWK2tVlttGmpltrCcEQ1XUjSMaUHJNLIpNcnCragplBvUoC/okJhZLG92ySUpU8RNICdIhAio - EF+e7r1UZMDW1jrb+8t7z/N83vucc8rK/sdyeYIwvpopWYbRaZTk0uIx0o0/V/JbGt7lVTwxT6CKKylt - oLd8xGYihS/hKGz2WaaeWUnoTATsMz7UCztx9Ex7cYN3jkUQU4tb4DR5LZaAcyEAg4VE5YlLMFmJQoNQ - JA61gUA6k4XPH9pCN9s+gZz2oq5Jjlq+DDfUz3Fba86bOGY9jHiUdDF0mvqT7A/F4fKEcE9nZf5d1jOI - B4ZxVJ2U5gyc8z70akegMX3AXb0ND1+8R6/GgvZbeog61OA2K3CA2lxR34JjZ69B2T8EsVyN/Q0XcwY3 - B14iGk8UpE43UukMNqhA6QyC4Q0srcQg7dagsbWHmuDHScj7jDC9nsJTqx0a4xjuaIfRqXoMSXc/hG0q - 8C4owGnqwEGeFOXHxThH9eoEV7G7VpiboE2pK0qnm9H1JLz+NUzOBfHWEcAQsQSuqAuVDa1gVZzKGUgU - jwoMqAzxNZbC3Od1jDvDYPdth+7NCpP8Yf4V7KoR5A1arg8gmQIoGMLxLJYjWSwEMphwb2J4MoZB2yqU - LBZUIxHGYB9HlBfTE4jl9+GmBPTHv6lfo//+GGoaZajmXQabumXl1HHt5TRjz5Hz2HlIgB3Vp7GNzWeo - RcX/+pq/AwHYL0leVl8fAAAAAElFTkSuQmCC - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAY5JREFUOE+d081L - AkEUAPD1T+hYhzoERV77OHUo8JBBt+4RRkSQ4U0SunaJOkSRKQWZWCiF5kdroa0WRAoRFXXoEEkWCUFY - Wbvrvnqz7NK6OxANPIZh5v1m3uyOKZK5AaamiaLICILACDzPtDXXM+3mRlPtGnWMAK15g4fQabVBYDej - 20QFdtJXVGBxg4Xk8aWMRDhjJLh/TgUW1hPQ1T+ihmEZgXieCghiFRBRIEPAFzkxBO4fSsByOfBsRkkE - 4xkoFEv6Mla3szoAF2Jy+E2A0KMc/nyRINe3BS2yspXSAf4YR5Kfq/LUE1QJopxEU8qSP6kD5nwxFUAE - A0E8hdM1rz0BXtDvhheHwMEnwKkkJ2OPAJMuw+TUDB2QJAneKzxgCRNnHwTBUJJd3ijYx8fowBcvwstr - BXIXdxBOZAmCu2JgssMxBGvOOmNA+d5KP+sJw17qiJRjn3bDwOAocF4LQMWtRTABf9W/hLWjFcpsA0Fc - tm76+6C+vJ+J4b4WgmAp/0bMTXVg6ekFNrQM3y3xMcC3lb+tAAAAAElFTkSuQmCC - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAYdJREFUOE+t001L - QlEQBuB+TdCmRVEJRRIWtRAUlKsQhFmkpZQtIiWyAlMwP5KkXS0shLqGFkgoFqWQmaRR2qIvU7FMwWhd - 8JZXkFx0uVGzOcNh5jkDw6mr+++4SN7B6fbju/uQecYm6a25+/Hdl2IJptWNmmJyL4DwWZwZUJbtayT8 - RxGqIV8oQaaaRfrxkTmw4z2G+WuKbC6PYDgOkUSJp6ccc+AgdI4luwPbHh/UCxb0S0aZN5fHTmefMTVv - wfDEHIiBMegMpt8BZUShNoGQTIKQGxA8TTIHMoUPGF1vEOvTWHTcgqeJQahNwLqVQiRRpIdS+XcM2l4h - 1t2DI3WAP7oGoSYE3kwSPQofljcqm/kxjK4SCH0OXSMetItsUC26wZuOVptYhI0eEOuz1YI2gZnKBdpr - 6iR9V2jkKOkBQpeiCryhFFr4eioft16iU7qNho4h1Dc00QOqlRuwpSSa+UawuZXdByIZsPoUaOmWwrUf - owcOozlwZeto7ZXDuXvCfHV/+dGfqqrf44qgu28AAAAASUVORK5CYII= - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAeJJREFUOE+lk9FP - klEYxv1TSsecde0f0FpZrTbbal7URVvZuuJCr7pq2WzLNWy0iSHNwtIB9qG0ltLSYRJpBomUgZPMGSyU - 8SmJIOiv7zssCdrAzXd77s77e5/nnPdUVR20HBPfUCWNB4QsI176HB8IL/9iX2y1ubTMwx6utz0nuLhc - GWIfCxT153Z26ep/g9Md4FJLZ2WIZdQnAM4QSJ/BH5Z5aH6NNCljm0hgdSV4MppAPxQXCq5kil31OTx7 - DjLbOeSNNJFYUgBKq31glfpmN76F9QLEZHOJc73ubXQjMreln7Q+DdP/du0/QIsxhmNK5mjTMJ/m43mI - Qcmr5t5MZVlNpFiKrPM1vIbpVVQAOqSckF+ZekUX5UjTS+ouDFLb+CwPUPNupbN7k7WmEDcMX3hgXSpy - IP/OsrCyhXtuA6M0g+bc4wJATqaZ/x7DF4zg8f9g/OMibb355701kERriHL5fojzd2aFjNI0mjPdBUD9 - 6auUqlU/KwBZJV4skWUuvMmYV8b+Ls6jQQ81DfryO3KtfUoA/p3810G37T3VJ3TlARdvukhldjANeemx - z2B8MS0mq80GyySHj98rD2jQOpXbtgrVNprRnO2h5lQX1Sc7leYODh27W3nN9/WZDnroDx0A5wwhdtmt - AAAAAElFTkSuQmCC - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAlBJREFUOE+1k1lI - lGEUhn/owm6KFuqqq4LoJooIqouMwixMM4zEjKyJGJUSlcnSITU1RSe3SdPGyGVQc6tEUSkSIXFo13CM - FonUyGmy5p9xz+Lp/z8ZbGjzpgMv5+a8z1n4Pkn6H9HZnEH7zVQayxKYF7+hMg+3ynKO4LBVMWa7xmBf - Nme1vuSl67hi0GNMj/sVqBon5XqmnXVMOqoxF+sYH6kgJyWKF13xnD/tT7xmM7bOY4y0riY6bL8nRAWo - 5mlnDUUZR+m2ZCO/L2C4T89bywmaSgIJD/WmKnEVT/MkIg/v8wTUVeTMAuQbGBLDSNaFoI8K5lxkEDpt - IDEafyJCfciPXiMAIX7enoDqUgNTci1TdhPjQ5nYn0dhrVgu1Fu+jO7iRTwyegmzKp9tGz0BZlMGE/Yy - JgbSGH95irFnB5GbF5Nb3kqmqZELl2uJN5iJSS0hPMFIWGyWJ6C0MJXRQSNjfVpGH/vjur+Jj7dXCLM7 - pme+4XBOMjDsIDgihYDj+jlISW4S8qs0XA99cXWsx9m2ksFySXRWo/RWp5Cppp3efpsw3+2ysidIMwsp - zErgc88ZnO3rkFuWYq/3ov+6JMb+OvOdLy6l8wcHvW9sWHre4Rcag69i3rX3AN7bdyDlX4zD/iBCMS/h - U8NChioXYC2SiFZ2Vsd2T3BVmaDA3EZTh1VkVVs3rEW6lBwrHoj7yu6sVQ72c+d7ltfCXH+nm5rWJ3MA - dY3cpJPKCwtEE7SbgJ1bBFm9trqzu9vvspjgT3FIubZa8C/N67P9regHTvjvLQ3rR38AAAAASUVORK5C - YII= - - - \ No newline at end of file diff --git a/reactos/tools/sysgen/RosBuilder/ModuleFilter.cs b/reactos/tools/sysgen/RosBuilder/ModuleFilter.cs deleted file mode 100644 index 0853aeec8a1..00000000000 --- a/reactos/tools/sysgen/RosBuilder/ModuleFilter.cs +++ /dev/null @@ -1,295 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.BuildEngine; -using SysGen.BuildEngine.Framework; -using SysGen.RBuild.Framework; - -namespace TriStateTreeViewDemo -{ - public class ModuleFilterController - { - private List m_ModuleFilters = new List(); - private ISysGenDesigner m_SysGenDesigner = null; - - public ModuleFilterController(ISysGenDesigner engine) - { - //The engine... - m_SysGenDesigner = engine; - - RegisterDinamicFilters(); - RegisterModuleGroups(); - InitializeFilters(); - } - - private void RegisterDinamicFilters() - { - m_ModuleFilters.Add(new AllModuleFilter()); - m_ModuleFilters.Add(new AllWin32CUIModuleFilter()); - m_ModuleFilters.Add(new AllWin32GUIModuleFilter()); - m_ModuleFilters.Add(new AllScreenSaversModuleFilter()); - m_ModuleFilters.Add(new AllKeyboardLayoutsModuleFilter()); - m_ModuleFilters.Add(new AllDriversModuleFilter()); - m_ModuleFilters.Add(new AllDllsModuleFilter()); - } - - private void RegisterModuleGroups() - { - foreach (RBuildModule module in m_SysGenDesigner.ProjectController.AvailableModules) - { - if (module.Type == ModuleType.ModuleGroup) - { - m_ModuleFilters.Add(new PackageModuleFilter(module)); - } - } - } - - private void InitializeFilters() - { - foreach (ModuleFilter filter in m_ModuleFilters) - { - filter.Designer = m_SysGenDesigner; - filter.Initialize(); - } - } - - public List ModuleFilters - { - get { return m_ModuleFilters; } - } - - public void Apply(ModuleFilter filter) - { - m_SysGenDesigner.ProjectController.Add(filter.Modules); - } - - public void Remove(ModuleFilter filter) - { - //m_SysGenDesigner.PlatformController.Remove(filter.Modules); - } - } - - public abstract class ModuleFilter - { - protected ISysGenDesigner m_Project = null; - protected RBuildModuleCollection m_Modules = new RBuildModuleCollection(); - - public ModuleFilter() - { - } - - public virtual void Initialize() - { - ExecuteRule(); - } - - public abstract void ExecuteRule(); - - public RBuildModuleCollection Modules - { - get { return m_Modules; } - } - - public ISysGenDesigner Designer - { - get { return m_Project; } - set { m_Project = value; } - } - - public abstract string Name { get; } - - public override string ToString() - { - return string.Format("{0} - ({1} modules)", - Name, - Modules.Count); - } - } - - public class PackageModuleFilter : ModuleFilter - { - RBuildModule m_Module = null; - - public PackageModuleFilter(RBuildModule module) - { - //Save the underlaying module... - m_Module = module; - } - - public override string Name - { - get { return (m_Module.Description != null) ? m_Module.Description : m_Module.Name; } - } - - public override void ExecuteRule() - { - Modules.Add(m_Module.Needs); - } - } - - public class AllModuleFilter : ModuleFilter - { - public AllModuleFilter() - { - } - - public override string Name - { - get { return "All"; } - } - - public override void ExecuteRule() - { - foreach (RBuildModule module in Designer.ProjectController.AvailableModules) - { - if (Modules.Contains(module) == false) - Modules.Add(module); - } - } - } - - public class AllWin32CUIModuleFilter : ModuleFilter - { - public AllWin32CUIModuleFilter() - { - } - - public override string Name - { - get { return "All Console Applications"; } - } - - public override void ExecuteRule() - { - foreach (RBuildModule module in Designer.ProjectController.AvailableModules) - { - if (module.Type == ModuleType.Win32CUI) - { - if (Modules.Contains(module) == false) - Modules.Add(module); - } - } - } - } - - public class AllWin32GUIModuleFilter : ModuleFilter - { - public AllWin32GUIModuleFilter() - { - } - - public override string Name - { - get { return "All Graphical Applications"; } - } - - public override void ExecuteRule() - { - foreach (RBuildModule module in Designer.ProjectController.AvailableModules) - { - if (module.Type == ModuleType.Win32GUI) - { - if (Modules.Contains(module) == false) - Modules.Add(module); - } - } - } - } - - public class AllScreenSaversModuleFilter : ModuleFilter - { - public AllScreenSaversModuleFilter() - { - } - - public override string Name - { - get { return "All ScreenSavers"; } - } - - public override void ExecuteRule() - { - foreach (RBuildModule module in Designer.ProjectController.AvailableModules) - { - if (module.Type == ModuleType.Win32SCR) - { - if (Modules.Contains(module) == false) - Modules.Add(module); - } - } - } - } - - public class AllKeyboardLayoutsModuleFilter : ModuleFilter - { - public AllKeyboardLayoutsModuleFilter() - { - } - - public override string Name - { - get { return "All Keyboard Layouts"; } - } - - public override void ExecuteRule() - { - foreach (RBuildModule module in Designer.ProjectController.AvailableModules) - { - if (module.Type == ModuleType.KeyboardLayout) - { - if (Modules.Contains(module) == false) - Modules.Add(module); - } - } - } - } - - public class AllDriversModuleFilter : ModuleFilter - { - public AllDriversModuleFilter() - { - } - - public override string Name - { - get { return "All Drivers"; } - } - - public override void ExecuteRule() - { - foreach (RBuildModule module in Designer.ProjectController.AvailableModules) - { - if (module.Type == ModuleType.KernelModeDriver) - { - if (Modules.Contains(module) == false) - Modules.Add(module); - } - } - } - } - - public class AllDllsModuleFilter : ModuleFilter - { - public AllDllsModuleFilter() - { - } - - public override string Name - { - get { return "All Dlls"; } - } - - public override void ExecuteRule() - { - foreach (RBuildModule module in Designer.ProjectController.AvailableModules) - { - if (module.Type == ModuleType.Win32DLL) - { - if (Modules.Contains(module) == false) - Modules.Add(module); - } - } - } - } -} diff --git a/reactos/tools/sysgen/RosBuilder/NewItemForm.Designer.cs b/reactos/tools/sysgen/RosBuilder/NewItemForm.Designer.cs deleted file mode 100644 index 81bcb58e30d..00000000000 --- a/reactos/tools/sysgen/RosBuilder/NewItemForm.Designer.cs +++ /dev/null @@ -1,135 +0,0 @@ -namespace TriStateTreeViewDemo -{ - partial class NewItemForm - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.lbItems = new System.Windows.Forms.Label(); - this.lvAddItem = new System.Windows.Forms.ListView(); - this.btnAdd = new System.Windows.Forms.Button(); - this.btnCancel = new System.Windows.Forms.Button(); - this.lbDescription = new System.Windows.Forms.Label(); - this.lbName = new System.Windows.Forms.Label(); - this.textBox1 = new System.Windows.Forms.TextBox(); - this.SuspendLayout(); - // - // lbItems - // - this.lbItems.AutoSize = true; - this.lbItems.Location = new System.Drawing.Point(12, 24); - this.lbItems.Name = "lbItems"; - this.lbItems.Size = new System.Drawing.Size(78, 13); - this.lbItems.TabIndex = 0; - this.lbItems.Text = "Available Items"; - // - // lvAddItem - // - this.lvAddItem.Location = new System.Drawing.Point(12, 40); - this.lvAddItem.Name = "lvAddItem"; - this.lvAddItem.Size = new System.Drawing.Size(583, 236); - this.lvAddItem.TabIndex = 1; - this.lvAddItem.UseCompatibleStateImageBehavior = false; - this.lvAddItem.View = System.Windows.Forms.View.List; - this.lvAddItem.DoubleClick += new System.EventHandler(this.lvAddItem_DoubleClick); - // - // btnAdd - // - this.btnAdd.DialogResult = System.Windows.Forms.DialogResult.OK; - this.btnAdd.Location = new System.Drawing.Point(439, 348); - this.btnAdd.Name = "btnAdd"; - this.btnAdd.Size = new System.Drawing.Size(75, 23); - this.btnAdd.TabIndex = 2; - this.btnAdd.Text = "Add"; - this.btnAdd.UseVisualStyleBackColor = true; - // - // btnCancel - // - this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(520, 348); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(75, 23); - this.btnCancel.TabIndex = 3; - this.btnCancel.Text = "Cancel"; - this.btnCancel.UseVisualStyleBackColor = true; - // - // lbDescription - // - this.lbDescription.AutoSize = true; - this.lbDescription.Location = new System.Drawing.Point(12, 279); - this.lbDescription.Name = "lbDescription"; - this.lbDescription.Size = new System.Drawing.Size(79, 13); - this.lbDescription.TabIndex = 4; - this.lbDescription.Text = "Select any item"; - // - // lbName - // - this.lbName.AutoSize = true; - this.lbName.Location = new System.Drawing.Point(9, 308); - this.lbName.Name = "lbName"; - this.lbName.Size = new System.Drawing.Size(35, 13); - this.lbName.TabIndex = 5; - this.lbName.Text = "&Name"; - // - // textBox1 - // - this.textBox1.Location = new System.Drawing.Point(53, 305); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(542, 20); - this.textBox1.TabIndex = 6; - // - // NewItemForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(607, 383); - this.Controls.Add(this.textBox1); - this.Controls.Add(this.lbName); - this.Controls.Add(this.lbDescription); - this.Controls.Add(this.btnCancel); - this.Controls.Add(this.btnAdd); - this.Controls.Add(this.lvAddItem); - this.Controls.Add(this.lbItems); - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "NewItemForm"; - this.Text = "Add Item"; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Label lbItems; - private System.Windows.Forms.ListView lvAddItem; - private System.Windows.Forms.Button btnAdd; - private System.Windows.Forms.Button btnCancel; - private System.Windows.Forms.Label lbDescription; - private System.Windows.Forms.Label lbName; - private System.Windows.Forms.TextBox textBox1; - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/RosBuilder/NewItemForm.cs b/reactos/tools/sysgen/RosBuilder/NewItemForm.cs deleted file mode 100644 index 4101b0c988c..00000000000 --- a/reactos/tools/sysgen/RosBuilder/NewItemForm.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; -using System.Windows.Forms; - -namespace TriStateTreeViewDemo -{ - public partial class NewItemForm : Form - { - public NewItemForm() - { - InitializeComponent(); - } - - public ListView ListView - { - get { return lvAddItem; } - } - - private void lvAddItem_DoubleClick(object sender, EventArgs e) - { - DialogResult = DialogResult.OK; - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/RosBuilder/NewItemForm.resx b/reactos/tools/sysgen/RosBuilder/NewItemForm.resx deleted file mode 100644 index 19dc0dd8b39..00000000000 --- a/reactos/tools/sysgen/RosBuilder/NewItemForm.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/reactos/tools/sysgen/RosBuilder/PlatformCatalogReader.cs b/reactos/tools/sysgen/RosBuilder/PlatformCatalogReader.cs deleted file mode 100644 index 7a847340622..00000000000 --- a/reactos/tools/sysgen/RosBuilder/PlatformCatalogReader.cs +++ /dev/null @@ -1,206 +0,0 @@ -using System; -using System.Collections; -using System.Diagnostics; -using System.Text; -using System.Xml; -using System.Collections.Generic; - -using SysGen.RBuild.Framework; - -namespace SysGen.Framework.Catalog -{ - public class PlatformCatalogReader - { - XmlDocument doc = new XmlDocument(); - - RBuildProject m_Project = new RBuildProject(); - - public PlatformCatalogReader(string filename) - { - doc.Load(filename); - } - - public RBuildProject Project - { - get { return m_Project; } - } - - public void Read() - { - - foreach (XmlNode node in doc.SelectSingleNode("/catalog/modules").ChildNodes) - { - RBuildModule module = new RBuildModule(); - - module.Type = (ModuleType)Enum.Parse(typeof(ModuleType), node.Attributes["type"].Value.ToString()); - module.Name = node.Attributes["name"].Value.ToString(); - module.Folder.Base = node.Attributes["base"].Value.ToString(); - module.CatalogPath = node.Attributes["path"].Value.ToString(); - module.Description = node.Attributes["desc"].Value.ToString(); - - m_Project.Modules.Add(module); - } - - foreach (XmlNode node in doc.SelectSingleNode("/catalog/modules").ChildNodes) - { - RBuildModule module = m_Project.Modules.GetByName(node.Attributes["name"].Value.ToString()); - - foreach (XmlNode snode in node.SelectSingleNode("libraries").ChildNodes) - { - module.Libraries.Add(m_Project.Modules.GetByName(snode.InnerText)); - } - - foreach (XmlNode snode in node.SelectSingleNode("dependencies").ChildNodes) - { - module.Dependencies.Add(m_Project.Modules.GetByName(snode.InnerText)); - } - - foreach (XmlNode snode in node.SelectSingleNode("requeriments").ChildNodes) - { - module.Requeriments.Add(m_Project.Modules.GetByName(snode.InnerText)); - } - } - - foreach (XmlNode node in doc.SelectSingleNode("/catalog/languages").ChildNodes) - { - RBuildLanguage language = new RBuildLanguage(); - - language.Name = node.Attributes["name"].Value.ToString(); - - m_Project.Languages.Add(language); - } - - foreach (XmlNode node in doc.SelectSingleNode("/catalog/debugchannels").ChildNodes) - { - RBuildDebugChannel language = new RBuildDebugChannel(); - - language.Name = node.Attributes["name"].Value.ToString(); - - m_Project.DebugChannels.Add(language); - } - - /* - RBuildModuleInfoCollection modules = new RBuildModuleInfoCollection(); - - - WhitespaceHandling = WhitespaceHandling.None; - - ReadStartElement("modules"); - while (Name == "module") - { - RBuildModuleInfo module = new RBuildModuleInfo(); - - MoveToFirstAttribute(); - do - { - switch (Name) - { - case "name": - module.Name = Value; - break; - case "type": - module.Type = (ModuleType)Enum.Parse(typeof(ModuleType), Value); - break; - case "base": - module.Base = Value; - break; - case "desc": - module.CatalogPath = Value; - break; - case "path": - module.CatalogPath = Value; - break; - } - - } - while (MoveToNextAttribute()); - - MoveToElement(); - - //Read(); - //Read(); - - if (Name == "libraries") - { - if (!IsEmptyElement) - { - ReadStartElement("libraries"); - while (Name == "library") - { - ReadStartElement("library"); - module.Libraries.Add(ReadContentAsString()); - ReadEndElement(); - } - ReadEndElement(); - } - else - ReadStartElement("libraries"); - } - - if (Name == "dependencies") - { - if (!IsEmptyElement) - { - ReadStartElement("dependencies"); - while (Name == "dependency") - { - ReadStartElement("dependency"); - module.Dependencies.Add(ReadContentAsString()); - ReadEndElement(); - } - ReadEndElement(); - } - else - ReadStartElement("dependencies"); - } - - if (Name == "requeriments") - { - if (!IsEmptyElement) - { - ReadStartElement("requeriments"); - while (Name == "requires") - { - ReadStartElement("requires"); - module.Requirements.Add(ReadContentAsString()); - ReadEndElement(); - } - ReadEndElement(); - } - else - ReadStartElement("requeriments"); - } - - modules.Add(module); - - Read(); - } - - ReadEndElement(); - - foreach (RBuildModuleInfo moduleInfo in modules) - { - RBuildModule module = new RBuildModule(); - - module.Type = moduleInfo.Type; - module.Name = moduleInfo.Name; - - m_Modules.Add(module); - } - - foreach (RBuildModuleInfo moduleInfo in modules) - { - RBuildModule module = m_Modules.GetByName(moduleInfo.Name); - - foreach (string library in moduleInfo.Libraries) - module.Libraries.Add(m_Modules.GetByName(library)); - - foreach (string library in moduleInfo.Dependencies) - module.Dependencies.Add(m_Modules.GetByName(library)); - - foreach (string library in moduleInfo.Requirements) - module.Requeriments.Add(m_Modules.GetByName(library)); - }*/ - } - } -} diff --git a/reactos/tools/sysgen/RosBuilder/PlatformController.cs b/reactos/tools/sysgen/RosBuilder/PlatformController.cs deleted file mode 100644 index 1d710cb372f..00000000000 --- a/reactos/tools/sysgen/RosBuilder/PlatformController.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using System.Windows.Forms; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine; -using SysGen.BuildEngine.Tasks; - -namespace TriStateTreeViewDemo -{ - public class PlatformController - { - private ISysGenDesigner m_SysGenDesigner = null; - - public PlatformController(ISysGenDesigner engine) - { - m_SysGenDesigner = engine; - } - - public ProjectTask ProjectTask - { - get { return m_SysGenDesigner.SysGenEngine.ProjectTask; } - } - - public RBuildProject Project - { - get { return m_SysGenDesigner.SysGenEngine.Project; } - } - - public void Remove(RBuildModule module) - { - } - - public void Add(RBuildModule module) - { - SysGenDependencyTracker dependencyTracker = new SysGenDependencyTracker(module , Project.Platform.Modules); - - if (AskAddModulesToPlatform(dependencyTracker.Missing)) - { - Project.Platform.Modules.Add(dependencyTracker.Dependencies); - } - } - - public void Add(RBuildModuleCollection modules) - { - SysGenDependencyTracker dependencyTracker = new SysGenDependencyTracker(modules, Project.Platform.Modules); - - if (AskAddModulesToPlatform(dependencyTracker.Missing)) - { - Project.Platform.Modules.Add(dependencyTracker.Dependencies); - } - } - - public bool AskAddModulesToPlatform(RBuildModuleCollection missingDependencies) - { - if (missingDependencies.Count > 0) - { - StringBuilder str = new StringBuilder(); - - str.AppendFormat("This action requieres adding {0} dependecies no present in your platform :", missingDependencies.Count); - str.AppendLine(); - str.AppendLine(); - - foreach (RBuildModule dependency in missingDependencies) - { - str.AppendFormat("{0} on '{1}' \n", - dependency.Name, - dependency.Base); - } - - str.AppendLine(); - str.AppendLine("¿Do you want to add this dependencies?"); - - if (MessageBox.Show(str.ToString(), "RosBuilder", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes) - { - return true; - } - } - else - return true; - - return false; - } - } -} diff --git a/reactos/tools/sysgen/RosBuilder/Program.cs b/reactos/tools/sysgen/RosBuilder/Program.cs deleted file mode 100644 index 6d9cbcb5b1f..00000000000 --- a/reactos/tools/sysgen/RosBuilder/Program.cs +++ /dev/null @@ -1,109 +0,0 @@ -using System; -using System.Reflection; -using System.Collections.Generic; -using System.Windows.Forms; - -using TriStateTreeViewDemo; - -namespace TriStateTreeViewDemo -{ - static class Program - { - /// - /// The main entry point for the application. - /// - [STAThread] - static void Main(string[] args) - { - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - - MainForm mainForm = new MainForm(); - - if (args.Length == 0) - { - //Create file associations from .dnml files to the script engine - CreateFileAssociation(); - } - else if (args[0].ToLower() == "remove") - { - //Remove file associations for .dnml files to the script engine - RemoveFileAssociation(); - } - else - { - mainForm.ProjectController.Open(args[0]); - - if (args.Length > 1) - { - if (args[1].ToLower() == "x86") - { - MessageBox.Show("86"); - } - else if (args[1].ToLower() == "ppc") - { - MessageBox.Show("ppc"); - } - else if (args[1].ToLower() == "arm") - { - MessageBox.Show("arm"); - } - else - { - MessageBox.Show("Unknown Architecture"); - } - - if (args.Length > 2) - { - if (args[2].ToLower() == "debug") - { - mainForm.ProjectController.SysGenProject.Debug = true; - } - else if (args[2].ToLower() == "release") - { - mainForm.ProjectController.SysGenProject.Debug = false; - } - else - { - MessageBox.Show("Unknown Target Mode"); - } - } - } - } - - //Run the application - Application.Run(mainForm); - } - - internal static void CreateFileAssociation() - { - FileAssociation FA = new FileAssociation(); - FA.Extension = "sgpd"; - FA.ContentType = "application/sysgenproject"; - FA.FullName = "SysGenProject"; - FA.ProperName = "SysGenProject"; - FA.AddCommand("open", "\"" + Assembly.GetExecutingAssembly().Location + "\" \" %1\""); - FA.AddCommand("edit", "notepad.exe %1"); - FA.AddCommand("Generate x86", "\"" + Assembly.GetExecutingAssembly().Location + "\" \" %1\" X86 RELEASE"); - FA.AddCommand("Generate x86 [DEBUG]", "\"" + Assembly.GetExecutingAssembly().Location + "\" \" %1\" X86 DEBUG"); - FA.IconPath = Assembly.GetExecutingAssembly().Location; - FA.IconIndex = 0; - FA.Create(); - } - - internal static void RemoveFileAssociation() - { - FileAssociation FA = new FileAssociation(); - FA.Extension = "sgpd"; - FA.ContentType = "application/sysgenproject"; - FA.FullName = "SysGenProject"; - FA.ProperName = "SysGenProject"; - FA.AddCommand("open", Assembly.GetExecutingAssembly().Location + " %1"); - FA.AddCommand("edit", "notepad.exe %1"); - FA.AddCommand("edit123", "notepad.exe %1"); - FA.IconPath = Assembly.GetExecutingAssembly().Location; - FA.IconIndex = 0; - FA.Remove(); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/RosBuilder/Project/Project.cs b/reactos/tools/sysgen/RosBuilder/Project/Project.cs deleted file mode 100644 index f024dc385a5..00000000000 --- a/reactos/tools/sysgen/RosBuilder/Project/Project.cs +++ /dev/null @@ -1,267 +0,0 @@ -using System; -using System.Collections.Specialized; -using System.Collections.Generic; -using System.Xml; -using System.Collections; -using System.IO; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace TriStateTreeViewDemo -{ - public enum TargetArchitectureType - { - X86, - X86_i486, - X86_i586, - X86_Pentium, - X86_Pentium2, - X86_Pentium3, - X86_Pentium4, - X86_AthlonXP, - X86_AthlonMP, - X86_Xbox, - PPC, - ARM - } - - public enum OptimizeLevelType : int - { - Level_0 = 0, - Level_1 = 1, - Level_2 = 2, - Level_3 = 3, - Level_4 = 4, - Level_5 = 5 - } - - public class Project : RBuildPlatform - { - RBuildProject m_Project = null; - - string m_FilePath; // full path to this project, including filename - string m_FileName = "Unnamed"; - - //MovieOptions movieOptions; - //CompilerOptions compilerOptions; - //PathCollection classpaths; - //PathCollection compileTargets; - //HiddenPathCollection hiddenPaths; - //AssetCollection libraryAssets; - bool traceEnabled; // selected configuration - - public bool NoOutput; // Disable file building - public string InputPath; // For code injection - public string OutputPath; - public string PreBuildEvent; - public string PostBuildEvent; - public string TestMovieCommand; - public bool AlwaysRunPostBuild; - public bool ShowHiddenPaths; - - public string Source; - - public Project(RBuildProject project,string path) - { - m_FilePath = path; - m_FileName = Path.GetFileName(path); - m_Project = project; - m_Project.Platform = this; - } - - public Project(RBuildProject project) - { - m_Project = project; - m_Project.Platform = this; - } - - public RBuildProject RBuildProject - { - get { return m_Project; } - } - - public virtual bool UsesInjection { get { return false; } } - public virtual bool HasLibraries { get { return false; } } - public virtual void ValidateBuild(out string error) { error = null; } - - #region Simple Properties - - public string ProjectPath { get { return m_FilePath; } set { m_FilePath = value; } } - //public string Name { get { return Path.GetFileNameWithoutExtension(path).Replace(' ', '-'); } } - public string Directory { get { return Path.GetDirectoryName(m_FilePath); } } - public Boolean TraceEnabled { set { traceEnabled = value; } get { return traceEnabled; } } - - public string FileName - { - get { return m_FileName; } - } - - //// we only provide getters for these to preserve the original pointer - //public MovieOptions MovieOptions { get { return movieOptions; } } - //public PathCollection Classpaths { get { return classpaths; } } - //public PathCollection CompileTargets { get { return compileTargets; } } - //public HiddenPathCollection HiddenPaths { get { return hiddenPaths; } } - //public AssetCollection LibraryAssets { get { return libraryAssets; } } - - //public CompilerOptions CompilerOptions - //{ - // get { return compilerOptions; } - // set { compilerOptions = value; } - //} - - //public PathCollection AbsoluteClasspaths - //{ - // get - // { - // PathCollection absolute = new PathCollection(); - // foreach (string cp in classpaths) - // absolute.Add(GetAbsolutePath(cp)); - // return absolute; - // } - //} - - //public string OutputPathAbsolute { get { return GetAbsolutePath(OutputPath); } } - - public bool CanBuild - { - get { return OutputPath != null && OutputPath.Length > 0; } - } - - #endregion - - #region Methods - - // all the Set/Is methods expect absolute paths (as opposed to the way they're - // actually stored) - - //public void SetPathHidden(string path, bool isHidden) - //{ - // path = GetRelativePath(path); - - // if (isHidden) - // { - // hiddenPaths.Add(path); - // compileTargets.RemoveAtOrBelow(path); // can't compile hidden files - // libraryAssets.RemoveAtOrBelow(path); // can't embed hidden resources - // } - // else hiddenPaths.Remove(path); - //} - - //public bool IsPathHidden(string path) - //{ - // return hiddenPaths.IsHidden(GetRelativePath(path)); - //} - - public void SetCompileTarget(string path, bool isCompileTarget) - { - //if (isCompileTarget) - // compileTargets.Add(GetRelativePath(path)); - //else - // compileTargets.Remove(GetRelativePath(path)); - } - - //public bool IsCompileTarget(string path) { return compileTargets.Contains(GetRelativePath(path)); } - - public void SetLibraryAsset(string path, bool isLibraryAsset) - { - //if (isLibraryAsset) - // libraryAssets.Add(GetRelativePath(path)); - //else - // libraryAssets.Remove(GetRelativePath(path)); - } - - //public bool IsLibraryAsset(string path) { return libraryAssets.Contains(GetRelativePath(path)); } -// public LibraryAsset GetAsset(string path) { return libraryAssets[GetRelativePath(path)]; } - - public void ChangeAssetPath(string fromPath, string toPath) - { - //if (IsLibraryAsset(fromPath)) - //{ - // //LibraryAsset asset = libraryAssets[GetRelativePath(fromPath)]; - // //libraryAssets.Remove(asset); - // //asset.Path = GetRelativePath(toPath); - // //libraryAssets.Add(asset); - //} - } - - //public bool IsInput(string path) { return GetRelativePath(path) == InputPath; } - //public bool IsOutput(string path) { return GetRelativePath(path) == OutputPath; } - - /// - /// Call this when you delete a path so we can remove all our references to it - /// - public void NotifyPathsDeleted(string path) - { - //path = GetRelativePath(path); - //hiddenPaths.Remove(path); - //compileTargets.RemoveAtOrBelow(path); - //libraryAssets.RemoveAtOrBelow(path); - } - - /// - /// Returns the path to the "obj\" subdirectory, creating it if necessary. - /// - public string GetObjDirectory() - { - string objPath = Path.Combine(this.Directory, "obj"); - if (!System.IO.Directory.Exists(objPath)) - System.IO.Directory.CreateDirectory(objPath); - return objPath; - } - - #endregion - - #region Relative Path Helpers - - //public string GetRelativePath(string path) - //{ - // return ProjectPaths.GetRelativePath(this.Directory,path); - //} - - //public string GetAbsolutePath(string path) - //{ - // return ProjectPaths.GetAbsolutePath(this.Directory,path); - //} - - #endregion - - public Project Load() - { - ProjectReader reader = new ProjectReader(this, ProjectPath); - - try - { - return reader.ReadProject(); - } - catch (XmlException exception) - { - string format = string.Format("Error in Project '{0}' line {1}, position {2}.", - ProjectPath, - exception.LineNumber, - exception.LinePosition); - - throw new Exception(format, exception); - } - finally - { - reader.Close(); - } - } - - public void Save() - { - ProjectWriter writer = new ProjectWriter(this, ProjectPath); - - try - { - writer.WriteProject(); - writer.Flush(); - } - finally - { - writer.Close(); - } - } - } -} diff --git a/reactos/tools/sysgen/RosBuilder/Project/ProjectReader.cs b/reactos/tools/sysgen/RosBuilder/Project/ProjectReader.cs deleted file mode 100644 index 4fec3546bc6..00000000000 --- a/reactos/tools/sysgen/RosBuilder/Project/ProjectReader.cs +++ /dev/null @@ -1,319 +0,0 @@ -using System; -using System.Windows.Forms; -using System.Collections; -using System.Diagnostics; -using System.Text; -using System.Xml; -using System.Collections.Generic; - -using SysGen.RBuild.Framework; - -namespace TriStateTreeViewDemo -{ - public class ProjectReader : XmlTextReader - { - Project project; - - public ProjectReader(Project project, string filename) - : base(filename) - { - this.project = project; - WhitespaceHandling = WhitespaceHandling.None; - } - - protected Project Project { get { return project; } } - - public virtual Project ReadProject() - { - MoveToContent(); - - while (Read()) - ProcessNode(Name); - - return project; - } - - private void ReadModules() - { - RBuildModule module = null; - - ReadStartElement("modules"); - while (Name == "module") - { - try - { - module = project.RBuildProject.Modules.GetByName(GetAttribute("name")); - - if (module == null) - throw new Exception("Unkown module '" + Value + "'"); - - project.Modules.Add(module); - - //project.SysGenDesinger.PlatformController.Project.Platform.Modules.Add(module); - } - catch (Exception e) - { - MessageBox.Show( - e.Message, - "Error", - MessageBoxButtons.OK, - MessageBoxIcon.Error); - } - - //project.Modules.Add(GetAttribute("name")); - - // continue reading - Read(); - } - - ReadEndElement(); - } - - private void ReadLanguages() - { - RBuildLanguage language = null; - - ReadStartElement("languages"); - while (Name == "language") - { - try - { - language = project.RBuildProject.Languages.GetByName(GetAttribute("name")); - - if (language == null) - throw new Exception("Unkown language '" + Value + "'"); - - project.Languages.Add(language); - } - catch (Exception e) - { - MessageBox.Show(e.Message, - "Error", - MessageBoxButtons.OK, - MessageBoxIcon.Error); - } - - // continue reading - Read(); - } - - ReadEndElement(); - } - - //private void ReadRSLPaths() - //{ - // //project.CompilerOptions.RSLPaths = ReadLibrary("rslPaths"); - //} - - //private void ReadExternalLibraryPaths() - //{ - // //project.CompilerOptions.ExternalLibraryPaths = ReadLibrary("externalLibraryPaths"); - //} - - //private void ReadLibrayPath() - //{ - // //project.CompilerOptions.LibraryPaths = ReadLibrary("libraryPaths"); - //} - - //private void ReadIncludeLibraries() - //{ - // //project.CompilerOptions.IncludeLibraries = ReadLibrary("includeLibraries"); - //} - - //private string[] ReadLibrary(string name) - //{ - // ReadStartElement(name); - // List elements = new List(); - // while (Name == "element") - // { - // elements.Add(GetAttribute("path")); - // Read(); - // } - // ReadEndElement(); - // string[] result = new string[elements.Count]; - // elements.CopyTo(result); - // return result; - //} - - public void ReadApplications() - { - ReadStartElement("applications"); - while (Name == "option") - { - MoveToFirstAttribute(); - switch (Name) - { - case "shell": - project.Shell = Project.RBuildProject.Modules.GetByName(Value); - break; - case "screensaver": - project.Screensaver = Project.RBuildProject.Modules.GetByName(Value); - break; - case "wallpaper": - //project.Wallpaper = Value; - break; - } - Read(); - } - ReadEndElement(); - } - - //protected virtual void ProcessNode(string name) - //{ - // switch (name) - // { - // case "output": ReadOutputOptions(); break; - // // case "classpaths": ReadClasspaths(); break; - // // case "compileTargets": ReadCompileTargets(); break; - // // case "hiddenPaths": ReadHiddenPaths(); break; - // // case "preBuildCommand": ReadPreBuildCommand(); break; - // // case "postBuildCommand": ReadPostBuildCommand(); break; - // // case "options": ReadProjectOptions(); break; - // } - //} - - // process AS3-specific stuff - protected virtual void ProcessNode(string name) - { - if (NodeType == XmlNodeType.Element) - { - switch (name) - { - //case "build": ReadBuildOptions(); break; - //case "includeLibraries": ReadIncludeLibraries(); break; - //case "libraryPaths": ReadLibrayPath(); break; - //case "externalLibraryPaths": ReadExternalLibraryPaths(); break; - case "modules": - ReadModules(); - break; - case "languages": - ReadLanguages(); - break; - case "applications": - ReadApplications(); - break; - case "output": - ReadOutputOptions(); - break; - case "options": - ReadProjectOptions(); - break; - //default: - // base.ProcessNode(name); break; - } - } - } - - public void ReadOutputOptions() - { - ReadStartElement("output"); - while (Name == "movie") - { - MoveToFirstAttribute(); - switch (Name) - { - case "name": - project.Name = Value; - break; - case "desc": - project.Description = Value; - break; - //case "path": project.OutputPath = OSPath(Value); break; - //case "fps": project.MovieOptions.Fps = IntValue; break; - //case "width": project.MovieOptions.Width = IntValue; break; - //case "height": project.MovieOptions.Height = IntValue; break; - //case "version": project.MovieOptions.Version = IntValue; break; - //case "background": project.MovieOptions.Background = Value; break; - } - Read(); - } - ReadEndElement(); - } - - //public void ReadClasspaths() - //{ - // ReadStartElement("classpaths"); - // //ReadPaths("class",project.Classpaths); - // ReadEndElement(); - //} - - //public void ReadCompileTargets() - //{ - // ReadStartElement("compileTargets"); - // //ReadPaths("compile",project.CompileTargets); - // ReadEndElement(); - //} - - //public void ReadHiddenPaths() - //{ - // ReadStartElement("hiddenPaths"); - // //ReadPaths("hidden",project.HiddenPaths); - // ReadEndElement(); - //} - - //public void ReadPreBuildCommand() - //{ - // if (!IsEmptyElement) - // { - // ReadStartElement("preBuildCommand"); - // project.PreBuildEvent = OSPath(ReadString().Trim()); - // ReadEndElement(); - // } - //} - - public void ReadPostBuildCommand() - { - //project.AlwaysRunPostBuild = Convert.ToBoolean(GetAttribute("alwaysRun")); - - //if (!IsEmptyElement) - //{ - // ReadStartElement("postBuildCommand"); - // project.PostBuildEvent = OSPath(ReadString().Trim()); - // ReadEndElement(); - //} - } - - public void ReadProjectOptions() - { - ReadStartElement("options"); - while (Name == "option") - { - MoveToFirstAttribute(); - switch (Name) - { - case "debug": - project.Debug = BoolValue; - break; - case "kdebug": - project.KDebug = BoolValue; - break; - case "source": - project.Source = Value; - break; - } - Read(); - } - ReadEndElement(); - } - - public bool BoolValue { get { return Convert.ToBoolean(Value); } } - public int IntValue { get { return Convert.ToInt32(Value); } } - - //public void ReadPaths(string pathNodeName, IAddPaths paths) - //{ - // while (Name == pathNodeName) - // { - // paths.Add(OSPath(GetAttribute("path"))); - // Read(); - // } - //} - - //protected string OSPath(string path) - //{ - // if (path != null) - // return path.Replace('\\',System.IO.Path.DirectorySeparatorChar); - // else - // return null; - //} - } -} diff --git a/reactos/tools/sysgen/RosBuilder/Project/ProjectWriter.cs b/reactos/tools/sysgen/RosBuilder/Project/ProjectWriter.cs deleted file mode 100644 index 1061c326395..00000000000 --- a/reactos/tools/sysgen/RosBuilder/Project/ProjectWriter.cs +++ /dev/null @@ -1,170 +0,0 @@ -using System; -using System.Collections; -using System.IO; -using System.Diagnostics; -using System.Text; -using System.Xml; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine; -using SysGen.BuildEngine.Framework; - -namespace TriStateTreeViewDemo -{ - public class ProjectWriter : XmlTextWriter - { - Project m_Project; - - public ProjectWriter(Project project, string filename) : base(filename,Encoding.UTF8) - { - m_Project = project; - Formatting = Formatting.Indented; - } - - protected Project Project { get { return m_Project; } } - - public void WriteProject() - { - WriteStartDocument(); - WriteStartElement("project"); - WriteOutputOptions(); - WriteBuildOptions(); - WriteProjectOptions(); - WriteEndElement(); - WriteEndDocument(); - } - - public void WriteOutputOptions() - { - WriteComment(" Output SWF options "); - WriteStartElement("output"); - WriteOption("movie", "name", m_Project.Name); - WriteOption("movie", "desc", m_Project.Description); - WriteEndElement(); - } - - public void WriteBuildOptions() - { - WriteComment(" Build options "); - WriteStartElement("build"); - - if (Project.Modules.Count > 0) - { - WriteStartElement("modules"); - foreach (RBuildModule module in Project.Modules) - { - WriteStartElement("module"); - WriteAttributeString("name", module.Name); - WriteEndElement(); - } - WriteEndElement(); - } - - WriteEndElement(); - - if (Project.Languages.Count > 0) - { - WriteComment(" Build options "); - WriteStartElement("languages"); - foreach (RBuildLanguage language in Project.Languages) - { - WriteStartElement("language"); - WriteAttributeString("name", language.Name); - WriteEndElement(); - } - WriteEndElement(); - } - - if (Project.DebugChannels.Count > 0) - { - WriteStartElement("debugchhanels"); - foreach (RBuildDebugChannel channel in Project.DebugChannels) - { - WriteStartElement("debugchannel"); - WriteAttributeString("name", channel.Name); - WriteEndElement(); - } - WriteEndElement(); - } - - WriteStartElement("applications"); - - if (m_Project.Shell != null) - WriteOption("Shell", m_Project.Shell.Name); - - if (m_Project.Screensaver != null) - WriteOption("Screensaver", m_Project.Screensaver.Name); - - if (m_Project.Wallpaper != null) - WriteOption("Wallpaper", m_Project.Wallpaper.Name); - - WriteEndElement(); - } - - public void WriteClasspaths() - { - WriteComment(" Other classes to be compiled into your SWF "); - WriteStartElement("classpaths"); - //WritePaths(project.Classpaths,"class"); - WriteEndElement(); - } - - public void WriteCompileTargets() - { - WriteComment(" Class files to compile (other referenced classes will automatically be included) "); - WriteStartElement("compileTargets"); - //WritePaths(project.CompileTargets,"compile"); - WriteEndElement(); - } - - public void WriteHiddenPaths() - { - WriteComment(" Paths to exclude from the Project Explorer tree "); - WriteStartElement("hiddenPaths"); - //WritePaths(project.HiddenPaths,"hidden"); - WriteEndElement(); - } - - public void WritePreBuildCommand() - { - WriteComment(" Executed before build "); - WriteStartElement("preBuildCommand"); - if (m_Project.PreBuildEvent.Length > 0) - WriteString(m_Project.PreBuildEvent); - WriteEndElement(); - } - - public void WritePostBuildCommand() - { - WriteComment(" Executed after build "); - WriteStartElement("postBuildCommand"); - WriteAttributeString("alwaysRun",m_Project.AlwaysRunPostBuild.ToString()); - if (m_Project.PostBuildEvent.Length > 0) - WriteString(m_Project.PostBuildEvent); - WriteEndElement(); - - } - - public void WriteProjectOptions() - { - WriteComment(" Other project options "); - WriteStartElement("options"); - WriteOption("debug",m_Project.Debug); - WriteOption("kdebug",m_Project.KDebug); - WriteOption("source", @"c:\ros\trunk\reactos" /*project.Source*/); - WriteEndElement(); - } - - public void WriteOption(string optionName, object optionValue) - { - WriteOption("option", optionName, optionValue); - } - - public void WriteOption(string nodeName, string optionName, object optionValue) - { - WriteStartElement(nodeName); - WriteAttributeString(optionName, optionValue.ToString()); - WriteEndElement(); - } - } -} diff --git a/reactos/tools/sysgen/RosBuilder/ProjectController.cs b/reactos/tools/sysgen/RosBuilder/ProjectController.cs deleted file mode 100644 index c77491d236f..00000000000 --- a/reactos/tools/sysgen/RosBuilder/ProjectController.cs +++ /dev/null @@ -1,222 +0,0 @@ -using System; -using System.Windows.Forms; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine; -using SysGen.BuildEngine.Tasks; -using SysGen.Framework.Catalog; - -namespace TriStateTreeViewDemo -{ - public class ProjectController - { - private ISysGenDesigner m_SysGenDesigner = null; - private RBuildProject m_Project = null; - - public event EventHandler PlatformModulesUpdated; - public event EventHandler ProjectLoaded; - public event EventHandler ProjectSaved; - public event EventHandler ProjectUpdated; - - public ProjectController(ISysGenDesigner engine) - { - m_SysGenDesigner = engine; - - PlatformCatalogReader m_Catalog = new PlatformCatalogReader(@"C:\Ros\trunk\reactos\rbuilddb.xml"); - m_Catalog.Read(); - - m_Project = m_Catalog.Project; - - New(); - } - - public void New() - { - m_Project.Platform = new Project(m_Project); - - if (ProjectLoaded != null) - ProjectLoaded(this, EventArgs.Empty); - - if (PlatformModulesUpdated != null) - PlatformModulesUpdated(this, EventArgs.Empty); - } - - public void Open(string file) - { - SysGenProject = new Project(m_Project, file); - SysGenProject.Load(); - - if (ProjectLoaded != null) - ProjectLoaded(this, EventArgs.Empty); - - if (PlatformModulesUpdated != null) - PlatformModulesUpdated(this, EventArgs.Empty); - } - - public void Open() - { - using (OpenFileDialog openFile = new OpenFileDialog()) - { - openFile.Title = "Open SysGen Designer Project File"; - //openFile.InitialDirectory = m_SysGenEngine.BaseDirectory; - openFile.Filter = "SysGen Project File|*.sgpd"; - - if (openFile.ShowDialog() == DialogResult.OK) - { - SysGenProject = new Project(m_Project, openFile.FileName); - SysGenProject.Load(); - - if (ProjectLoaded != null) - ProjectLoaded(this, EventArgs.Empty); - - if (PlatformModulesUpdated != null) - PlatformModulesUpdated(this, EventArgs.Empty); - } - } - } - - public void Save() - { - using (SaveFileDialog saveFile = new SaveFileDialog()) - { - saveFile.Title = "Save SysGen Designer Project File"; - //saveFile.InitialDirectory = m_SysGenEngine.BaseDirectory; - saveFile.Filter = "SysGen Project File|*.sgpd"; - - if (saveFile.ShowDialog() == DialogResult.OK) - { - SysGenProject.ProjectPath = saveFile.FileName; - SysGenProject.Save(); - - if (PlatformModulesUpdated != null) - PlatformModulesUpdated(this, EventArgs.Empty); - - if (ProjectSaved != null) - ProjectSaved(this, EventArgs.Empty); - } - } - } - - public RBuildModuleCollection AvailableModules - { - get { return m_Project.Modules; } - } - - public RBuildProject Project - { - get { return m_Project; } - } - - public Project SysGenProject - { - get { return Project.Platform as Project; } - set { Project.Platform = value; } - } - - public void Remove(RBuildModule module) - { - SysGenDependencyTracker dependencyTracker = new SysGenDependencyTracker(Project, module); - - if (dependencyTracker.Using.Count > 0) - { - string s = string.Format("Cannot remove module '{0}' because '{1}' modules depends on it", - module.Name, - dependencyTracker.Using.Count); - - MessageBox.Show(s, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - else - { - Project.Platform.Modules.Remove(module); - } - - if (PlatformModulesUpdated != null) - PlatformModulesUpdated(this, EventArgs.Empty); - } - - public void Add(RBuildModule module) - { - SysGenDependencyTracker dependencyTracker = new SysGenDependencyTracker(Project , module); - - if (AskAddModulesToPlatform(dependencyTracker.Missing)) - { - Project.Platform.Modules.Add(dependencyTracker.DependsOn); - Project.Platform.Modules.Add(module); - } - - if (PlatformModulesUpdated != null) - PlatformModulesUpdated(this, EventArgs.Empty); - } - - public void Add(RBuildModuleCollection modules) - { - SysGenDependencyTracker dependencyTracker = new SysGenDependencyTracker(Project, modules); - - if (AskAddModulesToPlatform(dependencyTracker.Missing)) - { - Project.Platform.Modules.Add(dependencyTracker.DependsOn); - Project.Platform.Modules.Add(modules); - } - - if (PlatformModulesUpdated != null) - PlatformModulesUpdated(this, EventArgs.Empty); - } - - public void AddLanguage(RBuildLanguage language) - { - if (Project.Platform.Languages.Contains(language) == false) - Project.Platform.Languages.Add(language); - - if (PlatformModulesUpdated != null) - PlatformModulesUpdated(this, EventArgs.Empty); - - if (ProjectUpdated != null) - ProjectUpdated(this, EventArgs.Empty); - } - - public void AddDebugChannel(RBuildDebugChannel channel) - { - if (Project.Platform.DebugChannels.Contains(channel) == false) - Project.Platform.DebugChannels.Add(channel); - - if (PlatformModulesUpdated != null) - PlatformModulesUpdated(this, EventArgs.Empty); - - if (ProjectUpdated != null) - ProjectUpdated(this, EventArgs.Empty); - } - - public bool AskAddModulesToPlatform(RBuildModuleCollection missingDependencies) - { - if (missingDependencies.Count > 0) - { - StringBuilder str = new StringBuilder(); - - str.AppendFormat("This action requieres adding {0} dependecies no present in your platform :", missingDependencies.Count); - str.AppendLine(); - str.AppendLine(); - - foreach (RBuildModule dependency in missingDependencies) - { - str.AppendFormat("{0} on '{1}' \n", - dependency.Name, - dependency.Base); - } - - str.AppendLine(); - str.AppendLine("¿Do you want to add this dependencies?"); - - if (MessageBox.Show(str.ToString(), "RosBuilder", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes) - { - return true; - } - } - else - return true; - - return false; - } - } -} diff --git a/reactos/tools/sysgen/RosBuilder/Properties/AssemblyInfo.cs b/reactos/tools/sysgen/RosBuilder/Properties/AssemblyInfo.cs deleted file mode 100644 index 0b59df60ad1..00000000000 --- a/reactos/tools/sysgen/RosBuilder/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("RosBuilder")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Sand")] -[assembly: AssemblyProduct("RosBuilder")] -[assembly: AssemblyCopyright("Copyright © Sand 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("8f4d0b84-8882-4b89-8e3c-8ce5238d603f")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/reactos/tools/sysgen/RosBuilder/Properties/Resources.Designer.cs b/reactos/tools/sysgen/RosBuilder/Properties/Resources.Designer.cs deleted file mode 100644 index 268c5602106..00000000000 --- a/reactos/tools/sysgen/RosBuilder/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.4927 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace RosBuilder.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RosBuilder.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } -} diff --git a/reactos/tools/sysgen/RosBuilder/Properties/Resources.resx b/reactos/tools/sysgen/RosBuilder/Properties/Resources.resx deleted file mode 100644 index af7dbebbace..00000000000 --- a/reactos/tools/sysgen/RosBuilder/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/reactos/tools/sysgen/RosBuilder/Properties/Settings.Designer.cs b/reactos/tools/sysgen/RosBuilder/Properties/Settings.Designer.cs deleted file mode 100644 index 71b700b5e99..00000000000 --- a/reactos/tools/sysgen/RosBuilder/Properties/Settings.Designer.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.4927 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace RosBuilder.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - } -} diff --git a/reactos/tools/sysgen/RosBuilder/Properties/Settings.settings b/reactos/tools/sysgen/RosBuilder/Properties/Settings.settings deleted file mode 100644 index 39645652af6..00000000000 --- a/reactos/tools/sysgen/RosBuilder/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/reactos/tools/sysgen/RosBuilder/SysGen.Designer.csproj b/reactos/tools/sysgen/RosBuilder/SysGen.Designer.csproj deleted file mode 100644 index 3e94b2c1469..00000000000 --- a/reactos/tools/sysgen/RosBuilder/SysGen.Designer.csproj +++ /dev/null @@ -1,148 +0,0 @@ - - - Debug - AnyCPU - 8.0.50727 - 2.0 - {78A0F196-A5BD-469A-B901-B269671AFB0A} - WinExe - Properties - RosBuilder - RosBuilder - - - 2.0 - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - Component - - - Component - - - Component - - - UserControl - - - RegistryEditor.cs - - - Form - - - Form1.cs - - - Form - - - MainForm.cs - - - - Form - - - NewItemForm.cs - - - Code - - - - - - - - - - Designer - RegistryEditor.cs - - - Designer - Form1.cs - - - Designer - MainForm.cs - - - Designer - NewItemForm.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - - {88D9BED7-30C5-4683-A6C6-6F2EB55B8F26} - SysGen.RBuild.Framework - - - {8F5F8375-4097-4952-B860-784EB9961ABE} - SysGen.Framework - - - {99CEE41D-B76D-4102-B0AD-C81069509D17} - TriStateTreeView - - - - - \ No newline at end of file diff --git a/reactos/tools/sysgen/RosBuilder/SysGen.Designer.csproj.user b/reactos/tools/sysgen/RosBuilder/SysGen.Designer.csproj.user deleted file mode 100644 index 6a34e7dcdf5..00000000000 --- a/reactos/tools/sysgen/RosBuilder/SysGen.Designer.csproj.user +++ /dev/null @@ -1,5 +0,0 @@ - - - ShowAllFiles - - \ No newline at end of file diff --git a/reactos/tools/sysgen/RosBuilder/Util/FileAssociation.cs b/reactos/tools/sysgen/RosBuilder/Util/FileAssociation.cs deleted file mode 100644 index f60b10d4603..00000000000 --- a/reactos/tools/sysgen/RosBuilder/Util/FileAssociation.cs +++ /dev/null @@ -1,244 +0,0 @@ -using System; -using System.Security; -using System.Collections; -using Microsoft.Win32; - -namespace TriStateTreeViewDemo -{ - /// List of commands. - internal struct CommandList - { - /// - /// Holds the names of the commands. - /// - public ArrayList Captions; - /// - /// Holds the commands. - /// - public ArrayList Commands; - } - /// Properties of the file association. - internal struct FileType - { - /// - /// Holds the command names and the commands. - /// - public CommandList Commands; - /// - /// Holds the extension of the file type. - /// - public string Extension; - /// - /// Holds the proper name of the file type. - /// - public string ProperName; - /// - /// Holds the full name of the file type. - /// - public string FullName; - /// - /// Holds the name of the content type of the file type. - /// - public string ContentType; - /// - /// Holds the path to the resource with the icon of this file type. - /// - public string IconPath; - /// - /// Holds the icon index in the resource file. - /// - public short IconIndex; - } - /// Creates file associations for your programs. - /// The following example creates a file association for the type XYZ with a non-existent program. - ///


VB.NET code
- /// - /// Dim FA as New FileAssociation - /// FA.Extension = "xyz" - /// FA.ContentType = "application/myprogram" - /// FA.FullName = "My XYZ Files!" - /// FA.ProperName = "XYZ File" - /// FA.AddCommand("open", "C:\mydir\myprog.exe %1") - /// FA.Create - /// - ///
C# code
- /// - /// FileAssociation FA = new FileAssociation(); - /// FA.Extension = "xyz"; - /// FA.ContentType = "application/myprogram"; - /// FA.FullName = "My XYZ Files!"; - /// FA.ProperName = "XYZ File"; - /// FA.AddCommand("open", "C:\\mydir\\myprog.exe %1"); - /// FA.Create(); - /// - ///
- public class FileAssociation - { - /// Initializes an instance of the FileAssociation class. - public FileAssociation() - { - FileInfo = new FileType(); - FileInfo.Commands.Captions = new ArrayList(); - FileInfo.Commands.Commands = new ArrayList(); - } - /// Gets or sets the proper name of the file type. - /// A String representing the proper name of the file type. - public string ProperName - { - get - { - return FileInfo.ProperName; - } - set - { - FileInfo.ProperName = value; - } - } - /// Gets or sets the full name of the file type. - /// A String representing the full name of the file type. - public string FullName - { - get - { - return FileInfo.FullName; - } - set - { - FileInfo.FullName = value; - } - } - /// Gets or sets the content type of the file type. - /// A String representing the content type of the file type. - public string ContentType - { - get - { - return FileInfo.ContentType; - } - set - { - FileInfo.ContentType = value; - } - } - /// Gets or sets the extension of the file type. - /// A String representing the extension of the file type. - /// If the extension doesn't start with a dot ("."), a dot is automatically added. - public string Extension - { - get - { - return FileInfo.Extension; - } - set - { - if (value.Substring(0, 1) != ".") - value = "." + value; - FileInfo.Extension = value; - } - } - /// Gets or sets the index of the icon of the file type. - /// A short representing the index of the icon of the file type. - public short IconIndex - { - get - { - return FileInfo.IconIndex; - } - set - { - FileInfo.IconIndex = value; - } - } - /// Gets or sets the path of the resource that contains the icon for the file type. - /// A String representing the path of the resource that contains the icon for the file type. - /// This resource can be an executable or a DLL. - public string IconPath - { - get - { - return FileInfo.IconPath; - } - set - { - FileInfo.IconPath = value; - } - } - /// Adds a new command to the command list. - /// The name of the command. - /// The command to execute. - /// Caption -or- Command is null (VB.NET: Nothing). - public void AddCommand(string Caption, string Command) - { - if (Caption == null || Command == null) - throw new ArgumentNullException(); - FileInfo.Commands.Captions.Add(Caption); - FileInfo.Commands.Commands.Add(Command); - } - /// Creates the file association. - /// Extension -or- ProperName is null (VB.NET: Nothing). - /// Extension -or- ProperName is empty. - /// The user does not have registry write access. - public void Create() - { - // remove the extension to avoid incompatibilities [such as DDE links] - try - { - Remove(); - } - catch (ArgumentException) {} // the extension doesn't exist - - // create the exception - if (Extension == "" || ProperName == "") - throw new ArgumentException(); - int cnt; - - try - { - RegistryKey RegKey = Registry.ClassesRoot.CreateSubKey(Extension); - RegKey.SetValue("", ProperName); - - if (ContentType != null && ContentType != "") - RegKey.SetValue("Content Type", ContentType); - - RegKey.Close(); - RegKey = Registry.ClassesRoot.CreateSubKey(ProperName); - RegKey.SetValue("", FullName); - RegKey.Close(); - - if (IconPath != "") - { - RegKey = Registry.ClassesRoot.CreateSubKey(ProperName + "\\" + "DefaultIcon"); - RegKey.SetValue("", IconPath + "," + IconIndex.ToString()); - RegKey.Close(); - } - - for (cnt = 0; cnt < FileInfo.Commands.Captions.Count; cnt++) - { - RegKey = Registry.ClassesRoot.CreateSubKey(ProperName + "\\" + "Shell" + "\\" + (String)FileInfo.Commands.Captions[cnt]); - RegKey = RegKey.CreateSubKey("Command"); - RegKey.SetValue("", FileInfo.Commands.Commands[cnt]); - RegKey.Close(); - } - } - catch - { - throw new SecurityException(); - } - } - /// Removes the file association. - /// Extension -or- ProperName is null (VB.NET: Nothing). - /// Extension -or- ProperName is empty -or- the specified extension doesn't exist. - /// The user does not have registry delete access. - public void Remove() - { - if (Extension == null || ProperName == null) - throw new ArgumentNullException(); - if (Extension == "" || ProperName == "") - throw new ArgumentException(); - Registry.ClassesRoot.DeleteSubKeyTree(Extension); - Registry.ClassesRoot.DeleteSubKeyTree(ProperName); - } - /// Holds the properties of the file type. - private FileType FileInfo; - } -} diff --git a/reactos/tools/sysgen/RosFramework/Base/RBuildElement.cs b/reactos/tools/sysgen/RosFramework/Base/RBuildElement.cs deleted file mode 100644 index 3376bd00ed7..00000000000 --- a/reactos/tools/sysgen/RosFramework/Base/RBuildElement.cs +++ /dev/null @@ -1,311 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public abstract class RBuildElement : IRBuildNamed - { - protected string m_RBuild = null; - protected string m_Name = null; - protected string m_Base = null; - protected string m_Path = null; - protected string m_XmlFile = null; - - protected List m_AssemblyFlags = new List(); - protected List m_CompilerFlags = new List(); - protected List m_LinkerFlags = new List(); - protected RBuildIncludeFolderCollection m_Includes = new RBuildIncludeFolderCollection(); - protected RBuildPlatformFileCollection m_Files = new RBuildPlatformFileCollection(); - protected RBuildDefineCollection m_Defines = new RBuildDefineCollection(); - protected RBuildPropertyCollection m_Properties = new RBuildPropertyCollection(); - protected RBuildFolderCollection m_Folders = new RBuildFolderCollection(); - protected RBuildFolder m_Folder = new RBuildFolder(); - - public string Name - { - get { return m_Name; } - set { m_Name = value; } - } - - public virtual RBuildFolder Folder - { - get { return m_Folder; } - set { m_Folder = value; } - } - - public string XmlFile - { - get { return m_XmlFile; } - set { m_XmlFile = value; } - } - - public string Path - { - get { return m_Path; } - set { m_Path = value; } - } - - public string Base - { - get { return Folder.FullPath; } - } - - public string RBuildPath - { - get { return System.IO.Path.Combine(Base, RBuildFile); } - } - - public string RBuildFile - { - get { return m_RBuild; } - set { m_RBuild = value; } - } - - public Uri BaseURI - { - get { return new Uri(Base, UriKind.Relative); } - } - - public string BaseParent - { - get { return Base.Replace(System.IO.Path.DirectorySeparatorChar + Name , string.Empty); } - } - - public string FolderFullPath - { - get { return System.IO.Path.Combine(Path, Base); } - } - - public RBuildFolderCollection Folders - { - get { return m_Folders; } - } - - public RBuildPlatformFileCollection Files - { - get { return m_Files; } - } - - public RBuildPropertyCollection Properties - { - get { return m_Properties; } - } - - public List CompilerFlags - { - get { return m_CompilerFlags; } - } - - public List LinkerFlags - { - get { return m_LinkerFlags; } - } - - public List AssemblyFlags - { - get { return m_AssemblyFlags; } - } - - public RBuildDefineCollection Defines - { - get { return m_Defines; } - } - - public RBuildIncludeFolderCollection IncludeFolders - { - get { return m_Includes; } - set { m_Includes = value; } - } - - public string MakeFilePreCondition - { - get { return string.Format("{0}_PRECONDITION", Name); } - } - - public string MakeFileRCFlags - { - get { return string.Format("{0}_RCFLAGS", Name); } - } - - public string MakeFileWIDLFlags - { - get { return string.Format("{0}_WIDLFLAGS", Name); } - } - - public string MakeFileLFlags - { - get { return string.Format("{0}_LFLAGS", Name); } - } - - public string MakeFileNASMFlags - { - get { return string.Format("{0}_NASMFLAGS", Name); } - } - - public string MakeFileFoldersMacro - { - get { return string.Format("$({0}_FOLDERS)", Name); } - } - - public string MakeFileFolders - { - get { return string.Format("{0}_FOLDERS", Name); } - } - - public string MakeFileCFlags - { - get { return string.Format("{0}_CFLAGS", Name); } - } - - public string MakeFileObjs - { - get { return string.Format("{0}_OBJS", Name); } - } - - public string MakeFileSources - { - get { return string.Format("{0}_SOURCES", Name); } - } - - public string MakeFileHeaders - { - get { return string.Format("{0}_HEADERS", Name); } - } - - public string MakeFileMakeTarget - { - get { return string.Format("{0}", Name); } - } - - public string MakeFileFlagDebugTarget - { - get { return string.Format("{0}_flagdebug", Name); } - } - - public string MakeFileInfoTarget - { - get { return string.Format("{0}_info", Name); } - } - - public string MakeFileCleanTarget - { - get { return string.Format("{0}_clean", Name); } - } - - public string MakeFileDependsTarget - { - get { return string.Format("{0}_depends", Name); } - } - - public string MakeFileInstallTarger - { - get { return string.Format("{0}_install", Name); } - } - - public string MakeFileHeadersMacro - { - get { return string.Format("$({0}_HEADERS)", Name); } - } - - public string MakeFileMCHeadersMacro - { - get { return string.Format("$({0}_MCHEADERS)", Name); } - } - - public string MakeFileMCHeaders - { - get { return string.Format("{0}_MCHEADERS", Name); } - } - - public string MakeFileRPCHeadersMacro - { - get { return string.Format("$({0}_RPCHEADERS)", Name); } - } - - public string MakeFileRPCHeaders - { - get { return string.Format("{0}_RPCHEADERS", Name); } - } - - public string MakeFileRPCSourcesMacro - { - get { return string.Format("$({0}_RPCSOURCES)", Name); } - } - - public string MakeFileRPCSources - { - get { return string.Format("{0}_RPCSOURCES", Name); } - } - - public string MakeFilePCHMacro - { - get { return string.Format("$({0}_PCH)", Name); } - } - - public string MakeFilePCHHeaders - { - get { return string.Format("{0}_PCH", Name); } - } - - public string MakeFileNASMMacro - { - get { return string.Format("$({0}_NASMFLAGS)", Name); } - } - - public string MakeFileCFlagsMacro - { - get { return string.Format("$({0}_CFLAGS)", Name); } - } - - public string MakeFileLFlagsMacro - { - get { return string.Format("$({0}_LFLAGS)", Name); } - } - - public string MakeFileWIDLFlagsMacro - { - get { return string.Format("$({0}_WIDLFLAGS)", Name); } - } - - public string MakeFileObjsMacro - { - get { return string.Format("$({0}_OBJS)", Name); } - } - - public string MakeFileSourcesMacro - { - get { return string.Format("$({0}_SOURCES)", Name); } - } - - public string MakeFilePreConditionMacro - { - get { return string.Format("$({0}_PRECONDITION)", Name); } - } - - public string MakeFileRCFlagsMacro - { - get { return string.Format("$({0}_RCFLAGS)", Name); } - } - - public abstract void SaveAs(string file); - - public override bool Equals(object obj) - { - if (obj is RBuildElement) - { - RBuildElement element = obj as RBuildElement; - - if (element.Name == Name) - return true; - } - - return false; - } - - public override int GetHashCode() - { - return base.GetHashCode(); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/RosFramework/Collections/RBuildAPIStatusCollection.cs b/reactos/tools/sysgen/RosFramework/Collections/RBuildAPIStatusCollection.cs deleted file mode 100644 index e877521ee0c..00000000000 --- a/reactos/tools/sysgen/RosFramework/Collections/RBuildAPIStatusCollection.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildAPIStatusCollection : List - { - public int Percentage - { - get - { - if (TotalFunctions == 0) - return 100; - - return ((100 * ImplementedFunctionsCount) / TotalFunctions); - } - } - - public int TotalFunctions - { - get { return (ImplementedFunctionsCount + UnImplementedFunctionsCount); } - } - - public int ImplementedFunctionsCount - { - get - { - int count = 0; - - foreach (RBuildAPIInfo info in this) - if (info.Implemented == true) - count++; - - return count; - } - } - - public int UnImplementedFunctionsCount - { - get - { - int count = 0; - - foreach (RBuildAPIInfo info in this) - if (info.Implemented == false) - count++; - - return count; - } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/Collections/RBuildAuthorCollection.cs b/reactos/tools/sysgen/RosFramework/Collections/RBuildAuthorCollection.cs deleted file mode 100644 index e9f588ae119..00000000000 --- a/reactos/tools/sysgen/RosFramework/Collections/RBuildAuthorCollection.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildAuthorCollection : List - { - public RBuildAuthor GetByName(string alias) - { - foreach (RBuildAuthor author in this) - { - if (author.Contributor.Alias == alias) - return author; - } - - return null; - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/Collections/RBuildBuildFamilyCollection.cs b/reactos/tools/sysgen/RosFramework/Collections/RBuildBuildFamilyCollection.cs deleted file mode 100644 index c2f0b416a42..00000000000 --- a/reactos/tools/sysgen/RosFramework/Collections/RBuildBuildFamilyCollection.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildBuildFamilyCollection : List - { - public RBuildBuildFamily GetByName(string name) - { - foreach (RBuildBuildFamily family in this) - { - if (family.Name == name) - return family; - } - - return null; - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/Collections/RBuildContributorCollection.cs b/reactos/tools/sysgen/RosFramework/Collections/RBuildContributorCollection.cs deleted file mode 100644 index ee8e5530b7e..00000000000 --- a/reactos/tools/sysgen/RosFramework/Collections/RBuildContributorCollection.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildContributorCollection : List - { - public RBuildContributor GetByName(string alias) - { - foreach (RBuildContributor contributor in this) - { - if (contributor.Alias == alias) - return contributor; - } - - return null; - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/Collections/RBuildDebugChannelCollection.cs b/reactos/tools/sysgen/RosFramework/Collections/RBuildDebugChannelCollection.cs deleted file mode 100644 index 8f45b25cfb1..00000000000 --- a/reactos/tools/sysgen/RosFramework/Collections/RBuildDebugChannelCollection.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildDebugChannelCollection : List - { - public RBuildDebugChannel GetByName(string name) - { - foreach (RBuildDebugChannel channel in this) - { - if (channel.Name == name) - return channel; - } - - return null; - } - - public string Text - { - get - { - StringBuilder sBuilder = new StringBuilder(); - - foreach (RBuildDebugChannel channel in this) - { - sBuilder.Append(channel.Text); - } - - return sBuilder.ToString(); - } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/Collections/RBuildDefineCollection.cs b/reactos/tools/sysgen/RosFramework/Collections/RBuildDefineCollection.cs deleted file mode 100644 index 7281ab8a556..00000000000 --- a/reactos/tools/sysgen/RosFramework/Collections/RBuildDefineCollection.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; - -namespace SysGen.RBuild.Framework -{ - public class RBuildDefineCollection : List - { - public bool IsDefined(string name) - { - foreach (RBuildDefine define in this) - { - if (define.Name == name) - return true; - } - - return false; - } - - public void Add(string name) - { - Add(new RBuildDefine(name)); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/RosFramework/Collections/RBuildExportedFunctionsCollection.cs b/reactos/tools/sysgen/RosFramework/Collections/RBuildExportedFunctionsCollection.cs deleted file mode 100644 index c3d17463fad..00000000000 --- a/reactos/tools/sysgen/RosFramework/Collections/RBuildExportedFunctionsCollection.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildExportedFunctionsCollection : List - { - } -} diff --git a/reactos/tools/sysgen/RosFramework/Collections/RBuildFamilyCollection.cs b/reactos/tools/sysgen/RosFramework/Collections/RBuildFamilyCollection.cs deleted file mode 100644 index 66ea4355fd4..00000000000 --- a/reactos/tools/sysgen/RosFramework/Collections/RBuildFamilyCollection.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildFamilyCollection : List - { - } -} diff --git a/reactos/tools/sysgen/RosFramework/Collections/RBuildFileCollection.cs b/reactos/tools/sysgen/RosFramework/Collections/RBuildFileCollection.cs deleted file mode 100644 index 08e47dd24be..00000000000 --- a/reactos/tools/sysgen/RosFramework/Collections/RBuildFileCollection.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildFileCollection : List - { - public void Add(RBuildFileCollection files) - { - foreach (RBuildFile file in files) - { - Add(file); - } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/Collections/RBuildFolderCollection.cs b/reactos/tools/sysgen/RosFramework/Collections/RBuildFolderCollection.cs deleted file mode 100644 index 09faabaa28f..00000000000 --- a/reactos/tools/sysgen/RosFramework/Collections/RBuildFolderCollection.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildFolderCollection : List - { - public void Add(RBuildFolderCollection folders) - { - foreach (RBuildFolder folder in folders) - { - Add(folder); - } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/Collections/RBuildIncludeFolderCollection.cs b/reactos/tools/sysgen/RosFramework/Collections/RBuildIncludeFolderCollection.cs deleted file mode 100644 index 96b63771fe8..00000000000 --- a/reactos/tools/sysgen/RosFramework/Collections/RBuildIncludeFolderCollection.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildIncludeFolderCollection : List - { - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/RosFramework/Collections/RBuildInstallFolderCollection.cs b/reactos/tools/sysgen/RosFramework/Collections/RBuildInstallFolderCollection.cs deleted file mode 100644 index e9620346126..00000000000 --- a/reactos/tools/sysgen/RosFramework/Collections/RBuildInstallFolderCollection.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildInstallFolderCollection : List - { - public RBuildInstallFolder GetByName(string name) - { - foreach (RBuildInstallFolder folder in this) - { - if (NormalizeFolderName(folder.Name) == NormalizeFolderName(name)) - return folder; - } - - return null; - } - - private string NormalizeFolderName(string path) - { - return path.Replace( - Path.AltDirectorySeparatorChar, - Path.DirectorySeparatorChar); - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/Collections/RBuildLanguageCollection.cs b/reactos/tools/sysgen/RosFramework/Collections/RBuildLanguageCollection.cs deleted file mode 100644 index d81f0506a49..00000000000 --- a/reactos/tools/sysgen/RosFramework/Collections/RBuildLanguageCollection.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildLanguageCollection : List - { - public RBuildLanguage GetByName(string culture) - { - foreach (RBuildLanguage language in this) - { - if (language.Name == culture) - return language; - } - - return null; - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/Collections/RBuildLocalizationFileCollection.cs b/reactos/tools/sysgen/RosFramework/Collections/RBuildLocalizationFileCollection.cs deleted file mode 100644 index 7e005d00616..00000000000 --- a/reactos/tools/sysgen/RosFramework/Collections/RBuildLocalizationFileCollection.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildLocalizationFileCollection : List - { - public bool ContainsLocalization(string culture) - { - return GetByName(culture) != null; - } - - public RBuildLocalizationFile GetByName(string culture) - { - foreach (RBuildLocalizationFile file in this) - { - if (file.IsoName == culture) - return file; - } - - return null; - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/Collections/RBuildModuleCollection.cs b/reactos/tools/sysgen/RosFramework/Collections/RBuildModuleCollection.cs deleted file mode 100644 index 2c472e74f07..00000000000 --- a/reactos/tools/sysgen/RosFramework/Collections/RBuildModuleCollection.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class ModulePreferenceComparer : IComparer - { - public int Compare(RBuildModule x, RBuildModule y) - { - if (x.Type == y.Type) - return 0; - - if (x.Type == ModuleType.BuildTool) - return -1; - - return 1; - } - } - - public class RBuildModuleCollection : List - { - public event EventHandler OnModuleAdded; - - public void Add(RBuildModuleCollection modules) - { - foreach (RBuildModule module in modules) - { - Add(module); - } - } - - public new void Add(RBuildModule module) - { - if (module == null) - throw new Exception("Could not add a null instance"); - - if (GetByName(module.Name) == null) - { - base.Add(module); - } - - if (OnModuleAdded != null) - OnModuleAdded(this, EventArgs.Empty); - } - - public void Add(string moduleName) - { - RBuildModule module = GetByName(moduleName); - - if (module == null) - throw new Exception(string.Format("Unknown '{0}' module", moduleName)); - - Add(module); - } - - public void Add(int index, RBuildModule moduleName) - { - base.Insert(index, moduleName); - } - - public void DisableAll() - { - foreach (RBuildModule module in this) - { - // Disable module - module.Enabled = false; - } - } - - public RBuildModule GetByName(string name) - { - foreach (RBuildModule module in this) - { - if (module.Name == name) - return module; - } - - return null; - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/Collections/RBuildModuleInfoCollection.cs b/reactos/tools/sysgen/RosFramework/Collections/RBuildModuleInfoCollection.cs deleted file mode 100644 index 4670f093936..00000000000 --- a/reactos/tools/sysgen/RosFramework/Collections/RBuildModuleInfoCollection.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildModuleInfoCollection : List - { - public RBuildModuleInfo GetByName(string name) - { - foreach (RBuildModuleInfo module in this) - { - if (module.Name == name) - return module; - } - - return null; - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/Collections/RBuildPlatformFileCollection.cs b/reactos/tools/sysgen/RosFramework/Collections/RBuildPlatformFileCollection.cs deleted file mode 100644 index 7ccf135cefc..00000000000 --- a/reactos/tools/sysgen/RosFramework/Collections/RBuildPlatformFileCollection.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildPlatformFileCollection : List - { - public void Add(RBuildPlatformFileCollection files) - { - foreach (RBuildPlatformFile file in files) - { - Add(file); - } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/Collections/RBuildPropertyCollection.cs b/reactos/tools/sysgen/RosFramework/Collections/RBuildPropertyCollection.cs deleted file mode 100644 index f3a4769258f..00000000000 --- a/reactos/tools/sysgen/RosFramework/Collections/RBuildPropertyCollection.cs +++ /dev/null @@ -1,108 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.Text.RegularExpressions; - -namespace SysGen.RBuild.Framework -{ - public class RBuildPropertyCollection : List - { - /// - /// Adds a property that cannot be changed. - /// - /// - /// Properties added with this method can never be changed. Note that - /// they are removed if the Clear method is called. - /// - /// Name of property - /// Value of property - public virtual void AddReadOnly(string name, string value) - { - Add(name, value, true); - } - - /// - /// Adds a property to the collection. - /// - /// Name of property - /// Value of property - public virtual void Add(string name, string value) - { - Add(name, value, false); - } - - /// - /// Adds a property to the collection. - /// - /// Name of property - /// Value of property - public virtual void Add(string name, bool value) - { - Add(name, value.ToString()); - } - - /// - /// Adds a property to the collection. - /// - /// Name of property - /// Value of property - public virtual void Add(string name, string value, bool readOnly) - { - if (!PropertyExists(name)) - { - Add(new RBuildProperty(name, value , readOnly)); - } - } - - /// - /// Adds a property to the collection. - /// - /// Name of property - /// Value of property - public virtual void Add(string name, string value, bool readOnly, bool isInternal) - { - if (!PropertyExists(name)) - { - Add(new RBuildProperty(name, value, readOnly,isInternal)); - } - } - - /// - /// Returns true if a property is listed as read only - /// - /// Property to check - /// true if readonly, false otherwise - public virtual bool IsReadOnlyProperty(string name) - { - if (PropertyExists(name)) - return this[name].ReadOnly; - return false; - } - - /// - /// Returns true if a property exists - /// - /// Property to check - /// true if exists, false otherwise - public bool PropertyExists(string name) - { - return (this[name] != null); - } - - /// - /// Indexer property. - /// - public virtual RBuildProperty this[string name] - { - get - { - foreach (RBuildProperty property in this) - if (property.Name == name) - return property; - - return null; - } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/Collections/RBuildSourceFileCollection.cs b/reactos/tools/sysgen/RosFramework/Collections/RBuildSourceFileCollection.cs deleted file mode 100644 index 7175bac8e8a..00000000000 --- a/reactos/tools/sysgen/RosFramework/Collections/RBuildSourceFileCollection.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class SourceCodePreferenceComparer : IComparer - { - public int Compare(RBuildSourceFile x, RBuildSourceFile y) - { - if (x.First != y.First) - { - if (x.First) - return -1; - else - return 1; - } - - if (x.Extension == y.Extension) - return 0; - - if (x.IsWidl) - return -1; - else if (y.IsWidl) - return 1; - - if (x.IsAssembler) - return 1; - else if (y.IsAssembler) - return -1; - - if (x.IsNASM) - return 1; - else if (y.IsNASM) - return -1; - - return 0; - } - } - - public class RBuildSourceFileCollection : List - { - public bool ContainsASM - { - get - { - foreach (RBuildSourceFile file in this) - { - if ((file.IsAssembler) || (file.IsNASM)) - { - return true; - } - } - - // This module does not contain C++ code - return false; - } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/Interfaces/IRBuildInstallable.cs b/reactos/tools/sysgen/RosFramework/Interfaces/IRBuildInstallable.cs deleted file mode 100644 index 4e5a8467d0b..00000000000 --- a/reactos/tools/sysgen/RosFramework/Interfaces/IRBuildInstallable.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public interface IRBuildInstallable - { - string InstallBase { get; set; } - - RBuildInstallFolder InstallFolder { get; set; } - } -} diff --git a/reactos/tools/sysgen/RosFramework/Interfaces/IRBuildModulesContainer.cs b/reactos/tools/sysgen/RosFramework/Interfaces/IRBuildModulesContainer.cs deleted file mode 100644 index 9bc5f9902f3..00000000000 --- a/reactos/tools/sysgen/RosFramework/Interfaces/IRBuildModulesContainer.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace SysGen.RBuild.Framework -{ - public interface IRBuildModulesContainer - { - RBuildSourceFileCollection Modules { get; } - } -} diff --git a/reactos/tools/sysgen/RosFramework/Interfaces/IRBuildNamed.cs b/reactos/tools/sysgen/RosFramework/Interfaces/IRBuildNamed.cs deleted file mode 100644 index 34252cab108..00000000000 --- a/reactos/tools/sysgen/RosFramework/Interfaces/IRBuildNamed.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace SysGen.RBuild.Framework -{ - public interface IRBuildNamed - { - string Name { get; } - } -} diff --git a/reactos/tools/sysgen/RosFramework/Interfaces/IRBuildSourceFilesContainer.cs b/reactos/tools/sysgen/RosFramework/Interfaces/IRBuildSourceFilesContainer.cs deleted file mode 100644 index 78eccd72cdb..00000000000 --- a/reactos/tools/sysgen/RosFramework/Interfaces/IRBuildSourceFilesContainer.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace SysGen.RBuild.Framework -{ - public interface IRBuildSourceFilesContainer - { - RBuildSourceFileCollection SourceFiles { get; } - } -} diff --git a/reactos/tools/sysgen/RosFramework/Misc/Utility.cs b/reactos/tools/sysgen/RosFramework/Misc/Utility.cs deleted file mode 100644 index da5200b907d..00000000000 --- a/reactos/tools/sysgen/RosFramework/Misc/Utility.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - class Utility - { - public static string GetSafeString (string str) - { - str = str.Replace(" ", string.Empty); - str = str.Replace(".", string.Empty); - - return str; - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/NotImplementedYet/RBuildModuleGroup.cs b/reactos/tools/sysgen/RosFramework/NotImplementedYet/RBuildModuleGroup.cs deleted file mode 100644 index 6cc00b2fe2a..00000000000 --- a/reactos/tools/sysgen/RosFramework/NotImplementedYet/RBuildModuleGroup.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework.NotImplementedYet -{ - public class RBuildModuleGroup - { - private RBuildModuleCollection m_Modules = new RBuildModuleCollection(); - private string m_Name = null; - - public string Name - { - get { return m_Name; } - set { m_Name = value; } - } - - public RBuildModuleCollection Modules - { - get { return m_Modules; } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/NotImplementedYet/RBuildPatch.cs b/reactos/tools/sysgen/RosFramework/NotImplementedYet/RBuildPatch.cs deleted file mode 100644 index 0b8b9c22b82..00000000000 --- a/reactos/tools/sysgen/RosFramework/NotImplementedYet/RBuildPatch.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework.NotImplementedYet -{ - public class RBuildPatch - { - private string m_Filename = null; - private string m_Name = null; - - public string Name - { - get { return m_Name; } - set { m_Name = value; } - } - - public string FileName - { - get { return m_Filename; } - set { m_Filename = value; } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/Obsolete/PlatformCatalog.cs b/reactos/tools/sysgen/RosFramework/Obsolete/PlatformCatalog.cs deleted file mode 100644 index 4d8fcfbaf41..00000000000 --- a/reactos/tools/sysgen/RosFramework/Obsolete/PlatformCatalog.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Xml; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class PlatformCatalog - { - public List m_Platform = new List(); - public SoftwareCatalog m_SoftwareCatalog = new SoftwareCatalog(); - - public PlatformCatalog() - { - } - - public List Platforms - { - get { return m_Platform; } - } - - public SoftwareCatalog SoftwareCatalog - { - get { return m_SoftwareCatalog; } - set { m_SoftwareCatalog = value; } - } - - public RosPlatform GetPlatformByName(string name) - { - foreach (RosPlatform platform in Platforms) - { - if (platform.Name == name) - { - return platform; - } - } - - throw new Exception("Platform not found in catalog"); - } - - public void LoadFromFile(string file) - { - XmlDocument doc = new XmlDocument(); - - //Load the file in to memory - doc.Load(file); - - //Load modules ... - foreach (XmlNode node in doc.SelectNodes("/platforms/platform")) - { - RosPlatform platform = new RosPlatform(); - - platform.Name = node.Attributes["name"].InnerText; - - if (node.Attributes["base"] != null) - { - platform.Base = node.Attributes["base"].InnerText; - } - - m_Platform.Add(platform); - } - - foreach (XmlNode comp in doc.SelectNodes("/platforms/platform")) - { - // Get the component name.... - string name = comp.Attributes["name"].InnerText; - - RosPlatform platform = GetPlatformByName(name); - - if (platform.Base != null) - { - platform.ParentPlatform = GetPlatformByName(platform.Base); - - foreach (RBuildModule module in platform.ParentModules) - { - platform.Modules.Add(module); - } - } - - foreach (XmlNode dep in comp.SelectNodes("modules/module")) - { - // Gets the dependency name - name = dep.Attributes["name"].InnerText; - - RBuildModule module = SoftwareCatalog.Modules.GetByName(name); - - platform.Modules.Add(module); - } - } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/Obsolete/RosArchitecture.cs b/reactos/tools/sysgen/RosFramework/Obsolete/RosArchitecture.cs deleted file mode 100644 index 593a0373a1a..00000000000 --- a/reactos/tools/sysgen/RosFramework/Obsolete/RosArchitecture.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RosArchitecture - { - private string m_Name = null; - private string m_Sub = null; - private string m_Optimization = null; - - public RosArchitecture () - { - m_Name = "i386"; - m_Sub = string.Empty; - m_Optimization = "pentium"; - } - - public string Name - { - get { return m_Name; } - set { m_Name = value; } - } - - public string SubArchitecture - { - get { return m_Sub; } - set { m_Sub = value; } - } - - public string Optimization - { - get { return m_Optimization; } - set { m_Optimization = value; } - } - - public string SafeName - { - get { return Utility.GetSafeString(m_Name).ToUpper(); } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/RosFramework/Obsolete/RosOSImage.cs b/reactos/tools/sysgen/RosFramework/Obsolete/RosOSImage.cs deleted file mode 100644 index 7890b26cf26..00000000000 --- a/reactos/tools/sysgen/RosFramework/Obsolete/RosOSImage.cs +++ /dev/null @@ -1,209 +0,0 @@ -using System; -using System.Xml; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildOSImage - { - private RosPlatform m_Platform = null; - private RBuildLanguage m_Language = null; - private RosArchitecture m_Architecture = null; - - private Dictionary m_Properties = new Dictionary(); - private List m_Defines = new List(); - private List m_Includes = new List(); - - private bool m_Debug = false; - //private bool m_KernelDebugger = false; - //private bool m_GDBDebugger = false; - - private bool m_MakeBootCD = false; - private bool m_MakeLiveCD = false; - - public RBuildOSImage() - { - Properties.Add("SARCH", ""); - Properties.Add("OARCH", "pentium"); - Properties.Add("OPTIMIZE", "1"); - Properties.Add("MP", "0"); - Properties.Add("KDBG", "0"); - Properties.Add("DBG", "0"); - Properties.Add("GDB", "0"); - Properties.Add("NSWPAT", "0"); - Properties.Add("NTLPC", "1"); - Properties.Add("_WINKD_", "0"); - - Defines.Add ("_M_IX86"); - Defines.Add ("_X86_"); - Defines.Add ("__i386__"); - Defines.Add ("_REACTOS_"); - - Includes.Add("."); - Includes.Add("include"); - Includes.Add("include/psdk"); - Includes.Add("include/dxsdk"); - Includes.Add("include/crt"); - Includes.Add("include/ddk"); - Includes.Add("include/GL"); - Includes.Add("include/ndk"); - Includes.Add("include/reactos"); - Includes.Add("include/reactos/libs"); - } - - public bool MakeLiveCD - { - get { return m_MakeLiveCD; } - set { m_MakeLiveCD = value; } - } - - public bool MakeBootCD - { - get { return m_MakeBootCD; } - set { m_MakeBootCD = value; } - } - - public RBuildLanguage Language - { - get { return m_Language; } - set { m_Language = value; } - } - - public RosPlatform Platform - { - get { return m_Platform; } - set { m_Platform = value; } - } - - public RosArchitecture Architecture - { - get { return m_Architecture; } - set { m_Architecture = value; } - } - - public Dictionary Properties - { - get { return m_Properties; } - } - - public List Defines - { - get { return m_Defines; } - } - - public List Includes - { - get { return m_Includes; } - } - - public string ReleaseType - { - get - { - if (m_Debug) - return "DBG"; - - return "RELEASE"; - } - } - - public string ImageType - { - get - { - if (m_MakeBootCD) - return "BootCD"; - - return "LiveCD"; - } - } - - public void SaveAs(string file) - { - // Creates an XML file is not exist - using (XmlTextWriter writer = new XmlTextWriter(file, Encoding.ASCII)) - { - writer.Indentation = 4; - writer.Formatting = Formatting.Indented; - - // Starts a new document - writer.WriteStartDocument(); - writer.WriteStartElement("project"); - writer.WriteAttributeString("name", "ReactOS"); - writer.WriteAttributeString("makefile", "makefile.auto"); - writer.WriteAttributeString("xmlns", "xi", null, "http://www.w3.org/2001/XInclude"); - - writer.WriteComment("Generic Properties"); - foreach (KeyValuePair property in Properties) - { - writer.WriteStartElement("property"); - writer.WriteAttributeString("name", property.Key); - writer.WriteAttributeString("value", property.Value); - writer.WriteEndElement(); - } - - foreach (string define in Defines) - { - writer.WriteStartElement("define"); - writer.WriteAttributeString("name", define); - writer.WriteEndElement(); - } - - writer.WriteStartElement("xi:include"); - writer.WriteAttributeString("href", "baseaddress.rbuild"); - writer.WriteEndElement(); - - writer.WriteStartElement("xi:include"); - writer.WriteAttributeString("href", "boot/bootdata/bootdata.rbuild"); - writer.WriteEndElement(); - - writer.WriteElementString("compilerflag", "-Os"); - writer.WriteElementString("compilerflag", "-ftracer"); - writer.WriteElementString("compilerflag", "-momit-leaf-frame-pointer"); - writer.WriteElementString("compilerflag", "-mpreferred-stack-boundary=2"); - - writer.WriteElementString("compilerflag", "-Wno-strict-aliasing"); - writer.WriteElementString("compilerflag", "-Wpointer-arith"); - writer.WriteElementString("linkerflag", "-enable-stdcall-fixup"); - - foreach (string include in Includes) - { - writer.WriteStartElement("include"); - writer.WriteAttributeString("root", "intermediate"); - writer.WriteString(include); - writer.WriteEndElement(); - - writer.WriteStartElement("include"); - writer.WriteString(include); - writer.WriteEndElement(); - } - - foreach (RBuildModule module in Platform.Modules) - { - writer.WriteStartElement("xi:include"); - writer.WriteAttributeString("href", module.RBuildFile); - writer.WriteEndElement(); - } - - writer.WriteEndElement(); //Project - writer.WriteEndDocument(); - } - - string a = Name; - } - - public string Name - { - get { - return ""; - //return string.Format("{0}_{1}{2}_{3}_{4}.iso", - // Platform.SafeName, - // Architecture.SafeName , - // Language.CultureInfo.ThreeLetterISOLanguageName, - // ImageType, - // ReleaseType); - } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/RosFramework/Obsolete/RosPlatform.cs b/reactos/tools/sysgen/RosFramework/Obsolete/RosPlatform.cs deleted file mode 100644 index 2864a425bbf..00000000000 --- a/reactos/tools/sysgen/RosFramework/Obsolete/RosPlatform.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System; -using System.Xml; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RosPlatform - { - private List m_Modules = new List(); - - private string m_Name = null; - private string m_Base = null; - - private RosPlatform m_ParentPlatform = null; - - public RosPlatform() - { - m_Name = "ReactOS Core"; - } - - public string Name - { - get { return m_Name; } - set { m_Name = value; } - } - - public string Base - { - get { return m_Base; } - set { m_Base = value; } - } - - public RosPlatform ParentPlatform - { - get { return m_ParentPlatform; } - set { m_ParentPlatform = value; } - } - - public string SafeName - { - get { return Utility.GetSafeString(m_Name); } - } - - public void SaveAs(string file) - { - - } - - public List Modules - { - get { return m_Modules; } - } - - public List ParentModules - { - get - { - List modules = new List(); - - if (ParentPlatform != null) - { - foreach (RBuildModule module in ParentPlatform.Modules) - { - modules.Add(module); - } - - foreach (RBuildModule module in ParentPlatform.ParentModules) - { - modules.Add(module); - } - } - - return modules; - } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/Obsolete/SoftwareCatalog.cs b/reactos/tools/sysgen/RosFramework/Obsolete/SoftwareCatalog.cs deleted file mode 100644 index 5169cf21a55..00000000000 --- a/reactos/tools/sysgen/RosFramework/Obsolete/SoftwareCatalog.cs +++ /dev/null @@ -1,80 +0,0 @@ -using System; -using System.Xml; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class SoftwareCatalog - { - public RBuildModuleCollection m_Modules = new RBuildModuleCollection(); - - public SoftwareCatalog() - { - } - - public RBuildModuleCollection Modules - { - get { return m_Modules; } - } - - public void LoadFromFile(string file) - { - XmlDocument doc = new XmlDocument(); - - //Load the file in to memory - doc.Load(file); - - //Load modules ... - foreach (XmlNode node in doc.SelectNodes("/modules/module")) - { - RBuildModule module; - - module = new RBuildModule(); - module.Metadata = new RBuildMetadata(); - - module.Name = node.Attributes["name"].Value; - //module.Base = node.Attributes["base"].Value; - module.Metadata.Description = node.Attributes["desc"].Value; - //module.Rbuild = node.Attributes["rbuild"].Value; - - /* - foreach (XmlNode dep in node.SelectNodes("provides/provide")) - { - string value = dep.SelectSingleNode("value").InnerText; - string type = dep.SelectSingleNode("type").InnerText; - - module.Provides.Add(value, type); - }*/ - - m_Modules.Add(module); - } - - foreach (XmlNode comp in doc.SelectNodes("/modules/module")) - { - // Get the component name.... - string componentName = comp.Attributes["name"].Value; - - foreach (XmlNode dep in comp.SelectNodes("dependencies/dependency")) - { - // Gets the dependency name - string dependencyName = dep.Attributes["name"].Value; - - foreach (RBuildModule dependency in m_Modules) - { - if (dependency.Name == dependencyName) - { - foreach (RBuildModule module in m_Modules) - { - if (module.Name == componentName) - { - module.Libraries.Add(dependency); - } - } - } - } - } - } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/Properties/AssemblyInfo.cs b/reactos/tools/sysgen/RosFramework/Properties/AssemblyInfo.cs deleted file mode 100644 index c9902b14d7b..00000000000 --- a/reactos/tools/sysgen/RosFramework/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("RosFramework")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Sand")] -[assembly: AssemblyProduct("RosFramework")] -[assembly: AssemblyCopyright("Copyright © Sand 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("bc0dfcae-52a0-41f1-83b6-df64128d52b7")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/reactos/tools/sysgen/RosFramework/RBuildAPIInfo.cs b/reactos/tools/sysgen/RosFramework/RBuildAPIInfo.cs deleted file mode 100644 index dc175f72398..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildAPIInfo.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildAPIInfo - { - private string m_Name; - private string m_File; - private bool m_Implemented; - - public string Name - { - get { return m_Name; } - set { m_Name = value; } - } - - public string File - { - get { return m_File; } - set { m_File = value; } - } - - public bool Implemented - { - get { return m_Implemented; } - set { m_Implemented = value; } - } - - public string HtmlDocFileName - { - get { return string.Format("{0}.htm", Name); } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/RBuildAuthor.cs b/reactos/tools/sysgen/RosFramework/RBuildAuthor.cs deleted file mode 100644 index eb504b687d6..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildAuthor.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public enum AuthorRole - { - Developer, - Mantainer, - Translator - } - - public class RBuildAuthor - { - private AuthorRole m_AuthorRole = AuthorRole.Developer; - private RBuildContributor m_Contributor = null; - - /// - /// The underlying contributor. - /// - public RBuildContributor Contributor - { - get { return m_Contributor; } - set { m_Contributor = value; } - } - - /// - /// The author role. - /// - public AuthorRole Role - { - get { return m_AuthorRole; } - set { m_AuthorRole = value; } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/RBuildAutoRegister.cs b/reactos/tools/sysgen/RosFramework/RBuildAutoRegister.cs deleted file mode 100644 index 8bc526a5f01..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildAutoRegister.cs +++ /dev/null @@ -1,106 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - /// - /// Type of registration - /// - public enum AutoRegisterType : int - { - DllRegisterServer = 1, - DllInstall = 2, - Both = 3 - } - - public enum SetupApiFolder : int - { - SourceDrive = 1, //(the directory from which the INF file was installed) - OS = 10, //(%SystemRoot%) - System = 11, //(%SystemRoot%\system32) - Drivers = 12, //(%SystemRoot%\system32\drivers) - Inf = 17, //(%SystemRoot%\inf) - Help = 18, //(%SystemRoot%\Help) - Fonts = 20, //(%SystemRoot%\Fonts) - Root = 24, //(%SystemDrive%) - Shared = 25, //(%ALLUSERSPROFILE%\Shared Documents) - UserProfile = 53 //(%USERPROFILE%) - } - - public enum SetupApiShellFolder : int - { - AllUsersApplicationData, // 16419 %ALLUSERSPROFILE%\Application Data - AllUsersDesktop, // 16409 %ALLUSERSPROFILE%\Desktop - AllUsersMyDocuments, // 16430 %ALLUSERSPROFILE%\Documents - AllUsersMyMusic, // 16437 %ALLUSERSPROFILE%\Documents\My Music - AllUsersMyPictures, // 16438 %ALLUSERSPROFILE%\Documents\My Pictures - AllUsersMyVideos, // 16439 %ALLUSERSPROFILE%\Documents\My Videos - AllUsersFavourites, // 16415 %ALLUSERSPROFILE%\Favorites - AllUsersStartMenu, // 16406 %ALLUSERSPROFILE%\Start Menu - AllUsersStartMenuPrograms, // 16407 %ALLUSERSPROFILE%\Start Menu\Programs - AllUsersStartMenuAdministrativeTools, // 16431 %ALLUSERSPROFILE%\Start Menu\Programs\Administrative Tools - AllUsersStartMenuStartup, // 16408 %ALLUSERSPROFILE%\Start Menu\Programs\Startup - AllUsersTemplates, // 16429 %ALLUSERSPROFILE%\Templates - UserApplicationData, // 16410 %USERPROFILE%\Application Data - UserCookies, // 16417 %USERPROFILE%\Cookies - UserDesktop, // 16384 %USERPROFILE%\Desktop - UserDesktop2, // 16400 %USERPROFILE%\Desktop - UserFavourites, // 16390 %USERPROFILE%\Favorites - UserLocalSettingsApplicationData, // 16412 %USERPROFILE%\Local Settings\Application Data - UserLocalSettingsMSCDBruning, // 16443 %USERPROFILE%\Local Settings\Application Data\Microsoft\CD Burning - UserHistory, // 16418 %USERPROFILE%\Local Settings\History - UserTemporaryInternetFiles, // 16416 %USERPROFILE%\Local Settings\Temporary Internet Files - UserMyDocuments, // 16389 %USERPROFILE%\My Documents - UserMyMusic, // 16397 %USERPROFILE%\My Documents\My Music - UserMyPictures, // 16423 %USERPROFILE%\My Documents\My Pictures - UserMyVideos, // 16398 %USERPROFILE%\My Documents\My Videos - UserNetHood, // 16403 %USERPROFILE%\NetHood - UserPrintHood, // 16411 %USERPROFILE%\PrintHood - UserRecent, // 16392 %USERPROFILE%\Recent - UserSendTo, // 16393 %USERPROFILE%\SendTo - UserStartMenu, // 16395 %USERPROFILE%\Start Menu - UserStartMenuPrograms, // 16386 %USERPROFILE%\Start Menu\Programs - UserStartMenuAdministrativeTools, // 16432 %USERPROFILE%\Start Menu\Programs\Administrative Tools - UserStartMenuStartup, // 16391 %USERPROFILE%\Start Menu\Programs\Startup - UserTemplates, // 16405 %USERPROFILE%\Templates - ProgramFiles, // 16422 %ProgramFiles% - ProgramFilesCommonFiles, // 16427 %ProgramFiles%\Common Files - SystenResources, // 16440 %SystemRoot%\Resources - SystemEnglishResources // 16441 %SystemRoot%\Resources\0409 - } - - /// - /// An autoregister element specifies that the generated executable should be - /// registered in the registry during second stage setup. - /// - public class RBuildAutoRegister - { - private AutoRegisterType m_AutoRegisterType = AutoRegisterType.Both; - private string m_InfSection = null; - - /// - /// Name of section in syssetup.inf. - /// - public string InfSection - { - get { return m_InfSection; } - set { m_InfSection = value; } - } - - /// - /// Type of registration. - /// - public AutoRegisterType Type - { - get { return m_AutoRegisterType; } - set { m_AutoRegisterType = value; } - } - - public int RegistrationType - { - get { return (int)Type; } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/RBuildBootstrapFile.cs b/reactos/tools/sysgen/RosFramework/RBuildBootstrapFile.cs deleted file mode 100644 index 07771b10d46..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildBootstrapFile.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - /// - /// A bootstrap element specifies that the generated file should - /// be put on the bootable CD as a bootstrap file. - /// - public class RBuildBootstrapFile : RBuildCDFileBase - { - public RBuildBootstrapFile() - { - } - - public RBuildBootstrapFile(string basePath , string name) - { - Base = basePath; - Name = name; - } - - //public override RBuildFile CDNewFile - //{ - // get - // { - // RBuildFile file = (RBuildFile)Clone(); - - // file.Name = NewName; - // file.Base = InstallBase; - // file.Root = PathRoot.CDOutput; - - // return file; - // } - //} - - //public virtual RBuildFile CDNewFile - //{ - // get - // { - // RBuildFile file = (RBuildFile)Clone(); - - // file.Name = NewName; - // file.Base = InstallBase; - // file.Root = PathRoot.CDOutput; - - // return file; - // } - //} - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/RosFramework/RBuildBuildFamily.cs b/reactos/tools/sysgen/RosFramework/RBuildBuildFamily.cs deleted file mode 100644 index 24014e0e2c7..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildBuildFamily.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildBuildFamily - { - private string m_Name = null; - private string m_Description = null; - - public string Name - { - get { return m_Name; } - set { m_Name = value; } - } - - public string Description - { - get { return m_Description; } - set { m_Description = value; } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/RBuildCDFile.cs b/reactos/tools/sysgen/RosFramework/RBuildCDFile.cs deleted file mode 100644 index e8b34f00252..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildCDFile.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - /// - /// A cdfile element specifies the name of a file that is to be put on the bootable CD. - /// - public class RBuildCDFile : RBuildCDFileBase - { - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/RosFramework/RBuildCDFileBase.cs b/reactos/tools/sysgen/RosFramework/RBuildCDFileBase.cs deleted file mode 100644 index 5f07e283027..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildCDFileBase.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildCDFileBase : RBuildOutputFile /*RBuildPlatformFile*/ - { - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/RosFramework/RBuildCompilationUnit.cs b/reactos/tools/sysgen/RosFramework/RBuildCompilationUnit.cs deleted file mode 100644 index 2b1348b8c7b..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildCompilationUnit.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - /// - /// A compilationunit element specifies that one or more source code - /// files are to be compiled as a single compilation unit. - /// - public class RBuildCompilationUnitFile : RBuildSourceFile , IRBuildSourceFilesContainer - { - private RBuildSourceFileCollection m_SourceFiles = new RBuildSourceFileCollection(); - - /// - /// Gets the collection of . - /// - public RBuildSourceFileCollection SourceFiles - { - get { return m_SourceFiles; } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/RBuildContributor.cs b/reactos/tools/sysgen/RosFramework/RBuildContributor.cs deleted file mode 100644 index a881176f071..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildContributor.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System; -using System.Text.RegularExpressions; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildContributor - { - private string m_FirstName = null; - private string m_LastName = null; - private string m_Alias = null; - private string m_City = null; - private string m_Country = null; - private string m_Mail = null; - private string m_Website = null; - private bool m_Active = true; - - public string FirstName - { - get { return m_FirstName; } - set { m_FirstName = value; } - } - - public string Website - { - get { return m_Website; } - set { m_Website = value; } - } - - public string LastName - { - get { return m_LastName; } - set { m_LastName = value; } - } - - public string Alias - { - get { return m_Mail; } - set { m_Mail = value; } - } - - public string Mail - { - get { return m_Alias; } - set { m_Alias = value; } - } - - public string City - { - get { return m_City; } - set { m_City = value; } - } - - public string Country - { - get { return m_Country; } - set { m_Country = value; } - } - - public bool Active - { - get { return m_Active; } - set { m_Active = value; } - } - - public string FullName - { - get { return string.Format("{0} {1}", FirstName, LastName); } - } - - public string HtmlDocFileName - { - get { return string.Format("{0}.htm", Alias); } - } - - public bool HasAlias - { - get { return ((Alias != null) && (Alias.Length > 0)); } - } - - public bool HasMail - { - get { return ((Mail != null) && (Mail.Length > 0)); } - } - - public bool HasLocation - { - get { return ((City != null) && (City.Length > 0) && (Country != null) && (Country.Length > 0)); } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/RosFramework/RBuildDebugChannel.cs b/reactos/tools/sysgen/RosFramework/RBuildDebugChannel.cs deleted file mode 100644 index 6125c49bd48..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildDebugChannel.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Text; -using System.IO; -using System.Collections.Generic; - -namespace SysGen.RBuild.Framework -{ - public class RBuildDebugChannel - { - private string m_Name = null; - private bool m_Warn = true; - private bool m_Error = true; - private bool m_Trace = false; - private bool m_Fixme = true; - - public RBuildDebugChannel() - { - } - - public RBuildDebugChannel(string name) - { - m_Name = name; - } - - public string Name - { - get { return m_Name; } - set { m_Name = value; } - } - - public bool Warn - { - get { return m_Warn; } - set { m_Warn = value; } - } - - public bool Error - { - get { return m_Error; } - set { m_Error = value; } - } - - public bool Trace - { - get { return m_Trace; } - set { m_Trace = value; } - } - - public bool Fixme - { - get { return m_Fixme; } - set { m_Fixme = value; } - } - - public string Text - { - get - { - StringBuilder sBuilder = new StringBuilder(); - - if (Warn) - sBuilder.AppendFormat("warn+{0},", Name); - if (Error) - sBuilder.AppendFormat("err+{0},", Name); - if (Trace) - sBuilder.AppendFormat("trace+{0},", Name); - if (Fixme) - sBuilder.AppendFormat("fix+{0},", Name); - - return sBuilder.ToString(); - } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/RBuildExportFunction.cs b/reactos/tools/sysgen/RosFramework/RBuildExportFunction.cs deleted file mode 100644 index 9e1868a01f5..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildExportFunction.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public enum CallingConventionType - { - None, - StdCall, - Pascal, - VarArgs - } - - public class RBuildExportFunction - { - private string m_Ordinal; - private string m_FunctionName; - private CallingConventionType m_CallingConvention = CallingConventionType.None; - private bool m_Stub; - - public string Ordinal - { - get { return m_Ordinal; } - set { m_Ordinal = value; } - } - - public string FunctionName - { - get { return m_FunctionName; } - set { m_FunctionName = value; } - } - - public CallingConventionType CallingConvention - { - get { return m_CallingConvention; } - set { m_CallingConvention = value; } - } - - public bool IsStub - { - get { return m_Stub; } - set { m_Stub = value; } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/RBuildFamily.cs b/reactos/tools/sysgen/RosFramework/RBuildFamily.cs deleted file mode 100644 index 067453a19df..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildFamily.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildFamily - { - private string m_FamilyName = null; - - public string Name - { - get { return m_FamilyName; } - set { m_FamilyName = value; } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/RBuildFile.cs b/reactos/tools/sysgen/RosFramework/RBuildFile.cs deleted file mode 100644 index ed070b95ecf..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildFile.cs +++ /dev/null @@ -1,441 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public enum PathRoot - { - Default, - SourceCode, - Output, - Intermediate, - CDOutput, - Temporary, - Install, - BootCD, - LiveCD, - Platform - } - - public enum SourceType - { - Unknown, - C, - CPP, - IDL, - Assembler, - NASM, - WineBuild, - WindResource, - MessageTable, - Header - } - - public class RBuildFolder : RBuildFileSystemInfo - { - private List m_Contents = new List(); - - public RBuildFolder() - { - } - - public RBuildFolder(RBuildFolder parentFolder , string name) - { - Root = parentFolder.Root; - Base = parentFolder.Base; - Name = name; - } - - public RBuildFolder(PathRoot rootPath) - { - Root = rootPath; - //Base = "."; - } - - public RBuildFolder (PathRoot rootPath, string basePath) - { - Root = rootPath; - Base = basePath; - } - - public RBuildFolder Parent - { - get - { - RBuildFolder folder = null; - - folder = new RBuildFolder(); - folder.Base = Path.GetDirectoryName(FullPath); - folder.Name = ""; - folder.Root = Root; - - return folder; - // return new RBuildFolder(Root, Path.GetDirectoryName(Base), Name); - } - } - - public List Contents - { - get { return m_Contents; } - } - - public override string ToString() - { - return string.Format("{0} - {1}", Root, FullPath); - } - } - - public class RBuildSourceFile : RBuildFile, IComparable - { - private bool m_First = false; - private string m_Switches = string.Empty; - - public string Switches - { - get { return m_Switches; } - set { m_Switches = value; } - } - - public bool First - { - get { return m_First; } - set { m_First = value; } - } - - public SourceType Type - { - get - { - if (IsC) - return SourceType.C; - if (IsCPP) - return SourceType.CPP; - if (IsAssembler) - return SourceType.Assembler; - if (IsNASM) - return SourceType.NASM; - if (IsWidl) - return SourceType.IDL; - if (IsWindResource) - return SourceType.WindResource; - if (IsWineBuild) - return SourceType.WineBuild; - if (IsMessageTable) - return SourceType.MessageTable; - if (IsHeader) - return SourceType.Header; - - return SourceType.Unknown; - } - } - - public bool CompilableObject - { - get - { - if (IsWidl) - return false; - if (IsMessageTable) - return false; - - return true; - } - } - - public bool IsCPP - { - get - { - switch (Extension) - { - case ".cc": - case ".cpp": - case ".cxx": - return true; - default: - return false; - } - } - } - - public bool IsWidl - { - get - { - if (Extension == ".idl") - return true; - - return false; - } - } - - public bool IsMessageTable - { - get - { - if (Extension == ".mc") - return true; - - return false; - } - } - - public bool IsHeader - { - get - { - if (Extension == ".h") - return true; - - return false; - } - } - - public bool IsWineBuild - { - get - { - if (Extension == ".spec") - return true; - - return false; - } - } - - public bool IsWindResource - { - get - { - if (Extension == ".rc") - return true; - - return false; - } - } - - public bool IsNASM - { - get - { - if (Extension == ".asm") - return true; - - return false; - } - } - - public bool IsAssembler - { - get - { - if (Extension == ".s") - return true; - - return false; - } - } - - public bool IsC - { - get - { - if (Extension == ".c") - return true; - - return false; - } - } - - public bool IsCompilable - { - get { return (IsC || IsCPP || IsAssembler || IsNASM || IsWidl || IsWindResource || IsWineBuild || IsHeader); } - } - - public override string ToString() - { - return string.Format("{0} {1}" , Name , Type); - } - - #region IComparable Members - - public int CompareTo(object obj) - { - RBuildSourceFile source = (RBuildSourceFile)obj; - - if (First != source.First) - { - if (source.First) - return 1; - else - return -1; - } - - return 0; - } - - #endregion - } - - public class RBuildFile : RBuildFileSystemInfo - { - public RBuildFile() - { - } - - public RBuildFile(RBuildElement element) - : base (element) - { - } - - public string Extension - { - get { return Path.GetExtension(Name).Trim().ToLower(); } - } - - public override object Clone() - { - RBuildFile file = new RBuildFile(); - - file.Base = Base; - file.Name = Name; - file.Root = Root; - file.Enabled = Enabled; - - return file; - } - - public RBuildFolder Folder - { - get { return new RBuildFolder(Root, Base); } - } - } - - /// - /// Represents the base class for source-code , installable file , folder , include folder , cdfile taks ... from a build. - /// - public abstract class RBuildFileSystemInfo : ICloneable - { - protected RBuildElement m_Element = null; - protected PathRoot m_Root = PathRoot.Default; - protected string m_Name = string.Empty; //"."; - protected string m_Base = string.Empty; //null; - protected bool m_Enabled = true; - - public RBuildFileSystemInfo(RBuildElement element) - { - m_Element = element; - } - - public RBuildFileSystemInfo() - { - } - - private string NormalizePath(string path) - { - return path.Replace( - Path.AltDirectorySeparatorChar, - Path.DirectorySeparatorChar); - } - - public string FullPath - { - get { - - if (Base == null || Name == null) - { - int i = 10; - } - - return NormalizePath(Path.Combine(Base, Name)); - } - } - - public string Name - { - get { return m_Name; } - set - { - if (value == null) - { - int i = 10; - } - m_Name = value; } - } - - public string Base - { - get { return m_Base; } - set - { - if (value == null) - { - int i = 10; - } - m_Base = value; - } - } - - public bool Enabled - { - get { return m_Enabled; } - set { m_Enabled = value; } - } - - //TODO : ELIMINAR - public RBuildElement Element - { - get { return m_Element; } - set { m_Element = value; } - } - - public virtual PathRoot Root - { - get { return m_Root; } - set { m_Root = value; } - } - - public string[] BasePathParts - { - get { return Base.Split(new char[] { '\\' }); } - } - - public override bool Equals(object obj) - { - if (obj is RBuildFileSystemInfo) - { - RBuildFileSystemInfo rfsInfo = obj as RBuildFileSystemInfo; - - if ((rfsInfo.Base == Base) && - (rfsInfo.Root == Root) && - (rfsInfo.Name == Name)) - { - return true; - } - - if ((rfsInfo.FullPath == FullPath) && (rfsInfo.Root == Root)) - { - return true; - } - } - - // The instances are not equal - return false; - } - - public override int GetHashCode() - { - return Base.GetHashCode() ^ Name.GetHashCode() ^ Root.GetHashCode (); - } - - #region ICloneable Members - - public virtual object Clone() - { - throw new Exception("The method or operation is not implemented."); - } - - #endregion - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/RosFramework/RBuildImportLibrary.cs b/reactos/tools/sysgen/RosFramework/RBuildImportLibrary.cs deleted file mode 100644 index 04d9508d25f..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildImportLibrary.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - /// - /// An importlibrary element specifies that an import library should be - /// generated which other modules can use to link with the current module. - /// - public sealed class RBuildImportLibrary : RBuildFile - { - private string m_DllName = null; - - /// - /// Creates a new instance of the . - /// - public RBuildImportLibrary() - { - } - - public string DllName - { - get { return m_DllName; } - set { m_DllName = value; } - } - - public bool IsSpecFile - { - get { return Name.EndsWith(".spec.def"); } - } - - public string Definition - { - get { return Name; } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/RBuildInfInstallerFile.cs b/reactos/tools/sysgen/RosFramework/RBuildInfInstallerFile.cs deleted file mode 100644 index 0eec49b37ae..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildInfInstallerFile.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildInfInstallerFile : RBuildFile - { - private string m_InstallSection = "DefaultInstall"; - - public string InstallSection - { - get { return m_InstallSection; } - set { m_InstallSection = value; } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/RosFramework/RBuildInstallFile.cs b/reactos/tools/sysgen/RosFramework/RBuildInstallFile.cs deleted file mode 100644 index a401e126969..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildInstallFile.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildInstallFile : RBuildPlatformFile - { - } - - public class RBuildWallpaperFile : RBuildInstallFile - { - private string m_ID = null; - - public RBuildWallpaperFile() - { - } - - public RBuildWallpaperFile(string file) - { - Name = file; - } - - public string ID - { - get - { - if (m_ID == null || - m_ID == string.Empty) - return base.Name; - - return m_ID; - } - set { m_ID = value; } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/RosFramework/RBuildInstallFolder.cs b/reactos/tools/sysgen/RosFramework/RBuildInstallFolder.cs deleted file mode 100644 index acc7918b249..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildInstallFolder.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildInstallFolder : RBuildFolder - { - private string m_ID = null; - - public RBuildInstallFolder() - { - Root = PathRoot.Install; - } - - public RBuildInstallFolder(string id, string name) - { - ID = id; - Name = name; - Root = PathRoot.Install; - } - - public string ID - { - get { return m_ID; } - set { m_ID = value; } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/RBuildLanguage.cs b/reactos/tools/sysgen/RosFramework/RBuildLanguage.cs deleted file mode 100644 index 0e0be1389f2..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildLanguage.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Globalization; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildLanguage - { - private string m_Name = null; - private string m_LCID = null; - - private CultureInfo m_CultureInfo = null; - - public RBuildLanguage() - { - } - - public RBuildLanguage(string name) - { - //IsoName = name; - Name = name; - } - - public string LCID - { - get { return m_LCID; } - set { m_LCID = value; } - } - - public string Name - { - get { return m_Name; } - set { m_Name = value; } - } - - public CultureInfo CultureInfo - { - get { return m_CultureInfo; } - } - - //public string IsoName - //{ - // get { return m_CultureInfo.Name; } - // set { m_CultureInfo = CultureInfo.GetCultureInfo(value); } - //} - } -} diff --git a/reactos/tools/sysgen/RosFramework/RBuildLocalizationFile.cs b/reactos/tools/sysgen/RosFramework/RBuildLocalizationFile.cs deleted file mode 100644 index cbc46aa5c99..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildLocalizationFile.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Globalization; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildLocalizationFile : RBuildFile - { - private bool m_Dirty = false; - private CultureInfo m_CultureInfo = null; - - public RBuildLocalizationFile() - { - } - - public CultureInfo CultureInfo - { - get { return m_CultureInfo; } - } - - public bool Dirty - { - get { return m_Dirty; } - set { m_Dirty = value; } - } - - public string IsoName - { - get { return m_CultureInfo.Name; } - set { m_CultureInfo = CultureInfo.GetCultureInfo(value); } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/RosFramework/RBuildMetadata.cs b/reactos/tools/sysgen/RosFramework/RBuildMetadata.cs deleted file mode 100644 index e828dbdc725..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildMetadata.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildMetadata - { - private string m_Description = null; - - public string Description - { - get { return m_Description; } - set { m_Description = value; } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/RosFramework/RBuildModule.cs b/reactos/tools/sysgen/RosFramework/RBuildModule.cs deleted file mode 100644 index df4f0aa0720..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildModule.cs +++ /dev/null @@ -1,1215 +0,0 @@ -using System; -using System.Xml; -using System.IO; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Text; -using System.ComponentModel; - -namespace SysGen.RBuild.Framework -{ - public enum ModuleType - { - BuildTool = 0, - StaticLibrary = 1, - ObjectLibrary = 2, - Kernel = 3, - KernelModeDLL = 4, - KernelModeDriver = 5, - NativeDLL = 6, - NativeCUI = 7, - Win32DLL = 8, - Win32OCX = 9, - Win32CUI = 10, - Win32GUI = 11, - BootLoader = 12, - BootSector = 13, - Iso = 14, - LiveIso = 15, - Test = 16, - RpcServer = 17, - RpcClient = 18, - Alias = 19, - BootProgram = 20, - Win32SCR = 21, - IdlHeader = 23, - IsoRegTest = 24, - LiveIsoRegTest = 25, - EmbeddedTypeLib = 26, - ElfExecutable = 27, - RpcProxy = 28, - HostStaticLibrary = 29, - Cabinet = 30, - Package = 50, - ModuleGroup = 51, - PlatformProfile = 52, - KeyboardLayout, - MessageHeader, - IdlInterface - } - - [DefaultPropertyAttribute("Name")] - public class RBuildModule : RBuildElement, IRBuildSourceFilesContainer//, IRBuildInstallable - { - private string m_InstallBase = "."; - private string m_InstallName = null; - private string m_BaseAddress = null; - private string m_EntryPoint = null; - private string m_AliasOf = null; - private string m_Extension = null; - private string m_BuildType = null; - private string m_Description = null; - private string m_LCID = null; - private string m_CDLabel = null; - private string m_OutputName = null; - private string m_CatalogPath = null; - - private ModuleType m_Type = ModuleType.Win32CUI; - - protected bool m_Enabled = true; - protected bool m_Unicode = false; - protected bool m_AllowWarnings = false; - protected bool m_IsStartupLib = false; - protected bool m_UnderscoreSymbols = false; - protected bool m_MangledSymbols = false; - protected bool m_HostBuild = false; - - //protected RBuildInfInstallerFile m_InfInstallComponent = null; - protected RBuildFile m_LinkerScript = null; - protected RBuildSourceFile m_PrecompiledHeader = null; - protected RBuildAutoRegister m_AutoRegister = null; - protected RBuildSetupFile m_RBuildSetup = null; - protected RBuildImportLibrary m_ImportLibrary = null; - protected RBuildMetadata m_Metadata = null; - //protected RBuildInstallFolder m_InstallFolder = null; - protected RBuildBootstrapFile m_Bootstrap = null; - protected RBuildModule m_BootSectorModule = null; - - private RBuildFamilyCollection m_Families = new RBuildFamilyCollection(); - private RBuildAPIStatusCollection m_ApiInfo = new RBuildAPIStatusCollection(); - private RBuildModuleCollection m_Dependencies = new RBuildModuleCollection(); - private RBuildModuleCollection m_Libraries = new RBuildModuleCollection(); - private RBuildModuleCollection m_Requeriments = new RBuildModuleCollection(); - private RBuildSourceFileCollection m_SourceFiles = new RBuildSourceFileCollection(); - private RBuildLocalizationFileCollection m_LocalizationFiles = new RBuildLocalizationFileCollection(); - private RBuildExportedFunctionsCollection m_ExportedFunctions = new RBuildExportedFunctionsCollection(); - private RBuildAuthorCollection m_Authors = new RBuildAuthorCollection(); - private List m_RegistryKeys = new List(); - private List m_CompilationUnits = new List(); - - //public void GenerateFromPath(string path) - //{ - // m_Base = path; - - // m_Path = System.IO.Path.GetFileName(path); - // m_Name = System.IO.Path.GetFileName(path); - //} - - public RBuildSourceFile PreCompiledHeader - { - get - { - foreach (RBuildSourceFile file in SourceFiles) - { - if (file.Type == SourceType.Header) - return file; - } - - return null; - } - } - - public RBuildFile LinkerScript - { - get { return m_LinkerScript; } - set { m_LinkerScript = value; } - } - - public RBuildBootstrapFile Bootstrap - { - get { return m_Bootstrap; } - set { m_Bootstrap = value; } - } - - public bool IsBootstrap - { - get { return Bootstrap != null; } - } - - //Hack: - public bool IsSpecialIncludedBootStrap - { - get { return (Name == "ntdll"); } - } - - //Hack:: - public bool IsSpecialExcludedBootStrap - { - get { return (Name == "hal"); } - } - - public RBuildModule BootSector - { - get { return m_BootSectorModule; } - set { m_BootSectorModule = value; } - } - - //public RBuildInstallFolder InstallFolder - //{ - // get { return m_InstallFolder; } - // set { m_InstallFolder = value; } - //} - - public RBuildMetadata Metadata - { - get { return m_Metadata; } - set { m_Metadata = value; } - } - - public string Extension - { - get - { - if ((m_Extension == null) || (m_Extension == string.Empty)) - return DefaultExtension; - - return m_Extension; - } - set { m_Extension = value; } - } - - public string DefaultExtension - { - get - { - switch (Type) - { - case ModuleType.StaticLibrary: - case ModuleType.HostStaticLibrary: - return ".a"; - case ModuleType.ObjectLibrary: - return ".o"; - case ModuleType.Kernel: - case ModuleType.NativeCUI: - case ModuleType.Win32CUI: - case ModuleType.Win32GUI: - return ".exe"; - case ModuleType.Win32SCR: - return ".scr"; - case ModuleType.KeyboardLayout: - case ModuleType.KernelModeDLL: - case ModuleType.NativeDLL: - case ModuleType.Win32DLL: - return ".dll"; - case ModuleType.Win32OCX: - return ".ocx"; - case ModuleType.KernelModeDriver: - case ModuleType.BootLoader: - return ".sys"; - case ModuleType.BootSector: - return ".o"; - case ModuleType.Iso: - case ModuleType.LiveIso: - case ModuleType.IsoRegTest: - case ModuleType.LiveIsoRegTest: - return ".iso"; - case ModuleType.Test: - return ".exe"; - case ModuleType.RpcServer: - case ModuleType.RpcClient: - case ModuleType.RpcProxy: - return ".o"; - case ModuleType.BuildTool: - return ".exe"; - case ModuleType.Alias: - case ModuleType.BootProgram: - case ModuleType.IdlHeader: - case ModuleType.IdlInterface: - case ModuleType.MessageHeader: - case ModuleType.Package: - case ModuleType.ModuleGroup: - case ModuleType.PlatformProfile: - return string.Empty; - case ModuleType.EmbeddedTypeLib: - return ".tlb"; - case ModuleType.Cabinet: - return ".cab"; - default: - throw new Exception("Unknown Module Type: " + Type.ToString()); - } - } - } - - public string CatalogPath - { - get - { - if (m_CatalogPath == null) - return Folder.Parent.FullPath; - - return m_CatalogPath; - } - set { m_CatalogPath = value; } - } - - public RBuildImportLibrary ImportLibrary - { - get { return m_ImportLibrary; } - set { m_ImportLibrary = value; } - } - - public string AliasOf - { - get { return m_AliasOf; } - set { m_AliasOf = value; } - } - - public string BuildType - { - get - { - if (m_BuildType == null) - m_BuildType = "BOOTPROG"; - - return m_BuildType; - } - set { m_BuildType = value; } - } - - public string BaseAddress - { - get - { - if ((m_BaseAddress == null) || (m_BaseAddress == string.Empty)) - return DefaultBaseAdress; - - return m_BaseAddress; - } - set { m_BaseAddress = value; } - } - - public string EntryPoint - { - get - { - if (string.IsNullOrEmpty(m_EntryPoint)) - return DefaultEntrypoint; - - return m_EntryPoint; - } - set { m_EntryPoint = value; } - } - - public bool NoEntryPoint - { - get { return (EntryPoint == "0") || (EntryPoint == "0x0"); } - } - - public string LinkerEntryPoint - { - get - { - if (NoEntryPoint) - return EntryPoint; - - return string.Format("_{0}", EntryPoint); - } - } - - public string HtmlDocFileName - { - get { return string.Format("{0}.htm", Name); } - } - - public bool IsDefaultBaseAdress - { - get { return (BaseAddress == DefaultBaseAdress); } - } - - public bool IsDefaultEntryPoint - { - get { return (EntryPoint == DefaultEntrypoint); } - } - - public bool PCH - { - get { return (PreCompiledHeader != null); } - } - - public bool CPlusPlus - { - get - { - foreach (RBuildSourceFile file in SourceFiles) - { - if ((file.Extension == ".cpp") || - (file.Extension == ".cc") || - (file.Extension == ".cxx")) - { - return true; - } - } - - // This module does not contain C++ code - return false; - } - } - - public bool IsRPC - { - get - { - switch (Type) - { - case ModuleType.RpcClient: - case ModuleType.RpcServer: - case ModuleType.RpcProxy: - return true; - default: - return false; - } - } - } - - public bool IsLibrary - { - get - { - switch (Type) - { - case ModuleType.StaticLibrary: - case ModuleType.ObjectLibrary: - case ModuleType.HostStaticLibrary: //HACK - return true; - default: - return false; - } - } - } - - public bool HasInstallBase - { - get { return InstallBase != null; } - } - - public bool IsInstallable - { - get { return (IsDLL) || (IsApplication); } - } - - public bool IsApplication - { - get - { - switch (Type) - { - case ModuleType.NativeCUI: - case ModuleType.Win32CUI: - case ModuleType.Win32SCR: - case ModuleType.Win32GUI: - return true; - case ModuleType.KeyboardLayout: - case ModuleType.Kernel: - case ModuleType.KernelModeDLL: - case ModuleType.KernelModeDriver: - case ModuleType.NativeDLL: - case ModuleType.Win32DLL: - case ModuleType.Win32OCX: - case ModuleType.Test: - case ModuleType.BuildTool: - case ModuleType.HostStaticLibrary: - case ModuleType.StaticLibrary: - case ModuleType.ObjectLibrary: - case ModuleType.BootLoader: - case ModuleType.BootSector: - case ModuleType.BootProgram: - case ModuleType.Iso: - case ModuleType.LiveIso: - case ModuleType.IsoRegTest: - case ModuleType.LiveIsoRegTest: - case ModuleType.RpcServer: - case ModuleType.RpcClient: - case ModuleType.RpcProxy: - case ModuleType.Alias: - case ModuleType.IdlHeader: - case ModuleType.IdlInterface: - case ModuleType.MessageHeader: - case ModuleType.EmbeddedTypeLib: - case ModuleType.Cabinet: - case ModuleType.Package: - case ModuleType.ModuleGroup: - case ModuleType.PlatformProfile: - return false; - default: - throw new Exception("Unknown Module Type: " + Type.ToString()); - } - } - } - - public bool IsDLL - { - get - { - switch (Type) - { - case ModuleType.Kernel: - case ModuleType.KernelModeDLL: - case ModuleType.KernelModeDriver: - case ModuleType.NativeDLL: - case ModuleType.Win32DLL: - case ModuleType.Win32OCX: - case ModuleType.KeyboardLayout: - return true; - case ModuleType.NativeCUI: - case ModuleType.Win32CUI: - case ModuleType.Test: - case ModuleType.Win32SCR: - case ModuleType.Win32GUI: - case ModuleType.BuildTool: - case ModuleType.HostStaticLibrary: - case ModuleType.StaticLibrary: - case ModuleType.ObjectLibrary: - case ModuleType.BootLoader: - case ModuleType.BootSector: - case ModuleType.BootProgram: - case ModuleType.Iso: - case ModuleType.LiveIso: - case ModuleType.IsoRegTest: - case ModuleType.LiveIsoRegTest: - case ModuleType.RpcServer: - case ModuleType.RpcClient: - case ModuleType.RpcProxy: - case ModuleType.Alias: - case ModuleType.IdlHeader: - case ModuleType.IdlInterface: - case ModuleType.MessageHeader: - case ModuleType.EmbeddedTypeLib: - case ModuleType.Cabinet: - case ModuleType.Package: - case ModuleType.ModuleGroup: - case ModuleType.PlatformProfile: - return false; - default: - throw new Exception("Unknown Module Type: " + Type.ToString()); - } - } - } - - public string DefaultBaseAdress - { - get - { - switch (Type) - { - case ModuleType.Kernel: - return "0x80800000"; - case ModuleType.Win32DLL: - case ModuleType.Win32OCX: - return "0x10000000"; - case ModuleType.NativeDLL: - case ModuleType.NativeCUI: - case ModuleType.Win32CUI: - case ModuleType.Test: - return "0x00400000"; - case ModuleType.Win32SCR: - case ModuleType.Win32GUI: - return "0x00400000"; - case ModuleType.KeyboardLayout: - case ModuleType.KernelModeDLL: - case ModuleType.KernelModeDriver: - return "0x00010000"; - case ModuleType.BuildTool: - case ModuleType.HostStaticLibrary: - case ModuleType.StaticLibrary: - case ModuleType.ObjectLibrary: - case ModuleType.BootLoader: - case ModuleType.BootSector: - case ModuleType.Iso: - case ModuleType.LiveIso: - case ModuleType.IsoRegTest: - case ModuleType.LiveIsoRegTest: - case ModuleType.RpcServer: - case ModuleType.RpcClient: - case ModuleType.RpcProxy: - case ModuleType.Alias: - case ModuleType.BootProgram: - case ModuleType.IdlHeader: - case ModuleType.IdlInterface: - case ModuleType.MessageHeader: - case ModuleType.EmbeddedTypeLib: - case ModuleType.Cabinet: - case ModuleType.Package: - case ModuleType.ModuleGroup: - case ModuleType.PlatformProfile: - return string.Empty; - default: - throw new Exception("Unknown Module Type: " + Type.ToString()); - } - } - } - - public string DefaultEntrypoint - { - get - { - switch (Type) - { - case ModuleType.Kernel: - return "KiSystemStartup"; - case ModuleType.KeyboardLayout: - case ModuleType.KernelModeDLL: - case ModuleType.KernelModeDriver: - return "DriverEntry@8"; - case ModuleType.NativeDLL: - return "DllMainCRTStartup@12"; - case ModuleType.NativeCUI: - return "NtProcessStartup@4"; - case ModuleType.Win32DLL: - case ModuleType.Win32OCX: - return "DllMain@12"; - case ModuleType.Win32CUI: - case ModuleType.Test: - { - if (Unicode) - return "wmainCRTStartup"; - return "mainCRTStartup"; - } - case ModuleType.Win32SCR: - case ModuleType.Win32GUI: - { - if (Unicode) - return "wWinMainCRTStartup"; - return "WinMainCRTStartup"; - } - case ModuleType.HostStaticLibrary: - case ModuleType.BuildTool: - case ModuleType.StaticLibrary: - case ModuleType.ObjectLibrary: - case ModuleType.BootLoader: - case ModuleType.BootSector: - case ModuleType.Iso: - case ModuleType.LiveIso: - case ModuleType.IsoRegTest: - case ModuleType.LiveIsoRegTest: - case ModuleType.RpcServer: - case ModuleType.RpcClient: - case ModuleType.RpcProxy: - case ModuleType.Alias: - case ModuleType.BootProgram: - case ModuleType.IdlHeader: - case ModuleType.IdlInterface: - case ModuleType.MessageHeader: - case ModuleType.EmbeddedTypeLib: - case ModuleType.Cabinet: - case ModuleType.Package: - case ModuleType.ModuleGroup: - case ModuleType.PlatformProfile: - return string.Empty; - default: - throw new Exception("Unknown Module Type: " + Type.ToString()); - } - } - } - - public bool IsBuildable - { - get { return Type != ModuleType.Package && Type != ModuleType.ModuleGroup && Type != ModuleType.PlatformProfile; } - } - - public bool IncludeInAllTarget - { - get - { - if (Type == ModuleType.BootSector || - Type == ModuleType.Iso || - Type == ModuleType.LiveIso || - Type == ModuleType.IsoRegTest || - Type == ModuleType.LiveIsoRegTest || - Type == ModuleType.Test || - Type == ModuleType.Alias) - { - return false; - } - - return true; - } - } - - public bool LinksToCRuntimeLibrary - { - get - { - foreach (RBuildModule module in Libraries) - { - if ((module.Name == "libcntpr") || - (module.Name == "crt")) - { - return true; - } - } - - return false; - } - } - - /// - /// Default root to use when someone references - /// this module by using include - /// - public PathRoot IncludeDefaultRoot - { - get - { - switch (Type) - { - case ModuleType.RpcClient: - case ModuleType.RpcServer: - case ModuleType.RpcProxy: - return PathRoot.Intermediate; - default: - return PathRoot.SourceCode; - } - } - } - - /// - /// Gets the folder to be used when another object - /// references this module - /// - public PathRoot ReferenceDefaultRoot - { - get - { - switch (Type) - { - case ModuleType.RpcClient: - case ModuleType.RpcServer: - case ModuleType.RpcProxy: - case ModuleType.IdlHeader: - case ModuleType.MessageHeader: - case ModuleType.BootSector: - case ModuleType.StaticLibrary: - case ModuleType.HostStaticLibrary: - return PathRoot.Intermediate; - default: - return PathRoot.Output; - } - } - } - - /// - /// Gets the folder to be used when another objects - /// references the target file generated by this module - /// - public PathRoot TargetDefaultRoot - { - get - { - switch (Type) - { - case ModuleType.Iso: - case ModuleType.LiveIso: - case ModuleType.IsoRegTest: - case ModuleType.LiveIsoRegTest: - return PathRoot.Default; - case ModuleType.RpcClient: - case ModuleType.RpcServer: - case ModuleType.RpcProxy: - case ModuleType.IdlHeader: - case ModuleType.MessageHeader: - case ModuleType.BootSector: - case ModuleType.StaticLibrary: - case ModuleType.EmbeddedTypeLib: - case ModuleType.HostStaticLibrary: - return PathRoot.Intermediate; - default: - return PathRoot.Output; - } - } - } - - public bool Enabled - { - get { return m_Enabled; } - set { m_Enabled = value; } - } - - public bool MangledSymbols - { - get { return m_MangledSymbols; } - set { m_MangledSymbols = value; } - } - - public bool IsStartupLib - { - get { return m_IsStartupLib; } - set { m_IsStartupLib = value; } - } - - public bool UnderscoreSymbols - { - get { return m_UnderscoreSymbols; } - set { m_UnderscoreSymbols = value; } - } - - public bool Unicode - { - get { return m_Unicode; } - set { m_Unicode = value; } - } - - public bool AllowWarnings - { - get { return m_AllowWarnings; } - set { m_AllowWarnings = value; } - } - - /* - public RBuildFolder Folder - { - get { return new RBuildFolder(PathRoot.SourceCode, Base); } - } - */ - - /// - /// Gets the collection of . - /// - public RBuildSourceFileCollection SourceFiles - { - get { return m_SourceFiles; } - set { m_SourceFiles = value; } - } - - public RBuildLocalizationFileCollection LocalizationFiles - { - get { return m_LocalizationFiles; } - set { m_LocalizationFiles = value; } - } - - public List RegistryKeys - { - get { return m_RegistryKeys; } - set { m_RegistryKeys = value; } - } - - public RBuildAuthorCollection Authors - { - get { return m_Authors; } - set { m_Authors = value; } - } - - public List CompilationUnits - { - get { return m_CompilationUnits; } - } - - public RBuildExportedFunctionsCollection ExportedFunctions - { - get { return m_ExportedFunctions; } - } - - public RBuildAPIStatusCollection ApiInfo - { - get { return m_ApiInfo; } - } - - public RBuildFamilyCollection Families - { - get { return m_Families; } - } - - public string ModulePath - { - get { return m_Path + @"\"; } - } - - public RBuildFolder TargetFolder - { - get - { - RBuildFolder folder = null; - - folder = new RBuildFolder(); - folder.Root = TargetDefaultRoot; - - //Las ISO son excepciones a la regla , generan su resultado en el raiz y no en la carpeta - //del módulo donde se encuentran - if (Type != ModuleType.Iso && - Type != ModuleType.LiveIso && - Type != ModuleType.IsoRegTest && - Type != ModuleType.LiveIsoRegTest) - { - folder.Name = Folder.Name; - folder.Base = Folder.Base; - } - - return folder; - } - } - - public RBuildFile TargetFile - { - get - { - RBuildFile file = null; - - file = new RBuildFile(); - file.Name = TargetName; - file.Base = TargetFolder.FullPath; - file.Root = TargetFolder.Root; - - return file; - } - } - - public RBuildFile Install - { - get - { - RBuildFile file = null; - - file = new RBuildFile(); - file.Base = InstallBase; - file.Name = InstallName; - file.Root = PathRoot.Install; - - return file; - } - } - - public RBuildFile PlatformInstall - { - get - { - RBuildFile file = null; - - file = new RBuildFile(); - file.Base = "%SystemRoot%\\" + InstallBase; - file.Name = InstallName; - file.Root = PathRoot.Platform; - - return file; - } - } - - public RBuildFile Dependency - { - get - { - RBuildFile file = null; - - file = new RBuildFile(); - file.Base = Folder.FullPath; - file.Name = DependencyName; - file.Root = PathRoot.Intermediate; // ReferenceDefaultRoot; - - return file; - } - } - - public string CDLabel - { - get { return "ReactOS"; } - set { m_CDLabel = value; } - } - - public string TargetName - { - get - { - if (OutputName != null) - return OutputName; - - if (InstallName != null) - return InstallName; - - return string.Format("{0}{1}", Name, Extension); - } - } - - public string DependencyName - { - get - { - if (HasImportLibrary) - return string.Format("lib{0}.a" , Name); - - //Get the regular name - return string.Format("{0}.a" , Name); - } - } - - public string InstallBase - { - get { return m_InstallBase; } - set { m_InstallBase = value; } - } - - public string InstallName - { - get { return m_InstallName; } - set { m_InstallName = value; } - } - - public string OutputName - { - get { return m_OutputName; } - set { m_OutputName = value; } - } - - public bool Host - { - get { return m_HostBuild; } - set { m_HostBuild = value; } - } - - public bool HasImportLibrary - { - get { return (ImportLibrary != null) && (Type != ModuleType.StaticLibrary); } - } - - public bool HasMessageTables - { - get - { - foreach (RBuildSourceFile source in SourceFiles) - if (source.Type == SourceType.MessageTable) - return true; - - return false; - } - } - - public bool HasIDLs - { - get - { - foreach (RBuildSourceFile source in SourceFiles) - if (source.Type == SourceType.IDL) - return true; - - return false; - } - } - - ///* - //public string[] BaseLocation - //{ - // get { return Base.Split(new char[] { '\\' }); } - //} - - //public string[] PathLocation - //{ - // get - // { - // Uri uri = new Uri(Base , UriKind.Relative); - - // return Base.Split(new char[] { '\\' }); - - // /* - // DirectoryInfo info = new DirectoryInfo(Base); - // return info.Parent.FullName.Split(new char[] { '\\' }); - // */ - // } - //} - //*/ - - public bool IsModuleInRoot - { - get { return Path == string.Empty; } - } - - public string Description - { - get { return m_Description; } - set { m_Description = value; } - } - - public string LCID - { - get { return m_LCID; } - set { m_LCID = value; } - } - - public RBuildModuleCollection Dependencies - { - get { return m_Dependencies; } - } - - public RBuildModuleCollection Requeriments - { - get { return m_Requeriments; } - } - - public RBuildModuleCollection Libraries - { - get { return m_Libraries; } - } - - public RBuildModuleCollection Needs - { - get - { - RBuildModuleCollection modules = new RBuildModuleCollection(); - - modules.Add(Dependencies); - modules.Add(Libraries); - modules.Add(Requeriments); - - return modules; - } - } - - public ModuleType Type - { - get { return m_Type; } - set { m_Type = value; } - } - - public RBuildSetupFile Setup - { - get { return m_RBuildSetup; } - set { m_RBuildSetup = value; } - } - - public RBuildAutoRegister AutoRegister - { - get { return m_AutoRegister; } - set { m_AutoRegister = value; } - } - - public string MakeFileTargetMacro - { - get { return string.Format("$({0}_TARGET)", Name); } - } - - public string MakeFileTarget - { - get { return string.Format("{0}_TARGET", Name); } - } - - public string MakeFileLibs - { - get { return string.Format("{0}_LIBS", Name); } - } - - public string MakeFileLinkDeps - { - get { return string.Format("{0}_LINKDEPS", Name); } - } - - public string MakeFileLinkDepsMacro - { - get { return string.Format("$({0}_LINKDEPS)", Name); } - } - - public string MakeFileLibsMacro - { - get { return string.Format("$({0}_LIBS)", Name); } - } - - public override void SaveAs(string moduleFile) - { - // Creates an XML file is not exist - using (XmlTextWriter writer = new XmlTextWriter(moduleFile, Encoding.ASCII)) - { - writer.Indentation = 4; - writer.Formatting = Formatting.Indented; - - // Starts a new document - writer.WriteStartDocument(); - - writer.WriteComment("File autogenerated by RosBuilder 0.1"); - writer.WriteStartElement("module"); - - writer.WriteAttributeString("name", Name); - writer.WriteAttributeString("type", Type.ToString()); - writer.WriteAttributeString("installbase", InstallBase); - writer.WriteAttributeString("installname", InstallName); - writer.WriteAttributeString("unicode", Unicode.ToString()); - writer.WriteAttributeString("allowwarnings", AllowWarnings.ToString()); - writer.WriteAttributeString("underscoresymbols", UnderscoreSymbols.ToString()); - writer.WriteAttributeString("baseadress", BaseAddress); - writer.WriteAttributeString("entrypoint", EntryPoint); - writer.WriteAttributeString("extension", Extension); - writer.WriteAttributeString("isstartuplib", IsStartupLib.ToString()); - writer.WriteAttributeString("mangledsymbols", MangledSymbols.ToString()); - - writer.WriteStartElement("include"); - writer.WriteAttributeString("base", Name); - writer.WriteString("."); - writer.WriteEndElement(); - - foreach (RBuildFolder include in IncludeFolders) - { - writer.WriteStartElement("include"); - writer.WriteAttributeString("base", include.Base); - writer.WriteString(include.Name); - writer.WriteEndElement(); - } - - foreach (RBuildDefine define in Defines) - { - writer.WriteStartElement("define"); - writer.WriteAttributeString("name", define.Name); - - if (define.Name != string.Empty) - { - writer.WriteString(define.Value); - } - - writer.WriteEndElement(); - } - - foreach (RBuildModule dependency in Dependencies) - { - writer.WriteStartElement("dependency"); - writer.WriteString(dependency.Name); - writer.WriteEndElement(); - } - - foreach (RBuildModule library in Libraries) - { - writer.WriteStartElement("library"); - writer.WriteString(library.Name); - writer.WriteEndElement(); - } - - foreach (RBuildSourceFile sourceFile in SourceFiles) - { - if (sourceFile.IsCompilable) - { - if (sourceFile.Switches != string.Empty) - { - writer.WriteAttributeString("switches", sourceFile.Switches); - } - - writer.WriteStartElement("file"); - writer.WriteString(sourceFile.Name); - writer.WriteEndElement(); - } - } - - if (PreCompiledHeader != null) - { - writer.WriteStartElement("pch"); - writer.WriteString(PreCompiledHeader.Name); - writer.WriteEndElement(); - } - - writer.WriteEndDocument(); - } - } - - public override string ToString() - { - return string.Format("Module : '{0}' Type : {1} Base : '{2}' Libraries : '{3}' Dependencies : '{4}' Requeriments : '{5}'", - Name, - Type, - Base, - Libraries.Count, - Dependencies.Count, - Requeriments.Count); - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/RBuildModuleGroup.cs b/reactos/tools/sysgen/RosFramework/RBuildModuleGroup.cs deleted file mode 100644 index a3c57c26c8a..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildModuleGroup.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildModuleGroup - { - private string m_Name = null; - private RBuildModuleCollection m_Modules = new RBuildModuleCollection(); - - public string Name - { - get { return m_Name; } - set { m_Name = value; } - } - - public RBuildModuleCollection Modules - { - get { return m_Modules; } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/RBuildModuleInfo.cs b/reactos/tools/sysgen/RosFramework/RBuildModuleInfo.cs deleted file mode 100644 index c4c944e87fc..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildModuleInfo.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildModuleInfo - { - private string m_Name = string.Empty; - - public string Name - { - get { return m_Name; } - set { m_Name = value; } - } - private string m_Base = string.Empty; - - public string Base - { - get { return m_Base; } - set { m_Base = value; } - } - private string m_CatalogPath = string.Empty; - - public string CatalogPath - { - get { return m_CatalogPath; } - set { m_CatalogPath = value; } - } - private ModuleType m_Type = ModuleType.BuildTool; - - public ModuleType Type - { - get { return m_Type; } - set { m_Type = value; } - } - - List m_Libraries = new List(); - List m_Dependencies = new List(); - List m_Requirements = new List(); - - public List Libraries - { - get { return m_Libraries; } - set { m_Libraries = value; } - } - - public List Dependencies - { - get { return m_Dependencies; } - set { m_Dependencies = value; } - } - - public List Requirements - { - get { return m_Requirements; } - set { m_Requirements = value; } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/RBuildPlatform.cs b/reactos/tools/sysgen/RosFramework/RBuildPlatform.cs deleted file mode 100644 index 8940398da6e..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildPlatform.cs +++ /dev/null @@ -1,133 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public enum OptimizeLevelType : int - { - Level_0 = 0, - Level_1 = 1, - Level_2 = 2, - Level_3 = 3, - Level_4 = 4, - Level_5 = 5 - } - - public class RBuildPlatform - { - private string m_Name = "Unamed Platform"; - private string m_Description = "This Platform has not yet a description"; - private bool m_Debug = true; - private bool m_KDebug = true; - private bool m_GDB = false; - private bool m_NSWPAT = false; - private bool m_WINKD = false; - private OptimizeLevelType m_OptimizeLevelType = OptimizeLevelType.Level_1; - private RBuildModule m_ShellModule = null; - private RBuildModule m_ScreenSaverModule = null; - private RBuildLanguage m_Language = null; - private RBuildWallpaperFile m_Wallpaper = null; - private RBuildModuleCollection m_Modules = new RBuildModuleCollection(); - private RBuildModuleCollection m_Autorun = new RBuildModuleCollection(); - private RBuildLanguageCollection m_Languages = new RBuildLanguageCollection(); - private RBuildDebugChannelCollection m_DebugChannels = new RBuildDebugChannelCollection(); - - public RBuildPlatform() - { - } - - public string Name - { - get { return m_Name; } - set { m_Name = value; } - } - - public string Description - { - get { return m_Description; } - set { m_Description = value; } - } - - public RBuildDebugChannelCollection DebugChannels - { - get { return m_DebugChannels; } - } - - public RBuildModule Shell - { - get { return m_ShellModule; } - set { m_ShellModule = value; } - } - - public RBuildModule Screensaver - { - get { return m_ScreenSaverModule; } - set { m_ScreenSaverModule = value; } - } - - public RBuildLanguage Language - { - get { return m_Language; } - set { m_Language = value; } - } - - public RBuildWallpaperFile Wallpaper - { - get { return m_Wallpaper; } - set { m_Wallpaper = value; } - } - - public RBuildModuleCollection Modules - { - get { return m_Modules; } - } - - public RBuildModuleCollection AutorunModules - { - get { return m_Autorun; } - } - - public RBuildLanguageCollection Languages - { - get { return m_Languages; } - } - - public bool Debug - { - get { return m_Debug; } - set { m_Debug = value; } - } - - public bool KDebug - { - get { return m_KDebug; } - set { m_KDebug = value; } - } - - public bool GDB - { - get { return m_GDB; } - set { m_GDB = value; } - } - - public bool NSWPAT - { - get { return m_NSWPAT; } - set { m_NSWPAT = value; } - } - - public bool WINKD - { - get { return m_WINKD; } - set { m_WINKD = value; } - } - - public OptimizeLevelType OptimizeLevel - { - get { return m_OptimizeLevelType; } - set { m_OptimizeLevelType = value; } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/RosFramework/RBuildPlatformFile.cs b/reactos/tools/sysgen/RosFramework/RBuildPlatformFile.cs deleted file mode 100644 index 2e300fd4f30..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildPlatformFile.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildOutputFile : RBuildFile //, IRBuildInstallable - { - private string m_InstallBase = "."; //"."; - private string m_NewName = null; - - public string NewName - { - get - { - if (m_NewName == null) - return m_Name; - return m_NewName; - } - set { m_NewName = value; } - } - - public string InstallBase - { - get { return m_InstallBase; } - set { m_InstallBase = value; } - } - - public virtual RBuildFile CDNewFile - { - get - { - RBuildFile file = (RBuildFile)Clone(); - - file.Name = NewName; - file.Base = InstallBase; - file.Root = PathRoot.CDOutput; - - return file; - } - } - - public virtual RBuildFile NewFile - { - get - { - RBuildFile file = (RBuildFile)Clone(); - - file.Name = NewName; - file.Base = InstallBase; - file.Root = Root; - - return file; - } - } - } - - public class RBuildPlatformFile : RBuildOutputFile - { - //protected RBuildInstallFolder m_InstallFolder = null; - - //public RBuildInstallFolder InstallFolder - //{ - // get { return m_InstallFolder; } - // set { m_InstallFolder = value; } - //} - - public RBuildFile PlatformInstall - { - get - { - RBuildFile file = null; - - file = new RBuildFile(); - file.Base = "%SystemRoot%\\" + InstallBase; - file.Name = Name; - file.Root = PathRoot.Platform; - - return file; - } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/RBuildProject.cs b/reactos/tools/sysgen/RosFramework/RBuildProject.cs deleted file mode 100644 index c771b923d95..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildProject.cs +++ /dev/null @@ -1,163 +0,0 @@ -using System; -using System.Text; -using System.Xml; -using System.Collections.Generic; - -namespace SysGen.RBuild.Framework -{ - /// - /// There can be one project per top-level XML build file. - /// A project can only be defined in a top-level xml build file. - /// - public class RBuildProject : RBuildElement - { - private RBuildContributorCollection m_Contributors = new RBuildContributorCollection(); - private RBuildModuleCollection m_Modules = new RBuildModuleCollection(); - private RBuildLanguageCollection m_Languages = new RBuildLanguageCollection(); - private RBuildInstallFolderCollection m_InstallFolders = new RBuildInstallFolderCollection(); - private RBuildBuildFamilyCollection m_BuildFamilies = new RBuildBuildFamilyCollection(); - private RBuildPlatform m_Platform = new RBuildPlatform(); - private RBuildDebugChannelCollection m_DebugChannels = new RBuildDebugChannelCollection(); - - private string m_PackagesFile = "obj-i386/reactos.dff"; - private string m_MakeFile = "makefile.auto"; - - public RBuildProject() - { - Folder = new RBuildFolder(PathRoot.SourceCode); - } - - /// - /// Filename of the GNU makefile that is to be created. - /// - public string MakeFile - { - get { return m_MakeFile; } - set { m_MakeFile = value; } - } - - public string PackagesFile - { - get { return m_PackagesFile; } - set { m_PackagesFile = value; } - } - - public RBuildDebugChannelCollection DebugChannels - { - get { return m_DebugChannels; } - } - - public RBuildPlatform Platform - { - get { return m_Platform; } - set { m_Platform = value; } - } - - public RBuildBuildFamilyCollection BuildFamilies - { - get { return m_BuildFamilies; } - set { m_BuildFamilies = value; } - } - - public RBuildInstallFolderCollection InstallFolders - { - get { return m_InstallFolders; } - set { m_InstallFolders = value; } - } - - public RBuildContributorCollection Contributors - { - get { return m_Contributors; } - set { m_Contributors = value; } - } - - public RBuildModuleCollection Modules - { - get { return m_Modules; } - } - - public RBuildLanguageCollection Languages - { - get { return m_Languages; } - } - - public string MakeFileGCCOptions - { - get { return string.Format("{0}_GCCOPTIONS", Name); } - } - - public string MakeFileGCCOptionsMacro - { - get { return string.Format("$({0}_GCCOPTIONS)", Name); } - } - - public override void SaveAs(string projectFile) - { - // Creates an XML file is not exist - using (XmlTextWriter writer = new XmlTextWriter(projectFile, Encoding.ASCII)) - { - writer.Indentation = 4; - writer.Formatting = Formatting.Indented; - - // Starts a new document - writer.WriteStartDocument(); - writer.WriteStartElement("project"); - writer.WriteAttributeString("name", Name); - writer.WriteAttributeString("makefile", MakeFile); - writer.WriteAttributeString("xmlns", "xi", null, "http://www.w3.org/2001/XInclude"); - - /* - writer.WriteComment("Generic Properties"); - foreach (KeyValuePair property in Properties) - { - writer.WriteStartElement("property"); - writer.WriteAttributeString("name", property.Key); - writer.WriteAttributeString("value", property.Value); - writer.WriteEndElement(); - } - - foreach (string define in Defines) - { - writer.WriteStartElement("define"); - writer.WriteAttributeString("name", define); - writer.WriteEndElement(); - }*/ - - writer.WriteStartElement("xi:include"); - writer.WriteAttributeString("href", "baseaddress.rbuild"); - writer.WriteEndElement(); - - writer.WriteStartElement("xi:include"); - writer.WriteAttributeString("href", "boot/bootdata/bootdata.rbuild"); - writer.WriteEndElement(); - - writer.WriteElementString("compilerflag", "-Os"); - writer.WriteElementString("compilerflag", "-ftracer"); - writer.WriteElementString("compilerflag", "-momit-leaf-frame-pointer"); - writer.WriteElementString("compilerflag", "-mpreferred-stack-boundary=2"); - - writer.WriteElementString("compilerflag", "-Wno-strict-aliasing"); - writer.WriteElementString("compilerflag", "-Wpointer-arith"); - writer.WriteElementString("linkerflag", "-enable-stdcall-fixup"); - - foreach (RBuildFolder folder in IncludeFolders) - { - writer.WriteStartElement("include"); - writer.WriteAttributeString("root", folder.Root.ToString()); - writer.WriteString(folder.Name); - writer.WriteEndElement(); - } - - foreach (RBuildModule module in Modules) - { - writer.WriteStartElement("xi:include"); - writer.WriteAttributeString("href", module.RBuildFile); - writer.WriteEndElement(); - } - - writer.WriteEndElement(); //Project - writer.WriteEndDocument(); - } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/RBuildProperty.cs b/reactos/tools/sysgen/RosFramework/RBuildProperty.cs deleted file mode 100644 index bbc996f00e0..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildProperty.cs +++ /dev/null @@ -1,104 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildProperty : RBuildValueKey - { - public RBuildProperty(string name, string value) - : base(name, value) - { - } - - public RBuildProperty(string name, string value, bool readOnly) - : base(name, value, readOnly) - { - } - - public RBuildProperty(string name, string value, bool readOnly, bool isInternal) - : base(name, value, readOnly, isInternal) - { - } - } - - public class RBuildBaseAdress : RBuildProperty - { - public RBuildBaseAdress(string name, string value) - : base(name, value, true) - { - } - } - - public class RBuildDefine : RBuildValueKey - { - public RBuildDefine(string name) - : base(name, string.Empty, true) - { - } - - public RBuildDefine(string name, string value) - : base(name, value, true) - { - } - } - - public abstract class RBuildValueKey - { - protected string m_Name = null; - protected string m_Value = null; - protected bool m_ReadOnly = false; - protected bool m_IsInternal = false; - - public RBuildValueKey(string name, string value) - { - m_Name = name; - m_Value = value; - } - - public RBuildValueKey(string name, string value, bool readOnly) - { - m_Name = name; - m_Value = value; - m_ReadOnly = readOnly; - } - - public RBuildValueKey(string name, string value, bool readOnly, bool isInternal) - { - m_Name = name; - m_Value = value; - m_ReadOnly = readOnly; - m_IsInternal = isInternal; - } - - public bool IsEmpty - { - get { return string.IsNullOrEmpty(Value); } - } - - public string Name - { - get { return m_Name; } - set { m_Name = value; } - } - - public string Value - { - get { return m_Value; } - set { m_Value = value; } - } - - public bool ReadOnly - { - get { return m_ReadOnly; } - set { m_ReadOnly = value; } - } - - public bool Internal - { - get { return m_IsInternal; } - set { m_IsInternal = value; } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/RBuildRegistryKey.cs b/reactos/tools/sysgen/RosFramework/RBuildRegistryKey.cs deleted file mode 100644 index 2f573be5409..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildRegistryKey.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using Microsoft.Win32; - -namespace SysGen.RBuild.Framework -{ - public class RBuildRegistryKey - { - private bool m_Enabled = true; - private bool m_LiveCD = true; - private bool m_BootCD = true; - - private string m_KeyName = null; - private string m_KeyValue = null; - - private RegistryHive m_RegistryHive = RegistryHive.ClassesRoot; - private RegistryValueKind m_RegistryValueKind = RegistryValueKind.Unknown; - - public RBuildRegistryKey() - { - } - - public bool LiveCD - { - get { return m_LiveCD; } - set { m_LiveCD = value; } - } - - public bool BootCD - { - get { return m_BootCD; } - set { m_BootCD = value; } - } - - public bool Enabled - { - get { return m_Enabled; } - set { m_Enabled = value; } - } - - public string KeyName - { - get { return m_KeyName; } - set { m_KeyName = value; } - } - - public string KeyValue - { - get { return m_KeyValue; } - set { m_KeyValue = value; } - } - - public RegistryHive RegistryHive - { - get { return m_RegistryHive; } - set { m_RegistryHive = value; } - } - - public RegistryValueKind RegistryValueKind - { - get { return m_RegistryValueKind; } - set { m_RegistryValueKind = value; } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/RBuildSetup.cs b/reactos/tools/sysgen/RosFramework/RBuildSetup.cs deleted file mode 100644 index 42dc5c18ed7..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildSetup.cs +++ /dev/null @@ -1,52 +0,0 @@ -//using System; -//using System.IO; -//using System.Collections.Generic; -//using System.Text; - -//namespace SysGen.RBuild.Framework -//{ -// public enum SetupType -// { -// Device, -// Component -// } - -// public class RBuildSetup : RBuildPlatformFile -// { -// private SetupType m_SetupType = SetupType.Component; -// private bool m_InstallAlways = true; -// private string m_InstallSection = "DefaultInstall"; - -// public SetupType SetupType -// { -// get { return m_SetupType; } -// set { m_SetupType = value; } -// } - -// public string InstallSection -// { -// get { return m_InstallSection; } -// set { m_InstallSection = value; } -// } - -// public string DefaultInstallSection -// { -// get -// { -// switch (SetupType) -// { -// case SetupType.Device: -// return "DefaultInstall"; -// default: -// return "DefaultInstall"; -// } -// } -// } - -// public bool InstallAlways -// { -// get { return m_InstallAlways; } -// set { m_InstallAlways = value; } -// } -// } -//} diff --git a/reactos/tools/sysgen/RosFramework/RBuildSetupFile.cs b/reactos/tools/sysgen/RosFramework/RBuildSetupFile.cs deleted file mode 100644 index 6bd9aee38c9..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildSetupFile.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public enum SetupType - { - Device, - Component - } - - public class RBuildSetupFile : RBuildPlatformFile - { - private SetupType m_SetupType = SetupType.Component; - private bool m_InstallAlways = true; - private string m_InstallSection = "DefaultInstall"; - - public SetupType SetupType - { - get { return m_SetupType; } - set { m_SetupType = value; } - } - - public string InstallSection - { - get { return m_InstallSection; } - set { m_InstallSection = value; } - } - - public string DefaultInstallSection - { - get - { - switch (SetupType) - { - case SetupType.Device: - return "DefaultInstall"; - default: - return "DefaultInstall"; - } - } - } - - public bool InstallAlways - { - get { return m_InstallAlways; } - set { m_InstallAlways = value; } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/RBuildSolution.cs b/reactos/tools/sysgen/RosFramework/RBuildSolution.cs deleted file mode 100644 index 32d10134769..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildSolution.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class RBuildSolution - { - private List m_Projects = null; - - /// - /// The projects this solution contains. - /// - public List Projects - { - get { return m_Projects; } - set { m_Projects = value; } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/RBuildTarget.cs b/reactos/tools/sysgen/RosFramework/RBuildTarget.cs deleted file mode 100644 index adf726165e3..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildTarget.cs +++ /dev/null @@ -1,274 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public enum TargetType - { - LiveCD, - BootCD - } - - public enum TargetDebugOutputType - { - COM1, - COM2, - Screen, - Bochs - } - - public enum TargetDebugType - { - None, - Debug, - KernelDebug - } - - public enum TargetWindowsPlatformType - { - WindowsNT4 = 0x400, - Windows2000 = 0x500, - WindowsXP = 0x501, - Windows2003 = 0x0502, - WindowsVista = 0x600 - } - - public enum TargetWindowsSPType - { - NoServicePack, - ServicePack1 = 0x100, - ServicePack2 = 0x200, - ServicePack3 = 0x300, - ServicePack4 = 0x400, - ServicePack5 = 0x500, - ServicePack6 = 0x600, - ServicePack7 = 0x700, - ServicePack8 = 0x800, - ServicePack9 = 0x900 - } - - public enum TargetPlatformType - { - NT4, /* Windows NT 4.0 */ - NT4_SP1, - NT4_SP2, - NT4_SP3, - NT4_SP4, - NT4_SP5, - NT4_SP6, - NT5, /* Windows 2000 */ - NT5_SP1, - NT5_SP2, - NT5_SP3, - NT5_SP4, - NT51, /* Windows XP */ - NT51_SP1, - NT51_SP2, - NT52, /* Windows 2003 */ - NT52_SP1, - NT52_SP2, - NT6 /* Windows Vista */ - } - - public enum TargetArchitectureType - { - X86, - X86_i486, - X86_i586, - X86_Pentium, - X86_Pentium2, - X86_Pentium3, - X86_Pentium4, - X86_AthlonXP, - X86_AthlonMP, - X86_Xbox, - PPC - } - - public enum TargetOptimizeLevelType - { - Level_0, - Level_1, - Level_2, - Level_3, - Level_4, - Level_5 - } - - public class RBuildTarget - { - private string m_Name = null; - - private bool m_RegTest = false; - private bool m_Multiprocessor = false; - - private TargetType m_Type = TargetType.BootCD; - private TargetDebugType m_DebugType = TargetDebugType.None; - private TargetPlatformType m_PlatformType = TargetPlatformType.NT5_SP4; - private TargetDebugOutputType m_DebugOutputType = TargetDebugOutputType.COM1; - private TargetArchitectureType m_ArchitectureType = TargetArchitectureType.X86_Pentium; - private TargetOptimizeLevelType m_OptimizeLevelType = TargetOptimizeLevelType.Level_1; - - public RBuildTarget() - { - } - - public RBuildTarget(string name) - { - m_Name = name; - } - - public RBuildTarget(string name, TargetType type) - { - m_Name = name; - m_Type = type; - } - - public RBuildTarget(string name, TargetType type, TargetDebugType debugType) - { - m_Name = name; - m_Type = type; - m_DebugType = debugType; - } - - public string Name - { - get { return m_Name; } - set { m_Name = value; } - } - - public bool MultiProcessor - { - get { return m_Multiprocessor; } - set { m_Multiprocessor = value; } - } - - public bool RegressionTest - { - get { return m_RegTest; } - set { m_RegTest = value; } - } - - public bool Debug - { - get { return ((DebugType == TargetDebugType.Debug) || (DebugType == TargetDebugType.KernelDebug)); } - } - - public bool KernelDebug - { - get { return (DebugType == TargetDebugType.KernelDebug); } - } - - public TargetType Type - { - get { return m_Type; } - set { m_Type = value; } - } - - public TargetDebugType DebugType - { - get { return m_DebugType; } - set { m_DebugType = value; } - } - - public TargetDebugOutputType DebugOutputType - { - get { return m_DebugOutputType; } - set { m_DebugOutputType = value; } - } - - public TargetPlatformType PlatformType - { - get { return m_PlatformType; } - set { m_PlatformType = value; } - } - - public TargetArchitectureType ArchitectureType - { - get { return m_ArchitectureType; } - set { m_ArchitectureType = value; } - } - - public TargetOptimizeLevelType OptimizeType - { - get { return m_OptimizeLevelType; } - set { m_OptimizeLevelType = value; } - } - - public TargetWindowsSPType WindowsServicePack - { - get - { - switch (PlatformType) - { - case TargetPlatformType.NT4: - case TargetPlatformType.NT5: - case TargetPlatformType.NT51: - case TargetPlatformType.NT52: - case TargetPlatformType.NT6: - return TargetWindowsSPType.NoServicePack; - case TargetPlatformType.NT4_SP1: - case TargetPlatformType.NT5_SP1: - case TargetPlatformType.NT51_SP1: - case TargetPlatformType.NT52_SP1: - return TargetWindowsSPType.ServicePack1; - case TargetPlatformType.NT4_SP2: - case TargetPlatformType.NT5_SP2: - case TargetPlatformType.NT51_SP2: - case TargetPlatformType.NT52_SP2: - return TargetWindowsSPType.ServicePack2; - case TargetPlatformType.NT4_SP3: - case TargetPlatformType.NT5_SP3: - return TargetWindowsSPType.ServicePack3; - case TargetPlatformType.NT4_SP4: - case TargetPlatformType.NT5_SP4: - return TargetWindowsSPType.ServicePack4; - case TargetPlatformType.NT4_SP5: - return TargetWindowsSPType.ServicePack5; - case TargetPlatformType.NT4_SP6: - return TargetWindowsSPType.ServicePack6; - default: - throw new Exception(""); - } - } - } - - public TargetWindowsPlatformType WindowsPlatfom - { - get - { - switch (PlatformType) - { - case TargetPlatformType.NT4: - case TargetPlatformType.NT4_SP1: - case TargetPlatformType.NT4_SP2: - case TargetPlatformType.NT4_SP3: - case TargetPlatformType.NT4_SP4: - case TargetPlatformType.NT4_SP5: - case TargetPlatformType.NT4_SP6: - return TargetWindowsPlatformType.WindowsNT4; - case TargetPlatformType.NT5: - case TargetPlatformType.NT5_SP1: - case TargetPlatformType.NT5_SP2: - case TargetPlatformType.NT5_SP3: - case TargetPlatformType.NT5_SP4: - return TargetWindowsPlatformType.Windows2000; - case TargetPlatformType.NT51: - case TargetPlatformType.NT51_SP1: - case TargetPlatformType.NT51_SP2: - return TargetWindowsPlatformType.WindowsXP; - case TargetPlatformType.NT52: - case TargetPlatformType.NT52_SP1: - case TargetPlatformType.NT52_SP2: - return TargetWindowsPlatformType.Windows2003; - case TargetPlatformType.NT6: - return TargetWindowsPlatformType.WindowsVista; - default: - throw new Exception(""); - } - } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/RBuildUnAttendSetup.cs b/reactos/tools/sysgen/RosFramework/RBuildUnAttendSetup.cs deleted file mode 100644 index a240dbda757..00000000000 --- a/reactos/tools/sysgen/RosFramework/RBuildUnAttendSetup.cs +++ /dev/null @@ -1,102 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public enum InstallType : int - { - SkipMBRInstall = 0, - FloppyMBRInstall = 1, - HDDMBRInstall = 2 - } - - public class RBuildUnAttendSetup - { - private InstallType m_InstallType = InstallType.HDDMBRInstall; - private int m_DestinationDiskNumber = 0; - private int m_DestinationPartitionNumber = 1; - private bool m_FormatPartition; - private bool m_AutoPartition; - private bool m_DisableVmwDriverInstall; - private bool m_Enabled = false; - private string m_InstallDirectory; - private string m_FullName; - private string m_OrgName; - private string m_ComputerName; - private string m_AdminPassword; - - public InstallType InstallType - { - get { return m_InstallType; } - set { m_InstallType = value; } - } - - public int DestinationDiskNumber - { - get { return m_DestinationDiskNumber; } - set { m_DestinationDiskNumber = value; } - } - - public int DestinationPartitionNumber - { - get { return m_DestinationPartitionNumber; } - set { m_DestinationPartitionNumber = value; } - } - - public string InstallDirectory - { - get { return m_InstallDirectory; } - set { m_InstallDirectory = value; } - } - - public string FullName - { - get { return m_FullName; } - set { m_FullName = value; } - } - - public string OrgName - { - get { return m_OrgName; } - set { m_OrgName = value; } - } - - public string ComputerName - { - get { return m_ComputerName; } - set { m_ComputerName = value; } - } - - public string AdminPassword - { - get { return m_AdminPassword; } - set { m_AdminPassword = value; } - } - - public bool FormatPartition - { - get { return m_FormatPartition; } - set { m_FormatPartition = value; } - } - - public bool AutoPartition - { - get { return m_AutoPartition; } - set { m_AutoPartition = value; } - } - - public bool DisableVmwDriverInstall - { - get { return m_DisableVmwDriverInstall; } - set { m_DisableVmwDriverInstall = value; } - } - - public bool Enabled - { - get { return m_Enabled; } - set { m_Enabled = value; } - } - } -} diff --git a/reactos/tools/sysgen/RosFramework/SysGen.RBuild.Framework.csproj b/reactos/tools/sysgen/RosFramework/SysGen.RBuild.Framework.csproj deleted file mode 100644 index 6ccaf2fe069..00000000000 --- a/reactos/tools/sysgen/RosFramework/SysGen.RBuild.Framework.csproj +++ /dev/null @@ -1,117 +0,0 @@ - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {88D9BED7-30C5-4683-A6C6-6F2EB55B8F26} - Library - Properties - SysGen.RBuild.Framework - SysGen.RBuild.Framework - - - 2.0 - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/reactos/tools/sysgen/RosFramework/SysGen.RBuild.Framework.csproj.user b/reactos/tools/sysgen/RosFramework/SysGen.RBuild.Framework.csproj.user deleted file mode 100644 index 6a34e7dcdf5..00000000000 --- a/reactos/tools/sysgen/RosFramework/SysGen.RBuild.Framework.csproj.user +++ /dev/null @@ -1,5 +0,0 @@ - - - ShowAllFiles - - \ No newline at end of file diff --git a/reactos/tools/sysgen/SYSGen/Backends/Backend.cs b/reactos/tools/sysgen/SYSGen/Backends/Backend.cs deleted file mode 100644 index 849137aa76d..00000000000 --- a/reactos/tools/sysgen/SYSGen/Backends/Backend.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SYSGen.Backends -{ - public abstract class Backend - { - } -} diff --git a/reactos/tools/sysgen/SYSGen/Backends/Catalog/CatalogBackend.cs b/reactos/tools/sysgen/SYSGen/Backends/Catalog/CatalogBackend.cs deleted file mode 100644 index 52bd011dd41..00000000000 --- a/reactos/tools/sysgen/SYSGen/Backends/Catalog/CatalogBackend.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SYSGen.Backends; - -namespace SYSGen.Backends.Catalog -{ - class CatalogBackend : Backend - { - } -} diff --git a/reactos/tools/sysgen/SYSGen/Backends/Mingw/MingwBackend.cs b/reactos/tools/sysgen/SYSGen/Backends/Mingw/MingwBackend.cs deleted file mode 100644 index 73c2ae3a7bd..00000000000 --- a/reactos/tools/sysgen/SYSGen/Backends/Mingw/MingwBackend.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SYSGen.Backends; - -namespace SYSGen.Backends.Mingw -{ - class MingwBackend : Backend - { - } -} diff --git a/reactos/tools/sysgen/SYSGen/Program.cs b/reactos/tools/sysgen/SYSGen/Program.cs deleted file mode 100644 index c49fc075055..00000000000 --- a/reactos/tools/sysgen/SYSGen/Program.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SYSGen -{ - class Program - { - static void Main(string[] args) - { - } - } -} diff --git a/reactos/tools/sysgen/SYSGen/Properties/AssemblyInfo.cs b/reactos/tools/sysgen/SYSGen/Properties/AssemblyInfo.cs deleted file mode 100644 index 04c75a90f62..00000000000 --- a/reactos/tools/sysgen/SYSGen/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("SYSGen")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Sand")] -[assembly: AssemblyProduct("SYSGen")] -[assembly: AssemblyCopyright("Copyright © Sand 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("eb4b0be6-5b08-4933-b932-61bf335383db")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/reactos/tools/sysgen/SYSGen/SYSGen.csproj b/reactos/tools/sysgen/SYSGen/SYSGen.csproj deleted file mode 100644 index 93452a30484..00000000000 --- a/reactos/tools/sysgen/SYSGen/SYSGen.csproj +++ /dev/null @@ -1,56 +0,0 @@ - - - Debug - AnyCPU - 8.0.50727 - 2.0 - {5AEA291F-D79C-4FC1-AA60-96C591658B85} - Exe - Properties - SYSGen - sysgen - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - {88D9BED7-30C5-4683-A6C6-6F2EB55B8F26} - RosFramework - - - - - \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/BuildElementArrayAttribute.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/BuildElementArrayAttribute.cs deleted file mode 100644 index 3e2e2155fe8..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/BuildElementArrayAttribute.cs +++ /dev/null @@ -1,33 +0,0 @@ -// NAnt - A .NET build tool -// Copyright (C) 2001 Gerry Shaw -// -// 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// Ian MacLean ( ian@maclean.ms ) - -namespace SysGen.BuildEngine.Attributes -{ - using System; - using System.Reflection; - - /// Indicates that property should be treated as a xml arrayList for the task. - [AttributeUsage(AttributeTargets.Property, Inherited=true)] - public class BuildElementArrayAttribute : BuildElementAttribute { - - public BuildElementArrayAttribute(string name) : base(name) { - - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/BuildElementAttribute.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/BuildElementAttribute.cs deleted file mode 100644 index 5b453a063f2..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/BuildElementAttribute.cs +++ /dev/null @@ -1,50 +0,0 @@ -// NAnt - A .NET build tool -// Copyright (C) 2001 Gerry Shaw -// -// 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// Ian MacLean ( ian@maclean.ms ) - -namespace SysGen.BuildEngine.Attributes -{ - - using System; - using System.Reflection; - - /// Indicates that field should be treated as a xml file set for the task. - [AttributeUsage(AttributeTargets.Property, Inherited=true)] - public class BuildElementAttribute : Attribute - { - - string _name; - bool _required; - - public BuildElementAttribute(string name) - { - Name = name; - } - - public string Name - { - get { return _name; } - set { _name = value; } - } - public bool Required - { - get { return _required; } - set { _required = value; } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/ElementNameAttribute.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/ElementNameAttribute.cs deleted file mode 100644 index a52f72ef520..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/ElementNameAttribute.cs +++ /dev/null @@ -1,45 +0,0 @@ -// NAnt - A .NET build tool -// Copyright (C) 2001 Gerry Shaw -// -// 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// Ian MacLean (ian_maclean@another.com) - -namespace SysGen.BuildEngine.Attributes { - - using System; - using System.Reflection; - - /// Indicates that class should be treated as a NAnt element. - /// - /// Attach this attribute to a subclass of Element to have NAnt be able - /// to recognize it. The name should be short but must not confict - /// with any other element already in use. - /// - [AttributeUsage(AttributeTargets.Class, Inherited=false, AllowMultiple=false)] - public class ElementNameAttribute : Attribute { - - string _name; - - public ElementNameAttribute(string name) { - _name = name; - } - - public string Name { - get { return _name; } - set { _name = value; } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/FunctionAttribute.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/FunctionAttribute.cs deleted file mode 100644 index 506cab8a400..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/FunctionAttribute.cs +++ /dev/null @@ -1,60 +0,0 @@ -namespace SysGen.BuildEngine.Attributes -{ - using System; - using System.Reflection; - - /// - /// Indicates that the method should be exposed as a function in NAnt build - /// files. - /// - /// - /// Attach this attribute to a method of a class that derives from - /// to have NAnt be able to recognize it. - /// - [AttributeUsage(AttributeTargets.Method, Inherited=false, AllowMultiple=false)] - public sealed class FunctionAttribute : Attribute { - #region Public Instance Constructors - - /// - /// Initializes a new instance of the - /// class with the specified name. - /// - /// The name of the function. - /// is . - /// is a zero-length . - public FunctionAttribute(string name) { - if (name == null) { - throw new ArgumentNullException("name"); - } - - if (name.Trim().Length == 0) { - throw new ArgumentOutOfRangeException("name", name, "A zero-length string is not an allowed value."); - } - - _name = name; - } - - #endregion Public Instance Constructors - - #region Public Instance Properties - - /// - /// Gets or sets the name of the function. - /// - /// - /// The name of the function. - /// - public string Name { - get { return _name; } - set { _name = value; } - } - - #endregion Public Instance Properties - - #region Private Instance Fields - - private string _name; - - #endregion Private Instance Fields - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/FunctionSetAttribute.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/FunctionSetAttribute.cs deleted file mode 100644 index 0ac033f07e0..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/FunctionSetAttribute.cs +++ /dev/null @@ -1,90 +0,0 @@ -namespace SysGen.BuildEngine.Attributes -{ - using System; - using System.Reflection; - - /// - /// Indicates that class should be treated as a set of functions. - /// - /// - /// Attach this attribute to a class that derives from - /// to have NAnt be able to recognize it as containing custom functions. - /// - [AttributeUsage(AttributeTargets.Class, Inherited=false, AllowMultiple=false)] - public sealed class FunctionSetAttribute : Attribute { - #region Public Instance Constructors - - /// - /// Initializes a new instance of the - /// class with the specified name. - /// - /// The prefix used to distinguish the functions. - /// The category of the functions. - /// - /// is . - /// -or- - /// is . - /// - /// - /// is a zero-length . - /// -or- - /// is a zero-length . - /// - public FunctionSetAttribute(string prefix, string category) { - if (prefix == null) { - throw new ArgumentNullException("prefix"); - } - if (category == null) { - throw new ArgumentNullException("category"); - } - - if (prefix.Trim().Length == 0) { - throw new ArgumentOutOfRangeException("prefix", prefix, "A zero-length string is not an allowed value."); - } - if (category.Trim().Length == 0) { - throw new ArgumentOutOfRangeException("category", category, "A zero-length string is not an allowed value."); - } - - _prefix = prefix; - _category = category; - } - - #endregion Public Instance Constructors - - #region Public Instance Properties - - /// - /// Gets or sets the category of the function set. - /// - /// - /// The name of the category of the function set. - /// - /// - /// This will be displayed in the user docs. - /// - public string Category { - get { return _category; } - set { _category = value; } - } - - /// - /// Gets or sets the prefix of all functions in this function set. - /// - /// - /// The prefix of the functions in this function set. - /// - public string Prefix { - get { return _prefix; } - set { _prefix = value; } - } - - #endregion Public Instance Properties - - #region Private Instance Fields - - private string _prefix; - private string _category; - - #endregion Private Instance Fields - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/TaskAttributeAttribute.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/TaskAttributeAttribute.cs deleted file mode 100644 index 3242801bf09..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/TaskAttributeAttribute.cs +++ /dev/null @@ -1,43 +0,0 @@ -namespace SysGen.BuildEngine.Attributes -{ - using System; - using System.Reflection; - - /// Indicates that field should be treated as a xml attribute for the task. - /// - /// Examples of how to specify task attributes - /// - /// // task XmlType default is string - /// [TaskAttribute("out", Required=true)] - /// string _out = null; // assign default value here - /// - /// [TaskAttribute("optimize")] - /// [BooleanValidator()] - /// // during ExecuteTask you can safely use Convert.ToBoolean(_optimize) - /// string _optimize = Boolean.FalseString; - /// - /// [TaskAttribute("warnlevel")] - /// [Int32Validator(0,4)] // limit values to 0-4 - /// // during ExecuteTask you can safely use Convert.ToInt32(_optimize) - /// string _warnlevel = "0"; - /// - /// [FileSet("sources")] - /// FileSet _sources = new FileSet(); - /// - /// NOTE: Attribute values must be of type of string if you want - /// to be able to have macros. The field stores the exact value during - /// InitializeTask. Just before ExecuteTask is called NAnt will expand - /// all the macros with the current values. - /// - [AttributeUsage( AttributeTargets.Property, Inherited=true)] - public class TaskAttributeAttribute : TaskPropertyAttribute { - - public TaskAttributeAttribute(string name) : base(name){ - } - - public override TaskPropertyLocation Location - { - get { return TaskPropertyLocation.Attribute; } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/TaskFileSetAttribute.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/TaskFileSetAttribute.cs deleted file mode 100644 index fd9ad0cad05..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/TaskFileSetAttribute.cs +++ /dev/null @@ -1,33 +0,0 @@ -// NAnt - A .NET build tool -// Copyright (C) 2001 Gerry Shaw -// -// 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// Gerry Shaw (gerry_shaw@yahoo.com) -// Ian MacLean ( ian@maclean.ms ) - -namespace SysGen.BuildEngine.Attributes { - - using System; - using System.Reflection; - - /// Indicates that field should be treated as a xml file set for the task. - [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited=true)] - public class FileSetAttribute : BuildElementAttribute { - - public FileSetAttribute(string name) : base(name) { - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/TaskNameAttribute.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/TaskNameAttribute.cs deleted file mode 100644 index d46357f6892..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/TaskNameAttribute.cs +++ /dev/null @@ -1,46 +0,0 @@ -namespace SysGen.BuildEngine.Attributes -{ - using System; - using System.Reflection; - - /// Indicates that class should be treated as a task. - /// - /// Attach this attribute to a subclass of Task to have NAnt be able - /// to recognize it. The name should be short but must not confict - /// with any other task already in use. - /// - [AttributeUsage(AttributeTargets.Class, Inherited=false, AllowMultiple=false)] - public class TaskNameAttribute : Attribute - { - private string m_Namespace = null; - private string m_Name = null; - - public TaskNameAttribute(string name) - { - m_Name = name; - } - - public string Name - { - get { return m_Name; } - set { m_Name = value; } - } - - public string Namespace - { - get { return m_Namespace; } - set { m_Namespace = value; } - } - - public string FullTaskName - { - get - { - if (Namespace != null) - return string.Format("{0}:{1}", Namespace, Name); - - return Name; - } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/TaskOptionSetAttribute.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/TaskOptionSetAttribute.cs deleted file mode 100644 index c62c48f3312..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/TaskOptionSetAttribute.cs +++ /dev/null @@ -1,32 +0,0 @@ -// NAnt - A .NET build tool -// Copyright (C) 2001 Gerry Shaw -// -// 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// Tomas Restrepo (tomasr@mvps.org) - -namespace SysGen.BuildEngine.Attributes { - - using System; - using System.Reflection; - - /// Indicates that field should be treated as a xml option set for the task. - [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited=true)] - public class OptionSetAttribute : BuildElementAttribute { - - public OptionSetAttribute(string name) : base(name) { - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/TaskPropertyAttribute.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/TaskPropertyAttribute.cs deleted file mode 100644 index 6ee83ec2058..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/TaskPropertyAttribute.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using System.Reflection; - -namespace SysGen.BuildEngine.Attributes -{ - public enum TaskPropertyLocation - { - Attribute, - Node - } - - /// Indicates that field should be treated as a xml attribute for the task. - /// - /// Examples of how to specify task attributes - /// - /// // task XmlType default is string - /// [BuildAttribute("out", Required=true)] - /// string _out = null; // assign default value here - /// - /// [BuildAttribute("optimize")] - /// [BooleanValidator()] - /// // during ExecuteTask you can safely use Convert.ToBoolean(_optimize) - /// string _optimize = Boolean.FalseString; - /// - /// [BuildAttribute("warnlevel")] - /// [Int32Validator(0,4)] // limit values to 0-4 - /// // during ExecuteTask you can safely use Convert.ToInt32(_optimize) - /// string _warnlevel = "0"; - /// - /// [FileSet("sources")] - /// FileSet _sources = new FileSet(); - /// - /// NOTE: Attribute values must be of type of string if you want - /// to be able to have macros. The field stores the exact value during - /// InitializeTask. Just before ExecuteTask is called NAnt will expand - /// all the macros with the current values. - /// - [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field , Inherited=true)] - public abstract class TaskPropertyAttribute : Attribute - { - string _name; - bool _required = false; - bool _expandProperties = true; - - public TaskPropertyAttribute(string name) { - _name = name; - } - - public string Name { - get { return _name; } - set { _name = value; } - } - - public bool Required { - get { return _required; } - set { _required = value; } - } - - public bool ExpandProperties { - get { return _expandProperties; } - set { _expandProperties = value; } - } - - public abstract TaskPropertyLocation Location { get; } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/TaskValueAttribute.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/TaskValueAttribute.cs deleted file mode 100644 index 9a00b764e17..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/TaskValueAttribute.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Reflection; - -namespace SysGen.BuildEngine.Attributes -{ - [AttributeUsage(AttributeTargets.Property, Inherited = true)] - public class TaskValueAttribute : TaskPropertyAttribute - { - public TaskValueAttribute() - : base(null) - { - } - - public override TaskPropertyLocation Location - { - get { return TaskPropertyLocation.Node; } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/Validators/Base/ValidatorAttribute.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/Validators/Base/ValidatorAttribute.cs deleted file mode 100644 index 21592caa508..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/Validators/Base/ValidatorAttribute.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace SysGen.BuildEngine.Attributes -{ - using System; - using System.Reflection; - - public abstract class ValidatorAttribute : Attribute - { - /// - /// Validates the object. - /// - /// The object to be validated - /// Throws a ValidationException when validation fails. - /// Returns an indication of the result. - public abstract bool Validate(object value); - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/Validators/BooleanValidatorAttribute.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/Validators/BooleanValidatorAttribute.cs deleted file mode 100644 index a77c4044db3..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/Validators/BooleanValidatorAttribute.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace SysGen.BuildEngine.Attributes -{ - using System; - using System.Reflection; - - /// - /// Indicates that field should be able to be converted into a Boolean. - /// - [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property , Inherited=true)] - public class BooleanValidatorAttribute : ValidatorAttribute - { - public BooleanValidatorAttribute() - { - } - - public override bool Validate(object value) - { - return SysGenConversion.ToBolean(value); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/Validators/Int32ValidatorAttribute.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/Validators/Int32ValidatorAttribute.cs deleted file mode 100644 index 0336016ff3d..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/Validators/Int32ValidatorAttribute.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.Reflection; - -namespace SysGen.BuildEngine.Attributes -{ - /// - /// Indicates that field should be able to be converted into a Int32 within the given range. - /// - [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = true)] - public class Int32ValidatorAttribute : ValidatorAttribute - { - int _minValue = Int32.MinValue; - int _maxValue = Int32.MaxValue; - - public Int32ValidatorAttribute() - { - } - - public Int32ValidatorAttribute(int minValue, int maxValue) - { - MinValue = minValue; - MaxValue = maxValue; - } - - public int MinValue - { - get { return _minValue; } - set { _minValue = value; } - } - - public int MaxValue - { - get { return _maxValue; } - set { _maxValue = value; } - } - - public override bool Validate(object value) - { - try - { - Int32 intValue = Convert.ToInt32(value); - if (intValue < MinValue || intValue > MaxValue) - { - throw new ValidationException(String.Format("Cannot resolve '{0}' to integer between '{1}' and '{2}'.", value.ToString(), MinValue, MaxValue)); - } - } - catch (Exception) - { - throw new ValidationException(String.Format("Cannot resolve '{0}' to integer value.", value.ToString())); - } - return true; - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/Validators/StringValidatorAttribute.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/Validators/StringValidatorAttribute.cs deleted file mode 100644 index be617dee875..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/Validators/StringValidatorAttribute.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Reflection; - -namespace SysGen.BuildEngine.Attributes -{ - [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = true)] - public class StringValidatorAttribute : ValidatorAttribute - { - private bool m_AllowEmpty = true; - private bool m_AllowSpaces = true; - - public override bool Validate(object value) - { - if (!AllowSpaces && string.Equals(value, " ")) - throw new ValidationException("No spaces allowed"); - - if (!AllowEmpty && value.ToString().Length == 0) - throw new ValidationException("No empty string allowed"); - - return true; - } - - public bool AllowEmpty - { - get { return m_AllowEmpty; } - set { m_AllowEmpty = value; } - } - - public bool AllowSpaces - { - get { return m_AllowSpaces; } - set { m_AllowSpaces = value; } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/Validators/UriValidatorAttribute.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/Validators/UriValidatorAttribute.cs deleted file mode 100644 index 54da6e52690..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Attributes/Validators/UriValidatorAttribute.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Reflection; - -namespace SysGen.BuildEngine.Attributes -{ - /// - /// Indicates that field should be able to be converted into a Uri. - /// - [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = true)] - public class UriValidatorAttribute : ValidatorAttribute - { - public override bool Validate(object value) - { - try - { - Uri uriValue = new Uri(value.ToString(), UriKind.Relative); - } - catch (Exception) - { - throw new ValidationException(String.Format("Cannot resolve '{0}' to Uri.", value.ToString())); - } - - return true; - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/APIDocumentation/APIDocumentation.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/APIDocumentation/APIDocumentation.cs deleted file mode 100644 index 330f3d65ef6..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/APIDocumentation/APIDocumentation.cs +++ /dev/null @@ -1,395 +0,0 @@ -using System; -using System.Text.RegularExpressions; -using System.Web.UI; -using System.IO; -using System.Collections.Generic; -using System.Text; -using System.Xml; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine; -using SysGen.BuildEngine.Tasks; -using SysGen.BuildEngine.Backends; - -namespace SysGen.BuildEngine.Backends -{ - public class APIDocumentation : HtmlDocumenterBaseBacked - { - public APIDocumentation(SysGenEngine sysgen) - : base(sysgen) - { - if (Directory.Exists(@"C:\rosLib")) - Directory.Delete(@"C:\rosLib", true); - - Directory.CreateDirectory(@"C:\rosLib"); - - File.Copy(@"c:\style.css", @"c:\rosLib\style.css"); - } - - protected override string FriendlyName - { - get { return "APIDocumentation Report"; } - } - - private void WriteModuleFunctions() - { - foreach (RBuildModule module in Project.Modules) - { - if (module.IsDLL || module.IsLibrary) - { - foreach (RBuildAPIInfo apiInfo in module.ApiInfo) - { - using (StreamWriter sw = new StreamWriter(@"C:\roslib\" + apiInfo.HtmlDocFileName)) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - WriteDocumentStart(writer, "Module"); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("{0} Function", apiInfo.Name); - writer.RenderEndTag(); - - if (apiInfo.Implemented) - { - writer.RenderBeginTag(HtmlTextWriterTag.P); - writer.Write("Function '{0}' on '{1}' is currently implemented.", - apiInfo.Name, - apiInfo.File); - writer.RenderEndTag(); - } - else - { - writer.RenderBeginTag(HtmlTextWriterTag.P); - writer.Write("Function '{0}' on '{1}' is currently un-implemented.", - apiInfo.Name, - apiInfo.File); - writer.RenderEndTag(); - } - } - } - } - } - } - } - - private void WriteModules() - { - foreach (RBuildModule module in Project.Modules) - { - if (module.IsDLL || module.IsLibrary) - { - using (StreamWriter sw = new StreamWriter(@"C:\roslib\" + module.HtmlDocFileName)) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - WriteDocumentStart(writer, "Module"); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("{0}", module.Name); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.P); - writer.Write("Module {0} has a total of {1} functions , {2} implemented and {3} un-implemented ({4}%)", - module.Name, - module.ApiInfo.TotalFunctions, - module.ApiInfo.ImplementedFunctionsCount, - module.ApiInfo.UnImplementedFunctionsCount, - module.ApiInfo.Percentage); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("{0} Functions", module.Name); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.Ul); - foreach (RBuildAPIInfo apiInfo in module.ApiInfo) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute("href", apiInfo.HtmlDocFileName); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(apiInfo.Name); - writer.RenderEndTag(); - - if (!apiInfo.Implemented) - { - writer.RenderBeginTag(HtmlTextWriterTag.B); - writer.Write("(UnImplemented)"); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - } - writer.RenderEndTag(); - - WriteDocumentEnd(writer); - } - } - } - } - } - - private void WriteWelcome() - { - using (StreamWriter sw = new StreamWriter(@"C:\roslib\welcome.htm")) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - WriteDocumentStart(writer, "Warnings"); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("ReactOS API Documentation"); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.P); - writer.Write("Welcome to the ReactOS API documentation website."); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.H1); - writer.Write("Implementation status Color Key"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Cellpadding, "5"); - writer.AddAttribute(HtmlTextWriterAttribute.Cellspacing, "0"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - for (int i = 0; i <= 100; i = i + 5) - { - writer.AddAttribute(HtmlTextWriterAttribute.Class, "pct" + i); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write("{0}%" , i); - writer.RenderEndTag(); - } - writer.RenderEndTag(); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("Native DLLs"); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.Ul); - foreach (RBuildModule module in Project.Modules) - { - if (module.Type == ModuleType.NativeDLL) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute("href", module.HtmlDocFileName); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(module.Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - } - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("Win32 DLLs"); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.Ul); - foreach (RBuildModule module in Project.Modules) - { - if (module.Type == ModuleType.Win32DLL) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute("href", module.HtmlDocFileName); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(module.Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - } - writer.RenderEndTag(); - - WriteDocumentEnd(writer); - } - } - } - - private void WriteHeader() - { - using (StreamWriter sw = new StreamWriter(@"C:\roslib\header.htm")) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - writer.WriteLine("

ReactOS API Documentation

"); - } - } - } - - private void WriteFrameSet() - { - using (StreamWriter sw = new StreamWriter(@"C:\roslib\default.htm")) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - writer.WriteLine(""); - writer.WriteLine(""); - writer.WriteLine(""); - writer.WriteLine(""); - writer.WriteLine(""); - writer.WriteLine(""); - writer.WriteLine(""); - } - } - } - - private void ReadApiStatusFile() - { - XmlDocument doc = new XmlDocument(); - - //Load the file in to memory - doc.Load(@"C:\Ros\clean\reactos\apistatus.xml"); - - foreach (XmlNode comp in doc.SelectNodes("/components/component")) - { - // Get the component name.... - string modulename = comp.Attributes["name"].InnerText; - - RBuildModule module = Project.Modules.GetByName(modulename); - - if (module != null) - { - foreach (XmlNode dep in comp.SelectNodes("functions/f")) - { - // Gets the dependency name - string name = dep.Attributes["n"].InnerText; - string file = dep.Attributes["f"].InnerText; - bool imp = Boolean.Parse(dep.Attributes["i"].InnerText); - - RBuildAPIInfo apiInfo = new RBuildAPIInfo(); - - apiInfo.Name = name; - apiInfo.File = file; - apiInfo.Implemented = imp; - - module.ApiInfo.Add(apiInfo); - } - } - } - } - - protected override void Generate() - { - ReadApiStatusFile(); - WriteFrameSet(); - WriteHeader(); - WriteWelcome(); - WriteModules(); - WriteModuleFunctions(); - - using (StreamWriter sw = new StreamWriter(@"C:\roslib\tree.htm")) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - WriteDocumentStart(writer, "Warnings"); - - writer.AddAttribute(HtmlTextWriterAttribute.Cellpadding, "2"); - writer.AddAttribute(HtmlTextWriterAttribute.Cellspacing, "2"); - writer.AddAttribute(HtmlTextWriterAttribute.Border, "0"); - //writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - foreach (RBuildModule module in Project.Modules) - { - if ((module.IsDLL) || (module.IsLibrary)) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - - if ((module.ApiInfo.Percentage >= 0) && (module.ApiInfo.Percentage <= 5)) - writer.AddAttribute(HtmlTextWriterAttribute.Class, "pct0"); - if ((module.ApiInfo.Percentage >= 5) && (module.ApiInfo.Percentage <= 10)) - writer.AddAttribute(HtmlTextWriterAttribute.Class, "pct5"); - if ((module.ApiInfo.Percentage >= 10) && (module.ApiInfo.Percentage <= 15)) - writer.AddAttribute(HtmlTextWriterAttribute.Class, "pct10"); - if ((module.ApiInfo.Percentage >= 15) && (module.ApiInfo.Percentage <= 20)) - writer.AddAttribute(HtmlTextWriterAttribute.Class, "pct15"); - if ((module.ApiInfo.Percentage >= 20) && (module.ApiInfo.Percentage <= 25)) - writer.AddAttribute(HtmlTextWriterAttribute.Class, "pct20"); - if ((module.ApiInfo.Percentage >= 25) && (module.ApiInfo.Percentage <= 30)) - writer.AddAttribute(HtmlTextWriterAttribute.Class, "pct25"); - if ((module.ApiInfo.Percentage >= 30) && (module.ApiInfo.Percentage <= 35)) - writer.AddAttribute(HtmlTextWriterAttribute.Class, "pct30"); - if ((module.ApiInfo.Percentage >= 35) && (module.ApiInfo.Percentage <= 40)) - writer.AddAttribute(HtmlTextWriterAttribute.Class, "pct35"); - if ((module.ApiInfo.Percentage >= 40) && (module.ApiInfo.Percentage <= 45)) - writer.AddAttribute(HtmlTextWriterAttribute.Class, "pct40"); - if ((module.ApiInfo.Percentage >= 45) && (module.ApiInfo.Percentage <= 50)) - writer.AddAttribute(HtmlTextWriterAttribute.Class, "pct45"); - if ((module.ApiInfo.Percentage >= 50) && (module.ApiInfo.Percentage <= 55)) - writer.AddAttribute(HtmlTextWriterAttribute.Class, "pct50"); - if ((module.ApiInfo.Percentage >= 55) && (module.ApiInfo.Percentage <= 60)) - writer.AddAttribute(HtmlTextWriterAttribute.Class, "pct55"); - if ((module.ApiInfo.Percentage >= 60) && (module.ApiInfo.Percentage <= 65)) - writer.AddAttribute(HtmlTextWriterAttribute.Class, "pct60"); - if ((module.ApiInfo.Percentage >= 65) && (module.ApiInfo.Percentage <= 70)) - writer.AddAttribute(HtmlTextWriterAttribute.Class, "pct65"); - if ((module.ApiInfo.Percentage >= 70) && (module.ApiInfo.Percentage <= 75)) - writer.AddAttribute(HtmlTextWriterAttribute.Class, "pct70"); - if ((module.ApiInfo.Percentage >= 75) && (module.ApiInfo.Percentage <= 80)) - writer.AddAttribute(HtmlTextWriterAttribute.Class, "pct75"); - if ((module.ApiInfo.Percentage >= 80) && (module.ApiInfo.Percentage <= 85)) - writer.AddAttribute(HtmlTextWriterAttribute.Class, "pct80"); - if ((module.ApiInfo.Percentage >= 85) && (module.ApiInfo.Percentage <= 90)) - writer.AddAttribute(HtmlTextWriterAttribute.Class, "pct85"); - if ((module.ApiInfo.Percentage >= 90) && (module.ApiInfo.Percentage <= 95)) - writer.AddAttribute(HtmlTextWriterAttribute.Class, "pct90"); - if ((module.ApiInfo.Percentage >= 95) && (module.ApiInfo.Percentage <= 100)) - writer.AddAttribute(HtmlTextWriterAttribute.Class, "pct100"); - - writer.RenderBeginTag(HtmlTextWriterTag.Td); - - if (module.ApiInfo.Count > 0) - { - writer.AddAttribute("href", module.HtmlDocFileName); - writer.AddAttribute("target", "content"); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(module.Name); - writer.RenderEndTag(); - - writer.Write(" (I:{0} U:{1} P:{2}%)", - module.ApiInfo.ImplementedFunctionsCount, - module.ApiInfo.UnImplementedFunctionsCount, - module.ApiInfo.Percentage); - } - else - { - writer.Write(module.Name); - } - - writer.RenderBeginTag(HtmlTextWriterTag.Ul); - if (module.ApiInfo.Count > 0) - { - foreach (RBuildAPIInfo apiInfo in module.ApiInfo) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute("href", apiInfo.HtmlDocFileName); - writer.AddAttribute("target", "content"); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(apiInfo.Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - } - else - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.Write("No documentation available yet"); - writer.RenderEndTag(); - } - writer.RenderEndTag(); - - - writer.RenderEndTag(); - writer.RenderEndTag(); - } - } - - writer.RenderEndTag(); - - WriteDocumentEnd(writer); - } - } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Base/Backend.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Base/Backend.cs deleted file mode 100644 index 5811c6fc253..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Base/Backend.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; -using System.Reflection; -using System.Diagnostics; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine; -using SysGen.BuildEngine.Log; - -namespace SysGen.BuildEngine.Backends -{ - public abstract class Backend - { - private SysGenEngine m_SysGenEngine = null; - - public Backend(SysGenEngine sysgen) - { - m_SysGenEngine = sysgen; - } - - public SysGenEngine SysGen - { - get { return m_SysGenEngine; } - } - - public RBuildProject Project - { - get { return m_SysGenEngine.Project; } - } - - public string AppInfo - { - get { return string.Format("{0} {1}", AppName, AppVersion); } - } - - public string AppName - { - get { return "SysGen"; } - } - - public string AppVersion - { - get - { - FileVersionInfo info = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location); - - return string.Format("{0}.{1}.{2}", - info.FileMajorPart, - info.FileMinorPart, - info.FileBuildPart); - } - } - - protected abstract string FriendlyName { get;} - //protected abstract string Name { get;} - - public void Run() - { - BuildLog.WriteLine(); - BuildLog.Write("[Backend] {0} running ...", FriendlyName); - - try - { - //Run current Backend - Generate(); - - //Report OK - BuildLog.Write("{0,30}", "[OK]"); - } - catch (Exception e) - { - //Report OK - BuildLog.Write("{0,30}", "[FAIL]"); - throw; - } - } - - protected abstract void Generate(); - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Base/CompilerBaseBacked.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Base/CompilerBaseBacked.cs deleted file mode 100644 index 9c1d05417e9..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Base/CompilerBaseBacked.cs +++ /dev/null @@ -1,160 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -using SysGen.BuildEngine.Framework; -using SysGen.RBuild.Framework; -using SysGen.BuildEngine; - -namespace SysGen.BuildEngine.Backends -{ - public abstract class CompilerBaseBacked : Backend - { - public CompilerBaseBacked(SysGenEngine sysgen) - : base(sysgen) - { - //Initialize(); - } - - protected override void Generate() - { - CheckCompiler(); - GenerateRosCfg(); - GenerateFolders(); - //GenerateBuildNumber(); - //GenerateCompilationUnits(); - GenerateTxtSetupCustomHive(); - GenerateSysSetup(); - GenerateTxtSetup(); - GenerateDffSetup(); - } - - protected virtual void GenerateCompilationUnits() - { - foreach (RBuildModule module in SysGen.Project.Modules) - { - foreach (RBuildCompilationUnitFile unit in module.CompilationUnits) - { - using (CompilationUnitFileWriter writer = new CompilationUnitFileWriter(module , unit , SysGen.ResolveRBuildFilePath(unit))) - { - writer.WriteFile(); - } - } - } - } - - protected virtual void GenerateRosCfg() - { - Directory.CreateDirectory (Project.Path + "\\obj-i386\\include\\reactos"); - - using (HeaderRosCfgFileWriter writer = new HeaderRosCfgFileWriter(SysGen.Project, Project.Path + "\\obj-i386\\include\\reactos\\roscfg.h")) - { - writer.WriteFile(); - } - } - - protected virtual void GenerateDffSetup() - { - using (DffFileWriter writer = new DffFileWriter(Project, Project.Path + "\\obj-i386\\reactos.dff")) - { - writer.WriteFile(); - } - } - - protected virtual void GenerateBuildNumber() - { - using (DffFileWriter writer = new DffFileWriter(SysGen.Project, "c:\\buildno.h")) - { - writer.WriteFile(); - } - } - - protected virtual void GenerateTxtSetup() - { - using (TxtSetupFileWriter writer = new TxtSetupFileWriter(SysGen.Project, "c:\\txtsetup.sif")) - { - writer.WriteFile(); - } - } - - protected virtual void GenerateTxtSetupCustomHive() - { - //using (DesktopComponentSetupFileWriter writer = new DesktopComponentSetupFileWriter(SysGen.Project, Project.Path + "\\output-i386\\wallpaper.inf")) - //{ - // writer.WriteFile(); - - // RBuildSetup s = new RBuildSetup(); - - // s.InstallBase = "inf"; - // s.Name = "wallpaper.inf"; - // s.Root = PathRoot.Output; - - // Project.Files.Add(s); - //} - - //using (ShellComponentSetupFileWriter writer = new ShellComponentSetupFileWriter(SysGen.Project, Project.Path + "\\output-i386\\shell.inf")) - //{ - // writer.WriteFile(); - - // RBuildSetup s1 = new RBuildSetup(); - - // s1.InstallBase = "inf"; - // s1.Name = "shell.inf"; - // s1.Root = PathRoot.Output; - - // Project.Files.Add(s1); - //} - - using (TxtSetupHiveFileWriter writer = new TxtSetupHiveFileWriter(SysGen.Project, Project.Path + "\\output-i386\\hivecst.inf")) - { - writer.WriteFile(); - } - - RBuildBootstrapFile bs = new RBuildBootstrapFile(); - - bs.InstallBase = "reactos"; - bs.Name = "hivecst.inf"; - bs.Root = PathRoot.Output; - - Project.Files.Add(bs); - } - - protected virtual void GenerateSysSetup() - { - Directory.CreateDirectory(Project.Path + "\\output-i386\\media\\inf"); - - using (SysSetupFileWriter writer = new SysSetupFileWriter(SysGen.Project, Project.Path + "\\output-i386\\media\\inf\\syssetup.inf")) - { - writer.WriteFile(); - } - } - - private void GenerateFolders() - { - //foreach (RBuildModule module in Project.Modules) - //{ - // foreach (RBuildFolder folder in module.Folders) - // { - // if (folders.Contains(folder) == false) - // folders.Add(folder); - // } - //} - - //foreach (RBuildFolder folder in Project.Folders) - //{ - // if (folders.Contains(folder) == false) - // folders.Add(folder); - //} - - //foreach (RBuildFolder folder in folders) - //{ - // GenerateFolder(makefile, folder); - //} - } - - protected virtual void CheckCompiler() - { - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Base/HtmlDocumenterBaseBacked.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Base/HtmlDocumenterBaseBacked.cs deleted file mode 100644 index aac5117de0d..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Base/HtmlDocumenterBaseBacked.cs +++ /dev/null @@ -1,97 +0,0 @@ -using System; -using System.Web.UI; -using System.IO; -using System.Collections.Generic; -using System.Text; - -using SysGen.BuildEngine; -using SysGen.BuildEngine.Framework; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Backends -{ - public abstract class HtmlDocumenterBaseBacked : Backend - { - public HtmlDocumenterBaseBacked(SysGenEngine sysgen) - : base(sysgen) - { - } - - public string ReportFileExtension - { - get { return "htm"; } - } - - protected string GetHtmlFileName(IRBuildNamed namedObject) - { - return string.Format("{0}.{1}", - namedObject.Name, - ReportFileExtension); - } - - protected void WriteDocumentStart(HtmlTextWriter writer, string title) - { - writer.RenderBeginTag(HtmlTextWriterTag.Html);// - writer.RenderBeginTag(HtmlTextWriterTag.Head);// - writer.RenderBeginTag(HtmlTextWriterTag.Title); // - writer.Write(title); - writer.RenderEndTag(); // - writer.AddAttribute(HtmlTextWriterAttribute.Rel, "stylesheet"); - writer.AddAttribute(HtmlTextWriterAttribute.Type, "text/css"); - writer.AddAttribute(HtmlTextWriterAttribute.Href, "style.css"); - writer.RenderBeginTag(HtmlTextWriterTag.Link); - writer.RenderEndTag(); - - writer.RenderEndTag(); // - writer.RenderBeginTag(HtmlTextWriterTag.Body);// - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "header"); - writer.RenderBeginTag(HtmlTextWriterTag.Div); - writer.AddAttribute(HtmlTextWriterAttribute.Href, "default.htm"); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write("ReactOS RBuild Documentation"); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.P); - - if (!Project.Properties["ARCH"].IsEmpty) - { - if (!Project.Properties["SARCH"].IsEmpty) - { - writer.Write("RBuild Documentation for the '{0}' architecture, sub-architecture '{1}'. Project used '{2}'", - Project.Properties["ARCH"].Value, - Project.Properties["SARCH"].Value, - Project.RBuildFile); - } - else - { - writer.Write("RBuild Documentation for the '{0}' architecture. Project used '{1}'", - Project.Properties["ARCH"].Value, - Project.RBuildFile); - } - } - - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - protected void WriteDocumentEnd(HtmlTextWriter writer) - { - writer.WriteBreak(); - writer.AddAttribute(HtmlTextWriterAttribute.Class, "footer"); - writer.RenderBeginTag(HtmlTextWriterTag.Div); - WriteDocumentLastUpdate(writer); - writer.RenderEndTag(); - - writer.RenderEndTag(); // - writer.RenderEndTag(); // - } - - protected void WriteDocumentLastUpdate(HtmlTextWriter writer) - { - //writer.RenderBeginTag(HtmlTextWriterTag.P); - writer.Write("Document last updated on {0}", DateTime.Now); - //writer.RenderEndTag(); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/BaseAddress/BaseAddressReportBackend.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/BaseAddress/BaseAddressReportBackend.cs deleted file mode 100644 index df0cf9ebc2d..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/BaseAddress/BaseAddressReportBackend.cs +++ /dev/null @@ -1,127 +0,0 @@ -using System; -using System.Globalization; -using System.Text.RegularExpressions; -using System.Web.UI; -using System.IO; -using System.Collections.Generic; -using System.Text; -using System.Xml; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine; -using SysGen.BuildEngine.Tasks; -using SysGen.BuildEngine.Backends; - -namespace SysGen.BuildEngine.Backends -{ - public class BaseAddressReportBackend : Backend - { - private List m_Modules = new List (); - - public class BaseAddressModule - { - private FileInfo m_FileInfo = null; - private RBuildModule m_Module = null; - - public BaseAddressModule(RBuildModule module , string file) - { - m_Module = module; - m_FileInfo = new FileInfo(file); - } - - public string Name - { - get { return m_Module.Name; } - } - - public string BaseAddress - { - get { return m_Module.BaseAddress; } - } - - public long Size - { - get { return m_FileInfo.Length; } - } - - public string HexBaseAddressStart - { - get { return m_Module.BaseAddress.Replace("0x", string.Empty); } - } - - public long BaseAddressStart - { - get { return Int64.Parse(HexBaseAddressStart, NumberStyles.AllowHexSpecifier); } - } - - public long BaseAddressEnd - { - get { return m_FileInfo.Length + BaseAddressStart; } - } - } - - public BaseAddressReportBackend(SysGenEngine sysgen) - : base(sysgen) - { - } - - protected override string FriendlyName - { - get { return "Base Address Report"; } - } - - protected override void Generate() - { - foreach (RBuildModule module in Project.Modules) - { - if (module.Type == ModuleType.Win32DLL || - module.Type == ModuleType.Win32OCX) - { - if (module.BaseAddress != module.DefaultBaseAdress) - { - BaseAddressModule baseAddressModule = new BaseAddressModule(module , SysGen.ResolveRBuildFilePath (module.TargetFile)); - - Console.WriteLine(baseAddressModule.Name); - - Console.WriteLine(" {0} {1}", - baseAddressModule.BaseAddressStart, - baseAddressModule.BaseAddressEnd); - - m_Modules.Add (baseAddressModule); - } - } - - - } - - using (StreamWriter sw = new StreamWriter(Directory.GetCurrentDirectory() + "\\overlapping.txt")) - { - foreach (BaseAddressModule module in m_Modules) - { - foreach (BaseAddressModule testModule in m_Modules) - { - if (module.Name != testModule.Name) - { - if ((testModule.BaseAddressStart >= module.BaseAddressStart && testModule.BaseAddressStart <= module.BaseAddressEnd) || - (testModule.BaseAddressEnd >= module.BaseAddressStart && testModule.BaseAddressEnd <= module.BaseAddressEnd) || - (testModule.BaseAddressStart <= module.BaseAddressStart && testModule.BaseAddressEnd >= module.BaseAddressEnd)) - { - sw.WriteLine("- Module '{0}' [size '{1} and base address '{2}' [start:{3} end:{4}] is provably being overlapped by module '{5}' [size '{6} and base address '{7}' [start:{3} end:{8}]", - module.Name, - module.Size, - module.BaseAddress, - module.BaseAddressStart, - module.BaseAddressEnd, - testModule.Name, - testModule.Size, - testModule.BaseAddress, - testModule.BaseAddressStart, - testModule.BaseAddressEnd); - } - } - } - } - } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/BuildLogReport/BuildLogReport.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/BuildLogReport/BuildLogReport.cs deleted file mode 100644 index af1fb660479..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/BuildLogReport/BuildLogReport.cs +++ /dev/null @@ -1,109 +0,0 @@ -using System; -using System.Text.RegularExpressions; -using System.Web.UI; -using System.IO; -using System.Collections.Generic; -using System.Text; -using System.Xml; - -using SysGen.BuildEngine.Backends; -using SysGen.RBuild.Framework; -using SysGen.BuildEngine; - -namespace SysGen.BuildEngine.Backends -{ - public class BuildLogReportEntry - { - public string File; - public string Message; - public string Position; - public string Type; - } - - public class BuildLogReport : Backend - { - private List m_Errors = new List(); - - public BuildLogReport(SysGenEngine sysgen) - : base(sysgen) - { - } - - protected override string FriendlyName - { - get { return "Build Log analizer"; } - } - - private List Errors - { - get { return m_Errors; } - } - - protected override void Generate() - { - using (StreamReader sr = new StreamReader(@"C:\Ros\Trunk\reactos\RosBE-Logs\BuildLog-4.1.3-20070210-0630.txt")) - { - Regex regex = new Regex(@"(.*?):(.*?): (.*?): (.*?)$", - RegexOptions.IgnoreCase | - RegexOptions.Multiline | - RegexOptions.Compiled); - - MatchCollection matches = regex.Matches(sr.ReadToEnd()); - foreach (Match match in matches) - { - BuildLogReportEntry error = new BuildLogReportEntry(); - - error.File = match.Groups[1].ToString(); - error.Position = match.Groups[2].ToString(); - error.Type = match.Groups[3].ToString(); - error.Message = match.Groups[4].ToString(); - - Errors.Add(error); - } - } - - using (StreamWriter sw = new StreamWriter(@"C:\rosbuildwarnings.htm")) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - writer.WriteLine("{0} Warnings" , Errors.Count); - - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("File"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Line/Column"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Type"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Error"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - foreach (BuildLogReportEntry report in m_Errors) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(report.File); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(report.Position); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(report.Type); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(report.Message); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - } - } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Catalog/CatalogBackend.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Catalog/CatalogBackend.cs deleted file mode 100644 index 9e2a499d2b0..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Catalog/CatalogBackend.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; -using System.Xml; - -using SysGen.BuildEngine.Backends; -using SysGen.RBuild.Framework; -using SysGen.BuildEngine; - -namespace SysGen.BuildEngine.Backends -{ - public class CatalogBackend : Backend - { - public CatalogBackend(SysGenEngine sysgen) - : base(sysgen) - { - } - - protected override string FriendlyName - { - get { return "Component catalog"; } - } - - private string CatalogFile - { - get { return Path.Combine(SysGen.BaseDirectory, "catalog.xml"); } - } - - protected override void Generate() - { - // Creates an XML file is not exist - using (XmlTextWriter writer = new XmlTextWriter(CatalogFile, Encoding.ASCII)) - { - writer.Indentation = 4; - writer.Formatting = Formatting.Indented; - - // Starts a new document - writer.WriteStartDocument(); - writer.WriteComment("File autogenerated by " + AppInfo); - writer.WriteStartElement("modules"); - - foreach (RBuildModule module in Project.Modules) - { - writer.WriteStartElement("module"); - writer.WriteAttributeString("name", module.Name); - writer.WriteAttributeString("type", module.Type.ToString()); - writer.WriteAttributeString("base", module.Base); - writer.WriteAttributeString("path", module.Path); - writer.WriteAttributeString("desc", module.Description); - - writer.WriteStartElement("dependencies"); - foreach (RBuildModule library in module.Libraries) - { - writer.WriteStartElement("dependency"); - writer.WriteAttributeString("name", library.Name); - writer.WriteEndElement(); - } - writer.WriteEndElement(); - - writer.WriteEndElement(); - } - - writer.WriteEndElement(); - writer.WriteEndDocument(); - } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Html/HtmlBackend.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Html/HtmlBackend.cs deleted file mode 100644 index 02f40a102f9..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Html/HtmlBackend.cs +++ /dev/null @@ -1,2743 +0,0 @@ -using System; -using System.Web.UI; -using System.IO; -using System.Collections.Generic; -using System.Text; -using System.Xml; -using System.Drawing; - -using SysGen.BuildEngine.Backends; -using SysGen.RBuild.Framework; -using SysGen.BuildEngine; - -namespace SysGen.BuildEngine.Backends -{ - public class HtmlBackend : HtmlDocumenterBaseBacked - { - public HtmlBackend(SysGenEngine sysgen) - : base(sysgen) - { - try - { - if (Directory.Exists(@"C:\rosDoc")) - Directory.Delete(@"C:\rosDoc", true); - - Directory.CreateDirectory(@"C:\rosDoc"); - - File.Copy(@"c:\style.css", @"c:\rosDoc\style.css"); - } - catch (Exception) - { - } - } - - protected override string FriendlyName - { - get { return "HTML Report"; } - } - - private void GenerateFrontPage() - { - using (StreamWriter sw = new StreamWriter(@"C:\rosDoc\default.htm")) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - WriteDocumentStart(writer, "RBuild Auto Documentation"); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("Modules"); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.Ul); - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, "platform.htm"); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write("Platform"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.P); - writer.Write("Quick platform overview."); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, "modules.htm"); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write("Modules"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.P); - writer.Write("ReactOS is a modular operating system, made of components that collaborate with each other."); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, "baseaddresses.htm"); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write("Base Addresses"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.P); - writer.Write("Memory address serving as a reference point for other addresses."); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, "dllbaseaddresses.htm"); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write("DLL Base Addresses"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.P); - writer.Write("Base addresses used in ReactOS dlls."); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, "properties.htm"); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write("Properties"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.P); - writer.Write("Properties used during the build process."); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, "defines.htm"); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write("Project Defines"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.P); - writer.Write("Global defines."); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, "depmap.htm"); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write("Dependency map"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.P); - writer.Write("Graphically represents interdependencies between modules."); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, "files.htm"); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write("Files"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.P); - writer.Write("Files included for current platform."); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, "installfolders.htm"); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write("Install Folders"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.P); - writer.Write("Install folders created during ReactOS setup."); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, "installfiles.htm"); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write("Install Files"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.P); - writer.Write("Install files created during ReactOS setup."); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, "authors.htm"); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write("Authors"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.P); - writer.Write("Individuals who have contributed time and energy to supporting the ReactOS Project."); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, "unicodemodules.htm"); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write("Unicode"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.P); - writer.Write("Modules supporting UNICODE builds"); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, "localizations.htm"); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write("Localizations"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.P); - writer.Write("Languages and cultures currently supported by ReactOS"); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, "codestats.htm"); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write("Stats"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.P); - writer.Write("Basic ReactOS code base statistics"); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, "warnings.htm"); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write("RBuild Warnings"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.P); - writer.Write("Warnings and inconsistencies detected by rbuild."); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, "buildsummary.htm"); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write("Build Summary"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.P); - writer.Write("Options and build settings per module."); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderEndTag(); - - WriteDocumentEnd(writer); - } - } - } - - private void GenerateDependencyMap() - { - using (StreamWriter sw = new StreamWriter(@"C:\rosDoc\depmap.htm")) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - WriteDocumentStart(writer, "Module Dependency Map"); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("Module Dependency Map"); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.B); - writer.Write("Direct Dependencies :"); - writer.RenderEndTag(); - writer.Write("Dependencies and libraries this module is using"); - - writer.RenderBeginTag(HtmlTextWriterTag.Br); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.B); - writer.Write("Full Dependencies :"); - writer.RenderEndTag(); - writer.Write("Dependencies and libraries this module and it's dependencies are using"); - - SysGenDependencyTracker dependencyTracker = null; - - foreach (RBuildModule module in Project.Platform.Modules) - { - dependencyTracker = new SysGenDependencyTracker(Project, module); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("{0}", module.Name); - writer.RenderEndTag(); - - writer.AddAttribute("name", module.Name); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.Blockquote); - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("Direct Dependencies"); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.Ul); - foreach (RBuildModule dependency in module.Needs) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, "#" + dependency.Name); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write("{0} - ({1} Dependencies , {2} Libraries , {3} Requeriments)", - dependency.Name, - dependency.Dependencies.Count, - dependency.Libraries.Count, - dependency.Requeriments.Count); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("Full Dependencies"); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.Ul); - foreach (RBuildModule dependency in dependencyTracker.DependsOn) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, "#" + dependency.Name); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write("{0} - ({1} Dependencies , {2} Libraries , {3} Requeriments)", - dependency.Name, - dependency.Dependencies.Count, - dependency.Libraries.Count, - dependency.Requeriments.Count); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - writer.RenderEndTag(); - } - } - } - } - - private void GenerateModulesBuildSummary() - { - using (StreamWriter sw = new StreamWriter(@"C:\rosDoc\buildsummary.htm")) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - WriteDocumentStart(writer, "Modules"); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("Modules"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Module"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Base"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Type"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Libraries"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Dependencies"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("CFLAGS"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("LFLAGS"); - writer.RenderEndTag(); - - writer.RenderEndTag(); - - foreach (RBuildModule module in Project.Platform.Modules) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.AddAttribute(HtmlTextWriterAttribute.Href, module.HtmlDocFileName); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(module.Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.Base); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.Type); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.RenderBeginTag(HtmlTextWriterTag.Ul); - - foreach (RBuildModule library in module.Libraries) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, library.HtmlDocFileName); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(library.Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.RenderBeginTag(HtmlTextWriterTag.Ul); - - foreach (RBuildModule dependency in module.Dependencies) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, dependency.HtmlDocFileName); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(dependency.Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.RenderBeginTag(HtmlTextWriterTag.Ul); - - foreach (string flag in module.CompilerFlags) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.Write(flag); - writer.RenderEndTag(); - } - - foreach (string flag in Project.CompilerFlags) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.Write(flag); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.RenderBeginTag(HtmlTextWriterTag.Ul); - - foreach (string flag in module.LinkerFlags) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.Write(flag); - writer.RenderEndTag(); - } - - foreach (string flag in Project.LinkerFlags) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.Write(flag); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - writer.RenderEndTag(); - - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - - WriteDocumentEnd(writer); - } - } - } - - private void GenerateModules() - { - using (StreamWriter sw = new StreamWriter(@"C:\rosDoc\modules.htm")) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - WriteDocumentStart(writer, "Modules"); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("Modules"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Module"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Base"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Type"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Unicode"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("C++"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("PCH"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Target"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Install Base"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Install Name"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("RBuild"); - writer.RenderEndTag(); - - writer.RenderEndTag(); - - foreach (RBuildModule module in Project.Platform.Modules) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.AddAttribute(HtmlTextWriterAttribute.Href, module.HtmlDocFileName); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(module.Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.Base); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.Type); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.Unicode); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.CPlusPlus); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.PCH); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.TargetName); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.InstallBase); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.InstallName); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.RBuildPath); - writer.RenderEndTag(); - - writer.RenderEndTag(); - } - writer.RenderEndTag(); - - WriteDocumentEnd(writer); - } - } - } - - private void GenerateStats() - { - using (StreamWriter sw = new StreamWriter(@"C:\rosDoc\codestats.htm")) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - WriteDocumentStart(writer, "Stats"); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("Stats"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Modules"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(Project.Modules.Count); - writer.RenderEndTag(); - writer.RenderEndTag(); - - writer.RenderEndTag(); - - WriteDocumentEnd(writer); - } - } - } - - private void GenerateWarnings() - { - using (StreamWriter sw = new StreamWriter(@"C:\rosDoc\warnings.htm")) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - WriteDocumentStart(writer, "Warnings"); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("Warnings"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Ul); - - foreach (RBuildModule module in Project.Platform.Modules) - { - if (module.Unicode == false) - { - if ((module.Defines.IsDefined("UNICODE")) || - (module.Defines.IsDefined("_UNICODE")) || - (module.Defines.IsDefined("_UNICODE_"))) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.WriteLine("Module '{0}' has unicode defines but 'Unicode' property set to 'False'", module.Name); - writer.RenderEndTag(); - } - } - - foreach (RBuildDefine define in Project.Defines) - { - if (module.Defines.IsDefined(define.Name)) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.WriteLine("Module '{0}' defines '{1}' already inherited from project ", module.Name, define.Name); - writer.RenderEndTag(); - } - } - - foreach (string flag in Project.CompilerFlags) - { - if (module.CompilerFlags.Contains(flag)) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.WriteLine("Module '{0}' has compiler flag '{1}' already inherited from project ", module.Name, flag); - writer.RenderEndTag(); - } - } - - foreach (string flag in Project.LinkerFlags) - { - if (module.LinkerFlags.Contains(flag)) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.WriteLine("Module '{0}' has linker flag '{1}' already inherited from project ", module.Name, flag); - writer.RenderEndTag(); - } - } - - foreach (RBuildFolder include in module.IncludeFolders) - { - if (Project.IncludeFolders.Contains(include)) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.WriteLine("Module '{0}' includes folder '({1}){2}' already inherited from project ", module.Name, include.Root, include.FullPath); - writer.RenderEndTag(); - } - - if (include.Root == PathRoot.Default || - include.Root == PathRoot.SourceCode) - { - if (SysGen.RBuildFolderExists(include) == false) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.WriteLine("Module '{0}' includes folder '({1}){2}' which could not be found ", module.Name, include.Root, include.FullPath); - writer.RenderEndTag(); - } - } - } - } - writer.RenderEndTag(); - - WriteDocumentEnd(writer); - } - } - } - - private void GenerateFiles() - { - using (StreamWriter sw = new StreamWriter(@"C:\rosDoc\files.htm")) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - WriteDocumentStart(writer, "Modules"); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("Files"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Base"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Path"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Root"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Install Base"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("New Name"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Type"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - foreach (RBuildOutputFile file in Project.Files) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(file.Base); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(file.FullPath); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(file.Root); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(file.InstallBase); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(file.NewFile.FullPath); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(file.GetType().Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - writer.RenderEndTag(); - - WriteDocumentEnd(writer); - } - } - } - - private void GenerateBaseAddresses() - { - using (StreamWriter sw = new StreamWriter(@"C:\rosDoc\baseaddresses.htm")) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - WriteDocumentStart(writer, "BaseAdress"); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("Base Adress"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Name"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Value"); - writer.RenderEndTag(); - - writer.RenderEndTag(); - - foreach (RBuildProperty property in SysGen.Project.Properties) - { - if (property is RBuildBaseAdress) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(property.Name); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(property.Value); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - } - - writer.RenderEndTag(); - - WriteDocumentEnd(writer); - } - } - } - - private void GenerateDllBaseAddresses() - { - using (StreamWriter sw = new StreamWriter(@"C:\rosDoc\dllbaseaddresses.htm")) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - WriteDocumentStart(writer, "Dll's base addresses"); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("Dll's base addresses"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Module"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Base"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Type"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Base Adress"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Is Default"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - foreach (RBuildModule module in Project.Platform.Modules) - { - if (module.IsDLL) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.Name); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.Base); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.Type); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.BaseAddress); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.IsDefaultBaseAdress); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - } - } - } - } - - private void GenerateDefines() - { - using (StreamWriter sw = new StreamWriter(@"C:\rosDoc\defines.htm")) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - WriteDocumentStart(writer, "Project Defines"); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("Project Defines"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Name"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Value"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - foreach (RBuildDefine define in Project.Defines) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(define.Name); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(define.Value); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - - WriteDocumentEnd(writer); - } - } - } - - private void GenerateProperties() - { - using (StreamWriter sw = new StreamWriter(@"C:\rosDoc\properties.htm")) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - WriteDocumentStart(writer, "Properties"); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("Properties"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Name"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Value"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Read-Only"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Internal"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Type"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - foreach (RBuildProperty property in SysGen.Project.Properties) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(property.Name); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(property.Value); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(property.ReadOnly); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(property.Internal); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(property.GetType().Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - - WriteDocumentEnd(writer); - } - } - } - - private void GenerateInstallFiles() - { - using (StreamWriter sw = new StreamWriter(@"C:\rosDoc\installfiles.htm")) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - WriteDocumentStart(writer, "Install Files"); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("Install Files"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("ID"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Name"); - writer.RenderEndTag(); - - writer.RenderEndTag(); - - foreach (RBuildModule module in Project.Platform.Modules) - { - if (module.Enabled) - { - if (module.IsInstallable) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.InstallBase); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.TargetFile.Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - } - - foreach (RBuildOutputFile file in module.Files) - { - RBuildPlatformFile platformFile = file as RBuildPlatformFile; - - if (platformFile != null) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(platformFile.InstallBase); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(platformFile.Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - } - } - - foreach (RBuildOutputFile file in Project.Files) - { - RBuildPlatformFile platformFile = file as RBuildPlatformFile; - - if (platformFile != null) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(platformFile.InstallBase); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(platformFile.Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - } - - writer.RenderEndTag(); - - WriteDocumentEnd(writer); - } - } - } - - private void GenerateInstallFolders() - { - using (StreamWriter sw = new StreamWriter(@"C:\rosDoc\installfolders.htm")) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - WriteDocumentStart(writer, "Folders"); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("Install Folders"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("ID"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Name"); - writer.RenderEndTag(); - - writer.RenderEndTag(); - - foreach (RBuildInstallFolder folder in Project.InstallFolders) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(folder.ID); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(folder.Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - - WriteDocumentEnd(writer); - } - } - } - - private void GenerateAuthors() - { - using (StreamWriter sw = new StreamWriter(@"C:\rosDoc\authors.htm")) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - WriteDocumentStart(writer, "Authors"); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("ReactOS Authors"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Alias"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Name"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Mail"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("City"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Country"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Active"); - writer.RenderEndTag(); - - writer.RenderEndTag(); - - foreach (RBuildContributor contributor in Project.Contributors) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - - if (contributor.Alias != null) - { - writer.AddAttribute(HtmlTextWriterAttribute.Href, contributor.HtmlDocFileName); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(contributor.Alias); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(contributor.FullName); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(contributor.Mail); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(contributor.City); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(contributor.Country); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(contributor.Active); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - - WriteDocumentEnd(writer); - } - } - } - - private void GenerateContributors() - { - foreach (RBuildContributor contributor in Project.Contributors) - { - if (contributor.Alias != null) - { - using (StreamWriter sw = new StreamWriter(@"C:\rosDoc\" + contributor.HtmlDocFileName)) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - WriteDocumentStart(writer, "Authors"); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("ReactOS Authors"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Module"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Roles"); - writer.RenderEndTag(); - - writer.RenderEndTag(); - - foreach (RBuildModule module in Project.Platform.Modules) - { - if (module.Authors.GetByName(contributor.Alias) != null) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.AddAttribute(HtmlTextWriterAttribute.Href, module.HtmlDocFileName); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(module.Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.RenderBeginTag(HtmlTextWriterTag.Ul); - foreach (RBuildAuthor author in module.Authors) - { - if (author.Contributor == contributor) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.Write(author.Role); - writer.RenderEndTag(); - } - } - writer.RenderEndTag(); - writer.RenderEndTag(); - - writer.RenderEndTag(); - - } - } - - writer.RenderEndTag(); - - WriteDocumentEnd(writer); - } - } - } - } - } - - private void GenerateLocalizations() - { - using (StreamWriter sw = new StreamWriter(@"C:\rosDoc\localizations.htm")) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - WriteDocumentStart(writer, "Translations"); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("Available Languages"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("ID"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Name"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("ThreeLetter ISO"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - foreach (RBuildLanguage language in Project.Languages) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(language.Name); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(language.Name); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(language.Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("Localization by Module"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Module"); - writer.RenderEndTag(); - - foreach (RBuildLanguage language in Project.Languages) - { - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write(language.Name); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - - foreach (RBuildModule module in Project.Platform.Modules) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.AddAttribute(HtmlTextWriterAttribute.Href, module.HtmlDocFileName); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(module.Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - - foreach (RBuildLanguage language in Project.Languages) - { - RBuildLocalizationFile localization = module.LocalizationFiles.GetByName(language.Name); - - if (localization != null) - { - if (localization.Dirty) - { - writer.AddAttribute(HtmlTextWriterAttribute.Class, "Red"); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write("Yes"); - writer.RenderEndTag(); - } - else - { - writer.AddAttribute(HtmlTextWriterAttribute.Class, "Green"); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write("Yes"); - writer.RenderEndTag(); - } - } - else - { - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write("No"); - writer.RenderEndTag(); - } - } - - writer.RenderEndTag(); - } - writer.RenderEndTag(); - - WriteDocumentEnd(writer); - } - } - } - - private void GenerateModulePages() - { - foreach (RBuildModule module in Project.Platform.Modules) - { - using (StreamWriter sw = new StreamWriter(@"C:\rosDoc\" + module.HtmlDocFileName)) - { - // Creates an XML file is not exist - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - WriteDocumentStart(writer, module.Name); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("Module : {0}", module.Name); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Base"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.Base); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Entry Point"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.EntryPoint); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("C++"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.CPlusPlus); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Base Adress"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.BaseAddress); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Unicode"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.Unicode); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Target Name"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.TargetName); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Type"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.Type.ToString()); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderEndTag(); - - if (module.Families.Count > 0) - { - writer.RenderBeginTag(HtmlTextWriterTag.H3); - writer.Write("Families this module belong"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Name"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - foreach (RBuildFamily family in module.Families) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.AddAttribute(HtmlTextWriterAttribute.Href, ""); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(family.Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - } - - if (module.Folders.Count > 0) - { - writer.RenderBeginTag(HtmlTextWriterTag.H3); - writer.Write("Folders"); - writer.RenderEndTag(); - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Root"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Base"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - foreach (RBuildFolder folder in module.Folders) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(folder.Root); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(folder.FullPath); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - } - - if (module.IsBuildable) - { - writer.RenderBeginTag(HtmlTextWriterTag.H3); - writer.Write("Output Files"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Root"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Base"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("File"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - if (module.TargetFile != null) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.TargetFile.Root); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.TargetFile.Base); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.TargetFile.Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - if (module.Install != null) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.Install.Root); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.Install.Base); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.Install.Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - if (module.PlatformInstall != null) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.PlatformInstall.Root); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.PlatformInstall.Base); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.PlatformInstall.Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - } - - if (module.Authors.Count > 0) - { - writer.RenderBeginTag(HtmlTextWriterTag.H3); - writer.Write("Authors"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Alias"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Full Name"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Mail"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Role"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - foreach (RBuildAuthor author in module.Authors) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.AddAttribute(HtmlTextWriterAttribute.Href, author.Contributor.HtmlDocFileName); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(author.Contributor.Alias); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(author.Contributor.FullName); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(author.Contributor.Mail); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(author.Role); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - } - - if (module.Metadata != null) - { - writer.RenderBeginTag(HtmlTextWriterTag.H3); - writer.Write("Metadata"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Description"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.Metadata.Description); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - if (module.AutoRegister != null) - { - writer.RenderBeginTag(HtmlTextWriterTag.H3); - writer.Write("COM Auto register"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Register Type"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.AutoRegister.Type.ToString()); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("SysSetup INF Section"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.AutoRegister.InfSection); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - if (module.ImportLibrary != null) - { - writer.RenderBeginTag(HtmlTextWriterTag.H3); - writer.Write("DLL Import"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Root"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.ImportLibrary.Root); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Base"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.ImportLibrary.Base); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Definition"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.ImportLibrary.Definition); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Import Dll Name"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.ImportLibrary.DllName); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - if (module.Bootstrap != null) - { - writer.RenderBeginTag(HtmlTextWriterTag.H3); - writer.Write("CD Bootstrap"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Install Base"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.Bootstrap.InstallBase); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Path"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.Bootstrap.FullPath); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("New name"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.Bootstrap.NewName); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - if (module.Dependencies.Count > 0) - { - writer.RenderBeginTag(HtmlTextWriterTag.H3); - writer.Write("Dependencies"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Name"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Type"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Base"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Inherited"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - foreach (RBuildModule dependency in module.Dependencies) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.AddAttribute(HtmlTextWriterAttribute.Href, dependency.HtmlDocFileName); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(dependency.Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(dependency.Type); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(dependency.Base); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(bool.FalseString); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - } - - if (module.Libraries.Count > 0) - { - writer.RenderBeginTag(HtmlTextWriterTag.H3); - writer.Write("Libraries"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Name"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Type"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Base"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Inherited"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - foreach (RBuildModule dependency in module.Libraries) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.AddAttribute(HtmlTextWriterAttribute.Href, dependency.HtmlDocFileName); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(dependency.Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(dependency.Type); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(dependency.Base); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(bool.FalseString); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - } - - if (module.Requeriments.Count > 0) - { - writer.RenderBeginTag(HtmlTextWriterTag.H3); - writer.Write("Requeriments"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Name"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Type"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Base"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Inherited"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - foreach (RBuildModule dependency in module.Requeriments) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.AddAttribute(HtmlTextWriterAttribute.Href, dependency.HtmlDocFileName); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(dependency.Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(dependency.Type); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(dependency.Base); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(bool.FalseString); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - } - - SysGenDependencyTracker dependencyTracker = new SysGenDependencyTracker(Project,module); - - if (dependencyTracker.DependsOn.Count > 0) - { - writer.RenderBeginTag(HtmlTextWriterTag.H3); - writer.Write("Depdends On"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Name"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Type"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Base"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Inherited"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - foreach (RBuildModule dependency in dependencyTracker.DependsOn) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.AddAttribute(HtmlTextWriterAttribute.Href, dependency.HtmlDocFileName); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(dependency.Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(dependency.Type); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(dependency.Base); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(bool.FalseString); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - } - - if (dependencyTracker.DependencyOf.Count > 0) - { - writer.RenderBeginTag(HtmlTextWriterTag.H3); - writer.Write("Dependency Of"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Name"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Type"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Base"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Inherited"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - foreach (RBuildModule dependency in dependencyTracker.DependencyOf) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.AddAttribute(HtmlTextWriterAttribute.Href, dependency.HtmlDocFileName); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(dependency.Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(dependency.Type); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(dependency.Base); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(bool.FalseString); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - } - - writer.RenderBeginTag(HtmlTextWriterTag.H3); - writer.Write("Include Folders"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Root"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Base"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Inherited"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - foreach (RBuildFolder folder in module.IncludeFolders) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(folder.Root); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(folder.FullPath); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(bool.FalseString); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - foreach (RBuildFolder folder in Project.IncludeFolders) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(folder.Root); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(folder.FullPath); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(bool.TrueString); - writer.RenderEndTag(); - - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - - if (module.LocalizationFiles.Count > 0) - { - writer.RenderBeginTag(HtmlTextWriterTag.H3); - writer.Write("Localizations"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("ISO Name"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Name"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Resource"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Outdated"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - foreach (RBuildLocalizationFile localization in module.LocalizationFiles) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(localization.CultureInfo.Name); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(localization.CultureInfo.EnglishName); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(localization.Name); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(localization.Dirty); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - } - - if (module.Defines.Count > 0) - { - writer.RenderBeginTag(HtmlTextWriterTag.H3); - writer.Write("Defines"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Name"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Value"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Inherited"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - foreach (RBuildDefine define in module.Defines) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(define.Name); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(define.Value); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(bool.FalseString); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - foreach (RBuildDefine define in Project.Defines) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(define.Name); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(define.Value); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(bool.TrueString); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - writer.RenderEndTag(); - } - - writer.RenderBeginTag(HtmlTextWriterTag.H3); - writer.Write("Linker Flags"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Flag"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Inherited"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - foreach (string flag in module.LinkerFlags) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(flag); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(bool.FalseString); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - foreach (string flag in Project.LinkerFlags) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(flag); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(bool.TrueString); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - - if (module.LinkerScript != null) - { - writer.RenderBeginTag(HtmlTextWriterTag.H3); - writer.Write("Linker Script"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Root"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Base"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.LinkerScript.Root); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.LinkerScript.FullPath); - writer.RenderEndTag(); - writer.RenderEndTag(); - - writer.RenderEndTag(); - } - - writer.RenderBeginTag(HtmlTextWriterTag.H3); - writer.Write("CompilerFlags Flags"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Flag"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Inherited"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - foreach (string flag in module.CompilerFlags) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(flag); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(bool.FalseString); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - foreach (string flag in Project.CompilerFlags) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(flag); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(bool.TrueString); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - - if (module.Files.Count > 0) - { - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("Files"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Base"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Path"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Root"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Install Base"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("New Name"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Type"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - foreach (RBuildOutputFile file in module.Files) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(file.Base); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(file.FullPath); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(file.Root); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(file.InstallBase); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(file.NewFile.FullPath); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(file.GetType().Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - } - - if (module.SourceFiles.Count > 0) - { - writer.RenderBeginTag(HtmlTextWriterTag.H3); - writer.Write("Source Files"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Root"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Source Type"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Base"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Switches"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - foreach (RBuildSourceFile file in module.SourceFiles) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(file.Root); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(file.Type); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(file.FullPath); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(file.Switches); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - writer.RenderEndTag(); - - if (module.PreCompiledHeader != null) - { - writer.RenderBeginTag(HtmlTextWriterTag.H3); - writer.Write("Precompiled Header"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Root"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Source Type"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Base"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.PreCompiledHeader.Root); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.PreCompiledHeader.Type); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.PreCompiledHeader.FullPath); - writer.RenderEndTag(); - writer.RenderEndTag(); - - writer.RenderEndTag(); - } - } - - WriteDocumentEnd(writer); - } - } - } - } - - private void GenerateUnicodeModules() - { - using (StreamWriter sw = new StreamWriter(@"C:\rosDoc\unicodemodules.htm")) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - WriteDocumentStart(writer, "Unicode"); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("Unicode Modules"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Module"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Base"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Type"); - writer.RenderEndTag(); - - writer.RenderEndTag(); - - foreach (RBuildModule module in Project.Platform.Modules) - { - if (module.Unicode) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.AddAttribute(HtmlTextWriterAttribute.Href, module.HtmlDocFileName); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(module.Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.Base); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.Type); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - } - - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write("Non-Unicode Modules"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Module"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Base"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Type"); - writer.RenderEndTag(); - - writer.RenderEndTag(); - - foreach (RBuildModule module in Project.Platform.Modules) - { - if (!module.Unicode) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.AddAttribute(HtmlTextWriterAttribute.Href, module.HtmlDocFileName); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(module.Name); - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.Base); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(module.Type); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - } - - writer.RenderEndTag(); - - - WriteDocumentEnd(writer); - } - } - } - - private void GeneratePlatformFrontPage() - { - using (StreamWriter sw = new StreamWriter(@"C:\rosDoc\platform.htm")) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - WriteDocumentStart(writer, "Platform"); - - writer.RenderBeginTag(HtmlTextWriterTag.H2); - writer.Write(Project.Platform.Name); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.P); - writer.Write(Project.Platform.Description); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Modules"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.WriteLine("{0} out of {1}", Project.Platform.Modules.Count, Project.Modules.Count); - writer.RenderEndTag(); - writer.RenderEndTag(); - - if (Project.Platform.Shell != null) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Shell"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(Project.Platform.Shell.InstallName); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - if (Project.Platform.Screensaver != null) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Screen Saver"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(Project.Platform.Screensaver.InstallName); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - if (Project.Platform.Languages.Count > 0) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Languages"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.RenderBeginTag(HtmlTextWriterTag.Ul); - foreach (RBuildLanguage language in Project.Platform.Languages) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.Write(language.Name); - writer.RenderEndTag(); - } - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - if (Project.Platform.DebugChannels.Count > 0) - { - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Debug Channels"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.RenderBeginTag(HtmlTextWriterTag.Ul); - foreach (RBuildDebugChannel channel in Project.Platform.DebugChannels) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.Write(channel.Name); - writer.RenderEndTag(); - } - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Platform Profiles"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.RenderBeginTag(HtmlTextWriterTag.Ul); - foreach (RBuildModule module in Project.Platform.Modules) - { - if (module.Type == ModuleType.ModuleGroup) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.Write(module.Description); - writer.RenderEndTag(); - } - } - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Debug Build"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(bool.TrueString); - writer.RenderEndTag(); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Kernel Debug"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(bool.FalseString); - writer.RenderEndTag(); - writer.RenderEndTag(); - - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.H3); - writer.Write("Files"); - writer.RenderEndTag(); - - writer.AddAttribute(HtmlTextWriterAttribute.Class, "table"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("GUI Applications"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Console Applications"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Dlls"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Drivers"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("Keyboard Layouts"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("KernelMode DLLs"); - writer.RenderEndTag(); - writer.RenderBeginTag(HtmlTextWriterTag.Th); - writer.Write("OCX & TypeLibs"); - writer.RenderEndTag(); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.RenderBeginTag(HtmlTextWriterTag.Ul); - foreach (RBuildModule module in Project.Platform.Modules) - { - if (module.Type == ModuleType.Win32GUI) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, module.HtmlDocFileName); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(module.TargetName); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - } - writer.RenderEndTag(); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.RenderBeginTag(HtmlTextWriterTag.Ul); - foreach (RBuildModule module in Project.Platform.Modules) - { - if (module.Type == ModuleType.Win32CUI) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, module.HtmlDocFileName); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(module.TargetName); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - } - writer.RenderEndTag(); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.RenderBeginTag(HtmlTextWriterTag.Ul); - foreach (RBuildModule module in Project.Platform.Modules) - { - if (module.Type == ModuleType.Win32DLL) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, module.HtmlDocFileName); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(module.TargetName); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - } - writer.RenderEndTag(); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.RenderBeginTag(HtmlTextWriterTag.Ul); - foreach (RBuildModule module in Project.Platform.Modules) - { - if (module.Type == ModuleType.KernelModeDriver) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, module.HtmlDocFileName); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(module.TargetName); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - } - writer.RenderEndTag(); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.RenderBeginTag(HtmlTextWriterTag.Ul); - foreach (RBuildModule module in Project.Platform.Modules) - { - if (module.Type == ModuleType.KeyboardLayout) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, module.HtmlDocFileName); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(module.TargetName); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - } - writer.RenderEndTag(); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.RenderBeginTag(HtmlTextWriterTag.Ul); - foreach (RBuildModule module in Project.Platform.Modules) - { - if (module.Type == ModuleType.KernelModeDLL) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, module.HtmlDocFileName); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(module.TargetName); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - } - writer.RenderEndTag(); - writer.RenderEndTag(); - - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.RenderBeginTag(HtmlTextWriterTag.Ul); - foreach (RBuildModule module in Project.Platform.Modules) - { - if (module.Type == ModuleType.Win32OCX || module.Type == ModuleType.EmbeddedTypeLib) - { - writer.RenderBeginTag(HtmlTextWriterTag.Li); - writer.AddAttribute(HtmlTextWriterAttribute.Href, module.HtmlDocFileName); - writer.RenderBeginTag(HtmlTextWriterTag.A); - writer.Write(module.TargetName); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - } - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderEndTag(); - - writer.RenderEndTag(); - - WriteDocumentEnd(writer); - } - } - } - - protected override void Generate() - { - GenerateFrontPage(); - GeneratePlatformFrontPage(); - GenerateModules(); - GenerateProperties(); - GenerateModulesBuildSummary(); - GenerateStats(); - //GenerateDependencyMap(); - GenerateWarnings(); - GenerateFiles(); - GenerateBaseAddresses(); - GenerateDllBaseAddresses(); - GenerateDefines(); - GenerateInstallFolders(); - GenerateInstallFiles(); - GenerateAuthors(); - GenerateContributors(); - GenerateLocalizations(); - GenerateModulePages(); - GenerateUnicodeModules(); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/MSVisualStudio/MSVisualStudio.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/MSVisualStudio/MSVisualStudio.cs deleted file mode 100644 index c1744aad138..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/MSVisualStudio/MSVisualStudio.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Web.UI; -using System.IO; -using System.Collections.Generic; -using System.Text; -using System.Xml; - -using SysGen.BuildEngine.Framework.VisualStudio; -using SysGen.BuildEngine.Backends; -using SysGen.RBuild.Framework; -using SysGen.BuildEngine; - -namespace SysGen.BuildEngine.Backends -{ - public class MSVisualStudio : Backend - { - public MSVisualStudio(SysGenEngine sysgen) - : base(sysgen) - { - } - - protected override string FriendlyName - { - get { return "Visual Studio 6.0-2005"; } - } - - protected override void Generate() - { - VSSolution solution = new VSSolution(); - - solution.Name = "ReactOS"; - solution.FileName = "reactos.sln"; - - foreach (RBuildModule module in SysGen.Project.Modules) - { - VSProject project = new VSProject(); - - //project.Name = module.Name; - project.FileName = module.Name + ".vcproj"; - - solution.Projects.Add(project); - } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/MSVisualStudio/VisualStudio/Solution.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/MSVisualStudio/VisualStudio/Solution.cs deleted file mode 100644 index 00ececbee87..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/MSVisualStudio/VisualStudio/Solution.cs +++ /dev/null @@ -1,703 +0,0 @@ -using System; -using System.IO; -using System.Xml; -using System.Collections; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.BuildEngine.Framework.VisualStudio -{ - public enum VisualStudioVersion - { - VS6, - VS2002, - VS2003, - VS2005 - } - - #region ProjectFile - public class ProjectFile - { - private string relPath = ""; - private string basePath = ""; - private string buildAction = ""; - private string subType = ""; - - public string AbsolutePath - { - get - { - return Path.Combine(basePath, relPath); - } - } - public string AbsoluteDirectory - { - get - { - return Path.GetDirectoryName(Path.Combine(basePath, relPath)); - } - } - - public string RelativePath - { - get - { - return relPath; - } - } - - public string BasePath - { - get - { - return basePath; - } - } - public string BuildAction - { - get - { - return buildAction; - } - } - public string SubType - { - get - { - return subType; - } - } - - public override string ToString() - { - StringBuilder buff = new StringBuilder("\nProject File:"); - buff.Append("\n\tRelativePath:"); - buff.Append(relPath); - buff.Append("\n\tBuildAction:"); - buff.Append(buildAction); - buff.Append("\n\tSubType:"); - buff.Append(subType); - buff.Append("\n\tBasePath:"); - buff.Append(basePath); - return buff.ToString(); - } - - public ProjectFile( - string relPath, - string buildAction, - string subType, - string basePath) - { - this.relPath = relPath; - this.buildAction = buildAction; - this.subType = subType; - this.basePath = basePath; - } - } - #endregion - - #region ProjectFileCollection - public class ProjectFileCollection : ReadOnlyCollectionBase - { - public ProjectFile this[int index] - { - get - { - return (ProjectFile)this.InnerList[index]; - } - } - - public override string ToString() - { - StringBuilder buff = new StringBuilder(); - buff.Append("\nProjectFileCollection"); - foreach (ProjectFile pf in this.InnerList) - { - buff.Append(pf.ToString()); - } - return buff.ToString(); - } - - public ProjectFileCollection(ProjectFile[] projectFileArray) - { - foreach (ProjectFile projectFile in projectFileArray) - { - this.InnerList.Add(projectFile); - } - } - - - } - #endregion - - #region ProjectReference - public class ProjectReference - { - private string name = ""; - private string assemblyName = ""; - private string hintPath = ""; - private string basePath = ""; - - public string Name - { - get - { - return this.name; - - } - } - public string AssemblyName - { - get - { - return this.assemblyName; - } - } - public string HintPath - { - get - { - return this.hintPath; - } - } - public string AbsolutePath - { - get - { - return Path.Combine(this.basePath, this.hintPath); - } - } - - public string BasePath - { - get - { - return this.basePath; - } - } - public override string ToString() - { - StringBuilder buff = new StringBuilder("\nReference:"); - buff.Append("\n\tName"); - buff.Append(name); - buff.Append("\n\tAssemblyName"); - buff.Append(assemblyName); - buff.Append("\n\tHintPath:"); - buff.Append(hintPath); - buff.Append("\n\tBasePath:"); - buff.Append(basePath); - return buff.ToString(); - } - - public ProjectReference(string name, - string assemblyName, - string hintPath, - string basePath) - { - this.name = name; - this.assemblyName = assemblyName; - this.hintPath = hintPath; - this.basePath = basePath; - } - - } - #endregion - - #region ProjectReferenceCollection - public class ProjectReferenceCollection : ReadOnlyCollectionBase - { - public ProjectReference this[int index] - { - get - { - return (ProjectReference)this.InnerList[index]; - } - } - - public override string ToString() - { - StringBuilder buff = new StringBuilder(); - buff.Append("\nProjectReferenceCollection"); - foreach (ProjectReference pr in this.InnerList) - { - buff.Append(pr.ToString()); - } - return buff.ToString(); - } - - public ProjectReferenceCollection(ProjectReference[] - projectReferenceArray) - { - foreach (ProjectReference projectReference in projectReferenceArray) - { - this.InnerList.Add(projectReference); - } - } - - } - #endregion - - #region ProjectConfigItem - public class ProjectConfigItem - { - private string key = ""; - private string keyValue = ""; - - public string Key - { - get - { - return key; - } - } - public string Value - { - get - { - return keyValue; - } - } - - public override string ToString() - { - StringBuilder buff = new StringBuilder(); - buff.Append("\nProjectConfigItem:"); - buff.Append("\n\tKey:"); - buff.Append(key); - buff.Append("\n\tValue:"); - buff.Append(keyValue); - return buff.ToString(); - } - - public ProjectConfigItem(string key, string keyValue) - { - this.key = key; - this.keyValue = keyValue; - - } - } - #endregion - - #region ProjectConfigItemCollection - public class ProjectConfigItemCollection : ReadOnlyCollectionBase - { - private string basePath = ""; - - public string Name - { - get - { - string name = ""; - foreach (ProjectConfigItem pc in this.InnerList) - { - if (pc.Key.Equals("Name")) - { - name = pc.Value; - break; - } - } - return name; - } - } - - public string OutputRelPath - { - get - { - string relPath = ""; - foreach (ProjectConfigItem pc in this.InnerList) - { - if (pc.Key.Equals("OutputPath")) - { - relPath = pc.Value; - break; - } - } - return relPath; - } - } - - public string OutputAbsolutePath - { - get - { - string absPath = OutputRelPath; - absPath = Path.Combine(this.basePath, absPath); - return absPath.Replace("\\.\\", ""); - } - } - - public ProjectConfigItem this[int index] - { - get - { - return (ProjectConfigItem)this.InnerList[index]; - } - } - - public override string ToString() - { - StringBuilder buff = new StringBuilder(); - buff.Append("\nProjectConfigItemCollection:"); - foreach (ProjectConfigItem pc in this.InnerList) - { - buff.Append(pc.ToString()); - } - return buff.ToString(); - } - - public ProjectConfigItemCollection(ProjectConfigItem[] - projectConfigItemArray, string basePath) - { - this.basePath = basePath; - foreach (ProjectConfigItem pc in projectConfigItemArray) - { - this.InnerList.Add(pc); - } - - } - } - #endregion - - #region ProjectConfigCollection - public class ProjectConfigCollection : ReadOnlyCollectionBase - { - public override string ToString() - { - StringBuilder buff = new StringBuilder(); - buff.Append("\nProjectConfigCollection:"); - foreach (ProjectConfigItemCollection pc in this.InnerList) - { - buff.Append(pc.ToString()); - } - return buff.ToString(); - } - - public ProjectConfigItemCollection this[int index] - { - get - { - return (ProjectConfigItemCollection)this.InnerList[index]; - } - } - - public ProjectConfigCollection(XmlNodeList configItems, string basePath) - { - if (configItems.Count > 0) - { - foreach (XmlNode configItem in configItems) - { - // create an array of items: - ProjectConfigItem[] projectConfigItemArray = new - ProjectConfigItem[configItem.Attributes.Count]; - int i = 0; - foreach (XmlAttribute attrib in configItem.Attributes) - { - projectConfigItemArray[i] = new - ProjectConfigItem(attrib.Name, attrib.Value); - i++; - } - // create a ProjectConfigItemCollection: - ProjectConfigItemCollection projectConfigItemCollection = new - ProjectConfigItemCollection(projectConfigItemArray, basePath); - this.InnerList.Add(projectConfigItemCollection); - } - } - } - } - #endregion - - #region Project - public class VSProject : VSItem - { - private string basePath = ""; - private string projectBasePath = ""; - private string projectFileName = ""; - private string projectGuid = ""; - private string projectConfigurationGuid = ""; - private string projectName = ""; - private string projectType = ""; - private ProjectConfigCollection configCollection = null; - private ProjectReferenceCollection referenceCollection = null; - private ProjectFileCollection fileCollection = null; - - public string AbsolutePath - { - get - { - return Path.Combine(basePath, projectFileName); - } - } - - public string AbsoluteDirectory - { - get - { - return basePath; - } - } - - public ProjectConfigCollection Configurations - { - get - { - return configCollection; - } - } - public ProjectReferenceCollection ReferenceCollection - { - get - { - return referenceCollection; - } - } - public ProjectFileCollection FileCollection - { - get - { - return fileCollection; - } - } - - public string RelPath - { - get - { - return projectFileName; - } - } - - public string Guid - { - get - { - return projectGuid; - } - } - - public string ConfigurationGuid - { - get - { - return projectConfigurationGuid; - } - } - - public string Name - { - get - { - return projectName; - } - } - - public string ProjectType - { - get - { - return projectType; - } - } - - public override string ToString() - { - StringBuilder buff = new StringBuilder(); - buff.Append("\nProject:"); - buff.Append("\n\tName:"); - buff.Append(projectName); - buff.Append("\n\tFileName:"); - buff.Append(projectFileName); - buff.Append("\n\tBasePath:"); - buff.Append(basePath); - buff.Append("\n\tGuid:"); - buff.Append(projectGuid); - buff.Append("\nConfiguration:"); - buff.Append(configCollection.ToString()); - buff.Append("\nReferences:"); - buff.Append(referenceCollection.ToString()); - buff.Append("\nFiles:"); - buff.Append(fileCollection.ToString()); - return buff.ToString(); - } - } - #endregion - - #region ProjectCollection - public class ProjectCollection : List - { - public override string ToString() - { - StringBuilder buff = new StringBuilder(); - buff.Append("\nProject Collection:"); - foreach (VSProject p in this) - { - buff.Append(p.ToString()); - } - return buff.ToString(); - } - } - #endregion - - #region Solution - public class VSSolution : VSItem - { - private string solutionFileName = ""; - private string solutionDirectory = ""; - private string solutionFileVersion = ""; - private ProjectCollection projectCollection = null; - - public string LongestSharedPath - { - get - { - // find the longest path which is shared by all of the - // objects in the project (if any) - string longestSharedPath = solutionDirectory; - foreach (VSProject p in projectCollection) - { - string projectDir = p.AbsoluteDirectory; - longestSharedPath = getMinimumSharedPath(longestSharedPath, - projectDir); - foreach (ProjectFile pf in p.FileCollection) - { - string fileDir = pf.AbsoluteDirectory; - longestSharedPath = getMinimumSharedPath(longestSharedPath, - fileDir); - } - } - return longestSharedPath; - } - } - - private string getMinimumSharedPath( - string sharedPath, - string newPath - ) - { - string retSharedPath = ""; - if (sharedPath.Length > 0) - { - string[] sharedPathParts = sharedPath.Split( - (new char[] {Path.DirectorySeparatorChar, - Path.AltDirectorySeparatorChar })); - string[] newPathParts = newPath.Split( - (new char[] {Path.DirectorySeparatorChar, - Path.AltDirectorySeparatorChar})); - int max = Math.Min(sharedPathParts.Length, newPathParts.Length); - int sharedCount = 0; - for (int i = 0; i < max; i++) - { - if - (!sharedPathParts[i].ToUpper().Equals(newPathParts[i].ToUpper()) - ) - { - break; - } - else - { - sharedCount = i + 1; - } - } - if (sharedCount == 0) - { - return ""; - } - else - { - for (int i = 0; i < sharedCount; i++) - { - if (retSharedPath.Length > 0) - { - retSharedPath += Path.DirectorySeparatorChar; - } - retSharedPath += sharedPathParts[i]; - } - } - } - return retSharedPath; - } - - public string FileVersion - { - get - { - return solutionFileVersion; - } - } - - public ProjectCollection Projects - { - get - { - return projectCollection; - } - } - - public string FileName - { - get - { - return solutionFileName; - } - set - { - solutionFileName = value; - } - } - - public string BasePath - { - get - { - return solutionDirectory; - } - } - - public override string ToString() - { - StringBuilder s = new StringBuilder(); - s.Append("\nSolution:"); - s.Append("\nFileName:"); - s.Append(solutionFileName); - s.Append("\nVersion:"); - s.Append(solutionFileVersion); - if (projectCollection != null) - { - s.Append(projectCollection.ToString()); - } - return s.ToString(); - } - - public VSSolution() - { - } - - public VSSolution(string fileName) - { - solutionFileName = fileName; - } - } - #endregion - - public class VSItem - { - private string m_Name = null; - private string m_FileName = null; - - public string Name - { - get { return m_Name; } - set { m_Name = value; } - } - - public string FileName - { - get { return m_FileName; } - set { m_FileName = value; } - } - - public void SaveAs(VisualStudioVersion version) - { - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/CompilableFile.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/CompilableFile.cs deleted file mode 100644 index c4451fceeab..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/CompilableFile.cs +++ /dev/null @@ -1,621 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Tasks; - -namespace SysGen.BuildEngine.Backends -{ - public class BackedBuildIncludeFolder : BackedBuildFolder - { - public BackedBuildIncludeFolder(RBuildFolder folder, SysGenEngine sysgen) - : base(sysgen) - { - m_RBuildFile = folder; - } - } - - public class BackendBuildFile : BackendBuildFileSystemInfo - { - public BackendBuildFile(SysGenEngine sysgen) - : base(sysgen) - { - m_RBuildFile = new RBuildFile(); - } - - public string GetPathWithNewExtension(PathRoot root, string newExtension) - { - return GetPath(root, BuildFile.Name, newExtension); - } - - public string GetPathWithNewName(PathRoot root, string newName) - { - return GetPath(root, newName, Path.GetExtension(BuildFile.Name)); - } - - public string GetPath(PathRoot root, string newName, string newExtension) - { - return Path.Combine(SysGen.GetPathRoot(root), Path.ChangeExtension(newName, newExtension)); - } - - public string IntermediateFolderFullPath - { - get { return Path.Combine(SysGen.GetPathRoot(PathRoot.Intermediate), BuildFile.Base) /*+ @"\."*/; } - } - - public string BaseFolderFullPath - { - get { return Path.Combine(SysGen.GetPathRoot(PathRoot.SourceCode), BuildFile.Base) /*+ @"\."*/; } - } - - public RBuildFile BuildFile - { - get { return m_RBuildFile as RBuildFile; } - } - } - - public class BackedBuildFolder : BackendBuildFileSystemInfo - { - public BackedBuildFolder(RBuildFolder folder, SysGenEngine sysgen) - : base(sysgen) - { - m_RBuildFile = folder; - } - - public BackedBuildFolder(SysGenEngine sysgen) - : base(sysgen) - { - m_RBuildFile = new RBuildFolder(); - } - - public RBuildFolder BuildFolder - { - get { return m_RBuildFile as RBuildFolder; } - } - } - - public abstract class BackendBuildFileSystemInfo - { - protected RBuildFileSystemInfo m_RBuildFile = null; - protected SysGenEngine m_SysGenEngine = null; - - public BackendBuildFileSystemInfo(SysGenEngine sysgen) - { - m_SysGenEngine = sysgen; - } - - public SysGenEngine SysGen - { - get { return m_SysGenEngine; } - } - - public string RelativePath - { - get { return SysGen.NormalizePath(m_RBuildFile.FullPath); } - } - - public string GetPath(PathRoot root) - { - return Path.Combine(SysGen.GetPathRoot(root), RelativePath); - } - - public string OriginalFullPath - { - get { return Path.Combine(SysGen.GetPathRoot(m_RBuildFile.Root), RelativePath); } - } - - public string BaseFullPath - { - get { return Path.Combine(SysGen.BaseDirectory, RelativePath); } - } - - public string IntermediateFullPath - { - get { return Path.Combine(SysGen.IntermediateDirectory, RelativePath); } - } - - public string OutputFullPath - { - get { return Path.Combine(SysGen.OutputDirectory, RelativePath); } - } - - public string BootCDOutputDirectory - { - get { return Path.Combine(SysGen.BootCDOutputDirectory, RelativePath); } - } - - public string TemporaryFullPath - { - get { return Path.Combine(SysGen.TemporaryDirectory, RelativePath); } - } - - public string InstallFullPath - { - get { return Path.Combine(SysGen.InstallDirectory, RelativePath); } - } - - public RBuildModule Module - { - get { return m_RBuildFile.Element as RBuildModule; } - } - } - - public class SourceFile : BackendBuildModule - { - RBuildSourceFile m_File = null; - BackendBuildFile m_SourceCodeFile = null; - BackendBuildFile m_SourceCodeObjectFile = null; - BackendBuildFile m_SourceCodeActualFile = null; - BackendBuildFile m_SourceCodeHeaderFile = null; - BackendBuildFile m_SourceCodePCHeaderFile = null; - BackendBuildFile m_SourceRpcClientHeaderFile = null; - BackendBuildFile m_SourceRpcServerHeaderFile = null; - BackendBuildFile m_SourceMessageTableHeaderFile = null; - BackendBuildFile m_SourceMessageTableResourceFile = null; - BackendBuildFile m_PCH = null; - BackendBuildFile m_PCHTemp = null; - - public SourceFile(RBuildSourceFile file, RBuildModule module, SysGenEngine sysgen) - : base(module, sysgen) - { - m_File = file; - - m_SourceCodeFile = new BackendBuildFile(sysgen); - m_SourceCodeFile.BuildFile.Name = file.Name; - m_SourceCodeFile.BuildFile.Element = module; - m_SourceCodeFile.BuildFile.Base = file.Base; - m_SourceCodeFile.BuildFile.Root = file.Root; - - m_SourceCodeObjectFile = new BackendBuildFile(sysgen); - m_SourceCodeObjectFile.BuildFile.Name = GetObjectFileName(file); - m_SourceCodeObjectFile.BuildFile.Element = module; - m_SourceCodeObjectFile.BuildFile.Base = file.Base; - - m_SourceCodeActualFile = new BackendBuildFile(sysgen); - m_SourceCodeActualFile.BuildFile.Name = GetActualSourceFile(file); - m_SourceCodeActualFile.BuildFile.Element = module; - m_SourceCodeActualFile.BuildFile.Base = file.Base; - - m_SourceCodeHeaderFile = new BackendBuildFile(sysgen); - m_SourceCodeHeaderFile.BuildFile.Name = GetHeaderFile(file); - m_SourceCodeHeaderFile.BuildFile.Element = module; - m_SourceCodeHeaderFile.BuildFile.Base = file.Base; - - m_SourceRpcClientHeaderFile = new BackendBuildFile(sysgen); - m_SourceRpcClientHeaderFile.BuildFile.Name = GetRpcClientHeaderFile(file); - m_SourceRpcClientHeaderFile.BuildFile.Element = module; - m_SourceRpcClientHeaderFile.BuildFile.Base = file.Base; - - m_SourceRpcServerHeaderFile = new BackendBuildFile(sysgen); - m_SourceRpcServerHeaderFile.BuildFile.Name = GetRpcServerHeaderFile(file); - m_SourceRpcServerHeaderFile.BuildFile.Element = module; - m_SourceRpcServerHeaderFile.BuildFile.Base = file.Base; - - m_SourceMessageTableHeaderFile = new BackendBuildFile(sysgen); - m_SourceMessageTableHeaderFile.BuildFile.Name = GetMessageTableHeaderFile(file); - m_SourceMessageTableHeaderFile.BuildFile.Element = module; - m_SourceMessageTableHeaderFile.BuildFile.Base = /*file.Base; //*/ "include/reactos"; - - m_SourceMessageTableResourceFile = new BackendBuildFile(sysgen); - m_SourceMessageTableResourceFile.BuildFile.Name = GetMessageTableResourceFile(file); - m_SourceMessageTableResourceFile.BuildFile.Element = module; - m_SourceMessageTableResourceFile.BuildFile.Base = file.Base; - } - - public string GetMessageTableResourceFile(RBuildFile file) - { - return Path.GetFileNameWithoutExtension(file.Name) + ".rc"; - } - - public string GetMessageTableHeaderFile(RBuildFile file) - { - return Path.GetFileNameWithoutExtension(file.Name) + ".h"; - } - - public string GetRpcServerHeaderFile(RBuildFile file) - { - return Path.GetFileNameWithoutExtension(file.Name) + "_s.h"; - } - - public string GetRpcClientHeaderFile(RBuildFile file) - { - return Path.GetFileNameWithoutExtension(file.Name) + "_c.h"; - } - - public string GetRpcProxyHeaderFile(RBuildFile file) - { - return Path.GetFileNameWithoutExtension(file.Name) + "_p.h"; - } - - private string GetHeaderFile(RBuildFile file) - { - switch (file.Extension) - { - case ".idl": - { - if (Module.Type == ModuleType.RpcServer) - return GetRpcServerHeaderFile(file); - - if (Module.Type == ModuleType.RpcClient) - return GetRpcClientHeaderFile(file); - - if (Module.Type == ModuleType.RpcProxy) - return GetRpcProxyHeaderFile(file); - - return Path.ChangeExtension(file.Name, ".h"); - } - break; - default: - return file.Name; - } - } - - private string GetActualSourceFile(RBuildFile file) - { - switch (file.Extension) - { - case ".spec": - return Path.ChangeExtension(file.Name, ".stubs.c"); - break; - case ".idl": - { - if (Module.Type == ModuleType.RpcServer) - return Path.GetFileNameWithoutExtension(file.Name) + "_s.c"; - - if (Module.Type == ModuleType.RpcClient) - return Path.GetFileNameWithoutExtension(file.Name) + "_c.c"; - - if (Module.Type == ModuleType.RpcProxy) - return Path.GetFileNameWithoutExtension(file.Name) + "_p.c"; - - return Path.ChangeExtension(file.Name, ".h"); - } - break; - default: - return file.Name; - } - } - - private string GetObjectFileName(RBuildFile file) - { - string filename = null; - switch (file.Extension) - { - case ".h": - filename = Path.ChangeExtension(file.Name, ".h.gch"); - break; - case ".mc": - filename = Path.ChangeExtension(file.Name, ".rc"); - break; - case ".rc": - filename = Path.ChangeExtension(file.Name, ".coff"); - break; - case ".spec": - filename = Path.ChangeExtension(file.Name, ".stubs.o"); - break; - case ".idl": - { - if (Module.Type == ModuleType.RpcServer) - return Path.GetFileNameWithoutExtension(file.Name) + "_s.o"; - - if (Module.Type == ModuleType.RpcClient) - return Path.GetFileNameWithoutExtension(file.Name) + "_c.o"; - - if (Module.Type == ModuleType.RpcProxy) - return Path.GetFileNameWithoutExtension(file.Name) + "_p.o"; - - /* - if (Module.Type == ModuleType.EmbeddedTypeLib) - return Path.GetFileNameWithoutExtension(file.Name) + ".tlb"; - */ - - filename = Path.ChangeExtension(file.Name, ".h"); - } - break; - //case ".c": - //case ".cpp": - //case ".cxx": - // { - // filename = Path.ChangeExtension(file.Name, ".o"); - // } - // break; - default: - filename = Path.ChangeExtension(file.Name, ".o"); - - //HACK: - if (Module.Type == ModuleType.BootSector) - return filename; - - //filename = string.Format("{1}_{0}{2}", - // Module.Name, - // Path.GetFileNameWithoutExtension(filename), - // Path.GetExtension(filename)); - break; - } - - if (file.Extension == ".mc" || - file.Extension == ".rc" || - file.Extension == ".c" || - file.Extension == ".cpp" || - file.Extension == ".cxx" || - file.Extension == ".asm" || - file.Extension == ".s") - { - filename = string.Format("{0}_{1}{2}", - Path.GetFileNameWithoutExtension(filename), - Module.Name, - Path.GetExtension(filename)); - } - else if (file.Extension == ".h") - { - return filename; - } - - return filename; - } - - public BackendBuildFile SourceCodeFile - { - get { return m_SourceCodeFile; } - } - - public BackendBuildFile SourceCodeHeaderFile - { - get { return m_SourceCodeHeaderFile; } - } - - public BackendBuildFile SourceCodeObjectFile - { - get { return m_SourceCodeObjectFile; } - } - - public BackendBuildFile SourceCodeActualFile - { - get { return m_SourceCodeActualFile; } - } - - public BackendBuildFile SourceRpcClientHeaderFile - { - get { return m_SourceRpcClientHeaderFile; } - } - - public BackendBuildFile SourceRpcServerHeaderFile - { - get { return m_SourceRpcServerHeaderFile; } - } - - public BackendBuildFile SourceCodePCHeaderFile - { - get { return m_SourceCodePCHeaderFile; } - } - - public RBuildSourceFile File - { - get { return m_File; } - } - - public BackendBuildFile MessageTableHeaderFile - { - get { return m_SourceMessageTableHeaderFile; } - } - - public BackendBuildFile MessageTableResourceFile - { - get { return m_SourceMessageTableResourceFile; } - } - } - - public class LibraryModule : BackendBuildModule - { - BackendBuildFile m_Dependency = null; - - public LibraryModule(RBuildModule module, SysGenEngine sysgen) : base (module , sysgen) - { - m_Dependency = new BackendBuildFile(sysgen); - m_Dependency.BuildFile.Name = module.DependencyName; - m_Dependency.BuildFile.Element = module; - m_Dependency.BuildFile.Base = module.Base; - } - - public BackendBuildFile Dependency - { - get { return m_Dependency; } - } - } - - public class BackendBuildModule - { - SysGenEngine m_SysGenEngine = null; - RBuildModule m_Module = null; - BackendBuildFile m_Target = null; - BackendBuildFile m_TargetNoStrip = null; - BackendBuildFile m_Dependency = null; - BackendBuildFile m_Definition = null; - - public BackendBuildModule(RBuildModule module, SysGenEngine sysgen) - { - m_Module = module; - m_SysGenEngine = sysgen; - - m_Target = new BackendBuildFile(sysgen); - m_Target.BuildFile.Name = module.TargetFile.Name; //module.TargetName; - m_Target.BuildFile.Element = module; - m_Target.BuildFile.Base = module.TargetFile.Base; //module.Base; - - m_TargetNoStrip = new BackendBuildFile(sysgen); - m_TargetNoStrip.BuildFile.Name = GetNoStripTargetName(module); - m_TargetNoStrip.BuildFile.Element = module; - m_TargetNoStrip.BuildFile.Base = module.Base; - - m_Dependency = new BackendBuildFile(sysgen); - m_Dependency.BuildFile.Name = module.DependencyName; - m_Dependency.BuildFile.Element = module; - m_Dependency.BuildFile.Base = module.Base; - - - m_Definition = new BackendBuildFile(sysgen); - m_Definition.BuildFile.Element = module; - - if (module.ImportLibrary == null) - { - m_Definition.BuildFile.Name = "tools/rbuild/empty.def"; - m_Definition.BuildFile.Base = sysgen.BaseDirectory; - } - else - { - if (IsWineModule) - m_Definition.BuildFile.Root = PathRoot.Intermediate; - - m_Definition.BuildFile.Name = module.ImportLibrary.Definition; - m_Definition.BuildFile.Base = module.ImportLibrary.Base; - } - } - - public bool IsWineModule - { - get - { - if (Module.ImportLibrary == null) - return false; - - return ((Module.ImportLibrary.Definition != null) && - (Module.ImportLibrary.Definition != string.Empty) && - (Module.ImportLibrary.Definition.Contains(".spec.def"))); - } - } - - public string GetNoStripTargetName(RBuildModule module) - { - return string.Format("{0}.nostrip{1}", - Path.GetFileNameWithoutExtension(module.TargetName), - Path.GetExtension(module.TargetName)); - } - - public string LibTempFileName - { - get - { - if (m_Module.Type == ModuleType.StaticLibrary) - return m_Module.TargetName; - - return Path.ChangeExtension(m_Module.TargetName, ".temp.a"); - } - } - - public string ExpTempFileName - { - get - { - if (m_Module.Type == ModuleType.StaticLibrary) - return m_Module.TargetName; - - return Path.ChangeExtension(m_Module.TargetName, ".temp.exp"); - } - } - - public string JunkTempFileName - { - get - { - if (m_Module.Type == ModuleType.StaticLibrary) - return m_Module.TargetName; - - return Path.ChangeExtension(m_Module.TargetName, ".junk.tmp"); - } - } - - public string RcTempFileName - { - get - { - if (m_Module.Type == ModuleType.StaticLibrary) - return m_Module.TargetName; - - return Path.ChangeExtension(m_Module.TargetName, ".rci.tmp"); - } - } - - public string ResTempFileName - { - get - { - if (m_Module.Type == ModuleType.StaticLibrary) - return m_Module.TargetName; - - return Path.ChangeExtension(m_Module.TargetName, ".res.tmp"); - } - } - - public string JunkTempFileNameFullPath - { - get { return Path.Combine(m_SysGenEngine.GetPathRoot(PathRoot.SourceCode), JunkTempFileName); } - } - - public string RcTempFileNameFullPath - { - get { return Path.Combine(m_SysGenEngine.GetPathRoot(PathRoot.Temporary), RcTempFileName); } - } - - public string ResTempFileNameFullPath - { - get { return Path.Combine(m_SysGenEngine.GetPathRoot(PathRoot.Intermediate), ResTempFileName); } - } - - public string ExpTempFileNameFullPath - { - get { return Path.Combine(m_SysGenEngine.GetPathRoot(PathRoot.SourceCode), ExpTempFileName); } - } - - public string LibTempFileNameFullPath - { - get { return Path.Combine(m_SysGenEngine.GetPathRoot(PathRoot.Intermediate), LibTempFileName); } - } - - public string ModuleIntermediateLocation - { - get { return Path.Combine(m_SysGenEngine.GetPathRoot(PathRoot.Intermediate), Module.Base); } - } - - public string ModuleOutputLocation - { - get { return Path.Combine(m_SysGenEngine.GetPathRoot(PathRoot.Output), Module.Base); } - } - - public string ModuleBaseIntermediateLocation - { - get { return Path.Combine(m_SysGenEngine.GetPathRoot(PathRoot.Intermediate), Module.Base); } - } - - public string ModuleBaseOutputLocation - { - get { return Path.Combine(m_SysGenEngine.GetPathRoot(PathRoot.Output), Module.Base); } - } - - public RBuildModule Module - { - get { return m_Module; } - } - - public BackendBuildFile Target - { - get { return m_Target; } - } - - public BackendBuildFile Dependency - { - get { return m_Dependency; } - } - - public BackendBuildFile Definition - { - get { return m_Definition; } - } - - public BackendBuildFile TargetNoStrip - { - get { return m_TargetNoStrip; } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/MingwBackend.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/MingwBackend.cs deleted file mode 100644 index 356dde7aa9a..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/MingwBackend.cs +++ /dev/null @@ -1,504 +0,0 @@ -using System; -using System.IO; -using System.Collections; -using System.Collections.Generic; -using System.Text; - -using SysGen.BuildEngine; -using SysGen.BuildEngine.Backends; -using SysGen.BuildEngine.Framework; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Backends -{ - public class MingwBackend : CompilerBaseBacked - { - public const string ECHO_AR_MACRO = "$(ECHO_AR)"; - public const string ECHO_CC_MACRO = "$(ECHO_CC)"; - public const string ECHO_LD_MACRO = "$(ECHO_LD)"; - public const string ECHO_WRC_MACRO = "$(ECHO_WRC)"; - - public const string EMPTY_DEF_FILE = "tools\\rbuild\\empty.def"; - - protected bool m_UsePipe = false; - protected bool m_UsePch = false; - protected bool m_ManualBinUtilsSetting = false; - - protected List m_ModuleHandlers = new List(); - - public MingwBackend(SysGenEngine sysgen) - : base(sysgen) - { - } - - protected override string FriendlyName - { - get { return "MINGW32 Backend"; } - } - - private void WriteXmlRBuildFiles(MakefileWriter makefile, RBuildProject project) - { - foreach (string xmlBuildFile in SysGen.BuildFiles) - { - makefile.WriteIndentedLine(xmlBuildFile); - } - } - - protected List ModuleHandlers - { - get { return m_ModuleHandlers; } - } - - protected override void Generate() - { - base.Generate(); - - using (MakefileWriter makefile = new MakefileWriter(Directory.GetCurrentDirectory() + "\\" + Project.MakeFile)) - { - makefile.WriteComplexComment("THIS FILE IS AUTOMATICALLY GENERATED, EDIT " + Project.XmlFile + " INSTEAD"); - makefile.WriteLine(); - - makefile.WriteProperty("nasm", "nasm"); - makefile.WriteProperty("ARCH", "i386"); - - foreach (RBuildProperty property in SysGen.Project.Properties) - { - if (property.Internal == false) - { - if (property.Value != null) - { - makefile.WriteProperty( - property.Name.ToString(), - property.Value.ToString()); - } - } - } - - makefile.WriteComplexComment("XML rbuild files"); - - makefile.WritePropertyListStart("XMLBUILDFILES"); - WriteXmlRBuildFiles(makefile, Project); - makefile.WritePropertyListEnd(); - - MingwRBuildElementHandler projectHandler = new MingwRBuildProjectHandler(Project); - - projectHandler.Makefile = makefile; - projectHandler.SysGen = SysGen; - projectHandler.GenerateMakeFile(); - - //BackendBuildModule cModule; - SourceFile cFile; - MingwRBuildModuleHandler moduleHandler = null; - - foreach (RBuildModule module in SysGen.Project.Platform.Modules) - { - makefile.WritePropertyListStart(module.MakeFileSources); - foreach (RBuildSourceFile file in module.SourceFiles) - { - makefile.WriteIndentedLine(file.FullPath); - } - makefile.WritePropertyListEnd(); - } - - foreach (RBuildModule module in SysGen.Project.Platform.Modules) - { - if (module.Type == ModuleType.RpcClient) - { - makefile.WritePropertyListStart(module.MakeFileRPCHeaders); - - foreach (RBuildSourceFile file in module.SourceFiles) - { - cFile = new SourceFile(file, module, SysGen); - - if (cFile.File.IsWidl) - { - makefile.WriteIndentedLine(cFile.SourceRpcClientHeaderFile.IntermediateFullPath); - } - } - - makefile.WritePropertyListEnd(); - makefile.WritePropertyListStart(module.MakeFileRPCSources); - - foreach (RBuildSourceFile file in module.SourceFiles) - { - cFile = new SourceFile(file, module, SysGen); - - if (cFile.File.IsWidl) - { - makefile.WriteIndentedLine(cFile.SourceCodeActualFile.IntermediateFullPath); - } - } - - makefile.WritePropertyListEnd(); - } - - if (module.Type == ModuleType.RpcClient || - module.Type == ModuleType.RpcServer || - module.Type == ModuleType.RpcProxy) - { - makefile.WritePropertyListStart(module.MakeFileObjs); - - // Procesamos primero los .idl que generan .h que pueden - // ser luego requeridos para compilar el resto del módulo. - - foreach (RBuildSourceFile file in module.SourceFiles) - { - cFile = new SourceFile(file, module, SysGen); - - if (cFile.File.IsWidl) - { - makefile.WriteIndentedLine(cFile.SourceCodeObjectFile.IntermediateFullPath); - } - } - - // Luego compilamos el resto de fuentes - foreach (RBuildSourceFile file in module.SourceFiles) - { - cFile = new SourceFile(file, module, SysGen); - - if (!cFile.File.IsWidl && !cFile.File.IsMessageTable) - { - makefile.WriteIndentedLine(cFile.SourceCodeObjectFile.IntermediateFullPath); - } - } - - makefile.WritePropertyListEnd(); - } - else - { - makefile.WritePropertyListStart(module.MakeFileHeaders); - - // Procesamos primero los .idl que generan .h que pueden - // ser luego requeridos para compilar el resto del módulo. - - foreach (RBuildSourceFile file in module.SourceFiles) - { - cFile = new SourceFile(file, module, SysGen); - - if (module.Type == ModuleType.EmbeddedTypeLib) - { - /* idl files in EmbeddedTypeLib modules do not generate header files */ - } - else - { - if (cFile.File.IsWidl) - { - makefile.WriteIndentedLine(cFile.SourceCodeObjectFile.IntermediateFullPath); - } - } - } - - makefile.WritePropertyListEnd(); - makefile.WritePropertyListStart(module.MakeFilePCHHeaders); - - // Procesamos primero los .idl que generan .h que pueden - // ser luego requeridos para compilar el resto del módulo. - - foreach (RBuildSourceFile file in module.SourceFiles) - { - cFile = new SourceFile(file, module, SysGen); - - if (cFile.File.IsHeader) - { - makefile.WriteIndentedLine(cFile.SourceCodeObjectFile.IntermediateFullPath); - } - } - - makefile.WritePropertyListEnd(); - makefile.WritePropertyListStart(module.MakeFileMCHeaders); - - // Procesamos primero los .idl que generan .h que pueden - // ser luego requeridos para compilar el resto del módulo. - - foreach (RBuildSourceFile file in module.SourceFiles) - { - cFile = new SourceFile(file, module, SysGen); - - if (cFile.File.IsMessageTable) - { - makefile.WriteIndentedLine(cFile.MessageTableHeaderFile.IntermediateFullPath); - } - } - - makefile.WritePropertyListEnd(); - makefile.WritePropertyListStart(module.MakeFileObjs); - - foreach (RBuildSourceFile file in module.SourceFiles) - { - cFile = new SourceFile(file, module, SysGen); - //if (cFile.File.IsCompilable) - if (!cFile.File.IsWidl && !cFile.File.IsMessageTable &&!cFile.File.IsHeader) - { - makefile.WriteIndentedLine(cFile.SourceCodeObjectFile.IntermediateFullPath); - } - } - - makefile.WritePropertyListEnd(); - } - } - - makefile.WriteLine(); - - - foreach (RBuildModule module in SysGen.Project.Platform.Modules) - { - moduleHandler = null; - - switch (module.Type) - { - case ModuleType.RpcClient: - moduleHandler = new MingwRpcClientHeaderModuleHandler(module); - break; - case ModuleType.RpcServer: - moduleHandler = new MingwRpcServerHeaderModuleHandler(module); - break; - case ModuleType.RpcProxy: - moduleHandler = new MingwRpcProxyModuleHandler(module); - break; - case ModuleType.BootLoader: - moduleHandler = new MingwBootLoaderModuleHandler(module); - break; - case ModuleType.BootSector: - moduleHandler = new MingwBootSectorModuleHandler(module); - break; - case ModuleType.IdlHeader: - moduleHandler = new MingwIdlHeaderModuleHandler(module); - break; - case ModuleType.Win32CUI: - moduleHandler = new MingwWin32CUIModuleHandler(module); - break; - case ModuleType.Win32SCR: - case ModuleType.Win32GUI: - moduleHandler = new MingwWin32GUIModuleHandler(module); - break; - case ModuleType.Win32DLL: - moduleHandler = new MingwWin32DLLModuleHandler(module); - break; - case ModuleType.Win32OCX: - moduleHandler = new MingwWin32OCXModuleHandler(module); - break; - case ModuleType.KeyboardLayout: - case ModuleType.KernelModeDLL: - moduleHandler = new MingwKernelModeDLLModuleHandler(module); - break; - case ModuleType.KernelModeDriver: - moduleHandler = new MingwKernelModeDriverModuleHandler(module); - break; - case ModuleType.Kernel: - moduleHandler = new MingwKernelModuleHandler(module); - break; - case ModuleType.NativeCUI: - moduleHandler = new MingwNativeCUIModuleHandler(module); - break; - case ModuleType.NativeDLL: - moduleHandler = new MingwNativeDLLModuleHandler(module); - break; - case ModuleType.ObjectLibrary: - moduleHandler = new MingwObjectLibraryModuleHandler(module); - break; - case ModuleType.StaticLibrary: - moduleHandler = new MingwStaticLibraryModuleHandler(module); - break; - case ModuleType.EmbeddedTypeLib: - moduleHandler = new MingwEmbeddedTypeLibModuleHandler(module); - break; - case ModuleType.HostStaticLibrary: - moduleHandler = new MingwHostStaticLibraryModuleHandler(module); - break; - case ModuleType.BuildTool: - moduleHandler = new MingwBuildToolModuleHandler(module); - break; - case ModuleType.Cabinet: - moduleHandler = new MingwCabinetModuleHandler(module); - break; - case ModuleType.Iso: - moduleHandler = new MingwBootCDTargetHandler(module); - break; - case ModuleType.LiveIso: - moduleHandler = new MingwLiveCDTargetHandler(module); - break; - case ModuleType.IsoRegTest: - moduleHandler = new MingwBootCDRegTestTargetHandler(module); - break; - case ModuleType.LiveIsoRegTest: - moduleHandler = new MingwLiveCDRegTestTargetHandler(module); - break; - case ModuleType.MessageHeader: - moduleHandler = new MingwMessageHeaderModuleHandler(module); - break; - case ModuleType.Package: - moduleHandler = new MingwPackageModuleHandler(module); - break; - } - - if (moduleHandler != null) - { - moduleHandler.SysGen = SysGen; - moduleHandler.Makefile = makefile; - moduleHandler.Project = Project; - - ModuleHandlers.Add(moduleHandler); - } - - } - - foreach (MingwRBuildModuleHandler moduleHandler2 in ModuleHandlers) - { - if (moduleHandler2.Module.IsBuildable) // Hack - { - makefile.WriteProperty(moduleHandler2.Module.MakeFileTarget, moduleHandler2.ModuleTarget); - } - } - - foreach (MingwRBuildModuleHandler moduleHandler2 in ModuleHandlers) - { - if (moduleHandler2.Module.IsBuildable) // Hack - { - makefile.WriteComplexComment("Buid instructions for module '{0}' on '{1}' [{2}]", - moduleHandler2.Module.Name, - moduleHandler2.Module.Base, - moduleHandler2.Module.Type); - - moduleHandler2.GenerateMakeFile(); - - makefile.WritePhonyTarget(moduleHandler2.Module.MakeFileMakeTarget); - makefile.WriteRule(moduleHandler2.Module.Name, moduleHandler2.Module.MakeFileTargetMacro); - makefile.WriteLine(); - - makefile.WriteSingleLineTarget(moduleHandler2.Module.MakeFileInfoTarget); - makefile.WriteLine("\t@echo =======================Module Info============================"); - makefile.WriteLine("\t@echo Name: '{0}'", moduleHandler2.Module.Name); - makefile.WriteLine("\t@echo Type: '{0}'", moduleHandler2.Module.Type); - makefile.WriteLine("\t@echo Base: '{0}'", moduleHandler2.Module.Base); - makefile.WriteLine("\t@echo XML: '{0}'", moduleHandler2.Module.RBuildPath); - makefile.WriteLine("\t@echo Target: '{0}'", moduleHandler2.Module.TargetName); - makefile.WriteLine("\t@echo ==============================================================="); - makefile.WriteLine(); - - makefile.WriteSingleLineTarget(moduleHandler2.Module.MakeFileFlagDebugTarget); - makefile.WriteLine("\t@echo =======================Module Debug Info======================="); - makefile.WriteLine("\t@echo CFLAGS: '{0}'", moduleHandler2.Module.MakeFileCFlagsMacro); - makefile.WriteLine("\t@echo LFLAGS: '{0}'", moduleHandler2.Module.MakeFileLFlagsMacro); - makefile.WriteLine("\t@echo LIBS: '{0}'", moduleHandler2.Module.MakeFileLibsMacro); - makefile.WriteLine("\t@echo LINKDEPS: '{0}'", moduleHandler2.Module.MakeFileLinkDepsMacro); - makefile.WriteLine("\t@echo NASM: '{0}'", moduleHandler2.Module.MakeFileNASMMacro); - makefile.WriteLine("\t@echo OBJS: '{0}'", moduleHandler2.Module.MakeFileObjsMacro); - makefile.WriteLine("\t@echo RCFLAGS: '{0}'", moduleHandler2.Module.MakeFileRCFlagsMacro); - makefile.WriteLine("\t@echo TARGET: '{0}'", moduleHandler2.Module.MakeFileTargetMacro); - makefile.WriteLine("\t@echo WIDL: '{0}'", moduleHandler2.Module.MakeFileWIDLFlagsMacro); - makefile.WriteLine("\t@echo ==============================================================="); - makefile.WriteLine(); - } - } - - GenerateAllTarget(makefile); - GenerateCleanTarget(makefile); - GenerateInstallTarget(makefile); - GenerateTestTarget(makefile); - } - } - - private void GenerateAllTarget(MakefileWriter makefile) - { - makefile.WriteComplexComment("Generate the ALL target"); - makefile.WriteTarget("all"); - - foreach (RBuildModule module in SysGen.Project.Platform.Modules) - { - if ((module.Enabled) && (module.IncludeInAllTarget)) - { - makefile.WriteIndentedLine(module.MakeFileTargetMacro); - } - } - } - - private void GenerateCleanTarget(MakefileWriter makefile) - { - makefile.WriteComplexComment("Generate the CLEAN target"); - makefile.WriteTarget("clean"); - - foreach (RBuildModule module in SysGen.Project.Platform.Modules) - { - makefile.WriteIndentedLine(module.MakeFileCleanTarget); - } - } - - private void GenerateInstallTarget(MakefileWriter makefile) - { - makefile.WriteComplexComment("Generate the INSTALL target"); - makefile.WriteTarget("install"); - - //foreach (RBuildModule module in SysGen.Project.Platform.Modules) - //{ - // makefile.WriteIndentedLine(module.MakeFileCleanTarget); - //} - } - - private void GenerateTestTarget(MakefileWriter makefile) - { - RBuildFolderCollection folders = new RBuildFolderCollection(); - - makefile.WriteComplexComment("Generate the TEST target"); - makefile.WriteSingleLineTarget("test"); - - foreach (RBuildFolder folder in Project.Folders) - { - if (folders.Contains(folder) == false) - folders.Add(folder); - } - - foreach (RBuildModule module in Project.Modules) - { - foreach (RBuildFolder folder in module.Folders) - { - if (folders.Contains(folder) == false) - folders.Add(folder); - } - } - - foreach (RBuildInstallFolder folder in Project.InstallFolders) - { - if (folders.Contains(folder) == false) - folders.Add(folder); - } - - foreach (RBuildFolder folder in folders) - { - GenerateFolder(makefile, folder); - } - } - - private void GenerateFolder(MakefileWriter makefile, RBuildFolder folder) - { - if ((folder.Root == PathRoot.Default) || - (folder.Root == PathRoot.SourceCode)) - { - makefile.WriteLine("{0}: | {1}", - SysGen.ResolveRBuildFilePath(new RBuildFolder(PathRoot.Intermediate, folder.FullPath)), - SysGen.ResolveRBuildFilePath(new RBuildFolder(PathRoot.Intermediate, folder.Parent.FullPath))); - - makefile.WriteSingleLineIndented("$(ECHO_MKDIR)"); - makefile.WriteSingleLineIndented("$(mkdir) $@"); - - makefile.WriteLine("{0}: | {1}", - SysGen.ResolveRBuildFilePath(new RBuildFolder(PathRoot.Output, folder.FullPath)), - SysGen.ResolveRBuildFilePath(new RBuildFolder(PathRoot.Output, folder.Parent.FullPath))); - - makefile.WriteSingleLineIndented("$(ECHO_MKDIR)"); - makefile.WriteSingleLineIndented("$(mkdir) $@"); - } - - //Create the install and output folders - if (folder.Root == PathRoot.Output || - folder.Root == PathRoot.Install) - { - makefile.WriteLine("{0}: | {1}", - SysGen.ResolveRBuildFilePath(new RBuildFolder(folder.Root, folder.FullPath)), - SysGen.ResolveRBuildFilePath(new RBuildFolder(folder.Root, folder.Parent.FullPath))); - - makefile.WriteSingleLineIndented("$(ECHO_MKDIR)"); - makefile.WriteSingleLineIndented("$(mkdir) $@"); - } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/MingwRBuildElementHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/MingwRBuildElementHandler.cs deleted file mode 100644 index f76bcc21151..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/MingwRBuildElementHandler.cs +++ /dev/null @@ -1,923 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine; - -namespace SysGen.BuildEngine.Backends -{ - public enum LinkerSubSystem - { - Windows, - Console, - Native - } - - public abstract class MingwRBuildMakefileGenerator - { - protected SysGenEngine m_SysGenEngine = null; - protected MakefileWriter m_Makefile = null; - - public SysGenEngine SysGen - { - get { return m_SysGenEngine; } - set { m_SysGenEngine = value; } - } - - public MakefileWriter Makefile - { - get { return m_Makefile; } - set { m_Makefile = value; } - } - - protected virtual string ResolveRBuildFilePath(RBuildFile file) - { - return SysGen.ResolveRBuildFilePath(file); - } - - protected virtual string ResolveRBuildFolderPath(RBuildFolder folder) - { - return SysGen.ResolveRBuildFolderPath(folder); - } - - public virtual string ResolveRBuildFilePath(PathRoot root, RBuildFileSystemInfo file) - { - return SysGen.ResolveRBuildFilePath(root , file); - } - - public abstract void GenerateMakeFile(); - } - - public abstract class MingwRBuildElementHandler : MingwRBuildMakefileGenerator - { - protected RBuildElement m_BuildElement = null; - - public MingwRBuildElementHandler(RBuildElement element) - { - m_BuildElement = element; - } - - public override void GenerateMakeFile() - { - /* Do checking */ - CheckSourceFiles(); - - /* Do makefile generation */ - WriteCommon(); - WriteSpecific(); - //WritePCHFiles(); - WriteFiles(); - WriteLinker(); - WriteImportLibrary(); - WriteCleanTarget(); - } - - protected virtual void WriteFolders() - { - Makefile.WritePropertyListStart(BuildElement.MakeFileFolders); - WriteElementFolders(Makefile, BuildElement); - Makefile.WritePropertyListEnd(); - } - - protected virtual void CheckSourceFiles() - { - } - - protected virtual void WriteCommon() - { - WriteFolders(); - WriteCFlags(); - WriteRCFlags(); - WriteLFlags(); - WriteWIDLFlags(); - } - - protected virtual void WriteStrip() - { - } - - protected virtual void WriteNonSymbolStripped() - { - } - - protected virtual void WriteRsym() - { - } - - protected virtual void WriteImportLibrary() - { - } - - protected virtual void WriteLinker() - { - } - - protected virtual void WriteCleanTarget() - { - } - - protected virtual void WriteSpecific() - { - } - - protected virtual void WriteFiles() - { - } - - protected virtual void WritePCHFiles() - { - } - - protected virtual void WriteCFlags() - { - Makefile.WritePropertyListStart(BuildElement.MakeFileCFlags); - WriteElementIncludes(Makefile, BuildElement); - WriteElementDefines(Makefile, BuildElement); - Makefile.WritePropertyListEnd(); - } - - protected virtual void WriteLFlags() - { - Makefile.WritePropertyListStart(BuildElement.MakeFileLFlags); - WriteLinkerFlags(Makefile, BuildElement); - Makefile.WritePropertyListEnd(); - } - - protected virtual void WriteRCFlags() - { - Makefile.WriteProperty(BuildElement.MakeFileRCFlags, BuildElement.MakeFileCFlagsMacro); - } - - protected virtual void WriteWIDLFlags() - { - Makefile.WriteProperty(BuildElement.MakeFileWIDLFlags, BuildElement.MakeFileCFlagsMacro); - } - - protected void WriteElementDefines(MakefileWriter makefile, RBuildElement element) - { - foreach (RBuildDefine define in element.Defines) - { - if (!define.IsEmpty) - { - makefile.WriteIndentedLine("-D" + define.Name + "=" + define.Value); - } - else - makefile.WriteIndentedLine("-D" + define.Name); - } - } - - protected void WriteElementDependencyFlags(MakefileWriter makefile, RBuildModule module) - { - foreach (RBuildModule dependency in module.Dependencies) - { - Makefile.WriteIndentedLine(dependency.MakeFileTargetMacro); - } - } - - protected void WriteElementIncludes(MakefileWriter makefile, RBuildElement element) - { - foreach (RBuildFolder includeFolder in element.IncludeFolders) - { - Makefile.WriteIndentedLine("-I" + ResolveRBuildFolderPath(includeFolder)); - } - } - - protected void WriteElementFolders(MakefileWriter makefile, RBuildElement element) - { - foreach (RBuildFolder folder in element.Folders) - { - Makefile.WriteIndentedLine(ResolveRBuildFolderPath(folder)); - } - } - - protected void WriteModuleAssemblyFlags(MakefileWriter makefile, RBuildModule module) - { - foreach (string assemblyFlag in module.AssemblyFlags) - { - Makefile.WriteIndentedLine(assemblyFlag); - } - } - - protected void WriteCompilerFlags(MakefileWriter makefile, RBuildElement element) - { - foreach (string compilerFlag in element.CompilerFlags) - { - Makefile.WriteIndentedLine(compilerFlag); - } - } - - protected void WriteLinkerFlags(MakefileWriter makefile, RBuildElement element) - { - foreach (string linkerFlag in element.LinkerFlags) - { - Makefile.WriteIndentedLine(linkerFlag); - } - } - - public RBuildElement BuildElement - { - get { return m_BuildElement; } - } - } - - public abstract class MingwRBuildModuleHandler : MingwRBuildElementHandler - { - private RBuildProject m_Project = null; - private RBuildModule m_Module = null; - - private BackendBuildModule m_CompModule = null; - private BackedBuildFolder m_Folder = null; - - public MingwRBuildModuleHandler(RBuildModule module) - : base(module) - { - m_Module = module; - } - - ////Para que sirve? - //public bool ReferenceObjects - //{ - // get - // { - // switch (Module.Type) - // { - // case ModuleType.RpcServer: - // case ModuleType.RpcClient: - // case ModuleType.RpcProxy: - // case ModuleType.ObjectLibrary: - // //case ModuleType.IdlHeader: - // //case ModuleType.MessageHeader: - // return true; - // } - - // return false; - // } - //} - - public string ModuleTarget - { - get - { - if (Module.Type == ModuleType.IdlHeader) - return Module.MakeFileHeadersMacro; - - if (Module.Type == ModuleType.MessageHeader) - return Module.MakeFileMCHeadersMacro; - - if (Module.Type == ModuleType.RpcServer || - Module.Type == ModuleType.RpcClient || - Module.Type == ModuleType.RpcProxy || - Module.Type == ModuleType.ObjectLibrary) - { - return Module.MakeFileObjsMacro; - } - - if (Module.TargetFile.Root == PathRoot.Intermediate || - Module.TargetFile.Root == PathRoot.Output || - Module.TargetFile.Root == PathRoot.Default) - { - return ResolveRBuildFilePath(Module.TargetFile); - } - else - throw new BuildException("Don't know module target"); - } - } - - public override void GenerateMakeFile() - { - //m_Project = SysGen.Project; - - m_CompModule = new BackendBuildModule(Module, SysGen); - m_Folder = new BackedBuildFolder(SysGen); - m_Folder.BuildFolder.Base = Module.Folder.Base; - m_Folder.BuildFolder.Name = Module.Folder.Name; - m_Folder.BuildFolder.Element = Module; - - // Si se trata de un WinModule agregamos un include a la carpeta intermedia - // ya que algunas dlls de wine generan ahi sus recursos incrustrados como iconos - // o bitmaps - if (CompilableModule.IsWineModule) - { - Module.IncludeFolders.Add(new RBuildFolder(PathRoot.Intermediate, Module.Base)); - } - - // Llamamos a la clase base - base.GenerateMakeFile(); - } - - protected override void WriteFiles() - { - foreach (RBuildSourceFile file in Module.SourceFiles) - { - SourceFile sourceFile = new SourceFile(file, Module, SysGen); - - if (CanCompile(file)) - { - WriteFileBuildInstructions(sourceFile); - } - else - throw new Exception("Don't know how to write build instructions for '" + sourceFile.SourceCodeFile.OriginalFullPath + "' on module '" + Module.Name + "'"); - } - } - - protected abstract void WriteFileBuildInstructions(SourceFile sourceFile); - - protected abstract bool CanCompile(RBuildSourceFile file); - - protected override void WriteSpecific() - { - WriteModuleCommon(); - WritePreconditions(); - } - - protected virtual void WritePreconditions() - { - Makefile.WritePropertyAppendListStart(Module.MakeFilePreCondition); - WriteElementDependencyFlags(Makefile, Module); - Makefile.WritePropertyListEnd(); - Makefile.WriteLine(); - - foreach (RBuildSourceFile file in Module.SourceFiles) - { - if (file.IsCompilable) - { - Makefile.WriteLine("{0}: {1}", ResolveRBuildFilePath(file), Module.MakeFilePreConditionMacro); - } - } - - Makefile.WriteLine(); - } - - protected virtual void WriteWidl() - { - Makefile.WritePropertyListStart(Module.MakeFileWIDLFlags); - WriteElementIncludes(Makefile, Module); - Makefile.WritePropertyListEnd(); - - Makefile.WritePropertyAppend(Module.MakeFileWIDLFlags, Project.MakeFileWIDLFlagsMacro); - } - - protected virtual void WriteLibs() - { - Makefile.WritePropertyListStart(Module.MakeFileLibs); - - foreach (RBuildModule dependency in Module.Libraries) - { - if (dependency.IsDLL || dependency.IsLibrary || dependency.IsRPC) - { - if (dependency.Type == ModuleType.ObjectLibrary || - dependency.Type == ModuleType.RpcClient || - dependency.Type == ModuleType.RpcServer || - dependency.Type == ModuleType.RpcProxy) - { - Makefile.WriteIndentedLine(dependency.MakeFileTargetMacro); - } - else - { - Makefile.WriteIndentedLine(ResolveRBuildFilePath(dependency.Dependency)); - } - } - } - - Makefile.WritePropertyListEnd(); - } - - protected void WriteModuleCommon() - { - WriteLibs(); - WriteWidl(); - - if (Module.Host == false) - { - Makefile.WritePropertyAppend(Module.MakeFileCFlags, Project.MakeFileCFlagsMacro); - Makefile.WritePropertyAppend(Module.MakeFileRCFlags, Project.MakeFileRCFlagsMacro); - Makefile.WritePropertyAppend(Module.MakeFileLFlags, Project.MakeFileLFlagsMacro); - } - else - { - Makefile.WritePropertyAppend(Module.MakeFileLFlags, "$(HOST_LFLAGS)"); - } - - WriteLinkDeps(); - - if (Module.AssemblyFlags.Count > 0) - { - Makefile.WritePropertyListStart(Module.MakeFileNASMFlags); - WriteModuleAssemblyFlags(Makefile, Module); - Makefile.WritePropertyListEnd(); - } - - Makefile.WritePropertyAppendListStart(Module.MakeFileCFlags); - WriteCompilerFlags(Makefile, Module); - Makefile.WritePropertyListEnd(); - - Makefile.WriteLine(); - } - - protected virtual void WriteLinkDeps() - { - Makefile.WritePropertyAppend(Module.MakeFileLinkDeps, Module.MakeFileLibsMacro); - } - - public virtual string RpcHeaderDependencies - { - get - { - string dependencies = string.Empty; - - foreach (RBuildModule module in Module.Libraries) - { - if ((module.Type == ModuleType.RpcClient) || - (module.Type == ModuleType.RpcServer) || - (module.Type == ModuleType.IdlHeader)) /// se puede eliminar esta linea? - { - foreach (RBuildSourceFile file in module.SourceFiles) - { - SourceFile sourceFile = new SourceFile(file, module, SysGen); - - if (file.IsWidl) - { - if (module.Type == ModuleType.RpcClient) - dependencies += " " + sourceFile.SourceRpcClientHeaderFile.IntermediateFullPath; - - if (module.Type == ModuleType.RpcServer) - dependencies += " " + sourceFile.SourceRpcServerHeaderFile.IntermediateFullPath; - - //dependencies += " " + sourceFile.SourceCodeHeaderFile.IntermediateFullPath; - } - } - } - } - - return dependencies; - } - } - - public virtual string DefinitionDependencies - { - get - { - string dependencies = string.Empty; - - foreach (RBuildSourceFile file in Module.SourceFiles) - { - SourceFile sourceFile = new SourceFile(file, Module, SysGen); - - if (file.IsWineBuild) - { - dependencies += " " + CompilableModule.Definition.OriginalFullPath; - dependencies += " " + sourceFile.SourceCodeActualFile.IntermediateFullPath; - } - else if (file.IsWidl) - { - if (Module.Type == ModuleType.RpcClient || - Module.Type == ModuleType.RpcServer) - { - dependencies += " " + sourceFile.SourceCodeActualFile.IntermediateFullPath; - } - } - } - - return dependencies; - } - } - - public string Linker - { - get - { - if (Module.CPlusPlus) - return CPPCompiler; - - return CCompiler; - } - } - - public string PCHCompiler - { - get - { - if (Module.CPlusPlus) - return CPPCompiler; - - return CCompiler; - } - } - - public string CCompiler - { - get { return (Module.Host ? "$(host_gcc)" : "$(gcc)"); } - } - - public string CPPCompiler - { - get { return (Module.Host ? "$(host_gpp)" : "$(gpp)"); } - } - - public string ArchiveCompiler - { - get { return (Module.Host ? "$(host_ar)" : "$(ar)"); } - } - - protected virtual void WriteAr() - { - Makefile.WriteLine(m_CompModule.Target.IntermediateFullPath + ": " + Module.MakeFileObjsMacro + " | " + ModuleFolder.IntermediateFullPath); - Makefile.WriteLine("\t$(ECHO_AR)"); - - if (Module.Type == ModuleType.StaticLibrary || - Module.Type == ModuleType.HostStaticLibrary) - { - if (Module.ImportLibrary != null) - { - Makefile.WriteLine("\t${dlltool} --dllname " + Module.ImportLibrary.DllName + " --def " + CompilableModule.Definition.OriginalFullPath + " --output-lib $@ " + MangledSymbols + " " + UnderscoreSymbols); - } - } - - Makefile.WriteLine("\t${ar} -rc $@ " + Module.MakeFileObjsMacro); - Makefile.WriteLine(); - } - - protected virtual void WriteWindResCompiler(SourceFile sourceFile) - { - Makefile.WriteLine(sourceFile.SourceCodeObjectFile.IntermediateFullPath + ": " + sourceFile.SourceCodeFile.OriginalFullPath + " $(wrc_TARGET) " + " | " + sourceFile.SourceCodeFile.IntermediateFolderFullPath); - Makefile.WriteLine("\t$(ECHO_WRC)"); - Makefile.WriteLine("\t" + CCompiler + " -xc -E -DRC_INVOKED " + Module.MakeFileRCFlagsMacro + " " + sourceFile.SourceCodeFile.OriginalFullPath + " > " + CompilableModule.RcTempFileNameFullPath); - Makefile.WriteLine("\t$(Q)$(wrc_TARGET) " + Module.MakeFileRCFlagsMacro + " " + CompilableModule.RcTempFileNameFullPath + " " + CompilableModule.ResTempFileNameFullPath); - Makefile.WriteLine("\t-@${rm} " + CompilableModule.RcTempFileNameFullPath + " 2>$(NUL)"); - Makefile.WriteLine("\t${windres} " + CompilableModule.ResTempFileNameFullPath + " -o $@"); - Makefile.WriteLine("\t-@${rm} " + CompilableModule.ResTempFileNameFullPath + " 2>$(NUL)"); - Makefile.WriteLine(); - } - - protected virtual void WriteWIDLTypeLibrary(SourceFile file) - { - Makefile.WriteLine(file.Target.IntermediateFullPath + ": " + file.SourceCodeFile.OriginalFullPath + " $(widl_TARGET) " + " | " + ModuleFolder.IntermediateFullPath); - Makefile.WriteLine("\t$(ECHO_WIDL)"); - Makefile.WriteLine("\t$(Q)$(widl_TARGET) " + Module.MakeFileWIDLFlagsMacro + " -t -T " + file.Target.IntermediateFullPath + " " + file.SourceCodeFile.OriginalFullPath); - Makefile.WriteLine(); - } - - protected virtual void WriteWIDLHeader(SourceFile file) - { - Makefile.WriteLine(file.SourceCodeObjectFile.IntermediateFullPath + ": " + file.SourceCodeFile.OriginalFullPath + " $(widl_TARGET) " + " | " + ModuleFolder.IntermediateFullPath); - Makefile.WriteLine("\t$(ECHO_WIDL)"); - Makefile.WriteLine("\t$(Q)$(widl_TARGET) " + Module.MakeFileWIDLFlagsMacro + " -h -H " + file.SourceCodeObjectFile.IntermediateFullPath + " " + file.SourceCodeFile.OriginalFullPath); - Makefile.WriteLine(); - } - - protected virtual void WriteWIDLRpcHeader(SourceFile file) - { - Makefile.WriteLine(file.SourceCodeActualFile.IntermediateFullPath + " " + file.SourceCodeHeaderFile.IntermediateFullPath + ": " + file.SourceCodeFile.OriginalFullPath + " $(widl_TARGET) | " + ModuleFolder.IntermediateFullPath); - Makefile.WriteLine("\t$(ECHO_WIDL)"); - - if (Module.Type == ModuleType.RpcServer) - { - Makefile.WriteLine("\t$(Q)$(widl_TARGET) " + file.File.Switches + " " + Module.MakeFileWIDLFlagsMacro + " -h -H " + file.SourceCodeHeaderFile.IntermediateFullPath + " -s -S " + file.SourceCodeActualFile.IntermediateFullPath + " " + file.SourceCodeFile.OriginalFullPath); - Makefile.WriteLine(); - } - else if (Module.Type == ModuleType.RpcClient) - { - Makefile.WriteLine("\t$(Q)$(widl_TARGET) " + file.File.Switches + " " + Module.MakeFileWIDLFlagsMacro + " -h -H " + file.SourceCodeHeaderFile.IntermediateFullPath + " -c -C " + file.SourceCodeActualFile.IntermediateFullPath + " " + file.SourceCodeFile.OriginalFullPath); - Makefile.WriteLine(); - } - else if (Module.Type == ModuleType.RpcProxy) - { - Makefile.WriteLine("\t$(Q)$(widl_TARGET) " + file.File.Switches + " " + Module.MakeFileWIDLFlagsMacro + " -h -H " + file.SourceCodeHeaderFile.IntermediateFullPath + " -p -P " + file.SourceCodeActualFile.IntermediateFullPath + " " + file.SourceCodeFile.OriginalFullPath); - Makefile.WriteLine(); - } - - if (Module.Type == ModuleType.RpcServer || - Module.Type == ModuleType.RpcClient) - { - Makefile.WriteLine(file.SourceCodeObjectFile.IntermediateFullPath + ": " + file.SourceCodeActualFile.IntermediateFullPath + " " + file.SourceRpcServerHeaderFile.IntermediateFullPath + " " + file.SourceRpcClientHeaderFile.IntermediateFullPath + " | " + ModuleFolder.IntermediateFullPath); - Makefile.WriteLine("\t$(ECHO_CC)"); - Makefile.WriteLine("\t" + CCompiler + " -c $< -o $@ " + Module.MakeFileCFlagsMacro); - Makefile.WriteLine(); - } - else if (Module.Type == ModuleType.RpcProxy) - { - Makefile.WriteLine(file.SourceCodeObjectFile.IntermediateFullPath + ": " + file.SourceCodeActualFile.IntermediateFullPath + " " + file.SourceCodeHeaderFile.IntermediateFullPath + " | " + ModuleFolder.IntermediateFullPath); - Makefile.WriteLine("\t$(ECHO_CC)"); - Makefile.WriteLine("\t" + CCompiler + " -c $< -o $@ " + Module.MakeFileCFlagsMacro); - Makefile.WriteLine(); - } - } - - protected virtual void WriteWineBuild(SourceFile sourceFile) - { - Makefile.WriteLine(CompilableModule.Definition.IntermediateFullPath + ": " + sourceFile.SourceCodeFile.OriginalFullPath + " $(winebuild_TARGET) | " + ModuleFolder.IntermediateFullPath); - Makefile.WriteLine("\t$(ECHO_WINEBLD)"); - Makefile.WriteLine("\t$(Q)$(winebuild_TARGET) $(WINEBUILD_FLAGS) -o " + CompilableModule.Definition.IntermediateFullPath + " --def -E " + sourceFile.SourceCodeFile.OriginalFullPath); - Makefile.WriteLine(); - - Makefile.WriteLine(sourceFile.SourceCodeActualFile.IntermediateFullPath + ": " + sourceFile.SourceCodeFile.OriginalFullPath + " $(winebuild_TARGET)"); - Makefile.WriteLine("\t$(ECHO_WINEBLD)"); - Makefile.WriteLine("\t$(Q)$(winebuild_TARGET) $(WINEBUILD_FLAGS) -o " + sourceFile.SourceCodeActualFile.IntermediateFullPath + " --pedll " + sourceFile.SourceCodeFile.OriginalFullPath); - Makefile.WriteLine(); - - Makefile.WriteLine(sourceFile.SourceCodeObjectFile.IntermediateFullPath + ": " + sourceFile.SourceCodeActualFile.IntermediateFullPath + " | " + ModuleFolder.IntermediateFullPath); - Makefile.WriteLine("\t$(ECHO_CC)"); - Makefile.WriteLine("\t" + CCompiler + " -c $< -o $@ " + Module.MakeFileCFlagsMacro); - Makefile.WriteLine(); - } - - protected virtual void WritePCH(SourceFile sourceFile) - { - Makefile.WriteLine(sourceFile.SourceCodeObjectFile.IntermediateFullPath + ": " + sourceFile.SourceCodeFile.OriginalFullPath + " " + RpcHeaderDependencies + " | " + sourceFile.SourceCodeFile.IntermediateFolderFullPath); - Makefile.WriteLine("\t$(ECHO_PCH)"); - Makefile.WriteLine("\t" + PCHCompiler + " -o " + sourceFile.SourceCodeObjectFile.IntermediateFullPath + " " + Module.MakeFileCFlagsMacro + " -g " + sourceFile.SourceCodeFile.OriginalFullPath); - Makefile.WriteLine(); - } - - protected virtual void WriteCCompiler(SourceFile sourceFile) - { - Makefile.WriteLine(sourceFile.SourceCodeObjectFile.IntermediateFullPath + ": " + sourceFile.SourceCodeFile.OriginalFullPath + " " + Module.MakeFileHeadersMacro + " " + PrecompiledHeader + " " + RpcHeaderDependencies + " | " + sourceFile.SourceCodeFile.IntermediateFolderFullPath); - Makefile.WriteLine("\t$(ECHO_CC)"); - Makefile.WriteLine("\t" + CCompiler + " -c $< -o $@ " + Module.MakeFileCFlagsMacro); - Makefile.WriteLine(); - } - - protected virtual void WriteWMC(SourceFile sourceFile) - { - Makefile.WriteLine(sourceFile.MessageTableHeaderFile.IntermediateFullPath + " " + sourceFile.MessageTableResourceFile.IntermediateFullPath + ": " + "$(wmc_TARGET)" + " " + sourceFile.SourceCodeFile.OriginalFullPath + " | " + sourceFile.MessageTableHeaderFile.IntermediateFolderFullPath + " " + sourceFile.MessageTableResourceFile.IntermediateFolderFullPath); - Makefile.WriteLine("\t$(ECHO_WMC)"); - Makefile.WriteLine("\t$(Q)$(wmc_TARGET) -i -H " + sourceFile.MessageTableHeaderFile.IntermediateFullPath + " -o " + sourceFile.MessageTableResourceFile.IntermediateFullPath + " " + sourceFile.SourceCodeFile.OriginalFullPath); - Makefile.WriteLine(); - } - - protected virtual void WriteCPPCompiler(SourceFile sourceFile) - { - Makefile.WriteLine(sourceFile.SourceCodeObjectFile.IntermediateFullPath + ": " + sourceFile.SourceCodeFile.OriginalFullPath + " " + Module.MakeFileHeadersMacro + " " + PrecompiledHeader + " " + RpcHeaderDependencies + " | " + sourceFile.SourceCodeFile.IntermediateFolderFullPath); - Makefile.WriteLine("\t$(ECHO_CC)"); - Makefile.WriteLine("\t" + CPPCompiler + " -c $< -o $@ " + Module.MakeFileCFlagsMacro); - Makefile.WriteLine(); - } - - protected virtual void WriteNASMCompiler(SourceFile sourceFile) - { - Makefile.WriteLine(sourceFile.SourceCodeObjectFile.IntermediateFullPath + ": " + sourceFile.SourceCodeFile.OriginalFullPath + " | " + sourceFile.SourceCodeFile.IntermediateFolderFullPath /*+ ModuleFolder.IntermediateFullPath*/); - Makefile.WriteLine("\t$(ECHO_NASM)"); - Makefile.WriteLine("\t$(Q)${nasm} -f win32 $< -o $@ " + Module.MakeFileNASMMacro); - Makefile.WriteLine(); - } - - protected virtual void WriteASMCompiler(SourceFile sourceFile) - { - Makefile.WriteLine(sourceFile.SourceCodeObjectFile.IntermediateFullPath + ": " + sourceFile.SourceCodeFile.OriginalFullPath + " | " + sourceFile.SourceCodeFile.IntermediateFolderFullPath /*+ ModuleFolder.IntermediateFullPath*/); - Makefile.WriteLine("\t$(ECHO_GAS)"); - Makefile.WriteLine("\t" + CCompiler + " -x assembler-with-cpp -c $< -o $@ -D__ASM__ " + Module.MakeFileCFlagsMacro); - Makefile.WriteLine(); - } - - protected override void WriteRsym() - { - Makefile.WriteLine("\t$(ECHO_RSYM)"); - Makefile.WriteLine("\t$(Q)$(RSYM_TARGET) $@ $@"); - Makefile.WriteLine(); - } - - protected override void WriteStrip() - { - if (SysGen.Project.Properties["ROS_LEAN_AND_MEAN"] != null) - { - //No s'ha provat - Makefile.WriteLine("\t$(ECHO_STRIP)"); - Makefile.WriteLine("\t${strip} -s -x -X $@"); - Makefile.WriteLine(); - } - } - - protected override void WriteNonSymbolStripped() - { - if (SysGen.Project.Properties["ROS_BUILDNOSTRIP"] != null) - { - //No s'ha provat - Makefile.WriteLine("\t$(ECHO_CP)"); - Makefile.WriteLine("\t$(cp) " + m_CompModule.TargetNoStrip.OutputFullPath + " 1>$(NUL)"); - Makefile.WriteLine(); - } - } - - protected override void WriteLinker() - { - //Makefile.WriteLine(Module.MakeFileTargetMacro + ": " + CompilableModule.Definition.OriginalFullPath + " " + Module.MakeFileLinkDepsMacro + " " + Module.MakeFileObjsMacro + " $(RSYM_TARGET) $(PEFIXUP_TARGET) | " + /*ModuleFolder.TemporaryFullPath*/ ModuleFolder.OutputFullPath); - Makefile.WriteLine(Module.MakeFileTargetMacro + ": " + Definition + " " + Module.MakeFileLinkDepsMacro + " " + Module.MakeFileObjsMacro + " $(RSYM_TARGET) $(PEFIXUP_TARGET) | " + ModuleFolder.OutputFullPath); - Makefile.WriteLine("\t$(ECHO_LD)"); - - if (Module.IsDLL) - { - Makefile.WriteLine("\t${dlltool} --dllname " + Module.TargetName + " --def " + CompilableModule.Definition.OriginalFullPath + " --output-exp " + m_CompModule.ExpTempFileNameFullPath + " " + MangledSymbols + " " + UnderscoreSymbols); - } - - Makefile.WriteLine("\t" + Linker + " " + LinkerParameters); - - if (Module.IsDLL) - { - Makefile.WriteLine("\t$(Q)$(PEFIXUP_TARGET) " + Module.MakeFileTargetMacro + " -exports" + " " + PefixupParameters); - Makefile.WriteLine("\t-@${rm} " + m_CompModule.ExpTempFileNameFullPath + " 2>$(NUL)"); - } - - Makefile.WriteLine(); - - WriteRsym(); - WriteStrip(); - WriteNonSymbolStripped(); - } - - public string Definition - { - get - { - if (Module.ImportLibrary != null) - return CompilableModule.Definition.OriginalFullPath; - - return string.Empty; - } - } - - public virtual string PefixupParameters - { - get - { - if ((Module.Type == ModuleType.Kernel) || - (Module.Type == ModuleType.KernelModeDLL) || - (Module.Type == ModuleType.KernelModeDriver) || - (Module.Type == ModuleType.KeyboardLayout)) - { - return "-sections"; - } - - return string.Empty; - } - } - - public string LinkerScript - { - get - { - if (Module.LinkerScript != null) - return string.Format("-Wl,-T,{0}", Module.LinkerScript.FullPath); - - return string.Empty; - } - } - - public string MangledSymbols - { - get - { - if (Module.MangledSymbols) - return string.Empty; - - return "--kill-at"; - } - } - - public string UnderscoreSymbols - { - get - { - if (Module.UnderscoreSymbols) - return "--add-underscore"; - - return string.Empty; - } - } - - - protected string PrecompiledHeader - { - get - { - if (Module.PreCompiledHeader != null) - return Module.MakeFilePCHMacro; - - return string.Empty; - } - } - - protected override void WriteCleanTarget() - { - Makefile.WritePhonyTarget(Module.MakeFileCleanTarget); - Makefile.WriteSingleLineTarget(Module.MakeFileCleanTarget); - - if (Module.Type != ModuleType.Cabinet) //Hack: - { - foreach (RBuildSourceFile file in Module.SourceFiles) - { - SourceFile cFile = new SourceFile(file, Module, SysGen); - - Makefile.WriteLine("\t-@$(rm) " + cFile.SourceCodeObjectFile.IntermediateFullPath + " 2>$(NUL)"); - } - } - - Makefile.WriteLine("\t-@$(rm) " + Module.MakeFileTargetMacro + " 2>$(NUL)"); - Makefile.WriteLine(); - } - - protected override void WriteImportLibrary () - { - if (Module.HasImportLibrary) - { - Makefile.WriteComment("IMPORT LIBRARY RULE"); - Makefile.WriteLine(ResolveRBuildFilePath(Module.Dependency) + ": " + CompilableModule.Definition.OriginalFullPath + " " + DefinitionDependencies + " | " + ModuleFolder.IntermediateFullPath); - Makefile.WriteLine("\t$(ECHO_DLLTOOL)"); - Makefile.WriteLine("\t$(dlltool) --dllname " + Module.TargetName + " --def " + CompilableModule.Definition.OriginalFullPath + " --output-lib " + /*CompilableModule.Dependency.IntermediateFullPath*/ ResolveRBuildFilePath(Module.Dependency) + " " + MangledSymbols + " " + UnderscoreSymbols); - Makefile.WriteLine(); - } - } - - protected virtual string LinkerParameters - { - get - { - return string.Format("-Wl,--subsystem," + SubSystem + " -Wl,--entry,{0} -Wl,--image-base,{1} " + AdditionalParameters2 + " -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 " + " " + NoStartFiles + " " + Shared + " " + LinkerScript + " " + AdditionalParamters + " -o {2} {3} {4} {5}", - Module.LinkerEntryPoint, - Module.BaseAddress, - Module.MakeFileTargetMacro, - Module.MakeFileObjsMacro, - Module.MakeFileLibsMacro, - Module.MakeFileLFlagsMacro); - } - } - - protected virtual string AdditionalParameters2 - { - get { return string.Empty; } - } - - //Fixme: - protected virtual LinkerSubSystem LinkerSubsystem - { - get { return LinkerSubSystem.Console; } - } - - protected virtual string SubSystem - { - get { return "console"; } - } - - protected virtual string NoStartFiles - { - get - { - if (Module.Type == ModuleType.NativeCUI || - Module.Type == ModuleType.NativeDLL || - Module.Type == ModuleType.Kernel || - Module.Type == ModuleType.KernelModeDLL || - Module.Type == ModuleType.KernelModeDriver || - Module.Type == ModuleType.KeyboardLayout) - { - return "-nostartfiles"; - } - - return string.Empty; - } - } - - protected virtual string Shared - { - get - { - if (Module.IsDLL) - return "-shared"; - - return string.Empty; - } - } - - protected virtual string AdditionalParamters - { - get - { - if (Module.IsDLL) - return m_CompModule.ExpTempFileNameFullPath; - - return string.Empty; - } - } - - public RBuildModule Module - { - get { return m_BuildElement as RBuildModule; } - } - - public RBuildProject Project - { - get { return m_Project; } - set { m_Project = value; } - } - - public BackendBuildModule CompilableModule - { - get { return m_CompModule; } - } - - public BackedBuildFolder ModuleFolder - { - get { return m_Folder; } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/Misc/MakefileWriter.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/Misc/MakefileWriter.cs deleted file mode 100644 index 5dbb01e08fb..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/Misc/MakefileWriter.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.BuildEngine.Backends -{ - public class MakefileWriter : StreamWriter - { - public MakefileWriter(string path) - : base(path) - { - } - - public void WriteComment(string text) - { - WriteLine("# {0}" , text); - } - - public void WriteComplexComment(string text, params object[] args) - { - WriteComplexComment(string.Format(text, args)); - } - - public void WriteComplexComment(string text) - { - WriteLine(); - WriteLine("#==================================================================================="); - WriteLine("# {0}", text); - WriteLine("#==================================================================================="); - WriteLine(); - } - - public void WriteIndentedLine(string text , params object[] args) - { - WriteIndentedLine(string.Format(text, args)); - WriteLine(); - } - - public void WriteSingleLineIndented(string text) - { - WriteLine("\t{0}", text); - } - - public void WriteIndentedLine(string text) - { - WriteLine("\t{0} \\", text); - } - - public void WriteProperty(string propertyName , string propertyValue) - { - WriteLine("{0} := {1}" , - propertyName , - propertyValue); - } - - public void WritePropertyAppend(string propertyName, string propertyValue) - { - WriteLine("{0} += {1}", - propertyName, - propertyValue); - } - - public void WritePropertyAppendListStart(string propertyName) - { - WriteLine("{0} += \\", propertyName); - } - - public void WritePropertyListStart(string propertyName) - { - WriteLine("{0} := \\", propertyName); - } - - public void WritePropertyListEnd() - { - WriteLine(); - } - - public void WritePhonyTarget(string targetName) - { - WriteLine(".PHONY: {0}", targetName); - } - - public void WriteSingleLineTarget(string targetName) - { - WriteLine("{0}:", targetName); - } - - public void WriteTarget(string targetName) - { - WriteLine("{0}: \\", targetName); - } - - public void WriteRule(string targetName , string targetName2) - { - WriteLine("{0}: {1}", targetName, targetName2); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/Base/MingwRBuildModuleHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/Base/MingwRBuildModuleHandler.cs deleted file mode 100644 index d599896ff49..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/Base/MingwRBuildModuleHandler.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Backends -{ - -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwBootLoaderModuleHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwBootLoaderModuleHandler.cs deleted file mode 100644 index a3642c0d0e4..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwBootLoaderModuleHandler.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Backends -{ - public class MingwBootLoaderModuleHandler : MingwRBuildModuleHandler - { - public MingwBootLoaderModuleHandler(RBuildModule module) - : base(module) - { - } - - protected override bool CanCompile(RBuildSourceFile file) - { - return false; - } - - protected override void WriteFileBuildInstructions(SourceFile sourceFile) - { - } - - protected override void WriteLinker() - { - Makefile.WriteLine(Module.MakeFileTargetMacro + ": " + Module.MakeFileObjsMacro + " " + Module.MakeFileLinkDepsMacro + " | " + ModuleFolder.OutputFullPath); - Makefile.WriteLine("\t$(ECHO_LD)"); - //Makefile.WriteLine("\t$(ld) {0} -N -Ttext=0x8000 -o {1} {2} {3}", Module.MakeFileLFlagsMacro, CompilableModule.JunkTempFileNameFullPath, Module.MakeFileObjsMacro, Module.MakeFileLinkDepsMacro); - Makefile.WriteLine("\t$(gcc) -Wl,--subsystem,native -Wl,-N -Ttext=0x8000 -o {0} {1} {2} {3}", CompilableModule.JunkTempFileNameFullPath, Module.MakeFileObjsMacro, Module.MakeFileLinkDepsMacro, Module.MakeFileLFlagsMacro); - Makefile.WriteLine("\t$(objcopy) -O binary {0} $@", CompilableModule.JunkTempFileNameFullPath); - Makefile.WriteLine("\t-@$(rm) {0} 2>$(NUL)", CompilableModule.JunkTempFileNameFullPath); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwBootSectorModuleHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwBootSectorModuleHandler.cs deleted file mode 100644 index 8db44129cf8..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwBootSectorModuleHandler.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Backends -{ - public class MingwBootSectorModuleHandler : MingwRBuildModuleHandler - { - public MingwBootSectorModuleHandler(RBuildModule module) - : base(module) - { - } - - protected override bool CanCompile(RBuildSourceFile file) - { - return (file.IsNASM); - } - - protected override void WriteFileBuildInstructions(SourceFile sourceFile) - { - if (sourceFile.File.IsNASM) - { - WriteNASMCompiler(sourceFile); - } - } - - protected override void WriteLinker() - { - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwBuildToolModuleHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwBuildToolModuleHandler.cs deleted file mode 100644 index ac8a70ff4a9..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwBuildToolModuleHandler.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Backends -{ - public class MingwBuildToolModuleHandler : MingwRBuildModuleHandler - { - public MingwBuildToolModuleHandler(RBuildModule module) - : base(module) - - { - } - - protected override bool CanCompile(RBuildSourceFile file) - { - return (file.IsC || file.IsCPP); - } - - protected override void WriteFileBuildInstructions(SourceFile sourceFile) - { - if (sourceFile.File.IsC) - { - WriteCCompiler(sourceFile); - } - - if (sourceFile.File.IsCPP) - { - WriteCPPCompiler(sourceFile); - } - } - - protected override void WriteLinker() - { - Makefile.WriteLine(Module.MakeFileTargetMacro + ": " + Module.MakeFileObjsMacro + " " + Module.MakeFileLinkDepsMacro + " | " + ModuleFolder.OutputFullPath); - Makefile.WriteLine("\t$(ECHO_LD)"); - Makefile.WriteLine("\t" + Linker + " " + Module.MakeFileLFlagsMacro + " -o $@ " + Module.MakeFileObjsMacro + " " + Module.MakeFileLibsMacro ); - Makefile.WriteLine(); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwCabinetModuleHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwCabinetModuleHandler.cs deleted file mode 100644 index 8bc979878c7..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwCabinetModuleHandler.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Backends -{ - public class MingwCabinetModuleHandler : MingwRBuildModuleHandler - { - public MingwCabinetModuleHandler(RBuildModule module) - : base(module) - { - } - - protected override bool CanCompile(RBuildSourceFile file) - { - return true; - } - - protected override void WriteFileBuildInstructions(SourceFile sourceFile) - { - } - - protected override void WriteLinker() - { - } - - protected override void WriteSpecific() - { - base.WriteSpecific(); - - Makefile.WriteLine(Module.MakeFileTargetMacro + ": $(cabman_TARGET) " + ModuleFolder.OutputFullPath); - Makefile.WriteLine("\t$(ECHO_CABMAN)"); - Makefile.WriteLine("\t$(Q)$(cabman_TARGET) -M raw -S " + Module.MakeFileTargetMacro + " " + Module.MakeFileSourcesMacro); - Makefile.WriteLine(); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwEmbeddedTypeLibModuleHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwEmbeddedTypeLibModuleHandler.cs deleted file mode 100644 index 752cfaf896b..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwEmbeddedTypeLibModuleHandler.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Backends -{ - public class MingwEmbeddedTypeLibModuleHandler : MingwRBuildModuleHandler - { - public MingwEmbeddedTypeLibModuleHandler(RBuildModule module) - : base(module) - { - } - - protected override void CheckSourceFiles() - { - if (Module.SourceFiles.Count > 1) - { - throw new BuildException("Modules of type 'EmbeddedTypeLib' can only contain 1 source file , this module contains '{0}", Module.SourceFiles.Count); - } - } - - protected override bool CanCompile(RBuildSourceFile file) - { - return (file.IsWidl); - } - - protected override void WriteFileBuildInstructions(SourceFile sourceFile) - { - if (sourceFile.File.IsWidl) - { - WriteWIDLTypeLibrary(sourceFile); - } - } - - protected override void WriteLinker() - { - //WriteAr(); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwHostStaticLibraryModuleHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwHostStaticLibraryModuleHandler.cs deleted file mode 100644 index 3a70452326f..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwHostStaticLibraryModuleHandler.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Backends -{ - public class MingwHostStaticLibraryModuleHandler : MingwStaticLibraryModuleHandler - { - public MingwHostStaticLibraryModuleHandler(RBuildModule module) - : base(module) - - { - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwIdlHeaderModuleHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwIdlHeaderModuleHandler.cs deleted file mode 100644 index f831d9b6199..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwIdlHeaderModuleHandler.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Backends; - -namespace SysGen.BuildEngine -{ - public class MingwMessageHeaderModuleHandler : MingwRBuildModuleHandler - { - public MingwMessageHeaderModuleHandler(RBuildModule module) - : base(module) - { - } - - protected override void WriteCommon() - { - } - - protected override void WriteLinker() - { - } - - protected override void WriteSpecific() - { - WritePreconditions(); - } - - protected override bool CanCompile(RBuildSourceFile file) - { - return (file.IsMessageTable); - } - - protected override void WriteFileBuildInstructions(SourceFile sourceFile) - { - if (sourceFile.File.IsMessageTable) - { - WriteWMC(sourceFile); - } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwKernelModeDLLModuleHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwKernelModeDLLModuleHandler.cs deleted file mode 100644 index e0d03fe16d0..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwKernelModeDLLModuleHandler.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Backends -{ - public class MingwKernelModeDLLModuleHandler : MingwRBuildModuleHandler - { - public MingwKernelModeDLLModuleHandler(RBuildModule module) - : base(module) - { - } - - protected override bool CanCompile(RBuildSourceFile file) - { - return (file.IsHeader || file.IsC || file.IsCPP || file.IsWindResource || file.IsAssembler || file.IsWidl || file.IsNASM || file.IsWineBuild); - } - - protected override void WriteFileBuildInstructions(SourceFile sourceFile) - { - if (sourceFile.File.IsHeader) - { - WritePCH(sourceFile); - } - - if (sourceFile.File.IsC) - { - WriteCCompiler(sourceFile); - } - - if (sourceFile.File.IsCPP) - { - WriteCPPCompiler(sourceFile); - } - - if (sourceFile.File.IsWindResource) - { - WriteWindResCompiler(sourceFile); - } - - if (sourceFile.File.IsNASM) - { - WriteNASMCompiler(sourceFile); - } - - if (sourceFile.File.IsAssembler) - { - WriteASMCompiler(sourceFile); - } - - if (sourceFile.File.IsWidl) - { - WriteWIDLHeader(sourceFile); - } - - if (sourceFile.File.IsWineBuild) - { - WriteWineBuild(sourceFile); - } - } - - protected override string SubSystem - { - get { return "native"; } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwKernelModeDriverModuleHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwKernelModeDriverModuleHandler.cs deleted file mode 100644 index ebbda411189..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwKernelModeDriverModuleHandler.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Backends -{ - public class MingwKernelModeDriverModuleHandler : MingwRBuildModuleHandler - { - public MingwKernelModeDriverModuleHandler(RBuildModule module) - : base(module) - { - } - - protected override bool CanCompile(RBuildSourceFile file) - { - return (file.IsC || file.IsWindResource || file.IsCPP || file.IsAssembler || file.IsWineBuild || file.IsHeader); - } - - protected override void WriteFileBuildInstructions(SourceFile sourceFile) - { - if (sourceFile.File.IsHeader) - { - WritePCH(sourceFile); - } - - if (sourceFile.File.IsWineBuild) - { - WriteWineBuild(sourceFile); - } - - if (sourceFile.File.IsC) - { - WriteCCompiler(sourceFile); - } - - if (sourceFile.File.IsWindResource) - { - WriteWindResCompiler(sourceFile); - } - - if (sourceFile.File.IsCPP) - { - WriteCPPCompiler(sourceFile); - } - - if (sourceFile.File.IsAssembler) - { - WriteASMCompiler(sourceFile); - } - } - - protected override string SubSystem - { - get { return "native"; } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwKernelModuleHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwKernelModuleHandler.cs deleted file mode 100644 index c432f7f0c3c..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwKernelModuleHandler.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Backends -{ - public class MingwKernelModuleHandler : MingwRBuildModuleHandler - { - public MingwKernelModuleHandler(RBuildModule module) - : base(module) - { - } - - protected override bool CanCompile(RBuildSourceFile file) - { - return (file.IsHeader || file.IsC || file.IsWindResource || file.IsCPP || file.IsAssembler || file.IsMessageTable); - } - - protected override void WriteFileBuildInstructions(SourceFile sourceFile) - { - if (sourceFile.File.IsHeader) - { - WritePCH(sourceFile); - } - - if (sourceFile.File.IsC) - { - WriteCCompiler(sourceFile); - } - - if (sourceFile.File.IsWindResource) - { - WriteWindResCompiler(sourceFile); - } - - if (sourceFile.File.IsCPP) - { - WriteCPPCompiler(sourceFile); - } - - if (sourceFile.File.IsAssembler) - { - WriteASMCompiler(sourceFile); - } - - if (sourceFile.File.IsMessageTable) - { - WriteWMC(sourceFile); - } - } - - protected override string AdditionalParameters2 - { - get - { - return ""; - //return "-Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -nostartfiles -shared"; - } - } - - protected override string SubSystem - { - get { return "native"; } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwMessageHeaderModuleHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwMessageHeaderModuleHandler.cs deleted file mode 100644 index c08b9098994..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwMessageHeaderModuleHandler.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Backends; - -namespace SysGen.BuildEngine -{ - public class MingwIdlHeaderModuleHandler : MingwRBuildModuleHandler - { - public MingwIdlHeaderModuleHandler(RBuildModule module) - : base(module) - { - } - - protected override void WriteCommon() - { - } - - protected override void WriteLinker() - { - } - - protected override void WriteSpecific() - { - WriteWIDLFlags(); -// WriteTarget(); - WritePreconditions(); - } - - protected override bool CanCompile(RBuildSourceFile file) - { - return (file.IsWidl); - } - - protected override void WriteWIDLFlags() - { - Makefile.WriteLine(Module.MakeFileWIDLFlags + " := " + Project.MakeFileWIDLFlagsMacro + " -I" + ModuleFolder.BaseFullPath); - } - - protected override void WriteFileBuildInstructions(SourceFile sourceFile) - { - if (sourceFile.File.IsWidl) - { - WriteWIDLHeader(sourceFile); - } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwNativeCUIModuleHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwNativeCUIModuleHandler.cs deleted file mode 100644 index 4a8f5ee3436..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwNativeCUIModuleHandler.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Backends -{ - public class MingwNativeCUIModuleHandler : MingwRBuildModuleHandler - { - public MingwNativeCUIModuleHandler(RBuildModule module) - : base(module) - { - } - - protected override bool CanCompile(RBuildSourceFile file) - { - return (file.IsHeader || file.IsC || file.IsWindResource); - } - - protected override void WriteFileBuildInstructions(SourceFile sourceFile) - { - if (sourceFile.File.IsHeader) - { - WritePCH(sourceFile); - } - - if (sourceFile.File.IsC) - { - WriteCCompiler(sourceFile); - } - - if (sourceFile.File.IsWindResource) - { - WriteWindResCompiler(sourceFile); - } - } - - protected override string SubSystem - { - get { return "native"; } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwNativeDLLModuleHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwNativeDLLModuleHandler.cs deleted file mode 100644 index 3f23397da34..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwNativeDLLModuleHandler.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Backends -{ - public class MingwNativeDLLModuleHandler : MingwRBuildModuleHandler - { - public MingwNativeDLLModuleHandler(RBuildModule module) - : base(module) - { - } - - protected override bool CanCompile(RBuildSourceFile file) - { - return (file.IsC || file.IsWindResource || file.IsAssembler || file.IsMessageTable); - } - - protected override void WriteFileBuildInstructions(SourceFile sourceFile) - { - if (sourceFile.File.IsC) - { - WriteCCompiler(sourceFile); - } - - if (sourceFile.File.IsMessageTable) - { - WriteWMC(sourceFile); - } - - if (sourceFile.File.IsWindResource) - { - WriteWindResCompiler(sourceFile); - } - - if (sourceFile.File.IsAssembler) - { - WriteASMCompiler(sourceFile); - } - } - - protected override string SubSystem - { - get { return "native"; } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwObjectLibraryModuleHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwObjectLibraryModuleHandler.cs deleted file mode 100644 index b95d425e431..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwObjectLibraryModuleHandler.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Backends -{ - public class MingwObjectLibraryModuleHandler : MingwRBuildModuleHandler - { - public MingwObjectLibraryModuleHandler(RBuildModule module) - : base(module) - { - } - - protected override bool CanCompile(RBuildSourceFile file) - { - return (file.IsHeader || file.IsC || file.IsNASM || file.IsAssembler || file.IsMessageTable); - } - - protected override void WriteFileBuildInstructions(SourceFile sourceFile) - { - if (sourceFile.File.IsHeader) - { - WritePCH(sourceFile); - } - - if (sourceFile.File.IsC) - { - WriteCCompiler(sourceFile); - } - - if (sourceFile.File.IsAssembler) - { - WriteASMCompiler(sourceFile); - } - - if (sourceFile.File.IsNASM) - { - WriteNASMCompiler(sourceFile); - } - - if (sourceFile.File.IsMessageTable) - { - WriteWMC(sourceFile); - } - } - - protected override void WriteLinker() - { - } - - protected override string SubSystem - { - get { return "console"; } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwPackageModuleHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwPackageModuleHandler.cs deleted file mode 100644 index ce2f83a2108..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwPackageModuleHandler.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Backends -{ - public class MingwPackageModuleHandler : MingwRBuildModuleHandler - { - public MingwPackageModuleHandler(RBuildModule module) - : base(module) - { - } - - protected override bool CanCompile(RBuildSourceFile file) - { - return true; - } - - protected override void WriteFileBuildInstructions(SourceFile sourceFile) - { - } - - protected override void WriteLinker() - { - } - - protected override void WriteSpecific() - { - base.WriteSpecific(); - - //Makefile.WriteLine(Module.MakeFileTargetMacro + ": $(cabman_TARGET) " + ModuleFolder.OutputFullPath); - //Makefile.WriteLine("\t$(ECHO_CABMAN)"); - //Makefile.WriteLine("\t$(Q)$(cabman_TARGET) -M raw -S " + Module.MakeFileTargetMacro + " " + Module.MakeFileSourcesMacro); - //Makefile.WriteLine(); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwRBuildProjectHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwRBuildProjectHandler.cs deleted file mode 100644 index 4f7cfaaff47..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwRBuildProjectHandler.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Backends -{ - public class MingwRBuildProjectHandler : MingwRBuildElementHandler - { - public MingwRBuildProjectHandler(RBuildProject project) - : base(project) - { - } - - protected override void WriteSpecific() - { - Makefile.WritePropertyListStart(Project.MakeFileGCCOptions); - WriteCompilerFlags(Makefile, Project); - Makefile.WritePropertyListEnd(); - - Makefile.WritePropertyAppend(Project.MakeFileCFlags, "-Wall"); - - if (Project.Properties["OARCH"].Value != string.Empty) - { - Makefile.WritePropertyAppend(Project.MakeFileCFlags, "-march=$(OARCH)"); - } - - Makefile.WritePropertyAppend(Project.MakeFileCFlags, Project.MakeFileGCCOptionsMacro); - } - - public RBuildProject Project - { - get { return m_BuildElement as RBuildProject; } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwRpcClientHeaderModuleHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwRpcClientHeaderModuleHandler.cs deleted file mode 100644 index c4fa641f31e..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwRpcClientHeaderModuleHandler.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Backends -{ - public class MingwRpcClientHeaderModuleHandler : MingwRpcServerHeaderModuleHandler - { - public MingwRpcClientHeaderModuleHandler(RBuildModule module) - : base(module) - { - } - - protected override bool CanCompile(RBuildSourceFile file) - { - return (file.IsWidl); - } - - protected override void WriteCleanTarget() - { - base.WriteCleanTarget(); - - foreach (RBuildSourceFile file in Module.SourceFiles) - { - SourceFile cFile = new SourceFile(file, Module, SysGen); - - Makefile.WriteLine("\t-@$(rm) " + cFile.SourceCodeHeaderFile.IntermediateFullPath + " 2>$(NUL)"); - Makefile.WriteLine("\t-@$(rm) " + cFile.SourceCodeObjectFile.IntermediateFullPath + " 2>$(NUL)"); - } - } - - protected override void WriteFileBuildInstructions(SourceFile sourceFile) - { - if (sourceFile.File.IsWidl) - { - WriteWIDLRpcHeader(sourceFile); - } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwRpcProxyModuleHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwRpcProxyModuleHandler.cs deleted file mode 100644 index f15d03d9301..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwRpcProxyModuleHandler.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Backends -{ - public class MingwRpcProxyModuleHandler : MingwRpcServerHeaderModuleHandler - { - public MingwRpcProxyModuleHandler(RBuildModule module) - : base(module) - { - } - - protected override bool CanCompile(RBuildSourceFile file) - { - return (file.IsWidl); - } - - protected override void WriteCleanTarget() - { - base.WriteCleanTarget(); - - foreach (RBuildSourceFile file in Module.SourceFiles) - { - SourceFile cFile = new SourceFile(file, Module, SysGen); - - Makefile.WriteLine("\t-@$(rm) " + cFile.SourceCodeHeaderFile.IntermediateFullPath + " 2>$(NUL)"); - Makefile.WriteLine("\t-@$(rm) " + cFile.SourceCodeObjectFile.IntermediateFullPath + " 2>$(NUL)"); - } - } - - protected override void WriteFileBuildInstructions(SourceFile sourceFile) - { - if (sourceFile.File.IsWidl) - { - WriteWIDLRpcHeader(sourceFile); - } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwRpcServerHeaderModuleHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwRpcServerHeaderModuleHandler.cs deleted file mode 100644 index a09bbb3069a..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwRpcServerHeaderModuleHandler.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Backends -{ - public class MingwRpcServerHeaderModuleHandler : MingwIdlHeaderModuleHandler - { - public MingwRpcServerHeaderModuleHandler(RBuildModule module) - : base(module) - { - } - - protected override void WriteSpecific() - { - WriteCFlags(); - base.WriteSpecific(); - WriteModuleCommon(); - } - - protected override void WriteCleanTarget() - { - base.WriteCleanTarget(); - - foreach (RBuildSourceFile file in Module.SourceFiles) - { - SourceFile cFile = new SourceFile(file, Module, SysGen); - - Makefile.WriteLine("\t-@$(rm) " + cFile.SourceCodeHeaderFile.IntermediateFullPath + " 2>$(NUL)"); - Makefile.WriteLine("\t-@$(rm) " + cFile.SourceCodeActualFile.IntermediateFullPath + " 2>$(NUL)"); - } - } - - protected override bool CanCompile(RBuildSourceFile file) - { - return (file.IsWidl); - } - - protected override void WriteFileBuildInstructions(SourceFile sourceFile) - { - if (sourceFile.File.IsWidl) - { - WriteWIDLRpcHeader(sourceFile); - } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwStaticLibraryModuleHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwStaticLibraryModuleHandler.cs deleted file mode 100644 index f915a86b2f0..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwStaticLibraryModuleHandler.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Backends -{ - public class MingwStaticLibraryModuleHandler : MingwRBuildModuleHandler - { - public MingwStaticLibraryModuleHandler(RBuildModule module) - : base(module) - - { - } - - /* - protected override void WriteLibs(RBuildModule module) - { - } - */ - - protected override void WriteCFlags() - { - base.WriteCFlags(); - - if (Module.IsStartupLib) - { - Makefile.WritePropertyAppend(Module.MakeFileCFlags, "-Wno-main"); - } - } - - protected override bool CanCompile(RBuildSourceFile file) - { - return (file.IsHeader ||file.IsC || file.IsAssembler); - } - - protected override void WriteFileBuildInstructions(SourceFile sourceFile) - { - if (sourceFile.File.IsHeader) - { - WritePCH(sourceFile); - } - - if (sourceFile.File.IsC) - { - WriteCCompiler(sourceFile); - } - - if (sourceFile.File.IsAssembler) - { - WriteASMCompiler(sourceFile); - } - } - - protected override void WriteLinker() - { - WriteAr(); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwWin32CUIModuleHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwWin32CUIModuleHandler.cs deleted file mode 100644 index 5097b3971c0..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwWin32CUIModuleHandler.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Backends; - -namespace SysGen.BuildEngine -{ - public class MingwWin32CUIModuleHandler : MingwRBuildModuleHandler - { - public MingwWin32CUIModuleHandler(RBuildModule module) - : base(module) - { - } - - protected override bool CanCompile(RBuildSourceFile file) - { - return (file.IsHeader || file.IsC || file.IsCPP || file.IsWindResource); - } - - protected override void WriteFileBuildInstructions(SourceFile sourceFile) - { - if (sourceFile.File.IsHeader) - { - WritePCH(sourceFile); - } - - if (sourceFile.File.IsC) - { - WriteCCompiler(sourceFile); - } - - if (sourceFile.File.IsCPP) - { - WriteCPPCompiler(sourceFile); - } - - if (sourceFile.File.IsWindResource) - { - WriteWindResCompiler(sourceFile); - } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwWin32DLLModuleHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwWin32DLLModuleHandler.cs deleted file mode 100644 index a8b29f0a082..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwWin32DLLModuleHandler.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Backends -{ - public class MingwWin32DLLModuleHandler : MingwRBuildModuleHandler - { - public MingwWin32DLLModuleHandler(RBuildModule module) - : base(module) - { - } - - protected override bool CanCompile(RBuildSourceFile file) - { - return (file.IsHeader || file.IsC || file.IsCPP || file.IsWindResource || file.IsAssembler || file.IsWineBuild || file.IsWidl || file.IsMessageTable); - } - - protected override void WriteFileBuildInstructions(SourceFile sourceFile) - { - if (sourceFile.File.IsHeader) - { - WritePCH(sourceFile); - } - - if (sourceFile.File.IsWineBuild) - { - WriteWineBuild(sourceFile); - } - - if (sourceFile.File.IsC) - { - WriteCCompiler(sourceFile); - } - - if (sourceFile.File.IsCPP) - { - WriteCPPCompiler(sourceFile); - } - - if (sourceFile.File.IsWindResource) - { - WriteWindResCompiler(sourceFile); - } - - if (sourceFile.File.IsAssembler) - { - WriteASMCompiler(sourceFile); - } - - if (sourceFile.File.IsMessageTable) - { - WriteWMC(sourceFile); - } - - if (sourceFile.File.IsWidl) - { - WriteWIDLHeader(sourceFile); - } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwWin32GUIModuleHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwWin32GUIModuleHandler.cs deleted file mode 100644 index b6687778a5d..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwWin32GUIModuleHandler.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Backends -{ - public class MingwWin32GUIModuleHandler : MingwRBuildModuleHandler - { - public MingwWin32GUIModuleHandler(RBuildModule module) - : base(module) - { - } - - protected override bool CanCompile(RBuildSourceFile file) - { - return (file.IsHeader || file.IsC || file.IsCPP || file.IsWindResource || file.IsWineBuild); - } - - protected override void WriteFileBuildInstructions(SourceFile sourceFile) - { - if (sourceFile.File.IsHeader) - { - WritePCH(sourceFile); - } - - if (sourceFile.File.IsC) - { - WriteCCompiler(sourceFile); - } - - if (sourceFile.File.IsCPP) - { - WriteCPPCompiler(sourceFile); - } - - if (sourceFile.File.IsWindResource) - { - WriteWindResCompiler(sourceFile); - } - - if (sourceFile.File.IsWineBuild) - { - WriteWineBuild(sourceFile); - } - } - - protected override string SubSystem - { - get { return "windows"; } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwWin32OCXModuleHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwWin32OCXModuleHandler.cs deleted file mode 100644 index 7fe4f0b9c1a..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/ModuleHandlers/MingwWin32OCXModuleHandler.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Backends -{ - public class MingwWin32OCXModuleHandler : MingwRBuildModuleHandler - { - public MingwWin32OCXModuleHandler(RBuildModule module) - : base(module) - { - } - - protected override bool CanCompile(RBuildSourceFile file) - { - return (file.IsHeader ||file.IsC || file.IsWindResource || file.IsCPP || file.IsWineBuild); - } - - protected override void WriteFileBuildInstructions(SourceFile sourceFile) - { - if (sourceFile.File.IsHeader) - { - WritePCH(sourceFile); - } - - if (sourceFile.File.IsC) - { - WriteCCompiler(sourceFile); - } - - if (sourceFile.File.IsWindResource) - { - WriteWindResCompiler(sourceFile); - } - - if (sourceFile.File.IsCPP) - { - WriteCPPCompiler(sourceFile); - } - - if (sourceFile.File.IsWineBuild) - { - WriteWineBuild(sourceFile); - } - } - - protected override string SubSystem - { - get { return "native"; } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/TargetsHandlers/Base/MingwRBuildTargetHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/TargetsHandlers/Base/MingwRBuildTargetHandler.cs deleted file mode 100644 index b99413d3724..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/Mingw/TargetsHandlers/Base/MingwRBuildTargetHandler.cs +++ /dev/null @@ -1,307 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine; - -namespace SysGen.BuildEngine.Backends -{ - public class MingwLiveCDTargetHandler : MingwRBuildIsoModuleHandler - { - public MingwLiveCDTargetHandler(RBuildModule module) - : base(module) - { - } - - protected override void AddAditionalFiles() - { - //RBuildCDFile livecdBootIni = new RBuildCDFile(); - - //livecdBootIni.Base = "boot\bootdata"; - //livecdBootIni.Name = "livecd.ini"; - //livecdBootIni.NewName = ""; - } - - protected override void WriteCabinetManager() - { - // Not required - } - - protected override void WriteMakeHive() - { - Makefile.WriteLine("\t$(ECHO_MKHIVE)"); - Makefile.WriteLine("\t$(mkhive_TARGET) boot\bootdata " + @"$(OUTPUT)\livecd\reactos\system32\config boot\bootdata\livecd.inf boot\bootdata\hiveinst.inf"); - } - - protected override void WriteCopyCDFiles() - { - foreach (RBuildOutputFile platformFile in SysGen.Project.Files) - { - if (platformFile is RBuildPlatformFile || platformFile is RBuildCDFile) - { - } - else - { - RBuildCDFile cdFile = new RBuildCDFile(); - - cdFile.Root = PathRoot.LiveCD; - cdFile.Name = platformFile.Name; - cdFile.Base = platformFile.InstallBase; - - Makefile.WriteLine("\t$(ECHO_CP)"); - Makefile.WriteLine("\t$(cp) " + ResolveRBuildFilePath(platformFile) + " " + ResolveRBuildFilePath(cdFile) + " 1>$(NUL)"); - } - } - - foreach (RBuildModule module in SysGen.Project.Modules) - { - if (module.IsInstallable) - { - RBuildCDFile cdFile = new RBuildCDFile(); - - cdFile.Root = PathRoot.LiveCD; - cdFile.Name = module.TargetFile.Name; - cdFile.Base = "reactos" + "//" + module.InstallBase; - - Makefile.WriteLine("\t$(ECHO_CP)"); - Makefile.WriteLine("\t$(cp) " + ResolveRBuildFilePath(module.TargetFile) + " " + ResolveRBuildFilePath(cdFile) + " 1>$(NUL)"); - } - } - - Makefile.WriteLine("\t$(ECHO_CP)"); - Makefile.WriteLine("\t${cp} " + @"boot\bootdata\livecd.ini $(OUTPUT)\livecd\freeldr.ini 1>$(NUL)"); - } - - public override RBuildFolder WorkingFolder - { - get { return new RBuildFolder(PathRoot.Output, "LiveCD"); } - } - - protected override string ResolveRBuildFilePath(RBuildFile file) - { - if (file.Root == PathRoot.CDOutput) - return Path.Combine(SysGen.LiveCDOutputDirectory, file.FullPath); - - return SysGen.ResolveRBuildFilePath(file); - } - } - - public class MingwLiveCDRegTestTargetHandler : MingwLiveCDTargetHandler - { - public MingwLiveCDRegTestTargetHandler(RBuildModule module) - : base(module) - { - } - public override RBuildFolder WorkingFolder - { - get { return new RBuildFolder(PathRoot.Output, "livecdregtest"); } - } - } - - public class MingwBootCDRegTestTargetHandler : MingwBootCDTargetHandler - { - public MingwBootCDRegTestTargetHandler(RBuildModule module) - : base(module) - { - } - - public override RBuildFolder WorkingFolder - { - get { return new RBuildFolder(PathRoot.Output , "cdregtest"); } - } - } - - public class MingwBootCDTargetHandler : MingwRBuildIsoModuleHandler - { - public MingwBootCDTargetHandler(RBuildModule module) - : base(module) - { - } - - protected override void WriteCopyCDFiles() - { - base.WriteCopyCDFiles(); - - foreach (RBuildModule module in SysGen.Project.Platform.Modules) - { - if ((module.Enabled) && (module.IsBootstrap)) - { - RBuildBootstrapFile bootstrapFile = module.Bootstrap; - - if (bootstrapFile != null) - { - Makefile.WriteLine("\t$(ECHO_CP)"); - Makefile.WriteLine("\t$(cp) " + ResolveRBuildFilePath(bootstrapFile) + " " + ResolveRBuildFilePath(bootstrapFile.CDNewFile) + " 1>$(NUL)"); - } - } - } - - foreach (RBuildOutputFile file in SysGen.Project.Files) - { - RBuildBootstrapFile bootstrapFile = file as RBuildBootstrapFile; - - if (bootstrapFile != null) - { - Makefile.WriteLine("\t$(ECHO_CP)"); - Makefile.WriteLine("\t$(cp) " + ResolveRBuildFilePath(bootstrapFile) + " " + ResolveRBuildFilePath(bootstrapFile.CDNewFile) + " 1>$(NUL)"); - } - } - } - - protected override void AddFolders() - { - //Ensure folder exists - base.AddFolders(); - - Module.Folders.Add(new RBuildFolder(WorkingFolder, "loader")); - Module.Folders.Add(new RBuildFolder(WorkingFolder, "reactos")); - Module.Folders.Add(new RBuildFolder(WorkingFolder, "reactos/system32")); - } - - protected override string ResolveRBuildFilePath(RBuildFile file) - { - if (file.Root == PathRoot.CDOutput) - return SysGen.NormalizePath(Path.Combine(SysGen.BootCDOutputDirectory, file.FullPath)); - - return SysGen.ResolveRBuildFilePath(file); - } - - public override RBuildFolder WorkingFolder - { - get { return new RBuildFolder(PathRoot.Output , "cd"); } - } - } - - public abstract class MingwRBuildIsoModuleHandler : MingwRBuildModuleHandler - { - private const string PROFILES_FOLDER = "Profiles"; - private const string ALL_USERS_FOLDER = "All Users"; - private const string DEFAULT_USER_FOLDER = "Default User"; - private const string DESKTOP_FOLDER = "Desktop"; - private const string MY_DOCUMENTS_FOLDER = "My Documents"; - - protected List m_BuildTools = new List(); - - public MingwRBuildIsoModuleHandler(RBuildModule module) - : base(module) - { - } - - protected List BuildTools - { - get { return m_BuildTools; } - } - - public override void GenerateMakeFile() - { - AddAditionalFiles(); - AddFolders(); - - WriteFolders(); - WriteTarget(); - WriteCabinetManager(); - WriteCopyCDFiles(); - WriteMakeRegistryHives(); - WriteMakeHive(); - WriteCDMake(); - WriteCleanTarget(); - } - - protected virtual void AddAditionalFiles() - { - } - - protected virtual void WriteMakeHive() - { - } - - protected virtual void AddFolders() - { - Module.Folders.Add(WorkingFolder); - } - - protected virtual void WriteTarget() - { - Makefile.WriteTarget(Module.MakeFileTargetMacro); - Makefile.WriteIndentedLine("all"); - Makefile.WriteIndentedLine("$(cabman_TARGET)"); - Makefile.WriteIndentedLine("$(cdmake_TARGET)"); - Makefile.WriteIndentedLine("$(mkhive_TARGET)"); - Makefile.WriteIndentedLine(Module.MakeFileFoldersMacro); - - foreach (RBuildModule module in SysGen.Project.Platform.Modules) - { - if ((module.Enabled) && (module.IsBootstrap)) - { - Makefile.WriteIndentedLine(module.MakeFileTargetMacro); - } - } - - Makefile.WriteIndentedLine(BootModule.MakeFileTargetMacro); - Makefile.WriteLine(); - } - - protected virtual void WriteMakeRegistryHives() - { - } - - protected virtual void WriteCabinetManager() - { - Makefile.WriteLine("\t$(ECHO_CABMAN)"); - Makefile.WriteLine("\t$(Q)$(cabman_TARGET) -C " + SysGen.Project.PackagesFile + @" -L $(OUTPUT)\cd\reactos -I -P $(OUTPUT)"); - Makefile.WriteLine("\t$(Q)$(cabman_TARGET) -C " + SysGen.Project.PackagesFile + @" -RC $(OUTPUT)\cd\reactos\reactos.inf -L $(OUTPUT)\cd\reactos -N -P $(OUTPUT)"); - Makefile.WriteLine("\t-@${rm} " + @"$(OUTPUT)\cd\reactos\reactos.inf" + " 2>$(NUL)"); - Makefile.WriteLine(); - } - - protected virtual void WriteCDMake() - { - Makefile.WriteLine("\t$(ECHO_CDMAKE)"); - Makefile.WriteLine("\t$(Q)$(cdmake_TARGET) -v -j -m -b " + ResolveRBuildFilePath(BootModule.TargetFile) + " " + ResolveRBuildFolderPath(WorkingFolder) + " " + CDLabel + " " + IsoImage); - Makefile.WriteLine(); - } - - protected virtual void WriteCopyCDFiles() - { - foreach (RBuildOutputFile file in SysGen.Project.Files) - { - RBuildCDFile cdFile = file as RBuildCDFile; - - if (cdFile != null) - { - Makefile.WriteLine("\t$(ECHO_CP)"); - Makefile.WriteLine("\t$(cp) " + ResolveRBuildFilePath(cdFile) + " " + ResolveRBuildFilePath(cdFile.CDNewFile) + " 1>$(NUL)"); - } - } - } - - protected virtual RBuildModule BootModule - { - get { return Module.BootSector; } - } - - public abstract RBuildFolder WorkingFolder { get; } - - public virtual string IsoImage - { - get { return ResolveRBuildFilePath(Module.TargetFile); } - } - - public virtual string CDLabel - { - get { return Module.CDLabel; } - } - - protected override bool CanCompile(RBuildSourceFile file) - { - return false; - } - - protected override void WriteFileBuildInstructions(SourceFile sourceFile) - { - throw new Exception("The method or operation is not implemented."); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/ProjectTreeReport/ProjectTreeReport.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/ProjectTreeReport/ProjectTreeReport.cs deleted file mode 100644 index 3952090f289..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/ProjectTreeReport/ProjectTreeReport.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using System.Web.UI; -using System.IO; -using System.Collections.Generic; -using System.Text; -using System.Xml; - -using SysGen.BuildEngine.Backends; -using SysGen.RBuild.Framework; -using SysGen.BuildEngine; - -namespace SysGen.BuildEngine.Backends -{ - public class ProjectTreeReport : Backend - { - public ProjectTreeReport(SysGenEngine sysgen) - : base(sysgen) - { - } - - protected override string FriendlyName - { - get { return "Tree Report"; } - } - - protected override void Generate() - { - using (StreamWriter sw = new StreamWriter(@"C:\resTree.htm")) - { - using (HtmlTextWriter writer = new HtmlTextWriter(sw)) - { - WriteModule(SysGen.RootTask , writer); - } - } - } - - private void WriteModule(Task task, HtmlTextWriter writer) - { - ITaskContainer container = task as ITaskContainer; - - writer.AddAttribute(HtmlTextWriterAttribute.Cellpadding, "5"); - writer.AddAttribute(HtmlTextWriterAttribute.Cellspacing, "5"); - writer.AddAttribute(HtmlTextWriterAttribute.Border, "1"); - writer.AddAttribute(HtmlTextWriterAttribute.Bordercolor, "#000000"); - writer.RenderBeginTag(HtmlTextWriterTag.Table); - writer.RenderBeginTag(HtmlTextWriterTag.Tr); - writer.RenderBeginTag(HtmlTextWriterTag.Td); - writer.Write(task.Name); - - if (container != null) - { - if (container.ChildTasks.Count > 0) - { - foreach (Task childTask in container.ChildTasks) - { - WriteModule(childTask, writer); - } - } - } - - writer.RenderEndTag(); - writer.RenderEndTag(); - writer.RenderEndTag(); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/RBuildDB/RBuildDBBackend.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/RBuildDB/RBuildDBBackend.cs deleted file mode 100644 index 032af573ba7..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/RBuildDB/RBuildDBBackend.cs +++ /dev/null @@ -1,102 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; -using System.Xml; - -using SysGen.BuildEngine.Backends; -using SysGen.RBuild.Framework; -using SysGen.BuildEngine; - -namespace SysGen.BuildEngine.Backends -{ - public class RBuildDBBackend : Backend - { - public RBuildDBBackend(SysGenEngine sysgen) - : base(sysgen) - { - } - - protected override string FriendlyName - { - get { return "RBuild Database"; } - } - - private string RBuildDBFile - { - get { return Path.Combine(SysGen.BaseDirectory, "rbuilddb.xml"); } - } - - protected override void Generate() - { - // Creates an XML file is not exist - using (XmlTextWriter writer = new XmlTextWriter(RBuildDBFile, Encoding.ASCII)) - { - writer.Indentation = 4; - writer.Formatting = Formatting.Indented; - - // Starts a new document - writer.WriteStartDocument(); - writer.WriteComment("File autogenerated by SysGen"); - writer.WriteStartElement("catalog"); - - writer.WriteStartElement("modules"); - foreach (RBuildModule module in Project.Modules) - { - writer.WriteStartElement("module"); - writer.WriteAttributeString("name", module.Name); - writer.WriteAttributeString("type", module.Type.ToString()); - writer.WriteAttributeString("base", module.Base); - writer.WriteAttributeString("desc", module.Description); - writer.WriteAttributeString("path", module.CatalogPath); - writer.WriteAttributeString("enabled", module.Enabled.ToString()); - - writer.WriteStartElement("libraries"); - - foreach (RBuildModule library in module.Libraries) - writer.WriteElementString("library", library.Name); - - writer.WriteEndElement(); - - writer.WriteStartElement("dependencies"); - - foreach (RBuildModule dependency in module.Dependencies) - writer.WriteElementString("dependency", dependency.Name); - - writer.WriteEndElement(); - - writer.WriteStartElement("requeriments"); - - foreach (RBuildModule requirement in module.Requeriments) - writer.WriteElementString("requires", requirement.Name); - - writer.WriteEndElement(); - - writer.WriteEndElement(); - } - writer.WriteEndElement(); - - writer.WriteStartElement("languages"); - foreach (RBuildLanguage language in Project.Languages) - { - writer.WriteStartElement("language"); - writer.WriteAttributeString("name", language.Name); - writer.WriteEndElement(); - } - writer.WriteEndElement(); - - writer.WriteStartElement("debugchannels"); - foreach (RBuildDebugChannel language in Project.DebugChannels) - { - writer.WriteStartElement("debugchannel"); - writer.WriteAttributeString("name", language.Name); - writer.WriteEndElement(); - } - writer.WriteEndElement(); - writer.WriteEndElement(); - - writer.WriteEndDocument(); - } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/RGenStats/RGenStatBackend.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/RGenStats/RGenStatBackend.cs deleted file mode 100644 index 113f0fd290c..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/RGenStats/RGenStatBackend.cs +++ /dev/null @@ -1,110 +0,0 @@ -using System; -using System.Text.RegularExpressions; -using System.Web.UI; -using System.IO; -using System.Collections.Generic; -using System.Text; -using System.Xml; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine; -using SysGen.BuildEngine.Tasks; -using SysGen.BuildEngine.Backends; - -namespace SysGen.BuildEngine.Backends -{ - public class RGenStatBackend : Backend - { - public RGenStatBackend(SysGenEngine sysgen) - : base(sysgen) - { - } - - protected override string FriendlyName - { - get { return "RGenStat Report"; } - } - - protected override void Generate() - { - using (StreamWriter sw = new StreamWriter(Directory.GetCurrentDirectory() + "\\apistatus.lst")) - { - sw.WriteLine("; Format:"); - sw.WriteLine("; COMPONENT_NAME PATH_TO_COMPONENT_SOURCES"); - sw.WriteLine(); - sw.WriteLine("; Where:"); - sw.WriteLine("; COMPONENT_NAME - Name of the module. Eg. kernel32."); - sw.WriteLine("; PATH_TO_COMPONENT_SOURCES - Relative path to sources (relative to where rgenstat is run from)."); - sw.WriteLine(); - - foreach (RBuildModule module in Project.Modules) - { - if (module.Type == ModuleType.Kernel || - module.Type == ModuleType.KernelModeDLL || - module.Type == ModuleType.KernelModeDriver || - module.Type == ModuleType.StaticLibrary || - module.Type == ModuleType.ObjectLibrary || - module.Type == ModuleType.Win32DLL || - module.Type == ModuleType.Win32OCX || - module.Type == ModuleType.KeyboardLayout) - { - sw.WriteLine("{0} {1}", - module.Name, - module.BaseURI.ToString().Replace("\\", "/")); - } - } - } - - //using (StreamWriter sw = new StreamWriter(Directory.GetCurrentDirectory() + "\\descriptions.rbuild")) - //{ - // sw.WriteLine(""); - // sw.WriteLine(""); - // sw.WriteLine(""); - // sw.WriteLine(""); - - // foreach (RBuildModule module in Project.Modules) - // { - // if (module.Type == ModuleType.Kernel || - // module.Type == ModuleType.KernelModeDLL || - // module.Type == ModuleType.KernelModeDriver || - // module.Type == ModuleType.BootLoader || - // module.Type == ModuleType.BootProgram || - // module.Type == ModuleType.BootSector || - // module.Type == ModuleType.BuildTool || - // module.Type == ModuleType.Cabinet || - // module.Type == ModuleType.EmbeddedTypeLib || - // module.Type == ModuleType.HostStaticLibrary || - // module.Type == ModuleType.IdlHeader || - // module.Type == ModuleType.NativeCUI || - // module.Type == ModuleType.NativeDLL || - // module.Type == ModuleType.ObjectLibrary || - // module.Type == ModuleType.Package || - // module.Type == ModuleType.RpcClient || - // module.Type == ModuleType.RpcProxy || - // module.Type == ModuleType.RpcServer || - // module.Type == ModuleType.StaticLibrary || - // module.Type == ModuleType.Win32CUI || - // module.Type == ModuleType.Win32DLL || - // module.Type == ModuleType.Win32GUI || - // module.Type == ModuleType.Win32OCX || - // module.Type == ModuleType.Win32SCR || - // module.Type == ModuleType.KeyboardLayout) - - // { - // sw.WriteLine("", - // module.Name.ToUpper(), - // module.Name); - // } - // } - - // sw.WriteLine(""); - //} - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/WarningReport/WarningReport.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Backends/WarningReport/WarningReport.cs deleted file mode 100644 index 5b48f103ae1..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Backends/WarningReport/WarningReport.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using System.Web.UI; -using System.IO; -using System.Collections.Generic; -using System.Text; -using System.Xml; - -using SysGen.BuildEngine.Backends; -using SysGen.RBuild.Framework; -using SysGen.BuildEngine; - -namespace SysGen.BuildEngine.Backends -{ - public class WarningReport : Backend - { - public WarningReport(SysGenEngine sysgen) - : base(sysgen) - { - } - - protected override string FriendlyName - { - get { return "Warning report"; } - } - - protected override void Generate() - { - //using (StreamWriter sw = new StreamWriter(@"C:\roswarning.txt")) - //{ - // foreach (RBuildModule module in Project.Modules) - // { - // if (module.Unicode == false) - // { - // if ((module.Defines.ContainsKey("UNICODE")) || - // (module.Defines.ContainsKey("_UNICODE")) || - // (module.Defines.ContainsKey("_UNICODE_"))) - // { - // sw.WriteLine("- Module '{0}' has unicode defines but 'Unicode' property set to 'False'", module.Name); - // } - // } - - // foreach (KeyValuePair define in Project.Defines) - // { - // if (module.Defines.ContainsKey(define.Key)) - // { - // sw.WriteLine("- Module '{0}' already define '{1}' inherited from project ", module.Name, define.Key); - // } - // } - - // foreach (string flag in Project.CompilerFlags) - // { - // if (module.CompilerFlags.Contains(flag)) - // { - // sw.WriteLine("- Module '{0}' already has compiler flag '{1}' inherited from project ", module.Name, flag); - // } - // } - - // foreach (string flag in Project.LinkerFlags) - // { - // if (module.LinkerFlags.Contains(flag)) - // { - // sw.WriteLine("- Module '{0}' already has linker flag '{1}' inherited from project ", module.Name, flag); - // } - // } - - // foreach (RBuildFolder include in module.IncludeFolders) - // { - // if (Project.IncludeFolders.Contains(include)) - // { - // sw.WriteLine("- Module '{0}' already has include folder '{1}' inherited from project ", module.Name, include.RelativePath); - // } - - // if (SysGen.RBuildFolderExists(include) == false) - // { - // sw.WriteLine("- Module '{0}' includes folder '{1}' which could not be found ", module.Name, include.RelativePath); - // } - // } - // } - //} - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Collections/BackendCollection.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Collections/BackendCollection.cs deleted file mode 100644 index c2df8997b68..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Collections/BackendCollection.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System; -using System.Collections; -using System.Collections.Generic; - -using SysGen.BuildEngine.Log; -using SysGen.BuildEngine.Backends; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine -{ - public sealed class BackendCollection : List - { - public void Generate() - { - foreach (Backend backend in this) - { - backend.Run(); - } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Collections/DefineCollection.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Collections/DefineCollection.cs deleted file mode 100644 index e05ada2c171..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Collections/DefineCollection.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System; -using System.Collections; -using System.Collections.Generic; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine -{ - public class DefineCollection : Dictionary - { - public void Add(string name) - { - Add(name, string.Empty); - } - - public void Add(string name , string value) - { - if (!ContainsKey(name)) - base.Add(name, value); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Collections/FileHandlerCollection.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Collections/FileHandlerCollection.cs deleted file mode 100644 index ec7b65a5c86..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Collections/FileHandlerCollection.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System; -using System.Collections; -using System.Collections.Generic; - -using SysGen.BuildEngine.Log; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine -{ - public sealed class FileHandlerCollection : List - { - public void ProcessFiles(RBuildPlatformFileCollection files) - { - foreach (RBuildFile file in files) - { - foreach (IFileHandler handler in this) - { - handler.Process(file); - } - } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Collections/LogListenerCollection.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Collections/LogListenerCollection.cs deleted file mode 100644 index 7d907c3fe93..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Collections/LogListenerCollection.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System; -using System.Collections; -using System.Collections.Generic; - -using SysGen.BuildEngine.Log; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine -{ - public sealed class LogListenerCollection : List - { - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Collections/TaskBuilderCollection.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Collections/TaskBuilderCollection.cs deleted file mode 100644 index 386c0b04c24..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Collections/TaskBuilderCollection.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; - -namespace SysGen.BuildEngine -{ - public class TaskBuilderCollection : List - { - public bool Add(TaskBuilder builder) - { - // prevent adding duplicate builders with the same task name - if (FindBuilderForTask(builder.TaskName) == null) - { - base.Add(builder); - return true; - } - - return false; - } - - public TaskBuilder FindBuilderForTask(string taskName) - { - foreach (TaskBuilder builder in this) - { - if (builder.TaskName == taskName) - { - return builder; - } - } - return null; - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Collections/TaskCollection.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Collections/TaskCollection.cs deleted file mode 100644 index a10cf92f4f1..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Collections/TaskCollection.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; - -namespace SysGen.BuildEngine -{ - public sealed class TaskCollection : List - { - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Elements/Base/Element.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Elements/Base/Element.cs deleted file mode 100644 index 3de1765b291..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Elements/Base/Element.cs +++ /dev/null @@ -1,306 +0,0 @@ -using System; -using System.IO; -using System.Reflection; -using System.Xml; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Log; -using SysGen.BuildEngine.Attributes; -using SysGen.BuildEngine.Tasks; - -namespace SysGen.BuildEngine -{ - /// Models a NAnt XML element in the build file. - /// - /// Automatically validates attributes in the element based on Attribute settings in the derived class. - /// - public class Element : IElement - { - protected Location _location = Location.UnknownLocation; - protected SysGenEngine _sysgen = null; - protected RBuildProject _project = null; - protected XmlNode _xmlNode = null; - protected IElement _parent = null; - protected bool m_FailOnMissingRequired = true; - - /// - /// The default contstructor. - /// - public Element() - { - } - - /// A copy contstructor. - protected Element(Element element) : this() - { - _location = element._location; - _sysgen = element._sysgen; - _xmlNode = element._xmlNode; - } - - /// in the build file where the element is defined. - protected virtual Location Location { - get { return _location; } - set { _location = value; } - } - - /// - /// The Parent object. This will be your parent Task, Target, or Project depeding on where the element is defined. - /// - public IElement Parent { get { return _parent; } set { _parent = value; } } - - /// Name of the XML element used to initialize this element. - public virtual string Name - { - get { - ElementNameAttribute elementNameAttribute = (ElementNameAttribute) - Attribute.GetCustomAttribute(GetType(), typeof(ElementNameAttribute)); - - string name = null; - if (elementNameAttribute != null) { - name = elementNameAttribute.Name; - } - return name; - } - } - - /// - /// The this element belongs to. - /// - public virtual SysGenEngine SysGen - { - get { return _sysgen; } - set { _sysgen = value; } - } - - public RBuildProject Project - { - get { return _project; } - set { _project = value; } - } - - public RBuildModule Module - { - get - { - RBuildModule module = RBuildElement as RBuildModule; - - if (module == null) - throw new BuildException(String.Format("Task <{0} ... \\> is not child of any ModuleTask." , Name), Location); - - return module; - } - } - - /// - /// this element belongs to. - /// - public virtual RBuildElement RBuildElement - { - get - { - IElement element = this; - while (element != null) - { - if (element is ISysGenObject) - return ((ISysGenObject)element).RBuildElement; - - //Set to his parent - element = element.Parent; - } - - return SysGen.Project; - } - } - - public string BaseBuildLocation - { - get { return Path.GetDirectoryName(new Uri(_xmlNode.BaseURI).LocalPath); } - } - - public XmlNode XmlNode - { - get { return _xmlNode; } - } - - /// - /// Initializes all build attributes. - /// - private void InitializeProperties(XmlNode elementNode) - { - // Get the current element Type - Type currentType = GetType(); - - PropertyInfo[] propertyInfoArray = currentType.GetProperties(BindingFlags.Public|BindingFlags.Instance); - foreach (PropertyInfo propertyInfo in propertyInfoArray ) - { - // process all TaskPropertyAttribute attributes - TaskPropertyAttribute[] propertyAttributes = (TaskPropertyAttribute[]) - Attribute.GetCustomAttributes(propertyInfo, typeof(TaskPropertyAttribute) , false); - - foreach(TaskPropertyAttribute propertyAttribute in propertyAttributes) - { - string propertyValue = null; - - if (propertyAttribute.Location == TaskPropertyLocation.Attribute) - { - if (elementNode.Attributes[propertyAttribute.Name] != null) - { - propertyValue = elementNode.Attributes[propertyAttribute.Name].Value; - } - } - else if (propertyAttribute.Location == TaskPropertyLocation.Node) - { - propertyValue = elementNode.InnerText; - } - - // check if its required - if (propertyValue == null && propertyAttribute.Required && m_FailOnMissingRequired) - { - throw new BuildException(String.Format("'{0}' is a required '{1}' of <{2} ... \\>.", propertyAttribute.Name, propertyAttribute.Location , Name), Location); - } - - if (propertyValue != null) - { - //string attrValue = attributeNode.Value; - if (propertyAttribute.ExpandProperties) - { - // expand attribute properites - propertyValue = SysGen.ExpandProperties(propertyValue); - } - - if (propertyInfo.CanWrite) - { - // set the property value instead - MethodInfo info = propertyInfo.GetSetMethod(); - object[] paramaters = new object[1]; - - Type propertyType = propertyInfo.PropertyType; - - // If the object is an emum - if (propertyType.IsSubclassOf(typeof(System.Enum))) - { - try - { - paramaters[0] = Enum.Parse(propertyType, propertyValue, true); - } - catch (Exception) - { - // catch type conversion exceptions here - string message = string.Format("Invalid value '{0}'. Valid values for this attribute are:\n", propertyValue); - foreach (object value in Enum.GetValues(propertyType)) - { - message += string.Format("\t{0}\n", value.ToString()); - } - throw new BuildException(message, Location); - } - } - else - { - //validate attribute value with custom ValidatorAttribute(ors) - ValidatorAttribute[] validateAttributes = (ValidatorAttribute[]) - Attribute.GetCustomAttributes(propertyInfo, typeof(ValidatorAttribute)); - try - { - foreach (ValidatorAttribute validator in validateAttributes) - validator.Validate(propertyValue); - } - catch (ValidationException ve) - { - throw new ValidationException(ve.Message, Location); - } - - if (propertyType == typeof(System.Boolean)) - { - paramaters[0] = Convert.ChangeType(SysGenConversion.ToBolean(propertyValue), propertyInfo.PropertyType); - } - else - { - paramaters[0] = Convert.ChangeType(propertyValue, propertyInfo.PropertyType); - } - } - - info.Invoke(this, paramaters); - } - else - { - new BuildException(string.Format("Property '{0}' was found but '{1}' does no implement Set", propertyAttribute.Name, Name)); - } - } - } - - // now do nested BuildElements - BuildElementAttribute buildElementAttribute = (BuildElementAttribute) - Attribute.GetCustomAttribute(propertyInfo, typeof(BuildElementAttribute)); - - if (buildElementAttribute != null) - { - // get value from xml node - XmlNode nestedElementNode = elementNode[buildElementAttribute.Name, elementNode.OwnerDocument.DocumentElement.NamespaceURI]; - // check if its required - if (nestedElementNode == null && buildElementAttribute.Required) { - throw new BuildException(String.Format("'{0}' is a required element of <{1} ...//>.", buildElementAttribute.Name, this.Name), Location); - } - if (nestedElementNode != null) { - Element childElement = (Element)propertyInfo.GetValue(this, null); - // Sanity check: Ensure property wasn't null. - if ( childElement == null ) - throw new BuildException(String.Format("Property '{0}' value cannot be null for <{1} ...//>", propertyInfo.Name, this.Name), Location); - childElement.SysGen = SysGen; - childElement.Initialize(nestedElementNode); - } - } - } - } - - /// Performs default initialization. - /// - /// Derived classes that wish to add custom initialization should override . - /// - public void Initialize(XmlNode elementNode) - { - if (SysGen == null) - throw new InvalidOperationException("Element has invalid BuildFileLoader property."); - - // Save the element node - _xmlNode = elementNode; - - // Save position in buildfile for reporting useful error messages. - try - { - _location = SysGen.LocationMap.GetLocation(elementNode); - } - catch(ArgumentException ae) - { - BuildLog.WriteLineIf(SysGen.Verbose, ae.ToString()); - } - - InitializeProperties(elementNode); - - OnInit(); - - // Allow inherited classes a chance to do some custom initialization. - InitializeElement(elementNode); - - // The Element has been completly initialized - OnLoad(); - } - - /// - /// Allows derived classes to provide extra initialization and validation not covered by the base class. - /// - /// The xml node of the element to use for initialization. - protected virtual void InitializeElement(XmlNode elementNode) - { - } - - protected virtual void OnLoad() - { - } - - protected virtual void OnInit() - { - } - - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Exceptions/BuildException.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Exceptions/BuildException.cs deleted file mode 100644 index b8b422221be..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Exceptions/BuildException.cs +++ /dev/null @@ -1,101 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace SysGen.BuildEngine -{ - /// - /// Thrown whenever an error occurs during the build. - /// - [Serializable] - public class BuildException : ApplicationException - { - private Location _location = Location.UnknownLocation; - - /// - /// Constructs a build exception with no descriptive information. - /// - public BuildException() : base() { - } - - public BuildException(String message, params object[] args) - : base(string.Format(message, args)) - { - } - - /// - /// Constructs an exception with a descriptive message. - /// - public BuildException(String message) : base(message) { - } - - /// - /// Constructs an exception with a descriptive message and an - /// instance of the Exception that is the cause of the current Exception. - /// - public BuildException(Exception e, String message) : base(message, e) { - } - - /// - /// Constructs an exception with a descriptive message and an - /// instance of the Exception that is the cause of the current Exception. - /// - public BuildException(Exception e, String message,params object[] args) - : base(string.Format(message , args), e) - { - } - - /// - /// Constructs an exception with a descriptive message and location - /// in the build file that caused the exception. - /// - /// The error message that explains the reason for the exception. - /// Location in the build file where the exception occured. - public BuildException(String message, Location location) : base(message) { - _location = location; - } - - /// - /// Constructs an exception with the given descriptive message, the - /// location in the build file and an instance of the Exception that - /// is the cause of the current Exception. - /// - /// The error message that explains the reason for the exception. - /// Location in the build file where the exception occured. - /// An instance of Exception that is the cause of the current Exception. - public BuildException(String message, Location location, Exception e) : base(message, e) { - _location = location; - } - - /// Initializes a new instance of the BuildException class with serialized data. - public BuildException(SerializationInfo info, StreamingContext context) : base(info, context) { - /* - string fileName = info.GetString("Location.FileName"); - int lineNumber = info.GetInt32("Location.LineNumber"); - int columnNumber = info.GetInt32("Location.ColumnNumber"); - */ - _location = info.GetValue("Location", _location.GetType()) as Location; - } - - /// Sets the SerializationInfo object with information about the exception. - /// The object that holds the serialized object data. - /// The contextual information about the source or destination. - /// For more information, see SerializationInfo in the Microsoft documentation. - public override void GetObjectData(SerializationInfo info, StreamingContext context) { - base.GetObjectData(info, context); - info.AddValue("Location", _location); - } - - public override string Message { - get { - string message = base.Message; - - // only include location string if not empty - string locationString = _location.ToString(); - if (locationString != String.Empty) { - message = locationString + "\n " + message; - } - return message; - } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Exceptions/ValidationException.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Exceptions/ValidationException.cs deleted file mode 100644 index 0150c5c79f0..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Exceptions/ValidationException.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace SysGen.BuildEngine -{ - /// - /// This exception indicates that an error has occured while performing a validate operation. - /// The ValidationEventHandler can cause this exception to be thrown during the validate operations - /// - [Serializable] - public class ValidationException : BuildException - { - /// - /// Constructs a build exception with no descriptive information. - /// - public ValidationException() : base() {} - - /// - /// Constructs an exception with a descriptive message. - /// - public ValidationException(String message) : base(message) {} - - /// - /// Constructs an exception with a descriptive message and an - /// instance of the Exception that is the cause of the current Exception. - /// - public ValidationException(String message, Exception e) : base(e, message) {} - - /// - /// Constructs an exception with a descriptive message and location - /// in the build file that caused the exception. - /// - /// The error message that explains the reason for the exception. - /// Location in the build file where the exception occured. - public ValidationException(String message, Location location) : base(message, location) {} - - /// - /// Constructs an exception with the given descriptive message, the - /// location in the build file and an instance of the Exception that - /// is the cause of the current Exception. - /// - /// The error message that explains the reason for the exception. - /// Location in the build file where the exception occured. - /// An instance of Exception that is the cause of the current Exception. - public ValidationException(String message, Location location, Exception e) : base(message, location, e) {} - - /// Initializes a new instance of the ValidationException class with serialized data. - public ValidationException(SerializationInfo info, StreamingContext context) : base(info, context) {} - - /// Sets the SerializationInfo object with information about the exception. - /// The object that holds the serialized object data. - /// The contextual information about the source or destination. - /// For more information, see SerializationInfo in the Microsoft documentation. - public override void GetObjectData(SerializationInfo info, StreamingContext context) {} - - public override string Message { - get { - return base.Message; - } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/Base/AutoGeneratedCFileWriter.cs b/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/Base/AutoGeneratedCFileWriter.cs deleted file mode 100644 index 9f37bd4c0e5..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/Base/AutoGeneratedCFileWriter.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -using SysGen.BuildEngine.Framework; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Framework -{ - public abstract class AutoGeneratedCFileWriter : AutoGeneratedFileWriter - { - public AutoGeneratedCFileWriter(RBuildModule module, string file) - : base(module , file) - { - } - - protected virtual void WriteHeader() - { - WriteLine("/* This file is automatically generated. */"); - WriteLine(); - } - - protected virtual void WriteFooter() - { - WriteLine("/* EOF */"); - WriteLine(); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/Base/AutoGeneratedFileWriter.cs b/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/Base/AutoGeneratedFileWriter.cs deleted file mode 100644 index 02a03e04fe3..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/Base/AutoGeneratedFileWriter.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Framework -{ - public abstract class AutoGeneratedFileWriter : StreamWriter - { - RBuildProject m_Project = null; - RBuildModule m_Module = null; - - public AutoGeneratedFileWriter(RBuildProject project, string file) - : base(file) - { - m_Project = project; - } - - public AutoGeneratedFileWriter(RBuildModule module, string file) - : base(file) - { - m_Module = module; - } - - protected RBuildProject Project - { - get { return m_Project; } - } - - protected RBuildModule Module - { - get { return m_Module; } - } - - public abstract void WriteFile(); - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/Base/AutoGeneratedInfFileWriter.cs b/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/Base/AutoGeneratedInfFileWriter.cs deleted file mode 100644 index 93135c8771b..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/Base/AutoGeneratedInfFileWriter.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Framework -{ - public abstract class AutoGeneratedInfFileWriter : AutoGeneratedFileWriter - { - public AutoGeneratedInfFileWriter(RBuildProject project, string file) - : base(project , file) - { - } - - protected virtual void WriteHeader() - { - WriteSection("Version"); - WriteLine("Signature = \"$Windows NT$\""); - WriteLine("ClassGUID = {00000000-0000-0000-0000-000000000000}"); - WriteLine(); - } - - protected void WriteSection(string sectionName) - { - WriteLine("[{0}]", sectionName); - } - - protected void WriteComment (string comment) - { - WriteLine("; {0}", comment); - } - - protected void WriteAssignment(string name , string value) - { - WriteLine("{0} = {1}", - name , - value); - } - - protected void WriteBooleanAssignment(string name, bool value) - { - if (value) - { - WriteAssignment(name, "yes"); - } - else - { - WriteAssignment(name, "no"); - } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/BuildNumberFileWriter.cs b/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/BuildNumberFileWriter.cs deleted file mode 100644 index 330c9162ded..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/BuildNumberFileWriter.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -using SysGen.Framework; -using SysGen.RBuild.Framework; - -namespace SysGen.Framework -{ - public class BuildNumberFileWriter : AutoGeneratedCFileWriter - { - public BuildNumberFileWriter(RBuildProject project, string file) - : base(project , file) - { - } - - public override void WriteFile() - { - WriteHeader(); - WriteCompilationUnit(); - WriteFooter(); - } - - private void WriteBuildNumber() - { - WriteLine("#ifndef _INC_REACTOS_BUILDNO"); - WriteLine("#define _INC_REACTOS_BUILDNO"); - WriteLine("#define KERNEL_VERSION_BUILD 20080427"); - WriteLine("#define KERNEL_VERSION_BUILD_HEX 0x8187"); - WriteLine("#define KERNEL_VERSION_BUILD_STR \"20080427-r33159\""); - WriteLine("#define KERNEL_VERSION_BUILD_RC \"20080427-r33159\0\""); - WriteLine("#define KERNEL_RELEASE_RC \"0.4-SVN\0\""); - WriteLine("#define KERNEL_RELEASE_STR \"0.4-SVN\""); - WriteLine("#define KERNEL_VERSION_RC \"0.4-SVN\0\""); - WriteLine("#define KERNEL_VERSION_STR \"0.4-SVN\""); - WriteLine("#define REACTOS_DLL_VERSION_MAJOR 42"); - WriteLine("#define REACTOS_DLL_RELEASE_RC \"42.4-SVN\0\""); - WriteLine("#define REACTOS_DLL_RELEASE_STR \"42.4-SVN\""); - WriteLine("#define REACTOS_DLL_VERSION_RC \"42.4-SVN\0\""); - WriteLine("#define REACTOS_DLL_VERSION_STR \"42.4-SVN\""); - WriteLine("#endif"); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/CompilationUnitFileWriter.cs b/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/CompilationUnitFileWriter.cs deleted file mode 100644 index e0dd0063b8c..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/CompilationUnitFileWriter.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Framework -{ - public class CompilationUnitFileWriter : AutoGeneratedCFileWriter - { - private RBuildCompilationUnitFile m_CompilationUnit = null; - - public CompilationUnitFileWriter(RBuildModule module, RBuildCompilationUnitFile unit , string file) - : base(module , file) - { - m_CompilationUnit = unit; - } - - protected override void WriteHeader() - { - base.WriteHeader(); - - WriteLine("#define ONE_COMPILATION_UNIT"); - WriteLine(); - } - - public override void WriteFile() - { - WriteHeader(); - WriteCompilationUnit(); - } - - private void WriteCompilationUnit() - { - foreach (RBuildSourceFile file in m_CompilationUnit.SourceFiles) - { - WriteLine("#include <{0}>", file.FullPath); - } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/DefinitionFileWriter.cs b/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/DefinitionFileWriter.cs deleted file mode 100644 index d0d11a5073b..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/DefinitionFileWriter.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Framework -{ - public class DefinitionFileWriter : AutoGeneratedFileWriter - { - public DefinitionFileWriter(RBuildProject project, string file) - : base(project , file) - { - } - - public override void WriteFile() - { - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/DffFileWriter.cs b/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/DffFileWriter.cs deleted file mode 100644 index ce146aca3bf..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/DffFileWriter.cs +++ /dev/null @@ -1,139 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Framework -{ - public class DffFileWriter : AutoGeneratedFileWriter - { - public DffFileWriter(RBuildProject project , string file) - : base(project , file) - { - } - - public override void WriteFile() - { - WriteHeader(); - WriteModuleTargets(); - } - - protected void WriteHeader() - { - WriteLine("; Main ReactOS package"); - WriteLine(); - WriteLine(".Set DiskLabelTemplate=\"ReactOS\" ; Label of disk"); - WriteLine(".Set CabinetNameTemplate=\"reactos.cab\" ; reactos.cab"); - WriteLine(".Set InfFileName=\"reactos.inf\" ; reactos.inf"); - WriteLine(); - WriteLine(";.Set Cabinet=on"); - WriteLine(";.Set Compress=on"); - WriteLine(); - WriteLine(".InfBegin"); - WriteLine("[Version]"); - WriteLine("Signature = \"$ReactOS$\""); - WriteLine(); - WriteLine("[Directories]"); - - foreach (RBuildInstallFolder folder in Project.InstallFolders) - { - if (folder.Name == string.Empty || - folder.Name == ".") - { - WriteLine("{0} =", - folder.ID); - } - else - WriteLine("{0} = {1}", - folder.ID, - folder.Name); - } - - WriteLine(".InfEnd"); - WriteLine(); - WriteLine("; Contents of disk"); - WriteLine(".InfBegin"); - WriteLine("[SourceFiles]"); - WriteLine(".InfEnd"); - } - - protected void WriteModuleTargets() - { - RBuildInstallFolder installFolder = null; - - WriteLine(); - WriteLine(";Module targets"); - WriteLine(); - - foreach (RBuildModule module in Project.Platform.Modules) - { - if (module.Enabled) - { - if ((module.IsInstallable) && (module.HasInstallBase)) - { - if ((!module.IsBootstrap || module.IsSpecialIncludedBootStrap) && !module.IsSpecialExcludedBootStrap) - { - //Get the install folder - installFolder = Project.InstallFolders.GetByName(module.InstallBase); - - if (installFolder == null) - throw new BuildException("InstallBase '{0}' for module '{1}' references a non existant install folder", - module.InstallBase, - module.Name); - - WriteLine("{0,-90}\t{1,10}", - module.TargetFile.FullPath, - installFolder.ID); - } - } - - foreach (RBuildOutputFile file in module.Files) - { - RBuildPlatformFile platformFile = file as RBuildPlatformFile; - - if (platformFile != null) - { - //Get the install folder - installFolder = Project.InstallFolders.GetByName(file.InstallBase); - - if (installFolder == null) - throw new BuildException("InstallBase '{0}' for file '{1}' references a non existant install folder", - platformFile.InstallBase, - platformFile.FullPath); - - WriteLine("{0,-90}\t{1,10}", - platformFile.FullPath, - installFolder.ID); - } - } - } - } - - WriteLine(); - WriteLine(";Install files"); - WriteLine(); - - foreach (RBuildOutputFile file in Project.Files) - { - RBuildPlatformFile platformFile = file as RBuildPlatformFile; - - if (platformFile != null) - { - //Get the install folder - installFolder = Project.InstallFolders.GetByName(file.InstallBase); - - if (installFolder == null) - throw new BuildException("InstallBase '{0}' for file '{1}' references a non existant install folder", - platformFile.InstallBase, - platformFile.FullPath); - - WriteLine("{0,-90}\t{1,10}", - platformFile.FullPath, - installFolder.ID); - } - } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/HeaderCreditsFileWriter.cs b/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/HeaderCreditsFileWriter.cs deleted file mode 100644 index aa453d2ec5f..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/HeaderCreditsFileWriter.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Framework -{ - public class HeaderCreditsFileWriter : AutoGeneratedFileWriter - { - public HeaderCreditsFileWriter(RBuildProject project, string file) - : base(project , file) - { - } - - public override void WriteFile() - { - WriteLine("/* This file is autogenerated */"); - WriteLine(); - WriteLine("const char* szAutoContributors[]="); - WriteLine("{"); - - foreach (RBuildContributor contributor in Project.Contributors) - { - WriteLine("\t\t{0},", contributor.FullName); - } - - WriteLine("\t0"); - WriteLine("};"); - - // Adds a blank line - WriteLine(); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/HeaderRosCfgFileWriter.cs b/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/HeaderRosCfgFileWriter.cs deleted file mode 100644 index 5f9a2693b60..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/HeaderRosCfgFileWriter.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Framework -{ - public class HeaderRosCfgFileWriter : AutoGeneratedFileWriter - { - public HeaderRosCfgFileWriter(RBuildProject project, string file) - : base(project , file) - { - } - - public override void WriteFile() - { - WriteLine("/* This file is autogenerated */"); - WriteLine(); - - // Adds a blank line - WriteLine(); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/SysSetupComponentSetupFileWriter.cs b/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/SysSetupComponentSetupFileWriter.cs deleted file mode 100644 index f3eaa983bdb..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/SysSetupComponentSetupFileWriter.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Framework -{ - public abstract class SysSetupComponentSetupFileWriter : AutoGeneratedInfFileWriter - { - public SysSetupComponentSetupFileWriter(RBuildProject project, string file) - : base(project , file) - { - } - - protected virtual void WriteHeader() - { - WriteSection("Version"); - WriteLine("Signature = \"$Windows NT$\""); - WriteLine(); - } - - protected virtual void WriteaAddRegDirective() - { - WriteSection("DefaultInstall"); - WriteLine("AddReg=Install.Reg"); - WriteLine(); - } - - public override void WriteFile() - { - WriteHeader(); - WriteaAddRegDirective(); - WriteContent(); - } - - protected abstract void WriteContent(); - } - - public class DesktopComponentSetupFileWriter : SysSetupComponentSetupFileWriter - { - public DesktopComponentSetupFileWriter(RBuildProject project, string file) - : base(project, file) - { - } - - protected override void WriteContent() - { - WriteLine("[Install.Reg]"); - - if (Project.Platform.Screensaver != null) - { - WriteLine("HKU,\"Control Panel\\Desktop\",\"1SCRNSAVE.EXE\",0x00000000,\"{0}\"", - Project.Platform.Screensaver.PlatformInstall.FullPath); - } - - if (Project.Platform.Wallpaper != null) - { - WriteLine("HKU,\"Control Panel\\Desktop\",\"1Wallpaper\",0x00000000,\"{0}\"", - Project.Platform.Wallpaper.PlatformInstall.FullPath); - } - } - } - - public class ShellComponentSetupFileWriter : SysSetupComponentSetupFileWriter - { - public ShellComponentSetupFileWriter(RBuildProject project, string file) - : base(project, file) - { - } - - protected override void WriteContent() - { - WriteLine("[Install.Reg]"); - - if (Project.Platform.Shell != null) - { - WriteLine("HKLM,\"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\\",\"Shell\",0x00020000,\"{0}\"", - Project.Platform.Shell.PlatformInstall.FullPath); - } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/SysSetupFileWriter.cs b/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/SysSetupFileWriter.cs deleted file mode 100644 index e18646da744..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/SysSetupFileWriter.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Framework -{ - public class SysSetupFileWriter : AutoGeneratedInfFileWriter - { - public SysSetupFileWriter(RBuildProject project, string file) - : base(project , file) - { - } - - public override void WriteFile() - { - WriteHeader(); - WriteInfDevicesSection(); - WriteInfRegistrationPhase2Section(); - WriteInfOleControlDllsSection(); - WriteInfAlwaysSection(); - } - - protected void WriteInfDevicesSection() - { - WriteLine("[DeviceInfsToInstall]"); - WriteLine("cdrom.inf"); - WriteLine("display.inf"); - WriteLine("hdc.inf"); - WriteLine("keyboard.inf"); - WriteLine("machine.inf"); - WriteLine("msmouse.inf"); - WriteLine("NET_NIC.inf"); - WriteLine("ports.inf"); - WriteLine("scsi.inf"); - WriteLine("usbport.inf"); - WriteLine(); - } - - protected void WriteInfRegistrationPhase2Section() - { - WriteLine("[RegistrationPhase2]"); - WriteLine("RegisterDlls=OleControlDlls"); - WriteLine(); - } - - protected void WriteInfOleControlDllsSection() - { - WriteLine("[OleControlDlls]"); - foreach (RBuildModule module in Project.Platform.Modules) - { - if (module.AutoRegister != null) - { - WriteLine("{0},,{1},{2}", - "11", - module.TargetName, - module.AutoRegister.RegistrationType); - } - } - WriteLine(); - } - - protected void WriteInfAlwaysSection() - { - WriteLine("[Infs.Always]"); - foreach (RBuildModule module in Project.Platform.Modules) - { - if (module.Setup != null) - { - WriteLine("{0},{1}", - module.Setup.Name, - module.Setup.InstallSection); - } - } - - foreach (RBuildOutputFile file in Project.Files) - { - RBuildSetupFile setup = file as RBuildSetupFile; - - if (setup != null) - { - WriteLine("{0},{1}", - setup.Name, - setup.InstallSection); - } - } - WriteLine(); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/TxtCreditsFileWriter.cs b/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/TxtCreditsFileWriter.cs deleted file mode 100644 index 280bdba0074..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/TxtCreditsFileWriter.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Framework -{ - public class TxtCreditsFileWriter : AutoGeneratedFileWriter - { - public TxtCreditsFileWriter(RBuildProject project, string file) - : base(project , file) - { - } - - public override void WriteFile() - { - WriteLine("ReactOS is available thanks to the work of:"); - WriteLine(); - - foreach (RBuildContributor contributor in Project.Contributors) - { - if (contributor.HasAlias) - { - WriteLine("\t{0} ({1})", - contributor.FullName, - contributor.Alias); - } - else - { - WriteLine("\t{0}", contributor.FullName); - } - - if (contributor.HasMail) - { - WriteLine("\t\t{0}", contributor.Mail); - } - - if (contributor.HasLocation) - { - WriteLine("\t\t{0}, {1}", - contributor.City , - contributor.Country); - } - - // Adds a blank line - WriteLine(); - } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/TxtSetupFileWriter.cs b/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/TxtSetupFileWriter.cs deleted file mode 100644 index f1f55d52d56..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/TxtSetupFileWriter.cs +++ /dev/null @@ -1,137 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Framework -{ - public class TxtSetupFileWriter : AutoGeneratedInfFileWriter - { - public TxtSetupFileWriter(RBuildProject project, string file) - : base(project , file) - { - } - - public override void WriteFile() - { - WriteHeader(); - WriteDirectories(); - WriteSourceDiskDiles(); - WriteLanguages(); - WriteKeyboardLayouts(); - WriteKeyboardLayoutFiles(); - WriteRegistryInstall(); - } - - protected override void WriteHeader() - { - WriteSection("Version"); - WriteLine("Signature = \"$ReactOS$\""); - WriteLine(); - } - - public void WriteDirectories() - { - WriteLine("[Directories]"); - WriteLine("; = "); - - foreach (RBuildInstallFolder folder in Project.InstallFolders) - { - WriteLine("{0} = {1}", - folder.ID, - folder.Name); - } - } - - public void WriteSourceDiskDiles() - { - RBuildInstallFolder installFolder = null; - - WriteLine("[SourceDisksFiles]"); - - foreach (RBuildModule module in Project.Modules) - { - if (module.Bootstrap != null) - { - if (module.Type == ModuleType.KernelModeDriver || - module.Type == ModuleType.KernelModeDLL) - { - //Get the install folder - installFolder = Project.InstallFolders.GetByName(module.InstallBase); - - if (installFolder == null) - throw new BuildException("InstallBase '{0}' for module '{1}' references a non existant install folder", - module.InstallBase, - module.Name); - - WriteLine("{0,-50}\t{1,50}", - module.TargetFile.FullPath, - installFolder.ID); - } - } - } - - WriteLine(); - } - - protected void WriteLanguages() - { - WriteSection("Languages"); - - foreach (RBuildLanguage language in Project.Platform.Languages) - { - WriteLine("{0} = \"{1}\"", - language.LCID, - language.Name); - } - - WriteLine(); - } - - protected void WriteKeyboardLayouts() - { - WriteSection("KeyboardLayout"); - - foreach (RBuildModule module in Project.Platform.Modules) - { - if (module.Type == ModuleType.KeyboardLayout) - { - WriteLine("{0} = \"{1}\"", - module.LCID , - module.Description); - } - } - - WriteLine(); - } - - protected void WriteKeyboardLayoutFiles() - { - WriteSection("Files.KeyboardLayout"); - - foreach (RBuildModule module in Project.Platform.Modules) - { - if (module.Type == ModuleType.KeyboardLayout) - { - WriteLine("{0} = {1}", - module.LCID, - module.TargetName); - } - } - - WriteLine(); - } - - protected void WriteRegistryInstall() - { - WriteLine("[HiveInfs.Install]"); - WriteLine("AddReg=hivecls.inf,AddReg"); - WriteLine("AddReg=hivedef.inf,AddReg"); - WriteLine("AddReg=hivesft.inf,AddReg"); - WriteLine("AddReg=hivesys.inf,AddReg"); - WriteLine(); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/TxtSetupHiveFileWriter.cs b/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/TxtSetupHiveFileWriter.cs deleted file mode 100644 index 2a510834d9f..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/TxtSetupHiveFileWriter.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Framework -{ - public class TxtSetupHiveFileWriter : AutoGeneratedInfFileWriter - { - public TxtSetupHiveFileWriter(RBuildProject project, string file) - : base(project , file) - { - } - - public override void WriteFile() - { - WriteHeader(); - WriteDirectories(); - } - - protected override void WriteHeader() - { - WriteSection("Version"); - WriteLine("Signature = \"$ReactOS$\""); - WriteLine(); - } - - public void WriteDirectories() - { - WriteLine("[AddReg]"); - - if (Project.Platform.Shell != null) - { - WriteLine("HKLM,\"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\\",\"Shell\",0x00020000,\"{0}\"", - Project.Platform.Shell.PlatformInstall.FullPath); - } - - if (Project.Platform.Screensaver != null) - { - WriteLine("HKCU,\"Control Panel\\Desktop\",\"SCRNSAVE.EXE\",0x00000000,\"{0}\"", - Project.Platform.Screensaver.PlatformInstall.FullPath); - } - - if (Project.Platform.Wallpaper != null) - { - WriteLine("HKCU,\"Control Panel\\Desktop\",\"Wallpaper\",0x00000000,\"{0}\"", - Project.Platform.Wallpaper.PlatformInstall.FullPath); - } - - if (Project.Platform.DebugChannels.Count > 0) - { - WriteLine("HKCU,\"SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment\",\"DEBUGCHANNEL\",0x00020000,\"{0}\"", - Project.Platform.DebugChannels.Text); - } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/UnAttendSetupFileWriter.cs b/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/UnAttendSetupFileWriter.cs deleted file mode 100644 index 7f6ae75f7e4..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/FileWriters/UnAttendSetupFileWriter.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Framework -{ - public class UnAttendSetupFileWriter : AutoGeneratedInfFileWriter - { - public UnAttendSetupFileWriter(RBuildProject project, string file) - : base(project , file) - { - } - - public override void WriteFile() - { - WriteHeader(); - WriteUnAttendFile(); - } - - protected override void WriteHeader() - { - WriteSection("Unattend"); - WriteLine("Signature = \"$ReactOS$\""); - WriteLine(); - } - - protected void WriteUnAttendFile() - { - WriteBooleanAssignment("UnattendSetupEnabled", false); - WriteAssignment("DestinationDiskNumber", "0"); - WriteAssignment("DestinationPartitionNumber", "1"); - WriteAssignment("MBRInstallType", "2"); - WriteAssignment("FullName", "MyName"); - WriteAssignment("OrgName", "MyOrg"); - WriteAssignment("ComputerName", "MyComputer"); - WriteAssignment("AdminPassword", "MyPassword"); - WriteAssignment("TimeZoneIndex", "85"); - WriteAssignment("FormatPartition", "1"); - WriteAssignment("AutoPartition", "1"); - WriteAssignment("DisableVmwInst", "1"); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Handlers/SysSetupFileHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Handlers/SysSetupFileHandler.cs deleted file mode 100644 index 0ae911e0fc6..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Handlers/SysSetupFileHandler.cs +++ /dev/null @@ -1,138 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; - -using SysGen.BuildEngine; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Handlers -{ - public abstract class AutoGeneratedFileHandler : IFileHandler - { - protected SysGenEngine m_SysGenEngine = null; - protected RBuildFile m_OriginalFile = null; - protected RBuildFile m_DestFile = null; - - public AutoGeneratedFileHandler(SysGenEngine engine) - { - m_SysGenEngine = engine; - } - - public void Process(RBuildFile file) - { - m_OriginalFile = file; - - if (file.Name == FileName) - { - // Set the generated file to the temporary path - m_DestFile = new RBuildFile(); - m_DestFile.Root = PathRoot.Intermediate; - m_DestFile.Base = file.Base; - m_DestFile.Name = file.Name; - - // Auto generate this file - AutoGenerate(); - - file = m_DestFile; - } - } - - protected abstract void AutoGenerate(); - - protected abstract string FileName { get; } - } - - public class HiveAutoGeneratedFileHandler : AutoGeneratedFileHandler - { - public HiveAutoGeneratedFileHandler(SysGenEngine engine) - : base(engine) - { - } - - protected override string FileName - { - get { return "hivedef.inf"; } - } - - protected override void AutoGenerate() - { - File.Copy( - m_SysGenEngine.ResolveRBuildFilePath(m_OriginalFile), - m_SysGenEngine.ResolveRBuildFilePath(m_DestFile)); - - File.WriteAllText (m_SysGenEngine.ResolveRBuildFilePath(m_DestFile) , - "; Set default wallpaper\n" + - "HKCU,\"Control Panel\\Desktop\",\"Wallpaper\",0000000000,\"%SystemRoot%\\Green.bmp\"" + - "HKCU,\"Control Panel\\Desktop\",\"WallpaperStyle\",0x00000002,0x00000000\n" + - "HKCU,\"Control Panel\\Desktop\",\"TileWallpaper\",0x00000002,0x00000000\n"); - - } - } - - public class AutorunFileHandler : IFileHandler - { - public void Process(RBuildFile file) - { - if (file.Name == "autorun.inf") - { - int i = 0; - } - } - } - - public class SysSetupFileHandler : IFileHandler - { - public void Process(RBuildFile file) - { - if (file.Name == "syssetup.inf") - { - int i = 0; - } - } - } - - public class TxtSetupFileHandler : IFileHandler - { - public void Process(RBuildFile file) - { - if (file.Name == "txtsetup.sif") - { - int i = 0; - } - } - } - - public class UnattendFileHandler : IFileHandler - { - public void Process(RBuildFile file) - { - if (file.Name == "unattend.inf") - { - int i = 0; - } - } - } - - public class DownloaderFileHandler : IFileHandler - { - public void Process(RBuildFile file) - { - if (file.Name == "downloader.xml") - { - int i = 0; - } - } - } - - public class UnAttendedSetupFileHandler : IFileHandler - { - public void Process(RBuildFile file) - { - if (file.Name == "unattend.inf") - { - int i = 0; - } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Interfaces/IBuildStatusMailReporter.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Interfaces/IBuildStatusMailReporter.cs deleted file mode 100644 index 4d156d6cc5b..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Interfaces/IBuildStatusMailReporter.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; - -namespace SysGen.BuildEngine -{ - public interface IBuildStatusMailReporter - { - string MailAdress { get; } - string Subject { get; } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Interfaces/IDirectory.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Interfaces/IDirectory.cs deleted file mode 100644 index 9db7825e601..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Interfaces/IDirectory.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine -{ - public interface IDirectory - { - PathRoot Root { get; } - string BasePath { get; } - - RBuildFolder Folder { get;} - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Interfaces/IElement.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Interfaces/IElement.cs deleted file mode 100644 index 58ca260b44d..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Interfaces/IElement.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Xml; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine -{ - public interface IElement - { - string BaseBuildLocation { get; } - void Initialize(System.Xml.XmlNode elementNode); - RBuildModule Module { get; } - string Name { get; } - IElement Parent { get; set; } - RBuildProject Project { get; set; } - //PropertyCollection Properties { get; } - RBuildElement RBuildElement { get; } - SysGenEngine SysGen { get; set; } - XmlNode XmlNode { get; } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Interfaces/IFileHandler.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Interfaces/IFileHandler.cs deleted file mode 100644 index 8aa1e081b57..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Interfaces/IFileHandler.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine -{ - public interface IFileHandler - { - void Process(RBuildFile file); - } - - public abstract class NamedFileHandler : IFileHandler - { - public abstract string FileName { get; } - - public void Process(RBuildFile file) - { - if (file.Name == FileName) - { - } - } - - protected abstract void Process(); - } - - public abstract class RegenerateFileHandler : NamedFileHandler - { - public virtual void Generate() - { - - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Interfaces/IRBuildInstallable.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Interfaces/IRBuildInstallable.cs deleted file mode 100644 index f3c94193996..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Interfaces/IRBuildInstallable.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.Framework -{ - public class IRBuildInstallable - { - string InstallBase; - - RBuildInstallFolder InstallFolder; - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Interfaces/ISysGenObject.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Interfaces/ISysGenObject.cs deleted file mode 100644 index 20c3246615a..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Interfaces/ISysGenObject.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine -{ - /// - /// Represent one of the root element object types for SysGen : Project and Module - /// - public interface ISysGenObject - { - RBuildElement RBuildElement { get; } - } - - public interface ISysGenObjectFileContainer - { - RBuildFileCollection Files { get; } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Interfaces/ITask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Interfaces/ITask.cs deleted file mode 100644 index 7e2e4f4eabe..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Interfaces/ITask.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; - -namespace SysGen.BuildEngine -{ - public interface ITask : IElement - { - void Execute(); - bool FailOnError { get; set; } - bool IfDefined { get; set; } - bool IfNotDefined { get; set; } - string LogPrefix { get; } - string Name { get; } - void PostExecute(); - void PreExecute(); - string ToString(); - bool Verbose { get; set; } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Interfaces/ITaskContainer.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Interfaces/ITaskContainer.cs deleted file mode 100644 index 053c6d2b849..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Interfaces/ITaskContainer.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.BuildEngine -{ - public interface ITaskContainer : ITask - { - bool ExecuteChilds { get; } - TaskCollection ChildTasks { get; } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Location.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Location.cs deleted file mode 100644 index d030fe2b0d5..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Location.cs +++ /dev/null @@ -1,89 +0,0 @@ -using System; -using System.IO; -using System.Text; - -namespace SysGen.BuildEngine -{ - /// - /// Stores the file name, line number and column number to record a position in a text file. - /// - [Serializable] - public class Location { - string _fileName = null; - int _lineNumber = 0; - int _columnNumber = 0; - - public static readonly Location UnknownLocation = new Location(); - - /// Creates a location consisting of a file name, line number and column number. - /// fileName can be a local URI resource, e.g., file:///C:/WINDOWS/setuplog.txt - public Location(string fileName, int lineNumber, int columnNumber) { - Init(fileName, lineNumber, columnNumber); - } - - /// Creates a location consisting of a file name. - /// fileName can be a local URI resource, e.g., file:///C:/WINDOWS/setuplog.txt - public Location(string fileName) { - Init(fileName, 0, 0); - } - - /// Creates an "unknown" location. - private Location() { - Init(null, 0, 0); - } - - /// Private Init function. - private void Init(string fileName, int lineNumber, int columnNumber) { - if (fileName != null) { - try { - // first check to see if fileName is a URI - Uri uri = new Uri(fileName); - fileName = uri.LocalPath; - } catch { - // must be a simple filename - fileName = Path.GetFullPath(fileName); - } - } - _fileName = fileName; - _lineNumber = lineNumber; - _columnNumber = columnNumber; - } - - /// Gets a string containing the file name for the location. - /// The file name includes both the file path and the extension. - public string FileName { - get { return _fileName; } - } - - /// Gets the line number for the location. - /// Lines start at 1. Will be zero if not specified. - public int LineNumber { - get { return _lineNumber; } - } - - /// Gets the column number for the location. - /// Columns start a 1. Will be zero if not specified. - public int ColumnNumber { - get { return _columnNumber; } - } - - /// - /// Returns the file name, line number and a trailing space. An error - /// message can be appended easily. For unknown locations, returns - /// an empty string. - /// - public override string ToString() { - StringBuilder sb = new StringBuilder(""); - - if (_fileName != null) { - sb.Append(_fileName); - if (_lineNumber != 0) { - sb.Append(String.Format("({0},{1})", _lineNumber, _columnNumber)); - } - sb.Append(":"); - } - - return sb.ToString(); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/LocationMap.cs b/reactos/tools/sysgen/SysGen.BuildEngine/LocationMap.cs deleted file mode 100644 index ad6c73e2900..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/LocationMap.cs +++ /dev/null @@ -1,211 +0,0 @@ -using System; -using System.IO; -using System.Text.RegularExpressions; -using System.Xml; -using System.Xml.XPath; -using System.Collections; - -namespace SysGen.BuildEngine -{ - /// - /// Maps XML nodes to the text positions from their original source. - /// - public class LocationMap { - - struct TextPosition { - public static readonly TextPosition InvalidPosition = new TextPosition(-1,-1); - - public TextPosition(int line, int column) { - Line = line; - Column = column; - } - - public int Line; - public int Column; - } - - // The LocationMap uses a hash table to map filenames to resolve specific maps. - Hashtable _fileMap = new Hashtable(); - - public LocationMap() { - } - - /// Add a XmlDocument to the map. - /// - /// A document can only be added to the map once. - /// - public void Add(XmlDocument doc) { - // prevent duplicate mapping - // NOTE: if this becomes a liability then just return when a duplicate map has happened - string fileName = doc.BaseURI; - - //check for non-backed documents - if(fileName == "") - return; - - if (_fileMap.ContainsKey(fileName)) { - throw new ArgumentException(String.Format("XmlDocument '{0}' already mapped.", fileName), "doc"); - } - - Hashtable map = new Hashtable(); - - string parentXPath = "/"; // default to root - string previousXPath = ""; - int previousDepth = 0; - - // Load text reader. - XmlTextReader reader = new XmlTextReader(fileName); - - reader.XmlResolver = null; - - try { - map.Add((object) "/", (object) new TextPosition(1, 1)); - - ArrayList indexAtDepth = new ArrayList(); - - // loop thru all nodes in the document - while (reader.Read()) { - // Ignore nodes we aren't interested in - if ((reader.NodeType != XmlNodeType.Whitespace) && - (reader.NodeType != XmlNodeType.EndElement) && - (reader.NodeType != XmlNodeType.ProcessingInstruction) && - (reader.NodeType != XmlNodeType.XmlDeclaration)) { - - int level = reader.Depth; - string currentXPath = ""; - - // If we are higher than before - if (reader.Depth < previousDepth) { - // Clear vars for new depth - string[] list = parentXPath.Split('/'); - string newXPath = ""; // once appended to / will be root node ... - - for (int j = 1; j < level+1; j++) { - newXPath += "/" + list[j]; - } - - // higher than before so trim xpath\ - parentXPath = newXPath; // one up from before - - // clear indexes for depth greater than ours - indexAtDepth.RemoveRange(level+1, indexAtDepth.Count - (level+1)); - - } else if (reader.Depth > previousDepth) { - // we are lower - parentXPath = previousXPath; - } - - // End depth setup - // Setup up index array - // add any needed extra items ( usually only 1 ) - // would have used array but not sure what maximum depth will be beforehand - for (int index = indexAtDepth.Count; index < level+1; index++) { - indexAtDepth.Add(0); - } - // Set child index - if ((int) indexAtDepth[level] == 0) { - // first time thru - indexAtDepth[level] = 1; - } else { - indexAtDepth[level] = (int) indexAtDepth[level] + 1; // lower so append to xpath - } - - // Do actual XPath generation - if (parentXPath.EndsWith("/")) { - currentXPath = parentXPath; - } else { - currentXPath = parentXPath + "/"; // add seperator - } - - // Set the final XPath - currentXPath += "child::node()[" + indexAtDepth[level] + "]"; - - // Add to our hash structures - map.Add((object) currentXPath, (object) new TextPosition(reader.LineNumber, reader.LinePosition)); - - // setup up loop vars for next iteration - previousXPath = currentXPath; - previousDepth = reader.Depth; - } - } - } finally { - reader.Close(); - } - - // add map at the end to prevent adding maps that had errors - _fileMap.Add(fileName, map); - - } - - /// Return the in the xml file for the given node. - /// - /// The node passed in must be from a XmlDocument that has been added to the map. - /// - public Location GetLocation(XmlNode node) { - // find hashtable this node's file is mapped under - string fileName = node.BaseURI; - if (fileName == "" ) { - return new Location(null, 0, 0 ); // return null location because we have a fileless node. - } - if (!_fileMap.ContainsKey(fileName)) { - //throw new ArgumentException("Xml node has not been mapped."); - return new Location(null, 0, 0); - } - - // find xpath for node - Hashtable map = (Hashtable) _fileMap[fileName]; - string xpath = GetXPathFromNode(node); - if (!map.ContainsKey(xpath)) { - //throw new ArgumentException("Xml node has not been mapped."); - return new Location(null, 0, 0); - } - - TextPosition pos = (TextPosition) map[xpath]; - Location location = new Location(fileName, pos.Line, pos.Column); - return location; - } - - private string GetXPathFromNode(XmlNode node) { - // IM TODO review this algorithm - tidy up - XPathNavigator nav = node.CreateNavigator(); - - string xpath = ""; - int index = 0; - - while (nav != null && nav.NodeType.ToString() != "Root") - { - // loop thru children until we find ourselves - XPathNavigator navParent = nav.Clone(); - navParent.MoveToParent(); - int parentIndex = 0; - navParent.MoveToFirstChild(); - if (navParent.IsSamePosition(nav)) { - index = parentIndex; - } - while (navParent.MoveToNext()) { - parentIndex++; - if (navParent.IsSamePosition(nav)) { - index = parentIndex; - } - } - - nav.MoveToParent(); // do loop condition here - index++; // Convert to 1 based index - - string thisNode = "child::node()[" + index + "]"; - - if (xpath == "") { - xpath = thisNode; - } else { - // build xpath string - xpath = thisNode + "/" + xpath; - } - } - - // prepend slash to ... - xpath = "/" + xpath; - - return xpath; - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Log/Log.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Log/Log.cs deleted file mode 100644 index 96de3e19a2a..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Log/Log.cs +++ /dev/null @@ -1,215 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Text; - -namespace SysGen.BuildEngine.Log -{ - public class BuildEventArgs : EventArgs - { - protected string _name = string.Empty; - - public BuildEventArgs(string name) - { - _name = name; - } - - public string Name - { - get { return _name; } - set { _name = value; } - } - } - - /// Delegate to handle Build events - public delegate void BuildEventHandler(object sender, BuildEventArgs e); - - public interface IBuildEventConsumer - { - /// Signals that a build has started. This event is fired before any targets have started. - void BuildStarted(object sender, BuildEventArgs e); - - /// Signals that the last target has finished. This event will still be fired if an error occurred during the build. - void BuildFinished(object sender, BuildEventArgs e); - - /// Signals that a target has started. - void TargetStarted(object sender, BuildEventArgs e); - - /// Signals that a target has finished. This event will still be fired if an error occurred during the build. - void TargetFinished(object sender, BuildEventArgs e); - - /// Signals that a task has started. - void TaskStarted(object sender, BuildEventArgs e); - - /// Signals that a task has finished. This event will still be fired if an error occurred during the build. - void TaskFinished(object sender, BuildEventArgs e); - } - - public abstract class LogListener { - public abstract void Write(string message); - public abstract void WriteLine(string message); - public virtual void WriteLine(string message, string messageType) { - WriteLine(message); - } - - public virtual void Flush() { - } - } - - /// Provides a set of methods and properties that log the execution of the build process. This class cannot be inherited. - public sealed class BuildLog - { - private static bool _autoFlush; - private static int _indentLevel; - private static int _indentSize; - private static bool _needIndent; // true if the output should be indented; otherwise, false - private static LogListenerCollection _listeners; - - static BuildLog() - { - _autoFlush = false; - _indentLevel = 0; - _indentSize = 4; - _needIndent = true; - _listeners = new LogListenerCollection(); - _listeners.Add(new ConsoleLogger()); - } - - /// Gets or sets whether Flush should be called on the Listeners after every write. - public static bool AutoFlush { - get { return _autoFlush; } - set { _autoFlush = value; } - } - - /// Gets or sets the indent level. Default is zero. - public static int IndentLevel { - get { return _indentLevel; } - set { _indentLevel = value; } - } - - /// Gets or sets the number of spaces in an indent. Default is four. - public static int IndentSize { - get { return _indentSize; } - set { _indentSize = value; } - } - - /// Gets the collection of listeners that is monitoring the log output. - public static LogListenerCollection Listeners { - get { return _listeners; } - } - - /// Flushes the output buffer, and causes buffered data to be written to the Listeners. - public static void Flush() { - foreach (LogListener l in _listeners) { - l.Flush(); - } - } - - /// Increases the current IndentLevel by one. - public static void Indent() { - _indentLevel++; - } - - /// Decreases the current IndentLevel by one. - public static void Unindent() { - if (_indentLevel > 0) { - _indentLevel--; - } - } - - /// Indents the message if needed. - private static string FormatMessage(string message) { - // if we are starting a new line then first indent the string - if (_needIndent) { - if (IndentLevel > 0) { - StringBuilder sb = new StringBuilder(message); - sb.Insert(0, " ", IndentLevel * IndentSize); - message = sb.ToString(); - } - _needIndent = false; - } - return message; - } - - /// Writes the given message to the log. - public static void Write(string message) { - message = FormatMessage(message); - foreach (LogListener l in _listeners) { - l.Write(message); - } - - if (AutoFlush) { - Flush(); - } - } - - /// Writes the given message to the log. - public static void Write(string format, params object[] arg) { - Write(String.Format(format, arg)); - } - - /// Writes the given message to the log if condition is true. - public static void WriteIf(bool condition, string message) { - if (condition) { - Write(message); - } - } - - /// Writes the given message to the log if condition is true. - public static void WriteIf(bool condition, string format, params object[] arg) { - if (condition) { - Write(String.Format(format, arg)); - } - } - - /// Writes the given message to the log. - public static void WriteLine(string message) { - Write(message + Environment.NewLine); - _needIndent = true; - } - - /// Writes the given message to the log. - public static void WriteLine() { - WriteLine(String.Empty); - } - - /// Writes the given message to the log. - public static void WriteLine(string format, params object[] arg) { - WriteLine(String.Format(format, arg)); - } - - public static void WriteMessage(string message, string messageType) { - message = FormatMessage(message); - foreach (LogListener l in _listeners) { - l.WriteLine(message, messageType); - } - - if (AutoFlush) { - Flush(); - } - } - - /// Writes the given message to the log if condition is true. - public static void WriteLineIf(bool condition, string message) { - if (condition) { - WriteLine(message); - } - } - - /// Writes the given message to the log if condition is true. - public static void WriteLineIf(bool condition, string format, params object[] arg) { - if (condition) { - WriteLine(String.Format(format, arg)); - } - } - } - - public class LogWriter : StringWriter { - public override void Close() { - BuildLog.Write(GetStringBuilder().ToString()); - base.Close(); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Log/Loggers/ConsoleLogger.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Log/Loggers/ConsoleLogger.cs deleted file mode 100644 index 8ffa3fee74c..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Log/Loggers/ConsoleLogger.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.BuildEngine.Log -{ - /// - /// The standard logger that will suffice for any command line based nant runner. - /// - public class ConsoleLogger : LogListener - { - public override void Write(string message) - { - Console.Write(message); - } - - public override void WriteLine(string message) - { - Console.WriteLine(message); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Log/Loggers/StringLogger.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Log/Loggers/StringLogger.cs deleted file mode 100644 index 0a6319873b8..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Log/Loggers/StringLogger.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections; -using System.Diagnostics; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Xml; - -namespace SysGen.BuildEngine.Log -{ - /// - /// Used for test classes to check output. - /// - public class StringLogger : LogListener - { - private StringWriter _writer = new StringWriter(); - - public override void Write(string message) - { - _writer.Write(message); - } - - public override void WriteLine(string message) - { - _writer.WriteLine(message); - } - - /// - /// Returns the contents of log captured. - /// - public override string ToString() - { - return _writer.ToString(); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Log/Loggers/XmlLogger.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Log/Loggers/XmlLogger.cs deleted file mode 100644 index bc2da4f0e44..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Log/Loggers/XmlLogger.cs +++ /dev/null @@ -1,193 +0,0 @@ -using System; -using System.Collections; -using System.Diagnostics; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Xml; - -namespace SysGen.BuildEngine.Log -{ - /// - /// Used to wrap log messages in xml <message/> elements - /// - public class XmlLogger : LogListener, IBuildEventConsumer - { - public class Elements - { - public const string BUILD_RESULTS = "buildresults"; - public const string MESSAGE = "message"; - public const string TARGET = "target"; - public const string TASK = "task"; - public const string STATUS = "status"; - } - - public class Attributes - { - public const string PROJECT = "project"; - public const string MESSAGETYPE = "type"; - } - - private TextWriter _writer = Console.Out; - private XmlTextWriter _xmlWriter = new XmlTextWriter(Console.Out); - - public XmlLogger() - { - - } - - public XmlLogger(TextWriter writer) - { - _writer = writer; - _xmlWriter = new XmlTextWriter(_writer); - _xmlWriter.Formatting = Formatting.Indented; - } - - public string StripFormatting(string message) - { - //looking for zero or more white space from front of line followed by - //one or more of just about anything between [ and ] followed by a message - //which we will capture. ' [blah] - Regex r = new Regex(@"(?ms)^\s*?\[[\s\w\d]+\](.+)"); - - Match m = r.Match(message); - if (m.Success) - { - return m.Groups[1].Captures[0].Value.Trim(); - } - return message; - } - - public bool IsJustWhiteSpace(string message) - { - Regex r = new Regex(@"^\s*$"); - - return r.Match(message).Success; - } - - #region LogListener Overrides - - public override void Write(string formattedMessage) - { - WriteLine(formattedMessage, null); - } - - public override void WriteLine(string message) - { - WriteLine(message, null); - } - - public override void WriteLine(string message, string messageType) - { - string rawMessage = StripFormatting(message.Trim()); - if (IsJustWhiteSpace(rawMessage)) - { - return; - } - - _xmlWriter.WriteStartElement(Elements.MESSAGE); - - if (messageType != null && messageType != String.Empty) - { - _xmlWriter.WriteAttributeString(Attributes.MESSAGETYPE, messageType); - } - - if (IsValidXml(rawMessage)) - { - rawMessage = Regex.Replace(rawMessage, @"<\?.*\?>", String.Empty); - _xmlWriter.WriteRaw(rawMessage); - } - else - { - _xmlWriter.WriteCData(StripCData(rawMessage)); - } - _xmlWriter.WriteEndElement(); - _xmlWriter.Flush(); - } - - private bool IsValidXml(string message) - { - if (Regex.Match(message, @"^<.*>").Success) - { - // validate xml - XmlValidatingReader reader = new XmlValidatingReader(message, XmlNodeType.Element, null); - try { while (reader.Read()) { } } - catch (Exception) { return false; } - finally { reader.Close(); } - return true; - } - return false; - } - - private string StripCData(string message) - { - string strippedMessage = Regex.Replace(message, @"", String.Empty); - } - - public override void Flush() - { - _writer.Flush(); - } - - /// Returns the contents of log captured. - public override string ToString() - { - return _writer.ToString(); - } - - #endregion - - #region IBuildEventConsumer Implementation - - public void BuildStarted(object obj, BuildEventArgs args) - { - _xmlWriter.WriteStartElement(Elements.BUILD_RESULTS); - _xmlWriter.WriteAttributeString(Attributes.PROJECT, args.Name); - } - - public void BuildFinished(object obj, BuildEventArgs args) - { - _xmlWriter.WriteEndElement(); - } - - public void TargetStarted(object obj, BuildEventArgs args) - { - _xmlWriter.WriteStartElement(Elements.TARGET); - WriteNameAttribute(args.Name); - _xmlWriter.Flush(); - } - - public void TargetFinished(object obj, BuildEventArgs args) - { - _xmlWriter.WriteEndElement(); - _xmlWriter.Flush(); - } - - public void TaskStarted(object obj, BuildEventArgs args) - { - _xmlWriter.WriteStartElement(Elements.TASK); - WriteNameAttribute(args.Name); - _xmlWriter.Flush(); - } - - public void TaskFinished(object obj, BuildEventArgs args) - { - _xmlWriter.WriteEndElement(); - _xmlWriter.Flush(); - } - - private void WriteNameAttribute(string name) - { - _xmlWriter.WriteAttributeString("name", name); - } - - private void WriteStatus(string status) - { - _xmlWriter.WriteStartElement(Elements.STATUS); - _xmlWriter.WriteAttributeString("value", status); - _xmlWriter.WriteEndElement(); - } - #endregion - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Plugins/TaskBuilder.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Plugins/TaskBuilder.cs deleted file mode 100644 index 6fbe2b65424..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Plugins/TaskBuilder.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System; -using System.Reflection; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine -{ - public class TaskBuilder - { - private string _className; - private string _assemblyFileName; - private string _taskName; - - public TaskBuilder(string className) : this(className, null) { - } - - public TaskBuilder(string className, string assemblyFileName) { - _className = className; - _assemblyFileName = assemblyFileName; - - // get task name from attribute - Assembly assembly = GetAssembly(); - TaskNameAttribute taskNameAttribute = (TaskNameAttribute) - Attribute.GetCustomAttribute(assembly.GetType(ClassName), typeof(TaskNameAttribute)); - - _taskName = taskNameAttribute.FullTaskName; // Name; - } - - public string ClassName - { - get { return _className; } - } - - public string AssemblyFileName - { - get { return _assemblyFileName; } - } - - public string TaskName - { - get { return _taskName; } - } - - private Assembly GetAssembly() { - Assembly assembly = null; - if (AssemblyFileName == null) { - assembly = Assembly.GetExecutingAssembly(); - } else { - //check to see if it is loaded already - Assembly [] ass = AppDomain.CurrentDomain.GetAssemblies(); - for (int i = 0; i < ass.Length; i++){ - try { - if(ass[i].Location.Equals(AssemblyFileName)) { - assembly = ass[i]; - return assembly; - } - } - // System.Reflection.Emit.Assembly have no location and will fail - catch{} - } - //load if not loaded - if(assembly == null) - assembly = Assembly.LoadFrom(AssemblyFileName); - } - return assembly; - } - - public Task CreateTask() - { - return (Task)GetAssembly().CreateInstance(ClassName, true); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Plugins/TaskFactory.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Plugins/TaskFactory.cs deleted file mode 100644 index 66c14ff3a17..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Plugins/TaskFactory.cs +++ /dev/null @@ -1,136 +0,0 @@ -using System; -using System.IO; -using System.Xml; -using System.Reflection; -using System.Collections; - -namespace SysGen.BuildEngine -{ - /// - /// The TaskFactory comprises all of the loaded, and available, tasks. - /// Use these static methods to register, initialize and create a task. - /// - public class TaskFactory - { - static TaskBuilderCollection _builders = new TaskBuilderCollection(); - static ArrayList _projects = new ArrayList(); - - /// - /// Initializes the tasks in the executing assembly, and basedir of the current domain. - /// - static TaskFactory() - { - // initialize builtin tasks - AddTasks(Assembly.GetExecutingAssembly()); - AddTasks(Assembly.GetCallingAssembly()); - - - //string nantBinDir = Path.GetFullPath(AppDomain.CurrentDomain.BaseDirectory); - //ScanDir(nantBinDir); - //ScanDir(Path.Combine(nantBinDir, "tasks")); - } - - /* - /// Scans the path for any Tasks assemblies and adds them. - /// The directory to scan in. - protected static void ScanDir(string path) { - // Don't do anything if we don't have a valid directory path - if(path == null || path == string.Empty) { - return; - } - - // intialize tasks found in assemblies that end in Tasks.dll - DirectoryScanner scanner = new DirectoryScanner(); - scanner.BaseDirectory = path; - scanner.Includes.Add("*Tasks.dll"); - - //needed for testing - scanner.Includes.Add("*Tests.dll"); - scanner.Includes.Add("*Test.dll"); - - foreach(string assemblyFile in scanner.FileNames) { - //Log.WriteLine("{0}:Add Tasks from {1}", AppDomain.CurrentDomain.FriendlyName, assemblyFile); - - AddTasks(Assembly.LoadFrom(assemblyFile)); - //AddTasks(AppDomain.CurrentDomain.Load(assemblyFile.Replace(AppDomain.CurrentDomain.BaseDirectory,"").Replace(".dll",""))); - } - - } - */ - - /* - /// Adds any Task Assemblies in the Project.BaseDirectory. - /// The project to work from. - public static void AddProject(SysGenEngine project) { - if(project.BaseDirectory != null && !project.BaseDirectory.Equals(string.Empty)) { - ScanDir(project.BaseDirectory); - ScanDir(Path.Combine(project.BaseDirectory, "tasks")); - } - //create weakref to project. It is possible that project may go away, we don't want to hold it. - _projects.Add(new WeakReference(project)); - foreach(TaskBuilder tb in Builders) { - UpdateProjectWithBuilder(project, tb); - } - }*/ - - /// Returns the list of loaded TaskBuilders - public static TaskBuilderCollection Builders { - get { return _builders; } - } - /// Scans the given assembly for any classes derived from Task and adds a new builder for them. - /// The Assembly containing the new tasks to be loaded. - /// The count of tasks found in the assembly. - public static int AddTasks(Assembly assembly) { - int taskCount = 0; - try { - foreach(Type type in assembly.GetTypes()) { - if (type.IsSubclassOf(typeof(Task)) && !type.IsAbstract) { - TaskBuilder tb = new TaskBuilder(type.FullName, assembly.Location); - if (_builders.Add(tb)) { - foreach(WeakReference wr in _projects) { - if(!wr.IsAlive) - continue; - SysGenEngine p = wr.Target as SysGenEngine; - if(p == null) - continue; - UpdateProjectWithBuilder(p, tb); - } - taskCount++; - } - } - } - } - // For assemblies that don't have types - catch{}; - - return taskCount; - } - - protected static void UpdateProjectWithBuilder(SysGenEngine sysGen, TaskBuilder taskBuilder) - { - // add a true property for each task (use in build to test for task existence). - // add a property for each task with the assembly location. - sysGen.Properties.AddReadOnly("SysGen.Tasks." + taskBuilder.TaskName + ".Available", Boolean.TrueString); - sysGen.Properties.AddReadOnly("SysGen.Tasks." + taskBuilder.TaskName + ".Assembly", taskBuilder.AssemblyFileName); - } - - /// Creates a new Task instance for the given xml and project. - /// The XML to initialize the task with. - /// The Project that the Task belongs to. - /// The Task instance. - public static Task CreateTask(XmlNode taskNode, SysGenEngine proj) - { - string taskName = taskNode.Name; - - TaskBuilder builder = _builders.FindBuilderForTask(taskName); - if (builder == null && proj != null) { - Location location = proj.LocationMap.GetLocation(taskNode); - throw new BuildException(String.Format("Unknown task <{0}>", taskName), location); - } - - Task task = builder.CreateTask(); - task.SysGen = proj; - return task; - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Properties/AssemblyInfo.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Properties/AssemblyInfo.cs deleted file mode 100644 index be7575e9d01..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly: AssemblyTitle("SysGen")] -[assembly: AssemblyDescription("SysGen ReactOS Build Tool")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("SysGen")] -[assembly: AssemblyCopyright("Copyright (C) 2007 J.Marc Piulachs")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("0.1.0.*")] - -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyName("")] \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/SysGen.Framework.csproj b/reactos/tools/sysgen/SysGen.BuildEngine/SysGen.Framework.csproj deleted file mode 100644 index 515cf8ded34..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/SysGen.Framework.csproj +++ /dev/null @@ -1,381 +0,0 @@ - - - Local - 9.0.30729 - 2.0 - {8F5F8375-4097-4952-B860-784EB9961ABE} - Debug - AnyCPU - - - - - SysGen.Framework - - - JScript - Grid - IE50 - false - Library - SysGen.Framework - - - - - - - 2.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - bin\Debug\ - false - 285212672 - false - - - - - - - true - 4096 - false - false - false - false - 1 - full - prompt - - - bin\Debug\ - false - 285212672 - false - - - - - - - true - 4096 - false - false - false - false - 1 - full - prompt - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Code - - - - Code - - - Code - - - Code - - - Code - - - Code - - - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Code - - - - - - - - - Code - - - Code - - - Code - - - - Code - - - - Code - - - Code - - - Code - - - Code - - - - - - - - Code - - - Code - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Code - - - - - - - - - - - - - - - - - - - - - - - Code - - - Code - - - Code - - - - - - - - - - - - - {88D9BED7-30C5-4683-A6C6-6F2EB55B8F26} - SysGen.RBuild.Framework - - - - - False - .NET Framework Client Profile - false - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - False - .NET Framework 3.5 SP1 - false - - - - - - - - - - \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/SysGen.Framework.csproj.user b/reactos/tools/sysgen/SysGen.BuildEngine/SysGen.Framework.csproj.user deleted file mode 100644 index ef20f1c8f95..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/SysGen.Framework.csproj.user +++ /dev/null @@ -1,19 +0,0 @@ - - - ShowAllFiles - - - - - - - - - - - - - en-US - false - - \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/SysGenConversion.cs b/reactos/tools/sysgen/SysGen.BuildEngine/SysGenConversion.cs deleted file mode 100644 index e9fe9b97686..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/SysGenConversion.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.BuildEngine -{ - class SysGenConversion - { - public static bool ToBolean(object value) - { - switch (value.ToString().ToLower()) - { - case "yes": - case "true": - case "1": - return true; - case "no": - case "false": - case "0": - return false; - } - - throw new ValidationException(String.Format("Cannot resolve to '{0}' to Boolean value.", value.ToString())); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/SysGenDependencyTracker.cs b/reactos/tools/sysgen/SysGen.BuildEngine/SysGenDependencyTracker.cs deleted file mode 100644 index 1f49363684b..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/SysGenDependencyTracker.cs +++ /dev/null @@ -1,118 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Framework; - -namespace SysGen.BuildEngine -{ - public class SysGenDependencyTracker - { - RBuildProject m_Project = null; - RBuildModuleCollection m_Modules = new RBuildModuleCollection(); - RBuildModuleCollection m_DependsOn = new RBuildModuleCollection(); - RBuildModuleCollection m_DependencyOf = new RBuildModuleCollection(); - - public SysGenDependencyTracker(RBuildProject project) - { - m_Project = project; - } - - public SysGenDependencyTracker(RBuildProject project, RBuildModule module) - : this(project) - { - m_Modules.Add(module); - Calculate(); - } - - public SysGenDependencyTracker(RBuildProject project, RBuildModuleCollection modules) - : this(project) - { - m_Modules.Add(modules); - Calculate(); - } - - public void Calculate() - { - m_DependsOn.Clear(); - m_DependencyOf.Clear(); - - foreach (RBuildModule module in m_Modules) - { - GetModuleDependencies(module); - } - - foreach (RBuildModule projectModule in m_Project.Modules) - { - foreach (RBuildModule module in m_Modules) - { - if (projectModule.Needs.Contains(module)) - { - m_DependencyOf.Add(projectModule); - } - } - } - } - - private void GetModuleDependencies(RBuildModule module) - { - foreach (RBuildModule library in module.Needs) - { - if (m_DependsOn.Contains(library) == false) - { - if (m_Modules.Contains(library) == false) - { - //Add it to the list of dependencies - m_DependsOn.Add(library); - - //Investigate the module to find its dependencies - GetModuleDependencies(library); - } - } - } - } - - public RBuildModuleCollection DependsOn - { - get { return m_DependsOn; } - } - - public RBuildModuleCollection DependencyOf - { - get { return m_DependencyOf; } - } - - public RBuildModuleCollection Missing - { - get - { - RBuildModuleCollection missing = new RBuildModuleCollection(); - - foreach (RBuildModule dependency in DependsOn) - { - if (m_Project.Platform.Modules.Contains(dependency) == false) - missing.Add(dependency); - } - - return missing; - } - } - - public RBuildModuleCollection Using - { - get - { - RBuildModuleCollection missing = new RBuildModuleCollection(); - - foreach (RBuildModule dependency in DependencyOf) - { - if (m_Project.Platform.Modules.Contains(dependency) == true) - missing.Add(dependency); - } - - return missing; - } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/SysGenEngine.cs b/reactos/tools/sysgen/SysGen.BuildEngine/SysGenEngine.cs deleted file mode 100644 index 70d8b470285..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/SysGenEngine.cs +++ /dev/null @@ -1,825 +0,0 @@ -using System; -using System.Text.RegularExpressions; -using System.Diagnostics; -using System.IO; -using System.Reflection; -using System.Xml; -using System.Xml.XPath; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Log; -using SysGen.BuildEngine.Tasks; -using SysGen.BuildEngine.Handlers; -using SysGen.BuildEngine.Backends; - -namespace SysGen.BuildEngine -{ - public class SysGenEngine - { - private Task m_RootTask = null; - - private RBuildProject m_Project = null; - private RBuildPlatform m_Platform = null; - - //private TargetCollection m_Targets = new TargetCollection(); - private FileHandlerCollection m_FileHandlers = new FileHandlerCollection(); - private BackendCollection m_Backends = new BackendCollection(); - private RBuildPropertyCollection m_Properties = new RBuildPropertyCollection(); - private StringCollection m_XmlBuildFiles = new StringCollection(); - - //xml element and attribute names that are not defined in metadata - protected const string PROJECT_XMLROOT = "project"; - protected const string PROJECT_NAME_ATTRIBUTE = "name"; - protected const string PROJECT_DEFAULT_ATTRIBUTE = "default"; - protected const string PROJECT_BASEDIR_ATTRIBUTE = "basedir"; - - public const string SYSGEN_PROPERTY_FILENAME = "SysGen.Filename"; - public const string SYSGEN_PROPERTY_VERSION = "SysGen.Version"; - public const string SYSGEN_PROPERTY_LOCATION = "SysGen.Location"; - public const string SYSGEN_PROPERTY_PROJECT_NAME = "SysGen.Project.Name"; - public const string SYSGEN_PROPERTY_PROJECT_BUILDFILE = "SysGen.Project.File"; - public const string SYSGEN_PROPERTY_PROJECT_BASEDIR = "SysGen.Project.BaseDir"; - - private string m_BaseDir = null; - private bool m_Verbose = false; - private bool m_ExecuteBackends = true; - private bool m_SetDefaults = true; - - private LocationMap _locationMap = new LocationMap(); - private XmlDocument _doc = null; // set in ctorHelper - - public static event BuildEventHandler BuildStarted; - public static event BuildEventHandler BuildFinished; - public static event BuildEventHandler TargetStarted; - public static event BuildEventHandler TargetFinished; - public static event BuildEventHandler TaskStarted; - public static event BuildEventHandler TaskFinished; - public static event BuildEventHandler TaskException; - public static event BuildEventHandler BuildFileLoaded; - - public static void OnBuildFileLoaded(object o, BuildEventArgs e) - { - if (BuildFileLoaded != null) - BuildFileLoaded(o, e); - } - - public static void OnBuildStarted(object o, BuildEventArgs e) - { - if (BuildStarted != null) - BuildStarted(o, e); - } - - public static void OnBuildFinished(object o, BuildEventArgs e) - { - if (BuildFinished != null) - BuildFinished(o, e); - } - - public static void OnTargetStarted(object o, BuildEventArgs e) - { - if (TargetStarted != null) - TargetStarted(o, e); - } - - public static void OnTargetFinished(object o, BuildEventArgs e) - { - if (TargetFinished != null) - TargetFinished(o, e); - } - - public static void OnTaskStarted(object o, BuildEventArgs e) - { - if (TaskStarted != null) - TaskStarted(o, e); - } - - public static void OnTaskFinished(object o, BuildEventArgs e) - { - if (TaskFinished != null) - TaskFinished(o, e); - } - - public static void OnTaskException(object o, BuildEventArgs e) - { - if (TaskException != null) - TaskException(o, e); - } - - public RBuildProject Project - { - get { return m_Project; } - set - { - if (m_Project != null) - throw new BuildException("Only one ProjectTask is allowed per project"); - - m_Project = value; - - InitializeEnvironment(); - } - } - - public Task RootTask - { - get { return m_RootTask; } - set { m_RootTask = value; } - } - - public StringCollection BuildFiles - { - get { return m_XmlBuildFiles; } - } - - public bool SetDefaults - { - get { return m_SetDefaults; } - set { m_SetDefaults = value; } - } - - public SysGenEngine(string path, string project) : this (Path.Combine (path , project)) - { - } - - /// - /// Constructs a new Project with the given source. - /// - /// - /// The Source should be the full path to the build file. - /// This can be of any form that XmlDocument.Load(string url) accepts. - /// - /// If the source is a uri of form 'file:///path' then use the path part. - public SysGenEngine(string source) - { - string path = source; - //if the source is not a valid uri, pass it thru. - //if the source is a file uri, pass the localpath of it thru. - try - { - Uri testURI = new Uri(source); - if (testURI.IsFile) - { - path = testURI.LocalPath; - } - } - catch (Exception e) - { - //do nothing. - e.ToString(); - } - finally - { - if (path == null) - path = source; - } - - ctorHelper(LoadBuildFile(path)); - } - - /// - /// Inits stuff: - /// TaskFactory: Calls Initialize and AddProject - /// Log.IndentSize set to 12 - /// Project properties are initialized ("nant.* stuff set") - /// - /// NAnt Props: - /// nant.filename - /// nant.version - /// nant.location - /// nant.project.name - /// nant.project.buildfile (if doc has baseuri) - /// nant.project.basedir - /// nant.project.default = defaultTarget - /// nant.tasks.[name] = true - /// nant.tasks.[name].location = AssemblyFileName - /// - /// - /// The Project Document. - protected virtual void ctorHelper(XmlDocument doc) - { - //TaskFactory.AddProject(this); - BuildLog.IndentSize = 12; - _doc = doc; - - string newBaseDir = null; - - //check to make sure that the root element in named correctly - if(!doc.DocumentElement.Name.Equals(PROJECT_XMLROOT)) - throw new ApplicationException("Root Element must be named " + PROJECT_XMLROOT + " in " + doc.BaseURI); - - /* - // get project attributes - if(doc.DocumentElement.HasAttribute(PROJECT_NAME_ATTRIBUTE)) - _projectName = doc.DocumentElement.GetAttribute(PROJECT_NAME_ATTRIBUTE); - - if(doc.DocumentElement.HasAttribute(PROJECT_BASEDIR_ATTRIBUTE)) - newBaseDir = doc.DocumentElement.GetAttribute(PROJECT_BASEDIR_ATTRIBUTE); - - if(doc.DocumentElement.HasAttribute(PROJECT_DEFAULT_ATTRIBUTE)) - _defaultTargetName = doc.DocumentElement.GetAttribute(PROJECT_DEFAULT_ATTRIBUTE); - */ - - // give the project a meaningful base directory - if (newBaseDir == null) { - if (BuildFileLocalName != null) { - newBaseDir = Path.GetDirectoryName(BuildFileLocalName); - } - else { - newBaseDir = Environment.CurrentDirectory; - } - } - - newBaseDir = Path.GetFullPath(newBaseDir); - //BaseDirectory must be rooted. - BaseDirectory = newBaseDir; - - } - - internal void InitializeBuildFile(XmlDocument doc, ITaskContainer parent) - { - // load line and column number information into position map - LocationMap.Add(doc); - - // initialize targets and global tasks - foreach (XmlNode childNode in doc.ChildNodes) - { - if (CanProcessNode(childNode)) - { - LoadChildTask(childNode, parent); - } - } - } - - internal bool CanProcessNode(XmlNode childNode) - { - if ((childNode.NodeType == XmlNodeType.Element) && - (childNode.Name.StartsWith("#") == false) && - (childNode.Name.StartsWith("xml") == false) && - (childNode.Name.StartsWith("!") == false) && - (childNode.NamespaceURI.Equals(string.Empty) || - (childNode.NamespaceURI.Equals("http://www.w3.org/2001/XInclude")))) - { - return true; - } - - return false; - } - - internal Task LoadChildTask(XmlNode taskNode, ITaskContainer parent) - { - try - { - Task task = TaskFactory.CreateTask(taskNode, this); - - task.Parent = parent; - task.Project = m_Project; - task.SysGen = this; - task.Initialize(taskNode); - - if (task != RootTask) - parent.ChildTasks.Add(task); - - return task; - } - catch (BuildException be) - { - BuildLog.WriteLine("{0} Failed to created Task for '{1}' xml element for reason: \n {2}", parent.LogPrefix, taskNode.Name, be.Message); - } - - return null; - } - - /// - /// Creates a new XmlDocument based on the project definition. - /// - /// The source of the document. Any form that is valid for XmlDocument.Load(string url) can be used here. - /// The project document. - private XmlDocument LoadBuildFile(string source) - { - XmlDocument doc = new XmlDocument(); - - try - { - OnBuildFileLoaded(this, new BuildEventArgs(source)); - - doc.XmlResolver = null; - doc.Load(source); - - //Add the build file to the collection of readed xml build files - m_XmlBuildFiles.Add(source); - } - catch (XmlException e) - { - string message = "Error loading buildfile"; - Location location = new Location(source, e.LineNumber, e.LinePosition); - throw new BuildException(message, location, e); - } - catch (Exception e) - { - string message = "Error loading buildfile"; - Location location = new Location(source); - throw new BuildException(message, location, e); - } - return doc; - } - - public virtual bool RBuildFolderExists(RBuildFolder folder) - { - return Directory.Exists(ResolveRBuildFilePath(folder)); - } - - public virtual bool RBuildFileExists(RBuildFile file) - { - return File.Exists(ResolveRBuildFilePath(file)); - } - - public virtual string ResolveRBuildFilePath(RBuildFileSystemInfo file) - { - return NormalizePath(Path.Combine(GetPathRoot(file.Root), file.FullPath)); - } - - public virtual string ResolveRBuildFolderPath(RBuildFolder folder) - { - return NormalizePath(Path.Combine(GetPathRoot(folder.Root), folder.FullPath)); - } - - public virtual string ResolveRBuildFilePath(PathRoot root, RBuildFileSystemInfo file) - { - return NormalizePath(Path.Combine(GetPathRoot(root), file.FullPath)); - } - - public string NormalizePath(string path) - { - return path.Replace( - Path.AltDirectorySeparatorChar, - Path.DirectorySeparatorChar); - } - - public string IntermediateDirectory - { - get { return Path.Combine(BaseDirectory, "obj-i386"); } - } - - public string DocumentationDirectory - { - get { return Path.Combine(BaseDirectory, "doc-i386"); } - } - - public string ISODirectory - { - get { return Path.Combine(BaseDirectory, "iso-i386"); } - } - - public string OutputDirectory - { - get { return Path.Combine(BaseDirectory, "output-i386"); } - } - - public string BootCDOutputDirectory - { - get { return Path.Combine(OutputDirectory, "cd"); } - } - - public string LiveCDOutputDirectory - { - get { return Path.Combine(OutputDirectory, "livecd"); } - } - - public string TemporaryDirectory - { - get { return Path.Combine(BaseDirectory, "obj-i386"); } - } - - public string InstallDirectory - { - get { return Path.Combine(BaseDirectory, "reactos"); } - } - - public string GetPathRoot(PathRoot root) - { - switch (root) - { - case PathRoot.Default: - case PathRoot.SourceCode: - return BaseDirectory; - break; - case PathRoot.LiveCD: - return LiveCDOutputDirectory; - break; - case PathRoot.BootCD: - return BootCDOutputDirectory; - break; - case PathRoot.Intermediate: - return IntermediateDirectory; - break; - case PathRoot.Install: - return InstallDirectory; - break; - case PathRoot.Output: - return OutputDirectory; - break; - case PathRoot.Temporary: - return TemporaryDirectory; - break; - case PathRoot.Platform: - return "%SystemRoot%"; - break; - default: - throw new Exception("Unknown PathRoot"); - } - } - - /// - /// The Base Directory used for relative references. - /// - /// - /// The directory must be rooted. (must start with drive letter, unc, etc.) - /// The BaseDirectory sets and gets the special property named 'nant.project.basedir'. - /// - public string BaseDirectory - { - get - { - //string basedir = null; // = Properties[NANT_PROPERTY_PROJECT_BASEDIR]; - - if (m_BaseDir == null) - return null; - - if (!Path.IsPathRooted(m_BaseDir)) - throw new BuildException("BaseDirectory must be rooted! " + m_BaseDir); - - return m_BaseDir; - } - set - { - if (!Path.IsPathRooted(value)) - throw new BuildException("BaseDirectory must be rooted! " + value); - - m_BaseDir = value; - - //Properties[NANT_PROPERTY_PROJECT_BASEDIR] = value; - } - } - - /// - /// The URI form of the current Document - /// - public Uri BuildFileURI { - get { - //TODO: Need to remove this. - if(Doc == null || Doc.BaseURI == "") { - return null;//new Uri("http://localhost"); - } - else { - return new Uri(Doc.BaseURI); - } - } - } - - /// - /// If the build document is not file backed then null will be returned. - /// - public string BuildFileLocalName { - get { - if (BuildFileURI != null && BuildFileURI.IsFile) { - return BuildFileURI.LocalPath; - } - else { - return null; - } - } - } - - /// Returns the active build file - public virtual XmlDocument Doc { - get { return _doc; } - } - - /// - /// When true tasks should output more build log messages. - /// - public bool Verbose - { - get { return m_Verbose; } - set { m_Verbose = value; } - } - - public bool RunBackends - { - get { return m_ExecuteBackends; } - set { m_ExecuteBackends = value; } - } - - public RBuildPlatform Platform - { - get { return m_Platform; } - } - - public RBuildPropertyCollection Properties - { - get { return m_Properties; } - } - - internal LocationMap LocationMap { - get { return _locationMap; } - } - - ///// - ///// The targets defined in the this project. - ///// - //public TargetCollection Targets - //{ - // get { return m_Targets; } - //} - - /// Executes the default target. - /// - /// No top level error handling is done. Any BuildExceptions will make it out of this method. - /// - public virtual void Execute() - { - //InitializeEnvironment(); - - //will initialize the list of Targets, and execute any global tasks. - InitializeBuildFile(Doc, null); - - RegisterBackends(); - - if (Project.InstallFolders.Count == 0) - { - Project.InstallFolders.Add(new RBuildInstallFolder("1", @".")); - Project.InstallFolders.Add(new RBuildInstallFolder("2", @"system32")); - Project.InstallFolders.Add(new RBuildInstallFolder("3", @"system32\config")); - Project.InstallFolders.Add(new RBuildInstallFolder("4", @"system32\drivers")); - Project.InstallFolders.Add(new RBuildInstallFolder("5", @"system")); - Project.InstallFolders.Add(new RBuildInstallFolder("17", @"system32\drivers\etc")); - Project.InstallFolders.Add(new RBuildInstallFolder("20", @"inf")); - Project.InstallFolders.Add(new RBuildInstallFolder("22", @"fonts")); - Project.InstallFolders.Add(new RBuildInstallFolder("201", @"system32\bin")); - Project.InstallFolders.Add(new RBuildInstallFolder("202", @"media\fonts")); - Project.InstallFolders.Add(new RBuildInstallFolder("203", @"bin")); - Project.InstallFolders.Add(new RBuildInstallFolder("204", @"media")); - } - - if (Project.DebugChannels.Count == 0) - { - Project.DebugChannels.Add(new RBuildDebugChannel("ole")); - Project.DebugChannels.Add(new RBuildDebugChannel("rpc")); - Project.DebugChannels.Add(new RBuildDebugChannel("gdi")); - Project.DebugChannels.Add(new RBuildDebugChannel("crtdll")); - Project.DebugChannels.Add(new RBuildDebugChannel("mshtml")); - Project.DebugChannels.Add(new RBuildDebugChannel("setupapi")); - Project.DebugChannels.Add(new RBuildDebugChannel("typelib")); - Project.DebugChannels.Add(new RBuildDebugChannel("shdocvw")); - Project.DebugChannels.Add(new RBuildDebugChannel("combo")); - Project.DebugChannels.Add(new RBuildDebugChannel("listview")); - Project.DebugChannels.Add(new RBuildDebugChannel("ntdll")); - Project.DebugChannels.Add(new RBuildDebugChannel("richedit")); - Project.DebugChannels.Add(new RBuildDebugChannel("statusbar")); - Project.DebugChannels.Add(new RBuildDebugChannel("text")); - Project.DebugChannels.Add(new RBuildDebugChannel("toolbar")); - } - - if (Project.Languages.Count == 0) - { - Project.Languages.Add(new RBuildLanguage("en-us")); - Project.Languages.Add(new RBuildLanguage("es-es")); - } - - m_RootTask.PreExecute(); - m_RootTask.Execute(); - m_RootTask.PostExecute(); - - SetPlatformDefaults(); - - //m_FileHandlers.Add(new TxtSetupFileHandler(this)); - //m_FileHandlers.Add(new SysSetupFileHandler(this)); - //m_FileHandlers.Add(new UnattendFileHandler(this)); - //m_FileHandlers.Add(new DownloaderFileHandler(this)); - //m_FileHandlers.Add(new AutorunFileHandler(this)); - //m_FileHandlers.Add(new HiveAutoGeneratedFileHandler(this)); - m_FileHandlers.ProcessFiles(Project.Files); - - if (RunBackends) - Backends.Generate(); - } - - private void SetPlatformDefaults() - { - if (SetDefaults) - { - if (Project.Platform.Modules.Count == 0) - { - foreach (RBuildModule module in Project.Modules) - { - Project.Platform.Modules.Add(module); - } - } - - if (Project.Languages.Count == 0) - { - foreach (RBuildLanguage language in Project.Languages) - { - Project.Platform.Languages.Add(language); - } - } - - if (Project.DebugChannels.Count == 0) - { - foreach (RBuildDebugChannel channel in Project.DebugChannels) - { - Project.Platform.DebugChannels.Add(channel); - } - } - } - } - - private void RegisterBackends() - { - //m_Backends.Add(new CatalogBackend(this)); - //m_Backends.Add(new MingwBackend(this)); - m_Backends.Add(new HtmlBackend(this)); - //m_Backends.Add(new RGenStatBackend(this)); - //m_Backends.Add(new BaseAddressReportBackend(this)); - //m_Backends.Add(new BuildLogReport(this)); - //m_Backends.Add(new ProjectTreeReport(this)); - m_Backends.Add(new RBuildDBBackend(this)); - //m_Backends.Add(new APIDocumentation(this)); - } - - public void CleanCustomConfigs() - { - Directory.SetCurrentDirectory (BaseDirectory); - - if (File.Exists("config.rbuild")) - File.Delete("config.rbuild"); - - if (File.Exists("config-arm.rbuild")) - File.Delete("config-arm.rbuild"); - - if (File.Exists("config-ppc.rbuild")) - File.Delete("config-ppc.rbuild"); - } - - public BackendCollection Backends - { - get { return m_Backends; } - } - - private void InitializeEnvironment() - { - Assembly ass = Assembly.GetExecutingAssembly(); - - Properties.AddReadOnly(SYSGEN_PROPERTY_FILENAME, ass.CodeBase); - Properties.AddReadOnly(SYSGEN_PROPERTY_VERSION, ass.GetName().Version.ToString()); - Properties.AddReadOnly(SYSGEN_PROPERTY_LOCATION, AppDomain.CurrentDomain.BaseDirectory); - - Project.Properties.AddReadOnly("CDOUTPUT", BootCDOutputDirectory + @"\reactos"); - Project.Properties.AddReadOnly("INTERMEDIATE", IntermediateDirectory); - Project.Properties.AddReadOnly("SOURCECODE", BaseDirectory); - Project.Properties.AddReadOnly("OUTPUT", OutputDirectory); - Project.Properties.AddReadOnly("INSTALL", InstallDirectory); - Project.Properties.AddReadOnly("TEMP", TemporaryDirectory); - Project.Properties.AddReadOnly("DOC", DocumentationDirectory); - } - - /// - /// Does Execute() and wraps in error handling and time stamping. - /// - /// Indication of success - public bool ReadBuildFiles() - { - //SysGenEngine.OnBuildStarted(this, new BuildEventArgs(_projectName)); - - bool success = true; - try - { - // Remember when the build was started - DateTime startTime = DateTime.Now; - - BuildLog.WriteLine(); - BuildLog.WriteLine("SysGen 0.2"); - BuildLog.WriteLine(); - BuildLog.WriteLine("Running on {0}", Environment.OSVersion.VersionString); - BuildLog.WriteLine(); - BuildLog.WriteLine("Buildfile: {0}", BuildFileURI.AbsolutePath); - BuildLog.WriteLine("Base Directory: {0}", BaseDirectory); - BuildLog.WriteLine(); - BuildLog.WriteLine("Reading rbuild files :"); - BuildLog.WriteLine(); - - Execute(); - - TimeSpan buildTime = DateTime.Now - startTime; - - BuildLog.WriteLine(); - BuildLog.WriteLine("{0} SysGen Module(s) detected.", Project.Modules.Count); - BuildLog.WriteLine("{0} Platform Module(s) detected.", Project.Platform.Modules.Count); - BuildLog.WriteLine(); - BuildLog.WriteLine("SysGen COMPLETED in {0} second(s)", (int)buildTime.TotalSeconds); - BuildLog.WriteLine(); - - //SysGenEngine.OnBuildFinished(this, new BuildEventArgs(_projectName)); - - success = true; - return true; - - } - catch (BuildException e) - { - BuildLog.WriteMessage("Build Failed" , "error"); - BuildLog.WriteLine(); - BuildLog.WriteLine(e.Message); - - if (e.InnerException != null) - { - BuildLog.WriteLine( e.InnerException.Message); - } - - success = false; - return false; - - } - catch (Exception e) - { - //throw; - // all other exceptions should have been caught - string message = "\nINTERNAL ERROR\n" + e.ToString() + "\nPlease send bug report to nant-developers@lists.sourceforge.net"; - BuildLog.WriteMessage(message, "error"); - success = false; - return false; - } - finally - { - //SysGenEngine.OnBuildFinished(this, new BuildEventArgs(_projectName)); - } - } - - /// Combine with project's to form a full path to file or directory. - /// - /// If it is possible for the path to contain property macros the path call first. - /// - /// - /// A rooted path. - /// - /// The relative or absolute path. - public string GetFullPath(string path) { - if (path == null) { - return BaseDirectory; - } - - //Docs above read we should do this. But it should be done before it gets here. - //path = this.ExpandProperties(path); - - if (!Path.IsPathRooted(path)) { - path = Path.Combine(BaseDirectory, path); - } - return path; - } - - public string GetRelativePath(string path) - { - return path.Replace(BaseDirectory +"\\" , string.Empty); - } - - /// - /// Expands a string from known properties - /// - /// The string with replacement tokens - /// The expanded and replaced string - public string ExpandProperties(string input) - { - string output = input; - if (input != null) - { - //matches ${abc} and $(abc) style properties - const string pattern = @"\$\{(?([^\}]*))\}|\$\(((?[^\}]*))\)"; - foreach (Match m in Regex.Matches(input, pattern)) - { - if (m.Length > 0) - { - try - { - string token = m.ToString(); - string propertyName = m.Groups["name"].Value; - - if (Project.Properties[propertyName] != null) - { - output = output.Replace(token, Project.Properties[propertyName].Value); - } - else - throw new BuildException(String.Format("Property '{0}' has not been set!", propertyName)); - } - catch (ArgumentException ae) - { - throw new BuildException(String.Format("Bad formed property")); - } - } - } - } - return output; - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/SysGenPathResolver.cs b/reactos/tools/sysgen/SysGen.BuildEngine/SysGenPathResolver.cs deleted file mode 100644 index 1c1947b6d70..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/SysGenPathResolver.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -//using SysGen.RBuild.Framework; -using SysGen.RBuild.Framework; -using SysGen.BuildEngine; -using SysGen.BuildEngine.Attributes; -using SysGen.BuildEngine.Tasks; - -namespace SysGen.BuildEngine -{ - class SysGenPathResolver - { - //public static string GetPath(Task current) - //{ - // return GetPath(current, SysGen.ProjectTask); - //} - - public static string GetPath(Task current, Task root) - { - IElement task = current.Parent; - while (task != root) - { - DirectoryTask directory = task as DirectoryTask; - - if (directory != null) - return directory.Folder.FullPath; - - task = task.Parent; - } - - return string.Empty; - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/Base/Task.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/Base/Task.cs deleted file mode 100644 index 5bee2d549d5..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/Base/Task.cs +++ /dev/null @@ -1,257 +0,0 @@ -using System; -using System.IO; -using System.Reflection; -using System.Xml; - -using SysGen.RBuild.Framework; - -using SysGen.BuildEngine.Log; -using SysGen.BuildEngine.Attributes; -using SysGen.BuildEngine.Tasks; - -namespace SysGen.BuildEngine -{ - public enum TaskExecuteStage - { - PreExecute, - Execute, - PostExecute - } - - /// - /// Provides the abstract base class for tasks. - /// - /// - /// A task is a piece of code that can be executed. - /// - public abstract class Task : Element, ITask - { - protected bool _failOnError = true; - protected bool _verbose = false; - protected bool _ifDefined = true; - protected bool _ifNotDefined = false; - - TaskExecuteStage _stage = TaskExecuteStage.PreExecute; - - /// - /// Determines if task failure stops the build, or is just reported. Default is "true". - /// - [TaskAttribute("failonerror")] - [BooleanValidator()] - public bool FailOnError { - get { return _failOnError; } - set { _failOnError = value; } - } - - /// - /// Task reports detailed build log messages. Default is "false". - /// - [TaskAttribute("verbose")] - [BooleanValidator()] - public bool Verbose { - get { return (_verbose || SysGen.Verbose); } - set { _verbose = value; } - } - - /// - /// If true then the task will be executed; otherwise skipped. Default is "true". - /// - [TaskAttribute("if")] - [BooleanValidator()] - public bool IfDefined { - get { return _ifDefined; } - set { _ifDefined = value; } - } - - /// - /// Opposite of if. If false then the task will be executed; otherwise skipped. Default is "false". - /// - [TaskAttribute("ifnot")] - [BooleanValidator()] - public bool IfNotDefined - { - get { return _ifNotDefined; } - set { _ifNotDefined = value; } - } - - public string XmlFile - { - get { return new Uri(_xmlNode.OwnerDocument.BaseURI).LocalPath; } - } - - public string RBuildFile - { - get { return Path.GetFileName(XmlFile); } - } - - /// The name of the task. - public override string Name { - get { - string name = null; - TaskNameAttribute taskName = (TaskNameAttribute) Attribute.GetCustomAttribute(GetType(), typeof(TaskNameAttribute)); - if (taskName != null) { - name = taskName.Name; - } - return name; - } - } - - public RBuildFolder InFolder - { - get - { - IElement task = Parent; - while (task != SysGen.RootTask) - { - DirectoryTask directory = task as DirectoryTask; - - if (directory != null) - return directory.Folder; - - task = task.Parent; - } - - return SysGen.Project.Folder; - } - } - - /// - /// The prefix used when sending messages to the log. - /// - public string LogPrefix { - get { - string prefix = "[" + Name + "] "; - return prefix.PadLeft(BuildLog.IndentSize); - } - } - - private TaskExecuteStage ExecutionStage - { - get { return _stage; } - } - - /// - /// Executes the task unless it is skipped. Do not ovveride/new this method. Use ExecuteTask instead. - /// - public void Execute() - { - RunTask(TaskExecuteStage.Execute); - } - - public void PostExecute() - { - RunTask(TaskExecuteStage.PostExecute); - } - - public void PreExecute() - { - RunTask(TaskExecuteStage.PreExecute); - } - - private void RunTask (TaskExecuteStage stage) - { - // Save the current execution stage - _stage = stage; - - if (IfDefined && !IfNotDefined) - { - try - { - SysGenEngine.OnTaskStarted(this, new BuildEventArgs(Name)); - - switch (stage) - { - case TaskExecuteStage.PreExecute: - PreExecuteTask(); - break; - case TaskExecuteStage.Execute: - ExecuteTask(); - break; - case TaskExecuteStage.PostExecute: - PostExecuteTask(); - break; - } - - if (this is ITaskContainer) - { - ITaskContainer taskContainer = this as ITaskContainer; - - if (taskContainer.ExecuteChilds) - { - foreach (Task taskChild in taskContainer.ChildTasks) - { - taskChild.RunTask(stage); - } - } - } - } - catch (Exception e) - { - SysGenEngine.OnTaskException(this, new BuildEventArgs(Name)); - - if (FailOnError) - { - throw; - } - else - { - BuildLog.WriteLine(e.Message); - if (e.InnerException != null) - { - BuildLog.WriteLine(e.InnerException.Message); - } - } - } - finally - { - SysGenEngine.OnTaskFinished(this, new BuildEventArgs(Name)); - } - } - } - - protected override void InitializeElement(XmlNode elementNode) - { - if (this is ITaskContainer) - { - ITaskContainer taskContainer = this as ITaskContainer; - - foreach (XmlNode childNode in elementNode.ChildNodes) - { - if (SysGen.CanProcessNode(childNode)) - SysGen.LoadChildTask(childNode, taskContainer); - } - } - - // Just defer for now so that everything just works - InitializeTask(elementNode); - } - - /// Initializes the task. - protected virtual void InitializeTask(XmlNode taskNode) - { - } - - protected virtual void PostExecuteTask() - { - } - - /// - /// Executes the task. - /// - protected virtual void ExecuteTask() - { - } - - /// - /// Executes the task. - /// - protected virtual void PreExecuteTask() - { - } - - public override string ToString() - { - return Name; - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/Base/TaskContainer.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/Base/TaskContainer.cs deleted file mode 100644 index 2de6d0e28ca..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/Base/TaskContainer.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Collections.Generic; - -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine -{ - /// - /// A Generic Task Container - /// - public abstract class TaskContainer : Task , ITaskContainer - { - protected bool m_ExecuteChilds = true; - protected TaskCollection _childTasks = new TaskCollection(); - - /// - /// Available child instances. - /// - public TaskCollection ChildTasks - { - get { return _childTasks; } - } - - public bool ExecuteChilds - { - get { return m_ExecuteChilds; } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/BuiltIn/Build/XIFallbackTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/BuiltIn/Build/XIFallbackTask.cs deleted file mode 100644 index 535407ef36f..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/BuiltIn/Build/XIFallbackTask.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("fallback", Namespace = "xi")] - public class XIFallbackTask : TaskContainer - { - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/BuiltIn/Build/XIIncludeTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/BuiltIn/Build/XIIncludeTask.cs deleted file mode 100644 index 66b66c028df..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/BuiltIn/Build/XIIncludeTask.cs +++ /dev/null @@ -1,148 +0,0 @@ -using System; -using System.IO; -using System.Xml; -using System.Collections; -using System.Collections.Specialized; - -using SysGen.BuildEngine.Attributes; -using SysGen.BuildEngine.Log; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - /// - /// Include an external build file. - /// - [TaskName("include", Namespace = "xi")] - public class XIIncludeTask : FileSystemInfoBaseTask, ITaskContainer //TaskContainer - { - private TaskCollection m_ChildTasks = new TaskCollection(); - - /// - /// Used to check for recursived includes. - /// - private static Stack _includedFiles = new Stack(); - - ///// - ///// The file to be included - ///// - //private string _href = null; - - /// Build file to include. - [TaskAttribute("href", Required = true)] - public string BuildFileName - { - get { return m_FileSystemInfo.Name; } - set { m_FileSystemInfo.Name = value; } - } - - protected override void CreateFileSystemObject() - { - m_FileSystemInfo = new RBuildFile(); - } - - public TaskCollection ChildTasks - { - get { return m_ChildTasks; } - } - - public bool ExecuteChilds - { - get { return true; } - } - - protected override void OnInit() - { - base.OnInit(); - - Base = SysGenPathResolver.GetPath(this, SysGen.RootTask); - } - - /// Verify parameters. - /// Xml taskNode used to define this task instance. - protected override void InitializeTask(XmlNode taskNode) - { - //base.InitializeTask(taskNode); - - FailOnError = false; - - /* - // Task can only be included as a global task. - // This might not be a firm requirement but you could get some real - // funky errors if you start including targets wily-nily. - if (Parent != null ) - { - if ((!(Parent is RbuildTask)) || (!(Parent is ProjectTask))) - throw new BuildException("Task not allowed in targets. Must be at project level.", Location); - } - */ - - // Check for recursive include. - string buildFileName = Path.Combine(BaseBuildLocation, BuildFileName); - foreach (string currentFileName in _includedFiles) { - if (currentFileName == buildFileName) { - throw new BuildException("Recursive includes are not allowed.", Location); - } - } - - string includedFileName = Path.Combine(BaseBuildLocation , BuildFileName); - string includeRelative = SysGen.GetRelativePath(includedFileName); - - // push ourselves onto the stack (prevents recursive includes) - _includedFiles.Push(includedFileName); - - BuildLog.WriteLine("Including {0}", includeRelative); - - try - { - XmlDocument doc = new XmlDocument(); - doc.XmlResolver = null; - doc.Load(includedFileName); - - SysGen.InitializeBuildFile(doc, this); - - SysGen.BuildFiles.Add(includedFileName); - } - catch (BuildException) - { - throw; - } - catch (IOException e) - { - try - { - if (ChildTasks.Count == 0) - throw new BuildException("Could not include build file " + includedFileName, Location, e); - - BuildLog.WriteLine("Including {0} Failed. Fallback present and executed", includeRelative); - //BuildLog.WriteLine("Include {0} not found. Fallback executed", includeRelative); - } - catch (Exception fallbackException) - { - throw new BuildException("Could not include build file " + includedFileName + " fallback also failed", Location, fallbackException); - } - } - catch (ArgumentException e) - { - //Puede pasar - } - catch (Exception e) - { - throw new BuildException("Could not include build file " + includedFileName + " " + e.Message, Location, e); - } - finally - { - // pop off the stack - _includedFiles.Pop(); - } - } - - protected override void ExecuteTask() - { - } - - protected override void PreExecuteTask() - { - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/BuiltIn/Logic/IfNotTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/BuiltIn/Logic/IfNotTask.cs deleted file mode 100644 index b1530a34756..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/BuiltIn/Logic/IfNotTask.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.IO; -using System.Collections; -using System.Collections.Specialized; - -using SysGen.BuildEngine.Attributes; -using SysGen.BuildEngine.Log; - -namespace SysGen.BuildEngine.Tasks -{ - /// - /// The opposite of the if task. - /// - /// - /// Check existence of a property - /// - /// - /// - /// - /// ]]> - /// - /// Check that a property value is not true - /// - /// - /// - /// - /// ]]> - /// - /// - /// - /// Check that a target does not exist - /// - /// - /// - /// - /// ]]> - /// - [TaskName("ifnot")] - public class IfNotTask : IfTask - { - protected override bool ConditionsTrue - { - get { return !base.ConditionsTrue; } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/BuiltIn/Logic/IfTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/BuiltIn/Logic/IfTask.cs deleted file mode 100644 index a9bff9a22e6..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/BuiltIn/Logic/IfTask.cs +++ /dev/null @@ -1,134 +0,0 @@ -using System; -using System.IO; -using System.Collections; -using System.Collections.Specialized; - -using SysGen.BuildEngine.Attributes; -using SysGen.BuildEngine.Log; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("if")] - public class IfTask : TaskContainer - { - protected string _propName = null; - protected string _propValue = null; - protected string _propNameTrue = null; - protected string _propNameExists = null; - - /// - /// Used to test whether a property is true. - /// - [TaskAttribute("propertytrue")] - public string PropertyNameTrue { - set {_propNameTrue = value;} - } - - /// - /// Used to test whether a property exists. - /// - [TaskAttribute("propertyexists")] - public string PropertyNameExists { - set {_propNameExists = value;} - } - - /// - /// Used to test whether a property exists. - /// - [TaskAttribute("property")] - public string PropertyName - { - set { _propName = value; } - } - - /// - /// Used to test whether a property exists. - /// - [TaskAttribute("value")] - public string PropertyValue - { - set { _propValue = value; } - } - - protected override void PreExecuteTask() - { - if (!ConditionsTrue) - { - m_ExecuteChilds = false; - } - } - - /* - protected override void ExecuteTask() { - if(!ConditionsTrue) { - m_ExecuteChilds = false; - } - }*/ - - protected virtual bool ConditionsTrue - { - get - { - bool ret = true; - - if (_propName != null) - { - if (_propValue != null) - { - if (SysGen.Project.Properties.PropertyExists(_propName)) - { - return (SysGen.Project.Properties[_propName].Value == _propValue); - } - - return false; - } - else - { - ret = ret && SysGen.Project.Properties.PropertyExists(_propNameExists); - } - } - - ////check for target - //if(_targetName != null) { - // ret = ret && (SysGen.Targets.Find(_targetName) != null); - // if (!ret) return false; - //} - - //Check for the Property value of true. - if (_propNameTrue != null) - { - try - { - ret = ret && bool.Parse(SysGen.Project.Properties[_propNameTrue].Value); - } - catch (Exception e) - { - throw new BuildException("Property True test failed for '" + _propNameTrue + "'", Location, e); - } - } - - //Check for Property existence - if(_propNameExists != null) - { - ret = ret && SysGen.Project.Properties.PropertyExists(_propNameExists); - } - - ////check for uptodate file - //if(_uptodateFile != null) { - // FileInfo primaryFile = new FileInfo(_uptodateFile); - // if(primaryFile == null) { - // ret = true; - // } - // else { - // string newerFile = FileSet.FindMoreRecentLastWriteTime(_compareFiles.FileNames, primaryFile.LastWriteTime); - // bool bNeedsAnUpdate = (null == newerFile); - // BuildLog.WriteLineIf(SysGen.Verbose && bNeedsAnUpdate, "{0) is newer than {1}" , newerFile, primaryFile.Name); - // ret = !bNeedsAnUpdate; - // } - //} - - return ret; - } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/AutoFilesTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/AutoFilesTask.cs deleted file mode 100644 index 6e74be382a7..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/AutoFilesTask.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using System.IO; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - public abstract class AutoFilesBaseTask : AutoResolvableFileSystemInfoBaseTask - { - private string m_Pattern = "*.*"; - - public AutoFilesBaseTask() - { - } - - protected override void CreateFileSystemObject() - { - m_FileSystemInfo = new RBuildFolder(); - } - - public RBuildFolder Folder - { - get { return m_FileSystemInfo as RBuildFolder; } - } - - [TaskAttribute("pattern")] - public string Pattern { get { return m_Pattern; } set { m_Pattern = value; } } - - protected override void ExecuteTask() - { - base.ExecuteTask(); - - foreach(string file in Directory.GetFiles (SysGen.ResolveRBuildFolderPath(Folder) , Pattern)) - { - AddFile(file); - } - } - - protected abstract void AddFile (string file); - } - - [TaskName("autoinstallfiles")] - public class AutoInstallFiles : AutoFilesBaseTask - { - private string m_InstallBase = "."; - - [TaskAttribute("installbase")] - public string InstallBase { get { return m_InstallBase; } set { m_InstallBase = value; } } - - protected override void AddFile(string file) - { - RBuildInstallFile autoFile = new RBuildInstallFile(); - - autoFile.Root = Root; - autoFile.Base = Folder.Base; - autoFile.Name = Path.GetFileName(file); - autoFile.InstallBase = InstallBase; - - RBuildElement.Files.Add(autoFile); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/AutoInstallFilesTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/AutoInstallFilesTask.cs deleted file mode 100644 index 9548900348d..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/AutoInstallFilesTask.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.IO; - -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - //[TaskName("autoinstallfiles")] - //public class AutoInstallFilesTask : AutoFilesTask - //{ - // protected override void ExecuteTask() - // { - // } - //} -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/AutoManifest.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/AutoManifest.cs deleted file mode 100644 index 866d06eb058..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/AutoManifest.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.IO; - -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("automanifest")] - public class AutoManifest : ValueBaseTask - { - protected override void ExecuteTask() - { - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/AutoRegisterTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/AutoRegisterTask.cs deleted file mode 100644 index 045fdb851ac..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/AutoRegisterTask.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using SysGen.BuildEngine.Attributes; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("autoregister")] - public class AutoRegisterTask : Task - { - RBuildAutoRegister m_AutoRegister = new RBuildAutoRegister(); - - [TaskAttribute("type", Required = true)] - public AutoRegisterType Type { get { return m_AutoRegister.Type; } set { m_AutoRegister.Type = value; } } - - [TaskAttribute("infsection", Required = true)] - public string InfSection { get { return m_AutoRegister.InfSection; } set { m_AutoRegister.InfSection = value; } } - - protected override void ExecuteTask() - { - if ((Module.Type == ModuleType.Win32DLL) || - (Module.Type == ModuleType.Win32OCX)) - { - if (Module.AutoRegister != null) - throw new BuildException("There can be only one element for a module", Location); - - Module.AutoRegister = m_AutoRegister; - } - else - throw new BuildException(" is not applicable for this module type", Location); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/AutoResource.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/AutoResource.cs deleted file mode 100644 index 359132395d1..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/AutoResource.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.IO; - -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - //[TaskName("autoresource")] - //public class AutoResourceTask : AutoFilesTask - //{ - // protected override void ExecuteTask() - // { - // } - //} -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/AuthorBaseTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/AuthorBaseTask.cs deleted file mode 100644 index a12ea2f5202..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/AuthorBaseTask.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - public abstract class AuthorBaseTask : Task - { - protected string m_Alias = null; - protected RBuildAuthor m_Author = new RBuildAuthor(); - - [TaskValue(Required=true)] - public virtual string Alias { get { return m_Alias; } set { m_Alias = value; } } - - protected override void ExecuteTask() - { - m_Author.Contributor = Project.Contributors.GetByName(Alias); - - if (m_Author.Contributor == null) - throw new BuildException(string.Format("Could not resolve contributor '{0}' referenced by module '{1}'", Alias, Module.Name, Location)); - - Module.Authors.Add(m_Author); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/AutoFilesTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/AutoFilesTask.cs deleted file mode 100644 index 7a4dc70523b..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/AutoFilesTask.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.IO; - -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - //public abstract class AutoFilesTask : Task - //{ - // FileSet files = new FileSet(); - - // [FileSet("files")] - // public FileSet Files - // { - // get { return files; } - // set { files = value; } - // } - //} -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/CDFileBaseTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/CDFileBaseTask.cs deleted file mode 100644 index 869df983965..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/CDFileBaseTask.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - public abstract class CDFileBaseTask : FileBaseTask //PlatformFileBaseTask - { - public CDFileBaseTask() - { - } - - [TaskAttribute("installbase")] - public string InstallBase { get { return CDFile.InstallBase; } set { CDFile.InstallBase = value; } } - - protected override void CreateFileSystemObject() - { - m_FileSystemInfo = new RBuildCDFile(); - } - - /// - /// The name of the define to set. - /// - [TaskAttribute("nameoncd")] - public string NameOnCD { get { return CDFile.NewName; } set { CDFile.NewName = value; } } - - private RBuildCDFileBase CDFile - { - get { return m_FileSystemInfo as RBuildCDFileBase; } - } - - protected override void ExecuteTask() - { - //Call the base class - base.ExecuteTask(); - - //Add the file - RBuildElement.Files.Add(CDFile); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/FileBaseTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/FileBaseTask.cs deleted file mode 100644 index 67773a31bed..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/FileBaseTask.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.IO; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - public abstract class FileBaseTask : FileSystemInfoBaseTask - { - public FileBaseTask() - { - } - - /// - /// The define value. - /// - [TaskValue] - public virtual string FileName { get { return m_FileSystemInfo.Name; } set { m_FileSystemInfo.Name = value; } } - - ///// - ///// Get the underlying . - ///// - //public RBuildPlatformFile PlatformFile - //{ - // get { return m_FileSystemInfo as RBuildPlatformFile; } - //} - - //public override string BasePath - //{ - // get - // { - // IElement task = this; - // while (task != SysGen.ProjectTask) - // { - // if (task is IDirectory) - // return ((IDirectory)task).BasePath; - - // task = task.Parent; - // } - - // //Is in the root - // return string.Empty; - // } - //} - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/FileSystemInfoBaseTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/FileSystemInfoBaseTask.cs deleted file mode 100644 index 3046065d483..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/FileSystemInfoBaseTask.cs +++ /dev/null @@ -1,119 +0,0 @@ -using System; -using System.IO; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - public abstract class AutoResolvableFileSystemInfoBaseTask : FileSystemInfoBaseTask - { - protected override bool TryToResolveBasePath() - { - if (Base == "eventlog_server") - { - int i = 10; - } - - if ((Base != null) && (Base != string.Empty)) - { - if (Base != Project.Name) - { - // Get the referenced module - RBuildModule module = Project.Modules.GetByName(Base); - - if (module == null) - throw new BuildException(string.Format("Could not resolve module base '{0}' for module '{1}'", Base, Module.Name, Location)); - - // If no path has been specified by the user - // set the module default path - if (Root == PathRoot.Default) - Root = module.IncludeDefaultRoot; - - // Set the base to the module root - m_FileSystemInfo.Base = module.Folder.FullPath; - } - else - { - // Set the base to the project root - m_FileSystemInfo.Base = Project.Base; - } - } - else - { - // Set the base to the folder containing the module - m_FileSystemInfo.Base = InFolder.FullPath; - } - - if (m_FileSystemInfo.Base == null || m_FileSystemInfo.Name == null) - { - int i = 10; - } - - return true; - } - } - - public abstract class FileSystemInfoBaseTask : Task - { - protected RBuildFileSystemInfo m_FileSystemInfo = null; - - public FileSystemInfoBaseTask() - { - CreateFileSystemObject(); - } - - protected abstract void CreateFileSystemObject(); - - /// - /// The name of the define to set. - /// - [TaskAttribute("base")] - public string Base { get { return m_FileSystemInfo.Base; } set { m_FileSystemInfo.Base = value; } } - - /// - /// The name of the define to set. - /// - [TaskAttribute("root")] - public PathRoot Root { get { return m_FileSystemInfo.Root; } set { m_FileSystemInfo.Root = value; } } - - /// - /// Get the underlying . - /// - public RBuildFileSystemInfo FileSystemInfo - { - get { return m_FileSystemInfo; } - } - - protected virtual void SetRBuildElement() - { - //m_FileSystemInfo.Element = RBuildElement; - } - - protected virtual void SetRootFromParent() - { - } - - protected virtual bool TryToResolveBasePath () - { - return false; - } - - protected override void PreExecuteTask() - { - SetRootFromParent(); - SetRBuildElement(); - } - - protected override void ExecuteTask() - { - // Give the oportunity to subclasses to resolve the path - if (!TryToResolveBasePath()) - { - // If no base path has been specified default to current - if (string.IsNullOrEmpty(Base)) - Base = SysGenPathResolver.GetPath(this, SysGen.RootTask); - } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/FolderBaseTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/FolderBaseTask.cs deleted file mode 100644 index c17c86473f2..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/FolderBaseTask.cs +++ /dev/null @@ -1,15 +0,0 @@ -//using System; - -//using SysGen.BuildEngine.Attributes; -//using SysGen.RBuild.Framework; - -//namespace SysGen.BuildEngine.Tasks -//{ -// public abstract class FolderBaseTask : Task -// { -// protected override void CreateFileSystemObject() -// { -// m_FileSystemInfo = new RBuildFolder(); -// } -// } -//} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/PlatformFileBaseTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/PlatformFileBaseTask.cs deleted file mode 100644 index 2bfa1c70702..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/PlatformFileBaseTask.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.IO; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - public abstract class PlatformFileBaseTask : FileBaseTask - { - /// - /// The define value. - /// - [TaskValue] - public string FileName { get { return m_FileSystemInfo.Name; } set { m_FileSystemInfo.Name = value; } } - - [TaskAttribute("installbase")] - public string InstallBase { get { return PlatformFile.InstallBase; } set { PlatformFile.InstallBase = value; } } - - /// - /// Get the underlying . - /// - public RBuildPlatformFile PlatformFile - { - get { return m_FileSystemInfo as RBuildPlatformFile; } - } - - protected override void ExecuteTask() - { - //Call the base class - base.ExecuteTask(); - - //Add the file - RBuildElement.Files.Add(PlatformFile); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/PropertyBaseTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/PropertyBaseTask.cs deleted file mode 100644 index cc9e8fd8c55..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/PropertyBaseTask.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Xml; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - public abstract class PropertyBaseTask : Task - { - protected string m_Name = null; - protected string m_Value = String.Empty; - protected bool m_ReadOnly = false; - protected bool m_Internal = false; - - /// the name of the property to set. - [TaskAttribute("name", Required=true)] - public string PropName { get { return m_Name; } set { m_Name = value; } } - - /// the value of the property. - [TaskAttribute("value", Required=true)] - public string Value { get { return m_Value; } set { m_Value = value; } } - - /// the value of the property. - [TaskAttribute("readonly")] - [BooleanValidator()] - public bool ReadOnly { get { return m_ReadOnly; } set { m_ReadOnly = value; } } - - [TaskAttribute("internal")] - [BooleanValidator()] - public bool Internal { get { return m_Internal; } set { m_Internal = value; } } - - protected override void OnLoad() - { - Project.Properties.Add(new RBuildProperty(m_Name, m_Value, m_ReadOnly, m_Internal)); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/RbuildElementBaseTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/RbuildElementBaseTask.cs deleted file mode 100644 index 7afe7a5f9ab..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/RbuildElementBaseTask.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Xml; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - public abstract class RbuildElementBaseTask : Task - { - protected override void OnLoad() - { - - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/ValueBaseTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/ValueBaseTask.cs deleted file mode 100644 index ae1c1137c7f..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Base/ValueBaseTask.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - public abstract class ValueBaseTask : Task - { - protected string _value = null; - - /// - /// The define value. - /// - [TaskValue] - public virtual string Value { get { return _value; } set { _value = value; } } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/BaseAdressTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/BaseAdressTask.cs deleted file mode 100644 index 39ea6a8c071..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/BaseAdressTask.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Xml; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("baseadress")] - public class BaseAdressTask : PropertyBaseTask - { - protected override void OnLoad() - { - Project.Properties.Add(new RBuildBaseAdress(m_Name, m_Value)); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/BootSector.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/BootSector.cs deleted file mode 100644 index 05ce34d2b35..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/BootSector.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.IO; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("bootsector")] - public class BootSector : ValueBaseTask - { - protected override void ExecuteTask() - { - RBuildModule bootModule = Project.Modules.GetByName(Value); - - if (bootModule != null) - { - if (bootModule.Type == ModuleType.BootSector) - { - if (Module.Type == ModuleType.Iso || - Module.Type == ModuleType.IsoRegTest || - Module.Type == ModuleType.LiveIso || - Module.Type == ModuleType.LiveIsoRegTest) - { - if (Module.BootSector == null) - Module.BootSector = bootModule; - } - else - throw new BuildException(" is not applicable for this module type.", Location); - } - else - throw new BuildException(" for module '{0}' is referencing a non BootSector module '{1}'", - Module.Name, - bootModule.Name, - Location); - } - else - throw new BuildException(" for module '{0}' is referencing a non existing module '{1}'", - Module.Name, - Value, - Location); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/BootstrapFileTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/BootstrapFileTask.cs deleted file mode 100644 index 7d68ee9fc99..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/BootstrapFileTask.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using SysGen.BuildEngine.Attributes; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("bootstrapfile")] - public class BootstrapFileTask : CDFileBaseTask //FileBaseTask ///PlatformFileBaseTask - { - public BootstrapFileTask() - { - } - - [TaskValue] - public string FileName { get { return m_FileSystemInfo.Name; } set { m_FileSystemInfo.Name = value; } } - - protected override void CreateFileSystemObject() - { - m_FileSystemInfo = new RBuildBootstrapFile(); - } - - public RBuildBootstrapFile BootStrapFile - { - get { return m_FileSystemInfo as RBuildBootstrapFile; } - } - - protected override bool TryToResolveBasePath() - { - Base = "i386"; - return true; - } - - protected override void ExecuteTask() - { - //Call the base class - base.ExecuteTask(); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/BootstrapTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/BootstrapTask.cs deleted file mode 100644 index a3713de30bf..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/BootstrapTask.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("bootstrap")] - public class BootstrapTask : CDFileBaseTask - { - public BootstrapTask() - { - m_FileSystemInfo = new RBuildBootstrapFile(); - } - - private RBuildBootstrapFile BootstrapFile - { - get { return m_FileSystemInfo as RBuildBootstrapFile; } - } - - protected override void ExecuteTask() - { - if ((Module.Type == ModuleType.Kernel) || - (Module.Type == ModuleType.KernelModeDLL) || - (Module.Type == ModuleType.KeyboardLayout) || - (Module.Type == ModuleType.KernelModeDriver) || - (Module.Type == ModuleType.NativeDLL) || - (Module.Type == ModuleType.NativeCUI) || - (Module.Type == ModuleType.Win32DLL) || - (Module.Type == ModuleType.Win32OCX) || - (Module.Type == ModuleType.Win32CUI) || - (Module.Type == ModuleType.Win32SCR) || - (Module.Type == ModuleType.Win32GUI) || - (Module.Type == ModuleType.BootSector) || - (Module.Type == ModuleType.BootLoader) || - (Module.Type == ModuleType.BootProgram) || - (Module.Type == ModuleType.Cabinet)) - { - BootstrapFile.Element = RBuildElement; - BootstrapFile.Name = Module.TargetName; - BootstrapFile.Root = Module.TargetDefaultRoot; - BootstrapFile.Base = Module.Folder.FullPath; - - Module.Bootstrap = BootstrapFile; - - //Project.Files.Add(BootstrapFile); - } - else - throw new BuildException(" is not applicable for this module type.", Location); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/BuildFamilyTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/BuildFamilyTask.cs deleted file mode 100644 index 29d2ead87aa..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/BuildFamilyTask.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - /// - /// Just a task container - /// - [TaskName("buildfamily")] - public class BuildFamilyTask : Task - { - private RBuildBuildFamily m_BuildFamily = new RBuildBuildFamily(); - - [TaskAttribute("name", Required = true)] - public string FamilyName { get { return m_BuildFamily.Name; } set { m_BuildFamily.Name = value; } } - - [TaskAttribute("description")] - public string FamilyDescription { get { return m_BuildFamily.Description; } set { m_BuildFamily.Description = value; } } - - protected override void PreExecuteTask() - { - Project.BuildFamilies.Add(m_BuildFamily); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/CDFileTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/CDFileTask.cs deleted file mode 100644 index 6f9b6bcf13a..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/CDFileTask.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("cdfile")] - public class CDFileTask : CDFileBaseTask - { - public CDFileTask() - { - } - - protected override void CreateFileSystemObject() - { - m_FileSystemInfo = new RBuildCDFile(); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/CompilationUnitTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/CompilationUnitTask.cs deleted file mode 100644 index d08a5005ed7..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/CompilationUnitTask.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System; -using SysGen.BuildEngine.Attributes; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("compilationunit")] - public class CompilationUnitTask : FileSystemInfoBaseTask, ITaskContainer, IRBuildSourceFilesContainer - { - private TaskCollection m_ChildTasks = new TaskCollection(); - - public CompilationUnitTask() - { - Root = PathRoot.Intermediate; - } - - public TaskCollection ChildTasks - { - get { return m_ChildTasks; } - } - - public bool ExecuteChilds - { - get { return true; } - } - - protected override void CreateFileSystemObject() - { - m_FileSystemInfo = new RBuildCompilationUnitFile(); - } - - public RBuildCompilationUnitFile CompilationUnit - { - get { return m_FileSystemInfo as RBuildCompilationUnitFile; } - } - - public RBuildSourceFileCollection SourceFiles - { - get { return CompilationUnit.SourceFiles; } - } - - /// - /// The name of the compilation unit to set. - /// - [TaskAttribute("name")] - public string FileName { get { return m_FileSystemInfo.Name; } set { m_FileSystemInfo.Name = value; } } - - protected override void ExecuteTask() - { - base.ExecuteTask(); - - // Add the compilation unit to the current module - Module.CompilationUnits.Add(CompilationUnit); - } - - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/CompilerFlagTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/CompilerFlagTask.cs deleted file mode 100644 index 87eb278d232..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/CompilerFlagTask.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("compilerflag")] - public class CompilerFlagTask : ValueBaseTask - { - protected override void ExecuteTask() - { - RBuildElement.CompilerFlags.Add(Value); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/ComponentTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/ComponentTask.cs deleted file mode 100644 index 7063b105a2d..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/ComponentTask.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("component")] - public class ComponentTask : Task - { - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/ContributorTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/ContributorTask.cs deleted file mode 100644 index a6528adddea..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/ContributorTask.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("contributor")] - public class ContributorTask : Task - { - private RBuildContributor m_Contributor = new RBuildContributor(); - - [TaskAttribute("firstname", Required = true)] - public string FirstName { get { return m_Contributor.FirstName; } set { m_Contributor.FirstName = value; } } - - [TaskAttribute("city")] - public string City { get { return m_Contributor.City; } set { m_Contributor.City = value; } } - - [TaskAttribute("country")] - public string Country { get { return m_Contributor.Country; } set { m_Contributor.Country = value; } } - - [TaskAttribute("lastname")] - public string LastName { get { return m_Contributor.LastName; } set { m_Contributor.LastName = value; } } - - [TaskAttribute("alias")] - public string Alias { get { return m_Contributor.Alias; } set { m_Contributor.Alias = value; } } - - [TaskAttribute("mail")] - public string Mail { get { return m_Contributor.Mail; } set { m_Contributor.Mail = value; } } - - [TaskAttribute("website")] - public string Website { get { return m_Contributor.Website; } set { m_Contributor.Website = value; } } - - [TaskAttribute("active")] - public bool Active { get { return m_Contributor.Active; } set { m_Contributor.Active = value; } } - - protected override void ExecuteTask() - { - Project.Contributors.Add(m_Contributor); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/DebugChannelTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/DebugChannelTask.cs deleted file mode 100644 index 886d0489155..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/DebugChannelTask.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("debugchannel")] - public class DebugChannelTask : Task - { - RBuildDebugChannel m_DebugChannel = new RBuildDebugChannel(); - - [TaskAttribute("name")] - [TaskValue] - public string ChannelName - { - get { return m_DebugChannel.Name; } - set { m_DebugChannel.Name = value; } - } - - [TaskAttribute("warning")] - public bool Warning - { - get { return m_DebugChannel.Warn; } - set { m_DebugChannel.Warn = value; } - } - - [TaskAttribute("trace")] - public bool Trace - { - get { return m_DebugChannel.Trace; } - set { m_DebugChannel.Trace = value; } - } - - [TaskAttribute("fixme")] - public bool Fixme - { - get { return m_DebugChannel.Fixme; } - set { m_DebugChannel.Fixme = value; } - } - - [TaskAttribute("error")] - public bool Error - { - get { return m_DebugChannel.Error; } - set { m_DebugChannel.Error = value; } - } - - protected override void ExecuteTask() - { - Project.DebugChannels.Add(m_DebugChannel); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/DefineTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/DefineTask.cs deleted file mode 100644 index 071ff49d50f..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/DefineTask.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("define")] - public class DefineTask : Task - { - private string _name = null; - private string _value = String.Empty; - private string _backend = String.Empty; - private bool _empty = false; - - /// - /// The name of the define to set. - /// - [TaskAttribute("name", Required=true)] - public string DefineName { get { return _name; } set { _name = value; } } - - /// - /// The define value. - /// - [TaskAttribute("value")] - [TaskValue] - public string DefineValue { get { return _value; } set { _value = value; } } - - /// - /// The name of the define to set. - /// - [TaskAttribute("empty")] - [BooleanValidator] - public bool Empty { get { return _empty; } set { _empty = value; } } - - // TODO : Remove ? - [TaskAttribute("backend")] - public string Backend { get { return _backend; } set { _backend = value; } } - - protected override void ExecuteTask() - { - RBuildElement.Defines.Add(new RBuildDefine(DefineName, DefineValue)); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/DependencyTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/DependencyTask.cs deleted file mode 100644 index d9a90606f42..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/DependencyTask.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using SysGen.BuildEngine.Attributes; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("dependency")] - public class DependencyTask : ValueBaseTask - { - /// - /// The define value. - /// - [TaskValue(Required = true)] - public virtual string Value { get { return _value; } set { _value = value; } } - - protected override void ExecuteTask() - { - RBuildModule dependency = Project.Modules.GetByName(Value); - - if (dependency == null) - throw new BuildException("Unknown dependency '{0}' referenced by module '{1}'", Value, Module.Name); - - Module.Dependencies.Add(dependency); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/DeveloperTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/DeveloperTask.cs deleted file mode 100644 index 1c2a6a4fe61..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/DeveloperTask.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("developer")] - public class DeveloperTask : AuthorBaseTask - { - public DeveloperTask() - { - m_Author.Role = AuthorRole.Developer; - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/DirectoryTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/DirectoryTask.cs deleted file mode 100644 index efc632767c8..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/DirectoryTask.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System.IO; -using System.Collections.Generic; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("directory")] - public class DirectoryTask : FileSystemInfoBaseTask, ITaskContainer//, IDirectory - { - private TaskCollection m_ChildTasks = new TaskCollection(); - - public DirectoryTask() - { - } - - protected override void CreateFileSystemObject() - { - m_FileSystemInfo = new RBuildFolder(); - } - - public TaskCollection ChildTasks - { - get { return m_ChildTasks; } - } - - public bool ExecuteChilds - { - get { return true; } - } - - /// - /// The directory name. - /// - [TaskAttribute("name", Required = true)] - public virtual string Name { get { return m_FileSystemInfo.Name; } set { m_FileSystemInfo.Name = value; } } - - public RBuildFolder Folder - { - get { return m_FileSystemInfo as RBuildFolder; } - } - - protected override void OnInit() - { - base.OnInit(); - - Base = SysGenPathResolver.GetPath(this, SysGen.RootTask); - } - - protected override void ExecuteTask() - { - base.ExecuteTask(); - - if (RBuildElement.Folders.Contains(Folder) == false) - RBuildElement.Folders.Add(Folder); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/FamilyTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/FamilyTask.cs deleted file mode 100644 index 6051c9b52c8..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/FamilyTask.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("family")] - public class FamilyTask : Task - { - private RBuildFamily m_Family = new RBuildFamily(); - - [TaskValue(Required = true)] - public string FamilyName { get { return m_Family.Name; } set { m_Family.Name = value; } } - - protected override void ExecuteTask() - { - RBuildBuildFamily buildFamily = Project.BuildFamilies.GetByName(FamilyName); - - if (buildFamily == null) - throw new BuildException("Module '{0}' references a no existant family '{1}'", - Module.Name, - FamilyName); - - Module.Families.Add(m_Family); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/FileTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/FileTask.cs deleted file mode 100644 index 0b3e3af243d..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/FileTask.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.IO; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("file")] - public class FileTask : FileBaseTask - { - public FileTask() - { - } - - protected override void CreateFileSystemObject() - { - m_FileSystemInfo = new RBuildSourceFile(); - } - - [TaskAttribute("switches")] - public string Switches { get { return SourceFile.Switches; } set { SourceFile.Switches = value; } } - - [TaskAttribute("first")] - [BooleanValidator] - public bool First { get { return SourceFile.First; } set { SourceFile.First = value; } } - - /// - /// Set the root to the same as the containing folder - /// - protected override void SetRootFromParent() - { - Root = InFolder.Root; - } - - public RBuildSourceFile SourceFile - { - get { return m_FileSystemInfo as RBuildSourceFile; } - } - - protected override void ExecuteTask() - { - //Call the base class - base.ExecuteTask(); - - //Add the file - Module.SourceFiles.Add(SourceFile); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/GroupTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/GroupTask.cs deleted file mode 100644 index f98029aa1fd..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/GroupTask.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - /// - /// Just a simple task container - /// - [TaskName("group")] - public class GroupTask : TaskContainer - { - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/ImportLibraryTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/ImportLibraryTask.cs deleted file mode 100644 index 31e212c0a7a..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/ImportLibraryTask.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using SysGen.BuildEngine.Attributes; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("importlibrary")] - public class ImportLibraryTask : AutoResolvableFileSystemInfoBaseTask //FileBaseTask - { - protected override void CreateFileSystemObject() - { - m_FileSystemInfo = new RBuildImportLibrary(); - } - - public RBuildImportLibrary ImportLibrary - { - get { return m_FileSystemInfo as RBuildImportLibrary; } - } - - /// - /// The directory name. - /// - [TaskAttribute("dllname")] - public string DllName { get { return ImportLibrary.DllName; } set { ImportLibrary.DllName = value; } } - - /// - /// The directory name. - /// - [TaskAttribute("definition", Required = true)] - public string Definition { get { return ImportLibrary.Name; } set { ImportLibrary.Name = value; } } - - protected override void ExecuteTask() - { - base.ExecuteTask(); - - //Hack:: - if (ImportLibrary.IsSpecFile) - ImportLibrary.Root = PathRoot.Intermediate; - - if ((DllName == null) && (Module.Type == ModuleType.StaticLibrary)) - throw new BuildException(" dllname attribute is required.", Location); - - if (Module.ImportLibrary != null) - throw new BuildException("Only one is allowed per module.", Location); - - Module.ImportLibrary = ImportLibrary; - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/IncludeTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/IncludeTask.cs deleted file mode 100644 index b923ecf157b..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/IncludeTask.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.IO; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("include")] - public class IncludeTask : AutoResolvableFileSystemInfoBaseTask //FileSystemInfoBaseTask - { - public IncludeTask() - { - } - - protected override void CreateFileSystemObject() - { - m_FileSystemInfo = new RBuildFolder(); - } - - [TaskValue] - public virtual string IncludePath - { - get { return m_FileSystemInfo.Name; } - set { m_FileSystemInfo.Name = value; } - } - - public RBuildFolder IncludeFolder - { - get { return m_FileSystemInfo as RBuildFolder; } - } - - protected override void ExecuteTask() - { - //Call the base class - base.ExecuteTask(); - - //Add include folder... - RBuildElement.IncludeFolders.Add(IncludeFolder); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/InstalFolder.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/InstalFolder.cs deleted file mode 100644 index f395b8efda9..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/InstalFolder.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("installfolder")] - public class InstalFolder : Task - { - RBuildInstallFolder m_InstallFolder = new RBuildInstallFolder(); - - /// - /// The name of the define to set. - /// - [TaskAttribute("id")] - public string ID { get { return m_InstallFolder.ID; } set { m_InstallFolder.ID = value; } } - - /// - /// The name of the define to set. - /// - [TaskAttribute("name")] - [TaskValue(Required = true)] - public string Name { get { return m_InstallFolder.Name; } set { m_InstallFolder.Name = value; } } - - protected override void ExecuteTask() - { - Project.InstallFolders.Add(m_InstallFolder); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/InstallComponent.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/InstallComponent.cs deleted file mode 100644 index 36fc4567114..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/InstallComponent.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("installcomponent")] - public class InstallComponent : FileBaseTask - { - public InstallComponent() - { - } - - [TaskAttribute("section")] - public string InstallSection { get { return InstallComponentFile.InstallSection; } set { InstallComponentFile.InstallSection = value; } } - - protected override void CreateFileSystemObject() - { - m_FileSystemInfo = new RBuildInfInstallerFile(); - } - - public RBuildInfInstallerFile InstallComponentFile - { - get { return m_FileSystemInfo as RBuildInfInstallerFile; } - } - - protected override void ExecuteTask() - { - //Call the base class - base.ExecuteTask(); - - if (Module.LinkerScript != null) - throw new BuildException("Only one is allowed per module", Location); - - //Module.InfInstall = InstallComponentFile; - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/InstallFileTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/InstallFileTask.cs deleted file mode 100644 index ec7bb2a3154..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/InstallFileTask.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("installfile")] - public class InstallFileTask : PlatformFileBaseTask - { - public InstallFileTask() - { - } - - protected override void CreateFileSystemObject() - { - m_FileSystemInfo = new RBuildInstallFile(); - } - - /// - /// The name of the define to set. - /// - [TaskAttribute("newname")] - public string NewName { get { return InstallFile.NewName; } set { InstallFile.NewName = value; } } - - private RBuildInstallFile InstallFile - { - get { return m_FileSystemInfo as RBuildInstallFile; } - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/InstallWallPaperFileTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/InstallWallPaperFileTask.cs deleted file mode 100644 index d8e8e4a774f..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/InstallWallPaperFileTask.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("installwallpaperfile")] - public class InstallWallPaperFileTask : PlatformFileBaseTask - { - protected override void CreateFileSystemObject() - { - m_FileSystemInfo = new RBuildInstallWallpaperFile(); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/LanguageTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/LanguageTask.cs deleted file mode 100644 index 4acf0a8788c..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/LanguageTask.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("language")] - public class LanguageTask : Task - { - RBuildLanguage m_Language = new RBuildLanguage(); - - [TaskAttribute("isoname")] - public string IsoName { get { return m_Language.Name; } set { m_Language.Name = value; } } - - [TaskAttribute("lcid")] - public string LCID { get { return m_Language.LCID; } set { m_Language.LCID = value; } } - - protected override void ExecuteTask() - { - Project.Languages.Add(m_Language); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/LibraryTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/LibraryTask.cs deleted file mode 100644 index 79c3f159b1a..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/LibraryTask.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using SysGen.BuildEngine.Attributes; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("library")] - public class LibraryTask : ValueBaseTask - { - /// - /// The define value. - /// - [TaskValue(Required=true)] - public override string Value { get { return _value; } set { _value = value; } } - - protected override void ExecuteTask() - { - RBuildModule libModule = Project.Modules.GetByName(Value); - - if (libModule == null) - throw new BuildException("Unknown library dependency '{0}' referenced by module '{1}'", Value, Module.Name); - - if (Module.Host != libModule.Host) - throw new BuildException("Module '{0}' is trying to link against library '{1}' but can't mix target and hosts", - Module.Name, - libModule.Name); - - if ((libModule.Type != ModuleType.NativeDLL) && - (libModule.Type != ModuleType.Win32DLL) && - (libModule.Type != ModuleType.StaticLibrary) && - (libModule.Type != ModuleType.ObjectLibrary) && - (libModule.Type != ModuleType.Kernel) && - (libModule.Type != ModuleType.KernelModeDLL) && - (libModule.Type != ModuleType.KernelModeDriver) && - (libModule.Type != ModuleType.KeyboardLayout) && - (libModule.Type != ModuleType.RpcServer) && - (libModule.Type != ModuleType.RpcClient) && - (libModule.Type != ModuleType.RpcProxy) && - (libModule.Type != ModuleType.HostStaticLibrary)) - { - throw new BuildException("Module '{0}' is trying to use Module '{1}' as a library but it is a '{2}'", - Module.Name, - libModule.Name, - libModule.Type); - } - - Module.Libraries.Add(libModule); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/LinkerFlagTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/LinkerFlagTask.cs deleted file mode 100644 index 7a12e3fae3a..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/LinkerFlagTask.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("linkerflag")] - public class LinkerFlagTask : ValueBaseTask - { - protected override void ExecuteTask() - { - RBuildElement.LinkerFlags.Add(Value); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/LinkerScriptTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/LinkerScriptTask.cs deleted file mode 100644 index e52c49ab9ff..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/LinkerScriptTask.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("linkerscript")] - public class LinkerScriptTask : FileBaseTask - { - public LinkerScriptTask() - { - } - - protected override void CreateFileSystemObject() - { - m_FileSystemInfo = new RBuildFile(); - } - - public RBuildFile ScriptFile - { - get { return m_FileSystemInfo as RBuildFile; } - } - - protected override void ExecuteTask() - { - //Call the base class - base.ExecuteTask(); - - if (Module.LinkerScript != null) - throw new BuildException("Only one is allowed per module", Location); - - Module.LinkerScript = ScriptFile; - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/LocalizationTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/LocalizationTask.cs deleted file mode 100644 index 907505d86ca..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/LocalizationTask.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("localization")] - public class LocalizationTask : FileBaseTask - { - public LocalizationTask() - { - } - - protected override void CreateFileSystemObject() - { - m_FileSystemInfo = new RBuildLocalizationFile(); - } - - [TaskAttribute("isoname")] - public string IsoName { get { return LocalizationFile.IsoName; } set { LocalizationFile.IsoName = value; } } - - [TaskAttribute("dirty")] - public bool Dirty { get { return LocalizationFile.Dirty; } set { LocalizationFile.Dirty = value; } } - - private RBuildLocalizationFile LocalizationFile - { - get { return m_FileSystemInfo as RBuildLocalizationFile; } - } - - protected override void ExecuteTask() - { - RBuildLanguage language = Project.Languages.GetByName(IsoName); - - if (language == null) - throw new BuildException("Unknown language '{0}' referenced by module '{1}'", IsoName, Module.Name); - - Module.LocalizationFiles.Add(LocalizationFile); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/MantainterTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/MantainterTask.cs deleted file mode 100644 index 91f61db53a1..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/MantainterTask.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("mantainer")] - public class MantainterTask : AuthorBaseTask - { - public MantainterTask() - { - m_Author.Role = AuthorRole.Mantainer; - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/MetadataTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/MetadataTask.cs deleted file mode 100644 index 3e2b4b67053..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/MetadataTask.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("metadata")] - public class MetadataTask : Task - { - RBuildMetadata m_Metadata = new RBuildMetadata(); - - /// - /// The module description. - /// - [TaskAttribute("description")] - public string Description { get { return m_Metadata.Description; } set { m_Metadata.Description = value; } } - - protected override void ExecuteTask() - { - if (Module.Metadata != null) - throw new BuildException("Only one is allowed per module.", Location); - - Module.Metadata = m_Metadata; - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/ModuleStateTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/ModuleStateTask.cs deleted file mode 100644 index f15b47bf9dc..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/ModuleStateTask.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using SysGen.BuildEngine.Attributes; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("modulestate")] - public class ModuleStateTask : Task - { - private string m_ModuleName = null; - private bool m_Enabled = true; - - [TaskAttribute("name")] - public string ModuleName { get { return m_ModuleName; } set { m_ModuleName = value; } } - - [TaskAttribute("enabled")] - [BooleanValidator] - public bool Enabled { get { return m_Enabled; } set { m_Enabled = value; } } - - protected override void ExecuteTask() - { - if (ModuleName != null) - { - RBuildModule module = Project.Modules.GetByName(ModuleName); - - if (module == null) - throw new BuildException(string.Format("Could not change state for module '{0}'", ModuleName, Location)); - - module.Enabled = Enabled; - } - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/ModuleTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/ModuleTask.cs deleted file mode 100644 index ba9b2e09d58..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/ModuleTask.cs +++ /dev/null @@ -1,589 +0,0 @@ -using System; -using System.IO; -using System.Xml; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("module")] - public class ModuleTask : TaskContainer /*AutoResolvableFileSystemInfoBaseTask ,, ITaskContainer,*/ /*TaskContainer,*/ , ISysGenObject/*, IDirectory,*/, IRBuildSourceFilesContainer - { - protected RBuildModule m_Module = new RBuildModule(); - - [TaskAttribute("name", Required = true)] - [StringValidator(AllowEmpty = false, AllowSpaces = false)] - public string ModuleName - { - get { return m_Module.Name; } - set { m_Module.Name = value; } - } - - [TaskAttribute("type", Required = true)] - public ModuleType Type - { - get { return m_Module.Type; } - set { m_Module.Type = value; } - } - - [TaskAttribute("buildtype")] - public string BuildType - { - get { return m_Module.BuildType; } - set { m_Module.BuildType = value; } - } - - [TaskAttribute("description", ExpandProperties = true)] - public string Description - { - get { return m_Module.Description; } - set { m_Module.Description = value; } - } - - [TaskAttribute("lcid")] - public string LCID - { - get { return m_Module.LCID; } - set { m_Module.LCID = value; } - } - - [TaskAttribute("installname")] - public string InstallName - { - get { return m_Module.InstallName; } - set { m_Module.InstallName = value; } - } - - [TaskAttribute("installbase")] - [UriValidatorAttribute] - public string InstallBase - { - get { return m_Module.InstallBase; } - set { m_Module.InstallBase = value; } - } - - [TaskAttribute("output")] - public string Output - { - get { return m_Module.OutputName; } - set { m_Module.OutputName = value; } - } - - [TaskAttribute("baseaddress")] - public string BaseAdress - { - get { return m_Module.BaseAddress; } - set { m_Module.BaseAddress = value; } - } - - [TaskAttribute("entrypoint")] - public string EntryPoint - { - get { return m_Module.EntryPoint; } - set { m_Module.EntryPoint = value; } - } - - [TaskAttribute("aliasof")] - public string AliasOf - { - get { return m_Module.AliasOf; } - set { m_Module.AliasOf = value; } - } - - [TaskAttribute("extension")] - public string Extension - { - get { return m_Module.Extension; } - set { m_Module.Extension = value; } - } - - [TaskAttribute("unicode")] - [BooleanValidator()] - public bool Unicode - { - get { return m_Module.Unicode; } - set { m_Module.Unicode = value; } - } - - [TaskAttribute("host")] - [BooleanValidator()] - public bool Host - { - get { return m_Module.Host; } - set { m_Module.Host = value; } - } - - [TaskAttribute("isstartuplib")] - [BooleanValidator()] - public bool IsStartupLib - { - get { return m_Module.IsStartupLib; } - set { m_Module.IsStartupLib = value; } - } - - [TaskAttribute("underscoresymbols")] - [BooleanValidator()] - public bool UnderscoreSymbols - { - get { return m_Module.UnderscoreSymbols; } - set { m_Module.UnderscoreSymbols = value; } - } - - [TaskAttribute("mangledsymbols")] - [BooleanValidator()] - public bool MangledSymbols - { - get { return m_Module.MangledSymbols; } - set { m_Module.MangledSymbols = value; } - } - - [TaskAttribute("allowwarnings")] - [BooleanValidator()] - public bool AllowWarnings - { - get { return m_Module.AllowWarnings; } - set { m_Module.AllowWarnings = value; } - } - - public RBuildModule Module - { - get { return m_Module; } - } - - public RBuildElement RBuildElement - { - get { return m_Module; } - } - - public PathRoot Root - { - get { return PathRoot.Default; } - } - - public RBuildSourceFileCollection SourceFiles - { - get { return Module.SourceFiles; } - } - - protected override void OnLoad() - { - base.OnLoad(); - - if ((Module.Type == ModuleType.BootLoader) || - (Module.Type == ModuleType.BootProgram) || - (Module.Type == ModuleType.BootSector) || - (Module.Type == ModuleType.EmbeddedTypeLib) || - (Module.Type == ModuleType.IdlHeader) || - (Module.Type == ModuleType.IdlInterface) || - (Module.Type == ModuleType.Kernel) || - (Module.Type == ModuleType.KernelModeDLL) || - (Module.Type == ModuleType.KernelModeDriver) || - (Module.Type == ModuleType.NativeCUI) || - (Module.Type == ModuleType.NativeDLL) || - (Module.Type == ModuleType.ObjectLibrary) || - (Module.Type == ModuleType.StaticLibrary) || - (Module.Type == ModuleType.RpcClient) || - (Module.Type == ModuleType.RpcServer) || - (Module.Type == ModuleType.RpcProxy) || - (Module.Type == ModuleType.Win32CUI) || - (Module.Type == ModuleType.Win32DLL) || - (Module.Type == ModuleType.Win32GUI) || - (Module.Type == ModuleType.Win32OCX) || - (Module.Type == ModuleType.Win32SCR) || - //(Module.Type == ModuleType.Alias) || - (Module.Type == ModuleType.HostStaticLibrary) || - (Module.Type == ModuleType.BuildTool) || - (Module.Type == ModuleType.Cabinet) || - (Module.Type == ModuleType.KeyboardLayout) || - (Module.Type == ModuleType.Iso) || - (Module.Type == ModuleType.IsoRegTest) || - (Module.Type == ModuleType.LiveIso) || - (Module.Type == ModuleType.LiveIsoRegTest) || - (Module.Type == ModuleType.MessageHeader) || - (Module.Type == ModuleType.Package) || - (Module.Type == ModuleType.ModuleGroup) || - (Module.Type == ModuleType.PlatformProfile)) - { - Module.Folder.Base = SysGenPathResolver.GetPath(this, SysGen.RootTask); - //Module.Base = SysGenPathResolver.GetPath(this, SysGen.ProjectTask); //BasePath; - Module.Path = SysGen.BaseDirectory; - Module.XmlFile = XmlFile; - Module.RBuildFile = RBuildFile; - Module.Enabled = false; - - //HACK: - if (Type == ModuleType.HostStaticLibrary || - Type == ModuleType.BuildTool) - { - Module.Host = true; - } - - // Add the module to the project - Project.Modules.Add(Module); - } - else - { - Console.WriteLine("WARNING: modules of type '{0}' are being omited" , Module.Type); - } - } - - private void AddModuleDefines() - { - switch (Type) - { - case ModuleType.NativeCUI: - { - Module.Defines.Add("__NTAPP__"); - } - break; - case ModuleType.KernelModeDriver: - { - Module.Defines.Add("__NTDRIVER__"); - } - break; - } - - if (Unicode) - { - Module.Defines.Add("UNICODE"); - Module.Defines.Add("_UNICODE"); - } - } - - private void AddModuleLinkerFlags() - { - switch (Type) - { - case ModuleType.Win32DLL: - case ModuleType.Win32OCX: - case ModuleType.Win32CUI: - case ModuleType.Win32GUI: - case ModuleType.Win32SCR: - { - Module.LinkerFlags.Add("-nostartfiles"); - Module.LinkerFlags.Add("-lgcc"); - - if (Module.CPlusPlus) - Module.LinkerFlags.Add("-nostdlib"); - } - break; - case ModuleType.Kernel: - { - break; - } - case ModuleType.KeyboardLayout: - case ModuleType.KernelModeDLL: - case ModuleType.KernelModeDriver: - case ModuleType.NativeCUI: - case ModuleType.NativeDLL: - case ModuleType.Test: - case ModuleType.BootLoader: - case ModuleType.BootProgram: - { - Module.LinkerFlags.Add("-nostartfiles"); - Module.LinkerFlags.Add("-nostdlib"); - } - break; - } - - Module.LinkerFlags.Add("-g"); - } - - private void AddDebugSupportLibraries() - { - switch (Type) - { - case ModuleType.Win32DLL: - case ModuleType.Win32OCX: - case ModuleType.Win32CUI: - case ModuleType.Win32GUI: - case ModuleType.Win32SCR: - case ModuleType.NativeCUI: - case ModuleType.NativeDLL: - { - Module.Libraries.Add(Project.Modules.GetByName("debugsup_ntdll")); - } - break; - case ModuleType.KeyboardLayout: - case ModuleType.KernelModeDLL: - case ModuleType.KernelModeDriver: - { - Module.Libraries.Add(Project.Modules.GetByName("debugsup_ntoskrnl")); - } - break; - } - } - - private void AddModuleCompilerFlags() - { - if (!AllowWarnings) - { - Module.CompilerFlags.Add("-Werror"); - } - - // Always force disabling of sibling calls optimisation for GCC - // (TODO: Move to version-specific once this bug is fixed in GCC) - Module.CompilerFlags.Add("-fno-optimize-sibling-calls"); - Module.CompilerFlags.Add("-g"); - Module.CompilerFlags.Add("-pipe"); - } - - private void AddRequiredBuildTools() - { - switch (Module.Type) - { - case ModuleType.BootLoader: - case ModuleType.BootProgram: - case ModuleType.BootSector: - case ModuleType.EmbeddedTypeLib: - case ModuleType.IdlHeader: - case ModuleType.MessageHeader: - case ModuleType.Kernel: - case ModuleType.KernelModeDLL: - case ModuleType.KernelModeDriver: - case ModuleType.NativeCUI: - case ModuleType.NativeDLL: - case ModuleType.ObjectLibrary: - case ModuleType.StaticLibrary: - case ModuleType.RpcClient: - case ModuleType.RpcServer: - case ModuleType.RpcProxy: - case ModuleType.Win32CUI: - case ModuleType.Win32DLL: - case ModuleType.Win32GUI: - case ModuleType.Win32OCX: - case ModuleType.Win32SCR: - case ModuleType.HostStaticLibrary: - case ModuleType.KeyboardLayout: - Module.Requeriments.Add(Project.Modules.GetByName("wrc")); - Module.Requeriments.Add(Project.Modules.GetByName("wmc")); - Module.Requeriments.Add(Project.Modules.GetByName("widl")); - Module.Requeriments.Add(Project.Modules.GetByName("winebuild")); - Module.Requeriments.Add(Project.Modules.GetByName("winebuild")); - break; - case ModuleType.Cabinet: - Module.Requeriments.Add(Project.Modules.GetByName("cabman")); - break; - case ModuleType.Iso: - Module.Requeriments.Add(Project.Modules.GetByName("cdmake")); - Module.Requeriments.Add(Project.Modules.GetByName("cabman")); - break; - case ModuleType.IsoRegTest: - Module.Requeriments.Add(Project.Modules.GetByName("cdmake")); - Module.Requeriments.Add(Project.Modules.GetByName("cabman")); - Module.Requeriments.Add(Project.Modules.GetByName("sysreg")); - break; - case ModuleType.LiveIso: - Module.Requeriments.Add(Project.Modules.GetByName("cdmake")); - Module.Requeriments.Add(Project.Modules.GetByName("mkhive")); - break; - case ModuleType.LiveIsoRegTest: - Module.Requeriments.Add(Project.Modules.GetByName("cdmake")); - Module.Requeriments.Add(Project.Modules.GetByName("mkhive")); - Module.Requeriments.Add(Project.Modules.GetByName("sysreg")); - break; - } - } - - private void AddDefaultDependencies() - { - if (Module.Type != ModuleType.BuildTool && - Module.Type != ModuleType.HostStaticLibrary && - Module.Host == false) - { - if (Module.Name != "psdk" && - Module.Name != "dxsdk" && - Module.Name != "errcodes" && - Module.Name != "bugcodes" && - Module.Name != "ntstatus") - { - Module.Dependencies.Add(Project.Modules.GetByName("psdk")); - Module.Dependencies.Add(Project.Modules.GetByName("dxsdk")); - Module.Dependencies.Add(Project.Modules.GetByName("errcodes")); - Module.Dependencies.Add(Project.Modules.GetByName("bugcodes")); - Module.Dependencies.Add(Project.Modules.GetByName("ntstatus")); - } - } - } - - //public RBuildFolder Folder - //{ - // get { return null; } - //} - - private void AddModuleLibraryDependencies() - { - // Add mingw and msvcrt implicit libraries only if it's - // a Win32 target. - - if ((Module.Type == ModuleType.Win32CUI) || - (Module.Type == ModuleType.Win32DLL) || - (Module.Type == ModuleType.Win32GUI) || - (Module.Type == ModuleType.Win32OCX) || - (Module.Type == ModuleType.Win32SCR)) - { - if (!Module.IsDefaultEntryPoint) - { - if (Module.NoEntryPoint) - { - if (Module.LinksToCRuntimeLibrary == false) - { - Module.Libraries.Add(0, Project.Modules.GetByName("mingw_common")); - } - } - } - else - { - if (!Module.IsDLL) - { - if (Unicode) - { - Module.Libraries.Add(0, Project.Modules.GetByName("mingw_wmain")); - } - else - { - Module.Libraries.Add(0, Project.Modules.GetByName("mingw_main")); - } - } - - //Is it correct ? - if (Module.Libraries.Count > 0) - { - Module.Libraries.Add(1, Project.Modules.GetByName("mingw_common")); - } - else - { - Module.Libraries.Add(0, Project.Modules.GetByName("mingw_common")); - } - } - } - } - - private void AddCRuntimeLibrary() - { - if ((Module.Type == ModuleType.Win32CUI) || - (Module.Type == ModuleType.Win32DLL) || - (Module.Type == ModuleType.Win32GUI) || - (Module.Type == ModuleType.Win32OCX) || - (Module.Type == ModuleType.Win32SCR)) - { - if (Module.IsDefaultEntryPoint || Module.NoEntryPoint) - { - if (Module.LinksToCRuntimeLibrary == false) - { - if (Module.Name != "msvcrt") - { - // Link msvcrt to get the basic routines - Module.Libraries.Add(Project.Modules.GetByName("msvcrt")); - } - } - } - } - } - - private void AddModuleAssemblyFlags() - { - if (Type == ModuleType.BootSector) - { - Module.AssemblyFlags.Add("-f bin"); - } - } - - private void AddModuleIncludeFolders() - { - if (Module.Type == ModuleType.RpcClient || - Module.Type == ModuleType.RpcServer || - Module.Type == ModuleType.RpcProxy || - Module.Type == ModuleType.EmbeddedTypeLib) - { - Module.IncludeFolders.Add(new RBuildFolder(PathRoot.Intermediate, Module.Folder.FullPath)); //Hace falta? - Module.IncludeFolders.Add(new RBuildFolder(PathRoot.SourceCode, Module.Folder.FullPath)); - } - } - - private void AddModuleProperties() - { - Project.Properties.Add(string.Format("SysGen.Module.{0}.Enabled", Module.Name), Module.Enabled.ToString(), true, true); - Project.Properties.Add(string.Format("SysGen.Module.{0}.BasePath", Module.Name), Module.Base, true, true); - Project.Properties.Add(string.Format("SysGen.Module.{0}.RBuildFile", Module.Name), Module.RBuildFile, true, true); - } - - protected override void PostExecuteTask() - { - if (m_Module.RBuildFile == "mstask.rbuild") - { - int i = 0; - } - - AddModuleLibraryDependencies(); - AddCRuntimeLibrary(); - AddDebugSupportLibraries(); - AddDefaultDependencies(); - AddModuleProperties(); - - if (m_Module.Host) - { - if (m_Module.CPlusPlus) - { - m_Module.CompilerFlags.Add("$(HOST_CPPFLAGS)"); - } - else - { - m_Module.CompilerFlags.Add("$(HOST_CFLAGS)"); - m_Module.CompilerFlags.Add("-Wno-strict-aliasing"); - } - } - else - { - if (m_Module.CPlusPlus) - { - m_Module.CompilerFlags.Add("$(HOST_CPPFLAGS)"); - } - else - { - m_Module.CompilerFlags.Add("-nostdinc"); - } - } - - //Sort source code files only when necessary - if (Module.SourceFiles.ContainsASM) - Module.SourceFiles.Sort(new SourceCodePreferenceComparer()); - } - - protected override void ExecuteTask() - { - Module.Enabled = true; - - //AddModuleLibraryDependencies(); - AddModuleDefines(); - AddModuleLinkerFlags(); - AddModuleCompilerFlags(); - AddModuleIncludeFolders(); - AddModuleAssemblyFlags(); - AddRequiredBuildTools(); - - //if (Type == ModuleType.Alias) - //{ - // if (Module.Name == "halupalias") - // { - // int i = 10; - // } - - // RBuildModule alisedModule = Project.Modules.GetByName(AliasOf); - - // if (alisedModule == null) - // throw new BuildException("module '" + ModuleName + "' trying to alias non-existant module '" + AliasOf + "'", Location); - - // if (Module.Name == AliasOf) - // throw new BuildException("Module '" + ModuleName + "' cannot link against itself", Location); - - // alisedModule = Module; - // alisedModule.Enabled = true; - - // Module.Enabled = false; - //} - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/BuildTool.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/BuildTool.cs deleted file mode 100644 index 67d0755580d..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/BuildTool.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.IO; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("buildtool")] - public class BuildTool : ModuleTask - { - public BuildTool() - { - Type = ModuleType.BuildTool; - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/Cabinet.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/Cabinet.cs deleted file mode 100644 index 715fbcc4952..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/Cabinet.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.IO; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("cabinet")] - public class Cabinet : ModuleTask - { - public Cabinet() - { - Type = ModuleType.Cabinet; - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/Kernel.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/Kernel.cs deleted file mode 100644 index 7cafd130411..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/Kernel.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.IO; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("kernel")] - public class Kernel : ModuleTask - { - public Kernel() - { - Type = ModuleType.Kernel; - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/KernelModeDLL.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/KernelModeDLL.cs deleted file mode 100644 index 22d238b739e..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/KernelModeDLL.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.IO; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("kernelmodell")] - public class KernelModeDLL : ModuleTask - { - public KernelModeDLL() - { - Type = ModuleType.KernelModeDLL; - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/KernelModeDriver.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/KernelModeDriver.cs deleted file mode 100644 index b223cf5897b..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/KernelModeDriver.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.IO; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("kernelmodedriver")] - public class KernelModeDriver : ModuleTask - { - public KernelModeDriver() - { - Type = ModuleType.KernelModeDriver; - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/NativeCUI.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/NativeCUI.cs deleted file mode 100644 index ac9e84a3d82..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/NativeCUI.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.IO; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("nativecui")] - public class NativeCUI : ModuleTask - { - public NativeCUI() - { - Type = ModuleType.NativeCUI; - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/NativeDLL.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/NativeDLL.cs deleted file mode 100644 index bdaabee1bfc..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/NativeDLL.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.IO; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("nativedll")] - public class NativeDLL : ModuleTask - { - public NativeDLL() - { - Type = ModuleType.NativeDLL; - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/ObjectLibrary.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/ObjectLibrary.cs deleted file mode 100644 index a34279d68a7..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/ObjectLibrary.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.IO; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("objectlibrary")] - public class ObjectLibrary : ModuleTask - { - public ObjectLibrary() - { - Type = ModuleType.ObjectLibrary; - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/Package.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/Package.cs deleted file mode 100644 index 68bdbcb0212..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/Package.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.IO; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("package")] - public class Package : ModuleTask - { - public Package() - { - Type = ModuleType.Package; - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/StaticLibrary.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/StaticLibrary.cs deleted file mode 100644 index 0abe2820982..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/StaticLibrary.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.IO; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("staticlibrary")] - public class StaticLibrary : ModuleTask - { - public StaticLibrary() - { - Type = ModuleType.StaticLibrary; - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/Win32CUI.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/Win32CUI.cs deleted file mode 100644 index 5fba4c1bc44..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/Win32CUI.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.IO; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("win32cui")] - public class Win32CUI : ModuleTask - { - public Win32CUI() - { - Type = ModuleType.Win32CUI; - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/Win32Dll.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/Win32Dll.cs deleted file mode 100644 index 320e1a00ebe..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/Win32Dll.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.IO; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("win32dll")] - public class Win32DLL : ModuleTask - { - public Win32DLL() - { - Type = ModuleType.Win32DLL; - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/Win32GUI.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/Win32GUI.cs deleted file mode 100644 index 9bffa1ba55e..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/Win32GUI.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.IO; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("win32gui")] - public class Win32GUI : ModuleTask - { - public Win32GUI() - { - Type = ModuleType.Win32GUI; - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/Win32OCX.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/Win32OCX.cs deleted file mode 100644 index 2b8051591fa..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/Win32OCX.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.IO; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("win32ocx")] - public class Win32OCX : ModuleTask - { - public Win32OCX() - { - Type = ModuleType.Win32OCX; - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/Win32SCR.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/Win32SCR.cs deleted file mode 100644 index 5199e32fab6..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Modules/Win32SCR.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.IO; - -using SysGen.RBuild.Framework; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("win32scr")] - public class Win32SCR : ModuleTask - { - public Win32SCR() - { - Type = ModuleType.Win32SCR; - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/OverrideModuleTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/OverrideModuleTask.cs deleted file mode 100644 index 612d4e6dc02..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/OverrideModuleTask.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Xml; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("overridemodule")] - public class OverrideModuleTask : ModuleTask - { - public OverrideModuleTask() - { - m_FailOnMissingRequired = false; - } - - protected override void OnLoad() - { - //Evitamos actualizar la información del módulo de verdad - } - - protected override void PostExecuteTask() - { - //Evitamos actualizar la información del módulo de verdad - } - - protected override void PreExecuteTask() - { - //Evitamos actualizar la información del módulo de verdad - } - - protected override void ExecuteTask() - { - //Evitamos actualizar la información del módulo de verdad - } - - protected override void InitializeTask(XmlNode taskNode) - { - base.InitializeTask(taskNode); - - if (taskNode.Attributes["name"] == null) - throw new BuildException("Missing 'name' attribute"); - - string moduleName = taskNode.Attributes["name"].Value; - - m_Module = Project.Modules.GetByName(moduleName); - - if (m_Module == null) - throw new BuildException("Overrided module '{0}' not found" , moduleName); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/PCHTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/PCHTask.cs deleted file mode 100644 index c7700d7018f..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/PCHTask.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - /// - /// PreCompiled Header task - /// - [TaskName("pch")] - public class PCHTask : FileTask - { - /// - /// Creates a new instance of the class. - /// - public PCHTask() - { - } - - protected override void CreateFileSystemObject() - { - m_FileSystemInfo = new RBuildSourceFile(); - } - - public RBuildSourceFile SourceFile - { - get { return m_FileSystemInfo as RBuildSourceFile; } - } - - protected override void ExecuteTask() - { - if (Module.PreCompiledHeader != null) - throw new BuildException("Only one is allowed per module", Location); - - //Call the base class - base.ExecuteTask(); - - //Add the folder where the PCH is present as a include folder - Module.IncludeFolders.Add(new RBuildFolder(PathRoot.Intermediate, Base)); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformAutorunTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformAutorunTask.cs deleted file mode 100644 index a298818f62c..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformAutorunTask.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("platformautorun")] - public class PlatformAutorunTask : ValueBaseTask - { - protected override void ExecuteTask() - { - RBuildModule module = Project.Platform.Modules.GetByName(Value); - - if (module == null) - throw new BuildException("Unknown module '{0}' referenced by ", Value); - - Project.Platform.AutorunModules.Add(module); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformDebugChannelTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformDebugChannelTask.cs deleted file mode 100644 index 3a6bd35f029..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformDebugChannelTask.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("platformdebugchannel")] - public class PlatformDebugChannelTask : ValueBaseTask - { - //private RBuildDebugChannel m_DebugChannel = null; - - //[TaskAttribute("name")] - //public string ChannelName - //{ - // get { return m_DebugChannel.Name; } - // set { m_DebugChannel.Name = value; } - //} - - //[TaskAttribute("warning")] - //public bool Warning - //{ - // get { return m_DebugChannel.Warn; } - // set { m_DebugChannel.Warn = value; } - //} - - //[TaskAttribute("trace")] - //public bool Trace - //{ - // get { return m_DebugChannel.Trace; } - // set { m_DebugChannel.Trace = value; } - //} - - //[TaskAttribute("fixme")] - //public bool Fixme - //{ - // get { return m_DebugChannel.Fixme; } - // set { m_DebugChannel.Fixme = value; } - //} - - //[TaskAttribute("error")] - //public bool Error - //{ - // get { return m_DebugChannel.Error; } - // set { m_DebugChannel.Error = value; } - //} - - //protected override void PreExecuteTask() - //{ - // m_DebugChannel = Project.DebugChannels.GetByName(ChannelName); - //} - - protected override void ExecuteTask() - { - RBuildDebugChannel channel = Project.DebugChannels.GetByName(Value); - - if (channel == null) - throw new BuildException("Unknown debug channel '{0}' referenced by ", Value); - - if (Project.Platform.DebugChannels.Contains(channel)) - throw new BuildException("Only one debug channel '{0}' can be present per ", Value); - - Project.Platform.DebugChannels.Add(channel); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformDescriptionTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformDescriptionTask.cs deleted file mode 100644 index ee5d8f1cdfc..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformDescriptionTask.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("platformdescription")] - public class PlatformDescriptionTask : ValueBaseTask - { - protected override void ExecuteTask() - { - Project.Platform.Description = Value; - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformLanguageTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformLanguageTask.cs deleted file mode 100644 index 8362e09be64..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformLanguageTask.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("platformlanguage")] - public class PlatformLanguageTask : ValueBaseTask - { - public PlatformLanguageTask() - { - } - - protected override void ExecuteTask() - { - RBuildLanguage language = Project.Languages.GetByName(Value); - - if (language == null) - throw new BuildException("Unknown language '{0}' referenced by ", Value); - - Project.Platform.Languages.Add(language); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformModuleTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformModuleTask.cs deleted file mode 100644 index 3bb3190f0bb..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformModuleTask.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("platformmodule")] - public class PlatformModuleTask : ValueBaseTask - { - public PlatformModuleTask() - { - } - - protected override void ExecuteTask() - { - RBuildModule module = Project.Modules.GetByName(Value); - - if (module == null) - throw new BuildException("Unknown module '{0}' referenced by ", Value); - - Project.Platform.Modules.Add(module); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformNameTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformNameTask.cs deleted file mode 100644 index 88890e81e88..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformNameTask.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("platformname")] - public class PlatformNameTask : ValueBaseTask - { - protected override void ExecuteTask() - { - Project.Platform.Name = Value; - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformScreenSaverTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformScreenSaverTask.cs deleted file mode 100644 index e396774a3e7..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformScreenSaverTask.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("platformscreensaver")] - public class PlatformScreenSaverTask : ValueBaseTask - { - protected override void ExecuteTask() - { - RBuildModule module = Project.Modules.GetByName(Value); - - if (module == null) - throw new BuildException("Unknown module '{0}' referenced by ", Value); - - if (module.Type != ModuleType.Win32SCR) - throw new BuildException("Shell can only be of type win32scr"); - - if (Project.Platform.Screensaver != null) - throw new BuildException("Only one screensaver can be set per platform"); - - /* set the shell to use */ - Project.Platform.Screensaver = module; - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformShellTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformShellTask.cs deleted file mode 100644 index b97c9f5b469..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformShellTask.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("platformshell")] - public class PlatformShellTask : ValueBaseTask - { - protected override void ExecuteTask() - { - RBuildModule module = Project.Modules.GetByName(Value); - - if (module == null) - throw new BuildException("Unknown module '{0}' referenced by ", Value); - - if (module.Type != ModuleType.Win32CUI && - module.Type != ModuleType.Win32GUI) - throw new BuildException("Shell can only be of type win32gui"); - - if (Project.Platform.Shell != null) - throw new BuildException("Only one shell can be set per platform"); - - /* set the shell to use */ - Project.Platform.Shell = module; - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformWallpaperTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformWallpaperTask.cs deleted file mode 100644 index fc7776062aa..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/Platform/PlatformWallpaperTask.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("platformwallpaper")] - public class PlatformWallpaperTask : ValueBaseTask - { - protected override void PostExecuteTask() - { - if (Project.Platform.Wallpaper != null) - throw new BuildException("Only one wallpaper can be set per platform"); - - foreach (RBuildModule module in Project.Modules) - { - foreach (RBuildFile file in module.Files) - { - RBuildWallpaperFile wallpaper = file as RBuildWallpaperFile; - - if (wallpaper != null) - { - if (wallpaper.ID.ToLower() == Value.ToLower()) - { - /* set the shell to use */ - Project.Platform.Wallpaper = wallpaper; - } - } - } - } - - if (Project.Platform.Wallpaper == null) - throw new BuildException("Unknown wallpaper '{0}' referenced by ", Value); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/ProjectTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/ProjectTask.cs deleted file mode 100644 index bb09d9342a1..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/ProjectTask.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System; -using System.Xml; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("project")] - public class ProjectTask : TaskContainer, ISysGenObject - { - RBuildProject _project = new RBuildProject(); - - public ProjectTask() - { - } - - [TaskAttribute("name", Required = true)] - public string Name - { - get { return _project.Name; } - set { _project.Name = value; } - } - - [TaskAttribute("makefile", Required = true)] - public string MakeFile - { - get { return _project.MakeFile; } - set { _project.MakeFile = value; } - } - - public RBuildProject Project - { - get { return _project; } - } - - public RBuildElement RBuildElement - { - get { return _project; } - } - - protected override void OnInit() - { - SysGen.Project = Project; - SysGen.RootTask = this; - Project.RBuildFile = RBuildFile; - - - Project.Properties.Add("ARCH", "i386");/* - Project.Defines.Add("_M_IX86"); - Project.Defines.Add("_X86_"); - Project.Defines.Add("__i386__");*/ - } - - protected override void OnLoad() - { - base.OnLoad(); - - Project.Folder = new RBuildFolder(PathRoot.SourceCode , ""); - } - - protected override void PreExecuteTask() - { - ///Project.Base = string.Empty; - Project.Path = SysGen.BaseDirectory; - Project.XmlFile = XmlFile; - } - } -} - diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/PropertyTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/PropertyTask.cs deleted file mode 100644 index 1b143c0dd16..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/PropertyTask.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Xml; - -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - /// Sets a property in the current project. - /// - /// NAnt uses a number of predefined properties. - /// - /// - /// Define a debug property with the value true. - /// ]]> - /// Use the user-defined debug property. - /// ]]> - /// Define a Read-Only property.This is just like passing in the param on the command line. - /// ]]> - /// - [TaskName("property")] - public class PropertyTask : PropertyBaseTask - { - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/RBuildTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/RBuildTask.cs deleted file mode 100644 index 12feafedce4..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/RBuildTask.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using SysGen.BuildEngine.Attributes; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("rbuild")] - public class RBuildTask : TaskContainer - { - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/ReDefineTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/ReDefineTask.cs deleted file mode 100644 index f41f0aae4ce..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/ReDefineTask.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("redefine")] - public class ReDefineTask : Task - { - protected override void ExecuteTask() - { -// RBuildElement.Defines.Add(new RBuildDefine(DefineName, DefineValue)); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/RequiresTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/RequiresTask.cs deleted file mode 100644 index f68ffe5f00d..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/RequiresTask.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using SysGen.BuildEngine.Attributes; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("requires")] - public class RequiresTask : ValueBaseTask - { - /// - /// The define value. - /// - [TaskValue(Required = true)] - public virtual string Value { get { return _value; } set { _value = value; } } - - protected override void ExecuteTask() - { - RBuildModule requeriment = Project.Modules.GetByName(Value); - - if (requeriment == null) - throw new BuildException("Unknown requeriment '{0}' referenced by module '{1}'", Value, Module.Name); - - Module.Requeriments.Add(requeriment); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/SetupTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/SetupTask.cs deleted file mode 100644 index 83d2056b8f4..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/SetupTask.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("setup")] - public class SetupTask : PlatformFileBaseTask - { - [TaskAttribute("installsection", Required = true)] - public string InstallSection { get { return Setup.InstallSection; } set { Setup.InstallSection = value; } } - - [TaskAttribute("type")] - public SetupType SetupType { get { return Setup.SetupType; } set { Setup.SetupType = value; } } - - protected override void CreateFileSystemObject() - { - m_FileSystemInfo = new RBuildSetupFile(); - } - - /// - /// Get the underlying . - /// - public RBuildSetupFile Setup - { - get { return m_FileSystemInfo as RBuildSetupFile; } - } - - protected override void ExecuteTask() - { - base.ExecuteTask(); - - if (Module.IsInstallable || Module.Type == ModuleType.Package) - { - if (Module.Setup != null) - throw new BuildException("There can be only one element for a module", Location); - - Module.Setup = Setup; - } - else - throw new BuildException(" is not applicable for this module type", Location); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/TargetTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/TargetTask.cs deleted file mode 100644 index 15b1c70d212..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/TargetTask.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using SysGen.BuildEngine.Attributes; - -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("target")] - public class TargetTask : Task - { - protected RBuildTarget m_Target = new RBuildTarget(); - - protected override void ExecuteTask() - { - SysGen.Targets.Add(m_Target); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/WallPaperTask.cs b/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/WallPaperTask.cs deleted file mode 100644 index 31ea0d9930d..00000000000 --- a/reactos/tools/sysgen/SysGen.BuildEngine/Tasks/RBuild/WallPaperTask.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; - -using SysGen.BuildEngine.Attributes; -using SysGen.RBuild.Framework; - -namespace SysGen.BuildEngine.Tasks -{ - [TaskName("wallpaper")] - public class WallPaperTask : PlatformFileBaseTask - { - protected override void CreateFileSystemObject() - { - m_FileSystemInfo = new RBuildWallpaperFile(); - } - - protected override void ExecuteTask() - { - if (Module != null) - { - base.ExecuteTask(); - } - else - throw new BuildException(" is only applicable for modules", Location); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.Make/Program.cs b/reactos/tools/sysgen/SysGen.Make/Program.cs deleted file mode 100644 index de3ba818cd9..00000000000 --- a/reactos/tools/sysgen/SysGen.Make/Program.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using SysGen.BuildEngine; -using SysGen.BuildEngine.Framework; - -namespace SysGen.Make -{ - class Program - { - static void Main(string[] args) - { - SysGenEngine engine = new SysGenEngine(@"C:\ros\trunk\reactos\ReactOS-i386.rbuild"); - - engine.ReadBuildFiles(); - - /* - Console.WriteLine("Generates project files for buildsystems\n\n"); - Console.WriteLine(" rbuild [switches] -r{rootfile.rbuild} buildsystem\n\n"); - Console.WriteLine("Switches:\n"); - Console.WriteLine(" -v Be verbose.\n"); - Console.WriteLine(" -c Clean as you go. Delete generated files as soon as they are not\n"); - Console.WriteLine(" needed anymore.\n"); - Console.WriteLine(" -dd Disable automatic dependencies.\n"); - Console.WriteLine(" -dm{module} Check only automatic dependencies for this module.\n"); - Console.WriteLine(" -ud Disable multiple source files per compilation unit.\n"); - Console.WriteLine(" -mi Let make handle creation of install directories. Rbuild will\n"); - Console.WriteLine(" not generate the directories.\n"); - Console.WriteLine(" -ps Generate proxy makefiles in source tree instead of the output.\n"); - Console.WriteLine(" tree.\n"); - Console.WriteLine(" -vs{version} Version of MS VS project files. Default is %s.\n", MS_VS_DEF_VERSION); - Console.WriteLine(" -vo{version|configuration} Adds subdirectory path to the default Intermediate-Outputdirectory.\n"); - Console.WriteLine(" -Dvar=val Set the value of 'var' variable to 'val'.\n"); - Console.WriteLine("\n"); - Console.WriteLine(" buildsystem Target build system. Can be one of:\n"); - */ - - Console.ReadLine(); - } - } -} diff --git a/reactos/tools/sysgen/SysGen.Make/Properties/AssemblyInfo.cs b/reactos/tools/sysgen/SysGen.Make/Properties/AssemblyInfo.cs deleted file mode 100644 index 9012ef9b0c1..00000000000 --- a/reactos/tools/sysgen/SysGen.Make/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("SysGen.Make")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Sand")] -[assembly: AssemblyProduct("SysGen.Make")] -[assembly: AssemblyCopyright("Copyright © Sand 2008")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("00432ce1-5d82-4afb-9a3a-dc2ce95edc4e")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/reactos/tools/sysgen/SysGen.Make/SysGen.Make.csproj b/reactos/tools/sysgen/SysGen.Make/SysGen.Make.csproj deleted file mode 100644 index 89de06851a4..00000000000 --- a/reactos/tools/sysgen/SysGen.Make/SysGen.Make.csproj +++ /dev/null @@ -1,58 +0,0 @@ - - - Debug - AnyCPU - 8.0.50727 - 2.0 - {8B1229C7-6188-4621-A648-843CB9B5C72E} - Exe - Properties - SysGen.Make - SysGen.Make - - - 2.0 - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - {8F5F8375-4097-4952-B860-784EB9961ABE} - SysGen.Framework - - - - - \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.Make/SysGen.Make.csproj.user b/reactos/tools/sysgen/SysGen.Make/SysGen.Make.csproj.user deleted file mode 100644 index 1a4ff357ca6..00000000000 --- a/reactos/tools/sysgen/SysGen.Make/SysGen.Make.csproj.user +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.Make/SysGen.Make.sln b/reactos/tools/sysgen/SysGen.Make/SysGen.Make.sln deleted file mode 100644 index d9d1e258355..00000000000 --- a/reactos/tools/sysgen/SysGen.Make/SysGen.Make.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SysGen.Make", "SysGen.Make\SysGen.Make.csproj", "{8B1229C7-6188-4621-A648-843CB9B5C72E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8B1229C7-6188-4621-A648-843CB9B5C72E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8B1229C7-6188-4621-A648-843CB9B5C72E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8B1229C7-6188-4621-A648-843CB9B5C72E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8B1229C7-6188-4621-A648-843CB9B5C72E}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/reactos/tools/sysgen/SysGen.Make/SysGen.Make.suo b/reactos/tools/sysgen/SysGen.Make/SysGen.Make.suo deleted file mode 100644 index b55bbbea00f..00000000000 Binary files a/reactos/tools/sysgen/SysGen.Make/SysGen.Make.suo and /dev/null differ diff --git a/reactos/tools/sysgen/SysGen.Make/SysGen.Make/Program.cs b/reactos/tools/sysgen/SysGen.Make/SysGen.Make/Program.cs deleted file mode 100644 index 30ccf9bb40f..00000000000 --- a/reactos/tools/sysgen/SysGen.Make/SysGen.Make/Program.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.Make -{ - class Program - { - static void Main(string[] args) - { - } - } -} diff --git a/reactos/tools/sysgen/SysGen.Make/SysGen.Make/Properties/AssemblyInfo.cs b/reactos/tools/sysgen/SysGen.Make/SysGen.Make/Properties/AssemblyInfo.cs deleted file mode 100644 index 9012ef9b0c1..00000000000 --- a/reactos/tools/sysgen/SysGen.Make/SysGen.Make/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("SysGen.Make")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Sand")] -[assembly: AssemblyProduct("SysGen.Make")] -[assembly: AssemblyCopyright("Copyright © Sand 2008")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("00432ce1-5d82-4afb-9a3a-dc2ce95edc4e")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/reactos/tools/sysgen/SysGen.Make/SysGen.Make/SysGen.Make.csproj b/reactos/tools/sysgen/SysGen.Make/SysGen.Make/SysGen.Make.csproj deleted file mode 100644 index 7e429ac88d9..00000000000 --- a/reactos/tools/sysgen/SysGen.Make/SysGen.Make/SysGen.Make.csproj +++ /dev/null @@ -1,47 +0,0 @@ - - - Debug - AnyCPU - 8.0.50727 - 2.0 - {8B1229C7-6188-4621-A648-843CB9B5C72E} - Exe - Properties - SysGen.Make - SysGen.Make - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.RBuild.IRCBot/Collections/CommandCollection.cs b/reactos/tools/sysgen/SysGen.RBuild.IRCBot/Collections/CommandCollection.cs deleted file mode 100644 index 28740e67d2e..00000000000 --- a/reactos/tools/sysgen/SysGen.RBuild.IRCBot/Collections/CommandCollection.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.IRCBot -{ - class CommandCollection : List - { - } -} diff --git a/reactos/tools/sysgen/SysGen.RBuild.IRCBot/Commands/Base/Command.cs b/reactos/tools/sysgen/SysGen.RBuild.IRCBot/Commands/Base/Command.cs deleted file mode 100644 index 5d1bc8380d4..00000000000 --- a/reactos/tools/sysgen/SysGen.RBuild.IRCBot/Commands/Base/Command.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.IRCBot -{ - public abstract class Command - { - //public abstract bool CanProcessCommand (string commandName); - public abstract string Name { get; } - - protected void Say(string message) - { - } - } -} diff --git a/reactos/tools/sysgen/SysGen.RBuild.IRCBot/Commands/WhoIsCommand.cs b/reactos/tools/sysgen/SysGen.RBuild.IRCBot/Commands/WhoIsCommand.cs deleted file mode 100644 index 7389508409b..00000000000 --- a/reactos/tools/sysgen/SysGen.RBuild.IRCBot/Commands/WhoIsCommand.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace SysGen.RBuild.IRCBot -{ - public class WhoIsCommand : Command - { - public override string Name { get { return "whois"; } } - } -} diff --git a/reactos/tools/sysgen/SysGen.RBuild.IRCBot/Properties/AssemblyInfo.cs b/reactos/tools/sysgen/SysGen.RBuild.IRCBot/Properties/AssemblyInfo.cs deleted file mode 100644 index b41f434ce58..00000000000 --- a/reactos/tools/sysgen/SysGen.RBuild.IRCBot/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("SysGen.RBuild.IRCBot")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Sand")] -[assembly: AssemblyProduct("SysGen.RBuild.IRCBot")] -[assembly: AssemblyCopyright("Copyright © Sand 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("bb394e0e-2885-49d5-b388-80be41207d29")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/reactos/tools/sysgen/SysGen.RBuild.IRCBot/SysGen.RBuild.IRCBot.csproj b/reactos/tools/sysgen/SysGen.RBuild.IRCBot/SysGen.RBuild.IRCBot.csproj deleted file mode 100644 index a00f422c215..00000000000 --- a/reactos/tools/sysgen/SysGen.RBuild.IRCBot/SysGen.RBuild.IRCBot.csproj +++ /dev/null @@ -1,64 +0,0 @@ - - - Debug - AnyCPU - 8.0.50727 - 2.0 - {0629E569-D4A3-46F5-9367-F1EB14B02500} - Exe - Properties - SysGen.RBuild.IRCBot - SysGen.RBuild.IRCBot - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\Documents and Settings\Joan Marc\Desktop\SmartIrc4net-0.4.0.src\SmartIrc4net-0.4.0-src\bin\debug\Meebey.SmartIrc4net.dll - - - - - - - - - - - - - - - {8F5F8375-4097-4952-B860-784EB9961ABE} - SysGen.Framework - - - {88D9BED7-30C5-4683-A6C6-6F2EB55B8F26} - SysGen.RBuild.Framework - - - - - \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.RBuild.IRCBot/cIRC.cs b/reactos/tools/sysgen/SysGen.RBuild.IRCBot/cIRC.cs deleted file mode 100644 index 41239b32aa9..00000000000 --- a/reactos/tools/sysgen/SysGen.RBuild.IRCBot/cIRC.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Net; - -using Meebey.SmartIrc4net; - -namespace SysGen.RBuild.IRCBot -{ - class ClientDemo - { - private CommandCollection m_Commands = new CommandCollection(); - private IrcClient m_IrcClient = new IrcClient(); - private string m_Server = "chat.freenode.net"; - private int m_Port = 7000; - - private static void Main() - { - ClientDemo demo = new ClientDemo(); - } - - public ClientDemo() - { - m_Commands.Add(new WhoIsCommand()); - - m_IrcClient.OnConnected += new EventHandler(OnConnected); - m_IrcClient.OnJoin += new JoinEventHandler(irc_OnJoin); - m_IrcClient.OnChannelMessage += new IrcEventHandler(OnChannelMessage); - m_IrcClient.OnError += new ErrorEventHandler(irc_OnError); - m_IrcClient.OnRawMessage += new IrcEventHandler(irc_OnRawMessage); - - try - { - m_IrcClient.Connect(m_Server, m_Port); - } - catch (Exception e) - { - Console.Write("Failed to connect: {0}", e.Message); - Console.ReadKey(); - } - } - - private void irc_OnRawMessage(object sender, IrcEventArgs e) - { - Console.WriteLine("Received: " + e.Data.RawMessage); - } - - private void irc_OnError(object sender, ErrorEventArgs e) - { - Console.WriteLine("Error: " + e.ErrorMessage); - } - - private void OnChannelMessage(object sender, IrcEventArgs e) - { - Console.WriteLine(e.Data.Type + ":"); - Console.WriteLine("(" + e.Data.Channel + ") <" + e.Data.Nick + "> " + e.Data.Message); - - m_IrcClient.SendMessage(SendType.Message, e.Data.Nick, "test"); - } - - private void irc_OnJoin(object sender, JoinEventArgs e) - { - } - - private void OnConnected(object sender, EventArgs e) - { - m_IrcClient.Login("RBuildBot", "RBuild Info BOT"); - m_IrcClient.RfcJoin("#testchannel"); - m_IrcClient.Listen(); - } - } -} \ No newline at end of file diff --git a/reactos/tools/sysgen/SysGen.sln b/reactos/tools/sysgen/SysGen.sln deleted file mode 100644 index fdc7d1dbe82..00000000000 --- a/reactos/tools/sysgen/SysGen.sln +++ /dev/null @@ -1,66 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TriStateTreeView", "TriStateTreeView\TriStateTreeView.csproj", "{99CEE41D-B76D-4102-B0AD-C81069509D17}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SysGen.Designer", "RosBuilder\SysGen.Designer.csproj", "{78A0F196-A5BD-469A-B901-B269671AFB0A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SysGen.RBuild.Framework", "RosFramework\SysGen.RBuild.Framework.csproj", "{88D9BED7-30C5-4683-A6C6-6F2EB55B8F26}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SysGen.Framework", "SysGen.BuildEngine\SysGen.Framework.csproj", "{8F5F8375-4097-4952-B860-784EB9961ABE}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SysGen.Make", "SysGen.Make\SysGen.Make.csproj", "{8B1229C7-6188-4621-A648-843CB9B5C72E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug Main NAnt BuildFile|Any CPU = Debug Main NAnt BuildFile|Any CPU - Debug NAnt Tests|Any CPU = Debug NAnt Tests|Any CPU - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {99CEE41D-B76D-4102-B0AD-C81069509D17}.Debug Main NAnt BuildFile|Any CPU.ActiveCfg = Debug|Any CPU - {99CEE41D-B76D-4102-B0AD-C81069509D17}.Debug Main NAnt BuildFile|Any CPU.Build.0 = Debug|Any CPU - {99CEE41D-B76D-4102-B0AD-C81069509D17}.Debug NAnt Tests|Any CPU.ActiveCfg = Debug|Any CPU - {99CEE41D-B76D-4102-B0AD-C81069509D17}.Debug NAnt Tests|Any CPU.Build.0 = Debug|Any CPU - {99CEE41D-B76D-4102-B0AD-C81069509D17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {99CEE41D-B76D-4102-B0AD-C81069509D17}.Debug|Any CPU.Build.0 = Debug|Any CPU - {99CEE41D-B76D-4102-B0AD-C81069509D17}.Release|Any CPU.ActiveCfg = Release|Any CPU - {99CEE41D-B76D-4102-B0AD-C81069509D17}.Release|Any CPU.Build.0 = Release|Any CPU - {78A0F196-A5BD-469A-B901-B269671AFB0A}.Debug Main NAnt BuildFile|Any CPU.ActiveCfg = Debug|Any CPU - {78A0F196-A5BD-469A-B901-B269671AFB0A}.Debug Main NAnt BuildFile|Any CPU.Build.0 = Debug|Any CPU - {78A0F196-A5BD-469A-B901-B269671AFB0A}.Debug NAnt Tests|Any CPU.ActiveCfg = Debug|Any CPU - {78A0F196-A5BD-469A-B901-B269671AFB0A}.Debug NAnt Tests|Any CPU.Build.0 = Debug|Any CPU - {78A0F196-A5BD-469A-B901-B269671AFB0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {78A0F196-A5BD-469A-B901-B269671AFB0A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {78A0F196-A5BD-469A-B901-B269671AFB0A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {78A0F196-A5BD-469A-B901-B269671AFB0A}.Release|Any CPU.Build.0 = Release|Any CPU - {88D9BED7-30C5-4683-A6C6-6F2EB55B8F26}.Debug Main NAnt BuildFile|Any CPU.ActiveCfg = Debug|Any CPU - {88D9BED7-30C5-4683-A6C6-6F2EB55B8F26}.Debug Main NAnt BuildFile|Any CPU.Build.0 = Debug|Any CPU - {88D9BED7-30C5-4683-A6C6-6F2EB55B8F26}.Debug NAnt Tests|Any CPU.ActiveCfg = Debug|Any CPU - {88D9BED7-30C5-4683-A6C6-6F2EB55B8F26}.Debug NAnt Tests|Any CPU.Build.0 = Debug|Any CPU - {88D9BED7-30C5-4683-A6C6-6F2EB55B8F26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {88D9BED7-30C5-4683-A6C6-6F2EB55B8F26}.Debug|Any CPU.Build.0 = Debug|Any CPU - {88D9BED7-30C5-4683-A6C6-6F2EB55B8F26}.Release|Any CPU.ActiveCfg = Release|Any CPU - {88D9BED7-30C5-4683-A6C6-6F2EB55B8F26}.Release|Any CPU.Build.0 = Release|Any CPU - {8F5F8375-4097-4952-B860-784EB9961ABE}.Debug Main NAnt BuildFile|Any CPU.ActiveCfg = Debug Main NAnt BuildFile|Any CPU - {8F5F8375-4097-4952-B860-784EB9961ABE}.Debug Main NAnt BuildFile|Any CPU.Build.0 = Debug Main NAnt BuildFile|Any CPU - {8F5F8375-4097-4952-B860-784EB9961ABE}.Debug NAnt Tests|Any CPU.ActiveCfg = Debug Main NAnt BuildFile|Any CPU - {8F5F8375-4097-4952-B860-784EB9961ABE}.Debug NAnt Tests|Any CPU.Build.0 = Debug Main NAnt BuildFile|Any CPU - {8F5F8375-4097-4952-B860-784EB9961ABE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8F5F8375-4097-4952-B860-784EB9961ABE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8F5F8375-4097-4952-B860-784EB9961ABE}.Release|Any CPU.ActiveCfg = Debug Main NAnt BuildFile|Any CPU - {8F5F8375-4097-4952-B860-784EB9961ABE}.Release|Any CPU.Build.0 = Debug Main NAnt BuildFile|Any CPU - {8B1229C7-6188-4621-A648-843CB9B5C72E}.Debug Main NAnt BuildFile|Any CPU.ActiveCfg = Debug|Any CPU - {8B1229C7-6188-4621-A648-843CB9B5C72E}.Debug Main NAnt BuildFile|Any CPU.Build.0 = Debug|Any CPU - {8B1229C7-6188-4621-A648-843CB9B5C72E}.Debug NAnt Tests|Any CPU.ActiveCfg = Debug|Any CPU - {8B1229C7-6188-4621-A648-843CB9B5C72E}.Debug NAnt Tests|Any CPU.Build.0 = Debug|Any CPU - {8B1229C7-6188-4621-A648-843CB9B5C72E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8B1229C7-6188-4621-A648-843CB9B5C72E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8B1229C7-6188-4621-A648-843CB9B5C72E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8B1229C7-6188-4621-A648-843CB9B5C72E}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/reactos/tools/sysgen/TriStateTreeView/AssemblyInfo.cs b/reactos/tools/sysgen/TriStateTreeView/AssemblyInfo.cs deleted file mode 100644 index 192fff970c0..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/AssemblyInfo.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// -[assembly: AssemblyTitle("TriStateTreeView control")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.*")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] diff --git a/reactos/tools/sysgen/TriStateTreeView/LICENSING.txt b/reactos/tools/sysgen/TriStateTreeView/LICENSING.txt deleted file mode 100644 index ae57c7eda0a..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/LICENSING.txt +++ /dev/null @@ -1,41 +0,0 @@ - Copyright 1999-2004, SIL International - All rights reserved. - - This library is free software; you can redistribute it and/or modify - it under the terms of either: - - a) the Common Public License as published by the "Agreement - Steward" for that license (currently IBM); either version 0.5 - of the License, or (at your option) any later version, - - or - - b) the GNU Lesser General Public License as published by the - Free Software Foundation; either version 2.1 of 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 either - the Common Public License or the GNU Lesser General Public License - for more details. - - You should have received a plain text copy of the Common Public License - Version 0.5 with this distribution in the file named "License_CPLv05.txt". - That text came from http://www.opensource.org/licenses/cpl.html. The - initial "Agreement Steward" for the CPL displays currently the license at - http://www-124.ibm.com/developerworks/oss/license-cpl.html. - - You should also have received a copy of the GNU Lesser General Public - License along with this library in the file named "License_LGPLv21.txt". - If not, write to the Free Software Foundation, Inc., 59 Temple Place, - Suite 330, Boston, MA 02111-1307, USA or visit their web page on the - internet at http://www.fsf.org/licenses/lgpl.html. - - The GNU General Public License to which the GNU Lesser General Public - License refers can be found at http://www.gnu.org/copyleft/gpl.html. - For convenient reference, a text version has been included with this - distribution in the file named "License_GPLv2.txt". All of the licenses - mentioned above can also be found at http://www.opensource.org/licenses/. - --------------------------------------------------------------------------- diff --git a/reactos/tools/sysgen/TriStateTreeView/License_CPLv05.txt b/reactos/tools/sysgen/TriStateTreeView/License_CPLv05.txt deleted file mode 100644 index 4cac5dfe069..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/License_CPLv05.txt +++ /dev/null @@ -1,86 +0,0 @@ -Common Public License Version 0.5 -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and - -b) in the case of each subsequent Contributor: - -i) changes to the Program, and - -ii) additions to the Program; - -where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. - -2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. - -b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. - -c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. - -d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: - -a) it complies with the terms and conditions of this Agreement; and - -b) its license agreement: - -i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; - -ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; - -iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and - -iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. - -When the Program is made available in source code form: - -a) it must be made available under this Agreement; and - -b) a copy of this Agreement must be included with each copy of the Program. - -Contributors may not remove or alter any copyright notices contained within the Program. - -Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), 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 OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - -If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. diff --git a/reactos/tools/sysgen/TriStateTreeView/License_GPLv2.txt b/reactos/tools/sysgen/TriStateTreeView/License_GPLv2.txt deleted file mode 100644 index 1bcc46f53a6..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/License_GPLv2.txt +++ /dev/null @@ -1,342 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) 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 -this service 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 make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. 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. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -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 -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the 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 a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE 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. - - 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 -convey 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision 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, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This 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 Library General -Public License instead of this License. - - diff --git a/reactos/tools/sysgen/TriStateTreeView/License_LGPLv21.txt b/reactos/tools/sysgen/TriStateTreeView/License_LGPLv21.txt deleted file mode 100644 index 807db791666..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/License_LGPLv21.txt +++ /dev/null @@ -1,506 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -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 this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -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 -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser 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 Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "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 -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY 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 -LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - - - diff --git a/reactos/tools/sysgen/TriStateTreeView/SysGen.sln b/reactos/tools/sysgen/TriStateTreeView/SysGen.sln deleted file mode 100644 index ef92c17aa73..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/SysGen.sln +++ /dev/null @@ -1,75 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TriStateTreeViewDemo", "TriStateTreeViewDemo\TriStateTreeViewDemo.csproj", "{6E9E72B6-B523-424F-B409-BA5357BB7B50}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TriStateTreeView", "TriStateTreeView.csproj", "{99CEE41D-B76D-4102-B0AD-C81069509D17}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RosBuilder", "..\RosBuilder\RosBuilder.csproj", "{78A0F196-A5BD-469A-B901-B269671AFB0A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RosFramework", "..\RosFramework\RosFramework.csproj", "{88D9BED7-30C5-4683-A6C6-6F2EB55B8F26}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NAnt.Core", "..\NAnt.Core\NAnt.Core.csproj", "{8F5F8375-4097-4952-B860-784EB9961ABE}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NAnt.Console", "..\NAnt.Console\NAnt.Console.csproj", "{859696F8-F405-4018-A155-D34561498A3E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug Main NAnt BuildFile|Any CPU = Debug Main NAnt BuildFile|Any CPU - Debug NAnt Tests|Any CPU = Debug NAnt Tests|Any CPU - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {6E9E72B6-B523-424F-B409-BA5357BB7B50}.Debug Main NAnt BuildFile|Any CPU.ActiveCfg = Debug|Any CPU - {6E9E72B6-B523-424F-B409-BA5357BB7B50}.Debug Main NAnt BuildFile|Any CPU.Build.0 = Debug|Any CPU - {6E9E72B6-B523-424F-B409-BA5357BB7B50}.Debug NAnt Tests|Any CPU.ActiveCfg = Debug|Any CPU - {6E9E72B6-B523-424F-B409-BA5357BB7B50}.Debug NAnt Tests|Any CPU.Build.0 = Debug|Any CPU - {6E9E72B6-B523-424F-B409-BA5357BB7B50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6E9E72B6-B523-424F-B409-BA5357BB7B50}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6E9E72B6-B523-424F-B409-BA5357BB7B50}.Release|Any CPU.Build.0 = Release|Any CPU - {99CEE41D-B76D-4102-B0AD-C81069509D17}.Debug Main NAnt BuildFile|Any CPU.ActiveCfg = Debug|Any CPU - {99CEE41D-B76D-4102-B0AD-C81069509D17}.Debug Main NAnt BuildFile|Any CPU.Build.0 = Debug|Any CPU - {99CEE41D-B76D-4102-B0AD-C81069509D17}.Debug NAnt Tests|Any CPU.ActiveCfg = Debug|Any CPU - {99CEE41D-B76D-4102-B0AD-C81069509D17}.Debug NAnt Tests|Any CPU.Build.0 = Debug|Any CPU - {99CEE41D-B76D-4102-B0AD-C81069509D17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {99CEE41D-B76D-4102-B0AD-C81069509D17}.Debug|Any CPU.Build.0 = Debug|Any CPU - {99CEE41D-B76D-4102-B0AD-C81069509D17}.Release|Any CPU.ActiveCfg = Release|Any CPU - {99CEE41D-B76D-4102-B0AD-C81069509D17}.Release|Any CPU.Build.0 = Release|Any CPU - {78A0F196-A5BD-469A-B901-B269671AFB0A}.Debug Main NAnt BuildFile|Any CPU.ActiveCfg = Debug|Any CPU - {78A0F196-A5BD-469A-B901-B269671AFB0A}.Debug Main NAnt BuildFile|Any CPU.Build.0 = Debug|Any CPU - {78A0F196-A5BD-469A-B901-B269671AFB0A}.Debug NAnt Tests|Any CPU.ActiveCfg = Debug|Any CPU - {78A0F196-A5BD-469A-B901-B269671AFB0A}.Debug NAnt Tests|Any CPU.Build.0 = Debug|Any CPU - {78A0F196-A5BD-469A-B901-B269671AFB0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {78A0F196-A5BD-469A-B901-B269671AFB0A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {78A0F196-A5BD-469A-B901-B269671AFB0A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {78A0F196-A5BD-469A-B901-B269671AFB0A}.Release|Any CPU.Build.0 = Release|Any CPU - {88D9BED7-30C5-4683-A6C6-6F2EB55B8F26}.Debug Main NAnt BuildFile|Any CPU.ActiveCfg = Debug|Any CPU - {88D9BED7-30C5-4683-A6C6-6F2EB55B8F26}.Debug Main NAnt BuildFile|Any CPU.Build.0 = Debug|Any CPU - {88D9BED7-30C5-4683-A6C6-6F2EB55B8F26}.Debug NAnt Tests|Any CPU.ActiveCfg = Debug|Any CPU - {88D9BED7-30C5-4683-A6C6-6F2EB55B8F26}.Debug NAnt Tests|Any CPU.Build.0 = Debug|Any CPU - {88D9BED7-30C5-4683-A6C6-6F2EB55B8F26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {88D9BED7-30C5-4683-A6C6-6F2EB55B8F26}.Debug|Any CPU.Build.0 = Debug|Any CPU - {88D9BED7-30C5-4683-A6C6-6F2EB55B8F26}.Release|Any CPU.ActiveCfg = Release|Any CPU - {88D9BED7-30C5-4683-A6C6-6F2EB55B8F26}.Release|Any CPU.Build.0 = Release|Any CPU - {8F5F8375-4097-4952-B860-784EB9961ABE}.Debug Main NAnt BuildFile|Any CPU.ActiveCfg = Debug Main NAnt BuildFile|Any CPU - {8F5F8375-4097-4952-B860-784EB9961ABE}.Debug Main NAnt BuildFile|Any CPU.Build.0 = Debug Main NAnt BuildFile|Any CPU - {8F5F8375-4097-4952-B860-784EB9961ABE}.Debug NAnt Tests|Any CPU.ActiveCfg = Debug Main NAnt BuildFile|Any CPU - {8F5F8375-4097-4952-B860-784EB9961ABE}.Debug NAnt Tests|Any CPU.Build.0 = Debug Main NAnt BuildFile|Any CPU - {8F5F8375-4097-4952-B860-784EB9961ABE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8F5F8375-4097-4952-B860-784EB9961ABE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8F5F8375-4097-4952-B860-784EB9961ABE}.Release|Any CPU.ActiveCfg = Debug Main NAnt BuildFile|Any CPU - {8F5F8375-4097-4952-B860-784EB9961ABE}.Release|Any CPU.Build.0 = Debug Main NAnt BuildFile|Any CPU - {859696F8-F405-4018-A155-D34561498A3E}.Debug Main NAnt BuildFile|Any CPU.ActiveCfg = Debug Main NAnt BuildFile|Any CPU - {859696F8-F405-4018-A155-D34561498A3E}.Debug Main NAnt BuildFile|Any CPU.Build.0 = Debug Main NAnt BuildFile|Any CPU - {859696F8-F405-4018-A155-D34561498A3E}.Debug NAnt Tests|Any CPU.ActiveCfg = Debug NAnt Tests|Any CPU - {859696F8-F405-4018-A155-D34561498A3E}.Debug NAnt Tests|Any CPU.Build.0 = Debug NAnt Tests|Any CPU - {859696F8-F405-4018-A155-D34561498A3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {859696F8-F405-4018-A155-D34561498A3E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {859696F8-F405-4018-A155-D34561498A3E}.Release|Any CPU.ActiveCfg = Debug NAnt Tests|Any CPU - {859696F8-F405-4018-A155-D34561498A3E}.Release|Any CPU.Build.0 = Debug NAnt Tests|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/reactos/tools/sysgen/TriStateTreeView/SysGen.suo b/reactos/tools/sysgen/TriStateTreeView/SysGen.suo deleted file mode 100644 index 5ffb0f9a16d..00000000000 Binary files a/reactos/tools/sysgen/TriStateTreeView/SysGen.suo and /dev/null differ diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeView.cs b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeView.cs deleted file mode 100644 index 873d0afcbbd..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeView.cs +++ /dev/null @@ -1,458 +0,0 @@ -// --------------------------------------------------------------------------------------------- -#region // Copyright (c) 2004-2005, SIL International. All Rights Reserved. -// -// Copyright (c) 2004-2005, SIL International. All Rights Reserved. -// -// Distributable under the terms of either the Common Public License or the -// GNU Lesser General Public License, as specified in the LICENSING.txt file. -// -#endregion -// -// File: TriStateTreeView.cs -// Responsibility: Eberhard Beilharz/Tim Steenwyk -// -// -// -// --------------------------------------------------------------------------------------------- -using System; -using System.Collections; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Runtime.InteropServices; -using System.Windows.Forms; -using Skybound.VisualStyles; - -namespace SIL.FieldWorks.Common.Controls -{ - /// ---------------------------------------------------------------------------------------- - /// - /// A tree view with tri-state check boxes - /// - /// - /// REVIEW: If we want to have icons in addition to the check boxes, we probably have to - /// set the icons for the check boxes in a different way. The windows tree view control - /// can have a separate image list for states. - /// - /// ---------------------------------------------------------------------------------------- - public class TriStateTreeView : TreeView - { - private System.Windows.Forms.ImageList m_TriStateImages; - private System.ComponentModel.IContainer components; - /// - /// The check state - /// - /// The states corresponds to image index - public enum CheckState - { - /// greyed out - GreyChecked = 0, - /// Unchecked - Unchecked = 1, - /// Checked - Checked = 2, - } - - #region Redefined Win-API structs and methods - /// - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct TV_HITTESTINFO - { - /// Client coordinates of the point to test. - public Point pt; - /// Variable that receives information about the results of a hit test. - public TVHit flags; - /// Handle to the item that occupies the point. - public IntPtr hItem; - } - - /// Hit tests for tree view - [Flags] - public enum TVHit - { - /// In the client area, but below the last item. - NoWhere = 0x0001, - /// On the bitmap associated with an item. - OnItemIcon = 0x0002, - /// On the label (string) associated with an item. - OnItemLabel = 0x0004, - /// In the indentation associated with an item. - OnItemIndent = 0x0008, - /// On the button associated with an item. - OnItemButton = 0x0010, - /// In the area to the right of an item. - OnItemRight = 0x0020, - /// On the state icon for a tree-view item that is in a user-defined state. - OnItemStateIcon = 0x0040, - /// On the bitmap or label associated with an item. - OnItem = (OnItemIcon | OnItemLabel | OnItemStateIcon), - /// Above the client area. - Above = 0x0100, - /// Below the client area. - Below = 0x0200, - /// To the right of the client area. - ToRight = 0x0400, - /// To the left of the client area. - ToLeft = 0x0800 - } - - /// - public enum TreeViewMessages - { - /// - TV_FIRST = 0x1100, // TreeView messages - /// - TVM_HITTEST = (TV_FIRST + 17), - } - - /// - [DllImport("user32.dll", CharSet = CharSet.Auto)] - public static extern int SendMessage(IntPtr hWnd, TreeViewMessages msg, int wParam, ref TV_HITTESTINFO lParam); - #endregion - - #region Constructor and destructor - /// ------------------------------------------------------------------------------------ - /// - /// Initializes a new instance of the class. - /// - /// ------------------------------------------------------------------------------------ - public TriStateTreeView() - { - // This call is required by the Windows.Forms Form Designer. - InitializeComponent(); - - if (ThemeInformation.VisualStylesEnabled) - { - Bitmap bmp = new Bitmap(m_TriStateImages.ImageSize.Width, m_TriStateImages.ImageSize.Height); - Rectangle rc = new Rectangle(0, 0, bmp.Width, bmp.Height); - Graphics graphics = Graphics.FromImage(bmp); - - ThemePaint.Draw(graphics, this, ThemeClasses.Button, ThemeParts.ButtonCheckBox, - ThemeStates.CheckBoxCheckedDisabled, rc, rc); - m_TriStateImages.Images[0] = bmp; - - ThemePaint.Draw(graphics, this, ThemeClasses.Button, ThemeParts.ButtonCheckBox, - ThemeStates.CheckBoxUncheckedNormal, rc, rc); - m_TriStateImages.Images[1] = bmp; - - ThemePaint.Draw(graphics, this, ThemeClasses.Button, ThemeParts.ButtonCheckBox, - ThemeStates.CheckBoxCheckedNormal, rc, rc); - m_TriStateImages.Images[2] = bmp; - } - - ImageList = m_TriStateImages; - ImageIndex = (int)CheckState.Unchecked; - SelectedImageIndex = (int)CheckState.Unchecked; - } - - /// ----------------------------------------------------------------------------------- - /// - /// Clean up any resources being used. - /// - /// true to release both managed and unmanaged - /// resources; false to release only unmanaged resources. - /// - /// ----------------------------------------------------------------------------------- - protected override void Dispose(bool disposing) - { - if (disposing) - { - if (components != null) - { - components.Dispose(); - } - } - base.Dispose(disposing); - } - #endregion - - #region Component Designer generated code - /// ----------------------------------------------------------------------------------- - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - /// ----------------------------------------------------------------------------------- - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(TriStateTreeView)); - this.m_TriStateImages = new System.Windows.Forms.ImageList(this.components); - // - // m_TriStateImages - // - this.m_TriStateImages.ImageSize = new System.Drawing.Size(16, 16); - this.m_TriStateImages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("m_TriStateImages.ImageStream"))); - this.m_TriStateImages.TransparentColor = System.Drawing.Color.Magenta; - - } - #endregion - - #region Hide no longer appropriate properties from Designer - /// ------------------------------------------------------------------------------------ - /// - /// - /// - /// ------------------------------------------------------------------------------------ - [Browsable(false)] - public new bool CheckBoxes - { - get { return base.CheckBoxes; } - set { base.CheckBoxes = value; } - } - - /// ------------------------------------------------------------------------------------ - /// - /// - /// - /// ------------------------------------------------------------------------------------ - [Browsable(false)] - public new int ImageIndex - { - get { return base.ImageIndex; } - set { base.ImageIndex = value; } - } - - /// ------------------------------------------------------------------------------------ - /// - /// - /// - /// ------------------------------------------------------------------------------------ - [Browsable(false)] - public new ImageList ImageList - { - get { return base.ImageList; } - set { base.ImageList = value; } - } - - /// ------------------------------------------------------------------------------------ - /// - /// - /// - /// ------------------------------------------------------------------------------------ - [Browsable(false)] - public new int SelectedImageIndex - { - get { return base.SelectedImageIndex; } - set { base.SelectedImageIndex = value; } - } - #endregion - - #region Overrides - /// ------------------------------------------------------------------------------------ - /// - /// Called when the user clicks on an item - /// - /// - /// ------------------------------------------------------------------------------------ - protected override void OnClick(EventArgs e) - { - base.OnClick(e); - - TV_HITTESTINFO hitTestInfo = new TV_HITTESTINFO(); - hitTestInfo.pt = PointToClient(Control.MousePosition); - - SendMessage(Handle, TreeViewMessages.TVM_HITTEST, - 0, ref hitTestInfo); - if ((hitTestInfo.flags & TVHit.OnItemIcon) == TVHit.OnItemIcon) - { - TreeNode node = GetNodeAt(hitTestInfo.pt); - if (node != null) - ChangeNodeState(node); - } - } - - /// ------------------------------------------------------------------------------------ - /// - /// Toggle item if user presses space bar - /// - /// - /// ------------------------------------------------------------------------------------ - protected override void OnKeyDown(KeyEventArgs e) - { - base.OnKeyDown(e); - - if (e.KeyCode == Keys.Space) - ChangeNodeState(SelectedNode); - } - #endregion - - #region Private methods - /// ------------------------------------------------------------------------------------ - /// - /// Checks or unchecks all children - /// - /// - /// - /// ------------------------------------------------------------------------------------ - private void CheckNode(TreeNode node, CheckState state) - { - InternalSetChecked(node, state); - - foreach (TreeNode child in node.Nodes) - CheckNode(child, state); - } - - /// ------------------------------------------------------------------------------------ - /// - /// Called after a node changed its state. Has to go through all direct children and - /// set state based on children's state. - /// - /// Parent node - /// ------------------------------------------------------------------------------------ - private void ChangeParent(TreeNode node) - { - if (node == null) - return; - - CheckState state = GetChecked(node.FirstNode); - foreach (TreeNode child in node.Nodes) - state &= GetChecked(child); - - if (InternalSetChecked(node, state)) - ChangeParent(node.Parent); - } - - /// ------------------------------------------------------------------------------------ - /// - /// Handles changing the state of a node - /// - /// - /// ------------------------------------------------------------------------------------ - protected void ChangeNodeState(TreeNode node) - { - BeginUpdate(); - CheckState newState; - if (node.ImageIndex == (int)CheckState.Unchecked || node.ImageIndex < 0) - newState = CheckState.Checked; - else - newState = CheckState.Unchecked; - CheckNode(node, newState); - ChangeParent(node.Parent); - EndUpdate(); - } - - /// ------------------------------------------------------------------------------------ - /// - /// Sets the checked state of a node, but doesn't deal with children or parents - /// - /// Node - /// The new checked state - /// true if checked state was set to the requested state, otherwise - /// false. - /// ------------------------------------------------------------------------------------ - private bool InternalSetChecked(TreeNode node, CheckState state) - { - TreeViewCancelEventArgs args = - new TreeViewCancelEventArgs(node, false, TreeViewAction.Unknown); - OnBeforeCheck(args); - if (args.Cancel) - return false; - - node.ImageIndex = (int)state; - node.SelectedImageIndex = (int)state; - - OnAfterCheck(new TreeViewEventArgs(node, TreeViewAction.Unknown)); - return true; - } - - /// ------------------------------------------------------------------------------------ - /// - /// Build a list of all of the tag data for checked items in the tree. - /// - /// - /// - /// ------------------------------------------------------------------------------------ - private void BuildTagDataList(TreeNode node, ArrayList list) - { - if (GetChecked(node) == CheckState.Checked && node.Tag != null) - list.Add(node.Tag); - - foreach (TreeNode child in node.Nodes) - BuildTagDataList(child, list); - } - - /// ------------------------------------------------------------------------------------ - /// - /// Look through the tree nodes to find the node that has given tag data and check it. - /// - /// - /// - /// - /// ------------------------------------------------------------------------------------ - private void FindAndCheckNode(TreeNode node, object tag, CheckState state) - { - if (node.Tag != null && node.Tag.Equals(tag)) - { - SetChecked(node, state); - return; - } - - foreach (TreeNode child in node.Nodes) - FindAndCheckNode(child, tag, state); - } - #endregion - - #region Public methods - /// ------------------------------------------------------------------------------------ - /// - /// Gets the checked state of a node - /// - /// Node - /// The checked state - /// ------------------------------------------------------------------------------------ - public CheckState GetChecked(TreeNode node) - { - if (node.ImageIndex < 0) - return CheckState.Unchecked; - else - return (CheckState)node.ImageIndex; - } - - /// ------------------------------------------------------------------------------------ - /// - /// Sets the checked state of a node - /// - /// Node - /// The new checked state - /// ------------------------------------------------------------------------------------ - public void SetChecked(TreeNode node, CheckState state) - { - if (!InternalSetChecked(node, state)) - return; - CheckNode(node, state); - ChangeParent(node.Parent); - } - - /// ------------------------------------------------------------------------------------ - /// - /// Find a node in the tree that matches the given tag data and set its checked state - /// - /// - /// - /// ------------------------------------------------------------------------------------ - public void CheckNodeByTag(object tag, CheckState state) - { - if (tag == null) - return; - foreach (TreeNode node in Nodes) - FindAndCheckNode(node, tag, state); - } - - /// ------------------------------------------------------------------------------------ - /// - /// Return a list of the tag data for all of the checked items in the tree - /// - /// - /// ------------------------------------------------------------------------------------ - public ArrayList GetCheckedTagData() - { - ArrayList list = new ArrayList(); - - foreach (TreeNode node in Nodes) - BuildTagDataList(node, list); - return list; - } - #endregion - } -} diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeView.csproj b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeView.csproj deleted file mode 100644 index f53282f62f5..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeView.csproj +++ /dev/null @@ -1,116 +0,0 @@ - - - Local - 8.0.50727 - 2.0 - {99CEE41D-B76D-4102-B0AD-C81069509D17} - Debug - AnyCPU - - - - - TriStateTreeView - - - JScript - Grid - IE50 - false - Library - TriStateTreeView - OnBuildSuccess - - - - - - - 2.0 - - - bin\Debug\ - false - 285212672 - false - - - DEBUG;TRACE - - - true - 4096 - false - - - false - false - false - false - 4 - full - prompt - - - bin\Release\ - false - 285212672 - false - - - TRACE - - - false - 4096 - false - - - true - false - false - false - 4 - none - prompt - - - - skybound.visualstyles - skybound.visualstyles.dll - - - System - - - System.Data - - - System.Drawing - - - System.Windows.Forms - - - System.XML - - - - - Code - - - Component - - - TriStateTreeView.cs - - - - - - - - - - \ No newline at end of file diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeView.resx b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeView.resx deleted file mode 100644 index aabb39ec3c5..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeView.resx +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Private - - - Private - - - 17, 17 - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAFpTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0xLjAuNTAw - MC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZT - eXN0ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMA - AAB0CQAAAk1TRnQBSQFMAgEBAwEAAQQBAAEEAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQC - AAEoAwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB - 3AHAAQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IB - AAM5AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8B - MwMAAWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYC - AAFmAZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMC - AAHMAWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQAB - ZgEAATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8B - AAEzAWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQAB - MwGZAWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQAB - MwLMAQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQAB - MwEAAWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMB - mQEAAWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQAB - ZgGZAWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYB - zAH/AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMB - mQEAAZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgAB - mQFmATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwB - AAKZAf8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB - /wEzAQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQAB - mQEAAcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYC - AAHMAWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYB - AAHMApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8C - AAHMAf8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQAB - mQEAAcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMB - AAHMAmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB - /wGZAcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC - /wEzAQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC - /wFmAQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gB - AAHwAfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/4MAAQcL8wQAAQcL - 8wQAAQcL8xQAAQcB7AH/AfMB/wHzAf8B8wH/AfMB/wHzBAABBwHsCf8B8wQAAQcB7An/AfMUAAEHAewB - 8wH/AfMBBwHzAf8B8wH/AvMEAAEHAewJ/wHzBAABBwHsA/8BAAX/AfMUAAEHAewB/wHzAwcB8wH/AfMB - /wHzBAABBwHsCf8B8wQAAQcB7AL/AwAE/wHzFAABBwHsAfMFBwHzAf8C8wQAAQcB7An/AfMEAAEHAewB - /wUAA/8B8xQAAQcB7AH/AgcB8wMHAfMB/wHzBAABBwHsCf8B8wQAAQcB7AH/AgAB/wMAAv8B8xQAAQcB - 7AHzAQcB8wH/AfMDBwLzBAABBwHsCf8B8wQAAQcB7AH/AQAD/wMAAf8B8xQAAQcB7AH/AfMB/wHzAf8B - 8wIHAf8B8wQAAQcB7An/AfMEAAEHAewG/wIAAf8B8xQAAQcB7AHzAf8B8wH/AfMB/wHzAQcC8wQAAQcB - 7An/AfMEAAEHAewH/wEAAf8B8xQAAQcB7AH/AfMB/wHzAf8B8wH/AfMB/wHzBAABBwHsCf8B8wQAAQcB - 7An/AfMUAAEHCuwB8wQAAQcK7AHzBAABBwrsAfMUAAwHBAAMBwQADAeSAAFCAU0BPgcAAT4DAAEoAwAB - QAMAARADAAEBAQABAQUAAYAXAAP/AQAG/wIABv8CAAHAAQMBwAEDAcABAwIAAcABAwHAAQMBwAEDAgAB - wAEDAcABAwHAAQMCAAHAAQMBwAEDAcABAwIAAcABAwHAAQMBwAEDAgABwAEDAcABAwHAAQMCAAHAAQMB - wAEDAcABAwIAAcABAwHAAQMBwAEDAgABwAEDAcABAwHAAQMCAAHAAQMBwAEDAcABAwIAAcABAwHAAQMB - wAEDAgABwAEDAcABAwHAAQMCAAb/AgAG/wIACw== - - - - Private - - - TriStateTreeView - - - False - - \ No newline at end of file diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/App.ico b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/App.ico deleted file mode 100644 index 3a5525fd794..00000000000 Binary files a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/App.ico and /dev/null differ diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Backup/App.ico b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Backup/App.ico deleted file mode 100644 index 3a5525fd794..00000000000 Binary files a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Backup/App.ico and /dev/null differ diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Backup/Form1.cs b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Backup/Form1.cs deleted file mode 100644 index e30691824bb..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Backup/Form1.cs +++ /dev/null @@ -1,117 +0,0 @@ -using System; -using System.Drawing; -using System.Collections; -using System.ComponentModel; -using System.Windows.Forms; -using System.Data; - -namespace TriStateTreeView -{ - /// ---------------------------------------------------------------------------------------- - /// - /// Summary description for Form1. - /// - /// ---------------------------------------------------------------------------------------- - public class Form1 : System.Windows.Forms.Form - { - private SIL.FieldWorks.Common.Controls.TriStateTreeView triStateTreeView1; - /// - /// Required designer variable. - /// - private System.ComponentModel.Container components = null; - - /// ------------------------------------------------------------------------------------ - /// - /// Initializes a new instance of the class. - /// - /// ------------------------------------------------------------------------------------ - public Form1() - { - // - // Required for Windows Form Designer support - // - InitializeComponent(); - - // - // TODO: Add any constructor code after InitializeComponent call - // - - triStateTreeView1.ExpandAll(); - } - - /// ------------------------------------------------------------------------------------ - /// - /// Clean up any resources being used. - /// - /// true to release both managed and unmanaged - /// resources; false to release only unmanaged resources. - /// - /// ------------------------------------------------------------------------------------ - protected override void Dispose( bool disposing ) - { - if( disposing ) - { - if (components != null) - { - components.Dispose(); - } - } - base.Dispose( disposing ); - } - - #region Windows Form Designer generated code - /// ------------------------------------------------------------------------------------ - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - /// ------------------------------------------------------------------------------------ - private void InitializeComponent() - { - this.triStateTreeView1 = new SIL.FieldWorks.Common.Controls.TriStateTreeView(); - this.SuspendLayout(); - // - // triStateTreeView1 - // - this.triStateTreeView1.ImageIndex = 1; - this.triStateTreeView1.Location = new System.Drawing.Point(16, 16); - this.triStateTreeView1.Name = "triStateTreeView1"; - this.triStateTreeView1.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { - new System.Windows.Forms.TreeNode("Node0", new System.Windows.Forms.TreeNode[] { - new System.Windows.Forms.TreeNode("Node1", new System.Windows.Forms.TreeNode[] { - new System.Windows.Forms.TreeNode("Node2"), - new System.Windows.Forms.TreeNode("Node10", new System.Windows.Forms.TreeNode[] { - new System.Windows.Forms.TreeNode("Node11")})}), - new System.Windows.Forms.TreeNode("Node3", new System.Windows.Forms.TreeNode[] { - new System.Windows.Forms.TreeNode("Node4"), - new System.Windows.Forms.TreeNode("Node7"), - new System.Windows.Forms.TreeNode("Node8"), - new System.Windows.Forms.TreeNode("Node9")})})}); - this.triStateTreeView1.SelectedImageIndex = 1; - this.triStateTreeView1.Size = new System.Drawing.Size(256, 232); - this.triStateTreeView1.TabIndex = 0; - // - // Form1 - // - this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); - this.ClientSize = new System.Drawing.Size(292, 266); - this.Controls.Add(this.triStateTreeView1); - this.Name = "Form1"; - this.Text = "Form1"; - this.ResumeLayout(false); - - } - #endregion - - /// ------------------------------------------------------------------------------------ - /// - /// The main entry point for the application. - /// - /// ------------------------------------------------------------------------------------ - [STAThread] - static void Main() - { - Application.Run(new Form1()); - } - } -} diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Backup/Form1.resx b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Backup/Form1.resx deleted file mode 100644 index 74f7e7a9db5..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Backup/Form1.resx +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Private - - - Private - - - False - - - False - - - (Default) - - - False - - - False - - - 8, 8 - - - Form1 - - - True - - - 80 - - - True - - - Private - - \ No newline at end of file diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Backup/TriStateTreeViewDemo.csproj b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Backup/TriStateTreeViewDemo.csproj deleted file mode 100644 index 17c20075c38..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Backup/TriStateTreeViewDemo.csproj +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Backup1/AssemblyInfo.cs b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Backup1/AssemblyInfo.cs deleted file mode 100644 index 192fff970c0..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Backup1/AssemblyInfo.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// -[assembly: AssemblyTitle("TriStateTreeView control")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.*")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Backup1/TriStateTreeView.cs b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Backup1/TriStateTreeView.cs deleted file mode 100644 index ba016abad0d..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Backup1/TriStateTreeView.cs +++ /dev/null @@ -1,458 +0,0 @@ -// --------------------------------------------------------------------------------------------- -#region // Copyright (c) 2004-2005, SIL International. All Rights Reserved. -// -// Copyright (c) 2004-2005, SIL International. All Rights Reserved. -// -// Distributable under the terms of either the Common Public License or the -// GNU Lesser General Public License, as specified in the LICENSING.txt file. -// -#endregion -// -// File: TriStateTreeView.cs -// Responsibility: Eberhard Beilharz/Tim Steenwyk -// -// -// -// --------------------------------------------------------------------------------------------- -using System; -using System.Collections; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Runtime.InteropServices; -using System.Windows.Forms; -using Skybound.VisualStyles; - -namespace SIL.FieldWorks.Common.Controls -{ - /// ---------------------------------------------------------------------------------------- - /// - /// A tree view with tri-state check boxes - /// - /// - /// REVIEW: If we want to have icons in addition to the check boxes, we probably have to - /// set the icons for the check boxes in a different way. The windows tree view control - /// can have a separate image list for states. - /// - /// ---------------------------------------------------------------------------------------- - public class TriStateTreeView : TreeView - { - private System.Windows.Forms.ImageList m_TriStateImages; - private System.ComponentModel.IContainer components; - /// - /// The check state - /// - /// The states corresponds to image index - public enum CheckState - { - /// greyed out - GreyChecked = 0, - /// Unchecked - Unchecked = 1, - /// Checked - Checked = 2, - } - - #region Redefined Win-API structs and methods - /// - [StructLayout(LayoutKind.Sequential, Pack=1)] - public struct TV_HITTESTINFO - { - /// Client coordinates of the point to test. - public Point pt; - /// Variable that receives information about the results of a hit test. - public TVHit flags; - /// Handle to the item that occupies the point. - public IntPtr hItem; - } - - /// Hit tests for tree view - [Flags] - public enum TVHit - { - /// In the client area, but below the last item. - NoWhere = 0x0001, - /// On the bitmap associated with an item. - OnItemIcon = 0x0002, - /// On the label (string) associated with an item. - OnItemLabel = 0x0004, - /// In the indentation associated with an item. - OnItemIndent = 0x0008, - /// On the button associated with an item. - OnItemButton = 0x0010, - /// In the area to the right of an item. - OnItemRight = 0x0020, - /// On the state icon for a tree-view item that is in a user-defined state. - OnItemStateIcon = 0x0040, - /// On the bitmap or label associated with an item. - OnItem = (OnItemIcon | OnItemLabel | OnItemStateIcon), - /// Above the client area. - Above = 0x0100, - /// Below the client area. - Below = 0x0200, - /// To the right of the client area. - ToRight = 0x0400, - /// To the left of the client area. - ToLeft = 0x0800 - } - - /// - public enum TreeViewMessages - { - /// - TV_FIRST = 0x1100, // TreeView messages - /// - TVM_HITTEST = (TV_FIRST + 17), - } - - /// - [DllImport("user32.dll", CharSet=CharSet.Auto)] - public static extern int SendMessage(IntPtr hWnd, TreeViewMessages msg, int wParam, ref TV_HITTESTINFO lParam); - #endregion - - #region Constructor and destructor - /// ------------------------------------------------------------------------------------ - /// - /// Initializes a new instance of the class. - /// - /// ------------------------------------------------------------------------------------ - public TriStateTreeView() - { - // This call is required by the Windows.Forms Form Designer. - InitializeComponent(); - - if (ThemeInformation.VisualStylesEnabled) - { - Bitmap bmp = new Bitmap(m_TriStateImages.ImageSize.Width, m_TriStateImages.ImageSize.Height); - Rectangle rc = new Rectangle(0, 0, bmp.Width, bmp.Height); - Graphics graphics = Graphics.FromImage(bmp); - - ThemePaint.Draw(graphics, this, ThemeClasses.Button, ThemeParts.ButtonCheckBox, - ThemeStates.CheckBoxCheckedDisabled, rc, rc); - m_TriStateImages.Images[0] = bmp; - - ThemePaint.Draw(graphics, this, ThemeClasses.Button, ThemeParts.ButtonCheckBox, - ThemeStates.CheckBoxUncheckedNormal, rc, rc); - m_TriStateImages.Images[1] = bmp; - - ThemePaint.Draw(graphics, this, ThemeClasses.Button, ThemeParts.ButtonCheckBox, - ThemeStates.CheckBoxCheckedNormal, rc, rc); - m_TriStateImages.Images[2] = bmp; - } - - ImageList = m_TriStateImages; - ImageIndex = (int)CheckState.Unchecked; - SelectedImageIndex = (int)CheckState.Unchecked; - } - - /// ----------------------------------------------------------------------------------- - /// - /// Clean up any resources being used. - /// - /// true to release both managed and unmanaged - /// resources; false to release only unmanaged resources. - /// - /// ----------------------------------------------------------------------------------- - protected override void Dispose( bool disposing ) - { - if( disposing ) - { - if(components != null) - { - components.Dispose(); - } - } - base.Dispose( disposing ); - } - #endregion - - #region Component Designer generated code - /// ----------------------------------------------------------------------------------- - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - /// ----------------------------------------------------------------------------------- - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(TriStateTreeView)); - this.m_TriStateImages = new System.Windows.Forms.ImageList(this.components); - // - // m_TriStateImages - // - this.m_TriStateImages.ImageSize = new System.Drawing.Size(16, 16); - this.m_TriStateImages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("m_TriStateImages.ImageStream"))); - this.m_TriStateImages.TransparentColor = System.Drawing.Color.Magenta; - - } - #endregion - - #region Hide no longer appropriate properties from Designer - /// ------------------------------------------------------------------------------------ - /// - /// - /// - /// ------------------------------------------------------------------------------------ - [Browsable(false)] - public new bool CheckBoxes - { - get { return base.CheckBoxes; } - set { base.CheckBoxes = value; } - } - - /// ------------------------------------------------------------------------------------ - /// - /// - /// - /// ------------------------------------------------------------------------------------ - [Browsable(false)] - public new int ImageIndex - { - get { return base.ImageIndex; } - set { base.ImageIndex = value; } - } - - /// ------------------------------------------------------------------------------------ - /// - /// - /// - /// ------------------------------------------------------------------------------------ - [Browsable(false)] - public new ImageList ImageList - { - get { return base.ImageList; } - set { base.ImageList = value; } - } - - /// ------------------------------------------------------------------------------------ - /// - /// - /// - /// ------------------------------------------------------------------------------------ - [Browsable(false)] - public new int SelectedImageIndex - { - get { return base.SelectedImageIndex; } - set { base.SelectedImageIndex = value; } - } - #endregion - - #region Overrides - /// ------------------------------------------------------------------------------------ - /// - /// Called when the user clicks on an item - /// - /// - /// ------------------------------------------------------------------------------------ - protected override void OnClick(EventArgs e) - { - base.OnClick (e); - - TV_HITTESTINFO hitTestInfo = new TV_HITTESTINFO(); - hitTestInfo.pt = PointToClient(Control.MousePosition); - - SendMessage(Handle, TreeViewMessages.TVM_HITTEST, - 0, ref hitTestInfo); - if ((hitTestInfo.flags & TVHit.OnItemIcon) == TVHit.OnItemIcon) - { - TreeNode node = GetNodeAt(hitTestInfo.pt); - if (node != null) - ChangeNodeState(node); - } - } - - /// ------------------------------------------------------------------------------------ - /// - /// Toggle item if user presses space bar - /// - /// - /// ------------------------------------------------------------------------------------ - protected override void OnKeyDown(KeyEventArgs e) - { - base.OnKeyDown (e); - - if (e.KeyCode == Keys.Space) - ChangeNodeState(SelectedNode); - } - #endregion - - #region Private methods - /// ------------------------------------------------------------------------------------ - /// - /// Checks or unchecks all children - /// - /// - /// - /// ------------------------------------------------------------------------------------ - private void CheckNode(TreeNode node, CheckState state) - { - InternalSetChecked(node, state); - - foreach (TreeNode child in node.Nodes) - CheckNode(child, state); - } - - /// ------------------------------------------------------------------------------------ - /// - /// Called after a node changed its state. Has to go through all direct children and - /// set state based on children's state. - /// - /// Parent node - /// ------------------------------------------------------------------------------------ - private void ChangeParent(TreeNode node) - { - if (node == null) - return; - - CheckState state = GetChecked(node.FirstNode); - foreach (TreeNode child in node.Nodes) - state &= GetChecked(child); - - if (InternalSetChecked(node, state)) - ChangeParent(node.Parent); - } - - /// ------------------------------------------------------------------------------------ - /// - /// Handles changing the state of a node - /// - /// - /// ------------------------------------------------------------------------------------ - protected void ChangeNodeState(TreeNode node) - { - BeginUpdate(); - CheckState newState; - if (node.ImageIndex == (int)CheckState.Unchecked || node.ImageIndex < 0) - newState = CheckState.Checked; - else - newState = CheckState.Unchecked; - CheckNode(node, newState); - ChangeParent(node.Parent); - EndUpdate(); - } - - /// ------------------------------------------------------------------------------------ - /// - /// Sets the checked state of a node, but doesn't deal with children or parents - /// - /// Node - /// The new checked state - /// true if checked state was set to the requested state, otherwise - /// false. - /// ------------------------------------------------------------------------------------ - private bool InternalSetChecked(TreeNode node, CheckState state) - { - TreeViewCancelEventArgs args = - new TreeViewCancelEventArgs(node, false, TreeViewAction.Unknown); - OnBeforeCheck(args); - if (args.Cancel) - return false; - - node.ImageIndex = (int)state; - node.SelectedImageIndex = (int)state; - - OnAfterCheck(new TreeViewEventArgs(node, TreeViewAction.Unknown)); - return true; - } - - /// ------------------------------------------------------------------------------------ - /// - /// Build a list of all of the tag data for checked items in the tree. - /// - /// - /// - /// ------------------------------------------------------------------------------------ - private void BuildTagDataList(TreeNode node, ArrayList list) - { - if (GetChecked(node) == CheckState.Checked && node.Tag != null) - list.Add(node.Tag); - - foreach (TreeNode child in node.Nodes) - BuildTagDataList(child, list); - } - - /// ------------------------------------------------------------------------------------ - /// - /// Look through the tree nodes to find the node that has given tag data and check it. - /// - /// - /// - /// - /// ------------------------------------------------------------------------------------ - private void FindAndCheckNode(TreeNode node, object tag, CheckState state) - { - if (node.Tag != null && node.Tag.Equals(tag)) - { - SetChecked(node, state); - return; - } - - foreach (TreeNode child in node.Nodes) - FindAndCheckNode(child, tag, state); - } - #endregion - - #region Public methods - /// ------------------------------------------------------------------------------------ - /// - /// Gets the checked state of a node - /// - /// Node - /// The checked state - /// ------------------------------------------------------------------------------------ - public CheckState GetChecked(TreeNode node) - { - if (node.ImageIndex < 0) - return CheckState.Unchecked; - else - return (CheckState)node.ImageIndex; - } - - /// ------------------------------------------------------------------------------------ - /// - /// Sets the checked state of a node - /// - /// Node - /// The new checked state - /// ------------------------------------------------------------------------------------ - public void SetChecked(TreeNode node, CheckState state) - { - if (!InternalSetChecked(node, state)) - return; - CheckNode(node, state); - ChangeParent(node.Parent); - } - - /// ------------------------------------------------------------------------------------ - /// - /// Find a node in the tree that matches the given tag data and set its checked state - /// - /// - /// - /// ------------------------------------------------------------------------------------ - public void CheckNodeByTag(object tag, CheckState state) - { - if (tag == null) - return; - foreach (TreeNode node in Nodes) - FindAndCheckNode(node, tag, state); - } - - /// ------------------------------------------------------------------------------------ - /// - /// Return a list of the tag data for all of the checked items in the tree - /// - /// - /// ------------------------------------------------------------------------------------ - public ArrayList GetCheckedTagData() - { - ArrayList list = new ArrayList(); - - foreach (TreeNode node in Nodes) - BuildTagDataList(node, list); - return list; - } - #endregion - } -} diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Backup1/TriStateTreeView.csproj b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Backup1/TriStateTreeView.csproj deleted file mode 100644 index f87c6247744..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Backup1/TriStateTreeView.csproj +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Backup1/TriStateTreeView.resx b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Backup1/TriStateTreeView.resx deleted file mode 100644 index aabb39ec3c5..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Backup1/TriStateTreeView.resx +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Private - - - Private - - - 17, 17 - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAFpTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0xLjAuNTAw - MC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZT - eXN0ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMA - AAB0CQAAAk1TRnQBSQFMAgEBAwEAAQQBAAEEAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQC - AAEoAwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB - 3AHAAQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IB - AAM5AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8B - MwMAAWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYC - AAFmAZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMC - AAHMAWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQAB - ZgEAATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8B - AAEzAWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQAB - MwGZAWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQAB - MwLMAQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQAB - MwEAAWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMB - mQEAAWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQAB - ZgGZAWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYB - zAH/AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMB - mQEAAZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgAB - mQFmATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwB - AAKZAf8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB - /wEzAQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQAB - mQEAAcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYC - AAHMAWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYB - AAHMApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8C - AAHMAf8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQAB - mQEAAcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMB - AAHMAmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB - /wGZAcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC - /wEzAQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC - /wFmAQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gB - AAHwAfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/4MAAQcL8wQAAQcL - 8wQAAQcL8xQAAQcB7AH/AfMB/wHzAf8B8wH/AfMB/wHzBAABBwHsCf8B8wQAAQcB7An/AfMUAAEHAewB - 8wH/AfMBBwHzAf8B8wH/AvMEAAEHAewJ/wHzBAABBwHsA/8BAAX/AfMUAAEHAewB/wHzAwcB8wH/AfMB - /wHzBAABBwHsCf8B8wQAAQcB7AL/AwAE/wHzFAABBwHsAfMFBwHzAf8C8wQAAQcB7An/AfMEAAEHAewB - /wUAA/8B8xQAAQcB7AH/AgcB8wMHAfMB/wHzBAABBwHsCf8B8wQAAQcB7AH/AgAB/wMAAv8B8xQAAQcB - 7AHzAQcB8wH/AfMDBwLzBAABBwHsCf8B8wQAAQcB7AH/AQAD/wMAAf8B8xQAAQcB7AH/AfMB/wHzAf8B - 8wIHAf8B8wQAAQcB7An/AfMEAAEHAewG/wIAAf8B8xQAAQcB7AHzAf8B8wH/AfMB/wHzAQcC8wQAAQcB - 7An/AfMEAAEHAewH/wEAAf8B8xQAAQcB7AH/AfMB/wHzAf8B8wH/AfMB/wHzBAABBwHsCf8B8wQAAQcB - 7An/AfMUAAEHCuwB8wQAAQcK7AHzBAABBwrsAfMUAAwHBAAMBwQADAeSAAFCAU0BPgcAAT4DAAEoAwAB - QAMAARADAAEBAQABAQUAAYAXAAP/AQAG/wIABv8CAAHAAQMBwAEDAcABAwIAAcABAwHAAQMBwAEDAgAB - wAEDAcABAwHAAQMCAAHAAQMBwAEDAcABAwIAAcABAwHAAQMBwAEDAgABwAEDAcABAwHAAQMCAAHAAQMB - wAEDAcABAwIAAcABAwHAAQMBwAEDAgABwAEDAcABAwHAAQMCAAHAAQMBwAEDAcABAwIAAcABAwHAAQMB - wAEDAgABwAEDAcABAwHAAQMCAAb/AgAG/wIACw== - - - - Private - - - TriStateTreeView - - - False - - \ No newline at end of file diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Controls/FileSystemTriStateTreeView.cs b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Controls/FileSystemTriStateTreeView.cs deleted file mode 100644 index aa09cab37be..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Controls/FileSystemTriStateTreeView.cs +++ /dev/null @@ -1,158 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.IO; -using System.Windows.Forms; - -using SysGen.RBuild.Framework; - -using SIL.FieldWorks.Common.Controls; - -namespace TriStateTreeViewDemo -{ - public class FileSystemTriStateTreeView : TriStateTreeView - { - RBuildModule m_Module = null; - - public void Load(RBuildModule module) - { - m_Module = module; - - if (Directory.Exists(module.ModulePath) == false) - throw new DirectoryNotFoundException("Directory Not Found"); - - Nodes.Clear(); - - DirectoryNode node = new DirectoryNode(this, new DirectoryInfo(module.ModulePath)); - - node.Expand(); - } - - public RBuildModule Module - { - get { return m_Module; } - } - - protected override void OnAfterCheck(TreeViewEventArgs e) - { - base.OnAfterCheck(e); - - if (e.Node is FileNode) - { - FileNode fileNode = e.Node as FileNode; - - if (GetChecked(e.Node) == CheckState.Checked) - { - if (fileNode.IsInclude) - { - //if (m_Module.Includes.Contains(fileNode.RelativeDirectory) == false) - // m_Module.Includes.Add(fileNode.RelativeDirectory); - } - else - { - //if (m_Module.Files.Contains(fileNode.RelativePath) == false) - // m_Module.Files.Add(fileNode.RelativePath); - } - } - else if (GetChecked(e.Node) == CheckState.Unchecked) - { - if (fileNode.IsInclude == false) - { - //if (m_Module.Files.Contains(fileNode.RelativePath) == true) - // m_Module.Files.Remove(fileNode.RelativePath); - } - } - } - } - - public class DirectoryNode : TreeNode - { - private DirectoryInfo m_DirectoryInfo; - - public DirectoryNode(DirectoryNode parent, DirectoryInfo directoryInfo) - : base(directoryInfo.Name) - { - m_DirectoryInfo = directoryInfo; - - parent.Nodes.Add(this); - - LoadDirectory(); - LoadFiles(); - } - - public DirectoryNode(FileSystemTriStateTreeView treeView, DirectoryInfo directoryInfo) - : base(directoryInfo.Name) - { - m_DirectoryInfo = directoryInfo; - - treeView.Nodes.Add(this); - - LoadDirectory(); - LoadFiles(); - - } - - public void LoadDirectory() - { - foreach (DirectoryInfo directoryInfo in m_DirectoryInfo.GetDirectories()) - { - new DirectoryNode(this, directoryInfo); - } - } - - public void LoadFiles() - { - foreach (FileInfo file in m_DirectoryInfo.GetFiles()) - { - if (file.Extension.ToLower() == ".c" || - file.Extension.ToLower() == ".cpp" || - file.Extension.ToLower() == ".cxx" || - file.Extension.ToLower() == ".h") - { - new FileNode(this, file); - } - } - } - - public new FileSystemTriStateTreeView TreeView - { - get { return (FileSystemTriStateTreeView)base.TreeView; } - } - } - - public class FileNode : TreeNode - { - private FileInfo m_FileInfo; - private DirectoryNode m_DirectoryNode; - - public FileNode(DirectoryNode directoryNode, FileInfo fileInfo) - : base(fileInfo.Name) - { - m_DirectoryNode = directoryNode; - m_FileInfo = fileInfo; - - m_DirectoryNode.Nodes.Add(this); - } - - public string FilePath - { - get { return m_FileInfo.FullName; } - } - - public string RelativePath - { - get { return FilePath.Replace(((FileSystemTriStateTreeView)TreeView).Module.ModulePath, string.Empty); } - } - - public string RelativeDirectory - { - get { return RelativePath.Replace(@"\" + m_FileInfo.Name , string.Empty); } - } - - public bool IsInclude - { - get { return (m_FileInfo.Extension.ToLower() == ".h"); } - } - } - } -} diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Form1.cs b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Form1.cs deleted file mode 100644 index 2197865e7a7..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Form1.cs +++ /dev/null @@ -1,213 +0,0 @@ -using System; -using System.Drawing; -using System.Collections; -using System.ComponentModel; -using System.Windows.Forms; -using System.Data; - -using SysGen.RBuild.Framework; - -namespace TriStateTreeViewDemo -{ - /// ---------------------------------------------------------------------------------------- - /// - /// Summary description for Form1. - /// - /// ---------------------------------------------------------------------------------------- - public class Form1 : System.Windows.Forms.Form - { - private FileSystemTriStateTreeView triStateTreeView1; - private TextBox textBox1; - private Button btnProcess; - private Button btnGenerateRBuildFile; - private PropertyGrid propertyGrid1; - private IContainer components; - - /// ------------------------------------------------------------------------------------ - /// - /// Initializes a new instance of the class. - /// - /// ------------------------------------------------------------------------------------ - public Form1() - { - // - // Required for Windows Form Designer support - // - InitializeComponent(); - - // - // TODO: Add any constructor code after InitializeComponent call - // - - triStateTreeView1.ExpandAll(); - } - - /// ------------------------------------------------------------------------------------ - /// - /// Clean up any resources being used. - /// - /// true to release both managed and unmanaged - /// resources; false to release only unmanaged resources. - /// - /// ------------------------------------------------------------------------------------ - protected override void Dispose( bool disposing ) - { - if( disposing ) - { - if (components != null) - { - components.Dispose(); - } - } - base.Dispose( disposing ); - } - - #region Windows Form Designer generated code - /// ------------------------------------------------------------------------------------ - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - /// ------------------------------------------------------------------------------------ - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("Node2"); - System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("Node11"); - System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("Node10", new System.Windows.Forms.TreeNode[] { - treeNode2}); - System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("Node1", new System.Windows.Forms.TreeNode[] { - treeNode1, - treeNode3}); - System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("Node4"); - System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("Node7"); - System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("Node8"); - System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("Node9"); - System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("Node3", new System.Windows.Forms.TreeNode[] { - treeNode5, - treeNode6, - treeNode7, - treeNode8}); - System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("Node0", new System.Windows.Forms.TreeNode[] { - treeNode4, - treeNode9}); - this.textBox1 = new System.Windows.Forms.TextBox(); - this.btnProcess = new System.Windows.Forms.Button(); - this.btnGenerateRBuildFile = new System.Windows.Forms.Button(); - this.propertyGrid1 = new System.Windows.Forms.PropertyGrid(); - this.triStateTreeView1 = new TriStateTreeViewDemo.FileSystemTriStateTreeView(); - this.SuspendLayout(); - // - // textBox1 - // - this.textBox1.Location = new System.Drawing.Point(340, 12); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(432, 20); - this.textBox1.TabIndex = 1; - this.textBox1.Text = "C:\\Ros\\Trunk\\reactos\\salamander\\lib\\sdl"; - // - // btnProcess - // - this.btnProcess.Location = new System.Drawing.Point(687, 38); - this.btnProcess.Name = "btnProcess"; - this.btnProcess.Size = new System.Drawing.Size(85, 28); - this.btnProcess.TabIndex = 2; - this.btnProcess.Text = "button1"; - this.btnProcess.UseVisualStyleBackColor = true; - this.btnProcess.Click += new System.EventHandler(this.btnProcess_Click); - // - // btnGenerateRBuildFile - // - this.btnGenerateRBuildFile.Location = new System.Drawing.Point(701, 517); - this.btnGenerateRBuildFile.Name = "btnGenerateRBuildFile"; - this.btnGenerateRBuildFile.Size = new System.Drawing.Size(75, 23); - this.btnGenerateRBuildFile.TabIndex = 3; - this.btnGenerateRBuildFile.Text = "button1"; - this.btnGenerateRBuildFile.UseVisualStyleBackColor = true; - this.btnGenerateRBuildFile.Click += new System.EventHandler(this.btnGenerateRBuildFile_Click); - // - // propertyGrid1 - // - this.propertyGrid1.Location = new System.Drawing.Point(340, 75); - this.propertyGrid1.Name = "propertyGrid1"; - this.propertyGrid1.Size = new System.Drawing.Size(431, 426); - this.propertyGrid1.TabIndex = 4; - // - // triStateTreeView1 - // - this.triStateTreeView1.Anchor = System.Windows.Forms.AnchorStyles.None; - this.triStateTreeView1.ImageIndex = 1; - this.triStateTreeView1.Location = new System.Drawing.Point(12, 12); - this.triStateTreeView1.Name = "triStateTreeView1"; - treeNode1.Name = ""; - treeNode1.Text = "Node2"; - treeNode2.Name = ""; - treeNode2.Text = "Node11"; - treeNode3.Name = ""; - treeNode3.Text = "Node10"; - treeNode4.Name = ""; - treeNode4.Text = "Node1"; - treeNode5.Name = ""; - treeNode5.Text = "Node4"; - treeNode6.Name = ""; - treeNode6.Text = "Node7"; - treeNode7.Name = ""; - treeNode7.Text = "Node8"; - treeNode8.Name = ""; - treeNode8.Text = "Node9"; - treeNode9.Name = ""; - treeNode9.Text = "Node3"; - treeNode10.Name = ""; - treeNode10.Text = "Node0"; - this.triStateTreeView1.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { - treeNode10}); - this.triStateTreeView1.SelectedImageIndex = 1; - this.triStateTreeView1.Size = new System.Drawing.Size(322, 528); - this.triStateTreeView1.TabIndex = 0; - // - // Form1 - // - this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); - this.ClientSize = new System.Drawing.Size(788, 556); - this.Controls.Add(this.propertyGrid1); - this.Controls.Add(this.btnGenerateRBuildFile); - this.Controls.Add(this.btnProcess); - this.Controls.Add(this.textBox1); - this.Controls.Add(this.triStateTreeView1); - this.Name = "Form1"; - this.Text = "RBuild Port Maker"; - this.ResumeLayout(false); - this.PerformLayout(); - - } - #endregion - - /// ------------------------------------------------------------------------------------ - /// - /// The main entry point for the application. - /// - /// ------------------------------------------------------------------------------------ - [STAThread] - static void Main() - { - Application.Run(new Form1()); - } - RBuildModule module = new RBuildModule(); - private void btnProcess_Click(object sender, EventArgs e) - { - - - module.GenerateFromPath(textBox1.Text); - - this.triStateTreeView1.Load(module); - this.propertyGrid1.SelectedObject = module; - - - } - - private void btnGenerateRBuildFile_Click(object sender, EventArgs e) - { -module.SaveAs (@"c:\module.rbuild"); - } - } -} diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Form1.resx b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Form1.resx deleted file mode 100644 index 19dc0dd8b39..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/Form1.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/RBuildModule.cs b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/RBuildModule.cs deleted file mode 100644 index 7e121105791..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/RBuildModule.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; -using System.ComponentModel; - -namespace TriStateTreeViewDemo -{ - public enum TargetType - { - Win32CUI = 0, - } - - [DefaultPropertyAttribute("Name")] - public class RBuildModule - { - private string m_Path = null; - private TargetType m_Type = TargetType.Win32CUI; - - public void GenerateFromPath(string path) - { - m_Path = path; - } - - public string ModulePath - { - get { return m_Path; } - } - - public string Name - { - get { return Path.GetFileName(m_Path); } - } - - public string SourcePath - { - get { return Path.Combine(m_Path, "src"); } - } - - public string ResourceFile - { - get { return Path.Combine(ModulePath, Name + ".rc"); } - } - - public string CompiledFilename - { - get { return ""; } - } - - public string Description - { - get { return ""; } - } - - public TargetType Type - { - get { return m_Type; } - set { m_Type = value; } - } - } -} diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/RCWriter.cs b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/RCWriter.cs deleted file mode 100644 index e53f8f54c55..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/RCWriter.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; -using System.ComponentModel; - -using SysGen.RBuild.Framework; - -namespace TriStateTreeViewDemo -{ - public class RCWriter - { - RBuildModule m_Module = null; - - /// - /// Creates a new instance of the class. - /// - /// - public RCWriter(RBuildModule module) - { - //Set the module - m_Module = module; - } - - public RBuildModule Module - { - get { return m_Module; } - } - - public void Generate() - { - //using (FileStream fs = new FileStream(Module.ResourceFile, FileMode.Append)) - //{ - // using (StreamWriter objWriter = new StreamWriter(fs)) - // { - // objWriter.WriteLine("; Autogenerated"); - // objWriter.WriteLine("#include "); - // objWriter.WriteLine(); - // objWriter.WriteLine("LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL"); - // objWriter.WriteLine(); - // objWriter.WriteLine("#define REACTOS_STR_FILE_DESCRIPTION \"{0}\0\"", Module.Description); - // objWriter.WriteLine("#define REACTOS_STR_INTERNAL_NAME \"{0}\0\"", Module.Name); - // objWriter.WriteLine("#define REACTOS_STR_ORIGINAL_FILENAME \"{0}\0\"", Module.CompiledFilename); - // objWriter.WriteLine(); - // objWriter.WriteLine("LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL"); - // } - //} - } - } -} diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/TriStateTreeViewDemo.csproj b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/TriStateTreeViewDemo.csproj deleted file mode 100644 index 3ab6641a37a..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/TriStateTreeViewDemo.csproj +++ /dev/null @@ -1,124 +0,0 @@ - - - Local - 8.0.50727 - 2.0 - {6E9E72B6-B523-424F-B409-BA5357BB7B50} - Debug - AnyCPU - - - - - TriStateTreeViewDemo - - - JScript - Grid - IE50 - false - WinExe - TriStateTreeViewDemo - OnBuildSuccess - - - - - - - - - bin\Debug\ - false - 285212672 - false - - - DEBUG;TRACE - - - true - 4096 - false - - - false - false - false - false - 4 - full - prompt - - - bin\Release\ - false - 285212672 - false - - - TRACE - - - false - 4096 - false - - - true - false - false - false - 4 - none - prompt - - - - System - - - System.Data - - - System.Drawing - - - System.Windows.Forms - - - System.XML - - - - - - Component - - - - Form - - - Form1.cs - Designer - - - - - {88D9BED7-30C5-4683-A6C6-6F2EB55B8F26} - SysGen.RBuild.Framework - - - {99CEE41D-B76D-4102-B0AD-C81069509D17} - TriStateTreeView - - - - - - - - - - \ No newline at end of file diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/TriStateTreeViewDemo.csproj.user b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/TriStateTreeViewDemo.csproj.user deleted file mode 100644 index a1d742b1c46..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/TriStateTreeViewDemo.csproj.user +++ /dev/null @@ -1,5 +0,0 @@ - - - ProjectFiles - - \ No newline at end of file diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/TriStateTreeViewDemo.suo b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/TriStateTreeViewDemo.suo deleted file mode 100644 index eb2fb45d07b..00000000000 Binary files a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/TriStateTreeViewDemo.suo and /dev/null differ diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/UpgradeLog.XML b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/UpgradeLog.XML deleted file mode 100644 index bd033a586de..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/UpgradeLog.XML +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/UpgradeLog2.XML b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/UpgradeLog2.XML deleted file mode 100644 index 8133cb6b4e5..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/UpgradeLog2.XML +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/_UpgradeReport_Files/UpgradeReport.css b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/_UpgradeReport_Files/UpgradeReport.css deleted file mode 100644 index fae98af0a86..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/_UpgradeReport_Files/UpgradeReport.css +++ /dev/null @@ -1,207 +0,0 @@ -BODY -{ - BACKGROUND-COLOR: white; - FONT-FAMILY: "Verdana", sans-serif; - FONT-SIZE: 100%; - MARGIN-LEFT: 0px; - MARGIN-TOP: 0px -} -P -{ - FONT-FAMILY: "Verdana", sans-serif; - FONT-SIZE: 70%; - LINE-HEIGHT: 12pt; - MARGIN-BOTTOM: 0px; - MARGIN-LEFT: 10px; - MARGIN-TOP: 10px -} -.note -{ - BACKGROUND-COLOR: #ffffff; - COLOR: #336699; - FONT-FAMILY: "Verdana", sans-serif; - FONT-SIZE: 100%; - MARGIN-BOTTOM: 0px; - MARGIN-LEFT: 0px; - MARGIN-TOP: 0px; - PADDING-RIGHT: 10px -} -.infotable -{ - BACKGROUND-COLOR: #f0f0e0; - BORDER-BOTTOM: #ffffff 0px solid; - BORDER-COLLAPSE: collapse; - BORDER-LEFT: #ffffff 0px solid; - BORDER-RIGHT: #ffffff 0px solid; - BORDER-TOP: #ffffff 0px solid; - FONT-SIZE: 70%; - MARGIN-LEFT: 10px -} -.issuetable -{ - BACKGROUND-COLOR: #ffffe8; - BORDER-COLLAPSE: collapse; - COLOR: #000000; - FONT-SIZE: 100%; - MARGIN-BOTTOM: 10px; - MARGIN-LEFT: 13px; - MARGIN-TOP: 0px -} -.issuetitle -{ - BACKGROUND-COLOR: #ffffff; - BORDER-BOTTOM: #dcdcdc 1px solid; - BORDER-TOP: #dcdcdc 1px; - COLOR: #003366; - FONT-WEIGHT: normal -} -.header -{ - BACKGROUND-COLOR: #cecf9c; - BORDER-BOTTOM: #ffffff 1px solid; - BORDER-LEFT: #ffffff 1px solid; - BORDER-RIGHT: #ffffff 1px solid; - BORDER-TOP: #ffffff 1px solid; - COLOR: #000000; - FONT-WEIGHT: bold -} -.issuehdr -{ - BACKGROUND-COLOR: #E0EBF5; - BORDER-BOTTOM: #dcdcdc 1px solid; - BORDER-TOP: #dcdcdc 1px solid; - COLOR: #000000; - FONT-WEIGHT: normal -} -.issuenone -{ - BACKGROUND-COLOR: #ffffff; - BORDER-BOTTOM: 0px; - BORDER-LEFT: 0px; - BORDER-RIGHT: 0px; - BORDER-TOP: 0px; - COLOR: #000000; - FONT-WEIGHT: normal -} -.content -{ - BACKGROUND-COLOR: #e7e7ce; - BORDER-BOTTOM: #ffffff 1px solid; - BORDER-LEFT: #ffffff 1px solid; - BORDER-RIGHT: #ffffff 1px solid; - BORDER-TOP: #ffffff 1px solid; - PADDING-LEFT: 3px -} -.issuecontent -{ - BACKGROUND-COLOR: #ffffff; - BORDER-BOTTOM: #dcdcdc 1px solid; - BORDER-TOP: #dcdcdc 1px solid; - PADDING-LEFT: 3px -} -A:link -{ - COLOR: #cc6633; - TEXT-DECORATION: underline -} -A:visited -{ - COLOR: #cc6633; -} -A:active -{ - COLOR: #cc6633; -} -A:hover -{ - COLOR: #cc3300; - TEXT-DECORATION: underline -} -H1 -{ - BACKGROUND-COLOR: #003366; - BORDER-BOTTOM: #336699 6px solid; - COLOR: #ffffff; - FONT-SIZE: 130%; - FONT-WEIGHT: normal; - MARGIN: 0em 0em 0em -20px; - PADDING-BOTTOM: 8px; - PADDING-LEFT: 30px; - PADDING-TOP: 16px -} -H2 -{ - COLOR: #000000; - FONT-SIZE: 80%; - FONT-WEIGHT: bold; - MARGIN-BOTTOM: 3px; - MARGIN-LEFT: 10px; - MARGIN-TOP: 20px; - PADDING-LEFT: 0px -} -H3 -{ - COLOR: #000000; - FONT-SIZE: 80%; - FONT-WEIGHT: bold; - MARGIN-BOTTOM: -5px; - MARGIN-LEFT: 10px; - MARGIN-TOP: 20px -} -H4 -{ - COLOR: #000000; - FONT-SIZE: 70%; - FONT-WEIGHT: bold; - MARGIN-BOTTOM: 0px; - MARGIN-TOP: 15px; - PADDING-BOTTOM: 0px -} -UL -{ - COLOR: #000000; - FONT-SIZE: 70%; - LIST-STYLE: square; - MARGIN-BOTTOM: 0pt; - MARGIN-TOP: 0pt -} -OL -{ - COLOR: #000000; - FONT-SIZE: 70%; - LIST-STYLE: square; - MARGIN-BOTTOM: 0pt; - MARGIN-TOP: 0pt -} -LI -{ - LIST-STYLE: square; - MARGIN-LEFT: 0px -} -.expandable -{ - CURSOR: hand -} -.expanded -{ - color: black -} -.collapsed -{ - DISPLAY: none -} -.foot -{ -BACKGROUND-COLOR: #ffffff; -BORDER-BOTTOM: #cecf9c 1px solid; -BORDER-TOP: #cecf9c 2px solid -} -.settings -{ -MARGIN-LEFT: 25PX; -} -.help -{ -TEXT-ALIGN: right; -margin-right: 10px; -} diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/_UpgradeReport_Files/UpgradeReport.xslt b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/_UpgradeReport_Files/UpgradeReport.xslt deleted file mode 100644 index 83f4304ab60..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/_UpgradeReport_Files/UpgradeReport.xslt +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- Solution: - Project: - - - - - - - -

- - - - - - - - - - - - - - - - - - - - - - - - src - - - - - - - - - - - - -
FilenameStatusErrorsWarnings
- javascript:document.images[''].click()src - - - - Converted - - - - Converted - -
- - files - - - 1 file - - - Converted:
- Not converted -
-
-
- - - - : - - - - - - - - - Conversion Report - <xsl:if test="Properties/Property[@Name='LogNumber']"> - <xsl:value-of select="Properties/Property[@Name='LogNumber']/@Value"/> - </xsl:if> - - - - -

Conversion Report -

- -

- Time of Conversion:
-

- - - - - - - - - - - - - - - - - - - - - - - - -

- - - - - -
- Conversion Settings -

- - -
-
diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/_UpgradeReport_Files/UpgradeReport_Minus.gif b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/_UpgradeReport_Files/UpgradeReport_Minus.gif deleted file mode 100644 index 17751cb2fd5..00000000000 Binary files a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/_UpgradeReport_Files/UpgradeReport_Minus.gif and /dev/null differ diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/_UpgradeReport_Files/UpgradeReport_Plus.gif b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/_UpgradeReport_Files/UpgradeReport_Plus.gif deleted file mode 100644 index f6009ca3f6b..00000000000 Binary files a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewDemo/_UpgradeReport_Files/UpgradeReport_Plus.gif and /dev/null differ diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewTests/NUnit/.gitignore b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewTests/NUnit/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewTests/TriStateTreeViewTests.cs b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewTests/TriStateTreeViewTests.cs deleted file mode 100644 index ee9bb2603bc..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewTests/TriStateTreeViewTests.cs +++ /dev/null @@ -1,258 +0,0 @@ -// --------------------------------------------------------------------------------------------- -#region // Copyright (c) 2004-2005, SIL International. All Rights Reserved. -// -// Copyright (c) 2004-2005, SIL International. All Rights Reserved. -// -// Distributable under the terms of either the Common Public License or the -// GNU Lesser General Public License, as specified in the LICENSING.txt file. -// -#endregion -// -// File: TriStateTreeViewTests.cs -// Responsibility: TE Team -// -// -// -// --------------------------------------------------------------------------------------------- -using System; -using System.Windows.Forms; -using NUnit.Framework; - -namespace SIL.FieldWorks.Common.Controls -{ - #region DummyTriStateTreeView - /// ---------------------------------------------------------------------------------------- - /// - /// - /// - /// ---------------------------------------------------------------------------------------- - public class DummyTriStateTreeView: TriStateTreeView - { - /// ------------------------------------------------------------------------------------ - /// - /// Exposes ChangeNodeState for testing - /// - /// - /// ------------------------------------------------------------------------------------ - public void CallChangeNodeState(TreeNode node) - { - ChangeNodeState(node); - } - } - #endregion - - /// ---------------------------------------------------------------------------------------- - /// - /// Tests for TriStateTreeView control. - /// - /// ---------------------------------------------------------------------------------------- - [TestFixture] - public class TriStateTreeViewTests - { - private DummyTriStateTreeView m_treeView; - private TreeNode m_aNode; - private TreeNode m_bNode; - private TreeNode m_c1Node; - private TreeNode m_c2Node; - private TreeNode m_dNode; - private bool m_fBeforeCheck; - private bool m_fCancelInBeforeCheck; - private bool m_fAfterCheck; - - /// ------------------------------------------------------------------------------------ - /// - /// Initialize a test - /// - /// ------------------------------------------------------------------------------------ - [SetUp] - public void Init() - { - m_fBeforeCheck = false; - m_fAfterCheck = false; - m_fCancelInBeforeCheck = false; - m_treeView = new DummyTriStateTreeView(); - - m_dNode = new TreeNode("d"); - m_c1Node = new TreeNode("c1", new TreeNode[] { m_dNode }); - m_c2Node = new TreeNode("c2"); - m_bNode = new TreeNode("b", new TreeNode[] { m_c1Node, m_c2Node}); - m_aNode = new TreeNode("a", new TreeNode[] { m_bNode }); - m_treeView.Nodes.Add(m_aNode); - } - - /// ------------------------------------------------------------------------------------ - /// - /// Tests that all nodes in the tree view are initially unchecked - /// - /// ------------------------------------------------------------------------------------ - [Test] - public void InitiallyUnchecked() - { - Assert.AreEqual(TriStateTreeView.CheckState.Unchecked, m_treeView.GetChecked(m_aNode)); - Assert.AreEqual(TriStateTreeView.CheckState.Unchecked, m_treeView.GetChecked(m_bNode)); - Assert.AreEqual(TriStateTreeView.CheckState.Unchecked, m_treeView.GetChecked(m_c1Node)); - Assert.AreEqual(TriStateTreeView.CheckState.Unchecked, m_treeView.GetChecked(m_c2Node)); - Assert.AreEqual(TriStateTreeView.CheckState.Unchecked, m_treeView.GetChecked(m_dNode)); - } - - /// ------------------------------------------------------------------------------------ - /// - /// Tests that changing a node changes all children - /// - /// ------------------------------------------------------------------------------------ - [Test] - public void ChangeNodeChangesAllChildren_Check() - { - // Check a node -> should check all children - m_treeView.SetChecked(m_bNode, TriStateTreeView.CheckState.Checked); - - Assert.AreEqual(TriStateTreeView.CheckState.Checked, m_treeView.GetChecked(m_bNode)); - Assert.AreEqual(TriStateTreeView.CheckState.Checked, m_treeView.GetChecked(m_c1Node)); - Assert.AreEqual(TriStateTreeView.CheckState.Checked, m_treeView.GetChecked(m_c2Node)); - Assert.AreEqual(TriStateTreeView.CheckState.Checked, m_treeView.GetChecked(m_dNode)); - } - - /// ------------------------------------------------------------------------------------ - /// - /// Tests that changing a node changes all children - /// - /// ------------------------------------------------------------------------------------ - [Test] - public void ChangeNodeChangesAllChildren_Uncheck() - { - // uncheck a node -> should uncheck all children - m_treeView.SetChecked(m_bNode, TriStateTreeView.CheckState.Unchecked); - - Assert.AreEqual(TriStateTreeView.CheckState.Unchecked, m_treeView.GetChecked(m_bNode)); - Assert.AreEqual(TriStateTreeView.CheckState.Unchecked, m_treeView.GetChecked(m_c1Node)); - Assert.AreEqual(TriStateTreeView.CheckState.Unchecked, m_treeView.GetChecked(m_c2Node)); - Assert.AreEqual(TriStateTreeView.CheckState.Unchecked, m_treeView.GetChecked(m_dNode)); - } - - /// ------------------------------------------------------------------------------------ - /// - /// Tests that parent get greyed out if children are not all in same state - /// - /// ------------------------------------------------------------------------------------ - [Test] - public void ChangeParent_CheckOneChild() - { - // check child -> grey check all parents - m_treeView.SetChecked(m_c2Node, TriStateTreeView.CheckState.Checked); - - Assert.AreEqual(TriStateTreeView.CheckState.GreyChecked, m_treeView.GetChecked(m_aNode)); - Assert.AreEqual(TriStateTreeView.CheckState.GreyChecked, m_treeView.GetChecked(m_bNode)); - Assert.AreEqual(TriStateTreeView.CheckState.Unchecked, m_treeView.GetChecked(m_c1Node)); - Assert.AreEqual(TriStateTreeView.CheckState.Checked, m_treeView.GetChecked(m_c2Node)); - } - - /// ------------------------------------------------------------------------------------ - /// - /// Tests that parent get greyed out if children are not all in same state - /// - /// ------------------------------------------------------------------------------------ - [Test] - public void ChangeParent_CheckAllChildren() - { - // check second child -> check all parents - m_treeView.SetChecked(m_c2Node, TriStateTreeView.CheckState.Checked); - m_treeView.SetChecked(m_c1Node, TriStateTreeView.CheckState.Checked); - - Assert.AreEqual(TriStateTreeView.CheckState.Checked, m_treeView.GetChecked(m_aNode)); - Assert.AreEqual(TriStateTreeView.CheckState.Checked, m_treeView.GetChecked(m_bNode)); - Assert.AreEqual(TriStateTreeView.CheckState.Checked, m_treeView.GetChecked(m_c1Node)); - Assert.AreEqual(TriStateTreeView.CheckState.Checked, m_treeView.GetChecked(m_c2Node)); - } - - /// ------------------------------------------------------------------------------------ - /// - /// Tests that the BeforeCheck event is raised - /// - /// ------------------------------------------------------------------------------------ - [Test] - public void BeforeCheckCalled() - { - m_treeView.BeforeCheck += new TreeViewCancelEventHandler(OnBeforeCheck); - - m_treeView.SetChecked(m_c1Node, TriStateTreeView.CheckState.Checked); - - Assert.IsTrue(m_fBeforeCheck); - Assert.AreEqual(TriStateTreeView.CheckState.Checked, m_treeView.GetChecked(m_c1Node)); - } - - /// ------------------------------------------------------------------------------------ - /// - /// Tests that the BeforeCheck event is raised if first node is changed - /// - /// ------------------------------------------------------------------------------------ - [Test] - public void BeforeCheckCalled_FirstNode() - { - m_treeView.BeforeCheck += new TreeViewCancelEventHandler(OnBeforeCheck); - - m_treeView.CallChangeNodeState(m_aNode); - - Assert.IsTrue(m_fBeforeCheck); - Assert.AreEqual(TriStateTreeView.CheckState.Checked, m_treeView.GetChecked(m_aNode)); - } - - /// ------------------------------------------------------------------------------------ - /// - /// Tests that the AfterCheck event is raised - /// - /// ------------------------------------------------------------------------------------ - [Test] - public void AfterCheckCalled() - { - m_treeView.AfterCheck += new TreeViewEventHandler(OnAfterCheck); - - m_treeView.SetChecked(m_c1Node, TriStateTreeView.CheckState.Checked); - - Assert.IsTrue(m_fAfterCheck); - Assert.AreEqual(TriStateTreeView.CheckState.Checked, m_treeView.GetChecked(m_c1Node)); - } - - /// ------------------------------------------------------------------------------------ - /// - /// When the cancel flag in BeforeCheck returns true we don't want to change the - /// state of the node. - /// - /// ------------------------------------------------------------------------------------ - [Test] - public void StateNotChangedIfBeforeCheckCancels() - { - m_treeView.BeforeCheck += new TreeViewCancelEventHandler(OnBeforeCheck); - m_treeView.AfterCheck += new TreeViewEventHandler(OnAfterCheck); - m_fCancelInBeforeCheck = true; - - m_treeView.SetChecked(m_c1Node, TriStateTreeView.CheckState.Checked); - - Assert.IsTrue(m_fBeforeCheck); - Assert.IsFalse(m_fAfterCheck); - Assert.AreEqual(TriStateTreeView.CheckState.Unchecked, m_treeView.GetChecked(m_c1Node)); - } - - #region Helper methods - /// ------------------------------------------------------------------------------------ - /// - /// - /// - /// ------------------------------------------------------------------------------------ - private void OnBeforeCheck(object sender, TreeViewCancelEventArgs e) - { - e.Cancel = m_fCancelInBeforeCheck; - m_fBeforeCheck = true; - } - - /// ------------------------------------------------------------------------------------ - /// - /// - /// - /// ------------------------------------------------------------------------------------ - private void OnAfterCheck(object sender, TreeViewEventArgs e) - { - m_fAfterCheck = true; - } - #endregion - } -} diff --git a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewTests/TriStateTreeViewTests.csproj b/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewTests/TriStateTreeViewTests.csproj deleted file mode 100644 index 77e5081d520..00000000000 --- a/reactos/tools/sysgen/TriStateTreeView/TriStateTreeViewTests/TriStateTreeViewTests.csproj +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/reactos/tools/sysgen/style.css b/reactos/tools/sysgen/style.css deleted file mode 100644 index 1bae53d2185..00000000000 --- a/reactos/tools/sysgen/style.css +++ /dev/null @@ -1,105 +0,0 @@ -body -{ - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 12px; - background: white; - color: black; -} - -div.header -{ - border: 1px dashed #333; - background-color: #FFFBCB; - padding: 10px; -} - -div.footer -{ - border: 1px dashed #333; - background-color: #FFFBCB; - padding: 5px; -} - -h1, h2, h3, h4, h5, h6 { - font: 22px Verdana, Arial, Helvetica, sans-serif; -} - -td a { - font: 10px Verdana, Arial, Helvetica, sans-serif; -} - -td p { - font: 12px Verdana, Arial, Helvetica, sans-serif; - text-align: left; - border-right: 1px solid #FFF798; - border-bottom: 1px solid #FFF798; - padding: 6px; - background: #FFFBCB; -} - -.table td { - font: 10px Verdana, Arial, Helvetica, sans-serif; - text-align: left; - border-right: 1px solid #FFF798; - border-bottom: 1px solid #FFF798; - padding: 6px; - background: #FFFBCB; - vertical-align: top; -} - -.table td.Red { - font: 10px Verdana, Arial, Helvetica, sans-serif; - text-align: left; - border-right: 1px solid #FFF798; - border-bottom: 1px solid #FFF798; - padding: 6px; - background: #FF9999; -} - -.table td.Green { - font: 10px Verdana, Arial, Helvetica, sans-serif; - text-align: left; - border-right: 1px solid #FFF798; - border-bottom: 1px solid #FFF798; - padding: 6px; - background: #CCFF66; -} - -.table th { - font: 10px Verdana, Arial, Helvetica, sans-serif; - text-align: left; - padding: 6px; - background: black; - color : white; -} - -/* Status colors */ -.hdr { background-color: #000000; color: #ffffff; } -.pct0 { background-color: #ff5050; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.pct5 { background-color: #ff5d4f; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.pct10 { background-color: #ff694e; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.pct15 { background-color: #ff764d; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.pct20 { background-color: #ff824b; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.pct25 { background-color: #ff8f4a; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.pct30 { background-color: #ff9b49; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.pct35 { background-color: #ffa848; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.pct40 { background-color: #ffb447; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.pct45 { background-color: #ffc146; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.pct50 { background-color: #ffcd45; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.pct55 { background-color: #ffda43; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.pct60 { background-color: #ffe642; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.pct65 { background-color: #fff341; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.pct70 { background-color: #ffff40; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.pct75 { background-color: #dcff48; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.pct80 { background-color: #c8ff50; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.pct85 { background-color: #b4ff58; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.pct90 { background-color: #a0ff60; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.pct95 { background-color: #8cff60; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.pct100 { background-color: #60ff60; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.nonexistent { background-color: #ff5050; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.poor { background-color: #ff8f4a; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.outdated { background-color: #ffcd45; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.outdadeq { background-color: #ffff40; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.adequate { background-color: #dcff48; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.adeqgood { background-color: #c0ff54; font: 10px Verdana, Arial, Helvetica, sans-serif;} -.good { background-color: #60ff60; font: 10px Verdana, Arial, Helvetica, sans-serif;} \ No newline at end of file diff --git a/reactos/tools/tools.mak b/reactos/tools/tools.mak deleted file mode 100644 index d2d846c749c..00000000000 --- a/reactos/tools/tools.mak +++ /dev/null @@ -1,54 +0,0 @@ -TOOLS_BASE = tools -TOOLS_BASE_ = $(TOOLS_BASE)$(SEP) -TOOLS_INT = $(INTERMEDIATE_)$(TOOLS_BASE) -TOOLS_INT_ = $(TOOLS_INT)$(SEP) -TOOLS_OUT = $(OUTPUT_)$(TOOLS_BASE) -TOOLS_OUT_ = $(TOOLS_OUT)$(SEP) - -TOOLS_CFLAGS = -Wall -Wpointer-arith -Wno-strict-aliasing -D__REACTOS__ $(HOST_CFLAGS) -TOOLS_CPPFLAGS = -Wall -Wpointer-arith -D__REACTOS__ $(HOST_CPPFLAGS) -TOOLS_LFLAGS = $(HOST_LFLAGS) - -$(TOOLS_INT): | $(INTERMEDIATE) - $(ECHO_MKDIR) - ${mkdir} $@ - -ifneq ($(INTERMEDIATE),$(OUTPUT)) -$(TOOLS_OUT): | $(OUTPUT) - $(ECHO_MKDIR) - ${mkdir} $@ -endif - -XML_SSPRINTF_SOURCES = $(addprefix $(TOOLS_BASE_), \ - ssprintf.cpp \ - xml.cpp \ - ) - -XML_SSPRINTF_HEADERS = $(addprefix $(TOOLS_BASE_), \ - ssprintf.h \ - xml.h \ - ) - -XML_SSPRINTF_OBJECTS = \ - $(addprefix $(INTERMEDIATE_), $(XML_SSPRINTF_SOURCES:.cpp=.o)) - -$(TOOLS_INT_)ssprintf.o: $(TOOLS_BASE_)ssprintf.cpp $(XML_SSPRINTF_HEADERS) | $(TOOLS_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(TOOLS_CPPFLAGS) -c $< -o $@ - -$(TOOLS_INT_)xml.o: $(TOOLS_BASE_)xml.cpp $(XML_SSPRINTF_HEADERS) | $(TOOLS_INT) - $(ECHO_HOSTCC) - ${host_gpp} $(TOOLS_CPPFLAGS) -c $< -o $@ - -include tools/bin2c.mak -include tools/buildno/buildno.mak -include tools/gendib/gendib.mak -include tools/log2lines/log2lines.mak -include tools/pipetools/pipetools.mak -ifeq ($(ARCH),powerpc) -include tools/ofw_interface/ofw_interface.mak -endif -include tools/pefixup.mak -include tools/rsym/raddr2line.mak -include tools/rbuild/rbuild.mak -include tools/rsym/rsym.mak diff --git a/reactos/tools/tools.rbuild b/reactos/tools/tools.rbuild deleted file mode 100644 index 324db18f2d0..00000000000 --- a/reactos/tools/tools.rbuild +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/reactos/tools/unicode/CMakeLists.txt b/reactos/tools/unicode/CMakeLists.txt deleted file mode 100644 index 39868c1e786..00000000000 --- a/reactos/tools/unicode/CMakeLists.txt +++ /dev/null @@ -1,73 +0,0 @@ -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/reactos/tools/unicode/c_037.c b/reactos/tools/unicode/c_037.c deleted file mode 100644 index 949f8e4598a..00000000000 --- a/reactos/tools/unicode/c_037.c +++ /dev/null @@ -1,717 +0,0 @@ -/* code page 037 (IBM EBCDIC US Canada) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/EBCDIC/CP037.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x009c, 0x0009, 0x0086, 0x007f, - 0x0097, 0x008d, 0x008e, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x009d, 0x0085, 0x0008, 0x0087, - 0x0018, 0x0019, 0x0092, 0x008f, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x000a, 0x0017, 0x001b, - 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x0005, 0x0006, 0x0007, - 0x0090, 0x0091, 0x0016, 0x0093, 0x0094, 0x0095, 0x0096, 0x0004, - 0x0098, 0x0099, 0x009a, 0x009b, 0x0014, 0x0015, 0x009e, 0x001a, - 0x0020, 0x00a0, 0x00e2, 0x00e4, 0x00e0, 0x00e1, 0x00e3, 0x00e5, - 0x00e7, 0x00f1, 0x00a2, 0x002e, 0x003c, 0x0028, 0x002b, 0x007c, - 0x0026, 0x00e9, 0x00ea, 0x00eb, 0x00e8, 0x00ed, 0x00ee, 0x00ef, - 0x00ec, 0x00df, 0x0021, 0x0024, 0x002a, 0x0029, 0x003b, 0x00ac, - 0x002d, 0x002f, 0x00c2, 0x00c4, 0x00c0, 0x00c1, 0x00c3, 0x00c5, - 0x00c7, 0x00d1, 0x00a6, 0x002c, 0x0025, 0x005f, 0x003e, 0x003f, - 0x00f8, 0x00c9, 0x00ca, 0x00cb, 0x00c8, 0x00cd, 0x00ce, 0x00cf, - 0x00cc, 0x0060, 0x003a, 0x0023, 0x0040, 0x0027, 0x003d, 0x0022, - 0x00d8, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x00ab, 0x00bb, 0x00f0, 0x00fd, 0x00fe, 0x00b1, - 0x00b0, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, 0x0070, - 0x0071, 0x0072, 0x00aa, 0x00ba, 0x00e6, 0x00b8, 0x00c6, 0x00a4, - 0x00b5, 0x007e, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, - 0x0079, 0x007a, 0x00a1, 0x00bf, 0x00d0, 0x00dd, 0x00de, 0x00ae, - 0x005e, 0x00a3, 0x00a5, 0x00b7, 0x00a9, 0x00a7, 0x00b6, 0x00bc, - 0x00bd, 0x00be, 0x005b, 0x005d, 0x00af, 0x00a8, 0x00b4, 0x00d7, - 0x007b, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x00ad, 0x00f4, 0x00f6, 0x00f2, 0x00f3, 0x00f5, - 0x007d, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, 0x0050, - 0x0051, 0x0052, 0x00b9, 0x00fb, 0x00fc, 0x00f9, 0x00fa, 0x00ff, - 0x005c, 0x00f7, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, - 0x0059, 0x005a, 0x00b2, 0x00d4, 0x00d6, 0x00d2, 0x00d3, 0x00d5, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x00b3, 0x00db, 0x00dc, 0x00d9, 0x00da, 0x009f -}; - -static const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 0x00, 0x01, 0x02, 0x03, 0x37, 0x2d, 0x2e, 0x2f, - 0x16, 0x05, 0x25, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13, 0x3c, 0x3d, 0x32, 0x26, - 0x18, 0x19, 0x3f, 0x27, 0x1c, 0x1d, 0x1e, 0x1f, - 0x40, 0x5a, 0x7f, 0x7b, 0x5b, 0x6c, 0x50, 0x7d, - 0x4d, 0x5d, 0x5c, 0x4e, 0x6b, 0x60, 0x4b, 0x61, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0x7a, 0x5e, 0x4c, 0x7e, 0x6e, 0x6f, - 0x7c, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, - 0xd7, 0xd8, 0xd9, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, - 0xe7, 0xe8, 0xe9, 0xba, 0xe0, 0xbb, 0xb0, 0x6d, - 0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, - 0x97, 0x98, 0x99, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, - 0xa7, 0xa8, 0xa9, 0xc0, 0x4f, 0xd0, 0xa1, 0x07, - 0x20, 0x21, 0x22, 0x23, 0x24, 0x15, 0x06, 0x17, - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x09, 0x0a, 0x1b, - 0x30, 0x31, 0x1a, 0x33, 0x34, 0x35, 0x36, 0x08, - 0x38, 0x39, 0x3a, 0x3b, 0x04, 0x14, 0x3e, 0xff, - 0x41, 0xaa, 0x4a, 0xb1, 0x9f, 0xb2, 0x6a, 0xb5, - 0xbd, 0xb4, 0x9a, 0x8a, 0x5f, 0xca, 0xaf, 0xbc, - 0x90, 0x8f, 0xea, 0xfa, 0xbe, 0xa0, 0xb6, 0xb3, - 0x9d, 0xda, 0x9b, 0x8b, 0xb7, 0xb8, 0xb9, 0xab, - 0x64, 0x65, 0x62, 0x66, 0x63, 0x67, 0x9e, 0x68, - 0x74, 0x71, 0x72, 0x73, 0x78, 0x75, 0x76, 0x77, - 0xac, 0x69, 0xed, 0xee, 0xeb, 0xef, 0xec, 0xbf, - 0x80, 0xfd, 0xfe, 0xfb, 0xfc, 0xad, 0xae, 0x59, - 0x44, 0x45, 0x42, 0x46, 0x43, 0x47, 0x9c, 0x48, - 0x54, 0x51, 0x52, 0x53, 0x58, 0x55, 0x56, 0x57, - 0x8c, 0x49, 0xcd, 0xce, 0xcb, 0xcf, 0xcc, 0xe1, - 0x70, 0xdd, 0xde, 0xdb, 0xdc, 0x8d, 0x8e, 0xdf, - /* 0x0100 .. 0x01ff */ - 0xc1, 0x81, 0xc1, 0x81, 0xc1, 0x81, 0xc3, 0x83, - 0xc3, 0x83, 0xc3, 0x83, 0xc3, 0x83, 0xc4, 0x84, - 0xac, 0x84, 0xc5, 0x85, 0xc5, 0x85, 0xc5, 0x85, - 0xc5, 0x85, 0xc5, 0x85, 0xc7, 0x87, 0xc7, 0x87, - 0xc7, 0x87, 0xc7, 0x87, 0xc8, 0x88, 0xc8, 0x88, - 0xc9, 0x89, 0xc9, 0x89, 0xc9, 0x89, 0xc9, 0x89, - 0xc9, 0x89, 0x3f, 0x3f, 0xd1, 0x91, 0xd2, 0x92, - 0x3f, 0xd3, 0x93, 0xd3, 0x93, 0xd3, 0x93, 0x3f, - 0x3f, 0xd3, 0x93, 0xd5, 0x95, 0xd5, 0x95, 0xd5, - 0x95, 0x3f, 0x3f, 0x3f, 0xd6, 0x96, 0xd6, 0x96, - 0xd6, 0x96, 0xd6, 0x96, 0xd9, 0x99, 0xd9, 0x99, - 0xd9, 0x99, 0xe2, 0xa2, 0xe2, 0xa2, 0xe2, 0xa2, - 0xe2, 0xa2, 0xe3, 0xa3, 0xe3, 0xa3, 0xe3, 0xa3, - 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, - 0xe4, 0xa4, 0xe4, 0xa4, 0xe6, 0xa6, 0xe8, 0xa8, - 0xe8, 0xe9, 0xa9, 0xe9, 0xa9, 0xe9, 0xa9, 0xa2, - 0x82, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xac, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc5, 0xc6, 0x86, 0x3f, 0x3f, 0x3f, 0x3f, 0xc9, - 0x3f, 0x3f, 0x93, 0x3f, 0x3f, 0x3f, 0x3f, 0xd6, - 0xd6, 0x96, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0xe3, 0xe4, - 0xa4, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xa9, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xc1, 0x81, 0xc9, - 0x89, 0xd6, 0x96, 0xe4, 0xa4, 0xfc, 0xdc, 0xfc, - 0xdc, 0xfc, 0xdc, 0xfc, 0xdc, 0x3f, 0x63, 0x43, - 0xc1, 0x81, 0x9e, 0x9c, 0xc7, 0x87, 0xc7, 0x87, - 0xd2, 0x92, 0xd6, 0x96, 0xd6, 0x96, 0x3f, 0x3f, - 0x91, 0x3f, 0x3f, 0x3f, 0xc7, 0x87, 0x3f, 0x3f, - 0xd5, 0x95, 0x67, 0x47, 0x9e, 0x9c, 0x80, 0x70, - /* 0x0200 .. 0x02ff */ - 0xc1, 0x81, 0xc1, 0x81, 0xc5, 0x85, 0xc5, 0x85, - 0xc9, 0x89, 0xc9, 0x89, 0xd6, 0x96, 0xd6, 0x96, - 0xd9, 0x99, 0xd9, 0x99, 0xe4, 0xa4, 0xe4, 0xa4, - 0xe2, 0xa2, 0xe3, 0xa3, 0x3f, 0x3f, 0xc8, 0x88, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xc1, 0x81, - 0xc5, 0x85, 0xec, 0xcc, 0xef, 0xcf, 0xd6, 0x96, - 0xd6, 0x96, 0xe8, 0xa8, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x87, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x88, 0x3f, 0x91, 0x99, 0x3f, 0x3f, 0x3f, 0xa6, - 0xa8, 0xbe, 0x7f, 0x79, 0x7d, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb0, 0x3f, 0xb0, 0xa5, - 0x7d, 0xbc, 0xbe, 0x79, 0x3f, 0x6d, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x90, 0x3f, 0xa1, 0x7f, 0x3f, 0x3f, - 0x3f, 0x93, 0xa2, 0xa7, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x79, 0xbe, 0xb0, 0xa1, 0xbc, 0xbc, 0x3f, 0x3f, - 0xbd, 0x3f, 0x90, 0x7f, 0xa5, 0x3f, 0x7f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x9d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6d, 0x6d, 0x6d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x79, 0xbe, 0x3f, 0x3f, 0xbd, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xbe, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xbe, 0xbd, 0xc1, 0xb3, - 0xc5, 0xc8, 0xc9, 0x3f, 0xd6, 0x3f, 0xe8, 0x3f, - 0x3f, 0xc1, 0xc2, 0x3f, 0x3f, 0xc5, 0xe9, 0xc8, - 0x3f, 0xc9, 0xd2, 0x3f, 0xd4, 0xd5, 0x3f, 0xd6, - 0x3f, 0xd7, 0x3f, 0x3f, 0xe3, 0xe8, 0x3f, 0xe7, - 0x3f, 0x3f, 0xc9, 0xe8, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xa0, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x3f, 0xe8, 0xe8, 0xe8, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xc1, 0x9e, 0xc2, 0x3f, - 0xc4, 0xc5, 0x3f, 0xc7, 0xc8, 0xc9, 0xd1, 0xd2, - 0xd3, 0xd4, 0xd5, 0x3f, 0xd6, 0x3f, 0xd7, 0xd9, - 0xe3, 0xe4, 0xe6, 0x81, 0x3f, 0x3f, 0x3f, 0x82, - 0x84, 0x85, 0x3f, 0x3f, 0x3f, 0x87, 0x3f, 0x92, - 0x94, 0x3f, 0x96, 0x3f, 0x3f, 0x3f, 0x97, 0xa3, - 0xa4, 0x3f, 0x3f, 0xa5, 0x3f, 0x59, 0x3f, 0x3f, - 0x3f, 0x3f, 0x89, 0x99, 0xa4, 0xa5, 0x59, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x83, 0x3f, 0x8c, 0x3f, - 0x86, 0x3f, 0x87, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xa9, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0xc1, 0x81, 0xc2, 0x82, 0xc2, 0x82, 0xc2, 0x82, - 0x68, 0x48, 0xc4, 0x84, 0xc4, 0x84, 0xc4, 0x84, - 0xc4, 0x84, 0xc4, 0x84, 0xc5, 0x85, 0xc5, 0x85, - 0xc5, 0x85, 0xc5, 0x85, 0xc5, 0x85, 0xc6, 0x86, - 0xc7, 0x87, 0xc8, 0x88, 0xc8, 0x88, 0xc8, 0x88, - 0xc8, 0x88, 0xc8, 0x88, 0xc9, 0x89, 0x77, 0x57, - 0xd2, 0x92, 0xd2, 0x92, 0xd2, 0x92, 0xd3, 0x93, - 0xd3, 0x93, 0xd3, 0x93, 0xd3, 0x93, 0xd4, 0x94, - 0xd4, 0x94, 0xd4, 0x94, 0xd5, 0x95, 0xd5, 0x95, - 0xd5, 0x95, 0xd5, 0x95, 0xef, 0xcf, 0xef, 0xcf, - 0xd6, 0x96, 0xd6, 0x96, 0xd7, 0x97, 0xd7, 0x97, - 0xd9, 0x99, 0xd9, 0x99, 0xd9, 0x99, 0xd9, 0x99, - 0xe2, 0xa2, 0xe2, 0xa2, 0xe2, 0xa2, 0xe2, 0xa2, - 0xe2, 0xa2, 0xe3, 0xa3, 0xe3, 0xa3, 0xe3, 0xa3, - 0xe3, 0xa3, 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, - 0xe4, 0xa4, 0xe4, 0xa4, 0xe5, 0xa5, 0xe5, 0xa5, - 0xe6, 0xa6, 0xe6, 0xa6, 0xe6, 0xa6, 0xe6, 0xa6, - 0xe6, 0xa6, 0xe7, 0xa7, 0xe7, 0xa7, 0xe8, 0xa8, - 0xe9, 0xa9, 0xe9, 0xa9, 0xe9, 0xa9, 0x88, 0xa3, - 0xa6, 0xa8, 0x3f, 0xa2, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc1, 0x81, 0xc1, 0x81, 0x62, 0x42, 0x62, 0x42, - 0x62, 0x42, 0x62, 0x42, 0xc1, 0x81, 0xc1, 0x81, - 0xc1, 0x81, 0xc1, 0x81, 0xc1, 0x81, 0xc1, 0x81, - 0xc5, 0x85, 0xc5, 0x85, 0xc5, 0x85, 0x72, 0x52, - 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0xc5, 0x85, - 0xc9, 0x89, 0xc9, 0x89, 0xd6, 0x96, 0xd6, 0x96, - 0xeb, 0xcb, 0xeb, 0xcb, 0xeb, 0xcb, 0xeb, 0xcb, - 0xd6, 0x96, 0xd6, 0x96, 0xd6, 0x96, 0xd6, 0x96, - 0xd6, 0x96, 0xd6, 0x96, 0xe4, 0xa4, 0xe4, 0xa4, - 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, - 0xe4, 0xa4, 0xe8, 0xa8, 0xe8, 0xa8, 0xe8, 0xa8, - 0xe8, 0xa8, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc9, 0xc9, 0xc9, 0xc9, 0xc9, 0xc9, 0xc9, 0xc9, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xe8, 0x3f, 0xe8, 0x3f, 0xe8, 0x3f, 0xe8, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0x3f, 0x3f, 0x3f, - 0x3f, 0xbd, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc5, 0xc5, 0xc8, 0xc8, 0xc8, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc9, 0xc9, 0xc9, 0xc9, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe8, 0xe8, 0xe8, 0xe8, 0xd7, 0xbd, 0xbd, 0x79, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xd6, 0xd6, 0x3f, 0x3f, 0x3f, 0xbe, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, - 0x40, 0x40, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x60, 0x3f, 0x60, 0x60, 0x60, 0x3f, 0x6d, - 0x79, 0x7d, 0x6b, 0x79, 0x7f, 0x7f, 0x6b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x4b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x40, - 0x3f, 0x3f, 0xbe, 0x7f, 0x3f, 0x79, 0x3f, 0x3f, - 0x3f, 0x4c, 0x6e, 0x3f, 0x5a, 0x3f, 0xbc, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x61, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x40, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x90, 0x89, 0x3f, 0x3f, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0x4e, 0x60, 0x7e, 0x4d, 0x5d, 0x95, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0x4e, 0x60, 0x7e, 0x4d, 0x5d, 0x3f, - 0x81, 0x85, 0x96, 0xa7, 0x3f, 0x88, 0x92, 0x93, - 0x94, 0x95, 0x97, 0xa2, 0xa3, 0x3f, 0x3f, 0x3f, - 0x3f, 0x4a, 0x3f, 0x3f, 0xb1, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0xc3, 0x3f, 0x3f, 0x3f, 0x3f, 0xc5, - 0x3f, 0x3f, 0x87, 0xc8, 0xc8, 0xc8, 0x88, 0x88, - 0xc9, 0xc9, 0xd3, 0x93, 0x3f, 0xd5, 0x3f, 0x3f, - 0xd7, 0xd7, 0xd8, 0xd9, 0xd9, 0xd9, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xe9, 0x3f, 0x3f, 0x3f, - 0xe9, 0x3f, 0xd2, 0x67, 0xc2, 0xc3, 0x85, 0x85, - 0xc5, 0xc6, 0x3f, 0xd4, 0x96, 0x3f, 0x3f, 0x3f, - 0x3f, 0x89, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xc4, 0x84, 0x85, - 0x89, 0x91, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc9, 0x3f, 0x3f, 0x3f, 0xe5, 0x3f, 0x3f, 0x3f, - 0x3f, 0xe7, 0x3f, 0x3f, 0xd3, 0xc3, 0xc4, 0xd4, - 0x89, 0x3f, 0x3f, 0x3f, 0xa5, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa7, 0x3f, 0x3f, 0x93, 0x83, 0x84, 0x94, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4c, 0xb0, 0x6e, 0xa5, 0x60, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x4c, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x60, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x80, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x60, 0x8f, 0x3f, 0x61, 0xe0, 0x5c, - 0x90, 0x3f, 0xe5, 0x3f, 0x3f, 0x3f, 0x3f, 0xd3, - 0x3f, 0x3f, 0x3f, 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x95, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xa1, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa1, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa1, 0xa1, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x8a, 0x8b, 0x3f, 0x3f, 0x4c, 0x6e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb3, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0xb0, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x4c, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, - 0xf9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xc1, 0xc2, - 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xd1, - 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, - 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, - 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, - 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, - 0x98, 0x99, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xf0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x60, 0x60, 0x4f, 0x4f, 0x60, 0x60, 0x6a, 0x6a, - 0x60, 0x60, 0x6a, 0x6a, 0x4e, 0x4e, 0x4e, 0x4e, - 0x5f, 0x5f, 0x5f, 0x5f, 0xd3, 0xd3, 0xd3, 0xd3, - 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0xe3, 0xe3, 0xe3, 0xe3, - 0xe3, 0xe3, 0xe3, 0xe3, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0x60, 0x60, 0x6a, 0x6a, - 0x7e, 0x4f, 0x4e, 0x4e, 0x4e, 0x5f, 0x5f, 0x5f, - 0xd3, 0xd3, 0xd3, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0xe3, 0xe3, 0xe3, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x61, 0xe0, 0xe7, 0x60, 0x4f, 0x60, 0x4f, - 0x60, 0x4f, 0x60, 0x4f, 0x60, 0x4f, 0x60, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xd6, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xd6, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x91, 0xe5, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x40, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4c, 0x6e, 0x8a, 0x8b, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xba, 0xbb, 0x3f, 0x7f, 0x7f, 0x6b, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x4e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xbc, 0xbc, 0xbc, 0xbc, 0x6d, 0x6d, 0x6d, - 0x6b, 0x3f, 0x4b, 0x3f, 0x5e, 0x7a, 0x6f, 0x5a, - 0x60, 0x4d, 0x5d, 0xc0, 0xd0, 0x3f, 0x3f, 0x7b, - 0x50, 0x5c, 0x4e, 0x60, 0x4c, 0x6e, 0x7e, 0x3f, - 0xe0, 0x5b, 0x6c, 0x7c, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 0x5a, 0x7f, 0x7b, 0x5b, 0x6c, 0x50, 0x7d, - 0x4d, 0x5d, 0x5c, 0x4e, 0x6b, 0x60, 0x4b, 0x61, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0x7a, 0x5e, 0x4c, 0x7e, 0x6e, 0x6f, - 0x7c, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, - 0xd7, 0xd8, 0xd9, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, - 0xe7, 0xe8, 0xe9, 0xba, 0xe0, 0xbb, 0xb0, 0x6d, - 0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, - 0x97, 0x98, 0x99, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, - 0xa7, 0xa8, 0xa9, 0xc0, 0x4f, 0xd0, 0xa1, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4a, 0xb1, 0x5f, 0xbc, 0x6a, 0xb2, 0x3f, 0x3f, - 0x4f, 0x4c, 0xb0, 0x6e, 0xa5, 0x3f, 0xd6, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_037 = -{ - { 37, 1, 0x003f, 0x003f, "IBM EBCDIC US Canada" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_10000.c b/reactos/tools/unicode/c_10000.c deleted file mode 100644 index c399c724459..00000000000 --- a/reactos/tools/unicode/c_10000.c +++ /dev/null @@ -1,717 +0,0 @@ -/* code page 10000 (Mac Roman) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/MAC/ROMAN.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x00c4, 0x00c5, 0x00c7, 0x00c9, 0x00d1, 0x00d6, 0x00dc, 0x00e1, - 0x00e0, 0x00e2, 0x00e4, 0x00e3, 0x00e5, 0x00e7, 0x00e9, 0x00e8, - 0x00ea, 0x00eb, 0x00ed, 0x00ec, 0x00ee, 0x00ef, 0x00f1, 0x00f3, - 0x00f2, 0x00f4, 0x00f6, 0x00f5, 0x00fa, 0x00f9, 0x00fb, 0x00fc, - 0x2020, 0x00b0, 0x00a2, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x00df, - 0x00ae, 0x00a9, 0x2122, 0x00b4, 0x00a8, 0x2260, 0x00c6, 0x00d8, - 0x221e, 0x00b1, 0x2264, 0x2265, 0x00a5, 0x00b5, 0x2202, 0x2211, - 0x220f, 0x03c0, 0x222b, 0x00aa, 0x00ba, 0x2126, 0x00e6, 0x00f8, - 0x00bf, 0x00a1, 0x00ac, 0x221a, 0x0192, 0x2248, 0x2206, 0x00ab, - 0x00bb, 0x2026, 0x00a0, 0x00c0, 0x00c3, 0x00d5, 0x0152, 0x0153, - 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x25ca, - 0x00ff, 0x0178, 0x2044, 0x00a4, 0x2039, 0x203a, 0xfb01, 0xfb02, - 0x2021, 0x00b7, 0x201a, 0x201e, 0x2030, 0x00c2, 0x00ca, 0x00c1, - 0x00cb, 0x00c8, 0x00cd, 0x00ce, 0x00cf, 0x00cc, 0x00d3, 0x00d4, - 0x003f, 0x00d2, 0x00da, 0x00db, 0x00d9, 0x0131, 0x02c6, 0x02dc, - 0x00af, 0x02d8, 0x02d9, 0x02da, 0x00b8, 0x02dd, 0x02db, 0x02c7 -}; - -static const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xca, 0xc1, 0xa2, 0xa3, 0xdb, 0xb4, 0x7c, 0xa4, - 0xac, 0xa9, 0xbb, 0xc7, 0xc2, 0x2d, 0xa8, 0xf8, - 0xa1, 0xb1, 0x32, 0x33, 0xab, 0xb5, 0xa6, 0xe1, - 0xfc, 0x31, 0xbc, 0xc8, 0x3f, 0x3f, 0x3f, 0xc0, - 0xcb, 0xe7, 0xe5, 0xcc, 0x80, 0x81, 0xae, 0x82, - 0xe9, 0x83, 0xe6, 0xe8, 0xed, 0xea, 0xeb, 0xec, - 0x44, 0x84, 0xf1, 0xee, 0xef, 0xcd, 0x85, 0x78, - 0xaf, 0xf4, 0xf2, 0xf3, 0x86, 0x59, 0x3f, 0xa7, - 0x88, 0x87, 0x89, 0x8b, 0x8a, 0x8c, 0xbe, 0x8d, - 0x8f, 0x8e, 0x90, 0x91, 0x93, 0x92, 0x94, 0x95, - 0x64, 0x96, 0x98, 0x97, 0x99, 0x9b, 0x9a, 0xd6, - 0xbf, 0x9d, 0x9c, 0x9e, 0x9f, 0x79, 0x3f, 0xd8, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0xf5, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0xce, 0xcf, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0xd9, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0xc4, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x86, 0x9f, 0x86, - 0x9f, 0x86, 0x9f, 0x86, 0x9f, 0x3f, 0x80, 0x8a, - 0x41, 0x61, 0xae, 0xbe, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x81, 0x8c, 0xae, 0xbe, 0xaf, 0xbf, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x85, 0x9a, 0xcd, 0x9b, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0xab, 0xfd, 0xd4, 0xd5, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0xf6, 0xff, - 0x27, 0xf8, 0xab, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf9, 0xfa, 0xfb, 0xfe, 0xf7, 0xfd, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0xab, 0xf6, 0xf7, 0xf8, 0xf8, 0xf9, 0xfa, - 0xac, 0x3f, 0xfb, 0xfd, 0xff, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xfc, - 0xfe, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0xab, 0x3f, 0x3f, 0xac, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xab, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xab, 0xac, 0x41, 0xe1, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xa7, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb5, 0x3f, 0x3f, 0x3f, - 0xb9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa7, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0xb9, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0xae, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xa7, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xa7, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x82, 0x8d, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0xec, 0x95, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0xcd, 0x9b, 0xcd, 0x9b, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0xe5, 0x89, 0xe5, 0x89, - 0xe5, 0x89, 0xe5, 0x89, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0xe6, 0x90, - 0xe6, 0x90, 0xe6, 0x90, 0xe6, 0x90, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0xef, 0x99, 0xef, 0x99, 0xef, 0x99, 0xef, 0x99, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0xac, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0xac, 0xac, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0xab, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0xd0, 0xd1, 0xd0, 0x3f, 0x5f, - 0xd4, 0xd5, 0xe2, 0xd4, 0xd2, 0xd3, 0xe3, 0x3f, - 0xa0, 0xe0, 0xa5, 0x3f, 0x2e, 0x3f, 0xc9, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0xe4, 0x3f, 0xab, 0xfd, 0x3f, 0xd4, 0x3f, 0x3f, - 0x3f, 0xdc, 0xdd, 0x3f, 0x21, 0x3f, 0xf8, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xda, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xfb, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa2, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0xaa, 0x3f, 0x5a, 0x3f, 0xbd, 0x3f, - 0x5a, 0x3f, 0x4b, 0x81, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0xb9, 0x3f, 0x3f, 0x3f, - 0xb7, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xdc, 0xf6, 0xdd, 0xff, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0xdc, 0xdd, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0xb6, 0x3f, 0x3f, 0xaf, 0xc6, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb8, - 0x3f, 0xb7, 0x2d, 0xb1, 0x3f, 0xda, 0x5c, 0x2a, - 0xfb, 0xa5, 0xc3, 0x3f, 0x3f, 0x3f, 0xb0, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0xba, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc5, 0xc5, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xad, 0x3d, 0x3d, 0x3d, 0xb2, 0xb3, 0x3f, 0x3f, - 0x3f, 0x3f, 0xc7, 0xc8, 0x3f, 0x3f, 0x3c, 0x3e, - 0xb2, 0xb3, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xe1, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xdc, 0xdd, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0x2b, 0x2b, 0x2b, 0x2b, - 0xc2, 0xc2, 0xc2, 0xc2, 0x4c, 0x4c, 0x4c, 0x4c, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54, - 0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0x7c, 0x7c, - 0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0xc2, 0xc2, 0xc2, - 0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xd7, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xdc, 0xdd, 0xc7, 0xc8, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0xd2, 0xd3, 0xe3, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0xde, 0xdf, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xf8, 0xf8, 0xf8, 0xf8, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0xd1, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa2, 0xa3, 0xc2, 0xf8, 0x7c, 0xb4, 0x3f, 0x3f, - 0x7c, 0xdc, 0xf6, 0xdd, 0xff, 0x3f, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_10000 = -{ - { 10000, 1, 0x003f, 0x003f, "Mac Roman" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_10006.c b/reactos/tools/unicode/c_10006.c deleted file mode 100644 index 07a43a418f0..00000000000 --- a/reactos/tools/unicode/c_10006.c +++ /dev/null @@ -1,717 +0,0 @@ -/* code page 10006 (Mac Greek) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/MAC/GREEK.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x00c4, 0x00b9, 0x00b2, 0x00c9, 0x00b3, 0x00d6, 0x00dc, 0x0385, - 0x00e0, 0x00e2, 0x00e4, 0x0384, 0x00a8, 0x00e7, 0x00e9, 0x00e8, - 0x00ea, 0x00eb, 0x00a3, 0x2122, 0x00ee, 0x00ef, 0x2022, 0x00bd, - 0x2030, 0x00f4, 0x00f6, 0x00a6, 0x00ad, 0x00f9, 0x00fb, 0x00fc, - 0x2020, 0x0393, 0x0394, 0x0398, 0x039b, 0x039e, 0x03a0, 0x00df, - 0x00ae, 0x00a9, 0x03a3, 0x03aa, 0x00a7, 0x2260, 0x00b0, 0x0387, - 0x0391, 0x00b1, 0x2264, 0x2265, 0x00a5, 0x0392, 0x0395, 0x0396, - 0x0397, 0x0399, 0x039a, 0x039c, 0x03a6, 0x03ab, 0x03a8, 0x03a9, - 0x03ac, 0x039d, 0x00ac, 0x039f, 0x03a1, 0x2248, 0x03a4, 0x00ab, - 0x00bb, 0x2026, 0x00a0, 0x03a5, 0x03a7, 0x0386, 0x0388, 0x0153, - 0x2013, 0x2015, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x0389, - 0x038a, 0x038c, 0x038e, 0x03ad, 0x03ae, 0x03af, 0x03cc, 0x038f, - 0x03cd, 0x03b1, 0x03b2, 0x03c8, 0x03b4, 0x03b5, 0x03c6, 0x03b3, - 0x03b7, 0x03b9, 0x03be, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03bf, - 0x03c0, 0x03ce, 0x03c1, 0x03c3, 0x03c4, 0x03b8, 0x03c9, 0x03c2, - 0x03c7, 0x03c5, 0x03b6, 0x03ca, 0x03cb, 0x0390, 0x03b0, 0x003f -}; - -static const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xca, 0x21, 0x63, 0x92, 0x3f, 0xb4, 0x9b, 0xac, - 0x8c, 0xa9, 0x61, 0xc7, 0xc2, 0x9c, 0xa8, 0xd0, - 0xae, 0xb1, 0x82, 0x84, 0x27, 0xed, 0x3f, 0x3f, - 0x2c, 0x81, 0x6f, 0xc8, 0x3f, 0x97, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x80, 0x41, 0x41, 0x43, - 0x45, 0x83, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, - 0x44, 0x4e, 0x4f, 0x4f, 0x4f, 0x4f, 0x85, 0x78, - 0x4f, 0x55, 0x55, 0x55, 0x86, 0x59, 0x3f, 0xa7, - 0x88, 0x61, 0x89, 0x61, 0x8a, 0x61, 0x61, 0x8d, - 0x8f, 0x8e, 0x90, 0x91, 0x69, 0x69, 0x94, 0x95, - 0x64, 0x6e, 0x6f, 0x6f, 0x99, 0x6f, 0x9a, 0xd6, - 0x6f, 0x9d, 0x75, 0x9e, 0x9f, 0x79, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0xcf, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x86, 0x9f, 0x86, - 0x9f, 0x86, 0x9f, 0x86, 0x9f, 0x3f, 0x80, 0x8a, - 0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x85, 0x9a, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0xd4, 0xd5, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0xd0, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xae, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0xd0, 0xd0, 0x3f, 0x3f, - 0x8c, 0x3f, 0xae, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0x8c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x8b, 0x87, 0xcd, 0xaf, - 0xce, 0xd7, 0xd8, 0x3f, 0xd9, 0x3f, 0xda, 0xdf, - 0xfd, 0xb0, 0xb5, 0xa1, 0xa2, 0xb6, 0xb7, 0xb8, - 0xa3, 0xb9, 0xba, 0xa4, 0xbb, 0xc1, 0xa5, 0xc3, - 0xa6, 0xc4, 0x3f, 0xaa, 0xc6, 0xcb, 0xbc, 0xcc, - 0xbe, 0xbf, 0xab, 0xbd, 0xc0, 0xdb, 0xdc, 0xdd, - 0xfe, 0xe1, 0xe2, 0xe7, 0xe4, 0xe5, 0xfa, 0xe8, - 0xf5, 0xe9, 0xeb, 0xec, 0xed, 0xee, 0xea, 0xef, - 0xf0, 0xf2, 0xf7, 0xf3, 0xf4, 0xf9, 0xe6, 0xf8, - 0xe3, 0xf6, 0xfb, 0xfc, 0xde, 0xe0, 0xf1, 0x3f, - 0xe2, 0xf5, 0xcb, 0xcb, 0xcb, 0xe6, 0xf0, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xeb, 0xf2, 0xf7, 0x3f, 0xa3, 0xe5, 0x3f, 0x3f, - 0x3f, 0xaa, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xe2, 0xe7, 0xe4, - 0xe6, 0xf8, 0x69, 0x72, 0x75, 0x76, 0xe2, 0xe7, - 0xf2, 0xe6, 0xf8, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0xf5, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x43, 0x8d, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x95, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x89, 0x41, 0x89, - 0x41, 0x89, 0x41, 0x89, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x90, - 0x45, 0x90, 0x45, 0x90, 0x45, 0x90, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x99, 0x4f, 0x99, 0x4f, 0x99, 0x4f, 0x99, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, - 0xb0, 0xb0, 0xb0, 0xb0, 0xb0, 0xb0, 0xb0, 0xb0, - 0xe5, 0xe5, 0xe5, 0xe5, 0xe5, 0xe5, 0x3f, 0x3f, - 0xb6, 0xb6, 0xb6, 0xb6, 0xb6, 0xb6, 0x3f, 0x3f, - 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, - 0xb8, 0xb8, 0xb8, 0xb8, 0xb8, 0xb8, 0xb8, 0xb8, - 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, - 0xb9, 0xb9, 0xb9, 0xb9, 0xb9, 0xb9, 0xb9, 0xb9, - 0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0x3f, 0x3f, - 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0x3f, 0x3f, - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, - 0x3f, 0xcb, 0x3f, 0xcb, 0x3f, 0xcb, 0x3f, 0xcb, - 0xf6, 0xf6, 0xf6, 0xf6, 0xf6, 0xf6, 0xf6, 0xf6, - 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, - 0xe1, 0xc0, 0xe5, 0xdb, 0xe8, 0xdc, 0xe9, 0xdd, - 0xef, 0xde, 0xf9, 0xe0, 0xf6, 0xf1, 0x3f, 0x3f, - 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, - 0xb0, 0xb0, 0xb0, 0xb0, 0xb0, 0xb0, 0xb0, 0xb0, - 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, - 0xb8, 0xb8, 0xb8, 0xb8, 0xb8, 0xb8, 0xb8, 0xb8, - 0xf6, 0xf6, 0xf6, 0xf6, 0xf6, 0xf6, 0xf6, 0xf6, - 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, - 0xe1, 0xe1, 0xe1, 0xe1, 0xc0, 0x3f, 0xe1, 0xe1, - 0xb0, 0xb0, 0xb0, 0xcd, 0xb0, 0x3f, 0xe9, 0x3f, - 0x3f, 0x8c, 0xe8, 0xe8, 0xdc, 0x3f, 0xe8, 0xe8, - 0xb6, 0xce, 0xb8, 0xd7, 0xb8, 0x3f, 0x3f, 0x3f, - 0xe9, 0xe9, 0xfb, 0xfd, 0x3f, 0x3f, 0xe9, 0xfb, - 0xb9, 0xb9, 0xb9, 0xd8, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf9, 0xf9, 0xfc, 0xfe, 0xf2, 0xf2, 0xf9, 0xfc, - 0xcb, 0xcb, 0xcb, 0xda, 0xc4, 0x8c, 0x87, 0x60, - 0x3f, 0x3f, 0xf6, 0xf6, 0xf1, 0x3f, 0xf6, 0xf6, - 0xc3, 0xd9, 0xbf, 0xdf, 0xbf, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0xd0, 0xd0, 0xd1, 0x3f, 0x5f, - 0xd4, 0xd5, 0x2c, 0xd4, 0xd2, 0xd3, 0x2c, 0x3f, - 0xa0, 0x3f, 0x96, 0x3f, 0x2e, 0x3f, 0xc9, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x98, 0x3f, 0x27, 0x22, 0x3f, 0xd4, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0xd0, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xae, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x63, 0x3f, 0x3f, 0x92, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x93, 0x3f, 0x5a, 0x3f, 0xbf, 0x3f, - 0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0xf0, 0xe7, 0xa1, 0xa6, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0xb1, 0x3f, 0x2f, 0x5c, 0x2a, - 0xae, 0x96, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc5, 0xc5, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xad, 0x3d, 0x3d, 0x3d, 0xb2, 0xb3, 0x3f, 0x3f, - 0x3f, 0x3f, 0xc7, 0xc8, 0x3f, 0x3f, 0x3c, 0x3e, - 0xb2, 0xb3, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0x9b, 0x9b, - 0x2d, 0x2d, 0x9b, 0x9b, 0x2b, 0x2b, 0x2b, 0x2b, - 0xc2, 0xc2, 0xc2, 0xc2, 0x4c, 0x4c, 0x4c, 0x4c, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54, - 0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0x9b, 0x9b, - 0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0xc2, 0xc2, 0xc2, - 0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xc7, 0xc8, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0xd2, 0xd3, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xd0, 0xd0, 0xd0, 0xd0, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0xd0, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x63, 0x92, 0xc2, 0xd0, 0x9b, 0xb4, 0x3f, 0x3f, - 0x7c, 0x3c, 0x5e, 0x3e, 0x76, 0x3f, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_10006 = -{ - { 10006, 1, 0x003f, 0x003f, "Mac Greek" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_10007.c b/reactos/tools/unicode/c_10007.c deleted file mode 100644 index 6a2c92eb68f..00000000000 --- a/reactos/tools/unicode/c_10007.c +++ /dev/null @@ -1,750 +0,0 @@ -/* code page 10007 (Mac Cyrillic) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/MAC/CYRILLIC.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 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, - 0x2020, 0x00b0, 0x00a2, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x0406, - 0x00ae, 0x00a9, 0x2122, 0x0402, 0x0452, 0x2260, 0x0403, 0x0453, - 0x221e, 0x00b1, 0x2264, 0x2265, 0x0456, 0x00b5, 0x2202, 0x0408, - 0x0404, 0x0454, 0x0407, 0x0457, 0x0409, 0x0459, 0x040a, 0x045a, - 0x0458, 0x0405, 0x00ac, 0x221a, 0x0192, 0x2248, 0x2206, 0x00ab, - 0x00bb, 0x2026, 0x00a0, 0x040b, 0x045b, 0x040c, 0x045c, 0x0455, - 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x201e, - 0x040e, 0x045e, 0x040f, 0x045f, 0x2116, 0x0401, 0x0451, 0x044f, - 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, 0x00a4 -}; - -static const unsigned char uni2cp_low[5120] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xca, 0x21, 0xa2, 0xa3, 0xff, 0x59, 0x7c, 0xa4, - 0x22, 0xa9, 0x61, 0xc7, 0xc2, 0x2d, 0xa8, 0xd1, - 0xa1, 0xb1, 0x32, 0x33, 0x27, 0xb5, 0xa6, 0x3f, - 0x2c, 0x31, 0x6f, 0xc8, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, - 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, - 0x44, 0x4e, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x78, - 0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0x3f, 0x3f, - 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x63, - 0x65, 0x65, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69, - 0x64, 0x6e, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0xd6, - 0x6f, 0x75, 0x75, 0x75, 0x75, 0x79, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0xc4, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55, - 0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0xd4, 0xd5, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0xd1, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xa1, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0xd1, 0xd1, 0x3f, 0x3f, - 0x22, 0x3f, 0xa1, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0x22, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x22, 0x41, 0x3f, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb5, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0400 .. 0x04ff */ - 0x85, 0xdd, 0xab, 0xae, 0xb8, 0xc1, 0xa7, 0xba, - 0xb7, 0xbc, 0xbe, 0xcb, 0xcd, 0x88, 0xd8, 0xda, - 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, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xdf, - 0xe5, 0xde, 0xac, 0xaf, 0xb9, 0xcf, 0xb4, 0xbb, - 0xc0, 0xbd, 0xbf, 0xcc, 0xce, 0xe8, 0xd9, 0xdb, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x86, 0xe6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x80, 0xe0, 0x80, 0xe0, 0x3f, 0x3f, 0x85, 0xe5, - 0x3f, 0x3f, 0x3f, 0x3f, 0x86, 0xe6, 0x87, 0xe7, - 0x3f, 0x3f, 0x88, 0xe8, 0x88, 0xe8, 0x8e, 0xee, - 0x3f, 0x3f, 0x3f, 0x3f, 0x9d, 0xfd, 0x93, 0xf3, - 0x93, 0xf3, 0x93, 0xf3, 0x97, 0xf7, 0x3f, 0x3f, - 0x9b, 0xfb, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xed, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0x22, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0x22, 0x22, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0xd0, 0xd1, 0xd0, 0x3f, 0x5f, - 0xd4, 0xd5, 0x2c, 0xd4, 0xd2, 0xd3, 0xd7, 0x3f, - 0xa0, 0x3f, 0xa5, 0x3f, 0x2e, 0x3f, 0xc9, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0xd4, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0xd1, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa1, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa2, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0xdc, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0xaa, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0xb6, 0x3f, 0x3f, 0x4f, 0xc6, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0xb1, 0x3f, 0x2f, 0x5c, 0x2a, - 0xa1, 0xa5, 0xc3, 0x3f, 0x3f, 0x3f, 0xb0, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc5, 0xc5, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xad, 0x3d, 0x3d, 0x3d, 0xb2, 0xb3, 0x3f, 0x3f, - 0x3f, 0x3f, 0xc7, 0xc8, 0x3f, 0x3f, 0x3c, 0x3e, - 0xb2, 0xb3, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0x2b, 0x2b, 0x2b, 0x2b, - 0xc2, 0xc2, 0xc2, 0xc2, 0x4c, 0x4c, 0x4c, 0x4c, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54, - 0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0x7c, 0x7c, - 0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0xc2, 0xc2, 0xc2, - 0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xc7, 0xc8, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0xd2, 0xd3, 0xd7, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xd1, 0xd1, 0xd1, 0xd1, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0xd1, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa2, 0xa3, 0xc2, 0xd1, 0x7c, 0x59, 0x3f, 0x3f, - 0x7c, 0x3c, 0x5e, 0x3e, 0x76, 0x3f, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0500, 0x0600, 0x0700, - 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x0e00, 0x1300, 0x1300, 0x1300, - 0x0f00, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1000, 0x1300, 0x1300, 0x1100, 0x1200 -}; - -const struct sbcs_table cptable_10007 = -{ - { 10007, 1, 0x003f, 0x003f, "Mac Cyrillic" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_10029.c b/reactos/tools/unicode/c_10029.c deleted file mode 100644 index 44acb9ac5be..00000000000 --- a/reactos/tools/unicode/c_10029.c +++ /dev/null @@ -1,717 +0,0 @@ -/* code page 10029 (Mac Latin 2) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/MAC/LATIN2.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x00c4, 0x0100, 0x0101, 0x00c9, 0x0104, 0x00d6, 0x00dc, 0x00e1, - 0x0105, 0x010c, 0x00e4, 0x010d, 0x0106, 0x0107, 0x00e9, 0x0179, - 0x017a, 0x010e, 0x00ed, 0x010f, 0x0112, 0x0113, 0x0116, 0x00f3, - 0x0117, 0x00f4, 0x00f6, 0x00f5, 0x00fa, 0x011a, 0x011b, 0x00fc, - 0x2020, 0x00b0, 0x0118, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x00df, - 0x00ae, 0x00a9, 0x2122, 0x0119, 0x00a8, 0x2260, 0x0123, 0x012e, - 0x012f, 0x012a, 0x2264, 0x2265, 0x012b, 0x0136, 0x2202, 0x2211, - 0x0142, 0x013b, 0x013c, 0x013d, 0x013e, 0x0139, 0x013a, 0x0145, - 0x0146, 0x0143, 0x00ac, 0x221a, 0x0144, 0x0147, 0x2206, 0x00ab, - 0x00bb, 0x2026, 0x00a0, 0x0148, 0x0150, 0x00d5, 0x0151, 0x014c, - 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x25ca, - 0x014d, 0x0154, 0x0155, 0x0158, 0x2039, 0x203a, 0x0159, 0x0156, - 0x0157, 0x0160, 0x201a, 0x201e, 0x0161, 0x015a, 0x015b, 0x00c1, - 0x0164, 0x0165, 0x00cd, 0x017d, 0x017e, 0x016a, 0x00d3, 0x00d4, - 0x016b, 0x016e, 0x00da, 0x016f, 0x0170, 0x0171, 0x0172, 0x0173, - 0x00dd, 0x00fd, 0x0137, 0x017b, 0x0141, 0x017c, 0x0122, 0x02c7 -}; - -static const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xca, 0x21, 0x63, 0xa3, 0x3f, 0x59, 0x7c, 0xa4, - 0xac, 0xa9, 0x61, 0xc7, 0xc2, 0x2d, 0xa8, 0xd1, - 0xa1, 0x3f, 0x32, 0x33, 0x27, 0x75, 0xa6, 0x3f, - 0x2c, 0x31, 0x6f, 0xc8, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0xe7, 0x41, 0x41, 0x80, 0x41, 0x41, 0x43, - 0x45, 0x83, 0x45, 0x45, 0x49, 0xea, 0x49, 0x49, - 0x44, 0x4e, 0x4f, 0xee, 0xef, 0xcd, 0x85, 0x78, - 0x4f, 0x55, 0xf2, 0x55, 0x86, 0xf8, 0x3f, 0xa7, - 0x61, 0x87, 0x61, 0x61, 0x8a, 0x61, 0x61, 0x63, - 0x65, 0x8e, 0x65, 0x65, 0x69, 0x92, 0x69, 0x69, - 0x64, 0x6e, 0x6f, 0x97, 0x99, 0x9b, 0x9a, 0xd6, - 0x6f, 0x75, 0x9c, 0x75, 0x9f, 0xf9, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x81, 0x82, 0x41, 0x61, 0x84, 0x88, 0x8c, 0x8d, - 0x43, 0x63, 0x43, 0x63, 0x89, 0x8b, 0x91, 0x93, - 0x44, 0x64, 0x94, 0x95, 0x45, 0x65, 0x96, 0x98, - 0xa2, 0xab, 0x9d, 0x9e, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0xfe, 0xae, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0xb1, 0xb4, 0x49, 0x69, 0xaf, 0xb0, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0xb5, 0xfa, - 0x3f, 0xbd, 0xbe, 0xb9, 0xba, 0xbb, 0xbc, 0x3f, - 0x3f, 0xfc, 0xb8, 0xc1, 0xc4, 0xbf, 0xc0, 0xc5, - 0xcb, 0x3f, 0x3f, 0x3f, 0xcf, 0xd8, 0x4f, 0x6f, - 0xcc, 0xce, 0x4f, 0x6f, 0xd9, 0xda, 0xdf, 0xe0, - 0xdb, 0xde, 0xe5, 0xe6, 0x53, 0x73, 0x53, 0x73, - 0xe1, 0xe4, 0x54, 0x74, 0xe8, 0xe9, 0x54, 0x74, - 0x55, 0x75, 0xed, 0xf0, 0x55, 0x75, 0xf1, 0xf3, - 0xf4, 0xf5, 0xf6, 0xf7, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x8f, 0x90, 0xfb, 0xfd, 0xeb, 0xec, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x86, 0x9f, 0x86, - 0x9f, 0x86, 0x9f, 0x86, 0x9f, 0x3f, 0x80, 0x8a, - 0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x85, 0x9a, 0xcd, 0x9b, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0xd4, 0xd5, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0xff, - 0x27, 0xd1, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xa1, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0xd1, 0xd1, 0x3f, 0x3f, - 0xac, 0x3f, 0xa1, 0x22, 0xff, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0xac, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0xac, 0x41, 0x3f, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xa7, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x75, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa7, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xa7, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xa7, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x94, 0x95, 0x94, 0x95, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0xcd, 0x9b, 0xcd, 0x9b, - 0xcf, 0xd8, 0xcf, 0xd8, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0xe5, 0xe6, 0xe1, 0xe4, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0xed, 0xf0, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0xef, 0x99, 0xef, 0x99, 0xef, 0x99, 0xef, 0x99, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0xac, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0xac, 0xac, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0xd0, 0xd1, 0xd0, 0x3f, 0x5f, - 0xd4, 0xd5, 0xe2, 0xd4, 0xd2, 0xd3, 0xe3, 0x3f, - 0xa0, 0x3f, 0xa5, 0x3f, 0x2e, 0x3f, 0xc9, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0xd4, 0x3f, 0x3f, - 0x3f, 0xdc, 0xdd, 0x3f, 0x21, 0x3f, 0xd1, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa1, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x63, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0xaa, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb7, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xdc, 0x5e, 0xdd, 0xff, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0xdc, 0xdd, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0xb6, 0x3f, 0x3f, 0x4f, 0xc6, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xb7, 0x2d, 0x3f, 0x3f, 0x2f, 0x5c, 0x2a, - 0xa1, 0xa5, 0xc3, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xad, 0x3d, 0x3d, 0x3d, 0xb2, 0xb3, 0x3f, 0x3f, - 0x3f, 0x3f, 0xc7, 0xc8, 0x3f, 0x3f, 0x3c, 0x3e, - 0xb2, 0xb3, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xdc, 0xdd, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0x2b, 0x2b, 0x2b, 0x2b, - 0xc2, 0xc2, 0xc2, 0xc2, 0x4c, 0x4c, 0x4c, 0x4c, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54, - 0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0x7c, 0x7c, - 0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0xc2, 0xc2, 0xc2, - 0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xd7, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xdc, 0xdd, 0xc7, 0xc8, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0xd2, 0xd3, 0xe3, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xd1, 0xd1, 0xd1, 0xd1, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0xd1, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x63, 0xa3, 0xc2, 0xd1, 0x7c, 0x59, 0x3f, 0x3f, - 0x7c, 0xdc, 0x5e, 0xdd, 0xff, 0x3f, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_10029 = -{ - { 10029, 1, 0x003f, 0x003f, "Mac Latin 2" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_1006.c b/reactos/tools/unicode/c_1006.c deleted file mode 100644 index 2705687ceff..00000000000 --- a/reactos/tools/unicode/c_1006.c +++ /dev/null @@ -1,750 +0,0 @@ -/* code page 1006 (IBM Arabic) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MISC/CP1006.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 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, 0x06f0, 0x06f1, 0x06f2, 0x06f3, 0x06f4, 0x06f5, 0x06f6, - 0x06f7, 0x06f8, 0x06f9, 0x060c, 0x061b, 0x00ad, 0x061f, 0xfe81, - 0xfe8d, 0xfe8e, 0xfe8e, 0xfe8f, 0xfe91, 0xfb56, 0xfb58, 0xfe93, - 0xfe95, 0xfe97, 0xfb66, 0xfb68, 0xfe99, 0xfe9b, 0xfe9d, 0xfe9f, - 0xfb7a, 0xfb7c, 0xfea1, 0xfea3, 0xfea5, 0xfea7, 0xfea9, 0xfb84, - 0xfeab, 0xfead, 0xfb8c, 0xfeaf, 0xfb8a, 0xfeb1, 0xfeb3, 0xfeb5, - 0xfeb7, 0xfeb9, 0xfebb, 0xfebd, 0xfebf, 0xfec1, 0xfec5, 0xfec9, - 0xfeca, 0xfecb, 0xfecc, 0xfecd, 0xfece, 0xfecf, 0xfed0, 0xfed1, - 0xfed3, 0xfed5, 0xfed7, 0xfed9, 0xfedb, 0xfb92, 0xfb94, 0xfedd, - 0xfedf, 0xfee0, 0xfee1, 0xfee3, 0xfb9e, 0xfee5, 0xfee7, 0xfe85, - 0xfeed, 0xfba6, 0xfba8, 0xfba9, 0xfbaa, 0xfe80, 0xfe89, 0xfe8a, - 0xfe8b, 0xfef1, 0xfef2, 0xfef3, 0xfbb0, 0xfbae, 0xfe7c, 0xfe7d -}; - -static const unsigned char uni2cp_low[5120] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 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, 0x21, 0x63, 0x4c, 0x3f, 0x59, 0x7c, 0x3f, - 0x22, 0x63, 0x61, 0x3c, 0x3f, 0xad, 0x72, 0x2d, - 0x3f, 0x3f, 0x32, 0x33, 0x27, 0x75, 0x3f, 0x3f, - 0x2c, 0x31, 0x6f, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, - 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, - 0x44, 0x4e, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x78, - 0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0x3f, 0x3f, - 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x63, - 0x65, 0x65, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69, - 0x64, 0x6e, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x3f, - 0x6f, 0x75, 0x75, 0x75, 0x75, 0x79, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55, - 0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0x2d, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0x2d, 0x2d, 0x3f, 0x3f, - 0x22, 0x3f, 0x3f, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0x22, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x22, 0x41, 0x3f, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x75, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0600 .. 0x06ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xab, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xac, 0x3f, 0x3f, 0x3f, 0xae, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, - 0xa9, 0xaa, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0x22, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0x22, 0x22, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x63, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x2f, 0x5c, 0x2a, - 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3c, 0x3e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0x2b, 0x2b, 0x2b, 0x2b, - 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, 0x4c, 0x4c, 0x4c, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54, - 0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0x7c, 0x7c, - 0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb5, 0x3f, - 0xb6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xba, 0x3f, - 0xbb, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xc0, 0x3f, 0xc1, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xc7, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xcc, 0x3f, 0xca, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xe5, 0x3f, 0xe6, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xec, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xf1, 0x3f, - 0xf2, 0xf3, 0xf4, 0x3f, 0x3f, 0x3f, 0xfd, 0x3f, - 0xfc, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x2d, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xfe, 0xff, 0x3f, 0x3f, - 0xf5, 0xaf, 0x3f, 0x3f, 0x3f, 0xef, 0x3f, 0x3f, - 0x3f, 0xf6, 0xf7, 0xf8, 0x3f, 0xb0, 0xb1, 0xb3, - 0x3f, 0xb4, 0x3f, 0xb7, 0x3f, 0xb8, 0x3f, 0xb9, - 0x3f, 0xbc, 0x3f, 0xbd, 0x3f, 0xbe, 0x3f, 0xbf, - 0x3f, 0xc2, 0x3f, 0xc3, 0x3f, 0xc4, 0x3f, 0xc5, - 0x3f, 0xc6, 0x3f, 0xc8, 0x3f, 0xc9, 0x3f, 0xcb, - 0x3f, 0xcd, 0x3f, 0xce, 0x3f, 0xcf, 0x3f, 0xd0, - 0x3f, 0xd1, 0x3f, 0xd2, 0x3f, 0xd3, 0x3f, 0xd4, - 0x3f, 0xd5, 0x3f, 0x3f, 0x3f, 0xd6, 0x3f, 0x3f, - 0x3f, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, - 0xde, 0xdf, 0x3f, 0xe0, 0x3f, 0xe1, 0x3f, 0xe2, - 0x3f, 0xe3, 0x3f, 0xe4, 0x3f, 0xe7, 0x3f, 0xe8, - 0xe9, 0xea, 0x3f, 0xeb, 0x3f, 0xed, 0x3f, 0xee, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xf0, 0x3f, 0x3f, - 0x3f, 0xf9, 0xfa, 0xfb, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x63, 0x4c, 0x3f, 0x2d, 0x7c, 0x59, 0x3f, 0x3f, - 0x7c, 0x3c, 0x5e, 0x3e, 0x76, 0x3f, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1300, 0x1300, 0x0400, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0500, 0x0600, 0x0700, - 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x0e00, 0x1300, 0x1300, 0x1300, - 0x0f00, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1000, 0x1300, 0x1300, 0x1100, 0x1200 -}; - -const struct sbcs_table cptable_1006 = -{ - { 1006, 1, 0x003f, 0x003f, "IBM Arabic" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_10079.c b/reactos/tools/unicode/c_10079.c deleted file mode 100644 index 4428deba0f1..00000000000 --- a/reactos/tools/unicode/c_10079.c +++ /dev/null @@ -1,717 +0,0 @@ -/* code page 10079 (Mac Icelandic) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/MAC/ICELAND.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x00c4, 0x00c5, 0x00c7, 0x00c9, 0x00d1, 0x00d6, 0x00dc, 0x00e1, - 0x00e0, 0x00e2, 0x00e4, 0x00e3, 0x00e5, 0x00e7, 0x00e9, 0x00e8, - 0x00ea, 0x00eb, 0x00ed, 0x00ec, 0x00ee, 0x00ef, 0x00f1, 0x00f3, - 0x00f2, 0x00f4, 0x00f6, 0x00f5, 0x00fa, 0x00f9, 0x00fb, 0x00fc, - 0x00dd, 0x00b0, 0x00a2, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x00df, - 0x00ae, 0x00a9, 0x2122, 0x00b4, 0x00a8, 0x2260, 0x00c6, 0x00d8, - 0x221e, 0x00b1, 0x2264, 0x2265, 0x00a5, 0x00b5, 0x2202, 0x2211, - 0x220f, 0x03c0, 0x222b, 0x00aa, 0x00ba, 0x2126, 0x00e6, 0x00f8, - 0x00bf, 0x00a1, 0x00ac, 0x221a, 0x0192, 0x2248, 0x2206, 0x00ab, - 0x00bb, 0x2026, 0x00a0, 0x00c0, 0x00c3, 0x00d5, 0x0152, 0x0153, - 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x25ca, - 0x00ff, 0x0178, 0x2044, 0x00a4, 0x00d0, 0x00f0, 0x00de, 0x00fe, - 0x00fd, 0x00b7, 0x201a, 0x201e, 0x2030, 0x00c2, 0x00ca, 0x00c1, - 0x00cb, 0x00c8, 0x00cd, 0x00ce, 0x00cf, 0x00cc, 0x00d3, 0x00d4, - 0x003f, 0x00d2, 0x00da, 0x00db, 0x00d9, 0x0131, 0x02c6, 0x02dc, - 0x00af, 0x02d8, 0x02d9, 0x02da, 0x00b8, 0x02dd, 0x02db, 0x02c7 -}; - -static const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xca, 0xc1, 0xa2, 0xa3, 0xdb, 0xb4, 0x7c, 0xa4, - 0xac, 0xa9, 0xbb, 0xc7, 0xc2, 0x2d, 0xa8, 0xf8, - 0xa1, 0xb1, 0x32, 0x33, 0xab, 0xb5, 0xa6, 0xe1, - 0xfc, 0x31, 0xbc, 0xc8, 0x3f, 0x3f, 0x3f, 0xc0, - 0xcb, 0xe7, 0xe5, 0xcc, 0x80, 0x81, 0xae, 0x82, - 0xe9, 0x83, 0xe6, 0xe8, 0xed, 0xea, 0xeb, 0xec, - 0xdc, 0x84, 0xf1, 0xee, 0xef, 0xcd, 0x85, 0x78, - 0xaf, 0xf4, 0xf2, 0xf3, 0x86, 0xa0, 0xde, 0xa7, - 0x88, 0x87, 0x89, 0x8b, 0x8a, 0x8c, 0xbe, 0x8d, - 0x8f, 0x8e, 0x90, 0x91, 0x93, 0x92, 0x94, 0x95, - 0xdd, 0x96, 0x98, 0x97, 0x99, 0x9b, 0x9a, 0xd6, - 0xbf, 0x9d, 0x9c, 0x9e, 0x9f, 0xe0, 0xdf, 0xd8, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0xdc, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0xf5, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0xce, 0xcf, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0xd9, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xdc, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0xc4, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x86, 0x9f, 0x86, - 0x9f, 0x86, 0x9f, 0x86, 0x9f, 0x3f, 0x80, 0x8a, - 0x41, 0x61, 0xae, 0xbe, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x81, 0x8c, 0xae, 0xbe, 0xaf, 0xbf, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x85, 0x9a, 0xcd, 0x9b, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0xab, 0xfd, 0xd4, 0xd5, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0xf6, 0xff, - 0x27, 0xf8, 0xab, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf9, 0xfa, 0xfb, 0xfe, 0xf7, 0xfd, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0xab, 0xf6, 0xf7, 0xf8, 0xf8, 0xf9, 0xfa, - 0xac, 0x3f, 0xfb, 0xfd, 0xff, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xfc, - 0xfe, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0xab, 0x3f, 0x3f, 0xac, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xab, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xab, 0xac, 0x41, 0xe1, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xa7, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb5, 0x3f, 0x3f, 0x3f, - 0xb9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa7, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0xb9, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0xae, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xa7, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xa7, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0xdd, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x82, 0x8d, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0xec, 0x95, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0xcd, 0x9b, 0xcd, 0x9b, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0xe5, 0x89, 0xe5, 0x89, - 0xe5, 0x89, 0xe5, 0x89, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0xe6, 0x90, - 0xe6, 0x90, 0xe6, 0x90, 0xe6, 0x90, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0xef, 0x99, 0xef, 0x99, 0xef, 0x99, 0xef, 0x99, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0xac, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0xac, 0xac, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0xab, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0xd0, 0xd1, 0xd0, 0x3f, 0x5f, - 0xd4, 0xd5, 0xe2, 0xd4, 0xd2, 0xd3, 0xe3, 0x3f, - 0x3f, 0x3f, 0xa5, 0x3f, 0x2e, 0x3f, 0xc9, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0xe4, 0x3f, 0xab, 0xfd, 0x3f, 0xd4, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0xf8, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xda, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xfb, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa2, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0xaa, 0x3f, 0x5a, 0x3f, 0xbd, 0x3f, - 0x5a, 0x3f, 0x4b, 0x81, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0xb9, 0x3f, 0x3f, 0x3f, - 0xb7, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0xf6, 0x3e, 0xff, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0xb6, 0x3f, 0x3f, 0xaf, 0xc6, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb8, - 0x3f, 0xb7, 0x2d, 0xb1, 0x3f, 0xda, 0x5c, 0x2a, - 0xfb, 0xa5, 0xc3, 0x3f, 0x3f, 0x3f, 0xb0, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0xba, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc5, 0xc5, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xad, 0x3d, 0x3d, 0x3d, 0xb2, 0xb3, 0x3f, 0x3f, - 0x3f, 0x3f, 0xc7, 0xc8, 0x3f, 0x3f, 0x3c, 0x3e, - 0xb2, 0xb3, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xe1, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0x2b, 0x2b, 0x2b, 0x2b, - 0xc2, 0xc2, 0xc2, 0xc2, 0x4c, 0x4c, 0x4c, 0x4c, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54, - 0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0x7c, 0x7c, - 0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0xc2, 0xc2, 0xc2, - 0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xd7, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xc7, 0xc8, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0xd2, 0xd3, 0xe3, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xf8, 0xf8, 0xf8, 0xf8, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0xd1, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa2, 0xa3, 0xc2, 0xf8, 0x7c, 0xb4, 0x3f, 0x3f, - 0x7c, 0x3c, 0xf6, 0x3e, 0xff, 0x3f, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_10079 = -{ - { 10079, 1, 0x003f, 0x003f, "Mac Icelandic" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_10081.c b/reactos/tools/unicode/c_10081.c deleted file mode 100644 index 70560e38127..00000000000 --- a/reactos/tools/unicode/c_10081.c +++ /dev/null @@ -1,717 +0,0 @@ -/* code page 10081 (Mac Turkish) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/MAC/TURKISH.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x00c4, 0x00c5, 0x00c7, 0x00c9, 0x00d1, 0x00d6, 0x00dc, 0x00e1, - 0x00e0, 0x00e2, 0x00e4, 0x00e3, 0x00e5, 0x00e7, 0x00e9, 0x00e8, - 0x00ea, 0x00eb, 0x00ed, 0x00ec, 0x00ee, 0x00ef, 0x00f1, 0x00f3, - 0x00f2, 0x00f4, 0x00f6, 0x00f5, 0x00fa, 0x00f9, 0x00fb, 0x00fc, - 0x2020, 0x00b0, 0x00a2, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x00df, - 0x00ae, 0x00a9, 0x2122, 0x00b4, 0x00a8, 0x2260, 0x00c6, 0x00d8, - 0x221e, 0x00b1, 0x2264, 0x2265, 0x00a5, 0x00b5, 0x2202, 0x2211, - 0x220f, 0x03c0, 0x222b, 0x00aa, 0x00ba, 0x2126, 0x00e6, 0x00f8, - 0x00bf, 0x00a1, 0x00ac, 0x221a, 0x0192, 0x2248, 0x2206, 0x00ab, - 0x00bb, 0x2026, 0x00a0, 0x00c0, 0x00c3, 0x00d5, 0x0152, 0x0153, - 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x25ca, - 0x00ff, 0x0178, 0x011e, 0x011f, 0x0130, 0x0131, 0x015e, 0x015f, - 0x2021, 0x00b7, 0x201a, 0x201e, 0x2030, 0x00c2, 0x00ca, 0x00c1, - 0x00cb, 0x00c8, 0x00cd, 0x00ce, 0x00cf, 0x00cc, 0x00d3, 0x00d4, - 0x003f, 0x00d2, 0x00da, 0x00db, 0x00d9, 0x003f, 0x02c6, 0x02dc, - 0x00af, 0x02d8, 0x02d9, 0x02da, 0x00b8, 0x02dd, 0x02db, 0x02c7 -}; - -static const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xca, 0xc1, 0xa2, 0xa3, 0x3f, 0xb4, 0x7c, 0xa4, - 0xac, 0xa9, 0xbb, 0xc7, 0xc2, 0x2d, 0xa8, 0xf8, - 0xa1, 0xb1, 0x32, 0x33, 0xab, 0xb5, 0xa6, 0xe1, - 0xfc, 0x31, 0xbc, 0xc8, 0x3f, 0x3f, 0x3f, 0xc0, - 0xcb, 0xe7, 0xe5, 0xcc, 0x80, 0x81, 0xae, 0x82, - 0xe9, 0x83, 0xe6, 0xe8, 0xed, 0xea, 0xeb, 0xec, - 0x44, 0x84, 0xf1, 0xee, 0xef, 0xcd, 0x85, 0x78, - 0xaf, 0xf4, 0xf2, 0xf3, 0x86, 0x59, 0x3f, 0xa7, - 0x88, 0x87, 0x89, 0x8b, 0x8a, 0x8c, 0xbe, 0x8d, - 0x8f, 0x8e, 0x90, 0x91, 0x93, 0x92, 0x94, 0x95, - 0x64, 0x96, 0x98, 0x97, 0x99, 0x9b, 0x9a, 0xd6, - 0xbf, 0x9d, 0x9c, 0x9e, 0x9f, 0x79, 0x3f, 0xd8, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0xda, 0xdb, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0xdc, 0xdd, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0xce, 0xcf, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0xde, 0xdf, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0xd9, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0xc4, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x86, 0x9f, 0x86, - 0x9f, 0x86, 0x9f, 0x86, 0x9f, 0x3f, 0x80, 0x8a, - 0x41, 0x61, 0xae, 0xbe, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x81, 0x8c, 0xae, 0xbe, 0xaf, 0xbf, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x85, 0x9a, 0xcd, 0x9b, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0xab, 0xfd, 0xd4, 0xd5, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0xf6, 0xff, - 0x27, 0xf8, 0xab, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf9, 0xfa, 0xfb, 0xfe, 0xf7, 0xfd, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0xab, 0xf6, 0xf7, 0xf8, 0xf8, 0xf9, 0xfa, - 0xac, 0x3f, 0xfb, 0xfd, 0xff, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xfc, - 0xfe, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0xab, 0x3f, 0x3f, 0xac, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xab, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xab, 0xac, 0x41, 0xe1, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xa7, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb5, 0x3f, 0x3f, 0x3f, - 0xb9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa7, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0xb9, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0xae, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xa7, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xa7, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x82, 0x8d, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0xec, 0x95, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0xcd, 0x9b, 0xcd, 0x9b, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0xe5, 0x89, 0xe5, 0x89, - 0xe5, 0x89, 0xe5, 0x89, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0xe6, 0x90, - 0xe6, 0x90, 0xe6, 0x90, 0xe6, 0x90, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0xef, 0x99, 0xef, 0x99, 0xef, 0x99, 0xef, 0x99, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0xac, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0xac, 0xac, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0xab, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0xd0, 0xd1, 0xd0, 0x3f, 0x5f, - 0xd4, 0xd5, 0xe2, 0xd4, 0xd2, 0xd3, 0xe3, 0x3f, - 0xa0, 0xe0, 0xa5, 0x3f, 0x2e, 0x3f, 0xc9, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0xe4, 0x3f, 0xab, 0xfd, 0x3f, 0xd4, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0xf8, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xfb, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa2, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0xaa, 0x3f, 0x5a, 0x3f, 0xbd, 0x3f, - 0x5a, 0x3f, 0x4b, 0x81, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0xb9, 0x3f, 0x3f, 0x3f, - 0xb7, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0xf6, 0x3e, 0xff, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0xb6, 0x3f, 0x3f, 0xaf, 0xc6, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb8, - 0x3f, 0xb7, 0x2d, 0xb1, 0x3f, 0x2f, 0x5c, 0x2a, - 0xfb, 0xa5, 0xc3, 0x3f, 0x3f, 0x3f, 0xb0, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0xba, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc5, 0xc5, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xad, 0x3d, 0x3d, 0x3d, 0xb2, 0xb3, 0x3f, 0x3f, - 0x3f, 0x3f, 0xc7, 0xc8, 0x3f, 0x3f, 0x3c, 0x3e, - 0xb2, 0xb3, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xe1, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0x2b, 0x2b, 0x2b, 0x2b, - 0xc2, 0xc2, 0xc2, 0xc2, 0x4c, 0x4c, 0x4c, 0x4c, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54, - 0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0x7c, 0x7c, - 0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0xc2, 0xc2, 0xc2, - 0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xd7, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xc7, 0xc8, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0xd2, 0xd3, 0xe3, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xf8, 0xf8, 0xf8, 0xf8, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0xd1, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa2, 0xa3, 0xc2, 0xf8, 0x7c, 0xb4, 0x3f, 0x3f, - 0x7c, 0x3c, 0xf6, 0x3e, 0xff, 0x3f, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_10081 = -{ - { 10081, 1, 0x003f, 0x003f, "Mac Turkish" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_1026.c b/reactos/tools/unicode/c_1026.c deleted file mode 100644 index f838a02e9f3..00000000000 --- a/reactos/tools/unicode/c_1026.c +++ /dev/null @@ -1,717 +0,0 @@ -/* code page 1026 (IBM EBCDIC Latin 5 Turkish) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/EBCDIC/CP1026.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x009c, 0x0009, 0x0086, 0x007f, - 0x0097, 0x008d, 0x008e, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x009d, 0x0085, 0x0008, 0x0087, - 0x0018, 0x0019, 0x0092, 0x008f, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x000a, 0x0017, 0x001b, - 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x0005, 0x0006, 0x0007, - 0x0090, 0x0091, 0x0016, 0x0093, 0x0094, 0x0095, 0x0096, 0x0004, - 0x0098, 0x0099, 0x009a, 0x009b, 0x0014, 0x0015, 0x009e, 0x001a, - 0x0020, 0x00a0, 0x00e2, 0x00e4, 0x00e0, 0x00e1, 0x00e3, 0x00e5, - 0x007b, 0x00f1, 0x00c7, 0x002e, 0x003c, 0x0028, 0x002b, 0x0021, - 0x0026, 0x00e9, 0x00ea, 0x00eb, 0x00e8, 0x00ed, 0x00ee, 0x00ef, - 0x00ec, 0x00df, 0x011e, 0x0130, 0x002a, 0x0029, 0x003b, 0x005e, - 0x002d, 0x002f, 0x00c2, 0x00c4, 0x00c0, 0x00c1, 0x00c3, 0x00c5, - 0x005b, 0x00d1, 0x015f, 0x002c, 0x0025, 0x005f, 0x003e, 0x003f, - 0x00f8, 0x00c9, 0x00ca, 0x00cb, 0x00c8, 0x00cd, 0x00ce, 0x00cf, - 0x00cc, 0x0131, 0x003a, 0x00d6, 0x015e, 0x0027, 0x003d, 0x00dc, - 0x00d8, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x00ab, 0x00bb, 0x007d, 0x0060, 0x00a6, 0x00b1, - 0x00b0, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, 0x0070, - 0x0071, 0x0072, 0x00aa, 0x00ba, 0x00e6, 0x00b8, 0x00c6, 0x00a4, - 0x00b5, 0x00f6, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, - 0x0079, 0x007a, 0x00a1, 0x00bf, 0x005d, 0x0024, 0x0040, 0x00ae, - 0x00a2, 0x00a3, 0x00a5, 0x00b7, 0x00a9, 0x00a7, 0x00b6, 0x00bc, - 0x00bd, 0x00be, 0x00ac, 0x007c, 0x00af, 0x00a8, 0x00b4, 0x00d7, - 0x00e7, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x00ad, 0x00f4, 0x007e, 0x00f2, 0x00f3, 0x00f5, - 0x011f, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, 0x0050, - 0x0051, 0x0052, 0x00b9, 0x00fb, 0x005c, 0x00f9, 0x00fa, 0x00ff, - 0x00fc, 0x00f7, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, - 0x0059, 0x005a, 0x00b2, 0x00d4, 0x0023, 0x00d2, 0x00d3, 0x00d5, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x00b3, 0x00db, 0x0022, 0x00d9, 0x00da, 0x009f -}; - -static const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 0x00, 0x01, 0x02, 0x03, 0x37, 0x2d, 0x2e, 0x2f, - 0x16, 0x05, 0x25, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13, 0x3c, 0x3d, 0x32, 0x26, - 0x18, 0x19, 0x3f, 0x27, 0x1c, 0x1d, 0x1e, 0x1f, - 0x40, 0x4f, 0xfc, 0xec, 0xad, 0x6c, 0x50, 0x7d, - 0x4d, 0x5d, 0x5c, 0x4e, 0x6b, 0x60, 0x4b, 0x61, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0x7a, 0x5e, 0x4c, 0x7e, 0x6e, 0x6f, - 0xae, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, - 0xd7, 0xd8, 0xd9, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, - 0xe7, 0xe8, 0xe9, 0x68, 0xdc, 0xac, 0x5f, 0x6d, - 0x8d, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, - 0x97, 0x98, 0x99, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, - 0xa7, 0xa8, 0xa9, 0x48, 0xbb, 0x8c, 0xcc, 0x07, - 0x20, 0x21, 0x22, 0x23, 0x24, 0x15, 0x06, 0x17, - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x09, 0x0a, 0x1b, - 0x30, 0x31, 0x1a, 0x33, 0x34, 0x35, 0x36, 0x08, - 0x38, 0x39, 0x3a, 0x3b, 0x04, 0x14, 0x3e, 0xff, - 0x41, 0xaa, 0xb0, 0xb1, 0x9f, 0xb2, 0x8e, 0xb5, - 0xbd, 0xb4, 0x9a, 0x8a, 0xba, 0xca, 0xaf, 0xbc, - 0x90, 0x8f, 0xea, 0xfa, 0xbe, 0xa0, 0xb6, 0xb3, - 0x9d, 0xda, 0x9b, 0x8b, 0xb7, 0xb8, 0xb9, 0xab, - 0x64, 0x65, 0x62, 0x66, 0x63, 0x67, 0x9e, 0x4a, - 0x74, 0x71, 0x72, 0x73, 0x78, 0x75, 0x76, 0x77, - 0xc4, 0x69, 0xed, 0xee, 0xeb, 0xef, 0x7b, 0xbf, - 0x80, 0xfd, 0xfe, 0xfb, 0x7f, 0xe8, 0x3f, 0x59, - 0x44, 0x45, 0x42, 0x46, 0x43, 0x47, 0x9c, 0xc0, - 0x54, 0x51, 0x52, 0x53, 0x58, 0x55, 0x56, 0x57, - 0x84, 0x49, 0xcd, 0xce, 0xcb, 0xcf, 0xa1, 0xe1, - 0x70, 0xdd, 0xde, 0xdb, 0xe0, 0xa8, 0x3f, 0xdf, - /* 0x0100 .. 0x01ff */ - 0xc1, 0x81, 0xc1, 0x81, 0xc1, 0x81, 0xc3, 0x83, - 0xc3, 0x83, 0xc3, 0x83, 0xc3, 0x83, 0xc4, 0x84, - 0xc4, 0x84, 0xc5, 0x85, 0xc5, 0x85, 0xc5, 0x85, - 0xc5, 0x85, 0xc5, 0x85, 0xc7, 0x87, 0x5a, 0xd0, - 0xc7, 0x87, 0xc7, 0x87, 0xc8, 0x88, 0xc8, 0x88, - 0xc9, 0x89, 0xc9, 0x89, 0xc9, 0x89, 0xc9, 0x89, - 0x5b, 0x79, 0x3f, 0x3f, 0xd1, 0x91, 0xd2, 0x92, - 0x3f, 0xd3, 0x93, 0xd3, 0x93, 0xd3, 0x93, 0x3f, - 0x3f, 0xd3, 0x93, 0xd5, 0x95, 0xd5, 0x95, 0xd5, - 0x95, 0x3f, 0x3f, 0x3f, 0xd6, 0x96, 0xd6, 0x96, - 0xd6, 0x96, 0xd6, 0x96, 0xd9, 0x99, 0xd9, 0x99, - 0xd9, 0x99, 0xe2, 0xa2, 0xe2, 0xa2, 0x7c, 0x6a, - 0xe2, 0xa2, 0xe3, 0xa3, 0xe3, 0xa3, 0xe3, 0xa3, - 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, - 0xe4, 0xa4, 0xe4, 0xa4, 0xe6, 0xa6, 0xe8, 0xa8, - 0xe8, 0xe9, 0xa9, 0xe9, 0xa9, 0xe9, 0xa9, 0xa2, - 0x82, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xc4, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc5, 0xc6, 0x86, 0x3f, 0x3f, 0x3f, 0x3f, 0xc9, - 0x3f, 0x3f, 0x93, 0x3f, 0x3f, 0x3f, 0x3f, 0xd6, - 0xd6, 0x96, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0xe3, 0xe4, - 0xa4, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xa9, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xbb, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xc1, 0x81, 0xc9, - 0x89, 0xd6, 0x96, 0xe4, 0xa4, 0x7f, 0xe0, 0x7f, - 0xe0, 0x7f, 0xe0, 0x7f, 0xe0, 0x3f, 0x63, 0x43, - 0xc1, 0x81, 0x9e, 0x9c, 0xc7, 0x87, 0xc7, 0x87, - 0xd2, 0x92, 0xd6, 0x96, 0xd6, 0x96, 0x3f, 0x3f, - 0x91, 0x3f, 0x3f, 0x3f, 0xc7, 0x87, 0x3f, 0x3f, - 0xd5, 0x95, 0x67, 0x47, 0x9e, 0x9c, 0x80, 0x70, - /* 0x0200 .. 0x02ff */ - 0xc1, 0x81, 0xc1, 0x81, 0xc5, 0x85, 0xc5, 0x85, - 0xc9, 0x89, 0xc9, 0x89, 0xd6, 0x96, 0xd6, 0x96, - 0xd9, 0x99, 0xd9, 0x99, 0xe4, 0xa4, 0xe4, 0xa4, - 0xe2, 0xa2, 0xe3, 0xa3, 0x3f, 0x3f, 0xc8, 0x88, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xc1, 0x81, - 0xc5, 0x85, 0x7b, 0xa1, 0xef, 0xcf, 0xd6, 0x96, - 0xd6, 0x96, 0xe8, 0xa8, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x87, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x88, 0x3f, 0x91, 0x99, 0x3f, 0x3f, 0x3f, 0xa6, - 0xa8, 0xbe, 0xfc, 0x8d, 0x7d, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5f, 0x3f, 0x5f, 0xa5, - 0x7d, 0xbc, 0xbe, 0x8d, 0x3f, 0x6d, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x90, 0x3f, 0xcc, 0xfc, 0x3f, 0x3f, - 0x3f, 0x93, 0xa2, 0xa7, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x8d, 0xbe, 0x5f, 0xcc, 0xbc, 0xbc, 0x3f, 0x3f, - 0xbd, 0x3f, 0x90, 0xfc, 0xa5, 0x3f, 0xfc, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x9d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6d, 0x6d, 0x6d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x8d, 0xbe, 0x3f, 0x3f, 0xbd, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xbe, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xbe, 0xbd, 0xc1, 0xb3, - 0xc5, 0xc8, 0xc9, 0x3f, 0xd6, 0x3f, 0xe8, 0x3f, - 0x3f, 0xc1, 0xc2, 0x3f, 0x3f, 0xc5, 0xe9, 0xc8, - 0x3f, 0xc9, 0xd2, 0x3f, 0xd4, 0xd5, 0x3f, 0xd6, - 0x3f, 0xd7, 0x3f, 0x3f, 0xe3, 0xe8, 0x3f, 0xe7, - 0x3f, 0x3f, 0xc9, 0xe8, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xa0, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x3f, 0xe8, 0xe8, 0xe8, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xc1, 0x9e, 0xc2, 0x3f, - 0xc4, 0xc5, 0x3f, 0xc7, 0xc8, 0xc9, 0xd1, 0xd2, - 0xd3, 0xd4, 0xd5, 0x3f, 0xd6, 0x3f, 0xd7, 0xd9, - 0xe3, 0xe4, 0xe6, 0x81, 0x3f, 0x3f, 0x3f, 0x82, - 0x84, 0x85, 0x3f, 0x3f, 0x3f, 0x87, 0x3f, 0x92, - 0x94, 0x3f, 0x96, 0x3f, 0x3f, 0x3f, 0x97, 0xa3, - 0xa4, 0x3f, 0x3f, 0xa5, 0x3f, 0x59, 0x3f, 0x3f, - 0x3f, 0x3f, 0x89, 0x99, 0xa4, 0xa5, 0x59, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x83, 0x3f, 0x84, 0x3f, - 0x86, 0x3f, 0x87, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xa9, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0xc1, 0x81, 0xc2, 0x82, 0xc2, 0x82, 0xc2, 0x82, - 0x4a, 0xc0, 0xc4, 0x84, 0xc4, 0x84, 0xc4, 0x84, - 0xc4, 0x84, 0xc4, 0x84, 0xc5, 0x85, 0xc5, 0x85, - 0xc5, 0x85, 0xc5, 0x85, 0xc5, 0x85, 0xc6, 0x86, - 0xc7, 0x87, 0xc8, 0x88, 0xc8, 0x88, 0xc8, 0x88, - 0xc8, 0x88, 0xc8, 0x88, 0xc9, 0x89, 0x77, 0x57, - 0xd2, 0x92, 0xd2, 0x92, 0xd2, 0x92, 0xd3, 0x93, - 0xd3, 0x93, 0xd3, 0x93, 0xd3, 0x93, 0xd4, 0x94, - 0xd4, 0x94, 0xd4, 0x94, 0xd5, 0x95, 0xd5, 0x95, - 0xd5, 0x95, 0xd5, 0x95, 0xef, 0xcf, 0xef, 0xcf, - 0xd6, 0x96, 0xd6, 0x96, 0xd7, 0x97, 0xd7, 0x97, - 0xd9, 0x99, 0xd9, 0x99, 0xd9, 0x99, 0xd9, 0x99, - 0xe2, 0xa2, 0xe2, 0xa2, 0xe2, 0xa2, 0xe2, 0xa2, - 0xe2, 0xa2, 0xe3, 0xa3, 0xe3, 0xa3, 0xe3, 0xa3, - 0xe3, 0xa3, 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, - 0xe4, 0xa4, 0xe4, 0xa4, 0xe5, 0xa5, 0xe5, 0xa5, - 0xe6, 0xa6, 0xe6, 0xa6, 0xe6, 0xa6, 0xe6, 0xa6, - 0xe6, 0xa6, 0xe7, 0xa7, 0xe7, 0xa7, 0xe8, 0xa8, - 0xe9, 0xa9, 0xe9, 0xa9, 0xe9, 0xa9, 0x88, 0xa3, - 0xa6, 0xa8, 0x3f, 0xa2, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc1, 0x81, 0xc1, 0x81, 0x62, 0x42, 0x62, 0x42, - 0x62, 0x42, 0x62, 0x42, 0xc1, 0x81, 0xc1, 0x81, - 0xc1, 0x81, 0xc1, 0x81, 0xc1, 0x81, 0xc1, 0x81, - 0xc5, 0x85, 0xc5, 0x85, 0xc5, 0x85, 0x72, 0x52, - 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0xc5, 0x85, - 0xc9, 0x89, 0xc9, 0x89, 0xd6, 0x96, 0xd6, 0x96, - 0xeb, 0xcb, 0xeb, 0xcb, 0xeb, 0xcb, 0xeb, 0xcb, - 0xd6, 0x96, 0xd6, 0x96, 0xd6, 0x96, 0xd6, 0x96, - 0xd6, 0x96, 0xd6, 0x96, 0xe4, 0xa4, 0xe4, 0xa4, - 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, - 0xe4, 0xa4, 0xe8, 0xa8, 0xe8, 0xa8, 0xe8, 0xa8, - 0xe8, 0xa8, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc9, 0xc9, 0xc9, 0xc9, 0xc9, 0xc9, 0xc9, 0xc9, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xe8, 0x3f, 0xe8, 0x3f, 0xe8, 0x3f, 0xe8, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0x3f, 0x3f, 0x3f, - 0x3f, 0xbd, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc5, 0xc5, 0xc8, 0xc8, 0xc8, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc9, 0xc9, 0xc9, 0xc9, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe8, 0xe8, 0xe8, 0xe8, 0xd7, 0xbd, 0xbd, 0x8d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xd6, 0xd6, 0x3f, 0x3f, 0x3f, 0xbe, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, - 0x40, 0x40, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x60, 0x3f, 0x60, 0x60, 0x60, 0x3f, 0x6d, - 0x8d, 0x7d, 0x6b, 0x8d, 0xfc, 0xfc, 0x6b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x4b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x40, - 0x3f, 0x3f, 0xbe, 0xfc, 0x3f, 0x8d, 0x3f, 0x3f, - 0x3f, 0x4c, 0x6e, 0x3f, 0x4f, 0x3f, 0xbc, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x61, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x40, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x90, 0x89, 0x3f, 0x3f, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0x4e, 0x60, 0x7e, 0x4d, 0x5d, 0x95, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0x4e, 0x60, 0x7e, 0x4d, 0x5d, 0x3f, - 0x81, 0x85, 0x96, 0xa7, 0x3f, 0x88, 0x92, 0x93, - 0x94, 0x95, 0x97, 0xa2, 0xa3, 0x3f, 0x3f, 0x3f, - 0x3f, 0xb0, 0x3f, 0x3f, 0xb1, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0xc3, 0x3f, 0x3f, 0x3f, 0x3f, 0xc5, - 0x3f, 0x3f, 0x87, 0xc8, 0xc8, 0xc8, 0x88, 0x88, - 0xc9, 0xc9, 0xd3, 0x93, 0x3f, 0xd5, 0x3f, 0x3f, - 0xd7, 0xd7, 0xd8, 0xd9, 0xd9, 0xd9, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xe9, 0x3f, 0x3f, 0x3f, - 0xe9, 0x3f, 0xd2, 0x67, 0xc2, 0xc3, 0x85, 0x85, - 0xc5, 0xc6, 0x3f, 0xd4, 0x96, 0x3f, 0x3f, 0x3f, - 0x3f, 0x89, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xc4, 0x84, 0x85, - 0x89, 0x91, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc9, 0x3f, 0x3f, 0x3f, 0xe5, 0x3f, 0x3f, 0x3f, - 0x3f, 0xe7, 0x3f, 0x3f, 0xd3, 0xc3, 0xc4, 0xd4, - 0x89, 0x3f, 0x3f, 0x3f, 0xa5, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa7, 0x3f, 0x3f, 0x93, 0x83, 0x84, 0x94, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4c, 0x5f, 0x6e, 0xa5, 0x60, 0xbb, 0x3f, 0x3f, - 0x3f, 0x3f, 0x4c, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x60, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x80, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x60, 0x8f, 0x3f, 0x61, 0xdc, 0x5c, - 0x90, 0x3f, 0xe5, 0x3f, 0x3f, 0x3f, 0x3f, 0xd3, - 0x3f, 0x3f, 0x3f, 0xbb, 0xbb, 0x3f, 0x3f, 0x3f, - 0x3f, 0x95, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xcc, 0x3f, 0x3f, 0x3f, - 0x3f, 0xcc, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xcc, 0xcc, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x8a, 0x8b, 0x3f, 0x3f, 0x4c, 0x6e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb3, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x4c, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, - 0xf9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xc1, 0xc2, - 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xd1, - 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, - 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, - 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, - 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, - 0x98, 0x99, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xf0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x60, 0x60, 0xbb, 0xbb, 0x60, 0x60, 0x8e, 0x8e, - 0x60, 0x60, 0x8e, 0x8e, 0x4e, 0x4e, 0x4e, 0x4e, - 0xba, 0xba, 0xba, 0xba, 0xd3, 0xd3, 0xd3, 0xd3, - 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0xe3, 0xe3, 0xe3, 0xe3, - 0xe3, 0xe3, 0xe3, 0xe3, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0x60, 0x60, 0x8e, 0x8e, - 0x7e, 0xbb, 0x4e, 0x4e, 0x4e, 0xba, 0xba, 0xba, - 0xd3, 0xd3, 0xd3, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0xe3, 0xe3, 0xe3, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x61, 0xdc, 0xe7, 0x60, 0xbb, 0x60, 0xbb, - 0x60, 0xbb, 0x60, 0xbb, 0x60, 0xbb, 0x60, 0xbb, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xd6, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xd6, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x91, 0xe5, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x40, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4c, 0x6e, 0x8a, 0x8b, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x68, 0xac, 0x3f, 0xfc, 0xfc, 0x6b, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x4e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xbc, 0xbc, 0xbc, 0xbc, 0x6d, 0x6d, 0x6d, - 0x6b, 0x3f, 0x4b, 0x3f, 0x5e, 0x7a, 0x6f, 0x4f, - 0x60, 0x4d, 0x5d, 0x48, 0x8c, 0x3f, 0x3f, 0xec, - 0x50, 0x5c, 0x4e, 0x60, 0x4c, 0x6e, 0x7e, 0x3f, - 0xdc, 0xad, 0x6c, 0xae, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 0x4f, 0xfc, 0xec, 0xad, 0x6c, 0x50, 0x7d, - 0x4d, 0x5d, 0x5c, 0x4e, 0x6b, 0x60, 0x4b, 0x61, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0x7a, 0x5e, 0x4c, 0x7e, 0x6e, 0x6f, - 0xae, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, - 0xd7, 0xd8, 0xd9, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, - 0xe7, 0xe8, 0xe9, 0x68, 0xdc, 0xac, 0x5f, 0x6d, - 0x8d, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, - 0x97, 0x98, 0x99, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, - 0xa7, 0xa8, 0xa9, 0x48, 0xbb, 0x8c, 0xcc, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb0, 0xb1, 0xba, 0xbc, 0x8e, 0xb2, 0x3f, 0x3f, - 0xbb, 0x4c, 0x5f, 0x6e, 0xa5, 0x3f, 0xd6, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_1026 = -{ - { 1026, 1, 0x003f, 0x003f, "IBM EBCDIC Latin 5 Turkish" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_1250.c b/reactos/tools/unicode/c_1250.c deleted file mode 100644 index 5ca52df6566..00000000000 --- a/reactos/tools/unicode/c_1250.c +++ /dev/null @@ -1,651 +0,0 @@ -/* code page 1250 (ANSI Eastern Europe) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit1250.txt */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x20ac, 0x0081, 0x201a, 0x0083, 0x201e, 0x2026, 0x2020, 0x2021, - 0x0088, 0x2030, 0x0160, 0x2039, 0x015a, 0x0164, 0x017d, 0x0179, - 0x0090, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, - 0x0098, 0x2122, 0x0161, 0x203a, 0x015b, 0x0165, 0x017e, 0x017a, - 0x00a0, 0x02c7, 0x02d8, 0x0141, 0x00a4, 0x0104, 0x00a6, 0x00a7, - 0x00a8, 0x00a9, 0x015e, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x017b, - 0x00b0, 0x00b1, 0x02db, 0x0142, 0x00b4, 0x00b5, 0x00b6, 0x00b7, - 0x00b8, 0x0105, 0x015f, 0x00bb, 0x013d, 0x02dd, 0x013e, 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 const unsigned char uni2cp_low[4352] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x81, 0x3f, 0x83, 0x3f, 0x3f, 0x3f, 0x3f, - 0x88, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x90, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x98, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa0, 0x21, 0x63, 0x4c, 0xa4, 0x59, 0xa6, 0xa7, - 0xa8, 0xa9, 0x61, 0xab, 0xac, 0xad, 0xae, 0x97, - 0xb0, 0xb1, 0x32, 0x33, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0x31, 0x6f, 0xbb, 0x31, 0x31, 0x33, 0x3f, - 0x41, 0xc1, 0xc2, 0x41, 0xc4, 0x41, 0x41, 0xc7, - 0x45, 0xc9, 0x45, 0xcb, 0x49, 0xcd, 0xce, 0x49, - 0x3f, 0x4e, 0x4f, 0xd3, 0xd4, 0x4f, 0xd6, 0xd7, - 0x4f, 0x55, 0xda, 0x55, 0xdc, 0xdd, 0x3f, 0xdf, - 0x61, 0xe1, 0xe2, 0x61, 0xe4, 0x61, 0x61, 0xe7, - 0x65, 0xe9, 0x65, 0xeb, 0x69, 0xed, 0xee, 0x69, - 0x3f, 0x6e, 0x6f, 0xf3, 0xf4, 0x6f, 0xf6, 0xf7, - 0x6f, 0x75, 0xfa, 0x75, 0xfc, 0xfd, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0xc3, 0xe3, 0xa5, 0xb9, 0xc6, 0xe6, - 0x43, 0x63, 0x43, 0x63, 0xc8, 0xe8, 0xcf, 0xef, - 0xd0, 0xf0, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0xca, 0xea, 0xcc, 0xec, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0xc5, 0xe5, 0x4c, 0x6c, 0xbc, 0xbe, 0x3f, - 0x3f, 0xa3, 0xb3, 0xd1, 0xf1, 0x4e, 0x6e, 0xd2, - 0xf2, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0xd5, 0xf5, 0x4f, 0x6f, 0xc0, 0xe0, 0x52, 0x72, - 0xd8, 0xf8, 0x8c, 0x9c, 0x53, 0x73, 0xaa, 0xba, - 0x8a, 0x9a, 0xde, 0xfe, 0x8d, 0x9d, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0xd9, 0xf9, - 0xdb, 0xfb, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x8f, 0x9f, 0xaf, 0xbf, 0x8e, 0x9e, 0x3f, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xd0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55, - 0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61, - 0x3f, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0200 .. 0x02ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x27, 0x22, 0x91, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0xa1, - 0x27, 0xaf, 0xb4, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa2, 0xff, 0xb0, 0xb2, 0x7e, 0xbd, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0xb4, 0x5e, 0x7e, 0xaf, 0xaf, 0xa2, 0xff, - 0xa8, 0x3f, 0xb0, 0x3f, 0xa1, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb8, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xdf, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb5, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0400 .. 0x04ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x68, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0500 .. 0x05ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0600 .. 0x06ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x25, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x96, 0x97, 0x3f, 0x3f, 0x3f, - 0x91, 0x92, 0x82, 0x3f, 0x93, 0x94, 0x84, 0x3f, - 0x86, 0x87, 0x95, 0x3f, 0x95, 0x3f, 0x85, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x89, 0x3f, 0x27, 0x94, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x8b, 0x9b, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb0, 0x3f, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x80, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x3f, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x99, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0xc5, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x8b, 0x5e, 0x9b, 0xa1, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xd8, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0xb1, 0x3f, 0x2f, 0x5c, 0x2a, - 0xb0, 0x95, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb7, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0xa6, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0xa6, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f, - 0xac, 0x3f, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f, - 0x2d, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x54, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0xa6, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0xac, - 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, - 0xa6, 0x3f, 0x3f, 0xa6, 0x3f, 0x3f, 0x54, 0x3f, - 0x3f, 0xa6, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f, - 0x2d, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3e, 0x3f, 0xa1, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x95, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2600 .. 0x26ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xa2, 0xa2, 0x30, 0x3f, 0x3f, 0x3f, - 0x2b, 0x3f, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa6, 0x3f, 0x3f, 0xa6, 0x3f, 0xa6, 0xa6, 0x3f, - 0x3f, 0x3f, 0x64, 0x64, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2700 .. 0x27ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x91, 0x92, 0x93, 0x94, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x93, 0x94, 0x84, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xb7, 0x97, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x0500, 0x0600, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x1000, 0x0b00, 0x0c00, 0x0d00, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x0e00, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x0f00 -}; - -const struct sbcs_table cptable_1250 = -{ - { 1250, 1, 0x003f, 0x003f, "ANSI Eastern Europe" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_1251.c b/reactos/tools/unicode/c_1251.c deleted file mode 100644 index e93dba84044..00000000000 --- a/reactos/tools/unicode/c_1251.c +++ /dev/null @@ -1,453 +0,0 @@ -/* code page 1251 (ANSI Cyrillic) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit1251.txt */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x0402, 0x0403, 0x201a, 0x0453, 0x201e, 0x2026, 0x2020, 0x2021, - 0x20ac, 0x2030, 0x0409, 0x2039, 0x040a, 0x040c, 0x040b, 0x040f, - 0x0452, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, - 0x0098, 0x2122, 0x0459, 0x203a, 0x045a, 0x045c, 0x045b, 0x045f, - 0x00a0, 0x040e, 0x045e, 0x0408, 0x00a4, 0x0490, 0x00a6, 0x00a7, - 0x0401, 0x00a9, 0x0404, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x0407, - 0x00b0, 0x00b1, 0x0406, 0x0456, 0x0491, 0x00b5, 0x00b6, 0x00b7, - 0x0451, 0x2116, 0x0454, 0x00bb, 0x0458, 0x0405, 0x0455, 0x0457, - 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 -}; - -static const unsigned char uni2cp_low[2816] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x98, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa0, 0x3f, 0x3f, 0x3f, 0xa4, 0x3f, 0xa6, 0xa7, - 0x3f, 0xa9, 0x3f, 0xab, 0xac, 0xad, 0xae, 0x3f, - 0xb0, 0xb1, 0x3f, 0x3f, 0x3f, 0xb5, 0xb6, 0xb7, - 0x3f, 0x3f, 0x3f, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x43, - 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x4e, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, - 0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0x3f, 0x3f, - 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x3f, 0x63, - 0x65, 0x65, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69, - 0x3f, 0x6e, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x3f, - 0x6f, 0x75, 0x75, 0x75, 0x75, 0x79, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x3f, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x3f, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55, - 0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61, - 0x3f, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0400 .. 0x04ff */ - 0x3f, 0xa8, 0x80, 0x81, 0xaa, 0xbd, 0xb2, 0xaf, - 0xa3, 0x8a, 0x8c, 0x8e, 0x8d, 0x3f, 0xa1, 0x8f, - 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, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, - 0x3f, 0xb8, 0x90, 0x83, 0xba, 0xbe, 0xb3, 0xbf, - 0xbc, 0x9a, 0x9c, 0x9e, 0x9d, 0x3f, 0xa2, 0x9f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa5, 0xb4, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x96, 0x97, 0x3f, 0x3f, 0x3f, - 0x91, 0x92, 0x82, 0x3f, 0x93, 0x94, 0x84, 0x3f, - 0x86, 0x87, 0x95, 0x3f, 0x3f, 0x3f, 0x85, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x89, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x8b, 0x9b, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x88, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb9, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x99, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0xa6, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x95, 0x76, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0xa6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x2d, 0x3f, 0xa6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f, - 0xac, 0x3f, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f, - 0x2d, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x54, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0xa6, 0x2d, 0xe3, 0xe3, 0xac, 0xac, 0xac, - 0x4c, 0x4c, 0x4c, 0x2d, 0x2d, 0x2d, 0xa6, 0xa6, - 0xa6, 0xa6, 0xa6, 0xa6, 0x54, 0x54, 0x54, 0xa6, - 0xa6, 0xa6, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f, - 0x2d, 0x3f, 0x3f, 0x3f, 0xa6, 0x3f, 0x3f, 0x3f, - 0xa6, 0x2d, 0x2d, 0x2d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3e, 0x3f, 0xa1, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x95, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2600 .. 0x26ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x4f, 0x4f, 0x30, 0x3f, 0x3f, 0x3f, - 0x2b, 0x3f, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa6, 0x3f, 0x3f, 0xa6, 0x3f, 0xa6, 0xa6, 0x3f, - 0x3f, 0x3f, 0x64, 0x64, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0a00, 0x0a00, 0x0200, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0300, 0x0400, 0x0500, 0x0600, 0x0a00, 0x0700, 0x0800, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0900 -}; - -const struct sbcs_table cptable_1251 = -{ - { 1251, 1, 0x003f, 0x003f, "ANSI Cyrillic" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_1252.c b/reactos/tools/unicode/c_1252.c deleted file mode 100644 index 73acb4c1a69..00000000000 --- a/reactos/tools/unicode/c_1252.c +++ /dev/null @@ -1,651 +0,0 @@ -/* code page 1252 (ANSI Latin 1) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit1252.txt */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x20ac, 0x0081, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, - 0x02c6, 0x2030, 0x0160, 0x2039, 0x0152, 0x008d, 0x017d, 0x008f, - 0x0090, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, - 0x02dc, 0x2122, 0x0161, 0x203a, 0x0153, 0x009d, 0x017e, 0x0178, - 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, - 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 const unsigned char uni2cp_low[4352] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x81, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x8d, 0x3f, 0x8f, - 0x90, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x9d, 0x3f, 0x3f, - 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, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0xd0, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x8c, 0x9c, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x8a, 0x9a, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x9f, 0x5a, 0x7a, 0x5a, 0x7a, 0x8e, 0x9e, 0x3f, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xd0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x83, 0x83, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55, - 0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61, - 0x3f, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0200 .. 0x02ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x27, 0x22, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x88, 0x3f, - 0x27, 0xaf, 0xb4, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xb0, 0x3f, 0x98, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0xb4, 0x5e, 0x7e, 0xaf, 0xaf, 0x3f, 0x3f, - 0xa8, 0x3f, 0xb0, 0x3f, 0x3f, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb8, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x47, 0x3f, 0x3f, 0x3f, 0x3f, - 0x54, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x53, 0x3f, 0x3f, 0x46, 0x3f, - 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x61, 0xdf, 0x3f, 0x64, 0x65, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb5, 0x3f, 0x3f, 0x3f, - 0x70, 0x3f, 0x3f, 0x73, 0x74, 0x3f, 0x66, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0400 .. 0x04ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x68, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0500 .. 0x05ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0600 .. 0x06ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x25, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x96, 0x97, 0x3f, 0x3f, 0x3d, - 0x91, 0x92, 0x82, 0x3f, 0x93, 0x94, 0x84, 0x3f, - 0x86, 0x87, 0x95, 0x3f, 0xb7, 0x3f, 0x85, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x89, 0x3f, 0x27, 0x3f, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb0, 0x3f, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa2, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x50, - 0x3f, 0x3f, 0x3f, 0x3f, 0x80, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x3f, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x99, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0xc5, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xd8, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0xb1, 0x3f, 0x2f, 0x5c, 0x2a, - 0xb0, 0xb7, 0x76, 0x3f, 0x3f, 0x3f, 0x38, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7c, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x98, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3d, 0x3f, 0x3f, 0x3d, 0x3d, 0x3f, 0x3f, - 0x3f, 0x3f, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb7, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0xa6, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xac, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x28, 0x29, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x2d, 0x3f, 0xa6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, - 0x2b, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, - 0x2b, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xa6, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0xa6, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0xa6, 0xa6, - 0xa6, 0xa6, 0xa6, 0xa6, 0x2d, 0x2d, 0x2d, 0x2d, - 0x2d, 0x2d, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xaf, 0x3f, 0x3f, 0x3f, 0x5f, 0x3f, 0x3f, 0x3f, - 0xa6, 0x3f, 0x3f, 0x3f, 0xa6, 0x3f, 0x3f, 0x3f, - 0xa6, 0xa6, 0xa6, 0xa6, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2600 .. 0x26ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xa4, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2700 .. 0x27ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xb7, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x0500, 0x0600, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x1000, 0x0b00, 0x0c00, 0x0d00, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x0e00, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x0f00 -}; - -const struct sbcs_table cptable_1252 = -{ - { 1252, 1, 0x003f, 0x003f, "ANSI Latin 1" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_1253.c b/reactos/tools/unicode/c_1253.c deleted file mode 100644 index 0eaa186f5ad..00000000000 --- a/reactos/tools/unicode/c_1253.c +++ /dev/null @@ -1,486 +0,0 @@ -/* code page 1253 (ANSI Greek) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit1253.txt */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x20ac, 0x0081, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, - 0x0088, 0x2030, 0x008a, 0x2039, 0x008c, 0x008d, 0x008e, 0x008f, - 0x0090, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, - 0x0098, 0x2122, 0x009a, 0x203a, 0x009c, 0x009d, 0x009e, 0x009f, - 0x00a0, 0x0385, 0x0386, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, - 0x00a8, 0x00a9, 0xf8f9, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x2015, - 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x0384, 0x00b5, 0x00b6, 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, 0xf8fa, 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, 0xf8fb -}; - -static const unsigned char uni2cp_low[3072] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x81, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x88, 0x3f, 0x8a, 0x3f, 0x8c, 0x8d, 0x8e, 0x8f, - 0x90, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x98, 0x3f, 0x9a, 0x3f, 0x9c, 0x9d, 0x9e, 0x9f, - 0xa0, 0x3f, 0x3f, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0x3f, 0xab, 0xac, 0xad, 0xae, 0x3f, - 0xb0, 0xb1, 0xb2, 0xb3, 0x2f, 0xb5, 0xb6, 0xb7, - 0x3f, 0x3f, 0x3f, 0xbb, 0x3f, 0xbd, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x43, - 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x4e, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, - 0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0x3f, 0x3f, - 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x3f, 0x63, - 0x65, 0x65, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69, - 0x3f, 0x6e, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x3f, - 0x6f, 0x75, 0x75, 0x75, 0x75, 0x79, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x3f, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x3f, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x83, 0x83, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55, - 0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61, - 0x3f, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0xa1, 0xa2, 0x3f, - 0xb8, 0xb9, 0xba, 0x3f, 0xbc, 0x3f, 0xbe, 0xbf, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0xd0, 0xd1, 0x3f, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x96, 0x97, 0xaf, 0x3f, 0x3f, - 0x91, 0x92, 0x82, 0x3f, 0x93, 0x94, 0x84, 0x3f, - 0x86, 0x87, 0x95, 0x3f, 0x3f, 0x3f, 0x85, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x89, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x8b, 0x9b, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x80, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x99, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0xa6, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0xa6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x2d, 0x3f, 0xa6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f, - 0xac, 0x3f, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f, - 0x2d, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x54, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0xa6, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0xac, - 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, - 0xa6, 0x3f, 0x3f, 0xa6, 0x3f, 0x3f, 0x54, 0x3f, - 0x3f, 0xa6, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f, - 0x2d, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3e, 0x3f, 0xa1, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x95, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2600 .. 0x26ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x4f, 0x4f, 0x30, 0x3f, 0x3f, 0x3f, - 0x2b, 0x3f, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa6, 0x3f, 0x3f, 0xa6, 0x3f, 0xa6, 0xa6, 0x3f, - 0x3f, 0x3f, 0x64, 0x64, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xf800 .. 0xf8ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xaa, 0xd2, 0xff, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0b00, 0x0200, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0300, 0x0400, 0x0500, 0x0600, 0x0b00, 0x0700, 0x0800, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, - 0x0900, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0a00 -}; - -const struct sbcs_table cptable_1253 = -{ - { 1253, 1, 0x003f, 0x003f, "ANSI Greek" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_1254.c b/reactos/tools/unicode/c_1254.c deleted file mode 100644 index 636d7b30074..00000000000 --- a/reactos/tools/unicode/c_1254.c +++ /dev/null @@ -1,651 +0,0 @@ -/* code page 1254 (ANSI Turkish) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit1254.txt */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x20ac, 0x0081, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, - 0x02c6, 0x2030, 0x0160, 0x2039, 0x0152, 0x008d, 0x008e, 0x008f, - 0x0090, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, - 0x02dc, 0x2122, 0x0161, 0x203a, 0x0153, 0x009d, 0x009e, 0x0178, - 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 const unsigned char uni2cp_low[4352] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x81, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x8d, 0x8e, 0x8f, - 0x90, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x9d, 0x9e, 0x3f, - 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, - 0x3f, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0x59, 0x3f, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0x3f, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x79, 0x3f, 0xff, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0xd0, 0xf0, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0xdd, 0xfd, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x8c, 0x9c, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0xde, 0xfe, - 0x8a, 0x9a, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x9f, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x3f, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x83, 0x83, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55, - 0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61, - 0x3f, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0200 .. 0x02ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x27, 0x22, 0x91, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x88, 0x5e, - 0x27, 0xaf, 0xb4, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x5e, 0x27, 0xb0, 0xb8, 0x98, 0xa8, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0xb4, 0x5e, 0x98, 0xaf, 0xaf, 0x88, 0xb7, - 0xa8, 0x3f, 0xa7, 0x3f, 0x88, 0x3f, 0xa8, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb8, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xdf, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb5, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0400 .. 0x04ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x68, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0500 .. 0x05ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0600 .. 0x06ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x25, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x96, 0x97, 0x3f, 0x3f, 0x3f, - 0x91, 0x92, 0x82, 0x3f, 0x93, 0x94, 0x84, 0x3f, - 0x86, 0x87, 0x95, 0x3f, 0x95, 0x3f, 0x85, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x89, 0x3f, 0x27, 0xa8, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x8b, 0x9b, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb0, 0x3f, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb0, 0x30, 0xb2, 0xb3, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x80, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x3f, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x99, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0xc5, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x8b, 0x5e, 0x9b, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xd8, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0xb1, 0x3f, 0x2f, 0x5c, 0x2a, - 0xb0, 0x95, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb7, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0xa6, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0xa6, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f, - 0xac, 0x3f, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f, - 0x2d, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x54, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0xa6, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0xac, - 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, - 0xa6, 0x3f, 0x3f, 0xa6, 0x3f, 0x3f, 0x54, 0x3f, - 0x3f, 0xa6, 0x3f, 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f, - 0x2d, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3e, 0x3f, 0xa1, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x95, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2600 .. 0x26ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x4f, 0x4f, 0x30, 0x3f, 0x3f, 0x3f, - 0x2b, 0x3f, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa6, 0x3f, 0x3f, 0xa6, 0x3f, 0xa6, 0xa6, 0x3f, - 0x3f, 0x3f, 0x64, 0x64, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2700 .. 0x27ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x91, 0x92, 0x93, 0x94, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x3d, 0x3f, 0x22, 0x22, 0x84, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xb7, 0x97, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x0500, 0x0600, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x1000, 0x0b00, 0x0c00, 0x0d00, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x0e00, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x0f00 -}; - -const struct sbcs_table cptable_1254 = -{ - { 1254, 1, 0x003f, 0x003f, "ANSI Turkish" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_1255.c b/reactos/tools/unicode/c_1255.c deleted file mode 100644 index b95842adfe4..00000000000 --- a/reactos/tools/unicode/c_1255.c +++ /dev/null @@ -1,387 +0,0 @@ -/* code page 1255 (ANSI Hebrew) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit1255.txt */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x20ac, 0x0081, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, - 0x02c6, 0x2030, 0x008a, 0x2039, 0x008c, 0x008d, 0x008e, 0x008f, - 0x0090, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, - 0x02dc, 0x2122, 0x009a, 0x203a, 0x009c, 0x009d, 0x009e, 0x009f, - 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x20aa, 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, 0x00bf, - 0x05b0, 0x05b1, 0x05b2, 0x05b3, 0x05b4, 0x05b5, 0x05b6, 0x05b7, - 0x05b8, 0x05b9, 0x05ba, 0x05bb, 0x05bc, 0x05bd, 0x05be, 0x05bf, - 0x05c0, 0x05c1, 0x05c2, 0x05c3, 0x05f0, 0x05f1, 0x05f2, 0x05f3, - 0x05f4, 0xf88d, 0xf88e, 0xf88f, 0xf890, 0xf891, 0xf892, 0xf893, - 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, 0xf894, 0xf895, 0x200e, 0x200f, 0xf896 -}; - -static const unsigned char uni2cp_low[2304] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x81, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x8a, 0x3f, 0x8c, 0x8d, 0x8e, 0x8f, - 0x90, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x9a, 0x3f, 0x9c, 0x9d, 0x9e, 0x9f, - 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0x3f, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0x3f, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xaa, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xba, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0100 .. 0x01ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x46, 0x83, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0200 .. 0x02ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x88, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x98, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0500 .. 0x05ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0xd0, 0xd1, 0xd2, 0xd3, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xfd, 0xfe, - 0x3f, 0x3f, 0x3f, 0x96, 0x97, 0x3f, 0x3f, 0x3f, - 0x91, 0x92, 0x82, 0x3f, 0x93, 0x94, 0x84, 0x3f, - 0x86, 0x87, 0x95, 0x3f, 0x3f, 0x3f, 0x85, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x89, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xa4, 0x3f, 0x80, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x99, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xf800 .. 0xf8ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xd9, 0xda, 0xdb, - 0xdc, 0xdd, 0xde, 0xdf, 0xfb, 0xfc, 0xff, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0800, 0x0800, 0x0300, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0400, 0x0500, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, - 0x0600, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0700 -}; - -const struct sbcs_table cptable_1255 = -{ - { 1255, 1, 0x003f, 0x003f, "ANSI Hebrew" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_1256.c b/reactos/tools/unicode/c_1256.c deleted file mode 100644 index 228e9c937f3..00000000000 --- a/reactos/tools/unicode/c_1256.c +++ /dev/null @@ -1,420 +0,0 @@ -/* code page 1256 (ANSI Arabic) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit1256.txt */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x20ac, 0x067e, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, - 0x02c6, 0x2030, 0x0679, 0x2039, 0x0152, 0x0686, 0x0698, 0x0688, - 0x06af, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, - 0x06a9, 0x2122, 0x0691, 0x203a, 0x0153, 0x200c, 0x200d, 0x06ba, - 0x00a0, 0x060c, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, - 0x00a8, 0x00a9, 0x06be, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, - 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, - 0x00b8, 0x00b9, 0x061b, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x061f, - 0x06c1, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, - 0x0628, 0x0629, 0x062a, 0x062b, 0x062c, 0x062d, 0x062e, 0x062f, - 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x00d7, - 0x0637, 0x0638, 0x0639, 0x063a, 0x0640, 0x0641, 0x0642, 0x0643, - 0x00e0, 0x0644, 0x00e2, 0x0645, 0x0646, 0x0647, 0x0648, 0x00e7, - 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x0649, 0x064a, 0x00ee, 0x00ef, - 0x064b, 0x064c, 0x064d, 0x064e, 0x00f4, 0x064f, 0x0650, 0x00f7, - 0x0651, 0x00f9, 0x0652, 0x00fb, 0x00fc, 0x200e, 0x200f, 0x06d2 -}; - -static const unsigned char uni2cp_low[2560] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa0, 0x3f, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0x3f, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0x3f, 0xbb, 0xbc, 0xbd, 0xbe, 0x3f, - 0x41, 0x3f, 0x41, 0x3f, 0x3f, 0x3f, 0x3f, 0x43, - 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0xd7, - 0x3f, 0x55, 0x3f, 0x55, 0x55, 0x3f, 0x3f, 0x3f, - 0xe0, 0x3f, 0xe2, 0x3f, 0x3f, 0x3f, 0x3f, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0x3f, 0x3f, 0xee, 0xef, - 0x3f, 0x3f, 0x3f, 0x3f, 0xf4, 0x3f, 0x3f, 0xf7, - 0x3f, 0xf9, 0x3f, 0xfb, 0xfc, 0x3f, 0x3f, 0x3f, - /* 0x0100 .. 0x01ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x8c, 0x9c, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x46, 0x83, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0200 .. 0x02ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x88, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0600 .. 0x06ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xa1, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xba, 0x3f, 0x3f, 0x3f, 0xbf, - 0x3f, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd8, - 0xd9, 0xda, 0xdb, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xdc, 0xdd, 0xde, 0xdf, 0xe1, 0xe3, 0xe4, 0xe5, - 0xe6, 0xec, 0xed, 0xf0, 0xf1, 0xf2, 0xf3, 0xf5, - 0xf6, 0xf8, 0xfa, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x8a, 0x3f, 0x3f, 0x3f, 0x3f, 0x81, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x8d, 0x3f, - 0x8f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x9a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x8e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x98, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x90, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x9f, 0x3f, 0x3f, 0x3f, 0xaa, 0x3f, - 0x3f, 0xc0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xed, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xff, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x9d, 0x9e, 0xfd, 0xfe, - 0x3f, 0x3f, 0x3f, 0x96, 0x97, 0x3f, 0x3f, 0x3f, - 0x91, 0x92, 0x82, 0x3f, 0x93, 0x94, 0x84, 0x3f, - 0x86, 0x87, 0x95, 0x3f, 0x3f, 0x3f, 0x85, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x89, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x80, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x99, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x81, 0x81, - 0x81, 0x81, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x8a, 0x8a, - 0x8a, 0x8a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x8d, 0x8d, 0x8d, 0x8d, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x8f, 0x8f, 0x8e, 0x8e, 0x9a, 0x9a, 0x98, 0x98, - 0x98, 0x98, 0x90, 0x90, 0x90, 0x90, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x9f, 0x9f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xc0, 0xc0, - 0xc0, 0xc0, 0xaa, 0xaa, 0xaa, 0xaa, 0xff, 0xff, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf0, 0xf0, 0xf1, 0x3f, 0xf2, 0x3f, 0xf3, 0xf3, - 0xf5, 0xf5, 0xf6, 0xf6, 0xf8, 0xf8, 0xfa, 0xfa, - 0xc1, 0xc2, 0xc2, 0xc3, 0xc3, 0xc4, 0xc4, 0xc5, - 0xc5, 0xc6, 0xc6, 0xc6, 0xc6, 0xc7, 0xc7, 0xc8, - 0xc8, 0xc8, 0xc8, 0xc9, 0xc9, 0xca, 0xca, 0xca, - 0xca, 0xcb, 0xcb, 0xcb, 0xcb, 0xcc, 0xcc, 0xcc, - 0xcc, 0xcd, 0xcd, 0xcd, 0xcd, 0xce, 0xce, 0xce, - 0xce, 0xcf, 0xcf, 0xd0, 0xd0, 0xd1, 0xd1, 0xd2, - 0xd2, 0xd3, 0xd3, 0xd3, 0xd3, 0xd4, 0xd4, 0xd4, - 0xd4, 0xd5, 0xd5, 0xd5, 0xd5, 0xd6, 0xd6, 0xd6, - 0xd6, 0xd8, 0xd8, 0xd8, 0xd8, 0xd9, 0xd9, 0xd9, - 0xd9, 0xda, 0xda, 0xda, 0xda, 0xdb, 0xdb, 0xdb, - 0xdb, 0xdd, 0xdd, 0xdd, 0xdd, 0xde, 0xde, 0xde, - 0xde, 0xdf, 0xdf, 0xdf, 0xdf, 0xe1, 0xe1, 0xe1, - 0xe1, 0xe3, 0xe3, 0xe3, 0xe3, 0xe4, 0xe4, 0xe4, - 0xe4, 0xe5, 0xe5, 0xe5, 0xe5, 0xe6, 0xe6, 0xec, - 0xec, 0xed, 0xed, 0xed, 0xed, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0900, 0x0900, 0x0900, 0x0300, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0400, 0x0500, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0600, 0x0900, 0x0900, 0x0700, 0x0800 -}; - -const struct sbcs_table cptable_1256 = -{ - { 1256, 1, 0x003f, 0x003f, "ANSI Arabic" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_1257.c b/reactos/tools/unicode/c_1257.c deleted file mode 100644 index af3c8eeb1da..00000000000 --- a/reactos/tools/unicode/c_1257.c +++ /dev/null @@ -1,354 +0,0 @@ -/* code page 1257 (ANSI Baltic) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit1257.txt */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x20ac, 0x0081, 0x201a, 0x0083, 0x201e, 0x2026, 0x2020, 0x2021, - 0x0088, 0x2030, 0x008a, 0x2039, 0x008c, 0x00a8, 0x02c7, 0x00b8, - 0x0090, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, - 0x0098, 0x2122, 0x009a, 0x203a, 0x009c, 0x00af, 0x02db, 0x009f, - 0x00a0, 0xf8fc, 0x00a2, 0x00a3, 0x00a4, 0xf8fd, 0x00a6, 0x00a7, - 0x00d8, 0x00a9, 0x0156, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00c6, - 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 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, 0x02d9 -}; - -static const unsigned char uni2cp_low[2048] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x81, 0x3f, 0x83, 0x3f, 0x3f, 0x3f, 0x3f, - 0x88, 0x3f, 0x8a, 0x3f, 0x8c, 0x3f, 0x3f, 0x3f, - 0x90, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x98, 0x3f, 0x9a, 0x3f, 0x9c, 0x3f, 0x3f, 0x9f, - 0xa0, 0x3f, 0xa2, 0xa3, 0xa4, 0x3f, 0xa6, 0xa7, - 0x8d, 0xa9, 0x3f, 0xab, 0xac, 0xad, 0xae, 0x9d, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0x8f, 0xb9, 0x3f, 0xbb, 0xbc, 0xbd, 0xbe, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xc4, 0xc5, 0xaf, 0x3f, - 0x3f, 0xc9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xd3, 0x3f, 0xd5, 0xd6, 0xd7, - 0xa8, 0x3f, 0x3f, 0x3f, 0xdc, 0x3f, 0x3f, 0xdf, - 0x3f, 0x3f, 0x3f, 0x3f, 0xe4, 0xe5, 0xbf, 0x3f, - 0x3f, 0xe9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xf3, 0x3f, 0xf5, 0xf6, 0xf7, - 0xb8, 0x3f, 0x3f, 0x3f, 0xfc, 0x3f, 0x3f, 0x3f, - /* 0x0100 .. 0x01ff */ - 0xc2, 0xe2, 0x3f, 0x3f, 0xc0, 0xe0, 0xc3, 0xe3, - 0x3f, 0x3f, 0x3f, 0x3f, 0xc8, 0xe8, 0x3f, 0x3f, - 0x3f, 0x3f, 0xc7, 0xe7, 0x3f, 0x3f, 0xcb, 0xeb, - 0xc6, 0xe6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xcc, 0xec, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xce, 0xee, 0x3f, 0x3f, 0xc1, 0xe1, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xcd, 0xed, - 0x3f, 0x3f, 0x3f, 0xcf, 0xef, 0x3f, 0x3f, 0x3f, - 0x3f, 0xd9, 0xf9, 0xd1, 0xf1, 0xd2, 0xf2, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xd4, 0xf4, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xaa, 0xba, - 0x3f, 0x3f, 0xda, 0xfa, 0x3f, 0x3f, 0x3f, 0x3f, - 0xd0, 0xf0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xdb, 0xfb, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xd8, 0xf8, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xca, 0xea, 0xdd, 0xfd, 0xde, 0xfe, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0200 .. 0x02ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x8e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xff, 0x3f, 0x9e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x96, 0x97, 0x3f, 0x3f, 0x3f, - 0x91, 0x92, 0x82, 0x3f, 0x93, 0x94, 0x84, 0x3f, - 0x86, 0x87, 0x95, 0x3f, 0x3f, 0x3f, 0x85, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x89, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x80, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x99, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xf800 .. 0xf8ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xa1, 0xa5, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0300, 0x0400, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0500, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0600 -}; - -const struct sbcs_table cptable_1257 = -{ - { 1257, 1, 0x003f, 0x003f, "ANSI Baltic" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_1258.c b/reactos/tools/unicode/c_1258.c deleted file mode 100644 index dae642ec3bb..00000000000 --- a/reactos/tools/unicode/c_1258.c +++ /dev/null @@ -1,354 +0,0 @@ -/* code page 1258 (ANSI/OEM Viet Nam) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit1258.txt */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x20ac, 0x0081, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, - 0x02c6, 0x2030, 0x008a, 0x2039, 0x0152, 0x008d, 0x008e, 0x008f, - 0x0090, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, - 0x02dc, 0x2122, 0x009a, 0x203a, 0x0153, 0x009d, 0x009e, 0x0178, - 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, 0x0102, 0x00c4, 0x00c5, 0x00c6, 0x00c7, - 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x0300, 0x00cd, 0x00ce, 0x00cf, - 0x0110, 0x00d1, 0x0309, 0x00d3, 0x00d4, 0x01a0, 0x00d6, 0x00d7, - 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x01af, 0x0303, 0x00df, - 0x00e0, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x00e5, 0x00e6, 0x00e7, - 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x0301, 0x00ed, 0x00ee, 0x00ef, - 0x0111, 0x00f1, 0x0323, 0x00f3, 0x00f4, 0x01a1, 0x00f6, 0x00f7, - 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x01b0, 0x20ab, 0x00ff -}; - -static const unsigned char uni2cp_low[2048] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x81, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x8a, 0x3f, 0x3f, 0x8d, 0x8e, 0x8f, - 0x90, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x9a, 0x3f, 0x3f, 0x9d, 0x9e, 0x3f, - 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, 0x3f, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0x3f, 0xcd, 0xce, 0xcf, - 0x3f, 0xd1, 0x3f, 0xd3, 0xd4, 0x3f, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0x3f, 0x3f, 0xdf, - 0xe0, 0xe1, 0xe2, 0x3f, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0x3f, 0xed, 0xee, 0xef, - 0x3f, 0xf1, 0x3f, 0xf3, 0xf4, 0x3f, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x3f, 0x3f, 0xff, - /* 0x0100 .. 0x01ff */ - 0x3f, 0x3f, 0xc3, 0xe3, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xd0, 0xf0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x8c, 0x9c, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x9f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x83, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xd5, 0xf5, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xdd, - 0xfd, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0200 .. 0x02ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x88, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x98, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0xcc, 0xec, 0x3f, 0xde, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xd2, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xf2, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x96, 0x97, 0x3f, 0x3f, 0x3f, - 0x91, 0x92, 0x82, 0x3f, 0x93, 0x94, 0x84, 0x3f, - 0x86, 0x87, 0x95, 0x3f, 0x3f, 0x3f, 0x85, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x89, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x8b, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xfe, 0x80, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x99, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0400, 0x0500, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, - 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0600 -}; - -const struct sbcs_table cptable_1258 = -{ - { 1258, 1, 0x003f, 0x003f, "ANSI/OEM Viet Nam" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_1361.c b/reactos/tools/unicode/c_1361.c deleted file mode 100644 index dfad2a8ea5e..00000000000 --- a/reactos/tools/unicode/c_1361.c +++ /dev/null @@ -1,8907 +0,0 @@ -/* code page 1361 (Korean Johab) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[28928] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x20a9, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x0080, 0x0081, 0x0082, 0x0083, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x003f, - 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, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte 84 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x3133, 0x003f, 0x3135, 0x3136, - 0x003f, 0x003f, 0x313a, 0x313b, 0x313c, 0x313d, 0x313e, 0x313f, - 0x3140, 0x003f, 0x003f, 0x003f, 0x3144, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x314f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3150, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3151, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3152, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3153, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte 85 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3154, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3155, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3156, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3157, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3158, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3159, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte 86 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x315a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x315b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x315c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x315d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x315e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x315f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte 87 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3160, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3161, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3162, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3163, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte 88 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3131, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xac00, 0xac01, 0xac02, 0xac03, 0xac04, 0xac05, 0xac06, - 0xac07, 0xac08, 0xac09, 0xac0a, 0xac0b, 0xac0c, 0xac0d, 0xac0e, - 0xac0f, 0xac10, 0x003f, 0xac11, 0xac12, 0xac13, 0xac14, 0xac15, - 0xac16, 0xac17, 0xac18, 0xac19, 0xac1a, 0xac1b, 0x003f, 0x003f, - 0x003f, 0xac1c, 0xac1d, 0xac1e, 0xac1f, 0xac20, 0xac21, 0xac22, - 0xac23, 0xac24, 0xac25, 0xac26, 0xac27, 0xac28, 0xac29, 0xac2a, - 0xac2b, 0xac2c, 0x003f, 0xac2d, 0xac2e, 0xac2f, 0xac30, 0xac31, - 0xac32, 0xac33, 0xac34, 0xac35, 0xac36, 0xac37, 0x003f, 0x003f, - 0x003f, 0xac38, 0xac39, 0xac3a, 0xac3b, 0xac3c, 0xac3d, 0xac3e, - 0xac3f, 0xac40, 0xac41, 0xac42, 0xac43, 0xac44, 0xac45, 0xac46, - 0xac47, 0xac48, 0x003f, 0xac49, 0xac4a, 0xac4b, 0xac4c, 0xac4d, - 0xac4e, 0xac4f, 0xac50, 0xac51, 0xac52, 0xac53, 0x003f, 0x003f, - 0x003f, 0xac54, 0xac55, 0xac56, 0xac57, 0xac58, 0xac59, 0xac5a, - 0xac5b, 0xac5c, 0xac5d, 0xac5e, 0xac5f, 0xac60, 0xac61, 0xac62, - 0xac63, 0xac64, 0x003f, 0xac65, 0xac66, 0xac67, 0xac68, 0xac69, - 0xac6a, 0xac6b, 0xac6c, 0xac6d, 0xac6e, 0xac6f, 0x003f, 0x003f, - 0x003f, 0xac70, 0xac71, 0xac72, 0xac73, 0xac74, 0xac75, 0xac76, - 0xac77, 0xac78, 0xac79, 0xac7a, 0xac7b, 0xac7c, 0xac7d, 0xac7e, - 0xac7f, 0xac80, 0x003f, 0xac81, 0xac82, 0xac83, 0xac84, 0xac85, - 0xac86, 0xac87, 0xac88, 0xac89, 0xac8a, 0xac8b, 0x003f, 0x003f, - /* lead byte 89 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xac8c, 0xac8d, 0xac8e, 0xac8f, 0xac90, 0xac91, 0xac92, - 0xac93, 0xac94, 0xac95, 0xac96, 0xac97, 0xac98, 0xac99, 0xac9a, - 0xac9b, 0xac9c, 0x003f, 0xac9d, 0xac9e, 0xac9f, 0xaca0, 0xaca1, - 0xaca2, 0xaca3, 0xaca4, 0xaca5, 0xaca6, 0xaca7, 0x003f, 0x003f, - 0x003f, 0xaca8, 0xaca9, 0xacaa, 0xacab, 0xacac, 0xacad, 0xacae, - 0xacaf, 0xacb0, 0xacb1, 0xacb2, 0xacb3, 0xacb4, 0xacb5, 0xacb6, - 0xacb7, 0xacb8, 0x003f, 0xacb9, 0xacba, 0xacbb, 0xacbc, 0xacbd, - 0xacbe, 0xacbf, 0xacc0, 0xacc1, 0xacc2, 0xacc3, 0x003f, 0x003f, - 0x003f, 0xacc4, 0xacc5, 0xacc6, 0xacc7, 0xacc8, 0xacc9, 0xacca, - 0xaccb, 0xaccc, 0xaccd, 0xacce, 0xaccf, 0xacd0, 0xacd1, 0xacd2, - 0xacd3, 0xacd4, 0x003f, 0xacd5, 0xacd6, 0xacd7, 0xacd8, 0xacd9, - 0xacda, 0xacdb, 0xacdc, 0xacdd, 0xacde, 0xacdf, 0x003f, 0x003f, - 0x003f, 0xace0, 0xace1, 0xace2, 0xace3, 0xace4, 0xace5, 0xace6, - 0xace7, 0xace8, 0xace9, 0xacea, 0xaceb, 0xacec, 0xaced, 0xacee, - 0xacef, 0xacf0, 0x003f, 0xacf1, 0xacf2, 0xacf3, 0xacf4, 0xacf5, - 0xacf6, 0xacf7, 0xacf8, 0xacf9, 0xacfa, 0xacfb, 0x003f, 0x003f, - 0x003f, 0xacfc, 0xacfd, 0xacfe, 0xacff, 0xad00, 0xad01, 0xad02, - 0xad03, 0xad04, 0xad05, 0xad06, 0xad07, 0xad08, 0xad09, 0xad0a, - 0xad0b, 0xad0c, 0x003f, 0xad0d, 0xad0e, 0xad0f, 0xad10, 0xad11, - 0xad12, 0xad13, 0xad14, 0xad15, 0xad16, 0xad17, 0x003f, 0x003f, - 0x003f, 0xad18, 0xad19, 0xad1a, 0xad1b, 0xad1c, 0xad1d, 0xad1e, - 0xad1f, 0xad20, 0xad21, 0xad22, 0xad23, 0xad24, 0xad25, 0xad26, - 0xad27, 0xad28, 0x003f, 0xad29, 0xad2a, 0xad2b, 0xad2c, 0xad2d, - 0xad2e, 0xad2f, 0xad30, 0xad31, 0xad32, 0xad33, 0x003f, 0x003f, - /* lead byte 8a */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xad34, 0xad35, 0xad36, 0xad37, 0xad38, 0xad39, 0xad3a, - 0xad3b, 0xad3c, 0xad3d, 0xad3e, 0xad3f, 0xad40, 0xad41, 0xad42, - 0xad43, 0xad44, 0x003f, 0xad45, 0xad46, 0xad47, 0xad48, 0xad49, - 0xad4a, 0xad4b, 0xad4c, 0xad4d, 0xad4e, 0xad4f, 0x003f, 0x003f, - 0x003f, 0xad50, 0xad51, 0xad52, 0xad53, 0xad54, 0xad55, 0xad56, - 0xad57, 0xad58, 0xad59, 0xad5a, 0xad5b, 0xad5c, 0xad5d, 0xad5e, - 0xad5f, 0xad60, 0x003f, 0xad61, 0xad62, 0xad63, 0xad64, 0xad65, - 0xad66, 0xad67, 0xad68, 0xad69, 0xad6a, 0xad6b, 0x003f, 0x003f, - 0x003f, 0xad6c, 0xad6d, 0xad6e, 0xad6f, 0xad70, 0xad71, 0xad72, - 0xad73, 0xad74, 0xad75, 0xad76, 0xad77, 0xad78, 0xad79, 0xad7a, - 0xad7b, 0xad7c, 0x003f, 0xad7d, 0xad7e, 0xad7f, 0xad80, 0xad81, - 0xad82, 0xad83, 0xad84, 0xad85, 0xad86, 0xad87, 0x003f, 0x003f, - 0x003f, 0xad88, 0xad89, 0xad8a, 0xad8b, 0xad8c, 0xad8d, 0xad8e, - 0xad8f, 0xad90, 0xad91, 0xad92, 0xad93, 0xad94, 0xad95, 0xad96, - 0xad97, 0xad98, 0x003f, 0xad99, 0xad9a, 0xad9b, 0xad9c, 0xad9d, - 0xad9e, 0xad9f, 0xada0, 0xada1, 0xada2, 0xada3, 0x003f, 0x003f, - 0x003f, 0xada4, 0xada5, 0xada6, 0xada7, 0xada8, 0xada9, 0xadaa, - 0xadab, 0xadac, 0xadad, 0xadae, 0xadaf, 0xadb0, 0xadb1, 0xadb2, - 0xadb3, 0xadb4, 0x003f, 0xadb5, 0xadb6, 0xadb7, 0xadb8, 0xadb9, - 0xadba, 0xadbb, 0xadbc, 0xadbd, 0xadbe, 0xadbf, 0x003f, 0x003f, - 0x003f, 0xadc0, 0xadc1, 0xadc2, 0xadc3, 0xadc4, 0xadc5, 0xadc6, - 0xadc7, 0xadc8, 0xadc9, 0xadca, 0xadcb, 0xadcc, 0xadcd, 0xadce, - 0xadcf, 0xadd0, 0x003f, 0xadd1, 0xadd2, 0xadd3, 0xadd4, 0xadd5, - 0xadd6, 0xadd7, 0xadd8, 0xadd9, 0xadda, 0xaddb, 0x003f, 0x003f, - /* lead byte 8b */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xaddc, 0xaddd, 0xadde, 0xaddf, 0xade0, 0xade1, 0xade2, - 0xade3, 0xade4, 0xade5, 0xade6, 0xade7, 0xade8, 0xade9, 0xadea, - 0xadeb, 0xadec, 0x003f, 0xaded, 0xadee, 0xadef, 0xadf0, 0xadf1, - 0xadf2, 0xadf3, 0xadf4, 0xadf5, 0xadf6, 0xadf7, 0x003f, 0x003f, - 0x003f, 0xadf8, 0xadf9, 0xadfa, 0xadfb, 0xadfc, 0xadfd, 0xadfe, - 0xadff, 0xae00, 0xae01, 0xae02, 0xae03, 0xae04, 0xae05, 0xae06, - 0xae07, 0xae08, 0x003f, 0xae09, 0xae0a, 0xae0b, 0xae0c, 0xae0d, - 0xae0e, 0xae0f, 0xae10, 0xae11, 0xae12, 0xae13, 0x003f, 0x003f, - 0x003f, 0xae14, 0xae15, 0xae16, 0xae17, 0xae18, 0xae19, 0xae1a, - 0xae1b, 0xae1c, 0xae1d, 0xae1e, 0xae1f, 0xae20, 0xae21, 0xae22, - 0xae23, 0xae24, 0x003f, 0xae25, 0xae26, 0xae27, 0xae28, 0xae29, - 0xae2a, 0xae2b, 0xae2c, 0xae2d, 0xae2e, 0xae2f, 0x003f, 0x003f, - 0x003f, 0xae30, 0xae31, 0xae32, 0xae33, 0xae34, 0xae35, 0xae36, - 0xae37, 0xae38, 0xae39, 0xae3a, 0xae3b, 0xae3c, 0xae3d, 0xae3e, - 0xae3f, 0xae40, 0x003f, 0xae41, 0xae42, 0xae43, 0xae44, 0xae45, - 0xae46, 0xae47, 0xae48, 0xae49, 0xae4a, 0xae4b, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte 8c */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3132, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xae4c, 0xae4d, 0xae4e, 0xae4f, 0xae50, 0xae51, 0xae52, - 0xae53, 0xae54, 0xae55, 0xae56, 0xae57, 0xae58, 0xae59, 0xae5a, - 0xae5b, 0xae5c, 0x003f, 0xae5d, 0xae5e, 0xae5f, 0xae60, 0xae61, - 0xae62, 0xae63, 0xae64, 0xae65, 0xae66, 0xae67, 0x003f, 0x003f, - 0x003f, 0xae68, 0xae69, 0xae6a, 0xae6b, 0xae6c, 0xae6d, 0xae6e, - 0xae6f, 0xae70, 0xae71, 0xae72, 0xae73, 0xae74, 0xae75, 0xae76, - 0xae77, 0xae78, 0x003f, 0xae79, 0xae7a, 0xae7b, 0xae7c, 0xae7d, - 0xae7e, 0xae7f, 0xae80, 0xae81, 0xae82, 0xae83, 0x003f, 0x003f, - 0x003f, 0xae84, 0xae85, 0xae86, 0xae87, 0xae88, 0xae89, 0xae8a, - 0xae8b, 0xae8c, 0xae8d, 0xae8e, 0xae8f, 0xae90, 0xae91, 0xae92, - 0xae93, 0xae94, 0x003f, 0xae95, 0xae96, 0xae97, 0xae98, 0xae99, - 0xae9a, 0xae9b, 0xae9c, 0xae9d, 0xae9e, 0xae9f, 0x003f, 0x003f, - 0x003f, 0xaea0, 0xaea1, 0xaea2, 0xaea3, 0xaea4, 0xaea5, 0xaea6, - 0xaea7, 0xaea8, 0xaea9, 0xaeaa, 0xaeab, 0xaeac, 0xaead, 0xaeae, - 0xaeaf, 0xaeb0, 0x003f, 0xaeb1, 0xaeb2, 0xaeb3, 0xaeb4, 0xaeb5, - 0xaeb6, 0xaeb7, 0xaeb8, 0xaeb9, 0xaeba, 0xaebb, 0x003f, 0x003f, - 0x003f, 0xaebc, 0xaebd, 0xaebe, 0xaebf, 0xaec0, 0xaec1, 0xaec2, - 0xaec3, 0xaec4, 0xaec5, 0xaec6, 0xaec7, 0xaec8, 0xaec9, 0xaeca, - 0xaecb, 0xaecc, 0x003f, 0xaecd, 0xaece, 0xaecf, 0xaed0, 0xaed1, - 0xaed2, 0xaed3, 0xaed4, 0xaed5, 0xaed6, 0xaed7, 0x003f, 0x003f, - /* lead byte 8d */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xaed8, 0xaed9, 0xaeda, 0xaedb, 0xaedc, 0xaedd, 0xaede, - 0xaedf, 0xaee0, 0xaee1, 0xaee2, 0xaee3, 0xaee4, 0xaee5, 0xaee6, - 0xaee7, 0xaee8, 0x003f, 0xaee9, 0xaeea, 0xaeeb, 0xaeec, 0xaeed, - 0xaeee, 0xaeef, 0xaef0, 0xaef1, 0xaef2, 0xaef3, 0x003f, 0x003f, - 0x003f, 0xaef4, 0xaef5, 0xaef6, 0xaef7, 0xaef8, 0xaef9, 0xaefa, - 0xaefb, 0xaefc, 0xaefd, 0xaefe, 0xaeff, 0xaf00, 0xaf01, 0xaf02, - 0xaf03, 0xaf04, 0x003f, 0xaf05, 0xaf06, 0xaf07, 0xaf08, 0xaf09, - 0xaf0a, 0xaf0b, 0xaf0c, 0xaf0d, 0xaf0e, 0xaf0f, 0x003f, 0x003f, - 0x003f, 0xaf10, 0xaf11, 0xaf12, 0xaf13, 0xaf14, 0xaf15, 0xaf16, - 0xaf17, 0xaf18, 0xaf19, 0xaf1a, 0xaf1b, 0xaf1c, 0xaf1d, 0xaf1e, - 0xaf1f, 0xaf20, 0x003f, 0xaf21, 0xaf22, 0xaf23, 0xaf24, 0xaf25, - 0xaf26, 0xaf27, 0xaf28, 0xaf29, 0xaf2a, 0xaf2b, 0x003f, 0x003f, - 0x003f, 0xaf2c, 0xaf2d, 0xaf2e, 0xaf2f, 0xaf30, 0xaf31, 0xaf32, - 0xaf33, 0xaf34, 0xaf35, 0xaf36, 0xaf37, 0xaf38, 0xaf39, 0xaf3a, - 0xaf3b, 0xaf3c, 0x003f, 0xaf3d, 0xaf3e, 0xaf3f, 0xaf40, 0xaf41, - 0xaf42, 0xaf43, 0xaf44, 0xaf45, 0xaf46, 0xaf47, 0x003f, 0x003f, - 0x003f, 0xaf48, 0xaf49, 0xaf4a, 0xaf4b, 0xaf4c, 0xaf4d, 0xaf4e, - 0xaf4f, 0xaf50, 0xaf51, 0xaf52, 0xaf53, 0xaf54, 0xaf55, 0xaf56, - 0xaf57, 0xaf58, 0x003f, 0xaf59, 0xaf5a, 0xaf5b, 0xaf5c, 0xaf5d, - 0xaf5e, 0xaf5f, 0xaf60, 0xaf61, 0xaf62, 0xaf63, 0x003f, 0x003f, - 0x003f, 0xaf64, 0xaf65, 0xaf66, 0xaf67, 0xaf68, 0xaf69, 0xaf6a, - 0xaf6b, 0xaf6c, 0xaf6d, 0xaf6e, 0xaf6f, 0xaf70, 0xaf71, 0xaf72, - 0xaf73, 0xaf74, 0x003f, 0xaf75, 0xaf76, 0xaf77, 0xaf78, 0xaf79, - 0xaf7a, 0xaf7b, 0xaf7c, 0xaf7d, 0xaf7e, 0xaf7f, 0x003f, 0x003f, - /* lead byte 8e */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xaf80, 0xaf81, 0xaf82, 0xaf83, 0xaf84, 0xaf85, 0xaf86, - 0xaf87, 0xaf88, 0xaf89, 0xaf8a, 0xaf8b, 0xaf8c, 0xaf8d, 0xaf8e, - 0xaf8f, 0xaf90, 0x003f, 0xaf91, 0xaf92, 0xaf93, 0xaf94, 0xaf95, - 0xaf96, 0xaf97, 0xaf98, 0xaf99, 0xaf9a, 0xaf9b, 0x003f, 0x003f, - 0x003f, 0xaf9c, 0xaf9d, 0xaf9e, 0xaf9f, 0xafa0, 0xafa1, 0xafa2, - 0xafa3, 0xafa4, 0xafa5, 0xafa6, 0xafa7, 0xafa8, 0xafa9, 0xafaa, - 0xafab, 0xafac, 0x003f, 0xafad, 0xafae, 0xafaf, 0xafb0, 0xafb1, - 0xafb2, 0xafb3, 0xafb4, 0xafb5, 0xafb6, 0xafb7, 0x003f, 0x003f, - 0x003f, 0xafb8, 0xafb9, 0xafba, 0xafbb, 0xafbc, 0xafbd, 0xafbe, - 0xafbf, 0xafc0, 0xafc1, 0xafc2, 0xafc3, 0xafc4, 0xafc5, 0xafc6, - 0xafc7, 0xafc8, 0x003f, 0xafc9, 0xafca, 0xafcb, 0xafcc, 0xafcd, - 0xafce, 0xafcf, 0xafd0, 0xafd1, 0xafd2, 0xafd3, 0x003f, 0x003f, - 0x003f, 0xafd4, 0xafd5, 0xafd6, 0xafd7, 0xafd8, 0xafd9, 0xafda, - 0xafdb, 0xafdc, 0xafdd, 0xafde, 0xafdf, 0xafe0, 0xafe1, 0xafe2, - 0xafe3, 0xafe4, 0x003f, 0xafe5, 0xafe6, 0xafe7, 0xafe8, 0xafe9, - 0xafea, 0xafeb, 0xafec, 0xafed, 0xafee, 0xafef, 0x003f, 0x003f, - 0x003f, 0xaff0, 0xaff1, 0xaff2, 0xaff3, 0xaff4, 0xaff5, 0xaff6, - 0xaff7, 0xaff8, 0xaff9, 0xaffa, 0xaffb, 0xaffc, 0xaffd, 0xaffe, - 0xafff, 0xb000, 0x003f, 0xb001, 0xb002, 0xb003, 0xb004, 0xb005, - 0xb006, 0xb007, 0xb008, 0xb009, 0xb00a, 0xb00b, 0x003f, 0x003f, - 0x003f, 0xb00c, 0xb00d, 0xb00e, 0xb00f, 0xb010, 0xb011, 0xb012, - 0xb013, 0xb014, 0xb015, 0xb016, 0xb017, 0xb018, 0xb019, 0xb01a, - 0xb01b, 0xb01c, 0x003f, 0xb01d, 0xb01e, 0xb01f, 0xb020, 0xb021, - 0xb022, 0xb023, 0xb024, 0xb025, 0xb026, 0xb027, 0x003f, 0x003f, - /* lead byte 8f */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb028, 0xb029, 0xb02a, 0xb02b, 0xb02c, 0xb02d, 0xb02e, - 0xb02f, 0xb030, 0xb031, 0xb032, 0xb033, 0xb034, 0xb035, 0xb036, - 0xb037, 0xb038, 0x003f, 0xb039, 0xb03a, 0xb03b, 0xb03c, 0xb03d, - 0xb03e, 0xb03f, 0xb040, 0xb041, 0xb042, 0xb043, 0x003f, 0x003f, - 0x003f, 0xb044, 0xb045, 0xb046, 0xb047, 0xb048, 0xb049, 0xb04a, - 0xb04b, 0xb04c, 0xb04d, 0xb04e, 0xb04f, 0xb050, 0xb051, 0xb052, - 0xb053, 0xb054, 0x003f, 0xb055, 0xb056, 0xb057, 0xb058, 0xb059, - 0xb05a, 0xb05b, 0xb05c, 0xb05d, 0xb05e, 0xb05f, 0x003f, 0x003f, - 0x003f, 0xb060, 0xb061, 0xb062, 0xb063, 0xb064, 0xb065, 0xb066, - 0xb067, 0xb068, 0xb069, 0xb06a, 0xb06b, 0xb06c, 0xb06d, 0xb06e, - 0xb06f, 0xb070, 0x003f, 0xb071, 0xb072, 0xb073, 0xb074, 0xb075, - 0xb076, 0xb077, 0xb078, 0xb079, 0xb07a, 0xb07b, 0x003f, 0x003f, - 0x003f, 0xb07c, 0xb07d, 0xb07e, 0xb07f, 0xb080, 0xb081, 0xb082, - 0xb083, 0xb084, 0xb085, 0xb086, 0xb087, 0xb088, 0xb089, 0xb08a, - 0xb08b, 0xb08c, 0x003f, 0xb08d, 0xb08e, 0xb08f, 0xb090, 0xb091, - 0xb092, 0xb093, 0xb094, 0xb095, 0xb096, 0xb097, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte 90 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3134, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb098, 0xb099, 0xb09a, 0xb09b, 0xb09c, 0xb09d, 0xb09e, - 0xb09f, 0xb0a0, 0xb0a1, 0xb0a2, 0xb0a3, 0xb0a4, 0xb0a5, 0xb0a6, - 0xb0a7, 0xb0a8, 0x003f, 0xb0a9, 0xb0aa, 0xb0ab, 0xb0ac, 0xb0ad, - 0xb0ae, 0xb0af, 0xb0b0, 0xb0b1, 0xb0b2, 0xb0b3, 0x003f, 0x003f, - 0x003f, 0xb0b4, 0xb0b5, 0xb0b6, 0xb0b7, 0xb0b8, 0xb0b9, 0xb0ba, - 0xb0bb, 0xb0bc, 0xb0bd, 0xb0be, 0xb0bf, 0xb0c0, 0xb0c1, 0xb0c2, - 0xb0c3, 0xb0c4, 0x003f, 0xb0c5, 0xb0c6, 0xb0c7, 0xb0c8, 0xb0c9, - 0xb0ca, 0xb0cb, 0xb0cc, 0xb0cd, 0xb0ce, 0xb0cf, 0x003f, 0x003f, - 0x003f, 0xb0d0, 0xb0d1, 0xb0d2, 0xb0d3, 0xb0d4, 0xb0d5, 0xb0d6, - 0xb0d7, 0xb0d8, 0xb0d9, 0xb0da, 0xb0db, 0xb0dc, 0xb0dd, 0xb0de, - 0xb0df, 0xb0e0, 0x003f, 0xb0e1, 0xb0e2, 0xb0e3, 0xb0e4, 0xb0e5, - 0xb0e6, 0xb0e7, 0xb0e8, 0xb0e9, 0xb0ea, 0xb0eb, 0x003f, 0x003f, - 0x003f, 0xb0ec, 0xb0ed, 0xb0ee, 0xb0ef, 0xb0f0, 0xb0f1, 0xb0f2, - 0xb0f3, 0xb0f4, 0xb0f5, 0xb0f6, 0xb0f7, 0xb0f8, 0xb0f9, 0xb0fa, - 0xb0fb, 0xb0fc, 0x003f, 0xb0fd, 0xb0fe, 0xb0ff, 0xb100, 0xb101, - 0xb102, 0xb103, 0xb104, 0xb105, 0xb106, 0xb107, 0x003f, 0x003f, - 0x003f, 0xb108, 0xb109, 0xb10a, 0xb10b, 0xb10c, 0xb10d, 0xb10e, - 0xb10f, 0xb110, 0xb111, 0xb112, 0xb113, 0xb114, 0xb115, 0xb116, - 0xb117, 0xb118, 0x003f, 0xb119, 0xb11a, 0xb11b, 0xb11c, 0xb11d, - 0xb11e, 0xb11f, 0xb120, 0xb121, 0xb122, 0xb123, 0x003f, 0x003f, - /* lead byte 91 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb124, 0xb125, 0xb126, 0xb127, 0xb128, 0xb129, 0xb12a, - 0xb12b, 0xb12c, 0xb12d, 0xb12e, 0xb12f, 0xb130, 0xb131, 0xb132, - 0xb133, 0xb134, 0x003f, 0xb135, 0xb136, 0xb137, 0xb138, 0xb139, - 0xb13a, 0xb13b, 0xb13c, 0xb13d, 0xb13e, 0xb13f, 0x003f, 0x003f, - 0x003f, 0xb140, 0xb141, 0xb142, 0xb143, 0xb144, 0xb145, 0xb146, - 0xb147, 0xb148, 0xb149, 0xb14a, 0xb14b, 0xb14c, 0xb14d, 0xb14e, - 0xb14f, 0xb150, 0x003f, 0xb151, 0xb152, 0xb153, 0xb154, 0xb155, - 0xb156, 0xb157, 0xb158, 0xb159, 0xb15a, 0xb15b, 0x003f, 0x003f, - 0x003f, 0xb15c, 0xb15d, 0xb15e, 0xb15f, 0xb160, 0xb161, 0xb162, - 0xb163, 0xb164, 0xb165, 0xb166, 0xb167, 0xb168, 0xb169, 0xb16a, - 0xb16b, 0xb16c, 0x003f, 0xb16d, 0xb16e, 0xb16f, 0xb170, 0xb171, - 0xb172, 0xb173, 0xb174, 0xb175, 0xb176, 0xb177, 0x003f, 0x003f, - 0x003f, 0xb178, 0xb179, 0xb17a, 0xb17b, 0xb17c, 0xb17d, 0xb17e, - 0xb17f, 0xb180, 0xb181, 0xb182, 0xb183, 0xb184, 0xb185, 0xb186, - 0xb187, 0xb188, 0x003f, 0xb189, 0xb18a, 0xb18b, 0xb18c, 0xb18d, - 0xb18e, 0xb18f, 0xb190, 0xb191, 0xb192, 0xb193, 0x003f, 0x003f, - 0x003f, 0xb194, 0xb195, 0xb196, 0xb197, 0xb198, 0xb199, 0xb19a, - 0xb19b, 0xb19c, 0xb19d, 0xb19e, 0xb19f, 0xb1a0, 0xb1a1, 0xb1a2, - 0xb1a3, 0xb1a4, 0x003f, 0xb1a5, 0xb1a6, 0xb1a7, 0xb1a8, 0xb1a9, - 0xb1aa, 0xb1ab, 0xb1ac, 0xb1ad, 0xb1ae, 0xb1af, 0x003f, 0x003f, - 0x003f, 0xb1b0, 0xb1b1, 0xb1b2, 0xb1b3, 0xb1b4, 0xb1b5, 0xb1b6, - 0xb1b7, 0xb1b8, 0xb1b9, 0xb1ba, 0xb1bb, 0xb1bc, 0xb1bd, 0xb1be, - 0xb1bf, 0xb1c0, 0x003f, 0xb1c1, 0xb1c2, 0xb1c3, 0xb1c4, 0xb1c5, - 0xb1c6, 0xb1c7, 0xb1c8, 0xb1c9, 0xb1ca, 0xb1cb, 0x003f, 0x003f, - /* lead byte 92 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb1cc, 0xb1cd, 0xb1ce, 0xb1cf, 0xb1d0, 0xb1d1, 0xb1d2, - 0xb1d3, 0xb1d4, 0xb1d5, 0xb1d6, 0xb1d7, 0xb1d8, 0xb1d9, 0xb1da, - 0xb1db, 0xb1dc, 0x003f, 0xb1dd, 0xb1de, 0xb1df, 0xb1e0, 0xb1e1, - 0xb1e2, 0xb1e3, 0xb1e4, 0xb1e5, 0xb1e6, 0xb1e7, 0x003f, 0x003f, - 0x003f, 0xb1e8, 0xb1e9, 0xb1ea, 0xb1eb, 0xb1ec, 0xb1ed, 0xb1ee, - 0xb1ef, 0xb1f0, 0xb1f1, 0xb1f2, 0xb1f3, 0xb1f4, 0xb1f5, 0xb1f6, - 0xb1f7, 0xb1f8, 0x003f, 0xb1f9, 0xb1fa, 0xb1fb, 0xb1fc, 0xb1fd, - 0xb1fe, 0xb1ff, 0xb200, 0xb201, 0xb202, 0xb203, 0x003f, 0x003f, - 0x003f, 0xb204, 0xb205, 0xb206, 0xb207, 0xb208, 0xb209, 0xb20a, - 0xb20b, 0xb20c, 0xb20d, 0xb20e, 0xb20f, 0xb210, 0xb211, 0xb212, - 0xb213, 0xb214, 0x003f, 0xb215, 0xb216, 0xb217, 0xb218, 0xb219, - 0xb21a, 0xb21b, 0xb21c, 0xb21d, 0xb21e, 0xb21f, 0x003f, 0x003f, - 0x003f, 0xb220, 0xb221, 0xb222, 0xb223, 0xb224, 0xb225, 0xb226, - 0xb227, 0xb228, 0xb229, 0xb22a, 0xb22b, 0xb22c, 0xb22d, 0xb22e, - 0xb22f, 0xb230, 0x003f, 0xb231, 0xb232, 0xb233, 0xb234, 0xb235, - 0xb236, 0xb237, 0xb238, 0xb239, 0xb23a, 0xb23b, 0x003f, 0x003f, - 0x003f, 0xb23c, 0xb23d, 0xb23e, 0xb23f, 0xb240, 0xb241, 0xb242, - 0xb243, 0xb244, 0xb245, 0xb246, 0xb247, 0xb248, 0xb249, 0xb24a, - 0xb24b, 0xb24c, 0x003f, 0xb24d, 0xb24e, 0xb24f, 0xb250, 0xb251, - 0xb252, 0xb253, 0xb254, 0xb255, 0xb256, 0xb257, 0x003f, 0x003f, - 0x003f, 0xb258, 0xb259, 0xb25a, 0xb25b, 0xb25c, 0xb25d, 0xb25e, - 0xb25f, 0xb260, 0xb261, 0xb262, 0xb263, 0xb264, 0xb265, 0xb266, - 0xb267, 0xb268, 0x003f, 0xb269, 0xb26a, 0xb26b, 0xb26c, 0xb26d, - 0xb26e, 0xb26f, 0xb270, 0xb271, 0xb272, 0xb273, 0x003f, 0x003f, - /* lead byte 93 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb274, 0xb275, 0xb276, 0xb277, 0xb278, 0xb279, 0xb27a, - 0xb27b, 0xb27c, 0xb27d, 0xb27e, 0xb27f, 0xb280, 0xb281, 0xb282, - 0xb283, 0xb284, 0x003f, 0xb285, 0xb286, 0xb287, 0xb288, 0xb289, - 0xb28a, 0xb28b, 0xb28c, 0xb28d, 0xb28e, 0xb28f, 0x003f, 0x003f, - 0x003f, 0xb290, 0xb291, 0xb292, 0xb293, 0xb294, 0xb295, 0xb296, - 0xb297, 0xb298, 0xb299, 0xb29a, 0xb29b, 0xb29c, 0xb29d, 0xb29e, - 0xb29f, 0xb2a0, 0x003f, 0xb2a1, 0xb2a2, 0xb2a3, 0xb2a4, 0xb2a5, - 0xb2a6, 0xb2a7, 0xb2a8, 0xb2a9, 0xb2aa, 0xb2ab, 0x003f, 0x003f, - 0x003f, 0xb2ac, 0xb2ad, 0xb2ae, 0xb2af, 0xb2b0, 0xb2b1, 0xb2b2, - 0xb2b3, 0xb2b4, 0xb2b5, 0xb2b6, 0xb2b7, 0xb2b8, 0xb2b9, 0xb2ba, - 0xb2bb, 0xb2bc, 0x003f, 0xb2bd, 0xb2be, 0xb2bf, 0xb2c0, 0xb2c1, - 0xb2c2, 0xb2c3, 0xb2c4, 0xb2c5, 0xb2c6, 0xb2c7, 0x003f, 0x003f, - 0x003f, 0xb2c8, 0xb2c9, 0xb2ca, 0xb2cb, 0xb2cc, 0xb2cd, 0xb2ce, - 0xb2cf, 0xb2d0, 0xb2d1, 0xb2d2, 0xb2d3, 0xb2d4, 0xb2d5, 0xb2d6, - 0xb2d7, 0xb2d8, 0x003f, 0xb2d9, 0xb2da, 0xb2db, 0xb2dc, 0xb2dd, - 0xb2de, 0xb2df, 0xb2e0, 0xb2e1, 0xb2e2, 0xb2e3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte 94 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3137, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb2e4, 0xb2e5, 0xb2e6, 0xb2e7, 0xb2e8, 0xb2e9, 0xb2ea, - 0xb2eb, 0xb2ec, 0xb2ed, 0xb2ee, 0xb2ef, 0xb2f0, 0xb2f1, 0xb2f2, - 0xb2f3, 0xb2f4, 0x003f, 0xb2f5, 0xb2f6, 0xb2f7, 0xb2f8, 0xb2f9, - 0xb2fa, 0xb2fb, 0xb2fc, 0xb2fd, 0xb2fe, 0xb2ff, 0x003f, 0x003f, - 0x003f, 0xb300, 0xb301, 0xb302, 0xb303, 0xb304, 0xb305, 0xb306, - 0xb307, 0xb308, 0xb309, 0xb30a, 0xb30b, 0xb30c, 0xb30d, 0xb30e, - 0xb30f, 0xb310, 0x003f, 0xb311, 0xb312, 0xb313, 0xb314, 0xb315, - 0xb316, 0xb317, 0xb318, 0xb319, 0xb31a, 0xb31b, 0x003f, 0x003f, - 0x003f, 0xb31c, 0xb31d, 0xb31e, 0xb31f, 0xb320, 0xb321, 0xb322, - 0xb323, 0xb324, 0xb325, 0xb326, 0xb327, 0xb328, 0xb329, 0xb32a, - 0xb32b, 0xb32c, 0x003f, 0xb32d, 0xb32e, 0xb32f, 0xb330, 0xb331, - 0xb332, 0xb333, 0xb334, 0xb335, 0xb336, 0xb337, 0x003f, 0x003f, - 0x003f, 0xb338, 0xb339, 0xb33a, 0xb33b, 0xb33c, 0xb33d, 0xb33e, - 0xb33f, 0xb340, 0xb341, 0xb342, 0xb343, 0xb344, 0xb345, 0xb346, - 0xb347, 0xb348, 0x003f, 0xb349, 0xb34a, 0xb34b, 0xb34c, 0xb34d, - 0xb34e, 0xb34f, 0xb350, 0xb351, 0xb352, 0xb353, 0x003f, 0x003f, - 0x003f, 0xb354, 0xb355, 0xb356, 0xb357, 0xb358, 0xb359, 0xb35a, - 0xb35b, 0xb35c, 0xb35d, 0xb35e, 0xb35f, 0xb360, 0xb361, 0xb362, - 0xb363, 0xb364, 0x003f, 0xb365, 0xb366, 0xb367, 0xb368, 0xb369, - 0xb36a, 0xb36b, 0xb36c, 0xb36d, 0xb36e, 0xb36f, 0x003f, 0x003f, - /* lead byte 95 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb370, 0xb371, 0xb372, 0xb373, 0xb374, 0xb375, 0xb376, - 0xb377, 0xb378, 0xb379, 0xb37a, 0xb37b, 0xb37c, 0xb37d, 0xb37e, - 0xb37f, 0xb380, 0x003f, 0xb381, 0xb382, 0xb383, 0xb384, 0xb385, - 0xb386, 0xb387, 0xb388, 0xb389, 0xb38a, 0xb38b, 0x003f, 0x003f, - 0x003f, 0xb38c, 0xb38d, 0xb38e, 0xb38f, 0xb390, 0xb391, 0xb392, - 0xb393, 0xb394, 0xb395, 0xb396, 0xb397, 0xb398, 0xb399, 0xb39a, - 0xb39b, 0xb39c, 0x003f, 0xb39d, 0xb39e, 0xb39f, 0xb3a0, 0xb3a1, - 0xb3a2, 0xb3a3, 0xb3a4, 0xb3a5, 0xb3a6, 0xb3a7, 0x003f, 0x003f, - 0x003f, 0xb3a8, 0xb3a9, 0xb3aa, 0xb3ab, 0xb3ac, 0xb3ad, 0xb3ae, - 0xb3af, 0xb3b0, 0xb3b1, 0xb3b2, 0xb3b3, 0xb3b4, 0xb3b5, 0xb3b6, - 0xb3b7, 0xb3b8, 0x003f, 0xb3b9, 0xb3ba, 0xb3bb, 0xb3bc, 0xb3bd, - 0xb3be, 0xb3bf, 0xb3c0, 0xb3c1, 0xb3c2, 0xb3c3, 0x003f, 0x003f, - 0x003f, 0xb3c4, 0xb3c5, 0xb3c6, 0xb3c7, 0xb3c8, 0xb3c9, 0xb3ca, - 0xb3cb, 0xb3cc, 0xb3cd, 0xb3ce, 0xb3cf, 0xb3d0, 0xb3d1, 0xb3d2, - 0xb3d3, 0xb3d4, 0x003f, 0xb3d5, 0xb3d6, 0xb3d7, 0xb3d8, 0xb3d9, - 0xb3da, 0xb3db, 0xb3dc, 0xb3dd, 0xb3de, 0xb3df, 0x003f, 0x003f, - 0x003f, 0xb3e0, 0xb3e1, 0xb3e2, 0xb3e3, 0xb3e4, 0xb3e5, 0xb3e6, - 0xb3e7, 0xb3e8, 0xb3e9, 0xb3ea, 0xb3eb, 0xb3ec, 0xb3ed, 0xb3ee, - 0xb3ef, 0xb3f0, 0x003f, 0xb3f1, 0xb3f2, 0xb3f3, 0xb3f4, 0xb3f5, - 0xb3f6, 0xb3f7, 0xb3f8, 0xb3f9, 0xb3fa, 0xb3fb, 0x003f, 0x003f, - 0x003f, 0xb3fc, 0xb3fd, 0xb3fe, 0xb3ff, 0xb400, 0xb401, 0xb402, - 0xb403, 0xb404, 0xb405, 0xb406, 0xb407, 0xb408, 0xb409, 0xb40a, - 0xb40b, 0xb40c, 0x003f, 0xb40d, 0xb40e, 0xb40f, 0xb410, 0xb411, - 0xb412, 0xb413, 0xb414, 0xb415, 0xb416, 0xb417, 0x003f, 0x003f, - /* lead byte 96 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb418, 0xb419, 0xb41a, 0xb41b, 0xb41c, 0xb41d, 0xb41e, - 0xb41f, 0xb420, 0xb421, 0xb422, 0xb423, 0xb424, 0xb425, 0xb426, - 0xb427, 0xb428, 0x003f, 0xb429, 0xb42a, 0xb42b, 0xb42c, 0xb42d, - 0xb42e, 0xb42f, 0xb430, 0xb431, 0xb432, 0xb433, 0x003f, 0x003f, - 0x003f, 0xb434, 0xb435, 0xb436, 0xb437, 0xb438, 0xb439, 0xb43a, - 0xb43b, 0xb43c, 0xb43d, 0xb43e, 0xb43f, 0xb440, 0xb441, 0xb442, - 0xb443, 0xb444, 0x003f, 0xb445, 0xb446, 0xb447, 0xb448, 0xb449, - 0xb44a, 0xb44b, 0xb44c, 0xb44d, 0xb44e, 0xb44f, 0x003f, 0x003f, - 0x003f, 0xb450, 0xb451, 0xb452, 0xb453, 0xb454, 0xb455, 0xb456, - 0xb457, 0xb458, 0xb459, 0xb45a, 0xb45b, 0xb45c, 0xb45d, 0xb45e, - 0xb45f, 0xb460, 0x003f, 0xb461, 0xb462, 0xb463, 0xb464, 0xb465, - 0xb466, 0xb467, 0xb468, 0xb469, 0xb46a, 0xb46b, 0x003f, 0x003f, - 0x003f, 0xb46c, 0xb46d, 0xb46e, 0xb46f, 0xb470, 0xb471, 0xb472, - 0xb473, 0xb474, 0xb475, 0xb476, 0xb477, 0xb478, 0xb479, 0xb47a, - 0xb47b, 0xb47c, 0x003f, 0xb47d, 0xb47e, 0xb47f, 0xb480, 0xb481, - 0xb482, 0xb483, 0xb484, 0xb485, 0xb486, 0xb487, 0x003f, 0x003f, - 0x003f, 0xb488, 0xb489, 0xb48a, 0xb48b, 0xb48c, 0xb48d, 0xb48e, - 0xb48f, 0xb490, 0xb491, 0xb492, 0xb493, 0xb494, 0xb495, 0xb496, - 0xb497, 0xb498, 0x003f, 0xb499, 0xb49a, 0xb49b, 0xb49c, 0xb49d, - 0xb49e, 0xb49f, 0xb4a0, 0xb4a1, 0xb4a2, 0xb4a3, 0x003f, 0x003f, - 0x003f, 0xb4a4, 0xb4a5, 0xb4a6, 0xb4a7, 0xb4a8, 0xb4a9, 0xb4aa, - 0xb4ab, 0xb4ac, 0xb4ad, 0xb4ae, 0xb4af, 0xb4b0, 0xb4b1, 0xb4b2, - 0xb4b3, 0xb4b4, 0x003f, 0xb4b5, 0xb4b6, 0xb4b7, 0xb4b8, 0xb4b9, - 0xb4ba, 0xb4bb, 0xb4bc, 0xb4bd, 0xb4be, 0xb4bf, 0x003f, 0x003f, - /* lead byte 97 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb4c0, 0xb4c1, 0xb4c2, 0xb4c3, 0xb4c4, 0xb4c5, 0xb4c6, - 0xb4c7, 0xb4c8, 0xb4c9, 0xb4ca, 0xb4cb, 0xb4cc, 0xb4cd, 0xb4ce, - 0xb4cf, 0xb4d0, 0x003f, 0xb4d1, 0xb4d2, 0xb4d3, 0xb4d4, 0xb4d5, - 0xb4d6, 0xb4d7, 0xb4d8, 0xb4d9, 0xb4da, 0xb4db, 0x003f, 0x003f, - 0x003f, 0xb4dc, 0xb4dd, 0xb4de, 0xb4df, 0xb4e0, 0xb4e1, 0xb4e2, - 0xb4e3, 0xb4e4, 0xb4e5, 0xb4e6, 0xb4e7, 0xb4e8, 0xb4e9, 0xb4ea, - 0xb4eb, 0xb4ec, 0x003f, 0xb4ed, 0xb4ee, 0xb4ef, 0xb4f0, 0xb4f1, - 0xb4f2, 0xb4f3, 0xb4f4, 0xb4f5, 0xb4f6, 0xb4f7, 0x003f, 0x003f, - 0x003f, 0xb4f8, 0xb4f9, 0xb4fa, 0xb4fb, 0xb4fc, 0xb4fd, 0xb4fe, - 0xb4ff, 0xb500, 0xb501, 0xb502, 0xb503, 0xb504, 0xb505, 0xb506, - 0xb507, 0xb508, 0x003f, 0xb509, 0xb50a, 0xb50b, 0xb50c, 0xb50d, - 0xb50e, 0xb50f, 0xb510, 0xb511, 0xb512, 0xb513, 0x003f, 0x003f, - 0x003f, 0xb514, 0xb515, 0xb516, 0xb517, 0xb518, 0xb519, 0xb51a, - 0xb51b, 0xb51c, 0xb51d, 0xb51e, 0xb51f, 0xb520, 0xb521, 0xb522, - 0xb523, 0xb524, 0x003f, 0xb525, 0xb526, 0xb527, 0xb528, 0xb529, - 0xb52a, 0xb52b, 0xb52c, 0xb52d, 0xb52e, 0xb52f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte 98 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3138, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb530, 0xb531, 0xb532, 0xb533, 0xb534, 0xb535, 0xb536, - 0xb537, 0xb538, 0xb539, 0xb53a, 0xb53b, 0xb53c, 0xb53d, 0xb53e, - 0xb53f, 0xb540, 0x003f, 0xb541, 0xb542, 0xb543, 0xb544, 0xb545, - 0xb546, 0xb547, 0xb548, 0xb549, 0xb54a, 0xb54b, 0x003f, 0x003f, - 0x003f, 0xb54c, 0xb54d, 0xb54e, 0xb54f, 0xb550, 0xb551, 0xb552, - 0xb553, 0xb554, 0xb555, 0xb556, 0xb557, 0xb558, 0xb559, 0xb55a, - 0xb55b, 0xb55c, 0x003f, 0xb55d, 0xb55e, 0xb55f, 0xb560, 0xb561, - 0xb562, 0xb563, 0xb564, 0xb565, 0xb566, 0xb567, 0x003f, 0x003f, - 0x003f, 0xb568, 0xb569, 0xb56a, 0xb56b, 0xb56c, 0xb56d, 0xb56e, - 0xb56f, 0xb570, 0xb571, 0xb572, 0xb573, 0xb574, 0xb575, 0xb576, - 0xb577, 0xb578, 0x003f, 0xb579, 0xb57a, 0xb57b, 0xb57c, 0xb57d, - 0xb57e, 0xb57f, 0xb580, 0xb581, 0xb582, 0xb583, 0x003f, 0x003f, - 0x003f, 0xb584, 0xb585, 0xb586, 0xb587, 0xb588, 0xb589, 0xb58a, - 0xb58b, 0xb58c, 0xb58d, 0xb58e, 0xb58f, 0xb590, 0xb591, 0xb592, - 0xb593, 0xb594, 0x003f, 0xb595, 0xb596, 0xb597, 0xb598, 0xb599, - 0xb59a, 0xb59b, 0xb59c, 0xb59d, 0xb59e, 0xb59f, 0x003f, 0x003f, - 0x003f, 0xb5a0, 0xb5a1, 0xb5a2, 0xb5a3, 0xb5a4, 0xb5a5, 0xb5a6, - 0xb5a7, 0xb5a8, 0xb5a9, 0xb5aa, 0xb5ab, 0xb5ac, 0xb5ad, 0xb5ae, - 0xb5af, 0xb5b0, 0x003f, 0xb5b1, 0xb5b2, 0xb5b3, 0xb5b4, 0xb5b5, - 0xb5b6, 0xb5b7, 0xb5b8, 0xb5b9, 0xb5ba, 0xb5bb, 0x003f, 0x003f, - /* lead byte 99 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb5bc, 0xb5bd, 0xb5be, 0xb5bf, 0xb5c0, 0xb5c1, 0xb5c2, - 0xb5c3, 0xb5c4, 0xb5c5, 0xb5c6, 0xb5c7, 0xb5c8, 0xb5c9, 0xb5ca, - 0xb5cb, 0xb5cc, 0x003f, 0xb5cd, 0xb5ce, 0xb5cf, 0xb5d0, 0xb5d1, - 0xb5d2, 0xb5d3, 0xb5d4, 0xb5d5, 0xb5d6, 0xb5d7, 0x003f, 0x003f, - 0x003f, 0xb5d8, 0xb5d9, 0xb5da, 0xb5db, 0xb5dc, 0xb5dd, 0xb5de, - 0xb5df, 0xb5e0, 0xb5e1, 0xb5e2, 0xb5e3, 0xb5e4, 0xb5e5, 0xb5e6, - 0xb5e7, 0xb5e8, 0x003f, 0xb5e9, 0xb5ea, 0xb5eb, 0xb5ec, 0xb5ed, - 0xb5ee, 0xb5ef, 0xb5f0, 0xb5f1, 0xb5f2, 0xb5f3, 0x003f, 0x003f, - 0x003f, 0xb5f4, 0xb5f5, 0xb5f6, 0xb5f7, 0xb5f8, 0xb5f9, 0xb5fa, - 0xb5fb, 0xb5fc, 0xb5fd, 0xb5fe, 0xb5ff, 0xb600, 0xb601, 0xb602, - 0xb603, 0xb604, 0x003f, 0xb605, 0xb606, 0xb607, 0xb608, 0xb609, - 0xb60a, 0xb60b, 0xb60c, 0xb60d, 0xb60e, 0xb60f, 0x003f, 0x003f, - 0x003f, 0xb610, 0xb611, 0xb612, 0xb613, 0xb614, 0xb615, 0xb616, - 0xb617, 0xb618, 0xb619, 0xb61a, 0xb61b, 0xb61c, 0xb61d, 0xb61e, - 0xb61f, 0xb620, 0x003f, 0xb621, 0xb622, 0xb623, 0xb624, 0xb625, - 0xb626, 0xb627, 0xb628, 0xb629, 0xb62a, 0xb62b, 0x003f, 0x003f, - 0x003f, 0xb62c, 0xb62d, 0xb62e, 0xb62f, 0xb630, 0xb631, 0xb632, - 0xb633, 0xb634, 0xb635, 0xb636, 0xb637, 0xb638, 0xb639, 0xb63a, - 0xb63b, 0xb63c, 0x003f, 0xb63d, 0xb63e, 0xb63f, 0xb640, 0xb641, - 0xb642, 0xb643, 0xb644, 0xb645, 0xb646, 0xb647, 0x003f, 0x003f, - 0x003f, 0xb648, 0xb649, 0xb64a, 0xb64b, 0xb64c, 0xb64d, 0xb64e, - 0xb64f, 0xb650, 0xb651, 0xb652, 0xb653, 0xb654, 0xb655, 0xb656, - 0xb657, 0xb658, 0x003f, 0xb659, 0xb65a, 0xb65b, 0xb65c, 0xb65d, - 0xb65e, 0xb65f, 0xb660, 0xb661, 0xb662, 0xb663, 0x003f, 0x003f, - /* lead byte 9a */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb664, 0xb665, 0xb666, 0xb667, 0xb668, 0xb669, 0xb66a, - 0xb66b, 0xb66c, 0xb66d, 0xb66e, 0xb66f, 0xb670, 0xb671, 0xb672, - 0xb673, 0xb674, 0x003f, 0xb675, 0xb676, 0xb677, 0xb678, 0xb679, - 0xb67a, 0xb67b, 0xb67c, 0xb67d, 0xb67e, 0xb67f, 0x003f, 0x003f, - 0x003f, 0xb680, 0xb681, 0xb682, 0xb683, 0xb684, 0xb685, 0xb686, - 0xb687, 0xb688, 0xb689, 0xb68a, 0xb68b, 0xb68c, 0xb68d, 0xb68e, - 0xb68f, 0xb690, 0x003f, 0xb691, 0xb692, 0xb693, 0xb694, 0xb695, - 0xb696, 0xb697, 0xb698, 0xb699, 0xb69a, 0xb69b, 0x003f, 0x003f, - 0x003f, 0xb69c, 0xb69d, 0xb69e, 0xb69f, 0xb6a0, 0xb6a1, 0xb6a2, - 0xb6a3, 0xb6a4, 0xb6a5, 0xb6a6, 0xb6a7, 0xb6a8, 0xb6a9, 0xb6aa, - 0xb6ab, 0xb6ac, 0x003f, 0xb6ad, 0xb6ae, 0xb6af, 0xb6b0, 0xb6b1, - 0xb6b2, 0xb6b3, 0xb6b4, 0xb6b5, 0xb6b6, 0xb6b7, 0x003f, 0x003f, - 0x003f, 0xb6b8, 0xb6b9, 0xb6ba, 0xb6bb, 0xb6bc, 0xb6bd, 0xb6be, - 0xb6bf, 0xb6c0, 0xb6c1, 0xb6c2, 0xb6c3, 0xb6c4, 0xb6c5, 0xb6c6, - 0xb6c7, 0xb6c8, 0x003f, 0xb6c9, 0xb6ca, 0xb6cb, 0xb6cc, 0xb6cd, - 0xb6ce, 0xb6cf, 0xb6d0, 0xb6d1, 0xb6d2, 0xb6d3, 0x003f, 0x003f, - 0x003f, 0xb6d4, 0xb6d5, 0xb6d6, 0xb6d7, 0xb6d8, 0xb6d9, 0xb6da, - 0xb6db, 0xb6dc, 0xb6dd, 0xb6de, 0xb6df, 0xb6e0, 0xb6e1, 0xb6e2, - 0xb6e3, 0xb6e4, 0x003f, 0xb6e5, 0xb6e6, 0xb6e7, 0xb6e8, 0xb6e9, - 0xb6ea, 0xb6eb, 0xb6ec, 0xb6ed, 0xb6ee, 0xb6ef, 0x003f, 0x003f, - 0x003f, 0xb6f0, 0xb6f1, 0xb6f2, 0xb6f3, 0xb6f4, 0xb6f5, 0xb6f6, - 0xb6f7, 0xb6f8, 0xb6f9, 0xb6fa, 0xb6fb, 0xb6fc, 0xb6fd, 0xb6fe, - 0xb6ff, 0xb700, 0x003f, 0xb701, 0xb702, 0xb703, 0xb704, 0xb705, - 0xb706, 0xb707, 0xb708, 0xb709, 0xb70a, 0xb70b, 0x003f, 0x003f, - /* lead byte 9b */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb70c, 0xb70d, 0xb70e, 0xb70f, 0xb710, 0xb711, 0xb712, - 0xb713, 0xb714, 0xb715, 0xb716, 0xb717, 0xb718, 0xb719, 0xb71a, - 0xb71b, 0xb71c, 0x003f, 0xb71d, 0xb71e, 0xb71f, 0xb720, 0xb721, - 0xb722, 0xb723, 0xb724, 0xb725, 0xb726, 0xb727, 0x003f, 0x003f, - 0x003f, 0xb728, 0xb729, 0xb72a, 0xb72b, 0xb72c, 0xb72d, 0xb72e, - 0xb72f, 0xb730, 0xb731, 0xb732, 0xb733, 0xb734, 0xb735, 0xb736, - 0xb737, 0xb738, 0x003f, 0xb739, 0xb73a, 0xb73b, 0xb73c, 0xb73d, - 0xb73e, 0xb73f, 0xb740, 0xb741, 0xb742, 0xb743, 0x003f, 0x003f, - 0x003f, 0xb744, 0xb745, 0xb746, 0xb747, 0xb748, 0xb749, 0xb74a, - 0xb74b, 0xb74c, 0xb74d, 0xb74e, 0xb74f, 0xb750, 0xb751, 0xb752, - 0xb753, 0xb754, 0x003f, 0xb755, 0xb756, 0xb757, 0xb758, 0xb759, - 0xb75a, 0xb75b, 0xb75c, 0xb75d, 0xb75e, 0xb75f, 0x003f, 0x003f, - 0x003f, 0xb760, 0xb761, 0xb762, 0xb763, 0xb764, 0xb765, 0xb766, - 0xb767, 0xb768, 0xb769, 0xb76a, 0xb76b, 0xb76c, 0xb76d, 0xb76e, - 0xb76f, 0xb770, 0x003f, 0xb771, 0xb772, 0xb773, 0xb774, 0xb775, - 0xb776, 0xb777, 0xb778, 0xb779, 0xb77a, 0xb77b, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte 9c */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3139, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb77c, 0xb77d, 0xb77e, 0xb77f, 0xb780, 0xb781, 0xb782, - 0xb783, 0xb784, 0xb785, 0xb786, 0xb787, 0xb788, 0xb789, 0xb78a, - 0xb78b, 0xb78c, 0x003f, 0xb78d, 0xb78e, 0xb78f, 0xb790, 0xb791, - 0xb792, 0xb793, 0xb794, 0xb795, 0xb796, 0xb797, 0x003f, 0x003f, - 0x003f, 0xb798, 0xb799, 0xb79a, 0xb79b, 0xb79c, 0xb79d, 0xb79e, - 0xb79f, 0xb7a0, 0xb7a1, 0xb7a2, 0xb7a3, 0xb7a4, 0xb7a5, 0xb7a6, - 0xb7a7, 0xb7a8, 0x003f, 0xb7a9, 0xb7aa, 0xb7ab, 0xb7ac, 0xb7ad, - 0xb7ae, 0xb7af, 0xb7b0, 0xb7b1, 0xb7b2, 0xb7b3, 0x003f, 0x003f, - 0x003f, 0xb7b4, 0xb7b5, 0xb7b6, 0xb7b7, 0xb7b8, 0xb7b9, 0xb7ba, - 0xb7bb, 0xb7bc, 0xb7bd, 0xb7be, 0xb7bf, 0xb7c0, 0xb7c1, 0xb7c2, - 0xb7c3, 0xb7c4, 0x003f, 0xb7c5, 0xb7c6, 0xb7c7, 0xb7c8, 0xb7c9, - 0xb7ca, 0xb7cb, 0xb7cc, 0xb7cd, 0xb7ce, 0xb7cf, 0x003f, 0x003f, - 0x003f, 0xb7d0, 0xb7d1, 0xb7d2, 0xb7d3, 0xb7d4, 0xb7d5, 0xb7d6, - 0xb7d7, 0xb7d8, 0xb7d9, 0xb7da, 0xb7db, 0xb7dc, 0xb7dd, 0xb7de, - 0xb7df, 0xb7e0, 0x003f, 0xb7e1, 0xb7e2, 0xb7e3, 0xb7e4, 0xb7e5, - 0xb7e6, 0xb7e7, 0xb7e8, 0xb7e9, 0xb7ea, 0xb7eb, 0x003f, 0x003f, - 0x003f, 0xb7ec, 0xb7ed, 0xb7ee, 0xb7ef, 0xb7f0, 0xb7f1, 0xb7f2, - 0xb7f3, 0xb7f4, 0xb7f5, 0xb7f6, 0xb7f7, 0xb7f8, 0xb7f9, 0xb7fa, - 0xb7fb, 0xb7fc, 0x003f, 0xb7fd, 0xb7fe, 0xb7ff, 0xb800, 0xb801, - 0xb802, 0xb803, 0xb804, 0xb805, 0xb806, 0xb807, 0x003f, 0x003f, - /* lead byte 9d */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb808, 0xb809, 0xb80a, 0xb80b, 0xb80c, 0xb80d, 0xb80e, - 0xb80f, 0xb810, 0xb811, 0xb812, 0xb813, 0xb814, 0xb815, 0xb816, - 0xb817, 0xb818, 0x003f, 0xb819, 0xb81a, 0xb81b, 0xb81c, 0xb81d, - 0xb81e, 0xb81f, 0xb820, 0xb821, 0xb822, 0xb823, 0x003f, 0x003f, - 0x003f, 0xb824, 0xb825, 0xb826, 0xb827, 0xb828, 0xb829, 0xb82a, - 0xb82b, 0xb82c, 0xb82d, 0xb82e, 0xb82f, 0xb830, 0xb831, 0xb832, - 0xb833, 0xb834, 0x003f, 0xb835, 0xb836, 0xb837, 0xb838, 0xb839, - 0xb83a, 0xb83b, 0xb83c, 0xb83d, 0xb83e, 0xb83f, 0x003f, 0x003f, - 0x003f, 0xb840, 0xb841, 0xb842, 0xb843, 0xb844, 0xb845, 0xb846, - 0xb847, 0xb848, 0xb849, 0xb84a, 0xb84b, 0xb84c, 0xb84d, 0xb84e, - 0xb84f, 0xb850, 0x003f, 0xb851, 0xb852, 0xb853, 0xb854, 0xb855, - 0xb856, 0xb857, 0xb858, 0xb859, 0xb85a, 0xb85b, 0x003f, 0x003f, - 0x003f, 0xb85c, 0xb85d, 0xb85e, 0xb85f, 0xb860, 0xb861, 0xb862, - 0xb863, 0xb864, 0xb865, 0xb866, 0xb867, 0xb868, 0xb869, 0xb86a, - 0xb86b, 0xb86c, 0x003f, 0xb86d, 0xb86e, 0xb86f, 0xb870, 0xb871, - 0xb872, 0xb873, 0xb874, 0xb875, 0xb876, 0xb877, 0x003f, 0x003f, - 0x003f, 0xb878, 0xb879, 0xb87a, 0xb87b, 0xb87c, 0xb87d, 0xb87e, - 0xb87f, 0xb880, 0xb881, 0xb882, 0xb883, 0xb884, 0xb885, 0xb886, - 0xb887, 0xb888, 0x003f, 0xb889, 0xb88a, 0xb88b, 0xb88c, 0xb88d, - 0xb88e, 0xb88f, 0xb890, 0xb891, 0xb892, 0xb893, 0x003f, 0x003f, - 0x003f, 0xb894, 0xb895, 0xb896, 0xb897, 0xb898, 0xb899, 0xb89a, - 0xb89b, 0xb89c, 0xb89d, 0xb89e, 0xb89f, 0xb8a0, 0xb8a1, 0xb8a2, - 0xb8a3, 0xb8a4, 0x003f, 0xb8a5, 0xb8a6, 0xb8a7, 0xb8a8, 0xb8a9, - 0xb8aa, 0xb8ab, 0xb8ac, 0xb8ad, 0xb8ae, 0xb8af, 0x003f, 0x003f, - /* lead byte 9e */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb8b0, 0xb8b1, 0xb8b2, 0xb8b3, 0xb8b4, 0xb8b5, 0xb8b6, - 0xb8b7, 0xb8b8, 0xb8b9, 0xb8ba, 0xb8bb, 0xb8bc, 0xb8bd, 0xb8be, - 0xb8bf, 0xb8c0, 0x003f, 0xb8c1, 0xb8c2, 0xb8c3, 0xb8c4, 0xb8c5, - 0xb8c6, 0xb8c7, 0xb8c8, 0xb8c9, 0xb8ca, 0xb8cb, 0x003f, 0x003f, - 0x003f, 0xb8cc, 0xb8cd, 0xb8ce, 0xb8cf, 0xb8d0, 0xb8d1, 0xb8d2, - 0xb8d3, 0xb8d4, 0xb8d5, 0xb8d6, 0xb8d7, 0xb8d8, 0xb8d9, 0xb8da, - 0xb8db, 0xb8dc, 0x003f, 0xb8dd, 0xb8de, 0xb8df, 0xb8e0, 0xb8e1, - 0xb8e2, 0xb8e3, 0xb8e4, 0xb8e5, 0xb8e6, 0xb8e7, 0x003f, 0x003f, - 0x003f, 0xb8e8, 0xb8e9, 0xb8ea, 0xb8eb, 0xb8ec, 0xb8ed, 0xb8ee, - 0xb8ef, 0xb8f0, 0xb8f1, 0xb8f2, 0xb8f3, 0xb8f4, 0xb8f5, 0xb8f6, - 0xb8f7, 0xb8f8, 0x003f, 0xb8f9, 0xb8fa, 0xb8fb, 0xb8fc, 0xb8fd, - 0xb8fe, 0xb8ff, 0xb900, 0xb901, 0xb902, 0xb903, 0x003f, 0x003f, - 0x003f, 0xb904, 0xb905, 0xb906, 0xb907, 0xb908, 0xb909, 0xb90a, - 0xb90b, 0xb90c, 0xb90d, 0xb90e, 0xb90f, 0xb910, 0xb911, 0xb912, - 0xb913, 0xb914, 0x003f, 0xb915, 0xb916, 0xb917, 0xb918, 0xb919, - 0xb91a, 0xb91b, 0xb91c, 0xb91d, 0xb91e, 0xb91f, 0x003f, 0x003f, - 0x003f, 0xb920, 0xb921, 0xb922, 0xb923, 0xb924, 0xb925, 0xb926, - 0xb927, 0xb928, 0xb929, 0xb92a, 0xb92b, 0xb92c, 0xb92d, 0xb92e, - 0xb92f, 0xb930, 0x003f, 0xb931, 0xb932, 0xb933, 0xb934, 0xb935, - 0xb936, 0xb937, 0xb938, 0xb939, 0xb93a, 0xb93b, 0x003f, 0x003f, - 0x003f, 0xb93c, 0xb93d, 0xb93e, 0xb93f, 0xb940, 0xb941, 0xb942, - 0xb943, 0xb944, 0xb945, 0xb946, 0xb947, 0xb948, 0xb949, 0xb94a, - 0xb94b, 0xb94c, 0x003f, 0xb94d, 0xb94e, 0xb94f, 0xb950, 0xb951, - 0xb952, 0xb953, 0xb954, 0xb955, 0xb956, 0xb957, 0x003f, 0x003f, - /* lead byte 9f */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb958, 0xb959, 0xb95a, 0xb95b, 0xb95c, 0xb95d, 0xb95e, - 0xb95f, 0xb960, 0xb961, 0xb962, 0xb963, 0xb964, 0xb965, 0xb966, - 0xb967, 0xb968, 0x003f, 0xb969, 0xb96a, 0xb96b, 0xb96c, 0xb96d, - 0xb96e, 0xb96f, 0xb970, 0xb971, 0xb972, 0xb973, 0x003f, 0x003f, - 0x003f, 0xb974, 0xb975, 0xb976, 0xb977, 0xb978, 0xb979, 0xb97a, - 0xb97b, 0xb97c, 0xb97d, 0xb97e, 0xb97f, 0xb980, 0xb981, 0xb982, - 0xb983, 0xb984, 0x003f, 0xb985, 0xb986, 0xb987, 0xb988, 0xb989, - 0xb98a, 0xb98b, 0xb98c, 0xb98d, 0xb98e, 0xb98f, 0x003f, 0x003f, - 0x003f, 0xb990, 0xb991, 0xb992, 0xb993, 0xb994, 0xb995, 0xb996, - 0xb997, 0xb998, 0xb999, 0xb99a, 0xb99b, 0xb99c, 0xb99d, 0xb99e, - 0xb99f, 0xb9a0, 0x003f, 0xb9a1, 0xb9a2, 0xb9a3, 0xb9a4, 0xb9a5, - 0xb9a6, 0xb9a7, 0xb9a8, 0xb9a9, 0xb9aa, 0xb9ab, 0x003f, 0x003f, - 0x003f, 0xb9ac, 0xb9ad, 0xb9ae, 0xb9af, 0xb9b0, 0xb9b1, 0xb9b2, - 0xb9b3, 0xb9b4, 0xb9b5, 0xb9b6, 0xb9b7, 0xb9b8, 0xb9b9, 0xb9ba, - 0xb9bb, 0xb9bc, 0x003f, 0xb9bd, 0xb9be, 0xb9bf, 0xb9c0, 0xb9c1, - 0xb9c2, 0xb9c3, 0xb9c4, 0xb9c5, 0xb9c6, 0xb9c7, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte a0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3141, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb9c8, 0xb9c9, 0xb9ca, 0xb9cb, 0xb9cc, 0xb9cd, 0xb9ce, - 0xb9cf, 0xb9d0, 0xb9d1, 0xb9d2, 0xb9d3, 0xb9d4, 0xb9d5, 0xb9d6, - 0xb9d7, 0xb9d8, 0x003f, 0xb9d9, 0xb9da, 0xb9db, 0xb9dc, 0xb9dd, - 0xb9de, 0xb9df, 0xb9e0, 0xb9e1, 0xb9e2, 0xb9e3, 0x003f, 0x003f, - 0x003f, 0xb9e4, 0xb9e5, 0xb9e6, 0xb9e7, 0xb9e8, 0xb9e9, 0xb9ea, - 0xb9eb, 0xb9ec, 0xb9ed, 0xb9ee, 0xb9ef, 0xb9f0, 0xb9f1, 0xb9f2, - 0xb9f3, 0xb9f4, 0x003f, 0xb9f5, 0xb9f6, 0xb9f7, 0xb9f8, 0xb9f9, - 0xb9fa, 0xb9fb, 0xb9fc, 0xb9fd, 0xb9fe, 0xb9ff, 0x003f, 0x003f, - 0x003f, 0xba00, 0xba01, 0xba02, 0xba03, 0xba04, 0xba05, 0xba06, - 0xba07, 0xba08, 0xba09, 0xba0a, 0xba0b, 0xba0c, 0xba0d, 0xba0e, - 0xba0f, 0xba10, 0x003f, 0xba11, 0xba12, 0xba13, 0xba14, 0xba15, - 0xba16, 0xba17, 0xba18, 0xba19, 0xba1a, 0xba1b, 0x003f, 0x003f, - 0x003f, 0xba1c, 0xba1d, 0xba1e, 0xba1f, 0xba20, 0xba21, 0xba22, - 0xba23, 0xba24, 0xba25, 0xba26, 0xba27, 0xba28, 0xba29, 0xba2a, - 0xba2b, 0xba2c, 0x003f, 0xba2d, 0xba2e, 0xba2f, 0xba30, 0xba31, - 0xba32, 0xba33, 0xba34, 0xba35, 0xba36, 0xba37, 0x003f, 0x003f, - 0x003f, 0xba38, 0xba39, 0xba3a, 0xba3b, 0xba3c, 0xba3d, 0xba3e, - 0xba3f, 0xba40, 0xba41, 0xba42, 0xba43, 0xba44, 0xba45, 0xba46, - 0xba47, 0xba48, 0x003f, 0xba49, 0xba4a, 0xba4b, 0xba4c, 0xba4d, - 0xba4e, 0xba4f, 0xba50, 0xba51, 0xba52, 0xba53, 0x003f, 0x003f, - /* lead byte a1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xba54, 0xba55, 0xba56, 0xba57, 0xba58, 0xba59, 0xba5a, - 0xba5b, 0xba5c, 0xba5d, 0xba5e, 0xba5f, 0xba60, 0xba61, 0xba62, - 0xba63, 0xba64, 0x003f, 0xba65, 0xba66, 0xba67, 0xba68, 0xba69, - 0xba6a, 0xba6b, 0xba6c, 0xba6d, 0xba6e, 0xba6f, 0x003f, 0x003f, - 0x003f, 0xba70, 0xba71, 0xba72, 0xba73, 0xba74, 0xba75, 0xba76, - 0xba77, 0xba78, 0xba79, 0xba7a, 0xba7b, 0xba7c, 0xba7d, 0xba7e, - 0xba7f, 0xba80, 0x003f, 0xba81, 0xba82, 0xba83, 0xba84, 0xba85, - 0xba86, 0xba87, 0xba88, 0xba89, 0xba8a, 0xba8b, 0x003f, 0x003f, - 0x003f, 0xba8c, 0xba8d, 0xba8e, 0xba8f, 0xba90, 0xba91, 0xba92, - 0xba93, 0xba94, 0xba95, 0xba96, 0xba97, 0xba98, 0xba99, 0xba9a, - 0xba9b, 0xba9c, 0x003f, 0xba9d, 0xba9e, 0xba9f, 0xbaa0, 0xbaa1, - 0xbaa2, 0xbaa3, 0xbaa4, 0xbaa5, 0xbaa6, 0xbaa7, 0x003f, 0x003f, - 0x003f, 0xbaa8, 0xbaa9, 0xbaaa, 0xbaab, 0xbaac, 0xbaad, 0xbaae, - 0xbaaf, 0xbab0, 0xbab1, 0xbab2, 0xbab3, 0xbab4, 0xbab5, 0xbab6, - 0xbab7, 0xbab8, 0x003f, 0xbab9, 0xbaba, 0xbabb, 0xbabc, 0xbabd, - 0xbabe, 0xbabf, 0xbac0, 0xbac1, 0xbac2, 0xbac3, 0x003f, 0x003f, - 0x003f, 0xbac4, 0xbac5, 0xbac6, 0xbac7, 0xbac8, 0xbac9, 0xbaca, - 0xbacb, 0xbacc, 0xbacd, 0xbace, 0xbacf, 0xbad0, 0xbad1, 0xbad2, - 0xbad3, 0xbad4, 0x003f, 0xbad5, 0xbad6, 0xbad7, 0xbad8, 0xbad9, - 0xbada, 0xbadb, 0xbadc, 0xbadd, 0xbade, 0xbadf, 0x003f, 0x003f, - 0x003f, 0xbae0, 0xbae1, 0xbae2, 0xbae3, 0xbae4, 0xbae5, 0xbae6, - 0xbae7, 0xbae8, 0xbae9, 0xbaea, 0xbaeb, 0xbaec, 0xbaed, 0xbaee, - 0xbaef, 0xbaf0, 0x003f, 0xbaf1, 0xbaf2, 0xbaf3, 0xbaf4, 0xbaf5, - 0xbaf6, 0xbaf7, 0xbaf8, 0xbaf9, 0xbafa, 0xbafb, 0x003f, 0x003f, - /* lead byte a2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbafc, 0xbafd, 0xbafe, 0xbaff, 0xbb00, 0xbb01, 0xbb02, - 0xbb03, 0xbb04, 0xbb05, 0xbb06, 0xbb07, 0xbb08, 0xbb09, 0xbb0a, - 0xbb0b, 0xbb0c, 0x003f, 0xbb0d, 0xbb0e, 0xbb0f, 0xbb10, 0xbb11, - 0xbb12, 0xbb13, 0xbb14, 0xbb15, 0xbb16, 0xbb17, 0x003f, 0x003f, - 0x003f, 0xbb18, 0xbb19, 0xbb1a, 0xbb1b, 0xbb1c, 0xbb1d, 0xbb1e, - 0xbb1f, 0xbb20, 0xbb21, 0xbb22, 0xbb23, 0xbb24, 0xbb25, 0xbb26, - 0xbb27, 0xbb28, 0x003f, 0xbb29, 0xbb2a, 0xbb2b, 0xbb2c, 0xbb2d, - 0xbb2e, 0xbb2f, 0xbb30, 0xbb31, 0xbb32, 0xbb33, 0x003f, 0x003f, - 0x003f, 0xbb34, 0xbb35, 0xbb36, 0xbb37, 0xbb38, 0xbb39, 0xbb3a, - 0xbb3b, 0xbb3c, 0xbb3d, 0xbb3e, 0xbb3f, 0xbb40, 0xbb41, 0xbb42, - 0xbb43, 0xbb44, 0x003f, 0xbb45, 0xbb46, 0xbb47, 0xbb48, 0xbb49, - 0xbb4a, 0xbb4b, 0xbb4c, 0xbb4d, 0xbb4e, 0xbb4f, 0x003f, 0x003f, - 0x003f, 0xbb50, 0xbb51, 0xbb52, 0xbb53, 0xbb54, 0xbb55, 0xbb56, - 0xbb57, 0xbb58, 0xbb59, 0xbb5a, 0xbb5b, 0xbb5c, 0xbb5d, 0xbb5e, - 0xbb5f, 0xbb60, 0x003f, 0xbb61, 0xbb62, 0xbb63, 0xbb64, 0xbb65, - 0xbb66, 0xbb67, 0xbb68, 0xbb69, 0xbb6a, 0xbb6b, 0x003f, 0x003f, - 0x003f, 0xbb6c, 0xbb6d, 0xbb6e, 0xbb6f, 0xbb70, 0xbb71, 0xbb72, - 0xbb73, 0xbb74, 0xbb75, 0xbb76, 0xbb77, 0xbb78, 0xbb79, 0xbb7a, - 0xbb7b, 0xbb7c, 0x003f, 0xbb7d, 0xbb7e, 0xbb7f, 0xbb80, 0xbb81, - 0xbb82, 0xbb83, 0xbb84, 0xbb85, 0xbb86, 0xbb87, 0x003f, 0x003f, - 0x003f, 0xbb88, 0xbb89, 0xbb8a, 0xbb8b, 0xbb8c, 0xbb8d, 0xbb8e, - 0xbb8f, 0xbb90, 0xbb91, 0xbb92, 0xbb93, 0xbb94, 0xbb95, 0xbb96, - 0xbb97, 0xbb98, 0x003f, 0xbb99, 0xbb9a, 0xbb9b, 0xbb9c, 0xbb9d, - 0xbb9e, 0xbb9f, 0xbba0, 0xbba1, 0xbba2, 0xbba3, 0x003f, 0x003f, - /* lead byte a3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbba4, 0xbba5, 0xbba6, 0xbba7, 0xbba8, 0xbba9, 0xbbaa, - 0xbbab, 0xbbac, 0xbbad, 0xbbae, 0xbbaf, 0xbbb0, 0xbbb1, 0xbbb2, - 0xbbb3, 0xbbb4, 0x003f, 0xbbb5, 0xbbb6, 0xbbb7, 0xbbb8, 0xbbb9, - 0xbbba, 0xbbbb, 0xbbbc, 0xbbbd, 0xbbbe, 0xbbbf, 0x003f, 0x003f, - 0x003f, 0xbbc0, 0xbbc1, 0xbbc2, 0xbbc3, 0xbbc4, 0xbbc5, 0xbbc6, - 0xbbc7, 0xbbc8, 0xbbc9, 0xbbca, 0xbbcb, 0xbbcc, 0xbbcd, 0xbbce, - 0xbbcf, 0xbbd0, 0x003f, 0xbbd1, 0xbbd2, 0xbbd3, 0xbbd4, 0xbbd5, - 0xbbd6, 0xbbd7, 0xbbd8, 0xbbd9, 0xbbda, 0xbbdb, 0x003f, 0x003f, - 0x003f, 0xbbdc, 0xbbdd, 0xbbde, 0xbbdf, 0xbbe0, 0xbbe1, 0xbbe2, - 0xbbe3, 0xbbe4, 0xbbe5, 0xbbe6, 0xbbe7, 0xbbe8, 0xbbe9, 0xbbea, - 0xbbeb, 0xbbec, 0x003f, 0xbbed, 0xbbee, 0xbbef, 0xbbf0, 0xbbf1, - 0xbbf2, 0xbbf3, 0xbbf4, 0xbbf5, 0xbbf6, 0xbbf7, 0x003f, 0x003f, - 0x003f, 0xbbf8, 0xbbf9, 0xbbfa, 0xbbfb, 0xbbfc, 0xbbfd, 0xbbfe, - 0xbbff, 0xbc00, 0xbc01, 0xbc02, 0xbc03, 0xbc04, 0xbc05, 0xbc06, - 0xbc07, 0xbc08, 0x003f, 0xbc09, 0xbc0a, 0xbc0b, 0xbc0c, 0xbc0d, - 0xbc0e, 0xbc0f, 0xbc10, 0xbc11, 0xbc12, 0xbc13, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte a4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3142, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbc14, 0xbc15, 0xbc16, 0xbc17, 0xbc18, 0xbc19, 0xbc1a, - 0xbc1b, 0xbc1c, 0xbc1d, 0xbc1e, 0xbc1f, 0xbc20, 0xbc21, 0xbc22, - 0xbc23, 0xbc24, 0x003f, 0xbc25, 0xbc26, 0xbc27, 0xbc28, 0xbc29, - 0xbc2a, 0xbc2b, 0xbc2c, 0xbc2d, 0xbc2e, 0xbc2f, 0x003f, 0x003f, - 0x003f, 0xbc30, 0xbc31, 0xbc32, 0xbc33, 0xbc34, 0xbc35, 0xbc36, - 0xbc37, 0xbc38, 0xbc39, 0xbc3a, 0xbc3b, 0xbc3c, 0xbc3d, 0xbc3e, - 0xbc3f, 0xbc40, 0x003f, 0xbc41, 0xbc42, 0xbc43, 0xbc44, 0xbc45, - 0xbc46, 0xbc47, 0xbc48, 0xbc49, 0xbc4a, 0xbc4b, 0x003f, 0x003f, - 0x003f, 0xbc4c, 0xbc4d, 0xbc4e, 0xbc4f, 0xbc50, 0xbc51, 0xbc52, - 0xbc53, 0xbc54, 0xbc55, 0xbc56, 0xbc57, 0xbc58, 0xbc59, 0xbc5a, - 0xbc5b, 0xbc5c, 0x003f, 0xbc5d, 0xbc5e, 0xbc5f, 0xbc60, 0xbc61, - 0xbc62, 0xbc63, 0xbc64, 0xbc65, 0xbc66, 0xbc67, 0x003f, 0x003f, - 0x003f, 0xbc68, 0xbc69, 0xbc6a, 0xbc6b, 0xbc6c, 0xbc6d, 0xbc6e, - 0xbc6f, 0xbc70, 0xbc71, 0xbc72, 0xbc73, 0xbc74, 0xbc75, 0xbc76, - 0xbc77, 0xbc78, 0x003f, 0xbc79, 0xbc7a, 0xbc7b, 0xbc7c, 0xbc7d, - 0xbc7e, 0xbc7f, 0xbc80, 0xbc81, 0xbc82, 0xbc83, 0x003f, 0x003f, - 0x003f, 0xbc84, 0xbc85, 0xbc86, 0xbc87, 0xbc88, 0xbc89, 0xbc8a, - 0xbc8b, 0xbc8c, 0xbc8d, 0xbc8e, 0xbc8f, 0xbc90, 0xbc91, 0xbc92, - 0xbc93, 0xbc94, 0x003f, 0xbc95, 0xbc96, 0xbc97, 0xbc98, 0xbc99, - 0xbc9a, 0xbc9b, 0xbc9c, 0xbc9d, 0xbc9e, 0xbc9f, 0x003f, 0x003f, - /* lead byte a5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbca0, 0xbca1, 0xbca2, 0xbca3, 0xbca4, 0xbca5, 0xbca6, - 0xbca7, 0xbca8, 0xbca9, 0xbcaa, 0xbcab, 0xbcac, 0xbcad, 0xbcae, - 0xbcaf, 0xbcb0, 0x003f, 0xbcb1, 0xbcb2, 0xbcb3, 0xbcb4, 0xbcb5, - 0xbcb6, 0xbcb7, 0xbcb8, 0xbcb9, 0xbcba, 0xbcbb, 0x003f, 0x003f, - 0x003f, 0xbcbc, 0xbcbd, 0xbcbe, 0xbcbf, 0xbcc0, 0xbcc1, 0xbcc2, - 0xbcc3, 0xbcc4, 0xbcc5, 0xbcc6, 0xbcc7, 0xbcc8, 0xbcc9, 0xbcca, - 0xbccb, 0xbccc, 0x003f, 0xbccd, 0xbcce, 0xbccf, 0xbcd0, 0xbcd1, - 0xbcd2, 0xbcd3, 0xbcd4, 0xbcd5, 0xbcd6, 0xbcd7, 0x003f, 0x003f, - 0x003f, 0xbcd8, 0xbcd9, 0xbcda, 0xbcdb, 0xbcdc, 0xbcdd, 0xbcde, - 0xbcdf, 0xbce0, 0xbce1, 0xbce2, 0xbce3, 0xbce4, 0xbce5, 0xbce6, - 0xbce7, 0xbce8, 0x003f, 0xbce9, 0xbcea, 0xbceb, 0xbcec, 0xbced, - 0xbcee, 0xbcef, 0xbcf0, 0xbcf1, 0xbcf2, 0xbcf3, 0x003f, 0x003f, - 0x003f, 0xbcf4, 0xbcf5, 0xbcf6, 0xbcf7, 0xbcf8, 0xbcf9, 0xbcfa, - 0xbcfb, 0xbcfc, 0xbcfd, 0xbcfe, 0xbcff, 0xbd00, 0xbd01, 0xbd02, - 0xbd03, 0xbd04, 0x003f, 0xbd05, 0xbd06, 0xbd07, 0xbd08, 0xbd09, - 0xbd0a, 0xbd0b, 0xbd0c, 0xbd0d, 0xbd0e, 0xbd0f, 0x003f, 0x003f, - 0x003f, 0xbd10, 0xbd11, 0xbd12, 0xbd13, 0xbd14, 0xbd15, 0xbd16, - 0xbd17, 0xbd18, 0xbd19, 0xbd1a, 0xbd1b, 0xbd1c, 0xbd1d, 0xbd1e, - 0xbd1f, 0xbd20, 0x003f, 0xbd21, 0xbd22, 0xbd23, 0xbd24, 0xbd25, - 0xbd26, 0xbd27, 0xbd28, 0xbd29, 0xbd2a, 0xbd2b, 0x003f, 0x003f, - 0x003f, 0xbd2c, 0xbd2d, 0xbd2e, 0xbd2f, 0xbd30, 0xbd31, 0xbd32, - 0xbd33, 0xbd34, 0xbd35, 0xbd36, 0xbd37, 0xbd38, 0xbd39, 0xbd3a, - 0xbd3b, 0xbd3c, 0x003f, 0xbd3d, 0xbd3e, 0xbd3f, 0xbd40, 0xbd41, - 0xbd42, 0xbd43, 0xbd44, 0xbd45, 0xbd46, 0xbd47, 0x003f, 0x003f, - /* lead byte a6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbd48, 0xbd49, 0xbd4a, 0xbd4b, 0xbd4c, 0xbd4d, 0xbd4e, - 0xbd4f, 0xbd50, 0xbd51, 0xbd52, 0xbd53, 0xbd54, 0xbd55, 0xbd56, - 0xbd57, 0xbd58, 0x003f, 0xbd59, 0xbd5a, 0xbd5b, 0xbd5c, 0xbd5d, - 0xbd5e, 0xbd5f, 0xbd60, 0xbd61, 0xbd62, 0xbd63, 0x003f, 0x003f, - 0x003f, 0xbd64, 0xbd65, 0xbd66, 0xbd67, 0xbd68, 0xbd69, 0xbd6a, - 0xbd6b, 0xbd6c, 0xbd6d, 0xbd6e, 0xbd6f, 0xbd70, 0xbd71, 0xbd72, - 0xbd73, 0xbd74, 0x003f, 0xbd75, 0xbd76, 0xbd77, 0xbd78, 0xbd79, - 0xbd7a, 0xbd7b, 0xbd7c, 0xbd7d, 0xbd7e, 0xbd7f, 0x003f, 0x003f, - 0x003f, 0xbd80, 0xbd81, 0xbd82, 0xbd83, 0xbd84, 0xbd85, 0xbd86, - 0xbd87, 0xbd88, 0xbd89, 0xbd8a, 0xbd8b, 0xbd8c, 0xbd8d, 0xbd8e, - 0xbd8f, 0xbd90, 0x003f, 0xbd91, 0xbd92, 0xbd93, 0xbd94, 0xbd95, - 0xbd96, 0xbd97, 0xbd98, 0xbd99, 0xbd9a, 0xbd9b, 0x003f, 0x003f, - 0x003f, 0xbd9c, 0xbd9d, 0xbd9e, 0xbd9f, 0xbda0, 0xbda1, 0xbda2, - 0xbda3, 0xbda4, 0xbda5, 0xbda6, 0xbda7, 0xbda8, 0xbda9, 0xbdaa, - 0xbdab, 0xbdac, 0x003f, 0xbdad, 0xbdae, 0xbdaf, 0xbdb0, 0xbdb1, - 0xbdb2, 0xbdb3, 0xbdb4, 0xbdb5, 0xbdb6, 0xbdb7, 0x003f, 0x003f, - 0x003f, 0xbdb8, 0xbdb9, 0xbdba, 0xbdbb, 0xbdbc, 0xbdbd, 0xbdbe, - 0xbdbf, 0xbdc0, 0xbdc1, 0xbdc2, 0xbdc3, 0xbdc4, 0xbdc5, 0xbdc6, - 0xbdc7, 0xbdc8, 0x003f, 0xbdc9, 0xbdca, 0xbdcb, 0xbdcc, 0xbdcd, - 0xbdce, 0xbdcf, 0xbdd0, 0xbdd1, 0xbdd2, 0xbdd3, 0x003f, 0x003f, - 0x003f, 0xbdd4, 0xbdd5, 0xbdd6, 0xbdd7, 0xbdd8, 0xbdd9, 0xbdda, - 0xbddb, 0xbddc, 0xbddd, 0xbdde, 0xbddf, 0xbde0, 0xbde1, 0xbde2, - 0xbde3, 0xbde4, 0x003f, 0xbde5, 0xbde6, 0xbde7, 0xbde8, 0xbde9, - 0xbdea, 0xbdeb, 0xbdec, 0xbded, 0xbdee, 0xbdef, 0x003f, 0x003f, - /* lead byte a7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbdf0, 0xbdf1, 0xbdf2, 0xbdf3, 0xbdf4, 0xbdf5, 0xbdf6, - 0xbdf7, 0xbdf8, 0xbdf9, 0xbdfa, 0xbdfb, 0xbdfc, 0xbdfd, 0xbdfe, - 0xbdff, 0xbe00, 0x003f, 0xbe01, 0xbe02, 0xbe03, 0xbe04, 0xbe05, - 0xbe06, 0xbe07, 0xbe08, 0xbe09, 0xbe0a, 0xbe0b, 0x003f, 0x003f, - 0x003f, 0xbe0c, 0xbe0d, 0xbe0e, 0xbe0f, 0xbe10, 0xbe11, 0xbe12, - 0xbe13, 0xbe14, 0xbe15, 0xbe16, 0xbe17, 0xbe18, 0xbe19, 0xbe1a, - 0xbe1b, 0xbe1c, 0x003f, 0xbe1d, 0xbe1e, 0xbe1f, 0xbe20, 0xbe21, - 0xbe22, 0xbe23, 0xbe24, 0xbe25, 0xbe26, 0xbe27, 0x003f, 0x003f, - 0x003f, 0xbe28, 0xbe29, 0xbe2a, 0xbe2b, 0xbe2c, 0xbe2d, 0xbe2e, - 0xbe2f, 0xbe30, 0xbe31, 0xbe32, 0xbe33, 0xbe34, 0xbe35, 0xbe36, - 0xbe37, 0xbe38, 0x003f, 0xbe39, 0xbe3a, 0xbe3b, 0xbe3c, 0xbe3d, - 0xbe3e, 0xbe3f, 0xbe40, 0xbe41, 0xbe42, 0xbe43, 0x003f, 0x003f, - 0x003f, 0xbe44, 0xbe45, 0xbe46, 0xbe47, 0xbe48, 0xbe49, 0xbe4a, - 0xbe4b, 0xbe4c, 0xbe4d, 0xbe4e, 0xbe4f, 0xbe50, 0xbe51, 0xbe52, - 0xbe53, 0xbe54, 0x003f, 0xbe55, 0xbe56, 0xbe57, 0xbe58, 0xbe59, - 0xbe5a, 0xbe5b, 0xbe5c, 0xbe5d, 0xbe5e, 0xbe5f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte a8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3143, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbe60, 0xbe61, 0xbe62, 0xbe63, 0xbe64, 0xbe65, 0xbe66, - 0xbe67, 0xbe68, 0xbe69, 0xbe6a, 0xbe6b, 0xbe6c, 0xbe6d, 0xbe6e, - 0xbe6f, 0xbe70, 0x003f, 0xbe71, 0xbe72, 0xbe73, 0xbe74, 0xbe75, - 0xbe76, 0xbe77, 0xbe78, 0xbe79, 0xbe7a, 0xbe7b, 0x003f, 0x003f, - 0x003f, 0xbe7c, 0xbe7d, 0xbe7e, 0xbe7f, 0xbe80, 0xbe81, 0xbe82, - 0xbe83, 0xbe84, 0xbe85, 0xbe86, 0xbe87, 0xbe88, 0xbe89, 0xbe8a, - 0xbe8b, 0xbe8c, 0x003f, 0xbe8d, 0xbe8e, 0xbe8f, 0xbe90, 0xbe91, - 0xbe92, 0xbe93, 0xbe94, 0xbe95, 0xbe96, 0xbe97, 0x003f, 0x003f, - 0x003f, 0xbe98, 0xbe99, 0xbe9a, 0xbe9b, 0xbe9c, 0xbe9d, 0xbe9e, - 0xbe9f, 0xbea0, 0xbea1, 0xbea2, 0xbea3, 0xbea4, 0xbea5, 0xbea6, - 0xbea7, 0xbea8, 0x003f, 0xbea9, 0xbeaa, 0xbeab, 0xbeac, 0xbead, - 0xbeae, 0xbeaf, 0xbeb0, 0xbeb1, 0xbeb2, 0xbeb3, 0x003f, 0x003f, - 0x003f, 0xbeb4, 0xbeb5, 0xbeb6, 0xbeb7, 0xbeb8, 0xbeb9, 0xbeba, - 0xbebb, 0xbebc, 0xbebd, 0xbebe, 0xbebf, 0xbec0, 0xbec1, 0xbec2, - 0xbec3, 0xbec4, 0x003f, 0xbec5, 0xbec6, 0xbec7, 0xbec8, 0xbec9, - 0xbeca, 0xbecb, 0xbecc, 0xbecd, 0xbece, 0xbecf, 0x003f, 0x003f, - 0x003f, 0xbed0, 0xbed1, 0xbed2, 0xbed3, 0xbed4, 0xbed5, 0xbed6, - 0xbed7, 0xbed8, 0xbed9, 0xbeda, 0xbedb, 0xbedc, 0xbedd, 0xbede, - 0xbedf, 0xbee0, 0x003f, 0xbee1, 0xbee2, 0xbee3, 0xbee4, 0xbee5, - 0xbee6, 0xbee7, 0xbee8, 0xbee9, 0xbeea, 0xbeeb, 0x003f, 0x003f, - /* lead byte a9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbeec, 0xbeed, 0xbeee, 0xbeef, 0xbef0, 0xbef1, 0xbef2, - 0xbef3, 0xbef4, 0xbef5, 0xbef6, 0xbef7, 0xbef8, 0xbef9, 0xbefa, - 0xbefb, 0xbefc, 0x003f, 0xbefd, 0xbefe, 0xbeff, 0xbf00, 0xbf01, - 0xbf02, 0xbf03, 0xbf04, 0xbf05, 0xbf06, 0xbf07, 0x003f, 0x003f, - 0x003f, 0xbf08, 0xbf09, 0xbf0a, 0xbf0b, 0xbf0c, 0xbf0d, 0xbf0e, - 0xbf0f, 0xbf10, 0xbf11, 0xbf12, 0xbf13, 0xbf14, 0xbf15, 0xbf16, - 0xbf17, 0xbf18, 0x003f, 0xbf19, 0xbf1a, 0xbf1b, 0xbf1c, 0xbf1d, - 0xbf1e, 0xbf1f, 0xbf20, 0xbf21, 0xbf22, 0xbf23, 0x003f, 0x003f, - 0x003f, 0xbf24, 0xbf25, 0xbf26, 0xbf27, 0xbf28, 0xbf29, 0xbf2a, - 0xbf2b, 0xbf2c, 0xbf2d, 0xbf2e, 0xbf2f, 0xbf30, 0xbf31, 0xbf32, - 0xbf33, 0xbf34, 0x003f, 0xbf35, 0xbf36, 0xbf37, 0xbf38, 0xbf39, - 0xbf3a, 0xbf3b, 0xbf3c, 0xbf3d, 0xbf3e, 0xbf3f, 0x003f, 0x003f, - 0x003f, 0xbf40, 0xbf41, 0xbf42, 0xbf43, 0xbf44, 0xbf45, 0xbf46, - 0xbf47, 0xbf48, 0xbf49, 0xbf4a, 0xbf4b, 0xbf4c, 0xbf4d, 0xbf4e, - 0xbf4f, 0xbf50, 0x003f, 0xbf51, 0xbf52, 0xbf53, 0xbf54, 0xbf55, - 0xbf56, 0xbf57, 0xbf58, 0xbf59, 0xbf5a, 0xbf5b, 0x003f, 0x003f, - 0x003f, 0xbf5c, 0xbf5d, 0xbf5e, 0xbf5f, 0xbf60, 0xbf61, 0xbf62, - 0xbf63, 0xbf64, 0xbf65, 0xbf66, 0xbf67, 0xbf68, 0xbf69, 0xbf6a, - 0xbf6b, 0xbf6c, 0x003f, 0xbf6d, 0xbf6e, 0xbf6f, 0xbf70, 0xbf71, - 0xbf72, 0xbf73, 0xbf74, 0xbf75, 0xbf76, 0xbf77, 0x003f, 0x003f, - 0x003f, 0xbf78, 0xbf79, 0xbf7a, 0xbf7b, 0xbf7c, 0xbf7d, 0xbf7e, - 0xbf7f, 0xbf80, 0xbf81, 0xbf82, 0xbf83, 0xbf84, 0xbf85, 0xbf86, - 0xbf87, 0xbf88, 0x003f, 0xbf89, 0xbf8a, 0xbf8b, 0xbf8c, 0xbf8d, - 0xbf8e, 0xbf8f, 0xbf90, 0xbf91, 0xbf92, 0xbf93, 0x003f, 0x003f, - /* lead byte aa */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbf94, 0xbf95, 0xbf96, 0xbf97, 0xbf98, 0xbf99, 0xbf9a, - 0xbf9b, 0xbf9c, 0xbf9d, 0xbf9e, 0xbf9f, 0xbfa0, 0xbfa1, 0xbfa2, - 0xbfa3, 0xbfa4, 0x003f, 0xbfa5, 0xbfa6, 0xbfa7, 0xbfa8, 0xbfa9, - 0xbfaa, 0xbfab, 0xbfac, 0xbfad, 0xbfae, 0xbfaf, 0x003f, 0x003f, - 0x003f, 0xbfb0, 0xbfb1, 0xbfb2, 0xbfb3, 0xbfb4, 0xbfb5, 0xbfb6, - 0xbfb7, 0xbfb8, 0xbfb9, 0xbfba, 0xbfbb, 0xbfbc, 0xbfbd, 0xbfbe, - 0xbfbf, 0xbfc0, 0x003f, 0xbfc1, 0xbfc2, 0xbfc3, 0xbfc4, 0xbfc5, - 0xbfc6, 0xbfc7, 0xbfc8, 0xbfc9, 0xbfca, 0xbfcb, 0x003f, 0x003f, - 0x003f, 0xbfcc, 0xbfcd, 0xbfce, 0xbfcf, 0xbfd0, 0xbfd1, 0xbfd2, - 0xbfd3, 0xbfd4, 0xbfd5, 0xbfd6, 0xbfd7, 0xbfd8, 0xbfd9, 0xbfda, - 0xbfdb, 0xbfdc, 0x003f, 0xbfdd, 0xbfde, 0xbfdf, 0xbfe0, 0xbfe1, - 0xbfe2, 0xbfe3, 0xbfe4, 0xbfe5, 0xbfe6, 0xbfe7, 0x003f, 0x003f, - 0x003f, 0xbfe8, 0xbfe9, 0xbfea, 0xbfeb, 0xbfec, 0xbfed, 0xbfee, - 0xbfef, 0xbff0, 0xbff1, 0xbff2, 0xbff3, 0xbff4, 0xbff5, 0xbff6, - 0xbff7, 0xbff8, 0x003f, 0xbff9, 0xbffa, 0xbffb, 0xbffc, 0xbffd, - 0xbffe, 0xbfff, 0xc000, 0xc001, 0xc002, 0xc003, 0x003f, 0x003f, - 0x003f, 0xc004, 0xc005, 0xc006, 0xc007, 0xc008, 0xc009, 0xc00a, - 0xc00b, 0xc00c, 0xc00d, 0xc00e, 0xc00f, 0xc010, 0xc011, 0xc012, - 0xc013, 0xc014, 0x003f, 0xc015, 0xc016, 0xc017, 0xc018, 0xc019, - 0xc01a, 0xc01b, 0xc01c, 0xc01d, 0xc01e, 0xc01f, 0x003f, 0x003f, - 0x003f, 0xc020, 0xc021, 0xc022, 0xc023, 0xc024, 0xc025, 0xc026, - 0xc027, 0xc028, 0xc029, 0xc02a, 0xc02b, 0xc02c, 0xc02d, 0xc02e, - 0xc02f, 0xc030, 0x003f, 0xc031, 0xc032, 0xc033, 0xc034, 0xc035, - 0xc036, 0xc037, 0xc038, 0xc039, 0xc03a, 0xc03b, 0x003f, 0x003f, - /* lead byte ab */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc03c, 0xc03d, 0xc03e, 0xc03f, 0xc040, 0xc041, 0xc042, - 0xc043, 0xc044, 0xc045, 0xc046, 0xc047, 0xc048, 0xc049, 0xc04a, - 0xc04b, 0xc04c, 0x003f, 0xc04d, 0xc04e, 0xc04f, 0xc050, 0xc051, - 0xc052, 0xc053, 0xc054, 0xc055, 0xc056, 0xc057, 0x003f, 0x003f, - 0x003f, 0xc058, 0xc059, 0xc05a, 0xc05b, 0xc05c, 0xc05d, 0xc05e, - 0xc05f, 0xc060, 0xc061, 0xc062, 0xc063, 0xc064, 0xc065, 0xc066, - 0xc067, 0xc068, 0x003f, 0xc069, 0xc06a, 0xc06b, 0xc06c, 0xc06d, - 0xc06e, 0xc06f, 0xc070, 0xc071, 0xc072, 0xc073, 0x003f, 0x003f, - 0x003f, 0xc074, 0xc075, 0xc076, 0xc077, 0xc078, 0xc079, 0xc07a, - 0xc07b, 0xc07c, 0xc07d, 0xc07e, 0xc07f, 0xc080, 0xc081, 0xc082, - 0xc083, 0xc084, 0x003f, 0xc085, 0xc086, 0xc087, 0xc088, 0xc089, - 0xc08a, 0xc08b, 0xc08c, 0xc08d, 0xc08e, 0xc08f, 0x003f, 0x003f, - 0x003f, 0xc090, 0xc091, 0xc092, 0xc093, 0xc094, 0xc095, 0xc096, - 0xc097, 0xc098, 0xc099, 0xc09a, 0xc09b, 0xc09c, 0xc09d, 0xc09e, - 0xc09f, 0xc0a0, 0x003f, 0xc0a1, 0xc0a2, 0xc0a3, 0xc0a4, 0xc0a5, - 0xc0a6, 0xc0a7, 0xc0a8, 0xc0a9, 0xc0aa, 0xc0ab, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte ac */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3145, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc0ac, 0xc0ad, 0xc0ae, 0xc0af, 0xc0b0, 0xc0b1, 0xc0b2, - 0xc0b3, 0xc0b4, 0xc0b5, 0xc0b6, 0xc0b7, 0xc0b8, 0xc0b9, 0xc0ba, - 0xc0bb, 0xc0bc, 0x003f, 0xc0bd, 0xc0be, 0xc0bf, 0xc0c0, 0xc0c1, - 0xc0c2, 0xc0c3, 0xc0c4, 0xc0c5, 0xc0c6, 0xc0c7, 0x003f, 0x003f, - 0x003f, 0xc0c8, 0xc0c9, 0xc0ca, 0xc0cb, 0xc0cc, 0xc0cd, 0xc0ce, - 0xc0cf, 0xc0d0, 0xc0d1, 0xc0d2, 0xc0d3, 0xc0d4, 0xc0d5, 0xc0d6, - 0xc0d7, 0xc0d8, 0x003f, 0xc0d9, 0xc0da, 0xc0db, 0xc0dc, 0xc0dd, - 0xc0de, 0xc0df, 0xc0e0, 0xc0e1, 0xc0e2, 0xc0e3, 0x003f, 0x003f, - 0x003f, 0xc0e4, 0xc0e5, 0xc0e6, 0xc0e7, 0xc0e8, 0xc0e9, 0xc0ea, - 0xc0eb, 0xc0ec, 0xc0ed, 0xc0ee, 0xc0ef, 0xc0f0, 0xc0f1, 0xc0f2, - 0xc0f3, 0xc0f4, 0x003f, 0xc0f5, 0xc0f6, 0xc0f7, 0xc0f8, 0xc0f9, - 0xc0fa, 0xc0fb, 0xc0fc, 0xc0fd, 0xc0fe, 0xc0ff, 0x003f, 0x003f, - 0x003f, 0xc100, 0xc101, 0xc102, 0xc103, 0xc104, 0xc105, 0xc106, - 0xc107, 0xc108, 0xc109, 0xc10a, 0xc10b, 0xc10c, 0xc10d, 0xc10e, - 0xc10f, 0xc110, 0x003f, 0xc111, 0xc112, 0xc113, 0xc114, 0xc115, - 0xc116, 0xc117, 0xc118, 0xc119, 0xc11a, 0xc11b, 0x003f, 0x003f, - 0x003f, 0xc11c, 0xc11d, 0xc11e, 0xc11f, 0xc120, 0xc121, 0xc122, - 0xc123, 0xc124, 0xc125, 0xc126, 0xc127, 0xc128, 0xc129, 0xc12a, - 0xc12b, 0xc12c, 0x003f, 0xc12d, 0xc12e, 0xc12f, 0xc130, 0xc131, - 0xc132, 0xc133, 0xc134, 0xc135, 0xc136, 0xc137, 0x003f, 0x003f, - /* lead byte ad */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc138, 0xc139, 0xc13a, 0xc13b, 0xc13c, 0xc13d, 0xc13e, - 0xc13f, 0xc140, 0xc141, 0xc142, 0xc143, 0xc144, 0xc145, 0xc146, - 0xc147, 0xc148, 0x003f, 0xc149, 0xc14a, 0xc14b, 0xc14c, 0xc14d, - 0xc14e, 0xc14f, 0xc150, 0xc151, 0xc152, 0xc153, 0x003f, 0x003f, - 0x003f, 0xc154, 0xc155, 0xc156, 0xc157, 0xc158, 0xc159, 0xc15a, - 0xc15b, 0xc15c, 0xc15d, 0xc15e, 0xc15f, 0xc160, 0xc161, 0xc162, - 0xc163, 0xc164, 0x003f, 0xc165, 0xc166, 0xc167, 0xc168, 0xc169, - 0xc16a, 0xc16b, 0xc16c, 0xc16d, 0xc16e, 0xc16f, 0x003f, 0x003f, - 0x003f, 0xc170, 0xc171, 0xc172, 0xc173, 0xc174, 0xc175, 0xc176, - 0xc177, 0xc178, 0xc179, 0xc17a, 0xc17b, 0xc17c, 0xc17d, 0xc17e, - 0xc17f, 0xc180, 0x003f, 0xc181, 0xc182, 0xc183, 0xc184, 0xc185, - 0xc186, 0xc187, 0xc188, 0xc189, 0xc18a, 0xc18b, 0x003f, 0x003f, - 0x003f, 0xc18c, 0xc18d, 0xc18e, 0xc18f, 0xc190, 0xc191, 0xc192, - 0xc193, 0xc194, 0xc195, 0xc196, 0xc197, 0xc198, 0xc199, 0xc19a, - 0xc19b, 0xc19c, 0x003f, 0xc19d, 0xc19e, 0xc19f, 0xc1a0, 0xc1a1, - 0xc1a2, 0xc1a3, 0xc1a4, 0xc1a5, 0xc1a6, 0xc1a7, 0x003f, 0x003f, - 0x003f, 0xc1a8, 0xc1a9, 0xc1aa, 0xc1ab, 0xc1ac, 0xc1ad, 0xc1ae, - 0xc1af, 0xc1b0, 0xc1b1, 0xc1b2, 0xc1b3, 0xc1b4, 0xc1b5, 0xc1b6, - 0xc1b7, 0xc1b8, 0x003f, 0xc1b9, 0xc1ba, 0xc1bb, 0xc1bc, 0xc1bd, - 0xc1be, 0xc1bf, 0xc1c0, 0xc1c1, 0xc1c2, 0xc1c3, 0x003f, 0x003f, - 0x003f, 0xc1c4, 0xc1c5, 0xc1c6, 0xc1c7, 0xc1c8, 0xc1c9, 0xc1ca, - 0xc1cb, 0xc1cc, 0xc1cd, 0xc1ce, 0xc1cf, 0xc1d0, 0xc1d1, 0xc1d2, - 0xc1d3, 0xc1d4, 0x003f, 0xc1d5, 0xc1d6, 0xc1d7, 0xc1d8, 0xc1d9, - 0xc1da, 0xc1db, 0xc1dc, 0xc1dd, 0xc1de, 0xc1df, 0x003f, 0x003f, - /* lead byte ae */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc1e0, 0xc1e1, 0xc1e2, 0xc1e3, 0xc1e4, 0xc1e5, 0xc1e6, - 0xc1e7, 0xc1e8, 0xc1e9, 0xc1ea, 0xc1eb, 0xc1ec, 0xc1ed, 0xc1ee, - 0xc1ef, 0xc1f0, 0x003f, 0xc1f1, 0xc1f2, 0xc1f3, 0xc1f4, 0xc1f5, - 0xc1f6, 0xc1f7, 0xc1f8, 0xc1f9, 0xc1fa, 0xc1fb, 0x003f, 0x003f, - 0x003f, 0xc1fc, 0xc1fd, 0xc1fe, 0xc1ff, 0xc200, 0xc201, 0xc202, - 0xc203, 0xc204, 0xc205, 0xc206, 0xc207, 0xc208, 0xc209, 0xc20a, - 0xc20b, 0xc20c, 0x003f, 0xc20d, 0xc20e, 0xc20f, 0xc210, 0xc211, - 0xc212, 0xc213, 0xc214, 0xc215, 0xc216, 0xc217, 0x003f, 0x003f, - 0x003f, 0xc218, 0xc219, 0xc21a, 0xc21b, 0xc21c, 0xc21d, 0xc21e, - 0xc21f, 0xc220, 0xc221, 0xc222, 0xc223, 0xc224, 0xc225, 0xc226, - 0xc227, 0xc228, 0x003f, 0xc229, 0xc22a, 0xc22b, 0xc22c, 0xc22d, - 0xc22e, 0xc22f, 0xc230, 0xc231, 0xc232, 0xc233, 0x003f, 0x003f, - 0x003f, 0xc234, 0xc235, 0xc236, 0xc237, 0xc238, 0xc239, 0xc23a, - 0xc23b, 0xc23c, 0xc23d, 0xc23e, 0xc23f, 0xc240, 0xc241, 0xc242, - 0xc243, 0xc244, 0x003f, 0xc245, 0xc246, 0xc247, 0xc248, 0xc249, - 0xc24a, 0xc24b, 0xc24c, 0xc24d, 0xc24e, 0xc24f, 0x003f, 0x003f, - 0x003f, 0xc250, 0xc251, 0xc252, 0xc253, 0xc254, 0xc255, 0xc256, - 0xc257, 0xc258, 0xc259, 0xc25a, 0xc25b, 0xc25c, 0xc25d, 0xc25e, - 0xc25f, 0xc260, 0x003f, 0xc261, 0xc262, 0xc263, 0xc264, 0xc265, - 0xc266, 0xc267, 0xc268, 0xc269, 0xc26a, 0xc26b, 0x003f, 0x003f, - 0x003f, 0xc26c, 0xc26d, 0xc26e, 0xc26f, 0xc270, 0xc271, 0xc272, - 0xc273, 0xc274, 0xc275, 0xc276, 0xc277, 0xc278, 0xc279, 0xc27a, - 0xc27b, 0xc27c, 0x003f, 0xc27d, 0xc27e, 0xc27f, 0xc280, 0xc281, - 0xc282, 0xc283, 0xc284, 0xc285, 0xc286, 0xc287, 0x003f, 0x003f, - /* lead byte af */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc288, 0xc289, 0xc28a, 0xc28b, 0xc28c, 0xc28d, 0xc28e, - 0xc28f, 0xc290, 0xc291, 0xc292, 0xc293, 0xc294, 0xc295, 0xc296, - 0xc297, 0xc298, 0x003f, 0xc299, 0xc29a, 0xc29b, 0xc29c, 0xc29d, - 0xc29e, 0xc29f, 0xc2a0, 0xc2a1, 0xc2a2, 0xc2a3, 0x003f, 0x003f, - 0x003f, 0xc2a4, 0xc2a5, 0xc2a6, 0xc2a7, 0xc2a8, 0xc2a9, 0xc2aa, - 0xc2ab, 0xc2ac, 0xc2ad, 0xc2ae, 0xc2af, 0xc2b0, 0xc2b1, 0xc2b2, - 0xc2b3, 0xc2b4, 0x003f, 0xc2b5, 0xc2b6, 0xc2b7, 0xc2b8, 0xc2b9, - 0xc2ba, 0xc2bb, 0xc2bc, 0xc2bd, 0xc2be, 0xc2bf, 0x003f, 0x003f, - 0x003f, 0xc2c0, 0xc2c1, 0xc2c2, 0xc2c3, 0xc2c4, 0xc2c5, 0xc2c6, - 0xc2c7, 0xc2c8, 0xc2c9, 0xc2ca, 0xc2cb, 0xc2cc, 0xc2cd, 0xc2ce, - 0xc2cf, 0xc2d0, 0x003f, 0xc2d1, 0xc2d2, 0xc2d3, 0xc2d4, 0xc2d5, - 0xc2d6, 0xc2d7, 0xc2d8, 0xc2d9, 0xc2da, 0xc2db, 0x003f, 0x003f, - 0x003f, 0xc2dc, 0xc2dd, 0xc2de, 0xc2df, 0xc2e0, 0xc2e1, 0xc2e2, - 0xc2e3, 0xc2e4, 0xc2e5, 0xc2e6, 0xc2e7, 0xc2e8, 0xc2e9, 0xc2ea, - 0xc2eb, 0xc2ec, 0x003f, 0xc2ed, 0xc2ee, 0xc2ef, 0xc2f0, 0xc2f1, - 0xc2f2, 0xc2f3, 0xc2f4, 0xc2f5, 0xc2f6, 0xc2f7, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte b0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3146, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc2f8, 0xc2f9, 0xc2fa, 0xc2fb, 0xc2fc, 0xc2fd, 0xc2fe, - 0xc2ff, 0xc300, 0xc301, 0xc302, 0xc303, 0xc304, 0xc305, 0xc306, - 0xc307, 0xc308, 0x003f, 0xc309, 0xc30a, 0xc30b, 0xc30c, 0xc30d, - 0xc30e, 0xc30f, 0xc310, 0xc311, 0xc312, 0xc313, 0x003f, 0x003f, - 0x003f, 0xc314, 0xc315, 0xc316, 0xc317, 0xc318, 0xc319, 0xc31a, - 0xc31b, 0xc31c, 0xc31d, 0xc31e, 0xc31f, 0xc320, 0xc321, 0xc322, - 0xc323, 0xc324, 0x003f, 0xc325, 0xc326, 0xc327, 0xc328, 0xc329, - 0xc32a, 0xc32b, 0xc32c, 0xc32d, 0xc32e, 0xc32f, 0x003f, 0x003f, - 0x003f, 0xc330, 0xc331, 0xc332, 0xc333, 0xc334, 0xc335, 0xc336, - 0xc337, 0xc338, 0xc339, 0xc33a, 0xc33b, 0xc33c, 0xc33d, 0xc33e, - 0xc33f, 0xc340, 0x003f, 0xc341, 0xc342, 0xc343, 0xc344, 0xc345, - 0xc346, 0xc347, 0xc348, 0xc349, 0xc34a, 0xc34b, 0x003f, 0x003f, - 0x003f, 0xc34c, 0xc34d, 0xc34e, 0xc34f, 0xc350, 0xc351, 0xc352, - 0xc353, 0xc354, 0xc355, 0xc356, 0xc357, 0xc358, 0xc359, 0xc35a, - 0xc35b, 0xc35c, 0x003f, 0xc35d, 0xc35e, 0xc35f, 0xc360, 0xc361, - 0xc362, 0xc363, 0xc364, 0xc365, 0xc366, 0xc367, 0x003f, 0x003f, - 0x003f, 0xc368, 0xc369, 0xc36a, 0xc36b, 0xc36c, 0xc36d, 0xc36e, - 0xc36f, 0xc370, 0xc371, 0xc372, 0xc373, 0xc374, 0xc375, 0xc376, - 0xc377, 0xc378, 0x003f, 0xc379, 0xc37a, 0xc37b, 0xc37c, 0xc37d, - 0xc37e, 0xc37f, 0xc380, 0xc381, 0xc382, 0xc383, 0x003f, 0x003f, - /* lead byte b1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc384, 0xc385, 0xc386, 0xc387, 0xc388, 0xc389, 0xc38a, - 0xc38b, 0xc38c, 0xc38d, 0xc38e, 0xc38f, 0xc390, 0xc391, 0xc392, - 0xc393, 0xc394, 0x003f, 0xc395, 0xc396, 0xc397, 0xc398, 0xc399, - 0xc39a, 0xc39b, 0xc39c, 0xc39d, 0xc39e, 0xc39f, 0x003f, 0x003f, - 0x003f, 0xc3a0, 0xc3a1, 0xc3a2, 0xc3a3, 0xc3a4, 0xc3a5, 0xc3a6, - 0xc3a7, 0xc3a8, 0xc3a9, 0xc3aa, 0xc3ab, 0xc3ac, 0xc3ad, 0xc3ae, - 0xc3af, 0xc3b0, 0x003f, 0xc3b1, 0xc3b2, 0xc3b3, 0xc3b4, 0xc3b5, - 0xc3b6, 0xc3b7, 0xc3b8, 0xc3b9, 0xc3ba, 0xc3bb, 0x003f, 0x003f, - 0x003f, 0xc3bc, 0xc3bd, 0xc3be, 0xc3bf, 0xc3c0, 0xc3c1, 0xc3c2, - 0xc3c3, 0xc3c4, 0xc3c5, 0xc3c6, 0xc3c7, 0xc3c8, 0xc3c9, 0xc3ca, - 0xc3cb, 0xc3cc, 0x003f, 0xc3cd, 0xc3ce, 0xc3cf, 0xc3d0, 0xc3d1, - 0xc3d2, 0xc3d3, 0xc3d4, 0xc3d5, 0xc3d6, 0xc3d7, 0x003f, 0x003f, - 0x003f, 0xc3d8, 0xc3d9, 0xc3da, 0xc3db, 0xc3dc, 0xc3dd, 0xc3de, - 0xc3df, 0xc3e0, 0xc3e1, 0xc3e2, 0xc3e3, 0xc3e4, 0xc3e5, 0xc3e6, - 0xc3e7, 0xc3e8, 0x003f, 0xc3e9, 0xc3ea, 0xc3eb, 0xc3ec, 0xc3ed, - 0xc3ee, 0xc3ef, 0xc3f0, 0xc3f1, 0xc3f2, 0xc3f3, 0x003f, 0x003f, - 0x003f, 0xc3f4, 0xc3f5, 0xc3f6, 0xc3f7, 0xc3f8, 0xc3f9, 0xc3fa, - 0xc3fb, 0xc3fc, 0xc3fd, 0xc3fe, 0xc3ff, 0xc400, 0xc401, 0xc402, - 0xc403, 0xc404, 0x003f, 0xc405, 0xc406, 0xc407, 0xc408, 0xc409, - 0xc40a, 0xc40b, 0xc40c, 0xc40d, 0xc40e, 0xc40f, 0x003f, 0x003f, - 0x003f, 0xc410, 0xc411, 0xc412, 0xc413, 0xc414, 0xc415, 0xc416, - 0xc417, 0xc418, 0xc419, 0xc41a, 0xc41b, 0xc41c, 0xc41d, 0xc41e, - 0xc41f, 0xc420, 0x003f, 0xc421, 0xc422, 0xc423, 0xc424, 0xc425, - 0xc426, 0xc427, 0xc428, 0xc429, 0xc42a, 0xc42b, 0x003f, 0x003f, - /* lead byte b2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc42c, 0xc42d, 0xc42e, 0xc42f, 0xc430, 0xc431, 0xc432, - 0xc433, 0xc434, 0xc435, 0xc436, 0xc437, 0xc438, 0xc439, 0xc43a, - 0xc43b, 0xc43c, 0x003f, 0xc43d, 0xc43e, 0xc43f, 0xc440, 0xc441, - 0xc442, 0xc443, 0xc444, 0xc445, 0xc446, 0xc447, 0x003f, 0x003f, - 0x003f, 0xc448, 0xc449, 0xc44a, 0xc44b, 0xc44c, 0xc44d, 0xc44e, - 0xc44f, 0xc450, 0xc451, 0xc452, 0xc453, 0xc454, 0xc455, 0xc456, - 0xc457, 0xc458, 0x003f, 0xc459, 0xc45a, 0xc45b, 0xc45c, 0xc45d, - 0xc45e, 0xc45f, 0xc460, 0xc461, 0xc462, 0xc463, 0x003f, 0x003f, - 0x003f, 0xc464, 0xc465, 0xc466, 0xc467, 0xc468, 0xc469, 0xc46a, - 0xc46b, 0xc46c, 0xc46d, 0xc46e, 0xc46f, 0xc470, 0xc471, 0xc472, - 0xc473, 0xc474, 0x003f, 0xc475, 0xc476, 0xc477, 0xc478, 0xc479, - 0xc47a, 0xc47b, 0xc47c, 0xc47d, 0xc47e, 0xc47f, 0x003f, 0x003f, - 0x003f, 0xc480, 0xc481, 0xc482, 0xc483, 0xc484, 0xc485, 0xc486, - 0xc487, 0xc488, 0xc489, 0xc48a, 0xc48b, 0xc48c, 0xc48d, 0xc48e, - 0xc48f, 0xc490, 0x003f, 0xc491, 0xc492, 0xc493, 0xc494, 0xc495, - 0xc496, 0xc497, 0xc498, 0xc499, 0xc49a, 0xc49b, 0x003f, 0x003f, - 0x003f, 0xc49c, 0xc49d, 0xc49e, 0xc49f, 0xc4a0, 0xc4a1, 0xc4a2, - 0xc4a3, 0xc4a4, 0xc4a5, 0xc4a6, 0xc4a7, 0xc4a8, 0xc4a9, 0xc4aa, - 0xc4ab, 0xc4ac, 0x003f, 0xc4ad, 0xc4ae, 0xc4af, 0xc4b0, 0xc4b1, - 0xc4b2, 0xc4b3, 0xc4b4, 0xc4b5, 0xc4b6, 0xc4b7, 0x003f, 0x003f, - 0x003f, 0xc4b8, 0xc4b9, 0xc4ba, 0xc4bb, 0xc4bc, 0xc4bd, 0xc4be, - 0xc4bf, 0xc4c0, 0xc4c1, 0xc4c2, 0xc4c3, 0xc4c4, 0xc4c5, 0xc4c6, - 0xc4c7, 0xc4c8, 0x003f, 0xc4c9, 0xc4ca, 0xc4cb, 0xc4cc, 0xc4cd, - 0xc4ce, 0xc4cf, 0xc4d0, 0xc4d1, 0xc4d2, 0xc4d3, 0x003f, 0x003f, - /* lead byte b3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc4d4, 0xc4d5, 0xc4d6, 0xc4d7, 0xc4d8, 0xc4d9, 0xc4da, - 0xc4db, 0xc4dc, 0xc4dd, 0xc4de, 0xc4df, 0xc4e0, 0xc4e1, 0xc4e2, - 0xc4e3, 0xc4e4, 0x003f, 0xc4e5, 0xc4e6, 0xc4e7, 0xc4e8, 0xc4e9, - 0xc4ea, 0xc4eb, 0xc4ec, 0xc4ed, 0xc4ee, 0xc4ef, 0x003f, 0x003f, - 0x003f, 0xc4f0, 0xc4f1, 0xc4f2, 0xc4f3, 0xc4f4, 0xc4f5, 0xc4f6, - 0xc4f7, 0xc4f8, 0xc4f9, 0xc4fa, 0xc4fb, 0xc4fc, 0xc4fd, 0xc4fe, - 0xc4ff, 0xc500, 0x003f, 0xc501, 0xc502, 0xc503, 0xc504, 0xc505, - 0xc506, 0xc507, 0xc508, 0xc509, 0xc50a, 0xc50b, 0x003f, 0x003f, - 0x003f, 0xc50c, 0xc50d, 0xc50e, 0xc50f, 0xc510, 0xc511, 0xc512, - 0xc513, 0xc514, 0xc515, 0xc516, 0xc517, 0xc518, 0xc519, 0xc51a, - 0xc51b, 0xc51c, 0x003f, 0xc51d, 0xc51e, 0xc51f, 0xc520, 0xc521, - 0xc522, 0xc523, 0xc524, 0xc525, 0xc526, 0xc527, 0x003f, 0x003f, - 0x003f, 0xc528, 0xc529, 0xc52a, 0xc52b, 0xc52c, 0xc52d, 0xc52e, - 0xc52f, 0xc530, 0xc531, 0xc532, 0xc533, 0xc534, 0xc535, 0xc536, - 0xc537, 0xc538, 0x003f, 0xc539, 0xc53a, 0xc53b, 0xc53c, 0xc53d, - 0xc53e, 0xc53f, 0xc540, 0xc541, 0xc542, 0xc543, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte b4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3147, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc544, 0xc545, 0xc546, 0xc547, 0xc548, 0xc549, 0xc54a, - 0xc54b, 0xc54c, 0xc54d, 0xc54e, 0xc54f, 0xc550, 0xc551, 0xc552, - 0xc553, 0xc554, 0x003f, 0xc555, 0xc556, 0xc557, 0xc558, 0xc559, - 0xc55a, 0xc55b, 0xc55c, 0xc55d, 0xc55e, 0xc55f, 0x003f, 0x003f, - 0x003f, 0xc560, 0xc561, 0xc562, 0xc563, 0xc564, 0xc565, 0xc566, - 0xc567, 0xc568, 0xc569, 0xc56a, 0xc56b, 0xc56c, 0xc56d, 0xc56e, - 0xc56f, 0xc570, 0x003f, 0xc571, 0xc572, 0xc573, 0xc574, 0xc575, - 0xc576, 0xc577, 0xc578, 0xc579, 0xc57a, 0xc57b, 0x003f, 0x003f, - 0x003f, 0xc57c, 0xc57d, 0xc57e, 0xc57f, 0xc580, 0xc581, 0xc582, - 0xc583, 0xc584, 0xc585, 0xc586, 0xc587, 0xc588, 0xc589, 0xc58a, - 0xc58b, 0xc58c, 0x003f, 0xc58d, 0xc58e, 0xc58f, 0xc590, 0xc591, - 0xc592, 0xc593, 0xc594, 0xc595, 0xc596, 0xc597, 0x003f, 0x003f, - 0x003f, 0xc598, 0xc599, 0xc59a, 0xc59b, 0xc59c, 0xc59d, 0xc59e, - 0xc59f, 0xc5a0, 0xc5a1, 0xc5a2, 0xc5a3, 0xc5a4, 0xc5a5, 0xc5a6, - 0xc5a7, 0xc5a8, 0x003f, 0xc5a9, 0xc5aa, 0xc5ab, 0xc5ac, 0xc5ad, - 0xc5ae, 0xc5af, 0xc5b0, 0xc5b1, 0xc5b2, 0xc5b3, 0x003f, 0x003f, - 0x003f, 0xc5b4, 0xc5b5, 0xc5b6, 0xc5b7, 0xc5b8, 0xc5b9, 0xc5ba, - 0xc5bb, 0xc5bc, 0xc5bd, 0xc5be, 0xc5bf, 0xc5c0, 0xc5c1, 0xc5c2, - 0xc5c3, 0xc5c4, 0x003f, 0xc5c5, 0xc5c6, 0xc5c7, 0xc5c8, 0xc5c9, - 0xc5ca, 0xc5cb, 0xc5cc, 0xc5cd, 0xc5ce, 0xc5cf, 0x003f, 0x003f, - /* lead byte b5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc5d0, 0xc5d1, 0xc5d2, 0xc5d3, 0xc5d4, 0xc5d5, 0xc5d6, - 0xc5d7, 0xc5d8, 0xc5d9, 0xc5da, 0xc5db, 0xc5dc, 0xc5dd, 0xc5de, - 0xc5df, 0xc5e0, 0x003f, 0xc5e1, 0xc5e2, 0xc5e3, 0xc5e4, 0xc5e5, - 0xc5e6, 0xc5e7, 0xc5e8, 0xc5e9, 0xc5ea, 0xc5eb, 0x003f, 0x003f, - 0x003f, 0xc5ec, 0xc5ed, 0xc5ee, 0xc5ef, 0xc5f0, 0xc5f1, 0xc5f2, - 0xc5f3, 0xc5f4, 0xc5f5, 0xc5f6, 0xc5f7, 0xc5f8, 0xc5f9, 0xc5fa, - 0xc5fb, 0xc5fc, 0x003f, 0xc5fd, 0xc5fe, 0xc5ff, 0xc600, 0xc601, - 0xc602, 0xc603, 0xc604, 0xc605, 0xc606, 0xc607, 0x003f, 0x003f, - 0x003f, 0xc608, 0xc609, 0xc60a, 0xc60b, 0xc60c, 0xc60d, 0xc60e, - 0xc60f, 0xc610, 0xc611, 0xc612, 0xc613, 0xc614, 0xc615, 0xc616, - 0xc617, 0xc618, 0x003f, 0xc619, 0xc61a, 0xc61b, 0xc61c, 0xc61d, - 0xc61e, 0xc61f, 0xc620, 0xc621, 0xc622, 0xc623, 0x003f, 0x003f, - 0x003f, 0xc624, 0xc625, 0xc626, 0xc627, 0xc628, 0xc629, 0xc62a, - 0xc62b, 0xc62c, 0xc62d, 0xc62e, 0xc62f, 0xc630, 0xc631, 0xc632, - 0xc633, 0xc634, 0x003f, 0xc635, 0xc636, 0xc637, 0xc638, 0xc639, - 0xc63a, 0xc63b, 0xc63c, 0xc63d, 0xc63e, 0xc63f, 0x003f, 0x003f, - 0x003f, 0xc640, 0xc641, 0xc642, 0xc643, 0xc644, 0xc645, 0xc646, - 0xc647, 0xc648, 0xc649, 0xc64a, 0xc64b, 0xc64c, 0xc64d, 0xc64e, - 0xc64f, 0xc650, 0x003f, 0xc651, 0xc652, 0xc653, 0xc654, 0xc655, - 0xc656, 0xc657, 0xc658, 0xc659, 0xc65a, 0xc65b, 0x003f, 0x003f, - 0x003f, 0xc65c, 0xc65d, 0xc65e, 0xc65f, 0xc660, 0xc661, 0xc662, - 0xc663, 0xc664, 0xc665, 0xc666, 0xc667, 0xc668, 0xc669, 0xc66a, - 0xc66b, 0xc66c, 0x003f, 0xc66d, 0xc66e, 0xc66f, 0xc670, 0xc671, - 0xc672, 0xc673, 0xc674, 0xc675, 0xc676, 0xc677, 0x003f, 0x003f, - /* lead byte b6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc678, 0xc679, 0xc67a, 0xc67b, 0xc67c, 0xc67d, 0xc67e, - 0xc67f, 0xc680, 0xc681, 0xc682, 0xc683, 0xc684, 0xc685, 0xc686, - 0xc687, 0xc688, 0x003f, 0xc689, 0xc68a, 0xc68b, 0xc68c, 0xc68d, - 0xc68e, 0xc68f, 0xc690, 0xc691, 0xc692, 0xc693, 0x003f, 0x003f, - 0x003f, 0xc694, 0xc695, 0xc696, 0xc697, 0xc698, 0xc699, 0xc69a, - 0xc69b, 0xc69c, 0xc69d, 0xc69e, 0xc69f, 0xc6a0, 0xc6a1, 0xc6a2, - 0xc6a3, 0xc6a4, 0x003f, 0xc6a5, 0xc6a6, 0xc6a7, 0xc6a8, 0xc6a9, - 0xc6aa, 0xc6ab, 0xc6ac, 0xc6ad, 0xc6ae, 0xc6af, 0x003f, 0x003f, - 0x003f, 0xc6b0, 0xc6b1, 0xc6b2, 0xc6b3, 0xc6b4, 0xc6b5, 0xc6b6, - 0xc6b7, 0xc6b8, 0xc6b9, 0xc6ba, 0xc6bb, 0xc6bc, 0xc6bd, 0xc6be, - 0xc6bf, 0xc6c0, 0x003f, 0xc6c1, 0xc6c2, 0xc6c3, 0xc6c4, 0xc6c5, - 0xc6c6, 0xc6c7, 0xc6c8, 0xc6c9, 0xc6ca, 0xc6cb, 0x003f, 0x003f, - 0x003f, 0xc6cc, 0xc6cd, 0xc6ce, 0xc6cf, 0xc6d0, 0xc6d1, 0xc6d2, - 0xc6d3, 0xc6d4, 0xc6d5, 0xc6d6, 0xc6d7, 0xc6d8, 0xc6d9, 0xc6da, - 0xc6db, 0xc6dc, 0x003f, 0xc6dd, 0xc6de, 0xc6df, 0xc6e0, 0xc6e1, - 0xc6e2, 0xc6e3, 0xc6e4, 0xc6e5, 0xc6e6, 0xc6e7, 0x003f, 0x003f, - 0x003f, 0xc6e8, 0xc6e9, 0xc6ea, 0xc6eb, 0xc6ec, 0xc6ed, 0xc6ee, - 0xc6ef, 0xc6f0, 0xc6f1, 0xc6f2, 0xc6f3, 0xc6f4, 0xc6f5, 0xc6f6, - 0xc6f7, 0xc6f8, 0x003f, 0xc6f9, 0xc6fa, 0xc6fb, 0xc6fc, 0xc6fd, - 0xc6fe, 0xc6ff, 0xc700, 0xc701, 0xc702, 0xc703, 0x003f, 0x003f, - 0x003f, 0xc704, 0xc705, 0xc706, 0xc707, 0xc708, 0xc709, 0xc70a, - 0xc70b, 0xc70c, 0xc70d, 0xc70e, 0xc70f, 0xc710, 0xc711, 0xc712, - 0xc713, 0xc714, 0x003f, 0xc715, 0xc716, 0xc717, 0xc718, 0xc719, - 0xc71a, 0xc71b, 0xc71c, 0xc71d, 0xc71e, 0xc71f, 0x003f, 0x003f, - /* lead byte b7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc720, 0xc721, 0xc722, 0xc723, 0xc724, 0xc725, 0xc726, - 0xc727, 0xc728, 0xc729, 0xc72a, 0xc72b, 0xc72c, 0xc72d, 0xc72e, - 0xc72f, 0xc730, 0x003f, 0xc731, 0xc732, 0xc733, 0xc734, 0xc735, - 0xc736, 0xc737, 0xc738, 0xc739, 0xc73a, 0xc73b, 0x003f, 0x003f, - 0x003f, 0xc73c, 0xc73d, 0xc73e, 0xc73f, 0xc740, 0xc741, 0xc742, - 0xc743, 0xc744, 0xc745, 0xc746, 0xc747, 0xc748, 0xc749, 0xc74a, - 0xc74b, 0xc74c, 0x003f, 0xc74d, 0xc74e, 0xc74f, 0xc750, 0xc751, - 0xc752, 0xc753, 0xc754, 0xc755, 0xc756, 0xc757, 0x003f, 0x003f, - 0x003f, 0xc758, 0xc759, 0xc75a, 0xc75b, 0xc75c, 0xc75d, 0xc75e, - 0xc75f, 0xc760, 0xc761, 0xc762, 0xc763, 0xc764, 0xc765, 0xc766, - 0xc767, 0xc768, 0x003f, 0xc769, 0xc76a, 0xc76b, 0xc76c, 0xc76d, - 0xc76e, 0xc76f, 0xc770, 0xc771, 0xc772, 0xc773, 0x003f, 0x003f, - 0x003f, 0xc774, 0xc775, 0xc776, 0xc777, 0xc778, 0xc779, 0xc77a, - 0xc77b, 0xc77c, 0xc77d, 0xc77e, 0xc77f, 0xc780, 0xc781, 0xc782, - 0xc783, 0xc784, 0x003f, 0xc785, 0xc786, 0xc787, 0xc788, 0xc789, - 0xc78a, 0xc78b, 0xc78c, 0xc78d, 0xc78e, 0xc78f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte b8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3148, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc790, 0xc791, 0xc792, 0xc793, 0xc794, 0xc795, 0xc796, - 0xc797, 0xc798, 0xc799, 0xc79a, 0xc79b, 0xc79c, 0xc79d, 0xc79e, - 0xc79f, 0xc7a0, 0x003f, 0xc7a1, 0xc7a2, 0xc7a3, 0xc7a4, 0xc7a5, - 0xc7a6, 0xc7a7, 0xc7a8, 0xc7a9, 0xc7aa, 0xc7ab, 0x003f, 0x003f, - 0x003f, 0xc7ac, 0xc7ad, 0xc7ae, 0xc7af, 0xc7b0, 0xc7b1, 0xc7b2, - 0xc7b3, 0xc7b4, 0xc7b5, 0xc7b6, 0xc7b7, 0xc7b8, 0xc7b9, 0xc7ba, - 0xc7bb, 0xc7bc, 0x003f, 0xc7bd, 0xc7be, 0xc7bf, 0xc7c0, 0xc7c1, - 0xc7c2, 0xc7c3, 0xc7c4, 0xc7c5, 0xc7c6, 0xc7c7, 0x003f, 0x003f, - 0x003f, 0xc7c8, 0xc7c9, 0xc7ca, 0xc7cb, 0xc7cc, 0xc7cd, 0xc7ce, - 0xc7cf, 0xc7d0, 0xc7d1, 0xc7d2, 0xc7d3, 0xc7d4, 0xc7d5, 0xc7d6, - 0xc7d7, 0xc7d8, 0x003f, 0xc7d9, 0xc7da, 0xc7db, 0xc7dc, 0xc7dd, - 0xc7de, 0xc7df, 0xc7e0, 0xc7e1, 0xc7e2, 0xc7e3, 0x003f, 0x003f, - 0x003f, 0xc7e4, 0xc7e5, 0xc7e6, 0xc7e7, 0xc7e8, 0xc7e9, 0xc7ea, - 0xc7eb, 0xc7ec, 0xc7ed, 0xc7ee, 0xc7ef, 0xc7f0, 0xc7f1, 0xc7f2, - 0xc7f3, 0xc7f4, 0x003f, 0xc7f5, 0xc7f6, 0xc7f7, 0xc7f8, 0xc7f9, - 0xc7fa, 0xc7fb, 0xc7fc, 0xc7fd, 0xc7fe, 0xc7ff, 0x003f, 0x003f, - 0x003f, 0xc800, 0xc801, 0xc802, 0xc803, 0xc804, 0xc805, 0xc806, - 0xc807, 0xc808, 0xc809, 0xc80a, 0xc80b, 0xc80c, 0xc80d, 0xc80e, - 0xc80f, 0xc810, 0x003f, 0xc811, 0xc812, 0xc813, 0xc814, 0xc815, - 0xc816, 0xc817, 0xc818, 0xc819, 0xc81a, 0xc81b, 0x003f, 0x003f, - /* lead byte b9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc81c, 0xc81d, 0xc81e, 0xc81f, 0xc820, 0xc821, 0xc822, - 0xc823, 0xc824, 0xc825, 0xc826, 0xc827, 0xc828, 0xc829, 0xc82a, - 0xc82b, 0xc82c, 0x003f, 0xc82d, 0xc82e, 0xc82f, 0xc830, 0xc831, - 0xc832, 0xc833, 0xc834, 0xc835, 0xc836, 0xc837, 0x003f, 0x003f, - 0x003f, 0xc838, 0xc839, 0xc83a, 0xc83b, 0xc83c, 0xc83d, 0xc83e, - 0xc83f, 0xc840, 0xc841, 0xc842, 0xc843, 0xc844, 0xc845, 0xc846, - 0xc847, 0xc848, 0x003f, 0xc849, 0xc84a, 0xc84b, 0xc84c, 0xc84d, - 0xc84e, 0xc84f, 0xc850, 0xc851, 0xc852, 0xc853, 0x003f, 0x003f, - 0x003f, 0xc854, 0xc855, 0xc856, 0xc857, 0xc858, 0xc859, 0xc85a, - 0xc85b, 0xc85c, 0xc85d, 0xc85e, 0xc85f, 0xc860, 0xc861, 0xc862, - 0xc863, 0xc864, 0x003f, 0xc865, 0xc866, 0xc867, 0xc868, 0xc869, - 0xc86a, 0xc86b, 0xc86c, 0xc86d, 0xc86e, 0xc86f, 0x003f, 0x003f, - 0x003f, 0xc870, 0xc871, 0xc872, 0xc873, 0xc874, 0xc875, 0xc876, - 0xc877, 0xc878, 0xc879, 0xc87a, 0xc87b, 0xc87c, 0xc87d, 0xc87e, - 0xc87f, 0xc880, 0x003f, 0xc881, 0xc882, 0xc883, 0xc884, 0xc885, - 0xc886, 0xc887, 0xc888, 0xc889, 0xc88a, 0xc88b, 0x003f, 0x003f, - 0x003f, 0xc88c, 0xc88d, 0xc88e, 0xc88f, 0xc890, 0xc891, 0xc892, - 0xc893, 0xc894, 0xc895, 0xc896, 0xc897, 0xc898, 0xc899, 0xc89a, - 0xc89b, 0xc89c, 0x003f, 0xc89d, 0xc89e, 0xc89f, 0xc8a0, 0xc8a1, - 0xc8a2, 0xc8a3, 0xc8a4, 0xc8a5, 0xc8a6, 0xc8a7, 0x003f, 0x003f, - 0x003f, 0xc8a8, 0xc8a9, 0xc8aa, 0xc8ab, 0xc8ac, 0xc8ad, 0xc8ae, - 0xc8af, 0xc8b0, 0xc8b1, 0xc8b2, 0xc8b3, 0xc8b4, 0xc8b5, 0xc8b6, - 0xc8b7, 0xc8b8, 0x003f, 0xc8b9, 0xc8ba, 0xc8bb, 0xc8bc, 0xc8bd, - 0xc8be, 0xc8bf, 0xc8c0, 0xc8c1, 0xc8c2, 0xc8c3, 0x003f, 0x003f, - /* lead byte ba */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc8c4, 0xc8c5, 0xc8c6, 0xc8c7, 0xc8c8, 0xc8c9, 0xc8ca, - 0xc8cb, 0xc8cc, 0xc8cd, 0xc8ce, 0xc8cf, 0xc8d0, 0xc8d1, 0xc8d2, - 0xc8d3, 0xc8d4, 0x003f, 0xc8d5, 0xc8d6, 0xc8d7, 0xc8d8, 0xc8d9, - 0xc8da, 0xc8db, 0xc8dc, 0xc8dd, 0xc8de, 0xc8df, 0x003f, 0x003f, - 0x003f, 0xc8e0, 0xc8e1, 0xc8e2, 0xc8e3, 0xc8e4, 0xc8e5, 0xc8e6, - 0xc8e7, 0xc8e8, 0xc8e9, 0xc8ea, 0xc8eb, 0xc8ec, 0xc8ed, 0xc8ee, - 0xc8ef, 0xc8f0, 0x003f, 0xc8f1, 0xc8f2, 0xc8f3, 0xc8f4, 0xc8f5, - 0xc8f6, 0xc8f7, 0xc8f8, 0xc8f9, 0xc8fa, 0xc8fb, 0x003f, 0x003f, - 0x003f, 0xc8fc, 0xc8fd, 0xc8fe, 0xc8ff, 0xc900, 0xc901, 0xc902, - 0xc903, 0xc904, 0xc905, 0xc906, 0xc907, 0xc908, 0xc909, 0xc90a, - 0xc90b, 0xc90c, 0x003f, 0xc90d, 0xc90e, 0xc90f, 0xc910, 0xc911, - 0xc912, 0xc913, 0xc914, 0xc915, 0xc916, 0xc917, 0x003f, 0x003f, - 0x003f, 0xc918, 0xc919, 0xc91a, 0xc91b, 0xc91c, 0xc91d, 0xc91e, - 0xc91f, 0xc920, 0xc921, 0xc922, 0xc923, 0xc924, 0xc925, 0xc926, - 0xc927, 0xc928, 0x003f, 0xc929, 0xc92a, 0xc92b, 0xc92c, 0xc92d, - 0xc92e, 0xc92f, 0xc930, 0xc931, 0xc932, 0xc933, 0x003f, 0x003f, - 0x003f, 0xc934, 0xc935, 0xc936, 0xc937, 0xc938, 0xc939, 0xc93a, - 0xc93b, 0xc93c, 0xc93d, 0xc93e, 0xc93f, 0xc940, 0xc941, 0xc942, - 0xc943, 0xc944, 0x003f, 0xc945, 0xc946, 0xc947, 0xc948, 0xc949, - 0xc94a, 0xc94b, 0xc94c, 0xc94d, 0xc94e, 0xc94f, 0x003f, 0x003f, - 0x003f, 0xc950, 0xc951, 0xc952, 0xc953, 0xc954, 0xc955, 0xc956, - 0xc957, 0xc958, 0xc959, 0xc95a, 0xc95b, 0xc95c, 0xc95d, 0xc95e, - 0xc95f, 0xc960, 0x003f, 0xc961, 0xc962, 0xc963, 0xc964, 0xc965, - 0xc966, 0xc967, 0xc968, 0xc969, 0xc96a, 0xc96b, 0x003f, 0x003f, - /* lead byte bb */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc96c, 0xc96d, 0xc96e, 0xc96f, 0xc970, 0xc971, 0xc972, - 0xc973, 0xc974, 0xc975, 0xc976, 0xc977, 0xc978, 0xc979, 0xc97a, - 0xc97b, 0xc97c, 0x003f, 0xc97d, 0xc97e, 0xc97f, 0xc980, 0xc981, - 0xc982, 0xc983, 0xc984, 0xc985, 0xc986, 0xc987, 0x003f, 0x003f, - 0x003f, 0xc988, 0xc989, 0xc98a, 0xc98b, 0xc98c, 0xc98d, 0xc98e, - 0xc98f, 0xc990, 0xc991, 0xc992, 0xc993, 0xc994, 0xc995, 0xc996, - 0xc997, 0xc998, 0x003f, 0xc999, 0xc99a, 0xc99b, 0xc99c, 0xc99d, - 0xc99e, 0xc99f, 0xc9a0, 0xc9a1, 0xc9a2, 0xc9a3, 0x003f, 0x003f, - 0x003f, 0xc9a4, 0xc9a5, 0xc9a6, 0xc9a7, 0xc9a8, 0xc9a9, 0xc9aa, - 0xc9ab, 0xc9ac, 0xc9ad, 0xc9ae, 0xc9af, 0xc9b0, 0xc9b1, 0xc9b2, - 0xc9b3, 0xc9b4, 0x003f, 0xc9b5, 0xc9b6, 0xc9b7, 0xc9b8, 0xc9b9, - 0xc9ba, 0xc9bb, 0xc9bc, 0xc9bd, 0xc9be, 0xc9bf, 0x003f, 0x003f, - 0x003f, 0xc9c0, 0xc9c1, 0xc9c2, 0xc9c3, 0xc9c4, 0xc9c5, 0xc9c6, - 0xc9c7, 0xc9c8, 0xc9c9, 0xc9ca, 0xc9cb, 0xc9cc, 0xc9cd, 0xc9ce, - 0xc9cf, 0xc9d0, 0x003f, 0xc9d1, 0xc9d2, 0xc9d3, 0xc9d4, 0xc9d5, - 0xc9d6, 0xc9d7, 0xc9d8, 0xc9d9, 0xc9da, 0xc9db, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte bc */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3149, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc9dc, 0xc9dd, 0xc9de, 0xc9df, 0xc9e0, 0xc9e1, 0xc9e2, - 0xc9e3, 0xc9e4, 0xc9e5, 0xc9e6, 0xc9e7, 0xc9e8, 0xc9e9, 0xc9ea, - 0xc9eb, 0xc9ec, 0x003f, 0xc9ed, 0xc9ee, 0xc9ef, 0xc9f0, 0xc9f1, - 0xc9f2, 0xc9f3, 0xc9f4, 0xc9f5, 0xc9f6, 0xc9f7, 0x003f, 0x003f, - 0x003f, 0xc9f8, 0xc9f9, 0xc9fa, 0xc9fb, 0xc9fc, 0xc9fd, 0xc9fe, - 0xc9ff, 0xca00, 0xca01, 0xca02, 0xca03, 0xca04, 0xca05, 0xca06, - 0xca07, 0xca08, 0x003f, 0xca09, 0xca0a, 0xca0b, 0xca0c, 0xca0d, - 0xca0e, 0xca0f, 0xca10, 0xca11, 0xca12, 0xca13, 0x003f, 0x003f, - 0x003f, 0xca14, 0xca15, 0xca16, 0xca17, 0xca18, 0xca19, 0xca1a, - 0xca1b, 0xca1c, 0xca1d, 0xca1e, 0xca1f, 0xca20, 0xca21, 0xca22, - 0xca23, 0xca24, 0x003f, 0xca25, 0xca26, 0xca27, 0xca28, 0xca29, - 0xca2a, 0xca2b, 0xca2c, 0xca2d, 0xca2e, 0xca2f, 0x003f, 0x003f, - 0x003f, 0xca30, 0xca31, 0xca32, 0xca33, 0xca34, 0xca35, 0xca36, - 0xca37, 0xca38, 0xca39, 0xca3a, 0xca3b, 0xca3c, 0xca3d, 0xca3e, - 0xca3f, 0xca40, 0x003f, 0xca41, 0xca42, 0xca43, 0xca44, 0xca45, - 0xca46, 0xca47, 0xca48, 0xca49, 0xca4a, 0xca4b, 0x003f, 0x003f, - 0x003f, 0xca4c, 0xca4d, 0xca4e, 0xca4f, 0xca50, 0xca51, 0xca52, - 0xca53, 0xca54, 0xca55, 0xca56, 0xca57, 0xca58, 0xca59, 0xca5a, - 0xca5b, 0xca5c, 0x003f, 0xca5d, 0xca5e, 0xca5f, 0xca60, 0xca61, - 0xca62, 0xca63, 0xca64, 0xca65, 0xca66, 0xca67, 0x003f, 0x003f, - /* lead byte bd */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xca68, 0xca69, 0xca6a, 0xca6b, 0xca6c, 0xca6d, 0xca6e, - 0xca6f, 0xca70, 0xca71, 0xca72, 0xca73, 0xca74, 0xca75, 0xca76, - 0xca77, 0xca78, 0x003f, 0xca79, 0xca7a, 0xca7b, 0xca7c, 0xca7d, - 0xca7e, 0xca7f, 0xca80, 0xca81, 0xca82, 0xca83, 0x003f, 0x003f, - 0x003f, 0xca84, 0xca85, 0xca86, 0xca87, 0xca88, 0xca89, 0xca8a, - 0xca8b, 0xca8c, 0xca8d, 0xca8e, 0xca8f, 0xca90, 0xca91, 0xca92, - 0xca93, 0xca94, 0x003f, 0xca95, 0xca96, 0xca97, 0xca98, 0xca99, - 0xca9a, 0xca9b, 0xca9c, 0xca9d, 0xca9e, 0xca9f, 0x003f, 0x003f, - 0x003f, 0xcaa0, 0xcaa1, 0xcaa2, 0xcaa3, 0xcaa4, 0xcaa5, 0xcaa6, - 0xcaa7, 0xcaa8, 0xcaa9, 0xcaaa, 0xcaab, 0xcaac, 0xcaad, 0xcaae, - 0xcaaf, 0xcab0, 0x003f, 0xcab1, 0xcab2, 0xcab3, 0xcab4, 0xcab5, - 0xcab6, 0xcab7, 0xcab8, 0xcab9, 0xcaba, 0xcabb, 0x003f, 0x003f, - 0x003f, 0xcabc, 0xcabd, 0xcabe, 0xcabf, 0xcac0, 0xcac1, 0xcac2, - 0xcac3, 0xcac4, 0xcac5, 0xcac6, 0xcac7, 0xcac8, 0xcac9, 0xcaca, - 0xcacb, 0xcacc, 0x003f, 0xcacd, 0xcace, 0xcacf, 0xcad0, 0xcad1, - 0xcad2, 0xcad3, 0xcad4, 0xcad5, 0xcad6, 0xcad7, 0x003f, 0x003f, - 0x003f, 0xcad8, 0xcad9, 0xcada, 0xcadb, 0xcadc, 0xcadd, 0xcade, - 0xcadf, 0xcae0, 0xcae1, 0xcae2, 0xcae3, 0xcae4, 0xcae5, 0xcae6, - 0xcae7, 0xcae8, 0x003f, 0xcae9, 0xcaea, 0xcaeb, 0xcaec, 0xcaed, - 0xcaee, 0xcaef, 0xcaf0, 0xcaf1, 0xcaf2, 0xcaf3, 0x003f, 0x003f, - 0x003f, 0xcaf4, 0xcaf5, 0xcaf6, 0xcaf7, 0xcaf8, 0xcaf9, 0xcafa, - 0xcafb, 0xcafc, 0xcafd, 0xcafe, 0xcaff, 0xcb00, 0xcb01, 0xcb02, - 0xcb03, 0xcb04, 0x003f, 0xcb05, 0xcb06, 0xcb07, 0xcb08, 0xcb09, - 0xcb0a, 0xcb0b, 0xcb0c, 0xcb0d, 0xcb0e, 0xcb0f, 0x003f, 0x003f, - /* lead byte be */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcb10, 0xcb11, 0xcb12, 0xcb13, 0xcb14, 0xcb15, 0xcb16, - 0xcb17, 0xcb18, 0xcb19, 0xcb1a, 0xcb1b, 0xcb1c, 0xcb1d, 0xcb1e, - 0xcb1f, 0xcb20, 0x003f, 0xcb21, 0xcb22, 0xcb23, 0xcb24, 0xcb25, - 0xcb26, 0xcb27, 0xcb28, 0xcb29, 0xcb2a, 0xcb2b, 0x003f, 0x003f, - 0x003f, 0xcb2c, 0xcb2d, 0xcb2e, 0xcb2f, 0xcb30, 0xcb31, 0xcb32, - 0xcb33, 0xcb34, 0xcb35, 0xcb36, 0xcb37, 0xcb38, 0xcb39, 0xcb3a, - 0xcb3b, 0xcb3c, 0x003f, 0xcb3d, 0xcb3e, 0xcb3f, 0xcb40, 0xcb41, - 0xcb42, 0xcb43, 0xcb44, 0xcb45, 0xcb46, 0xcb47, 0x003f, 0x003f, - 0x003f, 0xcb48, 0xcb49, 0xcb4a, 0xcb4b, 0xcb4c, 0xcb4d, 0xcb4e, - 0xcb4f, 0xcb50, 0xcb51, 0xcb52, 0xcb53, 0xcb54, 0xcb55, 0xcb56, - 0xcb57, 0xcb58, 0x003f, 0xcb59, 0xcb5a, 0xcb5b, 0xcb5c, 0xcb5d, - 0xcb5e, 0xcb5f, 0xcb60, 0xcb61, 0xcb62, 0xcb63, 0x003f, 0x003f, - 0x003f, 0xcb64, 0xcb65, 0xcb66, 0xcb67, 0xcb68, 0xcb69, 0xcb6a, - 0xcb6b, 0xcb6c, 0xcb6d, 0xcb6e, 0xcb6f, 0xcb70, 0xcb71, 0xcb72, - 0xcb73, 0xcb74, 0x003f, 0xcb75, 0xcb76, 0xcb77, 0xcb78, 0xcb79, - 0xcb7a, 0xcb7b, 0xcb7c, 0xcb7d, 0xcb7e, 0xcb7f, 0x003f, 0x003f, - 0x003f, 0xcb80, 0xcb81, 0xcb82, 0xcb83, 0xcb84, 0xcb85, 0xcb86, - 0xcb87, 0xcb88, 0xcb89, 0xcb8a, 0xcb8b, 0xcb8c, 0xcb8d, 0xcb8e, - 0xcb8f, 0xcb90, 0x003f, 0xcb91, 0xcb92, 0xcb93, 0xcb94, 0xcb95, - 0xcb96, 0xcb97, 0xcb98, 0xcb99, 0xcb9a, 0xcb9b, 0x003f, 0x003f, - 0x003f, 0xcb9c, 0xcb9d, 0xcb9e, 0xcb9f, 0xcba0, 0xcba1, 0xcba2, - 0xcba3, 0xcba4, 0xcba5, 0xcba6, 0xcba7, 0xcba8, 0xcba9, 0xcbaa, - 0xcbab, 0xcbac, 0x003f, 0xcbad, 0xcbae, 0xcbaf, 0xcbb0, 0xcbb1, - 0xcbb2, 0xcbb3, 0xcbb4, 0xcbb5, 0xcbb6, 0xcbb7, 0x003f, 0x003f, - /* lead byte bf */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcbb8, 0xcbb9, 0xcbba, 0xcbbb, 0xcbbc, 0xcbbd, 0xcbbe, - 0xcbbf, 0xcbc0, 0xcbc1, 0xcbc2, 0xcbc3, 0xcbc4, 0xcbc5, 0xcbc6, - 0xcbc7, 0xcbc8, 0x003f, 0xcbc9, 0xcbca, 0xcbcb, 0xcbcc, 0xcbcd, - 0xcbce, 0xcbcf, 0xcbd0, 0xcbd1, 0xcbd2, 0xcbd3, 0x003f, 0x003f, - 0x003f, 0xcbd4, 0xcbd5, 0xcbd6, 0xcbd7, 0xcbd8, 0xcbd9, 0xcbda, - 0xcbdb, 0xcbdc, 0xcbdd, 0xcbde, 0xcbdf, 0xcbe0, 0xcbe1, 0xcbe2, - 0xcbe3, 0xcbe4, 0x003f, 0xcbe5, 0xcbe6, 0xcbe7, 0xcbe8, 0xcbe9, - 0xcbea, 0xcbeb, 0xcbec, 0xcbed, 0xcbee, 0xcbef, 0x003f, 0x003f, - 0x003f, 0xcbf0, 0xcbf1, 0xcbf2, 0xcbf3, 0xcbf4, 0xcbf5, 0xcbf6, - 0xcbf7, 0xcbf8, 0xcbf9, 0xcbfa, 0xcbfb, 0xcbfc, 0xcbfd, 0xcbfe, - 0xcbff, 0xcc00, 0x003f, 0xcc01, 0xcc02, 0xcc03, 0xcc04, 0xcc05, - 0xcc06, 0xcc07, 0xcc08, 0xcc09, 0xcc0a, 0xcc0b, 0x003f, 0x003f, - 0x003f, 0xcc0c, 0xcc0d, 0xcc0e, 0xcc0f, 0xcc10, 0xcc11, 0xcc12, - 0xcc13, 0xcc14, 0xcc15, 0xcc16, 0xcc17, 0xcc18, 0xcc19, 0xcc1a, - 0xcc1b, 0xcc1c, 0x003f, 0xcc1d, 0xcc1e, 0xcc1f, 0xcc20, 0xcc21, - 0xcc22, 0xcc23, 0xcc24, 0xcc25, 0xcc26, 0xcc27, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte c0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x314a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcc28, 0xcc29, 0xcc2a, 0xcc2b, 0xcc2c, 0xcc2d, 0xcc2e, - 0xcc2f, 0xcc30, 0xcc31, 0xcc32, 0xcc33, 0xcc34, 0xcc35, 0xcc36, - 0xcc37, 0xcc38, 0x003f, 0xcc39, 0xcc3a, 0xcc3b, 0xcc3c, 0xcc3d, - 0xcc3e, 0xcc3f, 0xcc40, 0xcc41, 0xcc42, 0xcc43, 0x003f, 0x003f, - 0x003f, 0xcc44, 0xcc45, 0xcc46, 0xcc47, 0xcc48, 0xcc49, 0xcc4a, - 0xcc4b, 0xcc4c, 0xcc4d, 0xcc4e, 0xcc4f, 0xcc50, 0xcc51, 0xcc52, - 0xcc53, 0xcc54, 0x003f, 0xcc55, 0xcc56, 0xcc57, 0xcc58, 0xcc59, - 0xcc5a, 0xcc5b, 0xcc5c, 0xcc5d, 0xcc5e, 0xcc5f, 0x003f, 0x003f, - 0x003f, 0xcc60, 0xcc61, 0xcc62, 0xcc63, 0xcc64, 0xcc65, 0xcc66, - 0xcc67, 0xcc68, 0xcc69, 0xcc6a, 0xcc6b, 0xcc6c, 0xcc6d, 0xcc6e, - 0xcc6f, 0xcc70, 0x003f, 0xcc71, 0xcc72, 0xcc73, 0xcc74, 0xcc75, - 0xcc76, 0xcc77, 0xcc78, 0xcc79, 0xcc7a, 0xcc7b, 0x003f, 0x003f, - 0x003f, 0xcc7c, 0xcc7d, 0xcc7e, 0xcc7f, 0xcc80, 0xcc81, 0xcc82, - 0xcc83, 0xcc84, 0xcc85, 0xcc86, 0xcc87, 0xcc88, 0xcc89, 0xcc8a, - 0xcc8b, 0xcc8c, 0x003f, 0xcc8d, 0xcc8e, 0xcc8f, 0xcc90, 0xcc91, - 0xcc92, 0xcc93, 0xcc94, 0xcc95, 0xcc96, 0xcc97, 0x003f, 0x003f, - 0x003f, 0xcc98, 0xcc99, 0xcc9a, 0xcc9b, 0xcc9c, 0xcc9d, 0xcc9e, - 0xcc9f, 0xcca0, 0xcca1, 0xcca2, 0xcca3, 0xcca4, 0xcca5, 0xcca6, - 0xcca7, 0xcca8, 0x003f, 0xcca9, 0xccaa, 0xccab, 0xccac, 0xccad, - 0xccae, 0xccaf, 0xccb0, 0xccb1, 0xccb2, 0xccb3, 0x003f, 0x003f, - /* lead byte c1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xccb4, 0xccb5, 0xccb6, 0xccb7, 0xccb8, 0xccb9, 0xccba, - 0xccbb, 0xccbc, 0xccbd, 0xccbe, 0xccbf, 0xccc0, 0xccc1, 0xccc2, - 0xccc3, 0xccc4, 0x003f, 0xccc5, 0xccc6, 0xccc7, 0xccc8, 0xccc9, - 0xccca, 0xcccb, 0xcccc, 0xcccd, 0xccce, 0xcccf, 0x003f, 0x003f, - 0x003f, 0xccd0, 0xccd1, 0xccd2, 0xccd3, 0xccd4, 0xccd5, 0xccd6, - 0xccd7, 0xccd8, 0xccd9, 0xccda, 0xccdb, 0xccdc, 0xccdd, 0xccde, - 0xccdf, 0xcce0, 0x003f, 0xcce1, 0xcce2, 0xcce3, 0xcce4, 0xcce5, - 0xcce6, 0xcce7, 0xcce8, 0xcce9, 0xccea, 0xcceb, 0x003f, 0x003f, - 0x003f, 0xccec, 0xcced, 0xccee, 0xccef, 0xccf0, 0xccf1, 0xccf2, - 0xccf3, 0xccf4, 0xccf5, 0xccf6, 0xccf7, 0xccf8, 0xccf9, 0xccfa, - 0xccfb, 0xccfc, 0x003f, 0xccfd, 0xccfe, 0xccff, 0xcd00, 0xcd01, - 0xcd02, 0xcd03, 0xcd04, 0xcd05, 0xcd06, 0xcd07, 0x003f, 0x003f, - 0x003f, 0xcd08, 0xcd09, 0xcd0a, 0xcd0b, 0xcd0c, 0xcd0d, 0xcd0e, - 0xcd0f, 0xcd10, 0xcd11, 0xcd12, 0xcd13, 0xcd14, 0xcd15, 0xcd16, - 0xcd17, 0xcd18, 0x003f, 0xcd19, 0xcd1a, 0xcd1b, 0xcd1c, 0xcd1d, - 0xcd1e, 0xcd1f, 0xcd20, 0xcd21, 0xcd22, 0xcd23, 0x003f, 0x003f, - 0x003f, 0xcd24, 0xcd25, 0xcd26, 0xcd27, 0xcd28, 0xcd29, 0xcd2a, - 0xcd2b, 0xcd2c, 0xcd2d, 0xcd2e, 0xcd2f, 0xcd30, 0xcd31, 0xcd32, - 0xcd33, 0xcd34, 0x003f, 0xcd35, 0xcd36, 0xcd37, 0xcd38, 0xcd39, - 0xcd3a, 0xcd3b, 0xcd3c, 0xcd3d, 0xcd3e, 0xcd3f, 0x003f, 0x003f, - 0x003f, 0xcd40, 0xcd41, 0xcd42, 0xcd43, 0xcd44, 0xcd45, 0xcd46, - 0xcd47, 0xcd48, 0xcd49, 0xcd4a, 0xcd4b, 0xcd4c, 0xcd4d, 0xcd4e, - 0xcd4f, 0xcd50, 0x003f, 0xcd51, 0xcd52, 0xcd53, 0xcd54, 0xcd55, - 0xcd56, 0xcd57, 0xcd58, 0xcd59, 0xcd5a, 0xcd5b, 0x003f, 0x003f, - /* lead byte c2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcd5c, 0xcd5d, 0xcd5e, 0xcd5f, 0xcd60, 0xcd61, 0xcd62, - 0xcd63, 0xcd64, 0xcd65, 0xcd66, 0xcd67, 0xcd68, 0xcd69, 0xcd6a, - 0xcd6b, 0xcd6c, 0x003f, 0xcd6d, 0xcd6e, 0xcd6f, 0xcd70, 0xcd71, - 0xcd72, 0xcd73, 0xcd74, 0xcd75, 0xcd76, 0xcd77, 0x003f, 0x003f, - 0x003f, 0xcd78, 0xcd79, 0xcd7a, 0xcd7b, 0xcd7c, 0xcd7d, 0xcd7e, - 0xcd7f, 0xcd80, 0xcd81, 0xcd82, 0xcd83, 0xcd84, 0xcd85, 0xcd86, - 0xcd87, 0xcd88, 0x003f, 0xcd89, 0xcd8a, 0xcd8b, 0xcd8c, 0xcd8d, - 0xcd8e, 0xcd8f, 0xcd90, 0xcd91, 0xcd92, 0xcd93, 0x003f, 0x003f, - 0x003f, 0xcd94, 0xcd95, 0xcd96, 0xcd97, 0xcd98, 0xcd99, 0xcd9a, - 0xcd9b, 0xcd9c, 0xcd9d, 0xcd9e, 0xcd9f, 0xcda0, 0xcda1, 0xcda2, - 0xcda3, 0xcda4, 0x003f, 0xcda5, 0xcda6, 0xcda7, 0xcda8, 0xcda9, - 0xcdaa, 0xcdab, 0xcdac, 0xcdad, 0xcdae, 0xcdaf, 0x003f, 0x003f, - 0x003f, 0xcdb0, 0xcdb1, 0xcdb2, 0xcdb3, 0xcdb4, 0xcdb5, 0xcdb6, - 0xcdb7, 0xcdb8, 0xcdb9, 0xcdba, 0xcdbb, 0xcdbc, 0xcdbd, 0xcdbe, - 0xcdbf, 0xcdc0, 0x003f, 0xcdc1, 0xcdc2, 0xcdc3, 0xcdc4, 0xcdc5, - 0xcdc6, 0xcdc7, 0xcdc8, 0xcdc9, 0xcdca, 0xcdcb, 0x003f, 0x003f, - 0x003f, 0xcdcc, 0xcdcd, 0xcdce, 0xcdcf, 0xcdd0, 0xcdd1, 0xcdd2, - 0xcdd3, 0xcdd4, 0xcdd5, 0xcdd6, 0xcdd7, 0xcdd8, 0xcdd9, 0xcdda, - 0xcddb, 0xcddc, 0x003f, 0xcddd, 0xcdde, 0xcddf, 0xcde0, 0xcde1, - 0xcde2, 0xcde3, 0xcde4, 0xcde5, 0xcde6, 0xcde7, 0x003f, 0x003f, - 0x003f, 0xcde8, 0xcde9, 0xcdea, 0xcdeb, 0xcdec, 0xcded, 0xcdee, - 0xcdef, 0xcdf0, 0xcdf1, 0xcdf2, 0xcdf3, 0xcdf4, 0xcdf5, 0xcdf6, - 0xcdf7, 0xcdf8, 0x003f, 0xcdf9, 0xcdfa, 0xcdfb, 0xcdfc, 0xcdfd, - 0xcdfe, 0xcdff, 0xce00, 0xce01, 0xce02, 0xce03, 0x003f, 0x003f, - /* lead byte c3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xce04, 0xce05, 0xce06, 0xce07, 0xce08, 0xce09, 0xce0a, - 0xce0b, 0xce0c, 0xce0d, 0xce0e, 0xce0f, 0xce10, 0xce11, 0xce12, - 0xce13, 0xce14, 0x003f, 0xce15, 0xce16, 0xce17, 0xce18, 0xce19, - 0xce1a, 0xce1b, 0xce1c, 0xce1d, 0xce1e, 0xce1f, 0x003f, 0x003f, - 0x003f, 0xce20, 0xce21, 0xce22, 0xce23, 0xce24, 0xce25, 0xce26, - 0xce27, 0xce28, 0xce29, 0xce2a, 0xce2b, 0xce2c, 0xce2d, 0xce2e, - 0xce2f, 0xce30, 0x003f, 0xce31, 0xce32, 0xce33, 0xce34, 0xce35, - 0xce36, 0xce37, 0xce38, 0xce39, 0xce3a, 0xce3b, 0x003f, 0x003f, - 0x003f, 0xce3c, 0xce3d, 0xce3e, 0xce3f, 0xce40, 0xce41, 0xce42, - 0xce43, 0xce44, 0xce45, 0xce46, 0xce47, 0xce48, 0xce49, 0xce4a, - 0xce4b, 0xce4c, 0x003f, 0xce4d, 0xce4e, 0xce4f, 0xce50, 0xce51, - 0xce52, 0xce53, 0xce54, 0xce55, 0xce56, 0xce57, 0x003f, 0x003f, - 0x003f, 0xce58, 0xce59, 0xce5a, 0xce5b, 0xce5c, 0xce5d, 0xce5e, - 0xce5f, 0xce60, 0xce61, 0xce62, 0xce63, 0xce64, 0xce65, 0xce66, - 0xce67, 0xce68, 0x003f, 0xce69, 0xce6a, 0xce6b, 0xce6c, 0xce6d, - 0xce6e, 0xce6f, 0xce70, 0xce71, 0xce72, 0xce73, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte c4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x314b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xce74, 0xce75, 0xce76, 0xce77, 0xce78, 0xce79, 0xce7a, - 0xce7b, 0xce7c, 0xce7d, 0xce7e, 0xce7f, 0xce80, 0xce81, 0xce82, - 0xce83, 0xce84, 0x003f, 0xce85, 0xce86, 0xce87, 0xce88, 0xce89, - 0xce8a, 0xce8b, 0xce8c, 0xce8d, 0xce8e, 0xce8f, 0x003f, 0x003f, - 0x003f, 0xce90, 0xce91, 0xce92, 0xce93, 0xce94, 0xce95, 0xce96, - 0xce97, 0xce98, 0xce99, 0xce9a, 0xce9b, 0xce9c, 0xce9d, 0xce9e, - 0xce9f, 0xcea0, 0x003f, 0xcea1, 0xcea2, 0xcea3, 0xcea4, 0xcea5, - 0xcea6, 0xcea7, 0xcea8, 0xcea9, 0xceaa, 0xceab, 0x003f, 0x003f, - 0x003f, 0xceac, 0xcead, 0xceae, 0xceaf, 0xceb0, 0xceb1, 0xceb2, - 0xceb3, 0xceb4, 0xceb5, 0xceb6, 0xceb7, 0xceb8, 0xceb9, 0xceba, - 0xcebb, 0xcebc, 0x003f, 0xcebd, 0xcebe, 0xcebf, 0xcec0, 0xcec1, - 0xcec2, 0xcec3, 0xcec4, 0xcec5, 0xcec6, 0xcec7, 0x003f, 0x003f, - 0x003f, 0xcec8, 0xcec9, 0xceca, 0xcecb, 0xcecc, 0xcecd, 0xcece, - 0xcecf, 0xced0, 0xced1, 0xced2, 0xced3, 0xced4, 0xced5, 0xced6, - 0xced7, 0xced8, 0x003f, 0xced9, 0xceda, 0xcedb, 0xcedc, 0xcedd, - 0xcede, 0xcedf, 0xcee0, 0xcee1, 0xcee2, 0xcee3, 0x003f, 0x003f, - 0x003f, 0xcee4, 0xcee5, 0xcee6, 0xcee7, 0xcee8, 0xcee9, 0xceea, - 0xceeb, 0xceec, 0xceed, 0xceee, 0xceef, 0xcef0, 0xcef1, 0xcef2, - 0xcef3, 0xcef4, 0x003f, 0xcef5, 0xcef6, 0xcef7, 0xcef8, 0xcef9, - 0xcefa, 0xcefb, 0xcefc, 0xcefd, 0xcefe, 0xceff, 0x003f, 0x003f, - /* lead byte c5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcf00, 0xcf01, 0xcf02, 0xcf03, 0xcf04, 0xcf05, 0xcf06, - 0xcf07, 0xcf08, 0xcf09, 0xcf0a, 0xcf0b, 0xcf0c, 0xcf0d, 0xcf0e, - 0xcf0f, 0xcf10, 0x003f, 0xcf11, 0xcf12, 0xcf13, 0xcf14, 0xcf15, - 0xcf16, 0xcf17, 0xcf18, 0xcf19, 0xcf1a, 0xcf1b, 0x003f, 0x003f, - 0x003f, 0xcf1c, 0xcf1d, 0xcf1e, 0xcf1f, 0xcf20, 0xcf21, 0xcf22, - 0xcf23, 0xcf24, 0xcf25, 0xcf26, 0xcf27, 0xcf28, 0xcf29, 0xcf2a, - 0xcf2b, 0xcf2c, 0x003f, 0xcf2d, 0xcf2e, 0xcf2f, 0xcf30, 0xcf31, - 0xcf32, 0xcf33, 0xcf34, 0xcf35, 0xcf36, 0xcf37, 0x003f, 0x003f, - 0x003f, 0xcf38, 0xcf39, 0xcf3a, 0xcf3b, 0xcf3c, 0xcf3d, 0xcf3e, - 0xcf3f, 0xcf40, 0xcf41, 0xcf42, 0xcf43, 0xcf44, 0xcf45, 0xcf46, - 0xcf47, 0xcf48, 0x003f, 0xcf49, 0xcf4a, 0xcf4b, 0xcf4c, 0xcf4d, - 0xcf4e, 0xcf4f, 0xcf50, 0xcf51, 0xcf52, 0xcf53, 0x003f, 0x003f, - 0x003f, 0xcf54, 0xcf55, 0xcf56, 0xcf57, 0xcf58, 0xcf59, 0xcf5a, - 0xcf5b, 0xcf5c, 0xcf5d, 0xcf5e, 0xcf5f, 0xcf60, 0xcf61, 0xcf62, - 0xcf63, 0xcf64, 0x003f, 0xcf65, 0xcf66, 0xcf67, 0xcf68, 0xcf69, - 0xcf6a, 0xcf6b, 0xcf6c, 0xcf6d, 0xcf6e, 0xcf6f, 0x003f, 0x003f, - 0x003f, 0xcf70, 0xcf71, 0xcf72, 0xcf73, 0xcf74, 0xcf75, 0xcf76, - 0xcf77, 0xcf78, 0xcf79, 0xcf7a, 0xcf7b, 0xcf7c, 0xcf7d, 0xcf7e, - 0xcf7f, 0xcf80, 0x003f, 0xcf81, 0xcf82, 0xcf83, 0xcf84, 0xcf85, - 0xcf86, 0xcf87, 0xcf88, 0xcf89, 0xcf8a, 0xcf8b, 0x003f, 0x003f, - 0x003f, 0xcf8c, 0xcf8d, 0xcf8e, 0xcf8f, 0xcf90, 0xcf91, 0xcf92, - 0xcf93, 0xcf94, 0xcf95, 0xcf96, 0xcf97, 0xcf98, 0xcf99, 0xcf9a, - 0xcf9b, 0xcf9c, 0x003f, 0xcf9d, 0xcf9e, 0xcf9f, 0xcfa0, 0xcfa1, - 0xcfa2, 0xcfa3, 0xcfa4, 0xcfa5, 0xcfa6, 0xcfa7, 0x003f, 0x003f, - /* lead byte c6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcfa8, 0xcfa9, 0xcfaa, 0xcfab, 0xcfac, 0xcfad, 0xcfae, - 0xcfaf, 0xcfb0, 0xcfb1, 0xcfb2, 0xcfb3, 0xcfb4, 0xcfb5, 0xcfb6, - 0xcfb7, 0xcfb8, 0x003f, 0xcfb9, 0xcfba, 0xcfbb, 0xcfbc, 0xcfbd, - 0xcfbe, 0xcfbf, 0xcfc0, 0xcfc1, 0xcfc2, 0xcfc3, 0x003f, 0x003f, - 0x003f, 0xcfc4, 0xcfc5, 0xcfc6, 0xcfc7, 0xcfc8, 0xcfc9, 0xcfca, - 0xcfcb, 0xcfcc, 0xcfcd, 0xcfce, 0xcfcf, 0xcfd0, 0xcfd1, 0xcfd2, - 0xcfd3, 0xcfd4, 0x003f, 0xcfd5, 0xcfd6, 0xcfd7, 0xcfd8, 0xcfd9, - 0xcfda, 0xcfdb, 0xcfdc, 0xcfdd, 0xcfde, 0xcfdf, 0x003f, 0x003f, - 0x003f, 0xcfe0, 0xcfe1, 0xcfe2, 0xcfe3, 0xcfe4, 0xcfe5, 0xcfe6, - 0xcfe7, 0xcfe8, 0xcfe9, 0xcfea, 0xcfeb, 0xcfec, 0xcfed, 0xcfee, - 0xcfef, 0xcff0, 0x003f, 0xcff1, 0xcff2, 0xcff3, 0xcff4, 0xcff5, - 0xcff6, 0xcff7, 0xcff8, 0xcff9, 0xcffa, 0xcffb, 0x003f, 0x003f, - 0x003f, 0xcffc, 0xcffd, 0xcffe, 0xcfff, 0xd000, 0xd001, 0xd002, - 0xd003, 0xd004, 0xd005, 0xd006, 0xd007, 0xd008, 0xd009, 0xd00a, - 0xd00b, 0xd00c, 0x003f, 0xd00d, 0xd00e, 0xd00f, 0xd010, 0xd011, - 0xd012, 0xd013, 0xd014, 0xd015, 0xd016, 0xd017, 0x003f, 0x003f, - 0x003f, 0xd018, 0xd019, 0xd01a, 0xd01b, 0xd01c, 0xd01d, 0xd01e, - 0xd01f, 0xd020, 0xd021, 0xd022, 0xd023, 0xd024, 0xd025, 0xd026, - 0xd027, 0xd028, 0x003f, 0xd029, 0xd02a, 0xd02b, 0xd02c, 0xd02d, - 0xd02e, 0xd02f, 0xd030, 0xd031, 0xd032, 0xd033, 0x003f, 0x003f, - 0x003f, 0xd034, 0xd035, 0xd036, 0xd037, 0xd038, 0xd039, 0xd03a, - 0xd03b, 0xd03c, 0xd03d, 0xd03e, 0xd03f, 0xd040, 0xd041, 0xd042, - 0xd043, 0xd044, 0x003f, 0xd045, 0xd046, 0xd047, 0xd048, 0xd049, - 0xd04a, 0xd04b, 0xd04c, 0xd04d, 0xd04e, 0xd04f, 0x003f, 0x003f, - /* lead byte c7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd050, 0xd051, 0xd052, 0xd053, 0xd054, 0xd055, 0xd056, - 0xd057, 0xd058, 0xd059, 0xd05a, 0xd05b, 0xd05c, 0xd05d, 0xd05e, - 0xd05f, 0xd060, 0x003f, 0xd061, 0xd062, 0xd063, 0xd064, 0xd065, - 0xd066, 0xd067, 0xd068, 0xd069, 0xd06a, 0xd06b, 0x003f, 0x003f, - 0x003f, 0xd06c, 0xd06d, 0xd06e, 0xd06f, 0xd070, 0xd071, 0xd072, - 0xd073, 0xd074, 0xd075, 0xd076, 0xd077, 0xd078, 0xd079, 0xd07a, - 0xd07b, 0xd07c, 0x003f, 0xd07d, 0xd07e, 0xd07f, 0xd080, 0xd081, - 0xd082, 0xd083, 0xd084, 0xd085, 0xd086, 0xd087, 0x003f, 0x003f, - 0x003f, 0xd088, 0xd089, 0xd08a, 0xd08b, 0xd08c, 0xd08d, 0xd08e, - 0xd08f, 0xd090, 0xd091, 0xd092, 0xd093, 0xd094, 0xd095, 0xd096, - 0xd097, 0xd098, 0x003f, 0xd099, 0xd09a, 0xd09b, 0xd09c, 0xd09d, - 0xd09e, 0xd09f, 0xd0a0, 0xd0a1, 0xd0a2, 0xd0a3, 0x003f, 0x003f, - 0x003f, 0xd0a4, 0xd0a5, 0xd0a6, 0xd0a7, 0xd0a8, 0xd0a9, 0xd0aa, - 0xd0ab, 0xd0ac, 0xd0ad, 0xd0ae, 0xd0af, 0xd0b0, 0xd0b1, 0xd0b2, - 0xd0b3, 0xd0b4, 0x003f, 0xd0b5, 0xd0b6, 0xd0b7, 0xd0b8, 0xd0b9, - 0xd0ba, 0xd0bb, 0xd0bc, 0xd0bd, 0xd0be, 0xd0bf, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte c8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x314c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd0c0, 0xd0c1, 0xd0c2, 0xd0c3, 0xd0c4, 0xd0c5, 0xd0c6, - 0xd0c7, 0xd0c8, 0xd0c9, 0xd0ca, 0xd0cb, 0xd0cc, 0xd0cd, 0xd0ce, - 0xd0cf, 0xd0d0, 0x003f, 0xd0d1, 0xd0d2, 0xd0d3, 0xd0d4, 0xd0d5, - 0xd0d6, 0xd0d7, 0xd0d8, 0xd0d9, 0xd0da, 0xd0db, 0x003f, 0x003f, - 0x003f, 0xd0dc, 0xd0dd, 0xd0de, 0xd0df, 0xd0e0, 0xd0e1, 0xd0e2, - 0xd0e3, 0xd0e4, 0xd0e5, 0xd0e6, 0xd0e7, 0xd0e8, 0xd0e9, 0xd0ea, - 0xd0eb, 0xd0ec, 0x003f, 0xd0ed, 0xd0ee, 0xd0ef, 0xd0f0, 0xd0f1, - 0xd0f2, 0xd0f3, 0xd0f4, 0xd0f5, 0xd0f6, 0xd0f7, 0x003f, 0x003f, - 0x003f, 0xd0f8, 0xd0f9, 0xd0fa, 0xd0fb, 0xd0fc, 0xd0fd, 0xd0fe, - 0xd0ff, 0xd100, 0xd101, 0xd102, 0xd103, 0xd104, 0xd105, 0xd106, - 0xd107, 0xd108, 0x003f, 0xd109, 0xd10a, 0xd10b, 0xd10c, 0xd10d, - 0xd10e, 0xd10f, 0xd110, 0xd111, 0xd112, 0xd113, 0x003f, 0x003f, - 0x003f, 0xd114, 0xd115, 0xd116, 0xd117, 0xd118, 0xd119, 0xd11a, - 0xd11b, 0xd11c, 0xd11d, 0xd11e, 0xd11f, 0xd120, 0xd121, 0xd122, - 0xd123, 0xd124, 0x003f, 0xd125, 0xd126, 0xd127, 0xd128, 0xd129, - 0xd12a, 0xd12b, 0xd12c, 0xd12d, 0xd12e, 0xd12f, 0x003f, 0x003f, - 0x003f, 0xd130, 0xd131, 0xd132, 0xd133, 0xd134, 0xd135, 0xd136, - 0xd137, 0xd138, 0xd139, 0xd13a, 0xd13b, 0xd13c, 0xd13d, 0xd13e, - 0xd13f, 0xd140, 0x003f, 0xd141, 0xd142, 0xd143, 0xd144, 0xd145, - 0xd146, 0xd147, 0xd148, 0xd149, 0xd14a, 0xd14b, 0x003f, 0x003f, - /* lead byte c9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd14c, 0xd14d, 0xd14e, 0xd14f, 0xd150, 0xd151, 0xd152, - 0xd153, 0xd154, 0xd155, 0xd156, 0xd157, 0xd158, 0xd159, 0xd15a, - 0xd15b, 0xd15c, 0x003f, 0xd15d, 0xd15e, 0xd15f, 0xd160, 0xd161, - 0xd162, 0xd163, 0xd164, 0xd165, 0xd166, 0xd167, 0x003f, 0x003f, - 0x003f, 0xd168, 0xd169, 0xd16a, 0xd16b, 0xd16c, 0xd16d, 0xd16e, - 0xd16f, 0xd170, 0xd171, 0xd172, 0xd173, 0xd174, 0xd175, 0xd176, - 0xd177, 0xd178, 0x003f, 0xd179, 0xd17a, 0xd17b, 0xd17c, 0xd17d, - 0xd17e, 0xd17f, 0xd180, 0xd181, 0xd182, 0xd183, 0x003f, 0x003f, - 0x003f, 0xd184, 0xd185, 0xd186, 0xd187, 0xd188, 0xd189, 0xd18a, - 0xd18b, 0xd18c, 0xd18d, 0xd18e, 0xd18f, 0xd190, 0xd191, 0xd192, - 0xd193, 0xd194, 0x003f, 0xd195, 0xd196, 0xd197, 0xd198, 0xd199, - 0xd19a, 0xd19b, 0xd19c, 0xd19d, 0xd19e, 0xd19f, 0x003f, 0x003f, - 0x003f, 0xd1a0, 0xd1a1, 0xd1a2, 0xd1a3, 0xd1a4, 0xd1a5, 0xd1a6, - 0xd1a7, 0xd1a8, 0xd1a9, 0xd1aa, 0xd1ab, 0xd1ac, 0xd1ad, 0xd1ae, - 0xd1af, 0xd1b0, 0x003f, 0xd1b1, 0xd1b2, 0xd1b3, 0xd1b4, 0xd1b5, - 0xd1b6, 0xd1b7, 0xd1b8, 0xd1b9, 0xd1ba, 0xd1bb, 0x003f, 0x003f, - 0x003f, 0xd1bc, 0xd1bd, 0xd1be, 0xd1bf, 0xd1c0, 0xd1c1, 0xd1c2, - 0xd1c3, 0xd1c4, 0xd1c5, 0xd1c6, 0xd1c7, 0xd1c8, 0xd1c9, 0xd1ca, - 0xd1cb, 0xd1cc, 0x003f, 0xd1cd, 0xd1ce, 0xd1cf, 0xd1d0, 0xd1d1, - 0xd1d2, 0xd1d3, 0xd1d4, 0xd1d5, 0xd1d6, 0xd1d7, 0x003f, 0x003f, - 0x003f, 0xd1d8, 0xd1d9, 0xd1da, 0xd1db, 0xd1dc, 0xd1dd, 0xd1de, - 0xd1df, 0xd1e0, 0xd1e1, 0xd1e2, 0xd1e3, 0xd1e4, 0xd1e5, 0xd1e6, - 0xd1e7, 0xd1e8, 0x003f, 0xd1e9, 0xd1ea, 0xd1eb, 0xd1ec, 0xd1ed, - 0xd1ee, 0xd1ef, 0xd1f0, 0xd1f1, 0xd1f2, 0xd1f3, 0x003f, 0x003f, - /* lead byte ca */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd1f4, 0xd1f5, 0xd1f6, 0xd1f7, 0xd1f8, 0xd1f9, 0xd1fa, - 0xd1fb, 0xd1fc, 0xd1fd, 0xd1fe, 0xd1ff, 0xd200, 0xd201, 0xd202, - 0xd203, 0xd204, 0x003f, 0xd205, 0xd206, 0xd207, 0xd208, 0xd209, - 0xd20a, 0xd20b, 0xd20c, 0xd20d, 0xd20e, 0xd20f, 0x003f, 0x003f, - 0x003f, 0xd210, 0xd211, 0xd212, 0xd213, 0xd214, 0xd215, 0xd216, - 0xd217, 0xd218, 0xd219, 0xd21a, 0xd21b, 0xd21c, 0xd21d, 0xd21e, - 0xd21f, 0xd220, 0x003f, 0xd221, 0xd222, 0xd223, 0xd224, 0xd225, - 0xd226, 0xd227, 0xd228, 0xd229, 0xd22a, 0xd22b, 0x003f, 0x003f, - 0x003f, 0xd22c, 0xd22d, 0xd22e, 0xd22f, 0xd230, 0xd231, 0xd232, - 0xd233, 0xd234, 0xd235, 0xd236, 0xd237, 0xd238, 0xd239, 0xd23a, - 0xd23b, 0xd23c, 0x003f, 0xd23d, 0xd23e, 0xd23f, 0xd240, 0xd241, - 0xd242, 0xd243, 0xd244, 0xd245, 0xd246, 0xd247, 0x003f, 0x003f, - 0x003f, 0xd248, 0xd249, 0xd24a, 0xd24b, 0xd24c, 0xd24d, 0xd24e, - 0xd24f, 0xd250, 0xd251, 0xd252, 0xd253, 0xd254, 0xd255, 0xd256, - 0xd257, 0xd258, 0x003f, 0xd259, 0xd25a, 0xd25b, 0xd25c, 0xd25d, - 0xd25e, 0xd25f, 0xd260, 0xd261, 0xd262, 0xd263, 0x003f, 0x003f, - 0x003f, 0xd264, 0xd265, 0xd266, 0xd267, 0xd268, 0xd269, 0xd26a, - 0xd26b, 0xd26c, 0xd26d, 0xd26e, 0xd26f, 0xd270, 0xd271, 0xd272, - 0xd273, 0xd274, 0x003f, 0xd275, 0xd276, 0xd277, 0xd278, 0xd279, - 0xd27a, 0xd27b, 0xd27c, 0xd27d, 0xd27e, 0xd27f, 0x003f, 0x003f, - 0x003f, 0xd280, 0xd281, 0xd282, 0xd283, 0xd284, 0xd285, 0xd286, - 0xd287, 0xd288, 0xd289, 0xd28a, 0xd28b, 0xd28c, 0xd28d, 0xd28e, - 0xd28f, 0xd290, 0x003f, 0xd291, 0xd292, 0xd293, 0xd294, 0xd295, - 0xd296, 0xd297, 0xd298, 0xd299, 0xd29a, 0xd29b, 0x003f, 0x003f, - /* lead byte cb */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd29c, 0xd29d, 0xd29e, 0xd29f, 0xd2a0, 0xd2a1, 0xd2a2, - 0xd2a3, 0xd2a4, 0xd2a5, 0xd2a6, 0xd2a7, 0xd2a8, 0xd2a9, 0xd2aa, - 0xd2ab, 0xd2ac, 0x003f, 0xd2ad, 0xd2ae, 0xd2af, 0xd2b0, 0xd2b1, - 0xd2b2, 0xd2b3, 0xd2b4, 0xd2b5, 0xd2b6, 0xd2b7, 0x003f, 0x003f, - 0x003f, 0xd2b8, 0xd2b9, 0xd2ba, 0xd2bb, 0xd2bc, 0xd2bd, 0xd2be, - 0xd2bf, 0xd2c0, 0xd2c1, 0xd2c2, 0xd2c3, 0xd2c4, 0xd2c5, 0xd2c6, - 0xd2c7, 0xd2c8, 0x003f, 0xd2c9, 0xd2ca, 0xd2cb, 0xd2cc, 0xd2cd, - 0xd2ce, 0xd2cf, 0xd2d0, 0xd2d1, 0xd2d2, 0xd2d3, 0x003f, 0x003f, - 0x003f, 0xd2d4, 0xd2d5, 0xd2d6, 0xd2d7, 0xd2d8, 0xd2d9, 0xd2da, - 0xd2db, 0xd2dc, 0xd2dd, 0xd2de, 0xd2df, 0xd2e0, 0xd2e1, 0xd2e2, - 0xd2e3, 0xd2e4, 0x003f, 0xd2e5, 0xd2e6, 0xd2e7, 0xd2e8, 0xd2e9, - 0xd2ea, 0xd2eb, 0xd2ec, 0xd2ed, 0xd2ee, 0xd2ef, 0x003f, 0x003f, - 0x003f, 0xd2f0, 0xd2f1, 0xd2f2, 0xd2f3, 0xd2f4, 0xd2f5, 0xd2f6, - 0xd2f7, 0xd2f8, 0xd2f9, 0xd2fa, 0xd2fb, 0xd2fc, 0xd2fd, 0xd2fe, - 0xd2ff, 0xd300, 0x003f, 0xd301, 0xd302, 0xd303, 0xd304, 0xd305, - 0xd306, 0xd307, 0xd308, 0xd309, 0xd30a, 0xd30b, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte cc */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x314d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd30c, 0xd30d, 0xd30e, 0xd30f, 0xd310, 0xd311, 0xd312, - 0xd313, 0xd314, 0xd315, 0xd316, 0xd317, 0xd318, 0xd319, 0xd31a, - 0xd31b, 0xd31c, 0x003f, 0xd31d, 0xd31e, 0xd31f, 0xd320, 0xd321, - 0xd322, 0xd323, 0xd324, 0xd325, 0xd326, 0xd327, 0x003f, 0x003f, - 0x003f, 0xd328, 0xd329, 0xd32a, 0xd32b, 0xd32c, 0xd32d, 0xd32e, - 0xd32f, 0xd330, 0xd331, 0xd332, 0xd333, 0xd334, 0xd335, 0xd336, - 0xd337, 0xd338, 0x003f, 0xd339, 0xd33a, 0xd33b, 0xd33c, 0xd33d, - 0xd33e, 0xd33f, 0xd340, 0xd341, 0xd342, 0xd343, 0x003f, 0x003f, - 0x003f, 0xd344, 0xd345, 0xd346, 0xd347, 0xd348, 0xd349, 0xd34a, - 0xd34b, 0xd34c, 0xd34d, 0xd34e, 0xd34f, 0xd350, 0xd351, 0xd352, - 0xd353, 0xd354, 0x003f, 0xd355, 0xd356, 0xd357, 0xd358, 0xd359, - 0xd35a, 0xd35b, 0xd35c, 0xd35d, 0xd35e, 0xd35f, 0x003f, 0x003f, - 0x003f, 0xd360, 0xd361, 0xd362, 0xd363, 0xd364, 0xd365, 0xd366, - 0xd367, 0xd368, 0xd369, 0xd36a, 0xd36b, 0xd36c, 0xd36d, 0xd36e, - 0xd36f, 0xd370, 0x003f, 0xd371, 0xd372, 0xd373, 0xd374, 0xd375, - 0xd376, 0xd377, 0xd378, 0xd379, 0xd37a, 0xd37b, 0x003f, 0x003f, - 0x003f, 0xd37c, 0xd37d, 0xd37e, 0xd37f, 0xd380, 0xd381, 0xd382, - 0xd383, 0xd384, 0xd385, 0xd386, 0xd387, 0xd388, 0xd389, 0xd38a, - 0xd38b, 0xd38c, 0x003f, 0xd38d, 0xd38e, 0xd38f, 0xd390, 0xd391, - 0xd392, 0xd393, 0xd394, 0xd395, 0xd396, 0xd397, 0x003f, 0x003f, - /* lead byte cd */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd398, 0xd399, 0xd39a, 0xd39b, 0xd39c, 0xd39d, 0xd39e, - 0xd39f, 0xd3a0, 0xd3a1, 0xd3a2, 0xd3a3, 0xd3a4, 0xd3a5, 0xd3a6, - 0xd3a7, 0xd3a8, 0x003f, 0xd3a9, 0xd3aa, 0xd3ab, 0xd3ac, 0xd3ad, - 0xd3ae, 0xd3af, 0xd3b0, 0xd3b1, 0xd3b2, 0xd3b3, 0x003f, 0x003f, - 0x003f, 0xd3b4, 0xd3b5, 0xd3b6, 0xd3b7, 0xd3b8, 0xd3b9, 0xd3ba, - 0xd3bb, 0xd3bc, 0xd3bd, 0xd3be, 0xd3bf, 0xd3c0, 0xd3c1, 0xd3c2, - 0xd3c3, 0xd3c4, 0x003f, 0xd3c5, 0xd3c6, 0xd3c7, 0xd3c8, 0xd3c9, - 0xd3ca, 0xd3cb, 0xd3cc, 0xd3cd, 0xd3ce, 0xd3cf, 0x003f, 0x003f, - 0x003f, 0xd3d0, 0xd3d1, 0xd3d2, 0xd3d3, 0xd3d4, 0xd3d5, 0xd3d6, - 0xd3d7, 0xd3d8, 0xd3d9, 0xd3da, 0xd3db, 0xd3dc, 0xd3dd, 0xd3de, - 0xd3df, 0xd3e0, 0x003f, 0xd3e1, 0xd3e2, 0xd3e3, 0xd3e4, 0xd3e5, - 0xd3e6, 0xd3e7, 0xd3e8, 0xd3e9, 0xd3ea, 0xd3eb, 0x003f, 0x003f, - 0x003f, 0xd3ec, 0xd3ed, 0xd3ee, 0xd3ef, 0xd3f0, 0xd3f1, 0xd3f2, - 0xd3f3, 0xd3f4, 0xd3f5, 0xd3f6, 0xd3f7, 0xd3f8, 0xd3f9, 0xd3fa, - 0xd3fb, 0xd3fc, 0x003f, 0xd3fd, 0xd3fe, 0xd3ff, 0xd400, 0xd401, - 0xd402, 0xd403, 0xd404, 0xd405, 0xd406, 0xd407, 0x003f, 0x003f, - 0x003f, 0xd408, 0xd409, 0xd40a, 0xd40b, 0xd40c, 0xd40d, 0xd40e, - 0xd40f, 0xd410, 0xd411, 0xd412, 0xd413, 0xd414, 0xd415, 0xd416, - 0xd417, 0xd418, 0x003f, 0xd419, 0xd41a, 0xd41b, 0xd41c, 0xd41d, - 0xd41e, 0xd41f, 0xd420, 0xd421, 0xd422, 0xd423, 0x003f, 0x003f, - 0x003f, 0xd424, 0xd425, 0xd426, 0xd427, 0xd428, 0xd429, 0xd42a, - 0xd42b, 0xd42c, 0xd42d, 0xd42e, 0xd42f, 0xd430, 0xd431, 0xd432, - 0xd433, 0xd434, 0x003f, 0xd435, 0xd436, 0xd437, 0xd438, 0xd439, - 0xd43a, 0xd43b, 0xd43c, 0xd43d, 0xd43e, 0xd43f, 0x003f, 0x003f, - /* lead byte ce */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd440, 0xd441, 0xd442, 0xd443, 0xd444, 0xd445, 0xd446, - 0xd447, 0xd448, 0xd449, 0xd44a, 0xd44b, 0xd44c, 0xd44d, 0xd44e, - 0xd44f, 0xd450, 0x003f, 0xd451, 0xd452, 0xd453, 0xd454, 0xd455, - 0xd456, 0xd457, 0xd458, 0xd459, 0xd45a, 0xd45b, 0x003f, 0x003f, - 0x003f, 0xd45c, 0xd45d, 0xd45e, 0xd45f, 0xd460, 0xd461, 0xd462, - 0xd463, 0xd464, 0xd465, 0xd466, 0xd467, 0xd468, 0xd469, 0xd46a, - 0xd46b, 0xd46c, 0x003f, 0xd46d, 0xd46e, 0xd46f, 0xd470, 0xd471, - 0xd472, 0xd473, 0xd474, 0xd475, 0xd476, 0xd477, 0x003f, 0x003f, - 0x003f, 0xd478, 0xd479, 0xd47a, 0xd47b, 0xd47c, 0xd47d, 0xd47e, - 0xd47f, 0xd480, 0xd481, 0xd482, 0xd483, 0xd484, 0xd485, 0xd486, - 0xd487, 0xd488, 0x003f, 0xd489, 0xd48a, 0xd48b, 0xd48c, 0xd48d, - 0xd48e, 0xd48f, 0xd490, 0xd491, 0xd492, 0xd493, 0x003f, 0x003f, - 0x003f, 0xd494, 0xd495, 0xd496, 0xd497, 0xd498, 0xd499, 0xd49a, - 0xd49b, 0xd49c, 0xd49d, 0xd49e, 0xd49f, 0xd4a0, 0xd4a1, 0xd4a2, - 0xd4a3, 0xd4a4, 0x003f, 0xd4a5, 0xd4a6, 0xd4a7, 0xd4a8, 0xd4a9, - 0xd4aa, 0xd4ab, 0xd4ac, 0xd4ad, 0xd4ae, 0xd4af, 0x003f, 0x003f, - 0x003f, 0xd4b0, 0xd4b1, 0xd4b2, 0xd4b3, 0xd4b4, 0xd4b5, 0xd4b6, - 0xd4b7, 0xd4b8, 0xd4b9, 0xd4ba, 0xd4bb, 0xd4bc, 0xd4bd, 0xd4be, - 0xd4bf, 0xd4c0, 0x003f, 0xd4c1, 0xd4c2, 0xd4c3, 0xd4c4, 0xd4c5, - 0xd4c6, 0xd4c7, 0xd4c8, 0xd4c9, 0xd4ca, 0xd4cb, 0x003f, 0x003f, - 0x003f, 0xd4cc, 0xd4cd, 0xd4ce, 0xd4cf, 0xd4d0, 0xd4d1, 0xd4d2, - 0xd4d3, 0xd4d4, 0xd4d5, 0xd4d6, 0xd4d7, 0xd4d8, 0xd4d9, 0xd4da, - 0xd4db, 0xd4dc, 0x003f, 0xd4dd, 0xd4de, 0xd4df, 0xd4e0, 0xd4e1, - 0xd4e2, 0xd4e3, 0xd4e4, 0xd4e5, 0xd4e6, 0xd4e7, 0x003f, 0x003f, - /* lead byte cf */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd4e8, 0xd4e9, 0xd4ea, 0xd4eb, 0xd4ec, 0xd4ed, 0xd4ee, - 0xd4ef, 0xd4f0, 0xd4f1, 0xd4f2, 0xd4f3, 0xd4f4, 0xd4f5, 0xd4f6, - 0xd4f7, 0xd4f8, 0x003f, 0xd4f9, 0xd4fa, 0xd4fb, 0xd4fc, 0xd4fd, - 0xd4fe, 0xd4ff, 0xd500, 0xd501, 0xd502, 0xd503, 0x003f, 0x003f, - 0x003f, 0xd504, 0xd505, 0xd506, 0xd507, 0xd508, 0xd509, 0xd50a, - 0xd50b, 0xd50c, 0xd50d, 0xd50e, 0xd50f, 0xd510, 0xd511, 0xd512, - 0xd513, 0xd514, 0x003f, 0xd515, 0xd516, 0xd517, 0xd518, 0xd519, - 0xd51a, 0xd51b, 0xd51c, 0xd51d, 0xd51e, 0xd51f, 0x003f, 0x003f, - 0x003f, 0xd520, 0xd521, 0xd522, 0xd523, 0xd524, 0xd525, 0xd526, - 0xd527, 0xd528, 0xd529, 0xd52a, 0xd52b, 0xd52c, 0xd52d, 0xd52e, - 0xd52f, 0xd530, 0x003f, 0xd531, 0xd532, 0xd533, 0xd534, 0xd535, - 0xd536, 0xd537, 0xd538, 0xd539, 0xd53a, 0xd53b, 0x003f, 0x003f, - 0x003f, 0xd53c, 0xd53d, 0xd53e, 0xd53f, 0xd540, 0xd541, 0xd542, - 0xd543, 0xd544, 0xd545, 0xd546, 0xd547, 0xd548, 0xd549, 0xd54a, - 0xd54b, 0xd54c, 0x003f, 0xd54d, 0xd54e, 0xd54f, 0xd550, 0xd551, - 0xd552, 0xd553, 0xd554, 0xd555, 0xd556, 0xd557, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte d0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x314e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd558, 0xd559, 0xd55a, 0xd55b, 0xd55c, 0xd55d, 0xd55e, - 0xd55f, 0xd560, 0xd561, 0xd562, 0xd563, 0xd564, 0xd565, 0xd566, - 0xd567, 0xd568, 0x003f, 0xd569, 0xd56a, 0xd56b, 0xd56c, 0xd56d, - 0xd56e, 0xd56f, 0xd570, 0xd571, 0xd572, 0xd573, 0x003f, 0x003f, - 0x003f, 0xd574, 0xd575, 0xd576, 0xd577, 0xd578, 0xd579, 0xd57a, - 0xd57b, 0xd57c, 0xd57d, 0xd57e, 0xd57f, 0xd580, 0xd581, 0xd582, - 0xd583, 0xd584, 0x003f, 0xd585, 0xd586, 0xd587, 0xd588, 0xd589, - 0xd58a, 0xd58b, 0xd58c, 0xd58d, 0xd58e, 0xd58f, 0x003f, 0x003f, - 0x003f, 0xd590, 0xd591, 0xd592, 0xd593, 0xd594, 0xd595, 0xd596, - 0xd597, 0xd598, 0xd599, 0xd59a, 0xd59b, 0xd59c, 0xd59d, 0xd59e, - 0xd59f, 0xd5a0, 0x003f, 0xd5a1, 0xd5a2, 0xd5a3, 0xd5a4, 0xd5a5, - 0xd5a6, 0xd5a7, 0xd5a8, 0xd5a9, 0xd5aa, 0xd5ab, 0x003f, 0x003f, - 0x003f, 0xd5ac, 0xd5ad, 0xd5ae, 0xd5af, 0xd5b0, 0xd5b1, 0xd5b2, - 0xd5b3, 0xd5b4, 0xd5b5, 0xd5b6, 0xd5b7, 0xd5b8, 0xd5b9, 0xd5ba, - 0xd5bb, 0xd5bc, 0x003f, 0xd5bd, 0xd5be, 0xd5bf, 0xd5c0, 0xd5c1, - 0xd5c2, 0xd5c3, 0xd5c4, 0xd5c5, 0xd5c6, 0xd5c7, 0x003f, 0x003f, - 0x003f, 0xd5c8, 0xd5c9, 0xd5ca, 0xd5cb, 0xd5cc, 0xd5cd, 0xd5ce, - 0xd5cf, 0xd5d0, 0xd5d1, 0xd5d2, 0xd5d3, 0xd5d4, 0xd5d5, 0xd5d6, - 0xd5d7, 0xd5d8, 0x003f, 0xd5d9, 0xd5da, 0xd5db, 0xd5dc, 0xd5dd, - 0xd5de, 0xd5df, 0xd5e0, 0xd5e1, 0xd5e2, 0xd5e3, 0x003f, 0x003f, - /* lead byte d1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd5e4, 0xd5e5, 0xd5e6, 0xd5e7, 0xd5e8, 0xd5e9, 0xd5ea, - 0xd5eb, 0xd5ec, 0xd5ed, 0xd5ee, 0xd5ef, 0xd5f0, 0xd5f1, 0xd5f2, - 0xd5f3, 0xd5f4, 0x003f, 0xd5f5, 0xd5f6, 0xd5f7, 0xd5f8, 0xd5f9, - 0xd5fa, 0xd5fb, 0xd5fc, 0xd5fd, 0xd5fe, 0xd5ff, 0x003f, 0x003f, - 0x003f, 0xd600, 0xd601, 0xd602, 0xd603, 0xd604, 0xd605, 0xd606, - 0xd607, 0xd608, 0xd609, 0xd60a, 0xd60b, 0xd60c, 0xd60d, 0xd60e, - 0xd60f, 0xd610, 0x003f, 0xd611, 0xd612, 0xd613, 0xd614, 0xd615, - 0xd616, 0xd617, 0xd618, 0xd619, 0xd61a, 0xd61b, 0x003f, 0x003f, - 0x003f, 0xd61c, 0xd61d, 0xd61e, 0xd61f, 0xd620, 0xd621, 0xd622, - 0xd623, 0xd624, 0xd625, 0xd626, 0xd627, 0xd628, 0xd629, 0xd62a, - 0xd62b, 0xd62c, 0x003f, 0xd62d, 0xd62e, 0xd62f, 0xd630, 0xd631, - 0xd632, 0xd633, 0xd634, 0xd635, 0xd636, 0xd637, 0x003f, 0x003f, - 0x003f, 0xd638, 0xd639, 0xd63a, 0xd63b, 0xd63c, 0xd63d, 0xd63e, - 0xd63f, 0xd640, 0xd641, 0xd642, 0xd643, 0xd644, 0xd645, 0xd646, - 0xd647, 0xd648, 0x003f, 0xd649, 0xd64a, 0xd64b, 0xd64c, 0xd64d, - 0xd64e, 0xd64f, 0xd650, 0xd651, 0xd652, 0xd653, 0x003f, 0x003f, - 0x003f, 0xd654, 0xd655, 0xd656, 0xd657, 0xd658, 0xd659, 0xd65a, - 0xd65b, 0xd65c, 0xd65d, 0xd65e, 0xd65f, 0xd660, 0xd661, 0xd662, - 0xd663, 0xd664, 0x003f, 0xd665, 0xd666, 0xd667, 0xd668, 0xd669, - 0xd66a, 0xd66b, 0xd66c, 0xd66d, 0xd66e, 0xd66f, 0x003f, 0x003f, - 0x003f, 0xd670, 0xd671, 0xd672, 0xd673, 0xd674, 0xd675, 0xd676, - 0xd677, 0xd678, 0xd679, 0xd67a, 0xd67b, 0xd67c, 0xd67d, 0xd67e, - 0xd67f, 0xd680, 0x003f, 0xd681, 0xd682, 0xd683, 0xd684, 0xd685, - 0xd686, 0xd687, 0xd688, 0xd689, 0xd68a, 0xd68b, 0x003f, 0x003f, - /* lead byte d2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd68c, 0xd68d, 0xd68e, 0xd68f, 0xd690, 0xd691, 0xd692, - 0xd693, 0xd694, 0xd695, 0xd696, 0xd697, 0xd698, 0xd699, 0xd69a, - 0xd69b, 0xd69c, 0x003f, 0xd69d, 0xd69e, 0xd69f, 0xd6a0, 0xd6a1, - 0xd6a2, 0xd6a3, 0xd6a4, 0xd6a5, 0xd6a6, 0xd6a7, 0x003f, 0x003f, - 0x003f, 0xd6a8, 0xd6a9, 0xd6aa, 0xd6ab, 0xd6ac, 0xd6ad, 0xd6ae, - 0xd6af, 0xd6b0, 0xd6b1, 0xd6b2, 0xd6b3, 0xd6b4, 0xd6b5, 0xd6b6, - 0xd6b7, 0xd6b8, 0x003f, 0xd6b9, 0xd6ba, 0xd6bb, 0xd6bc, 0xd6bd, - 0xd6be, 0xd6bf, 0xd6c0, 0xd6c1, 0xd6c2, 0xd6c3, 0x003f, 0x003f, - 0x003f, 0xd6c4, 0xd6c5, 0xd6c6, 0xd6c7, 0xd6c8, 0xd6c9, 0xd6ca, - 0xd6cb, 0xd6cc, 0xd6cd, 0xd6ce, 0xd6cf, 0xd6d0, 0xd6d1, 0xd6d2, - 0xd6d3, 0xd6d4, 0x003f, 0xd6d5, 0xd6d6, 0xd6d7, 0xd6d8, 0xd6d9, - 0xd6da, 0xd6db, 0xd6dc, 0xd6dd, 0xd6de, 0xd6df, 0x003f, 0x003f, - 0x003f, 0xd6e0, 0xd6e1, 0xd6e2, 0xd6e3, 0xd6e4, 0xd6e5, 0xd6e6, - 0xd6e7, 0xd6e8, 0xd6e9, 0xd6ea, 0xd6eb, 0xd6ec, 0xd6ed, 0xd6ee, - 0xd6ef, 0xd6f0, 0x003f, 0xd6f1, 0xd6f2, 0xd6f3, 0xd6f4, 0xd6f5, - 0xd6f6, 0xd6f7, 0xd6f8, 0xd6f9, 0xd6fa, 0xd6fb, 0x003f, 0x003f, - 0x003f, 0xd6fc, 0xd6fd, 0xd6fe, 0xd6ff, 0xd700, 0xd701, 0xd702, - 0xd703, 0xd704, 0xd705, 0xd706, 0xd707, 0xd708, 0xd709, 0xd70a, - 0xd70b, 0xd70c, 0x003f, 0xd70d, 0xd70e, 0xd70f, 0xd710, 0xd711, - 0xd712, 0xd713, 0xd714, 0xd715, 0xd716, 0xd717, 0x003f, 0x003f, - 0x003f, 0xd718, 0xd719, 0xd71a, 0xd71b, 0xd71c, 0xd71d, 0xd71e, - 0xd71f, 0xd720, 0xd721, 0xd722, 0xd723, 0xd724, 0xd725, 0xd726, - 0xd727, 0xd728, 0x003f, 0xd729, 0xd72a, 0xd72b, 0xd72c, 0xd72d, - 0xd72e, 0xd72f, 0xd730, 0xd731, 0xd732, 0xd733, 0x003f, 0x003f, - /* lead byte d3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd734, 0xd735, 0xd736, 0xd737, 0xd738, 0xd739, 0xd73a, - 0xd73b, 0xd73c, 0xd73d, 0xd73e, 0xd73f, 0xd740, 0xd741, 0xd742, - 0xd743, 0xd744, 0x003f, 0xd745, 0xd746, 0xd747, 0xd748, 0xd749, - 0xd74a, 0xd74b, 0xd74c, 0xd74d, 0xd74e, 0xd74f, 0x003f, 0x003f, - 0x003f, 0xd750, 0xd751, 0xd752, 0xd753, 0xd754, 0xd755, 0xd756, - 0xd757, 0xd758, 0xd759, 0xd75a, 0xd75b, 0xd75c, 0xd75d, 0xd75e, - 0xd75f, 0xd760, 0x003f, 0xd761, 0xd762, 0xd763, 0xd764, 0xd765, - 0xd766, 0xd767, 0xd768, 0xd769, 0xd76a, 0xd76b, 0x003f, 0x003f, - 0x003f, 0xd76c, 0xd76d, 0xd76e, 0xd76f, 0xd770, 0xd771, 0xd772, - 0xd773, 0xd774, 0xd775, 0xd776, 0xd777, 0xd778, 0xd779, 0xd77a, - 0xd77b, 0xd77c, 0x003f, 0xd77d, 0xd77e, 0xd77f, 0xd780, 0xd781, - 0xd782, 0xd783, 0xd784, 0xd785, 0xd786, 0xd787, 0x003f, 0x003f, - 0x003f, 0xd788, 0xd789, 0xd78a, 0xd78b, 0xd78c, 0xd78d, 0xd78e, - 0xd78f, 0xd790, 0xd791, 0xd792, 0xd793, 0xd794, 0xd795, 0xd796, - 0xd797, 0xd798, 0x003f, 0xd799, 0xd79a, 0xd79b, 0xd79c, 0xd79d, - 0xd79e, 0xd79f, 0xd7a0, 0xd7a1, 0xd7a2, 0xd7a3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte d9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3000, 0x3001, 0x3002, 0x00b7, 0x2025, 0x2026, 0x00a8, - 0x3003, 0x00ad, 0x2015, 0x2225, 0xff3c, 0x223c, 0x2018, 0x2019, - 0x201c, 0x201d, 0x3014, 0x3015, 0x3008, 0x3009, 0x300a, 0x300b, - 0x300c, 0x300d, 0x300e, 0x300f, 0x3010, 0x3011, 0x00b1, 0x00d7, - 0x00f7, 0x2260, 0x2264, 0x2265, 0x221e, 0x2234, 0x00b0, 0x2032, - 0x2033, 0x2103, 0x212b, 0xffe0, 0xffe1, 0xffe5, 0x2642, 0x2640, - 0x2220, 0x22a5, 0x2312, 0x2202, 0x2207, 0x2261, 0x2252, 0x00a7, - 0x203b, 0x2606, 0x2605, 0x25cb, 0x25cf, 0x25ce, 0x25c7, 0x25c6, - 0x25a1, 0x25a0, 0x25b3, 0x25b2, 0x25bd, 0x25bc, 0x2192, 0x2190, - 0x2191, 0x2193, 0x2194, 0x3013, 0x226a, 0x226b, 0x221a, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x223d, 0x221d, 0x2235, 0x222b, 0x222c, 0x2208, 0x220b, - 0x2286, 0x2287, 0x2282, 0x2283, 0x222a, 0x2229, 0x2227, 0x2228, - 0xffe2, 0x21d2, 0x21d4, 0x2200, 0x2203, 0x00b4, 0xff5e, 0x02c7, - 0x02d8, 0x02dd, 0x02da, 0x02d9, 0x00b8, 0x02db, 0x00a1, 0x00bf, - 0x02d0, 0x222e, 0x2211, 0x220f, 0x00a4, 0x2109, 0x2030, 0x25c1, - 0x25c0, 0x25b7, 0x25b6, 0x2664, 0x2660, 0x2661, 0x2665, 0x2667, - 0x2663, 0x2299, 0x25c8, 0x25a3, 0x25d0, 0x25d1, 0x2592, 0x25a4, - 0x25a5, 0x25a8, 0x25a7, 0x25a6, 0x25a9, 0x2668, 0x260f, 0x260e, - 0x261c, 0x261e, 0x00b6, 0x2020, 0x2021, 0x2195, 0x2197, 0x2199, - 0x2196, 0x2198, 0x266d, 0x2669, 0x266a, 0x266c, 0x327f, 0x321c, - 0x2116, 0x33c7, 0x2122, 0x33c2, 0x33d8, 0x2121, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte da */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xff01, 0xff02, 0xff03, 0xff04, 0xff05, 0xff06, 0xff07, - 0xff08, 0xff09, 0xff0a, 0xff0b, 0xff0c, 0xff0d, 0xff0e, 0xff0f, - 0xff10, 0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17, - 0xff18, 0xff19, 0xff1a, 0xff1b, 0xff1c, 0xff1d, 0xff1e, 0xff1f, - 0xff20, 0xff21, 0xff22, 0xff23, 0xff24, 0xff25, 0xff26, 0xff27, - 0xff28, 0xff29, 0xff2a, 0xff2b, 0xff2c, 0xff2d, 0xff2e, 0xff2f, - 0xff30, 0xff31, 0xff32, 0xff33, 0xff34, 0xff35, 0xff36, 0xff37, - 0xff38, 0xff39, 0xff3a, 0xff3b, 0xffe6, 0xff3d, 0xff3e, 0xff3f, - 0xff40, 0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47, - 0xff48, 0xff49, 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xff4f, 0xff50, 0xff51, 0xff52, 0xff53, 0xff54, 0xff55, - 0xff56, 0xff57, 0xff58, 0xff59, 0xff5a, 0xff5b, 0xff5c, 0xff5d, - 0xffe3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x3164, 0x3165, 0x3166, 0x3167, - 0x3168, 0x3169, 0x316a, 0x316b, 0x316c, 0x316d, 0x316e, 0x316f, - 0x3170, 0x3171, 0x3172, 0x3173, 0x3174, 0x3175, 0x3176, 0x3177, - 0x3178, 0x3179, 0x317a, 0x317b, 0x317c, 0x317d, 0x317e, 0x317f, - 0x3180, 0x3181, 0x3182, 0x3183, 0x3184, 0x3185, 0x3186, 0x3187, - 0x3188, 0x3189, 0x318a, 0x318b, 0x318c, 0x318d, 0x318e, 0x003f, - /* lead byte db */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, - 0x2177, 0x2178, 0x2179, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, - 0x2168, 0x2169, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, - 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, - 0x03a0, 0x03a1, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, - 0x03a9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, - 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x03bf, 0x03c0, 0x03c1, 0x03c3, 0x03c4, 0x03c5, 0x03c6, - 0x03c7, 0x03c8, 0x03c9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x2500, 0x2502, 0x250c, 0x2510, 0x2518, 0x2514, 0x251c, - 0x252c, 0x2524, 0x2534, 0x253c, 0x2501, 0x2503, 0x250f, 0x2513, - 0x251b, 0x2517, 0x2523, 0x2533, 0x252b, 0x253b, 0x254b, 0x2520, - 0x252f, 0x2528, 0x2537, 0x253f, 0x251d, 0x2530, 0x2525, 0x2538, - 0x2542, 0x2512, 0x2511, 0x251a, 0x2519, 0x2516, 0x2515, 0x250e, - 0x250d, 0x251e, 0x251f, 0x2521, 0x2522, 0x2526, 0x2527, 0x2529, - 0x252a, 0x252d, 0x252e, 0x2531, 0x2532, 0x2535, 0x2536, 0x2539, - 0x253a, 0x253d, 0x253e, 0x2540, 0x2541, 0x2543, 0x2544, 0x2545, - 0x2546, 0x2547, 0x2548, 0x2549, 0x254a, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte dc */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3395, 0x3396, 0x3397, 0x2113, 0x3398, 0x33c4, 0x33a3, - 0x33a4, 0x33a5, 0x33a6, 0x3399, 0x339a, 0x339b, 0x339c, 0x339d, - 0x339e, 0x339f, 0x33a0, 0x33a1, 0x33a2, 0x33ca, 0x338d, 0x338e, - 0x338f, 0x33cf, 0x3388, 0x3389, 0x33c8, 0x33a7, 0x33a8, 0x33b0, - 0x33b1, 0x33b2, 0x33b3, 0x33b4, 0x33b5, 0x33b6, 0x33b7, 0x33b8, - 0x33b9, 0x3380, 0x3381, 0x3382, 0x3383, 0x3384, 0x33ba, 0x33bb, - 0x33bc, 0x33bd, 0x33be, 0x33bf, 0x3390, 0x3391, 0x3392, 0x3393, - 0x3394, 0x2126, 0x33c0, 0x33c1, 0x338a, 0x338b, 0x338c, 0x33d6, - 0x33c5, 0x33ad, 0x33ae, 0x33af, 0x33db, 0x33a9, 0x33aa, 0x33ab, - 0x33ac, 0x33dd, 0x33d0, 0x33d3, 0x33c3, 0x33c9, 0x33dc, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x33c6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x00c6, 0x00d0, 0x00aa, 0x0126, 0x003f, 0x0132, 0x003f, - 0x013f, 0x0141, 0x00d8, 0x0152, 0x00ba, 0x00de, 0x0166, 0x014a, - 0x003f, 0x3260, 0x3261, 0x3262, 0x3263, 0x3264, 0x3265, 0x3266, - 0x3267, 0x3268, 0x3269, 0x326a, 0x326b, 0x326c, 0x326d, 0x326e, - 0x326f, 0x3270, 0x3271, 0x3272, 0x3273, 0x3274, 0x3275, 0x3276, - 0x3277, 0x3278, 0x3279, 0x327a, 0x327b, 0x24d0, 0x24d1, 0x24d2, - 0x24d3, 0x24d4, 0x24d5, 0x24d6, 0x24d7, 0x24d8, 0x24d9, 0x24da, - 0x24db, 0x24dc, 0x24dd, 0x24de, 0x24df, 0x24e0, 0x24e1, 0x24e2, - 0x24e3, 0x24e4, 0x24e5, 0x24e6, 0x24e7, 0x24e8, 0x24e9, 0x2460, - 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467, 0x2468, - 0x2469, 0x246a, 0x246b, 0x246c, 0x246d, 0x246e, 0x00bd, 0x2153, - 0x2154, 0x00bc, 0x00be, 0x215b, 0x215c, 0x215d, 0x215e, 0x003f, - /* lead byte dd */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x00e6, 0x0111, 0x00f0, 0x0127, 0x0131, 0x0133, 0x0138, - 0x0140, 0x0142, 0x00f8, 0x0153, 0x00df, 0x00fe, 0x0167, 0x014b, - 0x0149, 0x3200, 0x3201, 0x3202, 0x3203, 0x3204, 0x3205, 0x3206, - 0x3207, 0x3208, 0x3209, 0x320a, 0x320b, 0x320c, 0x320d, 0x320e, - 0x320f, 0x3210, 0x3211, 0x3212, 0x3213, 0x3214, 0x3215, 0x3216, - 0x3217, 0x3218, 0x3219, 0x321a, 0x321b, 0x249c, 0x249d, 0x249e, - 0x249f, 0x24a0, 0x24a1, 0x24a2, 0x24a3, 0x24a4, 0x24a5, 0x24a6, - 0x24a7, 0x24a8, 0x24a9, 0x24aa, 0x24ab, 0x24ac, 0x24ad, 0x24ae, - 0x24af, 0x24b0, 0x24b1, 0x24b2, 0x24b3, 0x24b4, 0x24b5, 0x2474, - 0x2475, 0x2476, 0x2477, 0x2478, 0x2479, 0x247a, 0x247b, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x247c, 0x247d, 0x247e, 0x247f, 0x2480, 0x2481, 0x2482, - 0x00b9, 0x00b2, 0x00b3, 0x2074, 0x207f, 0x2081, 0x2082, 0x2083, - 0x2084, 0x3041, 0x3042, 0x3043, 0x3044, 0x3045, 0x3046, 0x3047, - 0x3048, 0x3049, 0x304a, 0x304b, 0x304c, 0x304d, 0x304e, 0x304f, - 0x3050, 0x3051, 0x3052, 0x3053, 0x3054, 0x3055, 0x3056, 0x3057, - 0x3058, 0x3059, 0x305a, 0x305b, 0x305c, 0x305d, 0x305e, 0x305f, - 0x3060, 0x3061, 0x3062, 0x3063, 0x3064, 0x3065, 0x3066, 0x3067, - 0x3068, 0x3069, 0x306a, 0x306b, 0x306c, 0x306d, 0x306e, 0x306f, - 0x3070, 0x3071, 0x3072, 0x3073, 0x3074, 0x3075, 0x3076, 0x3077, - 0x3078, 0x3079, 0x307a, 0x307b, 0x307c, 0x307d, 0x307e, 0x307f, - 0x3080, 0x3081, 0x3082, 0x3083, 0x3084, 0x3085, 0x3086, 0x3087, - 0x3088, 0x3089, 0x308a, 0x308b, 0x308c, 0x308d, 0x308e, 0x308f, - 0x3090, 0x3091, 0x3092, 0x3093, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte de */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x30a1, 0x30a2, 0x30a3, 0x30a4, 0x30a5, 0x30a6, 0x30a7, - 0x30a8, 0x30a9, 0x30aa, 0x30ab, 0x30ac, 0x30ad, 0x30ae, 0x30af, - 0x30b0, 0x30b1, 0x30b2, 0x30b3, 0x30b4, 0x30b5, 0x30b6, 0x30b7, - 0x30b8, 0x30b9, 0x30ba, 0x30bb, 0x30bc, 0x30bd, 0x30be, 0x30bf, - 0x30c0, 0x30c1, 0x30c2, 0x30c3, 0x30c4, 0x30c5, 0x30c6, 0x30c7, - 0x30c8, 0x30c9, 0x30ca, 0x30cb, 0x30cc, 0x30cd, 0x30ce, 0x30cf, - 0x30d0, 0x30d1, 0x30d2, 0x30d3, 0x30d4, 0x30d5, 0x30d6, 0x30d7, - 0x30d8, 0x30d9, 0x30da, 0x30db, 0x30dc, 0x30dd, 0x30de, 0x30df, - 0x30e0, 0x30e1, 0x30e2, 0x30e3, 0x30e4, 0x30e5, 0x30e6, 0x30e7, - 0x30e8, 0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ee, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x30ef, 0x30f0, 0x30f1, 0x30f2, 0x30f3, 0x30f4, 0x30f5, - 0x30f6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401, - 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, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0451, - 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, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte e0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x4f3d, 0x4f73, 0x5047, 0x50f9, 0x52a0, 0x53ef, 0x5475, - 0x54e5, 0x5609, 0x5ac1, 0x5bb6, 0x6687, 0x67b6, 0x67b7, 0x67ef, - 0x6b4c, 0x73c2, 0x75c2, 0x7a3c, 0x82db, 0x8304, 0x8857, 0x8888, - 0x8a36, 0x8cc8, 0x8dcf, 0x8efb, 0x8fe6, 0x99d5, 0x523b, 0x5374, - 0x5404, 0x606a, 0x6164, 0x6bbc, 0x73cf, 0x811a, 0x89ba, 0x89d2, - 0x95a3, 0x4f83, 0x520a, 0x58be, 0x5978, 0x59e6, 0x5e72, 0x5e79, - 0x61c7, 0x63c0, 0x6746, 0x67ec, 0x687f, 0x6f97, 0x764e, 0x770b, - 0x78f5, 0x7a08, 0x7aff, 0x7c21, 0x809d, 0x826e, 0x8271, 0x8aeb, - 0x9593, 0x4e6b, 0x559d, 0x66f7, 0x6e34, 0x78a3, 0x7aed, 0x845b, - 0x8910, 0x874e, 0x97a8, 0x52d8, 0x574e, 0x582a, 0x5d4c, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x611f, 0x61be, 0x6221, 0x6562, 0x67d1, 0x6a44, 0x6e1b, - 0x7518, 0x75b3, 0x76e3, 0x77b0, 0x7d3a, 0x90af, 0x9451, 0x9452, - 0x9f95, 0x5323, 0x5cac, 0x7532, 0x80db, 0x9240, 0x9598, 0x525b, - 0x5808, 0x59dc, 0x5ca1, 0x5d17, 0x5eb7, 0x5f3a, 0x5f4a, 0x6177, - 0x6c5f, 0x757a, 0x7586, 0x7ce0, 0x7d73, 0x7db1, 0x7f8c, 0x8154, - 0x8221, 0x8591, 0x8941, 0x8b1b, 0x92fc, 0x964d, 0x9c47, 0x4ecb, - 0x4ef7, 0x500b, 0x51f1, 0x584f, 0x6137, 0x613e, 0x6168, 0x6539, - 0x69ea, 0x6f11, 0x75a5, 0x7686, 0x76d6, 0x7b87, 0x82a5, 0x84cb, - 0xf900, 0x93a7, 0x958b, 0x5580, 0x5ba2, 0x5751, 0xf901, 0x7cb3, - 0x7fb9, 0x91b5, 0x5028, 0x53bb, 0x5c45, 0x5de8, 0x62d2, 0x636e, - 0x64da, 0x64e7, 0x6e20, 0x70ac, 0x795b, 0x8ddd, 0x8e1e, 0xf902, - 0x907d, 0x9245, 0x92f8, 0x4e7e, 0x4ef6, 0x5065, 0x5dfe, 0x5efa, - 0x6106, 0x6957, 0x8171, 0x8654, 0x8e47, 0x9375, 0x9a2b, 0x4e5e, - 0x5091, 0x6770, 0x6840, 0x5109, 0x528d, 0x5292, 0x6aa2, 0x003f, - /* lead byte e1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x77bc, 0x9210, 0x9ed4, 0x52ab, 0x602f, 0x8ff2, 0x5048, - 0x61a9, 0x63ed, 0x64ca, 0x683c, 0x6a84, 0x6fc0, 0x8188, 0x89a1, - 0x9694, 0x5805, 0x727d, 0x72ac, 0x7504, 0x7d79, 0x7e6d, 0x80a9, - 0x898b, 0x8b74, 0x9063, 0x9d51, 0x6289, 0x6c7a, 0x6f54, 0x7d50, - 0x7f3a, 0x8a23, 0x517c, 0x614a, 0x7b9d, 0x8b19, 0x9257, 0x938c, - 0x4eac, 0x4fd3, 0x501e, 0x50be, 0x5106, 0x52c1, 0x52cd, 0x537f, - 0x5770, 0x5883, 0x5e9a, 0x5f91, 0x6176, 0x61ac, 0x64ce, 0x656c, - 0x666f, 0x66bb, 0x66f4, 0x6897, 0x6d87, 0x7085, 0x70f1, 0x749f, - 0x74a5, 0x74ca, 0x75d9, 0x786c, 0x78ec, 0x7adf, 0x7af6, 0x7d45, - 0x7d93, 0x8015, 0x803f, 0x811b, 0x8396, 0x8b66, 0x8f15, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9015, 0x93e1, 0x9803, 0x9838, 0x9a5a, 0x9be8, 0x4fc2, - 0x5553, 0x583a, 0x5951, 0x5b63, 0x5c46, 0x60b8, 0x6212, 0x6842, - 0x68b0, 0x68e8, 0x6eaa, 0x754c, 0x7678, 0x78ce, 0x7a3d, 0x7cfb, - 0x7e6b, 0x7e7c, 0x8a08, 0x8aa1, 0x8c3f, 0x968e, 0x9dc4, 0x53e4, - 0x53e9, 0x544a, 0x5471, 0x56fa, 0x59d1, 0x5b64, 0x5c3b, 0x5eab, - 0x62f7, 0x6537, 0x6545, 0x6572, 0x66a0, 0x67af, 0x69c1, 0x6cbd, - 0x75fc, 0x7690, 0x777e, 0x7a3f, 0x7f94, 0x8003, 0x80a1, 0x818f, - 0x82e6, 0x82fd, 0x83f0, 0x85c1, 0x8831, 0x88b4, 0x8aa5, 0xf903, - 0x8f9c, 0x932e, 0x96c7, 0x9867, 0x9ad8, 0x9f13, 0x54ed, 0x659b, - 0x66f2, 0x688f, 0x7a40, 0x8c37, 0x9d60, 0x56f0, 0x5764, 0x5d11, - 0x6606, 0x68b1, 0x68cd, 0x6efe, 0x7428, 0x889e, 0x9be4, 0x6c68, - 0xf904, 0x9aa8, 0x4f9b, 0x516c, 0x5171, 0x529f, 0x5b54, 0x5de5, - 0x6050, 0x606d, 0x62f1, 0x63a7, 0x653b, 0x73d9, 0x7a7a, 0x86a3, - 0x8ca2, 0x978f, 0x4e32, 0x5be1, 0x6208, 0x679c, 0x74dc, 0x003f, - /* lead byte e2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x79d1, 0x83d3, 0x8a87, 0x8ab2, 0x8de8, 0x904e, 0x934b, - 0x9846, 0x5ed3, 0x69e8, 0x85ff, 0x90ed, 0xf905, 0x51a0, 0x5b98, - 0x5bec, 0x6163, 0x68fa, 0x6b3e, 0x704c, 0x742f, 0x74d8, 0x7ba1, - 0x7f50, 0x83c5, 0x89c0, 0x8cab, 0x95dc, 0x9928, 0x522e, 0x605d, - 0x62ec, 0x9002, 0x4f8a, 0x5149, 0x5321, 0x58d9, 0x5ee3, 0x66e0, - 0x6d38, 0x709a, 0x72c2, 0x73d6, 0x7b50, 0x80f1, 0x945b, 0x5366, - 0x639b, 0x7f6b, 0x4e56, 0x5080, 0x584a, 0x58de, 0x602a, 0x6127, - 0x62d0, 0x69d0, 0x9b41, 0x5b8f, 0x7d18, 0x80b1, 0x8f5f, 0x4ea4, - 0x50d1, 0x54ac, 0x55ac, 0x5b0c, 0x5da0, 0x5de7, 0x652a, 0x654e, - 0x6821, 0x6a4b, 0x72e1, 0x768e, 0x77ef, 0x7d5e, 0x7ff9, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x81a0, 0x854e, 0x86df, 0x8f03, 0x8f4e, 0x90ca, 0x9903, - 0x9a55, 0x9bab, 0x4e18, 0x4e45, 0x4e5d, 0x4ec7, 0x4ff1, 0x5177, - 0x52fe, 0x5340, 0x53e3, 0x53e5, 0x548e, 0x5614, 0x5775, 0x57a2, - 0x5bc7, 0x5d87, 0x5ed0, 0x61fc, 0x62d8, 0x6551, 0x67b8, 0x67e9, - 0x69cb, 0x6b50, 0x6bc6, 0x6bec, 0x6c42, 0x6e9d, 0x7078, 0x72d7, - 0x7396, 0x7403, 0x77bf, 0x77e9, 0x7a76, 0x7d7f, 0x8009, 0x81fc, - 0x8205, 0x820a, 0x82df, 0x8862, 0x8b33, 0x8cfc, 0x8ec0, 0x9011, - 0x90b1, 0x9264, 0x92b6, 0x99d2, 0x9a45, 0x9ce9, 0x9dd7, 0x9f9c, - 0x570b, 0x5c40, 0x83ca, 0x97a0, 0x97ab, 0x9eb4, 0x541b, 0x7a98, - 0x7fa4, 0x88d9, 0x8ecd, 0x90e1, 0x5800, 0x5c48, 0x6398, 0x7a9f, - 0x5bae, 0x5f13, 0x7a79, 0x7aae, 0x828e, 0x8eac, 0x5026, 0x5238, - 0x52f8, 0x5377, 0x5708, 0x62f3, 0x6372, 0x6b0a, 0x6dc3, 0x7737, - 0x53a5, 0x7357, 0x8568, 0x8e76, 0x95d5, 0x673a, 0x6ac3, 0x6f70, - 0x8a6d, 0x8ecc, 0x994b, 0xf906, 0x6677, 0x6b78, 0x8cb4, 0x003f, - /* lead byte e3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9b3c, 0xf907, 0x53eb, 0x572d, 0x594e, 0x63c6, 0x69fb, - 0x73ea, 0x7845, 0x7aba, 0x7ac5, 0x7cfe, 0x8475, 0x898f, 0x8d73, - 0x9035, 0x95a8, 0x52fb, 0x5747, 0x7547, 0x7b60, 0x83cc, 0x921e, - 0xf908, 0x6a58, 0x514b, 0x524b, 0x5287, 0x621f, 0x68d8, 0x6975, - 0x9699, 0x50c5, 0x52a4, 0x52e4, 0x61c3, 0x65a4, 0x6839, 0x69ff, - 0x747e, 0x7b4b, 0x82b9, 0x83eb, 0x89b2, 0x8b39, 0x8fd1, 0x9949, - 0xf909, 0x4eca, 0x5997, 0x64d2, 0x6611, 0x6a8e, 0x7434, 0x7981, - 0x79bd, 0x82a9, 0x887e, 0x887f, 0x895f, 0xf90a, 0x9326, 0x4f0b, - 0x53ca, 0x6025, 0x6271, 0x6c72, 0x7d1a, 0x7d66, 0x4e98, 0x5162, - 0x77dc, 0x80af, 0x4f01, 0x4f0e, 0x5176, 0x5180, 0x55dc, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5668, 0x573b, 0x57fa, 0x57fc, 0x5914, 0x5947, 0x5993, - 0x5bc4, 0x5c90, 0x5d0e, 0x5df1, 0x5e7e, 0x5fcc, 0x6280, 0x65d7, - 0x65e3, 0x671e, 0x671f, 0x675e, 0x68cb, 0x68c4, 0x6a5f, 0x6b3a, - 0x6c23, 0x6c7d, 0x6c82, 0x6dc7, 0x7398, 0x7426, 0x742a, 0x7482, - 0x74a3, 0x7578, 0x757f, 0x7881, 0x78ef, 0x7941, 0x7947, 0x7948, - 0x797a, 0x7b95, 0x7d00, 0x7dba, 0x7f88, 0x8006, 0x802d, 0x808c, - 0x8a18, 0x8b4f, 0x8c48, 0x8d77, 0x9321, 0x9324, 0x98e2, 0x9951, - 0x9a0e, 0x9a0f, 0x9a65, 0x9e92, 0x7dca, 0x4f76, 0x5409, 0x62ee, - 0x6854, 0x91d1, 0x55ab, 0x513a, 0xf90b, 0xf90c, 0x5a1c, 0x61e6, - 0xf90d, 0x62cf, 0x62ff, 0xf90e, 0xf90f, 0xf910, 0xf911, 0xf912, - 0xf913, 0x90a3, 0xf914, 0xf915, 0xf916, 0xf917, 0xf918, 0x8afe, - 0xf919, 0xf91a, 0xf91b, 0xf91c, 0x6696, 0xf91d, 0x7156, 0xf91e, - 0xf91f, 0x96e3, 0xf920, 0x634f, 0x637a, 0x5357, 0xf921, 0x678f, - 0x6960, 0x6e73, 0xf922, 0x7537, 0xf923, 0xf924, 0xf925, 0x003f, - /* lead byte e4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7d0d, 0xf926, 0xf927, 0x8872, 0x56ca, 0x5a18, 0xf928, - 0xf929, 0xf92a, 0xf92b, 0xf92c, 0x4e43, 0xf92d, 0x5167, 0x5948, - 0x67f0, 0x8010, 0xf92e, 0x5973, 0x5e74, 0x649a, 0x79ca, 0x5ff5, - 0x606c, 0x62c8, 0x637b, 0x5be7, 0x5bd7, 0x52aa, 0xf92f, 0x5974, - 0x5f29, 0x6012, 0xf930, 0xf931, 0xf932, 0x7459, 0xf933, 0xf934, - 0xf935, 0xf936, 0xf937, 0xf938, 0x99d1, 0xf939, 0xf93a, 0xf93b, - 0xf93c, 0xf93d, 0xf93e, 0xf93f, 0xf940, 0xf941, 0xf942, 0xf943, - 0x6fc3, 0xf944, 0xf945, 0x81bf, 0x8fb2, 0x60f1, 0xf946, 0xf947, - 0x8166, 0xf948, 0xf949, 0x5c3f, 0xf94a, 0xf94b, 0xf94c, 0xf94d, - 0xf94e, 0xf94f, 0xf950, 0xf951, 0x5ae9, 0x8a25, 0x677b, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7d10, 0xf952, 0xf953, 0xf954, 0xf955, 0xf956, 0xf957, - 0x80fd, 0xf958, 0xf959, 0x5c3c, 0x6ce5, 0x533f, 0x6eba, 0x591a, - 0x8336, 0x4e39, 0x4eb6, 0x4f46, 0x55ae, 0x5718, 0x58c7, 0x5f56, - 0x65b7, 0x65e6, 0x6a80, 0x6bb5, 0x6e4d, 0x77ed, 0x7aef, 0x7c1e, - 0x7dde, 0x86cb, 0x8892, 0x9132, 0x935b, 0x64bb, 0x6fbe, 0x737a, - 0x75b8, 0x9054, 0x5556, 0x574d, 0x61ba, 0x64d4, 0x66c7, 0x6de1, - 0x6e5b, 0x6f6d, 0x6fb9, 0x75f0, 0x8043, 0x81bd, 0x8541, 0x8983, - 0x8ac7, 0x8b5a, 0x931f, 0x6c93, 0x7553, 0x7b54, 0x8e0f, 0x905d, - 0x5510, 0x5802, 0x5858, 0x5e62, 0x6207, 0x649e, 0x68e0, 0x7576, - 0x7cd6, 0x87b3, 0x9ee8, 0x4ee3, 0x5788, 0x576e, 0x5927, 0x5c0d, - 0x5cb1, 0x5e36, 0x5f85, 0x6234, 0x64e1, 0x73b3, 0x81fa, 0x888b, - 0x8cb8, 0x968a, 0x9edb, 0x5b85, 0x5fb7, 0x60b3, 0x5012, 0x5200, - 0x5230, 0x5716, 0x5835, 0x5857, 0x5c0e, 0x5c60, 0x5cf6, 0x5d8b, - 0x5ea6, 0x5f92, 0x60bc, 0x6311, 0x6389, 0x6417, 0x6843, 0x003f, - /* lead byte e5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x68f9, 0x6ac2, 0x6dd8, 0x6e21, 0x6ed4, 0x6fe4, 0x71fe, - 0x76dc, 0x7779, 0x79b1, 0x7a3b, 0x8404, 0x89a9, 0x8ced, 0x8df3, - 0x8e48, 0x9003, 0x9014, 0x9053, 0x90fd, 0x934d, 0x9676, 0x97dc, - 0x6bd2, 0x7006, 0x7258, 0x72a2, 0x7368, 0x7763, 0x79bf, 0x7be4, - 0x7e9b, 0x8b80, 0x58a9, 0x60c7, 0x6566, 0x65fd, 0x66be, 0x6c8c, - 0x711e, 0x71c9, 0x8c5a, 0x9813, 0x4e6d, 0x7a81, 0x4edd, 0x51ac, - 0x51cd, 0x52d5, 0x540c, 0x61a7, 0x6771, 0x6850, 0x68df, 0x6d1e, - 0x6f7c, 0x75bc, 0x77b3, 0x7ae5, 0x80f4, 0x8463, 0x9285, 0x515c, - 0x6597, 0x675c, 0x6793, 0x75d8, 0x7ac7, 0x8373, 0xf95a, 0x8c46, - 0x9017, 0x982d, 0x5c6f, 0x81c0, 0x829a, 0x9041, 0x906f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x920d, 0x5f97, 0x5d9d, 0x6a59, 0x71c8, 0x767b, 0x7b49, - 0x85e4, 0x8b04, 0x9127, 0x9a30, 0x5587, 0x61f6, 0xf95b, 0x7669, - 0x7f85, 0x863f, 0x87ba, 0x88f8, 0x908f, 0xf95c, 0x6d1b, 0x70d9, - 0x73de, 0x7d61, 0x843d, 0xf95d, 0x916a, 0x99f1, 0xf95e, 0x4e82, - 0x5375, 0x6b04, 0x6b12, 0x703e, 0x721b, 0x862d, 0x9e1e, 0x524c, - 0x8fa3, 0x5d50, 0x64e5, 0x652c, 0x6b16, 0x6feb, 0x7c43, 0x7e9c, - 0x85cd, 0x8964, 0x89bd, 0x62c9, 0x81d8, 0x881f, 0x5eca, 0x6717, - 0x6d6a, 0x72fc, 0x7405, 0x746f, 0x8782, 0x90de, 0x4f86, 0x5d0d, - 0x5fa0, 0x840a, 0x51b7, 0x63a0, 0x7565, 0x4eae, 0x5006, 0x5169, - 0x51c9, 0x6881, 0x6a11, 0x7cae, 0x7cb1, 0x7ce7, 0x826f, 0x8ad2, - 0x8f1b, 0x91cf, 0x4fb6, 0x5137, 0x52f5, 0x5442, 0x5eec, 0x616e, - 0x623e, 0x65c5, 0x6ada, 0x6ffe, 0x792a, 0x85dc, 0x8823, 0x95ad, - 0x9a62, 0x9a6a, 0x9e97, 0x9ece, 0x529b, 0x66c6, 0x6b77, 0x701d, - 0x792b, 0x8f62, 0x9742, 0x6190, 0x6200, 0x6523, 0x6f23, 0x003f, - /* lead byte e6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7149, 0x7489, 0x7df4, 0x806f, 0x84ee, 0x8f26, 0x9023, - 0x934a, 0x51bd, 0x5217, 0x52a3, 0x6d0c, 0x70c8, 0x88c2, 0x5ec9, - 0x6582, 0x6bae, 0x6fc2, 0x7c3e, 0x7375, 0x4ee4, 0x4f36, 0x56f9, - 0xf95f, 0x5cba, 0x5dba, 0x601c, 0x73b2, 0x7b2d, 0x7f9a, 0x7fce, - 0x8046, 0x901e, 0x9234, 0x96f6, 0x9748, 0x9818, 0x9f61, 0x4f8b, - 0x6fa7, 0x79ae, 0x91b4, 0x96b7, 0x52de, 0xf960, 0x6488, 0x64c4, - 0x6ad3, 0x6f5e, 0x7018, 0x7210, 0x76e7, 0x8001, 0x8606, 0x865c, - 0x8def, 0x8f05, 0x9732, 0x9b6f, 0x9dfa, 0x9e75, 0x788c, 0x797f, - 0x7da0, 0x83c9, 0x9304, 0x9e7f, 0x9e93, 0x8ad6, 0x58df, 0x5f04, - 0x6727, 0x7027, 0x74cf, 0x7c60, 0x807e, 0x5121, 0x7028, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7262, 0x78ca, 0x8cc2, 0x8cda, 0x8cf4, 0x96f7, 0x4e86, - 0x50da, 0x5bee, 0x5ed6, 0x6599, 0x71ce, 0x7642, 0x77ad, 0x804a, - 0x84fc, 0x907c, 0x9b27, 0x9f8d, 0x58d8, 0x5a41, 0x5c62, 0x6a13, - 0x6dda, 0x6f0f, 0x763b, 0x7d2f, 0x7e37, 0x851e, 0x8938, 0x93e4, - 0x964b, 0x5289, 0x65d2, 0x67f3, 0x69b4, 0x6d41, 0x6e9c, 0x700f, - 0x7409, 0x7460, 0x7559, 0x7624, 0x786b, 0x8b2c, 0x985e, 0x516d, - 0x622e, 0x9678, 0x4f96, 0x502b, 0x5d19, 0x6dea, 0x7db8, 0x8f2a, - 0x5f8b, 0x6144, 0x6817, 0xf961, 0x9686, 0x52d2, 0x808b, 0x51dc, - 0x51cc, 0x695e, 0x7a1c, 0x7dbe, 0x83f1, 0x9675, 0x4fda, 0x5229, - 0x5398, 0x540f, 0x550e, 0x5c65, 0x60a7, 0x674e, 0x68a8, 0x6d6c, - 0x7281, 0x72f8, 0x7406, 0x7483, 0xf962, 0x75e2, 0x7c6c, 0x7f79, - 0x7fb8, 0x8389, 0x88cf, 0x88e1, 0x91cc, 0x91d0, 0x96e2, 0x9bc9, - 0x541d, 0x6f7e, 0x71d0, 0x7498, 0x85fa, 0x8eaa, 0x96a3, 0x9c57, - 0x9e9f, 0x6797, 0x6dcb, 0x7433, 0x81e8, 0x9716, 0x782c, 0x003f, - /* lead byte e7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7acb, 0x7b20, 0x7c92, 0x6469, 0x746a, 0x75f2, 0x78bc, - 0x78e8, 0x99ac, 0x9b54, 0x9ebb, 0x5bde, 0x5e55, 0x6f20, 0x819c, - 0x83ab, 0x9088, 0x4e07, 0x534d, 0x5a29, 0x5dd2, 0x5f4e, 0x6162, - 0x633d, 0x6669, 0x66fc, 0x6eff, 0x6f2b, 0x7063, 0x779e, 0x842c, - 0x8513, 0x883b, 0x8f13, 0x9945, 0x9c3b, 0x551c, 0x62b9, 0x672b, - 0x6cab, 0x8309, 0x896a, 0x977a, 0x4ea1, 0x5984, 0x5fd8, 0x5fd9, - 0x671b, 0x7db2, 0x7f54, 0x8292, 0x832b, 0x83bd, 0x8f1e, 0x9099, - 0x57cb, 0x59b9, 0x5a92, 0x5bd0, 0x6627, 0x679a, 0x6885, 0x6bcf, - 0x7164, 0x7f75, 0x8cb7, 0x8ce3, 0x9081, 0x9b45, 0x8108, 0x8c8a, - 0x964c, 0x9a40, 0x9ea5, 0x5b5f, 0x6c13, 0x731b, 0x76f2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x76df, 0x840c, 0x51aa, 0x8993, 0x514d, 0x5195, 0x52c9, - 0x68c9, 0x6c94, 0x7704, 0x7720, 0x7dbf, 0x7dec, 0x9762, 0x9eb5, - 0x6ec5, 0x8511, 0x51a5, 0x540d, 0x547d, 0x660e, 0x669d, 0x6927, - 0x6e9f, 0x76bf, 0x7791, 0x8317, 0x84c2, 0x879f, 0x9169, 0x9298, - 0x9cf4, 0x8882, 0x4fae, 0x5192, 0x52df, 0x59c6, 0x5e3d, 0x6155, - 0x6478, 0x6479, 0x66ae, 0x67d0, 0x6a21, 0x6bcd, 0x6bdb, 0x725f, - 0x7261, 0x7441, 0x7738, 0x77db, 0x8017, 0x82bc, 0x8305, 0x8b00, - 0x8b28, 0x8c8c, 0x6728, 0x6c90, 0x7267, 0x76ee, 0x7766, 0x7a46, - 0x9da9, 0x6b7f, 0x6c92, 0x5922, 0x6726, 0x8499, 0x536f, 0x5893, - 0x5999, 0x5edf, 0x63cf, 0x6634, 0x6773, 0x6e3a, 0x732b, 0x7ad7, - 0x82d7, 0x9328, 0x52d9, 0x5deb, 0x61ae, 0x61cb, 0x620a, 0x62c7, - 0x64ab, 0x65e0, 0x6959, 0x6b66, 0x6bcb, 0x7121, 0x73f7, 0x755d, - 0x7e46, 0x821e, 0x8302, 0x856a, 0x8aa3, 0x8cbf, 0x9727, 0x9d61, - 0x58a8, 0x9ed8, 0x5011, 0x520e, 0x543b, 0x554f, 0x6587, 0x003f, - /* lead byte e8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6c76, 0x7d0a, 0x7d0b, 0x805e, 0x868a, 0x9580, 0x96ef, - 0x52ff, 0x6c95, 0x7269, 0x5473, 0x5a9a, 0x5c3e, 0x5d4b, 0x5f4c, - 0x5fae, 0x672a, 0x68b6, 0x6963, 0x6e3c, 0x6e44, 0x7709, 0x7c73, - 0x7f8e, 0x8587, 0x8b0e, 0x8ff7, 0x9761, 0x9ef4, 0x5cb7, 0x60b6, - 0x610d, 0x61ab, 0x654f, 0x65fb, 0x65fc, 0x6c11, 0x6cef, 0x739f, - 0x73c9, 0x7de1, 0x9594, 0x5bc6, 0x871c, 0x8b10, 0x525d, 0x535a, - 0x62cd, 0x640f, 0x64b2, 0x6734, 0x6a38, 0x6cca, 0x73c0, 0x749e, - 0x7b94, 0x7c95, 0x7e1b, 0x818a, 0x8236, 0x8584, 0x8feb, 0x96f9, - 0x99c1, 0x4f34, 0x534a, 0x53cd, 0x53db, 0x62cc, 0x642c, 0x6500, - 0x6591, 0x69c3, 0x6cee, 0x6f58, 0x73ed, 0x7554, 0x7622, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x76e4, 0x76fc, 0x78d0, 0x78fb, 0x792c, 0x7d46, 0x822c, - 0x87e0, 0x8fd4, 0x9812, 0x98ef, 0x52c3, 0x62d4, 0x64a5, 0x6e24, - 0x6f51, 0x767c, 0x8dcb, 0x91b1, 0x9262, 0x9aee, 0x9b43, 0x5023, - 0x508d, 0x574a, 0x59a8, 0x5c28, 0x5e47, 0x5f77, 0x623f, 0x653e, - 0x65b9, 0x65c1, 0x6609, 0x678b, 0x699c, 0x6ec2, 0x78c5, 0x7d21, - 0x80aa, 0x8180, 0x822b, 0x82b3, 0x84a1, 0x868c, 0x8a2a, 0x8b17, - 0x90a6, 0x9632, 0x9f90, 0x500d, 0x4ff3, 0xf963, 0x57f9, 0x5f98, - 0x62dc, 0x6392, 0x676f, 0x6e43, 0x7119, 0x76c3, 0x80cc, 0x80da, - 0x88f4, 0x88f5, 0x8919, 0x8ce0, 0x8f29, 0x914d, 0x966a, 0x4f2f, - 0x4f70, 0x5e1b, 0x67cf, 0x6822, 0x767d, 0x767e, 0x9b44, 0x5e61, - 0x6a0a, 0x7169, 0x71d4, 0x756a, 0xf964, 0x7e41, 0x8543, 0x85e9, - 0x98dc, 0x4f10, 0x7b4f, 0x7f70, 0x95a5, 0x51e1, 0x5e06, 0x68b5, - 0x6c3e, 0x6c4e, 0x6cdb, 0x72af, 0x7bc4, 0x8303, 0x6cd5, 0x743a, - 0x50fb, 0x5288, 0x58c1, 0x64d8, 0x6a97, 0x74a7, 0x7656, 0x003f, - /* lead byte e9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x78a7, 0x8617, 0x95e2, 0x9739, 0xf965, 0x535e, 0x5f01, - 0x8b8a, 0x8fa8, 0x8faf, 0x908a, 0x5225, 0x77a5, 0x9c49, 0x9f08, - 0x4e19, 0x5002, 0x5175, 0x5c5b, 0x5e77, 0x661e, 0x663a, 0x67c4, - 0x68c5, 0x70b3, 0x7501, 0x75c5, 0x79c9, 0x7add, 0x8f27, 0x9920, - 0x9a08, 0x4fdd, 0x5821, 0x5831, 0x5bf6, 0x666e, 0x6b65, 0x6d11, - 0x6e7a, 0x6f7d, 0x73e4, 0x752b, 0x83e9, 0x88dc, 0x8913, 0x8b5c, - 0x8f14, 0x4f0f, 0x50d5, 0x5310, 0x535c, 0x5b93, 0x5fa9, 0x670d, - 0x798f, 0x8179, 0x832f, 0x8514, 0x8907, 0x8986, 0x8f39, 0x8f3b, - 0x99a5, 0x9c12, 0x672c, 0x4e76, 0x4ff8, 0x5949, 0x5c01, 0x5cef, - 0x5cf0, 0x6367, 0x68d2, 0x70fd, 0x71a2, 0x742b, 0x7e2b, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x84ec, 0x8702, 0x9022, 0x92d2, 0x9cf3, 0x4e0d, 0x4ed8, - 0x4fef, 0x5085, 0x5256, 0x526f, 0x5426, 0x5490, 0x57e0, 0x592b, - 0x5a66, 0x5b5a, 0x5b75, 0x5bcc, 0x5e9c, 0xf966, 0x6276, 0x6577, - 0x65a7, 0x6d6e, 0x6ea5, 0x7236, 0x7b26, 0x7c3f, 0x7f36, 0x8150, - 0x8151, 0x819a, 0x8240, 0x8299, 0x83a9, 0x8a03, 0x8ca0, 0x8ce6, - 0x8cfb, 0x8d74, 0x8dba, 0x90e8, 0x91dc, 0x961c, 0x9644, 0x99d9, - 0x9ce7, 0x5317, 0x5206, 0x5429, 0x5674, 0x58b3, 0x5954, 0x596e, - 0x5fff, 0x61a4, 0x626e, 0x6610, 0x6c7e, 0x711a, 0x76c6, 0x7c89, - 0x7cde, 0x7d1b, 0x82ac, 0x8cc1, 0x96f0, 0xf967, 0x4f5b, 0x5f17, - 0x5f7f, 0x62c2, 0x5d29, 0x670b, 0x68da, 0x787c, 0x7e43, 0x9d6c, - 0x4e15, 0x5099, 0x5315, 0x532a, 0x5351, 0x5983, 0x5a62, 0x5e87, - 0x60b2, 0x618a, 0x6249, 0x6279, 0x6590, 0x6787, 0x69a7, 0x6bd4, - 0x6bd6, 0x6bd7, 0x6bd8, 0x6cb8, 0xf968, 0x7435, 0x75fa, 0x7812, - 0x7891, 0x79d5, 0x79d8, 0x7c83, 0x7dcb, 0x7fe1, 0x80a5, 0x003f, - /* lead byte ea */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x813e, 0x81c2, 0x83f2, 0x871a, 0x88e8, 0x8ab9, 0x8b6c, - 0x8cbb, 0x9119, 0x975e, 0x98db, 0x9f3b, 0x56ac, 0x5b2a, 0x5f6c, - 0x658c, 0x6ab3, 0x6baf, 0x6d5c, 0x6ff1, 0x7015, 0x725d, 0x73ad, - 0x8ca7, 0x8cd3, 0x983b, 0x6191, 0x6c37, 0x8058, 0x9a01, 0x4e4d, - 0x4e8b, 0x4e9b, 0x4ed5, 0x4f3a, 0x4f3c, 0x4f7f, 0x4fdf, 0x50ff, - 0x53f2, 0x53f8, 0x5506, 0x55e3, 0x56db, 0x58eb, 0x5962, 0x5a11, - 0x5beb, 0x5bfa, 0x5c04, 0x5df3, 0x5e2b, 0x5f99, 0x601d, 0x6368, - 0x659c, 0x65af, 0x67f6, 0x67fb, 0x68ad, 0x6b7b, 0x6c99, 0x6cd7, - 0x6e23, 0x7009, 0x7345, 0x7802, 0x793e, 0x7940, 0x7960, 0x79c1, - 0x7be9, 0x7d17, 0x7d72, 0x8086, 0x820d, 0x838e, 0x84d1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x86c7, 0x88df, 0x8a50, 0x8a5e, 0x8b1d, 0x8cdc, 0x8d66, - 0x8fad, 0x90aa, 0x98fc, 0x99df, 0x9e9d, 0x524a, 0xf969, 0x6714, - 0xf96a, 0x5098, 0x522a, 0x5c71, 0x6563, 0x6c55, 0x73ca, 0x7523, - 0x759d, 0x7b97, 0x849c, 0x9178, 0x9730, 0x4e77, 0x6492, 0x6bba, - 0x715e, 0x85a9, 0x4e09, 0xf96b, 0x6749, 0x68ee, 0x6e17, 0x829f, - 0x8518, 0x886b, 0x63f7, 0x6f81, 0x9212, 0x98af, 0x4e0a, 0x50b7, - 0x50cf, 0x511f, 0x5546, 0x55aa, 0x5617, 0x5b40, 0x5c19, 0x5ce0, - 0x5e38, 0x5e8a, 0x5ea0, 0x5ec2, 0x60f3, 0x6851, 0x6a61, 0x6e58, - 0x723d, 0x7240, 0x72c0, 0x76f8, 0x7965, 0x7bb1, 0x7fd4, 0x88f3, - 0x89f4, 0x8a73, 0x8c61, 0x8cde, 0x971c, 0x585e, 0x74bd, 0x8cfd, - 0x55c7, 0xf96c, 0x7a61, 0x7d22, 0x8272, 0x7272, 0x751f, 0x7525, - 0xf96d, 0x7b19, 0x5885, 0x58fb, 0x5dbc, 0x5e8f, 0x5eb6, 0x5f90, - 0x6055, 0x6292, 0x637f, 0x654d, 0x6691, 0x66d9, 0x66f8, 0x6816, - 0x68f2, 0x7280, 0x745e, 0x7b6e, 0x7d6e, 0x7dd6, 0x7f72, 0x003f, - /* lead byte eb */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x80e5, 0x8212, 0x85af, 0x897f, 0x8a93, 0x901d, 0x92e4, - 0x9ecd, 0x9f20, 0x5915, 0x596d, 0x5e2d, 0x60dc, 0x6614, 0x6673, - 0x6790, 0x6c50, 0x6dc5, 0x6f5f, 0x77f3, 0x78a9, 0x84c6, 0x91cb, - 0x932b, 0x4ed9, 0x50ca, 0x5148, 0x5584, 0x5b0b, 0x5ba3, 0x6247, - 0x657e, 0x65cb, 0x6e32, 0x717d, 0x7401, 0x7444, 0x7487, 0x74bf, - 0x766c, 0x79aa, 0x7dda, 0x7e55, 0x7fa8, 0x817a, 0x81b3, 0x8239, - 0x861a, 0x87ec, 0x8a75, 0x8de3, 0x9078, 0x9291, 0x9425, 0x994d, - 0x9bae, 0x5368, 0x5c51, 0x6954, 0x6cc4, 0x6d29, 0x6e2b, 0x820c, - 0x859b, 0x893b, 0x8a2d, 0x8aaa, 0x96ea, 0x9f67, 0x5261, 0x66b9, - 0x6bb2, 0x7e96, 0x87fe, 0x8d0d, 0x9583, 0x965d, 0x651d, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6d89, 0x71ee, 0xf96e, 0x57ce, 0x59d3, 0x5bac, 0x6027, - 0x60fa, 0x6210, 0x661f, 0x665f, 0x7329, 0x73f9, 0x76db, 0x7701, - 0x7b6c, 0x8056, 0x8072, 0x8165, 0x8aa0, 0x9192, 0x4e16, 0x52e2, - 0x6b72, 0x6d17, 0x7a05, 0x7b39, 0x7d30, 0xf96f, 0x8cb0, 0x53ec, - 0x562f, 0x5851, 0x5bb5, 0x5c0f, 0x5c11, 0x5de2, 0x6240, 0x6383, - 0x6414, 0x662d, 0x68b3, 0x6cbc, 0x6d88, 0x6eaf, 0x701f, 0x70a4, - 0x71d2, 0x7526, 0x758f, 0x758e, 0x7619, 0x7b11, 0x7be0, 0x7c2b, - 0x7d20, 0x7d39, 0x852c, 0x856d, 0x8607, 0x8a34, 0x900d, 0x9061, - 0x90b5, 0x92b7, 0x97f6, 0x9a37, 0x4fd7, 0x5c6c, 0x675f, 0x6d91, - 0x7c9f, 0x7e8c, 0x8b16, 0x8d16, 0x901f, 0x5b6b, 0x5dfd, 0x640d, - 0x84c0, 0x905c, 0x98e1, 0x7387, 0x5b8b, 0x609a, 0x677e, 0x6dde, - 0x8a1f, 0x8aa6, 0x9001, 0x980c, 0x5237, 0xf970, 0x7051, 0x788e, - 0x9396, 0x8870, 0x91d7, 0x4fee, 0x53d7, 0x55fd, 0x56da, 0x5782, - 0x58fd, 0x5ac2, 0x5b88, 0x5cab, 0x5cc0, 0x5e25, 0x6101, 0x003f, - /* lead byte ec */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x620d, 0x624b, 0x6388, 0x641c, 0x6536, 0x6578, 0x6a39, - 0x6b8a, 0x6c34, 0x6d19, 0x6f31, 0x71e7, 0x72e9, 0x7378, 0x7407, - 0x74b2, 0x7626, 0x7761, 0x79c0, 0x7a57, 0x7aea, 0x7cb9, 0x7d8f, - 0x7dac, 0x7e61, 0x7f9e, 0x8129, 0x8331, 0x8490, 0x84da, 0x85ea, - 0x8896, 0x8ab0, 0x8b90, 0x8f38, 0x9042, 0x9083, 0x916c, 0x9296, - 0x92b9, 0x968b, 0x96a7, 0x96a8, 0x96d6, 0x9700, 0x9808, 0x9996, - 0x9ad3, 0x9b1a, 0x53d4, 0x587e, 0x5919, 0x5b70, 0x5bbf, 0x6dd1, - 0x6f5a, 0x719f, 0x7421, 0x74b9, 0x8085, 0x83fd, 0x5de1, 0x5f87, - 0x5faa, 0x6042, 0x65ec, 0x6812, 0x696f, 0x6a53, 0x6b89, 0x6d35, - 0x6df3, 0x73e3, 0x76fe, 0x77ac, 0x7b4d, 0x7d14, 0x8123, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x821c, 0x8340, 0x84f4, 0x8563, 0x8a62, 0x8ac4, 0x9187, - 0x931e, 0x9806, 0x99b4, 0x620c, 0x8853, 0x8ff0, 0x9265, 0x5d07, - 0x5d27, 0x5d69, 0x745f, 0x819d, 0x8768, 0x6fd5, 0x62fe, 0x7fd2, - 0x8936, 0x8972, 0x4e1e, 0x4e58, 0x50e7, 0x52dd, 0x5347, 0x627f, - 0x6607, 0x7e69, 0x8805, 0x965e, 0x4f8d, 0x5319, 0x5636, 0x59cb, - 0x5aa4, 0x5c38, 0x5c4e, 0x5c4d, 0x5e02, 0x5f11, 0x6043, 0x65bd, - 0x662f, 0x6642, 0x67be, 0x67f4, 0x731c, 0x77e2, 0x793a, 0x7fc5, - 0x8494, 0x84cd, 0x8996, 0x8a66, 0x8a69, 0x8ae1, 0x8c55, 0x8c7a, - 0x57f4, 0x5bd4, 0x5f0f, 0x606f, 0x62ed, 0x690d, 0x6b96, 0x6e5c, - 0x7184, 0x7bd2, 0x8755, 0x8b58, 0x8efe, 0x98df, 0x98fe, 0x4f38, - 0x4f81, 0x4fe1, 0x547b, 0x5a20, 0x5bb8, 0x613c, 0x65b0, 0x6668, - 0x71fc, 0x7533, 0x795e, 0x7d33, 0x814e, 0x81e3, 0x8398, 0x85aa, - 0x85ce, 0x8703, 0x8a0a, 0x8eab, 0x8f9b, 0xf971, 0x8fc5, 0x5931, - 0x5ba4, 0x5be6, 0x6089, 0x5be9, 0x5c0b, 0x5fc3, 0x6c81, 0x003f, - /* lead byte ed */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf972, 0x6df1, 0x700b, 0x751a, 0x82af, 0x8af6, 0x4ec0, - 0x5341, 0xf973, 0x96d9, 0x6c0f, 0x4e9e, 0x4fc4, 0x5152, 0x555e, - 0x5a25, 0x5ce8, 0x6211, 0x7259, 0x82bd, 0x83aa, 0x86fe, 0x8859, - 0x8a1d, 0x963f, 0x96c5, 0x9913, 0x9d09, 0x9d5d, 0x580a, 0x5cb3, - 0x5dbd, 0x5e44, 0x60e1, 0x6115, 0x63e1, 0x6a02, 0x6e25, 0x9102, - 0x9354, 0x984e, 0x9c10, 0x9f77, 0x5b89, 0x5cb8, 0x6309, 0x664f, - 0x6848, 0x773c, 0x96c1, 0x978d, 0x9854, 0x9b9f, 0x65a1, 0x8b01, - 0x8ecb, 0x95bc, 0x5535, 0x5ca9, 0x5dd6, 0x5eb5, 0x6697, 0x764c, - 0x83f4, 0x95c7, 0x58d3, 0x62bc, 0x72ce, 0x9d28, 0x4ef0, 0x592e, - 0x600f, 0x663b, 0x6b83, 0x79e7, 0x9d26, 0x5393, 0x54c0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x57c3, 0x5d16, 0x611b, 0x66d6, 0x6daf, 0x788d, 0x827e, - 0x9698, 0x9744, 0x5384, 0x627c, 0x6396, 0x6db2, 0x7e0a, 0x814b, - 0x984d, 0x6afb, 0x7f4c, 0x9daf, 0x9e1a, 0x4e5f, 0x503b, 0x51b6, - 0x591c, 0x60f9, 0x63f6, 0x6930, 0x723a, 0x8036, 0xf974, 0x91ce, - 0x5f31, 0xf975, 0xf976, 0x7d04, 0x82e5, 0x846f, 0x84bb, 0x85e5, - 0x8e8d, 0xf977, 0x4f6f, 0xf978, 0xf979, 0x58e4, 0x5b43, 0x6059, - 0x63da, 0x6518, 0x656d, 0x6698, 0xf97a, 0x694a, 0x6a23, 0x6d0b, - 0x7001, 0x716c, 0x75d2, 0x760d, 0x79b3, 0x7a70, 0xf97b, 0x7f8a, - 0xf97c, 0x8944, 0xf97d, 0x8b93, 0x91c0, 0x967d, 0xf97e, 0x990a, - 0x5704, 0x5fa1, 0x65bc, 0x6f01, 0x7600, 0x79a6, 0x8a9e, 0x99ad, - 0x9b5a, 0x9f6c, 0x5104, 0x61b6, 0x6291, 0x6a8d, 0x81c6, 0x5043, - 0x5830, 0x5f66, 0x7109, 0x8a00, 0x8afa, 0x5b7c, 0x8616, 0x4ffa, - 0x513c, 0x56b4, 0x5944, 0x63a9, 0x6df9, 0x5daa, 0x696d, 0x5186, - 0x4e88, 0x4f59, 0xf97f, 0xf980, 0xf981, 0x5982, 0xf982, 0x003f, - /* lead byte ee */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf983, 0x6b5f, 0x6c5d, 0xf984, 0x74b5, 0x7916, 0xf985, - 0x8207, 0x8245, 0x8339, 0x8f3f, 0x8f5d, 0xf986, 0x9918, 0xf987, - 0xf988, 0xf989, 0x4ea6, 0xf98a, 0x57df, 0x5f79, 0x6613, 0xf98b, - 0xf98c, 0x75ab, 0x7e79, 0x8b6f, 0xf98d, 0x9006, 0x9a5b, 0x56a5, - 0x5827, 0x59f8, 0x5a1f, 0x5bb4, 0xf98e, 0x5ef6, 0xf98f, 0xf990, - 0x6350, 0x633b, 0xf991, 0x693d, 0x6c87, 0x6cbf, 0x6d8e, 0x6d93, - 0x6df5, 0x6f14, 0xf992, 0x70df, 0x7136, 0x7159, 0xf993, 0x71c3, - 0x71d5, 0xf994, 0x784f, 0x786f, 0xf995, 0x7b75, 0x7de3, 0xf996, - 0x7e2f, 0xf997, 0x884d, 0x8edf, 0xf998, 0xf999, 0xf99a, 0x925b, - 0xf99b, 0x9cf6, 0xf99c, 0xf99d, 0xf99e, 0x6085, 0x6d85, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf99f, 0x71b1, 0xf9a0, 0xf9a1, 0x95b1, 0x53ad, 0xf9a2, - 0xf9a3, 0xf9a4, 0x67d3, 0xf9a5, 0x708e, 0x7130, 0x7430, 0x8276, - 0x82d2, 0xf9a6, 0x95bb, 0x9ae5, 0x9e7d, 0x66c4, 0xf9a7, 0x71c1, - 0x8449, 0xf9a8, 0xf9a9, 0x584b, 0xf9aa, 0xf9ab, 0x5db8, 0x5f71, - 0xf9ac, 0x6620, 0x668e, 0x6979, 0x69ae, 0x6c38, 0x6cf3, 0x6e36, - 0x6f41, 0x6fda, 0x701b, 0x702f, 0x7150, 0x71df, 0x7370, 0xf9ad, - 0x745b, 0xf9ae, 0x74d4, 0x76c8, 0x7a4e, 0x7e93, 0xf9af, 0xf9b0, - 0x82f1, 0x8a60, 0x8fce, 0xf9b1, 0x9348, 0xf9b2, 0x9719, 0xf9b3, - 0xf9b4, 0x4e42, 0x502a, 0xf9b5, 0x5208, 0x53e1, 0x66f3, 0x6c6d, - 0x6fca, 0x730a, 0x777f, 0x7a62, 0x82ae, 0x85dd, 0x8602, 0xf9b6, - 0x88d4, 0x8a63, 0x8b7d, 0x8c6b, 0xf9b7, 0x92b3, 0xf9b8, 0x9713, - 0x9810, 0x4e94, 0x4f0d, 0x4fc9, 0x50b2, 0x5348, 0x543e, 0x5433, - 0x55da, 0x5862, 0x58ba, 0x5967, 0x5a1b, 0x5be4, 0x609f, 0xf9b9, - 0x61ca, 0x6556, 0x65ff, 0x6664, 0x68a7, 0x6c5a, 0x6fb3, 0x003f, - /* lead byte ef */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x70cf, 0x71ac, 0x7352, 0x7b7d, 0x8708, 0x8aa4, 0x9c32, - 0x9f07, 0x5c4b, 0x6c83, 0x7344, 0x7389, 0x923a, 0x6eab, 0x7465, - 0x761f, 0x7a69, 0x7e15, 0x860a, 0x5140, 0x58c5, 0x64c1, 0x74ee, - 0x7515, 0x7670, 0x7fc1, 0x9095, 0x96cd, 0x9954, 0x6e26, 0x74e6, - 0x7aa9, 0x7aaa, 0x81e5, 0x86d9, 0x8778, 0x8a1b, 0x5a49, 0x5b8c, - 0x5b9b, 0x68a1, 0x6900, 0x6d63, 0x73a9, 0x7413, 0x742c, 0x7897, - 0x7de9, 0x7feb, 0x8118, 0x8155, 0x839e, 0x8c4c, 0x962e, 0x9811, - 0x66f0, 0x5f80, 0x65fa, 0x6789, 0x6c6a, 0x738b, 0x502d, 0x5a03, - 0x6b6a, 0x77ee, 0x5916, 0x5d6c, 0x5dcd, 0x7325, 0x754f, 0xf9ba, - 0xf9bb, 0x50e5, 0x51f9, 0x582f, 0x592d, 0x5996, 0x59da, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5be5, 0xf9bc, 0xf9bd, 0x5da2, 0x62d7, 0x6416, 0x6493, - 0x64fe, 0xf9be, 0x66dc, 0xf9bf, 0x6a48, 0xf9c0, 0x71ff, 0x7464, - 0xf9c1, 0x7a88, 0x7aaf, 0x7e47, 0x7e5e, 0x8000, 0x8170, 0xf9c2, - 0x87ef, 0x8981, 0x8b20, 0x9059, 0xf9c3, 0x9080, 0x9952, 0x617e, - 0x6b32, 0x6d74, 0x7e1f, 0x8925, 0x8fb1, 0x4fd1, 0x50ad, 0x5197, - 0x52c7, 0x57c7, 0x5889, 0x5bb9, 0x5eb8, 0x6142, 0x6995, 0x6d8c, - 0x6e67, 0x6eb6, 0x7194, 0x7462, 0x7528, 0x752c, 0x8073, 0x8338, - 0x84c9, 0x8e0a, 0x9394, 0x93de, 0xf9c4, 0x4e8e, 0x4f51, 0x5076, - 0x512a, 0x53c8, 0x53cb, 0x53f3, 0x5b87, 0x5bd3, 0x5c24, 0x611a, - 0x6182, 0x65f4, 0x725b, 0x7397, 0x7440, 0x76c2, 0x7950, 0x7991, - 0x79b9, 0x7d06, 0x7fbd, 0x828b, 0x85d5, 0x865e, 0x8fc2, 0x9047, - 0x90f5, 0x91ea, 0x9685, 0x96e8, 0x96e9, 0x52d6, 0x5f67, 0x65ed, - 0x6631, 0x682f, 0x715c, 0x7a36, 0x90c1, 0x980a, 0x4e91, 0xf9c5, - 0x6a52, 0x6b9e, 0x6f90, 0x7189, 0x8018, 0x82b8, 0x8553, 0x003f, - /* lead byte f0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x904b, 0x9695, 0x96f2, 0x97fb, 0x851a, 0x9b31, 0x4e90, - 0x718a, 0x96c4, 0x5143, 0x539f, 0x54e1, 0x5713, 0x5712, 0x57a3, - 0x5a9b, 0x5ac4, 0x5bc3, 0x6028, 0x613f, 0x63f4, 0x6c85, 0x6d39, - 0x6e72, 0x6e90, 0x7230, 0x733f, 0x7457, 0x82d1, 0x8881, 0x8f45, - 0x9060, 0xf9c6, 0x9662, 0x9858, 0x9d1b, 0x6708, 0x8d8a, 0x925e, - 0x4f4d, 0x5049, 0x50de, 0x5371, 0x570d, 0x59d4, 0x5a01, 0x5c09, - 0x6170, 0x6690, 0x6e2d, 0x7232, 0x744b, 0x7def, 0x80c3, 0x840e, - 0x8466, 0x853f, 0x875f, 0x885b, 0x8918, 0x8b02, 0x9055, 0x97cb, - 0x9b4f, 0x4e73, 0x4f91, 0x5112, 0x516a, 0xf9c7, 0x552f, 0x55a9, - 0x5b7a, 0x5ba5, 0x5e7c, 0x5e7d, 0x5ebe, 0x60a0, 0x60df, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6108, 0x6109, 0x63c4, 0x6538, 0x6709, 0xf9c8, 0x67d4, - 0x67da, 0xf9c9, 0x6961, 0x6962, 0x6cb9, 0x6d27, 0xf9ca, 0x6e38, - 0xf9cb, 0x6fe1, 0x7336, 0x7337, 0xf9cc, 0x745c, 0x7531, 0xf9cd, - 0x7652, 0xf9ce, 0xf9cf, 0x7dad, 0x81fe, 0x8438, 0x88d5, 0x8a98, - 0x8adb, 0x8aed, 0x8e30, 0x8e42, 0x904a, 0x903e, 0x907a, 0x9149, - 0x91c9, 0x936e, 0xf9d0, 0xf9d1, 0x5809, 0xf9d2, 0x6bd3, 0x8089, - 0x80b2, 0xf9d3, 0xf9d4, 0x5141, 0x596b, 0x5c39, 0xf9d5, 0xf9d6, - 0x6f64, 0x73a7, 0x80e4, 0x8d07, 0xf9d7, 0x9217, 0x958f, 0xf9d8, - 0xf9d9, 0xf9da, 0xf9db, 0x807f, 0x620e, 0x701c, 0x7d68, 0x878d, - 0xf9dc, 0x57a0, 0x6069, 0x6147, 0x6bb7, 0x8abe, 0x9280, 0x96b1, - 0x4e59, 0x541f, 0x6deb, 0x852d, 0x9670, 0x97f3, 0x98ee, 0x63d6, - 0x6ce3, 0x9091, 0x51dd, 0x61c9, 0x81ba, 0x9df9, 0x4f9d, 0x501a, - 0x5100, 0x5b9c, 0x610f, 0x61ff, 0x64ec, 0x6905, 0x6bc5, 0x7591, - 0x77e3, 0x7fa9, 0x8264, 0x858f, 0x87fb, 0x8863, 0x8abc, 0x003f, - /* lead byte f1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8b70, 0x91ab, 0x4e8c, 0x4ee5, 0x4f0a, 0xf9dd, 0xf9de, - 0x5937, 0x59e8, 0xf9df, 0x5df2, 0x5f1b, 0x5f5b, 0x6021, 0xf9e0, - 0xf9e1, 0xf9e2, 0xf9e3, 0x723e, 0x73e5, 0xf9e4, 0x7570, 0x75cd, - 0xf9e5, 0x79fb, 0xf9e6, 0x800c, 0x8033, 0x8084, 0x82e1, 0x8351, - 0xf9e7, 0xf9e8, 0x8cbd, 0x8cb3, 0x9087, 0xf9e9, 0xf9ea, 0x98f4, - 0x990c, 0xf9eb, 0xf9ec, 0x7037, 0x76ca, 0x7fca, 0x7fcc, 0x7ffc, - 0x8b1a, 0x4eba, 0x4ec1, 0x5203, 0x5370, 0xf9ed, 0x54bd, 0x56e0, - 0x59fb, 0x5bc5, 0x5f15, 0x5fcd, 0x6e6e, 0xf9ee, 0xf9ef, 0x7d6a, - 0x8335, 0xf9f0, 0x8693, 0x8a8d, 0xf9f1, 0x976d, 0x9777, 0xf9f2, - 0xf9f3, 0x4e00, 0x4f5a, 0x4f7e, 0x58f9, 0x65e5, 0x6ea2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9038, 0x93b0, 0x99b9, 0x4efb, 0x58ec, 0x598a, 0x59d9, - 0x6041, 0xf9f4, 0xf9f5, 0x7a14, 0xf9f6, 0x834f, 0x8cc3, 0x5165, - 0x5344, 0xf9f7, 0xf9f8, 0xf9f9, 0x4ecd, 0x5269, 0x5b55, 0x82bf, - 0x4ed4, 0x523a, 0x54a8, 0x59c9, 0x59ff, 0x5b50, 0x5b57, 0x5b5c, - 0x6063, 0x6148, 0x6ecb, 0x7099, 0x716e, 0x7386, 0x74f7, 0x75b5, - 0x78c1, 0x7d2b, 0x8005, 0x81ea, 0x8328, 0x8517, 0x85c9, 0x8aee, - 0x8cc7, 0x96cc, 0x4f5c, 0x52fa, 0x56bc, 0x65ab, 0x6628, 0x707c, - 0x70b8, 0x7235, 0x7dbd, 0x828d, 0x914c, 0x96c0, 0x9d72, 0x5b71, - 0x68e7, 0x6b98, 0x6f7a, 0x76de, 0x5c91, 0x66ab, 0x6f5b, 0x7bb4, - 0x7c2a, 0x8836, 0x96dc, 0x4e08, 0x4ed7, 0x5320, 0x5834, 0x58bb, - 0x58ef, 0x596c, 0x5c07, 0x5e33, 0x5e84, 0x5f35, 0x638c, 0x66b2, - 0x6756, 0x6a1f, 0x6aa3, 0x6b0c, 0x6f3f, 0x7246, 0xf9fa, 0x7350, - 0x748b, 0x7ae0, 0x7ca7, 0x8178, 0x81df, 0x81e7, 0x838a, 0x846c, - 0x8523, 0x8594, 0x85cf, 0x88dd, 0x8d13, 0x91ac, 0x9577, 0x003f, - /* lead byte f2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x969c, 0x518d, 0x54c9, 0x5728, 0x5bb0, 0x624d, 0x6750, - 0x683d, 0x6893, 0x6e3d, 0x6ed3, 0x707d, 0x7e21, 0x88c1, 0x8ca1, - 0x8f09, 0x9f4b, 0x9f4e, 0x722d, 0x7b8f, 0x8acd, 0x931a, 0x4f47, - 0x4f4e, 0x5132, 0x5480, 0x59d0, 0x5e95, 0x62b5, 0x6775, 0x696e, - 0x6a17, 0x6cae, 0x6e1a, 0x72d9, 0x732a, 0x75bd, 0x7bb8, 0x7d35, - 0x82e7, 0x83f9, 0x8457, 0x85f7, 0x8a5b, 0x8caf, 0x8e87, 0x9019, - 0x90b8, 0x96ce, 0x9f5f, 0x52e3, 0x540a, 0x5ae1, 0x5bc2, 0x6458, - 0x6575, 0x6ef4, 0x72c4, 0xf9fb, 0x7684, 0x7a4d, 0x7b1b, 0x7c4d, - 0x7e3e, 0x7fdf, 0x837b, 0x8b2b, 0x8cca, 0x8d64, 0x8de1, 0x8e5f, - 0x8fea, 0x8ff9, 0x9069, 0x93d1, 0x4f43, 0x4f7a, 0x50b3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5168, 0x5178, 0x524d, 0x526a, 0x5861, 0x587c, 0x5960, - 0x5c08, 0x5c55, 0x5edb, 0x609b, 0x6230, 0x6813, 0x6bbf, 0x6c08, - 0x6fb1, 0x714e, 0x7420, 0x7530, 0x7538, 0x7551, 0x7672, 0x7b4c, - 0x7b8b, 0x7bad, 0x7bc6, 0x7e8f, 0x8a6e, 0x8f3e, 0x8f49, 0x923f, - 0x9293, 0x9322, 0x942b, 0x96fb, 0x985a, 0x986b, 0x991e, 0x5207, - 0x622a, 0x6298, 0x6d59, 0x7664, 0x7aca, 0x7bc0, 0x7d76, 0x5360, - 0x5cbe, 0x5e97, 0x6f38, 0x70b9, 0x7c98, 0x9711, 0x9b8e, 0x9ede, - 0x63a5, 0x647a, 0x8776, 0x4e01, 0x4e95, 0x4ead, 0x505c, 0x5075, - 0x5448, 0x59c3, 0x5b9a, 0x5e40, 0x5ead, 0x5ef7, 0x5f81, 0x60c5, - 0x633a, 0x653f, 0x6574, 0x65cc, 0x6676, 0x6678, 0x67fe, 0x6968, - 0x6a89, 0x6b63, 0x6c40, 0x6dc0, 0x6de8, 0x6e1f, 0x6e5e, 0x701e, - 0x70a1, 0x738e, 0x73fd, 0x753a, 0x775b, 0x7887, 0x798e, 0x7a0b, - 0x7a7d, 0x7cbe, 0x7d8e, 0x8247, 0x8a02, 0x8aea, 0x8c9e, 0x912d, - 0x914a, 0x91d8, 0x9266, 0x92cc, 0x9320, 0x9706, 0x9756, 0x003f, - /* lead byte f3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x975c, 0x9802, 0x9f0e, 0x5236, 0x5291, 0x557c, 0x5824, - 0x5e1d, 0x5f1f, 0x608c, 0x63d0, 0x68af, 0x6fdf, 0x796d, 0x7b2c, - 0x81cd, 0x85ba, 0x88fd, 0x8af8, 0x8e44, 0x918d, 0x9664, 0x969b, - 0x973d, 0x984c, 0x9f4a, 0x4fce, 0x5146, 0x51cb, 0x52a9, 0x5632, - 0x5f14, 0x5f6b, 0x63aa, 0x64cd, 0x65e9, 0x6641, 0x66fa, 0x66f9, - 0x671d, 0x689d, 0x68d7, 0x69fd, 0x6f15, 0x6f6e, 0x7167, 0x71e5, - 0x722a, 0x74aa, 0x773a, 0x7956, 0x795a, 0x79df, 0x7a20, 0x7a95, - 0x7c97, 0x7cdf, 0x7d44, 0x7e70, 0x8087, 0x85fb, 0x86a4, 0x8a54, - 0x8abf, 0x8d99, 0x8e81, 0x9020, 0x906d, 0x91e3, 0x963b, 0x96d5, - 0x9ce5, 0x65cf, 0x7c07, 0x8db3, 0x93c3, 0x5b58, 0x5c0a, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5352, 0x62d9, 0x731d, 0x5027, 0x5b97, 0x5f9e, 0x60b0, - 0x616b, 0x68d5, 0x6dd9, 0x742e, 0x7a2e, 0x7d42, 0x7d9c, 0x7e31, - 0x816b, 0x8e2a, 0x8e35, 0x937e, 0x9418, 0x4f50, 0x5750, 0x5de6, - 0x5ea7, 0x632b, 0x7f6a, 0x4e3b, 0x4f4f, 0x4f8f, 0x505a, 0x59dd, - 0x80c4, 0x546a, 0x5468, 0x55fe, 0x594f, 0x5b99, 0x5dde, 0x5eda, - 0x665d, 0x6731, 0x67f1, 0x682a, 0x6ce8, 0x6d32, 0x6e4a, 0x6f8d, - 0x70b7, 0x73e0, 0x7587, 0x7c4c, 0x7d02, 0x7d2c, 0x7da2, 0x821f, - 0x86db, 0x8a3b, 0x8a85, 0x8d70, 0x8e8a, 0x8f33, 0x9031, 0x914e, - 0x9152, 0x9444, 0x99d0, 0x7af9, 0x7ca5, 0x4fca, 0x5101, 0x51c6, - 0x57c8, 0x5bef, 0x5cfb, 0x6659, 0x6a3d, 0x6d5a, 0x6e96, 0x6fec, - 0x710c, 0x756f, 0x7ae3, 0x8822, 0x9021, 0x9075, 0x96cb, 0x99ff, - 0x8301, 0x4e2d, 0x4ef2, 0x8846, 0x91cd, 0x537d, 0x6adb, 0x696b, - 0x6c41, 0x847a, 0x589e, 0x618e, 0x66fe, 0x62ef, 0x70dd, 0x7511, - 0x75c7, 0x7e52, 0x84b8, 0x8b49, 0x8d08, 0x4e4b, 0x53ea, 0x003f, - /* lead byte f4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x54ab, 0x5730, 0x5740, 0x5fd7, 0x6301, 0x6307, 0x646f, - 0x652f, 0x65e8, 0x667a, 0x679d, 0x67b3, 0x6b62, 0x6c60, 0x6c9a, - 0x6f2c, 0x77e5, 0x7825, 0x7949, 0x7957, 0x7d19, 0x80a2, 0x8102, - 0x81f3, 0x829d, 0x82b7, 0x8718, 0x8a8c, 0xf9fc, 0x8d04, 0x8dbe, - 0x9072, 0x76f4, 0x7a19, 0x7a37, 0x7e54, 0x8077, 0x5507, 0x55d4, - 0x5875, 0x632f, 0x6422, 0x6649, 0x664b, 0x686d, 0x699b, 0x6b84, - 0x6d25, 0x6eb1, 0x73cd, 0x7468, 0x74a1, 0x755b, 0x75b9, 0x76e1, - 0x771e, 0x778b, 0x79e6, 0x7e09, 0x7e1d, 0x81fb, 0x852f, 0x8897, - 0x8a3a, 0x8cd1, 0x8eeb, 0x8fb0, 0x9032, 0x93ad, 0x9663, 0x9673, - 0x9707, 0x4f84, 0x53f1, 0x59ea, 0x5ac9, 0x5e19, 0x684e, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x74c6, 0x75be, 0x79e9, 0x7a92, 0x81a3, 0x86ed, 0x8cea, - 0x8dcc, 0x8fed, 0x659f, 0x6715, 0xf9fd, 0x57f7, 0x6f57, 0x7ddd, - 0x8f2f, 0x93f6, 0x96c6, 0x5fb5, 0x61f2, 0x6f84, 0x4e14, 0x4f98, - 0x501f, 0x53c9, 0x55df, 0x5d6f, 0x5dee, 0x6b21, 0x6b64, 0x78cb, - 0x7b9a, 0xf9fe, 0x8e49, 0x8eca, 0x906e, 0x6349, 0x643e, 0x7740, - 0x7a84, 0x932f, 0x947f, 0x9f6a, 0x64b0, 0x6faf, 0x71e6, 0x74a8, - 0x74da, 0x7ac4, 0x7c12, 0x7e82, 0x7cb2, 0x7e98, 0x8b9a, 0x8d0a, - 0x947d, 0x9910, 0x994c, 0x5239, 0x5bdf, 0x64e6, 0x672d, 0x7d2e, - 0x50ed, 0x53c3, 0x5879, 0x6158, 0x6159, 0x61fa, 0x65ac, 0x7ad9, - 0x8b92, 0x8b96, 0x5009, 0x5021, 0x5275, 0x5531, 0x5a3c, 0x5ee0, - 0x5f70, 0x6134, 0x655e, 0x660c, 0x6636, 0x66a2, 0x69cd, 0x6ec4, - 0x6f32, 0x7316, 0x7621, 0x7a93, 0x8139, 0x8259, 0x83d6, 0x84bc, - 0x50b5, 0x57f0, 0x5bc0, 0x5be8, 0x5f69, 0x63a1, 0x7826, 0x7db5, - 0x83dc, 0x8521, 0x91c7, 0x91f5, 0x518a, 0x67f5, 0x7b56, 0x003f, - /* lead byte f5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8cac, 0x51c4, 0x59bb, 0x60bd, 0x8655, 0x501c, 0xf9ff, - 0x5254, 0x5c3a, 0x617d, 0x621a, 0x62d3, 0x64f2, 0x65a5, 0x6ecc, - 0x7620, 0x810a, 0x8e60, 0x965f, 0x96bb, 0x4edf, 0x5343, 0x5598, - 0x5929, 0x5ddd, 0x64c5, 0x6cc9, 0x6dfa, 0x7394, 0x7a7f, 0x821b, - 0x85a6, 0x8ce4, 0x8e10, 0x9077, 0x91e7, 0x95e1, 0x9621, 0x97c6, - 0x51f8, 0x54f2, 0x5586, 0x5fb9, 0x64a4, 0x6f88, 0x7db4, 0x8f1f, - 0x8f4d, 0x9435, 0x50c9, 0x5c16, 0x6cbe, 0x6dfb, 0x751b, 0x77bb, - 0x7c3d, 0x7c64, 0x8a79, 0x8ac2, 0x581e, 0x59be, 0x5e16, 0x6377, - 0x7252, 0x758a, 0x776b, 0x8adc, 0x8cbc, 0x8f12, 0x5ef3, 0x6674, - 0x6df8, 0x807d, 0x83c1, 0x8acb, 0x9751, 0x9bd6, 0xfa00, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5243, 0x66ff, 0x6d95, 0x6eef, 0x7de0, 0x8ae6, 0x902e, - 0x905e, 0x9ad4, 0x521d, 0x527f, 0x54e8, 0x6194, 0x6284, 0x62db, - 0x68a2, 0x6912, 0x695a, 0x6a35, 0x7092, 0x7126, 0x785d, 0x7901, - 0x790e, 0x79d2, 0x7a0d, 0x8096, 0x8278, 0x82d5, 0x8349, 0x8549, - 0x8c82, 0x8d85, 0x9162, 0x918b, 0x91ae, 0x4fc3, 0x56d1, 0x71ed, - 0x77d7, 0x8700, 0x89f8, 0x5bf8, 0x5fd6, 0x6751, 0x90a8, 0x53e2, - 0x585a, 0x5bf5, 0x60a4, 0x6181, 0x6460, 0x7e3d, 0x8070, 0x8525, - 0x9283, 0x64ae, 0x50ac, 0x5d14, 0x6700, 0x589c, 0x62bd, 0x63a8, - 0x690e, 0x6978, 0x6a1e, 0x6e6b, 0x76ba, 0x79cb, 0x82bb, 0x8429, - 0x8acf, 0x8da8, 0x8ffd, 0x9112, 0x914b, 0x919c, 0x9310, 0x9318, - 0x939a, 0x96db, 0x9a36, 0x9c0d, 0x4e11, 0x755c, 0x795d, 0x7afa, - 0x7b51, 0x7bc9, 0x7e2e, 0x84c4, 0x8e59, 0x8e74, 0x8ef8, 0x9010, - 0x6625, 0x693f, 0x7443, 0x51fa, 0x672e, 0x9edc, 0x5145, 0x5fe0, - 0x6c96, 0x87f2, 0x885d, 0x8877, 0x60b4, 0x81b5, 0x8403, 0x003f, - /* lead byte f6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8d05, 0x53d6, 0x5439, 0x5634, 0x5a36, 0x5c31, 0x708a, - 0x7fe0, 0x805a, 0x8106, 0x81ed, 0x8da3, 0x9189, 0x9a5f, 0x9df2, - 0x5074, 0x4ec4, 0x53a0, 0x60fb, 0x6e2c, 0x5c64, 0x4f88, 0x5024, - 0x55e4, 0x5cd9, 0x5e5f, 0x6065, 0x6894, 0x6cbb, 0x6dc4, 0x71be, - 0x75d4, 0x75f4, 0x7661, 0x7a1a, 0x7a49, 0x7dc7, 0x7dfb, 0x7f6e, - 0x81f4, 0x86a9, 0x8f1c, 0x96c9, 0x99b3, 0x9f52, 0x5247, 0x52c5, - 0x98ed, 0x89aa, 0x4e03, 0x67d2, 0x6f06, 0x4fb5, 0x5be2, 0x6795, - 0x6c88, 0x6d78, 0x741b, 0x7827, 0x91dd, 0x937c, 0x87c4, 0x79e4, - 0x7a31, 0x5feb, 0x4ed6, 0x54a4, 0x553e, 0x58ae, 0x59a5, 0x60f0, - 0x6253, 0x62d6, 0x6736, 0x6955, 0x8235, 0x9640, 0x99b1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x99dd, 0x502c, 0x5353, 0x5544, 0x577c, 0xfa01, 0x6258, - 0xfa02, 0x64e2, 0x666b, 0x67dd, 0x6fc1, 0x6fef, 0x7422, 0x7438, - 0x8a17, 0x9438, 0x5451, 0x5606, 0x5766, 0x5f48, 0x619a, 0x6b4e, - 0x7058, 0x70ad, 0x7dbb, 0x8a95, 0x596a, 0x812b, 0x63a2, 0x7708, - 0x803d, 0x8caa, 0x5854, 0x642d, 0x69bb, 0x5b95, 0x5e11, 0x6e6f, - 0xfa03, 0x8569, 0x514c, 0x53f0, 0x592a, 0x6020, 0x614b, 0x6b86, - 0x6c70, 0x6cf0, 0x7b1e, 0x80ce, 0x82d4, 0x8dc6, 0x90b0, 0x98b1, - 0xfa04, 0x64c7, 0x6fa4, 0x6491, 0x6504, 0x514e, 0x5410, 0x571f, - 0x8a0e, 0x615f, 0x6876, 0xfa05, 0x75db, 0x7b52, 0x7d71, 0x901a, - 0x5806, 0x69cc, 0x817f, 0x892a, 0x9000, 0x9839, 0x5078, 0x5957, - 0x59ac, 0x6295, 0x900f, 0x9b2a, 0x615d, 0x7279, 0x95d6, 0x5761, - 0x5a46, 0x5df4, 0x628a, 0x64ad, 0x64fa, 0x6777, 0x6ce2, 0x6d3e, - 0x722c, 0x7436, 0x7834, 0x7f77, 0x82ad, 0x8ddb, 0x9817, 0x5224, - 0x5742, 0x677f, 0x7248, 0x74e3, 0x8ca9, 0x8fa6, 0x9211, 0x003f, - /* lead byte f7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x962a, 0x516b, 0x53ed, 0x634c, 0x4f69, 0x5504, 0x6096, - 0x6557, 0x6c9b, 0x6d7f, 0x724c, 0x72fd, 0x7a17, 0x8987, 0x8c9d, - 0x5f6d, 0x6f8e, 0x70f9, 0x81a8, 0x610e, 0x4fbf, 0x504f, 0x6241, - 0x7247, 0x7bc7, 0x7de8, 0x7fe9, 0x904d, 0x97ad, 0x9a19, 0x8cb6, - 0x576a, 0x5e73, 0x67b0, 0x840d, 0x8a55, 0x5420, 0x5b16, 0x5e63, - 0x5ee2, 0x5f0a, 0x6583, 0x80ba, 0x853d, 0x9589, 0x965b, 0x4f48, - 0x5305, 0x530d, 0x530f, 0x5486, 0x54fa, 0x5703, 0x5e03, 0x6016, - 0x629b, 0x62b1, 0x6355, 0xfa06, 0x6ce1, 0x6d66, 0x75b1, 0x7832, - 0x80de, 0x812f, 0x82de, 0x8461, 0x84b2, 0x888d, 0x8912, 0x900b, - 0x92ea, 0x98fd, 0x9b91, 0x5e45, 0x66b4, 0x66dd, 0x7011, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7206, 0xfa07, 0x4ff5, 0x527d, 0x5f6a, 0x6153, 0x6753, - 0x6a19, 0x6f02, 0x74e2, 0x7968, 0x8868, 0x8c79, 0x98c7, 0x98c4, - 0x9a43, 0x54c1, 0x7a1f, 0x6953, 0x8af7, 0x8c4a, 0x98a8, 0x99ae, - 0x5f7c, 0x62ab, 0x75b2, 0x76ae, 0x88ab, 0x907f, 0x9642, 0x5339, - 0x5f3c, 0x5fc5, 0x6ccc, 0x73cc, 0x7562, 0x758b, 0x7b46, 0x82fe, - 0x999d, 0x4e4f, 0x903c, 0x4e0b, 0x4f55, 0x53a6, 0x590f, 0x5ec8, - 0x6630, 0x6cb3, 0x7455, 0x8377, 0x8766, 0x8cc0, 0x9050, 0x971e, - 0x9c15, 0x58d1, 0x5b78, 0x8650, 0x8b14, 0x9db4, 0x5bd2, 0x6068, - 0x608d, 0x65f1, 0x6c57, 0x6f22, 0x6fa3, 0x701a, 0x7f55, 0x7ff0, - 0x9591, 0x9592, 0x9650, 0x97d3, 0x5272, 0x8f44, 0x51fd, 0x542b, - 0x54b8, 0x5563, 0x558a, 0x6abb, 0x6db5, 0x7dd8, 0x8266, 0x929c, - 0x9677, 0x9e79, 0x5408, 0x54c8, 0x76d2, 0x86e4, 0x95a4, 0x95d4, - 0x965c, 0x4ea2, 0x4f09, 0x59ee, 0x5ae6, 0x5df7, 0x6052, 0x6297, - 0x676d, 0x6841, 0x6c86, 0x6e2f, 0x7f38, 0x809b, 0x822a, 0x003f, - /* lead byte f8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xfa08, 0xfa09, 0x9805, 0x4ea5, 0x5055, 0x54b3, 0x5793, - 0x595a, 0x5b69, 0x5bb3, 0x61c8, 0x6977, 0x6d77, 0x7023, 0x87f9, - 0x89e3, 0x8a72, 0x8ae7, 0x9082, 0x99ed, 0x9ab8, 0x52be, 0x6838, - 0x5016, 0x5e78, 0x674f, 0x8347, 0x884c, 0x4eab, 0x5411, 0x56ae, - 0x73e6, 0x9115, 0x97ff, 0x9909, 0x9957, 0x9999, 0x5653, 0x589f, - 0x865b, 0x8a31, 0x61b2, 0x6af6, 0x737b, 0x8ed2, 0x6b47, 0x96aa, - 0x9a57, 0x5955, 0x7200, 0x8d6b, 0x9769, 0x4fd4, 0x5cf4, 0x5f26, - 0x61f8, 0x665b, 0x6ceb, 0x70ab, 0x7384, 0x73b9, 0x73fe, 0x7729, - 0x774d, 0x7d43, 0x7d62, 0x7e23, 0x8237, 0x8852, 0xfa0a, 0x8ce2, - 0x9249, 0x986f, 0x5b51, 0x7a74, 0x8840, 0x9801, 0x5acc, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x4fe0, 0x5354, 0x593e, 0x5cfd, 0x633e, 0x6d79, 0x72f9, - 0x8105, 0x8107, 0x83a2, 0x92cf, 0x9830, 0x4ea8, 0x5144, 0x5211, - 0x578b, 0x5f62, 0x6cc2, 0x6ece, 0x7005, 0x7050, 0x70af, 0x7192, - 0x73e9, 0x7469, 0x834a, 0x87a2, 0x8861, 0x9008, 0x90a2, 0x93a3, - 0x99a8, 0x516e, 0x5f57, 0x60e0, 0x6167, 0x66b3, 0x8559, 0x8e4a, - 0x91af, 0x978b, 0x4e4e, 0x4e92, 0x547c, 0x58d5, 0x58fa, 0x597d, - 0x5cb5, 0x5f27, 0x6236, 0x6248, 0x660a, 0x6667, 0x6beb, 0x6d69, - 0x6dcf, 0x6e56, 0x6ef8, 0x6f94, 0x6fe0, 0x6fe9, 0x705d, 0x72d0, - 0x7425, 0x745a, 0x74e0, 0x7693, 0x795c, 0x7cca, 0x7e1e, 0x80e1, - 0x82a6, 0x846b, 0x84bf, 0x864e, 0x865f, 0x8774, 0x8b77, 0x8c6a, - 0x93ac, 0x9800, 0x9865, 0x60d1, 0x6216, 0x9177, 0x5a5a, 0x660f, - 0x6df7, 0x6e3e, 0x743f, 0x9b42, 0x5ffd, 0x60da, 0x7b0f, 0x54c4, - 0x5f18, 0x6c5e, 0x6cd3, 0x6d2a, 0x70d8, 0x7d05, 0x8679, 0x8a0c, - 0x9d3b, 0x5316, 0x548c, 0x5b05, 0x6a3a, 0x706b, 0x7575, 0x003f, - /* lead byte f9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x798d, 0x79be, 0x82b1, 0x83ef, 0x8a71, 0x8b41, 0x8ca8, - 0x9774, 0xfa0b, 0x64f4, 0x652b, 0x78ba, 0x78bb, 0x7a6b, 0x4e38, - 0x559a, 0x5950, 0x5ba6, 0x5e7b, 0x60a3, 0x63db, 0x6b61, 0x6665, - 0x6853, 0x6e19, 0x7165, 0x74b0, 0x7d08, 0x9084, 0x9a69, 0x9c25, - 0x6d3b, 0x6ed1, 0x733e, 0x8c41, 0x95ca, 0x51f0, 0x5e4c, 0x5fa8, - 0x604d, 0x60f6, 0x6130, 0x614c, 0x6643, 0x6644, 0x69a5, 0x6cc1, - 0x6e5f, 0x6ec9, 0x6f62, 0x714c, 0x749c, 0x7687, 0x7bc1, 0x7c27, - 0x8352, 0x8757, 0x9051, 0x968d, 0x9ec3, 0x532f, 0x56de, 0x5efb, - 0x5f8a, 0x6062, 0x6094, 0x61f7, 0x6666, 0x6703, 0x6a9c, 0x6dee, - 0x6fae, 0x7070, 0x736a, 0x7e6a, 0x81be, 0x8334, 0x86d4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8aa8, 0x8cc4, 0x5283, 0x7372, 0x5b96, 0x6a6b, 0x9404, - 0x54ee, 0x5686, 0x5b5d, 0x6548, 0x6585, 0x66c9, 0x689f, 0x6d8d, - 0x6dc6, 0x723b, 0x80b4, 0x9175, 0x9a4d, 0x4faf, 0x5019, 0x539a, - 0x540e, 0x543c, 0x5589, 0x55c5, 0x5e3f, 0x5f8c, 0x673d, 0x7166, - 0x73dd, 0x9005, 0x52db, 0x52f3, 0x5864, 0x58ce, 0x7104, 0x718f, - 0x71fb, 0x85b0, 0x8a13, 0x6688, 0x85a8, 0x55a7, 0x6684, 0x714a, - 0x8431, 0x5349, 0x5599, 0x6bc1, 0x5f59, 0x5fbd, 0x63ee, 0x6689, - 0x7147, 0x8af1, 0x8f1d, 0x9ebe, 0x4f11, 0x643a, 0x70cb, 0x7566, - 0x8667, 0x6064, 0x8b4e, 0x9df8, 0x5147, 0x51f6, 0x5308, 0x6d36, - 0x80f8, 0x9ed1, 0x6615, 0x6b23, 0x7098, 0x75d5, 0x5403, 0x5c79, - 0x7d07, 0x8a16, 0x6b20, 0x6b3d, 0x6b46, 0x5438, 0x6070, 0x6d3d, - 0x7fd5, 0x8208, 0x50d6, 0x51de, 0x559c, 0x566b, 0x56cd, 0x59ec, - 0x5b09, 0x5e0c, 0x6199, 0x6198, 0x6231, 0x665e, 0x66e6, 0x7199, - 0x71b9, 0x71ba, 0x72a7, 0x79a7, 0x7a00, 0x7fb2, 0x8a70, 0x003f -}; - -static const unsigned char cp2uni_leadbytes[256] = -{ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 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, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x00, - 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, - 0x5f, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, - 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, - 0x6f, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; - -static const unsigned short uni2cp_low[39424] = -{ - /* 0x0000 .. 0x00ff */ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x003f, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x0080, 0x0081, 0x0082, 0x0083, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x0020, 0xd9ae, 0x0063, 0x004c, 0xd9b4, 0x0059, 0x007c, 0xd967, - 0xd937, 0x0063, 0xdca3, 0xd946, 0x003f, 0xd939, 0x0072, 0xd93a, - 0xd956, 0xd94e, 0xdd99, 0xdd9a, 0xd9a5, 0xdb7c, 0xd9d2, 0xd934, - 0xd9ac, 0xdd98, 0xdcac, 0xd947, 0xdcf9, 0xdcf6, 0xdcfa, 0xd9af, - 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0xdca1, 0x0043, - 0x0045, 0x0045, 0x0045, 0x0045, 0x0049, 0x0049, 0x0049, 0x0049, - 0xdca2, 0x004e, 0x004f, 0x004f, 0x004f, 0x004f, 0x004f, 0xd94f, - 0xdcaa, 0x0055, 0x0055, 0x0055, 0x0055, 0x0059, 0xdcad, 0xdd3c, - 0x0061, 0x0061, 0x0061, 0x0061, 0x0061, 0x0061, 0xdd31, 0x0063, - 0x0065, 0x0065, 0x0065, 0x0065, 0x0069, 0x0069, 0x0069, 0x0069, - 0xdd33, 0x006e, 0x006f, 0x006f, 0x006f, 0x006f, 0x006f, 0xd950, - 0xdd3a, 0x0075, 0x0075, 0x0075, 0x0075, 0x0079, 0xdd3d, 0x0079, - /* 0x0100 .. 0x01ff */ - 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, 0x0043, 0x0063, - 0x0043, 0x0063, 0x0043, 0x0063, 0x0043, 0x0063, 0x0044, 0x0064, - 0xdca2, 0xdd32, 0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065, - 0x0045, 0x0065, 0x0045, 0x0065, 0x0047, 0x0067, 0x0047, 0x0067, - 0x0047, 0x0067, 0x0047, 0x0067, 0x0048, 0x0068, 0xdca4, 0xdd34, - 0x0049, 0x0069, 0x0049, 0x0069, 0x0049, 0x0069, 0x0049, 0x0069, - 0x0049, 0xdd35, 0xdca6, 0xdd36, 0x004a, 0x006a, 0x004b, 0x006b, - 0xdd37, 0x004c, 0x006c, 0x004c, 0x006c, 0x004c, 0x006c, 0xdca8, - 0xdd38, 0xdca9, 0xdd39, 0x004e, 0x006e, 0x004e, 0x006e, 0x004e, - 0x006e, 0xdd40, 0xdcaf, 0xdd3f, 0x004f, 0x006f, 0x004f, 0x006f, - 0x004f, 0x006f, 0xdcab, 0xdd3b, 0x0052, 0x0072, 0x0052, 0x0072, - 0x0052, 0x0072, 0x0053, 0x0073, 0x0053, 0x0073, 0x0053, 0x0073, - 0x0053, 0x0073, 0x0054, 0x0074, 0x0054, 0x0074, 0xdcae, 0xdd3e, - 0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075, - 0x0055, 0x0075, 0x0055, 0x0075, 0x0057, 0x0077, 0x0059, 0x0079, - 0x0059, 0x005a, 0x007a, 0x005a, 0x007a, 0x005a, 0x007a, 0x0073, - 0x0062, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdca2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x0045, 0x0046, 0x0066, 0x003f, 0x003f, 0x003f, 0x003f, 0x0049, - 0x003f, 0x003f, 0x006c, 0x003f, 0x003f, 0x003f, 0x003f, 0x004f, - 0x004f, 0x006f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x0074, 0x003f, 0x003f, 0x0054, 0x0055, - 0x0075, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x007a, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdba2, 0x003f, 0x003f, 0x0021, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0041, 0x0061, 0x0049, - 0x0069, 0x004f, 0x006f, 0x0055, 0x0075, 0x0055, 0x0075, 0x0055, - 0x0075, 0x0055, 0x0075, 0x0055, 0x0075, 0x003f, 0x0041, 0x0061, - 0x0041, 0x0061, 0xdca1, 0xdd31, 0x0047, 0x0067, 0x0047, 0x0067, - 0x004b, 0x006b, 0x004f, 0x006f, 0x004f, 0x006f, 0x003f, 0x003f, - 0x006a, 0x003f, 0x003f, 0x003f, 0x0047, 0x0067, 0x003f, 0x003f, - 0x004e, 0x006e, 0x0041, 0x0061, 0xdca1, 0xdd31, 0xdcaa, 0xdd3a, - /* 0x0200 .. 0x02ff */ - 0x0041, 0x0061, 0x0041, 0x0061, 0x0045, 0x0065, 0x0045, 0x0065, - 0x0049, 0x0069, 0x0049, 0x0069, 0x004f, 0x006f, 0x004f, 0x006f, - 0x0052, 0x0072, 0x0052, 0x0072, 0x0055, 0x0075, 0x0055, 0x0075, - 0x0053, 0x0073, 0x0054, 0x0074, 0x003f, 0x003f, 0x0048, 0x0068, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0041, 0x0061, - 0x0045, 0x0065, 0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f, - 0x004f, 0x006f, 0x0059, 0x0079, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x0067, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x0068, 0x003f, 0x006a, 0x0072, 0x003f, 0x003f, 0x003f, 0x0077, - 0x0079, 0xd9a5, 0xd9a9, 0xd93e, 0xd93f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x005e, 0x003f, 0x005e, 0xd9a7, - 0x0027, 0xd93a, 0xd9a5, 0x0060, 0x003f, 0x005f, 0x003f, 0x003f, - 0xd9b0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd9a8, 0xd9ab, 0xd9aa, 0xd9ad, 0x007e, 0xd9a9, 0x003f, 0x003f, - 0x003f, 0x006c, 0x0073, 0x0078, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x0300 .. 0x03ff */ - 0x0060, 0xd9a5, 0x005e, 0x007e, 0xd93a, 0xd93a, 0xd9a8, 0xd9ab, - 0xd937, 0x003f, 0xd9aa, 0xd9a9, 0xd9a7, 0x003f, 0x0022, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9ac, - 0xd9ad, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x005f, 0x005f, 0x005f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x0060, 0xd9a5, 0x003f, 0x003f, 0xd937, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd9a5, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003b, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd9a5, 0xd937, 0xdb51, 0xd934, - 0xdb55, 0xdb57, 0xdb59, 0x003f, 0xdb5f, 0x003f, 0xdb64, 0xdb68, - 0xdb79, 0xdb51, 0xdb52, 0xdb53, 0xdb54, 0xdb55, 0xdb56, 0xdb57, - 0xdb58, 0xdb59, 0xdb5a, 0xdb5b, 0xdb5c, 0xdb5d, 0xdb5e, 0xdb5f, - 0xdb60, 0xdb61, 0x003f, 0xdb62, 0xdb63, 0xdb64, 0xdb65, 0xdb66, - 0xdb67, 0xdb68, 0xdb59, 0xdb64, 0xdb71, 0xdb75, 0xdb77, 0xdb79, - 0xdb96, 0xdb71, 0xdb72, 0xdb73, 0xdb74, 0xdb75, 0xdb76, 0xdb77, - 0xdb78, 0xdb79, 0xdb7a, 0xdb7b, 0xdb7c, 0xdb7d, 0xdb7e, 0xdb91, - 0xdb92, 0xdb93, 0x003f, 0xdb94, 0xdb95, 0xdb96, 0xdb97, 0xdb98, - 0xdb99, 0xdb9a, 0xdb79, 0xdb96, 0xdb91, 0xdb96, 0xdb9a, 0x003f, - 0xdb72, 0xdb78, 0xdb64, 0xdb64, 0xdb64, 0xdb97, 0xdb92, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdb7a, 0xdb93, 0x003f, 0x003f, 0xdb58, 0xdb75, 0x003f, 0x003f, - 0x003f, 0xdb62, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x0400 .. 0x04ff */ - 0xdea6, 0xdea7, 0x003f, 0xdea4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdeac, 0xdeaa, 0xdeb5, 0x003f, - 0xdea1, 0xdea2, 0xdea3, 0xdea4, 0xdea5, 0xdea6, 0xdea8, 0xdea9, - 0xdeaa, 0xdeab, 0xdeac, 0xdead, 0xdeae, 0xdeaf, 0xdeb0, 0xdeb1, - 0xdeb2, 0xdeb3, 0xdeb4, 0xdeb5, 0xdeb6, 0xdeb7, 0xdeb8, 0xdeb9, - 0xdeba, 0xdebb, 0xdebc, 0xdebd, 0xdebe, 0xdebf, 0xdec0, 0xdec1, - 0xded1, 0xded2, 0xded3, 0xded4, 0xded5, 0xded6, 0xded8, 0xded9, - 0xdeda, 0xdedb, 0xdedc, 0xdedd, 0xdede, 0xdedf, 0xdee0, 0xdee1, - 0xdee2, 0xdee3, 0xdee4, 0xdee5, 0xdee6, 0xdee7, 0xdee8, 0xdee9, - 0xdeea, 0xdeeb, 0xdeec, 0xdeed, 0xdeee, 0xdeef, 0xdef0, 0xdef1, - 0xded6, 0xded7, 0x003f, 0xded4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdedc, 0xdeda, 0xdee5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdea8, 0xded8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdea1, 0xded1, 0xdea1, 0xded1, 0x003f, 0x003f, 0xdea6, 0xded6, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdea8, 0xded8, 0xdea9, 0xded9, - 0x003f, 0x003f, 0xdeaa, 0xdeda, 0xdeaa, 0xdeda, 0xdeb0, 0xdee0, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdebf, 0xdeef, 0xdeb5, 0xdee5, - 0xdeb5, 0xdee5, 0xdeb5, 0xdee5, 0xdeb9, 0xdee9, 0x003f, 0x003f, - 0xdebd, 0xdeed, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x1d00 .. 0x1dff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x0041, 0xdca1, 0x0042, 0x003f, - 0x0044, 0x0045, 0x003f, 0x0047, 0x0048, 0x0049, 0x004a, 0x004b, - 0x004c, 0x004d, 0x004e, 0x003f, 0x004f, 0x003f, 0x0050, 0x0052, - 0x0054, 0x0055, 0x0057, 0x0061, 0x003f, 0x003f, 0x003f, 0x0062, - 0x0064, 0x0065, 0x003f, 0x003f, 0x003f, 0x0067, 0x003f, 0x006b, - 0x006d, 0xdd3f, 0x006f, 0x003f, 0x003f, 0x003f, 0x0070, 0x0074, - 0x0075, 0x003f, 0x003f, 0x0076, 0x003f, 0xdb72, 0xdb73, 0xdb74, - 0xdb97, 0xdb98, 0x0069, 0x0072, 0x0075, 0x0076, 0xdb72, 0xdb73, - 0xdb93, 0xdb97, 0xdb98, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdedf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x0063, 0x003f, 0xdd33, 0x003f, - 0x0066, 0x003f, 0x0067, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0074, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x007a, 0x003f, 0x003f, 0x003f, 0xdb78, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x1e00 .. 0x1eff */ - 0x0041, 0x0061, 0x0042, 0x0062, 0x0042, 0x0062, 0x0042, 0x0062, - 0x0043, 0x0063, 0x0044, 0x0064, 0x0044, 0x0064, 0x0044, 0x0064, - 0x0044, 0x0064, 0x0044, 0x0064, 0x0045, 0x0065, 0x0045, 0x0065, - 0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065, 0x0046, 0x0066, - 0x0047, 0x0067, 0x0048, 0x0068, 0x0048, 0x0068, 0x0048, 0x0068, - 0x0048, 0x0068, 0x0048, 0x0068, 0x0049, 0x0069, 0x0049, 0x0069, - 0x004b, 0x006b, 0x004b, 0x006b, 0x004b, 0x006b, 0x004c, 0x006c, - 0x004c, 0x006c, 0x004c, 0x006c, 0x004c, 0x006c, 0x004d, 0x006d, - 0x004d, 0x006d, 0x004d, 0x006d, 0x004e, 0x006e, 0x004e, 0x006e, - 0x004e, 0x006e, 0x004e, 0x006e, 0x004f, 0x006f, 0x004f, 0x006f, - 0x004f, 0x006f, 0x004f, 0x006f, 0x0050, 0x0070, 0x0050, 0x0070, - 0x0052, 0x0072, 0x0052, 0x0072, 0x0052, 0x0072, 0x0052, 0x0072, - 0x0053, 0x0073, 0x0053, 0x0073, 0x0053, 0x0073, 0x0053, 0x0073, - 0x0053, 0x0073, 0x0054, 0x0074, 0x0054, 0x0074, 0x0054, 0x0074, - 0x0054, 0x0074, 0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075, - 0x0055, 0x0075, 0x0055, 0x0075, 0x0056, 0x0076, 0x0056, 0x0076, - 0x0057, 0x0077, 0x0057, 0x0077, 0x0057, 0x0077, 0x0057, 0x0077, - 0x0057, 0x0077, 0x0058, 0x0078, 0x0058, 0x0078, 0x0059, 0x0079, - 0x005a, 0x007a, 0x005a, 0x007a, 0x005a, 0x007a, 0x0068, 0x0074, - 0x0077, 0x0079, 0x003f, 0x0073, 0x003f, 0x003f, 0x003f, 0x003f, - 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, - 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, - 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, - 0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065, - 0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065, - 0x0049, 0x0069, 0x0049, 0x0069, 0x004f, 0x006f, 0x004f, 0x006f, - 0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f, - 0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f, - 0x004f, 0x006f, 0x004f, 0x006f, 0x0055, 0x0075, 0x0055, 0x0075, - 0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075, - 0x0055, 0x0075, 0x0059, 0x0079, 0x0059, 0x0079, 0x0059, 0x0079, - 0x0059, 0x0079, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x1f00 .. 0x1fff */ - 0xdb71, 0xdb71, 0xdb71, 0xdb71, 0xdb71, 0xdb71, 0xdb71, 0xdb71, - 0xdb51, 0xdb51, 0xdb51, 0xdb51, 0xdb51, 0xdb51, 0xdb51, 0xdb51, - 0xdb75, 0xdb75, 0xdb75, 0xdb75, 0xdb75, 0xdb75, 0x003f, 0x003f, - 0xdb55, 0xdb55, 0xdb55, 0xdb55, 0xdb55, 0xdb55, 0x003f, 0x003f, - 0xdb77, 0xdb77, 0xdb77, 0xdb77, 0xdb77, 0xdb77, 0xdb77, 0xdb77, - 0xdb57, 0xdb57, 0xdb57, 0xdb57, 0xdb57, 0xdb57, 0xdb57, 0xdb57, - 0xdb79, 0xdb79, 0xdb79, 0xdb79, 0xdb79, 0xdb79, 0xdb79, 0xdb79, - 0xdb59, 0xdb59, 0xdb59, 0xdb59, 0xdb59, 0xdb59, 0xdb59, 0xdb59, - 0xdb91, 0xdb91, 0xdb91, 0xdb91, 0xdb91, 0xdb91, 0x003f, 0x003f, - 0xdb5f, 0xdb5f, 0xdb5f, 0xdb5f, 0xdb5f, 0xdb5f, 0x003f, 0x003f, - 0xdb96, 0xdb96, 0xdb96, 0xdb96, 0xdb96, 0xdb96, 0xdb96, 0xdb96, - 0x003f, 0xdb64, 0x003f, 0xdb64, 0x003f, 0xdb64, 0x003f, 0xdb64, - 0xdb9a, 0xdb9a, 0xdb9a, 0xdb9a, 0xdb9a, 0xdb9a, 0xdb9a, 0xdb9a, - 0xdb68, 0xdb68, 0xdb68, 0xdb68, 0xdb68, 0xdb68, 0xdb68, 0xdb68, - 0xdb71, 0xdb71, 0xdb75, 0xdb75, 0xdb77, 0xdb77, 0xdb79, 0xdb79, - 0xdb91, 0xdb91, 0xdb96, 0xdb96, 0xdb9a, 0xdb9a, 0x003f, 0x003f, - 0xdb71, 0xdb71, 0xdb71, 0xdb71, 0xdb71, 0xdb71, 0xdb71, 0xdb71, - 0xdb51, 0xdb51, 0xdb51, 0xdb51, 0xdb51, 0xdb51, 0xdb51, 0xdb51, - 0xdb77, 0xdb77, 0xdb77, 0xdb77, 0xdb77, 0xdb77, 0xdb77, 0xdb77, - 0xdb57, 0xdb57, 0xdb57, 0xdb57, 0xdb57, 0xdb57, 0xdb57, 0xdb57, - 0xdb9a, 0xdb9a, 0xdb9a, 0xdb9a, 0xdb9a, 0xdb9a, 0xdb9a, 0xdb9a, - 0xdb68, 0xdb68, 0xdb68, 0xdb68, 0xdb68, 0xdb68, 0xdb68, 0xdb68, - 0xdb71, 0xdb71, 0xdb71, 0xdb71, 0xdb71, 0x003f, 0xdb71, 0xdb71, - 0xdb51, 0xdb51, 0xdb51, 0xdb51, 0xdb51, 0x003f, 0xdb79, 0x003f, - 0x003f, 0xd937, 0xdb77, 0xdb77, 0xdb77, 0x003f, 0xdb77, 0xdb77, - 0xdb55, 0xdb55, 0xdb57, 0xdb57, 0xdb57, 0x003f, 0x003f, 0x003f, - 0xdb79, 0xdb79, 0xdb79, 0xdb79, 0x003f, 0x003f, 0xdb79, 0xdb79, - 0xdb59, 0xdb59, 0xdb59, 0xdb59, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdb96, 0xdb96, 0xdb96, 0xdb96, 0xdb93, 0xdb93, 0xdb96, 0xdb96, - 0xdb64, 0xdb64, 0xdb64, 0xdb64, 0xdb61, 0xd937, 0xd937, 0x0060, - 0x003f, 0x003f, 0xdb9a, 0xdb9a, 0xdb9a, 0x003f, 0xdb9a, 0xdb9a, - 0xdb5f, 0xdb5f, 0xdb68, 0xdb68, 0xdb68, 0xd9a5, 0x003f, 0x003f, - /* 0x2000 .. 0x20ff */ - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - 0x0020, 0x0020, 0x0020, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x002d, 0x002d, 0x003f, 0xd93a, 0xd93a, 0xd93a, 0x003f, 0x005f, - 0xd93e, 0xd93f, 0x002c, 0xd93e, 0xd940, 0xd941, 0x002c, 0x003f, - 0xd9d3, 0xd9d4, 0x003f, 0x003f, 0x002e, 0xd935, 0xd936, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0020, - 0xd9b6, 0x003f, 0xd957, 0xd958, 0x003f, 0xd93e, 0x003f, 0x003f, - 0x003f, 0xd944, 0xd945, 0xd968, 0x0021, 0x003f, 0xd93a, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x002f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0020, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd9aa, 0x0069, 0x003f, 0x003f, 0xdd9b, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x002b, 0x002d, 0x003d, 0x0028, 0x0029, 0xdd9c, - 0x0030, 0xdd9d, 0xdd9e, 0xdd9f, 0xdda0, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x002b, 0x002d, 0x003d, 0x0028, 0x0029, 0x003f, - 0x0061, 0x0065, 0x006f, 0x0078, 0x003f, 0x0068, 0x006b, 0x006c, - 0x006d, 0x006e, 0x0070, 0x0073, 0x0074, 0x003f, 0x003f, 0x003f, - 0x003f, 0x0063, 0x003f, 0x003f, 0x004c, 0x003f, 0x003f, 0x003f, - 0x003f, 0x005c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2100 .. 0x21ff */ - 0x003f, 0x003f, 0x0043, 0xd959, 0x003f, 0x003f, 0x003f, 0x0045, - 0x003f, 0xd9b5, 0x0067, 0x0048, 0x0048, 0x0048, 0x0068, 0xdd34, - 0x0049, 0x0049, 0x004c, 0xdc34, 0x003f, 0x004e, 0xd9e0, 0x003f, - 0x0050, 0x0050, 0x0051, 0x0052, 0x0052, 0x0052, 0x003f, 0x003f, - 0x003f, 0xd9e5, 0xd9e2, 0x003f, 0x005a, 0x003f, 0xdc69, 0x003f, - 0x005a, 0x003f, 0x004b, 0xd95a, 0x0042, 0x0043, 0x0065, 0x0065, - 0x0045, 0x0046, 0x003f, 0x004d, 0x006f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x0069, 0x003f, 0x003f, 0xdb92, 0xdb73, 0xdb53, 0xdb60, - 0xd9b2, 0x003f, 0x003f, 0x003f, 0x003f, 0x0044, 0x0064, 0x0065, - 0x0069, 0x006a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdcf7, 0xdcf8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdcfb, 0xdcfc, 0xdcfd, 0xdcfe, 0x003f, - 0xdb40, 0xdb41, 0xdb42, 0xdb43, 0xdb44, 0xdb45, 0xdb46, 0xdb47, - 0xdb48, 0xdb49, 0x003f, 0x003f, 0x004c, 0x0043, 0x0044, 0x004d, - 0xdb31, 0xdb32, 0xdb33, 0xdb34, 0xdb35, 0xdb36, 0xdb37, 0xdb38, - 0xdb39, 0xdb3a, 0x003f, 0x003f, 0x006c, 0x0063, 0x0064, 0x006d, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd977, 0xd978, 0xd976, 0xd979, 0xd97a, 0xd9d5, 0xd9d8, 0xd9d6, - 0xd9d9, 0xd9d7, 0xd977, 0xd976, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd97a, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9a2, 0xd9a1, - 0x003f, 0x003f, 0xd9a1, 0x003f, 0xd9a2, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2200 .. 0x22ff */ - 0xd9a3, 0x003f, 0xd963, 0xd9a4, 0xd9a4, 0xdcaa, 0x003f, 0xd964, - 0xd996, 0xd996, 0x003f, 0xd997, 0xd997, 0x003f, 0x003f, 0xd9b3, - 0x003f, 0xd9b2, 0x002d, 0xd94e, 0x003f, 0x002f, 0x003f, 0x002a, - 0xd9aa, 0x003f, 0xd97e, 0x003f, 0x003f, 0xd992, 0xd954, 0x004c, - 0xd960, 0x003f, 0x003f, 0x007c, 0x007c, 0xd93b, 0xd93b, 0xd99e, - 0xd99f, 0xd99d, 0xd99c, 0xd994, 0xd995, 0x003f, 0xd9b1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd955, 0xd993, 0x003a, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd93d, 0xd991, 0x003f, 0x003f, - 0x003f, 0xd93d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x007e, 0x007e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd966, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd951, 0xd965, 0xd965, 0xd965, 0xd952, 0xd953, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd97c, 0xd97d, 0x003f, 0x003f, 0x003c, 0x003e, - 0xd952, 0xd953, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd99a, 0xd99b, 0xd99a, 0xd99b, 0xd998, 0xd999, - 0xd998, 0xd999, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd9c1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd961, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd934, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2300 .. 0x23ff */ - 0x003f, 0x003f, 0x003f, 0x005e, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd962, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd944, 0xd945, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2400 .. 0x24ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdce7, 0xdce8, 0xdce9, 0xdcea, 0xdceb, 0xdcec, 0xdced, 0xdcee, - 0xdcef, 0xdcf0, 0xdcf1, 0xdcf2, 0xdcf3, 0xdcf4, 0xdcf5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdd77, 0xdd78, 0xdd79, 0xdd7a, - 0xdd7b, 0xdd7c, 0xdd7d, 0xdd7e, 0xdd91, 0xdd92, 0xdd93, 0xdd94, - 0xdd95, 0xdd96, 0xdd97, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdd5d, 0xdd5e, 0xdd5f, 0xdd60, - 0xdd61, 0xdd62, 0xdd63, 0xdd64, 0xdd65, 0xdd66, 0xdd67, 0xdd68, - 0xdd69, 0xdd6a, 0xdd6b, 0xdd6c, 0xdd6d, 0xdd6e, 0xdd6f, 0xdd70, - 0xdd71, 0xdd72, 0xdd73, 0xdd74, 0xdd75, 0xdd76, 0x0041, 0x0042, - 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004a, - 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, 0x0050, 0x0051, 0x0052, - 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, - 0xdccd, 0xdcce, 0xdccf, 0xdcd0, 0xdcd1, 0xdcd2, 0xdcd3, 0xdcd4, - 0xdcd5, 0xdcd6, 0xdcd7, 0xdcd8, 0xdcd9, 0xdcda, 0xdcdb, 0xdcdc, - 0xdcdd, 0xdcde, 0xdcdf, 0xdce0, 0xdce1, 0xdce2, 0xdce3, 0xdce4, - 0xdce5, 0xdce6, 0x0030, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2500 .. 0x25ff */ - 0xdba1, 0xdbac, 0xdba2, 0xdbad, 0x002d, 0x002d, 0x007c, 0x007c, - 0x002d, 0x002d, 0x007c, 0x007c, 0xdba3, 0xdbc8, 0xdbc7, 0xdbae, - 0xdba4, 0xdbc2, 0xdbc1, 0xdbaf, 0xdba6, 0xdbc6, 0xdbc5, 0xdbb1, - 0xdba5, 0xdbc4, 0xdbc3, 0xdbb0, 0xdba7, 0xdbbc, 0xdbc9, 0xdbca, - 0xdbb7, 0xdbcb, 0xdbcc, 0xdbb2, 0xdba9, 0xdbbe, 0xdbcd, 0xdbce, - 0xdbb9, 0xdbcf, 0xdbd0, 0xdbb4, 0xdba8, 0xdbd1, 0xdbd2, 0xdbb8, - 0xdbbd, 0xdbd3, 0xdbd4, 0xdbb3, 0xdbaa, 0xdbd5, 0xdbd6, 0xdbba, - 0xdbbf, 0xdbd7, 0xdbd8, 0xdbb5, 0xdbab, 0xdbd9, 0xdbda, 0xdbbb, - 0xdbdb, 0xdbdc, 0xdbc0, 0xdbdd, 0xdbde, 0xdbdf, 0xdbe0, 0xdbe1, - 0xdbe2, 0xdbe3, 0xdbe4, 0xdbb6, 0x002d, 0x002d, 0x007c, 0x007c, - 0x003d, 0x007c, 0x002b, 0x002b, 0x002b, 0x003f, 0x003f, 0x003f, - 0x004c, 0x004c, 0x004c, 0x002b, 0x002b, 0x002b, 0x002b, 0x002b, - 0x002b, 0x002b, 0x002b, 0x002b, 0x0054, 0x0054, 0x0054, 0x002b, - 0x002b, 0x002b, 0x002b, 0x002b, 0x002b, 0x003f, 0x003f, 0x003f, - 0x003f, 0x002f, 0x003f, 0x0058, 0x002d, 0x007c, 0x002d, 0x007c, - 0x002d, 0x007c, 0x002d, 0x007c, 0x002d, 0x007c, 0x002d, 0x007c, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd9c6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd971, 0xd970, 0x003f, 0xd9c3, 0xd9c7, 0xd9c8, 0xd9cb, 0xd9ca, - 0xd9c9, 0xd9cc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd973, 0xd972, 0x003f, 0x003f, 0xd9ba, 0xd9b9, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd975, 0xd974, 0x003f, 0x003f, - 0xd9b8, 0xd9b7, 0x003f, 0x003f, 0x003f, 0x003f, 0xd96f, 0xd96e, - 0xd9c2, 0x003f, 0x003f, 0xd96b, 0x003f, 0x003f, 0xd96d, 0xd96c, - 0xd9c4, 0xd9c5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd96b, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2600 .. 0x26ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd96a, 0xd969, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9cf, 0xd9ce, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd9d0, 0x003f, 0xd9d1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd95f, 0x003f, 0xd95e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd9bc, 0xd9bd, 0x003f, 0xd9c0, 0xd9bb, 0xd9be, 0x003f, 0xd9bf, - 0xd9cd, 0xd9db, 0xd9dc, 0x003f, 0xd9dd, 0xd9da, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2c00 .. 0x2cff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x006a, 0x0056, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2e00 .. 0x2eff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7bd, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2f00 .. 0x2fff */ - 0xf179, 0x003f, 0x003f, 0x003f, 0xf0e0, 0x003f, 0xf133, 0x003f, - 0xf161, 0x003f, 0xf19f, 0xf732, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe4ef, 0xe5f4, 0x003f, 0xe9e2, 0x003f, 0x003f, 0xed38, - 0xe964, 0x003f, 0x003f, 0x003f, 0xefd1, 0xe2a2, 0x003f, 0xf6cf, - 0xea5d, 0x003f, 0x003f, 0xeb3a, 0xe4de, 0xe443, 0xf1ad, 0x003f, - 0xf5bb, 0xebb3, 0x003f, 0xecb9, 0x003f, 0xeaa3, 0x003f, 0xe1ef, - 0xe39b, 0xe0ee, 0xe05e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe2e1, 0x003f, 0x003f, 0x003f, 0xecfd, 0xe1fc, 0xf8c2, 0xec32, - 0xf438, 0x003f, 0xe7fe, 0xe570, 0xe355, 0xe8b0, 0xe7e9, 0xf17d, - 0xef68, 0xf055, 0xe7ca, 0xf9e2, 0xf43d, 0x003f, 0x003f, 0xe7ec, - 0xe9ef, 0xe7be, 0xed3b, 0x003f, 0xec39, 0xf8fd, 0xf360, 0xe9ab, - 0xf9a1, 0x003f, 0xf748, 0xed43, 0xefda, 0xe143, 0xf86c, 0xef3c, - 0xe1fe, 0xef4f, 0xe098, 0xeae6, 0xefc4, 0xf2a3, 0xf7b5, 0x003f, - 0x003f, 0xe8dc, 0xf7ab, 0xe7a9, 0xe7cd, 0xe7c3, 0xecc5, 0xeb44, - 0xecc6, 0x003f, 0xf932, 0xf87b, 0xe731, 0xf3d3, 0xe847, 0x003f, - 0xe9ae, 0x003f, 0xedcf, 0xefe2, 0xe665, 0xf14b, 0x003f, 0xf14c, - 0xf0d3, 0xf0bf, 0xeced, 0xf1bb, 0xf448, 0xe2bf, 0xeb6f, 0xf54f, - 0xf3c7, 0xe06d, 0xeae4, 0xf5ac, 0x003f, 0x003f, 0xf87c, 0xf84c, - 0xf0fd, 0x003f, 0xe148, 0xe057, 0xedeb, 0xe1db, 0xe577, 0xecce, - 0x003f, 0xf73f, 0xf275, 0xf3cb, 0xf37b, 0xecf3, 0xf4b3, 0xecf4, - 0xf473, 0x003f, 0xf0e9, 0xf0b7, 0x003f, 0xe6ec, 0xe3d1, 0xf1fe, - 0xe836, 0xe9bd, 0x003f, 0x003f, 0xefeb, 0xf57c, 0xea3a, 0xe79e, - 0xf864, 0xf06f, 0x003f, 0xf0e5, 0xf87d, 0xf7a6, 0xea3b, 0xecdd, - 0xec5f, 0xf855, 0xe739, 0xe1e9, 0xe1d4, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe331, 0xede0, 0xf378, 0xe66d, 0xe673, 0xe77a, 0xe73b, - 0xf96c, 0xeb38, 0xf9d9, 0x003f, 0x003f, 0xf333, 0xe1d5, 0xeb39, - 0xea3c, 0xf34a, 0xf65d, 0xe6a3, 0xe2cf, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x3000 .. 0x30ff */ - 0xd931, 0xd932, 0xd933, 0xd938, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd944, 0xd945, 0xd946, 0xd947, 0xd948, 0xd949, 0xd94a, 0xd94b, - 0xd94c, 0xd94d, 0x003f, 0xd97b, 0xd942, 0xd943, 0x003f, 0x003f, - 0x003f, 0x003f, 0x005b, 0x005d, 0x003f, 0xd940, 0xd941, 0x002c, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xed38, 0xf1a0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdda1, 0xdda2, 0xdda3, 0xdda4, 0xdda5, 0xdda6, 0xdda7, - 0xdda8, 0xdda9, 0xddaa, 0xddab, 0xddac, 0xddad, 0xddae, 0xddaf, - 0xddb0, 0xddb1, 0xddb2, 0xddb3, 0xddb4, 0xddb5, 0xddb6, 0xddb7, - 0xddb8, 0xddb9, 0xddba, 0xddbb, 0xddbc, 0xddbd, 0xddbe, 0xddbf, - 0xddc0, 0xddc1, 0xddc2, 0xddc3, 0xddc4, 0xddc5, 0xddc6, 0xddc7, - 0xddc8, 0xddc9, 0xddca, 0xddcb, 0xddcc, 0xddcd, 0xddce, 0xddcf, - 0xddd0, 0xddd1, 0xddd2, 0xddd3, 0xddd4, 0xddd5, 0xddd6, 0xddd7, - 0xddd8, 0xddd9, 0xddda, 0xdddb, 0xdddc, 0xdddd, 0xddde, 0xdddf, - 0xdde0, 0xdde1, 0xdde2, 0xdde3, 0xdde4, 0xdde5, 0xdde6, 0xdde7, - 0xdde8, 0xdde9, 0xddea, 0xddeb, 0xddec, 0xdded, 0xddee, 0xddef, - 0xddf0, 0xddf1, 0xddf2, 0xddf3, 0xdda6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xde31, 0xde32, 0xde33, 0xde34, 0xde35, 0xde36, 0xde37, - 0xde38, 0xde39, 0xde3a, 0xde3b, 0xde3c, 0xde3d, 0xde3e, 0xde3f, - 0xde40, 0xde41, 0xde42, 0xde43, 0xde44, 0xde45, 0xde46, 0xde47, - 0xde48, 0xde49, 0xde4a, 0xde4b, 0xde4c, 0xde4d, 0xde4e, 0xde4f, - 0xde50, 0xde51, 0xde52, 0xde53, 0xde54, 0xde55, 0xde56, 0xde57, - 0xde58, 0xde59, 0xde5a, 0xde5b, 0xde5c, 0xde5d, 0xde5e, 0xde5f, - 0xde60, 0xde61, 0xde62, 0xde63, 0xde64, 0xde65, 0xde66, 0xde67, - 0xde68, 0xde69, 0xde6a, 0xde6b, 0xde6c, 0xde6d, 0xde6e, 0xde6f, - 0xde70, 0xde71, 0xde72, 0xde73, 0xde74, 0xde75, 0xde76, 0xde77, - 0xde78, 0xde79, 0xde7a, 0xde7b, 0xde7c, 0xde7d, 0xde7e, 0xde91, - 0xde92, 0xde93, 0xde94, 0xde95, 0xde96, 0xde97, 0xde98, 0xde91, - 0xde92, 0xde93, 0xde94, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x3100 .. 0x31ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8841, 0x8c41, 0x8444, 0x9041, 0x8446, 0x8447, 0x9441, - 0x9841, 0x9c41, 0x844a, 0x844b, 0x844c, 0x844d, 0x844e, 0x844f, - 0x8450, 0xa041, 0xa441, 0xa841, 0x8454, 0xac41, 0xb041, 0xb441, - 0xb841, 0xbc41, 0xc041, 0xc441, 0xc841, 0xcc41, 0xd041, 0x8461, - 0x8481, 0x84a1, 0x84c1, 0x84e1, 0x8541, 0x8561, 0x8581, 0x85a1, - 0x85c1, 0x85e1, 0x8641, 0x8661, 0x8681, 0x86a1, 0x86c1, 0x86e1, - 0x8741, 0x8761, 0x8781, 0x87a1, 0xdad4, 0xdad5, 0xdad6, 0xdad7, - 0xdad8, 0xdad9, 0xdada, 0xdadb, 0xdadc, 0xdadd, 0xdade, 0xdadf, - 0xdae0, 0xdae1, 0xdae2, 0xdae3, 0xdae4, 0xdae5, 0xdae6, 0xdae7, - 0xdae8, 0xdae9, 0xdaea, 0xdaeb, 0xdaec, 0xdaed, 0xdaee, 0xdaef, - 0xdaf0, 0xdaf1, 0xdaf2, 0xdaf3, 0xdaf4, 0xdaf5, 0xdaf6, 0xdaf7, - 0xdaf8, 0xdaf9, 0xdafa, 0xdafb, 0xdafc, 0xdafd, 0xdafe, 0x003f, - 0x003f, 0x003f, 0xf179, 0xf133, 0xeab2, 0xea5c, 0xeabe, 0xf3e9, - 0xf7bb, 0xe0a3, 0xf0e0, 0xe940, 0xf2cb, 0xf548, 0xf432, 0xf161, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x3200 .. 0x32ff */ - 0xdd41, 0xdd42, 0xdd43, 0xdd44, 0xdd45, 0xdd46, 0xdd47, 0xdd48, - 0xdd49, 0xdd4a, 0xdd4b, 0xdd4c, 0xdd4d, 0xdd4e, 0xdd4f, 0xdd50, - 0xdd51, 0xdd52, 0xdd53, 0xdd54, 0xdd55, 0xdd56, 0xdd57, 0xdd58, - 0xdd59, 0xdd5a, 0xdd5b, 0xdd5c, 0xd9df, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe7fd, 0xf07a, 0xe7fe, 0xf244, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdcb1, 0xdcb2, 0xdcb3, 0xdcb4, 0xdcb5, 0xdcb6, 0xdcb7, 0xdcb8, - 0xdcb9, 0xdcba, 0xdcbb, 0xdcbc, 0xdcbd, 0xdcbe, 0xdcbf, 0xdcc0, - 0xdcc1, 0xdcc2, 0xdcc3, 0xdcc4, 0xdcc5, 0xdcc6, 0xdcc7, 0xdcc8, - 0xdcc9, 0xdcca, 0xdccb, 0xdccc, 0x003f, 0x003f, 0x003f, 0xd9de, - 0xf179, 0xf133, 0xeab2, 0xea5c, 0xeee9, 0xe6bf, 0xf662, 0xf732, - 0xe29c, 0xed38, 0xf055, 0xf8fd, 0xec39, 0xe7ca, 0xe3d1, 0xf6cf, - 0xf17d, 0xf3bb, 0xf095, 0xea74, 0xe7a3, 0xf6e5, 0xf23f, 0xf5e6, - 0x003f, 0xe9fa, 0xe3fb, 0xe443, 0xf27a, 0xefd0, 0xf164, 0xf3bc, - 0xf833, 0xf9cc, 0x003f, 0xf2e1, 0xeabe, 0xf3e9, 0xf7bb, 0xf3a7, - 0xefd3, 0x003f, 0xf395, 0x003f, 0xe09a, 0xe37a, 0xf1c0, 0xf892, - 0xeda8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xde32, 0xde34, 0xde36, 0xde38, 0xde3a, 0xde3b, 0xde3d, 0xde3f, - 0xde41, 0xde43, 0xde45, 0xde47, 0xde49, 0xde4b, 0xde4d, 0xde4f, - 0xde51, 0xde54, 0xde56, 0xde58, 0xde5a, 0xde5b, 0xde5c, 0xde5d, - 0xde5e, 0xde5f, 0xde62, 0xde65, 0xde68, 0xde6b, 0xde6e, 0xde6f, - 0xde70, 0xde71, 0xde72, 0xde74, 0xde76, 0xde78, 0xde79, 0xde7a, - 0xde7b, 0xde7c, 0xde7d, 0xde91, 0xde92, 0xde93, 0xde94, 0x003f, - /* 0x3300 .. 0x33ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdc59, 0xdc5a, 0xdc5b, 0xdc5c, 0xdc5d, 0x003f, 0x003f, 0x003f, - 0xdc4a, 0xdc4b, 0xdc6c, 0xdc6d, 0xdc6e, 0xdc46, 0xdc47, 0xdc48, - 0xdc64, 0xdc65, 0xdc66, 0xdc67, 0xdc68, 0xdc31, 0xdc32, 0xdc33, - 0xdc35, 0xdc3b, 0xdc3c, 0xdc3d, 0xdc3e, 0xdc3f, 0xdc40, 0xdc41, - 0xdc42, 0xdc43, 0xdc44, 0xdc37, 0xdc38, 0xdc39, 0xdc3a, 0xdc4d, - 0xdc4e, 0xdc75, 0xdc76, 0xdc77, 0xdc78, 0xdc71, 0xdc72, 0xdc73, - 0xdc4f, 0xdc50, 0xdc51, 0xdc52, 0xdc53, 0xdc54, 0xdc55, 0xdc56, - 0xdc57, 0xdc58, 0xdc5e, 0xdc5f, 0xdc60, 0xdc61, 0xdc62, 0xdc63, - 0xdc6a, 0xdc6b, 0xd9e3, 0xdc7c, 0xdc36, 0xdc70, 0xdc91, 0xd9e1, - 0xdc4c, 0xdc7d, 0xdc45, 0x003f, 0x003f, 0x003f, 0x003f, 0xdc49, - 0xdc7a, 0x003f, 0x003f, 0xdc7b, 0x003f, 0x003f, 0xdc6f, 0x003f, - 0xd9e4, 0x003f, 0x003f, 0xdc74, 0xdc7e, 0xdc79, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x4e00 .. 0x4eff */ - 0xf179, 0xf2cb, 0x003f, 0xf662, 0x003f, 0x003f, 0x003f, 0xe742, - 0xf1db, 0xeab2, 0xeabe, 0xf7bb, 0x003f, 0xe996, 0x003f, 0x003f, - 0x003f, 0xf5e4, 0x003f, 0x003f, 0xf4a6, 0xe9e0, 0xeba6, 0x003f, - 0xe29a, 0xe940, 0x003f, 0x003f, 0x003f, 0x003f, 0xecaa, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3e9, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe1fa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf93f, 0xe4a1, 0x003f, 0xf3ab, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeed1, 0xe43c, 0x003f, 0xe29b, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf3fd, 0x003f, 0xea4f, 0xf8ba, 0xf7b9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe262, 0x003f, - 0xecab, 0xf0e0, 0x003f, 0x003f, 0x003f, 0xe29c, 0xe0f7, 0xeda5, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe071, 0x003f, 0xe55c, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf071, 0x003f, 0x003f, 0xe973, 0xeaad, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0eb, 0x003f, - 0x003f, 0x003f, 0xe5af, 0x003f, 0x003f, 0x003f, 0xe697, 0x003f, - 0xedf8, 0x003f, 0x003f, 0xea50, 0xf133, 0x003f, 0xefcd, 0x003f, - 0xf037, 0xeff6, 0xf8bb, 0x003f, 0xeee9, 0xf2cc, 0x003f, 0x003f, - 0xe376, 0x003f, 0x003f, 0xea51, 0x003f, 0x003f, 0xed3c, 0x003f, - 0x003f, 0xe75c, 0xf7f1, 0x003f, 0xe26f, 0xf834, 0xee42, 0x003f, - 0xf89d, 0x003f, 0x003f, 0xf84d, 0xe158, 0xf2cd, 0xe5d5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4a2, 0x003f, - 0x003f, 0x003f, 0xf161, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xed37, 0xf162, 0x003f, 0x003f, 0xf641, 0x003f, 0x003f, 0xe29d, - 0x003f, 0x003f, 0xe361, 0xe0bf, 0x003f, 0xf1a4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf1a8, 0xea52, 0xf672, 0xf1dc, - 0xe997, 0xeb49, 0x003f, 0x003f, 0x003f, 0xe55e, 0x003f, 0xf545, - 0x003f, 0x003f, 0x003f, 0xe4db, 0xe645, 0xf134, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xed76, 0x003f, 0xf3ea, 0x003f, 0x003f, 0x003f, 0xe0ec, 0xe0c0, - 0x003f, 0x003f, 0x003f, 0xf194, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x4f00 .. 0x4fff */ - 0x003f, 0xe37a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf7f2, 0xf135, 0xe36f, 0x003f, 0xeeea, 0xe37b, 0xe961, - 0xe8e9, 0xf9cc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8d7, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe871, 0x003f, 0xe646, 0x003f, - 0xecdf, 0x003f, 0xea53, 0x003f, 0xea54, 0xe031, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf27c, 0x003f, 0x003f, 0xe4a3, 0xf247, - 0xf75f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf058, 0xf248, 0xf3ac, - 0xf3a5, 0xefce, 0x003f, 0x003f, 0x003f, 0xf7bc, 0x003f, 0x003f, - 0x003f, 0xedf9, 0xf17a, 0xe9d6, 0xf1c2, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf735, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xedba, - 0xe8d8, 0x003f, 0x003f, 0xe032, 0x003f, 0x003f, 0xe3cd, 0x003f, - 0x003f, 0x003f, 0xf27d, 0x003f, 0x003f, 0x003f, 0xf17b, 0xea55, - 0x003f, 0xece0, 0x003f, 0xe059, 0xf479, 0x003f, 0xe5ce, 0x003f, - 0xf646, 0x003f, 0xe252, 0xe657, 0x003f, 0xecb4, 0x003f, 0xf3ad, - 0x003f, 0xf072, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6c2, 0x003f, - 0xf4a7, 0x003f, 0x003f, 0xe1ea, 0x003f, 0xf0ee, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7b2, 0xf9a5, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf665, 0xe5e2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf745, - 0x003f, 0x003f, 0xe197, 0xf5b5, 0xed3d, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeeeb, 0xf3d5, 0x003f, 0x003f, 0x003f, 0xf34b, 0x003f, - 0x003f, 0xefb5, 0x003f, 0xe159, 0xf865, 0x003f, 0x003f, 0xebd4, - 0x003f, 0x003f, 0xe6d6, 0x003f, 0x003f, 0xe951, 0x003f, 0xea56, - 0xf891, 0xece1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xebf3, 0xe998, - 0x003f, 0xe29e, 0x003f, 0xe8c4, 0x003f, 0xf793, 0x003f, 0x003f, - 0xe974, 0x003f, 0xedef, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x5000 .. 0x50ff */ - 0x003f, 0x003f, 0xe941, 0x003f, 0x003f, 0x003f, 0xe5d6, 0x003f, - 0x003f, 0xf4da, 0x003f, 0xe0c1, 0x003f, 0xe8c3, 0x003f, 0x003f, - 0x003f, 0xe7fa, 0xe4ee, 0x003f, 0x003f, 0x003f, 0xf848, 0x003f, - 0x003f, 0xf9a6, 0xf0ef, 0x003f, 0xf536, 0x003f, 0xe15a, 0xf4a8, - 0x003f, 0xf4db, 0x003f, 0xe8a7, 0xf647, 0x003f, 0xe2e6, 0xf394, - 0xe0da, 0x003f, 0xeed2, 0xe6c3, 0xf692, 0xef6e, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xeda6, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xede7, 0x003f, 0x003f, 0x003f, 0xe033, - 0xe137, 0xf059, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf746, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf835, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf3ae, 0x003f, 0xf2ce, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0ed, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf640, 0xf2cf, 0xefcf, 0x003f, - 0xf6de, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe263, 0x003f, 0x003f, 0x003f, 0x003f, 0xe999, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8a8, 0x003f, 0x003f, - 0x003f, 0xe0f8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeaa1, 0xe9e1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf5ca, 0xefb6, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeeec, 0xf27e, 0x003f, 0xf4f0, 0x003f, 0xeabf, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe15b, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe351, 0x003f, 0x003f, - 0x003f, 0xf562, 0xeb4a, 0x003f, 0x003f, 0x003f, 0x003f, 0xeac0, - 0x003f, 0xe270, 0x003f, 0x003f, 0x003f, 0xe962, 0xf9ea, 0x003f, - 0x003f, 0x003f, 0xe698, 0x003f, 0x003f, 0x003f, 0xf05a, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xef79, 0x003f, 0xecac, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4d0, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe034, 0x003f, 0xe8f8, 0x003f, 0x003f, 0x003f, 0xea57, - /* 0x5100 .. 0x51ff */ - 0xf0f0, 0xf3d6, 0x003f, 0x003f, 0xede2, 0x003f, 0xe15c, 0x003f, - 0x003f, 0xe0fb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf073, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeac1, - 0x003f, 0xe67d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xefd0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf249, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5e3, - 0x003f, 0x003f, 0xe3d3, 0x003f, 0xedf0, 0x003f, 0x003f, 0x003f, - 0xef44, 0xf0c3, 0x003f, 0xf03a, 0xf89e, 0xf5f6, 0xf34c, 0xf9d4, - 0xeb4b, 0xe253, 0x003f, 0xe34a, 0xf6ba, 0xe795, 0xf6cd, 0x003f, - 0x003f, 0x003f, 0xed3e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe56f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe377, 0x003f, 0x003f, 0xf19f, 0x003f, 0xe43e, - 0xf291, 0xe5d7, 0xf074, 0xf732, 0xe1eb, 0xe6bf, 0xf8b1, 0x003f, - 0x003f, 0xe1ec, 0x003f, 0x003f, 0x003f, 0xe942, 0xe37c, 0xe29f, - 0xf292, 0x003f, 0x003f, 0x003f, 0xe152, 0x003f, 0x003f, 0x003f, - 0xe37d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xedf7, 0x003f, - 0x003f, 0x003f, 0xf4fc, 0x003f, 0x003f, 0xf232, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe7b3, 0x003f, 0x003f, 0xe796, 0x003f, 0xefb7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe23e, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7a2, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe793, 0x003f, 0xe55f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeda7, 0xe5d2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe639, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf532, 0x003f, 0xf3d7, 0x003f, - 0x003f, 0xe5d8, 0x003f, 0xf34d, 0xe6d0, 0xe560, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe6cf, 0xf0ea, 0xf9eb, 0x003f, - 0x003f, 0xe8ed, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf955, 0xe0c2, 0x003f, 0x003f, 0x003f, 0x003f, 0xf9d5, 0x003f, - 0xf558, 0xef7a, 0xf5f3, 0x003f, 0x003f, 0xf7de, 0x003f, 0x003f, - /* 0x5200 .. 0x52ff */ - 0xe4ef, 0x003f, 0x003f, 0xf163, 0x003f, 0x003f, 0xe9c2, 0xf2b7, - 0xeed4, 0x003f, 0xe05a, 0x003f, 0x003f, 0x003f, 0xe7fb, 0x003f, - 0x003f, 0xf89f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe63a, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf59a, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf6f7, 0xe93c, 0x003f, 0x003f, - 0x003f, 0xe6d7, 0xeaa2, 0x003f, 0x003f, 0x003f, 0xe24e, 0x003f, - 0xe4f0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf334, 0xebec, - 0xe2e7, 0xf4cb, 0xf1a9, 0xe04e, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf591, 0x003f, 0x003f, 0x003f, 0xf65e, - 0x003f, 0x003f, 0xea9d, 0xe34b, 0xe5b7, 0xf293, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf538, 0x003f, 0xe99a, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe0a7, 0x003f, 0xe85e, 0x003f, 0x003f, - 0x003f, 0xeb76, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf1a5, 0xf294, 0x003f, 0x003f, 0x003f, 0x003f, 0xe99b, - 0x003f, 0x003f, 0xf7dc, 0x003f, 0x003f, 0xf4dc, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf794, 0x003f, 0xf59b, - 0x003f, 0x003f, 0x003f, 0xf993, 0x003f, 0x003f, 0x003f, 0xe34c, - 0xe8f9, 0xe6b1, 0x003f, 0x003f, 0x003f, 0xe0fc, 0x003f, 0x003f, - 0x003f, 0xf335, 0xe0fd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe5f4, 0x003f, 0x003f, 0x003f, 0xe1ed, - 0xe035, 0x003f, 0x003f, 0xe63b, 0xe352, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf34e, 0xe44d, 0xe134, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf846, 0x003f, - 0x003f, 0xe15d, 0x003f, 0xe89c, 0x003f, 0xf65f, 0x003f, 0xefb8, - 0x003f, 0xe797, 0x003f, 0x003f, 0x003f, 0xe15e, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe6cd, 0x003f, 0x003f, 0xe561, 0xefed, 0x003f, - 0xe07b, 0xe7e2, 0x003f, 0xf9b2, 0x003f, 0xecad, 0xe65c, 0xe7b4, - 0x003f, 0x003f, 0xeba7, 0xf263, 0xe353, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf9b3, 0x003f, 0xe5e4, 0x003f, 0x003f, - 0xe2e8, 0x003f, 0xf1c3, 0xe342, 0x003f, 0x003f, 0xe2a0, 0xe838, - /* 0x5300 .. 0x53ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf760, 0x003f, 0x003f, - 0xf9d6, 0x003f, 0x003f, 0x003f, 0x003f, 0xf761, 0x003f, 0xf762, - 0xe963, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9e2, 0xf8f9, 0xe9c1, - 0x003f, 0xecb5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf1dd, 0xe254, 0x003f, 0xe0a1, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe9e3, 0x003f, 0x003f, 0x003f, 0x003f, 0xf96d, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf7af, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe49d, - 0xe2a1, 0xed38, 0x003f, 0xf546, 0xf1a0, 0x003f, 0x003f, 0xecae, - 0xeeed, 0xf9c1, 0xe872, 0x003f, 0x003f, 0xe743, 0x003f, 0x003f, - 0x003f, 0xe9e4, 0xf391, 0xf693, 0xf892, 0x003f, 0x003f, 0xe3f5, - 0x003f, 0x003f, 0xe85f, 0x003f, 0xe964, 0x003f, 0xe936, 0x003f, - 0xf2bf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe25f, 0x003f, - 0xeb69, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7d6, - 0xf164, 0xf05b, 0x003f, 0x003f, 0xe04f, 0xe5b0, 0x003f, 0xe2e9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3ed, 0x003f, 0xe15f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xed9a, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xed7d, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe6d8, 0x003f, 0xf9a7, 0x003f, 0x003f, 0x003f, 0x003f, 0xf03b, - 0xf642, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2f0, 0xf7bd, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xee96, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe0db, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf4d1, 0x003f, 0x003f, 0x003f, 0x003f, - 0xefd1, 0xf4a9, 0xe370, 0xefd2, 0x003f, 0xe873, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xec62, 0x003f, 0xf632, 0xebf4, - 0x003f, 0x003f, 0x003f, 0xe874, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeed5, 0xf5bf, 0xe2a2, 0xe1af, 0xe2a3, 0x003f, 0x003f, - 0x003f, 0xe1b0, 0xf3fe, 0xe333, 0xebaf, 0xf733, 0x003f, 0xe036, - 0xf6bb, 0xf47a, 0xea58, 0xefd3, 0x003f, 0x003f, 0x003f, 0x003f, - 0xea59, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x5400 .. 0x54ff */ - 0x003f, 0x003f, 0x003f, 0xf9de, 0xe050, 0x003f, 0x003f, 0x003f, - 0xf7ea, 0xe3ce, 0xf264, 0x003f, 0xe562, 0xe7a3, 0xf9a8, 0xe6d9, - 0xf6ce, 0xf84e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe2d6, 0x003f, 0xe6f0, 0x003f, 0xf0e1, - 0xf755, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe99c, 0x003f, - 0x003f, 0xe9c3, 0x003f, 0xf7df, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xeeef, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf9e5, 0xf633, 0x003f, 0xe7fc, 0xf9a9, 0x003f, 0xeeee, 0x003f, - 0x003f, 0x003f, 0xe5e5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf2d0, 0x003f, 0xe1b1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf6a2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf3b2, 0x003f, 0xf3b1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe1b2, 0x003f, 0xe83b, 0x003f, 0xe037, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xece2, 0xf8bc, 0xe7a4, 0x003f, 0x003f, - 0xf24a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf763, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf8fa, 0x003f, 0xe2a4, 0x003f, - 0xe99d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf673, 0x003f, 0x003f, 0x003f, - 0xf1aa, 0x003f, 0x003f, 0xf431, 0xe271, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf836, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf7e0, 0x003f, 0x003f, 0x003f, 0x003f, 0xf166, 0x003f, 0x003f, - 0xed7e, 0xf7a1, 0x003f, 0x003f, 0xf8ef, 0x003f, 0x003f, 0x003f, - 0xf7eb, 0xf233, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf03c, 0x003f, 0x003f, 0x003f, 0xe038, 0x003f, 0x003f, - 0xf59c, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1d6, 0xf998, 0x003f, - 0x003f, 0x003f, 0xf559, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf764, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x5500 .. 0x55ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0xf736, 0x003f, 0xea5a, 0xf456, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6da, 0x003f, - 0xe4d0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe755, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf076, - 0x003f, 0xf4dd, 0x003f, 0x003f, 0x003f, 0xed6a, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf674, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf694, 0x003f, 0xeac2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7fd, - 0x003f, 0x003f, 0x003f, 0xe198, 0x003f, 0x003f, 0xe4ba, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xed3f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf7e1, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf336, 0x003f, 0x003f, 0x003f, - 0xe0d3, 0x003f, 0x003f, 0x003f, 0xeb4c, 0x003f, 0xf55a, 0xe59c, - 0x003f, 0xf9aa, 0xf7e2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf547, 0xf9c2, 0xf940, 0x003f, 0xf9ec, 0xe072, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf9bd, - 0x003f, 0xf077, 0xeac3, 0xe3d2, 0xe272, 0x003f, 0xe4a4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf9ab, 0x003f, 0xeae0, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf457, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeef0, 0x003f, 0xe37e, 0x003f, 0x003f, 0xf4aa, - 0x003f, 0x003f, 0x003f, 0xea5b, 0xf648, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xebf5, 0xf3b3, 0x003f, - /* 0x5600 .. 0x56ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf6a3, 0x003f, - 0x003f, 0xe039, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe2a5, 0x003f, 0x003f, 0xeac4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xebb0, - 0x003f, 0x003f, 0xf34f, 0x003f, 0xf634, 0x003f, 0xecb6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf856, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe391, 0x003f, 0x003f, 0xf9ed, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe9c4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf999, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xee4f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xea3d, 0x003f, 0xf84f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xedf1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf1c4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe435, 0x003f, 0x003f, 0xf9ee, 0x003f, 0x003f, - 0x003f, 0xf5b6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xebf6, 0xea5c, 0x003f, 0x003f, 0xf96e, 0x003f, - 0xf167, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe1dd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe647, 0xe1b3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x5700 .. 0x57ff */ - 0x003f, 0x003f, 0x003f, 0xf765, 0xedd8, 0x003f, 0x003f, 0x003f, - 0xe2ea, 0x003f, 0x003f, 0xe2d0, 0x003f, 0xf05c, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf03e, 0xf03d, 0x003f, 0x003f, 0xe4f1, 0x003f, - 0xe4a5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf6cf, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf234, 0x003f, 0x003f, 0x003f, 0x003f, 0xe334, 0x003f, 0x003f, - 0xf432, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe392, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf433, 0x003f, 0xf6f8, 0x003f, 0x003f, 0x003f, 0x003f, 0xe343, - 0x003f, 0x003f, 0xe8a9, 0x003f, 0x003f, 0xe4bb, 0xe07c, 0x003f, - 0xf3a6, 0xe0d5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf6e7, 0x003f, 0x003f, 0xe1de, 0x003f, 0xf6a4, 0x003f, - 0x003f, 0x003f, 0xf750, 0x003f, 0x003f, 0x003f, 0xe4dd, 0x003f, - 0xe160, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2a6, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf695, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xebf7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe4dc, 0x003f, 0x003f, 0xf8a0, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf837, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf0d9, 0x003f, 0xe2a7, 0xf03f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xed91, 0x003f, 0x003f, 0x003f, 0xefb9, - 0xf3d8, 0x003f, 0x003f, 0xe768, 0x003f, 0x003f, 0xeb94, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xee44, - 0xe99e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf4f1, 0x003f, 0x003f, 0x003f, 0xecd0, 0x003f, 0x003f, 0xf49d, - 0x003f, 0xe8c6, 0xe393, 0x003f, 0xe394, 0x003f, 0x003f, 0x003f, - /* 0x5800 .. 0x58ff */ - 0xe2dc, 0x003f, 0xe4d1, 0x003f, 0x003f, 0xe141, 0xf6d8, 0x003f, - 0xe0a8, 0xf0bc, 0xed4e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf56c, 0x003f, - 0x003f, 0xe952, 0x003f, 0x003f, 0xf337, 0x003f, 0x003f, 0xee50, - 0x003f, 0x003f, 0xe07d, 0x003f, 0x003f, 0x003f, 0x003f, 0xef7b, - 0xede8, 0xe953, 0x003f, 0x003f, 0xf1de, 0xe4f2, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe199, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe264, 0xeeab, 0x003f, 0x003f, 0x003f, 0xe0c3, - 0x003f, 0xebb1, 0x003f, 0x003f, 0xf6b2, 0x003f, 0x003f, 0xe4f3, - 0xe4d2, 0x003f, 0xf5c0, 0x003f, 0x003f, 0x003f, 0xeadd, 0x003f, - 0x003f, 0xf295, 0xeef1, 0x003f, 0xf9b4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf458, 0x003f, 0x003f, - 0x003f, 0xf4d2, 0x003f, 0x003f, 0xf296, 0x003f, 0xec63, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe161, 0x003f, 0xeaea, 0x003f, 0x003f, - 0x003f, 0xefba, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe7d7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf5cd, 0x003f, 0xf3f2, 0xf857, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe7f8, 0xe552, 0x003f, 0x003f, 0x003f, 0x003f, 0xf675, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe9c5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeef2, 0xf1df, 0x003f, 0x003f, 0xe05b, 0x003f, - 0x003f, 0xe8fa, 0x003f, 0x003f, 0x003f, 0xef45, 0x003f, 0xe4a6, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf9b5, 0x003f, - 0x003f, 0xf7c9, 0x003f, 0xed72, 0x003f, 0xf8bd, 0x003f, 0x003f, - 0xe6a4, 0xe255, 0x003f, 0x003f, 0x003f, 0x003f, 0xe265, 0xe676, - 0x003f, 0x003f, 0x003f, 0x003f, 0xedbd, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xea5d, 0xf195, 0x003f, 0x003f, 0xf1e0, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf17c, 0xf8be, 0xeaeb, 0x003f, 0xebf8, 0x003f, 0x003f, - /* 0x5900 .. 0x59ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf7be, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe395, 0xeb3a, 0xef72, 0x003f, - 0x003f, 0xec64, 0xe49f, 0x003f, 0xeda8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe7d3, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4de, - 0x003f, 0xf548, 0xf6bc, 0xe99f, 0x003f, 0xef7c, 0xed77, 0x003f, - 0x003f, 0xecf7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf138, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf893, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xedf2, 0x003f, 0x003f, 0xe396, - 0xe43f, 0xe975, 0x003f, 0x003f, 0x003f, 0x003f, 0xe335, 0xf3b4, - 0xf941, 0xe19a, 0x003f, 0x003f, 0xe9c6, 0xf861, 0x003f, 0xf6df, - 0x003f, 0x003f, 0xf838, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf297, 0x003f, 0xea5e, 0x003f, 0x003f, 0x003f, 0x003f, 0xeef3, - 0x003f, 0x003f, 0xf6ac, 0xf0c4, 0xf1e1, 0xeb3b, 0xe9c7, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe443, 0xe44f, 0x003f, 0x003f, 0x003f, - 0xe05c, 0x003f, 0x003f, 0x003f, 0x003f, 0xf8bf, 0x003f, 0x003f, - 0x003f, 0x003f, 0xedfd, 0xe9e5, 0xe75d, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf196, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe397, 0x003f, 0x003f, 0xef7d, 0xe362, - 0x003f, 0xe7d8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf676, 0x003f, 0x003f, - 0xe8aa, 0x003f, 0x003f, 0x003f, 0xf6e0, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe769, 0x003f, 0xf533, 0x003f, 0x003f, 0xf56d, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf2d1, 0x003f, 0x003f, 0xe7b5, 0x003f, - 0x003f, 0xf1ab, 0x003f, 0xecb7, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf24b, 0xe1b4, 0x003f, 0xeb95, 0xf05d, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf197, 0xef7e, 0x003f, 0xe0a9, 0xf3af, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe05d, 0x003f, - 0xf139, 0x003f, 0xf47b, 0x003f, 0xf9ef, 0x003f, 0xf7f3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xee51, 0x003f, 0x003f, 0xf168, 0x003f, 0x003f, 0x003f, 0xf1ac, - /* 0x5a00 .. 0x5aff */ - 0x003f, 0xf05e, 0x003f, 0xef6f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xea5f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe436, 0x003f, 0x003f, 0xeef4, 0xe3d6, 0x003f, 0x003f, 0xee52, - 0xece3, 0x003f, 0x003f, 0x003f, 0x003f, 0xed40, 0x003f, 0x003f, - 0x003f, 0xe744, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf635, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf4de, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe6a5, 0x003f, 0x003f, 0x003f, 0x003f, 0xf6e8, 0x003f, - 0x003f, 0xef56, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf8e6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe9e6, 0x003f, 0x003f, 0x003f, 0xe9a0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe76a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe83c, 0xf040, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xecb8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe03a, 0xebf9, 0x003f, 0xf041, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf47c, 0x003f, 0x003f, 0xf87e, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf265, 0x003f, 0x003f, 0x003f, 0x003f, 0xf7f4, 0x003f, - 0x003f, 0xe47c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x5b00 .. 0x5bff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf8fb, 0x003f, 0x003f, - 0x003f, 0xf9f0, 0x003f, 0xeb4d, 0xe273, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf756, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xea3e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeac5, 0x003f, 0x003f, 0xedbe, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf1ad, 0xf87a, 0x003f, 0x003f, 0xe1ee, 0xf1a6, 0x003f, 0xf1ae, - 0xf37d, 0x003f, 0xe9a1, 0x003f, 0xf1af, 0xf99a, 0x003f, 0xe77b, - 0x003f, 0x003f, 0x003f, 0xe19b, 0xe1b5, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf839, 0x003f, 0xebdd, 0x003f, 0x003f, 0x003f, 0x003f, - 0xec65, 0xf1cf, 0x003f, 0x003f, 0x003f, 0xe9a2, 0x003f, 0x003f, - 0xf7ca, 0x003f, 0xf078, 0x003f, 0xeded, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4eb, 0x003f, 0xefd4, - 0xebfa, 0xed5c, 0x003f, 0xebe4, 0xef57, 0x003f, 0x003f, 0xe26b, - 0x003f, 0x003f, 0x003f, 0xe965, 0x003f, 0xf6b5, 0xf995, 0xf395, - 0xe23f, 0xf3b5, 0xf2d2, 0xef58, 0xf0f1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe0d4, 0xeb4e, 0xecf8, 0xf079, 0xf942, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xeb96, 0x003f, 0xe2e0, 0x003f, - 0xf235, 0x003f, 0x003f, 0xf83a, 0xee53, 0xebb2, 0xe03b, 0x003f, - 0xece4, 0xefbb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xec66, - 0xf4f2, 0x003f, 0xf266, 0xf042, 0xe398, 0xf169, 0xe85b, 0xe2a8, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe9a3, 0x003f, 0x003f, 0x003f, - 0xe76b, 0x003f, 0xf7ce, 0xefd5, 0xecd1, 0x003f, 0x003f, 0xe44c, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe73c, 0xf4cc, - 0x003f, 0xe1fb, 0xf666, 0x003f, 0xeef5, 0xef91, 0xecf9, 0xe44b, - 0xf4f3, 0xecfb, 0x003f, 0xea60, 0xe240, 0x003f, 0xe699, 0xf3d9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5c1, 0xe954, 0x003f, - 0xf5bb, 0x003f, 0xea61, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x5c00 .. 0x5cff */ - 0x003f, 0xe976, 0x003f, 0x003f, 0xea62, 0x003f, 0x003f, 0xf1e2, - 0xf298, 0xf05f, 0xf37e, 0xecfc, 0x003f, 0xe4df, 0xe4f4, 0xebb3, - 0x003f, 0xebb4, 0x003f, 0x003f, 0x003f, 0x003f, 0xf563, 0x003f, - 0x003f, 0xeac6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xefd6, 0x003f, 0x003f, 0x003f, - 0xe8ab, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf636, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xecb9, 0xf0c5, 0xf539, 0xe1b6, 0xe49b, 0x003f, 0xe83d, 0xe473, - 0xe2d1, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0dc, 0xe19c, 0x003f, - 0xe2dd, 0x003f, 0x003f, 0xef39, 0x003f, 0xecbb, 0xecba, 0x003f, - 0x003f, 0xeb6a, 0x003f, 0x003f, 0x003f, 0xf299, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe943, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe4f5, 0x003f, 0xe6a6, 0x003f, 0xf645, 0xe6db, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xebd5, 0x003f, 0x003f, 0xe57a, - 0x003f, 0xeaa3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf9df, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe399, 0xf1d4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe0aa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xed6b, 0x003f, 0xebfb, 0xe0a2, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe4e0, 0x003f, 0xed4f, 0x003f, 0xf8c0, 0x003f, 0xe84e, - 0xed5d, 0x003f, 0xe649, 0x003f, 0x003f, 0x003f, 0xf2c0, 0x003f, - 0xebfc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf649, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeac7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xed41, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe977, - 0xe978, 0x003f, 0x003f, 0x003f, 0xf866, 0x003f, 0xe4f6, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf3da, 0x003f, 0xf894, 0x003f, 0x003f, - /* 0x5d00 .. 0x5dff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xec9f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5cf, 0xe39a, 0x003f, - 0x003f, 0xe1df, 0x003f, 0x003f, 0xf5cb, 0x003f, 0xed92, 0xe0ab, - 0x003f, 0xe6c4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeca0, - 0x003f, 0xe9da, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe83e, 0xe07e, 0x003f, 0x003f, 0x003f, - 0xe5b9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeca1, 0x003f, 0x003f, 0xef73, 0x003f, 0x003f, 0xf4ab, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2a9, - 0x003f, 0x003f, 0x003f, 0xe4f7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe593, 0x003f, 0x003f, - 0xe274, 0x003f, 0xef94, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xedf5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeeae, 0x003f, 0xe64a, 0x003f, 0xeaec, 0xed50, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xef74, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe745, 0x003f, 0x003f, 0x003f, 0xed6c, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf549, 0xf3b6, 0x003f, - 0x003f, 0xec6e, 0xebb5, 0x003f, 0x003f, 0xe1ef, 0xf3a7, 0xe275, - 0xe0dd, 0x003f, 0x003f, 0xe7e3, 0x003f, 0x003f, 0xf4ac, 0x003f, - 0x003f, 0xe39b, 0xf13b, 0xea63, 0xf6e9, 0x003f, 0x003f, 0xf7f5, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xebde, 0xe0ee, 0x003f, - /* 0x5e00 .. 0x5eff */ - 0x003f, 0x003f, 0xecbc, 0xf766, 0x003f, 0x003f, 0xe8ee, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf9f1, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf6b6, 0x003f, 0x003f, 0x003f, 0x003f, 0xf56e, 0x003f, - 0x003f, 0xf47d, 0x003f, 0xe8d9, 0x003f, 0xf338, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xebfd, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xea64, 0x003f, 0xeb3c, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf1e3, 0x003f, 0x003f, 0xe4e1, 0x003f, - 0xeac8, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7b6, 0x003f, 0xf9ac, - 0xf2d3, 0x003f, 0x003f, 0x003f, 0xed51, 0xf77b, 0x003f, 0xe8ac, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf956, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe73d, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf64a, - 0x003f, 0xe8df, 0xe4d3, 0xf757, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe05e, 0xf751, 0xe444, 0x003f, 0x003f, 0xe944, - 0xf849, 0xe05f, 0x003f, 0xf943, 0xf07a, 0xf07b, 0xe39c, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf1e4, 0x003f, 0x003f, 0xe9e7, - 0x003f, 0x003f, 0xeac9, 0x003f, 0x003f, 0x003f, 0x003f, 0xeaed, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf24c, 0x003f, 0xf2c1, - 0x003f, 0x003f, 0xe162, 0x003f, 0xe9a4, 0x003f, 0x003f, 0x003f, - 0xeaca, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4f8, 0xf3a8, - 0x003f, 0x003f, 0x003f, 0xe1b7, 0x003f, 0xf2d4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xed6d, 0xeaee, 0xe0ac, - 0xefbc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf07c, 0x003f, - 0x003f, 0x003f, 0xeacb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf7bf, 0xe63f, 0xe5c6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe2aa, 0x003f, 0x003f, 0xe239, 0x003f, 0x003f, 0xe69a, 0x003f, - 0x003f, 0x003f, 0xf3b7, 0xf29a, 0x003f, 0x003f, 0x003f, 0xe7d9, - 0xf4df, 0x003f, 0xf758, 0xe256, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe5e6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf576, 0x003f, 0x003f, 0xee55, 0xf2d5, - 0x003f, 0x003f, 0xe0ef, 0xf96f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x5f00 .. 0x5fff */ - 0x003f, 0xe937, 0x003f, 0x003f, 0xe677, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf759, 0x003f, 0x003f, 0x003f, 0x003f, 0xecd2, - 0x003f, 0xecbd, 0x003f, 0xe2e1, 0xf350, 0xf16a, 0x003f, 0xe9d7, - 0xf8f0, 0x003f, 0x003f, 0xf13c, 0x003f, 0x003f, 0x003f, 0xf339, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf867, 0xf8c1, - 0x003f, 0xe450, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xedb0, 0x003f, 0x003f, 0x003f, 0xf1e5, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe0ad, 0x003f, 0xf7b0, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf6a5, 0x003f, 0xe0ae, 0x003f, 0xe83f, 0x003f, 0xe746, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4a7, 0xf8b2, - 0x003f, 0xf9c4, 0x003f, 0xf13d, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf8a1, 0x003f, 0x003f, 0x003f, 0xede9, 0xefee, - 0x003f, 0xf4f4, 0xf795, 0xf351, 0xea3f, 0xf740, 0x003f, 0x003f, - 0xf4e0, 0xeeaf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8ad, - 0x003f, 0xee45, 0x003f, 0x003f, 0xf7a8, 0x003f, 0x003f, 0xe9d8, - 0xef69, 0xf2d6, 0x003f, 0x003f, 0x003f, 0xe4e2, 0x003f, 0xec6f, - 0x003f, 0x003f, 0xf970, 0xe6c8, 0xf9ad, 0x003f, 0x003f, 0x003f, - 0xeaef, 0xe163, 0xe4f9, 0x003f, 0x003f, 0x003f, 0x003f, 0xe592, - 0xe8c7, 0xea65, 0x003f, 0x003f, 0x003f, 0x003f, 0xf396, 0x003f, - 0xe5d0, 0xedd9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf957, 0xe966, 0xec70, 0x003f, 0x003f, 0x003f, 0xe840, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4a3, 0x003f, 0xe4ec, - 0x003f, 0xf55b, 0x003f, 0x003f, 0x003f, 0xf9c5, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xecfd, 0x003f, 0xf7b1, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe39d, 0xf16b, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5bc, 0xf434, - 0xe75e, 0xe75f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf5f7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf671, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe447, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf8ec, 0x003f, 0xe9c8, - /* 0x6000 .. 0x60ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xed78, - 0x003f, 0x003f, 0xe451, 0x003f, 0x003f, 0x003f, 0xf767, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe64b, 0xea66, 0x003f, 0x003f, - 0xf6bd, 0xf13e, 0x003f, 0x003f, 0x003f, 0xe371, 0x003f, 0xeb97, - 0xf043, 0x003f, 0xe266, 0x003f, 0x003f, 0x003f, 0x003f, 0xe135, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf198, 0xec71, 0xecbe, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf958, 0x003f, 0x003f, - 0xe1f0, 0x003f, 0xf7f6, 0x003f, 0x003f, 0xeaf0, 0x003f, 0x003f, - 0x003f, 0xedbf, 0x003f, 0x003f, 0x003f, 0xe24f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf971, 0xf1b0, 0xf9d1, 0xf64b, 0x003f, 0x003f, - 0xf7cf, 0xf0da, 0xe051, 0x003f, 0xe448, 0xe1f1, 0x003f, 0xecd3, - 0xf9e6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xee7d, 0x003f, 0x003f, - 0x003f, 0xecfa, 0x003f, 0x003f, 0xf33a, 0xf7d0, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf972, 0x003f, 0xf737, 0x003f, - 0x003f, 0x003f, 0xebe5, 0xf29b, 0x003f, 0x003f, 0x003f, 0xeef6, - 0xf07d, 0x003f, 0x003f, 0xf944, 0xf5c2, 0x003f, 0x003f, 0xe6dc, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf397, 0x003f, 0xe9e8, 0xe4ed, 0xf5fc, 0x003f, 0xe84f, 0x003f, - 0xe19d, 0x003f, 0x003f, 0x003f, 0xe4fa, 0xf534, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2d7, 0x003f, 0xe553, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf8e3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf8ed, 0x003f, 0xeb3d, 0x003f, 0x003f, 0xf07e, - 0xf8b3, 0xed52, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf677, 0xe46d, 0x003f, 0xeacc, 0x003f, 0x003f, 0xf959, 0x003f, - 0x003f, 0xeda9, 0xeb98, 0xf643, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6100 .. 0x61ff */ - 0x003f, 0xebfe, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0f0, 0x003f, - 0xf091, 0xf092, 0x003f, 0x003f, 0x003f, 0xe850, 0xf744, 0xf0f2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xed53, 0x003f, 0x003f, - 0x003f, 0x003f, 0xefd7, 0xed93, 0x003f, 0x003f, 0x003f, 0xe091, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe267, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf95a, 0x003f, 0x003f, 0x003f, 0xf4e1, 0x003f, 0x003f, 0xe0c4, - 0x003f, 0x003f, 0x003f, 0x003f, 0xece5, 0x003f, 0xe0c5, 0xf044, - 0x003f, 0x003f, 0xefbd, 0x003f, 0xe6c9, 0x003f, 0x003f, 0xf0db, - 0xf1b1, 0x003f, 0xe153, 0xf6be, 0xf95b, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf796, 0x003f, 0xe7b7, 0x003f, 0x003f, - 0xf4d3, 0xf4d4, 0x003f, 0x003f, 0x003f, 0xf6e4, 0x003f, 0xf6d1, - 0x003f, 0x003f, 0xe747, 0xe241, 0xe052, 0x003f, 0x003f, 0xf8b4, - 0xe0c6, 0x003f, 0x003f, 0xf398, 0x003f, 0x003f, 0xe5e7, 0x003f, - 0xf060, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe164, 0xe0af, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf53a, 0xefaf, 0x003f, - 0x003f, 0xf5c3, 0xefd8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe9e9, 0x003f, 0x003f, 0x003f, 0xf3f3, 0x003f, - 0xe5fb, 0xea4b, 0x003f, 0x003f, 0xf59d, 0x003f, 0x003f, 0x003f, - 0xf9f3, 0xf9f2, 0xf6a6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe9c9, 0x003f, 0x003f, 0xe563, - 0x003f, 0xe138, 0x003f, 0xe851, 0xe165, 0x003f, 0xe7e4, 0x003f, - 0x003f, 0x003f, 0xf85a, 0x003f, 0x003f, 0x003f, 0xede3, 0x003f, - 0x003f, 0x003f, 0xe4bc, 0x003f, 0x003f, 0x003f, 0xe092, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe354, 0x003f, 0x003f, 0x003f, 0xe060, - 0xf83b, 0xf0eb, 0xeef8, 0xe7e5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3d7, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf4a4, 0x003f, 0x003f, 0x003f, 0xe59d, 0xf973, - 0xf868, 0x003f, 0xf4d5, 0x003f, 0xe2ab, 0x003f, 0x003f, 0xf0f3, - /* 0x6200 .. 0x62ff */ - 0xe5fc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4d4, - 0xe1fc, 0x003f, 0xe7e6, 0x003f, 0xec9b, 0xec31, 0xf0d4, 0x003f, - 0xeb99, 0xed42, 0xe19e, 0x003f, 0x003f, 0x003f, 0xf8e4, 0x003f, - 0x003f, 0x003f, 0xf53b, 0x003f, 0x003f, 0x003f, 0x003f, 0xe34d, - 0x003f, 0xe093, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf2b8, 0x003f, 0x003f, 0x003f, 0xe6c0, 0x003f, - 0xf29c, 0xf9f4, 0x003f, 0x003f, 0xe4e3, 0x003f, 0xf8c2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5e8, 0xe8ae, - 0xebb6, 0xf747, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeb4f, - 0xf8c3, 0xe9ea, 0x003f, 0xec32, 0x003f, 0xf236, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf678, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf697, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9ca, 0x003f, - 0x003f, 0xe372, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9a6, 0x003f, - 0x003f, 0xe9eb, 0x003f, 0x003f, 0xed9b, 0x003f, 0x003f, 0xecaf, - 0xe39e, 0x003f, 0x003f, 0x003f, 0xf59e, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe14c, 0xf6ea, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xede4, 0xeaf1, 0x003f, 0x003f, 0xf6e1, 0x003f, 0xf7f7, - 0xf2b9, 0x003f, 0x003f, 0xf768, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf7a9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf769, 0x003f, 0x003f, 0x003f, 0xf24d, 0x003f, 0x003f, - 0x003f, 0xe756, 0x003f, 0x003f, 0xed73, 0xf5ce, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe9d9, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7e7, - 0xe449, 0xe5c3, 0x003f, 0x003f, 0xe875, 0xe860, 0x003f, 0xe3d9, - 0xe268, 0x003f, 0xe0de, 0xf53c, 0xe89d, 0x003f, 0xf679, 0xef95, - 0xe2ac, 0xf392, 0x003f, 0xf59f, 0xe8c8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe250, 0xecd4, 0xe3cf, 0xf3f5, - 0x003f, 0xe1f2, 0x003f, 0xe2eb, 0x003f, 0x003f, 0x003f, 0xe1b8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeca6, 0xe3da, - /* 0x6300 .. 0x63ff */ - 0x003f, 0xf435, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf436, - 0x003f, 0xed5e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe4fb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf3a9, 0x003f, 0x003f, 0x003f, 0xf459, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf2d8, 0xee59, 0x003f, 0xe748, 0xf895, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf4b5, 0x003f, 0x003f, 0xf734, 0x003f, 0x003f, 0xe3f3, - 0xee58, 0x003f, 0x003f, 0x003f, 0x003f, 0xf76a, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe979, - 0xea67, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0df, 0x003f, - 0x003f, 0x003f, 0xe2ec, 0x003f, 0x003f, 0x003f, 0x003f, 0xf56f, - 0x003f, 0x003f, 0xe3f4, 0xe44a, 0x003f, 0x003f, 0x003f, 0xeaf2, - 0x003f, 0x003f, 0x003f, 0xebb7, 0x003f, 0x003f, 0x003f, 0x003f, - 0xec33, 0xe4fc, 0x003f, 0x003f, 0xf1e6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe8c9, 0x003f, 0x003f, 0x003f, 0xed9c, 0x003f, - 0xe2de, 0x003f, 0x003f, 0xe260, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe5d3, 0xf4f5, 0xf6ae, 0x003f, 0x003f, 0xf2c8, 0x003f, 0xe1f3, - 0xf5cf, 0xedf3, 0xf352, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe061, 0x003f, 0x003f, 0x003f, 0xf093, 0x003f, 0xe336, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7da, - 0xf33b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf0e7, 0x003f, - 0x003f, 0x003f, 0xedc0, 0xf945, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xed54, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe139, 0xf9c6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf045, 0x003f, 0xedaa, 0xeaba, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6400 .. 0x64ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xebdf, 0x003f, 0xe861, - 0x003f, 0x003f, 0x003f, 0x003f, 0xebb8, 0x003f, 0xef96, 0xe4fd, - 0x003f, 0x003f, 0x003f, 0x003f, 0xec34, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf45a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe876, 0xf6b3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf9cd, 0x003f, 0x003f, 0x003f, 0xf4b6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf267, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf5c4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe734, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf437, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe7b8, 0xe7b9, 0xf2c9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe65e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf6cb, 0xeaae, 0xef97, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe445, 0x003f, 0x003f, 0x003f, 0xe4d5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf55c, 0xe89e, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe7e8, 0x003f, 0xf6eb, 0xf5c9, 0x003f, - 0xf4bc, 0x003f, 0xe862, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe4b5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xef46, 0x003f, 0x003f, 0xe65f, 0xf54a, 0x003f, 0xf6c9, - 0x003f, 0x003f, 0xe13a, 0x003f, 0x003f, 0xf353, 0xe166, 0x003f, - 0x003f, 0x003f, 0xe363, 0x003f, 0xe4bd, 0x003f, 0x003f, 0x003f, - 0xe8fb, 0x003f, 0xe0e0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe4e4, 0xf699, 0x003f, 0x003f, 0xe5ba, 0xf4cd, 0xe0e1, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf0f4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf53d, 0x003f, 0xf93a, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf6ec, 0x003f, 0x003f, 0x003f, 0xef98, 0x003f, - /* 0x6500 .. 0x65ff */ - 0xe877, 0x003f, 0x003f, 0x003f, 0xf6cc, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xedc1, 0x003f, 0x003f, 0x003f, 0x003f, 0xeb7e, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe5fd, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe276, 0xf93b, 0xe5bb, 0x003f, 0x003f, 0xf438, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xec35, 0xe1b9, - 0xf094, 0xe0c7, 0x003f, 0xe1f4, 0x003f, 0x003f, 0xe8af, 0xf2d9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1ba, 0x003f, 0x003f, - 0xf99b, 0x003f, 0x003f, 0x003f, 0x003f, 0xeaf3, 0xe277, 0xe852, - 0x003f, 0xe2ad, 0x003f, 0x003f, 0x003f, 0x003f, 0xeef9, 0xf738, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4e2, 0x003f, - 0x003f, 0x003f, 0xe094, 0xeaa4, 0x003f, 0x003f, 0xe554, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe167, 0xedc2, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe1bb, 0x003f, 0xf2da, 0xf268, 0x003f, 0xe9a7, - 0xec36, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeb50, 0x003f, - 0x003f, 0x003f, 0xe640, 0xf75a, 0x003f, 0xf99c, 0x003f, 0xe7fe, - 0x003f, 0x003f, 0x003f, 0x003f, 0xea40, 0x003f, 0x003f, 0x003f, - 0xe9ec, 0xe878, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe570, - 0x003f, 0xe69b, 0x003f, 0xe1d7, 0xea68, 0x003f, 0x003f, 0xf49a, - 0x003f, 0xed66, 0x003f, 0x003f, 0xe355, 0xf53e, 0x003f, 0xe9a8, - 0x003f, 0x003f, 0x003f, 0xf1c5, 0xf4d6, 0x003f, 0x003f, 0xea69, - 0xece6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4a8, - 0x003f, 0xe8b0, 0x003f, 0x003f, 0xedda, 0xecbf, 0x003f, 0x003f, - 0x003f, 0xe8b1, 0x003f, 0x003f, 0x003f, 0xe5e9, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xeb51, 0xf2db, 0x003f, 0x003f, 0xf379, - 0x003f, 0x003f, 0xe6b2, 0x003f, 0x003f, 0x003f, 0x003f, 0xe39f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe7e9, 0x003f, 0x003f, 0xe3a0, 0x003f, 0xf17d, 0xe4a9, 0x003f, - 0xf439, 0xf354, 0x003f, 0x003f, 0xec72, 0xefef, 0x003f, 0x003f, - 0x003f, 0xf7d1, 0x003f, 0x003f, 0xefd9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xef6a, 0xe853, 0xe854, 0xe555, 0x003f, 0xeefa, - /* 0x6600 .. 0x66ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1e0, 0xecb0, - 0x003f, 0xe8b2, 0xf8c4, 0x003f, 0xf4e3, 0x003f, 0xe7a5, 0xf8e7, - 0xe9cb, 0xe364, 0x003f, 0xee46, 0xeb3e, 0xf9da, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe945, 0xeb9a, - 0xeeb1, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5f0, 0x003f, 0xe76c, - 0xf1c6, 0x003f, 0x003f, 0x003f, 0x003f, 0xebb9, 0x003f, 0xecc0, - 0xf7c0, 0xeff0, 0x003f, 0x003f, 0xe7db, 0x003f, 0xf4e4, 0x003f, - 0x003f, 0x003f, 0xe946, 0xed79, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf355, 0xecc1, 0xf95c, 0xf95d, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf45b, 0x003f, 0xf45c, 0x003f, 0x003f, 0x003f, 0xed5f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf3db, 0x003f, 0xf869, 0x003f, 0xf3b8, 0xf9f5, 0xeb9b, - 0x003f, 0x003f, 0x003f, 0x003f, 0xeefb, 0xf947, 0xf974, 0xf8c5, - 0xece7, 0xe749, 0x003f, 0xf69a, 0x003f, 0x003f, 0xe955, 0xe168, - 0x003f, 0x003f, 0x003f, 0xeb3f, 0xf577, 0x003f, 0xf2dc, 0xe2fc, - 0xf2dd, 0x003f, 0xf43a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf9be, 0x003f, 0x003f, 0xe03c, - 0xf9bb, 0xf9c7, 0x003f, 0x003f, 0x003f, 0x003f, 0xeeb2, 0x003f, - 0xf061, 0xeaf4, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3ec, 0xed6e, - 0xedc3, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7a6, 0x003f, 0x003f, - 0xe1bc, 0x003f, 0xf4e5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf1d5, 0x003f, 0x003f, 0xe7ba, 0x003f, - 0x003f, 0x003f, 0xf1e7, 0xf8b5, 0xf77c, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeb77, 0x003f, 0xe169, 0x003f, 0x003f, 0xe556, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xeea5, 0x003f, 0xe5f5, 0xe4be, - 0x003f, 0xf99d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xed94, 0x003f, - 0x003f, 0xeaf5, 0x003f, 0x003f, 0xef9a, 0xf77d, 0x003f, 0x003f, - 0xe257, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf9f6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xef68, 0x003f, 0xe1d8, 0xeed6, 0xe16a, 0x003f, 0x003f, 0xe073, - 0xeaf6, 0xf357, 0xf356, 0x003f, 0xe74a, 0x003f, 0xf3f4, 0xf592, - /* 0x6700 .. 0x67ff */ - 0xf5cc, 0x003f, 0x003f, 0xf975, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf055, 0xf095, 0x003f, 0xe9db, 0x003f, 0xe967, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xea9f, 0xf49b, 0x003f, 0xe5c7, - 0x003f, 0x003f, 0x003f, 0xe760, 0x003f, 0xf358, 0xe3a1, 0xe3a2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7d4, 0xe678, - 0xe7ca, 0x003f, 0xe841, 0xe757, 0xe972, 0xf4ce, 0xf5f4, 0x003f, - 0x003f, 0xf3b9, 0x003f, 0x003f, 0xe863, 0x003f, 0xf67a, 0x003f, - 0x003f, 0x003f, 0xe2f5, 0x003f, 0x003f, 0xf9ae, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe062, 0x003f, - 0x003f, 0xeab4, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6dd, 0xf84a, - 0xf237, 0xf5bd, 0x003f, 0xf797, 0x003f, 0x003f, 0xf1e8, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe571, 0x003f, 0xe3a3, 0xebd6, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf7f8, 0x003f, 0xe8ca, - 0xe0f9, 0xe564, 0x003f, 0xe7dc, 0x003f, 0xf24e, 0x003f, 0xf6ed, - 0x003f, 0x003f, 0x003f, 0xe47e, 0x003f, 0x003f, 0xebe6, 0xf6f9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9ed, - 0x003f, 0xef6b, 0x003f, 0xe8b3, 0x003f, 0x003f, 0x003f, 0xe3f7, - 0xeb40, 0x003f, 0x003f, 0xe572, 0x003f, 0xf667, 0x003f, 0xe6f9, - 0x003f, 0x003f, 0xe76d, 0x003f, 0xe1fd, 0xf43b, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1bd, - 0xf752, 0x003f, 0x003f, 0xf43c, 0x003f, 0x003f, 0xe03d, 0xe03e, - 0xe2ae, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xecc2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe947, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8da, - 0xe7bb, 0xe095, 0xf663, 0xee9a, 0xf097, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf098, 0x003f, 0x003f, 0xf69b, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe2af, 0x003f, 0x003f, 0xe063, 0x003f, 0x003f, 0xe03f, - 0xe440, 0xf3ba, 0x003f, 0xe6b3, 0xecc3, 0xf4fd, 0xea6a, 0x003f, - 0x003f, 0x003f, 0x003f, 0xea6b, 0x003f, 0x003f, 0xf2de, 0x003f, - /* 0x6800 .. 0x68ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xec73, 0xf29d, 0x003f, 0x003f, 0xeaf7, 0xe6ca, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe278, 0xe8db, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf3bb, 0x003f, 0x003f, 0x003f, 0x003f, 0xeff1, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf847, 0xe356, 0x003f, 0x003f, 0xe13b, 0xf238, 0x003f, 0x003f, - 0xe0fa, 0xf7f9, 0xe19f, 0xe4fe, 0x003f, 0x003f, 0x003f, 0x003f, - 0xed60, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf47e, 0x003f, - 0xe565, 0xeacd, 0x003f, 0xf948, 0xe3d0, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf45d, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf6d2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe064, - 0x003f, 0xe5d9, 0x003f, 0x003f, 0x003f, 0xe76e, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1d9, - 0x003f, 0x003f, 0x003f, 0xf239, 0xf64c, 0x003f, 0x003f, 0xe16b, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf359, 0x003f, 0xf99e, - 0x003f, 0xef59, 0xf5a0, 0x003f, 0x003f, 0x003f, 0x003f, 0xeefc, - 0xe6de, 0x003f, 0x003f, 0x003f, 0x003f, 0xea6c, 0x003f, 0xf33c, - 0xe1a0, 0xe1e1, 0x003f, 0xebba, 0x003f, 0xe8ef, 0xe842, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe3a5, 0xe948, 0x003f, 0x003f, - 0x003f, 0xe798, 0x003f, 0xe3a4, 0x003f, 0xe1e2, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe97a, 0x003f, 0x003f, 0xf399, 0x003f, 0xf35a, - 0xe34e, 0x003f, 0xe9dc, 0x003f, 0x003f, 0x003f, 0x003f, 0xe566, - 0xe4d6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1d0, - 0xe1a1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeab5, 0x003f, - 0x003f, 0x003f, 0xeaf8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe531, 0xe242, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6900 .. 0x69ff */ - 0xef5a, 0x003f, 0x003f, 0x003f, 0x003f, 0xf0f5, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xecd5, 0xf5d0, 0x003f, - 0x003f, 0x003f, 0xf5a1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7a7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xedab, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xee5b, 0x003f, 0xf5f1, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xedc5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf7a3, 0xeb6b, 0xf67b, 0x003f, 0xe0f1, - 0x003f, 0xe7ea, 0xf5a2, 0x003f, 0x003f, 0x003f, 0xe6d1, 0x003f, - 0xe3f8, 0xf09a, 0xf09b, 0xe843, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf2df, 0x003f, 0x003f, 0xf3ef, 0x003f, 0xedf6, 0xf24f, 0xec74, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe34f, 0x003f, 0xf83c, - 0xf5d1, 0xeeb3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xefbe, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf45e, 0xe8b4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf95e, 0x003f, 0xe9ee, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeeb4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe6b4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf6b4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe1be, 0x003f, 0xe879, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe2b0, 0xf6d9, 0xf4e6, 0x003f, 0x003f, - 0xe269, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe23a, 0x003f, 0xe0c8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe337, 0x003f, 0xf35b, 0x003f, 0xe357, - /* 0x6a00 .. 0x6aff */ - 0x003f, 0x003f, 0xed55, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe8e0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe5da, 0x003f, 0xe6a7, 0x003f, 0x003f, 0x003f, 0xf250, - 0x003f, 0xf798, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5d2, 0xf1e9, - 0x003f, 0xe7bc, 0x003f, 0xedc6, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5a3, 0x003f, 0x003f, - 0xe864, 0xec37, 0xf8fc, 0x003f, 0x003f, 0xf3dc, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe096, 0x003f, 0x003f, 0x003f, - 0xef9c, 0x003f, 0x003f, 0xe279, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeff8, 0xec75, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe349, 0xe594, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3a6, - 0x003f, 0xeace, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf996, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe4aa, 0x003f, 0x003f, 0x003f, 0xe13c, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf2e0, 0x003f, 0x003f, 0x003f, 0xede5, 0xe365, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8fc, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf976, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe0fe, 0xf1ea, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xea41, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf7e3, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe532, 0xe2f6, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe660, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe5ea, 0xf3ee, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf85b, 0x003f, - 0x003f, 0x003f, 0x003f, 0xeda1, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6b00 .. 0x6bff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0xe5b1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe2ed, 0x003f, 0xf1eb, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe5b2, 0x003f, 0x003f, 0x003f, 0xe5bc, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf9e2, 0xf4ad, 0x003f, 0xf9db, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xefb0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe3a7, 0x003f, 0x003f, 0xf9e3, 0xe243, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf9e4, 0xf85e, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe040, 0x003f, 0xf6a7, 0x003f, - 0xe2b1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xee32, - 0x003f, 0xf946, 0xf43d, 0xf2e1, 0xf4ae, 0xe956, 0xe7eb, 0x003f, - 0x003f, 0x003f, 0xef70, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeba8, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5f6, - 0xe2fd, 0x003f, 0x003f, 0xea6d, 0x003f, 0x003f, 0x003f, 0xe7d1, - 0x003f, 0x003f, 0x003f, 0xed7a, 0xf45f, 0x003f, 0xf6bf, 0x003f, - 0x003f, 0xec76, 0xec38, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xecd6, 0x003f, - 0xf1d1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeff9, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe641, 0xea42, - 0x003f, 0x003f, 0xeb78, 0x003f, 0x003f, 0xe4ab, 0x003f, 0xf0dc, - 0x003f, 0x003f, 0xeaaf, 0x003f, 0xe053, 0x003f, 0x003f, 0xf29e, - 0x003f, 0xf9c3, 0x003f, 0x003f, 0x003f, 0xf0f6, 0xe2b2, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe7ec, 0x003f, 0xe7bd, 0x003f, 0xe76f, - 0x003f, 0x003f, 0xe548, 0xf0be, 0xe9ef, 0x003f, 0xe9f0, 0xe9f1, - 0xe9f2, 0x003f, 0x003f, 0xe7be, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf8c6, 0xe2b3, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6c00 .. 0x6cff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf29f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xed3b, - 0x003f, 0xe855, 0x003f, 0xe77c, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe3a8, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xec39, 0x003f, 0x003f, 0xea4c, - 0xeeb5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8f0, 0x003f, - 0xf2e2, 0xf3f0, 0xe2b4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8f1, 0x003f, - 0xeb41, 0x003f, 0x003f, 0x003f, 0x003f, 0xeaa5, 0x003f, 0xf7d2, - 0x003f, 0x003f, 0xeefd, 0x003f, 0x003f, 0xee33, 0xf8f1, 0xe0b0, - 0xf43e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe1e7, 0x003f, 0xef6c, 0x003f, 0x003f, 0xeed7, 0x003f, 0x003f, - 0xf6c0, 0x003f, 0xe373, 0x003f, 0x003f, 0x003f, 0xe831, 0x003f, - 0x003f, 0x003f, 0xe14d, 0x003f, 0x003f, 0xe3a9, 0xe9cc, 0x003f, - 0x003f, 0xecfe, 0xe3aa, 0xef3a, 0x003f, 0xf046, 0xf7fa, 0xee5c, - 0xf668, 0x003f, 0x003f, 0x003f, 0xe557, 0x003f, 0x003f, 0x003f, - 0xe7cb, 0x003f, 0xe7d2, 0xe4cb, 0xe799, 0xe839, 0xf5f8, 0x003f, - 0x003f, 0xea6e, 0xf43f, 0xf739, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe758, 0x003f, 0x003f, 0xf251, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf7c1, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe9f3, 0xf09c, 0x003f, 0xf64d, 0xebbb, 0xe1bf, 0xf564, 0xee5d, - 0x003f, 0xf95f, 0xf8a2, 0x003f, 0xeb6c, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf54b, 0xe865, 0x003f, 0xf7b2, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf8f2, 0x003f, 0xe8f6, 0x003f, 0xea6f, - 0x003f, 0x003f, 0x003f, 0xe8f2, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf76c, 0xf6ee, 0xf0e8, 0x003f, 0xe49c, 0x003f, 0x003f, - 0xf3bc, 0x003f, 0x003f, 0xf86a, 0x003f, 0x003f, 0xe87a, 0xe856, - 0xf6c1, 0x003f, 0x003f, 0xeeb6, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6d00 .. 0x6dff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xedc7, 0xe63c, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe957, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeba9, - 0x003f, 0xec3a, 0x003f, 0xe5a6, 0x003f, 0x003f, 0xe567, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf460, 0x003f, 0xf09d, - 0x003f, 0xeb6d, 0xf8f3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf3bd, 0x003f, 0x003f, 0xec77, 0xf9d7, 0x003f, - 0xe258, 0xf047, 0x003f, 0xf950, 0x003f, 0xf9e7, 0xf6ef, 0x003f, - 0x003f, 0xe6b5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf2ba, 0xf3dd, 0x003f, 0xea43, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xef5b, 0x003f, 0x003f, 0xf76d, 0x003f, - 0x003f, 0xf8c7, 0xe5c8, 0x003f, 0xe6df, 0x003f, 0xe9a9, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xefb1, 0x003f, 0x003f, 0xf83d, - 0xf669, 0xf896, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf73a, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xee7e, 0x003f, 0xe16c, - 0xebbc, 0xeb91, 0x003f, 0x003f, 0xefbf, 0xf99f, 0xee5e, 0x003f, - 0x003f, 0xebd7, 0x003f, 0xee5f, 0x003f, 0xf593, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xed95, - 0x003f, 0x003f, 0xed9d, 0x003f, 0x003f, 0xf7e4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf2e3, 0x003f, 0x003f, 0xe2ee, 0xf64e, 0xeb42, 0xf9a0, 0xe3ab, - 0x003f, 0x003f, 0x003f, 0xe6fa, 0x003f, 0x003f, 0x003f, 0xf8c8, - 0x003f, 0xec67, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe533, 0xf39a, 0xe6a8, 0x003f, 0x003f, 0x003f, 0xebe7, 0x003f, - 0x003f, 0xe4bf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf2e4, 0x003f, 0xe6c5, 0xf0e2, 0x003f, 0x003f, 0xf977, 0x003f, - 0x003f, 0xed32, 0x003f, 0xec78, 0x003f, 0xee60, 0x003f, 0xf8e8, - 0xf578, 0xedf4, 0xf54c, 0xf565, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6e00 .. 0x6eff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeab6, - 0x003f, 0xf949, 0xf252, 0xe097, 0x003f, 0x003f, 0x003f, 0xf2e5, - 0xe0e2, 0xe534, 0x003f, 0xea70, 0xe89f, 0xed56, 0xef4e, 0x003f, - 0x003f, 0x003f, 0x003f, 0xeb6e, 0xf644, 0xf062, 0x003f, 0xf7fb, - 0x003f, 0x003f, 0xeb52, 0x003f, 0xe074, 0x003f, 0xeeb7, 0x003f, - 0xf09f, 0x003f, 0xe7dd, 0x003f, 0xe844, 0xf23a, 0xf8e9, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe8cb, 0xe845, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf3be, 0x003f, 0x003f, 0xe4ac, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf8c9, 0x003f, - 0xeacf, 0x003f, 0x003f, 0xe4c0, 0xecd7, 0x003f, 0xf2e6, 0xf960, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xefc0, - 0x003f, 0x003f, 0x003f, 0xf5d3, 0x003f, 0x003f, 0xf16c, 0xf6b7, - 0x003f, 0x003f, 0xf048, 0xe3f9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe958, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf049, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3de, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe6b6, 0xe2b5, 0x003f, 0xe7a8, - 0x003f, 0x003f, 0xf17e, 0x003f, 0x003f, 0xe9aa, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe1a2, 0xef3e, 0x003f, 0x003f, 0x003f, 0xebbd, - 0x003f, 0xf461, 0x003f, 0x003f, 0x003f, 0x003f, 0xefc1, 0x003f, - 0x003f, 0x003f, 0xe49e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe8b5, 0x003f, 0xf4e7, 0xe7a0, 0x003f, 0x003f, - 0x003f, 0xf961, 0x003f, 0xf1b2, 0xf53f, 0x003f, 0xf8a3, 0x003f, - 0x003f, 0xf951, 0x003f, 0xf23b, 0xe535, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf594, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf269, 0x003f, 0x003f, 0x003f, - 0xf8ca, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1e3, 0xe74b, - /* 0x6f00 .. 0x6fff */ - 0x003f, 0xeddb, 0xf799, 0x003f, 0x003f, 0x003f, 0xf664, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6a9, - 0x003f, 0xe0c9, 0x003f, 0x003f, 0xee61, 0xf35c, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe73e, 0x003f, 0xf7d3, 0xe5fe, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe74c, 0xf440, 0x003f, 0x003f, 0x003f, - 0x003f, 0xec3b, 0xf4e8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf2c2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1ec, - 0x003f, 0xeeb8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe8a0, 0x003f, 0x003f, 0xe14e, 0x003f, 0x003f, 0xf49e, - 0xe87b, 0x003f, 0xec68, 0xf1d6, 0x003f, 0x003f, 0xe661, 0xeb43, - 0x003f, 0x003f, 0xf962, 0x003f, 0xf0c8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4c1, 0xf35d, 0x003f, - 0xe2f7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf1d2, 0x003f, 0xe568, 0xe959, 0xe6f1, 0x003f, - 0x003f, 0xeabb, 0x003f, 0x003f, 0xf4a5, 0x003f, 0x003f, 0x003f, - 0xf55d, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3bf, 0xf741, 0x003f, - 0xeffa, 0x003f, 0x003f, 0x003f, 0xf8cb, 0x003f, 0x003f, 0xe065, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf7d4, 0xf6ca, 0x003f, 0x003f, 0xe658, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf978, 0xf4bd, - 0x003f, 0xf2a0, 0x003f, 0xeefe, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe4c2, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4b6, 0x003f, - 0xe13d, 0xf69c, 0xe642, 0xe468, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeed8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeca5, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeeb9, 0x003f, 0x003f, 0x003f, 0x003f, 0xf33d, - 0xf8cc, 0xf0a1, 0x003f, 0x003f, 0xe536, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf8cd, 0x003f, 0xe5bd, 0xf3df, 0x003f, 0x003f, 0xf69d, - 0x003f, 0xea44, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5eb, 0x003f, - /* 0x7000 .. 0x70ff */ - 0x003f, 0xedc8, 0x003f, 0x003f, 0x003f, 0xf8a4, 0xe549, 0x003f, - 0x003f, 0xea71, 0x003f, 0xed33, 0x003f, 0x003f, 0x003f, 0xe6b7, - 0x003f, 0xf77e, 0x003f, 0x003f, 0x003f, 0xea45, 0x003f, 0x003f, - 0xe662, 0x003f, 0xf7d5, 0xeeba, 0xf0d5, 0xe5f7, 0xf2e7, 0xebbe, - 0x003f, 0x003f, 0x003f, 0xf83e, 0x003f, 0x003f, 0x003f, 0xe679, - 0xe67e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeebb, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf15b, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5b3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe244, 0x003f, 0x003f, 0x003f, - 0xf8a5, 0xebee, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf6a8, 0x003f, 0x003f, 0x003f, 0x003f, 0xf8ce, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe74d, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf8fd, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf979, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe2b6, 0x003f, 0x003f, 0x003f, 0xf1c7, 0xf23c, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe16d, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf637, 0x003f, 0x003f, 0x003f, 0xee9c, 0x003f, - 0x003f, 0x003f, 0xf5a4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf9dc, 0xf1b3, 0xe259, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf2e8, 0x003f, 0x003f, 0xebbf, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf86b, 0xe0e3, 0xf6a9, 0x003f, 0xf8a6, - 0x003f, 0x003f, 0x003f, 0xe949, 0x003f, 0x003f, 0x003f, 0xf3c0, - 0xf1c8, 0xf2c3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe63d, 0x003f, 0x003f, 0xf9ce, 0x003f, 0x003f, 0x003f, 0xef31, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf8f4, 0xe5a7, 0x003f, 0x003f, 0x003f, 0xf3f6, 0x003f, 0xee63, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe16e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf742, 0x003f, 0x003f, 0x003f, 0xe97b, 0x003f, 0x003f, - /* 0x7100 .. 0x71ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0xf9b6, 0x003f, 0x003f, 0x003f, - 0x003f, 0xedea, 0x003f, 0x003f, 0xf3e0, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe8cc, 0xe9cd, 0x003f, 0x003f, 0x003f, 0xe558, 0x003f, - 0x003f, 0xe7ed, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5a5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xee9d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xee64, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf9c8, - 0x003f, 0xe631, 0xf9bf, 0x003f, 0xf963, 0x003f, 0xf2a1, 0x003f, - 0xeebc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3ee, 0x003f, - 0x003f, 0xee65, 0x003f, 0x003f, 0xeff2, 0x003f, 0xeab0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe770, 0xf94a, 0xf9af, 0xf35e, - 0x003f, 0xe8e1, 0x003f, 0x003f, 0xedc9, 0x003f, 0xf1b4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeb53, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xecd8, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeffb, 0xf038, 0x003f, 0x003f, 0x003f, 0x003f, 0xf9b7, - 0x003f, 0x003f, 0xf8a7, 0x003f, 0xefc2, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf9f7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xec69, - 0x003f, 0x003f, 0xe97c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xef32, 0x003f, 0x003f, 0x003f, - 0x003f, 0xee92, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf9f8, 0xf9f9, 0x003f, 0x003f, 0x003f, 0xf64f, 0x003f, - 0x003f, 0xeea7, 0x003f, 0xee67, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe595, 0xe559, 0x003f, 0x003f, 0x003f, 0x003f, 0xe69c, 0x003f, - 0xe6f2, 0x003f, 0xebc0, 0x003f, 0xe8e2, 0xee68, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeebd, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf35f, 0xf4be, 0xec3c, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5b7, 0xeb92, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf9b8, 0xece8, 0x003f, 0xe537, 0xef9e, - /* 0x7200 .. 0x72ff */ - 0xf862, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf791, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe663, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe5b4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf360, 0x003f, 0xf6f0, 0xf243, 0x003f, 0x003f, - 0xf04a, 0x003f, 0xf063, 0x003f, 0x003f, 0xf1c9, 0xe9ab, 0x003f, - 0x003f, 0x003f, 0xedac, 0xf9a1, 0x003f, 0xead0, 0xf143, 0x003f, - 0xead1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1ed, 0xf748, - 0xf6fa, 0x003f, 0x003f, 0x003f, 0xf73b, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf570, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe54a, 0xed43, 0x003f, 0xefda, 0x003f, 0xea46, 0x003f, 0xe7bf, - 0x003f, 0xe7c0, 0xe691, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7cc, - 0x003f, 0xe83a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeae5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf6e5, 0x003f, 0x003f, 0x003f, 0xe142, 0x003f, 0x003f, - 0xeaf9, 0xe6e0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe54b, 0x003f, 0x003f, 0x003f, 0x003f, 0xf9fa, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe143, 0x003f, 0x003f, 0xe8f3, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xead2, 0x003f, 0xe25a, 0x003f, 0xf26a, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xed74, 0x003f, - 0xf8cf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2b7, - 0x003f, 0xf253, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe27a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xec3d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe6e1, 0xf897, 0x003f, 0x003f, 0xe5c9, 0xf73c, 0x003f, 0x003f, - /* 0x7300 .. 0x73ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeed9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4e9, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe77d, 0xecc4, 0xf393, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xef75, 0x003f, 0x003f, - 0x003f, 0xeb9c, 0xf254, 0xe7de, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf0a2, 0xf0a3, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf952, 0xf04b, - 0x003f, 0x003f, 0x003f, 0x003f, 0xef3b, 0xea72, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf1ef, 0x003f, 0xef33, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2f1, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe54c, 0x003f, 0xf97a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeebe, 0x003f, 0xf994, 0x003f, 0x003f, 0xe644, 0x003f, 0x003f, - 0xec3e, 0x003f, 0xe4b7, 0xf85c, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf86c, 0x003f, 0xf1b5, 0xebe3, - 0x003f, 0xef3c, 0x003f, 0xef6d, 0x003f, 0x003f, 0xf2e9, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf54d, 0x003f, 0xe2b8, 0xefdb, - 0xe3ac, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe857, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf0c9, - 0x003f, 0xef5c, 0x003f, 0x003f, 0x003f, 0xea47, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe64c, 0xe4e5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf86d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe866, 0x003f, 0xe041, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe858, 0xeaa6, 0x003f, 0xf7b3, 0xf462, 0x003f, 0xe054, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe25b, 0x003f, - 0x003f, 0xe1f5, 0x003f, 0x003f, 0x003f, 0xf9b0, 0xe5a8, 0x003f, - 0xf3c1, 0x003f, 0x003f, 0xec79, 0xe95a, 0xf144, 0xf850, 0x003f, - 0x003f, 0xf8a8, 0xe338, 0x003f, 0x003f, 0xe87c, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7ee, - 0x003f, 0xeb9d, 0x003f, 0x003f, 0x003f, 0xf2ea, 0xf86e, 0x003f, - /* 0x7400 .. 0x74ff */ - 0x003f, 0xeb54, 0x003f, 0xe2b9, 0x003f, 0xe5ca, 0xe6e2, 0xec3f, - 0x003f, 0xe6b8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xef5d, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf66a, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf2a2, 0xec6a, 0xf69e, 0x003f, 0x003f, 0xf8d0, 0xe3ad, 0x003f, - 0xe1e4, 0x003f, 0xe3ae, 0xe97d, 0xef5e, 0x003f, 0xf39b, 0xe245, - 0xee9e, 0x003f, 0x003f, 0xe6fb, 0xe366, 0xe9f5, 0xf6f1, 0x003f, - 0xf69f, 0x003f, 0xe8f7, 0x003f, 0x003f, 0x003f, 0x003f, 0xf8ea, - 0xefdc, 0xe7c1, 0x003f, 0xf5f2, 0xeb55, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf064, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf7c2, 0x003f, 0xf04c, - 0x003f, 0xe455, 0xf8d1, 0xeec0, 0xf0a5, 0x003f, 0xeafa, 0xeca2, - 0xe6b9, 0x003f, 0xefc3, 0x003f, 0xef9f, 0xef3f, 0x003f, 0x003f, - 0xf463, 0xf8a9, 0xe735, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5cb, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe358, 0x003f, - 0x003f, 0x003f, 0xe3af, 0xe6e3, 0x003f, 0x003f, 0x003f, 0xeb56, - 0x003f, 0xe632, 0x003f, 0xf1f0, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe6f3, 0x003f, 0x003f, 0x003f, 0xf964, 0x003f, 0xe867, 0xe16f, - 0x003f, 0xf464, 0x003f, 0xe3b0, 0x003f, 0xe170, 0x003f, 0xe8fd, - 0xf4bf, 0x003f, 0xf361, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf94b, 0x003f, 0xec40, 0x003f, 0x003f, 0xee35, 0x003f, 0x003f, - 0x003f, 0xec6b, 0x003f, 0x003f, 0x003f, 0xeade, 0x003f, 0xeb57, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf491, 0x003f, - 0x003f, 0x003f, 0xe171, 0x003f, 0x003f, 0x003f, 0x003f, 0xe67a, - 0x003f, 0x003f, 0x003f, 0x003f, 0xeec2, 0x003f, 0x003f, 0x003f, - 0xe246, 0x003f, 0xf4c0, 0x003f, 0xe1fe, 0x003f, 0x003f, 0x003f, - 0xf8d2, 0x003f, 0xf79a, 0xf6fb, 0x003f, 0x003f, 0xef4f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xef47, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1b6, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7500 .. 0x75ff */ - 0x003f, 0xe94a, 0x003f, 0x003f, 0xe144, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf3f7, 0x003f, 0x003f, 0x003f, 0xef48, 0x003f, 0x003f, - 0xe098, 0x003f, 0xed34, 0xf566, 0x003f, 0x003f, 0x003f, 0xeae6, - 0x003f, 0x003f, 0x003f, 0xeaa7, 0x003f, 0xeae7, 0xebc1, 0x003f, - 0xefc4, 0x003f, 0x003f, 0xe95b, 0xefc5, 0x003f, 0x003f, 0x003f, - 0xf2a3, 0xf0a6, 0xe0a3, 0xece9, 0x003f, 0x003f, 0x003f, 0xe3fb, - 0xf2a4, 0x003f, 0xf2eb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe344, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe1a3, 0x003f, 0x003f, 0xef76, - 0x003f, 0xf2a5, 0x003f, 0xe4cc, 0xe87d, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe6ba, 0x003f, 0xf465, 0xf5e5, 0xe7ef, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf7b4, 0x003f, 0x003f, 0xe5d4, 0xf9cf, 0x003f, - 0x003f, 0x003f, 0xe8e3, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3e1, - 0xf146, 0x003f, 0x003f, 0x003f, 0x003f, 0xf8fe, 0xe4d7, 0x003f, - 0xe3b1, 0x003f, 0xe0b1, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3b2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0b2, 0xf3c2, - 0x003f, 0x003f, 0xf571, 0xf7b5, 0x003f, 0x003f, 0xebc3, 0xebc2, - 0x003f, 0xf0f7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeaa8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0ca, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xee49, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf76e, 0xf7aa, 0xe099, 0x003f, 0xf1b7, 0x003f, 0x003f, - 0xe4b8, 0xf466, 0x003f, 0x003f, 0xe569, 0xf255, 0xf492, 0x003f, - 0x003f, 0x003f, 0xe042, 0x003f, 0x003f, 0xe94b, 0x003f, 0xf3f8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf147, 0x003f, 0x003f, - 0x003f, 0x003f, 0xedca, 0x003f, 0xf650, 0xf9dd, 0x003f, 0x003f, - 0xe573, 0xe172, 0x003f, 0xf6d4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe6e5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe4c3, 0x003f, 0xe736, 0x003f, 0xf651, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe9f6, 0x003f, 0xe1c0, 0x003f, 0x003f, 0x003f, - /* 0x7600 .. 0x76ff */ - 0xeddc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xedcb, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xebc4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xef40, - 0xf540, 0xf4ea, 0xe87e, 0x003f, 0xe6bb, 0x003f, 0xec41, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe6aa, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe69d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xed6f, 0x003f, 0xe066, 0x003f, - 0x003f, 0x003f, 0xf0a8, 0x003f, 0x003f, 0x003f, 0xe8fe, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf652, 0x003f, 0x003f, 0xf2bb, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe59f, 0x003f, 0x003f, 0xeb58, 0x003f, 0x003f, 0x003f, - 0xef49, 0x003f, 0xf2a6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe1a4, 0x003f, 0x003f, 0xe596, 0xe8a1, 0xe8dc, 0xe8dd, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf26c, 0x003f, 0xe0cb, 0xf965, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe27b, 0x003f, - 0xe1c1, 0x003f, 0x003f, 0xf8d3, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf7ab, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf5d4, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7a9, - 0x003f, 0x003f, 0xefdd, 0xe8cd, 0x003f, 0x003f, 0xe9ce, 0x003f, - 0xeec3, 0x003f, 0xf15c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf7ec, 0x003f, 0x003f, 0x003f, 0xe0cc, 0x003f, - 0x003f, 0x003f, 0x003f, 0xeb9e, 0xe538, 0x003f, 0xf1d3, 0xe791, - 0x003f, 0xf467, 0x003f, 0xe09a, 0xe891, 0x003f, 0x003f, 0xe664, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7cd, 0x003f, - 0x003f, 0x003f, 0xe77e, 0x003f, 0xf451, 0x003f, 0x003f, 0x003f, - 0xead3, 0x003f, 0x003f, 0x003f, 0xe892, 0x003f, 0xec7a, 0x003f, - /* 0x7700 .. 0x77ff */ - 0x003f, 0xeb9f, 0x003f, 0x003f, 0xe79a, 0x003f, 0x003f, 0x003f, - 0xf6af, 0xe846, 0x003f, 0xe067, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf468, 0x003f, - 0xe79b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf86f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2ef, - 0xe7c2, 0x003f, 0xf362, 0x003f, 0xed61, 0x003f, 0x003f, 0x003f, - 0xf4b7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf870, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf2ec, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xec42, 0x003f, 0xe54d, 0x003f, 0x003f, 0xe7ce, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf572, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe539, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1c2, 0xeeda, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf469, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe7aa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe74e, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe93d, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xec7b, 0xe69e, 0x003f, 0x003f, - 0xe09b, 0x003f, 0x003f, 0xe56a, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf567, 0xe131, 0x003f, 0x003f, 0xe2ba, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5b8, - 0x003f, 0x003f, 0x003f, 0xe7c3, 0xe378, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xecc5, 0xf0f8, 0x003f, 0xf441, 0x003f, 0x003f, - 0x003f, 0xe2bb, 0x003f, 0x003f, 0x003f, 0xe4ad, 0xef71, 0xe27c, - 0x003f, 0x003f, 0x003f, 0xeb44, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7800 .. 0x78ff */ - 0x003f, 0x003f, 0xea73, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe9f7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf442, 0xf4f6, 0xf66b, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe6fe, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf76f, 0x003f, 0xf6f2, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe339, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xee6a, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5a6, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe6bc, 0xe173, 0x003f, 0x003f, 0xee6b, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe9dd, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe3b3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2ed, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe66e, 0xed96, 0xebef, 0x003f, - 0x003f, 0xe9f8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xef5f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe075, 0x003f, 0x003f, 0x003f, 0xe931, - 0x003f, 0xeb45, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf93c, 0xf93d, 0xe737, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf1b8, 0x003f, 0x003f, 0x003f, 0xe8b6, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe692, 0xf4af, 0x003f, 0x003f, 0xe1a5, 0x003f, - 0xe893, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe738, 0x003f, 0x003f, 0x003f, 0xe174, 0x003f, 0x003f, 0xe3b4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe068, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe894, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7900 .. 0x79ff */ - 0x003f, 0xf5a7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5a8, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xee36, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe5ec, 0xe5f8, 0xe895, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xecc6, 0x003f, 0x003f, 0x003f, 0xea74, 0x003f, - 0xea75, 0xe3b5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3b6, - 0xe3b7, 0xf443, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xefde, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf363, 0xf444, - 0x003f, 0x003f, 0xf364, 0xe0e4, 0xf8d4, 0xf5e6, 0xecea, 0x003f, - 0xea76, 0x003f, 0x003f, 0x003f, 0x003f, 0xead4, 0x003f, 0x003f, - 0xf79b, 0x003f, 0x003f, 0x003f, 0x003f, 0xf33e, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe3b8, 0x003f, 0x003f, 0x003f, 0x003f, 0xe66f, - 0x003f, 0xe367, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf931, 0xf2ee, 0xe968, - 0x003f, 0xefdf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeddd, 0xf9fb, - 0x003f, 0x003f, 0xeb59, 0x003f, 0x003f, 0x003f, 0xe659, 0x003f, - 0x003f, 0xe53a, 0x003f, 0xedcc, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xefe0, 0x003f, 0x003f, 0x003f, 0xe368, 0xf932, 0xe54e, - 0xec43, 0xea77, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe94c, 0xe446, 0xf5d5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe231, 0xf5a9, 0x003f, 0x003f, 0xe9f9, 0x003f, 0x003f, - 0xe9fa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf365, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf66f, 0x003f, 0xf46a, 0xed7b, - 0x003f, 0xf493, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf149, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7a00 .. 0x7aff */ - 0xf9fc, 0x003f, 0x003f, 0x003f, 0x003f, 0xebaa, 0x003f, 0x003f, - 0xe069, 0x003f, 0x003f, 0xf2ef, 0x003f, 0xf5aa, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf19b, 0x003f, 0x003f, 0xf73d, - 0x003f, 0xf452, 0xf653, 0x003f, 0xe6d2, 0x003f, 0x003f, 0xf7a2, - 0xf366, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf39c, 0x003f, - 0x003f, 0xf670, 0x003f, 0x003f, 0x003f, 0x003f, 0xeff3, 0xf453, - 0x003f, 0x003f, 0x003f, 0xe53b, 0xe043, 0xe1a6, 0x003f, 0xe1c3, - 0xe1da, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7cf, 0x003f, - 0x003f, 0xf654, 0x003f, 0x003f, 0x003f, 0xf26d, 0xeec4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xec44, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeae2, 0xeedb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xef41, 0x003f, 0xf93e, 0x003f, 0x003f, 0x003f, 0x003f, - 0xedcd, 0x003f, 0x003f, 0x003f, 0xf87b, 0x003f, 0xe2bc, 0x003f, - 0x003f, 0xe2e2, 0xe1f6, 0x003f, 0x003f, 0xf2f0, 0x003f, 0xf54e, - 0x003f, 0xe55d, 0x003f, 0x003f, 0xf4b8, 0x003f, 0x003f, 0x003f, - 0xefa1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf494, 0xf4eb, 0x003f, 0xf367, 0x003f, 0x003f, - 0xe2d7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2df, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xef50, 0xef51, 0x003f, 0x003f, 0x003f, 0xe2e3, 0xefa2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe33a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf4c1, 0xe33b, 0x003f, 0xe574, - 0x003f, 0x003f, 0xf2bc, 0xe731, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7df, - 0x003f, 0xf4d7, 0x003f, 0x003f, 0x003f, 0xe94d, 0x003f, 0xe175, - 0xf1f1, 0x003f, 0x003f, 0xf3e2, 0x003f, 0xe56b, 0x003f, 0x003f, - 0x003f, 0x003f, 0xec45, 0x003f, 0x003f, 0xe076, 0x003f, 0xe4ae, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe176, 0x003f, - 0x003f, 0xf3d3, 0xf5e7, 0x003f, 0x003f, 0x003f, 0x003f, 0xe06a, - /* 0x7b00 .. 0x7bff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf8ee, - 0x003f, 0xebc5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeae9, 0x003f, 0xf26e, 0x003f, 0x003f, 0xf6c2, 0x003f, - 0xe732, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9ac, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf33f, 0xe64d, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xebab, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf7b6, 0x003f, - 0x003f, 0xe597, 0x003f, 0xe359, 0xf2a7, 0xec7c, 0x003f, 0xe8ea, - 0xe25c, 0xf5e8, 0xf6d5, 0x003f, 0xe4cd, 0x003f, 0xf4fe, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe345, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xeba0, 0x003f, 0xeafb, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xee6d, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xef34, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0cd, - 0x003f, 0x003f, 0x003f, 0xf2a8, 0x003f, 0x003f, 0x003f, 0xf244, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe868, 0xe3b9, 0x003f, 0xeaa9, - 0x003f, 0x003f, 0xf4b0, 0x003f, 0x003f, 0xe154, 0x003f, 0x003f, - 0x003f, 0xe247, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2a9, 0x003f, 0x003f, - 0x003f, 0xead5, 0x003f, 0x003f, 0xf1d7, 0x003f, 0x003f, 0x003f, - 0xf256, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf2bd, 0xf966, 0x003f, 0x003f, 0xe8f4, 0x003f, 0xf2aa, 0xf749, - 0x003f, 0xf5e9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xecd9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xebc6, 0x003f, 0x003f, 0x003f, 0xe54f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xea78, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7c00 .. 0x7cff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf37a, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf4c2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4af, 0x003f, - 0x003f, 0xe06b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf967, - 0x003f, 0x003f, 0xf1d8, 0xebc7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf568, 0xe643, 0xe9ad, - 0x003f, 0x003f, 0x003f, 0xe5be, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf3c3, 0xf26f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe67b, 0x003f, 0x003f, 0x003f, 0xf569, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe6e6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe847, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe9fb, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe9cf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe733, 0x003f, 0x003f, 0xe869, 0x003f, 0xf368, - 0xf2c4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xebd8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3d4, 0x003f, 0xf1f2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5db, 0x003f, - 0x003f, 0xe5dc, 0xf4c4, 0xe0d7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xec46, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2f1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf8d5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4d8, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9d0, 0xf369, - 0xe0b3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5dd, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe1a7, 0x003f, 0x003f, 0xe33c, 0x003f, - /* 0x7d00 .. 0x7dff */ - 0xe3ba, 0x003f, 0xf3c4, 0x003f, 0xedb3, 0xf8f5, 0xefe1, 0xf9e0, - 0xf94c, 0x003f, 0xe832, 0xe833, 0x003f, 0xe431, 0x003f, 0x003f, - 0xe491, 0x003f, 0x003f, 0x003f, 0xec7d, 0x003f, 0x003f, 0xea79, - 0xe26c, 0xf445, 0xe374, 0xe9d1, 0x003f, 0x003f, 0x003f, 0x003f, - 0xebc8, 0xe8b7, 0xeae3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf1b9, 0xf3c5, 0x003f, 0xf4cf, 0xe6ab, - 0xebac, 0x003f, 0x003f, 0xeceb, 0x003f, 0xf257, 0x003f, 0x003f, - 0x003f, 0xebc9, 0xe09c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf39d, 0xf871, 0xf36a, 0xe177, 0xe896, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe14f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe27d, 0x003f, - 0x003f, 0xe5a9, 0xf872, 0x003f, 0x003f, 0x003f, 0xe375, 0x003f, - 0xf0d6, 0x003f, 0xf16f, 0x003f, 0x003f, 0x003f, 0xeafc, 0x003f, - 0x003f, 0xf6d6, 0xea7a, 0xe0b4, 0x003f, 0x003f, 0xf2be, 0x003f, - 0x003f, 0xe145, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2bd, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2f2, 0xec47, - 0x003f, 0x003f, 0x003f, 0xe178, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf39e, 0x003f, 0x003f, 0x003f, - 0xe670, 0x003f, 0xf3c6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xec48, 0xf0ab, 0x003f, 0x003f, - 0x003f, 0xe0b5, 0xe761, 0x003f, 0xf55e, 0xf4f7, 0x003f, 0x003f, - 0xe6c6, 0x003f, 0xe3bb, 0xf6aa, 0x003f, 0xf1ca, 0xe6d3, 0xe79c, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf655, - 0x003f, 0x003f, 0xe3cc, 0xe9fc, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeafd, 0x003f, - 0xf7e5, 0x003f, 0xeb5a, 0x003f, 0x003f, 0xf49f, 0xe4b0, 0x003f, - 0xf595, 0xe859, 0x003f, 0xee6e, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf74a, 0xef60, 0x003f, 0x003f, 0xe79d, 0x003f, 0x003f, 0xf065, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe633, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf656, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7e00 .. 0x7eff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf46b, 0xed9e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xef42, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe86a, 0x003f, 0xf46c, 0xf8d6, 0xefb2, - 0x003f, 0xf23d, 0x003f, 0xf873, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe97e, 0x003f, 0x003f, 0xf5ea, 0xee70, - 0x003f, 0xf39f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6ac, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5c5, 0xf270, 0x003f, - 0x003f, 0xe8e5, 0x003f, 0xe9de, 0x003f, 0x003f, 0xe7f0, 0xefa3, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf3f9, 0x003f, 0xf454, 0xeb5b, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xefa4, 0x003f, - 0x003f, 0xec49, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xecb1, 0xf97b, 0xe1a8, 0x003f, 0xe146, 0x003f, 0x003f, - 0xf36b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xee4a, 0x003f, 0x003f, 0xe1a9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf4c3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xebd9, 0x003f, 0x003f, 0xf2ab, - 0x003f, 0x003f, 0x003f, 0xeec5, 0x003f, 0x003f, 0xeb79, 0x003f, - 0xf4c5, 0x003f, 0x003f, 0xe550, 0xe5bf, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7f00 .. 0x7fff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9ae, 0x003f, - 0xf7fc, 0x003f, 0xe150, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xeda2, 0x003f, 0x003f, 0x003f, - 0xe248, 0x003f, 0x003f, 0x003f, 0xe762, 0xf7d6, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf3aa, 0xe261, 0x003f, 0x003f, 0xf657, 0x003f, - 0xe8eb, 0x003f, 0xeafe, 0x003f, 0x003f, 0xe771, 0x003f, 0xf6f3, - 0x003f, 0xe6e7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5a0, 0x003f, 0x003f, - 0xe3bc, 0x003f, 0xedcf, 0x003f, 0xe0b6, 0x003f, 0xe848, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe1c4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe64e, 0x003f, 0x003f, 0x003f, 0xec4a, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe2d8, 0x003f, 0x003f, 0x003f, - 0xeb5c, 0xf0f9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf9fd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe6e8, 0xe0d8, 0x003f, 0x003f, 0x003f, 0xefe2, 0x003f, 0x003f, - 0x003f, 0xef4a, 0x003f, 0x003f, 0x003f, 0xecc7, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf15d, 0x003f, 0xf15e, 0x003f, 0xe64f, 0x003f, - 0x003f, 0x003f, 0xeca7, 0x003f, 0xead6, 0xf9e8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf271, - 0xf638, 0xe9fd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf74b, 0x003f, 0xef61, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf7d7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe27e, 0x003f, 0x003f, 0xf15f, 0x003f, 0x003f, 0x003f, - /* 0x8000 .. 0x80ff */ - 0xefa5, 0xe665, 0x003f, 0xe1c5, 0x003f, 0xf1ba, 0xe3bd, 0x003f, - 0x003f, 0xe2be, 0x003f, 0x003f, 0xf14b, 0x003f, 0x003f, 0x003f, - 0xe441, 0x003f, 0x003f, 0x003f, 0x003f, 0xe179, 0x003f, 0xe7c4, - 0xeffc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3be, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf14c, 0x003f, 0x003f, 0xedad, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf6b0, 0x003f, 0xe17a, - 0x003f, 0x003f, 0x003f, 0xe4c4, 0x003f, 0x003f, 0xe650, 0x003f, - 0x003f, 0x003f, 0xe69f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeba1, 0x003f, - 0xea4d, 0x003f, 0xf639, 0x003f, 0x003f, 0x003f, 0xe834, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe634, - 0xf5c6, 0x003f, 0xeba2, 0xefc6, 0x003f, 0x003f, 0x003f, 0xf455, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf579, 0xe67c, 0xf0d3, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf14d, 0xec6c, 0xea7b, 0xf36c, - 0x003f, 0xf0bf, 0x003f, 0xe6ce, 0xe3bf, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5ab, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf7fd, 0x003f, 0xe06c, 0x003f, 0x003f, - 0x003f, 0xe1c6, 0xf446, 0x003f, 0x003f, 0xe9fe, 0x003f, 0x003f, - 0x003f, 0xe147, 0xe8b8, 0x003f, 0x003f, 0x003f, 0x003f, 0xe379, - 0x003f, 0xe26d, 0xf0c0, 0x003f, 0xf9a2, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf75b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf066, 0xf3b0, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe8ce, 0x003f, 0xf6c3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe8cf, 0xe0a4, 0x003f, 0x003f, 0xf770, 0x003f, - 0x003f, 0xf8d7, 0x003f, 0x003f, 0xf0ca, 0xeb31, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe25d, 0x003f, 0x003f, 0xe56c, 0x003f, 0x003f, 0x003f, - 0xf9d8, 0x003f, 0x003f, 0x003f, 0x003f, 0xe498, 0x003f, 0x003f, - /* 0x8100 .. 0x81ff */ - 0x003f, 0x003f, 0xf447, 0x003f, 0x003f, 0xf898, 0xf63a, 0xf899, - 0xe776, 0x003f, 0xf541, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xef62, 0x003f, 0xe055, 0xe17b, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xec7e, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xec4b, 0x003f, 0xf6ad, 0x003f, 0x003f, 0x003f, 0xf771, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf4ec, 0x003f, 0x003f, 0x003f, 0x003f, 0xea31, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xed9f, 0x003f, 0x003f, 0xecec, 0x003f, - 0xe9af, 0xe9b0, 0x003f, 0x003f, 0xe0b7, 0xef63, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeba3, 0xe470, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf3a0, 0x003f, 0x003f, 0x003f, 0x003f, - 0xefa6, 0xe0f2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf1f3, 0xe969, 0xeb5d, 0x003f, 0x003f, 0x003f, 0x003f, 0xf6da, - 0xe8b9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe13e, 0x003f, 0xe86b, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1c7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe9b1, 0x003f, 0xe73f, 0xeca3, 0x003f, 0x003f, - 0xe291, 0x003f, 0x003f, 0xf495, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf743, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xeb5e, 0x003f, 0xf5fd, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf0ec, 0x003f, 0x003f, 0xe4c5, 0xf97c, 0xe46b, - 0xe57b, 0x003f, 0xea32, 0x003f, 0x003f, 0x003f, 0xede6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf340, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe5c4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1f4, - 0x003f, 0x003f, 0x003f, 0xeced, 0x003f, 0xef52, 0x003f, 0xf1f5, - 0xe6fc, 0x003f, 0xf1bb, 0x003f, 0x003f, 0xf63b, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf448, 0xf658, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe4e6, 0xf46d, 0xe2bf, 0x003f, 0xf0ac, 0x003f, - /* 0x8200 .. 0x82ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2c0, 0x003f, 0xee38, - 0xf9e9, 0x003f, 0xe2c1, 0x003f, 0xeb6f, 0xea7c, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeb32, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf54f, 0xec91, 0x003f, 0xe7f1, 0xf3c7, - 0x003f, 0xe0b8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf7fe, 0xe8ba, 0xe897, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf67c, 0xe86c, 0xf874, - 0x003f, 0xeb5f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe9b2, 0x003f, 0x003f, 0x003f, 0x003f, 0xee39, 0x003f, 0xf2f3, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf4ed, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf0fa, 0x003f, 0xf7e6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe06d, 0xe5de, - 0x003f, 0xe06e, 0xeae4, 0x003f, 0x003f, 0x003f, 0xee9f, 0x003f, - 0xf5ac, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xed97, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xefe3, 0x003f, 0xf1cb, 0xe2e4, 0x003f, - 0x003f, 0x003f, 0xe763, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe9b3, 0xe57c, 0x003f, 0x003f, 0xf449, 0x003f, 0xeab7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0ce, 0xf8d8, 0x003f, - 0x003f, 0xe369, 0x003f, 0x003f, 0xe9d2, 0xf6f4, 0xeedc, 0xed35, - 0x003f, 0xf933, 0x003f, 0xe8bb, 0x003f, 0x003f, 0x003f, 0xf44a, - 0xeffd, 0xe35a, 0x003f, 0xf5d6, 0xe7c5, 0xed44, 0x003f, 0xf1a7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf04d, 0xeea0, 0x003f, 0xf6c4, 0xf5ad, 0x003f, 0xe7e0, - 0x003f, 0x003f, 0x003f, 0xe044, 0x003f, 0x003f, 0xf772, 0xe2c2, - 0x003f, 0xf14e, 0x003f, 0x003f, 0x003f, 0xedb4, 0xe1c8, 0xf258, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeec8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1c9, 0xf7b7, 0x003f, - /* 0x8300 .. 0x83ff */ - 0x003f, 0xf3e8, 0xe7f2, 0xe8f5, 0xe045, 0xe7c6, 0x003f, 0x003f, - 0x003f, 0xe759, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7ab, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf1bc, 0x003f, 0x003f, 0xe764, 0x003f, 0x003f, 0x003f, 0xe96a, - 0x003f, 0xec4c, 0x003f, 0x003f, 0xf97d, 0xf170, 0xe4a0, 0x003f, - 0xefc7, 0xee3a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xec92, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf84b, - 0x003f, 0xf5ae, 0xf8aa, 0x003f, 0x003f, 0x003f, 0x003f, 0xf19d, - 0x003f, 0xf14f, 0xf968, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe575, 0x003f, 0x003f, 0x003f, 0xf7c3, - 0x003f, 0x003f, 0x003f, 0xf272, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe6e9, 0xf1f6, 0x003f, 0x003f, 0x003f, 0xea7d, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe17c, 0x003f, - 0xecee, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xef64, 0x003f, - 0x003f, 0x003f, 0xf89a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe9b4, 0xed45, 0xe740, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe765, 0x003f, 0x003f, - 0x003f, 0xf57a, 0x003f, 0x003f, 0x003f, 0xe249, 0x003f, 0x003f, - 0x003f, 0xe671, 0xe2d2, 0x003f, 0xe346, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe232, 0x003f, 0x003f, 0xf4ee, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf4f8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe95c, 0x003f, 0xe35b, 0x003f, 0x003f, 0x003f, 0xf934, - 0xe1ca, 0xe6d4, 0xea33, 0x003f, 0xed70, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf259, 0x003f, 0x003f, 0x003f, 0xec6d, 0x003f, 0x003f, - /* 0x8400 .. 0x84ff */ - 0x003f, 0x003f, 0x003f, 0xf5fe, 0xe53c, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe5d1, 0x003f, 0xe792, 0xf753, 0xf067, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf5d7, 0x003f, 0x003f, 0xe74f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf9c0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf0ad, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5aa, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeea8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf25a, - 0x003f, 0x003f, 0x003f, 0xe077, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf773, 0x003f, 0xe56d, 0x003f, 0x003f, 0xf068, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf8d9, 0xf1f7, 0x003f, 0x003f, 0xedb5, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe33d, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf3f1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xec4d, 0x003f, 0x003f, 0x003f, 0xecc8, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe7d5, 0x003f, 0x003f, 0xeaaa, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe8bc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf774, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf3fa, 0x003f, 0x003f, 0xedb6, 0xf4ef, 0x003f, 0x003f, 0xf8da, - 0xebe0, 0x003f, 0xe7ac, 0x003f, 0xf5eb, 0x003f, 0xeb46, 0x003f, - 0x003f, 0xefc8, 0x003f, 0xe0cf, 0x003f, 0xecc9, 0x003f, 0x003f, - 0x003f, 0xea7e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xec4e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe991, 0x003f, 0xe635, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xec93, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe6a0, 0x003f, 0x003f, 0x003f, - /* 0x8500 .. 0x85ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe7a1, 0x003f, 0xe750, 0xe96b, 0x003f, 0x003f, 0xf1bd, - 0xeab8, 0x003f, 0xf035, 0x003f, 0x003f, 0x003f, 0xe6ad, 0x003f, - 0x003f, 0xf4f9, 0x003f, 0xf1f8, 0x003f, 0xf5c7, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xebca, 0xf0e3, 0x003f, 0xf46e, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf75c, 0x003f, 0xf069, - 0x003f, 0xe4c6, 0x003f, 0xe8e6, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf5af, 0x003f, 0x003f, 0x003f, 0x003f, 0xe292, 0x003f, - 0x003f, 0x003f, 0x003f, 0xeffe, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf8b6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xec94, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe2f2, 0xf6b9, 0xe7f3, 0x003f, 0x003f, 0xebcb, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe86d, 0x003f, 0x003f, 0xe849, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf0fb, - 0x003f, 0xe0b9, 0x003f, 0x003f, 0xf1f9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xeb70, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf550, 0x003f, - 0xf9bc, 0xeab1, 0xecef, 0x003f, 0x003f, 0x003f, 0x003f, 0xeb33, - 0xf9b9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf341, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe1cb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf1be, 0x003f, 0x003f, 0x003f, 0xe5c0, 0xecf0, 0xf1fa, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xefe4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe5ed, 0xeedd, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe598, 0xedb7, 0x003f, 0x003f, - 0x003f, 0xe8e7, 0xec4f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf25b, - 0x003f, 0x003f, 0xe6f4, 0xf36d, 0x003f, 0x003f, 0x003f, 0xe23b, - /* 0x8600 .. 0x86ff */ - 0x003f, 0x003f, 0xeede, 0x003f, 0x003f, 0x003f, 0xe666, 0xebcc, - 0x003f, 0x003f, 0xef43, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xedee, 0xe932, - 0x003f, 0x003f, 0xeb60, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5b5, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5a1, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf8db, 0x003f, - 0xf7cb, 0x003f, 0x003f, 0x003f, 0xe0f3, 0xf535, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf858, 0xe667, 0x003f, 0xefe5, 0xf8dc, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf9d0, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf8f6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe835, 0x003f, 0xe8bd, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf172, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe1f7, 0xf36e, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf659, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xea91, - 0x003f, 0x003f, 0x003f, 0xe4b1, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf97e, 0x003f, 0x003f, 0x003f, - 0x003f, 0xef53, 0x003f, 0xf3c8, 0x003f, 0x003f, 0x003f, 0xe293, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf7ed, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf496, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xed46, 0x003f, - /* 0x8700 .. 0x87ff */ - 0xf5b9, 0x003f, 0xe992, 0xecf1, 0x003f, 0x003f, 0x003f, 0x003f, - 0xef35, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf44b, 0x003f, 0xea34, 0x003f, 0xe85c, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe079, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xecda, 0x003f, 0xf969, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf06a, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf7c4, 0x003f, - 0xeca4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf8dd, 0x003f, 0xf2ca, 0x003f, - 0xef54, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe5cc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf0d7, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7ad, - 0x003f, 0x003f, 0xf8ab, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe4d9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe5a2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf66e, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe898, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xeb61, 0x003f, 0x003f, 0xefa8, - 0x003f, 0x003f, 0xf5f9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf83f, 0x003f, 0xf0fc, 0x003f, 0x003f, 0xeb7a, 0x003f, - /* 0x8800 .. 0x88ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xecb2, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5c5, - 0x003f, 0x003f, 0xf3e3, 0xe5ee, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe1cc, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1d9, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe751, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf87c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3eb, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf84c, 0xee72, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf875, 0xec9c, 0x003f, 0x003f, 0x003f, 0xe046, - 0x003f, 0xed47, 0x003f, 0xf06b, 0x003f, 0xf5fa, 0x003f, 0x003f, - 0x003f, 0xf8ac, 0xe2c3, 0xf0fd, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf79c, 0x003f, 0x003f, 0xeab9, 0x003f, 0x003f, 0x003f, 0x003f, - 0xebf1, 0x003f, 0xe434, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5fb, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe36a, 0xe36b, - 0x003f, 0xf04e, 0xe7b1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe047, 0x003f, 0x003f, 0xe4e7, 0x003f, 0xf775, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe4b2, 0x003f, 0x003f, 0x003f, 0xec50, 0xf46f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1e5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf7ac, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe1cd, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf23e, 0xe63e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6ea, - 0x003f, 0x003f, 0x003f, 0x003f, 0xeee0, 0xf0ae, 0x003f, 0x003f, - 0x003f, 0xe2d9, 0x003f, 0x003f, 0xe95d, 0xf1fb, 0x003f, 0xea92, - 0x003f, 0xe6eb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xea35, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xead7, 0xe8d0, 0xe8d1, 0x003f, 0x003f, - 0xe5a3, 0x003f, 0x003f, 0x003f, 0x003f, 0xf342, 0x003f, 0x003f, - /* 0x8900 .. 0x89ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe96c, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe078, 0x003f, 0xf776, 0xe95e, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf06c, 0xe8d2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xefb3, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf6db, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeca8, 0x003f, - 0xe6ae, 0x003f, 0x003f, 0xeb71, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe0ba, 0x003f, 0x003f, 0xedd1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe36c, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe5c1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe75a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeca9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeb34, - 0x003f, 0xefa9, 0x003f, 0xe4c7, 0x003f, 0x003f, 0xe96d, 0xf73e, - 0x003f, 0x003f, 0x003f, 0xe148, 0x003f, 0x003f, 0x003f, 0xe33e, - 0x003f, 0x003f, 0x003f, 0xe794, 0x003f, 0x003f, 0xecca, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe13f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe53d, 0xf661, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe35c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe056, 0x003f, 0x003f, 0xe5c2, 0x003f, 0x003f, - 0xe24a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe057, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf840, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xead8, 0x003f, 0x003f, 0x003f, - 0xf5ba, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x8a00 .. 0x8aff */ - 0xedeb, 0x003f, 0xf2f4, 0xe9b5, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe1aa, 0x003f, 0xecf2, 0x003f, 0xf8f7, 0x003f, 0xf6d0, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf9ba, 0x003f, 0x003f, 0xf9e1, 0xf6a0, - 0xe3c0, 0x003f, 0x003f, 0xef55, 0x003f, 0xed48, 0x003f, 0xebe8, - 0x003f, 0x003f, 0x003f, 0xe151, 0x003f, 0xe47d, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe8be, 0x003f, 0x003f, 0xeb72, 0x003f, 0x003f, - 0x003f, 0xf859, 0x003f, 0x003f, 0xebcd, 0x003f, 0xe048, 0x003f, - 0x003f, 0x003f, 0xf470, 0xf3c9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xea93, 0x003f, 0x003f, 0x003f, 0xf36f, 0xf754, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf25c, 0x003f, 0x003f, 0xea94, 0x003f, - 0xeec9, 0x003f, 0xec95, 0xeee1, 0x003f, 0x003f, 0xeccb, 0x003f, - 0x003f, 0xeccc, 0x003f, 0x003f, 0x003f, 0xe2f8, 0xf2ac, 0x003f, - 0xf9fe, 0xf935, 0xf841, 0xead9, 0x003f, 0xeb62, 0x003f, 0x003f, - 0x003f, 0xf56a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3ca, 0x003f, 0xe233, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf44c, 0xf173, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xeb35, 0x003f, 0xf6ab, 0x003f, 0x003f, - 0xf0af, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xedde, 0x003f, - 0xeba4, 0xe1ab, 0x003f, 0xe7f4, 0xef36, 0xe1ce, 0xebe9, 0x003f, - 0xf991, 0x003f, 0xeb73, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xec51, 0x003f, 0xe234, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xea36, 0x003f, 0x003f, 0xf0fe, 0x003f, 0xf0dd, 0xf370, - 0x003f, 0x003f, 0xf56b, 0x003f, 0xec96, 0x003f, 0x003f, 0xe4c8, - 0x003f, 0x003f, 0x003f, 0xf57b, 0x003f, 0xf245, 0x003f, 0xf5d8, - 0x003f, 0x003f, 0xe5df, 0x003f, 0x003f, 0x003f, 0xe675, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf0b0, 0xf573, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeccd, 0x003f, 0x003f, 0x003f, 0x003f, 0xf596, 0xf842, - 0x003f, 0x003f, 0xf2f5, 0xe06f, 0x003f, 0xf0b1, 0xf1bf, 0x003f, - 0x003f, 0xf9c9, 0x003f, 0x003f, 0x003f, 0x003f, 0xed36, 0xf7a4, - 0xf343, 0x003f, 0xedec, 0x003f, 0x003f, 0x003f, 0xe3e7, 0x003f, - /* 0x8b00 .. 0x8bff */ - 0xe7c7, 0xed67, 0xf06d, 0x003f, 0xe599, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe84a, 0x003f, - 0xe85d, 0x003f, 0x003f, 0x003f, 0xf7cc, 0x003f, 0xebda, 0xe8bf, - 0x003f, 0xe155, 0xf160, 0xe0bb, 0x003f, 0xea95, 0x003f, 0x003f, - 0xefaa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe7c8, 0x003f, 0x003f, 0xf273, 0xe6bd, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe2c4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe35d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf936, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf3fb, 0x003f, 0x003f, 0x003f, 0x003f, 0xf9d2, 0xe3c1, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xecdb, 0x003f, 0xe4c9, 0x003f, 0xe95f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe17d, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xea37, 0x003f, 0x003f, 0xee4b, - 0xf131, 0x003f, 0x003f, 0x003f, 0xe149, 0x003f, 0x003f, 0xf8de, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeee2, 0x003f, 0x003f, - 0xe551, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe938, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xec52, 0x003f, 0xf4d8, 0xedd3, 0x003f, 0x003f, 0xf4d9, 0x003f, - 0x003f, 0x003f, 0xf4c6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x8c00 .. 0x8cff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1db, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1ac, - 0x003f, 0xf953, 0x003f, 0x003f, 0x003f, 0x003f, 0xe577, 0x003f, - 0xe3c2, 0x003f, 0xf7a5, 0x003f, 0xef65, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xecce, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe55a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeada, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf8df, 0xeee3, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf79d, 0xeccf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf5b0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe777, 0x003f, 0xe7c9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf73f, 0xf2f6, 0x003f, - 0xe9b6, 0xf23f, 0xe1f8, 0x003f, 0x003f, 0x003f, 0x003f, 0xea48, - 0xf937, 0xf6fc, 0xf6b1, 0xe24b, 0xf531, 0x003f, 0x003f, 0xf25d, - 0xebae, 0x003f, 0x003f, 0xf153, 0xe2fe, 0x003f, 0xf74f, 0xe772, - 0xe4e8, 0x003f, 0x003f, 0xea38, 0xf574, 0xf152, 0x003f, 0xe7f5, - 0xf7c5, 0xe9d3, 0xe693, 0xf19e, 0xf992, 0x003f, 0x003f, 0xf1c0, - 0xe049, 0x003f, 0xf274, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf471, 0x003f, 0xea49, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe694, 0x003f, 0xea96, 0x003f, 0xeadb, 0x003f, - 0xe8d3, 0x003f, 0xf877, 0xe773, 0xf551, 0x003f, 0xe9b7, 0x003f, - 0x003f, 0x003f, 0xf497, 0x003f, 0x003f, 0xe53e, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe695, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe9b8, 0xe2c5, 0xeadf, 0x003f, 0x003f, - /* 0x8d00 .. 0x8dff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0xf44e, 0xf631, 0x003f, 0xf0cb, - 0xf3fc, 0x003f, 0xf4c7, 0x003f, 0x003f, 0xeb7b, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf1fc, 0x003f, 0x003f, 0xebdb, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf275, 0x003f, 0xea97, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf863, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf3cb, 0x003f, 0x003f, 0xe33f, 0xe9b9, 0x003f, 0x003f, 0xe3c3, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5b1, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf056, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf371, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf63c, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf5d9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf37b, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe9ba, 0x003f, 0x003f, 0x003f, 0xf44f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf6c5, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe8a2, 0xf498, 0x003f, 0x003f, 0xe04a, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf6f5, 0x003f, 0xe0e5, 0x003f, 0x003f, - 0x003f, 0xf276, 0x003f, 0xeb63, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe235, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe668, - 0x003f, 0x003f, 0x003f, 0xe53f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x8e00 .. 0x8eff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xefc9, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4ce, - 0xf552, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0e6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf3a1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf0b2, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3a2, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf0b3, 0x003f, 0xf344, 0x003f, 0x003f, 0xe0f4, - 0xe540, 0xf4b2, 0xf8b7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf5ec, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf277, - 0xf542, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf5ed, 0x003f, 0xe2f3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf372, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf25e, - 0x003f, 0x003f, 0xf3cc, 0x003f, 0x003f, 0xedb8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe6f5, 0xecf3, 0xe2e5, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe2c6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf4b3, 0xed68, 0xe2f9, 0xe2da, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf85d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xee73, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf472, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf5ee, 0x003f, 0x003f, 0xe04b, 0x003f, 0x003f, 0xecdc, 0x003f, - /* 0x8f00 .. 0x8fff */ - 0x003f, 0x003f, 0x003f, 0xe294, 0x003f, 0xe669, 0x003f, 0x003f, - 0x003f, 0xf240, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf575, 0xe752, 0xe960, 0xe17e, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe5e0, 0xf65a, 0xf9ca, 0xe766, 0xf55f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe636, 0xe94e, - 0x003f, 0xe8d4, 0xe6c7, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4a0, - 0x003f, 0x003f, 0x003f, 0xf3cd, 0x003f, 0x003f, 0x003f, 0x003f, - 0xec53, 0xe96e, 0x003f, 0xe96f, 0x003f, 0x003f, 0xf2ad, 0xee3b, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf7dd, 0xf04f, 0x003f, 0x003f, - 0x003f, 0xf2ae, 0x003f, 0x003f, 0x003f, 0xf560, 0xe295, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xee3c, 0x003f, 0xe26e, - 0x003f, 0x003f, 0xe5f9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xecf4, 0xe1d0, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe5b8, 0x003f, 0x003f, 0xf6fd, 0x003f, - 0xe939, 0x003f, 0x003f, 0x003f, 0x003f, 0xea98, 0x003f, 0xe93a, - 0xf473, 0xefb4, 0xe46c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xefe6, 0x003f, 0x003f, 0xecf6, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeeca, 0x003f, - 0x003f, 0xe35e, 0x003f, 0x003f, 0xe899, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe04c, 0x003f, - 0x003f, 0x003f, 0xf278, 0xe86e, 0x003f, 0xf499, 0x003f, 0x003f, - 0xec9d, 0x003f, 0xe136, 0x003f, 0x003f, 0x003f, 0x003f, 0xe84b, - 0x003f, 0xf279, 0x003f, 0x003f, 0x003f, 0xf5da, 0x003f, 0x003f, - /* 0x9000 .. 0x90ff */ - 0xf6dc, 0xebea, 0xe251, 0xe541, 0x003f, 0xf9b1, 0xee4d, 0x003f, - 0xf8ad, 0x003f, 0x003f, 0xf777, 0x003f, 0xebce, 0x003f, 0xf6e2, - 0xf5ef, 0xe2c7, 0x003f, 0x003f, 0xe542, 0xe191, 0x003f, 0xe578, - 0x003f, 0xf25f, 0xf6d7, 0x003f, 0x003f, 0xeb36, 0xe651, 0xebdc, - 0xf373, 0xf3e4, 0xe993, 0xe637, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf597, 0x003f, - 0x003f, 0xf3ce, 0xf474, 0x003f, 0x003f, 0xe340, 0x003f, 0x003f, - 0xf191, 0x003f, 0x003f, 0x003f, 0xf7ba, 0x003f, 0xf0b5, 0x003f, - 0x003f, 0xe57d, 0xec54, 0x003f, 0x003f, 0x003f, 0x003f, 0xefe7, - 0x003f, 0x003f, 0xf0b4, 0xf031, 0x003f, 0xf74c, 0xe236, 0x003f, - 0xf7c6, 0xf96a, 0x003f, 0xe543, 0xe4b9, 0xf06e, 0x003f, 0x003f, - 0x003f, 0xefab, 0x003f, 0x003f, 0xebe1, 0xe4cf, 0xf598, 0x003f, - 0xf050, 0xebcf, 0x003f, 0xe14a, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf27a, 0x003f, 0x003f, 0x003f, 0xf374, 0xf4b4, 0xe57e, - 0x003f, 0x003f, 0xf450, 0x003f, 0x003f, 0xf3e5, 0x003f, 0xf553, - 0xeb64, 0x003f, 0xf0b6, 0x003f, 0xe6a1, 0xe0e8, 0x003f, 0xf7ad, - 0xefad, 0xe774, 0xf843, 0xec55, 0xf94d, 0x003f, 0x003f, 0xf154, - 0xe741, 0x003f, 0xe93b, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5a4, - 0x003f, 0xf0e9, 0x003f, 0x003f, 0x003f, 0xef4b, 0x003f, 0x003f, - 0x003f, 0xe767, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf8ae, 0xe3e1, 0x003f, 0x003f, 0xe8c0, 0x003f, - 0xf5be, 0x003f, 0xea99, 0x003f, 0x003f, 0x003f, 0x003f, 0xe09d, - 0xf6c6, 0xe2c8, 0x003f, 0x003f, 0x003f, 0xebd0, 0x003f, 0x003f, - 0xf260, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeff4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe296, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5cd, 0x003f, - 0x003f, 0xe2db, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe9bb, 0x003f, 0x003f, 0x003f, 0x003f, 0xe23c, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xefe8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe544, 0x003f, 0x003f, - /* 0x9100 .. 0x91ff */ - 0x003f, 0x003f, 0xed57, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf5db, 0x003f, 0x003f, 0xf851, 0x003f, 0x003f, - 0x003f, 0xea39, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe59a, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2f7, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe4b3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf0b7, 0xf2f8, 0xf5dc, 0xf1cc, 0xe8d5, 0xf3cf, 0x003f, - 0x003f, 0x003f, 0xf3d0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf5b2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe7ae, 0xe5ac, 0x003f, 0xec56, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf9a3, 0x003f, 0xf8e5, - 0xeaab, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xec97, - 0x003f, 0xf63d, 0x003f, 0xf5b3, 0x003f, 0xf345, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeba5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf5dd, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf132, 0xf1fd, 0x003f, 0xf5b4, 0xf8b8, - 0x003f, 0xe8a3, 0x003f, 0x003f, 0xe65a, 0xe0d9, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xedd4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4fa, - 0x003f, 0xf0b8, 0x003f, 0xeb47, 0xe6ec, 0xf3ec, 0xedaf, 0xe5e1, - 0xe6ed, 0xe3d1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xebf2, - 0xf2f9, 0x003f, 0x003f, 0x003f, 0xe9bc, 0xf66c, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf375, 0x003f, 0x003f, 0x003f, 0xf554, - 0x003f, 0x003f, 0xefe9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4fb, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9200 .. 0x92ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe591, 0x003f, 0x003f, - 0xe132, 0xf6fe, 0xeabc, 0x003f, 0x003f, 0x003f, 0x003f, 0xf0cd, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe347, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe652, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xef3d, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2af, - 0xe0a5, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0e9, 0x003f, 0x003f, - 0x003f, 0xf878, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe156, - 0x003f, 0x003f, 0x003f, 0xee77, 0x003f, 0x003f, 0xf057, 0x003f, - 0x003f, 0x003f, 0xe8a4, 0x003f, 0xe2c9, 0xec9e, 0xf2fa, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf0de, 0x003f, 0x003f, 0xf5c8, 0x003f, 0xe56e, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeb65, 0x003f, 0xf2b0, 0x003f, 0x003f, 0xec57, 0x003f, - 0xe7af, 0x003f, 0x003f, 0x003f, 0xf7e7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xeee5, 0x003f, 0x003f, 0xe2ca, 0xebd1, - 0x003f, 0xec58, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf2fb, 0x003f, 0x003f, 0xf89b, - 0x003f, 0x003f, 0xe994, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xeb37, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf778, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe0ea, 0x003f, 0x003f, 0x003f, 0xe0bc, 0x003f, 0x003f, 0x003f, - /* 0x9300 .. 0x93ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0xe672, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf5de, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf5df, 0x003f, 0xf246, 0x003f, 0x003f, 0x003f, 0xec98, 0xe4ca, - 0xf2fc, 0xe3c4, 0xf2b1, 0x003f, 0xe3c5, 0x003f, 0xe36e, 0x003f, - 0xe7e1, 0x003f, 0x003f, 0xeb48, 0x003f, 0x003f, 0xe1d1, 0xf4b9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeecc, 0x003f, 0xe638, 0xe237, 0x003f, 0xe545, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xed58, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe4b4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf0b9, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0f5, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf66d, 0x003f, 0xf3a3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe157, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xefca, 0x003f, 0xebf0, 0x003f, - 0x003f, 0x003f, 0xf5e0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf8af, 0x003f, 0x003f, 0x003f, 0xe0d1, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf8e0, 0xf475, 0x003f, 0x003f, - 0xf192, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf37c, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf27b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xefcb, 0x003f, - 0x003f, 0xe192, 0x003f, 0x003f, 0xe6af, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4a1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9400 .. 0x94ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0xf997, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf3a4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeb66, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf2b2, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf561, 0x003f, 0x003f, - 0xf6a1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf3d1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe09e, 0xe09f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe25e, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4c8, 0x003f, 0xf4ba, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9500 .. 0x95ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1fe, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe836, 0x003f, 0x003f, 0xeb7c, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf75d, 0x003f, 0xe0d2, 0x003f, 0x003f, 0x003f, 0xf0ce, - 0x003f, 0xf7d8, 0xf7d9, 0xe070, 0xe85a, 0x003f, 0x003f, 0x003f, - 0xe0a6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe058, 0xf7ee, 0xe8ec, 0x003f, 0x003f, - 0xe341, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5ef, 0x003f, 0x003f, - 0x003f, 0xee95, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xeea2, 0xed69, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xed71, - 0x003f, 0x003f, 0xf954, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf7ef, 0xe2f4, 0xf6e6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe24c, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf555, 0xe933, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9600 .. 0x96ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe9bd, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf556, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf731, 0x003f, 0x003f, 0x003f, 0xef66, 0x003f, - 0x003f, 0x003f, 0xe8c1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf376, 0x003f, 0x003f, 0x003f, 0xed49, - 0xf67d, 0x003f, 0xf7ae, 0x003f, 0xe9be, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe6b0, 0xe778, 0xe0bd, 0x003f, 0x003f, - 0xf7da, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf75e, 0xf7f0, 0xeb7d, 0xecb3, 0xf543, - 0x003f, 0x003f, 0xf052, 0xf476, 0xf346, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe8d6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf0e4, 0x003f, 0x003f, 0xf477, 0x003f, 0xe6d5, 0xe546, 0xf7e8, - 0xe6c1, 0x003f, 0x003f, 0x003f, 0x003f, 0xedd5, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xefea, 0xe6cc, 0x003f, - 0x003f, 0x003f, 0xe4e9, 0xec59, 0x003f, 0xf96b, 0xe1ad, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe140, 0xf032, 0x003f, 0x003f, - 0xed98, 0xe350, 0x003f, 0xf347, 0xf231, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe6f6, 0x003f, 0x003f, 0x003f, 0xec5a, - 0xec5b, 0x003f, 0xf85f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf0df, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe65b, - 0x003f, 0x003f, 0x003f, 0xf544, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf1cd, 0xed62, 0x003f, 0x003f, 0xf039, 0xed4a, 0xf4a2, 0xe1d2, - 0x003f, 0xf65b, 0x003f, 0xf3e6, 0xf1c1, 0xef4c, 0xf261, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf377, 0xec5c, 0x003f, - 0x003f, 0xed3a, 0x003f, 0xf5e1, 0xf1da, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe6ee, 0xe3f1, 0x003f, 0x003f, 0x003f, 0x003f, - 0xefeb, 0xefec, 0xeb74, 0x003f, 0x003f, 0x003f, 0x003f, 0xe837, - 0xe9d4, 0x003f, 0xf033, 0x003f, 0x003f, 0x003f, 0xe653, 0xe696, - 0x003f, 0xe86f, 0x003f, 0xf2b3, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9700 .. 0x97ff */ - 0xec5d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2fd, 0xf478, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf2c5, 0x003f, 0xeee7, 0x003f, 0x003f, 0xe6fd, 0x003f, - 0x003f, 0xeece, 0x003f, 0x003f, 0xeadc, 0x003f, 0xf7c7, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7f6, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeaac, 0x003f, 0xe66a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe934, 0x003f, 0x003f, 0x003f, 0xf348, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe5fa, 0x003f, 0xed99, 0x003f, 0x003f, 0x003f, - 0xe654, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf57c, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2fe, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf331, 0x003f, 0xea3a, 0x003f, - 0x003f, 0xe84c, 0xe79e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf864, 0x003f, 0x003f, 0x003f, 0xf175, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf938, 0x003f, 0x003f, 0xf176, - 0x003f, 0x003f, 0xe75b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf8b9, 0x003f, 0xed63, 0x003f, 0xe1f9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe2d3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe07a, 0x003f, 0x003f, 0xe2d4, 0x003f, 0xf74d, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf557, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf06f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf7db, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe547, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf0e5, 0x003f, 0x003f, 0xebd2, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf034, 0x003f, 0x003f, 0x003f, 0xf852, - /* 0x9800 .. 0x98ff */ - 0xf8e1, 0xf87d, 0xf332, 0xe193, 0x003f, 0xf833, 0xec99, 0x003f, - 0xec5e, 0x003f, 0xeff5, 0x003f, 0xebeb, 0x003f, 0x003f, 0x003f, - 0xeee8, 0xef67, 0xe89a, 0xe55b, 0x003f, 0x003f, 0x003f, 0xf6f6, - 0xe655, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe579, 0x003f, 0x003f, - 0xf89c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe194, 0xf6dd, 0x003f, 0xea4a, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe238, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf349, 0xeda0, 0xed59, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xed64, 0x003f, 0x003f, 0x003f, - 0xf053, 0x003f, 0xf2b4, 0x003f, 0x003f, 0x003f, 0xe6be, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf8e2, 0x003f, 0xe1d3, - 0x003f, 0x003f, 0x003f, 0xf2b5, 0x003f, 0x003f, 0x003f, 0xf879, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf7a6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeabd, - 0x003f, 0xf6c7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf79f, 0x003f, 0x003f, 0xf79e, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xea3b, 0xe8e8, 0x003f, 0x003f, 0xecdd, - 0x003f, 0xebe2, 0xe3c6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf660, 0xf0e6, 0xe89b, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf157, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xea9a, 0xf779, 0xecde, 0x003f, - /* 0x9900 .. 0x99ff */ - 0x003f, 0x003f, 0x003f, 0xe297, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf853, 0xedd7, 0x003f, 0xf158, 0x003f, 0x003f, 0x003f, - 0xf4c9, 0x003f, 0x003f, 0xed4b, 0x003f, 0x003f, 0x003f, 0x003f, - 0xee3e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2b6, 0x003f, - 0xe94f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe24d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe753, 0x003f, 0x003f, - 0x003f, 0xe35f, 0x003f, 0xe2fa, 0xf4ca, 0xeb67, 0x003f, 0x003f, - 0x003f, 0xe3c7, 0xefae, 0x003f, 0xef4d, 0x003f, 0x003f, 0xf854, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xec5f, 0x003f, - 0x003f, 0xf855, 0x003f, 0x003f, 0x003f, 0xf7b8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe970, 0x003f, 0x003f, - 0xf8b0, 0x003f, 0x003f, 0x003f, 0xe739, 0xeddf, 0xf7a7, 0x003f, - 0x003f, 0xf67e, 0x003f, 0xf65c, 0xec9a, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf193, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe870, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf3d2, 0xe45c, 0xe2cb, 0x003f, 0x003f, 0xe04d, 0x003f, 0x003f, - 0x003f, 0xe9bf, 0x003f, 0x003f, 0x003f, 0xf691, 0x003f, 0xea9b, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf844, 0x003f, 0x003f, - 0x003f, 0xe5ad, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3e7, - /* 0x9a00 .. 0x9aff */ - 0x003f, 0xea4e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe950, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3c8, 0xe3c9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf74e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe0f6, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe59b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5e2, 0xebd3, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe779, 0x003f, 0x003f, 0xf7a0, 0x003f, 0xe2cc, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf9a4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe298, 0x003f, 0xf860, - 0x003f, 0x003f, 0xe195, 0xee4e, 0x003f, 0x003f, 0x003f, 0xf63e, - 0x003f, 0x003f, 0xe5f0, 0x003f, 0x003f, 0xe3ca, 0x003f, 0x003f, - 0x003f, 0xf94e, 0xe5f1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe1e9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf845, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xec60, 0xf599, 0x003f, 0x003f, 0x003f, - 0xe1d4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeea3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8a5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9b00 .. 0x9bff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xec61, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6a2, - 0x003f, 0x003f, 0xf6e3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf036, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe331, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe26a, 0xf8eb, 0xe8a6, 0xe8de, 0xe775, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf070, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe73a, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xede0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe66b, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2c6, 0x003f, - 0x003f, 0xf77a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xed65, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe299, 0x003f, 0x003f, 0xeb68, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe6ef, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf57d, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe1e6, 0x003f, 0x003f, 0x003f, - 0xe196, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9c00 .. 0x9cff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5e3, 0x003f, 0x003f, - 0xed5a, 0x003f, 0xe971, 0x003f, 0x003f, 0xf7c8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf94f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xef37, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe754, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0be, - 0x003f, 0xe93e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6f7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf378, 0x003f, 0xe9c0, - 0x003f, 0xe2cd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe995, 0xe7b0, 0x003f, 0xee79, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9d00 .. 0x9dff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xed4c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf054, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xed7c, 0x003f, - 0xed75, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf8f8, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe14b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xed4d, 0x003f, 0x003f, - 0xe1dc, 0xe7f7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe9df, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf1ce, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe7d0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeda3, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf7cd, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe1ae, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2ce, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf63f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf9d3, 0xf0ed, 0xe66c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9e00 .. 0x9eff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeda4, 0x003f, 0x003f, 0x003f, 0xe5b6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe66d, 0x003f, 0x003f, - 0x003f, 0xf7e9, 0x003f, 0x003f, 0x003f, 0xeea4, 0x003f, 0xe673, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe3cb, 0xe674, 0x003f, 0x003f, 0x003f, 0xe5f2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xea9c, 0x003f, 0xe6f8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe77a, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe2d5, 0xe79f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe73b, 0x003f, 0x003f, 0xf9cb, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf96c, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeb38, 0xe5f3, 0x003f, - 0x003f, 0xf9d9, 0x003f, 0x003f, 0xe133, 0x003f, 0x003f, 0x003f, - 0xe7f9, 0x003f, 0x003f, 0xe4ea, 0xf5f5, 0x003f, 0xf2c7, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe4da, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe84d, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9f00 .. 0x9fff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xef38, - 0xe93f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf333, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe1d5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeb39, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xea3c, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf34a, 0xf241, 0x003f, 0x003f, 0xf242, 0x003f, - 0x003f, 0x003f, 0xf65d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf262, - 0x003f, 0xe656, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeb75, - 0x003f, 0x003f, 0xf4bb, 0x003f, 0xede1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xed5b, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6a3, 0x003f, 0x003f, - 0xe8c2, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0a0, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe2cf, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xac00 .. 0xacff */ - 0x8861, 0x8862, 0x8863, 0x8864, 0x8865, 0x8866, 0x8867, 0x8868, - 0x8869, 0x886a, 0x886b, 0x886c, 0x886d, 0x886e, 0x886f, 0x8870, - 0x8871, 0x8873, 0x8874, 0x8875, 0x8876, 0x8877, 0x8878, 0x8879, - 0x887a, 0x887b, 0x887c, 0x887d, 0x8881, 0x8882, 0x8883, 0x8884, - 0x8885, 0x8886, 0x8887, 0x8888, 0x8889, 0x888a, 0x888b, 0x888c, - 0x888d, 0x888e, 0x888f, 0x8890, 0x8891, 0x8893, 0x8894, 0x8895, - 0x8896, 0x8897, 0x8898, 0x8899, 0x889a, 0x889b, 0x889c, 0x889d, - 0x88a1, 0x88a2, 0x88a3, 0x88a4, 0x88a5, 0x88a6, 0x88a7, 0x88a8, - 0x88a9, 0x88aa, 0x88ab, 0x88ac, 0x88ad, 0x88ae, 0x88af, 0x88b0, - 0x88b1, 0x88b3, 0x88b4, 0x88b5, 0x88b6, 0x88b7, 0x88b8, 0x88b9, - 0x88ba, 0x88bb, 0x88bc, 0x88bd, 0x88c1, 0x88c2, 0x88c3, 0x88c4, - 0x88c5, 0x88c6, 0x88c7, 0x88c8, 0x88c9, 0x88ca, 0x88cb, 0x88cc, - 0x88cd, 0x88ce, 0x88cf, 0x88d0, 0x88d1, 0x88d3, 0x88d4, 0x88d5, - 0x88d6, 0x88d7, 0x88d8, 0x88d9, 0x88da, 0x88db, 0x88dc, 0x88dd, - 0x88e1, 0x88e2, 0x88e3, 0x88e4, 0x88e5, 0x88e6, 0x88e7, 0x88e8, - 0x88e9, 0x88ea, 0x88eb, 0x88ec, 0x88ed, 0x88ee, 0x88ef, 0x88f0, - 0x88f1, 0x88f3, 0x88f4, 0x88f5, 0x88f6, 0x88f7, 0x88f8, 0x88f9, - 0x88fa, 0x88fb, 0x88fc, 0x88fd, 0x8941, 0x8942, 0x8943, 0x8944, - 0x8945, 0x8946, 0x8947, 0x8948, 0x8949, 0x894a, 0x894b, 0x894c, - 0x894d, 0x894e, 0x894f, 0x8950, 0x8951, 0x8953, 0x8954, 0x8955, - 0x8956, 0x8957, 0x8958, 0x8959, 0x895a, 0x895b, 0x895c, 0x895d, - 0x8961, 0x8962, 0x8963, 0x8964, 0x8965, 0x8966, 0x8967, 0x8968, - 0x8969, 0x896a, 0x896b, 0x896c, 0x896d, 0x896e, 0x896f, 0x8970, - 0x8971, 0x8973, 0x8974, 0x8975, 0x8976, 0x8977, 0x8978, 0x8979, - 0x897a, 0x897b, 0x897c, 0x897d, 0x8981, 0x8982, 0x8983, 0x8984, - 0x8985, 0x8986, 0x8987, 0x8988, 0x8989, 0x898a, 0x898b, 0x898c, - 0x898d, 0x898e, 0x898f, 0x8990, 0x8991, 0x8993, 0x8994, 0x8995, - 0x8996, 0x8997, 0x8998, 0x8999, 0x899a, 0x899b, 0x899c, 0x899d, - 0x89a1, 0x89a2, 0x89a3, 0x89a4, 0x89a5, 0x89a6, 0x89a7, 0x89a8, - 0x89a9, 0x89aa, 0x89ab, 0x89ac, 0x89ad, 0x89ae, 0x89af, 0x89b0, - 0x89b1, 0x89b3, 0x89b4, 0x89b5, 0x89b6, 0x89b7, 0x89b8, 0x89b9, - 0x89ba, 0x89bb, 0x89bc, 0x89bd, 0x89c1, 0x89c2, 0x89c3, 0x89c4, - /* 0xad00 .. 0xadff */ - 0x89c5, 0x89c6, 0x89c7, 0x89c8, 0x89c9, 0x89ca, 0x89cb, 0x89cc, - 0x89cd, 0x89ce, 0x89cf, 0x89d0, 0x89d1, 0x89d3, 0x89d4, 0x89d5, - 0x89d6, 0x89d7, 0x89d8, 0x89d9, 0x89da, 0x89db, 0x89dc, 0x89dd, - 0x89e1, 0x89e2, 0x89e3, 0x89e4, 0x89e5, 0x89e6, 0x89e7, 0x89e8, - 0x89e9, 0x89ea, 0x89eb, 0x89ec, 0x89ed, 0x89ee, 0x89ef, 0x89f0, - 0x89f1, 0x89f3, 0x89f4, 0x89f5, 0x89f6, 0x89f7, 0x89f8, 0x89f9, - 0x89fa, 0x89fb, 0x89fc, 0x89fd, 0x8a41, 0x8a42, 0x8a43, 0x8a44, - 0x8a45, 0x8a46, 0x8a47, 0x8a48, 0x8a49, 0x8a4a, 0x8a4b, 0x8a4c, - 0x8a4d, 0x8a4e, 0x8a4f, 0x8a50, 0x8a51, 0x8a53, 0x8a54, 0x8a55, - 0x8a56, 0x8a57, 0x8a58, 0x8a59, 0x8a5a, 0x8a5b, 0x8a5c, 0x8a5d, - 0x8a61, 0x8a62, 0x8a63, 0x8a64, 0x8a65, 0x8a66, 0x8a67, 0x8a68, - 0x8a69, 0x8a6a, 0x8a6b, 0x8a6c, 0x8a6d, 0x8a6e, 0x8a6f, 0x8a70, - 0x8a71, 0x8a73, 0x8a74, 0x8a75, 0x8a76, 0x8a77, 0x8a78, 0x8a79, - 0x8a7a, 0x8a7b, 0x8a7c, 0x8a7d, 0x8a81, 0x8a82, 0x8a83, 0x8a84, - 0x8a85, 0x8a86, 0x8a87, 0x8a88, 0x8a89, 0x8a8a, 0x8a8b, 0x8a8c, - 0x8a8d, 0x8a8e, 0x8a8f, 0x8a90, 0x8a91, 0x8a93, 0x8a94, 0x8a95, - 0x8a96, 0x8a97, 0x8a98, 0x8a99, 0x8a9a, 0x8a9b, 0x8a9c, 0x8a9d, - 0x8aa1, 0x8aa2, 0x8aa3, 0x8aa4, 0x8aa5, 0x8aa6, 0x8aa7, 0x8aa8, - 0x8aa9, 0x8aaa, 0x8aab, 0x8aac, 0x8aad, 0x8aae, 0x8aaf, 0x8ab0, - 0x8ab1, 0x8ab3, 0x8ab4, 0x8ab5, 0x8ab6, 0x8ab7, 0x8ab8, 0x8ab9, - 0x8aba, 0x8abb, 0x8abc, 0x8abd, 0x8ac1, 0x8ac2, 0x8ac3, 0x8ac4, - 0x8ac5, 0x8ac6, 0x8ac7, 0x8ac8, 0x8ac9, 0x8aca, 0x8acb, 0x8acc, - 0x8acd, 0x8ace, 0x8acf, 0x8ad0, 0x8ad1, 0x8ad3, 0x8ad4, 0x8ad5, - 0x8ad6, 0x8ad7, 0x8ad8, 0x8ad9, 0x8ada, 0x8adb, 0x8adc, 0x8add, - 0x8ae1, 0x8ae2, 0x8ae3, 0x8ae4, 0x8ae5, 0x8ae6, 0x8ae7, 0x8ae8, - 0x8ae9, 0x8aea, 0x8aeb, 0x8aec, 0x8aed, 0x8aee, 0x8aef, 0x8af0, - 0x8af1, 0x8af3, 0x8af4, 0x8af5, 0x8af6, 0x8af7, 0x8af8, 0x8af9, - 0x8afa, 0x8afb, 0x8afc, 0x8afd, 0x8b41, 0x8b42, 0x8b43, 0x8b44, - 0x8b45, 0x8b46, 0x8b47, 0x8b48, 0x8b49, 0x8b4a, 0x8b4b, 0x8b4c, - 0x8b4d, 0x8b4e, 0x8b4f, 0x8b50, 0x8b51, 0x8b53, 0x8b54, 0x8b55, - 0x8b56, 0x8b57, 0x8b58, 0x8b59, 0x8b5a, 0x8b5b, 0x8b5c, 0x8b5d, - 0x8b61, 0x8b62, 0x8b63, 0x8b64, 0x8b65, 0x8b66, 0x8b67, 0x8b68, - /* 0xae00 .. 0xaeff */ - 0x8b69, 0x8b6a, 0x8b6b, 0x8b6c, 0x8b6d, 0x8b6e, 0x8b6f, 0x8b70, - 0x8b71, 0x8b73, 0x8b74, 0x8b75, 0x8b76, 0x8b77, 0x8b78, 0x8b79, - 0x8b7a, 0x8b7b, 0x8b7c, 0x8b7d, 0x8b81, 0x8b82, 0x8b83, 0x8b84, - 0x8b85, 0x8b86, 0x8b87, 0x8b88, 0x8b89, 0x8b8a, 0x8b8b, 0x8b8c, - 0x8b8d, 0x8b8e, 0x8b8f, 0x8b90, 0x8b91, 0x8b93, 0x8b94, 0x8b95, - 0x8b96, 0x8b97, 0x8b98, 0x8b99, 0x8b9a, 0x8b9b, 0x8b9c, 0x8b9d, - 0x8ba1, 0x8ba2, 0x8ba3, 0x8ba4, 0x8ba5, 0x8ba6, 0x8ba7, 0x8ba8, - 0x8ba9, 0x8baa, 0x8bab, 0x8bac, 0x8bad, 0x8bae, 0x8baf, 0x8bb0, - 0x8bb1, 0x8bb3, 0x8bb4, 0x8bb5, 0x8bb6, 0x8bb7, 0x8bb8, 0x8bb9, - 0x8bba, 0x8bbb, 0x8bbc, 0x8bbd, 0x8c61, 0x8c62, 0x8c63, 0x8c64, - 0x8c65, 0x8c66, 0x8c67, 0x8c68, 0x8c69, 0x8c6a, 0x8c6b, 0x8c6c, - 0x8c6d, 0x8c6e, 0x8c6f, 0x8c70, 0x8c71, 0x8c73, 0x8c74, 0x8c75, - 0x8c76, 0x8c77, 0x8c78, 0x8c79, 0x8c7a, 0x8c7b, 0x8c7c, 0x8c7d, - 0x8c81, 0x8c82, 0x8c83, 0x8c84, 0x8c85, 0x8c86, 0x8c87, 0x8c88, - 0x8c89, 0x8c8a, 0x8c8b, 0x8c8c, 0x8c8d, 0x8c8e, 0x8c8f, 0x8c90, - 0x8c91, 0x8c93, 0x8c94, 0x8c95, 0x8c96, 0x8c97, 0x8c98, 0x8c99, - 0x8c9a, 0x8c9b, 0x8c9c, 0x8c9d, 0x8ca1, 0x8ca2, 0x8ca3, 0x8ca4, - 0x8ca5, 0x8ca6, 0x8ca7, 0x8ca8, 0x8ca9, 0x8caa, 0x8cab, 0x8cac, - 0x8cad, 0x8cae, 0x8caf, 0x8cb0, 0x8cb1, 0x8cb3, 0x8cb4, 0x8cb5, - 0x8cb6, 0x8cb7, 0x8cb8, 0x8cb9, 0x8cba, 0x8cbb, 0x8cbc, 0x8cbd, - 0x8cc1, 0x8cc2, 0x8cc3, 0x8cc4, 0x8cc5, 0x8cc6, 0x8cc7, 0x8cc8, - 0x8cc9, 0x8cca, 0x8ccb, 0x8ccc, 0x8ccd, 0x8cce, 0x8ccf, 0x8cd0, - 0x8cd1, 0x8cd3, 0x8cd4, 0x8cd5, 0x8cd6, 0x8cd7, 0x8cd8, 0x8cd9, - 0x8cda, 0x8cdb, 0x8cdc, 0x8cdd, 0x8ce1, 0x8ce2, 0x8ce3, 0x8ce4, - 0x8ce5, 0x8ce6, 0x8ce7, 0x8ce8, 0x8ce9, 0x8cea, 0x8ceb, 0x8cec, - 0x8ced, 0x8cee, 0x8cef, 0x8cf0, 0x8cf1, 0x8cf3, 0x8cf4, 0x8cf5, - 0x8cf6, 0x8cf7, 0x8cf8, 0x8cf9, 0x8cfa, 0x8cfb, 0x8cfc, 0x8cfd, - 0x8d41, 0x8d42, 0x8d43, 0x8d44, 0x8d45, 0x8d46, 0x8d47, 0x8d48, - 0x8d49, 0x8d4a, 0x8d4b, 0x8d4c, 0x8d4d, 0x8d4e, 0x8d4f, 0x8d50, - 0x8d51, 0x8d53, 0x8d54, 0x8d55, 0x8d56, 0x8d57, 0x8d58, 0x8d59, - 0x8d5a, 0x8d5b, 0x8d5c, 0x8d5d, 0x8d61, 0x8d62, 0x8d63, 0x8d64, - 0x8d65, 0x8d66, 0x8d67, 0x8d68, 0x8d69, 0x8d6a, 0x8d6b, 0x8d6c, - /* 0xaf00 .. 0xafff */ - 0x8d6d, 0x8d6e, 0x8d6f, 0x8d70, 0x8d71, 0x8d73, 0x8d74, 0x8d75, - 0x8d76, 0x8d77, 0x8d78, 0x8d79, 0x8d7a, 0x8d7b, 0x8d7c, 0x8d7d, - 0x8d81, 0x8d82, 0x8d83, 0x8d84, 0x8d85, 0x8d86, 0x8d87, 0x8d88, - 0x8d89, 0x8d8a, 0x8d8b, 0x8d8c, 0x8d8d, 0x8d8e, 0x8d8f, 0x8d90, - 0x8d91, 0x8d93, 0x8d94, 0x8d95, 0x8d96, 0x8d97, 0x8d98, 0x8d99, - 0x8d9a, 0x8d9b, 0x8d9c, 0x8d9d, 0x8da1, 0x8da2, 0x8da3, 0x8da4, - 0x8da5, 0x8da6, 0x8da7, 0x8da8, 0x8da9, 0x8daa, 0x8dab, 0x8dac, - 0x8dad, 0x8dae, 0x8daf, 0x8db0, 0x8db1, 0x8db3, 0x8db4, 0x8db5, - 0x8db6, 0x8db7, 0x8db8, 0x8db9, 0x8dba, 0x8dbb, 0x8dbc, 0x8dbd, - 0x8dc1, 0x8dc2, 0x8dc3, 0x8dc4, 0x8dc5, 0x8dc6, 0x8dc7, 0x8dc8, - 0x8dc9, 0x8dca, 0x8dcb, 0x8dcc, 0x8dcd, 0x8dce, 0x8dcf, 0x8dd0, - 0x8dd1, 0x8dd3, 0x8dd4, 0x8dd5, 0x8dd6, 0x8dd7, 0x8dd8, 0x8dd9, - 0x8dda, 0x8ddb, 0x8ddc, 0x8ddd, 0x8de1, 0x8de2, 0x8de3, 0x8de4, - 0x8de5, 0x8de6, 0x8de7, 0x8de8, 0x8de9, 0x8dea, 0x8deb, 0x8dec, - 0x8ded, 0x8dee, 0x8def, 0x8df0, 0x8df1, 0x8df3, 0x8df4, 0x8df5, - 0x8df6, 0x8df7, 0x8df8, 0x8df9, 0x8dfa, 0x8dfb, 0x8dfc, 0x8dfd, - 0x8e41, 0x8e42, 0x8e43, 0x8e44, 0x8e45, 0x8e46, 0x8e47, 0x8e48, - 0x8e49, 0x8e4a, 0x8e4b, 0x8e4c, 0x8e4d, 0x8e4e, 0x8e4f, 0x8e50, - 0x8e51, 0x8e53, 0x8e54, 0x8e55, 0x8e56, 0x8e57, 0x8e58, 0x8e59, - 0x8e5a, 0x8e5b, 0x8e5c, 0x8e5d, 0x8e61, 0x8e62, 0x8e63, 0x8e64, - 0x8e65, 0x8e66, 0x8e67, 0x8e68, 0x8e69, 0x8e6a, 0x8e6b, 0x8e6c, - 0x8e6d, 0x8e6e, 0x8e6f, 0x8e70, 0x8e71, 0x8e73, 0x8e74, 0x8e75, - 0x8e76, 0x8e77, 0x8e78, 0x8e79, 0x8e7a, 0x8e7b, 0x8e7c, 0x8e7d, - 0x8e81, 0x8e82, 0x8e83, 0x8e84, 0x8e85, 0x8e86, 0x8e87, 0x8e88, - 0x8e89, 0x8e8a, 0x8e8b, 0x8e8c, 0x8e8d, 0x8e8e, 0x8e8f, 0x8e90, - 0x8e91, 0x8e93, 0x8e94, 0x8e95, 0x8e96, 0x8e97, 0x8e98, 0x8e99, - 0x8e9a, 0x8e9b, 0x8e9c, 0x8e9d, 0x8ea1, 0x8ea2, 0x8ea3, 0x8ea4, - 0x8ea5, 0x8ea6, 0x8ea7, 0x8ea8, 0x8ea9, 0x8eaa, 0x8eab, 0x8eac, - 0x8ead, 0x8eae, 0x8eaf, 0x8eb0, 0x8eb1, 0x8eb3, 0x8eb4, 0x8eb5, - 0x8eb6, 0x8eb7, 0x8eb8, 0x8eb9, 0x8eba, 0x8ebb, 0x8ebc, 0x8ebd, - 0x8ec1, 0x8ec2, 0x8ec3, 0x8ec4, 0x8ec5, 0x8ec6, 0x8ec7, 0x8ec8, - 0x8ec9, 0x8eca, 0x8ecb, 0x8ecc, 0x8ecd, 0x8ece, 0x8ecf, 0x8ed0, - /* 0xb000 .. 0xb0ff */ - 0x8ed1, 0x8ed3, 0x8ed4, 0x8ed5, 0x8ed6, 0x8ed7, 0x8ed8, 0x8ed9, - 0x8eda, 0x8edb, 0x8edc, 0x8edd, 0x8ee1, 0x8ee2, 0x8ee3, 0x8ee4, - 0x8ee5, 0x8ee6, 0x8ee7, 0x8ee8, 0x8ee9, 0x8eea, 0x8eeb, 0x8eec, - 0x8eed, 0x8eee, 0x8eef, 0x8ef0, 0x8ef1, 0x8ef3, 0x8ef4, 0x8ef5, - 0x8ef6, 0x8ef7, 0x8ef8, 0x8ef9, 0x8efa, 0x8efb, 0x8efc, 0x8efd, - 0x8f41, 0x8f42, 0x8f43, 0x8f44, 0x8f45, 0x8f46, 0x8f47, 0x8f48, - 0x8f49, 0x8f4a, 0x8f4b, 0x8f4c, 0x8f4d, 0x8f4e, 0x8f4f, 0x8f50, - 0x8f51, 0x8f53, 0x8f54, 0x8f55, 0x8f56, 0x8f57, 0x8f58, 0x8f59, - 0x8f5a, 0x8f5b, 0x8f5c, 0x8f5d, 0x8f61, 0x8f62, 0x8f63, 0x8f64, - 0x8f65, 0x8f66, 0x8f67, 0x8f68, 0x8f69, 0x8f6a, 0x8f6b, 0x8f6c, - 0x8f6d, 0x8f6e, 0x8f6f, 0x8f70, 0x8f71, 0x8f73, 0x8f74, 0x8f75, - 0x8f76, 0x8f77, 0x8f78, 0x8f79, 0x8f7a, 0x8f7b, 0x8f7c, 0x8f7d, - 0x8f81, 0x8f82, 0x8f83, 0x8f84, 0x8f85, 0x8f86, 0x8f87, 0x8f88, - 0x8f89, 0x8f8a, 0x8f8b, 0x8f8c, 0x8f8d, 0x8f8e, 0x8f8f, 0x8f90, - 0x8f91, 0x8f93, 0x8f94, 0x8f95, 0x8f96, 0x8f97, 0x8f98, 0x8f99, - 0x8f9a, 0x8f9b, 0x8f9c, 0x8f9d, 0x8fa1, 0x8fa2, 0x8fa3, 0x8fa4, - 0x8fa5, 0x8fa6, 0x8fa7, 0x8fa8, 0x8fa9, 0x8faa, 0x8fab, 0x8fac, - 0x8fad, 0x8fae, 0x8faf, 0x8fb0, 0x8fb1, 0x8fb3, 0x8fb4, 0x8fb5, - 0x8fb6, 0x8fb7, 0x8fb8, 0x8fb9, 0x8fba, 0x8fbb, 0x8fbc, 0x8fbd, - 0x9061, 0x9062, 0x9063, 0x9064, 0x9065, 0x9066, 0x9067, 0x9068, - 0x9069, 0x906a, 0x906b, 0x906c, 0x906d, 0x906e, 0x906f, 0x9070, - 0x9071, 0x9073, 0x9074, 0x9075, 0x9076, 0x9077, 0x9078, 0x9079, - 0x907a, 0x907b, 0x907c, 0x907d, 0x9081, 0x9082, 0x9083, 0x9084, - 0x9085, 0x9086, 0x9087, 0x9088, 0x9089, 0x908a, 0x908b, 0x908c, - 0x908d, 0x908e, 0x908f, 0x9090, 0x9091, 0x9093, 0x9094, 0x9095, - 0x9096, 0x9097, 0x9098, 0x9099, 0x909a, 0x909b, 0x909c, 0x909d, - 0x90a1, 0x90a2, 0x90a3, 0x90a4, 0x90a5, 0x90a6, 0x90a7, 0x90a8, - 0x90a9, 0x90aa, 0x90ab, 0x90ac, 0x90ad, 0x90ae, 0x90af, 0x90b0, - 0x90b1, 0x90b3, 0x90b4, 0x90b5, 0x90b6, 0x90b7, 0x90b8, 0x90b9, - 0x90ba, 0x90bb, 0x90bc, 0x90bd, 0x90c1, 0x90c2, 0x90c3, 0x90c4, - 0x90c5, 0x90c6, 0x90c7, 0x90c8, 0x90c9, 0x90ca, 0x90cb, 0x90cc, - 0x90cd, 0x90ce, 0x90cf, 0x90d0, 0x90d1, 0x90d3, 0x90d4, 0x90d5, - /* 0xb100 .. 0xb1ff */ - 0x90d6, 0x90d7, 0x90d8, 0x90d9, 0x90da, 0x90db, 0x90dc, 0x90dd, - 0x90e1, 0x90e2, 0x90e3, 0x90e4, 0x90e5, 0x90e6, 0x90e7, 0x90e8, - 0x90e9, 0x90ea, 0x90eb, 0x90ec, 0x90ed, 0x90ee, 0x90ef, 0x90f0, - 0x90f1, 0x90f3, 0x90f4, 0x90f5, 0x90f6, 0x90f7, 0x90f8, 0x90f9, - 0x90fa, 0x90fb, 0x90fc, 0x90fd, 0x9141, 0x9142, 0x9143, 0x9144, - 0x9145, 0x9146, 0x9147, 0x9148, 0x9149, 0x914a, 0x914b, 0x914c, - 0x914d, 0x914e, 0x914f, 0x9150, 0x9151, 0x9153, 0x9154, 0x9155, - 0x9156, 0x9157, 0x9158, 0x9159, 0x915a, 0x915b, 0x915c, 0x915d, - 0x9161, 0x9162, 0x9163, 0x9164, 0x9165, 0x9166, 0x9167, 0x9168, - 0x9169, 0x916a, 0x916b, 0x916c, 0x916d, 0x916e, 0x916f, 0x9170, - 0x9171, 0x9173, 0x9174, 0x9175, 0x9176, 0x9177, 0x9178, 0x9179, - 0x917a, 0x917b, 0x917c, 0x917d, 0x9181, 0x9182, 0x9183, 0x9184, - 0x9185, 0x9186, 0x9187, 0x9188, 0x9189, 0x918a, 0x918b, 0x918c, - 0x918d, 0x918e, 0x918f, 0x9190, 0x9191, 0x9193, 0x9194, 0x9195, - 0x9196, 0x9197, 0x9198, 0x9199, 0x919a, 0x919b, 0x919c, 0x919d, - 0x91a1, 0x91a2, 0x91a3, 0x91a4, 0x91a5, 0x91a6, 0x91a7, 0x91a8, - 0x91a9, 0x91aa, 0x91ab, 0x91ac, 0x91ad, 0x91ae, 0x91af, 0x91b0, - 0x91b1, 0x91b3, 0x91b4, 0x91b5, 0x91b6, 0x91b7, 0x91b8, 0x91b9, - 0x91ba, 0x91bb, 0x91bc, 0x91bd, 0x91c1, 0x91c2, 0x91c3, 0x91c4, - 0x91c5, 0x91c6, 0x91c7, 0x91c8, 0x91c9, 0x91ca, 0x91cb, 0x91cc, - 0x91cd, 0x91ce, 0x91cf, 0x91d0, 0x91d1, 0x91d3, 0x91d4, 0x91d5, - 0x91d6, 0x91d7, 0x91d8, 0x91d9, 0x91da, 0x91db, 0x91dc, 0x91dd, - 0x91e1, 0x91e2, 0x91e3, 0x91e4, 0x91e5, 0x91e6, 0x91e7, 0x91e8, - 0x91e9, 0x91ea, 0x91eb, 0x91ec, 0x91ed, 0x91ee, 0x91ef, 0x91f0, - 0x91f1, 0x91f3, 0x91f4, 0x91f5, 0x91f6, 0x91f7, 0x91f8, 0x91f9, - 0x91fa, 0x91fb, 0x91fc, 0x91fd, 0x9241, 0x9242, 0x9243, 0x9244, - 0x9245, 0x9246, 0x9247, 0x9248, 0x9249, 0x924a, 0x924b, 0x924c, - 0x924d, 0x924e, 0x924f, 0x9250, 0x9251, 0x9253, 0x9254, 0x9255, - 0x9256, 0x9257, 0x9258, 0x9259, 0x925a, 0x925b, 0x925c, 0x925d, - 0x9261, 0x9262, 0x9263, 0x9264, 0x9265, 0x9266, 0x9267, 0x9268, - 0x9269, 0x926a, 0x926b, 0x926c, 0x926d, 0x926e, 0x926f, 0x9270, - 0x9271, 0x9273, 0x9274, 0x9275, 0x9276, 0x9277, 0x9278, 0x9279, - /* 0xb200 .. 0xb2ff */ - 0x927a, 0x927b, 0x927c, 0x927d, 0x9281, 0x9282, 0x9283, 0x9284, - 0x9285, 0x9286, 0x9287, 0x9288, 0x9289, 0x928a, 0x928b, 0x928c, - 0x928d, 0x928e, 0x928f, 0x9290, 0x9291, 0x9293, 0x9294, 0x9295, - 0x9296, 0x9297, 0x9298, 0x9299, 0x929a, 0x929b, 0x929c, 0x929d, - 0x92a1, 0x92a2, 0x92a3, 0x92a4, 0x92a5, 0x92a6, 0x92a7, 0x92a8, - 0x92a9, 0x92aa, 0x92ab, 0x92ac, 0x92ad, 0x92ae, 0x92af, 0x92b0, - 0x92b1, 0x92b3, 0x92b4, 0x92b5, 0x92b6, 0x92b7, 0x92b8, 0x92b9, - 0x92ba, 0x92bb, 0x92bc, 0x92bd, 0x92c1, 0x92c2, 0x92c3, 0x92c4, - 0x92c5, 0x92c6, 0x92c7, 0x92c8, 0x92c9, 0x92ca, 0x92cb, 0x92cc, - 0x92cd, 0x92ce, 0x92cf, 0x92d0, 0x92d1, 0x92d3, 0x92d4, 0x92d5, - 0x92d6, 0x92d7, 0x92d8, 0x92d9, 0x92da, 0x92db, 0x92dc, 0x92dd, - 0x92e1, 0x92e2, 0x92e3, 0x92e4, 0x92e5, 0x92e6, 0x92e7, 0x92e8, - 0x92e9, 0x92ea, 0x92eb, 0x92ec, 0x92ed, 0x92ee, 0x92ef, 0x92f0, - 0x92f1, 0x92f3, 0x92f4, 0x92f5, 0x92f6, 0x92f7, 0x92f8, 0x92f9, - 0x92fa, 0x92fb, 0x92fc, 0x92fd, 0x9341, 0x9342, 0x9343, 0x9344, - 0x9345, 0x9346, 0x9347, 0x9348, 0x9349, 0x934a, 0x934b, 0x934c, - 0x934d, 0x934e, 0x934f, 0x9350, 0x9351, 0x9353, 0x9354, 0x9355, - 0x9356, 0x9357, 0x9358, 0x9359, 0x935a, 0x935b, 0x935c, 0x935d, - 0x9361, 0x9362, 0x9363, 0x9364, 0x9365, 0x9366, 0x9367, 0x9368, - 0x9369, 0x936a, 0x936b, 0x936c, 0x936d, 0x936e, 0x936f, 0x9370, - 0x9371, 0x9373, 0x9374, 0x9375, 0x9376, 0x9377, 0x9378, 0x9379, - 0x937a, 0x937b, 0x937c, 0x937d, 0x9381, 0x9382, 0x9383, 0x9384, - 0x9385, 0x9386, 0x9387, 0x9388, 0x9389, 0x938a, 0x938b, 0x938c, - 0x938d, 0x938e, 0x938f, 0x9390, 0x9391, 0x9393, 0x9394, 0x9395, - 0x9396, 0x9397, 0x9398, 0x9399, 0x939a, 0x939b, 0x939c, 0x939d, - 0x93a1, 0x93a2, 0x93a3, 0x93a4, 0x93a5, 0x93a6, 0x93a7, 0x93a8, - 0x93a9, 0x93aa, 0x93ab, 0x93ac, 0x93ad, 0x93ae, 0x93af, 0x93b0, - 0x93b1, 0x93b3, 0x93b4, 0x93b5, 0x93b6, 0x93b7, 0x93b8, 0x93b9, - 0x93ba, 0x93bb, 0x93bc, 0x93bd, 0x9461, 0x9462, 0x9463, 0x9464, - 0x9465, 0x9466, 0x9467, 0x9468, 0x9469, 0x946a, 0x946b, 0x946c, - 0x946d, 0x946e, 0x946f, 0x9470, 0x9471, 0x9473, 0x9474, 0x9475, - 0x9476, 0x9477, 0x9478, 0x9479, 0x947a, 0x947b, 0x947c, 0x947d, - /* 0xb300 .. 0xb3ff */ - 0x9481, 0x9482, 0x9483, 0x9484, 0x9485, 0x9486, 0x9487, 0x9488, - 0x9489, 0x948a, 0x948b, 0x948c, 0x948d, 0x948e, 0x948f, 0x9490, - 0x9491, 0x9493, 0x9494, 0x9495, 0x9496, 0x9497, 0x9498, 0x9499, - 0x949a, 0x949b, 0x949c, 0x949d, 0x94a1, 0x94a2, 0x94a3, 0x94a4, - 0x94a5, 0x94a6, 0x94a7, 0x94a8, 0x94a9, 0x94aa, 0x94ab, 0x94ac, - 0x94ad, 0x94ae, 0x94af, 0x94b0, 0x94b1, 0x94b3, 0x94b4, 0x94b5, - 0x94b6, 0x94b7, 0x94b8, 0x94b9, 0x94ba, 0x94bb, 0x94bc, 0x94bd, - 0x94c1, 0x94c2, 0x94c3, 0x94c4, 0x94c5, 0x94c6, 0x94c7, 0x94c8, - 0x94c9, 0x94ca, 0x94cb, 0x94cc, 0x94cd, 0x94ce, 0x94cf, 0x94d0, - 0x94d1, 0x94d3, 0x94d4, 0x94d5, 0x94d6, 0x94d7, 0x94d8, 0x94d9, - 0x94da, 0x94db, 0x94dc, 0x94dd, 0x94e1, 0x94e2, 0x94e3, 0x94e4, - 0x94e5, 0x94e6, 0x94e7, 0x94e8, 0x94e9, 0x94ea, 0x94eb, 0x94ec, - 0x94ed, 0x94ee, 0x94ef, 0x94f0, 0x94f1, 0x94f3, 0x94f4, 0x94f5, - 0x94f6, 0x94f7, 0x94f8, 0x94f9, 0x94fa, 0x94fb, 0x94fc, 0x94fd, - 0x9541, 0x9542, 0x9543, 0x9544, 0x9545, 0x9546, 0x9547, 0x9548, - 0x9549, 0x954a, 0x954b, 0x954c, 0x954d, 0x954e, 0x954f, 0x9550, - 0x9551, 0x9553, 0x9554, 0x9555, 0x9556, 0x9557, 0x9558, 0x9559, - 0x955a, 0x955b, 0x955c, 0x955d, 0x9561, 0x9562, 0x9563, 0x9564, - 0x9565, 0x9566, 0x9567, 0x9568, 0x9569, 0x956a, 0x956b, 0x956c, - 0x956d, 0x956e, 0x956f, 0x9570, 0x9571, 0x9573, 0x9574, 0x9575, - 0x9576, 0x9577, 0x9578, 0x9579, 0x957a, 0x957b, 0x957c, 0x957d, - 0x9581, 0x9582, 0x9583, 0x9584, 0x9585, 0x9586, 0x9587, 0x9588, - 0x9589, 0x958a, 0x958b, 0x958c, 0x958d, 0x958e, 0x958f, 0x9590, - 0x9591, 0x9593, 0x9594, 0x9595, 0x9596, 0x9597, 0x9598, 0x9599, - 0x959a, 0x959b, 0x959c, 0x959d, 0x95a1, 0x95a2, 0x95a3, 0x95a4, - 0x95a5, 0x95a6, 0x95a7, 0x95a8, 0x95a9, 0x95aa, 0x95ab, 0x95ac, - 0x95ad, 0x95ae, 0x95af, 0x95b0, 0x95b1, 0x95b3, 0x95b4, 0x95b5, - 0x95b6, 0x95b7, 0x95b8, 0x95b9, 0x95ba, 0x95bb, 0x95bc, 0x95bd, - 0x95c1, 0x95c2, 0x95c3, 0x95c4, 0x95c5, 0x95c6, 0x95c7, 0x95c8, - 0x95c9, 0x95ca, 0x95cb, 0x95cc, 0x95cd, 0x95ce, 0x95cf, 0x95d0, - 0x95d1, 0x95d3, 0x95d4, 0x95d5, 0x95d6, 0x95d7, 0x95d8, 0x95d9, - 0x95da, 0x95db, 0x95dc, 0x95dd, 0x95e1, 0x95e2, 0x95e3, 0x95e4, - /* 0xb400 .. 0xb4ff */ - 0x95e5, 0x95e6, 0x95e7, 0x95e8, 0x95e9, 0x95ea, 0x95eb, 0x95ec, - 0x95ed, 0x95ee, 0x95ef, 0x95f0, 0x95f1, 0x95f3, 0x95f4, 0x95f5, - 0x95f6, 0x95f7, 0x95f8, 0x95f9, 0x95fa, 0x95fb, 0x95fc, 0x95fd, - 0x9641, 0x9642, 0x9643, 0x9644, 0x9645, 0x9646, 0x9647, 0x9648, - 0x9649, 0x964a, 0x964b, 0x964c, 0x964d, 0x964e, 0x964f, 0x9650, - 0x9651, 0x9653, 0x9654, 0x9655, 0x9656, 0x9657, 0x9658, 0x9659, - 0x965a, 0x965b, 0x965c, 0x965d, 0x9661, 0x9662, 0x9663, 0x9664, - 0x9665, 0x9666, 0x9667, 0x9668, 0x9669, 0x966a, 0x966b, 0x966c, - 0x966d, 0x966e, 0x966f, 0x9670, 0x9671, 0x9673, 0x9674, 0x9675, - 0x9676, 0x9677, 0x9678, 0x9679, 0x967a, 0x967b, 0x967c, 0x967d, - 0x9681, 0x9682, 0x9683, 0x9684, 0x9685, 0x9686, 0x9687, 0x9688, - 0x9689, 0x968a, 0x968b, 0x968c, 0x968d, 0x968e, 0x968f, 0x9690, - 0x9691, 0x9693, 0x9694, 0x9695, 0x9696, 0x9697, 0x9698, 0x9699, - 0x969a, 0x969b, 0x969c, 0x969d, 0x96a1, 0x96a2, 0x96a3, 0x96a4, - 0x96a5, 0x96a6, 0x96a7, 0x96a8, 0x96a9, 0x96aa, 0x96ab, 0x96ac, - 0x96ad, 0x96ae, 0x96af, 0x96b0, 0x96b1, 0x96b3, 0x96b4, 0x96b5, - 0x96b6, 0x96b7, 0x96b8, 0x96b9, 0x96ba, 0x96bb, 0x96bc, 0x96bd, - 0x96c1, 0x96c2, 0x96c3, 0x96c4, 0x96c5, 0x96c6, 0x96c7, 0x96c8, - 0x96c9, 0x96ca, 0x96cb, 0x96cc, 0x96cd, 0x96ce, 0x96cf, 0x96d0, - 0x96d1, 0x96d3, 0x96d4, 0x96d5, 0x96d6, 0x96d7, 0x96d8, 0x96d9, - 0x96da, 0x96db, 0x96dc, 0x96dd, 0x96e1, 0x96e2, 0x96e3, 0x96e4, - 0x96e5, 0x96e6, 0x96e7, 0x96e8, 0x96e9, 0x96ea, 0x96eb, 0x96ec, - 0x96ed, 0x96ee, 0x96ef, 0x96f0, 0x96f1, 0x96f3, 0x96f4, 0x96f5, - 0x96f6, 0x96f7, 0x96f8, 0x96f9, 0x96fa, 0x96fb, 0x96fc, 0x96fd, - 0x9741, 0x9742, 0x9743, 0x9744, 0x9745, 0x9746, 0x9747, 0x9748, - 0x9749, 0x974a, 0x974b, 0x974c, 0x974d, 0x974e, 0x974f, 0x9750, - 0x9751, 0x9753, 0x9754, 0x9755, 0x9756, 0x9757, 0x9758, 0x9759, - 0x975a, 0x975b, 0x975c, 0x975d, 0x9761, 0x9762, 0x9763, 0x9764, - 0x9765, 0x9766, 0x9767, 0x9768, 0x9769, 0x976a, 0x976b, 0x976c, - 0x976d, 0x976e, 0x976f, 0x9770, 0x9771, 0x9773, 0x9774, 0x9775, - 0x9776, 0x9777, 0x9778, 0x9779, 0x977a, 0x977b, 0x977c, 0x977d, - 0x9781, 0x9782, 0x9783, 0x9784, 0x9785, 0x9786, 0x9787, 0x9788, - /* 0xb500 .. 0xb5ff */ - 0x9789, 0x978a, 0x978b, 0x978c, 0x978d, 0x978e, 0x978f, 0x9790, - 0x9791, 0x9793, 0x9794, 0x9795, 0x9796, 0x9797, 0x9798, 0x9799, - 0x979a, 0x979b, 0x979c, 0x979d, 0x97a1, 0x97a2, 0x97a3, 0x97a4, - 0x97a5, 0x97a6, 0x97a7, 0x97a8, 0x97a9, 0x97aa, 0x97ab, 0x97ac, - 0x97ad, 0x97ae, 0x97af, 0x97b0, 0x97b1, 0x97b3, 0x97b4, 0x97b5, - 0x97b6, 0x97b7, 0x97b8, 0x97b9, 0x97ba, 0x97bb, 0x97bc, 0x97bd, - 0x9861, 0x9862, 0x9863, 0x9864, 0x9865, 0x9866, 0x9867, 0x9868, - 0x9869, 0x986a, 0x986b, 0x986c, 0x986d, 0x986e, 0x986f, 0x9870, - 0x9871, 0x9873, 0x9874, 0x9875, 0x9876, 0x9877, 0x9878, 0x9879, - 0x987a, 0x987b, 0x987c, 0x987d, 0x9881, 0x9882, 0x9883, 0x9884, - 0x9885, 0x9886, 0x9887, 0x9888, 0x9889, 0x988a, 0x988b, 0x988c, - 0x988d, 0x988e, 0x988f, 0x9890, 0x9891, 0x9893, 0x9894, 0x9895, - 0x9896, 0x9897, 0x9898, 0x9899, 0x989a, 0x989b, 0x989c, 0x989d, - 0x98a1, 0x98a2, 0x98a3, 0x98a4, 0x98a5, 0x98a6, 0x98a7, 0x98a8, - 0x98a9, 0x98aa, 0x98ab, 0x98ac, 0x98ad, 0x98ae, 0x98af, 0x98b0, - 0x98b1, 0x98b3, 0x98b4, 0x98b5, 0x98b6, 0x98b7, 0x98b8, 0x98b9, - 0x98ba, 0x98bb, 0x98bc, 0x98bd, 0x98c1, 0x98c2, 0x98c3, 0x98c4, - 0x98c5, 0x98c6, 0x98c7, 0x98c8, 0x98c9, 0x98ca, 0x98cb, 0x98cc, - 0x98cd, 0x98ce, 0x98cf, 0x98d0, 0x98d1, 0x98d3, 0x98d4, 0x98d5, - 0x98d6, 0x98d7, 0x98d8, 0x98d9, 0x98da, 0x98db, 0x98dc, 0x98dd, - 0x98e1, 0x98e2, 0x98e3, 0x98e4, 0x98e5, 0x98e6, 0x98e7, 0x98e8, - 0x98e9, 0x98ea, 0x98eb, 0x98ec, 0x98ed, 0x98ee, 0x98ef, 0x98f0, - 0x98f1, 0x98f3, 0x98f4, 0x98f5, 0x98f6, 0x98f7, 0x98f8, 0x98f9, - 0x98fa, 0x98fb, 0x98fc, 0x98fd, 0x9941, 0x9942, 0x9943, 0x9944, - 0x9945, 0x9946, 0x9947, 0x9948, 0x9949, 0x994a, 0x994b, 0x994c, - 0x994d, 0x994e, 0x994f, 0x9950, 0x9951, 0x9953, 0x9954, 0x9955, - 0x9956, 0x9957, 0x9958, 0x9959, 0x995a, 0x995b, 0x995c, 0x995d, - 0x9961, 0x9962, 0x9963, 0x9964, 0x9965, 0x9966, 0x9967, 0x9968, - 0x9969, 0x996a, 0x996b, 0x996c, 0x996d, 0x996e, 0x996f, 0x9970, - 0x9971, 0x9973, 0x9974, 0x9975, 0x9976, 0x9977, 0x9978, 0x9979, - 0x997a, 0x997b, 0x997c, 0x997d, 0x9981, 0x9982, 0x9983, 0x9984, - 0x9985, 0x9986, 0x9987, 0x9988, 0x9989, 0x998a, 0x998b, 0x998c, - /* 0xb600 .. 0xb6ff */ - 0x998d, 0x998e, 0x998f, 0x9990, 0x9991, 0x9993, 0x9994, 0x9995, - 0x9996, 0x9997, 0x9998, 0x9999, 0x999a, 0x999b, 0x999c, 0x999d, - 0x99a1, 0x99a2, 0x99a3, 0x99a4, 0x99a5, 0x99a6, 0x99a7, 0x99a8, - 0x99a9, 0x99aa, 0x99ab, 0x99ac, 0x99ad, 0x99ae, 0x99af, 0x99b0, - 0x99b1, 0x99b3, 0x99b4, 0x99b5, 0x99b6, 0x99b7, 0x99b8, 0x99b9, - 0x99ba, 0x99bb, 0x99bc, 0x99bd, 0x99c1, 0x99c2, 0x99c3, 0x99c4, - 0x99c5, 0x99c6, 0x99c7, 0x99c8, 0x99c9, 0x99ca, 0x99cb, 0x99cc, - 0x99cd, 0x99ce, 0x99cf, 0x99d0, 0x99d1, 0x99d3, 0x99d4, 0x99d5, - 0x99d6, 0x99d7, 0x99d8, 0x99d9, 0x99da, 0x99db, 0x99dc, 0x99dd, - 0x99e1, 0x99e2, 0x99e3, 0x99e4, 0x99e5, 0x99e6, 0x99e7, 0x99e8, - 0x99e9, 0x99ea, 0x99eb, 0x99ec, 0x99ed, 0x99ee, 0x99ef, 0x99f0, - 0x99f1, 0x99f3, 0x99f4, 0x99f5, 0x99f6, 0x99f7, 0x99f8, 0x99f9, - 0x99fa, 0x99fb, 0x99fc, 0x99fd, 0x9a41, 0x9a42, 0x9a43, 0x9a44, - 0x9a45, 0x9a46, 0x9a47, 0x9a48, 0x9a49, 0x9a4a, 0x9a4b, 0x9a4c, - 0x9a4d, 0x9a4e, 0x9a4f, 0x9a50, 0x9a51, 0x9a53, 0x9a54, 0x9a55, - 0x9a56, 0x9a57, 0x9a58, 0x9a59, 0x9a5a, 0x9a5b, 0x9a5c, 0x9a5d, - 0x9a61, 0x9a62, 0x9a63, 0x9a64, 0x9a65, 0x9a66, 0x9a67, 0x9a68, - 0x9a69, 0x9a6a, 0x9a6b, 0x9a6c, 0x9a6d, 0x9a6e, 0x9a6f, 0x9a70, - 0x9a71, 0x9a73, 0x9a74, 0x9a75, 0x9a76, 0x9a77, 0x9a78, 0x9a79, - 0x9a7a, 0x9a7b, 0x9a7c, 0x9a7d, 0x9a81, 0x9a82, 0x9a83, 0x9a84, - 0x9a85, 0x9a86, 0x9a87, 0x9a88, 0x9a89, 0x9a8a, 0x9a8b, 0x9a8c, - 0x9a8d, 0x9a8e, 0x9a8f, 0x9a90, 0x9a91, 0x9a93, 0x9a94, 0x9a95, - 0x9a96, 0x9a97, 0x9a98, 0x9a99, 0x9a9a, 0x9a9b, 0x9a9c, 0x9a9d, - 0x9aa1, 0x9aa2, 0x9aa3, 0x9aa4, 0x9aa5, 0x9aa6, 0x9aa7, 0x9aa8, - 0x9aa9, 0x9aaa, 0x9aab, 0x9aac, 0x9aad, 0x9aae, 0x9aaf, 0x9ab0, - 0x9ab1, 0x9ab3, 0x9ab4, 0x9ab5, 0x9ab6, 0x9ab7, 0x9ab8, 0x9ab9, - 0x9aba, 0x9abb, 0x9abc, 0x9abd, 0x9ac1, 0x9ac2, 0x9ac3, 0x9ac4, - 0x9ac5, 0x9ac6, 0x9ac7, 0x9ac8, 0x9ac9, 0x9aca, 0x9acb, 0x9acc, - 0x9acd, 0x9ace, 0x9acf, 0x9ad0, 0x9ad1, 0x9ad3, 0x9ad4, 0x9ad5, - 0x9ad6, 0x9ad7, 0x9ad8, 0x9ad9, 0x9ada, 0x9adb, 0x9adc, 0x9add, - 0x9ae1, 0x9ae2, 0x9ae3, 0x9ae4, 0x9ae5, 0x9ae6, 0x9ae7, 0x9ae8, - 0x9ae9, 0x9aea, 0x9aeb, 0x9aec, 0x9aed, 0x9aee, 0x9aef, 0x9af0, - /* 0xb700 .. 0xb7ff */ - 0x9af1, 0x9af3, 0x9af4, 0x9af5, 0x9af6, 0x9af7, 0x9af8, 0x9af9, - 0x9afa, 0x9afb, 0x9afc, 0x9afd, 0x9b41, 0x9b42, 0x9b43, 0x9b44, - 0x9b45, 0x9b46, 0x9b47, 0x9b48, 0x9b49, 0x9b4a, 0x9b4b, 0x9b4c, - 0x9b4d, 0x9b4e, 0x9b4f, 0x9b50, 0x9b51, 0x9b53, 0x9b54, 0x9b55, - 0x9b56, 0x9b57, 0x9b58, 0x9b59, 0x9b5a, 0x9b5b, 0x9b5c, 0x9b5d, - 0x9b61, 0x9b62, 0x9b63, 0x9b64, 0x9b65, 0x9b66, 0x9b67, 0x9b68, - 0x9b69, 0x9b6a, 0x9b6b, 0x9b6c, 0x9b6d, 0x9b6e, 0x9b6f, 0x9b70, - 0x9b71, 0x9b73, 0x9b74, 0x9b75, 0x9b76, 0x9b77, 0x9b78, 0x9b79, - 0x9b7a, 0x9b7b, 0x9b7c, 0x9b7d, 0x9b81, 0x9b82, 0x9b83, 0x9b84, - 0x9b85, 0x9b86, 0x9b87, 0x9b88, 0x9b89, 0x9b8a, 0x9b8b, 0x9b8c, - 0x9b8d, 0x9b8e, 0x9b8f, 0x9b90, 0x9b91, 0x9b93, 0x9b94, 0x9b95, - 0x9b96, 0x9b97, 0x9b98, 0x9b99, 0x9b9a, 0x9b9b, 0x9b9c, 0x9b9d, - 0x9ba1, 0x9ba2, 0x9ba3, 0x9ba4, 0x9ba5, 0x9ba6, 0x9ba7, 0x9ba8, - 0x9ba9, 0x9baa, 0x9bab, 0x9bac, 0x9bad, 0x9bae, 0x9baf, 0x9bb0, - 0x9bb1, 0x9bb3, 0x9bb4, 0x9bb5, 0x9bb6, 0x9bb7, 0x9bb8, 0x9bb9, - 0x9bba, 0x9bbb, 0x9bbc, 0x9bbd, 0x9c61, 0x9c62, 0x9c63, 0x9c64, - 0x9c65, 0x9c66, 0x9c67, 0x9c68, 0x9c69, 0x9c6a, 0x9c6b, 0x9c6c, - 0x9c6d, 0x9c6e, 0x9c6f, 0x9c70, 0x9c71, 0x9c73, 0x9c74, 0x9c75, - 0x9c76, 0x9c77, 0x9c78, 0x9c79, 0x9c7a, 0x9c7b, 0x9c7c, 0x9c7d, - 0x9c81, 0x9c82, 0x9c83, 0x9c84, 0x9c85, 0x9c86, 0x9c87, 0x9c88, - 0x9c89, 0x9c8a, 0x9c8b, 0x9c8c, 0x9c8d, 0x9c8e, 0x9c8f, 0x9c90, - 0x9c91, 0x9c93, 0x9c94, 0x9c95, 0x9c96, 0x9c97, 0x9c98, 0x9c99, - 0x9c9a, 0x9c9b, 0x9c9c, 0x9c9d, 0x9ca1, 0x9ca2, 0x9ca3, 0x9ca4, - 0x9ca5, 0x9ca6, 0x9ca7, 0x9ca8, 0x9ca9, 0x9caa, 0x9cab, 0x9cac, - 0x9cad, 0x9cae, 0x9caf, 0x9cb0, 0x9cb1, 0x9cb3, 0x9cb4, 0x9cb5, - 0x9cb6, 0x9cb7, 0x9cb8, 0x9cb9, 0x9cba, 0x9cbb, 0x9cbc, 0x9cbd, - 0x9cc1, 0x9cc2, 0x9cc3, 0x9cc4, 0x9cc5, 0x9cc6, 0x9cc7, 0x9cc8, - 0x9cc9, 0x9cca, 0x9ccb, 0x9ccc, 0x9ccd, 0x9cce, 0x9ccf, 0x9cd0, - 0x9cd1, 0x9cd3, 0x9cd4, 0x9cd5, 0x9cd6, 0x9cd7, 0x9cd8, 0x9cd9, - 0x9cda, 0x9cdb, 0x9cdc, 0x9cdd, 0x9ce1, 0x9ce2, 0x9ce3, 0x9ce4, - 0x9ce5, 0x9ce6, 0x9ce7, 0x9ce8, 0x9ce9, 0x9cea, 0x9ceb, 0x9cec, - 0x9ced, 0x9cee, 0x9cef, 0x9cf0, 0x9cf1, 0x9cf3, 0x9cf4, 0x9cf5, - /* 0xb800 .. 0xb8ff */ - 0x9cf6, 0x9cf7, 0x9cf8, 0x9cf9, 0x9cfa, 0x9cfb, 0x9cfc, 0x9cfd, - 0x9d41, 0x9d42, 0x9d43, 0x9d44, 0x9d45, 0x9d46, 0x9d47, 0x9d48, - 0x9d49, 0x9d4a, 0x9d4b, 0x9d4c, 0x9d4d, 0x9d4e, 0x9d4f, 0x9d50, - 0x9d51, 0x9d53, 0x9d54, 0x9d55, 0x9d56, 0x9d57, 0x9d58, 0x9d59, - 0x9d5a, 0x9d5b, 0x9d5c, 0x9d5d, 0x9d61, 0x9d62, 0x9d63, 0x9d64, - 0x9d65, 0x9d66, 0x9d67, 0x9d68, 0x9d69, 0x9d6a, 0x9d6b, 0x9d6c, - 0x9d6d, 0x9d6e, 0x9d6f, 0x9d70, 0x9d71, 0x9d73, 0x9d74, 0x9d75, - 0x9d76, 0x9d77, 0x9d78, 0x9d79, 0x9d7a, 0x9d7b, 0x9d7c, 0x9d7d, - 0x9d81, 0x9d82, 0x9d83, 0x9d84, 0x9d85, 0x9d86, 0x9d87, 0x9d88, - 0x9d89, 0x9d8a, 0x9d8b, 0x9d8c, 0x9d8d, 0x9d8e, 0x9d8f, 0x9d90, - 0x9d91, 0x9d93, 0x9d94, 0x9d95, 0x9d96, 0x9d97, 0x9d98, 0x9d99, - 0x9d9a, 0x9d9b, 0x9d9c, 0x9d9d, 0x9da1, 0x9da2, 0x9da3, 0x9da4, - 0x9da5, 0x9da6, 0x9da7, 0x9da8, 0x9da9, 0x9daa, 0x9dab, 0x9dac, - 0x9dad, 0x9dae, 0x9daf, 0x9db0, 0x9db1, 0x9db3, 0x9db4, 0x9db5, - 0x9db6, 0x9db7, 0x9db8, 0x9db9, 0x9dba, 0x9dbb, 0x9dbc, 0x9dbd, - 0x9dc1, 0x9dc2, 0x9dc3, 0x9dc4, 0x9dc5, 0x9dc6, 0x9dc7, 0x9dc8, - 0x9dc9, 0x9dca, 0x9dcb, 0x9dcc, 0x9dcd, 0x9dce, 0x9dcf, 0x9dd0, - 0x9dd1, 0x9dd3, 0x9dd4, 0x9dd5, 0x9dd6, 0x9dd7, 0x9dd8, 0x9dd9, - 0x9dda, 0x9ddb, 0x9ddc, 0x9ddd, 0x9de1, 0x9de2, 0x9de3, 0x9de4, - 0x9de5, 0x9de6, 0x9de7, 0x9de8, 0x9de9, 0x9dea, 0x9deb, 0x9dec, - 0x9ded, 0x9dee, 0x9def, 0x9df0, 0x9df1, 0x9df3, 0x9df4, 0x9df5, - 0x9df6, 0x9df7, 0x9df8, 0x9df9, 0x9dfa, 0x9dfb, 0x9dfc, 0x9dfd, - 0x9e41, 0x9e42, 0x9e43, 0x9e44, 0x9e45, 0x9e46, 0x9e47, 0x9e48, - 0x9e49, 0x9e4a, 0x9e4b, 0x9e4c, 0x9e4d, 0x9e4e, 0x9e4f, 0x9e50, - 0x9e51, 0x9e53, 0x9e54, 0x9e55, 0x9e56, 0x9e57, 0x9e58, 0x9e59, - 0x9e5a, 0x9e5b, 0x9e5c, 0x9e5d, 0x9e61, 0x9e62, 0x9e63, 0x9e64, - 0x9e65, 0x9e66, 0x9e67, 0x9e68, 0x9e69, 0x9e6a, 0x9e6b, 0x9e6c, - 0x9e6d, 0x9e6e, 0x9e6f, 0x9e70, 0x9e71, 0x9e73, 0x9e74, 0x9e75, - 0x9e76, 0x9e77, 0x9e78, 0x9e79, 0x9e7a, 0x9e7b, 0x9e7c, 0x9e7d, - 0x9e81, 0x9e82, 0x9e83, 0x9e84, 0x9e85, 0x9e86, 0x9e87, 0x9e88, - 0x9e89, 0x9e8a, 0x9e8b, 0x9e8c, 0x9e8d, 0x9e8e, 0x9e8f, 0x9e90, - 0x9e91, 0x9e93, 0x9e94, 0x9e95, 0x9e96, 0x9e97, 0x9e98, 0x9e99, - /* 0xb900 .. 0xb9ff */ - 0x9e9a, 0x9e9b, 0x9e9c, 0x9e9d, 0x9ea1, 0x9ea2, 0x9ea3, 0x9ea4, - 0x9ea5, 0x9ea6, 0x9ea7, 0x9ea8, 0x9ea9, 0x9eaa, 0x9eab, 0x9eac, - 0x9ead, 0x9eae, 0x9eaf, 0x9eb0, 0x9eb1, 0x9eb3, 0x9eb4, 0x9eb5, - 0x9eb6, 0x9eb7, 0x9eb8, 0x9eb9, 0x9eba, 0x9ebb, 0x9ebc, 0x9ebd, - 0x9ec1, 0x9ec2, 0x9ec3, 0x9ec4, 0x9ec5, 0x9ec6, 0x9ec7, 0x9ec8, - 0x9ec9, 0x9eca, 0x9ecb, 0x9ecc, 0x9ecd, 0x9ece, 0x9ecf, 0x9ed0, - 0x9ed1, 0x9ed3, 0x9ed4, 0x9ed5, 0x9ed6, 0x9ed7, 0x9ed8, 0x9ed9, - 0x9eda, 0x9edb, 0x9edc, 0x9edd, 0x9ee1, 0x9ee2, 0x9ee3, 0x9ee4, - 0x9ee5, 0x9ee6, 0x9ee7, 0x9ee8, 0x9ee9, 0x9eea, 0x9eeb, 0x9eec, - 0x9eed, 0x9eee, 0x9eef, 0x9ef0, 0x9ef1, 0x9ef3, 0x9ef4, 0x9ef5, - 0x9ef6, 0x9ef7, 0x9ef8, 0x9ef9, 0x9efa, 0x9efb, 0x9efc, 0x9efd, - 0x9f41, 0x9f42, 0x9f43, 0x9f44, 0x9f45, 0x9f46, 0x9f47, 0x9f48, - 0x9f49, 0x9f4a, 0x9f4b, 0x9f4c, 0x9f4d, 0x9f4e, 0x9f4f, 0x9f50, - 0x9f51, 0x9f53, 0x9f54, 0x9f55, 0x9f56, 0x9f57, 0x9f58, 0x9f59, - 0x9f5a, 0x9f5b, 0x9f5c, 0x9f5d, 0x9f61, 0x9f62, 0x9f63, 0x9f64, - 0x9f65, 0x9f66, 0x9f67, 0x9f68, 0x9f69, 0x9f6a, 0x9f6b, 0x9f6c, - 0x9f6d, 0x9f6e, 0x9f6f, 0x9f70, 0x9f71, 0x9f73, 0x9f74, 0x9f75, - 0x9f76, 0x9f77, 0x9f78, 0x9f79, 0x9f7a, 0x9f7b, 0x9f7c, 0x9f7d, - 0x9f81, 0x9f82, 0x9f83, 0x9f84, 0x9f85, 0x9f86, 0x9f87, 0x9f88, - 0x9f89, 0x9f8a, 0x9f8b, 0x9f8c, 0x9f8d, 0x9f8e, 0x9f8f, 0x9f90, - 0x9f91, 0x9f93, 0x9f94, 0x9f95, 0x9f96, 0x9f97, 0x9f98, 0x9f99, - 0x9f9a, 0x9f9b, 0x9f9c, 0x9f9d, 0x9fa1, 0x9fa2, 0x9fa3, 0x9fa4, - 0x9fa5, 0x9fa6, 0x9fa7, 0x9fa8, 0x9fa9, 0x9faa, 0x9fab, 0x9fac, - 0x9fad, 0x9fae, 0x9faf, 0x9fb0, 0x9fb1, 0x9fb3, 0x9fb4, 0x9fb5, - 0x9fb6, 0x9fb7, 0x9fb8, 0x9fb9, 0x9fba, 0x9fbb, 0x9fbc, 0x9fbd, - 0xa061, 0xa062, 0xa063, 0xa064, 0xa065, 0xa066, 0xa067, 0xa068, - 0xa069, 0xa06a, 0xa06b, 0xa06c, 0xa06d, 0xa06e, 0xa06f, 0xa070, - 0xa071, 0xa073, 0xa074, 0xa075, 0xa076, 0xa077, 0xa078, 0xa079, - 0xa07a, 0xa07b, 0xa07c, 0xa07d, 0xa081, 0xa082, 0xa083, 0xa084, - 0xa085, 0xa086, 0xa087, 0xa088, 0xa089, 0xa08a, 0xa08b, 0xa08c, - 0xa08d, 0xa08e, 0xa08f, 0xa090, 0xa091, 0xa093, 0xa094, 0xa095, - 0xa096, 0xa097, 0xa098, 0xa099, 0xa09a, 0xa09b, 0xa09c, 0xa09d, - /* 0xba00 .. 0xbaff */ - 0xa0a1, 0xa0a2, 0xa0a3, 0xa0a4, 0xa0a5, 0xa0a6, 0xa0a7, 0xa0a8, - 0xa0a9, 0xa0aa, 0xa0ab, 0xa0ac, 0xa0ad, 0xa0ae, 0xa0af, 0xa0b0, - 0xa0b1, 0xa0b3, 0xa0b4, 0xa0b5, 0xa0b6, 0xa0b7, 0xa0b8, 0xa0b9, - 0xa0ba, 0xa0bb, 0xa0bc, 0xa0bd, 0xa0c1, 0xa0c2, 0xa0c3, 0xa0c4, - 0xa0c5, 0xa0c6, 0xa0c7, 0xa0c8, 0xa0c9, 0xa0ca, 0xa0cb, 0xa0cc, - 0xa0cd, 0xa0ce, 0xa0cf, 0xa0d0, 0xa0d1, 0xa0d3, 0xa0d4, 0xa0d5, - 0xa0d6, 0xa0d7, 0xa0d8, 0xa0d9, 0xa0da, 0xa0db, 0xa0dc, 0xa0dd, - 0xa0e1, 0xa0e2, 0xa0e3, 0xa0e4, 0xa0e5, 0xa0e6, 0xa0e7, 0xa0e8, - 0xa0e9, 0xa0ea, 0xa0eb, 0xa0ec, 0xa0ed, 0xa0ee, 0xa0ef, 0xa0f0, - 0xa0f1, 0xa0f3, 0xa0f4, 0xa0f5, 0xa0f6, 0xa0f7, 0xa0f8, 0xa0f9, - 0xa0fa, 0xa0fb, 0xa0fc, 0xa0fd, 0xa141, 0xa142, 0xa143, 0xa144, - 0xa145, 0xa146, 0xa147, 0xa148, 0xa149, 0xa14a, 0xa14b, 0xa14c, - 0xa14d, 0xa14e, 0xa14f, 0xa150, 0xa151, 0xa153, 0xa154, 0xa155, - 0xa156, 0xa157, 0xa158, 0xa159, 0xa15a, 0xa15b, 0xa15c, 0xa15d, - 0xa161, 0xa162, 0xa163, 0xa164, 0xa165, 0xa166, 0xa167, 0xa168, - 0xa169, 0xa16a, 0xa16b, 0xa16c, 0xa16d, 0xa16e, 0xa16f, 0xa170, - 0xa171, 0xa173, 0xa174, 0xa175, 0xa176, 0xa177, 0xa178, 0xa179, - 0xa17a, 0xa17b, 0xa17c, 0xa17d, 0xa181, 0xa182, 0xa183, 0xa184, - 0xa185, 0xa186, 0xa187, 0xa188, 0xa189, 0xa18a, 0xa18b, 0xa18c, - 0xa18d, 0xa18e, 0xa18f, 0xa190, 0xa191, 0xa193, 0xa194, 0xa195, - 0xa196, 0xa197, 0xa198, 0xa199, 0xa19a, 0xa19b, 0xa19c, 0xa19d, - 0xa1a1, 0xa1a2, 0xa1a3, 0xa1a4, 0xa1a5, 0xa1a6, 0xa1a7, 0xa1a8, - 0xa1a9, 0xa1aa, 0xa1ab, 0xa1ac, 0xa1ad, 0xa1ae, 0xa1af, 0xa1b0, - 0xa1b1, 0xa1b3, 0xa1b4, 0xa1b5, 0xa1b6, 0xa1b7, 0xa1b8, 0xa1b9, - 0xa1ba, 0xa1bb, 0xa1bc, 0xa1bd, 0xa1c1, 0xa1c2, 0xa1c3, 0xa1c4, - 0xa1c5, 0xa1c6, 0xa1c7, 0xa1c8, 0xa1c9, 0xa1ca, 0xa1cb, 0xa1cc, - 0xa1cd, 0xa1ce, 0xa1cf, 0xa1d0, 0xa1d1, 0xa1d3, 0xa1d4, 0xa1d5, - 0xa1d6, 0xa1d7, 0xa1d8, 0xa1d9, 0xa1da, 0xa1db, 0xa1dc, 0xa1dd, - 0xa1e1, 0xa1e2, 0xa1e3, 0xa1e4, 0xa1e5, 0xa1e6, 0xa1e7, 0xa1e8, - 0xa1e9, 0xa1ea, 0xa1eb, 0xa1ec, 0xa1ed, 0xa1ee, 0xa1ef, 0xa1f0, - 0xa1f1, 0xa1f3, 0xa1f4, 0xa1f5, 0xa1f6, 0xa1f7, 0xa1f8, 0xa1f9, - 0xa1fa, 0xa1fb, 0xa1fc, 0xa1fd, 0xa241, 0xa242, 0xa243, 0xa244, - /* 0xbb00 .. 0xbbff */ - 0xa245, 0xa246, 0xa247, 0xa248, 0xa249, 0xa24a, 0xa24b, 0xa24c, - 0xa24d, 0xa24e, 0xa24f, 0xa250, 0xa251, 0xa253, 0xa254, 0xa255, - 0xa256, 0xa257, 0xa258, 0xa259, 0xa25a, 0xa25b, 0xa25c, 0xa25d, - 0xa261, 0xa262, 0xa263, 0xa264, 0xa265, 0xa266, 0xa267, 0xa268, - 0xa269, 0xa26a, 0xa26b, 0xa26c, 0xa26d, 0xa26e, 0xa26f, 0xa270, - 0xa271, 0xa273, 0xa274, 0xa275, 0xa276, 0xa277, 0xa278, 0xa279, - 0xa27a, 0xa27b, 0xa27c, 0xa27d, 0xa281, 0xa282, 0xa283, 0xa284, - 0xa285, 0xa286, 0xa287, 0xa288, 0xa289, 0xa28a, 0xa28b, 0xa28c, - 0xa28d, 0xa28e, 0xa28f, 0xa290, 0xa291, 0xa293, 0xa294, 0xa295, - 0xa296, 0xa297, 0xa298, 0xa299, 0xa29a, 0xa29b, 0xa29c, 0xa29d, - 0xa2a1, 0xa2a2, 0xa2a3, 0xa2a4, 0xa2a5, 0xa2a6, 0xa2a7, 0xa2a8, - 0xa2a9, 0xa2aa, 0xa2ab, 0xa2ac, 0xa2ad, 0xa2ae, 0xa2af, 0xa2b0, - 0xa2b1, 0xa2b3, 0xa2b4, 0xa2b5, 0xa2b6, 0xa2b7, 0xa2b8, 0xa2b9, - 0xa2ba, 0xa2bb, 0xa2bc, 0xa2bd, 0xa2c1, 0xa2c2, 0xa2c3, 0xa2c4, - 0xa2c5, 0xa2c6, 0xa2c7, 0xa2c8, 0xa2c9, 0xa2ca, 0xa2cb, 0xa2cc, - 0xa2cd, 0xa2ce, 0xa2cf, 0xa2d0, 0xa2d1, 0xa2d3, 0xa2d4, 0xa2d5, - 0xa2d6, 0xa2d7, 0xa2d8, 0xa2d9, 0xa2da, 0xa2db, 0xa2dc, 0xa2dd, - 0xa2e1, 0xa2e2, 0xa2e3, 0xa2e4, 0xa2e5, 0xa2e6, 0xa2e7, 0xa2e8, - 0xa2e9, 0xa2ea, 0xa2eb, 0xa2ec, 0xa2ed, 0xa2ee, 0xa2ef, 0xa2f0, - 0xa2f1, 0xa2f3, 0xa2f4, 0xa2f5, 0xa2f6, 0xa2f7, 0xa2f8, 0xa2f9, - 0xa2fa, 0xa2fb, 0xa2fc, 0xa2fd, 0xa341, 0xa342, 0xa343, 0xa344, - 0xa345, 0xa346, 0xa347, 0xa348, 0xa349, 0xa34a, 0xa34b, 0xa34c, - 0xa34d, 0xa34e, 0xa34f, 0xa350, 0xa351, 0xa353, 0xa354, 0xa355, - 0xa356, 0xa357, 0xa358, 0xa359, 0xa35a, 0xa35b, 0xa35c, 0xa35d, - 0xa361, 0xa362, 0xa363, 0xa364, 0xa365, 0xa366, 0xa367, 0xa368, - 0xa369, 0xa36a, 0xa36b, 0xa36c, 0xa36d, 0xa36e, 0xa36f, 0xa370, - 0xa371, 0xa373, 0xa374, 0xa375, 0xa376, 0xa377, 0xa378, 0xa379, - 0xa37a, 0xa37b, 0xa37c, 0xa37d, 0xa381, 0xa382, 0xa383, 0xa384, - 0xa385, 0xa386, 0xa387, 0xa388, 0xa389, 0xa38a, 0xa38b, 0xa38c, - 0xa38d, 0xa38e, 0xa38f, 0xa390, 0xa391, 0xa393, 0xa394, 0xa395, - 0xa396, 0xa397, 0xa398, 0xa399, 0xa39a, 0xa39b, 0xa39c, 0xa39d, - 0xa3a1, 0xa3a2, 0xa3a3, 0xa3a4, 0xa3a5, 0xa3a6, 0xa3a7, 0xa3a8, - /* 0xbc00 .. 0xbcff */ - 0xa3a9, 0xa3aa, 0xa3ab, 0xa3ac, 0xa3ad, 0xa3ae, 0xa3af, 0xa3b0, - 0xa3b1, 0xa3b3, 0xa3b4, 0xa3b5, 0xa3b6, 0xa3b7, 0xa3b8, 0xa3b9, - 0xa3ba, 0xa3bb, 0xa3bc, 0xa3bd, 0xa461, 0xa462, 0xa463, 0xa464, - 0xa465, 0xa466, 0xa467, 0xa468, 0xa469, 0xa46a, 0xa46b, 0xa46c, - 0xa46d, 0xa46e, 0xa46f, 0xa470, 0xa471, 0xa473, 0xa474, 0xa475, - 0xa476, 0xa477, 0xa478, 0xa479, 0xa47a, 0xa47b, 0xa47c, 0xa47d, - 0xa481, 0xa482, 0xa483, 0xa484, 0xa485, 0xa486, 0xa487, 0xa488, - 0xa489, 0xa48a, 0xa48b, 0xa48c, 0xa48d, 0xa48e, 0xa48f, 0xa490, - 0xa491, 0xa493, 0xa494, 0xa495, 0xa496, 0xa497, 0xa498, 0xa499, - 0xa49a, 0xa49b, 0xa49c, 0xa49d, 0xa4a1, 0xa4a2, 0xa4a3, 0xa4a4, - 0xa4a5, 0xa4a6, 0xa4a7, 0xa4a8, 0xa4a9, 0xa4aa, 0xa4ab, 0xa4ac, - 0xa4ad, 0xa4ae, 0xa4af, 0xa4b0, 0xa4b1, 0xa4b3, 0xa4b4, 0xa4b5, - 0xa4b6, 0xa4b7, 0xa4b8, 0xa4b9, 0xa4ba, 0xa4bb, 0xa4bc, 0xa4bd, - 0xa4c1, 0xa4c2, 0xa4c3, 0xa4c4, 0xa4c5, 0xa4c6, 0xa4c7, 0xa4c8, - 0xa4c9, 0xa4ca, 0xa4cb, 0xa4cc, 0xa4cd, 0xa4ce, 0xa4cf, 0xa4d0, - 0xa4d1, 0xa4d3, 0xa4d4, 0xa4d5, 0xa4d6, 0xa4d7, 0xa4d8, 0xa4d9, - 0xa4da, 0xa4db, 0xa4dc, 0xa4dd, 0xa4e1, 0xa4e2, 0xa4e3, 0xa4e4, - 0xa4e5, 0xa4e6, 0xa4e7, 0xa4e8, 0xa4e9, 0xa4ea, 0xa4eb, 0xa4ec, - 0xa4ed, 0xa4ee, 0xa4ef, 0xa4f0, 0xa4f1, 0xa4f3, 0xa4f4, 0xa4f5, - 0xa4f6, 0xa4f7, 0xa4f8, 0xa4f9, 0xa4fa, 0xa4fb, 0xa4fc, 0xa4fd, - 0xa541, 0xa542, 0xa543, 0xa544, 0xa545, 0xa546, 0xa547, 0xa548, - 0xa549, 0xa54a, 0xa54b, 0xa54c, 0xa54d, 0xa54e, 0xa54f, 0xa550, - 0xa551, 0xa553, 0xa554, 0xa555, 0xa556, 0xa557, 0xa558, 0xa559, - 0xa55a, 0xa55b, 0xa55c, 0xa55d, 0xa561, 0xa562, 0xa563, 0xa564, - 0xa565, 0xa566, 0xa567, 0xa568, 0xa569, 0xa56a, 0xa56b, 0xa56c, - 0xa56d, 0xa56e, 0xa56f, 0xa570, 0xa571, 0xa573, 0xa574, 0xa575, - 0xa576, 0xa577, 0xa578, 0xa579, 0xa57a, 0xa57b, 0xa57c, 0xa57d, - 0xa581, 0xa582, 0xa583, 0xa584, 0xa585, 0xa586, 0xa587, 0xa588, - 0xa589, 0xa58a, 0xa58b, 0xa58c, 0xa58d, 0xa58e, 0xa58f, 0xa590, - 0xa591, 0xa593, 0xa594, 0xa595, 0xa596, 0xa597, 0xa598, 0xa599, - 0xa59a, 0xa59b, 0xa59c, 0xa59d, 0xa5a1, 0xa5a2, 0xa5a3, 0xa5a4, - 0xa5a5, 0xa5a6, 0xa5a7, 0xa5a8, 0xa5a9, 0xa5aa, 0xa5ab, 0xa5ac, - /* 0xbd00 .. 0xbdff */ - 0xa5ad, 0xa5ae, 0xa5af, 0xa5b0, 0xa5b1, 0xa5b3, 0xa5b4, 0xa5b5, - 0xa5b6, 0xa5b7, 0xa5b8, 0xa5b9, 0xa5ba, 0xa5bb, 0xa5bc, 0xa5bd, - 0xa5c1, 0xa5c2, 0xa5c3, 0xa5c4, 0xa5c5, 0xa5c6, 0xa5c7, 0xa5c8, - 0xa5c9, 0xa5ca, 0xa5cb, 0xa5cc, 0xa5cd, 0xa5ce, 0xa5cf, 0xa5d0, - 0xa5d1, 0xa5d3, 0xa5d4, 0xa5d5, 0xa5d6, 0xa5d7, 0xa5d8, 0xa5d9, - 0xa5da, 0xa5db, 0xa5dc, 0xa5dd, 0xa5e1, 0xa5e2, 0xa5e3, 0xa5e4, - 0xa5e5, 0xa5e6, 0xa5e7, 0xa5e8, 0xa5e9, 0xa5ea, 0xa5eb, 0xa5ec, - 0xa5ed, 0xa5ee, 0xa5ef, 0xa5f0, 0xa5f1, 0xa5f3, 0xa5f4, 0xa5f5, - 0xa5f6, 0xa5f7, 0xa5f8, 0xa5f9, 0xa5fa, 0xa5fb, 0xa5fc, 0xa5fd, - 0xa641, 0xa642, 0xa643, 0xa644, 0xa645, 0xa646, 0xa647, 0xa648, - 0xa649, 0xa64a, 0xa64b, 0xa64c, 0xa64d, 0xa64e, 0xa64f, 0xa650, - 0xa651, 0xa653, 0xa654, 0xa655, 0xa656, 0xa657, 0xa658, 0xa659, - 0xa65a, 0xa65b, 0xa65c, 0xa65d, 0xa661, 0xa662, 0xa663, 0xa664, - 0xa665, 0xa666, 0xa667, 0xa668, 0xa669, 0xa66a, 0xa66b, 0xa66c, - 0xa66d, 0xa66e, 0xa66f, 0xa670, 0xa671, 0xa673, 0xa674, 0xa675, - 0xa676, 0xa677, 0xa678, 0xa679, 0xa67a, 0xa67b, 0xa67c, 0xa67d, - 0xa681, 0xa682, 0xa683, 0xa684, 0xa685, 0xa686, 0xa687, 0xa688, - 0xa689, 0xa68a, 0xa68b, 0xa68c, 0xa68d, 0xa68e, 0xa68f, 0xa690, - 0xa691, 0xa693, 0xa694, 0xa695, 0xa696, 0xa697, 0xa698, 0xa699, - 0xa69a, 0xa69b, 0xa69c, 0xa69d, 0xa6a1, 0xa6a2, 0xa6a3, 0xa6a4, - 0xa6a5, 0xa6a6, 0xa6a7, 0xa6a8, 0xa6a9, 0xa6aa, 0xa6ab, 0xa6ac, - 0xa6ad, 0xa6ae, 0xa6af, 0xa6b0, 0xa6b1, 0xa6b3, 0xa6b4, 0xa6b5, - 0xa6b6, 0xa6b7, 0xa6b8, 0xa6b9, 0xa6ba, 0xa6bb, 0xa6bc, 0xa6bd, - 0xa6c1, 0xa6c2, 0xa6c3, 0xa6c4, 0xa6c5, 0xa6c6, 0xa6c7, 0xa6c8, - 0xa6c9, 0xa6ca, 0xa6cb, 0xa6cc, 0xa6cd, 0xa6ce, 0xa6cf, 0xa6d0, - 0xa6d1, 0xa6d3, 0xa6d4, 0xa6d5, 0xa6d6, 0xa6d7, 0xa6d8, 0xa6d9, - 0xa6da, 0xa6db, 0xa6dc, 0xa6dd, 0xa6e1, 0xa6e2, 0xa6e3, 0xa6e4, - 0xa6e5, 0xa6e6, 0xa6e7, 0xa6e8, 0xa6e9, 0xa6ea, 0xa6eb, 0xa6ec, - 0xa6ed, 0xa6ee, 0xa6ef, 0xa6f0, 0xa6f1, 0xa6f3, 0xa6f4, 0xa6f5, - 0xa6f6, 0xa6f7, 0xa6f8, 0xa6f9, 0xa6fa, 0xa6fb, 0xa6fc, 0xa6fd, - 0xa741, 0xa742, 0xa743, 0xa744, 0xa745, 0xa746, 0xa747, 0xa748, - 0xa749, 0xa74a, 0xa74b, 0xa74c, 0xa74d, 0xa74e, 0xa74f, 0xa750, - /* 0xbe00 .. 0xbeff */ - 0xa751, 0xa753, 0xa754, 0xa755, 0xa756, 0xa757, 0xa758, 0xa759, - 0xa75a, 0xa75b, 0xa75c, 0xa75d, 0xa761, 0xa762, 0xa763, 0xa764, - 0xa765, 0xa766, 0xa767, 0xa768, 0xa769, 0xa76a, 0xa76b, 0xa76c, - 0xa76d, 0xa76e, 0xa76f, 0xa770, 0xa771, 0xa773, 0xa774, 0xa775, - 0xa776, 0xa777, 0xa778, 0xa779, 0xa77a, 0xa77b, 0xa77c, 0xa77d, - 0xa781, 0xa782, 0xa783, 0xa784, 0xa785, 0xa786, 0xa787, 0xa788, - 0xa789, 0xa78a, 0xa78b, 0xa78c, 0xa78d, 0xa78e, 0xa78f, 0xa790, - 0xa791, 0xa793, 0xa794, 0xa795, 0xa796, 0xa797, 0xa798, 0xa799, - 0xa79a, 0xa79b, 0xa79c, 0xa79d, 0xa7a1, 0xa7a2, 0xa7a3, 0xa7a4, - 0xa7a5, 0xa7a6, 0xa7a7, 0xa7a8, 0xa7a9, 0xa7aa, 0xa7ab, 0xa7ac, - 0xa7ad, 0xa7ae, 0xa7af, 0xa7b0, 0xa7b1, 0xa7b3, 0xa7b4, 0xa7b5, - 0xa7b6, 0xa7b7, 0xa7b8, 0xa7b9, 0xa7ba, 0xa7bb, 0xa7bc, 0xa7bd, - 0xa861, 0xa862, 0xa863, 0xa864, 0xa865, 0xa866, 0xa867, 0xa868, - 0xa869, 0xa86a, 0xa86b, 0xa86c, 0xa86d, 0xa86e, 0xa86f, 0xa870, - 0xa871, 0xa873, 0xa874, 0xa875, 0xa876, 0xa877, 0xa878, 0xa879, - 0xa87a, 0xa87b, 0xa87c, 0xa87d, 0xa881, 0xa882, 0xa883, 0xa884, - 0xa885, 0xa886, 0xa887, 0xa888, 0xa889, 0xa88a, 0xa88b, 0xa88c, - 0xa88d, 0xa88e, 0xa88f, 0xa890, 0xa891, 0xa893, 0xa894, 0xa895, - 0xa896, 0xa897, 0xa898, 0xa899, 0xa89a, 0xa89b, 0xa89c, 0xa89d, - 0xa8a1, 0xa8a2, 0xa8a3, 0xa8a4, 0xa8a5, 0xa8a6, 0xa8a7, 0xa8a8, - 0xa8a9, 0xa8aa, 0xa8ab, 0xa8ac, 0xa8ad, 0xa8ae, 0xa8af, 0xa8b0, - 0xa8b1, 0xa8b3, 0xa8b4, 0xa8b5, 0xa8b6, 0xa8b7, 0xa8b8, 0xa8b9, - 0xa8ba, 0xa8bb, 0xa8bc, 0xa8bd, 0xa8c1, 0xa8c2, 0xa8c3, 0xa8c4, - 0xa8c5, 0xa8c6, 0xa8c7, 0xa8c8, 0xa8c9, 0xa8ca, 0xa8cb, 0xa8cc, - 0xa8cd, 0xa8ce, 0xa8cf, 0xa8d0, 0xa8d1, 0xa8d3, 0xa8d4, 0xa8d5, - 0xa8d6, 0xa8d7, 0xa8d8, 0xa8d9, 0xa8da, 0xa8db, 0xa8dc, 0xa8dd, - 0xa8e1, 0xa8e2, 0xa8e3, 0xa8e4, 0xa8e5, 0xa8e6, 0xa8e7, 0xa8e8, - 0xa8e9, 0xa8ea, 0xa8eb, 0xa8ec, 0xa8ed, 0xa8ee, 0xa8ef, 0xa8f0, - 0xa8f1, 0xa8f3, 0xa8f4, 0xa8f5, 0xa8f6, 0xa8f7, 0xa8f8, 0xa8f9, - 0xa8fa, 0xa8fb, 0xa8fc, 0xa8fd, 0xa941, 0xa942, 0xa943, 0xa944, - 0xa945, 0xa946, 0xa947, 0xa948, 0xa949, 0xa94a, 0xa94b, 0xa94c, - 0xa94d, 0xa94e, 0xa94f, 0xa950, 0xa951, 0xa953, 0xa954, 0xa955, - /* 0xbf00 .. 0xbfff */ - 0xa956, 0xa957, 0xa958, 0xa959, 0xa95a, 0xa95b, 0xa95c, 0xa95d, - 0xa961, 0xa962, 0xa963, 0xa964, 0xa965, 0xa966, 0xa967, 0xa968, - 0xa969, 0xa96a, 0xa96b, 0xa96c, 0xa96d, 0xa96e, 0xa96f, 0xa970, - 0xa971, 0xa973, 0xa974, 0xa975, 0xa976, 0xa977, 0xa978, 0xa979, - 0xa97a, 0xa97b, 0xa97c, 0xa97d, 0xa981, 0xa982, 0xa983, 0xa984, - 0xa985, 0xa986, 0xa987, 0xa988, 0xa989, 0xa98a, 0xa98b, 0xa98c, - 0xa98d, 0xa98e, 0xa98f, 0xa990, 0xa991, 0xa993, 0xa994, 0xa995, - 0xa996, 0xa997, 0xa998, 0xa999, 0xa99a, 0xa99b, 0xa99c, 0xa99d, - 0xa9a1, 0xa9a2, 0xa9a3, 0xa9a4, 0xa9a5, 0xa9a6, 0xa9a7, 0xa9a8, - 0xa9a9, 0xa9aa, 0xa9ab, 0xa9ac, 0xa9ad, 0xa9ae, 0xa9af, 0xa9b0, - 0xa9b1, 0xa9b3, 0xa9b4, 0xa9b5, 0xa9b6, 0xa9b7, 0xa9b8, 0xa9b9, - 0xa9ba, 0xa9bb, 0xa9bc, 0xa9bd, 0xa9c1, 0xa9c2, 0xa9c3, 0xa9c4, - 0xa9c5, 0xa9c6, 0xa9c7, 0xa9c8, 0xa9c9, 0xa9ca, 0xa9cb, 0xa9cc, - 0xa9cd, 0xa9ce, 0xa9cf, 0xa9d0, 0xa9d1, 0xa9d3, 0xa9d4, 0xa9d5, - 0xa9d6, 0xa9d7, 0xa9d8, 0xa9d9, 0xa9da, 0xa9db, 0xa9dc, 0xa9dd, - 0xa9e1, 0xa9e2, 0xa9e3, 0xa9e4, 0xa9e5, 0xa9e6, 0xa9e7, 0xa9e8, - 0xa9e9, 0xa9ea, 0xa9eb, 0xa9ec, 0xa9ed, 0xa9ee, 0xa9ef, 0xa9f0, - 0xa9f1, 0xa9f3, 0xa9f4, 0xa9f5, 0xa9f6, 0xa9f7, 0xa9f8, 0xa9f9, - 0xa9fa, 0xa9fb, 0xa9fc, 0xa9fd, 0xaa41, 0xaa42, 0xaa43, 0xaa44, - 0xaa45, 0xaa46, 0xaa47, 0xaa48, 0xaa49, 0xaa4a, 0xaa4b, 0xaa4c, - 0xaa4d, 0xaa4e, 0xaa4f, 0xaa50, 0xaa51, 0xaa53, 0xaa54, 0xaa55, - 0xaa56, 0xaa57, 0xaa58, 0xaa59, 0xaa5a, 0xaa5b, 0xaa5c, 0xaa5d, - 0xaa61, 0xaa62, 0xaa63, 0xaa64, 0xaa65, 0xaa66, 0xaa67, 0xaa68, - 0xaa69, 0xaa6a, 0xaa6b, 0xaa6c, 0xaa6d, 0xaa6e, 0xaa6f, 0xaa70, - 0xaa71, 0xaa73, 0xaa74, 0xaa75, 0xaa76, 0xaa77, 0xaa78, 0xaa79, - 0xaa7a, 0xaa7b, 0xaa7c, 0xaa7d, 0xaa81, 0xaa82, 0xaa83, 0xaa84, - 0xaa85, 0xaa86, 0xaa87, 0xaa88, 0xaa89, 0xaa8a, 0xaa8b, 0xaa8c, - 0xaa8d, 0xaa8e, 0xaa8f, 0xaa90, 0xaa91, 0xaa93, 0xaa94, 0xaa95, - 0xaa96, 0xaa97, 0xaa98, 0xaa99, 0xaa9a, 0xaa9b, 0xaa9c, 0xaa9d, - 0xaaa1, 0xaaa2, 0xaaa3, 0xaaa4, 0xaaa5, 0xaaa6, 0xaaa7, 0xaaa8, - 0xaaa9, 0xaaaa, 0xaaab, 0xaaac, 0xaaad, 0xaaae, 0xaaaf, 0xaab0, - 0xaab1, 0xaab3, 0xaab4, 0xaab5, 0xaab6, 0xaab7, 0xaab8, 0xaab9, - /* 0xc000 .. 0xc0ff */ - 0xaaba, 0xaabb, 0xaabc, 0xaabd, 0xaac1, 0xaac2, 0xaac3, 0xaac4, - 0xaac5, 0xaac6, 0xaac7, 0xaac8, 0xaac9, 0xaaca, 0xaacb, 0xaacc, - 0xaacd, 0xaace, 0xaacf, 0xaad0, 0xaad1, 0xaad3, 0xaad4, 0xaad5, - 0xaad6, 0xaad7, 0xaad8, 0xaad9, 0xaada, 0xaadb, 0xaadc, 0xaadd, - 0xaae1, 0xaae2, 0xaae3, 0xaae4, 0xaae5, 0xaae6, 0xaae7, 0xaae8, - 0xaae9, 0xaaea, 0xaaeb, 0xaaec, 0xaaed, 0xaaee, 0xaaef, 0xaaf0, - 0xaaf1, 0xaaf3, 0xaaf4, 0xaaf5, 0xaaf6, 0xaaf7, 0xaaf8, 0xaaf9, - 0xaafa, 0xaafb, 0xaafc, 0xaafd, 0xab41, 0xab42, 0xab43, 0xab44, - 0xab45, 0xab46, 0xab47, 0xab48, 0xab49, 0xab4a, 0xab4b, 0xab4c, - 0xab4d, 0xab4e, 0xab4f, 0xab50, 0xab51, 0xab53, 0xab54, 0xab55, - 0xab56, 0xab57, 0xab58, 0xab59, 0xab5a, 0xab5b, 0xab5c, 0xab5d, - 0xab61, 0xab62, 0xab63, 0xab64, 0xab65, 0xab66, 0xab67, 0xab68, - 0xab69, 0xab6a, 0xab6b, 0xab6c, 0xab6d, 0xab6e, 0xab6f, 0xab70, - 0xab71, 0xab73, 0xab74, 0xab75, 0xab76, 0xab77, 0xab78, 0xab79, - 0xab7a, 0xab7b, 0xab7c, 0xab7d, 0xab81, 0xab82, 0xab83, 0xab84, - 0xab85, 0xab86, 0xab87, 0xab88, 0xab89, 0xab8a, 0xab8b, 0xab8c, - 0xab8d, 0xab8e, 0xab8f, 0xab90, 0xab91, 0xab93, 0xab94, 0xab95, - 0xab96, 0xab97, 0xab98, 0xab99, 0xab9a, 0xab9b, 0xab9c, 0xab9d, - 0xaba1, 0xaba2, 0xaba3, 0xaba4, 0xaba5, 0xaba6, 0xaba7, 0xaba8, - 0xaba9, 0xabaa, 0xabab, 0xabac, 0xabad, 0xabae, 0xabaf, 0xabb0, - 0xabb1, 0xabb3, 0xabb4, 0xabb5, 0xabb6, 0xabb7, 0xabb8, 0xabb9, - 0xabba, 0xabbb, 0xabbc, 0xabbd, 0xac61, 0xac62, 0xac63, 0xac64, - 0xac65, 0xac66, 0xac67, 0xac68, 0xac69, 0xac6a, 0xac6b, 0xac6c, - 0xac6d, 0xac6e, 0xac6f, 0xac70, 0xac71, 0xac73, 0xac74, 0xac75, - 0xac76, 0xac77, 0xac78, 0xac79, 0xac7a, 0xac7b, 0xac7c, 0xac7d, - 0xac81, 0xac82, 0xac83, 0xac84, 0xac85, 0xac86, 0xac87, 0xac88, - 0xac89, 0xac8a, 0xac8b, 0xac8c, 0xac8d, 0xac8e, 0xac8f, 0xac90, - 0xac91, 0xac93, 0xac94, 0xac95, 0xac96, 0xac97, 0xac98, 0xac99, - 0xac9a, 0xac9b, 0xac9c, 0xac9d, 0xaca1, 0xaca2, 0xaca3, 0xaca4, - 0xaca5, 0xaca6, 0xaca7, 0xaca8, 0xaca9, 0xacaa, 0xacab, 0xacac, - 0xacad, 0xacae, 0xacaf, 0xacb0, 0xacb1, 0xacb3, 0xacb4, 0xacb5, - 0xacb6, 0xacb7, 0xacb8, 0xacb9, 0xacba, 0xacbb, 0xacbc, 0xacbd, - /* 0xc100 .. 0xc1ff */ - 0xacc1, 0xacc2, 0xacc3, 0xacc4, 0xacc5, 0xacc6, 0xacc7, 0xacc8, - 0xacc9, 0xacca, 0xaccb, 0xaccc, 0xaccd, 0xacce, 0xaccf, 0xacd0, - 0xacd1, 0xacd3, 0xacd4, 0xacd5, 0xacd6, 0xacd7, 0xacd8, 0xacd9, - 0xacda, 0xacdb, 0xacdc, 0xacdd, 0xace1, 0xace2, 0xace3, 0xace4, - 0xace5, 0xace6, 0xace7, 0xace8, 0xace9, 0xacea, 0xaceb, 0xacec, - 0xaced, 0xacee, 0xacef, 0xacf0, 0xacf1, 0xacf3, 0xacf4, 0xacf5, - 0xacf6, 0xacf7, 0xacf8, 0xacf9, 0xacfa, 0xacfb, 0xacfc, 0xacfd, - 0xad41, 0xad42, 0xad43, 0xad44, 0xad45, 0xad46, 0xad47, 0xad48, - 0xad49, 0xad4a, 0xad4b, 0xad4c, 0xad4d, 0xad4e, 0xad4f, 0xad50, - 0xad51, 0xad53, 0xad54, 0xad55, 0xad56, 0xad57, 0xad58, 0xad59, - 0xad5a, 0xad5b, 0xad5c, 0xad5d, 0xad61, 0xad62, 0xad63, 0xad64, - 0xad65, 0xad66, 0xad67, 0xad68, 0xad69, 0xad6a, 0xad6b, 0xad6c, - 0xad6d, 0xad6e, 0xad6f, 0xad70, 0xad71, 0xad73, 0xad74, 0xad75, - 0xad76, 0xad77, 0xad78, 0xad79, 0xad7a, 0xad7b, 0xad7c, 0xad7d, - 0xad81, 0xad82, 0xad83, 0xad84, 0xad85, 0xad86, 0xad87, 0xad88, - 0xad89, 0xad8a, 0xad8b, 0xad8c, 0xad8d, 0xad8e, 0xad8f, 0xad90, - 0xad91, 0xad93, 0xad94, 0xad95, 0xad96, 0xad97, 0xad98, 0xad99, - 0xad9a, 0xad9b, 0xad9c, 0xad9d, 0xada1, 0xada2, 0xada3, 0xada4, - 0xada5, 0xada6, 0xada7, 0xada8, 0xada9, 0xadaa, 0xadab, 0xadac, - 0xadad, 0xadae, 0xadaf, 0xadb0, 0xadb1, 0xadb3, 0xadb4, 0xadb5, - 0xadb6, 0xadb7, 0xadb8, 0xadb9, 0xadba, 0xadbb, 0xadbc, 0xadbd, - 0xadc1, 0xadc2, 0xadc3, 0xadc4, 0xadc5, 0xadc6, 0xadc7, 0xadc8, - 0xadc9, 0xadca, 0xadcb, 0xadcc, 0xadcd, 0xadce, 0xadcf, 0xadd0, - 0xadd1, 0xadd3, 0xadd4, 0xadd5, 0xadd6, 0xadd7, 0xadd8, 0xadd9, - 0xadda, 0xaddb, 0xaddc, 0xaddd, 0xade1, 0xade2, 0xade3, 0xade4, - 0xade5, 0xade6, 0xade7, 0xade8, 0xade9, 0xadea, 0xadeb, 0xadec, - 0xaded, 0xadee, 0xadef, 0xadf0, 0xadf1, 0xadf3, 0xadf4, 0xadf5, - 0xadf6, 0xadf7, 0xadf8, 0xadf9, 0xadfa, 0xadfb, 0xadfc, 0xadfd, - 0xae41, 0xae42, 0xae43, 0xae44, 0xae45, 0xae46, 0xae47, 0xae48, - 0xae49, 0xae4a, 0xae4b, 0xae4c, 0xae4d, 0xae4e, 0xae4f, 0xae50, - 0xae51, 0xae53, 0xae54, 0xae55, 0xae56, 0xae57, 0xae58, 0xae59, - 0xae5a, 0xae5b, 0xae5c, 0xae5d, 0xae61, 0xae62, 0xae63, 0xae64, - /* 0xc200 .. 0xc2ff */ - 0xae65, 0xae66, 0xae67, 0xae68, 0xae69, 0xae6a, 0xae6b, 0xae6c, - 0xae6d, 0xae6e, 0xae6f, 0xae70, 0xae71, 0xae73, 0xae74, 0xae75, - 0xae76, 0xae77, 0xae78, 0xae79, 0xae7a, 0xae7b, 0xae7c, 0xae7d, - 0xae81, 0xae82, 0xae83, 0xae84, 0xae85, 0xae86, 0xae87, 0xae88, - 0xae89, 0xae8a, 0xae8b, 0xae8c, 0xae8d, 0xae8e, 0xae8f, 0xae90, - 0xae91, 0xae93, 0xae94, 0xae95, 0xae96, 0xae97, 0xae98, 0xae99, - 0xae9a, 0xae9b, 0xae9c, 0xae9d, 0xaea1, 0xaea2, 0xaea3, 0xaea4, - 0xaea5, 0xaea6, 0xaea7, 0xaea8, 0xaea9, 0xaeaa, 0xaeab, 0xaeac, - 0xaead, 0xaeae, 0xaeaf, 0xaeb0, 0xaeb1, 0xaeb3, 0xaeb4, 0xaeb5, - 0xaeb6, 0xaeb7, 0xaeb8, 0xaeb9, 0xaeba, 0xaebb, 0xaebc, 0xaebd, - 0xaec1, 0xaec2, 0xaec3, 0xaec4, 0xaec5, 0xaec6, 0xaec7, 0xaec8, - 0xaec9, 0xaeca, 0xaecb, 0xaecc, 0xaecd, 0xaece, 0xaecf, 0xaed0, - 0xaed1, 0xaed3, 0xaed4, 0xaed5, 0xaed6, 0xaed7, 0xaed8, 0xaed9, - 0xaeda, 0xaedb, 0xaedc, 0xaedd, 0xaee1, 0xaee2, 0xaee3, 0xaee4, - 0xaee5, 0xaee6, 0xaee7, 0xaee8, 0xaee9, 0xaeea, 0xaeeb, 0xaeec, - 0xaeed, 0xaeee, 0xaeef, 0xaef0, 0xaef1, 0xaef3, 0xaef4, 0xaef5, - 0xaef6, 0xaef7, 0xaef8, 0xaef9, 0xaefa, 0xaefb, 0xaefc, 0xaefd, - 0xaf41, 0xaf42, 0xaf43, 0xaf44, 0xaf45, 0xaf46, 0xaf47, 0xaf48, - 0xaf49, 0xaf4a, 0xaf4b, 0xaf4c, 0xaf4d, 0xaf4e, 0xaf4f, 0xaf50, - 0xaf51, 0xaf53, 0xaf54, 0xaf55, 0xaf56, 0xaf57, 0xaf58, 0xaf59, - 0xaf5a, 0xaf5b, 0xaf5c, 0xaf5d, 0xaf61, 0xaf62, 0xaf63, 0xaf64, - 0xaf65, 0xaf66, 0xaf67, 0xaf68, 0xaf69, 0xaf6a, 0xaf6b, 0xaf6c, - 0xaf6d, 0xaf6e, 0xaf6f, 0xaf70, 0xaf71, 0xaf73, 0xaf74, 0xaf75, - 0xaf76, 0xaf77, 0xaf78, 0xaf79, 0xaf7a, 0xaf7b, 0xaf7c, 0xaf7d, - 0xaf81, 0xaf82, 0xaf83, 0xaf84, 0xaf85, 0xaf86, 0xaf87, 0xaf88, - 0xaf89, 0xaf8a, 0xaf8b, 0xaf8c, 0xaf8d, 0xaf8e, 0xaf8f, 0xaf90, - 0xaf91, 0xaf93, 0xaf94, 0xaf95, 0xaf96, 0xaf97, 0xaf98, 0xaf99, - 0xaf9a, 0xaf9b, 0xaf9c, 0xaf9d, 0xafa1, 0xafa2, 0xafa3, 0xafa4, - 0xafa5, 0xafa6, 0xafa7, 0xafa8, 0xafa9, 0xafaa, 0xafab, 0xafac, - 0xafad, 0xafae, 0xafaf, 0xafb0, 0xafb1, 0xafb3, 0xafb4, 0xafb5, - 0xafb6, 0xafb7, 0xafb8, 0xafb9, 0xafba, 0xafbb, 0xafbc, 0xafbd, - 0xb061, 0xb062, 0xb063, 0xb064, 0xb065, 0xb066, 0xb067, 0xb068, - /* 0xc300 .. 0xc3ff */ - 0xb069, 0xb06a, 0xb06b, 0xb06c, 0xb06d, 0xb06e, 0xb06f, 0xb070, - 0xb071, 0xb073, 0xb074, 0xb075, 0xb076, 0xb077, 0xb078, 0xb079, - 0xb07a, 0xb07b, 0xb07c, 0xb07d, 0xb081, 0xb082, 0xb083, 0xb084, - 0xb085, 0xb086, 0xb087, 0xb088, 0xb089, 0xb08a, 0xb08b, 0xb08c, - 0xb08d, 0xb08e, 0xb08f, 0xb090, 0xb091, 0xb093, 0xb094, 0xb095, - 0xb096, 0xb097, 0xb098, 0xb099, 0xb09a, 0xb09b, 0xb09c, 0xb09d, - 0xb0a1, 0xb0a2, 0xb0a3, 0xb0a4, 0xb0a5, 0xb0a6, 0xb0a7, 0xb0a8, - 0xb0a9, 0xb0aa, 0xb0ab, 0xb0ac, 0xb0ad, 0xb0ae, 0xb0af, 0xb0b0, - 0xb0b1, 0xb0b3, 0xb0b4, 0xb0b5, 0xb0b6, 0xb0b7, 0xb0b8, 0xb0b9, - 0xb0ba, 0xb0bb, 0xb0bc, 0xb0bd, 0xb0c1, 0xb0c2, 0xb0c3, 0xb0c4, - 0xb0c5, 0xb0c6, 0xb0c7, 0xb0c8, 0xb0c9, 0xb0ca, 0xb0cb, 0xb0cc, - 0xb0cd, 0xb0ce, 0xb0cf, 0xb0d0, 0xb0d1, 0xb0d3, 0xb0d4, 0xb0d5, - 0xb0d6, 0xb0d7, 0xb0d8, 0xb0d9, 0xb0da, 0xb0db, 0xb0dc, 0xb0dd, - 0xb0e1, 0xb0e2, 0xb0e3, 0xb0e4, 0xb0e5, 0xb0e6, 0xb0e7, 0xb0e8, - 0xb0e9, 0xb0ea, 0xb0eb, 0xb0ec, 0xb0ed, 0xb0ee, 0xb0ef, 0xb0f0, - 0xb0f1, 0xb0f3, 0xb0f4, 0xb0f5, 0xb0f6, 0xb0f7, 0xb0f8, 0xb0f9, - 0xb0fa, 0xb0fb, 0xb0fc, 0xb0fd, 0xb141, 0xb142, 0xb143, 0xb144, - 0xb145, 0xb146, 0xb147, 0xb148, 0xb149, 0xb14a, 0xb14b, 0xb14c, - 0xb14d, 0xb14e, 0xb14f, 0xb150, 0xb151, 0xb153, 0xb154, 0xb155, - 0xb156, 0xb157, 0xb158, 0xb159, 0xb15a, 0xb15b, 0xb15c, 0xb15d, - 0xb161, 0xb162, 0xb163, 0xb164, 0xb165, 0xb166, 0xb167, 0xb168, - 0xb169, 0xb16a, 0xb16b, 0xb16c, 0xb16d, 0xb16e, 0xb16f, 0xb170, - 0xb171, 0xb173, 0xb174, 0xb175, 0xb176, 0xb177, 0xb178, 0xb179, - 0xb17a, 0xb17b, 0xb17c, 0xb17d, 0xb181, 0xb182, 0xb183, 0xb184, - 0xb185, 0xb186, 0xb187, 0xb188, 0xb189, 0xb18a, 0xb18b, 0xb18c, - 0xb18d, 0xb18e, 0xb18f, 0xb190, 0xb191, 0xb193, 0xb194, 0xb195, - 0xb196, 0xb197, 0xb198, 0xb199, 0xb19a, 0xb19b, 0xb19c, 0xb19d, - 0xb1a1, 0xb1a2, 0xb1a3, 0xb1a4, 0xb1a5, 0xb1a6, 0xb1a7, 0xb1a8, - 0xb1a9, 0xb1aa, 0xb1ab, 0xb1ac, 0xb1ad, 0xb1ae, 0xb1af, 0xb1b0, - 0xb1b1, 0xb1b3, 0xb1b4, 0xb1b5, 0xb1b6, 0xb1b7, 0xb1b8, 0xb1b9, - 0xb1ba, 0xb1bb, 0xb1bc, 0xb1bd, 0xb1c1, 0xb1c2, 0xb1c3, 0xb1c4, - 0xb1c5, 0xb1c6, 0xb1c7, 0xb1c8, 0xb1c9, 0xb1ca, 0xb1cb, 0xb1cc, - /* 0xc400 .. 0xc4ff */ - 0xb1cd, 0xb1ce, 0xb1cf, 0xb1d0, 0xb1d1, 0xb1d3, 0xb1d4, 0xb1d5, - 0xb1d6, 0xb1d7, 0xb1d8, 0xb1d9, 0xb1da, 0xb1db, 0xb1dc, 0xb1dd, - 0xb1e1, 0xb1e2, 0xb1e3, 0xb1e4, 0xb1e5, 0xb1e6, 0xb1e7, 0xb1e8, - 0xb1e9, 0xb1ea, 0xb1eb, 0xb1ec, 0xb1ed, 0xb1ee, 0xb1ef, 0xb1f0, - 0xb1f1, 0xb1f3, 0xb1f4, 0xb1f5, 0xb1f6, 0xb1f7, 0xb1f8, 0xb1f9, - 0xb1fa, 0xb1fb, 0xb1fc, 0xb1fd, 0xb241, 0xb242, 0xb243, 0xb244, - 0xb245, 0xb246, 0xb247, 0xb248, 0xb249, 0xb24a, 0xb24b, 0xb24c, - 0xb24d, 0xb24e, 0xb24f, 0xb250, 0xb251, 0xb253, 0xb254, 0xb255, - 0xb256, 0xb257, 0xb258, 0xb259, 0xb25a, 0xb25b, 0xb25c, 0xb25d, - 0xb261, 0xb262, 0xb263, 0xb264, 0xb265, 0xb266, 0xb267, 0xb268, - 0xb269, 0xb26a, 0xb26b, 0xb26c, 0xb26d, 0xb26e, 0xb26f, 0xb270, - 0xb271, 0xb273, 0xb274, 0xb275, 0xb276, 0xb277, 0xb278, 0xb279, - 0xb27a, 0xb27b, 0xb27c, 0xb27d, 0xb281, 0xb282, 0xb283, 0xb284, - 0xb285, 0xb286, 0xb287, 0xb288, 0xb289, 0xb28a, 0xb28b, 0xb28c, - 0xb28d, 0xb28e, 0xb28f, 0xb290, 0xb291, 0xb293, 0xb294, 0xb295, - 0xb296, 0xb297, 0xb298, 0xb299, 0xb29a, 0xb29b, 0xb29c, 0xb29d, - 0xb2a1, 0xb2a2, 0xb2a3, 0xb2a4, 0xb2a5, 0xb2a6, 0xb2a7, 0xb2a8, - 0xb2a9, 0xb2aa, 0xb2ab, 0xb2ac, 0xb2ad, 0xb2ae, 0xb2af, 0xb2b0, - 0xb2b1, 0xb2b3, 0xb2b4, 0xb2b5, 0xb2b6, 0xb2b7, 0xb2b8, 0xb2b9, - 0xb2ba, 0xb2bb, 0xb2bc, 0xb2bd, 0xb2c1, 0xb2c2, 0xb2c3, 0xb2c4, - 0xb2c5, 0xb2c6, 0xb2c7, 0xb2c8, 0xb2c9, 0xb2ca, 0xb2cb, 0xb2cc, - 0xb2cd, 0xb2ce, 0xb2cf, 0xb2d0, 0xb2d1, 0xb2d3, 0xb2d4, 0xb2d5, - 0xb2d6, 0xb2d7, 0xb2d8, 0xb2d9, 0xb2da, 0xb2db, 0xb2dc, 0xb2dd, - 0xb2e1, 0xb2e2, 0xb2e3, 0xb2e4, 0xb2e5, 0xb2e6, 0xb2e7, 0xb2e8, - 0xb2e9, 0xb2ea, 0xb2eb, 0xb2ec, 0xb2ed, 0xb2ee, 0xb2ef, 0xb2f0, - 0xb2f1, 0xb2f3, 0xb2f4, 0xb2f5, 0xb2f6, 0xb2f7, 0xb2f8, 0xb2f9, - 0xb2fa, 0xb2fb, 0xb2fc, 0xb2fd, 0xb341, 0xb342, 0xb343, 0xb344, - 0xb345, 0xb346, 0xb347, 0xb348, 0xb349, 0xb34a, 0xb34b, 0xb34c, - 0xb34d, 0xb34e, 0xb34f, 0xb350, 0xb351, 0xb353, 0xb354, 0xb355, - 0xb356, 0xb357, 0xb358, 0xb359, 0xb35a, 0xb35b, 0xb35c, 0xb35d, - 0xb361, 0xb362, 0xb363, 0xb364, 0xb365, 0xb366, 0xb367, 0xb368, - 0xb369, 0xb36a, 0xb36b, 0xb36c, 0xb36d, 0xb36e, 0xb36f, 0xb370, - /* 0xc500 .. 0xc5ff */ - 0xb371, 0xb373, 0xb374, 0xb375, 0xb376, 0xb377, 0xb378, 0xb379, - 0xb37a, 0xb37b, 0xb37c, 0xb37d, 0xb381, 0xb382, 0xb383, 0xb384, - 0xb385, 0xb386, 0xb387, 0xb388, 0xb389, 0xb38a, 0xb38b, 0xb38c, - 0xb38d, 0xb38e, 0xb38f, 0xb390, 0xb391, 0xb393, 0xb394, 0xb395, - 0xb396, 0xb397, 0xb398, 0xb399, 0xb39a, 0xb39b, 0xb39c, 0xb39d, - 0xb3a1, 0xb3a2, 0xb3a3, 0xb3a4, 0xb3a5, 0xb3a6, 0xb3a7, 0xb3a8, - 0xb3a9, 0xb3aa, 0xb3ab, 0xb3ac, 0xb3ad, 0xb3ae, 0xb3af, 0xb3b0, - 0xb3b1, 0xb3b3, 0xb3b4, 0xb3b5, 0xb3b6, 0xb3b7, 0xb3b8, 0xb3b9, - 0xb3ba, 0xb3bb, 0xb3bc, 0xb3bd, 0xb461, 0xb462, 0xb463, 0xb464, - 0xb465, 0xb466, 0xb467, 0xb468, 0xb469, 0xb46a, 0xb46b, 0xb46c, - 0xb46d, 0xb46e, 0xb46f, 0xb470, 0xb471, 0xb473, 0xb474, 0xb475, - 0xb476, 0xb477, 0xb478, 0xb479, 0xb47a, 0xb47b, 0xb47c, 0xb47d, - 0xb481, 0xb482, 0xb483, 0xb484, 0xb485, 0xb486, 0xb487, 0xb488, - 0xb489, 0xb48a, 0xb48b, 0xb48c, 0xb48d, 0xb48e, 0xb48f, 0xb490, - 0xb491, 0xb493, 0xb494, 0xb495, 0xb496, 0xb497, 0xb498, 0xb499, - 0xb49a, 0xb49b, 0xb49c, 0xb49d, 0xb4a1, 0xb4a2, 0xb4a3, 0xb4a4, - 0xb4a5, 0xb4a6, 0xb4a7, 0xb4a8, 0xb4a9, 0xb4aa, 0xb4ab, 0xb4ac, - 0xb4ad, 0xb4ae, 0xb4af, 0xb4b0, 0xb4b1, 0xb4b3, 0xb4b4, 0xb4b5, - 0xb4b6, 0xb4b7, 0xb4b8, 0xb4b9, 0xb4ba, 0xb4bb, 0xb4bc, 0xb4bd, - 0xb4c1, 0xb4c2, 0xb4c3, 0xb4c4, 0xb4c5, 0xb4c6, 0xb4c7, 0xb4c8, - 0xb4c9, 0xb4ca, 0xb4cb, 0xb4cc, 0xb4cd, 0xb4ce, 0xb4cf, 0xb4d0, - 0xb4d1, 0xb4d3, 0xb4d4, 0xb4d5, 0xb4d6, 0xb4d7, 0xb4d8, 0xb4d9, - 0xb4da, 0xb4db, 0xb4dc, 0xb4dd, 0xb4e1, 0xb4e2, 0xb4e3, 0xb4e4, - 0xb4e5, 0xb4e6, 0xb4e7, 0xb4e8, 0xb4e9, 0xb4ea, 0xb4eb, 0xb4ec, - 0xb4ed, 0xb4ee, 0xb4ef, 0xb4f0, 0xb4f1, 0xb4f3, 0xb4f4, 0xb4f5, - 0xb4f6, 0xb4f7, 0xb4f8, 0xb4f9, 0xb4fa, 0xb4fb, 0xb4fc, 0xb4fd, - 0xb541, 0xb542, 0xb543, 0xb544, 0xb545, 0xb546, 0xb547, 0xb548, - 0xb549, 0xb54a, 0xb54b, 0xb54c, 0xb54d, 0xb54e, 0xb54f, 0xb550, - 0xb551, 0xb553, 0xb554, 0xb555, 0xb556, 0xb557, 0xb558, 0xb559, - 0xb55a, 0xb55b, 0xb55c, 0xb55d, 0xb561, 0xb562, 0xb563, 0xb564, - 0xb565, 0xb566, 0xb567, 0xb568, 0xb569, 0xb56a, 0xb56b, 0xb56c, - 0xb56d, 0xb56e, 0xb56f, 0xb570, 0xb571, 0xb573, 0xb574, 0xb575, - /* 0xc600 .. 0xc6ff */ - 0xb576, 0xb577, 0xb578, 0xb579, 0xb57a, 0xb57b, 0xb57c, 0xb57d, - 0xb581, 0xb582, 0xb583, 0xb584, 0xb585, 0xb586, 0xb587, 0xb588, - 0xb589, 0xb58a, 0xb58b, 0xb58c, 0xb58d, 0xb58e, 0xb58f, 0xb590, - 0xb591, 0xb593, 0xb594, 0xb595, 0xb596, 0xb597, 0xb598, 0xb599, - 0xb59a, 0xb59b, 0xb59c, 0xb59d, 0xb5a1, 0xb5a2, 0xb5a3, 0xb5a4, - 0xb5a5, 0xb5a6, 0xb5a7, 0xb5a8, 0xb5a9, 0xb5aa, 0xb5ab, 0xb5ac, - 0xb5ad, 0xb5ae, 0xb5af, 0xb5b0, 0xb5b1, 0xb5b3, 0xb5b4, 0xb5b5, - 0xb5b6, 0xb5b7, 0xb5b8, 0xb5b9, 0xb5ba, 0xb5bb, 0xb5bc, 0xb5bd, - 0xb5c1, 0xb5c2, 0xb5c3, 0xb5c4, 0xb5c5, 0xb5c6, 0xb5c7, 0xb5c8, - 0xb5c9, 0xb5ca, 0xb5cb, 0xb5cc, 0xb5cd, 0xb5ce, 0xb5cf, 0xb5d0, - 0xb5d1, 0xb5d3, 0xb5d4, 0xb5d5, 0xb5d6, 0xb5d7, 0xb5d8, 0xb5d9, - 0xb5da, 0xb5db, 0xb5dc, 0xb5dd, 0xb5e1, 0xb5e2, 0xb5e3, 0xb5e4, - 0xb5e5, 0xb5e6, 0xb5e7, 0xb5e8, 0xb5e9, 0xb5ea, 0xb5eb, 0xb5ec, - 0xb5ed, 0xb5ee, 0xb5ef, 0xb5f0, 0xb5f1, 0xb5f3, 0xb5f4, 0xb5f5, - 0xb5f6, 0xb5f7, 0xb5f8, 0xb5f9, 0xb5fa, 0xb5fb, 0xb5fc, 0xb5fd, - 0xb641, 0xb642, 0xb643, 0xb644, 0xb645, 0xb646, 0xb647, 0xb648, - 0xb649, 0xb64a, 0xb64b, 0xb64c, 0xb64d, 0xb64e, 0xb64f, 0xb650, - 0xb651, 0xb653, 0xb654, 0xb655, 0xb656, 0xb657, 0xb658, 0xb659, - 0xb65a, 0xb65b, 0xb65c, 0xb65d, 0xb661, 0xb662, 0xb663, 0xb664, - 0xb665, 0xb666, 0xb667, 0xb668, 0xb669, 0xb66a, 0xb66b, 0xb66c, - 0xb66d, 0xb66e, 0xb66f, 0xb670, 0xb671, 0xb673, 0xb674, 0xb675, - 0xb676, 0xb677, 0xb678, 0xb679, 0xb67a, 0xb67b, 0xb67c, 0xb67d, - 0xb681, 0xb682, 0xb683, 0xb684, 0xb685, 0xb686, 0xb687, 0xb688, - 0xb689, 0xb68a, 0xb68b, 0xb68c, 0xb68d, 0xb68e, 0xb68f, 0xb690, - 0xb691, 0xb693, 0xb694, 0xb695, 0xb696, 0xb697, 0xb698, 0xb699, - 0xb69a, 0xb69b, 0xb69c, 0xb69d, 0xb6a1, 0xb6a2, 0xb6a3, 0xb6a4, - 0xb6a5, 0xb6a6, 0xb6a7, 0xb6a8, 0xb6a9, 0xb6aa, 0xb6ab, 0xb6ac, - 0xb6ad, 0xb6ae, 0xb6af, 0xb6b0, 0xb6b1, 0xb6b3, 0xb6b4, 0xb6b5, - 0xb6b6, 0xb6b7, 0xb6b8, 0xb6b9, 0xb6ba, 0xb6bb, 0xb6bc, 0xb6bd, - 0xb6c1, 0xb6c2, 0xb6c3, 0xb6c4, 0xb6c5, 0xb6c6, 0xb6c7, 0xb6c8, - 0xb6c9, 0xb6ca, 0xb6cb, 0xb6cc, 0xb6cd, 0xb6ce, 0xb6cf, 0xb6d0, - 0xb6d1, 0xb6d3, 0xb6d4, 0xb6d5, 0xb6d6, 0xb6d7, 0xb6d8, 0xb6d9, - /* 0xc700 .. 0xc7ff */ - 0xb6da, 0xb6db, 0xb6dc, 0xb6dd, 0xb6e1, 0xb6e2, 0xb6e3, 0xb6e4, - 0xb6e5, 0xb6e6, 0xb6e7, 0xb6e8, 0xb6e9, 0xb6ea, 0xb6eb, 0xb6ec, - 0xb6ed, 0xb6ee, 0xb6ef, 0xb6f0, 0xb6f1, 0xb6f3, 0xb6f4, 0xb6f5, - 0xb6f6, 0xb6f7, 0xb6f8, 0xb6f9, 0xb6fa, 0xb6fb, 0xb6fc, 0xb6fd, - 0xb741, 0xb742, 0xb743, 0xb744, 0xb745, 0xb746, 0xb747, 0xb748, - 0xb749, 0xb74a, 0xb74b, 0xb74c, 0xb74d, 0xb74e, 0xb74f, 0xb750, - 0xb751, 0xb753, 0xb754, 0xb755, 0xb756, 0xb757, 0xb758, 0xb759, - 0xb75a, 0xb75b, 0xb75c, 0xb75d, 0xb761, 0xb762, 0xb763, 0xb764, - 0xb765, 0xb766, 0xb767, 0xb768, 0xb769, 0xb76a, 0xb76b, 0xb76c, - 0xb76d, 0xb76e, 0xb76f, 0xb770, 0xb771, 0xb773, 0xb774, 0xb775, - 0xb776, 0xb777, 0xb778, 0xb779, 0xb77a, 0xb77b, 0xb77c, 0xb77d, - 0xb781, 0xb782, 0xb783, 0xb784, 0xb785, 0xb786, 0xb787, 0xb788, - 0xb789, 0xb78a, 0xb78b, 0xb78c, 0xb78d, 0xb78e, 0xb78f, 0xb790, - 0xb791, 0xb793, 0xb794, 0xb795, 0xb796, 0xb797, 0xb798, 0xb799, - 0xb79a, 0xb79b, 0xb79c, 0xb79d, 0xb7a1, 0xb7a2, 0xb7a3, 0xb7a4, - 0xb7a5, 0xb7a6, 0xb7a7, 0xb7a8, 0xb7a9, 0xb7aa, 0xb7ab, 0xb7ac, - 0xb7ad, 0xb7ae, 0xb7af, 0xb7b0, 0xb7b1, 0xb7b3, 0xb7b4, 0xb7b5, - 0xb7b6, 0xb7b7, 0xb7b8, 0xb7b9, 0xb7ba, 0xb7bb, 0xb7bc, 0xb7bd, - 0xb861, 0xb862, 0xb863, 0xb864, 0xb865, 0xb866, 0xb867, 0xb868, - 0xb869, 0xb86a, 0xb86b, 0xb86c, 0xb86d, 0xb86e, 0xb86f, 0xb870, - 0xb871, 0xb873, 0xb874, 0xb875, 0xb876, 0xb877, 0xb878, 0xb879, - 0xb87a, 0xb87b, 0xb87c, 0xb87d, 0xb881, 0xb882, 0xb883, 0xb884, - 0xb885, 0xb886, 0xb887, 0xb888, 0xb889, 0xb88a, 0xb88b, 0xb88c, - 0xb88d, 0xb88e, 0xb88f, 0xb890, 0xb891, 0xb893, 0xb894, 0xb895, - 0xb896, 0xb897, 0xb898, 0xb899, 0xb89a, 0xb89b, 0xb89c, 0xb89d, - 0xb8a1, 0xb8a2, 0xb8a3, 0xb8a4, 0xb8a5, 0xb8a6, 0xb8a7, 0xb8a8, - 0xb8a9, 0xb8aa, 0xb8ab, 0xb8ac, 0xb8ad, 0xb8ae, 0xb8af, 0xb8b0, - 0xb8b1, 0xb8b3, 0xb8b4, 0xb8b5, 0xb8b6, 0xb8b7, 0xb8b8, 0xb8b9, - 0xb8ba, 0xb8bb, 0xb8bc, 0xb8bd, 0xb8c1, 0xb8c2, 0xb8c3, 0xb8c4, - 0xb8c5, 0xb8c6, 0xb8c7, 0xb8c8, 0xb8c9, 0xb8ca, 0xb8cb, 0xb8cc, - 0xb8cd, 0xb8ce, 0xb8cf, 0xb8d0, 0xb8d1, 0xb8d3, 0xb8d4, 0xb8d5, - 0xb8d6, 0xb8d7, 0xb8d8, 0xb8d9, 0xb8da, 0xb8db, 0xb8dc, 0xb8dd, - /* 0xc800 .. 0xc8ff */ - 0xb8e1, 0xb8e2, 0xb8e3, 0xb8e4, 0xb8e5, 0xb8e6, 0xb8e7, 0xb8e8, - 0xb8e9, 0xb8ea, 0xb8eb, 0xb8ec, 0xb8ed, 0xb8ee, 0xb8ef, 0xb8f0, - 0xb8f1, 0xb8f3, 0xb8f4, 0xb8f5, 0xb8f6, 0xb8f7, 0xb8f8, 0xb8f9, - 0xb8fa, 0xb8fb, 0xb8fc, 0xb8fd, 0xb941, 0xb942, 0xb943, 0xb944, - 0xb945, 0xb946, 0xb947, 0xb948, 0xb949, 0xb94a, 0xb94b, 0xb94c, - 0xb94d, 0xb94e, 0xb94f, 0xb950, 0xb951, 0xb953, 0xb954, 0xb955, - 0xb956, 0xb957, 0xb958, 0xb959, 0xb95a, 0xb95b, 0xb95c, 0xb95d, - 0xb961, 0xb962, 0xb963, 0xb964, 0xb965, 0xb966, 0xb967, 0xb968, - 0xb969, 0xb96a, 0xb96b, 0xb96c, 0xb96d, 0xb96e, 0xb96f, 0xb970, - 0xb971, 0xb973, 0xb974, 0xb975, 0xb976, 0xb977, 0xb978, 0xb979, - 0xb97a, 0xb97b, 0xb97c, 0xb97d, 0xb981, 0xb982, 0xb983, 0xb984, - 0xb985, 0xb986, 0xb987, 0xb988, 0xb989, 0xb98a, 0xb98b, 0xb98c, - 0xb98d, 0xb98e, 0xb98f, 0xb990, 0xb991, 0xb993, 0xb994, 0xb995, - 0xb996, 0xb997, 0xb998, 0xb999, 0xb99a, 0xb99b, 0xb99c, 0xb99d, - 0xb9a1, 0xb9a2, 0xb9a3, 0xb9a4, 0xb9a5, 0xb9a6, 0xb9a7, 0xb9a8, - 0xb9a9, 0xb9aa, 0xb9ab, 0xb9ac, 0xb9ad, 0xb9ae, 0xb9af, 0xb9b0, - 0xb9b1, 0xb9b3, 0xb9b4, 0xb9b5, 0xb9b6, 0xb9b7, 0xb9b8, 0xb9b9, - 0xb9ba, 0xb9bb, 0xb9bc, 0xb9bd, 0xb9c1, 0xb9c2, 0xb9c3, 0xb9c4, - 0xb9c5, 0xb9c6, 0xb9c7, 0xb9c8, 0xb9c9, 0xb9ca, 0xb9cb, 0xb9cc, - 0xb9cd, 0xb9ce, 0xb9cf, 0xb9d0, 0xb9d1, 0xb9d3, 0xb9d4, 0xb9d5, - 0xb9d6, 0xb9d7, 0xb9d8, 0xb9d9, 0xb9da, 0xb9db, 0xb9dc, 0xb9dd, - 0xb9e1, 0xb9e2, 0xb9e3, 0xb9e4, 0xb9e5, 0xb9e6, 0xb9e7, 0xb9e8, - 0xb9e9, 0xb9ea, 0xb9eb, 0xb9ec, 0xb9ed, 0xb9ee, 0xb9ef, 0xb9f0, - 0xb9f1, 0xb9f3, 0xb9f4, 0xb9f5, 0xb9f6, 0xb9f7, 0xb9f8, 0xb9f9, - 0xb9fa, 0xb9fb, 0xb9fc, 0xb9fd, 0xba41, 0xba42, 0xba43, 0xba44, - 0xba45, 0xba46, 0xba47, 0xba48, 0xba49, 0xba4a, 0xba4b, 0xba4c, - 0xba4d, 0xba4e, 0xba4f, 0xba50, 0xba51, 0xba53, 0xba54, 0xba55, - 0xba56, 0xba57, 0xba58, 0xba59, 0xba5a, 0xba5b, 0xba5c, 0xba5d, - 0xba61, 0xba62, 0xba63, 0xba64, 0xba65, 0xba66, 0xba67, 0xba68, - 0xba69, 0xba6a, 0xba6b, 0xba6c, 0xba6d, 0xba6e, 0xba6f, 0xba70, - 0xba71, 0xba73, 0xba74, 0xba75, 0xba76, 0xba77, 0xba78, 0xba79, - 0xba7a, 0xba7b, 0xba7c, 0xba7d, 0xba81, 0xba82, 0xba83, 0xba84, - /* 0xc900 .. 0xc9ff */ - 0xba85, 0xba86, 0xba87, 0xba88, 0xba89, 0xba8a, 0xba8b, 0xba8c, - 0xba8d, 0xba8e, 0xba8f, 0xba90, 0xba91, 0xba93, 0xba94, 0xba95, - 0xba96, 0xba97, 0xba98, 0xba99, 0xba9a, 0xba9b, 0xba9c, 0xba9d, - 0xbaa1, 0xbaa2, 0xbaa3, 0xbaa4, 0xbaa5, 0xbaa6, 0xbaa7, 0xbaa8, - 0xbaa9, 0xbaaa, 0xbaab, 0xbaac, 0xbaad, 0xbaae, 0xbaaf, 0xbab0, - 0xbab1, 0xbab3, 0xbab4, 0xbab5, 0xbab6, 0xbab7, 0xbab8, 0xbab9, - 0xbaba, 0xbabb, 0xbabc, 0xbabd, 0xbac1, 0xbac2, 0xbac3, 0xbac4, - 0xbac5, 0xbac6, 0xbac7, 0xbac8, 0xbac9, 0xbaca, 0xbacb, 0xbacc, - 0xbacd, 0xbace, 0xbacf, 0xbad0, 0xbad1, 0xbad3, 0xbad4, 0xbad5, - 0xbad6, 0xbad7, 0xbad8, 0xbad9, 0xbada, 0xbadb, 0xbadc, 0xbadd, - 0xbae1, 0xbae2, 0xbae3, 0xbae4, 0xbae5, 0xbae6, 0xbae7, 0xbae8, - 0xbae9, 0xbaea, 0xbaeb, 0xbaec, 0xbaed, 0xbaee, 0xbaef, 0xbaf0, - 0xbaf1, 0xbaf3, 0xbaf4, 0xbaf5, 0xbaf6, 0xbaf7, 0xbaf8, 0xbaf9, - 0xbafa, 0xbafb, 0xbafc, 0xbafd, 0xbb41, 0xbb42, 0xbb43, 0xbb44, - 0xbb45, 0xbb46, 0xbb47, 0xbb48, 0xbb49, 0xbb4a, 0xbb4b, 0xbb4c, - 0xbb4d, 0xbb4e, 0xbb4f, 0xbb50, 0xbb51, 0xbb53, 0xbb54, 0xbb55, - 0xbb56, 0xbb57, 0xbb58, 0xbb59, 0xbb5a, 0xbb5b, 0xbb5c, 0xbb5d, - 0xbb61, 0xbb62, 0xbb63, 0xbb64, 0xbb65, 0xbb66, 0xbb67, 0xbb68, - 0xbb69, 0xbb6a, 0xbb6b, 0xbb6c, 0xbb6d, 0xbb6e, 0xbb6f, 0xbb70, - 0xbb71, 0xbb73, 0xbb74, 0xbb75, 0xbb76, 0xbb77, 0xbb78, 0xbb79, - 0xbb7a, 0xbb7b, 0xbb7c, 0xbb7d, 0xbb81, 0xbb82, 0xbb83, 0xbb84, - 0xbb85, 0xbb86, 0xbb87, 0xbb88, 0xbb89, 0xbb8a, 0xbb8b, 0xbb8c, - 0xbb8d, 0xbb8e, 0xbb8f, 0xbb90, 0xbb91, 0xbb93, 0xbb94, 0xbb95, - 0xbb96, 0xbb97, 0xbb98, 0xbb99, 0xbb9a, 0xbb9b, 0xbb9c, 0xbb9d, - 0xbba1, 0xbba2, 0xbba3, 0xbba4, 0xbba5, 0xbba6, 0xbba7, 0xbba8, - 0xbba9, 0xbbaa, 0xbbab, 0xbbac, 0xbbad, 0xbbae, 0xbbaf, 0xbbb0, - 0xbbb1, 0xbbb3, 0xbbb4, 0xbbb5, 0xbbb6, 0xbbb7, 0xbbb8, 0xbbb9, - 0xbbba, 0xbbbb, 0xbbbc, 0xbbbd, 0xbc61, 0xbc62, 0xbc63, 0xbc64, - 0xbc65, 0xbc66, 0xbc67, 0xbc68, 0xbc69, 0xbc6a, 0xbc6b, 0xbc6c, - 0xbc6d, 0xbc6e, 0xbc6f, 0xbc70, 0xbc71, 0xbc73, 0xbc74, 0xbc75, - 0xbc76, 0xbc77, 0xbc78, 0xbc79, 0xbc7a, 0xbc7b, 0xbc7c, 0xbc7d, - 0xbc81, 0xbc82, 0xbc83, 0xbc84, 0xbc85, 0xbc86, 0xbc87, 0xbc88, - /* 0xca00 .. 0xcaff */ - 0xbc89, 0xbc8a, 0xbc8b, 0xbc8c, 0xbc8d, 0xbc8e, 0xbc8f, 0xbc90, - 0xbc91, 0xbc93, 0xbc94, 0xbc95, 0xbc96, 0xbc97, 0xbc98, 0xbc99, - 0xbc9a, 0xbc9b, 0xbc9c, 0xbc9d, 0xbca1, 0xbca2, 0xbca3, 0xbca4, - 0xbca5, 0xbca6, 0xbca7, 0xbca8, 0xbca9, 0xbcaa, 0xbcab, 0xbcac, - 0xbcad, 0xbcae, 0xbcaf, 0xbcb0, 0xbcb1, 0xbcb3, 0xbcb4, 0xbcb5, - 0xbcb6, 0xbcb7, 0xbcb8, 0xbcb9, 0xbcba, 0xbcbb, 0xbcbc, 0xbcbd, - 0xbcc1, 0xbcc2, 0xbcc3, 0xbcc4, 0xbcc5, 0xbcc6, 0xbcc7, 0xbcc8, - 0xbcc9, 0xbcca, 0xbccb, 0xbccc, 0xbccd, 0xbcce, 0xbccf, 0xbcd0, - 0xbcd1, 0xbcd3, 0xbcd4, 0xbcd5, 0xbcd6, 0xbcd7, 0xbcd8, 0xbcd9, - 0xbcda, 0xbcdb, 0xbcdc, 0xbcdd, 0xbce1, 0xbce2, 0xbce3, 0xbce4, - 0xbce5, 0xbce6, 0xbce7, 0xbce8, 0xbce9, 0xbcea, 0xbceb, 0xbcec, - 0xbced, 0xbcee, 0xbcef, 0xbcf0, 0xbcf1, 0xbcf3, 0xbcf4, 0xbcf5, - 0xbcf6, 0xbcf7, 0xbcf8, 0xbcf9, 0xbcfa, 0xbcfb, 0xbcfc, 0xbcfd, - 0xbd41, 0xbd42, 0xbd43, 0xbd44, 0xbd45, 0xbd46, 0xbd47, 0xbd48, - 0xbd49, 0xbd4a, 0xbd4b, 0xbd4c, 0xbd4d, 0xbd4e, 0xbd4f, 0xbd50, - 0xbd51, 0xbd53, 0xbd54, 0xbd55, 0xbd56, 0xbd57, 0xbd58, 0xbd59, - 0xbd5a, 0xbd5b, 0xbd5c, 0xbd5d, 0xbd61, 0xbd62, 0xbd63, 0xbd64, - 0xbd65, 0xbd66, 0xbd67, 0xbd68, 0xbd69, 0xbd6a, 0xbd6b, 0xbd6c, - 0xbd6d, 0xbd6e, 0xbd6f, 0xbd70, 0xbd71, 0xbd73, 0xbd74, 0xbd75, - 0xbd76, 0xbd77, 0xbd78, 0xbd79, 0xbd7a, 0xbd7b, 0xbd7c, 0xbd7d, - 0xbd81, 0xbd82, 0xbd83, 0xbd84, 0xbd85, 0xbd86, 0xbd87, 0xbd88, - 0xbd89, 0xbd8a, 0xbd8b, 0xbd8c, 0xbd8d, 0xbd8e, 0xbd8f, 0xbd90, - 0xbd91, 0xbd93, 0xbd94, 0xbd95, 0xbd96, 0xbd97, 0xbd98, 0xbd99, - 0xbd9a, 0xbd9b, 0xbd9c, 0xbd9d, 0xbda1, 0xbda2, 0xbda3, 0xbda4, - 0xbda5, 0xbda6, 0xbda7, 0xbda8, 0xbda9, 0xbdaa, 0xbdab, 0xbdac, - 0xbdad, 0xbdae, 0xbdaf, 0xbdb0, 0xbdb1, 0xbdb3, 0xbdb4, 0xbdb5, - 0xbdb6, 0xbdb7, 0xbdb8, 0xbdb9, 0xbdba, 0xbdbb, 0xbdbc, 0xbdbd, - 0xbdc1, 0xbdc2, 0xbdc3, 0xbdc4, 0xbdc5, 0xbdc6, 0xbdc7, 0xbdc8, - 0xbdc9, 0xbdca, 0xbdcb, 0xbdcc, 0xbdcd, 0xbdce, 0xbdcf, 0xbdd0, - 0xbdd1, 0xbdd3, 0xbdd4, 0xbdd5, 0xbdd6, 0xbdd7, 0xbdd8, 0xbdd9, - 0xbdda, 0xbddb, 0xbddc, 0xbddd, 0xbde1, 0xbde2, 0xbde3, 0xbde4, - 0xbde5, 0xbde6, 0xbde7, 0xbde8, 0xbde9, 0xbdea, 0xbdeb, 0xbdec, - /* 0xcb00 .. 0xcbff */ - 0xbded, 0xbdee, 0xbdef, 0xbdf0, 0xbdf1, 0xbdf3, 0xbdf4, 0xbdf5, - 0xbdf6, 0xbdf7, 0xbdf8, 0xbdf9, 0xbdfa, 0xbdfb, 0xbdfc, 0xbdfd, - 0xbe41, 0xbe42, 0xbe43, 0xbe44, 0xbe45, 0xbe46, 0xbe47, 0xbe48, - 0xbe49, 0xbe4a, 0xbe4b, 0xbe4c, 0xbe4d, 0xbe4e, 0xbe4f, 0xbe50, - 0xbe51, 0xbe53, 0xbe54, 0xbe55, 0xbe56, 0xbe57, 0xbe58, 0xbe59, - 0xbe5a, 0xbe5b, 0xbe5c, 0xbe5d, 0xbe61, 0xbe62, 0xbe63, 0xbe64, - 0xbe65, 0xbe66, 0xbe67, 0xbe68, 0xbe69, 0xbe6a, 0xbe6b, 0xbe6c, - 0xbe6d, 0xbe6e, 0xbe6f, 0xbe70, 0xbe71, 0xbe73, 0xbe74, 0xbe75, - 0xbe76, 0xbe77, 0xbe78, 0xbe79, 0xbe7a, 0xbe7b, 0xbe7c, 0xbe7d, - 0xbe81, 0xbe82, 0xbe83, 0xbe84, 0xbe85, 0xbe86, 0xbe87, 0xbe88, - 0xbe89, 0xbe8a, 0xbe8b, 0xbe8c, 0xbe8d, 0xbe8e, 0xbe8f, 0xbe90, - 0xbe91, 0xbe93, 0xbe94, 0xbe95, 0xbe96, 0xbe97, 0xbe98, 0xbe99, - 0xbe9a, 0xbe9b, 0xbe9c, 0xbe9d, 0xbea1, 0xbea2, 0xbea3, 0xbea4, - 0xbea5, 0xbea6, 0xbea7, 0xbea8, 0xbea9, 0xbeaa, 0xbeab, 0xbeac, - 0xbead, 0xbeae, 0xbeaf, 0xbeb0, 0xbeb1, 0xbeb3, 0xbeb4, 0xbeb5, - 0xbeb6, 0xbeb7, 0xbeb8, 0xbeb9, 0xbeba, 0xbebb, 0xbebc, 0xbebd, - 0xbec1, 0xbec2, 0xbec3, 0xbec4, 0xbec5, 0xbec6, 0xbec7, 0xbec8, - 0xbec9, 0xbeca, 0xbecb, 0xbecc, 0xbecd, 0xbece, 0xbecf, 0xbed0, - 0xbed1, 0xbed3, 0xbed4, 0xbed5, 0xbed6, 0xbed7, 0xbed8, 0xbed9, - 0xbeda, 0xbedb, 0xbedc, 0xbedd, 0xbee1, 0xbee2, 0xbee3, 0xbee4, - 0xbee5, 0xbee6, 0xbee7, 0xbee8, 0xbee9, 0xbeea, 0xbeeb, 0xbeec, - 0xbeed, 0xbeee, 0xbeef, 0xbef0, 0xbef1, 0xbef3, 0xbef4, 0xbef5, - 0xbef6, 0xbef7, 0xbef8, 0xbef9, 0xbefa, 0xbefb, 0xbefc, 0xbefd, - 0xbf41, 0xbf42, 0xbf43, 0xbf44, 0xbf45, 0xbf46, 0xbf47, 0xbf48, - 0xbf49, 0xbf4a, 0xbf4b, 0xbf4c, 0xbf4d, 0xbf4e, 0xbf4f, 0xbf50, - 0xbf51, 0xbf53, 0xbf54, 0xbf55, 0xbf56, 0xbf57, 0xbf58, 0xbf59, - 0xbf5a, 0xbf5b, 0xbf5c, 0xbf5d, 0xbf61, 0xbf62, 0xbf63, 0xbf64, - 0xbf65, 0xbf66, 0xbf67, 0xbf68, 0xbf69, 0xbf6a, 0xbf6b, 0xbf6c, - 0xbf6d, 0xbf6e, 0xbf6f, 0xbf70, 0xbf71, 0xbf73, 0xbf74, 0xbf75, - 0xbf76, 0xbf77, 0xbf78, 0xbf79, 0xbf7a, 0xbf7b, 0xbf7c, 0xbf7d, - 0xbf81, 0xbf82, 0xbf83, 0xbf84, 0xbf85, 0xbf86, 0xbf87, 0xbf88, - 0xbf89, 0xbf8a, 0xbf8b, 0xbf8c, 0xbf8d, 0xbf8e, 0xbf8f, 0xbf90, - /* 0xcc00 .. 0xccff */ - 0xbf91, 0xbf93, 0xbf94, 0xbf95, 0xbf96, 0xbf97, 0xbf98, 0xbf99, - 0xbf9a, 0xbf9b, 0xbf9c, 0xbf9d, 0xbfa1, 0xbfa2, 0xbfa3, 0xbfa4, - 0xbfa5, 0xbfa6, 0xbfa7, 0xbfa8, 0xbfa9, 0xbfaa, 0xbfab, 0xbfac, - 0xbfad, 0xbfae, 0xbfaf, 0xbfb0, 0xbfb1, 0xbfb3, 0xbfb4, 0xbfb5, - 0xbfb6, 0xbfb7, 0xbfb8, 0xbfb9, 0xbfba, 0xbfbb, 0xbfbc, 0xbfbd, - 0xc061, 0xc062, 0xc063, 0xc064, 0xc065, 0xc066, 0xc067, 0xc068, - 0xc069, 0xc06a, 0xc06b, 0xc06c, 0xc06d, 0xc06e, 0xc06f, 0xc070, - 0xc071, 0xc073, 0xc074, 0xc075, 0xc076, 0xc077, 0xc078, 0xc079, - 0xc07a, 0xc07b, 0xc07c, 0xc07d, 0xc081, 0xc082, 0xc083, 0xc084, - 0xc085, 0xc086, 0xc087, 0xc088, 0xc089, 0xc08a, 0xc08b, 0xc08c, - 0xc08d, 0xc08e, 0xc08f, 0xc090, 0xc091, 0xc093, 0xc094, 0xc095, - 0xc096, 0xc097, 0xc098, 0xc099, 0xc09a, 0xc09b, 0xc09c, 0xc09d, - 0xc0a1, 0xc0a2, 0xc0a3, 0xc0a4, 0xc0a5, 0xc0a6, 0xc0a7, 0xc0a8, - 0xc0a9, 0xc0aa, 0xc0ab, 0xc0ac, 0xc0ad, 0xc0ae, 0xc0af, 0xc0b0, - 0xc0b1, 0xc0b3, 0xc0b4, 0xc0b5, 0xc0b6, 0xc0b7, 0xc0b8, 0xc0b9, - 0xc0ba, 0xc0bb, 0xc0bc, 0xc0bd, 0xc0c1, 0xc0c2, 0xc0c3, 0xc0c4, - 0xc0c5, 0xc0c6, 0xc0c7, 0xc0c8, 0xc0c9, 0xc0ca, 0xc0cb, 0xc0cc, - 0xc0cd, 0xc0ce, 0xc0cf, 0xc0d0, 0xc0d1, 0xc0d3, 0xc0d4, 0xc0d5, - 0xc0d6, 0xc0d7, 0xc0d8, 0xc0d9, 0xc0da, 0xc0db, 0xc0dc, 0xc0dd, - 0xc0e1, 0xc0e2, 0xc0e3, 0xc0e4, 0xc0e5, 0xc0e6, 0xc0e7, 0xc0e8, - 0xc0e9, 0xc0ea, 0xc0eb, 0xc0ec, 0xc0ed, 0xc0ee, 0xc0ef, 0xc0f0, - 0xc0f1, 0xc0f3, 0xc0f4, 0xc0f5, 0xc0f6, 0xc0f7, 0xc0f8, 0xc0f9, - 0xc0fa, 0xc0fb, 0xc0fc, 0xc0fd, 0xc141, 0xc142, 0xc143, 0xc144, - 0xc145, 0xc146, 0xc147, 0xc148, 0xc149, 0xc14a, 0xc14b, 0xc14c, - 0xc14d, 0xc14e, 0xc14f, 0xc150, 0xc151, 0xc153, 0xc154, 0xc155, - 0xc156, 0xc157, 0xc158, 0xc159, 0xc15a, 0xc15b, 0xc15c, 0xc15d, - 0xc161, 0xc162, 0xc163, 0xc164, 0xc165, 0xc166, 0xc167, 0xc168, - 0xc169, 0xc16a, 0xc16b, 0xc16c, 0xc16d, 0xc16e, 0xc16f, 0xc170, - 0xc171, 0xc173, 0xc174, 0xc175, 0xc176, 0xc177, 0xc178, 0xc179, - 0xc17a, 0xc17b, 0xc17c, 0xc17d, 0xc181, 0xc182, 0xc183, 0xc184, - 0xc185, 0xc186, 0xc187, 0xc188, 0xc189, 0xc18a, 0xc18b, 0xc18c, - 0xc18d, 0xc18e, 0xc18f, 0xc190, 0xc191, 0xc193, 0xc194, 0xc195, - /* 0xcd00 .. 0xcdff */ - 0xc196, 0xc197, 0xc198, 0xc199, 0xc19a, 0xc19b, 0xc19c, 0xc19d, - 0xc1a1, 0xc1a2, 0xc1a3, 0xc1a4, 0xc1a5, 0xc1a6, 0xc1a7, 0xc1a8, - 0xc1a9, 0xc1aa, 0xc1ab, 0xc1ac, 0xc1ad, 0xc1ae, 0xc1af, 0xc1b0, - 0xc1b1, 0xc1b3, 0xc1b4, 0xc1b5, 0xc1b6, 0xc1b7, 0xc1b8, 0xc1b9, - 0xc1ba, 0xc1bb, 0xc1bc, 0xc1bd, 0xc1c1, 0xc1c2, 0xc1c3, 0xc1c4, - 0xc1c5, 0xc1c6, 0xc1c7, 0xc1c8, 0xc1c9, 0xc1ca, 0xc1cb, 0xc1cc, - 0xc1cd, 0xc1ce, 0xc1cf, 0xc1d0, 0xc1d1, 0xc1d3, 0xc1d4, 0xc1d5, - 0xc1d6, 0xc1d7, 0xc1d8, 0xc1d9, 0xc1da, 0xc1db, 0xc1dc, 0xc1dd, - 0xc1e1, 0xc1e2, 0xc1e3, 0xc1e4, 0xc1e5, 0xc1e6, 0xc1e7, 0xc1e8, - 0xc1e9, 0xc1ea, 0xc1eb, 0xc1ec, 0xc1ed, 0xc1ee, 0xc1ef, 0xc1f0, - 0xc1f1, 0xc1f3, 0xc1f4, 0xc1f5, 0xc1f6, 0xc1f7, 0xc1f8, 0xc1f9, - 0xc1fa, 0xc1fb, 0xc1fc, 0xc1fd, 0xc241, 0xc242, 0xc243, 0xc244, - 0xc245, 0xc246, 0xc247, 0xc248, 0xc249, 0xc24a, 0xc24b, 0xc24c, - 0xc24d, 0xc24e, 0xc24f, 0xc250, 0xc251, 0xc253, 0xc254, 0xc255, - 0xc256, 0xc257, 0xc258, 0xc259, 0xc25a, 0xc25b, 0xc25c, 0xc25d, - 0xc261, 0xc262, 0xc263, 0xc264, 0xc265, 0xc266, 0xc267, 0xc268, - 0xc269, 0xc26a, 0xc26b, 0xc26c, 0xc26d, 0xc26e, 0xc26f, 0xc270, - 0xc271, 0xc273, 0xc274, 0xc275, 0xc276, 0xc277, 0xc278, 0xc279, - 0xc27a, 0xc27b, 0xc27c, 0xc27d, 0xc281, 0xc282, 0xc283, 0xc284, - 0xc285, 0xc286, 0xc287, 0xc288, 0xc289, 0xc28a, 0xc28b, 0xc28c, - 0xc28d, 0xc28e, 0xc28f, 0xc290, 0xc291, 0xc293, 0xc294, 0xc295, - 0xc296, 0xc297, 0xc298, 0xc299, 0xc29a, 0xc29b, 0xc29c, 0xc29d, - 0xc2a1, 0xc2a2, 0xc2a3, 0xc2a4, 0xc2a5, 0xc2a6, 0xc2a7, 0xc2a8, - 0xc2a9, 0xc2aa, 0xc2ab, 0xc2ac, 0xc2ad, 0xc2ae, 0xc2af, 0xc2b0, - 0xc2b1, 0xc2b3, 0xc2b4, 0xc2b5, 0xc2b6, 0xc2b7, 0xc2b8, 0xc2b9, - 0xc2ba, 0xc2bb, 0xc2bc, 0xc2bd, 0xc2c1, 0xc2c2, 0xc2c3, 0xc2c4, - 0xc2c5, 0xc2c6, 0xc2c7, 0xc2c8, 0xc2c9, 0xc2ca, 0xc2cb, 0xc2cc, - 0xc2cd, 0xc2ce, 0xc2cf, 0xc2d0, 0xc2d1, 0xc2d3, 0xc2d4, 0xc2d5, - 0xc2d6, 0xc2d7, 0xc2d8, 0xc2d9, 0xc2da, 0xc2db, 0xc2dc, 0xc2dd, - 0xc2e1, 0xc2e2, 0xc2e3, 0xc2e4, 0xc2e5, 0xc2e6, 0xc2e7, 0xc2e8, - 0xc2e9, 0xc2ea, 0xc2eb, 0xc2ec, 0xc2ed, 0xc2ee, 0xc2ef, 0xc2f0, - 0xc2f1, 0xc2f3, 0xc2f4, 0xc2f5, 0xc2f6, 0xc2f7, 0xc2f8, 0xc2f9, - /* 0xce00 .. 0xceff */ - 0xc2fa, 0xc2fb, 0xc2fc, 0xc2fd, 0xc341, 0xc342, 0xc343, 0xc344, - 0xc345, 0xc346, 0xc347, 0xc348, 0xc349, 0xc34a, 0xc34b, 0xc34c, - 0xc34d, 0xc34e, 0xc34f, 0xc350, 0xc351, 0xc353, 0xc354, 0xc355, - 0xc356, 0xc357, 0xc358, 0xc359, 0xc35a, 0xc35b, 0xc35c, 0xc35d, - 0xc361, 0xc362, 0xc363, 0xc364, 0xc365, 0xc366, 0xc367, 0xc368, - 0xc369, 0xc36a, 0xc36b, 0xc36c, 0xc36d, 0xc36e, 0xc36f, 0xc370, - 0xc371, 0xc373, 0xc374, 0xc375, 0xc376, 0xc377, 0xc378, 0xc379, - 0xc37a, 0xc37b, 0xc37c, 0xc37d, 0xc381, 0xc382, 0xc383, 0xc384, - 0xc385, 0xc386, 0xc387, 0xc388, 0xc389, 0xc38a, 0xc38b, 0xc38c, - 0xc38d, 0xc38e, 0xc38f, 0xc390, 0xc391, 0xc393, 0xc394, 0xc395, - 0xc396, 0xc397, 0xc398, 0xc399, 0xc39a, 0xc39b, 0xc39c, 0xc39d, - 0xc3a1, 0xc3a2, 0xc3a3, 0xc3a4, 0xc3a5, 0xc3a6, 0xc3a7, 0xc3a8, - 0xc3a9, 0xc3aa, 0xc3ab, 0xc3ac, 0xc3ad, 0xc3ae, 0xc3af, 0xc3b0, - 0xc3b1, 0xc3b3, 0xc3b4, 0xc3b5, 0xc3b6, 0xc3b7, 0xc3b8, 0xc3b9, - 0xc3ba, 0xc3bb, 0xc3bc, 0xc3bd, 0xc461, 0xc462, 0xc463, 0xc464, - 0xc465, 0xc466, 0xc467, 0xc468, 0xc469, 0xc46a, 0xc46b, 0xc46c, - 0xc46d, 0xc46e, 0xc46f, 0xc470, 0xc471, 0xc473, 0xc474, 0xc475, - 0xc476, 0xc477, 0xc478, 0xc479, 0xc47a, 0xc47b, 0xc47c, 0xc47d, - 0xc481, 0xc482, 0xc483, 0xc484, 0xc485, 0xc486, 0xc487, 0xc488, - 0xc489, 0xc48a, 0xc48b, 0xc48c, 0xc48d, 0xc48e, 0xc48f, 0xc490, - 0xc491, 0xc493, 0xc494, 0xc495, 0xc496, 0xc497, 0xc498, 0xc499, - 0xc49a, 0xc49b, 0xc49c, 0xc49d, 0xc4a1, 0xc4a2, 0xc4a3, 0xc4a4, - 0xc4a5, 0xc4a6, 0xc4a7, 0xc4a8, 0xc4a9, 0xc4aa, 0xc4ab, 0xc4ac, - 0xc4ad, 0xc4ae, 0xc4af, 0xc4b0, 0xc4b1, 0xc4b3, 0xc4b4, 0xc4b5, - 0xc4b6, 0xc4b7, 0xc4b8, 0xc4b9, 0xc4ba, 0xc4bb, 0xc4bc, 0xc4bd, - 0xc4c1, 0xc4c2, 0xc4c3, 0xc4c4, 0xc4c5, 0xc4c6, 0xc4c7, 0xc4c8, - 0xc4c9, 0xc4ca, 0xc4cb, 0xc4cc, 0xc4cd, 0xc4ce, 0xc4cf, 0xc4d0, - 0xc4d1, 0xc4d3, 0xc4d4, 0xc4d5, 0xc4d6, 0xc4d7, 0xc4d8, 0xc4d9, - 0xc4da, 0xc4db, 0xc4dc, 0xc4dd, 0xc4e1, 0xc4e2, 0xc4e3, 0xc4e4, - 0xc4e5, 0xc4e6, 0xc4e7, 0xc4e8, 0xc4e9, 0xc4ea, 0xc4eb, 0xc4ec, - 0xc4ed, 0xc4ee, 0xc4ef, 0xc4f0, 0xc4f1, 0xc4f3, 0xc4f4, 0xc4f5, - 0xc4f6, 0xc4f7, 0xc4f8, 0xc4f9, 0xc4fa, 0xc4fb, 0xc4fc, 0xc4fd, - /* 0xcf00 .. 0xcfff */ - 0xc541, 0xc542, 0xc543, 0xc544, 0xc545, 0xc546, 0xc547, 0xc548, - 0xc549, 0xc54a, 0xc54b, 0xc54c, 0xc54d, 0xc54e, 0xc54f, 0xc550, - 0xc551, 0xc553, 0xc554, 0xc555, 0xc556, 0xc557, 0xc558, 0xc559, - 0xc55a, 0xc55b, 0xc55c, 0xc55d, 0xc561, 0xc562, 0xc563, 0xc564, - 0xc565, 0xc566, 0xc567, 0xc568, 0xc569, 0xc56a, 0xc56b, 0xc56c, - 0xc56d, 0xc56e, 0xc56f, 0xc570, 0xc571, 0xc573, 0xc574, 0xc575, - 0xc576, 0xc577, 0xc578, 0xc579, 0xc57a, 0xc57b, 0xc57c, 0xc57d, - 0xc581, 0xc582, 0xc583, 0xc584, 0xc585, 0xc586, 0xc587, 0xc588, - 0xc589, 0xc58a, 0xc58b, 0xc58c, 0xc58d, 0xc58e, 0xc58f, 0xc590, - 0xc591, 0xc593, 0xc594, 0xc595, 0xc596, 0xc597, 0xc598, 0xc599, - 0xc59a, 0xc59b, 0xc59c, 0xc59d, 0xc5a1, 0xc5a2, 0xc5a3, 0xc5a4, - 0xc5a5, 0xc5a6, 0xc5a7, 0xc5a8, 0xc5a9, 0xc5aa, 0xc5ab, 0xc5ac, - 0xc5ad, 0xc5ae, 0xc5af, 0xc5b0, 0xc5b1, 0xc5b3, 0xc5b4, 0xc5b5, - 0xc5b6, 0xc5b7, 0xc5b8, 0xc5b9, 0xc5ba, 0xc5bb, 0xc5bc, 0xc5bd, - 0xc5c1, 0xc5c2, 0xc5c3, 0xc5c4, 0xc5c5, 0xc5c6, 0xc5c7, 0xc5c8, - 0xc5c9, 0xc5ca, 0xc5cb, 0xc5cc, 0xc5cd, 0xc5ce, 0xc5cf, 0xc5d0, - 0xc5d1, 0xc5d3, 0xc5d4, 0xc5d5, 0xc5d6, 0xc5d7, 0xc5d8, 0xc5d9, - 0xc5da, 0xc5db, 0xc5dc, 0xc5dd, 0xc5e1, 0xc5e2, 0xc5e3, 0xc5e4, - 0xc5e5, 0xc5e6, 0xc5e7, 0xc5e8, 0xc5e9, 0xc5ea, 0xc5eb, 0xc5ec, - 0xc5ed, 0xc5ee, 0xc5ef, 0xc5f0, 0xc5f1, 0xc5f3, 0xc5f4, 0xc5f5, - 0xc5f6, 0xc5f7, 0xc5f8, 0xc5f9, 0xc5fa, 0xc5fb, 0xc5fc, 0xc5fd, - 0xc641, 0xc642, 0xc643, 0xc644, 0xc645, 0xc646, 0xc647, 0xc648, - 0xc649, 0xc64a, 0xc64b, 0xc64c, 0xc64d, 0xc64e, 0xc64f, 0xc650, - 0xc651, 0xc653, 0xc654, 0xc655, 0xc656, 0xc657, 0xc658, 0xc659, - 0xc65a, 0xc65b, 0xc65c, 0xc65d, 0xc661, 0xc662, 0xc663, 0xc664, - 0xc665, 0xc666, 0xc667, 0xc668, 0xc669, 0xc66a, 0xc66b, 0xc66c, - 0xc66d, 0xc66e, 0xc66f, 0xc670, 0xc671, 0xc673, 0xc674, 0xc675, - 0xc676, 0xc677, 0xc678, 0xc679, 0xc67a, 0xc67b, 0xc67c, 0xc67d, - 0xc681, 0xc682, 0xc683, 0xc684, 0xc685, 0xc686, 0xc687, 0xc688, - 0xc689, 0xc68a, 0xc68b, 0xc68c, 0xc68d, 0xc68e, 0xc68f, 0xc690, - 0xc691, 0xc693, 0xc694, 0xc695, 0xc696, 0xc697, 0xc698, 0xc699, - 0xc69a, 0xc69b, 0xc69c, 0xc69d, 0xc6a1, 0xc6a2, 0xc6a3, 0xc6a4, - /* 0xd000 .. 0xd0ff */ - 0xc6a5, 0xc6a6, 0xc6a7, 0xc6a8, 0xc6a9, 0xc6aa, 0xc6ab, 0xc6ac, - 0xc6ad, 0xc6ae, 0xc6af, 0xc6b0, 0xc6b1, 0xc6b3, 0xc6b4, 0xc6b5, - 0xc6b6, 0xc6b7, 0xc6b8, 0xc6b9, 0xc6ba, 0xc6bb, 0xc6bc, 0xc6bd, - 0xc6c1, 0xc6c2, 0xc6c3, 0xc6c4, 0xc6c5, 0xc6c6, 0xc6c7, 0xc6c8, - 0xc6c9, 0xc6ca, 0xc6cb, 0xc6cc, 0xc6cd, 0xc6ce, 0xc6cf, 0xc6d0, - 0xc6d1, 0xc6d3, 0xc6d4, 0xc6d5, 0xc6d6, 0xc6d7, 0xc6d8, 0xc6d9, - 0xc6da, 0xc6db, 0xc6dc, 0xc6dd, 0xc6e1, 0xc6e2, 0xc6e3, 0xc6e4, - 0xc6e5, 0xc6e6, 0xc6e7, 0xc6e8, 0xc6e9, 0xc6ea, 0xc6eb, 0xc6ec, - 0xc6ed, 0xc6ee, 0xc6ef, 0xc6f0, 0xc6f1, 0xc6f3, 0xc6f4, 0xc6f5, - 0xc6f6, 0xc6f7, 0xc6f8, 0xc6f9, 0xc6fa, 0xc6fb, 0xc6fc, 0xc6fd, - 0xc741, 0xc742, 0xc743, 0xc744, 0xc745, 0xc746, 0xc747, 0xc748, - 0xc749, 0xc74a, 0xc74b, 0xc74c, 0xc74d, 0xc74e, 0xc74f, 0xc750, - 0xc751, 0xc753, 0xc754, 0xc755, 0xc756, 0xc757, 0xc758, 0xc759, - 0xc75a, 0xc75b, 0xc75c, 0xc75d, 0xc761, 0xc762, 0xc763, 0xc764, - 0xc765, 0xc766, 0xc767, 0xc768, 0xc769, 0xc76a, 0xc76b, 0xc76c, - 0xc76d, 0xc76e, 0xc76f, 0xc770, 0xc771, 0xc773, 0xc774, 0xc775, - 0xc776, 0xc777, 0xc778, 0xc779, 0xc77a, 0xc77b, 0xc77c, 0xc77d, - 0xc781, 0xc782, 0xc783, 0xc784, 0xc785, 0xc786, 0xc787, 0xc788, - 0xc789, 0xc78a, 0xc78b, 0xc78c, 0xc78d, 0xc78e, 0xc78f, 0xc790, - 0xc791, 0xc793, 0xc794, 0xc795, 0xc796, 0xc797, 0xc798, 0xc799, - 0xc79a, 0xc79b, 0xc79c, 0xc79d, 0xc7a1, 0xc7a2, 0xc7a3, 0xc7a4, - 0xc7a5, 0xc7a6, 0xc7a7, 0xc7a8, 0xc7a9, 0xc7aa, 0xc7ab, 0xc7ac, - 0xc7ad, 0xc7ae, 0xc7af, 0xc7b0, 0xc7b1, 0xc7b3, 0xc7b4, 0xc7b5, - 0xc7b6, 0xc7b7, 0xc7b8, 0xc7b9, 0xc7ba, 0xc7bb, 0xc7bc, 0xc7bd, - 0xc861, 0xc862, 0xc863, 0xc864, 0xc865, 0xc866, 0xc867, 0xc868, - 0xc869, 0xc86a, 0xc86b, 0xc86c, 0xc86d, 0xc86e, 0xc86f, 0xc870, - 0xc871, 0xc873, 0xc874, 0xc875, 0xc876, 0xc877, 0xc878, 0xc879, - 0xc87a, 0xc87b, 0xc87c, 0xc87d, 0xc881, 0xc882, 0xc883, 0xc884, - 0xc885, 0xc886, 0xc887, 0xc888, 0xc889, 0xc88a, 0xc88b, 0xc88c, - 0xc88d, 0xc88e, 0xc88f, 0xc890, 0xc891, 0xc893, 0xc894, 0xc895, - 0xc896, 0xc897, 0xc898, 0xc899, 0xc89a, 0xc89b, 0xc89c, 0xc89d, - 0xc8a1, 0xc8a2, 0xc8a3, 0xc8a4, 0xc8a5, 0xc8a6, 0xc8a7, 0xc8a8, - /* 0xd100 .. 0xd1ff */ - 0xc8a9, 0xc8aa, 0xc8ab, 0xc8ac, 0xc8ad, 0xc8ae, 0xc8af, 0xc8b0, - 0xc8b1, 0xc8b3, 0xc8b4, 0xc8b5, 0xc8b6, 0xc8b7, 0xc8b8, 0xc8b9, - 0xc8ba, 0xc8bb, 0xc8bc, 0xc8bd, 0xc8c1, 0xc8c2, 0xc8c3, 0xc8c4, - 0xc8c5, 0xc8c6, 0xc8c7, 0xc8c8, 0xc8c9, 0xc8ca, 0xc8cb, 0xc8cc, - 0xc8cd, 0xc8ce, 0xc8cf, 0xc8d0, 0xc8d1, 0xc8d3, 0xc8d4, 0xc8d5, - 0xc8d6, 0xc8d7, 0xc8d8, 0xc8d9, 0xc8da, 0xc8db, 0xc8dc, 0xc8dd, - 0xc8e1, 0xc8e2, 0xc8e3, 0xc8e4, 0xc8e5, 0xc8e6, 0xc8e7, 0xc8e8, - 0xc8e9, 0xc8ea, 0xc8eb, 0xc8ec, 0xc8ed, 0xc8ee, 0xc8ef, 0xc8f0, - 0xc8f1, 0xc8f3, 0xc8f4, 0xc8f5, 0xc8f6, 0xc8f7, 0xc8f8, 0xc8f9, - 0xc8fa, 0xc8fb, 0xc8fc, 0xc8fd, 0xc941, 0xc942, 0xc943, 0xc944, - 0xc945, 0xc946, 0xc947, 0xc948, 0xc949, 0xc94a, 0xc94b, 0xc94c, - 0xc94d, 0xc94e, 0xc94f, 0xc950, 0xc951, 0xc953, 0xc954, 0xc955, - 0xc956, 0xc957, 0xc958, 0xc959, 0xc95a, 0xc95b, 0xc95c, 0xc95d, - 0xc961, 0xc962, 0xc963, 0xc964, 0xc965, 0xc966, 0xc967, 0xc968, - 0xc969, 0xc96a, 0xc96b, 0xc96c, 0xc96d, 0xc96e, 0xc96f, 0xc970, - 0xc971, 0xc973, 0xc974, 0xc975, 0xc976, 0xc977, 0xc978, 0xc979, - 0xc97a, 0xc97b, 0xc97c, 0xc97d, 0xc981, 0xc982, 0xc983, 0xc984, - 0xc985, 0xc986, 0xc987, 0xc988, 0xc989, 0xc98a, 0xc98b, 0xc98c, - 0xc98d, 0xc98e, 0xc98f, 0xc990, 0xc991, 0xc993, 0xc994, 0xc995, - 0xc996, 0xc997, 0xc998, 0xc999, 0xc99a, 0xc99b, 0xc99c, 0xc99d, - 0xc9a1, 0xc9a2, 0xc9a3, 0xc9a4, 0xc9a5, 0xc9a6, 0xc9a7, 0xc9a8, - 0xc9a9, 0xc9aa, 0xc9ab, 0xc9ac, 0xc9ad, 0xc9ae, 0xc9af, 0xc9b0, - 0xc9b1, 0xc9b3, 0xc9b4, 0xc9b5, 0xc9b6, 0xc9b7, 0xc9b8, 0xc9b9, - 0xc9ba, 0xc9bb, 0xc9bc, 0xc9bd, 0xc9c1, 0xc9c2, 0xc9c3, 0xc9c4, - 0xc9c5, 0xc9c6, 0xc9c7, 0xc9c8, 0xc9c9, 0xc9ca, 0xc9cb, 0xc9cc, - 0xc9cd, 0xc9ce, 0xc9cf, 0xc9d0, 0xc9d1, 0xc9d3, 0xc9d4, 0xc9d5, - 0xc9d6, 0xc9d7, 0xc9d8, 0xc9d9, 0xc9da, 0xc9db, 0xc9dc, 0xc9dd, - 0xc9e1, 0xc9e2, 0xc9e3, 0xc9e4, 0xc9e5, 0xc9e6, 0xc9e7, 0xc9e8, - 0xc9e9, 0xc9ea, 0xc9eb, 0xc9ec, 0xc9ed, 0xc9ee, 0xc9ef, 0xc9f0, - 0xc9f1, 0xc9f3, 0xc9f4, 0xc9f5, 0xc9f6, 0xc9f7, 0xc9f8, 0xc9f9, - 0xc9fa, 0xc9fb, 0xc9fc, 0xc9fd, 0xca41, 0xca42, 0xca43, 0xca44, - 0xca45, 0xca46, 0xca47, 0xca48, 0xca49, 0xca4a, 0xca4b, 0xca4c, - /* 0xd200 .. 0xd2ff */ - 0xca4d, 0xca4e, 0xca4f, 0xca50, 0xca51, 0xca53, 0xca54, 0xca55, - 0xca56, 0xca57, 0xca58, 0xca59, 0xca5a, 0xca5b, 0xca5c, 0xca5d, - 0xca61, 0xca62, 0xca63, 0xca64, 0xca65, 0xca66, 0xca67, 0xca68, - 0xca69, 0xca6a, 0xca6b, 0xca6c, 0xca6d, 0xca6e, 0xca6f, 0xca70, - 0xca71, 0xca73, 0xca74, 0xca75, 0xca76, 0xca77, 0xca78, 0xca79, - 0xca7a, 0xca7b, 0xca7c, 0xca7d, 0xca81, 0xca82, 0xca83, 0xca84, - 0xca85, 0xca86, 0xca87, 0xca88, 0xca89, 0xca8a, 0xca8b, 0xca8c, - 0xca8d, 0xca8e, 0xca8f, 0xca90, 0xca91, 0xca93, 0xca94, 0xca95, - 0xca96, 0xca97, 0xca98, 0xca99, 0xca9a, 0xca9b, 0xca9c, 0xca9d, - 0xcaa1, 0xcaa2, 0xcaa3, 0xcaa4, 0xcaa5, 0xcaa6, 0xcaa7, 0xcaa8, - 0xcaa9, 0xcaaa, 0xcaab, 0xcaac, 0xcaad, 0xcaae, 0xcaaf, 0xcab0, - 0xcab1, 0xcab3, 0xcab4, 0xcab5, 0xcab6, 0xcab7, 0xcab8, 0xcab9, - 0xcaba, 0xcabb, 0xcabc, 0xcabd, 0xcac1, 0xcac2, 0xcac3, 0xcac4, - 0xcac5, 0xcac6, 0xcac7, 0xcac8, 0xcac9, 0xcaca, 0xcacb, 0xcacc, - 0xcacd, 0xcace, 0xcacf, 0xcad0, 0xcad1, 0xcad3, 0xcad4, 0xcad5, - 0xcad6, 0xcad7, 0xcad8, 0xcad9, 0xcada, 0xcadb, 0xcadc, 0xcadd, - 0xcae1, 0xcae2, 0xcae3, 0xcae4, 0xcae5, 0xcae6, 0xcae7, 0xcae8, - 0xcae9, 0xcaea, 0xcaeb, 0xcaec, 0xcaed, 0xcaee, 0xcaef, 0xcaf0, - 0xcaf1, 0xcaf3, 0xcaf4, 0xcaf5, 0xcaf6, 0xcaf7, 0xcaf8, 0xcaf9, - 0xcafa, 0xcafb, 0xcafc, 0xcafd, 0xcb41, 0xcb42, 0xcb43, 0xcb44, - 0xcb45, 0xcb46, 0xcb47, 0xcb48, 0xcb49, 0xcb4a, 0xcb4b, 0xcb4c, - 0xcb4d, 0xcb4e, 0xcb4f, 0xcb50, 0xcb51, 0xcb53, 0xcb54, 0xcb55, - 0xcb56, 0xcb57, 0xcb58, 0xcb59, 0xcb5a, 0xcb5b, 0xcb5c, 0xcb5d, - 0xcb61, 0xcb62, 0xcb63, 0xcb64, 0xcb65, 0xcb66, 0xcb67, 0xcb68, - 0xcb69, 0xcb6a, 0xcb6b, 0xcb6c, 0xcb6d, 0xcb6e, 0xcb6f, 0xcb70, - 0xcb71, 0xcb73, 0xcb74, 0xcb75, 0xcb76, 0xcb77, 0xcb78, 0xcb79, - 0xcb7a, 0xcb7b, 0xcb7c, 0xcb7d, 0xcb81, 0xcb82, 0xcb83, 0xcb84, - 0xcb85, 0xcb86, 0xcb87, 0xcb88, 0xcb89, 0xcb8a, 0xcb8b, 0xcb8c, - 0xcb8d, 0xcb8e, 0xcb8f, 0xcb90, 0xcb91, 0xcb93, 0xcb94, 0xcb95, - 0xcb96, 0xcb97, 0xcb98, 0xcb99, 0xcb9a, 0xcb9b, 0xcb9c, 0xcb9d, - 0xcba1, 0xcba2, 0xcba3, 0xcba4, 0xcba5, 0xcba6, 0xcba7, 0xcba8, - 0xcba9, 0xcbaa, 0xcbab, 0xcbac, 0xcbad, 0xcbae, 0xcbaf, 0xcbb0, - /* 0xd300 .. 0xd3ff */ - 0xcbb1, 0xcbb3, 0xcbb4, 0xcbb5, 0xcbb6, 0xcbb7, 0xcbb8, 0xcbb9, - 0xcbba, 0xcbbb, 0xcbbc, 0xcbbd, 0xcc61, 0xcc62, 0xcc63, 0xcc64, - 0xcc65, 0xcc66, 0xcc67, 0xcc68, 0xcc69, 0xcc6a, 0xcc6b, 0xcc6c, - 0xcc6d, 0xcc6e, 0xcc6f, 0xcc70, 0xcc71, 0xcc73, 0xcc74, 0xcc75, - 0xcc76, 0xcc77, 0xcc78, 0xcc79, 0xcc7a, 0xcc7b, 0xcc7c, 0xcc7d, - 0xcc81, 0xcc82, 0xcc83, 0xcc84, 0xcc85, 0xcc86, 0xcc87, 0xcc88, - 0xcc89, 0xcc8a, 0xcc8b, 0xcc8c, 0xcc8d, 0xcc8e, 0xcc8f, 0xcc90, - 0xcc91, 0xcc93, 0xcc94, 0xcc95, 0xcc96, 0xcc97, 0xcc98, 0xcc99, - 0xcc9a, 0xcc9b, 0xcc9c, 0xcc9d, 0xcca1, 0xcca2, 0xcca3, 0xcca4, - 0xcca5, 0xcca6, 0xcca7, 0xcca8, 0xcca9, 0xccaa, 0xccab, 0xccac, - 0xccad, 0xccae, 0xccaf, 0xccb0, 0xccb1, 0xccb3, 0xccb4, 0xccb5, - 0xccb6, 0xccb7, 0xccb8, 0xccb9, 0xccba, 0xccbb, 0xccbc, 0xccbd, - 0xccc1, 0xccc2, 0xccc3, 0xccc4, 0xccc5, 0xccc6, 0xccc7, 0xccc8, - 0xccc9, 0xccca, 0xcccb, 0xcccc, 0xcccd, 0xccce, 0xcccf, 0xccd0, - 0xccd1, 0xccd3, 0xccd4, 0xccd5, 0xccd6, 0xccd7, 0xccd8, 0xccd9, - 0xccda, 0xccdb, 0xccdc, 0xccdd, 0xcce1, 0xcce2, 0xcce3, 0xcce4, - 0xcce5, 0xcce6, 0xcce7, 0xcce8, 0xcce9, 0xccea, 0xcceb, 0xccec, - 0xcced, 0xccee, 0xccef, 0xccf0, 0xccf1, 0xccf3, 0xccf4, 0xccf5, - 0xccf6, 0xccf7, 0xccf8, 0xccf9, 0xccfa, 0xccfb, 0xccfc, 0xccfd, - 0xcd41, 0xcd42, 0xcd43, 0xcd44, 0xcd45, 0xcd46, 0xcd47, 0xcd48, - 0xcd49, 0xcd4a, 0xcd4b, 0xcd4c, 0xcd4d, 0xcd4e, 0xcd4f, 0xcd50, - 0xcd51, 0xcd53, 0xcd54, 0xcd55, 0xcd56, 0xcd57, 0xcd58, 0xcd59, - 0xcd5a, 0xcd5b, 0xcd5c, 0xcd5d, 0xcd61, 0xcd62, 0xcd63, 0xcd64, - 0xcd65, 0xcd66, 0xcd67, 0xcd68, 0xcd69, 0xcd6a, 0xcd6b, 0xcd6c, - 0xcd6d, 0xcd6e, 0xcd6f, 0xcd70, 0xcd71, 0xcd73, 0xcd74, 0xcd75, - 0xcd76, 0xcd77, 0xcd78, 0xcd79, 0xcd7a, 0xcd7b, 0xcd7c, 0xcd7d, - 0xcd81, 0xcd82, 0xcd83, 0xcd84, 0xcd85, 0xcd86, 0xcd87, 0xcd88, - 0xcd89, 0xcd8a, 0xcd8b, 0xcd8c, 0xcd8d, 0xcd8e, 0xcd8f, 0xcd90, - 0xcd91, 0xcd93, 0xcd94, 0xcd95, 0xcd96, 0xcd97, 0xcd98, 0xcd99, - 0xcd9a, 0xcd9b, 0xcd9c, 0xcd9d, 0xcda1, 0xcda2, 0xcda3, 0xcda4, - 0xcda5, 0xcda6, 0xcda7, 0xcda8, 0xcda9, 0xcdaa, 0xcdab, 0xcdac, - 0xcdad, 0xcdae, 0xcdaf, 0xcdb0, 0xcdb1, 0xcdb3, 0xcdb4, 0xcdb5, - /* 0xd400 .. 0xd4ff */ - 0xcdb6, 0xcdb7, 0xcdb8, 0xcdb9, 0xcdba, 0xcdbb, 0xcdbc, 0xcdbd, - 0xcdc1, 0xcdc2, 0xcdc3, 0xcdc4, 0xcdc5, 0xcdc6, 0xcdc7, 0xcdc8, - 0xcdc9, 0xcdca, 0xcdcb, 0xcdcc, 0xcdcd, 0xcdce, 0xcdcf, 0xcdd0, - 0xcdd1, 0xcdd3, 0xcdd4, 0xcdd5, 0xcdd6, 0xcdd7, 0xcdd8, 0xcdd9, - 0xcdda, 0xcddb, 0xcddc, 0xcddd, 0xcde1, 0xcde2, 0xcde3, 0xcde4, - 0xcde5, 0xcde6, 0xcde7, 0xcde8, 0xcde9, 0xcdea, 0xcdeb, 0xcdec, - 0xcded, 0xcdee, 0xcdef, 0xcdf0, 0xcdf1, 0xcdf3, 0xcdf4, 0xcdf5, - 0xcdf6, 0xcdf7, 0xcdf8, 0xcdf9, 0xcdfa, 0xcdfb, 0xcdfc, 0xcdfd, - 0xce41, 0xce42, 0xce43, 0xce44, 0xce45, 0xce46, 0xce47, 0xce48, - 0xce49, 0xce4a, 0xce4b, 0xce4c, 0xce4d, 0xce4e, 0xce4f, 0xce50, - 0xce51, 0xce53, 0xce54, 0xce55, 0xce56, 0xce57, 0xce58, 0xce59, - 0xce5a, 0xce5b, 0xce5c, 0xce5d, 0xce61, 0xce62, 0xce63, 0xce64, - 0xce65, 0xce66, 0xce67, 0xce68, 0xce69, 0xce6a, 0xce6b, 0xce6c, - 0xce6d, 0xce6e, 0xce6f, 0xce70, 0xce71, 0xce73, 0xce74, 0xce75, - 0xce76, 0xce77, 0xce78, 0xce79, 0xce7a, 0xce7b, 0xce7c, 0xce7d, - 0xce81, 0xce82, 0xce83, 0xce84, 0xce85, 0xce86, 0xce87, 0xce88, - 0xce89, 0xce8a, 0xce8b, 0xce8c, 0xce8d, 0xce8e, 0xce8f, 0xce90, - 0xce91, 0xce93, 0xce94, 0xce95, 0xce96, 0xce97, 0xce98, 0xce99, - 0xce9a, 0xce9b, 0xce9c, 0xce9d, 0xcea1, 0xcea2, 0xcea3, 0xcea4, - 0xcea5, 0xcea6, 0xcea7, 0xcea8, 0xcea9, 0xceaa, 0xceab, 0xceac, - 0xcead, 0xceae, 0xceaf, 0xceb0, 0xceb1, 0xceb3, 0xceb4, 0xceb5, - 0xceb6, 0xceb7, 0xceb8, 0xceb9, 0xceba, 0xcebb, 0xcebc, 0xcebd, - 0xcec1, 0xcec2, 0xcec3, 0xcec4, 0xcec5, 0xcec6, 0xcec7, 0xcec8, - 0xcec9, 0xceca, 0xcecb, 0xcecc, 0xcecd, 0xcece, 0xcecf, 0xced0, - 0xced1, 0xced3, 0xced4, 0xced5, 0xced6, 0xced7, 0xced8, 0xced9, - 0xceda, 0xcedb, 0xcedc, 0xcedd, 0xcee1, 0xcee2, 0xcee3, 0xcee4, - 0xcee5, 0xcee6, 0xcee7, 0xcee8, 0xcee9, 0xceea, 0xceeb, 0xceec, - 0xceed, 0xceee, 0xceef, 0xcef0, 0xcef1, 0xcef3, 0xcef4, 0xcef5, - 0xcef6, 0xcef7, 0xcef8, 0xcef9, 0xcefa, 0xcefb, 0xcefc, 0xcefd, - 0xcf41, 0xcf42, 0xcf43, 0xcf44, 0xcf45, 0xcf46, 0xcf47, 0xcf48, - 0xcf49, 0xcf4a, 0xcf4b, 0xcf4c, 0xcf4d, 0xcf4e, 0xcf4f, 0xcf50, - 0xcf51, 0xcf53, 0xcf54, 0xcf55, 0xcf56, 0xcf57, 0xcf58, 0xcf59, - /* 0xd500 .. 0xd5ff */ - 0xcf5a, 0xcf5b, 0xcf5c, 0xcf5d, 0xcf61, 0xcf62, 0xcf63, 0xcf64, - 0xcf65, 0xcf66, 0xcf67, 0xcf68, 0xcf69, 0xcf6a, 0xcf6b, 0xcf6c, - 0xcf6d, 0xcf6e, 0xcf6f, 0xcf70, 0xcf71, 0xcf73, 0xcf74, 0xcf75, - 0xcf76, 0xcf77, 0xcf78, 0xcf79, 0xcf7a, 0xcf7b, 0xcf7c, 0xcf7d, - 0xcf81, 0xcf82, 0xcf83, 0xcf84, 0xcf85, 0xcf86, 0xcf87, 0xcf88, - 0xcf89, 0xcf8a, 0xcf8b, 0xcf8c, 0xcf8d, 0xcf8e, 0xcf8f, 0xcf90, - 0xcf91, 0xcf93, 0xcf94, 0xcf95, 0xcf96, 0xcf97, 0xcf98, 0xcf99, - 0xcf9a, 0xcf9b, 0xcf9c, 0xcf9d, 0xcfa1, 0xcfa2, 0xcfa3, 0xcfa4, - 0xcfa5, 0xcfa6, 0xcfa7, 0xcfa8, 0xcfa9, 0xcfaa, 0xcfab, 0xcfac, - 0xcfad, 0xcfae, 0xcfaf, 0xcfb0, 0xcfb1, 0xcfb3, 0xcfb4, 0xcfb5, - 0xcfb6, 0xcfb7, 0xcfb8, 0xcfb9, 0xcfba, 0xcfbb, 0xcfbc, 0xcfbd, - 0xd061, 0xd062, 0xd063, 0xd064, 0xd065, 0xd066, 0xd067, 0xd068, - 0xd069, 0xd06a, 0xd06b, 0xd06c, 0xd06d, 0xd06e, 0xd06f, 0xd070, - 0xd071, 0xd073, 0xd074, 0xd075, 0xd076, 0xd077, 0xd078, 0xd079, - 0xd07a, 0xd07b, 0xd07c, 0xd07d, 0xd081, 0xd082, 0xd083, 0xd084, - 0xd085, 0xd086, 0xd087, 0xd088, 0xd089, 0xd08a, 0xd08b, 0xd08c, - 0xd08d, 0xd08e, 0xd08f, 0xd090, 0xd091, 0xd093, 0xd094, 0xd095, - 0xd096, 0xd097, 0xd098, 0xd099, 0xd09a, 0xd09b, 0xd09c, 0xd09d, - 0xd0a1, 0xd0a2, 0xd0a3, 0xd0a4, 0xd0a5, 0xd0a6, 0xd0a7, 0xd0a8, - 0xd0a9, 0xd0aa, 0xd0ab, 0xd0ac, 0xd0ad, 0xd0ae, 0xd0af, 0xd0b0, - 0xd0b1, 0xd0b3, 0xd0b4, 0xd0b5, 0xd0b6, 0xd0b7, 0xd0b8, 0xd0b9, - 0xd0ba, 0xd0bb, 0xd0bc, 0xd0bd, 0xd0c1, 0xd0c2, 0xd0c3, 0xd0c4, - 0xd0c5, 0xd0c6, 0xd0c7, 0xd0c8, 0xd0c9, 0xd0ca, 0xd0cb, 0xd0cc, - 0xd0cd, 0xd0ce, 0xd0cf, 0xd0d0, 0xd0d1, 0xd0d3, 0xd0d4, 0xd0d5, - 0xd0d6, 0xd0d7, 0xd0d8, 0xd0d9, 0xd0da, 0xd0db, 0xd0dc, 0xd0dd, - 0xd0e1, 0xd0e2, 0xd0e3, 0xd0e4, 0xd0e5, 0xd0e6, 0xd0e7, 0xd0e8, - 0xd0e9, 0xd0ea, 0xd0eb, 0xd0ec, 0xd0ed, 0xd0ee, 0xd0ef, 0xd0f0, - 0xd0f1, 0xd0f3, 0xd0f4, 0xd0f5, 0xd0f6, 0xd0f7, 0xd0f8, 0xd0f9, - 0xd0fa, 0xd0fb, 0xd0fc, 0xd0fd, 0xd141, 0xd142, 0xd143, 0xd144, - 0xd145, 0xd146, 0xd147, 0xd148, 0xd149, 0xd14a, 0xd14b, 0xd14c, - 0xd14d, 0xd14e, 0xd14f, 0xd150, 0xd151, 0xd153, 0xd154, 0xd155, - 0xd156, 0xd157, 0xd158, 0xd159, 0xd15a, 0xd15b, 0xd15c, 0xd15d, - /* 0xd600 .. 0xd6ff */ - 0xd161, 0xd162, 0xd163, 0xd164, 0xd165, 0xd166, 0xd167, 0xd168, - 0xd169, 0xd16a, 0xd16b, 0xd16c, 0xd16d, 0xd16e, 0xd16f, 0xd170, - 0xd171, 0xd173, 0xd174, 0xd175, 0xd176, 0xd177, 0xd178, 0xd179, - 0xd17a, 0xd17b, 0xd17c, 0xd17d, 0xd181, 0xd182, 0xd183, 0xd184, - 0xd185, 0xd186, 0xd187, 0xd188, 0xd189, 0xd18a, 0xd18b, 0xd18c, - 0xd18d, 0xd18e, 0xd18f, 0xd190, 0xd191, 0xd193, 0xd194, 0xd195, - 0xd196, 0xd197, 0xd198, 0xd199, 0xd19a, 0xd19b, 0xd19c, 0xd19d, - 0xd1a1, 0xd1a2, 0xd1a3, 0xd1a4, 0xd1a5, 0xd1a6, 0xd1a7, 0xd1a8, - 0xd1a9, 0xd1aa, 0xd1ab, 0xd1ac, 0xd1ad, 0xd1ae, 0xd1af, 0xd1b0, - 0xd1b1, 0xd1b3, 0xd1b4, 0xd1b5, 0xd1b6, 0xd1b7, 0xd1b8, 0xd1b9, - 0xd1ba, 0xd1bb, 0xd1bc, 0xd1bd, 0xd1c1, 0xd1c2, 0xd1c3, 0xd1c4, - 0xd1c5, 0xd1c6, 0xd1c7, 0xd1c8, 0xd1c9, 0xd1ca, 0xd1cb, 0xd1cc, - 0xd1cd, 0xd1ce, 0xd1cf, 0xd1d0, 0xd1d1, 0xd1d3, 0xd1d4, 0xd1d5, - 0xd1d6, 0xd1d7, 0xd1d8, 0xd1d9, 0xd1da, 0xd1db, 0xd1dc, 0xd1dd, - 0xd1e1, 0xd1e2, 0xd1e3, 0xd1e4, 0xd1e5, 0xd1e6, 0xd1e7, 0xd1e8, - 0xd1e9, 0xd1ea, 0xd1eb, 0xd1ec, 0xd1ed, 0xd1ee, 0xd1ef, 0xd1f0, - 0xd1f1, 0xd1f3, 0xd1f4, 0xd1f5, 0xd1f6, 0xd1f7, 0xd1f8, 0xd1f9, - 0xd1fa, 0xd1fb, 0xd1fc, 0xd1fd, 0xd241, 0xd242, 0xd243, 0xd244, - 0xd245, 0xd246, 0xd247, 0xd248, 0xd249, 0xd24a, 0xd24b, 0xd24c, - 0xd24d, 0xd24e, 0xd24f, 0xd250, 0xd251, 0xd253, 0xd254, 0xd255, - 0xd256, 0xd257, 0xd258, 0xd259, 0xd25a, 0xd25b, 0xd25c, 0xd25d, - 0xd261, 0xd262, 0xd263, 0xd264, 0xd265, 0xd266, 0xd267, 0xd268, - 0xd269, 0xd26a, 0xd26b, 0xd26c, 0xd26d, 0xd26e, 0xd26f, 0xd270, - 0xd271, 0xd273, 0xd274, 0xd275, 0xd276, 0xd277, 0xd278, 0xd279, - 0xd27a, 0xd27b, 0xd27c, 0xd27d, 0xd281, 0xd282, 0xd283, 0xd284, - 0xd285, 0xd286, 0xd287, 0xd288, 0xd289, 0xd28a, 0xd28b, 0xd28c, - 0xd28d, 0xd28e, 0xd28f, 0xd290, 0xd291, 0xd293, 0xd294, 0xd295, - 0xd296, 0xd297, 0xd298, 0xd299, 0xd29a, 0xd29b, 0xd29c, 0xd29d, - 0xd2a1, 0xd2a2, 0xd2a3, 0xd2a4, 0xd2a5, 0xd2a6, 0xd2a7, 0xd2a8, - 0xd2a9, 0xd2aa, 0xd2ab, 0xd2ac, 0xd2ad, 0xd2ae, 0xd2af, 0xd2b0, - 0xd2b1, 0xd2b3, 0xd2b4, 0xd2b5, 0xd2b6, 0xd2b7, 0xd2b8, 0xd2b9, - 0xd2ba, 0xd2bb, 0xd2bc, 0xd2bd, 0xd2c1, 0xd2c2, 0xd2c3, 0xd2c4, - /* 0xd700 .. 0xd7ff */ - 0xd2c5, 0xd2c6, 0xd2c7, 0xd2c8, 0xd2c9, 0xd2ca, 0xd2cb, 0xd2cc, - 0xd2cd, 0xd2ce, 0xd2cf, 0xd2d0, 0xd2d1, 0xd2d3, 0xd2d4, 0xd2d5, - 0xd2d6, 0xd2d7, 0xd2d8, 0xd2d9, 0xd2da, 0xd2db, 0xd2dc, 0xd2dd, - 0xd2e1, 0xd2e2, 0xd2e3, 0xd2e4, 0xd2e5, 0xd2e6, 0xd2e7, 0xd2e8, - 0xd2e9, 0xd2ea, 0xd2eb, 0xd2ec, 0xd2ed, 0xd2ee, 0xd2ef, 0xd2f0, - 0xd2f1, 0xd2f3, 0xd2f4, 0xd2f5, 0xd2f6, 0xd2f7, 0xd2f8, 0xd2f9, - 0xd2fa, 0xd2fb, 0xd2fc, 0xd2fd, 0xd341, 0xd342, 0xd343, 0xd344, - 0xd345, 0xd346, 0xd347, 0xd348, 0xd349, 0xd34a, 0xd34b, 0xd34c, - 0xd34d, 0xd34e, 0xd34f, 0xd350, 0xd351, 0xd353, 0xd354, 0xd355, - 0xd356, 0xd357, 0xd358, 0xd359, 0xd35a, 0xd35b, 0xd35c, 0xd35d, - 0xd361, 0xd362, 0xd363, 0xd364, 0xd365, 0xd366, 0xd367, 0xd368, - 0xd369, 0xd36a, 0xd36b, 0xd36c, 0xd36d, 0xd36e, 0xd36f, 0xd370, - 0xd371, 0xd373, 0xd374, 0xd375, 0xd376, 0xd377, 0xd378, 0xd379, - 0xd37a, 0xd37b, 0xd37c, 0xd37d, 0xd381, 0xd382, 0xd383, 0xd384, - 0xd385, 0xd386, 0xd387, 0xd388, 0xd389, 0xd38a, 0xd38b, 0xd38c, - 0xd38d, 0xd38e, 0xd38f, 0xd390, 0xd391, 0xd393, 0xd394, 0xd395, - 0xd396, 0xd397, 0xd398, 0xd399, 0xd39a, 0xd39b, 0xd39c, 0xd39d, - 0xd3a1, 0xd3a2, 0xd3a3, 0xd3a4, 0xd3a5, 0xd3a6, 0xd3a7, 0xd3a8, - 0xd3a9, 0xd3aa, 0xd3ab, 0xd3ac, 0xd3ad, 0xd3ae, 0xd3af, 0xd3b0, - 0xd3b1, 0xd3b3, 0xd3b4, 0xd3b5, 0xd3b6, 0xd3b7, 0xd3b8, 0xd3b9, - 0xd3ba, 0xd3bb, 0xd3bc, 0xd3bd, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xf900 .. 0xf9ff */ - 0xe0d0, 0xe0d6, 0xe0e7, 0xe1cf, 0xe1e8, 0xe23d, 0xe2fb, 0xe332, - 0xe348, 0xe360, 0xe36d, 0xe3d4, 0xe3d5, 0xe3d8, 0xe3db, 0xe3dc, - 0xe3dd, 0xe3de, 0xe3df, 0xe3e0, 0xe3e2, 0xe3e3, 0xe3e4, 0xe3e5, - 0xe3e6, 0xe3e8, 0xe3e9, 0xe3ea, 0xe3eb, 0xe3ed, 0xe3ef, 0xe3f0, - 0xe3f2, 0xe3f6, 0xe3fa, 0xe3fc, 0xe3fd, 0xe3fe, 0xe432, 0xe433, - 0xe437, 0xe438, 0xe439, 0xe43a, 0xe43b, 0xe43d, 0xe442, 0xe44e, - 0xe452, 0xe453, 0xe454, 0xe456, 0xe457, 0xe458, 0xe459, 0xe45a, - 0xe45b, 0xe45d, 0xe45e, 0xe45f, 0xe460, 0xe461, 0xe462, 0xe463, - 0xe464, 0xe465, 0xe466, 0xe467, 0xe469, 0xe46a, 0xe46e, 0xe46f, - 0xe471, 0xe472, 0xe474, 0xe475, 0xe476, 0xe477, 0xe478, 0xe479, - 0xe47a, 0xe47b, 0xe492, 0xe493, 0xe494, 0xe495, 0xe496, 0xe497, - 0xe499, 0xe49a, 0xe576, 0xe59e, 0xe5a5, 0xe5ab, 0xe5ae, 0xe648, - 0xe65d, 0xe6cb, 0xe6e4, 0xe8c5, 0xe8e4, 0xe935, 0xe9a5, 0xe9d5, - 0xe9f4, 0xea9e, 0xeaa0, 0xeab3, 0xeae1, 0xeae8, 0xeb93, 0xebad, - 0xebed, 0xecf5, 0xed31, 0xed39, 0xedae, 0xedb1, 0xedb2, 0xedb9, - 0xedbb, 0xedbc, 0xedc4, 0xedce, 0xedd0, 0xedd2, 0xedd6, 0xedfa, - 0xedfb, 0xedfc, 0xedfe, 0xee31, 0xee34, 0xee37, 0xee3d, 0xee3f, - 0xee40, 0xee41, 0xee43, 0xee47, 0xee48, 0xee4c, 0xee54, 0xee56, - 0xee57, 0xee5a, 0xee62, 0xee66, 0xee69, 0xee6c, 0xee6f, 0xee71, - 0xee74, 0xee75, 0xee76, 0xee78, 0xee7a, 0xee7b, 0xee7c, 0xee91, - 0xee93, 0xee94, 0xee97, 0xee98, 0xee99, 0xee9b, 0xeea1, 0xeea6, - 0xeea9, 0xeeaa, 0xeeac, 0xeead, 0xeeb0, 0xeebf, 0xeec1, 0xeec6, - 0xeec7, 0xeecb, 0xeecd, 0xeecf, 0xeed0, 0xeed3, 0xeedf, 0xeee4, - 0xeee6, 0xeef7, 0xef77, 0xef78, 0xef92, 0xef93, 0xef99, 0xef9b, - 0xef9d, 0xefa0, 0xefa7, 0xefac, 0xefcc, 0xeff7, 0xf051, 0xf075, - 0xf096, 0xf099, 0xf09e, 0xf0a0, 0xf0a4, 0xf0a7, 0xf0a9, 0xf0aa, - 0xf0ba, 0xf0bb, 0xf0bd, 0xf0c1, 0xf0c2, 0xf0c6, 0xf0c7, 0xf0cc, - 0xf0cf, 0xf0d0, 0xf0d1, 0xf0d2, 0xf0d8, 0xf136, 0xf137, 0xf13a, - 0xf13f, 0xf140, 0xf141, 0xf142, 0xf145, 0xf148, 0xf14a, 0xf150, - 0xf151, 0xf155, 0xf156, 0xf159, 0xf15a, 0xf165, 0xf16d, 0xf16e, - 0xf171, 0xf174, 0xf177, 0xf178, 0xf199, 0xf19a, 0xf19c, 0xf1a1, - 0xf1a2, 0xf1a3, 0xf1ee, 0xf26b, 0xf44d, 0xf49c, 0xf4b1, 0xf537, - /* 0xfa00 .. 0xfaff */ - 0xf57e, 0xf696, 0xf698, 0xf6b8, 0xf6c8, 0xf6d3, 0xf76b, 0xf792, - 0xf831, 0xf832, 0xf876, 0xf939, 0xef44, 0x003f, 0x003f, 0x003f, - 0xf5c0, 0x003f, 0xf577, 0x003f, 0x003f, 0xf9eb, 0xf254, 0xf15c, - 0x003f, 0xecea, 0xead4, 0xe968, 0xf2fe, 0xf2f1, 0xefe2, 0x003f, - 0x003f, 0x003f, 0xf343, 0x003f, 0x003f, 0xf191, 0xe544, 0x003f, - 0x003f, 0x003f, 0xe89b, 0xea9a, 0xe24d, 0xf7cd, 0x003f, 0x003f, - 0xe7b2, 0xecac, 0xe795, 0xe797, 0xe353, 0xe9e4, 0xe072, 0xf6a3, - 0xe391, 0x003f, 0xe7f8, 0xf645, 0x003f, 0xf972, 0xe0c6, 0xf3f3, - 0xf4a4, 0xe852, 0x003f, 0xeaf4, 0xe76e, 0xf83d, 0xf252, 0xf7d3, - 0xf1b4, 0x003f, 0xf69e, 0xe9f8, 0xea74, 0xf443, 0xe3b7, 0xefde, - 0xf363, 0xf5e6, 0xf931, 0xf2ee, 0xe1da, 0xe55d, 0xf2bd, 0xe633, - 0xf46b, 0xe8e5, 0xeafe, 0xf1ba, 0xf63b, 0x003f, 0x003f, 0xf25a, - 0xe078, 0xecca, 0xed67, 0xe35d, 0xea49, 0xf3fc, 0x003f, 0xf191, - 0xe3f1, 0xf852, 0xea4a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf291, 0x003f, 0xf5f6, 0xe37d, 0xefb8, 0xf1c3, - 0xe072, 0x003f, 0xf9c2, 0x003f, 0xf5c0, 0xe9c5, 0xedf2, 0xe9c6, - 0xe9e6, 0x003f, 0x003f, 0x003f, 0xf4f4, 0x003f, 0x003f, 0x003f, - 0xf091, 0xf3f3, 0x003f, 0xf4a4, 0xe4e3, 0xf093, 0xec34, 0x003f, - 0xeef9, 0xf577, 0xe5c7, 0xe760, 0xf1e8, 0x003f, 0xeaaf, 0xe6b5, - 0x003f, 0xf1b2, 0xf7d3, 0xf2e7, 0xf1b4, 0x003f, 0xf1c9, 0xe8f3, - 0xf254, 0x003f, 0x003f, 0x003f, 0x003f, 0xef40, 0xf15c, 0xeb9e, - 0xf451, 0x003f, 0xf4b7, 0x003f, 0x003f, 0xf2bd, 0x003f, 0x003f, - 0xe633, 0x003f, 0xf1ba, 0xf968, 0xf934, 0x003f, 0xe0ba, 0xe96d, - 0xecca, 0xf370, 0xf343, 0xf57b, 0xed67, 0xe3e7, 0xf0b1, 0xe35d, - 0xe938, 0xf3fc, 0xec53, 0xf450, 0x003f, 0x003f, 0x003f, 0xe3f1, - 0xf2fe, 0x003f, 0xf852, 0x003f, 0xea4a, 0x003f, 0xe2cf, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xfb00 .. 0xfbff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x002b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xfe00 .. 0xfeff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd93a, 0xd93a, 0xd93a, 0xd93a, 0x005f, 0x005f, 0x005f, - 0x002c, 0xd932, 0x002e, 0x003f, 0x003b, 0x003a, 0x003f, 0x0021, - 0xd93a, 0x0028, 0x0029, 0x007b, 0x007d, 0xd942, 0xd943, 0x0023, - 0x0026, 0x002a, 0x002b, 0x002d, 0x003c, 0x003e, 0x003d, 0x003f, - 0x003f, 0x0024, 0x0025, 0x0040, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xff00 .. 0xffff */ - 0x003f, 0xda31, 0xda32, 0xda33, 0xda34, 0xda35, 0xda36, 0xda37, - 0xda38, 0xda39, 0xda3a, 0xda3b, 0xda3c, 0xda3d, 0xda3e, 0xda3f, - 0xda40, 0xda41, 0xda42, 0xda43, 0xda44, 0xda45, 0xda46, 0xda47, - 0xda48, 0xda49, 0xda4a, 0xda4b, 0xda4c, 0xda4d, 0xda4e, 0xda4f, - 0xda50, 0xda51, 0xda52, 0xda53, 0xda54, 0xda55, 0xda56, 0xda57, - 0xda58, 0xda59, 0xda5a, 0xda5b, 0xda5c, 0xda5d, 0xda5e, 0xda5f, - 0xda60, 0xda61, 0xda62, 0xda63, 0xda64, 0xda65, 0xda66, 0xda67, - 0xda68, 0xda69, 0xda6a, 0xda6b, 0xd93c, 0xda6d, 0xda6e, 0xda6f, - 0xda70, 0xda71, 0xda72, 0xda73, 0xda74, 0xda75, 0xda76, 0xda77, - 0xda78, 0xda79, 0xda7a, 0xda7b, 0xda7c, 0xda7d, 0xda7e, 0xda91, - 0xda92, 0xda93, 0xda94, 0xda95, 0xda96, 0xda97, 0xda98, 0xda99, - 0xda9a, 0xda9b, 0xda9c, 0xda9d, 0xda9e, 0xda9f, 0xd9a6, 0x003f, - 0x003f, 0xd933, 0xd948, 0xd949, 0xd932, 0x003f, 0xde94, 0xde31, - 0xde33, 0xde35, 0xde37, 0xde39, 0xde73, 0xde75, 0xde77, 0xde53, - 0x003f, 0xde32, 0xde34, 0xde36, 0xde38, 0xde3a, 0xde3b, 0xde3d, - 0xde3f, 0xde41, 0xde43, 0xde45, 0xde47, 0xde49, 0xde4b, 0xde4d, - 0xde4f, 0xde51, 0xde54, 0xde56, 0xde58, 0xde5a, 0xde5b, 0xde5c, - 0xde5d, 0xde5e, 0xde5f, 0xde62, 0xde65, 0xde68, 0xde6b, 0xde6e, - 0xde6f, 0xde70, 0xde71, 0xde72, 0xde74, 0xde76, 0xde78, 0xde79, - 0xde7a, 0xde7b, 0xde7c, 0xde7d, 0xde91, 0xde95, 0x003f, 0x003f, - 0xdad4, 0x8841, 0x8c41, 0x8444, 0x9041, 0x8446, 0x8447, 0x9441, - 0x9841, 0x9c41, 0x844a, 0x844b, 0x844c, 0x844d, 0x844e, 0x844f, - 0x8450, 0xa041, 0xa441, 0xa841, 0x8454, 0xac41, 0xb041, 0xb441, - 0xb841, 0xbc41, 0xc041, 0xc441, 0xc841, 0xcc41, 0xd041, 0x003f, - 0x003f, 0x003f, 0x8461, 0x8481, 0x84a1, 0x84c1, 0x84e1, 0x8541, - 0x003f, 0x003f, 0x8561, 0x8581, 0x85a1, 0x85c1, 0x85e1, 0x8641, - 0x003f, 0x003f, 0x8661, 0x8681, 0x86a1, 0x86c1, 0x86e1, 0x8741, - 0x003f, 0x003f, 0x8761, 0x8781, 0x87a1, 0x003f, 0x003f, 0x003f, - 0xd95b, 0xd95c, 0xd9a0, 0xdaa0, 0x007c, 0xd95d, 0xda6c, 0x003f, - 0xdba2, 0xd977, 0xd978, 0xd976, 0xd979, 0xd971, 0xd96b, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* defaults */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x9900, 0x9900, 0x9900, - 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, - 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, - 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x0500, 0x0600, 0x0700, - 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x0e00, 0x9900, - 0x9900, 0x9900, 0x9900, 0x9900, 0x0f00, 0x9900, 0x1000, 0x1100, - 0x1200, 0x1300, 0x1400, 0x1500, 0x9900, 0x9900, 0x9900, 0x9900, - 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, - 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, - 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x1600, 0x1700, - 0x1800, 0x1900, 0x1a00, 0x1b00, 0x1c00, 0x1d00, 0x1e00, 0x1f00, - 0x2000, 0x2100, 0x2200, 0x2300, 0x2400, 0x2500, 0x2600, 0x2700, - 0x2800, 0x2900, 0x2a00, 0x2b00, 0x2c00, 0x2d00, 0x2e00, 0x2f00, - 0x3000, 0x3100, 0x3200, 0x3300, 0x3400, 0x3500, 0x3600, 0x3700, - 0x3800, 0x3900, 0x3a00, 0x3b00, 0x3c00, 0x3d00, 0x3e00, 0x3f00, - 0x4000, 0x4100, 0x4200, 0x4300, 0x4400, 0x4500, 0x4600, 0x4700, - 0x4800, 0x4900, 0x4a00, 0x4b00, 0x4c00, 0x4d00, 0x4e00, 0x4f00, - 0x5000, 0x5100, 0x5200, 0x5300, 0x5400, 0x5500, 0x5600, 0x5700, - 0x5800, 0x5900, 0x5a00, 0x5b00, 0x5c00, 0x5d00, 0x5e00, 0x5f00, - 0x6000, 0x6100, 0x6200, 0x6300, 0x6400, 0x6500, 0x6600, 0x6700, - 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, - 0x9900, 0x9900, 0x9900, 0x9900, 0x6800, 0x6900, 0x6a00, 0x6b00, - 0x6c00, 0x6d00, 0x6e00, 0x6f00, 0x7000, 0x7100, 0x7200, 0x7300, - 0x7400, 0x7500, 0x7600, 0x7700, 0x7800, 0x7900, 0x7a00, 0x7b00, - 0x7c00, 0x7d00, 0x7e00, 0x7f00, 0x8000, 0x8100, 0x8200, 0x8300, - 0x8400, 0x8500, 0x8600, 0x8700, 0x8800, 0x8900, 0x8a00, 0x8b00, - 0x8c00, 0x8d00, 0x8e00, 0x8f00, 0x9000, 0x9100, 0x9200, 0x9300, - 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, - 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, - 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, - 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, 0x9900, - 0x9900, 0x9400, 0x9500, 0x9600, 0x9900, 0x9900, 0x9700, 0x9800 -}; - -const struct dbcs_table cptable_1361 = -{ - { 1361, 2, 0x003f, 0x003f, "Korean Johab" }, - cp2uni, - cp2uni_leadbytes, - uni2cp_low, - uni2cp_high, - { - 0x84, 0xd3, 0xd9, 0xde, 0xe0, 0xf9, 0x00, 0x00 - } -}; diff --git a/reactos/tools/unicode/c_20127.c b/reactos/tools/unicode/c_20127.c deleted file mode 100644 index 9e06060c81a..00000000000 --- a/reactos/tools/unicode/c_20127.c +++ /dev/null @@ -1,716 +0,0 @@ -/* code page 20127 (US-ASCII (7bit)) */ -/* Automatically generated; DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f -}; - -static const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x20, 0x21, 0x63, 0x4c, 0x3f, 0x59, 0x7c, 0x3f, - 0x22, 0x63, 0x61, 0x3c, 0x3f, 0x2d, 0x72, 0x2d, - 0x3f, 0x3f, 0x32, 0x33, 0x27, 0x75, 0x3f, 0x3f, - 0x2c, 0x31, 0x6f, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, - 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, - 0x44, 0x4e, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x78, - 0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0x3f, 0x3f, - 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x63, - 0x65, 0x65, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69, - 0x64, 0x6e, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x3f, - 0x6f, 0x75, 0x75, 0x75, 0x75, 0x79, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55, - 0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0x2d, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0x2d, 0x2d, 0x3f, 0x3f, - 0x22, 0x3f, 0x3f, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0x22, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x22, 0x41, 0x3f, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x75, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0x22, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0x22, 0x22, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x63, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x2f, 0x5c, 0x2a, - 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3c, 0x3e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0x2b, 0x2b, 0x2b, 0x2b, - 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, 0x4c, 0x4c, 0x4c, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54, - 0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0x7c, 0x7c, - 0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x2d, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x63, 0x4c, 0x3f, 0x2d, 0x7c, 0x59, 0x3f, 0x3f, - 0x7c, 0x3c, 0x5e, 0x3e, 0x76, 0x3f, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_20127 = -{ - { 20127, 1, 0x003f, 0x003f, "US-ASCII (7bit)" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_20866.c b/reactos/tools/unicode/c_20866.c deleted file mode 100644 index 5f67e70dd6a..00000000000 --- a/reactos/tools/unicode/c_20866.c +++ /dev/null @@ -1,750 +0,0 @@ -/* code page 20866 (Russian KOI8) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MISC/KOI8-R.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x2500, 0x2502, 0x250c, 0x2510, 0x2514, 0x2518, 0x251c, 0x2524, - 0x252c, 0x2534, 0x253c, 0x2580, 0x2584, 0x2588, 0x258c, 0x2590, - 0x2591, 0x2592, 0x2593, 0x2320, 0x25a0, 0x2219, 0x221a, 0x2248, - 0x2264, 0x2265, 0x00a0, 0x2321, 0x00b0, 0x00b2, 0x00b7, 0x00f7, - 0x2550, 0x2551, 0x2552, 0x0451, 0x2553, 0x2554, 0x2555, 0x2556, - 0x2557, 0x2558, 0x2559, 0x255a, 0x255b, 0x255c, 0x255d, 0x255e, - 0x255f, 0x2560, 0x2561, 0x0401, 0x2562, 0x2563, 0x2564, 0x2565, - 0x2566, 0x2567, 0x2568, 0x2569, 0x256a, 0x256b, 0x256c, 0x00a9, - 0x044e, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, - 0x0445, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, - 0x043f, 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, - 0x044c, 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a, - 0x042e, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, - 0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, - 0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, - 0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a -}; - -static const unsigned char uni2cp_low[5120] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x9a, 0x21, 0x63, 0x4c, 0x3f, 0x59, 0x7c, 0x3f, - 0x22, 0xbf, 0x61, 0x3c, 0x3f, 0x2d, 0x72, 0x2d, - 0x9c, 0x3f, 0x9d, 0x33, 0x27, 0x75, 0x3f, 0x9e, - 0x2c, 0x31, 0x6f, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, - 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, - 0x44, 0x4e, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x78, - 0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0x3f, 0x3f, - 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x63, - 0x65, 0x65, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69, - 0x64, 0x6e, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x9f, - 0x6f, 0x75, 0x75, 0x75, 0x75, 0x79, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x81, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55, - 0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0x2d, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x9c, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0x2d, 0x2d, 0x3f, 0x3f, - 0x22, 0x3f, 0x9c, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0x22, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x22, 0x41, 0x9e, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x75, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0400 .. 0x04ff */ - 0xe5, 0xb3, 0x3f, 0xe7, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xeb, 0xe9, 0xf5, 0x3f, - 0xe1, 0xe2, 0xf7, 0xe7, 0xe4, 0xe5, 0xf6, 0xfa, - 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, - 0xf2, 0xf3, 0xf4, 0xf5, 0xe6, 0xe8, 0xe3, 0xfe, - 0xfb, 0xfd, 0xff, 0xf9, 0xf8, 0xfc, 0xe0, 0xf1, - 0xc1, 0xc2, 0xd7, 0xc7, 0xc4, 0xc5, 0xd6, 0xda, - 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, - 0xd2, 0xd3, 0xd4, 0xd5, 0xc6, 0xc8, 0xc3, 0xde, - 0xdb, 0xdd, 0xdf, 0xd9, 0xd8, 0xdc, 0xc0, 0xd1, - 0xc5, 0xa3, 0x3f, 0xc7, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xcb, 0xc9, 0xd5, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xf6, 0xd6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe1, 0xc1, 0xe1, 0xc1, 0x3f, 0x3f, 0xe5, 0xc5, - 0x3f, 0x3f, 0x3f, 0x3f, 0xf6, 0xd6, 0xfa, 0xda, - 0x3f, 0x3f, 0xe9, 0xc9, 0xe9, 0xc9, 0xef, 0xcf, - 0x3f, 0x3f, 0x3f, 0x3f, 0xfc, 0xdc, 0xf5, 0xd5, - 0xf5, 0xd5, 0xf5, 0xd5, 0xfe, 0xde, 0x3f, 0x3f, - 0xf9, 0xd9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xce, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0x22, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0x22, 0x22, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0x95, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x9c, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x63, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x2f, 0x5c, 0x2a, - 0x9c, 0x95, 0x96, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x97, 0x97, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x98, 0x99, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3c, 0x3e, - 0x98, 0x99, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x9e, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x93, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x80, 0x80, 0x81, 0x81, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0x82, 0x82, 0x82, 0x82, - 0x83, 0x83, 0x83, 0x83, 0x84, 0x84, 0x84, 0x84, - 0x85, 0x85, 0x85, 0x85, 0x86, 0x86, 0x86, 0x86, - 0x86, 0x86, 0x86, 0x86, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x88, 0x88, 0x88, 0x88, - 0x88, 0x88, 0x88, 0x88, 0x89, 0x89, 0x89, 0x89, - 0x89, 0x89, 0x89, 0x89, 0x8a, 0x8a, 0x8a, 0x8a, - 0x8a, 0x8a, 0x8a, 0x8a, 0x8a, 0x8a, 0x8a, 0x8a, - 0x8a, 0x8a, 0x8a, 0x8a, 0x2d, 0x2d, 0x7c, 0x7c, - 0xa0, 0xa1, 0xa2, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, - 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, - 0xb1, 0xb2, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, - 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x8b, 0x3f, 0x3f, 0x3f, 0x8c, 0x3f, 0x3f, 0x3f, - 0x8d, 0x3f, 0x3f, 0x3f, 0x8e, 0x3f, 0x3f, 0x3f, - 0x8f, 0x90, 0x91, 0x92, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x94, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x2d, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x63, 0x4c, 0x3f, 0x2d, 0x7c, 0x59, 0x3f, 0x3f, - 0x81, 0x3c, 0x5e, 0x3e, 0x76, 0x94, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0500, 0x0600, 0x0700, - 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x0e00, 0x1300, 0x1300, 0x1300, - 0x0f00, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1000, 0x1300, 0x1300, 0x1100, 0x1200 -}; - -const struct sbcs_table cptable_20866 = -{ - { 20866, 1, 0x003f, 0x003f, "Russian KOI8" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_20932.c b/reactos/tools/unicode/c_20932.c deleted file mode 100644 index 09f383b875c..00000000000 --- a/reactos/tools/unicode/c_20932.c +++ /dev/null @@ -1,6333 +0,0 @@ -/* code page 20932 (EUC-JP) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/JIS0208.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[20480] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0000, 0x0000, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 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, 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, 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, 0x003f, - /* unused lead bytes */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte 8e */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xff61, 0xff62, 0xff63, 0xff64, 0xff65, 0xff66, 0xff67, - 0xff68, 0xff69, 0xff6a, 0xff6b, 0xff6c, 0xff6d, 0xff6e, 0xff6f, - 0xff70, 0xff71, 0xff72, 0xff73, 0xff74, 0xff75, 0xff76, 0xff77, - 0xff78, 0xff79, 0xff7a, 0xff7b, 0xff7c, 0xff7d, 0xff7e, 0xff7f, - 0xff80, 0xff81, 0xff82, 0xff83, 0xff84, 0xff85, 0xff86, 0xff87, - 0xff88, 0xff89, 0xff8a, 0xff8b, 0xff8c, 0xff8d, 0xff8e, 0xff8f, - 0xff90, 0xff91, 0xff92, 0xff93, 0xff94, 0xff95, 0xff96, 0xff97, - 0xff98, 0xff99, 0xff9a, 0xff9b, 0xff9c, 0xff9d, 0xff9e, 0xff9f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte a1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3000, 0x3001, 0x3002, 0xff0c, 0xff0e, 0x30fb, 0xff1a, - 0xff1b, 0xff1f, 0xff01, 0x309b, 0x309c, 0x00b4, 0xff40, 0x00a8, - 0xff3e, 0xffe3, 0xff3f, 0x30fd, 0x30fe, 0x309d, 0x309e, 0x3003, - 0x4edd, 0x3005, 0x3006, 0x3007, 0x30fc, 0x2015, 0x2010, 0xff0f, - 0xff3c, 0x301c, 0x2016, 0xff5c, 0x2026, 0x2025, 0x2018, 0x2019, - 0x201c, 0x201d, 0xff08, 0xff09, 0x3014, 0x3015, 0xff3b, 0xff3d, - 0xff5b, 0xff5d, 0x3008, 0x3009, 0x300a, 0x300b, 0x300c, 0x300d, - 0x300e, 0x300f, 0x3010, 0x3011, 0xff0b, 0x2212, 0x00b1, 0x00d7, - 0x00f7, 0xff1d, 0x2260, 0xff1c, 0xff1e, 0x2266, 0x2267, 0x221e, - 0x2234, 0x2642, 0x2640, 0x00b0, 0x2032, 0x2033, 0x2103, 0xffe5, - 0xff04, 0x00a2, 0x00a3, 0xff05, 0xff03, 0xff06, 0xff0a, 0xff20, - 0x00a7, 0x2606, 0x2605, 0x25cb, 0x25cf, 0x25ce, 0x25c7, 0x003f, - /* lead byte a2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x25c6, 0x25a1, 0x25a0, 0x25b3, 0x25b2, 0x25bd, 0x25bc, - 0x203b, 0x3012, 0x2192, 0x2190, 0x2191, 0x2193, 0x3013, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x2208, 0x220b, 0x2286, 0x2287, 0x2282, 0x2283, - 0x222a, 0x2229, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x2227, 0x2228, 0x00ac, 0x21d2, 0x21d4, 0x2200, - 0x2203, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x2220, 0x22a5, 0x2312, 0x2202, - 0x2207, 0x2261, 0x2252, 0x226a, 0x226b, 0x221a, 0x223d, 0x221d, - 0x2235, 0x222b, 0x222c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x212b, 0x2030, 0x266f, 0x266d, 0x266a, 0x2020, - 0x2021, 0x00b6, 0x003f, 0x003f, 0x003f, 0x003f, 0x25ef, 0x003f, - /* lead byte a3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xff10, 0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17, - 0xff18, 0xff19, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xff21, 0xff22, 0xff23, 0xff24, 0xff25, 0xff26, 0xff27, - 0xff28, 0xff29, 0xff2a, 0xff2b, 0xff2c, 0xff2d, 0xff2e, 0xff2f, - 0xff30, 0xff31, 0xff32, 0xff33, 0xff34, 0xff35, 0xff36, 0xff37, - 0xff38, 0xff39, 0xff3a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47, - 0xff48, 0xff49, 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f, - 0xff50, 0xff51, 0xff52, 0xff53, 0xff54, 0xff55, 0xff56, 0xff57, - 0xff58, 0xff59, 0xff5a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte a4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3041, 0x3042, 0x3043, 0x3044, 0x3045, 0x3046, 0x3047, - 0x3048, 0x3049, 0x304a, 0x304b, 0x304c, 0x304d, 0x304e, 0x304f, - 0x3050, 0x3051, 0x3052, 0x3053, 0x3054, 0x3055, 0x3056, 0x3057, - 0x3058, 0x3059, 0x305a, 0x305b, 0x305c, 0x305d, 0x305e, 0x305f, - 0x3060, 0x3061, 0x3062, 0x3063, 0x3064, 0x3065, 0x3066, 0x3067, - 0x3068, 0x3069, 0x306a, 0x306b, 0x306c, 0x306d, 0x306e, 0x306f, - 0x3070, 0x3071, 0x3072, 0x3073, 0x3074, 0x3075, 0x3076, 0x3077, - 0x3078, 0x3079, 0x307a, 0x307b, 0x307c, 0x307d, 0x307e, 0x307f, - 0x3080, 0x3081, 0x3082, 0x3083, 0x3084, 0x3085, 0x3086, 0x3087, - 0x3088, 0x3089, 0x308a, 0x308b, 0x308c, 0x308d, 0x308e, 0x308f, - 0x3090, 0x3091, 0x3092, 0x3093, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte a5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x30a1, 0x30a2, 0x30a3, 0x30a4, 0x30a5, 0x30a6, 0x30a7, - 0x30a8, 0x30a9, 0x30aa, 0x30ab, 0x30ac, 0x30ad, 0x30ae, 0x30af, - 0x30b0, 0x30b1, 0x30b2, 0x30b3, 0x30b4, 0x30b5, 0x30b6, 0x30b7, - 0x30b8, 0x30b9, 0x30ba, 0x30bb, 0x30bc, 0x30bd, 0x30be, 0x30bf, - 0x30c0, 0x30c1, 0x30c2, 0x30c3, 0x30c4, 0x30c5, 0x30c6, 0x30c7, - 0x30c8, 0x30c9, 0x30ca, 0x30cb, 0x30cc, 0x30cd, 0x30ce, 0x30cf, - 0x30d0, 0x30d1, 0x30d2, 0x30d3, 0x30d4, 0x30d5, 0x30d6, 0x30d7, - 0x30d8, 0x30d9, 0x30da, 0x30db, 0x30dc, 0x30dd, 0x30de, 0x30df, - 0x30e0, 0x30e1, 0x30e2, 0x30e3, 0x30e4, 0x30e5, 0x30e6, 0x30e7, - 0x30e8, 0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ee, 0x30ef, - 0x30f0, 0x30f1, 0x30f2, 0x30f3, 0x30f4, 0x30f5, 0x30f6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte a6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, - 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, - 0x03a0, 0x03a1, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, - 0x03a9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, - 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, - 0x03c0, 0x03c1, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, - 0x03c9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte a7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401, - 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, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0451, - 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, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte a8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x2500, 0x2502, 0x250c, 0x2510, 0x2518, 0x2514, 0x251c, - 0x252c, 0x2524, 0x2534, 0x253c, 0x2501, 0x2503, 0x250f, 0x2513, - 0x251b, 0x2517, 0x2523, 0x2533, 0x252b, 0x253b, 0x254b, 0x2520, - 0x252f, 0x2528, 0x2537, 0x253f, 0x251d, 0x2530, 0x2525, 0x2538, - 0x2542, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte b0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x4e9c, 0x5516, 0x5a03, 0x963f, 0x54c0, 0x611b, 0x6328, - 0x59f6, 0x9022, 0x8475, 0x831c, 0x7a50, 0x60aa, 0x63e1, 0x6e25, - 0x65ed, 0x8466, 0x82a6, 0x9bf5, 0x6893, 0x5727, 0x65a1, 0x6271, - 0x5b9b, 0x59d0, 0x867b, 0x98f4, 0x7d62, 0x7dbe, 0x9b8e, 0x6216, - 0x7c9f, 0x88b7, 0x5b89, 0x5eb5, 0x6309, 0x6697, 0x6848, 0x95c7, - 0x978d, 0x674f, 0x4ee5, 0x4f0a, 0x4f4d, 0x4f9d, 0x5049, 0x56f2, - 0x5937, 0x59d4, 0x5a01, 0x5c09, 0x60df, 0x610f, 0x6170, 0x6613, - 0x6905, 0x70ba, 0x754f, 0x7570, 0x79fb, 0x7dad, 0x7def, 0x80c3, - 0x840e, 0x8863, 0x8b02, 0x9055, 0x907a, 0x533b, 0x4e95, 0x4ea5, - 0x57df, 0x80b2, 0x90c1, 0x78ef, 0x4e00, 0x58f1, 0x6ea2, 0x9038, - 0x7a32, 0x8328, 0x828b, 0x9c2f, 0x5141, 0x5370, 0x54bd, 0x54e1, - 0x56e0, 0x59fb, 0x5f15, 0x98f2, 0x6deb, 0x80e4, 0x852d, 0x003f, - /* lead byte b1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9662, 0x9670, 0x96a0, 0x97fb, 0x540b, 0x53f3, 0x5b87, - 0x70cf, 0x7fbd, 0x8fc2, 0x96e8, 0x536f, 0x9d5c, 0x7aba, 0x4e11, - 0x7893, 0x81fc, 0x6e26, 0x5618, 0x5504, 0x6b1d, 0x851a, 0x9c3b, - 0x59e5, 0x53a9, 0x6d66, 0x74dc, 0x958f, 0x5642, 0x4e91, 0x904b, - 0x96f2, 0x834f, 0x990c, 0x53e1, 0x55b6, 0x5b30, 0x5f71, 0x6620, - 0x66f3, 0x6804, 0x6c38, 0x6cf3, 0x6d29, 0x745b, 0x76c8, 0x7a4e, - 0x9834, 0x82f1, 0x885b, 0x8a60, 0x92ed, 0x6db2, 0x75ab, 0x76ca, - 0x99c5, 0x60a6, 0x8b01, 0x8d8a, 0x95b2, 0x698e, 0x53ad, 0x5186, - 0x5712, 0x5830, 0x5944, 0x5bb4, 0x5ef6, 0x6028, 0x63a9, 0x63f4, - 0x6cbf, 0x6f14, 0x708e, 0x7114, 0x7159, 0x71d5, 0x733f, 0x7e01, - 0x8276, 0x82d1, 0x8597, 0x9060, 0x925b, 0x9d1b, 0x5869, 0x65bc, - 0x6c5a, 0x7525, 0x51f9, 0x592e, 0x5965, 0x5f80, 0x5fdc, 0x003f, - /* lead byte b2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x62bc, 0x65fa, 0x6a2a, 0x6b27, 0x6bb4, 0x738b, 0x7fc1, - 0x8956, 0x9d2c, 0x9d0e, 0x9ec4, 0x5ca1, 0x6c96, 0x837b, 0x5104, - 0x5c4b, 0x61b6, 0x81c6, 0x6876, 0x7261, 0x4e59, 0x4ffa, 0x5378, - 0x6069, 0x6e29, 0x7a4f, 0x97f3, 0x4e0b, 0x5316, 0x4eee, 0x4f55, - 0x4f3d, 0x4fa1, 0x4f73, 0x52a0, 0x53ef, 0x5609, 0x590f, 0x5ac1, - 0x5bb6, 0x5be1, 0x79d1, 0x6687, 0x679c, 0x67b6, 0x6b4c, 0x6cb3, - 0x706b, 0x73c2, 0x798d, 0x79be, 0x7a3c, 0x7b87, 0x82b1, 0x82db, - 0x8304, 0x8377, 0x83ef, 0x83d3, 0x8766, 0x8ab2, 0x5629, 0x8ca8, - 0x8fe6, 0x904e, 0x971e, 0x868a, 0x4fc4, 0x5ce8, 0x6211, 0x7259, - 0x753b, 0x81e5, 0x82bd, 0x86fe, 0x8cc0, 0x96c5, 0x9913, 0x99d5, - 0x4ecb, 0x4f1a, 0x89e3, 0x56de, 0x584a, 0x58ca, 0x5efb, 0x5feb, - 0x602a, 0x6094, 0x6062, 0x61d0, 0x6212, 0x62d0, 0x6539, 0x003f, - /* lead byte b3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9b41, 0x6666, 0x68b0, 0x6d77, 0x7070, 0x754c, 0x7686, - 0x7d75, 0x82a5, 0x87f9, 0x958b, 0x968e, 0x8c9d, 0x51f1, 0x52be, - 0x5916, 0x54b3, 0x5bb3, 0x5d16, 0x6168, 0x6982, 0x6daf, 0x788d, - 0x84cb, 0x8857, 0x8a72, 0x93a7, 0x9ab8, 0x6d6c, 0x99a8, 0x86d9, - 0x57a3, 0x67ff, 0x86ce, 0x920e, 0x5283, 0x5687, 0x5404, 0x5ed3, - 0x62e1, 0x64b9, 0x683c, 0x6838, 0x6bbb, 0x7372, 0x78ba, 0x7a6b, - 0x899a, 0x89d2, 0x8d6b, 0x8f03, 0x90ed, 0x95a3, 0x9694, 0x9769, - 0x5b66, 0x5cb3, 0x697d, 0x984d, 0x984e, 0x639b, 0x7b20, 0x6a2b, - 0x6a7f, 0x68b6, 0x9c0d, 0x6f5f, 0x5272, 0x559d, 0x6070, 0x62ec, - 0x6d3b, 0x6e07, 0x6ed1, 0x845b, 0x8910, 0x8f44, 0x4e14, 0x9c39, - 0x53f6, 0x691b, 0x6a3a, 0x9784, 0x682a, 0x515c, 0x7ac3, 0x84b2, - 0x91dc, 0x938c, 0x565b, 0x9d28, 0x6822, 0x8305, 0x8431, 0x003f, - /* lead byte b4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7ca5, 0x5208, 0x82c5, 0x74e6, 0x4e7e, 0x4f83, 0x51a0, - 0x5bd2, 0x520a, 0x52d8, 0x52e7, 0x5dfb, 0x559a, 0x582a, 0x59e6, - 0x5b8c, 0x5b98, 0x5bdb, 0x5e72, 0x5e79, 0x60a3, 0x611f, 0x6163, - 0x61be, 0x63db, 0x6562, 0x67d1, 0x6853, 0x68fa, 0x6b3e, 0x6b53, - 0x6c57, 0x6f22, 0x6f97, 0x6f45, 0x74b0, 0x7518, 0x76e3, 0x770b, - 0x7aff, 0x7ba1, 0x7c21, 0x7de9, 0x7f36, 0x7ff0, 0x809d, 0x8266, - 0x839e, 0x89b3, 0x8acc, 0x8cab, 0x9084, 0x9451, 0x9593, 0x9591, - 0x95a2, 0x9665, 0x97d3, 0x9928, 0x8218, 0x4e38, 0x542b, 0x5cb8, - 0x5dcc, 0x73a9, 0x764c, 0x773c, 0x5ca9, 0x7feb, 0x8d0b, 0x96c1, - 0x9811, 0x9854, 0x9858, 0x4f01, 0x4f0e, 0x5371, 0x559c, 0x5668, - 0x57fa, 0x5947, 0x5b09, 0x5bc4, 0x5c90, 0x5e0c, 0x5e7e, 0x5fcc, - 0x63ee, 0x673a, 0x65d7, 0x65e2, 0x671f, 0x68cb, 0x68c4, 0x003f, - /* lead byte b5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6a5f, 0x5e30, 0x6bc5, 0x6c17, 0x6c7d, 0x757f, 0x7948, - 0x5b63, 0x7a00, 0x7d00, 0x5fbd, 0x898f, 0x8a18, 0x8cb4, 0x8d77, - 0x8ecc, 0x8f1d, 0x98e2, 0x9a0e, 0x9b3c, 0x4e80, 0x507d, 0x5100, - 0x5993, 0x5b9c, 0x622f, 0x6280, 0x64ec, 0x6b3a, 0x72a0, 0x7591, - 0x7947, 0x7fa9, 0x87fb, 0x8abc, 0x8b70, 0x63ac, 0x83ca, 0x97a0, - 0x5409, 0x5403, 0x55ab, 0x6854, 0x6a58, 0x8a70, 0x7827, 0x6775, - 0x9ecd, 0x5374, 0x5ba2, 0x811a, 0x8650, 0x9006, 0x4e18, 0x4e45, - 0x4ec7, 0x4f11, 0x53ca, 0x5438, 0x5bae, 0x5f13, 0x6025, 0x6551, - 0x673d, 0x6c42, 0x6c72, 0x6ce3, 0x7078, 0x7403, 0x7a76, 0x7aae, - 0x7b08, 0x7d1a, 0x7cfe, 0x7d66, 0x65e7, 0x725b, 0x53bb, 0x5c45, - 0x5de8, 0x62d2, 0x62e0, 0x6319, 0x6e20, 0x865a, 0x8a31, 0x8ddd, - 0x92f8, 0x6f01, 0x79a6, 0x9b5a, 0x4ea8, 0x4eab, 0x4eac, 0x003f, - /* lead byte b6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x4f9b, 0x4fa0, 0x50d1, 0x5147, 0x7af6, 0x5171, 0x51f6, - 0x5354, 0x5321, 0x537f, 0x53eb, 0x55ac, 0x5883, 0x5ce1, 0x5f37, - 0x5f4a, 0x602f, 0x6050, 0x606d, 0x631f, 0x6559, 0x6a4b, 0x6cc1, - 0x72c2, 0x72ed, 0x77ef, 0x80f8, 0x8105, 0x8208, 0x854e, 0x90f7, - 0x93e1, 0x97ff, 0x9957, 0x9a5a, 0x4ef0, 0x51dd, 0x5c2d, 0x6681, - 0x696d, 0x5c40, 0x66f2, 0x6975, 0x7389, 0x6850, 0x7c81, 0x50c5, - 0x52e4, 0x5747, 0x5dfe, 0x9326, 0x65a4, 0x6b23, 0x6b3d, 0x7434, - 0x7981, 0x79bd, 0x7b4b, 0x7dca, 0x82b9, 0x83cc, 0x887f, 0x895f, - 0x8b39, 0x8fd1, 0x91d1, 0x541f, 0x9280, 0x4e5d, 0x5036, 0x53e5, - 0x533a, 0x72d7, 0x7396, 0x77e9, 0x82e6, 0x8eaf, 0x99c6, 0x99c8, - 0x99d2, 0x5177, 0x611a, 0x865e, 0x55b0, 0x7a7a, 0x5076, 0x5bd3, - 0x9047, 0x9685, 0x4e32, 0x6adb, 0x91e7, 0x5c51, 0x5c48, 0x003f, - /* lead byte b7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6398, 0x7a9f, 0x6c93, 0x9774, 0x8f61, 0x7aaa, 0x718a, - 0x9688, 0x7c82, 0x6817, 0x7e70, 0x6851, 0x936c, 0x52f2, 0x541b, - 0x85ab, 0x8a13, 0x7fa4, 0x8ecd, 0x90e1, 0x5366, 0x8888, 0x7941, - 0x4fc2, 0x50be, 0x5211, 0x5144, 0x5553, 0x572d, 0x73ea, 0x578b, - 0x5951, 0x5f62, 0x5f84, 0x6075, 0x6176, 0x6167, 0x61a9, 0x63b2, - 0x643a, 0x656c, 0x666f, 0x6842, 0x6e13, 0x7566, 0x7a3d, 0x7cfb, - 0x7d4c, 0x7d99, 0x7e4b, 0x7f6b, 0x830e, 0x834a, 0x86cd, 0x8a08, - 0x8a63, 0x8b66, 0x8efd, 0x981a, 0x9d8f, 0x82b8, 0x8fce, 0x9be8, - 0x5287, 0x621f, 0x6483, 0x6fc0, 0x9699, 0x6841, 0x5091, 0x6b20, - 0x6c7a, 0x6f54, 0x7a74, 0x7d50, 0x8840, 0x8a23, 0x6708, 0x4ef6, - 0x5039, 0x5026, 0x5065, 0x517c, 0x5238, 0x5263, 0x55a7, 0x570f, - 0x5805, 0x5acc, 0x5efa, 0x61b2, 0x61f8, 0x62f3, 0x6372, 0x003f, - /* lead byte b8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x691c, 0x6a29, 0x727d, 0x72ac, 0x732e, 0x7814, 0x786f, - 0x7d79, 0x770c, 0x80a9, 0x898b, 0x8b19, 0x8ce2, 0x8ed2, 0x9063, - 0x9375, 0x967a, 0x9855, 0x9a13, 0x9e78, 0x5143, 0x539f, 0x53b3, - 0x5e7b, 0x5f26, 0x6e1b, 0x6e90, 0x7384, 0x73fe, 0x7d43, 0x8237, - 0x8a00, 0x8afa, 0x9650, 0x4e4e, 0x500b, 0x53e4, 0x547c, 0x56fa, - 0x59d1, 0x5b64, 0x5df1, 0x5eab, 0x5f27, 0x6238, 0x6545, 0x67af, - 0x6e56, 0x72d0, 0x7cca, 0x88b4, 0x80a1, 0x80e1, 0x83f0, 0x864e, - 0x8a87, 0x8de8, 0x9237, 0x96c7, 0x9867, 0x9f13, 0x4e94, 0x4e92, - 0x4f0d, 0x5348, 0x5449, 0x543e, 0x5a2f, 0x5f8c, 0x5fa1, 0x609f, - 0x68a7, 0x6a8e, 0x745a, 0x7881, 0x8a9e, 0x8aa4, 0x8b77, 0x9190, - 0x4e5e, 0x9bc9, 0x4ea4, 0x4f7c, 0x4faf, 0x5019, 0x5016, 0x5149, - 0x516c, 0x529f, 0x52b9, 0x52fe, 0x539a, 0x53e3, 0x5411, 0x003f, - /* lead byte b9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x540e, 0x5589, 0x5751, 0x57a2, 0x597d, 0x5b54, 0x5b5d, - 0x5b8f, 0x5de5, 0x5de7, 0x5df7, 0x5e78, 0x5e83, 0x5e9a, 0x5eb7, - 0x5f18, 0x6052, 0x614c, 0x6297, 0x62d8, 0x63a7, 0x653b, 0x6602, - 0x6643, 0x66f4, 0x676d, 0x6821, 0x6897, 0x69cb, 0x6c5f, 0x6d2a, - 0x6d69, 0x6e2f, 0x6e9d, 0x7532, 0x7687, 0x786c, 0x7a3f, 0x7ce0, - 0x7d05, 0x7d18, 0x7d5e, 0x7db1, 0x8015, 0x8003, 0x80af, 0x80b1, - 0x8154, 0x818f, 0x822a, 0x8352, 0x884c, 0x8861, 0x8b1b, 0x8ca2, - 0x8cfc, 0x90ca, 0x9175, 0x9271, 0x783f, 0x92fc, 0x95a4, 0x964d, - 0x9805, 0x9999, 0x9ad8, 0x9d3b, 0x525b, 0x52ab, 0x53f7, 0x5408, - 0x58d5, 0x62f7, 0x6fe0, 0x8c6a, 0x8f5f, 0x9eb9, 0x514b, 0x523b, - 0x544a, 0x56fd, 0x7a40, 0x9177, 0x9d60, 0x9ed2, 0x7344, 0x6f09, - 0x8170, 0x7511, 0x5ffd, 0x60da, 0x9aa8, 0x72db, 0x8fbc, 0x003f, - /* lead byte ba */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6b64, 0x9803, 0x4eca, 0x56f0, 0x5764, 0x58be, 0x5a5a, - 0x6068, 0x61c7, 0x660f, 0x6606, 0x6839, 0x68b1, 0x6df7, 0x75d5, - 0x7d3a, 0x826e, 0x9b42, 0x4e9b, 0x4f50, 0x53c9, 0x5506, 0x5d6f, - 0x5de6, 0x5dee, 0x67fb, 0x6c99, 0x7473, 0x7802, 0x8a50, 0x9396, - 0x88df, 0x5750, 0x5ea7, 0x632b, 0x50b5, 0x50ac, 0x518d, 0x6700, - 0x54c9, 0x585e, 0x59bb, 0x5bb0, 0x5f69, 0x624d, 0x63a1, 0x683d, - 0x6b73, 0x6e08, 0x707d, 0x91c7, 0x7280, 0x7815, 0x7826, 0x796d, - 0x658e, 0x7d30, 0x83dc, 0x88c1, 0x8f09, 0x969b, 0x5264, 0x5728, - 0x6750, 0x7f6a, 0x8ca1, 0x51b4, 0x5742, 0x962a, 0x583a, 0x698a, - 0x80b4, 0x54b2, 0x5d0e, 0x57fc, 0x7895, 0x9dfa, 0x4f5c, 0x524a, - 0x548b, 0x643e, 0x6628, 0x6714, 0x67f5, 0x7a84, 0x7b56, 0x7d22, - 0x932f, 0x685c, 0x9bad, 0x7b39, 0x5319, 0x518a, 0x5237, 0x003f, - /* lead byte bb */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5bdf, 0x62f6, 0x64ae, 0x64e6, 0x672d, 0x6bba, 0x85a9, - 0x96d1, 0x7690, 0x9bd6, 0x634c, 0x9306, 0x9bab, 0x76bf, 0x6652, - 0x4e09, 0x5098, 0x53c2, 0x5c71, 0x60e8, 0x6492, 0x6563, 0x685f, - 0x71e6, 0x73ca, 0x7523, 0x7b97, 0x7e82, 0x8695, 0x8b83, 0x8cdb, - 0x9178, 0x9910, 0x65ac, 0x66ab, 0x6b8b, 0x4ed5, 0x4ed4, 0x4f3a, - 0x4f7f, 0x523a, 0x53f8, 0x53f2, 0x55e3, 0x56db, 0x58eb, 0x59cb, - 0x59c9, 0x59ff, 0x5b50, 0x5c4d, 0x5e02, 0x5e2b, 0x5fd7, 0x601d, - 0x6307, 0x652f, 0x5b5c, 0x65af, 0x65bd, 0x65e8, 0x679d, 0x6b62, - 0x6b7b, 0x6c0f, 0x7345, 0x7949, 0x79c1, 0x7cf8, 0x7d19, 0x7d2b, - 0x80a2, 0x8102, 0x81f3, 0x8996, 0x8a5e, 0x8a69, 0x8a66, 0x8a8c, - 0x8aee, 0x8cc7, 0x8cdc, 0x96cc, 0x98fc, 0x6b6f, 0x4e8b, 0x4f3c, - 0x4f8d, 0x5150, 0x5b57, 0x5bfa, 0x6148, 0x6301, 0x6642, 0x003f, - /* lead byte bc */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6b21, 0x6ecb, 0x6cbb, 0x723e, 0x74bd, 0x75d4, 0x78c1, - 0x793a, 0x800c, 0x8033, 0x81ea, 0x8494, 0x8f9e, 0x6c50, 0x9e7f, - 0x5f0f, 0x8b58, 0x9d2b, 0x7afa, 0x8ef8, 0x5b8d, 0x96eb, 0x4e03, - 0x53f1, 0x57f7, 0x5931, 0x5ac9, 0x5ba4, 0x6089, 0x6e7f, 0x6f06, - 0x75be, 0x8cea, 0x5b9f, 0x8500, 0x7be0, 0x5072, 0x67f4, 0x829d, - 0x5c61, 0x854a, 0x7e1e, 0x820e, 0x5199, 0x5c04, 0x6368, 0x8d66, - 0x659c, 0x716e, 0x793e, 0x7d17, 0x8005, 0x8b1d, 0x8eca, 0x906e, - 0x86c7, 0x90aa, 0x501f, 0x52fa, 0x5c3a, 0x6753, 0x707c, 0x7235, - 0x914c, 0x91c8, 0x932b, 0x82e5, 0x5bc2, 0x5f31, 0x60f9, 0x4e3b, - 0x53d6, 0x5b88, 0x624b, 0x6731, 0x6b8a, 0x72e9, 0x73e0, 0x7a2e, - 0x816b, 0x8da3, 0x9152, 0x9996, 0x5112, 0x53d7, 0x546a, 0x5bff, - 0x6388, 0x6a39, 0x7dac, 0x9700, 0x56da, 0x53ce, 0x5468, 0x003f, - /* lead byte bd */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5b97, 0x5c31, 0x5dde, 0x4fee, 0x6101, 0x62fe, 0x6d32, - 0x79c0, 0x79cb, 0x7d42, 0x7e4d, 0x7fd2, 0x81ed, 0x821f, 0x8490, - 0x8846, 0x8972, 0x8b90, 0x8e74, 0x8f2f, 0x9031, 0x914b, 0x916c, - 0x96c6, 0x919c, 0x4ec0, 0x4f4f, 0x5145, 0x5341, 0x5f93, 0x620e, - 0x67d4, 0x6c41, 0x6e0b, 0x7363, 0x7e26, 0x91cd, 0x9283, 0x53d4, - 0x5919, 0x5bbf, 0x6dd1, 0x795d, 0x7e2e, 0x7c9b, 0x587e, 0x719f, - 0x51fa, 0x8853, 0x8ff0, 0x4fca, 0x5cfb, 0x6625, 0x77ac, 0x7ae3, - 0x821c, 0x99ff, 0x51c6, 0x5faa, 0x65ec, 0x696f, 0x6b89, 0x6df3, - 0x6e96, 0x6f64, 0x76fe, 0x7d14, 0x5de1, 0x9075, 0x9187, 0x9806, - 0x51e6, 0x521d, 0x6240, 0x6691, 0x66d9, 0x6e1a, 0x5eb6, 0x7dd2, - 0x7f72, 0x66f8, 0x85af, 0x85f7, 0x8af8, 0x52a9, 0x53d9, 0x5973, - 0x5e8f, 0x5f90, 0x6055, 0x92e4, 0x9664, 0x50b7, 0x511f, 0x003f, - /* lead byte be */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x52dd, 0x5320, 0x5347, 0x53ec, 0x54e8, 0x5546, 0x5531, - 0x5617, 0x5968, 0x59be, 0x5a3c, 0x5bb5, 0x5c06, 0x5c0f, 0x5c11, - 0x5c1a, 0x5e84, 0x5e8a, 0x5ee0, 0x5f70, 0x627f, 0x6284, 0x62db, - 0x638c, 0x6377, 0x6607, 0x660c, 0x662d, 0x6676, 0x677e, 0x68a2, - 0x6a1f, 0x6a35, 0x6cbc, 0x6d88, 0x6e09, 0x6e58, 0x713c, 0x7126, - 0x7167, 0x75c7, 0x7701, 0x785d, 0x7901, 0x7965, 0x79f0, 0x7ae0, - 0x7b11, 0x7ca7, 0x7d39, 0x8096, 0x83d6, 0x848b, 0x8549, 0x885d, - 0x88f3, 0x8a1f, 0x8a3c, 0x8a54, 0x8a73, 0x8c61, 0x8cde, 0x91a4, - 0x9266, 0x937e, 0x9418, 0x969c, 0x9798, 0x4e0a, 0x4e08, 0x4e1e, - 0x4e57, 0x5197, 0x5270, 0x57ce, 0x5834, 0x58cc, 0x5b22, 0x5e38, - 0x60c5, 0x64fe, 0x6761, 0x6756, 0x6d44, 0x72b6, 0x7573, 0x7a63, - 0x84b8, 0x8b72, 0x91b8, 0x9320, 0x5631, 0x57f4, 0x98fe, 0x003f, - /* lead byte bf */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x62ed, 0x690d, 0x6b96, 0x71ed, 0x7e54, 0x8077, 0x8272, - 0x89e6, 0x98df, 0x8755, 0x8fb1, 0x5c3b, 0x4f38, 0x4fe1, 0x4fb5, - 0x5507, 0x5a20, 0x5bdd, 0x5be9, 0x5fc3, 0x614e, 0x632f, 0x65b0, - 0x664b, 0x68ee, 0x699b, 0x6d78, 0x6df1, 0x7533, 0x75b9, 0x771f, - 0x795e, 0x79e6, 0x7d33, 0x81e3, 0x82af, 0x85aa, 0x89aa, 0x8a3a, - 0x8eab, 0x8f9b, 0x9032, 0x91dd, 0x9707, 0x4eba, 0x4ec1, 0x5203, - 0x5875, 0x58ec, 0x5c0b, 0x751a, 0x5c3d, 0x814e, 0x8a0a, 0x8fc5, - 0x9663, 0x976d, 0x7b25, 0x8acf, 0x9808, 0x9162, 0x56f3, 0x53a8, - 0x9017, 0x5439, 0x5782, 0x5e25, 0x63a8, 0x6c34, 0x708a, 0x7761, - 0x7c8b, 0x7fe0, 0x8870, 0x9042, 0x9154, 0x9310, 0x9318, 0x968f, - 0x745e, 0x9ac4, 0x5d07, 0x5d69, 0x6570, 0x67a2, 0x8da8, 0x96db, - 0x636e, 0x6749, 0x6919, 0x83c5, 0x9817, 0x96c0, 0x88fe, 0x003f, - /* lead byte c0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6f84, 0x647a, 0x5bf8, 0x4e16, 0x702c, 0x755d, 0x662f, - 0x51c4, 0x5236, 0x52e2, 0x59d3, 0x5f81, 0x6027, 0x6210, 0x653f, - 0x6574, 0x661f, 0x6674, 0x68f2, 0x6816, 0x6b63, 0x6e05, 0x7272, - 0x751f, 0x76db, 0x7cbe, 0x8056, 0x58f0, 0x88fd, 0x897f, 0x8aa0, - 0x8a93, 0x8acb, 0x901d, 0x9192, 0x9752, 0x9759, 0x6589, 0x7a0e, - 0x8106, 0x96bb, 0x5e2d, 0x60dc, 0x621a, 0x65a5, 0x6614, 0x6790, - 0x77f3, 0x7a4d, 0x7c4d, 0x7e3e, 0x810a, 0x8cac, 0x8d64, 0x8de1, - 0x8e5f, 0x78a9, 0x5207, 0x62d9, 0x63a5, 0x6442, 0x6298, 0x8a2d, - 0x7a83, 0x7bc0, 0x8aac, 0x96ea, 0x7d76, 0x820c, 0x8749, 0x4ed9, - 0x5148, 0x5343, 0x5360, 0x5ba3, 0x5c02, 0x5c16, 0x5ddd, 0x6226, - 0x6247, 0x64b0, 0x6813, 0x6834, 0x6cc9, 0x6d45, 0x6d17, 0x67d3, - 0x6f5c, 0x714e, 0x717d, 0x65cb, 0x7a7f, 0x7bad, 0x7dda, 0x003f, - /* lead byte c1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7e4a, 0x7fa8, 0x817a, 0x821b, 0x8239, 0x85a6, 0x8a6e, - 0x8cce, 0x8df5, 0x9078, 0x9077, 0x92ad, 0x9291, 0x9583, 0x9bae, - 0x524d, 0x5584, 0x6f38, 0x7136, 0x5168, 0x7985, 0x7e55, 0x81b3, - 0x7cce, 0x564c, 0x5851, 0x5ca8, 0x63aa, 0x66fe, 0x66fd, 0x695a, - 0x72d9, 0x758f, 0x758e, 0x790e, 0x7956, 0x79df, 0x7c97, 0x7d20, - 0x7d44, 0x8607, 0x8a34, 0x963b, 0x9061, 0x9f20, 0x50e7, 0x5275, - 0x53cc, 0x53e2, 0x5009, 0x55aa, 0x58ee, 0x594f, 0x723d, 0x5b8b, - 0x5c64, 0x531d, 0x60e3, 0x60f3, 0x635c, 0x6383, 0x633f, 0x63bb, - 0x64cd, 0x65e9, 0x66f9, 0x5de3, 0x69cd, 0x69fd, 0x6f15, 0x71e5, - 0x4e89, 0x75e9, 0x76f8, 0x7a93, 0x7cdf, 0x7dcf, 0x7d9c, 0x8061, - 0x8349, 0x8358, 0x846c, 0x84bc, 0x85fb, 0x88c5, 0x8d70, 0x9001, - 0x906d, 0x9397, 0x971c, 0x9a12, 0x50cf, 0x5897, 0x618e, 0x003f, - /* lead byte c2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x81d3, 0x8535, 0x8d08, 0x9020, 0x4fc3, 0x5074, 0x5247, - 0x5373, 0x606f, 0x6349, 0x675f, 0x6e2c, 0x8db3, 0x901f, 0x4fd7, - 0x5c5e, 0x8cca, 0x65cf, 0x7d9a, 0x5352, 0x8896, 0x5176, 0x63c3, - 0x5b58, 0x5b6b, 0x5c0a, 0x640d, 0x6751, 0x905c, 0x4ed6, 0x591a, - 0x592a, 0x6c70, 0x8a51, 0x553e, 0x5815, 0x59a5, 0x60f0, 0x6253, - 0x67c1, 0x8235, 0x6955, 0x9640, 0x99c4, 0x9a28, 0x4f53, 0x5806, - 0x5bfe, 0x8010, 0x5cb1, 0x5e2f, 0x5f85, 0x6020, 0x614b, 0x6234, - 0x66ff, 0x6cf0, 0x6ede, 0x80ce, 0x817f, 0x82d4, 0x888b, 0x8cb8, - 0x9000, 0x902e, 0x968a, 0x9edb, 0x9bdb, 0x4ee3, 0x53f0, 0x5927, - 0x7b2c, 0x918d, 0x984c, 0x9df9, 0x6edd, 0x7027, 0x5353, 0x5544, - 0x5b85, 0x6258, 0x629e, 0x62d3, 0x6ca2, 0x6fef, 0x7422, 0x8a17, - 0x9438, 0x6fc1, 0x8afe, 0x8338, 0x51e7, 0x86f8, 0x53ea, 0x003f, - /* lead byte c3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x53e9, 0x4f46, 0x9054, 0x8fb0, 0x596a, 0x8131, 0x5dfd, - 0x7aea, 0x8fbf, 0x68da, 0x8c37, 0x72f8, 0x9c48, 0x6a3d, 0x8ab0, - 0x4e39, 0x5358, 0x5606, 0x5766, 0x62c5, 0x63a2, 0x65e6, 0x6b4e, - 0x6de1, 0x6e5b, 0x70ad, 0x77ed, 0x7aef, 0x7baa, 0x7dbb, 0x803d, - 0x80c6, 0x86cb, 0x8a95, 0x935b, 0x56e3, 0x58c7, 0x5f3e, 0x65ad, - 0x6696, 0x6a80, 0x6bb5, 0x7537, 0x8ac7, 0x5024, 0x77e5, 0x5730, - 0x5f1b, 0x6065, 0x667a, 0x6c60, 0x75f4, 0x7a1a, 0x7f6e, 0x81f4, - 0x8718, 0x9045, 0x99b3, 0x7bc9, 0x755c, 0x7af9, 0x7b51, 0x84c4, - 0x9010, 0x79e9, 0x7a92, 0x8336, 0x5ae1, 0x7740, 0x4e2d, 0x4ef2, - 0x5b99, 0x5fe0, 0x62bd, 0x663c, 0x67f1, 0x6ce8, 0x866b, 0x8877, - 0x8a3b, 0x914e, 0x92f3, 0x99d0, 0x6a17, 0x7026, 0x732a, 0x82e7, - 0x8457, 0x8caf, 0x4e01, 0x5146, 0x51cb, 0x558b, 0x5bf5, 0x003f, - /* lead byte c4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5e16, 0x5e33, 0x5e81, 0x5f14, 0x5f35, 0x5f6b, 0x5fb4, - 0x61f2, 0x6311, 0x66a2, 0x671d, 0x6f6e, 0x7252, 0x753a, 0x773a, - 0x8074, 0x8139, 0x8178, 0x8776, 0x8abf, 0x8adc, 0x8d85, 0x8df3, - 0x929a, 0x9577, 0x9802, 0x9ce5, 0x52c5, 0x6357, 0x76f4, 0x6715, - 0x6c88, 0x73cd, 0x8cc3, 0x93ae, 0x9673, 0x6d25, 0x589c, 0x690e, - 0x69cc, 0x8ffd, 0x939a, 0x75db, 0x901a, 0x585a, 0x6802, 0x63b4, - 0x69fb, 0x4f43, 0x6f2c, 0x67d8, 0x8fbb, 0x8526, 0x7db4, 0x9354, - 0x693f, 0x6f70, 0x576a, 0x58f7, 0x5b2c, 0x7d2c, 0x722a, 0x540a, - 0x91e3, 0x9db4, 0x4ead, 0x4f4e, 0x505c, 0x5075, 0x5243, 0x8c9e, - 0x5448, 0x5824, 0x5b9a, 0x5e1d, 0x5e95, 0x5ead, 0x5ef7, 0x5f1f, - 0x608c, 0x62b5, 0x633a, 0x63d0, 0x68af, 0x6c40, 0x7887, 0x798e, - 0x7a0b, 0x7de0, 0x8247, 0x8a02, 0x8ae6, 0x8e44, 0x9013, 0x003f, - /* lead byte c5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x90b8, 0x912d, 0x91d8, 0x9f0e, 0x6ce5, 0x6458, 0x64e2, - 0x6575, 0x6ef4, 0x7684, 0x7b1b, 0x9069, 0x93d1, 0x6eba, 0x54f2, - 0x5fb9, 0x64a4, 0x8f4d, 0x8fed, 0x9244, 0x5178, 0x586b, 0x5929, - 0x5c55, 0x5e97, 0x6dfb, 0x7e8f, 0x751c, 0x8cbc, 0x8ee2, 0x985b, - 0x70b9, 0x4f1d, 0x6bbf, 0x6fb1, 0x7530, 0x96fb, 0x514e, 0x5410, - 0x5835, 0x5857, 0x59ac, 0x5c60, 0x5f92, 0x6597, 0x675c, 0x6e21, - 0x767b, 0x83df, 0x8ced, 0x9014, 0x90fd, 0x934d, 0x7825, 0x783a, - 0x52aa, 0x5ea6, 0x571f, 0x5974, 0x6012, 0x5012, 0x515a, 0x51ac, - 0x51cd, 0x5200, 0x5510, 0x5854, 0x5858, 0x5957, 0x5b95, 0x5cf6, - 0x5d8b, 0x60bc, 0x6295, 0x642d, 0x6771, 0x6843, 0x68bc, 0x68df, - 0x76d7, 0x6dd8, 0x6e6f, 0x6d9b, 0x706f, 0x71c8, 0x5f53, 0x75d8, - 0x7977, 0x7b49, 0x7b54, 0x7b52, 0x7cd6, 0x7d71, 0x5230, 0x003f, - /* lead byte c6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8463, 0x8569, 0x85e4, 0x8a0e, 0x8b04, 0x8c46, 0x8e0f, - 0x9003, 0x900f, 0x9419, 0x9676, 0x982d, 0x9a30, 0x95d8, 0x50cd, - 0x52d5, 0x540c, 0x5802, 0x5c0e, 0x61a7, 0x649e, 0x6d1e, 0x77b3, - 0x7ae5, 0x80f4, 0x8404, 0x9053, 0x9285, 0x5ce0, 0x9d07, 0x533f, - 0x5f97, 0x5fb3, 0x6d9c, 0x7279, 0x7763, 0x79bf, 0x7be4, 0x6bd2, - 0x72ec, 0x8aad, 0x6803, 0x6a61, 0x51f8, 0x7a81, 0x6934, 0x5c4a, - 0x9cf6, 0x82eb, 0x5bc5, 0x9149, 0x701e, 0x5678, 0x5c6f, 0x60c7, - 0x6566, 0x6c8c, 0x8c5a, 0x9041, 0x9813, 0x5451, 0x66c7, 0x920d, - 0x5948, 0x90a3, 0x5185, 0x4e4d, 0x51ea, 0x8599, 0x8b0e, 0x7058, - 0x637a, 0x934b, 0x6962, 0x99b4, 0x7e04, 0x7577, 0x5357, 0x6960, - 0x8edf, 0x96e3, 0x6c5d, 0x4e8c, 0x5c3c, 0x5f10, 0x8fe9, 0x5302, - 0x8cd1, 0x8089, 0x8679, 0x5eff, 0x65e5, 0x4e73, 0x5165, 0x003f, - /* lead byte c7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5982, 0x5c3f, 0x97ee, 0x4efb, 0x598a, 0x5fcd, 0x8a8d, - 0x6fe1, 0x79b0, 0x7962, 0x5be7, 0x8471, 0x732b, 0x71b1, 0x5e74, - 0x5ff5, 0x637b, 0x649a, 0x71c3, 0x7c98, 0x4e43, 0x5efc, 0x4e4b, - 0x57dc, 0x56a2, 0x60a9, 0x6fc3, 0x7d0d, 0x80fd, 0x8133, 0x81bf, - 0x8fb2, 0x8997, 0x86a4, 0x5df4, 0x628a, 0x64ad, 0x8987, 0x6777, - 0x6ce2, 0x6d3e, 0x7436, 0x7834, 0x5a46, 0x7f75, 0x82ad, 0x99ac, - 0x4ff3, 0x5ec3, 0x62dd, 0x6392, 0x6557, 0x676f, 0x76c3, 0x724c, - 0x80cc, 0x80ba, 0x8f29, 0x914d, 0x500d, 0x57f9, 0x5a92, 0x6885, - 0x6973, 0x7164, 0x72fd, 0x8cb7, 0x58f2, 0x8ce0, 0x966a, 0x9019, - 0x877f, 0x79e4, 0x77e7, 0x8429, 0x4f2f, 0x5265, 0x535a, 0x62cd, - 0x67cf, 0x6cca, 0x767d, 0x7b94, 0x7c95, 0x8236, 0x8584, 0x8feb, - 0x66dd, 0x6f20, 0x7206, 0x7e1b, 0x83ab, 0x99c1, 0x9ea6, 0x003f, - /* lead byte c8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x51fd, 0x7bb1, 0x7872, 0x7bb8, 0x8087, 0x7b48, 0x6ae8, - 0x5e61, 0x808c, 0x7551, 0x7560, 0x516b, 0x9262, 0x6e8c, 0x767a, - 0x9197, 0x9aea, 0x4f10, 0x7f70, 0x629c, 0x7b4f, 0x95a5, 0x9ce9, - 0x567a, 0x5859, 0x86e4, 0x96bc, 0x4f34, 0x5224, 0x534a, 0x53cd, - 0x53db, 0x5e06, 0x642c, 0x6591, 0x677f, 0x6c3e, 0x6c4e, 0x7248, - 0x72af, 0x73ed, 0x7554, 0x7e41, 0x822c, 0x85e9, 0x8ca9, 0x7bc4, - 0x91c6, 0x7169, 0x9812, 0x98ef, 0x633d, 0x6669, 0x756a, 0x76e4, - 0x78d0, 0x8543, 0x86ee, 0x532a, 0x5351, 0x5426, 0x5983, 0x5e87, - 0x5f7c, 0x60b2, 0x6249, 0x6279, 0x62ab, 0x6590, 0x6bd4, 0x6ccc, - 0x75b2, 0x76ae, 0x7891, 0x79d8, 0x7dcb, 0x7f77, 0x80a5, 0x88ab, - 0x8ab9, 0x8cbb, 0x907f, 0x975e, 0x98db, 0x6a0b, 0x7c38, 0x5099, - 0x5c3e, 0x5fae, 0x6787, 0x6bd8, 0x7435, 0x7709, 0x7f8e, 0x003f, - /* lead byte c9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9f3b, 0x67ca, 0x7a17, 0x5339, 0x758b, 0x9aed, 0x5f66, - 0x819d, 0x83f1, 0x8098, 0x5f3c, 0x5fc5, 0x7562, 0x7b46, 0x903c, - 0x6867, 0x59eb, 0x5a9b, 0x7d10, 0x767e, 0x8b2c, 0x4ff5, 0x5f6a, - 0x6a19, 0x6c37, 0x6f02, 0x74e2, 0x7968, 0x8868, 0x8a55, 0x8c79, - 0x5edf, 0x63cf, 0x75c5, 0x79d2, 0x82d7, 0x9328, 0x92f2, 0x849c, - 0x86ed, 0x9c2d, 0x54c1, 0x5f6c, 0x658c, 0x6d5c, 0x7015, 0x8ca7, - 0x8cd3, 0x983b, 0x654f, 0x74f6, 0x4e0d, 0x4ed8, 0x57e0, 0x592b, - 0x5a66, 0x5bcc, 0x51a8, 0x5e03, 0x5e9c, 0x6016, 0x6276, 0x6577, - 0x65a7, 0x666e, 0x6d6e, 0x7236, 0x7b26, 0x8150, 0x819a, 0x8299, - 0x8b5c, 0x8ca0, 0x8ce6, 0x8d74, 0x961c, 0x9644, 0x4fae, 0x64ab, - 0x6b66, 0x821e, 0x8461, 0x856a, 0x90e8, 0x5c01, 0x6953, 0x98a8, - 0x847a, 0x8557, 0x4f0f, 0x526f, 0x5fa9, 0x5e45, 0x670d, 0x003f, - /* lead byte ca */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x798f, 0x8179, 0x8907, 0x8986, 0x6df5, 0x5f17, 0x6255, - 0x6cb8, 0x4ecf, 0x7269, 0x9b92, 0x5206, 0x543b, 0x5674, 0x58b3, - 0x61a4, 0x626e, 0x711a, 0x596e, 0x7c89, 0x7cde, 0x7d1b, 0x96f0, - 0x6587, 0x805e, 0x4e19, 0x4f75, 0x5175, 0x5840, 0x5e63, 0x5e73, - 0x5f0a, 0x67c4, 0x4e26, 0x853d, 0x9589, 0x965b, 0x7c73, 0x9801, - 0x50fb, 0x58c1, 0x7656, 0x78a7, 0x5225, 0x77a5, 0x8511, 0x7b86, - 0x504f, 0x5909, 0x7247, 0x7bc7, 0x7de8, 0x8fba, 0x8fd4, 0x904d, - 0x4fbf, 0x52c9, 0x5a29, 0x5f01, 0x97ad, 0x4fdd, 0x8217, 0x92ea, - 0x5703, 0x6355, 0x6b69, 0x752b, 0x88dc, 0x8f14, 0x7a42, 0x52df, - 0x5893, 0x6155, 0x620a, 0x66ae, 0x6bcd, 0x7c3f, 0x83e9, 0x5023, - 0x4ff8, 0x5305, 0x5446, 0x5831, 0x5949, 0x5b9d, 0x5cf0, 0x5cef, - 0x5d29, 0x5e96, 0x62b1, 0x6367, 0x653e, 0x65b9, 0x670b, 0x003f, - /* lead byte cb */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6cd5, 0x6ce1, 0x70f9, 0x7832, 0x7e2b, 0x80de, 0x82b3, - 0x840c, 0x84ec, 0x8702, 0x8912, 0x8a2a, 0x8c4a, 0x90a6, 0x92d2, - 0x98fd, 0x9cf3, 0x9d6c, 0x4e4f, 0x4ea1, 0x508d, 0x5256, 0x574a, - 0x59a8, 0x5e3d, 0x5fd8, 0x5fd9, 0x623f, 0x66b4, 0x671b, 0x67d0, - 0x68d2, 0x5192, 0x7d21, 0x80aa, 0x81a8, 0x8b00, 0x8c8c, 0x8cbf, - 0x927e, 0x9632, 0x5420, 0x982c, 0x5317, 0x50d5, 0x535c, 0x58a8, - 0x64b2, 0x6734, 0x7267, 0x7766, 0x7a46, 0x91e6, 0x52c3, 0x6ca1, - 0x6b86, 0x5800, 0x5e4c, 0x5954, 0x672c, 0x7ffb, 0x51e1, 0x76c6, - 0x6469, 0x78e8, 0x9b54, 0x9ebb, 0x57cb, 0x59b9, 0x6627, 0x679a, - 0x6bce, 0x54e9, 0x69d9, 0x5e55, 0x819c, 0x6795, 0x9baa, 0x67fe, - 0x9c52, 0x685d, 0x4ea6, 0x4fe3, 0x53c8, 0x62b9, 0x672b, 0x6cab, - 0x8fc4, 0x4fad, 0x7e6d, 0x9ebf, 0x4e07, 0x6162, 0x6e80, 0x003f, - /* lead byte cc */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6f2b, 0x8513, 0x5473, 0x672a, 0x9b45, 0x5df3, 0x7b95, - 0x5cac, 0x5bc6, 0x871c, 0x6e4a, 0x84d1, 0x7a14, 0x8108, 0x5999, - 0x7c8d, 0x6c11, 0x7720, 0x52d9, 0x5922, 0x7121, 0x725f, 0x77db, - 0x9727, 0x9d61, 0x690b, 0x5a7f, 0x5a18, 0x51a5, 0x540d, 0x547d, - 0x660e, 0x76df, 0x8ff7, 0x9298, 0x9cf4, 0x59ea, 0x725d, 0x6ec5, - 0x514d, 0x68c9, 0x7dbf, 0x7dec, 0x9762, 0x9eba, 0x6478, 0x6a21, - 0x8302, 0x5984, 0x5b5f, 0x6bdb, 0x731b, 0x76f2, 0x7db2, 0x8017, - 0x8499, 0x5132, 0x6728, 0x9ed9, 0x76ee, 0x6762, 0x52ff, 0x9905, - 0x5c24, 0x623b, 0x7c7e, 0x8cb0, 0x554f, 0x60b6, 0x7d0b, 0x9580, - 0x5301, 0x4e5f, 0x51b6, 0x591c, 0x723a, 0x8036, 0x91ce, 0x5f25, - 0x77e2, 0x5384, 0x5f79, 0x7d04, 0x85ac, 0x8a33, 0x8e8d, 0x9756, - 0x67f3, 0x85ae, 0x9453, 0x6109, 0x6108, 0x6cb9, 0x7652, 0x003f, - /* lead byte cd */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8aed, 0x8f38, 0x552f, 0x4f51, 0x512a, 0x52c7, 0x53cb, - 0x5ba5, 0x5e7d, 0x60a0, 0x6182, 0x63d6, 0x6709, 0x67da, 0x6e67, - 0x6d8c, 0x7336, 0x7337, 0x7531, 0x7950, 0x88d5, 0x8a98, 0x904a, - 0x9091, 0x90f5, 0x96c4, 0x878d, 0x5915, 0x4e88, 0x4f59, 0x4e0e, - 0x8a89, 0x8f3f, 0x9810, 0x50ad, 0x5e7c, 0x5996, 0x5bb9, 0x5eb8, - 0x63da, 0x63fa, 0x64c1, 0x66dc, 0x694a, 0x69d8, 0x6d0b, 0x6eb6, - 0x7194, 0x7528, 0x7aaf, 0x7f8a, 0x8000, 0x8449, 0x84c9, 0x8981, - 0x8b21, 0x8e0a, 0x9065, 0x967d, 0x990a, 0x617e, 0x6291, 0x6b32, - 0x6c83, 0x6d74, 0x7fcc, 0x7ffc, 0x6dc0, 0x7f85, 0x87ba, 0x88f8, - 0x6765, 0x83b1, 0x983c, 0x96f7, 0x6d1b, 0x7d61, 0x843d, 0x916a, - 0x4e71, 0x5375, 0x5d50, 0x6b04, 0x6feb, 0x85cd, 0x862d, 0x89a7, - 0x5229, 0x540f, 0x5c65, 0x674e, 0x68a8, 0x7406, 0x7483, 0x003f, - /* lead byte ce */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x75e2, 0x88cf, 0x88e1, 0x91cc, 0x96e2, 0x9678, 0x5f8b, - 0x7387, 0x7acb, 0x844e, 0x63a0, 0x7565, 0x5289, 0x6d41, 0x6e9c, - 0x7409, 0x7559, 0x786b, 0x7c92, 0x9686, 0x7adc, 0x9f8d, 0x4fb6, - 0x616e, 0x65c5, 0x865c, 0x4e86, 0x4eae, 0x50da, 0x4e21, 0x51cc, - 0x5bee, 0x6599, 0x6881, 0x6dbc, 0x731f, 0x7642, 0x77ad, 0x7a1c, - 0x7ce7, 0x826f, 0x8ad2, 0x907c, 0x91cf, 0x9675, 0x9818, 0x529b, - 0x7dd1, 0x502b, 0x5398, 0x6797, 0x6dcb, 0x71d0, 0x7433, 0x81e8, - 0x8f2a, 0x96a3, 0x9c57, 0x9e9f, 0x7460, 0x5841, 0x6d99, 0x7d2f, - 0x985e, 0x4ee4, 0x4f36, 0x4f8b, 0x51b7, 0x52b1, 0x5dba, 0x601c, - 0x73b2, 0x793c, 0x82d3, 0x9234, 0x96b7, 0x96f6, 0x970a, 0x9e97, - 0x9f62, 0x66a6, 0x6b74, 0x5217, 0x52a3, 0x70c8, 0x88c2, 0x5ec9, - 0x604b, 0x6190, 0x6f23, 0x7149, 0x7c3e, 0x7df4, 0x806f, 0x003f, - /* lead byte cf */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x84ee, 0x9023, 0x932c, 0x5442, 0x9b6f, 0x6ad3, 0x7089, - 0x8cc2, 0x8def, 0x9732, 0x52b4, 0x5a41, 0x5eca, 0x5f04, 0x6717, - 0x697c, 0x6994, 0x6d6a, 0x6f0f, 0x7262, 0x72fc, 0x7bed, 0x8001, - 0x807e, 0x874b, 0x90ce, 0x516d, 0x9e93, 0x7984, 0x808b, 0x9332, - 0x8ad6, 0x502d, 0x548c, 0x8a71, 0x6b6a, 0x8cc4, 0x8107, 0x60d1, - 0x67a0, 0x9df2, 0x4e99, 0x4e98, 0x9c10, 0x8a6b, 0x85c1, 0x8568, - 0x6900, 0x6e7e, 0x7897, 0x8155, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte d0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5f0c, 0x4e10, 0x4e15, 0x4e2a, 0x4e31, 0x4e36, 0x4e3c, - 0x4e3f, 0x4e42, 0x4e56, 0x4e58, 0x4e82, 0x4e85, 0x8c6b, 0x4e8a, - 0x8212, 0x5f0d, 0x4e8e, 0x4e9e, 0x4e9f, 0x4ea0, 0x4ea2, 0x4eb0, - 0x4eb3, 0x4eb6, 0x4ece, 0x4ecd, 0x4ec4, 0x4ec6, 0x4ec2, 0x4ed7, - 0x4ede, 0x4eed, 0x4edf, 0x4ef7, 0x4f09, 0x4f5a, 0x4f30, 0x4f5b, - 0x4f5d, 0x4f57, 0x4f47, 0x4f76, 0x4f88, 0x4f8f, 0x4f98, 0x4f7b, - 0x4f69, 0x4f70, 0x4f91, 0x4f6f, 0x4f86, 0x4f96, 0x5118, 0x4fd4, - 0x4fdf, 0x4fce, 0x4fd8, 0x4fdb, 0x4fd1, 0x4fda, 0x4fd0, 0x4fe4, - 0x4fe5, 0x501a, 0x5028, 0x5014, 0x502a, 0x5025, 0x5005, 0x4f1c, - 0x4ff6, 0x5021, 0x5029, 0x502c, 0x4ffe, 0x4fef, 0x5011, 0x5006, - 0x5043, 0x5047, 0x6703, 0x5055, 0x5050, 0x5048, 0x505a, 0x5056, - 0x506c, 0x5078, 0x5080, 0x509a, 0x5085, 0x50b4, 0x50b2, 0x003f, - /* lead byte d1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x50c9, 0x50ca, 0x50b3, 0x50c2, 0x50d6, 0x50de, 0x50e5, - 0x50ed, 0x50e3, 0x50ee, 0x50f9, 0x50f5, 0x5109, 0x5101, 0x5102, - 0x5116, 0x5115, 0x5114, 0x511a, 0x5121, 0x513a, 0x5137, 0x513c, - 0x513b, 0x513f, 0x5140, 0x5152, 0x514c, 0x5154, 0x5162, 0x7af8, - 0x5169, 0x516a, 0x516e, 0x5180, 0x5182, 0x56d8, 0x518c, 0x5189, - 0x518f, 0x5191, 0x5193, 0x5195, 0x5196, 0x51a4, 0x51a6, 0x51a2, - 0x51a9, 0x51aa, 0x51ab, 0x51b3, 0x51b1, 0x51b2, 0x51b0, 0x51b5, - 0x51bd, 0x51c5, 0x51c9, 0x51db, 0x51e0, 0x8655, 0x51e9, 0x51ed, - 0x51f0, 0x51f5, 0x51fe, 0x5204, 0x520b, 0x5214, 0x520e, 0x5227, - 0x522a, 0x522e, 0x5233, 0x5239, 0x524f, 0x5244, 0x524b, 0x524c, - 0x525e, 0x5254, 0x526a, 0x5274, 0x5269, 0x5273, 0x527f, 0x527d, - 0x528d, 0x5294, 0x5292, 0x5271, 0x5288, 0x5291, 0x8fa8, 0x003f, - /* lead byte d2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8fa7, 0x52ac, 0x52ad, 0x52bc, 0x52b5, 0x52c1, 0x52cd, - 0x52d7, 0x52de, 0x52e3, 0x52e6, 0x98ed, 0x52e0, 0x52f3, 0x52f5, - 0x52f8, 0x52f9, 0x5306, 0x5308, 0x7538, 0x530d, 0x5310, 0x530f, - 0x5315, 0x531a, 0x5323, 0x532f, 0x5331, 0x5333, 0x5338, 0x5340, - 0x5346, 0x5345, 0x4e17, 0x5349, 0x534d, 0x51d6, 0x535e, 0x5369, - 0x536e, 0x5918, 0x537b, 0x5377, 0x5382, 0x5396, 0x53a0, 0x53a6, - 0x53a5, 0x53ae, 0x53b0, 0x53b6, 0x53c3, 0x7c12, 0x96d9, 0x53df, - 0x66fc, 0x71ee, 0x53ee, 0x53e8, 0x53ed, 0x53fa, 0x5401, 0x543d, - 0x5440, 0x542c, 0x542d, 0x543c, 0x542e, 0x5436, 0x5429, 0x541d, - 0x544e, 0x548f, 0x5475, 0x548e, 0x545f, 0x5471, 0x5477, 0x5470, - 0x5492, 0x547b, 0x5480, 0x5476, 0x5484, 0x5490, 0x5486, 0x54c7, - 0x54a2, 0x54b8, 0x54a5, 0x54ac, 0x54c4, 0x54c8, 0x54a8, 0x003f, - /* lead byte d3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x54ab, 0x54c2, 0x54a4, 0x54be, 0x54bc, 0x54d8, 0x54e5, - 0x54e6, 0x550f, 0x5514, 0x54fd, 0x54ee, 0x54ed, 0x54fa, 0x54e2, - 0x5539, 0x5540, 0x5563, 0x554c, 0x552e, 0x555c, 0x5545, 0x5556, - 0x5557, 0x5538, 0x5533, 0x555d, 0x5599, 0x5580, 0x54af, 0x558a, - 0x559f, 0x557b, 0x557e, 0x5598, 0x559e, 0x55ae, 0x557c, 0x5583, - 0x55a9, 0x5587, 0x55a8, 0x55da, 0x55c5, 0x55df, 0x55c4, 0x55dc, - 0x55e4, 0x55d4, 0x5614, 0x55f7, 0x5616, 0x55fe, 0x55fd, 0x561b, - 0x55f9, 0x564e, 0x5650, 0x71df, 0x5634, 0x5636, 0x5632, 0x5638, - 0x566b, 0x5664, 0x562f, 0x566c, 0x566a, 0x5686, 0x5680, 0x568a, - 0x56a0, 0x5694, 0x568f, 0x56a5, 0x56ae, 0x56b6, 0x56b4, 0x56c2, - 0x56bc, 0x56c1, 0x56c3, 0x56c0, 0x56c8, 0x56ce, 0x56d1, 0x56d3, - 0x56d7, 0x56ee, 0x56f9, 0x5700, 0x56ff, 0x5704, 0x5709, 0x003f, - /* lead byte d4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5708, 0x570b, 0x570d, 0x5713, 0x5718, 0x5716, 0x55c7, - 0x571c, 0x5726, 0x5737, 0x5738, 0x574e, 0x573b, 0x5740, 0x574f, - 0x5769, 0x57c0, 0x5788, 0x5761, 0x577f, 0x5789, 0x5793, 0x57a0, - 0x57b3, 0x57a4, 0x57aa, 0x57b0, 0x57c3, 0x57c6, 0x57d4, 0x57d2, - 0x57d3, 0x580a, 0x57d6, 0x57e3, 0x580b, 0x5819, 0x581d, 0x5872, - 0x5821, 0x5862, 0x584b, 0x5870, 0x6bc0, 0x5852, 0x583d, 0x5879, - 0x5885, 0x58b9, 0x589f, 0x58ab, 0x58ba, 0x58de, 0x58bb, 0x58b8, - 0x58ae, 0x58c5, 0x58d3, 0x58d1, 0x58d7, 0x58d9, 0x58d8, 0x58e5, - 0x58dc, 0x58e4, 0x58df, 0x58ef, 0x58fa, 0x58f9, 0x58fb, 0x58fc, - 0x58fd, 0x5902, 0x590a, 0x5910, 0x591b, 0x68a6, 0x5925, 0x592c, - 0x592d, 0x5932, 0x5938, 0x593e, 0x7ad2, 0x5955, 0x5950, 0x594e, - 0x595a, 0x5958, 0x5962, 0x5960, 0x5967, 0x596c, 0x5969, 0x003f, - /* lead byte d5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5978, 0x5981, 0x599d, 0x4f5e, 0x4fab, 0x59a3, 0x59b2, - 0x59c6, 0x59e8, 0x59dc, 0x598d, 0x59d9, 0x59da, 0x5a25, 0x5a1f, - 0x5a11, 0x5a1c, 0x5a09, 0x5a1a, 0x5a40, 0x5a6c, 0x5a49, 0x5a35, - 0x5a36, 0x5a62, 0x5a6a, 0x5a9a, 0x5abc, 0x5abe, 0x5acb, 0x5ac2, - 0x5abd, 0x5ae3, 0x5ad7, 0x5ae6, 0x5ae9, 0x5ad6, 0x5afa, 0x5afb, - 0x5b0c, 0x5b0b, 0x5b16, 0x5b32, 0x5ad0, 0x5b2a, 0x5b36, 0x5b3e, - 0x5b43, 0x5b45, 0x5b40, 0x5b51, 0x5b55, 0x5b5a, 0x5b5b, 0x5b65, - 0x5b69, 0x5b70, 0x5b73, 0x5b75, 0x5b78, 0x6588, 0x5b7a, 0x5b80, - 0x5b83, 0x5ba6, 0x5bb8, 0x5bc3, 0x5bc7, 0x5bc9, 0x5bd4, 0x5bd0, - 0x5be4, 0x5be6, 0x5be2, 0x5bde, 0x5be5, 0x5beb, 0x5bf0, 0x5bf6, - 0x5bf3, 0x5c05, 0x5c07, 0x5c08, 0x5c0d, 0x5c13, 0x5c20, 0x5c22, - 0x5c28, 0x5c38, 0x5c39, 0x5c41, 0x5c46, 0x5c4e, 0x5c53, 0x003f, - /* lead byte d6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5c50, 0x5c4f, 0x5b71, 0x5c6c, 0x5c6e, 0x4e62, 0x5c76, - 0x5c79, 0x5c8c, 0x5c91, 0x5c94, 0x599b, 0x5cab, 0x5cbb, 0x5cb6, - 0x5cbc, 0x5cb7, 0x5cc5, 0x5cbe, 0x5cc7, 0x5cd9, 0x5ce9, 0x5cfd, - 0x5cfa, 0x5ced, 0x5d8c, 0x5cea, 0x5d0b, 0x5d15, 0x5d17, 0x5d5c, - 0x5d1f, 0x5d1b, 0x5d11, 0x5d14, 0x5d22, 0x5d1a, 0x5d19, 0x5d18, - 0x5d4c, 0x5d52, 0x5d4e, 0x5d4b, 0x5d6c, 0x5d73, 0x5d76, 0x5d87, - 0x5d84, 0x5d82, 0x5da2, 0x5d9d, 0x5dac, 0x5dae, 0x5dbd, 0x5d90, - 0x5db7, 0x5dbc, 0x5dc9, 0x5dcd, 0x5dd3, 0x5dd2, 0x5dd6, 0x5ddb, - 0x5deb, 0x5df2, 0x5df5, 0x5e0b, 0x5e1a, 0x5e19, 0x5e11, 0x5e1b, - 0x5e36, 0x5e37, 0x5e44, 0x5e43, 0x5e40, 0x5e4e, 0x5e57, 0x5e54, - 0x5e5f, 0x5e62, 0x5e64, 0x5e47, 0x5e75, 0x5e76, 0x5e7a, 0x9ebc, - 0x5e7f, 0x5ea0, 0x5ec1, 0x5ec2, 0x5ec8, 0x5ed0, 0x5ecf, 0x003f, - /* lead byte d7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5ed6, 0x5ee3, 0x5edd, 0x5eda, 0x5edb, 0x5ee2, 0x5ee1, - 0x5ee8, 0x5ee9, 0x5eec, 0x5ef1, 0x5ef3, 0x5ef0, 0x5ef4, 0x5ef8, - 0x5efe, 0x5f03, 0x5f09, 0x5f5d, 0x5f5c, 0x5f0b, 0x5f11, 0x5f16, - 0x5f29, 0x5f2d, 0x5f38, 0x5f41, 0x5f48, 0x5f4c, 0x5f4e, 0x5f2f, - 0x5f51, 0x5f56, 0x5f57, 0x5f59, 0x5f61, 0x5f6d, 0x5f73, 0x5f77, - 0x5f83, 0x5f82, 0x5f7f, 0x5f8a, 0x5f88, 0x5f91, 0x5f87, 0x5f9e, - 0x5f99, 0x5f98, 0x5fa0, 0x5fa8, 0x5fad, 0x5fbc, 0x5fd6, 0x5ffb, - 0x5fe4, 0x5ff8, 0x5ff1, 0x5fdd, 0x60b3, 0x5fff, 0x6021, 0x6060, - 0x6019, 0x6010, 0x6029, 0x600e, 0x6031, 0x601b, 0x6015, 0x602b, - 0x6026, 0x600f, 0x603a, 0x605a, 0x6041, 0x606a, 0x6077, 0x605f, - 0x604a, 0x6046, 0x604d, 0x6063, 0x6043, 0x6064, 0x6042, 0x606c, - 0x606b, 0x6059, 0x6081, 0x608d, 0x60e7, 0x6083, 0x609a, 0x003f, - /* lead byte d8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6084, 0x609b, 0x6096, 0x6097, 0x6092, 0x60a7, 0x608b, - 0x60e1, 0x60b8, 0x60e0, 0x60d3, 0x60b4, 0x5ff0, 0x60bd, 0x60c6, - 0x60b5, 0x60d8, 0x614d, 0x6115, 0x6106, 0x60f6, 0x60f7, 0x6100, - 0x60f4, 0x60fa, 0x6103, 0x6121, 0x60fb, 0x60f1, 0x610d, 0x610e, - 0x6147, 0x613e, 0x6128, 0x6127, 0x614a, 0x613f, 0x613c, 0x612c, - 0x6134, 0x613d, 0x6142, 0x6144, 0x6173, 0x6177, 0x6158, 0x6159, - 0x615a, 0x616b, 0x6174, 0x616f, 0x6165, 0x6171, 0x615f, 0x615d, - 0x6153, 0x6175, 0x6199, 0x6196, 0x6187, 0x61ac, 0x6194, 0x619a, - 0x618a, 0x6191, 0x61ab, 0x61ae, 0x61cc, 0x61ca, 0x61c9, 0x61f7, - 0x61c8, 0x61c3, 0x61c6, 0x61ba, 0x61cb, 0x7f79, 0x61cd, 0x61e6, - 0x61e3, 0x61f6, 0x61fa, 0x61f4, 0x61ff, 0x61fd, 0x61fc, 0x61fe, - 0x6200, 0x6208, 0x6209, 0x620d, 0x620c, 0x6214, 0x621b, 0x003f, - /* lead byte d9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x621e, 0x6221, 0x622a, 0x622e, 0x6230, 0x6232, 0x6233, - 0x6241, 0x624e, 0x625e, 0x6263, 0x625b, 0x6260, 0x6268, 0x627c, - 0x6282, 0x6289, 0x627e, 0x6292, 0x6293, 0x6296, 0x62d4, 0x6283, - 0x6294, 0x62d7, 0x62d1, 0x62bb, 0x62cf, 0x62ff, 0x62c6, 0x64d4, - 0x62c8, 0x62dc, 0x62cc, 0x62ca, 0x62c2, 0x62c7, 0x629b, 0x62c9, - 0x630c, 0x62ee, 0x62f1, 0x6327, 0x6302, 0x6308, 0x62ef, 0x62f5, - 0x6350, 0x633e, 0x634d, 0x641c, 0x634f, 0x6396, 0x638e, 0x6380, - 0x63ab, 0x6376, 0x63a3, 0x638f, 0x6389, 0x639f, 0x63b5, 0x636b, - 0x6369, 0x63be, 0x63e9, 0x63c0, 0x63c6, 0x63e3, 0x63c9, 0x63d2, - 0x63f6, 0x63c4, 0x6416, 0x6434, 0x6406, 0x6413, 0x6426, 0x6436, - 0x651d, 0x6417, 0x6428, 0x640f, 0x6467, 0x646f, 0x6476, 0x644e, - 0x652a, 0x6495, 0x6493, 0x64a5, 0x64a9, 0x6488, 0x64bc, 0x003f, - /* lead byte da */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x64da, 0x64d2, 0x64c5, 0x64c7, 0x64bb, 0x64d8, 0x64c2, - 0x64f1, 0x64e7, 0x8209, 0x64e0, 0x64e1, 0x62ac, 0x64e3, 0x64ef, - 0x652c, 0x64f6, 0x64f4, 0x64f2, 0x64fa, 0x6500, 0x64fd, 0x6518, - 0x651c, 0x6505, 0x6524, 0x6523, 0x652b, 0x6534, 0x6535, 0x6537, - 0x6536, 0x6538, 0x754b, 0x6548, 0x6556, 0x6555, 0x654d, 0x6558, - 0x655e, 0x655d, 0x6572, 0x6578, 0x6582, 0x6583, 0x8b8a, 0x659b, - 0x659f, 0x65ab, 0x65b7, 0x65c3, 0x65c6, 0x65c1, 0x65c4, 0x65cc, - 0x65d2, 0x65db, 0x65d9, 0x65e0, 0x65e1, 0x65f1, 0x6772, 0x660a, - 0x6603, 0x65fb, 0x6773, 0x6635, 0x6636, 0x6634, 0x661c, 0x664f, - 0x6644, 0x6649, 0x6641, 0x665e, 0x665d, 0x6664, 0x6667, 0x6668, - 0x665f, 0x6662, 0x6670, 0x6683, 0x6688, 0x668e, 0x6689, 0x6684, - 0x6698, 0x669d, 0x66c1, 0x66b9, 0x66c9, 0x66be, 0x66bc, 0x003f, - /* lead byte db */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x66c4, 0x66b8, 0x66d6, 0x66da, 0x66e0, 0x663f, 0x66e6, - 0x66e9, 0x66f0, 0x66f5, 0x66f7, 0x670f, 0x6716, 0x671e, 0x6726, - 0x6727, 0x9738, 0x672e, 0x673f, 0x6736, 0x6741, 0x6738, 0x6737, - 0x6746, 0x675e, 0x6760, 0x6759, 0x6763, 0x6764, 0x6789, 0x6770, - 0x67a9, 0x677c, 0x676a, 0x678c, 0x678b, 0x67a6, 0x67a1, 0x6785, - 0x67b7, 0x67ef, 0x67b4, 0x67ec, 0x67b3, 0x67e9, 0x67b8, 0x67e4, - 0x67de, 0x67dd, 0x67e2, 0x67ee, 0x67b9, 0x67ce, 0x67c6, 0x67e7, - 0x6a9c, 0x681e, 0x6846, 0x6829, 0x6840, 0x684d, 0x6832, 0x684e, - 0x68b3, 0x682b, 0x6859, 0x6863, 0x6877, 0x687f, 0x689f, 0x688f, - 0x68ad, 0x6894, 0x689d, 0x689b, 0x6883, 0x6aae, 0x68b9, 0x6874, - 0x68b5, 0x68a0, 0x68ba, 0x690f, 0x688d, 0x687e, 0x6901, 0x68ca, - 0x6908, 0x68d8, 0x6922, 0x6926, 0x68e1, 0x690c, 0x68cd, 0x003f, - /* lead byte dc */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x68d4, 0x68e7, 0x68d5, 0x6936, 0x6912, 0x6904, 0x68d7, - 0x68e3, 0x6925, 0x68f9, 0x68e0, 0x68ef, 0x6928, 0x692a, 0x691a, - 0x6923, 0x6921, 0x68c6, 0x6979, 0x6977, 0x695c, 0x6978, 0x696b, - 0x6954, 0x697e, 0x696e, 0x6939, 0x6974, 0x693d, 0x6959, 0x6930, - 0x6961, 0x695e, 0x695d, 0x6981, 0x696a, 0x69b2, 0x69ae, 0x69d0, - 0x69bf, 0x69c1, 0x69d3, 0x69be, 0x69ce, 0x5be8, 0x69ca, 0x69dd, - 0x69bb, 0x69c3, 0x69a7, 0x6a2e, 0x6991, 0x69a0, 0x699c, 0x6995, - 0x69b4, 0x69de, 0x69e8, 0x6a02, 0x6a1b, 0x69ff, 0x6b0a, 0x69f9, - 0x69f2, 0x69e7, 0x6a05, 0x69b1, 0x6a1e, 0x69ed, 0x6a14, 0x69eb, - 0x6a0a, 0x6a12, 0x6ac1, 0x6a23, 0x6a13, 0x6a44, 0x6a0c, 0x6a72, - 0x6a36, 0x6a78, 0x6a47, 0x6a62, 0x6a59, 0x6a66, 0x6a48, 0x6a38, - 0x6a22, 0x6a90, 0x6a8d, 0x6aa0, 0x6a84, 0x6aa2, 0x6aa3, 0x003f, - /* lead byte dd */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6a97, 0x8617, 0x6abb, 0x6ac3, 0x6ac2, 0x6ab8, 0x6ab3, - 0x6aac, 0x6ade, 0x6ad1, 0x6adf, 0x6aaa, 0x6ada, 0x6aea, 0x6afb, - 0x6b05, 0x8616, 0x6afa, 0x6b12, 0x6b16, 0x9b31, 0x6b1f, 0x6b38, - 0x6b37, 0x76dc, 0x6b39, 0x98ee, 0x6b47, 0x6b43, 0x6b49, 0x6b50, - 0x6b59, 0x6b54, 0x6b5b, 0x6b5f, 0x6b61, 0x6b78, 0x6b79, 0x6b7f, - 0x6b80, 0x6b84, 0x6b83, 0x6b8d, 0x6b98, 0x6b95, 0x6b9e, 0x6ba4, - 0x6baa, 0x6bab, 0x6baf, 0x6bb2, 0x6bb1, 0x6bb3, 0x6bb7, 0x6bbc, - 0x6bc6, 0x6bcb, 0x6bd3, 0x6bdf, 0x6bec, 0x6beb, 0x6bf3, 0x6bef, - 0x9ebe, 0x6c08, 0x6c13, 0x6c14, 0x6c1b, 0x6c24, 0x6c23, 0x6c5e, - 0x6c55, 0x6c62, 0x6c6a, 0x6c82, 0x6c8d, 0x6c9a, 0x6c81, 0x6c9b, - 0x6c7e, 0x6c68, 0x6c73, 0x6c92, 0x6c90, 0x6cc4, 0x6cf1, 0x6cd3, - 0x6cbd, 0x6cd7, 0x6cc5, 0x6cdd, 0x6cae, 0x6cb1, 0x6cbe, 0x003f, - /* lead byte de */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6cba, 0x6cdb, 0x6cef, 0x6cd9, 0x6cea, 0x6d1f, 0x884d, - 0x6d36, 0x6d2b, 0x6d3d, 0x6d38, 0x6d19, 0x6d35, 0x6d33, 0x6d12, - 0x6d0c, 0x6d63, 0x6d93, 0x6d64, 0x6d5a, 0x6d79, 0x6d59, 0x6d8e, - 0x6d95, 0x6fe4, 0x6d85, 0x6df9, 0x6e15, 0x6e0a, 0x6db5, 0x6dc7, - 0x6de6, 0x6db8, 0x6dc6, 0x6dec, 0x6dde, 0x6dcc, 0x6de8, 0x6dd2, - 0x6dc5, 0x6dfa, 0x6dd9, 0x6de4, 0x6dd5, 0x6dea, 0x6dee, 0x6e2d, - 0x6e6e, 0x6e2e, 0x6e19, 0x6e72, 0x6e5f, 0x6e3e, 0x6e23, 0x6e6b, - 0x6e2b, 0x6e76, 0x6e4d, 0x6e1f, 0x6e43, 0x6e3a, 0x6e4e, 0x6e24, - 0x6eff, 0x6e1d, 0x6e38, 0x6e82, 0x6eaa, 0x6e98, 0x6ec9, 0x6eb7, - 0x6ed3, 0x6ebd, 0x6eaf, 0x6ec4, 0x6eb2, 0x6ed4, 0x6ed5, 0x6e8f, - 0x6ea5, 0x6ec2, 0x6e9f, 0x6f41, 0x6f11, 0x704c, 0x6eec, 0x6ef8, - 0x6efe, 0x6f3f, 0x6ef2, 0x6f31, 0x6eef, 0x6f32, 0x6ecc, 0x003f, - /* lead byte df */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6f3e, 0x6f13, 0x6ef7, 0x6f86, 0x6f7a, 0x6f78, 0x6f81, - 0x6f80, 0x6f6f, 0x6f5b, 0x6ff3, 0x6f6d, 0x6f82, 0x6f7c, 0x6f58, - 0x6f8e, 0x6f91, 0x6fc2, 0x6f66, 0x6fb3, 0x6fa3, 0x6fa1, 0x6fa4, - 0x6fb9, 0x6fc6, 0x6faa, 0x6fdf, 0x6fd5, 0x6fec, 0x6fd4, 0x6fd8, - 0x6ff1, 0x6fee, 0x6fdb, 0x7009, 0x700b, 0x6ffa, 0x7011, 0x7001, - 0x700f, 0x6ffe, 0x701b, 0x701a, 0x6f74, 0x701d, 0x7018, 0x701f, - 0x7030, 0x703e, 0x7032, 0x7051, 0x7063, 0x7099, 0x7092, 0x70af, - 0x70f1, 0x70ac, 0x70b8, 0x70b3, 0x70ae, 0x70df, 0x70cb, 0x70dd, - 0x70d9, 0x7109, 0x70fd, 0x711c, 0x7119, 0x7165, 0x7155, 0x7188, - 0x7166, 0x7162, 0x714c, 0x7156, 0x716c, 0x718f, 0x71fb, 0x7184, - 0x7195, 0x71a8, 0x71ac, 0x71d7, 0x71b9, 0x71be, 0x71d2, 0x71c9, - 0x71d4, 0x71ce, 0x71e0, 0x71ec, 0x71e7, 0x71f5, 0x71fc, 0x003f, - /* lead byte e0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x71f9, 0x71ff, 0x720d, 0x7210, 0x721b, 0x7228, 0x722d, - 0x722c, 0x7230, 0x7232, 0x723b, 0x723c, 0x723f, 0x7240, 0x7246, - 0x724b, 0x7258, 0x7274, 0x727e, 0x7282, 0x7281, 0x7287, 0x7292, - 0x7296, 0x72a2, 0x72a7, 0x72b9, 0x72b2, 0x72c3, 0x72c6, 0x72c4, - 0x72ce, 0x72d2, 0x72e2, 0x72e0, 0x72e1, 0x72f9, 0x72f7, 0x500f, - 0x7317, 0x730a, 0x731c, 0x7316, 0x731d, 0x7334, 0x732f, 0x7329, - 0x7325, 0x733e, 0x734e, 0x734f, 0x9ed8, 0x7357, 0x736a, 0x7368, - 0x7370, 0x7378, 0x7375, 0x737b, 0x737a, 0x73c8, 0x73b3, 0x73ce, - 0x73bb, 0x73c0, 0x73e5, 0x73ee, 0x73de, 0x74a2, 0x7405, 0x746f, - 0x7425, 0x73f8, 0x7432, 0x743a, 0x7455, 0x743f, 0x745f, 0x7459, - 0x7441, 0x745c, 0x7469, 0x7470, 0x7463, 0x746a, 0x7476, 0x747e, - 0x748b, 0x749e, 0x74a7, 0x74ca, 0x74cf, 0x74d4, 0x73f1, 0x003f, - /* lead byte e1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x74e0, 0x74e3, 0x74e7, 0x74e9, 0x74ee, 0x74f2, 0x74f0, - 0x74f1, 0x74f8, 0x74f7, 0x7504, 0x7503, 0x7505, 0x750c, 0x750e, - 0x750d, 0x7515, 0x7513, 0x751e, 0x7526, 0x752c, 0x753c, 0x7544, - 0x754d, 0x754a, 0x7549, 0x755b, 0x7546, 0x755a, 0x7569, 0x7564, - 0x7567, 0x756b, 0x756d, 0x7578, 0x7576, 0x7586, 0x7587, 0x7574, - 0x758a, 0x7589, 0x7582, 0x7594, 0x759a, 0x759d, 0x75a5, 0x75a3, - 0x75c2, 0x75b3, 0x75c3, 0x75b5, 0x75bd, 0x75b8, 0x75bc, 0x75b1, - 0x75cd, 0x75ca, 0x75d2, 0x75d9, 0x75e3, 0x75de, 0x75fe, 0x75ff, - 0x75fc, 0x7601, 0x75f0, 0x75fa, 0x75f2, 0x75f3, 0x760b, 0x760d, - 0x7609, 0x761f, 0x7627, 0x7620, 0x7621, 0x7622, 0x7624, 0x7634, - 0x7630, 0x763b, 0x7647, 0x7648, 0x7646, 0x765c, 0x7658, 0x7661, - 0x7662, 0x7668, 0x7669, 0x766a, 0x7667, 0x766c, 0x7670, 0x003f, - /* lead byte e2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7672, 0x7676, 0x7678, 0x767c, 0x7680, 0x7683, 0x7688, - 0x768b, 0x768e, 0x7696, 0x7693, 0x7699, 0x769a, 0x76b0, 0x76b4, - 0x76b8, 0x76b9, 0x76ba, 0x76c2, 0x76cd, 0x76d6, 0x76d2, 0x76de, - 0x76e1, 0x76e5, 0x76e7, 0x76ea, 0x862f, 0x76fb, 0x7708, 0x7707, - 0x7704, 0x7729, 0x7724, 0x771e, 0x7725, 0x7726, 0x771b, 0x7737, - 0x7738, 0x7747, 0x775a, 0x7768, 0x776b, 0x775b, 0x7765, 0x777f, - 0x777e, 0x7779, 0x778e, 0x778b, 0x7791, 0x77a0, 0x779e, 0x77b0, - 0x77b6, 0x77b9, 0x77bf, 0x77bc, 0x77bd, 0x77bb, 0x77c7, 0x77cd, - 0x77d7, 0x77da, 0x77dc, 0x77e3, 0x77ee, 0x77fc, 0x780c, 0x7812, - 0x7926, 0x7820, 0x792a, 0x7845, 0x788e, 0x7874, 0x7886, 0x787c, - 0x789a, 0x788c, 0x78a3, 0x78b5, 0x78aa, 0x78af, 0x78d1, 0x78c6, - 0x78cb, 0x78d4, 0x78be, 0x78bc, 0x78c5, 0x78ca, 0x78ec, 0x003f, - /* lead byte e3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x78e7, 0x78da, 0x78fd, 0x78f4, 0x7907, 0x7912, 0x7911, - 0x7919, 0x792c, 0x792b, 0x7940, 0x7960, 0x7957, 0x795f, 0x795a, - 0x7955, 0x7953, 0x797a, 0x797f, 0x798a, 0x799d, 0x79a7, 0x9f4b, - 0x79aa, 0x79ae, 0x79b3, 0x79b9, 0x79ba, 0x79c9, 0x79d5, 0x79e7, - 0x79ec, 0x79e1, 0x79e3, 0x7a08, 0x7a0d, 0x7a18, 0x7a19, 0x7a20, - 0x7a1f, 0x7980, 0x7a31, 0x7a3b, 0x7a3e, 0x7a37, 0x7a43, 0x7a57, - 0x7a49, 0x7a61, 0x7a62, 0x7a69, 0x9f9d, 0x7a70, 0x7a79, 0x7a7d, - 0x7a88, 0x7a97, 0x7a95, 0x7a98, 0x7a96, 0x7aa9, 0x7ac8, 0x7ab0, - 0x7ab6, 0x7ac5, 0x7ac4, 0x7abf, 0x9083, 0x7ac7, 0x7aca, 0x7acd, - 0x7acf, 0x7ad5, 0x7ad3, 0x7ad9, 0x7ada, 0x7add, 0x7ae1, 0x7ae2, - 0x7ae6, 0x7aed, 0x7af0, 0x7b02, 0x7b0f, 0x7b0a, 0x7b06, 0x7b33, - 0x7b18, 0x7b19, 0x7b1e, 0x7b35, 0x7b28, 0x7b36, 0x7b50, 0x003f, - /* lead byte e4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7b7a, 0x7b04, 0x7b4d, 0x7b0b, 0x7b4c, 0x7b45, 0x7b75, - 0x7b65, 0x7b74, 0x7b67, 0x7b70, 0x7b71, 0x7b6c, 0x7b6e, 0x7b9d, - 0x7b98, 0x7b9f, 0x7b8d, 0x7b9c, 0x7b9a, 0x7b8b, 0x7b92, 0x7b8f, - 0x7b5d, 0x7b99, 0x7bcb, 0x7bc1, 0x7bcc, 0x7bcf, 0x7bb4, 0x7bc6, - 0x7bdd, 0x7be9, 0x7c11, 0x7c14, 0x7be6, 0x7be5, 0x7c60, 0x7c00, - 0x7c07, 0x7c13, 0x7bf3, 0x7bf7, 0x7c17, 0x7c0d, 0x7bf6, 0x7c23, - 0x7c27, 0x7c2a, 0x7c1f, 0x7c37, 0x7c2b, 0x7c3d, 0x7c4c, 0x7c43, - 0x7c54, 0x7c4f, 0x7c40, 0x7c50, 0x7c58, 0x7c5f, 0x7c64, 0x7c56, - 0x7c65, 0x7c6c, 0x7c75, 0x7c83, 0x7c90, 0x7ca4, 0x7cad, 0x7ca2, - 0x7cab, 0x7ca1, 0x7ca8, 0x7cb3, 0x7cb2, 0x7cb1, 0x7cae, 0x7cb9, - 0x7cbd, 0x7cc0, 0x7cc5, 0x7cc2, 0x7cd8, 0x7cd2, 0x7cdc, 0x7ce2, - 0x9b3b, 0x7cef, 0x7cf2, 0x7cf4, 0x7cf6, 0x7cfa, 0x7d06, 0x003f, - /* lead byte e5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7d02, 0x7d1c, 0x7d15, 0x7d0a, 0x7d45, 0x7d4b, 0x7d2e, - 0x7d32, 0x7d3f, 0x7d35, 0x7d46, 0x7d73, 0x7d56, 0x7d4e, 0x7d72, - 0x7d68, 0x7d6e, 0x7d4f, 0x7d63, 0x7d93, 0x7d89, 0x7d5b, 0x7d8f, - 0x7d7d, 0x7d9b, 0x7dba, 0x7dae, 0x7da3, 0x7db5, 0x7dc7, 0x7dbd, - 0x7dab, 0x7e3d, 0x7da2, 0x7daf, 0x7ddc, 0x7db8, 0x7d9f, 0x7db0, - 0x7dd8, 0x7ddd, 0x7de4, 0x7dde, 0x7dfb, 0x7df2, 0x7de1, 0x7e05, - 0x7e0a, 0x7e23, 0x7e21, 0x7e12, 0x7e31, 0x7e1f, 0x7e09, 0x7e0b, - 0x7e22, 0x7e46, 0x7e66, 0x7e3b, 0x7e35, 0x7e39, 0x7e43, 0x7e37, - 0x7e32, 0x7e3a, 0x7e67, 0x7e5d, 0x7e56, 0x7e5e, 0x7e59, 0x7e5a, - 0x7e79, 0x7e6a, 0x7e69, 0x7e7c, 0x7e7b, 0x7e83, 0x7dd5, 0x7e7d, - 0x8fae, 0x7e7f, 0x7e88, 0x7e89, 0x7e8c, 0x7e92, 0x7e90, 0x7e93, - 0x7e94, 0x7e96, 0x7e8e, 0x7e9b, 0x7e9c, 0x7f38, 0x7f3a, 0x003f, - /* lead byte e6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7f45, 0x7f4c, 0x7f4d, 0x7f4e, 0x7f50, 0x7f51, 0x7f55, - 0x7f54, 0x7f58, 0x7f5f, 0x7f60, 0x7f68, 0x7f69, 0x7f67, 0x7f78, - 0x7f82, 0x7f86, 0x7f83, 0x7f88, 0x7f87, 0x7f8c, 0x7f94, 0x7f9e, - 0x7f9d, 0x7f9a, 0x7fa3, 0x7faf, 0x7fb2, 0x7fb9, 0x7fae, 0x7fb6, - 0x7fb8, 0x8b71, 0x7fc5, 0x7fc6, 0x7fca, 0x7fd5, 0x7fd4, 0x7fe1, - 0x7fe6, 0x7fe9, 0x7ff3, 0x7ff9, 0x98dc, 0x8006, 0x8004, 0x800b, - 0x8012, 0x8018, 0x8019, 0x801c, 0x8021, 0x8028, 0x803f, 0x803b, - 0x804a, 0x8046, 0x8052, 0x8058, 0x805a, 0x805f, 0x8062, 0x8068, - 0x8073, 0x8072, 0x8070, 0x8076, 0x8079, 0x807d, 0x807f, 0x8084, - 0x8086, 0x8085, 0x809b, 0x8093, 0x809a, 0x80ad, 0x5190, 0x80ac, - 0x80db, 0x80e5, 0x80d9, 0x80dd, 0x80c4, 0x80da, 0x80d6, 0x8109, - 0x80ef, 0x80f1, 0x811b, 0x8129, 0x8123, 0x812f, 0x814b, 0x003f, - /* lead byte e7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x968b, 0x8146, 0x813e, 0x8153, 0x8151, 0x80fc, 0x8171, - 0x816e, 0x8165, 0x8166, 0x8174, 0x8183, 0x8188, 0x818a, 0x8180, - 0x8182, 0x81a0, 0x8195, 0x81a4, 0x81a3, 0x815f, 0x8193, 0x81a9, - 0x81b0, 0x81b5, 0x81be, 0x81b8, 0x81bd, 0x81c0, 0x81c2, 0x81ba, - 0x81c9, 0x81cd, 0x81d1, 0x81d9, 0x81d8, 0x81c8, 0x81da, 0x81df, - 0x81e0, 0x81e7, 0x81fa, 0x81fb, 0x81fe, 0x8201, 0x8202, 0x8205, - 0x8207, 0x820a, 0x820d, 0x8210, 0x8216, 0x8229, 0x822b, 0x8238, - 0x8233, 0x8240, 0x8259, 0x8258, 0x825d, 0x825a, 0x825f, 0x8264, - 0x8262, 0x8268, 0x826a, 0x826b, 0x822e, 0x8271, 0x8277, 0x8278, - 0x827e, 0x828d, 0x8292, 0x82ab, 0x829f, 0x82bb, 0x82ac, 0x82e1, - 0x82e3, 0x82df, 0x82d2, 0x82f4, 0x82f3, 0x82fa, 0x8393, 0x8303, - 0x82fb, 0x82f9, 0x82de, 0x8306, 0x82dc, 0x8309, 0x82d9, 0x003f, - /* lead byte e8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8335, 0x8334, 0x8316, 0x8332, 0x8331, 0x8340, 0x8339, - 0x8350, 0x8345, 0x832f, 0x832b, 0x8317, 0x8318, 0x8385, 0x839a, - 0x83aa, 0x839f, 0x83a2, 0x8396, 0x8323, 0x838e, 0x8387, 0x838a, - 0x837c, 0x83b5, 0x8373, 0x8375, 0x83a0, 0x8389, 0x83a8, 0x83f4, - 0x8413, 0x83eb, 0x83ce, 0x83fd, 0x8403, 0x83d8, 0x840b, 0x83c1, - 0x83f7, 0x8407, 0x83e0, 0x83f2, 0x840d, 0x8422, 0x8420, 0x83bd, - 0x8438, 0x8506, 0x83fb, 0x846d, 0x842a, 0x843c, 0x855a, 0x8484, - 0x8477, 0x846b, 0x84ad, 0x846e, 0x8482, 0x8469, 0x8446, 0x842c, - 0x846f, 0x8479, 0x8435, 0x84ca, 0x8462, 0x84b9, 0x84bf, 0x849f, - 0x84d9, 0x84cd, 0x84bb, 0x84da, 0x84d0, 0x84c1, 0x84c6, 0x84d6, - 0x84a1, 0x8521, 0x84ff, 0x84f4, 0x8517, 0x8518, 0x852c, 0x851f, - 0x8515, 0x8514, 0x84fc, 0x8540, 0x8563, 0x8558, 0x8548, 0x003f, - /* lead byte e9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8541, 0x8602, 0x854b, 0x8555, 0x8580, 0x85a4, 0x8588, - 0x8591, 0x858a, 0x85a8, 0x856d, 0x8594, 0x859b, 0x85ea, 0x8587, - 0x859c, 0x8577, 0x857e, 0x8590, 0x85c9, 0x85ba, 0x85cf, 0x85b9, - 0x85d0, 0x85d5, 0x85dd, 0x85e5, 0x85dc, 0x85f9, 0x860a, 0x8613, - 0x860b, 0x85fe, 0x85fa, 0x8606, 0x8622, 0x861a, 0x8630, 0x863f, - 0x864d, 0x4e55, 0x8654, 0x865f, 0x8667, 0x8671, 0x8693, 0x86a3, - 0x86a9, 0x86aa, 0x868b, 0x868c, 0x86b6, 0x86af, 0x86c4, 0x86c6, - 0x86b0, 0x86c9, 0x8823, 0x86ab, 0x86d4, 0x86de, 0x86e9, 0x86ec, - 0x86df, 0x86db, 0x86ef, 0x8712, 0x8706, 0x8708, 0x8700, 0x8703, - 0x86fb, 0x8711, 0x8709, 0x870d, 0x86f9, 0x870a, 0x8734, 0x873f, - 0x8737, 0x873b, 0x8725, 0x8729, 0x871a, 0x8760, 0x875f, 0x8778, - 0x874c, 0x874e, 0x8774, 0x8757, 0x8768, 0x876e, 0x8759, 0x003f, - /* lead byte ea */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8753, 0x8763, 0x876a, 0x8805, 0x87a2, 0x879f, 0x8782, - 0x87af, 0x87cb, 0x87bd, 0x87c0, 0x87d0, 0x96d6, 0x87ab, 0x87c4, - 0x87b3, 0x87c7, 0x87c6, 0x87bb, 0x87ef, 0x87f2, 0x87e0, 0x880f, - 0x880d, 0x87fe, 0x87f6, 0x87f7, 0x880e, 0x87d2, 0x8811, 0x8816, - 0x8815, 0x8822, 0x8821, 0x8831, 0x8836, 0x8839, 0x8827, 0x883b, - 0x8844, 0x8842, 0x8852, 0x8859, 0x885e, 0x8862, 0x886b, 0x8881, - 0x887e, 0x889e, 0x8875, 0x887d, 0x88b5, 0x8872, 0x8882, 0x8897, - 0x8892, 0x88ae, 0x8899, 0x88a2, 0x888d, 0x88a4, 0x88b0, 0x88bf, - 0x88b1, 0x88c3, 0x88c4, 0x88d4, 0x88d8, 0x88d9, 0x88dd, 0x88f9, - 0x8902, 0x88fc, 0x88f4, 0x88e8, 0x88f2, 0x8904, 0x890c, 0x890a, - 0x8913, 0x8943, 0x891e, 0x8925, 0x892a, 0x892b, 0x8941, 0x8944, - 0x893b, 0x8936, 0x8938, 0x894c, 0x891d, 0x8960, 0x895e, 0x003f, - /* lead byte eb */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8966, 0x8964, 0x896d, 0x896a, 0x896f, 0x8974, 0x8977, - 0x897e, 0x8983, 0x8988, 0x898a, 0x8993, 0x8998, 0x89a1, 0x89a9, - 0x89a6, 0x89ac, 0x89af, 0x89b2, 0x89ba, 0x89bd, 0x89bf, 0x89c0, - 0x89da, 0x89dc, 0x89dd, 0x89e7, 0x89f4, 0x89f8, 0x8a03, 0x8a16, - 0x8a10, 0x8a0c, 0x8a1b, 0x8a1d, 0x8a25, 0x8a36, 0x8a41, 0x8a5b, - 0x8a52, 0x8a46, 0x8a48, 0x8a7c, 0x8a6d, 0x8a6c, 0x8a62, 0x8a85, - 0x8a82, 0x8a84, 0x8aa8, 0x8aa1, 0x8a91, 0x8aa5, 0x8aa6, 0x8a9a, - 0x8aa3, 0x8ac4, 0x8acd, 0x8ac2, 0x8ada, 0x8aeb, 0x8af3, 0x8ae7, - 0x8ae4, 0x8af1, 0x8b14, 0x8ae0, 0x8ae2, 0x8af7, 0x8ade, 0x8adb, - 0x8b0c, 0x8b07, 0x8b1a, 0x8ae1, 0x8b16, 0x8b10, 0x8b17, 0x8b20, - 0x8b33, 0x97ab, 0x8b26, 0x8b2b, 0x8b3e, 0x8b28, 0x8b41, 0x8b4c, - 0x8b4f, 0x8b4e, 0x8b49, 0x8b56, 0x8b5b, 0x8b5a, 0x8b6b, 0x003f, - /* lead byte ec */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8b5f, 0x8b6c, 0x8b6f, 0x8b74, 0x8b7d, 0x8b80, 0x8b8c, - 0x8b8e, 0x8b92, 0x8b93, 0x8b96, 0x8b99, 0x8b9a, 0x8c3a, 0x8c41, - 0x8c3f, 0x8c48, 0x8c4c, 0x8c4e, 0x8c50, 0x8c55, 0x8c62, 0x8c6c, - 0x8c78, 0x8c7a, 0x8c82, 0x8c89, 0x8c85, 0x8c8a, 0x8c8d, 0x8c8e, - 0x8c94, 0x8c7c, 0x8c98, 0x621d, 0x8cad, 0x8caa, 0x8cbd, 0x8cb2, - 0x8cb3, 0x8cae, 0x8cb6, 0x8cc8, 0x8cc1, 0x8ce4, 0x8ce3, 0x8cda, - 0x8cfd, 0x8cfa, 0x8cfb, 0x8d04, 0x8d05, 0x8d0a, 0x8d07, 0x8d0f, - 0x8d0d, 0x8d10, 0x9f4e, 0x8d13, 0x8ccd, 0x8d14, 0x8d16, 0x8d67, - 0x8d6d, 0x8d71, 0x8d73, 0x8d81, 0x8d99, 0x8dc2, 0x8dbe, 0x8dba, - 0x8dcf, 0x8dda, 0x8dd6, 0x8dcc, 0x8ddb, 0x8dcb, 0x8dea, 0x8deb, - 0x8ddf, 0x8de3, 0x8dfc, 0x8e08, 0x8e09, 0x8dff, 0x8e1d, 0x8e1e, - 0x8e10, 0x8e1f, 0x8e42, 0x8e35, 0x8e30, 0x8e34, 0x8e4a, 0x003f, - /* lead byte ed */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8e47, 0x8e49, 0x8e4c, 0x8e50, 0x8e48, 0x8e59, 0x8e64, - 0x8e60, 0x8e2a, 0x8e63, 0x8e55, 0x8e76, 0x8e72, 0x8e7c, 0x8e81, - 0x8e87, 0x8e85, 0x8e84, 0x8e8b, 0x8e8a, 0x8e93, 0x8e91, 0x8e94, - 0x8e99, 0x8eaa, 0x8ea1, 0x8eac, 0x8eb0, 0x8ec6, 0x8eb1, 0x8ebe, - 0x8ec5, 0x8ec8, 0x8ecb, 0x8edb, 0x8ee3, 0x8efc, 0x8efb, 0x8eeb, - 0x8efe, 0x8f0a, 0x8f05, 0x8f15, 0x8f12, 0x8f19, 0x8f13, 0x8f1c, - 0x8f1f, 0x8f1b, 0x8f0c, 0x8f26, 0x8f33, 0x8f3b, 0x8f39, 0x8f45, - 0x8f42, 0x8f3e, 0x8f4c, 0x8f49, 0x8f46, 0x8f4e, 0x8f57, 0x8f5c, - 0x8f62, 0x8f63, 0x8f64, 0x8f9c, 0x8f9f, 0x8fa3, 0x8fad, 0x8faf, - 0x8fb7, 0x8fda, 0x8fe5, 0x8fe2, 0x8fea, 0x8fef, 0x9087, 0x8ff4, - 0x9005, 0x8ff9, 0x8ffa, 0x9011, 0x9015, 0x9021, 0x900d, 0x901e, - 0x9016, 0x900b, 0x9027, 0x9036, 0x9035, 0x9039, 0x8ff8, 0x003f, - /* lead byte ee */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x904f, 0x9050, 0x9051, 0x9052, 0x900e, 0x9049, 0x903e, - 0x9056, 0x9058, 0x905e, 0x9068, 0x906f, 0x9076, 0x96a8, 0x9072, - 0x9082, 0x907d, 0x9081, 0x9080, 0x908a, 0x9089, 0x908f, 0x90a8, - 0x90af, 0x90b1, 0x90b5, 0x90e2, 0x90e4, 0x6248, 0x90db, 0x9102, - 0x9112, 0x9119, 0x9132, 0x9130, 0x914a, 0x9156, 0x9158, 0x9163, - 0x9165, 0x9169, 0x9173, 0x9172, 0x918b, 0x9189, 0x9182, 0x91a2, - 0x91ab, 0x91af, 0x91aa, 0x91b5, 0x91b4, 0x91ba, 0x91c0, 0x91c1, - 0x91c9, 0x91cb, 0x91d0, 0x91d6, 0x91df, 0x91e1, 0x91db, 0x91fc, - 0x91f5, 0x91f6, 0x921e, 0x91ff, 0x9214, 0x922c, 0x9215, 0x9211, - 0x925e, 0x9257, 0x9245, 0x9249, 0x9264, 0x9248, 0x9295, 0x923f, - 0x924b, 0x9250, 0x929c, 0x9296, 0x9293, 0x929b, 0x925a, 0x92cf, - 0x92b9, 0x92b7, 0x92e9, 0x930f, 0x92fa, 0x9344, 0x932e, 0x003f, - /* lead byte ef */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9319, 0x9322, 0x931a, 0x9323, 0x933a, 0x9335, 0x933b, - 0x935c, 0x9360, 0x937c, 0x936e, 0x9356, 0x93b0, 0x93ac, 0x93ad, - 0x9394, 0x93b9, 0x93d6, 0x93d7, 0x93e8, 0x93e5, 0x93d8, 0x93c3, - 0x93dd, 0x93d0, 0x93c8, 0x93e4, 0x941a, 0x9414, 0x9413, 0x9403, - 0x9407, 0x9410, 0x9436, 0x942b, 0x9435, 0x9421, 0x943a, 0x9441, - 0x9452, 0x9444, 0x945b, 0x9460, 0x9462, 0x945e, 0x946a, 0x9229, - 0x9470, 0x9475, 0x9477, 0x947d, 0x945a, 0x947c, 0x947e, 0x9481, - 0x947f, 0x9582, 0x9587, 0x958a, 0x9594, 0x9596, 0x9598, 0x9599, - 0x95a0, 0x95a8, 0x95a7, 0x95ad, 0x95bc, 0x95bb, 0x95b9, 0x95be, - 0x95ca, 0x6ff6, 0x95c3, 0x95cd, 0x95cc, 0x95d5, 0x95d4, 0x95d6, - 0x95dc, 0x95e1, 0x95e5, 0x95e2, 0x9621, 0x9628, 0x962e, 0x962f, - 0x9642, 0x964c, 0x964f, 0x964b, 0x9677, 0x965c, 0x965e, 0x003f, - /* lead byte f0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x965d, 0x965f, 0x9666, 0x9672, 0x966c, 0x968d, 0x9698, - 0x9695, 0x9697, 0x96aa, 0x96a7, 0x96b1, 0x96b2, 0x96b0, 0x96b4, - 0x96b6, 0x96b8, 0x96b9, 0x96ce, 0x96cb, 0x96c9, 0x96cd, 0x894d, - 0x96dc, 0x970d, 0x96d5, 0x96f9, 0x9704, 0x9706, 0x9708, 0x9713, - 0x970e, 0x9711, 0x970f, 0x9716, 0x9719, 0x9724, 0x972a, 0x9730, - 0x9739, 0x973d, 0x973e, 0x9744, 0x9746, 0x9748, 0x9742, 0x9749, - 0x975c, 0x9760, 0x9764, 0x9766, 0x9768, 0x52d2, 0x976b, 0x9771, - 0x9779, 0x9785, 0x977c, 0x9781, 0x977a, 0x9786, 0x978b, 0x978f, - 0x9790, 0x979c, 0x97a8, 0x97a6, 0x97a3, 0x97b3, 0x97b4, 0x97c3, - 0x97c6, 0x97c8, 0x97cb, 0x97dc, 0x97ed, 0x9f4f, 0x97f2, 0x7adf, - 0x97f6, 0x97f5, 0x980f, 0x980c, 0x9838, 0x9824, 0x9821, 0x9837, - 0x983d, 0x9846, 0x984f, 0x984b, 0x986b, 0x986f, 0x9870, 0x003f, - /* lead byte f1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9871, 0x9874, 0x9873, 0x98aa, 0x98af, 0x98b1, 0x98b6, - 0x98c4, 0x98c3, 0x98c6, 0x98e9, 0x98eb, 0x9903, 0x9909, 0x9912, - 0x9914, 0x9918, 0x9921, 0x991d, 0x991e, 0x9924, 0x9920, 0x992c, - 0x992e, 0x993d, 0x993e, 0x9942, 0x9949, 0x9945, 0x9950, 0x994b, - 0x9951, 0x9952, 0x994c, 0x9955, 0x9997, 0x9998, 0x99a5, 0x99ad, - 0x99ae, 0x99bc, 0x99df, 0x99db, 0x99dd, 0x99d8, 0x99d1, 0x99ed, - 0x99ee, 0x99f1, 0x99f2, 0x99fb, 0x99f8, 0x9a01, 0x9a0f, 0x9a05, - 0x99e2, 0x9a19, 0x9a2b, 0x9a37, 0x9a45, 0x9a42, 0x9a40, 0x9a43, - 0x9a3e, 0x9a55, 0x9a4d, 0x9a5b, 0x9a57, 0x9a5f, 0x9a62, 0x9a65, - 0x9a64, 0x9a69, 0x9a6b, 0x9a6a, 0x9aad, 0x9ab0, 0x9abc, 0x9ac0, - 0x9acf, 0x9ad1, 0x9ad3, 0x9ad4, 0x9ade, 0x9adf, 0x9ae2, 0x9ae3, - 0x9ae6, 0x9aef, 0x9aeb, 0x9aee, 0x9af4, 0x9af1, 0x9af7, 0x003f, - /* lead byte f2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9afb, 0x9b06, 0x9b18, 0x9b1a, 0x9b1f, 0x9b22, 0x9b23, - 0x9b25, 0x9b27, 0x9b28, 0x9b29, 0x9b2a, 0x9b2e, 0x9b2f, 0x9b32, - 0x9b44, 0x9b43, 0x9b4f, 0x9b4d, 0x9b4e, 0x9b51, 0x9b58, 0x9b74, - 0x9b93, 0x9b83, 0x9b91, 0x9b96, 0x9b97, 0x9b9f, 0x9ba0, 0x9ba8, - 0x9bb4, 0x9bc0, 0x9bca, 0x9bb9, 0x9bc6, 0x9bcf, 0x9bd1, 0x9bd2, - 0x9be3, 0x9be2, 0x9be4, 0x9bd4, 0x9be1, 0x9c3a, 0x9bf2, 0x9bf1, - 0x9bf0, 0x9c15, 0x9c14, 0x9c09, 0x9c13, 0x9c0c, 0x9c06, 0x9c08, - 0x9c12, 0x9c0a, 0x9c04, 0x9c2e, 0x9c1b, 0x9c25, 0x9c24, 0x9c21, - 0x9c30, 0x9c47, 0x9c32, 0x9c46, 0x9c3e, 0x9c5a, 0x9c60, 0x9c67, - 0x9c76, 0x9c78, 0x9ce7, 0x9cec, 0x9cf0, 0x9d09, 0x9d08, 0x9ceb, - 0x9d03, 0x9d06, 0x9d2a, 0x9d26, 0x9daf, 0x9d23, 0x9d1f, 0x9d44, - 0x9d15, 0x9d12, 0x9d41, 0x9d3f, 0x9d3e, 0x9d46, 0x9d48, 0x003f, - /* lead byte f3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9d5d, 0x9d5e, 0x9d64, 0x9d51, 0x9d50, 0x9d59, 0x9d72, - 0x9d89, 0x9d87, 0x9dab, 0x9d6f, 0x9d7a, 0x9d9a, 0x9da4, 0x9da9, - 0x9db2, 0x9dc4, 0x9dc1, 0x9dbb, 0x9db8, 0x9dba, 0x9dc6, 0x9dcf, - 0x9dc2, 0x9dd9, 0x9dd3, 0x9df8, 0x9de6, 0x9ded, 0x9def, 0x9dfd, - 0x9e1a, 0x9e1b, 0x9e1e, 0x9e75, 0x9e79, 0x9e7d, 0x9e81, 0x9e88, - 0x9e8b, 0x9e8c, 0x9e92, 0x9e95, 0x9e91, 0x9e9d, 0x9ea5, 0x9ea9, - 0x9eb8, 0x9eaa, 0x9ead, 0x9761, 0x9ecc, 0x9ece, 0x9ecf, 0x9ed0, - 0x9ed4, 0x9edc, 0x9ede, 0x9edd, 0x9ee0, 0x9ee5, 0x9ee8, 0x9eef, - 0x9ef4, 0x9ef6, 0x9ef7, 0x9ef9, 0x9efb, 0x9efc, 0x9efd, 0x9f07, - 0x9f08, 0x76b7, 0x9f15, 0x9f21, 0x9f2c, 0x9f3e, 0x9f4a, 0x9f52, - 0x9f54, 0x9f63, 0x9f5f, 0x9f60, 0x9f61, 0x9f66, 0x9f67, 0x9f6c, - 0x9f6a, 0x9f77, 0x9f72, 0x9f76, 0x9f95, 0x9f9c, 0x9fa0, 0x003f, - /* lead byte f4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x582f, 0x69c7, 0x9059, 0x7464, 0x51dc, 0x7199, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f -}; - -static const unsigned char cp2uni_leadbytes[256] = -{ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, - 0x0a, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 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, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00 -}; - -static const unsigned short uni2cp_low[27904] = -{ - /* 0x0000 .. 0x00ff */ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x0020, 0x0021, 0xa1f1, 0xa1f2, 0x003f, 0x005c, 0x007c, 0xa1f8, - 0xa1af, 0x0063, 0x0061, 0xa1d4, 0xa2cc, 0x002d, 0x0072, 0xa1bd, - 0xa1eb, 0xa1de, 0x0032, 0x0033, 0xa1ad, 0xa6cc, 0xa2f9, 0x003f, - 0x002c, 0x0031, 0x006f, 0xa1d5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x0043, - 0x0045, 0x0045, 0x0045, 0x0045, 0x0049, 0x0049, 0x0049, 0x0049, - 0x0044, 0x004e, 0x004f, 0x004f, 0x004f, 0x004f, 0x004f, 0xa1df, - 0x004f, 0x0055, 0x0055, 0x0055, 0x0055, 0x0059, 0x003f, 0xa6c2, - 0x0061, 0x0061, 0x0061, 0x0061, 0x0061, 0x0061, 0x0061, 0x0063, - 0x0065, 0x0065, 0x0065, 0x0065, 0x0069, 0x0069, 0x0069, 0x0069, - 0x0064, 0x006e, 0x006f, 0x006f, 0x006f, 0x006f, 0x006f, 0xa1e0, - 0x006f, 0x0075, 0x0075, 0x0075, 0x0075, 0x0079, 0x003f, 0x0079, - /* 0x0100 .. 0x01ff */ - 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, 0x0043, 0x0063, - 0x0043, 0x0063, 0x0043, 0x0063, 0x0043, 0x0063, 0x0044, 0x0064, - 0x0044, 0x0064, 0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065, - 0x0045, 0x0065, 0x0045, 0x0065, 0x0047, 0x0067, 0x0047, 0x0067, - 0x0047, 0x0067, 0x0047, 0x0067, 0x0048, 0x0068, 0x0048, 0x0068, - 0x0049, 0x0069, 0x0049, 0x0069, 0x0049, 0x0069, 0x0049, 0x0069, - 0x0049, 0x0069, 0x003f, 0x003f, 0x004a, 0x006a, 0x004b, 0x006b, - 0x003f, 0x004c, 0x006c, 0x004c, 0x006c, 0x004c, 0x006c, 0x003f, - 0x003f, 0x004c, 0x006c, 0x004e, 0x006e, 0x004e, 0x006e, 0x004e, - 0x006e, 0x003f, 0x003f, 0x003f, 0x004f, 0x006f, 0x004f, 0x006f, - 0x004f, 0x006f, 0x004f, 0x006f, 0x0052, 0x0072, 0x0052, 0x0072, - 0x0052, 0x0072, 0x0053, 0x0073, 0x0053, 0x0073, 0x0053, 0x0073, - 0x0053, 0x0073, 0x0054, 0x0074, 0x0054, 0x0074, 0x0054, 0x0074, - 0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075, - 0x0055, 0x0075, 0x0055, 0x0075, 0x0057, 0x0077, 0x0059, 0x0079, - 0x0059, 0x005a, 0x007a, 0x005a, 0x007a, 0x005a, 0x007a, 0x0073, - 0x0062, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x0044, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x0045, 0x0046, 0x0066, 0x003f, 0x003f, 0x003f, 0x003f, 0x0049, - 0x003f, 0x003f, 0x006c, 0x003f, 0x003f, 0x003f, 0x003f, 0x004f, - 0x004f, 0x006f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x0074, 0x003f, 0x003f, 0x0054, 0x0055, - 0x0075, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x007a, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa8a2, 0x003f, 0x003f, 0x0021, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0041, 0x0061, 0x0049, - 0x0069, 0x004f, 0x006f, 0x0055, 0x0075, 0x0055, 0x0075, 0x0055, - 0x0075, 0x0055, 0x0075, 0x0055, 0x0075, 0x003f, 0x0041, 0x0061, - 0x0041, 0x0061, 0x0041, 0x0061, 0x0047, 0x0067, 0x0047, 0x0067, - 0x004b, 0x006b, 0x004f, 0x006f, 0x004f, 0x006f, 0x003f, 0x003f, - 0x006a, 0x003f, 0x003f, 0x003f, 0x0047, 0x0067, 0x003f, 0x003f, - 0x004e, 0x006e, 0x0041, 0x0061, 0x0041, 0x0061, 0x004f, 0x006f, - /* 0x0200 .. 0x02ff */ - 0x0041, 0x0061, 0x0041, 0x0061, 0x0045, 0x0065, 0x0045, 0x0065, - 0x0049, 0x0069, 0x0049, 0x0069, 0x004f, 0x006f, 0x004f, 0x006f, - 0x0052, 0x0072, 0x0052, 0x0072, 0x0055, 0x0075, 0x0055, 0x0075, - 0x0053, 0x0073, 0x0054, 0x0074, 0x003f, 0x003f, 0x0048, 0x0068, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0041, 0x0061, - 0x0045, 0x0065, 0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f, - 0x004f, 0x006f, 0x0059, 0x0079, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x0067, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x0068, 0x003f, 0x006a, 0x0072, 0x003f, 0x003f, 0x003f, 0x0077, - 0x0079, 0xa1ad, 0xa1ed, 0xa1c6, 0xa1c7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x005e, 0x003f, 0x005e, 0x0076, - 0x0027, 0xa1bd, 0xa1ad, 0x0060, 0x003f, 0x005f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa1eb, 0x003f, 0x007e, 0xa1ed, 0x003f, 0x003f, - 0x003f, 0x006c, 0x0073, 0x0078, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x0300 .. 0x03ff */ - 0x0060, 0xa1ad, 0x005e, 0x007e, 0xa1bd, 0x007e, 0x003f, 0x003f, - 0xa1af, 0x003f, 0xa1eb, 0xa1ed, 0x0076, 0x003f, 0x0022, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x002c, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x005f, 0x005f, 0x005f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x0060, 0xa1ad, 0x003f, 0x003f, 0xa1af, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa1ad, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003b, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa1ad, 0xa1af, 0xa6a1, 0x003f, - 0xa6a5, 0xa6a7, 0xa6a9, 0x003f, 0xa6af, 0x003f, 0xa6b4, 0xa6b8, - 0xa6c9, 0xa6a1, 0xa6a2, 0xa6a3, 0xa6a4, 0xa6a5, 0xa6a6, 0xa6a7, - 0xa6a8, 0xa6a9, 0xa6aa, 0xa6ab, 0xa6ac, 0xa6ad, 0xa6ae, 0xa6af, - 0xa6b0, 0xa6b1, 0x003f, 0xa6b2, 0xa6b3, 0xa6b4, 0xa6b5, 0xa6b6, - 0xa6b7, 0xa6b8, 0xa6a9, 0xa6b4, 0xa6c1, 0xa6c5, 0xa6c7, 0xa6c9, - 0xa6d4, 0xa6c1, 0xa6c2, 0xa6c3, 0xa6c4, 0xa6c5, 0xa6c6, 0xa6c7, - 0xa6c8, 0xa6c9, 0xa6ca, 0xa6cb, 0xa6cc, 0xa6cd, 0xa6ce, 0xa6cf, - 0xa6d0, 0xa6d1, 0x003f, 0xa6d2, 0xa6d3, 0xa6d4, 0xa6d5, 0xa6d6, - 0xa6d7, 0xa6d8, 0xa6c9, 0xa6d4, 0xa6cf, 0xa6d4, 0xa6d8, 0x003f, - 0xa6c2, 0xa6c8, 0xa6b4, 0xa6b4, 0xa6b4, 0xa6d5, 0xa6d0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa6ca, 0xa6d1, 0x003f, 0x003f, 0xa6a8, 0xa6c5, 0x003f, 0x003f, - 0x003f, 0xa6b2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x0400 .. 0x04ff */ - 0xa7a6, 0xa7a7, 0x003f, 0xa7a4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa7ac, 0xa7aa, 0xa7b5, 0x003f, - 0xa7a1, 0xa7a2, 0xa7a3, 0xa7a4, 0xa7a5, 0xa7a6, 0xa7a8, 0xa7a9, - 0xa7aa, 0xa7ab, 0xa7ac, 0xa7ad, 0xa7ae, 0xa7af, 0xa7b0, 0xa7b1, - 0xa7b2, 0xa7b3, 0xa7b4, 0xa7b5, 0xa7b6, 0xa7b7, 0xa7b8, 0xa7b9, - 0xa7ba, 0xa7bb, 0xa7bc, 0xa7bd, 0xa7be, 0xa7bf, 0xa7c0, 0xa7c1, - 0xa7d1, 0xa7d2, 0xa7d3, 0xa7d4, 0xa7d5, 0xa7d6, 0xa7d8, 0xa7d9, - 0xa7da, 0xa7db, 0xa7dc, 0xa7dd, 0xa7de, 0xa7df, 0xa7e0, 0xa7e1, - 0xa7e2, 0xa7e3, 0xa7e4, 0xa7e5, 0xa7e6, 0xa7e7, 0xa7e8, 0xa7e9, - 0xa7ea, 0xa7eb, 0xa7ec, 0xa7ed, 0xa7ee, 0xa7ef, 0xa7f0, 0xa7f1, - 0xa7d6, 0xa7d7, 0x003f, 0xa7d4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa7dc, 0xa7da, 0xa7e5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa7a8, 0xa7d8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa7a1, 0xa7d1, 0xa7a1, 0xa7d1, 0x003f, 0x003f, 0xa7a6, 0xa7d6, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa7a8, 0xa7d8, 0xa7a9, 0xa7d9, - 0x003f, 0x003f, 0xa7aa, 0xa7da, 0xa7aa, 0xa7da, 0xa7b0, 0xa7e0, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa7bf, 0xa7ef, 0xa7b5, 0xa7e5, - 0xa7b5, 0xa7e5, 0xa7b5, 0xa7e5, 0xa7b9, 0xa7e9, 0x003f, 0x003f, - 0xa7bd, 0xa7ed, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x1d00 .. 0x1dff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x0041, 0x0041, 0x0042, 0x003f, - 0x0044, 0x0045, 0x003f, 0x0047, 0x0048, 0x0049, 0x004a, 0x004b, - 0x004c, 0x004d, 0x004e, 0x003f, 0x004f, 0x003f, 0x0050, 0x0052, - 0x0054, 0x0055, 0x0057, 0x0061, 0x003f, 0x003f, 0x003f, 0x0062, - 0x0064, 0x0065, 0x003f, 0x003f, 0x003f, 0x0067, 0x003f, 0x006b, - 0x006d, 0x003f, 0x006f, 0x003f, 0x003f, 0x003f, 0x0070, 0x0074, - 0x0075, 0x003f, 0x003f, 0x0076, 0x003f, 0xa6c2, 0xa6c3, 0xa6c4, - 0xa6d5, 0xa6d6, 0x0069, 0x0072, 0x0075, 0x0076, 0xa6c2, 0xa6c3, - 0xa6d1, 0xa6d5, 0xa6d6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa7df, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x0063, 0x003f, 0x0064, 0x003f, - 0x0066, 0x003f, 0x0067, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0074, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x007a, 0x003f, 0x003f, 0x003f, 0xa6c8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x1e00 .. 0x1eff */ - 0x0041, 0x0061, 0x0042, 0x0062, 0x0042, 0x0062, 0x0042, 0x0062, - 0x0043, 0x0063, 0x0044, 0x0064, 0x0044, 0x0064, 0x0044, 0x0064, - 0x0044, 0x0064, 0x0044, 0x0064, 0x0045, 0x0065, 0x0045, 0x0065, - 0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065, 0x0046, 0x0066, - 0x0047, 0x0067, 0x0048, 0x0068, 0x0048, 0x0068, 0x0048, 0x0068, - 0x0048, 0x0068, 0x0048, 0x0068, 0x0049, 0x0069, 0x0049, 0x0069, - 0x004b, 0x006b, 0x004b, 0x006b, 0x004b, 0x006b, 0x004c, 0x006c, - 0x004c, 0x006c, 0x004c, 0x006c, 0x004c, 0x006c, 0x004d, 0x006d, - 0x004d, 0x006d, 0x004d, 0x006d, 0x004e, 0x006e, 0x004e, 0x006e, - 0x004e, 0x006e, 0x004e, 0x006e, 0x004f, 0x006f, 0x004f, 0x006f, - 0x004f, 0x006f, 0x004f, 0x006f, 0x0050, 0x0070, 0x0050, 0x0070, - 0x0052, 0x0072, 0x0052, 0x0072, 0x0052, 0x0072, 0x0052, 0x0072, - 0x0053, 0x0073, 0x0053, 0x0073, 0x0053, 0x0073, 0x0053, 0x0073, - 0x0053, 0x0073, 0x0054, 0x0074, 0x0054, 0x0074, 0x0054, 0x0074, - 0x0054, 0x0074, 0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075, - 0x0055, 0x0075, 0x0055, 0x0075, 0x0056, 0x0076, 0x0056, 0x0076, - 0x0057, 0x0077, 0x0057, 0x0077, 0x0057, 0x0077, 0x0057, 0x0077, - 0x0057, 0x0077, 0x0058, 0x0078, 0x0058, 0x0078, 0x0059, 0x0079, - 0x005a, 0x007a, 0x005a, 0x007a, 0x005a, 0x007a, 0x0068, 0x0074, - 0x0077, 0x0079, 0x003f, 0x0073, 0x003f, 0x003f, 0x003f, 0x003f, - 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, - 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, - 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, 0x0041, 0x0061, - 0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065, - 0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065, 0x0045, 0x0065, - 0x0049, 0x0069, 0x0049, 0x0069, 0x004f, 0x006f, 0x004f, 0x006f, - 0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f, - 0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f, 0x004f, 0x006f, - 0x004f, 0x006f, 0x004f, 0x006f, 0x0055, 0x0075, 0x0055, 0x0075, - 0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075, 0x0055, 0x0075, - 0x0055, 0x0075, 0x0059, 0x0079, 0x0059, 0x0079, 0x0059, 0x0079, - 0x0059, 0x0079, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x1f00 .. 0x1fff */ - 0xa6c1, 0xa6c1, 0xa6c1, 0xa6c1, 0xa6c1, 0xa6c1, 0xa6c1, 0xa6c1, - 0xa6a1, 0xa6a1, 0xa6a1, 0xa6a1, 0xa6a1, 0xa6a1, 0xa6a1, 0xa6a1, - 0xa6c5, 0xa6c5, 0xa6c5, 0xa6c5, 0xa6c5, 0xa6c5, 0x003f, 0x003f, - 0xa6a5, 0xa6a5, 0xa6a5, 0xa6a5, 0xa6a5, 0xa6a5, 0x003f, 0x003f, - 0xa6c7, 0xa6c7, 0xa6c7, 0xa6c7, 0xa6c7, 0xa6c7, 0xa6c7, 0xa6c7, - 0xa6a7, 0xa6a7, 0xa6a7, 0xa6a7, 0xa6a7, 0xa6a7, 0xa6a7, 0xa6a7, - 0xa6c9, 0xa6c9, 0xa6c9, 0xa6c9, 0xa6c9, 0xa6c9, 0xa6c9, 0xa6c9, - 0xa6a9, 0xa6a9, 0xa6a9, 0xa6a9, 0xa6a9, 0xa6a9, 0xa6a9, 0xa6a9, - 0xa6cf, 0xa6cf, 0xa6cf, 0xa6cf, 0xa6cf, 0xa6cf, 0x003f, 0x003f, - 0xa6af, 0xa6af, 0xa6af, 0xa6af, 0xa6af, 0xa6af, 0x003f, 0x003f, - 0xa6d4, 0xa6d4, 0xa6d4, 0xa6d4, 0xa6d4, 0xa6d4, 0xa6d4, 0xa6d4, - 0x003f, 0xa6b4, 0x003f, 0xa6b4, 0x003f, 0xa6b4, 0x003f, 0xa6b4, - 0xa6d8, 0xa6d8, 0xa6d8, 0xa6d8, 0xa6d8, 0xa6d8, 0xa6d8, 0xa6d8, - 0xa6b8, 0xa6b8, 0xa6b8, 0xa6b8, 0xa6b8, 0xa6b8, 0xa6b8, 0xa6b8, - 0xa6c1, 0xa6c1, 0xa6c5, 0xa6c5, 0xa6c7, 0xa6c7, 0xa6c9, 0xa6c9, - 0xa6cf, 0xa6cf, 0xa6d4, 0xa6d4, 0xa6d8, 0xa6d8, 0x003f, 0x003f, - 0xa6c1, 0xa6c1, 0xa6c1, 0xa6c1, 0xa6c1, 0xa6c1, 0xa6c1, 0xa6c1, - 0xa6a1, 0xa6a1, 0xa6a1, 0xa6a1, 0xa6a1, 0xa6a1, 0xa6a1, 0xa6a1, - 0xa6c7, 0xa6c7, 0xa6c7, 0xa6c7, 0xa6c7, 0xa6c7, 0xa6c7, 0xa6c7, - 0xa6a7, 0xa6a7, 0xa6a7, 0xa6a7, 0xa6a7, 0xa6a7, 0xa6a7, 0xa6a7, - 0xa6d8, 0xa6d8, 0xa6d8, 0xa6d8, 0xa6d8, 0xa6d8, 0xa6d8, 0xa6d8, - 0xa6b8, 0xa6b8, 0xa6b8, 0xa6b8, 0xa6b8, 0xa6b8, 0xa6b8, 0xa6b8, - 0xa6c1, 0xa6c1, 0xa6c1, 0xa6c1, 0xa6c1, 0x003f, 0xa6c1, 0xa6c1, - 0xa6a1, 0xa6a1, 0xa6a1, 0xa6a1, 0xa6a1, 0x003f, 0xa6c9, 0x003f, - 0x003f, 0xa1af, 0xa6c7, 0xa6c7, 0xa6c7, 0x003f, 0xa6c7, 0xa6c7, - 0xa6a5, 0xa6a5, 0xa6a7, 0xa6a7, 0xa6a7, 0x003f, 0x003f, 0x003f, - 0xa6c9, 0xa6c9, 0xa6c9, 0xa6c9, 0x003f, 0x003f, 0xa6c9, 0xa6c9, - 0xa6a9, 0xa6a9, 0xa6a9, 0xa6a9, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa6d4, 0xa6d4, 0xa6d4, 0xa6d4, 0xa6d1, 0xa6d1, 0xa6d4, 0xa6d4, - 0xa6b4, 0xa6b4, 0xa6b4, 0xa6b4, 0xa6b1, 0xa1af, 0xa1af, 0x0060, - 0x003f, 0x003f, 0xa6d8, 0xa6d8, 0xa6d8, 0x003f, 0xa6d8, 0xa6d8, - 0xa6af, 0xa6af, 0xa6b8, 0xa6b8, 0xa6b8, 0xa1ad, 0x003f, 0x003f, - /* 0x2000 .. 0x20ff */ - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - 0x0020, 0x0020, 0x0020, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa1be, 0xa1be, 0x003f, 0xa1bd, 0xa1bd, 0xa1bd, 0xa1c2, 0x005f, - 0xa1c6, 0xa1c7, 0x002c, 0xa1c6, 0xa1c8, 0xa1c9, 0x002c, 0x003f, - 0xa2f7, 0xa2f8, 0x003f, 0x003f, 0x002e, 0xa1c5, 0xa1c4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0020, - 0xa2f3, 0x003f, 0xa1ec, 0xa1ed, 0x003f, 0xa1c6, 0x003f, 0x003f, - 0x003f, 0xa1d2, 0xa1d3, 0xa2a8, 0x0021, 0x003f, 0x007e, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x002f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0020, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa1eb, 0x0069, 0x003f, 0x003f, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x002b, 0xa1dd, 0x003d, 0x0028, 0x0029, 0x006e, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x002b, 0xa1dd, 0x003d, 0x0028, 0x0029, 0x003f, - 0x0061, 0x0065, 0x006f, 0x0078, 0x003f, 0x0068, 0x006b, 0x006c, - 0x006d, 0x006e, 0x0070, 0x0073, 0x0074, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa1f1, 0x003f, 0x003f, 0xa1f2, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2100 .. 0x21ff */ - 0x003f, 0x003f, 0x0043, 0xa1ee, 0x003f, 0x003f, 0x003f, 0x0045, - 0x003f, 0x003f, 0x0067, 0x0048, 0x0048, 0x0048, 0x0068, 0x0068, - 0x0049, 0x0049, 0x004c, 0x006c, 0x003f, 0x004e, 0x003f, 0x003f, - 0x0050, 0x0050, 0x0051, 0x0052, 0x0052, 0x0052, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x005a, 0x003f, 0xa6b8, 0x003f, - 0x005a, 0x003f, 0x004b, 0xa2f2, 0x0042, 0x0043, 0x0065, 0x0065, - 0x0045, 0x0046, 0x003f, 0x004d, 0x006f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x0069, 0x003f, 0x003f, 0xa6d0, 0xa6c3, 0xa6a3, 0xa6b0, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0044, 0x0064, 0x0065, - 0x0069, 0x006a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x0049, 0x003f, 0x003f, 0x003f, 0x0056, 0x003f, 0x003f, 0x003f, - 0x003f, 0x0058, 0x003f, 0x003f, 0x004c, 0x0043, 0x0044, 0x004d, - 0x0069, 0x003f, 0x003f, 0x003f, 0x0076, 0x003f, 0x003f, 0x003f, - 0x003f, 0x0078, 0x003f, 0x003f, 0x006c, 0x0063, 0x0064, 0x006d, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa2ab, 0xa2ac, 0xa2aa, 0xa2ad, 0x002d, 0x007c, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa2ab, 0xa2aa, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x002d, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa2ce, 0xa2cd, - 0x003f, 0x003f, 0xa2cd, 0x003f, 0xa2ce, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2200 .. 0x22ff */ - 0xa2cf, 0x003f, 0xa2df, 0xa2d0, 0xa2d0, 0x004f, 0x003f, 0xa2e0, - 0xa2ba, 0xa2ba, 0x003f, 0xa2bb, 0xa2bb, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa1dd, 0xa1de, 0x003f, 0x002f, 0x005c, 0x002a, - 0xa1eb, 0x003f, 0xa2e5, 0x003f, 0x003f, 0xa2e7, 0xa1e7, 0x004c, - 0xa2dc, 0x003f, 0x003f, 0x007c, 0x007c, 0x003f, 0x003f, 0xa2ca, - 0xa2cb, 0xa2c1, 0xa2c0, 0xa2e9, 0xa2ea, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa1e8, 0xa2e8, 0x003a, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x007e, 0xa2e6, 0x003f, 0x003f, - 0x003f, 0x007e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x007e, 0x007e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa2e2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa1e2, 0xa2e1, 0xa2e1, 0xa2e1, 0x003f, 0x003f, 0xa1e5, 0xa1e6, - 0x003f, 0x003f, 0xa2e3, 0xa2e4, 0x003f, 0x003f, 0x003c, 0x003e, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa2be, 0xa2bf, 0xa2be, 0xa2bf, 0xa2bc, 0xa2bd, - 0xa2bc, 0xa2bd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa2dd, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2300 .. 0x23ff */ - 0x003f, 0x003f, 0x003f, 0x005e, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa2de, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa1d2, 0xa1d3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2400 .. 0x24ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, - 0x0039, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x0041, 0x0042, - 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004a, - 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, 0x0050, 0x0051, 0x0052, - 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, - 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, - 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, 0x0070, - 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, - 0x0079, 0x007a, 0x0030, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2500 .. 0x25ff */ - 0xa8a1, 0xa8ac, 0xa8a2, 0xa8ad, 0x002d, 0x002d, 0x007c, 0x007c, - 0x002d, 0x002d, 0x007c, 0x007c, 0xa8a3, 0xa8a3, 0xa8a3, 0xa8ae, - 0xa8a4, 0xa8a4, 0xa8a4, 0xa8af, 0xa8a6, 0xa8a6, 0xa8a6, 0xa8b1, - 0xa8a5, 0xa8a5, 0xa8a5, 0xa8b0, 0xa8a7, 0xa8bc, 0xa8a7, 0xa8a7, - 0xa8b7, 0xa8a7, 0xa8a7, 0xa8b2, 0xa8a9, 0xa8be, 0xa8a9, 0xa8a9, - 0xa8b9, 0xa8a9, 0xa8a9, 0xa8b4, 0xa8a8, 0xa8a8, 0xa8a8, 0xa8b8, - 0xa8bd, 0xa8a8, 0xa8a8, 0xa8b3, 0xa8aa, 0xa8aa, 0xa8aa, 0xa8ba, - 0xa8bf, 0xa8aa, 0xa8aa, 0xa8b5, 0xa8ab, 0xa8ab, 0xa8ab, 0xa8bb, - 0xa8ab, 0xa8ab, 0xa8c0, 0xa8ab, 0xa8ab, 0xa8ab, 0xa8ab, 0xa8ab, - 0xa8ab, 0xa8ab, 0xa8ab, 0xa8b6, 0x002d, 0x002d, 0x007c, 0x007c, - 0x003d, 0x007c, 0x002b, 0x002b, 0x002b, 0xa2cc, 0xa2cc, 0xa2cc, - 0x004c, 0x004c, 0x004c, 0x002b, 0x002b, 0x002b, 0x002b, 0x002b, - 0x002b, 0x002b, 0x002b, 0x002b, 0x0054, 0x0054, 0x0054, 0x002b, - 0x002b, 0x002b, 0x002b, 0x002b, 0x002b, 0x003f, 0x003f, 0x003f, - 0x003f, 0x002f, 0x005c, 0x0058, 0x002d, 0x007c, 0x002d, 0x007c, - 0x002d, 0x007c, 0x002d, 0x007c, 0x002d, 0x007c, 0x002d, 0x007c, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa2a3, 0xa2a2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa2a5, 0xa2a4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa2a7, 0xa2a6, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa2a1, 0xa1fe, - 0x003f, 0x003f, 0x003f, 0xa1fb, 0x003f, 0x003f, 0xa1fd, 0xa1fc, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa2fe, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2600 .. 0x26ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1fa, 0xa1f9, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa1ea, 0x003f, 0xa1e9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa2f6, 0x003f, 0x003f, 0xa2f5, 0x003f, 0xa2f4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2c00 .. 0x2cff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x006a, 0x0056, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2e00 .. 0x2eff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcaec, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2f00 .. 0x2fff */ - 0xb0ec, 0x003f, 0xd0a6, 0xd0a8, 0xb2b5, 0xd0ad, 0xc6f3, 0xd0b5, - 0xbfcd, 0xd1b9, 0xc6fe, 0xc8ac, 0xd1c4, 0xd1cc, 0xd1d2, 0xd1dc, - 0xd1e1, 0xc5e1, 0xcecf, 0xd2b1, 0xd2b8, 0xd2b9, 0xd2be, 0xbdbd, - 0xcbce, 0xd2c7, 0xd2cc, 0xd2d3, 0xcbf4, 0xb8fd, 0xd3f8, 0xc5da, - 0xbbce, 0xd4e9, 0xd4ea, 0xcdbc, 0xc2e7, 0xbdf7, 0xbbd2, 0xd5df, - 0xc0a3, 0xbeae, 0xd5f7, 0xd5f9, 0xd6a5, 0xbbb3, 0xd6df, 0xb9a9, - 0xb8ca, 0xb6d2, 0xb4b3, 0xd6f6, 0xd6f8, 0xd7ae, 0xd7b0, 0xd7b5, - 0xb5dd, 0x003f, 0xd7c4, 0xd7c6, 0xbfb4, 0xd8f9, 0x003f, 0xbcea, - 0xbbd9, 0xdabd, 0xcab8, 0xc5cd, 0xb6d4, 0xcafd, 0xdadb, 0xc6fc, - 0xdba9, 0xb7ee, 0xccda, 0xb7e7, 0xbbdf, 0xddc6, 0xddd5, 0xddd9, - 0xc8e6, 0xccd3, 0xbbe1, 0xdde3, 0xbfe5, 0xb2d0, 0xc4de, 0xc9e3, - 0xe0ab, 0xe0ad, 0xcad2, 0xb2e7, 0xb5ed, 0xb8a4, 0xb8bc, 0xb6cc, - 0xb1bb, 0xb4a4, 0xb4c5, 0xc0b8, 0xcdd1, 0xc5c4, 0xc9a5, 0x003f, - 0xe2a2, 0xc7f2, 0xc8e9, 0xbbae, 0xccdc, 0xccb7, 0xccf0, 0xc0d0, - 0xbca8, 0x003f, 0xb2d3, 0xb7ea, 0xcea9, 0xc3dd, 0xcac6, 0xbbe5, - 0xb4cc, 0xe6a6, 0xcdd3, 0xb1a9, 0xcfb7, 0xbca9, 0xe6d0, 0xbcaa, - 0xe6e6, 0xc6f9, 0xbfc3, 0xbcab, 0xbbea, 0xb1b1, 0xc0e5, 0xc1a4, - 0xbdae, 0xbab1, 0xbfa7, 0xe7e7, 0xe9c8, 0xc3ee, 0xb7ec, 0xb9d4, - 0xb0e1, 0xeba8, 0xb8ab, 0xb3d1, 0xb8c0, 0xc3ab, 0xc6a6, 0xecb5, - 0xecb8, 0xb3ad, 0xc0d6, 0xc1f6, 0xc2ad, 0xbfc8, 0xbcd6, 0xbfc9, - 0xc3a4, 0x003f, 0xcdb8, 0xc6d3, 0xc8d0, 0xcea4, 0xb6e2, 0xc4b9, - 0xcce7, 0xc9ec, 0xf0b0, 0xf0b2, 0xb1ab, 0x003f, 0xc8f3, 0xcccc, - 0xb3d7, 0xf0ea, 0xf0ec, 0xb2bb, 0xcac7, 0xc9f7, 0xc8f4, 0xbfa9, - 0xbcf3, 0xb9e1, 0xc7cf, 0xb9fc, 0xb9e2, 0xf1f5, 0xf2a8, 0xf2ae, - 0xf2af, 0xb5b4, 0xb5fb, 0xc4bb, 0xf3c3, 0xbcaf, 0xf3ce, 0xcbe3, - 0x003f, 0xb5d0, 0x003f, 0xf3e3, 0xf3e6, 0xc5a4, 0xb8dd, 0xc1cd, - 0xc9a1, 0xf3ee, 0xf3ef, 0xceb6, 0xf3fd, 0xf3fe, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x3000 .. 0x30ff */ - 0xa1a1, 0xa1a2, 0xa1a3, 0xa1b7, 0x003f, 0xa1b9, 0xa1ba, 0xa1bb, - 0xa1d2, 0xa1d3, 0xa1d4, 0xa1d5, 0xa1d6, 0xa1d7, 0xa1d8, 0xa1d9, - 0xa1da, 0xa1db, 0xa2a9, 0xa2ae, 0xa1cc, 0xa1cd, 0x003f, 0x003f, - 0x003f, 0x003f, 0x005b, 0x005d, 0xa1c1, 0xa1c8, 0xa1c9, 0x002c, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa2a9, 0x003f, - 0xbdbd, 0x003f, 0xd2c1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa4a1, 0xa4a2, 0xa4a3, 0xa4a4, 0xa4a5, 0xa4a6, 0xa4a7, - 0xa4a8, 0xa4a9, 0xa4aa, 0xa4ab, 0xa4ac, 0xa4ad, 0xa4ae, 0xa4af, - 0xa4b0, 0xa4b1, 0xa4b2, 0xa4b3, 0xa4b4, 0xa4b5, 0xa4b6, 0xa4b7, - 0xa4b8, 0xa4b9, 0xa4ba, 0xa4bb, 0xa4bc, 0xa4bd, 0xa4be, 0xa4bf, - 0xa4c0, 0xa4c1, 0xa4c2, 0xa4c3, 0xa4c4, 0xa4c5, 0xa4c6, 0xa4c7, - 0xa4c8, 0xa4c9, 0xa4ca, 0xa4cb, 0xa4cc, 0xa4cd, 0xa4ce, 0xa4cf, - 0xa4d0, 0xa4d1, 0xa4d2, 0xa4d3, 0xa4d4, 0xa4d5, 0xa4d6, 0xa4d7, - 0xa4d8, 0xa4d9, 0xa4da, 0xa4db, 0xa4dc, 0xa4dd, 0xa4de, 0xa4df, - 0xa4e0, 0xa4e1, 0xa4e2, 0xa4e3, 0xa4e4, 0xa4e5, 0xa4e6, 0xa4e7, - 0xa4e8, 0xa4e9, 0xa4ea, 0xa4eb, 0xa4ec, 0xa4ed, 0xa4ee, 0xa4ef, - 0xa4f0, 0xa4f1, 0xa4f2, 0xa4f3, 0xa4a6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xa1ab, 0xa1ac, 0xa1b5, 0xa1b6, 0x003f, - 0x003f, 0xa5a1, 0xa5a2, 0xa5a3, 0xa5a4, 0xa5a5, 0xa5a6, 0xa5a7, - 0xa5a8, 0xa5a9, 0xa5aa, 0xa5ab, 0xa5ac, 0xa5ad, 0xa5ae, 0xa5af, - 0xa5b0, 0xa5b1, 0xa5b2, 0xa5b3, 0xa5b4, 0xa5b5, 0xa5b6, 0xa5b7, - 0xa5b8, 0xa5b9, 0xa5ba, 0xa5bb, 0xa5bc, 0xa5bd, 0xa5be, 0xa5bf, - 0xa5c0, 0xa5c1, 0xa5c2, 0xa5c3, 0xa5c4, 0xa5c5, 0xa5c6, 0xa5c7, - 0xa5c8, 0xa5c9, 0xa5ca, 0xa5cb, 0xa5cc, 0xa5cd, 0xa5ce, 0xa5cf, - 0xa5d0, 0xa5d1, 0xa5d2, 0xa5d3, 0xa5d4, 0xa5d5, 0xa5d6, 0xa5d7, - 0xa5d8, 0xa5d9, 0xa5da, 0xa5db, 0xa5dc, 0xa5dd, 0xa5de, 0xa5df, - 0xa5e0, 0xa5e1, 0xa5e2, 0xa5e3, 0xa5e4, 0xa5e5, 0xa5e6, 0xa5e7, - 0xa5e8, 0xa5e9, 0xa5ea, 0xa5eb, 0xa5ec, 0xa5ed, 0xa5ee, 0xa5ef, - 0xa5f0, 0xa5f1, 0xa5f2, 0xa5f3, 0xa5f4, 0xa5f5, 0xa5f6, 0xa5ef, - 0xa5f0, 0xa5f1, 0xa5f2, 0xa1a6, 0xa1bc, 0xa1b3, 0xa1b4, 0x003f, - /* 0x3100 .. 0x31ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb0ec, 0xc6f3, 0xbbb0, 0xbbcd, 0xbee5, 0xc3e6, - 0xb2bc, 0xb9c3, 0xb2b5, 0xcaba, 0xc3fa, 0xc5b7, 0xc3cf, 0xbfcd, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x3200 .. 0x32ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcce4, 0xcdc4, 0xcab8, 0xe4b7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb0ec, 0xc6f3, 0xbbb0, 0xbbcd, 0xb8de, 0xcfbb, 0xbcb7, 0xc8ac, - 0xb6e5, 0xbdbd, 0xb7ee, 0xb2d0, 0xbfe5, 0xccda, 0xb6e2, 0xc5da, - 0xc6fc, 0xb3f4, 0xcdad, 0xbcd2, 0xccbe, 0xc6c3, 0xbae2, 0xbdcb, - 0xcfab, 0xc8eb, 0xc3cb, 0xbdf7, 0xc5ac, 0xcda5, 0xb0f5, 0xc3ed, - 0xb9e0, 0xb5d9, 0xbccc, 0xc0b5, 0xbee5, 0xc3e6, 0xb2bc, 0xbab8, - 0xb1a6, 0xb0e5, 0xbda1, 0xb3d8, 0xb4c6, 0xb4eb, 0xbbf1, 0xb6a8, - 0xcceb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa5a2, 0xa5a4, 0xa5a6, 0xa5a8, 0xa5aa, 0xa5ab, 0xa5ad, 0xa5af, - 0xa5b1, 0xa5b3, 0xa5b5, 0xa5b7, 0xa5b9, 0xa5bb, 0xa5bd, 0xa5bf, - 0xa5c1, 0xa5c4, 0xa5c6, 0xa5c8, 0xa5ca, 0xa5cb, 0xa5cc, 0xa5cd, - 0xa5ce, 0xa5cf, 0xa5d2, 0xa5d5, 0xa5d8, 0xa5db, 0xa5de, 0xa5df, - 0xa5e0, 0xa5e1, 0xa5e2, 0xa5e4, 0xa5e6, 0xa5e8, 0xa5e9, 0xa5ea, - 0xa5eb, 0xa5ec, 0xa5ed, 0xa5ef, 0xa5f0, 0xa5f1, 0xa5f2, 0x003f, - /* 0x4e00 .. 0x4eff */ - 0xb0ec, 0xc3fa, 0x003f, 0xbcb7, 0x003f, 0x003f, 0x003f, 0xcbfc, - 0xbee6, 0xbbb0, 0xbee5, 0xb2bc, 0x003f, 0xc9d4, 0xcdbf, 0x003f, - 0xd0a2, 0xb1af, 0x003f, 0x003f, 0xb3ee, 0xd0a3, 0xc0a4, 0xd2c2, - 0xb5d6, 0xcaba, 0x003f, 0x003f, 0x003f, 0x003f, 0xbee7, 0x003f, - 0x003f, 0xcebe, 0x003f, 0x003f, 0x003f, 0x003f, 0xcac2, 0x003f, - 0x003f, 0x003f, 0xd0a4, 0x003f, 0x003f, 0xc3e6, 0x003f, 0x003f, - 0x003f, 0xd0a5, 0xb6fa, 0x003f, 0x003f, 0x003f, 0xd0a6, 0x003f, - 0xb4dd, 0xc3b0, 0x003f, 0xbce7, 0xd0a7, 0x003f, 0x003f, 0xd0a8, - 0x003f, 0x003f, 0xd0a9, 0xc7b5, 0x003f, 0xb5d7, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xc7b7, 0x003f, 0xc6e3, 0xb8c3, 0xcbb3, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9c9, 0xd0aa, 0xbee8, - 0xd0ab, 0xb2b5, 0x003f, 0x003f, 0x003f, 0xb6e5, 0xb8f0, 0xcce9, - 0x003f, 0x003f, 0xd6a6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcdf0, 0x003f, 0xc6fd, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb4a5, 0x003f, - 0xb5b5, 0x003f, 0xd0ac, 0x003f, 0x003f, 0xd0ad, 0xcebb, 0x003f, - 0xcdbd, 0xc1e8, 0xd0af, 0xbbf6, 0xc6f3, 0x003f, 0xd0b2, 0x003f, - 0x003f, 0xb1be, 0xb8df, 0x003f, 0xb8de, 0xb0e6, 0x003f, 0x003f, - 0xcfcb, 0xcfca, 0x003f, 0xbab3, 0xb0a1, 0x003f, 0xd0b3, 0xd0b4, - 0xd0b5, 0xcbb4, 0xd0b6, 0x003f, 0xb8f2, 0xb0e7, 0xcbf2, 0x003f, - 0xb5fc, 0x003f, 0x003f, 0xb5fd, 0xb5fe, 0xc4e2, 0xcebc, 0x003f, - 0xd0b7, 0x003f, 0x003f, 0xd0b8, 0x003f, 0x003f, 0xd0b9, 0x003f, - 0x003f, 0x003f, 0xbfcd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xbdba, 0xbfce, 0xd0be, 0x003f, 0xd0bc, 0x003f, 0xd0bd, 0xb5d8, - 0x003f, 0x003f, 0xbaa3, 0xb2f0, 0x003f, 0xd0bb, 0xd0ba, 0xcaa9, - 0x003f, 0x003f, 0x003f, 0x003f, 0xbbc6, 0xbbc5, 0xc2be, 0xd0bf, - 0xc9d5, 0xc0e7, 0x003f, 0x003f, 0x003f, 0xa1b8, 0xd0c0, 0xd0c2, - 0x003f, 0x003f, 0x003f, 0xc2e5, 0xcee1, 0xb0ca, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd0c1, 0xb2be, 0x003f, - 0xb6c4, 0x003f, 0xc3e7, 0x003f, 0x003f, 0x003f, 0xb7ef, 0xd0c3, - 0x003f, 0x003f, 0x003f, 0xc7a4, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x4f00 .. 0x4fff */ - 0x003f, 0xb4eb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd0c4, 0xb0cb, 0x003f, 0x003f, 0xb8e0, 0xb4ec, 0xc9fa, - 0xc8b2, 0xb5d9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb2f1, 0x003f, 0xd0e7, 0xc5c1, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc7ec, - 0xd0c6, 0x003f, 0x003f, 0x003f, 0xc8bc, 0x003f, 0xcee2, 0x003f, - 0xbfad, 0x003f, 0xbbc7, 0x003f, 0xbbf7, 0xb2c0, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xc4d1, 0x003f, 0x003f, 0xc3a2, 0xd0ca, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb0cc, 0xc4e3, 0xbdbb, - 0xbab4, 0xcda4, 0x003f, 0xc2ce, 0x003f, 0xb2bf, 0x003f, 0xd0c9, - 0x003f, 0xcdbe, 0xd0c5, 0xd0c7, 0xbaee, 0xd0c8, 0xd5a4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd0d0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd0d3, - 0xd0d1, 0x003f, 0x003f, 0xb2c2, 0x003f, 0xcabb, 0xd0cb, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd0cf, 0xb8f3, 0x003f, 0x003f, 0xbbc8, - 0x003f, 0x003f, 0x003f, 0xb4a6, 0x003f, 0x003f, 0xd0d4, 0x003f, - 0xd0cc, 0x003f, 0x003f, 0xcee3, 0x003f, 0xbbf8, 0x003f, 0xd0cd, - 0x003f, 0xd0d2, 0x003f, 0x003f, 0x003f, 0x003f, 0xd0d5, 0x003f, - 0xd0ce, 0x003f, 0x003f, 0xb6a1, 0x003f, 0xb0cd, 0x003f, 0x003f, - 0xb6a2, 0xb2c1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd5a5, 0x003f, 0xcbf9, 0xc9ee, 0xb8f4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xbfaf, 0xceb7, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcad8, - 0x003f, 0x003f, 0xb7b8, 0xc2a5, 0xb2e4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xbdd3, 0x003f, 0x003f, 0x003f, 0xd0d9, 0x003f, - 0xd0de, 0xd0dc, 0x003f, 0x003f, 0xd0d7, 0x003f, 0x003f, 0xc2af, - 0xd0da, 0x003f, 0xd0dd, 0xd0db, 0x003f, 0xcadd, 0x003f, 0xd0d8, - 0x003f, 0xbfae, 0x003f, 0xcbf3, 0xd0df, 0xd0e0, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xbda4, 0xd0ed, - 0x003f, 0x003f, 0x003f, 0xc7d0, 0x003f, 0xc9b6, 0xd0e8, 0x003f, - 0xcaf0, 0x003f, 0xb2b6, 0x003f, 0x003f, 0x003f, 0xd0ec, 0x003f, - /* 0x5000 .. 0x50ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd0e6, 0xd0ef, 0x003f, - 0x003f, 0xc1d2, 0x003f, 0xb8c4, 0x003f, 0xc7dc, 0x003f, 0xe0c7, - 0x003f, 0xd0ee, 0xc5dd, 0x003f, 0xd0e3, 0x003f, 0xb8f6, 0x003f, - 0x003f, 0xb8f5, 0xd0e1, 0x003f, 0x003f, 0x003f, 0x003f, 0xbcda, - 0x003f, 0xd0e9, 0x003f, 0xcaef, 0xc3cd, 0xd0e5, 0xb7f1, 0x003f, - 0xd0e2, 0xd0ea, 0xd0e4, 0xced1, 0xd0eb, 0xcfc1, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb6e6, 0x003f, - 0x003f, 0xb7f0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd0f0, 0x003f, 0x003f, 0x003f, 0xd0f1, - 0xd0f5, 0xb0ce, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcad0, - 0xd0f4, 0x003f, 0x003f, 0x003f, 0x003f, 0xd0f3, 0xd0f7, 0x003f, - 0x003f, 0x003f, 0xd0f6, 0x003f, 0xc4e4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb7f2, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd0f8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xbcc5, 0x003f, 0xc2a6, 0xc4e5, 0xb6f6, 0x003f, - 0xd0f9, 0x003f, 0x003f, 0x003f, 0x003f, 0xb5b6, 0x003f, 0x003f, - 0xd0fa, 0x003f, 0x003f, 0x003f, 0x003f, 0xd0fc, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcbb5, 0x003f, 0x003f, - 0x003f, 0xb7e6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xbbb1, 0xc8f7, 0xd0fb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xbac5, 0xcdc3, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd0fe, 0xd1a3, 0xd0fd, 0xbac4, 0x003f, 0xbdfd, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb7b9, 0x003f, - 0x003f, 0x003f, 0xd1a4, 0x003f, 0x003f, 0xb6cf, 0x003f, 0x003f, - 0x003f, 0xd1a1, 0xd1a2, 0x003f, 0x003f, 0xc6af, 0x003f, 0xc1fc, - 0x003f, 0xb6a3, 0x003f, 0x003f, 0x003f, 0xcbcd, 0xd1a5, 0x003f, - 0x003f, 0x003f, 0xcebd, 0x003f, 0x003f, 0x003f, 0xd1a6, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd1a9, 0x003f, 0xd1a7, 0x003f, 0xc1ce, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd1a8, 0xd1aa, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd1ac, 0x003f, 0x003f, - 0x003f, 0xd1ab, 0x003f, 0xcac8, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x5100 .. 0x51ff */ - 0xb5b7, 0xd1ae, 0xd1af, 0x003f, 0xb2af, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd1ad, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xbcf4, 0x003f, 0xd1b2, 0xd1b1, 0xd1b0, 0x003f, - 0xd0d6, 0x003f, 0xd1b3, 0x003f, 0x003f, 0x003f, 0x003f, 0xbdfe, - 0x003f, 0xd1b4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcda5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xccd9, 0x003f, 0x003f, 0x003f, 0x003f, 0xd1b6, - 0x003f, 0x003f, 0xd1b5, 0xd1b8, 0xd1b7, 0x003f, 0x003f, 0xd1b9, - 0xd1ba, 0xb0f4, 0x003f, 0xb8b5, 0xb7bb, 0xbdbc, 0xc3fb, 0xb6a4, - 0xc0e8, 0xb8f7, 0x003f, 0xb9ee, 0xd1bc, 0xccc8, 0xc5c6, 0x003f, - 0xbbf9, 0x003f, 0xd1bb, 0x003f, 0xd1bd, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc5de, 0x003f, 0xb3f5, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd1be, 0x003f, 0x003f, 0xc6fe, 0x003f, 0x003f, - 0xc1b4, 0xd1c0, 0xd1c1, 0xc8ac, 0xb8f8, 0xcfbb, 0xd1c2, 0x003f, - 0x003f, 0xb6a6, 0x003f, 0x003f, 0x003f, 0xcabc, 0xc2b6, 0xb6f1, - 0xc5b5, 0x003f, 0x003f, 0x003f, 0xb7f3, 0x003f, 0x003f, 0x003f, - 0xd1c3, 0x003f, 0xd1c4, 0x003f, 0x003f, 0xc6e2, 0xb1df, 0x003f, - 0x003f, 0xd1c7, 0xbafd, 0x003f, 0xd1c6, 0xbac6, 0x003f, 0xd1c8, - 0xe6ee, 0xd1c9, 0xcbc1, 0xd1ca, 0x003f, 0xd1cb, 0xd1cc, 0xbee9, - 0x003f, 0xbccc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb4a7, 0x003f, 0xd1cf, 0x003f, 0xd1cd, 0xccbd, 0xd1ce, 0x003f, - 0xc9da, 0xd1d0, 0xd1d1, 0xd1d2, 0xc5df, 0x003f, 0x003f, 0x003f, - 0xd1d6, 0xd1d4, 0xd1d5, 0xd1d3, 0xbae3, 0xd1d7, 0xccea, 0xcee4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd1d8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xc0a8, 0xd1d9, 0xbdda, 0x003f, - 0x003f, 0xd1da, 0x003f, 0xc3fc, 0xcebf, 0xc5e0, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd2c5, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd1db, 0xf4a5, 0xb6c5, 0x003f, 0x003f, - 0xd1dc, 0xcbde, 0x003f, 0x003f, 0x003f, 0x003f, 0xbde8, 0xc2fc, - 0x003f, 0xd1de, 0xc6e4, 0x003f, 0x003f, 0xd1df, 0x003f, 0x003f, - 0xd1e0, 0xb3ae, 0x003f, 0x003f, 0x003f, 0xd1e1, 0xb6a7, 0x003f, - 0xc6cc, 0xb1fa, 0xbdd0, 0x003f, 0x003f, 0xc8a1, 0xd1e2, 0x003f, - /* 0x5200 .. 0x52ff */ - 0xc5e1, 0x003f, 0x003f, 0xbfcf, 0xd1e3, 0x003f, 0xcaac, 0xc0da, - 0xb4a2, 0x003f, 0xb4a9, 0xd1e4, 0x003f, 0x003f, 0xd1e6, 0x003f, - 0x003f, 0xb7ba, 0x003f, 0x003f, 0xd1e5, 0x003f, 0x003f, 0xcef3, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xbde9, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xc8bd, 0xcacc, 0x003f, 0xd1e7, - 0x003f, 0xcdf8, 0xd1e8, 0x003f, 0x003f, 0x003f, 0xd1e9, 0x003f, - 0xc5fe, 0x003f, 0x003f, 0xd1ea, 0x003f, 0x003f, 0xc0a9, 0xbafe, - 0xb7f4, 0xd1eb, 0xbbc9, 0xb9ef, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xc4e6, 0xd1ed, 0x003f, 0x003f, 0xc2a7, - 0x003f, 0x003f, 0xbaef, 0xd1ee, 0xd1ef, 0xc1b0, 0x003f, 0xd1ec, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd1f1, 0x003f, 0xcbb6, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb9e4, 0x003f, 0x003f, 0xd1f0, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb7f5, 0xbade, 0xc7ed, 0x003f, 0x003f, - 0x003f, 0xd1f4, 0xd1f2, 0x003f, 0x003f, 0x003f, 0x003f, 0xc9fb, - 0xbeea, 0xd1fb, 0xb3e4, 0xd1f5, 0xd1f3, 0xc1cf, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd1f7, 0x003f, 0xd1f6, - 0x003f, 0x003f, 0x003f, 0xb3c4, 0x003f, 0x003f, 0x003f, 0xb7e0, - 0xd1fc, 0xcead, 0x003f, 0x003f, 0x003f, 0xd1f8, 0x003f, 0x003f, - 0x003f, 0xd1fd, 0xd1fa, 0x003f, 0xd1f9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcecf, 0x003f, 0x003f, 0x003f, 0xb8f9, - 0xb2c3, 0x003f, 0x003f, 0xcef4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbdf5, 0xc5d8, 0xb9e5, 0xd2a2, 0xd2a3, 0x003f, 0x003f, - 0x003f, 0xcee5, 0x003f, 0x003f, 0xcfab, 0xd2a5, 0x003f, 0x003f, - 0x003f, 0xb8fa, 0x003f, 0x003f, 0xd2a4, 0x003f, 0xb3af, 0x003f, - 0x003f, 0xd2a6, 0x003f, 0xcbd6, 0x003f, 0xc4bc, 0x003f, 0xcda6, - 0x003f, 0xcad9, 0x003f, 0x003f, 0x003f, 0xd2a7, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf0d5, 0x003f, 0x003f, 0xc6b0, 0x003f, 0xd2a8, - 0xb4aa, 0xccb3, 0x003f, 0x003f, 0x003f, 0xbea1, 0xd2a9, 0xcae7, - 0xd2ad, 0x003f, 0xc0aa, 0xd2aa, 0xb6d0, 0x003f, 0xd2ab, 0xb4ab, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb7ae, 0xd2ae, 0x003f, 0xd2af, 0x003f, 0x003f, - 0xd2b0, 0xd2b1, 0xbcdb, 0x003f, 0x003f, 0x003f, 0xb8fb, 0xccde, - /* 0x5300 .. 0x53ff */ - 0x003f, 0xcce8, 0xc6f7, 0x003f, 0x003f, 0xcaf1, 0xd2b2, 0x003f, - 0xd2b3, 0x003f, 0x003f, 0x003f, 0x003f, 0xd2b5, 0x003f, 0xd2b7, - 0xd2b6, 0x003f, 0x003f, 0x003f, 0x003f, 0xd2b8, 0xb2bd, 0xcbcc, - 0x003f, 0xbafc, 0xd2b9, 0x003f, 0x003f, 0xc1d9, 0x003f, 0x003f, - 0xbea2, 0xb6a9, 0x003f, 0xd2ba, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc8db, 0x003f, 0x003f, 0x003f, 0x003f, 0xd2bb, - 0x003f, 0xd2bc, 0x003f, 0xd2bd, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd2be, 0xc9a4, 0xb6e8, 0xb0e5, 0x003f, 0x003f, 0x003f, 0xc6bf, - 0xd2bf, 0xbdbd, 0x003f, 0xc0e9, 0x003f, 0xd2c1, 0xd2c0, 0xbea3, - 0xb8e1, 0xd2c3, 0xc8be, 0x003f, 0x003f, 0xd2c4, 0x003f, 0x003f, - 0x003f, 0xc8dc, 0xc2b4, 0xc2ee, 0xb6a8, 0x003f, 0x003f, 0xc6ee, - 0xc3b1, 0x003f, 0xc7ee, 0x003f, 0xcbce, 0x003f, 0xd2c6, 0x003f, - 0xc0ea, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb7b5, 0x003f, - 0x003f, 0xd2c7, 0x003f, 0x003f, 0x003f, 0x003f, 0xd2c8, 0xb1ac, - 0xb0f5, 0xb4ed, 0x003f, 0xc2a8, 0xb5d1, 0xcdf1, 0x003f, 0xd2cb, - 0xb2b7, 0x003f, 0x003f, 0xd2ca, 0x003f, 0x003f, 0x003f, 0xb6aa, - 0x003f, 0x003f, 0xd2cc, 0x003f, 0xccf1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd2cd, 0x003f, - 0xced2, 0x003f, 0xb8fc, 0x003f, 0x003f, 0x003f, 0x003f, 0xb8b6, - 0xd2ce, 0x003f, 0x003f, 0x003f, 0x003f, 0xd2d0, 0xd2cf, 0x003f, - 0xbfdf, 0xb1b9, 0x003f, 0x003f, 0x003f, 0xb1de, 0xd2d1, 0x003f, - 0xd2d2, 0x003f, 0x003f, 0xb8b7, 0x003f, 0x003f, 0xd2d3, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb5ee, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xbbb2, 0xd2d4, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcbf4, 0xbab5, 0xb5da, 0xcda7, 0xc1d0, 0xc8bf, 0xbcfd, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xbdc7, 0x003f, 0xbce8, 0xbcf5, - 0x003f, 0xbdf6, 0x003f, 0xc8c0, 0x003f, 0x003f, 0x003f, 0xd2d7, - 0x003f, 0xb1c3, 0xc1d1, 0xb8fd, 0xb8c5, 0xb6e7, 0x003f, 0x003f, - 0xd2db, 0xc3a1, 0xc2fe, 0xb6ab, 0xbea4, 0xd2dc, 0xd2da, 0xb2c4, - 0xc2e6, 0xbcb8, 0xbbcb, 0xb1a6, 0x003f, 0x003f, 0xb3f0, 0xb9e6, - 0xbbca, 0x003f, 0xd2dd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x5400 .. 0x54ff */ - 0x003f, 0xd2de, 0x003f, 0xb5c9, 0xb3c6, 0x003f, 0x003f, 0x003f, - 0xb9e7, 0xb5c8, 0xc4df, 0xb1a5, 0xc6b1, 0xccbe, 0xb9a1, 0xcdf9, - 0xc5c7, 0xb8fe, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb7af, 0x003f, 0xd2e7, 0x003f, 0xb6e3, - 0xcbca, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc8dd, 0x003f, - 0x003f, 0xd2e6, 0x003f, 0xb4de, 0xd2e1, 0xd2e2, 0xd2e4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd2e5, 0x003f, - 0xb5db, 0xbfe1, 0x003f, 0xcaad, 0xd2e3, 0xd2df, 0xb8e3, 0x003f, - 0xd2e0, 0x003f, 0xcfa4, 0x003f, 0x003f, 0x003f, 0xcaf2, 0x003f, - 0xc4e8, 0xb8e2, 0xb9f0, 0x003f, 0x003f, 0x003f, 0xd2e8, 0x003f, - 0x003f, 0xc6dd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd2ec, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xbcfe, 0x003f, 0xbcf6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd2ef, 0xd2ed, 0x003f, 0xcca3, 0x003f, 0xd2ea, 0xd2f3, 0xd2ee, - 0x003f, 0x003f, 0x003f, 0xd2f1, 0xb8c6, 0xccbf, 0x003f, 0x003f, - 0xd2f2, 0x003f, 0x003f, 0x003f, 0xd2f4, 0x003f, 0xd2f6, 0x003f, - 0x003f, 0x003f, 0x003f, 0xbaf0, 0xcfc2, 0x003f, 0xd2eb, 0xd2e9, - 0xd2f5, 0x003f, 0xd2f0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd2f8, 0x003f, 0xd3a3, 0xd2fa, 0x003f, 0x003f, - 0xd2fe, 0x003f, 0x003f, 0xd3a1, 0xd2fb, 0x003f, 0x003f, 0xd3be, - 0x003f, 0x003f, 0xbae9, 0xb3b1, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd2f9, 0x003f, 0x003f, 0x003f, 0xd3a5, 0xb0f6, 0xd3a4, 0x003f, - 0xb0a5, 0xc9ca, 0xd3a2, 0x003f, 0xd2fc, 0x003f, 0x003f, 0xd2f7, - 0xd2fd, 0xbac8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd3a6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb0f7, 0xd3af, 0x003f, 0x003f, 0xd3a7, 0xd3a8, 0x003f, - 0xbea5, 0xcbe9, 0x003f, 0x003f, 0x003f, 0xd3ad, 0xd3ac, 0x003f, - 0x003f, 0x003f, 0xc5af, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd3ae, 0x003f, 0x003f, 0xd3ab, 0x003f, 0x003f, - /* 0x5500 .. 0x55ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0xb1b4, 0x003f, 0xbab6, 0xbfb0, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd3a9, - 0xc5e2, 0x003f, 0x003f, 0x003f, 0xd3aa, 0x003f, 0xb0a2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd3b4, 0xcda3, - 0x003f, 0xbea7, 0x003f, 0xd3ba, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd3b9, 0xd3b0, 0x003f, 0x003f, 0x003f, 0x003f, 0xc2c3, 0x003f, - 0xd3b1, 0x003f, 0x003f, 0x003f, 0xc2ef, 0xd3b6, 0xbea6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd3b3, 0x003f, 0x003f, 0xcce4, - 0x003f, 0x003f, 0x003f, 0xb7bc, 0x003f, 0x003f, 0xd3b7, 0xd3b8, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd3b5, 0xd3bb, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd3b2, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd3c1, 0xd3c6, 0x003f, 0xd3c2, 0x003f, - 0xd3bd, 0x003f, 0x003f, 0xd3c7, 0xc1b1, 0x003f, 0x003f, 0xd3c9, - 0x003f, 0xb9a2, 0xd3bf, 0xc3fd, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd3c3, 0xd3bc, 0xb4ad, 0x003f, 0xb4ee, 0xb3e5, 0xd3c4, 0xd3c0, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb7f6, - 0xd3ca, 0xd3c8, 0xc1d3, 0xb5ca, 0xb6ac, 0x003f, 0xd3c5, 0x003f, - 0xb6f4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb1c4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd3ce, 0xd3cc, 0x003f, 0xd4a7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd3d1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd3cb, 0x003f, 0xd3cf, 0x003f, 0x003f, 0xd3cd, - 0x003f, 0x003f, 0x003f, 0xbbcc, 0xd3d0, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd3d3, - 0x003f, 0xd3d8, 0x003f, 0x003f, 0x003f, 0xd3d6, 0xd3d5, 0x003f, - /* 0x5600 .. 0x56ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc3b2, 0x003f, - 0x003f, 0xb2c5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd3d2, 0x003f, 0xd3d4, 0xbea8, - 0xb1b3, 0x003f, 0x003f, 0xd3d7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb2de, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd3e2, - 0x003f, 0xbefc, 0xd3de, 0x003f, 0xd3dc, 0x003f, 0xd3dd, 0x003f, - 0xd3df, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb1bd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xc1b9, 0x003f, 0xd3d9, 0x003f, - 0xd3da, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb3fa, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd3e1, 0x003f, 0x003f, 0x003f, - 0xb4ef, 0x003f, 0xd3e4, 0xd3e0, 0xd3e3, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcaae, 0x003f, 0x003f, 0x003f, - 0xc6d5, 0x003f, 0xc8b8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd3e6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd3e5, 0xb3c5, - 0x003f, 0x003f, 0xd3e7, 0x003f, 0x003f, 0x003f, 0x003f, 0xd3ea, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd3e9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd3e8, 0x003f, 0xc7b9, 0x003f, 0x003f, 0xd3eb, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd3ec, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd3ee, 0x003f, 0xd3ed, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd3f0, 0x003f, 0x003f, 0x003f, - 0xd3f3, 0xd3f1, 0xd3ef, 0xd3f2, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd3f4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd3f5, 0x003f, - 0x003f, 0xd3f6, 0x003f, 0xd3f7, 0x003f, 0x003f, 0x003f, 0xd3f8, - 0xd1c5, 0x003f, 0xbcfc, 0xbbcd, 0x003f, 0x003f, 0xb2f3, 0x003f, - 0xb0f8, 0x003f, 0x003f, 0xc3c4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd3f9, 0x003f, - 0xbaa4, 0x003f, 0xb0cf, 0xbfde, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd3fa, 0xb8c7, 0x003f, 0x003f, 0xb9f1, 0x003f, 0xd3fc, - /* 0x5700 .. 0x57ff */ - 0xd3fb, 0x003f, 0x003f, 0xcae0, 0xd3fd, 0x003f, 0x003f, 0x003f, - 0xd4a1, 0xd3fe, 0x003f, 0xd4a2, 0x003f, 0xd4a3, 0x003f, 0xb7f7, - 0x003f, 0x003f, 0xb1e0, 0xd4a4, 0x003f, 0x003f, 0xd4a6, 0x003f, - 0xd4a5, 0x003f, 0x003f, 0x003f, 0xd4a8, 0x003f, 0x003f, 0xc5da, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd4a9, 0xb0b5, - 0xbadf, 0x003f, 0x003f, 0x003f, 0x003f, 0xb7bd, 0x003f, 0x003f, - 0xc3cf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd4aa, - 0xd4ab, 0x003f, 0x003f, 0xd4ad, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd4ae, 0x003f, 0xbae4, 0x003f, 0x003f, 0x003f, 0x003f, 0xb6d1, - 0x003f, 0x003f, 0xcbb7, 0x003f, 0x003f, 0x003f, 0xd4ac, 0xd4af, - 0xbac1, 0xb9a3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd4b3, 0x003f, 0x003f, 0xbaa5, 0x003f, 0xc3b3, 0x003f, - 0x003f, 0xd4b0, 0xc4da, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd4b4, - 0x003f, 0x003f, 0xbfe2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd4b2, 0xd4b5, 0x003f, 0xb7bf, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd4b6, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd4b7, 0x003f, 0xb9a4, 0xb3c0, 0xd4b9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd4ba, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd4bb, 0x003f, 0x003f, 0xd4b8, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd4b1, 0x003f, 0x003f, 0xd4bc, 0x003f, 0x003f, 0xd4bd, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcbe4, 0x003f, 0x003f, 0xbeeb, 0x003f, - 0x003f, 0x003f, 0xd4bf, 0xd4c0, 0xd4be, 0x003f, 0xd4c2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xc7b8, 0x003f, 0x003f, 0xb0e8, - 0xc9d6, 0x003f, 0x003f, 0xd4c3, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xbefd, 0x003f, 0x003f, 0xbcb9, - 0x003f, 0xc7dd, 0xb4f0, 0x003f, 0xbaeb, 0x003f, 0x003f, 0x003f, - /* 0x5800 .. 0x58ff */ - 0xcbd9, 0x003f, 0xc6b2, 0x003f, 0x003f, 0xb7f8, 0xc2cf, 0x003f, - 0x003f, 0x003f, 0xd4c1, 0xd4c4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc2c4, 0x003f, 0x003f, - 0x003f, 0xd4c5, 0x003f, 0x003f, 0x003f, 0xd4c6, 0x003f, 0x003f, - 0x003f, 0xd4c8, 0x003f, 0x003f, 0xc4e9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb4ae, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4a1, - 0xb1e1, 0xcaf3, 0x003f, 0x003f, 0xbeec, 0xc5c8, 0x003f, 0x003f, - 0x003f, 0x003f, 0xbae6, 0x003f, 0x003f, 0xd4ce, 0x003f, 0x003f, - 0xcabd, 0xcedd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb2f4, 0xd4ca, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc1ba, 0xd4cd, 0x003f, 0xc5e3, 0x003f, 0x003f, 0xc5c9, - 0xc5e4, 0xc8b9, 0xc4cd, 0x003f, 0x003f, 0x003f, 0xbac9, 0x003f, - 0x003f, 0x003f, 0xd4c9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb1f6, 0x003f, 0xc5b6, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd4cb, 0x003f, 0xd4c7, 0x003f, 0x003f, 0xbfd0, 0x003f, 0x003f, - 0x003f, 0xd4cf, 0x003f, 0x003f, 0x003f, 0x003f, 0xbdce, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb6ad, 0x003f, 0xd4d0, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcae8, 0x003f, 0x003f, 0x003f, 0xc1fd, - 0x003f, 0x003f, 0x003f, 0x003f, 0xc4c6, 0x003f, 0x003f, 0xd4d2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcbcf, 0x003f, 0x003f, 0xd4d3, 0x003f, 0x003f, 0xd4d8, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcaaf, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd4d7, 0xd4d1, 0xd4d4, 0xd4d6, 0x003f, 0x003f, 0xbaa6, 0x003f, - 0x003f, 0xcac9, 0x003f, 0x003f, 0x003f, 0xd4d9, 0x003f, 0xc3c5, - 0x003f, 0x003f, 0xb2f5, 0x003f, 0xbeed, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd4db, 0x003f, 0xd4da, 0x003f, 0xb9e8, 0x003f, 0xd4dc, - 0xd4de, 0xd4dd, 0x003f, 0x003f, 0xd4e0, 0x003f, 0xd4d5, 0xd4e2, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd4e1, 0xd4df, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xbbce, 0xbfd1, 0x003f, 0xc1d4, 0xd4e3, - 0xc0bc, 0xb0ed, 0xc7e4, 0x003f, 0x003f, 0x003f, 0x003f, 0xc4db, - 0x003f, 0xd4e5, 0xd4e4, 0xd4e6, 0xd4e7, 0xd4e8, 0x003f, 0x003f, - /* 0x5900 .. 0x59ff */ - 0x003f, 0x003f, 0xd4e9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcad1, 0xd4ea, 0x003f, 0x003f, 0x003f, 0x003f, 0xb2c6, - 0xd4eb, 0x003f, 0x003f, 0x003f, 0x003f, 0xcdbc, 0xb3b0, 0x003f, - 0xd2c9, 0xbdc8, 0xc2bf, 0xd4ec, 0xcceb, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xccb4, 0x003f, 0x003f, 0xd4ee, 0x003f, 0xc2e7, - 0x003f, 0xc5b7, 0xc2c0, 0xc9d7, 0xd4ef, 0xd4f0, 0xb1fb, 0x003f, - 0x003f, 0xbcba, 0xd4f1, 0x003f, 0x003f, 0x003f, 0x003f, 0xb0d0, - 0xd4f2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd4f3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xb1e2, 0x003f, 0x003f, 0xb4f1, - 0xc6e0, 0xcaf4, 0x003f, 0x003f, 0x003f, 0x003f, 0xd4f7, 0xc1d5, - 0xd4f6, 0xb7c0, 0x003f, 0x003f, 0xcbdb, 0xd4f5, 0x003f, 0xc5e5, - 0xd4f9, 0x003f, 0xd4f8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd4fb, 0x003f, 0xd4fa, 0x003f, 0x003f, 0xb1fc, 0x003f, 0xd4fc, - 0xbea9, 0xd4fe, 0xc3a5, 0x003f, 0xd4fd, 0x003f, 0xcab3, 0x003f, - 0x003f, 0x003f, 0x003f, 0xbdf7, 0xc5db, 0x003f, 0x003f, 0x003f, - 0xd5a1, 0x003f, 0x003f, 0x003f, 0x003f, 0xb9a5, 0x003f, 0x003f, - 0x003f, 0xd5a2, 0xc7a1, 0xc8de, 0xccd1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc7a5, 0x003f, 0x003f, 0xd5ab, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb5b8, 0x003f, 0x003f, 0xcdc5, 0x003f, - 0x003f, 0xccaf, 0x003f, 0xd6ac, 0x003f, 0xd5a3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd5a6, 0x003f, 0xc2c5, 0x003f, 0x003f, - 0xcbb8, 0x003f, 0x003f, 0x003f, 0xc5ca, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd5a7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcbe5, 0x003f, 0xbaca, 0x003f, 0x003f, 0xbeaa, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd5a8, 0x003f, - 0x003f, 0xbbd0, 0x003f, 0xbbcf, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb0b9, 0xb8c8, 0x003f, 0xc0ab, 0xb0d1, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd5ac, 0xd5ad, 0x003f, 0xd5aa, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb1b8, 0xb4af, 0x003f, - 0xd5a9, 0x003f, 0xccc5, 0xc9b1, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb0a8, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb0f9, 0x003f, 0x003f, 0x003f, 0xbbd1, - /* 0x5a00 .. 0x5aff */ - 0x003f, 0xb0d2, 0x003f, 0xb0a3, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd5b2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd5b0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xccbc, 0x003f, 0xd5b3, 0x003f, 0xd5b1, 0x003f, 0x003f, 0xd5af, - 0xbfb1, 0x003f, 0x003f, 0x003f, 0x003f, 0xd5ae, 0x003f, 0x003f, - 0x003f, 0xcada, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb8e4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd5b7, 0xd5b8, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xbeab, 0x003f, 0x003f, 0x003f, - 0xd5b4, 0xcfac, 0x003f, 0x003f, 0x003f, 0x003f, 0xc7cc, 0x003f, - 0x003f, 0xd5b6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xbaa7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd5b9, 0x003f, 0x003f, 0x003f, 0xc9d8, 0x003f, - 0x003f, 0x003f, 0xd5ba, 0x003f, 0xd5b5, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xccbb, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc7de, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd5bb, 0xc9b2, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd5bc, 0xd5c0, 0xd5bd, 0x003f, - 0x003f, 0xb2c7, 0xd5bf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbcbb, 0x003f, 0xd5be, 0xb7f9, 0x003f, 0x003f, 0x003f, - 0xd5cc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd5c5, 0xd5c2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc3e4, 0x003f, 0xd5c1, 0x003f, 0x003f, 0xd5c3, 0x003f, - 0x003f, 0xd5c4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd5c6, 0xd5c7, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x5b00 .. 0x5bff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb4f2, 0x003f, 0xd5c9, 0xd5c8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd5ca, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xbeee, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd5cd, 0x003f, 0xc4dc, 0x003f, 0x003f, 0x003f, - 0xb1c5, 0x003f, 0xd5cb, 0x003f, 0x003f, 0x003f, 0xd5ce, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd5cf, 0x003f, - 0xd5d2, 0x003f, 0x003f, 0xd5d0, 0x003f, 0xd5d1, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xbbd2, 0xd5d3, 0x003f, 0x003f, 0xb9a6, 0xd5d4, 0x003f, 0xbbfa, - 0xc2b8, 0x003f, 0xd5d5, 0xd5d6, 0xbbda, 0xb9a7, 0x003f, 0xccd2, - 0x003f, 0x003f, 0x003f, 0xb5a8, 0xb8c9, 0xd5d7, 0xb3d8, 0x003f, - 0x003f, 0xd5d8, 0x003f, 0xc2b9, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd5d9, 0xd6a3, 0x003f, 0xd5da, 0x003f, 0xd5db, 0x003f, 0x003f, - 0xd5dc, 0x003f, 0xd5de, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd5df, 0x003f, 0x003f, 0xd5e0, 0x003f, 0xc2f0, 0x003f, 0xb1a7, - 0xbce9, 0xb0c2, 0x003f, 0xc1d7, 0xb4b0, 0xbcb5, 0x003f, 0xb9a8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc5e6, 0x003f, 0xbda1, - 0xb4b1, 0xc3e8, 0xc4ea, 0xb0b8, 0xb5b9, 0xcaf5, 0x003f, 0xbcc2, - 0x003f, 0x003f, 0xb5d2, 0xc0eb, 0xbcbc, 0xcda8, 0xd5e1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb5dc, 0x003f, - 0xbacb, 0x003f, 0x003f, 0xb3b2, 0xb1e3, 0xbeac, 0xb2c8, 0x003f, - 0xd5e2, 0xcdc6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xbdc9, - 0x003f, 0x003f, 0xbce4, 0xd5e3, 0xb4f3, 0xc6d2, 0xcca9, 0xd5e4, - 0x003f, 0xd5e5, 0x003f, 0x003f, 0xc9d9, 0x003f, 0x003f, 0x003f, - 0xd5e7, 0x003f, 0xb4a8, 0xb6f7, 0xd5e6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb4b2, 0x003f, 0xbfb2, 0xd5eb, 0xbba1, - 0x003f, 0xb2c9, 0xd5ea, 0x003f, 0xd5e8, 0xd5ec, 0xd5e9, 0xc7ab, - 0xdccd, 0xbfb3, 0x003f, 0xd5ed, 0x003f, 0x003f, 0xcec0, 0x003f, - 0xd5ee, 0x003f, 0x003f, 0xd5f0, 0x003f, 0xc3fe, 0xd5ef, 0x003f, - 0xc0a3, 0x003f, 0xbbfb, 0x003f, 0x003f, 0x003f, 0xc2d0, 0xbcf7, - /* 0x5c00 .. 0x5cff */ - 0x003f, 0xc9f5, 0xc0ec, 0x003f, 0xbccd, 0xd5f1, 0xbead, 0xd5f2, - 0xd5f3, 0xb0d3, 0xc2ba, 0xbfd2, 0x003f, 0xd5f4, 0xc6b3, 0xbeae, - 0x003f, 0xbeaf, 0x003f, 0xd5f5, 0x003f, 0x003f, 0xc0ed, 0x003f, - 0x003f, 0x003f, 0xbeb0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd5f6, 0x003f, 0xd5f7, 0x003f, 0xcce0, 0x003f, 0x003f, 0x003f, - 0xd5f8, 0x003f, 0x003f, 0x003f, 0x003f, 0xb6c6, 0x003f, 0x003f, - 0x003f, 0xbda2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd5f9, 0xd5fa, 0xbcdc, 0xbfac, 0xc6f4, 0xbfd4, 0xc8f8, 0xc7a2, - 0xb6c9, 0xd5fb, 0x003f, 0x003f, 0x003f, 0xb5ef, 0xd5fc, 0x003f, - 0xb6fe, 0x003f, 0xc6cf, 0xb2b0, 0x003f, 0xbbd3, 0xd5fd, 0xd6a2, - 0xd6a1, 0xb6fd, 0x003f, 0xd5fe, 0x003f, 0xc5b8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc2b0, 0x003f, - 0xc5cb, 0xbcc8, 0x003f, 0x003f, 0xc1d8, 0xcdfa, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd6a4, 0x003f, 0xd6a5, 0xc6d6, - 0x003f, 0xbbb3, 0x003f, 0x003f, 0x003f, 0x003f, 0xd6a7, 0x003f, - 0x003f, 0xd6a8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd6a9, 0x003f, 0x003f, 0x003f, - 0xb4f4, 0xd6aa, 0x003f, 0x003f, 0xd6ab, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb2ac, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xc1bb, 0xb4e4, 0x003f, 0xd6ad, 0xcca8, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc2d2, 0x003f, 0xb3d9, 0x003f, 0x003f, 0xd6af, 0xd6b1, - 0xb4df, 0x003f, 0x003f, 0xd6ae, 0xd6b0, 0x003f, 0xd6b3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd6b2, 0x003f, 0xd6b4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd6b5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xc6bd, 0xb6ae, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb2e5, 0xd6b6, 0xd6bb, 0x003f, 0x003f, 0xd6b9, 0x003f, 0xcaf7, - 0xcaf6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc5e7, 0x003f, - 0x003f, 0x003f, 0xd6b8, 0xbdd4, 0x003f, 0xd6b7, 0x003f, 0x003f, - /* 0x5d00 .. 0x5dff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xbff2, - 0x003f, 0x003f, 0x003f, 0xd6bc, 0x003f, 0x003f, 0xbaea, 0x003f, - 0x003f, 0xd6c2, 0x003f, 0x003f, 0xd6c3, 0xd6bd, 0xb3b3, 0xd6be, - 0xd6c7, 0xd6c6, 0xd6c5, 0xd6c1, 0x003f, 0x003f, 0x003f, 0xd6c0, - 0x003f, 0x003f, 0xd6c4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcaf8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd6cb, 0xd6c8, 0x003f, 0xd6ca, 0x003f, - 0xcdf2, 0x003f, 0xd6c9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd6bf, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbff3, 0x003f, 0x003f, 0xd6cc, 0x003f, 0x003f, 0xbab7, - 0x003f, 0x003f, 0x003f, 0xd6cd, 0x003f, 0x003f, 0xd6ce, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd6d1, 0x003f, 0xd6d0, 0x003f, 0x003f, 0xd6cf, - 0x003f, 0x003f, 0x003f, 0xc5e8, 0xd6ba, 0x003f, 0x003f, 0x003f, - 0xd6d7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd6d3, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd6d2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd6d4, 0x003f, 0xd6d5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd6d8, - 0x003f, 0x003f, 0xcee6, 0x003f, 0xd6d9, 0xd6d6, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd6da, 0x003f, 0x003f, 0xb4e0, 0xd6db, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd6dd, 0xd6dc, 0x003f, 0x003f, 0xd6de, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd6df, 0x003f, 0xc0ee, 0xbda3, 0x003f, - 0x003f, 0xbde4, 0x003f, 0xc1e3, 0x003f, 0xb9a9, 0xbab8, 0xb9aa, - 0xb5f0, 0x003f, 0x003f, 0xd6e0, 0x003f, 0x003f, 0xbab9, 0x003f, - 0x003f, 0xb8ca, 0xd6e1, 0xcca6, 0xc7c3, 0xd6e2, 0x003f, 0xb9ab, - 0x003f, 0x003f, 0x003f, 0xb4ac, 0x003f, 0xc3a7, 0xb6d2, 0x003f, - /* 0x5e00 .. 0x5eff */ - 0x003f, 0x003f, 0xbbd4, 0xc9db, 0x003f, 0x003f, 0xc8c1, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd6e3, 0xb4f5, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd6e6, 0x003f, 0x003f, 0x003f, 0x003f, 0xc4a1, 0x003f, - 0x003f, 0xd6e5, 0xd6e4, 0xd6e7, 0x003f, 0xc4eb, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xbfe3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xbbd5, 0x003f, 0xc0ca, 0x003f, 0xc2d3, - 0xb5a2, 0x003f, 0x003f, 0xc4a2, 0x003f, 0x003f, 0xd6e8, 0xd6e9, - 0xbeef, 0x003f, 0x003f, 0x003f, 0x003f, 0xcbb9, 0x003f, 0x003f, - 0xd6ec, 0x003f, 0x003f, 0xd6eb, 0xd6ea, 0xc9fd, 0x003f, 0xd6f3, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcbda, 0x003f, 0xd6ed, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd6ef, 0xcbeb, 0x003f, 0xd6ee, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd6f0, - 0x003f, 0xc8a8, 0xd6f1, 0xcabe, 0xd6f2, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb4b3, 0xcabf, 0xc7af, 0xd6f4, 0xd6f5, 0x003f, - 0xb9ac, 0xb4b4, 0xd6f6, 0xb8b8, 0xcdc4, 0xcda9, 0xb4f6, 0xd6f8, - 0x003f, 0xc4a3, 0x003f, 0xb9ad, 0xbeb1, 0x003f, 0x003f, 0xc8df, - 0x003f, 0x003f, 0xbeb2, 0x003f, 0x003f, 0x003f, 0x003f, 0xbdf8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc4ec, 0xcaf9, 0xc5b9, - 0x003f, 0x003f, 0xb9ae, 0x003f, 0xc9dc, 0x003f, 0x003f, 0x003f, - 0xd6f9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc5d9, 0xbac2, - 0x003f, 0x003f, 0x003f, 0xb8cb, 0x003f, 0xc4ed, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb0c3, 0xbdee, 0xb9af, - 0xcdc7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd6fa, 0xd6fb, 0xc7d1, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd6fc, 0xcef7, 0xcfad, 0x003f, 0x003f, 0x003f, 0x003f, 0xd6fe, - 0xd6fd, 0x003f, 0x003f, 0xb3c7, 0x003f, 0x003f, 0xd7a1, 0x003f, - 0x003f, 0x003f, 0xd7a4, 0xd7a5, 0x003f, 0xd7a3, 0x003f, 0xc9c0, - 0xbeb3, 0xd7a7, 0xd7a6, 0xd7a2, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd7a8, 0xd7a9, 0x003f, 0x003f, 0xd7aa, 0x003f, 0x003f, 0x003f, - 0xd7ad, 0xd7ab, 0x003f, 0xd7ac, 0xd7ae, 0x003f, 0xb1e4, 0xc4ee, - 0xd7af, 0x003f, 0xb7fa, 0xb2f6, 0xc7b6, 0x003f, 0xd7b0, 0xc6fb, - /* 0x5f00 .. 0x5fff */ - 0x003f, 0xcadb, 0x003f, 0xd7b1, 0xcfae, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd7b2, 0xcac0, 0xd7b5, 0xd0a1, 0xd0b1, 0x003f, 0xbcb0, - 0xc6f5, 0xd7b6, 0x003f, 0xb5dd, 0xc4a4, 0xb0fa, 0xd7b7, 0xcaa6, - 0xb9b0, 0x003f, 0x003f, 0xc3d0, 0x003f, 0x003f, 0x003f, 0xc4ef, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xccef, 0xb8b9, 0xb8cc, - 0x003f, 0xd7b8, 0x003f, 0x003f, 0x003f, 0xd7b9, 0x003f, 0xd7bf, - 0x003f, 0xbce5, 0x003f, 0x003f, 0x003f, 0xc4a5, 0x003f, 0xb6af, - 0xd7ba, 0x003f, 0x003f, 0x003f, 0xc9ab, 0x003f, 0xc3c6, 0x003f, - 0x003f, 0xd7bb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd7bc, 0x003f, 0xb6b0, 0x003f, 0xd7bd, 0x003f, 0xd7be, 0x003f, - 0x003f, 0xd7c0, 0x003f, 0xc5f6, 0x003f, 0x003f, 0xd7c1, 0xd7c2, - 0x003f, 0xd7c3, 0x003f, 0x003f, 0xd7b4, 0xd7b3, 0x003f, 0x003f, - 0x003f, 0xd7c4, 0xb7c1, 0x003f, 0x003f, 0x003f, 0xc9a7, 0x003f, - 0x003f, 0xbacc, 0xc9b7, 0xc4a6, 0xc9cb, 0xd7c5, 0x003f, 0x003f, - 0xbeb4, 0xb1c6, 0x003f, 0xd7c6, 0x003f, 0x003f, 0x003f, 0xd7c7, - 0x003f, 0xccf2, 0x003f, 0x003f, 0xc8e0, 0x003f, 0x003f, 0xd7ca, - 0xb1fd, 0xc0ac, 0xd7c9, 0xd7c8, 0xb7c2, 0xc2d4, 0x003f, 0xd7ce, - 0xd7cc, 0x003f, 0xd7cb, 0xcea7, 0xb8e5, 0x003f, 0x003f, 0x003f, - 0xbdf9, 0xd7cd, 0xc5cc, 0xbdbe, 0x003f, 0x003f, 0x003f, 0xc6c0, - 0xd7d1, 0xd7d0, 0x003f, 0x003f, 0x003f, 0x003f, 0xd7cf, 0x003f, - 0xd7d2, 0xb8e6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd7d3, 0xc9fc, 0xbddb, 0x003f, 0x003f, 0xd7d4, 0xc8f9, 0x003f, - 0x003f, 0x003f, 0x003f, 0xc6c1, 0xc4a7, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc5b0, 0x003f, 0x003f, 0xd7d5, 0xb5ab, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xbfb4, 0x003f, 0xc9ac, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xb4f7, 0xc7a6, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd7d6, 0xbbd6, - 0xcbba, 0xcbbb, 0x003f, 0x003f, 0xb1fe, 0xd7db, 0x003f, 0x003f, - 0xc3e9, 0x003f, 0x003f, 0x003f, 0xd7d8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb2f7, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd8ad, 0xd7da, 0x003f, 0x003f, 0x003f, 0xc7b0, 0x003f, 0x003f, - 0xd7d9, 0x003f, 0x003f, 0xd7d7, 0x003f, 0xb9fa, 0x003f, 0xd7dd, - /* 0x6000 .. 0x60ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd7e3, 0xd7e9, - 0xd7e1, 0x003f, 0xc5dc, 0x003f, 0x003f, 0xd7e6, 0xc9dd, 0x003f, - 0x003f, 0xd7e0, 0x003f, 0xd7e5, 0xcee7, 0xbbd7, 0x003f, 0x003f, - 0xc2d5, 0xd7de, 0x003f, 0x003f, 0x003f, 0xb5de, 0xd7e8, 0xc0ad, - 0xb1e5, 0xd7e2, 0xb2f8, 0xd7e7, 0x003f, 0x003f, 0x003f, 0xb6b1, - 0x003f, 0xd7e4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd7ea, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd7ec, 0xd7f6, 0xd7f4, 0x003f, 0x003f, 0xd7f1, 0x003f, - 0x003f, 0x003f, 0xd7f0, 0xcef8, 0x003f, 0xd7f2, 0x003f, 0x003f, - 0xb6b2, 0x003f, 0xb9b1, 0x003f, 0x003f, 0xbdfa, 0x003f, 0x003f, - 0x003f, 0xd7f9, 0xd7eb, 0x003f, 0x003f, 0x003f, 0x003f, 0xd7ef, - 0xd7df, 0x003f, 0xb2fa, 0xd7f3, 0xd7f5, 0xc3d1, 0x003f, 0x003f, - 0xbaa8, 0xb2b8, 0xd7ed, 0xd7f8, 0xd7f7, 0xb6b3, 0x003f, 0xc2a9, - 0xb3e6, 0x003f, 0x003f, 0x003f, 0x003f, 0xb7c3, 0x003f, 0xd7ee, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd7fa, 0x003f, 0xd7fd, 0xd8a1, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbcbd, 0x003f, 0xd8a7, 0xc4f0, 0xd7fb, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd8a5, 0x003f, 0xb2f9, 0x003f, 0xd8a3, 0xd8a4, - 0x003f, 0x003f, 0xd7fe, 0xd8a2, 0x003f, 0x003f, 0x003f, 0xb8e7, - 0xcdaa, 0x003f, 0x003f, 0xb4b5, 0x003f, 0x003f, 0xb1d9, 0xd8a6, - 0x003f, 0xc7ba, 0xb0ad, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc8e1, 0xd7dc, 0xd8ac, 0xd8b0, 0xcce5, 0x003f, - 0xd8a9, 0x003f, 0x003f, 0x003f, 0xc5e9, 0xd8ae, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xbef0, 0xd8af, 0xc6d7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcfc7, 0x003f, 0xd8ab, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd8b1, 0x003f, 0xb9fb, 0x003f, 0xc0cb, 0x003f, 0x003f, 0xb0d4, - 0xd8aa, 0xd8a8, 0x003f, 0xc1da, 0x003f, 0x003f, 0x003f, 0xd7fc, - 0xbbb4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xc2c6, 0xd8bd, 0x003f, 0xc1db, 0xd8b8, 0x003f, 0xd8b5, 0xd8b6, - 0x003f, 0xbce6, 0xd8b9, 0xd8bc, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6100 .. 0x61ff */ - 0xd8b7, 0xbda5, 0x003f, 0xd8ba, 0x003f, 0x003f, 0xd8b4, 0x003f, - 0xccfc, 0xccfb, 0x003f, 0x003f, 0x003f, 0xd8be, 0xd8bf, 0xb0d5, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd8b3, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb6f2, 0xb0a6, 0x003f, 0x003f, 0x003f, 0xb4b6, - 0x003f, 0xd8bb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd8c3, - 0xd8c2, 0x003f, 0x003f, 0x003f, 0xd8c7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd8c8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd8c6, 0xd8c9, 0xd8c1, 0xd8c5, - 0x003f, 0x003f, 0xd8ca, 0x003f, 0xd8cb, 0x003f, 0x003f, 0xd8c0, - 0xbbfc, 0x003f, 0xd8c4, 0xc2d6, 0xb9b2, 0xd8b2, 0xbfb5, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd8d8, 0x003f, 0xcae9, 0x003f, 0x003f, - 0xd8ce, 0xd8cf, 0xd8d0, 0x003f, 0x003f, 0xd8d7, 0x003f, 0xd8d6, - 0x003f, 0x003f, 0xcbfd, 0xb4b7, 0x003f, 0xd8d4, 0x003f, 0xb7c5, - 0xb3b4, 0x003f, 0x003f, 0xd8d1, 0x003f, 0x003f, 0xceb8, 0xd8d3, - 0xb0d6, 0xd8d5, 0x003f, 0xd8cc, 0xd8d2, 0xd8d9, 0xb7c4, 0xd8cd, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcddd, 0x003f, - 0x003f, 0x003f, 0xcdab, 0x003f, 0x003f, 0x003f, 0x003f, 0xd8dc, - 0x003f, 0x003f, 0xd8e0, 0x003f, 0x003f, 0x003f, 0xc1fe, 0x003f, - 0xcef9, 0xd8e1, 0x003f, 0x003f, 0xd8de, 0x003f, 0xd8db, 0x003f, - 0x003f, 0xd8da, 0xd8df, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcab0, 0x003f, 0x003f, 0xc6b4, - 0x003f, 0xb7c6, 0x003f, 0xd8e2, 0xd8dd, 0x003f, 0xd8e3, 0x003f, - 0x003f, 0x003f, 0xb7fb, 0x003f, 0x003f, 0x003f, 0xb2b1, 0x003f, - 0x003f, 0x003f, 0xd8eb, 0x003f, 0x003f, 0x003f, 0xb4b8, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd8e9, 0x003f, 0x003f, 0xd8ea, 0xbaa9, - 0xd8e8, 0xd8e6, 0xd8e5, 0xd8ec, 0xd8e4, 0xd8ee, 0x003f, 0x003f, - 0xb2fb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd8f0, 0x003f, 0x003f, 0xd8ef, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc4a8, 0x003f, 0xd8f3, 0x003f, 0xd8f1, 0xd8e7, - 0xb7fc, 0x003f, 0xd8f2, 0x003f, 0xd8f6, 0xd8f5, 0xd8f7, 0xd8f4, - /* 0x6200 .. 0x62ff */ - 0xd8f8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd8f9, 0xd8fa, 0xcaea, 0x003f, 0xd8fc, 0xd8fb, 0xbdbf, 0x003f, - 0xc0ae, 0xb2e6, 0xb2fc, 0x003f, 0xd8fd, 0x003f, 0xb0bf, 0x003f, - 0x003f, 0x003f, 0xc0cc, 0xd8fe, 0x003f, 0xecc3, 0xd9a1, 0xb7e1, - 0x003f, 0xd9a2, 0x003f, 0x003f, 0x003f, 0x003f, 0xc0ef, 0x003f, - 0x003f, 0x003f, 0xd9a3, 0x003f, 0x003f, 0x003f, 0xd9a4, 0xb5ba, - 0xd9a5, 0x003f, 0xd9a6, 0xd9a7, 0xc2d7, 0x003f, 0x003f, 0x003f, - 0xb8cd, 0x003f, 0x003f, 0xcce1, 0x003f, 0x003f, 0x003f, 0xcbbc, - 0xbdea, 0xd9a8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc0f0, - 0xeebd, 0xc8e2, 0x003f, 0xbcea, 0x003f, 0xbacd, 0xd9a9, 0x003f, - 0x003f, 0x003f, 0x003f, 0xc2c7, 0x003f, 0xcaa7, 0x003f, 0x003f, - 0xc2f1, 0x003f, 0x003f, 0xd9ac, 0x003f, 0x003f, 0xd9aa, 0x003f, - 0xd9ad, 0x003f, 0x003f, 0xd9ab, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd9ae, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcab1, 0x003f, - 0x003f, 0xb0b7, 0x003f, 0x003f, 0x003f, 0x003f, 0xc9de, 0x003f, - 0x003f, 0xc8e3, 0x003f, 0x003f, 0xd9af, 0x003f, 0xd9b2, 0xbeb5, - 0xb5bb, 0x003f, 0xd9b0, 0xd9b7, 0xbeb6, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd9b1, 0xc7c4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcdde, 0xd9b3, 0xd9b4, 0xd9b8, 0xc5ea, 0xd9b5, 0xb9b3, - 0xc0de, 0x003f, 0x003f, 0xd9c6, 0xc8b4, 0x003f, 0xc2f2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xc8e4, 0xdaad, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcafa, 0x003f, 0x003f, 0x003f, 0xc4f1, 0x003f, 0x003f, - 0x003f, 0xcbf5, 0x003f, 0xd9bb, 0xb2a1, 0xc3ea, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd9c4, 0x003f, 0x003f, 0xc3b4, 0xd9be, 0xd9c5, - 0xd9c0, 0xd9c7, 0xd9c3, 0x003f, 0xd9c2, 0xc7ef, 0x003f, 0xd9bc, - 0xb2fd, 0xd9ba, 0xb5f1, 0xc2f3, 0xd9b6, 0x003f, 0x003f, 0xd9b9, - 0xb9b4, 0xc0db, 0x003f, 0xbeb7, 0xd9c1, 0xc7d2, 0x003f, 0x003f, - 0xb5f2, 0xb3c8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xb3e7, 0xbfa1, 0xd9c9, 0xd9ce, - 0x003f, 0xd9ca, 0x003f, 0xb7fd, 0x003f, 0xd9cf, 0xbba2, 0xb9e9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xbda6, 0xd9bd, - /* 0x6300 .. 0x63ff */ - 0x003f, 0xbbfd, 0xd9cc, 0x003f, 0x003f, 0x003f, 0x003f, 0xbbd8, - 0xd9cd, 0xb0c4, 0x003f, 0x003f, 0xd9c8, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc4a9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb5f3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb6b4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9cb, - 0xb0a7, 0x003f, 0x003f, 0xbac3, 0x003f, 0x003f, 0x003f, 0xbfb6, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc4f2, 0x003f, 0x003f, 0xc8d4, 0xd9d1, 0xc1de, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc2aa, 0x003f, 0x003f, 0xbbab, 0xd9d2, 0x003f, 0xd9d4, - 0xd9d0, 0x003f, 0x003f, 0x003f, 0x003f, 0xcae1, 0x003f, 0xc4bd, - 0x003f, 0x003f, 0x003f, 0x003f, 0xc1dc, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcafb, - 0xbcce, 0xd9e0, 0x003f, 0xd9df, 0x003f, 0x003f, 0xbff8, 0x003f, - 0x003f, 0x003f, 0xb7fe, 0x003f, 0x003f, 0x003f, 0xd9d9, 0xbeb9, - 0x003f, 0x003f, 0xc6e8, 0xc7b1, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd9d7, 0x003f, 0x003f, 0xc1dd, 0x003f, 0x003f, 0x003f, 0x003f, - 0xbcf8, 0xd9dc, 0x003f, 0x003f, 0xbeb8, 0x003f, 0xd9d6, 0xd9db, - 0x003f, 0x003f, 0xc7d3, 0x003f, 0x003f, 0x003f, 0xd9d5, 0x003f, - 0xb7a1, 0x003f, 0x003f, 0xb3dd, 0x003f, 0x003f, 0x003f, 0xd9dd, - 0xceab, 0xbace, 0xc3b5, 0xd9da, 0x003f, 0xc0dc, 0x003f, 0xb9b5, - 0xbfe4, 0xb1e6, 0xc1bc, 0xd9d8, 0xb5c5, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb7c7, 0x003f, 0xc4cf, 0xd9de, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xc1df, 0x003f, 0x003f, 0xd9e1, 0x003f, - 0xd9e3, 0x003f, 0x003f, 0xc2b7, 0xd9e9, 0x003f, 0xd9e4, 0x003f, - 0x003f, 0xd9e6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc9c1, - 0xc4f3, 0x003f, 0xd9e7, 0x003f, 0x003f, 0x003f, 0xcdac, 0x003f, - 0x003f, 0x003f, 0xcdc8, 0xb4b9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb0ae, 0x003f, 0xd9e5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd9e2, 0x003f, 0x003f, 0x003f, 0x003f, 0xb4f8, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xb1e7, 0x003f, 0xd9e8, 0x003f, - 0x003f, 0x003f, 0xcdc9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6400 .. 0x64ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9ec, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc2bb, 0x003f, 0xd9f3, - 0x003f, 0x003f, 0x003f, 0xd9ed, 0x003f, 0x003f, 0xd9ea, 0xd9f1, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd9d3, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9ee, 0x003f, - 0xd9f2, 0x003f, 0x003f, 0x003f, 0xc8c2, 0xc5eb, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd9eb, 0x003f, 0xd9ef, 0x003f, - 0x003f, 0x003f, 0xb7c8, 0x003f, 0x003f, 0x003f, 0xbaf1, 0x003f, - 0x003f, 0x003f, 0xc0dd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9f7, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xc5a6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9f4, - 0x003f, 0xcbe0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9f5, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9f6, 0x003f, - 0xccce, 0x003f, 0xc0a2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb7e2, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd9fd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xbbb5, 0xd9fa, 0x003f, 0xd9f9, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc7b2, 0x003f, 0x003f, 0x003f, 0xc6b5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xc5b1, 0xd9fb, 0x003f, 0x003f, - 0x003f, 0xd9fc, 0x003f, 0xc9ef, 0x003f, 0xc7c5, 0xbba3, 0x003f, - 0xc0f1, 0x003f, 0xcbd0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb3c9, 0x003f, 0xdaa5, 0xd9fe, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcdca, 0xdaa7, 0x003f, 0x003f, 0xdaa3, 0x003f, 0xdaa4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc1e0, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdaa2, 0x003f, 0xd9bf, 0x003f, 0x003f, 0x003f, - 0xdaa6, 0x003f, 0xdaa1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdaab, 0xdaac, 0xc5a7, 0xdaae, 0x003f, 0x003f, 0xbba4, 0xdaa9, - 0x003f, 0x003f, 0x003f, 0x003f, 0xb5bc, 0x003f, 0x003f, 0xdaaf, - 0x003f, 0xdaa8, 0xdab3, 0x003f, 0xdab2, 0x003f, 0xdab1, 0x003f, - 0x003f, 0x003f, 0xdab4, 0x003f, 0x003f, 0xdab6, 0xbef1, 0x003f, - /* 0x6500 .. 0x65ff */ - 0xdab5, 0x003f, 0x003f, 0x003f, 0x003f, 0xdab9, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdab7, 0x003f, 0x003f, 0x003f, 0xdab8, 0xd9f0, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdabb, 0xdaba, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd9f8, 0xdabc, 0xdab0, 0x003f, 0x003f, 0xbbd9, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdabd, 0xdabe, 0xdac0, 0xdabf, - 0xdac1, 0xb2fe, 0x003f, 0xb9b6, 0x003f, 0x003f, 0xcafc, 0xc0af, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb8ce, 0x003f, 0x003f, - 0xdac3, 0x003f, 0x003f, 0x003f, 0x003f, 0xdac6, 0x003f, 0xc9d2, - 0x003f, 0xb5df, 0x003f, 0x003f, 0x003f, 0xdac5, 0xdac4, 0xc7d4, - 0xdac7, 0xb6b5, 0x003f, 0x003f, 0x003f, 0xdac9, 0xdac8, 0x003f, - 0x003f, 0x003f, 0xb4ba, 0xbbb6, 0x003f, 0x003f, 0xc6d8, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xb7c9, 0x003f, 0x003f, 0x003f, - 0xbff4, 0x003f, 0xdaca, 0x003f, 0xc0b0, 0xc5a8, 0x003f, 0xc9df, - 0xdacb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdacc, 0xdacd, 0x003f, 0x003f, 0x003f, 0xcab8, - 0xd5dd, 0xc0c6, 0x003f, 0x003f, 0xc9cc, 0x003f, 0xbad8, 0x003f, - 0xc8e5, 0xc8c3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc5cd, - 0x003f, 0xcec1, 0x003f, 0xdacf, 0xbcd0, 0x003f, 0x003f, 0xdad0, - 0x003f, 0xb0b6, 0x003f, 0x003f, 0xb6d4, 0xc0cd, 0x003f, 0xc9e0, - 0x003f, 0x003f, 0x003f, 0xdad1, 0xbbc2, 0xc3c7, 0x003f, 0xbbdb, - 0xbfb7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdad2, - 0x003f, 0xcafd, 0x003f, 0x003f, 0xb1f7, 0xbbdc, 0x003f, 0x003f, - 0x003f, 0xdad5, 0x003f, 0xdad3, 0xdad6, 0xceb9, 0xdad4, 0x003f, - 0x003f, 0x003f, 0x003f, 0xc0fb, 0xdad7, 0x003f, 0x003f, 0xc2b2, - 0x003f, 0x003f, 0xdad8, 0x003f, 0x003f, 0x003f, 0x003f, 0xb4fa, - 0x003f, 0xdada, 0x003f, 0xdad9, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdadb, 0xdadc, 0xb4fb, 0x003f, 0x003f, 0xc6fc, 0xc3b6, 0xb5ec, - 0xbbdd, 0xc1e1, 0x003f, 0x003f, 0xbddc, 0xb0b0, 0x003f, 0x003f, - 0x003f, 0xdadd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb2a2, 0xdae1, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6600 .. 0x66ff */ - 0x003f, 0x003f, 0xb9b7, 0xdae0, 0x003f, 0x003f, 0xbaab, 0xbeba, - 0x003f, 0x003f, 0xdadf, 0x003f, 0xbebb, 0x003f, 0xccc0, 0xbaaa, - 0x003f, 0x003f, 0x003f, 0xb0d7, 0xc0ce, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdae6, 0x003f, 0x003f, 0xc0b1, - 0xb1c7, 0x003f, 0x003f, 0x003f, 0x003f, 0xbdd5, 0x003f, 0xcbe6, - 0xbaf2, 0x003f, 0x003f, 0x003f, 0x003f, 0xbebc, 0x003f, 0xc0a7, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdae5, 0xdae3, 0xdae4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xc3eb, 0x003f, 0x003f, 0xdba6, - 0x003f, 0xdaea, 0xbbfe, 0xb9b8, 0xdae8, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdae9, 0x003f, 0xbfb8, 0x003f, 0x003f, 0x003f, 0xdae7, - 0x003f, 0x003f, 0xbbaf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdaec, 0xdaeb, 0xdaf0, - 0x003f, 0x003f, 0xdaf1, 0x003f, 0xdaed, 0x003f, 0xb3a2, 0xdaee, - 0xdaef, 0xc8d5, 0x003f, 0x003f, 0x003f, 0x003f, 0xc9e1, 0xb7ca, - 0xdaf2, 0x003f, 0x003f, 0x003f, 0xc0b2, 0x003f, 0xbebd, 0x003f, - 0x003f, 0x003f, 0xc3d2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb6c7, 0x003f, 0xdaf3, 0xdaf7, 0x003f, 0x003f, 0xb2cb, - 0xdaf4, 0xdaf6, 0x003f, 0x003f, 0x003f, 0x003f, 0xdaf5, 0x003f, - 0x003f, 0xbdeb, 0x003f, 0x003f, 0x003f, 0x003f, 0xc3c8, 0xb0c5, - 0xdaf8, 0x003f, 0x003f, 0x003f, 0x003f, 0xdaf9, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc4aa, 0x003f, 0x003f, 0x003f, 0xcef1, 0x003f, - 0x003f, 0x003f, 0x003f, 0xbbc3, 0x003f, 0x003f, 0xcaeb, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcbbd, 0x003f, 0x003f, 0x003f, - 0xdba2, 0xdafb, 0x003f, 0x003f, 0xdafe, 0x003f, 0xdafd, 0x003f, - 0x003f, 0xdafa, 0x003f, 0x003f, 0xdba1, 0x003f, 0x003f, 0xc6de, - 0x003f, 0xdafc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdba3, 0x003f, - 0x003f, 0xbdec, 0xdba4, 0x003f, 0xcdcb, 0xc7f8, 0x003f, 0x003f, - 0xdba5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdba7, 0x003f, - 0x003f, 0xdba8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdba9, 0x003f, 0xb6ca, 0xb1c8, 0xb9b9, 0xdbaa, 0x003f, 0xdbab, - 0xbdf1, 0xc1e2, 0x003f, 0x003f, 0xd2d8, 0xc1be, 0xc1bd, 0xc2d8, - /* 0x6700 .. 0x67ff */ - 0xbac7, 0x003f, 0x003f, 0xd0f2, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb7ee, 0xcdad, 0x003f, 0xcafe, 0x003f, 0xc9fe, 0x003f, 0xdbac, - 0x003f, 0x003f, 0x003f, 0x003f, 0xbaf3, 0xc4bf, 0xdbad, 0xcfaf, - 0x003f, 0x003f, 0x003f, 0xcbbe, 0x003f, 0xc4ab, 0xdbae, 0xb4fc, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdbaf, 0xdbb0, - 0xccda, 0x003f, 0xcca4, 0xcbf6, 0xcbdc, 0xbba5, 0xdbb2, 0x003f, - 0x003f, 0xbceb, 0x003f, 0x003f, 0xcbd1, 0x003f, 0xdbb4, 0xdbb7, - 0xdbb6, 0x003f, 0xb4f9, 0x003f, 0x003f, 0xb5e0, 0x003f, 0xdbb3, - 0x003f, 0xdbb5, 0x003f, 0x003f, 0x003f, 0x003f, 0xdbb8, 0x003f, - 0x003f, 0xbff9, 0x003f, 0x003f, 0x003f, 0x003f, 0xcdfb, 0xb0c9, - 0xbae0, 0xc2bc, 0x003f, 0xbcdd, 0x003f, 0x003f, 0xbef3, 0x003f, - 0x003f, 0xdbbb, 0x003f, 0x003f, 0xc5ce, 0x003f, 0xdbb9, 0xc2ab, - 0xdbba, 0xbef2, 0xccdd, 0xdbbc, 0xdbbd, 0xcde8, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdbc2, 0x003f, 0x003f, 0xb9ba, 0x003f, 0xc7d5, - 0xdbbf, 0xc5ec, 0xdade, 0xdae2, 0x003f, 0xb5cf, 0x003f, 0xc7c7, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdbc1, 0x003f, 0xbebe, 0xc8c4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdbc7, 0x003f, 0xc8fa, - 0x003f, 0xdbbe, 0x003f, 0xdbc4, 0xdbc3, 0x003f, 0x003f, 0x003f, - 0xc0cf, 0x003f, 0x003f, 0x003f, 0x003f, 0xcbed, 0x003f, 0xced3, - 0x003f, 0x003f, 0xcbe7, 0x003f, 0xb2cc, 0xbbde, 0x003f, 0x003f, - 0xcfc8, 0xdbc6, 0xbff5, 0x003f, 0x003f, 0x003f, 0xdbc5, 0x003f, - 0x003f, 0xdbc0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb8cf, - 0x003f, 0x003f, 0x003f, 0xdbcc, 0xdbca, 0x003f, 0xb2cd, 0xdbc8, - 0xdbce, 0xdbd4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc2c8, 0x003f, 0x003f, 0xcac1, 0x003f, 0xdbd6, 0x003f, - 0x003f, 0x003f, 0xc9a2, 0x003f, 0x003f, 0x003f, 0xdbd5, 0xc7f0, - 0xcbbf, 0xb4bb, 0x003f, 0xc0f7, 0xbdc0, 0x003f, 0x003f, 0x003f, - 0xc4d3, 0x003f, 0xcdae, 0x003f, 0x003f, 0xdbd1, 0xdbd0, 0x003f, - 0x003f, 0x003f, 0xdbd2, 0x003f, 0xdbcf, 0x003f, 0x003f, 0xdbd7, - 0x003f, 0xdbcd, 0x003f, 0x003f, 0xdbcb, 0x003f, 0xdbd3, 0xdbc9, - 0x003f, 0xc3ec, 0x003f, 0xccf8, 0xbcc6, 0xbaf4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xbaba, 0x003f, 0x003f, 0xcbef, 0xb3c1, - /* 0x6800 .. 0x68ff */ - 0x003f, 0x003f, 0xc4ce, 0xc6ca, 0xb1c9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xc0f2, 0x003f, 0x003f, 0xc0b4, 0xb7aa, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdbd9, 0x003f, - 0x003f, 0xb9bb, 0xb3fc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdbdb, 0xb3f4, 0xdbe1, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdbde, 0x003f, 0xc0f3, 0x003f, 0x003f, 0x003f, - 0xb3cb, 0xbaac, 0x003f, 0x003f, 0xb3ca, 0xbacf, 0x003f, 0x003f, - 0xdbdc, 0xb7e5, 0xb7cb, 0xc5ed, 0x003f, 0x003f, 0xdbda, 0x003f, - 0xb0c6, 0x003f, 0x003f, 0x003f, 0x003f, 0xdbdd, 0xdbdf, 0x003f, - 0xb6cd, 0xb7ac, 0x003f, 0xb4bc, 0xb5cb, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdbe2, 0x003f, 0x003f, 0xbaf9, 0xcbf1, 0x003f, 0xbbb7, - 0x003f, 0x003f, 0x003f, 0xdbe3, 0x003f, 0x003f, 0x003f, 0xc9b0, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdbef, 0x003f, 0xb2b3, 0xdbe4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdbf5, 0xdbe5, - 0x003f, 0xcec2, 0x003f, 0xdbec, 0x003f, 0xc7df, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdbf4, 0x003f, 0xdbe7, - 0x003f, 0x003f, 0x003f, 0xb0b4, 0xdbe9, 0x003f, 0x003f, 0xb9bc, - 0x003f, 0x003f, 0x003f, 0xdbeb, 0x003f, 0xdbea, 0x003f, 0xdbe6, - 0xdbf1, 0x003f, 0xbebf, 0x003f, 0x003f, 0x003f, 0xd4ed, 0xb8e8, - 0xcdfc, 0x003f, 0x003f, 0x003f, 0x003f, 0xdbe8, 0x003f, 0xc4f4, - 0xb3a3, 0xbaad, 0x003f, 0xdbe0, 0x003f, 0xdbf0, 0xb3e1, 0x003f, - 0x003f, 0xdbee, 0xdbf2, 0x003f, 0xc5ee, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xb4fe, 0x003f, 0xdcb2, 0x003f, - 0x003f, 0xccc9, 0xdbf7, 0xb4fd, 0x003f, 0xdbfe, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcbc0, 0x003f, 0xdca1, 0xdca3, 0x003f, 0xdca7, - 0xdbf9, 0x003f, 0xc3aa, 0x003f, 0x003f, 0x003f, 0x003f, 0xc5ef, - 0xdcab, 0xdbfc, 0x003f, 0xdca8, 0x003f, 0x003f, 0x003f, 0xdca2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xbfb9, 0xdcac, - 0x003f, 0x003f, 0xc0b3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdcaa, 0xb4bd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6900 .. 0x69ff */ - 0xcfd0, 0xdbf6, 0x003f, 0x003f, 0xdca6, 0xb0d8, 0x003f, 0x003f, - 0xdbf8, 0x003f, 0x003f, 0xccba, 0xdbfd, 0xbfa2, 0xc4c7, 0xdbf3, - 0x003f, 0x003f, 0xdca5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbffa, 0xdcaf, 0xb3f1, 0xb8a1, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdcb1, 0xdbfa, 0xdcb0, 0x003f, 0xdca9, 0xdbfb, 0x003f, - 0xdcad, 0x003f, 0xdcae, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdcbf, 0x003f, 0x003f, 0x003f, 0xc6ce, 0x003f, 0xdca4, 0x003f, - 0x003f, 0xdcbb, 0x003f, 0x003f, 0x003f, 0xdcbd, 0x003f, 0xc4d8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcdcc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xc9f6, 0xdcb8, 0xc2ca, 0x003f, 0x003f, - 0x003f, 0xdcbe, 0xc1bf, 0x003f, 0xdcb5, 0xdcc2, 0xdcc1, 0x003f, - 0xc6ef, 0xdcc0, 0xc6ea, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdcc4, 0xdcb7, 0x003f, 0xb6c8, 0xdcba, 0xbddd, - 0x003f, 0x003f, 0x003f, 0xc7e0, 0xdcbc, 0xb6cb, 0x003f, 0xdcb4, - 0xdcb6, 0xdcb3, 0x003f, 0x003f, 0xcfb0, 0xb3da, 0xdcb9, 0x003f, - 0x003f, 0xdcc3, 0xb3b5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xbae7, 0x003f, 0x003f, 0x003f, 0xb1dd, 0x003f, - 0x003f, 0xdcd4, 0x003f, 0x003f, 0xcfb1, 0xdcd7, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xbfba, 0xdcd6, 0x003f, 0x003f, 0x003f, - 0xdcd5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdcd2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdcc6, 0x003f, - 0x003f, 0xdce3, 0xdcc5, 0x003f, 0xdcd8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdcd0, 0x003f, 0x003f, 0xdccb, 0xdcc8, - 0x003f, 0xdcc9, 0x003f, 0xdcd1, 0x003f, 0x003f, 0x003f, 0xf4a2, - 0x003f, 0x003f, 0xdcce, 0xb9bd, 0xc4c8, 0xc1e4, 0xdccc, 0x003f, - 0xdcc7, 0x003f, 0x003f, 0xdcca, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcdcd, 0xcbea, 0x003f, 0x003f, 0x003f, 0xdccf, 0xdcd9, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdce1, - 0xdcda, 0x003f, 0x003f, 0xdce7, 0x003f, 0xdce5, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdce0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdcdf, 0x003f, 0xc4d0, 0x003f, 0xc1e5, 0x003f, 0xdcdd, - /* 0x6a00 .. 0x6aff */ - 0x003f, 0x003f, 0xdcdb, 0x003f, 0x003f, 0xdce2, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdce8, 0xc8f5, 0xdcee, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdce9, 0xdcec, 0xdce6, 0x003f, 0x003f, 0xc3f4, - 0x003f, 0xc9b8, 0x003f, 0xdcdc, 0x003f, 0x003f, 0xdce4, 0xbec0, - 0x003f, 0xcccf, 0xdcf8, 0xdceb, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb8a2, 0xb2a3, 0xb3df, 0x003f, 0x003f, 0xdcd3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xbec1, 0xdcf0, 0x003f, - 0xdcf7, 0xbcf9, 0xb3f2, 0x003f, 0x003f, 0xc3ae, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdced, 0x003f, 0x003f, 0xdcf2, - 0xdcf6, 0x003f, 0x003f, 0xb6b6, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb5cc, 0xdcf4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb5a1, - 0x003f, 0xc6cb, 0xdcf3, 0x003f, 0x003f, 0x003f, 0xdcf5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdcef, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdcf1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb3e0, - 0xc3c9, 0x003f, 0x003f, 0x003f, 0xdcfc, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdcfa, 0xb8e9, 0x003f, - 0xdcf9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdda1, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdbd8, 0x003f, 0x003f, 0x003f, - 0xdcfb, 0x003f, 0xdcfd, 0xdcfe, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xddac, 0x003f, 0xdda8, 0x003f, 0xdbed, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdda7, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdda6, 0x003f, 0x003f, 0xdda3, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdcea, 0xdda5, 0xdda4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xddaa, 0x003f, 0xcfa6, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xddad, 0xb6fb, 0x003f, 0x003f, 0xdda9, 0xddab, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xc8a7, 0x003f, 0xddae, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xddb2, 0xddaf, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6b00 .. 0x6bff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0xcdf3, 0xddb0, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdcde, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xddb3, 0x003f, 0x003f, 0x003f, 0xddb4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb1b5, 0x003f, 0xddb6, - 0xb7e7, 0xbca1, 0x003f, 0xb6d5, 0x003f, 0x003f, 0x003f, 0xb2a4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcddf, 0x003f, 0x003f, 0x003f, 0x003f, 0xddb8, - 0xddb7, 0xddba, 0xb5bd, 0x003f, 0x003f, 0xb6d6, 0xb4be, 0x003f, - 0x003f, 0x003f, 0x003f, 0xddbd, 0x003f, 0x003f, 0x003f, 0xddbc, - 0x003f, 0xddbe, 0x003f, 0x003f, 0xb2ce, 0x003f, 0xc3b7, 0x003f, - 0xddbf, 0x003f, 0x003f, 0xb4bf, 0xddc1, 0x003f, 0x003f, 0x003f, - 0x003f, 0xddc0, 0x003f, 0xddc2, 0x003f, 0x003f, 0x003f, 0xddc3, - 0x003f, 0xddc4, 0xbbdf, 0xc0b5, 0xbaa1, 0x003f, 0xc9f0, 0x003f, - 0x003f, 0xcae2, 0xcfc4, 0x003f, 0x003f, 0x003f, 0x003f, 0xbbf5, - 0x003f, 0x003f, 0x003f, 0xbad0, 0xcef2, 0x003f, 0x003f, 0x003f, - 0xddc5, 0xddc6, 0x003f, 0xbbe0, 0x003f, 0x003f, 0x003f, 0xddc7, - 0xddc8, 0x003f, 0x003f, 0xddca, 0xddc9, 0x003f, 0xcbd8, 0x003f, - 0x003f, 0xbdde, 0xbcec, 0xbbc4, 0x003f, 0xddcb, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xddcd, 0xbfa3, 0x003f, - 0xddcc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xddce, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xddcf, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xddd0, 0xddd1, 0x003f, 0x003f, 0x003f, 0xddd2, - 0x003f, 0xddd4, 0xddd3, 0xddd5, 0xb2a5, 0xc3ca, 0x003f, 0xddd6, - 0x003f, 0x003f, 0xbba6, 0xb3cc, 0xddd7, 0x003f, 0x003f, 0xc5c2, - 0xd4cc, 0x003f, 0x003f, 0x003f, 0x003f, 0xb5a3, 0xddd8, 0x003f, - 0x003f, 0x003f, 0x003f, 0xddd9, 0x003f, 0xcaec, 0xcbe8, 0x003f, - 0x003f, 0x003f, 0xc6c7, 0xddda, 0xc8e6, 0x003f, 0x003f, 0x003f, - 0xc8fb, 0x003f, 0x003f, 0xccd3, 0x003f, 0x003f, 0x003f, 0xdddb, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdddd, 0xdddc, 0x003f, 0x003f, 0xdddf, - 0x003f, 0x003f, 0x003f, 0xddde, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6c00 .. 0x6cff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdde1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xbbe1, - 0x003f, 0xccb1, 0x003f, 0xdde2, 0xdde3, 0x003f, 0x003f, 0xb5a4, - 0x003f, 0x003f, 0x003f, 0xdde4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdde6, 0xdde5, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xbfe5, 0x003f, 0x003f, 0xc9b9, - 0xb1ca, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc8c5, 0x003f, - 0xc4f5, 0xbdc1, 0xb5e1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc8c6, 0x003f, - 0xbcae, 0x003f, 0x003f, 0x003f, 0x003f, 0xdde8, 0x003f, 0xb4c0, - 0x003f, 0x003f, 0xb1f8, 0x003f, 0x003f, 0xc6f2, 0xdde7, 0xb9be, - 0xc3d3, 0x003f, 0xdde9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xddf1, 0x003f, 0xddea, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xc2c1, 0x003f, 0xb5e2, 0xddf2, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb7e8, 0x003f, 0x003f, 0xb5a5, 0xddf0, 0x003f, - 0x003f, 0xddee, 0xddeb, 0xcde0, 0x003f, 0x003f, 0x003f, 0x003f, - 0xc4c0, 0x003f, 0x003f, 0x003f, 0xc6d9, 0xddec, 0x003f, 0x003f, - 0xddf4, 0x003f, 0xddf3, 0xb7a3, 0x003f, 0x003f, 0xb2ad, 0x003f, - 0x003f, 0xbabb, 0xdded, 0xddef, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcbd7, 0xc2f4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcbf7, 0x003f, 0x003f, 0xddfc, 0x003f, - 0x003f, 0xddfd, 0x003f, 0xb2cf, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcaa8, 0xccfd, 0xdea1, 0xbca3, 0xbec2, 0xddf8, 0xddfe, 0xb1e8, - 0x003f, 0xb6b7, 0x003f, 0x003f, 0xddf5, 0xddfa, 0x003f, 0x003f, - 0x003f, 0xc0f4, 0xc7f1, 0x003f, 0xc8e7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xddf7, 0x003f, 0xcba1, 0x003f, 0xddf9, - 0x003f, 0xdea4, 0x003f, 0xdea2, 0x003f, 0xddfb, 0x003f, 0x003f, - 0x003f, 0xcba2, 0xc7c8, 0xb5e3, 0x003f, 0xc5a5, 0x003f, 0x003f, - 0xc3ed, 0x003f, 0xdea5, 0x003f, 0x003f, 0x003f, 0x003f, 0xdea3, - 0xc2d9, 0xddf6, 0x003f, 0xb1cb, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6d00 .. 0x6dff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcdce, 0xdeb0, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdeaf, 0x003f, 0x003f, 0x003f, 0x003f, 0xc0f6, - 0x003f, 0xdeac, 0x003f, 0xcdec, 0x003f, 0x003f, 0xc6b6, 0xdea6, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc4c5, 0x003f, 0x003f, - 0x003f, 0xb1cc, 0xb9bf, 0xdea9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xbda7, 0xdeae, 0x003f, 0xdead, 0xdea8, 0x003f, - 0xdeab, 0x003f, 0x003f, 0xb3e8, 0x003f, 0xdeaa, 0xc7c9, 0x003f, - 0x003f, 0xceae, 0x003f, 0x003f, 0xbef4, 0xc0f5, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdeb6, 0xdeb4, 0x003f, 0xc9cd, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdeb1, 0xdeb3, 0x003f, 0xb1ba, 0x003f, - 0x003f, 0xb9c0, 0xcfb2, 0x003f, 0xb3bd, 0x003f, 0xc9e2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcde1, 0x003f, 0x003f, 0xb3a4, - 0xbfbb, 0xdeb5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdeba, 0x003f, 0x003f, - 0xbec3, 0x003f, 0x003f, 0x003f, 0xcdb0, 0x003f, 0xdeb7, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdeb2, 0x003f, 0xdeb8, 0x003f, 0x003f, - 0x003f, 0xcede, 0x003f, 0xc5f3, 0xc6c2, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb3b6, - 0x003f, 0x003f, 0xb1d5, 0x003f, 0x003f, 0xdebe, 0x003f, 0x003f, - 0xdec1, 0x003f, 0x003f, 0x003f, 0xcec3, 0x003f, 0x003f, 0x003f, - 0xcde4, 0x003f, 0x003f, 0x003f, 0x003f, 0xdec8, 0xdec2, 0xdebf, - 0x003f, 0x003f, 0x003f, 0xced4, 0xdec5, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbdca, 0xdec7, 0x003f, 0x003f, 0xdecc, 0x003f, 0x003f, - 0xc5f1, 0xdeca, 0x003f, 0x003f, 0x003f, 0x003f, 0xdec4, 0x003f, - 0x003f, 0xc3b8, 0x003f, 0x003f, 0xdecb, 0x003f, 0xdec0, 0x003f, - 0xdec6, 0x003f, 0xdecd, 0xb0fc, 0xdec3, 0x003f, 0xdece, 0x003f, - 0x003f, 0xbfbc, 0x003f, 0xbddf, 0x003f, 0xcaa5, 0x003f, 0xbaae, - 0x003f, 0xdebb, 0xdec9, 0xc5ba, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6e00 .. 0x6eff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc0b6, 0x003f, 0xb3e9, - 0xbad1, 0xbec4, 0xdebd, 0xbdc2, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb7cc, 0x003f, 0xdebc, 0x003f, 0x003f, - 0x003f, 0xded2, 0xbded, 0xb8ba, 0x003f, 0xdee1, 0x003f, 0xdedb, - 0xb5f4, 0xc5cf, 0x003f, 0xded6, 0xdedf, 0xb0af, 0xb1b2, 0x003f, - 0x003f, 0xb2b9, 0x003f, 0xded8, 0xc2ac, 0xdecf, 0xded1, 0xb9c1, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdee2, 0x003f, 0xdedd, 0x003f, 0x003f, 0x003f, 0xded5, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdedc, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xccab, 0x003f, 0x003f, 0xdeda, 0xdede, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb8d0, 0x003f, - 0xbec5, 0x003f, 0x003f, 0xc3b9, 0x003f, 0x003f, 0x003f, 0xded4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcdaf, - 0x003f, 0x003f, 0x003f, 0xded7, 0x003f, 0x003f, 0xded0, 0xc5f2, - 0x003f, 0x003f, 0xded3, 0x003f, 0x003f, 0x003f, 0xded9, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcfd1, 0xbcbe, - 0xcbfe, 0x003f, 0xdee3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xc8ae, 0x003f, 0x003f, 0xdeef, - 0xb8bb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xbde0, 0x003f, - 0xdee5, 0x003f, 0x003f, 0x003f, 0xceaf, 0xb9c2, 0x003f, 0xdef2, - 0x003f, 0x003f, 0xb0ee, 0x003f, 0x003f, 0xdef0, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdee4, 0x003f, 0x003f, 0x003f, 0x003f, 0xdeea, - 0x003f, 0x003f, 0xdeec, 0x003f, 0x003f, 0x003f, 0xcdcf, 0xdee7, - 0x003f, 0x003f, 0xc5ae, 0x003f, 0x003f, 0xdee9, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdef1, 0x003f, 0xdeeb, 0xccc7, 0x003f, 0x003f, - 0x003f, 0xdee6, 0x003f, 0xbca2, 0xdefe, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb3ea, 0x003f, 0xdee8, 0xdeed, 0xdeee, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc2ec, 0xc2da, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdef6, 0x003f, 0x003f, 0xdefc, - 0x003f, 0x003f, 0xdefa, 0x003f, 0xc5a9, 0x003f, 0x003f, 0xdfa3, - 0xdef7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdef8, 0xdee0, - /* 0x6f00 .. 0x6fff */ - 0x003f, 0xb5f9, 0xc9ba, 0x003f, 0x003f, 0x003f, 0xbcbf, 0x003f, - 0x003f, 0xb9f7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcfb3, - 0x003f, 0xdef4, 0x003f, 0xdfa2, 0xb1e9, 0xc1e6, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xc7f9, 0x003f, 0xb4c1, 0xcefa, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcca1, 0xc4d2, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdefb, 0xdefd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xc1b2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdfa1, 0xdef9, - 0x003f, 0xdef3, 0x003f, 0x003f, 0x003f, 0xb4c3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xb7e9, 0x003f, 0x003f, 0x003f, - 0xdfaf, 0x003f, 0x003f, 0xdfaa, 0xc0f8, 0x003f, 0x003f, 0xb3e3, - 0x003f, 0x003f, 0x003f, 0x003f, 0xbde1, 0x003f, 0xdfb3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdfac, 0xc4ac, 0xdfa9, - 0xc4d9, 0x003f, 0x003f, 0x003f, 0xdfcc, 0x003f, 0x003f, 0x003f, - 0xdfa6, 0x003f, 0xdfa5, 0x003f, 0xdfae, 0x003f, 0x003f, 0x003f, - 0xdfa8, 0xdfa7, 0xdfad, 0x003f, 0xc0a1, 0x003f, 0xdfa4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdfb0, 0x003f, - 0x003f, 0xdfb1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb4c2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdfb6, 0x003f, 0xdfb5, 0xdfb7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdfba, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc5c3, 0x003f, 0xdfb4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdfb8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb7e3, 0xc2f9, 0xdfb2, 0xc7bb, 0x003f, 0x003f, 0xdfb9, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdfbe, 0xdfbc, 0x003f, 0x003f, - 0xdfbf, 0x003f, 0x003f, 0xdfc2, 0x003f, 0x003f, 0x003f, 0xdfbb, - 0xb9ea, 0xc7a8, 0x003f, 0x003f, 0xdeb9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcdf4, 0xdfbd, 0x003f, 0xdfc1, 0xc2f5, - 0x003f, 0xdfc0, 0x003f, 0xdfab, 0x003f, 0x003f, 0xefe9, 0x003f, - 0x003f, 0x003f, 0xdfc5, 0x003f, 0x003f, 0x003f, 0xdfc9, 0x003f, - /* 0x7000 .. 0x70ff */ - 0x003f, 0xdfc7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdfc3, 0x003f, 0xdfc4, 0x003f, 0x003f, 0x003f, 0xdfc8, - 0x003f, 0xdfc6, 0x003f, 0x003f, 0x003f, 0xc9ce, 0x003f, 0x003f, - 0xdfce, 0x003f, 0xdfcb, 0xdfca, 0x003f, 0xdfcd, 0xc6d4, 0xdfcf, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc3f5, 0xc2ed, - 0x003f, 0x003f, 0x003f, 0x003f, 0xc0a5, 0x003f, 0x003f, 0x003f, - 0xdfd0, 0x003f, 0xdfd2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdfd1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdef5, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdfd3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xc6e7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdfd4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb2d0, 0x003f, 0x003f, 0x003f, 0xc5f4, - 0xb3a5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb5e4, 0x003f, 0x003f, 0x003f, 0xbcde, 0xbad2, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcfa7, 0xbfe6, 0x003f, 0x003f, 0x003f, 0xb1ea, 0x003f, - 0x003f, 0x003f, 0xdfd6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdfd5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdfd9, 0xc3ba, 0xdfdc, 0xdfd7, - 0x003f, 0x003f, 0x003f, 0xdfdb, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdfda, 0xc5c0, 0xb0d9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcef5, 0x003f, 0x003f, 0xdfde, 0x003f, 0x003f, 0x003f, 0xb1a8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdfe0, 0x003f, 0x003f, 0x003f, 0xdfdf, 0x003f, 0xdfdd, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdfd8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcba3, 0x003f, 0x003f, 0x003f, 0xdfe2, 0x003f, 0x003f, - /* 0x7100 .. 0x71ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdfe1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xb1eb, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdfe4, 0xcab2, 0x003f, 0xdfe3, 0x003f, 0x003f, 0x003f, - 0x003f, 0xccb5, 0x003f, 0x003f, 0x003f, 0x003f, 0xbec7, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc1b3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xbec6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcefb, 0x003f, 0x003f, 0xdfea, 0x003f, 0xc0f9, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdfe6, 0xdfeb, 0x003f, - 0x003f, 0xb1ec, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdfe9, 0x003f, 0xc7e1, 0xdfe5, 0xdfe8, 0xbec8, - 0x003f, 0xc8d1, 0x003f, 0x003f, 0xdfec, 0x003f, 0xbcd1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc0fa, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdfef, 0x003f, 0x003f, 0x003f, - 0xdfe7, 0x003f, 0xb7a7, 0x003f, 0x003f, 0x003f, 0x003f, 0xdfed, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcdd0, 0xdff0, 0x003f, 0x003f, - 0x003f, 0xf4a6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xbdcf, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdff1, 0x003f, 0x003f, 0x003f, 0xdff2, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc7ae, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdff4, 0x003f, 0x003f, 0x003f, 0x003f, 0xdff5, 0x003f, - 0x003f, 0x003f, 0x003f, 0xc7b3, 0x003f, 0x003f, 0x003f, 0x003f, - 0xc5f5, 0xdff7, 0x003f, 0x003f, 0x003f, 0x003f, 0xdff9, 0x003f, - 0xced5, 0x003f, 0xdff6, 0x003f, 0xdff8, 0xb1ed, 0x003f, 0xdff3, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd3db, - 0xdffa, 0x003f, 0x003f, 0x003f, 0x003f, 0xc1e7, 0xbbb8, 0xdffc, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdffb, 0xbfa4, 0xd2d9, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdffd, 0x003f, 0x003f, - 0x003f, 0xe0a1, 0x003f, 0xdfee, 0xdffe, 0x003f, 0x003f, 0xe0a2, - /* 0x7200 .. 0x72ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc7fa, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0a3, 0x003f, 0x003f, - 0xe0a4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe0a5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe0a6, 0x003f, 0xc4de, 0x003f, 0xe0a8, 0xe0a7, 0x003f, 0x003f, - 0xe0a9, 0x003f, 0xe0aa, 0x003f, 0x003f, 0xbcdf, 0xc9e3, 0x003f, - 0x003f, 0x003f, 0xccec, 0xe0ab, 0xe0ac, 0xc1d6, 0xbca4, 0xe0ad, - 0xe0ae, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0af, 0xcad2, - 0xc8c7, 0x003f, 0x003f, 0xe0b0, 0xc7d7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc4ad, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe0b1, 0xb2e7, 0x003f, 0xb5ed, 0x003f, 0xccc6, 0x003f, 0xccb6, - 0x003f, 0xb2b4, 0xcfb4, 0x003f, 0x003f, 0x003f, 0x003f, 0xcbd2, - 0x003f, 0xcaaa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc0b7, 0x003f, 0xe0b2, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc6c3, 0x003f, 0x003f, 0x003f, 0xb8a3, 0xe0b3, 0x003f, - 0xbad4, 0xe0b5, 0xe0b4, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0b6, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe0b7, 0x003f, 0x003f, 0x003f, 0xe0b8, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb5be, 0x003f, 0xe0b9, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0ba, - 0x003f, 0x003f, 0x003f, 0x003f, 0xb8a4, 0x003f, 0x003f, 0xc8c8, - 0x003f, 0x003f, 0xe0bc, 0x003f, 0x003f, 0x003f, 0xbef5, 0x003f, - 0x003f, 0xe0bb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb6b8, 0xe0bd, 0xe0bf, 0x003f, 0xe0be, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0c0, 0x003f, - 0xb8d1, 0x003f, 0xe0c1, 0x003f, 0x003f, 0x003f, 0x003f, 0xb6e9, - 0x003f, 0xc1c0, 0x003f, 0xb9fd, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe0c3, 0xe0c4, 0xe0c2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbced, 0x003f, 0x003f, 0xc6c8, 0xb6b9, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0c6, - 0xc3ac, 0xe0c5, 0x003f, 0x003f, 0xcfb5, 0xc7e2, 0x003f, 0x003f, - /* 0x7300 .. 0x73ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe0c9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0cb, 0xe0c8, - 0x003f, 0x003f, 0x003f, 0xccd4, 0xe0ca, 0xe0cc, 0x003f, 0xcec4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0d0, 0x003f, 0x003f, - 0x003f, 0xe0cf, 0xc3f6, 0xc7ad, 0x003f, 0x003f, 0xb8a5, 0xe0ce, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe0cd, 0x003f, 0xcdb1, 0xcdb2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0d1, 0xb1ee, - 0x003f, 0x003f, 0x003f, 0x003f, 0xb9f6, 0xbbe2, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0d2, 0xe0d3, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0d5, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xbdc3, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe0d7, 0x003f, 0xe0d6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe0d8, 0x003f, 0xb3cd, 0x003f, 0x003f, 0xe0da, 0x003f, 0x003f, - 0xe0d9, 0x003f, 0xe0dc, 0xe0db, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xb8bc, 0x003f, 0x003f, 0xcea8, - 0x003f, 0xb6cc, 0x003f, 0xb2a6, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb6ea, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb4e1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcee8, 0xe0de, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe0e0, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe0e1, 0x003f, 0xb2d1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe0dd, 0x003f, 0xbbb9, 0x003f, 0x003f, 0xc4c1, 0xe0df, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0e4, 0x003f, - 0xbcee, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0e2, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb7be, 0x003f, 0x003f, 0xc8c9, 0xe0e3, 0x003f, - 0x003f, 0xe0fe, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe0e9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb8bd, 0x003f, - /* 0x7400 .. 0x74ff */ - 0x003f, 0x003f, 0x003f, 0xb5e5, 0x003f, 0xe0e6, 0xcdfd, 0x003f, - 0x003f, 0xceb0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc2f6, 0x003f, 0x003f, 0xe0e8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe0ea, 0xced6, 0xb6d7, 0xc8fc, 0xc7ca, 0x003f, - 0x003f, 0x003f, 0xe0eb, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0ed, - 0x003f, 0xe0f0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0ec, 0x003f, 0x003f, - 0x003f, 0xe0ef, 0xb8ea, 0xb1cd, 0xe0f1, 0x003f, 0xbff0, 0xe0ee, - 0xcedc, 0x003f, 0x003f, 0xe0f4, 0xf4a4, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe0f2, 0xe0f5, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0e7, - 0xe0f3, 0x003f, 0x003f, 0xbabc, 0x003f, 0x003f, 0xe0f6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0f7, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcdfe, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe0f8, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0f9, 0x003f, - 0x003f, 0x003f, 0xe0e5, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0fa, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb4c4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xbca5, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe0fb, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0fc, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe0fd, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xb1bb, 0x003f, 0x003f, 0x003f, - 0xe1a1, 0x003f, 0xc9bb, 0xe1a2, 0x003f, 0x003f, 0xb4a4, 0xe1a3, - 0x003f, 0xe1a4, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1a5, 0x003f, - 0xe1a7, 0xe1a8, 0xe1a6, 0x003f, 0x003f, 0x003f, 0xc9d3, 0xe1aa, - 0xe1a9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7500 .. 0x75ff */ - 0x003f, 0x003f, 0x003f, 0xe1ac, 0xe1ab, 0xe1ad, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe1ae, 0xe1b0, 0xe1af, 0x003f, - 0x003f, 0xb9f9, 0x003f, 0xe1b2, 0x003f, 0xe1b1, 0x003f, 0x003f, - 0xb4c5, 0x003f, 0xbfd3, 0x003f, 0xc5bc, 0x003f, 0xe1b3, 0xc0b8, - 0x003f, 0x003f, 0x003f, 0xbbba, 0x003f, 0xb1f9, 0xe1b4, 0x003f, - 0xcdd1, 0x003f, 0x003f, 0xcae3, 0xe1b5, 0x003f, 0x003f, 0x003f, - 0xc5c4, 0xcdb3, 0xb9c3, 0xbfbd, 0x003f, 0x003f, 0x003f, 0xc3cb, - 0xd2b4, 0x003f, 0xc4ae, 0xb2e8, 0xe1b6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe1b7, 0x003f, 0xe1bc, 0x003f, - 0x003f, 0xe1ba, 0xe1b9, 0xdac2, 0xb3a6, 0xe1b8, 0x003f, 0xb0da, - 0x003f, 0xc8aa, 0x003f, 0x003f, 0xc8ca, 0x003f, 0x003f, 0x003f, - 0x003f, 0xceb1, 0xe1bd, 0xe1bb, 0xc3dc, 0xc0a6, 0x003f, 0x003f, - 0xc8ab, 0x003f, 0xc9ad, 0x003f, 0xe1bf, 0xceac, 0xb7cd, 0xe1c0, - 0x003f, 0xe1be, 0xc8d6, 0xe1c1, 0x003f, 0xe1c2, 0x003f, 0x003f, - 0xb0db, 0x003f, 0x003f, 0xbef6, 0xe1c7, 0x003f, 0xe1c4, 0xc6ed, - 0xe1c3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb5a6, - 0x003f, 0x003f, 0xe1ca, 0x003f, 0x003f, 0x003f, 0xe1c5, 0xe1c6, - 0x003f, 0xe1c9, 0xe1c8, 0xc9a5, 0x003f, 0x003f, 0xc1c2, 0xc1c1, - 0x003f, 0xb5bf, 0x003f, 0x003f, 0xe1cb, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe1cc, 0x003f, 0x003f, 0xe1cd, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe1cf, 0x003f, 0xe1ce, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb1d6, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe1d7, 0xc8e8, 0xe1d1, 0x003f, 0xe1d3, 0x003f, 0x003f, - 0xe1d5, 0xbfbe, 0x003f, 0x003f, 0xe1d6, 0xe1d4, 0xbcc0, 0x003f, - 0x003f, 0x003f, 0xe1d0, 0xe1d2, 0x003f, 0xc9c2, 0x003f, 0xbec9, - 0x003f, 0x003f, 0xe1d9, 0x003f, 0x003f, 0xe1d8, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe1da, 0x003f, 0xbca6, 0xbaaf, 0x003f, 0x003f, - 0xc5f7, 0xe1db, 0x003f, 0xc4cb, 0x003f, 0x003f, 0xe1dd, 0x003f, - 0x003f, 0x003f, 0xcea1, 0xe1dc, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc1e9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe1e2, 0x003f, 0xe1e4, 0xe1e5, 0xc3d4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe1e3, 0x003f, 0xe1e0, 0x003f, 0xe1de, 0xe1df, - /* 0x7600 .. 0x76ff */ - 0x003f, 0xe1e1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe1e8, 0x003f, 0xe1e6, 0x003f, 0xe1e7, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1e9, - 0xe1eb, 0xe1ec, 0xe1ed, 0x003f, 0xe1ee, 0x003f, 0x003f, 0xe1ea, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe1f0, 0x003f, 0x003f, 0x003f, 0xe1ef, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe1f1, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcec5, 0x003f, 0x003f, 0x003f, 0xe1f4, 0xe1f2, - 0xe1f3, 0x003f, 0x003f, 0x003f, 0xb4e2, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xccfe, 0x003f, 0x003f, 0x003f, 0xcaca, 0x003f, - 0xe1f6, 0x003f, 0x003f, 0x003f, 0xe1f5, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe1f7, 0xe1f8, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1fc, - 0xe1f9, 0xe1fa, 0xe1fb, 0x003f, 0xe1fd, 0x003f, 0x003f, 0x003f, - 0xe1fe, 0x003f, 0xe2a1, 0x003f, 0x003f, 0x003f, 0xe2a2, 0x003f, - 0xe2a3, 0x003f, 0xc8af, 0xc5d0, 0xe2a4, 0xc7f2, 0xc9b4, 0x003f, - 0xe2a5, 0x003f, 0x003f, 0xe2a6, 0xc5aa, 0x003f, 0xb3a7, 0xb9c4, - 0xe2a7, 0x003f, 0x003f, 0xe2a8, 0x003f, 0x003f, 0xe2a9, 0x003f, - 0xbba9, 0x003f, 0x003f, 0xe2ab, 0x003f, 0x003f, 0xe2aa, 0x003f, - 0x003f, 0xe2ac, 0xe2ad, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc8e9, 0x003f, - 0xe2ae, 0x003f, 0x003f, 0x003f, 0xe2af, 0x003f, 0x003f, 0xf3e9, - 0xe2b0, 0xe2b1, 0xe2b2, 0x003f, 0x003f, 0x003f, 0x003f, 0xbbae, - 0x003f, 0x003f, 0xe2b3, 0xc7d6, 0x003f, 0x003f, 0xcbdf, 0x003f, - 0xb1ce, 0x003f, 0xb1d7, 0x003f, 0x003f, 0xe2b4, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe2b6, 0x003f, 0x003f, 0x003f, 0xe2b5, 0xc5f0, - 0x003f, 0x003f, 0x003f, 0xc0b9, 0xddb9, 0x003f, 0xe2b7, 0xccc1, - 0x003f, 0xe2b8, 0x003f, 0xb4c6, 0xc8d7, 0xe2b9, 0x003f, 0xe2ba, - 0x003f, 0x003f, 0xe2bb, 0x003f, 0x003f, 0x003f, 0xccdc, 0x003f, - 0x003f, 0x003f, 0xccd5, 0x003f, 0xc4be, 0x003f, 0x003f, 0x003f, - 0xc1ea, 0x003f, 0x003f, 0xe2bd, 0x003f, 0x003f, 0xbde2, 0x003f, - /* 0x7700 .. 0x77ff */ - 0x003f, 0xbeca, 0x003f, 0x003f, 0xe2c0, 0x003f, 0x003f, 0xe2bf, - 0xe2be, 0xc8fd, 0x003f, 0xb4c7, 0xb8a9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe2c6, 0x003f, 0x003f, 0xe2c3, 0xbfbf, - 0xccb2, 0x003f, 0x003f, 0x003f, 0xe2c2, 0xe2c4, 0xe2c5, 0x003f, - 0x003f, 0xe2c1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2c7, - 0xe2c8, 0x003f, 0xc4af, 0x003f, 0xb4e3, 0x003f, 0x003f, 0x003f, - 0xc3e5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2c9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe2ca, 0xe2cd, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbfe7, 0x003f, 0xc6c4, 0x003f, 0xe2ce, 0xcbd3, 0x003f, - 0xe2cb, 0x003f, 0x003f, 0xe2cc, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe2d1, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2d0, 0xe2cf, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe2d3, 0x003f, 0x003f, 0xe2d2, 0x003f, - 0x003f, 0xe2d4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2d6, 0x003f, - 0xe2d5, 0x003f, 0x003f, 0x003f, 0x003f, 0xcacd, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xbdd6, 0xcec6, 0x003f, 0x003f, - 0xe2d7, 0x003f, 0x003f, 0xc6b7, 0x003f, 0x003f, 0xe2d8, 0x003f, - 0x003f, 0xe2d9, 0x003f, 0xe2dd, 0xe2db, 0xe2dc, 0x003f, 0xe2da, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2de, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2df, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2e0, - 0x003f, 0x003f, 0xe2e1, 0xccb7, 0xe2e2, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xccf0, 0xe2e3, 0x003f, 0xc3ce, 0x003f, 0xc7ea, - 0x003f, 0xb6eb, 0x003f, 0x003f, 0x003f, 0xc3bb, 0xe2e4, 0xb6ba, - 0x003f, 0x003f, 0x003f, 0xc0d0, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe2e5, 0x003f, 0x003f, 0x003f, - /* 0x7800 .. 0x78ff */ - 0x003f, 0x003f, 0xbabd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe2e6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe2e7, 0x003f, 0xb8a6, 0xbad5, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe2e9, 0x003f, 0x003f, 0x003f, 0x003f, 0xc5d6, 0xbad6, 0xb5ce, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcba4, 0x003f, 0xc7cb, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc5d7, 0x003f, 0x003f, 0x003f, 0x003f, 0xb9dc, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2eb, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xbecb, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xceb2, 0xb9c5, 0x003f, 0x003f, 0xb8a7, - 0x003f, 0x003f, 0xc8a3, 0x003f, 0xe2ed, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe2ef, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb8eb, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2ee, 0xc4f6, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe2f1, 0xb3b7, 0xe2ec, 0x003f, - 0x003f, 0xc8ea, 0x003f, 0xb1b0, 0x003f, 0xbaec, 0x003f, 0xcfd2, - 0x003f, 0x003f, 0xe2f0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe2f2, 0x003f, 0x003f, 0x003f, 0xcacb, - 0x003f, 0xc0d9, 0xe2f4, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2f5, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2f3, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb3ce, 0x003f, 0xe2fb, 0x003f, 0xe2fa, 0x003f, - 0x003f, 0xbca7, 0x003f, 0x003f, 0x003f, 0xe2fc, 0xe2f7, 0x003f, - 0x003f, 0x003f, 0xe2fd, 0xe2f8, 0x003f, 0x003f, 0x003f, 0x003f, - 0xc8d8, 0xe2f6, 0x003f, 0x003f, 0xe2f9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe3a2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3a1, - 0xcbe1, 0x003f, 0x003f, 0x003f, 0xe2fe, 0x003f, 0x003f, 0xb0eb, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe3a4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3a3, 0x003f, 0x003f, - /* 0x7900 .. 0x79ff */ - 0x003f, 0xbecc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3a5, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc1c3, 0x003f, - 0x003f, 0xe3a7, 0xe3a6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe3a8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2e8, 0x003f, - 0x003f, 0x003f, 0xe2ea, 0xe3aa, 0xe3a9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xbca8, 0x003f, 0xcee9, 0x003f, 0xbcd2, 0x003f, - 0xe3ab, 0xb7b7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb5c0, - 0xb5a7, 0xbbe3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcdb4, 0x003f, 0x003f, 0xe3b1, 0x003f, 0xe3b0, 0xc1c4, 0xe3ad, - 0x003f, 0x003f, 0xe3af, 0x003f, 0x003f, 0xbdcb, 0xbfc0, 0xe3ae, - 0xe3ac, 0x003f, 0xc7aa, 0x003f, 0x003f, 0xbecd, 0x003f, 0x003f, - 0xc9bc, 0x003f, 0x003f, 0x003f, 0x003f, 0xbad7, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc5f8, - 0x003f, 0x003f, 0xe3b2, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3b3, - 0xe3c9, 0xb6d8, 0x003f, 0x003f, 0xcfbd, 0xc1b5, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe3b4, 0x003f, 0x003f, 0xb2d2, 0xc4f7, 0xcaa1, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3b5, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb5fa, 0xe3b6, - 0x003f, 0x003f, 0xe3b8, 0x003f, 0x003f, 0x003f, 0xe3b9, 0x003f, - 0xc7a9, 0x003f, 0x003f, 0xe3ba, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe3bb, 0xe3bc, 0x003f, 0x003f, 0xb6d9, 0xb2d3, 0xc6c5, - 0xbda8, 0xbbe4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe3bd, 0x003f, 0xbda9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb2ca, 0xc9c3, 0x003f, 0x003f, 0xe3be, 0x003f, 0x003f, - 0xc8eb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc1c5, - 0x003f, 0xe3c1, 0x003f, 0xe3c2, 0xc7e9, 0x003f, 0xbfc1, 0xe3bf, - 0x003f, 0xc3e1, 0x003f, 0x003f, 0xe3c0, 0x003f, 0x003f, 0x003f, - 0xbece, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb0dc, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7a00 .. 0x7aff */ - 0xb5a9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe3c3, 0x003f, 0x003f, 0xc4f8, 0x003f, 0xe3c4, 0xc0c7, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xccad, 0x003f, 0x003f, 0xc9a3, - 0xe3c5, 0xe3c6, 0xc3d5, 0x003f, 0xcec7, 0x003f, 0x003f, 0xe3c8, - 0xe3c7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xbcef, 0x003f, - 0x003f, 0xe3ca, 0xb0f0, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3cd, - 0x003f, 0x003f, 0x003f, 0xe3cb, 0xb2d4, 0xb7ce, 0xe3cc, 0xb9c6, - 0xb9f2, 0x003f, 0xcae6, 0xe3ce, 0x003f, 0x003f, 0xcbd4, 0x003f, - 0x003f, 0xe3d0, 0x003f, 0x003f, 0x003f, 0xc0d1, 0xb1cf, 0xb2ba, - 0xb0ac, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3cf, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe3d1, 0xe3d2, 0xbef7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe3d3, 0x003f, 0xb3cf, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe3d5, 0x003f, 0x003f, 0x003f, 0xb7ea, 0x003f, 0xb5e6, 0x003f, - 0x003f, 0xe3d6, 0xb6f5, 0x003f, 0x003f, 0xe3d7, 0x003f, 0xc0fc, - 0x003f, 0xc6cd, 0x003f, 0xc0e0, 0xbaf5, 0x003f, 0x003f, 0x003f, - 0xe3d8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc3e2, 0xc1eb, 0x003f, 0xe3da, 0xe3dc, 0xe3d9, - 0xe3db, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb7a2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe3dd, 0xb7a6, 0x003f, 0x003f, 0x003f, 0xb5e7, 0xcdd2, - 0xe3df, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3e0, 0x003f, - 0x003f, 0x003f, 0xb1ae, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3e3, - 0x003f, 0x003f, 0x003f, 0xb3f6, 0xe3e2, 0xe3e1, 0x003f, 0xe3e5, - 0xe3de, 0x003f, 0xe3e6, 0xcea9, 0x003f, 0xe3e7, 0x003f, 0xe3e8, - 0x003f, 0x003f, 0xd4f4, 0xe3ea, 0x003f, 0xe3e9, 0x003f, 0x003f, - 0x003f, 0xe3eb, 0xe3ec, 0x003f, 0xceb5, 0xe3ed, 0x003f, 0xf0ef, - 0xbecf, 0xe3ee, 0xe3ef, 0xbdd7, 0x003f, 0xc6b8, 0xe3f0, 0x003f, - 0x003f, 0x003f, 0xc3a8, 0x003f, 0x003f, 0xe3f1, 0x003f, 0xc3bc, - 0xe3f2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb6a5, 0x003f, - 0xd1bf, 0xc3dd, 0xbcb3, 0x003f, 0x003f, 0x003f, 0x003f, 0xb4c8, - /* 0x7b00 .. 0x7bff */ - 0x003f, 0x003f, 0xe3f3, 0x003f, 0xe4a2, 0x003f, 0xe3f6, 0x003f, - 0xb5e8, 0x003f, 0xe3f5, 0xe4a4, 0x003f, 0x003f, 0x003f, 0xe3f4, - 0x003f, 0xbed0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe3f8, 0xe3f9, 0x003f, 0xc5ab, 0x003f, 0x003f, 0xe3fa, 0x003f, - 0xb3de, 0x003f, 0x003f, 0x003f, 0x003f, 0xbfda, 0xc9e4, 0x003f, - 0xe3fc, 0x003f, 0x003f, 0x003f, 0xc2e8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe3f7, 0x003f, 0xe3fb, 0xe3fd, 0x003f, - 0x003f, 0xbafb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4a6, 0xc9ae, 0x003f, - 0xc8a6, 0xc5f9, 0x003f, 0xb6da, 0xe4a5, 0xe4a3, 0x003f, 0xc8b5, - 0xe3fe, 0xc3de, 0xc5fb, 0x003f, 0xc5fa, 0x003f, 0xbaf6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4b8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4a8, 0x003f, 0xe4aa, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe4ad, 0x003f, 0xe4ae, 0x003f, - 0xe4ab, 0xe4ac, 0x003f, 0x003f, 0xe4a9, 0xe4a7, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe4a1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcacf, 0xb2d5, - 0x003f, 0x003f, 0x003f, 0xe4b5, 0x003f, 0xe4b2, 0x003f, 0xe4b7, - 0x003f, 0x003f, 0xe4b6, 0x003f, 0xc7f3, 0xcca7, 0x003f, 0xbbbb, - 0xe4b0, 0xe4b9, 0xe4b4, 0x003f, 0xe4b3, 0xe4af, 0x003f, 0xe4b1, - 0x003f, 0xb4c9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc3bd, 0x003f, 0x003f, 0xc0fd, 0x003f, 0x003f, - 0x003f, 0xc8a2, 0x003f, 0x003f, 0xe4be, 0x003f, 0x003f, 0x003f, - 0xc8a4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xc0e1, 0xe4bb, 0x003f, 0x003f, 0xc8cf, 0x003f, 0xe4bf, 0xcad3, - 0x003f, 0xc3db, 0x003f, 0xe4ba, 0xe4bc, 0x003f, 0x003f, 0xe4bd, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4c0, 0x003f, 0x003f, - 0xbcc4, 0x003f, 0x003f, 0x003f, 0xc6c6, 0xe4c5, 0xe4c4, 0x003f, - 0x003f, 0xe4c1, 0x003f, 0x003f, 0x003f, 0xcfb6, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe4ca, 0x003f, 0x003f, 0xe4ce, 0xe4cb, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7c00 .. 0x7cff */ - 0xe4c7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4c8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4cd, 0x003f, 0x003f, - 0x003f, 0xe4c2, 0xd2d5, 0xe4c9, 0xe4c3, 0x003f, 0x003f, 0xe4cc, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4d2, - 0x003f, 0xb4ca, 0x003f, 0xe4cf, 0x003f, 0x003f, 0x003f, 0xe4d0, - 0x003f, 0x003f, 0xe4d1, 0xe4d4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4d3, - 0xc8f6, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4d5, 0xcefc, 0xcaed, - 0xe4da, 0x003f, 0x003f, 0xe4d7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe4d6, 0xc0d2, 0x003f, 0xe4d9, - 0xe4db, 0x003f, 0x003f, 0x003f, 0xe4d8, 0x003f, 0xe4df, 0x003f, - 0xe4dc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4dd, - 0xe4c6, 0x003f, 0x003f, 0x003f, 0xe4de, 0xe4e0, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe4e1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcac6, 0x003f, 0xe4e2, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcce2, 0x003f, - 0x003f, 0xb6ce, 0xb7a9, 0xe4e3, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcab4, 0x003f, 0xbfe8, 0x003f, 0xccb0, 0x003f, 0x003f, - 0xe4e4, 0x003f, 0xceb3, 0x003f, 0x003f, 0xc7f4, 0x003f, 0xc1c6, - 0xc7b4, 0x003f, 0x003f, 0xbdcd, 0x003f, 0x003f, 0x003f, 0xb0c0, - 0x003f, 0xe4e9, 0xe4e7, 0x003f, 0xe4e5, 0xb4a1, 0x003f, 0xbed1, - 0xe4ea, 0x003f, 0x003f, 0xe4e8, 0x003f, 0xe4e6, 0xe4ee, 0x003f, - 0x003f, 0xe4ed, 0xe4ec, 0xe4eb, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe4ef, 0x003f, 0x003f, 0x003f, 0xe4f0, 0xc0ba, 0x003f, - 0xe4f1, 0x003f, 0xe4f3, 0x003f, 0x003f, 0xe4f2, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb8d2, 0x003f, 0x003f, 0x003f, 0xc1b8, 0x003f, - 0x003f, 0x003f, 0xe4f5, 0x003f, 0x003f, 0x003f, 0xc5fc, 0x003f, - 0xe4f4, 0x003f, 0x003f, 0x003f, 0xe4f6, 0x003f, 0xcab5, 0xc1ec, - 0xb9c7, 0x003f, 0xe4f7, 0x003f, 0x003f, 0x003f, 0x003f, 0xcec8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4f9, - 0x003f, 0x003f, 0xe4fa, 0x003f, 0xe4fb, 0x003f, 0xe4fc, 0x003f, - 0xbbe5, 0x003f, 0xe4fd, 0xb7cf, 0x003f, 0x003f, 0xb5ea, 0x003f, - /* 0x7d00 .. 0x7dff */ - 0xb5aa, 0x003f, 0xe5a1, 0x003f, 0xccf3, 0xb9c8, 0xe4fe, 0x003f, - 0x003f, 0x003f, 0xe5a4, 0xcce6, 0x003f, 0xc7bc, 0x003f, 0x003f, - 0xc9b3, 0x003f, 0x003f, 0x003f, 0xbde3, 0xe5a3, 0x003f, 0xbcd3, - 0xb9c9, 0xbbe6, 0xb5e9, 0xcab6, 0xe5a2, 0x003f, 0x003f, 0x003f, - 0xc1c7, 0xcbc2, 0xbaf7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xbbe7, 0xc4dd, 0x003f, 0xe5a7, 0xcedf, - 0xbad9, 0x003f, 0xe5a8, 0xbfc2, 0x003f, 0xe5aa, 0x003f, 0x003f, - 0x003f, 0xbed2, 0xbab0, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5a9, - 0x003f, 0x003f, 0xbdaa, 0xb8be, 0xc1c8, 0xe5a5, 0xe5ab, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe5a6, 0xb7d0, 0x003f, 0xe5ae, 0xe5b2, - 0xb7eb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5ad, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe5b6, 0x003f, 0x003f, 0xb9ca, 0x003f, - 0x003f, 0xcded, 0xb0bc, 0xe5b3, 0x003f, 0x003f, 0xb5eb, 0x003f, - 0xe5b0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5b1, 0x003f, - 0x003f, 0xc5fd, 0xe5af, 0xe5ac, 0x003f, 0xb3a8, 0xc0e4, 0x003f, - 0x003f, 0xb8a8, 0x003f, 0x003f, 0x003f, 0xe5b8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe5b5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5b7, - 0x003f, 0x003f, 0x003f, 0xe5b4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb7d1, 0xc2b3, 0xe5b9, 0xc1ee, 0x003f, 0x003f, 0xe5c6, - 0x003f, 0x003f, 0xe5c2, 0xe5bc, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe5c0, 0xbcfa, 0xb0dd, 0xe5bb, 0xe5c3, - 0xe5c7, 0xb9cb, 0xccd6, 0x003f, 0xc4d6, 0xe5bd, 0x003f, 0x003f, - 0xe5c5, 0x003f, 0xe5ba, 0xc3be, 0x003f, 0xe5bf, 0xb0bd, 0xccca, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5be, - 0x003f, 0x003f, 0xb6db, 0xc8ec, 0x003f, 0x003f, 0x003f, 0xc1ed, - 0x003f, 0xced0, 0xbdef, 0x003f, 0x003f, 0xe5ee, 0x003f, 0x003f, - 0xe5c8, 0x003f, 0xc0fe, 0x003f, 0xe5c4, 0xe5c9, 0xe5cb, 0x003f, - 0xc4f9, 0xe5ce, 0x003f, 0x003f, 0xe5ca, 0x003f, 0x003f, 0x003f, - 0xcad4, 0xb4cb, 0x003f, 0x003f, 0xcccb, 0x003f, 0x003f, 0xb0de, - 0x003f, 0x003f, 0xe5cd, 0x003f, 0xcefd, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe5cc, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7e00 .. 0x7eff */ - 0x003f, 0xb1ef, 0x003f, 0x003f, 0xc6ec, 0xe5cf, 0x003f, 0x003f, - 0x003f, 0xe5d6, 0xe5d0, 0xe5d7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe5d3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xc7fb, 0x003f, 0x003f, 0xbcca, 0xe5d5, - 0x003f, 0xe5d2, 0xe5d8, 0xe5d1, 0x003f, 0x003f, 0xbdc4, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcba5, 0x003f, 0x003f, 0xbdcc, 0x003f, - 0x003f, 0xe5d4, 0xe5e0, 0x003f, 0x003f, 0xe5dc, 0x003f, 0xe5df, - 0x003f, 0xe5dd, 0xe5e1, 0xe5db, 0x003f, 0xe5c1, 0xc0d3, 0x003f, - 0x003f, 0xc8cb, 0x003f, 0xe5de, 0x003f, 0x003f, 0xe5d9, 0x003f, - 0x003f, 0x003f, 0xc1a1, 0xb7d2, 0x003f, 0xbdab, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xbfa5, 0xc1b6, 0xe5e4, 0x003f, - 0x003f, 0xe5e6, 0xe5e7, 0x003f, 0x003f, 0xe5e3, 0xe5e5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5da, 0xe5e2, - 0x003f, 0xe5ea, 0xe5e9, 0x003f, 0x003f, 0xcbfa, 0x003f, 0x003f, - 0xb7ab, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe5e8, 0x003f, 0xe5ec, 0xe5eb, 0xe5ef, 0x003f, 0xe5f1, - 0x003f, 0x003f, 0xbbbc, 0xe5ed, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe5f2, 0xe5f3, 0x003f, 0x003f, 0xe5f4, 0x003f, 0xe5fa, 0xc5bb, - 0xe5f6, 0x003f, 0xe5f5, 0xe5f7, 0xe5f8, 0x003f, 0xe5f9, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe5fb, 0xe5fc, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7f00 .. 0x7fff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb4cc, 0x003f, - 0xe5fd, 0x003f, 0xe5fe, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6a1, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe6a2, 0xe6a3, 0xe6a4, 0x003f, - 0xe6a5, 0xe6a6, 0x003f, 0x003f, 0xe6a8, 0xe6a7, 0x003f, 0x003f, - 0xe6a9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6aa, - 0xe6ab, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6ae, - 0xe6ac, 0xe6ad, 0xbae1, 0xb7d3, 0x003f, 0x003f, 0xc3d6, 0x003f, - 0xc8b3, 0x003f, 0xbdf0, 0x003f, 0x003f, 0xc7cd, 0x003f, 0xc8ed, - 0xe6af, 0xd8ed, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe6b0, 0xe6b2, 0x003f, 0xcde5, 0xe6b1, 0xe6b4, - 0xe6b3, 0x003f, 0xcdd3, 0x003f, 0xe6b5, 0x003f, 0xc8fe, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe6b6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe6b9, 0x003f, 0x003f, 0xe6b8, 0xe6b7, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe6ba, 0xb7b2, 0x003f, 0x003f, 0x003f, - 0xc1a2, 0xb5c1, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6be, 0xe6bb, - 0x003f, 0x003f, 0xe6bc, 0x003f, 0x003f, 0x003f, 0xe6bf, 0x003f, - 0xe6c0, 0xe6bd, 0x003f, 0x003f, 0x003f, 0xb1a9, 0x003f, 0x003f, - 0x003f, 0xb2a7, 0x003f, 0x003f, 0x003f, 0xe6c2, 0xe6c3, 0x003f, - 0x003f, 0x003f, 0xe6c4, 0x003f, 0xcde2, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xbdac, 0x003f, 0xe6c6, 0xe6c5, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xbfe9, 0xe6c7, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6c8, 0x003f, - 0x003f, 0xe6c9, 0x003f, 0xb4e5, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb4cd, 0x003f, 0x003f, 0xe6ca, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe6cb, 0x003f, 0xcbdd, 0xcde3, 0x003f, 0x003f, 0x003f, - /* 0x8000 .. 0x80ff */ - 0xcdd4, 0xcfb7, 0x003f, 0xb9cd, 0xe6ce, 0xbcd4, 0xe6cd, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe6cf, 0xbca9, 0x003f, 0x003f, 0x003f, - 0xc2d1, 0x003f, 0xe6d0, 0x003f, 0x003f, 0xb9cc, 0x003f, 0xccd7, - 0xe6d1, 0xe6d2, 0x003f, 0x003f, 0xe6d3, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe6d4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe6d5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xbcaa, 0x003f, 0x003f, 0xcced, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe6d7, 0x003f, 0xc3bf, 0x003f, 0xe6d6, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6d9, 0x003f, - 0x003f, 0x003f, 0xe6d8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe6da, 0x003f, 0x003f, 0x003f, 0xc0bb, 0x003f, - 0xe6db, 0x003f, 0xe6dc, 0x003f, 0x003f, 0x003f, 0xcab9, 0xe6dd, - 0x003f, 0xc1ef, 0xe6de, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe6df, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcefe, - 0xe6e2, 0x003f, 0xe6e1, 0xe6e0, 0xc4b0, 0x003f, 0xe6e3, 0xbfa6, - 0x003f, 0xe6e4, 0x003f, 0x003f, 0x003f, 0xe6e5, 0xcfb8, 0xe6e6, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe6e7, 0xe6e9, 0xe6e8, 0xc8a5, - 0x003f, 0xc6f9, 0x003f, 0xcfbe, 0xc8a9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe6eb, 0x003f, 0x003f, 0xbed3, 0x003f, - 0xc9aa, 0x003f, 0xe6ec, 0xe6ea, 0x003f, 0xb4ce, 0x003f, 0x003f, - 0x003f, 0xb8d4, 0xbbe8, 0x003f, 0x003f, 0xc8ee, 0x003f, 0x003f, - 0x003f, 0xb8aa, 0xcbc3, 0x003f, 0xe6ef, 0xe6ed, 0x003f, 0xb9ce, - 0x003f, 0xb9cf, 0xb0e9, 0x003f, 0xbae8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc7d9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb0df, 0xe6f4, 0x003f, 0xc3c0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xc7d8, 0x003f, 0xc2db, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6f6, 0x003f, - 0x003f, 0xe6f2, 0xe6f5, 0xe6f0, 0x003f, 0xe6f3, 0xcba6, 0x003f, - 0x003f, 0xb8d5, 0x003f, 0x003f, 0xb0fd, 0xe6f1, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6f8, - 0x003f, 0xe6f9, 0x003f, 0x003f, 0xc6b9, 0x003f, 0x003f, 0x003f, - 0xb6bb, 0x003f, 0x003f, 0x003f, 0xe7a6, 0xc7bd, 0x003f, 0x003f, - /* 0x8100 .. 0x81ff */ - 0x003f, 0x003f, 0xbbe9, 0x003f, 0x003f, 0xb6bc, 0xc0c8, 0xcfc6, - 0xccae, 0xe6f7, 0xc0d4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb5d3, 0xe6fa, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe6fc, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe6fb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6fd, - 0x003f, 0xc3a6, 0x003f, 0xc7be, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc4b1, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7a3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7a2, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe6fe, 0x003f, 0x003f, 0xbfd5, 0x003f, - 0xc9e5, 0xe7a5, 0x003f, 0xe7a4, 0xb9d0, 0xcfd3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7b5, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7a9, 0xe7aa, 0x003f, - 0x003f, 0x003f, 0x003f, 0xbcf0, 0x003f, 0x003f, 0xe7a8, 0x003f, - 0xb9f8, 0xe7a7, 0x003f, 0x003f, 0xe7ab, 0x003f, 0x003f, 0x003f, - 0xc4b2, 0xcaa2, 0xc1a3, 0x003f, 0x003f, 0x003f, 0x003f, 0xc2dc, - 0xe7af, 0x003f, 0xe7b0, 0xe7ac, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe7ad, 0x003f, 0xe7ae, 0x003f, 0x003f, 0x003f, 0x003f, 0xb9d1, - 0x003f, 0x003f, 0x003f, 0xe7b6, 0x003f, 0xe7b2, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc9e6, 0x003f, 0xcbec, 0xc9a8, 0x003f, 0x003f, - 0xe7b1, 0x003f, 0x003f, 0xe7b4, 0xe7b3, 0x003f, 0x003f, 0x003f, - 0xcbc4, 0xe7b7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe7b8, 0x003f, 0x003f, 0xc1b7, 0x003f, 0xe7b9, 0x003f, 0x003f, - 0xe7bb, 0x003f, 0xe7bf, 0x003f, 0x003f, 0xe7bc, 0xe7ba, 0xc7bf, - 0xe7bd, 0x003f, 0xe7be, 0x003f, 0x003f, 0x003f, 0xb2b2, 0x003f, - 0xe7c5, 0xe7c0, 0x003f, 0x003f, 0x003f, 0xe7c1, 0x003f, 0x003f, - 0x003f, 0xe7c2, 0x003f, 0xc2a1, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe7c4, 0xe7c3, 0xe7c6, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7c7, - 0xe7c8, 0x003f, 0x003f, 0xbfc3, 0x003f, 0xb2e9, 0x003f, 0xe7c9, - 0xced7, 0x003f, 0xbcab, 0x003f, 0x003f, 0xbdad, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xbbea, 0xc3d7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe7ca, 0xe7cb, 0xb1b1, 0x003f, 0xe7cc, 0x003f, - /* 0x8200 .. 0x82ff */ - 0x003f, 0xe7cd, 0xe7ce, 0x003f, 0x003f, 0xe7cf, 0x003f, 0xe7d0, - 0xb6bd, 0xdaaa, 0xe7d1, 0x003f, 0xc0e5, 0xe7d2, 0xbccb, 0x003f, - 0xe7d3, 0x003f, 0xd0b0, 0x003f, 0x003f, 0x003f, 0xe7d4, 0xcade, - 0xb4dc, 0x003f, 0x003f, 0xc1a4, 0xbdd8, 0x003f, 0xc9f1, 0xbdae, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe7d5, 0xb9d2, 0xe7d6, 0xc8cc, 0x003f, 0xe7e4, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe7d8, 0x003f, 0xc2c9, 0xc7f5, 0xb8bf, - 0xe7d7, 0xc1a5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe7d9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc4fa, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe7db, 0xe7da, 0xe7dd, 0x003f, 0x003f, 0xe7dc, 0x003f, 0xe7de, - 0x003f, 0x003f, 0xe7e0, 0x003f, 0xe7df, 0x003f, 0xb4cf, 0x003f, - 0xe7e1, 0x003f, 0xe7e2, 0xe7e3, 0x003f, 0x003f, 0xbab1, 0xcec9, - 0x003f, 0xe7e5, 0xbfa7, 0x003f, 0x003f, 0x003f, 0xb1f0, 0xe7e6, - 0xe7e7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7e8, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb0f2, 0x003f, 0xe7e9, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe7ea, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc9e7, 0x003f, 0x003f, 0x003f, 0xbcc7, 0x003f, 0xe7ec, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb3a9, 0xb0b2, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe7eb, 0xe7ee, 0xc7ce, 0x003f, 0xbfc4, - 0x003f, 0xb2d6, 0x003f, 0xcba7, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb7dd, 0xb6dc, 0x003f, 0xe7ed, 0x003f, 0xb2ea, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb4a3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb1f1, 0xe7f2, 0xceea, 0xc2dd, 0x003f, 0x003f, 0xc9c4, - 0x003f, 0xe7fe, 0x003f, 0xb2d7, 0xe7fc, 0x003f, 0xe7fa, 0xe7f1, - 0x003f, 0xe7ef, 0x003f, 0xe7f0, 0x003f, 0xbce3, 0xb6ec, 0xc3f7, - 0x003f, 0x003f, 0x003f, 0xc6d1, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb1d1, 0x003f, 0xe7f4, 0xe7f3, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe7f9, 0xe7f5, 0xe7f8, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x8300 .. 0x83ff */ - 0x003f, 0x003f, 0xccd0, 0xe7f7, 0xb2d8, 0xb3fd, 0xe7fb, 0x003f, - 0x003f, 0xe7fd, 0x003f, 0x003f, 0x003f, 0x003f, 0xb7d4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8a3, 0xe8ac, - 0xe8ad, 0x003f, 0x003f, 0x003f, 0xb0ab, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe8b4, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb0f1, 0x003f, 0x003f, 0xe8ab, 0x003f, 0x003f, 0x003f, 0xe8aa, - 0x003f, 0xe8a5, 0xe8a4, 0x003f, 0xe8a2, 0xe8a1, 0xc3e3, 0x003f, - 0xc2fb, 0xe8a7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe8a6, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8a9, 0x003f, 0x003f, - 0x003f, 0xc1f0, 0xb7d5, 0x003f, 0x003f, 0x003f, 0x003f, 0xb1c1, - 0xe8a8, 0x003f, 0xb9d3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xc1f1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe8ba, 0x003f, 0xe8bb, 0x003f, 0xb2d9, - 0x003f, 0x003f, 0x003f, 0xb2ae, 0xe8b8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8ae, 0x003f, 0xe8b6, - 0x003f, 0xe8bd, 0xe8b7, 0x003f, 0x003f, 0x003f, 0xe8b5, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe7f6, 0x003f, 0x003f, 0xe8b3, 0x003f, - 0x003f, 0x003f, 0xe8af, 0x003f, 0x003f, 0x003f, 0xb4d0, 0xe8b1, - 0xe8bc, 0x003f, 0xe8b2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe8be, 0x003f, 0xe8b0, 0xc7fc, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcde9, 0x003f, 0x003f, 0x003f, 0xe8b9, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8cf, 0x003f, 0x003f, - 0x003f, 0xe8c7, 0x003f, 0x003f, 0x003f, 0xbffb, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb5c6, 0x003f, 0xb6dd, 0x003f, 0xe8c2, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb2db, 0x003f, 0x003f, 0xbed4, 0x003f, - 0xe8c5, 0x003f, 0x003f, 0x003f, 0xbada, 0x003f, 0x003f, 0xc5d1, - 0xe8ca, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcaee, 0x003f, 0xe8c1, 0x003f, 0x003f, 0x003f, 0xb2da, - 0xb8d6, 0xc9a9, 0xe8cb, 0x003f, 0xe8bf, 0x003f, 0x003f, 0xe8c8, - 0x003f, 0x003f, 0x003f, 0xe8d2, 0x003f, 0xe8c3, 0x003f, 0x003f, - /* 0x8400 .. 0x84ff */ - 0x003f, 0x003f, 0x003f, 0xe8c4, 0xc6ba, 0x003f, 0x003f, 0xe8c9, - 0x003f, 0x003f, 0x003f, 0xe8c6, 0xcba8, 0xe8cc, 0xb0e0, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe8c0, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe8ce, 0x003f, 0xe8cd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc7eb, 0xe8d4, 0x003f, 0xe8df, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb3fe, 0x003f, 0x003f, 0x003f, 0xe8e2, 0x003f, 0x003f, - 0xe8d0, 0x003f, 0x003f, 0x003f, 0xe8d5, 0xcdee, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8de, 0x003f, - 0x003f, 0xcdd5, 0x003f, 0x003f, 0x003f, 0x003f, 0xceaa, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc3f8, - 0x003f, 0x003f, 0x003f, 0xb3eb, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc9f2, 0xe8e4, 0xc6a1, 0x003f, 0x003f, 0xb0b1, 0x003f, - 0x003f, 0xe8dd, 0x003f, 0xe8d9, 0xc1f2, 0xe8d3, 0xe8db, 0xe8e0, - 0x003f, 0xc7ac, 0x003f, 0x003f, 0x003f, 0xb0aa, 0x003f, 0xe8d8, - 0x003f, 0xe8e1, 0xc9f8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe8dc, 0x003f, 0xe8d7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xbed5, 0x003f, 0x003f, 0x003f, 0x003f, - 0xbdaf, 0x003f, 0x003f, 0x003f, 0xbcac, 0x003f, 0x003f, 0x003f, - 0x003f, 0xccd8, 0x003f, 0x003f, 0xc9c7, 0x003f, 0x003f, 0xe8e7, - 0x003f, 0xe8f0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8da, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb3f7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xbef8, 0xe8e5, 0x003f, 0xe8ea, 0xc1f3, 0x003f, 0x003f, 0xe8e6, - 0x003f, 0xe8ed, 0x003f, 0x003f, 0xc3df, 0x003f, 0xe8ee, 0x003f, - 0x003f, 0xcdd6, 0xe8e3, 0xb3b8, 0x003f, 0xe8e9, 0x003f, 0x003f, - 0xe8ec, 0xccac, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8ef, 0x003f, - 0x003f, 0xe8e8, 0xe8eb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcba9, 0x003f, 0xcfa1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe8f3, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe8fa, 0x003f, 0x003f, 0xe8f2, - /* 0x8500 .. 0x85ff */ - 0xbcc3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8d1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcace, 0x003f, 0xcca2, 0xe8f9, 0xe8f8, 0x003f, 0xe8f4, - 0xe8f5, 0x003f, 0xb1b6, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8f7, - 0x003f, 0xe8f1, 0x003f, 0x003f, 0x003f, 0x003f, 0xc4d5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe8f6, 0xb0fe, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc2a2, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcac3, 0x003f, 0x003f, - 0xe8fb, 0xe9a1, 0x003f, 0xc8d9, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe8fe, 0xbed6, 0xbcc9, 0xe9a3, 0x003f, 0x003f, 0xb6be, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9a4, 0x003f, 0xc9f9, - 0xe8fd, 0x003f, 0xe8d6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe8fc, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcfcf, 0xc6a2, 0xc9f3, 0x003f, 0x003f, 0xe9ab, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9b1, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9b2, 0x003f, - 0xe9a5, 0x003f, 0x003f, 0x003f, 0xc7f6, 0x003f, 0x003f, 0xe9af, - 0xe9a7, 0x003f, 0xe9a9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe9b3, 0xe9a8, 0x003f, 0x003f, 0xe9ac, 0x003f, 0x003f, 0xb1f2, - 0x003f, 0xc6e5, 0x003f, 0xe9ad, 0xe9b0, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe9a6, 0x003f, 0xc1a6, 0x003f, - 0xe9aa, 0xbba7, 0xbfc5, 0xb7b0, 0xccf4, 0x003f, 0xccf9, 0xbdf2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe9b7, 0xe9b5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcfce, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe9b4, 0x003f, 0x003f, 0x003f, 0xcdf5, 0x003f, 0xe9b6, - 0xe9b8, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9b9, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe9bc, 0xe9ba, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xc6a3, 0xe9bb, 0x003f, 0x003f, - 0x003f, 0xc8cd, 0xe9ae, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xbdf3, - 0x003f, 0xe9bd, 0xe9c2, 0xc1f4, 0x003f, 0x003f, 0xe9c1, 0x003f, - /* 0x8600 .. 0x86ff */ - 0x003f, 0x003f, 0xe9a2, 0x003f, 0x003f, 0x003f, 0xe9c3, 0xc1c9, - 0x003f, 0x003f, 0xe9be, 0xe9c0, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe9bf, 0x003f, 0x003f, 0xddb1, 0xdda2, - 0x003f, 0x003f, 0xe9c5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe9c4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcdf6, 0x003f, 0xe2bc, - 0xe9c6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9c7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9c8, 0xb8d7, 0x003f, - 0xb5d4, 0x003f, 0x003f, 0x003f, 0xe9ca, 0xd1dd, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb5f5, 0x003f, 0xceba, 0x003f, 0xb6f3, 0xe9cb, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9cc, - 0x003f, 0x003f, 0x003f, 0xc3ee, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe9cd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc6fa, 0x003f, 0xb0ba, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb2e3, 0xe9d2, 0xe9d3, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe9ce, 0x003f, 0xbbbd, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe9cf, 0xc7c2, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe9d0, 0xe9d1, 0xe9db, 0x003f, 0x003f, 0x003f, 0xe9d5, - 0xe9d8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9d4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe9d6, 0x003f, 0xe9d7, 0xbcd8, - 0x003f, 0xe9d9, 0x003f, 0xc3c1, 0x003f, 0xb7d6, 0xb3c2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe9dc, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb3bf, 0x003f, 0xe9e1, 0x003f, 0x003f, 0xe9dd, 0xe9e0, - 0x003f, 0x003f, 0x003f, 0x003f, 0xc8ba, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe9de, 0x003f, 0x003f, 0xe9df, 0xc9c8, 0xc8da, 0xe9e2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xc2fd, 0xe9ec, 0x003f, 0xe9e8, 0x003f, 0x003f, 0xb2eb, 0x003f, - /* 0x8700 .. 0x87ff */ - 0xe9e6, 0x003f, 0xcbaa, 0xe9e7, 0x003f, 0x003f, 0xe9e4, 0x003f, - 0xe9e5, 0xe9ea, 0xe9ed, 0x003f, 0x003f, 0xe9eb, 0x003f, 0x003f, - 0x003f, 0xe9e9, 0xe9e3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xc3d8, 0x003f, 0xe9f4, 0x003f, 0xccaa, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9f2, 0x003f, 0x003f, - 0x003f, 0xe9f3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe9ee, 0x003f, 0x003f, 0xe9f0, - 0x003f, 0x003f, 0x003f, 0xe9f1, 0x003f, 0x003f, 0x003f, 0xe9ef, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc0e6, 0x003f, 0xcfb9, 0xe9f8, 0x003f, 0xe9f9, 0x003f, - 0x003f, 0x003f, 0x003f, 0xeaa1, 0x003f, 0xbfaa, 0x003f, 0xe9fb, - 0x003f, 0xe9fe, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9f6, - 0xe9f5, 0x003f, 0x003f, 0xeaa2, 0x003f, 0x003f, 0xb2dc, 0x003f, - 0xe9fc, 0x003f, 0xeaa3, 0x003f, 0x003f, 0x003f, 0xe9fd, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe9fa, 0x003f, 0xc4b3, 0x003f, - 0xe9f7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc7e8, - 0x003f, 0x003f, 0xeaa7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcdbb, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeaa6, - 0x003f, 0x003f, 0xeaa5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xeaae, 0x003f, 0x003f, 0x003f, 0xeaa8, - 0x003f, 0x003f, 0x003f, 0xeab0, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcde6, 0xeab3, 0x003f, 0xeaaa, 0x003f, 0x003f, - 0xeaab, 0x003f, 0x003f, 0x003f, 0xeaaf, 0x003f, 0xeab2, 0xeab1, - 0x003f, 0x003f, 0x003f, 0xeaa9, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeaac, 0x003f, 0xeabd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeab6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeab4, - 0x003f, 0x003f, 0xeab5, 0x003f, 0x003f, 0x003f, 0xeaba, 0xeabb, - 0x003f, 0xb3aa, 0x003f, 0xb5c2, 0x003f, 0x003f, 0xeab9, 0x003f, - /* 0x8800 .. 0x88ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeaa4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeab8, 0xeabc, 0xeab7, - 0x003f, 0xeabe, 0x003f, 0x003f, 0x003f, 0xeac0, 0xeabf, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeac2, 0xeac1, 0xe9da, 0x003f, 0x003f, 0x003f, 0xeac6, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeac3, 0x003f, 0x003f, 0x003f, 0x003f, 0xeac4, 0x003f, - 0x003f, 0xeac5, 0x003f, 0xeac7, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb7ec, 0x003f, 0xeac9, 0x003f, 0xeac8, 0x003f, 0xbdb0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xb9d4, 0xdea7, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeaca, 0xbdd1, 0x003f, 0x003f, 0x003f, 0xb3b9, - 0x003f, 0xeacb, 0x003f, 0xb1d2, 0x003f, 0xbed7, 0xeacc, 0x003f, - 0x003f, 0xb9d5, 0xeacd, 0xb0e1, 0x003f, 0x003f, 0x003f, 0x003f, - 0xc9bd, 0x003f, 0x003f, 0xeace, 0x003f, 0x003f, 0x003f, 0x003f, - 0xbfea, 0x003f, 0xead5, 0x003f, 0x003f, 0xead2, 0x003f, 0xc3ef, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xead3, 0xead0, 0xb6de, - 0x003f, 0xeacf, 0xead6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb7b6, 0x003f, 0x003f, 0xc2de, 0x003f, 0xeadc, 0x003f, 0x003f, - 0x003f, 0x003f, 0xead8, 0x003f, 0x003f, 0x003f, 0xc2b5, 0xead7, - 0x003f, 0xeada, 0x003f, 0x003f, 0x003f, 0x003f, 0xead1, 0x003f, - 0x003f, 0x003f, 0xeadb, 0x003f, 0xeadd, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xc8ef, 0x003f, 0x003f, 0xead9, 0x003f, - 0xeade, 0xeae0, 0x003f, 0x003f, 0xb8d3, 0xead4, 0x003f, 0xb0c1, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeadf, - 0x003f, 0xbadb, 0xcef6, 0xeae1, 0xeae2, 0xc1f5, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcea2, - 0x003f, 0x003f, 0x003f, 0x003f, 0xeae3, 0xcdb5, 0x003f, 0x003f, - 0xeae4, 0xeae5, 0x003f, 0x003f, 0xcae4, 0xeae6, 0x003f, 0xbac0, - 0x003f, 0xcea3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeaeb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeaec, 0xbed8, 0xeaea, 0x003f, 0x003f, 0x003f, - 0xcde7, 0xeae7, 0x003f, 0x003f, 0xeae9, 0xc0bd, 0xbffe, 0x003f, - /* 0x8900 .. 0x89ff */ - 0x003f, 0x003f, 0xeae8, 0x003f, 0xeaed, 0x003f, 0x003f, 0xcaa3, - 0x003f, 0x003f, 0xeaef, 0x003f, 0xeaee, 0x003f, 0x003f, 0x003f, - 0xb3ec, 0x003f, 0xcbab, 0xeaf0, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeafc, 0xeaf2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeaf3, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeaf4, 0xeaf5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeaf9, 0x003f, - 0xeafa, 0x003f, 0x003f, 0xeaf8, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeaf6, 0x003f, 0xeaf1, 0xeaf7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xeafb, 0xf0b7, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb2a8, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeafe, 0xb6df, - 0xeafd, 0x003f, 0x003f, 0x003f, 0xeba2, 0x003f, 0xeba1, 0x003f, - 0x003f, 0x003f, 0xeba4, 0x003f, 0x003f, 0xeba3, 0x003f, 0xeba5, - 0x003f, 0x003f, 0xbdb1, 0x003f, 0xeba6, 0x003f, 0x003f, 0xeba7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeba8, 0xc0be, - 0x003f, 0xcdd7, 0x003f, 0xeba9, 0x003f, 0x003f, 0xcaa4, 0xc7c6, - 0xebaa, 0x003f, 0xebab, 0xb8ab, 0x003f, 0x003f, 0x003f, 0xb5ac, - 0x003f, 0x003f, 0x003f, 0xebac, 0x003f, 0x003f, 0xbbeb, 0xc7c1, - 0xebad, 0x003f, 0xb3d0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xebae, 0x003f, 0x003f, 0x003f, 0x003f, 0xebb0, 0xcdf7, - 0x003f, 0xebaf, 0xbfc6, 0x003f, 0xebb1, 0x003f, 0x003f, 0xebb2, - 0x003f, 0x003f, 0xebb3, 0xb4d1, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xebb4, 0x003f, 0x003f, 0xebb5, 0x003f, 0xebb6, - 0xebb7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb3d1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xebb8, 0x003f, 0xebb9, 0xebba, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb2f2, 0x003f, 0x003f, 0xbfa8, 0xebbb, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xebbc, 0x003f, 0x003f, 0x003f, - 0xebbd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x8a00 .. 0x8aff */ - 0xb8c0, 0x003f, 0xc4fb, 0xebbe, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb7d7, 0x003f, 0xbfd6, 0x003f, 0xebc1, 0x003f, 0xc6a4, 0x003f, - 0xebc0, 0x003f, 0x003f, 0xb7b1, 0x003f, 0x003f, 0xebbf, 0xc2f7, - 0xb5ad, 0x003f, 0x003f, 0xebc2, 0x003f, 0xebc3, 0x003f, 0xbed9, - 0x003f, 0x003f, 0x003f, 0xb7ed, 0x003f, 0xebc4, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcbac, 0x003f, 0x003f, 0xc0df, 0x003f, 0x003f, - 0x003f, 0xb5f6, 0x003f, 0xccf5, 0xc1ca, 0x003f, 0xebc5, 0x003f, - 0x003f, 0x003f, 0xbfc7, 0xc3f0, 0xbeda, 0x003f, 0x003f, 0x003f, - 0x003f, 0xebc6, 0x003f, 0x003f, 0x003f, 0x003f, 0xebc9, 0x003f, - 0xebca, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xbabe, 0xc2c2, 0xebc8, 0x003f, 0xbedb, 0xc9be, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xebc7, 0x003f, 0x003f, 0xbbec, 0x003f, - 0xb1d3, 0x003f, 0xebce, 0xb7d8, 0x003f, 0x003f, 0xbbee, 0x003f, - 0x003f, 0xbbed, 0x003f, 0xcfcd, 0xebcd, 0xebcc, 0xc1a7, 0x003f, - 0xb5cd, 0xcfc3, 0xb3ba, 0xbedc, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xebcb, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xebd0, 0x003f, 0xebd1, 0xebcf, 0x003f, 0xb8d8, - 0x003f, 0xcdc0, 0x003f, 0x003f, 0xbbef, 0xc7a7, 0x003f, 0x003f, - 0x003f, 0xebd4, 0x003f, 0xc0c0, 0x003f, 0xc3c2, 0x003f, 0x003f, - 0xcdb6, 0x003f, 0xebd7, 0x003f, 0x003f, 0x003f, 0xb8ec, 0x003f, - 0xc0bf, 0xebd3, 0x003f, 0xebd8, 0xb8ed, 0xebd5, 0xebd6, 0x003f, - 0xebd2, 0x003f, 0x003f, 0x003f, 0xc0e2, 0xc6c9, 0x003f, 0x003f, - 0xc3af, 0x003f, 0xb2dd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc8f0, 0x003f, 0x003f, 0xb5c3, 0x003f, 0x003f, 0xc4b4, - 0x003f, 0x003f, 0xebdb, 0x003f, 0xebd9, 0x003f, 0x003f, 0xc3cc, - 0x003f, 0x003f, 0x003f, 0xc0c1, 0xb4d2, 0xebda, 0x003f, 0xbfdb, - 0x003f, 0x003f, 0xceca, 0x003f, 0x003f, 0x003f, 0xcfc0, 0x003f, - 0x003f, 0x003f, 0xebdc, 0xebe7, 0xc4b5, 0x003f, 0xebe6, 0x003f, - 0xebe3, 0xebeb, 0xebe4, 0x003f, 0xebe0, 0x003f, 0xc4fc, 0xebdf, - 0x003f, 0x003f, 0x003f, 0xebdd, 0x003f, 0xcda1, 0xbbf0, 0x003f, - 0x003f, 0xebe1, 0x003f, 0xebde, 0x003f, 0x003f, 0x003f, 0xebe5, - 0xbdf4, 0x003f, 0xb8c1, 0x003f, 0x003f, 0x003f, 0xc2fa, 0x003f, - /* 0x8b00 .. 0x8bff */ - 0xcbc5, 0xb1da, 0xb0e2, 0x003f, 0xc6a5, 0x003f, 0x003f, 0xebe9, - 0x003f, 0x003f, 0x003f, 0x003f, 0xebe8, 0x003f, 0xc6e6, 0x003f, - 0xebed, 0x003f, 0x003f, 0x003f, 0xebe2, 0x003f, 0xebec, 0xebee, - 0x003f, 0xb8ac, 0xebea, 0xb9d6, 0x003f, 0xbcd5, 0x003f, 0x003f, - 0xebef, 0xcdd8, 0x003f, 0x003f, 0x003f, 0x003f, 0xebf2, 0x003f, - 0xebf5, 0x003f, 0x003f, 0xebf3, 0xc9b5, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xebf0, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb6e0, 0x003f, 0x003f, 0x003f, 0x003f, 0xebf4, 0x003f, - 0x003f, 0xebf6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xebfa, 0x003f, 0x003f, 0xebf7, 0x003f, 0xebf9, 0xebf8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xebfb, 0x003f, - 0xbcb1, 0x003f, 0xebfd, 0xebfc, 0xc9e8, 0x003f, 0x003f, 0xeca1, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb7d9, 0x003f, - 0x003f, 0x003f, 0x003f, 0xebfe, 0xeca2, 0x003f, 0x003f, 0xeca3, - 0xb5c4, 0xe6c1, 0xbef9, 0x003f, 0xeca4, 0x003f, 0x003f, 0xb8ee, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeca5, 0x003f, 0x003f, - 0xeca6, 0x003f, 0x003f, 0xbbbe, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdace, 0x003f, 0xeca7, 0x003f, 0xeca8, 0x003f, - 0xbdb2, 0x003f, 0xeca9, 0xecaa, 0x003f, 0x003f, 0xecab, 0x003f, - 0x003f, 0xecac, 0xecad, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x8c00 .. 0x8cff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc3ab, - 0x003f, 0x003f, 0xecae, 0x003f, 0x003f, 0x003f, 0x003f, 0xecb0, - 0x003f, 0xecaf, 0x003f, 0x003f, 0x003f, 0x003f, 0xc6a6, 0x003f, - 0xecb1, 0x003f, 0xcbad, 0x003f, 0xecb2, 0x003f, 0xecb3, 0x003f, - 0xecb4, 0x003f, 0x003f, 0x003f, 0x003f, 0xecb5, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc6da, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbedd, 0xecb6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb9eb, 0xd0ae, 0xecb7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xecb8, 0xc9bf, 0xecb9, 0x003f, 0xecc1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xecba, 0x003f, 0x003f, 0xecbc, 0x003f, 0x003f, - 0x003f, 0xecbb, 0xecbd, 0x003f, 0xcbc6, 0xecbe, 0xecbf, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xecc0, 0x003f, 0x003f, 0x003f, - 0xecc2, 0x003f, 0x003f, 0x003f, 0x003f, 0xb3ad, 0xc4e7, 0x003f, - 0xc9e9, 0xbae2, 0xb9d7, 0x003f, 0x003f, 0x003f, 0x003f, 0xc9cf, - 0xb2df, 0xc8ce, 0xecc5, 0xb4d3, 0xc0d5, 0xecc4, 0xecc9, 0xc3f9, - 0xcce3, 0x003f, 0xecc7, 0xecc8, 0xb5ae, 0x003f, 0xecca, 0xc7e3, - 0xc2df, 0x003f, 0x003f, 0xc8f1, 0xc5bd, 0xecc6, 0x003f, 0xcbc7, - 0xb2ec, 0xeccc, 0xcfa8, 0xc4c2, 0xcfc5, 0x003f, 0x003f, 0xbbf1, - 0xeccb, 0x003f, 0xc2b1, 0x003f, 0x003f, 0xecdc, 0xc1a8, 0x003f, - 0x003f, 0xc6f8, 0x003f, 0xc9d0, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeccf, 0xbbbf, 0xbbf2, 0x003f, 0xbede, 0x003f, - 0xc7e5, 0x003f, 0xb8ad, 0xecce, 0xeccd, 0x003f, 0xc9ea, 0x003f, - 0x003f, 0x003f, 0xbcc1, 0x003f, 0x003f, 0xc5d2, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xecd1, 0xecd2, 0xb9d8, 0xecd0, 0x003f, 0x003f, - /* 0x8d00 .. 0x8dff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0xecd3, 0xecd4, 0x003f, 0xecd6, - 0xc2a3, 0x003f, 0xecd5, 0xb4e6, 0x003f, 0xecd8, 0x003f, 0xecd7, - 0xecd9, 0x003f, 0x003f, 0xecdb, 0xecdd, 0x003f, 0xecde, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xc0d6, 0x003f, 0xbccf, 0xecdf, - 0x003f, 0x003f, 0x003f, 0xb3d2, 0x003f, 0xece0, 0x003f, 0x003f, - 0xc1f6, 0xece1, 0x003f, 0xece2, 0xc9eb, 0x003f, 0x003f, 0xb5af, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xece3, 0x003f, 0x003f, 0x003f, 0xc4b6, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb1db, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xece4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xbcf1, 0x003f, 0x003f, 0x003f, 0x003f, - 0xbff6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xc2ad, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xece7, 0x003f, 0x003f, 0x003f, 0xece6, 0x003f, - 0x003f, 0x003f, 0xece5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xeced, 0xeceb, 0x003f, 0x003f, 0xece8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xecea, 0x003f, - 0x003f, 0x003f, 0xece9, 0xecec, 0x003f, 0xb5f7, 0x003f, 0xecf0, - 0x003f, 0xc0d7, 0x003f, 0xecf1, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb8d9, 0x003f, 0xecee, 0xecef, 0x003f, 0x003f, 0x003f, 0xcfa9, - 0x003f, 0x003f, 0x003f, 0xc4b7, 0x003f, 0xc1a9, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xecf2, 0x003f, 0x003f, 0xecf5, - /* 0x8e00 .. 0x8eff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xecf3, 0xecf4, 0xcdd9, 0x003f, 0x003f, 0x003f, 0x003f, 0xc6a7, - 0xecf8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xecf6, 0xecf7, 0xecf9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeda9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xecfc, 0x003f, 0x003f, 0x003f, 0xecfd, 0xecfb, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xecfa, 0x003f, 0xc4fd, 0x003f, 0x003f, 0xeda1, - 0xeda5, 0xeda2, 0xecfe, 0x003f, 0xeda3, 0x003f, 0x003f, 0x003f, - 0xeda4, 0x003f, 0x003f, 0x003f, 0x003f, 0xedab, 0x003f, 0x003f, - 0x003f, 0xeda6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc0d8, - 0xeda8, 0x003f, 0x003f, 0xedaa, 0xeda7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xedad, 0x003f, 0xbdb3, 0x003f, 0xedac, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xedae, 0x003f, 0x003f, 0x003f, - 0x003f, 0xedaf, 0x003f, 0x003f, 0xedb2, 0xedb1, 0x003f, 0xedb0, - 0x003f, 0x003f, 0xedb4, 0xedb3, 0x003f, 0xccf6, 0x003f, 0x003f, - 0x003f, 0xedb6, 0x003f, 0xedb5, 0xedb7, 0x003f, 0x003f, 0x003f, - 0x003f, 0xedb8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xedba, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xedb9, 0xbfc8, 0xedbb, 0x003f, 0x003f, 0xb6ed, - 0xedbc, 0xedbe, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xedbf, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xedc0, 0xedbd, 0x003f, - 0xedc1, 0x003f, 0xbcd6, 0xedc2, 0xb5b0, 0xb7b3, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb8ae, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xedc3, 0x003f, 0x003f, 0x003f, 0xc6f0, - 0x003f, 0x003f, 0xc5be, 0xedc4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xedc7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xbcb4, 0x003f, 0x003f, 0xedc6, 0xedc5, 0xb7da, 0xedc8, 0x003f, - /* 0x8f00 .. 0x8fff */ - 0x003f, 0x003f, 0x003f, 0xb3d3, 0x003f, 0xedca, 0x003f, 0x003f, - 0x003f, 0xbadc, 0xedc9, 0x003f, 0xedd2, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xedcc, 0xedce, 0xcae5, 0xedcb, 0x003f, 0x003f, - 0x003f, 0xedcd, 0x003f, 0xedd1, 0xedcf, 0xb5b1, 0x003f, 0xedd0, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xedd3, 0x003f, - 0x003f, 0xc7da, 0xced8, 0x003f, 0x003f, 0x003f, 0x003f, 0xbdb4, - 0x003f, 0x003f, 0x003f, 0xedd4, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcda2, 0xedd6, 0x003f, 0xedd5, 0x003f, 0x003f, 0xedd9, 0xcdc1, - 0x003f, 0x003f, 0xedd8, 0x003f, 0xb3ed, 0xedd7, 0xeddc, 0x003f, - 0x003f, 0xeddb, 0x003f, 0x003f, 0xedda, 0xc5b2, 0xeddd, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xedde, - 0x003f, 0x003f, 0x003f, 0x003f, 0xeddf, 0x003f, 0x003f, 0xb9ec, - 0x003f, 0xb7a5, 0xede0, 0xede1, 0xede2, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xbfc9, 0xede3, 0x003f, 0xbcad, 0xede4, - 0x003f, 0x003f, 0x003f, 0xede5, 0x003f, 0x003f, 0x003f, 0xd2a1, - 0xd1fe, 0x003f, 0x003f, 0x003f, 0x003f, 0xede6, 0xe5f0, 0xede7, - 0xc3a4, 0xbfab, 0xc7c0, 0x003f, 0x003f, 0x003f, 0x003f, 0xede8, - 0x003f, 0x003f, 0xcad5, 0xc4d4, 0xb9fe, 0x003f, 0x003f, 0xc3a9, - 0x003f, 0x003f, 0xb1aa, 0x003f, 0xcbf8, 0xbfd7, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb7de, 0x003f, - 0x003f, 0xb6e1, 0x003f, 0x003f, 0xcad6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xede9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xedeb, 0x003f, 0x003f, 0xedea, 0xb2e0, 0x003f, - 0x003f, 0xc6f6, 0xedec, 0xc7f7, 0x003f, 0xc5b3, 0x003f, 0xeded, - 0xbdd2, 0x003f, 0x003f, 0x003f, 0xedef, 0x003f, 0x003f, 0xccc2, - 0xedfe, 0xedf1, 0xedf2, 0x003f, 0x003f, 0xc4c9, 0x003f, 0x003f, - /* 0x9000 .. 0x90ff */ - 0xc2e0, 0xc1f7, 0x003f, 0xc6a8, 0x003f, 0xedf0, 0xb5d5, 0x003f, - 0x003f, 0x003f, 0x003f, 0xedf9, 0x003f, 0xedf6, 0xeea5, 0xc6a9, - 0xc3e0, 0xedf3, 0x003f, 0xc4fe, 0xc5d3, 0xedf4, 0xedf8, 0xbfe0, - 0x003f, 0xc7e7, 0xc4cc, 0x003f, 0x003f, 0xc0c2, 0xedf7, 0xc2ae, - 0xc2a4, 0xedf5, 0xb0a9, 0xcfa2, 0x003f, 0x003f, 0x003f, 0xedfa, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc2e1, 0x003f, - 0x003f, 0xbdb5, 0xbfca, 0x003f, 0x003f, 0xedfc, 0xedfb, 0x003f, - 0xb0ef, 0xedfd, 0x003f, 0x003f, 0xc9af, 0x003f, 0xeea7, 0x003f, - 0x003f, 0xc6db, 0xbfeb, 0x003f, 0x003f, 0xc3d9, 0x003f, 0xb6f8, - 0x003f, 0xeea6, 0xcdb7, 0xb1bf, 0x003f, 0xcad7, 0xb2e1, 0xeea1, - 0xeea2, 0xeea3, 0xeea4, 0xc6bb, 0xc3a3, 0xb0e3, 0xeea8, 0x003f, - 0xeea9, 0xf4a3, 0x003f, 0x003f, 0xc2bd, 0x003f, 0xeeaa, 0x003f, - 0xb1f3, 0xc1cc, 0x003f, 0xb8af, 0x003f, 0xcdda, 0x003f, 0x003f, - 0xeeab, 0xc5ac, 0x003f, 0x003f, 0x003f, 0xc1f8, 0xbcd7, 0xeeac, - 0x003f, 0x003f, 0xeeaf, 0x003f, 0x003f, 0xbde5, 0xeead, 0xc1ab, - 0xc1aa, 0x003f, 0xb0e4, 0x003f, 0xcecb, 0xeeb1, 0x003f, 0xc8f2, - 0xeeb3, 0xeeb2, 0xeeb0, 0xe3e4, 0xb4d4, 0x003f, 0x003f, 0xedee, - 0x003f, 0xeeb5, 0xeeb4, 0x003f, 0x003f, 0x003f, 0x003f, 0xeeb6, - 0x003f, 0xcdb8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xc6e1, 0x003f, 0x003f, 0xcbae, 0x003f, - 0xeeb7, 0x003f, 0xbcd9, 0x003f, 0x003f, 0x003f, 0x003f, 0xeeb8, - 0x003f, 0xeeb9, 0x003f, 0x003f, 0x003f, 0xeeba, 0x003f, 0x003f, - 0xc5a1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb0ea, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb9d9, 0x003f, 0x003f, 0x003f, 0xcfba, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xeebe, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb7b4, 0xeebb, 0x003f, 0xeebc, 0x003f, 0x003f, 0x003f, - 0xc9f4, 0x003f, 0x003f, 0x003f, 0x003f, 0xb3d4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcdb9, 0x003f, 0xb6bf, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc5d4, 0x003f, 0x003f, - /* 0x9100 .. 0x91ff */ - 0x003f, 0x003f, 0xeebf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeec0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeec1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc5a2, 0x003f, 0x003f, - 0xeec3, 0x003f, 0xeec2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc6d3, 0xeec4, 0xbdb6, 0xbce0, 0xc7db, 0xc3f1, 0x003f, - 0x003f, 0x003f, 0xbcf2, 0x003f, 0xbfec, 0x003f, 0xeec5, 0x003f, - 0xeec6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xbfdd, 0xeec7, 0x003f, 0xeec8, 0x003f, 0x003f, - 0x003f, 0xeec9, 0xcdef, 0x003f, 0xbdb7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeecb, 0xeeca, 0x003f, 0xb9da, 0x003f, 0xb9f3, - 0xbbc0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeece, 0x003f, 0x003f, 0x003f, 0x003f, 0xbde6, - 0x003f, 0xeecd, 0x003f, 0xeecc, 0x003f, 0xc2e9, 0x003f, 0x003f, - 0xb8ef, 0x003f, 0xc0c3, 0x003f, 0x003f, 0x003f, 0x003f, 0xc8b0, - 0x003f, 0x003f, 0x003f, 0x003f, 0xbdb9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeecf, 0x003f, 0xbedf, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeed2, 0xeed0, 0x003f, 0x003f, 0x003f, 0xeed1, - 0x003f, 0x003f, 0x003f, 0x003f, 0xeed4, 0xeed3, 0x003f, 0x003f, - 0xbefa, 0x003f, 0xeed5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeed6, 0xeed7, 0x003f, 0x003f, 0x003f, 0x003f, 0xc8d0, 0xbad3, - 0xbce1, 0xeed8, 0x003f, 0xeed9, 0xcea4, 0xbdc5, 0xccee, 0xcecc, - 0xeeda, 0xb6e2, 0x003f, 0x003f, 0x003f, 0x003f, 0xeedb, 0x003f, - 0xc5a3, 0x003f, 0x003f, 0xeede, 0xb3f8, 0xbfcb, 0x003f, 0xeedc, - 0x003f, 0xeedd, 0x003f, 0xc4e0, 0x003f, 0x003f, 0xcbd5, 0xb6fc, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeee0, 0xeee1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xeedf, 0x003f, 0x003f, 0xeee3, - /* 0x9200 .. 0x92ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc6df, 0xb3c3, 0x003f, - 0x003f, 0xeee7, 0x003f, 0x003f, 0xeee4, 0xeee6, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeee2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xefcf, 0x003f, 0x003f, 0xeee5, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xceeb, 0x003f, 0x003f, 0xb8da, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeeef, - 0x003f, 0x003f, 0x003f, 0x003f, 0xc5b4, 0xeeea, 0x003f, 0x003f, - 0xeeed, 0xeeeb, 0x003f, 0xeef0, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeef1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeee9, - 0x003f, 0x003f, 0xeef6, 0xb1f4, 0x003f, 0x003f, 0xeee8, 0x003f, - 0x003f, 0x003f, 0xc8ad, 0x003f, 0xeeec, 0x003f, 0xbee0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb9db, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcbc8, 0x003f, - 0xb6e4, 0x003f, 0x003f, 0xbdc6, 0x003f, 0xc6bc, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc1ad, 0x003f, 0xeef4, 0x003f, 0xeeee, 0xeef3, 0x003f, - 0xccc3, 0x003f, 0xc4b8, 0xeef5, 0xeef2, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc1ac, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeef9, - 0x003f, 0xeef8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeef7, - 0x003f, 0x003f, 0xcbaf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xbdfb, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeefa, 0xcadf, 0x003f, 0x003f, 0xb1d4, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc9c6, 0xc3f2, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb5f8, 0x003f, 0xeefc, 0x003f, 0xb9dd, 0x003f, 0x003f, 0x003f, - /* 0x9300 .. 0x93ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xbbac, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeefb, - 0xbfed, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xbfee, 0xefa1, 0xefa3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xbefb, 0x003f, 0xefa2, 0xefa4, 0x003f, 0x003f, 0xb6d3, 0x003f, - 0xc9c5, 0x003f, 0x003f, 0xbce2, 0xcfa3, 0x003f, 0xeefe, 0xbaf8, - 0x003f, 0x003f, 0xcfbf, 0x003f, 0x003f, 0xefa6, 0x003f, 0x003f, - 0x003f, 0x003f, 0xefa5, 0xefa7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xeefd, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xc6e9, 0x003f, 0xc5d5, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xc4d7, 0x003f, 0xefac, 0x003f, - 0x003f, 0x003f, 0x003f, 0xc3c3, 0xefa8, 0x003f, 0x003f, 0x003f, - 0xefa9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xb7ad, 0x003f, 0xefab, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb8b0, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xefaa, 0x003f, 0xbee1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xb3f9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xefb0, 0x003f, 0xbabf, 0xc1f9, - 0x003f, 0x003f, 0xc4ca, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb3bb, - 0x003f, 0x003f, 0x003f, 0x003f, 0xefae, 0xefaf, 0xc4c3, 0x003f, - 0xefad, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xefb1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xefb7, 0x003f, 0x003f, 0x003f, 0x003f, - 0xefba, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xefb9, 0xc5ad, 0x003f, 0x003f, 0x003f, 0x003f, 0xefb2, 0xefb3, - 0xefb6, 0x003f, 0x003f, 0x003f, 0x003f, 0xefb8, 0x003f, 0x003f, - 0x003f, 0xb6c0, 0x003f, 0x003f, 0xefbb, 0xefb5, 0x003f, 0x003f, - 0xefb4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9400 .. 0x94ff */ - 0x003f, 0x003f, 0x003f, 0xefbf, 0x003f, 0x003f, 0x003f, 0xefc0, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xefc1, 0x003f, 0x003f, 0xefbe, 0xefbd, 0x003f, 0x003f, 0x003f, - 0xbee2, 0xc6aa, 0xefbc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xefc5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xefc3, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xefc4, 0xefc2, 0x003f, - 0xc2f8, 0x003f, 0xefc6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xefc7, 0x003f, 0x003f, 0xefc9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb4d5, 0xefc8, 0xccfa, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xefd4, 0xefca, 0x003f, 0x003f, 0xefcd, 0x003f, - 0xefcb, 0x003f, 0xefcc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xefce, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xefd0, 0x003f, 0x003f, 0x003f, 0x003f, 0xefd1, 0x003f, 0xefd2, - 0x003f, 0x003f, 0x003f, 0x003f, 0xefd5, 0xefd3, 0xefd6, 0xefd8, - 0x003f, 0xefd7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9500 .. 0x95ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc4b9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcce7, 0x003f, 0xefd9, 0xc1ae, 0x003f, 0x003f, 0x003f, 0xefda, - 0x003f, 0xcac4, 0xefdb, 0xb3ab, 0x003f, 0x003f, 0x003f, 0xb1bc, - 0x003f, 0xb4d7, 0x003f, 0xb4d6, 0xefdc, 0x003f, 0xefdd, 0x003f, - 0xefde, 0xefdf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xefe0, 0x003f, 0xb4d8, 0xb3d5, 0xb9de, 0xc8b6, 0x003f, 0xefe2, - 0xefe1, 0x003f, 0x003f, 0x003f, 0x003f, 0xefe3, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb1dc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xefe6, 0x003f, 0xefe5, 0xefe4, 0x003f, 0xefe7, 0x003f, - 0x003f, 0x003f, 0x003f, 0xefea, 0x003f, 0x003f, 0x003f, 0xb0c7, - 0x003f, 0x003f, 0xefe8, 0x003f, 0xefec, 0xefeb, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xefee, 0xefed, 0xefef, 0x003f, - 0xc6ae, 0x003f, 0x003f, 0x003f, 0xeff0, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeff1, 0xeff3, 0x003f, 0x003f, 0xeff2, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9600 .. 0x96ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xc9ec, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeff4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeff5, 0x003f, 0xbae5, 0x003f, 0x003f, 0x003f, 0xeff6, 0xeff7, - 0x003f, 0x003f, 0xcbc9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xc1cb, 0x003f, 0x003f, 0x003f, 0xb0a4, - 0xc2cb, 0x003f, 0xeff8, 0x003f, 0xc9ed, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xeffb, 0xeff9, 0xb9df, 0x003f, 0xeffa, - 0xb8c2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcac5, 0xeffd, 0xf0a1, 0xeffe, 0xf0a2, - 0x003f, 0x003f, 0xb1a1, 0xbfd8, 0xbdfc, 0xb4d9, 0xf0a3, 0x003f, - 0x003f, 0x003f, 0xc7e6, 0x003f, 0xf0a5, 0x003f, 0x003f, 0x003f, - 0xb1a2, 0x003f, 0xf0a4, 0xc4c4, 0x003f, 0xcecd, 0xc6ab, 0xeffc, - 0xcea6, 0x003f, 0xb8b1, 0x003f, 0x003f, 0xcddb, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb6f9, 0xceb4, 0x003f, - 0xb7a8, 0x003f, 0xc2e2, 0xe7a1, 0x003f, 0xf0a6, 0xb3ac, 0xbfef, - 0x003f, 0x003f, 0x003f, 0x003f, 0xb3d6, 0xf0a8, 0x003f, 0xf0a9, - 0xf0a7, 0xb7e4, 0x003f, 0xbadd, 0xbee3, 0x003f, 0x003f, 0x003f, - 0xb1a3, 0x003f, 0x003f, 0xced9, 0x003f, 0x003f, 0x003f, 0xf0ab, - 0xeeae, 0x003f, 0xf0aa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf0ae, 0xf0ac, 0xf0ad, 0x003f, 0xf0af, 0x003f, 0xf0b0, 0xceec, - 0xf0b1, 0xf0b2, 0x003f, 0xc0c9, 0xc8bb, 0x003f, 0x003f, 0x003f, - 0xbffd, 0xb4e7, 0x003f, 0x003f, 0xcdba, 0xb2ed, 0xbdb8, 0xb8db, - 0x003f, 0xf0b5, 0x003f, 0xf0b4, 0xbbf3, 0xf0b6, 0xf0b3, 0x003f, - 0x003f, 0xbba8, 0x003f, 0x003f, 0x003f, 0xf0ba, 0xeaad, 0x003f, - 0x003f, 0xd2d6, 0x003f, 0xbff7, 0xf0b8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcea5, 0xc6f1, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb1ab, 0x003f, 0xc0e3, 0xbcb6, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcab7, 0x003f, 0xb1c0, 0x003f, 0x003f, 0x003f, 0xceed, 0xcdeb, - 0x003f, 0xf0bb, 0x003f, 0xc5c5, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9700 .. 0x97ff */ - 0xbcfb, 0x003f, 0x003f, 0x003f, 0xf0bc, 0x003f, 0xf0bd, 0xbfcc, - 0xf0be, 0x003f, 0xceee, 0x003f, 0x003f, 0xf0b9, 0xf0c0, 0xf0c2, - 0x003f, 0xf0c1, 0x003f, 0xf0bf, 0x003f, 0x003f, 0xf0c3, 0x003f, - 0x003f, 0xf0c4, 0x003f, 0x003f, 0xc1fa, 0x003f, 0xb2e2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf0c5, 0x003f, 0x003f, 0xccb8, - 0x003f, 0x003f, 0xf0c6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf0c7, 0x003f, 0xcfaa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdbb1, 0xf0c8, 0x003f, 0x003f, 0x003f, 0xf0c9, 0xf0ca, 0x003f, - 0x003f, 0x003f, 0xf0ce, 0x003f, 0xf0cb, 0x003f, 0xf0cc, 0x003f, - 0xf0cd, 0xf0cf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc0c4, 0x003f, 0x003f, 0x003f, 0xccf7, 0x003f, - 0x003f, 0xc0c5, 0x003f, 0x003f, 0xf0d0, 0x003f, 0xc8f3, 0x003f, - 0xf0d1, 0xf3d3, 0xcccc, 0x003f, 0xf0d2, 0x003f, 0xf0d3, 0x003f, - 0xf0d4, 0xb3d7, 0x003f, 0xf0d6, 0x003f, 0xbfd9, 0x003f, 0x003f, - 0x003f, 0xf0d7, 0x003f, 0x003f, 0xb7a4, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf0d8, 0xf0dc, 0x003f, 0xf0da, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf0db, 0x003f, 0x003f, 0xb3f3, 0xf0d9, 0xf0dd, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf0de, 0x003f, 0xb0c8, 0x003f, 0xf0df, - 0xf0e0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xbee4, 0x003f, 0x003f, 0x003f, 0xf0e1, 0x003f, 0x003f, 0x003f, - 0xb5c7, 0x003f, 0x003f, 0xf0e4, 0x003f, 0x003f, 0xf0e3, 0x003f, - 0xf0e2, 0x003f, 0x003f, 0xebf1, 0x003f, 0xcadc, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf0e5, 0xf0e6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf0e7, 0x003f, 0x003f, 0xf0e8, 0x003f, - 0xf0e9, 0x003f, 0x003f, 0xf0ea, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb4da, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf0eb, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf0ec, 0xc7a3, 0x003f, - 0x003f, 0x003f, 0xf0ee, 0xb2bb, 0x003f, 0xf0f1, 0xf0f0, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb1a4, 0x003f, 0x003f, 0x003f, 0xb6c1, - /* 0x9800 .. 0x98ff */ - 0x003f, 0xcac7, 0xc4ba, 0xbaa2, 0x003f, 0xb9e0, 0xbde7, 0x003f, - 0xbfdc, 0x003f, 0x003f, 0x003f, 0xf0f3, 0x003f, 0x003f, 0xf0f2, - 0xcdc2, 0xb4e8, 0xc8d2, 0xc6dc, 0x003f, 0x003f, 0x003f, 0xbffc, - 0xcece, 0x003f, 0xb7db, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf0f6, 0x003f, 0x003f, 0xf0f5, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcbcb, 0xc6ac, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xb1d0, 0x003f, 0x003f, 0xf0f7, - 0xf0f4, 0x003f, 0x003f, 0xc9d1, 0xcdea, 0xf0f8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf0f9, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf0fb, 0xc2ea, 0xb3db, 0xb3dc, 0xf0fa, - 0x003f, 0x003f, 0x003f, 0x003f, 0xb4e9, 0xb8b2, 0x003f, 0x003f, - 0xb4ea, 0x003f, 0x003f, 0xc5bf, 0x003f, 0x003f, 0xcee0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb8dc, - 0x003f, 0x003f, 0x003f, 0xf0fc, 0x003f, 0x003f, 0x003f, 0xf0fd, - 0xf0fe, 0xf1a1, 0x003f, 0xf1a3, 0xf1a2, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xc9f7, 0x003f, 0xf1a4, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1a5, - 0x003f, 0xf1a6, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1a7, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf1a9, 0xf1a8, 0x003f, 0xf1aa, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xc8f4, 0xe6cc, 0x003f, 0x003f, 0xbfa9, - 0x003f, 0x003f, 0xb5b2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf1ab, 0x003f, 0xf1ac, 0x003f, 0xd2ac, 0xddbb, 0xc8d3, - 0x003f, 0x003f, 0xb0fb, 0x003f, 0xb0bb, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xbbf4, 0xcbb0, 0xbefe, 0x003f, - /* 0x9900 .. 0x99ff */ - 0x003f, 0x003f, 0x003f, 0xf1ad, 0x003f, 0xccdf, 0x003f, 0x003f, - 0x003f, 0xf1ae, 0xcddc, 0x003f, 0xb1c2, 0x003f, 0x003f, 0x003f, - 0xbbc1, 0x003f, 0xf1af, 0xb2ee, 0xf1b0, 0x003f, 0x003f, 0x003f, - 0xf1b1, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1b3, 0xf1b4, 0x003f, - 0xf1b6, 0xf1b2, 0x003f, 0x003f, 0xf1b5, 0x003f, 0x003f, 0x003f, - 0xb4db, 0x003f, 0x003f, 0x003f, 0xf1b7, 0x003f, 0xf1b8, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1b9, 0xf1ba, 0x003f, - 0x003f, 0x003f, 0xf1bb, 0x003f, 0x003f, 0xf1bd, 0x003f, 0x003f, - 0x003f, 0xf1bc, 0x003f, 0xf1bf, 0xf1c2, 0x003f, 0x003f, 0x003f, - 0xf1be, 0xf1c0, 0xf1c1, 0x003f, 0x003f, 0xf1c3, 0x003f, 0xb6c2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xbcf3, 0xf1c4, - 0xf1c5, 0xb9e1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1c6, 0x003f, 0x003f, - 0xb3be, 0x003f, 0x003f, 0x003f, 0xc7cf, 0xf1c7, 0xf1c8, 0x003f, - 0x003f, 0x003f, 0x003f, 0xc3da, 0xc6eb, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf1c9, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc7fd, 0x003f, 0x003f, 0xc2cc, 0xb1d8, 0xb6ee, 0x003f, - 0xb6ef, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xc3f3, 0xf1ce, 0xb6f0, 0x003f, 0x003f, 0xb2ef, 0x003f, 0x003f, - 0xf1cd, 0x003f, 0x003f, 0xf1cb, 0x003f, 0xf1cc, 0x003f, 0xf1ca, - 0x003f, 0x003f, 0xf1d8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1cf, 0xf1d0, 0x003f, - 0x003f, 0xf1d1, 0xf1d2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf1d4, 0x003f, 0x003f, 0xf1d3, 0x003f, 0x003f, 0x003f, 0xbdd9, - /* 0x9a00 .. 0x9aff */ - 0x003f, 0xf1d5, 0x003f, 0x003f, 0x003f, 0xf1d7, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb5b3, 0xf1d6, - 0x003f, 0x003f, 0xc1fb, 0xb8b3, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf1d9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xc2cd, 0x003f, 0x003f, 0xf1da, 0x003f, 0x003f, 0x003f, 0x003f, - 0xc6ad, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1db, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1e0, 0x003f, - 0xf1de, 0x003f, 0xf1dd, 0xf1df, 0x003f, 0xf1dc, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1e2, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1e1, 0x003f, 0xf1e4, - 0x003f, 0x003f, 0xb6c3, 0xf1e3, 0x003f, 0x003f, 0x003f, 0xf1e5, - 0x003f, 0x003f, 0xf1e6, 0x003f, 0xf1e8, 0xf1e7, 0x003f, 0x003f, - 0x003f, 0xf1e9, 0xf1eb, 0xf1ea, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb9fc, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1ec, 0x003f, 0x003f, - 0xf1ed, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb3bc, 0x003f, 0x003f, 0x003f, 0xf1ee, 0x003f, 0x003f, 0x003f, - 0xf1ef, 0x003f, 0x003f, 0x003f, 0xbff1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1f0, - 0x003f, 0xf1f1, 0x003f, 0xf1f2, 0xf1f3, 0x003f, 0x003f, 0x003f, - 0xb9e2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1f4, 0xf1f5, - 0x003f, 0x003f, 0xf1f6, 0xf1f7, 0x003f, 0x003f, 0xf1f8, 0x003f, - 0x003f, 0x003f, 0xc8b1, 0xf1fa, 0x003f, 0xc9a6, 0xf1fb, 0xf1f9, - 0x003f, 0xf1fd, 0x003f, 0x003f, 0xf1fc, 0x003f, 0x003f, 0xf1fe, - 0x003f, 0x003f, 0x003f, 0xf2a1, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9b00 .. 0x9bff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2a2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf2a3, 0x003f, 0xf2a4, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2a5, - 0x003f, 0x003f, 0xf2a6, 0xf2a7, 0x003f, 0xf2a8, 0x003f, 0xf2a9, - 0xf2aa, 0xf2ab, 0xf2ac, 0x003f, 0x003f, 0x003f, 0xf2ad, 0xf2ae, - 0x003f, 0xddb5, 0xf2af, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe4f8, 0xb5b4, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb3a1, 0xbab2, 0xf2b1, 0xf2b0, 0xcca5, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2b3, 0xf2b4, 0xf2b2, - 0x003f, 0xf2b5, 0x003f, 0x003f, 0xcbe2, 0x003f, 0x003f, 0x003f, - 0xf2b6, 0x003f, 0xb5fb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcfa5, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf2b7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf2b9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb0be, 0x003f, - 0x003f, 0xf2ba, 0xcaab, 0xf2b8, 0x003f, 0x003f, 0xf2bb, 0xf2bc, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2bd, - 0xf2be, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf2bf, 0x003f, 0xcbee, 0xbbad, 0x003f, 0xbafa, 0xc1af, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf2c0, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf2c3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf2c1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2c4, 0x003f, - 0x003f, 0xb8f1, 0xf2c2, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2c5, - 0x003f, 0xf2c6, 0xf2c7, 0x003f, 0xf2cb, 0x003f, 0xbbaa, 0x003f, - 0x003f, 0x003f, 0x003f, 0xc2e4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf2cc, 0xf2c9, 0xf2c8, 0xf2ca, 0x003f, 0x003f, 0x003f, - 0xb7df, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf2d0, 0xf2cf, 0xf2ce, 0x003f, 0x003f, 0xb0b3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9c00 .. 0x9cff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0xf2da, 0x003f, 0xf2d6, 0x003f, - 0xf2d7, 0xf2d3, 0xf2d9, 0x003f, 0xf2d5, 0xb3e2, 0x003f, 0x003f, - 0xcfcc, 0x003f, 0xf2d8, 0xf2d4, 0xf2d2, 0xf2d1, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf2dc, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf2df, 0x003f, 0x003f, 0xf2de, 0xf2dd, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc9c9, 0xf2db, 0xb0f3, - 0xf2e0, 0x003f, 0xf2e2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb3ef, 0xf2cd, 0xb1b7, 0x003f, 0x003f, 0xf2e4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2e3, 0xf2e1, - 0xc3ad, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcbf0, 0x003f, 0x003f, 0x003f, 0x003f, 0xceda, - 0x003f, 0x003f, 0xf2e5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf2e6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2e7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2e8, 0x003f, - 0xf2e9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc4bb, 0x003f, 0xf2ea, - 0x003f, 0xc8b7, 0x003f, 0xf2ef, 0xf2eb, 0x003f, 0x003f, 0x003f, - 0xf2ec, 0x003f, 0x003f, 0xcbb1, 0xccc4, 0x003f, 0xc6d0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9d00 .. 0x9dff */ - 0x003f, 0x003f, 0x003f, 0xf2f0, 0x003f, 0x003f, 0xf2f1, 0xc6be, - 0xf2ee, 0xf2ed, 0x003f, 0x003f, 0x003f, 0x003f, 0xb2aa, 0x003f, - 0x003f, 0x003f, 0xf2f9, 0x003f, 0x003f, 0xf2f8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb1f5, 0x003f, 0x003f, 0x003f, 0xf2f6, - 0x003f, 0x003f, 0x003f, 0xf2f5, 0x003f, 0x003f, 0xf2f3, 0x003f, - 0xb3fb, 0x003f, 0xf2f2, 0xbcb2, 0xb2a9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb9e3, 0x003f, 0x003f, 0xf2fc, 0xf2fb, - 0x003f, 0xf2fa, 0x003f, 0x003f, 0xf2f7, 0x003f, 0xf2fd, 0x003f, - 0xf2fe, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf3a5, 0xf3a4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf3a6, 0x003f, 0x003f, 0xb1ad, 0xf3a1, 0xf3a2, 0x003f, - 0xb9f4, 0xccb9, 0x003f, 0x003f, 0xf3a3, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcbb2, 0x003f, 0x003f, 0xf3ab, - 0x003f, 0x003f, 0xf3a7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf3ac, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3a9, - 0x003f, 0xf3a8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb7dc, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf3ad, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf3ae, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf3af, 0x003f, 0xf3aa, 0x003f, 0x003f, 0x003f, 0xf2f4, - 0x003f, 0x003f, 0xf3b0, 0x003f, 0xc4e1, 0x003f, 0x003f, 0x003f, - 0xf3b4, 0x003f, 0xf3b5, 0xf3b3, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf3b2, 0xf3b8, 0x003f, 0xf3b1, 0x003f, 0xf3b6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3b7, - 0x003f, 0x003f, 0x003f, 0xf3ba, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf3b9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3bc, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3bd, 0x003f, 0xf3be, - 0x003f, 0x003f, 0xcfc9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf3bb, 0xc2eb, 0xbaed, 0x003f, 0x003f, 0xf3bf, 0x003f, 0x003f, - /* 0x9e00 .. 0x9eff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf3c0, 0xf3c1, 0x003f, 0x003f, 0xf3c2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3c3, 0x003f, 0x003f, - 0xb8b4, 0xf3c4, 0x003f, 0x003f, 0x003f, 0xf3c5, 0x003f, 0xbcaf, - 0x003f, 0xf3c6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf3c7, 0x003f, 0x003f, 0xf3c8, 0xf3c9, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf3cc, 0xf3ca, 0xcfbc, 0x003f, 0xf3cb, 0x003f, 0xceef, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3cd, 0x003f, 0xcedb, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3ce, 0xc7fe, 0x003f, - 0x003f, 0xf3cf, 0xf3d1, 0x003f, 0x003f, 0xf3d2, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf3d0, 0xb9ed, 0xcccd, 0xcbe3, 0xd6f7, 0x003f, 0xdde0, 0xcbfb, - 0x003f, 0x003f, 0x003f, 0x003f, 0xb2ab, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf3d4, 0xb5d0, 0xf3d5, 0xf3d6, - 0xf3d7, 0x003f, 0xb9f5, 0x003f, 0xf3d8, 0x003f, 0x003f, 0x003f, - 0xe0d4, 0xccdb, 0x003f, 0xc2e3, 0xf3d9, 0xf3db, 0xf3da, 0x003f, - 0xf3dc, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3dd, 0x003f, 0x003f, - 0xf3de, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3df, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf3e0, 0x003f, 0xf3e1, 0xf3e2, - 0x003f, 0xf3e3, 0x003f, 0xf3e4, 0xf3e5, 0xf3e6, 0x003f, 0x003f, - /* 0x9f00 .. 0x9fff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3e7, - 0xf3e8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc5a4, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb8dd, 0x003f, 0xf3ea, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xc1cd, 0xf3eb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf3ec, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xc9a1, 0x003f, 0x003f, 0xf3ed, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf3ee, 0xe3b7, 0x003f, 0x003f, 0xecda, 0xf0ed, - 0x003f, 0x003f, 0xf3ef, 0x003f, 0xf3f0, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3f2, - 0xf3f3, 0xf3f4, 0xcef0, 0xf3f1, 0x003f, 0x003f, 0xf3f5, 0xf3f6, - 0x003f, 0x003f, 0xf3f8, 0x003f, 0xf3f7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf3fa, 0x003f, 0x003f, 0x003f, 0xf3fb, 0xf3f9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xceb6, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3fc, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf3fd, 0xe3d4, 0x003f, 0x003f, - 0xf3fe, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xf900 .. 0xf9ff */ - 0xecb1, 0xb9b9, 0xbcd6, 0xeccb, 0xb3ea, 0xb6fa, 0xb6e7, 0xf3fd, - 0xf3fd, 0xb7c0, 0xb6e2, 0xd3c9, 0xc6e0, 0xd8f1, 0xe1fa, 0xcde5, - 0xe9c7, 0xcde6, 0xcde7, 0xeeb6, 0xdcdb, 0xcdec, 0xdfe0, 0xe0e4, - 0xcdee, 0xcdef, 0xf1d1, 0xd0ac, 0xcdf1, 0xcdf3, 0xe0a5, 0xcdf6, - 0xf3c2, 0xcdf2, 0xcdf4, 0xcdf5, 0xeba2, 0xd9c7, 0xe7c4, 0x003f, - 0xcfad, 0xcfaf, 0xcfb2, 0xcfb5, 0xcfba, 0xd0d4, 0xcee4, 0xd2a9, - 0x003f, 0xcfa6, 0xe0a4, 0xe2ba, 0xcfb7, 0xe9c3, 0xceba, 0xcfa9, - 0xcfaa, 0xcfa5, 0xbaed, 0xe2f1, 0xe3b3, 0x003f, 0x003f, 0x003f, - 0xbcaf, 0xcfc0, 0xd4e2, 0xcfae, 0xe4c6, 0xcfb8, 0xcfb4, 0xe2fd, - 0xcfa8, 0xcdeb, 0xd4de, 0x003f, 0xdcec, 0x003f, 0xcfb3, 0xcedf, - 0xe5df, 0xeffb, 0xf0d5, 0xcfbe, 0xf4a5, 0xcebf, 0xcec7, 0xb0bd, - 0xc9a9, 0xcecd, 0xeca6, 0xd9bc, 0xdcdb, 0xc2fa, 0xc3b0, 0xc7ab, - 0xc5dc, 0xcea8, 0xb0db, 0xcbcc, 0x003f, 0xcad8, 0xc9fc, 0xc9d4, - 0xc8e7, 0xdacb, 0xbaf7, 0xd2d4, 0xbac9, 0xbeca, 0xcdd5, 0x003f, - 0xbba6, 0xc3a4, 0xc4c0, 0xbda6, 0xbce3, 0xceab, 0xceac, 0xcebc, - 0xd1c0, 0xd1da, 0xcec2, 0xcec8, 0xcec9, 0xceca, 0xcecc, 0xd2af, - 0xcfa4, 0xbdf7, 0xd7aa, 0xceb9, 0xdfc9, 0xe2ea, 0xefe3, 0xf1eb, - 0xceef, 0xf3d5, 0xcecf, 0x003f, 0x003f, 0xede0, 0xc7af, 0xcef9, - 0xd8f8, 0xc7b2, 0xcefa, 0xcefb, 0x003f, 0x003f, 0xcefd, 0xcefe, - 0xedd3, 0xcfa1, 0xcfa2, 0x003f, 0xcef3, 0xcef4, 0xb0f6, 0xcef5, - 0xcef6, 0x003f, 0xcef7, 0xc7b0, 0xc7b1, 0x003f, 0xcefc, 0xe0da, - 0xcee1, 0xd3fa, 0xc7ab, 0xcee6, 0xcee7, 0xcee8, 0xe0f2, 0xe6b9, - 0xe6d9, 0xceeb, 0xceed, 0xf0cd, 0xcece, 0xcee3, 0xe3b9, 0xeed4, - 0xf0b1, 0xd8a8, 0xcebb, 0xcebd, 0xcec0, 0xc7a2, 0xcec1, 0xdcdb, - 0xdff9, 0xcec5, 0xe8fa, 0xcecb, 0xceb6, 0xdaf4, 0xeff6, 0xcead, - 0x003f, 0xccf8, 0xceae, 0xceaf, 0xceb0, 0xceb1, 0xceb2, 0xc9b3, - 0xcee0, 0xcfbb, 0xd9a4, 0xcea6, 0xced1, 0xd6c6, 0xdecd, 0xced8, - 0xcea7, 0xd8cb, 0xb7aa, 0xcea8, 0xceb4, 0xcdf8, 0xcdf9, 0xcdfa, - 0xb0d7, 0xcdfb, 0xcdfc, 0xc5a5, 0xcdfd, 0xcea1, 0xd8ed, 0xcea2, - 0xcea3, 0xcea4, 0xcea5, 0xc6bf, 0xc5ae, 0xd2e7, 0xced5, 0x003f, - 0xe9c2, 0xced9, 0xceda, 0xcedb, 0xced3, 0xced4, 0xced7, 0xcea9, - 0xb3de, 0xceb3, 0x003f, 0xdfd5, 0xbcb1, 0xbdba, 0xc3e3, 0xbbc9, - /* 0xfa00 .. 0xfaff */ - 0xc0da, 0xc5d9, 0xc2f3, 0xc5fc, 0xc2f0, 0xc6b6, 0xcbbd, 0xedd5, - 0xb9d4, 0xb9df, 0xb8ab, 0xb3c7, 0xd1ba, 0x003f, 0x003f, 0x003f, - 0xc4cd, 0x003f, 0xc0b2, 0x003f, 0x003f, 0x003f, 0xc3f6, 0xb1d7, - 0xcee9, 0xbfc0, 0xbecd, 0xcaa1, 0xccf7, 0xc0ba, 0xb1a9, 0x003f, - 0x003f, 0x003f, 0xbdf4, 0x003f, 0x003f, 0xb0ef, 0xc5d4, 0x003f, - 0x003f, 0x003f, 0xc8d3, 0xbbf4, 0xb4db, 0xc4e1, 0x003f, 0x003f, - 0xc9ee, 0xc1ce, 0xccc8, 0xcad9, 0xb6d0, 0xc8dc, 0xb3e5, 0xc3b2, - 0xb4ef, 0xcabd, 0xcbcf, 0xc1d8, 0xd6a5, 0xb2f9, 0xb3b4, 0xc1fe, - 0xc4a8, 0xc9d2, 0xb4fb, 0xbdeb, 0xc7df, 0xb3a4, 0xbded, 0xb4c1, - 0xbcd1, 0x003f, 0xc2f6, 0xc8ea, 0xbcd2, 0xbbe3, 0xb5a7, 0xcdb4, - 0xc1c4, 0xbdcb, 0xb2d2, 0xc4f7, 0xb9f2, 0xc6cd, 0xc0e1, 0xcefd, - 0xe5d6, 0xc8cb, 0xbdf0, 0xbcd4, 0xbdad, 0x003f, 0x003f, 0xc3f8, - 0xb3ec, 0xbbeb, 0xb1da, 0xb6e0, 0xc9d0, 0xc2a3, 0x003f, 0xb0ef, - 0xc6f1, 0xb6c1, 0xc9d1, 0xb7c3, 0x003f, 0xb4dc, 0x003f, 0x003f, - 0xcac2, 0xd1d7, 0xc1b4, 0x003f, 0xbdbc, 0xd1c3, 0xcda6, 0xbcdb, - 0xb3e5, 0x003f, 0xd3bc, 0x003f, 0xc4cd, 0xcaaf, 0xb1e2, 0xcbdb, - 0xd5b9, 0x003f, 0x003f, 0x003f, 0xbacc, 0xd7d4, 0xd8b1, 0xbfb5, - 0xccfc, 0xc1fe, 0x003f, 0xc4a8, 0xc2d7, 0xd9e9, 0xd9d3, 0x003f, - 0xdac4, 0xc0b2, 0xcfaf, 0xcbbe, 0xbef3, 0xddc6, 0xbba6, 0xceae, - 0x003f, 0xbca2, 0xb4c1, 0xc6d4, 0xbcd1, 0x003f, 0xbcdf, 0xc8c8, - 0xc3f6, 0x003f, 0x003f, 0xb2e8, 0x003f, 0xe1e9, 0xb1d7, 0xc0b9, - 0xc4be, 0x003f, 0xc3e5, 0x003f, 0x003f, 0xc0e1, 0x003f, 0xe5b6, - 0xcefd, 0x003f, 0xbcd4, 0xb9d3, 0xb2da, 0x003f, 0xeaf6, 0xcaa4, - 0xbbeb, 0xc4b4, 0xbdf4, 0xc0c1, 0xb1da, 0xc2fa, 0xcda1, 0xb6e0, - 0xdace, 0xc2a3, 0xcda2, 0xeeaf, 0x003f, 0x003f, 0x003f, 0xc6f1, - 0xccf7, 0x003f, 0xb6c1, 0x003f, 0xc9d1, 0x003f, 0xf3fd, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xfb00 .. 0xfbff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x002b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xfe00 .. 0xfeff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x007e, 0x007e, 0x007e, 0x007e, 0x005f, 0x005f, 0x005f, - 0x002c, 0xa1a2, 0x002e, 0x003f, 0x003b, 0x003a, 0x003f, 0x0021, - 0xa1bd, 0x0028, 0x0029, 0x007b, 0x007d, 0xa1cc, 0xa1cd, 0x0023, - 0x0026, 0x002a, 0x002b, 0x002d, 0x003c, 0x003e, 0x003d, 0x003f, - 0x005c, 0x0024, 0x0025, 0x0040, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xff00 .. 0xffff */ - 0x003f, 0xa1aa, 0x0022, 0xa1f4, 0xa1f0, 0xa1f3, 0xa1f5, 0x0027, - 0xa1ca, 0xa1cb, 0xa1f6, 0xa1dc, 0xa1a4, 0x002d, 0xa1a5, 0xa1bf, - 0xa3b0, 0xa3b1, 0xa3b2, 0xa3b3, 0xa3b4, 0xa3b5, 0xa3b6, 0xa3b7, - 0xa3b8, 0xa3b9, 0xa1a7, 0xa1a8, 0xa1e3, 0xa1e1, 0xa1e4, 0xa1a9, - 0xa1f7, 0xa3c1, 0xa3c2, 0xa3c3, 0xa3c4, 0xa3c5, 0xa3c6, 0xa3c7, - 0xa3c8, 0xa3c9, 0xa3ca, 0xa3cb, 0xa3cc, 0xa3cd, 0xa3ce, 0xa3cf, - 0xa3d0, 0xa3d1, 0xa3d2, 0xa3d3, 0xa3d4, 0xa3d5, 0xa3d6, 0xa3d7, - 0xa3d8, 0xa3d9, 0xa3da, 0xa1ce, 0xa1c0, 0xa1cf, 0xa1b0, 0xa1b2, - 0xa1ae, 0xa3e1, 0xa3e2, 0xa3e3, 0xa3e4, 0xa3e5, 0xa3e6, 0xa3e7, - 0xa3e8, 0xa3e9, 0xa3ea, 0xa3eb, 0xa3ec, 0xa3ed, 0xa3ee, 0xa3ef, - 0xa3f0, 0xa3f1, 0xa3f2, 0xa3f3, 0xa3f4, 0xa3f5, 0xa3f6, 0xa3f7, - 0xa3f8, 0xa3f9, 0xa3fa, 0xa1d0, 0xa1c3, 0xa1d1, 0x007e, 0x003f, - 0x003f, 0x8ea1, 0x8ea2, 0x8ea3, 0x8ea4, 0x8ea5, 0x8ea6, 0x8ea7, - 0x8ea8, 0x8ea9, 0x8eaa, 0x8eab, 0x8eac, 0x8ead, 0x8eae, 0x8eaf, - 0x8eb0, 0x8eb1, 0x8eb2, 0x8eb3, 0x8eb4, 0x8eb5, 0x8eb6, 0x8eb7, - 0x8eb8, 0x8eb9, 0x8eba, 0x8ebb, 0x8ebc, 0x8ebd, 0x8ebe, 0x8ebf, - 0x8ec0, 0x8ec1, 0x8ec2, 0x8ec3, 0x8ec4, 0x8ec5, 0x8ec6, 0x8ec7, - 0x8ec8, 0x8ec9, 0x8eca, 0x8ecb, 0x8ecc, 0x8ecd, 0x8ece, 0x8ecf, - 0x8ed0, 0x8ed1, 0x8ed2, 0x8ed3, 0x8ed4, 0x8ed5, 0x8ed6, 0x8ed7, - 0x8ed8, 0x8ed9, 0x8eda, 0x8edb, 0x8edc, 0x8edd, 0x8ede, 0x8edf, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa1f1, 0xa1f2, 0xa2cc, 0xa1b1, 0x007c, 0xa1ef, 0x003f, 0x003f, - 0xa8a2, 0xa2ab, 0xa2ac, 0xa2aa, 0xa2ad, 0xa2a3, 0xa1fb, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* defaults */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x6c00, 0x6c00, 0x6c00, - 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, - 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, - 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x0500, 0x0600, 0x0700, - 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x0e00, 0x6c00, - 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x0f00, 0x6c00, 0x1000, 0x1100, - 0x1200, 0x1300, 0x1400, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, - 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, - 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, - 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x1500, 0x1600, - 0x1700, 0x1800, 0x1900, 0x1a00, 0x1b00, 0x1c00, 0x1d00, 0x1e00, - 0x1f00, 0x2000, 0x2100, 0x2200, 0x2300, 0x2400, 0x2500, 0x2600, - 0x2700, 0x2800, 0x2900, 0x2a00, 0x2b00, 0x2c00, 0x2d00, 0x2e00, - 0x2f00, 0x3000, 0x3100, 0x3200, 0x3300, 0x3400, 0x3500, 0x3600, - 0x3700, 0x3800, 0x3900, 0x3a00, 0x3b00, 0x3c00, 0x3d00, 0x3e00, - 0x3f00, 0x4000, 0x4100, 0x4200, 0x4300, 0x4400, 0x4500, 0x4600, - 0x4700, 0x4800, 0x4900, 0x4a00, 0x4b00, 0x4c00, 0x4d00, 0x4e00, - 0x4f00, 0x5000, 0x5100, 0x5200, 0x5300, 0x5400, 0x5500, 0x5600, - 0x5700, 0x5800, 0x5900, 0x5a00, 0x5b00, 0x5c00, 0x5d00, 0x5e00, - 0x5f00, 0x6000, 0x6100, 0x6200, 0x6300, 0x6400, 0x6500, 0x6600, - 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, - 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, - 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, - 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, - 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, - 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, - 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, - 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, - 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, - 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, - 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, - 0x6c00, 0x6700, 0x6800, 0x6900, 0x6c00, 0x6c00, 0x6a00, 0x6b00 -}; - -const struct dbcs_table cptable_20932 = -{ - { 20932, 2, 0x003f, 0x003f, "EUC-JP" }, - cp2uni, - cp2uni_leadbytes, - uni2cp_low, - uni2cp_high, - { - 0x8e, 0x8f, 0xa1, 0xfe, 0x00, 0x00 - } -}; diff --git a/reactos/tools/unicode/c_21866.c b/reactos/tools/unicode/c_21866.c deleted file mode 100644 index 8b1c77525a0..00000000000 --- a/reactos/tools/unicode/c_21866.c +++ /dev/null @@ -1,750 +0,0 @@ -/* code page 21866 (Ukrainian KOI8) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MISC/KOI8-U.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x2500, 0x2502, 0x250c, 0x2510, 0x2514, 0x2518, 0x251c, 0x2524, - 0x252c, 0x2534, 0x253c, 0x2580, 0x2584, 0x2588, 0x258c, 0x2590, - 0x2591, 0x2592, 0x2593, 0x2320, 0x25a0, 0x2219, 0x221a, 0x2248, - 0x2264, 0x2265, 0x00a0, 0x2321, 0x00b0, 0x00b2, 0x00b7, 0x00f7, - 0x2550, 0x2551, 0x2552, 0x0451, 0x0454, 0x2554, 0x0456, 0x0457, - 0x2557, 0x2558, 0x2559, 0x255a, 0x255b, 0x0491, 0x255d, 0x255e, - 0x255f, 0x2560, 0x2561, 0x0401, 0x0404, 0x2563, 0x0406, 0x0407, - 0x2566, 0x2567, 0x2568, 0x2569, 0x256a, 0x0490, 0x256c, 0x00a9, - 0x044e, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, - 0x0445, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, - 0x043f, 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, - 0x044c, 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a, - 0x042e, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, - 0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, - 0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, - 0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a -}; - -static const unsigned char uni2cp_low[5120] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x9a, 0x21, 0x63, 0x4c, 0x3f, 0x59, 0x7c, 0x3f, - 0x22, 0xbf, 0x61, 0x3c, 0x3f, 0x2d, 0x72, 0x2d, - 0x9c, 0x3f, 0x9d, 0x33, 0x27, 0x75, 0x3f, 0x9e, - 0x2c, 0x31, 0x6f, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, - 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, - 0x44, 0x4e, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x78, - 0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0x3f, 0x3f, - 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x63, - 0x65, 0x65, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69, - 0x64, 0x6e, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x9f, - 0x6f, 0x75, 0x75, 0x75, 0x75, 0x79, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x81, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55, - 0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0x2d, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x9c, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0x2d, 0x2d, 0x3f, 0x3f, - 0x22, 0x3f, 0x9c, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0x22, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x22, 0x41, 0x9e, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x75, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0400 .. 0x04ff */ - 0xe5, 0xb3, 0x3f, 0xe7, 0xb4, 0x3f, 0xb6, 0xb7, - 0x3f, 0x3f, 0x3f, 0x3f, 0xeb, 0xe9, 0xf5, 0x3f, - 0xe1, 0xe2, 0xf7, 0xe7, 0xe4, 0xe5, 0xf6, 0xfa, - 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, - 0xf2, 0xf3, 0xf4, 0xf5, 0xe6, 0xe8, 0xe3, 0xfe, - 0xfb, 0xfd, 0xff, 0xf9, 0xf8, 0xfc, 0xe0, 0xf1, - 0xc1, 0xc2, 0xd7, 0xc7, 0xc4, 0xc5, 0xd6, 0xda, - 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, - 0xd2, 0xd3, 0xd4, 0xd5, 0xc6, 0xc8, 0xc3, 0xde, - 0xdb, 0xdd, 0xdf, 0xd9, 0xd8, 0xdc, 0xc0, 0xd1, - 0xc5, 0xa3, 0x3f, 0xc7, 0xa4, 0x3f, 0xa6, 0xa7, - 0x3f, 0x3f, 0x3f, 0x3f, 0xcb, 0xc9, 0xd5, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xbd, 0xad, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xf6, 0xd6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe1, 0xc1, 0xe1, 0xc1, 0x3f, 0x3f, 0xe5, 0xc5, - 0x3f, 0x3f, 0x3f, 0x3f, 0xf6, 0xd6, 0xfa, 0xda, - 0x3f, 0x3f, 0xe9, 0xc9, 0xe9, 0xc9, 0xef, 0xcf, - 0x3f, 0x3f, 0x3f, 0x3f, 0xfc, 0xdc, 0xf5, 0xd5, - 0xf5, 0xd5, 0xf5, 0xd5, 0xfe, 0xde, 0x3f, 0x3f, - 0xf9, 0xd9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xce, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0x22, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0x22, 0x22, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0x95, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x9c, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x63, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x2f, 0x5c, 0x2a, - 0x9c, 0x95, 0x96, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x97, 0x97, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x98, 0x99, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3c, 0x3e, - 0x98, 0x99, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x9e, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x93, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x80, 0x80, 0x81, 0x81, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0x82, 0x82, 0x82, 0x82, - 0x83, 0x83, 0x83, 0x83, 0x84, 0x84, 0x84, 0x84, - 0x85, 0x85, 0x85, 0x85, 0x86, 0x86, 0x86, 0x86, - 0x86, 0x86, 0x86, 0x86, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x88, 0x88, 0x88, 0x88, - 0x88, 0x88, 0x88, 0x88, 0x89, 0x89, 0x89, 0x89, - 0x89, 0x89, 0x89, 0x89, 0x8a, 0x8a, 0x8a, 0x8a, - 0x8a, 0x8a, 0x8a, 0x8a, 0x8a, 0x8a, 0x8a, 0x8a, - 0x8a, 0x8a, 0x8a, 0x8a, 0x2d, 0x2d, 0x7c, 0x7c, - 0xa0, 0xa1, 0xa2, 0xa2, 0xa5, 0xa8, 0xa8, 0xa8, - 0xa9, 0xaa, 0xab, 0xac, 0xac, 0xae, 0xaf, 0xb0, - 0xb1, 0xb2, 0xb2, 0xb5, 0xb8, 0xb8, 0xb8, 0xb9, - 0xba, 0xbb, 0xbc, 0xbc, 0xbe, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x8b, 0x3f, 0x3f, 0x3f, 0x8c, 0x3f, 0x3f, 0x3f, - 0x8d, 0x3f, 0x3f, 0x3f, 0x8e, 0x3f, 0x3f, 0x3f, - 0x8f, 0x90, 0x91, 0x92, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x94, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x2d, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x63, 0x4c, 0x3f, 0x2d, 0x7c, 0x59, 0x3f, 0x3f, - 0x81, 0x3c, 0x5e, 0x3e, 0x76, 0x94, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0500, 0x0600, 0x0700, - 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x0e00, 0x1300, 0x1300, 0x1300, - 0x0f00, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1000, 0x1300, 0x1300, 0x1100, 0x1200 -}; - -const struct sbcs_table cptable_21866 = -{ - { 21866, 1, 0x003f, 0x003f, "Ukrainian KOI8" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_28591.c b/reactos/tools/unicode/c_28591.c deleted file mode 100644 index f9c865c5215..00000000000 --- a/reactos/tools/unicode/c_28591.c +++ /dev/null @@ -1,717 +0,0 @@ -/* code page 28591 (ISO 8859-1 Latin 1) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-1.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 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, - 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 const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 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, 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, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0xd0, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xd0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0xdc, 0xfc, 0xdc, - 0xfc, 0xdc, 0xfc, 0xdc, 0xfc, 0x3f, 0xc4, 0xe4, - 0x41, 0x61, 0xc6, 0xe6, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0xc5, 0xe5, 0xc6, 0xe6, 0xd8, 0xf8, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0xd6, 0xf6, 0xd5, 0xf5, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0xb4, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0xaf, 0xb4, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xb0, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0xb4, 0x5e, 0x7e, 0xaf, 0xaf, 0x3f, 0x3f, - 0xa8, 0x3f, 0xb0, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb8, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0xb4, 0x3f, 0x3f, 0xa8, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0xa8, 0x41, 0xb7, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xdf, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb5, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xdf, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0xc6, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xdf, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xdf, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0xf0, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0xc7, 0xe7, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0xcf, 0xef, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0xd5, 0xf5, 0xd5, 0xf5, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0xc2, 0xe2, 0xc2, 0xe2, - 0xc2, 0xe2, 0xc2, 0xe2, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0xca, 0xea, - 0xca, 0xea, 0xca, 0xea, 0xca, 0xea, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa8, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0xa8, 0xa8, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0xb4, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0xaf, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb0, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa2, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0xc5, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xd8, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0xb1, 0x3f, 0x2f, 0x5c, 0x2a, - 0xb0, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xab, 0xbb, 0x3f, 0x3f, 0x3c, 0x3e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb7, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0xa6, 0xa6, - 0x2d, 0x2d, 0xa6, 0xa6, 0x2b, 0x2b, 0x2b, 0x2b, - 0xac, 0xac, 0xac, 0xac, 0x4c, 0x4c, 0x4c, 0x4c, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54, - 0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0xa6, 0xa6, - 0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0xac, 0xac, 0xac, - 0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xaf, 0xaf, 0xaf, 0xaf, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa2, 0xa3, 0xac, 0xaf, 0xa6, 0xa5, 0x3f, 0x3f, - 0x7c, 0x3c, 0x5e, 0x3e, 0x76, 0x3f, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_28591 = -{ - { 28591, 1, 0x003f, 0x003f, "ISO 8859-1 Latin 1" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_28592.c b/reactos/tools/unicode/c_28592.c deleted file mode 100644 index bd0a1924c4d..00000000000 --- a/reactos/tools/unicode/c_28592.c +++ /dev/null @@ -1,717 +0,0 @@ -/* code page 28592 (ISO 8859-2 Latin 2 (East European)) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-2.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 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 const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 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, 0x21, 0x63, 0x4c, 0xa4, 0x59, 0x7c, 0xa7, - 0xa8, 0x63, 0x61, 0x3c, 0x3f, 0xad, 0x72, 0x2d, - 0xb0, 0x3f, 0x32, 0x33, 0xb4, 0x75, 0x3f, 0x3f, - 0xb8, 0x31, 0x6f, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0xc1, 0xc2, 0x41, 0xc4, 0x41, 0x41, 0xc7, - 0x45, 0xc9, 0x45, 0xcb, 0x49, 0xcd, 0xce, 0x49, - 0xd0, 0x4e, 0x4f, 0xd3, 0xd4, 0x4f, 0xd6, 0xd7, - 0x4f, 0x55, 0xda, 0x55, 0xdc, 0xdd, 0x3f, 0xdf, - 0x61, 0xe1, 0xe2, 0x61, 0xe4, 0x61, 0x61, 0xe7, - 0x65, 0xe9, 0x65, 0xeb, 0x69, 0xed, 0xee, 0x69, - 0x64, 0x6e, 0x6f, 0xf3, 0xf4, 0x6f, 0xf6, 0xf7, - 0x6f, 0x75, 0xfa, 0x75, 0xfc, 0xfd, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0xc3, 0xe3, 0xa1, 0xb1, 0xc6, 0xe6, - 0x43, 0x63, 0x43, 0x63, 0xc8, 0xe8, 0xcf, 0xef, - 0xd0, 0xf0, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0xca, 0xea, 0xcc, 0xec, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0xc5, 0xe5, 0x4c, 0x6c, 0xa5, 0xb5, 0x3f, - 0x3f, 0xa3, 0xb3, 0xd1, 0xf1, 0x4e, 0x6e, 0xd2, - 0xf2, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0xd5, 0xf5, 0x4f, 0x6f, 0xc0, 0xe0, 0x52, 0x72, - 0xd8, 0xf8, 0xa6, 0xb6, 0x53, 0x73, 0xaa, 0xba, - 0xa9, 0xb9, 0xde, 0xfe, 0xab, 0xbb, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0xd9, 0xf9, - 0xdb, 0xfb, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0xac, 0xbc, 0xaf, 0xbf, 0xae, 0xbe, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xd0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0xdc, 0xfc, 0xdc, - 0xfc, 0xdc, 0xfc, 0xdc, 0xfc, 0x3f, 0xc4, 0xe4, - 0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0xd6, 0xf6, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0xb4, 0xbd, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0xb7, - 0x27, 0x2d, 0xb4, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa2, 0xff, 0xb0, 0xb2, 0x7e, 0xbd, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0xb4, 0x5e, 0x7e, 0x2d, 0x2d, 0xa2, 0xff, - 0xa8, 0x3f, 0xb0, 0xbd, 0xb7, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb8, - 0xb2, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0xb4, 0x3f, 0x3f, 0xa8, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0xa8, 0x41, 0x3f, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xdf, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x75, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xdf, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xdf, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xdf, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0xc7, 0xe7, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0xa6, 0xb6, 0xa9, 0xb9, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0xc2, 0xe2, 0xc2, 0xe2, - 0xc2, 0xe2, 0xc2, 0xe2, 0x41, 0x61, 0xc3, 0xe3, - 0xc3, 0xe3, 0xc3, 0xe3, 0xc3, 0xe3, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa8, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0xa8, 0xa8, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0xb4, 0xbd, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb0, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x63, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0xb7, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x2f, 0x5c, 0x2a, - 0xb0, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3c, 0x3e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0x2b, 0x2b, 0x2b, 0x2b, - 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, 0x4c, 0x4c, 0x4c, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54, - 0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0x7c, 0x7c, - 0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x2d, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x63, 0x4c, 0x3f, 0x2d, 0x7c, 0x59, 0x3f, 0x3f, - 0x7c, 0x3c, 0x5e, 0x3e, 0xb7, 0x3f, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_28592 = -{ - { 28592, 1, 0x003f, 0x003f, "ISO 8859-2 Latin 2 (East European)" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_28593.c b/reactos/tools/unicode/c_28593.c deleted file mode 100644 index 647da2e1593..00000000000 --- a/reactos/tools/unicode/c_28593.c +++ /dev/null @@ -1,717 +0,0 @@ -/* code page 28593 (ISO 8859-3 Latin 3 (South European)) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-3.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 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, 0x003f, 0x0124, 0x00a7, - 0x00a8, 0x0130, 0x015e, 0x011e, 0x0134, 0x00ad, 0x003f, 0x017b, - 0x00b0, 0x0127, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x0125, 0x00b7, - 0x00b8, 0x0131, 0x015f, 0x011f, 0x0135, 0x00bd, 0x00be, 0x017c, - 0x00c0, 0x00c1, 0x00c2, 0x003f, 0x00c4, 0x010a, 0x0108, 0x00c7, - 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, - 0x003f, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x0120, 0x00d6, 0x00d7, - 0x011c, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x016c, 0x015c, 0x00df, - 0x00e0, 0x00e1, 0x00e2, 0x003f, 0x00e4, 0x010b, 0x0109, 0x00e7, - 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, - 0x003f, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x0121, 0x00f6, 0x00f7, - 0x011d, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x016d, 0x015d, 0x02d9 -}; - -static const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 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, 0x21, 0x63, 0xa3, 0xa4, 0x59, 0x7c, 0xa7, - 0xa8, 0x63, 0x61, 0x3c, 0x3f, 0xad, 0x72, 0x2d, - 0xb0, 0x3f, 0xb2, 0xb3, 0xb4, 0xb5, 0x3f, 0xb7, - 0xb8, 0x31, 0x6f, 0x3e, 0x3f, 0xbd, 0xbe, 0x3f, - 0xc0, 0xc1, 0xc2, 0x41, 0xc4, 0x41, 0x41, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0x44, 0xd1, 0xd2, 0xd3, 0xd4, 0x4f, 0xd6, 0xd7, - 0x4f, 0xd9, 0xda, 0xdb, 0xdc, 0x59, 0x3f, 0xdf, - 0xe0, 0xe1, 0xe2, 0x61, 0xe4, 0x61, 0x61, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0x64, 0xf1, 0xf2, 0xf3, 0xf4, 0x6f, 0xf6, 0xf7, - 0x6f, 0xf9, 0xfa, 0xfb, 0xfc, 0x79, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0xc6, 0xe6, 0xc5, 0xe5, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0xd8, 0xf8, 0xab, 0xbb, - 0xd5, 0xf5, 0x47, 0x67, 0xa6, 0xb6, 0xa1, 0xb1, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0xa9, 0xb9, 0x3f, 0x3f, 0xac, 0xbc, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0xde, 0xfe, 0xaa, 0xba, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0xdd, 0xfd, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0xaf, 0xbf, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0xdc, 0xfc, 0xdc, - 0xfc, 0xdc, 0xfc, 0xdc, 0xfc, 0x3f, 0xc4, 0xe4, - 0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0xd6, 0xf6, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0xb4, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0x2d, 0xb4, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa2, 0xff, 0xb0, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0xb4, 0x5e, 0x7e, 0x2d, 0x2d, 0xa2, 0xff, - 0xa8, 0x3f, 0xb0, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb8, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0xb4, 0x3f, 0x3f, 0xa8, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0xa8, 0x41, 0xb7, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xdf, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb5, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xdf, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xdf, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xdf, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0xc7, 0xe7, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0xcf, 0xef, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0xc2, 0xe2, 0xc2, 0xe2, - 0xc2, 0xe2, 0xc2, 0xe2, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0xca, 0xea, - 0xca, 0xea, 0xca, 0xea, 0xca, 0xea, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa8, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0xa8, 0xa8, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0xb4, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb0, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x63, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0xb1, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x2f, 0x5c, 0x2a, - 0xb0, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3c, 0x3e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb7, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0x2b, 0x2b, 0x2b, 0x2b, - 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, 0x4c, 0x4c, 0x4c, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54, - 0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0x7c, 0x7c, - 0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x2d, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x63, 0xa3, 0x3f, 0x2d, 0x7c, 0x59, 0x3f, 0x3f, - 0x7c, 0x3c, 0x5e, 0x3e, 0x76, 0x3f, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_28593 = -{ - { 28593, 1, 0x003f, 0x003f, "ISO 8859-3 Latin 3 (South European)" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_28594.c b/reactos/tools/unicode/c_28594.c deleted file mode 100644 index 82510155004..00000000000 --- a/reactos/tools/unicode/c_28594.c +++ /dev/null @@ -1,717 +0,0 @@ -/* code page 28594 (ISO 8859-4 Latin 4 (Baltic old)) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-4.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 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 const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 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, 0x21, 0x63, 0x4c, 0xa4, 0x59, 0x7c, 0xa7, - 0xa8, 0x63, 0x61, 0x3c, 0x3f, 0xad, 0x72, 0xaf, - 0xb0, 0x3f, 0x32, 0x33, 0xb4, 0x75, 0x3f, 0x3f, - 0xb8, 0x31, 0x6f, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0x43, - 0x45, 0xc9, 0x45, 0xcb, 0x49, 0xcd, 0xce, 0x49, - 0xd0, 0x4e, 0x4f, 0x4f, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0x55, 0xda, 0xdb, 0xdc, 0x59, 0x3f, 0xdf, - 0x61, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0x63, - 0x65, 0xe9, 0x65, 0xeb, 0x69, 0xed, 0xee, 0x69, - 0x64, 0x6e, 0x6f, 0x6f, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0x75, 0xfa, 0xfb, 0xfc, 0x79, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0xc0, 0xe0, 0x41, 0x61, 0xa1, 0xb1, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0xc8, 0xe8, 0x44, 0x64, - 0xd0, 0xf0, 0xaa, 0xba, 0x45, 0x65, 0xcc, 0xec, - 0xca, 0xea, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0xab, 0xbb, 0x48, 0x68, 0x48, 0x68, - 0xa5, 0xb5, 0xcf, 0xef, 0x49, 0x69, 0xc7, 0xe7, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0xd3, 0xf3, - 0xa2, 0x4c, 0x6c, 0xa6, 0xb6, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0xd1, 0xf1, 0x4e, - 0x6e, 0x3f, 0xbd, 0xbf, 0xd2, 0xf2, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0xa3, 0xb3, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0xa9, 0xb9, 0x54, 0x74, 0x54, 0x74, 0xac, 0xbc, - 0xdd, 0xfd, 0xde, 0xfe, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0xd9, 0xf9, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0xae, 0xbe, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xd0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0xdc, 0xfc, 0xdc, - 0xfc, 0xdc, 0xfc, 0xdc, 0xfc, 0x3f, 0xc4, 0xe4, - 0x41, 0x61, 0xc6, 0xe6, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0xc5, 0xe5, 0xc6, 0xe6, 0xd8, 0xf8, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0xd6, 0xf6, 0xd5, 0xf5, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0xb4, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0xb7, - 0x27, 0xaf, 0xb4, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xff, 0xb0, 0xb2, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0xb4, 0x5e, 0x7e, 0xaf, 0xaf, 0x3f, 0xff, - 0xa8, 0x3f, 0xb0, 0x22, 0xb7, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb8, - 0xb2, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0xb4, 0x3f, 0x3f, 0xa8, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0xa8, 0x41, 0x3f, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xdf, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x75, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xdf, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0xc6, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0xbf, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xdf, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xdf, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0xaa, 0xba, 0xaa, 0xba, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0xd5, 0xf5, 0xd5, 0xf5, - 0xd2, 0xf2, 0xd2, 0xf2, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0xa9, 0xb9, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0xdd, 0xfd, 0xde, 0xfe, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0xc2, 0xe2, 0xc2, 0xe2, - 0xc2, 0xe2, 0xc2, 0xe2, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa8, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0xa8, 0xa8, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0xb4, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0xaf, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb0, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x63, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0xc5, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0xb7, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xd8, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x2f, 0x5c, 0x2a, - 0xb0, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3c, 0x3e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0x2b, 0x2b, 0x2b, 0x2b, - 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, 0x4c, 0x4c, 0x4c, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54, - 0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0x7c, 0x7c, - 0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xaf, 0xaf, 0xaf, 0xaf, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x63, 0x4c, 0x3f, 0xaf, 0x7c, 0x59, 0x3f, 0x3f, - 0x7c, 0x3c, 0x5e, 0x3e, 0xb7, 0x3f, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_28594 = -{ - { 28594, 1, 0x003f, 0x003f, "ISO 8859-4 Latin 4 (Baltic old)" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_28595.c b/reactos/tools/unicode/c_28595.c deleted file mode 100644 index e0304447928..00000000000 --- a/reactos/tools/unicode/c_28595.c +++ /dev/null @@ -1,750 +0,0 @@ -/* code page 28595 (ISO 8859-5 Cyrillic) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-5.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 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 const unsigned char uni2cp_low[5120] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 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, 0x21, 0x63, 0x4c, 0x3f, 0x59, 0x7c, 0xfd, - 0x22, 0x63, 0x61, 0x3c, 0x3f, 0xad, 0x72, 0x2d, - 0x3f, 0x3f, 0x32, 0x33, 0x27, 0x75, 0x3f, 0x3f, - 0x2c, 0x31, 0x6f, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, - 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, - 0x44, 0x4e, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x78, - 0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0x3f, 0x3f, - 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x63, - 0x65, 0x65, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69, - 0x64, 0x6e, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x3f, - 0x6f, 0x75, 0x75, 0x75, 0x75, 0x79, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55, - 0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0x2d, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0x2d, 0x2d, 0x3f, 0x3f, - 0x22, 0x3f, 0x3f, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0x22, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x22, 0x41, 0x3f, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x75, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0400 .. 0x04ff */ - 0xb5, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xb8, 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, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xd5, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xd8, 0xfe, 0xff, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xb6, 0xd6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb0, 0xd0, 0xb0, 0xd0, 0x3f, 0x3f, 0xb5, 0xd5, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb6, 0xd6, 0xb7, 0xd7, - 0x3f, 0x3f, 0xb8, 0xd8, 0xb8, 0xd8, 0xbe, 0xde, - 0x3f, 0x3f, 0x3f, 0x3f, 0xcd, 0xed, 0xc3, 0xe3, - 0xc3, 0xe3, 0xc3, 0xe3, 0xc7, 0xe7, 0x3f, 0x3f, - 0xcb, 0xeb, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xdd, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0x22, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0x22, 0x22, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x63, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0xf0, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x2f, 0x5c, 0x2a, - 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3c, 0x3e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0x2b, 0x2b, 0x2b, 0x2b, - 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, 0x4c, 0x4c, 0x4c, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54, - 0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0x7c, 0x7c, - 0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x2d, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x63, 0x4c, 0x3f, 0x2d, 0x7c, 0x59, 0x3f, 0x3f, - 0x7c, 0x3c, 0x5e, 0x3e, 0x76, 0x3f, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0500, 0x0600, 0x0700, - 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x0e00, 0x1300, 0x1300, 0x1300, - 0x0f00, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1000, 0x1300, 0x1300, 0x1100, 0x1200 -}; - -const struct sbcs_table cptable_28595 = -{ - { 28595, 1, 0x003f, 0x003f, "ISO 8859-5 Cyrillic" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_28596.c b/reactos/tools/unicode/c_28596.c deleted file mode 100644 index 382b207fe1f..00000000000 --- a/reactos/tools/unicode/c_28596.c +++ /dev/null @@ -1,750 +0,0 @@ -/* code page 28596 (ISO 8859-6 Arabic) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-6.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 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, 0x003f, 0x003f, 0x003f, 0x00a4, 0x003f, 0x003f, 0x00a7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x060c, 0x00ad, 0x003f, 0x003f, - 0x00b0, 0x00b1, 0x003f, 0x003f, 0x003f, 0x003f, 0x00b6, 0x00b7, - 0x003f, 0x003f, 0x003f, 0x061b, 0x00bc, 0x00bd, 0x00be, 0x061f, - 0x003f, 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, 0x003f, 0x003f, 0x003f, 0x00de, 0x00df, - 0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, - 0x0648, 0x0649, 0x064a, 0x064b, 0x064c, 0x064d, 0x064e, 0x064f, - 0x0650, 0x0651, 0x0652, 0x003f, 0x003f, 0x003f, 0x003f, 0x00f7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x00fe, 0x003f -}; - -static const unsigned char uni2cp_low[5120] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 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, 0x21, 0x63, 0x4c, 0xa4, 0x59, 0x7c, 0xa7, - 0x22, 0x63, 0x61, 0x3c, 0x3f, 0xad, 0x72, 0x2d, - 0xb0, 0xb1, 0x32, 0x33, 0x27, 0x75, 0xb6, 0xb7, - 0x2c, 0x31, 0x6f, 0x3e, 0xbc, 0xbd, 0xbe, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, - 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, - 0x44, 0x4e, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x78, - 0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0xde, 0xdf, - 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x63, - 0x65, 0x65, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69, - 0x64, 0x6e, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0xf7, - 0x6f, 0x75, 0x75, 0x75, 0x75, 0x79, 0xfe, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55, - 0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0x2d, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0x2d, 0x2d, 0x3f, 0x3f, - 0x22, 0x3f, 0x3f, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0x22, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x22, 0x41, 0x3f, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x75, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0600 .. 0x06ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xac, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xbb, 0x3f, 0x3f, 0x3f, 0xbf, - 0x3f, 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, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0x22, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0x22, 0x22, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x63, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x2f, 0x5c, 0x2a, - 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3c, 0x3e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0x2b, 0x2b, 0x2b, 0x2b, - 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, 0x4c, 0x4c, 0x4c, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54, - 0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0x7c, 0x7c, - 0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x2d, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x63, 0x4c, 0x3f, 0x2d, 0x7c, 0x59, 0x3f, 0x3f, - 0x7c, 0x3c, 0x5e, 0x3e, 0x76, 0x3f, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1300, 0x1300, 0x0400, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0500, 0x0600, 0x0700, - 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x0e00, 0x1300, 0x1300, 0x1300, - 0x0f00, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1000, 0x1300, 0x1300, 0x1100, 0x1200 -}; - -const struct sbcs_table cptable_28596 = -{ - { 28596, 1, 0x003f, 0x003f, "ISO 8859-6 Arabic" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_28597.c b/reactos/tools/unicode/c_28597.c deleted file mode 100644 index 5d4daa4fef7..00000000000 --- a/reactos/tools/unicode/c_28597.c +++ /dev/null @@ -1,717 +0,0 @@ -/* code page 28597 (ISO 8859-7 Greek) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-7.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 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, 0x20ac, 0x20af, 0x00a6, 0x00a7, - 0x00a8, 0x00a9, 0x037a, 0x00ab, 0x00ac, 0x00ad, 0x003f, 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, 0x003f, 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, 0x003f -}; - -static const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 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, 0x21, 0x63, 0xa3, 0x3f, 0x59, 0xa6, 0xa7, - 0xa8, 0xa9, 0x61, 0xab, 0xac, 0xad, 0x72, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0x27, 0xec, 0x3f, 0xb7, - 0x2c, 0x31, 0x6f, 0xbb, 0x3f, 0xbd, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, - 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, - 0x44, 0x4e, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x78, - 0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0x3f, 0xe2, - 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x63, - 0x65, 0x65, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69, - 0x64, 0x6e, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x3f, - 0x6f, 0x75, 0x75, 0x75, 0x75, 0x79, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55, - 0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0xa1, 0xa2, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0xaf, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xb0, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0xaf, 0xaf, 0x3f, 0x3f, - 0xa8, 0x3f, 0xb0, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0xa8, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xaa, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0xba, 0x3f, 0xbc, 0x3f, 0xbe, 0xbf, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0xd0, 0xd1, 0x3f, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0x3f, - 0xe2, 0xe8, 0xd5, 0xd5, 0xd5, 0xf6, 0xf0, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xea, 0xf1, 0xf2, 0x3f, 0xc8, 0xe5, 0x3f, 0x3f, - 0x3f, 0xd3, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xe2, 0xe3, 0xe4, - 0xf6, 0xf7, 0x69, 0x72, 0x75, 0x76, 0xe2, 0xe3, - 0xf1, 0xf6, 0xf7, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0xe8, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, - 0xe5, 0xe5, 0xe5, 0xe5, 0xe5, 0xe5, 0x3f, 0x3f, - 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0x3f, 0x3f, - 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, - 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, - 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, - 0xc9, 0xc9, 0xc9, 0xc9, 0xc9, 0xc9, 0xc9, 0xc9, - 0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0x3f, 0x3f, - 0xcf, 0xcf, 0xcf, 0xcf, 0xcf, 0xcf, 0x3f, 0x3f, - 0xf5, 0xf5, 0xf5, 0xf5, 0xf5, 0xf5, 0xf5, 0xf5, - 0x3f, 0xd5, 0x3f, 0xd5, 0x3f, 0xd5, 0x3f, 0xd5, - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, - 0xd9, 0xd9, 0xd9, 0xd9, 0xd9, 0xd9, 0xd9, 0xd9, - 0xe1, 0xdc, 0xe5, 0xdd, 0xe7, 0xde, 0xe9, 0xdf, - 0xef, 0xfc, 0xf5, 0xfd, 0xf9, 0xfe, 0x3f, 0x3f, - 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, - 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, - 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, - 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, - 0xd9, 0xd9, 0xd9, 0xd9, 0xd9, 0xd9, 0xd9, 0xd9, - 0xe1, 0xe1, 0xe1, 0xe1, 0xdc, 0x3f, 0xe1, 0xe1, - 0xc1, 0xc1, 0xc1, 0xb6, 0xc1, 0x3f, 0xe9, 0x3f, - 0x3f, 0xa8, 0xe7, 0xe7, 0xde, 0x3f, 0xe7, 0xe7, - 0xc5, 0xb8, 0xc7, 0xb9, 0xc7, 0x3f, 0x3f, 0x3f, - 0xe9, 0xe9, 0xfa, 0xc0, 0x3f, 0x3f, 0xe9, 0xfa, - 0xc9, 0xc9, 0xc9, 0xba, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf5, 0xf5, 0xfb, 0xe0, 0xf1, 0xf1, 0xf5, 0xfb, - 0xd5, 0xd5, 0xd5, 0xbe, 0xd1, 0xa8, 0xb5, 0x60, - 0x3f, 0x3f, 0xf9, 0xf9, 0xfe, 0x3f, 0xf9, 0xf9, - 0xcf, 0xbc, 0xd9, 0xbf, 0xd9, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0xaf, 0xaf, 0xaf, 0x3f, 0x5f, - 0xa1, 0xa2, 0x2c, 0xa1, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0xa1, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0xaf, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb0, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x63, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xa4, 0x3f, 0x3f, 0xa5, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0xd9, 0x3f, - 0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0xf0, 0xe3, 0xc3, 0xd0, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0xb1, 0x3f, 0x2f, 0x5c, 0x2a, - 0xb0, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xab, 0xbb, 0x3f, 0x3f, 0x3c, 0x3e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb7, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0xa6, 0xa6, - 0x2d, 0x2d, 0xa6, 0xa6, 0x2b, 0x2b, 0x2b, 0x2b, - 0xac, 0xac, 0xac, 0xac, 0x4c, 0x4c, 0x4c, 0x4c, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54, - 0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0xa6, 0xa6, - 0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0xac, 0xac, 0xac, - 0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xaf, 0xaf, 0xaf, 0xaf, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0xaf, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x63, 0xa3, 0xac, 0xaf, 0xa6, 0x59, 0x3f, 0x3f, - 0x7c, 0x3c, 0x5e, 0x3e, 0x76, 0x3f, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_28597 = -{ - { 28597, 1, 0x003f, 0x003f, "ISO 8859-7 Greek" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_28598.c b/reactos/tools/unicode/c_28598.c deleted file mode 100644 index 12fe6eab3f7..00000000000 --- a/reactos/tools/unicode/c_28598.c +++ /dev/null @@ -1,750 +0,0 @@ -/* code page 28598 (ISO 8859-8 Hebrew) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-8.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 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, 0x003f, 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, 0x00bf, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x00de, 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, 0x003f, 0x003f, 0x200e, 0x200f, 0x003f -}; - -static const unsigned char uni2cp_low[5120] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 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, 0x21, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0x61, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0x6f, 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, 0xaa, - 0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0xde, 0x3f, - 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x63, - 0x65, 0x65, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69, - 0x64, 0x6e, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0xba, - 0x6f, 0x75, 0x75, 0x75, 0x75, 0x79, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55, - 0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0xb4, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0xaf, 0xb4, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xb0, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0xb4, 0x5e, 0x7e, 0xaf, 0xaf, 0x3f, 0x3f, - 0xa8, 0x3f, 0xb0, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb8, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0xb4, 0x3f, 0x3f, 0xa8, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0xa8, 0x41, 0xb7, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb5, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0500 .. 0x05ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa8, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0xa8, 0xa8, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0xfd, 0xfe, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0xdf, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0xb4, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0xaf, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb0, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa2, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0xe0, 0xe1, 0xe2, - 0xe3, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0xb1, 0x3f, 0x2f, 0x5c, 0x2a, - 0xb0, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xab, 0xbb, 0x3f, 0x3f, 0x3c, 0x3e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb7, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0xa6, 0xa6, - 0x2d, 0x2d, 0xa6, 0xa6, 0x2b, 0x2b, 0x2b, 0x2b, - 0xac, 0xac, 0xac, 0xac, 0x4c, 0x4c, 0x4c, 0x4c, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54, - 0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0xa6, 0xa6, - 0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0xac, 0xac, 0xac, - 0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xe9, 0x3f, 0x3f, - 0xf2, 0xe0, 0xe3, 0xe4, 0xeb, 0xec, 0xed, 0xf8, - 0xfa, 0x2b, 0xf9, 0xf9, 0xf9, 0xf9, 0xe0, 0xe0, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0x3f, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0x3f, 0xee, 0x3f, - 0xf0, 0xf1, 0x3f, 0xf3, 0xf4, 0x3f, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xe5, 0xe1, 0xeb, 0xf4, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xaf, 0xaf, 0xaf, 0xaf, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa2, 0xa3, 0xac, 0xaf, 0xa6, 0xa5, 0x3f, 0x3f, - 0x7c, 0x3c, 0x5e, 0x3e, 0x76, 0x3f, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1300, 0x0400, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0500, 0x0600, 0x0700, - 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x0e00, 0x1300, 0x1300, 0x1300, - 0x0f00, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1000, 0x1300, 0x1300, 0x1100, 0x1200 -}; - -const struct sbcs_table cptable_28598 = -{ - { 28598, 1, 0x003f, 0x003f, "ISO 8859-8 Hebrew" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_28599.c b/reactos/tools/unicode/c_28599.c deleted file mode 100644 index 4f728ecc039..00000000000 --- a/reactos/tools/unicode/c_28599.c +++ /dev/null @@ -1,717 +0,0 @@ -/* code page 28599 (ISO 8859-9 Latin 5 (Turkish)) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-9.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 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 const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 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, 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, - 0x44, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0x59, 0x3f, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0x64, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x79, 0x3f, 0xff, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0xd0, 0xf0, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0xdd, 0xfd, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0xde, 0xfe, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0xdc, 0xfc, 0xdc, - 0xfc, 0xdc, 0xfc, 0xdc, 0xfc, 0x3f, 0xc4, 0xe4, - 0x41, 0x61, 0xc6, 0xe6, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0xc5, 0xe5, 0xc6, 0xe6, 0xd8, 0xf8, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0xd6, 0xf6, 0xd5, 0xf5, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0xb4, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0xaf, 0xb4, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xb0, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0xb4, 0x5e, 0x7e, 0xaf, 0xaf, 0x3f, 0x3f, - 0xa8, 0x3f, 0xb0, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb8, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0xb4, 0x3f, 0x3f, 0xa8, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb4, 0xa8, 0x41, 0xb7, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xdf, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb5, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xdf, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0xc6, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xdf, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xdf, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0xc7, 0xe7, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0xcf, 0xef, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0xd5, 0xf5, 0xd5, 0xf5, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0xc2, 0xe2, 0xc2, 0xe2, - 0xc2, 0xe2, 0xc2, 0xe2, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0xca, 0xea, - 0xca, 0xea, 0xca, 0xea, 0xca, 0xea, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa8, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0xa8, 0xa8, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0xb4, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0xb4, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0xaf, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb0, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa2, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0xc5, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xd8, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0xb1, 0x3f, 0x2f, 0x5c, 0x2a, - 0xb0, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xab, 0xbb, 0x3f, 0x3f, 0x3c, 0x3e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb7, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0xa6, 0xa6, - 0x2d, 0x2d, 0xa6, 0xa6, 0x2b, 0x2b, 0x2b, 0x2b, - 0xac, 0xac, 0xac, 0xac, 0x4c, 0x4c, 0x4c, 0x4c, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54, - 0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0xa6, 0xa6, - 0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0xac, 0xac, 0xac, - 0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xaf, 0xaf, 0xaf, 0xaf, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa2, 0xa3, 0xac, 0xaf, 0xa6, 0xa5, 0x3f, 0x3f, - 0x7c, 0x3c, 0x5e, 0x3e, 0x76, 0x3f, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_28599 = -{ - { 28599, 1, 0x003f, 0x003f, "ISO 8859-9 Latin 5 (Turkish)" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_28600.c b/reactos/tools/unicode/c_28600.c deleted file mode 100644 index fe4e27a5023..00000000000 --- a/reactos/tools/unicode/c_28600.c +++ /dev/null @@ -1,717 +0,0 @@ -/* code page 28600 (ISO 8859-10 Latin 6 (Nordic)) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-10.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 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 const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 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, 0x21, 0x63, 0x4c, 0x3f, 0x59, 0x7c, 0xa7, - 0x22, 0x63, 0x61, 0x3c, 0x3f, 0xad, 0x72, 0xbd, - 0xb0, 0x3f, 0x32, 0x33, 0x27, 0x75, 0x3f, 0xb7, - 0x2c, 0x31, 0x6f, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0x43, - 0x45, 0xc9, 0x45, 0xcb, 0x49, 0xcd, 0xce, 0xcf, - 0xd0, 0x4e, 0x4f, 0xd3, 0xd4, 0xd5, 0xd6, 0x78, - 0xd8, 0x55, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, - 0x61, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0x63, - 0x65, 0xe9, 0x65, 0xeb, 0x69, 0xed, 0xee, 0xef, - 0xf0, 0x6e, 0x6f, 0xf3, 0xf4, 0xf5, 0xf6, 0x3f, - 0xf8, 0x75, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0x79, - /* 0x0100 .. 0x01ff */ - 0xc0, 0xe0, 0x41, 0x61, 0xa1, 0xb1, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0xc8, 0xe8, 0x44, 0x64, - 0xa9, 0xb9, 0xa2, 0xb2, 0x45, 0x65, 0xcc, 0xec, - 0xca, 0xea, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0xa3, 0xb3, 0x48, 0x68, 0x48, 0x68, - 0xa5, 0xb5, 0xa4, 0xb4, 0x49, 0x69, 0xc7, 0xe7, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0xa6, 0xb6, - 0xff, 0x4c, 0x6c, 0xa8, 0xb8, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0xd1, 0xf1, 0x4e, - 0x6e, 0x3f, 0xaf, 0xbf, 0xd2, 0xf2, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0xaa, 0xba, 0x54, 0x74, 0x54, 0x74, 0xab, 0xbb, - 0xd7, 0xf7, 0xae, 0xbe, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0xd9, 0xf9, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0xac, 0xbc, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xd0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0xdc, 0xfc, 0xdc, - 0xfc, 0xdc, 0xfc, 0xdc, 0xfc, 0x3f, 0xc4, 0xe4, - 0x41, 0x61, 0xc6, 0xe6, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0xc5, 0xe5, 0xc6, 0xe6, 0xd8, 0xf8, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0xd6, 0xf6, 0xd5, 0xf5, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0xbd, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xb0, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0xbd, 0xbd, 0x3f, 0x3f, - 0x22, 0x3f, 0xb0, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0x22, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x22, 0x41, 0xb7, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xdf, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x75, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xdf, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0xc6, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0xbf, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xdf, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xdf, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0xf0, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0xa2, 0xb2, 0xa2, 0xb2, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0xcf, 0xef, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0xd5, 0xf5, 0xd5, 0xf5, - 0xd2, 0xf2, 0xd2, 0xf2, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0xaa, 0xba, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0xd7, 0xf7, 0xae, 0xbe, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0xc2, 0xe2, 0xc2, 0xe2, - 0xc2, 0xe2, 0xc2, 0xe2, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0x22, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0x22, 0x22, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0xbd, 0xbd, 0xbd, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0xbd, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb0, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x63, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0xc5, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xd8, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x2f, 0x5c, 0x2a, - 0xb0, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3c, 0x3e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb7, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0x2b, 0x2b, 0x2b, 0x2b, - 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, 0x4c, 0x4c, 0x4c, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54, - 0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0x7c, 0x7c, - 0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xbd, 0xbd, 0xbd, 0xbd, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0xbd, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x63, 0x4c, 0x3f, 0xbd, 0x7c, 0x59, 0x3f, 0x3f, - 0x7c, 0x3c, 0x5e, 0x3e, 0x76, 0x3f, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_28600 = -{ - { 28600, 1, 0x003f, 0x003f, "ISO 8859-10 Latin 6 (Nordic)" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_28603.c b/reactos/tools/unicode/c_28603.c deleted file mode 100644 index 3d28197f7e0..00000000000 --- a/reactos/tools/unicode/c_28603.c +++ /dev/null @@ -1,717 +0,0 @@ -/* code page 28603 (ISO 8859-13 Latin 7 (Baltic)) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-13.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 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 const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 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, 0x21, 0xa2, 0xa3, 0xa4, 0x59, 0xa6, 0xa7, - 0x22, 0xa9, 0x61, 0xab, 0xac, 0xad, 0xae, 0x2d, - 0xb0, 0xb1, 0xb2, 0xb3, 0x27, 0xb5, 0xb6, 0xb7, - 0x2c, 0xb9, 0x6f, 0xbb, 0xbc, 0xbd, 0xbe, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0xc4, 0xc5, 0xaf, 0x43, - 0x45, 0xc9, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, - 0x44, 0x4e, 0x4f, 0xd3, 0x4f, 0xd5, 0xd6, 0xd7, - 0xa8, 0x55, 0x55, 0x55, 0xdc, 0x59, 0x3f, 0xdf, - 0x61, 0x61, 0x61, 0x61, 0xe4, 0xe5, 0xbf, 0x63, - 0x65, 0xe9, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69, - 0x64, 0x6e, 0x6f, 0xf3, 0x6f, 0xf5, 0xf6, 0xf7, - 0xb8, 0x75, 0x75, 0x75, 0xfc, 0x79, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0xc2, 0xe2, 0x41, 0x61, 0xc0, 0xe0, 0xc3, 0xe3, - 0x43, 0x63, 0x43, 0x63, 0xc8, 0xe8, 0x44, 0x64, - 0x44, 0x64, 0xc7, 0xe7, 0x45, 0x65, 0xcb, 0xeb, - 0xc6, 0xe6, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0xcc, 0xec, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0xce, 0xee, 0x49, 0x69, 0xc1, 0xe1, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0xcd, 0xed, - 0x3f, 0x4c, 0x6c, 0xcf, 0xef, 0x4c, 0x6c, 0x3f, - 0x3f, 0xd9, 0xf9, 0xd1, 0xf1, 0xd2, 0xf2, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0xd4, 0xf4, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0xaa, 0xba, - 0x52, 0x72, 0xda, 0xfa, 0x53, 0x73, 0x53, 0x73, - 0xd0, 0xf0, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0xdb, 0xfb, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0xd8, 0xf8, 0x57, 0x77, 0x59, 0x79, - 0x59, 0xca, 0xea, 0xdd, 0xfd, 0xde, 0xfe, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0xdc, 0xfc, 0xdc, - 0xfc, 0xdc, 0xfc, 0xdc, 0xfc, 0x3f, 0xc4, 0xe4, - 0x41, 0x61, 0xaf, 0xbf, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0xc5, 0xe5, 0xaf, 0xbf, 0xa8, 0xb8, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0xd6, 0xf6, 0xd5, 0xf5, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0x60, 0xff, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0x2d, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xb0, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0x2d, 0x2d, 0x3f, 0x3f, - 0x22, 0x3f, 0xb0, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0x22, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x22, 0x41, 0xb7, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xdf, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb5, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xdf, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0xaf, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xdf, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xdf, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0xc7, 0xe7, 0xc7, 0xe7, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0xd5, 0xf5, 0xd5, 0xf5, - 0xd4, 0xf4, 0xd4, 0xf4, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0xda, 0xfa, 0xd0, 0xf0, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0xdb, 0xfb, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0x22, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0x22, 0x22, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0xff, 0x2c, 0x60, 0xb4, 0xa1, 0xa5, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb0, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa2, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0xc5, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xa8, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0xb1, 0x3f, 0x2f, 0x5c, 0x2a, - 0xb0, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xab, 0xbb, 0x3f, 0x3f, 0x3c, 0x3e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb7, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0xa6, 0xa6, - 0x2d, 0x2d, 0xa6, 0xa6, 0x2b, 0x2b, 0x2b, 0x2b, - 0xac, 0xac, 0xac, 0xac, 0x4c, 0x4c, 0x4c, 0x4c, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54, - 0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0xa6, 0xa6, - 0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0xac, 0xac, 0xac, - 0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0xb4, 0xa1, 0xa5, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x2d, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa2, 0xa3, 0xac, 0x2d, 0xa6, 0x59, 0x3f, 0x3f, - 0x7c, 0x3c, 0x5e, 0x3e, 0x76, 0x3f, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_28603 = -{ - { 28603, 1, 0x003f, 0x003f, "ISO 8859-13 Latin 7 (Baltic)" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_28604.c b/reactos/tools/unicode/c_28604.c deleted file mode 100644 index 5127d13115a..00000000000 --- a/reactos/tools/unicode/c_28604.c +++ /dev/null @@ -1,717 +0,0 @@ -/* code page 28604 (ISO 8859-14 Latin 8 (Celtic)) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-14.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 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 const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 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, 0x21, 0x63, 0xa3, 0x3f, 0x59, 0x7c, 0xa7, - 0x22, 0xa9, 0x61, 0x3c, 0x3f, 0xad, 0xae, 0x2d, - 0x3f, 0x3f, 0x32, 0x33, 0x27, 0x75, 0xb6, 0x3f, - 0x2c, 0x31, 0x6f, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0x44, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0x78, - 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0x3f, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0x64, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0x3f, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0x3f, 0xff, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0xa4, 0xa5, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0xb2, 0xb3, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0xd0, 0xf0, 0xde, 0xfe, - 0xaf, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0xdc, 0xfc, 0xdc, - 0xfc, 0xdc, 0xfc, 0xdc, 0xfc, 0x3f, 0xc4, 0xe4, - 0x41, 0x61, 0xc6, 0xe6, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0xc5, 0xe5, 0xc6, 0xe6, 0xd8, 0xf8, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0xd6, 0xf6, 0xd5, 0xf5, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0x2d, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0x2d, 0x2d, 0x3f, 0x3f, - 0x22, 0x3f, 0x3f, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0x22, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x22, 0x41, 0x3f, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xdf, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x75, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xdf, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0xc6, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xdf, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xdf, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0xa1, 0xa2, 0x42, 0x62, 0x42, 0x62, - 0xc7, 0xe7, 0xa6, 0xab, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0xb0, 0xb1, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0xcf, 0xef, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0xb4, 0xb5, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0xd5, 0xf5, 0xd5, 0xf5, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0xb7, 0xb9, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0xbb, 0xbf, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0xd7, 0xf7, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0xa8, 0xb8, 0xaa, 0xba, 0xbd, 0xbe, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0xc2, 0xe2, 0xc2, 0xe2, - 0xc2, 0xe2, 0xc2, 0xe2, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0xca, 0xea, - 0xca, 0xea, 0xca, 0xea, 0xca, 0xea, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0xac, 0xbc, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0x22, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0x22, 0x22, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x63, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0xc5, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xd8, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x2f, 0x5c, 0x2a, - 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3c, 0x3e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0x2b, 0x2b, 0x2b, 0x2b, - 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, 0x4c, 0x4c, 0x4c, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54, - 0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0x7c, 0x7c, - 0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x2d, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x63, 0xa3, 0x3f, 0x2d, 0x7c, 0x59, 0x3f, 0x3f, - 0x7c, 0x3c, 0x5e, 0x3e, 0x76, 0x3f, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_28604 = -{ - { 28604, 1, 0x003f, 0x003f, "ISO 8859-14 Latin 8 (Celtic)" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_28605.c b/reactos/tools/unicode/c_28605.c deleted file mode 100644 index e09705787ed..00000000000 --- a/reactos/tools/unicode/c_28605.c +++ /dev/null @@ -1,717 +0,0 @@ -/* code page 28605 (ISO 8859-15 Latin 9 (Euro)) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-15.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 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 const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 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, 0x3f, 0xa5, 0x7c, 0xa7, - 0x22, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, - 0xb0, 0xb1, 0xb2, 0xb3, 0x27, 0xb5, 0xb6, 0xb7, - 0x2c, 0xb9, 0xba, 0xbb, 0x3f, 0x3f, 0x3f, 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, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0xd0, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0xbc, 0xbd, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0xa6, 0xa8, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0xbe, 0x5a, 0x7a, 0x5a, 0x7a, 0xb4, 0xb8, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xd0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0xdc, 0xfc, 0xdc, - 0xfc, 0xdc, 0xfc, 0xdc, 0xfc, 0x3f, 0xc4, 0xe4, - 0x41, 0x61, 0xc6, 0xe6, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0xc5, 0xe5, 0xc6, 0xe6, 0xd8, 0xf8, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0xd6, 0xf6, 0xd5, 0xf5, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0xaf, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xb0, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0xaf, 0xaf, 0x3f, 0x3f, - 0x22, 0x3f, 0xb0, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0x22, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x22, 0x41, 0xb7, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xdf, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb5, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xdf, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0xc6, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xdf, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xdf, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0xf0, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0xc7, 0xe7, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0xcf, 0xef, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0xd5, 0xf5, 0xd5, 0xf5, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0xa6, 0xa8, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0xc2, 0xe2, 0xc2, 0xe2, - 0xc2, 0xe2, 0xc2, 0xe2, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0xca, 0xea, - 0xca, 0xea, 0xca, 0xea, 0xca, 0xea, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0x22, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0x22, 0x22, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0xaf, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb0, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa2, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xa4, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0xc5, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xd8, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0xb1, 0x3f, 0x2f, 0x5c, 0x2a, - 0xb0, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xab, 0xbb, 0x3f, 0x3f, 0x3c, 0x3e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb7, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0x2b, 0x2b, 0x2b, 0x2b, - 0xac, 0xac, 0xac, 0xac, 0x4c, 0x4c, 0x4c, 0x4c, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54, - 0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0x7c, 0x7c, - 0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0xac, 0xac, 0xac, - 0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xaf, 0xaf, 0xaf, 0xaf, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa2, 0xa3, 0xac, 0xaf, 0x7c, 0xa5, 0x3f, 0x3f, - 0x7c, 0x3c, 0x5e, 0x3e, 0x76, 0x3f, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_28605 = -{ - { 28605, 1, 0x003f, 0x003f, "ISO 8859-15 Latin 9 (Euro)" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_28606.c b/reactos/tools/unicode/c_28606.c deleted file mode 100644 index d54a7ef44a7..00000000000 --- a/reactos/tools/unicode/c_28606.c +++ /dev/null @@ -1,717 +0,0 @@ -/* code page 28606 (ISO 8859-16 Latin 10 (Balkan)) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-16.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 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 const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 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, 0x21, 0x63, 0x4c, 0x3f, 0x59, 0x7c, 0xa7, - 0x22, 0xa9, 0x61, 0xab, 0x3f, 0xad, 0x72, 0x2d, - 0xb0, 0xb1, 0x32, 0x33, 0x27, 0x75, 0xb6, 0xb7, - 0x2c, 0x31, 0x6f, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc0, 0xc1, 0xc2, 0x41, 0xc4, 0x41, 0xc6, 0xc7, - 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, - 0xd0, 0x4e, 0xd2, 0xd3, 0xd4, 0x4f, 0xd6, 0x78, - 0x4f, 0xd9, 0xda, 0xdb, 0xdc, 0x59, 0x3f, 0xdf, - 0xe0, 0xe1, 0xe2, 0x61, 0xe4, 0x61, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0x64, 0x6e, 0xf2, 0xf3, 0xf4, 0x6f, 0xf6, 0x3f, - 0x6f, 0xf9, 0xfa, 0xfb, 0xfc, 0x79, 0x3f, 0xff, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0xc3, 0xe3, 0xa1, 0xa2, 0xc5, 0xe5, - 0x43, 0x63, 0x43, 0x63, 0xb2, 0xb9, 0x44, 0x64, - 0xd0, 0xf0, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0xdd, 0xfd, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0xa3, 0xb3, 0xd1, 0xf1, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0xd5, 0xf5, 0xbc, 0xbd, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0xd7, 0xf7, 0x53, 0x73, 0x53, 0x73, - 0xa6, 0xa8, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0xd8, 0xf8, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0xbe, 0xac, 0xae, 0xaf, 0xbf, 0xb4, 0xb8, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xd0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7c, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0xdc, 0xfc, 0xdc, - 0xfc, 0xdc, 0xfc, 0xdc, 0xfc, 0x3f, 0xc4, 0xe4, - 0x41, 0x61, 0xc6, 0xe6, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x41, 0x61, 0xc6, 0xe6, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0xaa, 0xba, 0xde, 0xfe, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0xd6, 0xf6, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0x2d, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xb0, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0x2d, 0x2d, 0x3f, 0x3f, - 0x22, 0x3f, 0xb0, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0x22, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x22, 0x41, 0xb7, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xdf, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x75, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xdf, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0xc6, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xdf, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xdf, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0xc7, 0xe7, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0xcf, 0xef, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0xd7, 0xf7, 0xa6, 0xa8, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0xc2, 0xe2, 0xc2, 0xe2, - 0xc2, 0xe2, 0xc2, 0xe2, 0x41, 0x61, 0xc3, 0xe3, - 0xc3, 0xe3, 0xc3, 0xe3, 0xc3, 0xe3, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0xca, 0xea, - 0xca, 0xea, 0xca, 0xea, 0xca, 0xea, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4, 0xd4, 0xf4, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0x22, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0x22, 0x22, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0xb5, 0xa5, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb0, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x63, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xa4, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0xb1, 0x3f, 0x2f, 0x5c, 0x2a, - 0xb0, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xab, 0xbb, 0x3f, 0x3f, 0x3c, 0x3e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb7, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x2d, 0x2d, 0x7c, 0x7c, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0x2b, 0x2b, 0x2b, 0x2b, - 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, 0x4c, 0x4c, 0x4c, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x54, - 0x54, 0x54, 0x54, 0x54, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2d, 0x2d, 0x7c, 0x7c, - 0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xab, 0xbb, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0xb5, 0xa5, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x2d, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x63, 0x4c, 0x3f, 0x2d, 0x7c, 0x59, 0x3f, 0x3f, - 0x7c, 0x3c, 0x5e, 0x3e, 0x76, 0x3f, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_28606 = -{ - { 28606, 1, 0x003f, 0x003f, "ISO 8859-16 Latin 10 (Balkan)" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_424.c b/reactos/tools/unicode/c_424.c deleted file mode 100644 index c3da0035c37..00000000000 --- a/reactos/tools/unicode/c_424.c +++ /dev/null @@ -1,750 +0,0 @@ -/* code page 424 (IBM EBCDIC Hebrew) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MISC/CP424.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x009c, 0x0009, 0x0086, 0x007f, - 0x0097, 0x008d, 0x008e, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x009d, 0x0085, 0x0008, 0x0087, - 0x0018, 0x0019, 0x0092, 0x008f, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x000a, 0x0017, 0x001b, - 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x0005, 0x0006, 0x0007, - 0x0090, 0x0091, 0x0016, 0x0093, 0x0094, 0x0095, 0x0096, 0x0004, - 0x0098, 0x0099, 0x009a, 0x009b, 0x0014, 0x0015, 0x009e, 0x001a, - 0x0020, 0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, - 0x05d7, 0x05d8, 0x00a2, 0x002e, 0x003c, 0x0028, 0x002b, 0x007c, - 0x0026, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, 0x05df, - 0x05e0, 0x05e1, 0x0021, 0x0024, 0x002a, 0x0029, 0x003b, 0x00ac, - 0x002d, 0x002f, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, 0x05e7, - 0x05e8, 0x05e9, 0x00a6, 0x002c, 0x0025, 0x005f, 0x003e, 0x003f, - 0x003f, 0x05ea, 0x003f, 0x003f, 0x00a0, 0x003f, 0x003f, 0x003f, - 0x2017, 0x0060, 0x003a, 0x0023, 0x0040, 0x0027, 0x003d, 0x0022, - 0x003f, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x00ab, 0x00bb, 0x003f, 0x003f, 0x003f, 0x00b1, - 0x00b0, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, 0x0070, - 0x0071, 0x0072, 0x003f, 0x003f, 0x003f, 0x00b8, 0x003f, 0x00a4, - 0x00b5, 0x007e, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, - 0x0079, 0x007a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x00ae, - 0x005e, 0x00a3, 0x00a5, 0x00b7, 0x00a9, 0x00a7, 0x00b6, 0x00bc, - 0x00bd, 0x00be, 0x005b, 0x005d, 0x00af, 0x00a8, 0x00b4, 0x00d7, - 0x007b, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x00ad, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x007d, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, 0x0050, - 0x0051, 0x0052, 0x00b9, 0x003f, 0x003f, 0x003f, 0x00de, 0x00df, - 0x005c, 0x00f7, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, - 0x0059, 0x005a, 0x00b2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x00b3, 0x003f, 0x003f, 0x003f, 0x00fe, 0x009f -}; - -static const unsigned char uni2cp_low[5120] = -{ - /* 0x0000 .. 0x00ff */ - 0x00, 0x01, 0x02, 0x03, 0x37, 0x2d, 0x2e, 0x2f, - 0x16, 0x05, 0x25, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13, 0x3c, 0x3d, 0x32, 0x26, - 0x18, 0x19, 0x3f, 0x27, 0x1c, 0x1d, 0x1e, 0x1f, - 0x40, 0x5a, 0x7f, 0x7b, 0x5b, 0x6c, 0x50, 0x7d, - 0x4d, 0x5d, 0x5c, 0x4e, 0x6b, 0x60, 0x4b, 0x61, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0x7a, 0x5e, 0x4c, 0x7e, 0x6e, 0x6f, - 0x7c, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, - 0xd7, 0xd8, 0xd9, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, - 0xe7, 0xe8, 0xe9, 0xba, 0xe0, 0xbb, 0xb0, 0x6d, - 0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, - 0x97, 0x98, 0x99, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, - 0xa7, 0xa8, 0xa9, 0xc0, 0x4f, 0xd0, 0xa1, 0x07, - 0x20, 0x21, 0x22, 0x23, 0x24, 0x15, 0x06, 0x17, - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x09, 0x0a, 0x1b, - 0x30, 0x31, 0x1a, 0x33, 0x34, 0x35, 0x36, 0x08, - 0x38, 0x39, 0x3a, 0x3b, 0x04, 0x14, 0x3e, 0xff, - 0x74, 0x5a, 0x4a, 0xb1, 0x9f, 0xb2, 0x6a, 0xb5, - 0xbd, 0xb4, 0x81, 0x8a, 0x5f, 0xca, 0xaf, 0xbc, - 0x90, 0x8f, 0xea, 0xfa, 0xbe, 0xa0, 0xb6, 0xb3, - 0x9d, 0xda, 0x96, 0x8b, 0xb7, 0xb8, 0xb9, 0x3f, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc3, - 0xc5, 0xc5, 0xc5, 0xc5, 0xc9, 0xc9, 0xc9, 0xc9, - 0xc4, 0xd5, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xbf, - 0xd6, 0xe4, 0xe4, 0xe4, 0xe4, 0xe8, 0xde, 0xdf, - 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x83, - 0x85, 0x85, 0x85, 0x85, 0x89, 0x89, 0x89, 0x89, - 0x84, 0x95, 0x96, 0x96, 0x96, 0x96, 0x96, 0xe1, - 0x96, 0xa4, 0xa4, 0xa4, 0xa4, 0xa8, 0xfe, 0xa8, - /* 0x0100 .. 0x01ff */ - 0xc1, 0x81, 0xc1, 0x81, 0xc1, 0x81, 0xc3, 0x83, - 0xc3, 0x83, 0xc3, 0x83, 0xc3, 0x83, 0xc4, 0x84, - 0xc4, 0x84, 0xc5, 0x85, 0xc5, 0x85, 0xc5, 0x85, - 0xc5, 0x85, 0xc5, 0x85, 0xc7, 0x87, 0xc7, 0x87, - 0xc7, 0x87, 0xc7, 0x87, 0xc8, 0x88, 0xc8, 0x88, - 0xc9, 0x89, 0xc9, 0x89, 0xc9, 0x89, 0xc9, 0x89, - 0xc9, 0x89, 0x3f, 0x3f, 0xd1, 0x91, 0xd2, 0x92, - 0x3f, 0xd3, 0x93, 0xd3, 0x93, 0xd3, 0x93, 0x3f, - 0x3f, 0xd3, 0x93, 0xd5, 0x95, 0xd5, 0x95, 0xd5, - 0x95, 0x3f, 0x3f, 0x3f, 0xd6, 0x96, 0xd6, 0x96, - 0xd6, 0x96, 0xd6, 0x96, 0xd9, 0x99, 0xd9, 0x99, - 0xd9, 0x99, 0xe2, 0xa2, 0xe2, 0xa2, 0xe2, 0xa2, - 0xe2, 0xa2, 0xe3, 0xa3, 0xe3, 0xa3, 0xe3, 0xa3, - 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, - 0xe4, 0xa4, 0xe4, 0xa4, 0xe6, 0xa6, 0xe8, 0xa8, - 0xe8, 0xe9, 0xa9, 0xe9, 0xa9, 0xe9, 0xa9, 0xa2, - 0x82, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xc4, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc5, 0xc6, 0x86, 0x3f, 0x3f, 0x3f, 0x3f, 0xc9, - 0x3f, 0x3f, 0x93, 0x3f, 0x3f, 0x3f, 0x3f, 0xd6, - 0xd6, 0x96, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0xe3, 0xe4, - 0xa4, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xa9, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xc1, 0x81, 0xc9, - 0x89, 0xd6, 0x96, 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, - 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, 0x3f, 0xc1, 0x81, - 0xc1, 0x81, 0xc1, 0x81, 0xc7, 0x87, 0xc7, 0x87, - 0xd2, 0x92, 0xd6, 0x96, 0xd6, 0x96, 0x3f, 0x3f, - 0x91, 0x3f, 0x3f, 0x3f, 0xc7, 0x87, 0x3f, 0x3f, - 0xd5, 0x95, 0xc1, 0x81, 0xc1, 0x81, 0xd6, 0x96, - /* 0x0200 .. 0x02ff */ - 0xc1, 0x81, 0xc1, 0x81, 0xc5, 0x85, 0xc5, 0x85, - 0xc9, 0x89, 0xc9, 0x89, 0xd6, 0x96, 0xd6, 0x96, - 0xd9, 0x99, 0xd9, 0x99, 0xe4, 0xa4, 0xe4, 0xa4, - 0xe2, 0xa2, 0xe3, 0xa3, 0x3f, 0x3f, 0xc8, 0x88, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xc1, 0x81, - 0xc5, 0x85, 0xd6, 0x96, 0xd6, 0x96, 0xd6, 0x96, - 0xd6, 0x96, 0xe8, 0xa8, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x87, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x88, 0x3f, 0x91, 0x99, 0x3f, 0x3f, 0x3f, 0xa6, - 0xa8, 0xbe, 0x7f, 0x79, 0x7d, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xb0, 0x3f, 0xb0, 0xa5, - 0x7d, 0xbc, 0xbe, 0x79, 0x3f, 0x6d, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x90, 0x3f, 0xa1, 0x7f, 0x3f, 0x3f, - 0x3f, 0x93, 0xa2, 0xa7, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x79, 0xbe, 0xb0, 0xa1, 0xbc, 0xbc, 0x3f, 0x3f, - 0xbd, 0x3f, 0x90, 0x7f, 0xa5, 0x3f, 0x7f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x9d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6d, 0x6d, 0x6d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x79, 0xbe, 0x3f, 0x3f, 0xbd, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xbe, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xbe, 0xbd, 0xc1, 0xb3, - 0xc5, 0xc8, 0xc9, 0x3f, 0xd6, 0x3f, 0xe8, 0x3f, - 0x3f, 0xc1, 0xc2, 0x3f, 0x3f, 0xc5, 0xe9, 0xc8, - 0x3f, 0xc9, 0xd2, 0x3f, 0xd4, 0xd5, 0x3f, 0xd6, - 0x3f, 0xd7, 0x3f, 0x3f, 0xe3, 0xe8, 0x3f, 0xe7, - 0x3f, 0x3f, 0xc9, 0xe8, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xa0, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xe8, 0xe8, 0xe8, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0500 .. 0x05ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, - 0x49, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, - 0x58, 0x59, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x71, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xc1, 0xc1, 0xc2, 0x3f, - 0xc4, 0xc5, 0x3f, 0xc7, 0xc8, 0xc9, 0xd1, 0xd2, - 0xd3, 0xd4, 0xd5, 0x3f, 0xd6, 0x3f, 0xd7, 0xd9, - 0xe3, 0xe4, 0xe6, 0x81, 0x3f, 0x3f, 0x3f, 0x82, - 0x84, 0x85, 0x3f, 0x3f, 0x3f, 0x87, 0x3f, 0x92, - 0x94, 0x3f, 0x96, 0x3f, 0x3f, 0x3f, 0x97, 0xa3, - 0xa4, 0x3f, 0x3f, 0xa5, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x89, 0x99, 0xa4, 0xa5, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x83, 0x3f, 0x84, 0x3f, - 0x86, 0x3f, 0x87, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xa9, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0xc1, 0x81, 0xc2, 0x82, 0xc2, 0x82, 0xc2, 0x82, - 0xc3, 0x83, 0xc4, 0x84, 0xc4, 0x84, 0xc4, 0x84, - 0xc4, 0x84, 0xc4, 0x84, 0xc5, 0x85, 0xc5, 0x85, - 0xc5, 0x85, 0xc5, 0x85, 0xc5, 0x85, 0xc6, 0x86, - 0xc7, 0x87, 0xc8, 0x88, 0xc8, 0x88, 0xc8, 0x88, - 0xc8, 0x88, 0xc8, 0x88, 0xc9, 0x89, 0xc9, 0x89, - 0xd2, 0x92, 0xd2, 0x92, 0xd2, 0x92, 0xd3, 0x93, - 0xd3, 0x93, 0xd3, 0x93, 0xd3, 0x93, 0xd4, 0x94, - 0xd4, 0x94, 0xd4, 0x94, 0xd5, 0x95, 0xd5, 0x95, - 0xd5, 0x95, 0xd5, 0x95, 0xd6, 0x96, 0xd6, 0x96, - 0xd6, 0x96, 0xd6, 0x96, 0xd7, 0x97, 0xd7, 0x97, - 0xd9, 0x99, 0xd9, 0x99, 0xd9, 0x99, 0xd9, 0x99, - 0xe2, 0xa2, 0xe2, 0xa2, 0xe2, 0xa2, 0xe2, 0xa2, - 0xe2, 0xa2, 0xe3, 0xa3, 0xe3, 0xa3, 0xe3, 0xa3, - 0xe3, 0xa3, 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, - 0xe4, 0xa4, 0xe4, 0xa4, 0xe5, 0xa5, 0xe5, 0xa5, - 0xe6, 0xa6, 0xe6, 0xa6, 0xe6, 0xa6, 0xe6, 0xa6, - 0xe6, 0xa6, 0xe7, 0xa7, 0xe7, 0xa7, 0xe8, 0xa8, - 0xe9, 0xa9, 0xe9, 0xa9, 0xe9, 0xa9, 0x88, 0xa3, - 0xa6, 0xa8, 0x3f, 0xa2, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc1, 0x81, 0xc1, 0x81, 0xc1, 0x81, 0xc1, 0x81, - 0xc1, 0x81, 0xc1, 0x81, 0xc1, 0x81, 0xc1, 0x81, - 0xc1, 0x81, 0xc1, 0x81, 0xc1, 0x81, 0xc1, 0x81, - 0xc5, 0x85, 0xc5, 0x85, 0xc5, 0x85, 0xc5, 0x85, - 0xc5, 0x85, 0xc5, 0x85, 0xc5, 0x85, 0xc5, 0x85, - 0xc9, 0x89, 0xc9, 0x89, 0xd6, 0x96, 0xd6, 0x96, - 0xd6, 0x96, 0xd6, 0x96, 0xd6, 0x96, 0xd6, 0x96, - 0xd6, 0x96, 0xd6, 0x96, 0xd6, 0x96, 0xd6, 0x96, - 0xd6, 0x96, 0xd6, 0x96, 0xe4, 0xa4, 0xe4, 0xa4, - 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, - 0xe4, 0xa4, 0xe8, 0xa8, 0xe8, 0xa8, 0xe8, 0xa8, - 0xe8, 0xa8, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc9, 0xc9, 0xc9, 0xc9, 0xc9, 0xc9, 0xc9, 0xc9, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xe8, 0x3f, 0xe8, 0x3f, 0xe8, 0x3f, 0xe8, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0x3f, 0x3f, 0x3f, - 0x3f, 0xbd, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc5, 0xc5, 0xc8, 0xc8, 0xc8, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc9, 0xc9, 0xc9, 0xc9, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe8, 0xe8, 0xe8, 0xe8, 0xd7, 0xbd, 0xbd, 0x79, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xd6, 0xd6, 0x3f, 0x3f, 0x3f, 0xbe, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, - 0x40, 0x40, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x60, 0x3f, 0x60, 0x60, 0x60, 0x3f, 0x78, - 0x79, 0x7d, 0x6b, 0x79, 0x7f, 0x7f, 0x6b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x4b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x40, - 0x3f, 0x3f, 0xbe, 0x7f, 0x3f, 0x79, 0x3f, 0x3f, - 0x3f, 0x4c, 0x6e, 0x3f, 0x5a, 0x3f, 0xbc, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x61, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x40, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x90, 0x89, 0x3f, 0x3f, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0x4e, 0x60, 0x7e, 0x4d, 0x5d, 0x95, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0x4e, 0x60, 0x7e, 0x4d, 0x5d, 0x3f, - 0x81, 0x85, 0x96, 0xa7, 0x3f, 0x88, 0x92, 0x93, - 0x94, 0x95, 0x97, 0xa2, 0xa3, 0x3f, 0x3f, 0x3f, - 0x3f, 0x4a, 0x3f, 0x3f, 0xb1, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0xc3, 0x3f, 0x3f, 0x3f, 0x3f, 0xc5, - 0x3f, 0x3f, 0x87, 0xc8, 0xc8, 0xc8, 0x88, 0x88, - 0xc9, 0xc9, 0xd3, 0x93, 0x3f, 0xd5, 0x3f, 0x3f, - 0xd7, 0xd7, 0xd8, 0xd9, 0xd9, 0xd9, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xe9, 0x3f, 0x3f, 0x3f, - 0xe9, 0x3f, 0xd2, 0xc1, 0xc2, 0xc3, 0x85, 0x85, - 0xc5, 0xc6, 0x3f, 0xd4, 0x96, 0x41, 0x42, 0x43, - 0x44, 0x89, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xc4, 0x84, 0x85, - 0x89, 0x91, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc9, 0x3f, 0x3f, 0x3f, 0xe5, 0x3f, 0x3f, 0x3f, - 0x3f, 0xe7, 0x3f, 0x3f, 0xd3, 0xc3, 0xc4, 0xd4, - 0x89, 0x3f, 0x3f, 0x3f, 0xa5, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa7, 0x3f, 0x3f, 0x93, 0x83, 0x84, 0x94, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4c, 0xb0, 0x6e, 0xa5, 0x60, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x4c, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x60, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xd6, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x60, 0x8f, 0x3f, 0x61, 0xe0, 0x5c, - 0x90, 0x3f, 0xe5, 0x3f, 0x3f, 0x3f, 0x3f, 0xd3, - 0x3f, 0x3f, 0x3f, 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x95, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xa1, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa1, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa1, 0xa1, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x8a, 0x8b, 0x3f, 0x3f, 0x4c, 0x6e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb3, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0xb0, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x4c, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, - 0xf9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xc1, 0xc2, - 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xd1, - 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, - 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, - 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, - 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, - 0x98, 0x99, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xf0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x60, 0x60, 0x4f, 0x4f, 0x60, 0x60, 0x6a, 0x6a, - 0x60, 0x60, 0x6a, 0x6a, 0x4e, 0x4e, 0x4e, 0x4e, - 0x5f, 0x5f, 0x5f, 0x5f, 0xd3, 0xd3, 0xd3, 0xd3, - 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0xe3, 0xe3, 0xe3, 0xe3, - 0xe3, 0xe3, 0xe3, 0xe3, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0x60, 0x60, 0x6a, 0x6a, - 0x7e, 0x4f, 0x4e, 0x4e, 0x4e, 0x5f, 0x5f, 0x5f, - 0xd3, 0xd3, 0xd3, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0xe3, 0xe3, 0xe3, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x61, 0xe0, 0xe7, 0x60, 0x4f, 0x60, 0x4f, - 0x60, 0x4f, 0x60, 0x4f, 0x60, 0x4f, 0x60, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xd6, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xd6, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x91, 0xe5, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x40, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4c, 0x6e, 0x8a, 0x8b, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xba, 0xbb, 0x3f, 0x7f, 0x7f, 0x6b, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x51, 0x3f, 0x3f, - 0x62, 0x41, 0x44, 0x45, 0x53, 0x54, 0x55, 0x68, - 0x71, 0x4e, 0x69, 0x69, 0x69, 0x69, 0x41, 0x41, - 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x3f, - 0x49, 0x51, 0x52, 0x53, 0x54, 0x3f, 0x56, 0x3f, - 0x58, 0x59, 0x3f, 0x63, 0x64, 0x3f, 0x66, 0x67, - 0x68, 0x69, 0x71, 0x46, 0x42, 0x53, 0x64, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xbc, 0xbc, 0xbc, 0xbc, 0x6d, 0x6d, 0x6d, - 0x6b, 0x3f, 0x4b, 0x3f, 0x5e, 0x7a, 0x6f, 0x5a, - 0x60, 0x4d, 0x5d, 0xc0, 0xd0, 0x3f, 0x3f, 0x7b, - 0x50, 0x5c, 0x4e, 0x60, 0x4c, 0x6e, 0x7e, 0x3f, - 0xe0, 0x5b, 0x6c, 0x7c, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 0x5a, 0x7f, 0x7b, 0x5b, 0x6c, 0x50, 0x7d, - 0x4d, 0x5d, 0x5c, 0x4e, 0x6b, 0x60, 0x4b, 0x61, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0x7a, 0x5e, 0x4c, 0x7e, 0x6e, 0x6f, - 0x7c, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, - 0xd7, 0xd8, 0xd9, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, - 0xe7, 0xe8, 0xe9, 0xba, 0xe0, 0xbb, 0xb0, 0x6d, - 0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, - 0x97, 0x98, 0x99, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, - 0xa7, 0xa8, 0xa9, 0xc0, 0x4f, 0xd0, 0xa1, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4a, 0xb1, 0x5f, 0xbc, 0x6a, 0xb2, 0x3f, 0x3f, - 0x4f, 0x4c, 0xb0, 0x6e, 0xa5, 0x3f, 0xd6, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1300, 0x0400, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0500, 0x0600, 0x0700, - 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x0e00, 0x1300, 0x1300, 0x1300, - 0x0f00, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1000, 0x1300, 0x1300, 0x1100, 0x1200 -}; - -const struct sbcs_table cptable_424 = -{ - { 424, 1, 0x003f, 0x003f, "IBM EBCDIC Hebrew" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_437.c b/reactos/tools/unicode/c_437.c deleted file mode 100644 index 0617800852d..00000000000 --- a/reactos/tools/unicode/c_437.c +++ /dev/null @@ -1,750 +0,0 @@ -/* code page 437 (OEM United States) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP437.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[512] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x00e0, 0x00e5, 0x00e7, - 0x00ea, 0x00eb, 0x00e8, 0x00ef, 0x00ee, 0x00ec, 0x00c4, 0x00c5, - 0x00c9, 0x00e6, 0x00c6, 0x00f4, 0x00f6, 0x00f2, 0x00fb, 0x00f9, - 0x00ff, 0x00d6, 0x00dc, 0x00a2, 0x00a3, 0x00a5, 0x20a7, 0x0192, - 0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x00f1, 0x00d1, 0x00aa, 0x00ba, - 0x00bf, 0x2310, 0x00ac, 0x00bd, 0x00bc, 0x00a1, 0x00ab, 0x00bb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, - 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, - 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, - 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0x03b1, 0x00df, 0x0393, 0x03c0, 0x03a3, 0x03c3, 0x00b5, 0x03c4, - 0x03a6, 0x0398, 0x03a9, 0x03b4, 0x221e, 0x03c6, 0x03b5, 0x2229, - 0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248, - 0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x25a0, 0x00a0, - /* glyphs */ - 0x0000, 0x263a, 0x263b, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, - 0x25d8, 0x25cb, 0x25d9, 0x2642, 0x2640, 0x266a, 0x266b, 0x263c, - 0x25ba, 0x25c4, 0x2195, 0x203c, 0x00b6, 0x00a7, 0x25ac, 0x21a8, - 0x2191, 0x2193, 0x2192, 0x2190, 0x221f, 0x2194, 0x25b2, 0x25bc, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x2302, - 0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x00e0, 0x00e5, 0x00e7, - 0x00ea, 0x00eb, 0x00e8, 0x00ef, 0x00ee, 0x00ec, 0x00c4, 0x00c5, - 0x00c9, 0x00e6, 0x00c6, 0x00f4, 0x00f6, 0x00f2, 0x00fb, 0x00f9, - 0x00ff, 0x00d6, 0x00dc, 0x00a2, 0x00a3, 0x00a5, 0x20a7, 0x0192, - 0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x00f1, 0x00d1, 0x00aa, 0x00ba, - 0x00bf, 0x2310, 0x00ac, 0x00bd, 0x00bc, 0x00a1, 0x00ab, 0x00bb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, - 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, - 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, - 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0x03b1, 0x00df, 0x0393, 0x03c0, 0x03a3, 0x03c3, 0x00b5, 0x03c4, - 0x03a6, 0x0398, 0x03a9, 0x03b4, 0x221e, 0x03c6, 0x03b5, 0x2229, - 0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248, - 0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x25a0, 0x00a0 -}; - -static const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xff, 0xad, 0x9b, 0x9c, 0x3f, 0x9d, 0x7c, 0x3f, - 0x22, 0x63, 0xa6, 0xae, 0xaa, 0x2d, 0x72, 0x2d, - 0xf8, 0xf1, 0xfd, 0x33, 0x27, 0xe6, 0x3f, 0xfa, - 0x2c, 0x31, 0xa7, 0xaf, 0xac, 0xab, 0x3f, 0xa8, - 0x41, 0x41, 0x41, 0x41, 0x8e, 0x8f, 0x92, 0x80, - 0x45, 0x90, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, - 0x44, 0xa5, 0x4f, 0x4f, 0x4f, 0x4f, 0x99, 0x78, - 0x4f, 0x55, 0x55, 0x55, 0x9a, 0x59, 0x3f, 0xe1, - 0x85, 0xa0, 0x83, 0x61, 0x84, 0x86, 0x91, 0x87, - 0x8a, 0x82, 0x88, 0x89, 0x8d, 0xa1, 0x8c, 0x8b, - 0x64, 0xa4, 0x95, 0xa2, 0x93, 0x6f, 0x94, 0xf6, - 0x6f, 0x97, 0xa3, 0x96, 0x81, 0x79, 0x3f, 0x98, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x9f, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb3, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x9a, 0x81, 0x9a, - 0x81, 0x9a, 0x81, 0x9a, 0x81, 0x3f, 0x8e, 0x84, - 0x41, 0x61, 0x92, 0x91, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x8f, 0x86, 0x92, 0x91, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x99, 0x94, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0x2d, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xf8, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0x2d, 0x2d, 0x3f, 0x3f, - 0x22, 0x3f, 0xf8, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0x22, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x22, 0x41, 0xfa, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0xea, - 0x3f, 0x41, 0x42, 0xe2, 0x3f, 0x45, 0x5a, 0x48, - 0xe9, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0xe4, 0x54, 0x59, 0xe8, 0x58, - 0x3f, 0xea, 0x49, 0x59, 0xe0, 0xee, 0x3f, 0x3f, - 0x3f, 0xe0, 0xe1, 0x3f, 0xeb, 0xee, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xe6, 0x3f, 0x3f, 0x3f, - 0xe3, 0x3f, 0x3f, 0xe5, 0xe7, 0x3f, 0xed, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe1, 0x3f, 0x59, 0x59, 0x59, 0xed, 0xe3, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xe9, 0xee, 0x3f, 0x3f, - 0x3f, 0xe4, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x92, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xe1, 0x3f, 0xeb, - 0xed, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xe1, 0x3f, - 0x3f, 0xed, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x80, 0x87, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x8b, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x83, 0x41, 0x83, - 0x41, 0x83, 0x41, 0x83, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x88, - 0x45, 0x88, 0x45, 0x88, 0x45, 0x88, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x93, 0x4f, 0x93, 0x4f, 0x93, 0x4f, 0x93, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, - 0xe0, 0xe0, 0xee, 0xee, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, - 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0x3f, 0xe0, 0xe0, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0x22, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0x22, 0x22, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0xea, 0xea, 0xea, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0xf9, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf8, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0xfc, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x9b, 0x3f, 0x3f, 0x9c, 0x3f, 0x3f, 0x9e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0xea, 0x3f, - 0x5a, 0x3f, 0x4b, 0x8f, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0xe3, 0x3f, 0xe2, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0xf1, 0x3f, 0x2f, 0x5c, 0x2a, - 0xf8, 0xf9, 0xfb, 0x3f, 0x3f, 0x3f, 0xec, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0xef, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf7, 0xf7, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0xf0, 0xf0, 0xf0, 0xf3, 0xf2, 0x3f, 0x3f, - 0x3f, 0x3f, 0xae, 0xaf, 0x3f, 0x3f, 0x3c, 0x3e, - 0xf3, 0xf2, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xfa, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf4, 0xf5, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0xc4, 0xc4, 0xb3, 0xb3, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0xda, 0xda, 0xda, 0xda, - 0xbf, 0xbf, 0xbf, 0xbf, 0xc0, 0xc0, 0xc0, 0xc0, - 0xd9, 0xd9, 0xd9, 0xd9, 0xc3, 0xc3, 0xc3, 0xc3, - 0xc3, 0xc3, 0xc3, 0xc3, 0xb4, 0xb4, 0xb4, 0xb4, - 0xb4, 0xb4, 0xb4, 0xb4, 0xc2, 0xc2, 0xc2, 0xc2, - 0xc2, 0xc2, 0xc2, 0xc2, 0xc1, 0xc1, 0xc1, 0xc1, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0x2d, 0x2d, 0x7c, 0x7c, - 0xcd, 0xba, 0xd5, 0xd6, 0xc9, 0xb8, 0xb7, 0xbb, - 0xd4, 0xd3, 0xc8, 0xbe, 0xbd, 0xbc, 0xc6, 0xc7, - 0xcc, 0xb5, 0xb6, 0xb9, 0xd1, 0xd2, 0xcb, 0xcf, - 0xd0, 0xca, 0xd8, 0xd7, 0xce, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0xdf, 0x3f, 0x3f, 0x3f, 0xdc, 0x3f, 0x3f, 0x3f, - 0xdb, 0x3f, 0x3f, 0x3f, 0xdd, 0x3f, 0x3f, 0x3f, - 0xde, 0xb0, 0xb1, 0xb2, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xfe, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xae, 0xaf, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x2d, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x9b, 0x9c, 0xaa, 0x2d, 0x7c, 0x9d, 0x3f, 0x3f, - 0xb3, 0x3c, 0x5e, 0x3e, 0x76, 0xfe, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_437 = -{ - { 437, 1, 0x003f, 0x003f, "OEM United States" }, - cp2uni, - cp2uni + 256, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_500.c b/reactos/tools/unicode/c_500.c deleted file mode 100644 index 64a13ab6aa1..00000000000 --- a/reactos/tools/unicode/c_500.c +++ /dev/null @@ -1,717 +0,0 @@ -/* code page 500 (IBM EBCDIC International) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/EBCDIC/CP500.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x009c, 0x0009, 0x0086, 0x007f, - 0x0097, 0x008d, 0x008e, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x009d, 0x0085, 0x0008, 0x0087, - 0x0018, 0x0019, 0x0092, 0x008f, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x000a, 0x0017, 0x001b, - 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x0005, 0x0006, 0x0007, - 0x0090, 0x0091, 0x0016, 0x0093, 0x0094, 0x0095, 0x0096, 0x0004, - 0x0098, 0x0099, 0x009a, 0x009b, 0x0014, 0x0015, 0x009e, 0x001a, - 0x0020, 0x00a0, 0x00e2, 0x00e4, 0x00e0, 0x00e1, 0x00e3, 0x00e5, - 0x00e7, 0x00f1, 0x005b, 0x002e, 0x003c, 0x0028, 0x002b, 0x0021, - 0x0026, 0x00e9, 0x00ea, 0x00eb, 0x00e8, 0x00ed, 0x00ee, 0x00ef, - 0x00ec, 0x00df, 0x005d, 0x0024, 0x002a, 0x0029, 0x003b, 0x005e, - 0x002d, 0x002f, 0x00c2, 0x00c4, 0x00c0, 0x00c1, 0x00c3, 0x00c5, - 0x00c7, 0x00d1, 0x00a6, 0x002c, 0x0025, 0x005f, 0x003e, 0x003f, - 0x00f8, 0x00c9, 0x00ca, 0x00cb, 0x00c8, 0x00cd, 0x00ce, 0x00cf, - 0x00cc, 0x0060, 0x003a, 0x0023, 0x0040, 0x0027, 0x003d, 0x0022, - 0x00d8, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x00ab, 0x00bb, 0x00f0, 0x00fd, 0x00fe, 0x00b1, - 0x00b0, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, 0x0070, - 0x0071, 0x0072, 0x00aa, 0x00ba, 0x00e6, 0x00b8, 0x00c6, 0x00a4, - 0x00b5, 0x007e, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, - 0x0079, 0x007a, 0x00a1, 0x00bf, 0x00d0, 0x00dd, 0x00de, 0x00ae, - 0x00a2, 0x00a3, 0x00a5, 0x00b7, 0x00a9, 0x00a7, 0x00b6, 0x00bc, - 0x00bd, 0x00be, 0x00ac, 0x007c, 0x00af, 0x00a8, 0x00b4, 0x00d7, - 0x007b, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x00ad, 0x00f4, 0x00f6, 0x00f2, 0x00f3, 0x00f5, - 0x007d, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, 0x0050, - 0x0051, 0x0052, 0x00b9, 0x00fb, 0x00fc, 0x00f9, 0x00fa, 0x00ff, - 0x005c, 0x00f7, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, - 0x0059, 0x005a, 0x00b2, 0x00d4, 0x00d6, 0x00d2, 0x00d3, 0x00d5, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x00b3, 0x00db, 0x00dc, 0x00d9, 0x00da, 0x009f -}; - -static const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 0x00, 0x01, 0x02, 0x03, 0x37, 0x2d, 0x2e, 0x2f, - 0x16, 0x05, 0x25, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13, 0x3c, 0x3d, 0x32, 0x26, - 0x18, 0x19, 0x3f, 0x27, 0x1c, 0x1d, 0x1e, 0x1f, - 0x40, 0x4f, 0x7f, 0x7b, 0x5b, 0x6c, 0x50, 0x7d, - 0x4d, 0x5d, 0x5c, 0x4e, 0x6b, 0x60, 0x4b, 0x61, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0x7a, 0x5e, 0x4c, 0x7e, 0x6e, 0x6f, - 0x7c, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, - 0xd7, 0xd8, 0xd9, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, - 0xe7, 0xe8, 0xe9, 0x4a, 0xe0, 0x5a, 0x5f, 0x6d, - 0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, - 0x97, 0x98, 0x99, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, - 0xa7, 0xa8, 0xa9, 0xc0, 0xbb, 0xd0, 0xa1, 0x07, - 0x20, 0x21, 0x22, 0x23, 0x24, 0x15, 0x06, 0x17, - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x09, 0x0a, 0x1b, - 0x30, 0x31, 0x1a, 0x33, 0x34, 0x35, 0x36, 0x08, - 0x38, 0x39, 0x3a, 0x3b, 0x04, 0x14, 0x3e, 0xff, - 0x41, 0xaa, 0xb0, 0xb1, 0x9f, 0xb2, 0x6a, 0xb5, - 0xbd, 0xb4, 0x9a, 0x8a, 0xba, 0xca, 0xaf, 0xbc, - 0x90, 0x8f, 0xea, 0xfa, 0xbe, 0xa0, 0xb6, 0xb3, - 0x9d, 0xda, 0x9b, 0x8b, 0xb7, 0xb8, 0xb9, 0xab, - 0x64, 0x65, 0x62, 0x66, 0x63, 0x67, 0x9e, 0x68, - 0x74, 0x71, 0x72, 0x73, 0x78, 0x75, 0x76, 0x77, - 0xac, 0x69, 0xed, 0xee, 0xeb, 0xef, 0xec, 0xbf, - 0x80, 0xfd, 0xfe, 0xfb, 0xfc, 0xad, 0xae, 0x59, - 0x44, 0x45, 0x42, 0x46, 0x43, 0x47, 0x9c, 0x48, - 0x54, 0x51, 0x52, 0x53, 0x58, 0x55, 0x56, 0x57, - 0x8c, 0x49, 0xcd, 0xce, 0xcb, 0xcf, 0xcc, 0xe1, - 0x70, 0xdd, 0xde, 0xdb, 0xdc, 0x8d, 0x8e, 0xdf, - /* 0x0100 .. 0x01ff */ - 0xc1, 0x81, 0xc1, 0x81, 0xc1, 0x81, 0xc3, 0x83, - 0xc3, 0x83, 0xc3, 0x83, 0xc3, 0x83, 0xc4, 0x84, - 0xac, 0x84, 0xc5, 0x85, 0xc5, 0x85, 0xc5, 0x85, - 0xc5, 0x85, 0xc5, 0x85, 0xc7, 0x87, 0xc7, 0x87, - 0xc7, 0x87, 0xc7, 0x87, 0xc8, 0x88, 0xc8, 0x88, - 0xc9, 0x89, 0xc9, 0x89, 0xc9, 0x89, 0xc9, 0x89, - 0xc9, 0x89, 0x3f, 0x3f, 0xd1, 0x91, 0xd2, 0x92, - 0x3f, 0xd3, 0x93, 0xd3, 0x93, 0xd3, 0x93, 0x3f, - 0x3f, 0xd3, 0x93, 0xd5, 0x95, 0xd5, 0x95, 0xd5, - 0x95, 0x3f, 0x3f, 0x3f, 0xd6, 0x96, 0xd6, 0x96, - 0xd6, 0x96, 0xd6, 0x96, 0xd9, 0x99, 0xd9, 0x99, - 0xd9, 0x99, 0xe2, 0xa2, 0xe2, 0xa2, 0xe2, 0xa2, - 0xe2, 0xa2, 0xe3, 0xa3, 0xe3, 0xa3, 0xe3, 0xa3, - 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, - 0xe4, 0xa4, 0xe4, 0xa4, 0xe6, 0xa6, 0xe8, 0xa8, - 0xe8, 0xe9, 0xa9, 0xe9, 0xa9, 0xe9, 0xa9, 0xa2, - 0x82, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xac, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc5, 0xc6, 0x86, 0x3f, 0x3f, 0x3f, 0x3f, 0xc9, - 0x3f, 0x3f, 0x93, 0x3f, 0x3f, 0x3f, 0x3f, 0xd6, - 0xd6, 0x96, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0xe3, 0xe4, - 0xa4, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xa9, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xbb, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xc1, 0x81, 0xc9, - 0x89, 0xd6, 0x96, 0xe4, 0xa4, 0xfc, 0xdc, 0xfc, - 0xdc, 0xfc, 0xdc, 0xfc, 0xdc, 0x3f, 0x63, 0x43, - 0xc1, 0x81, 0x9e, 0x9c, 0xc7, 0x87, 0xc7, 0x87, - 0xd2, 0x92, 0xd6, 0x96, 0xd6, 0x96, 0x3f, 0x3f, - 0x91, 0x3f, 0x3f, 0x3f, 0xc7, 0x87, 0x3f, 0x3f, - 0xd5, 0x95, 0x67, 0x47, 0x9e, 0x9c, 0x80, 0x70, - /* 0x0200 .. 0x02ff */ - 0xc1, 0x81, 0xc1, 0x81, 0xc5, 0x85, 0xc5, 0x85, - 0xc9, 0x89, 0xc9, 0x89, 0xd6, 0x96, 0xd6, 0x96, - 0xd9, 0x99, 0xd9, 0x99, 0xe4, 0xa4, 0xe4, 0xa4, - 0xe2, 0xa2, 0xe3, 0xa3, 0x3f, 0x3f, 0xc8, 0x88, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xc1, 0x81, - 0xc5, 0x85, 0xec, 0xcc, 0xef, 0xcf, 0xd6, 0x96, - 0xd6, 0x96, 0xe8, 0xa8, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x87, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x88, 0x3f, 0x91, 0x99, 0x3f, 0x3f, 0x3f, 0xa6, - 0xa8, 0xbe, 0x7f, 0x79, 0x7d, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5f, 0x3f, 0x5f, 0xa5, - 0x7d, 0xbc, 0xbe, 0x79, 0x3f, 0x6d, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x90, 0x3f, 0xa1, 0x7f, 0x3f, 0x3f, - 0x3f, 0x93, 0xa2, 0xa7, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x79, 0xbe, 0x5f, 0xa1, 0xbc, 0xbc, 0x3f, 0x3f, - 0xbd, 0x3f, 0x90, 0x7f, 0xa5, 0x3f, 0x7f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x9d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6d, 0x6d, 0x6d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x79, 0xbe, 0x3f, 0x3f, 0xbd, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xbe, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xbe, 0xbd, 0xc1, 0xb3, - 0xc5, 0xc8, 0xc9, 0x3f, 0xd6, 0x3f, 0xe8, 0x3f, - 0x3f, 0xc1, 0xc2, 0x3f, 0x3f, 0xc5, 0xe9, 0xc8, - 0x3f, 0xc9, 0xd2, 0x3f, 0xd4, 0xd5, 0x3f, 0xd6, - 0x3f, 0xd7, 0x3f, 0x3f, 0xe3, 0xe8, 0x3f, 0xe7, - 0x3f, 0x3f, 0xc9, 0xe8, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xa0, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x3f, 0xe8, 0xe8, 0xe8, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xc1, 0x9e, 0xc2, 0x3f, - 0xc4, 0xc5, 0x3f, 0xc7, 0xc8, 0xc9, 0xd1, 0xd2, - 0xd3, 0xd4, 0xd5, 0x3f, 0xd6, 0x3f, 0xd7, 0xd9, - 0xe3, 0xe4, 0xe6, 0x81, 0x3f, 0x3f, 0x3f, 0x82, - 0x84, 0x85, 0x3f, 0x3f, 0x3f, 0x87, 0x3f, 0x92, - 0x94, 0x3f, 0x96, 0x3f, 0x3f, 0x3f, 0x97, 0xa3, - 0xa4, 0x3f, 0x3f, 0xa5, 0x3f, 0x59, 0x3f, 0x3f, - 0x3f, 0x3f, 0x89, 0x99, 0xa4, 0xa5, 0x59, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x83, 0x3f, 0x8c, 0x3f, - 0x86, 0x3f, 0x87, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xa9, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0xc1, 0x81, 0xc2, 0x82, 0xc2, 0x82, 0xc2, 0x82, - 0x68, 0x48, 0xc4, 0x84, 0xc4, 0x84, 0xc4, 0x84, - 0xc4, 0x84, 0xc4, 0x84, 0xc5, 0x85, 0xc5, 0x85, - 0xc5, 0x85, 0xc5, 0x85, 0xc5, 0x85, 0xc6, 0x86, - 0xc7, 0x87, 0xc8, 0x88, 0xc8, 0x88, 0xc8, 0x88, - 0xc8, 0x88, 0xc8, 0x88, 0xc9, 0x89, 0x77, 0x57, - 0xd2, 0x92, 0xd2, 0x92, 0xd2, 0x92, 0xd3, 0x93, - 0xd3, 0x93, 0xd3, 0x93, 0xd3, 0x93, 0xd4, 0x94, - 0xd4, 0x94, 0xd4, 0x94, 0xd5, 0x95, 0xd5, 0x95, - 0xd5, 0x95, 0xd5, 0x95, 0xef, 0xcf, 0xef, 0xcf, - 0xd6, 0x96, 0xd6, 0x96, 0xd7, 0x97, 0xd7, 0x97, - 0xd9, 0x99, 0xd9, 0x99, 0xd9, 0x99, 0xd9, 0x99, - 0xe2, 0xa2, 0xe2, 0xa2, 0xe2, 0xa2, 0xe2, 0xa2, - 0xe2, 0xa2, 0xe3, 0xa3, 0xe3, 0xa3, 0xe3, 0xa3, - 0xe3, 0xa3, 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, - 0xe4, 0xa4, 0xe4, 0xa4, 0xe5, 0xa5, 0xe5, 0xa5, - 0xe6, 0xa6, 0xe6, 0xa6, 0xe6, 0xa6, 0xe6, 0xa6, - 0xe6, 0xa6, 0xe7, 0xa7, 0xe7, 0xa7, 0xe8, 0xa8, - 0xe9, 0xa9, 0xe9, 0xa9, 0xe9, 0xa9, 0x88, 0xa3, - 0xa6, 0xa8, 0x3f, 0xa2, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc1, 0x81, 0xc1, 0x81, 0x62, 0x42, 0x62, 0x42, - 0x62, 0x42, 0x62, 0x42, 0xc1, 0x81, 0xc1, 0x81, - 0xc1, 0x81, 0xc1, 0x81, 0xc1, 0x81, 0xc1, 0x81, - 0xc5, 0x85, 0xc5, 0x85, 0xc5, 0x85, 0x72, 0x52, - 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0xc5, 0x85, - 0xc9, 0x89, 0xc9, 0x89, 0xd6, 0x96, 0xd6, 0x96, - 0xeb, 0xcb, 0xeb, 0xcb, 0xeb, 0xcb, 0xeb, 0xcb, - 0xd6, 0x96, 0xd6, 0x96, 0xd6, 0x96, 0xd6, 0x96, - 0xd6, 0x96, 0xd6, 0x96, 0xe4, 0xa4, 0xe4, 0xa4, - 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, - 0xe4, 0xa4, 0xe8, 0xa8, 0xe8, 0xa8, 0xe8, 0xa8, - 0xe8, 0xa8, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc9, 0xc9, 0xc9, 0xc9, 0xc9, 0xc9, 0xc9, 0xc9, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xe8, 0x3f, 0xe8, 0x3f, 0xe8, 0x3f, 0xe8, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0x3f, 0x3f, 0x3f, - 0x3f, 0xbd, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc5, 0xc5, 0xc8, 0xc8, 0xc8, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc9, 0xc9, 0xc9, 0xc9, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe8, 0xe8, 0xe8, 0xe8, 0xd7, 0xbd, 0xbd, 0x79, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xd6, 0xd6, 0x3f, 0x3f, 0x3f, 0xbe, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, - 0x40, 0x40, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x60, 0x3f, 0x60, 0x60, 0x60, 0x3f, 0x6d, - 0x79, 0x7d, 0x6b, 0x79, 0x7f, 0x7f, 0x6b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x4b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x40, - 0x3f, 0x3f, 0xbe, 0x7f, 0x3f, 0x79, 0x3f, 0x3f, - 0x3f, 0x4c, 0x6e, 0x3f, 0x4f, 0x3f, 0xbc, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x61, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x40, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x90, 0x89, 0x3f, 0x3f, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0x4e, 0x60, 0x7e, 0x4d, 0x5d, 0x95, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0x4e, 0x60, 0x7e, 0x4d, 0x5d, 0x3f, - 0x81, 0x85, 0x96, 0xa7, 0x3f, 0x88, 0x92, 0x93, - 0x94, 0x95, 0x97, 0xa2, 0xa3, 0x3f, 0x3f, 0x3f, - 0x3f, 0xb0, 0x3f, 0x3f, 0xb1, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0xc3, 0x3f, 0x3f, 0x3f, 0x3f, 0xc5, - 0x3f, 0x3f, 0x87, 0xc8, 0xc8, 0xc8, 0x88, 0x88, - 0xc9, 0xc9, 0xd3, 0x93, 0x3f, 0xd5, 0x3f, 0x3f, - 0xd7, 0xd7, 0xd8, 0xd9, 0xd9, 0xd9, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xe9, 0x3f, 0x3f, 0x3f, - 0xe9, 0x3f, 0xd2, 0x67, 0xc2, 0xc3, 0x85, 0x85, - 0xc5, 0xc6, 0x3f, 0xd4, 0x96, 0x3f, 0x3f, 0x3f, - 0x3f, 0x89, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xc4, 0x84, 0x85, - 0x89, 0x91, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc9, 0x3f, 0x3f, 0x3f, 0xe5, 0x3f, 0x3f, 0x3f, - 0x3f, 0xe7, 0x3f, 0x3f, 0xd3, 0xc3, 0xc4, 0xd4, - 0x89, 0x3f, 0x3f, 0x3f, 0xa5, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa7, 0x3f, 0x3f, 0x93, 0x83, 0x84, 0x94, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4c, 0x5f, 0x6e, 0xa5, 0x60, 0xbb, 0x3f, 0x3f, - 0x3f, 0x3f, 0x4c, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x60, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x80, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x60, 0x8f, 0x3f, 0x61, 0xe0, 0x5c, - 0x90, 0x3f, 0xe5, 0x3f, 0x3f, 0x3f, 0x3f, 0xd3, - 0x3f, 0x3f, 0x3f, 0xbb, 0xbb, 0x3f, 0x3f, 0x3f, - 0x3f, 0x95, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xa1, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa1, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa1, 0xa1, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x8a, 0x8b, 0x3f, 0x3f, 0x4c, 0x6e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xb3, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x4c, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, - 0xf9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xc1, 0xc2, - 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xd1, - 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, - 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, - 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, - 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, - 0x98, 0x99, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xf0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x60, 0x60, 0xbb, 0xbb, 0x60, 0x60, 0x6a, 0x6a, - 0x60, 0x60, 0x6a, 0x6a, 0x4e, 0x4e, 0x4e, 0x4e, - 0xba, 0xba, 0xba, 0xba, 0xd3, 0xd3, 0xd3, 0xd3, - 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0xe3, 0xe3, 0xe3, 0xe3, - 0xe3, 0xe3, 0xe3, 0xe3, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0x60, 0x60, 0x6a, 0x6a, - 0x7e, 0xbb, 0x4e, 0x4e, 0x4e, 0xba, 0xba, 0xba, - 0xd3, 0xd3, 0xd3, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0xe3, 0xe3, 0xe3, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x61, 0xe0, 0xe7, 0x60, 0xbb, 0x60, 0xbb, - 0x60, 0xbb, 0x60, 0xbb, 0x60, 0xbb, 0x60, 0xbb, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xd6, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xd6, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x91, 0xe5, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x40, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4c, 0x6e, 0x8a, 0x8b, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x4a, 0x5a, 0x3f, 0x7f, 0x7f, 0x6b, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x4e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xbc, 0xbc, 0xbc, 0xbc, 0x6d, 0x6d, 0x6d, - 0x6b, 0x3f, 0x4b, 0x3f, 0x5e, 0x7a, 0x6f, 0x4f, - 0x60, 0x4d, 0x5d, 0xc0, 0xd0, 0x3f, 0x3f, 0x7b, - 0x50, 0x5c, 0x4e, 0x60, 0x4c, 0x6e, 0x7e, 0x3f, - 0xe0, 0x5b, 0x6c, 0x7c, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 0x4f, 0x7f, 0x7b, 0x5b, 0x6c, 0x50, 0x7d, - 0x4d, 0x5d, 0x5c, 0x4e, 0x6b, 0x60, 0x4b, 0x61, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0x7a, 0x5e, 0x4c, 0x7e, 0x6e, 0x6f, - 0x7c, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, - 0xd7, 0xd8, 0xd9, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, - 0xe7, 0xe8, 0xe9, 0x4a, 0xe0, 0x5a, 0x5f, 0x6d, - 0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, - 0x97, 0x98, 0x99, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, - 0xa7, 0xa8, 0xa9, 0xc0, 0xbb, 0xd0, 0xa1, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb0, 0xb1, 0xba, 0xbc, 0x6a, 0xb2, 0x3f, 0x3f, - 0xbb, 0x4c, 0x5f, 0x6e, 0xa5, 0x3f, 0xd6, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_500 = -{ - { 500, 1, 0x003f, 0x003f, "IBM EBCDIC International" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_737.c b/reactos/tools/unicode/c_737.c deleted file mode 100644 index 8bb5a842c7e..00000000000 --- a/reactos/tools/unicode/c_737.c +++ /dev/null @@ -1,750 +0,0 @@ -/* code page 737 (OEM Greek 437G) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP737.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[512] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, - 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, 0x03a0, - 0x03a1, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9, - 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8, - 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0, - 0x03c1, 0x03c3, 0x03c2, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, - 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, - 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, - 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0x03c9, 0x03ac, 0x03ad, 0x03ae, 0x03ca, 0x03af, 0x03cc, 0x03cd, - 0x03cb, 0x03ce, 0x0386, 0x0388, 0x0389, 0x038a, 0x038c, 0x038e, - 0x038f, 0x00b1, 0x2265, 0x2264, 0x03aa, 0x03ab, 0x00f7, 0x2248, - 0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x25a0, 0x00a0, - /* glyphs */ - 0x0000, 0x263a, 0x263b, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, - 0x25d8, 0x25cb, 0x25d9, 0x2642, 0x2640, 0x266a, 0x266b, 0x263c, - 0x25ba, 0x25c4, 0x2195, 0x203c, 0x00b6, 0x00a7, 0x25ac, 0x21a8, - 0x2191, 0x2193, 0x2192, 0x2190, 0x221f, 0x2194, 0x25b2, 0x25bc, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x2302, - 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, - 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, 0x03a0, - 0x03a1, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9, - 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8, - 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0, - 0x03c1, 0x03c3, 0x03c2, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, - 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, - 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, - 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0x03c9, 0x03ac, 0x03ad, 0x03ae, 0x03ca, 0x03af, 0x03cc, 0x03cd, - 0x03cb, 0x03ce, 0x0386, 0x0388, 0x0389, 0x038a, 0x038c, 0x038e, - 0x038f, 0x00b1, 0x2265, 0x2264, 0x03aa, 0x03ab, 0x00f7, 0x2248, - 0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x25a0, 0x00a0 -}; - -static const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xff, 0x21, 0x63, 0x4c, 0x3f, 0x59, 0x7c, 0x3f, - 0x22, 0x63, 0x61, 0x3c, 0x3f, 0x2d, 0x72, 0x2d, - 0xf8, 0xf1, 0xfd, 0x33, 0x27, 0xa3, 0x3f, 0xfa, - 0x2c, 0x31, 0x6f, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, - 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, - 0x44, 0x4e, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x78, - 0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0x3f, 0x99, - 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x63, - 0x65, 0x65, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69, - 0x64, 0x6e, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0xf6, - 0x6f, 0x75, 0x75, 0x75, 0x75, 0x79, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb3, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55, - 0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0x2d, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xf8, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0x2d, 0x2d, 0x3f, 0x3f, - 0x22, 0x3f, 0xf8, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0x22, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x22, 0xea, 0xfa, - 0xeb, 0xec, 0xed, 0x3f, 0xee, 0x3f, 0xef, 0xf0, - 0xe4, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, - 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, - 0x8f, 0x90, 0x3f, 0x91, 0x92, 0x93, 0x94, 0x95, - 0x96, 0x97, 0xf4, 0xf5, 0xe1, 0xe2, 0xe3, 0xe5, - 0xe8, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, - 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, - 0xa7, 0xa8, 0xaa, 0xa9, 0xab, 0xac, 0xad, 0xae, - 0xaf, 0xe0, 0xe4, 0xe8, 0xe6, 0xe7, 0xe9, 0x3f, - 0x99, 0x9f, 0x93, 0x93, 0x93, 0xad, 0xa7, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa1, 0xa8, 0xaa, 0x3f, 0x87, 0x9c, 0x3f, 0x3f, - 0x3f, 0x91, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0x99, 0x9a, 0x9b, - 0xad, 0xae, 0x69, 0x72, 0x75, 0x76, 0x99, 0x9a, - 0xa8, 0xad, 0xae, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x9f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x9c, 0x9c, 0x9c, 0x9c, 0x9c, 0x9c, 0x3f, 0x3f, - 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x3f, 0x3f, - 0x9e, 0x9e, 0x9e, 0x9e, 0x9e, 0x9e, 0x9e, 0x9e, - 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, - 0xa0, 0xa0, 0xa0, 0xa0, 0xa0, 0xa0, 0xa0, 0xa0, - 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, - 0xa6, 0xa6, 0xa6, 0xa6, 0xa6, 0xa6, 0x3f, 0x3f, - 0x8e, 0x8e, 0x8e, 0x8e, 0x8e, 0x8e, 0x3f, 0x3f, - 0xac, 0xac, 0xac, 0xac, 0xac, 0xac, 0xac, 0xac, - 0x3f, 0x93, 0x3f, 0x93, 0x3f, 0x93, 0x3f, 0x93, - 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, - 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, - 0x98, 0xe1, 0x9c, 0xe2, 0x9e, 0xe3, 0xa0, 0xe5, - 0xa6, 0xe6, 0xac, 0xe7, 0xe0, 0xe9, 0x3f, 0x3f, - 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x9e, 0x9e, 0x9e, 0x9e, 0x9e, 0x9e, 0x9e, 0x9e, - 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, - 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, - 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, - 0x98, 0x98, 0x98, 0x98, 0xe1, 0x3f, 0x98, 0x98, - 0x80, 0x80, 0x80, 0xea, 0x80, 0x3f, 0xa0, 0x3f, - 0x3f, 0x22, 0x9e, 0x9e, 0xe3, 0x3f, 0x9e, 0x9e, - 0x84, 0xeb, 0x86, 0xec, 0x86, 0x3f, 0x3f, 0x3f, - 0xa0, 0xa0, 0xe4, 0xe4, 0x3f, 0x3f, 0xa0, 0xe4, - 0x88, 0x88, 0x88, 0xed, 0x3f, 0x3f, 0x3f, 0x3f, - 0xac, 0xac, 0xe8, 0xe8, 0xa8, 0xa8, 0xac, 0xe8, - 0x93, 0x93, 0x93, 0xef, 0x90, 0x22, 0x22, 0x60, - 0x3f, 0x3f, 0xe0, 0xe0, 0xe9, 0x3f, 0xe0, 0xe0, - 0x8e, 0xee, 0x97, 0xf0, 0x97, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0xf9, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf8, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0xfc, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x63, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x97, 0x3f, - 0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0xa7, 0x9a, 0x82, 0x8f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0xf1, 0x3f, 0x2f, 0x5c, 0x2a, - 0xf8, 0xf9, 0xfb, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf7, 0xf7, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0xf3, 0xf2, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3c, 0x3e, - 0xf3, 0xf2, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xfa, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0xc4, 0xc4, 0xb3, 0xb3, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0xda, 0xda, 0xda, 0xda, - 0xbf, 0xbf, 0xbf, 0xbf, 0xc0, 0xc0, 0xc0, 0xc0, - 0xd9, 0xd9, 0xd9, 0xd9, 0xc3, 0xc3, 0xc3, 0xc3, - 0xc3, 0xc3, 0xc3, 0xc3, 0xb4, 0xb4, 0xb4, 0xb4, - 0xb4, 0xb4, 0xb4, 0xb4, 0xc2, 0xc2, 0xc2, 0xc2, - 0xc2, 0xc2, 0xc2, 0xc2, 0xc1, 0xc1, 0xc1, 0xc1, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0x2d, 0x2d, 0x7c, 0x7c, - 0xcd, 0xba, 0xd5, 0xd6, 0xc9, 0xb8, 0xb7, 0xbb, - 0xd4, 0xd3, 0xc8, 0xbe, 0xbd, 0xbc, 0xc6, 0xc7, - 0xcc, 0xb5, 0xb6, 0xb9, 0xd1, 0xd2, 0xcb, 0xcf, - 0xd0, 0xca, 0xd8, 0xd7, 0xce, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0xdf, 0x3f, 0x3f, 0x3f, 0xdc, 0x3f, 0x3f, 0x3f, - 0xdb, 0x3f, 0x3f, 0x3f, 0xdd, 0x3f, 0x3f, 0x3f, - 0xde, 0xb0, 0xb1, 0xb2, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xfe, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x2d, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x63, 0x4c, 0x3f, 0x2d, 0x7c, 0x59, 0x3f, 0x3f, - 0xb3, 0x3c, 0x5e, 0x3e, 0x76, 0xfe, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_737 = -{ - { 737, 1, 0x003f, 0x003f, "OEM Greek 437G" }, - cp2uni, - cp2uni + 256, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_775.c b/reactos/tools/unicode/c_775.c deleted file mode 100644 index 518d6e9366e..00000000000 --- a/reactos/tools/unicode/c_775.c +++ /dev/null @@ -1,750 +0,0 @@ -/* code page 775 (OEM Baltic) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP775.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[512] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x0106, 0x00fc, 0x00e9, 0x0101, 0x00e4, 0x0123, 0x00e5, 0x0107, - 0x0142, 0x0113, 0x0156, 0x0157, 0x012b, 0x0179, 0x00c4, 0x00c5, - 0x00c9, 0x00e6, 0x00c6, 0x014d, 0x00f6, 0x0122, 0x00a2, 0x015a, - 0x015b, 0x00d6, 0x00dc, 0x00f8, 0x00a3, 0x00d8, 0x00d7, 0x00a4, - 0x0100, 0x012a, 0x00f3, 0x017b, 0x017c, 0x017a, 0x201d, 0x00a6, - 0x00a9, 0x00ae, 0x00ac, 0x00bd, 0x00bc, 0x0141, 0x00ab, 0x00bb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x0104, 0x010c, 0x0118, - 0x0116, 0x2563, 0x2551, 0x2557, 0x255d, 0x012e, 0x0160, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x0172, 0x016a, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x017d, - 0x0105, 0x010d, 0x0119, 0x0117, 0x012f, 0x0161, 0x0173, 0x016b, - 0x017e, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0x00d3, 0x00df, 0x014c, 0x0143, 0x00f5, 0x00d5, 0x00b5, 0x0144, - 0x0136, 0x0137, 0x013b, 0x013c, 0x0146, 0x0112, 0x0145, 0x2019, - 0x00ad, 0x00b1, 0x201c, 0x00be, 0x00b6, 0x00a7, 0x00f7, 0x201e, - 0x00b0, 0x2219, 0x00b7, 0x00b9, 0x00b3, 0x00b2, 0x25a0, 0x00a0, - /* glyphs */ - 0x0000, 0x263a, 0x263b, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, - 0x25d8, 0x25cb, 0x25d9, 0x2642, 0x2640, 0x266a, 0x266b, 0x263c, - 0x25ba, 0x25c4, 0x2195, 0x203c, 0x00b6, 0x00a7, 0x25ac, 0x21a8, - 0x2191, 0x2193, 0x2192, 0x2190, 0x221f, 0x2194, 0x25b2, 0x25bc, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x2302, - 0x0106, 0x00fc, 0x00e9, 0x0101, 0x00e4, 0x0123, 0x00e5, 0x0107, - 0x0142, 0x0113, 0x0156, 0x0157, 0x012b, 0x0179, 0x00c4, 0x00c5, - 0x00c9, 0x00e6, 0x00c6, 0x014d, 0x00f6, 0x0122, 0x00a2, 0x015a, - 0x015b, 0x00d6, 0x00dc, 0x00f8, 0x00a3, 0x00d8, 0x00d7, 0x00a4, - 0x0100, 0x012a, 0x00f3, 0x017b, 0x017c, 0x017a, 0x201d, 0x00a6, - 0x00a9, 0x00ae, 0x00ac, 0x00bd, 0x00bc, 0x0141, 0x00ab, 0x00bb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x0104, 0x010c, 0x0118, - 0x0116, 0x2563, 0x2551, 0x2557, 0x255d, 0x012e, 0x0160, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x0172, 0x016a, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x017d, - 0x0105, 0x010d, 0x0119, 0x0117, 0x012f, 0x0161, 0x0173, 0x016b, - 0x017e, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0x00d3, 0x00df, 0x014c, 0x0143, 0x00f5, 0x00d5, 0x00b5, 0x0144, - 0x0136, 0x0137, 0x013b, 0x013c, 0x0146, 0x0112, 0x0145, 0x2019, - 0x00ad, 0x00b1, 0x201c, 0x00be, 0x00b6, 0x00a7, 0x00f7, 0x201e, - 0x00b0, 0x2219, 0x00b7, 0x00b9, 0x00b3, 0x00b2, 0x25a0, 0x00a0 -}; - -static const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xff, 0x21, 0x96, 0x9c, 0x9f, 0x59, 0xa7, 0xf5, - 0x22, 0xa8, 0x61, 0xae, 0xaa, 0xf0, 0xa9, 0x2d, - 0xf8, 0xf1, 0xfd, 0xfc, 0x27, 0xe6, 0xf4, 0xfa, - 0x2c, 0xfb, 0x6f, 0xaf, 0xac, 0xab, 0xf3, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x8e, 0x8f, 0x92, 0x43, - 0x45, 0x90, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, - 0x44, 0x4e, 0x4f, 0xe0, 0x4f, 0xe5, 0x99, 0x9e, - 0x9d, 0x55, 0x55, 0x55, 0x9a, 0x59, 0x3f, 0xe1, - 0x61, 0x61, 0x61, 0x61, 0x84, 0x86, 0x91, 0x63, - 0x65, 0x82, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69, - 0x64, 0x6e, 0x6f, 0xa2, 0x6f, 0xe4, 0x94, 0xf6, - 0x9b, 0x75, 0x75, 0x75, 0x81, 0x79, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0xa0, 0x83, 0x41, 0x61, 0xb5, 0xd0, 0x80, 0x87, - 0x43, 0x63, 0x43, 0x63, 0xb6, 0xd1, 0x44, 0x64, - 0x44, 0x64, 0xed, 0x89, 0x45, 0x65, 0xb8, 0xd3, - 0xb7, 0xd2, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x95, 0x85, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0xa1, 0x8c, 0x49, 0x69, 0xbd, 0xd4, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0xe8, 0xe9, - 0x3f, 0x4c, 0x6c, 0xea, 0xeb, 0x4c, 0x6c, 0x3f, - 0x3f, 0xad, 0x88, 0xe3, 0xe7, 0xee, 0xec, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0xe2, 0x93, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x8a, 0x8b, - 0x52, 0x72, 0x97, 0x98, 0x53, 0x73, 0x53, 0x73, - 0xbe, 0xd5, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0xc7, 0xd7, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0xc6, 0xd6, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x8d, 0xa5, 0xa3, 0xa4, 0xcf, 0xd8, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb3, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x9a, 0x81, 0x9a, - 0x81, 0x9a, 0x81, 0x9a, 0x81, 0x3f, 0x8e, 0x84, - 0x41, 0x61, 0x92, 0x91, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x8f, 0x86, 0x92, 0x91, 0x9d, 0x9b, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x99, 0x94, 0xe5, 0xe4, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0x60, 0xef, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0x2d, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xf8, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0x2d, 0x2d, 0x3f, 0x3f, - 0x22, 0x3f, 0xf8, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0x22, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x22, 0x41, 0xfa, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xe1, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xe6, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe1, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x92, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xe1, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xe1, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0xed, 0x89, 0xed, 0x89, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0xe5, 0xe4, 0xe5, 0xe4, - 0xe2, 0x93, 0xe2, 0x93, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x97, 0x98, 0xbe, 0xd5, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0xc7, 0xd7, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0x22, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0x22, 0x22, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0xef, 0x2c, 0x60, 0xf2, 0xa6, 0xf7, 0x3f, - 0x3f, 0x3f, 0xf9, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf8, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x96, 0x3f, 0x3f, 0x9c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0x8f, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x9d, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0xf1, 0x3f, 0x2f, 0x5c, 0x2a, - 0xf8, 0xf9, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xae, 0xaf, 0x3f, 0x3f, 0x3c, 0x3e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xfa, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0xc4, 0xc4, 0xb3, 0xb3, 0x2d, 0x2d, 0xa7, 0xa7, - 0x2d, 0x2d, 0xa7, 0xa7, 0xda, 0xda, 0xda, 0xda, - 0xbf, 0xbf, 0xbf, 0xbf, 0xc0, 0xc0, 0xc0, 0xc0, - 0xd9, 0xd9, 0xd9, 0xd9, 0xc3, 0xc3, 0xc3, 0xc3, - 0xc3, 0xc3, 0xc3, 0xc3, 0xb4, 0xb4, 0xb4, 0xb4, - 0xb4, 0xb4, 0xb4, 0xb4, 0xc2, 0xc2, 0xc2, 0xc2, - 0xc2, 0xc2, 0xc2, 0xc2, 0xc1, 0xc1, 0xc1, 0xc1, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0x2d, 0x2d, 0xa7, 0xa7, - 0xcd, 0xba, 0xc9, 0xc9, 0xc9, 0xbb, 0xbb, 0xbb, - 0xc8, 0xc8, 0xc8, 0xbc, 0xbc, 0xbc, 0xcc, 0xcc, - 0xcc, 0xb9, 0xb9, 0xb9, 0xcb, 0xcb, 0xcb, 0xca, - 0xca, 0xca, 0xce, 0xce, 0xce, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0xdf, 0x3f, 0x3f, 0x3f, 0xdc, 0x3f, 0x3f, 0x3f, - 0xdb, 0x3f, 0x3f, 0x3f, 0xdd, 0x3f, 0x3f, 0x3f, - 0xde, 0xb0, 0xb1, 0xb2, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xfe, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xae, 0xaf, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0xf2, 0xa6, 0xf7, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x2d, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x96, 0x9c, 0xaa, 0x2d, 0xa7, 0x59, 0x3f, 0x3f, - 0xb3, 0x3c, 0x5e, 0x3e, 0x76, 0xfe, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_775 = -{ - { 775, 1, 0x003f, 0x003f, "OEM Baltic" }, - cp2uni, - cp2uni + 256, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_850.c b/reactos/tools/unicode/c_850.c deleted file mode 100644 index 0953e83eb73..00000000000 --- a/reactos/tools/unicode/c_850.c +++ /dev/null @@ -1,750 +0,0 @@ -/* code page 850 (OEM Multilingual Latin 1) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP850.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[512] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x00e0, 0x00e5, 0x00e7, - 0x00ea, 0x00eb, 0x00e8, 0x00ef, 0x00ee, 0x00ec, 0x00c4, 0x00c5, - 0x00c9, 0x00e6, 0x00c6, 0x00f4, 0x00f6, 0x00f2, 0x00fb, 0x00f9, - 0x00ff, 0x00d6, 0x00dc, 0x00f8, 0x00a3, 0x00d8, 0x00d7, 0x0192, - 0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x00f1, 0x00d1, 0x00aa, 0x00ba, - 0x00bf, 0x00ae, 0x00ac, 0x00bd, 0x00bc, 0x00a1, 0x00ab, 0x00bb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00c1, 0x00c2, 0x00c0, - 0x00a9, 0x2563, 0x2551, 0x2557, 0x255d, 0x00a2, 0x00a5, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x00e3, 0x00c3, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x00a4, - 0x00f0, 0x00d0, 0x00ca, 0x00cb, 0x00c8, 0x0131, 0x00cd, 0x00ce, - 0x00cf, 0x2518, 0x250c, 0x2588, 0x2584, 0x00a6, 0x00cc, 0x2580, - 0x00d3, 0x00df, 0x00d4, 0x00d2, 0x00f5, 0x00d5, 0x00b5, 0x00fe, - 0x00de, 0x00da, 0x00db, 0x00d9, 0x00fd, 0x00dd, 0x00af, 0x00b4, - 0x00ad, 0x00b1, 0x2017, 0x00be, 0x00b6, 0x00a7, 0x00f7, 0x00b8, - 0x00b0, 0x00a8, 0x00b7, 0x00b9, 0x00b3, 0x00b2, 0x25a0, 0x00a0, - /* glyphs */ - 0x0000, 0x263a, 0x263b, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, - 0x25d8, 0x25cb, 0x25d9, 0x2642, 0x2640, 0x266a, 0x266b, 0x263c, - 0x25ba, 0x25c4, 0x2195, 0x203c, 0x00b6, 0x00a7, 0x25ac, 0x21a8, - 0x2191, 0x2193, 0x2192, 0x2190, 0x221f, 0x2194, 0x25b2, 0x25bc, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x2302, - 0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x00e0, 0x00e5, 0x00e7, - 0x00ea, 0x00eb, 0x00e8, 0x00ef, 0x00ee, 0x00ec, 0x00c4, 0x00c5, - 0x00c9, 0x00e6, 0x00c6, 0x00f4, 0x00f6, 0x00f2, 0x00fb, 0x00f9, - 0x00ff, 0x00d6, 0x00dc, 0x00f8, 0x00a3, 0x00d8, 0x00d7, 0x0192, - 0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x00f1, 0x00d1, 0x00aa, 0x00ba, - 0x00bf, 0x00ae, 0x00ac, 0x00bd, 0x00bc, 0x00a1, 0x00ab, 0x00bb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00c1, 0x00c2, 0x00c0, - 0x00a9, 0x2563, 0x2551, 0x2557, 0x255d, 0x00a2, 0x00a5, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x00e3, 0x00c3, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x00a4, - 0x00f0, 0x00d0, 0x00ca, 0x00cb, 0x00c8, 0x0131, 0x00cd, 0x00ce, - 0x00cf, 0x2518, 0x250c, 0x2588, 0x2584, 0x00a6, 0x00cc, 0x2580, - 0x00d3, 0x00df, 0x00d4, 0x00d2, 0x00f5, 0x00d5, 0x00b5, 0x00fe, - 0x00de, 0x00da, 0x00db, 0x00d9, 0x00fd, 0x00dd, 0x00af, 0x00b4, - 0x00ad, 0x00b1, 0x2017, 0x00be, 0x00b6, 0x00a7, 0x00f7, 0x00b8, - 0x00b0, 0x00a8, 0x00b7, 0x00b9, 0x00b3, 0x00b2, 0x25a0, 0x00a0 -}; - -static const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xff, 0xad, 0xbd, 0x9c, 0xcf, 0xbe, 0xdd, 0xf5, - 0xf9, 0xb8, 0xa6, 0xae, 0xaa, 0xf0, 0xa9, 0xee, - 0xf8, 0xf1, 0xfd, 0xfc, 0xef, 0xe6, 0xf4, 0xfa, - 0xf7, 0xfb, 0xa7, 0xaf, 0xac, 0xab, 0xf3, 0xa8, - 0xb7, 0xb5, 0xb6, 0xc7, 0x8e, 0x8f, 0x92, 0x80, - 0xd4, 0x90, 0xd2, 0xd3, 0xde, 0xd6, 0xd7, 0xd8, - 0xd1, 0xa5, 0xe3, 0xe0, 0xe2, 0xe5, 0x99, 0x9e, - 0x9d, 0xeb, 0xe9, 0xea, 0x9a, 0xed, 0xe8, 0xe1, - 0x85, 0xa0, 0x83, 0xc6, 0x84, 0x86, 0x91, 0x87, - 0x8a, 0x82, 0x88, 0x89, 0x8d, 0xa1, 0x8c, 0x8b, - 0xd0, 0xa4, 0x95, 0xa2, 0x93, 0xe4, 0x94, 0xf6, - 0x9b, 0x97, 0xa3, 0x96, 0x81, 0xec, 0xe7, 0x98, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0xd1, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0xd5, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xd1, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x9f, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb3, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x9a, 0x81, 0x9a, - 0x81, 0x9a, 0x81, 0x9a, 0x81, 0x3f, 0x8e, 0x84, - 0x41, 0x61, 0x92, 0x91, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x8f, 0x86, 0x92, 0x91, 0x9d, 0x9b, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x99, 0x94, 0xe5, 0xe4, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0xef, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0xee, 0xef, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xf8, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0xef, 0x5e, 0x7e, 0xee, 0xee, 0x3f, 0x3f, - 0xf9, 0x3f, 0xf8, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xf7, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0xef, 0x3f, 0x3f, 0xf9, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xef, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xef, 0xf9, 0x41, 0xfa, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xe1, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xe6, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe1, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x92, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xe1, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xe1, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0xd0, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x80, 0x87, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0xd8, 0x8b, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0xe5, 0xe4, 0xe5, 0xe4, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0xb6, 0x83, 0xb6, 0x83, - 0xb6, 0x83, 0xb6, 0x83, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0xd2, 0x88, - 0xd2, 0x88, 0xd2, 0x88, 0xd2, 0x88, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0xe2, 0x93, 0xe2, 0x93, 0xe2, 0x93, 0xe2, 0x93, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0xf9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0xf9, 0xf9, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0xef, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0xf2, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0xef, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0xee, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf8, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0xbd, 0x3f, 0x3f, 0x9c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0x8f, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x9d, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0xf1, 0x3f, 0x2f, 0x5c, 0x2a, - 0xf8, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xae, 0xaf, 0x3f, 0x3f, 0x3c, 0x3e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xfa, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0xc4, 0xc4, 0xb3, 0xb3, 0x2d, 0x2d, 0xdd, 0xdd, - 0x2d, 0x2d, 0xdd, 0xdd, 0xda, 0xda, 0xda, 0xda, - 0xbf, 0xbf, 0xbf, 0xbf, 0xc0, 0xc0, 0xc0, 0xc0, - 0xd9, 0xd9, 0xd9, 0xd9, 0xc3, 0xc3, 0xc3, 0xc3, - 0xc3, 0xc3, 0xc3, 0xc3, 0xb4, 0xb4, 0xb4, 0xb4, - 0xb4, 0xb4, 0xb4, 0xb4, 0xc2, 0xc2, 0xc2, 0xc2, - 0xc2, 0xc2, 0xc2, 0xc2, 0xc1, 0xc1, 0xc1, 0xc1, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0x2d, 0x2d, 0xdd, 0xdd, - 0xcd, 0xba, 0xc9, 0xc9, 0xc9, 0xbb, 0xbb, 0xbb, - 0xc8, 0xc8, 0xc8, 0xbc, 0xbc, 0xbc, 0xcc, 0xcc, - 0xcc, 0xb9, 0xb9, 0xb9, 0xcb, 0xcb, 0xcb, 0xca, - 0xca, 0xca, 0xce, 0xce, 0xce, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0xdf, 0x3f, 0x3f, 0x3f, 0xdc, 0x3f, 0x3f, 0x3f, - 0xdb, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xb0, 0xb1, 0xb2, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xfe, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xae, 0xaf, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xee, 0xee, 0xee, 0xee, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xbd, 0x9c, 0xaa, 0xee, 0xdd, 0xbe, 0x3f, 0x3f, - 0xb3, 0x3c, 0x5e, 0x3e, 0x76, 0xfe, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_850 = -{ - { 850, 1, 0x003f, 0x003f, "OEM Multilingual Latin 1" }, - cp2uni, - cp2uni + 256, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_852.c b/reactos/tools/unicode/c_852.c deleted file mode 100644 index d89f7b4622f..00000000000 --- a/reactos/tools/unicode/c_852.c +++ /dev/null @@ -1,750 +0,0 @@ -/* code page 852 (OEM Slovak Latin 2) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP852.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[512] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x016f, 0x0107, 0x00e7, - 0x0142, 0x00eb, 0x0150, 0x0151, 0x00ee, 0x0179, 0x00c4, 0x0106, - 0x00c9, 0x0139, 0x013a, 0x00f4, 0x00f6, 0x013d, 0x013e, 0x015a, - 0x015b, 0x00d6, 0x00dc, 0x0164, 0x0165, 0x0141, 0x00d7, 0x010d, - 0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x0104, 0x0105, 0x017d, 0x017e, - 0x0118, 0x0119, 0x00ac, 0x017a, 0x010c, 0x015f, 0x00ab, 0x00bb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00c1, 0x00c2, 0x011a, - 0x015e, 0x2563, 0x2551, 0x2557, 0x255d, 0x017b, 0x017c, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x0102, 0x0103, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x00a4, - 0x0111, 0x0110, 0x010e, 0x00cb, 0x010f, 0x0147, 0x00cd, 0x00ce, - 0x011b, 0x2518, 0x250c, 0x2588, 0x2584, 0x0162, 0x016e, 0x2580, - 0x00d3, 0x00df, 0x00d4, 0x0143, 0x0144, 0x0148, 0x0160, 0x0161, - 0x0154, 0x00da, 0x0155, 0x0170, 0x00fd, 0x00dd, 0x0163, 0x00b4, - 0x00ad, 0x02dd, 0x02db, 0x02c7, 0x02d8, 0x00a7, 0x00f7, 0x00b8, - 0x00b0, 0x00a8, 0x02d9, 0x0171, 0x0158, 0x0159, 0x25a0, 0x00a0, - /* glyphs */ - 0x0000, 0x263a, 0x263b, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, - 0x25d8, 0x25cb, 0x25d9, 0x2642, 0x2640, 0x266a, 0x266b, 0x263c, - 0x25ba, 0x25c4, 0x2195, 0x203c, 0x00b6, 0x00a7, 0x25ac, 0x21a8, - 0x2191, 0x2193, 0x2192, 0x2190, 0x221f, 0x2194, 0x25b2, 0x25bc, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x2302, - 0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x016f, 0x0107, 0x00e7, - 0x0142, 0x00eb, 0x0150, 0x0151, 0x00ee, 0x0179, 0x00c4, 0x0106, - 0x00c9, 0x0139, 0x013a, 0x00f4, 0x00f6, 0x013d, 0x013e, 0x015a, - 0x015b, 0x00d6, 0x00dc, 0x0164, 0x0165, 0x0141, 0x00d7, 0x010d, - 0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x0104, 0x0105, 0x017d, 0x017e, - 0x0118, 0x0119, 0x00ac, 0x017a, 0x010c, 0x015f, 0x00ab, 0x00bb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00c1, 0x00c2, 0x011a, - 0x015e, 0x2563, 0x2551, 0x2557, 0x255d, 0x017b, 0x017c, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x0102, 0x0103, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x00a4, - 0x0111, 0x0110, 0x010e, 0x00cb, 0x010f, 0x0147, 0x00cd, 0x00ce, - 0x011b, 0x2518, 0x250c, 0x2588, 0x2584, 0x0162, 0x016e, 0x2580, - 0x00d3, 0x00df, 0x00d4, 0x0143, 0x0144, 0x0148, 0x0160, 0x0161, - 0x0154, 0x00da, 0x0155, 0x0170, 0x00fd, 0x00dd, 0x0163, 0x00b4, - 0x00ad, 0x02dd, 0x02db, 0x02c7, 0x02d8, 0x00a7, 0x00f7, 0x00b8, - 0x00b0, 0x00a8, 0x02d9, 0x0171, 0x0158, 0x0159, 0x25a0, 0x00a0 -}; - -static const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xff, 0x21, 0x63, 0x4c, 0xcf, 0x59, 0x7c, 0xf5, - 0xf9, 0x63, 0x61, 0xae, 0xaa, 0xf0, 0x72, 0x2d, - 0xf8, 0x3f, 0x32, 0x33, 0xef, 0x75, 0x3f, 0x3f, - 0xf7, 0x31, 0x6f, 0xaf, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0xb5, 0xb6, 0x41, 0x8e, 0x41, 0x41, 0x80, - 0x45, 0x90, 0x45, 0xd3, 0x49, 0xd6, 0xd7, 0x49, - 0xd1, 0x4e, 0x4f, 0xe0, 0xe2, 0x4f, 0x99, 0x9e, - 0x4f, 0x55, 0xe9, 0x55, 0x9a, 0xed, 0x3f, 0xe1, - 0x61, 0xa0, 0x83, 0x61, 0x84, 0x61, 0x61, 0x87, - 0x65, 0x82, 0x65, 0x89, 0x69, 0xa1, 0x8c, 0x69, - 0x64, 0x6e, 0x6f, 0xa2, 0x93, 0x6f, 0x94, 0xf6, - 0x6f, 0x75, 0xa3, 0x75, 0x81, 0xec, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0xc6, 0xc7, 0xa4, 0xa5, 0x8f, 0x86, - 0x43, 0x63, 0x43, 0x63, 0xac, 0x9f, 0xd2, 0xd4, - 0xd1, 0xd0, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0xa8, 0xa9, 0xb7, 0xd8, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x91, 0x92, 0x4c, 0x6c, 0x95, 0x96, 0x3f, - 0x3f, 0x9d, 0x88, 0xe3, 0xe4, 0x4e, 0x6e, 0xd5, - 0xe5, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x8a, 0x8b, 0x4f, 0x6f, 0xe8, 0xea, 0x52, 0x72, - 0xfc, 0xfd, 0x97, 0x98, 0x53, 0x73, 0xb8, 0xad, - 0xe6, 0xe7, 0xdd, 0xee, 0x9b, 0x9c, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0xde, 0x85, - 0xeb, 0xfb, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x8d, 0xab, 0xbd, 0xbe, 0xa6, 0xa7, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xd1, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb3, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x9a, 0x81, 0x9a, - 0x81, 0x9a, 0x81, 0x9a, 0x81, 0x3f, 0x8e, 0x84, - 0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x99, 0x94, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0xef, 0xf1, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0xf3, - 0x27, 0x2d, 0xef, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf4, 0xfa, 0xf8, 0xf2, 0x7e, 0xf1, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0xef, 0x5e, 0x7e, 0x2d, 0x2d, 0xf4, 0xfa, - 0xf9, 0x3f, 0xf8, 0xf1, 0xf3, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xf7, - 0xf2, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0xef, 0x3f, 0x3f, 0xf9, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xef, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xef, 0xf9, 0x41, 0x3f, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xe1, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x75, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe1, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xe1, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xe1, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x80, 0x87, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x97, 0x98, 0xe6, 0xe7, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0xb6, 0x83, 0xb6, 0x83, - 0xb6, 0x83, 0xb6, 0x83, 0x41, 0x61, 0xc6, 0xc7, - 0xc6, 0xc7, 0xc6, 0xc7, 0xc6, 0xc7, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0xe2, 0x93, 0xe2, 0x93, 0xe2, 0x93, 0xe2, 0x93, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0xf9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0xf9, 0xf9, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0xef, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0xef, 0xf1, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf8, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x63, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0xf3, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x2f, 0x5c, 0x2a, - 0xf8, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xae, 0xaf, 0x3f, 0x3f, 0x3c, 0x3e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0xc4, 0xc4, 0xb3, 0xb3, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0xda, 0xda, 0xda, 0xda, - 0xbf, 0xbf, 0xbf, 0xbf, 0xc0, 0xc0, 0xc0, 0xc0, - 0xd9, 0xd9, 0xd9, 0xd9, 0xc3, 0xc3, 0xc3, 0xc3, - 0xc3, 0xc3, 0xc3, 0xc3, 0xb4, 0xb4, 0xb4, 0xb4, - 0xb4, 0xb4, 0xb4, 0xb4, 0xc2, 0xc2, 0xc2, 0xc2, - 0xc2, 0xc2, 0xc2, 0xc2, 0xc1, 0xc1, 0xc1, 0xc1, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0x2d, 0x2d, 0x7c, 0x7c, - 0xcd, 0xba, 0xc9, 0xc9, 0xc9, 0xbb, 0xbb, 0xbb, - 0xc8, 0xc8, 0xc8, 0xbc, 0xbc, 0xbc, 0xcc, 0xcc, - 0xcc, 0xb9, 0xb9, 0xb9, 0xcb, 0xcb, 0xcb, 0xca, - 0xca, 0xca, 0xce, 0xce, 0xce, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0xdf, 0x3f, 0x3f, 0x3f, 0xdc, 0x3f, 0x3f, 0x3f, - 0xdb, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xb0, 0xb1, 0xb2, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xfe, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xae, 0xaf, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x2d, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x63, 0x4c, 0xaa, 0x2d, 0x7c, 0x59, 0x3f, 0x3f, - 0xb3, 0x3c, 0x5e, 0x3e, 0xf3, 0xfe, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_852 = -{ - { 852, 1, 0x003f, 0x003f, "OEM Slovak Latin 2" }, - cp2uni, - cp2uni + 256, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_855.c b/reactos/tools/unicode/c_855.c deleted file mode 100644 index c98e49a8b22..00000000000 --- a/reactos/tools/unicode/c_855.c +++ /dev/null @@ -1,783 +0,0 @@ -/* code page 855 (OEM Cyrillic) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP855.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[512] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x0452, 0x0402, 0x0453, 0x0403, 0x0451, 0x0401, 0x0454, 0x0404, - 0x0455, 0x0405, 0x0456, 0x0406, 0x0457, 0x0407, 0x0458, 0x0408, - 0x0459, 0x0409, 0x045a, 0x040a, 0x045b, 0x040b, 0x045c, 0x040c, - 0x045e, 0x040e, 0x045f, 0x040f, 0x044e, 0x042e, 0x044a, 0x042a, - 0x0430, 0x0410, 0x0431, 0x0411, 0x0446, 0x0426, 0x0434, 0x0414, - 0x0435, 0x0415, 0x0444, 0x0424, 0x0433, 0x0413, 0x00ab, 0x00bb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x0445, 0x0425, 0x0438, - 0x0418, 0x2563, 0x2551, 0x2557, 0x255d, 0x0439, 0x0419, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x043a, 0x041a, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x00a4, - 0x043b, 0x041b, 0x043c, 0x041c, 0x043d, 0x041d, 0x043e, 0x041e, - 0x043f, 0x2518, 0x250c, 0x2588, 0x2584, 0x041f, 0x044f, 0x2580, - 0x042f, 0x0440, 0x0420, 0x0441, 0x0421, 0x0442, 0x0422, 0x0443, - 0x0423, 0x0436, 0x0416, 0x0432, 0x0412, 0x044c, 0x042c, 0x2116, - 0x00ad, 0x044b, 0x042b, 0x0437, 0x0417, 0x0448, 0x0428, 0x044d, - 0x042d, 0x0449, 0x0429, 0x0447, 0x0427, 0x00a7, 0x25a0, 0x00a0, - /* glyphs */ - 0x0000, 0x263a, 0x263b, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, - 0x25d8, 0x25cb, 0x25d9, 0x2642, 0x2640, 0x266a, 0x266b, 0x263c, - 0x25ba, 0x25c4, 0x2195, 0x203c, 0x00b6, 0x00a7, 0x25ac, 0x21a8, - 0x2191, 0x2193, 0x2192, 0x2190, 0x221f, 0x2194, 0x25b2, 0x25bc, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x2302, - 0x0452, 0x0402, 0x0453, 0x0403, 0x0451, 0x0401, 0x0454, 0x0404, - 0x0455, 0x0405, 0x0456, 0x0406, 0x0457, 0x0407, 0x0458, 0x0408, - 0x0459, 0x0409, 0x045a, 0x040a, 0x045b, 0x040b, 0x045c, 0x040c, - 0x045e, 0x040e, 0x045f, 0x040f, 0x044e, 0x042e, 0x044a, 0x042a, - 0x0430, 0x0410, 0x0431, 0x0411, 0x0446, 0x0426, 0x0434, 0x0414, - 0x0435, 0x0415, 0x0444, 0x0424, 0x0433, 0x0413, 0x00ab, 0x00bb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x0445, 0x0425, 0x0438, - 0x0418, 0x2563, 0x2551, 0x2557, 0x255d, 0x0439, 0x0419, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x043a, 0x041a, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x00a4, - 0x043b, 0x041b, 0x043c, 0x041c, 0x043d, 0x041d, 0x043e, 0x041e, - 0x043f, 0x2518, 0x250c, 0x2588, 0x2584, 0x041f, 0x044f, 0x2580, - 0x042f, 0x0440, 0x0420, 0x0441, 0x0421, 0x0442, 0x0422, 0x0443, - 0x0423, 0x0436, 0x0416, 0x0432, 0x0412, 0x044c, 0x042c, 0x2116, - 0x00ad, 0x044b, 0x042b, 0x0437, 0x0417, 0x0448, 0x0428, 0x044d, - 0x042d, 0x0449, 0x0429, 0x0447, 0x0427, 0x00a7, 0x25a0, 0x00a0 -}; - -static const unsigned char uni2cp_low[5120] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xff, 0x21, 0x63, 0x4c, 0xcf, 0x59, 0x7c, 0xfd, - 0x22, 0x63, 0x61, 0xae, 0x3f, 0xf0, 0x72, 0x2d, - 0x3f, 0x3f, 0x32, 0x33, 0x27, 0x75, 0x3f, 0x3f, - 0x2c, 0x31, 0x6f, 0xaf, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, - 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, - 0x44, 0x4e, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x78, - 0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0x3f, 0x3f, - 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x63, - 0x65, 0x65, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69, - 0x64, 0x6e, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x3f, - 0x6f, 0x75, 0x75, 0x75, 0x75, 0x79, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb3, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55, - 0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0x2d, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0x2d, 0x2d, 0x3f, 0x3f, - 0x22, 0x3f, 0x3f, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0x22, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x22, 0x41, 0x3f, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x75, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0400 .. 0x04ff */ - 0xa9, 0x85, 0x81, 0x83, 0x87, 0x89, 0x8b, 0x8d, - 0x8f, 0x91, 0x93, 0x95, 0x97, 0xb8, 0x99, 0x9b, - 0xa1, 0xa3, 0xec, 0xad, 0xa7, 0xa9, 0xea, 0xf4, - 0xb8, 0xbe, 0xc7, 0xd1, 0xd3, 0xd5, 0xd7, 0xdd, - 0xe2, 0xe4, 0xe6, 0xe8, 0xab, 0xb6, 0xa5, 0xfc, - 0xf6, 0xfa, 0x9f, 0xf2, 0xee, 0xf8, 0x9d, 0xe0, - 0xa0, 0xa2, 0xeb, 0xac, 0xa6, 0xa8, 0xe9, 0xf3, - 0xb7, 0xbd, 0xc6, 0xd0, 0xd2, 0xd4, 0xd6, 0xd8, - 0xe1, 0xe3, 0xe5, 0xe7, 0xaa, 0xb5, 0xa4, 0xfb, - 0xf5, 0xf9, 0x9e, 0xf1, 0xed, 0xf7, 0x9c, 0xde, - 0xa8, 0x84, 0x80, 0x82, 0x86, 0x88, 0x8a, 0x8c, - 0x8e, 0x90, 0x92, 0x94, 0x96, 0xb7, 0x98, 0x9a, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xea, 0xe9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa1, 0xa0, 0xa1, 0xa0, 0x3f, 0x3f, 0xa9, 0xa8, - 0x3f, 0x3f, 0x3f, 0x3f, 0xea, 0xe9, 0xf4, 0xf3, - 0x3f, 0x3f, 0xb8, 0xb7, 0xb8, 0xb7, 0xd7, 0xd6, - 0x3f, 0x3f, 0x3f, 0x3f, 0xf8, 0xf7, 0xe8, 0xe7, - 0xe8, 0xe7, 0xe8, 0xe7, 0xfc, 0xfb, 0x3f, 0x3f, - 0xf2, 0xf1, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xd4, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0x22, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0x22, 0x22, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x63, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0xef, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x2f, 0x5c, 0x2a, - 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xae, 0xaf, 0x3f, 0x3f, 0x3c, 0x3e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0xc4, 0xc4, 0xb3, 0xb3, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0xda, 0xda, 0xda, 0xda, - 0xbf, 0xbf, 0xbf, 0xbf, 0xc0, 0xc0, 0xc0, 0xc0, - 0xd9, 0xd9, 0xd9, 0xd9, 0xc3, 0xc3, 0xc3, 0xc3, - 0xc3, 0xc3, 0xc3, 0xc3, 0xb4, 0xb4, 0xb4, 0xb4, - 0xb4, 0xb4, 0xb4, 0xb4, 0xc2, 0xc2, 0xc2, 0xc2, - 0xc2, 0xc2, 0xc2, 0xc2, 0xc1, 0xc1, 0xc1, 0xc1, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0x2d, 0x2d, 0x7c, 0x7c, - 0xcd, 0xba, 0xc9, 0xc9, 0xc9, 0xbb, 0xbb, 0xbb, - 0xc8, 0xc8, 0xc8, 0xbc, 0xbc, 0xbc, 0xcc, 0xcc, - 0xcc, 0xb9, 0xb9, 0xb9, 0xcb, 0xcb, 0xcb, 0xca, - 0xca, 0xca, 0xce, 0xce, 0xce, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0xdf, 0x3f, 0x3f, 0x3f, 0xdc, 0x3f, 0x3f, 0x3f, - 0xdb, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xb0, 0xb1, 0xb2, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xfe, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xae, 0xaf, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x2d, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x63, 0x4c, 0x3f, 0x2d, 0x7c, 0x59, 0x3f, 0x3f, - 0xb3, 0x3c, 0x5e, 0x3e, 0x76, 0xfe, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0500, 0x0600, 0x0700, - 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x0e00, 0x1300, 0x1300, 0x1300, - 0x0f00, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1000, 0x1300, 0x1300, 0x1100, 0x1200 -}; - -const struct sbcs_table cptable_855 = -{ - { 855, 1, 0x003f, 0x003f, "OEM Cyrillic" }, - cp2uni, - cp2uni + 256, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_856.c b/reactos/tools/unicode/c_856.c deleted file mode 100644 index 5b2ca383cde..00000000000 --- a/reactos/tools/unicode/c_856.c +++ /dev/null @@ -1,750 +0,0 @@ -/* code page 856 (Hebrew PC) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MISC/CP856.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 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, 0x009b, 0x00a3, 0x009d, 0x00d7, 0x009f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x00ae, 0x00ac, 0x00bd, 0x00bc, 0x003f, 0x00ab, 0x00bb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x003f, 0x003f, 0x003f, - 0x00a9, 0x2563, 0x2551, 0x2557, 0x255d, 0x00a2, 0x00a5, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x003f, 0x003f, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x00a4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x2518, 0x250c, 0x2588, 0x2584, 0x00a6, 0x00de, 0x2580, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x00b5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x00af, 0x00b4, - 0x00ad, 0x00b1, 0x2017, 0x00be, 0x00b6, 0x00a7, 0x00f7, 0x00b8, - 0x00b0, 0x00a8, 0x00b7, 0x00b9, 0x00b3, 0x00b2, 0x25a0, 0x00a0 -}; - -static const unsigned char uni2cp_low[5120] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x9b, 0x3f, 0x9d, 0x3f, 0x9f, - 0xff, 0x21, 0xbd, 0x9c, 0xcf, 0xbe, 0xdd, 0xf5, - 0xf9, 0xb8, 0x61, 0xae, 0xaa, 0xf0, 0xa9, 0xee, - 0xf8, 0xf1, 0xfd, 0xfc, 0xef, 0xe6, 0xf4, 0xfa, - 0xf7, 0xfb, 0x6f, 0xaf, 0xac, 0xab, 0xf3, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, - 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, - 0x44, 0x4e, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x9e, - 0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0xde, 0x3f, - 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x63, - 0x65, 0x65, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69, - 0x64, 0x6e, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0xf6, - 0x6f, 0x75, 0x75, 0x75, 0x75, 0x79, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb3, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55, - 0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0xef, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0xee, 0xef, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xf8, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0xef, 0x5e, 0x7e, 0xee, 0xee, 0x3f, 0x3f, - 0xf9, 0x3f, 0xf8, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xf7, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0xef, 0x3f, 0x3f, 0xf9, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xef, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xef, 0xf9, 0x41, 0xfa, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xe6, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0500 .. 0x05ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 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, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0xf9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0xf9, 0xf9, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0xef, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0xf2, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0xef, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0xee, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf8, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0xbd, 0x3f, 0x3f, 0x9c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x80, 0x81, 0x82, - 0x83, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0xf1, 0x3f, 0x2f, 0x5c, 0x2a, - 0xf8, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xae, 0xaf, 0x3f, 0x3f, 0x3c, 0x3e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xfa, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0xc4, 0xc4, 0xb3, 0xb3, 0x2d, 0x2d, 0xdd, 0xdd, - 0x2d, 0x2d, 0xdd, 0xdd, 0xda, 0xda, 0xda, 0xda, - 0xbf, 0xbf, 0xbf, 0xbf, 0xc0, 0xc0, 0xc0, 0xc0, - 0xd9, 0xd9, 0xd9, 0xd9, 0xc3, 0xc3, 0xc3, 0xc3, - 0xc3, 0xc3, 0xc3, 0xc3, 0xb4, 0xb4, 0xb4, 0xb4, - 0xb4, 0xb4, 0xb4, 0xb4, 0xc2, 0xc2, 0xc2, 0xc2, - 0xc2, 0xc2, 0xc2, 0xc2, 0xc1, 0xc1, 0xc1, 0xc1, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0x2d, 0x2d, 0xdd, 0xdd, - 0xcd, 0xba, 0xc9, 0xc9, 0xc9, 0xbb, 0xbb, 0xbb, - 0xc8, 0xc8, 0xc8, 0xbc, 0xbc, 0xbc, 0xcc, 0xcc, - 0xcc, 0xb9, 0xb9, 0xb9, 0xcb, 0xcb, 0xcb, 0xca, - 0xca, 0xca, 0xce, 0xce, 0xce, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0xdf, 0x3f, 0x3f, 0x3f, 0xdc, 0x3f, 0x3f, 0x3f, - 0xdb, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xb0, 0xb1, 0xb2, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xfe, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xae, 0xaf, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x89, 0x3f, 0x3f, - 0x92, 0x80, 0x83, 0x84, 0x8b, 0x8c, 0x8d, 0x98, - 0x9a, 0x2b, 0x99, 0x99, 0x99, 0x99, 0x80, 0x80, - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x3f, - 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x3f, 0x8e, 0x3f, - 0x90, 0x91, 0x3f, 0x93, 0x94, 0x3f, 0x96, 0x97, - 0x98, 0x99, 0x9a, 0x85, 0x81, 0x8b, 0x94, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xee, 0xee, 0xee, 0xee, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xbd, 0x9c, 0xaa, 0xee, 0xdd, 0xbe, 0x3f, 0x3f, - 0xb3, 0x3c, 0x5e, 0x3e, 0x76, 0xfe, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1300, 0x0400, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0500, 0x0600, 0x0700, - 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x0e00, 0x1300, 0x1300, 0x1300, - 0x0f00, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1000, 0x1300, 0x1300, 0x1100, 0x1200 -}; - -const struct sbcs_table cptable_856 = -{ - { 856, 1, 0x003f, 0x003f, "Hebrew PC" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_857.c b/reactos/tools/unicode/c_857.c deleted file mode 100644 index 70a783bb4ed..00000000000 --- a/reactos/tools/unicode/c_857.c +++ /dev/null @@ -1,750 +0,0 @@ -/* code page 857 (OEM Turkish) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP857.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[512] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x00e0, 0x00e5, 0x00e7, - 0x00ea, 0x00eb, 0x00e8, 0x00ef, 0x00ee, 0x0131, 0x00c4, 0x00c5, - 0x00c9, 0x00e6, 0x00c6, 0x00f4, 0x00f6, 0x00f2, 0x00fb, 0x00f9, - 0x0130, 0x00d6, 0x00dc, 0x00f8, 0x00a3, 0x00d8, 0x015e, 0x015f, - 0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x00f1, 0x00d1, 0x011e, 0x011f, - 0x00bf, 0x00ae, 0x00ac, 0x00bd, 0x00bc, 0x00a1, 0x00ab, 0x00bb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00c1, 0x00c2, 0x00c0, - 0x00a9, 0x2563, 0x2551, 0x2557, 0x255d, 0x00a2, 0x00a5, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x00e3, 0x00c3, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x00a4, - 0x00ba, 0x00aa, 0x00ca, 0x00cb, 0x00c8, 0x003f, 0x00cd, 0x00ce, - 0x00cf, 0x2518, 0x250c, 0x2588, 0x2584, 0x00a6, 0x00cc, 0x2580, - 0x00d3, 0x00df, 0x00d4, 0x00d2, 0x00f5, 0x00d5, 0x00b5, 0x003f, - 0x00d7, 0x00da, 0x00db, 0x00d9, 0x00ec, 0x00ff, 0x00af, 0x00b4, - 0x00ad, 0x00b1, 0x003f, 0x00be, 0x00b6, 0x00a7, 0x00f7, 0x00b8, - 0x00b0, 0x00a8, 0x00b7, 0x00b9, 0x00b3, 0x00b2, 0x25a0, 0x00a0, - /* glyphs */ - 0x0000, 0x263a, 0x263b, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, - 0x25d8, 0x25cb, 0x25d9, 0x2642, 0x2640, 0x266a, 0x266b, 0x263c, - 0x25ba, 0x25c4, 0x2195, 0x203c, 0x00b6, 0x00a7, 0x25ac, 0x21a8, - 0x2191, 0x2193, 0x2192, 0x2190, 0x221f, 0x2194, 0x25b2, 0x25bc, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x2302, - 0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x00e0, 0x00e5, 0x00e7, - 0x00ea, 0x00eb, 0x00e8, 0x00ef, 0x00ee, 0x0131, 0x00c4, 0x00c5, - 0x00c9, 0x00e6, 0x00c6, 0x00f4, 0x00f6, 0x00f2, 0x00fb, 0x00f9, - 0x0130, 0x00d6, 0x00dc, 0x00f8, 0x00a3, 0x00d8, 0x015e, 0x015f, - 0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x00f1, 0x00d1, 0x011e, 0x011f, - 0x00bf, 0x00ae, 0x00ac, 0x00bd, 0x00bc, 0x00a1, 0x00ab, 0x00bb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00c1, 0x00c2, 0x00c0, - 0x00a9, 0x2563, 0x2551, 0x2557, 0x255d, 0x00a2, 0x00a5, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x00e3, 0x00c3, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x00a4, - 0x00ba, 0x00aa, 0x00ca, 0x00cb, 0x00c8, 0x003f, 0x00cd, 0x00ce, - 0x00cf, 0x2518, 0x250c, 0x2588, 0x2584, 0x00a6, 0x00cc, 0x2580, - 0x00d3, 0x00df, 0x00d4, 0x00d2, 0x00f5, 0x00d5, 0x00b5, 0x003f, - 0x00d7, 0x00da, 0x00db, 0x00d9, 0x00ec, 0x00ff, 0x00af, 0x00b4, - 0x00ad, 0x00b1, 0x003f, 0x00be, 0x00b6, 0x00a7, 0x00f7, 0x00b8, - 0x00b0, 0x00a8, 0x00b7, 0x00b9, 0x00b3, 0x00b2, 0x25a0, 0x00a0 -}; - -static const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xff, 0xad, 0xbd, 0x9c, 0xcf, 0xbe, 0xdd, 0xf5, - 0xf9, 0xb8, 0xd1, 0xae, 0xaa, 0xf0, 0xa9, 0xee, - 0xf8, 0xf1, 0xfd, 0xfc, 0xef, 0xe6, 0xf4, 0xfa, - 0xf7, 0xfb, 0xd0, 0xaf, 0xac, 0xab, 0xf3, 0xa8, - 0xb7, 0xb5, 0xb6, 0xc7, 0x8e, 0x8f, 0x92, 0x80, - 0xd4, 0x90, 0xd2, 0xd3, 0xde, 0xd6, 0xd7, 0xd8, - 0x44, 0xa5, 0xe3, 0xe0, 0xe2, 0xe5, 0x99, 0xe8, - 0x9d, 0xeb, 0xe9, 0xea, 0x9a, 0x59, 0x3f, 0xe1, - 0x85, 0xa0, 0x83, 0xc6, 0x84, 0x86, 0x91, 0x87, - 0x8a, 0x82, 0x88, 0x89, 0xec, 0xa1, 0x8c, 0x8b, - 0x64, 0xa4, 0x95, 0xa2, 0x93, 0xe4, 0x94, 0xf6, - 0x9b, 0x97, 0xa3, 0x96, 0x81, 0x79, 0x3f, 0xed, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0xa6, 0xa7, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x98, 0x8d, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x9e, 0x9f, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb3, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x9a, 0x81, 0x9a, - 0x81, 0x9a, 0x81, 0x9a, 0x81, 0x3f, 0x8e, 0x84, - 0x41, 0x61, 0x92, 0x91, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x8f, 0x86, 0x92, 0x91, 0x9d, 0x9b, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x99, 0x94, 0xe5, 0xe4, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0xef, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0xee, 0xef, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xf8, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0xef, 0x5e, 0x7e, 0xee, 0xee, 0x3f, 0x3f, - 0xf9, 0x3f, 0xf8, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xf7, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0xef, 0x3f, 0x3f, 0xf9, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xef, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xef, 0xf9, 0x41, 0xfa, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xe1, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xe6, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe1, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x92, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xe1, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xe1, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x80, 0x87, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0xd8, 0x8b, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0xe5, 0xe4, 0xe5, 0xe4, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0xb6, 0x83, 0xb6, 0x83, - 0xb6, 0x83, 0xb6, 0x83, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0xd2, 0x88, - 0xd2, 0x88, 0xd2, 0x88, 0xd2, 0x88, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0xe2, 0x93, 0xe2, 0x93, 0xe2, 0x93, 0xe2, 0x93, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0xf9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0xf9, 0xf9, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0xef, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0xef, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0xee, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf8, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0xbd, 0x3f, 0x3f, 0x9c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0x8f, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x9d, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0xf1, 0x3f, 0x2f, 0x5c, 0x2a, - 0xf8, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xae, 0xaf, 0x3f, 0x3f, 0x3c, 0x3e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xfa, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0xc4, 0xc4, 0xb3, 0xb3, 0x2d, 0x2d, 0xdd, 0xdd, - 0x2d, 0x2d, 0xdd, 0xdd, 0xda, 0xda, 0xda, 0xda, - 0xbf, 0xbf, 0xbf, 0xbf, 0xc0, 0xc0, 0xc0, 0xc0, - 0xd9, 0xd9, 0xd9, 0xd9, 0xc3, 0xc3, 0xc3, 0xc3, - 0xc3, 0xc3, 0xc3, 0xc3, 0xb4, 0xb4, 0xb4, 0xb4, - 0xb4, 0xb4, 0xb4, 0xb4, 0xc2, 0xc2, 0xc2, 0xc2, - 0xc2, 0xc2, 0xc2, 0xc2, 0xc1, 0xc1, 0xc1, 0xc1, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0x2d, 0x2d, 0xdd, 0xdd, - 0xcd, 0xba, 0xc9, 0xc9, 0xc9, 0xbb, 0xbb, 0xbb, - 0xc8, 0xc8, 0xc8, 0xbc, 0xbc, 0xbc, 0xcc, 0xcc, - 0xcc, 0xb9, 0xb9, 0xb9, 0xcb, 0xcb, 0xcb, 0xca, - 0xca, 0xca, 0xce, 0xce, 0xce, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0xdf, 0x3f, 0x3f, 0x3f, 0xdc, 0x3f, 0x3f, 0x3f, - 0xdb, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xb0, 0xb1, 0xb2, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xfe, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xae, 0xaf, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xee, 0xee, 0xee, 0xee, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xbd, 0x9c, 0xaa, 0xee, 0xdd, 0xbe, 0x3f, 0x3f, - 0xb3, 0x3c, 0x5e, 0x3e, 0x76, 0xfe, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_857 = -{ - { 857, 1, 0x003f, 0x003f, "OEM Turkish" }, - cp2uni, - cp2uni + 256, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_860.c b/reactos/tools/unicode/c_860.c deleted file mode 100644 index 5b87f7a40f7..00000000000 --- a/reactos/tools/unicode/c_860.c +++ /dev/null @@ -1,750 +0,0 @@ -/* code page 860 (OEM Portuguese) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP860.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[512] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e3, 0x00e0, 0x00c1, 0x00e7, - 0x00ea, 0x00ca, 0x00e8, 0x00cd, 0x00d4, 0x00ec, 0x00c3, 0x00c2, - 0x00c9, 0x00c0, 0x00c8, 0x00f4, 0x00f5, 0x00f2, 0x00da, 0x00f9, - 0x00cc, 0x00d5, 0x00dc, 0x00a2, 0x00a3, 0x00d9, 0x20a7, 0x00d3, - 0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x00f1, 0x00d1, 0x00aa, 0x00ba, - 0x00bf, 0x00d2, 0x00ac, 0x00bd, 0x00bc, 0x00a1, 0x00ab, 0x00bb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, - 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, - 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, - 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0x03b1, 0x00df, 0x0393, 0x03c0, 0x03a3, 0x03c3, 0x00b5, 0x03c4, - 0x03a6, 0x0398, 0x03a9, 0x03b4, 0x221e, 0x03c6, 0x03b5, 0x2229, - 0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248, - 0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x25a0, 0x00a0, - /* glyphs */ - 0x0000, 0x263a, 0x263b, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, - 0x25d8, 0x25cb, 0x25d9, 0x2642, 0x2640, 0x266a, 0x266b, 0x263c, - 0x25ba, 0x25c4, 0x2195, 0x203c, 0x00b6, 0x00a7, 0x25ac, 0x21a8, - 0x2191, 0x2193, 0x2192, 0x2190, 0x221f, 0x2194, 0x25b2, 0x25bc, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x2302, - 0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e3, 0x00e0, 0x00c1, 0x00e7, - 0x00ea, 0x00ca, 0x00e8, 0x00cd, 0x00d4, 0x00ec, 0x00c3, 0x00c2, - 0x00c9, 0x00c0, 0x00c8, 0x00f4, 0x00f5, 0x00f2, 0x00da, 0x00f9, - 0x00cc, 0x00d5, 0x00dc, 0x00a2, 0x00a3, 0x00d9, 0x20a7, 0x00d3, - 0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x00f1, 0x00d1, 0x00aa, 0x00ba, - 0x00bf, 0x00d2, 0x00ac, 0x00bd, 0x00bc, 0x00a1, 0x00ab, 0x00bb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, - 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, - 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, - 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0x03b1, 0x00df, 0x0393, 0x03c0, 0x03a3, 0x03c3, 0x00b5, 0x03c4, - 0x03a6, 0x0398, 0x03a9, 0x03b4, 0x221e, 0x03c6, 0x03b5, 0x2229, - 0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248, - 0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x25a0, 0x00a0 -}; - -static const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xff, 0xad, 0x9b, 0x9c, 0x3f, 0x59, 0x7c, 0x3f, - 0x22, 0x63, 0xa6, 0xae, 0xaa, 0x2d, 0x72, 0x2d, - 0xf8, 0xf1, 0xfd, 0x33, 0x27, 0xe6, 0x3f, 0xfa, - 0x2c, 0x31, 0xa7, 0xaf, 0xac, 0xab, 0x3f, 0xa8, - 0x91, 0x86, 0x8f, 0x8e, 0x41, 0x41, 0x41, 0x80, - 0x92, 0x90, 0x89, 0x45, 0x98, 0x8b, 0x49, 0x49, - 0x44, 0xa5, 0xa9, 0x9f, 0x8c, 0x99, 0x4f, 0x78, - 0x4f, 0x9d, 0x96, 0x55, 0x9a, 0x59, 0x3f, 0xe1, - 0x85, 0xa0, 0x83, 0x84, 0x61, 0x61, 0x61, 0x87, - 0x8a, 0x82, 0x88, 0x65, 0x8d, 0xa1, 0x69, 0x69, - 0x64, 0xa4, 0x95, 0xa2, 0x93, 0x94, 0x6f, 0xf6, - 0x6f, 0x97, 0xa3, 0x75, 0x81, 0x79, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb3, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x9a, 0x81, 0x9a, - 0x81, 0x9a, 0x81, 0x9a, 0x81, 0x3f, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x4f, 0x6f, 0x99, 0x94, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0x2d, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xf8, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0x2d, 0x2d, 0x3f, 0x3f, - 0x22, 0x3f, 0xf8, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0x22, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x22, 0x41, 0xfa, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0xea, - 0x3f, 0x41, 0x42, 0xe2, 0x3f, 0x45, 0x5a, 0x48, - 0xe9, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0xe4, 0x54, 0x59, 0xe8, 0x58, - 0x3f, 0xea, 0x49, 0x59, 0xe0, 0xee, 0x3f, 0x3f, - 0x3f, 0xe0, 0xe1, 0x3f, 0xeb, 0xee, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xe6, 0x3f, 0x3f, 0x3f, - 0xe3, 0x3f, 0x3f, 0xe5, 0xe7, 0x3f, 0xed, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe1, 0x3f, 0x59, 0x59, 0x59, 0xed, 0xe3, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xe9, 0xee, 0x3f, 0x3f, - 0x3f, 0xe4, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xe1, 0x3f, 0xeb, - 0xed, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xe1, 0x3f, - 0x3f, 0xed, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x80, 0x87, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x99, 0x94, 0x99, 0x94, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x8f, 0x83, 0x8f, 0x83, - 0x8f, 0x83, 0x8f, 0x83, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x89, 0x88, - 0x89, 0x88, 0x89, 0x88, 0x89, 0x88, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x8c, 0x93, 0x8c, 0x93, 0x8c, 0x93, 0x8c, 0x93, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, - 0xe0, 0xe0, 0xee, 0xee, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, - 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0x3f, 0xe0, 0xe0, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0x22, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0x22, 0x22, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0xea, 0xea, 0xea, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0xf9, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf8, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0xfc, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x9b, 0x3f, 0x3f, 0x9c, 0x3f, 0x3f, 0x9e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0xea, 0x3f, - 0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0xe3, 0x3f, 0xe2, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0xf1, 0x3f, 0x2f, 0x5c, 0x2a, - 0xf8, 0xf9, 0xfb, 0x3f, 0x3f, 0x3f, 0xec, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0xef, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf7, 0xf7, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0xf0, 0xf0, 0xf0, 0xf3, 0xf2, 0x3f, 0x3f, - 0x3f, 0x3f, 0xae, 0xaf, 0x3f, 0x3f, 0x3c, 0x3e, - 0xf3, 0xf2, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xfa, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf4, 0xf5, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0xc4, 0xc4, 0xb3, 0xb3, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0xda, 0xda, 0xda, 0xda, - 0xbf, 0xbf, 0xbf, 0xbf, 0xc0, 0xc0, 0xc0, 0xc0, - 0xd9, 0xd9, 0xd9, 0xd9, 0xc3, 0xc3, 0xc3, 0xc3, - 0xc3, 0xc3, 0xc3, 0xc3, 0xb4, 0xb4, 0xb4, 0xb4, - 0xb4, 0xb4, 0xb4, 0xb4, 0xc2, 0xc2, 0xc2, 0xc2, - 0xc2, 0xc2, 0xc2, 0xc2, 0xc1, 0xc1, 0xc1, 0xc1, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0x2d, 0x2d, 0x7c, 0x7c, - 0xcd, 0xba, 0xd5, 0xd6, 0xc9, 0xb8, 0xb7, 0xbb, - 0xd4, 0xd3, 0xc8, 0xbe, 0xbd, 0xbc, 0xc6, 0xc7, - 0xcc, 0xb5, 0xb6, 0xb9, 0xd1, 0xd2, 0xcb, 0xcf, - 0xd0, 0xca, 0xd8, 0xd7, 0xce, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0xdf, 0x3f, 0x3f, 0x3f, 0xdc, 0x3f, 0x3f, 0x3f, - 0xdb, 0x3f, 0x3f, 0x3f, 0xdd, 0x3f, 0x3f, 0x3f, - 0xde, 0xb0, 0xb1, 0xb2, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xfe, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xae, 0xaf, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x2d, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x9b, 0x9c, 0xaa, 0x2d, 0x7c, 0x59, 0x3f, 0x3f, - 0xb3, 0x3c, 0x5e, 0x3e, 0x76, 0xfe, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_860 = -{ - { 860, 1, 0x003f, 0x003f, "OEM Portuguese" }, - cp2uni, - cp2uni + 256, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_861.c b/reactos/tools/unicode/c_861.c deleted file mode 100644 index 3eaee92d871..00000000000 --- a/reactos/tools/unicode/c_861.c +++ /dev/null @@ -1,750 +0,0 @@ -/* code page 861 (OEM Icelandic) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP861.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[512] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x00e0, 0x00e5, 0x00e7, - 0x00ea, 0x00eb, 0x00e8, 0x00d0, 0x00f0, 0x00de, 0x00c4, 0x00c5, - 0x00c9, 0x00e6, 0x00c6, 0x00f4, 0x00f6, 0x00fe, 0x00fb, 0x00dd, - 0x00fd, 0x00d6, 0x00dc, 0x00f8, 0x00a3, 0x00d8, 0x20a7, 0x0192, - 0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x00c1, 0x00cd, 0x00d3, 0x00da, - 0x00bf, 0x2310, 0x00ac, 0x00bd, 0x00bc, 0x00a1, 0x00ab, 0x00bb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, - 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, - 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, - 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0x03b1, 0x00df, 0x0393, 0x03c0, 0x03a3, 0x03c3, 0x00b5, 0x03c4, - 0x03a6, 0x0398, 0x03a9, 0x03b4, 0x221e, 0x03c6, 0x03b5, 0x2229, - 0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248, - 0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x25a0, 0x00a0, - /* glyphs */ - 0x0000, 0x263a, 0x263b, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, - 0x25d8, 0x25cb, 0x25d9, 0x2642, 0x2640, 0x266a, 0x266b, 0x263c, - 0x25ba, 0x25c4, 0x2195, 0x203c, 0x00b6, 0x00a7, 0x25ac, 0x21a8, - 0x2191, 0x2193, 0x2192, 0x2190, 0x221f, 0x2194, 0x25b2, 0x25bc, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x2302, - 0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x00e0, 0x00e5, 0x00e7, - 0x00ea, 0x00eb, 0x00e8, 0x00d0, 0x00f0, 0x00de, 0x00c4, 0x00c5, - 0x00c9, 0x00e6, 0x00c6, 0x00f4, 0x00f6, 0x00fe, 0x00fb, 0x00dd, - 0x00fd, 0x00d6, 0x00dc, 0x00f8, 0x00a3, 0x00d8, 0x20a7, 0x0192, - 0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x00c1, 0x00cd, 0x00d3, 0x00da, - 0x00bf, 0x2310, 0x00ac, 0x00bd, 0x00bc, 0x00a1, 0x00ab, 0x00bb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, - 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, - 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, - 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0x03b1, 0x00df, 0x0393, 0x03c0, 0x03a3, 0x03c3, 0x00b5, 0x03c4, - 0x03a6, 0x0398, 0x03a9, 0x03b4, 0x221e, 0x03c6, 0x03b5, 0x2229, - 0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248, - 0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x25a0, 0x00a0 -}; - -static const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xff, 0xad, 0x63, 0x9c, 0x3f, 0x59, 0x7c, 0x3f, - 0x22, 0x63, 0x61, 0xae, 0xaa, 0x2d, 0x72, 0x2d, - 0xf8, 0xf1, 0xfd, 0x33, 0x27, 0xe6, 0x3f, 0xfa, - 0x2c, 0x31, 0x6f, 0xaf, 0xac, 0xab, 0x3f, 0xa8, - 0x41, 0xa4, 0x41, 0x41, 0x8e, 0x8f, 0x92, 0x80, - 0x45, 0x90, 0x45, 0x45, 0x49, 0xa5, 0x49, 0x49, - 0x8b, 0x4e, 0x4f, 0xa6, 0x4f, 0x4f, 0x99, 0x78, - 0x9d, 0x55, 0xa7, 0x55, 0x9a, 0x97, 0x8d, 0xe1, - 0x85, 0xa0, 0x83, 0x61, 0x84, 0x86, 0x91, 0x87, - 0x8a, 0x82, 0x88, 0x89, 0x69, 0xa1, 0x69, 0x69, - 0x8c, 0x6e, 0x6f, 0xa2, 0x93, 0x6f, 0x94, 0xf6, - 0x9b, 0x75, 0xa3, 0x96, 0x81, 0x98, 0x95, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x8b, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x8b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x9f, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb3, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x9a, 0x81, 0x9a, - 0x81, 0x9a, 0x81, 0x9a, 0x81, 0x3f, 0x8e, 0x84, - 0x41, 0x61, 0x92, 0x91, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x8f, 0x86, 0x92, 0x91, 0x9d, 0x9b, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x99, 0x94, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0x2d, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xf8, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0x2d, 0x2d, 0x3f, 0x3f, - 0x22, 0x3f, 0xf8, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0x22, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x22, 0x41, 0xfa, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0xea, - 0x3f, 0x41, 0x42, 0xe2, 0x3f, 0x45, 0x5a, 0x48, - 0xe9, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0xe4, 0x54, 0x59, 0xe8, 0x58, - 0x3f, 0xea, 0x49, 0x59, 0xe0, 0xee, 0x3f, 0x3f, - 0x3f, 0xe0, 0xe1, 0x3f, 0xeb, 0xee, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xe6, 0x3f, 0x3f, 0x3f, - 0xe3, 0x3f, 0x3f, 0xe5, 0xe7, 0x3f, 0xed, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe1, 0x3f, 0x59, 0x59, 0x59, 0xed, 0xe3, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xe9, 0xee, 0x3f, 0x3f, - 0x3f, 0xe4, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x92, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xe1, 0x3f, 0xeb, - 0xed, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xe1, 0x3f, - 0x3f, 0xed, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x8c, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x80, 0x87, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x83, 0x41, 0x83, - 0x41, 0x83, 0x41, 0x83, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x88, - 0x45, 0x88, 0x45, 0x88, 0x45, 0x88, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x93, 0x4f, 0x93, 0x4f, 0x93, 0x4f, 0x93, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, - 0xe0, 0xe0, 0xee, 0xee, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, - 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0x3f, 0xe0, 0xe0, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0x22, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0x22, 0x22, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0xea, 0xea, 0xea, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0xf9, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf8, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0xfc, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x63, 0x3f, 0x3f, 0x9c, 0x3f, 0x3f, 0x9e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0xea, 0x3f, - 0x5a, 0x3f, 0x4b, 0x8f, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0xe3, 0x3f, 0xe2, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x9d, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0xf1, 0x3f, 0x2f, 0x5c, 0x2a, - 0xf8, 0xf9, 0xfb, 0x3f, 0x3f, 0x3f, 0xec, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0xef, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf7, 0xf7, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0xf0, 0xf0, 0xf0, 0xf3, 0xf2, 0x3f, 0x3f, - 0x3f, 0x3f, 0xae, 0xaf, 0x3f, 0x3f, 0x3c, 0x3e, - 0xf3, 0xf2, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xfa, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf4, 0xf5, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0xc4, 0xc4, 0xb3, 0xb3, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0xda, 0xda, 0xda, 0xda, - 0xbf, 0xbf, 0xbf, 0xbf, 0xc0, 0xc0, 0xc0, 0xc0, - 0xd9, 0xd9, 0xd9, 0xd9, 0xc3, 0xc3, 0xc3, 0xc3, - 0xc3, 0xc3, 0xc3, 0xc3, 0xb4, 0xb4, 0xb4, 0xb4, - 0xb4, 0xb4, 0xb4, 0xb4, 0xc2, 0xc2, 0xc2, 0xc2, - 0xc2, 0xc2, 0xc2, 0xc2, 0xc1, 0xc1, 0xc1, 0xc1, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0x2d, 0x2d, 0x7c, 0x7c, - 0xcd, 0xba, 0xd5, 0xd6, 0xc9, 0xb8, 0xb7, 0xbb, - 0xd4, 0xd3, 0xc8, 0xbe, 0xbd, 0xbc, 0xc6, 0xc7, - 0xcc, 0xb5, 0xb6, 0xb9, 0xd1, 0xd2, 0xcb, 0xcf, - 0xd0, 0xca, 0xd8, 0xd7, 0xce, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0xdf, 0x3f, 0x3f, 0x3f, 0xdc, 0x3f, 0x3f, 0x3f, - 0xdb, 0x3f, 0x3f, 0x3f, 0xdd, 0x3f, 0x3f, 0x3f, - 0xde, 0xb0, 0xb1, 0xb2, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xfe, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xae, 0xaf, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x2d, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x63, 0x9c, 0xaa, 0x2d, 0x7c, 0x59, 0x3f, 0x3f, - 0xb3, 0x3c, 0x5e, 0x3e, 0x76, 0xfe, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_861 = -{ - { 861, 1, 0x003f, 0x003f, "OEM Icelandic" }, - cp2uni, - cp2uni + 256, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_862.c b/reactos/tools/unicode/c_862.c deleted file mode 100644 index 5a9746d9606..00000000000 --- a/reactos/tools/unicode/c_862.c +++ /dev/null @@ -1,783 +0,0 @@ -/* code page 862 (OEM Hebrew) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP862.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[512] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 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, 0x00a2, 0x00a3, 0x00a5, 0x20a7, 0x0192, - 0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x00f1, 0x00d1, 0x00aa, 0x00ba, - 0x00bf, 0x2310, 0x00ac, 0x00bd, 0x00bc, 0x00a1, 0x00ab, 0x00bb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, - 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, - 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, - 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0x03b1, 0x00df, 0x0393, 0x03c0, 0x03a3, 0x03c3, 0x00b5, 0x03c4, - 0x03a6, 0x0398, 0x03a9, 0x03b4, 0x221e, 0x03c6, 0x03b5, 0x2229, - 0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248, - 0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x25a0, 0x00a0, - /* glyphs */ - 0x0000, 0x263a, 0x263b, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, - 0x25d8, 0x25cb, 0x25d9, 0x2642, 0x2640, 0x266a, 0x266b, 0x263c, - 0x25ba, 0x25c4, 0x2195, 0x203c, 0x00b6, 0x00a7, 0x25ac, 0x21a8, - 0x2191, 0x2193, 0x2192, 0x2190, 0x221f, 0x2194, 0x25b2, 0x25bc, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x2302, - 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, 0x00a2, 0x00a3, 0x00a5, 0x20a7, 0x0192, - 0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x00f1, 0x00d1, 0x00aa, 0x00ba, - 0x00bf, 0x2310, 0x00ac, 0x00bd, 0x00bc, 0x00a1, 0x00ab, 0x00bb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, - 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, - 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, - 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0x03b1, 0x00df, 0x0393, 0x03c0, 0x03a3, 0x03c3, 0x00b5, 0x03c4, - 0x03a6, 0x0398, 0x03a9, 0x03b4, 0x221e, 0x03c6, 0x03b5, 0x2229, - 0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248, - 0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x25a0, 0x00a0 -}; - -static const unsigned char uni2cp_low[5120] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xff, 0xad, 0x9b, 0x9c, 0x3f, 0x9d, 0x7c, 0x3f, - 0x22, 0x63, 0xa6, 0xae, 0xaa, 0x2d, 0x72, 0x2d, - 0xf8, 0xf1, 0xfd, 0x33, 0x27, 0xe6, 0x3f, 0xfa, - 0x2c, 0x31, 0xa7, 0xaf, 0xac, 0xab, 0x3f, 0xa8, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, - 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, - 0x44, 0xa5, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x78, - 0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0x3f, 0xe1, - 0x61, 0xa0, 0x61, 0x61, 0x61, 0x61, 0x61, 0x63, - 0x65, 0x65, 0x65, 0x65, 0x69, 0xa1, 0x69, 0x69, - 0x64, 0xa4, 0x6f, 0xa2, 0x6f, 0x6f, 0x6f, 0xf6, - 0x6f, 0x75, 0xa3, 0x75, 0x75, 0x79, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x9f, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb3, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55, - 0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0x2d, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xf8, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0x2d, 0x2d, 0x3f, 0x3f, - 0x22, 0x3f, 0xf8, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0x22, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x22, 0x41, 0xfa, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0xea, - 0x3f, 0x41, 0x42, 0xe2, 0x3f, 0x45, 0x5a, 0x48, - 0xe9, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0xe4, 0x54, 0x59, 0xe8, 0x58, - 0x3f, 0xea, 0x49, 0x59, 0xe0, 0xee, 0x3f, 0x3f, - 0x3f, 0xe0, 0xe1, 0x3f, 0xeb, 0xee, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xe6, 0x3f, 0x3f, 0x3f, - 0xe3, 0x3f, 0x3f, 0xe5, 0xe7, 0x3f, 0xed, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe1, 0x3f, 0x59, 0x59, 0x59, 0xed, 0xe3, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xe9, 0xee, 0x3f, 0x3f, - 0x3f, 0xe4, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0500 .. 0x05ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 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, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xe1, 0x3f, 0xeb, - 0xed, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xe1, 0x3f, - 0x3f, 0xed, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, - 0xe0, 0xe0, 0xee, 0xee, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, - 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0x3f, 0xe0, 0xe0, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0x22, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0x22, 0x22, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0xea, 0xea, 0xea, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0xf9, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf8, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0xfc, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x9b, 0x3f, 0x3f, 0x9c, 0x3f, 0x3f, 0x9e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0xea, 0x3f, - 0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x80, 0x81, 0x82, - 0x83, 0x69, 0x3f, 0x3f, 0xe3, 0x3f, 0xe2, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0xf1, 0x3f, 0x2f, 0x5c, 0x2a, - 0xf8, 0xf9, 0xfb, 0x3f, 0x3f, 0x3f, 0xec, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0xef, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf7, 0xf7, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0xf0, 0xf0, 0xf0, 0xf3, 0xf2, 0x3f, 0x3f, - 0x3f, 0x3f, 0xae, 0xaf, 0x3f, 0x3f, 0x3c, 0x3e, - 0xf3, 0xf2, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xfa, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf4, 0xf5, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0xc4, 0xc4, 0xb3, 0xb3, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0xda, 0xda, 0xda, 0xda, - 0xbf, 0xbf, 0xbf, 0xbf, 0xc0, 0xc0, 0xc0, 0xc0, - 0xd9, 0xd9, 0xd9, 0xd9, 0xc3, 0xc3, 0xc3, 0xc3, - 0xc3, 0xc3, 0xc3, 0xc3, 0xb4, 0xb4, 0xb4, 0xb4, - 0xb4, 0xb4, 0xb4, 0xb4, 0xc2, 0xc2, 0xc2, 0xc2, - 0xc2, 0xc2, 0xc2, 0xc2, 0xc1, 0xc1, 0xc1, 0xc1, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0x2d, 0x2d, 0x7c, 0x7c, - 0xcd, 0xba, 0xd5, 0xd6, 0xc9, 0xb8, 0xb7, 0xbb, - 0xd4, 0xd3, 0xc8, 0xbe, 0xbd, 0xbc, 0xc6, 0xc7, - 0xcc, 0xb5, 0xb6, 0xb9, 0xd1, 0xd2, 0xcb, 0xcf, - 0xd0, 0xca, 0xd8, 0xd7, 0xce, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0xdf, 0x3f, 0x3f, 0x3f, 0xdc, 0x3f, 0x3f, 0x3f, - 0xdb, 0x3f, 0x3f, 0x3f, 0xdd, 0x3f, 0x3f, 0x3f, - 0xde, 0xb0, 0xb1, 0xb2, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xfe, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xae, 0xaf, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x89, 0x3f, 0x3f, - 0x92, 0x80, 0x83, 0x84, 0x8b, 0x8c, 0x8d, 0x98, - 0x9a, 0x2b, 0x99, 0x99, 0x99, 0x99, 0x80, 0x80, - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x3f, - 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x3f, 0x8e, 0x3f, - 0x90, 0x91, 0x3f, 0x93, 0x94, 0x3f, 0x96, 0x97, - 0x98, 0x99, 0x9a, 0x85, 0x81, 0x8b, 0x94, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x2d, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x9b, 0x9c, 0xaa, 0x2d, 0x7c, 0x9d, 0x3f, 0x3f, - 0xb3, 0x3c, 0x5e, 0x3e, 0x76, 0xfe, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1300, 0x0400, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0500, 0x0600, 0x0700, - 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x0e00, 0x1300, 0x1300, 0x1300, - 0x0f00, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1000, 0x1300, 0x1300, 0x1100, 0x1200 -}; - -const struct sbcs_table cptable_862 = -{ - { 862, 1, 0x003f, 0x003f, "OEM Hebrew" }, - cp2uni, - cp2uni + 256, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_863.c b/reactos/tools/unicode/c_863.c deleted file mode 100644 index dda98220113..00000000000 --- a/reactos/tools/unicode/c_863.c +++ /dev/null @@ -1,750 +0,0 @@ -/* code page 863 (OEM Canadian French) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP863.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[512] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00c2, 0x00e0, 0x00b6, 0x00e7, - 0x00ea, 0x00eb, 0x00e8, 0x00ef, 0x00ee, 0x2017, 0x00c0, 0x00a7, - 0x00c9, 0x00c8, 0x00ca, 0x00f4, 0x00cb, 0x00cf, 0x00fb, 0x00f9, - 0x00a4, 0x00d4, 0x00dc, 0x00a2, 0x00a3, 0x00d9, 0x00db, 0x0192, - 0x00a6, 0x00b4, 0x00f3, 0x00fa, 0x00a8, 0x00b8, 0x00b3, 0x00af, - 0x00ce, 0x2310, 0x00ac, 0x00bd, 0x00bc, 0x00be, 0x00ab, 0x00bb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, - 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, - 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, - 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0x03b1, 0x00df, 0x0393, 0x03c0, 0x03a3, 0x03c3, 0x00b5, 0x03c4, - 0x03a6, 0x0398, 0x03a9, 0x03b4, 0x221e, 0x03c6, 0x03b5, 0x2229, - 0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248, - 0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x25a0, 0x00a0, - /* glyphs */ - 0x0000, 0x263a, 0x263b, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, - 0x25d8, 0x25cb, 0x25d9, 0x2642, 0x2640, 0x266a, 0x266b, 0x263c, - 0x25ba, 0x25c4, 0x2195, 0x203c, 0x00b6, 0x00a7, 0x25ac, 0x21a8, - 0x2191, 0x2193, 0x2192, 0x2190, 0x221f, 0x2194, 0x25b2, 0x25bc, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x2302, - 0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00c2, 0x00e0, 0x00b6, 0x00e7, - 0x00ea, 0x00eb, 0x00e8, 0x00ef, 0x00ee, 0x2017, 0x00c0, 0x00a7, - 0x00c9, 0x00c8, 0x00ca, 0x00f4, 0x00cb, 0x00cf, 0x00fb, 0x00f9, - 0x00a4, 0x00d4, 0x00dc, 0x00a2, 0x00a3, 0x00d9, 0x00db, 0x0192, - 0x00a6, 0x00b4, 0x00f3, 0x00fa, 0x00a8, 0x00b8, 0x00b3, 0x00af, - 0x00ce, 0x2310, 0x00ac, 0x00bd, 0x00bc, 0x00be, 0x00ab, 0x00bb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, - 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, - 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, - 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0x03b1, 0x00df, 0x0393, 0x03c0, 0x03a3, 0x03c3, 0x00b5, 0x03c4, - 0x03a6, 0x0398, 0x03a9, 0x03b4, 0x221e, 0x03c6, 0x03b5, 0x2229, - 0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248, - 0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x25a0, 0x00a0 -}; - -static const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xff, 0x21, 0x9b, 0x9c, 0x98, 0x59, 0xa0, 0x8f, - 0xa4, 0x63, 0x61, 0xae, 0xaa, 0x2d, 0x72, 0xa7, - 0xf8, 0xf1, 0xfd, 0xa6, 0xa1, 0xe6, 0x86, 0xfa, - 0xa5, 0x31, 0x6f, 0xaf, 0xac, 0xab, 0xad, 0x3f, - 0x8e, 0x41, 0x84, 0x41, 0x41, 0x41, 0x41, 0x80, - 0x91, 0x90, 0x92, 0x94, 0x49, 0x49, 0xa8, 0x95, - 0x44, 0x4e, 0x4f, 0x4f, 0x99, 0x4f, 0x4f, 0x78, - 0x4f, 0x9d, 0x55, 0x9e, 0x9a, 0x59, 0x3f, 0xe1, - 0x85, 0x61, 0x83, 0x61, 0x61, 0x61, 0x61, 0x87, - 0x8a, 0x82, 0x88, 0x89, 0x69, 0x69, 0x8c, 0x8b, - 0x64, 0x6e, 0x6f, 0xa2, 0x93, 0x6f, 0x6f, 0xf6, - 0x6f, 0x97, 0xa3, 0x96, 0x81, 0x79, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x9f, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb3, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x9a, 0x81, 0x9a, - 0x81, 0x9a, 0x81, 0x9a, 0x81, 0x3f, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0xa1, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0xa7, 0xa1, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xf8, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0xa1, 0x5e, 0x7e, 0xa7, 0xa7, 0x3f, 0x3f, - 0xa4, 0x3f, 0xf8, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xa5, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0xa1, 0x3f, 0x3f, 0xa4, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xa1, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xa1, 0xa4, 0x41, 0xfa, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0xea, - 0x3f, 0x41, 0x42, 0xe2, 0x3f, 0x45, 0x5a, 0x48, - 0xe9, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0xe4, 0x54, 0x59, 0xe8, 0x58, - 0x3f, 0xea, 0x49, 0x59, 0xe0, 0xee, 0x3f, 0x3f, - 0x3f, 0xe0, 0xe1, 0x3f, 0xeb, 0xee, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xe6, 0x3f, 0x3f, 0x3f, - 0xe3, 0x3f, 0x3f, 0xe5, 0xe7, 0x3f, 0xed, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe1, 0x3f, 0x59, 0x59, 0x59, 0xed, 0xe3, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xe9, 0xee, 0x3f, 0x3f, - 0x3f, 0xe4, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xe1, 0x3f, 0xeb, - 0xed, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xe1, 0x3f, - 0x3f, 0xed, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x80, 0x87, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x95, 0x8b, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x84, 0x83, 0x84, 0x83, - 0x84, 0x83, 0x84, 0x83, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x92, 0x88, - 0x92, 0x88, 0x92, 0x88, 0x92, 0x88, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x99, 0x93, 0x99, 0x93, 0x99, 0x93, 0x99, 0x93, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, - 0xe0, 0xe0, 0xee, 0xee, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, - 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0x3f, 0xe0, 0xe0, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa4, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0xa4, 0xa4, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0xea, 0xea, 0xea, 0xa1, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x8d, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0xf9, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0xa1, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0xa7, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf8, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0xfc, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x9b, 0x3f, 0x3f, 0x9c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0xea, 0x3f, - 0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0xe3, 0x3f, 0xe2, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0xf1, 0x3f, 0x2f, 0x5c, 0x2a, - 0xf8, 0xf9, 0xfb, 0x3f, 0x3f, 0x3f, 0xec, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0xef, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf7, 0xf7, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0xf0, 0xf0, 0xf0, 0xf3, 0xf2, 0x3f, 0x3f, - 0x3f, 0x3f, 0xae, 0xaf, 0x3f, 0x3f, 0x3c, 0x3e, - 0xf3, 0xf2, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xfa, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf4, 0xf5, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0xc4, 0xc4, 0xb3, 0xb3, 0x2d, 0x2d, 0xa0, 0xa0, - 0x2d, 0x2d, 0xa0, 0xa0, 0xda, 0xda, 0xda, 0xda, - 0xbf, 0xbf, 0xbf, 0xbf, 0xc0, 0xc0, 0xc0, 0xc0, - 0xd9, 0xd9, 0xd9, 0xd9, 0xc3, 0xc3, 0xc3, 0xc3, - 0xc3, 0xc3, 0xc3, 0xc3, 0xb4, 0xb4, 0xb4, 0xb4, - 0xb4, 0xb4, 0xb4, 0xb4, 0xc2, 0xc2, 0xc2, 0xc2, - 0xc2, 0xc2, 0xc2, 0xc2, 0xc1, 0xc1, 0xc1, 0xc1, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0x2d, 0x2d, 0xa0, 0xa0, - 0xcd, 0xba, 0xd5, 0xd6, 0xc9, 0xb8, 0xb7, 0xbb, - 0xd4, 0xd3, 0xc8, 0xbe, 0xbd, 0xbc, 0xc6, 0xc7, - 0xcc, 0xb5, 0xb6, 0xb9, 0xd1, 0xd2, 0xcb, 0xcf, - 0xd0, 0xca, 0xd8, 0xd7, 0xce, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0xdf, 0x3f, 0x3f, 0x3f, 0xdc, 0x3f, 0x3f, 0x3f, - 0xdb, 0x3f, 0x3f, 0x3f, 0xdd, 0x3f, 0x3f, 0x3f, - 0xde, 0xb0, 0xb1, 0xb2, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xfe, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xae, 0xaf, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa7, 0xa7, 0xa7, 0xa7, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x9b, 0x9c, 0xaa, 0xa7, 0xa0, 0x59, 0x3f, 0x3f, - 0xb3, 0x3c, 0x5e, 0x3e, 0x76, 0xfe, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_863 = -{ - { 863, 1, 0x003f, 0x003f, "OEM Canadian French" }, - cp2uni, - cp2uni + 256, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_864.c b/reactos/tools/unicode/c_864.c deleted file mode 100644 index f6786bd3568..00000000000 --- a/reactos/tools/unicode/c_864.c +++ /dev/null @@ -1,750 +0,0 @@ -/* code page 864 (OEM Arabic) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP864.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x066a, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x00b0, 0x00b7, 0x2219, 0x221a, 0x2592, 0x2500, 0x2502, 0x253c, - 0x2524, 0x252c, 0x251c, 0x2534, 0x2510, 0x250c, 0x2514, 0x2518, - 0x03b2, 0x221e, 0x03c6, 0x00b1, 0x00bd, 0x00bc, 0x2248, 0x00ab, - 0x00bb, 0xfef7, 0xfef8, 0x009b, 0x009c, 0xfefb, 0xfefc, 0x009f, - 0x00a0, 0x00ad, 0xfe82, 0x00a3, 0x00a4, 0xfe84, 0x003f, 0x00a7, - 0xfe8e, 0xfe8f, 0xfe95, 0xfe99, 0x060c, 0xfe9d, 0xfea1, 0xfea5, - 0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, - 0x0668, 0x0669, 0xfed1, 0x061b, 0xfeb1, 0xfeb5, 0xfeb9, 0x061f, - 0x00a2, 0xfe80, 0xfe81, 0xfe83, 0xfe85, 0xfeca, 0xfe8b, 0xfe8d, - 0xfe91, 0xfe93, 0xfe97, 0xfe9b, 0xfe9f, 0xfea3, 0xfea7, 0xfea9, - 0xfeab, 0xfead, 0xfeaf, 0xfeb3, 0xfeb7, 0xfebb, 0xfebf, 0xfec1, - 0xfec5, 0xfecb, 0xfecf, 0x00a6, 0x00ac, 0x00f7, 0x00d7, 0xfec9, - 0x0640, 0xfed3, 0xfed7, 0xfedb, 0xfedf, 0xfee3, 0xfee7, 0xfeeb, - 0xfeed, 0xfeef, 0xfef3, 0xfebd, 0xfecc, 0xfece, 0xfecd, 0xfee1, - 0xfe7d, 0x0651, 0xfee5, 0xfee9, 0xfeec, 0xfef0, 0xfef2, 0xfed0, - 0xfed5, 0xfef5, 0xfef6, 0xfedd, 0xfed9, 0xfef1, 0x25a0, 0x003f -}; - -static const unsigned char uni2cp_low[5120] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x9b, 0x9c, 0x3f, 0x3f, 0x9f, - 0xa0, 0x21, 0xc0, 0xa3, 0xa4, 0x59, 0xdb, 0xa7, - 0x22, 0x63, 0x61, 0x97, 0xdc, 0xa1, 0x72, 0x2d, - 0x80, 0x93, 0x32, 0x33, 0x27, 0x75, 0x3f, 0x81, - 0x2c, 0x31, 0x6f, 0x98, 0x95, 0x94, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, - 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, - 0x44, 0x4e, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0xde, - 0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0x3f, 0x90, - 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x63, - 0x65, 0x65, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69, - 0x64, 0x6e, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0xdd, - 0x6f, 0x75, 0x75, 0x75, 0x75, 0x79, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x86, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55, - 0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0x2d, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x80, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0x2d, 0x2d, 0x3f, 0x3f, - 0x22, 0x3f, 0x80, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0x22, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x22, 0x41, 0x81, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x90, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x75, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x92, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x90, 0x3f, 0x59, 0x59, 0x59, 0x92, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0600 .. 0x06ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xac, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xbb, 0x3f, 0x3f, 0x3f, 0xbf, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xf1, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, - 0xb8, 0xb9, 0x25, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0x90, 0x3f, 0x3f, - 0x92, 0x3f, 0x69, 0x72, 0x75, 0x76, 0x90, 0x3f, - 0x3f, 0x92, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0x22, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0x22, 0x22, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0x82, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x80, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0xc0, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0x93, 0x3f, 0x2f, 0x5c, 0x2a, - 0x80, 0x82, 0x83, 0x3f, 0x3f, 0x3f, 0x91, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x96, 0x96, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x97, 0x98, 0x3f, 0x3f, 0x3c, 0x3e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x81, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x85, 0x85, 0x86, 0x86, 0x2d, 0x2d, 0xdb, 0xdb, - 0x2d, 0x2d, 0xdb, 0xdb, 0x8d, 0x8d, 0x8d, 0x8d, - 0x8c, 0x8c, 0x8c, 0x8c, 0x8e, 0x8e, 0x8e, 0x8e, - 0x8f, 0x8f, 0x8f, 0x8f, 0x8a, 0x8a, 0x8a, 0x8a, - 0x8a, 0x8a, 0x8a, 0x8a, 0x88, 0x88, 0x88, 0x88, - 0x88, 0x88, 0x88, 0x88, 0x89, 0x89, 0x89, 0x89, - 0x89, 0x89, 0x89, 0x89, 0x8b, 0x8b, 0x8b, 0x8b, - 0x8b, 0x8b, 0x8b, 0x8b, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x2d, 0x2d, 0xdb, 0xdb, - 0x3d, 0x7c, 0x2b, 0x2b, 0x2b, 0xdc, 0xdc, 0xdc, - 0x4c, 0x4c, 0x4c, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x54, 0x54, 0x54, 0x2b, - 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x84, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xfe, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0x97, 0x98, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x2d, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x3f, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xf0, 0x3f, 0x3f, - 0xc1, 0xc2, 0xa2, 0xc3, 0xa5, 0xc4, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xc6, 0x3f, 0xc7, 0xa8, 0xa9, - 0x3f, 0xc8, 0x3f, 0xc9, 0x3f, 0xaa, 0x3f, 0xca, - 0x3f, 0xab, 0x3f, 0xcb, 0x3f, 0xad, 0x3f, 0xcc, - 0x3f, 0xae, 0x3f, 0xcd, 0x3f, 0xaf, 0x3f, 0xce, - 0x3f, 0xcf, 0x3f, 0xd0, 0x3f, 0xd1, 0x3f, 0xd2, - 0x3f, 0xbc, 0x3f, 0xd3, 0x3f, 0xbd, 0x3f, 0xd4, - 0x3f, 0xbe, 0x3f, 0xd5, 0x3f, 0xeb, 0x3f, 0xd6, - 0x3f, 0xd7, 0x3f, 0x3f, 0x3f, 0xd8, 0x3f, 0x3f, - 0x3f, 0xdf, 0xc5, 0xd9, 0xec, 0xee, 0xed, 0xda, - 0xf7, 0xba, 0x3f, 0xe1, 0x3f, 0xf8, 0x3f, 0xe2, - 0x3f, 0xfc, 0x3f, 0xe3, 0x3f, 0xfb, 0x3f, 0xe4, - 0x3f, 0xef, 0x3f, 0xe5, 0x3f, 0xf2, 0x3f, 0xe6, - 0x3f, 0xf3, 0x3f, 0xe7, 0xf4, 0xe8, 0x3f, 0xe9, - 0xf5, 0xfd, 0xf6, 0xea, 0x3f, 0xf9, 0xfa, 0x99, - 0x9a, 0x3f, 0x3f, 0x9d, 0x9e, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 0x21, 0x22, 0x23, 0x24, 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc0, 0xa3, 0xdc, 0x2d, 0xdb, 0x59, 0x3f, 0x3f, - 0x86, 0x3c, 0x5e, 0x3e, 0x76, 0xfe, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1300, 0x1300, 0x0400, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0500, 0x0600, 0x0700, - 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x0e00, 0x1300, 0x1300, 0x1300, - 0x0f00, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1000, 0x1300, 0x1300, 0x1100, 0x1200 -}; - -const struct sbcs_table cptable_864 = -{ - { 864, 1, 0x003f, 0x003f, "OEM Arabic" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_865.c b/reactos/tools/unicode/c_865.c deleted file mode 100644 index 6f738669525..00000000000 --- a/reactos/tools/unicode/c_865.c +++ /dev/null @@ -1,750 +0,0 @@ -/* code page 865 (OEM Nordic) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP865.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[512] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x00e0, 0x00e5, 0x00e7, - 0x00ea, 0x00eb, 0x00e8, 0x00ef, 0x00ee, 0x00ec, 0x00c4, 0x00c5, - 0x00c9, 0x00e6, 0x00c6, 0x00f4, 0x00f6, 0x00f2, 0x00fb, 0x00f9, - 0x00ff, 0x00d6, 0x00dc, 0x00f8, 0x00a3, 0x00d8, 0x20a7, 0x0192, - 0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x00f1, 0x00d1, 0x00aa, 0x00ba, - 0x00bf, 0x2310, 0x00ac, 0x00bd, 0x00bc, 0x00a1, 0x00ab, 0x00a4, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, - 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, - 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, - 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0x03b1, 0x00df, 0x0393, 0x03c0, 0x03a3, 0x03c3, 0x00b5, 0x03c4, - 0x03a6, 0x0398, 0x03a9, 0x03b4, 0x221e, 0x03c6, 0x03b5, 0x2229, - 0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248, - 0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x25a0, 0x00a0, - /* glyphs */ - 0x0000, 0x263a, 0x263b, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, - 0x25d8, 0x25cb, 0x25d9, 0x2642, 0x2640, 0x266a, 0x266b, 0x263c, - 0x25ba, 0x25c4, 0x2195, 0x203c, 0x00b6, 0x00a7, 0x25ac, 0x21a8, - 0x2191, 0x2193, 0x2192, 0x2190, 0x221f, 0x2194, 0x25b2, 0x25bc, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x2302, - 0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x00e0, 0x00e5, 0x00e7, - 0x00ea, 0x00eb, 0x00e8, 0x00ef, 0x00ee, 0x00ec, 0x00c4, 0x00c5, - 0x00c9, 0x00e6, 0x00c6, 0x00f4, 0x00f6, 0x00f2, 0x00fb, 0x00f9, - 0x00ff, 0x00d6, 0x00dc, 0x00f8, 0x00a3, 0x00d8, 0x20a7, 0x0192, - 0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x00f1, 0x00d1, 0x00aa, 0x00ba, - 0x00bf, 0x2310, 0x00ac, 0x00bd, 0x00bc, 0x00a1, 0x00ab, 0x00a4, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, - 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, - 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, - 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0x03b1, 0x00df, 0x0393, 0x03c0, 0x03a3, 0x03c3, 0x00b5, 0x03c4, - 0x03a6, 0x0398, 0x03a9, 0x03b4, 0x221e, 0x03c6, 0x03b5, 0x2229, - 0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248, - 0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x25a0, 0x00a0 -}; - -static const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xff, 0xad, 0x63, 0x9c, 0xaf, 0x59, 0x7c, 0x3f, - 0x22, 0x63, 0xa6, 0xae, 0xaa, 0x2d, 0x72, 0x2d, - 0xf8, 0xf1, 0xfd, 0x33, 0x27, 0xe6, 0x3f, 0xfa, - 0x2c, 0x31, 0xa7, 0x3e, 0xac, 0xab, 0x3f, 0xa8, - 0x41, 0x41, 0x41, 0x41, 0x8e, 0x8f, 0x92, 0x80, - 0x45, 0x90, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, - 0x44, 0xa5, 0x4f, 0x4f, 0x4f, 0x4f, 0x99, 0x78, - 0x9d, 0x55, 0x55, 0x55, 0x9a, 0x59, 0x3f, 0xe1, - 0x85, 0xa0, 0x83, 0x61, 0x84, 0x86, 0x91, 0x87, - 0x8a, 0x82, 0x88, 0x89, 0x8d, 0xa1, 0x8c, 0x8b, - 0x64, 0xa4, 0x95, 0xa2, 0x93, 0x6f, 0x94, 0xf6, - 0x9b, 0x97, 0xa3, 0x96, 0x81, 0x79, 0x3f, 0x98, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x9f, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb3, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x9a, 0x81, 0x9a, - 0x81, 0x9a, 0x81, 0x9a, 0x81, 0x3f, 0x8e, 0x84, - 0x41, 0x61, 0x92, 0x91, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x8f, 0x86, 0x92, 0x91, 0x9d, 0x9b, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x99, 0x94, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0x2d, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xf8, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0x2d, 0x2d, 0x3f, 0x3f, - 0x22, 0x3f, 0xf8, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0x22, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x22, 0x41, 0xfa, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0xea, - 0x3f, 0x41, 0x42, 0xe2, 0x3f, 0x45, 0x5a, 0x48, - 0xe9, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0xe4, 0x54, 0x59, 0xe8, 0x58, - 0x3f, 0xea, 0x49, 0x59, 0xe0, 0xee, 0x3f, 0x3f, - 0x3f, 0xe0, 0xe1, 0x3f, 0xeb, 0xee, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xe6, 0x3f, 0x3f, 0x3f, - 0xe3, 0x3f, 0x3f, 0xe5, 0xe7, 0x3f, 0xed, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe1, 0x3f, 0x59, 0x59, 0x59, 0xed, 0xe3, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xe9, 0xee, 0x3f, 0x3f, - 0x3f, 0xe4, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x92, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xe1, 0x3f, 0xeb, - 0xed, 0x3f, 0x69, 0x72, 0x75, 0x76, 0xe1, 0x3f, - 0x3f, 0xed, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x80, 0x87, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x8b, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x83, 0x41, 0x83, - 0x41, 0x83, 0x41, 0x83, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x88, - 0x45, 0x88, 0x45, 0x88, 0x45, 0x88, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x93, 0x4f, 0x93, 0x4f, 0x93, 0x4f, 0x93, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, - 0xe0, 0xe0, 0xee, 0xee, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, - 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0x3f, 0xe0, 0xe0, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0x22, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0x22, 0x22, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0xea, 0xea, 0xea, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0xf9, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf8, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0xfc, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x63, 0x3f, 0x3f, 0x9c, 0x3f, 0x3f, 0x9e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0xea, 0x3f, - 0x5a, 0x3f, 0x4b, 0x8f, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0xe3, 0x3f, 0xe2, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x9d, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0xf1, 0x3f, 0x2f, 0x5c, 0x2a, - 0xf8, 0xf9, 0xfb, 0x3f, 0x3f, 0x3f, 0xec, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0xef, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf7, 0xf7, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0xf0, 0xf0, 0xf0, 0xf3, 0xf2, 0x3f, 0x3f, - 0x3f, 0x3f, 0xae, 0x3e, 0x3f, 0x3f, 0x3c, 0x3e, - 0xf3, 0xf2, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xfa, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf4, 0xf5, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0xc4, 0xc4, 0xb3, 0xb3, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0xda, 0xda, 0xda, 0xda, - 0xbf, 0xbf, 0xbf, 0xbf, 0xc0, 0xc0, 0xc0, 0xc0, - 0xd9, 0xd9, 0xd9, 0xd9, 0xc3, 0xc3, 0xc3, 0xc3, - 0xc3, 0xc3, 0xc3, 0xc3, 0xb4, 0xb4, 0xb4, 0xb4, - 0xb4, 0xb4, 0xb4, 0xb4, 0xc2, 0xc2, 0xc2, 0xc2, - 0xc2, 0xc2, 0xc2, 0xc2, 0xc1, 0xc1, 0xc1, 0xc1, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0x2d, 0x2d, 0x7c, 0x7c, - 0xcd, 0xba, 0xd5, 0xd6, 0xc9, 0xb8, 0xb7, 0xbb, - 0xd4, 0xd3, 0xc8, 0xbe, 0xbd, 0xbc, 0xc6, 0xc7, - 0xcc, 0xb5, 0xb6, 0xb9, 0xd1, 0xd2, 0xcb, 0xcf, - 0xd0, 0xca, 0xd8, 0xd7, 0xce, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0xdf, 0x3f, 0x3f, 0x3f, 0xdc, 0x3f, 0x3f, 0x3f, - 0xdb, 0x3f, 0x3f, 0x3f, 0xdd, 0x3f, 0x3f, 0x3f, - 0xde, 0xb0, 0xb1, 0xb2, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xfe, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xae, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x2d, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x63, 0x9c, 0xaa, 0x2d, 0x7c, 0x59, 0x3f, 0x3f, - 0xb3, 0x3c, 0x5e, 0x3e, 0x76, 0xfe, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_865 = -{ - { 865, 1, 0x003f, 0x003f, "OEM Nordic" }, - cp2uni, - cp2uni + 256, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_866.c b/reactos/tools/unicode/c_866.c deleted file mode 100644 index 1493a19a9ee..00000000000 --- a/reactos/tools/unicode/c_866.c +++ /dev/null @@ -1,783 +0,0 @@ -/* code page 866 (OEM Russian) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP866.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[512] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 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, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, - 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, - 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, - 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, - 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f, - 0x0401, 0x0451, 0x0404, 0x0454, 0x0407, 0x0457, 0x040e, 0x045e, - 0x00b0, 0x2219, 0x00b7, 0x221a, 0x2116, 0x00a4, 0x25a0, 0x00a0, - /* glyphs */ - 0x0000, 0x263a, 0x263b, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, - 0x25d8, 0x25cb, 0x25d9, 0x2642, 0x2640, 0x266a, 0x266b, 0x263c, - 0x25ba, 0x25c4, 0x2195, 0x203c, 0x00b6, 0x00a7, 0x25ac, 0x21a8, - 0x2191, 0x2193, 0x2192, 0x2190, 0x221f, 0x2194, 0x25b2, 0x25bc, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x2302, - 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, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, - 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, - 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, - 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, - 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, - 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f, - 0x0401, 0x0451, 0x0404, 0x0454, 0x0407, 0x0457, 0x040e, 0x045e, - 0x00b0, 0x2219, 0x00b7, 0x221a, 0x2116, 0x00a4, 0x25a0, 0x00a0 -}; - -static const unsigned char uni2cp_low[5120] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xff, 0x21, 0x63, 0x4c, 0xfd, 0x59, 0x7c, 0x3f, - 0x22, 0x63, 0x61, 0x3c, 0x3f, 0x2d, 0x72, 0x2d, - 0xf8, 0x3f, 0x32, 0x33, 0x27, 0x75, 0x3f, 0xfa, - 0x2c, 0x31, 0x6f, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, - 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, - 0x44, 0x4e, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x78, - 0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0x3f, 0x3f, - 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x63, - 0x65, 0x65, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69, - 0x64, 0x6e, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x3f, - 0x6f, 0x75, 0x75, 0x75, 0x75, 0x79, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb3, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55, - 0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0x2d, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xf8, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0x2d, 0x2d, 0x3f, 0x3f, - 0x22, 0x3f, 0xf8, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0x22, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x22, 0x41, 0xfa, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x75, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0400 .. 0x04ff */ - 0x85, 0xf0, 0x3f, 0x83, 0xf2, 0x3f, 0x3f, 0xf4, - 0x3f, 0x3f, 0x3f, 0x3f, 0x8a, 0x88, 0xf6, 0x3f, - 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, 0xac, 0xad, 0xae, 0xaf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xa5, 0xf1, 0x3f, 0xa3, 0xf3, 0x3f, 0x3f, 0xf5, - 0x3f, 0x3f, 0x3f, 0x3f, 0xaa, 0xa8, 0xf7, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x86, 0xa6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x80, 0xa0, 0x80, 0xa0, 0x3f, 0x3f, 0x85, 0xa5, - 0x3f, 0x3f, 0x3f, 0x3f, 0x86, 0xa6, 0x87, 0xa7, - 0x3f, 0x3f, 0x88, 0xa8, 0x88, 0xa8, 0x8e, 0xae, - 0x3f, 0x3f, 0x3f, 0x3f, 0x9d, 0xed, 0x93, 0xe3, - 0x93, 0xe3, 0x93, 0xe3, 0x97, 0xe7, 0x3f, 0x3f, - 0x9b, 0xeb, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xad, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0x22, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0x22, 0x22, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0xf9, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf8, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x63, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0xfc, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x2f, 0x5c, 0x2a, - 0xf8, 0xf9, 0xfb, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3c, 0x3e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xfa, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0xc4, 0xc4, 0xb3, 0xb3, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0xda, 0xda, 0xda, 0xda, - 0xbf, 0xbf, 0xbf, 0xbf, 0xc0, 0xc0, 0xc0, 0xc0, - 0xd9, 0xd9, 0xd9, 0xd9, 0xc3, 0xc3, 0xc3, 0xc3, - 0xc3, 0xc3, 0xc3, 0xc3, 0xb4, 0xb4, 0xb4, 0xb4, - 0xb4, 0xb4, 0xb4, 0xb4, 0xc2, 0xc2, 0xc2, 0xc2, - 0xc2, 0xc2, 0xc2, 0xc2, 0xc1, 0xc1, 0xc1, 0xc1, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0x2d, 0x2d, 0x7c, 0x7c, - 0xcd, 0xba, 0xd5, 0xd6, 0xc9, 0xb8, 0xb7, 0xbb, - 0xd4, 0xd3, 0xc8, 0xbe, 0xbd, 0xbc, 0xc6, 0xc7, - 0xcc, 0xb5, 0xb6, 0xb9, 0xd1, 0xd2, 0xcb, 0xcf, - 0xd0, 0xca, 0xd8, 0xd7, 0xce, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0xdf, 0x3f, 0x3f, 0x3f, 0xdc, 0x3f, 0x3f, 0x3f, - 0xdb, 0x3f, 0x3f, 0x3f, 0xdd, 0x3f, 0x3f, 0x3f, - 0xde, 0xb0, 0xb1, 0xb2, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xfe, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x2d, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x63, 0x4c, 0x3f, 0x2d, 0x7c, 0x59, 0x3f, 0x3f, - 0xb3, 0x3c, 0x5e, 0x3e, 0x76, 0xfe, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0500, 0x0600, 0x0700, - 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x0e00, 0x1300, 0x1300, 0x1300, - 0x0f00, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1000, 0x1300, 0x1300, 0x1100, 0x1200 -}; - -const struct sbcs_table cptable_866 = -{ - { 866, 1, 0x003f, 0x003f, "OEM Russian" }, - cp2uni, - cp2uni + 256, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_869.c b/reactos/tools/unicode/c_869.c deleted file mode 100644 index f6920b97826..00000000000 --- a/reactos/tools/unicode/c_869.c +++ /dev/null @@ -1,750 +0,0 @@ -/* code page 869 (OEM Greek) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP869.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[512] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0386, 0x0087, - 0x00b7, 0x00ac, 0x00a6, 0x2018, 0x2019, 0x0388, 0x2015, 0x0389, - 0x038a, 0x03aa, 0x038c, 0x0093, 0x0094, 0x038e, 0x03ab, 0x00a9, - 0x038f, 0x00b2, 0x00b3, 0x03ac, 0x00a3, 0x03ad, 0x03ae, 0x03af, - 0x03ca, 0x0390, 0x03cc, 0x03cd, 0x0391, 0x0392, 0x0393, 0x0394, - 0x0395, 0x0396, 0x0397, 0x00bd, 0x0398, 0x0399, 0x00ab, 0x00bb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x039a, 0x039b, 0x039c, - 0x039d, 0x2563, 0x2551, 0x2557, 0x255d, 0x039e, 0x039f, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x03a0, 0x03a1, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x03a3, - 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9, 0x03b1, 0x03b2, - 0x03b3, 0x2518, 0x250c, 0x2588, 0x2584, 0x03b4, 0x03b5, 0x2580, - 0x03b6, 0x03b7, 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, - 0x03be, 0x03bf, 0x03c0, 0x03c1, 0x03c3, 0x03c2, 0x03c4, 0x0384, - 0x00ad, 0x00b1, 0x03c5, 0x03c6, 0x03c7, 0x00a7, 0x03c8, 0x0385, - 0x00b0, 0x00a8, 0x03c9, 0x03cb, 0x03b0, 0x03ce, 0x25a0, 0x00a0, - /* glyphs */ - 0x0000, 0x263a, 0x263b, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, - 0x25d8, 0x25cb, 0x25d9, 0x2642, 0x2640, 0x266a, 0x266b, 0x263c, - 0x25ba, 0x25c4, 0x2195, 0x203c, 0x00b6, 0x00a7, 0x25ac, 0x21a8, - 0x2191, 0x2193, 0x2192, 0x2190, 0x221f, 0x2194, 0x25b2, 0x25bc, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x2302, - 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0386, 0x0087, - 0x00b7, 0x00ac, 0x00a6, 0x2018, 0x2019, 0x0388, 0x2015, 0x0389, - 0x038a, 0x03aa, 0x038c, 0x0093, 0x0094, 0x038e, 0x03ab, 0x00a9, - 0x038f, 0x00b2, 0x00b3, 0x03ac, 0x00a3, 0x03ad, 0x03ae, 0x03af, - 0x03ca, 0x0390, 0x03cc, 0x03cd, 0x0391, 0x0392, 0x0393, 0x0394, - 0x0395, 0x0396, 0x0397, 0x00bd, 0x0398, 0x0399, 0x00ab, 0x00bb, - 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x039a, 0x039b, 0x039c, - 0x039d, 0x2563, 0x2551, 0x2557, 0x255d, 0x039e, 0x039f, 0x2510, - 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x03a0, 0x03a1, - 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x03a3, - 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9, 0x03b1, 0x03b2, - 0x03b3, 0x2518, 0x250c, 0x2588, 0x2584, 0x03b4, 0x03b5, 0x2580, - 0x03b6, 0x03b7, 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, - 0x03be, 0x03bf, 0x03c0, 0x03c1, 0x03c3, 0x03c2, 0x03c4, 0x0384, - 0x00ad, 0x00b1, 0x03c5, 0x03c6, 0x03c7, 0x00a7, 0x03c8, 0x0385, - 0x00b0, 0x00a8, 0x03c9, 0x03cb, 0x03b0, 0x03ce, 0x25a0, 0x00a0 -}; - -static const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x3f, 0x87, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x93, 0x94, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xff, 0x21, 0x63, 0x9c, 0x3f, 0x59, 0x8a, 0xf5, - 0xf9, 0x97, 0x61, 0xae, 0x89, 0xf0, 0x72, 0x8e, - 0xf8, 0xf1, 0x99, 0x9a, 0x27, 0xe6, 0x3f, 0x88, - 0x2c, 0x31, 0x6f, 0xaf, 0x3f, 0xab, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, - 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, - 0x44, 0x4e, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x78, - 0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0x3f, 0xd7, - 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x63, - 0x65, 0x65, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69, - 0x64, 0x6e, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x3f, - 0x6f, 0x75, 0x75, 0x75, 0x75, 0x79, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xb3, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55, - 0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0x8b, 0x8c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0x8e, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xf8, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0x8e, 0x8e, 0x3f, 0x3f, - 0xf9, 0x3f, 0xf8, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0xf9, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xef, 0xf7, 0x86, 0x88, - 0x8d, 0x8f, 0x90, 0x3f, 0x92, 0x3f, 0x95, 0x98, - 0xa1, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, - 0xac, 0xad, 0xb5, 0xb6, 0xb7, 0xb8, 0xbd, 0xbe, - 0xc6, 0xc7, 0x3f, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, - 0xd4, 0xd5, 0x91, 0x96, 0x9b, 0x9d, 0x9e, 0x9f, - 0xfc, 0xd6, 0xd7, 0xd8, 0xdd, 0xde, 0xe0, 0xe1, - 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, - 0xea, 0xeb, 0xed, 0xec, 0xee, 0xf2, 0xf3, 0xf4, - 0xf6, 0xfa, 0xa0, 0xfb, 0xa2, 0xa3, 0xfd, 0x3f, - 0xd7, 0xe2, 0xd1, 0xd1, 0xd1, 0xf3, 0xea, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe4, 0xeb, 0xed, 0x3f, 0xac, 0xde, 0x3f, 0x3f, - 0x3f, 0xcf, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0xd7, 0xd8, 0xdd, - 0xf3, 0xf4, 0x69, 0x72, 0x75, 0x76, 0xd7, 0xd8, - 0xeb, 0xf3, 0xf4, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0xe2, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, - 0xa4, 0xa4, 0xa4, 0xa4, 0xa4, 0xa4, 0xa4, 0xa4, - 0xde, 0xde, 0xde, 0xde, 0xde, 0xde, 0x3f, 0x3f, - 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0x3f, 0x3f, - 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xe3, 0xe3, 0xe3, 0xe3, 0xe3, 0xe3, 0xe3, 0xe3, - 0xad, 0xad, 0xad, 0xad, 0xad, 0xad, 0xad, 0xad, - 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0xe9, 0x3f, 0x3f, - 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0x3f, 0x3f, - 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, - 0x3f, 0xd1, 0x3f, 0xd1, 0x3f, 0xd1, 0x3f, 0xd1, - 0xfa, 0xfa, 0xfa, 0xfa, 0xfa, 0xfa, 0xfa, 0xfa, - 0xd5, 0xd5, 0xd5, 0xd5, 0xd5, 0xd5, 0xd5, 0xd5, - 0xd6, 0x9b, 0xde, 0x9d, 0xe1, 0x9e, 0xe3, 0x9f, - 0xe9, 0xa2, 0xf2, 0xa3, 0xfa, 0xfd, 0x3f, 0x3f, - 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, - 0xa4, 0xa4, 0xa4, 0xa4, 0xa4, 0xa4, 0xa4, 0xa4, - 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, 0xe1, - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - 0xfa, 0xfa, 0xfa, 0xfa, 0xfa, 0xfa, 0xfa, 0xfa, - 0xd5, 0xd5, 0xd5, 0xd5, 0xd5, 0xd5, 0xd5, 0xd5, - 0xd6, 0xd6, 0xd6, 0xd6, 0x9b, 0x3f, 0xd6, 0xd6, - 0xa4, 0xa4, 0xa4, 0x86, 0xa4, 0x3f, 0xe3, 0x3f, - 0x3f, 0xf9, 0xe1, 0xe1, 0x9e, 0x3f, 0xe1, 0xe1, - 0xa8, 0x8d, 0xaa, 0x8f, 0xaa, 0x3f, 0x3f, 0x3f, - 0xe3, 0xe3, 0xa0, 0xa1, 0x3f, 0x3f, 0xe3, 0xa0, - 0xad, 0xad, 0xad, 0x90, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf2, 0xf2, 0xfb, 0xfc, 0xeb, 0xeb, 0xf2, 0xfb, - 0xd1, 0xd1, 0xd1, 0x95, 0xc7, 0xf9, 0xf7, 0x60, - 0x3f, 0x3f, 0xfa, 0xfa, 0xfd, 0x3f, 0xfa, 0xfa, - 0xbe, 0x92, 0xd5, 0x98, 0xd5, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x8e, 0x8e, 0x8e, 0x3f, 0x5f, - 0x8b, 0x8c, 0x2c, 0x8b, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0x8b, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0x8e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf8, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x63, 0x3f, 0x3f, 0x9c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0xd5, 0x3f, - 0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0xea, 0xd8, 0xa6, 0xc6, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0xf1, 0x3f, 0x2f, 0x5c, 0x2a, - 0xf8, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xae, 0xaf, 0x3f, 0x3f, 0x3c, 0x3e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x88, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0xc4, 0xc4, 0xb3, 0xb3, 0x2d, 0x2d, 0x8a, 0x8a, - 0x2d, 0x2d, 0x8a, 0x8a, 0xda, 0xda, 0xda, 0xda, - 0xbf, 0xbf, 0xbf, 0xbf, 0xc0, 0xc0, 0xc0, 0xc0, - 0xd9, 0xd9, 0xd9, 0xd9, 0xc3, 0xc3, 0xc3, 0xc3, - 0xc3, 0xc3, 0xc3, 0xc3, 0xb4, 0xb4, 0xb4, 0xb4, - 0xb4, 0xb4, 0xb4, 0xb4, 0xc2, 0xc2, 0xc2, 0xc2, - 0xc2, 0xc2, 0xc2, 0xc2, 0xc1, 0xc1, 0xc1, 0xc1, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, - 0xc5, 0xc5, 0xc5, 0xc5, 0x2d, 0x2d, 0x8a, 0x8a, - 0xcd, 0xba, 0xc9, 0xc9, 0xc9, 0xbb, 0xbb, 0xbb, - 0xc8, 0xc8, 0xc8, 0xbc, 0xbc, 0xbc, 0xcc, 0xcc, - 0xcc, 0xb9, 0xb9, 0xb9, 0xcb, 0xcb, 0xcb, 0xca, - 0xca, 0xca, 0xce, 0xce, 0xce, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0xdf, 0x3f, 0x3f, 0x3f, 0xdc, 0x3f, 0x3f, 0x3f, - 0xdb, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xb0, 0xb1, 0xb2, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xfe, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0xae, 0xaf, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x8e, 0x8e, 0x8e, 0x8e, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x8e, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x63, 0x9c, 0x89, 0x8e, 0x8a, 0x59, 0x3f, 0x3f, - 0xb3, 0x3c, 0x5e, 0x3e, 0x76, 0xfe, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_869 = -{ - { 869, 1, 0x003f, 0x003f, "OEM Greek" }, - cp2uni, - cp2uni + 256, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_874.c b/reactos/tools/unicode/c_874.c deleted file mode 100644 index bbff028da8e..00000000000 --- a/reactos/tools/unicode/c_874.c +++ /dev/null @@ -1,486 +0,0 @@ -/* code page 874 (ANSI/OEM Thai) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit874.txt */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[512] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x20ac, 0x0081, 0x0082, 0x0083, 0x0084, 0x2026, 0x0086, 0x0087, - 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, - 0x0090, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, - 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, 0xf8c1, 0xf8c2, 0xf8c3, 0xf8c4, 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, 0xf8c5, 0xf8c6, 0xf8c7, 0xf8c8, - /* glyphs */ - 0x0000, 0x263a, 0x263b, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, - 0x25d8, 0x25cb, 0x25d9, 0x2642, 0x2640, 0x266a, 0x266b, 0x263c, - 0x25ba, 0x25c4, 0x2195, 0x203c, 0x00b6, 0x00a7, 0x25ac, 0x21a8, - 0x2191, 0x2193, 0x2192, 0x2190, 0x221f, 0x2194, 0x25b2, 0x25bc, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x2302, - 0x20ac, 0x0081, 0x0082, 0x0083, 0x0084, 0x2026, 0x0086, 0x0087, - 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, - 0x0090, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, - 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, 0xf8c1, 0xf8c2, 0xf8c3, 0xf8c4, 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, 0xf8c5, 0xf8c6, 0xf8c7, 0xf8c8 -}; - -static const unsigned char uni2cp_low[2816] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x81, 0x82, 0x83, 0x84, 0x3f, 0x86, 0x87, - 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, - 0x90, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, - 0xa0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x15, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x14, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0e00 .. 0x0eff */ - 0x3f, 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, 0x3f, 0x3f, 0x3f, 0x3f, 0xdf, - 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, - 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0xfa, 0xfb, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x96, 0x97, 0x3f, 0x3f, 0x3f, - 0x91, 0x92, 0x3f, 0x3f, 0x93, 0x94, 0x3f, 0x3f, - 0x3f, 0x3f, 0x95, 0x3f, 0x3f, 0x3f, 0x85, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x13, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x80, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x1b, 0x18, 0x1a, 0x19, 0x1d, 0x12, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x17, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x1c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x7f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0xc4, 0x3f, 0xb3, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xda, 0x3f, 0x3f, 0x3f, - 0xbf, 0x3f, 0x3f, 0x3f, 0xc0, 0x3f, 0x3f, 0x3f, - 0xd9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xcd, 0xba, 0x3f, 0x3f, 0xc9, 0x3f, 0x3f, 0xbb, - 0x3f, 0x3f, 0xc8, 0x3f, 0x3f, 0xbc, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xdc, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x16, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x1e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x10, 0x3f, 0x1f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x11, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x09, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x08, 0x0a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2600 .. 0x26ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x01, 0x02, 0x0f, 0x3f, 0x3f, 0x3f, - 0x0c, 0x3f, 0x0b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x06, 0x3f, 0x3f, 0x05, 0x3f, 0x03, 0x04, 0x3f, - 0x3f, 0x3f, 0x0d, 0x0e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xf800 .. 0xf8ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xdb, 0xdc, 0xdd, 0xde, 0xfc, 0xfd, 0xfe, - 0xff, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0100, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0200, 0x0300, 0x0400, 0x0500, 0x0a00, 0x0600, 0x0700, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, - 0x0800, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0900 -}; - -const struct sbcs_table cptable_874 = -{ - { 874, 1, 0x003f, 0x003f, "ANSI/OEM Thai" }, - cp2uni, - cp2uni + 256, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_875.c b/reactos/tools/unicode/c_875.c deleted file mode 100644 index 6fcfe88a25c..00000000000 --- a/reactos/tools/unicode/c_875.c +++ /dev/null @@ -1,717 +0,0 @@ -/* code page 875 (IBM EBCDIC Greek) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/EBCDIC/CP875.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x009c, 0x0009, 0x0086, 0x007f, - 0x0097, 0x008d, 0x008e, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x009d, 0x0085, 0x0008, 0x0087, - 0x0018, 0x0019, 0x0092, 0x008f, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x000a, 0x0017, 0x001b, - 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x0005, 0x0006, 0x0007, - 0x0090, 0x0091, 0x0016, 0x0093, 0x0094, 0x0095, 0x0096, 0x0004, - 0x0098, 0x0099, 0x009a, 0x009b, 0x0014, 0x0015, 0x009e, 0x001a, - 0x0020, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, - 0x0398, 0x0399, 0x005b, 0x002e, 0x003c, 0x0028, 0x002b, 0x0021, - 0x0026, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, 0x03a0, - 0x03a1, 0x03a3, 0x005d, 0x0024, 0x002a, 0x0029, 0x003b, 0x005e, - 0x002d, 0x002f, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9, - 0x03aa, 0x03ab, 0x007c, 0x002c, 0x0025, 0x005f, 0x003e, 0x003f, - 0x00a8, 0x0386, 0x0388, 0x0389, 0x00a0, 0x038a, 0x038c, 0x038e, - 0x038f, 0x0060, 0x003a, 0x0023, 0x0040, 0x0027, 0x003d, 0x0022, - 0x0385, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, - 0x00b0, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, 0x0070, - 0x0071, 0x0072, 0x03b7, 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, - 0x00b4, 0x007e, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, - 0x0079, 0x007a, 0x03bd, 0x03be, 0x03bf, 0x03c0, 0x03c1, 0x03c3, - 0x00a3, 0x03ac, 0x03ad, 0x03ae, 0x03ca, 0x03af, 0x03cc, 0x03cd, - 0x03cb, 0x03ce, 0x03c2, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, - 0x007b, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x00ad, 0x03c9, 0x0390, 0x03b0, 0x2018, 0x2015, - 0x007d, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, 0x0050, - 0x0051, 0x0052, 0x00b1, 0x00bd, 0x001a, 0x0387, 0x2019, 0x00a6, - 0x005c, 0x001a, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, - 0x0059, 0x005a, 0x00b2, 0x00a7, 0x001a, 0x001a, 0x00ab, 0x00ac, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x00b3, 0x00a9, 0x001a, 0x001a, 0x00bb, 0x009f -}; - -static const unsigned char uni2cp_low[4864] = -{ - /* 0x0000 .. 0x00ff */ - 0x00, 0x01, 0x02, 0x03, 0x37, 0x2d, 0x2e, 0x2f, - 0x16, 0x05, 0x25, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13, 0x3c, 0x3d, 0x32, 0x26, - 0x18, 0x19, 0x3f, 0x27, 0x1c, 0x1d, 0x1e, 0x1f, - 0x40, 0x4f, 0x7f, 0x7b, 0x5b, 0x6c, 0x50, 0x7d, - 0x4d, 0x5d, 0x5c, 0x4e, 0x6b, 0x60, 0x4b, 0x61, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0x7a, 0x5e, 0x4c, 0x7e, 0x6e, 0x6f, - 0x7c, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, - 0xd7, 0xd8, 0xd9, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, - 0xe7, 0xe8, 0xe9, 0x4a, 0xe0, 0x5a, 0x5f, 0x6d, - 0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, - 0x97, 0x98, 0x99, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, - 0xa7, 0xa8, 0xa9, 0xc0, 0x6a, 0xd0, 0xa1, 0x07, - 0x20, 0x21, 0x22, 0x23, 0x24, 0x15, 0x06, 0x17, - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x09, 0x0a, 0x1b, - 0x30, 0x31, 0x1a, 0x33, 0x34, 0x35, 0x36, 0x08, - 0x38, 0x39, 0x3a, 0x3b, 0x04, 0x14, 0x3e, 0xff, - 0x74, 0x4f, 0x83, 0xb0, 0x3f, 0xe8, 0xdf, 0xeb, - 0x70, 0xfb, 0x81, 0xee, 0xef, 0xca, 0x99, 0xcf, - 0x90, 0xda, 0xea, 0xfa, 0xa0, 0x9f, 0x3f, 0x3f, - 0x6b, 0xf1, 0x96, 0xfe, 0x3f, 0xdb, 0x3f, 0x3f, - 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc3, - 0xc5, 0xc5, 0xc5, 0xc5, 0xc9, 0xc9, 0xc9, 0xc9, - 0xc4, 0xd5, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xa7, - 0xd6, 0xe4, 0xe4, 0xe4, 0xe4, 0xe8, 0x3f, 0x8b, - 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x83, - 0x85, 0x85, 0x85, 0x85, 0x89, 0x89, 0x89, 0x89, - 0x84, 0x95, 0x96, 0x96, 0x96, 0x96, 0x96, 0x3f, - 0x96, 0xa4, 0xa4, 0xa4, 0xa4, 0xa8, 0x3f, 0xa8, - /* 0x0100 .. 0x01ff */ - 0xc1, 0x81, 0xc1, 0x81, 0xc1, 0x81, 0xc3, 0x83, - 0xc3, 0x83, 0xc3, 0x83, 0xc3, 0x83, 0xc4, 0x84, - 0xc4, 0x84, 0xc5, 0x85, 0xc5, 0x85, 0xc5, 0x85, - 0xc5, 0x85, 0xc5, 0x85, 0xc7, 0x87, 0xc7, 0x87, - 0xc7, 0x87, 0xc7, 0x87, 0xc8, 0x88, 0xc8, 0x88, - 0xc9, 0x89, 0xc9, 0x89, 0xc9, 0x89, 0xc9, 0x89, - 0xc9, 0x89, 0x3f, 0x3f, 0xd1, 0x91, 0xd2, 0x92, - 0x3f, 0xd3, 0x93, 0xd3, 0x93, 0xd3, 0x93, 0x3f, - 0x3f, 0xd3, 0x93, 0xd5, 0x95, 0xd5, 0x95, 0xd5, - 0x95, 0x3f, 0x3f, 0x3f, 0xd6, 0x96, 0xd6, 0x96, - 0xd6, 0x96, 0xd6, 0x96, 0xd9, 0x99, 0xd9, 0x99, - 0xd9, 0x99, 0xe2, 0xa2, 0xe2, 0xa2, 0xe2, 0xa2, - 0xe2, 0xa2, 0xe3, 0xa3, 0xe3, 0xa3, 0xe3, 0xa3, - 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, - 0xe4, 0xa4, 0xe4, 0xa4, 0xe6, 0xa6, 0xe8, 0xa8, - 0xe8, 0xe9, 0xa9, 0xe9, 0xa9, 0xe9, 0xa9, 0xa2, - 0x82, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xc4, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc5, 0xc6, 0x86, 0x3f, 0x3f, 0x3f, 0x3f, 0xc9, - 0x3f, 0x3f, 0x93, 0x3f, 0x3f, 0x3f, 0x3f, 0xd6, - 0xd6, 0x96, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, 0xe3, 0xe4, - 0xa4, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xa9, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xc1, 0x81, 0xc9, - 0x89, 0xd6, 0x96, 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, - 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, 0x3f, 0xc1, 0x81, - 0xc1, 0x81, 0xc1, 0x81, 0xc7, 0x87, 0xc7, 0x87, - 0xd2, 0x92, 0xd6, 0x96, 0xd6, 0x96, 0x3f, 0x3f, - 0x91, 0x3f, 0x3f, 0x3f, 0xc7, 0x87, 0x3f, 0x3f, - 0xd5, 0x95, 0xc1, 0x81, 0xc1, 0x81, 0xd6, 0x96, - /* 0x0200 .. 0x02ff */ - 0xc1, 0x81, 0xc1, 0x81, 0xc5, 0x85, 0xc5, 0x85, - 0xc9, 0x89, 0xc9, 0x89, 0xd6, 0x96, 0xd6, 0x96, - 0xd9, 0x99, 0xd9, 0x99, 0xe4, 0xa4, 0xe4, 0xa4, - 0xe2, 0xa2, 0xe3, 0xa3, 0x3f, 0x3f, 0xc8, 0x88, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xc1, 0x81, - 0xc5, 0x85, 0xd6, 0x96, 0xd6, 0x96, 0xd6, 0x96, - 0xd6, 0x96, 0xe8, 0xa8, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x87, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x88, 0x3f, 0x91, 0x99, 0x3f, 0x3f, 0x3f, 0xa6, - 0xa8, 0xa0, 0x7f, 0xce, 0xde, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5f, 0x3f, 0x5f, 0xa5, - 0x7d, 0xcf, 0xa0, 0x79, 0x3f, 0x6d, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x90, 0x3f, 0xa1, 0x7f, 0x3f, 0x3f, - 0x3f, 0x93, 0xa2, 0xa7, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x79, 0xa0, 0x5f, 0xa1, 0xcf, 0xcf, 0x3f, 0x3f, - 0x70, 0x3f, 0x90, 0x7f, 0xa5, 0x3f, 0x7f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x6b, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6d, 0x6d, 0x6d, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x79, 0xa0, 0x3f, 0x3f, 0x70, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xa0, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xa0, 0x80, 0x71, 0xdd, - 0x72, 0x73, 0x75, 0x3f, 0x76, 0x3f, 0x77, 0x78, - 0xcc, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, - 0x48, 0x49, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, - 0x57, 0x58, 0x3f, 0x59, 0x62, 0x63, 0x64, 0x65, - 0x66, 0x67, 0x68, 0x69, 0xb1, 0xb2, 0xb3, 0xb5, - 0xcd, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x9a, - 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xaa, 0xab, 0xac, - 0xad, 0xae, 0xba, 0xaf, 0xbb, 0xbc, 0xbd, 0xbe, - 0xbf, 0xcb, 0xb4, 0xb8, 0xb6, 0xb7, 0xb9, 0x3f, - 0x8b, 0x9b, 0x63, 0x63, 0x63, 0xbd, 0xad, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x9d, 0xae, 0xba, 0x3f, 0x48, 0x8e, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xc1, 0xc1, 0xc2, 0x3f, - 0xc4, 0xc5, 0x3f, 0xc7, 0xc8, 0xc9, 0xd1, 0xd2, - 0xd3, 0xd4, 0xd5, 0x3f, 0xd6, 0x3f, 0xd7, 0xd9, - 0xe3, 0xe4, 0xe6, 0x81, 0x3f, 0x3f, 0x3f, 0x82, - 0x84, 0x85, 0x3f, 0x3f, 0x3f, 0x87, 0x3f, 0x92, - 0x94, 0x3f, 0x96, 0x3f, 0x3f, 0x3f, 0x97, 0xa3, - 0xa4, 0x3f, 0x3f, 0xa5, 0x3f, 0x8b, 0x8c, 0x8d, - 0xbd, 0xbe, 0x89, 0x99, 0xa4, 0xa5, 0x8b, 0x8c, - 0xae, 0xbd, 0xbe, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x83, 0x3f, 0x84, 0x3f, - 0x86, 0x3f, 0x87, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xa3, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xa9, 0x3f, 0x3f, 0x3f, 0x9b, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0xc1, 0x81, 0xc2, 0x82, 0xc2, 0x82, 0xc2, 0x82, - 0xc3, 0x83, 0xc4, 0x84, 0xc4, 0x84, 0xc4, 0x84, - 0xc4, 0x84, 0xc4, 0x84, 0xc5, 0x85, 0xc5, 0x85, - 0xc5, 0x85, 0xc5, 0x85, 0xc5, 0x85, 0xc6, 0x86, - 0xc7, 0x87, 0xc8, 0x88, 0xc8, 0x88, 0xc8, 0x88, - 0xc8, 0x88, 0xc8, 0x88, 0xc9, 0x89, 0xc9, 0x89, - 0xd2, 0x92, 0xd2, 0x92, 0xd2, 0x92, 0xd3, 0x93, - 0xd3, 0x93, 0xd3, 0x93, 0xd3, 0x93, 0xd4, 0x94, - 0xd4, 0x94, 0xd4, 0x94, 0xd5, 0x95, 0xd5, 0x95, - 0xd5, 0x95, 0xd5, 0x95, 0xd6, 0x96, 0xd6, 0x96, - 0xd6, 0x96, 0xd6, 0x96, 0xd7, 0x97, 0xd7, 0x97, - 0xd9, 0x99, 0xd9, 0x99, 0xd9, 0x99, 0xd9, 0x99, - 0xe2, 0xa2, 0xe2, 0xa2, 0xe2, 0xa2, 0xe2, 0xa2, - 0xe2, 0xa2, 0xe3, 0xa3, 0xe3, 0xa3, 0xe3, 0xa3, - 0xe3, 0xa3, 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, - 0xe4, 0xa4, 0xe4, 0xa4, 0xe5, 0xa5, 0xe5, 0xa5, - 0xe6, 0xa6, 0xe6, 0xa6, 0xe6, 0xa6, 0xe6, 0xa6, - 0xe6, 0xa6, 0xe7, 0xa7, 0xe7, 0xa7, 0xe8, 0xa8, - 0xe9, 0xa9, 0xe9, 0xa9, 0xe9, 0xa9, 0x88, 0xa3, - 0xa6, 0xa8, 0x3f, 0xa2, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc1, 0x81, 0xc1, 0x81, 0xc1, 0x81, 0xc1, 0x81, - 0xc1, 0x81, 0xc1, 0x81, 0xc1, 0x81, 0xc1, 0x81, - 0xc1, 0x81, 0xc1, 0x81, 0xc1, 0x81, 0xc1, 0x81, - 0xc5, 0x85, 0xc5, 0x85, 0xc5, 0x85, 0xc5, 0x85, - 0xc5, 0x85, 0xc5, 0x85, 0xc5, 0x85, 0xc5, 0x85, - 0xc9, 0x89, 0xc9, 0x89, 0xd6, 0x96, 0xd6, 0x96, - 0xd6, 0x96, 0xd6, 0x96, 0xd6, 0x96, 0xd6, 0x96, - 0xd6, 0x96, 0xd6, 0x96, 0xd6, 0x96, 0xd6, 0x96, - 0xd6, 0x96, 0xd6, 0x96, 0xe4, 0xa4, 0xe4, 0xa4, - 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, 0xe4, 0xa4, - 0xe4, 0xa4, 0xe8, 0xa8, 0xe8, 0xa8, 0xe8, 0xa8, - 0xe8, 0xa8, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x8a, 0x8a, 0x8a, 0x8a, 0x8a, 0x8a, 0x8a, 0x8a, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x8e, 0x8e, 0x8e, 0x8e, 0x8e, 0x8e, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x9a, 0x9a, 0x9a, 0x9a, 0x9a, 0x9a, 0x9a, 0x9a, - 0x47, 0x47, 0x47, 0x47, 0x47, 0x47, 0x47, 0x47, - 0x9c, 0x9c, 0x9c, 0x9c, 0x9c, 0x9c, 0x9c, 0x9c, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0xac, 0xac, 0xac, 0xac, 0xac, 0xac, 0x3f, 0x3f, - 0x56, 0x56, 0x56, 0x56, 0x56, 0x56, 0x3f, 0x3f, - 0xbc, 0xbc, 0xbc, 0xbc, 0xbc, 0xbc, 0xbc, 0xbc, - 0x3f, 0x63, 0x3f, 0x63, 0x3f, 0x63, 0x3f, 0x63, - 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, - 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, - 0x8a, 0xb1, 0x8e, 0xb2, 0x9a, 0xb3, 0x9c, 0xb5, - 0xac, 0xb6, 0xbc, 0xb7, 0xcb, 0xb9, 0x3f, 0x3f, - 0x8a, 0x8a, 0x8a, 0x8a, 0x8a, 0x8a, 0x8a, 0x8a, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x9a, 0x9a, 0x9a, 0x9a, 0x9a, 0x9a, 0x9a, 0x9a, - 0x47, 0x47, 0x47, 0x47, 0x47, 0x47, 0x47, 0x47, - 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, - 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, 0x67, - 0x8a, 0x8a, 0x8a, 0x8a, 0xb1, 0x3f, 0x8a, 0x8a, - 0x41, 0x41, 0x41, 0x71, 0x41, 0x3f, 0x9c, 0x3f, - 0x3f, 0x70, 0x9a, 0x9a, 0xb3, 0x3f, 0x9a, 0x9a, - 0x45, 0x72, 0x47, 0x73, 0x47, 0x3f, 0x3f, 0x3f, - 0x9c, 0x9c, 0xb4, 0xcc, 0x3f, 0x3f, 0x9c, 0xb4, - 0x49, 0x49, 0x49, 0x75, 0x3f, 0x3f, 0x3f, 0x3f, - 0xbc, 0xbc, 0xb8, 0xcd, 0xae, 0xae, 0xbc, 0xb8, - 0x63, 0x63, 0x63, 0x77, 0x58, 0x70, 0x80, 0x79, - 0x3f, 0x3f, 0xcb, 0xcb, 0xb9, 0x3f, 0xcb, 0xcb, - 0x56, 0x76, 0x67, 0x78, 0x67, 0xa0, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, - 0x40, 0x40, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x60, 0x3f, 0xcf, 0xcf, 0xcf, 0x3f, 0x6d, - 0xce, 0xde, 0x6b, 0xce, 0x7f, 0x7f, 0x6b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x4b, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x40, - 0x3f, 0x3f, 0xa0, 0x7f, 0x3f, 0xce, 0x3f, 0x3f, - 0x3f, 0x4c, 0x6e, 0x3f, 0x4f, 0x3f, 0xcf, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x61, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x40, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x90, 0x89, 0x3f, 0x3f, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0x4e, 0x60, 0x7e, 0x4d, 0x5d, 0x95, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0x4e, 0x60, 0x7e, 0x4d, 0x5d, 0x3f, - 0x81, 0x85, 0x96, 0xa7, 0x3f, 0x88, 0x92, 0x93, - 0x94, 0x95, 0x97, 0xa2, 0xa3, 0x3f, 0x3f, 0x3f, - 0x3f, 0x83, 0x3f, 0x3f, 0xb0, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0xc3, 0x3f, 0x3f, 0x3f, 0x3f, 0xc5, - 0x3f, 0x3f, 0x87, 0xc8, 0xc8, 0xc8, 0x88, 0x88, - 0xc9, 0xc9, 0xd3, 0x93, 0x3f, 0xd5, 0x3f, 0x3f, - 0xd7, 0xd7, 0xd8, 0xd9, 0xd9, 0xd9, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xe9, 0x3f, 0x67, 0x3f, - 0xe9, 0x3f, 0xd2, 0xc1, 0xc2, 0xc3, 0x85, 0x85, - 0xc5, 0xc6, 0x3f, 0xd4, 0x96, 0x3f, 0x3f, 0x3f, - 0x3f, 0x89, 0x3f, 0x3f, 0xad, 0x8c, 0x43, 0x57, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xc4, 0x84, 0x85, - 0x89, 0x91, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xc9, 0x3f, 0x3f, 0x3f, 0xe5, 0x3f, 0x3f, 0x3f, - 0x3f, 0xe7, 0x3f, 0x3f, 0xd3, 0xc3, 0xc4, 0xd4, - 0x89, 0x3f, 0x3f, 0x3f, 0xa5, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa7, 0x3f, 0x3f, 0x93, 0x83, 0x84, 0x94, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4c, 0x5f, 0x6e, 0xa5, 0x60, 0x6a, 0x3f, 0x3f, - 0x3f, 0x3f, 0x4c, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x60, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xd6, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x60, 0xda, 0x3f, 0x61, 0xe0, 0x5c, - 0x90, 0x3f, 0xe5, 0x3f, 0x3f, 0x3f, 0x3f, 0xd3, - 0x3f, 0x3f, 0x3f, 0x6a, 0x6a, 0x3f, 0x3f, 0x3f, - 0x3f, 0x95, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xa1, 0x3f, 0x3f, 0x3f, - 0x3f, 0xa1, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xa1, 0xa1, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x7e, 0x7e, 0x7e, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0xee, 0xfe, 0x3f, 0x3f, 0x4c, 0x6e, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x4c, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, - 0xf9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xc1, 0xc2, - 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xd1, - 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, - 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, - 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, - 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, - 0x98, 0x99, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xf0, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x60, 0x60, 0x6a, 0x6a, 0x60, 0x60, 0xdf, 0xdf, - 0x60, 0x60, 0xdf, 0xdf, 0x4e, 0x4e, 0x4e, 0x4e, - 0xef, 0xef, 0xef, 0xef, 0xd3, 0xd3, 0xd3, 0xd3, - 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0xe3, 0xe3, 0xe3, 0xe3, - 0xe3, 0xe3, 0xe3, 0xe3, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0x60, 0x60, 0xdf, 0xdf, - 0x7e, 0x6a, 0x4e, 0x4e, 0x4e, 0xef, 0xef, 0xef, - 0xd3, 0xd3, 0xd3, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0xe3, 0xe3, 0xe3, 0x4e, - 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x61, 0xe0, 0xe7, 0x60, 0x6a, 0x60, 0x6a, - 0x60, 0x6a, 0x60, 0x6a, 0x60, 0x6a, 0x60, 0x6a, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0xd6, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xd6, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x91, 0xe5, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x40, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4c, 0x6e, 0xee, 0xfe, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x4a, 0x5a, 0x3f, 0x7f, 0x7f, 0x6b, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x4e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xcf, 0xcf, 0xcf, 0xcf, 0x6d, 0x6d, 0x6d, - 0x6b, 0x3f, 0x4b, 0x3f, 0x5e, 0x7a, 0x6f, 0x4f, - 0xcf, 0x4d, 0x5d, 0xc0, 0xd0, 0x3f, 0x3f, 0x7b, - 0x50, 0x5c, 0x4e, 0x60, 0x4c, 0x6e, 0x7e, 0x3f, - 0xe0, 0x5b, 0x6c, 0x7c, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 0x4f, 0x7f, 0x7b, 0x5b, 0x6c, 0x50, 0x7d, - 0x4d, 0x5d, 0x5c, 0x4e, 0x6b, 0x60, 0x4b, 0x61, - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, - 0xf8, 0xf9, 0x7a, 0x5e, 0x4c, 0x7e, 0x6e, 0x6f, - 0x7c, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, - 0xc8, 0xc9, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, - 0xd7, 0xd8, 0xd9, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, - 0xe7, 0xe8, 0xe9, 0x4a, 0xe0, 0x5a, 0x5f, 0x6d, - 0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, - 0x97, 0x98, 0x99, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, - 0xa7, 0xa8, 0xa9, 0xc0, 0x6a, 0xd0, 0xa1, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x83, 0xb0, 0xef, 0xcf, 0xdf, 0xe8, 0x3f, 0x3f, - 0x6a, 0x4c, 0x5f, 0x6e, 0xa5, 0x3f, 0xd6, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0400, 0x0500, 0x0600, - 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x0d00, 0x1200, 0x1200, 0x1200, - 0x0e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x0f00, 0x1200, 0x1200, 0x1000, 0x1100 -}; - -const struct sbcs_table cptable_875 = -{ - { 875, 1, 0x003f, 0x003f, "IBM EBCDIC Greek" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_878.c b/reactos/tools/unicode/c_878.c deleted file mode 100644 index 48bf5feb609..00000000000 --- a/reactos/tools/unicode/c_878.c +++ /dev/null @@ -1,750 +0,0 @@ -/* code page 878 (Russian KOI8) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MISC/KOI8-R.TXT */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[256] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x2500, 0x2502, 0x250c, 0x2510, 0x2514, 0x2518, 0x251c, 0x2524, - 0x252c, 0x2534, 0x253c, 0x2580, 0x2584, 0x2588, 0x258c, 0x2590, - 0x2591, 0x2592, 0x2593, 0x2320, 0x25a0, 0x2219, 0x221a, 0x2248, - 0x2264, 0x2265, 0x00a0, 0x2321, 0x00b0, 0x00b2, 0x00b7, 0x00f7, - 0x2550, 0x2551, 0x2552, 0x0451, 0x2553, 0x2554, 0x2555, 0x2556, - 0x2557, 0x2558, 0x2559, 0x255a, 0x255b, 0x255c, 0x255d, 0x255e, - 0x255f, 0x2560, 0x2561, 0x0401, 0x2562, 0x2563, 0x2564, 0x2565, - 0x2566, 0x2567, 0x2568, 0x2569, 0x256a, 0x256b, 0x256c, 0x00a9, - 0x044e, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, - 0x0445, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, - 0x043f, 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, - 0x044c, 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a, - 0x042e, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, - 0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, - 0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, - 0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a -}; - -static const unsigned char uni2cp_low[5120] = -{ - /* 0x0000 .. 0x00ff */ - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x9a, 0x21, 0x63, 0x4c, 0x3f, 0x59, 0x7c, 0x3f, - 0x22, 0xbf, 0x61, 0x3c, 0x3f, 0x2d, 0x72, 0x2d, - 0x9c, 0x3f, 0x9d, 0x33, 0x27, 0x75, 0x3f, 0x9e, - 0x2c, 0x31, 0x6f, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, - 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, - 0x44, 0x4e, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x78, - 0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0x3f, 0x3f, - 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x63, - 0x65, 0x65, 0x65, 0x65, 0x69, 0x69, 0x69, 0x69, - 0x64, 0x6e, 0x6f, 0x6f, 0x6f, 0x6f, 0x6f, 0x9f, - 0x6f, 0x75, 0x75, 0x75, 0x75, 0x79, 0x3f, 0x79, - /* 0x0100 .. 0x01ff */ - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x43, 0x63, - 0x43, 0x63, 0x43, 0x63, 0x43, 0x63, 0x44, 0x64, - 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x47, 0x67, 0x47, 0x67, - 0x47, 0x67, 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, - 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, 0x49, 0x69, - 0x49, 0x69, 0x3f, 0x3f, 0x4a, 0x6a, 0x4b, 0x6b, - 0x3f, 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x3f, - 0x3f, 0x4c, 0x6c, 0x4e, 0x6e, 0x4e, 0x6e, 0x4e, - 0x6e, 0x3f, 0x3f, 0x3f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x52, 0x72, 0x52, 0x72, - 0x52, 0x72, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x57, 0x77, 0x59, 0x79, - 0x59, 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x73, - 0x62, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x44, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x46, 0x66, 0x3f, 0x3f, 0x3f, 0x3f, 0x49, - 0x3f, 0x3f, 0x6c, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x4f, 0x6f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, 0x54, 0x55, - 0x75, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x81, 0x3f, 0x3f, 0x21, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, 0x49, - 0x69, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, 0x55, - 0x75, 0x55, 0x75, 0x55, 0x75, 0x3f, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x47, 0x67, 0x47, 0x67, - 0x4b, 0x6b, 0x4f, 0x6f, 0x4f, 0x6f, 0x3f, 0x3f, - 0x6a, 0x3f, 0x3f, 0x3f, 0x47, 0x67, 0x3f, 0x3f, - 0x4e, 0x6e, 0x41, 0x61, 0x41, 0x61, 0x4f, 0x6f, - /* 0x0200 .. 0x02ff */ - 0x41, 0x61, 0x41, 0x61, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x52, 0x72, 0x52, 0x72, 0x55, 0x75, 0x55, 0x75, - 0x53, 0x73, 0x54, 0x74, 0x3f, 0x3f, 0x48, 0x68, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x61, - 0x45, 0x65, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x68, 0x3f, 0x6a, 0x72, 0x3f, 0x3f, 0x3f, 0x77, - 0x79, 0x27, 0x22, 0x60, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x5e, 0x76, - 0x27, 0x2d, 0x27, 0x60, 0x3f, 0x5f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x9c, 0x3f, 0x7e, 0x22, 0x3f, 0x3f, - 0x3f, 0x6c, 0x73, 0x78, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0300 .. 0x03ff */ - 0x60, 0x27, 0x5e, 0x7e, 0x2d, 0x2d, 0x3f, 0x3f, - 0x22, 0x3f, 0x9c, 0x22, 0x76, 0x3f, 0x22, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x5f, 0x5f, 0x5f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x60, 0x27, 0x3f, 0x3f, 0x22, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3b, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x27, 0x22, 0x41, 0x9e, - 0x45, 0x48, 0x49, 0x3f, 0x4f, 0x3f, 0x59, 0x3f, - 0x3f, 0x41, 0x42, 0x3f, 0x3f, 0x45, 0x5a, 0x48, - 0x3f, 0x49, 0x4b, 0x3f, 0x4d, 0x4e, 0x3f, 0x4f, - 0x3f, 0x50, 0x3f, 0x3f, 0x54, 0x59, 0x3f, 0x58, - 0x3f, 0x3f, 0x49, 0x59, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x75, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x59, 0x59, 0x59, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x0400 .. 0x04ff */ - 0xe5, 0xb3, 0x3f, 0xe7, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xeb, 0xe9, 0xf5, 0x3f, - 0xe1, 0xe2, 0xf7, 0xe7, 0xe4, 0xe5, 0xf6, 0xfa, - 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, - 0xf2, 0xf3, 0xf4, 0xf5, 0xe6, 0xe8, 0xe3, 0xfe, - 0xfb, 0xfd, 0xff, 0xf9, 0xf8, 0xfc, 0xe0, 0xf1, - 0xc1, 0xc2, 0xd7, 0xc7, 0xc4, 0xc5, 0xd6, 0xda, - 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, - 0xd2, 0xd3, 0xd4, 0xd5, 0xc6, 0xc8, 0xc3, 0xde, - 0xdb, 0xdd, 0xdf, 0xd9, 0xd8, 0xdc, 0xc0, 0xd1, - 0xc5, 0xa3, 0x3f, 0xc7, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0xcb, 0xc9, 0xd5, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0xf6, 0xd6, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xe1, 0xc1, 0xe1, 0xc1, 0x3f, 0x3f, 0xe5, 0xc5, - 0x3f, 0x3f, 0x3f, 0x3f, 0xf6, 0xd6, 0xfa, 0xda, - 0x3f, 0x3f, 0xe9, 0xc9, 0xe9, 0xc9, 0xef, 0xcf, - 0x3f, 0x3f, 0x3f, 0x3f, 0xfc, 0xdc, 0xf5, 0xd5, - 0xf5, 0xd5, 0xf5, 0xd5, 0xfe, 0xde, 0x3f, 0x3f, - 0xf9, 0xd9, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1d00 .. 0x1dff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x42, 0x3f, - 0x44, 0x45, 0x3f, 0x47, 0x48, 0x49, 0x4a, 0x4b, - 0x4c, 0x4d, 0x4e, 0x3f, 0x4f, 0x3f, 0x50, 0x52, - 0x54, 0x55, 0x57, 0x61, 0x3f, 0x3f, 0x3f, 0x62, - 0x64, 0x65, 0x3f, 0x3f, 0x3f, 0x67, 0x3f, 0x6b, - 0x6d, 0x3f, 0x6f, 0x3f, 0x3f, 0x3f, 0x70, 0x74, - 0x75, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x69, 0x72, 0x75, 0x76, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0xce, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x63, 0x3f, 0x64, 0x3f, - 0x66, 0x3f, 0x67, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x74, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x7a, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1e00 .. 0x1eff */ - 0x41, 0x61, 0x42, 0x62, 0x42, 0x62, 0x42, 0x62, - 0x43, 0x63, 0x44, 0x64, 0x44, 0x64, 0x44, 0x64, - 0x44, 0x64, 0x44, 0x64, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x46, 0x66, - 0x47, 0x67, 0x48, 0x68, 0x48, 0x68, 0x48, 0x68, - 0x48, 0x68, 0x48, 0x68, 0x49, 0x69, 0x49, 0x69, - 0x4b, 0x6b, 0x4b, 0x6b, 0x4b, 0x6b, 0x4c, 0x6c, - 0x4c, 0x6c, 0x4c, 0x6c, 0x4c, 0x6c, 0x4d, 0x6d, - 0x4d, 0x6d, 0x4d, 0x6d, 0x4e, 0x6e, 0x4e, 0x6e, - 0x4e, 0x6e, 0x4e, 0x6e, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x50, 0x70, 0x50, 0x70, - 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, 0x52, 0x72, - 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, - 0x53, 0x73, 0x54, 0x74, 0x54, 0x74, 0x54, 0x74, - 0x54, 0x74, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x56, 0x76, 0x56, 0x76, - 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, 0x57, 0x77, - 0x57, 0x77, 0x58, 0x78, 0x58, 0x78, 0x59, 0x79, - 0x5a, 0x7a, 0x5a, 0x7a, 0x5a, 0x7a, 0x68, 0x74, - 0x77, 0x79, 0x3f, 0x73, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, 0x41, 0x61, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, 0x45, 0x65, - 0x49, 0x69, 0x49, 0x69, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, 0x4f, 0x6f, - 0x4f, 0x6f, 0x4f, 0x6f, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, 0x55, 0x75, - 0x55, 0x75, 0x59, 0x79, 0x59, 0x79, 0x59, 0x79, - 0x59, 0x79, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x1f00 .. 0x1fff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, 0x3f, 0x59, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x41, 0x41, 0x41, 0x41, 0x41, 0x3f, 0x3f, 0x3f, - 0x3f, 0x22, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x45, 0x45, 0x48, 0x48, 0x48, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x49, 0x49, 0x49, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x59, 0x59, 0x59, 0x59, 0x50, 0x22, 0x22, 0x60, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x4f, 0x4f, 0x3f, 0x3f, 0x3f, 0x27, 0x3f, 0x3f, - /* 0x2000 .. 0x20ff */ - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x2d, 0x2d, 0x3f, 0x2d, 0x2d, 0x2d, 0x3f, 0x5f, - 0x60, 0x27, 0x2c, 0x60, 0x22, 0x22, 0x2c, 0x3f, - 0x3f, 0x3f, 0x95, 0x3f, 0x2e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x27, 0x22, 0x3f, 0x60, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x21, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x2f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x20, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x9c, 0x69, 0x3f, 0x3f, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x6e, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, - 0x38, 0x39, 0x2b, 0x2d, 0x3d, 0x28, 0x29, 0x3f, - 0x61, 0x65, 0x6f, 0x78, 0x3f, 0x68, 0x6b, 0x6c, - 0x6d, 0x6e, 0x70, 0x73, 0x74, 0x3f, 0x3f, 0x3f, - 0x3f, 0x63, 0x3f, 0x3f, 0x4c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2100 .. 0x21ff */ - 0x3f, 0x3f, 0x43, 0x3f, 0x3f, 0x3f, 0x3f, 0x45, - 0x3f, 0x3f, 0x67, 0x48, 0x48, 0x48, 0x68, 0x68, - 0x49, 0x49, 0x4c, 0x6c, 0x3f, 0x4e, 0x3f, 0x3f, - 0x50, 0x50, 0x51, 0x52, 0x52, 0x52, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x5a, 0x3f, 0x3f, 0x3f, - 0x5a, 0x3f, 0x4b, 0x41, 0x42, 0x43, 0x65, 0x65, - 0x45, 0x46, 0x3f, 0x4d, 0x6f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x69, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x44, 0x64, 0x65, - 0x69, 0x6a, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x49, 0x3f, 0x3f, 0x3f, 0x56, 0x3f, 0x3f, 0x3f, - 0x3f, 0x58, 0x3f, 0x3f, 0x4c, 0x43, 0x44, 0x4d, - 0x69, 0x3f, 0x3f, 0x3f, 0x76, 0x3f, 0x3f, 0x3f, - 0x3f, 0x78, 0x3f, 0x3f, 0x6c, 0x63, 0x64, 0x6d, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x5e, 0x3e, 0x76, 0x2d, 0x7c, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x2d, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2200 .. 0x22ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x2d, 0x3f, 0x3f, 0x2f, 0x5c, 0x2a, - 0x9c, 0x95, 0x96, 0x3f, 0x3f, 0x3f, 0x3f, 0x4c, - 0x3f, 0x3f, 0x3f, 0x7c, 0x7c, 0x3f, 0x3f, 0x3f, - 0x3f, 0x6e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3a, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, - 0x3f, 0x7e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x97, 0x97, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3d, 0x3d, 0x3d, 0x3d, 0x98, 0x99, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3c, 0x3e, - 0x98, 0x99, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x9e, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2300 .. 0x23ff */ - 0x3f, 0x3f, 0x3f, 0x5e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x93, 0x9b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2400 .. 0x24ff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 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, - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, - 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x30, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2500 .. 0x25ff */ - 0x80, 0x80, 0x81, 0x81, 0x2d, 0x2d, 0x7c, 0x7c, - 0x2d, 0x2d, 0x7c, 0x7c, 0x82, 0x82, 0x82, 0x82, - 0x83, 0x83, 0x83, 0x83, 0x84, 0x84, 0x84, 0x84, - 0x85, 0x85, 0x85, 0x85, 0x86, 0x86, 0x86, 0x86, - 0x86, 0x86, 0x86, 0x86, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x88, 0x88, 0x88, 0x88, - 0x88, 0x88, 0x88, 0x88, 0x89, 0x89, 0x89, 0x89, - 0x89, 0x89, 0x89, 0x89, 0x8a, 0x8a, 0x8a, 0x8a, - 0x8a, 0x8a, 0x8a, 0x8a, 0x8a, 0x8a, 0x8a, 0x8a, - 0x8a, 0x8a, 0x8a, 0x8a, 0x2d, 0x2d, 0x7c, 0x7c, - 0xa0, 0xa1, 0xa2, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, - 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, - 0xb1, 0xb2, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, - 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2f, 0x5c, 0x58, 0x2d, 0x7c, 0x2d, 0x7c, - 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, 0x2d, 0x7c, - 0x8b, 0x3f, 0x3f, 0x3f, 0x8c, 0x3f, 0x3f, 0x3f, - 0x8d, 0x3f, 0x3f, 0x3f, 0x8e, 0x3f, 0x3f, 0x3f, - 0x8f, 0x90, 0x91, 0x92, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x94, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x4f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x4f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x2c00 .. 0x2cff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x6a, 0x56, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0x3000 .. 0x30ff */ - 0x20, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3c, 0x3e, 0x3c, 0x3e, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x5b, 0x5d, 0x3f, 0x22, 0x22, 0x2c, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfb00 .. 0xfbff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2b, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xfe00 .. 0xfeff */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x2d, 0x2d, 0x2d, 0x2d, 0x5f, 0x5f, 0x5f, - 0x2c, 0x3f, 0x2e, 0x3f, 0x3b, 0x3a, 0x3f, 0x21, - 0x2d, 0x28, 0x29, 0x7b, 0x7d, 0x3f, 0x3f, 0x23, - 0x26, 0x2a, 0x2b, 0x2d, 0x3c, 0x3e, 0x3d, 0x3f, - 0x5c, 0x24, 0x25, 0x40, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* 0xff00 .. 0xffff */ - 0x3f, 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x63, 0x4c, 0x3f, 0x2d, 0x7c, 0x59, 0x3f, 0x3f, - 0x81, 0x3c, 0x5e, 0x3e, 0x76, 0x94, 0x4f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - /* defaults */ - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, - 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0500, 0x0600, 0x0700, - 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x0e00, 0x1300, 0x1300, 0x1300, - 0x0f00, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1000, 0x1300, 0x1300, 0x1100, 0x1200 -}; - -const struct sbcs_table cptable_878 = -{ - { 878, 1, 0x003f, 0x003f, "Russian KOI8" }, - cp2uni, - cp2uni, - uni2cp_low, - uni2cp_high -}; diff --git a/reactos/tools/unicode/c_932.c b/reactos/tools/unicode/c_932.c deleted file mode 100644 index 0f6cfb690cc..00000000000 --- a/reactos/tools/unicode/c_932.c +++ /dev/null @@ -1,5673 +0,0 @@ -/* code page 932 (ANSI/OEM Japanese Shift-JIS) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit932.txt */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[15616] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x0080, 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, - 0xf8f0, 0xff61, 0xff62, 0xff63, 0xff64, 0xff65, 0xff66, 0xff67, - 0xff68, 0xff69, 0xff6a, 0xff6b, 0xff6c, 0xff6d, 0xff6e, 0xff6f, - 0xff70, 0xff71, 0xff72, 0xff73, 0xff74, 0xff75, 0xff76, 0xff77, - 0xff78, 0xff79, 0xff7a, 0xff7b, 0xff7c, 0xff7d, 0xff7e, 0xff7f, - 0xff80, 0xff81, 0xff82, 0xff83, 0xff84, 0xff85, 0xff86, 0xff87, - 0xff88, 0xff89, 0xff8a, 0xff8b, 0xff8c, 0xff8d, 0xff8e, 0xff8f, - 0xff90, 0xff91, 0xff92, 0xff93, 0xff94, 0xff95, 0xff96, 0xff97, - 0xff98, 0xff99, 0xff9a, 0xff9b, 0xff9c, 0xff9d, 0xff9e, 0xff9f, - 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, 0xf8f1, 0xf8f2, 0xf8f3, - /* lead byte 81 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x3000, 0x3001, 0x3002, 0xff0c, 0xff0e, 0x30fb, 0xff1a, 0xff1b, - 0xff1f, 0xff01, 0x309b, 0x309c, 0x00b4, 0xff40, 0x00a8, 0xff3e, - 0xffe3, 0xff3f, 0x30fd, 0x30fe, 0x309d, 0x309e, 0x3003, 0x4edd, - 0x3005, 0x3006, 0x3007, 0x30fc, 0x2015, 0x2010, 0xff0f, 0xff3c, - 0xff5e, 0x2225, 0xff5c, 0x2026, 0x2025, 0x2018, 0x2019, 0x201c, - 0x201d, 0xff08, 0xff09, 0x3014, 0x3015, 0xff3b, 0xff3d, 0xff5b, - 0xff5d, 0x3008, 0x3009, 0x300a, 0x300b, 0x300c, 0x300d, 0x300e, - 0x300f, 0x3010, 0x3011, 0xff0b, 0xff0d, 0x00b1, 0x00d7, 0x30fb, - 0x00f7, 0xff1d, 0x2260, 0xff1c, 0xff1e, 0x2266, 0x2267, 0x221e, - 0x2234, 0x2642, 0x2640, 0x00b0, 0x2032, 0x2033, 0x2103, 0xffe5, - 0xff04, 0xffe0, 0xffe1, 0xff05, 0xff03, 0xff06, 0xff0a, 0xff20, - 0x00a7, 0x2606, 0x2605, 0x25cb, 0x25cf, 0x25ce, 0x25c7, 0x25c6, - 0x25a1, 0x25a0, 0x25b3, 0x25b2, 0x25bd, 0x25bc, 0x203b, 0x3012, - 0x2192, 0x2190, 0x2191, 0x2193, 0x3013, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x2208, 0x220b, 0x2286, 0x2287, 0x2282, 0x2283, 0x222a, 0x2229, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x2227, 0x2228, 0xffe2, 0x21d2, 0x21d4, 0x2200, 0x2203, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x2220, 0x22a5, 0x2312, 0x2202, 0x2207, 0x2261, - 0x2252, 0x226a, 0x226b, 0x221a, 0x223d, 0x221d, 0x2235, 0x222b, - 0x222c, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x212b, 0x2030, 0x266f, 0x266d, 0x266a, 0x2020, 0x2021, 0x00b6, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x25ef, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 82 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0xff10, - 0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17, 0xff18, - 0xff19, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0xff21, 0xff22, 0xff23, 0xff24, 0xff25, 0xff26, 0xff27, 0xff28, - 0xff29, 0xff2a, 0xff2b, 0xff2c, 0xff2d, 0xff2e, 0xff2f, 0xff30, - 0xff31, 0xff32, 0xff33, 0xff34, 0xff35, 0xff36, 0xff37, 0xff38, - 0xff39, 0xff3a, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47, - 0xff48, 0xff49, 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f, - 0xff50, 0xff51, 0xff52, 0xff53, 0xff54, 0xff55, 0xff56, 0xff57, - 0xff58, 0xff59, 0xff5a, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x3041, - 0x3042, 0x3043, 0x3044, 0x3045, 0x3046, 0x3047, 0x3048, 0x3049, - 0x304a, 0x304b, 0x304c, 0x304d, 0x304e, 0x304f, 0x3050, 0x3051, - 0x3052, 0x3053, 0x3054, 0x3055, 0x3056, 0x3057, 0x3058, 0x3059, - 0x305a, 0x305b, 0x305c, 0x305d, 0x305e, 0x305f, 0x3060, 0x3061, - 0x3062, 0x3063, 0x3064, 0x3065, 0x3066, 0x3067, 0x3068, 0x3069, - 0x306a, 0x306b, 0x306c, 0x306d, 0x306e, 0x306f, 0x3070, 0x3071, - 0x3072, 0x3073, 0x3074, 0x3075, 0x3076, 0x3077, 0x3078, 0x3079, - 0x307a, 0x307b, 0x307c, 0x307d, 0x307e, 0x307f, 0x3080, 0x3081, - 0x3082, 0x3083, 0x3084, 0x3085, 0x3086, 0x3087, 0x3088, 0x3089, - 0x308a, 0x308b, 0x308c, 0x308d, 0x308e, 0x308f, 0x3090, 0x3091, - 0x3092, 0x3093, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 83 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30a1, 0x30a2, 0x30a3, 0x30a4, 0x30a5, 0x30a6, 0x30a7, 0x30a8, - 0x30a9, 0x30aa, 0x30ab, 0x30ac, 0x30ad, 0x30ae, 0x30af, 0x30b0, - 0x30b1, 0x30b2, 0x30b3, 0x30b4, 0x30b5, 0x30b6, 0x30b7, 0x30b8, - 0x30b9, 0x30ba, 0x30bb, 0x30bc, 0x30bd, 0x30be, 0x30bf, 0x30c0, - 0x30c1, 0x30c2, 0x30c3, 0x30c4, 0x30c5, 0x30c6, 0x30c7, 0x30c8, - 0x30c9, 0x30ca, 0x30cb, 0x30cc, 0x30cd, 0x30ce, 0x30cf, 0x30d0, - 0x30d1, 0x30d2, 0x30d3, 0x30d4, 0x30d5, 0x30d6, 0x30d7, 0x30d8, - 0x30d9, 0x30da, 0x30db, 0x30dc, 0x30dd, 0x30de, 0x30df, 0x30fb, - 0x30e0, 0x30e1, 0x30e2, 0x30e3, 0x30e4, 0x30e5, 0x30e6, 0x30e7, - 0x30e8, 0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ee, 0x30ef, - 0x30f0, 0x30f1, 0x30f2, 0x30f3, 0x30f4, 0x30f5, 0x30f6, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x0391, - 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, - 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, 0x03a0, 0x03a1, - 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x03b1, - 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8, 0x03b9, - 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0, 0x03c1, - 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 84 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401, 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, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0451, 0x0436, - 0x0437, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x30fb, - 0x043e, 0x043f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, - 0x0446, 0x0447, 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, - 0x044e, 0x044f, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x2500, - 0x2502, 0x250c, 0x2510, 0x2518, 0x2514, 0x251c, 0x252c, 0x2524, - 0x2534, 0x253c, 0x2501, 0x2503, 0x250f, 0x2513, 0x251b, 0x2517, - 0x2523, 0x2533, 0x252b, 0x253b, 0x254b, 0x2520, 0x252f, 0x2528, - 0x2537, 0x253f, 0x251d, 0x2530, 0x2525, 0x2538, 0x2542, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 85 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 86 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 87 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467, - 0x2468, 0x2469, 0x246a, 0x246b, 0x246c, 0x246d, 0x246e, 0x246f, - 0x2470, 0x2471, 0x2472, 0x2473, 0x2160, 0x2161, 0x2162, 0x2163, - 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x30fb, 0x3349, - 0x3314, 0x3322, 0x334d, 0x3318, 0x3327, 0x3303, 0x3336, 0x3351, - 0x3357, 0x330d, 0x3326, 0x3323, 0x332b, 0x334a, 0x333b, 0x339c, - 0x339d, 0x339e, 0x338e, 0x338f, 0x33c4, 0x33a1, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x337b, 0x30fb, - 0x301d, 0x301f, 0x2116, 0x33cd, 0x2121, 0x32a4, 0x32a5, 0x32a6, - 0x32a7, 0x32a8, 0x3231, 0x3232, 0x3239, 0x337e, 0x337d, 0x337c, - 0x2252, 0x2261, 0x222b, 0x222e, 0x2211, 0x221a, 0x22a5, 0x2220, - 0x221f, 0x22bf, 0x2235, 0x2229, 0x222a, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 88 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x4e9c, - 0x5516, 0x5a03, 0x963f, 0x54c0, 0x611b, 0x6328, 0x59f6, 0x9022, - 0x8475, 0x831c, 0x7a50, 0x60aa, 0x63e1, 0x6e25, 0x65ed, 0x8466, - 0x82a6, 0x9bf5, 0x6893, 0x5727, 0x65a1, 0x6271, 0x5b9b, 0x59d0, - 0x867b, 0x98f4, 0x7d62, 0x7dbe, 0x9b8e, 0x6216, 0x7c9f, 0x88b7, - 0x5b89, 0x5eb5, 0x6309, 0x6697, 0x6848, 0x95c7, 0x978d, 0x674f, - 0x4ee5, 0x4f0a, 0x4f4d, 0x4f9d, 0x5049, 0x56f2, 0x5937, 0x59d4, - 0x5a01, 0x5c09, 0x60df, 0x610f, 0x6170, 0x6613, 0x6905, 0x70ba, - 0x754f, 0x7570, 0x79fb, 0x7dad, 0x7def, 0x80c3, 0x840e, 0x8863, - 0x8b02, 0x9055, 0x907a, 0x533b, 0x4e95, 0x4ea5, 0x57df, 0x80b2, - 0x90c1, 0x78ef, 0x4e00, 0x58f1, 0x6ea2, 0x9038, 0x7a32, 0x8328, - 0x828b, 0x9c2f, 0x5141, 0x5370, 0x54bd, 0x54e1, 0x56e0, 0x59fb, - 0x5f15, 0x98f2, 0x6deb, 0x80e4, 0x852d, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 89 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x9662, 0x9670, 0x96a0, 0x97fb, 0x540b, 0x53f3, 0x5b87, 0x70cf, - 0x7fbd, 0x8fc2, 0x96e8, 0x536f, 0x9d5c, 0x7aba, 0x4e11, 0x7893, - 0x81fc, 0x6e26, 0x5618, 0x5504, 0x6b1d, 0x851a, 0x9c3b, 0x59e5, - 0x53a9, 0x6d66, 0x74dc, 0x958f, 0x5642, 0x4e91, 0x904b, 0x96f2, - 0x834f, 0x990c, 0x53e1, 0x55b6, 0x5b30, 0x5f71, 0x6620, 0x66f3, - 0x6804, 0x6c38, 0x6cf3, 0x6d29, 0x745b, 0x76c8, 0x7a4e, 0x9834, - 0x82f1, 0x885b, 0x8a60, 0x92ed, 0x6db2, 0x75ab, 0x76ca, 0x99c5, - 0x60a6, 0x8b01, 0x8d8a, 0x95b2, 0x698e, 0x53ad, 0x5186, 0x30fb, - 0x5712, 0x5830, 0x5944, 0x5bb4, 0x5ef6, 0x6028, 0x63a9, 0x63f4, - 0x6cbf, 0x6f14, 0x708e, 0x7114, 0x7159, 0x71d5, 0x733f, 0x7e01, - 0x8276, 0x82d1, 0x8597, 0x9060, 0x925b, 0x9d1b, 0x5869, 0x65bc, - 0x6c5a, 0x7525, 0x51f9, 0x592e, 0x5965, 0x5f80, 0x5fdc, 0x62bc, - 0x65fa, 0x6a2a, 0x6b27, 0x6bb4, 0x738b, 0x7fc1, 0x8956, 0x9d2c, - 0x9d0e, 0x9ec4, 0x5ca1, 0x6c96, 0x837b, 0x5104, 0x5c4b, 0x61b6, - 0x81c6, 0x6876, 0x7261, 0x4e59, 0x4ffa, 0x5378, 0x6069, 0x6e29, - 0x7a4f, 0x97f3, 0x4e0b, 0x5316, 0x4eee, 0x4f55, 0x4f3d, 0x4fa1, - 0x4f73, 0x52a0, 0x53ef, 0x5609, 0x590f, 0x5ac1, 0x5bb6, 0x5be1, - 0x79d1, 0x6687, 0x679c, 0x67b6, 0x6b4c, 0x6cb3, 0x706b, 0x73c2, - 0x798d, 0x79be, 0x7a3c, 0x7b87, 0x82b1, 0x82db, 0x8304, 0x8377, - 0x83ef, 0x83d3, 0x8766, 0x8ab2, 0x5629, 0x8ca8, 0x8fe6, 0x904e, - 0x971e, 0x868a, 0x4fc4, 0x5ce8, 0x6211, 0x7259, 0x753b, 0x81e5, - 0x82bd, 0x86fe, 0x8cc0, 0x96c5, 0x9913, 0x99d5, 0x4ecb, 0x4f1a, - 0x89e3, 0x56de, 0x584a, 0x58ca, 0x5efb, 0x5feb, 0x602a, 0x6094, - 0x6062, 0x61d0, 0x6212, 0x62d0, 0x6539, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 8a */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x9b41, 0x6666, 0x68b0, 0x6d77, 0x7070, 0x754c, 0x7686, 0x7d75, - 0x82a5, 0x87f9, 0x958b, 0x968e, 0x8c9d, 0x51f1, 0x52be, 0x5916, - 0x54b3, 0x5bb3, 0x5d16, 0x6168, 0x6982, 0x6daf, 0x788d, 0x84cb, - 0x8857, 0x8a72, 0x93a7, 0x9ab8, 0x6d6c, 0x99a8, 0x86d9, 0x57a3, - 0x67ff, 0x86ce, 0x920e, 0x5283, 0x5687, 0x5404, 0x5ed3, 0x62e1, - 0x64b9, 0x683c, 0x6838, 0x6bbb, 0x7372, 0x78ba, 0x7a6b, 0x899a, - 0x89d2, 0x8d6b, 0x8f03, 0x90ed, 0x95a3, 0x9694, 0x9769, 0x5b66, - 0x5cb3, 0x697d, 0x984d, 0x984e, 0x639b, 0x7b20, 0x6a2b, 0x30fb, - 0x6a7f, 0x68b6, 0x9c0d, 0x6f5f, 0x5272, 0x559d, 0x6070, 0x62ec, - 0x6d3b, 0x6e07, 0x6ed1, 0x845b, 0x8910, 0x8f44, 0x4e14, 0x9c39, - 0x53f6, 0x691b, 0x6a3a, 0x9784, 0x682a, 0x515c, 0x7ac3, 0x84b2, - 0x91dc, 0x938c, 0x565b, 0x9d28, 0x6822, 0x8305, 0x8431, 0x7ca5, - 0x5208, 0x82c5, 0x74e6, 0x4e7e, 0x4f83, 0x51a0, 0x5bd2, 0x520a, - 0x52d8, 0x52e7, 0x5dfb, 0x559a, 0x582a, 0x59e6, 0x5b8c, 0x5b98, - 0x5bdb, 0x5e72, 0x5e79, 0x60a3, 0x611f, 0x6163, 0x61be, 0x63db, - 0x6562, 0x67d1, 0x6853, 0x68fa, 0x6b3e, 0x6b53, 0x6c57, 0x6f22, - 0x6f97, 0x6f45, 0x74b0, 0x7518, 0x76e3, 0x770b, 0x7aff, 0x7ba1, - 0x7c21, 0x7de9, 0x7f36, 0x7ff0, 0x809d, 0x8266, 0x839e, 0x89b3, - 0x8acc, 0x8cab, 0x9084, 0x9451, 0x9593, 0x9591, 0x95a2, 0x9665, - 0x97d3, 0x9928, 0x8218, 0x4e38, 0x542b, 0x5cb8, 0x5dcc, 0x73a9, - 0x764c, 0x773c, 0x5ca9, 0x7feb, 0x8d0b, 0x96c1, 0x9811, 0x9854, - 0x9858, 0x4f01, 0x4f0e, 0x5371, 0x559c, 0x5668, 0x57fa, 0x5947, - 0x5b09, 0x5bc4, 0x5c90, 0x5e0c, 0x5e7e, 0x5fcc, 0x63ee, 0x673a, - 0x65d7, 0x65e2, 0x671f, 0x68cb, 0x68c4, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 8b */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x6a5f, 0x5e30, 0x6bc5, 0x6c17, 0x6c7d, 0x757f, 0x7948, 0x5b63, - 0x7a00, 0x7d00, 0x5fbd, 0x898f, 0x8a18, 0x8cb4, 0x8d77, 0x8ecc, - 0x8f1d, 0x98e2, 0x9a0e, 0x9b3c, 0x4e80, 0x507d, 0x5100, 0x5993, - 0x5b9c, 0x622f, 0x6280, 0x64ec, 0x6b3a, 0x72a0, 0x7591, 0x7947, - 0x7fa9, 0x87fb, 0x8abc, 0x8b70, 0x63ac, 0x83ca, 0x97a0, 0x5409, - 0x5403, 0x55ab, 0x6854, 0x6a58, 0x8a70, 0x7827, 0x6775, 0x9ecd, - 0x5374, 0x5ba2, 0x811a, 0x8650, 0x9006, 0x4e18, 0x4e45, 0x4ec7, - 0x4f11, 0x53ca, 0x5438, 0x5bae, 0x5f13, 0x6025, 0x6551, 0x30fb, - 0x673d, 0x6c42, 0x6c72, 0x6ce3, 0x7078, 0x7403, 0x7a76, 0x7aae, - 0x7b08, 0x7d1a, 0x7cfe, 0x7d66, 0x65e7, 0x725b, 0x53bb, 0x5c45, - 0x5de8, 0x62d2, 0x62e0, 0x6319, 0x6e20, 0x865a, 0x8a31, 0x8ddd, - 0x92f8, 0x6f01, 0x79a6, 0x9b5a, 0x4ea8, 0x4eab, 0x4eac, 0x4f9b, - 0x4fa0, 0x50d1, 0x5147, 0x7af6, 0x5171, 0x51f6, 0x5354, 0x5321, - 0x537f, 0x53eb, 0x55ac, 0x5883, 0x5ce1, 0x5f37, 0x5f4a, 0x602f, - 0x6050, 0x606d, 0x631f, 0x6559, 0x6a4b, 0x6cc1, 0x72c2, 0x72ed, - 0x77ef, 0x80f8, 0x8105, 0x8208, 0x854e, 0x90f7, 0x93e1, 0x97ff, - 0x9957, 0x9a5a, 0x4ef0, 0x51dd, 0x5c2d, 0x6681, 0x696d, 0x5c40, - 0x66f2, 0x6975, 0x7389, 0x6850, 0x7c81, 0x50c5, 0x52e4, 0x5747, - 0x5dfe, 0x9326, 0x65a4, 0x6b23, 0x6b3d, 0x7434, 0x7981, 0x79bd, - 0x7b4b, 0x7dca, 0x82b9, 0x83cc, 0x887f, 0x895f, 0x8b39, 0x8fd1, - 0x91d1, 0x541f, 0x9280, 0x4e5d, 0x5036, 0x53e5, 0x533a, 0x72d7, - 0x7396, 0x77e9, 0x82e6, 0x8eaf, 0x99c6, 0x99c8, 0x99d2, 0x5177, - 0x611a, 0x865e, 0x55b0, 0x7a7a, 0x5076, 0x5bd3, 0x9047, 0x9685, - 0x4e32, 0x6adb, 0x91e7, 0x5c51, 0x5c48, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 8c */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x6398, 0x7a9f, 0x6c93, 0x9774, 0x8f61, 0x7aaa, 0x718a, 0x9688, - 0x7c82, 0x6817, 0x7e70, 0x6851, 0x936c, 0x52f2, 0x541b, 0x85ab, - 0x8a13, 0x7fa4, 0x8ecd, 0x90e1, 0x5366, 0x8888, 0x7941, 0x4fc2, - 0x50be, 0x5211, 0x5144, 0x5553, 0x572d, 0x73ea, 0x578b, 0x5951, - 0x5f62, 0x5f84, 0x6075, 0x6176, 0x6167, 0x61a9, 0x63b2, 0x643a, - 0x656c, 0x666f, 0x6842, 0x6e13, 0x7566, 0x7a3d, 0x7cfb, 0x7d4c, - 0x7d99, 0x7e4b, 0x7f6b, 0x830e, 0x834a, 0x86cd, 0x8a08, 0x8a63, - 0x8b66, 0x8efd, 0x981a, 0x9d8f, 0x82b8, 0x8fce, 0x9be8, 0x30fb, - 0x5287, 0x621f, 0x6483, 0x6fc0, 0x9699, 0x6841, 0x5091, 0x6b20, - 0x6c7a, 0x6f54, 0x7a74, 0x7d50, 0x8840, 0x8a23, 0x6708, 0x4ef6, - 0x5039, 0x5026, 0x5065, 0x517c, 0x5238, 0x5263, 0x55a7, 0x570f, - 0x5805, 0x5acc, 0x5efa, 0x61b2, 0x61f8, 0x62f3, 0x6372, 0x691c, - 0x6a29, 0x727d, 0x72ac, 0x732e, 0x7814, 0x786f, 0x7d79, 0x770c, - 0x80a9, 0x898b, 0x8b19, 0x8ce2, 0x8ed2, 0x9063, 0x9375, 0x967a, - 0x9855, 0x9a13, 0x9e78, 0x5143, 0x539f, 0x53b3, 0x5e7b, 0x5f26, - 0x6e1b, 0x6e90, 0x7384, 0x73fe, 0x7d43, 0x8237, 0x8a00, 0x8afa, - 0x9650, 0x4e4e, 0x500b, 0x53e4, 0x547c, 0x56fa, 0x59d1, 0x5b64, - 0x5df1, 0x5eab, 0x5f27, 0x6238, 0x6545, 0x67af, 0x6e56, 0x72d0, - 0x7cca, 0x88b4, 0x80a1, 0x80e1, 0x83f0, 0x864e, 0x8a87, 0x8de8, - 0x9237, 0x96c7, 0x9867, 0x9f13, 0x4e94, 0x4e92, 0x4f0d, 0x5348, - 0x5449, 0x543e, 0x5a2f, 0x5f8c, 0x5fa1, 0x609f, 0x68a7, 0x6a8e, - 0x745a, 0x7881, 0x8a9e, 0x8aa4, 0x8b77, 0x9190, 0x4e5e, 0x9bc9, - 0x4ea4, 0x4f7c, 0x4faf, 0x5019, 0x5016, 0x5149, 0x516c, 0x529f, - 0x52b9, 0x52fe, 0x539a, 0x53e3, 0x5411, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 8d */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x540e, 0x5589, 0x5751, 0x57a2, 0x597d, 0x5b54, 0x5b5d, 0x5b8f, - 0x5de5, 0x5de7, 0x5df7, 0x5e78, 0x5e83, 0x5e9a, 0x5eb7, 0x5f18, - 0x6052, 0x614c, 0x6297, 0x62d8, 0x63a7, 0x653b, 0x6602, 0x6643, - 0x66f4, 0x676d, 0x6821, 0x6897, 0x69cb, 0x6c5f, 0x6d2a, 0x6d69, - 0x6e2f, 0x6e9d, 0x7532, 0x7687, 0x786c, 0x7a3f, 0x7ce0, 0x7d05, - 0x7d18, 0x7d5e, 0x7db1, 0x8015, 0x8003, 0x80af, 0x80b1, 0x8154, - 0x818f, 0x822a, 0x8352, 0x884c, 0x8861, 0x8b1b, 0x8ca2, 0x8cfc, - 0x90ca, 0x9175, 0x9271, 0x783f, 0x92fc, 0x95a4, 0x964d, 0x30fb, - 0x9805, 0x9999, 0x9ad8, 0x9d3b, 0x525b, 0x52ab, 0x53f7, 0x5408, - 0x58d5, 0x62f7, 0x6fe0, 0x8c6a, 0x8f5f, 0x9eb9, 0x514b, 0x523b, - 0x544a, 0x56fd, 0x7a40, 0x9177, 0x9d60, 0x9ed2, 0x7344, 0x6f09, - 0x8170, 0x7511, 0x5ffd, 0x60da, 0x9aa8, 0x72db, 0x8fbc, 0x6b64, - 0x9803, 0x4eca, 0x56f0, 0x5764, 0x58be, 0x5a5a, 0x6068, 0x61c7, - 0x660f, 0x6606, 0x6839, 0x68b1, 0x6df7, 0x75d5, 0x7d3a, 0x826e, - 0x9b42, 0x4e9b, 0x4f50, 0x53c9, 0x5506, 0x5d6f, 0x5de6, 0x5dee, - 0x67fb, 0x6c99, 0x7473, 0x7802, 0x8a50, 0x9396, 0x88df, 0x5750, - 0x5ea7, 0x632b, 0x50b5, 0x50ac, 0x518d, 0x6700, 0x54c9, 0x585e, - 0x59bb, 0x5bb0, 0x5f69, 0x624d, 0x63a1, 0x683d, 0x6b73, 0x6e08, - 0x707d, 0x91c7, 0x7280, 0x7815, 0x7826, 0x796d, 0x658e, 0x7d30, - 0x83dc, 0x88c1, 0x8f09, 0x969b, 0x5264, 0x5728, 0x6750, 0x7f6a, - 0x8ca1, 0x51b4, 0x5742, 0x962a, 0x583a, 0x698a, 0x80b4, 0x54b2, - 0x5d0e, 0x57fc, 0x7895, 0x9dfa, 0x4f5c, 0x524a, 0x548b, 0x643e, - 0x6628, 0x6714, 0x67f5, 0x7a84, 0x7b56, 0x7d22, 0x932f, 0x685c, - 0x9bad, 0x7b39, 0x5319, 0x518a, 0x5237, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 8e */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x5bdf, 0x62f6, 0x64ae, 0x64e6, 0x672d, 0x6bba, 0x85a9, 0x96d1, - 0x7690, 0x9bd6, 0x634c, 0x9306, 0x9bab, 0x76bf, 0x6652, 0x4e09, - 0x5098, 0x53c2, 0x5c71, 0x60e8, 0x6492, 0x6563, 0x685f, 0x71e6, - 0x73ca, 0x7523, 0x7b97, 0x7e82, 0x8695, 0x8b83, 0x8cdb, 0x9178, - 0x9910, 0x65ac, 0x66ab, 0x6b8b, 0x4ed5, 0x4ed4, 0x4f3a, 0x4f7f, - 0x523a, 0x53f8, 0x53f2, 0x55e3, 0x56db, 0x58eb, 0x59cb, 0x59c9, - 0x59ff, 0x5b50, 0x5c4d, 0x5e02, 0x5e2b, 0x5fd7, 0x601d, 0x6307, - 0x652f, 0x5b5c, 0x65af, 0x65bd, 0x65e8, 0x679d, 0x6b62, 0x30fb, - 0x6b7b, 0x6c0f, 0x7345, 0x7949, 0x79c1, 0x7cf8, 0x7d19, 0x7d2b, - 0x80a2, 0x8102, 0x81f3, 0x8996, 0x8a5e, 0x8a69, 0x8a66, 0x8a8c, - 0x8aee, 0x8cc7, 0x8cdc, 0x96cc, 0x98fc, 0x6b6f, 0x4e8b, 0x4f3c, - 0x4f8d, 0x5150, 0x5b57, 0x5bfa, 0x6148, 0x6301, 0x6642, 0x6b21, - 0x6ecb, 0x6cbb, 0x723e, 0x74bd, 0x75d4, 0x78c1, 0x793a, 0x800c, - 0x8033, 0x81ea, 0x8494, 0x8f9e, 0x6c50, 0x9e7f, 0x5f0f, 0x8b58, - 0x9d2b, 0x7afa, 0x8ef8, 0x5b8d, 0x96eb, 0x4e03, 0x53f1, 0x57f7, - 0x5931, 0x5ac9, 0x5ba4, 0x6089, 0x6e7f, 0x6f06, 0x75be, 0x8cea, - 0x5b9f, 0x8500, 0x7be0, 0x5072, 0x67f4, 0x829d, 0x5c61, 0x854a, - 0x7e1e, 0x820e, 0x5199, 0x5c04, 0x6368, 0x8d66, 0x659c, 0x716e, - 0x793e, 0x7d17, 0x8005, 0x8b1d, 0x8eca, 0x906e, 0x86c7, 0x90aa, - 0x501f, 0x52fa, 0x5c3a, 0x6753, 0x707c, 0x7235, 0x914c, 0x91c8, - 0x932b, 0x82e5, 0x5bc2, 0x5f31, 0x60f9, 0x4e3b, 0x53d6, 0x5b88, - 0x624b, 0x6731, 0x6b8a, 0x72e9, 0x73e0, 0x7a2e, 0x816b, 0x8da3, - 0x9152, 0x9996, 0x5112, 0x53d7, 0x546a, 0x5bff, 0x6388, 0x6a39, - 0x7dac, 0x9700, 0x56da, 0x53ce, 0x5468, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 8f */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x5b97, 0x5c31, 0x5dde, 0x4fee, 0x6101, 0x62fe, 0x6d32, 0x79c0, - 0x79cb, 0x7d42, 0x7e4d, 0x7fd2, 0x81ed, 0x821f, 0x8490, 0x8846, - 0x8972, 0x8b90, 0x8e74, 0x8f2f, 0x9031, 0x914b, 0x916c, 0x96c6, - 0x919c, 0x4ec0, 0x4f4f, 0x5145, 0x5341, 0x5f93, 0x620e, 0x67d4, - 0x6c41, 0x6e0b, 0x7363, 0x7e26, 0x91cd, 0x9283, 0x53d4, 0x5919, - 0x5bbf, 0x6dd1, 0x795d, 0x7e2e, 0x7c9b, 0x587e, 0x719f, 0x51fa, - 0x8853, 0x8ff0, 0x4fca, 0x5cfb, 0x6625, 0x77ac, 0x7ae3, 0x821c, - 0x99ff, 0x51c6, 0x5faa, 0x65ec, 0x696f, 0x6b89, 0x6df3, 0x30fb, - 0x6e96, 0x6f64, 0x76fe, 0x7d14, 0x5de1, 0x9075, 0x9187, 0x9806, - 0x51e6, 0x521d, 0x6240, 0x6691, 0x66d9, 0x6e1a, 0x5eb6, 0x7dd2, - 0x7f72, 0x66f8, 0x85af, 0x85f7, 0x8af8, 0x52a9, 0x53d9, 0x5973, - 0x5e8f, 0x5f90, 0x6055, 0x92e4, 0x9664, 0x50b7, 0x511f, 0x52dd, - 0x5320, 0x5347, 0x53ec, 0x54e8, 0x5546, 0x5531, 0x5617, 0x5968, - 0x59be, 0x5a3c, 0x5bb5, 0x5c06, 0x5c0f, 0x5c11, 0x5c1a, 0x5e84, - 0x5e8a, 0x5ee0, 0x5f70, 0x627f, 0x6284, 0x62db, 0x638c, 0x6377, - 0x6607, 0x660c, 0x662d, 0x6676, 0x677e, 0x68a2, 0x6a1f, 0x6a35, - 0x6cbc, 0x6d88, 0x6e09, 0x6e58, 0x713c, 0x7126, 0x7167, 0x75c7, - 0x7701, 0x785d, 0x7901, 0x7965, 0x79f0, 0x7ae0, 0x7b11, 0x7ca7, - 0x7d39, 0x8096, 0x83d6, 0x848b, 0x8549, 0x885d, 0x88f3, 0x8a1f, - 0x8a3c, 0x8a54, 0x8a73, 0x8c61, 0x8cde, 0x91a4, 0x9266, 0x937e, - 0x9418, 0x969c, 0x9798, 0x4e0a, 0x4e08, 0x4e1e, 0x4e57, 0x5197, - 0x5270, 0x57ce, 0x5834, 0x58cc, 0x5b22, 0x5e38, 0x60c5, 0x64fe, - 0x6761, 0x6756, 0x6d44, 0x72b6, 0x7573, 0x7a63, 0x84b8, 0x8b72, - 0x91b8, 0x9320, 0x5631, 0x57f4, 0x98fe, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 90 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x62ed, 0x690d, 0x6b96, 0x71ed, 0x7e54, 0x8077, 0x8272, 0x89e6, - 0x98df, 0x8755, 0x8fb1, 0x5c3b, 0x4f38, 0x4fe1, 0x4fb5, 0x5507, - 0x5a20, 0x5bdd, 0x5be9, 0x5fc3, 0x614e, 0x632f, 0x65b0, 0x664b, - 0x68ee, 0x699b, 0x6d78, 0x6df1, 0x7533, 0x75b9, 0x771f, 0x795e, - 0x79e6, 0x7d33, 0x81e3, 0x82af, 0x85aa, 0x89aa, 0x8a3a, 0x8eab, - 0x8f9b, 0x9032, 0x91dd, 0x9707, 0x4eba, 0x4ec1, 0x5203, 0x5875, - 0x58ec, 0x5c0b, 0x751a, 0x5c3d, 0x814e, 0x8a0a, 0x8fc5, 0x9663, - 0x976d, 0x7b25, 0x8acf, 0x9808, 0x9162, 0x56f3, 0x53a8, 0x30fb, - 0x9017, 0x5439, 0x5782, 0x5e25, 0x63a8, 0x6c34, 0x708a, 0x7761, - 0x7c8b, 0x7fe0, 0x8870, 0x9042, 0x9154, 0x9310, 0x9318, 0x968f, - 0x745e, 0x9ac4, 0x5d07, 0x5d69, 0x6570, 0x67a2, 0x8da8, 0x96db, - 0x636e, 0x6749, 0x6919, 0x83c5, 0x9817, 0x96c0, 0x88fe, 0x6f84, - 0x647a, 0x5bf8, 0x4e16, 0x702c, 0x755d, 0x662f, 0x51c4, 0x5236, - 0x52e2, 0x59d3, 0x5f81, 0x6027, 0x6210, 0x653f, 0x6574, 0x661f, - 0x6674, 0x68f2, 0x6816, 0x6b63, 0x6e05, 0x7272, 0x751f, 0x76db, - 0x7cbe, 0x8056, 0x58f0, 0x88fd, 0x897f, 0x8aa0, 0x8a93, 0x8acb, - 0x901d, 0x9192, 0x9752, 0x9759, 0x6589, 0x7a0e, 0x8106, 0x96bb, - 0x5e2d, 0x60dc, 0x621a, 0x65a5, 0x6614, 0x6790, 0x77f3, 0x7a4d, - 0x7c4d, 0x7e3e, 0x810a, 0x8cac, 0x8d64, 0x8de1, 0x8e5f, 0x78a9, - 0x5207, 0x62d9, 0x63a5, 0x6442, 0x6298, 0x8a2d, 0x7a83, 0x7bc0, - 0x8aac, 0x96ea, 0x7d76, 0x820c, 0x8749, 0x4ed9, 0x5148, 0x5343, - 0x5360, 0x5ba3, 0x5c02, 0x5c16, 0x5ddd, 0x6226, 0x6247, 0x64b0, - 0x6813, 0x6834, 0x6cc9, 0x6d45, 0x6d17, 0x67d3, 0x6f5c, 0x714e, - 0x717d, 0x65cb, 0x7a7f, 0x7bad, 0x7dda, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 91 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x7e4a, 0x7fa8, 0x817a, 0x821b, 0x8239, 0x85a6, 0x8a6e, 0x8cce, - 0x8df5, 0x9078, 0x9077, 0x92ad, 0x9291, 0x9583, 0x9bae, 0x524d, - 0x5584, 0x6f38, 0x7136, 0x5168, 0x7985, 0x7e55, 0x81b3, 0x7cce, - 0x564c, 0x5851, 0x5ca8, 0x63aa, 0x66fe, 0x66fd, 0x695a, 0x72d9, - 0x758f, 0x758e, 0x790e, 0x7956, 0x79df, 0x7c97, 0x7d20, 0x7d44, - 0x8607, 0x8a34, 0x963b, 0x9061, 0x9f20, 0x50e7, 0x5275, 0x53cc, - 0x53e2, 0x5009, 0x55aa, 0x58ee, 0x594f, 0x723d, 0x5b8b, 0x5c64, - 0x531d, 0x60e3, 0x60f3, 0x635c, 0x6383, 0x633f, 0x63bb, 0x30fb, - 0x64cd, 0x65e9, 0x66f9, 0x5de3, 0x69cd, 0x69fd, 0x6f15, 0x71e5, - 0x4e89, 0x75e9, 0x76f8, 0x7a93, 0x7cdf, 0x7dcf, 0x7d9c, 0x8061, - 0x8349, 0x8358, 0x846c, 0x84bc, 0x85fb, 0x88c5, 0x8d70, 0x9001, - 0x906d, 0x9397, 0x971c, 0x9a12, 0x50cf, 0x5897, 0x618e, 0x81d3, - 0x8535, 0x8d08, 0x9020, 0x4fc3, 0x5074, 0x5247, 0x5373, 0x606f, - 0x6349, 0x675f, 0x6e2c, 0x8db3, 0x901f, 0x4fd7, 0x5c5e, 0x8cca, - 0x65cf, 0x7d9a, 0x5352, 0x8896, 0x5176, 0x63c3, 0x5b58, 0x5b6b, - 0x5c0a, 0x640d, 0x6751, 0x905c, 0x4ed6, 0x591a, 0x592a, 0x6c70, - 0x8a51, 0x553e, 0x5815, 0x59a5, 0x60f0, 0x6253, 0x67c1, 0x8235, - 0x6955, 0x9640, 0x99c4, 0x9a28, 0x4f53, 0x5806, 0x5bfe, 0x8010, - 0x5cb1, 0x5e2f, 0x5f85, 0x6020, 0x614b, 0x6234, 0x66ff, 0x6cf0, - 0x6ede, 0x80ce, 0x817f, 0x82d4, 0x888b, 0x8cb8, 0x9000, 0x902e, - 0x968a, 0x9edb, 0x9bdb, 0x4ee3, 0x53f0, 0x5927, 0x7b2c, 0x918d, - 0x984c, 0x9df9, 0x6edd, 0x7027, 0x5353, 0x5544, 0x5b85, 0x6258, - 0x629e, 0x62d3, 0x6ca2, 0x6fef, 0x7422, 0x8a17, 0x9438, 0x6fc1, - 0x8afe, 0x8338, 0x51e7, 0x86f8, 0x53ea, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 92 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x53e9, 0x4f46, 0x9054, 0x8fb0, 0x596a, 0x8131, 0x5dfd, 0x7aea, - 0x8fbf, 0x68da, 0x8c37, 0x72f8, 0x9c48, 0x6a3d, 0x8ab0, 0x4e39, - 0x5358, 0x5606, 0x5766, 0x62c5, 0x63a2, 0x65e6, 0x6b4e, 0x6de1, - 0x6e5b, 0x70ad, 0x77ed, 0x7aef, 0x7baa, 0x7dbb, 0x803d, 0x80c6, - 0x86cb, 0x8a95, 0x935b, 0x56e3, 0x58c7, 0x5f3e, 0x65ad, 0x6696, - 0x6a80, 0x6bb5, 0x7537, 0x8ac7, 0x5024, 0x77e5, 0x5730, 0x5f1b, - 0x6065, 0x667a, 0x6c60, 0x75f4, 0x7a1a, 0x7f6e, 0x81f4, 0x8718, - 0x9045, 0x99b3, 0x7bc9, 0x755c, 0x7af9, 0x7b51, 0x84c4, 0x30fb, - 0x9010, 0x79e9, 0x7a92, 0x8336, 0x5ae1, 0x7740, 0x4e2d, 0x4ef2, - 0x5b99, 0x5fe0, 0x62bd, 0x663c, 0x67f1, 0x6ce8, 0x866b, 0x8877, - 0x8a3b, 0x914e, 0x92f3, 0x99d0, 0x6a17, 0x7026, 0x732a, 0x82e7, - 0x8457, 0x8caf, 0x4e01, 0x5146, 0x51cb, 0x558b, 0x5bf5, 0x5e16, - 0x5e33, 0x5e81, 0x5f14, 0x5f35, 0x5f6b, 0x5fb4, 0x61f2, 0x6311, - 0x66a2, 0x671d, 0x6f6e, 0x7252, 0x753a, 0x773a, 0x8074, 0x8139, - 0x8178, 0x8776, 0x8abf, 0x8adc, 0x8d85, 0x8df3, 0x929a, 0x9577, - 0x9802, 0x9ce5, 0x52c5, 0x6357, 0x76f4, 0x6715, 0x6c88, 0x73cd, - 0x8cc3, 0x93ae, 0x9673, 0x6d25, 0x589c, 0x690e, 0x69cc, 0x8ffd, - 0x939a, 0x75db, 0x901a, 0x585a, 0x6802, 0x63b4, 0x69fb, 0x4f43, - 0x6f2c, 0x67d8, 0x8fbb, 0x8526, 0x7db4, 0x9354, 0x693f, 0x6f70, - 0x576a, 0x58f7, 0x5b2c, 0x7d2c, 0x722a, 0x540a, 0x91e3, 0x9db4, - 0x4ead, 0x4f4e, 0x505c, 0x5075, 0x5243, 0x8c9e, 0x5448, 0x5824, - 0x5b9a, 0x5e1d, 0x5e95, 0x5ead, 0x5ef7, 0x5f1f, 0x608c, 0x62b5, - 0x633a, 0x63d0, 0x68af, 0x6c40, 0x7887, 0x798e, 0x7a0b, 0x7de0, - 0x8247, 0x8a02, 0x8ae6, 0x8e44, 0x9013, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 93 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x90b8, 0x912d, 0x91d8, 0x9f0e, 0x6ce5, 0x6458, 0x64e2, 0x6575, - 0x6ef4, 0x7684, 0x7b1b, 0x9069, 0x93d1, 0x6eba, 0x54f2, 0x5fb9, - 0x64a4, 0x8f4d, 0x8fed, 0x9244, 0x5178, 0x586b, 0x5929, 0x5c55, - 0x5e97, 0x6dfb, 0x7e8f, 0x751c, 0x8cbc, 0x8ee2, 0x985b, 0x70b9, - 0x4f1d, 0x6bbf, 0x6fb1, 0x7530, 0x96fb, 0x514e, 0x5410, 0x5835, - 0x5857, 0x59ac, 0x5c60, 0x5f92, 0x6597, 0x675c, 0x6e21, 0x767b, - 0x83df, 0x8ced, 0x9014, 0x90fd, 0x934d, 0x7825, 0x783a, 0x52aa, - 0x5ea6, 0x571f, 0x5974, 0x6012, 0x5012, 0x515a, 0x51ac, 0x30fb, - 0x51cd, 0x5200, 0x5510, 0x5854, 0x5858, 0x5957, 0x5b95, 0x5cf6, - 0x5d8b, 0x60bc, 0x6295, 0x642d, 0x6771, 0x6843, 0x68bc, 0x68df, - 0x76d7, 0x6dd8, 0x6e6f, 0x6d9b, 0x706f, 0x71c8, 0x5f53, 0x75d8, - 0x7977, 0x7b49, 0x7b54, 0x7b52, 0x7cd6, 0x7d71, 0x5230, 0x8463, - 0x8569, 0x85e4, 0x8a0e, 0x8b04, 0x8c46, 0x8e0f, 0x9003, 0x900f, - 0x9419, 0x9676, 0x982d, 0x9a30, 0x95d8, 0x50cd, 0x52d5, 0x540c, - 0x5802, 0x5c0e, 0x61a7, 0x649e, 0x6d1e, 0x77b3, 0x7ae5, 0x80f4, - 0x8404, 0x9053, 0x9285, 0x5ce0, 0x9d07, 0x533f, 0x5f97, 0x5fb3, - 0x6d9c, 0x7279, 0x7763, 0x79bf, 0x7be4, 0x6bd2, 0x72ec, 0x8aad, - 0x6803, 0x6a61, 0x51f8, 0x7a81, 0x6934, 0x5c4a, 0x9cf6, 0x82eb, - 0x5bc5, 0x9149, 0x701e, 0x5678, 0x5c6f, 0x60c7, 0x6566, 0x6c8c, - 0x8c5a, 0x9041, 0x9813, 0x5451, 0x66c7, 0x920d, 0x5948, 0x90a3, - 0x5185, 0x4e4d, 0x51ea, 0x8599, 0x8b0e, 0x7058, 0x637a, 0x934b, - 0x6962, 0x99b4, 0x7e04, 0x7577, 0x5357, 0x6960, 0x8edf, 0x96e3, - 0x6c5d, 0x4e8c, 0x5c3c, 0x5f10, 0x8fe9, 0x5302, 0x8cd1, 0x8089, - 0x8679, 0x5eff, 0x65e5, 0x4e73, 0x5165, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 94 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x5982, 0x5c3f, 0x97ee, 0x4efb, 0x598a, 0x5fcd, 0x8a8d, 0x6fe1, - 0x79b0, 0x7962, 0x5be7, 0x8471, 0x732b, 0x71b1, 0x5e74, 0x5ff5, - 0x637b, 0x649a, 0x71c3, 0x7c98, 0x4e43, 0x5efc, 0x4e4b, 0x57dc, - 0x56a2, 0x60a9, 0x6fc3, 0x7d0d, 0x80fd, 0x8133, 0x81bf, 0x8fb2, - 0x8997, 0x86a4, 0x5df4, 0x628a, 0x64ad, 0x8987, 0x6777, 0x6ce2, - 0x6d3e, 0x7436, 0x7834, 0x5a46, 0x7f75, 0x82ad, 0x99ac, 0x4ff3, - 0x5ec3, 0x62dd, 0x6392, 0x6557, 0x676f, 0x76c3, 0x724c, 0x80cc, - 0x80ba, 0x8f29, 0x914d, 0x500d, 0x57f9, 0x5a92, 0x6885, 0x30fb, - 0x6973, 0x7164, 0x72fd, 0x8cb7, 0x58f2, 0x8ce0, 0x966a, 0x9019, - 0x877f, 0x79e4, 0x77e7, 0x8429, 0x4f2f, 0x5265, 0x535a, 0x62cd, - 0x67cf, 0x6cca, 0x767d, 0x7b94, 0x7c95, 0x8236, 0x8584, 0x8feb, - 0x66dd, 0x6f20, 0x7206, 0x7e1b, 0x83ab, 0x99c1, 0x9ea6, 0x51fd, - 0x7bb1, 0x7872, 0x7bb8, 0x8087, 0x7b48, 0x6ae8, 0x5e61, 0x808c, - 0x7551, 0x7560, 0x516b, 0x9262, 0x6e8c, 0x767a, 0x9197, 0x9aea, - 0x4f10, 0x7f70, 0x629c, 0x7b4f, 0x95a5, 0x9ce9, 0x567a, 0x5859, - 0x86e4, 0x96bc, 0x4f34, 0x5224, 0x534a, 0x53cd, 0x53db, 0x5e06, - 0x642c, 0x6591, 0x677f, 0x6c3e, 0x6c4e, 0x7248, 0x72af, 0x73ed, - 0x7554, 0x7e41, 0x822c, 0x85e9, 0x8ca9, 0x7bc4, 0x91c6, 0x7169, - 0x9812, 0x98ef, 0x633d, 0x6669, 0x756a, 0x76e4, 0x78d0, 0x8543, - 0x86ee, 0x532a, 0x5351, 0x5426, 0x5983, 0x5e87, 0x5f7c, 0x60b2, - 0x6249, 0x6279, 0x62ab, 0x6590, 0x6bd4, 0x6ccc, 0x75b2, 0x76ae, - 0x7891, 0x79d8, 0x7dcb, 0x7f77, 0x80a5, 0x88ab, 0x8ab9, 0x8cbb, - 0x907f, 0x975e, 0x98db, 0x6a0b, 0x7c38, 0x5099, 0x5c3e, 0x5fae, - 0x6787, 0x6bd8, 0x7435, 0x7709, 0x7f8e, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 95 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x9f3b, 0x67ca, 0x7a17, 0x5339, 0x758b, 0x9aed, 0x5f66, 0x819d, - 0x83f1, 0x8098, 0x5f3c, 0x5fc5, 0x7562, 0x7b46, 0x903c, 0x6867, - 0x59eb, 0x5a9b, 0x7d10, 0x767e, 0x8b2c, 0x4ff5, 0x5f6a, 0x6a19, - 0x6c37, 0x6f02, 0x74e2, 0x7968, 0x8868, 0x8a55, 0x8c79, 0x5edf, - 0x63cf, 0x75c5, 0x79d2, 0x82d7, 0x9328, 0x92f2, 0x849c, 0x86ed, - 0x9c2d, 0x54c1, 0x5f6c, 0x658c, 0x6d5c, 0x7015, 0x8ca7, 0x8cd3, - 0x983b, 0x654f, 0x74f6, 0x4e0d, 0x4ed8, 0x57e0, 0x592b, 0x5a66, - 0x5bcc, 0x51a8, 0x5e03, 0x5e9c, 0x6016, 0x6276, 0x6577, 0x30fb, - 0x65a7, 0x666e, 0x6d6e, 0x7236, 0x7b26, 0x8150, 0x819a, 0x8299, - 0x8b5c, 0x8ca0, 0x8ce6, 0x8d74, 0x961c, 0x9644, 0x4fae, 0x64ab, - 0x6b66, 0x821e, 0x8461, 0x856a, 0x90e8, 0x5c01, 0x6953, 0x98a8, - 0x847a, 0x8557, 0x4f0f, 0x526f, 0x5fa9, 0x5e45, 0x670d, 0x798f, - 0x8179, 0x8907, 0x8986, 0x6df5, 0x5f17, 0x6255, 0x6cb8, 0x4ecf, - 0x7269, 0x9b92, 0x5206, 0x543b, 0x5674, 0x58b3, 0x61a4, 0x626e, - 0x711a, 0x596e, 0x7c89, 0x7cde, 0x7d1b, 0x96f0, 0x6587, 0x805e, - 0x4e19, 0x4f75, 0x5175, 0x5840, 0x5e63, 0x5e73, 0x5f0a, 0x67c4, - 0x4e26, 0x853d, 0x9589, 0x965b, 0x7c73, 0x9801, 0x50fb, 0x58c1, - 0x7656, 0x78a7, 0x5225, 0x77a5, 0x8511, 0x7b86, 0x504f, 0x5909, - 0x7247, 0x7bc7, 0x7de8, 0x8fba, 0x8fd4, 0x904d, 0x4fbf, 0x52c9, - 0x5a29, 0x5f01, 0x97ad, 0x4fdd, 0x8217, 0x92ea, 0x5703, 0x6355, - 0x6b69, 0x752b, 0x88dc, 0x8f14, 0x7a42, 0x52df, 0x5893, 0x6155, - 0x620a, 0x66ae, 0x6bcd, 0x7c3f, 0x83e9, 0x5023, 0x4ff8, 0x5305, - 0x5446, 0x5831, 0x5949, 0x5b9d, 0x5cf0, 0x5cef, 0x5d29, 0x5e96, - 0x62b1, 0x6367, 0x653e, 0x65b9, 0x670b, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 96 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x6cd5, 0x6ce1, 0x70f9, 0x7832, 0x7e2b, 0x80de, 0x82b3, 0x840c, - 0x84ec, 0x8702, 0x8912, 0x8a2a, 0x8c4a, 0x90a6, 0x92d2, 0x98fd, - 0x9cf3, 0x9d6c, 0x4e4f, 0x4ea1, 0x508d, 0x5256, 0x574a, 0x59a8, - 0x5e3d, 0x5fd8, 0x5fd9, 0x623f, 0x66b4, 0x671b, 0x67d0, 0x68d2, - 0x5192, 0x7d21, 0x80aa, 0x81a8, 0x8b00, 0x8c8c, 0x8cbf, 0x927e, - 0x9632, 0x5420, 0x982c, 0x5317, 0x50d5, 0x535c, 0x58a8, 0x64b2, - 0x6734, 0x7267, 0x7766, 0x7a46, 0x91e6, 0x52c3, 0x6ca1, 0x6b86, - 0x5800, 0x5e4c, 0x5954, 0x672c, 0x7ffb, 0x51e1, 0x76c6, 0x30fb, - 0x6469, 0x78e8, 0x9b54, 0x9ebb, 0x57cb, 0x59b9, 0x6627, 0x679a, - 0x6bce, 0x54e9, 0x69d9, 0x5e55, 0x819c, 0x6795, 0x9baa, 0x67fe, - 0x9c52, 0x685d, 0x4ea6, 0x4fe3, 0x53c8, 0x62b9, 0x672b, 0x6cab, - 0x8fc4, 0x4fad, 0x7e6d, 0x9ebf, 0x4e07, 0x6162, 0x6e80, 0x6f2b, - 0x8513, 0x5473, 0x672a, 0x9b45, 0x5df3, 0x7b95, 0x5cac, 0x5bc6, - 0x871c, 0x6e4a, 0x84d1, 0x7a14, 0x8108, 0x5999, 0x7c8d, 0x6c11, - 0x7720, 0x52d9, 0x5922, 0x7121, 0x725f, 0x77db, 0x9727, 0x9d61, - 0x690b, 0x5a7f, 0x5a18, 0x51a5, 0x540d, 0x547d, 0x660e, 0x76df, - 0x8ff7, 0x9298, 0x9cf4, 0x59ea, 0x725d, 0x6ec5, 0x514d, 0x68c9, - 0x7dbf, 0x7dec, 0x9762, 0x9eba, 0x6478, 0x6a21, 0x8302, 0x5984, - 0x5b5f, 0x6bdb, 0x731b, 0x76f2, 0x7db2, 0x8017, 0x8499, 0x5132, - 0x6728, 0x9ed9, 0x76ee, 0x6762, 0x52ff, 0x9905, 0x5c24, 0x623b, - 0x7c7e, 0x8cb0, 0x554f, 0x60b6, 0x7d0b, 0x9580, 0x5301, 0x4e5f, - 0x51b6, 0x591c, 0x723a, 0x8036, 0x91ce, 0x5f25, 0x77e2, 0x5384, - 0x5f79, 0x7d04, 0x85ac, 0x8a33, 0x8e8d, 0x9756, 0x67f3, 0x85ae, - 0x9453, 0x6109, 0x6108, 0x6cb9, 0x7652, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 97 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x8aed, 0x8f38, 0x552f, 0x4f51, 0x512a, 0x52c7, 0x53cb, 0x5ba5, - 0x5e7d, 0x60a0, 0x6182, 0x63d6, 0x6709, 0x67da, 0x6e67, 0x6d8c, - 0x7336, 0x7337, 0x7531, 0x7950, 0x88d5, 0x8a98, 0x904a, 0x9091, - 0x90f5, 0x96c4, 0x878d, 0x5915, 0x4e88, 0x4f59, 0x4e0e, 0x8a89, - 0x8f3f, 0x9810, 0x50ad, 0x5e7c, 0x5996, 0x5bb9, 0x5eb8, 0x63da, - 0x63fa, 0x64c1, 0x66dc, 0x694a, 0x69d8, 0x6d0b, 0x6eb6, 0x7194, - 0x7528, 0x7aaf, 0x7f8a, 0x8000, 0x8449, 0x84c9, 0x8981, 0x8b21, - 0x8e0a, 0x9065, 0x967d, 0x990a, 0x617e, 0x6291, 0x6b32, 0x30fb, - 0x6c83, 0x6d74, 0x7fcc, 0x7ffc, 0x6dc0, 0x7f85, 0x87ba, 0x88f8, - 0x6765, 0x83b1, 0x983c, 0x96f7, 0x6d1b, 0x7d61, 0x843d, 0x916a, - 0x4e71, 0x5375, 0x5d50, 0x6b04, 0x6feb, 0x85cd, 0x862d, 0x89a7, - 0x5229, 0x540f, 0x5c65, 0x674e, 0x68a8, 0x7406, 0x7483, 0x75e2, - 0x88cf, 0x88e1, 0x91cc, 0x96e2, 0x9678, 0x5f8b, 0x7387, 0x7acb, - 0x844e, 0x63a0, 0x7565, 0x5289, 0x6d41, 0x6e9c, 0x7409, 0x7559, - 0x786b, 0x7c92, 0x9686, 0x7adc, 0x9f8d, 0x4fb6, 0x616e, 0x65c5, - 0x865c, 0x4e86, 0x4eae, 0x50da, 0x4e21, 0x51cc, 0x5bee, 0x6599, - 0x6881, 0x6dbc, 0x731f, 0x7642, 0x77ad, 0x7a1c, 0x7ce7, 0x826f, - 0x8ad2, 0x907c, 0x91cf, 0x9675, 0x9818, 0x529b, 0x7dd1, 0x502b, - 0x5398, 0x6797, 0x6dcb, 0x71d0, 0x7433, 0x81e8, 0x8f2a, 0x96a3, - 0x9c57, 0x9e9f, 0x7460, 0x5841, 0x6d99, 0x7d2f, 0x985e, 0x4ee4, - 0x4f36, 0x4f8b, 0x51b7, 0x52b1, 0x5dba, 0x601c, 0x73b2, 0x793c, - 0x82d3, 0x9234, 0x96b7, 0x96f6, 0x970a, 0x9e97, 0x9f62, 0x66a6, - 0x6b74, 0x5217, 0x52a3, 0x70c8, 0x88c2, 0x5ec9, 0x604b, 0x6190, - 0x6f23, 0x7149, 0x7c3e, 0x7df4, 0x806f, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 98 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x84ee, 0x9023, 0x932c, 0x5442, 0x9b6f, 0x6ad3, 0x7089, 0x8cc2, - 0x8def, 0x9732, 0x52b4, 0x5a41, 0x5eca, 0x5f04, 0x6717, 0x697c, - 0x6994, 0x6d6a, 0x6f0f, 0x7262, 0x72fc, 0x7bed, 0x8001, 0x807e, - 0x874b, 0x90ce, 0x516d, 0x9e93, 0x7984, 0x808b, 0x9332, 0x8ad6, - 0x502d, 0x548c, 0x8a71, 0x6b6a, 0x8cc4, 0x8107, 0x60d1, 0x67a0, - 0x9df2, 0x4e99, 0x4e98, 0x9c10, 0x8a6b, 0x85c1, 0x8568, 0x6900, - 0x6e7e, 0x7897, 0x8155, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x5f0c, - 0x4e10, 0x4e15, 0x4e2a, 0x4e31, 0x4e36, 0x4e3c, 0x4e3f, 0x4e42, - 0x4e56, 0x4e58, 0x4e82, 0x4e85, 0x8c6b, 0x4e8a, 0x8212, 0x5f0d, - 0x4e8e, 0x4e9e, 0x4e9f, 0x4ea0, 0x4ea2, 0x4eb0, 0x4eb3, 0x4eb6, - 0x4ece, 0x4ecd, 0x4ec4, 0x4ec6, 0x4ec2, 0x4ed7, 0x4ede, 0x4eed, - 0x4edf, 0x4ef7, 0x4f09, 0x4f5a, 0x4f30, 0x4f5b, 0x4f5d, 0x4f57, - 0x4f47, 0x4f76, 0x4f88, 0x4f8f, 0x4f98, 0x4f7b, 0x4f69, 0x4f70, - 0x4f91, 0x4f6f, 0x4f86, 0x4f96, 0x5118, 0x4fd4, 0x4fdf, 0x4fce, - 0x4fd8, 0x4fdb, 0x4fd1, 0x4fda, 0x4fd0, 0x4fe4, 0x4fe5, 0x501a, - 0x5028, 0x5014, 0x502a, 0x5025, 0x5005, 0x4f1c, 0x4ff6, 0x5021, - 0x5029, 0x502c, 0x4ffe, 0x4fef, 0x5011, 0x5006, 0x5043, 0x5047, - 0x6703, 0x5055, 0x5050, 0x5048, 0x505a, 0x5056, 0x506c, 0x5078, - 0x5080, 0x509a, 0x5085, 0x50b4, 0x50b2, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 99 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x50c9, 0x50ca, 0x50b3, 0x50c2, 0x50d6, 0x50de, 0x50e5, 0x50ed, - 0x50e3, 0x50ee, 0x50f9, 0x50f5, 0x5109, 0x5101, 0x5102, 0x5116, - 0x5115, 0x5114, 0x511a, 0x5121, 0x513a, 0x5137, 0x513c, 0x513b, - 0x513f, 0x5140, 0x5152, 0x514c, 0x5154, 0x5162, 0x7af8, 0x5169, - 0x516a, 0x516e, 0x5180, 0x5182, 0x56d8, 0x518c, 0x5189, 0x518f, - 0x5191, 0x5193, 0x5195, 0x5196, 0x51a4, 0x51a6, 0x51a2, 0x51a9, - 0x51aa, 0x51ab, 0x51b3, 0x51b1, 0x51b2, 0x51b0, 0x51b5, 0x51bd, - 0x51c5, 0x51c9, 0x51db, 0x51e0, 0x8655, 0x51e9, 0x51ed, 0x30fb, - 0x51f0, 0x51f5, 0x51fe, 0x5204, 0x520b, 0x5214, 0x520e, 0x5227, - 0x522a, 0x522e, 0x5233, 0x5239, 0x524f, 0x5244, 0x524b, 0x524c, - 0x525e, 0x5254, 0x526a, 0x5274, 0x5269, 0x5273, 0x527f, 0x527d, - 0x528d, 0x5294, 0x5292, 0x5271, 0x5288, 0x5291, 0x8fa8, 0x8fa7, - 0x52ac, 0x52ad, 0x52bc, 0x52b5, 0x52c1, 0x52cd, 0x52d7, 0x52de, - 0x52e3, 0x52e6, 0x98ed, 0x52e0, 0x52f3, 0x52f5, 0x52f8, 0x52f9, - 0x5306, 0x5308, 0x7538, 0x530d, 0x5310, 0x530f, 0x5315, 0x531a, - 0x5323, 0x532f, 0x5331, 0x5333, 0x5338, 0x5340, 0x5346, 0x5345, - 0x4e17, 0x5349, 0x534d, 0x51d6, 0x535e, 0x5369, 0x536e, 0x5918, - 0x537b, 0x5377, 0x5382, 0x5396, 0x53a0, 0x53a6, 0x53a5, 0x53ae, - 0x53b0, 0x53b6, 0x53c3, 0x7c12, 0x96d9, 0x53df, 0x66fc, 0x71ee, - 0x53ee, 0x53e8, 0x53ed, 0x53fa, 0x5401, 0x543d, 0x5440, 0x542c, - 0x542d, 0x543c, 0x542e, 0x5436, 0x5429, 0x541d, 0x544e, 0x548f, - 0x5475, 0x548e, 0x545f, 0x5471, 0x5477, 0x5470, 0x5492, 0x547b, - 0x5480, 0x5476, 0x5484, 0x5490, 0x5486, 0x54c7, 0x54a2, 0x54b8, - 0x54a5, 0x54ac, 0x54c4, 0x54c8, 0x54a8, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 9a */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x54ab, 0x54c2, 0x54a4, 0x54be, 0x54bc, 0x54d8, 0x54e5, 0x54e6, - 0x550f, 0x5514, 0x54fd, 0x54ee, 0x54ed, 0x54fa, 0x54e2, 0x5539, - 0x5540, 0x5563, 0x554c, 0x552e, 0x555c, 0x5545, 0x5556, 0x5557, - 0x5538, 0x5533, 0x555d, 0x5599, 0x5580, 0x54af, 0x558a, 0x559f, - 0x557b, 0x557e, 0x5598, 0x559e, 0x55ae, 0x557c, 0x5583, 0x55a9, - 0x5587, 0x55a8, 0x55da, 0x55c5, 0x55df, 0x55c4, 0x55dc, 0x55e4, - 0x55d4, 0x5614, 0x55f7, 0x5616, 0x55fe, 0x55fd, 0x561b, 0x55f9, - 0x564e, 0x5650, 0x71df, 0x5634, 0x5636, 0x5632, 0x5638, 0x30fb, - 0x566b, 0x5664, 0x562f, 0x566c, 0x566a, 0x5686, 0x5680, 0x568a, - 0x56a0, 0x5694, 0x568f, 0x56a5, 0x56ae, 0x56b6, 0x56b4, 0x56c2, - 0x56bc, 0x56c1, 0x56c3, 0x56c0, 0x56c8, 0x56ce, 0x56d1, 0x56d3, - 0x56d7, 0x56ee, 0x56f9, 0x5700, 0x56ff, 0x5704, 0x5709, 0x5708, - 0x570b, 0x570d, 0x5713, 0x5718, 0x5716, 0x55c7, 0x571c, 0x5726, - 0x5737, 0x5738, 0x574e, 0x573b, 0x5740, 0x574f, 0x5769, 0x57c0, - 0x5788, 0x5761, 0x577f, 0x5789, 0x5793, 0x57a0, 0x57b3, 0x57a4, - 0x57aa, 0x57b0, 0x57c3, 0x57c6, 0x57d4, 0x57d2, 0x57d3, 0x580a, - 0x57d6, 0x57e3, 0x580b, 0x5819, 0x581d, 0x5872, 0x5821, 0x5862, - 0x584b, 0x5870, 0x6bc0, 0x5852, 0x583d, 0x5879, 0x5885, 0x58b9, - 0x589f, 0x58ab, 0x58ba, 0x58de, 0x58bb, 0x58b8, 0x58ae, 0x58c5, - 0x58d3, 0x58d1, 0x58d7, 0x58d9, 0x58d8, 0x58e5, 0x58dc, 0x58e4, - 0x58df, 0x58ef, 0x58fa, 0x58f9, 0x58fb, 0x58fc, 0x58fd, 0x5902, - 0x590a, 0x5910, 0x591b, 0x68a6, 0x5925, 0x592c, 0x592d, 0x5932, - 0x5938, 0x593e, 0x7ad2, 0x5955, 0x5950, 0x594e, 0x595a, 0x5958, - 0x5962, 0x5960, 0x5967, 0x596c, 0x5969, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 9b */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x5978, 0x5981, 0x599d, 0x4f5e, 0x4fab, 0x59a3, 0x59b2, 0x59c6, - 0x59e8, 0x59dc, 0x598d, 0x59d9, 0x59da, 0x5a25, 0x5a1f, 0x5a11, - 0x5a1c, 0x5a09, 0x5a1a, 0x5a40, 0x5a6c, 0x5a49, 0x5a35, 0x5a36, - 0x5a62, 0x5a6a, 0x5a9a, 0x5abc, 0x5abe, 0x5acb, 0x5ac2, 0x5abd, - 0x5ae3, 0x5ad7, 0x5ae6, 0x5ae9, 0x5ad6, 0x5afa, 0x5afb, 0x5b0c, - 0x5b0b, 0x5b16, 0x5b32, 0x5ad0, 0x5b2a, 0x5b36, 0x5b3e, 0x5b43, - 0x5b45, 0x5b40, 0x5b51, 0x5b55, 0x5b5a, 0x5b5b, 0x5b65, 0x5b69, - 0x5b70, 0x5b73, 0x5b75, 0x5b78, 0x6588, 0x5b7a, 0x5b80, 0x30fb, - 0x5b83, 0x5ba6, 0x5bb8, 0x5bc3, 0x5bc7, 0x5bc9, 0x5bd4, 0x5bd0, - 0x5be4, 0x5be6, 0x5be2, 0x5bde, 0x5be5, 0x5beb, 0x5bf0, 0x5bf6, - 0x5bf3, 0x5c05, 0x5c07, 0x5c08, 0x5c0d, 0x5c13, 0x5c20, 0x5c22, - 0x5c28, 0x5c38, 0x5c39, 0x5c41, 0x5c46, 0x5c4e, 0x5c53, 0x5c50, - 0x5c4f, 0x5b71, 0x5c6c, 0x5c6e, 0x4e62, 0x5c76, 0x5c79, 0x5c8c, - 0x5c91, 0x5c94, 0x599b, 0x5cab, 0x5cbb, 0x5cb6, 0x5cbc, 0x5cb7, - 0x5cc5, 0x5cbe, 0x5cc7, 0x5cd9, 0x5ce9, 0x5cfd, 0x5cfa, 0x5ced, - 0x5d8c, 0x5cea, 0x5d0b, 0x5d15, 0x5d17, 0x5d5c, 0x5d1f, 0x5d1b, - 0x5d11, 0x5d14, 0x5d22, 0x5d1a, 0x5d19, 0x5d18, 0x5d4c, 0x5d52, - 0x5d4e, 0x5d4b, 0x5d6c, 0x5d73, 0x5d76, 0x5d87, 0x5d84, 0x5d82, - 0x5da2, 0x5d9d, 0x5dac, 0x5dae, 0x5dbd, 0x5d90, 0x5db7, 0x5dbc, - 0x5dc9, 0x5dcd, 0x5dd3, 0x5dd2, 0x5dd6, 0x5ddb, 0x5deb, 0x5df2, - 0x5df5, 0x5e0b, 0x5e1a, 0x5e19, 0x5e11, 0x5e1b, 0x5e36, 0x5e37, - 0x5e44, 0x5e43, 0x5e40, 0x5e4e, 0x5e57, 0x5e54, 0x5e5f, 0x5e62, - 0x5e64, 0x5e47, 0x5e75, 0x5e76, 0x5e7a, 0x9ebc, 0x5e7f, 0x5ea0, - 0x5ec1, 0x5ec2, 0x5ec8, 0x5ed0, 0x5ecf, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 9c */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x5ed6, 0x5ee3, 0x5edd, 0x5eda, 0x5edb, 0x5ee2, 0x5ee1, 0x5ee8, - 0x5ee9, 0x5eec, 0x5ef1, 0x5ef3, 0x5ef0, 0x5ef4, 0x5ef8, 0x5efe, - 0x5f03, 0x5f09, 0x5f5d, 0x5f5c, 0x5f0b, 0x5f11, 0x5f16, 0x5f29, - 0x5f2d, 0x5f38, 0x5f41, 0x5f48, 0x5f4c, 0x5f4e, 0x5f2f, 0x5f51, - 0x5f56, 0x5f57, 0x5f59, 0x5f61, 0x5f6d, 0x5f73, 0x5f77, 0x5f83, - 0x5f82, 0x5f7f, 0x5f8a, 0x5f88, 0x5f91, 0x5f87, 0x5f9e, 0x5f99, - 0x5f98, 0x5fa0, 0x5fa8, 0x5fad, 0x5fbc, 0x5fd6, 0x5ffb, 0x5fe4, - 0x5ff8, 0x5ff1, 0x5fdd, 0x60b3, 0x5fff, 0x6021, 0x6060, 0x30fb, - 0x6019, 0x6010, 0x6029, 0x600e, 0x6031, 0x601b, 0x6015, 0x602b, - 0x6026, 0x600f, 0x603a, 0x605a, 0x6041, 0x606a, 0x6077, 0x605f, - 0x604a, 0x6046, 0x604d, 0x6063, 0x6043, 0x6064, 0x6042, 0x606c, - 0x606b, 0x6059, 0x6081, 0x608d, 0x60e7, 0x6083, 0x609a, 0x6084, - 0x609b, 0x6096, 0x6097, 0x6092, 0x60a7, 0x608b, 0x60e1, 0x60b8, - 0x60e0, 0x60d3, 0x60b4, 0x5ff0, 0x60bd, 0x60c6, 0x60b5, 0x60d8, - 0x614d, 0x6115, 0x6106, 0x60f6, 0x60f7, 0x6100, 0x60f4, 0x60fa, - 0x6103, 0x6121, 0x60fb, 0x60f1, 0x610d, 0x610e, 0x6147, 0x613e, - 0x6128, 0x6127, 0x614a, 0x613f, 0x613c, 0x612c, 0x6134, 0x613d, - 0x6142, 0x6144, 0x6173, 0x6177, 0x6158, 0x6159, 0x615a, 0x616b, - 0x6174, 0x616f, 0x6165, 0x6171, 0x615f, 0x615d, 0x6153, 0x6175, - 0x6199, 0x6196, 0x6187, 0x61ac, 0x6194, 0x619a, 0x618a, 0x6191, - 0x61ab, 0x61ae, 0x61cc, 0x61ca, 0x61c9, 0x61f7, 0x61c8, 0x61c3, - 0x61c6, 0x61ba, 0x61cb, 0x7f79, 0x61cd, 0x61e6, 0x61e3, 0x61f6, - 0x61fa, 0x61f4, 0x61ff, 0x61fd, 0x61fc, 0x61fe, 0x6200, 0x6208, - 0x6209, 0x620d, 0x620c, 0x6214, 0x621b, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 9d */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x621e, 0x6221, 0x622a, 0x622e, 0x6230, 0x6232, 0x6233, 0x6241, - 0x624e, 0x625e, 0x6263, 0x625b, 0x6260, 0x6268, 0x627c, 0x6282, - 0x6289, 0x627e, 0x6292, 0x6293, 0x6296, 0x62d4, 0x6283, 0x6294, - 0x62d7, 0x62d1, 0x62bb, 0x62cf, 0x62ff, 0x62c6, 0x64d4, 0x62c8, - 0x62dc, 0x62cc, 0x62ca, 0x62c2, 0x62c7, 0x629b, 0x62c9, 0x630c, - 0x62ee, 0x62f1, 0x6327, 0x6302, 0x6308, 0x62ef, 0x62f5, 0x6350, - 0x633e, 0x634d, 0x641c, 0x634f, 0x6396, 0x638e, 0x6380, 0x63ab, - 0x6376, 0x63a3, 0x638f, 0x6389, 0x639f, 0x63b5, 0x636b, 0x30fb, - 0x6369, 0x63be, 0x63e9, 0x63c0, 0x63c6, 0x63e3, 0x63c9, 0x63d2, - 0x63f6, 0x63c4, 0x6416, 0x6434, 0x6406, 0x6413, 0x6426, 0x6436, - 0x651d, 0x6417, 0x6428, 0x640f, 0x6467, 0x646f, 0x6476, 0x644e, - 0x652a, 0x6495, 0x6493, 0x64a5, 0x64a9, 0x6488, 0x64bc, 0x64da, - 0x64d2, 0x64c5, 0x64c7, 0x64bb, 0x64d8, 0x64c2, 0x64f1, 0x64e7, - 0x8209, 0x64e0, 0x64e1, 0x62ac, 0x64e3, 0x64ef, 0x652c, 0x64f6, - 0x64f4, 0x64f2, 0x64fa, 0x6500, 0x64fd, 0x6518, 0x651c, 0x6505, - 0x6524, 0x6523, 0x652b, 0x6534, 0x6535, 0x6537, 0x6536, 0x6538, - 0x754b, 0x6548, 0x6556, 0x6555, 0x654d, 0x6558, 0x655e, 0x655d, - 0x6572, 0x6578, 0x6582, 0x6583, 0x8b8a, 0x659b, 0x659f, 0x65ab, - 0x65b7, 0x65c3, 0x65c6, 0x65c1, 0x65c4, 0x65cc, 0x65d2, 0x65db, - 0x65d9, 0x65e0, 0x65e1, 0x65f1, 0x6772, 0x660a, 0x6603, 0x65fb, - 0x6773, 0x6635, 0x6636, 0x6634, 0x661c, 0x664f, 0x6644, 0x6649, - 0x6641, 0x665e, 0x665d, 0x6664, 0x6667, 0x6668, 0x665f, 0x6662, - 0x6670, 0x6683, 0x6688, 0x668e, 0x6689, 0x6684, 0x6698, 0x669d, - 0x66c1, 0x66b9, 0x66c9, 0x66be, 0x66bc, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 9e */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x66c4, 0x66b8, 0x66d6, 0x66da, 0x66e0, 0x663f, 0x66e6, 0x66e9, - 0x66f0, 0x66f5, 0x66f7, 0x670f, 0x6716, 0x671e, 0x6726, 0x6727, - 0x9738, 0x672e, 0x673f, 0x6736, 0x6741, 0x6738, 0x6737, 0x6746, - 0x675e, 0x6760, 0x6759, 0x6763, 0x6764, 0x6789, 0x6770, 0x67a9, - 0x677c, 0x676a, 0x678c, 0x678b, 0x67a6, 0x67a1, 0x6785, 0x67b7, - 0x67ef, 0x67b4, 0x67ec, 0x67b3, 0x67e9, 0x67b8, 0x67e4, 0x67de, - 0x67dd, 0x67e2, 0x67ee, 0x67b9, 0x67ce, 0x67c6, 0x67e7, 0x6a9c, - 0x681e, 0x6846, 0x6829, 0x6840, 0x684d, 0x6832, 0x684e, 0x30fb, - 0x68b3, 0x682b, 0x6859, 0x6863, 0x6877, 0x687f, 0x689f, 0x688f, - 0x68ad, 0x6894, 0x689d, 0x689b, 0x6883, 0x6aae, 0x68b9, 0x6874, - 0x68b5, 0x68a0, 0x68ba, 0x690f, 0x688d, 0x687e, 0x6901, 0x68ca, - 0x6908, 0x68d8, 0x6922, 0x6926, 0x68e1, 0x690c, 0x68cd, 0x68d4, - 0x68e7, 0x68d5, 0x6936, 0x6912, 0x6904, 0x68d7, 0x68e3, 0x6925, - 0x68f9, 0x68e0, 0x68ef, 0x6928, 0x692a, 0x691a, 0x6923, 0x6921, - 0x68c6, 0x6979, 0x6977, 0x695c, 0x6978, 0x696b, 0x6954, 0x697e, - 0x696e, 0x6939, 0x6974, 0x693d, 0x6959, 0x6930, 0x6961, 0x695e, - 0x695d, 0x6981, 0x696a, 0x69b2, 0x69ae, 0x69d0, 0x69bf, 0x69c1, - 0x69d3, 0x69be, 0x69ce, 0x5be8, 0x69ca, 0x69dd, 0x69bb, 0x69c3, - 0x69a7, 0x6a2e, 0x6991, 0x69a0, 0x699c, 0x6995, 0x69b4, 0x69de, - 0x69e8, 0x6a02, 0x6a1b, 0x69ff, 0x6b0a, 0x69f9, 0x69f2, 0x69e7, - 0x6a05, 0x69b1, 0x6a1e, 0x69ed, 0x6a14, 0x69eb, 0x6a0a, 0x6a12, - 0x6ac1, 0x6a23, 0x6a13, 0x6a44, 0x6a0c, 0x6a72, 0x6a36, 0x6a78, - 0x6a47, 0x6a62, 0x6a59, 0x6a66, 0x6a48, 0x6a38, 0x6a22, 0x6a90, - 0x6a8d, 0x6aa0, 0x6a84, 0x6aa2, 0x6aa3, 0x30fb, 0x30fb, 0x30fb, - /* lead byte 9f */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x6a97, 0x8617, 0x6abb, 0x6ac3, 0x6ac2, 0x6ab8, 0x6ab3, 0x6aac, - 0x6ade, 0x6ad1, 0x6adf, 0x6aaa, 0x6ada, 0x6aea, 0x6afb, 0x6b05, - 0x8616, 0x6afa, 0x6b12, 0x6b16, 0x9b31, 0x6b1f, 0x6b38, 0x6b37, - 0x76dc, 0x6b39, 0x98ee, 0x6b47, 0x6b43, 0x6b49, 0x6b50, 0x6b59, - 0x6b54, 0x6b5b, 0x6b5f, 0x6b61, 0x6b78, 0x6b79, 0x6b7f, 0x6b80, - 0x6b84, 0x6b83, 0x6b8d, 0x6b98, 0x6b95, 0x6b9e, 0x6ba4, 0x6baa, - 0x6bab, 0x6baf, 0x6bb2, 0x6bb1, 0x6bb3, 0x6bb7, 0x6bbc, 0x6bc6, - 0x6bcb, 0x6bd3, 0x6bdf, 0x6bec, 0x6beb, 0x6bf3, 0x6bef, 0x30fb, - 0x9ebe, 0x6c08, 0x6c13, 0x6c14, 0x6c1b, 0x6c24, 0x6c23, 0x6c5e, - 0x6c55, 0x6c62, 0x6c6a, 0x6c82, 0x6c8d, 0x6c9a, 0x6c81, 0x6c9b, - 0x6c7e, 0x6c68, 0x6c73, 0x6c92, 0x6c90, 0x6cc4, 0x6cf1, 0x6cd3, - 0x6cbd, 0x6cd7, 0x6cc5, 0x6cdd, 0x6cae, 0x6cb1, 0x6cbe, 0x6cba, - 0x6cdb, 0x6cef, 0x6cd9, 0x6cea, 0x6d1f, 0x884d, 0x6d36, 0x6d2b, - 0x6d3d, 0x6d38, 0x6d19, 0x6d35, 0x6d33, 0x6d12, 0x6d0c, 0x6d63, - 0x6d93, 0x6d64, 0x6d5a, 0x6d79, 0x6d59, 0x6d8e, 0x6d95, 0x6fe4, - 0x6d85, 0x6df9, 0x6e15, 0x6e0a, 0x6db5, 0x6dc7, 0x6de6, 0x6db8, - 0x6dc6, 0x6dec, 0x6dde, 0x6dcc, 0x6de8, 0x6dd2, 0x6dc5, 0x6dfa, - 0x6dd9, 0x6de4, 0x6dd5, 0x6dea, 0x6dee, 0x6e2d, 0x6e6e, 0x6e2e, - 0x6e19, 0x6e72, 0x6e5f, 0x6e3e, 0x6e23, 0x6e6b, 0x6e2b, 0x6e76, - 0x6e4d, 0x6e1f, 0x6e43, 0x6e3a, 0x6e4e, 0x6e24, 0x6eff, 0x6e1d, - 0x6e38, 0x6e82, 0x6eaa, 0x6e98, 0x6ec9, 0x6eb7, 0x6ed3, 0x6ebd, - 0x6eaf, 0x6ec4, 0x6eb2, 0x6ed4, 0x6ed5, 0x6e8f, 0x6ea5, 0x6ec2, - 0x6e9f, 0x6f41, 0x6f11, 0x704c, 0x6eec, 0x6ef8, 0x6efe, 0x6f3f, - 0x6ef2, 0x6f31, 0x6eef, 0x6f32, 0x6ecc, 0x30fb, 0x30fb, 0x30fb, - /* lead byte e0 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x6f3e, 0x6f13, 0x6ef7, 0x6f86, 0x6f7a, 0x6f78, 0x6f81, 0x6f80, - 0x6f6f, 0x6f5b, 0x6ff3, 0x6f6d, 0x6f82, 0x6f7c, 0x6f58, 0x6f8e, - 0x6f91, 0x6fc2, 0x6f66, 0x6fb3, 0x6fa3, 0x6fa1, 0x6fa4, 0x6fb9, - 0x6fc6, 0x6faa, 0x6fdf, 0x6fd5, 0x6fec, 0x6fd4, 0x6fd8, 0x6ff1, - 0x6fee, 0x6fdb, 0x7009, 0x700b, 0x6ffa, 0x7011, 0x7001, 0x700f, - 0x6ffe, 0x701b, 0x701a, 0x6f74, 0x701d, 0x7018, 0x701f, 0x7030, - 0x703e, 0x7032, 0x7051, 0x7063, 0x7099, 0x7092, 0x70af, 0x70f1, - 0x70ac, 0x70b8, 0x70b3, 0x70ae, 0x70df, 0x70cb, 0x70dd, 0x30fb, - 0x70d9, 0x7109, 0x70fd, 0x711c, 0x7119, 0x7165, 0x7155, 0x7188, - 0x7166, 0x7162, 0x714c, 0x7156, 0x716c, 0x718f, 0x71fb, 0x7184, - 0x7195, 0x71a8, 0x71ac, 0x71d7, 0x71b9, 0x71be, 0x71d2, 0x71c9, - 0x71d4, 0x71ce, 0x71e0, 0x71ec, 0x71e7, 0x71f5, 0x71fc, 0x71f9, - 0x71ff, 0x720d, 0x7210, 0x721b, 0x7228, 0x722d, 0x722c, 0x7230, - 0x7232, 0x723b, 0x723c, 0x723f, 0x7240, 0x7246, 0x724b, 0x7258, - 0x7274, 0x727e, 0x7282, 0x7281, 0x7287, 0x7292, 0x7296, 0x72a2, - 0x72a7, 0x72b9, 0x72b2, 0x72c3, 0x72c6, 0x72c4, 0x72ce, 0x72d2, - 0x72e2, 0x72e0, 0x72e1, 0x72f9, 0x72f7, 0x500f, 0x7317, 0x730a, - 0x731c, 0x7316, 0x731d, 0x7334, 0x732f, 0x7329, 0x7325, 0x733e, - 0x734e, 0x734f, 0x9ed8, 0x7357, 0x736a, 0x7368, 0x7370, 0x7378, - 0x7375, 0x737b, 0x737a, 0x73c8, 0x73b3, 0x73ce, 0x73bb, 0x73c0, - 0x73e5, 0x73ee, 0x73de, 0x74a2, 0x7405, 0x746f, 0x7425, 0x73f8, - 0x7432, 0x743a, 0x7455, 0x743f, 0x745f, 0x7459, 0x7441, 0x745c, - 0x7469, 0x7470, 0x7463, 0x746a, 0x7476, 0x747e, 0x748b, 0x749e, - 0x74a7, 0x74ca, 0x74cf, 0x74d4, 0x73f1, 0x30fb, 0x30fb, 0x30fb, - /* lead byte e1 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x74e0, 0x74e3, 0x74e7, 0x74e9, 0x74ee, 0x74f2, 0x74f0, 0x74f1, - 0x74f8, 0x74f7, 0x7504, 0x7503, 0x7505, 0x750c, 0x750e, 0x750d, - 0x7515, 0x7513, 0x751e, 0x7526, 0x752c, 0x753c, 0x7544, 0x754d, - 0x754a, 0x7549, 0x755b, 0x7546, 0x755a, 0x7569, 0x7564, 0x7567, - 0x756b, 0x756d, 0x7578, 0x7576, 0x7586, 0x7587, 0x7574, 0x758a, - 0x7589, 0x7582, 0x7594, 0x759a, 0x759d, 0x75a5, 0x75a3, 0x75c2, - 0x75b3, 0x75c3, 0x75b5, 0x75bd, 0x75b8, 0x75bc, 0x75b1, 0x75cd, - 0x75ca, 0x75d2, 0x75d9, 0x75e3, 0x75de, 0x75fe, 0x75ff, 0x30fb, - 0x75fc, 0x7601, 0x75f0, 0x75fa, 0x75f2, 0x75f3, 0x760b, 0x760d, - 0x7609, 0x761f, 0x7627, 0x7620, 0x7621, 0x7622, 0x7624, 0x7634, - 0x7630, 0x763b, 0x7647, 0x7648, 0x7646, 0x765c, 0x7658, 0x7661, - 0x7662, 0x7668, 0x7669, 0x766a, 0x7667, 0x766c, 0x7670, 0x7672, - 0x7676, 0x7678, 0x767c, 0x7680, 0x7683, 0x7688, 0x768b, 0x768e, - 0x7696, 0x7693, 0x7699, 0x769a, 0x76b0, 0x76b4, 0x76b8, 0x76b9, - 0x76ba, 0x76c2, 0x76cd, 0x76d6, 0x76d2, 0x76de, 0x76e1, 0x76e5, - 0x76e7, 0x76ea, 0x862f, 0x76fb, 0x7708, 0x7707, 0x7704, 0x7729, - 0x7724, 0x771e, 0x7725, 0x7726, 0x771b, 0x7737, 0x7738, 0x7747, - 0x775a, 0x7768, 0x776b, 0x775b, 0x7765, 0x777f, 0x777e, 0x7779, - 0x778e, 0x778b, 0x7791, 0x77a0, 0x779e, 0x77b0, 0x77b6, 0x77b9, - 0x77bf, 0x77bc, 0x77bd, 0x77bb, 0x77c7, 0x77cd, 0x77d7, 0x77da, - 0x77dc, 0x77e3, 0x77ee, 0x77fc, 0x780c, 0x7812, 0x7926, 0x7820, - 0x792a, 0x7845, 0x788e, 0x7874, 0x7886, 0x787c, 0x789a, 0x788c, - 0x78a3, 0x78b5, 0x78aa, 0x78af, 0x78d1, 0x78c6, 0x78cb, 0x78d4, - 0x78be, 0x78bc, 0x78c5, 0x78ca, 0x78ec, 0x30fb, 0x30fb, 0x30fb, - /* lead byte e2 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x78e7, 0x78da, 0x78fd, 0x78f4, 0x7907, 0x7912, 0x7911, 0x7919, - 0x792c, 0x792b, 0x7940, 0x7960, 0x7957, 0x795f, 0x795a, 0x7955, - 0x7953, 0x797a, 0x797f, 0x798a, 0x799d, 0x79a7, 0x9f4b, 0x79aa, - 0x79ae, 0x79b3, 0x79b9, 0x79ba, 0x79c9, 0x79d5, 0x79e7, 0x79ec, - 0x79e1, 0x79e3, 0x7a08, 0x7a0d, 0x7a18, 0x7a19, 0x7a20, 0x7a1f, - 0x7980, 0x7a31, 0x7a3b, 0x7a3e, 0x7a37, 0x7a43, 0x7a57, 0x7a49, - 0x7a61, 0x7a62, 0x7a69, 0x9f9d, 0x7a70, 0x7a79, 0x7a7d, 0x7a88, - 0x7a97, 0x7a95, 0x7a98, 0x7a96, 0x7aa9, 0x7ac8, 0x7ab0, 0x30fb, - 0x7ab6, 0x7ac5, 0x7ac4, 0x7abf, 0x9083, 0x7ac7, 0x7aca, 0x7acd, - 0x7acf, 0x7ad5, 0x7ad3, 0x7ad9, 0x7ada, 0x7add, 0x7ae1, 0x7ae2, - 0x7ae6, 0x7aed, 0x7af0, 0x7b02, 0x7b0f, 0x7b0a, 0x7b06, 0x7b33, - 0x7b18, 0x7b19, 0x7b1e, 0x7b35, 0x7b28, 0x7b36, 0x7b50, 0x7b7a, - 0x7b04, 0x7b4d, 0x7b0b, 0x7b4c, 0x7b45, 0x7b75, 0x7b65, 0x7b74, - 0x7b67, 0x7b70, 0x7b71, 0x7b6c, 0x7b6e, 0x7b9d, 0x7b98, 0x7b9f, - 0x7b8d, 0x7b9c, 0x7b9a, 0x7b8b, 0x7b92, 0x7b8f, 0x7b5d, 0x7b99, - 0x7bcb, 0x7bc1, 0x7bcc, 0x7bcf, 0x7bb4, 0x7bc6, 0x7bdd, 0x7be9, - 0x7c11, 0x7c14, 0x7be6, 0x7be5, 0x7c60, 0x7c00, 0x7c07, 0x7c13, - 0x7bf3, 0x7bf7, 0x7c17, 0x7c0d, 0x7bf6, 0x7c23, 0x7c27, 0x7c2a, - 0x7c1f, 0x7c37, 0x7c2b, 0x7c3d, 0x7c4c, 0x7c43, 0x7c54, 0x7c4f, - 0x7c40, 0x7c50, 0x7c58, 0x7c5f, 0x7c64, 0x7c56, 0x7c65, 0x7c6c, - 0x7c75, 0x7c83, 0x7c90, 0x7ca4, 0x7cad, 0x7ca2, 0x7cab, 0x7ca1, - 0x7ca8, 0x7cb3, 0x7cb2, 0x7cb1, 0x7cae, 0x7cb9, 0x7cbd, 0x7cc0, - 0x7cc5, 0x7cc2, 0x7cd8, 0x7cd2, 0x7cdc, 0x7ce2, 0x9b3b, 0x7cef, - 0x7cf2, 0x7cf4, 0x7cf6, 0x7cfa, 0x7d06, 0x30fb, 0x30fb, 0x30fb, - /* lead byte e3 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x7d02, 0x7d1c, 0x7d15, 0x7d0a, 0x7d45, 0x7d4b, 0x7d2e, 0x7d32, - 0x7d3f, 0x7d35, 0x7d46, 0x7d73, 0x7d56, 0x7d4e, 0x7d72, 0x7d68, - 0x7d6e, 0x7d4f, 0x7d63, 0x7d93, 0x7d89, 0x7d5b, 0x7d8f, 0x7d7d, - 0x7d9b, 0x7dba, 0x7dae, 0x7da3, 0x7db5, 0x7dc7, 0x7dbd, 0x7dab, - 0x7e3d, 0x7da2, 0x7daf, 0x7ddc, 0x7db8, 0x7d9f, 0x7db0, 0x7dd8, - 0x7ddd, 0x7de4, 0x7dde, 0x7dfb, 0x7df2, 0x7de1, 0x7e05, 0x7e0a, - 0x7e23, 0x7e21, 0x7e12, 0x7e31, 0x7e1f, 0x7e09, 0x7e0b, 0x7e22, - 0x7e46, 0x7e66, 0x7e3b, 0x7e35, 0x7e39, 0x7e43, 0x7e37, 0x30fb, - 0x7e32, 0x7e3a, 0x7e67, 0x7e5d, 0x7e56, 0x7e5e, 0x7e59, 0x7e5a, - 0x7e79, 0x7e6a, 0x7e69, 0x7e7c, 0x7e7b, 0x7e83, 0x7dd5, 0x7e7d, - 0x8fae, 0x7e7f, 0x7e88, 0x7e89, 0x7e8c, 0x7e92, 0x7e90, 0x7e93, - 0x7e94, 0x7e96, 0x7e8e, 0x7e9b, 0x7e9c, 0x7f38, 0x7f3a, 0x7f45, - 0x7f4c, 0x7f4d, 0x7f4e, 0x7f50, 0x7f51, 0x7f55, 0x7f54, 0x7f58, - 0x7f5f, 0x7f60, 0x7f68, 0x7f69, 0x7f67, 0x7f78, 0x7f82, 0x7f86, - 0x7f83, 0x7f88, 0x7f87, 0x7f8c, 0x7f94, 0x7f9e, 0x7f9d, 0x7f9a, - 0x7fa3, 0x7faf, 0x7fb2, 0x7fb9, 0x7fae, 0x7fb6, 0x7fb8, 0x8b71, - 0x7fc5, 0x7fc6, 0x7fca, 0x7fd5, 0x7fd4, 0x7fe1, 0x7fe6, 0x7fe9, - 0x7ff3, 0x7ff9, 0x98dc, 0x8006, 0x8004, 0x800b, 0x8012, 0x8018, - 0x8019, 0x801c, 0x8021, 0x8028, 0x803f, 0x803b, 0x804a, 0x8046, - 0x8052, 0x8058, 0x805a, 0x805f, 0x8062, 0x8068, 0x8073, 0x8072, - 0x8070, 0x8076, 0x8079, 0x807d, 0x807f, 0x8084, 0x8086, 0x8085, - 0x809b, 0x8093, 0x809a, 0x80ad, 0x5190, 0x80ac, 0x80db, 0x80e5, - 0x80d9, 0x80dd, 0x80c4, 0x80da, 0x80d6, 0x8109, 0x80ef, 0x80f1, - 0x811b, 0x8129, 0x8123, 0x812f, 0x814b, 0x30fb, 0x30fb, 0x30fb, - /* lead byte e4 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x968b, 0x8146, 0x813e, 0x8153, 0x8151, 0x80fc, 0x8171, 0x816e, - 0x8165, 0x8166, 0x8174, 0x8183, 0x8188, 0x818a, 0x8180, 0x8182, - 0x81a0, 0x8195, 0x81a4, 0x81a3, 0x815f, 0x8193, 0x81a9, 0x81b0, - 0x81b5, 0x81be, 0x81b8, 0x81bd, 0x81c0, 0x81c2, 0x81ba, 0x81c9, - 0x81cd, 0x81d1, 0x81d9, 0x81d8, 0x81c8, 0x81da, 0x81df, 0x81e0, - 0x81e7, 0x81fa, 0x81fb, 0x81fe, 0x8201, 0x8202, 0x8205, 0x8207, - 0x820a, 0x820d, 0x8210, 0x8216, 0x8229, 0x822b, 0x8238, 0x8233, - 0x8240, 0x8259, 0x8258, 0x825d, 0x825a, 0x825f, 0x8264, 0x30fb, - 0x8262, 0x8268, 0x826a, 0x826b, 0x822e, 0x8271, 0x8277, 0x8278, - 0x827e, 0x828d, 0x8292, 0x82ab, 0x829f, 0x82bb, 0x82ac, 0x82e1, - 0x82e3, 0x82df, 0x82d2, 0x82f4, 0x82f3, 0x82fa, 0x8393, 0x8303, - 0x82fb, 0x82f9, 0x82de, 0x8306, 0x82dc, 0x8309, 0x82d9, 0x8335, - 0x8334, 0x8316, 0x8332, 0x8331, 0x8340, 0x8339, 0x8350, 0x8345, - 0x832f, 0x832b, 0x8317, 0x8318, 0x8385, 0x839a, 0x83aa, 0x839f, - 0x83a2, 0x8396, 0x8323, 0x838e, 0x8387, 0x838a, 0x837c, 0x83b5, - 0x8373, 0x8375, 0x83a0, 0x8389, 0x83a8, 0x83f4, 0x8413, 0x83eb, - 0x83ce, 0x83fd, 0x8403, 0x83d8, 0x840b, 0x83c1, 0x83f7, 0x8407, - 0x83e0, 0x83f2, 0x840d, 0x8422, 0x8420, 0x83bd, 0x8438, 0x8506, - 0x83fb, 0x846d, 0x842a, 0x843c, 0x855a, 0x8484, 0x8477, 0x846b, - 0x84ad, 0x846e, 0x8482, 0x8469, 0x8446, 0x842c, 0x846f, 0x8479, - 0x8435, 0x84ca, 0x8462, 0x84b9, 0x84bf, 0x849f, 0x84d9, 0x84cd, - 0x84bb, 0x84da, 0x84d0, 0x84c1, 0x84c6, 0x84d6, 0x84a1, 0x8521, - 0x84ff, 0x84f4, 0x8517, 0x8518, 0x852c, 0x851f, 0x8515, 0x8514, - 0x84fc, 0x8540, 0x8563, 0x8558, 0x8548, 0x30fb, 0x30fb, 0x30fb, - /* lead byte e5 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x8541, 0x8602, 0x854b, 0x8555, 0x8580, 0x85a4, 0x8588, 0x8591, - 0x858a, 0x85a8, 0x856d, 0x8594, 0x859b, 0x85ea, 0x8587, 0x859c, - 0x8577, 0x857e, 0x8590, 0x85c9, 0x85ba, 0x85cf, 0x85b9, 0x85d0, - 0x85d5, 0x85dd, 0x85e5, 0x85dc, 0x85f9, 0x860a, 0x8613, 0x860b, - 0x85fe, 0x85fa, 0x8606, 0x8622, 0x861a, 0x8630, 0x863f, 0x864d, - 0x4e55, 0x8654, 0x865f, 0x8667, 0x8671, 0x8693, 0x86a3, 0x86a9, - 0x86aa, 0x868b, 0x868c, 0x86b6, 0x86af, 0x86c4, 0x86c6, 0x86b0, - 0x86c9, 0x8823, 0x86ab, 0x86d4, 0x86de, 0x86e9, 0x86ec, 0x30fb, - 0x86df, 0x86db, 0x86ef, 0x8712, 0x8706, 0x8708, 0x8700, 0x8703, - 0x86fb, 0x8711, 0x8709, 0x870d, 0x86f9, 0x870a, 0x8734, 0x873f, - 0x8737, 0x873b, 0x8725, 0x8729, 0x871a, 0x8760, 0x875f, 0x8778, - 0x874c, 0x874e, 0x8774, 0x8757, 0x8768, 0x876e, 0x8759, 0x8753, - 0x8763, 0x876a, 0x8805, 0x87a2, 0x879f, 0x8782, 0x87af, 0x87cb, - 0x87bd, 0x87c0, 0x87d0, 0x96d6, 0x87ab, 0x87c4, 0x87b3, 0x87c7, - 0x87c6, 0x87bb, 0x87ef, 0x87f2, 0x87e0, 0x880f, 0x880d, 0x87fe, - 0x87f6, 0x87f7, 0x880e, 0x87d2, 0x8811, 0x8816, 0x8815, 0x8822, - 0x8821, 0x8831, 0x8836, 0x8839, 0x8827, 0x883b, 0x8844, 0x8842, - 0x8852, 0x8859, 0x885e, 0x8862, 0x886b, 0x8881, 0x887e, 0x889e, - 0x8875, 0x887d, 0x88b5, 0x8872, 0x8882, 0x8897, 0x8892, 0x88ae, - 0x8899, 0x88a2, 0x888d, 0x88a4, 0x88b0, 0x88bf, 0x88b1, 0x88c3, - 0x88c4, 0x88d4, 0x88d8, 0x88d9, 0x88dd, 0x88f9, 0x8902, 0x88fc, - 0x88f4, 0x88e8, 0x88f2, 0x8904, 0x890c, 0x890a, 0x8913, 0x8943, - 0x891e, 0x8925, 0x892a, 0x892b, 0x8941, 0x8944, 0x893b, 0x8936, - 0x8938, 0x894c, 0x891d, 0x8960, 0x895e, 0x30fb, 0x30fb, 0x30fb, - /* lead byte e6 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x8966, 0x8964, 0x896d, 0x896a, 0x896f, 0x8974, 0x8977, 0x897e, - 0x8983, 0x8988, 0x898a, 0x8993, 0x8998, 0x89a1, 0x89a9, 0x89a6, - 0x89ac, 0x89af, 0x89b2, 0x89ba, 0x89bd, 0x89bf, 0x89c0, 0x89da, - 0x89dc, 0x89dd, 0x89e7, 0x89f4, 0x89f8, 0x8a03, 0x8a16, 0x8a10, - 0x8a0c, 0x8a1b, 0x8a1d, 0x8a25, 0x8a36, 0x8a41, 0x8a5b, 0x8a52, - 0x8a46, 0x8a48, 0x8a7c, 0x8a6d, 0x8a6c, 0x8a62, 0x8a85, 0x8a82, - 0x8a84, 0x8aa8, 0x8aa1, 0x8a91, 0x8aa5, 0x8aa6, 0x8a9a, 0x8aa3, - 0x8ac4, 0x8acd, 0x8ac2, 0x8ada, 0x8aeb, 0x8af3, 0x8ae7, 0x30fb, - 0x8ae4, 0x8af1, 0x8b14, 0x8ae0, 0x8ae2, 0x8af7, 0x8ade, 0x8adb, - 0x8b0c, 0x8b07, 0x8b1a, 0x8ae1, 0x8b16, 0x8b10, 0x8b17, 0x8b20, - 0x8b33, 0x97ab, 0x8b26, 0x8b2b, 0x8b3e, 0x8b28, 0x8b41, 0x8b4c, - 0x8b4f, 0x8b4e, 0x8b49, 0x8b56, 0x8b5b, 0x8b5a, 0x8b6b, 0x8b5f, - 0x8b6c, 0x8b6f, 0x8b74, 0x8b7d, 0x8b80, 0x8b8c, 0x8b8e, 0x8b92, - 0x8b93, 0x8b96, 0x8b99, 0x8b9a, 0x8c3a, 0x8c41, 0x8c3f, 0x8c48, - 0x8c4c, 0x8c4e, 0x8c50, 0x8c55, 0x8c62, 0x8c6c, 0x8c78, 0x8c7a, - 0x8c82, 0x8c89, 0x8c85, 0x8c8a, 0x8c8d, 0x8c8e, 0x8c94, 0x8c7c, - 0x8c98, 0x621d, 0x8cad, 0x8caa, 0x8cbd, 0x8cb2, 0x8cb3, 0x8cae, - 0x8cb6, 0x8cc8, 0x8cc1, 0x8ce4, 0x8ce3, 0x8cda, 0x8cfd, 0x8cfa, - 0x8cfb, 0x8d04, 0x8d05, 0x8d0a, 0x8d07, 0x8d0f, 0x8d0d, 0x8d10, - 0x9f4e, 0x8d13, 0x8ccd, 0x8d14, 0x8d16, 0x8d67, 0x8d6d, 0x8d71, - 0x8d73, 0x8d81, 0x8d99, 0x8dc2, 0x8dbe, 0x8dba, 0x8dcf, 0x8dda, - 0x8dd6, 0x8dcc, 0x8ddb, 0x8dcb, 0x8dea, 0x8deb, 0x8ddf, 0x8de3, - 0x8dfc, 0x8e08, 0x8e09, 0x8dff, 0x8e1d, 0x8e1e, 0x8e10, 0x8e1f, - 0x8e42, 0x8e35, 0x8e30, 0x8e34, 0x8e4a, 0x30fb, 0x30fb, 0x30fb, - /* lead byte e7 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x8e47, 0x8e49, 0x8e4c, 0x8e50, 0x8e48, 0x8e59, 0x8e64, 0x8e60, - 0x8e2a, 0x8e63, 0x8e55, 0x8e76, 0x8e72, 0x8e7c, 0x8e81, 0x8e87, - 0x8e85, 0x8e84, 0x8e8b, 0x8e8a, 0x8e93, 0x8e91, 0x8e94, 0x8e99, - 0x8eaa, 0x8ea1, 0x8eac, 0x8eb0, 0x8ec6, 0x8eb1, 0x8ebe, 0x8ec5, - 0x8ec8, 0x8ecb, 0x8edb, 0x8ee3, 0x8efc, 0x8efb, 0x8eeb, 0x8efe, - 0x8f0a, 0x8f05, 0x8f15, 0x8f12, 0x8f19, 0x8f13, 0x8f1c, 0x8f1f, - 0x8f1b, 0x8f0c, 0x8f26, 0x8f33, 0x8f3b, 0x8f39, 0x8f45, 0x8f42, - 0x8f3e, 0x8f4c, 0x8f49, 0x8f46, 0x8f4e, 0x8f57, 0x8f5c, 0x30fb, - 0x8f62, 0x8f63, 0x8f64, 0x8f9c, 0x8f9f, 0x8fa3, 0x8fad, 0x8faf, - 0x8fb7, 0x8fda, 0x8fe5, 0x8fe2, 0x8fea, 0x8fef, 0x9087, 0x8ff4, - 0x9005, 0x8ff9, 0x8ffa, 0x9011, 0x9015, 0x9021, 0x900d, 0x901e, - 0x9016, 0x900b, 0x9027, 0x9036, 0x9035, 0x9039, 0x8ff8, 0x904f, - 0x9050, 0x9051, 0x9052, 0x900e, 0x9049, 0x903e, 0x9056, 0x9058, - 0x905e, 0x9068, 0x906f, 0x9076, 0x96a8, 0x9072, 0x9082, 0x907d, - 0x9081, 0x9080, 0x908a, 0x9089, 0x908f, 0x90a8, 0x90af, 0x90b1, - 0x90b5, 0x90e2, 0x90e4, 0x6248, 0x90db, 0x9102, 0x9112, 0x9119, - 0x9132, 0x9130, 0x914a, 0x9156, 0x9158, 0x9163, 0x9165, 0x9169, - 0x9173, 0x9172, 0x918b, 0x9189, 0x9182, 0x91a2, 0x91ab, 0x91af, - 0x91aa, 0x91b5, 0x91b4, 0x91ba, 0x91c0, 0x91c1, 0x91c9, 0x91cb, - 0x91d0, 0x91d6, 0x91df, 0x91e1, 0x91db, 0x91fc, 0x91f5, 0x91f6, - 0x921e, 0x91ff, 0x9214, 0x922c, 0x9215, 0x9211, 0x925e, 0x9257, - 0x9245, 0x9249, 0x9264, 0x9248, 0x9295, 0x923f, 0x924b, 0x9250, - 0x929c, 0x9296, 0x9293, 0x929b, 0x925a, 0x92cf, 0x92b9, 0x92b7, - 0x92e9, 0x930f, 0x92fa, 0x9344, 0x932e, 0x30fb, 0x30fb, 0x30fb, - /* lead byte e8 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x9319, 0x9322, 0x931a, 0x9323, 0x933a, 0x9335, 0x933b, 0x935c, - 0x9360, 0x937c, 0x936e, 0x9356, 0x93b0, 0x93ac, 0x93ad, 0x9394, - 0x93b9, 0x93d6, 0x93d7, 0x93e8, 0x93e5, 0x93d8, 0x93c3, 0x93dd, - 0x93d0, 0x93c8, 0x93e4, 0x941a, 0x9414, 0x9413, 0x9403, 0x9407, - 0x9410, 0x9436, 0x942b, 0x9435, 0x9421, 0x943a, 0x9441, 0x9452, - 0x9444, 0x945b, 0x9460, 0x9462, 0x945e, 0x946a, 0x9229, 0x9470, - 0x9475, 0x9477, 0x947d, 0x945a, 0x947c, 0x947e, 0x9481, 0x947f, - 0x9582, 0x9587, 0x958a, 0x9594, 0x9596, 0x9598, 0x9599, 0x30fb, - 0x95a0, 0x95a8, 0x95a7, 0x95ad, 0x95bc, 0x95bb, 0x95b9, 0x95be, - 0x95ca, 0x6ff6, 0x95c3, 0x95cd, 0x95cc, 0x95d5, 0x95d4, 0x95d6, - 0x95dc, 0x95e1, 0x95e5, 0x95e2, 0x9621, 0x9628, 0x962e, 0x962f, - 0x9642, 0x964c, 0x964f, 0x964b, 0x9677, 0x965c, 0x965e, 0x965d, - 0x965f, 0x9666, 0x9672, 0x966c, 0x968d, 0x9698, 0x9695, 0x9697, - 0x96aa, 0x96a7, 0x96b1, 0x96b2, 0x96b0, 0x96b4, 0x96b6, 0x96b8, - 0x96b9, 0x96ce, 0x96cb, 0x96c9, 0x96cd, 0x894d, 0x96dc, 0x970d, - 0x96d5, 0x96f9, 0x9704, 0x9706, 0x9708, 0x9713, 0x970e, 0x9711, - 0x970f, 0x9716, 0x9719, 0x9724, 0x972a, 0x9730, 0x9739, 0x973d, - 0x973e, 0x9744, 0x9746, 0x9748, 0x9742, 0x9749, 0x975c, 0x9760, - 0x9764, 0x9766, 0x9768, 0x52d2, 0x976b, 0x9771, 0x9779, 0x9785, - 0x977c, 0x9781, 0x977a, 0x9786, 0x978b, 0x978f, 0x9790, 0x979c, - 0x97a8, 0x97a6, 0x97a3, 0x97b3, 0x97b4, 0x97c3, 0x97c6, 0x97c8, - 0x97cb, 0x97dc, 0x97ed, 0x9f4f, 0x97f2, 0x7adf, 0x97f6, 0x97f5, - 0x980f, 0x980c, 0x9838, 0x9824, 0x9821, 0x9837, 0x983d, 0x9846, - 0x984f, 0x984b, 0x986b, 0x986f, 0x9870, 0x30fb, 0x30fb, 0x30fb, - /* lead byte e9 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x9871, 0x9874, 0x9873, 0x98aa, 0x98af, 0x98b1, 0x98b6, 0x98c4, - 0x98c3, 0x98c6, 0x98e9, 0x98eb, 0x9903, 0x9909, 0x9912, 0x9914, - 0x9918, 0x9921, 0x991d, 0x991e, 0x9924, 0x9920, 0x992c, 0x992e, - 0x993d, 0x993e, 0x9942, 0x9949, 0x9945, 0x9950, 0x994b, 0x9951, - 0x9952, 0x994c, 0x9955, 0x9997, 0x9998, 0x99a5, 0x99ad, 0x99ae, - 0x99bc, 0x99df, 0x99db, 0x99dd, 0x99d8, 0x99d1, 0x99ed, 0x99ee, - 0x99f1, 0x99f2, 0x99fb, 0x99f8, 0x9a01, 0x9a0f, 0x9a05, 0x99e2, - 0x9a19, 0x9a2b, 0x9a37, 0x9a45, 0x9a42, 0x9a40, 0x9a43, 0x30fb, - 0x9a3e, 0x9a55, 0x9a4d, 0x9a5b, 0x9a57, 0x9a5f, 0x9a62, 0x9a65, - 0x9a64, 0x9a69, 0x9a6b, 0x9a6a, 0x9aad, 0x9ab0, 0x9abc, 0x9ac0, - 0x9acf, 0x9ad1, 0x9ad3, 0x9ad4, 0x9ade, 0x9adf, 0x9ae2, 0x9ae3, - 0x9ae6, 0x9aef, 0x9aeb, 0x9aee, 0x9af4, 0x9af1, 0x9af7, 0x9afb, - 0x9b06, 0x9b18, 0x9b1a, 0x9b1f, 0x9b22, 0x9b23, 0x9b25, 0x9b27, - 0x9b28, 0x9b29, 0x9b2a, 0x9b2e, 0x9b2f, 0x9b32, 0x9b44, 0x9b43, - 0x9b4f, 0x9b4d, 0x9b4e, 0x9b51, 0x9b58, 0x9b74, 0x9b93, 0x9b83, - 0x9b91, 0x9b96, 0x9b97, 0x9b9f, 0x9ba0, 0x9ba8, 0x9bb4, 0x9bc0, - 0x9bca, 0x9bb9, 0x9bc6, 0x9bcf, 0x9bd1, 0x9bd2, 0x9be3, 0x9be2, - 0x9be4, 0x9bd4, 0x9be1, 0x9c3a, 0x9bf2, 0x9bf1, 0x9bf0, 0x9c15, - 0x9c14, 0x9c09, 0x9c13, 0x9c0c, 0x9c06, 0x9c08, 0x9c12, 0x9c0a, - 0x9c04, 0x9c2e, 0x9c1b, 0x9c25, 0x9c24, 0x9c21, 0x9c30, 0x9c47, - 0x9c32, 0x9c46, 0x9c3e, 0x9c5a, 0x9c60, 0x9c67, 0x9c76, 0x9c78, - 0x9ce7, 0x9cec, 0x9cf0, 0x9d09, 0x9d08, 0x9ceb, 0x9d03, 0x9d06, - 0x9d2a, 0x9d26, 0x9daf, 0x9d23, 0x9d1f, 0x9d44, 0x9d15, 0x9d12, - 0x9d41, 0x9d3f, 0x9d3e, 0x9d46, 0x9d48, 0x30fb, 0x30fb, 0x30fb, - /* lead byte ea */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x9d5d, 0x9d5e, 0x9d64, 0x9d51, 0x9d50, 0x9d59, 0x9d72, 0x9d89, - 0x9d87, 0x9dab, 0x9d6f, 0x9d7a, 0x9d9a, 0x9da4, 0x9da9, 0x9db2, - 0x9dc4, 0x9dc1, 0x9dbb, 0x9db8, 0x9dba, 0x9dc6, 0x9dcf, 0x9dc2, - 0x9dd9, 0x9dd3, 0x9df8, 0x9de6, 0x9ded, 0x9def, 0x9dfd, 0x9e1a, - 0x9e1b, 0x9e1e, 0x9e75, 0x9e79, 0x9e7d, 0x9e81, 0x9e88, 0x9e8b, - 0x9e8c, 0x9e92, 0x9e95, 0x9e91, 0x9e9d, 0x9ea5, 0x9ea9, 0x9eb8, - 0x9eaa, 0x9ead, 0x9761, 0x9ecc, 0x9ece, 0x9ecf, 0x9ed0, 0x9ed4, - 0x9edc, 0x9ede, 0x9edd, 0x9ee0, 0x9ee5, 0x9ee8, 0x9eef, 0x30fb, - 0x9ef4, 0x9ef6, 0x9ef7, 0x9ef9, 0x9efb, 0x9efc, 0x9efd, 0x9f07, - 0x9f08, 0x76b7, 0x9f15, 0x9f21, 0x9f2c, 0x9f3e, 0x9f4a, 0x9f52, - 0x9f54, 0x9f63, 0x9f5f, 0x9f60, 0x9f61, 0x9f66, 0x9f67, 0x9f6c, - 0x9f6a, 0x9f77, 0x9f72, 0x9f76, 0x9f95, 0x9f9c, 0x9fa0, 0x582f, - 0x69c7, 0x9059, 0x7464, 0x51dc, 0x7199, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - /* lead byte eb */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - /* lead byte ec */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - /* lead byte ed */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x7e8a, 0x891c, 0x9348, 0x9288, 0x84dc, 0x4fc9, 0x70bb, 0x6631, - 0x68c8, 0x92f9, 0x66fb, 0x5f45, 0x4e28, 0x4ee1, 0x4efc, 0x4f00, - 0x4f03, 0x4f39, 0x4f56, 0x4f92, 0x4f8a, 0x4f9a, 0x4f94, 0x4fcd, - 0x5040, 0x5022, 0x4fff, 0x501e, 0x5046, 0x5070, 0x5042, 0x5094, - 0x50f4, 0x50d8, 0x514a, 0x5164, 0x519d, 0x51be, 0x51ec, 0x5215, - 0x529c, 0x52a6, 0x52c0, 0x52db, 0x5300, 0x5307, 0x5324, 0x5372, - 0x5393, 0x53b2, 0x53dd, 0xfa0e, 0x549c, 0x548a, 0x54a9, 0x54ff, - 0x5586, 0x5759, 0x5765, 0x57ac, 0x57c8, 0x57c7, 0xfa0f, 0x30fb, - 0xfa10, 0x589e, 0x58b2, 0x590b, 0x5953, 0x595b, 0x595d, 0x5963, - 0x59a4, 0x59ba, 0x5b56, 0x5bc0, 0x752f, 0x5bd8, 0x5bec, 0x5c1e, - 0x5ca6, 0x5cba, 0x5cf5, 0x5d27, 0x5d53, 0xfa11, 0x5d42, 0x5d6d, - 0x5db8, 0x5db9, 0x5dd0, 0x5f21, 0x5f34, 0x5f67, 0x5fb7, 0x5fde, - 0x605d, 0x6085, 0x608a, 0x60de, 0x60d5, 0x6120, 0x60f2, 0x6111, - 0x6137, 0x6130, 0x6198, 0x6213, 0x62a6, 0x63f5, 0x6460, 0x649d, - 0x64ce, 0x654e, 0x6600, 0x6615, 0x663b, 0x6609, 0x662e, 0x661e, - 0x6624, 0x6665, 0x6657, 0x6659, 0xfa12, 0x6673, 0x6699, 0x66a0, - 0x66b2, 0x66bf, 0x66fa, 0x670e, 0xf929, 0x6766, 0x67bb, 0x6852, - 0x67c0, 0x6801, 0x6844, 0x68cf, 0xfa13, 0x6968, 0xfa14, 0x6998, - 0x69e2, 0x6a30, 0x6a6b, 0x6a46, 0x6a73, 0x6a7e, 0x6ae2, 0x6ae4, - 0x6bd6, 0x6c3f, 0x6c5c, 0x6c86, 0x6c6f, 0x6cda, 0x6d04, 0x6d87, - 0x6d6f, 0x6d96, 0x6dac, 0x6dcf, 0x6df8, 0x6df2, 0x6dfc, 0x6e39, - 0x6e5c, 0x6e27, 0x6e3c, 0x6ebf, 0x6f88, 0x6fb5, 0x6ff5, 0x7005, - 0x7007, 0x7028, 0x7085, 0x70ab, 0x710f, 0x7104, 0x715c, 0x7146, - 0x7147, 0xfa15, 0x71c1, 0x71fe, 0x72b1, 0x30fb, 0x30fb, 0x30fb, - /* lead byte ee */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x72be, 0x7324, 0xfa16, 0x7377, 0x73bd, 0x73c9, 0x73d6, 0x73e3, - 0x73d2, 0x7407, 0x73f5, 0x7426, 0x742a, 0x7429, 0x742e, 0x7462, - 0x7489, 0x749f, 0x7501, 0x756f, 0x7682, 0x769c, 0x769e, 0x769b, - 0x76a6, 0xfa17, 0x7746, 0x52af, 0x7821, 0x784e, 0x7864, 0x787a, - 0x7930, 0xfa18, 0xfa19, 0xfa1a, 0x7994, 0xfa1b, 0x799b, 0x7ad1, - 0x7ae7, 0xfa1c, 0x7aeb, 0x7b9e, 0xfa1d, 0x7d48, 0x7d5c, 0x7db7, - 0x7da0, 0x7dd6, 0x7e52, 0x7f47, 0x7fa1, 0xfa1e, 0x8301, 0x8362, - 0x837f, 0x83c7, 0x83f6, 0x8448, 0x84b4, 0x8553, 0x8559, 0x30fb, - 0x856b, 0xfa1f, 0x85b0, 0xfa20, 0xfa21, 0x8807, 0x88f5, 0x8a12, - 0x8a37, 0x8a79, 0x8aa7, 0x8abe, 0x8adf, 0xfa22, 0x8af6, 0x8b53, - 0x8b7f, 0x8cf0, 0x8cf4, 0x8d12, 0x8d76, 0xfa23, 0x8ecf, 0xfa24, - 0xfa25, 0x9067, 0x90de, 0xfa26, 0x9115, 0x9127, 0x91da, 0x91d7, - 0x91de, 0x91ed, 0x91ee, 0x91e4, 0x91e5, 0x9206, 0x9210, 0x920a, - 0x923a, 0x9240, 0x923c, 0x924e, 0x9259, 0x9251, 0x9239, 0x9267, - 0x92a7, 0x9277, 0x9278, 0x92e7, 0x92d7, 0x92d9, 0x92d0, 0xfa27, - 0x92d5, 0x92e0, 0x92d3, 0x9325, 0x9321, 0x92fb, 0xfa28, 0x931e, - 0x92ff, 0x931d, 0x9302, 0x9370, 0x9357, 0x93a4, 0x93c6, 0x93de, - 0x93f8, 0x9431, 0x9445, 0x9448, 0x9592, 0xf9dc, 0xfa29, 0x969d, - 0x96af, 0x9733, 0x973b, 0x9743, 0x974d, 0x974f, 0x9751, 0x9755, - 0x9857, 0x9865, 0xfa2a, 0xfa2b, 0x9927, 0xfa2c, 0x999e, 0x9a4e, - 0x9ad9, 0x9adc, 0x9b75, 0x9b72, 0x9b8f, 0x9bb1, 0x9bbb, 0x9c00, - 0x9d70, 0x9d6b, 0xfa2d, 0x9e19, 0x9ed1, 0x30fb, 0x30fb, 0x2170, - 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, - 0x2179, 0xffe2, 0xffe4, 0xff07, 0xff02, 0x30fb, 0x30fb, 0x30fb, - /* lead byte ef */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - /* lead byte f0 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0xe000, 0xe001, 0xe002, 0xe003, 0xe004, 0xe005, 0xe006, 0xe007, - 0xe008, 0xe009, 0xe00a, 0xe00b, 0xe00c, 0xe00d, 0xe00e, 0xe00f, - 0xe010, 0xe011, 0xe012, 0xe013, 0xe014, 0xe015, 0xe016, 0xe017, - 0xe018, 0xe019, 0xe01a, 0xe01b, 0xe01c, 0xe01d, 0xe01e, 0xe01f, - 0xe020, 0xe021, 0xe022, 0xe023, 0xe024, 0xe025, 0xe026, 0xe027, - 0xe028, 0xe029, 0xe02a, 0xe02b, 0xe02c, 0xe02d, 0xe02e, 0xe02f, - 0xe030, 0xe031, 0xe032, 0xe033, 0xe034, 0xe035, 0xe036, 0xe037, - 0xe038, 0xe039, 0xe03a, 0xe03b, 0xe03c, 0xe03d, 0xe03e, 0x30fb, - 0xe03f, 0xe040, 0xe041, 0xe042, 0xe043, 0xe044, 0xe045, 0xe046, - 0xe047, 0xe048, 0xe049, 0xe04a, 0xe04b, 0xe04c, 0xe04d, 0xe04e, - 0xe04f, 0xe050, 0xe051, 0xe052, 0xe053, 0xe054, 0xe055, 0xe056, - 0xe057, 0xe058, 0xe059, 0xe05a, 0xe05b, 0xe05c, 0xe05d, 0xe05e, - 0xe05f, 0xe060, 0xe061, 0xe062, 0xe063, 0xe064, 0xe065, 0xe066, - 0xe067, 0xe068, 0xe069, 0xe06a, 0xe06b, 0xe06c, 0xe06d, 0xe06e, - 0xe06f, 0xe070, 0xe071, 0xe072, 0xe073, 0xe074, 0xe075, 0xe076, - 0xe077, 0xe078, 0xe079, 0xe07a, 0xe07b, 0xe07c, 0xe07d, 0xe07e, - 0xe07f, 0xe080, 0xe081, 0xe082, 0xe083, 0xe084, 0xe085, 0xe086, - 0xe087, 0xe088, 0xe089, 0xe08a, 0xe08b, 0xe08c, 0xe08d, 0xe08e, - 0xe08f, 0xe090, 0xe091, 0xe092, 0xe093, 0xe094, 0xe095, 0xe096, - 0xe097, 0xe098, 0xe099, 0xe09a, 0xe09b, 0xe09c, 0xe09d, 0xe09e, - 0xe09f, 0xe0a0, 0xe0a1, 0xe0a2, 0xe0a3, 0xe0a4, 0xe0a5, 0xe0a6, - 0xe0a7, 0xe0a8, 0xe0a9, 0xe0aa, 0xe0ab, 0xe0ac, 0xe0ad, 0xe0ae, - 0xe0af, 0xe0b0, 0xe0b1, 0xe0b2, 0xe0b3, 0xe0b4, 0xe0b5, 0xe0b6, - 0xe0b7, 0xe0b8, 0xe0b9, 0xe0ba, 0xe0bb, 0x30fb, 0x30fb, 0x30fb, - /* lead byte f1 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0xe0bc, 0xe0bd, 0xe0be, 0xe0bf, 0xe0c0, 0xe0c1, 0xe0c2, 0xe0c3, - 0xe0c4, 0xe0c5, 0xe0c6, 0xe0c7, 0xe0c8, 0xe0c9, 0xe0ca, 0xe0cb, - 0xe0cc, 0xe0cd, 0xe0ce, 0xe0cf, 0xe0d0, 0xe0d1, 0xe0d2, 0xe0d3, - 0xe0d4, 0xe0d5, 0xe0d6, 0xe0d7, 0xe0d8, 0xe0d9, 0xe0da, 0xe0db, - 0xe0dc, 0xe0dd, 0xe0de, 0xe0df, 0xe0e0, 0xe0e1, 0xe0e2, 0xe0e3, - 0xe0e4, 0xe0e5, 0xe0e6, 0xe0e7, 0xe0e8, 0xe0e9, 0xe0ea, 0xe0eb, - 0xe0ec, 0xe0ed, 0xe0ee, 0xe0ef, 0xe0f0, 0xe0f1, 0xe0f2, 0xe0f3, - 0xe0f4, 0xe0f5, 0xe0f6, 0xe0f7, 0xe0f8, 0xe0f9, 0xe0fa, 0x30fb, - 0xe0fb, 0xe0fc, 0xe0fd, 0xe0fe, 0xe0ff, 0xe100, 0xe101, 0xe102, - 0xe103, 0xe104, 0xe105, 0xe106, 0xe107, 0xe108, 0xe109, 0xe10a, - 0xe10b, 0xe10c, 0xe10d, 0xe10e, 0xe10f, 0xe110, 0xe111, 0xe112, - 0xe113, 0xe114, 0xe115, 0xe116, 0xe117, 0xe118, 0xe119, 0xe11a, - 0xe11b, 0xe11c, 0xe11d, 0xe11e, 0xe11f, 0xe120, 0xe121, 0xe122, - 0xe123, 0xe124, 0xe125, 0xe126, 0xe127, 0xe128, 0xe129, 0xe12a, - 0xe12b, 0xe12c, 0xe12d, 0xe12e, 0xe12f, 0xe130, 0xe131, 0xe132, - 0xe133, 0xe134, 0xe135, 0xe136, 0xe137, 0xe138, 0xe139, 0xe13a, - 0xe13b, 0xe13c, 0xe13d, 0xe13e, 0xe13f, 0xe140, 0xe141, 0xe142, - 0xe143, 0xe144, 0xe145, 0xe146, 0xe147, 0xe148, 0xe149, 0xe14a, - 0xe14b, 0xe14c, 0xe14d, 0xe14e, 0xe14f, 0xe150, 0xe151, 0xe152, - 0xe153, 0xe154, 0xe155, 0xe156, 0xe157, 0xe158, 0xe159, 0xe15a, - 0xe15b, 0xe15c, 0xe15d, 0xe15e, 0xe15f, 0xe160, 0xe161, 0xe162, - 0xe163, 0xe164, 0xe165, 0xe166, 0xe167, 0xe168, 0xe169, 0xe16a, - 0xe16b, 0xe16c, 0xe16d, 0xe16e, 0xe16f, 0xe170, 0xe171, 0xe172, - 0xe173, 0xe174, 0xe175, 0xe176, 0xe177, 0x30fb, 0x30fb, 0x30fb, - /* lead byte f2 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0xe178, 0xe179, 0xe17a, 0xe17b, 0xe17c, 0xe17d, 0xe17e, 0xe17f, - 0xe180, 0xe181, 0xe182, 0xe183, 0xe184, 0xe185, 0xe186, 0xe187, - 0xe188, 0xe189, 0xe18a, 0xe18b, 0xe18c, 0xe18d, 0xe18e, 0xe18f, - 0xe190, 0xe191, 0xe192, 0xe193, 0xe194, 0xe195, 0xe196, 0xe197, - 0xe198, 0xe199, 0xe19a, 0xe19b, 0xe19c, 0xe19d, 0xe19e, 0xe19f, - 0xe1a0, 0xe1a1, 0xe1a2, 0xe1a3, 0xe1a4, 0xe1a5, 0xe1a6, 0xe1a7, - 0xe1a8, 0xe1a9, 0xe1aa, 0xe1ab, 0xe1ac, 0xe1ad, 0xe1ae, 0xe1af, - 0xe1b0, 0xe1b1, 0xe1b2, 0xe1b3, 0xe1b4, 0xe1b5, 0xe1b6, 0x30fb, - 0xe1b7, 0xe1b8, 0xe1b9, 0xe1ba, 0xe1bb, 0xe1bc, 0xe1bd, 0xe1be, - 0xe1bf, 0xe1c0, 0xe1c1, 0xe1c2, 0xe1c3, 0xe1c4, 0xe1c5, 0xe1c6, - 0xe1c7, 0xe1c8, 0xe1c9, 0xe1ca, 0xe1cb, 0xe1cc, 0xe1cd, 0xe1ce, - 0xe1cf, 0xe1d0, 0xe1d1, 0xe1d2, 0xe1d3, 0xe1d4, 0xe1d5, 0xe1d6, - 0xe1d7, 0xe1d8, 0xe1d9, 0xe1da, 0xe1db, 0xe1dc, 0xe1dd, 0xe1de, - 0xe1df, 0xe1e0, 0xe1e1, 0xe1e2, 0xe1e3, 0xe1e4, 0xe1e5, 0xe1e6, - 0xe1e7, 0xe1e8, 0xe1e9, 0xe1ea, 0xe1eb, 0xe1ec, 0xe1ed, 0xe1ee, - 0xe1ef, 0xe1f0, 0xe1f1, 0xe1f2, 0xe1f3, 0xe1f4, 0xe1f5, 0xe1f6, - 0xe1f7, 0xe1f8, 0xe1f9, 0xe1fa, 0xe1fb, 0xe1fc, 0xe1fd, 0xe1fe, - 0xe1ff, 0xe200, 0xe201, 0xe202, 0xe203, 0xe204, 0xe205, 0xe206, - 0xe207, 0xe208, 0xe209, 0xe20a, 0xe20b, 0xe20c, 0xe20d, 0xe20e, - 0xe20f, 0xe210, 0xe211, 0xe212, 0xe213, 0xe214, 0xe215, 0xe216, - 0xe217, 0xe218, 0xe219, 0xe21a, 0xe21b, 0xe21c, 0xe21d, 0xe21e, - 0xe21f, 0xe220, 0xe221, 0xe222, 0xe223, 0xe224, 0xe225, 0xe226, - 0xe227, 0xe228, 0xe229, 0xe22a, 0xe22b, 0xe22c, 0xe22d, 0xe22e, - 0xe22f, 0xe230, 0xe231, 0xe232, 0xe233, 0x30fb, 0x30fb, 0x30fb, - /* lead byte f3 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0xe234, 0xe235, 0xe236, 0xe237, 0xe238, 0xe239, 0xe23a, 0xe23b, - 0xe23c, 0xe23d, 0xe23e, 0xe23f, 0xe240, 0xe241, 0xe242, 0xe243, - 0xe244, 0xe245, 0xe246, 0xe247, 0xe248, 0xe249, 0xe24a, 0xe24b, - 0xe24c, 0xe24d, 0xe24e, 0xe24f, 0xe250, 0xe251, 0xe252, 0xe253, - 0xe254, 0xe255, 0xe256, 0xe257, 0xe258, 0xe259, 0xe25a, 0xe25b, - 0xe25c, 0xe25d, 0xe25e, 0xe25f, 0xe260, 0xe261, 0xe262, 0xe263, - 0xe264, 0xe265, 0xe266, 0xe267, 0xe268, 0xe269, 0xe26a, 0xe26b, - 0xe26c, 0xe26d, 0xe26e, 0xe26f, 0xe270, 0xe271, 0xe272, 0x30fb, - 0xe273, 0xe274, 0xe275, 0xe276, 0xe277, 0xe278, 0xe279, 0xe27a, - 0xe27b, 0xe27c, 0xe27d, 0xe27e, 0xe27f, 0xe280, 0xe281, 0xe282, - 0xe283, 0xe284, 0xe285, 0xe286, 0xe287, 0xe288, 0xe289, 0xe28a, - 0xe28b, 0xe28c, 0xe28d, 0xe28e, 0xe28f, 0xe290, 0xe291, 0xe292, - 0xe293, 0xe294, 0xe295, 0xe296, 0xe297, 0xe298, 0xe299, 0xe29a, - 0xe29b, 0xe29c, 0xe29d, 0xe29e, 0xe29f, 0xe2a0, 0xe2a1, 0xe2a2, - 0xe2a3, 0xe2a4, 0xe2a5, 0xe2a6, 0xe2a7, 0xe2a8, 0xe2a9, 0xe2aa, - 0xe2ab, 0xe2ac, 0xe2ad, 0xe2ae, 0xe2af, 0xe2b0, 0xe2b1, 0xe2b2, - 0xe2b3, 0xe2b4, 0xe2b5, 0xe2b6, 0xe2b7, 0xe2b8, 0xe2b9, 0xe2ba, - 0xe2bb, 0xe2bc, 0xe2bd, 0xe2be, 0xe2bf, 0xe2c0, 0xe2c1, 0xe2c2, - 0xe2c3, 0xe2c4, 0xe2c5, 0xe2c6, 0xe2c7, 0xe2c8, 0xe2c9, 0xe2ca, - 0xe2cb, 0xe2cc, 0xe2cd, 0xe2ce, 0xe2cf, 0xe2d0, 0xe2d1, 0xe2d2, - 0xe2d3, 0xe2d4, 0xe2d5, 0xe2d6, 0xe2d7, 0xe2d8, 0xe2d9, 0xe2da, - 0xe2db, 0xe2dc, 0xe2dd, 0xe2de, 0xe2df, 0xe2e0, 0xe2e1, 0xe2e2, - 0xe2e3, 0xe2e4, 0xe2e5, 0xe2e6, 0xe2e7, 0xe2e8, 0xe2e9, 0xe2ea, - 0xe2eb, 0xe2ec, 0xe2ed, 0xe2ee, 0xe2ef, 0x30fb, 0x30fb, 0x30fb, - /* lead byte f4 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0xe2f0, 0xe2f1, 0xe2f2, 0xe2f3, 0xe2f4, 0xe2f5, 0xe2f6, 0xe2f7, - 0xe2f8, 0xe2f9, 0xe2fa, 0xe2fb, 0xe2fc, 0xe2fd, 0xe2fe, 0xe2ff, - 0xe300, 0xe301, 0xe302, 0xe303, 0xe304, 0xe305, 0xe306, 0xe307, - 0xe308, 0xe309, 0xe30a, 0xe30b, 0xe30c, 0xe30d, 0xe30e, 0xe30f, - 0xe310, 0xe311, 0xe312, 0xe313, 0xe314, 0xe315, 0xe316, 0xe317, - 0xe318, 0xe319, 0xe31a, 0xe31b, 0xe31c, 0xe31d, 0xe31e, 0xe31f, - 0xe320, 0xe321, 0xe322, 0xe323, 0xe324, 0xe325, 0xe326, 0xe327, - 0xe328, 0xe329, 0xe32a, 0xe32b, 0xe32c, 0xe32d, 0xe32e, 0x30fb, - 0xe32f, 0xe330, 0xe331, 0xe332, 0xe333, 0xe334, 0xe335, 0xe336, - 0xe337, 0xe338, 0xe339, 0xe33a, 0xe33b, 0xe33c, 0xe33d, 0xe33e, - 0xe33f, 0xe340, 0xe341, 0xe342, 0xe343, 0xe344, 0xe345, 0xe346, - 0xe347, 0xe348, 0xe349, 0xe34a, 0xe34b, 0xe34c, 0xe34d, 0xe34e, - 0xe34f, 0xe350, 0xe351, 0xe352, 0xe353, 0xe354, 0xe355, 0xe356, - 0xe357, 0xe358, 0xe359, 0xe35a, 0xe35b, 0xe35c, 0xe35d, 0xe35e, - 0xe35f, 0xe360, 0xe361, 0xe362, 0xe363, 0xe364, 0xe365, 0xe366, - 0xe367, 0xe368, 0xe369, 0xe36a, 0xe36b, 0xe36c, 0xe36d, 0xe36e, - 0xe36f, 0xe370, 0xe371, 0xe372, 0xe373, 0xe374, 0xe375, 0xe376, - 0xe377, 0xe378, 0xe379, 0xe37a, 0xe37b, 0xe37c, 0xe37d, 0xe37e, - 0xe37f, 0xe380, 0xe381, 0xe382, 0xe383, 0xe384, 0xe385, 0xe386, - 0xe387, 0xe388, 0xe389, 0xe38a, 0xe38b, 0xe38c, 0xe38d, 0xe38e, - 0xe38f, 0xe390, 0xe391, 0xe392, 0xe393, 0xe394, 0xe395, 0xe396, - 0xe397, 0xe398, 0xe399, 0xe39a, 0xe39b, 0xe39c, 0xe39d, 0xe39e, - 0xe39f, 0xe3a0, 0xe3a1, 0xe3a2, 0xe3a3, 0xe3a4, 0xe3a5, 0xe3a6, - 0xe3a7, 0xe3a8, 0xe3a9, 0xe3aa, 0xe3ab, 0x30fb, 0x30fb, 0x30fb, - /* lead byte f5 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0xe3ac, 0xe3ad, 0xe3ae, 0xe3af, 0xe3b0, 0xe3b1, 0xe3b2, 0xe3b3, - 0xe3b4, 0xe3b5, 0xe3b6, 0xe3b7, 0xe3b8, 0xe3b9, 0xe3ba, 0xe3bb, - 0xe3bc, 0xe3bd, 0xe3be, 0xe3bf, 0xe3c0, 0xe3c1, 0xe3c2, 0xe3c3, - 0xe3c4, 0xe3c5, 0xe3c6, 0xe3c7, 0xe3c8, 0xe3c9, 0xe3ca, 0xe3cb, - 0xe3cc, 0xe3cd, 0xe3ce, 0xe3cf, 0xe3d0, 0xe3d1, 0xe3d2, 0xe3d3, - 0xe3d4, 0xe3d5, 0xe3d6, 0xe3d7, 0xe3d8, 0xe3d9, 0xe3da, 0xe3db, - 0xe3dc, 0xe3dd, 0xe3de, 0xe3df, 0xe3e0, 0xe3e1, 0xe3e2, 0xe3e3, - 0xe3e4, 0xe3e5, 0xe3e6, 0xe3e7, 0xe3e8, 0xe3e9, 0xe3ea, 0x30fb, - 0xe3eb, 0xe3ec, 0xe3ed, 0xe3ee, 0xe3ef, 0xe3f0, 0xe3f1, 0xe3f2, - 0xe3f3, 0xe3f4, 0xe3f5, 0xe3f6, 0xe3f7, 0xe3f8, 0xe3f9, 0xe3fa, - 0xe3fb, 0xe3fc, 0xe3fd, 0xe3fe, 0xe3ff, 0xe400, 0xe401, 0xe402, - 0xe403, 0xe404, 0xe405, 0xe406, 0xe407, 0xe408, 0xe409, 0xe40a, - 0xe40b, 0xe40c, 0xe40d, 0xe40e, 0xe40f, 0xe410, 0xe411, 0xe412, - 0xe413, 0xe414, 0xe415, 0xe416, 0xe417, 0xe418, 0xe419, 0xe41a, - 0xe41b, 0xe41c, 0xe41d, 0xe41e, 0xe41f, 0xe420, 0xe421, 0xe422, - 0xe423, 0xe424, 0xe425, 0xe426, 0xe427, 0xe428, 0xe429, 0xe42a, - 0xe42b, 0xe42c, 0xe42d, 0xe42e, 0xe42f, 0xe430, 0xe431, 0xe432, - 0xe433, 0xe434, 0xe435, 0xe436, 0xe437, 0xe438, 0xe439, 0xe43a, - 0xe43b, 0xe43c, 0xe43d, 0xe43e, 0xe43f, 0xe440, 0xe441, 0xe442, - 0xe443, 0xe444, 0xe445, 0xe446, 0xe447, 0xe448, 0xe449, 0xe44a, - 0xe44b, 0xe44c, 0xe44d, 0xe44e, 0xe44f, 0xe450, 0xe451, 0xe452, - 0xe453, 0xe454, 0xe455, 0xe456, 0xe457, 0xe458, 0xe459, 0xe45a, - 0xe45b, 0xe45c, 0xe45d, 0xe45e, 0xe45f, 0xe460, 0xe461, 0xe462, - 0xe463, 0xe464, 0xe465, 0xe466, 0xe467, 0x30fb, 0x30fb, 0x30fb, - /* lead byte f6 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0xe468, 0xe469, 0xe46a, 0xe46b, 0xe46c, 0xe46d, 0xe46e, 0xe46f, - 0xe470, 0xe471, 0xe472, 0xe473, 0xe474, 0xe475, 0xe476, 0xe477, - 0xe478, 0xe479, 0xe47a, 0xe47b, 0xe47c, 0xe47d, 0xe47e, 0xe47f, - 0xe480, 0xe481, 0xe482, 0xe483, 0xe484, 0xe485, 0xe486, 0xe487, - 0xe488, 0xe489, 0xe48a, 0xe48b, 0xe48c, 0xe48d, 0xe48e, 0xe48f, - 0xe490, 0xe491, 0xe492, 0xe493, 0xe494, 0xe495, 0xe496, 0xe497, - 0xe498, 0xe499, 0xe49a, 0xe49b, 0xe49c, 0xe49d, 0xe49e, 0xe49f, - 0xe4a0, 0xe4a1, 0xe4a2, 0xe4a3, 0xe4a4, 0xe4a5, 0xe4a6, 0x30fb, - 0xe4a7, 0xe4a8, 0xe4a9, 0xe4aa, 0xe4ab, 0xe4ac, 0xe4ad, 0xe4ae, - 0xe4af, 0xe4b0, 0xe4b1, 0xe4b2, 0xe4b3, 0xe4b4, 0xe4b5, 0xe4b6, - 0xe4b7, 0xe4b8, 0xe4b9, 0xe4ba, 0xe4bb, 0xe4bc, 0xe4bd, 0xe4be, - 0xe4bf, 0xe4c0, 0xe4c1, 0xe4c2, 0xe4c3, 0xe4c4, 0xe4c5, 0xe4c6, - 0xe4c7, 0xe4c8, 0xe4c9, 0xe4ca, 0xe4cb, 0xe4cc, 0xe4cd, 0xe4ce, - 0xe4cf, 0xe4d0, 0xe4d1, 0xe4d2, 0xe4d3, 0xe4d4, 0xe4d5, 0xe4d6, - 0xe4d7, 0xe4d8, 0xe4d9, 0xe4da, 0xe4db, 0xe4dc, 0xe4dd, 0xe4de, - 0xe4df, 0xe4e0, 0xe4e1, 0xe4e2, 0xe4e3, 0xe4e4, 0xe4e5, 0xe4e6, - 0xe4e7, 0xe4e8, 0xe4e9, 0xe4ea, 0xe4eb, 0xe4ec, 0xe4ed, 0xe4ee, - 0xe4ef, 0xe4f0, 0xe4f1, 0xe4f2, 0xe4f3, 0xe4f4, 0xe4f5, 0xe4f6, - 0xe4f7, 0xe4f8, 0xe4f9, 0xe4fa, 0xe4fb, 0xe4fc, 0xe4fd, 0xe4fe, - 0xe4ff, 0xe500, 0xe501, 0xe502, 0xe503, 0xe504, 0xe505, 0xe506, - 0xe507, 0xe508, 0xe509, 0xe50a, 0xe50b, 0xe50c, 0xe50d, 0xe50e, - 0xe50f, 0xe510, 0xe511, 0xe512, 0xe513, 0xe514, 0xe515, 0xe516, - 0xe517, 0xe518, 0xe519, 0xe51a, 0xe51b, 0xe51c, 0xe51d, 0xe51e, - 0xe51f, 0xe520, 0xe521, 0xe522, 0xe523, 0x30fb, 0x30fb, 0x30fb, - /* lead byte f7 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0xe524, 0xe525, 0xe526, 0xe527, 0xe528, 0xe529, 0xe52a, 0xe52b, - 0xe52c, 0xe52d, 0xe52e, 0xe52f, 0xe530, 0xe531, 0xe532, 0xe533, - 0xe534, 0xe535, 0xe536, 0xe537, 0xe538, 0xe539, 0xe53a, 0xe53b, - 0xe53c, 0xe53d, 0xe53e, 0xe53f, 0xe540, 0xe541, 0xe542, 0xe543, - 0xe544, 0xe545, 0xe546, 0xe547, 0xe548, 0xe549, 0xe54a, 0xe54b, - 0xe54c, 0xe54d, 0xe54e, 0xe54f, 0xe550, 0xe551, 0xe552, 0xe553, - 0xe554, 0xe555, 0xe556, 0xe557, 0xe558, 0xe559, 0xe55a, 0xe55b, - 0xe55c, 0xe55d, 0xe55e, 0xe55f, 0xe560, 0xe561, 0xe562, 0x30fb, - 0xe563, 0xe564, 0xe565, 0xe566, 0xe567, 0xe568, 0xe569, 0xe56a, - 0xe56b, 0xe56c, 0xe56d, 0xe56e, 0xe56f, 0xe570, 0xe571, 0xe572, - 0xe573, 0xe574, 0xe575, 0xe576, 0xe577, 0xe578, 0xe579, 0xe57a, - 0xe57b, 0xe57c, 0xe57d, 0xe57e, 0xe57f, 0xe580, 0xe581, 0xe582, - 0xe583, 0xe584, 0xe585, 0xe586, 0xe587, 0xe588, 0xe589, 0xe58a, - 0xe58b, 0xe58c, 0xe58d, 0xe58e, 0xe58f, 0xe590, 0xe591, 0xe592, - 0xe593, 0xe594, 0xe595, 0xe596, 0xe597, 0xe598, 0xe599, 0xe59a, - 0xe59b, 0xe59c, 0xe59d, 0xe59e, 0xe59f, 0xe5a0, 0xe5a1, 0xe5a2, - 0xe5a3, 0xe5a4, 0xe5a5, 0xe5a6, 0xe5a7, 0xe5a8, 0xe5a9, 0xe5aa, - 0xe5ab, 0xe5ac, 0xe5ad, 0xe5ae, 0xe5af, 0xe5b0, 0xe5b1, 0xe5b2, - 0xe5b3, 0xe5b4, 0xe5b5, 0xe5b6, 0xe5b7, 0xe5b8, 0xe5b9, 0xe5ba, - 0xe5bb, 0xe5bc, 0xe5bd, 0xe5be, 0xe5bf, 0xe5c0, 0xe5c1, 0xe5c2, - 0xe5c3, 0xe5c4, 0xe5c5, 0xe5c6, 0xe5c7, 0xe5c8, 0xe5c9, 0xe5ca, - 0xe5cb, 0xe5cc, 0xe5cd, 0xe5ce, 0xe5cf, 0xe5d0, 0xe5d1, 0xe5d2, - 0xe5d3, 0xe5d4, 0xe5d5, 0xe5d6, 0xe5d7, 0xe5d8, 0xe5d9, 0xe5da, - 0xe5db, 0xe5dc, 0xe5dd, 0xe5de, 0xe5df, 0x30fb, 0x30fb, 0x30fb, - /* lead byte f8 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0xe5e0, 0xe5e1, 0xe5e2, 0xe5e3, 0xe5e4, 0xe5e5, 0xe5e6, 0xe5e7, - 0xe5e8, 0xe5e9, 0xe5ea, 0xe5eb, 0xe5ec, 0xe5ed, 0xe5ee, 0xe5ef, - 0xe5f0, 0xe5f1, 0xe5f2, 0xe5f3, 0xe5f4, 0xe5f5, 0xe5f6, 0xe5f7, - 0xe5f8, 0xe5f9, 0xe5fa, 0xe5fb, 0xe5fc, 0xe5fd, 0xe5fe, 0xe5ff, - 0xe600, 0xe601, 0xe602, 0xe603, 0xe604, 0xe605, 0xe606, 0xe607, - 0xe608, 0xe609, 0xe60a, 0xe60b, 0xe60c, 0xe60d, 0xe60e, 0xe60f, - 0xe610, 0xe611, 0xe612, 0xe613, 0xe614, 0xe615, 0xe616, 0xe617, - 0xe618, 0xe619, 0xe61a, 0xe61b, 0xe61c, 0xe61d, 0xe61e, 0x30fb, - 0xe61f, 0xe620, 0xe621, 0xe622, 0xe623, 0xe624, 0xe625, 0xe626, - 0xe627, 0xe628, 0xe629, 0xe62a, 0xe62b, 0xe62c, 0xe62d, 0xe62e, - 0xe62f, 0xe630, 0xe631, 0xe632, 0xe633, 0xe634, 0xe635, 0xe636, - 0xe637, 0xe638, 0xe639, 0xe63a, 0xe63b, 0xe63c, 0xe63d, 0xe63e, - 0xe63f, 0xe640, 0xe641, 0xe642, 0xe643, 0xe644, 0xe645, 0xe646, - 0xe647, 0xe648, 0xe649, 0xe64a, 0xe64b, 0xe64c, 0xe64d, 0xe64e, - 0xe64f, 0xe650, 0xe651, 0xe652, 0xe653, 0xe654, 0xe655, 0xe656, - 0xe657, 0xe658, 0xe659, 0xe65a, 0xe65b, 0xe65c, 0xe65d, 0xe65e, - 0xe65f, 0xe660, 0xe661, 0xe662, 0xe663, 0xe664, 0xe665, 0xe666, - 0xe667, 0xe668, 0xe669, 0xe66a, 0xe66b, 0xe66c, 0xe66d, 0xe66e, - 0xe66f, 0xe670, 0xe671, 0xe672, 0xe673, 0xe674, 0xe675, 0xe676, - 0xe677, 0xe678, 0xe679, 0xe67a, 0xe67b, 0xe67c, 0xe67d, 0xe67e, - 0xe67f, 0xe680, 0xe681, 0xe682, 0xe683, 0xe684, 0xe685, 0xe686, - 0xe687, 0xe688, 0xe689, 0xe68a, 0xe68b, 0xe68c, 0xe68d, 0xe68e, - 0xe68f, 0xe690, 0xe691, 0xe692, 0xe693, 0xe694, 0xe695, 0xe696, - 0xe697, 0xe698, 0xe699, 0xe69a, 0xe69b, 0x30fb, 0x30fb, 0x30fb, - /* lead byte f9 */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0xe69c, 0xe69d, 0xe69e, 0xe69f, 0xe6a0, 0xe6a1, 0xe6a2, 0xe6a3, - 0xe6a4, 0xe6a5, 0xe6a6, 0xe6a7, 0xe6a8, 0xe6a9, 0xe6aa, 0xe6ab, - 0xe6ac, 0xe6ad, 0xe6ae, 0xe6af, 0xe6b0, 0xe6b1, 0xe6b2, 0xe6b3, - 0xe6b4, 0xe6b5, 0xe6b6, 0xe6b7, 0xe6b8, 0xe6b9, 0xe6ba, 0xe6bb, - 0xe6bc, 0xe6bd, 0xe6be, 0xe6bf, 0xe6c0, 0xe6c1, 0xe6c2, 0xe6c3, - 0xe6c4, 0xe6c5, 0xe6c6, 0xe6c7, 0xe6c8, 0xe6c9, 0xe6ca, 0xe6cb, - 0xe6cc, 0xe6cd, 0xe6ce, 0xe6cf, 0xe6d0, 0xe6d1, 0xe6d2, 0xe6d3, - 0xe6d4, 0xe6d5, 0xe6d6, 0xe6d7, 0xe6d8, 0xe6d9, 0xe6da, 0x30fb, - 0xe6db, 0xe6dc, 0xe6dd, 0xe6de, 0xe6df, 0xe6e0, 0xe6e1, 0xe6e2, - 0xe6e3, 0xe6e4, 0xe6e5, 0xe6e6, 0xe6e7, 0xe6e8, 0xe6e9, 0xe6ea, - 0xe6eb, 0xe6ec, 0xe6ed, 0xe6ee, 0xe6ef, 0xe6f0, 0xe6f1, 0xe6f2, - 0xe6f3, 0xe6f4, 0xe6f5, 0xe6f6, 0xe6f7, 0xe6f8, 0xe6f9, 0xe6fa, - 0xe6fb, 0xe6fc, 0xe6fd, 0xe6fe, 0xe6ff, 0xe700, 0xe701, 0xe702, - 0xe703, 0xe704, 0xe705, 0xe706, 0xe707, 0xe708, 0xe709, 0xe70a, - 0xe70b, 0xe70c, 0xe70d, 0xe70e, 0xe70f, 0xe710, 0xe711, 0xe712, - 0xe713, 0xe714, 0xe715, 0xe716, 0xe717, 0xe718, 0xe719, 0xe71a, - 0xe71b, 0xe71c, 0xe71d, 0xe71e, 0xe71f, 0xe720, 0xe721, 0xe722, - 0xe723, 0xe724, 0xe725, 0xe726, 0xe727, 0xe728, 0xe729, 0xe72a, - 0xe72b, 0xe72c, 0xe72d, 0xe72e, 0xe72f, 0xe730, 0xe731, 0xe732, - 0xe733, 0xe734, 0xe735, 0xe736, 0xe737, 0xe738, 0xe739, 0xe73a, - 0xe73b, 0xe73c, 0xe73d, 0xe73e, 0xe73f, 0xe740, 0xe741, 0xe742, - 0xe743, 0xe744, 0xe745, 0xe746, 0xe747, 0xe748, 0xe749, 0xe74a, - 0xe74b, 0xe74c, 0xe74d, 0xe74e, 0xe74f, 0xe750, 0xe751, 0xe752, - 0xe753, 0xe754, 0xe755, 0xe756, 0xe757, 0x30fb, 0x30fb, 0x30fb, - /* lead byte fa */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, - 0x2178, 0x2179, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, - 0x2166, 0x2167, 0x2168, 0x2169, 0xffe2, 0xffe4, 0xff07, 0xff02, - 0x3231, 0x2116, 0x2121, 0x2235, 0x7e8a, 0x891c, 0x9348, 0x9288, - 0x84dc, 0x4fc9, 0x70bb, 0x6631, 0x68c8, 0x92f9, 0x66fb, 0x5f45, - 0x4e28, 0x4ee1, 0x4efc, 0x4f00, 0x4f03, 0x4f39, 0x4f56, 0x4f92, - 0x4f8a, 0x4f9a, 0x4f94, 0x4fcd, 0x5040, 0x5022, 0x4fff, 0x501e, - 0x5046, 0x5070, 0x5042, 0x5094, 0x50f4, 0x50d8, 0x514a, 0x30fb, - 0x5164, 0x519d, 0x51be, 0x51ec, 0x5215, 0x529c, 0x52a6, 0x52c0, - 0x52db, 0x5300, 0x5307, 0x5324, 0x5372, 0x5393, 0x53b2, 0x53dd, - 0xfa0e, 0x549c, 0x548a, 0x54a9, 0x54ff, 0x5586, 0x5759, 0x5765, - 0x57ac, 0x57c8, 0x57c7, 0xfa0f, 0xfa10, 0x589e, 0x58b2, 0x590b, - 0x5953, 0x595b, 0x595d, 0x5963, 0x59a4, 0x59ba, 0x5b56, 0x5bc0, - 0x752f, 0x5bd8, 0x5bec, 0x5c1e, 0x5ca6, 0x5cba, 0x5cf5, 0x5d27, - 0x5d53, 0xfa11, 0x5d42, 0x5d6d, 0x5db8, 0x5db9, 0x5dd0, 0x5f21, - 0x5f34, 0x5f67, 0x5fb7, 0x5fde, 0x605d, 0x6085, 0x608a, 0x60de, - 0x60d5, 0x6120, 0x60f2, 0x6111, 0x6137, 0x6130, 0x6198, 0x6213, - 0x62a6, 0x63f5, 0x6460, 0x649d, 0x64ce, 0x654e, 0x6600, 0x6615, - 0x663b, 0x6609, 0x662e, 0x661e, 0x6624, 0x6665, 0x6657, 0x6659, - 0xfa12, 0x6673, 0x6699, 0x66a0, 0x66b2, 0x66bf, 0x66fa, 0x670e, - 0xf929, 0x6766, 0x67bb, 0x6852, 0x67c0, 0x6801, 0x6844, 0x68cf, - 0xfa13, 0x6968, 0xfa14, 0x6998, 0x69e2, 0x6a30, 0x6a6b, 0x6a46, - 0x6a73, 0x6a7e, 0x6ae2, 0x6ae4, 0x6bd6, 0x6c3f, 0x6c5c, 0x6c86, - 0x6c6f, 0x6cda, 0x6d04, 0x6d87, 0x6d6f, 0x30fb, 0x30fb, 0x30fb, - /* lead byte fb */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x6d96, 0x6dac, 0x6dcf, 0x6df8, 0x6df2, 0x6dfc, 0x6e39, 0x6e5c, - 0x6e27, 0x6e3c, 0x6ebf, 0x6f88, 0x6fb5, 0x6ff5, 0x7005, 0x7007, - 0x7028, 0x7085, 0x70ab, 0x710f, 0x7104, 0x715c, 0x7146, 0x7147, - 0xfa15, 0x71c1, 0x71fe, 0x72b1, 0x72be, 0x7324, 0xfa16, 0x7377, - 0x73bd, 0x73c9, 0x73d6, 0x73e3, 0x73d2, 0x7407, 0x73f5, 0x7426, - 0x742a, 0x7429, 0x742e, 0x7462, 0x7489, 0x749f, 0x7501, 0x756f, - 0x7682, 0x769c, 0x769e, 0x769b, 0x76a6, 0xfa17, 0x7746, 0x52af, - 0x7821, 0x784e, 0x7864, 0x787a, 0x7930, 0xfa18, 0xfa19, 0x30fb, - 0xfa1a, 0x7994, 0xfa1b, 0x799b, 0x7ad1, 0x7ae7, 0xfa1c, 0x7aeb, - 0x7b9e, 0xfa1d, 0x7d48, 0x7d5c, 0x7db7, 0x7da0, 0x7dd6, 0x7e52, - 0x7f47, 0x7fa1, 0xfa1e, 0x8301, 0x8362, 0x837f, 0x83c7, 0x83f6, - 0x8448, 0x84b4, 0x8553, 0x8559, 0x856b, 0xfa1f, 0x85b0, 0xfa20, - 0xfa21, 0x8807, 0x88f5, 0x8a12, 0x8a37, 0x8a79, 0x8aa7, 0x8abe, - 0x8adf, 0xfa22, 0x8af6, 0x8b53, 0x8b7f, 0x8cf0, 0x8cf4, 0x8d12, - 0x8d76, 0xfa23, 0x8ecf, 0xfa24, 0xfa25, 0x9067, 0x90de, 0xfa26, - 0x9115, 0x9127, 0x91da, 0x91d7, 0x91de, 0x91ed, 0x91ee, 0x91e4, - 0x91e5, 0x9206, 0x9210, 0x920a, 0x923a, 0x9240, 0x923c, 0x924e, - 0x9259, 0x9251, 0x9239, 0x9267, 0x92a7, 0x9277, 0x9278, 0x92e7, - 0x92d7, 0x92d9, 0x92d0, 0xfa27, 0x92d5, 0x92e0, 0x92d3, 0x9325, - 0x9321, 0x92fb, 0xfa28, 0x931e, 0x92ff, 0x931d, 0x9302, 0x9370, - 0x9357, 0x93a4, 0x93c6, 0x93de, 0x93f8, 0x9431, 0x9445, 0x9448, - 0x9592, 0xf9dc, 0xfa29, 0x969d, 0x96af, 0x9733, 0x973b, 0x9743, - 0x974d, 0x974f, 0x9751, 0x9755, 0x9857, 0x9865, 0xfa2a, 0xfa2b, - 0x9927, 0xfa2c, 0x999e, 0x9a4e, 0x9ad9, 0x30fb, 0x30fb, 0x30fb, - /* lead byte fc */ - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x9adc, 0x9b75, 0x9b72, 0x9b8f, 0x9bb1, 0x9bbb, 0x9c00, 0x9d70, - 0x9d6b, 0xfa2d, 0x9e19, 0x9ed1, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, - 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb, 0x30fb -}; - -static const unsigned char cp2uni_leadbytes[256] = -{ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 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, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 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, 0x00, 0x00, 0x00 -}; - -static const unsigned short uni2cp_low[27648] = -{ - /* 0x0000 .. 0x00ff */ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x0080, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x0021, 0x8191, 0x8192, 0x003f, 0x005c, 0x007c, 0x8198, - 0x814e, 0x0063, 0x0061, 0x81e1, 0x81ca, 0x002d, 0x0052, 0x8150, - 0x818b, 0x817d, 0x0032, 0x0033, 0x814c, 0x83ca, 0x81f7, 0x8145, - 0x8143, 0x0031, 0x006f, 0x81e2, 0x003f, 0x003f, 0x003f, 0x003f, - 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x0043, - 0x0045, 0x0045, 0x0045, 0x0045, 0x0049, 0x0049, 0x0049, 0x0049, - 0x0044, 0x004e, 0x004f, 0x004f, 0x004f, 0x004f, 0x004f, 0x817e, - 0x004f, 0x0055, 0x0055, 0x0055, 0x0055, 0x0059, 0x0054, 0x0073, - 0x0061, 0x0061, 0x0061, 0x0061, 0x0061, 0x0061, 0x0061, 0x0063, - 0x0065, 0x0065, 0x0065, 0x0065, 0x0069, 0x0069, 0x0069, 0x0069, - 0x0064, 0x006e, 0x006f, 0x006f, 0x006f, 0x006f, 0x006f, 0x8180, - 0x006f, 0x0075, 0x0075, 0x0075, 0x0075, 0x0079, 0x0074, 0x0079, - /* 0x0300 .. 0x03ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x839f, 0x83a0, 0x83a1, 0x83a2, 0x83a3, 0x83a4, 0x83a5, - 0x83a6, 0x83a7, 0x83a8, 0x83a9, 0x83aa, 0x83ab, 0x83ac, 0x83ad, - 0x83ae, 0x83af, 0x003f, 0x83b0, 0x83b1, 0x83b2, 0x83b3, 0x83b4, - 0x83b5, 0x83b6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x83bf, 0x83c0, 0x83c1, 0x83c2, 0x83c3, 0x83c4, 0x83c5, - 0x83c6, 0x83c7, 0x83c8, 0x83c9, 0x83ca, 0x83cb, 0x83cc, 0x83cd, - 0x83ce, 0x83cf, 0x003f, 0x83d0, 0x83d1, 0x83d2, 0x83d3, 0x83d4, - 0x83d5, 0x83d6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x0400 .. 0x04ff */ - 0x003f, 0x8446, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8440, 0x8441, 0x8442, 0x8443, 0x8444, 0x8445, 0x8447, 0x8448, - 0x8449, 0x844a, 0x844b, 0x844c, 0x844d, 0x844e, 0x844f, 0x8450, - 0x8451, 0x8452, 0x8453, 0x8454, 0x8455, 0x8456, 0x8457, 0x8458, - 0x8459, 0x845a, 0x845b, 0x845c, 0x845d, 0x845e, 0x845f, 0x8460, - 0x8470, 0x8471, 0x8472, 0x8473, 0x8474, 0x8475, 0x8477, 0x8478, - 0x8479, 0x847a, 0x847b, 0x847c, 0x847d, 0x847e, 0x8480, 0x8481, - 0x8482, 0x8483, 0x8484, 0x8485, 0x8486, 0x8487, 0x8488, 0x8489, - 0x848a, 0x848b, 0x848c, 0x848d, 0x848e, 0x848f, 0x8490, 0x8491, - 0x003f, 0x8476, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2000 .. 0x20ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x815d, 0x003f, 0x003f, 0x003f, 0x003f, 0x815c, 0x003f, 0x003f, - 0x8165, 0x8166, 0x003f, 0x003f, 0x8167, 0x8168, 0x003f, 0x003f, - 0x81f5, 0x81f6, 0x003f, 0x003f, 0x003f, 0x8164, 0x8163, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x81f1, 0x003f, 0x818c, 0x818d, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x81a6, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2100 .. 0x21ff */ - 0x003f, 0x003f, 0x003f, 0x818e, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8782, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8784, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x81f0, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8754, 0x8755, 0x8756, 0x8757, 0x8758, 0x8759, 0x875a, 0x875b, - 0x875c, 0x875d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xfa40, 0xfa41, 0xfa42, 0xfa43, 0xfa44, 0xfa45, 0xfa46, 0xfa47, - 0xfa48, 0xfa49, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x81a9, 0x81aa, 0x81a8, 0x81ab, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x81cb, 0x003f, 0x81cc, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2200 .. 0x22ff */ - 0x81cd, 0x003f, 0x81dd, 0x81ce, 0x003f, 0x003f, 0x003f, 0x81de, - 0x81b8, 0x003f, 0x003f, 0x81b9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8794, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x81e3, 0x003f, 0x003f, 0x81e5, 0x8187, 0x8798, - 0x81da, 0x003f, 0x003f, 0x003f, 0x003f, 0x8161, 0x003f, 0x81c8, - 0x81c9, 0x81bf, 0x81be, 0x81e7, 0x81e8, 0x003f, 0x8793, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8188, 0x81e6, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x81e4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x81e0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8182, 0x81df, 0x003f, 0x003f, 0x003f, 0x003f, 0x8185, 0x8186, - 0x003f, 0x003f, 0x81e1, 0x81e2, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x81bc, 0x81bd, 0x003f, 0x003f, 0x81ba, 0x81bb, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x81db, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8799, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2300 .. 0x23ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x81dc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2400 .. 0x24ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8740, 0x8741, 0x8742, 0x8743, 0x8744, 0x8745, 0x8746, 0x8747, - 0x8748, 0x8749, 0x874a, 0x874b, 0x874c, 0x874d, 0x874e, 0x874f, - 0x8750, 0x8751, 0x8752, 0x8753, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2500 .. 0x25ff */ - 0x849f, 0x84aa, 0x84a0, 0x84ab, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x84a1, 0x003f, 0x003f, 0x84ac, - 0x84a2, 0x003f, 0x003f, 0x84ad, 0x84a4, 0x003f, 0x003f, 0x84af, - 0x84a3, 0x003f, 0x003f, 0x84ae, 0x84a5, 0x84ba, 0x003f, 0x003f, - 0x84b5, 0x003f, 0x003f, 0x84b0, 0x84a7, 0x84bc, 0x003f, 0x003f, - 0x84b7, 0x003f, 0x003f, 0x84b2, 0x84a6, 0x003f, 0x003f, 0x84b6, - 0x84bb, 0x003f, 0x003f, 0x84b1, 0x84a8, 0x003f, 0x003f, 0x84b8, - 0x84bd, 0x003f, 0x003f, 0x84b3, 0x84a9, 0x003f, 0x003f, 0x84b9, - 0x003f, 0x003f, 0x84be, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x84b4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x81a1, 0x81a0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x81a3, 0x81a2, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x81a5, 0x81a4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x819f, 0x819e, - 0x003f, 0x003f, 0x003f, 0x819b, 0x003f, 0x003f, 0x819d, 0x819c, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x81fc, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2600 .. 0x26ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x819a, 0x8199, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x818a, 0x003f, 0x8189, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x81f4, 0x003f, 0x003f, 0x81f3, 0x003f, 0x81f2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x3000 .. 0x30ff */ - 0x8140, 0x8141, 0x8142, 0x8156, 0x003f, 0x8158, 0x8159, 0x815a, - 0x8171, 0x8172, 0x8173, 0x8174, 0x8175, 0x8176, 0x8177, 0x8178, - 0x8179, 0x817a, 0x81a7, 0x81ac, 0x816b, 0x816c, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8780, 0x003f, 0x8781, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x829f, 0x82a0, 0x82a1, 0x82a2, 0x82a3, 0x82a4, 0x82a5, - 0x82a6, 0x82a7, 0x82a8, 0x82a9, 0x82aa, 0x82ab, 0x82ac, 0x82ad, - 0x82ae, 0x82af, 0x82b0, 0x82b1, 0x82b2, 0x82b3, 0x82b4, 0x82b5, - 0x82b6, 0x82b7, 0x82b8, 0x82b9, 0x82ba, 0x82bb, 0x82bc, 0x82bd, - 0x82be, 0x82bf, 0x82c0, 0x82c1, 0x82c2, 0x82c3, 0x82c4, 0x82c5, - 0x82c6, 0x82c7, 0x82c8, 0x82c9, 0x82ca, 0x82cb, 0x82cc, 0x82cd, - 0x82ce, 0x82cf, 0x82d0, 0x82d1, 0x82d2, 0x82d3, 0x82d4, 0x82d5, - 0x82d6, 0x82d7, 0x82d8, 0x82d9, 0x82da, 0x82db, 0x82dc, 0x82dd, - 0x82de, 0x82df, 0x82e0, 0x82e1, 0x82e2, 0x82e3, 0x82e4, 0x82e5, - 0x82e6, 0x82e7, 0x82e8, 0x82e9, 0x82ea, 0x82eb, 0x82ec, 0x82ed, - 0x82ee, 0x82ef, 0x82f0, 0x82f1, 0x8394, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x814a, 0x814b, 0x8154, 0x8155, 0x003f, - 0x003f, 0x8340, 0x8341, 0x8342, 0x8343, 0x8344, 0x8345, 0x8346, - 0x8347, 0x8348, 0x8349, 0x834a, 0x834b, 0x834c, 0x834d, 0x834e, - 0x834f, 0x8350, 0x8351, 0x8352, 0x8353, 0x8354, 0x8355, 0x8356, - 0x8357, 0x8358, 0x8359, 0x835a, 0x835b, 0x835c, 0x835d, 0x835e, - 0x835f, 0x8360, 0x8361, 0x8362, 0x8363, 0x8364, 0x8365, 0x8366, - 0x8367, 0x8368, 0x8369, 0x836a, 0x836b, 0x836c, 0x836d, 0x836e, - 0x836f, 0x8370, 0x8371, 0x8372, 0x8373, 0x8374, 0x8375, 0x8376, - 0x8377, 0x8378, 0x8379, 0x837a, 0x837b, 0x837c, 0x837d, 0x837e, - 0x8380, 0x8381, 0x8382, 0x8383, 0x8384, 0x8385, 0x8386, 0x8387, - 0x8388, 0x8389, 0x838a, 0x838b, 0x838c, 0x838d, 0x838e, 0x838f, - 0x8390, 0x8391, 0x8392, 0x8393, 0x8394, 0x8395, 0x8396, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8145, 0x815b, 0x8152, 0x8153, 0x003f, - /* 0x3200 .. 0x32ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x878a, 0x878b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x878c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8785, 0x8786, 0x8787, 0x8788, - 0x8789, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x3300 .. 0x33ff */ - 0x003f, 0x003f, 0x003f, 0x8765, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8769, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8760, 0x003f, 0x003f, 0x003f, - 0x8763, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8761, 0x876b, 0x003f, 0x003f, 0x876a, 0x8764, - 0x003f, 0x003f, 0x003f, 0x876c, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8766, 0x003f, - 0x003f, 0x003f, 0x003f, 0x876e, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x875f, 0x876d, 0x003f, 0x003f, 0x8762, 0x003f, 0x003f, - 0x003f, 0x8767, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8768, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x877e, 0x878f, 0x878e, 0x878d, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8772, 0x8773, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x876f, 0x8770, 0x8771, 0x003f, - 0x003f, 0x8775, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8774, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8783, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x4e00 .. 0x4eff */ - 0x88ea, 0x929a, 0x003f, 0x8eb5, 0x003f, 0x003f, 0x003f, 0x969c, - 0x8fe4, 0x8e4f, 0x8fe3, 0x89ba, 0x003f, 0x9573, 0x975e, 0x003f, - 0x98a0, 0x894e, 0x003f, 0x003f, 0x8a8e, 0x98a1, 0x90a2, 0x99c0, - 0x8b75, 0x95b8, 0x003f, 0x003f, 0x003f, 0x003f, 0x8fe5, 0x003f, - 0x003f, 0x97bc, 0x003f, 0x003f, 0x003f, 0x003f, 0x95c0, 0x003f, - 0xfa68, 0x003f, 0x98a2, 0x003f, 0x003f, 0x9286, 0x003f, 0x003f, - 0x003f, 0x98a3, 0x8bf8, 0x003f, 0x003f, 0x003f, 0x98a4, 0x003f, - 0x8adb, 0x924f, 0x003f, 0x8ee5, 0x98a5, 0x003f, 0x003f, 0x98a6, - 0x003f, 0x003f, 0x98a7, 0x9454, 0x003f, 0x8b76, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9456, 0x003f, 0x93e1, 0x8cc1, 0x9652, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe568, 0x98a8, 0x8fe6, - 0x98a9, 0x89b3, 0x003f, 0x003f, 0x003f, 0x8be3, 0x8cee, 0x96e7, - 0x003f, 0x003f, 0x9ba4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9790, 0x003f, 0x93fb, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8aa3, 0x003f, - 0x8b54, 0x003f, 0x98aa, 0x003f, 0x003f, 0x98ab, 0x97b9, 0x003f, - 0x975c, 0x9188, 0x98ad, 0x8e96, 0x93f1, 0x003f, 0x98b0, 0x003f, - 0x003f, 0x895d, 0x8cdd, 0x003f, 0x8cdc, 0x88e4, 0x003f, 0x003f, - 0x986a, 0x9869, 0x003f, 0x8db1, 0x889f, 0x003f, 0x98b1, 0x98b2, - 0x98b3, 0x9653, 0x98b4, 0x003f, 0x8cf0, 0x88e5, 0x9692, 0x003f, - 0x8b9c, 0x003f, 0x003f, 0x8b9d, 0x8b9e, 0x92e0, 0x97ba, 0x003f, - 0x98b5, 0x003f, 0x003f, 0x98b6, 0x003f, 0x003f, 0x98b7, 0x003f, - 0x003f, 0x003f, 0x906c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8f59, 0x906d, 0x98bc, 0x003f, 0x98ba, 0x003f, 0x98bb, 0x8b77, - 0x003f, 0x003f, 0x8da1, 0x89ee, 0x003f, 0x98b9, 0x98b8, 0x95a7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8e65, 0x8e64, 0x91bc, 0x98bd, - 0x9574, 0x90e5, 0x003f, 0x003f, 0x003f, 0x8157, 0x98be, 0x98c0, - 0x003f, 0xfa69, 0x003f, 0x91e3, 0x97df, 0x88c8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x98bf, 0x89bc, 0x003f, - 0x8bc2, 0x003f, 0x9287, 0x003f, 0x003f, 0x003f, 0x8c8f, 0x98c1, - 0x003f, 0x003f, 0x003f, 0x9443, 0xfa6a, 0x003f, 0x003f, 0x003f, - /* 0x4f00 .. 0x4fff */ - 0xfa6b, 0x8ae9, 0x003f, 0xfa6c, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x98c2, 0x88c9, 0x003f, 0x003f, 0x8cde, 0x8aea, 0x959a, - 0x94b0, 0x8b78, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x89ef, 0x003f, 0x98e5, 0x9360, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x948c, - 0x98c4, 0x003f, 0x003f, 0x003f, 0x94ba, 0x003f, 0x97e0, 0x003f, - 0x904c, 0xfa6d, 0x8e66, 0x003f, 0x8e97, 0x89be, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x92cf, 0x003f, 0x003f, 0x9241, 0x98c8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x88ca, 0x92e1, 0x8f5a, - 0x8db2, 0x9743, 0x003f, 0x91cc, 0x003f, 0x89bd, 0xfa6e, 0x98c7, - 0x003f, 0x975d, 0x98c3, 0x98c5, 0x8dec, 0x98c6, 0x9b43, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x98ce, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x98d1, - 0x98cf, 0x003f, 0x003f, 0x89c0, 0x003f, 0x95b9, 0x98c9, 0x003f, - 0x003f, 0x003f, 0x003f, 0x98cd, 0x8cf1, 0x003f, 0x003f, 0x8e67, - 0x003f, 0x003f, 0x003f, 0x8aa4, 0x003f, 0x003f, 0x98d2, 0x003f, - 0x98ca, 0x003f, 0xfa70, 0x97e1, 0x003f, 0x8e98, 0x003f, 0x98cb, - 0x003f, 0x98d0, 0xfa6f, 0x003f, 0xfa72, 0x003f, 0x98d3, 0x003f, - 0x98cc, 0x003f, 0xfa71, 0x8b9f, 0x003f, 0x88cb, 0x003f, 0x003f, - 0x8ba0, 0x89bf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9b44, 0x003f, 0x9699, 0x958e, 0x8cf2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x904e, 0x97b5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x95d6, - 0x003f, 0x003f, 0x8c57, 0x91a3, 0x89e2, 0x003f, 0x003f, 0x003f, - 0x003f, 0xfa61, 0x8f72, 0x003f, 0x003f, 0xfa73, 0x98d7, 0x003f, - 0x98dc, 0x98da, 0x003f, 0x003f, 0x98d5, 0x003f, 0x003f, 0x91ad, - 0x98d8, 0x003f, 0x98db, 0x98d9, 0x003f, 0x95db, 0x003f, 0x98d6, - 0x003f, 0x904d, 0x003f, 0x9693, 0x98dd, 0x98de, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8f43, 0x98eb, - 0x003f, 0x003f, 0x003f, 0x946f, 0x003f, 0x9555, 0x98e6, 0x003f, - 0x95ee, 0x003f, 0x89b4, 0x003f, 0x003f, 0x003f, 0x98ea, 0xfa76, - /* 0x5000 .. 0x50ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x98e4, 0x98ed, 0x003f, - 0x003f, 0x9171, 0x003f, 0x8cc2, 0x003f, 0x947b, 0x003f, 0xe0c5, - 0x003f, 0x98ec, 0x937c, 0x003f, 0x98e1, 0x003f, 0x8cf4, 0x003f, - 0x003f, 0x8cf3, 0x98df, 0x003f, 0x003f, 0x003f, 0xfa77, 0x8ed8, - 0x003f, 0x98e7, 0xfa75, 0x95ed, 0x926c, 0x98e3, 0x8c91, 0x003f, - 0x98e0, 0x98e8, 0x98e2, 0x97cf, 0x98e9, 0x9860, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8be4, 0x003f, - 0x003f, 0x8c90, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xfa74, 0x003f, 0xfa7a, 0x98ee, 0x003f, 0x003f, 0xfa78, 0x98ef, - 0x98f3, 0x88cc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x95ce, - 0x98f2, 0x003f, 0x003f, 0x003f, 0x003f, 0x98f1, 0x98f5, 0x003f, - 0x003f, 0x003f, 0x98f4, 0x003f, 0x92e2, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8c92, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x98f6, 0x003f, 0x003f, 0x003f, - 0xfa79, 0x003f, 0x8ec3, 0x003f, 0x91a4, 0x92e3, 0x8bf4, 0x003f, - 0x98f7, 0x003f, 0x003f, 0x003f, 0x003f, 0x8b55, 0x003f, 0x003f, - 0x98f8, 0x003f, 0x003f, 0x003f, 0x003f, 0x98fa, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9654, 0x003f, 0x003f, - 0x003f, 0x8c86, 0x003f, 0x003f, 0xfa7b, 0x003f, 0x003f, 0x003f, - 0x8e50, 0x94f5, 0x98f9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8dc3, 0x9762, 0x003f, 0x003f, - 0x003f, 0x003f, 0x98fc, 0x9942, 0x98fb, 0x8dc2, 0x003f, 0x8f9d, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8c58, 0x003f, - 0x003f, 0x003f, 0x9943, 0x003f, 0x003f, 0x8bcd, 0x003f, 0x003f, - 0x003f, 0x9940, 0x9941, 0x003f, 0x003f, 0x93ad, 0x003f, 0x919c, - 0x003f, 0x8ba1, 0x003f, 0x003f, 0x003f, 0x966c, 0x9944, 0x003f, - 0xfa7d, 0x003f, 0x97bb, 0x003f, 0x003f, 0x003f, 0x9945, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9948, 0x003f, 0x9946, 0x003f, 0x916d, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9947, 0x9949, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xfa7c, 0x994b, 0x003f, 0x003f, - 0x003f, 0x994a, 0x003f, 0x95c6, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x5100 .. 0x51ff */ - 0x8b56, 0x994d, 0x994e, 0x003f, 0x89ad, 0x003f, 0x003f, 0x003f, - 0x003f, 0x994c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8ef2, 0x003f, 0x9951, 0x9950, 0x994f, 0x003f, - 0x98d4, 0x003f, 0x9952, 0x003f, 0x003f, 0x003f, 0x003f, 0x8f9e, - 0x003f, 0x9953, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9744, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x96d7, 0x003f, 0x003f, 0x003f, 0x003f, 0x9955, - 0x003f, 0x003f, 0x9954, 0x9957, 0x9956, 0x003f, 0x003f, 0x9958, - 0x9959, 0x88f2, 0x003f, 0x8cb3, 0x8c5a, 0x8f5b, 0x929b, 0x8ba2, - 0x90e6, 0x8cf5, 0xfa7e, 0x8d8e, 0x995b, 0x96c6, 0x9365, 0x003f, - 0x8e99, 0x003f, 0x995a, 0x003f, 0x995c, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x937d, 0x003f, 0x8a95, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x995d, 0x003f, 0xfa80, 0x93fc, 0x003f, 0x003f, - 0x9153, 0x995f, 0x9960, 0x94aa, 0x8cf6, 0x985a, 0x9961, 0x003f, - 0x003f, 0x8ba4, 0x003f, 0x003f, 0x003f, 0x95ba, 0x91b4, 0x8bef, - 0x9354, 0x003f, 0x003f, 0x003f, 0x8c93, 0x003f, 0x003f, 0x003f, - 0x9962, 0x003f, 0x9963, 0x003f, 0x003f, 0x93e0, 0x897e, 0x003f, - 0x003f, 0x9966, 0x8dfb, 0x003f, 0x9965, 0x8dc4, 0x003f, 0x9967, - 0xe3ec, 0x9968, 0x9660, 0x9969, 0x003f, 0x996a, 0x996b, 0x8fe7, - 0x003f, 0x8eca, 0x003f, 0x003f, 0x003f, 0xfa81, 0x003f, 0x003f, - 0x8aa5, 0x003f, 0x996e, 0x003f, 0x996c, 0x96bb, 0x996d, 0x003f, - 0x9579, 0x996f, 0x9970, 0x9971, 0x937e, 0x003f, 0x003f, 0x003f, - 0x9975, 0x9973, 0x9974, 0x9972, 0x8de1, 0x9976, 0x96e8, 0x97e2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9977, 0xfa82, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x90a6, 0x9978, 0x8f79, 0x003f, - 0x003f, 0x9979, 0x003f, 0x929c, 0x97bd, 0x9380, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x99c3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x997a, 0xeaa3, 0x8bc3, 0x003f, 0x003f, - 0x997b, 0x967d, 0x003f, 0x003f, 0x003f, 0x003f, 0x8f88, 0x91fa, - 0x003f, 0x997d, 0x93e2, 0x003f, 0xfa83, 0x997e, 0x003f, 0x003f, - 0x9980, 0x8a4d, 0x003f, 0x003f, 0x003f, 0x9981, 0x8ba5, 0x003f, - 0x93ca, 0x899a, 0x8f6f, 0x003f, 0x003f, 0x949f, 0x9982, 0x003f, - /* 0x5200 .. 0x52ff */ - 0x9381, 0x003f, 0x003f, 0x906e, 0x9983, 0x003f, 0x95aa, 0x90d8, - 0x8aa0, 0x003f, 0x8aa7, 0x9984, 0x003f, 0x003f, 0x9986, 0x003f, - 0x003f, 0x8c59, 0x003f, 0x003f, 0x9985, 0xfa84, 0x003f, 0x97f1, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8f89, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x94bb, 0x95ca, 0x003f, 0x9987, - 0x003f, 0x9798, 0x9988, 0x003f, 0x003f, 0x003f, 0x9989, 0x003f, - 0x939e, 0x003f, 0x003f, 0x998a, 0x003f, 0x003f, 0x90a7, 0x8dfc, - 0x8c94, 0x998b, 0x8e68, 0x8d8f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x92e4, 0x998d, 0x003f, 0x003f, 0x91a5, - 0x003f, 0x003f, 0x8ded, 0x998e, 0x998f, 0x914f, 0x003f, 0x998c, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9991, 0x003f, 0x9655, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8d84, 0x003f, 0x003f, 0x9990, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8c95, 0x8ddc, 0x948d, 0x003f, 0x003f, - 0x003f, 0x9994, 0x9992, 0x003f, 0x003f, 0x003f, 0x003f, 0x959b, - 0x8fe8, 0x999b, 0x8a84, 0x9995, 0x9993, 0x916e, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9997, 0x003f, 0x9996, - 0x003f, 0x003f, 0x003f, 0x8a63, 0x003f, 0x003f, 0x003f, 0x8c80, - 0x999c, 0x97ab, 0x003f, 0x003f, 0x003f, 0x9998, 0x003f, 0x003f, - 0x003f, 0x999d, 0x999a, 0x003f, 0x9999, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x97cd, 0xfa85, 0x003f, 0x003f, 0x8cf7, - 0x89c1, 0x003f, 0x003f, 0x97f2, 0x003f, 0x003f, 0xfa86, 0x003f, - 0x003f, 0x8f95, 0x9377, 0x8d85, 0x99a0, 0x99a1, 0x003f, 0xfb77, - 0x003f, 0x97e3, 0x003f, 0x003f, 0x984a, 0x99a3, 0x003f, 0x003f, - 0x003f, 0x8cf8, 0x003f, 0x003f, 0x99a2, 0x003f, 0x8a4e, 0x003f, - 0xfa87, 0x99a4, 0x003f, 0x9675, 0x003f, 0x92ba, 0x003f, 0x9745, - 0x003f, 0x95d7, 0x003f, 0x003f, 0x003f, 0x99a5, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe8d3, 0x003f, 0x003f, 0x93ae, 0x003f, 0x99a6, - 0x8aa8, 0x96b1, 0x003f, 0xfa88, 0x003f, 0x8f9f, 0x99a7, 0x95e5, - 0x99ab, 0x003f, 0x90a8, 0x99a8, 0x8bce, 0x003f, 0x99a9, 0x8aa9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8c4d, 0x99ac, 0x003f, 0x99ad, 0x003f, 0x003f, - 0x99ae, 0x99af, 0x8ed9, 0x003f, 0x003f, 0x003f, 0x8cf9, 0x96dc, - /* 0x5300 .. 0x53ff */ - 0xfa89, 0x96e6, 0x93f5, 0x003f, 0x003f, 0x95ef, 0x99b0, 0xfa8a, - 0x99b1, 0x003f, 0x003f, 0x003f, 0x003f, 0x99b3, 0x003f, 0x99b5, - 0x99b4, 0x003f, 0x003f, 0x003f, 0x003f, 0x99b6, 0x89bb, 0x966b, - 0x003f, 0x8dfa, 0x99b7, 0x003f, 0x003f, 0x9178, 0x003f, 0x003f, - 0x8fa0, 0x8ba7, 0x003f, 0x99b8, 0xfa8b, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x94d9, 0x003f, 0x003f, 0x003f, 0x003f, 0x99b9, - 0x003f, 0x99ba, 0x003f, 0x99bb, 0x003f, 0x003f, 0x003f, 0x003f, - 0x99bc, 0x9543, 0x8be6, 0x88e3, 0x003f, 0x003f, 0x003f, 0x93bd, - 0x99bd, 0x8f5c, 0x003f, 0x90e7, 0x003f, 0x99bf, 0x99be, 0x8fa1, - 0x8cdf, 0x99c1, 0x94bc, 0x003f, 0x003f, 0x99c2, 0x003f, 0x003f, - 0x003f, 0x94da, 0x91b2, 0x91ec, 0x8ba6, 0x003f, 0x003f, 0x93ec, - 0x9250, 0x003f, 0x948e, 0x003f, 0x966d, 0x003f, 0x99c4, 0x003f, - 0x90e8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8c54, 0x003f, - 0x003f, 0x99c5, 0x003f, 0x003f, 0x003f, 0x003f, 0x99c6, 0x894b, - 0x88f3, 0x8aeb, 0xfa8c, 0x91a6, 0x8b70, 0x9791, 0x003f, 0x99c9, - 0x89b5, 0x003f, 0x003f, 0x99c8, 0x003f, 0x003f, 0x003f, 0x8ba8, - 0x003f, 0x003f, 0x99ca, 0x003f, 0x96ef, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfa8d, 0x003f, 0x003f, 0x99cb, 0x003f, - 0x97d0, 0x003f, 0x8cfa, 0x003f, 0x003f, 0x003f, 0x003f, 0x8cb4, - 0x99cc, 0x003f, 0x003f, 0x003f, 0x003f, 0x99ce, 0x99cd, 0x003f, - 0x907e, 0x8958, 0x003f, 0x003f, 0x003f, 0x897d, 0x99cf, 0x003f, - 0x99d0, 0x003f, 0xfa8e, 0x8cb5, 0x003f, 0x003f, 0x99d1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8b8e, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8e51, 0x99d2, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9694, 0x8db3, 0x8b79, 0x9746, 0x916f, 0x94bd, 0x8efb, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8f66, 0x003f, 0x8ee6, 0x8ef3, - 0x003f, 0x8f96, 0x003f, 0x94be, 0x003f, 0xfa8f, 0x003f, 0x99d5, - 0x003f, 0x8962, 0x9170, 0x8cfb, 0x8cc3, 0x8be5, 0x003f, 0x003f, - 0x99d9, 0x9240, 0x91fc, 0x8ba9, 0x8fa2, 0x99da, 0x99d8, 0x89c2, - 0x91e4, 0x8eb6, 0x8e6a, 0x8945, 0x003f, 0x003f, 0x8a90, 0x8d86, - 0x8e69, 0x003f, 0x99db, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x5400 .. 0x54ff */ - 0x003f, 0x99dc, 0x003f, 0x8b68, 0x8a65, 0x003f, 0x003f, 0x003f, - 0x8d87, 0x8b67, 0x92dd, 0x8944, 0x93af, 0x96bc, 0x8d40, 0x9799, - 0x9366, 0x8cfc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8c4e, 0x003f, 0x99e5, 0x003f, 0x8be1, - 0x9669, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x94db, 0x003f, - 0x003f, 0x99e4, 0x003f, 0x8adc, 0x99df, 0x99e0, 0x99e2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x99e3, 0x003f, - 0x8b7a, 0x9081, 0x003f, 0x95ab, 0x99e1, 0x99dd, 0x8ce1, 0x003f, - 0x99de, 0x003f, 0x9843, 0x003f, 0x003f, 0x003f, 0x95f0, 0x003f, - 0x92e6, 0x8ce0, 0x8d90, 0x003f, 0x003f, 0x003f, 0x99e6, 0x003f, - 0x003f, 0x93db, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x99ea, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8efc, 0x003f, 0x8ef4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x99ed, 0x99eb, 0x003f, 0x96a1, 0x003f, 0x99e8, 0x99f1, 0x99ec, - 0x003f, 0x003f, 0x003f, 0x99ef, 0x8cc4, 0x96bd, 0x003f, 0x003f, - 0x99f0, 0x003f, 0x003f, 0x003f, 0x99f2, 0x003f, 0x99f4, 0x003f, - 0x003f, 0x003f, 0xfa92, 0x8dee, 0x9861, 0x003f, 0x99e9, 0x99e7, - 0x99f3, 0x003f, 0x99ee, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xfa91, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x99f6, 0x003f, 0x9a42, 0x99f8, 0x003f, 0x003f, - 0x99fc, 0xfa93, 0x003f, 0x9a40, 0x99f9, 0x003f, 0x003f, 0x9a5d, - 0x003f, 0x003f, 0x8de7, 0x8a50, 0x003f, 0x003f, 0x003f, 0x003f, - 0x99f7, 0x003f, 0x003f, 0x003f, 0x9a44, 0x88f4, 0x9a43, 0x003f, - 0x88a3, 0x9569, 0x9a41, 0x003f, 0x99fa, 0x003f, 0x003f, 0x99f5, - 0x99fb, 0x8dc6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9a45, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x88f5, 0x9a4e, 0x003f, 0x003f, 0x9a46, 0x9a47, 0x003f, - 0x8fa3, 0x9689, 0x003f, 0x003f, 0x003f, 0x9a4c, 0x9a4b, 0x003f, - 0x003f, 0x003f, 0x934e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9a4d, 0x003f, 0x003f, 0x9a4a, 0x003f, 0xfa94, - /* 0x5500 .. 0x55ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x8953, 0x003f, 0x8db4, 0x904f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9a48, - 0x9382, 0x003f, 0x003f, 0x003f, 0x9a49, 0x003f, 0x88a0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9a53, 0x9742, - 0x003f, 0x8fa5, 0x003f, 0x9a59, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9a58, 0x9a4f, 0x003f, 0x003f, 0x003f, 0x003f, 0x91c1, 0x003f, - 0x9a50, 0x003f, 0x003f, 0x003f, 0x91ed, 0x9a55, 0x8fa4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9a52, 0x003f, 0x003f, 0x96e2, - 0x003f, 0x003f, 0x003f, 0x8c5b, 0x003f, 0x003f, 0x9a56, 0x9a57, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9a54, 0x9a5a, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9a51, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9a60, 0x9a65, 0x003f, 0x9a61, 0x003f, - 0x9a5c, 0x003f, 0x003f, 0x9a66, 0x9150, 0x003f, 0xfa95, 0x9a68, - 0x003f, 0x8d41, 0x9a5e, 0x929d, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9a62, 0x9a5b, 0x8aab, 0x003f, 0x8aec, 0x8a85, 0x9a63, 0x9a5f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8c96, - 0x9a69, 0x9a67, 0x9172, 0x8b69, 0x8baa, 0x003f, 0x9a64, 0x003f, - 0x8bf2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8963, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9a6d, 0x9a6b, 0x003f, 0x9aa5, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9a70, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9a6a, 0x003f, 0x9a6e, 0x003f, 0x003f, 0x9a6c, - 0x003f, 0x003f, 0x003f, 0x8e6b, 0x9a6f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9a72, - 0x003f, 0x9a77, 0x003f, 0x003f, 0x003f, 0x9a75, 0x9a74, 0x003f, - /* 0x5600 .. 0x56ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9251, 0x003f, - 0x003f, 0x89c3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9a71, 0x003f, 0x9a73, 0x8fa6, - 0x8952, 0x003f, 0x003f, 0x9a76, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x89dc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9a82, - 0x003f, 0x8ffa, 0x9a7d, 0x003f, 0x9a7b, 0x003f, 0x9a7c, 0x003f, - 0x9a7e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x895c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9158, 0x003f, 0x9a78, 0x003f, - 0x9a79, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8a9a, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9a81, 0x003f, 0x003f, 0x003f, - 0x8aed, 0x003f, 0x9a84, 0x9a80, 0x9a83, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x95ac, 0x003f, 0x003f, 0x003f, - 0x93d3, 0x003f, 0x94b6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9a86, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9a85, 0x8a64, - 0x003f, 0x003f, 0x9a87, 0x003f, 0x003f, 0x003f, 0x003f, 0x9a8a, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9a89, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9a88, 0x003f, 0x9458, 0x003f, 0x003f, 0x9a8b, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9a8c, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9a8e, 0x003f, 0x9a8d, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9a90, 0x003f, 0x003f, 0x003f, - 0x9a93, 0x9a91, 0x9a8f, 0x9a92, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9a94, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9a95, 0x003f, - 0x003f, 0x9a96, 0x003f, 0x9a97, 0x003f, 0x003f, 0x003f, 0x9a98, - 0x9964, 0x003f, 0x8efa, 0x8e6c, 0x003f, 0x003f, 0x89f1, 0x003f, - 0x88f6, 0x003f, 0x003f, 0x9263, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9a99, 0x003f, - 0x8da2, 0x003f, 0x88cd, 0x907d, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9a9a, 0x8cc5, 0x003f, 0x003f, 0x8d91, 0x003f, 0x9a9c, - /* 0x5700 .. 0x57ff */ - 0x9a9b, 0x003f, 0x003f, 0x95de, 0x9a9d, 0x003f, 0x003f, 0x003f, - 0x9a9f, 0x9a9e, 0x003f, 0x9aa0, 0x003f, 0x9aa1, 0x003f, 0x8c97, - 0x003f, 0x003f, 0x8980, 0x9aa2, 0x003f, 0x003f, 0x9aa4, 0x003f, - 0x9aa3, 0x003f, 0x003f, 0x003f, 0x9aa6, 0x003f, 0x003f, 0x9379, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9aa7, 0x88b3, - 0x8ddd, 0x003f, 0x003f, 0x003f, 0x003f, 0x8c5c, 0x003f, 0x003f, - 0x926e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9aa8, - 0x9aa9, 0x003f, 0x003f, 0x9aab, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9aac, 0x003f, 0x8de2, 0x003f, 0x003f, 0x003f, 0x003f, 0x8bcf, - 0x003f, 0x003f, 0x9656, 0x003f, 0x003f, 0x003f, 0x9aaa, 0x9aad, - 0x8dbf, 0x8d42, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xfa96, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9ab1, 0x003f, 0x003f, 0x8da3, 0xfa97, 0x9252, 0x003f, - 0x003f, 0x9aae, 0x92d8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9ab2, - 0x003f, 0x003f, 0x9082, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9ab0, 0x9ab3, 0x003f, 0x8c5e, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9ab4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9ab5, 0x003f, 0x8d43, 0x8a5f, 0x9ab7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9ab8, 0x003f, 0xfa98, 0x003f, 0x003f, 0x003f, - 0x9ab9, 0x003f, 0x003f, 0x9ab6, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9aaf, 0x003f, 0x003f, 0x9aba, 0x003f, 0x003f, 0x9abb, 0xfa9a, - 0xfa99, 0x003f, 0x003f, 0x9684, 0x003f, 0x003f, 0x8fe9, 0x003f, - 0x003f, 0x003f, 0x9abd, 0x9abe, 0x9abc, 0x003f, 0x9ac0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9457, 0x003f, 0x003f, 0x88e6, - 0x9575, 0x003f, 0x003f, 0x9ac1, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8ffb, 0x003f, 0x003f, 0x8eb7, - 0x003f, 0x947c, 0x8aee, 0x003f, 0x8de9, 0x003f, 0x003f, 0x003f, - /* 0x5800 .. 0x58ff */ - 0x9678, 0x003f, 0x93b0, 0x003f, 0x003f, 0x8c98, 0x91cd, 0x003f, - 0x003f, 0x003f, 0x9abf, 0x9ac2, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x91c2, 0x003f, 0x003f, - 0x003f, 0x9ac3, 0x003f, 0x003f, 0x003f, 0x9ac4, 0x003f, 0x003f, - 0x003f, 0x9ac6, 0x003f, 0x003f, 0x92e7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8aac, 0x003f, 0x003f, 0x003f, 0x003f, 0xea9f, - 0x8981, 0x95f1, 0x003f, 0x003f, 0x8fea, 0x9367, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8de4, 0x003f, 0x003f, 0x9acc, 0x003f, 0x003f, - 0x95bb, 0x97db, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x89f2, 0x9ac8, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9159, 0x9acb, 0x003f, 0x9383, 0x003f, 0x003f, 0x9368, - 0x9384, 0x94b7, 0x92cb, 0x003f, 0x003f, 0x003f, 0x8dc7, 0x003f, - 0x003f, 0x003f, 0x9ac7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8996, 0x003f, 0x9355, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9ac9, 0x003f, 0x9ac5, 0x003f, 0x003f, 0x906f, 0x003f, 0x003f, - 0x003f, 0x9acd, 0x003f, 0x003f, 0x003f, 0x003f, 0x8f6d, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8bab, 0x003f, 0x9ace, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x95e6, 0x003f, 0x003f, 0x003f, 0x919d, - 0x003f, 0x003f, 0x003f, 0x003f, 0x92c4, 0x003f, 0xfa9d, 0x9ad0, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x966e, 0x003f, 0x003f, 0x9ad1, 0x003f, 0x003f, 0x9ad6, 0x003f, - 0x003f, 0x003f, 0xfa9e, 0x95ad, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9ad5, 0x9acf, 0x9ad2, 0x9ad4, 0x003f, 0x003f, 0x8da4, 0x003f, - 0x003f, 0x95c7, 0x003f, 0x003f, 0x003f, 0x9ad7, 0x003f, 0x9264, - 0x003f, 0x003f, 0x89f3, 0x003f, 0x8feb, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9ad9, 0x003f, 0x9ad8, 0x003f, 0x8d88, 0x003f, 0x9ada, - 0x9adc, 0x9adb, 0x003f, 0x003f, 0x9ade, 0x003f, 0x9ad3, 0x9ae0, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9adf, 0x9add, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8e6d, 0x9070, 0x003f, 0x9173, 0x9ae1, - 0x90ba, 0x88eb, 0x9484, 0x003f, 0x003f, 0x003f, 0x003f, 0x92d9, - 0x003f, 0x9ae3, 0x9ae2, 0x9ae4, 0x9ae5, 0x9ae6, 0x003f, 0x003f, - /* 0x5900 .. 0x59ff */ - 0x003f, 0x003f, 0x9ae7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x95cf, 0x9ae8, 0xfa9f, 0x003f, 0x003f, 0x003f, 0x89c4, - 0x9ae9, 0x003f, 0x003f, 0x003f, 0x003f, 0x975b, 0x8a4f, 0x003f, - 0x99c7, 0x8f67, 0x91bd, 0x9aea, 0x96e9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x96b2, 0x003f, 0x003f, 0x9aec, 0x003f, 0x91e5, - 0x003f, 0x9356, 0x91be, 0x9576, 0x9aed, 0x9aee, 0x899b, 0x003f, - 0x003f, 0x8eb8, 0x9aef, 0x003f, 0x003f, 0x003f, 0x003f, 0x88ce, - 0x9af0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9af1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8982, 0x003f, 0x003f, 0x8aef, - 0x93de, 0x95f2, 0x003f, 0x003f, 0x003f, 0x003f, 0x9af5, 0x9174, - 0x9af4, 0x8c5f, 0x003f, 0xfaa0, 0x967a, 0x9af3, 0x003f, 0x9385, - 0x9af7, 0x003f, 0x9af6, 0xfaa1, 0x003f, 0xfaa2, 0x003f, 0x003f, - 0x9af9, 0x003f, 0x9af8, 0xfaa3, 0x003f, 0x899c, 0x003f, 0x9afa, - 0x8fa7, 0x9afc, 0x9244, 0x003f, 0x9afb, 0x003f, 0x95b1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8f97, 0x937a, 0x003f, 0x003f, 0x003f, - 0x9b40, 0x003f, 0x003f, 0x003f, 0x003f, 0x8d44, 0x003f, 0x003f, - 0x003f, 0x9b41, 0x9440, 0x94dc, 0x96cf, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9444, 0x003f, 0x003f, 0x9b4a, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8b57, 0x003f, 0x003f, 0x9764, 0x003f, - 0x003f, 0x96ad, 0x003f, 0x9baa, 0x003f, 0x9b42, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9b45, 0xfaa4, 0x91c3, 0x003f, 0x003f, - 0x9657, 0x003f, 0x003f, 0x003f, 0x9369, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9b46, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9685, 0xfaa5, 0x8dc8, 0x003f, 0x003f, 0x8fa8, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9b47, 0x003f, - 0x003f, 0x8e6f, 0x003f, 0x8e6e, 0x003f, 0x003f, 0x003f, 0x003f, - 0x88b7, 0x8cc6, 0x003f, 0x90a9, 0x88cf, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9b4b, 0x9b4c, 0x003f, 0x9b49, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8957, 0x8aad, 0x003f, - 0x9b48, 0x003f, 0x96c3, 0x9550, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x88a6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x88f7, 0x003f, 0x003f, 0x003f, 0x8e70, - /* 0x5a00 .. 0x5aff */ - 0x003f, 0x88d0, 0x003f, 0x88a1, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9b51, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9b4f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x96ba, 0x003f, 0x9b52, 0x003f, 0x9b50, 0x003f, 0x003f, 0x9b4e, - 0x9050, 0x003f, 0x003f, 0x003f, 0x003f, 0x9b4d, 0x003f, 0x003f, - 0x003f, 0x95d8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8ce2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9b56, 0x9b57, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8fa9, 0x003f, 0x003f, 0x003f, - 0x9b53, 0x984b, 0x003f, 0x003f, 0x003f, 0x003f, 0x946b, 0x003f, - 0x003f, 0x9b55, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8da5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9b58, 0x003f, 0x003f, 0x003f, 0x9577, 0x003f, - 0x003f, 0x003f, 0x9b59, 0x003f, 0x9b54, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x96b9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x947d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9b5a, 0x9551, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9b5b, 0x9b5f, 0x9b5c, 0x003f, - 0x003f, 0x89c5, 0x9b5e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8eb9, 0x003f, 0x9b5d, 0x8c99, 0x003f, 0x003f, 0x003f, - 0x9b6b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9b64, 0x9b61, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9284, 0x003f, 0x9b60, 0x003f, 0x003f, 0x9b62, 0x003f, - 0x003f, 0x9b63, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9b65, 0x9b66, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x5b00 .. 0x5bff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8af0, 0x003f, 0x9b68, 0x9b67, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9b69, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8fec, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9b6c, 0x003f, 0x92da, 0x003f, 0x003f, 0x003f, - 0x8964, 0x003f, 0x9b6a, 0x003f, 0x003f, 0x003f, 0x9b6d, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9b6e, 0x003f, - 0x9b71, 0x003f, 0x003f, 0x9b6f, 0x003f, 0x9b70, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8e71, 0x9b72, 0x003f, 0x003f, 0x8d45, 0x9b73, 0xfaa6, 0x8e9a, - 0x91b6, 0x003f, 0x9b74, 0x9b75, 0x8e79, 0x8d46, 0x003f, 0x96d0, - 0x003f, 0x003f, 0x003f, 0x8b47, 0x8cc7, 0x9b76, 0x8a77, 0x003f, - 0x003f, 0x9b77, 0x003f, 0x91b7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9b78, 0x9ba1, 0x003f, 0x9b79, 0x003f, 0x9b7a, 0x003f, 0x003f, - 0x9b7b, 0x003f, 0x9b7d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9b7e, 0x003f, 0x003f, 0x9b80, 0x003f, 0x91ee, 0x003f, 0x8946, - 0x8ee7, 0x88c0, 0x003f, 0x9176, 0x8aae, 0x8eb3, 0x003f, 0x8d47, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9386, 0x003f, 0x8f40, - 0x8aaf, 0x9288, 0x92e8, 0x88b6, 0x8b58, 0x95f3, 0x003f, 0x8ec0, - 0x003f, 0x003f, 0x8b71, 0x90e9, 0x8eba, 0x9747, 0x9b81, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8b7b, 0x003f, - 0x8dc9, 0x003f, 0x003f, 0x8a51, 0x8983, 0x8faa, 0x89c6, 0x003f, - 0x9b82, 0x9765, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8f68, - 0xfaa7, 0x003f, 0x8ee2, 0x9b83, 0x8af1, 0x93d0, 0x96a7, 0x9b84, - 0x003f, 0x9b85, 0x003f, 0x003f, 0x9578, 0x003f, 0x003f, 0x003f, - 0x9b87, 0x003f, 0x8aa6, 0x8bf5, 0x9b86, 0x003f, 0x003f, 0x003f, - 0xfaa9, 0x003f, 0x003f, 0x8ab0, 0x003f, 0x9051, 0x9b8b, 0x8e40, - 0x003f, 0x89c7, 0x9b8a, 0x003f, 0x9b88, 0x9b8c, 0x9b89, 0x944a, - 0x9ecb, 0x9052, 0x003f, 0x9b8d, 0xfaaa, 0x003f, 0x97be, 0x003f, - 0x9b8e, 0x003f, 0x003f, 0x9b90, 0x003f, 0x929e, 0x9b8f, 0x003f, - 0x90a1, 0x003f, 0x8e9b, 0x003f, 0x003f, 0x003f, 0x91ce, 0x8ef5, - /* 0x5c00 .. 0x5cff */ - 0x003f, 0x9595, 0x90ea, 0x003f, 0x8ecb, 0x9b91, 0x8fab, 0x9b92, - 0x9b93, 0x88d1, 0x91b8, 0x9071, 0x003f, 0x9b94, 0x93b1, 0x8fac, - 0x003f, 0x8fad, 0x003f, 0x9b95, 0x003f, 0x003f, 0x90eb, 0x003f, - 0x003f, 0x003f, 0x8fae, 0x003f, 0x003f, 0x003f, 0xfaab, 0x003f, - 0x9b96, 0x003f, 0x9b97, 0x003f, 0x96de, 0x003f, 0x003f, 0x003f, - 0x9b98, 0x003f, 0x003f, 0x003f, 0x003f, 0x8bc4, 0x003f, 0x003f, - 0x003f, 0x8f41, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9b99, 0x9b9a, 0x8eda, 0x904b, 0x93f2, 0x9073, 0x94f6, 0x9441, - 0x8bc7, 0x9b9b, 0x003f, 0x003f, 0x003f, 0x8b8f, 0x9b9c, 0x003f, - 0x8bfc, 0x003f, 0x93cd, 0x89ae, 0x003f, 0x8e72, 0x9b9d, 0x9ba0, - 0x9b9f, 0x8bfb, 0x003f, 0x9b9e, 0x003f, 0x9357, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x91ae, 0x003f, - 0x936a, 0x8ec6, 0x003f, 0x003f, 0x9177, 0x979a, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9ba2, 0x003f, 0x9ba3, 0x93d4, - 0x003f, 0x8e52, 0x003f, 0x003f, 0x003f, 0x003f, 0x9ba5, 0x003f, - 0x003f, 0x9ba6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9ba7, 0x003f, 0x003f, 0x003f, - 0x8af2, 0x9ba8, 0x003f, 0x003f, 0x9ba9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x89aa, 0x003f, 0x003f, 0x003f, 0x003f, 0xfaac, 0x003f, - 0x915a, 0x8ae2, 0x003f, 0x9bab, 0x96a6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x91d0, 0x003f, 0x8a78, 0x003f, 0x003f, 0x9bad, 0x9baf, - 0x8add, 0x003f, 0xfaad, 0x9bac, 0x9bae, 0x003f, 0x9bb1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9bb0, 0x003f, 0x9bb2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9bb3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x93bb, 0x8bac, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x89e3, 0x9bb4, 0x9bb9, 0x003f, 0x003f, 0x9bb7, 0x003f, 0x95f5, - 0x95f4, 0x003f, 0x003f, 0x003f, 0x003f, 0xfaae, 0x9387, 0x003f, - 0x003f, 0x003f, 0x9bb6, 0x8f73, 0x003f, 0x9bb5, 0x003f, 0x003f, - /* 0x5d00 .. 0x5dff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9092, - 0x003f, 0x003f, 0x003f, 0x9bba, 0x003f, 0x003f, 0x8de8, 0x003f, - 0x003f, 0x9bc0, 0x003f, 0x003f, 0x9bc1, 0x9bbb, 0x8a52, 0x9bbc, - 0x9bc5, 0x9bc4, 0x9bc3, 0x9bbf, 0x003f, 0x003f, 0x003f, 0x9bbe, - 0x003f, 0x003f, 0x9bc2, 0x003f, 0x003f, 0x003f, 0x003f, 0xfaaf, - 0x003f, 0x95f6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xfab2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9bc9, 0x9bc6, 0x003f, 0x9bc8, 0x003f, - 0x9792, 0x003f, 0x9bc7, 0xfab0, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9bbd, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9093, 0x003f, 0x003f, 0x9bca, 0xfab3, 0x003f, 0x8db5, - 0x003f, 0x003f, 0x003f, 0x9bcb, 0x003f, 0x003f, 0x9bcc, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9bcf, 0x003f, 0x9bce, 0x003f, 0x003f, 0x9bcd, - 0x003f, 0x003f, 0x003f, 0x9388, 0x9bb8, 0x003f, 0x003f, 0x003f, - 0x9bd5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9bd1, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9bd0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9bd2, 0x003f, 0x9bd3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9bd6, - 0xfab4, 0xfab5, 0x97e4, 0x003f, 0x9bd7, 0x9bd4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9bd8, 0x003f, 0x003f, 0x8ade, 0x9bd9, 0x003f, 0x003f, - 0xfab6, 0x003f, 0x9bdb, 0x9bda, 0x003f, 0x003f, 0x9bdc, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9bdd, 0x003f, 0x90ec, 0x8f42, 0x003f, - 0x003f, 0x8f84, 0x003f, 0x9183, 0x003f, 0x8d48, 0x8db6, 0x8d49, - 0x8b90, 0x003f, 0x003f, 0x9bde, 0x003f, 0x003f, 0x8db7, 0x003f, - 0x003f, 0x8cc8, 0x9bdf, 0x96a4, 0x9462, 0x9be0, 0x003f, 0x8d4a, - 0x003f, 0x003f, 0x003f, 0x8aaa, 0x003f, 0x9246, 0x8bd0, 0x003f, - /* 0x5e00 .. 0x5eff */ - 0x003f, 0x003f, 0x8e73, 0x957a, 0x003f, 0x003f, 0x94bf, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9be1, 0x8af3, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9be4, 0x003f, 0x003f, 0x003f, 0x003f, 0x929f, 0x003f, - 0x003f, 0x9be3, 0x9be2, 0x9be5, 0x003f, 0x92e9, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9083, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8e74, 0x003f, 0x90c8, 0x003f, 0x91d1, - 0x8b41, 0x003f, 0x003f, 0x92a0, 0x003f, 0x003f, 0x9be6, 0x9be7, - 0x8fed, 0x003f, 0x003f, 0x003f, 0x003f, 0x9658, 0x003f, 0x003f, - 0x9bea, 0x003f, 0x003f, 0x9be9, 0x9be8, 0x959d, 0x003f, 0x9bf1, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9679, 0x003f, 0x9beb, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9bed, 0x968b, 0x003f, 0x9bec, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9bee, - 0x003f, 0x94a6, 0x9bef, 0x95bc, 0x9bf0, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8ab1, 0x95bd, 0x944e, 0x9bf2, 0x9bf3, 0x003f, - 0x8d4b, 0x8ab2, 0x9bf4, 0x8cb6, 0x9763, 0x9748, 0x8af4, 0x9bf6, - 0x003f, 0x92a1, 0x003f, 0x8d4c, 0x8faf, 0x003f, 0x003f, 0x94dd, - 0x003f, 0x003f, 0x8fb0, 0x003f, 0x003f, 0x003f, 0x003f, 0x8f98, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x92ea, 0x95f7, 0x9358, - 0x003f, 0x003f, 0x8d4d, 0x003f, 0x957b, 0x003f, 0x003f, 0x003f, - 0x9bf7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9378, 0x8dc0, - 0x003f, 0x003f, 0x003f, 0x8cc9, 0x003f, 0x92eb, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x88c1, 0x8f8e, 0x8d4e, - 0x9766, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9bf8, 0x9bf9, 0x9470, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9bfa, 0x97f5, 0x984c, 0x003f, 0x003f, 0x003f, 0x003f, 0x9bfc, - 0x9bfb, 0x003f, 0x003f, 0x8a66, 0x003f, 0x003f, 0x9c40, 0x003f, - 0x003f, 0x003f, 0x9c43, 0x9c44, 0x003f, 0x9c42, 0x003f, 0x955f, - 0x8fb1, 0x9c46, 0x9c45, 0x9c41, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9c47, 0x9c48, 0x003f, 0x003f, 0x9c49, 0x003f, 0x003f, 0x003f, - 0x9c4c, 0x9c4a, 0x003f, 0x9c4b, 0x9c4d, 0x003f, 0x8984, 0x92ec, - 0x9c4e, 0x003f, 0x8c9a, 0x89f4, 0x9455, 0x003f, 0x9c4f, 0x93f9, - /* 0x5f00 .. 0x5fff */ - 0x003f, 0x95d9, 0x003f, 0x9c50, 0x984d, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9c51, 0x95be, 0x9c54, 0x989f, 0x98af, 0x003f, 0x8eae, - 0x93f3, 0x9c55, 0x003f, 0x8b7c, 0x92a2, 0x88f8, 0x9c56, 0x95a4, - 0x8d4f, 0x003f, 0x003f, 0x926f, 0x003f, 0x003f, 0x003f, 0x92ed, - 0x003f, 0xfab7, 0x003f, 0x003f, 0x003f, 0x96ed, 0x8cb7, 0x8cca, - 0x003f, 0x9c57, 0x003f, 0x003f, 0x003f, 0x9c58, 0x003f, 0x9c5e, - 0x003f, 0x8ee3, 0x003f, 0x003f, 0xfab8, 0x92a3, 0x003f, 0x8bad, - 0x9c59, 0x003f, 0x003f, 0x003f, 0x954a, 0x003f, 0x9265, 0x003f, - 0x003f, 0x9c5a, 0x003f, 0x003f, 0x003f, 0xfa67, 0x003f, 0x003f, - 0x9c5b, 0x003f, 0x8bae, 0x003f, 0x9c5c, 0x003f, 0x9c5d, 0x003f, - 0x003f, 0x9c5f, 0x003f, 0x9396, 0x003f, 0x003f, 0x9c60, 0x9c61, - 0x003f, 0x9c62, 0x003f, 0x003f, 0x9c53, 0x9c52, 0x003f, 0x003f, - 0x003f, 0x9c63, 0x8c60, 0x003f, 0x003f, 0x003f, 0x9546, 0xfab9, - 0x003f, 0x8dca, 0x9556, 0x92a4, 0x956a, 0x9c64, 0x003f, 0x003f, - 0x8fb2, 0x8965, 0x003f, 0x9c65, 0x003f, 0x003f, 0x003f, 0x9c66, - 0x003f, 0x96f0, 0x003f, 0x003f, 0x94de, 0x003f, 0x003f, 0x9c69, - 0x899d, 0x90aa, 0x9c68, 0x9c67, 0x8c61, 0x91d2, 0x003f, 0x9c6d, - 0x9c6b, 0x003f, 0x9c6a, 0x97a5, 0x8ce3, 0x003f, 0x003f, 0x003f, - 0x8f99, 0x9c6c, 0x936b, 0x8f5d, 0x003f, 0x003f, 0x003f, 0x93be, - 0x9c70, 0x9c6f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9c6e, 0x003f, - 0x9c71, 0x8ce4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9c72, 0x959c, 0x8f7a, 0x003f, 0x003f, 0x9c73, 0x94f7, 0x003f, - 0x003f, 0x003f, 0x003f, 0x93bf, 0x92a5, 0x003f, 0x003f, 0xfaba, - 0x003f, 0x934f, 0x003f, 0x003f, 0x9c74, 0x8b4a, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9053, 0x003f, 0x954b, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8af5, 0x9445, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9c75, 0x8e75, - 0x9659, 0x965a, 0x003f, 0x003f, 0x899e, 0x9c7a, 0xfabb, 0x003f, - 0x9289, 0x003f, 0x003f, 0x003f, 0x9c77, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x89f5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9cab, 0x9c79, 0x003f, 0x003f, 0x003f, 0x944f, 0x003f, 0x003f, - 0x9c78, 0x003f, 0x003f, 0x9c76, 0x003f, 0x8d9a, 0x003f, 0x9c7c, - /* 0x6000 .. 0x60ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9c83, 0x9c89, - 0x9c81, 0x003f, 0x937b, 0x003f, 0x003f, 0x9c86, 0x957c, 0x003f, - 0x003f, 0x9c80, 0x003f, 0x9c85, 0x97e5, 0x8e76, 0x003f, 0x003f, - 0x91d3, 0x9c7d, 0x003f, 0x003f, 0x003f, 0x8b7d, 0x9c88, 0x90ab, - 0x8985, 0x9c82, 0x89f6, 0x9c87, 0x003f, 0x003f, 0x003f, 0x8baf, - 0x003f, 0x9c84, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9c8a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9c8c, 0x9c96, 0x9c94, 0x003f, 0x003f, 0x9c91, 0x003f, - 0x003f, 0x003f, 0x9c90, 0x97f6, 0x003f, 0x9c92, 0x003f, 0x003f, - 0x8bb0, 0x003f, 0x8d50, 0x003f, 0x003f, 0x8f9a, 0x003f, 0x003f, - 0x003f, 0x9c99, 0x9c8b, 0x003f, 0x003f, 0xfabc, 0x003f, 0x9c8f, - 0x9c7e, 0x003f, 0x89f8, 0x9c93, 0x9c95, 0x9270, 0x003f, 0x003f, - 0x8da6, 0x89b6, 0x9c8d, 0x9c98, 0x9c97, 0x8bb1, 0x003f, 0x91a7, - 0x8a86, 0x003f, 0x003f, 0x003f, 0x003f, 0x8c62, 0x003f, 0x9c8e, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9c9a, 0x003f, 0x9c9d, 0x9c9f, 0xfabd, 0x003f, 0x003f, - 0x003f, 0x8ebb, 0xfabe, 0x9ca5, 0x92ee, 0x9c9b, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9ca3, 0x003f, 0x89f7, 0x003f, 0x9ca1, 0x9ca2, - 0x003f, 0x003f, 0x9c9e, 0x9ca0, 0x003f, 0x003f, 0x003f, 0x8ce5, - 0x9749, 0x003f, 0x003f, 0x8ab3, 0x003f, 0x003f, 0x8978, 0x9ca4, - 0x003f, 0x9459, 0x88ab, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x94df, 0x9c7b, 0x9caa, 0x9cae, 0x96e3, 0x003f, - 0x9ca7, 0x003f, 0x003f, 0x003f, 0x9389, 0x9cac, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8fee, 0x9cad, 0x93d5, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9866, 0x003f, 0x9ca9, 0x003f, 0xfac0, 0x003f, 0x003f, - 0x9caf, 0x003f, 0x8d9b, 0x003f, 0x90c9, 0x003f, 0xfabf, 0x88d2, - 0x9ca8, 0x9ca6, 0x003f, 0x9179, 0x003f, 0x003f, 0x003f, 0x9c9c, - 0x8e53, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x91c4, 0x9cbb, 0xfac2, 0x917a, 0x9cb6, 0x003f, 0x9cb3, 0x9cb4, - 0x003f, 0x8ee4, 0x9cb7, 0x9cba, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6100 .. 0x61ff */ - 0x9cb5, 0x8f44, 0x003f, 0x9cb8, 0x003f, 0x003f, 0x9cb2, 0x003f, - 0x96fa, 0x96f9, 0x003f, 0x003f, 0x003f, 0x9cbc, 0x9cbd, 0x88d3, - 0x003f, 0xfac3, 0x003f, 0x003f, 0x003f, 0x9cb1, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8bf0, 0x88a4, 0x003f, 0x003f, 0x003f, 0x8ab4, - 0xfac1, 0x9cb9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9cc1, - 0x9cc0, 0x003f, 0x003f, 0x003f, 0x9cc5, 0x003f, 0x003f, 0x003f, - 0xfac5, 0x003f, 0x003f, 0x003f, 0x9cc6, 0x003f, 0x003f, 0xfac4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9cc4, 0x9cc7, 0x9cbf, 0x9cc3, - 0x003f, 0x003f, 0x9cc8, 0x003f, 0x9cc9, 0x003f, 0x003f, 0x9cbe, - 0x8e9c, 0x003f, 0x9cc2, 0x91d4, 0x8d51, 0x9cb0, 0x9054, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9cd6, 0x003f, 0x95e7, 0x003f, 0x003f, - 0x9ccc, 0x9ccd, 0x9cce, 0x003f, 0x003f, 0x9cd5, 0x003f, 0x9cd4, - 0x003f, 0x003f, 0x969d, 0x8ab5, 0x003f, 0x9cd2, 0x003f, 0x8c64, - 0x8a53, 0x003f, 0x003f, 0x9ccf, 0x003f, 0x003f, 0x97b6, 0x9cd1, - 0x88d4, 0x9cd3, 0x003f, 0x9cca, 0x9cd0, 0x9cd7, 0x8c63, 0x9ccb, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x977c, 0x003f, - 0x003f, 0x003f, 0x974a, 0x003f, 0x003f, 0x003f, 0x003f, 0x9cda, - 0x003f, 0x003f, 0x9cde, 0x003f, 0x003f, 0x003f, 0x919e, 0x003f, - 0x97f7, 0x9cdf, 0x003f, 0x003f, 0x9cdc, 0x003f, 0x9cd9, 0x003f, - 0xfac6, 0x9cd8, 0x9cdd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x95ae, 0x003f, 0x003f, 0x93b2, - 0x003f, 0x8c65, 0x003f, 0x9ce0, 0x9cdb, 0x003f, 0x9ce1, 0x003f, - 0x003f, 0x003f, 0x8c9b, 0x003f, 0x003f, 0x003f, 0x89af, 0x003f, - 0x003f, 0x003f, 0x9ce9, 0x003f, 0x003f, 0x003f, 0x8ab6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9ce7, 0x003f, 0x003f, 0x9ce8, 0x8da7, - 0x9ce6, 0x9ce4, 0x9ce3, 0x9cea, 0x9ce2, 0x9cec, 0x003f, 0x003f, - 0x89f9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9cee, 0x003f, 0x003f, 0x9ced, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x92a6, 0x003f, 0x9cf1, 0x003f, 0x9cef, 0x9ce5, - 0x8c9c, 0x003f, 0x9cf0, 0x003f, 0x9cf4, 0x9cf3, 0x9cf5, 0x9cf2, - /* 0x6200 .. 0x62ff */ - 0x9cf6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9cf7, 0x9cf8, 0x95e8, 0x003f, 0x9cfa, 0x9cf9, 0x8f5e, 0x003f, - 0x90ac, 0x89e4, 0x89fa, 0xfac7, 0x9cfb, 0x003f, 0x88bd, 0x003f, - 0x003f, 0x003f, 0x90ca, 0x9cfc, 0x003f, 0xe6c1, 0x9d40, 0x8c81, - 0x003f, 0x9d41, 0x003f, 0x003f, 0x003f, 0x003f, 0x90ed, 0x003f, - 0x003f, 0x003f, 0x9d42, 0x003f, 0x003f, 0x003f, 0x9d43, 0x8b59, - 0x9d44, 0x003f, 0x9d45, 0x9d46, 0x91d5, 0x003f, 0x003f, 0x003f, - 0x8ccb, 0x003f, 0x003f, 0x96df, 0x003f, 0x003f, 0x003f, 0x965b, - 0x8f8a, 0x9d47, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x90ee, - 0xe7bb, 0x94e0, 0x003f, 0x8ee8, 0x003f, 0x8dcb, 0x9d48, 0x003f, - 0x003f, 0x003f, 0x003f, 0x91c5, 0x003f, 0x95a5, 0x003f, 0x003f, - 0x91ef, 0x003f, 0x003f, 0x9d4b, 0x003f, 0x003f, 0x9d49, 0x003f, - 0x9d4c, 0x003f, 0x003f, 0x9d4a, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9d4d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x95af, 0x003f, - 0x003f, 0x88b5, 0x003f, 0x003f, 0x003f, 0x003f, 0x957d, 0x003f, - 0x003f, 0x94e1, 0x003f, 0x003f, 0x9d4e, 0x003f, 0x9d51, 0x8fb3, - 0x8b5a, 0x003f, 0x9d4f, 0x9d56, 0x8fb4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9d50, 0x9463, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x977d, 0x9d52, 0x9d53, 0x9d57, 0x938a, 0x9d54, 0x8d52, - 0x90dc, 0x003f, 0x003f, 0x9d65, 0x94b2, 0x003f, 0x91f0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfac8, 0x003f, - 0x003f, 0x003f, 0x003f, 0x94e2, 0x9dab, 0x003f, 0x003f, 0x003f, - 0x003f, 0x95f8, 0x003f, 0x003f, 0x003f, 0x92ef, 0x003f, 0x003f, - 0x003f, 0x9695, 0x003f, 0x9d5a, 0x899f, 0x928a, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9d63, 0x003f, 0x003f, 0x9253, 0x9d5d, 0x9d64, - 0x9d5f, 0x9d66, 0x9d62, 0x003f, 0x9d61, 0x948f, 0x003f, 0x9d5b, - 0x89fb, 0x9d59, 0x8b91, 0x91f1, 0x9d55, 0x003f, 0x003f, 0x9d58, - 0x8d53, 0x90d9, 0x003f, 0x8fb5, 0x9d60, 0x9471, 0x003f, 0x003f, - 0x8b92, 0x8a67, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8a87, 0x9040, 0x9d68, 0x9d6d, - 0x003f, 0x9d69, 0x003f, 0x8c9d, 0x003f, 0x9d6e, 0x8e41, 0x8d89, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8f45, 0x9d5c, - /* 0x6300 .. 0x63ff */ - 0x003f, 0x8e9d, 0x9d6b, 0x003f, 0x003f, 0x003f, 0x003f, 0x8e77, - 0x9d6c, 0x88c2, 0x003f, 0x003f, 0x9d67, 0x003f, 0x003f, 0x003f, - 0x003f, 0x92a7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8b93, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8bb2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9d6a, - 0x88a5, 0x003f, 0x003f, 0x8dc1, 0x003f, 0x003f, 0x003f, 0x9055, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x92f0, 0x003f, 0x003f, 0x94d2, 0x9d70, 0x917d, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x91a8, 0x003f, 0x003f, 0x8e4a, 0x9d71, 0x003f, 0x9d73, - 0x9d6f, 0x003f, 0x003f, 0x003f, 0x003f, 0x95df, 0x003f, 0x92bb, - 0x003f, 0x003f, 0x003f, 0x003f, 0x917b, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x95f9, - 0x8ecc, 0x9d80, 0x003f, 0x9d7e, 0x003f, 0x003f, 0x9098, 0x003f, - 0x003f, 0x003f, 0x8c9e, 0x003f, 0x003f, 0x003f, 0x9d78, 0x8fb7, - 0x003f, 0x003f, 0x93e6, 0x9450, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9d76, 0x003f, 0x003f, 0x917c, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8ef6, 0x9d7b, 0x003f, 0x003f, 0x8fb6, 0x003f, 0x9d75, 0x9d7a, - 0x003f, 0x003f, 0x9472, 0x003f, 0x003f, 0x003f, 0x9d74, 0x003f, - 0x8c40, 0x003f, 0x003f, 0x8a7c, 0x003f, 0x003f, 0x003f, 0x9d7c, - 0x97a9, 0x8dcc, 0x9254, 0x9d79, 0x003f, 0x90da, 0x003f, 0x8d54, - 0x9084, 0x8986, 0x915b, 0x9d77, 0x8b64, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8c66, 0x003f, 0x92cd, 0x9d7d, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x917e, 0x003f, 0x003f, 0x9d81, 0x003f, - 0x9d83, 0x003f, 0x003f, 0x91b5, 0x9d89, 0x003f, 0x9d84, 0x003f, - 0x003f, 0x9d86, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9560, - 0x92f1, 0x003f, 0x9d87, 0x003f, 0x003f, 0x003f, 0x974b, 0x003f, - 0x003f, 0x003f, 0x9767, 0x8ab7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x88ac, 0x003f, 0x9d85, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9d82, 0x003f, 0x003f, 0x003f, 0x003f, 0x8af6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8987, 0xfac9, 0x9d88, 0x003f, - 0x003f, 0x003f, 0x9768, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6400 .. 0x64ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9d8c, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x91b9, 0x003f, 0x9d93, - 0x003f, 0x003f, 0x003f, 0x9d8d, 0x003f, 0x003f, 0x9d8a, 0x9d91, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9d72, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9d8e, 0x003f, - 0x9d92, 0x003f, 0x003f, 0x003f, 0x94c0, 0x938b, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9d8b, 0x003f, 0x9d8f, 0x003f, - 0x003f, 0x003f, 0x8c67, 0x003f, 0x003f, 0x003f, 0x8def, 0x003f, - 0x003f, 0x003f, 0x90db, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9d97, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9345, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xfaca, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9d94, - 0x003f, 0x9680, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9d95, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9d96, 0x003f, - 0x96cc, 0x003f, 0x90a0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8c82, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9d9d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8e54, 0x9d9a, 0x003f, 0x9d99, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9451, 0x003f, 0x003f, 0xfacb, 0x93b3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9350, 0x9d9b, 0x003f, 0x003f, - 0x003f, 0x9d9c, 0x003f, 0x958f, 0x003f, 0x9464, 0x8e42, 0x003f, - 0x90ef, 0x003f, 0x966f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8a68, 0x003f, 0x9da3, 0x9d9e, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9769, 0x9da5, 0x003f, 0x003f, 0x9da1, 0x003f, 0x9da2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9180, 0xfacc, 0x003f, - 0x003f, 0x003f, 0x9da0, 0x003f, 0x9d5e, 0x003f, 0x003f, 0x003f, - 0x9da4, 0x003f, 0x9d9f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9da9, 0x9daa, 0x9346, 0x9dac, 0x003f, 0x003f, 0x8e43, 0x9da7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8b5b, 0x003f, 0x003f, 0x9dad, - 0x003f, 0x9da6, 0x9db1, 0x003f, 0x9db0, 0x003f, 0x9daf, 0x003f, - 0x003f, 0x003f, 0x9db2, 0x003f, 0x003f, 0x9db4, 0x8fef, 0x003f, - /* 0x6500 .. 0x65ff */ - 0x9db3, 0x003f, 0x003f, 0x003f, 0x003f, 0x9db7, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9db5, 0x003f, 0x003f, 0x003f, 0x9db6, 0x9d90, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9db9, 0x9db8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9d98, 0x9dba, 0x9dae, 0x003f, 0x003f, 0x8e78, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9dbb, 0x9dbc, 0x9dbe, 0x9dbd, - 0x9dbf, 0x89fc, 0x003f, 0x8d55, 0x003f, 0x003f, 0x95fa, 0x90ad, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8ccc, 0x003f, 0x003f, - 0x9dc1, 0x003f, 0x003f, 0x003f, 0x003f, 0x9dc4, 0xfacd, 0x9571, - 0x003f, 0x8b7e, 0x003f, 0x003f, 0x003f, 0x9dc3, 0x9dc2, 0x9473, - 0x9dc5, 0x8bb3, 0x003f, 0x003f, 0x003f, 0x9dc7, 0x9dc6, 0x003f, - 0x003f, 0x003f, 0x8ab8, 0x8e55, 0x003f, 0x003f, 0x93d6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8c68, 0x003f, 0x003f, 0x003f, - 0x9094, 0x003f, 0x9dc8, 0x003f, 0x90ae, 0x9347, 0x003f, 0x957e, - 0x9dc9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9dca, 0x9dcb, 0x003f, 0x003f, 0x003f, 0x95b6, - 0x9b7c, 0x90c4, 0x003f, 0x003f, 0x956b, 0x003f, 0x8dd6, 0x003f, - 0x94e3, 0x94c1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x936c, - 0x003f, 0x97bf, 0x003f, 0x9dcd, 0x8ece, 0x003f, 0x003f, 0x9dce, - 0x003f, 0x88b4, 0x003f, 0x003f, 0x8bd2, 0x90cb, 0x003f, 0x9580, - 0x003f, 0x003f, 0x003f, 0x9dcf, 0x8e61, 0x9266, 0x003f, 0x8e7a, - 0x9056, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9dd0, - 0x003f, 0x95fb, 0x003f, 0x003f, 0x8997, 0x8e7b, 0x003f, 0x003f, - 0x003f, 0x9dd3, 0x003f, 0x9dd1, 0x9dd4, 0x97b7, 0x9dd2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x90f9, 0x9dd5, 0x003f, 0x003f, 0x91b0, - 0x003f, 0x003f, 0x9dd6, 0x003f, 0x003f, 0x003f, 0x003f, 0x8af8, - 0x003f, 0x9dd8, 0x003f, 0x9dd7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9dd9, 0x9dda, 0x8af9, 0x003f, 0x003f, 0x93fa, 0x9255, 0x8b8c, - 0x8e7c, 0x9181, 0x003f, 0x003f, 0x8f7b, 0x88ae, 0x003f, 0x003f, - 0x003f, 0x9ddb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x89a0, 0x9ddf, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6600 .. 0x66ff */ - 0xface, 0x003f, 0x8d56, 0x9dde, 0x003f, 0x003f, 0x8da9, 0x8fb8, - 0x003f, 0xfad1, 0x9ddd, 0x003f, 0x8fb9, 0x003f, 0x96be, 0x8da8, - 0x003f, 0x003f, 0x003f, 0x88d5, 0x90cc, 0xfacf, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9de4, 0x003f, 0xfad3, 0x90af, - 0x8966, 0x003f, 0x003f, 0x003f, 0xfad4, 0x8f74, 0x003f, 0x9686, - 0x8df0, 0x003f, 0x003f, 0x003f, 0x003f, 0x8fba, 0xfad2, 0x90a5, - 0x003f, 0xfa63, 0x003f, 0x003f, 0x9de3, 0x9de1, 0x9de2, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfad0, 0x928b, 0x003f, 0x003f, 0x9e45, - 0x003f, 0x9de8, 0x8e9e, 0x8d57, 0x9de6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9de7, 0x003f, 0x9057, 0x003f, 0x003f, 0x003f, 0x9de5, - 0x003f, 0x003f, 0x8e4e, 0x003f, 0x003f, 0x003f, 0x003f, 0xfad6, - 0x003f, 0xfad7, 0x003f, 0x003f, 0x003f, 0x9dea, 0x9de9, 0x9dee, - 0x003f, 0x003f, 0x9def, 0x003f, 0x9deb, 0xfad5, 0x8a41, 0x9dec, - 0x9ded, 0x94d3, 0x003f, 0x003f, 0x003f, 0x003f, 0x9581, 0x8c69, - 0x9df0, 0x003f, 0x003f, 0xfad9, 0x90b0, 0x003f, 0x8fbb, 0x003f, - 0x003f, 0x003f, 0x9271, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8bc5, 0x003f, 0x9df1, 0x9df5, 0x003f, 0x003f, 0x89c9, - 0x9df2, 0x9df4, 0x003f, 0x003f, 0x003f, 0x003f, 0x9df3, 0x003f, - 0x003f, 0x8f8b, 0x003f, 0x003f, 0x003f, 0x003f, 0x9267, 0x88c3, - 0x9df6, 0xfada, 0x003f, 0x003f, 0x003f, 0x9df7, 0x003f, 0x003f, - 0xfadb, 0x003f, 0x92a8, 0x003f, 0x003f, 0x003f, 0x97ef, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8e62, 0x003f, 0x003f, 0x95e9, 0x003f, - 0x003f, 0x003f, 0xfadc, 0x003f, 0x965c, 0x003f, 0x003f, 0x003f, - 0x9e41, 0x9df9, 0x003f, 0x003f, 0x9dfc, 0x003f, 0x9dfb, 0xfadd, - 0x003f, 0x9df8, 0x003f, 0x003f, 0x9e40, 0x003f, 0x003f, 0x93dc, - 0x003f, 0x9dfa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9e42, 0x003f, - 0x003f, 0x8f8c, 0x9e43, 0x003f, 0x976a, 0x9498, 0x003f, 0x003f, - 0x9e44, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9e46, 0x003f, - 0x003f, 0x9e47, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9e48, 0x003f, 0x8bc8, 0x8967, 0x8d58, 0x9e49, 0x003f, 0x9e4a, - 0x8f91, 0x9182, 0xfade, 0xfa66, 0x99d6, 0x915d, 0x915c, 0x91d6, - /* 0x6700 .. 0x67ff */ - 0x8dc5, 0x003f, 0x003f, 0x98f0, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8c8e, 0x974c, 0x003f, 0x95fc, 0x003f, 0x959e, 0xfadf, 0x9e4b, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8df1, 0x92bd, 0x9e4c, 0x984e, - 0x003f, 0x003f, 0x003f, 0x965d, 0x003f, 0x92a9, 0x9e4d, 0x8afa, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9e4e, 0x9e4f, - 0x96d8, 0x003f, 0x96a2, 0x9696, 0x967b, 0x8e44, 0x9e51, 0x003f, - 0x003f, 0x8ee9, 0x003f, 0x003f, 0x9670, 0x003f, 0x9e53, 0x9e56, - 0x9e55, 0x003f, 0x8af7, 0x003f, 0x003f, 0x8b80, 0x003f, 0x9e52, - 0x003f, 0x9e54, 0x003f, 0x003f, 0x003f, 0x003f, 0x9e57, 0x003f, - 0x003f, 0x9099, 0x003f, 0x003f, 0x003f, 0x003f, 0x979b, 0x88c7, - 0x8dde, 0x91ba, 0x003f, 0x8edb, 0x003f, 0x003f, 0x8ff1, 0x003f, - 0x003f, 0x9e5a, 0x003f, 0x003f, 0x936d, 0x003f, 0x9e58, 0x91a9, - 0x9e59, 0x8ff0, 0x96db, 0x9e5b, 0x9e5c, 0x9788, 0xfae1, 0x003f, - 0x003f, 0x003f, 0x9e61, 0x003f, 0x003f, 0x8d59, 0x003f, 0x9474, - 0x9e5e, 0x938c, 0x9ddc, 0x9de0, 0x003f, 0x8b6e, 0x003f, 0x9466, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9e60, 0x003f, 0x8fbc, 0x94c2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9e66, 0x003f, 0x94f8, - 0x003f, 0x9e5d, 0x003f, 0x9e63, 0x9e62, 0x003f, 0x003f, 0x003f, - 0x90cd, 0x003f, 0x003f, 0x003f, 0x003f, 0x968d, 0x003f, 0x97d1, - 0x003f, 0x003f, 0x9687, 0x003f, 0x89ca, 0x8e7d, 0x003f, 0x003f, - 0x9867, 0x9e65, 0x9095, 0x003f, 0x003f, 0x003f, 0x9e64, 0x003f, - 0x003f, 0x9e5f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8ccd, - 0x003f, 0x003f, 0x003f, 0x9e6b, 0x9e69, 0x003f, 0x89cb, 0x9e67, - 0x9e6d, 0x9e73, 0x003f, 0xfae2, 0x003f, 0x003f, 0x003f, 0x003f, - 0xfae4, 0x91c6, 0x003f, 0x003f, 0x95bf, 0x003f, 0x9e75, 0x003f, - 0x003f, 0x003f, 0x9541, 0x003f, 0x003f, 0x003f, 0x9e74, 0x9490, - 0x965e, 0x8ab9, 0x003f, 0x90f5, 0x8f5f, 0x003f, 0x003f, 0x003f, - 0x92d1, 0x003f, 0x974d, 0x003f, 0x003f, 0x9e70, 0x9e6f, 0x003f, - 0x003f, 0x003f, 0x9e71, 0x003f, 0x9e6e, 0x003f, 0x003f, 0x9e76, - 0x003f, 0x9e6c, 0x003f, 0x003f, 0x9e6a, 0x003f, 0x9e72, 0x9e68, - 0x003f, 0x928c, 0x003f, 0x96f6, 0x8ec4, 0x8df2, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8db8, 0x003f, 0x003f, 0x968f, 0x8a60, - /* 0x6800 .. 0x68ff */ - 0x003f, 0xfae5, 0x92cc, 0x93c8, 0x8968, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x90f0, 0x003f, 0x003f, 0x90b2, 0x8c49, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9e78, 0x003f, - 0x003f, 0x8d5a, 0x8a9c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9e7a, 0x8a94, 0x9e81, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9e7d, 0x003f, 0x90f1, 0x003f, 0x003f, 0x003f, - 0x8a6a, 0x8daa, 0x003f, 0x003f, 0x8a69, 0x8dcd, 0x003f, 0x003f, - 0x9e7b, 0x8c85, 0x8c6a, 0x938d, 0xfae6, 0x003f, 0x9e79, 0x003f, - 0x88c4, 0x003f, 0x003f, 0x003f, 0x003f, 0x9e7c, 0x9e7e, 0x003f, - 0x8bcb, 0x8c4b, 0xfae3, 0x8aba, 0x8b6a, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9e82, 0x003f, 0x003f, 0x8df7, 0x9691, 0x003f, 0x8e56, - 0x003f, 0x003f, 0x003f, 0x9e83, 0x003f, 0x003f, 0x003f, 0x954f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9e8f, 0x003f, 0x89b1, 0x9e84, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9e95, 0x9e85, - 0x003f, 0x97c0, 0x003f, 0x9e8c, 0x003f, 0x947e, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9e94, 0x003f, 0x9e87, - 0x003f, 0x003f, 0x003f, 0x88b2, 0x9e89, 0x003f, 0x003f, 0x8d5b, - 0x003f, 0x003f, 0x003f, 0x9e8b, 0x003f, 0x9e8a, 0x003f, 0x9e86, - 0x9e91, 0x003f, 0x8fbd, 0x003f, 0x003f, 0x003f, 0x9aeb, 0x8ce6, - 0x979c, 0x003f, 0x003f, 0x003f, 0x003f, 0x9e88, 0x003f, 0x92f2, - 0x8a42, 0x8dab, 0x003f, 0x9e80, 0x003f, 0x9e90, 0x8a81, 0x003f, - 0x003f, 0x9e8e, 0x9e92, 0x003f, 0x938e, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8afc, 0x003f, 0x9eb0, 0x003f, - 0xfa64, 0x96c7, 0x9e97, 0x8afb, 0x003f, 0x9e9e, 0x003f, 0xfae7, - 0x003f, 0x003f, 0x965f, 0x003f, 0x9e9f, 0x9ea1, 0x003f, 0x9ea5, - 0x9e99, 0x003f, 0x9249, 0x003f, 0x003f, 0x003f, 0x003f, 0x938f, - 0x9ea9, 0x9e9c, 0x003f, 0x9ea6, 0x003f, 0x003f, 0x003f, 0x9ea0, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9058, 0x9eaa, - 0x003f, 0x003f, 0x90b1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9ea8, 0x8abb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6900 .. 0x69ff */ - 0x986f, 0x9e96, 0x003f, 0x003f, 0x9ea4, 0x88d6, 0x003f, 0x003f, - 0x9e98, 0x003f, 0x003f, 0x96b8, 0x9e9d, 0x9041, 0x92c5, 0x9e93, - 0x003f, 0x003f, 0x9ea3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x909a, 0x9ead, 0x8a91, 0x8c9f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9eaf, 0x9e9a, 0x9eae, 0x003f, 0x9ea7, 0x9e9b, 0x003f, - 0x9eab, 0x003f, 0x9eac, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9ebd, 0x003f, 0x003f, 0x003f, 0x93cc, 0x003f, 0x9ea2, 0x003f, - 0x003f, 0x9eb9, 0x003f, 0x003f, 0x003f, 0x9ebb, 0x003f, 0x92d6, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x976b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9596, 0x9eb6, 0x91c8, 0x003f, 0x003f, - 0x003f, 0x9ebc, 0x915e, 0x003f, 0x9eb3, 0x9ec0, 0x9ebf, 0x003f, - 0x93ed, 0x9ebe, 0x93e8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xfae9, 0x003f, 0x9ec2, 0x9eb5, 0x003f, 0x8bc6, 0x9eb8, 0x8f7c, - 0x003f, 0x003f, 0x003f, 0x9480, 0x9eba, 0x8bc9, 0x003f, 0x9eb2, - 0x9eb4, 0x9eb1, 0x003f, 0x003f, 0x984f, 0x8a79, 0x9eb7, 0x003f, - 0x003f, 0x9ec1, 0x8a54, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8de5, 0x003f, 0x003f, 0x003f, 0x897c, 0x003f, - 0x003f, 0x9ed2, 0x003f, 0x003f, 0x9850, 0x9ed5, 0x003f, 0x003f, - 0xfaeb, 0x003f, 0x003f, 0x9059, 0x9ed4, 0x003f, 0x003f, 0x003f, - 0x9ed3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9ed0, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9ec4, 0x003f, - 0x003f, 0x9ee1, 0x9ec3, 0x003f, 0x9ed6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9ece, 0x003f, 0x003f, 0x9ec9, 0x9ec6, - 0x003f, 0x9ec7, 0x003f, 0x9ecf, 0x003f, 0x003f, 0x003f, 0xeaa0, - 0x003f, 0x003f, 0x9ecc, 0x8d5c, 0x92c6, 0x9184, 0x9eca, 0x003f, - 0x9ec5, 0x003f, 0x003f, 0x9ec8, 0x003f, 0x003f, 0x003f, 0x003f, - 0x976c, 0x968a, 0x003f, 0x003f, 0x003f, 0x9ecd, 0x9ed7, 0x003f, - 0x003f, 0x003f, 0xfaec, 0x003f, 0x003f, 0x003f, 0x003f, 0x9edf, - 0x9ed8, 0x003f, 0x003f, 0x9ee5, 0x003f, 0x9ee3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9ede, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9edd, 0x003f, 0x92ce, 0x003f, 0x9185, 0x003f, 0x9edb, - /* 0x6a00 .. 0x6aff */ - 0x003f, 0x003f, 0x9ed9, 0x003f, 0x003f, 0x9ee0, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9ee6, 0x94f3, 0x9eec, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9ee7, 0x9eea, 0x9ee4, 0x003f, 0x003f, 0x9294, - 0x003f, 0x9557, 0x003f, 0x9eda, 0x003f, 0x003f, 0x9ee2, 0x8fbe, - 0x003f, 0x96cd, 0x9ef6, 0x9ee9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8ca0, 0x89a1, 0x8a7e, 0x003f, 0x003f, 0x9ed1, 0x003f, - 0xfaed, 0x003f, 0x003f, 0x003f, 0x003f, 0x8fbf, 0x9eee, 0x003f, - 0x9ef5, 0x8ef7, 0x8a92, 0x003f, 0x003f, 0x924d, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9eeb, 0x003f, 0xfaef, 0x9ef0, - 0x9ef4, 0x003f, 0x003f, 0x8bb4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8b6b, 0x9ef2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8b40, - 0x003f, 0x93c9, 0x9ef1, 0x003f, 0x003f, 0x003f, 0x9ef3, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfaee, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9eed, 0xfaf0, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9eef, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfaf1, 0x8a80, - 0x9268, 0x003f, 0x003f, 0x003f, 0x9efa, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9ef8, 0x8ce7, 0x003f, - 0x9ef7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9f40, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9e77, 0x003f, 0x003f, 0x003f, - 0x9ef9, 0x003f, 0x9efb, 0x9efc, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9f4b, 0x003f, 0x9f47, 0x003f, 0x9e8d, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9f46, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9f45, 0x003f, 0x003f, 0x9f42, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9ee8, 0x9f44, 0x9f43, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9f49, 0x003f, 0x9845, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9f4c, 0x8bf9, 0x003f, 0x003f, 0x9f48, 0x9f4a, - 0x003f, 0x003f, 0xfaf2, 0x003f, 0xfaf3, 0x003f, 0x003f, 0x003f, - 0x94a5, 0x003f, 0x9f4d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9f51, 0x9f4e, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6b00 .. 0x6bff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x9793, 0x9f4f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9edc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9f52, 0x003f, 0x003f, 0x003f, 0x9f53, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8954, 0x003f, 0x9f55, - 0x8c87, 0x8e9f, 0x003f, 0x8bd3, 0x003f, 0x003f, 0x003f, 0x89a2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x977e, 0x003f, 0x003f, 0x003f, 0x003f, 0x9f57, - 0x9f56, 0x9f59, 0x8b5c, 0x003f, 0x003f, 0x8bd4, 0x8abc, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9f5c, 0x003f, 0x003f, 0x003f, 0x9f5b, - 0x003f, 0x9f5d, 0x003f, 0x003f, 0x89cc, 0x003f, 0x9256, 0x003f, - 0x9f5e, 0x003f, 0x003f, 0x8abd, 0x9f60, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9f5f, 0x003f, 0x9f61, 0x003f, 0x003f, 0x003f, 0x9f62, - 0x003f, 0x9f63, 0x8e7e, 0x90b3, 0x8d9f, 0x003f, 0x9590, 0x003f, - 0x003f, 0x95e0, 0x9863, 0x003f, 0x003f, 0x003f, 0x003f, 0x8e95, - 0x003f, 0x003f, 0x003f, 0x8dce, 0x97f0, 0x003f, 0x003f, 0x003f, - 0x9f64, 0x9f65, 0x003f, 0x8e80, 0x003f, 0x003f, 0x003f, 0x9f66, - 0x9f67, 0x003f, 0x003f, 0x9f69, 0x9f68, 0x003f, 0x9677, 0x003f, - 0x003f, 0x8f7d, 0x8eea, 0x8e63, 0x003f, 0x9f6a, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9f6c, 0x9042, 0x003f, - 0x9f6b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9f6d, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9f6e, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9f6f, 0x9f70, 0x003f, 0x003f, 0x003f, 0x9f71, - 0x003f, 0x9f73, 0x9f72, 0x9f74, 0x89a3, 0x9269, 0x003f, 0x9f75, - 0x003f, 0x003f, 0x8e45, 0x8a6b, 0x9f76, 0x003f, 0x003f, 0x9361, - 0x9aca, 0x003f, 0x003f, 0x003f, 0x003f, 0x8b42, 0x9f77, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9f78, 0x003f, 0x95ea, 0x9688, 0x003f, - 0x003f, 0x003f, 0x93c5, 0x9f79, 0x94e4, 0x003f, 0xfaf4, 0x003f, - 0x94f9, 0x003f, 0x003f, 0x96d1, 0x003f, 0x003f, 0x003f, 0x9f7a, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9f7c, 0x9f7b, 0x003f, 0x003f, 0x9f7e, - 0x003f, 0x003f, 0x003f, 0x9f7d, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6c00 .. 0x6cff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9f81, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8e81, - 0x003f, 0x96af, 0x003f, 0x9f82, 0x9f83, 0x003f, 0x003f, 0x8b43, - 0x003f, 0x003f, 0x003f, 0x9f84, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9f86, 0x9f85, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9085, 0x003f, 0x003f, 0x9558, - 0x8969, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x94c3, 0xfaf5, - 0x92f3, 0x8f60, 0x8b81, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x94c4, 0x003f, - 0x8eac, 0x003f, 0x003f, 0x003f, 0x003f, 0x9f88, 0x003f, 0x8abe, - 0x003f, 0x003f, 0x8998, 0x003f, 0xfaf6, 0x93f0, 0x9f87, 0x8d5d, - 0x9272, 0x003f, 0x9f89, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9f91, 0x003f, 0x9f8a, 0x003f, 0x003f, 0x003f, 0x003f, 0xfaf8, - 0x91bf, 0x003f, 0x8b82, 0x9f92, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8c88, 0x003f, 0x003f, 0x8b44, 0x9f90, 0x003f, - 0x003f, 0x9f8e, 0x9f8b, 0x9780, 0x003f, 0x003f, 0xfaf7, 0x003f, - 0x92be, 0x003f, 0x003f, 0x003f, 0x93d7, 0x9f8c, 0x003f, 0x003f, - 0x9f94, 0x003f, 0x9f93, 0x8c42, 0x003f, 0x003f, 0x89ab, 0x003f, - 0x003f, 0x8db9, 0x9f8d, 0x9f8f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9676, 0x91f2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9697, 0x003f, 0x003f, 0x9f9c, 0x003f, - 0x003f, 0x9f9d, 0x003f, 0x89cd, 0x003f, 0x003f, 0x003f, 0x003f, - 0x95a6, 0x96fb, 0x9f9f, 0x8ea1, 0x8fc0, 0x9f98, 0x9f9e, 0x8988, - 0x003f, 0x8bb5, 0x003f, 0x003f, 0x9f95, 0x9f9a, 0x003f, 0x003f, - 0x003f, 0x90f2, 0x9491, 0x003f, 0x94e5, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9f97, 0x003f, 0x9640, 0x003f, 0x9f99, - 0x003f, 0x9fa2, 0xfaf9, 0x9fa0, 0x003f, 0x9f9b, 0x003f, 0x003f, - 0x003f, 0x9641, 0x9467, 0x8b83, 0x003f, 0x9344, 0x003f, 0x003f, - 0x928d, 0x003f, 0x9fa3, 0x003f, 0x003f, 0x003f, 0x003f, 0x9fa1, - 0x91d7, 0x9f96, 0x003f, 0x896a, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6d00 .. 0x6dff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0xfafa, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x976d, 0x9fae, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9fad, 0x003f, 0x003f, 0x003f, 0x003f, 0x90f4, - 0x003f, 0x9faa, 0x003f, 0x978c, 0x003f, 0x003f, 0x93b4, 0x9fa4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x92c3, 0x003f, 0x003f, - 0x003f, 0x896b, 0x8d5e, 0x9fa7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8f46, 0x9fac, 0x003f, 0x9fab, 0x9fa6, 0x003f, - 0x9fa9, 0x003f, 0x003f, 0x8a88, 0x003f, 0x9fa8, 0x9468, 0x003f, - 0x003f, 0x97ac, 0x003f, 0x003f, 0x8ff2, 0x90f3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9fb4, 0x9fb2, 0x003f, 0x956c, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9faf, 0x9fb1, 0x003f, 0x8959, 0x003f, - 0x003f, 0x8d5f, 0x9851, 0x003f, 0x8a5c, 0x003f, 0x9582, 0xfafc, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9781, 0x003f, 0x003f, 0x8a43, - 0x905a, 0x9fb3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9fb8, 0x003f, 0xfafb, - 0x8fc1, 0x003f, 0x003f, 0x003f, 0x974f, 0x003f, 0x9fb5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9fb0, 0x003f, 0x9fb6, 0xfb40, 0x003f, - 0x003f, 0x97dc, 0x003f, 0x9393, 0x93c0, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xfb41, 0x003f, 0x003f, 0x8a55, - 0x003f, 0x003f, 0x8974, 0x003f, 0x003f, 0x9fbc, 0x003f, 0x003f, - 0x9fbf, 0x003f, 0x003f, 0x003f, 0x97c1, 0x003f, 0x003f, 0x003f, - 0x9784, 0x003f, 0x003f, 0x003f, 0x003f, 0x9fc6, 0x9fc0, 0x9fbd, - 0x003f, 0x003f, 0x003f, 0x97d2, 0x9fc3, 0x003f, 0x003f, 0xfb42, - 0x003f, 0x8f69, 0x9fc5, 0x003f, 0x003f, 0x9fca, 0x003f, 0x003f, - 0x9391, 0x9fc8, 0x003f, 0x003f, 0x003f, 0x003f, 0x9fc2, 0x003f, - 0x003f, 0x9257, 0x003f, 0x003f, 0x9fc9, 0x003f, 0x9fbe, 0x003f, - 0x9fc4, 0x003f, 0x9fcb, 0x88fa, 0x9fc1, 0x003f, 0x9fcc, 0x003f, - 0x003f, 0x905b, 0xfb44, 0x8f7e, 0x003f, 0x95a3, 0x003f, 0x8dac, - 0xfb43, 0x9fb9, 0x9fc7, 0x9359, 0xfb45, 0x003f, 0x003f, 0x003f, - /* 0x6e00 .. 0x6eff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x90b4, 0x003f, 0x8a89, - 0x8dcf, 0x8fc2, 0x9fbb, 0x8f61, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8c6b, 0x003f, 0x9fba, 0x003f, 0x003f, - 0x003f, 0x9fd0, 0x8f8d, 0x8cb8, 0x003f, 0x9fdf, 0x003f, 0x9fd9, - 0x8b94, 0x936e, 0x003f, 0x9fd4, 0x9fdd, 0x88ad, 0x8951, 0xfb48, - 0x003f, 0x89b7, 0x003f, 0x9fd6, 0x91aa, 0x9fcd, 0x9fcf, 0x8d60, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9fe0, 0xfb46, 0x9fdb, 0x003f, 0xfb49, 0x003f, 0x9fd3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9fda, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x96a9, 0x003f, 0x003f, 0x9fd8, 0x9fdc, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8cce, 0x003f, - 0x8fc3, 0x003f, 0x003f, 0x9258, 0xfb47, 0x003f, 0x003f, 0x9fd2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x974e, - 0x003f, 0x003f, 0x003f, 0x9fd5, 0x003f, 0x003f, 0x9fce, 0x9392, - 0x003f, 0x003f, 0x9fd1, 0x003f, 0x003f, 0x003f, 0x9fd7, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9870, 0x8ebc, - 0x969e, 0x003f, 0x9fe1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x94ac, 0x003f, 0x003f, 0x9fed, - 0x8cb9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8f80, 0x003f, - 0x9fe3, 0x003f, 0x003f, 0x003f, 0x97ad, 0x8d61, 0x003f, 0x9ff0, - 0x003f, 0x003f, 0x88ec, 0x003f, 0x003f, 0x9fee, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9fe2, 0x003f, 0x003f, 0x003f, 0x003f, 0x9fe8, - 0x003f, 0x003f, 0x9fea, 0x003f, 0x003f, 0x003f, 0x976e, 0x9fe5, - 0x003f, 0x003f, 0x934d, 0x003f, 0x003f, 0x9fe7, 0x003f, 0xfb4a, - 0x003f, 0x003f, 0x9fef, 0x003f, 0x9fe9, 0x96c5, 0x003f, 0x003f, - 0x003f, 0x9fe4, 0x003f, 0x8ea0, 0x9ffc, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8a8a, 0x003f, 0x9fe6, 0x9feb, 0x9fec, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x91ea, 0x91d8, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9ff4, 0x003f, 0x003f, 0x9ffa, - 0x003f, 0x003f, 0x9ff8, 0x003f, 0x9348, 0x003f, 0x003f, 0xe042, - 0x9ff5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9ff6, 0x9fde, - /* 0x6f00 .. 0x6fff */ - 0x003f, 0x8b99, 0x9559, 0x003f, 0x003f, 0x003f, 0x8ebd, 0x003f, - 0x003f, 0x8d97, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9852, - 0x003f, 0x9ff2, 0x003f, 0xe041, 0x8989, 0x9186, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9499, 0x003f, 0x8abf, 0x97f8, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x969f, 0x92d0, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9ff9, 0x9ffb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9151, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe040, 0x9ff7, - 0x003f, 0x9ff1, 0x003f, 0x003f, 0x003f, 0x8ac1, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8c89, 0x003f, 0x003f, 0x003f, - 0xe04e, 0x003f, 0x003f, 0xe049, 0x90f6, 0x003f, 0x003f, 0x8a83, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8f81, 0x003f, 0xe052, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe04b, 0x92aa, 0xe048, - 0x92d7, 0x003f, 0x003f, 0x003f, 0xe06b, 0x003f, 0x003f, 0x003f, - 0xe045, 0x003f, 0xe044, 0x003f, 0xe04d, 0x003f, 0x003f, 0x003f, - 0xe047, 0xe046, 0xe04c, 0x003f, 0x909f, 0x003f, 0xe043, 0x003f, - 0xfb4b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe04f, 0x003f, - 0x003f, 0xe050, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8ac0, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe055, 0x003f, 0xe054, 0xe056, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe059, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9362, 0x003f, 0xe053, 0x003f, 0xfb4c, 0x003f, 0x003f, - 0x003f, 0xe057, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8c83, 0x91f7, 0xe051, 0x945a, 0x003f, 0x003f, 0xe058, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe05d, 0xe05b, 0x003f, 0x003f, - 0xe05e, 0x003f, 0x003f, 0xe061, 0x003f, 0x003f, 0x003f, 0xe05a, - 0x8d8a, 0x9447, 0x003f, 0x003f, 0x9fb7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9794, 0xe05c, 0x003f, 0xe060, 0x91f3, - 0x003f, 0xe05f, 0x003f, 0xe04a, 0x003f, 0xfb4d, 0xe889, 0x003f, - 0x003f, 0x003f, 0xe064, 0x003f, 0x003f, 0x003f, 0xe068, 0x003f, - /* 0x7000 .. 0x70ff */ - 0x003f, 0xe066, 0x003f, 0x003f, 0x003f, 0xfb4e, 0x003f, 0xfb4f, - 0x003f, 0xe062, 0x003f, 0xe063, 0x003f, 0x003f, 0x003f, 0xe067, - 0x003f, 0xe065, 0x003f, 0x003f, 0x003f, 0x956d, 0x003f, 0x003f, - 0xe06d, 0x003f, 0xe06a, 0xe069, 0x003f, 0xe06c, 0x93d2, 0xe06e, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9295, 0x91eb, - 0xfb50, 0x003f, 0x003f, 0x003f, 0x90a3, 0x003f, 0x003f, 0x003f, - 0xe06f, 0x003f, 0xe071, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe070, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9ff3, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe072, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x93e5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe073, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x89ce, 0x003f, 0x003f, 0x003f, 0x9394, - 0x8a44, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8b84, 0x003f, 0x003f, 0x003f, 0x8edc, 0x8dd0, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfb51, 0x003f, 0x003f, - 0x003f, 0x9846, 0x9086, 0x003f, 0x003f, 0x003f, 0x898a, 0x003f, - 0x003f, 0x003f, 0xe075, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe074, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfb52, 0xe078, 0x9259, 0xe07b, 0xe076, - 0x003f, 0x003f, 0x003f, 0xe07a, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe079, 0x935f, 0x88d7, 0xfa62, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x97f3, 0x003f, 0x003f, 0xe07d, 0x003f, 0x003f, 0x003f, 0x8947, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe080, 0x003f, 0x003f, 0x003f, 0xe07e, 0x003f, 0xe07c, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe077, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9642, 0x003f, 0x003f, 0x003f, 0xe082, 0x003f, 0x003f, - /* 0x7100 .. 0x71ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0xfb54, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe081, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfb53, - 0x003f, 0x003f, 0x003f, 0x003f, 0x898b, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe084, 0x95b0, 0x003f, 0xe083, 0x003f, 0x003f, 0x003f, - 0x003f, 0x96b3, 0x003f, 0x003f, 0x003f, 0x003f, 0x8fc5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9152, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8fc4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfb56, 0xfb57, - 0x003f, 0x97f9, 0x003f, 0x003f, 0xe08a, 0x003f, 0x90f7, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe086, 0xe08b, 0x003f, - 0x003f, 0x898c, 0x003f, 0x003f, 0xfb55, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe089, 0x003f, 0x9481, 0xe085, 0xe088, 0x8fc6, - 0x003f, 0x94cf, 0x003f, 0x003f, 0xe08c, 0x003f, 0x8ecf, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x90f8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe08f, 0x003f, 0x003f, 0x003f, - 0xe087, 0x003f, 0x8c46, 0x003f, 0x003f, 0x003f, 0x003f, 0xe08d, - 0x003f, 0x003f, 0x003f, 0x003f, 0x976f, 0xe090, 0x003f, 0x003f, - 0x003f, 0xeaa4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8f6e, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe091, 0x003f, 0x003f, 0x003f, 0xe092, 0x003f, 0x003f, 0x003f, - 0x003f, 0x944d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe094, 0x003f, 0x003f, 0x003f, 0x003f, 0xe095, 0x003f, - 0x003f, 0xfb59, 0x003f, 0x9452, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9395, 0xe097, 0x003f, 0x003f, 0x003f, 0x003f, 0xe099, 0x003f, - 0x97d3, 0x003f, 0xe096, 0x003f, 0xe098, 0x898d, 0x003f, 0xe093, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9a7a, - 0xe09a, 0x003f, 0x003f, 0x003f, 0x003f, 0x9187, 0x8e57, 0xe09c, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe09b, 0x9043, 0x99d7, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe09d, 0x003f, 0x003f, - 0x003f, 0xe09f, 0x003f, 0xe08e, 0xe09e, 0x003f, 0xfb5a, 0xe0a0, - /* 0x7200 .. 0x72ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x949a, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0a1, 0x003f, 0x003f, - 0xe0a2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe0a3, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe0a4, 0x003f, 0x92dc, 0x003f, 0xe0a6, 0xe0a5, 0x003f, 0x003f, - 0xe0a7, 0x003f, 0xe0a8, 0x003f, 0x003f, 0x8edd, 0x9583, 0x003f, - 0x003f, 0x003f, 0x96ea, 0xe0a9, 0xe0aa, 0x9175, 0x8ea2, 0xe0ab, - 0xe0ac, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0ad, 0x95d0, - 0x94c5, 0x003f, 0x003f, 0xe0ae, 0x9476, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x92ab, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe0af, 0x89e5, 0x003f, 0x8b8d, 0x003f, 0x96c4, 0x003f, 0x96b4, - 0x003f, 0x89b2, 0x9853, 0x003f, 0x003f, 0x003f, 0x003f, 0x9671, - 0x003f, 0x95a8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x90b5, 0x003f, 0xe0b0, 0x003f, 0x003f, 0x003f, - 0x003f, 0x93c1, 0x003f, 0x003f, 0x003f, 0x8ca1, 0xe0b1, 0x003f, - 0x8dd2, 0xe0b3, 0xe0b2, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0b4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe0b5, 0x003f, 0x003f, 0x003f, 0xe0b6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8b5d, 0x003f, 0xe0b7, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0b8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8ca2, 0x003f, 0x003f, 0x94c6, - 0x003f, 0xfb5b, 0xe0ba, 0x003f, 0x003f, 0x003f, 0x8ff3, 0x003f, - 0x003f, 0xe0b9, 0x003f, 0x003f, 0x003f, 0x003f, 0xfb5c, 0x003f, - 0x003f, 0x003f, 0x8bb6, 0xe0bb, 0xe0bd, 0x003f, 0xe0bc, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0be, 0x003f, - 0x8ccf, 0x003f, 0xe0bf, 0x003f, 0x003f, 0x003f, 0x003f, 0x8be7, - 0x003f, 0x915f, 0x003f, 0x8d9d, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe0c1, 0xe0c2, 0xe0c0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8eeb, 0x003f, 0x003f, 0x93c6, 0x8bb7, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0c4, - 0x924b, 0xe0c3, 0x003f, 0x003f, 0x9854, 0x9482, 0x003f, 0x003f, - /* 0x7300 .. 0x73ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe0c7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0c9, 0xe0c6, - 0x003f, 0x003f, 0x003f, 0x96d2, 0xe0c8, 0xe0ca, 0x003f, 0x97c2, - 0x003f, 0x003f, 0x003f, 0x003f, 0xfb5d, 0xe0ce, 0x003f, 0x003f, - 0x003f, 0xe0cd, 0x9296, 0x944c, 0x003f, 0x003f, 0x8ca3, 0xe0cc, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe0cb, 0x003f, 0x9750, 0x9751, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0cf, 0x898e, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8d96, 0x8e82, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0d0, 0xe0d1, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0d3, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8f62, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe0d5, 0x003f, 0xe0d4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe0d6, 0x003f, 0x8a6c, 0x003f, 0x003f, 0xe0d8, 0x003f, 0xfb5f, - 0xe0d7, 0x003f, 0xe0da, 0xe0d9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8cba, 0x003f, 0x003f, 0x97a6, - 0x003f, 0x8bca, 0x003f, 0x89a4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8be8, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8adf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x97e6, 0xe0dc, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe0de, 0x003f, 0xfb60, 0x003f, 0x003f, - 0xe0df, 0x003f, 0x89cf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe0db, 0xfb61, 0x8e58, 0x003f, 0x003f, 0x92bf, 0xe0dd, 0x003f, - 0x003f, 0x003f, 0xfb64, 0x003f, 0x003f, 0x003f, 0xfb62, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0e2, 0x003f, - 0x8eec, 0x003f, 0x003f, 0xfb63, 0x003f, 0xe0e0, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8c5d, 0x003f, 0x003f, 0x94c7, 0xe0e1, 0x003f, - 0x003f, 0xe0fc, 0x003f, 0x003f, 0x003f, 0xfb66, 0x003f, 0x003f, - 0xe0e7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8cbb, 0x003f, - /* 0x7400 .. 0x74ff */ - 0x003f, 0x003f, 0x003f, 0x8b85, 0x003f, 0xe0e4, 0x979d, 0xfb65, - 0x003f, 0x97ae, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x91f4, 0x003f, 0x003f, 0xe0e6, 0xfb67, 0x003f, - 0x003f, 0xfb69, 0xfb68, 0x003f, 0x003f, 0x003f, 0xfb6a, 0x003f, - 0x003f, 0x003f, 0xe0e8, 0x97d4, 0x8bd5, 0x94fa, 0x9469, 0x003f, - 0x003f, 0x003f, 0xe0e9, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0eb, - 0x003f, 0xe0ee, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0ea, 0x003f, 0x003f, - 0x003f, 0xe0ed, 0x8ce8, 0x896c, 0xe0ef, 0x003f, 0x9090, 0xe0ec, - 0x97da, 0x003f, 0xfb6b, 0xe0f2, 0xeaa2, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe0f0, 0xe0f3, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0e5, - 0xe0f1, 0x003f, 0x003f, 0x8dba, 0x003f, 0x003f, 0xe0f4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0f5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x979e, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xfb6c, 0x003f, 0xe0f6, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0f7, 0xfb6d, - 0x003f, 0x003f, 0xe0e3, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0f8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8ac2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8ea3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe0f9, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0fa, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe0fb, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x895a, 0x003f, 0x003f, 0x003f, - 0xe140, 0x003f, 0x955a, 0xe141, 0x003f, 0x003f, 0x8aa2, 0xe142, - 0x003f, 0xe143, 0x003f, 0x003f, 0x003f, 0x003f, 0xe144, 0x003f, - 0xe146, 0xe147, 0xe145, 0x003f, 0x003f, 0x003f, 0x9572, 0xe149, - 0xe148, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7500 .. 0x75ff */ - 0x003f, 0xfb6e, 0x003f, 0xe14b, 0xe14a, 0xe14c, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe14d, 0xe14f, 0xe14e, 0x003f, - 0x003f, 0x8d99, 0x003f, 0xe151, 0x003f, 0xe150, 0x003f, 0x003f, - 0x8ac3, 0x003f, 0x9072, 0x003f, 0x935b, 0x003f, 0xe152, 0x90b6, - 0x003f, 0x003f, 0x003f, 0x8e59, 0x003f, 0x8999, 0xe153, 0x003f, - 0x9770, 0x003f, 0x003f, 0x95e1, 0xe154, 0x003f, 0x003f, 0xfaa8, - 0x9363, 0x9752, 0x8d62, 0x905c, 0x003f, 0x003f, 0x003f, 0x926a, - 0x99b2, 0x003f, 0x92ac, 0x89e6, 0xe155, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe156, 0x003f, 0xe15b, 0x003f, - 0x003f, 0xe159, 0xe158, 0x9dc0, 0x8a45, 0xe157, 0x003f, 0x88d8, - 0x003f, 0x94a8, 0x003f, 0x003f, 0x94c8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x97af, 0xe15c, 0xe15a, 0x927b, 0x90a4, 0x003f, 0x003f, - 0x94a9, 0x003f, 0x954c, 0x003f, 0xe15e, 0x97aa, 0x8c6c, 0xe15f, - 0x003f, 0xe15d, 0x94d4, 0xe160, 0x003f, 0xe161, 0x003f, 0xfb6f, - 0x88d9, 0x003f, 0x003f, 0x8ff4, 0xe166, 0x003f, 0xe163, 0x93eb, - 0xe162, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8b45, - 0x003f, 0x003f, 0xe169, 0x003f, 0x003f, 0x003f, 0xe164, 0xe165, - 0x003f, 0xe168, 0xe167, 0x9544, 0x003f, 0x003f, 0x9161, 0x9160, - 0x003f, 0x8b5e, 0x003f, 0x003f, 0xe16a, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe16b, 0x003f, 0x003f, 0xe16c, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe16e, 0x003f, 0xe16d, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8975, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe176, 0x94e6, 0xe170, 0x003f, 0xe172, 0x003f, 0x003f, - 0xe174, 0x905d, 0x003f, 0x003f, 0xe175, 0xe173, 0x8ebe, 0x003f, - 0x003f, 0x003f, 0xe16f, 0xe171, 0x003f, 0x9561, 0x003f, 0x8fc7, - 0x003f, 0x003f, 0xe178, 0x003f, 0x003f, 0xe177, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe179, 0x003f, 0x8ea4, 0x8dad, 0x003f, 0x003f, - 0x9397, 0xe17a, 0x003f, 0x92c9, 0x003f, 0x003f, 0xe17c, 0x003f, - 0x003f, 0x003f, 0x979f, 0xe17b, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9189, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe182, 0x003f, 0xe184, 0xe185, 0x9273, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe183, 0x003f, 0xe180, 0x003f, 0xe17d, 0xe17e, - /* 0x7600 .. 0x76ff */ - 0x003f, 0xe181, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe188, 0x003f, 0xe186, 0x003f, 0xe187, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe189, - 0xe18b, 0xe18c, 0xe18d, 0x003f, 0xe18e, 0x003f, 0x003f, 0xe18a, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe190, 0x003f, 0x003f, 0x003f, 0xe18f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe191, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x97c3, 0x003f, 0x003f, 0x003f, 0xe194, 0xe192, - 0xe193, 0x003f, 0x003f, 0x003f, 0x8ae0, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x96fc, 0x003f, 0x003f, 0x003f, 0x95c8, 0x003f, - 0xe196, 0x003f, 0x003f, 0x003f, 0xe195, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe197, 0xe198, 0x003f, 0x003f, 0x003f, 0x003f, 0xe19c, - 0xe199, 0xe19a, 0xe19b, 0x003f, 0xe19d, 0x003f, 0x003f, 0x003f, - 0xe19e, 0x003f, 0xe19f, 0x003f, 0x003f, 0x003f, 0xe1a0, 0x003f, - 0xe1a1, 0x003f, 0x94ad, 0x936f, 0xe1a2, 0x9492, 0x9553, 0x003f, - 0xe1a3, 0x003f, 0xfb70, 0xe1a4, 0x9349, 0x003f, 0x8a46, 0x8d63, - 0xe1a5, 0x003f, 0x003f, 0xe1a6, 0x003f, 0x003f, 0xe1a7, 0x003f, - 0x8e48, 0x003f, 0x003f, 0xe1a9, 0x003f, 0x003f, 0xe1a8, 0x003f, - 0x003f, 0xe1aa, 0xe1ab, 0xfb73, 0xfb71, 0x003f, 0xfb72, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfb74, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x94e7, 0x003f, - 0xe1ac, 0x003f, 0x003f, 0x003f, 0xe1ad, 0x003f, 0x003f, 0xea89, - 0xe1ae, 0xe1af, 0xe1b0, 0x003f, 0x003f, 0x003f, 0x003f, 0x8e4d, - 0x003f, 0x003f, 0xe1b1, 0x9475, 0x003f, 0x003f, 0x967e, 0x003f, - 0x896d, 0x003f, 0x8976, 0x003f, 0x003f, 0xe1b2, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe1b4, 0x003f, 0x003f, 0x003f, 0xe1b3, 0x9390, - 0x003f, 0x003f, 0x003f, 0x90b7, 0x9f58, 0x003f, 0xe1b5, 0x96bf, - 0x003f, 0xe1b6, 0x003f, 0x8ac4, 0x94d5, 0xe1b7, 0x003f, 0xe1b8, - 0x003f, 0x003f, 0xe1b9, 0x003f, 0x003f, 0x003f, 0x96da, 0x003f, - 0x003f, 0x003f, 0x96d3, 0x003f, 0x92bc, 0x003f, 0x003f, 0x003f, - 0x918a, 0x003f, 0x003f, 0xe1bb, 0x003f, 0x003f, 0x8f82, 0x003f, - /* 0x7700 .. 0x77ff */ - 0x003f, 0x8fc8, 0x003f, 0x003f, 0xe1be, 0x003f, 0x003f, 0xe1bd, - 0xe1bc, 0x94fb, 0x003f, 0x8ac5, 0x8ca7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe1c4, 0x003f, 0x003f, 0xe1c1, 0x905e, - 0x96b0, 0x003f, 0x003f, 0x003f, 0xe1c0, 0xe1c2, 0xe1c3, 0x003f, - 0x003f, 0xe1bf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1c5, - 0xe1c6, 0x003f, 0x92ad, 0x003f, 0x8ae1, 0x003f, 0x003f, 0x003f, - 0x9285, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfb76, 0xe1c7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe1c8, 0xe1cb, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9087, 0x003f, 0x93c2, 0x003f, 0xe1cc, 0x9672, 0x003f, - 0xe1c9, 0x003f, 0x003f, 0xe1ca, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe1cf, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1ce, 0xe1cd, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe1d1, 0x003f, 0x003f, 0xe1d0, 0x003f, - 0x003f, 0xe1d2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1d4, 0x003f, - 0xe1d3, 0x003f, 0x003f, 0x003f, 0x003f, 0x95cb, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8f75, 0x97c4, 0x003f, 0x003f, - 0xe1d5, 0x003f, 0x003f, 0x93b5, 0x003f, 0x003f, 0xe1d6, 0x003f, - 0x003f, 0xe1d7, 0x003f, 0xe1db, 0xe1d9, 0xe1da, 0x003f, 0xe1d8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1dc, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1dd, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1de, - 0x003f, 0x003f, 0xe1df, 0x96b5, 0xe1e0, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x96ee, 0xe1e1, 0x003f, 0x926d, 0x003f, 0x948a, - 0x003f, 0x8be9, 0x003f, 0x003f, 0x003f, 0x925a, 0xe1e2, 0x8bb8, - 0x003f, 0x003f, 0x003f, 0x90ce, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe1e3, 0x003f, 0x003f, 0x003f, - /* 0x7800 .. 0x78ff */ - 0x003f, 0x003f, 0x8dbb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe1e4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe1e5, 0x003f, 0x8ca4, 0x8dd3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe1e7, 0xfb78, 0x003f, 0x003f, 0x003f, 0x9375, 0x8dd4, 0x8b6d, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9643, 0x003f, 0x946a, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9376, 0x003f, 0x003f, 0x003f, 0x003f, 0x8d7b, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1e9, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfb79, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8fc9, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xfb7a, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x97b0, 0x8d64, 0x003f, 0x003f, 0x8ca5, - 0x003f, 0x003f, 0x94a1, 0x003f, 0xe1eb, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xfb7b, 0x003f, 0xe1ed, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8ce9, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1ec, 0x92f4, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe1ef, 0x8a56, 0xe1ea, 0x003f, - 0x003f, 0x94e8, 0x003f, 0x894f, 0x003f, 0x8dea, 0x003f, 0x9871, - 0x003f, 0x003f, 0xe1ee, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe1f0, 0x003f, 0x003f, 0x003f, 0x95c9, - 0x003f, 0x90d7, 0xe1f2, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1f3, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1f1, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8a6d, 0x003f, 0xe1f9, 0x003f, 0xe1f8, 0x003f, - 0x003f, 0x8ea5, 0x003f, 0x003f, 0x003f, 0xe1fa, 0xe1f5, 0x003f, - 0x003f, 0x003f, 0xe1fb, 0xe1f6, 0x003f, 0x003f, 0x003f, 0x003f, - 0x94d6, 0xe1f4, 0x003f, 0x003f, 0xe1f7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe241, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe240, - 0x9681, 0x003f, 0x003f, 0x003f, 0xe1fc, 0x003f, 0x003f, 0x88e9, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe243, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe242, 0x003f, 0x003f, - /* 0x7900 .. 0x79ff */ - 0x003f, 0x8fca, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe244, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9162, 0x003f, - 0x003f, 0xe246, 0xe245, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe247, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1e6, 0x003f, - 0x003f, 0x003f, 0xe1e8, 0xe249, 0xe248, 0x003f, 0x003f, 0x003f, - 0xfb7c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8ea6, 0x003f, 0x97e7, 0x003f, 0x8ed0, 0x003f, - 0xe24a, 0x8c56, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8b5f, - 0x8b46, 0x8e83, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9753, 0x003f, 0x003f, 0xe250, 0x003f, 0xe24f, 0x9163, 0xe24c, - 0x003f, 0x003f, 0xe24e, 0x003f, 0x003f, 0x8f6a, 0x905f, 0xe24d, - 0xe24b, 0x003f, 0x9449, 0x003f, 0x003f, 0x8fcb, 0x003f, 0x003f, - 0x955b, 0x003f, 0x003f, 0x003f, 0x003f, 0x8dd5, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9398, - 0x003f, 0x003f, 0xe251, 0x003f, 0x003f, 0x003f, 0x003f, 0xe252, - 0xe268, 0x8bd6, 0x003f, 0x003f, 0x985c, 0x9154, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe253, 0x003f, 0x003f, 0x89d0, 0x92f5, 0x959f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xfb81, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfb83, 0x003f, 0xe254, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8b9a, 0xe255, - 0x003f, 0x003f, 0xe257, 0x003f, 0x003f, 0x003f, 0xe258, 0x003f, - 0x9448, 0x003f, 0x003f, 0xe259, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe25a, 0xe25b, 0x003f, 0x003f, 0x8bd7, 0x89d1, 0x93c3, - 0x8f47, 0x8e84, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe25c, 0x003f, 0x8f48, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x89c8, 0x9562, 0x003f, 0x003f, 0xe25d, 0x003f, 0x003f, - 0x94e9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9164, - 0x003f, 0xe260, 0x003f, 0xe261, 0x9489, 0x003f, 0x9060, 0xe25e, - 0x003f, 0x9281, 0x003f, 0x003f, 0xe25f, 0x003f, 0x003f, 0x003f, - 0x8fcc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x88da, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7a00 .. 0x7aff */ - 0x8b48, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe262, 0x003f, 0x003f, 0x92f6, 0x003f, 0xe263, 0x90c5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x96ab, 0x003f, 0x003f, 0x9542, - 0xe264, 0xe265, 0x9274, 0x003f, 0x97c5, 0x003f, 0x003f, 0xe267, - 0xe266, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8eed, 0x003f, - 0x003f, 0xe269, 0x88ee, 0x003f, 0x003f, 0x003f, 0x003f, 0xe26c, - 0x003f, 0x003f, 0x003f, 0xe26a, 0x89d2, 0x8c6d, 0xe26b, 0x8d65, - 0x8d92, 0x003f, 0x95e4, 0xe26d, 0x003f, 0x003f, 0x9673, 0x003f, - 0x003f, 0xe26f, 0x003f, 0x003f, 0x003f, 0x90cf, 0x896e, 0x89b8, - 0x88aa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe26e, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe270, 0xe271, 0x8ff5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe272, 0x003f, 0x8a6e, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe274, 0x003f, 0x003f, 0x003f, 0x8c8a, 0x003f, 0x8b86, 0x003f, - 0x003f, 0xe275, 0x8bf3, 0x003f, 0x003f, 0xe276, 0x003f, 0x90fa, - 0x003f, 0x93cb, 0x003f, 0x90de, 0x8df3, 0x003f, 0x003f, 0x003f, - 0xe277, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9282, 0x918b, 0x003f, 0xe279, 0xe27b, 0xe278, - 0xe27a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8c41, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe27c, 0x8c45, 0x003f, 0x003f, 0x003f, 0x8b87, 0x9771, - 0xe27e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe280, 0x003f, - 0x003f, 0x003f, 0x894d, 0x003f, 0x003f, 0x003f, 0x003f, 0xe283, - 0x003f, 0x003f, 0x003f, 0x8a96, 0xe282, 0xe281, 0x003f, 0xe285, - 0xe27d, 0x003f, 0xe286, 0x97a7, 0x003f, 0xe287, 0x003f, 0xe288, - 0x003f, 0xfb84, 0x9af2, 0xe28a, 0x003f, 0xe289, 0x003f, 0x003f, - 0x003f, 0xe28b, 0xe28c, 0x003f, 0x97b3, 0xe28d, 0x003f, 0xe8ed, - 0x8fcd, 0xe28e, 0xe28f, 0x8f76, 0x003f, 0x93b6, 0xe290, 0xfb85, - 0x003f, 0x003f, 0x9247, 0xfb87, 0x003f, 0xe291, 0x003f, 0x925b, - 0xe292, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8ba3, 0x003f, - 0x995e, 0x927c, 0x8eb1, 0x003f, 0x003f, 0x003f, 0x003f, 0x8ac6, - /* 0x7b00 .. 0x7bff */ - 0x003f, 0x003f, 0xe293, 0x003f, 0xe2a0, 0x003f, 0xe296, 0x003f, - 0x8b88, 0x003f, 0xe295, 0xe2a2, 0x003f, 0x003f, 0x003f, 0xe294, - 0x003f, 0x8fce, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe298, 0xe299, 0x003f, 0x934a, 0x003f, 0x003f, 0xe29a, 0x003f, - 0x8a7d, 0x003f, 0x003f, 0x003f, 0x003f, 0x9079, 0x9584, 0x003f, - 0xe29c, 0x003f, 0x003f, 0x003f, 0x91e6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe297, 0x003f, 0xe29b, 0xe29d, 0x003f, - 0x003f, 0x8df9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2a4, 0x954d, 0x003f, - 0x94a4, 0x9399, 0x003f, 0x8bd8, 0xe2a3, 0xe2a1, 0x003f, 0x94b3, - 0xe29e, 0x927d, 0x939b, 0x003f, 0x939a, 0x003f, 0x8df4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2b6, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2a6, 0x003f, 0xe2a8, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe2ab, 0x003f, 0xe2ac, 0x003f, - 0xe2a9, 0xe2aa, 0x003f, 0x003f, 0xe2a7, 0xe2a5, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe29f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x95cd, 0x89d3, - 0x003f, 0x003f, 0x003f, 0xe2b3, 0x003f, 0xe2b0, 0x003f, 0xe2b5, - 0x003f, 0x003f, 0xe2b4, 0x003f, 0x9493, 0x96a5, 0x003f, 0x8e5a, - 0xe2ae, 0xe2b7, 0xe2b2, 0x003f, 0xe2b1, 0xe2ad, 0xfb88, 0xe2af, - 0x003f, 0x8ac7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x925c, 0x003f, 0x003f, 0x90fb, 0x003f, 0x003f, - 0x003f, 0x94a0, 0x003f, 0x003f, 0xe2bc, 0x003f, 0x003f, 0x003f, - 0x94a2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x90df, 0xe2b9, 0x003f, 0x003f, 0x94cd, 0x003f, 0xe2bd, 0x95d1, - 0x003f, 0x927a, 0x003f, 0xe2b8, 0xe2ba, 0x003f, 0x003f, 0xe2bb, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2be, 0x003f, 0x003f, - 0x8ec2, 0x003f, 0x003f, 0x003f, 0x93c4, 0xe2c3, 0xe2c2, 0x003f, - 0x003f, 0xe2bf, 0x003f, 0x003f, 0x003f, 0x9855, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe2c8, 0x003f, 0x003f, 0xe2cc, 0xe2c9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7c00 .. 0x7cff */ - 0xe2c5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2c6, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2cb, 0x003f, 0x003f, - 0x003f, 0xe2c0, 0x99d3, 0xe2c7, 0xe2c1, 0x003f, 0x003f, 0xe2ca, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2d0, - 0x003f, 0x8ac8, 0x003f, 0xe2cd, 0x003f, 0x003f, 0x003f, 0xe2ce, - 0x003f, 0x003f, 0xe2cf, 0xe2d2, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2d1, - 0x94f4, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2d3, 0x97fa, 0x95eb, - 0xe2d8, 0x003f, 0x003f, 0xe2d5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe2d4, 0x90d0, 0x003f, 0xe2d7, - 0xe2d9, 0x003f, 0x003f, 0x003f, 0xe2d6, 0x003f, 0xe2dd, 0x003f, - 0xe2da, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2db, - 0xe2c4, 0x003f, 0x003f, 0x003f, 0xe2dc, 0xe2de, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe2df, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x95c4, 0x003f, 0xe2e0, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x96e0, 0x003f, - 0x003f, 0x8bcc, 0x8c48, 0xe2e1, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x95b2, 0x003f, 0x9088, 0x003f, 0x96ae, 0x003f, 0x003f, - 0xe2e2, 0x003f, 0x97b1, 0x003f, 0x003f, 0x9494, 0x003f, 0x9165, - 0x9453, 0x003f, 0x003f, 0x8f6c, 0x003f, 0x003f, 0x003f, 0x88be, - 0x003f, 0xe2e7, 0xe2e5, 0x003f, 0xe2e3, 0x8a9f, 0x003f, 0x8fcf, - 0xe2e8, 0x003f, 0x003f, 0xe2e6, 0x003f, 0xe2e4, 0xe2ec, 0x003f, - 0x003f, 0xe2eb, 0xe2ea, 0xe2e9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe2ed, 0x003f, 0x003f, 0x003f, 0xe2ee, 0x90b8, 0x003f, - 0xe2ef, 0x003f, 0xe2f1, 0x003f, 0x003f, 0xe2f0, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8cd0, 0x003f, 0x003f, 0x003f, 0x9157, 0x003f, - 0x003f, 0x003f, 0xe2f3, 0x003f, 0x003f, 0x003f, 0x939c, 0x003f, - 0xe2f2, 0x003f, 0x003f, 0x003f, 0xe2f4, 0x003f, 0x95b3, 0x918c, - 0x8d66, 0x003f, 0xe2f5, 0x003f, 0x003f, 0x003f, 0x003f, 0x97c6, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2f7, - 0x003f, 0x003f, 0xe2f8, 0x003f, 0xe2f9, 0x003f, 0xe2fa, 0x003f, - 0x8e85, 0x003f, 0xe2fb, 0x8c6e, 0x003f, 0x003f, 0x8b8a, 0x003f, - /* 0x7d00 .. 0x7dff */ - 0x8b49, 0x003f, 0xe340, 0x003f, 0x96f1, 0x8d67, 0xe2fc, 0x003f, - 0x003f, 0x003f, 0xe343, 0x96e4, 0x003f, 0x945b, 0x003f, 0x003f, - 0x9552, 0x003f, 0x003f, 0x003f, 0x8f83, 0xe342, 0x003f, 0x8ed1, - 0x8d68, 0x8e86, 0x8b89, 0x95b4, 0xe341, 0x003f, 0x003f, 0x003f, - 0x9166, 0x9661, 0x8df5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8e87, 0x92db, 0x003f, 0xe346, 0x97dd, - 0x8dd7, 0x003f, 0xe347, 0x9061, 0x003f, 0xe349, 0x003f, 0x003f, - 0x003f, 0x8fd0, 0x8dae, 0x003f, 0x003f, 0x003f, 0x003f, 0xe348, - 0x003f, 0x003f, 0x8f49, 0x8cbc, 0x9167, 0xe344, 0xe34a, 0x003f, - 0xfb8a, 0x003f, 0x003f, 0xe345, 0x8c6f, 0x003f, 0xe34d, 0xe351, - 0x8c8b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe34c, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe355, 0xfb8b, 0x003f, 0x8d69, 0x003f, - 0x003f, 0x978d, 0x88ba, 0xe352, 0x003f, 0x003f, 0x8b8b, 0x003f, - 0xe34f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe350, 0x003f, - 0x003f, 0x939d, 0xe34e, 0xe34b, 0x003f, 0x8a47, 0x90e2, 0x003f, - 0x003f, 0x8ca6, 0x003f, 0x003f, 0x003f, 0xe357, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe354, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe356, - 0x003f, 0x003f, 0x003f, 0xe353, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8c70, 0x91b1, 0xe358, 0x918e, 0x003f, 0x003f, 0xe365, - 0xfb8d, 0x003f, 0xe361, 0xe35b, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe35f, 0x8ef8, 0x88db, 0xe35a, 0xe362, - 0xe366, 0x8d6a, 0x96d4, 0x003f, 0x92d4, 0xe35c, 0x003f, 0xfb8c, - 0xe364, 0x003f, 0xe359, 0x925d, 0x003f, 0xe35e, 0x88bb, 0x96c8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe35d, - 0x003f, 0x003f, 0x8bd9, 0x94ea, 0x003f, 0x003f, 0x003f, 0x918d, - 0x003f, 0x97ce, 0x8f8f, 0x003f, 0x003f, 0xe38e, 0xfb8e, 0x003f, - 0xe367, 0x003f, 0x90fc, 0x003f, 0xe363, 0xe368, 0xe36a, 0x003f, - 0x92f7, 0xe36d, 0x003f, 0x003f, 0xe369, 0x003f, 0x003f, 0x003f, - 0x95d2, 0x8ac9, 0x003f, 0x003f, 0x96c9, 0x003f, 0x003f, 0x88dc, - 0x003f, 0x003f, 0xe36c, 0x003f, 0x97fb, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe36b, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7e00 .. 0x7eff */ - 0x003f, 0x898f, 0x003f, 0x003f, 0x93ea, 0xe36e, 0x003f, 0x003f, - 0x003f, 0xe375, 0xe36f, 0xe376, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe372, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x949b, 0x003f, 0x003f, 0x8ec8, 0xe374, - 0x003f, 0xe371, 0xe377, 0xe370, 0x003f, 0x003f, 0x8f63, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9644, 0x003f, 0x003f, 0x8f6b, 0x003f, - 0x003f, 0xe373, 0xe380, 0x003f, 0x003f, 0xe37b, 0x003f, 0xe37e, - 0x003f, 0xe37c, 0xe381, 0xe37a, 0x003f, 0xe360, 0x90d1, 0x003f, - 0x003f, 0x94c9, 0x003f, 0xe37d, 0x003f, 0x003f, 0xe378, 0x003f, - 0x003f, 0x003f, 0x9140, 0x8c71, 0x003f, 0x8f4a, 0x003f, 0x003f, - 0x003f, 0x003f, 0xfb8f, 0x003f, 0x9044, 0x9155, 0xe384, 0x003f, - 0x003f, 0xe386, 0xe387, 0x003f, 0x003f, 0xe383, 0xe385, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe379, 0xe382, - 0x003f, 0xe38a, 0xe389, 0x003f, 0x003f, 0x969a, 0x003f, 0x003f, - 0x8c4a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe388, 0x003f, 0xe38c, 0xe38b, 0xe38f, 0x003f, 0xe391, - 0x003f, 0x003f, 0x8e5b, 0xe38d, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe392, 0xe393, 0xfa5c, 0x003f, 0xe394, 0x003f, 0xe39a, 0x935a, - 0xe396, 0x003f, 0xe395, 0xe397, 0xe398, 0x003f, 0xe399, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe39b, 0xe39c, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7f00 .. 0x7fff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8aca, 0x003f, - 0xe39d, 0x003f, 0xe39e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe39f, 0x003f, 0xfb90, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe3a0, 0xe3a1, 0xe3a2, 0x003f, - 0xe3a3, 0xe3a4, 0x003f, 0x003f, 0xe3a6, 0xe3a5, 0x003f, 0x003f, - 0xe3a7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3a8, - 0xe3a9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3ac, - 0xe3aa, 0xe3ab, 0x8ddf, 0x8c72, 0x003f, 0x003f, 0x9275, 0x003f, - 0x94b1, 0x003f, 0x8f90, 0x003f, 0x003f, 0x946c, 0x003f, 0x94eb, - 0xe3ad, 0x9ceb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe3ae, 0xe3b0, 0x003f, 0x9785, 0xe3af, 0xe3b2, - 0xe3b1, 0x003f, 0x9772, 0x003f, 0xe3b3, 0x003f, 0x94fc, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe3b4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe3b7, 0x003f, 0x003f, 0xe3b6, 0xe3b5, 0x003f, - 0x003f, 0xfb91, 0x003f, 0xe3b8, 0x8c51, 0x003f, 0x003f, 0x003f, - 0x9141, 0x8b60, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3bc, 0xe3b9, - 0x003f, 0x003f, 0xe3ba, 0x003f, 0x003f, 0x003f, 0xe3bd, 0x003f, - 0xe3be, 0xe3bb, 0x003f, 0x003f, 0x003f, 0x8948, 0x003f, 0x003f, - 0x003f, 0x89a5, 0x003f, 0x003f, 0x003f, 0xe3c0, 0xe3c1, 0x003f, - 0x003f, 0x003f, 0xe3c2, 0x003f, 0x9782, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8f4b, 0x003f, 0xe3c4, 0xe3c3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9089, 0xe3c5, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3c6, 0x003f, - 0x003f, 0xe3c7, 0x003f, 0x8ae3, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8acb, 0x003f, 0x003f, 0xe3c8, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe3c9, 0x003f, 0x967c, 0x9783, 0x003f, 0x003f, 0x003f, - /* 0x8000 .. 0x80ff */ - 0x9773, 0x9856, 0x003f, 0x8d6c, 0xe3cc, 0x8ed2, 0xe3cb, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe3cd, 0x8ea7, 0x003f, 0x003f, 0x003f, - 0x91cf, 0x003f, 0xe3ce, 0x003f, 0x003f, 0x8d6b, 0x003f, 0x96d5, - 0xe3cf, 0xe3d0, 0x003f, 0x003f, 0xe3d1, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe3d2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe3d3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8ea8, 0x003f, 0x003f, 0x96eb, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe3d5, 0x003f, 0x925e, 0x003f, 0xe3d4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3d7, 0x003f, - 0x003f, 0x003f, 0xe3d6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe3d8, 0x003f, 0x003f, 0x003f, 0x90b9, 0x003f, - 0xe3d9, 0x003f, 0xe3da, 0x003f, 0x003f, 0x003f, 0x95b7, 0xe3db, - 0x003f, 0x918f, 0xe3dc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe3dd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x97fc, - 0xe3e0, 0x003f, 0xe3df, 0xe3de, 0x92ae, 0x003f, 0xe3e1, 0x9045, - 0x003f, 0xe3e2, 0x003f, 0x003f, 0x003f, 0xe3e3, 0x9857, 0xe3e4, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe3e5, 0xe3e7, 0xe3e6, 0x94a3, - 0x003f, 0x93f7, 0x003f, 0x985d, 0x94a7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe3e9, 0x003f, 0x003f, 0x8fd1, 0x003f, - 0x9549, 0x003f, 0xe3ea, 0xe3e8, 0x003f, 0x8acc, 0x003f, 0x003f, - 0x003f, 0x8cd2, 0x8e88, 0x003f, 0x003f, 0x94ec, 0x003f, 0x003f, - 0x003f, 0x8ca8, 0x9662, 0x003f, 0xe3ed, 0xe3eb, 0x003f, 0x8d6d, - 0x003f, 0x8d6e, 0x88e7, 0x003f, 0x8de6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9478, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x88dd, 0xe3f2, 0x003f, 0x925f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9477, 0x003f, 0x91d9, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3f4, 0x003f, - 0x003f, 0xe3f0, 0xe3f3, 0xe3ee, 0x003f, 0xe3f1, 0x9645, 0x003f, - 0x003f, 0x8cd3, 0x003f, 0x003f, 0x88fb, 0xe3ef, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3f6, - 0x003f, 0xe3f7, 0x003f, 0x003f, 0x93b7, 0x003f, 0x003f, 0x003f, - 0x8bb9, 0x003f, 0x003f, 0x003f, 0xe445, 0x945c, 0x003f, 0x003f, - /* 0x8100 .. 0x81ff */ - 0x003f, 0x003f, 0x8e89, 0x003f, 0x003f, 0x8bba, 0x90c6, 0x9865, - 0x96ac, 0xe3f5, 0x90d2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8b72, 0xe3f8, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe3fa, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe3f9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3fb, - 0x003f, 0x9245, 0x003f, 0x945d, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x92af, 0x003f, 0x003f, 0x003f, 0x003f, 0xe442, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe441, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe3fc, 0x003f, 0x003f, 0x9074, 0x003f, - 0x9585, 0xe444, 0x003f, 0xe443, 0x8d6f, 0x9872, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe454, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe448, 0xe449, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8eee, 0x003f, 0x003f, 0xe447, 0x003f, - 0x8d98, 0xe446, 0x003f, 0x003f, 0xe44a, 0x003f, 0x003f, 0x003f, - 0x92b0, 0x95a0, 0x9142, 0x003f, 0x003f, 0x003f, 0x003f, 0x91da, - 0xe44e, 0x003f, 0xe44f, 0xe44b, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe44c, 0x003f, 0xe44d, 0x003f, 0x003f, 0x003f, 0x003f, 0x8d70, - 0x003f, 0x003f, 0x003f, 0xe455, 0x003f, 0xe451, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9586, 0x003f, 0x968c, 0x9547, 0x003f, 0x003f, - 0xe450, 0x003f, 0x003f, 0xe453, 0xe452, 0x003f, 0x003f, 0x003f, - 0x9663, 0xe456, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe457, 0x003f, 0x003f, 0x9156, 0x003f, 0xe458, 0x003f, 0x003f, - 0xe45a, 0x003f, 0xe45e, 0x003f, 0x003f, 0xe45b, 0xe459, 0x945e, - 0xe45c, 0x003f, 0xe45d, 0x003f, 0x003f, 0x003f, 0x89b0, 0x003f, - 0xe464, 0xe45f, 0x003f, 0x003f, 0x003f, 0xe460, 0x003f, 0x003f, - 0x003f, 0xe461, 0x003f, 0x919f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe463, 0xe462, 0xe465, 0x003f, 0x003f, 0x003f, 0x003f, 0xe466, - 0xe467, 0x003f, 0x003f, 0x9062, 0x003f, 0x89e7, 0x003f, 0xe468, - 0x97d5, 0x003f, 0x8ea9, 0x003f, 0x003f, 0x8f4c, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8e8a, 0x9276, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe469, 0xe46a, 0x8950, 0x003f, 0xe46b, 0x003f, - /* 0x8200 .. 0x82ff */ - 0x003f, 0xe46c, 0xe46d, 0x003f, 0x003f, 0xe46e, 0x003f, 0xe46f, - 0x8bbb, 0x9da8, 0xe470, 0x003f, 0x90e3, 0xe471, 0x8ec9, 0x003f, - 0xe472, 0x003f, 0x98ae, 0x003f, 0x003f, 0x003f, 0xe473, 0x95dc, - 0x8ada, 0x003f, 0x003f, 0x9143, 0x8f77, 0x003f, 0x9591, 0x8f4d, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe474, 0x8d71, 0xe475, 0x94ca, 0x003f, 0xe484, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe477, 0x003f, 0x91c7, 0x9495, 0x8cbd, - 0xe476, 0x9144, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe478, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x92f8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe47a, 0xe479, 0xe47c, 0x003f, 0x003f, 0xe47b, 0x003f, 0xe47d, - 0x003f, 0x003f, 0xe480, 0x003f, 0xe47e, 0x003f, 0x8acd, 0x003f, - 0xe481, 0x003f, 0xe482, 0xe483, 0x003f, 0x003f, 0x8daf, 0x97c7, - 0x003f, 0xe485, 0x9046, 0x003f, 0x003f, 0x003f, 0x8990, 0xe486, - 0xe487, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe488, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x88f0, 0x003f, 0xe489, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe48a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9587, 0x003f, 0x003f, 0x003f, 0x8ec5, 0x003f, 0xe48c, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8a48, 0x88b0, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe48b, 0xe48e, 0x946d, 0x003f, 0x9063, - 0x003f, 0x89d4, 0x003f, 0x9646, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8c7c, 0x8bda, 0x003f, 0xe48d, 0x003f, 0x89e8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8aa1, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8991, 0xe492, 0x97e8, 0x91db, 0x003f, 0x003f, 0x9563, - 0x003f, 0xe49e, 0x003f, 0x89d5, 0xe49c, 0x003f, 0xe49a, 0xe491, - 0x003f, 0xe48f, 0x003f, 0xe490, 0x003f, 0x8ee1, 0x8bea, 0x9297, - 0x003f, 0x003f, 0x003f, 0x93cf, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8970, 0x003f, 0xe494, 0xe493, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe499, 0xe495, 0xe498, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x8300 .. 0x83ff */ - 0x003f, 0xfb93, 0x96ce, 0xe497, 0x89d6, 0x8a9d, 0xe49b, 0x003f, - 0x003f, 0xe49d, 0x003f, 0x003f, 0x003f, 0x003f, 0x8c73, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4a1, 0xe4aa, - 0xe4ab, 0x003f, 0x003f, 0x003f, 0x88a9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe4b2, 0x003f, 0x003f, 0x003f, 0x003f, - 0x88ef, 0x003f, 0x003f, 0xe4a9, 0x003f, 0x003f, 0x003f, 0xe4a8, - 0x003f, 0xe4a3, 0xe4a2, 0x003f, 0xe4a0, 0xe49f, 0x9283, 0x003f, - 0x91f9, 0xe4a5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe4a4, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4a7, 0x003f, 0x003f, - 0x003f, 0x9190, 0x8c74, 0x003f, 0x003f, 0x003f, 0x003f, 0x8960, - 0xe4a6, 0x003f, 0x8d72, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9191, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xfb94, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe4b8, 0x003f, 0xe4b9, 0x003f, 0x89d7, - 0x003f, 0x003f, 0x003f, 0x89ac, 0xe4b6, 0x003f, 0x003f, 0xfb95, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4ac, 0x003f, 0xe4b4, - 0x003f, 0xe4bb, 0xe4b5, 0x003f, 0x003f, 0x003f, 0xe4b3, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe496, 0x003f, 0x003f, 0xe4b1, 0x003f, - 0x003f, 0x003f, 0xe4ad, 0x003f, 0x003f, 0x003f, 0x8ace, 0xe4af, - 0xe4ba, 0x003f, 0xe4b0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe4bc, 0x003f, 0xe4ae, 0x949c, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9789, 0x003f, 0x003f, 0x003f, 0xe4b7, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4cd, 0x003f, 0x003f, - 0x003f, 0xe4c5, 0x003f, 0x003f, 0x003f, 0x909b, 0x003f, 0xfb96, - 0x003f, 0x003f, 0x8b65, 0x003f, 0x8bdb, 0x003f, 0xe4c0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x89d9, 0x003f, 0x003f, 0x8fd2, 0x003f, - 0xe4c3, 0x003f, 0x003f, 0x003f, 0x8dd8, 0x003f, 0x003f, 0x9370, - 0xe4c8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x95ec, 0x003f, 0xe4bf, 0x003f, 0x003f, 0x003f, 0x89d8, - 0x8cd4, 0x9548, 0xe4c9, 0x003f, 0xe4bd, 0x003f, 0xfb97, 0xe4c6, - 0x003f, 0x003f, 0x003f, 0xe4d0, 0x003f, 0xe4c1, 0x003f, 0x003f, - /* 0x8400 .. 0x84ff */ - 0x003f, 0x003f, 0x003f, 0xe4c2, 0x93b8, 0x003f, 0x003f, 0xe4c7, - 0x003f, 0x003f, 0x003f, 0xe4c4, 0x9647, 0xe4ca, 0x88de, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe4be, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe4cc, 0x003f, 0xe4cb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x948b, 0xe4d2, 0x003f, 0xe4dd, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8a9e, 0x003f, 0x003f, 0x003f, 0xe4e0, 0x003f, 0x003f, - 0xe4ce, 0x003f, 0x003f, 0x003f, 0xe4d3, 0x978e, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4dc, 0x003f, - 0xfb98, 0x9774, 0x003f, 0x003f, 0x003f, 0x003f, 0x97a8, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9298, - 0x003f, 0x003f, 0x003f, 0x8a8b, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9592, 0xe4e2, 0x939f, 0x003f, 0x003f, 0x88af, 0x003f, - 0x003f, 0xe4db, 0x003f, 0xe4d7, 0x9192, 0xe4d1, 0xe4d9, 0xe4de, - 0x003f, 0x944b, 0x003f, 0x003f, 0x003f, 0x88a8, 0x003f, 0xe4d6, - 0x003f, 0xe4df, 0x9598, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe4da, 0x003f, 0xe4d5, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8fd3, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8f4e, 0x003f, 0x003f, 0x003f, 0x8eaa, 0x003f, 0x003f, 0x003f, - 0x003f, 0x96d6, 0x003f, 0x003f, 0x9566, 0x003f, 0x003f, 0xe4e5, - 0x003f, 0xe4ee, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4d8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8a97, 0x003f, 0xfb99, 0x003f, 0x003f, 0x003f, - 0x8ff6, 0xe4e3, 0x003f, 0xe4e8, 0x9193, 0x003f, 0x003f, 0xe4e4, - 0x003f, 0xe4eb, 0x003f, 0x003f, 0x927e, 0x003f, 0xe4ec, 0x003f, - 0x003f, 0x9775, 0xe4e1, 0x8a57, 0x003f, 0xe4e7, 0x003f, 0x003f, - 0xe4ea, 0x96aa, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4ed, 0x003f, - 0x003f, 0xe4e6, 0xe4e9, 0x003f, 0xfa60, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x9648, 0x003f, 0x9840, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe4f1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe4f8, 0x003f, 0x003f, 0xe4f0, - /* 0x8500 .. 0x85ff */ - 0x8ec1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4cf, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x95cc, 0x003f, 0x96a0, 0xe4f7, 0xe4f6, 0x003f, 0xe4f2, - 0xe4f3, 0x003f, 0x8955, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4f5, - 0x003f, 0xe4ef, 0x003f, 0x003f, 0x003f, 0x003f, 0x92d3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe4f4, 0x88fc, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x91a0, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x95c1, 0x003f, 0x003f, - 0xe4f9, 0xe540, 0x003f, 0x94d7, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe4fc, 0x8fd4, 0x8ec7, 0xe542, 0x003f, 0x003f, 0x8bbc, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfb9a, 0x003f, 0xe543, 0x003f, 0x9599, - 0xe4fb, 0xfb9b, 0xe4d4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe4fa, 0x003f, 0x003f, 0x003f, 0x003f, - 0x986e, 0x93a0, 0x9593, 0xfb9c, 0x003f, 0xe54a, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe550, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe551, 0x003f, - 0xe544, 0x003f, 0x003f, 0x003f, 0x9496, 0x003f, 0x003f, 0xe54e, - 0xe546, 0x003f, 0xe548, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe552, 0xe547, 0x003f, 0x003f, 0xe54b, 0x003f, 0x003f, 0x8992, - 0x003f, 0x93e3, 0x003f, 0xe54c, 0xe54f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe545, 0x003f, 0x9145, 0x003f, - 0xe549, 0x8e46, 0x9064, 0x8c4f, 0x96f2, 0x003f, 0x96f7, 0x8f92, - 0xfb9e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe556, 0xe554, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x986d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe553, 0x003f, 0x003f, 0x003f, 0x9795, 0x003f, 0xe555, - 0xe557, 0x003f, 0x003f, 0x003f, 0x003f, 0xe558, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe55b, 0xe559, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x93a1, 0xe55a, 0x003f, 0x003f, - 0x003f, 0x94cb, 0xe54d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8f93, - 0x003f, 0xe55c, 0xe561, 0x9194, 0x003f, 0x003f, 0xe560, 0x003f, - /* 0x8600 .. 0x86ff */ - 0x003f, 0x003f, 0xe541, 0x003f, 0x003f, 0x003f, 0xe562, 0x9168, - 0x003f, 0x003f, 0xe55d, 0xe55f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe55e, 0x003f, 0x003f, 0x9f50, 0x9f41, - 0x003f, 0x003f, 0xe564, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe563, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9796, 0x003f, 0xe1ba, - 0xe565, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe566, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe567, 0x8cd5, 0x003f, - 0x8b73, 0x003f, 0x003f, 0x003f, 0xe569, 0x997c, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8b95, 0x003f, 0x97b8, 0x003f, 0x8bf1, 0xe56a, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe56b, - 0x003f, 0x003f, 0x003f, 0x928e, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe56c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x93f8, 0x003f, 0x88b8, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x89e1, 0xe571, 0xe572, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe56d, 0x003f, 0x8e5c, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe56e, 0x9461, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe56f, 0xe570, 0xe57a, 0x003f, 0x003f, 0x003f, 0xe574, - 0xe577, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe573, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe575, 0x003f, 0xe576, 0x8ed6, - 0x003f, 0xe578, 0x003f, 0x9260, 0x003f, 0x8c75, 0x8a61, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe57b, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8a5e, 0x003f, 0xe581, 0x003f, 0x003f, 0xe57c, 0xe580, - 0x003f, 0x003f, 0x003f, 0x003f, 0x94b8, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe57d, 0x003f, 0x003f, 0xe57e, 0x9567, 0x94d8, 0xe582, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x91fb, 0xe58c, 0x003f, 0xe588, 0x003f, 0x003f, 0x89e9, 0x003f, - /* 0x8700 .. 0x87ff */ - 0xe586, 0x003f, 0x9649, 0xe587, 0x003f, 0x003f, 0xe584, 0x003f, - 0xe585, 0xe58a, 0xe58d, 0x003f, 0x003f, 0xe58b, 0x003f, 0x003f, - 0x003f, 0xe589, 0xe583, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9277, 0x003f, 0xe594, 0x003f, 0x96a8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe592, 0x003f, 0x003f, - 0x003f, 0xe593, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe58e, 0x003f, 0x003f, 0xe590, - 0x003f, 0x003f, 0x003f, 0xe591, 0x003f, 0x003f, 0x003f, 0xe58f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x90e4, 0x003f, 0x9858, 0xe598, 0x003f, 0xe599, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe59f, 0x003f, 0x9049, 0x003f, 0xe59b, - 0x003f, 0xe59e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe596, - 0xe595, 0x003f, 0x003f, 0xe5a0, 0x003f, 0x003f, 0x89da, 0x003f, - 0xe59c, 0x003f, 0xe5a1, 0x003f, 0x003f, 0x003f, 0xe59d, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe59a, 0x003f, 0x92b1, 0x003f, - 0xe597, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9488, - 0x003f, 0x003f, 0xe5a5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x975a, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5a4, - 0x003f, 0x003f, 0xe5a3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe5ac, 0x003f, 0x003f, 0x003f, 0xe5a6, - 0x003f, 0x003f, 0x003f, 0xe5ae, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9786, 0xe5b1, 0x003f, 0xe5a8, 0x003f, 0x003f, - 0xe5a9, 0x003f, 0x003f, 0x003f, 0xe5ad, 0x003f, 0xe5b0, 0xe5af, - 0x003f, 0x003f, 0x003f, 0xe5a7, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe5aa, 0x003f, 0xe5bb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe5b4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5b2, - 0x003f, 0x003f, 0xe5b3, 0x003f, 0x003f, 0x003f, 0xe5b8, 0xe5b9, - 0x003f, 0x8a49, 0x003f, 0x8b61, 0x003f, 0x003f, 0xe5b7, 0x003f, - /* 0x8800 .. 0x88ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5a2, 0x003f, 0xfba1, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5b6, 0xe5ba, 0xe5b5, - 0x003f, 0xe5bc, 0x003f, 0x003f, 0x003f, 0xe5be, 0xe5bd, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe5c0, 0xe5bf, 0xe579, 0x003f, 0x003f, 0x003f, 0xe5c4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe5c1, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5c2, 0x003f, - 0x003f, 0xe5c3, 0x003f, 0xe5c5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8c8c, 0x003f, 0xe5c7, 0x003f, 0xe5c6, 0x003f, 0x8f4f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8d73, 0x9fa5, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe5c8, 0x8f70, 0x003f, 0x003f, 0x003f, 0x8a58, - 0x003f, 0xe5c9, 0x003f, 0x8971, 0x003f, 0x8fd5, 0xe5ca, 0x003f, - 0x003f, 0x8d74, 0xe5cb, 0x88df, 0x003f, 0x003f, 0x003f, 0x003f, - 0x955c, 0x003f, 0x003f, 0xe5cc, 0x003f, 0x003f, 0x003f, 0x003f, - 0x908a, 0x003f, 0xe5d3, 0x003f, 0x003f, 0xe5d0, 0x003f, 0x928f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5d1, 0xe5ce, 0x8bdc, - 0x003f, 0xe5cd, 0xe5d4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8c55, 0x003f, 0x003f, 0x91dc, 0x003f, 0xe5da, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe5d6, 0x003f, 0x003f, 0x003f, 0x91b3, 0xe5d5, - 0x003f, 0xe5d8, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5cf, 0x003f, - 0x003f, 0x003f, 0xe5d9, 0x003f, 0xe5db, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x94ed, 0x003f, 0x003f, 0xe5d7, 0x003f, - 0xe5dc, 0xe5de, 0x003f, 0x003f, 0x8cd1, 0xe5d2, 0x003f, 0x88bf, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5dd, - 0x003f, 0x8dd9, 0x97f4, 0xe5df, 0xe5e0, 0x9195, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x97a0, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe5e1, 0x9754, 0x003f, 0x003f, - 0xe5e2, 0xe5e3, 0x003f, 0x003f, 0x95e2, 0xe5e4, 0x003f, 0x8dbe, - 0x003f, 0x97a1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe5e9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe5ea, 0x8fd6, 0xe5e8, 0xfba2, 0x003f, 0x003f, - 0x9787, 0xe5e5, 0x003f, 0x003f, 0xe5e7, 0x90bb, 0x909e, 0x003f, - /* 0x8900 .. 0x89ff */ - 0x003f, 0x003f, 0xe5e6, 0x003f, 0xe5eb, 0x003f, 0x003f, 0x95a1, - 0x003f, 0x003f, 0xe5ed, 0x003f, 0xe5ec, 0x003f, 0x003f, 0x003f, - 0x8a8c, 0x003f, 0x964a, 0xe5ee, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xfa5d, 0xe5fa, 0xe5f0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5f1, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe5f2, 0xe5f3, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5f7, 0x003f, - 0xe5f8, 0x003f, 0x003f, 0xe5f6, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe5f4, 0x003f, 0xe5ef, 0xe5f5, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe5f9, 0xe8b5, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x89a6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5fc, 0x8bdd, - 0xe5fb, 0x003f, 0x003f, 0x003f, 0xe641, 0x003f, 0xe640, 0x003f, - 0x003f, 0x003f, 0xe643, 0x003f, 0x003f, 0xe642, 0x003f, 0xe644, - 0x003f, 0x003f, 0x8f50, 0x003f, 0xe645, 0x003f, 0x003f, 0xe646, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe647, 0x90bc, - 0x003f, 0x9776, 0x003f, 0xe648, 0x003f, 0x003f, 0x95a2, 0x9465, - 0xe649, 0x003f, 0xe64a, 0x8ca9, 0x003f, 0x003f, 0x003f, 0x8b4b, - 0x003f, 0x003f, 0x003f, 0xe64b, 0x003f, 0x003f, 0x8e8b, 0x9460, - 0xe64c, 0x003f, 0x8a6f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe64d, 0x003f, 0x003f, 0x003f, 0x003f, 0xe64f, 0x9797, - 0x003f, 0xe64e, 0x9065, 0x003f, 0xe650, 0x003f, 0x003f, 0xe651, - 0x003f, 0x003f, 0xe652, 0x8acf, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe653, 0x003f, 0x003f, 0xe654, 0x003f, 0xe655, - 0xe656, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8a70, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe657, 0x003f, 0xe658, 0xe659, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x89f0, 0x003f, 0x003f, 0x9047, 0xe65a, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe65b, 0x003f, 0x003f, 0x003f, - 0xe65c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x8a00 .. 0x8aff */ - 0x8cbe, 0x003f, 0x92f9, 0xe65d, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8c76, 0x003f, 0x9075, 0x003f, 0xe660, 0x003f, 0x93a2, 0x003f, - 0xe65f, 0x003f, 0xfba3, 0x8c50, 0x003f, 0x003f, 0xe65e, 0x91f5, - 0x8b4c, 0x003f, 0x003f, 0xe661, 0x003f, 0xe662, 0x003f, 0x8fd7, - 0x003f, 0x003f, 0x003f, 0x8c8d, 0x003f, 0xe663, 0x003f, 0x003f, - 0x003f, 0x003f, 0x964b, 0x003f, 0x003f, 0x90dd, 0x003f, 0x003f, - 0x003f, 0x8b96, 0x003f, 0x96f3, 0x9169, 0x003f, 0xe664, 0xfba4, - 0x003f, 0x003f, 0x9066, 0x9290, 0x8fd8, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe665, 0x003f, 0x003f, 0x003f, 0x003f, 0xe668, 0x003f, - 0xe669, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8dbc, 0x91c0, 0xe667, 0x003f, 0x8fd9, 0x955d, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe666, 0x003f, 0x003f, 0x8e8c, 0x003f, - 0x8972, 0x003f, 0xe66d, 0x8c77, 0x003f, 0x003f, 0x8e8e, 0x003f, - 0x003f, 0x8e8d, 0x003f, 0x986c, 0xe66c, 0xe66b, 0x9146, 0x003f, - 0x8b6c, 0x9862, 0x8a59, 0x8fda, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xfba5, 0x003f, 0x003f, 0xe66a, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe66f, 0x003f, 0xe670, 0xe66e, 0x003f, 0x8cd6, - 0x003f, 0x975f, 0x003f, 0x003f, 0x8e8f, 0x9446, 0x003f, 0x003f, - 0x003f, 0xe673, 0x003f, 0x90be, 0x003f, 0x9261, 0x003f, 0x003f, - 0x9755, 0x003f, 0xe676, 0x003f, 0x003f, 0x003f, 0x8cea, 0x003f, - 0x90bd, 0xe672, 0x003f, 0xe677, 0x8ceb, 0xe674, 0xe675, 0xfba6, - 0xe671, 0x003f, 0x003f, 0x003f, 0x90e0, 0x93c7, 0x003f, 0x003f, - 0x924e, 0x003f, 0x89db, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x94ee, 0x003f, 0x003f, 0x8b62, 0x003f, 0xfba7, 0x92b2, - 0x003f, 0x003f, 0xe67a, 0x003f, 0xe678, 0x003f, 0x003f, 0x926b, - 0x003f, 0x003f, 0x003f, 0x90bf, 0x8ad0, 0xe679, 0x003f, 0x907a, - 0x003f, 0x003f, 0x97c8, 0x003f, 0x003f, 0x003f, 0x985f, 0x003f, - 0x003f, 0x003f, 0xe67b, 0xe687, 0x92b3, 0x003f, 0xe686, 0xfba8, - 0xe683, 0xe68b, 0xe684, 0x003f, 0xe680, 0x003f, 0x92fa, 0xe67e, - 0x003f, 0x003f, 0x003f, 0xe67c, 0x003f, 0x9740, 0x8e90, 0x003f, - 0x003f, 0xe681, 0x003f, 0xe67d, 0x003f, 0x003f, 0xfbaa, 0xe685, - 0x8f94, 0x003f, 0x8cbf, 0x003f, 0x003f, 0x003f, 0x91f8, 0x003f, - /* 0x8b00 .. 0x8bff */ - 0x9664, 0x8979, 0x88e0, 0x003f, 0x93a3, 0x003f, 0x003f, 0xe689, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe688, 0x003f, 0x93e4, 0x003f, - 0xe68d, 0x003f, 0x003f, 0x003f, 0xe682, 0x003f, 0xe68c, 0xe68e, - 0x003f, 0x8caa, 0xe68a, 0x8d75, 0x003f, 0x8ed3, 0x003f, 0x003f, - 0xe68f, 0x9777, 0x003f, 0x003f, 0x003f, 0x003f, 0xe692, 0x003f, - 0xe695, 0x003f, 0x003f, 0xe693, 0x9554, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe690, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8bde, 0x003f, 0x003f, 0x003f, 0x003f, 0xe694, 0x003f, - 0x003f, 0xe696, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe69a, 0x003f, 0x003f, 0xe697, 0x003f, 0xe699, 0xe698, - 0x003f, 0x003f, 0x003f, 0xfbab, 0x003f, 0x003f, 0xe69b, 0x003f, - 0x8eaf, 0x003f, 0xe69d, 0xe69c, 0x9588, 0x003f, 0x003f, 0xe69f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8c78, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe69e, 0xe6a0, 0x003f, 0x003f, 0xe6a1, - 0x8b63, 0xe3bf, 0x8ff7, 0x003f, 0xe6a2, 0x003f, 0x003f, 0x8cec, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6a3, 0x003f, 0xfbac, - 0xe6a4, 0x003f, 0x003f, 0x8e5d, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9dcc, 0x003f, 0xe6a5, 0x003f, 0xe6a6, 0x003f, - 0x8f51, 0x003f, 0xe6a7, 0xe6a8, 0x003f, 0x003f, 0xe6a9, 0x003f, - 0x003f, 0xe6aa, 0xe6ab, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x8c00 .. 0x8cff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x924a, - 0x003f, 0x003f, 0xe6ac, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6ae, - 0x003f, 0xe6ad, 0x003f, 0x003f, 0x003f, 0x003f, 0x93a4, 0x003f, - 0xe6af, 0x003f, 0x964c, 0x003f, 0xe6b0, 0x003f, 0xe6b1, 0x003f, - 0xe6b2, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6b3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x93d8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8fdb, 0xe6b4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8d8b, 0x98ac, 0xe6b5, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe6b6, 0x955e, 0xe6b7, 0x003f, 0xe6bf, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe6b8, 0x003f, 0x003f, 0xe6ba, 0x003f, 0x003f, - 0x003f, 0xe6b9, 0xe6bb, 0x003f, 0x9665, 0xe6bc, 0xe6bd, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe6be, 0x003f, 0x003f, 0x003f, - 0xe6c0, 0x003f, 0x003f, 0x003f, 0x003f, 0x8a4c, 0x92e5, 0x003f, - 0x9589, 0x8de0, 0x8d76, 0x003f, 0x003f, 0x003f, 0x003f, 0x956e, - 0x89dd, 0x94cc, 0xe6c3, 0x8ad1, 0x90d3, 0xe6c2, 0xe6c7, 0x9299, - 0x96e1, 0x003f, 0xe6c5, 0xe6c6, 0x8b4d, 0x003f, 0xe6c8, 0x9483, - 0x91dd, 0x003f, 0x003f, 0x94ef, 0x935c, 0xe6c4, 0x003f, 0x9666, - 0x89ea, 0xe6ca, 0x9847, 0x92c0, 0x9864, 0x003f, 0x003f, 0x8e91, - 0xe6c9, 0x003f, 0x91af, 0x003f, 0x003f, 0xe6da, 0x9147, 0x003f, - 0x003f, 0x93f6, 0x003f, 0x956f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe6cd, 0x8e5e, 0x8e92, 0x003f, 0x8fdc, 0x003f, - 0x9485, 0x003f, 0x8cab, 0xe6cc, 0xe6cb, 0x003f, 0x958a, 0x003f, - 0x003f, 0x003f, 0x8ebf, 0x003f, 0x003f, 0x9371, 0x003f, 0x003f, - 0xfbad, 0x003f, 0x003f, 0x003f, 0xfbae, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe6cf, 0xe6d0, 0x8d77, 0xe6ce, 0x003f, 0x003f, - /* 0x8d00 .. 0x8dff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0xe6d1, 0xe6d2, 0x003f, 0xe6d4, - 0x91a1, 0x003f, 0xe6d3, 0x8ae4, 0x003f, 0xe6d6, 0x003f, 0xe6d5, - 0xe6d7, 0x003f, 0xfbaf, 0xe6d9, 0xe6db, 0x003f, 0xe6dc, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x90d4, 0x003f, 0x8ecd, 0xe6dd, - 0x003f, 0x003f, 0x003f, 0x8a71, 0x003f, 0xe6de, 0x003f, 0x003f, - 0x9196, 0xe6df, 0x003f, 0xe6e0, 0x958b, 0x003f, 0xfbb0, 0x8b4e, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe6e1, 0x003f, 0x003f, 0x003f, 0x92b4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x897a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe6e2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8eef, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9096, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x91ab, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe6e5, 0x003f, 0x003f, 0x003f, 0xe6e4, 0x003f, - 0x003f, 0x003f, 0xe6e3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe6eb, 0xe6e9, 0x003f, 0x003f, 0xe6e6, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6e8, 0x003f, - 0x003f, 0x003f, 0xe6e7, 0xe6ea, 0x003f, 0x8b97, 0x003f, 0xe6ee, - 0x003f, 0x90d5, 0x003f, 0xe6ef, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8cd7, 0x003f, 0xe6ec, 0xe6ed, 0x003f, 0x003f, 0x003f, 0x9848, - 0x003f, 0x003f, 0x003f, 0x92b5, 0x003f, 0x9148, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe6f0, 0x003f, 0x003f, 0xe6f3, - /* 0x8e00 .. 0x8eff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe6f1, 0xe6f2, 0x9778, 0x003f, 0x003f, 0x003f, 0x003f, 0x93a5, - 0xe6f6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6f4, 0xe6f5, 0xe6f7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe748, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe6fa, 0x003f, 0x003f, 0x003f, 0xe6fb, 0xe6f9, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe6f8, 0x003f, 0x92fb, 0x003f, 0x003f, 0xe740, - 0xe744, 0xe741, 0xe6fc, 0x003f, 0xe742, 0x003f, 0x003f, 0x003f, - 0xe743, 0x003f, 0x003f, 0x003f, 0x003f, 0xe74a, 0x003f, 0x003f, - 0x003f, 0xe745, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x90d6, - 0xe747, 0x003f, 0x003f, 0xe749, 0xe746, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe74c, 0x003f, 0x8f52, 0x003f, 0xe74b, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe74d, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe74e, 0x003f, 0x003f, 0xe751, 0xe750, 0x003f, 0xe74f, - 0x003f, 0x003f, 0xe753, 0xe752, 0x003f, 0x96f4, 0x003f, 0x003f, - 0x003f, 0xe755, 0x003f, 0xe754, 0xe756, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe757, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe759, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe758, 0x9067, 0xe75a, 0x003f, 0x003f, 0x8beb, - 0xe75b, 0xe75d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe75e, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe75f, 0xe75c, 0x003f, - 0xe760, 0x003f, 0x8ed4, 0xe761, 0x8b4f, 0x8c52, 0x003f, 0xfbb2, - 0x003f, 0x003f, 0x8cac, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe762, 0x003f, 0x003f, 0x003f, 0x93ee, - 0x003f, 0x003f, 0x935d, 0xe763, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe766, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8eb2, 0x003f, 0x003f, 0xe765, 0xe764, 0x8c79, 0xe767, 0x003f, - /* 0x8f00 .. 0x8fff */ - 0x003f, 0x003f, 0x003f, 0x8a72, 0x003f, 0xe769, 0x003f, 0x003f, - 0x003f, 0x8dda, 0xe768, 0x003f, 0xe771, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe76b, 0xe76d, 0x95e3, 0xe76a, 0x003f, 0x003f, - 0x003f, 0xe76c, 0x003f, 0xe770, 0xe76e, 0x8b50, 0x003f, 0xe76f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe772, 0x003f, - 0x003f, 0x9479, 0x97d6, 0x003f, 0x003f, 0x003f, 0x003f, 0x8f53, - 0x003f, 0x003f, 0x003f, 0xe773, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9741, 0xe775, 0x003f, 0xe774, 0x003f, 0x003f, 0xe778, 0x9760, - 0x003f, 0x003f, 0xe777, 0x003f, 0x8a8d, 0xe776, 0xe77b, 0x003f, - 0x003f, 0xe77a, 0x003f, 0x003f, 0xe779, 0x9351, 0xe77c, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe77d, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe77e, 0x003f, 0x003f, 0x8d8c, - 0x003f, 0x8c44, 0xe780, 0xe781, 0xe782, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9068, 0xe783, 0x003f, 0x8eab, 0xe784, - 0x003f, 0x003f, 0x003f, 0xe785, 0x003f, 0x003f, 0x003f, 0x999f, - 0x999e, 0x003f, 0x003f, 0x003f, 0x003f, 0xe786, 0xe390, 0xe787, - 0x9243, 0x904a, 0x945f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe788, - 0x003f, 0x003f, 0x95d3, 0x92d2, 0x8d9e, 0x003f, 0x003f, 0x9248, - 0x003f, 0x003f, 0x8949, 0x003f, 0x9698, 0x9076, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8c7d, 0x003f, - 0x003f, 0x8bdf, 0x003f, 0x003f, 0x95d4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe789, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe78b, 0x003f, 0x003f, 0xe78a, 0x89de, 0x003f, - 0x003f, 0x93f4, 0xe78c, 0x9497, 0x003f, 0x9352, 0x003f, 0xe78d, - 0x8f71, 0x003f, 0x003f, 0x003f, 0xe78f, 0x003f, 0x003f, 0x96c0, - 0xe79e, 0xe791, 0xe792, 0x003f, 0x003f, 0x92c7, 0x003f, 0x003f, - /* 0x9000 .. 0x90ff */ - 0x91de, 0x9197, 0x003f, 0x93a6, 0x003f, 0xe790, 0x8b74, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe799, 0x003f, 0xe796, 0xe7a3, 0x93a7, - 0x9280, 0xe793, 0x003f, 0x92fc, 0x9372, 0xe794, 0xe798, 0x9080, - 0x003f, 0x9487, 0x92ca, 0x003f, 0x003f, 0x90c0, 0xe797, 0x91ac, - 0x91a2, 0xe795, 0x88a7, 0x9841, 0x003f, 0x003f, 0x003f, 0xe79a, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x91df, 0x003f, - 0x003f, 0x8f54, 0x9069, 0x003f, 0x003f, 0xe79c, 0xe79b, 0x003f, - 0x88ed, 0xe79d, 0x003f, 0x003f, 0x954e, 0x003f, 0xe7a5, 0x003f, - 0x003f, 0x93d9, 0x908b, 0x003f, 0x003f, 0x9278, 0x003f, 0x8bf6, - 0x003f, 0xe7a4, 0x9756, 0x895e, 0x003f, 0x95d5, 0x89df, 0xe79f, - 0xe7a0, 0xe7a1, 0xe7a2, 0x93b9, 0x9242, 0x88e1, 0xe7a6, 0x003f, - 0xe7a7, 0xeaa1, 0x003f, 0x003f, 0x91bb, 0x003f, 0xe7a8, 0x003f, - 0x8993, 0x916b, 0x003f, 0x8cad, 0x003f, 0x9779, 0x003f, 0xfbb5, - 0xe7a9, 0x934b, 0x003f, 0x003f, 0x003f, 0x9198, 0x8ed5, 0xe7aa, - 0x003f, 0x003f, 0xe7ad, 0x003f, 0x003f, 0x8f85, 0xe7ab, 0x914a, - 0x9149, 0x003f, 0x88e2, 0x003f, 0x97c9, 0xe7af, 0x003f, 0x94f0, - 0xe7b1, 0xe7b0, 0xe7ae, 0xe284, 0x8ad2, 0x003f, 0x003f, 0xe78e, - 0x003f, 0xe7b3, 0xe7b2, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7b4, - 0x003f, 0x9757, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x93df, 0x003f, 0x003f, 0x964d, 0x003f, - 0xe7b5, 0x003f, 0x8ed7, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7b6, - 0x003f, 0xe7b7, 0x003f, 0x003f, 0x003f, 0xe7b8, 0x003f, 0x003f, - 0x9340, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x88e8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x8d78, 0x003f, 0x003f, 0x003f, 0x9859, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe7bc, 0x003f, 0x003f, 0xfbb6, 0x003f, - 0x003f, 0x8c53, 0xe7b9, 0x003f, 0xe7ba, 0x003f, 0x003f, 0x003f, - 0x9594, 0x003f, 0x003f, 0x003f, 0x003f, 0x8a73, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9758, 0x003f, 0x8bbd, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9373, 0x003f, 0x003f, - /* 0x9100 .. 0x91ff */ - 0x003f, 0x003f, 0xe7bd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe7be, 0x003f, 0x003f, 0xfbb8, 0x003f, 0x003f, - 0x003f, 0xe7bf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbb9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9341, 0x003f, 0x003f, - 0xe7c1, 0x003f, 0xe7c0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x93d1, 0xe7c2, 0x8f55, 0x8ede, 0x947a, 0x9291, 0x003f, - 0x003f, 0x003f, 0x8ef0, 0x003f, 0x908c, 0x003f, 0xe7c3, 0x003f, - 0xe7c4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x907c, 0xe7c5, 0x003f, 0xe7c6, 0x003f, 0x003f, - 0x003f, 0xe7c7, 0x978f, 0x003f, 0x8f56, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe7c9, 0xe7c8, 0x003f, 0x8d79, 0x003f, 0x8d93, - 0x8e5f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe7cc, 0x003f, 0x003f, 0x003f, 0x003f, 0x8f86, - 0x003f, 0xe7cb, 0x003f, 0xe7ca, 0x003f, 0x91e7, 0x003f, 0x003f, - 0x8ced, 0x003f, 0x90c1, 0x003f, 0x003f, 0x003f, 0x003f, 0x94ae, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8f58, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe7cd, 0x003f, 0x8fdd, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe7d0, 0xe7ce, 0x003f, 0x003f, 0x003f, 0xe7cf, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe7d2, 0xe7d1, 0x003f, 0x003f, - 0x8ff8, 0x003f, 0xe7d3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe7d4, 0xe7d5, 0x003f, 0x003f, 0x003f, 0x003f, 0x94ce, 0x8dd1, - 0x8edf, 0xe7d6, 0x003f, 0xe7d7, 0x97a2, 0x8f64, 0x96ec, 0x97ca, - 0xe7d8, 0x8be0, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7d9, 0xfbbb, - 0x9342, 0x003f, 0xfbba, 0xe7dc, 0x8a98, 0x906a, 0xfbbc, 0xe7da, - 0x003f, 0xe7db, 0x003f, 0x92de, 0xfbbf, 0xfbc0, 0x9674, 0x8bfa, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbbd, 0xfbbe, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7de, 0xe7df, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe7dd, 0x003f, 0x003f, 0xe7e1, - /* 0x9200 .. 0x92ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbc1, 0x003f, - 0x003f, 0x003f, 0xfbc3, 0x003f, 0x003f, 0x93dd, 0x8a62, 0x003f, - 0xfbc2, 0xe7e5, 0x003f, 0x003f, 0xe7e2, 0xe7e4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7e0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe86e, 0x003f, 0x003f, 0xe7e3, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x97e9, 0x003f, 0x003f, 0x8cd8, - 0x003f, 0xfbca, 0xfbc4, 0x003f, 0xfbc6, 0x003f, 0x003f, 0xe7ed, - 0xfbc5, 0x003f, 0x003f, 0x003f, 0x9353, 0xe7e8, 0x003f, 0x003f, - 0xe7eb, 0xe7e9, 0x003f, 0xe7ee, 0x003f, 0x003f, 0xfbc7, 0x003f, - 0xe7ef, 0xfbc9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7e7, - 0x003f, 0xfbc8, 0xe7f4, 0x8994, 0x003f, 0x003f, 0xe7e6, 0x003f, - 0x003f, 0x003f, 0x94ab, 0x003f, 0xe7ea, 0x003f, 0x8fde, 0xfbcb, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8d7a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbcd, - 0xfbce, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9667, 0x003f, - 0x8be2, 0x003f, 0x003f, 0x8f65, 0x003f, 0x93ba, 0x003f, 0x003f, - 0xfa5f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x914c, 0x003f, 0xe7f2, 0x003f, 0xe7ec, 0xe7f1, 0x003f, - 0x96c1, 0x003f, 0x92b6, 0xe7f3, 0xe7f0, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbcc, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x914b, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7f7, - 0x003f, 0xe7f6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7f5, - 0xfbd2, 0x003f, 0x964e, 0xfbd6, 0x003f, 0xfbd4, 0x003f, 0xfbd0, - 0x003f, 0xfbd1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xfbd5, 0x003f, 0x003f, 0x003f, 0x8f9b, 0x003f, 0x003f, 0xfbcf, - 0x003f, 0xe7f8, 0x95dd, 0x003f, 0x003f, 0x8973, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9565, 0x9292, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8b98, 0xfa65, 0xe7fa, 0xfbd9, 0x8d7c, 0x003f, 0x003f, 0xfbdc, - /* 0x9300 .. 0x93ff */ - 0x003f, 0x003f, 0xfbde, 0x003f, 0x003f, 0x003f, 0x8e4b, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7f9, - 0x908d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x908e, 0xe840, 0xe842, 0x003f, 0x003f, 0xfbdd, 0xfbdb, 0x003f, - 0x8ff9, 0xfbd8, 0xe841, 0xe843, 0x003f, 0xfbd7, 0x8bd1, 0x003f, - 0x9564, 0x003f, 0x003f, 0x8ee0, 0x9842, 0x003f, 0xe7fc, 0x8df6, - 0x003f, 0x003f, 0x985e, 0x003f, 0x003f, 0xe845, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe844, 0xe846, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe7fb, 0x003f, 0x003f, 0x003f, - 0xfa5e, 0x003f, 0x003f, 0x93e7, 0x003f, 0x9374, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x92d5, 0x003f, 0xe84b, 0xfbe0, - 0x003f, 0x003f, 0x003f, 0x9262, 0xe847, 0x003f, 0x003f, 0x003f, - 0xe848, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8c4c, 0x003f, 0xe84a, 0x003f, - 0xfbdf, 0x003f, 0x003f, 0x003f, 0x003f, 0x8cae, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe849, 0x003f, 0x8fdf, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8a99, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe84f, 0x003f, 0x8dbd, 0x9199, - 0x003f, 0x003f, 0x92c8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xfbe1, 0x003f, 0x003f, 0x8a5a, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe84d, 0xe84e, 0x92c1, 0x003f, - 0xe84c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe850, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe856, 0x003f, 0x003f, 0xfbe2, 0x003f, - 0xe859, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe858, 0x934c, 0x003f, 0x003f, 0x003f, 0x003f, 0xe851, 0xe852, - 0xe855, 0x003f, 0x003f, 0x003f, 0x003f, 0xe857, 0xfbe3, 0x003f, - 0x003f, 0x8bbe, 0x003f, 0x003f, 0xe85a, 0xe854, 0x003f, 0x003f, - 0xe853, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xfbe4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9400 .. 0x94ff */ - 0x003f, 0x003f, 0x003f, 0xe85e, 0x003f, 0x003f, 0x003f, 0xe85f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe860, 0x003f, 0x003f, 0xe85d, 0xe85c, 0x003f, 0x003f, 0x003f, - 0x8fe0, 0x93a8, 0xe85b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe864, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe862, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xfbe5, 0x003f, 0x003f, 0x003f, 0xe863, 0xe861, 0x003f, - 0x91f6, 0x003f, 0xe865, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe866, 0x003f, 0x003f, 0xe868, 0xfbe6, 0x003f, 0x003f, - 0xfbe7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8ad3, 0xe867, 0x96f8, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe873, 0xe869, 0x003f, 0x003f, 0xe86c, 0x003f, - 0xe86a, 0x003f, 0xe86b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe86d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe86f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe870, 0x003f, 0xe871, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe874, 0xe872, 0xe875, 0xe877, - 0x003f, 0xe876, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9500 .. 0x95ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x92b7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x96e5, 0x003f, 0xe878, 0x914d, 0x003f, 0x003f, 0x003f, 0xe879, - 0x003f, 0x95c2, 0xe87a, 0x8a4a, 0x003f, 0x003f, 0x003f, 0x895b, - 0x003f, 0x8ad5, 0xfbe8, 0x8ad4, 0xe87b, 0x003f, 0xe87c, 0x003f, - 0xe87d, 0xe87e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe880, 0x003f, 0x8ad6, 0x8a74, 0x8d7d, 0x94b4, 0x003f, 0xe882, - 0xe881, 0x003f, 0x003f, 0x003f, 0x003f, 0xe883, 0x003f, 0x003f, - 0x003f, 0x003f, 0x897b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe886, 0x003f, 0xe885, 0xe884, 0x003f, 0xe887, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe88a, 0x003f, 0x003f, 0x003f, 0x88c5, - 0x003f, 0x003f, 0xe888, 0x003f, 0xe88c, 0xe88b, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe88e, 0xe88d, 0xe88f, 0x003f, - 0x93ac, 0x003f, 0x003f, 0x003f, 0xe890, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe891, 0xe893, 0x003f, 0x003f, 0xe892, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9600 .. 0x96ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x958c, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe894, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe895, 0x003f, 0x8de3, 0x003f, 0x003f, 0x003f, 0xe896, 0xe897, - 0x003f, 0x003f, 0x9668, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x916a, 0x003f, 0x003f, 0x003f, 0x88a2, - 0x91c9, 0x003f, 0xe898, 0x003f, 0x958d, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe89b, 0xe899, 0x8d7e, 0x003f, 0xe89a, - 0x8cc0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x95c3, 0xe89d, 0xe89f, 0xe89e, 0xe8a0, - 0x003f, 0x003f, 0x8940, 0x9077, 0x8f9c, 0x8ad7, 0xe8a1, 0x003f, - 0x003f, 0x003f, 0x9486, 0x003f, 0xe8a3, 0x003f, 0x003f, 0x003f, - 0x8941, 0x003f, 0xe8a2, 0x92c2, 0x003f, 0x97cb, 0x93a9, 0xe89c, - 0x97a4, 0x003f, 0x8caf, 0x003f, 0x003f, 0x977a, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8bf7, 0x97b2, 0x003f, - 0x8c47, 0x003f, 0x91e0, 0xe440, 0x003f, 0xe8a4, 0x8a4b, 0x908f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8a75, 0xe8a6, 0x003f, 0xe8a7, - 0xe8a5, 0x8c84, 0x003f, 0x8ddb, 0x8fe1, 0xfbeb, 0x003f, 0x003f, - 0x8942, 0x003f, 0x003f, 0x97d7, 0x003f, 0x003f, 0x003f, 0xe8a9, - 0xe7ac, 0x003f, 0xe8a8, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbec, - 0xe8ac, 0xe8aa, 0xe8ab, 0x003f, 0xe8ad, 0x003f, 0xe8ae, 0x97ea, - 0xe8af, 0xe8b0, 0x003f, 0x90c7, 0x94b9, 0x003f, 0x003f, 0x003f, - 0x909d, 0x8ae5, 0x003f, 0x003f, 0x9759, 0x89eb, 0x8f57, 0x8cd9, - 0x003f, 0xe8b3, 0x003f, 0xe8b2, 0x8e93, 0xe8b4, 0xe8b1, 0x003f, - 0x003f, 0x8e47, 0x003f, 0x003f, 0x003f, 0xe8b8, 0xe5ab, 0x003f, - 0x003f, 0x99d4, 0x003f, 0x9097, 0xe8b6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x97a3, 0x93ef, 0x003f, 0x003f, 0x003f, 0x003f, - 0x894a, 0x003f, 0x90e1, 0x8eb4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x95b5, 0x003f, 0x895f, 0x003f, 0x003f, 0x003f, 0x97eb, 0x978b, - 0x003f, 0xe8b9, 0x003f, 0x9364, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9700 .. 0x97ff */ - 0x8ef9, 0x003f, 0x003f, 0x003f, 0xe8ba, 0x003f, 0xe8bb, 0x906b, - 0xe8bc, 0x003f, 0x97ec, 0x003f, 0x003f, 0xe8b7, 0xe8be, 0xe8c0, - 0x003f, 0xe8bf, 0x003f, 0xe8bd, 0x003f, 0x003f, 0xe8c1, 0x003f, - 0x003f, 0xe8c2, 0x003f, 0x003f, 0x919a, 0x003f, 0x89e0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe8c3, 0x003f, 0x003f, 0x96b6, - 0x003f, 0x003f, 0xe8c4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe8c5, 0x003f, 0x9849, 0xfbed, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9e50, 0xe8c6, 0x003f, 0xfbee, 0x003f, 0xe8c7, 0xe8c8, 0x003f, - 0x003f, 0x003f, 0xe8cc, 0xfbef, 0xe8c9, 0x003f, 0xe8ca, 0x003f, - 0xe8cb, 0xe8cd, 0x003f, 0x003f, 0x003f, 0xfbf0, 0x003f, 0xfbf1, - 0x003f, 0xfbf2, 0x90c2, 0x003f, 0x003f, 0xfbf3, 0x96f5, 0x003f, - 0x003f, 0x90c3, 0x003f, 0x003f, 0xe8ce, 0x003f, 0x94f1, 0x003f, - 0xe8cf, 0xea72, 0x96ca, 0x003f, 0xe8d0, 0x003f, 0xe8d1, 0x003f, - 0xe8d2, 0x8a76, 0x003f, 0xe8d4, 0x003f, 0x9078, 0x003f, 0x003f, - 0x003f, 0xe8d5, 0x003f, 0x003f, 0x8c43, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe8d6, 0xe8da, 0x003f, 0xe8d8, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe8d9, 0x003f, 0x003f, 0x8a93, 0xe8d7, 0xe8db, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe8dc, 0x003f, 0x88c6, 0x003f, 0xe8dd, - 0xe8de, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8fe2, 0x003f, 0x003f, 0x003f, 0xe8df, 0x003f, 0x003f, 0x003f, - 0x8b66, 0x003f, 0x003f, 0xe8e2, 0x003f, 0x003f, 0xe8e1, 0x003f, - 0xe8e0, 0x003f, 0x003f, 0xe691, 0x003f, 0x95da, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe8e3, 0xe8e4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe8e5, 0x003f, 0x003f, 0xe8e6, 0x003f, - 0xe8e7, 0x003f, 0x003f, 0xe8e8, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8ad8, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe8e9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8ea, 0x9442, 0x003f, - 0x003f, 0x003f, 0xe8ec, 0x89b9, 0x003f, 0xe8ef, 0xe8ee, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8943, 0x003f, 0x003f, 0x003f, 0x8bbf, - /* 0x9800 .. 0x98ff */ - 0x003f, 0x95c5, 0x92b8, 0x8da0, 0x003f, 0x8d80, 0x8f87, 0x003f, - 0x907b, 0x003f, 0x003f, 0x003f, 0xe8f1, 0x003f, 0x003f, 0xe8f0, - 0x9761, 0x8ae6, 0x94d0, 0x93da, 0x003f, 0x003f, 0x003f, 0x909c, - 0x97cc, 0x003f, 0x8c7a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe8f4, 0x003f, 0x003f, 0xe8f3, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x966a, 0x93aa, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x896f, 0x003f, 0x003f, 0xe8f5, - 0xe8f2, 0x003f, 0x003f, 0x9570, 0x978a, 0xe8f6, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8f7, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe8f9, 0x91e8, 0x8a7a, 0x8a7b, 0xe8f8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8ae7, 0x8cb0, 0x003f, 0xfbf4, - 0x8ae8, 0x003f, 0x003f, 0x935e, 0x003f, 0x003f, 0x97de, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbf5, 0x003f, 0x8cda, - 0x003f, 0x003f, 0x003f, 0xe8fa, 0x003f, 0x003f, 0x003f, 0xe8fb, - 0xe8fc, 0xe940, 0x003f, 0xe942, 0xe941, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9597, 0x003f, 0xe943, 0x003f, 0x003f, 0x003f, 0x003f, 0xe944, - 0x003f, 0xe945, 0x003f, 0x003f, 0x003f, 0x003f, 0xe946, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe948, 0xe947, 0x003f, 0xe949, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x94f2, 0xe3ca, 0x003f, 0x003f, 0x9048, - 0x003f, 0x003f, 0x8b51, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe94a, 0x003f, 0xe94b, 0x003f, 0x99aa, 0x9f5a, 0x94d1, - 0x003f, 0x003f, 0x88f9, 0x003f, 0x88b9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x8e94, 0x964f, 0x8ffc, 0x003f, - /* 0x9900 .. 0x99ff */ - 0x003f, 0x003f, 0x003f, 0xe94c, 0x003f, 0x96dd, 0x003f, 0x003f, - 0x003f, 0xe94d, 0x977b, 0x003f, 0x8961, 0x003f, 0x003f, 0x003f, - 0x8e60, 0x003f, 0xe94e, 0x89ec, 0xe94f, 0x003f, 0x003f, 0x003f, - 0xe950, 0x003f, 0x003f, 0x003f, 0x003f, 0xe952, 0xe953, 0x003f, - 0xe955, 0xe951, 0x003f, 0x003f, 0xe954, 0x003f, 0x003f, 0xfbf8, - 0x8ad9, 0x003f, 0x003f, 0x003f, 0xe956, 0x003f, 0xe957, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe958, 0xe959, 0x003f, - 0x003f, 0x003f, 0xe95a, 0x003f, 0x003f, 0xe95c, 0x003f, 0x003f, - 0x003f, 0xe95b, 0x003f, 0xe95e, 0xe961, 0x003f, 0x003f, 0x003f, - 0xe95d, 0xe95f, 0xe960, 0x003f, 0x003f, 0xe962, 0x003f, 0x8bc0, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8ef1, 0xe963, - 0xe964, 0x8d81, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbfa, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe965, 0x003f, 0x003f, - 0x8a5d, 0x003f, 0x003f, 0x003f, 0x946e, 0xe966, 0xe967, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9279, 0x93e9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe968, 0x003f, 0x003f, 0x003f, - 0x003f, 0x949d, 0x003f, 0x003f, 0x91ca, 0x8977, 0x8bec, 0x003f, - 0x8bed, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9293, 0xe96d, 0x8bee, 0x003f, 0x003f, 0x89ed, 0x003f, 0x003f, - 0xe96c, 0x003f, 0x003f, 0xe96a, 0x003f, 0xe96b, 0x003f, 0xe969, - 0x003f, 0x003f, 0xe977, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe96e, 0xe96f, 0x003f, - 0x003f, 0xe970, 0xe971, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe973, 0x003f, 0x003f, 0xe972, 0x003f, 0x003f, 0x003f, 0x8f78, - /* 0x9a00 .. 0x9aff */ - 0x003f, 0xe974, 0x003f, 0x003f, 0x003f, 0xe976, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8b52, 0xe975, - 0x003f, 0x003f, 0x919b, 0x8cb1, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe978, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x91cb, 0x003f, 0x003f, 0xe979, 0x003f, 0x003f, 0x003f, 0x003f, - 0x93ab, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe97a, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe980, 0x003f, - 0xe97d, 0x003f, 0xe97c, 0xe97e, 0x003f, 0xe97b, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe982, 0xfbfb, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe981, 0x003f, 0xe984, - 0x003f, 0x003f, 0x8bc1, 0xe983, 0x003f, 0x003f, 0x003f, 0xe985, - 0x003f, 0x003f, 0xe986, 0x003f, 0xe988, 0xe987, 0x003f, 0x003f, - 0x003f, 0xe989, 0xe98b, 0xe98a, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8d9c, 0x003f, 0x003f, 0x003f, 0x003f, 0xe98c, 0x003f, 0x003f, - 0xe98d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8a5b, 0x003f, 0x003f, 0x003f, 0xe98e, 0x003f, 0x003f, 0x003f, - 0xe98f, 0x003f, 0x003f, 0x003f, 0x9091, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe990, - 0x003f, 0xe991, 0x003f, 0xe992, 0xe993, 0x003f, 0x003f, 0x003f, - 0x8d82, 0xfbfc, 0x003f, 0x003f, 0xfc40, 0x003f, 0xe994, 0xe995, - 0x003f, 0x003f, 0xe996, 0xe997, 0x003f, 0x003f, 0xe998, 0x003f, - 0x003f, 0x003f, 0x94af, 0xe99a, 0x003f, 0x9545, 0xe99b, 0xe999, - 0x003f, 0xe99d, 0x003f, 0x003f, 0xe99c, 0x003f, 0x003f, 0xe99e, - 0x003f, 0x003f, 0x003f, 0xe99f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9b00 .. 0x9bff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9a0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe9a1, 0x003f, 0xe9a2, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9a3, - 0x003f, 0x003f, 0xe9a4, 0xe9a5, 0x003f, 0xe9a6, 0x003f, 0xe9a7, - 0xe9a8, 0xe9a9, 0xe9aa, 0x003f, 0x003f, 0x003f, 0xe9ab, 0xe9ac, - 0x003f, 0x9f54, 0xe9ad, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe2f6, 0x8b53, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8a40, 0x8db0, 0xe9af, 0xe9ae, 0x96a3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9b1, 0xe9b2, 0xe9b0, - 0x003f, 0xe9b3, 0x003f, 0x003f, 0x9682, 0x003f, 0x003f, 0x003f, - 0xe9b4, 0x003f, 0x8b9b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9844, - 0x003f, 0x003f, 0xfc42, 0x003f, 0xe9b5, 0xfc41, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe9b7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x88bc, 0xfc43, - 0x003f, 0xe9b8, 0x95a9, 0xe9b6, 0x003f, 0x003f, 0xe9b9, 0xe9ba, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9bb, - 0xe9bc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe9bd, 0x003f, 0x968e, 0x8e4c, 0x003f, 0x8df8, 0x914e, 0x003f, - 0x003f, 0xfc44, 0x003f, 0x003f, 0xe9be, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe9c1, 0x003f, 0xfc45, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe9bf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9c2, 0x003f, - 0x003f, 0x8cef, 0xe9c0, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9c3, - 0x003f, 0xe9c4, 0xe9c5, 0x003f, 0xe9c9, 0x003f, 0x8e49, 0x003f, - 0x003f, 0x003f, 0x003f, 0x91e2, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe9ca, 0xe9c7, 0xe9c6, 0xe9c8, 0x003f, 0x003f, 0x003f, - 0x8c7e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe9ce, 0xe9cd, 0xe9cc, 0x003f, 0x003f, 0x88b1, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9c00 .. 0x9cff */ - 0xfc46, 0x003f, 0x003f, 0x003f, 0xe9d8, 0x003f, 0xe9d4, 0x003f, - 0xe9d5, 0xe9d1, 0xe9d7, 0x003f, 0xe9d3, 0x8a82, 0x003f, 0x003f, - 0x986b, 0x003f, 0xe9d6, 0xe9d2, 0xe9d0, 0xe9cf, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe9da, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe9dd, 0x003f, 0x003f, 0xe9dc, 0xe9db, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9568, 0xe9d9, 0x88f1, - 0xe9de, 0x003f, 0xe9e0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8a8f, 0xe9cb, 0x8956, 0x003f, 0x003f, 0xe9e2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9e1, 0xe9df, - 0x924c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x9690, 0x003f, 0x003f, 0x003f, 0x003f, 0x97d8, - 0x003f, 0x003f, 0xe9e3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe9e4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9e5, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9e6, 0x003f, - 0xe9e7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x92b9, 0x003f, 0xe9e8, - 0x003f, 0x94b5, 0x003f, 0xe9ed, 0xe9e9, 0x003f, 0x003f, 0x003f, - 0xe9ea, 0x003f, 0x003f, 0x9650, 0x96c2, 0x003f, 0x93ce, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9d00 .. 0x9dff */ - 0x003f, 0x003f, 0x003f, 0xe9ee, 0x003f, 0x003f, 0xe9ef, 0x93bc, - 0xe9ec, 0xe9eb, 0x003f, 0x003f, 0x003f, 0x003f, 0x89a8, 0x003f, - 0x003f, 0x003f, 0xe9f7, 0x003f, 0x003f, 0xe9f6, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8995, 0x003f, 0x003f, 0x003f, 0xe9f4, - 0x003f, 0x003f, 0x003f, 0xe9f3, 0x003f, 0x003f, 0xe9f1, 0x003f, - 0x8a9b, 0x003f, 0xe9f0, 0x8eb0, 0x89a7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8d83, 0x003f, 0x003f, 0xe9fa, 0xe9f9, - 0x003f, 0xe9f8, 0x003f, 0x003f, 0xe9f5, 0x003f, 0xe9fb, 0x003f, - 0xe9fc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xea44, 0xea43, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xea45, 0x003f, 0x003f, 0x894c, 0xea40, 0xea41, 0x003f, - 0x8d94, 0x96b7, 0x003f, 0x003f, 0xea42, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfc48, 0x9651, 0x003f, 0x003f, 0xea4a, - 0xfc47, 0x003f, 0xea46, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xea4b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xea48, - 0x003f, 0xea47, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x8c7b, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xea4c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xea4d, 0x003f, 0x003f, 0x003f, - 0x003f, 0xea4e, 0x003f, 0xea49, 0x003f, 0x003f, 0x003f, 0xe9f2, - 0x003f, 0x003f, 0xea4f, 0x003f, 0x92df, 0x003f, 0x003f, 0x003f, - 0xea53, 0x003f, 0xea54, 0xea52, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xea51, 0xea57, 0x003f, 0xea50, 0x003f, 0xea55, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xea56, - 0x003f, 0x003f, 0x003f, 0xea59, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xea58, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xea5b, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xea5c, 0x003f, 0xea5d, - 0x003f, 0x003f, 0x9868, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xea5a, 0x91e9, 0x8deb, 0x003f, 0x003f, 0xea5e, 0x003f, 0x003f, - /* 0x9e00 .. 0x9eff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xfc4a, 0xea5f, 0xea60, 0x003f, 0x003f, 0xea61, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xea62, 0x003f, 0x003f, - 0x8cb2, 0xea63, 0x003f, 0x003f, 0x003f, 0xea64, 0x003f, 0x8ead, - 0x003f, 0xea65, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xea66, 0x003f, 0x003f, 0xea67, 0xea68, 0x003f, 0x003f, 0x003f, - 0x003f, 0xea6b, 0xea69, 0x985b, 0x003f, 0xea6a, 0x003f, 0x97ed, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xea6c, 0x003f, 0x97d9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xea6d, 0x949e, 0x003f, - 0x003f, 0xea6e, 0xea70, 0x003f, 0x003f, 0xea71, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xea6f, 0x8d8d, 0x96cb, 0x9683, 0x9bf5, 0x003f, 0x9f80, 0x969b, - 0x003f, 0x003f, 0x003f, 0x003f, 0x89a9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xea73, 0x8b6f, 0xea74, 0xea75, - 0xea76, 0xfc4b, 0x8d95, 0x003f, 0xea77, 0x003f, 0x003f, 0x003f, - 0xe0d2, 0x96d9, 0x003f, 0x91e1, 0xea78, 0xea7a, 0xea79, 0x003f, - 0xea7b, 0x003f, 0x003f, 0x003f, 0x003f, 0xea7c, 0x003f, 0x003f, - 0xea7d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xea7e, - 0x003f, 0x003f, 0x003f, 0x003f, 0xea80, 0x003f, 0xea81, 0xea82, - 0x003f, 0xea83, 0x003f, 0xea84, 0xea85, 0xea86, 0x003f, 0x003f, - /* 0x9f00 .. 0x9fff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xea87, - 0xea88, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x9343, 0x003f, - 0x003f, 0x003f, 0x003f, 0x8cdb, 0x003f, 0xea8a, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x916c, 0xea8b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xea8c, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x9540, 0x003f, 0x003f, 0xea8d, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xea8e, 0xe256, 0x003f, 0x003f, 0xe6d8, 0xe8eb, - 0x003f, 0x003f, 0xea8f, 0x003f, 0xea90, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xea92, - 0xea93, 0xea94, 0x97ee, 0xea91, 0x003f, 0x003f, 0xea95, 0xea96, - 0x003f, 0x003f, 0xea98, 0x003f, 0xea97, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xea9a, 0x003f, 0x003f, 0x003f, 0xea9b, 0xea99, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x97b4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xea9c, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xea9d, 0xe273, 0x003f, 0x003f, - 0xea9e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xe000 .. 0xe0ff */ - 0xf040, 0xf041, 0xf042, 0xf043, 0xf044, 0xf045, 0xf046, 0xf047, - 0xf048, 0xf049, 0xf04a, 0xf04b, 0xf04c, 0xf04d, 0xf04e, 0xf04f, - 0xf050, 0xf051, 0xf052, 0xf053, 0xf054, 0xf055, 0xf056, 0xf057, - 0xf058, 0xf059, 0xf05a, 0xf05b, 0xf05c, 0xf05d, 0xf05e, 0xf05f, - 0xf060, 0xf061, 0xf062, 0xf063, 0xf064, 0xf065, 0xf066, 0xf067, - 0xf068, 0xf069, 0xf06a, 0xf06b, 0xf06c, 0xf06d, 0xf06e, 0xf06f, - 0xf070, 0xf071, 0xf072, 0xf073, 0xf074, 0xf075, 0xf076, 0xf077, - 0xf078, 0xf079, 0xf07a, 0xf07b, 0xf07c, 0xf07d, 0xf07e, 0xf080, - 0xf081, 0xf082, 0xf083, 0xf084, 0xf085, 0xf086, 0xf087, 0xf088, - 0xf089, 0xf08a, 0xf08b, 0xf08c, 0xf08d, 0xf08e, 0xf08f, 0xf090, - 0xf091, 0xf092, 0xf093, 0xf094, 0xf095, 0xf096, 0xf097, 0xf098, - 0xf099, 0xf09a, 0xf09b, 0xf09c, 0xf09d, 0xf09e, 0xf09f, 0xf0a0, - 0xf0a1, 0xf0a2, 0xf0a3, 0xf0a4, 0xf0a5, 0xf0a6, 0xf0a7, 0xf0a8, - 0xf0a9, 0xf0aa, 0xf0ab, 0xf0ac, 0xf0ad, 0xf0ae, 0xf0af, 0xf0b0, - 0xf0b1, 0xf0b2, 0xf0b3, 0xf0b4, 0xf0b5, 0xf0b6, 0xf0b7, 0xf0b8, - 0xf0b9, 0xf0ba, 0xf0bb, 0xf0bc, 0xf0bd, 0xf0be, 0xf0bf, 0xf0c0, - 0xf0c1, 0xf0c2, 0xf0c3, 0xf0c4, 0xf0c5, 0xf0c6, 0xf0c7, 0xf0c8, - 0xf0c9, 0xf0ca, 0xf0cb, 0xf0cc, 0xf0cd, 0xf0ce, 0xf0cf, 0xf0d0, - 0xf0d1, 0xf0d2, 0xf0d3, 0xf0d4, 0xf0d5, 0xf0d6, 0xf0d7, 0xf0d8, - 0xf0d9, 0xf0da, 0xf0db, 0xf0dc, 0xf0dd, 0xf0de, 0xf0df, 0xf0e0, - 0xf0e1, 0xf0e2, 0xf0e3, 0xf0e4, 0xf0e5, 0xf0e6, 0xf0e7, 0xf0e8, - 0xf0e9, 0xf0ea, 0xf0eb, 0xf0ec, 0xf0ed, 0xf0ee, 0xf0ef, 0xf0f0, - 0xf0f1, 0xf0f2, 0xf0f3, 0xf0f4, 0xf0f5, 0xf0f6, 0xf0f7, 0xf0f8, - 0xf0f9, 0xf0fa, 0xf0fb, 0xf0fc, 0xf140, 0xf141, 0xf142, 0xf143, - 0xf144, 0xf145, 0xf146, 0xf147, 0xf148, 0xf149, 0xf14a, 0xf14b, - 0xf14c, 0xf14d, 0xf14e, 0xf14f, 0xf150, 0xf151, 0xf152, 0xf153, - 0xf154, 0xf155, 0xf156, 0xf157, 0xf158, 0xf159, 0xf15a, 0xf15b, - 0xf15c, 0xf15d, 0xf15e, 0xf15f, 0xf160, 0xf161, 0xf162, 0xf163, - 0xf164, 0xf165, 0xf166, 0xf167, 0xf168, 0xf169, 0xf16a, 0xf16b, - 0xf16c, 0xf16d, 0xf16e, 0xf16f, 0xf170, 0xf171, 0xf172, 0xf173, - 0xf174, 0xf175, 0xf176, 0xf177, 0xf178, 0xf179, 0xf17a, 0xf17b, - 0xf17c, 0xf17d, 0xf17e, 0xf180, 0xf181, 0xf182, 0xf183, 0xf184, - /* 0xe100 .. 0xe1ff */ - 0xf185, 0xf186, 0xf187, 0xf188, 0xf189, 0xf18a, 0xf18b, 0xf18c, - 0xf18d, 0xf18e, 0xf18f, 0xf190, 0xf191, 0xf192, 0xf193, 0xf194, - 0xf195, 0xf196, 0xf197, 0xf198, 0xf199, 0xf19a, 0xf19b, 0xf19c, - 0xf19d, 0xf19e, 0xf19f, 0xf1a0, 0xf1a1, 0xf1a2, 0xf1a3, 0xf1a4, - 0xf1a5, 0xf1a6, 0xf1a7, 0xf1a8, 0xf1a9, 0xf1aa, 0xf1ab, 0xf1ac, - 0xf1ad, 0xf1ae, 0xf1af, 0xf1b0, 0xf1b1, 0xf1b2, 0xf1b3, 0xf1b4, - 0xf1b5, 0xf1b6, 0xf1b7, 0xf1b8, 0xf1b9, 0xf1ba, 0xf1bb, 0xf1bc, - 0xf1bd, 0xf1be, 0xf1bf, 0xf1c0, 0xf1c1, 0xf1c2, 0xf1c3, 0xf1c4, - 0xf1c5, 0xf1c6, 0xf1c7, 0xf1c8, 0xf1c9, 0xf1ca, 0xf1cb, 0xf1cc, - 0xf1cd, 0xf1ce, 0xf1cf, 0xf1d0, 0xf1d1, 0xf1d2, 0xf1d3, 0xf1d4, - 0xf1d5, 0xf1d6, 0xf1d7, 0xf1d8, 0xf1d9, 0xf1da, 0xf1db, 0xf1dc, - 0xf1dd, 0xf1de, 0xf1df, 0xf1e0, 0xf1e1, 0xf1e2, 0xf1e3, 0xf1e4, - 0xf1e5, 0xf1e6, 0xf1e7, 0xf1e8, 0xf1e9, 0xf1ea, 0xf1eb, 0xf1ec, - 0xf1ed, 0xf1ee, 0xf1ef, 0xf1f0, 0xf1f1, 0xf1f2, 0xf1f3, 0xf1f4, - 0xf1f5, 0xf1f6, 0xf1f7, 0xf1f8, 0xf1f9, 0xf1fa, 0xf1fb, 0xf1fc, - 0xf240, 0xf241, 0xf242, 0xf243, 0xf244, 0xf245, 0xf246, 0xf247, - 0xf248, 0xf249, 0xf24a, 0xf24b, 0xf24c, 0xf24d, 0xf24e, 0xf24f, - 0xf250, 0xf251, 0xf252, 0xf253, 0xf254, 0xf255, 0xf256, 0xf257, - 0xf258, 0xf259, 0xf25a, 0xf25b, 0xf25c, 0xf25d, 0xf25e, 0xf25f, - 0xf260, 0xf261, 0xf262, 0xf263, 0xf264, 0xf265, 0xf266, 0xf267, - 0xf268, 0xf269, 0xf26a, 0xf26b, 0xf26c, 0xf26d, 0xf26e, 0xf26f, - 0xf270, 0xf271, 0xf272, 0xf273, 0xf274, 0xf275, 0xf276, 0xf277, - 0xf278, 0xf279, 0xf27a, 0xf27b, 0xf27c, 0xf27d, 0xf27e, 0xf280, - 0xf281, 0xf282, 0xf283, 0xf284, 0xf285, 0xf286, 0xf287, 0xf288, - 0xf289, 0xf28a, 0xf28b, 0xf28c, 0xf28d, 0xf28e, 0xf28f, 0xf290, - 0xf291, 0xf292, 0xf293, 0xf294, 0xf295, 0xf296, 0xf297, 0xf298, - 0xf299, 0xf29a, 0xf29b, 0xf29c, 0xf29d, 0xf29e, 0xf29f, 0xf2a0, - 0xf2a1, 0xf2a2, 0xf2a3, 0xf2a4, 0xf2a5, 0xf2a6, 0xf2a7, 0xf2a8, - 0xf2a9, 0xf2aa, 0xf2ab, 0xf2ac, 0xf2ad, 0xf2ae, 0xf2af, 0xf2b0, - 0xf2b1, 0xf2b2, 0xf2b3, 0xf2b4, 0xf2b5, 0xf2b6, 0xf2b7, 0xf2b8, - 0xf2b9, 0xf2ba, 0xf2bb, 0xf2bc, 0xf2bd, 0xf2be, 0xf2bf, 0xf2c0, - 0xf2c1, 0xf2c2, 0xf2c3, 0xf2c4, 0xf2c5, 0xf2c6, 0xf2c7, 0xf2c8, - /* 0xe200 .. 0xe2ff */ - 0xf2c9, 0xf2ca, 0xf2cb, 0xf2cc, 0xf2cd, 0xf2ce, 0xf2cf, 0xf2d0, - 0xf2d1, 0xf2d2, 0xf2d3, 0xf2d4, 0xf2d5, 0xf2d6, 0xf2d7, 0xf2d8, - 0xf2d9, 0xf2da, 0xf2db, 0xf2dc, 0xf2dd, 0xf2de, 0xf2df, 0xf2e0, - 0xf2e1, 0xf2e2, 0xf2e3, 0xf2e4, 0xf2e5, 0xf2e6, 0xf2e7, 0xf2e8, - 0xf2e9, 0xf2ea, 0xf2eb, 0xf2ec, 0xf2ed, 0xf2ee, 0xf2ef, 0xf2f0, - 0xf2f1, 0xf2f2, 0xf2f3, 0xf2f4, 0xf2f5, 0xf2f6, 0xf2f7, 0xf2f8, - 0xf2f9, 0xf2fa, 0xf2fb, 0xf2fc, 0xf340, 0xf341, 0xf342, 0xf343, - 0xf344, 0xf345, 0xf346, 0xf347, 0xf348, 0xf349, 0xf34a, 0xf34b, - 0xf34c, 0xf34d, 0xf34e, 0xf34f, 0xf350, 0xf351, 0xf352, 0xf353, - 0xf354, 0xf355, 0xf356, 0xf357, 0xf358, 0xf359, 0xf35a, 0xf35b, - 0xf35c, 0xf35d, 0xf35e, 0xf35f, 0xf360, 0xf361, 0xf362, 0xf363, - 0xf364, 0xf365, 0xf366, 0xf367, 0xf368, 0xf369, 0xf36a, 0xf36b, - 0xf36c, 0xf36d, 0xf36e, 0xf36f, 0xf370, 0xf371, 0xf372, 0xf373, - 0xf374, 0xf375, 0xf376, 0xf377, 0xf378, 0xf379, 0xf37a, 0xf37b, - 0xf37c, 0xf37d, 0xf37e, 0xf380, 0xf381, 0xf382, 0xf383, 0xf384, - 0xf385, 0xf386, 0xf387, 0xf388, 0xf389, 0xf38a, 0xf38b, 0xf38c, - 0xf38d, 0xf38e, 0xf38f, 0xf390, 0xf391, 0xf392, 0xf393, 0xf394, - 0xf395, 0xf396, 0xf397, 0xf398, 0xf399, 0xf39a, 0xf39b, 0xf39c, - 0xf39d, 0xf39e, 0xf39f, 0xf3a0, 0xf3a1, 0xf3a2, 0xf3a3, 0xf3a4, - 0xf3a5, 0xf3a6, 0xf3a7, 0xf3a8, 0xf3a9, 0xf3aa, 0xf3ab, 0xf3ac, - 0xf3ad, 0xf3ae, 0xf3af, 0xf3b0, 0xf3b1, 0xf3b2, 0xf3b3, 0xf3b4, - 0xf3b5, 0xf3b6, 0xf3b7, 0xf3b8, 0xf3b9, 0xf3ba, 0xf3bb, 0xf3bc, - 0xf3bd, 0xf3be, 0xf3bf, 0xf3c0, 0xf3c1, 0xf3c2, 0xf3c3, 0xf3c4, - 0xf3c5, 0xf3c6, 0xf3c7, 0xf3c8, 0xf3c9, 0xf3ca, 0xf3cb, 0xf3cc, - 0xf3cd, 0xf3ce, 0xf3cf, 0xf3d0, 0xf3d1, 0xf3d2, 0xf3d3, 0xf3d4, - 0xf3d5, 0xf3d6, 0xf3d7, 0xf3d8, 0xf3d9, 0xf3da, 0xf3db, 0xf3dc, - 0xf3dd, 0xf3de, 0xf3df, 0xf3e0, 0xf3e1, 0xf3e2, 0xf3e3, 0xf3e4, - 0xf3e5, 0xf3e6, 0xf3e7, 0xf3e8, 0xf3e9, 0xf3ea, 0xf3eb, 0xf3ec, - 0xf3ed, 0xf3ee, 0xf3ef, 0xf3f0, 0xf3f1, 0xf3f2, 0xf3f3, 0xf3f4, - 0xf3f5, 0xf3f6, 0xf3f7, 0xf3f8, 0xf3f9, 0xf3fa, 0xf3fb, 0xf3fc, - 0xf440, 0xf441, 0xf442, 0xf443, 0xf444, 0xf445, 0xf446, 0xf447, - 0xf448, 0xf449, 0xf44a, 0xf44b, 0xf44c, 0xf44d, 0xf44e, 0xf44f, - /* 0xe300 .. 0xe3ff */ - 0xf450, 0xf451, 0xf452, 0xf453, 0xf454, 0xf455, 0xf456, 0xf457, - 0xf458, 0xf459, 0xf45a, 0xf45b, 0xf45c, 0xf45d, 0xf45e, 0xf45f, - 0xf460, 0xf461, 0xf462, 0xf463, 0xf464, 0xf465, 0xf466, 0xf467, - 0xf468, 0xf469, 0xf46a, 0xf46b, 0xf46c, 0xf46d, 0xf46e, 0xf46f, - 0xf470, 0xf471, 0xf472, 0xf473, 0xf474, 0xf475, 0xf476, 0xf477, - 0xf478, 0xf479, 0xf47a, 0xf47b, 0xf47c, 0xf47d, 0xf47e, 0xf480, - 0xf481, 0xf482, 0xf483, 0xf484, 0xf485, 0xf486, 0xf487, 0xf488, - 0xf489, 0xf48a, 0xf48b, 0xf48c, 0xf48d, 0xf48e, 0xf48f, 0xf490, - 0xf491, 0xf492, 0xf493, 0xf494, 0xf495, 0xf496, 0xf497, 0xf498, - 0xf499, 0xf49a, 0xf49b, 0xf49c, 0xf49d, 0xf49e, 0xf49f, 0xf4a0, - 0xf4a1, 0xf4a2, 0xf4a3, 0xf4a4, 0xf4a5, 0xf4a6, 0xf4a7, 0xf4a8, - 0xf4a9, 0xf4aa, 0xf4ab, 0xf4ac, 0xf4ad, 0xf4ae, 0xf4af, 0xf4b0, - 0xf4b1, 0xf4b2, 0xf4b3, 0xf4b4, 0xf4b5, 0xf4b6, 0xf4b7, 0xf4b8, - 0xf4b9, 0xf4ba, 0xf4bb, 0xf4bc, 0xf4bd, 0xf4be, 0xf4bf, 0xf4c0, - 0xf4c1, 0xf4c2, 0xf4c3, 0xf4c4, 0xf4c5, 0xf4c6, 0xf4c7, 0xf4c8, - 0xf4c9, 0xf4ca, 0xf4cb, 0xf4cc, 0xf4cd, 0xf4ce, 0xf4cf, 0xf4d0, - 0xf4d1, 0xf4d2, 0xf4d3, 0xf4d4, 0xf4d5, 0xf4d6, 0xf4d7, 0xf4d8, - 0xf4d9, 0xf4da, 0xf4db, 0xf4dc, 0xf4dd, 0xf4de, 0xf4df, 0xf4e0, - 0xf4e1, 0xf4e2, 0xf4e3, 0xf4e4, 0xf4e5, 0xf4e6, 0xf4e7, 0xf4e8, - 0xf4e9, 0xf4ea, 0xf4eb, 0xf4ec, 0xf4ed, 0xf4ee, 0xf4ef, 0xf4f0, - 0xf4f1, 0xf4f2, 0xf4f3, 0xf4f4, 0xf4f5, 0xf4f6, 0xf4f7, 0xf4f8, - 0xf4f9, 0xf4fa, 0xf4fb, 0xf4fc, 0xf540, 0xf541, 0xf542, 0xf543, - 0xf544, 0xf545, 0xf546, 0xf547, 0xf548, 0xf549, 0xf54a, 0xf54b, - 0xf54c, 0xf54d, 0xf54e, 0xf54f, 0xf550, 0xf551, 0xf552, 0xf553, - 0xf554, 0xf555, 0xf556, 0xf557, 0xf558, 0xf559, 0xf55a, 0xf55b, - 0xf55c, 0xf55d, 0xf55e, 0xf55f, 0xf560, 0xf561, 0xf562, 0xf563, - 0xf564, 0xf565, 0xf566, 0xf567, 0xf568, 0xf569, 0xf56a, 0xf56b, - 0xf56c, 0xf56d, 0xf56e, 0xf56f, 0xf570, 0xf571, 0xf572, 0xf573, - 0xf574, 0xf575, 0xf576, 0xf577, 0xf578, 0xf579, 0xf57a, 0xf57b, - 0xf57c, 0xf57d, 0xf57e, 0xf580, 0xf581, 0xf582, 0xf583, 0xf584, - 0xf585, 0xf586, 0xf587, 0xf588, 0xf589, 0xf58a, 0xf58b, 0xf58c, - 0xf58d, 0xf58e, 0xf58f, 0xf590, 0xf591, 0xf592, 0xf593, 0xf594, - /* 0xe400 .. 0xe4ff */ - 0xf595, 0xf596, 0xf597, 0xf598, 0xf599, 0xf59a, 0xf59b, 0xf59c, - 0xf59d, 0xf59e, 0xf59f, 0xf5a0, 0xf5a1, 0xf5a2, 0xf5a3, 0xf5a4, - 0xf5a5, 0xf5a6, 0xf5a7, 0xf5a8, 0xf5a9, 0xf5aa, 0xf5ab, 0xf5ac, - 0xf5ad, 0xf5ae, 0xf5af, 0xf5b0, 0xf5b1, 0xf5b2, 0xf5b3, 0xf5b4, - 0xf5b5, 0xf5b6, 0xf5b7, 0xf5b8, 0xf5b9, 0xf5ba, 0xf5bb, 0xf5bc, - 0xf5bd, 0xf5be, 0xf5bf, 0xf5c0, 0xf5c1, 0xf5c2, 0xf5c3, 0xf5c4, - 0xf5c5, 0xf5c6, 0xf5c7, 0xf5c8, 0xf5c9, 0xf5ca, 0xf5cb, 0xf5cc, - 0xf5cd, 0xf5ce, 0xf5cf, 0xf5d0, 0xf5d1, 0xf5d2, 0xf5d3, 0xf5d4, - 0xf5d5, 0xf5d6, 0xf5d7, 0xf5d8, 0xf5d9, 0xf5da, 0xf5db, 0xf5dc, - 0xf5dd, 0xf5de, 0xf5df, 0xf5e0, 0xf5e1, 0xf5e2, 0xf5e3, 0xf5e4, - 0xf5e5, 0xf5e6, 0xf5e7, 0xf5e8, 0xf5e9, 0xf5ea, 0xf5eb, 0xf5ec, - 0xf5ed, 0xf5ee, 0xf5ef, 0xf5f0, 0xf5f1, 0xf5f2, 0xf5f3, 0xf5f4, - 0xf5f5, 0xf5f6, 0xf5f7, 0xf5f8, 0xf5f9, 0xf5fa, 0xf5fb, 0xf5fc, - 0xf640, 0xf641, 0xf642, 0xf643, 0xf644, 0xf645, 0xf646, 0xf647, - 0xf648, 0xf649, 0xf64a, 0xf64b, 0xf64c, 0xf64d, 0xf64e, 0xf64f, - 0xf650, 0xf651, 0xf652, 0xf653, 0xf654, 0xf655, 0xf656, 0xf657, - 0xf658, 0xf659, 0xf65a, 0xf65b, 0xf65c, 0xf65d, 0xf65e, 0xf65f, - 0xf660, 0xf661, 0xf662, 0xf663, 0xf664, 0xf665, 0xf666, 0xf667, - 0xf668, 0xf669, 0xf66a, 0xf66b, 0xf66c, 0xf66d, 0xf66e, 0xf66f, - 0xf670, 0xf671, 0xf672, 0xf673, 0xf674, 0xf675, 0xf676, 0xf677, - 0xf678, 0xf679, 0xf67a, 0xf67b, 0xf67c, 0xf67d, 0xf67e, 0xf680, - 0xf681, 0xf682, 0xf683, 0xf684, 0xf685, 0xf686, 0xf687, 0xf688, - 0xf689, 0xf68a, 0xf68b, 0xf68c, 0xf68d, 0xf68e, 0xf68f, 0xf690, - 0xf691, 0xf692, 0xf693, 0xf694, 0xf695, 0xf696, 0xf697, 0xf698, - 0xf699, 0xf69a, 0xf69b, 0xf69c, 0xf69d, 0xf69e, 0xf69f, 0xf6a0, - 0xf6a1, 0xf6a2, 0xf6a3, 0xf6a4, 0xf6a5, 0xf6a6, 0xf6a7, 0xf6a8, - 0xf6a9, 0xf6aa, 0xf6ab, 0xf6ac, 0xf6ad, 0xf6ae, 0xf6af, 0xf6b0, - 0xf6b1, 0xf6b2, 0xf6b3, 0xf6b4, 0xf6b5, 0xf6b6, 0xf6b7, 0xf6b8, - 0xf6b9, 0xf6ba, 0xf6bb, 0xf6bc, 0xf6bd, 0xf6be, 0xf6bf, 0xf6c0, - 0xf6c1, 0xf6c2, 0xf6c3, 0xf6c4, 0xf6c5, 0xf6c6, 0xf6c7, 0xf6c8, - 0xf6c9, 0xf6ca, 0xf6cb, 0xf6cc, 0xf6cd, 0xf6ce, 0xf6cf, 0xf6d0, - 0xf6d1, 0xf6d2, 0xf6d3, 0xf6d4, 0xf6d5, 0xf6d6, 0xf6d7, 0xf6d8, - /* 0xe500 .. 0xe5ff */ - 0xf6d9, 0xf6da, 0xf6db, 0xf6dc, 0xf6dd, 0xf6de, 0xf6df, 0xf6e0, - 0xf6e1, 0xf6e2, 0xf6e3, 0xf6e4, 0xf6e5, 0xf6e6, 0xf6e7, 0xf6e8, - 0xf6e9, 0xf6ea, 0xf6eb, 0xf6ec, 0xf6ed, 0xf6ee, 0xf6ef, 0xf6f0, - 0xf6f1, 0xf6f2, 0xf6f3, 0xf6f4, 0xf6f5, 0xf6f6, 0xf6f7, 0xf6f8, - 0xf6f9, 0xf6fa, 0xf6fb, 0xf6fc, 0xf740, 0xf741, 0xf742, 0xf743, - 0xf744, 0xf745, 0xf746, 0xf747, 0xf748, 0xf749, 0xf74a, 0xf74b, - 0xf74c, 0xf74d, 0xf74e, 0xf74f, 0xf750, 0xf751, 0xf752, 0xf753, - 0xf754, 0xf755, 0xf756, 0xf757, 0xf758, 0xf759, 0xf75a, 0xf75b, - 0xf75c, 0xf75d, 0xf75e, 0xf75f, 0xf760, 0xf761, 0xf762, 0xf763, - 0xf764, 0xf765, 0xf766, 0xf767, 0xf768, 0xf769, 0xf76a, 0xf76b, - 0xf76c, 0xf76d, 0xf76e, 0xf76f, 0xf770, 0xf771, 0xf772, 0xf773, - 0xf774, 0xf775, 0xf776, 0xf777, 0xf778, 0xf779, 0xf77a, 0xf77b, - 0xf77c, 0xf77d, 0xf77e, 0xf780, 0xf781, 0xf782, 0xf783, 0xf784, - 0xf785, 0xf786, 0xf787, 0xf788, 0xf789, 0xf78a, 0xf78b, 0xf78c, - 0xf78d, 0xf78e, 0xf78f, 0xf790, 0xf791, 0xf792, 0xf793, 0xf794, - 0xf795, 0xf796, 0xf797, 0xf798, 0xf799, 0xf79a, 0xf79b, 0xf79c, - 0xf79d, 0xf79e, 0xf79f, 0xf7a0, 0xf7a1, 0xf7a2, 0xf7a3, 0xf7a4, - 0xf7a5, 0xf7a6, 0xf7a7, 0xf7a8, 0xf7a9, 0xf7aa, 0xf7ab, 0xf7ac, - 0xf7ad, 0xf7ae, 0xf7af, 0xf7b0, 0xf7b1, 0xf7b2, 0xf7b3, 0xf7b4, - 0xf7b5, 0xf7b6, 0xf7b7, 0xf7b8, 0xf7b9, 0xf7ba, 0xf7bb, 0xf7bc, - 0xf7bd, 0xf7be, 0xf7bf, 0xf7c0, 0xf7c1, 0xf7c2, 0xf7c3, 0xf7c4, - 0xf7c5, 0xf7c6, 0xf7c7, 0xf7c8, 0xf7c9, 0xf7ca, 0xf7cb, 0xf7cc, - 0xf7cd, 0xf7ce, 0xf7cf, 0xf7d0, 0xf7d1, 0xf7d2, 0xf7d3, 0xf7d4, - 0xf7d5, 0xf7d6, 0xf7d7, 0xf7d8, 0xf7d9, 0xf7da, 0xf7db, 0xf7dc, - 0xf7dd, 0xf7de, 0xf7df, 0xf7e0, 0xf7e1, 0xf7e2, 0xf7e3, 0xf7e4, - 0xf7e5, 0xf7e6, 0xf7e7, 0xf7e8, 0xf7e9, 0xf7ea, 0xf7eb, 0xf7ec, - 0xf7ed, 0xf7ee, 0xf7ef, 0xf7f0, 0xf7f1, 0xf7f2, 0xf7f3, 0xf7f4, - 0xf7f5, 0xf7f6, 0xf7f7, 0xf7f8, 0xf7f9, 0xf7fa, 0xf7fb, 0xf7fc, - 0xf840, 0xf841, 0xf842, 0xf843, 0xf844, 0xf845, 0xf846, 0xf847, - 0xf848, 0xf849, 0xf84a, 0xf84b, 0xf84c, 0xf84d, 0xf84e, 0xf84f, - 0xf850, 0xf851, 0xf852, 0xf853, 0xf854, 0xf855, 0xf856, 0xf857, - 0xf858, 0xf859, 0xf85a, 0xf85b, 0xf85c, 0xf85d, 0xf85e, 0xf85f, - /* 0xe600 .. 0xe6ff */ - 0xf860, 0xf861, 0xf862, 0xf863, 0xf864, 0xf865, 0xf866, 0xf867, - 0xf868, 0xf869, 0xf86a, 0xf86b, 0xf86c, 0xf86d, 0xf86e, 0xf86f, - 0xf870, 0xf871, 0xf872, 0xf873, 0xf874, 0xf875, 0xf876, 0xf877, - 0xf878, 0xf879, 0xf87a, 0xf87b, 0xf87c, 0xf87d, 0xf87e, 0xf880, - 0xf881, 0xf882, 0xf883, 0xf884, 0xf885, 0xf886, 0xf887, 0xf888, - 0xf889, 0xf88a, 0xf88b, 0xf88c, 0xf88d, 0xf88e, 0xf88f, 0xf890, - 0xf891, 0xf892, 0xf893, 0xf894, 0xf895, 0xf896, 0xf897, 0xf898, - 0xf899, 0xf89a, 0xf89b, 0xf89c, 0xf89d, 0xf89e, 0xf89f, 0xf8a0, - 0xf8a1, 0xf8a2, 0xf8a3, 0xf8a4, 0xf8a5, 0xf8a6, 0xf8a7, 0xf8a8, - 0xf8a9, 0xf8aa, 0xf8ab, 0xf8ac, 0xf8ad, 0xf8ae, 0xf8af, 0xf8b0, - 0xf8b1, 0xf8b2, 0xf8b3, 0xf8b4, 0xf8b5, 0xf8b6, 0xf8b7, 0xf8b8, - 0xf8b9, 0xf8ba, 0xf8bb, 0xf8bc, 0xf8bd, 0xf8be, 0xf8bf, 0xf8c0, - 0xf8c1, 0xf8c2, 0xf8c3, 0xf8c4, 0xf8c5, 0xf8c6, 0xf8c7, 0xf8c8, - 0xf8c9, 0xf8ca, 0xf8cb, 0xf8cc, 0xf8cd, 0xf8ce, 0xf8cf, 0xf8d0, - 0xf8d1, 0xf8d2, 0xf8d3, 0xf8d4, 0xf8d5, 0xf8d6, 0xf8d7, 0xf8d8, - 0xf8d9, 0xf8da, 0xf8db, 0xf8dc, 0xf8dd, 0xf8de, 0xf8df, 0xf8e0, - 0xf8e1, 0xf8e2, 0xf8e3, 0xf8e4, 0xf8e5, 0xf8e6, 0xf8e7, 0xf8e8, - 0xf8e9, 0xf8ea, 0xf8eb, 0xf8ec, 0xf8ed, 0xf8ee, 0xf8ef, 0xf8f0, - 0xf8f1, 0xf8f2, 0xf8f3, 0xf8f4, 0xf8f5, 0xf8f6, 0xf8f7, 0xf8f8, - 0xf8f9, 0xf8fa, 0xf8fb, 0xf8fc, 0xf940, 0xf941, 0xf942, 0xf943, - 0xf944, 0xf945, 0xf946, 0xf947, 0xf948, 0xf949, 0xf94a, 0xf94b, - 0xf94c, 0xf94d, 0xf94e, 0xf94f, 0xf950, 0xf951, 0xf952, 0xf953, - 0xf954, 0xf955, 0xf956, 0xf957, 0xf958, 0xf959, 0xf95a, 0xf95b, - 0xf95c, 0xf95d, 0xf95e, 0xf95f, 0xf960, 0xf961, 0xf962, 0xf963, - 0xf964, 0xf965, 0xf966, 0xf967, 0xf968, 0xf969, 0xf96a, 0xf96b, - 0xf96c, 0xf96d, 0xf96e, 0xf96f, 0xf970, 0xf971, 0xf972, 0xf973, - 0xf974, 0xf975, 0xf976, 0xf977, 0xf978, 0xf979, 0xf97a, 0xf97b, - 0xf97c, 0xf97d, 0xf97e, 0xf980, 0xf981, 0xf982, 0xf983, 0xf984, - 0xf985, 0xf986, 0xf987, 0xf988, 0xf989, 0xf98a, 0xf98b, 0xf98c, - 0xf98d, 0xf98e, 0xf98f, 0xf990, 0xf991, 0xf992, 0xf993, 0xf994, - 0xf995, 0xf996, 0xf997, 0xf998, 0xf999, 0xf99a, 0xf99b, 0xf99c, - 0xf99d, 0xf99e, 0xf99f, 0xf9a0, 0xf9a1, 0xf9a2, 0xf9a3, 0xf9a4, - /* 0xe700 .. 0xe7ff */ - 0xf9a5, 0xf9a6, 0xf9a7, 0xf9a8, 0xf9a9, 0xf9aa, 0xf9ab, 0xf9ac, - 0xf9ad, 0xf9ae, 0xf9af, 0xf9b0, 0xf9b1, 0xf9b2, 0xf9b3, 0xf9b4, - 0xf9b5, 0xf9b6, 0xf9b7, 0xf9b8, 0xf9b9, 0xf9ba, 0xf9bb, 0xf9bc, - 0xf9bd, 0xf9be, 0xf9bf, 0xf9c0, 0xf9c1, 0xf9c2, 0xf9c3, 0xf9c4, - 0xf9c5, 0xf9c6, 0xf9c7, 0xf9c8, 0xf9c9, 0xf9ca, 0xf9cb, 0xf9cc, - 0xf9cd, 0xf9ce, 0xf9cf, 0xf9d0, 0xf9d1, 0xf9d2, 0xf9d3, 0xf9d4, - 0xf9d5, 0xf9d6, 0xf9d7, 0xf9d8, 0xf9d9, 0xf9da, 0xf9db, 0xf9dc, - 0xf9dd, 0xf9de, 0xf9df, 0xf9e0, 0xf9e1, 0xf9e2, 0xf9e3, 0xf9e4, - 0xf9e5, 0xf9e6, 0xf9e7, 0xf9e8, 0xf9e9, 0xf9ea, 0xf9eb, 0xf9ec, - 0xf9ed, 0xf9ee, 0xf9ef, 0xf9f0, 0xf9f1, 0xf9f2, 0xf9f3, 0xf9f4, - 0xf9f5, 0xf9f6, 0xf9f7, 0xf9f8, 0xf9f9, 0xf9fa, 0xf9fb, 0xf9fc, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xf800 .. 0xf8ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x00a0, 0x00fd, 0x00fe, 0x00ff, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xf900 .. 0xf9ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xfae0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xfbe9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xfa00 .. 0xfaff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfa90, 0xfa9b, - 0xfa9c, 0xfab1, 0xfad8, 0xfae8, 0xfaea, 0xfb58, 0xfb5e, 0xfb75, - 0xfb7d, 0xfb7e, 0xfb80, 0xfb82, 0xfb86, 0xfb89, 0xfb92, 0xfb9d, - 0xfb9f, 0xfba0, 0xfba9, 0xfbb1, 0xfbb3, 0xfbb4, 0xfbb7, 0xfbd3, - 0xfbda, 0xfbea, 0xfbf6, 0xfbf7, 0xfbf9, 0xfc49, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xff00 .. 0xffff */ - 0x003f, 0x8149, 0xfa57, 0x8194, 0x8190, 0x8193, 0x8195, 0xfa56, - 0x8169, 0x816a, 0x8196, 0x817b, 0x8143, 0x817c, 0x8144, 0x815e, - 0x824f, 0x8250, 0x8251, 0x8252, 0x8253, 0x8254, 0x8255, 0x8256, - 0x8257, 0x8258, 0x8146, 0x8147, 0x8183, 0x8181, 0x8184, 0x8148, - 0x8197, 0x8260, 0x8261, 0x8262, 0x8263, 0x8264, 0x8265, 0x8266, - 0x8267, 0x8268, 0x8269, 0x826a, 0x826b, 0x826c, 0x826d, 0x826e, - 0x826f, 0x8270, 0x8271, 0x8272, 0x8273, 0x8274, 0x8275, 0x8276, - 0x8277, 0x8278, 0x8279, 0x816d, 0x815f, 0x816e, 0x814f, 0x8151, - 0x814d, 0x8281, 0x8282, 0x8283, 0x8284, 0x8285, 0x8286, 0x8287, - 0x8288, 0x8289, 0x828a, 0x828b, 0x828c, 0x828d, 0x828e, 0x828f, - 0x8290, 0x8291, 0x8292, 0x8293, 0x8294, 0x8295, 0x8296, 0x8297, - 0x8298, 0x8299, 0x829a, 0x816f, 0x8162, 0x8170, 0x8160, 0x003f, - 0x003f, 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, - 0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, - 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8191, 0x8192, 0x81ca, 0x8150, 0xfa55, 0x818f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* defaults */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x6b00, 0x6b00, 0x0100, 0x0200, 0x6b00, 0x6b00, 0x6b00, - 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, - 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, - 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, - 0x0300, 0x0400, 0x0500, 0x0600, 0x0700, 0x0800, 0x0900, 0x6b00, - 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, - 0x0a00, 0x6b00, 0x0b00, 0x0c00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, - 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, - 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, - 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x0d00, 0x0e00, - 0x0f00, 0x1000, 0x1100, 0x1200, 0x1300, 0x1400, 0x1500, 0x1600, - 0x1700, 0x1800, 0x1900, 0x1a00, 0x1b00, 0x1c00, 0x1d00, 0x1e00, - 0x1f00, 0x2000, 0x2100, 0x2200, 0x2300, 0x2400, 0x2500, 0x2600, - 0x2700, 0x2800, 0x2900, 0x2a00, 0x2b00, 0x2c00, 0x2d00, 0x2e00, - 0x2f00, 0x3000, 0x3100, 0x3200, 0x3300, 0x3400, 0x3500, 0x3600, - 0x3700, 0x3800, 0x3900, 0x3a00, 0x3b00, 0x3c00, 0x3d00, 0x3e00, - 0x3f00, 0x4000, 0x4100, 0x4200, 0x4300, 0x4400, 0x4500, 0x4600, - 0x4700, 0x4800, 0x4900, 0x4a00, 0x4b00, 0x4c00, 0x4d00, 0x4e00, - 0x4f00, 0x5000, 0x5100, 0x5200, 0x5300, 0x5400, 0x5500, 0x5600, - 0x5700, 0x5800, 0x5900, 0x5a00, 0x5b00, 0x5c00, 0x5d00, 0x5e00, - 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, - 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, - 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, - 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, - 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, - 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, - 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, - 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, - 0x5f00, 0x6000, 0x6100, 0x6200, 0x6300, 0x6400, 0x6500, 0x6600, - 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, - 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6b00, - 0x6700, 0x6800, 0x6900, 0x6b00, 0x6b00, 0x6b00, 0x6b00, 0x6a00 -}; - -const struct dbcs_table cptable_932 = -{ - { 932, 2, 0x003f, 0x30fb, "ANSI/OEM Japanese Shift-JIS" }, - cp2uni, - cp2uni_leadbytes, - uni2cp_low, - uni2cp_high, - { - 0x81, 0x9f, 0xe0, 0xfc, 0x00, 0x00 - } -}; diff --git a/reactos/tools/unicode/c_936.c b/reactos/tools/unicode/c_936.c deleted file mode 100644 index 6760d289c73..00000000000 --- a/reactos/tools/unicode/c_936.c +++ /dev/null @@ -1,8016 +0,0 @@ -/* code page 936 (ANSI/OEM Simplified Chinese GBK) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit936.txt */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[32512] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x20ac, 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, 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, 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, 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, 0xf8f5, - /* lead byte 81 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x4e02, 0x4e04, 0x4e05, 0x4e06, 0x4e0f, 0x4e12, 0x4e17, 0x4e1f, - 0x4e20, 0x4e21, 0x4e23, 0x4e26, 0x4e29, 0x4e2e, 0x4e2f, 0x4e31, - 0x4e33, 0x4e35, 0x4e37, 0x4e3c, 0x4e40, 0x4e41, 0x4e42, 0x4e44, - 0x4e46, 0x4e4a, 0x4e51, 0x4e55, 0x4e57, 0x4e5a, 0x4e5b, 0x4e62, - 0x4e63, 0x4e64, 0x4e65, 0x4e67, 0x4e68, 0x4e6a, 0x4e6b, 0x4e6c, - 0x4e6d, 0x4e6e, 0x4e6f, 0x4e72, 0x4e74, 0x4e75, 0x4e76, 0x4e77, - 0x4e78, 0x4e79, 0x4e7a, 0x4e7b, 0x4e7c, 0x4e7d, 0x4e7f, 0x4e80, - 0x4e81, 0x4e82, 0x4e83, 0x4e84, 0x4e85, 0x4e87, 0x4e8a, 0x003f, - 0x4e90, 0x4e96, 0x4e97, 0x4e99, 0x4e9c, 0x4e9d, 0x4e9e, 0x4ea3, - 0x4eaa, 0x4eaf, 0x4eb0, 0x4eb1, 0x4eb4, 0x4eb6, 0x4eb7, 0x4eb8, - 0x4eb9, 0x4ebc, 0x4ebd, 0x4ebe, 0x4ec8, 0x4ecc, 0x4ecf, 0x4ed0, - 0x4ed2, 0x4eda, 0x4edb, 0x4edc, 0x4ee0, 0x4ee2, 0x4ee6, 0x4ee7, - 0x4ee9, 0x4eed, 0x4eee, 0x4eef, 0x4ef1, 0x4ef4, 0x4ef8, 0x4ef9, - 0x4efa, 0x4efc, 0x4efe, 0x4f00, 0x4f02, 0x4f03, 0x4f04, 0x4f05, - 0x4f06, 0x4f07, 0x4f08, 0x4f0b, 0x4f0c, 0x4f12, 0x4f13, 0x4f14, - 0x4f15, 0x4f16, 0x4f1c, 0x4f1d, 0x4f21, 0x4f23, 0x4f28, 0x4f29, - 0x4f2c, 0x4f2d, 0x4f2e, 0x4f31, 0x4f33, 0x4f35, 0x4f37, 0x4f39, - 0x4f3b, 0x4f3e, 0x4f3f, 0x4f40, 0x4f41, 0x4f42, 0x4f44, 0x4f45, - 0x4f47, 0x4f48, 0x4f49, 0x4f4a, 0x4f4b, 0x4f4c, 0x4f52, 0x4f54, - 0x4f56, 0x4f61, 0x4f62, 0x4f66, 0x4f68, 0x4f6a, 0x4f6b, 0x4f6d, - 0x4f6e, 0x4f71, 0x4f72, 0x4f75, 0x4f77, 0x4f78, 0x4f79, 0x4f7a, - 0x4f7d, 0x4f80, 0x4f81, 0x4f82, 0x4f85, 0x4f86, 0x4f87, 0x4f8a, - 0x4f8c, 0x4f8e, 0x4f90, 0x4f92, 0x4f93, 0x4f95, 0x4f96, 0x4f98, - 0x4f99, 0x4f9a, 0x4f9c, 0x4f9e, 0x4f9f, 0x4fa1, 0x4fa2, 0x003f, - /* lead byte 82 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x4fa4, 0x4fab, 0x4fad, 0x4fb0, 0x4fb1, 0x4fb2, 0x4fb3, 0x4fb4, - 0x4fb6, 0x4fb7, 0x4fb8, 0x4fb9, 0x4fba, 0x4fbb, 0x4fbc, 0x4fbd, - 0x4fbe, 0x4fc0, 0x4fc1, 0x4fc2, 0x4fc6, 0x4fc7, 0x4fc8, 0x4fc9, - 0x4fcb, 0x4fcc, 0x4fcd, 0x4fd2, 0x4fd3, 0x4fd4, 0x4fd5, 0x4fd6, - 0x4fd9, 0x4fdb, 0x4fe0, 0x4fe2, 0x4fe4, 0x4fe5, 0x4fe7, 0x4feb, - 0x4fec, 0x4ff0, 0x4ff2, 0x4ff4, 0x4ff5, 0x4ff6, 0x4ff7, 0x4ff9, - 0x4ffb, 0x4ffc, 0x4ffd, 0x4fff, 0x5000, 0x5001, 0x5002, 0x5003, - 0x5004, 0x5005, 0x5006, 0x5007, 0x5008, 0x5009, 0x500a, 0x003f, - 0x500b, 0x500e, 0x5010, 0x5011, 0x5013, 0x5015, 0x5016, 0x5017, - 0x501b, 0x501d, 0x501e, 0x5020, 0x5022, 0x5023, 0x5024, 0x5027, - 0x502b, 0x502f, 0x5030, 0x5031, 0x5032, 0x5033, 0x5034, 0x5035, - 0x5036, 0x5037, 0x5038, 0x5039, 0x503b, 0x503d, 0x503f, 0x5040, - 0x5041, 0x5042, 0x5044, 0x5045, 0x5046, 0x5049, 0x504a, 0x504b, - 0x504d, 0x5050, 0x5051, 0x5052, 0x5053, 0x5054, 0x5056, 0x5057, - 0x5058, 0x5059, 0x505b, 0x505d, 0x505e, 0x505f, 0x5060, 0x5061, - 0x5062, 0x5063, 0x5064, 0x5066, 0x5067, 0x5068, 0x5069, 0x506a, - 0x506b, 0x506d, 0x506e, 0x506f, 0x5070, 0x5071, 0x5072, 0x5073, - 0x5074, 0x5075, 0x5078, 0x5079, 0x507a, 0x507c, 0x507d, 0x5081, - 0x5082, 0x5083, 0x5084, 0x5086, 0x5087, 0x5089, 0x508a, 0x508b, - 0x508c, 0x508e, 0x508f, 0x5090, 0x5091, 0x5092, 0x5093, 0x5094, - 0x5095, 0x5096, 0x5097, 0x5098, 0x5099, 0x509a, 0x509b, 0x509c, - 0x509d, 0x509e, 0x509f, 0x50a0, 0x50a1, 0x50a2, 0x50a4, 0x50a6, - 0x50aa, 0x50ab, 0x50ad, 0x50ae, 0x50af, 0x50b0, 0x50b1, 0x50b3, - 0x50b4, 0x50b5, 0x50b6, 0x50b7, 0x50b8, 0x50b9, 0x50bc, 0x003f, - /* lead byte 83 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x50bd, 0x50be, 0x50bf, 0x50c0, 0x50c1, 0x50c2, 0x50c3, 0x50c4, - 0x50c5, 0x50c6, 0x50c7, 0x50c8, 0x50c9, 0x50ca, 0x50cb, 0x50cc, - 0x50cd, 0x50ce, 0x50d0, 0x50d1, 0x50d2, 0x50d3, 0x50d4, 0x50d5, - 0x50d7, 0x50d8, 0x50d9, 0x50db, 0x50dc, 0x50dd, 0x50de, 0x50df, - 0x50e0, 0x50e1, 0x50e2, 0x50e3, 0x50e4, 0x50e5, 0x50e8, 0x50e9, - 0x50ea, 0x50eb, 0x50ef, 0x50f0, 0x50f1, 0x50f2, 0x50f4, 0x50f6, - 0x50f7, 0x50f8, 0x50f9, 0x50fa, 0x50fc, 0x50fd, 0x50fe, 0x50ff, - 0x5100, 0x5101, 0x5102, 0x5103, 0x5104, 0x5105, 0x5108, 0x003f, - 0x5109, 0x510a, 0x510c, 0x510d, 0x510e, 0x510f, 0x5110, 0x5111, - 0x5113, 0x5114, 0x5115, 0x5116, 0x5117, 0x5118, 0x5119, 0x511a, - 0x511b, 0x511c, 0x511d, 0x511e, 0x511f, 0x5120, 0x5122, 0x5123, - 0x5124, 0x5125, 0x5126, 0x5127, 0x5128, 0x5129, 0x512a, 0x512b, - 0x512c, 0x512d, 0x512e, 0x512f, 0x5130, 0x5131, 0x5132, 0x5133, - 0x5134, 0x5135, 0x5136, 0x5137, 0x5138, 0x5139, 0x513a, 0x513b, - 0x513c, 0x513d, 0x513e, 0x5142, 0x5147, 0x514a, 0x514c, 0x514e, - 0x514f, 0x5150, 0x5152, 0x5153, 0x5157, 0x5158, 0x5159, 0x515b, - 0x515d, 0x515e, 0x515f, 0x5160, 0x5161, 0x5163, 0x5164, 0x5166, - 0x5167, 0x5169, 0x516a, 0x516f, 0x5172, 0x517a, 0x517e, 0x517f, - 0x5183, 0x5184, 0x5186, 0x5187, 0x518a, 0x518b, 0x518e, 0x518f, - 0x5190, 0x5191, 0x5193, 0x5194, 0x5198, 0x519a, 0x519d, 0x519e, - 0x519f, 0x51a1, 0x51a3, 0x51a6, 0x51a7, 0x51a8, 0x51a9, 0x51aa, - 0x51ad, 0x51ae, 0x51b4, 0x51b8, 0x51b9, 0x51ba, 0x51be, 0x51bf, - 0x51c1, 0x51c2, 0x51c3, 0x51c5, 0x51c8, 0x51ca, 0x51cd, 0x51ce, - 0x51d0, 0x51d2, 0x51d3, 0x51d4, 0x51d5, 0x51d6, 0x51d7, 0x003f, - /* lead byte 84 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x51d8, 0x51d9, 0x51da, 0x51dc, 0x51de, 0x51df, 0x51e2, 0x51e3, - 0x51e5, 0x51e6, 0x51e7, 0x51e8, 0x51e9, 0x51ea, 0x51ec, 0x51ee, - 0x51f1, 0x51f2, 0x51f4, 0x51f7, 0x51fe, 0x5204, 0x5205, 0x5209, - 0x520b, 0x520c, 0x520f, 0x5210, 0x5213, 0x5214, 0x5215, 0x521c, - 0x521e, 0x521f, 0x5221, 0x5222, 0x5223, 0x5225, 0x5226, 0x5227, - 0x522a, 0x522c, 0x522f, 0x5231, 0x5232, 0x5234, 0x5235, 0x523c, - 0x523e, 0x5244, 0x5245, 0x5246, 0x5247, 0x5248, 0x5249, 0x524b, - 0x524e, 0x524f, 0x5252, 0x5253, 0x5255, 0x5257, 0x5258, 0x003f, - 0x5259, 0x525a, 0x525b, 0x525d, 0x525f, 0x5260, 0x5262, 0x5263, - 0x5264, 0x5266, 0x5268, 0x526b, 0x526c, 0x526d, 0x526e, 0x5270, - 0x5271, 0x5273, 0x5274, 0x5275, 0x5276, 0x5277, 0x5278, 0x5279, - 0x527a, 0x527b, 0x527c, 0x527e, 0x5280, 0x5283, 0x5284, 0x5285, - 0x5286, 0x5287, 0x5289, 0x528a, 0x528b, 0x528c, 0x528d, 0x528e, - 0x528f, 0x5291, 0x5292, 0x5294, 0x5295, 0x5296, 0x5297, 0x5298, - 0x5299, 0x529a, 0x529c, 0x52a4, 0x52a5, 0x52a6, 0x52a7, 0x52ae, - 0x52af, 0x52b0, 0x52b4, 0x52b5, 0x52b6, 0x52b7, 0x52b8, 0x52b9, - 0x52ba, 0x52bb, 0x52bc, 0x52bd, 0x52c0, 0x52c1, 0x52c2, 0x52c4, - 0x52c5, 0x52c6, 0x52c8, 0x52ca, 0x52cc, 0x52cd, 0x52ce, 0x52cf, - 0x52d1, 0x52d3, 0x52d4, 0x52d5, 0x52d7, 0x52d9, 0x52da, 0x52db, - 0x52dc, 0x52dd, 0x52de, 0x52e0, 0x52e1, 0x52e2, 0x52e3, 0x52e5, - 0x52e6, 0x52e7, 0x52e8, 0x52e9, 0x52ea, 0x52eb, 0x52ec, 0x52ed, - 0x52ee, 0x52ef, 0x52f1, 0x52f2, 0x52f3, 0x52f4, 0x52f5, 0x52f6, - 0x52f7, 0x52f8, 0x52fb, 0x52fc, 0x52fd, 0x5301, 0x5302, 0x5303, - 0x5304, 0x5307, 0x5309, 0x530a, 0x530b, 0x530c, 0x530e, 0x003f, - /* lead byte 85 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x5311, 0x5312, 0x5313, 0x5314, 0x5318, 0x531b, 0x531c, 0x531e, - 0x531f, 0x5322, 0x5324, 0x5325, 0x5327, 0x5328, 0x5329, 0x532b, - 0x532c, 0x532d, 0x532f, 0x5330, 0x5331, 0x5332, 0x5333, 0x5334, - 0x5335, 0x5336, 0x5337, 0x5338, 0x533c, 0x533d, 0x5340, 0x5342, - 0x5344, 0x5346, 0x534b, 0x534c, 0x534d, 0x5350, 0x5354, 0x5358, - 0x5359, 0x535b, 0x535d, 0x5365, 0x5368, 0x536a, 0x536c, 0x536d, - 0x5372, 0x5376, 0x5379, 0x537b, 0x537c, 0x537d, 0x537e, 0x5380, - 0x5381, 0x5383, 0x5387, 0x5388, 0x538a, 0x538e, 0x538f, 0x003f, - 0x5390, 0x5391, 0x5392, 0x5393, 0x5394, 0x5396, 0x5397, 0x5399, - 0x539b, 0x539c, 0x539e, 0x53a0, 0x53a1, 0x53a4, 0x53a7, 0x53aa, - 0x53ab, 0x53ac, 0x53ad, 0x53af, 0x53b0, 0x53b1, 0x53b2, 0x53b3, - 0x53b4, 0x53b5, 0x53b7, 0x53b8, 0x53b9, 0x53ba, 0x53bc, 0x53bd, - 0x53be, 0x53c0, 0x53c3, 0x53c4, 0x53c5, 0x53c6, 0x53c7, 0x53ce, - 0x53cf, 0x53d0, 0x53d2, 0x53d3, 0x53d5, 0x53da, 0x53dc, 0x53dd, - 0x53de, 0x53e1, 0x53e2, 0x53e7, 0x53f4, 0x53fa, 0x53fe, 0x53ff, - 0x5400, 0x5402, 0x5405, 0x5407, 0x540b, 0x5414, 0x5418, 0x5419, - 0x541a, 0x541c, 0x5422, 0x5424, 0x5425, 0x542a, 0x5430, 0x5433, - 0x5436, 0x5437, 0x543a, 0x543d, 0x543f, 0x5441, 0x5442, 0x5444, - 0x5445, 0x5447, 0x5449, 0x544c, 0x544d, 0x544e, 0x544f, 0x5451, - 0x545a, 0x545d, 0x545e, 0x545f, 0x5460, 0x5461, 0x5463, 0x5465, - 0x5467, 0x5469, 0x546a, 0x546b, 0x546c, 0x546d, 0x546e, 0x546f, - 0x5470, 0x5474, 0x5479, 0x547a, 0x547e, 0x547f, 0x5481, 0x5483, - 0x5485, 0x5487, 0x5488, 0x5489, 0x548a, 0x548d, 0x5491, 0x5493, - 0x5497, 0x5498, 0x549c, 0x549e, 0x549f, 0x54a0, 0x54a1, 0x003f, - /* lead byte 86 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x54a2, 0x54a5, 0x54ae, 0x54b0, 0x54b2, 0x54b5, 0x54b6, 0x54b7, - 0x54b9, 0x54ba, 0x54bc, 0x54be, 0x54c3, 0x54c5, 0x54ca, 0x54cb, - 0x54d6, 0x54d8, 0x54db, 0x54e0, 0x54e1, 0x54e2, 0x54e3, 0x54e4, - 0x54eb, 0x54ec, 0x54ef, 0x54f0, 0x54f1, 0x54f4, 0x54f5, 0x54f6, - 0x54f7, 0x54f8, 0x54f9, 0x54fb, 0x54fe, 0x5500, 0x5502, 0x5503, - 0x5504, 0x5505, 0x5508, 0x550a, 0x550b, 0x550c, 0x550d, 0x550e, - 0x5512, 0x5513, 0x5515, 0x5516, 0x5517, 0x5518, 0x5519, 0x551a, - 0x551c, 0x551d, 0x551e, 0x551f, 0x5521, 0x5525, 0x5526, 0x003f, - 0x5528, 0x5529, 0x552b, 0x552d, 0x5532, 0x5534, 0x5535, 0x5536, - 0x5538, 0x5539, 0x553a, 0x553b, 0x553d, 0x5540, 0x5542, 0x5545, - 0x5547, 0x5548, 0x554b, 0x554c, 0x554d, 0x554e, 0x554f, 0x5551, - 0x5552, 0x5553, 0x5554, 0x5557, 0x5558, 0x5559, 0x555a, 0x555b, - 0x555d, 0x555e, 0x555f, 0x5560, 0x5562, 0x5563, 0x5568, 0x5569, - 0x556b, 0x556f, 0x5570, 0x5571, 0x5572, 0x5573, 0x5574, 0x5579, - 0x557a, 0x557d, 0x557f, 0x5585, 0x5586, 0x558c, 0x558d, 0x558e, - 0x5590, 0x5592, 0x5593, 0x5595, 0x5596, 0x5597, 0x559a, 0x559b, - 0x559e, 0x55a0, 0x55a1, 0x55a2, 0x55a3, 0x55a4, 0x55a5, 0x55a6, - 0x55a8, 0x55a9, 0x55aa, 0x55ab, 0x55ac, 0x55ad, 0x55ae, 0x55af, - 0x55b0, 0x55b2, 0x55b4, 0x55b6, 0x55b8, 0x55ba, 0x55bc, 0x55bf, - 0x55c0, 0x55c1, 0x55c2, 0x55c3, 0x55c6, 0x55c7, 0x55c8, 0x55ca, - 0x55cb, 0x55ce, 0x55cf, 0x55d0, 0x55d5, 0x55d7, 0x55d8, 0x55d9, - 0x55da, 0x55db, 0x55de, 0x55e0, 0x55e2, 0x55e7, 0x55e9, 0x55ed, - 0x55ee, 0x55f0, 0x55f1, 0x55f4, 0x55f6, 0x55f8, 0x55f9, 0x55fa, - 0x55fb, 0x55fc, 0x55ff, 0x5602, 0x5603, 0x5604, 0x5605, 0x003f, - /* lead byte 87 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x5606, 0x5607, 0x560a, 0x560b, 0x560d, 0x5610, 0x5611, 0x5612, - 0x5613, 0x5614, 0x5615, 0x5616, 0x5617, 0x5619, 0x561a, 0x561c, - 0x561d, 0x5620, 0x5621, 0x5622, 0x5625, 0x5626, 0x5628, 0x5629, - 0x562a, 0x562b, 0x562e, 0x562f, 0x5630, 0x5633, 0x5635, 0x5637, - 0x5638, 0x563a, 0x563c, 0x563d, 0x563e, 0x5640, 0x5641, 0x5642, - 0x5643, 0x5644, 0x5645, 0x5646, 0x5647, 0x5648, 0x5649, 0x564a, - 0x564b, 0x564f, 0x5650, 0x5651, 0x5652, 0x5653, 0x5655, 0x5656, - 0x565a, 0x565b, 0x565d, 0x565e, 0x565f, 0x5660, 0x5661, 0x003f, - 0x5663, 0x5665, 0x5666, 0x5667, 0x566d, 0x566e, 0x566f, 0x5670, - 0x5672, 0x5673, 0x5674, 0x5675, 0x5677, 0x5678, 0x5679, 0x567a, - 0x567d, 0x567e, 0x567f, 0x5680, 0x5681, 0x5682, 0x5683, 0x5684, - 0x5687, 0x5688, 0x5689, 0x568a, 0x568b, 0x568c, 0x568d, 0x5690, - 0x5691, 0x5692, 0x5694, 0x5695, 0x5696, 0x5697, 0x5698, 0x5699, - 0x569a, 0x569b, 0x569c, 0x569d, 0x569e, 0x569f, 0x56a0, 0x56a1, - 0x56a2, 0x56a4, 0x56a5, 0x56a6, 0x56a7, 0x56a8, 0x56a9, 0x56aa, - 0x56ab, 0x56ac, 0x56ad, 0x56ae, 0x56b0, 0x56b1, 0x56b2, 0x56b3, - 0x56b4, 0x56b5, 0x56b6, 0x56b8, 0x56b9, 0x56ba, 0x56bb, 0x56bd, - 0x56be, 0x56bf, 0x56c0, 0x56c1, 0x56c2, 0x56c3, 0x56c4, 0x56c5, - 0x56c6, 0x56c7, 0x56c8, 0x56c9, 0x56cb, 0x56cc, 0x56cd, 0x56ce, - 0x56cf, 0x56d0, 0x56d1, 0x56d2, 0x56d3, 0x56d5, 0x56d6, 0x56d8, - 0x56d9, 0x56dc, 0x56e3, 0x56e5, 0x56e6, 0x56e7, 0x56e8, 0x56e9, - 0x56ea, 0x56ec, 0x56ee, 0x56ef, 0x56f2, 0x56f3, 0x56f6, 0x56f7, - 0x56f8, 0x56fb, 0x56fc, 0x5700, 0x5701, 0x5702, 0x5705, 0x5707, - 0x570b, 0x570c, 0x570d, 0x570e, 0x570f, 0x5710, 0x5711, 0x003f, - /* lead byte 88 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x5712, 0x5713, 0x5714, 0x5715, 0x5716, 0x5717, 0x5718, 0x5719, - 0x571a, 0x571b, 0x571d, 0x571e, 0x5720, 0x5721, 0x5722, 0x5724, - 0x5725, 0x5726, 0x5727, 0x572b, 0x5731, 0x5732, 0x5734, 0x5735, - 0x5736, 0x5737, 0x5738, 0x573c, 0x573d, 0x573f, 0x5741, 0x5743, - 0x5744, 0x5745, 0x5746, 0x5748, 0x5749, 0x574b, 0x5752, 0x5753, - 0x5754, 0x5755, 0x5756, 0x5758, 0x5759, 0x5762, 0x5763, 0x5765, - 0x5767, 0x576c, 0x576e, 0x5770, 0x5771, 0x5772, 0x5774, 0x5775, - 0x5778, 0x5779, 0x577a, 0x577d, 0x577e, 0x577f, 0x5780, 0x003f, - 0x5781, 0x5787, 0x5788, 0x5789, 0x578a, 0x578d, 0x578e, 0x578f, - 0x5790, 0x5791, 0x5794, 0x5795, 0x5796, 0x5797, 0x5798, 0x5799, - 0x579a, 0x579c, 0x579d, 0x579e, 0x579f, 0x57a5, 0x57a8, 0x57aa, - 0x57ac, 0x57af, 0x57b0, 0x57b1, 0x57b3, 0x57b5, 0x57b6, 0x57b7, - 0x57b9, 0x57ba, 0x57bb, 0x57bc, 0x57bd, 0x57be, 0x57bf, 0x57c0, - 0x57c1, 0x57c4, 0x57c5, 0x57c6, 0x57c7, 0x57c8, 0x57c9, 0x57ca, - 0x57cc, 0x57cd, 0x57d0, 0x57d1, 0x57d3, 0x57d6, 0x57d7, 0x57db, - 0x57dc, 0x57de, 0x57e1, 0x57e2, 0x57e3, 0x57e5, 0x57e6, 0x57e7, - 0x57e8, 0x57e9, 0x57ea, 0x57eb, 0x57ec, 0x57ee, 0x57f0, 0x57f1, - 0x57f2, 0x57f3, 0x57f5, 0x57f6, 0x57f7, 0x57fb, 0x57fc, 0x57fe, - 0x57ff, 0x5801, 0x5803, 0x5804, 0x5805, 0x5808, 0x5809, 0x580a, - 0x580c, 0x580e, 0x580f, 0x5810, 0x5812, 0x5813, 0x5814, 0x5816, - 0x5817, 0x5818, 0x581a, 0x581b, 0x581c, 0x581d, 0x581f, 0x5822, - 0x5823, 0x5825, 0x5826, 0x5827, 0x5828, 0x5829, 0x582b, 0x582c, - 0x582d, 0x582e, 0x582f, 0x5831, 0x5832, 0x5833, 0x5834, 0x5836, - 0x5837, 0x5838, 0x5839, 0x583a, 0x583b, 0x583c, 0x583d, 0x003f, - /* lead byte 89 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x583e, 0x583f, 0x5840, 0x5841, 0x5842, 0x5843, 0x5845, 0x5846, - 0x5847, 0x5848, 0x5849, 0x584a, 0x584b, 0x584e, 0x584f, 0x5850, - 0x5852, 0x5853, 0x5855, 0x5856, 0x5857, 0x5859, 0x585a, 0x585b, - 0x585c, 0x585d, 0x585f, 0x5860, 0x5861, 0x5862, 0x5863, 0x5864, - 0x5866, 0x5867, 0x5868, 0x5869, 0x586a, 0x586d, 0x586e, 0x586f, - 0x5870, 0x5871, 0x5872, 0x5873, 0x5874, 0x5875, 0x5876, 0x5877, - 0x5878, 0x5879, 0x587a, 0x587b, 0x587c, 0x587d, 0x587f, 0x5882, - 0x5884, 0x5886, 0x5887, 0x5888, 0x588a, 0x588b, 0x588c, 0x003f, - 0x588d, 0x588e, 0x588f, 0x5890, 0x5891, 0x5894, 0x5895, 0x5896, - 0x5897, 0x5898, 0x589b, 0x589c, 0x589d, 0x58a0, 0x58a1, 0x58a2, - 0x58a3, 0x58a4, 0x58a5, 0x58a6, 0x58a7, 0x58aa, 0x58ab, 0x58ac, - 0x58ad, 0x58ae, 0x58af, 0x58b0, 0x58b1, 0x58b2, 0x58b3, 0x58b4, - 0x58b5, 0x58b6, 0x58b7, 0x58b8, 0x58b9, 0x58ba, 0x58bb, 0x58bd, - 0x58be, 0x58bf, 0x58c0, 0x58c2, 0x58c3, 0x58c4, 0x58c6, 0x58c7, - 0x58c8, 0x58c9, 0x58ca, 0x58cb, 0x58cc, 0x58cd, 0x58ce, 0x58cf, - 0x58d0, 0x58d2, 0x58d3, 0x58d4, 0x58d6, 0x58d7, 0x58d8, 0x58d9, - 0x58da, 0x58db, 0x58dc, 0x58dd, 0x58de, 0x58df, 0x58e0, 0x58e1, - 0x58e2, 0x58e3, 0x58e5, 0x58e6, 0x58e7, 0x58e8, 0x58e9, 0x58ea, - 0x58ed, 0x58ef, 0x58f1, 0x58f2, 0x58f4, 0x58f5, 0x58f7, 0x58f8, - 0x58fa, 0x58fb, 0x58fc, 0x58fd, 0x58fe, 0x58ff, 0x5900, 0x5901, - 0x5903, 0x5905, 0x5906, 0x5908, 0x5909, 0x590a, 0x590b, 0x590c, - 0x590e, 0x5910, 0x5911, 0x5912, 0x5913, 0x5917, 0x5918, 0x591b, - 0x591d, 0x591e, 0x5920, 0x5921, 0x5922, 0x5923, 0x5926, 0x5928, - 0x592c, 0x5930, 0x5932, 0x5933, 0x5935, 0x5936, 0x593b, 0x003f, - /* lead byte 8a */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x593d, 0x593e, 0x593f, 0x5940, 0x5943, 0x5945, 0x5946, 0x594a, - 0x594c, 0x594d, 0x5950, 0x5952, 0x5953, 0x5959, 0x595b, 0x595c, - 0x595d, 0x595e, 0x595f, 0x5961, 0x5963, 0x5964, 0x5966, 0x5967, - 0x5968, 0x5969, 0x596a, 0x596b, 0x596c, 0x596d, 0x596e, 0x596f, - 0x5970, 0x5971, 0x5972, 0x5975, 0x5977, 0x597a, 0x597b, 0x597c, - 0x597e, 0x597f, 0x5980, 0x5985, 0x5989, 0x598b, 0x598c, 0x598e, - 0x598f, 0x5990, 0x5991, 0x5994, 0x5995, 0x5998, 0x599a, 0x599b, - 0x599c, 0x599d, 0x599f, 0x59a0, 0x59a1, 0x59a2, 0x59a6, 0x003f, - 0x59a7, 0x59ac, 0x59ad, 0x59b0, 0x59b1, 0x59b3, 0x59b4, 0x59b5, - 0x59b6, 0x59b7, 0x59b8, 0x59ba, 0x59bc, 0x59bd, 0x59bf, 0x59c0, - 0x59c1, 0x59c2, 0x59c3, 0x59c4, 0x59c5, 0x59c7, 0x59c8, 0x59c9, - 0x59cc, 0x59cd, 0x59ce, 0x59cf, 0x59d5, 0x59d6, 0x59d9, 0x59db, - 0x59de, 0x59df, 0x59e0, 0x59e1, 0x59e2, 0x59e4, 0x59e6, 0x59e7, - 0x59e9, 0x59ea, 0x59eb, 0x59ed, 0x59ee, 0x59ef, 0x59f0, 0x59f1, - 0x59f2, 0x59f3, 0x59f4, 0x59f5, 0x59f6, 0x59f7, 0x59f8, 0x59fa, - 0x59fc, 0x59fd, 0x59fe, 0x5a00, 0x5a02, 0x5a0a, 0x5a0b, 0x5a0d, - 0x5a0e, 0x5a0f, 0x5a10, 0x5a12, 0x5a14, 0x5a15, 0x5a16, 0x5a17, - 0x5a19, 0x5a1a, 0x5a1b, 0x5a1d, 0x5a1e, 0x5a21, 0x5a22, 0x5a24, - 0x5a26, 0x5a27, 0x5a28, 0x5a2a, 0x5a2b, 0x5a2c, 0x5a2d, 0x5a2e, - 0x5a2f, 0x5a30, 0x5a33, 0x5a35, 0x5a37, 0x5a38, 0x5a39, 0x5a3a, - 0x5a3b, 0x5a3d, 0x5a3e, 0x5a3f, 0x5a41, 0x5a42, 0x5a43, 0x5a44, - 0x5a45, 0x5a47, 0x5a48, 0x5a4b, 0x5a4c, 0x5a4d, 0x5a4e, 0x5a4f, - 0x5a50, 0x5a51, 0x5a52, 0x5a53, 0x5a54, 0x5a56, 0x5a57, 0x5a58, - 0x5a59, 0x5a5b, 0x5a5c, 0x5a5d, 0x5a5e, 0x5a5f, 0x5a60, 0x003f, - /* lead byte 8b */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x5a61, 0x5a63, 0x5a64, 0x5a65, 0x5a66, 0x5a68, 0x5a69, 0x5a6b, - 0x5a6c, 0x5a6d, 0x5a6e, 0x5a6f, 0x5a70, 0x5a71, 0x5a72, 0x5a73, - 0x5a78, 0x5a79, 0x5a7b, 0x5a7c, 0x5a7d, 0x5a7e, 0x5a80, 0x5a81, - 0x5a82, 0x5a83, 0x5a84, 0x5a85, 0x5a86, 0x5a87, 0x5a88, 0x5a89, - 0x5a8a, 0x5a8b, 0x5a8c, 0x5a8d, 0x5a8e, 0x5a8f, 0x5a90, 0x5a91, - 0x5a93, 0x5a94, 0x5a95, 0x5a96, 0x5a97, 0x5a98, 0x5a99, 0x5a9c, - 0x5a9d, 0x5a9e, 0x5a9f, 0x5aa0, 0x5aa1, 0x5aa2, 0x5aa3, 0x5aa4, - 0x5aa5, 0x5aa6, 0x5aa7, 0x5aa8, 0x5aa9, 0x5aab, 0x5aac, 0x003f, - 0x5aad, 0x5aae, 0x5aaf, 0x5ab0, 0x5ab1, 0x5ab4, 0x5ab6, 0x5ab7, - 0x5ab9, 0x5aba, 0x5abb, 0x5abc, 0x5abd, 0x5abf, 0x5ac0, 0x5ac3, - 0x5ac4, 0x5ac5, 0x5ac6, 0x5ac7, 0x5ac8, 0x5aca, 0x5acb, 0x5acd, - 0x5ace, 0x5acf, 0x5ad0, 0x5ad1, 0x5ad3, 0x5ad5, 0x5ad7, 0x5ad9, - 0x5ada, 0x5adb, 0x5add, 0x5ade, 0x5adf, 0x5ae2, 0x5ae4, 0x5ae5, - 0x5ae7, 0x5ae8, 0x5aea, 0x5aec, 0x5aed, 0x5aee, 0x5aef, 0x5af0, - 0x5af2, 0x5af3, 0x5af4, 0x5af5, 0x5af6, 0x5af7, 0x5af8, 0x5af9, - 0x5afa, 0x5afb, 0x5afc, 0x5afd, 0x5afe, 0x5aff, 0x5b00, 0x5b01, - 0x5b02, 0x5b03, 0x5b04, 0x5b05, 0x5b06, 0x5b07, 0x5b08, 0x5b0a, - 0x5b0b, 0x5b0c, 0x5b0d, 0x5b0e, 0x5b0f, 0x5b10, 0x5b11, 0x5b12, - 0x5b13, 0x5b14, 0x5b15, 0x5b18, 0x5b19, 0x5b1a, 0x5b1b, 0x5b1c, - 0x5b1d, 0x5b1e, 0x5b1f, 0x5b20, 0x5b21, 0x5b22, 0x5b23, 0x5b24, - 0x5b25, 0x5b26, 0x5b27, 0x5b28, 0x5b29, 0x5b2a, 0x5b2b, 0x5b2c, - 0x5b2d, 0x5b2e, 0x5b2f, 0x5b30, 0x5b31, 0x5b33, 0x5b35, 0x5b36, - 0x5b38, 0x5b39, 0x5b3a, 0x5b3b, 0x5b3c, 0x5b3d, 0x5b3e, 0x5b3f, - 0x5b41, 0x5b42, 0x5b43, 0x5b44, 0x5b45, 0x5b46, 0x5b47, 0x003f, - /* lead byte 8c */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x5b48, 0x5b49, 0x5b4a, 0x5b4b, 0x5b4c, 0x5b4d, 0x5b4e, 0x5b4f, - 0x5b52, 0x5b56, 0x5b5e, 0x5b60, 0x5b61, 0x5b67, 0x5b68, 0x5b6b, - 0x5b6d, 0x5b6e, 0x5b6f, 0x5b72, 0x5b74, 0x5b76, 0x5b77, 0x5b78, - 0x5b79, 0x5b7b, 0x5b7c, 0x5b7e, 0x5b7f, 0x5b82, 0x5b86, 0x5b8a, - 0x5b8d, 0x5b8e, 0x5b90, 0x5b91, 0x5b92, 0x5b94, 0x5b96, 0x5b9f, - 0x5ba7, 0x5ba8, 0x5ba9, 0x5bac, 0x5bad, 0x5bae, 0x5baf, 0x5bb1, - 0x5bb2, 0x5bb7, 0x5bba, 0x5bbb, 0x5bbc, 0x5bc0, 0x5bc1, 0x5bc3, - 0x5bc8, 0x5bc9, 0x5bca, 0x5bcb, 0x5bcd, 0x5bce, 0x5bcf, 0x003f, - 0x5bd1, 0x5bd4, 0x5bd5, 0x5bd6, 0x5bd7, 0x5bd8, 0x5bd9, 0x5bda, - 0x5bdb, 0x5bdc, 0x5be0, 0x5be2, 0x5be3, 0x5be6, 0x5be7, 0x5be9, - 0x5bea, 0x5beb, 0x5bec, 0x5bed, 0x5bef, 0x5bf1, 0x5bf2, 0x5bf3, - 0x5bf4, 0x5bf5, 0x5bf6, 0x5bf7, 0x5bfd, 0x5bfe, 0x5c00, 0x5c02, - 0x5c03, 0x5c05, 0x5c07, 0x5c08, 0x5c0b, 0x5c0c, 0x5c0d, 0x5c0e, - 0x5c10, 0x5c12, 0x5c13, 0x5c17, 0x5c19, 0x5c1b, 0x5c1e, 0x5c1f, - 0x5c20, 0x5c21, 0x5c23, 0x5c26, 0x5c28, 0x5c29, 0x5c2a, 0x5c2b, - 0x5c2d, 0x5c2e, 0x5c2f, 0x5c30, 0x5c32, 0x5c33, 0x5c35, 0x5c36, - 0x5c37, 0x5c43, 0x5c44, 0x5c46, 0x5c47, 0x5c4c, 0x5c4d, 0x5c52, - 0x5c53, 0x5c54, 0x5c56, 0x5c57, 0x5c58, 0x5c5a, 0x5c5b, 0x5c5c, - 0x5c5d, 0x5c5f, 0x5c62, 0x5c64, 0x5c67, 0x5c68, 0x5c69, 0x5c6a, - 0x5c6b, 0x5c6c, 0x5c6d, 0x5c70, 0x5c72, 0x5c73, 0x5c74, 0x5c75, - 0x5c76, 0x5c77, 0x5c78, 0x5c7b, 0x5c7c, 0x5c7d, 0x5c7e, 0x5c80, - 0x5c83, 0x5c84, 0x5c85, 0x5c86, 0x5c87, 0x5c89, 0x5c8a, 0x5c8b, - 0x5c8e, 0x5c8f, 0x5c92, 0x5c93, 0x5c95, 0x5c9d, 0x5c9e, 0x5c9f, - 0x5ca0, 0x5ca1, 0x5ca4, 0x5ca5, 0x5ca6, 0x5ca7, 0x5ca8, 0x003f, - /* lead byte 8d */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x5caa, 0x5cae, 0x5caf, 0x5cb0, 0x5cb2, 0x5cb4, 0x5cb6, 0x5cb9, - 0x5cba, 0x5cbb, 0x5cbc, 0x5cbe, 0x5cc0, 0x5cc2, 0x5cc3, 0x5cc5, - 0x5cc6, 0x5cc7, 0x5cc8, 0x5cc9, 0x5cca, 0x5ccc, 0x5ccd, 0x5cce, - 0x5ccf, 0x5cd0, 0x5cd1, 0x5cd3, 0x5cd4, 0x5cd5, 0x5cd6, 0x5cd7, - 0x5cd8, 0x5cda, 0x5cdb, 0x5cdc, 0x5cdd, 0x5cde, 0x5cdf, 0x5ce0, - 0x5ce2, 0x5ce3, 0x5ce7, 0x5ce9, 0x5ceb, 0x5cec, 0x5cee, 0x5cef, - 0x5cf1, 0x5cf2, 0x5cf3, 0x5cf4, 0x5cf5, 0x5cf6, 0x5cf7, 0x5cf8, - 0x5cf9, 0x5cfa, 0x5cfc, 0x5cfd, 0x5cfe, 0x5cff, 0x5d00, 0x003f, - 0x5d01, 0x5d04, 0x5d05, 0x5d08, 0x5d09, 0x5d0a, 0x5d0b, 0x5d0c, - 0x5d0d, 0x5d0f, 0x5d10, 0x5d11, 0x5d12, 0x5d13, 0x5d15, 0x5d17, - 0x5d18, 0x5d19, 0x5d1a, 0x5d1c, 0x5d1d, 0x5d1f, 0x5d20, 0x5d21, - 0x5d22, 0x5d23, 0x5d25, 0x5d28, 0x5d2a, 0x5d2b, 0x5d2c, 0x5d2f, - 0x5d30, 0x5d31, 0x5d32, 0x5d33, 0x5d35, 0x5d36, 0x5d37, 0x5d38, - 0x5d39, 0x5d3a, 0x5d3b, 0x5d3c, 0x5d3f, 0x5d40, 0x5d41, 0x5d42, - 0x5d43, 0x5d44, 0x5d45, 0x5d46, 0x5d48, 0x5d49, 0x5d4d, 0x5d4e, - 0x5d4f, 0x5d50, 0x5d51, 0x5d52, 0x5d53, 0x5d54, 0x5d55, 0x5d56, - 0x5d57, 0x5d59, 0x5d5a, 0x5d5c, 0x5d5e, 0x5d5f, 0x5d60, 0x5d61, - 0x5d62, 0x5d63, 0x5d64, 0x5d65, 0x5d66, 0x5d67, 0x5d68, 0x5d6a, - 0x5d6d, 0x5d6e, 0x5d70, 0x5d71, 0x5d72, 0x5d73, 0x5d75, 0x5d76, - 0x5d77, 0x5d78, 0x5d79, 0x5d7a, 0x5d7b, 0x5d7c, 0x5d7d, 0x5d7e, - 0x5d7f, 0x5d80, 0x5d81, 0x5d83, 0x5d84, 0x5d85, 0x5d86, 0x5d87, - 0x5d88, 0x5d89, 0x5d8a, 0x5d8b, 0x5d8c, 0x5d8d, 0x5d8e, 0x5d8f, - 0x5d90, 0x5d91, 0x5d92, 0x5d93, 0x5d94, 0x5d95, 0x5d96, 0x5d97, - 0x5d98, 0x5d9a, 0x5d9b, 0x5d9c, 0x5d9e, 0x5d9f, 0x5da0, 0x003f, - /* lead byte 8e */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x5da1, 0x5da2, 0x5da3, 0x5da4, 0x5da5, 0x5da6, 0x5da7, 0x5da8, - 0x5da9, 0x5daa, 0x5dab, 0x5dac, 0x5dad, 0x5dae, 0x5daf, 0x5db0, - 0x5db1, 0x5db2, 0x5db3, 0x5db4, 0x5db5, 0x5db6, 0x5db8, 0x5db9, - 0x5dba, 0x5dbb, 0x5dbc, 0x5dbd, 0x5dbe, 0x5dbf, 0x5dc0, 0x5dc1, - 0x5dc2, 0x5dc3, 0x5dc4, 0x5dc6, 0x5dc7, 0x5dc8, 0x5dc9, 0x5dca, - 0x5dcb, 0x5dcc, 0x5dce, 0x5dcf, 0x5dd0, 0x5dd1, 0x5dd2, 0x5dd3, - 0x5dd4, 0x5dd5, 0x5dd6, 0x5dd7, 0x5dd8, 0x5dd9, 0x5dda, 0x5ddc, - 0x5ddf, 0x5de0, 0x5de3, 0x5de4, 0x5dea, 0x5dec, 0x5ded, 0x003f, - 0x5df0, 0x5df5, 0x5df6, 0x5df8, 0x5df9, 0x5dfa, 0x5dfb, 0x5dfc, - 0x5dff, 0x5e00, 0x5e04, 0x5e07, 0x5e09, 0x5e0a, 0x5e0b, 0x5e0d, - 0x5e0e, 0x5e12, 0x5e13, 0x5e17, 0x5e1e, 0x5e1f, 0x5e20, 0x5e21, - 0x5e22, 0x5e23, 0x5e24, 0x5e25, 0x5e28, 0x5e29, 0x5e2a, 0x5e2b, - 0x5e2c, 0x5e2f, 0x5e30, 0x5e32, 0x5e33, 0x5e34, 0x5e35, 0x5e36, - 0x5e39, 0x5e3a, 0x5e3e, 0x5e3f, 0x5e40, 0x5e41, 0x5e43, 0x5e46, - 0x5e47, 0x5e48, 0x5e49, 0x5e4a, 0x5e4b, 0x5e4d, 0x5e4e, 0x5e4f, - 0x5e50, 0x5e51, 0x5e52, 0x5e53, 0x5e56, 0x5e57, 0x5e58, 0x5e59, - 0x5e5a, 0x5e5c, 0x5e5d, 0x5e5f, 0x5e60, 0x5e63, 0x5e64, 0x5e65, - 0x5e66, 0x5e67, 0x5e68, 0x5e69, 0x5e6a, 0x5e6b, 0x5e6c, 0x5e6d, - 0x5e6e, 0x5e6f, 0x5e70, 0x5e71, 0x5e75, 0x5e77, 0x5e79, 0x5e7e, - 0x5e81, 0x5e82, 0x5e83, 0x5e85, 0x5e88, 0x5e89, 0x5e8c, 0x5e8d, - 0x5e8e, 0x5e92, 0x5e98, 0x5e9b, 0x5e9d, 0x5ea1, 0x5ea2, 0x5ea3, - 0x5ea4, 0x5ea8, 0x5ea9, 0x5eaa, 0x5eab, 0x5eac, 0x5eae, 0x5eaf, - 0x5eb0, 0x5eb1, 0x5eb2, 0x5eb4, 0x5eba, 0x5ebb, 0x5ebc, 0x5ebd, - 0x5ebf, 0x5ec0, 0x5ec1, 0x5ec2, 0x5ec3, 0x5ec4, 0x5ec5, 0x003f, - /* lead byte 8f */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x5ec6, 0x5ec7, 0x5ec8, 0x5ecb, 0x5ecc, 0x5ecd, 0x5ece, 0x5ecf, - 0x5ed0, 0x5ed4, 0x5ed5, 0x5ed7, 0x5ed8, 0x5ed9, 0x5eda, 0x5edc, - 0x5edd, 0x5ede, 0x5edf, 0x5ee0, 0x5ee1, 0x5ee2, 0x5ee3, 0x5ee4, - 0x5ee5, 0x5ee6, 0x5ee7, 0x5ee9, 0x5eeb, 0x5eec, 0x5eed, 0x5eee, - 0x5eef, 0x5ef0, 0x5ef1, 0x5ef2, 0x5ef3, 0x5ef5, 0x5ef8, 0x5ef9, - 0x5efb, 0x5efc, 0x5efd, 0x5f05, 0x5f06, 0x5f07, 0x5f09, 0x5f0c, - 0x5f0d, 0x5f0e, 0x5f10, 0x5f12, 0x5f14, 0x5f16, 0x5f19, 0x5f1a, - 0x5f1c, 0x5f1d, 0x5f1e, 0x5f21, 0x5f22, 0x5f23, 0x5f24, 0x003f, - 0x5f28, 0x5f2b, 0x5f2c, 0x5f2e, 0x5f30, 0x5f32, 0x5f33, 0x5f34, - 0x5f35, 0x5f36, 0x5f37, 0x5f38, 0x5f3b, 0x5f3d, 0x5f3e, 0x5f3f, - 0x5f41, 0x5f42, 0x5f43, 0x5f44, 0x5f45, 0x5f46, 0x5f47, 0x5f48, - 0x5f49, 0x5f4a, 0x5f4b, 0x5f4c, 0x5f4d, 0x5f4e, 0x5f4f, 0x5f51, - 0x5f54, 0x5f59, 0x5f5a, 0x5f5b, 0x5f5c, 0x5f5e, 0x5f5f, 0x5f60, - 0x5f63, 0x5f65, 0x5f67, 0x5f68, 0x5f6b, 0x5f6e, 0x5f6f, 0x5f72, - 0x5f74, 0x5f75, 0x5f76, 0x5f78, 0x5f7a, 0x5f7d, 0x5f7e, 0x5f7f, - 0x5f83, 0x5f86, 0x5f8d, 0x5f8e, 0x5f8f, 0x5f91, 0x5f93, 0x5f94, - 0x5f96, 0x5f9a, 0x5f9b, 0x5f9d, 0x5f9e, 0x5f9f, 0x5fa0, 0x5fa2, - 0x5fa3, 0x5fa4, 0x5fa5, 0x5fa6, 0x5fa7, 0x5fa9, 0x5fab, 0x5fac, - 0x5faf, 0x5fb0, 0x5fb1, 0x5fb2, 0x5fb3, 0x5fb4, 0x5fb6, 0x5fb8, - 0x5fb9, 0x5fba, 0x5fbb, 0x5fbe, 0x5fbf, 0x5fc0, 0x5fc1, 0x5fc2, - 0x5fc7, 0x5fc8, 0x5fca, 0x5fcb, 0x5fce, 0x5fd3, 0x5fd4, 0x5fd5, - 0x5fda, 0x5fdb, 0x5fdc, 0x5fde, 0x5fdf, 0x5fe2, 0x5fe3, 0x5fe5, - 0x5fe6, 0x5fe8, 0x5fe9, 0x5fec, 0x5fef, 0x5ff0, 0x5ff2, 0x5ff3, - 0x5ff4, 0x5ff6, 0x5ff7, 0x5ff9, 0x5ffa, 0x5ffc, 0x6007, 0x003f, - /* lead byte 90 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6008, 0x6009, 0x600b, 0x600c, 0x6010, 0x6011, 0x6013, 0x6017, - 0x6018, 0x601a, 0x601e, 0x601f, 0x6022, 0x6023, 0x6024, 0x602c, - 0x602d, 0x602e, 0x6030, 0x6031, 0x6032, 0x6033, 0x6034, 0x6036, - 0x6037, 0x6038, 0x6039, 0x603a, 0x603d, 0x603e, 0x6040, 0x6044, - 0x6045, 0x6046, 0x6047, 0x6048, 0x6049, 0x604a, 0x604c, 0x604e, - 0x604f, 0x6051, 0x6053, 0x6054, 0x6056, 0x6057, 0x6058, 0x605b, - 0x605c, 0x605e, 0x605f, 0x6060, 0x6061, 0x6065, 0x6066, 0x606e, - 0x6071, 0x6072, 0x6074, 0x6075, 0x6077, 0x607e, 0x6080, 0x003f, - 0x6081, 0x6082, 0x6085, 0x6086, 0x6087, 0x6088, 0x608a, 0x608b, - 0x608e, 0x608f, 0x6090, 0x6091, 0x6093, 0x6095, 0x6097, 0x6098, - 0x6099, 0x609c, 0x609e, 0x60a1, 0x60a2, 0x60a4, 0x60a5, 0x60a7, - 0x60a9, 0x60aa, 0x60ae, 0x60b0, 0x60b3, 0x60b5, 0x60b6, 0x60b7, - 0x60b9, 0x60ba, 0x60bd, 0x60be, 0x60bf, 0x60c0, 0x60c1, 0x60c2, - 0x60c3, 0x60c4, 0x60c7, 0x60c8, 0x60c9, 0x60cc, 0x60cd, 0x60ce, - 0x60cf, 0x60d0, 0x60d2, 0x60d3, 0x60d4, 0x60d6, 0x60d7, 0x60d9, - 0x60db, 0x60de, 0x60e1, 0x60e2, 0x60e3, 0x60e4, 0x60e5, 0x60ea, - 0x60f1, 0x60f2, 0x60f5, 0x60f7, 0x60f8, 0x60fb, 0x60fc, 0x60fd, - 0x60fe, 0x60ff, 0x6102, 0x6103, 0x6104, 0x6105, 0x6107, 0x610a, - 0x610b, 0x610c, 0x6110, 0x6111, 0x6112, 0x6113, 0x6114, 0x6116, - 0x6117, 0x6118, 0x6119, 0x611b, 0x611c, 0x611d, 0x611e, 0x6121, - 0x6122, 0x6125, 0x6128, 0x6129, 0x612a, 0x612c, 0x612d, 0x612e, - 0x612f, 0x6130, 0x6131, 0x6132, 0x6133, 0x6134, 0x6135, 0x6136, - 0x6137, 0x6138, 0x6139, 0x613a, 0x613b, 0x613c, 0x613d, 0x613e, - 0x6140, 0x6141, 0x6142, 0x6143, 0x6144, 0x6145, 0x6146, 0x003f, - /* lead byte 91 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6147, 0x6149, 0x614b, 0x614d, 0x614f, 0x6150, 0x6152, 0x6153, - 0x6154, 0x6156, 0x6157, 0x6158, 0x6159, 0x615a, 0x615b, 0x615c, - 0x615e, 0x615f, 0x6160, 0x6161, 0x6163, 0x6164, 0x6165, 0x6166, - 0x6169, 0x616a, 0x616b, 0x616c, 0x616d, 0x616e, 0x616f, 0x6171, - 0x6172, 0x6173, 0x6174, 0x6176, 0x6178, 0x6179, 0x617a, 0x617b, - 0x617c, 0x617d, 0x617e, 0x617f, 0x6180, 0x6181, 0x6182, 0x6183, - 0x6184, 0x6185, 0x6186, 0x6187, 0x6188, 0x6189, 0x618a, 0x618c, - 0x618d, 0x618f, 0x6190, 0x6191, 0x6192, 0x6193, 0x6195, 0x003f, - 0x6196, 0x6197, 0x6198, 0x6199, 0x619a, 0x619b, 0x619c, 0x619e, - 0x619f, 0x61a0, 0x61a1, 0x61a2, 0x61a3, 0x61a4, 0x61a5, 0x61a6, - 0x61aa, 0x61ab, 0x61ad, 0x61ae, 0x61af, 0x61b0, 0x61b1, 0x61b2, - 0x61b3, 0x61b4, 0x61b5, 0x61b6, 0x61b8, 0x61b9, 0x61ba, 0x61bb, - 0x61bc, 0x61bd, 0x61bf, 0x61c0, 0x61c1, 0x61c3, 0x61c4, 0x61c5, - 0x61c6, 0x61c7, 0x61c9, 0x61cc, 0x61cd, 0x61ce, 0x61cf, 0x61d0, - 0x61d3, 0x61d5, 0x61d6, 0x61d7, 0x61d8, 0x61d9, 0x61da, 0x61db, - 0x61dc, 0x61dd, 0x61de, 0x61df, 0x61e0, 0x61e1, 0x61e2, 0x61e3, - 0x61e4, 0x61e5, 0x61e7, 0x61e8, 0x61e9, 0x61ea, 0x61eb, 0x61ec, - 0x61ed, 0x61ee, 0x61ef, 0x61f0, 0x61f1, 0x61f2, 0x61f3, 0x61f4, - 0x61f6, 0x61f7, 0x61f8, 0x61f9, 0x61fa, 0x61fb, 0x61fc, 0x61fd, - 0x61fe, 0x6200, 0x6201, 0x6202, 0x6203, 0x6204, 0x6205, 0x6207, - 0x6209, 0x6213, 0x6214, 0x6219, 0x621c, 0x621d, 0x621e, 0x6220, - 0x6223, 0x6226, 0x6227, 0x6228, 0x6229, 0x622b, 0x622d, 0x622f, - 0x6230, 0x6231, 0x6232, 0x6235, 0x6236, 0x6238, 0x6239, 0x623a, - 0x623b, 0x623c, 0x6242, 0x6244, 0x6245, 0x6246, 0x624a, 0x003f, - /* lead byte 92 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x624f, 0x6250, 0x6255, 0x6256, 0x6257, 0x6259, 0x625a, 0x625c, - 0x625d, 0x625e, 0x625f, 0x6260, 0x6261, 0x6262, 0x6264, 0x6265, - 0x6268, 0x6271, 0x6272, 0x6274, 0x6275, 0x6277, 0x6278, 0x627a, - 0x627b, 0x627d, 0x6281, 0x6282, 0x6283, 0x6285, 0x6286, 0x6287, - 0x6288, 0x628b, 0x628c, 0x628d, 0x628e, 0x628f, 0x6290, 0x6294, - 0x6299, 0x629c, 0x629d, 0x629e, 0x62a3, 0x62a6, 0x62a7, 0x62a9, - 0x62aa, 0x62ad, 0x62ae, 0x62af, 0x62b0, 0x62b2, 0x62b3, 0x62b4, - 0x62b6, 0x62b7, 0x62b8, 0x62ba, 0x62be, 0x62c0, 0x62c1, 0x003f, - 0x62c3, 0x62cb, 0x62cf, 0x62d1, 0x62d5, 0x62dd, 0x62de, 0x62e0, - 0x62e1, 0x62e4, 0x62ea, 0x62eb, 0x62f0, 0x62f2, 0x62f5, 0x62f8, - 0x62f9, 0x62fa, 0x62fb, 0x6300, 0x6303, 0x6304, 0x6305, 0x6306, - 0x630a, 0x630b, 0x630c, 0x630d, 0x630f, 0x6310, 0x6312, 0x6313, - 0x6314, 0x6315, 0x6317, 0x6318, 0x6319, 0x631c, 0x6326, 0x6327, - 0x6329, 0x632c, 0x632d, 0x632e, 0x6330, 0x6331, 0x6333, 0x6334, - 0x6335, 0x6336, 0x6337, 0x6338, 0x633b, 0x633c, 0x633e, 0x633f, - 0x6340, 0x6341, 0x6344, 0x6347, 0x6348, 0x634a, 0x6351, 0x6352, - 0x6353, 0x6354, 0x6356, 0x6357, 0x6358, 0x6359, 0x635a, 0x635b, - 0x635c, 0x635d, 0x6360, 0x6364, 0x6365, 0x6366, 0x6368, 0x636a, - 0x636b, 0x636c, 0x636f, 0x6370, 0x6372, 0x6373, 0x6374, 0x6375, - 0x6378, 0x6379, 0x637c, 0x637d, 0x637e, 0x637f, 0x6381, 0x6383, - 0x6384, 0x6385, 0x6386, 0x638b, 0x638d, 0x6391, 0x6393, 0x6394, - 0x6395, 0x6397, 0x6399, 0x639a, 0x639b, 0x639c, 0x639d, 0x639e, - 0x639f, 0x63a1, 0x63a4, 0x63a6, 0x63ab, 0x63af, 0x63b1, 0x63b2, - 0x63b5, 0x63b6, 0x63b9, 0x63bb, 0x63bd, 0x63bf, 0x63c0, 0x003f, - /* lead byte 93 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x63c1, 0x63c2, 0x63c3, 0x63c5, 0x63c7, 0x63c8, 0x63ca, 0x63cb, - 0x63cc, 0x63d1, 0x63d3, 0x63d4, 0x63d5, 0x63d7, 0x63d8, 0x63d9, - 0x63da, 0x63db, 0x63dc, 0x63dd, 0x63df, 0x63e2, 0x63e4, 0x63e5, - 0x63e6, 0x63e7, 0x63e8, 0x63eb, 0x63ec, 0x63ee, 0x63ef, 0x63f0, - 0x63f1, 0x63f3, 0x63f5, 0x63f7, 0x63f9, 0x63fa, 0x63fb, 0x63fc, - 0x63fe, 0x6403, 0x6404, 0x6406, 0x6407, 0x6408, 0x6409, 0x640a, - 0x640d, 0x640e, 0x6411, 0x6412, 0x6415, 0x6416, 0x6417, 0x6418, - 0x6419, 0x641a, 0x641d, 0x641f, 0x6422, 0x6423, 0x6424, 0x003f, - 0x6425, 0x6427, 0x6428, 0x6429, 0x642b, 0x642e, 0x642f, 0x6430, - 0x6431, 0x6432, 0x6433, 0x6435, 0x6436, 0x6437, 0x6438, 0x6439, - 0x643b, 0x643c, 0x643e, 0x6440, 0x6442, 0x6443, 0x6449, 0x644b, - 0x644c, 0x644d, 0x644e, 0x644f, 0x6450, 0x6451, 0x6453, 0x6455, - 0x6456, 0x6457, 0x6459, 0x645a, 0x645b, 0x645c, 0x645d, 0x645f, - 0x6460, 0x6461, 0x6462, 0x6463, 0x6464, 0x6465, 0x6466, 0x6468, - 0x646a, 0x646b, 0x646c, 0x646e, 0x646f, 0x6470, 0x6471, 0x6472, - 0x6473, 0x6474, 0x6475, 0x6476, 0x6477, 0x647b, 0x647c, 0x647d, - 0x647e, 0x647f, 0x6480, 0x6481, 0x6483, 0x6486, 0x6488, 0x6489, - 0x648a, 0x648b, 0x648c, 0x648d, 0x648e, 0x648f, 0x6490, 0x6493, - 0x6494, 0x6497, 0x6498, 0x649a, 0x649b, 0x649c, 0x649d, 0x649f, - 0x64a0, 0x64a1, 0x64a2, 0x64a3, 0x64a5, 0x64a6, 0x64a7, 0x64a8, - 0x64aa, 0x64ab, 0x64af, 0x64b1, 0x64b2, 0x64b3, 0x64b4, 0x64b6, - 0x64b9, 0x64bb, 0x64bd, 0x64be, 0x64bf, 0x64c1, 0x64c3, 0x64c4, - 0x64c6, 0x64c7, 0x64c8, 0x64c9, 0x64ca, 0x64cb, 0x64cc, 0x64cf, - 0x64d1, 0x64d3, 0x64d4, 0x64d5, 0x64d6, 0x64d9, 0x64da, 0x003f, - /* lead byte 94 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x64db, 0x64dc, 0x64dd, 0x64df, 0x64e0, 0x64e1, 0x64e3, 0x64e5, - 0x64e7, 0x64e8, 0x64e9, 0x64ea, 0x64eb, 0x64ec, 0x64ed, 0x64ee, - 0x64ef, 0x64f0, 0x64f1, 0x64f2, 0x64f3, 0x64f4, 0x64f5, 0x64f6, - 0x64f7, 0x64f8, 0x64f9, 0x64fa, 0x64fb, 0x64fc, 0x64fd, 0x64fe, - 0x64ff, 0x6501, 0x6502, 0x6503, 0x6504, 0x6505, 0x6506, 0x6507, - 0x6508, 0x650a, 0x650b, 0x650c, 0x650d, 0x650e, 0x650f, 0x6510, - 0x6511, 0x6513, 0x6514, 0x6515, 0x6516, 0x6517, 0x6519, 0x651a, - 0x651b, 0x651c, 0x651d, 0x651e, 0x651f, 0x6520, 0x6521, 0x003f, - 0x6522, 0x6523, 0x6524, 0x6526, 0x6527, 0x6528, 0x6529, 0x652a, - 0x652c, 0x652d, 0x6530, 0x6531, 0x6532, 0x6533, 0x6537, 0x653a, - 0x653c, 0x653d, 0x6540, 0x6541, 0x6542, 0x6543, 0x6544, 0x6546, - 0x6547, 0x654a, 0x654b, 0x654d, 0x654e, 0x6550, 0x6552, 0x6553, - 0x6554, 0x6557, 0x6558, 0x655a, 0x655c, 0x655f, 0x6560, 0x6561, - 0x6564, 0x6565, 0x6567, 0x6568, 0x6569, 0x656a, 0x656d, 0x656e, - 0x656f, 0x6571, 0x6573, 0x6575, 0x6576, 0x6578, 0x6579, 0x657a, - 0x657b, 0x657c, 0x657d, 0x657e, 0x657f, 0x6580, 0x6581, 0x6582, - 0x6583, 0x6584, 0x6585, 0x6586, 0x6588, 0x6589, 0x658a, 0x658d, - 0x658e, 0x658f, 0x6592, 0x6594, 0x6595, 0x6596, 0x6598, 0x659a, - 0x659d, 0x659e, 0x65a0, 0x65a2, 0x65a3, 0x65a6, 0x65a8, 0x65aa, - 0x65ac, 0x65ae, 0x65b1, 0x65b2, 0x65b3, 0x65b4, 0x65b5, 0x65b6, - 0x65b7, 0x65b8, 0x65ba, 0x65bb, 0x65be, 0x65bf, 0x65c0, 0x65c2, - 0x65c7, 0x65c8, 0x65c9, 0x65ca, 0x65cd, 0x65d0, 0x65d1, 0x65d3, - 0x65d4, 0x65d5, 0x65d8, 0x65d9, 0x65da, 0x65db, 0x65dc, 0x65dd, - 0x65de, 0x65df, 0x65e1, 0x65e3, 0x65e4, 0x65ea, 0x65eb, 0x003f, - /* lead byte 95 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x65f2, 0x65f3, 0x65f4, 0x65f5, 0x65f8, 0x65f9, 0x65fb, 0x65fc, - 0x65fd, 0x65fe, 0x65ff, 0x6601, 0x6604, 0x6605, 0x6607, 0x6608, - 0x6609, 0x660b, 0x660d, 0x6610, 0x6611, 0x6612, 0x6616, 0x6617, - 0x6618, 0x661a, 0x661b, 0x661c, 0x661e, 0x6621, 0x6622, 0x6623, - 0x6624, 0x6626, 0x6629, 0x662a, 0x662b, 0x662c, 0x662e, 0x6630, - 0x6632, 0x6633, 0x6637, 0x6638, 0x6639, 0x663a, 0x663b, 0x663d, - 0x663f, 0x6640, 0x6642, 0x6644, 0x6645, 0x6646, 0x6647, 0x6648, - 0x6649, 0x664a, 0x664d, 0x664e, 0x6650, 0x6651, 0x6658, 0x003f, - 0x6659, 0x665b, 0x665c, 0x665d, 0x665e, 0x6660, 0x6662, 0x6663, - 0x6665, 0x6667, 0x6669, 0x666a, 0x666b, 0x666c, 0x666d, 0x6671, - 0x6672, 0x6673, 0x6675, 0x6678, 0x6679, 0x667b, 0x667c, 0x667d, - 0x667f, 0x6680, 0x6681, 0x6683, 0x6685, 0x6686, 0x6688, 0x6689, - 0x668a, 0x668b, 0x668d, 0x668e, 0x668f, 0x6690, 0x6692, 0x6693, - 0x6694, 0x6695, 0x6698, 0x6699, 0x669a, 0x669b, 0x669c, 0x669e, - 0x669f, 0x66a0, 0x66a1, 0x66a2, 0x66a3, 0x66a4, 0x66a5, 0x66a6, - 0x66a9, 0x66aa, 0x66ab, 0x66ac, 0x66ad, 0x66af, 0x66b0, 0x66b1, - 0x66b2, 0x66b3, 0x66b5, 0x66b6, 0x66b7, 0x66b8, 0x66ba, 0x66bb, - 0x66bc, 0x66bd, 0x66bf, 0x66c0, 0x66c1, 0x66c2, 0x66c3, 0x66c4, - 0x66c5, 0x66c6, 0x66c7, 0x66c8, 0x66c9, 0x66ca, 0x66cb, 0x66cc, - 0x66cd, 0x66ce, 0x66cf, 0x66d0, 0x66d1, 0x66d2, 0x66d3, 0x66d4, - 0x66d5, 0x66d6, 0x66d7, 0x66d8, 0x66da, 0x66de, 0x66df, 0x66e0, - 0x66e1, 0x66e2, 0x66e3, 0x66e4, 0x66e5, 0x66e7, 0x66e8, 0x66ea, - 0x66eb, 0x66ec, 0x66ed, 0x66ee, 0x66ef, 0x66f1, 0x66f5, 0x66f6, - 0x66f8, 0x66fa, 0x66fb, 0x66fd, 0x6701, 0x6702, 0x6703, 0x003f, - /* lead byte 96 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6704, 0x6705, 0x6706, 0x6707, 0x670c, 0x670e, 0x670f, 0x6711, - 0x6712, 0x6713, 0x6716, 0x6718, 0x6719, 0x671a, 0x671c, 0x671e, - 0x6720, 0x6721, 0x6722, 0x6723, 0x6724, 0x6725, 0x6727, 0x6729, - 0x672e, 0x6730, 0x6732, 0x6733, 0x6736, 0x6737, 0x6738, 0x6739, - 0x673b, 0x673c, 0x673e, 0x673f, 0x6741, 0x6744, 0x6745, 0x6747, - 0x674a, 0x674b, 0x674d, 0x6752, 0x6754, 0x6755, 0x6757, 0x6758, - 0x6759, 0x675a, 0x675b, 0x675d, 0x6762, 0x6763, 0x6764, 0x6766, - 0x6767, 0x676b, 0x676c, 0x676e, 0x6771, 0x6774, 0x6776, 0x003f, - 0x6778, 0x6779, 0x677a, 0x677b, 0x677d, 0x6780, 0x6782, 0x6783, - 0x6785, 0x6786, 0x6788, 0x678a, 0x678c, 0x678d, 0x678e, 0x678f, - 0x6791, 0x6792, 0x6793, 0x6794, 0x6796, 0x6799, 0x679b, 0x679f, - 0x67a0, 0x67a1, 0x67a4, 0x67a6, 0x67a9, 0x67ac, 0x67ae, 0x67b1, - 0x67b2, 0x67b4, 0x67b9, 0x67ba, 0x67bb, 0x67bc, 0x67bd, 0x67be, - 0x67bf, 0x67c0, 0x67c2, 0x67c5, 0x67c6, 0x67c7, 0x67c8, 0x67c9, - 0x67ca, 0x67cb, 0x67cc, 0x67cd, 0x67ce, 0x67d5, 0x67d6, 0x67d7, - 0x67db, 0x67df, 0x67e1, 0x67e3, 0x67e4, 0x67e6, 0x67e7, 0x67e8, - 0x67ea, 0x67eb, 0x67ed, 0x67ee, 0x67f2, 0x67f5, 0x67f6, 0x67f7, - 0x67f8, 0x67f9, 0x67fa, 0x67fb, 0x67fc, 0x67fe, 0x6801, 0x6802, - 0x6803, 0x6804, 0x6806, 0x680d, 0x6810, 0x6812, 0x6814, 0x6815, - 0x6818, 0x6819, 0x681a, 0x681b, 0x681c, 0x681e, 0x681f, 0x6820, - 0x6822, 0x6823, 0x6824, 0x6825, 0x6826, 0x6827, 0x6828, 0x682b, - 0x682c, 0x682d, 0x682e, 0x682f, 0x6830, 0x6831, 0x6834, 0x6835, - 0x6836, 0x683a, 0x683b, 0x683f, 0x6847, 0x684b, 0x684d, 0x684f, - 0x6852, 0x6856, 0x6857, 0x6858, 0x6859, 0x685a, 0x685b, 0x003f, - /* lead byte 97 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x685c, 0x685d, 0x685e, 0x685f, 0x686a, 0x686c, 0x686d, 0x686e, - 0x686f, 0x6870, 0x6871, 0x6872, 0x6873, 0x6875, 0x6878, 0x6879, - 0x687a, 0x687b, 0x687c, 0x687d, 0x687e, 0x687f, 0x6880, 0x6882, - 0x6884, 0x6887, 0x6888, 0x6889, 0x688a, 0x688b, 0x688c, 0x688d, - 0x688e, 0x6890, 0x6891, 0x6892, 0x6894, 0x6895, 0x6896, 0x6898, - 0x6899, 0x689a, 0x689b, 0x689c, 0x689d, 0x689e, 0x689f, 0x68a0, - 0x68a1, 0x68a3, 0x68a4, 0x68a5, 0x68a9, 0x68aa, 0x68ab, 0x68ac, - 0x68ae, 0x68b1, 0x68b2, 0x68b4, 0x68b6, 0x68b7, 0x68b8, 0x003f, - 0x68b9, 0x68ba, 0x68bb, 0x68bc, 0x68bd, 0x68be, 0x68bf, 0x68c1, - 0x68c3, 0x68c4, 0x68c5, 0x68c6, 0x68c7, 0x68c8, 0x68ca, 0x68cc, - 0x68ce, 0x68cf, 0x68d0, 0x68d1, 0x68d3, 0x68d4, 0x68d6, 0x68d7, - 0x68d9, 0x68db, 0x68dc, 0x68dd, 0x68de, 0x68df, 0x68e1, 0x68e2, - 0x68e4, 0x68e5, 0x68e6, 0x68e7, 0x68e8, 0x68e9, 0x68ea, 0x68eb, - 0x68ec, 0x68ed, 0x68ef, 0x68f2, 0x68f3, 0x68f4, 0x68f6, 0x68f7, - 0x68f8, 0x68fb, 0x68fd, 0x68fe, 0x68ff, 0x6900, 0x6902, 0x6903, - 0x6904, 0x6906, 0x6907, 0x6908, 0x6909, 0x690a, 0x690c, 0x690f, - 0x6911, 0x6913, 0x6914, 0x6915, 0x6916, 0x6917, 0x6918, 0x6919, - 0x691a, 0x691b, 0x691c, 0x691d, 0x691e, 0x6921, 0x6922, 0x6923, - 0x6925, 0x6926, 0x6927, 0x6928, 0x6929, 0x692a, 0x692b, 0x692c, - 0x692e, 0x692f, 0x6931, 0x6932, 0x6933, 0x6935, 0x6936, 0x6937, - 0x6938, 0x693a, 0x693b, 0x693c, 0x693e, 0x6940, 0x6941, 0x6943, - 0x6944, 0x6945, 0x6946, 0x6947, 0x6948, 0x6949, 0x694a, 0x694b, - 0x694c, 0x694d, 0x694e, 0x694f, 0x6950, 0x6951, 0x6952, 0x6953, - 0x6955, 0x6956, 0x6958, 0x6959, 0x695b, 0x695c, 0x695f, 0x003f, - /* lead byte 98 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6961, 0x6962, 0x6964, 0x6965, 0x6967, 0x6968, 0x6969, 0x696a, - 0x696c, 0x696d, 0x696f, 0x6970, 0x6972, 0x6973, 0x6974, 0x6975, - 0x6976, 0x697a, 0x697b, 0x697d, 0x697e, 0x697f, 0x6981, 0x6983, - 0x6985, 0x698a, 0x698b, 0x698c, 0x698e, 0x698f, 0x6990, 0x6991, - 0x6992, 0x6993, 0x6996, 0x6997, 0x6999, 0x699a, 0x699d, 0x699e, - 0x699f, 0x69a0, 0x69a1, 0x69a2, 0x69a3, 0x69a4, 0x69a5, 0x69a6, - 0x69a9, 0x69aa, 0x69ac, 0x69ae, 0x69af, 0x69b0, 0x69b2, 0x69b3, - 0x69b5, 0x69b6, 0x69b8, 0x69b9, 0x69ba, 0x69bc, 0x69bd, 0x003f, - 0x69be, 0x69bf, 0x69c0, 0x69c2, 0x69c3, 0x69c4, 0x69c5, 0x69c6, - 0x69c7, 0x69c8, 0x69c9, 0x69cb, 0x69cd, 0x69cf, 0x69d1, 0x69d2, - 0x69d3, 0x69d5, 0x69d6, 0x69d7, 0x69d8, 0x69d9, 0x69da, 0x69dc, - 0x69dd, 0x69de, 0x69e1, 0x69e2, 0x69e3, 0x69e4, 0x69e5, 0x69e6, - 0x69e7, 0x69e8, 0x69e9, 0x69ea, 0x69eb, 0x69ec, 0x69ee, 0x69ef, - 0x69f0, 0x69f1, 0x69f3, 0x69f4, 0x69f5, 0x69f6, 0x69f7, 0x69f8, - 0x69f9, 0x69fa, 0x69fb, 0x69fc, 0x69fe, 0x6a00, 0x6a01, 0x6a02, - 0x6a03, 0x6a04, 0x6a05, 0x6a06, 0x6a07, 0x6a08, 0x6a09, 0x6a0b, - 0x6a0c, 0x6a0d, 0x6a0e, 0x6a0f, 0x6a10, 0x6a11, 0x6a12, 0x6a13, - 0x6a14, 0x6a15, 0x6a16, 0x6a19, 0x6a1a, 0x6a1b, 0x6a1c, 0x6a1d, - 0x6a1e, 0x6a20, 0x6a22, 0x6a23, 0x6a24, 0x6a25, 0x6a26, 0x6a27, - 0x6a29, 0x6a2b, 0x6a2c, 0x6a2d, 0x6a2e, 0x6a30, 0x6a32, 0x6a33, - 0x6a34, 0x6a36, 0x6a37, 0x6a38, 0x6a39, 0x6a3a, 0x6a3b, 0x6a3c, - 0x6a3f, 0x6a40, 0x6a41, 0x6a42, 0x6a43, 0x6a45, 0x6a46, 0x6a48, - 0x6a49, 0x6a4a, 0x6a4b, 0x6a4c, 0x6a4d, 0x6a4e, 0x6a4f, 0x6a51, - 0x6a52, 0x6a53, 0x6a54, 0x6a55, 0x6a56, 0x6a57, 0x6a5a, 0x003f, - /* lead byte 99 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6a5c, 0x6a5d, 0x6a5e, 0x6a5f, 0x6a60, 0x6a62, 0x6a63, 0x6a64, - 0x6a66, 0x6a67, 0x6a68, 0x6a69, 0x6a6a, 0x6a6b, 0x6a6c, 0x6a6d, - 0x6a6e, 0x6a6f, 0x6a70, 0x6a72, 0x6a73, 0x6a74, 0x6a75, 0x6a76, - 0x6a77, 0x6a78, 0x6a7a, 0x6a7b, 0x6a7d, 0x6a7e, 0x6a7f, 0x6a81, - 0x6a82, 0x6a83, 0x6a85, 0x6a86, 0x6a87, 0x6a88, 0x6a89, 0x6a8a, - 0x6a8b, 0x6a8c, 0x6a8d, 0x6a8f, 0x6a92, 0x6a93, 0x6a94, 0x6a95, - 0x6a96, 0x6a98, 0x6a99, 0x6a9a, 0x6a9b, 0x6a9c, 0x6a9d, 0x6a9e, - 0x6a9f, 0x6aa1, 0x6aa2, 0x6aa3, 0x6aa4, 0x6aa5, 0x6aa6, 0x003f, - 0x6aa7, 0x6aa8, 0x6aaa, 0x6aad, 0x6aae, 0x6aaf, 0x6ab0, 0x6ab1, - 0x6ab2, 0x6ab3, 0x6ab4, 0x6ab5, 0x6ab6, 0x6ab7, 0x6ab8, 0x6ab9, - 0x6aba, 0x6abb, 0x6abc, 0x6abd, 0x6abe, 0x6abf, 0x6ac0, 0x6ac1, - 0x6ac2, 0x6ac3, 0x6ac4, 0x6ac5, 0x6ac6, 0x6ac7, 0x6ac8, 0x6ac9, - 0x6aca, 0x6acb, 0x6acc, 0x6acd, 0x6ace, 0x6acf, 0x6ad0, 0x6ad1, - 0x6ad2, 0x6ad3, 0x6ad4, 0x6ad5, 0x6ad6, 0x6ad7, 0x6ad8, 0x6ad9, - 0x6ada, 0x6adb, 0x6adc, 0x6add, 0x6ade, 0x6adf, 0x6ae0, 0x6ae1, - 0x6ae2, 0x6ae3, 0x6ae4, 0x6ae5, 0x6ae6, 0x6ae7, 0x6ae8, 0x6ae9, - 0x6aea, 0x6aeb, 0x6aec, 0x6aed, 0x6aee, 0x6aef, 0x6af0, 0x6af1, - 0x6af2, 0x6af3, 0x6af4, 0x6af5, 0x6af6, 0x6af7, 0x6af8, 0x6af9, - 0x6afa, 0x6afb, 0x6afc, 0x6afd, 0x6afe, 0x6aff, 0x6b00, 0x6b01, - 0x6b02, 0x6b03, 0x6b04, 0x6b05, 0x6b06, 0x6b07, 0x6b08, 0x6b09, - 0x6b0a, 0x6b0b, 0x6b0c, 0x6b0d, 0x6b0e, 0x6b0f, 0x6b10, 0x6b11, - 0x6b12, 0x6b13, 0x6b14, 0x6b15, 0x6b16, 0x6b17, 0x6b18, 0x6b19, - 0x6b1a, 0x6b1b, 0x6b1c, 0x6b1d, 0x6b1e, 0x6b1f, 0x6b25, 0x6b26, - 0x6b28, 0x6b29, 0x6b2a, 0x6b2b, 0x6b2c, 0x6b2d, 0x6b2e, 0x003f, - /* lead byte 9a */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6b2f, 0x6b30, 0x6b31, 0x6b33, 0x6b34, 0x6b35, 0x6b36, 0x6b38, - 0x6b3b, 0x6b3c, 0x6b3d, 0x6b3f, 0x6b40, 0x6b41, 0x6b42, 0x6b44, - 0x6b45, 0x6b48, 0x6b4a, 0x6b4b, 0x6b4d, 0x6b4e, 0x6b4f, 0x6b50, - 0x6b51, 0x6b52, 0x6b53, 0x6b54, 0x6b55, 0x6b56, 0x6b57, 0x6b58, - 0x6b5a, 0x6b5b, 0x6b5c, 0x6b5d, 0x6b5e, 0x6b5f, 0x6b60, 0x6b61, - 0x6b68, 0x6b69, 0x6b6b, 0x6b6c, 0x6b6d, 0x6b6e, 0x6b6f, 0x6b70, - 0x6b71, 0x6b72, 0x6b73, 0x6b74, 0x6b75, 0x6b76, 0x6b77, 0x6b78, - 0x6b7a, 0x6b7d, 0x6b7e, 0x6b7f, 0x6b80, 0x6b85, 0x6b88, 0x003f, - 0x6b8c, 0x6b8e, 0x6b8f, 0x6b90, 0x6b91, 0x6b94, 0x6b95, 0x6b97, - 0x6b98, 0x6b99, 0x6b9c, 0x6b9d, 0x6b9e, 0x6b9f, 0x6ba0, 0x6ba2, - 0x6ba3, 0x6ba4, 0x6ba5, 0x6ba6, 0x6ba7, 0x6ba8, 0x6ba9, 0x6bab, - 0x6bac, 0x6bad, 0x6bae, 0x6baf, 0x6bb0, 0x6bb1, 0x6bb2, 0x6bb6, - 0x6bb8, 0x6bb9, 0x6bba, 0x6bbb, 0x6bbc, 0x6bbd, 0x6bbe, 0x6bc0, - 0x6bc3, 0x6bc4, 0x6bc6, 0x6bc7, 0x6bc8, 0x6bc9, 0x6bca, 0x6bcc, - 0x6bce, 0x6bd0, 0x6bd1, 0x6bd8, 0x6bda, 0x6bdc, 0x6bdd, 0x6bde, - 0x6bdf, 0x6be0, 0x6be2, 0x6be3, 0x6be4, 0x6be5, 0x6be6, 0x6be7, - 0x6be8, 0x6be9, 0x6bec, 0x6bed, 0x6bee, 0x6bf0, 0x6bf1, 0x6bf2, - 0x6bf4, 0x6bf6, 0x6bf7, 0x6bf8, 0x6bfa, 0x6bfb, 0x6bfc, 0x6bfe, - 0x6bff, 0x6c00, 0x6c01, 0x6c02, 0x6c03, 0x6c04, 0x6c08, 0x6c09, - 0x6c0a, 0x6c0b, 0x6c0c, 0x6c0e, 0x6c12, 0x6c17, 0x6c1c, 0x6c1d, - 0x6c1e, 0x6c20, 0x6c23, 0x6c25, 0x6c2b, 0x6c2c, 0x6c2d, 0x6c31, - 0x6c33, 0x6c36, 0x6c37, 0x6c39, 0x6c3a, 0x6c3b, 0x6c3c, 0x6c3e, - 0x6c3f, 0x6c43, 0x6c44, 0x6c45, 0x6c48, 0x6c4b, 0x6c4c, 0x6c4d, - 0x6c4e, 0x6c4f, 0x6c51, 0x6c52, 0x6c53, 0x6c56, 0x6c58, 0x003f, - /* lead byte 9b */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6c59, 0x6c5a, 0x6c62, 0x6c63, 0x6c65, 0x6c66, 0x6c67, 0x6c6b, - 0x6c6c, 0x6c6d, 0x6c6e, 0x6c6f, 0x6c71, 0x6c73, 0x6c75, 0x6c77, - 0x6c78, 0x6c7a, 0x6c7b, 0x6c7c, 0x6c7f, 0x6c80, 0x6c84, 0x6c87, - 0x6c8a, 0x6c8b, 0x6c8d, 0x6c8e, 0x6c91, 0x6c92, 0x6c95, 0x6c96, - 0x6c97, 0x6c98, 0x6c9a, 0x6c9c, 0x6c9d, 0x6c9e, 0x6ca0, 0x6ca2, - 0x6ca8, 0x6cac, 0x6caf, 0x6cb0, 0x6cb4, 0x6cb5, 0x6cb6, 0x6cb7, - 0x6cba, 0x6cc0, 0x6cc1, 0x6cc2, 0x6cc3, 0x6cc6, 0x6cc7, 0x6cc8, - 0x6ccb, 0x6ccd, 0x6cce, 0x6ccf, 0x6cd1, 0x6cd2, 0x6cd8, 0x003f, - 0x6cd9, 0x6cda, 0x6cdc, 0x6cdd, 0x6cdf, 0x6ce4, 0x6ce6, 0x6ce7, - 0x6ce9, 0x6cec, 0x6ced, 0x6cf2, 0x6cf4, 0x6cf9, 0x6cff, 0x6d00, - 0x6d02, 0x6d03, 0x6d05, 0x6d06, 0x6d08, 0x6d09, 0x6d0a, 0x6d0d, - 0x6d0f, 0x6d10, 0x6d11, 0x6d13, 0x6d14, 0x6d15, 0x6d16, 0x6d18, - 0x6d1c, 0x6d1d, 0x6d1f, 0x6d20, 0x6d21, 0x6d22, 0x6d23, 0x6d24, - 0x6d26, 0x6d28, 0x6d29, 0x6d2c, 0x6d2d, 0x6d2f, 0x6d30, 0x6d34, - 0x6d36, 0x6d37, 0x6d38, 0x6d3a, 0x6d3f, 0x6d40, 0x6d42, 0x6d44, - 0x6d49, 0x6d4c, 0x6d50, 0x6d55, 0x6d56, 0x6d57, 0x6d58, 0x6d5b, - 0x6d5d, 0x6d5f, 0x6d61, 0x6d62, 0x6d64, 0x6d65, 0x6d67, 0x6d68, - 0x6d6b, 0x6d6c, 0x6d6d, 0x6d70, 0x6d71, 0x6d72, 0x6d73, 0x6d75, - 0x6d76, 0x6d79, 0x6d7a, 0x6d7b, 0x6d7d, 0x6d7e, 0x6d7f, 0x6d80, - 0x6d81, 0x6d83, 0x6d84, 0x6d86, 0x6d87, 0x6d8a, 0x6d8b, 0x6d8d, - 0x6d8f, 0x6d90, 0x6d92, 0x6d96, 0x6d97, 0x6d98, 0x6d99, 0x6d9a, - 0x6d9c, 0x6da2, 0x6da5, 0x6dac, 0x6dad, 0x6db0, 0x6db1, 0x6db3, - 0x6db4, 0x6db6, 0x6db7, 0x6db9, 0x6dba, 0x6dbb, 0x6dbc, 0x6dbd, - 0x6dbe, 0x6dc1, 0x6dc2, 0x6dc3, 0x6dc8, 0x6dc9, 0x6dca, 0x003f, - /* lead byte 9c */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6dcd, 0x6dce, 0x6dcf, 0x6dd0, 0x6dd2, 0x6dd3, 0x6dd4, 0x6dd5, - 0x6dd7, 0x6dda, 0x6ddb, 0x6ddc, 0x6ddf, 0x6de2, 0x6de3, 0x6de5, - 0x6de7, 0x6de8, 0x6de9, 0x6dea, 0x6ded, 0x6def, 0x6df0, 0x6df2, - 0x6df4, 0x6df5, 0x6df6, 0x6df8, 0x6dfa, 0x6dfd, 0x6dfe, 0x6dff, - 0x6e00, 0x6e01, 0x6e02, 0x6e03, 0x6e04, 0x6e06, 0x6e07, 0x6e08, - 0x6e09, 0x6e0b, 0x6e0f, 0x6e12, 0x6e13, 0x6e15, 0x6e18, 0x6e19, - 0x6e1b, 0x6e1c, 0x6e1e, 0x6e1f, 0x6e22, 0x6e26, 0x6e27, 0x6e28, - 0x6e2a, 0x6e2c, 0x6e2e, 0x6e30, 0x6e31, 0x6e33, 0x6e35, 0x003f, - 0x6e36, 0x6e37, 0x6e39, 0x6e3b, 0x6e3c, 0x6e3d, 0x6e3e, 0x6e3f, - 0x6e40, 0x6e41, 0x6e42, 0x6e45, 0x6e46, 0x6e47, 0x6e48, 0x6e49, - 0x6e4a, 0x6e4b, 0x6e4c, 0x6e4f, 0x6e50, 0x6e51, 0x6e52, 0x6e55, - 0x6e57, 0x6e59, 0x6e5a, 0x6e5c, 0x6e5d, 0x6e5e, 0x6e60, 0x6e61, - 0x6e62, 0x6e63, 0x6e64, 0x6e65, 0x6e66, 0x6e67, 0x6e68, 0x6e69, - 0x6e6a, 0x6e6c, 0x6e6d, 0x6e6f, 0x6e70, 0x6e71, 0x6e72, 0x6e73, - 0x6e74, 0x6e75, 0x6e76, 0x6e77, 0x6e78, 0x6e79, 0x6e7a, 0x6e7b, - 0x6e7c, 0x6e7d, 0x6e80, 0x6e81, 0x6e82, 0x6e84, 0x6e87, 0x6e88, - 0x6e8a, 0x6e8b, 0x6e8c, 0x6e8d, 0x6e8e, 0x6e91, 0x6e92, 0x6e93, - 0x6e94, 0x6e95, 0x6e96, 0x6e97, 0x6e99, 0x6e9a, 0x6e9b, 0x6e9d, - 0x6e9e, 0x6ea0, 0x6ea1, 0x6ea3, 0x6ea4, 0x6ea6, 0x6ea8, 0x6ea9, - 0x6eab, 0x6eac, 0x6ead, 0x6eae, 0x6eb0, 0x6eb3, 0x6eb5, 0x6eb8, - 0x6eb9, 0x6ebc, 0x6ebe, 0x6ebf, 0x6ec0, 0x6ec3, 0x6ec4, 0x6ec5, - 0x6ec6, 0x6ec8, 0x6ec9, 0x6eca, 0x6ecc, 0x6ecd, 0x6ece, 0x6ed0, - 0x6ed2, 0x6ed6, 0x6ed8, 0x6ed9, 0x6edb, 0x6edc, 0x6edd, 0x6ee3, - 0x6ee7, 0x6eea, 0x6eeb, 0x6eec, 0x6eed, 0x6eee, 0x6eef, 0x003f, - /* lead byte 9d */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6ef0, 0x6ef1, 0x6ef2, 0x6ef3, 0x6ef5, 0x6ef6, 0x6ef7, 0x6ef8, - 0x6efa, 0x6efb, 0x6efc, 0x6efd, 0x6efe, 0x6eff, 0x6f00, 0x6f01, - 0x6f03, 0x6f04, 0x6f05, 0x6f07, 0x6f08, 0x6f0a, 0x6f0b, 0x6f0c, - 0x6f0d, 0x6f0e, 0x6f10, 0x6f11, 0x6f12, 0x6f16, 0x6f17, 0x6f18, - 0x6f19, 0x6f1a, 0x6f1b, 0x6f1c, 0x6f1d, 0x6f1e, 0x6f1f, 0x6f21, - 0x6f22, 0x6f23, 0x6f25, 0x6f26, 0x6f27, 0x6f28, 0x6f2c, 0x6f2e, - 0x6f30, 0x6f32, 0x6f34, 0x6f35, 0x6f37, 0x6f38, 0x6f39, 0x6f3a, - 0x6f3b, 0x6f3c, 0x6f3d, 0x6f3f, 0x6f40, 0x6f41, 0x6f42, 0x003f, - 0x6f43, 0x6f44, 0x6f45, 0x6f48, 0x6f49, 0x6f4a, 0x6f4c, 0x6f4e, - 0x6f4f, 0x6f50, 0x6f51, 0x6f52, 0x6f53, 0x6f54, 0x6f55, 0x6f56, - 0x6f57, 0x6f59, 0x6f5a, 0x6f5b, 0x6f5d, 0x6f5f, 0x6f60, 0x6f61, - 0x6f63, 0x6f64, 0x6f65, 0x6f67, 0x6f68, 0x6f69, 0x6f6a, 0x6f6b, - 0x6f6c, 0x6f6f, 0x6f70, 0x6f71, 0x6f73, 0x6f75, 0x6f76, 0x6f77, - 0x6f79, 0x6f7b, 0x6f7d, 0x6f7e, 0x6f7f, 0x6f80, 0x6f81, 0x6f82, - 0x6f83, 0x6f85, 0x6f86, 0x6f87, 0x6f8a, 0x6f8b, 0x6f8f, 0x6f90, - 0x6f91, 0x6f92, 0x6f93, 0x6f94, 0x6f95, 0x6f96, 0x6f97, 0x6f98, - 0x6f99, 0x6f9a, 0x6f9b, 0x6f9d, 0x6f9e, 0x6f9f, 0x6fa0, 0x6fa2, - 0x6fa3, 0x6fa4, 0x6fa5, 0x6fa6, 0x6fa8, 0x6fa9, 0x6faa, 0x6fab, - 0x6fac, 0x6fad, 0x6fae, 0x6faf, 0x6fb0, 0x6fb1, 0x6fb2, 0x6fb4, - 0x6fb5, 0x6fb7, 0x6fb8, 0x6fba, 0x6fbb, 0x6fbc, 0x6fbd, 0x6fbe, - 0x6fbf, 0x6fc1, 0x6fc3, 0x6fc4, 0x6fc5, 0x6fc6, 0x6fc7, 0x6fc8, - 0x6fca, 0x6fcb, 0x6fcc, 0x6fcd, 0x6fce, 0x6fcf, 0x6fd0, 0x6fd3, - 0x6fd4, 0x6fd5, 0x6fd6, 0x6fd7, 0x6fd8, 0x6fd9, 0x6fda, 0x6fdb, - 0x6fdc, 0x6fdd, 0x6fdf, 0x6fe2, 0x6fe3, 0x6fe4, 0x6fe5, 0x003f, - /* lead byte 9e */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6fe6, 0x6fe7, 0x6fe8, 0x6fe9, 0x6fea, 0x6feb, 0x6fec, 0x6fed, - 0x6ff0, 0x6ff1, 0x6ff2, 0x6ff3, 0x6ff4, 0x6ff5, 0x6ff6, 0x6ff7, - 0x6ff8, 0x6ff9, 0x6ffa, 0x6ffb, 0x6ffc, 0x6ffd, 0x6ffe, 0x6fff, - 0x7000, 0x7001, 0x7002, 0x7003, 0x7004, 0x7005, 0x7006, 0x7007, - 0x7008, 0x7009, 0x700a, 0x700b, 0x700c, 0x700d, 0x700e, 0x700f, - 0x7010, 0x7012, 0x7013, 0x7014, 0x7015, 0x7016, 0x7017, 0x7018, - 0x7019, 0x701c, 0x701d, 0x701e, 0x701f, 0x7020, 0x7021, 0x7022, - 0x7024, 0x7025, 0x7026, 0x7027, 0x7028, 0x7029, 0x702a, 0x003f, - 0x702b, 0x702c, 0x702d, 0x702e, 0x702f, 0x7030, 0x7031, 0x7032, - 0x7033, 0x7034, 0x7036, 0x7037, 0x7038, 0x703a, 0x703b, 0x703c, - 0x703d, 0x703e, 0x703f, 0x7040, 0x7041, 0x7042, 0x7043, 0x7044, - 0x7045, 0x7046, 0x7047, 0x7048, 0x7049, 0x704a, 0x704b, 0x704d, - 0x704e, 0x7050, 0x7051, 0x7052, 0x7053, 0x7054, 0x7055, 0x7056, - 0x7057, 0x7058, 0x7059, 0x705a, 0x705b, 0x705c, 0x705d, 0x705f, - 0x7060, 0x7061, 0x7062, 0x7063, 0x7064, 0x7065, 0x7066, 0x7067, - 0x7068, 0x7069, 0x706a, 0x706e, 0x7071, 0x7072, 0x7073, 0x7074, - 0x7077, 0x7079, 0x707a, 0x707b, 0x707d, 0x7081, 0x7082, 0x7083, - 0x7084, 0x7086, 0x7087, 0x7088, 0x708b, 0x708c, 0x708d, 0x708f, - 0x7090, 0x7091, 0x7093, 0x7097, 0x7098, 0x709a, 0x709b, 0x709e, - 0x709f, 0x70a0, 0x70a1, 0x70a2, 0x70a3, 0x70a4, 0x70a5, 0x70a6, - 0x70a7, 0x70a8, 0x70a9, 0x70aa, 0x70b0, 0x70b2, 0x70b4, 0x70b5, - 0x70b6, 0x70ba, 0x70be, 0x70bf, 0x70c4, 0x70c5, 0x70c6, 0x70c7, - 0x70c9, 0x70cb, 0x70cc, 0x70cd, 0x70ce, 0x70cf, 0x70d0, 0x70d1, - 0x70d2, 0x70d3, 0x70d4, 0x70d5, 0x70d6, 0x70d7, 0x70da, 0x003f, - /* lead byte 9f */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x70dc, 0x70dd, 0x70de, 0x70e0, 0x70e1, 0x70e2, 0x70e3, 0x70e5, - 0x70ea, 0x70ee, 0x70f0, 0x70f1, 0x70f2, 0x70f3, 0x70f4, 0x70f5, - 0x70f6, 0x70f8, 0x70fa, 0x70fb, 0x70fc, 0x70fe, 0x70ff, 0x7100, - 0x7101, 0x7102, 0x7103, 0x7104, 0x7105, 0x7106, 0x7107, 0x7108, - 0x710b, 0x710c, 0x710d, 0x710e, 0x710f, 0x7111, 0x7112, 0x7114, - 0x7117, 0x711b, 0x711c, 0x711d, 0x711e, 0x711f, 0x7120, 0x7121, - 0x7122, 0x7123, 0x7124, 0x7125, 0x7127, 0x7128, 0x7129, 0x712a, - 0x712b, 0x712c, 0x712d, 0x712e, 0x7132, 0x7133, 0x7134, 0x003f, - 0x7135, 0x7137, 0x7138, 0x7139, 0x713a, 0x713b, 0x713c, 0x713d, - 0x713e, 0x713f, 0x7140, 0x7141, 0x7142, 0x7143, 0x7144, 0x7146, - 0x7147, 0x7148, 0x7149, 0x714b, 0x714d, 0x714f, 0x7150, 0x7151, - 0x7152, 0x7153, 0x7154, 0x7155, 0x7156, 0x7157, 0x7158, 0x7159, - 0x715a, 0x715b, 0x715d, 0x715f, 0x7160, 0x7161, 0x7162, 0x7163, - 0x7165, 0x7169, 0x716a, 0x716b, 0x716c, 0x716d, 0x716f, 0x7170, - 0x7171, 0x7174, 0x7175, 0x7176, 0x7177, 0x7179, 0x717b, 0x717c, - 0x717e, 0x717f, 0x7180, 0x7181, 0x7182, 0x7183, 0x7185, 0x7186, - 0x7187, 0x7188, 0x7189, 0x718b, 0x718c, 0x718d, 0x718e, 0x7190, - 0x7191, 0x7192, 0x7193, 0x7195, 0x7196, 0x7197, 0x719a, 0x719b, - 0x719c, 0x719d, 0x719e, 0x71a1, 0x71a2, 0x71a3, 0x71a4, 0x71a5, - 0x71a6, 0x71a7, 0x71a9, 0x71aa, 0x71ab, 0x71ad, 0x71ae, 0x71af, - 0x71b0, 0x71b1, 0x71b2, 0x71b4, 0x71b6, 0x71b7, 0x71b8, 0x71ba, - 0x71bb, 0x71bc, 0x71bd, 0x71be, 0x71bf, 0x71c0, 0x71c1, 0x71c2, - 0x71c4, 0x71c5, 0x71c6, 0x71c7, 0x71c8, 0x71c9, 0x71ca, 0x71cb, - 0x71cc, 0x71cd, 0x71cf, 0x71d0, 0x71d1, 0x71d2, 0x71d3, 0x003f, - /* lead byte a0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x71d6, 0x71d7, 0x71d8, 0x71d9, 0x71da, 0x71db, 0x71dc, 0x71dd, - 0x71de, 0x71df, 0x71e1, 0x71e2, 0x71e3, 0x71e4, 0x71e6, 0x71e8, - 0x71e9, 0x71ea, 0x71eb, 0x71ec, 0x71ed, 0x71ef, 0x71f0, 0x71f1, - 0x71f2, 0x71f3, 0x71f4, 0x71f5, 0x71f6, 0x71f7, 0x71f8, 0x71fa, - 0x71fb, 0x71fc, 0x71fd, 0x71fe, 0x71ff, 0x7200, 0x7201, 0x7202, - 0x7203, 0x7204, 0x7205, 0x7207, 0x7208, 0x7209, 0x720a, 0x720b, - 0x720c, 0x720d, 0x720e, 0x720f, 0x7210, 0x7211, 0x7212, 0x7213, - 0x7214, 0x7215, 0x7216, 0x7217, 0x7218, 0x7219, 0x721a, 0x003f, - 0x721b, 0x721c, 0x721e, 0x721f, 0x7220, 0x7221, 0x7222, 0x7223, - 0x7224, 0x7225, 0x7226, 0x7227, 0x7229, 0x722b, 0x722d, 0x722e, - 0x722f, 0x7232, 0x7233, 0x7234, 0x723a, 0x723c, 0x723e, 0x7240, - 0x7241, 0x7242, 0x7243, 0x7244, 0x7245, 0x7246, 0x7249, 0x724a, - 0x724b, 0x724e, 0x724f, 0x7250, 0x7251, 0x7253, 0x7254, 0x7255, - 0x7257, 0x7258, 0x725a, 0x725c, 0x725e, 0x7260, 0x7263, 0x7264, - 0x7265, 0x7268, 0x726a, 0x726b, 0x726c, 0x726d, 0x7270, 0x7271, - 0x7273, 0x7274, 0x7276, 0x7277, 0x7278, 0x727b, 0x727c, 0x727d, - 0x7282, 0x7283, 0x7285, 0x7286, 0x7287, 0x7288, 0x7289, 0x728c, - 0x728e, 0x7290, 0x7291, 0x7293, 0x7294, 0x7295, 0x7296, 0x7297, - 0x7298, 0x7299, 0x729a, 0x729b, 0x729c, 0x729d, 0x729e, 0x72a0, - 0x72a1, 0x72a2, 0x72a3, 0x72a4, 0x72a5, 0x72a6, 0x72a7, 0x72a8, - 0x72a9, 0x72aa, 0x72ab, 0x72ae, 0x72b1, 0x72b2, 0x72b3, 0x72b5, - 0x72ba, 0x72bb, 0x72bc, 0x72bd, 0x72be, 0x72bf, 0x72c0, 0x72c5, - 0x72c6, 0x72c7, 0x72c9, 0x72ca, 0x72cb, 0x72cc, 0x72cf, 0x72d1, - 0x72d3, 0x72d4, 0x72d5, 0x72d6, 0x72d8, 0x72da, 0x72db, 0x003f, - /* lead byte a1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe4c6, 0xe4c7, 0xe4c8, 0xe4c9, 0xe4ca, 0xe4cb, 0xe4cc, 0xe4cd, - 0xe4ce, 0xe4cf, 0xe4d0, 0xe4d1, 0xe4d2, 0xe4d3, 0xe4d4, 0xe4d5, - 0xe4d6, 0xe4d7, 0xe4d8, 0xe4d9, 0xe4da, 0xe4db, 0xe4dc, 0xe4dd, - 0xe4de, 0xe4df, 0xe4e0, 0xe4e1, 0xe4e2, 0xe4e3, 0xe4e4, 0xe4e5, - 0xe4e6, 0xe4e7, 0xe4e8, 0xe4e9, 0xe4ea, 0xe4eb, 0xe4ec, 0xe4ed, - 0xe4ee, 0xe4ef, 0xe4f0, 0xe4f1, 0xe4f2, 0xe4f3, 0xe4f4, 0xe4f5, - 0xe4f6, 0xe4f7, 0xe4f8, 0xe4f9, 0xe4fa, 0xe4fb, 0xe4fc, 0xe4fd, - 0xe4fe, 0xe4ff, 0xe500, 0xe501, 0xe502, 0xe503, 0xe504, 0x003f, - 0xe505, 0xe506, 0xe507, 0xe508, 0xe509, 0xe50a, 0xe50b, 0xe50c, - 0xe50d, 0xe50e, 0xe50f, 0xe510, 0xe511, 0xe512, 0xe513, 0xe514, - 0xe515, 0xe516, 0xe517, 0xe518, 0xe519, 0xe51a, 0xe51b, 0xe51c, - 0xe51d, 0xe51e, 0xe51f, 0xe520, 0xe521, 0xe522, 0xe523, 0xe524, - 0xe525, 0x3000, 0x3001, 0x3002, 0x00b7, 0x02c9, 0x02c7, 0x00a8, - 0x3003, 0x3005, 0x2014, 0xff5e, 0x2016, 0x2026, 0x2018, 0x2019, - 0x201c, 0x201d, 0x3014, 0x3015, 0x3008, 0x3009, 0x300a, 0x300b, - 0x300c, 0x300d, 0x300e, 0x300f, 0x3016, 0x3017, 0x3010, 0x3011, - 0x00b1, 0x00d7, 0x00f7, 0x2236, 0x2227, 0x2228, 0x2211, 0x220f, - 0x222a, 0x2229, 0x2208, 0x2237, 0x221a, 0x22a5, 0x2225, 0x2220, - 0x2312, 0x2299, 0x222b, 0x222e, 0x2261, 0x224c, 0x2248, 0x223d, - 0x221d, 0x2260, 0x226e, 0x226f, 0x2264, 0x2265, 0x221e, 0x2235, - 0x2234, 0x2642, 0x2640, 0x00b0, 0x2032, 0x2033, 0x2103, 0xff04, - 0x00a4, 0xffe0, 0xffe1, 0x2030, 0x00a7, 0x2116, 0x2606, 0x2605, - 0x25cb, 0x25cf, 0x25ce, 0x25c7, 0x25c6, 0x25a1, 0x25a0, 0x25b3, - 0x25b2, 0x203b, 0x2192, 0x2190, 0x2191, 0x2193, 0x3013, 0x003f, - /* lead byte a2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe526, 0xe527, 0xe528, 0xe529, 0xe52a, 0xe52b, 0xe52c, 0xe52d, - 0xe52e, 0xe52f, 0xe530, 0xe531, 0xe532, 0xe533, 0xe534, 0xe535, - 0xe536, 0xe537, 0xe538, 0xe539, 0xe53a, 0xe53b, 0xe53c, 0xe53d, - 0xe53e, 0xe53f, 0xe540, 0xe541, 0xe542, 0xe543, 0xe544, 0xe545, - 0xe546, 0xe547, 0xe548, 0xe549, 0xe54a, 0xe54b, 0xe54c, 0xe54d, - 0xe54e, 0xe54f, 0xe550, 0xe551, 0xe552, 0xe553, 0xe554, 0xe555, - 0xe556, 0xe557, 0xe558, 0xe559, 0xe55a, 0xe55b, 0xe55c, 0xe55d, - 0xe55e, 0xe55f, 0xe560, 0xe561, 0xe562, 0xe563, 0xe564, 0x003f, - 0xe565, 0xe566, 0xe567, 0xe568, 0xe569, 0xe56a, 0xe56b, 0xe56c, - 0xe56d, 0xe56e, 0xe56f, 0xe570, 0xe571, 0xe572, 0xe573, 0xe574, - 0xe575, 0xe576, 0xe577, 0xe578, 0xe579, 0xe57a, 0xe57b, 0xe57c, - 0xe57d, 0xe57e, 0xe57f, 0xe580, 0xe581, 0xe582, 0xe583, 0xe584, - 0xe585, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, - 0x2177, 0x2178, 0x2179, 0xe766, 0xe767, 0xe768, 0xe769, 0xe76a, - 0xe76b, 0x2488, 0x2489, 0x248a, 0x248b, 0x248c, 0x248d, 0x248e, - 0x248f, 0x2490, 0x2491, 0x2492, 0x2493, 0x2494, 0x2495, 0x2496, - 0x2497, 0x2498, 0x2499, 0x249a, 0x249b, 0x2474, 0x2475, 0x2476, - 0x2477, 0x2478, 0x2479, 0x247a, 0x247b, 0x247c, 0x247d, 0x247e, - 0x247f, 0x2480, 0x2481, 0x2482, 0x2483, 0x2484, 0x2485, 0x2486, - 0x2487, 0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, - 0x2467, 0x2468, 0x2469, 0xe76c, 0xe76d, 0x3220, 0x3221, 0x3222, - 0x3223, 0x3224, 0x3225, 0x3226, 0x3227, 0x3228, 0x3229, 0xe76e, - 0xe76f, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, - 0x2167, 0x2168, 0x2169, 0x216a, 0x216b, 0xe770, 0xe771, 0x003f, - /* lead byte a3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe586, 0xe587, 0xe588, 0xe589, 0xe58a, 0xe58b, 0xe58c, 0xe58d, - 0xe58e, 0xe58f, 0xe590, 0xe591, 0xe592, 0xe593, 0xe594, 0xe595, - 0xe596, 0xe597, 0xe598, 0xe599, 0xe59a, 0xe59b, 0xe59c, 0xe59d, - 0xe59e, 0xe59f, 0xe5a0, 0xe5a1, 0xe5a2, 0xe5a3, 0xe5a4, 0xe5a5, - 0xe5a6, 0xe5a7, 0xe5a8, 0xe5a9, 0xe5aa, 0xe5ab, 0xe5ac, 0xe5ad, - 0xe5ae, 0xe5af, 0xe5b0, 0xe5b1, 0xe5b2, 0xe5b3, 0xe5b4, 0xe5b5, - 0xe5b6, 0xe5b7, 0xe5b8, 0xe5b9, 0xe5ba, 0xe5bb, 0xe5bc, 0xe5bd, - 0xe5be, 0xe5bf, 0xe5c0, 0xe5c1, 0xe5c2, 0xe5c3, 0xe5c4, 0x003f, - 0xe5c5, 0xe5c6, 0xe5c7, 0xe5c8, 0xe5c9, 0xe5ca, 0xe5cb, 0xe5cc, - 0xe5cd, 0xe5ce, 0xe5cf, 0xe5d0, 0xe5d1, 0xe5d2, 0xe5d3, 0xe5d4, - 0xe5d5, 0xe5d6, 0xe5d7, 0xe5d8, 0xe5d9, 0xe5da, 0xe5db, 0xe5dc, - 0xe5dd, 0xe5de, 0xe5df, 0xe5e0, 0xe5e1, 0xe5e2, 0xe5e3, 0xe5e4, - 0xe5e5, 0xff01, 0xff02, 0xff03, 0xffe5, 0xff05, 0xff06, 0xff07, - 0xff08, 0xff09, 0xff0a, 0xff0b, 0xff0c, 0xff0d, 0xff0e, 0xff0f, - 0xff10, 0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17, - 0xff18, 0xff19, 0xff1a, 0xff1b, 0xff1c, 0xff1d, 0xff1e, 0xff1f, - 0xff20, 0xff21, 0xff22, 0xff23, 0xff24, 0xff25, 0xff26, 0xff27, - 0xff28, 0xff29, 0xff2a, 0xff2b, 0xff2c, 0xff2d, 0xff2e, 0xff2f, - 0xff30, 0xff31, 0xff32, 0xff33, 0xff34, 0xff35, 0xff36, 0xff37, - 0xff38, 0xff39, 0xff3a, 0xff3b, 0xff3c, 0xff3d, 0xff3e, 0xff3f, - 0xff40, 0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47, - 0xff48, 0xff49, 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f, - 0xff50, 0xff51, 0xff52, 0xff53, 0xff54, 0xff55, 0xff56, 0xff57, - 0xff58, 0xff59, 0xff5a, 0xff5b, 0xff5c, 0xff5d, 0xffe3, 0x003f, - /* lead byte a4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe5e6, 0xe5e7, 0xe5e8, 0xe5e9, 0xe5ea, 0xe5eb, 0xe5ec, 0xe5ed, - 0xe5ee, 0xe5ef, 0xe5f0, 0xe5f1, 0xe5f2, 0xe5f3, 0xe5f4, 0xe5f5, - 0xe5f6, 0xe5f7, 0xe5f8, 0xe5f9, 0xe5fa, 0xe5fb, 0xe5fc, 0xe5fd, - 0xe5fe, 0xe5ff, 0xe600, 0xe601, 0xe602, 0xe603, 0xe604, 0xe605, - 0xe606, 0xe607, 0xe608, 0xe609, 0xe60a, 0xe60b, 0xe60c, 0xe60d, - 0xe60e, 0xe60f, 0xe610, 0xe611, 0xe612, 0xe613, 0xe614, 0xe615, - 0xe616, 0xe617, 0xe618, 0xe619, 0xe61a, 0xe61b, 0xe61c, 0xe61d, - 0xe61e, 0xe61f, 0xe620, 0xe621, 0xe622, 0xe623, 0xe624, 0x003f, - 0xe625, 0xe626, 0xe627, 0xe628, 0xe629, 0xe62a, 0xe62b, 0xe62c, - 0xe62d, 0xe62e, 0xe62f, 0xe630, 0xe631, 0xe632, 0xe633, 0xe634, - 0xe635, 0xe636, 0xe637, 0xe638, 0xe639, 0xe63a, 0xe63b, 0xe63c, - 0xe63d, 0xe63e, 0xe63f, 0xe640, 0xe641, 0xe642, 0xe643, 0xe644, - 0xe645, 0x3041, 0x3042, 0x3043, 0x3044, 0x3045, 0x3046, 0x3047, - 0x3048, 0x3049, 0x304a, 0x304b, 0x304c, 0x304d, 0x304e, 0x304f, - 0x3050, 0x3051, 0x3052, 0x3053, 0x3054, 0x3055, 0x3056, 0x3057, - 0x3058, 0x3059, 0x305a, 0x305b, 0x305c, 0x305d, 0x305e, 0x305f, - 0x3060, 0x3061, 0x3062, 0x3063, 0x3064, 0x3065, 0x3066, 0x3067, - 0x3068, 0x3069, 0x306a, 0x306b, 0x306c, 0x306d, 0x306e, 0x306f, - 0x3070, 0x3071, 0x3072, 0x3073, 0x3074, 0x3075, 0x3076, 0x3077, - 0x3078, 0x3079, 0x307a, 0x307b, 0x307c, 0x307d, 0x307e, 0x307f, - 0x3080, 0x3081, 0x3082, 0x3083, 0x3084, 0x3085, 0x3086, 0x3087, - 0x3088, 0x3089, 0x308a, 0x308b, 0x308c, 0x308d, 0x308e, 0x308f, - 0x3090, 0x3091, 0x3092, 0x3093, 0xe772, 0xe773, 0xe774, 0xe775, - 0xe776, 0xe777, 0xe778, 0xe779, 0xe77a, 0xe77b, 0xe77c, 0x003f, - /* lead byte a5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe646, 0xe647, 0xe648, 0xe649, 0xe64a, 0xe64b, 0xe64c, 0xe64d, - 0xe64e, 0xe64f, 0xe650, 0xe651, 0xe652, 0xe653, 0xe654, 0xe655, - 0xe656, 0xe657, 0xe658, 0xe659, 0xe65a, 0xe65b, 0xe65c, 0xe65d, - 0xe65e, 0xe65f, 0xe660, 0xe661, 0xe662, 0xe663, 0xe664, 0xe665, - 0xe666, 0xe667, 0xe668, 0xe669, 0xe66a, 0xe66b, 0xe66c, 0xe66d, - 0xe66e, 0xe66f, 0xe670, 0xe671, 0xe672, 0xe673, 0xe674, 0xe675, - 0xe676, 0xe677, 0xe678, 0xe679, 0xe67a, 0xe67b, 0xe67c, 0xe67d, - 0xe67e, 0xe67f, 0xe680, 0xe681, 0xe682, 0xe683, 0xe684, 0x003f, - 0xe685, 0xe686, 0xe687, 0xe688, 0xe689, 0xe68a, 0xe68b, 0xe68c, - 0xe68d, 0xe68e, 0xe68f, 0xe690, 0xe691, 0xe692, 0xe693, 0xe694, - 0xe695, 0xe696, 0xe697, 0xe698, 0xe699, 0xe69a, 0xe69b, 0xe69c, - 0xe69d, 0xe69e, 0xe69f, 0xe6a0, 0xe6a1, 0xe6a2, 0xe6a3, 0xe6a4, - 0xe6a5, 0x30a1, 0x30a2, 0x30a3, 0x30a4, 0x30a5, 0x30a6, 0x30a7, - 0x30a8, 0x30a9, 0x30aa, 0x30ab, 0x30ac, 0x30ad, 0x30ae, 0x30af, - 0x30b0, 0x30b1, 0x30b2, 0x30b3, 0x30b4, 0x30b5, 0x30b6, 0x30b7, - 0x30b8, 0x30b9, 0x30ba, 0x30bb, 0x30bc, 0x30bd, 0x30be, 0x30bf, - 0x30c0, 0x30c1, 0x30c2, 0x30c3, 0x30c4, 0x30c5, 0x30c6, 0x30c7, - 0x30c8, 0x30c9, 0x30ca, 0x30cb, 0x30cc, 0x30cd, 0x30ce, 0x30cf, - 0x30d0, 0x30d1, 0x30d2, 0x30d3, 0x30d4, 0x30d5, 0x30d6, 0x30d7, - 0x30d8, 0x30d9, 0x30da, 0x30db, 0x30dc, 0x30dd, 0x30de, 0x30df, - 0x30e0, 0x30e1, 0x30e2, 0x30e3, 0x30e4, 0x30e5, 0x30e6, 0x30e7, - 0x30e8, 0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ee, 0x30ef, - 0x30f0, 0x30f1, 0x30f2, 0x30f3, 0x30f4, 0x30f5, 0x30f6, 0xe77d, - 0xe77e, 0xe77f, 0xe780, 0xe781, 0xe782, 0xe783, 0xe784, 0x003f, - /* lead byte a6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe6a6, 0xe6a7, 0xe6a8, 0xe6a9, 0xe6aa, 0xe6ab, 0xe6ac, 0xe6ad, - 0xe6ae, 0xe6af, 0xe6b0, 0xe6b1, 0xe6b2, 0xe6b3, 0xe6b4, 0xe6b5, - 0xe6b6, 0xe6b7, 0xe6b8, 0xe6b9, 0xe6ba, 0xe6bb, 0xe6bc, 0xe6bd, - 0xe6be, 0xe6bf, 0xe6c0, 0xe6c1, 0xe6c2, 0xe6c3, 0xe6c4, 0xe6c5, - 0xe6c6, 0xe6c7, 0xe6c8, 0xe6c9, 0xe6ca, 0xe6cb, 0xe6cc, 0xe6cd, - 0xe6ce, 0xe6cf, 0xe6d0, 0xe6d1, 0xe6d2, 0xe6d3, 0xe6d4, 0xe6d5, - 0xe6d6, 0xe6d7, 0xe6d8, 0xe6d9, 0xe6da, 0xe6db, 0xe6dc, 0xe6dd, - 0xe6de, 0xe6df, 0xe6e0, 0xe6e1, 0xe6e2, 0xe6e3, 0xe6e4, 0x003f, - 0xe6e5, 0xe6e6, 0xe6e7, 0xe6e8, 0xe6e9, 0xe6ea, 0xe6eb, 0xe6ec, - 0xe6ed, 0xe6ee, 0xe6ef, 0xe6f0, 0xe6f1, 0xe6f2, 0xe6f3, 0xe6f4, - 0xe6f5, 0xe6f6, 0xe6f7, 0xe6f8, 0xe6f9, 0xe6fa, 0xe6fb, 0xe6fc, - 0xe6fd, 0xe6fe, 0xe6ff, 0xe700, 0xe701, 0xe702, 0xe703, 0xe704, - 0xe705, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, - 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, - 0x03a0, 0x03a1, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, - 0x03a9, 0xe785, 0xe786, 0xe787, 0xe788, 0xe789, 0xe78a, 0xe78b, - 0xe78c, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, - 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, - 0x03c0, 0x03c1, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, - 0x03c9, 0xe78d, 0xe78e, 0xe78f, 0xe790, 0xe791, 0xe792, 0xe793, - 0xfe35, 0xfe36, 0xfe39, 0xfe3a, 0xfe3f, 0xfe40, 0xfe3d, 0xfe3e, - 0xfe41, 0xfe42, 0xfe43, 0xfe44, 0xe794, 0xe795, 0xfe3b, 0xfe3c, - 0xfe37, 0xfe38, 0xfe31, 0xe796, 0xfe33, 0xfe34, 0xe797, 0xe798, - 0xe799, 0xe79a, 0xe79b, 0xe79c, 0xe79d, 0xe79e, 0xe79f, 0x003f, - /* lead byte a7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe706, 0xe707, 0xe708, 0xe709, 0xe70a, 0xe70b, 0xe70c, 0xe70d, - 0xe70e, 0xe70f, 0xe710, 0xe711, 0xe712, 0xe713, 0xe714, 0xe715, - 0xe716, 0xe717, 0xe718, 0xe719, 0xe71a, 0xe71b, 0xe71c, 0xe71d, - 0xe71e, 0xe71f, 0xe720, 0xe721, 0xe722, 0xe723, 0xe724, 0xe725, - 0xe726, 0xe727, 0xe728, 0xe729, 0xe72a, 0xe72b, 0xe72c, 0xe72d, - 0xe72e, 0xe72f, 0xe730, 0xe731, 0xe732, 0xe733, 0xe734, 0xe735, - 0xe736, 0xe737, 0xe738, 0xe739, 0xe73a, 0xe73b, 0xe73c, 0xe73d, - 0xe73e, 0xe73f, 0xe740, 0xe741, 0xe742, 0xe743, 0xe744, 0x003f, - 0xe745, 0xe746, 0xe747, 0xe748, 0xe749, 0xe74a, 0xe74b, 0xe74c, - 0xe74d, 0xe74e, 0xe74f, 0xe750, 0xe751, 0xe752, 0xe753, 0xe754, - 0xe755, 0xe756, 0xe757, 0xe758, 0xe759, 0xe75a, 0xe75b, 0xe75c, - 0xe75d, 0xe75e, 0xe75f, 0xe760, 0xe761, 0xe762, 0xe763, 0xe764, - 0xe765, 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401, - 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, 0xe7a0, 0xe7a1, 0xe7a2, 0xe7a3, 0xe7a4, 0xe7a5, - 0xe7a6, 0xe7a7, 0xe7a8, 0xe7a9, 0xe7aa, 0xe7ab, 0xe7ac, 0xe7ad, - 0xe7ae, 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0451, - 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, 0xe7af, 0xe7b0, 0xe7b1, 0xe7b2, 0xe7b3, 0xe7b4, - 0xe7b5, 0xe7b6, 0xe7b7, 0xe7b8, 0xe7b9, 0xe7ba, 0xe7bb, 0x003f, - /* lead byte a8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x02ca, 0x02cb, 0x02d9, 0x2013, 0x2015, 0x2025, 0x2035, 0x2105, - 0x2109, 0x2196, 0x2197, 0x2198, 0x2199, 0x2215, 0x221f, 0x2223, - 0x2252, 0x2266, 0x2267, 0x22bf, 0x2550, 0x2551, 0x2552, 0x2553, - 0x2554, 0x2555, 0x2556, 0x2557, 0x2558, 0x2559, 0x255a, 0x255b, - 0x255c, 0x255d, 0x255e, 0x255f, 0x2560, 0x2561, 0x2562, 0x2563, - 0x2564, 0x2565, 0x2566, 0x2567, 0x2568, 0x2569, 0x256a, 0x256b, - 0x256c, 0x256d, 0x256e, 0x256f, 0x2570, 0x2571, 0x2572, 0x2573, - 0x2581, 0x2582, 0x2583, 0x2584, 0x2585, 0x2586, 0x2587, 0x003f, - 0x2588, 0x2589, 0x258a, 0x258b, 0x258c, 0x258d, 0x258e, 0x258f, - 0x2593, 0x2594, 0x2595, 0x25bc, 0x25bd, 0x25e2, 0x25e3, 0x25e4, - 0x25e5, 0x2609, 0x2295, 0x3012, 0x301d, 0x301e, 0xe7bc, 0xe7bd, - 0xe7be, 0xe7bf, 0xe7c0, 0xe7c1, 0xe7c2, 0xe7c3, 0xe7c4, 0xe7c5, - 0xe7c6, 0x0101, 0x00e1, 0x01ce, 0x00e0, 0x0113, 0x00e9, 0x011b, - 0x00e8, 0x012b, 0x00ed, 0x01d0, 0x00ec, 0x014d, 0x00f3, 0x01d2, - 0x00f2, 0x016b, 0x00fa, 0x01d4, 0x00f9, 0x01d6, 0x01d8, 0x01da, - 0x01dc, 0x00fc, 0x00ea, 0x0251, 0xe7c7, 0x0144, 0x0148, 0xe7c8, - 0x0261, 0xe7c9, 0xe7ca, 0xe7cb, 0xe7cc, 0x3105, 0x3106, 0x3107, - 0x3108, 0x3109, 0x310a, 0x310b, 0x310c, 0x310d, 0x310e, 0x310f, - 0x3110, 0x3111, 0x3112, 0x3113, 0x3114, 0x3115, 0x3116, 0x3117, - 0x3118, 0x3119, 0x311a, 0x311b, 0x311c, 0x311d, 0x311e, 0x311f, - 0x3120, 0x3121, 0x3122, 0x3123, 0x3124, 0x3125, 0x3126, 0x3127, - 0x3128, 0x3129, 0xe7cd, 0xe7ce, 0xe7cf, 0xe7d0, 0xe7d1, 0xe7d2, - 0xe7d3, 0xe7d4, 0xe7d5, 0xe7d6, 0xe7d7, 0xe7d8, 0xe7d9, 0xe7da, - 0xe7db, 0xe7dc, 0xe7dd, 0xe7de, 0xe7df, 0xe7e0, 0xe7e1, 0x003f, - /* lead byte a9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x3021, 0x3022, 0x3023, 0x3024, 0x3025, 0x3026, 0x3027, 0x3028, - 0x3029, 0x32a3, 0x338e, 0x338f, 0x339c, 0x339d, 0x339e, 0x33a1, - 0x33c4, 0x33ce, 0x33d1, 0x33d2, 0x33d5, 0xfe30, 0xffe2, 0xffe4, - 0xe7e2, 0x2121, 0x3231, 0xe7e3, 0x2010, 0xe7e4, 0xe7e5, 0xe7e6, - 0x30fc, 0x309b, 0x309c, 0x30fd, 0x30fe, 0x3006, 0x309d, 0x309e, - 0xfe49, 0xfe4a, 0xfe4b, 0xfe4c, 0xfe4d, 0xfe4e, 0xfe4f, 0xfe50, - 0xfe51, 0xfe52, 0xfe54, 0xfe55, 0xfe56, 0xfe57, 0xfe59, 0xfe5a, - 0xfe5b, 0xfe5c, 0xfe5d, 0xfe5e, 0xfe5f, 0xfe60, 0xfe61, 0x003f, - 0xfe62, 0xfe63, 0xfe64, 0xfe65, 0xfe66, 0xfe68, 0xfe69, 0xfe6a, - 0xfe6b, 0xe7e7, 0xe7e8, 0xe7e9, 0xe7ea, 0xe7eb, 0xe7ec, 0xe7ed, - 0xe7ee, 0xe7ef, 0xe7f0, 0xe7f1, 0xe7f2, 0xe7f3, 0x3007, 0xe7f4, - 0xe7f5, 0xe7f6, 0xe7f7, 0xe7f8, 0xe7f9, 0xe7fa, 0xe7fb, 0xe7fc, - 0xe7fd, 0xe7fe, 0xe7ff, 0xe800, 0x2500, 0x2501, 0x2502, 0x2503, - 0x2504, 0x2505, 0x2506, 0x2507, 0x2508, 0x2509, 0x250a, 0x250b, - 0x250c, 0x250d, 0x250e, 0x250f, 0x2510, 0x2511, 0x2512, 0x2513, - 0x2514, 0x2515, 0x2516, 0x2517, 0x2518, 0x2519, 0x251a, 0x251b, - 0x251c, 0x251d, 0x251e, 0x251f, 0x2520, 0x2521, 0x2522, 0x2523, - 0x2524, 0x2525, 0x2526, 0x2527, 0x2528, 0x2529, 0x252a, 0x252b, - 0x252c, 0x252d, 0x252e, 0x252f, 0x2530, 0x2531, 0x2532, 0x2533, - 0x2534, 0x2535, 0x2536, 0x2537, 0x2538, 0x2539, 0x253a, 0x253b, - 0x253c, 0x253d, 0x253e, 0x253f, 0x2540, 0x2541, 0x2542, 0x2543, - 0x2544, 0x2545, 0x2546, 0x2547, 0x2548, 0x2549, 0x254a, 0x254b, - 0xe801, 0xe802, 0xe803, 0xe804, 0xe805, 0xe806, 0xe807, 0xe808, - 0xe809, 0xe80a, 0xe80b, 0xe80c, 0xe80d, 0xe80e, 0xe80f, 0x003f, - /* lead byte aa */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x72dc, 0x72dd, 0x72df, 0x72e2, 0x72e3, 0x72e4, 0x72e5, 0x72e6, - 0x72e7, 0x72ea, 0x72eb, 0x72f5, 0x72f6, 0x72f9, 0x72fd, 0x72fe, - 0x72ff, 0x7300, 0x7302, 0x7304, 0x7305, 0x7306, 0x7307, 0x7308, - 0x7309, 0x730b, 0x730c, 0x730d, 0x730f, 0x7310, 0x7311, 0x7312, - 0x7314, 0x7318, 0x7319, 0x731a, 0x731f, 0x7320, 0x7323, 0x7324, - 0x7326, 0x7327, 0x7328, 0x732d, 0x732f, 0x7330, 0x7332, 0x7333, - 0x7335, 0x7336, 0x733a, 0x733b, 0x733c, 0x733d, 0x7340, 0x7341, - 0x7342, 0x7343, 0x7344, 0x7345, 0x7346, 0x7347, 0x7348, 0x003f, - 0x7349, 0x734a, 0x734b, 0x734c, 0x734e, 0x734f, 0x7351, 0x7353, - 0x7354, 0x7355, 0x7356, 0x7358, 0x7359, 0x735a, 0x735b, 0x735c, - 0x735d, 0x735e, 0x735f, 0x7361, 0x7362, 0x7363, 0x7364, 0x7365, - 0x7366, 0x7367, 0x7368, 0x7369, 0x736a, 0x736b, 0x736e, 0x7370, - 0x7371, 0xe000, 0xe001, 0xe002, 0xe003, 0xe004, 0xe005, 0xe006, - 0xe007, 0xe008, 0xe009, 0xe00a, 0xe00b, 0xe00c, 0xe00d, 0xe00e, - 0xe00f, 0xe010, 0xe011, 0xe012, 0xe013, 0xe014, 0xe015, 0xe016, - 0xe017, 0xe018, 0xe019, 0xe01a, 0xe01b, 0xe01c, 0xe01d, 0xe01e, - 0xe01f, 0xe020, 0xe021, 0xe022, 0xe023, 0xe024, 0xe025, 0xe026, - 0xe027, 0xe028, 0xe029, 0xe02a, 0xe02b, 0xe02c, 0xe02d, 0xe02e, - 0xe02f, 0xe030, 0xe031, 0xe032, 0xe033, 0xe034, 0xe035, 0xe036, - 0xe037, 0xe038, 0xe039, 0xe03a, 0xe03b, 0xe03c, 0xe03d, 0xe03e, - 0xe03f, 0xe040, 0xe041, 0xe042, 0xe043, 0xe044, 0xe045, 0xe046, - 0xe047, 0xe048, 0xe049, 0xe04a, 0xe04b, 0xe04c, 0xe04d, 0xe04e, - 0xe04f, 0xe050, 0xe051, 0xe052, 0xe053, 0xe054, 0xe055, 0xe056, - 0xe057, 0xe058, 0xe059, 0xe05a, 0xe05b, 0xe05c, 0xe05d, 0x003f, - /* lead byte ab */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7372, 0x7373, 0x7374, 0x7375, 0x7376, 0x7377, 0x7378, 0x7379, - 0x737a, 0x737b, 0x737c, 0x737d, 0x737f, 0x7380, 0x7381, 0x7382, - 0x7383, 0x7385, 0x7386, 0x7388, 0x738a, 0x738c, 0x738d, 0x738f, - 0x7390, 0x7392, 0x7393, 0x7394, 0x7395, 0x7397, 0x7398, 0x7399, - 0x739a, 0x739c, 0x739d, 0x739e, 0x73a0, 0x73a1, 0x73a3, 0x73a4, - 0x73a5, 0x73a6, 0x73a7, 0x73a8, 0x73aa, 0x73ac, 0x73ad, 0x73b1, - 0x73b4, 0x73b5, 0x73b6, 0x73b8, 0x73b9, 0x73bc, 0x73bd, 0x73be, - 0x73bf, 0x73c1, 0x73c3, 0x73c4, 0x73c5, 0x73c6, 0x73c7, 0x003f, - 0x73cb, 0x73cc, 0x73ce, 0x73d2, 0x73d3, 0x73d4, 0x73d5, 0x73d6, - 0x73d7, 0x73d8, 0x73da, 0x73db, 0x73dc, 0x73dd, 0x73df, 0x73e1, - 0x73e2, 0x73e3, 0x73e4, 0x73e6, 0x73e8, 0x73ea, 0x73eb, 0x73ec, - 0x73ee, 0x73ef, 0x73f0, 0x73f1, 0x73f3, 0x73f4, 0x73f5, 0x73f6, - 0x73f7, 0xe05e, 0xe05f, 0xe060, 0xe061, 0xe062, 0xe063, 0xe064, - 0xe065, 0xe066, 0xe067, 0xe068, 0xe069, 0xe06a, 0xe06b, 0xe06c, - 0xe06d, 0xe06e, 0xe06f, 0xe070, 0xe071, 0xe072, 0xe073, 0xe074, - 0xe075, 0xe076, 0xe077, 0xe078, 0xe079, 0xe07a, 0xe07b, 0xe07c, - 0xe07d, 0xe07e, 0xe07f, 0xe080, 0xe081, 0xe082, 0xe083, 0xe084, - 0xe085, 0xe086, 0xe087, 0xe088, 0xe089, 0xe08a, 0xe08b, 0xe08c, - 0xe08d, 0xe08e, 0xe08f, 0xe090, 0xe091, 0xe092, 0xe093, 0xe094, - 0xe095, 0xe096, 0xe097, 0xe098, 0xe099, 0xe09a, 0xe09b, 0xe09c, - 0xe09d, 0xe09e, 0xe09f, 0xe0a0, 0xe0a1, 0xe0a2, 0xe0a3, 0xe0a4, - 0xe0a5, 0xe0a6, 0xe0a7, 0xe0a8, 0xe0a9, 0xe0aa, 0xe0ab, 0xe0ac, - 0xe0ad, 0xe0ae, 0xe0af, 0xe0b0, 0xe0b1, 0xe0b2, 0xe0b3, 0xe0b4, - 0xe0b5, 0xe0b6, 0xe0b7, 0xe0b8, 0xe0b9, 0xe0ba, 0xe0bb, 0x003f, - /* lead byte ac */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x73f8, 0x73f9, 0x73fa, 0x73fb, 0x73fc, 0x73fd, 0x73fe, 0x73ff, - 0x7400, 0x7401, 0x7402, 0x7404, 0x7407, 0x7408, 0x740b, 0x740c, - 0x740d, 0x740e, 0x7411, 0x7412, 0x7413, 0x7414, 0x7415, 0x7416, - 0x7417, 0x7418, 0x7419, 0x741c, 0x741d, 0x741e, 0x741f, 0x7420, - 0x7421, 0x7423, 0x7424, 0x7427, 0x7429, 0x742b, 0x742d, 0x742f, - 0x7431, 0x7432, 0x7437, 0x7438, 0x7439, 0x743a, 0x743b, 0x743d, - 0x743e, 0x743f, 0x7440, 0x7442, 0x7443, 0x7444, 0x7445, 0x7446, - 0x7447, 0x7448, 0x7449, 0x744a, 0x744b, 0x744c, 0x744d, 0x003f, - 0x744e, 0x744f, 0x7450, 0x7451, 0x7452, 0x7453, 0x7454, 0x7456, - 0x7458, 0x745d, 0x7460, 0x7461, 0x7462, 0x7463, 0x7464, 0x7465, - 0x7466, 0x7467, 0x7468, 0x7469, 0x746a, 0x746b, 0x746c, 0x746e, - 0x746f, 0x7471, 0x7472, 0x7473, 0x7474, 0x7475, 0x7478, 0x7479, - 0x747a, 0xe0bc, 0xe0bd, 0xe0be, 0xe0bf, 0xe0c0, 0xe0c1, 0xe0c2, - 0xe0c3, 0xe0c4, 0xe0c5, 0xe0c6, 0xe0c7, 0xe0c8, 0xe0c9, 0xe0ca, - 0xe0cb, 0xe0cc, 0xe0cd, 0xe0ce, 0xe0cf, 0xe0d0, 0xe0d1, 0xe0d2, - 0xe0d3, 0xe0d4, 0xe0d5, 0xe0d6, 0xe0d7, 0xe0d8, 0xe0d9, 0xe0da, - 0xe0db, 0xe0dc, 0xe0dd, 0xe0de, 0xe0df, 0xe0e0, 0xe0e1, 0xe0e2, - 0xe0e3, 0xe0e4, 0xe0e5, 0xe0e6, 0xe0e7, 0xe0e8, 0xe0e9, 0xe0ea, - 0xe0eb, 0xe0ec, 0xe0ed, 0xe0ee, 0xe0ef, 0xe0f0, 0xe0f1, 0xe0f2, - 0xe0f3, 0xe0f4, 0xe0f5, 0xe0f6, 0xe0f7, 0xe0f8, 0xe0f9, 0xe0fa, - 0xe0fb, 0xe0fc, 0xe0fd, 0xe0fe, 0xe0ff, 0xe100, 0xe101, 0xe102, - 0xe103, 0xe104, 0xe105, 0xe106, 0xe107, 0xe108, 0xe109, 0xe10a, - 0xe10b, 0xe10c, 0xe10d, 0xe10e, 0xe10f, 0xe110, 0xe111, 0xe112, - 0xe113, 0xe114, 0xe115, 0xe116, 0xe117, 0xe118, 0xe119, 0x003f, - /* lead byte ad */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x747b, 0x747c, 0x747d, 0x747f, 0x7482, 0x7484, 0x7485, 0x7486, - 0x7488, 0x7489, 0x748a, 0x748c, 0x748d, 0x748f, 0x7491, 0x7492, - 0x7493, 0x7494, 0x7495, 0x7496, 0x7497, 0x7498, 0x7499, 0x749a, - 0x749b, 0x749d, 0x749f, 0x74a0, 0x74a1, 0x74a2, 0x74a3, 0x74a4, - 0x74a5, 0x74a6, 0x74aa, 0x74ab, 0x74ac, 0x74ad, 0x74ae, 0x74af, - 0x74b0, 0x74b1, 0x74b2, 0x74b3, 0x74b4, 0x74b5, 0x74b6, 0x74b7, - 0x74b8, 0x74b9, 0x74bb, 0x74bc, 0x74bd, 0x74be, 0x74bf, 0x74c0, - 0x74c1, 0x74c2, 0x74c3, 0x74c4, 0x74c5, 0x74c6, 0x74c7, 0x003f, - 0x74c8, 0x74c9, 0x74ca, 0x74cb, 0x74cc, 0x74cd, 0x74ce, 0x74cf, - 0x74d0, 0x74d1, 0x74d3, 0x74d4, 0x74d5, 0x74d6, 0x74d7, 0x74d8, - 0x74d9, 0x74da, 0x74db, 0x74dd, 0x74df, 0x74e1, 0x74e5, 0x74e7, - 0x74e8, 0x74e9, 0x74ea, 0x74eb, 0x74ec, 0x74ed, 0x74f0, 0x74f1, - 0x74f2, 0xe11a, 0xe11b, 0xe11c, 0xe11d, 0xe11e, 0xe11f, 0xe120, - 0xe121, 0xe122, 0xe123, 0xe124, 0xe125, 0xe126, 0xe127, 0xe128, - 0xe129, 0xe12a, 0xe12b, 0xe12c, 0xe12d, 0xe12e, 0xe12f, 0xe130, - 0xe131, 0xe132, 0xe133, 0xe134, 0xe135, 0xe136, 0xe137, 0xe138, - 0xe139, 0xe13a, 0xe13b, 0xe13c, 0xe13d, 0xe13e, 0xe13f, 0xe140, - 0xe141, 0xe142, 0xe143, 0xe144, 0xe145, 0xe146, 0xe147, 0xe148, - 0xe149, 0xe14a, 0xe14b, 0xe14c, 0xe14d, 0xe14e, 0xe14f, 0xe150, - 0xe151, 0xe152, 0xe153, 0xe154, 0xe155, 0xe156, 0xe157, 0xe158, - 0xe159, 0xe15a, 0xe15b, 0xe15c, 0xe15d, 0xe15e, 0xe15f, 0xe160, - 0xe161, 0xe162, 0xe163, 0xe164, 0xe165, 0xe166, 0xe167, 0xe168, - 0xe169, 0xe16a, 0xe16b, 0xe16c, 0xe16d, 0xe16e, 0xe16f, 0xe170, - 0xe171, 0xe172, 0xe173, 0xe174, 0xe175, 0xe176, 0xe177, 0x003f, - /* lead byte ae */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x74f3, 0x74f5, 0x74f8, 0x74f9, 0x74fa, 0x74fb, 0x74fc, 0x74fd, - 0x74fe, 0x7500, 0x7501, 0x7502, 0x7503, 0x7505, 0x7506, 0x7507, - 0x7508, 0x7509, 0x750a, 0x750b, 0x750c, 0x750e, 0x7510, 0x7512, - 0x7514, 0x7515, 0x7516, 0x7517, 0x751b, 0x751d, 0x751e, 0x7520, - 0x7521, 0x7522, 0x7523, 0x7524, 0x7526, 0x7527, 0x752a, 0x752e, - 0x7534, 0x7536, 0x7539, 0x753c, 0x753d, 0x753f, 0x7541, 0x7542, - 0x7543, 0x7544, 0x7546, 0x7547, 0x7549, 0x754a, 0x754d, 0x7550, - 0x7551, 0x7552, 0x7553, 0x7555, 0x7556, 0x7557, 0x7558, 0x003f, - 0x755d, 0x755e, 0x755f, 0x7560, 0x7561, 0x7562, 0x7563, 0x7564, - 0x7567, 0x7568, 0x7569, 0x756b, 0x756c, 0x756d, 0x756e, 0x756f, - 0x7570, 0x7571, 0x7573, 0x7575, 0x7576, 0x7577, 0x757a, 0x757b, - 0x757c, 0x757d, 0x757e, 0x7580, 0x7581, 0x7582, 0x7584, 0x7585, - 0x7587, 0xe178, 0xe179, 0xe17a, 0xe17b, 0xe17c, 0xe17d, 0xe17e, - 0xe17f, 0xe180, 0xe181, 0xe182, 0xe183, 0xe184, 0xe185, 0xe186, - 0xe187, 0xe188, 0xe189, 0xe18a, 0xe18b, 0xe18c, 0xe18d, 0xe18e, - 0xe18f, 0xe190, 0xe191, 0xe192, 0xe193, 0xe194, 0xe195, 0xe196, - 0xe197, 0xe198, 0xe199, 0xe19a, 0xe19b, 0xe19c, 0xe19d, 0xe19e, - 0xe19f, 0xe1a0, 0xe1a1, 0xe1a2, 0xe1a3, 0xe1a4, 0xe1a5, 0xe1a6, - 0xe1a7, 0xe1a8, 0xe1a9, 0xe1aa, 0xe1ab, 0xe1ac, 0xe1ad, 0xe1ae, - 0xe1af, 0xe1b0, 0xe1b1, 0xe1b2, 0xe1b3, 0xe1b4, 0xe1b5, 0xe1b6, - 0xe1b7, 0xe1b8, 0xe1b9, 0xe1ba, 0xe1bb, 0xe1bc, 0xe1bd, 0xe1be, - 0xe1bf, 0xe1c0, 0xe1c1, 0xe1c2, 0xe1c3, 0xe1c4, 0xe1c5, 0xe1c6, - 0xe1c7, 0xe1c8, 0xe1c9, 0xe1ca, 0xe1cb, 0xe1cc, 0xe1cd, 0xe1ce, - 0xe1cf, 0xe1d0, 0xe1d1, 0xe1d2, 0xe1d3, 0xe1d4, 0xe1d5, 0x003f, - /* lead byte af */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7588, 0x7589, 0x758a, 0x758c, 0x758d, 0x758e, 0x7590, 0x7593, - 0x7595, 0x7598, 0x759b, 0x759c, 0x759e, 0x75a2, 0x75a6, 0x75a7, - 0x75a8, 0x75a9, 0x75aa, 0x75ad, 0x75b6, 0x75b7, 0x75ba, 0x75bb, - 0x75bf, 0x75c0, 0x75c1, 0x75c6, 0x75cb, 0x75cc, 0x75ce, 0x75cf, - 0x75d0, 0x75d1, 0x75d3, 0x75d7, 0x75d9, 0x75da, 0x75dc, 0x75dd, - 0x75df, 0x75e0, 0x75e1, 0x75e5, 0x75e9, 0x75ec, 0x75ed, 0x75ee, - 0x75ef, 0x75f2, 0x75f3, 0x75f5, 0x75f6, 0x75f7, 0x75f8, 0x75fa, - 0x75fb, 0x75fd, 0x75fe, 0x7602, 0x7604, 0x7606, 0x7607, 0x003f, - 0x7608, 0x7609, 0x760b, 0x760d, 0x760e, 0x760f, 0x7611, 0x7612, - 0x7613, 0x7614, 0x7616, 0x761a, 0x761c, 0x761d, 0x761e, 0x7621, - 0x7623, 0x7627, 0x7628, 0x762c, 0x762e, 0x762f, 0x7631, 0x7632, - 0x7636, 0x7637, 0x7639, 0x763a, 0x763b, 0x763d, 0x7641, 0x7642, - 0x7644, 0xe1d6, 0xe1d7, 0xe1d8, 0xe1d9, 0xe1da, 0xe1db, 0xe1dc, - 0xe1dd, 0xe1de, 0xe1df, 0xe1e0, 0xe1e1, 0xe1e2, 0xe1e3, 0xe1e4, - 0xe1e5, 0xe1e6, 0xe1e7, 0xe1e8, 0xe1e9, 0xe1ea, 0xe1eb, 0xe1ec, - 0xe1ed, 0xe1ee, 0xe1ef, 0xe1f0, 0xe1f1, 0xe1f2, 0xe1f3, 0xe1f4, - 0xe1f5, 0xe1f6, 0xe1f7, 0xe1f8, 0xe1f9, 0xe1fa, 0xe1fb, 0xe1fc, - 0xe1fd, 0xe1fe, 0xe1ff, 0xe200, 0xe201, 0xe202, 0xe203, 0xe204, - 0xe205, 0xe206, 0xe207, 0xe208, 0xe209, 0xe20a, 0xe20b, 0xe20c, - 0xe20d, 0xe20e, 0xe20f, 0xe210, 0xe211, 0xe212, 0xe213, 0xe214, - 0xe215, 0xe216, 0xe217, 0xe218, 0xe219, 0xe21a, 0xe21b, 0xe21c, - 0xe21d, 0xe21e, 0xe21f, 0xe220, 0xe221, 0xe222, 0xe223, 0xe224, - 0xe225, 0xe226, 0xe227, 0xe228, 0xe229, 0xe22a, 0xe22b, 0xe22c, - 0xe22d, 0xe22e, 0xe22f, 0xe230, 0xe231, 0xe232, 0xe233, 0x003f, - /* lead byte b0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7645, 0x7646, 0x7647, 0x7648, 0x7649, 0x764a, 0x764b, 0x764e, - 0x764f, 0x7650, 0x7651, 0x7652, 0x7653, 0x7655, 0x7657, 0x7658, - 0x7659, 0x765a, 0x765b, 0x765d, 0x765f, 0x7660, 0x7661, 0x7662, - 0x7664, 0x7665, 0x7666, 0x7667, 0x7668, 0x7669, 0x766a, 0x766c, - 0x766d, 0x766e, 0x7670, 0x7671, 0x7672, 0x7673, 0x7674, 0x7675, - 0x7676, 0x7677, 0x7679, 0x767a, 0x767c, 0x767f, 0x7680, 0x7681, - 0x7683, 0x7685, 0x7689, 0x768a, 0x768c, 0x768d, 0x768f, 0x7690, - 0x7692, 0x7694, 0x7695, 0x7697, 0x7698, 0x769a, 0x769b, 0x003f, - 0x769c, 0x769d, 0x769e, 0x769f, 0x76a0, 0x76a1, 0x76a2, 0x76a3, - 0x76a5, 0x76a6, 0x76a7, 0x76a8, 0x76a9, 0x76aa, 0x76ab, 0x76ac, - 0x76ad, 0x76af, 0x76b0, 0x76b3, 0x76b5, 0x76b6, 0x76b7, 0x76b8, - 0x76b9, 0x76ba, 0x76bb, 0x76bc, 0x76bd, 0x76be, 0x76c0, 0x76c1, - 0x76c3, 0x554a, 0x963f, 0x57c3, 0x6328, 0x54ce, 0x5509, 0x54c0, - 0x7691, 0x764c, 0x853c, 0x77ee, 0x827e, 0x788d, 0x7231, 0x9698, - 0x978d, 0x6c28, 0x5b89, 0x4ffa, 0x6309, 0x6697, 0x5cb8, 0x80fa, - 0x6848, 0x80ae, 0x6602, 0x76ce, 0x51f9, 0x6556, 0x71ac, 0x7ff1, - 0x8884, 0x50b2, 0x5965, 0x61ca, 0x6fb3, 0x82ad, 0x634c, 0x6252, - 0x53ed, 0x5427, 0x7b06, 0x516b, 0x75a4, 0x5df4, 0x62d4, 0x8dcb, - 0x9776, 0x628a, 0x8019, 0x575d, 0x9738, 0x7f62, 0x7238, 0x767d, - 0x67cf, 0x767e, 0x6446, 0x4f70, 0x8d25, 0x62dc, 0x7a17, 0x6591, - 0x73ed, 0x642c, 0x6273, 0x822c, 0x9881, 0x677f, 0x7248, 0x626e, - 0x62cc, 0x4f34, 0x74e3, 0x534a, 0x529e, 0x7eca, 0x90a6, 0x5e2e, - 0x6886, 0x699c, 0x8180, 0x7ed1, 0x68d2, 0x78c5, 0x868c, 0x9551, - 0x508d, 0x8c24, 0x82de, 0x80de, 0x5305, 0x8912, 0x5265, 0x003f, - /* lead byte b1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x76c4, 0x76c7, 0x76c9, 0x76cb, 0x76cc, 0x76d3, 0x76d5, 0x76d9, - 0x76da, 0x76dc, 0x76dd, 0x76de, 0x76e0, 0x76e1, 0x76e2, 0x76e3, - 0x76e4, 0x76e6, 0x76e7, 0x76e8, 0x76e9, 0x76ea, 0x76eb, 0x76ec, - 0x76ed, 0x76f0, 0x76f3, 0x76f5, 0x76f6, 0x76f7, 0x76fa, 0x76fb, - 0x76fd, 0x76ff, 0x7700, 0x7702, 0x7703, 0x7705, 0x7706, 0x770a, - 0x770c, 0x770e, 0x770f, 0x7710, 0x7711, 0x7712, 0x7713, 0x7714, - 0x7715, 0x7716, 0x7717, 0x7718, 0x771b, 0x771c, 0x771d, 0x771e, - 0x7721, 0x7723, 0x7724, 0x7725, 0x7727, 0x772a, 0x772b, 0x003f, - 0x772c, 0x772e, 0x7730, 0x7731, 0x7732, 0x7733, 0x7734, 0x7739, - 0x773b, 0x773d, 0x773e, 0x773f, 0x7742, 0x7744, 0x7745, 0x7746, - 0x7748, 0x7749, 0x774a, 0x774b, 0x774c, 0x774d, 0x774e, 0x774f, - 0x7752, 0x7753, 0x7754, 0x7755, 0x7756, 0x7757, 0x7758, 0x7759, - 0x775c, 0x8584, 0x96f9, 0x4fdd, 0x5821, 0x9971, 0x5b9d, 0x62b1, - 0x62a5, 0x66b4, 0x8c79, 0x9c8d, 0x7206, 0x676f, 0x7891, 0x60b2, - 0x5351, 0x5317, 0x8f88, 0x80cc, 0x8d1d, 0x94a1, 0x500d, 0x72c8, - 0x5907, 0x60eb, 0x7119, 0x88ab, 0x5954, 0x82ef, 0x672c, 0x7b28, - 0x5d29, 0x7ef7, 0x752d, 0x6cf5, 0x8e66, 0x8ff8, 0x903c, 0x9f3b, - 0x6bd4, 0x9119, 0x7b14, 0x5f7c, 0x78a7, 0x84d6, 0x853d, 0x6bd5, - 0x6bd9, 0x6bd6, 0x5e01, 0x5e87, 0x75f9, 0x95ed, 0x655d, 0x5f0a, - 0x5fc5, 0x8f9f, 0x58c1, 0x81c2, 0x907f, 0x965b, 0x97ad, 0x8fb9, - 0x7f16, 0x8d2c, 0x6241, 0x4fbf, 0x53d8, 0x535e, 0x8fa8, 0x8fa9, - 0x8fab, 0x904d, 0x6807, 0x5f6a, 0x8198, 0x8868, 0x9cd6, 0x618b, - 0x522b, 0x762a, 0x5f6c, 0x658c, 0x6fd2, 0x6ee8, 0x5bbe, 0x6448, - 0x5175, 0x51b0, 0x67c4, 0x4e19, 0x79c9, 0x997c, 0x70b3, 0x003f, - /* lead byte b2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x775d, 0x775e, 0x775f, 0x7760, 0x7764, 0x7767, 0x7769, 0x776a, - 0x776d, 0x776e, 0x776f, 0x7770, 0x7771, 0x7772, 0x7773, 0x7774, - 0x7775, 0x7776, 0x7777, 0x7778, 0x777a, 0x777b, 0x777c, 0x7781, - 0x7782, 0x7783, 0x7786, 0x7787, 0x7788, 0x7789, 0x778a, 0x778b, - 0x778f, 0x7790, 0x7793, 0x7794, 0x7795, 0x7796, 0x7797, 0x7798, - 0x7799, 0x779a, 0x779b, 0x779c, 0x779d, 0x779e, 0x77a1, 0x77a3, - 0x77a4, 0x77a6, 0x77a8, 0x77ab, 0x77ad, 0x77ae, 0x77af, 0x77b1, - 0x77b2, 0x77b4, 0x77b6, 0x77b7, 0x77b8, 0x77b9, 0x77ba, 0x003f, - 0x77bc, 0x77be, 0x77c0, 0x77c1, 0x77c2, 0x77c3, 0x77c4, 0x77c5, - 0x77c6, 0x77c7, 0x77c8, 0x77c9, 0x77ca, 0x77cb, 0x77cc, 0x77ce, - 0x77cf, 0x77d0, 0x77d1, 0x77d2, 0x77d3, 0x77d4, 0x77d5, 0x77d6, - 0x77d8, 0x77d9, 0x77da, 0x77dd, 0x77de, 0x77df, 0x77e0, 0x77e1, - 0x77e4, 0x75c5, 0x5e76, 0x73bb, 0x83e0, 0x64ad, 0x62e8, 0x94b5, - 0x6ce2, 0x535a, 0x52c3, 0x640f, 0x94c2, 0x7b94, 0x4f2f, 0x5e1b, - 0x8236, 0x8116, 0x818a, 0x6e24, 0x6cca, 0x9a73, 0x6355, 0x535c, - 0x54fa, 0x8865, 0x57e0, 0x4e0d, 0x5e03, 0x6b65, 0x7c3f, 0x90e8, - 0x6016, 0x64e6, 0x731c, 0x88c1, 0x6750, 0x624d, 0x8d22, 0x776c, - 0x8e29, 0x91c7, 0x5f69, 0x83dc, 0x8521, 0x9910, 0x53c2, 0x8695, - 0x6b8b, 0x60ed, 0x60e8, 0x707f, 0x82cd, 0x8231, 0x4ed3, 0x6ca7, - 0x85cf, 0x64cd, 0x7cd9, 0x69fd, 0x66f9, 0x8349, 0x5395, 0x7b56, - 0x4fa7, 0x518c, 0x6d4b, 0x5c42, 0x8e6d, 0x63d2, 0x53c9, 0x832c, - 0x8336, 0x67e5, 0x78b4, 0x643d, 0x5bdf, 0x5c94, 0x5dee, 0x8be7, - 0x62c6, 0x67f4, 0x8c7a, 0x6400, 0x63ba, 0x8749, 0x998b, 0x8c17, - 0x7f20, 0x94f2, 0x4ea7, 0x9610, 0x98a4, 0x660c, 0x7316, 0x003f, - /* lead byte b3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x77e6, 0x77e8, 0x77ea, 0x77ef, 0x77f0, 0x77f1, 0x77f2, 0x77f4, - 0x77f5, 0x77f7, 0x77f9, 0x77fa, 0x77fb, 0x77fc, 0x7803, 0x7804, - 0x7805, 0x7806, 0x7807, 0x7808, 0x780a, 0x780b, 0x780e, 0x780f, - 0x7810, 0x7813, 0x7815, 0x7819, 0x781b, 0x781e, 0x7820, 0x7821, - 0x7822, 0x7824, 0x7828, 0x782a, 0x782b, 0x782e, 0x782f, 0x7831, - 0x7832, 0x7833, 0x7835, 0x7836, 0x783d, 0x783f, 0x7841, 0x7842, - 0x7843, 0x7844, 0x7846, 0x7848, 0x7849, 0x784a, 0x784b, 0x784d, - 0x784f, 0x7851, 0x7853, 0x7854, 0x7858, 0x7859, 0x785a, 0x003f, - 0x785b, 0x785c, 0x785e, 0x785f, 0x7860, 0x7861, 0x7862, 0x7863, - 0x7864, 0x7865, 0x7866, 0x7867, 0x7868, 0x7869, 0x786f, 0x7870, - 0x7871, 0x7872, 0x7873, 0x7874, 0x7875, 0x7876, 0x7878, 0x7879, - 0x787a, 0x787b, 0x787d, 0x787e, 0x787f, 0x7880, 0x7881, 0x7882, - 0x7883, 0x573a, 0x5c1d, 0x5e38, 0x957f, 0x507f, 0x80a0, 0x5382, - 0x655e, 0x7545, 0x5531, 0x5021, 0x8d85, 0x6284, 0x949e, 0x671d, - 0x5632, 0x6f6e, 0x5de2, 0x5435, 0x7092, 0x8f66, 0x626f, 0x64a4, - 0x63a3, 0x5f7b, 0x6f88, 0x90f4, 0x81e3, 0x8fb0, 0x5c18, 0x6668, - 0x5ff1, 0x6c89, 0x9648, 0x8d81, 0x886c, 0x6491, 0x79f0, 0x57ce, - 0x6a59, 0x6210, 0x5448, 0x4e58, 0x7a0b, 0x60e9, 0x6f84, 0x8bda, - 0x627f, 0x901e, 0x9a8b, 0x79e4, 0x5403, 0x75f4, 0x6301, 0x5319, - 0x6c60, 0x8fdf, 0x5f1b, 0x9a70, 0x803b, 0x9f7f, 0x4f88, 0x5c3a, - 0x8d64, 0x7fc5, 0x65a5, 0x70bd, 0x5145, 0x51b2, 0x866b, 0x5d07, - 0x5ba0, 0x62bd, 0x916c, 0x7574, 0x8e0c, 0x7a20, 0x6101, 0x7b79, - 0x4ec7, 0x7ef8, 0x7785, 0x4e11, 0x81ed, 0x521d, 0x51fa, 0x6a71, - 0x53a8, 0x8e87, 0x9504, 0x96cf, 0x6ec1, 0x9664, 0x695a, 0x003f, - /* lead byte b4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7884, 0x7885, 0x7886, 0x7888, 0x788a, 0x788b, 0x788f, 0x7890, - 0x7892, 0x7894, 0x7895, 0x7896, 0x7899, 0x789d, 0x789e, 0x78a0, - 0x78a2, 0x78a4, 0x78a6, 0x78a8, 0x78a9, 0x78aa, 0x78ab, 0x78ac, - 0x78ad, 0x78ae, 0x78af, 0x78b5, 0x78b6, 0x78b7, 0x78b8, 0x78ba, - 0x78bb, 0x78bc, 0x78bd, 0x78bf, 0x78c0, 0x78c2, 0x78c3, 0x78c4, - 0x78c6, 0x78c7, 0x78c8, 0x78cc, 0x78cd, 0x78ce, 0x78cf, 0x78d1, - 0x78d2, 0x78d3, 0x78d6, 0x78d7, 0x78d8, 0x78da, 0x78db, 0x78dc, - 0x78dd, 0x78de, 0x78df, 0x78e0, 0x78e1, 0x78e2, 0x78e3, 0x003f, - 0x78e4, 0x78e5, 0x78e6, 0x78e7, 0x78e9, 0x78ea, 0x78eb, 0x78ed, - 0x78ee, 0x78ef, 0x78f0, 0x78f1, 0x78f3, 0x78f5, 0x78f6, 0x78f8, - 0x78f9, 0x78fb, 0x78fc, 0x78fd, 0x78fe, 0x78ff, 0x7900, 0x7902, - 0x7903, 0x7904, 0x7906, 0x7907, 0x7908, 0x7909, 0x790a, 0x790b, - 0x790c, 0x7840, 0x50a8, 0x77d7, 0x6410, 0x89e6, 0x5904, 0x63e3, - 0x5ddd, 0x7a7f, 0x693d, 0x4f20, 0x8239, 0x5598, 0x4e32, 0x75ae, - 0x7a97, 0x5e62, 0x5e8a, 0x95ef, 0x521b, 0x5439, 0x708a, 0x6376, - 0x9524, 0x5782, 0x6625, 0x693f, 0x9187, 0x5507, 0x6df3, 0x7eaf, - 0x8822, 0x6233, 0x7ef0, 0x75b5, 0x8328, 0x78c1, 0x96cc, 0x8f9e, - 0x6148, 0x74f7, 0x8bcd, 0x6b64, 0x523a, 0x8d50, 0x6b21, 0x806a, - 0x8471, 0x56f1, 0x5306, 0x4ece, 0x4e1b, 0x51d1, 0x7c97, 0x918b, - 0x7c07, 0x4fc3, 0x8e7f, 0x7be1, 0x7a9c, 0x6467, 0x5d14, 0x50ac, - 0x8106, 0x7601, 0x7cb9, 0x6dec, 0x7fe0, 0x6751, 0x5b58, 0x5bf8, - 0x78cb, 0x64ae, 0x6413, 0x63aa, 0x632b, 0x9519, 0x642d, 0x8fbe, - 0x7b54, 0x7629, 0x6253, 0x5927, 0x5446, 0x6b79, 0x50a3, 0x6234, - 0x5e26, 0x6b86, 0x4ee3, 0x8d37, 0x888b, 0x5f85, 0x902e, 0x003f, - /* lead byte b5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x790d, 0x790e, 0x790f, 0x7910, 0x7911, 0x7912, 0x7914, 0x7915, - 0x7916, 0x7917, 0x7918, 0x7919, 0x791a, 0x791b, 0x791c, 0x791d, - 0x791f, 0x7920, 0x7921, 0x7922, 0x7923, 0x7925, 0x7926, 0x7927, - 0x7928, 0x7929, 0x792a, 0x792b, 0x792c, 0x792d, 0x792e, 0x792f, - 0x7930, 0x7931, 0x7932, 0x7933, 0x7935, 0x7936, 0x7937, 0x7938, - 0x7939, 0x793d, 0x793f, 0x7942, 0x7943, 0x7944, 0x7945, 0x7947, - 0x794a, 0x794b, 0x794c, 0x794d, 0x794e, 0x794f, 0x7950, 0x7951, - 0x7952, 0x7954, 0x7955, 0x7958, 0x7959, 0x7961, 0x7963, 0x003f, - 0x7964, 0x7966, 0x7969, 0x796a, 0x796b, 0x796c, 0x796e, 0x7970, - 0x7971, 0x7972, 0x7973, 0x7974, 0x7975, 0x7976, 0x7979, 0x797b, - 0x797c, 0x797d, 0x797e, 0x797f, 0x7982, 0x7983, 0x7986, 0x7987, - 0x7988, 0x7989, 0x798b, 0x798c, 0x798d, 0x798e, 0x7990, 0x7991, - 0x7992, 0x6020, 0x803d, 0x62c5, 0x4e39, 0x5355, 0x90f8, 0x63b8, - 0x80c6, 0x65e6, 0x6c2e, 0x4f46, 0x60ee, 0x6de1, 0x8bde, 0x5f39, - 0x86cb, 0x5f53, 0x6321, 0x515a, 0x8361, 0x6863, 0x5200, 0x6363, - 0x8e48, 0x5012, 0x5c9b, 0x7977, 0x5bfc, 0x5230, 0x7a3b, 0x60bc, - 0x9053, 0x76d7, 0x5fb7, 0x5f97, 0x7684, 0x8e6c, 0x706f, 0x767b, - 0x7b49, 0x77aa, 0x51f3, 0x9093, 0x5824, 0x4f4e, 0x6ef4, 0x8fea, - 0x654c, 0x7b1b, 0x72c4, 0x6da4, 0x7fdf, 0x5ae1, 0x62b5, 0x5e95, - 0x5730, 0x8482, 0x7b2c, 0x5e1d, 0x5f1f, 0x9012, 0x7f14, 0x98a0, - 0x6382, 0x6ec7, 0x7898, 0x70b9, 0x5178, 0x975b, 0x57ab, 0x7535, - 0x4f43, 0x7538, 0x5e97, 0x60e6, 0x5960, 0x6dc0, 0x6bbf, 0x7889, - 0x53fc, 0x96d5, 0x51cb, 0x5201, 0x6389, 0x540a, 0x9493, 0x8c03, - 0x8dcc, 0x7239, 0x789f, 0x8776, 0x8fed, 0x8c0d, 0x53e0, 0x003f, - /* lead byte b6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7993, 0x7994, 0x7995, 0x7996, 0x7997, 0x7998, 0x7999, 0x799b, - 0x799c, 0x799d, 0x799e, 0x799f, 0x79a0, 0x79a1, 0x79a2, 0x79a3, - 0x79a4, 0x79a5, 0x79a6, 0x79a8, 0x79a9, 0x79aa, 0x79ab, 0x79ac, - 0x79ad, 0x79ae, 0x79af, 0x79b0, 0x79b1, 0x79b2, 0x79b4, 0x79b5, - 0x79b6, 0x79b7, 0x79b8, 0x79bc, 0x79bf, 0x79c2, 0x79c4, 0x79c5, - 0x79c7, 0x79c8, 0x79ca, 0x79cc, 0x79ce, 0x79cf, 0x79d0, 0x79d3, - 0x79d4, 0x79d6, 0x79d7, 0x79d9, 0x79da, 0x79db, 0x79dc, 0x79dd, - 0x79de, 0x79e0, 0x79e1, 0x79e2, 0x79e5, 0x79e8, 0x79ea, 0x003f, - 0x79ec, 0x79ee, 0x79f1, 0x79f2, 0x79f3, 0x79f4, 0x79f5, 0x79f6, - 0x79f7, 0x79f9, 0x79fa, 0x79fc, 0x79fe, 0x79ff, 0x7a01, 0x7a04, - 0x7a05, 0x7a07, 0x7a08, 0x7a09, 0x7a0a, 0x7a0c, 0x7a0f, 0x7a10, - 0x7a11, 0x7a12, 0x7a13, 0x7a15, 0x7a16, 0x7a18, 0x7a19, 0x7a1b, - 0x7a1c, 0x4e01, 0x76ef, 0x53ee, 0x9489, 0x9876, 0x9f0e, 0x952d, - 0x5b9a, 0x8ba2, 0x4e22, 0x4e1c, 0x51ac, 0x8463, 0x61c2, 0x52a8, - 0x680b, 0x4f97, 0x606b, 0x51bb, 0x6d1e, 0x515c, 0x6296, 0x6597, - 0x9661, 0x8c46, 0x9017, 0x75d8, 0x90fd, 0x7763, 0x6bd2, 0x728a, - 0x72ec, 0x8bfb, 0x5835, 0x7779, 0x8d4c, 0x675c, 0x9540, 0x809a, - 0x5ea6, 0x6e21, 0x5992, 0x7aef, 0x77ed, 0x953b, 0x6bb5, 0x65ad, - 0x7f0e, 0x5806, 0x5151, 0x961f, 0x5bf9, 0x58a9, 0x5428, 0x8e72, - 0x6566, 0x987f, 0x56e4, 0x949d, 0x76fe, 0x9041, 0x6387, 0x54c6, - 0x591a, 0x593a, 0x579b, 0x8eb2, 0x6735, 0x8dfa, 0x8235, 0x5241, - 0x60f0, 0x5815, 0x86fe, 0x5ce8, 0x9e45, 0x4fc4, 0x989d, 0x8bb9, - 0x5a25, 0x6076, 0x5384, 0x627c, 0x904f, 0x9102, 0x997f, 0x6069, - 0x800c, 0x513f, 0x8033, 0x5c14, 0x9975, 0x6d31, 0x4e8c, 0x003f, - /* lead byte b7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7a1d, 0x7a1f, 0x7a21, 0x7a22, 0x7a24, 0x7a25, 0x7a26, 0x7a27, - 0x7a28, 0x7a29, 0x7a2a, 0x7a2b, 0x7a2c, 0x7a2d, 0x7a2e, 0x7a2f, - 0x7a30, 0x7a31, 0x7a32, 0x7a34, 0x7a35, 0x7a36, 0x7a38, 0x7a3a, - 0x7a3e, 0x7a40, 0x7a41, 0x7a42, 0x7a43, 0x7a44, 0x7a45, 0x7a47, - 0x7a48, 0x7a49, 0x7a4a, 0x7a4b, 0x7a4c, 0x7a4d, 0x7a4e, 0x7a4f, - 0x7a50, 0x7a52, 0x7a53, 0x7a54, 0x7a55, 0x7a56, 0x7a58, 0x7a59, - 0x7a5a, 0x7a5b, 0x7a5c, 0x7a5d, 0x7a5e, 0x7a5f, 0x7a60, 0x7a61, - 0x7a62, 0x7a63, 0x7a64, 0x7a65, 0x7a66, 0x7a67, 0x7a68, 0x003f, - 0x7a69, 0x7a6a, 0x7a6b, 0x7a6c, 0x7a6d, 0x7a6e, 0x7a6f, 0x7a71, - 0x7a72, 0x7a73, 0x7a75, 0x7a7b, 0x7a7c, 0x7a7d, 0x7a7e, 0x7a82, - 0x7a85, 0x7a87, 0x7a89, 0x7a8a, 0x7a8b, 0x7a8c, 0x7a8e, 0x7a8f, - 0x7a90, 0x7a93, 0x7a94, 0x7a99, 0x7a9a, 0x7a9b, 0x7a9e, 0x7aa1, - 0x7aa2, 0x8d30, 0x53d1, 0x7f5a, 0x7b4f, 0x4f10, 0x4e4f, 0x9600, - 0x6cd5, 0x73d0, 0x85e9, 0x5e06, 0x756a, 0x7ffb, 0x6a0a, 0x77fe, - 0x9492, 0x7e41, 0x51e1, 0x70e6, 0x53cd, 0x8fd4, 0x8303, 0x8d29, - 0x72af, 0x996d, 0x6cdb, 0x574a, 0x82b3, 0x65b9, 0x80aa, 0x623f, - 0x9632, 0x59a8, 0x4eff, 0x8bbf, 0x7eba, 0x653e, 0x83f2, 0x975e, - 0x5561, 0x98de, 0x80a5, 0x532a, 0x8bfd, 0x5420, 0x80ba, 0x5e9f, - 0x6cb8, 0x8d39, 0x82ac, 0x915a, 0x5429, 0x6c1b, 0x5206, 0x7eb7, - 0x575f, 0x711a, 0x6c7e, 0x7c89, 0x594b, 0x4efd, 0x5fff, 0x6124, - 0x7caa, 0x4e30, 0x5c01, 0x67ab, 0x8702, 0x5cf0, 0x950b, 0x98ce, - 0x75af, 0x70fd, 0x9022, 0x51af, 0x7f1d, 0x8bbd, 0x5949, 0x51e4, - 0x4f5b, 0x5426, 0x592b, 0x6577, 0x80a4, 0x5b75, 0x6276, 0x62c2, - 0x8f90, 0x5e45, 0x6c1f, 0x7b26, 0x4f0f, 0x4fd8, 0x670d, 0x003f, - /* lead byte b8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7aa3, 0x7aa4, 0x7aa7, 0x7aa9, 0x7aaa, 0x7aab, 0x7aae, 0x7aaf, - 0x7ab0, 0x7ab1, 0x7ab2, 0x7ab4, 0x7ab5, 0x7ab6, 0x7ab7, 0x7ab8, - 0x7ab9, 0x7aba, 0x7abb, 0x7abc, 0x7abd, 0x7abe, 0x7ac0, 0x7ac1, - 0x7ac2, 0x7ac3, 0x7ac4, 0x7ac5, 0x7ac6, 0x7ac7, 0x7ac8, 0x7ac9, - 0x7aca, 0x7acc, 0x7acd, 0x7ace, 0x7acf, 0x7ad0, 0x7ad1, 0x7ad2, - 0x7ad3, 0x7ad4, 0x7ad5, 0x7ad7, 0x7ad8, 0x7ada, 0x7adb, 0x7adc, - 0x7add, 0x7ae1, 0x7ae2, 0x7ae4, 0x7ae7, 0x7ae8, 0x7ae9, 0x7aea, - 0x7aeb, 0x7aec, 0x7aee, 0x7af0, 0x7af1, 0x7af2, 0x7af3, 0x003f, - 0x7af4, 0x7af5, 0x7af6, 0x7af7, 0x7af8, 0x7afb, 0x7afc, 0x7afe, - 0x7b00, 0x7b01, 0x7b02, 0x7b05, 0x7b07, 0x7b09, 0x7b0c, 0x7b0d, - 0x7b0e, 0x7b10, 0x7b12, 0x7b13, 0x7b16, 0x7b17, 0x7b18, 0x7b1a, - 0x7b1c, 0x7b1d, 0x7b1f, 0x7b21, 0x7b22, 0x7b23, 0x7b27, 0x7b29, - 0x7b2d, 0x6d6e, 0x6daa, 0x798f, 0x88b1, 0x5f17, 0x752b, 0x629a, - 0x8f85, 0x4fef, 0x91dc, 0x65a7, 0x812f, 0x8151, 0x5e9c, 0x8150, - 0x8d74, 0x526f, 0x8986, 0x8d4b, 0x590d, 0x5085, 0x4ed8, 0x961c, - 0x7236, 0x8179, 0x8d1f, 0x5bcc, 0x8ba3, 0x9644, 0x5987, 0x7f1a, - 0x5490, 0x5676, 0x560e, 0x8be5, 0x6539, 0x6982, 0x9499, 0x76d6, - 0x6e89, 0x5e72, 0x7518, 0x6746, 0x67d1, 0x7aff, 0x809d, 0x8d76, - 0x611f, 0x79c6, 0x6562, 0x8d63, 0x5188, 0x521a, 0x94a2, 0x7f38, - 0x809b, 0x7eb2, 0x5c97, 0x6e2f, 0x6760, 0x7bd9, 0x768b, 0x9ad8, - 0x818f, 0x7f94, 0x7cd5, 0x641e, 0x9550, 0x7a3f, 0x544a, 0x54e5, - 0x6b4c, 0x6401, 0x6208, 0x9e3d, 0x80f3, 0x7599, 0x5272, 0x9769, - 0x845b, 0x683c, 0x86e4, 0x9601, 0x9694, 0x94ec, 0x4e2a, 0x5404, - 0x7ed9, 0x6839, 0x8ddf, 0x8015, 0x66f4, 0x5e9a, 0x7fb9, 0x003f, - /* lead byte b9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7b2f, 0x7b30, 0x7b32, 0x7b34, 0x7b35, 0x7b36, 0x7b37, 0x7b39, - 0x7b3b, 0x7b3d, 0x7b3f, 0x7b40, 0x7b41, 0x7b42, 0x7b43, 0x7b44, - 0x7b46, 0x7b48, 0x7b4a, 0x7b4d, 0x7b4e, 0x7b53, 0x7b55, 0x7b57, - 0x7b59, 0x7b5c, 0x7b5e, 0x7b5f, 0x7b61, 0x7b63, 0x7b64, 0x7b65, - 0x7b66, 0x7b67, 0x7b68, 0x7b69, 0x7b6a, 0x7b6b, 0x7b6c, 0x7b6d, - 0x7b6f, 0x7b70, 0x7b73, 0x7b74, 0x7b76, 0x7b78, 0x7b7a, 0x7b7c, - 0x7b7d, 0x7b7f, 0x7b81, 0x7b82, 0x7b83, 0x7b84, 0x7b86, 0x7b87, - 0x7b88, 0x7b89, 0x7b8a, 0x7b8b, 0x7b8c, 0x7b8e, 0x7b8f, 0x003f, - 0x7b91, 0x7b92, 0x7b93, 0x7b96, 0x7b98, 0x7b99, 0x7b9a, 0x7b9b, - 0x7b9e, 0x7b9f, 0x7ba0, 0x7ba3, 0x7ba4, 0x7ba5, 0x7bae, 0x7baf, - 0x7bb0, 0x7bb2, 0x7bb3, 0x7bb5, 0x7bb6, 0x7bb7, 0x7bb9, 0x7bba, - 0x7bbb, 0x7bbc, 0x7bbd, 0x7bbe, 0x7bbf, 0x7bc0, 0x7bc2, 0x7bc3, - 0x7bc4, 0x57c2, 0x803f, 0x6897, 0x5de5, 0x653b, 0x529f, 0x606d, - 0x9f9a, 0x4f9b, 0x8eac, 0x516c, 0x5bab, 0x5f13, 0x5de9, 0x6c5e, - 0x62f1, 0x8d21, 0x5171, 0x94a9, 0x52fe, 0x6c9f, 0x82df, 0x72d7, - 0x57a2, 0x6784, 0x8d2d, 0x591f, 0x8f9c, 0x83c7, 0x5495, 0x7b8d, - 0x4f30, 0x6cbd, 0x5b64, 0x59d1, 0x9f13, 0x53e4, 0x86ca, 0x9aa8, - 0x8c37, 0x80a1, 0x6545, 0x987e, 0x56fa, 0x96c7, 0x522e, 0x74dc, - 0x5250, 0x5be1, 0x6302, 0x8902, 0x4e56, 0x62d0, 0x602a, 0x68fa, - 0x5173, 0x5b98, 0x51a0, 0x89c2, 0x7ba1, 0x9986, 0x7f50, 0x60ef, - 0x704c, 0x8d2f, 0x5149, 0x5e7f, 0x901b, 0x7470, 0x89c4, 0x572d, - 0x7845, 0x5f52, 0x9f9f, 0x95fa, 0x8f68, 0x9b3c, 0x8be1, 0x7678, - 0x6842, 0x67dc, 0x8dea, 0x8d35, 0x523d, 0x8f8a, 0x6eda, 0x68cd, - 0x9505, 0x90ed, 0x56fd, 0x679c, 0x88f9, 0x8fc7, 0x54c8, 0x003f, - /* lead byte ba */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7bc5, 0x7bc8, 0x7bc9, 0x7bca, 0x7bcb, 0x7bcd, 0x7bce, 0x7bcf, - 0x7bd0, 0x7bd2, 0x7bd4, 0x7bd5, 0x7bd6, 0x7bd7, 0x7bd8, 0x7bdb, - 0x7bdc, 0x7bde, 0x7bdf, 0x7be0, 0x7be2, 0x7be3, 0x7be4, 0x7be7, - 0x7be8, 0x7be9, 0x7beb, 0x7bec, 0x7bed, 0x7bef, 0x7bf0, 0x7bf2, - 0x7bf3, 0x7bf4, 0x7bf5, 0x7bf6, 0x7bf8, 0x7bf9, 0x7bfa, 0x7bfb, - 0x7bfd, 0x7bff, 0x7c00, 0x7c01, 0x7c02, 0x7c03, 0x7c04, 0x7c05, - 0x7c06, 0x7c08, 0x7c09, 0x7c0a, 0x7c0d, 0x7c0e, 0x7c10, 0x7c11, - 0x7c12, 0x7c13, 0x7c14, 0x7c15, 0x7c17, 0x7c18, 0x7c19, 0x003f, - 0x7c1a, 0x7c1b, 0x7c1c, 0x7c1d, 0x7c1e, 0x7c20, 0x7c21, 0x7c22, - 0x7c23, 0x7c24, 0x7c25, 0x7c28, 0x7c29, 0x7c2b, 0x7c2c, 0x7c2d, - 0x7c2e, 0x7c2f, 0x7c30, 0x7c31, 0x7c32, 0x7c33, 0x7c34, 0x7c35, - 0x7c36, 0x7c37, 0x7c39, 0x7c3a, 0x7c3b, 0x7c3c, 0x7c3d, 0x7c3e, - 0x7c42, 0x9ab8, 0x5b69, 0x6d77, 0x6c26, 0x4ea5, 0x5bb3, 0x9a87, - 0x9163, 0x61a8, 0x90af, 0x97e9, 0x542b, 0x6db5, 0x5bd2, 0x51fd, - 0x558a, 0x7f55, 0x7ff0, 0x64bc, 0x634d, 0x65f1, 0x61be, 0x608d, - 0x710a, 0x6c57, 0x6c49, 0x592f, 0x676d, 0x822a, 0x58d5, 0x568e, - 0x8c6a, 0x6beb, 0x90dd, 0x597d, 0x8017, 0x53f7, 0x6d69, 0x5475, - 0x559d, 0x8377, 0x83cf, 0x6838, 0x79be, 0x548c, 0x4f55, 0x5408, - 0x76d2, 0x8c89, 0x9602, 0x6cb3, 0x6db8, 0x8d6b, 0x8910, 0x9e64, - 0x8d3a, 0x563f, 0x9ed1, 0x75d5, 0x5f88, 0x72e0, 0x6068, 0x54fc, - 0x4ea8, 0x6a2a, 0x8861, 0x6052, 0x8f70, 0x54c4, 0x70d8, 0x8679, - 0x9e3f, 0x6d2a, 0x5b8f, 0x5f18, 0x7ea2, 0x5589, 0x4faf, 0x7334, - 0x543c, 0x539a, 0x5019, 0x540e, 0x547c, 0x4e4e, 0x5ffd, 0x745a, - 0x58f6, 0x846b, 0x80e1, 0x8774, 0x72d0, 0x7cca, 0x6e56, 0x003f, - /* lead byte bb */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7c43, 0x7c44, 0x7c45, 0x7c46, 0x7c47, 0x7c48, 0x7c49, 0x7c4a, - 0x7c4b, 0x7c4c, 0x7c4e, 0x7c4f, 0x7c50, 0x7c51, 0x7c52, 0x7c53, - 0x7c54, 0x7c55, 0x7c56, 0x7c57, 0x7c58, 0x7c59, 0x7c5a, 0x7c5b, - 0x7c5c, 0x7c5d, 0x7c5e, 0x7c5f, 0x7c60, 0x7c61, 0x7c62, 0x7c63, - 0x7c64, 0x7c65, 0x7c66, 0x7c67, 0x7c68, 0x7c69, 0x7c6a, 0x7c6b, - 0x7c6c, 0x7c6d, 0x7c6e, 0x7c6f, 0x7c70, 0x7c71, 0x7c72, 0x7c75, - 0x7c76, 0x7c77, 0x7c78, 0x7c79, 0x7c7a, 0x7c7e, 0x7c7f, 0x7c80, - 0x7c81, 0x7c82, 0x7c83, 0x7c84, 0x7c85, 0x7c86, 0x7c87, 0x003f, - 0x7c88, 0x7c8a, 0x7c8b, 0x7c8c, 0x7c8d, 0x7c8e, 0x7c8f, 0x7c90, - 0x7c93, 0x7c94, 0x7c96, 0x7c99, 0x7c9a, 0x7c9b, 0x7ca0, 0x7ca1, - 0x7ca3, 0x7ca6, 0x7ca7, 0x7ca8, 0x7ca9, 0x7cab, 0x7cac, 0x7cad, - 0x7caf, 0x7cb0, 0x7cb4, 0x7cb5, 0x7cb6, 0x7cb7, 0x7cb8, 0x7cba, - 0x7cbb, 0x5f27, 0x864e, 0x552c, 0x62a4, 0x4e92, 0x6caa, 0x6237, - 0x82b1, 0x54d7, 0x534e, 0x733e, 0x6ed1, 0x753b, 0x5212, 0x5316, - 0x8bdd, 0x69d0, 0x5f8a, 0x6000, 0x6dee, 0x574f, 0x6b22, 0x73af, - 0x6853, 0x8fd8, 0x7f13, 0x6362, 0x60a3, 0x5524, 0x75ea, 0x8c62, - 0x7115, 0x6da3, 0x5ba6, 0x5e7b, 0x8352, 0x614c, 0x9ec4, 0x78fa, - 0x8757, 0x7c27, 0x7687, 0x51f0, 0x60f6, 0x714c, 0x6643, 0x5e4c, - 0x604d, 0x8c0e, 0x7070, 0x6325, 0x8f89, 0x5fbd, 0x6062, 0x86d4, - 0x56de, 0x6bc1, 0x6094, 0x6167, 0x5349, 0x60e0, 0x6666, 0x8d3f, - 0x79fd, 0x4f1a, 0x70e9, 0x6c47, 0x8bb3, 0x8bf2, 0x7ed8, 0x8364, - 0x660f, 0x5a5a, 0x9b42, 0x6d51, 0x6df7, 0x8c41, 0x6d3b, 0x4f19, - 0x706b, 0x83b7, 0x6216, 0x60d1, 0x970d, 0x8d27, 0x7978, 0x51fb, - 0x573e, 0x57fa, 0x673a, 0x7578, 0x7a3d, 0x79ef, 0x7b95, 0x003f, - /* lead byte bc */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7cbf, 0x7cc0, 0x7cc2, 0x7cc3, 0x7cc4, 0x7cc6, 0x7cc9, 0x7ccb, - 0x7cce, 0x7ccf, 0x7cd0, 0x7cd1, 0x7cd2, 0x7cd3, 0x7cd4, 0x7cd8, - 0x7cda, 0x7cdb, 0x7cdd, 0x7cde, 0x7ce1, 0x7ce2, 0x7ce3, 0x7ce4, - 0x7ce5, 0x7ce6, 0x7ce7, 0x7ce9, 0x7cea, 0x7ceb, 0x7cec, 0x7ced, - 0x7cee, 0x7cf0, 0x7cf1, 0x7cf2, 0x7cf3, 0x7cf4, 0x7cf5, 0x7cf6, - 0x7cf7, 0x7cf9, 0x7cfa, 0x7cfc, 0x7cfd, 0x7cfe, 0x7cff, 0x7d00, - 0x7d01, 0x7d02, 0x7d03, 0x7d04, 0x7d05, 0x7d06, 0x7d07, 0x7d08, - 0x7d09, 0x7d0b, 0x7d0c, 0x7d0d, 0x7d0e, 0x7d0f, 0x7d10, 0x003f, - 0x7d11, 0x7d12, 0x7d13, 0x7d14, 0x7d15, 0x7d16, 0x7d17, 0x7d18, - 0x7d19, 0x7d1a, 0x7d1b, 0x7d1c, 0x7d1d, 0x7d1e, 0x7d1f, 0x7d21, - 0x7d23, 0x7d24, 0x7d25, 0x7d26, 0x7d28, 0x7d29, 0x7d2a, 0x7d2c, - 0x7d2d, 0x7d2e, 0x7d30, 0x7d31, 0x7d32, 0x7d33, 0x7d34, 0x7d35, - 0x7d36, 0x808c, 0x9965, 0x8ff9, 0x6fc0, 0x8ba5, 0x9e21, 0x59ec, - 0x7ee9, 0x7f09, 0x5409, 0x6781, 0x68d8, 0x8f91, 0x7c4d, 0x96c6, - 0x53ca, 0x6025, 0x75be, 0x6c72, 0x5373, 0x5ac9, 0x7ea7, 0x6324, - 0x51e0, 0x810a, 0x5df1, 0x84df, 0x6280, 0x5180, 0x5b63, 0x4f0e, - 0x796d, 0x5242, 0x60b8, 0x6d4e, 0x5bc4, 0x5bc2, 0x8ba1, 0x8bb0, - 0x65e2, 0x5fcc, 0x9645, 0x5993, 0x7ee7, 0x7eaa, 0x5609, 0x67b7, - 0x5939, 0x4f73, 0x5bb6, 0x52a0, 0x835a, 0x988a, 0x8d3e, 0x7532, - 0x94be, 0x5047, 0x7a3c, 0x4ef7, 0x67b6, 0x9a7e, 0x5ac1, 0x6b7c, - 0x76d1, 0x575a, 0x5c16, 0x7b3a, 0x95f4, 0x714e, 0x517c, 0x80a9, - 0x8270, 0x5978, 0x7f04, 0x8327, 0x68c0, 0x67ec, 0x78b1, 0x7877, - 0x62e3, 0x6361, 0x7b80, 0x4fed, 0x526a, 0x51cf, 0x8350, 0x69db, - 0x9274, 0x8df5, 0x8d31, 0x89c1, 0x952e, 0x7bad, 0x4ef6, 0x003f, - /* lead byte bd */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7d37, 0x7d38, 0x7d39, 0x7d3a, 0x7d3b, 0x7d3c, 0x7d3d, 0x7d3e, - 0x7d3f, 0x7d40, 0x7d41, 0x7d42, 0x7d43, 0x7d44, 0x7d45, 0x7d46, - 0x7d47, 0x7d48, 0x7d49, 0x7d4a, 0x7d4b, 0x7d4c, 0x7d4d, 0x7d4e, - 0x7d4f, 0x7d50, 0x7d51, 0x7d52, 0x7d53, 0x7d54, 0x7d55, 0x7d56, - 0x7d57, 0x7d58, 0x7d59, 0x7d5a, 0x7d5b, 0x7d5c, 0x7d5d, 0x7d5e, - 0x7d5f, 0x7d60, 0x7d61, 0x7d62, 0x7d63, 0x7d64, 0x7d65, 0x7d66, - 0x7d67, 0x7d68, 0x7d69, 0x7d6a, 0x7d6b, 0x7d6c, 0x7d6d, 0x7d6f, - 0x7d70, 0x7d71, 0x7d72, 0x7d73, 0x7d74, 0x7d75, 0x7d76, 0x003f, - 0x7d78, 0x7d79, 0x7d7a, 0x7d7b, 0x7d7c, 0x7d7d, 0x7d7e, 0x7d7f, - 0x7d80, 0x7d81, 0x7d82, 0x7d83, 0x7d84, 0x7d85, 0x7d86, 0x7d87, - 0x7d88, 0x7d89, 0x7d8a, 0x7d8b, 0x7d8c, 0x7d8d, 0x7d8e, 0x7d8f, - 0x7d90, 0x7d91, 0x7d92, 0x7d93, 0x7d94, 0x7d95, 0x7d96, 0x7d97, - 0x7d98, 0x5065, 0x8230, 0x5251, 0x996f, 0x6e10, 0x6e85, 0x6da7, - 0x5efa, 0x50f5, 0x59dc, 0x5c06, 0x6d46, 0x6c5f, 0x7586, 0x848b, - 0x6868, 0x5956, 0x8bb2, 0x5320, 0x9171, 0x964d, 0x8549, 0x6912, - 0x7901, 0x7126, 0x80f6, 0x4ea4, 0x90ca, 0x6d47, 0x9a84, 0x5a07, - 0x56bc, 0x6405, 0x94f0, 0x77eb, 0x4fa5, 0x811a, 0x72e1, 0x89d2, - 0x997a, 0x7f34, 0x7ede, 0x527f, 0x6559, 0x9175, 0x8f7f, 0x8f83, - 0x53eb, 0x7a96, 0x63ed, 0x63a5, 0x7686, 0x79f8, 0x8857, 0x9636, - 0x622a, 0x52ab, 0x8282, 0x6854, 0x6770, 0x6377, 0x776b, 0x7aed, - 0x6d01, 0x7ed3, 0x89e3, 0x59d0, 0x6212, 0x85c9, 0x82a5, 0x754c, - 0x501f, 0x4ecb, 0x75a5, 0x8beb, 0x5c4a, 0x5dfe, 0x7b4b, 0x65a4, - 0x91d1, 0x4eca, 0x6d25, 0x895f, 0x7d27, 0x9526, 0x4ec5, 0x8c28, - 0x8fdb, 0x9773, 0x664b, 0x7981, 0x8fd1, 0x70ec, 0x6d78, 0x003f, - /* lead byte be */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7d99, 0x7d9a, 0x7d9b, 0x7d9c, 0x7d9d, 0x7d9e, 0x7d9f, 0x7da0, - 0x7da1, 0x7da2, 0x7da3, 0x7da4, 0x7da5, 0x7da7, 0x7da8, 0x7da9, - 0x7daa, 0x7dab, 0x7dac, 0x7dad, 0x7daf, 0x7db0, 0x7db1, 0x7db2, - 0x7db3, 0x7db4, 0x7db5, 0x7db6, 0x7db7, 0x7db8, 0x7db9, 0x7dba, - 0x7dbb, 0x7dbc, 0x7dbd, 0x7dbe, 0x7dbf, 0x7dc0, 0x7dc1, 0x7dc2, - 0x7dc3, 0x7dc4, 0x7dc5, 0x7dc6, 0x7dc7, 0x7dc8, 0x7dc9, 0x7dca, - 0x7dcb, 0x7dcc, 0x7dcd, 0x7dce, 0x7dcf, 0x7dd0, 0x7dd1, 0x7dd2, - 0x7dd3, 0x7dd4, 0x7dd5, 0x7dd6, 0x7dd7, 0x7dd8, 0x7dd9, 0x003f, - 0x7dda, 0x7ddb, 0x7ddc, 0x7ddd, 0x7dde, 0x7ddf, 0x7de0, 0x7de1, - 0x7de2, 0x7de3, 0x7de4, 0x7de5, 0x7de6, 0x7de7, 0x7de8, 0x7de9, - 0x7dea, 0x7deb, 0x7dec, 0x7ded, 0x7dee, 0x7def, 0x7df0, 0x7df1, - 0x7df2, 0x7df3, 0x7df4, 0x7df5, 0x7df6, 0x7df7, 0x7df8, 0x7df9, - 0x7dfa, 0x5c3d, 0x52b2, 0x8346, 0x5162, 0x830e, 0x775b, 0x6676, - 0x9cb8, 0x4eac, 0x60ca, 0x7cbe, 0x7cb3, 0x7ecf, 0x4e95, 0x8b66, - 0x666f, 0x9888, 0x9759, 0x5883, 0x656c, 0x955c, 0x5f84, 0x75c9, - 0x9756, 0x7adf, 0x7ade, 0x51c0, 0x70af, 0x7a98, 0x63ea, 0x7a76, - 0x7ea0, 0x7396, 0x97ed, 0x4e45, 0x7078, 0x4e5d, 0x9152, 0x53a9, - 0x6551, 0x65e7, 0x81fc, 0x8205, 0x548e, 0x5c31, 0x759a, 0x97a0, - 0x62d8, 0x72d9, 0x75bd, 0x5c45, 0x9a79, 0x83ca, 0x5c40, 0x5480, - 0x77e9, 0x4e3e, 0x6cae, 0x805a, 0x62d2, 0x636e, 0x5de8, 0x5177, - 0x8ddd, 0x8e1e, 0x952f, 0x4ff1, 0x53e5, 0x60e7, 0x70ac, 0x5267, - 0x6350, 0x9e43, 0x5a1f, 0x5026, 0x7737, 0x5377, 0x7ee2, 0x6485, - 0x652b, 0x6289, 0x6398, 0x5014, 0x7235, 0x89c9, 0x51b3, 0x8bc0, - 0x7edd, 0x5747, 0x83cc, 0x94a7, 0x519b, 0x541b, 0x5cfb, 0x003f, - /* lead byte bf */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7dfb, 0x7dfc, 0x7dfd, 0x7dfe, 0x7dff, 0x7e00, 0x7e01, 0x7e02, - 0x7e03, 0x7e04, 0x7e05, 0x7e06, 0x7e07, 0x7e08, 0x7e09, 0x7e0a, - 0x7e0b, 0x7e0c, 0x7e0d, 0x7e0e, 0x7e0f, 0x7e10, 0x7e11, 0x7e12, - 0x7e13, 0x7e14, 0x7e15, 0x7e16, 0x7e17, 0x7e18, 0x7e19, 0x7e1a, - 0x7e1b, 0x7e1c, 0x7e1d, 0x7e1e, 0x7e1f, 0x7e20, 0x7e21, 0x7e22, - 0x7e23, 0x7e24, 0x7e25, 0x7e26, 0x7e27, 0x7e28, 0x7e29, 0x7e2a, - 0x7e2b, 0x7e2c, 0x7e2d, 0x7e2e, 0x7e2f, 0x7e30, 0x7e31, 0x7e32, - 0x7e33, 0x7e34, 0x7e35, 0x7e36, 0x7e37, 0x7e38, 0x7e39, 0x003f, - 0x7e3a, 0x7e3c, 0x7e3d, 0x7e3e, 0x7e3f, 0x7e40, 0x7e42, 0x7e43, - 0x7e44, 0x7e45, 0x7e46, 0x7e48, 0x7e49, 0x7e4a, 0x7e4b, 0x7e4c, - 0x7e4d, 0x7e4e, 0x7e4f, 0x7e50, 0x7e51, 0x7e52, 0x7e53, 0x7e54, - 0x7e55, 0x7e56, 0x7e57, 0x7e58, 0x7e59, 0x7e5a, 0x7e5b, 0x7e5c, - 0x7e5d, 0x4fca, 0x7ae3, 0x6d5a, 0x90e1, 0x9a8f, 0x5580, 0x5496, - 0x5361, 0x54af, 0x5f00, 0x63e9, 0x6977, 0x51ef, 0x6168, 0x520a, - 0x582a, 0x52d8, 0x574e, 0x780d, 0x770b, 0x5eb7, 0x6177, 0x7ce0, - 0x625b, 0x6297, 0x4ea2, 0x7095, 0x8003, 0x62f7, 0x70e4, 0x9760, - 0x5777, 0x82db, 0x67ef, 0x68f5, 0x78d5, 0x9897, 0x79d1, 0x58f3, - 0x54b3, 0x53ef, 0x6e34, 0x514b, 0x523b, 0x5ba2, 0x8bfe, 0x80af, - 0x5543, 0x57a6, 0x6073, 0x5751, 0x542d, 0x7a7a, 0x6050, 0x5b54, - 0x63a7, 0x62a0, 0x53e3, 0x6263, 0x5bc7, 0x67af, 0x54ed, 0x7a9f, - 0x82e6, 0x9177, 0x5e93, 0x88e4, 0x5938, 0x57ae, 0x630e, 0x8de8, - 0x80ef, 0x5757, 0x7b77, 0x4fa9, 0x5feb, 0x5bbd, 0x6b3e, 0x5321, - 0x7b50, 0x72c2, 0x6846, 0x77ff, 0x7736, 0x65f7, 0x51b5, 0x4e8f, - 0x76d4, 0x5cbf, 0x7aa5, 0x8475, 0x594e, 0x9b41, 0x5080, 0x003f, - /* lead byte c0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7e5e, 0x7e5f, 0x7e60, 0x7e61, 0x7e62, 0x7e63, 0x7e64, 0x7e65, - 0x7e66, 0x7e67, 0x7e68, 0x7e69, 0x7e6a, 0x7e6b, 0x7e6c, 0x7e6d, - 0x7e6e, 0x7e6f, 0x7e70, 0x7e71, 0x7e72, 0x7e73, 0x7e74, 0x7e75, - 0x7e76, 0x7e77, 0x7e78, 0x7e79, 0x7e7a, 0x7e7b, 0x7e7c, 0x7e7d, - 0x7e7e, 0x7e7f, 0x7e80, 0x7e81, 0x7e83, 0x7e84, 0x7e85, 0x7e86, - 0x7e87, 0x7e88, 0x7e89, 0x7e8a, 0x7e8b, 0x7e8c, 0x7e8d, 0x7e8e, - 0x7e8f, 0x7e90, 0x7e91, 0x7e92, 0x7e93, 0x7e94, 0x7e95, 0x7e96, - 0x7e97, 0x7e98, 0x7e99, 0x7e9a, 0x7e9c, 0x7e9d, 0x7e9e, 0x003f, - 0x7eae, 0x7eb4, 0x7ebb, 0x7ebc, 0x7ed6, 0x7ee4, 0x7eec, 0x7ef9, - 0x7f0a, 0x7f10, 0x7f1e, 0x7f37, 0x7f39, 0x7f3b, 0x7f3c, 0x7f3d, - 0x7f3e, 0x7f3f, 0x7f40, 0x7f41, 0x7f43, 0x7f46, 0x7f47, 0x7f48, - 0x7f49, 0x7f4a, 0x7f4b, 0x7f4c, 0x7f4d, 0x7f4e, 0x7f4f, 0x7f52, - 0x7f53, 0x9988, 0x6127, 0x6e83, 0x5764, 0x6606, 0x6346, 0x56f0, - 0x62ec, 0x6269, 0x5ed3, 0x9614, 0x5783, 0x62c9, 0x5587, 0x8721, - 0x814a, 0x8fa3, 0x5566, 0x83b1, 0x6765, 0x8d56, 0x84dd, 0x5a6a, - 0x680f, 0x62e6, 0x7bee, 0x9611, 0x5170, 0x6f9c, 0x8c30, 0x63fd, - 0x89c8, 0x61d2, 0x7f06, 0x70c2, 0x6ee5, 0x7405, 0x6994, 0x72fc, - 0x5eca, 0x90ce, 0x6717, 0x6d6a, 0x635e, 0x52b3, 0x7262, 0x8001, - 0x4f6c, 0x59e5, 0x916a, 0x70d9, 0x6d9d, 0x52d2, 0x4e50, 0x96f7, - 0x956d, 0x857e, 0x78ca, 0x7d2f, 0x5121, 0x5792, 0x64c2, 0x808b, - 0x7c7b, 0x6cea, 0x68f1, 0x695e, 0x51b7, 0x5398, 0x68a8, 0x7281, - 0x9ece, 0x7bf1, 0x72f8, 0x79bb, 0x6f13, 0x7406, 0x674e, 0x91cc, - 0x9ca4, 0x793c, 0x8389, 0x8354, 0x540f, 0x6817, 0x4e3d, 0x5389, - 0x52b1, 0x783e, 0x5386, 0x5229, 0x5088, 0x4f8b, 0x4fd0, 0x003f, - /* lead byte c1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7f56, 0x7f59, 0x7f5b, 0x7f5c, 0x7f5d, 0x7f5e, 0x7f60, 0x7f63, - 0x7f64, 0x7f65, 0x7f66, 0x7f67, 0x7f6b, 0x7f6c, 0x7f6d, 0x7f6f, - 0x7f70, 0x7f73, 0x7f75, 0x7f76, 0x7f77, 0x7f78, 0x7f7a, 0x7f7b, - 0x7f7c, 0x7f7d, 0x7f7f, 0x7f80, 0x7f82, 0x7f83, 0x7f84, 0x7f85, - 0x7f86, 0x7f87, 0x7f88, 0x7f89, 0x7f8b, 0x7f8d, 0x7f8f, 0x7f90, - 0x7f91, 0x7f92, 0x7f93, 0x7f95, 0x7f96, 0x7f97, 0x7f98, 0x7f99, - 0x7f9b, 0x7f9c, 0x7fa0, 0x7fa2, 0x7fa3, 0x7fa5, 0x7fa6, 0x7fa8, - 0x7fa9, 0x7faa, 0x7fab, 0x7fac, 0x7fad, 0x7fae, 0x7fb1, 0x003f, - 0x7fb3, 0x7fb4, 0x7fb5, 0x7fb6, 0x7fb7, 0x7fba, 0x7fbb, 0x7fbe, - 0x7fc0, 0x7fc2, 0x7fc3, 0x7fc4, 0x7fc6, 0x7fc7, 0x7fc8, 0x7fc9, - 0x7fcb, 0x7fcd, 0x7fcf, 0x7fd0, 0x7fd1, 0x7fd2, 0x7fd3, 0x7fd6, - 0x7fd7, 0x7fd9, 0x7fda, 0x7fdb, 0x7fdc, 0x7fdd, 0x7fde, 0x7fe2, - 0x7fe3, 0x75e2, 0x7acb, 0x7c92, 0x6ca5, 0x96b6, 0x529b, 0x7483, - 0x54e9, 0x4fe9, 0x8054, 0x83b2, 0x8fde, 0x9570, 0x5ec9, 0x601c, - 0x6d9f, 0x5e18, 0x655b, 0x8138, 0x94fe, 0x604b, 0x70bc, 0x7ec3, - 0x7cae, 0x51c9, 0x6881, 0x7cb1, 0x826f, 0x4e24, 0x8f86, 0x91cf, - 0x667e, 0x4eae, 0x8c05, 0x64a9, 0x804a, 0x50da, 0x7597, 0x71ce, - 0x5be5, 0x8fbd, 0x6f66, 0x4e86, 0x6482, 0x9563, 0x5ed6, 0x6599, - 0x5217, 0x88c2, 0x70c8, 0x52a3, 0x730e, 0x7433, 0x6797, 0x78f7, - 0x9716, 0x4e34, 0x90bb, 0x9cde, 0x6dcb, 0x51db, 0x8d41, 0x541d, - 0x62ce, 0x73b2, 0x83f1, 0x96f6, 0x9f84, 0x94c3, 0x4f36, 0x7f9a, - 0x51cc, 0x7075, 0x9675, 0x5cad, 0x9886, 0x53e6, 0x4ee4, 0x6e9c, - 0x7409, 0x69b4, 0x786b, 0x998f, 0x7559, 0x5218, 0x7624, 0x6d41, - 0x67f3, 0x516d, 0x9f99, 0x804b, 0x5499, 0x7b3c, 0x7abf, 0x003f, - /* lead byte c2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7fe4, 0x7fe7, 0x7fe8, 0x7fea, 0x7feb, 0x7fec, 0x7fed, 0x7fef, - 0x7ff2, 0x7ff4, 0x7ff5, 0x7ff6, 0x7ff7, 0x7ff8, 0x7ff9, 0x7ffa, - 0x7ffd, 0x7ffe, 0x7fff, 0x8002, 0x8007, 0x8008, 0x8009, 0x800a, - 0x800e, 0x800f, 0x8011, 0x8013, 0x801a, 0x801b, 0x801d, 0x801e, - 0x801f, 0x8021, 0x8023, 0x8024, 0x802b, 0x802c, 0x802d, 0x802e, - 0x802f, 0x8030, 0x8032, 0x8034, 0x8039, 0x803a, 0x803c, 0x803e, - 0x8040, 0x8041, 0x8044, 0x8045, 0x8047, 0x8048, 0x8049, 0x804e, - 0x804f, 0x8050, 0x8051, 0x8053, 0x8055, 0x8056, 0x8057, 0x003f, - 0x8059, 0x805b, 0x805c, 0x805d, 0x805e, 0x805f, 0x8060, 0x8061, - 0x8062, 0x8063, 0x8064, 0x8065, 0x8066, 0x8067, 0x8068, 0x806b, - 0x806c, 0x806d, 0x806e, 0x806f, 0x8070, 0x8072, 0x8073, 0x8074, - 0x8075, 0x8076, 0x8077, 0x8078, 0x8079, 0x807a, 0x807b, 0x807c, - 0x807d, 0x9686, 0x5784, 0x62e2, 0x9647, 0x697c, 0x5a04, 0x6402, - 0x7bd3, 0x6f0f, 0x964b, 0x82a6, 0x5362, 0x9885, 0x5e90, 0x7089, - 0x63b3, 0x5364, 0x864f, 0x9c81, 0x9e93, 0x788c, 0x9732, 0x8def, - 0x8d42, 0x9e7f, 0x6f5e, 0x7984, 0x5f55, 0x9646, 0x622e, 0x9a74, - 0x5415, 0x94dd, 0x4fa3, 0x65c5, 0x5c65, 0x5c61, 0x7f15, 0x8651, - 0x6c2f, 0x5f8b, 0x7387, 0x6ee4, 0x7eff, 0x5ce6, 0x631b, 0x5b6a, - 0x6ee6, 0x5375, 0x4e71, 0x63a0, 0x7565, 0x62a1, 0x8f6e, 0x4f26, - 0x4ed1, 0x6ca6, 0x7eb6, 0x8bba, 0x841d, 0x87ba, 0x7f57, 0x903b, - 0x9523, 0x7ba9, 0x9aa1, 0x88f8, 0x843d, 0x6d1b, 0x9a86, 0x7edc, - 0x5988, 0x9ebb, 0x739b, 0x7801, 0x8682, 0x9a6c, 0x9a82, 0x561b, - 0x5417, 0x57cb, 0x4e70, 0x9ea6, 0x5356, 0x8fc8, 0x8109, 0x7792, - 0x9992, 0x86ee, 0x6ee1, 0x8513, 0x66fc, 0x6162, 0x6f2b, 0x003f, - /* lead byte c3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x807e, 0x8081, 0x8082, 0x8085, 0x8088, 0x808a, 0x808d, 0x808e, - 0x808f, 0x8090, 0x8091, 0x8092, 0x8094, 0x8095, 0x8097, 0x8099, - 0x809e, 0x80a3, 0x80a6, 0x80a7, 0x80a8, 0x80ac, 0x80b0, 0x80b3, - 0x80b5, 0x80b6, 0x80b8, 0x80b9, 0x80bb, 0x80c5, 0x80c7, 0x80c8, - 0x80c9, 0x80ca, 0x80cb, 0x80cf, 0x80d0, 0x80d1, 0x80d2, 0x80d3, - 0x80d4, 0x80d5, 0x80d8, 0x80df, 0x80e0, 0x80e2, 0x80e3, 0x80e6, - 0x80ee, 0x80f5, 0x80f7, 0x80f9, 0x80fb, 0x80fe, 0x80ff, 0x8100, - 0x8101, 0x8103, 0x8104, 0x8105, 0x8107, 0x8108, 0x810b, 0x003f, - 0x810c, 0x8115, 0x8117, 0x8119, 0x811b, 0x811c, 0x811d, 0x811f, - 0x8120, 0x8121, 0x8122, 0x8123, 0x8124, 0x8125, 0x8126, 0x8127, - 0x8128, 0x8129, 0x812a, 0x812b, 0x812d, 0x812e, 0x8130, 0x8133, - 0x8134, 0x8135, 0x8137, 0x8139, 0x813a, 0x813b, 0x813c, 0x813d, - 0x813f, 0x8c29, 0x8292, 0x832b, 0x76f2, 0x6c13, 0x5fd9, 0x83bd, - 0x732b, 0x8305, 0x951a, 0x6bdb, 0x77db, 0x94c6, 0x536f, 0x8302, - 0x5192, 0x5e3d, 0x8c8c, 0x8d38, 0x4e48, 0x73ab, 0x679a, 0x6885, - 0x9176, 0x9709, 0x7164, 0x6ca1, 0x7709, 0x5a92, 0x9541, 0x6bcf, - 0x7f8e, 0x6627, 0x5bd0, 0x59b9, 0x5a9a, 0x95e8, 0x95f7, 0x4eec, - 0x840c, 0x8499, 0x6aac, 0x76df, 0x9530, 0x731b, 0x68a6, 0x5b5f, - 0x772f, 0x919a, 0x9761, 0x7cdc, 0x8ff7, 0x8c1c, 0x5f25, 0x7c73, - 0x79d8, 0x89c5, 0x6ccc, 0x871c, 0x5bc6, 0x5e42, 0x68c9, 0x7720, - 0x7ef5, 0x5195, 0x514d, 0x52c9, 0x5a29, 0x7f05, 0x9762, 0x82d7, - 0x63cf, 0x7784, 0x85d0, 0x79d2, 0x6e3a, 0x5e99, 0x5999, 0x8511, - 0x706d, 0x6c11, 0x62bf, 0x76bf, 0x654f, 0x60af, 0x95fd, 0x660e, - 0x879f, 0x9e23, 0x94ed, 0x540d, 0x547d, 0x8c2c, 0x6478, 0x003f, - /* lead byte c4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8140, 0x8141, 0x8142, 0x8143, 0x8144, 0x8145, 0x8147, 0x8149, - 0x814d, 0x814e, 0x814f, 0x8152, 0x8156, 0x8157, 0x8158, 0x815b, - 0x815c, 0x815d, 0x815e, 0x815f, 0x8161, 0x8162, 0x8163, 0x8164, - 0x8166, 0x8168, 0x816a, 0x816b, 0x816c, 0x816f, 0x8172, 0x8173, - 0x8175, 0x8176, 0x8177, 0x8178, 0x8181, 0x8183, 0x8184, 0x8185, - 0x8186, 0x8187, 0x8189, 0x818b, 0x818c, 0x818d, 0x818e, 0x8190, - 0x8192, 0x8193, 0x8194, 0x8195, 0x8196, 0x8197, 0x8199, 0x819a, - 0x819e, 0x819f, 0x81a0, 0x81a1, 0x81a2, 0x81a4, 0x81a5, 0x003f, - 0x81a7, 0x81a9, 0x81ab, 0x81ac, 0x81ad, 0x81ae, 0x81af, 0x81b0, - 0x81b1, 0x81b2, 0x81b4, 0x81b5, 0x81b6, 0x81b7, 0x81b8, 0x81b9, - 0x81bc, 0x81bd, 0x81be, 0x81bf, 0x81c4, 0x81c5, 0x81c7, 0x81c8, - 0x81c9, 0x81cb, 0x81cd, 0x81ce, 0x81cf, 0x81d0, 0x81d1, 0x81d2, - 0x81d3, 0x6479, 0x8611, 0x6a21, 0x819c, 0x78e8, 0x6469, 0x9b54, - 0x62b9, 0x672b, 0x83ab, 0x58a8, 0x9ed8, 0x6cab, 0x6f20, 0x5bde, - 0x964c, 0x8c0b, 0x725f, 0x67d0, 0x62c7, 0x7261, 0x4ea9, 0x59c6, - 0x6bcd, 0x5893, 0x66ae, 0x5e55, 0x52df, 0x6155, 0x6728, 0x76ee, - 0x7766, 0x7267, 0x7a46, 0x62ff, 0x54ea, 0x5450, 0x94a0, 0x90a3, - 0x5a1c, 0x7eb3, 0x6c16, 0x4e43, 0x5976, 0x8010, 0x5948, 0x5357, - 0x7537, 0x96be, 0x56ca, 0x6320, 0x8111, 0x607c, 0x95f9, 0x6dd6, - 0x5462, 0x9981, 0x5185, 0x5ae9, 0x80fd, 0x59ae, 0x9713, 0x502a, - 0x6ce5, 0x5c3c, 0x62df, 0x4f60, 0x533f, 0x817b, 0x9006, 0x6eba, - 0x852b, 0x62c8, 0x5e74, 0x78be, 0x64b5, 0x637b, 0x5ff5, 0x5a18, - 0x917f, 0x9e1f, 0x5c3f, 0x634f, 0x8042, 0x5b7d, 0x556e, 0x954a, - 0x954d, 0x6d85, 0x60a8, 0x67e0, 0x72de, 0x51dd, 0x5b81, 0x003f, - /* lead byte c5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x81d4, 0x81d5, 0x81d6, 0x81d7, 0x81d8, 0x81d9, 0x81da, 0x81db, - 0x81dc, 0x81dd, 0x81de, 0x81df, 0x81e0, 0x81e1, 0x81e2, 0x81e4, - 0x81e5, 0x81e6, 0x81e8, 0x81e9, 0x81eb, 0x81ee, 0x81ef, 0x81f0, - 0x81f1, 0x81f2, 0x81f5, 0x81f6, 0x81f7, 0x81f8, 0x81f9, 0x81fa, - 0x81fd, 0x81ff, 0x8203, 0x8207, 0x8208, 0x8209, 0x820a, 0x820b, - 0x820e, 0x820f, 0x8211, 0x8213, 0x8215, 0x8216, 0x8217, 0x8218, - 0x8219, 0x821a, 0x821d, 0x8220, 0x8224, 0x8225, 0x8226, 0x8227, - 0x8229, 0x822e, 0x8232, 0x823a, 0x823c, 0x823d, 0x823f, 0x003f, - 0x8240, 0x8241, 0x8242, 0x8243, 0x8245, 0x8246, 0x8248, 0x824a, - 0x824c, 0x824d, 0x824e, 0x8250, 0x8251, 0x8252, 0x8253, 0x8254, - 0x8255, 0x8256, 0x8257, 0x8259, 0x825b, 0x825c, 0x825d, 0x825e, - 0x8260, 0x8261, 0x8262, 0x8263, 0x8264, 0x8265, 0x8266, 0x8267, - 0x8269, 0x62e7, 0x6cde, 0x725b, 0x626d, 0x94ae, 0x7ebd, 0x8113, - 0x6d53, 0x519c, 0x5f04, 0x5974, 0x52aa, 0x6012, 0x5973, 0x6696, - 0x8650, 0x759f, 0x632a, 0x61e6, 0x7cef, 0x8bfa, 0x54e6, 0x6b27, - 0x9e25, 0x6bb4, 0x85d5, 0x5455, 0x5076, 0x6ca4, 0x556a, 0x8db4, - 0x722c, 0x5e15, 0x6015, 0x7436, 0x62cd, 0x6392, 0x724c, 0x5f98, - 0x6e43, 0x6d3e, 0x6500, 0x6f58, 0x76d8, 0x78d0, 0x76fc, 0x7554, - 0x5224, 0x53db, 0x4e53, 0x5e9e, 0x65c1, 0x802a, 0x80d6, 0x629b, - 0x5486, 0x5228, 0x70ae, 0x888d, 0x8dd1, 0x6ce1, 0x5478, 0x80da, - 0x57f9, 0x88f4, 0x8d54, 0x966a, 0x914d, 0x4f69, 0x6c9b, 0x55b7, - 0x76c6, 0x7830, 0x62a8, 0x70f9, 0x6f8e, 0x5f6d, 0x84ec, 0x68da, - 0x787c, 0x7bf7, 0x81a8, 0x670b, 0x9e4f, 0x6367, 0x78b0, 0x576f, - 0x7812, 0x9739, 0x6279, 0x62ab, 0x5288, 0x7435, 0x6bd7, 0x003f, - /* lead byte c6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x826a, 0x826b, 0x826c, 0x826d, 0x8271, 0x8275, 0x8276, 0x8277, - 0x8278, 0x827b, 0x827c, 0x8280, 0x8281, 0x8283, 0x8285, 0x8286, - 0x8287, 0x8289, 0x828c, 0x8290, 0x8293, 0x8294, 0x8295, 0x8296, - 0x829a, 0x829b, 0x829e, 0x82a0, 0x82a2, 0x82a3, 0x82a7, 0x82b2, - 0x82b5, 0x82b6, 0x82ba, 0x82bb, 0x82bc, 0x82bf, 0x82c0, 0x82c2, - 0x82c3, 0x82c5, 0x82c6, 0x82c9, 0x82d0, 0x82d6, 0x82d9, 0x82da, - 0x82dd, 0x82e2, 0x82e7, 0x82e8, 0x82e9, 0x82ea, 0x82ec, 0x82ed, - 0x82ee, 0x82f0, 0x82f2, 0x82f3, 0x82f5, 0x82f6, 0x82f8, 0x003f, - 0x82fa, 0x82fc, 0x82fd, 0x82fe, 0x82ff, 0x8300, 0x830a, 0x830b, - 0x830d, 0x8310, 0x8312, 0x8313, 0x8316, 0x8318, 0x8319, 0x831d, - 0x831e, 0x831f, 0x8320, 0x8321, 0x8322, 0x8323, 0x8324, 0x8325, - 0x8326, 0x8329, 0x832a, 0x832e, 0x8330, 0x8332, 0x8337, 0x833b, - 0x833d, 0x5564, 0x813e, 0x75b2, 0x76ae, 0x5339, 0x75de, 0x50fb, - 0x5c41, 0x8b6c, 0x7bc7, 0x504f, 0x7247, 0x9a97, 0x98d8, 0x6f02, - 0x74e2, 0x7968, 0x6487, 0x77a5, 0x62fc, 0x9891, 0x8d2b, 0x54c1, - 0x8058, 0x4e52, 0x576a, 0x82f9, 0x840d, 0x5e73, 0x51ed, 0x74f6, - 0x8bc4, 0x5c4f, 0x5761, 0x6cfc, 0x9887, 0x5a46, 0x7834, 0x9b44, - 0x8feb, 0x7c95, 0x5256, 0x6251, 0x94fa, 0x4ec6, 0x8386, 0x8461, - 0x83e9, 0x84b2, 0x57d4, 0x6734, 0x5703, 0x666e, 0x6d66, 0x8c31, - 0x66dd, 0x7011, 0x671f, 0x6b3a, 0x6816, 0x621a, 0x59bb, 0x4e03, - 0x51c4, 0x6f06, 0x67d2, 0x6c8f, 0x5176, 0x68cb, 0x5947, 0x6b67, - 0x7566, 0x5d0e, 0x8110, 0x9f50, 0x65d7, 0x7948, 0x7941, 0x9a91, - 0x8d77, 0x5c82, 0x4e5e, 0x4f01, 0x542f, 0x5951, 0x780c, 0x5668, - 0x6c14, 0x8fc4, 0x5f03, 0x6c7d, 0x6ce3, 0x8bab, 0x6390, 0x003f, - /* lead byte c7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x833e, 0x833f, 0x8341, 0x8342, 0x8344, 0x8345, 0x8348, 0x834a, - 0x834b, 0x834c, 0x834d, 0x834e, 0x8353, 0x8355, 0x8356, 0x8357, - 0x8358, 0x8359, 0x835d, 0x8362, 0x8370, 0x8371, 0x8372, 0x8373, - 0x8374, 0x8375, 0x8376, 0x8379, 0x837a, 0x837e, 0x837f, 0x8380, - 0x8381, 0x8382, 0x8383, 0x8384, 0x8387, 0x8388, 0x838a, 0x838b, - 0x838c, 0x838d, 0x838f, 0x8390, 0x8391, 0x8394, 0x8395, 0x8396, - 0x8397, 0x8399, 0x839a, 0x839d, 0x839f, 0x83a1, 0x83a2, 0x83a3, - 0x83a4, 0x83a5, 0x83a6, 0x83a7, 0x83ac, 0x83ad, 0x83ae, 0x003f, - 0x83af, 0x83b5, 0x83bb, 0x83be, 0x83bf, 0x83c2, 0x83c3, 0x83c4, - 0x83c6, 0x83c8, 0x83c9, 0x83cb, 0x83cd, 0x83ce, 0x83d0, 0x83d1, - 0x83d2, 0x83d3, 0x83d5, 0x83d7, 0x83d9, 0x83da, 0x83db, 0x83de, - 0x83e2, 0x83e3, 0x83e4, 0x83e6, 0x83e7, 0x83e8, 0x83eb, 0x83ec, - 0x83ed, 0x6070, 0x6d3d, 0x7275, 0x6266, 0x948e, 0x94c5, 0x5343, - 0x8fc1, 0x7b7e, 0x4edf, 0x8c26, 0x4e7e, 0x9ed4, 0x94b1, 0x94b3, - 0x524d, 0x6f5c, 0x9063, 0x6d45, 0x8c34, 0x5811, 0x5d4c, 0x6b20, - 0x6b49, 0x67aa, 0x545b, 0x8154, 0x7f8c, 0x5899, 0x8537, 0x5f3a, - 0x62a2, 0x6a47, 0x9539, 0x6572, 0x6084, 0x6865, 0x77a7, 0x4e54, - 0x4fa8, 0x5de7, 0x9798, 0x64ac, 0x7fd8, 0x5ced, 0x4fcf, 0x7a8d, - 0x5207, 0x8304, 0x4e14, 0x602f, 0x7a83, 0x94a6, 0x4fb5, 0x4eb2, - 0x79e6, 0x7434, 0x52e4, 0x82b9, 0x64d2, 0x79bd, 0x5bdd, 0x6c81, - 0x9752, 0x8f7b, 0x6c22, 0x503e, 0x537f, 0x6e05, 0x64ce, 0x6674, - 0x6c30, 0x60c5, 0x9877, 0x8bf7, 0x5e86, 0x743c, 0x7a77, 0x79cb, - 0x4e18, 0x90b1, 0x7403, 0x6c42, 0x56da, 0x914b, 0x6cc5, 0x8d8b, - 0x533a, 0x86c6, 0x66f2, 0x8eaf, 0x5c48, 0x9a71, 0x6e20, 0x003f, - /* lead byte c8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x83ee, 0x83ef, 0x83f3, 0x83f4, 0x83f5, 0x83f6, 0x83f7, 0x83fa, - 0x83fb, 0x83fc, 0x83fe, 0x83ff, 0x8400, 0x8402, 0x8405, 0x8407, - 0x8408, 0x8409, 0x840a, 0x8410, 0x8412, 0x8413, 0x8414, 0x8415, - 0x8416, 0x8417, 0x8419, 0x841a, 0x841b, 0x841e, 0x841f, 0x8420, - 0x8421, 0x8422, 0x8423, 0x8429, 0x842a, 0x842b, 0x842c, 0x842d, - 0x842e, 0x842f, 0x8430, 0x8432, 0x8433, 0x8434, 0x8435, 0x8436, - 0x8437, 0x8439, 0x843a, 0x843b, 0x843e, 0x843f, 0x8440, 0x8441, - 0x8442, 0x8443, 0x8444, 0x8445, 0x8447, 0x8448, 0x8449, 0x003f, - 0x844a, 0x844b, 0x844c, 0x844d, 0x844e, 0x844f, 0x8450, 0x8452, - 0x8453, 0x8454, 0x8455, 0x8456, 0x8458, 0x845d, 0x845e, 0x845f, - 0x8460, 0x8462, 0x8464, 0x8465, 0x8466, 0x8467, 0x8468, 0x846a, - 0x846e, 0x846f, 0x8470, 0x8472, 0x8474, 0x8477, 0x8479, 0x847b, - 0x847c, 0x53d6, 0x5a36, 0x9f8b, 0x8da3, 0x53bb, 0x5708, 0x98a7, - 0x6743, 0x919b, 0x6cc9, 0x5168, 0x75ca, 0x62f3, 0x72ac, 0x5238, - 0x529d, 0x7f3a, 0x7094, 0x7638, 0x5374, 0x9e4a, 0x69b7, 0x786e, - 0x96c0, 0x88d9, 0x7fa4, 0x7136, 0x71c3, 0x5189, 0x67d3, 0x74e4, - 0x58e4, 0x6518, 0x56b7, 0x8ba9, 0x9976, 0x6270, 0x7ed5, 0x60f9, - 0x70ed, 0x58ec, 0x4ec1, 0x4eba, 0x5fcd, 0x97e7, 0x4efb, 0x8ba4, - 0x5203, 0x598a, 0x7eab, 0x6254, 0x4ecd, 0x65e5, 0x620e, 0x8338, - 0x84c9, 0x8363, 0x878d, 0x7194, 0x6eb6, 0x5bb9, 0x7ed2, 0x5197, - 0x63c9, 0x67d4, 0x8089, 0x8339, 0x8815, 0x5112, 0x5b7a, 0x5982, - 0x8fb1, 0x4e73, 0x6c5d, 0x5165, 0x8925, 0x8f6f, 0x962e, 0x854a, - 0x745e, 0x9510, 0x95f0, 0x6da6, 0x82e5, 0x5f31, 0x6492, 0x6d12, - 0x8428, 0x816e, 0x9cc3, 0x585e, 0x8d5b, 0x4e09, 0x53c1, 0x003f, - /* lead byte c9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x847d, 0x847e, 0x847f, 0x8480, 0x8481, 0x8483, 0x8484, 0x8485, - 0x8486, 0x848a, 0x848d, 0x848f, 0x8490, 0x8491, 0x8492, 0x8493, - 0x8494, 0x8495, 0x8496, 0x8498, 0x849a, 0x849b, 0x849d, 0x849e, - 0x849f, 0x84a0, 0x84a2, 0x84a3, 0x84a4, 0x84a5, 0x84a6, 0x84a7, - 0x84a8, 0x84a9, 0x84aa, 0x84ab, 0x84ac, 0x84ad, 0x84ae, 0x84b0, - 0x84b1, 0x84b3, 0x84b5, 0x84b6, 0x84b7, 0x84bb, 0x84bc, 0x84be, - 0x84c0, 0x84c2, 0x84c3, 0x84c5, 0x84c6, 0x84c7, 0x84c8, 0x84cb, - 0x84cc, 0x84ce, 0x84cf, 0x84d2, 0x84d4, 0x84d5, 0x84d7, 0x003f, - 0x84d8, 0x84d9, 0x84da, 0x84db, 0x84dc, 0x84de, 0x84e1, 0x84e2, - 0x84e4, 0x84e7, 0x84e8, 0x84e9, 0x84ea, 0x84eb, 0x84ed, 0x84ee, - 0x84ef, 0x84f1, 0x84f2, 0x84f3, 0x84f4, 0x84f5, 0x84f6, 0x84f7, - 0x84f8, 0x84f9, 0x84fa, 0x84fb, 0x84fd, 0x84fe, 0x8500, 0x8501, - 0x8502, 0x4f1e, 0x6563, 0x6851, 0x55d3, 0x4e27, 0x6414, 0x9a9a, - 0x626b, 0x5ac2, 0x745f, 0x8272, 0x6da9, 0x68ee, 0x50e7, 0x838e, - 0x7802, 0x6740, 0x5239, 0x6c99, 0x7eb1, 0x50bb, 0x5565, 0x715e, - 0x7b5b, 0x6652, 0x73ca, 0x82eb, 0x6749, 0x5c71, 0x5220, 0x717d, - 0x886b, 0x95ea, 0x9655, 0x64c5, 0x8d61, 0x81b3, 0x5584, 0x6c55, - 0x6247, 0x7f2e, 0x5892, 0x4f24, 0x5546, 0x8d4f, 0x664c, 0x4e0a, - 0x5c1a, 0x88f3, 0x68a2, 0x634e, 0x7a0d, 0x70e7, 0x828d, 0x52fa, - 0x97f6, 0x5c11, 0x54e8, 0x90b5, 0x7ecd, 0x5962, 0x8d4a, 0x86c7, - 0x820c, 0x820d, 0x8d66, 0x6444, 0x5c04, 0x6151, 0x6d89, 0x793e, - 0x8bbe, 0x7837, 0x7533, 0x547b, 0x4f38, 0x8eab, 0x6df1, 0x5a20, - 0x7ec5, 0x795e, 0x6c88, 0x5ba1, 0x5a76, 0x751a, 0x80be, 0x614e, - 0x6e17, 0x58f0, 0x751f, 0x7525, 0x7272, 0x5347, 0x7ef3, 0x003f, - /* lead byte ca */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8503, 0x8504, 0x8505, 0x8506, 0x8507, 0x8508, 0x8509, 0x850a, - 0x850b, 0x850d, 0x850e, 0x850f, 0x8510, 0x8512, 0x8514, 0x8515, - 0x8516, 0x8518, 0x8519, 0x851b, 0x851c, 0x851d, 0x851e, 0x8520, - 0x8522, 0x8523, 0x8524, 0x8525, 0x8526, 0x8527, 0x8528, 0x8529, - 0x852a, 0x852d, 0x852e, 0x852f, 0x8530, 0x8531, 0x8532, 0x8533, - 0x8534, 0x8535, 0x8536, 0x853e, 0x853f, 0x8540, 0x8541, 0x8542, - 0x8544, 0x8545, 0x8546, 0x8547, 0x854b, 0x854c, 0x854d, 0x854e, - 0x854f, 0x8550, 0x8551, 0x8552, 0x8553, 0x8554, 0x8555, 0x003f, - 0x8557, 0x8558, 0x855a, 0x855b, 0x855c, 0x855d, 0x855f, 0x8560, - 0x8561, 0x8562, 0x8563, 0x8565, 0x8566, 0x8567, 0x8569, 0x856a, - 0x856b, 0x856c, 0x856d, 0x856e, 0x856f, 0x8570, 0x8571, 0x8573, - 0x8575, 0x8576, 0x8577, 0x8578, 0x857c, 0x857d, 0x857f, 0x8580, - 0x8581, 0x7701, 0x76db, 0x5269, 0x80dc, 0x5723, 0x5e08, 0x5931, - 0x72ee, 0x65bd, 0x6e7f, 0x8bd7, 0x5c38, 0x8671, 0x5341, 0x77f3, - 0x62fe, 0x65f6, 0x4ec0, 0x98df, 0x8680, 0x5b9e, 0x8bc6, 0x53f2, - 0x77e2, 0x4f7f, 0x5c4e, 0x9a76, 0x59cb, 0x5f0f, 0x793a, 0x58eb, - 0x4e16, 0x67ff, 0x4e8b, 0x62ed, 0x8a93, 0x901d, 0x52bf, 0x662f, - 0x55dc, 0x566c, 0x9002, 0x4ed5, 0x4f8d, 0x91ca, 0x9970, 0x6c0f, - 0x5e02, 0x6043, 0x5ba4, 0x89c6, 0x8bd5, 0x6536, 0x624b, 0x9996, - 0x5b88, 0x5bff, 0x6388, 0x552e, 0x53d7, 0x7626, 0x517d, 0x852c, - 0x67a2, 0x68b3, 0x6b8a, 0x6292, 0x8f93, 0x53d4, 0x8212, 0x6dd1, - 0x758f, 0x4e66, 0x8d4e, 0x5b70, 0x719f, 0x85af, 0x6691, 0x66d9, - 0x7f72, 0x8700, 0x9ecd, 0x9f20, 0x5c5e, 0x672f, 0x8ff0, 0x6811, - 0x675f, 0x620d, 0x7ad6, 0x5885, 0x5eb6, 0x6570, 0x6f31, 0x003f, - /* lead byte cb */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8582, 0x8583, 0x8586, 0x8588, 0x8589, 0x858a, 0x858b, 0x858c, - 0x858d, 0x858e, 0x8590, 0x8591, 0x8592, 0x8593, 0x8594, 0x8595, - 0x8596, 0x8597, 0x8598, 0x8599, 0x859a, 0x859d, 0x859e, 0x859f, - 0x85a0, 0x85a1, 0x85a2, 0x85a3, 0x85a5, 0x85a6, 0x85a7, 0x85a9, - 0x85ab, 0x85ac, 0x85ad, 0x85b1, 0x85b2, 0x85b3, 0x85b4, 0x85b5, - 0x85b6, 0x85b8, 0x85ba, 0x85bb, 0x85bc, 0x85bd, 0x85be, 0x85bf, - 0x85c0, 0x85c2, 0x85c3, 0x85c4, 0x85c5, 0x85c6, 0x85c7, 0x85c8, - 0x85ca, 0x85cb, 0x85cc, 0x85cd, 0x85ce, 0x85d1, 0x85d2, 0x003f, - 0x85d4, 0x85d6, 0x85d7, 0x85d8, 0x85d9, 0x85da, 0x85db, 0x85dd, - 0x85de, 0x85df, 0x85e0, 0x85e1, 0x85e2, 0x85e3, 0x85e5, 0x85e6, - 0x85e7, 0x85e8, 0x85ea, 0x85eb, 0x85ec, 0x85ed, 0x85ee, 0x85ef, - 0x85f0, 0x85f1, 0x85f2, 0x85f3, 0x85f4, 0x85f5, 0x85f6, 0x85f7, - 0x85f8, 0x6055, 0x5237, 0x800d, 0x6454, 0x8870, 0x7529, 0x5e05, - 0x6813, 0x62f4, 0x971c, 0x53cc, 0x723d, 0x8c01, 0x6c34, 0x7761, - 0x7a0e, 0x542e, 0x77ac, 0x987a, 0x821c, 0x8bf4, 0x7855, 0x6714, - 0x70c1, 0x65af, 0x6495, 0x5636, 0x601d, 0x79c1, 0x53f8, 0x4e1d, - 0x6b7b, 0x8086, 0x5bfa, 0x55e3, 0x56db, 0x4f3a, 0x4f3c, 0x9972, - 0x5df3, 0x677e, 0x8038, 0x6002, 0x9882, 0x9001, 0x5b8b, 0x8bbc, - 0x8bf5, 0x641c, 0x8258, 0x64de, 0x55fd, 0x82cf, 0x9165, 0x4fd7, - 0x7d20, 0x901f, 0x7c9f, 0x50f3, 0x5851, 0x6eaf, 0x5bbf, 0x8bc9, - 0x8083, 0x9178, 0x849c, 0x7b97, 0x867d, 0x968b, 0x968f, 0x7ee5, - 0x9ad3, 0x788e, 0x5c81, 0x7a57, 0x9042, 0x96a7, 0x795f, 0x5b59, - 0x635f, 0x7b0b, 0x84d1, 0x68ad, 0x5506, 0x7f29, 0x7410, 0x7d22, - 0x9501, 0x6240, 0x584c, 0x4ed6, 0x5b83, 0x5979, 0x5854, 0x003f, - /* lead byte cc */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x85f9, 0x85fa, 0x85fc, 0x85fd, 0x85fe, 0x8600, 0x8601, 0x8602, - 0x8603, 0x8604, 0x8606, 0x8607, 0x8608, 0x8609, 0x860a, 0x860b, - 0x860c, 0x860d, 0x860e, 0x860f, 0x8610, 0x8612, 0x8613, 0x8614, - 0x8615, 0x8617, 0x8618, 0x8619, 0x861a, 0x861b, 0x861c, 0x861d, - 0x861e, 0x861f, 0x8620, 0x8621, 0x8622, 0x8623, 0x8624, 0x8625, - 0x8626, 0x8628, 0x862a, 0x862b, 0x862c, 0x862d, 0x862e, 0x862f, - 0x8630, 0x8631, 0x8632, 0x8633, 0x8634, 0x8635, 0x8636, 0x8637, - 0x8639, 0x863a, 0x863b, 0x863d, 0x863e, 0x863f, 0x8640, 0x003f, - 0x8641, 0x8642, 0x8643, 0x8644, 0x8645, 0x8646, 0x8647, 0x8648, - 0x8649, 0x864a, 0x864b, 0x864c, 0x8652, 0x8653, 0x8655, 0x8656, - 0x8657, 0x8658, 0x8659, 0x865b, 0x865c, 0x865d, 0x865f, 0x8660, - 0x8661, 0x8663, 0x8664, 0x8665, 0x8666, 0x8667, 0x8668, 0x8669, - 0x866a, 0x736d, 0x631e, 0x8e4b, 0x8e0f, 0x80ce, 0x82d4, 0x62ac, - 0x53f0, 0x6cf0, 0x915e, 0x592a, 0x6001, 0x6c70, 0x574d, 0x644a, - 0x8d2a, 0x762b, 0x6ee9, 0x575b, 0x6a80, 0x75f0, 0x6f6d, 0x8c2d, - 0x8c08, 0x5766, 0x6bef, 0x8892, 0x78b3, 0x63a2, 0x53f9, 0x70ad, - 0x6c64, 0x5858, 0x642a, 0x5802, 0x68e0, 0x819b, 0x5510, 0x7cd6, - 0x5018, 0x8eba, 0x6dcc, 0x8d9f, 0x70eb, 0x638f, 0x6d9b, 0x6ed4, - 0x7ee6, 0x8404, 0x6843, 0x9003, 0x6dd8, 0x9676, 0x8ba8, 0x5957, - 0x7279, 0x85e4, 0x817e, 0x75bc, 0x8a8a, 0x68af, 0x5254, 0x8e22, - 0x9511, 0x63d0, 0x9898, 0x8e44, 0x557c, 0x4f53, 0x66ff, 0x568f, - 0x60d5, 0x6d95, 0x5243, 0x5c49, 0x5929, 0x6dfb, 0x586b, 0x7530, - 0x751c, 0x606c, 0x8214, 0x8146, 0x6311, 0x6761, 0x8fe2, 0x773a, - 0x8df3, 0x8d34, 0x94c1, 0x5e16, 0x5385, 0x542c, 0x70c3, 0x003f, - /* lead byte cd */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x866d, 0x866f, 0x8670, 0x8672, 0x8673, 0x8674, 0x8675, 0x8676, - 0x8677, 0x8678, 0x8683, 0x8684, 0x8685, 0x8686, 0x8687, 0x8688, - 0x8689, 0x868e, 0x868f, 0x8690, 0x8691, 0x8692, 0x8694, 0x8696, - 0x8697, 0x8698, 0x8699, 0x869a, 0x869b, 0x869e, 0x869f, 0x86a0, - 0x86a1, 0x86a2, 0x86a5, 0x86a6, 0x86ab, 0x86ad, 0x86ae, 0x86b2, - 0x86b3, 0x86b7, 0x86b8, 0x86b9, 0x86bb, 0x86bc, 0x86bd, 0x86be, - 0x86bf, 0x86c1, 0x86c2, 0x86c3, 0x86c5, 0x86c8, 0x86cc, 0x86cd, - 0x86d2, 0x86d3, 0x86d5, 0x86d6, 0x86d7, 0x86da, 0x86dc, 0x003f, - 0x86dd, 0x86e0, 0x86e1, 0x86e2, 0x86e3, 0x86e5, 0x86e6, 0x86e7, - 0x86e8, 0x86ea, 0x86eb, 0x86ec, 0x86ef, 0x86f5, 0x86f6, 0x86f7, - 0x86fa, 0x86fb, 0x86fc, 0x86fd, 0x86ff, 0x8701, 0x8704, 0x8705, - 0x8706, 0x870b, 0x870c, 0x870e, 0x870f, 0x8710, 0x8711, 0x8714, - 0x8716, 0x6c40, 0x5ef7, 0x505c, 0x4ead, 0x5ead, 0x633a, 0x8247, - 0x901a, 0x6850, 0x916e, 0x77b3, 0x540c, 0x94dc, 0x5f64, 0x7ae5, - 0x6876, 0x6345, 0x7b52, 0x7edf, 0x75db, 0x5077, 0x6295, 0x5934, - 0x900f, 0x51f8, 0x79c3, 0x7a81, 0x56fe, 0x5f92, 0x9014, 0x6d82, - 0x5c60, 0x571f, 0x5410, 0x5154, 0x6e4d, 0x56e2, 0x63a8, 0x9893, - 0x817f, 0x8715, 0x892a, 0x9000, 0x541e, 0x5c6f, 0x81c0, 0x62d6, - 0x6258, 0x8131, 0x9e35, 0x9640, 0x9a6e, 0x9a7c, 0x692d, 0x59a5, - 0x62d3, 0x553e, 0x6316, 0x54c7, 0x86d9, 0x6d3c, 0x5a03, 0x74e6, - 0x889c, 0x6b6a, 0x5916, 0x8c4c, 0x5f2f, 0x6e7e, 0x73a9, 0x987d, - 0x4e38, 0x70f7, 0x5b8c, 0x7897, 0x633d, 0x665a, 0x7696, 0x60cb, - 0x5b9b, 0x5a49, 0x4e07, 0x8155, 0x6c6a, 0x738b, 0x4ea1, 0x6789, - 0x7f51, 0x5f80, 0x65fa, 0x671b, 0x5fd8, 0x5984, 0x5a01, 0x003f, - /* lead byte ce */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8719, 0x871b, 0x871d, 0x871f, 0x8720, 0x8724, 0x8726, 0x8727, - 0x8728, 0x872a, 0x872b, 0x872c, 0x872d, 0x872f, 0x8730, 0x8732, - 0x8733, 0x8735, 0x8736, 0x8738, 0x8739, 0x873a, 0x873c, 0x873d, - 0x8740, 0x8741, 0x8742, 0x8743, 0x8744, 0x8745, 0x8746, 0x874a, - 0x874b, 0x874d, 0x874f, 0x8750, 0x8751, 0x8752, 0x8754, 0x8755, - 0x8756, 0x8758, 0x875a, 0x875b, 0x875c, 0x875d, 0x875e, 0x875f, - 0x8761, 0x8762, 0x8766, 0x8767, 0x8768, 0x8769, 0x876a, 0x876b, - 0x876c, 0x876d, 0x876f, 0x8771, 0x8772, 0x8773, 0x8775, 0x003f, - 0x8777, 0x8778, 0x8779, 0x877a, 0x877f, 0x8780, 0x8781, 0x8784, - 0x8786, 0x8787, 0x8789, 0x878a, 0x878c, 0x878e, 0x878f, 0x8790, - 0x8791, 0x8792, 0x8794, 0x8795, 0x8796, 0x8798, 0x8799, 0x879a, - 0x879b, 0x879c, 0x879d, 0x879e, 0x87a0, 0x87a1, 0x87a2, 0x87a3, - 0x87a4, 0x5dcd, 0x5fae, 0x5371, 0x97e6, 0x8fdd, 0x6845, 0x56f4, - 0x552f, 0x60df, 0x4e3a, 0x6f4d, 0x7ef4, 0x82c7, 0x840e, 0x59d4, - 0x4f1f, 0x4f2a, 0x5c3e, 0x7eac, 0x672a, 0x851a, 0x5473, 0x754f, - 0x80c3, 0x5582, 0x9b4f, 0x4f4d, 0x6e2d, 0x8c13, 0x5c09, 0x6170, - 0x536b, 0x761f, 0x6e29, 0x868a, 0x6587, 0x95fb, 0x7eb9, 0x543b, - 0x7a33, 0x7d0a, 0x95ee, 0x55e1, 0x7fc1, 0x74ee, 0x631d, 0x8717, - 0x6da1, 0x7a9d, 0x6211, 0x65a1, 0x5367, 0x63e1, 0x6c83, 0x5deb, - 0x545c, 0x94a8, 0x4e4c, 0x6c61, 0x8bec, 0x5c4b, 0x65e0, 0x829c, - 0x68a7, 0x543e, 0x5434, 0x6bcb, 0x6b66, 0x4e94, 0x6342, 0x5348, - 0x821e, 0x4f0d, 0x4fae, 0x575e, 0x620a, 0x96fe, 0x6664, 0x7269, - 0x52ff, 0x52a1, 0x609f, 0x8bef, 0x6614, 0x7199, 0x6790, 0x897f, - 0x7852, 0x77fd, 0x6670, 0x563b, 0x5438, 0x9521, 0x727a, 0x003f, - /* lead byte cf */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x87a5, 0x87a6, 0x87a7, 0x87a9, 0x87aa, 0x87ae, 0x87b0, 0x87b1, - 0x87b2, 0x87b4, 0x87b6, 0x87b7, 0x87b8, 0x87b9, 0x87bb, 0x87bc, - 0x87be, 0x87bf, 0x87c1, 0x87c2, 0x87c3, 0x87c4, 0x87c5, 0x87c7, - 0x87c8, 0x87c9, 0x87cc, 0x87cd, 0x87ce, 0x87cf, 0x87d0, 0x87d4, - 0x87d5, 0x87d6, 0x87d7, 0x87d8, 0x87d9, 0x87da, 0x87dc, 0x87dd, - 0x87de, 0x87df, 0x87e1, 0x87e2, 0x87e3, 0x87e4, 0x87e6, 0x87e7, - 0x87e8, 0x87e9, 0x87eb, 0x87ec, 0x87ed, 0x87ef, 0x87f0, 0x87f1, - 0x87f2, 0x87f3, 0x87f4, 0x87f5, 0x87f6, 0x87f7, 0x87f8, 0x003f, - 0x87fa, 0x87fb, 0x87fc, 0x87fd, 0x87ff, 0x8800, 0x8801, 0x8802, - 0x8804, 0x8805, 0x8806, 0x8807, 0x8808, 0x8809, 0x880b, 0x880c, - 0x880d, 0x880e, 0x880f, 0x8810, 0x8811, 0x8812, 0x8814, 0x8817, - 0x8818, 0x8819, 0x881a, 0x881c, 0x881d, 0x881e, 0x881f, 0x8820, - 0x8823, 0x7a00, 0x606f, 0x5e0c, 0x6089, 0x819d, 0x5915, 0x60dc, - 0x7184, 0x70ef, 0x6eaa, 0x6c50, 0x7280, 0x6a84, 0x88ad, 0x5e2d, - 0x4e60, 0x5ab3, 0x559c, 0x94e3, 0x6d17, 0x7cfb, 0x9699, 0x620f, - 0x7ec6, 0x778e, 0x867e, 0x5323, 0x971e, 0x8f96, 0x6687, 0x5ce1, - 0x4fa0, 0x72ed, 0x4e0b, 0x53a6, 0x590f, 0x5413, 0x6380, 0x9528, - 0x5148, 0x4ed9, 0x9c9c, 0x7ea4, 0x54b8, 0x8d24, 0x8854, 0x8237, - 0x95f2, 0x6d8e, 0x5f26, 0x5acc, 0x663e, 0x9669, 0x73b0, 0x732e, - 0x53bf, 0x817a, 0x9985, 0x7fa1, 0x5baa, 0x9677, 0x9650, 0x7ebf, - 0x76f8, 0x53a2, 0x9576, 0x9999, 0x7bb1, 0x8944, 0x6e58, 0x4e61, - 0x7fd4, 0x7965, 0x8be6, 0x60f3, 0x54cd, 0x4eab, 0x9879, 0x5df7, - 0x6a61, 0x50cf, 0x5411, 0x8c61, 0x8427, 0x785d, 0x9704, 0x524a, - 0x54ee, 0x56a3, 0x9500, 0x6d88, 0x5bb5, 0x6dc6, 0x6653, 0x003f, - /* lead byte d0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8824, 0x8825, 0x8826, 0x8827, 0x8828, 0x8829, 0x882a, 0x882b, - 0x882c, 0x882d, 0x882e, 0x882f, 0x8830, 0x8831, 0x8833, 0x8834, - 0x8835, 0x8836, 0x8837, 0x8838, 0x883a, 0x883b, 0x883d, 0x883e, - 0x883f, 0x8841, 0x8842, 0x8843, 0x8846, 0x8847, 0x8848, 0x8849, - 0x884a, 0x884b, 0x884e, 0x884f, 0x8850, 0x8851, 0x8852, 0x8853, - 0x8855, 0x8856, 0x8858, 0x885a, 0x885b, 0x885c, 0x885d, 0x885e, - 0x885f, 0x8860, 0x8866, 0x8867, 0x886a, 0x886d, 0x886f, 0x8871, - 0x8873, 0x8874, 0x8875, 0x8876, 0x8878, 0x8879, 0x887a, 0x003f, - 0x887b, 0x887c, 0x8880, 0x8883, 0x8886, 0x8887, 0x8889, 0x888a, - 0x888c, 0x888e, 0x888f, 0x8890, 0x8891, 0x8893, 0x8894, 0x8895, - 0x8897, 0x8898, 0x8899, 0x889a, 0x889b, 0x889d, 0x889e, 0x889f, - 0x88a0, 0x88a1, 0x88a3, 0x88a5, 0x88a6, 0x88a7, 0x88a8, 0x88a9, - 0x88aa, 0x5c0f, 0x5b5d, 0x6821, 0x8096, 0x5578, 0x7b11, 0x6548, - 0x6954, 0x4e9b, 0x6b47, 0x874e, 0x978b, 0x534f, 0x631f, 0x643a, - 0x90aa, 0x659c, 0x80c1, 0x8c10, 0x5199, 0x68b0, 0x5378, 0x87f9, - 0x61c8, 0x6cc4, 0x6cfb, 0x8c22, 0x5c51, 0x85aa, 0x82af, 0x950c, - 0x6b23, 0x8f9b, 0x65b0, 0x5ffb, 0x5fc3, 0x4fe1, 0x8845, 0x661f, - 0x8165, 0x7329, 0x60fa, 0x5174, 0x5211, 0x578b, 0x5f62, 0x90a2, - 0x884c, 0x9192, 0x5e78, 0x674f, 0x6027, 0x59d3, 0x5144, 0x51f6, - 0x80f8, 0x5308, 0x6c79, 0x96c4, 0x718a, 0x4f11, 0x4fee, 0x7f9e, - 0x673d, 0x55c5, 0x9508, 0x79c0, 0x8896, 0x7ee3, 0x589f, 0x620c, - 0x9700, 0x865a, 0x5618, 0x987b, 0x5f90, 0x8bb8, 0x84c4, 0x9157, - 0x53d9, 0x65ed, 0x5e8f, 0x755c, 0x6064, 0x7d6e, 0x5a7f, 0x7eea, - 0x7eed, 0x8f69, 0x55a7, 0x5ba3, 0x60ac, 0x65cb, 0x7384, 0x003f, - /* lead byte d1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x88ac, 0x88ae, 0x88af, 0x88b0, 0x88b2, 0x88b3, 0x88b4, 0x88b5, - 0x88b6, 0x88b8, 0x88b9, 0x88ba, 0x88bb, 0x88bd, 0x88be, 0x88bf, - 0x88c0, 0x88c3, 0x88c4, 0x88c7, 0x88c8, 0x88ca, 0x88cb, 0x88cc, - 0x88cd, 0x88cf, 0x88d0, 0x88d1, 0x88d3, 0x88d6, 0x88d7, 0x88da, - 0x88db, 0x88dc, 0x88dd, 0x88de, 0x88e0, 0x88e1, 0x88e6, 0x88e7, - 0x88e9, 0x88ea, 0x88eb, 0x88ec, 0x88ed, 0x88ee, 0x88ef, 0x88f2, - 0x88f5, 0x88f6, 0x88f7, 0x88fa, 0x88fb, 0x88fd, 0x88ff, 0x8900, - 0x8901, 0x8903, 0x8904, 0x8905, 0x8906, 0x8907, 0x8908, 0x003f, - 0x8909, 0x890b, 0x890c, 0x890d, 0x890e, 0x890f, 0x8911, 0x8914, - 0x8915, 0x8916, 0x8917, 0x8918, 0x891c, 0x891d, 0x891e, 0x891f, - 0x8920, 0x8922, 0x8923, 0x8924, 0x8926, 0x8927, 0x8928, 0x8929, - 0x892c, 0x892d, 0x892e, 0x892f, 0x8931, 0x8932, 0x8933, 0x8935, - 0x8937, 0x9009, 0x7663, 0x7729, 0x7eda, 0x9774, 0x859b, 0x5b66, - 0x7a74, 0x96ea, 0x8840, 0x52cb, 0x718f, 0x5faa, 0x65ec, 0x8be2, - 0x5bfb, 0x9a6f, 0x5de1, 0x6b89, 0x6c5b, 0x8bad, 0x8baf, 0x900a, - 0x8fc5, 0x538b, 0x62bc, 0x9e26, 0x9e2d, 0x5440, 0x4e2b, 0x82bd, - 0x7259, 0x869c, 0x5d16, 0x8859, 0x6daf, 0x96c5, 0x54d1, 0x4e9a, - 0x8bb6, 0x7109, 0x54bd, 0x9609, 0x70df, 0x6df9, 0x76d0, 0x4e25, - 0x7814, 0x8712, 0x5ca9, 0x5ef6, 0x8a00, 0x989c, 0x960e, 0x708e, - 0x6cbf, 0x5944, 0x63a9, 0x773c, 0x884d, 0x6f14, 0x8273, 0x5830, - 0x71d5, 0x538c, 0x781a, 0x96c1, 0x5501, 0x5f66, 0x7130, 0x5bb4, - 0x8c1a, 0x9a8c, 0x6b83, 0x592e, 0x9e2f, 0x79e7, 0x6768, 0x626c, - 0x4f6f, 0x75a1, 0x7f8a, 0x6d0b, 0x9633, 0x6c27, 0x4ef0, 0x75d2, - 0x517b, 0x6837, 0x6f3e, 0x9080, 0x8170, 0x5996, 0x7476, 0x003f, - /* lead byte d2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8938, 0x8939, 0x893a, 0x893b, 0x893c, 0x893d, 0x893e, 0x893f, - 0x8940, 0x8942, 0x8943, 0x8945, 0x8946, 0x8947, 0x8948, 0x8949, - 0x894a, 0x894b, 0x894c, 0x894d, 0x894e, 0x894f, 0x8950, 0x8951, - 0x8952, 0x8953, 0x8954, 0x8955, 0x8956, 0x8957, 0x8958, 0x8959, - 0x895a, 0x895b, 0x895c, 0x895d, 0x8960, 0x8961, 0x8962, 0x8963, - 0x8964, 0x8965, 0x8967, 0x8968, 0x8969, 0x896a, 0x896b, 0x896c, - 0x896d, 0x896e, 0x896f, 0x8970, 0x8971, 0x8972, 0x8973, 0x8974, - 0x8975, 0x8976, 0x8977, 0x8978, 0x8979, 0x897a, 0x897c, 0x003f, - 0x897d, 0x897e, 0x8980, 0x8982, 0x8984, 0x8985, 0x8987, 0x8988, - 0x8989, 0x898a, 0x898b, 0x898c, 0x898d, 0x898e, 0x898f, 0x8990, - 0x8991, 0x8992, 0x8993, 0x8994, 0x8995, 0x8996, 0x8997, 0x8998, - 0x8999, 0x899a, 0x899b, 0x899c, 0x899d, 0x899e, 0x899f, 0x89a0, - 0x89a1, 0x6447, 0x5c27, 0x9065, 0x7a91, 0x8c23, 0x59da, 0x54ac, - 0x8200, 0x836f, 0x8981, 0x8000, 0x6930, 0x564e, 0x8036, 0x7237, - 0x91ce, 0x51b6, 0x4e5f, 0x9875, 0x6396, 0x4e1a, 0x53f6, 0x66f3, - 0x814b, 0x591c, 0x6db2, 0x4e00, 0x58f9, 0x533b, 0x63d6, 0x94f1, - 0x4f9d, 0x4f0a, 0x8863, 0x9890, 0x5937, 0x9057, 0x79fb, 0x4eea, - 0x80f0, 0x7591, 0x6c82, 0x5b9c, 0x59e8, 0x5f5d, 0x6905, 0x8681, - 0x501a, 0x5df2, 0x4e59, 0x77e3, 0x4ee5, 0x827a, 0x6291, 0x6613, - 0x9091, 0x5c79, 0x4ebf, 0x5f79, 0x81c6, 0x9038, 0x8084, 0x75ab, - 0x4ea6, 0x88d4, 0x610f, 0x6bc5, 0x5fc6, 0x4e49, 0x76ca, 0x6ea2, - 0x8be3, 0x8bae, 0x8c0a, 0x8bd1, 0x5f02, 0x7ffc, 0x7fcc, 0x7ece, - 0x8335, 0x836b, 0x56e0, 0x6bb7, 0x97f3, 0x9634, 0x59fb, 0x541f, - 0x94f6, 0x6deb, 0x5bc5, 0x996e, 0x5c39, 0x5f15, 0x9690, 0x003f, - /* lead byte d3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x89a2, 0x89a3, 0x89a4, 0x89a5, 0x89a6, 0x89a7, 0x89a8, 0x89a9, - 0x89aa, 0x89ab, 0x89ac, 0x89ad, 0x89ae, 0x89af, 0x89b0, 0x89b1, - 0x89b2, 0x89b3, 0x89b4, 0x89b5, 0x89b6, 0x89b7, 0x89b8, 0x89b9, - 0x89ba, 0x89bb, 0x89bc, 0x89bd, 0x89be, 0x89bf, 0x89c0, 0x89c3, - 0x89cd, 0x89d3, 0x89d4, 0x89d5, 0x89d7, 0x89d8, 0x89d9, 0x89db, - 0x89dd, 0x89df, 0x89e0, 0x89e1, 0x89e2, 0x89e4, 0x89e7, 0x89e8, - 0x89e9, 0x89ea, 0x89ec, 0x89ed, 0x89ee, 0x89f0, 0x89f1, 0x89f2, - 0x89f4, 0x89f5, 0x89f6, 0x89f7, 0x89f8, 0x89f9, 0x89fa, 0x003f, - 0x89fb, 0x89fc, 0x89fd, 0x89fe, 0x89ff, 0x8a01, 0x8a02, 0x8a03, - 0x8a04, 0x8a05, 0x8a06, 0x8a08, 0x8a09, 0x8a0a, 0x8a0b, 0x8a0c, - 0x8a0d, 0x8a0e, 0x8a0f, 0x8a10, 0x8a11, 0x8a12, 0x8a13, 0x8a14, - 0x8a15, 0x8a16, 0x8a17, 0x8a18, 0x8a19, 0x8a1a, 0x8a1b, 0x8a1c, - 0x8a1d, 0x5370, 0x82f1, 0x6a31, 0x5a74, 0x9e70, 0x5e94, 0x7f28, - 0x83b9, 0x8424, 0x8425, 0x8367, 0x8747, 0x8fce, 0x8d62, 0x76c8, - 0x5f71, 0x9896, 0x786c, 0x6620, 0x54df, 0x62e5, 0x4f63, 0x81c3, - 0x75c8, 0x5eb8, 0x96cd, 0x8e0a, 0x86f9, 0x548f, 0x6cf3, 0x6d8c, - 0x6c38, 0x607f, 0x52c7, 0x7528, 0x5e7d, 0x4f18, 0x60a0, 0x5fe7, - 0x5c24, 0x7531, 0x90ae, 0x94c0, 0x72b9, 0x6cb9, 0x6e38, 0x9149, - 0x6709, 0x53cb, 0x53f3, 0x4f51, 0x91c9, 0x8bf1, 0x53c8, 0x5e7c, - 0x8fc2, 0x6de4, 0x4e8e, 0x76c2, 0x6986, 0x865e, 0x611a, 0x8206, - 0x4f59, 0x4fde, 0x903e, 0x9c7c, 0x6109, 0x6e1d, 0x6e14, 0x9685, - 0x4e88, 0x5a31, 0x96e8, 0x4e0e, 0x5c7f, 0x79b9, 0x5b87, 0x8bed, - 0x7fbd, 0x7389, 0x57df, 0x828b, 0x90c1, 0x5401, 0x9047, 0x55bb, - 0x5cea, 0x5fa1, 0x6108, 0x6b32, 0x72f1, 0x80b2, 0x8a89, 0x003f, - /* lead byte d4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8a1e, 0x8a1f, 0x8a20, 0x8a21, 0x8a22, 0x8a23, 0x8a24, 0x8a25, - 0x8a26, 0x8a27, 0x8a28, 0x8a29, 0x8a2a, 0x8a2b, 0x8a2c, 0x8a2d, - 0x8a2e, 0x8a2f, 0x8a30, 0x8a31, 0x8a32, 0x8a33, 0x8a34, 0x8a35, - 0x8a36, 0x8a37, 0x8a38, 0x8a39, 0x8a3a, 0x8a3b, 0x8a3c, 0x8a3d, - 0x8a3f, 0x8a40, 0x8a41, 0x8a42, 0x8a43, 0x8a44, 0x8a45, 0x8a46, - 0x8a47, 0x8a49, 0x8a4a, 0x8a4b, 0x8a4c, 0x8a4d, 0x8a4e, 0x8a4f, - 0x8a50, 0x8a51, 0x8a52, 0x8a53, 0x8a54, 0x8a55, 0x8a56, 0x8a57, - 0x8a58, 0x8a59, 0x8a5a, 0x8a5b, 0x8a5c, 0x8a5d, 0x8a5e, 0x003f, - 0x8a5f, 0x8a60, 0x8a61, 0x8a62, 0x8a63, 0x8a64, 0x8a65, 0x8a66, - 0x8a67, 0x8a68, 0x8a69, 0x8a6a, 0x8a6b, 0x8a6c, 0x8a6d, 0x8a6e, - 0x8a6f, 0x8a70, 0x8a71, 0x8a72, 0x8a73, 0x8a74, 0x8a75, 0x8a76, - 0x8a77, 0x8a78, 0x8a7a, 0x8a7b, 0x8a7c, 0x8a7d, 0x8a7e, 0x8a7f, - 0x8a80, 0x6d74, 0x5bd3, 0x88d5, 0x9884, 0x8c6b, 0x9a6d, 0x9e33, - 0x6e0a, 0x51a4, 0x5143, 0x57a3, 0x8881, 0x539f, 0x63f4, 0x8f95, - 0x56ed, 0x5458, 0x5706, 0x733f, 0x6e90, 0x7f18, 0x8fdc, 0x82d1, - 0x613f, 0x6028, 0x9662, 0x66f0, 0x7ea6, 0x8d8a, 0x8dc3, 0x94a5, - 0x5cb3, 0x7ca4, 0x6708, 0x60a6, 0x9605, 0x8018, 0x4e91, 0x90e7, - 0x5300, 0x9668, 0x5141, 0x8fd0, 0x8574, 0x915d, 0x6655, 0x97f5, - 0x5b55, 0x531d, 0x7838, 0x6742, 0x683d, 0x54c9, 0x707e, 0x5bb0, - 0x8f7d, 0x518d, 0x5728, 0x54b1, 0x6512, 0x6682, 0x8d5e, 0x8d43, - 0x810f, 0x846c, 0x906d, 0x7cdf, 0x51ff, 0x85fb, 0x67a3, 0x65e9, - 0x6fa1, 0x86a4, 0x8e81, 0x566a, 0x9020, 0x7682, 0x7076, 0x71e5, - 0x8d23, 0x62e9, 0x5219, 0x6cfd, 0x8d3c, 0x600e, 0x589e, 0x618e, - 0x66fe, 0x8d60, 0x624e, 0x55b3, 0x6e23, 0x672d, 0x8f67, 0x003f, - /* lead byte d5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8a81, 0x8a82, 0x8a83, 0x8a84, 0x8a85, 0x8a86, 0x8a87, 0x8a88, - 0x8a8b, 0x8a8c, 0x8a8d, 0x8a8e, 0x8a8f, 0x8a90, 0x8a91, 0x8a92, - 0x8a94, 0x8a95, 0x8a96, 0x8a97, 0x8a98, 0x8a99, 0x8a9a, 0x8a9b, - 0x8a9c, 0x8a9d, 0x8a9e, 0x8a9f, 0x8aa0, 0x8aa1, 0x8aa2, 0x8aa3, - 0x8aa4, 0x8aa5, 0x8aa6, 0x8aa7, 0x8aa8, 0x8aa9, 0x8aaa, 0x8aab, - 0x8aac, 0x8aad, 0x8aae, 0x8aaf, 0x8ab0, 0x8ab1, 0x8ab2, 0x8ab3, - 0x8ab4, 0x8ab5, 0x8ab6, 0x8ab7, 0x8ab8, 0x8ab9, 0x8aba, 0x8abb, - 0x8abc, 0x8abd, 0x8abe, 0x8abf, 0x8ac0, 0x8ac1, 0x8ac2, 0x003f, - 0x8ac3, 0x8ac4, 0x8ac5, 0x8ac6, 0x8ac7, 0x8ac8, 0x8ac9, 0x8aca, - 0x8acb, 0x8acc, 0x8acd, 0x8ace, 0x8acf, 0x8ad0, 0x8ad1, 0x8ad2, - 0x8ad3, 0x8ad4, 0x8ad5, 0x8ad6, 0x8ad7, 0x8ad8, 0x8ad9, 0x8ada, - 0x8adb, 0x8adc, 0x8add, 0x8ade, 0x8adf, 0x8ae0, 0x8ae1, 0x8ae2, - 0x8ae3, 0x94e1, 0x95f8, 0x7728, 0x6805, 0x69a8, 0x548b, 0x4e4d, - 0x70b8, 0x8bc8, 0x6458, 0x658b, 0x5b85, 0x7a84, 0x503a, 0x5be8, - 0x77bb, 0x6be1, 0x8a79, 0x7c98, 0x6cbe, 0x76cf, 0x65a9, 0x8f97, - 0x5d2d, 0x5c55, 0x8638, 0x6808, 0x5360, 0x6218, 0x7ad9, 0x6e5b, - 0x7efd, 0x6a1f, 0x7ae0, 0x5f70, 0x6f33, 0x5f20, 0x638c, 0x6da8, - 0x6756, 0x4e08, 0x5e10, 0x8d26, 0x4ed7, 0x80c0, 0x7634, 0x969c, - 0x62db, 0x662d, 0x627e, 0x6cbc, 0x8d75, 0x7167, 0x7f69, 0x5146, - 0x8087, 0x53ec, 0x906e, 0x6298, 0x54f2, 0x86f0, 0x8f99, 0x8005, - 0x9517, 0x8517, 0x8fd9, 0x6d59, 0x73cd, 0x659f, 0x771f, 0x7504, - 0x7827, 0x81fb, 0x8d1e, 0x9488, 0x4fa6, 0x6795, 0x75b9, 0x8bca, - 0x9707, 0x632f, 0x9547, 0x9635, 0x84b8, 0x6323, 0x7741, 0x5f81, - 0x72f0, 0x4e89, 0x6014, 0x6574, 0x62ef, 0x6b63, 0x653f, 0x003f, - /* lead byte d6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8ae4, 0x8ae5, 0x8ae6, 0x8ae7, 0x8ae8, 0x8ae9, 0x8aea, 0x8aeb, - 0x8aec, 0x8aed, 0x8aee, 0x8aef, 0x8af0, 0x8af1, 0x8af2, 0x8af3, - 0x8af4, 0x8af5, 0x8af6, 0x8af7, 0x8af8, 0x8af9, 0x8afa, 0x8afb, - 0x8afc, 0x8afd, 0x8afe, 0x8aff, 0x8b00, 0x8b01, 0x8b02, 0x8b03, - 0x8b04, 0x8b05, 0x8b06, 0x8b08, 0x8b09, 0x8b0a, 0x8b0b, 0x8b0c, - 0x8b0d, 0x8b0e, 0x8b0f, 0x8b10, 0x8b11, 0x8b12, 0x8b13, 0x8b14, - 0x8b15, 0x8b16, 0x8b17, 0x8b18, 0x8b19, 0x8b1a, 0x8b1b, 0x8b1c, - 0x8b1d, 0x8b1e, 0x8b1f, 0x8b20, 0x8b21, 0x8b22, 0x8b23, 0x003f, - 0x8b24, 0x8b25, 0x8b27, 0x8b28, 0x8b29, 0x8b2a, 0x8b2b, 0x8b2c, - 0x8b2d, 0x8b2e, 0x8b2f, 0x8b30, 0x8b31, 0x8b32, 0x8b33, 0x8b34, - 0x8b35, 0x8b36, 0x8b37, 0x8b38, 0x8b39, 0x8b3a, 0x8b3b, 0x8b3c, - 0x8b3d, 0x8b3e, 0x8b3f, 0x8b40, 0x8b41, 0x8b42, 0x8b43, 0x8b44, - 0x8b45, 0x5e27, 0x75c7, 0x90d1, 0x8bc1, 0x829d, 0x679d, 0x652f, - 0x5431, 0x8718, 0x77e5, 0x80a2, 0x8102, 0x6c41, 0x4e4b, 0x7ec7, - 0x804c, 0x76f4, 0x690d, 0x6b96, 0x6267, 0x503c, 0x4f84, 0x5740, - 0x6307, 0x6b62, 0x8dbe, 0x53ea, 0x65e8, 0x7eb8, 0x5fd7, 0x631a, - 0x63b7, 0x81f3, 0x81f4, 0x7f6e, 0x5e1c, 0x5cd9, 0x5236, 0x667a, - 0x79e9, 0x7a1a, 0x8d28, 0x7099, 0x75d4, 0x6ede, 0x6cbb, 0x7a92, - 0x4e2d, 0x76c5, 0x5fe0, 0x949f, 0x8877, 0x7ec8, 0x79cd, 0x80bf, - 0x91cd, 0x4ef2, 0x4f17, 0x821f, 0x5468, 0x5dde, 0x6d32, 0x8bcc, - 0x7ca5, 0x8f74, 0x8098, 0x5e1a, 0x5492, 0x76b1, 0x5b99, 0x663c, - 0x9aa4, 0x73e0, 0x682a, 0x86db, 0x6731, 0x732a, 0x8bf8, 0x8bdb, - 0x9010, 0x7af9, 0x70db, 0x716e, 0x62c4, 0x77a9, 0x5631, 0x4e3b, - 0x8457, 0x67f1, 0x52a9, 0x86c0, 0x8d2e, 0x94f8, 0x7b51, 0x003f, - /* lead byte d7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8b46, 0x8b47, 0x8b48, 0x8b49, 0x8b4a, 0x8b4b, 0x8b4c, 0x8b4d, - 0x8b4e, 0x8b4f, 0x8b50, 0x8b51, 0x8b52, 0x8b53, 0x8b54, 0x8b55, - 0x8b56, 0x8b57, 0x8b58, 0x8b59, 0x8b5a, 0x8b5b, 0x8b5c, 0x8b5d, - 0x8b5e, 0x8b5f, 0x8b60, 0x8b61, 0x8b62, 0x8b63, 0x8b64, 0x8b65, - 0x8b67, 0x8b68, 0x8b69, 0x8b6a, 0x8b6b, 0x8b6d, 0x8b6e, 0x8b6f, - 0x8b70, 0x8b71, 0x8b72, 0x8b73, 0x8b74, 0x8b75, 0x8b76, 0x8b77, - 0x8b78, 0x8b79, 0x8b7a, 0x8b7b, 0x8b7c, 0x8b7d, 0x8b7e, 0x8b7f, - 0x8b80, 0x8b81, 0x8b82, 0x8b83, 0x8b84, 0x8b85, 0x8b86, 0x003f, - 0x8b87, 0x8b88, 0x8b89, 0x8b8a, 0x8b8b, 0x8b8c, 0x8b8d, 0x8b8e, - 0x8b8f, 0x8b90, 0x8b91, 0x8b92, 0x8b93, 0x8b94, 0x8b95, 0x8b96, - 0x8b97, 0x8b98, 0x8b99, 0x8b9a, 0x8b9b, 0x8b9c, 0x8b9d, 0x8b9e, - 0x8b9f, 0x8bac, 0x8bb1, 0x8bbb, 0x8bc7, 0x8bd0, 0x8bea, 0x8c09, - 0x8c1e, 0x4f4f, 0x6ce8, 0x795d, 0x9a7b, 0x6293, 0x722a, 0x62fd, - 0x4e13, 0x7816, 0x8f6c, 0x64b0, 0x8d5a, 0x7bc6, 0x6869, 0x5e84, - 0x88c5, 0x5986, 0x649e, 0x58ee, 0x72b6, 0x690e, 0x9525, 0x8ffd, - 0x8d58, 0x5760, 0x7f00, 0x8c06, 0x51c6, 0x6349, 0x62d9, 0x5353, - 0x684c, 0x7422, 0x8301, 0x914c, 0x5544, 0x7740, 0x707c, 0x6d4a, - 0x5179, 0x54a8, 0x8d44, 0x59ff, 0x6ecb, 0x6dc4, 0x5b5c, 0x7d2b, - 0x4ed4, 0x7c7d, 0x6ed3, 0x5b50, 0x81ea, 0x6e0d, 0x5b57, 0x9b03, - 0x68d5, 0x8e2a, 0x5b97, 0x7efc, 0x603b, 0x7eb5, 0x90b9, 0x8d70, - 0x594f, 0x63cd, 0x79df, 0x8db3, 0x5352, 0x65cf, 0x7956, 0x8bc5, - 0x963b, 0x7ec4, 0x94bb, 0x7e82, 0x5634, 0x9189, 0x6700, 0x7f6a, - 0x5c0a, 0x9075, 0x6628, 0x5de6, 0x4f50, 0x67de, 0x505a, 0x4f5c, - 0x5750, 0x5ea7, 0xe810, 0xe811, 0xe812, 0xe813, 0xe814, 0x003f, - /* lead byte d8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8c38, 0x8c39, 0x8c3a, 0x8c3b, 0x8c3c, 0x8c3d, 0x8c3e, 0x8c3f, - 0x8c40, 0x8c42, 0x8c43, 0x8c44, 0x8c45, 0x8c48, 0x8c4a, 0x8c4b, - 0x8c4d, 0x8c4e, 0x8c4f, 0x8c50, 0x8c51, 0x8c52, 0x8c53, 0x8c54, - 0x8c56, 0x8c57, 0x8c58, 0x8c59, 0x8c5b, 0x8c5c, 0x8c5d, 0x8c5e, - 0x8c5f, 0x8c60, 0x8c63, 0x8c64, 0x8c65, 0x8c66, 0x8c67, 0x8c68, - 0x8c69, 0x8c6c, 0x8c6d, 0x8c6e, 0x8c6f, 0x8c70, 0x8c71, 0x8c72, - 0x8c74, 0x8c75, 0x8c76, 0x8c77, 0x8c7b, 0x8c7c, 0x8c7d, 0x8c7e, - 0x8c7f, 0x8c80, 0x8c81, 0x8c83, 0x8c84, 0x8c86, 0x8c87, 0x003f, - 0x8c88, 0x8c8b, 0x8c8d, 0x8c8e, 0x8c8f, 0x8c90, 0x8c91, 0x8c92, - 0x8c93, 0x8c95, 0x8c96, 0x8c97, 0x8c99, 0x8c9a, 0x8c9b, 0x8c9c, - 0x8c9d, 0x8c9e, 0x8c9f, 0x8ca0, 0x8ca1, 0x8ca2, 0x8ca3, 0x8ca4, - 0x8ca5, 0x8ca6, 0x8ca7, 0x8ca8, 0x8ca9, 0x8caa, 0x8cab, 0x8cac, - 0x8cad, 0x4e8d, 0x4e0c, 0x5140, 0x4e10, 0x5eff, 0x5345, 0x4e15, - 0x4e98, 0x4e1e, 0x9b32, 0x5b6c, 0x5669, 0x4e28, 0x79ba, 0x4e3f, - 0x5315, 0x4e47, 0x592d, 0x723b, 0x536e, 0x6c10, 0x56df, 0x80e4, - 0x9997, 0x6bd3, 0x777e, 0x9f17, 0x4e36, 0x4e9f, 0x9f10, 0x4e5c, - 0x4e69, 0x4e93, 0x8288, 0x5b5b, 0x556c, 0x560f, 0x4ec4, 0x538d, - 0x539d, 0x53a3, 0x53a5, 0x53ae, 0x9765, 0x8d5d, 0x531a, 0x53f5, - 0x5326, 0x532e, 0x533e, 0x8d5c, 0x5366, 0x5363, 0x5202, 0x5208, - 0x520e, 0x522d, 0x5233, 0x523f, 0x5240, 0x524c, 0x525e, 0x5261, - 0x525c, 0x84af, 0x527d, 0x5282, 0x5281, 0x5290, 0x5293, 0x5182, - 0x7f54, 0x4ebb, 0x4ec3, 0x4ec9, 0x4ec2, 0x4ee8, 0x4ee1, 0x4eeb, - 0x4ede, 0x4f1b, 0x4ef3, 0x4f22, 0x4f64, 0x4ef5, 0x4f25, 0x4f27, - 0x4f09, 0x4f2b, 0x4f5e, 0x4f67, 0x6538, 0x4f5a, 0x4f5d, 0x003f, - /* lead byte d9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8cae, 0x8caf, 0x8cb0, 0x8cb1, 0x8cb2, 0x8cb3, 0x8cb4, 0x8cb5, - 0x8cb6, 0x8cb7, 0x8cb8, 0x8cb9, 0x8cba, 0x8cbb, 0x8cbc, 0x8cbd, - 0x8cbe, 0x8cbf, 0x8cc0, 0x8cc1, 0x8cc2, 0x8cc3, 0x8cc4, 0x8cc5, - 0x8cc6, 0x8cc7, 0x8cc8, 0x8cc9, 0x8cca, 0x8ccb, 0x8ccc, 0x8ccd, - 0x8cce, 0x8ccf, 0x8cd0, 0x8cd1, 0x8cd2, 0x8cd3, 0x8cd4, 0x8cd5, - 0x8cd6, 0x8cd7, 0x8cd8, 0x8cd9, 0x8cda, 0x8cdb, 0x8cdc, 0x8cdd, - 0x8cde, 0x8cdf, 0x8ce0, 0x8ce1, 0x8ce2, 0x8ce3, 0x8ce4, 0x8ce5, - 0x8ce6, 0x8ce7, 0x8ce8, 0x8ce9, 0x8cea, 0x8ceb, 0x8cec, 0x003f, - 0x8ced, 0x8cee, 0x8cef, 0x8cf0, 0x8cf1, 0x8cf2, 0x8cf3, 0x8cf4, - 0x8cf5, 0x8cf6, 0x8cf7, 0x8cf8, 0x8cf9, 0x8cfa, 0x8cfb, 0x8cfc, - 0x8cfd, 0x8cfe, 0x8cff, 0x8d00, 0x8d01, 0x8d02, 0x8d03, 0x8d04, - 0x8d05, 0x8d06, 0x8d07, 0x8d08, 0x8d09, 0x8d0a, 0x8d0b, 0x8d0c, - 0x8d0d, 0x4f5f, 0x4f57, 0x4f32, 0x4f3d, 0x4f76, 0x4f74, 0x4f91, - 0x4f89, 0x4f83, 0x4f8f, 0x4f7e, 0x4f7b, 0x4faa, 0x4f7c, 0x4fac, - 0x4f94, 0x4fe6, 0x4fe8, 0x4fea, 0x4fc5, 0x4fda, 0x4fe3, 0x4fdc, - 0x4fd1, 0x4fdf, 0x4ff8, 0x5029, 0x504c, 0x4ff3, 0x502c, 0x500f, - 0x502e, 0x502d, 0x4ffe, 0x501c, 0x500c, 0x5025, 0x5028, 0x507e, - 0x5043, 0x5055, 0x5048, 0x504e, 0x506c, 0x507b, 0x50a5, 0x50a7, - 0x50a9, 0x50ba, 0x50d6, 0x5106, 0x50ed, 0x50ec, 0x50e6, 0x50ee, - 0x5107, 0x510b, 0x4edd, 0x6c3d, 0x4f58, 0x4f65, 0x4fce, 0x9fa0, - 0x6c46, 0x7c74, 0x516e, 0x5dfd, 0x9ec9, 0x9998, 0x5181, 0x5914, - 0x52f9, 0x530d, 0x8a07, 0x5310, 0x51eb, 0x5919, 0x5155, 0x4ea0, - 0x5156, 0x4eb3, 0x886e, 0x88a4, 0x4eb5, 0x8114, 0x88d2, 0x7980, - 0x5b34, 0x8803, 0x7fb8, 0x51ab, 0x51b1, 0x51bd, 0x51bc, 0x003f, - /* lead byte da */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8d0e, 0x8d0f, 0x8d10, 0x8d11, 0x8d12, 0x8d13, 0x8d14, 0x8d15, - 0x8d16, 0x8d17, 0x8d18, 0x8d19, 0x8d1a, 0x8d1b, 0x8d1c, 0x8d20, - 0x8d51, 0x8d52, 0x8d57, 0x8d5f, 0x8d65, 0x8d68, 0x8d69, 0x8d6a, - 0x8d6c, 0x8d6e, 0x8d6f, 0x8d71, 0x8d72, 0x8d78, 0x8d79, 0x8d7a, - 0x8d7b, 0x8d7c, 0x8d7d, 0x8d7e, 0x8d7f, 0x8d80, 0x8d82, 0x8d83, - 0x8d86, 0x8d87, 0x8d88, 0x8d89, 0x8d8c, 0x8d8d, 0x8d8e, 0x8d8f, - 0x8d90, 0x8d92, 0x8d93, 0x8d95, 0x8d96, 0x8d97, 0x8d98, 0x8d99, - 0x8d9a, 0x8d9b, 0x8d9c, 0x8d9d, 0x8d9e, 0x8da0, 0x8da1, 0x003f, - 0x8da2, 0x8da4, 0x8da5, 0x8da6, 0x8da7, 0x8da8, 0x8da9, 0x8daa, - 0x8dab, 0x8dac, 0x8dad, 0x8dae, 0x8daf, 0x8db0, 0x8db2, 0x8db6, - 0x8db7, 0x8db9, 0x8dbb, 0x8dbd, 0x8dc0, 0x8dc1, 0x8dc2, 0x8dc5, - 0x8dc7, 0x8dc8, 0x8dc9, 0x8dca, 0x8dcd, 0x8dd0, 0x8dd2, 0x8dd3, - 0x8dd4, 0x51c7, 0x5196, 0x51a2, 0x51a5, 0x8ba0, 0x8ba6, 0x8ba7, - 0x8baa, 0x8bb4, 0x8bb5, 0x8bb7, 0x8bc2, 0x8bc3, 0x8bcb, 0x8bcf, - 0x8bce, 0x8bd2, 0x8bd3, 0x8bd4, 0x8bd6, 0x8bd8, 0x8bd9, 0x8bdc, - 0x8bdf, 0x8be0, 0x8be4, 0x8be8, 0x8be9, 0x8bee, 0x8bf0, 0x8bf3, - 0x8bf6, 0x8bf9, 0x8bfc, 0x8bff, 0x8c00, 0x8c02, 0x8c04, 0x8c07, - 0x8c0c, 0x8c0f, 0x8c11, 0x8c12, 0x8c14, 0x8c15, 0x8c16, 0x8c19, - 0x8c1b, 0x8c18, 0x8c1d, 0x8c1f, 0x8c20, 0x8c21, 0x8c25, 0x8c27, - 0x8c2a, 0x8c2b, 0x8c2e, 0x8c2f, 0x8c32, 0x8c33, 0x8c35, 0x8c36, - 0x5369, 0x537a, 0x961d, 0x9622, 0x9621, 0x9631, 0x962a, 0x963d, - 0x963c, 0x9642, 0x9649, 0x9654, 0x965f, 0x9667, 0x966c, 0x9672, - 0x9674, 0x9688, 0x968d, 0x9697, 0x96b0, 0x9097, 0x909b, 0x909d, - 0x9099, 0x90ac, 0x90a1, 0x90b4, 0x90b3, 0x90b6, 0x90ba, 0x003f, - /* lead byte db */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8dd5, 0x8dd8, 0x8dd9, 0x8ddc, 0x8de0, 0x8de1, 0x8de2, 0x8de5, - 0x8de6, 0x8de7, 0x8de9, 0x8ded, 0x8dee, 0x8df0, 0x8df1, 0x8df2, - 0x8df4, 0x8df6, 0x8dfc, 0x8dfe, 0x8dff, 0x8e00, 0x8e01, 0x8e02, - 0x8e03, 0x8e04, 0x8e06, 0x8e07, 0x8e08, 0x8e0b, 0x8e0d, 0x8e0e, - 0x8e10, 0x8e11, 0x8e12, 0x8e13, 0x8e15, 0x8e16, 0x8e17, 0x8e18, - 0x8e19, 0x8e1a, 0x8e1b, 0x8e1c, 0x8e20, 0x8e21, 0x8e24, 0x8e25, - 0x8e26, 0x8e27, 0x8e28, 0x8e2b, 0x8e2d, 0x8e30, 0x8e32, 0x8e33, - 0x8e34, 0x8e36, 0x8e37, 0x8e38, 0x8e3b, 0x8e3c, 0x8e3e, 0x003f, - 0x8e3f, 0x8e43, 0x8e45, 0x8e46, 0x8e4c, 0x8e4d, 0x8e4e, 0x8e4f, - 0x8e50, 0x8e53, 0x8e54, 0x8e55, 0x8e56, 0x8e57, 0x8e58, 0x8e5a, - 0x8e5b, 0x8e5c, 0x8e5d, 0x8e5e, 0x8e5f, 0x8e60, 0x8e61, 0x8e62, - 0x8e63, 0x8e64, 0x8e65, 0x8e67, 0x8e68, 0x8e6a, 0x8e6b, 0x8e6e, - 0x8e71, 0x90b8, 0x90b0, 0x90cf, 0x90c5, 0x90be, 0x90d0, 0x90c4, - 0x90c7, 0x90d3, 0x90e6, 0x90e2, 0x90dc, 0x90d7, 0x90db, 0x90eb, - 0x90ef, 0x90fe, 0x9104, 0x9122, 0x911e, 0x9123, 0x9131, 0x912f, - 0x9139, 0x9143, 0x9146, 0x520d, 0x5942, 0x52a2, 0x52ac, 0x52ad, - 0x52be, 0x54ff, 0x52d0, 0x52d6, 0x52f0, 0x53df, 0x71ee, 0x77cd, - 0x5ef4, 0x51f5, 0x51fc, 0x9b2f, 0x53b6, 0x5f01, 0x755a, 0x5def, - 0x574c, 0x57a9, 0x57a1, 0x587e, 0x58bc, 0x58c5, 0x58d1, 0x5729, - 0x572c, 0x572a, 0x5733, 0x5739, 0x572e, 0x572f, 0x575c, 0x573b, - 0x5742, 0x5769, 0x5785, 0x576b, 0x5786, 0x577c, 0x577b, 0x5768, - 0x576d, 0x5776, 0x5773, 0x57ad, 0x57a4, 0x578c, 0x57b2, 0x57cf, - 0x57a7, 0x57b4, 0x5793, 0x57a0, 0x57d5, 0x57d8, 0x57da, 0x57d9, - 0x57d2, 0x57b8, 0x57f4, 0x57ef, 0x57f8, 0x57e4, 0x57dd, 0x003f, - /* lead byte dc */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8e73, 0x8e75, 0x8e77, 0x8e78, 0x8e79, 0x8e7a, 0x8e7b, 0x8e7d, - 0x8e7e, 0x8e80, 0x8e82, 0x8e83, 0x8e84, 0x8e86, 0x8e88, 0x8e89, - 0x8e8a, 0x8e8b, 0x8e8c, 0x8e8d, 0x8e8e, 0x8e91, 0x8e92, 0x8e93, - 0x8e95, 0x8e96, 0x8e97, 0x8e98, 0x8e99, 0x8e9a, 0x8e9b, 0x8e9d, - 0x8e9f, 0x8ea0, 0x8ea1, 0x8ea2, 0x8ea3, 0x8ea4, 0x8ea5, 0x8ea6, - 0x8ea7, 0x8ea8, 0x8ea9, 0x8eaa, 0x8ead, 0x8eae, 0x8eb0, 0x8eb1, - 0x8eb3, 0x8eb4, 0x8eb5, 0x8eb6, 0x8eb7, 0x8eb8, 0x8eb9, 0x8ebb, - 0x8ebc, 0x8ebd, 0x8ebe, 0x8ebf, 0x8ec0, 0x8ec1, 0x8ec2, 0x003f, - 0x8ec3, 0x8ec4, 0x8ec5, 0x8ec6, 0x8ec7, 0x8ec8, 0x8ec9, 0x8eca, - 0x8ecb, 0x8ecc, 0x8ecd, 0x8ecf, 0x8ed0, 0x8ed1, 0x8ed2, 0x8ed3, - 0x8ed4, 0x8ed5, 0x8ed6, 0x8ed7, 0x8ed8, 0x8ed9, 0x8eda, 0x8edb, - 0x8edc, 0x8edd, 0x8ede, 0x8edf, 0x8ee0, 0x8ee1, 0x8ee2, 0x8ee3, - 0x8ee4, 0x580b, 0x580d, 0x57fd, 0x57ed, 0x5800, 0x581e, 0x5819, - 0x5844, 0x5820, 0x5865, 0x586c, 0x5881, 0x5889, 0x589a, 0x5880, - 0x99a8, 0x9f19, 0x61ff, 0x8279, 0x827d, 0x827f, 0x828f, 0x828a, - 0x82a8, 0x8284, 0x828e, 0x8291, 0x8297, 0x8299, 0x82ab, 0x82b8, - 0x82be, 0x82b0, 0x82c8, 0x82ca, 0x82e3, 0x8298, 0x82b7, 0x82ae, - 0x82cb, 0x82cc, 0x82c1, 0x82a9, 0x82b4, 0x82a1, 0x82aa, 0x829f, - 0x82c4, 0x82ce, 0x82a4, 0x82e1, 0x8309, 0x82f7, 0x82e4, 0x830f, - 0x8307, 0x82dc, 0x82f4, 0x82d2, 0x82d8, 0x830c, 0x82fb, 0x82d3, - 0x8311, 0x831a, 0x8306, 0x8314, 0x8315, 0x82e0, 0x82d5, 0x831c, - 0x8351, 0x835b, 0x835c, 0x8308, 0x8392, 0x833c, 0x8334, 0x8331, - 0x839b, 0x835e, 0x832f, 0x834f, 0x8347, 0x8343, 0x835f, 0x8340, - 0x8317, 0x8360, 0x832d, 0x833a, 0x8333, 0x8366, 0x8365, 0x003f, - /* lead byte dd */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8ee5, 0x8ee6, 0x8ee7, 0x8ee8, 0x8ee9, 0x8eea, 0x8eeb, 0x8eec, - 0x8eed, 0x8eee, 0x8eef, 0x8ef0, 0x8ef1, 0x8ef2, 0x8ef3, 0x8ef4, - 0x8ef5, 0x8ef6, 0x8ef7, 0x8ef8, 0x8ef9, 0x8efa, 0x8efb, 0x8efc, - 0x8efd, 0x8efe, 0x8eff, 0x8f00, 0x8f01, 0x8f02, 0x8f03, 0x8f04, - 0x8f05, 0x8f06, 0x8f07, 0x8f08, 0x8f09, 0x8f0a, 0x8f0b, 0x8f0c, - 0x8f0d, 0x8f0e, 0x8f0f, 0x8f10, 0x8f11, 0x8f12, 0x8f13, 0x8f14, - 0x8f15, 0x8f16, 0x8f17, 0x8f18, 0x8f19, 0x8f1a, 0x8f1b, 0x8f1c, - 0x8f1d, 0x8f1e, 0x8f1f, 0x8f20, 0x8f21, 0x8f22, 0x8f23, 0x003f, - 0x8f24, 0x8f25, 0x8f26, 0x8f27, 0x8f28, 0x8f29, 0x8f2a, 0x8f2b, - 0x8f2c, 0x8f2d, 0x8f2e, 0x8f2f, 0x8f30, 0x8f31, 0x8f32, 0x8f33, - 0x8f34, 0x8f35, 0x8f36, 0x8f37, 0x8f38, 0x8f39, 0x8f3a, 0x8f3b, - 0x8f3c, 0x8f3d, 0x8f3e, 0x8f3f, 0x8f40, 0x8f41, 0x8f42, 0x8f43, - 0x8f44, 0x8368, 0x831b, 0x8369, 0x836c, 0x836a, 0x836d, 0x836e, - 0x83b0, 0x8378, 0x83b3, 0x83b4, 0x83a0, 0x83aa, 0x8393, 0x839c, - 0x8385, 0x837c, 0x83b6, 0x83a9, 0x837d, 0x83b8, 0x837b, 0x8398, - 0x839e, 0x83a8, 0x83ba, 0x83bc, 0x83c1, 0x8401, 0x83e5, 0x83d8, - 0x5807, 0x8418, 0x840b, 0x83dd, 0x83fd, 0x83d6, 0x841c, 0x8438, - 0x8411, 0x8406, 0x83d4, 0x83df, 0x840f, 0x8403, 0x83f8, 0x83f9, - 0x83ea, 0x83c5, 0x83c0, 0x8426, 0x83f0, 0x83e1, 0x845c, 0x8451, - 0x845a, 0x8459, 0x8473, 0x8487, 0x8488, 0x847a, 0x8489, 0x8478, - 0x843c, 0x8446, 0x8469, 0x8476, 0x848c, 0x848e, 0x8431, 0x846d, - 0x84c1, 0x84cd, 0x84d0, 0x84e6, 0x84bd, 0x84d3, 0x84ca, 0x84bf, - 0x84ba, 0x84e0, 0x84a1, 0x84b9, 0x84b4, 0x8497, 0x84e5, 0x84e3, - 0x850c, 0x750d, 0x8538, 0x84f0, 0x8539, 0x851f, 0x853a, 0x003f, - /* lead byte de */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8f45, 0x8f46, 0x8f47, 0x8f48, 0x8f49, 0x8f4a, 0x8f4b, 0x8f4c, - 0x8f4d, 0x8f4e, 0x8f4f, 0x8f50, 0x8f51, 0x8f52, 0x8f53, 0x8f54, - 0x8f55, 0x8f56, 0x8f57, 0x8f58, 0x8f59, 0x8f5a, 0x8f5b, 0x8f5c, - 0x8f5d, 0x8f5e, 0x8f5f, 0x8f60, 0x8f61, 0x8f62, 0x8f63, 0x8f64, - 0x8f65, 0x8f6a, 0x8f80, 0x8f8c, 0x8f92, 0x8f9d, 0x8fa0, 0x8fa1, - 0x8fa2, 0x8fa4, 0x8fa5, 0x8fa6, 0x8fa7, 0x8faa, 0x8fac, 0x8fad, - 0x8fae, 0x8faf, 0x8fb2, 0x8fb3, 0x8fb4, 0x8fb5, 0x8fb7, 0x8fb8, - 0x8fba, 0x8fbb, 0x8fbc, 0x8fbf, 0x8fc0, 0x8fc3, 0x8fc6, 0x003f, - 0x8fc9, 0x8fca, 0x8fcb, 0x8fcc, 0x8fcd, 0x8fcf, 0x8fd2, 0x8fd6, - 0x8fd7, 0x8fda, 0x8fe0, 0x8fe1, 0x8fe3, 0x8fe7, 0x8fec, 0x8fef, - 0x8ff1, 0x8ff2, 0x8ff4, 0x8ff5, 0x8ff6, 0x8ffa, 0x8ffb, 0x8ffc, - 0x8ffe, 0x8fff, 0x9007, 0x9008, 0x900c, 0x900e, 0x9013, 0x9015, - 0x9018, 0x8556, 0x853b, 0x84ff, 0x84fc, 0x8559, 0x8548, 0x8568, - 0x8564, 0x855e, 0x857a, 0x77a2, 0x8543, 0x8572, 0x857b, 0x85a4, - 0x85a8, 0x8587, 0x858f, 0x8579, 0x85ae, 0x859c, 0x8585, 0x85b9, - 0x85b7, 0x85b0, 0x85d3, 0x85c1, 0x85dc, 0x85ff, 0x8627, 0x8605, - 0x8629, 0x8616, 0x863c, 0x5efe, 0x5f08, 0x593c, 0x5941, 0x8037, - 0x5955, 0x595a, 0x5958, 0x530f, 0x5c22, 0x5c25, 0x5c2c, 0x5c34, - 0x624c, 0x626a, 0x629f, 0x62bb, 0x62ca, 0x62da, 0x62d7, 0x62ee, - 0x6322, 0x62f6, 0x6339, 0x634b, 0x6343, 0x63ad, 0x63f6, 0x6371, - 0x637a, 0x638e, 0x63b4, 0x636d, 0x63ac, 0x638a, 0x6369, 0x63ae, - 0x63bc, 0x63f2, 0x63f8, 0x63e0, 0x63ff, 0x63c4, 0x63de, 0x63ce, - 0x6452, 0x63c6, 0x63be, 0x6445, 0x6441, 0x640b, 0x641b, 0x6420, - 0x640c, 0x6426, 0x6421, 0x645e, 0x6484, 0x646d, 0x6496, 0x003f, - /* lead byte df */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9019, 0x901c, 0x9023, 0x9024, 0x9025, 0x9027, 0x9028, 0x9029, - 0x902a, 0x902b, 0x902c, 0x9030, 0x9031, 0x9032, 0x9033, 0x9034, - 0x9037, 0x9039, 0x903a, 0x903d, 0x903f, 0x9040, 0x9043, 0x9045, - 0x9046, 0x9048, 0x9049, 0x904a, 0x904b, 0x904c, 0x904e, 0x9054, - 0x9055, 0x9056, 0x9059, 0x905a, 0x905c, 0x905d, 0x905e, 0x905f, - 0x9060, 0x9061, 0x9064, 0x9066, 0x9067, 0x9069, 0x906a, 0x906b, - 0x906c, 0x906f, 0x9070, 0x9071, 0x9072, 0x9073, 0x9076, 0x9077, - 0x9078, 0x9079, 0x907a, 0x907b, 0x907c, 0x907e, 0x9081, 0x003f, - 0x9084, 0x9085, 0x9086, 0x9087, 0x9089, 0x908a, 0x908c, 0x908d, - 0x908e, 0x908f, 0x9090, 0x9092, 0x9094, 0x9096, 0x9098, 0x909a, - 0x909c, 0x909e, 0x909f, 0x90a0, 0x90a4, 0x90a5, 0x90a7, 0x90a8, - 0x90a9, 0x90ab, 0x90ad, 0x90b2, 0x90b7, 0x90bc, 0x90bd, 0x90bf, - 0x90c0, 0x647a, 0x64b7, 0x64b8, 0x6499, 0x64ba, 0x64c0, 0x64d0, - 0x64d7, 0x64e4, 0x64e2, 0x6509, 0x6525, 0x652e, 0x5f0b, 0x5fd2, - 0x7519, 0x5f11, 0x535f, 0x53f1, 0x53fd, 0x53e9, 0x53e8, 0x53fb, - 0x5412, 0x5416, 0x5406, 0x544b, 0x5452, 0x5453, 0x5454, 0x5456, - 0x5443, 0x5421, 0x5457, 0x5459, 0x5423, 0x5432, 0x5482, 0x5494, - 0x5477, 0x5471, 0x5464, 0x549a, 0x549b, 0x5484, 0x5476, 0x5466, - 0x549d, 0x54d0, 0x54ad, 0x54c2, 0x54b4, 0x54d2, 0x54a7, 0x54a6, - 0x54d3, 0x54d4, 0x5472, 0x54a3, 0x54d5, 0x54bb, 0x54bf, 0x54cc, - 0x54d9, 0x54da, 0x54dc, 0x54a9, 0x54aa, 0x54a4, 0x54dd, 0x54cf, - 0x54de, 0x551b, 0x54e7, 0x5520, 0x54fd, 0x5514, 0x54f3, 0x5522, - 0x5523, 0x550f, 0x5511, 0x5527, 0x552a, 0x5567, 0x558f, 0x55b5, - 0x5549, 0x556d, 0x5541, 0x5555, 0x553f, 0x5550, 0x553c, 0x003f, - /* lead byte e0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x90c2, 0x90c3, 0x90c6, 0x90c8, 0x90c9, 0x90cb, 0x90cc, 0x90cd, - 0x90d2, 0x90d4, 0x90d5, 0x90d6, 0x90d8, 0x90d9, 0x90da, 0x90de, - 0x90df, 0x90e0, 0x90e3, 0x90e4, 0x90e5, 0x90e9, 0x90ea, 0x90ec, - 0x90ee, 0x90f0, 0x90f1, 0x90f2, 0x90f3, 0x90f5, 0x90f6, 0x90f7, - 0x90f9, 0x90fa, 0x90fb, 0x90fc, 0x90ff, 0x9100, 0x9101, 0x9103, - 0x9105, 0x9106, 0x9107, 0x9108, 0x9109, 0x910a, 0x910b, 0x910c, - 0x910d, 0x910e, 0x910f, 0x9110, 0x9111, 0x9112, 0x9113, 0x9114, - 0x9115, 0x9116, 0x9117, 0x9118, 0x911a, 0x911b, 0x911c, 0x003f, - 0x911d, 0x911f, 0x9120, 0x9121, 0x9124, 0x9125, 0x9126, 0x9127, - 0x9128, 0x9129, 0x912a, 0x912b, 0x912c, 0x912d, 0x912e, 0x9130, - 0x9132, 0x9133, 0x9134, 0x9135, 0x9136, 0x9137, 0x9138, 0x913a, - 0x913b, 0x913c, 0x913d, 0x913e, 0x913f, 0x9140, 0x9141, 0x9142, - 0x9144, 0x5537, 0x5556, 0x5575, 0x5576, 0x5577, 0x5533, 0x5530, - 0x555c, 0x558b, 0x55d2, 0x5583, 0x55b1, 0x55b9, 0x5588, 0x5581, - 0x559f, 0x557e, 0x55d6, 0x5591, 0x557b, 0x55df, 0x55bd, 0x55be, - 0x5594, 0x5599, 0x55ea, 0x55f7, 0x55c9, 0x561f, 0x55d1, 0x55eb, - 0x55ec, 0x55d4, 0x55e6, 0x55dd, 0x55c4, 0x55ef, 0x55e5, 0x55f2, - 0x55f3, 0x55cc, 0x55cd, 0x55e8, 0x55f5, 0x55e4, 0x8f94, 0x561e, - 0x5608, 0x560c, 0x5601, 0x5624, 0x5623, 0x55fe, 0x5600, 0x5627, - 0x562d, 0x5658, 0x5639, 0x5657, 0x562c, 0x564d, 0x5662, 0x5659, - 0x565c, 0x564c, 0x5654, 0x5686, 0x5664, 0x5671, 0x566b, 0x567b, - 0x567c, 0x5685, 0x5693, 0x56af, 0x56d4, 0x56d7, 0x56dd, 0x56e1, - 0x56f5, 0x56eb, 0x56f9, 0x56ff, 0x5704, 0x570a, 0x5709, 0x571c, - 0x5e0f, 0x5e19, 0x5e14, 0x5e11, 0x5e31, 0x5e3b, 0x5e3c, 0x003f, - /* lead byte e1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9145, 0x9147, 0x9148, 0x9151, 0x9153, 0x9154, 0x9155, 0x9156, - 0x9158, 0x9159, 0x915b, 0x915c, 0x915f, 0x9160, 0x9166, 0x9167, - 0x9168, 0x916b, 0x916d, 0x9173, 0x917a, 0x917b, 0x917c, 0x9180, - 0x9181, 0x9182, 0x9183, 0x9184, 0x9186, 0x9188, 0x918a, 0x918e, - 0x918f, 0x9193, 0x9194, 0x9195, 0x9196, 0x9197, 0x9198, 0x9199, - 0x919c, 0x919d, 0x919e, 0x919f, 0x91a0, 0x91a1, 0x91a4, 0x91a5, - 0x91a6, 0x91a7, 0x91a8, 0x91a9, 0x91ab, 0x91ac, 0x91b0, 0x91b1, - 0x91b2, 0x91b3, 0x91b6, 0x91b7, 0x91b8, 0x91b9, 0x91bb, 0x003f, - 0x91bc, 0x91bd, 0x91be, 0x91bf, 0x91c0, 0x91c1, 0x91c2, 0x91c3, - 0x91c4, 0x91c5, 0x91c6, 0x91c8, 0x91cb, 0x91d0, 0x91d2, 0x91d3, - 0x91d4, 0x91d5, 0x91d6, 0x91d7, 0x91d8, 0x91d9, 0x91da, 0x91db, - 0x91dd, 0x91de, 0x91df, 0x91e0, 0x91e1, 0x91e2, 0x91e3, 0x91e4, - 0x91e5, 0x5e37, 0x5e44, 0x5e54, 0x5e5b, 0x5e5e, 0x5e61, 0x5c8c, - 0x5c7a, 0x5c8d, 0x5c90, 0x5c96, 0x5c88, 0x5c98, 0x5c99, 0x5c91, - 0x5c9a, 0x5c9c, 0x5cb5, 0x5ca2, 0x5cbd, 0x5cac, 0x5cab, 0x5cb1, - 0x5ca3, 0x5cc1, 0x5cb7, 0x5cc4, 0x5cd2, 0x5ce4, 0x5ccb, 0x5ce5, - 0x5d02, 0x5d03, 0x5d27, 0x5d26, 0x5d2e, 0x5d24, 0x5d1e, 0x5d06, - 0x5d1b, 0x5d58, 0x5d3e, 0x5d34, 0x5d3d, 0x5d6c, 0x5d5b, 0x5d6f, - 0x5d5d, 0x5d6b, 0x5d4b, 0x5d4a, 0x5d69, 0x5d74, 0x5d82, 0x5d99, - 0x5d9d, 0x8c73, 0x5db7, 0x5dc5, 0x5f73, 0x5f77, 0x5f82, 0x5f87, - 0x5f89, 0x5f8c, 0x5f95, 0x5f99, 0x5f9c, 0x5fa8, 0x5fad, 0x5fb5, - 0x5fbc, 0x8862, 0x5f61, 0x72ad, 0x72b0, 0x72b4, 0x72b7, 0x72b8, - 0x72c3, 0x72c1, 0x72ce, 0x72cd, 0x72d2, 0x72e8, 0x72ef, 0x72e9, - 0x72f2, 0x72f4, 0x72f7, 0x7301, 0x72f3, 0x7303, 0x72fa, 0x003f, - /* lead byte e2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x91e6, 0x91e7, 0x91e8, 0x91e9, 0x91ea, 0x91eb, 0x91ec, 0x91ed, - 0x91ee, 0x91ef, 0x91f0, 0x91f1, 0x91f2, 0x91f3, 0x91f4, 0x91f5, - 0x91f6, 0x91f7, 0x91f8, 0x91f9, 0x91fa, 0x91fb, 0x91fc, 0x91fd, - 0x91fe, 0x91ff, 0x9200, 0x9201, 0x9202, 0x9203, 0x9204, 0x9205, - 0x9206, 0x9207, 0x9208, 0x9209, 0x920a, 0x920b, 0x920c, 0x920d, - 0x920e, 0x920f, 0x9210, 0x9211, 0x9212, 0x9213, 0x9214, 0x9215, - 0x9216, 0x9217, 0x9218, 0x9219, 0x921a, 0x921b, 0x921c, 0x921d, - 0x921e, 0x921f, 0x9220, 0x9221, 0x9222, 0x9223, 0x9224, 0x003f, - 0x9225, 0x9226, 0x9227, 0x9228, 0x9229, 0x922a, 0x922b, 0x922c, - 0x922d, 0x922e, 0x922f, 0x9230, 0x9231, 0x9232, 0x9233, 0x9234, - 0x9235, 0x9236, 0x9237, 0x9238, 0x9239, 0x923a, 0x923b, 0x923c, - 0x923d, 0x923e, 0x923f, 0x9240, 0x9241, 0x9242, 0x9243, 0x9244, - 0x9245, 0x72fb, 0x7317, 0x7313, 0x7321, 0x730a, 0x731e, 0x731d, - 0x7315, 0x7322, 0x7339, 0x7325, 0x732c, 0x7338, 0x7331, 0x7350, - 0x734d, 0x7357, 0x7360, 0x736c, 0x736f, 0x737e, 0x821b, 0x5925, - 0x98e7, 0x5924, 0x5902, 0x9963, 0x9967, 0x9968, 0x9969, 0x996a, - 0x996b, 0x996c, 0x9974, 0x9977, 0x997d, 0x9980, 0x9984, 0x9987, - 0x998a, 0x998d, 0x9990, 0x9991, 0x9993, 0x9994, 0x9995, 0x5e80, - 0x5e91, 0x5e8b, 0x5e96, 0x5ea5, 0x5ea0, 0x5eb9, 0x5eb5, 0x5ebe, - 0x5eb3, 0x8d53, 0x5ed2, 0x5ed1, 0x5edb, 0x5ee8, 0x5eea, 0x81ba, - 0x5fc4, 0x5fc9, 0x5fd6, 0x5fcf, 0x6003, 0x5fee, 0x6004, 0x5fe1, - 0x5fe4, 0x5ffe, 0x6005, 0x6006, 0x5fea, 0x5fed, 0x5ff8, 0x6019, - 0x6035, 0x6026, 0x601b, 0x600f, 0x600d, 0x6029, 0x602b, 0x600a, - 0x603f, 0x6021, 0x6078, 0x6079, 0x607b, 0x607a, 0x6042, 0x003f, - /* lead byte e3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9246, 0x9247, 0x9248, 0x9249, 0x924a, 0x924b, 0x924c, 0x924d, - 0x924e, 0x924f, 0x9250, 0x9251, 0x9252, 0x9253, 0x9254, 0x9255, - 0x9256, 0x9257, 0x9258, 0x9259, 0x925a, 0x925b, 0x925c, 0x925d, - 0x925e, 0x925f, 0x9260, 0x9261, 0x9262, 0x9263, 0x9264, 0x9265, - 0x9266, 0x9267, 0x9268, 0x9269, 0x926a, 0x926b, 0x926c, 0x926d, - 0x926e, 0x926f, 0x9270, 0x9271, 0x9272, 0x9273, 0x9275, 0x9276, - 0x9277, 0x9278, 0x9279, 0x927a, 0x927b, 0x927c, 0x927d, 0x927e, - 0x927f, 0x9280, 0x9281, 0x9282, 0x9283, 0x9284, 0x9285, 0x003f, - 0x9286, 0x9287, 0x9288, 0x9289, 0x928a, 0x928b, 0x928c, 0x928d, - 0x928f, 0x9290, 0x9291, 0x9292, 0x9293, 0x9294, 0x9295, 0x9296, - 0x9297, 0x9298, 0x9299, 0x929a, 0x929b, 0x929c, 0x929d, 0x929e, - 0x929f, 0x92a0, 0x92a1, 0x92a2, 0x92a3, 0x92a4, 0x92a5, 0x92a6, - 0x92a7, 0x606a, 0x607d, 0x6096, 0x609a, 0x60ad, 0x609d, 0x6083, - 0x6092, 0x608c, 0x609b, 0x60ec, 0x60bb, 0x60b1, 0x60dd, 0x60d8, - 0x60c6, 0x60da, 0x60b4, 0x6120, 0x6126, 0x6115, 0x6123, 0x60f4, - 0x6100, 0x610e, 0x612b, 0x614a, 0x6175, 0x61ac, 0x6194, 0x61a7, - 0x61b7, 0x61d4, 0x61f5, 0x5fdd, 0x96b3, 0x95e9, 0x95eb, 0x95f1, - 0x95f3, 0x95f5, 0x95f6, 0x95fc, 0x95fe, 0x9603, 0x9604, 0x9606, - 0x9608, 0x960a, 0x960b, 0x960c, 0x960d, 0x960f, 0x9612, 0x9615, - 0x9616, 0x9617, 0x9619, 0x961a, 0x4e2c, 0x723f, 0x6215, 0x6c35, - 0x6c54, 0x6c5c, 0x6c4a, 0x6ca3, 0x6c85, 0x6c90, 0x6c94, 0x6c8c, - 0x6c68, 0x6c69, 0x6c74, 0x6c76, 0x6c86, 0x6ca9, 0x6cd0, 0x6cd4, - 0x6cad, 0x6cf7, 0x6cf8, 0x6cf1, 0x6cd7, 0x6cb2, 0x6ce0, 0x6cd6, - 0x6cfa, 0x6ceb, 0x6cee, 0x6cb1, 0x6cd3, 0x6cef, 0x6cfe, 0x003f, - /* lead byte e4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x92a8, 0x92a9, 0x92aa, 0x92ab, 0x92ac, 0x92ad, 0x92af, 0x92b0, - 0x92b1, 0x92b2, 0x92b3, 0x92b4, 0x92b5, 0x92b6, 0x92b7, 0x92b8, - 0x92b9, 0x92ba, 0x92bb, 0x92bc, 0x92bd, 0x92be, 0x92bf, 0x92c0, - 0x92c1, 0x92c2, 0x92c3, 0x92c4, 0x92c5, 0x92c6, 0x92c7, 0x92c9, - 0x92ca, 0x92cb, 0x92cc, 0x92cd, 0x92ce, 0x92cf, 0x92d0, 0x92d1, - 0x92d2, 0x92d3, 0x92d4, 0x92d5, 0x92d6, 0x92d7, 0x92d8, 0x92d9, - 0x92da, 0x92db, 0x92dc, 0x92dd, 0x92de, 0x92df, 0x92e0, 0x92e1, - 0x92e2, 0x92e3, 0x92e4, 0x92e5, 0x92e6, 0x92e7, 0x92e8, 0x003f, - 0x92e9, 0x92ea, 0x92eb, 0x92ec, 0x92ed, 0x92ee, 0x92ef, 0x92f0, - 0x92f1, 0x92f2, 0x92f3, 0x92f4, 0x92f5, 0x92f6, 0x92f7, 0x92f8, - 0x92f9, 0x92fa, 0x92fb, 0x92fc, 0x92fd, 0x92fe, 0x92ff, 0x9300, - 0x9301, 0x9302, 0x9303, 0x9304, 0x9305, 0x9306, 0x9307, 0x9308, - 0x9309, 0x6d39, 0x6d27, 0x6d0c, 0x6d43, 0x6d48, 0x6d07, 0x6d04, - 0x6d19, 0x6d0e, 0x6d2b, 0x6d4d, 0x6d2e, 0x6d35, 0x6d1a, 0x6d4f, - 0x6d52, 0x6d54, 0x6d33, 0x6d91, 0x6d6f, 0x6d9e, 0x6da0, 0x6d5e, - 0x6d93, 0x6d94, 0x6d5c, 0x6d60, 0x6d7c, 0x6d63, 0x6e1a, 0x6dc7, - 0x6dc5, 0x6dde, 0x6e0e, 0x6dbf, 0x6de0, 0x6e11, 0x6de6, 0x6ddd, - 0x6dd9, 0x6e16, 0x6dab, 0x6e0c, 0x6dae, 0x6e2b, 0x6e6e, 0x6e4e, - 0x6e6b, 0x6eb2, 0x6e5f, 0x6e86, 0x6e53, 0x6e54, 0x6e32, 0x6e25, - 0x6e44, 0x6edf, 0x6eb1, 0x6e98, 0x6ee0, 0x6f2d, 0x6ee2, 0x6ea5, - 0x6ea7, 0x6ebd, 0x6ebb, 0x6eb7, 0x6ed7, 0x6eb4, 0x6ecf, 0x6e8f, - 0x6ec2, 0x6e9f, 0x6f62, 0x6f46, 0x6f47, 0x6f24, 0x6f15, 0x6ef9, - 0x6f2f, 0x6f36, 0x6f4b, 0x6f74, 0x6f2a, 0x6f09, 0x6f29, 0x6f89, - 0x6f8d, 0x6f8c, 0x6f78, 0x6f72, 0x6f7c, 0x6f7a, 0x6fd1, 0x003f, - /* lead byte e5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x930a, 0x930b, 0x930c, 0x930d, 0x930e, 0x930f, 0x9310, 0x9311, - 0x9312, 0x9313, 0x9314, 0x9315, 0x9316, 0x9317, 0x9318, 0x9319, - 0x931a, 0x931b, 0x931c, 0x931d, 0x931e, 0x931f, 0x9320, 0x9321, - 0x9322, 0x9323, 0x9324, 0x9325, 0x9326, 0x9327, 0x9328, 0x9329, - 0x932a, 0x932b, 0x932c, 0x932d, 0x932e, 0x932f, 0x9330, 0x9331, - 0x9332, 0x9333, 0x9334, 0x9335, 0x9336, 0x9337, 0x9338, 0x9339, - 0x933a, 0x933b, 0x933c, 0x933d, 0x933f, 0x9340, 0x9341, 0x9342, - 0x9343, 0x9344, 0x9345, 0x9346, 0x9347, 0x9348, 0x9349, 0x003f, - 0x934a, 0x934b, 0x934c, 0x934d, 0x934e, 0x934f, 0x9350, 0x9351, - 0x9352, 0x9353, 0x9354, 0x9355, 0x9356, 0x9357, 0x9358, 0x9359, - 0x935a, 0x935b, 0x935c, 0x935d, 0x935e, 0x935f, 0x9360, 0x9361, - 0x9362, 0x9363, 0x9364, 0x9365, 0x9366, 0x9367, 0x9368, 0x9369, - 0x936b, 0x6fc9, 0x6fa7, 0x6fb9, 0x6fb6, 0x6fc2, 0x6fe1, 0x6fee, - 0x6fde, 0x6fe0, 0x6fef, 0x701a, 0x7023, 0x701b, 0x7039, 0x7035, - 0x704f, 0x705e, 0x5b80, 0x5b84, 0x5b95, 0x5b93, 0x5ba5, 0x5bb8, - 0x752f, 0x9a9e, 0x6434, 0x5be4, 0x5bee, 0x8930, 0x5bf0, 0x8e47, - 0x8b07, 0x8fb6, 0x8fd3, 0x8fd5, 0x8fe5, 0x8fee, 0x8fe4, 0x8fe9, - 0x8fe6, 0x8ff3, 0x8fe8, 0x9005, 0x9004, 0x900b, 0x9026, 0x9011, - 0x900d, 0x9016, 0x9021, 0x9035, 0x9036, 0x902d, 0x902f, 0x9044, - 0x9051, 0x9052, 0x9050, 0x9068, 0x9058, 0x9062, 0x905b, 0x66b9, - 0x9074, 0x907d, 0x9082, 0x9088, 0x9083, 0x908b, 0x5f50, 0x5f57, - 0x5f56, 0x5f58, 0x5c3b, 0x54ab, 0x5c50, 0x5c59, 0x5b71, 0x5c63, - 0x5c66, 0x7fbc, 0x5f2a, 0x5f29, 0x5f2d, 0x8274, 0x5f3c, 0x9b3b, - 0x5c6e, 0x5981, 0x5983, 0x598d, 0x59a9, 0x59aa, 0x59a3, 0x003f, - /* lead byte e6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x936c, 0x936d, 0x936e, 0x936f, 0x9370, 0x9371, 0x9372, 0x9373, - 0x9374, 0x9375, 0x9376, 0x9377, 0x9378, 0x9379, 0x937a, 0x937b, - 0x937c, 0x937d, 0x937e, 0x937f, 0x9380, 0x9381, 0x9382, 0x9383, - 0x9384, 0x9385, 0x9386, 0x9387, 0x9388, 0x9389, 0x938a, 0x938b, - 0x938c, 0x938d, 0x938e, 0x9390, 0x9391, 0x9392, 0x9393, 0x9394, - 0x9395, 0x9396, 0x9397, 0x9398, 0x9399, 0x939a, 0x939b, 0x939c, - 0x939d, 0x939e, 0x939f, 0x93a0, 0x93a1, 0x93a2, 0x93a3, 0x93a4, - 0x93a5, 0x93a6, 0x93a7, 0x93a8, 0x93a9, 0x93aa, 0x93ab, 0x003f, - 0x93ac, 0x93ad, 0x93ae, 0x93af, 0x93b0, 0x93b1, 0x93b2, 0x93b3, - 0x93b4, 0x93b5, 0x93b6, 0x93b7, 0x93b8, 0x93b9, 0x93ba, 0x93bb, - 0x93bc, 0x93bd, 0x93be, 0x93bf, 0x93c0, 0x93c1, 0x93c2, 0x93c3, - 0x93c4, 0x93c5, 0x93c6, 0x93c7, 0x93c8, 0x93c9, 0x93cb, 0x93cc, - 0x93cd, 0x5997, 0x59ca, 0x59ab, 0x599e, 0x59a4, 0x59d2, 0x59b2, - 0x59af, 0x59d7, 0x59be, 0x5a05, 0x5a06, 0x59dd, 0x5a08, 0x59e3, - 0x59d8, 0x59f9, 0x5a0c, 0x5a09, 0x5a32, 0x5a34, 0x5a11, 0x5a23, - 0x5a13, 0x5a40, 0x5a67, 0x5a4a, 0x5a55, 0x5a3c, 0x5a62, 0x5a75, - 0x80ec, 0x5aaa, 0x5a9b, 0x5a77, 0x5a7a, 0x5abe, 0x5aeb, 0x5ab2, - 0x5ad2, 0x5ad4, 0x5ab8, 0x5ae0, 0x5ae3, 0x5af1, 0x5ad6, 0x5ae6, - 0x5ad8, 0x5adc, 0x5b09, 0x5b17, 0x5b16, 0x5b32, 0x5b37, 0x5b40, - 0x5c15, 0x5c1c, 0x5b5a, 0x5b65, 0x5b73, 0x5b51, 0x5b53, 0x5b62, - 0x9a75, 0x9a77, 0x9a78, 0x9a7a, 0x9a7f, 0x9a7d, 0x9a80, 0x9a81, - 0x9a85, 0x9a88, 0x9a8a, 0x9a90, 0x9a92, 0x9a93, 0x9a96, 0x9a98, - 0x9a9b, 0x9a9c, 0x9a9d, 0x9a9f, 0x9aa0, 0x9aa2, 0x9aa3, 0x9aa5, - 0x9aa7, 0x7e9f, 0x7ea1, 0x7ea3, 0x7ea5, 0x7ea8, 0x7ea9, 0x003f, - /* lead byte e7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x93ce, 0x93cf, 0x93d0, 0x93d1, 0x93d2, 0x93d3, 0x93d4, 0x93d5, - 0x93d7, 0x93d8, 0x93d9, 0x93da, 0x93db, 0x93dc, 0x93dd, 0x93de, - 0x93df, 0x93e0, 0x93e1, 0x93e2, 0x93e3, 0x93e4, 0x93e5, 0x93e6, - 0x93e7, 0x93e8, 0x93e9, 0x93ea, 0x93eb, 0x93ec, 0x93ed, 0x93ee, - 0x93ef, 0x93f0, 0x93f1, 0x93f2, 0x93f3, 0x93f4, 0x93f5, 0x93f6, - 0x93f7, 0x93f8, 0x93f9, 0x93fa, 0x93fb, 0x93fc, 0x93fd, 0x93fe, - 0x93ff, 0x9400, 0x9401, 0x9402, 0x9403, 0x9404, 0x9405, 0x9406, - 0x9407, 0x9408, 0x9409, 0x940a, 0x940b, 0x940c, 0x940d, 0x003f, - 0x940e, 0x940f, 0x9410, 0x9411, 0x9412, 0x9413, 0x9414, 0x9415, - 0x9416, 0x9417, 0x9418, 0x9419, 0x941a, 0x941b, 0x941c, 0x941d, - 0x941e, 0x941f, 0x9420, 0x9421, 0x9422, 0x9423, 0x9424, 0x9425, - 0x9426, 0x9427, 0x9428, 0x9429, 0x942a, 0x942b, 0x942c, 0x942d, - 0x942e, 0x7ead, 0x7eb0, 0x7ebe, 0x7ec0, 0x7ec1, 0x7ec2, 0x7ec9, - 0x7ecb, 0x7ecc, 0x7ed0, 0x7ed4, 0x7ed7, 0x7edb, 0x7ee0, 0x7ee1, - 0x7ee8, 0x7eeb, 0x7eee, 0x7eef, 0x7ef1, 0x7ef2, 0x7f0d, 0x7ef6, - 0x7efa, 0x7efb, 0x7efe, 0x7f01, 0x7f02, 0x7f03, 0x7f07, 0x7f08, - 0x7f0b, 0x7f0c, 0x7f0f, 0x7f11, 0x7f12, 0x7f17, 0x7f19, 0x7f1c, - 0x7f1b, 0x7f1f, 0x7f21, 0x7f22, 0x7f23, 0x7f24, 0x7f25, 0x7f26, - 0x7f27, 0x7f2a, 0x7f2b, 0x7f2c, 0x7f2d, 0x7f2f, 0x7f30, 0x7f31, - 0x7f32, 0x7f33, 0x7f35, 0x5e7a, 0x757f, 0x5ddb, 0x753e, 0x9095, - 0x738e, 0x7391, 0x73ae, 0x73a2, 0x739f, 0x73cf, 0x73c2, 0x73d1, - 0x73b7, 0x73b3, 0x73c0, 0x73c9, 0x73c8, 0x73e5, 0x73d9, 0x987c, - 0x740a, 0x73e9, 0x73e7, 0x73de, 0x73ba, 0x73f2, 0x740f, 0x742a, - 0x745b, 0x7426, 0x7425, 0x7428, 0x7430, 0x742e, 0x742c, 0x003f, - /* lead byte e8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x942f, 0x9430, 0x9431, 0x9432, 0x9433, 0x9434, 0x9435, 0x9436, - 0x9437, 0x9438, 0x9439, 0x943a, 0x943b, 0x943c, 0x943d, 0x943f, - 0x9440, 0x9441, 0x9442, 0x9443, 0x9444, 0x9445, 0x9446, 0x9447, - 0x9448, 0x9449, 0x944a, 0x944b, 0x944c, 0x944d, 0x944e, 0x944f, - 0x9450, 0x9451, 0x9452, 0x9453, 0x9454, 0x9455, 0x9456, 0x9457, - 0x9458, 0x9459, 0x945a, 0x945b, 0x945c, 0x945d, 0x945e, 0x945f, - 0x9460, 0x9461, 0x9462, 0x9463, 0x9464, 0x9465, 0x9466, 0x9467, - 0x9468, 0x9469, 0x946a, 0x946c, 0x946d, 0x946e, 0x946f, 0x003f, - 0x9470, 0x9471, 0x9472, 0x9473, 0x9474, 0x9475, 0x9476, 0x9477, - 0x9478, 0x9479, 0x947a, 0x947b, 0x947c, 0x947d, 0x947e, 0x947f, - 0x9480, 0x9481, 0x9482, 0x9483, 0x9484, 0x9491, 0x9496, 0x9498, - 0x94c7, 0x94cf, 0x94d3, 0x94d4, 0x94da, 0x94e6, 0x94fb, 0x951c, - 0x9520, 0x741b, 0x741a, 0x7441, 0x745c, 0x7457, 0x7455, 0x7459, - 0x7477, 0x746d, 0x747e, 0x749c, 0x748e, 0x7480, 0x7481, 0x7487, - 0x748b, 0x749e, 0x74a8, 0x74a9, 0x7490, 0x74a7, 0x74d2, 0x74ba, - 0x97ea, 0x97eb, 0x97ec, 0x674c, 0x6753, 0x675e, 0x6748, 0x6769, - 0x67a5, 0x6787, 0x676a, 0x6773, 0x6798, 0x67a7, 0x6775, 0x67a8, - 0x679e, 0x67ad, 0x678b, 0x6777, 0x677c, 0x67f0, 0x6809, 0x67d8, - 0x680a, 0x67e9, 0x67b0, 0x680c, 0x67d9, 0x67b5, 0x67da, 0x67b3, - 0x67dd, 0x6800, 0x67c3, 0x67b8, 0x67e2, 0x680e, 0x67c1, 0x67fd, - 0x6832, 0x6833, 0x6860, 0x6861, 0x684e, 0x6862, 0x6844, 0x6864, - 0x6883, 0x681d, 0x6855, 0x6866, 0x6841, 0x6867, 0x6840, 0x683e, - 0x684a, 0x6849, 0x6829, 0x68b5, 0x688f, 0x6874, 0x6877, 0x6893, - 0x686b, 0x68c2, 0x696e, 0x68fc, 0x691f, 0x6920, 0x68f9, 0x003f, - /* lead byte e9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9527, 0x9533, 0x953d, 0x9543, 0x9548, 0x954b, 0x9555, 0x955a, - 0x9560, 0x956e, 0x9574, 0x9575, 0x9577, 0x9578, 0x9579, 0x957a, - 0x957b, 0x957c, 0x957d, 0x957e, 0x9580, 0x9581, 0x9582, 0x9583, - 0x9584, 0x9585, 0x9586, 0x9587, 0x9588, 0x9589, 0x958a, 0x958b, - 0x958c, 0x958d, 0x958e, 0x958f, 0x9590, 0x9591, 0x9592, 0x9593, - 0x9594, 0x9595, 0x9596, 0x9597, 0x9598, 0x9599, 0x959a, 0x959b, - 0x959c, 0x959d, 0x959e, 0x959f, 0x95a0, 0x95a1, 0x95a2, 0x95a3, - 0x95a4, 0x95a5, 0x95a6, 0x95a7, 0x95a8, 0x95a9, 0x95aa, 0x003f, - 0x95ab, 0x95ac, 0x95ad, 0x95ae, 0x95af, 0x95b0, 0x95b1, 0x95b2, - 0x95b3, 0x95b4, 0x95b5, 0x95b6, 0x95b7, 0x95b8, 0x95b9, 0x95ba, - 0x95bb, 0x95bc, 0x95bd, 0x95be, 0x95bf, 0x95c0, 0x95c1, 0x95c2, - 0x95c3, 0x95c4, 0x95c5, 0x95c6, 0x95c7, 0x95c8, 0x95c9, 0x95ca, - 0x95cb, 0x6924, 0x68f0, 0x690b, 0x6901, 0x6957, 0x68e3, 0x6910, - 0x6971, 0x6939, 0x6960, 0x6942, 0x695d, 0x6984, 0x696b, 0x6980, - 0x6998, 0x6978, 0x6934, 0x69cc, 0x6987, 0x6988, 0x69ce, 0x6989, - 0x6966, 0x6963, 0x6979, 0x699b, 0x69a7, 0x69bb, 0x69ab, 0x69ad, - 0x69d4, 0x69b1, 0x69c1, 0x69ca, 0x69df, 0x6995, 0x69e0, 0x698d, - 0x69ff, 0x6a2f, 0x69ed, 0x6a17, 0x6a18, 0x6a65, 0x69f2, 0x6a44, - 0x6a3e, 0x6aa0, 0x6a50, 0x6a5b, 0x6a35, 0x6a8e, 0x6a79, 0x6a3d, - 0x6a28, 0x6a58, 0x6a7c, 0x6a91, 0x6a90, 0x6aa9, 0x6a97, 0x6aab, - 0x7337, 0x7352, 0x6b81, 0x6b82, 0x6b87, 0x6b84, 0x6b92, 0x6b93, - 0x6b8d, 0x6b9a, 0x6b9b, 0x6ba1, 0x6baa, 0x8f6b, 0x8f6d, 0x8f71, - 0x8f72, 0x8f73, 0x8f75, 0x8f76, 0x8f78, 0x8f77, 0x8f79, 0x8f7a, - 0x8f7c, 0x8f7e, 0x8f81, 0x8f82, 0x8f84, 0x8f87, 0x8f8b, 0x003f, - /* lead byte ea */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x95cc, 0x95cd, 0x95ce, 0x95cf, 0x95d0, 0x95d1, 0x95d2, 0x95d3, - 0x95d4, 0x95d5, 0x95d6, 0x95d7, 0x95d8, 0x95d9, 0x95da, 0x95db, - 0x95dc, 0x95dd, 0x95de, 0x95df, 0x95e0, 0x95e1, 0x95e2, 0x95e3, - 0x95e4, 0x95e5, 0x95e6, 0x95e7, 0x95ec, 0x95ff, 0x9607, 0x9613, - 0x9618, 0x961b, 0x961e, 0x9620, 0x9623, 0x9624, 0x9625, 0x9626, - 0x9627, 0x9628, 0x9629, 0x962b, 0x962c, 0x962d, 0x962f, 0x9630, - 0x9637, 0x9638, 0x9639, 0x963a, 0x963e, 0x9641, 0x9643, 0x964a, - 0x964e, 0x964f, 0x9651, 0x9652, 0x9653, 0x9656, 0x9657, 0x003f, - 0x9658, 0x9659, 0x965a, 0x965c, 0x965d, 0x965e, 0x9660, 0x9663, - 0x9665, 0x9666, 0x966b, 0x966d, 0x966e, 0x966f, 0x9670, 0x9671, - 0x9673, 0x9678, 0x9679, 0x967a, 0x967b, 0x967c, 0x967d, 0x967e, - 0x967f, 0x9680, 0x9681, 0x9682, 0x9683, 0x9684, 0x9687, 0x9689, - 0x968a, 0x8f8d, 0x8f8e, 0x8f8f, 0x8f98, 0x8f9a, 0x8ece, 0x620b, - 0x6217, 0x621b, 0x621f, 0x6222, 0x6221, 0x6225, 0x6224, 0x622c, - 0x81e7, 0x74ef, 0x74f4, 0x74ff, 0x750f, 0x7511, 0x7513, 0x6534, - 0x65ee, 0x65ef, 0x65f0, 0x660a, 0x6619, 0x6772, 0x6603, 0x6615, - 0x6600, 0x7085, 0x66f7, 0x661d, 0x6634, 0x6631, 0x6636, 0x6635, - 0x8006, 0x665f, 0x6654, 0x6641, 0x664f, 0x6656, 0x6661, 0x6657, - 0x6677, 0x6684, 0x668c, 0x66a7, 0x669d, 0x66be, 0x66db, 0x66dc, - 0x66e6, 0x66e9, 0x8d32, 0x8d33, 0x8d36, 0x8d3b, 0x8d3d, 0x8d40, - 0x8d45, 0x8d46, 0x8d48, 0x8d49, 0x8d47, 0x8d4d, 0x8d55, 0x8d59, - 0x89c7, 0x89ca, 0x89cb, 0x89cc, 0x89ce, 0x89cf, 0x89d0, 0x89d1, - 0x726e, 0x729f, 0x725d, 0x7266, 0x726f, 0x727e, 0x727f, 0x7284, - 0x728b, 0x728d, 0x728f, 0x7292, 0x6308, 0x6332, 0x63b0, 0x003f, - /* lead byte eb */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x968c, 0x968e, 0x9691, 0x9692, 0x9693, 0x9695, 0x9696, 0x969a, - 0x969b, 0x969d, 0x969e, 0x969f, 0x96a0, 0x96a1, 0x96a2, 0x96a3, - 0x96a4, 0x96a5, 0x96a6, 0x96a8, 0x96a9, 0x96aa, 0x96ab, 0x96ac, - 0x96ad, 0x96ae, 0x96af, 0x96b1, 0x96b2, 0x96b4, 0x96b5, 0x96b7, - 0x96b8, 0x96ba, 0x96bb, 0x96bf, 0x96c2, 0x96c3, 0x96c8, 0x96ca, - 0x96cb, 0x96d0, 0x96d1, 0x96d3, 0x96d4, 0x96d6, 0x96d7, 0x96d8, - 0x96d9, 0x96da, 0x96db, 0x96dc, 0x96dd, 0x96de, 0x96df, 0x96e1, - 0x96e2, 0x96e3, 0x96e4, 0x96e5, 0x96e6, 0x96e7, 0x96eb, 0x003f, - 0x96ec, 0x96ed, 0x96ee, 0x96f0, 0x96f1, 0x96f2, 0x96f4, 0x96f5, - 0x96f8, 0x96fa, 0x96fb, 0x96fc, 0x96fd, 0x96ff, 0x9702, 0x9703, - 0x9705, 0x970a, 0x970b, 0x970c, 0x9710, 0x9711, 0x9712, 0x9714, - 0x9715, 0x9717, 0x9718, 0x9719, 0x971a, 0x971b, 0x971d, 0x971f, - 0x9720, 0x643f, 0x64d8, 0x8004, 0x6bea, 0x6bf3, 0x6bfd, 0x6bf5, - 0x6bf9, 0x6c05, 0x6c07, 0x6c06, 0x6c0d, 0x6c15, 0x6c18, 0x6c19, - 0x6c1a, 0x6c21, 0x6c29, 0x6c24, 0x6c2a, 0x6c32, 0x6535, 0x6555, - 0x656b, 0x724d, 0x7252, 0x7256, 0x7230, 0x8662, 0x5216, 0x809f, - 0x809c, 0x8093, 0x80bc, 0x670a, 0x80bd, 0x80b1, 0x80ab, 0x80ad, - 0x80b4, 0x80b7, 0x80e7, 0x80e8, 0x80e9, 0x80ea, 0x80db, 0x80c2, - 0x80c4, 0x80d9, 0x80cd, 0x80d7, 0x6710, 0x80dd, 0x80eb, 0x80f1, - 0x80f4, 0x80ed, 0x810d, 0x810e, 0x80f2, 0x80fc, 0x6715, 0x8112, - 0x8c5a, 0x8136, 0x811e, 0x812c, 0x8118, 0x8132, 0x8148, 0x814c, - 0x8153, 0x8174, 0x8159, 0x815a, 0x8171, 0x8160, 0x8169, 0x817c, - 0x817d, 0x816d, 0x8167, 0x584d, 0x5ab5, 0x8188, 0x8182, 0x8191, - 0x6ed5, 0x81a3, 0x81aa, 0x81cc, 0x6726, 0x81ca, 0x81bb, 0x003f, - /* lead byte ec */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9721, 0x9722, 0x9723, 0x9724, 0x9725, 0x9726, 0x9727, 0x9728, - 0x9729, 0x972b, 0x972c, 0x972e, 0x972f, 0x9731, 0x9733, 0x9734, - 0x9735, 0x9736, 0x9737, 0x973a, 0x973b, 0x973c, 0x973d, 0x973f, - 0x9740, 0x9741, 0x9742, 0x9743, 0x9744, 0x9745, 0x9746, 0x9747, - 0x9748, 0x9749, 0x974a, 0x974b, 0x974c, 0x974d, 0x974e, 0x974f, - 0x9750, 0x9751, 0x9754, 0x9755, 0x9757, 0x9758, 0x975a, 0x975c, - 0x975d, 0x975f, 0x9763, 0x9764, 0x9766, 0x9767, 0x9768, 0x976a, - 0x976b, 0x976c, 0x976d, 0x976e, 0x976f, 0x9770, 0x9771, 0x003f, - 0x9772, 0x9775, 0x9777, 0x9778, 0x9779, 0x977a, 0x977b, 0x977d, - 0x977e, 0x977f, 0x9780, 0x9781, 0x9782, 0x9783, 0x9784, 0x9786, - 0x9787, 0x9788, 0x9789, 0x978a, 0x978c, 0x978e, 0x978f, 0x9790, - 0x9793, 0x9795, 0x9796, 0x9797, 0x9799, 0x979a, 0x979b, 0x979c, - 0x979d, 0x81c1, 0x81a6, 0x6b24, 0x6b37, 0x6b39, 0x6b43, 0x6b46, - 0x6b59, 0x98d1, 0x98d2, 0x98d3, 0x98d5, 0x98d9, 0x98da, 0x6bb3, - 0x5f40, 0x6bc2, 0x89f3, 0x6590, 0x9f51, 0x6593, 0x65bc, 0x65c6, - 0x65c4, 0x65c3, 0x65cc, 0x65ce, 0x65d2, 0x65d6, 0x7080, 0x709c, - 0x7096, 0x709d, 0x70bb, 0x70c0, 0x70b7, 0x70ab, 0x70b1, 0x70e8, - 0x70ca, 0x7110, 0x7113, 0x7116, 0x712f, 0x7131, 0x7173, 0x715c, - 0x7168, 0x7145, 0x7172, 0x714a, 0x7178, 0x717a, 0x7198, 0x71b3, - 0x71b5, 0x71a8, 0x71a0, 0x71e0, 0x71d4, 0x71e7, 0x71f9, 0x721d, - 0x7228, 0x706c, 0x7118, 0x7166, 0x71b9, 0x623e, 0x623d, 0x6243, - 0x6248, 0x6249, 0x793b, 0x7940, 0x7946, 0x7949, 0x795b, 0x795c, - 0x7953, 0x795a, 0x7962, 0x7957, 0x7960, 0x796f, 0x7967, 0x797a, - 0x7985, 0x798a, 0x799a, 0x79a7, 0x79b3, 0x5fd1, 0x5fd0, 0x003f, - /* lead byte ed */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x979e, 0x979f, 0x97a1, 0x97a2, 0x97a4, 0x97a5, 0x97a6, 0x97a7, - 0x97a8, 0x97a9, 0x97aa, 0x97ac, 0x97ae, 0x97b0, 0x97b1, 0x97b3, - 0x97b5, 0x97b6, 0x97b7, 0x97b8, 0x97b9, 0x97ba, 0x97bb, 0x97bc, - 0x97bd, 0x97be, 0x97bf, 0x97c0, 0x97c1, 0x97c2, 0x97c3, 0x97c4, - 0x97c5, 0x97c6, 0x97c7, 0x97c8, 0x97c9, 0x97ca, 0x97cb, 0x97cc, - 0x97cd, 0x97ce, 0x97cf, 0x97d0, 0x97d1, 0x97d2, 0x97d3, 0x97d4, - 0x97d5, 0x97d6, 0x97d7, 0x97d8, 0x97d9, 0x97da, 0x97db, 0x97dc, - 0x97dd, 0x97de, 0x97df, 0x97e0, 0x97e1, 0x97e2, 0x97e3, 0x003f, - 0x97e4, 0x97e5, 0x97e8, 0x97ee, 0x97ef, 0x97f0, 0x97f1, 0x97f2, - 0x97f4, 0x97f7, 0x97f8, 0x97f9, 0x97fa, 0x97fb, 0x97fc, 0x97fd, - 0x97fe, 0x97ff, 0x9800, 0x9801, 0x9802, 0x9803, 0x9804, 0x9805, - 0x9806, 0x9807, 0x9808, 0x9809, 0x980a, 0x980b, 0x980c, 0x980d, - 0x980e, 0x603c, 0x605d, 0x605a, 0x6067, 0x6041, 0x6059, 0x6063, - 0x60ab, 0x6106, 0x610d, 0x615d, 0x61a9, 0x619d, 0x61cb, 0x61d1, - 0x6206, 0x8080, 0x807f, 0x6c93, 0x6cf6, 0x6dfc, 0x77f6, 0x77f8, - 0x7800, 0x7809, 0x7817, 0x7818, 0x7811, 0x65ab, 0x782d, 0x781c, - 0x781d, 0x7839, 0x783a, 0x783b, 0x781f, 0x783c, 0x7825, 0x782c, - 0x7823, 0x7829, 0x784e, 0x786d, 0x7856, 0x7857, 0x7826, 0x7850, - 0x7847, 0x784c, 0x786a, 0x789b, 0x7893, 0x789a, 0x7887, 0x789c, - 0x78a1, 0x78a3, 0x78b2, 0x78b9, 0x78a5, 0x78d4, 0x78d9, 0x78c9, - 0x78ec, 0x78f2, 0x7905, 0x78f4, 0x7913, 0x7924, 0x791e, 0x7934, - 0x9f9b, 0x9ef9, 0x9efb, 0x9efc, 0x76f1, 0x7704, 0x770d, 0x76f9, - 0x7707, 0x7708, 0x771a, 0x7722, 0x7719, 0x772d, 0x7726, 0x7735, - 0x7738, 0x7750, 0x7751, 0x7747, 0x7743, 0x775a, 0x7768, 0x003f, - /* lead byte ee */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x980f, 0x9810, 0x9811, 0x9812, 0x9813, 0x9814, 0x9815, 0x9816, - 0x9817, 0x9818, 0x9819, 0x981a, 0x981b, 0x981c, 0x981d, 0x981e, - 0x981f, 0x9820, 0x9821, 0x9822, 0x9823, 0x9824, 0x9825, 0x9826, - 0x9827, 0x9828, 0x9829, 0x982a, 0x982b, 0x982c, 0x982d, 0x982e, - 0x982f, 0x9830, 0x9831, 0x9832, 0x9833, 0x9834, 0x9835, 0x9836, - 0x9837, 0x9838, 0x9839, 0x983a, 0x983b, 0x983c, 0x983d, 0x983e, - 0x983f, 0x9840, 0x9841, 0x9842, 0x9843, 0x9844, 0x9845, 0x9846, - 0x9847, 0x9848, 0x9849, 0x984a, 0x984b, 0x984c, 0x984d, 0x003f, - 0x984e, 0x984f, 0x9850, 0x9851, 0x9852, 0x9853, 0x9854, 0x9855, - 0x9856, 0x9857, 0x9858, 0x9859, 0x985a, 0x985b, 0x985c, 0x985d, - 0x985e, 0x985f, 0x9860, 0x9861, 0x9862, 0x9863, 0x9864, 0x9865, - 0x9866, 0x9867, 0x9868, 0x9869, 0x986a, 0x986b, 0x986c, 0x986d, - 0x986e, 0x7762, 0x7765, 0x777f, 0x778d, 0x777d, 0x7780, 0x778c, - 0x7791, 0x779f, 0x77a0, 0x77b0, 0x77b5, 0x77bd, 0x753a, 0x7540, - 0x754e, 0x754b, 0x7548, 0x755b, 0x7572, 0x7579, 0x7583, 0x7f58, - 0x7f61, 0x7f5f, 0x8a48, 0x7f68, 0x7f74, 0x7f71, 0x7f79, 0x7f81, - 0x7f7e, 0x76cd, 0x76e5, 0x8832, 0x9485, 0x9486, 0x9487, 0x948b, - 0x948a, 0x948c, 0x948d, 0x948f, 0x9490, 0x9494, 0x9497, 0x9495, - 0x949a, 0x949b, 0x949c, 0x94a3, 0x94a4, 0x94ab, 0x94aa, 0x94ad, - 0x94ac, 0x94af, 0x94b0, 0x94b2, 0x94b4, 0x94b6, 0x94b7, 0x94b8, - 0x94b9, 0x94ba, 0x94bc, 0x94bd, 0x94bf, 0x94c4, 0x94c8, 0x94c9, - 0x94ca, 0x94cb, 0x94cc, 0x94cd, 0x94ce, 0x94d0, 0x94d1, 0x94d2, - 0x94d5, 0x94d6, 0x94d7, 0x94d9, 0x94d8, 0x94db, 0x94de, 0x94df, - 0x94e0, 0x94e2, 0x94e4, 0x94e5, 0x94e7, 0x94e8, 0x94ea, 0x003f, - /* lead byte ef */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x986f, 0x9870, 0x9871, 0x9872, 0x9873, 0x9874, 0x988b, 0x988e, - 0x9892, 0x9895, 0x9899, 0x98a3, 0x98a8, 0x98a9, 0x98aa, 0x98ab, - 0x98ac, 0x98ad, 0x98ae, 0x98af, 0x98b0, 0x98b1, 0x98b2, 0x98b3, - 0x98b4, 0x98b5, 0x98b6, 0x98b7, 0x98b8, 0x98b9, 0x98ba, 0x98bb, - 0x98bc, 0x98bd, 0x98be, 0x98bf, 0x98c0, 0x98c1, 0x98c2, 0x98c3, - 0x98c4, 0x98c5, 0x98c6, 0x98c7, 0x98c8, 0x98c9, 0x98ca, 0x98cb, - 0x98cc, 0x98cd, 0x98cf, 0x98d0, 0x98d4, 0x98d6, 0x98d7, 0x98db, - 0x98dc, 0x98dd, 0x98e0, 0x98e1, 0x98e2, 0x98e3, 0x98e4, 0x003f, - 0x98e5, 0x98e6, 0x98e9, 0x98ea, 0x98eb, 0x98ec, 0x98ed, 0x98ee, - 0x98ef, 0x98f0, 0x98f1, 0x98f2, 0x98f3, 0x98f4, 0x98f5, 0x98f6, - 0x98f7, 0x98f8, 0x98f9, 0x98fa, 0x98fb, 0x98fc, 0x98fd, 0x98fe, - 0x98ff, 0x9900, 0x9901, 0x9902, 0x9903, 0x9904, 0x9905, 0x9906, - 0x9907, 0x94e9, 0x94eb, 0x94ee, 0x94ef, 0x94f3, 0x94f4, 0x94f5, - 0x94f7, 0x94f9, 0x94fc, 0x94fd, 0x94ff, 0x9503, 0x9502, 0x9506, - 0x9507, 0x9509, 0x950a, 0x950d, 0x950e, 0x950f, 0x9512, 0x9513, - 0x9514, 0x9515, 0x9516, 0x9518, 0x951b, 0x951d, 0x951e, 0x951f, - 0x9522, 0x952a, 0x952b, 0x9529, 0x952c, 0x9531, 0x9532, 0x9534, - 0x9536, 0x9537, 0x9538, 0x953c, 0x953e, 0x953f, 0x9542, 0x9535, - 0x9544, 0x9545, 0x9546, 0x9549, 0x954c, 0x954e, 0x954f, 0x9552, - 0x9553, 0x9554, 0x9556, 0x9557, 0x9558, 0x9559, 0x955b, 0x955e, - 0x955f, 0x955d, 0x9561, 0x9562, 0x9564, 0x9565, 0x9566, 0x9567, - 0x9568, 0x9569, 0x956a, 0x956b, 0x956c, 0x956f, 0x9571, 0x9572, - 0x9573, 0x953a, 0x77e7, 0x77ec, 0x96c9, 0x79d5, 0x79ed, 0x79e3, - 0x79eb, 0x7a06, 0x5d47, 0x7a03, 0x7a02, 0x7a1e, 0x7a14, 0x003f, - /* lead byte f0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9908, 0x9909, 0x990a, 0x990b, 0x990c, 0x990e, 0x990f, 0x9911, - 0x9912, 0x9913, 0x9914, 0x9915, 0x9916, 0x9917, 0x9918, 0x9919, - 0x991a, 0x991b, 0x991c, 0x991d, 0x991e, 0x991f, 0x9920, 0x9921, - 0x9922, 0x9923, 0x9924, 0x9925, 0x9926, 0x9927, 0x9928, 0x9929, - 0x992a, 0x992b, 0x992c, 0x992d, 0x992f, 0x9930, 0x9931, 0x9932, - 0x9933, 0x9934, 0x9935, 0x9936, 0x9937, 0x9938, 0x9939, 0x993a, - 0x993b, 0x993c, 0x993d, 0x993e, 0x993f, 0x9940, 0x9941, 0x9942, - 0x9943, 0x9944, 0x9945, 0x9946, 0x9947, 0x9948, 0x9949, 0x003f, - 0x994a, 0x994b, 0x994c, 0x994d, 0x994e, 0x994f, 0x9950, 0x9951, - 0x9952, 0x9953, 0x9956, 0x9957, 0x9958, 0x9959, 0x995a, 0x995b, - 0x995c, 0x995d, 0x995e, 0x995f, 0x9960, 0x9961, 0x9962, 0x9964, - 0x9966, 0x9973, 0x9978, 0x9979, 0x997b, 0x997e, 0x9982, 0x9983, - 0x9989, 0x7a39, 0x7a37, 0x7a51, 0x9ecf, 0x99a5, 0x7a70, 0x7688, - 0x768e, 0x7693, 0x7699, 0x76a4, 0x74de, 0x74e0, 0x752c, 0x9e20, - 0x9e22, 0x9e28, 0x9e29, 0x9e2a, 0x9e2b, 0x9e2c, 0x9e32, 0x9e31, - 0x9e36, 0x9e38, 0x9e37, 0x9e39, 0x9e3a, 0x9e3e, 0x9e41, 0x9e42, - 0x9e44, 0x9e46, 0x9e47, 0x9e48, 0x9e49, 0x9e4b, 0x9e4c, 0x9e4e, - 0x9e51, 0x9e55, 0x9e57, 0x9e5a, 0x9e5b, 0x9e5c, 0x9e5e, 0x9e63, - 0x9e66, 0x9e67, 0x9e68, 0x9e69, 0x9e6a, 0x9e6b, 0x9e6c, 0x9e71, - 0x9e6d, 0x9e73, 0x7592, 0x7594, 0x7596, 0x75a0, 0x759d, 0x75ac, - 0x75a3, 0x75b3, 0x75b4, 0x75b8, 0x75c4, 0x75b1, 0x75b0, 0x75c3, - 0x75c2, 0x75d6, 0x75cd, 0x75e3, 0x75e8, 0x75e6, 0x75e4, 0x75eb, - 0x75e7, 0x7603, 0x75f1, 0x75fc, 0x75ff, 0x7610, 0x7600, 0x7605, - 0x760c, 0x7617, 0x760a, 0x7625, 0x7618, 0x7615, 0x7619, 0x003f, - /* lead byte f1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x998c, 0x998e, 0x999a, 0x999b, 0x999c, 0x999d, 0x999e, 0x999f, - 0x99a0, 0x99a1, 0x99a2, 0x99a3, 0x99a4, 0x99a6, 0x99a7, 0x99a9, - 0x99aa, 0x99ab, 0x99ac, 0x99ad, 0x99ae, 0x99af, 0x99b0, 0x99b1, - 0x99b2, 0x99b3, 0x99b4, 0x99b5, 0x99b6, 0x99b7, 0x99b8, 0x99b9, - 0x99ba, 0x99bb, 0x99bc, 0x99bd, 0x99be, 0x99bf, 0x99c0, 0x99c1, - 0x99c2, 0x99c3, 0x99c4, 0x99c5, 0x99c6, 0x99c7, 0x99c8, 0x99c9, - 0x99ca, 0x99cb, 0x99cc, 0x99cd, 0x99ce, 0x99cf, 0x99d0, 0x99d1, - 0x99d2, 0x99d3, 0x99d4, 0x99d5, 0x99d6, 0x99d7, 0x99d8, 0x003f, - 0x99d9, 0x99da, 0x99db, 0x99dc, 0x99dd, 0x99de, 0x99df, 0x99e0, - 0x99e1, 0x99e2, 0x99e3, 0x99e4, 0x99e5, 0x99e6, 0x99e7, 0x99e8, - 0x99e9, 0x99ea, 0x99eb, 0x99ec, 0x99ed, 0x99ee, 0x99ef, 0x99f0, - 0x99f1, 0x99f2, 0x99f3, 0x99f4, 0x99f5, 0x99f6, 0x99f7, 0x99f8, - 0x99f9, 0x761b, 0x763c, 0x7622, 0x7620, 0x7640, 0x762d, 0x7630, - 0x763f, 0x7635, 0x7643, 0x763e, 0x7633, 0x764d, 0x765e, 0x7654, - 0x765c, 0x7656, 0x766b, 0x766f, 0x7fca, 0x7ae6, 0x7a78, 0x7a79, - 0x7a80, 0x7a86, 0x7a88, 0x7a95, 0x7aa6, 0x7aa0, 0x7aac, 0x7aa8, - 0x7aad, 0x7ab3, 0x8864, 0x8869, 0x8872, 0x887d, 0x887f, 0x8882, - 0x88a2, 0x88c6, 0x88b7, 0x88bc, 0x88c9, 0x88e2, 0x88ce, 0x88e3, - 0x88e5, 0x88f1, 0x891a, 0x88fc, 0x88e8, 0x88fe, 0x88f0, 0x8921, - 0x8919, 0x8913, 0x891b, 0x890a, 0x8934, 0x892b, 0x8936, 0x8941, - 0x8966, 0x897b, 0x758b, 0x80e5, 0x76b2, 0x76b4, 0x77dc, 0x8012, - 0x8014, 0x8016, 0x801c, 0x8020, 0x8022, 0x8025, 0x8026, 0x8027, - 0x8029, 0x8028, 0x8031, 0x800b, 0x8035, 0x8043, 0x8046, 0x804d, - 0x8052, 0x8069, 0x8071, 0x8983, 0x9878, 0x9880, 0x9883, 0x003f, - /* lead byte f2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x99fa, 0x99fb, 0x99fc, 0x99fd, 0x99fe, 0x99ff, 0x9a00, 0x9a01, - 0x9a02, 0x9a03, 0x9a04, 0x9a05, 0x9a06, 0x9a07, 0x9a08, 0x9a09, - 0x9a0a, 0x9a0b, 0x9a0c, 0x9a0d, 0x9a0e, 0x9a0f, 0x9a10, 0x9a11, - 0x9a12, 0x9a13, 0x9a14, 0x9a15, 0x9a16, 0x9a17, 0x9a18, 0x9a19, - 0x9a1a, 0x9a1b, 0x9a1c, 0x9a1d, 0x9a1e, 0x9a1f, 0x9a20, 0x9a21, - 0x9a22, 0x9a23, 0x9a24, 0x9a25, 0x9a26, 0x9a27, 0x9a28, 0x9a29, - 0x9a2a, 0x9a2b, 0x9a2c, 0x9a2d, 0x9a2e, 0x9a2f, 0x9a30, 0x9a31, - 0x9a32, 0x9a33, 0x9a34, 0x9a35, 0x9a36, 0x9a37, 0x9a38, 0x003f, - 0x9a39, 0x9a3a, 0x9a3b, 0x9a3c, 0x9a3d, 0x9a3e, 0x9a3f, 0x9a40, - 0x9a41, 0x9a42, 0x9a43, 0x9a44, 0x9a45, 0x9a46, 0x9a47, 0x9a48, - 0x9a49, 0x9a4a, 0x9a4b, 0x9a4c, 0x9a4d, 0x9a4e, 0x9a4f, 0x9a50, - 0x9a51, 0x9a52, 0x9a53, 0x9a54, 0x9a55, 0x9a56, 0x9a57, 0x9a58, - 0x9a59, 0x9889, 0x988c, 0x988d, 0x988f, 0x9894, 0x989a, 0x989b, - 0x989e, 0x989f, 0x98a1, 0x98a2, 0x98a5, 0x98a6, 0x864d, 0x8654, - 0x866c, 0x866e, 0x867f, 0x867a, 0x867c, 0x867b, 0x86a8, 0x868d, - 0x868b, 0x86ac, 0x869d, 0x86a7, 0x86a3, 0x86aa, 0x8693, 0x86a9, - 0x86b6, 0x86c4, 0x86b5, 0x86ce, 0x86b0, 0x86ba, 0x86b1, 0x86af, - 0x86c9, 0x86cf, 0x86b4, 0x86e9, 0x86f1, 0x86f2, 0x86ed, 0x86f3, - 0x86d0, 0x8713, 0x86de, 0x86f4, 0x86df, 0x86d8, 0x86d1, 0x8703, - 0x8707, 0x86f8, 0x8708, 0x870a, 0x870d, 0x8709, 0x8723, 0x873b, - 0x871e, 0x8725, 0x872e, 0x871a, 0x873e, 0x8748, 0x8734, 0x8731, - 0x8729, 0x8737, 0x873f, 0x8782, 0x8722, 0x877d, 0x877e, 0x877b, - 0x8760, 0x8770, 0x874c, 0x876e, 0x878b, 0x8753, 0x8763, 0x877c, - 0x8764, 0x8759, 0x8765, 0x8793, 0x87af, 0x87a8, 0x87d2, 0x003f, - /* lead byte f3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9a5a, 0x9a5b, 0x9a5c, 0x9a5d, 0x9a5e, 0x9a5f, 0x9a60, 0x9a61, - 0x9a62, 0x9a63, 0x9a64, 0x9a65, 0x9a66, 0x9a67, 0x9a68, 0x9a69, - 0x9a6a, 0x9a6b, 0x9a72, 0x9a83, 0x9a89, 0x9a8d, 0x9a8e, 0x9a94, - 0x9a95, 0x9a99, 0x9aa6, 0x9aa9, 0x9aaa, 0x9aab, 0x9aac, 0x9aad, - 0x9aae, 0x9aaf, 0x9ab2, 0x9ab3, 0x9ab4, 0x9ab5, 0x9ab9, 0x9abb, - 0x9abd, 0x9abe, 0x9abf, 0x9ac3, 0x9ac4, 0x9ac6, 0x9ac7, 0x9ac8, - 0x9ac9, 0x9aca, 0x9acd, 0x9ace, 0x9acf, 0x9ad0, 0x9ad2, 0x9ad4, - 0x9ad5, 0x9ad6, 0x9ad7, 0x9ad9, 0x9ada, 0x9adb, 0x9adc, 0x003f, - 0x9add, 0x9ade, 0x9ae0, 0x9ae2, 0x9ae3, 0x9ae4, 0x9ae5, 0x9ae7, - 0x9ae8, 0x9ae9, 0x9aea, 0x9aec, 0x9aee, 0x9af0, 0x9af1, 0x9af2, - 0x9af3, 0x9af4, 0x9af5, 0x9af6, 0x9af7, 0x9af8, 0x9afa, 0x9afc, - 0x9afd, 0x9afe, 0x9aff, 0x9b00, 0x9b01, 0x9b02, 0x9b04, 0x9b05, - 0x9b06, 0x87c6, 0x8788, 0x8785, 0x87ad, 0x8797, 0x8783, 0x87ab, - 0x87e5, 0x87ac, 0x87b5, 0x87b3, 0x87cb, 0x87d3, 0x87bd, 0x87d1, - 0x87c0, 0x87ca, 0x87db, 0x87ea, 0x87e0, 0x87ee, 0x8816, 0x8813, - 0x87fe, 0x880a, 0x881b, 0x8821, 0x8839, 0x883c, 0x7f36, 0x7f42, - 0x7f44, 0x7f45, 0x8210, 0x7afa, 0x7afd, 0x7b08, 0x7b03, 0x7b04, - 0x7b15, 0x7b0a, 0x7b2b, 0x7b0f, 0x7b47, 0x7b38, 0x7b2a, 0x7b19, - 0x7b2e, 0x7b31, 0x7b20, 0x7b25, 0x7b24, 0x7b33, 0x7b3e, 0x7b1e, - 0x7b58, 0x7b5a, 0x7b45, 0x7b75, 0x7b4c, 0x7b5d, 0x7b60, 0x7b6e, - 0x7b7b, 0x7b62, 0x7b72, 0x7b71, 0x7b90, 0x7ba6, 0x7ba7, 0x7bb8, - 0x7bac, 0x7b9d, 0x7ba8, 0x7b85, 0x7baa, 0x7b9c, 0x7ba2, 0x7bab, - 0x7bb4, 0x7bd1, 0x7bc1, 0x7bcc, 0x7bdd, 0x7bda, 0x7be5, 0x7be6, - 0x7bea, 0x7c0c, 0x7bfe, 0x7bfc, 0x7c0f, 0x7c16, 0x7c0b, 0x003f, - /* lead byte f4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9b07, 0x9b09, 0x9b0a, 0x9b0b, 0x9b0c, 0x9b0d, 0x9b0e, 0x9b10, - 0x9b11, 0x9b12, 0x9b14, 0x9b15, 0x9b16, 0x9b17, 0x9b18, 0x9b19, - 0x9b1a, 0x9b1b, 0x9b1c, 0x9b1d, 0x9b1e, 0x9b20, 0x9b21, 0x9b22, - 0x9b24, 0x9b25, 0x9b26, 0x9b27, 0x9b28, 0x9b29, 0x9b2a, 0x9b2b, - 0x9b2c, 0x9b2d, 0x9b2e, 0x9b30, 0x9b31, 0x9b33, 0x9b34, 0x9b35, - 0x9b36, 0x9b37, 0x9b38, 0x9b39, 0x9b3a, 0x9b3d, 0x9b3e, 0x9b3f, - 0x9b40, 0x9b46, 0x9b4a, 0x9b4b, 0x9b4c, 0x9b4e, 0x9b50, 0x9b52, - 0x9b53, 0x9b55, 0x9b56, 0x9b57, 0x9b58, 0x9b59, 0x9b5a, 0x003f, - 0x9b5b, 0x9b5c, 0x9b5d, 0x9b5e, 0x9b5f, 0x9b60, 0x9b61, 0x9b62, - 0x9b63, 0x9b64, 0x9b65, 0x9b66, 0x9b67, 0x9b68, 0x9b69, 0x9b6a, - 0x9b6b, 0x9b6c, 0x9b6d, 0x9b6e, 0x9b6f, 0x9b70, 0x9b71, 0x9b72, - 0x9b73, 0x9b74, 0x9b75, 0x9b76, 0x9b77, 0x9b78, 0x9b79, 0x9b7a, - 0x9b7b, 0x7c1f, 0x7c2a, 0x7c26, 0x7c38, 0x7c41, 0x7c40, 0x81fe, - 0x8201, 0x8202, 0x8204, 0x81ec, 0x8844, 0x8221, 0x8222, 0x8223, - 0x822d, 0x822f, 0x8228, 0x822b, 0x8238, 0x823b, 0x8233, 0x8234, - 0x823e, 0x8244, 0x8249, 0x824b, 0x824f, 0x825a, 0x825f, 0x8268, - 0x887e, 0x8885, 0x8888, 0x88d8, 0x88df, 0x895e, 0x7f9d, 0x7f9f, - 0x7fa7, 0x7faf, 0x7fb0, 0x7fb2, 0x7c7c, 0x6549, 0x7c91, 0x7c9d, - 0x7c9c, 0x7c9e, 0x7ca2, 0x7cb2, 0x7cbc, 0x7cbd, 0x7cc1, 0x7cc7, - 0x7ccc, 0x7ccd, 0x7cc8, 0x7cc5, 0x7cd7, 0x7ce8, 0x826e, 0x66a8, - 0x7fbf, 0x7fce, 0x7fd5, 0x7fe5, 0x7fe1, 0x7fe6, 0x7fe9, 0x7fee, - 0x7ff3, 0x7cf8, 0x7d77, 0x7da6, 0x7dae, 0x7e47, 0x7e9b, 0x9eb8, - 0x9eb4, 0x8d73, 0x8d84, 0x8d94, 0x8d91, 0x8db1, 0x8d67, 0x8d6d, - 0x8c47, 0x8c49, 0x914a, 0x9150, 0x914e, 0x914f, 0x9164, 0x003f, - /* lead byte f5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9b7c, 0x9b7d, 0x9b7e, 0x9b7f, 0x9b80, 0x9b81, 0x9b82, 0x9b83, - 0x9b84, 0x9b85, 0x9b86, 0x9b87, 0x9b88, 0x9b89, 0x9b8a, 0x9b8b, - 0x9b8c, 0x9b8d, 0x9b8e, 0x9b8f, 0x9b90, 0x9b91, 0x9b92, 0x9b93, - 0x9b94, 0x9b95, 0x9b96, 0x9b97, 0x9b98, 0x9b99, 0x9b9a, 0x9b9b, - 0x9b9c, 0x9b9d, 0x9b9e, 0x9b9f, 0x9ba0, 0x9ba1, 0x9ba2, 0x9ba3, - 0x9ba4, 0x9ba5, 0x9ba6, 0x9ba7, 0x9ba8, 0x9ba9, 0x9baa, 0x9bab, - 0x9bac, 0x9bad, 0x9bae, 0x9baf, 0x9bb0, 0x9bb1, 0x9bb2, 0x9bb3, - 0x9bb4, 0x9bb5, 0x9bb6, 0x9bb7, 0x9bb8, 0x9bb9, 0x9bba, 0x003f, - 0x9bbb, 0x9bbc, 0x9bbd, 0x9bbe, 0x9bbf, 0x9bc0, 0x9bc1, 0x9bc2, - 0x9bc3, 0x9bc4, 0x9bc5, 0x9bc6, 0x9bc7, 0x9bc8, 0x9bc9, 0x9bca, - 0x9bcb, 0x9bcc, 0x9bcd, 0x9bce, 0x9bcf, 0x9bd0, 0x9bd1, 0x9bd2, - 0x9bd3, 0x9bd4, 0x9bd5, 0x9bd6, 0x9bd7, 0x9bd8, 0x9bd9, 0x9bda, - 0x9bdb, 0x9162, 0x9161, 0x9170, 0x9169, 0x916f, 0x917d, 0x917e, - 0x9172, 0x9174, 0x9179, 0x918c, 0x9185, 0x9190, 0x918d, 0x9191, - 0x91a2, 0x91a3, 0x91aa, 0x91ad, 0x91ae, 0x91af, 0x91b5, 0x91b4, - 0x91ba, 0x8c55, 0x9e7e, 0x8db8, 0x8deb, 0x8e05, 0x8e59, 0x8e69, - 0x8db5, 0x8dbf, 0x8dbc, 0x8dba, 0x8dc4, 0x8dd6, 0x8dd7, 0x8dda, - 0x8dde, 0x8dce, 0x8dcf, 0x8ddb, 0x8dc6, 0x8dec, 0x8df7, 0x8df8, - 0x8de3, 0x8df9, 0x8dfb, 0x8de4, 0x8e09, 0x8dfd, 0x8e14, 0x8e1d, - 0x8e1f, 0x8e2c, 0x8e2e, 0x8e23, 0x8e2f, 0x8e3a, 0x8e40, 0x8e39, - 0x8e35, 0x8e3d, 0x8e31, 0x8e49, 0x8e41, 0x8e42, 0x8e51, 0x8e52, - 0x8e4a, 0x8e70, 0x8e76, 0x8e7c, 0x8e6f, 0x8e74, 0x8e85, 0x8e8f, - 0x8e94, 0x8e90, 0x8e9c, 0x8e9e, 0x8c78, 0x8c82, 0x8c8a, 0x8c85, - 0x8c98, 0x8c94, 0x659b, 0x89d6, 0x89de, 0x89da, 0x89dc, 0x003f, - /* lead byte f6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9bdc, 0x9bdd, 0x9bde, 0x9bdf, 0x9be0, 0x9be1, 0x9be2, 0x9be3, - 0x9be4, 0x9be5, 0x9be6, 0x9be7, 0x9be8, 0x9be9, 0x9bea, 0x9beb, - 0x9bec, 0x9bed, 0x9bee, 0x9bef, 0x9bf0, 0x9bf1, 0x9bf2, 0x9bf3, - 0x9bf4, 0x9bf5, 0x9bf6, 0x9bf7, 0x9bf8, 0x9bf9, 0x9bfa, 0x9bfb, - 0x9bfc, 0x9bfd, 0x9bfe, 0x9bff, 0x9c00, 0x9c01, 0x9c02, 0x9c03, - 0x9c04, 0x9c05, 0x9c06, 0x9c07, 0x9c08, 0x9c09, 0x9c0a, 0x9c0b, - 0x9c0c, 0x9c0d, 0x9c0e, 0x9c0f, 0x9c10, 0x9c11, 0x9c12, 0x9c13, - 0x9c14, 0x9c15, 0x9c16, 0x9c17, 0x9c18, 0x9c19, 0x9c1a, 0x003f, - 0x9c1b, 0x9c1c, 0x9c1d, 0x9c1e, 0x9c1f, 0x9c20, 0x9c21, 0x9c22, - 0x9c23, 0x9c24, 0x9c25, 0x9c26, 0x9c27, 0x9c28, 0x9c29, 0x9c2a, - 0x9c2b, 0x9c2c, 0x9c2d, 0x9c2e, 0x9c2f, 0x9c30, 0x9c31, 0x9c32, - 0x9c33, 0x9c34, 0x9c35, 0x9c36, 0x9c37, 0x9c38, 0x9c39, 0x9c3a, - 0x9c3b, 0x89e5, 0x89eb, 0x89ef, 0x8a3e, 0x8b26, 0x9753, 0x96e9, - 0x96f3, 0x96ef, 0x9706, 0x9701, 0x9708, 0x970f, 0x970e, 0x972a, - 0x972d, 0x9730, 0x973e, 0x9f80, 0x9f83, 0x9f85, 0x9f86, 0x9f87, - 0x9f88, 0x9f89, 0x9f8a, 0x9f8c, 0x9efe, 0x9f0b, 0x9f0d, 0x96b9, - 0x96bc, 0x96bd, 0x96ce, 0x96d2, 0x77bf, 0x96e0, 0x928e, 0x92ae, - 0x92c8, 0x933e, 0x936a, 0x93ca, 0x938f, 0x943e, 0x946b, 0x9c7f, - 0x9c82, 0x9c85, 0x9c86, 0x9c87, 0x9c88, 0x7a23, 0x9c8b, 0x9c8e, - 0x9c90, 0x9c91, 0x9c92, 0x9c94, 0x9c95, 0x9c9a, 0x9c9b, 0x9c9e, - 0x9c9f, 0x9ca0, 0x9ca1, 0x9ca2, 0x9ca3, 0x9ca5, 0x9ca6, 0x9ca7, - 0x9ca8, 0x9ca9, 0x9cab, 0x9cad, 0x9cae, 0x9cb0, 0x9cb1, 0x9cb2, - 0x9cb3, 0x9cb4, 0x9cb5, 0x9cb6, 0x9cb7, 0x9cba, 0x9cbb, 0x9cbc, - 0x9cbd, 0x9cc4, 0x9cc5, 0x9cc6, 0x9cc7, 0x9cca, 0x9ccb, 0x003f, - /* lead byte f7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9c3c, 0x9c3d, 0x9c3e, 0x9c3f, 0x9c40, 0x9c41, 0x9c42, 0x9c43, - 0x9c44, 0x9c45, 0x9c46, 0x9c47, 0x9c48, 0x9c49, 0x9c4a, 0x9c4b, - 0x9c4c, 0x9c4d, 0x9c4e, 0x9c4f, 0x9c50, 0x9c51, 0x9c52, 0x9c53, - 0x9c54, 0x9c55, 0x9c56, 0x9c57, 0x9c58, 0x9c59, 0x9c5a, 0x9c5b, - 0x9c5c, 0x9c5d, 0x9c5e, 0x9c5f, 0x9c60, 0x9c61, 0x9c62, 0x9c63, - 0x9c64, 0x9c65, 0x9c66, 0x9c67, 0x9c68, 0x9c69, 0x9c6a, 0x9c6b, - 0x9c6c, 0x9c6d, 0x9c6e, 0x9c6f, 0x9c70, 0x9c71, 0x9c72, 0x9c73, - 0x9c74, 0x9c75, 0x9c76, 0x9c77, 0x9c78, 0x9c79, 0x9c7a, 0x003f, - 0x9c7b, 0x9c7d, 0x9c7e, 0x9c80, 0x9c83, 0x9c84, 0x9c89, 0x9c8a, - 0x9c8c, 0x9c8f, 0x9c93, 0x9c96, 0x9c97, 0x9c98, 0x9c99, 0x9c9d, - 0x9caa, 0x9cac, 0x9caf, 0x9cb9, 0x9cbe, 0x9cbf, 0x9cc0, 0x9cc1, - 0x9cc2, 0x9cc8, 0x9cc9, 0x9cd1, 0x9cd2, 0x9cda, 0x9cdb, 0x9ce0, - 0x9ce1, 0x9ccc, 0x9ccd, 0x9cce, 0x9ccf, 0x9cd0, 0x9cd3, 0x9cd4, - 0x9cd5, 0x9cd7, 0x9cd8, 0x9cd9, 0x9cdc, 0x9cdd, 0x9cdf, 0x9ce2, - 0x977c, 0x9785, 0x9791, 0x9792, 0x9794, 0x97af, 0x97ab, 0x97a3, - 0x97b2, 0x97b4, 0x9ab1, 0x9ab0, 0x9ab7, 0x9e58, 0x9ab6, 0x9aba, - 0x9abc, 0x9ac1, 0x9ac0, 0x9ac5, 0x9ac2, 0x9acb, 0x9acc, 0x9ad1, - 0x9b45, 0x9b43, 0x9b47, 0x9b49, 0x9b48, 0x9b4d, 0x9b51, 0x98e8, - 0x990d, 0x992e, 0x9955, 0x9954, 0x9adf, 0x9ae1, 0x9ae6, 0x9aef, - 0x9aeb, 0x9afb, 0x9aed, 0x9af9, 0x9b08, 0x9b0f, 0x9b13, 0x9b1f, - 0x9b23, 0x9ebd, 0x9ebe, 0x7e3b, 0x9e82, 0x9e87, 0x9e88, 0x9e8b, - 0x9e92, 0x93d6, 0x9e9d, 0x9e9f, 0x9edb, 0x9edc, 0x9edd, 0x9ee0, - 0x9edf, 0x9ee2, 0x9ee9, 0x9ee7, 0x9ee5, 0x9eea, 0x9eef, 0x9f22, - 0x9f2c, 0x9f2f, 0x9f39, 0x9f37, 0x9f3d, 0x9f3e, 0x9f44, 0x003f, - /* lead byte f8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9ce3, 0x9ce4, 0x9ce5, 0x9ce6, 0x9ce7, 0x9ce8, 0x9ce9, 0x9cea, - 0x9ceb, 0x9cec, 0x9ced, 0x9cee, 0x9cef, 0x9cf0, 0x9cf1, 0x9cf2, - 0x9cf3, 0x9cf4, 0x9cf5, 0x9cf6, 0x9cf7, 0x9cf8, 0x9cf9, 0x9cfa, - 0x9cfb, 0x9cfc, 0x9cfd, 0x9cfe, 0x9cff, 0x9d00, 0x9d01, 0x9d02, - 0x9d03, 0x9d04, 0x9d05, 0x9d06, 0x9d07, 0x9d08, 0x9d09, 0x9d0a, - 0x9d0b, 0x9d0c, 0x9d0d, 0x9d0e, 0x9d0f, 0x9d10, 0x9d11, 0x9d12, - 0x9d13, 0x9d14, 0x9d15, 0x9d16, 0x9d17, 0x9d18, 0x9d19, 0x9d1a, - 0x9d1b, 0x9d1c, 0x9d1d, 0x9d1e, 0x9d1f, 0x9d20, 0x9d21, 0x003f, - 0x9d22, 0x9d23, 0x9d24, 0x9d25, 0x9d26, 0x9d27, 0x9d28, 0x9d29, - 0x9d2a, 0x9d2b, 0x9d2c, 0x9d2d, 0x9d2e, 0x9d2f, 0x9d30, 0x9d31, - 0x9d32, 0x9d33, 0x9d34, 0x9d35, 0x9d36, 0x9d37, 0x9d38, 0x9d39, - 0x9d3a, 0x9d3b, 0x9d3c, 0x9d3d, 0x9d3e, 0x9d3f, 0x9d40, 0x9d41, - 0x9d42, 0xe234, 0xe235, 0xe236, 0xe237, 0xe238, 0xe239, 0xe23a, - 0xe23b, 0xe23c, 0xe23d, 0xe23e, 0xe23f, 0xe240, 0xe241, 0xe242, - 0xe243, 0xe244, 0xe245, 0xe246, 0xe247, 0xe248, 0xe249, 0xe24a, - 0xe24b, 0xe24c, 0xe24d, 0xe24e, 0xe24f, 0xe250, 0xe251, 0xe252, - 0xe253, 0xe254, 0xe255, 0xe256, 0xe257, 0xe258, 0xe259, 0xe25a, - 0xe25b, 0xe25c, 0xe25d, 0xe25e, 0xe25f, 0xe260, 0xe261, 0xe262, - 0xe263, 0xe264, 0xe265, 0xe266, 0xe267, 0xe268, 0xe269, 0xe26a, - 0xe26b, 0xe26c, 0xe26d, 0xe26e, 0xe26f, 0xe270, 0xe271, 0xe272, - 0xe273, 0xe274, 0xe275, 0xe276, 0xe277, 0xe278, 0xe279, 0xe27a, - 0xe27b, 0xe27c, 0xe27d, 0xe27e, 0xe27f, 0xe280, 0xe281, 0xe282, - 0xe283, 0xe284, 0xe285, 0xe286, 0xe287, 0xe288, 0xe289, 0xe28a, - 0xe28b, 0xe28c, 0xe28d, 0xe28e, 0xe28f, 0xe290, 0xe291, 0x003f, - /* lead byte f9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9d43, 0x9d44, 0x9d45, 0x9d46, 0x9d47, 0x9d48, 0x9d49, 0x9d4a, - 0x9d4b, 0x9d4c, 0x9d4d, 0x9d4e, 0x9d4f, 0x9d50, 0x9d51, 0x9d52, - 0x9d53, 0x9d54, 0x9d55, 0x9d56, 0x9d57, 0x9d58, 0x9d59, 0x9d5a, - 0x9d5b, 0x9d5c, 0x9d5d, 0x9d5e, 0x9d5f, 0x9d60, 0x9d61, 0x9d62, - 0x9d63, 0x9d64, 0x9d65, 0x9d66, 0x9d67, 0x9d68, 0x9d69, 0x9d6a, - 0x9d6b, 0x9d6c, 0x9d6d, 0x9d6e, 0x9d6f, 0x9d70, 0x9d71, 0x9d72, - 0x9d73, 0x9d74, 0x9d75, 0x9d76, 0x9d77, 0x9d78, 0x9d79, 0x9d7a, - 0x9d7b, 0x9d7c, 0x9d7d, 0x9d7e, 0x9d7f, 0x9d80, 0x9d81, 0x003f, - 0x9d82, 0x9d83, 0x9d84, 0x9d85, 0x9d86, 0x9d87, 0x9d88, 0x9d89, - 0x9d8a, 0x9d8b, 0x9d8c, 0x9d8d, 0x9d8e, 0x9d8f, 0x9d90, 0x9d91, - 0x9d92, 0x9d93, 0x9d94, 0x9d95, 0x9d96, 0x9d97, 0x9d98, 0x9d99, - 0x9d9a, 0x9d9b, 0x9d9c, 0x9d9d, 0x9d9e, 0x9d9f, 0x9da0, 0x9da1, - 0x9da2, 0xe292, 0xe293, 0xe294, 0xe295, 0xe296, 0xe297, 0xe298, - 0xe299, 0xe29a, 0xe29b, 0xe29c, 0xe29d, 0xe29e, 0xe29f, 0xe2a0, - 0xe2a1, 0xe2a2, 0xe2a3, 0xe2a4, 0xe2a5, 0xe2a6, 0xe2a7, 0xe2a8, - 0xe2a9, 0xe2aa, 0xe2ab, 0xe2ac, 0xe2ad, 0xe2ae, 0xe2af, 0xe2b0, - 0xe2b1, 0xe2b2, 0xe2b3, 0xe2b4, 0xe2b5, 0xe2b6, 0xe2b7, 0xe2b8, - 0xe2b9, 0xe2ba, 0xe2bb, 0xe2bc, 0xe2bd, 0xe2be, 0xe2bf, 0xe2c0, - 0xe2c1, 0xe2c2, 0xe2c3, 0xe2c4, 0xe2c5, 0xe2c6, 0xe2c7, 0xe2c8, - 0xe2c9, 0xe2ca, 0xe2cb, 0xe2cc, 0xe2cd, 0xe2ce, 0xe2cf, 0xe2d0, - 0xe2d1, 0xe2d2, 0xe2d3, 0xe2d4, 0xe2d5, 0xe2d6, 0xe2d7, 0xe2d8, - 0xe2d9, 0xe2da, 0xe2db, 0xe2dc, 0xe2dd, 0xe2de, 0xe2df, 0xe2e0, - 0xe2e1, 0xe2e2, 0xe2e3, 0xe2e4, 0xe2e5, 0xe2e6, 0xe2e7, 0xe2e8, - 0xe2e9, 0xe2ea, 0xe2eb, 0xe2ec, 0xe2ed, 0xe2ee, 0xe2ef, 0x003f, - /* lead byte fa */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9da3, 0x9da4, 0x9da5, 0x9da6, 0x9da7, 0x9da8, 0x9da9, 0x9daa, - 0x9dab, 0x9dac, 0x9dad, 0x9dae, 0x9daf, 0x9db0, 0x9db1, 0x9db2, - 0x9db3, 0x9db4, 0x9db5, 0x9db6, 0x9db7, 0x9db8, 0x9db9, 0x9dba, - 0x9dbb, 0x9dbc, 0x9dbd, 0x9dbe, 0x9dbf, 0x9dc0, 0x9dc1, 0x9dc2, - 0x9dc3, 0x9dc4, 0x9dc5, 0x9dc6, 0x9dc7, 0x9dc8, 0x9dc9, 0x9dca, - 0x9dcb, 0x9dcc, 0x9dcd, 0x9dce, 0x9dcf, 0x9dd0, 0x9dd1, 0x9dd2, - 0x9dd3, 0x9dd4, 0x9dd5, 0x9dd6, 0x9dd7, 0x9dd8, 0x9dd9, 0x9dda, - 0x9ddb, 0x9ddc, 0x9ddd, 0x9dde, 0x9ddf, 0x9de0, 0x9de1, 0x003f, - 0x9de2, 0x9de3, 0x9de4, 0x9de5, 0x9de6, 0x9de7, 0x9de8, 0x9de9, - 0x9dea, 0x9deb, 0x9dec, 0x9ded, 0x9dee, 0x9def, 0x9df0, 0x9df1, - 0x9df2, 0x9df3, 0x9df4, 0x9df5, 0x9df6, 0x9df7, 0x9df8, 0x9df9, - 0x9dfa, 0x9dfb, 0x9dfc, 0x9dfd, 0x9dfe, 0x9dff, 0x9e00, 0x9e01, - 0x9e02, 0xe2f0, 0xe2f1, 0xe2f2, 0xe2f3, 0xe2f4, 0xe2f5, 0xe2f6, - 0xe2f7, 0xe2f8, 0xe2f9, 0xe2fa, 0xe2fb, 0xe2fc, 0xe2fd, 0xe2fe, - 0xe2ff, 0xe300, 0xe301, 0xe302, 0xe303, 0xe304, 0xe305, 0xe306, - 0xe307, 0xe308, 0xe309, 0xe30a, 0xe30b, 0xe30c, 0xe30d, 0xe30e, - 0xe30f, 0xe310, 0xe311, 0xe312, 0xe313, 0xe314, 0xe315, 0xe316, - 0xe317, 0xe318, 0xe319, 0xe31a, 0xe31b, 0xe31c, 0xe31d, 0xe31e, - 0xe31f, 0xe320, 0xe321, 0xe322, 0xe323, 0xe324, 0xe325, 0xe326, - 0xe327, 0xe328, 0xe329, 0xe32a, 0xe32b, 0xe32c, 0xe32d, 0xe32e, - 0xe32f, 0xe330, 0xe331, 0xe332, 0xe333, 0xe334, 0xe335, 0xe336, - 0xe337, 0xe338, 0xe339, 0xe33a, 0xe33b, 0xe33c, 0xe33d, 0xe33e, - 0xe33f, 0xe340, 0xe341, 0xe342, 0xe343, 0xe344, 0xe345, 0xe346, - 0xe347, 0xe348, 0xe349, 0xe34a, 0xe34b, 0xe34c, 0xe34d, 0x003f, - /* lead byte fb */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9e03, 0x9e04, 0x9e05, 0x9e06, 0x9e07, 0x9e08, 0x9e09, 0x9e0a, - 0x9e0b, 0x9e0c, 0x9e0d, 0x9e0e, 0x9e0f, 0x9e10, 0x9e11, 0x9e12, - 0x9e13, 0x9e14, 0x9e15, 0x9e16, 0x9e17, 0x9e18, 0x9e19, 0x9e1a, - 0x9e1b, 0x9e1c, 0x9e1d, 0x9e1e, 0x9e24, 0x9e27, 0x9e2e, 0x9e30, - 0x9e34, 0x9e3b, 0x9e3c, 0x9e40, 0x9e4d, 0x9e50, 0x9e52, 0x9e53, - 0x9e54, 0x9e56, 0x9e59, 0x9e5d, 0x9e5f, 0x9e60, 0x9e61, 0x9e62, - 0x9e65, 0x9e6e, 0x9e6f, 0x9e72, 0x9e74, 0x9e75, 0x9e76, 0x9e77, - 0x9e78, 0x9e79, 0x9e7a, 0x9e7b, 0x9e7c, 0x9e7d, 0x9e80, 0x003f, - 0x9e81, 0x9e83, 0x9e84, 0x9e85, 0x9e86, 0x9e89, 0x9e8a, 0x9e8c, - 0x9e8d, 0x9e8e, 0x9e8f, 0x9e90, 0x9e91, 0x9e94, 0x9e95, 0x9e96, - 0x9e97, 0x9e98, 0x9e99, 0x9e9a, 0x9e9b, 0x9e9c, 0x9e9e, 0x9ea0, - 0x9ea1, 0x9ea2, 0x9ea3, 0x9ea4, 0x9ea5, 0x9ea7, 0x9ea8, 0x9ea9, - 0x9eaa, 0xe34e, 0xe34f, 0xe350, 0xe351, 0xe352, 0xe353, 0xe354, - 0xe355, 0xe356, 0xe357, 0xe358, 0xe359, 0xe35a, 0xe35b, 0xe35c, - 0xe35d, 0xe35e, 0xe35f, 0xe360, 0xe361, 0xe362, 0xe363, 0xe364, - 0xe365, 0xe366, 0xe367, 0xe368, 0xe369, 0xe36a, 0xe36b, 0xe36c, - 0xe36d, 0xe36e, 0xe36f, 0xe370, 0xe371, 0xe372, 0xe373, 0xe374, - 0xe375, 0xe376, 0xe377, 0xe378, 0xe379, 0xe37a, 0xe37b, 0xe37c, - 0xe37d, 0xe37e, 0xe37f, 0xe380, 0xe381, 0xe382, 0xe383, 0xe384, - 0xe385, 0xe386, 0xe387, 0xe388, 0xe389, 0xe38a, 0xe38b, 0xe38c, - 0xe38d, 0xe38e, 0xe38f, 0xe390, 0xe391, 0xe392, 0xe393, 0xe394, - 0xe395, 0xe396, 0xe397, 0xe398, 0xe399, 0xe39a, 0xe39b, 0xe39c, - 0xe39d, 0xe39e, 0xe39f, 0xe3a0, 0xe3a1, 0xe3a2, 0xe3a3, 0xe3a4, - 0xe3a5, 0xe3a6, 0xe3a7, 0xe3a8, 0xe3a9, 0xe3aa, 0xe3ab, 0x003f, - /* lead byte fc */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9eab, 0x9eac, 0x9ead, 0x9eae, 0x9eaf, 0x9eb0, 0x9eb1, 0x9eb2, - 0x9eb3, 0x9eb5, 0x9eb6, 0x9eb7, 0x9eb9, 0x9eba, 0x9ebc, 0x9ebf, - 0x9ec0, 0x9ec1, 0x9ec2, 0x9ec3, 0x9ec5, 0x9ec6, 0x9ec7, 0x9ec8, - 0x9eca, 0x9ecb, 0x9ecc, 0x9ed0, 0x9ed2, 0x9ed3, 0x9ed5, 0x9ed6, - 0x9ed7, 0x9ed9, 0x9eda, 0x9ede, 0x9ee1, 0x9ee3, 0x9ee4, 0x9ee6, - 0x9ee8, 0x9eeb, 0x9eec, 0x9eed, 0x9eee, 0x9ef0, 0x9ef1, 0x9ef2, - 0x9ef3, 0x9ef4, 0x9ef5, 0x9ef6, 0x9ef7, 0x9ef8, 0x9efa, 0x9efd, - 0x9eff, 0x9f00, 0x9f01, 0x9f02, 0x9f03, 0x9f04, 0x9f05, 0x003f, - 0x9f06, 0x9f07, 0x9f08, 0x9f09, 0x9f0a, 0x9f0c, 0x9f0f, 0x9f11, - 0x9f12, 0x9f14, 0x9f15, 0x9f16, 0x9f18, 0x9f1a, 0x9f1b, 0x9f1c, - 0x9f1d, 0x9f1e, 0x9f1f, 0x9f21, 0x9f23, 0x9f24, 0x9f25, 0x9f26, - 0x9f27, 0x9f28, 0x9f29, 0x9f2a, 0x9f2b, 0x9f2d, 0x9f2e, 0x9f30, - 0x9f31, 0xe3ac, 0xe3ad, 0xe3ae, 0xe3af, 0xe3b0, 0xe3b1, 0xe3b2, - 0xe3b3, 0xe3b4, 0xe3b5, 0xe3b6, 0xe3b7, 0xe3b8, 0xe3b9, 0xe3ba, - 0xe3bb, 0xe3bc, 0xe3bd, 0xe3be, 0xe3bf, 0xe3c0, 0xe3c1, 0xe3c2, - 0xe3c3, 0xe3c4, 0xe3c5, 0xe3c6, 0xe3c7, 0xe3c8, 0xe3c9, 0xe3ca, - 0xe3cb, 0xe3cc, 0xe3cd, 0xe3ce, 0xe3cf, 0xe3d0, 0xe3d1, 0xe3d2, - 0xe3d3, 0xe3d4, 0xe3d5, 0xe3d6, 0xe3d7, 0xe3d8, 0xe3d9, 0xe3da, - 0xe3db, 0xe3dc, 0xe3dd, 0xe3de, 0xe3df, 0xe3e0, 0xe3e1, 0xe3e2, - 0xe3e3, 0xe3e4, 0xe3e5, 0xe3e6, 0xe3e7, 0xe3e8, 0xe3e9, 0xe3ea, - 0xe3eb, 0xe3ec, 0xe3ed, 0xe3ee, 0xe3ef, 0xe3f0, 0xe3f1, 0xe3f2, - 0xe3f3, 0xe3f4, 0xe3f5, 0xe3f6, 0xe3f7, 0xe3f8, 0xe3f9, 0xe3fa, - 0xe3fb, 0xe3fc, 0xe3fd, 0xe3fe, 0xe3ff, 0xe400, 0xe401, 0xe402, - 0xe403, 0xe404, 0xe405, 0xe406, 0xe407, 0xe408, 0xe409, 0x003f, - /* lead byte fd */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9f32, 0x9f33, 0x9f34, 0x9f35, 0x9f36, 0x9f38, 0x9f3a, 0x9f3c, - 0x9f3f, 0x9f40, 0x9f41, 0x9f42, 0x9f43, 0x9f45, 0x9f46, 0x9f47, - 0x9f48, 0x9f49, 0x9f4a, 0x9f4b, 0x9f4c, 0x9f4d, 0x9f4e, 0x9f4f, - 0x9f52, 0x9f53, 0x9f54, 0x9f55, 0x9f56, 0x9f57, 0x9f58, 0x9f59, - 0x9f5a, 0x9f5b, 0x9f5c, 0x9f5d, 0x9f5e, 0x9f5f, 0x9f60, 0x9f61, - 0x9f62, 0x9f63, 0x9f64, 0x9f65, 0x9f66, 0x9f67, 0x9f68, 0x9f69, - 0x9f6a, 0x9f6b, 0x9f6c, 0x9f6d, 0x9f6e, 0x9f6f, 0x9f70, 0x9f71, - 0x9f72, 0x9f73, 0x9f74, 0x9f75, 0x9f76, 0x9f77, 0x9f78, 0x003f, - 0x9f79, 0x9f7a, 0x9f7b, 0x9f7c, 0x9f7d, 0x9f7e, 0x9f81, 0x9f82, - 0x9f8d, 0x9f8e, 0x9f8f, 0x9f90, 0x9f91, 0x9f92, 0x9f93, 0x9f94, - 0x9f95, 0x9f96, 0x9f97, 0x9f98, 0x9f9c, 0x9f9d, 0x9f9e, 0x9fa1, - 0x9fa2, 0x9fa3, 0x9fa4, 0x9fa5, 0xf92c, 0xf979, 0xf995, 0xf9e7, - 0xf9f1, 0xe40a, 0xe40b, 0xe40c, 0xe40d, 0xe40e, 0xe40f, 0xe410, - 0xe411, 0xe412, 0xe413, 0xe414, 0xe415, 0xe416, 0xe417, 0xe418, - 0xe419, 0xe41a, 0xe41b, 0xe41c, 0xe41d, 0xe41e, 0xe41f, 0xe420, - 0xe421, 0xe422, 0xe423, 0xe424, 0xe425, 0xe426, 0xe427, 0xe428, - 0xe429, 0xe42a, 0xe42b, 0xe42c, 0xe42d, 0xe42e, 0xe42f, 0xe430, - 0xe431, 0xe432, 0xe433, 0xe434, 0xe435, 0xe436, 0xe437, 0xe438, - 0xe439, 0xe43a, 0xe43b, 0xe43c, 0xe43d, 0xe43e, 0xe43f, 0xe440, - 0xe441, 0xe442, 0xe443, 0xe444, 0xe445, 0xe446, 0xe447, 0xe448, - 0xe449, 0xe44a, 0xe44b, 0xe44c, 0xe44d, 0xe44e, 0xe44f, 0xe450, - 0xe451, 0xe452, 0xe453, 0xe454, 0xe455, 0xe456, 0xe457, 0xe458, - 0xe459, 0xe45a, 0xe45b, 0xe45c, 0xe45d, 0xe45e, 0xe45f, 0xe460, - 0xe461, 0xe462, 0xe463, 0xe464, 0xe465, 0xe466, 0xe467, 0x003f, - /* lead byte fe */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xfa0c, 0xfa0d, 0xfa0e, 0xfa0f, 0xfa11, 0xfa13, 0xfa14, 0xfa18, - 0xfa1f, 0xfa20, 0xfa21, 0xfa23, 0xfa24, 0xfa27, 0xfa28, 0xfa29, - 0xe815, 0xe816, 0xe817, 0xe818, 0xe819, 0xe81a, 0xe81b, 0xe81c, - 0xe81d, 0xe81e, 0xe81f, 0xe820, 0xe821, 0xe822, 0xe823, 0xe824, - 0xe825, 0xe826, 0xe827, 0xe828, 0xe829, 0xe82a, 0xe82b, 0xe82c, - 0xe82d, 0xe82e, 0xe82f, 0xe830, 0xe831, 0xe832, 0xe833, 0xe834, - 0xe835, 0xe836, 0xe837, 0xe838, 0xe839, 0xe83a, 0xe83b, 0xe83c, - 0xe83d, 0xe83e, 0xe83f, 0xe840, 0xe841, 0xe842, 0xe843, 0x003f, - 0xe844, 0xe845, 0xe846, 0xe847, 0xe848, 0xe849, 0xe84a, 0xe84b, - 0xe84c, 0xe84d, 0xe84e, 0xe84f, 0xe850, 0xe851, 0xe852, 0xe853, - 0xe854, 0xe855, 0xe856, 0xe857, 0xe858, 0xe859, 0xe85a, 0xe85b, - 0xe85c, 0xe85d, 0xe85e, 0xe85f, 0xe860, 0xe861, 0xe862, 0xe863, - 0xe864, 0xe468, 0xe469, 0xe46a, 0xe46b, 0xe46c, 0xe46d, 0xe46e, - 0xe46f, 0xe470, 0xe471, 0xe472, 0xe473, 0xe474, 0xe475, 0xe476, - 0xe477, 0xe478, 0xe479, 0xe47a, 0xe47b, 0xe47c, 0xe47d, 0xe47e, - 0xe47f, 0xe480, 0xe481, 0xe482, 0xe483, 0xe484, 0xe485, 0xe486, - 0xe487, 0xe488, 0xe489, 0xe48a, 0xe48b, 0xe48c, 0xe48d, 0xe48e, - 0xe48f, 0xe490, 0xe491, 0xe492, 0xe493, 0xe494, 0xe495, 0xe496, - 0xe497, 0xe498, 0xe499, 0xe49a, 0xe49b, 0xe49c, 0xe49d, 0xe49e, - 0xe49f, 0xe4a0, 0xe4a1, 0xe4a2, 0xe4a3, 0xe4a4, 0xe4a5, 0xe4a6, - 0xe4a7, 0xe4a8, 0xe4a9, 0xe4aa, 0xe4ab, 0xe4ac, 0xe4ad, 0xe4ae, - 0xe4af, 0xe4b0, 0xe4b1, 0xe4b2, 0xe4b3, 0xe4b4, 0xe4b5, 0xe4b6, - 0xe4b7, 0xe4b8, 0xe4b9, 0xe4ba, 0xe4bb, 0xe4bc, 0xe4bd, 0xe4be, - 0xe4bf, 0xe4c0, 0xe4c1, 0xe4c2, 0xe4c3, 0xe4c4, 0xe4c5, 0x003f -}; - -static const unsigned char cp2uni_leadbytes[256] = -{ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x00 -}; - -static const unsigned short uni2cp_low[28928] = -{ - /* 0x0000 .. 0x00ff */ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa1e9, 0xa1ea, 0xa1e8, 0xa3a4, 0x007c, 0xa1ec, - 0xa1a7, 0x003f, 0x0061, 0x003f, 0x003f, 0x002d, 0x003f, 0xa1a5, - 0xa1e3, 0xa1c0, 0x0032, 0x0033, 0xa1e4, 0xa6cc, 0x003f, 0xa1a4, - 0x003f, 0x0031, 0x006f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa8a4, 0xa8a2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa8a8, 0xa8a6, 0xa8ba, 0x003f, 0xa8ac, 0xa8aa, 0x003f, 0x003f, - 0x0044, 0x003f, 0xa8b0, 0xa8ae, 0x003f, 0x003f, 0x003f, 0xa1c1, - 0x003f, 0xa8b4, 0xa8b2, 0x003f, 0xa8b9, 0x0059, 0x0054, 0x003f, - 0xa8a4, 0xa8a2, 0x0061, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa8a8, 0xa8a6, 0xa8ba, 0x003f, 0xa8ac, 0xa8aa, 0x003f, 0x003f, - 0x0065, 0x003f, 0xa8b0, 0xa8ae, 0x003f, 0x003f, 0x003f, 0xa1c2, - 0x003f, 0xa8b4, 0xa8b2, 0x003f, 0xa8b9, 0x0079, 0x0074, 0x003f, - /* 0x0100 .. 0x01ff */ - 0xa8a1, 0xa8a1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa8a5, 0xa8a5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa8a7, 0xa8a7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa8a9, 0xa8a9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa8bd, 0x003f, 0x003f, 0x003f, - 0xa8be, 0x003f, 0x003f, 0x003f, 0xa8ad, 0xa8ad, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa8b1, 0xa8b1, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa1ce, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa8a3, 0xa8a3, 0xa8ab, - 0xa8ab, 0xa8af, 0xa8af, 0xa8b3, 0xa8b3, 0xa8b5, 0xa8b5, 0xa8b6, - 0xa8b6, 0xa8b7, 0xa8b7, 0xa8b8, 0xa8b8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x0200 .. 0x02ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa8bb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa8c0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1a6, - 0x003f, 0xa1a5, 0xa840, 0xa841, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa842, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x0300 .. 0x03ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa6a1, 0xa6a2, 0xa6a3, 0xa6a4, 0xa6a5, 0xa6a6, 0xa6a7, - 0xa6a8, 0xa6a9, 0xa6aa, 0xa6ab, 0xa6ac, 0xa6ad, 0xa6ae, 0xa6af, - 0xa6b0, 0xa6b1, 0x003f, 0xa6b2, 0xa6b3, 0xa6b4, 0xa6b5, 0xa6b6, - 0xa6b7, 0xa6b8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa6c1, 0xa6c2, 0xa6c3, 0xa6c4, 0xa6c5, 0xa6c6, 0xa6c7, - 0xa6c8, 0xa6c9, 0xa6ca, 0xa6cb, 0xa6cc, 0xa6cd, 0xa6ce, 0xa6cf, - 0xa6d0, 0xa6d1, 0x003f, 0xa6d2, 0xa6d3, 0xa6d4, 0xa6d5, 0xa6d6, - 0xa6d7, 0xa6d8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x0400 .. 0x04ff */ - 0x003f, 0xa7a7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa7a1, 0xa7a2, 0xa7a3, 0xa7a4, 0xa7a5, 0xa7a6, 0xa7a8, 0xa7a9, - 0xa7aa, 0xa7ab, 0xa7ac, 0xa7ad, 0xa7ae, 0xa7af, 0xa7b0, 0xa7b1, - 0xa7b2, 0xa7b3, 0xa7b4, 0xa7b5, 0xa7b6, 0xa7b7, 0xa7b8, 0xa7b9, - 0xa7ba, 0xa7bb, 0xa7bc, 0xa7bd, 0xa7be, 0xa7bf, 0xa7c0, 0xa7c1, - 0xa7d1, 0xa7d2, 0xa7d3, 0xa7d4, 0xa7d5, 0xa7d6, 0xa7d8, 0xa7d9, - 0xa7da, 0xa7db, 0xa7dc, 0xa7dd, 0xa7de, 0xa7df, 0xa7e0, 0xa7e1, - 0xa7e2, 0xa7e3, 0xa7e4, 0xa7e5, 0xa7e6, 0xa7e7, 0xa7e8, 0xa7e9, - 0xa7ea, 0xa7eb, 0xa7ec, 0xa7ed, 0xa7ee, 0xa7ef, 0xa7f0, 0xa7f1, - 0x003f, 0xa7d7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2000 .. 0x20ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa95c, 0x003f, 0x003f, 0xa843, 0xa1aa, 0xa844, 0xa1ac, 0x003f, - 0xa1ae, 0xa1af, 0x003f, 0x003f, 0xa1b0, 0xa1b1, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa845, 0xa1ad, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa1eb, 0x003f, 0xa1e4, 0xa1e5, 0x003f, 0xa846, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xa1f9, 0x003f, 0x003f, 0xa3fe, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x0080, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2100 .. 0x21ff */ - 0x003f, 0x003f, 0x003f, 0xa1e6, 0x003f, 0xa847, 0x003f, 0x003f, - 0x003f, 0xa848, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1ed, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa959, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa2f1, 0xa2f2, 0xa2f3, 0xa2f4, 0xa2f5, 0xa2f6, 0xa2f7, 0xa2f8, - 0xa2f9, 0xa2fa, 0xa2fb, 0xa2fc, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa2a1, 0xa2a2, 0xa2a3, 0xa2a4, 0xa2a5, 0xa2a6, 0xa2a7, 0xa2a8, - 0xa2a9, 0xa2aa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa1fb, 0xa1fc, 0xa1fa, 0xa1fd, 0x003f, 0x003f, 0xa849, 0xa84a, - 0xa84b, 0xa84c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2200 .. 0x22ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa1ca, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1c7, - 0x003f, 0xa1c6, 0x003f, 0x003f, 0x003f, 0xa84d, 0x003f, 0x003f, - 0xa1e3, 0x003f, 0xa1cc, 0x003f, 0x003f, 0xa1d8, 0xa1de, 0xa84e, - 0xa1cf, 0x003f, 0x003f, 0xa84f, 0x003f, 0xa1ce, 0x003f, 0xa1c4, - 0xa1c5, 0xa1c9, 0xa1c8, 0xa1d2, 0x003f, 0x003f, 0xa1d3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa1e0, 0xa1df, 0xa1c3, 0xa1cb, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa1ab, 0xa1d7, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa1d6, 0x003f, 0x003f, 0x003f, 0xa1d5, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa850, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa1d9, 0xa1d4, 0x003f, 0x003f, 0xa1dc, 0xa1dd, 0xa851, 0xa852, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1da, 0xa1db, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa892, 0x003f, 0x003f, - 0x003f, 0xa1d1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1cd, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa853, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2300 .. 0x23ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa1d0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2400 .. 0x24ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa2d9, 0xa2da, 0xa2db, 0xa2dc, 0xa2dd, 0xa2de, 0xa2df, 0xa2e0, - 0xa2e1, 0xa2e2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa2c5, 0xa2c6, 0xa2c7, 0xa2c8, - 0xa2c9, 0xa2ca, 0xa2cb, 0xa2cc, 0xa2cd, 0xa2ce, 0xa2cf, 0xa2d0, - 0xa2d1, 0xa2d2, 0xa2d3, 0xa2d4, 0xa2d5, 0xa2d6, 0xa2d7, 0xa2d8, - 0xa2b1, 0xa2b2, 0xa2b3, 0xa2b4, 0xa2b5, 0xa2b6, 0xa2b7, 0xa2b8, - 0xa2b9, 0xa2ba, 0xa2bb, 0xa2bc, 0xa2bd, 0xa2be, 0xa2bf, 0xa2c0, - 0xa2c1, 0xa2c2, 0xa2c3, 0xa2c4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2500 .. 0x25ff */ - 0xa9a4, 0xa9a5, 0xa9a6, 0xa9a7, 0xa9a8, 0xa9a9, 0xa9aa, 0xa9ab, - 0xa9ac, 0xa9ad, 0xa9ae, 0xa9af, 0xa9b0, 0xa9b1, 0xa9b2, 0xa9b3, - 0xa9b4, 0xa9b5, 0xa9b6, 0xa9b7, 0xa9b8, 0xa9b9, 0xa9ba, 0xa9bb, - 0xa9bc, 0xa9bd, 0xa9be, 0xa9bf, 0xa9c0, 0xa9c1, 0xa9c2, 0xa9c3, - 0xa9c4, 0xa9c5, 0xa9c6, 0xa9c7, 0xa9c8, 0xa9c9, 0xa9ca, 0xa9cb, - 0xa9cc, 0xa9cd, 0xa9ce, 0xa9cf, 0xa9d0, 0xa9d1, 0xa9d2, 0xa9d3, - 0xa9d4, 0xa9d5, 0xa9d6, 0xa9d7, 0xa9d8, 0xa9d9, 0xa9da, 0xa9db, - 0xa9dc, 0xa9dd, 0xa9de, 0xa9df, 0xa9e0, 0xa9e1, 0xa9e2, 0xa9e3, - 0xa9e4, 0xa9e5, 0xa9e6, 0xa9e7, 0xa9e8, 0xa9e9, 0xa9ea, 0xa9eb, - 0xa9ec, 0xa9ed, 0xa9ee, 0xa9ef, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa854, 0xa855, 0xa856, 0xa857, 0xa858, 0xa859, 0xa85a, 0xa85b, - 0xa85c, 0xa85d, 0xa85e, 0xa85f, 0xa860, 0xa861, 0xa862, 0xa863, - 0xa864, 0xa865, 0xa866, 0xa867, 0xa868, 0xa869, 0xa86a, 0xa86b, - 0xa86c, 0xa86d, 0xa86e, 0xa86f, 0xa870, 0xa871, 0xa872, 0xa873, - 0xa874, 0xa875, 0xa876, 0xa877, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa878, 0xa879, 0xa87a, 0xa87b, 0xa87c, 0xa87d, 0xa87e, - 0xa880, 0xa881, 0xa882, 0xa883, 0xa884, 0xa885, 0xa886, 0xa887, - 0x003f, 0x003f, 0x003f, 0xa888, 0xa889, 0xa88a, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa1f6, 0xa1f5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa1f8, 0xa1f7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa88b, 0xa88c, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1f4, 0xa1f3, - 0x003f, 0x003f, 0x003f, 0xa1f0, 0x003f, 0x003f, 0xa1f2, 0xa1f1, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa88d, 0xa88e, 0xa88f, 0xa890, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2600 .. 0x26ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1ef, 0xa1ee, 0x003f, - 0x003f, 0xa891, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa1e2, 0x003f, 0xa1e1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x3000 .. 0x30ff */ - 0xa1a1, 0xa1a2, 0xa1a3, 0xa1a8, 0x003f, 0xa1a9, 0xa965, 0xa996, - 0xa1b4, 0xa1b5, 0xa1b6, 0xa1b7, 0xa1b8, 0xa1b9, 0xa1ba, 0xa1bb, - 0xa1be, 0xa1bf, 0xa893, 0xa1fe, 0xa1b2, 0xa1b3, 0xa1bc, 0xa1bd, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa894, 0xa895, 0x003f, - 0x003f, 0xa940, 0xa941, 0xa942, 0xa943, 0xa944, 0xa945, 0xa946, - 0xa947, 0xa948, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa4a1, 0xa4a2, 0xa4a3, 0xa4a4, 0xa4a5, 0xa4a6, 0xa4a7, - 0xa4a8, 0xa4a9, 0xa4aa, 0xa4ab, 0xa4ac, 0xa4ad, 0xa4ae, 0xa4af, - 0xa4b0, 0xa4b1, 0xa4b2, 0xa4b3, 0xa4b4, 0xa4b5, 0xa4b6, 0xa4b7, - 0xa4b8, 0xa4b9, 0xa4ba, 0xa4bb, 0xa4bc, 0xa4bd, 0xa4be, 0xa4bf, - 0xa4c0, 0xa4c1, 0xa4c2, 0xa4c3, 0xa4c4, 0xa4c5, 0xa4c6, 0xa4c7, - 0xa4c8, 0xa4c9, 0xa4ca, 0xa4cb, 0xa4cc, 0xa4cd, 0xa4ce, 0xa4cf, - 0xa4d0, 0xa4d1, 0xa4d2, 0xa4d3, 0xa4d4, 0xa4d5, 0xa4d6, 0xa4d7, - 0xa4d8, 0xa4d9, 0xa4da, 0xa4db, 0xa4dc, 0xa4dd, 0xa4de, 0xa4df, - 0xa4e0, 0xa4e1, 0xa4e2, 0xa4e3, 0xa4e4, 0xa4e5, 0xa4e6, 0xa4e7, - 0xa4e8, 0xa4e9, 0xa4ea, 0xa4eb, 0xa4ec, 0xa4ed, 0xa4ee, 0xa4ef, - 0xa4f0, 0xa4f1, 0xa4f2, 0xa4f3, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xa961, 0xa962, 0xa966, 0xa967, 0x003f, - 0x003f, 0xa5a1, 0xa5a2, 0xa5a3, 0xa5a4, 0xa5a5, 0xa5a6, 0xa5a7, - 0xa5a8, 0xa5a9, 0xa5aa, 0xa5ab, 0xa5ac, 0xa5ad, 0xa5ae, 0xa5af, - 0xa5b0, 0xa5b1, 0xa5b2, 0xa5b3, 0xa5b4, 0xa5b5, 0xa5b6, 0xa5b7, - 0xa5b8, 0xa5b9, 0xa5ba, 0xa5bb, 0xa5bc, 0xa5bd, 0xa5be, 0xa5bf, - 0xa5c0, 0xa5c1, 0xa5c2, 0xa5c3, 0xa5c4, 0xa5c5, 0xa5c6, 0xa5c7, - 0xa5c8, 0xa5c9, 0xa5ca, 0xa5cb, 0xa5cc, 0xa5cd, 0xa5ce, 0xa5cf, - 0xa5d0, 0xa5d1, 0xa5d2, 0xa5d3, 0xa5d4, 0xa5d5, 0xa5d6, 0xa5d7, - 0xa5d8, 0xa5d9, 0xa5da, 0xa5db, 0xa5dc, 0xa5dd, 0xa5de, 0xa5df, - 0xa5e0, 0xa5e1, 0xa5e2, 0xa5e3, 0xa5e4, 0xa5e5, 0xa5e6, 0xa5e7, - 0xa5e8, 0xa5e9, 0xa5ea, 0xa5eb, 0xa5ec, 0xa5ed, 0xa5ee, 0xa5ef, - 0xa5f0, 0xa5f1, 0xa5f2, 0xa5f3, 0xa5f4, 0xa5f5, 0xa5f6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa960, 0xa963, 0xa964, 0x003f, - /* 0x3100 .. 0x31ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa8c5, 0xa8c6, 0xa8c7, - 0xa8c8, 0xa8c9, 0xa8ca, 0xa8cb, 0xa8cc, 0xa8cd, 0xa8ce, 0xa8cf, - 0xa8d0, 0xa8d1, 0xa8d2, 0xa8d3, 0xa8d4, 0xa8d5, 0xa8d6, 0xa8d7, - 0xa8d8, 0xa8d9, 0xa8da, 0xa8db, 0xa8dc, 0xa8dd, 0xa8de, 0xa8df, - 0xa8e0, 0xa8e1, 0xa8e2, 0xa8e3, 0xa8e4, 0xa8e5, 0xa8e6, 0xa8e7, - 0xa8e8, 0xa8e9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd2bb, 0xb6fe, 0xc8fd, 0xcbc4, 0xc9cf, 0xd6d0, - 0xcfc2, 0xbcd7, 0xd2d2, 0xb1fb, 0xb6a1, 0xccec, 0xb5d8, 0xc8cb, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x3200 .. 0x32ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa2e5, 0xa2e6, 0xa2e7, 0xa2e8, 0xa2e9, 0xa2ea, 0xa2eb, 0xa2ec, - 0xa2ed, 0xa2ee, 0xd4c2, 0xbbf0, 0xcbae, 0xc4be, 0xbdf0, 0xcdc1, - 0xc8d5, 0xa95a, 0xd3d0, 0xc9e7, 0xc3fb, 0xccd8, 0xb2c6, 0xd7a3, - 0xc0cd, 0xb4fa, 0xbaf4, 0xd1a7, 0xbce0, 0xc6f3, 0xd7ca, 0xd0ad, - 0xbcc0, 0xd0dd, 0xd7d4, 0xd6c1, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd2bb, 0xb6fe, 0xc8fd, 0xcbc4, 0xcee5, 0xc1f9, 0xc6df, 0xb0cb, - 0xbec5, 0xcaae, 0xd4c2, 0xbbf0, 0xcbae, 0xc4be, 0xbdf0, 0xcdc1, - 0xc8d5, 0xd6ea, 0xd3d0, 0xc9e7, 0xc3fb, 0xccd8, 0xb2c6, 0xd7a3, - 0xc0cd, 0xc3d8, 0xc4d0, 0xc5ae, 0xcaca, 0xd3c5, 0x003f, 0xd7a2, - 0xcfee, 0xd0dd, 0xd0b4, 0xa949, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd2bd, 0xd7da, 0xd1a7, 0xbce0, 0xc6f3, 0xd7ca, 0xd0ad, - 0xd2b9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x3300 .. 0x33ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa94a, 0xa94b, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa94c, 0xa94d, 0xa94e, 0x003f, - 0x003f, 0xa94f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa950, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa951, 0x003f, - 0x003f, 0xa952, 0xa953, 0x003f, 0x003f, 0xa954, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x4e00 .. 0x4eff */ - 0xd2bb, 0xb6a1, 0x8140, 0xc6df, 0x8141, 0x8142, 0x8143, 0xcdf2, - 0xd5c9, 0xc8fd, 0xc9cf, 0xcfc2, 0xd8a2, 0xb2bb, 0xd3eb, 0x8144, - 0xd8a4, 0xb3f3, 0x8145, 0xd7a8, 0xc7d2, 0xd8a7, 0xcac0, 0x8146, - 0xc7f0, 0xb1fb, 0xd2b5, 0xb4d4, 0xb6ab, 0xcbbf, 0xd8a9, 0x8147, - 0x8148, 0x8149, 0xb6aa, 0x814a, 0xc1bd, 0xd1cf, 0x814b, 0xc9a5, - 0xd8ad, 0x814c, 0xb8f6, 0xd1be, 0xe3dc, 0xd6d0, 0x814d, 0x814e, - 0xb7e1, 0x814f, 0xb4ae, 0x8150, 0xc1d9, 0x8151, 0xd8bc, 0x8152, - 0xcde8, 0xb5a4, 0xceaa, 0xd6f7, 0x8153, 0xc0f6, 0xbed9, 0xd8af, - 0x8154, 0x8155, 0x8156, 0xc4cb, 0x8157, 0xbec3, 0x8158, 0xd8b1, - 0xc3b4, 0xd2e5, 0x8159, 0xd6ae, 0xceda, 0xd5a7, 0xbaf5, 0xb7a6, - 0xc0d6, 0x815a, 0xc6b9, 0xc5d2, 0xc7c7, 0x815b, 0xb9d4, 0x815c, - 0xb3cb, 0xd2d2, 0x815d, 0x815e, 0xd8bf, 0xbec5, 0xc6f2, 0xd2b2, - 0xcfb0, 0xcfe7, 0x815f, 0x8160, 0x8161, 0x8162, 0xcae9, 0x8163, - 0x8164, 0xd8c0, 0x8165, 0x8166, 0x8167, 0x8168, 0x8169, 0x816a, - 0xc2f2, 0xc2d2, 0x816b, 0xc8e9, 0x816c, 0x816d, 0x816e, 0x816f, - 0x8170, 0x8171, 0x8172, 0x8173, 0x8174, 0x8175, 0xc7ac, 0x8176, - 0x8177, 0x8178, 0x8179, 0x817a, 0x817b, 0x817c, 0xc1cb, 0x817d, - 0xd3e8, 0xd5f9, 0x817e, 0xcac2, 0xb6fe, 0xd8a1, 0xd3da, 0xbff7, - 0x8180, 0xd4c6, 0xbba5, 0xd8c1, 0xcee5, 0xbeae, 0x8181, 0x8182, - 0xd8a8, 0x8183, 0xd1c7, 0xd0a9, 0x8184, 0x8185, 0x8186, 0xd8bd, - 0xd9ef, 0xcdf6, 0xbfba, 0x8187, 0xbdbb, 0xbaa5, 0xd2e0, 0xb2fa, - 0xbae0, 0xc4b6, 0x8188, 0xcfed, 0xbea9, 0xcda4, 0xc1c1, 0x8189, - 0x818a, 0x818b, 0xc7d7, 0xd9f1, 0x818c, 0xd9f4, 0x818d, 0x818e, - 0x818f, 0x8190, 0xc8cb, 0xd8e9, 0x8191, 0x8192, 0x8193, 0xd2da, - 0xcab2, 0xc8ca, 0xd8ec, 0xd8ea, 0xd8c6, 0xbdf6, 0xc6cd, 0xb3f0, - 0x8194, 0xd8eb, 0xbdf1, 0xbde9, 0x8195, 0xc8d4, 0xb4d3, 0x8196, - 0x8197, 0xc2d8, 0x8198, 0xb2d6, 0xd7d0, 0xcacb, 0xcbfb, 0xd5cc, - 0xb8b6, 0xcfc9, 0x8199, 0x819a, 0x819b, 0xd9da, 0xd8f0, 0xc7aa, - 0x819c, 0xd8ee, 0x819d, 0xb4fa, 0xc1ee, 0xd2d4, 0x819e, 0x819f, - 0xd8ed, 0x81a0, 0xd2c7, 0xd8ef, 0xc3c7, 0x81a1, 0x81a2, 0x81a3, - 0xd1f6, 0x81a4, 0xd6d9, 0xd8f2, 0x81a5, 0xd8f5, 0xbcfe, 0xbcdb, - 0x81a6, 0x81a7, 0x81a8, 0xc8ce, 0x81a9, 0xb7dd, 0x81aa, 0xb7c2, - /* 0x4f00 .. 0x4fff */ - 0x81ab, 0xc6f3, 0x81ac, 0x81ad, 0x81ae, 0x81af, 0x81b0, 0x81b1, - 0x81b2, 0xd8f8, 0xd2c1, 0x81b3, 0x81b4, 0xcee9, 0xbcbf, 0xb7fc, - 0xb7a5, 0xd0dd, 0x81b5, 0x81b6, 0x81b7, 0x81b8, 0x81b9, 0xd6da, - 0xd3c5, 0xbbef, 0xbbe1, 0xd8f1, 0x81ba, 0x81bb, 0xc9a1, 0xceb0, - 0xb4ab, 0x81bc, 0xd8f3, 0x81bd, 0xc9cb, 0xd8f6, 0xc2d7, 0xd8f7, - 0x81be, 0x81bf, 0xceb1, 0xd8f9, 0x81c0, 0x81c1, 0x81c2, 0xb2ae, - 0xb9c0, 0x81c3, 0xd9a3, 0x81c4, 0xb0e9, 0x81c5, 0xc1e6, 0x81c6, - 0xc9ec, 0x81c7, 0xcbc5, 0x81c8, 0xcbc6, 0xd9a4, 0x81c9, 0x81ca, - 0x81cb, 0x81cc, 0x81cd, 0xb5e8, 0x81ce, 0x81cf, 0xb5ab, 0x81d0, - 0x81d1, 0x81d2, 0x81d3, 0x81d4, 0x81d5, 0xcebb, 0xb5cd, 0xd7a1, - 0xd7f4, 0xd3d3, 0x81d6, 0xcce5, 0x81d7, 0xbace, 0x81d8, 0xd9a2, - 0xd9dc, 0xd3e0, 0xd8fd, 0xb7f0, 0xd7f7, 0xd8fe, 0xd8fa, 0xd9a1, - 0xc4e3, 0x81d9, 0x81da, 0xd3b6, 0xd8f4, 0xd9dd, 0x81db, 0xd8fb, - 0x81dc, 0xc5e5, 0x81dd, 0x81de, 0xc0d0, 0x81df, 0x81e0, 0xd1f0, - 0xb0db, 0x81e1, 0x81e2, 0xbcd1, 0xd9a6, 0x81e3, 0xd9a5, 0x81e4, - 0x81e5, 0x81e6, 0x81e7, 0xd9ac, 0xd9ae, 0x81e8, 0xd9ab, 0xcab9, - 0x81e9, 0x81ea, 0x81eb, 0xd9a9, 0xd6b6, 0x81ec, 0x81ed, 0x81ee, - 0xb3de, 0xd9a8, 0x81ef, 0xc0fd, 0x81f0, 0xcacc, 0x81f1, 0xd9aa, - 0x81f2, 0xd9a7, 0x81f3, 0x81f4, 0xd9b0, 0x81f5, 0x81f6, 0xb6b1, - 0x81f7, 0x81f8, 0x81f9, 0xb9a9, 0x81fa, 0xd2c0, 0x81fb, 0x81fc, - 0xcfc0, 0x81fd, 0x81fe, 0xc2c2, 0x8240, 0xbdc4, 0xd5ec, 0xb2e0, - 0xc7c8, 0xbfeb, 0xd9ad, 0x8241, 0xd9af, 0x8242, 0xceea, 0xbaee, - 0x8243, 0x8244, 0x8245, 0x8246, 0x8247, 0xc7d6, 0x8248, 0x8249, - 0x824a, 0x824b, 0x824c, 0x824d, 0x824e, 0x824f, 0x8250, 0xb1e3, - 0x8251, 0x8252, 0x8253, 0xb4d9, 0xb6ed, 0xd9b4, 0x8254, 0x8255, - 0x8256, 0x8257, 0xbfa1, 0x8258, 0x8259, 0x825a, 0xd9de, 0xc7ce, - 0xc0fe, 0xd9b8, 0x825b, 0x825c, 0x825d, 0x825e, 0x825f, 0xcbd7, - 0xb7fd, 0x8260, 0xd9b5, 0x8261, 0xd9b7, 0xb1a3, 0xd3e1, 0xd9b9, - 0x8262, 0xd0c5, 0x8263, 0xd9b6, 0x8264, 0x8265, 0xd9b1, 0x8266, - 0xd9b2, 0xc1a9, 0xd9b3, 0x8267, 0x8268, 0xbcf3, 0xd0de, 0xb8a9, - 0x8269, 0xbee3, 0x826a, 0xd9bd, 0x826b, 0x826c, 0x826d, 0x826e, - 0xd9ba, 0x826f, 0xb0b3, 0x8270, 0x8271, 0x8272, 0xd9c2, 0x8273, - /* 0x5000 .. 0x50ff */ - 0x8274, 0x8275, 0x8276, 0x8277, 0x8278, 0x8279, 0x827a, 0x827b, - 0x827c, 0x827d, 0x827e, 0x8280, 0xd9c4, 0xb1b6, 0x8281, 0xd9bf, - 0x8282, 0x8283, 0xb5b9, 0x8284, 0xbef3, 0x8285, 0x8286, 0x8287, - 0xccc8, 0xbaf2, 0xd2d0, 0x8288, 0xd9c3, 0x8289, 0x828a, 0xbde8, - 0x828b, 0xb3ab, 0x828c, 0x828d, 0x828e, 0xd9c5, 0xbeeb, 0x828f, - 0xd9c6, 0xd9bb, 0xc4df, 0x8290, 0xd9be, 0xd9c1, 0xd9c0, 0x8291, - 0x8292, 0x8293, 0x8294, 0x8295, 0x8296, 0x8297, 0x8298, 0x8299, - 0x829a, 0x829b, 0xd5ae, 0x829c, 0xd6b5, 0x829d, 0xc7e3, 0x829e, - 0x829f, 0x82a0, 0x82a1, 0xd9c8, 0x82a2, 0x82a3, 0x82a4, 0xbcd9, - 0xd9ca, 0x82a5, 0x82a6, 0x82a7, 0xd9bc, 0x82a8, 0xd9cb, 0xc6ab, - 0x82a9, 0x82aa, 0x82ab, 0x82ac, 0x82ad, 0xd9c9, 0x82ae, 0x82af, - 0x82b0, 0x82b1, 0xd7f6, 0x82b2, 0xcda3, 0x82b3, 0x82b4, 0x82b5, - 0x82b6, 0x82b7, 0x82b8, 0x82b9, 0x82ba, 0xbda1, 0x82bb, 0x82bc, - 0x82bd, 0x82be, 0x82bf, 0x82c0, 0xd9cc, 0x82c1, 0x82c2, 0x82c3, - 0x82c4, 0x82c5, 0x82c6, 0x82c7, 0x82c8, 0x82c9, 0xc5bc, 0xcdb5, - 0x82ca, 0x82cb, 0x82cc, 0xd9cd, 0x82cd, 0x82ce, 0xd9c7, 0xb3a5, - 0xbffe, 0x82cf, 0x82d0, 0x82d1, 0x82d2, 0xb8b5, 0x82d3, 0x82d4, - 0xc0fc, 0x82d5, 0x82d6, 0x82d7, 0x82d8, 0xb0f8, 0x82d9, 0x82da, - 0x82db, 0x82dc, 0x82dd, 0x82de, 0x82df, 0x82e0, 0x82e1, 0x82e2, - 0x82e3, 0x82e4, 0x82e5, 0x82e6, 0x82e7, 0x82e8, 0x82e9, 0x82ea, - 0x82eb, 0x82ec, 0x82ed, 0xb4f6, 0x82ee, 0xd9ce, 0x82ef, 0xd9cf, - 0xb4a2, 0xd9d0, 0x82f0, 0x82f1, 0xb4df, 0x82f2, 0x82f3, 0x82f4, - 0x82f5, 0x82f6, 0xb0c1, 0x82f7, 0x82f8, 0x82f9, 0x82fa, 0x82fb, - 0x82fc, 0x82fd, 0xd9d1, 0xc9b5, 0x82fe, 0x8340, 0x8341, 0x8342, - 0x8343, 0x8344, 0x8345, 0x8346, 0x8347, 0x8348, 0x8349, 0x834a, - 0x834b, 0x834c, 0x834d, 0x834e, 0x834f, 0x8350, 0x8351, 0xcff1, - 0x8352, 0x8353, 0x8354, 0x8355, 0x8356, 0x8357, 0xd9d2, 0x8358, - 0x8359, 0x835a, 0xc1c5, 0x835b, 0x835c, 0x835d, 0x835e, 0x835f, - 0x8360, 0x8361, 0x8362, 0x8363, 0x8364, 0x8365, 0xd9d6, 0xc9ae, - 0x8366, 0x8367, 0x8368, 0x8369, 0xd9d5, 0xd9d4, 0xd9d7, 0x836a, - 0x836b, 0x836c, 0x836d, 0xcbdb, 0x836e, 0xbda9, 0x836f, 0x8370, - 0x8371, 0x8372, 0x8373, 0xc6a7, 0x8374, 0x8375, 0x8376, 0x8377, - /* 0x5100 .. 0x51ff */ - 0x8378, 0x8379, 0x837a, 0x837b, 0x837c, 0x837d, 0xd9d3, 0xd9d8, - 0x837e, 0x8380, 0x8381, 0xd9d9, 0x8382, 0x8383, 0x8384, 0x8385, - 0x8386, 0x8387, 0xc8e5, 0x8388, 0x8389, 0x838a, 0x838b, 0x838c, - 0x838d, 0x838e, 0x838f, 0x8390, 0x8391, 0x8392, 0x8393, 0x8394, - 0x8395, 0xc0dc, 0x8396, 0x8397, 0x8398, 0x8399, 0x839a, 0x839b, - 0x839c, 0x839d, 0x839e, 0x839f, 0x83a0, 0x83a1, 0x83a2, 0x83a3, - 0x83a4, 0x83a5, 0x83a6, 0x83a7, 0x83a8, 0x83a9, 0x83aa, 0x83ab, - 0x83ac, 0x83ad, 0x83ae, 0x83af, 0x83b0, 0x83b1, 0x83b2, 0xb6f9, - 0xd8a3, 0xd4ca, 0x83b3, 0xd4aa, 0xd0d6, 0xb3e4, 0xd5d7, 0x83b4, - 0xcfc8, 0xb9e2, 0x83b5, 0xbfcb, 0x83b6, 0xc3e2, 0x83b7, 0x83b8, - 0x83b9, 0xb6d2, 0x83ba, 0x83bb, 0xcdc3, 0xd9ee, 0xd9f0, 0x83bc, - 0x83bd, 0x83be, 0xb5b3, 0x83bf, 0xb6b5, 0x83c0, 0x83c1, 0x83c2, - 0x83c3, 0x83c4, 0xbea4, 0x83c5, 0x83c6, 0xc8eb, 0x83c7, 0x83c8, - 0xc8ab, 0x83c9, 0x83ca, 0xb0cb, 0xb9ab, 0xc1f9, 0xd9e2, 0x83cb, - 0xc0bc, 0xb9b2, 0x83cc, 0xb9d8, 0xd0cb, 0xb1f8, 0xc6e4, 0xbedf, - 0xb5e4, 0xd7c8, 0x83cd, 0xd1f8, 0xbce6, 0xcade, 0x83ce, 0x83cf, - 0xbcbd, 0xd9e6, 0xd8e7, 0x83d0, 0x83d1, 0xc4da, 0x83d2, 0x83d3, - 0xb8d4, 0xc8bd, 0x83d4, 0x83d5, 0xb2e1, 0xd4d9, 0x83d6, 0x83d7, - 0x83d8, 0x83d9, 0xc3b0, 0x83da, 0x83db, 0xc3e1, 0xdaa2, 0xc8df, - 0x83dc, 0xd0b4, 0x83dd, 0xbefc, 0xc5a9, 0x83de, 0x83df, 0x83e0, - 0xb9da, 0x83e1, 0xdaa3, 0x83e2, 0xd4a9, 0xdaa4, 0x83e3, 0x83e4, - 0x83e5, 0x83e6, 0x83e7, 0xd9fb, 0xb6ac, 0x83e8, 0x83e9, 0xb7eb, - 0xb1f9, 0xd9fc, 0xb3e5, 0xbef6, 0x83ea, 0xbff6, 0xd2b1, 0xc0e4, - 0x83eb, 0x83ec, 0x83ed, 0xb6b3, 0xd9fe, 0xd9fd, 0x83ee, 0x83ef, - 0xbebb, 0x83f0, 0x83f1, 0x83f2, 0xc6e0, 0x83f3, 0xd7bc, 0xdaa1, - 0x83f4, 0xc1b9, 0x83f5, 0xb5f2, 0xc1e8, 0x83f6, 0x83f7, 0xbcf5, - 0x83f8, 0xb4d5, 0x83f9, 0x83fa, 0x83fb, 0x83fc, 0x83fd, 0x83fe, - 0x8440, 0x8441, 0x8442, 0xc1dd, 0x8443, 0xc4fd, 0x8444, 0x8445, - 0xbcb8, 0xb7b2, 0x8446, 0x8447, 0xb7ef, 0x8448, 0x8449, 0x844a, - 0x844b, 0x844c, 0x844d, 0xd9ec, 0x844e, 0xc6be, 0x844f, 0xbfad, - 0xbbcb, 0x8450, 0x8451, 0xb5ca, 0x8452, 0xdbc9, 0xd0d7, 0x8453, - 0xcdb9, 0xb0bc, 0xb3f6, 0xbbf7, 0xdbca, 0xbaaf, 0x8454, 0xd4e4, - /* 0x5200 .. 0x52ff */ - 0xb5b6, 0xb5f3, 0xd8d6, 0xc8d0, 0x8455, 0x8456, 0xb7d6, 0xc7d0, - 0xd8d7, 0x8457, 0xbfaf, 0x8458, 0x8459, 0xdbbb, 0xd8d8, 0x845a, - 0x845b, 0xd0cc, 0xbbae, 0x845c, 0x845d, 0x845e, 0xebbe, 0xc1d0, - 0xc1f5, 0xd4f2, 0xb8d5, 0xb4b4, 0x845f, 0xb3f5, 0x8460, 0x8461, - 0xc9be, 0x8462, 0x8463, 0x8464, 0xc5d0, 0x8465, 0x8466, 0x8467, - 0xc5d9, 0xc0fb, 0x8468, 0xb1f0, 0x8469, 0xd8d9, 0xb9ce, 0x846a, - 0xb5bd, 0x846b, 0x846c, 0xd8da, 0x846d, 0x846e, 0xd6c6, 0xcba2, - 0xc8af, 0xc9b2, 0xb4cc, 0xbfcc, 0x846f, 0xb9f4, 0x8470, 0xd8db, - 0xd8dc, 0xb6e7, 0xbcc1, 0xccea, 0x8471, 0x8472, 0x8473, 0x8474, - 0x8475, 0x8476, 0xcff7, 0x8477, 0xd8dd, 0xc7b0, 0x8478, 0x8479, - 0xb9d0, 0xbda3, 0x847a, 0x847b, 0xccde, 0x847c, 0xc6ca, 0x847d, - 0x847e, 0x8480, 0x8481, 0x8482, 0xd8e0, 0x8483, 0xd8de, 0x8484, - 0x8485, 0xd8df, 0x8486, 0x8487, 0x8488, 0xb0fe, 0x8489, 0xbee7, - 0x848a, 0xcaa3, 0xbcf4, 0x848b, 0x848c, 0x848d, 0x848e, 0xb8b1, - 0x848f, 0x8490, 0xb8ee, 0x8491, 0x8492, 0x8493, 0x8494, 0x8495, - 0x8496, 0x8497, 0x8498, 0x8499, 0x849a, 0xd8e2, 0x849b, 0xbdcb, - 0x849c, 0xd8e4, 0xd8e3, 0x849d, 0x849e, 0x849f, 0x84a0, 0x84a1, - 0xc5fc, 0x84a2, 0x84a3, 0x84a4, 0x84a5, 0x84a6, 0x84a7, 0x84a8, - 0xd8e5, 0x84a9, 0x84aa, 0xd8e6, 0x84ab, 0x84ac, 0x84ad, 0x84ae, - 0x84af, 0x84b0, 0x84b1, 0xc1a6, 0x84b2, 0xc8b0, 0xb0ec, 0xb9a6, - 0xbcd3, 0xcef1, 0xdbbd, 0xc1d3, 0x84b3, 0x84b4, 0x84b5, 0x84b6, - 0xb6af, 0xd6fa, 0xc5ac, 0xbdd9, 0xdbbe, 0xdbbf, 0x84b7, 0x84b8, - 0x84b9, 0xc0f8, 0xbea2, 0xc0cd, 0x84ba, 0x84bb, 0x84bc, 0x84bd, - 0x84be, 0x84bf, 0x84c0, 0x84c1, 0x84c2, 0x84c3, 0xdbc0, 0xcac6, - 0x84c4, 0x84c5, 0x84c6, 0xb2aa, 0x84c7, 0x84c8, 0x84c9, 0xd3c2, - 0x84ca, 0xc3e3, 0x84cb, 0xd1ab, 0x84cc, 0x84cd, 0x84ce, 0x84cf, - 0xdbc2, 0x84d0, 0xc0d5, 0x84d1, 0x84d2, 0x84d3, 0xdbc3, 0x84d4, - 0xbfb1, 0x84d5, 0x84d6, 0x84d7, 0x84d8, 0x84d9, 0x84da, 0xc4bc, - 0x84db, 0x84dc, 0x84dd, 0x84de, 0xc7da, 0x84df, 0x84e0, 0x84e1, - 0x84e2, 0x84e3, 0x84e4, 0x84e5, 0x84e6, 0x84e7, 0x84e8, 0x84e9, - 0xdbc4, 0x84ea, 0x84eb, 0x84ec, 0x84ed, 0x84ee, 0x84ef, 0x84f0, - 0x84f1, 0xd9e8, 0xc9d7, 0x84f2, 0x84f3, 0x84f4, 0xb9b4, 0xcef0, - /* 0x5300 .. 0x53ff */ - 0xd4c8, 0x84f5, 0x84f6, 0x84f7, 0x84f8, 0xb0fc, 0xb4d2, 0x84f9, - 0xd0d9, 0x84fa, 0x84fb, 0x84fc, 0x84fd, 0xd9e9, 0x84fe, 0xdecb, - 0xd9eb, 0x8540, 0x8541, 0x8542, 0x8543, 0xd8b0, 0xbbaf, 0xb1b1, - 0x8544, 0xb3d7, 0xd8ce, 0x8545, 0x8546, 0xd4d1, 0x8547, 0x8548, - 0xbdb3, 0xbfef, 0x8549, 0xcfbb, 0x854a, 0x854b, 0xd8d0, 0x854c, - 0x854d, 0x854e, 0xb7cb, 0x854f, 0x8550, 0x8551, 0xd8d1, 0x8552, - 0x8553, 0x8554, 0x8555, 0x8556, 0x8557, 0x8558, 0x8559, 0x855a, - 0x855b, 0xc6a5, 0xc7f8, 0xd2bd, 0x855c, 0x855d, 0xd8d2, 0xc4e4, - 0x855e, 0xcaae, 0x855f, 0xc7a7, 0x8560, 0xd8a6, 0x8561, 0xc9fd, - 0xcee7, 0xbbdc, 0xb0eb, 0x8562, 0x8563, 0x8564, 0xbbaa, 0xd0ad, - 0x8565, 0xb1b0, 0xd7e4, 0xd7bf, 0x8566, 0xb5a5, 0xc2f4, 0xc4cf, - 0x8567, 0x8568, 0xb2a9, 0x8569, 0xb2b7, 0x856a, 0xb1e5, 0xdfb2, - 0xd5bc, 0xbfa8, 0xc2ac, 0xd8d5, 0xc2b1, 0x856b, 0xd8d4, 0xced4, - 0x856c, 0xdae0, 0x856d, 0xcec0, 0x856e, 0x856f, 0xd8b4, 0xc3ae, - 0xd3a1, 0xcea3, 0x8570, 0xbcb4, 0xc8b4, 0xc2d1, 0x8571, 0xbeed, - 0xd0b6, 0x8572, 0xdae1, 0x8573, 0x8574, 0x8575, 0x8576, 0xc7e4, - 0x8577, 0x8578, 0xb3a7, 0x8579, 0xb6f2, 0xccfc, 0xc0fa, 0x857a, - 0x857b, 0xc0f7, 0x857c, 0xd1b9, 0xd1e1, 0xd8c7, 0x857d, 0x857e, - 0x8580, 0x8581, 0x8582, 0x8583, 0x8584, 0xb2de, 0x8585, 0x8586, - 0xc0e5, 0x8587, 0xbaf1, 0x8588, 0x8589, 0xd8c8, 0x858a, 0xd4ad, - 0x858b, 0x858c, 0xcfe1, 0xd8c9, 0x858d, 0xd8ca, 0xcfc3, 0x858e, - 0xb3f8, 0xbec7, 0x858f, 0x8590, 0x8591, 0x8592, 0xd8cb, 0x8593, - 0x8594, 0x8595, 0x8596, 0x8597, 0x8598, 0x8599, 0xdbcc, 0x859a, - 0x859b, 0x859c, 0x859d, 0xc8a5, 0x859e, 0x859f, 0x85a0, 0xcfd8, - 0x85a1, 0xc8fe, 0xb2ce, 0x85a2, 0x85a3, 0x85a4, 0x85a5, 0x85a6, - 0xd3d6, 0xb2e6, 0xbcb0, 0xd3d1, 0xcbab, 0xb7b4, 0x85a7, 0x85a8, - 0x85a9, 0xb7a2, 0x85aa, 0x85ab, 0xcae5, 0x85ac, 0xc8a1, 0xcadc, - 0xb1e4, 0xd0f0, 0x85ad, 0xc5d1, 0x85ae, 0x85af, 0x85b0, 0xdbc5, - 0xb5fe, 0x85b1, 0x85b2, 0xbfda, 0xb9c5, 0xbee4, 0xc1ed, 0x85b3, - 0xdfb6, 0xdfb5, 0xd6bb, 0xbdd0, 0xd5d9, 0xb0c8, 0xb6a3, 0xbfc9, - 0xcca8, 0xdfb3, 0xcab7, 0xd3d2, 0x85b4, 0xd8cf, 0xd2b6, 0xbac5, - 0xcbbe, 0xccbe, 0x85b5, 0xdfb7, 0xb5f0, 0xdfb4, 0x85b6, 0x85b7, - /* 0x5400 .. 0x54ff */ - 0x85b8, 0xd3f5, 0x85b9, 0xb3d4, 0xb8f7, 0x85ba, 0xdfba, 0x85bb, - 0xbacf, 0xbcaa, 0xb5f5, 0x85bc, 0xcdac, 0xc3fb, 0xbaf3, 0xc0f4, - 0xcdc2, 0xcff2, 0xdfb8, 0xcfc5, 0x85bd, 0xc2c0, 0xdfb9, 0xc2f0, - 0x85be, 0x85bf, 0x85c0, 0xbefd, 0x85c1, 0xc1df, 0xcdcc, 0xd2f7, - 0xb7cd, 0xdfc1, 0x85c2, 0xdfc4, 0x85c3, 0x85c4, 0xb7f1, 0xb0c9, - 0xb6d6, 0xb7d4, 0x85c5, 0xbaac, 0xccfd, 0xbfd4, 0xcbb1, 0xc6f4, - 0x85c6, 0xd6a8, 0xdfc5, 0x85c7, 0xcee2, 0xb3b3, 0x85c8, 0x85c9, - 0xcefc, 0xb4b5, 0x85ca, 0xcec7, 0xbaf0, 0x85cb, 0xcee1, 0x85cc, - 0xd1bd, 0x85cd, 0x85ce, 0xdfc0, 0x85cf, 0x85d0, 0xb4f4, 0x85d1, - 0xb3ca, 0x85d2, 0xb8e6, 0xdfbb, 0x85d3, 0x85d4, 0x85d5, 0x85d6, - 0xc4c5, 0x85d7, 0xdfbc, 0xdfbd, 0xdfbe, 0xc5bb, 0xdfbf, 0xdfc2, - 0xd4b1, 0xdfc3, 0x85d8, 0xc7ba, 0xced8, 0x85d9, 0x85da, 0x85db, - 0x85dc, 0x85dd, 0xc4d8, 0x85de, 0xdfca, 0x85df, 0xdfcf, 0x85e0, - 0xd6dc, 0x85e1, 0x85e2, 0x85e3, 0x85e4, 0x85e5, 0x85e6, 0x85e7, - 0x85e8, 0xdfc9, 0xdfda, 0xceb6, 0x85e9, 0xbac7, 0xdfce, 0xdfc8, - 0xc5de, 0x85ea, 0x85eb, 0xc9eb, 0xbaf4, 0xc3fc, 0x85ec, 0x85ed, - 0xbed7, 0x85ee, 0xdfc6, 0x85ef, 0xdfcd, 0x85f0, 0xc5d8, 0x85f1, - 0x85f2, 0x85f3, 0x85f4, 0xd5a6, 0xbacd, 0x85f5, 0xbecc, 0xd3bd, - 0xb8c0, 0x85f6, 0xd6e4, 0x85f7, 0xdfc7, 0xb9be, 0xbfa7, 0x85f8, - 0x85f9, 0xc1fc, 0xdfcb, 0xdfcc, 0x85fa, 0xdfd0, 0x85fb, 0x85fc, - 0x85fd, 0x85fe, 0x8640, 0xdfdb, 0xdfe5, 0x8641, 0xdfd7, 0xdfd6, - 0xd7c9, 0xdfe3, 0xdfe4, 0xe5eb, 0xd2a7, 0xdfd2, 0x8642, 0xbfa9, - 0x8643, 0xd4db, 0x8644, 0xbfc8, 0xdfd4, 0x8645, 0x8646, 0x8647, - 0xcfcc, 0x8648, 0x8649, 0xdfdd, 0x864a, 0xd1ca, 0x864b, 0xdfde, - 0xb0a7, 0xc6b7, 0xdfd3, 0x864c, 0xbae5, 0x864d, 0xb6df, 0xcddb, - 0xb9fe, 0xd4d5, 0x864e, 0x864f, 0xdfdf, 0xcfec, 0xb0a5, 0xdfe7, - 0xdfd1, 0xd1c6, 0xdfd5, 0xdfd8, 0xdfd9, 0xdfdc, 0x8650, 0xbba9, - 0x8651, 0xdfe0, 0xdfe1, 0x8652, 0xdfe2, 0xdfe6, 0xdfe8, 0xd3b4, - 0x8653, 0x8654, 0x8655, 0x8656, 0x8657, 0xb8e7, 0xc5b6, 0xdfea, - 0xc9da, 0xc1a8, 0xc4c4, 0x8658, 0x8659, 0xbfde, 0xcff8, 0x865a, - 0x865b, 0x865c, 0xd5dc, 0xdfee, 0x865d, 0x865e, 0x865f, 0x8660, - 0x8661, 0x8662, 0xb2b8, 0x8663, 0xbadf, 0xdfec, 0x8664, 0xdbc1, - /* 0x5500 .. 0x55ff */ - 0x8665, 0xd1e4, 0x8666, 0x8667, 0x8668, 0x8669, 0xcbf4, 0xb4bd, - 0x866a, 0xb0a6, 0x866b, 0x866c, 0x866d, 0x866e, 0x866f, 0xdff1, - 0xccc6, 0xdff2, 0x8670, 0x8671, 0xdfed, 0x8672, 0x8673, 0x8674, - 0x8675, 0x8676, 0x8677, 0xdfe9, 0x8678, 0x8679, 0x867a, 0x867b, - 0xdfeb, 0x867c, 0xdfef, 0xdff0, 0xbbbd, 0x867d, 0x867e, 0xdff3, - 0x8680, 0x8681, 0xdff4, 0x8682, 0xbba3, 0x8683, 0xcadb, 0xcea8, - 0xe0a7, 0xb3aa, 0x8684, 0xe0a6, 0x8685, 0x8686, 0x8687, 0xe0a1, - 0x8688, 0x8689, 0x868a, 0x868b, 0xdffe, 0x868c, 0xcdd9, 0xdffc, - 0x868d, 0xdffa, 0x868e, 0xbfd0, 0xd7c4, 0x868f, 0xc9cc, 0x8690, - 0x8691, 0xdff8, 0xb0a1, 0x8692, 0x8693, 0x8694, 0x8695, 0x8696, - 0xdffd, 0x8697, 0x8698, 0x8699, 0x869a, 0xdffb, 0xe0a2, 0x869b, - 0x869c, 0x869d, 0x869e, 0x869f, 0xe0a8, 0x86a0, 0x86a1, 0x86a2, - 0x86a3, 0xb7c8, 0x86a4, 0x86a5, 0xc6a1, 0xc9b6, 0xc0b2, 0xdff5, - 0x86a6, 0x86a7, 0xc5be, 0x86a8, 0xd8c4, 0xdff9, 0xc4f6, 0x86a9, - 0x86aa, 0x86ab, 0x86ac, 0x86ad, 0x86ae, 0xe0a3, 0xe0a4, 0xe0a5, - 0xd0a5, 0x86af, 0x86b0, 0xe0b4, 0xcce4, 0x86b1, 0xe0b1, 0x86b2, - 0xbfa6, 0xe0af, 0xceb9, 0xe0ab, 0xc9c6, 0x86b3, 0x86b4, 0xc0ae, - 0xe0ae, 0xbaed, 0xbab0, 0xe0a9, 0x86b5, 0x86b6, 0x86b7, 0xdff6, - 0x86b8, 0xe0b3, 0x86b9, 0x86ba, 0xe0b8, 0x86bb, 0x86bc, 0x86bd, - 0xb4ad, 0xe0b9, 0x86be, 0x86bf, 0xcfb2, 0xbac8, 0x86c0, 0xe0b0, - 0x86c1, 0x86c2, 0x86c3, 0x86c4, 0x86c5, 0x86c6, 0x86c7, 0xd0fa, - 0x86c8, 0x86c9, 0x86ca, 0x86cb, 0x86cc, 0x86cd, 0x86ce, 0x86cf, - 0x86d0, 0xe0ac, 0x86d1, 0xd4fb, 0x86d2, 0xdff7, 0x86d3, 0xc5e7, - 0x86d4, 0xe0ad, 0x86d5, 0xd3f7, 0x86d6, 0xe0b6, 0xe0b7, 0x86d7, - 0x86d8, 0x86d9, 0x86da, 0x86db, 0xe0c4, 0xd0e1, 0x86dc, 0x86dd, - 0x86de, 0xe0bc, 0x86df, 0x86e0, 0xe0c9, 0xe0ca, 0x86e1, 0x86e2, - 0x86e3, 0xe0be, 0xe0aa, 0xc9a4, 0xe0c1, 0x86e4, 0xe0b2, 0x86e5, - 0x86e6, 0x86e7, 0x86e8, 0x86e9, 0xcac8, 0xe0c3, 0x86ea, 0xe0b5, - 0x86eb, 0xcecb, 0x86ec, 0xcbc3, 0xe0cd, 0xe0c6, 0xe0c2, 0x86ed, - 0xe0cb, 0x86ee, 0xe0ba, 0xe0bf, 0xe0c0, 0x86ef, 0x86f0, 0xe0c5, - 0x86f1, 0x86f2, 0xe0c7, 0xe0c8, 0x86f3, 0xe0cc, 0x86f4, 0xe0bb, - 0x86f5, 0x86f6, 0x86f7, 0x86f8, 0x86f9, 0xcbd4, 0xe0d5, 0x86fa, - /* 0x5600 .. 0x56ff */ - 0xe0d6, 0xe0d2, 0x86fb, 0x86fc, 0x86fd, 0x86fe, 0x8740, 0x8741, - 0xe0d0, 0xbcce, 0x8742, 0x8743, 0xe0d1, 0x8744, 0xb8c2, 0xd8c5, - 0x8745, 0x8746, 0x8747, 0x8748, 0x8749, 0x874a, 0x874b, 0x874c, - 0xd0ea, 0x874d, 0x874e, 0xc2ef, 0x874f, 0x8750, 0xe0cf, 0xe0bd, - 0x8751, 0x8752, 0x8753, 0xe0d4, 0xe0d3, 0x8754, 0x8755, 0xe0d7, - 0x8756, 0x8757, 0x8758, 0x8759, 0xe0dc, 0xe0d8, 0x875a, 0x875b, - 0x875c, 0xd6f6, 0xb3b0, 0x875d, 0xd7ec, 0x875e, 0xcbbb, 0x875f, - 0x8760, 0xe0da, 0x8761, 0xcefb, 0x8762, 0x8763, 0x8764, 0xbad9, - 0x8765, 0x8766, 0x8767, 0x8768, 0x8769, 0x876a, 0x876b, 0x876c, - 0x876d, 0x876e, 0x876f, 0x8770, 0xe0e1, 0xe0dd, 0xd2ad, 0x8771, - 0x8772, 0x8773, 0x8774, 0x8775, 0xe0e2, 0x8776, 0x8777, 0xe0db, - 0xe0d9, 0xe0df, 0x8778, 0x8779, 0xe0e0, 0x877a, 0x877b, 0x877c, - 0x877d, 0x877e, 0xe0de, 0x8780, 0xe0e4, 0x8781, 0x8782, 0x8783, - 0xc6f7, 0xd8ac, 0xd4eb, 0xe0e6, 0xcac9, 0x8784, 0x8785, 0x8786, - 0x8787, 0xe0e5, 0x8788, 0x8789, 0x878a, 0x878b, 0xb8c1, 0x878c, - 0x878d, 0x878e, 0x878f, 0xe0e7, 0xe0e8, 0x8790, 0x8791, 0x8792, - 0x8793, 0x8794, 0x8795, 0x8796, 0x8797, 0xe0e9, 0xe0e3, 0x8798, - 0x8799, 0x879a, 0x879b, 0x879c, 0x879d, 0x879e, 0xbabf, 0xcce7, - 0x879f, 0x87a0, 0x87a1, 0xe0ea, 0x87a2, 0x87a3, 0x87a4, 0x87a5, - 0x87a6, 0x87a7, 0x87a8, 0x87a9, 0x87aa, 0x87ab, 0x87ac, 0x87ad, - 0x87ae, 0x87af, 0x87b0, 0xcff9, 0x87b1, 0x87b2, 0x87b3, 0x87b4, - 0x87b5, 0x87b6, 0x87b7, 0x87b8, 0x87b9, 0x87ba, 0x87bb, 0xe0eb, - 0x87bc, 0x87bd, 0x87be, 0x87bf, 0x87c0, 0x87c1, 0x87c2, 0xc8c2, - 0x87c3, 0x87c4, 0x87c5, 0x87c6, 0xbdc0, 0x87c7, 0x87c8, 0x87c9, - 0x87ca, 0x87cb, 0x87cc, 0x87cd, 0x87ce, 0x87cf, 0x87d0, 0x87d1, - 0x87d2, 0x87d3, 0xc4d2, 0x87d4, 0x87d5, 0x87d6, 0x87d7, 0x87d8, - 0x87d9, 0x87da, 0x87db, 0x87dc, 0xe0ec, 0x87dd, 0x87de, 0xe0ed, - 0x87df, 0x87e0, 0xc7f4, 0xcbc4, 0x87e1, 0xe0ee, 0xbbd8, 0xd8b6, - 0xd2f2, 0xe0ef, 0xcdc5, 0x87e2, 0xb6da, 0x87e3, 0x87e4, 0x87e5, - 0x87e6, 0x87e7, 0x87e8, 0xe0f1, 0x87e9, 0xd4b0, 0x87ea, 0x87eb, - 0xc0a7, 0xb4d1, 0x87ec, 0x87ed, 0xcea7, 0xe0f0, 0x87ee, 0x87ef, - 0x87f0, 0xe0f2, 0xb9cc, 0x87f1, 0x87f2, 0xb9fa, 0xcdbc, 0xe0f3, - /* 0x5700 .. 0x57ff */ - 0x87f3, 0x87f4, 0x87f5, 0xc6d4, 0xe0f4, 0x87f6, 0xd4b2, 0x87f7, - 0xc8a6, 0xe0f6, 0xe0f5, 0x87f8, 0x87f9, 0x87fa, 0x87fb, 0x87fc, - 0x87fd, 0x87fe, 0x8840, 0x8841, 0x8842, 0x8843, 0x8844, 0x8845, - 0x8846, 0x8847, 0x8848, 0x8849, 0xe0f7, 0x884a, 0x884b, 0xcdc1, - 0x884c, 0x884d, 0x884e, 0xcaa5, 0x884f, 0x8850, 0x8851, 0x8852, - 0xd4da, 0xdbd7, 0xdbd9, 0x8853, 0xdbd8, 0xb9e7, 0xdbdc, 0xdbdd, - 0xb5d8, 0x8854, 0x8855, 0xdbda, 0x8856, 0x8857, 0x8858, 0x8859, - 0x885a, 0xdbdb, 0xb3a1, 0xdbdf, 0x885b, 0x885c, 0xbbf8, 0x885d, - 0xd6b7, 0x885e, 0xdbe0, 0x885f, 0x8860, 0x8861, 0x8862, 0xbef9, - 0x8863, 0x8864, 0xb7bb, 0x8865, 0xdbd0, 0xccae, 0xbfb2, 0xbbb5, - 0xd7f8, 0xbfd3, 0x8866, 0x8867, 0x8868, 0x8869, 0x886a, 0xbfe9, - 0x886b, 0x886c, 0xbce1, 0xccb3, 0xdbde, 0xb0d3, 0xceeb, 0xb7d8, - 0xd7b9, 0xc6c2, 0x886d, 0x886e, 0xc0a4, 0x886f, 0xccb9, 0x8870, - 0xdbe7, 0xdbe1, 0xc6ba, 0xdbe3, 0x8871, 0xdbe8, 0x8872, 0xc5f7, - 0x8873, 0x8874, 0x8875, 0xdbea, 0x8876, 0x8877, 0xdbe9, 0xbfc0, - 0x8878, 0x8879, 0x887a, 0xdbe6, 0xdbe5, 0x887b, 0x887c, 0x887d, - 0x887e, 0x8880, 0xb4b9, 0xc0ac, 0xc2a2, 0xdbe2, 0xdbe4, 0x8881, - 0x8882, 0x8883, 0x8884, 0xd0cd, 0xdbed, 0x8885, 0x8886, 0x8887, - 0x8888, 0x8889, 0xc0dd, 0xdbf2, 0x888a, 0x888b, 0x888c, 0x888d, - 0x888e, 0x888f, 0x8890, 0xb6e2, 0x8891, 0x8892, 0x8893, 0x8894, - 0xdbf3, 0xdbd2, 0xb9b8, 0xd4ab, 0xdbec, 0x8895, 0xbfd1, 0xdbf0, - 0x8896, 0xdbd1, 0x8897, 0xb5e6, 0x8898, 0xdbeb, 0xbfe5, 0x8899, - 0x889a, 0x889b, 0xdbee, 0x889c, 0xdbf1, 0x889d, 0x889e, 0x889f, - 0xdbf9, 0x88a0, 0x88a1, 0x88a2, 0x88a3, 0x88a4, 0x88a5, 0x88a6, - 0x88a7, 0x88a8, 0xb9a1, 0xb0a3, 0x88a9, 0x88aa, 0x88ab, 0x88ac, - 0x88ad, 0x88ae, 0x88af, 0xc2f1, 0x88b0, 0x88b1, 0xb3c7, 0xdbef, - 0x88b2, 0x88b3, 0xdbf8, 0x88b4, 0xc6d2, 0xdbf4, 0x88b5, 0x88b6, - 0xdbf5, 0xdbf7, 0xdbf6, 0x88b7, 0x88b8, 0xdbfe, 0x88b9, 0xd3f2, - 0xb2ba, 0x88ba, 0x88bb, 0x88bc, 0xdbfd, 0x88bd, 0x88be, 0x88bf, - 0x88c0, 0x88c1, 0x88c2, 0x88c3, 0x88c4, 0xdca4, 0x88c5, 0xdbfb, - 0x88c6, 0x88c7, 0x88c8, 0x88c9, 0xdbfa, 0x88ca, 0x88cb, 0x88cc, - 0xdbfc, 0xc5e0, 0xbbf9, 0x88cd, 0x88ce, 0xdca3, 0x88cf, 0x88d0, - /* 0x5800 .. 0x58ff */ - 0xdca5, 0x88d1, 0xccc3, 0x88d2, 0x88d3, 0x88d4, 0xb6d1, 0xddc0, - 0x88d5, 0x88d6, 0x88d7, 0xdca1, 0x88d8, 0xdca2, 0x88d9, 0x88da, - 0x88db, 0xc7b5, 0x88dc, 0x88dd, 0x88de, 0xb6e9, 0x88df, 0x88e0, - 0x88e1, 0xdca7, 0x88e2, 0x88e3, 0x88e4, 0x88e5, 0xdca6, 0x88e6, - 0xdca9, 0xb1a4, 0x88e7, 0x88e8, 0xb5cc, 0x88e9, 0x88ea, 0x88eb, - 0x88ec, 0x88ed, 0xbfb0, 0x88ee, 0x88ef, 0x88f0, 0x88f1, 0x88f2, - 0xd1df, 0x88f3, 0x88f4, 0x88f5, 0x88f6, 0xb6c2, 0x88f7, 0x88f8, - 0x88f9, 0x88fa, 0x88fb, 0x88fc, 0x88fd, 0x88fe, 0x8940, 0x8941, - 0x8942, 0x8943, 0x8944, 0x8945, 0xdca8, 0x8946, 0x8947, 0x8948, - 0x8949, 0x894a, 0x894b, 0x894c, 0xcbfa, 0xebf3, 0x894d, 0x894e, - 0x894f, 0xcbdc, 0x8950, 0x8951, 0xcbfe, 0x8952, 0x8953, 0x8954, - 0xccc1, 0x8955, 0x8956, 0x8957, 0x8958, 0x8959, 0xc8fb, 0x895a, - 0x895b, 0x895c, 0x895d, 0x895e, 0x895f, 0xdcaa, 0x8960, 0x8961, - 0x8962, 0x8963, 0x8964, 0xccee, 0xdcab, 0x8965, 0x8966, 0x8967, - 0x8968, 0x8969, 0x896a, 0x896b, 0x896c, 0x896d, 0x896e, 0x896f, - 0x8970, 0x8971, 0x8972, 0x8973, 0x8974, 0x8975, 0xdbd3, 0x8976, - 0xdcaf, 0xdcac, 0x8977, 0xbeb3, 0x8978, 0xcafb, 0x8979, 0x897a, - 0x897b, 0xdcad, 0x897c, 0x897d, 0x897e, 0x8980, 0x8981, 0x8982, - 0x8983, 0x8984, 0xc9ca, 0xc4b9, 0x8985, 0x8986, 0x8987, 0x8988, - 0x8989, 0xc7bd, 0xdcae, 0x898a, 0x898b, 0x898c, 0xd4f6, 0xd0e6, - 0x898d, 0x898e, 0x898f, 0x8990, 0x8991, 0x8992, 0x8993, 0x8994, - 0xc4ab, 0xb6d5, 0x8995, 0x8996, 0x8997, 0x8998, 0x8999, 0x899a, - 0x899b, 0x899c, 0x899d, 0x899e, 0x899f, 0x89a0, 0x89a1, 0x89a2, - 0x89a3, 0x89a4, 0x89a5, 0x89a6, 0xdbd4, 0x89a7, 0x89a8, 0x89a9, - 0x89aa, 0xb1da, 0x89ab, 0x89ac, 0x89ad, 0xdbd5, 0x89ae, 0x89af, - 0x89b0, 0x89b1, 0x89b2, 0x89b3, 0x89b4, 0x89b5, 0x89b6, 0x89b7, - 0x89b8, 0xdbd6, 0x89b9, 0x89ba, 0x89bb, 0xbabe, 0x89bc, 0x89bd, - 0x89be, 0x89bf, 0x89c0, 0x89c1, 0x89c2, 0x89c3, 0x89c4, 0x89c5, - 0x89c6, 0x89c7, 0x89c8, 0x89c9, 0xc8c0, 0x89ca, 0x89cb, 0x89cc, - 0x89cd, 0x89ce, 0x89cf, 0xcabf, 0xc8c9, 0x89d0, 0xd7b3, 0x89d1, - 0xc9f9, 0x89d2, 0x89d3, 0xbfc7, 0x89d4, 0x89d5, 0xbaf8, 0x89d6, - 0x89d7, 0xd2bc, 0x89d8, 0x89d9, 0x89da, 0x89db, 0x89dc, 0x89dd, - /* 0x5900 .. 0x59ff */ - 0x89de, 0x89df, 0xe2ba, 0x89e0, 0xb4a6, 0x89e1, 0x89e2, 0xb1b8, - 0x89e3, 0x89e4, 0x89e5, 0x89e6, 0x89e7, 0xb8b4, 0x89e8, 0xcfc4, - 0x89e9, 0x89ea, 0x89eb, 0x89ec, 0xd9e7, 0xcfa6, 0xcde2, 0x89ed, - 0x89ee, 0xd9ed, 0xb6e0, 0x89ef, 0xd2b9, 0x89f0, 0x89f1, 0xb9bb, - 0x89f2, 0x89f3, 0x89f4, 0x89f5, 0xe2b9, 0xe2b7, 0x89f6, 0xb4f3, - 0x89f7, 0xccec, 0xccab, 0xb7f2, 0x89f8, 0xd8b2, 0xd1eb, 0xbabb, - 0x89f9, 0xcaa7, 0x89fa, 0x89fb, 0xcdb7, 0x89fc, 0x89fd, 0xd2c4, - 0xbfe4, 0xbcd0, 0xb6e1, 0x89fe, 0xdec5, 0x8a40, 0x8a41, 0x8a42, - 0x8a43, 0xdec6, 0xdbbc, 0x8a44, 0xd1d9, 0x8a45, 0x8a46, 0xc6e6, - 0xc4ce, 0xb7ee, 0x8a47, 0xb7dc, 0x8a48, 0x8a49, 0xbffc, 0xd7e0, - 0x8a4a, 0xc6f5, 0x8a4b, 0x8a4c, 0xb1bc, 0xdec8, 0xbdb1, 0xccd7, - 0xdeca, 0x8a4d, 0xdec9, 0x8a4e, 0x8a4f, 0x8a50, 0x8a51, 0x8a52, - 0xb5ec, 0x8a53, 0xc9dd, 0x8a54, 0x8a55, 0xb0c2, 0x8a56, 0x8a57, - 0x8a58, 0x8a59, 0x8a5a, 0x8a5b, 0x8a5c, 0x8a5d, 0x8a5e, 0x8a5f, - 0x8a60, 0x8a61, 0x8a62, 0xc5ae, 0xc5ab, 0x8a63, 0xc4cc, 0x8a64, - 0xbce9, 0xcbfd, 0x8a65, 0x8a66, 0x8a67, 0xbac3, 0x8a68, 0x8a69, - 0x8a6a, 0xe5f9, 0xc8e7, 0xe5fa, 0xcdfd, 0x8a6b, 0xd7b1, 0xb8be, - 0xc2e8, 0x8a6c, 0xc8d1, 0x8a6d, 0x8a6e, 0xe5fb, 0x8a6f, 0x8a70, - 0x8a71, 0x8a72, 0xb6ca, 0xbccb, 0x8a73, 0x8a74, 0xd1fd, 0xe6a1, - 0x8a75, 0xc3ee, 0x8a76, 0x8a77, 0x8a78, 0x8a79, 0xe6a4, 0x8a7a, - 0x8a7b, 0x8a7c, 0x8a7d, 0xe5fe, 0xe6a5, 0xcdd7, 0x8a7e, 0x8a80, - 0xb7c1, 0xe5fc, 0xe5fd, 0xe6a3, 0x8a81, 0x8a82, 0xc4dd, 0xe6a8, - 0x8a83, 0x8a84, 0xe6a7, 0x8a85, 0x8a86, 0x8a87, 0x8a88, 0x8a89, - 0x8a8a, 0xc3c3, 0x8a8b, 0xc6de, 0x8a8c, 0x8a8d, 0xe6aa, 0x8a8e, - 0x8a8f, 0x8a90, 0x8a91, 0x8a92, 0x8a93, 0x8a94, 0xc4b7, 0x8a95, - 0x8a96, 0x8a97, 0xe6a2, 0xcabc, 0x8a98, 0x8a99, 0x8a9a, 0x8a9b, - 0xbde3, 0xb9c3, 0xe6a6, 0xd0d5, 0xceaf, 0x8a9c, 0x8a9d, 0xe6a9, - 0xe6b0, 0x8a9e, 0xd2a6, 0x8a9f, 0xbdaa, 0xe6ad, 0x8aa0, 0x8aa1, - 0x8aa2, 0x8aa3, 0x8aa4, 0xe6af, 0x8aa5, 0xc0d1, 0x8aa6, 0x8aa7, - 0xd2cc, 0x8aa8, 0x8aa9, 0x8aaa, 0xbca7, 0x8aab, 0x8aac, 0x8aad, - 0x8aae, 0x8aaf, 0x8ab0, 0x8ab1, 0x8ab2, 0x8ab3, 0x8ab4, 0x8ab5, - 0x8ab6, 0xe6b1, 0x8ab7, 0xd2f6, 0x8ab8, 0x8ab9, 0x8aba, 0xd7cb, - /* 0x5a00 .. 0x5aff */ - 0x8abb, 0xcdfe, 0x8abc, 0xcdde, 0xc2a6, 0xe6ab, 0xe6ac, 0xbdbf, - 0xe6ae, 0xe6b3, 0x8abd, 0x8abe, 0xe6b2, 0x8abf, 0x8ac0, 0x8ac1, - 0x8ac2, 0xe6b6, 0x8ac3, 0xe6b8, 0x8ac4, 0x8ac5, 0x8ac6, 0x8ac7, - 0xc4ef, 0x8ac8, 0x8ac9, 0x8aca, 0xc4c8, 0x8acb, 0x8acc, 0xbeea, - 0xc9ef, 0x8acd, 0x8ace, 0xe6b7, 0x8acf, 0xb6f0, 0x8ad0, 0x8ad1, - 0x8ad2, 0xc3e4, 0x8ad3, 0x8ad4, 0x8ad5, 0x8ad6, 0x8ad7, 0x8ad8, - 0x8ad9, 0xd3e9, 0xe6b4, 0x8ada, 0xe6b5, 0x8adb, 0xc8a2, 0x8adc, - 0x8add, 0x8ade, 0x8adf, 0x8ae0, 0xe6bd, 0x8ae1, 0x8ae2, 0x8ae3, - 0xe6b9, 0x8ae4, 0x8ae5, 0x8ae6, 0x8ae7, 0x8ae8, 0xc6c5, 0x8ae9, - 0x8aea, 0xcdf1, 0xe6bb, 0x8aeb, 0x8aec, 0x8aed, 0x8aee, 0x8aef, - 0x8af0, 0x8af1, 0x8af2, 0x8af3, 0x8af4, 0xe6bc, 0x8af5, 0x8af6, - 0x8af7, 0x8af8, 0xbbe9, 0x8af9, 0x8afa, 0x8afb, 0x8afc, 0x8afd, - 0x8afe, 0x8b40, 0xe6be, 0x8b41, 0x8b42, 0x8b43, 0x8b44, 0xe6ba, - 0x8b45, 0x8b46, 0xc0b7, 0x8b47, 0x8b48, 0x8b49, 0x8b4a, 0x8b4b, - 0x8b4c, 0x8b4d, 0x8b4e, 0x8b4f, 0xd3a4, 0xe6bf, 0xc9f4, 0xe6c3, - 0x8b50, 0x8b51, 0xe6c4, 0x8b52, 0x8b53, 0x8b54, 0x8b55, 0xd0f6, - 0x8b56, 0x8b57, 0x8b58, 0x8b59, 0x8b5a, 0x8b5b, 0x8b5c, 0x8b5d, - 0x8b5e, 0x8b5f, 0x8b60, 0x8b61, 0x8b62, 0x8b63, 0x8b64, 0x8b65, - 0x8b66, 0x8b67, 0xc3bd, 0x8b68, 0x8b69, 0x8b6a, 0x8b6b, 0x8b6c, - 0x8b6d, 0x8b6e, 0xc3c4, 0xe6c2, 0x8b6f, 0x8b70, 0x8b71, 0x8b72, - 0x8b73, 0x8b74, 0x8b75, 0x8b76, 0x8b77, 0x8b78, 0x8b79, 0x8b7a, - 0x8b7b, 0x8b7c, 0xe6c1, 0x8b7d, 0x8b7e, 0x8b80, 0x8b81, 0x8b82, - 0x8b83, 0x8b84, 0xe6c7, 0xcfb1, 0x8b85, 0xebf4, 0x8b86, 0x8b87, - 0xe6ca, 0x8b88, 0x8b89, 0x8b8a, 0x8b8b, 0x8b8c, 0xe6c5, 0x8b8d, - 0x8b8e, 0xbcde, 0xc9a9, 0x8b8f, 0x8b90, 0x8b91, 0x8b92, 0x8b93, - 0x8b94, 0xbcb5, 0x8b95, 0x8b96, 0xcfd3, 0x8b97, 0x8b98, 0x8b99, - 0x8b9a, 0x8b9b, 0xe6c8, 0x8b9c, 0xe6c9, 0x8b9d, 0xe6ce, 0x8b9e, - 0xe6d0, 0x8b9f, 0x8ba0, 0x8ba1, 0xe6d1, 0x8ba2, 0x8ba3, 0x8ba4, - 0xe6cb, 0xb5d5, 0x8ba5, 0xe6cc, 0x8ba6, 0x8ba7, 0xe6cf, 0x8ba8, - 0x8ba9, 0xc4db, 0x8baa, 0xe6c6, 0x8bab, 0x8bac, 0x8bad, 0x8bae, - 0x8baf, 0xe6cd, 0x8bb0, 0x8bb1, 0x8bb2, 0x8bb3, 0x8bb4, 0x8bb5, - 0x8bb6, 0x8bb7, 0x8bb8, 0x8bb9, 0x8bba, 0x8bbb, 0x8bbc, 0x8bbd, - /* 0x5b00 .. 0x5bff */ - 0x8bbe, 0x8bbf, 0x8bc0, 0x8bc1, 0x8bc2, 0x8bc3, 0x8bc4, 0x8bc5, - 0x8bc6, 0xe6d2, 0x8bc7, 0x8bc8, 0x8bc9, 0x8bca, 0x8bcb, 0x8bcc, - 0x8bcd, 0x8bce, 0x8bcf, 0x8bd0, 0x8bd1, 0x8bd2, 0xe6d4, 0xe6d3, - 0x8bd3, 0x8bd4, 0x8bd5, 0x8bd6, 0x8bd7, 0x8bd8, 0x8bd9, 0x8bda, - 0x8bdb, 0x8bdc, 0x8bdd, 0x8bde, 0x8bdf, 0x8be0, 0x8be1, 0x8be2, - 0x8be3, 0x8be4, 0x8be5, 0x8be6, 0x8be7, 0x8be8, 0x8be9, 0x8bea, - 0x8beb, 0x8bec, 0xe6d5, 0x8bed, 0xd9f8, 0x8bee, 0x8bef, 0xe6d6, - 0x8bf0, 0x8bf1, 0x8bf2, 0x8bf3, 0x8bf4, 0x8bf5, 0x8bf6, 0x8bf7, - 0xe6d7, 0x8bf8, 0x8bf9, 0x8bfa, 0x8bfb, 0x8bfc, 0x8bfd, 0x8bfe, - 0x8c40, 0x8c41, 0x8c42, 0x8c43, 0x8c44, 0x8c45, 0x8c46, 0x8c47, - 0xd7d3, 0xe6dd, 0x8c48, 0xe6de, 0xbfd7, 0xd4d0, 0x8c49, 0xd7d6, - 0xb4e6, 0xcbef, 0xe6da, 0xd8c3, 0xd7ce, 0xd0a2, 0x8c4a, 0xc3cf, - 0x8c4b, 0x8c4c, 0xe6df, 0xbcbe, 0xb9c2, 0xe6db, 0xd1a7, 0x8c4d, - 0x8c4e, 0xbaa2, 0xc2cf, 0x8c4f, 0xd8ab, 0x8c50, 0x8c51, 0x8c52, - 0xcaeb, 0xe5ee, 0x8c53, 0xe6dc, 0x8c54, 0xb7f5, 0x8c55, 0x8c56, - 0x8c57, 0x8c58, 0xc8e6, 0x8c59, 0x8c5a, 0xc4f5, 0x8c5b, 0x8c5c, - 0xe5b2, 0xc4fe, 0x8c5d, 0xcbfc, 0xe5b3, 0xd5ac, 0x8c5e, 0xd3ee, - 0xcad8, 0xb0b2, 0x8c5f, 0xcbce, 0xcdea, 0x8c60, 0x8c61, 0xbaea, - 0x8c62, 0x8c63, 0x8c64, 0xe5b5, 0x8c65, 0xe5b4, 0x8c66, 0xd7da, - 0xb9d9, 0xd6e6, 0xb6a8, 0xcdf0, 0xd2cb, 0xb1a6, 0xcab5, 0x8c67, - 0xb3e8, 0xc9f3, 0xbfcd, 0xd0fb, 0xcad2, 0xe5b6, 0xbbc2, 0x8c68, - 0x8c69, 0x8c6a, 0xcfdc, 0xb9ac, 0x8c6b, 0x8c6c, 0x8c6d, 0x8c6e, - 0xd4d7, 0x8c6f, 0x8c70, 0xbaa6, 0xd1e7, 0xcffc, 0xbcd2, 0x8c71, - 0xe5b7, 0xc8dd, 0x8c72, 0x8c73, 0x8c74, 0xbfed, 0xb1f6, 0xcbde, - 0x8c75, 0x8c76, 0xbcc5, 0x8c77, 0xbcc4, 0xd2fa, 0xc3dc, 0xbfdc, - 0x8c78, 0x8c79, 0x8c7a, 0x8c7b, 0xb8bb, 0x8c7c, 0x8c7d, 0x8c7e, - 0xc3c2, 0x8c80, 0xbaae, 0xd4a2, 0x8c81, 0x8c82, 0x8c83, 0x8c84, - 0x8c85, 0x8c86, 0x8c87, 0x8c88, 0x8c89, 0xc7de, 0xc4af, 0xb2ec, - 0x8c8a, 0xb9d1, 0x8c8b, 0x8c8c, 0xe5bb, 0xc1c8, 0x8c8d, 0x8c8e, - 0xd5af, 0x8c8f, 0x8c90, 0x8c91, 0x8c92, 0x8c93, 0xe5bc, 0x8c94, - 0xe5be, 0x8c95, 0x8c96, 0x8c97, 0x8c98, 0x8c99, 0x8c9a, 0x8c9b, - 0xb4e7, 0xb6d4, 0xcbc2, 0xd1b0, 0xb5bc, 0x8c9c, 0x8c9d, 0xcad9, - /* 0x5c00 .. 0x5cff */ - 0x8c9e, 0xb7e2, 0x8c9f, 0x8ca0, 0xc9e4, 0x8ca1, 0xbdab, 0x8ca2, - 0x8ca3, 0xcebe, 0xd7f0, 0x8ca4, 0x8ca5, 0x8ca6, 0x8ca7, 0xd0a1, - 0x8ca8, 0xc9d9, 0x8ca9, 0x8caa, 0xb6fb, 0xe6d8, 0xbce2, 0x8cab, - 0xb3be, 0x8cac, 0xc9d0, 0x8cad, 0xe6d9, 0xb3a2, 0x8cae, 0x8caf, - 0x8cb0, 0x8cb1, 0xdecc, 0x8cb2, 0xd3c8, 0xdecd, 0x8cb3, 0xd2a2, - 0x8cb4, 0x8cb5, 0x8cb6, 0x8cb7, 0xdece, 0x8cb8, 0x8cb9, 0x8cba, - 0x8cbb, 0xbecd, 0x8cbc, 0x8cbd, 0xdecf, 0x8cbe, 0x8cbf, 0x8cc0, - 0xcaac, 0xd2fc, 0xb3df, 0xe5ea, 0xc4e1, 0xbea1, 0xceb2, 0xc4f2, - 0xbed6, 0xc6a8, 0xb2e3, 0x8cc1, 0x8cc2, 0xbed3, 0x8cc3, 0x8cc4, - 0xc7fc, 0xcceb, 0xbdec, 0xcedd, 0x8cc5, 0x8cc6, 0xcaba, 0xc6c1, - 0xe5ec, 0xd0bc, 0x8cc7, 0x8cc8, 0x8cc9, 0xd5b9, 0x8cca, 0x8ccb, - 0x8ccc, 0xe5ed, 0x8ccd, 0x8cce, 0x8ccf, 0x8cd0, 0xcaf4, 0x8cd1, - 0xcdc0, 0xc2c5, 0x8cd2, 0xe5ef, 0x8cd3, 0xc2c4, 0xe5f0, 0x8cd4, - 0x8cd5, 0x8cd6, 0x8cd7, 0x8cd8, 0x8cd9, 0x8cda, 0xe5f8, 0xcdcd, - 0x8cdb, 0xc9bd, 0x8cdc, 0x8cdd, 0x8cde, 0x8cdf, 0x8ce0, 0x8ce1, - 0x8ce2, 0xd2d9, 0xe1a8, 0x8ce3, 0x8ce4, 0x8ce5, 0x8ce6, 0xd3ec, - 0x8ce7, 0xcbea, 0xc6f1, 0x8ce8, 0x8ce9, 0x8cea, 0x8ceb, 0x8cec, - 0xe1ac, 0x8ced, 0x8cee, 0x8cef, 0xe1a7, 0xe1a9, 0x8cf0, 0x8cf1, - 0xe1aa, 0xe1af, 0x8cf2, 0x8cf3, 0xb2ed, 0x8cf4, 0xe1ab, 0xb8da, - 0xe1ad, 0xe1ae, 0xe1b0, 0xb5ba, 0xe1b1, 0x8cf5, 0x8cf6, 0x8cf7, - 0x8cf8, 0x8cf9, 0xe1b3, 0xe1b8, 0x8cfa, 0x8cfb, 0x8cfc, 0x8cfd, - 0x8cfe, 0xd1d2, 0x8d40, 0xe1b6, 0xe1b5, 0xc1eb, 0x8d41, 0x8d42, - 0x8d43, 0xe1b7, 0x8d44, 0xd4c0, 0x8d45, 0xe1b2, 0x8d46, 0xe1ba, - 0xb0b6, 0x8d47, 0x8d48, 0x8d49, 0x8d4a, 0xe1b4, 0x8d4b, 0xbff9, - 0x8d4c, 0xe1b9, 0x8d4d, 0x8d4e, 0xe1bb, 0x8d4f, 0x8d50, 0x8d51, - 0x8d52, 0x8d53, 0x8d54, 0xe1be, 0x8d55, 0x8d56, 0x8d57, 0x8d58, - 0x8d59, 0x8d5a, 0xe1bc, 0x8d5b, 0x8d5c, 0x8d5d, 0x8d5e, 0x8d5f, - 0x8d60, 0xd6c5, 0x8d61, 0x8d62, 0x8d63, 0x8d64, 0x8d65, 0x8d66, - 0x8d67, 0xcfbf, 0x8d68, 0x8d69, 0xe1bd, 0xe1bf, 0xc2cd, 0x8d6a, - 0xb6eb, 0x8d6b, 0xd3f8, 0x8d6c, 0x8d6d, 0xc7cd, 0x8d6e, 0x8d6f, - 0xb7e5, 0x8d70, 0x8d71, 0x8d72, 0x8d73, 0x8d74, 0x8d75, 0x8d76, - 0x8d77, 0x8d78, 0x8d79, 0xbefe, 0x8d7a, 0x8d7b, 0x8d7c, 0x8d7d, - /* 0x5d00 .. 0x5dff */ - 0x8d7e, 0x8d80, 0xe1c0, 0xe1c1, 0x8d81, 0x8d82, 0xe1c7, 0xb3e7, - 0x8d83, 0x8d84, 0x8d85, 0x8d86, 0x8d87, 0x8d88, 0xc6e9, 0x8d89, - 0x8d8a, 0x8d8b, 0x8d8c, 0x8d8d, 0xb4de, 0x8d8e, 0xd1c2, 0x8d8f, - 0x8d90, 0x8d91, 0x8d92, 0xe1c8, 0x8d93, 0x8d94, 0xe1c6, 0x8d95, - 0x8d96, 0x8d97, 0x8d98, 0x8d99, 0xe1c5, 0x8d9a, 0xe1c3, 0xe1c2, - 0x8d9b, 0xb1c0, 0x8d9c, 0x8d9d, 0x8d9e, 0xd5b8, 0xe1c4, 0x8d9f, - 0x8da0, 0x8da1, 0x8da2, 0x8da3, 0xe1cb, 0x8da4, 0x8da5, 0x8da6, - 0x8da7, 0x8da8, 0x8da9, 0x8daa, 0x8dab, 0xe1cc, 0xe1ca, 0x8dac, - 0x8dad, 0x8dae, 0x8daf, 0x8db0, 0x8db1, 0x8db2, 0x8db3, 0xeffa, - 0x8db4, 0x8db5, 0xe1d3, 0xe1d2, 0xc7b6, 0x8db6, 0x8db7, 0x8db8, - 0x8db9, 0x8dba, 0x8dbb, 0x8dbc, 0x8dbd, 0x8dbe, 0x8dbf, 0x8dc0, - 0xe1c9, 0x8dc1, 0x8dc2, 0xe1ce, 0x8dc3, 0xe1d0, 0x8dc4, 0x8dc5, - 0x8dc6, 0x8dc7, 0x8dc8, 0x8dc9, 0x8dca, 0x8dcb, 0x8dcc, 0x8dcd, - 0x8dce, 0xe1d4, 0x8dcf, 0xe1d1, 0xe1cd, 0x8dd0, 0x8dd1, 0xe1cf, - 0x8dd2, 0x8dd3, 0x8dd4, 0x8dd5, 0xe1d5, 0x8dd6, 0x8dd7, 0x8dd8, - 0x8dd9, 0x8dda, 0x8ddb, 0x8ddc, 0x8ddd, 0x8dde, 0x8ddf, 0x8de0, - 0x8de1, 0x8de2, 0xe1d6, 0x8de3, 0x8de4, 0x8de5, 0x8de6, 0x8de7, - 0x8de8, 0x8de9, 0x8dea, 0x8deb, 0x8dec, 0x8ded, 0x8dee, 0x8def, - 0x8df0, 0x8df1, 0x8df2, 0x8df3, 0x8df4, 0x8df5, 0x8df6, 0x8df7, - 0x8df8, 0xe1d7, 0x8df9, 0x8dfa, 0x8dfb, 0xe1d8, 0x8dfc, 0x8dfd, - 0x8dfe, 0x8e40, 0x8e41, 0x8e42, 0x8e43, 0x8e44, 0x8e45, 0x8e46, - 0x8e47, 0x8e48, 0x8e49, 0x8e4a, 0x8e4b, 0x8e4c, 0x8e4d, 0x8e4e, - 0x8e4f, 0x8e50, 0x8e51, 0x8e52, 0x8e53, 0x8e54, 0x8e55, 0xe1da, - 0x8e56, 0x8e57, 0x8e58, 0x8e59, 0x8e5a, 0x8e5b, 0x8e5c, 0x8e5d, - 0x8e5e, 0x8e5f, 0x8e60, 0x8e61, 0x8e62, 0xe1db, 0x8e63, 0x8e64, - 0x8e65, 0x8e66, 0x8e67, 0x8e68, 0x8e69, 0xcea1, 0x8e6a, 0x8e6b, - 0x8e6c, 0x8e6d, 0x8e6e, 0x8e6f, 0x8e70, 0x8e71, 0x8e72, 0x8e73, - 0x8e74, 0x8e75, 0x8e76, 0xe7dd, 0x8e77, 0xb4a8, 0xd6dd, 0x8e78, - 0x8e79, 0xd1b2, 0xb3b2, 0x8e7a, 0x8e7b, 0xb9a4, 0xd7f3, 0xc7c9, - 0xbede, 0xb9ae, 0x8e7c, 0xced7, 0x8e7d, 0x8e7e, 0xb2ee, 0xdbcf, - 0x8e80, 0xbcba, 0xd2d1, 0xcbc8, 0xb0cd, 0x8e81, 0x8e82, 0xcfef, - 0x8e83, 0x8e84, 0x8e85, 0x8e86, 0x8e87, 0xd9e3, 0xbded, 0x8e88, - /* 0x5e00 .. 0x5eff */ - 0x8e89, 0xb1d2, 0xcad0, 0xb2bc, 0x8e8a, 0xcba7, 0xb7ab, 0x8e8b, - 0xcaa6, 0x8e8c, 0x8e8d, 0x8e8e, 0xcfa3, 0x8e8f, 0x8e90, 0xe0f8, - 0xd5ca, 0xe0fb, 0x8e91, 0x8e92, 0xe0fa, 0xc5c1, 0xccfb, 0x8e93, - 0xc1b1, 0xe0f9, 0xd6e3, 0xb2af, 0xd6c4, 0xb5db, 0x8e94, 0x8e95, - 0x8e96, 0x8e97, 0x8e98, 0x8e99, 0x8e9a, 0x8e9b, 0xb4f8, 0xd6a1, - 0x8e9c, 0x8e9d, 0x8e9e, 0x8e9f, 0x8ea0, 0xcfaf, 0xb0ef, 0x8ea1, - 0x8ea2, 0xe0fc, 0x8ea3, 0x8ea4, 0x8ea5, 0x8ea6, 0x8ea7, 0xe1a1, - 0xb3a3, 0x8ea8, 0x8ea9, 0xe0fd, 0xe0fe, 0xc3b1, 0x8eaa, 0x8eab, - 0x8eac, 0x8ead, 0xc3dd, 0x8eae, 0xe1a2, 0xb7f9, 0x8eaf, 0x8eb0, - 0x8eb1, 0x8eb2, 0x8eb3, 0x8eb4, 0xbbcf, 0x8eb5, 0x8eb6, 0x8eb7, - 0x8eb8, 0x8eb9, 0x8eba, 0x8ebb, 0xe1a3, 0xc4bb, 0x8ebc, 0x8ebd, - 0x8ebe, 0x8ebf, 0x8ec0, 0xe1a4, 0x8ec1, 0x8ec2, 0xe1a5, 0x8ec3, - 0x8ec4, 0xe1a6, 0xb4b1, 0x8ec5, 0x8ec6, 0x8ec7, 0x8ec8, 0x8ec9, - 0x8eca, 0x8ecb, 0x8ecc, 0x8ecd, 0x8ece, 0x8ecf, 0x8ed0, 0x8ed1, - 0x8ed2, 0x8ed3, 0xb8c9, 0xc6bd, 0xc4ea, 0x8ed4, 0xb2a2, 0x8ed5, - 0xd0d2, 0x8ed6, 0xe7db, 0xbbc3, 0xd3d7, 0xd3c4, 0x8ed7, 0xb9e3, - 0xe2cf, 0x8ed8, 0x8ed9, 0x8eda, 0xd7af, 0x8edb, 0xc7ec, 0xb1d3, - 0x8edc, 0x8edd, 0xb4b2, 0xe2d1, 0x8ede, 0x8edf, 0x8ee0, 0xd0f2, - 0xc2ae, 0xe2d0, 0x8ee1, 0xbfe2, 0xd3a6, 0xb5d7, 0xe2d2, 0xb5ea, - 0x8ee2, 0xc3ed, 0xb8fd, 0x8ee3, 0xb8ae, 0x8ee4, 0xc5d3, 0xb7cf, - 0xe2d4, 0x8ee5, 0x8ee6, 0x8ee7, 0x8ee8, 0xe2d3, 0xb6c8, 0xd7f9, - 0x8ee9, 0x8eea, 0x8eeb, 0x8eec, 0x8eed, 0xcda5, 0x8eee, 0x8eef, - 0x8ef0, 0x8ef1, 0x8ef2, 0xe2d8, 0x8ef3, 0xe2d6, 0xcafc, 0xbfb5, - 0xd3b9, 0xe2d5, 0x8ef4, 0x8ef5, 0x8ef6, 0x8ef7, 0xe2d7, 0x8ef8, - 0x8ef9, 0x8efa, 0x8efb, 0x8efc, 0x8efd, 0x8efe, 0x8f40, 0x8f41, - 0x8f42, 0xc1ae, 0xc0c8, 0x8f43, 0x8f44, 0x8f45, 0x8f46, 0x8f47, - 0x8f48, 0xe2db, 0xe2da, 0xc0aa, 0x8f49, 0x8f4a, 0xc1ce, 0x8f4b, - 0x8f4c, 0x8f4d, 0x8f4e, 0xe2dc, 0x8f4f, 0x8f50, 0x8f51, 0x8f52, - 0x8f53, 0x8f54, 0x8f55, 0x8f56, 0x8f57, 0x8f58, 0x8f59, 0x8f5a, - 0xe2dd, 0x8f5b, 0xe2de, 0x8f5c, 0x8f5d, 0x8f5e, 0x8f5f, 0x8f60, - 0x8f61, 0x8f62, 0x8f63, 0x8f64, 0xdbc8, 0x8f65, 0xd1d3, 0xcda2, - 0x8f66, 0x8f67, 0xbda8, 0x8f68, 0x8f69, 0x8f6a, 0xdec3, 0xd8a5, - /* 0x5f00 .. 0x5fff */ - 0xbfaa, 0xdbcd, 0xd2ec, 0xc6fa, 0xc5aa, 0x8f6b, 0x8f6c, 0x8f6d, - 0xdec4, 0x8f6e, 0xb1d7, 0xdfae, 0x8f6f, 0x8f70, 0x8f71, 0xcabd, - 0x8f72, 0xdfb1, 0x8f73, 0xb9ad, 0x8f74, 0xd2fd, 0x8f75, 0xb8a5, - 0xbaeb, 0x8f76, 0x8f77, 0xb3da, 0x8f78, 0x8f79, 0x8f7a, 0xb5dc, - 0xd5c5, 0x8f7b, 0x8f7c, 0x8f7d, 0x8f7e, 0xc3d6, 0xcfd2, 0xbba1, - 0x8f80, 0xe5f3, 0xe5f2, 0x8f81, 0x8f82, 0xe5f4, 0x8f83, 0xcde4, - 0x8f84, 0xc8f5, 0x8f85, 0x8f86, 0x8f87, 0x8f88, 0x8f89, 0x8f8a, - 0x8f8b, 0xb5af, 0xc7bf, 0x8f8c, 0xe5f6, 0x8f8d, 0x8f8e, 0x8f8f, - 0xecb0, 0x8f90, 0x8f91, 0x8f92, 0x8f93, 0x8f94, 0x8f95, 0x8f96, - 0x8f97, 0x8f98, 0x8f99, 0x8f9a, 0x8f9b, 0x8f9c, 0x8f9d, 0x8f9e, - 0xe5e6, 0x8f9f, 0xb9e9, 0xb5b1, 0x8fa0, 0xc2bc, 0xe5e8, 0xe5e7, - 0xe5e9, 0x8fa1, 0x8fa2, 0x8fa3, 0x8fa4, 0xd2cd, 0x8fa5, 0x8fa6, - 0x8fa7, 0xe1ea, 0xd0ce, 0x8fa8, 0xcdae, 0x8fa9, 0xd1e5, 0x8faa, - 0x8fab, 0xb2ca, 0xb1eb, 0x8fac, 0xb1f2, 0xc5ed, 0x8fad, 0x8fae, - 0xd5c3, 0xd3b0, 0x8faf, 0xe1dc, 0x8fb0, 0x8fb1, 0x8fb2, 0xe1dd, - 0x8fb3, 0xd2db, 0x8fb4, 0xb3b9, 0xb1cb, 0x8fb5, 0x8fb6, 0x8fb7, - 0xcdf9, 0xd5f7, 0xe1de, 0x8fb8, 0xbeb6, 0xb4fd, 0x8fb9, 0xe1df, - 0xbadc, 0xe1e0, 0xbbb2, 0xc2c9, 0xe1e1, 0x8fba, 0x8fbb, 0x8fbc, - 0xd0ec, 0x8fbd, 0xcdbd, 0x8fbe, 0x8fbf, 0xe1e2, 0x8fc0, 0xb5c3, - 0xc5c7, 0xe1e3, 0x8fc1, 0x8fc2, 0xe1e4, 0x8fc3, 0x8fc4, 0x8fc5, - 0x8fc6, 0xd3f9, 0x8fc7, 0x8fc8, 0x8fc9, 0x8fca, 0x8fcb, 0x8fcc, - 0xe1e5, 0x8fcd, 0xd1ad, 0x8fce, 0x8fcf, 0xe1e6, 0xcea2, 0x8fd0, - 0x8fd1, 0x8fd2, 0x8fd3, 0x8fd4, 0x8fd5, 0xe1e7, 0x8fd6, 0xb5c2, - 0x8fd7, 0x8fd8, 0x8fd9, 0x8fda, 0xe1e8, 0xbbd5, 0x8fdb, 0x8fdc, - 0x8fdd, 0x8fde, 0x8fdf, 0xd0c4, 0xe2e0, 0xb1d8, 0xd2e4, 0x8fe0, - 0x8fe1, 0xe2e1, 0x8fe2, 0x8fe3, 0xbcc9, 0xc8cc, 0x8fe4, 0xe2e3, - 0xecfe, 0xecfd, 0xdfaf, 0x8fe5, 0x8fe6, 0x8fe7, 0xe2e2, 0xd6be, - 0xcdfc, 0xc3a6, 0x8fe8, 0x8fe9, 0x8fea, 0xe3c3, 0x8feb, 0x8fec, - 0xd6d2, 0xe2e7, 0x8fed, 0x8fee, 0xe2e8, 0x8fef, 0x8ff0, 0xd3c7, - 0x8ff1, 0x8ff2, 0xe2ec, 0xbfec, 0x8ff3, 0xe2ed, 0xe2e5, 0x8ff4, - 0x8ff5, 0xb3c0, 0x8ff6, 0x8ff7, 0x8ff8, 0xc4ee, 0x8ff9, 0x8ffa, - 0xe2ee, 0x8ffb, 0x8ffc, 0xd0c3, 0x8ffd, 0xbaf6, 0xe2e9, 0xb7de, - /* 0x6000 .. 0x60ff */ - 0xbbb3, 0xccac, 0xcbcb, 0xe2e4, 0xe2e6, 0xe2ea, 0xe2eb, 0x8ffe, - 0x9040, 0x9041, 0xe2f7, 0x9042, 0x9043, 0xe2f4, 0xd4f5, 0xe2f3, - 0x9044, 0x9045, 0xc5ad, 0x9046, 0xd5fa, 0xc5c2, 0xb2c0, 0x9047, - 0x9048, 0xe2ef, 0x9049, 0xe2f2, 0xc1af, 0xcbbc, 0x904a, 0x904b, - 0xb5a1, 0xe2f9, 0x904c, 0x904d, 0x904e, 0xbcb1, 0xe2f1, 0xd0d4, - 0xd4b9, 0xe2f5, 0xb9d6, 0xe2f6, 0x904f, 0x9050, 0x9051, 0xc7d3, - 0x9052, 0x9053, 0x9054, 0x9055, 0x9056, 0xe2f0, 0x9057, 0x9058, - 0x9059, 0x905a, 0x905b, 0xd7dc, 0xeda1, 0x905c, 0x905d, 0xe2f8, - 0x905e, 0xeda5, 0xe2fe, 0xcad1, 0x905f, 0x9060, 0x9061, 0x9062, - 0x9063, 0x9064, 0x9065, 0xc1b5, 0x9066, 0xbbd0, 0x9067, 0x9068, - 0xbfd6, 0x9069, 0xbae3, 0x906a, 0x906b, 0xcba1, 0x906c, 0x906d, - 0x906e, 0xeda6, 0xeda3, 0x906f, 0x9070, 0xeda2, 0x9071, 0x9072, - 0x9073, 0x9074, 0xbbd6, 0xeda7, 0xd0f4, 0x9075, 0x9076, 0xeda4, - 0xbade, 0xb6f7, 0xe3a1, 0xb6b2, 0xccf1, 0xb9a7, 0x9077, 0xcfa2, - 0xc7a1, 0x9078, 0x9079, 0xbfd2, 0x907a, 0x907b, 0xb6f1, 0x907c, - 0xe2fa, 0xe2fb, 0xe2fd, 0xe2fc, 0xc4d5, 0xe3a2, 0x907d, 0xd3c1, - 0x907e, 0x9080, 0x9081, 0xe3a7, 0xc7c4, 0x9082, 0x9083, 0x9084, - 0x9085, 0xcfa4, 0x9086, 0x9087, 0xe3a9, 0xbab7, 0x9088, 0x9089, - 0x908a, 0x908b, 0xe3a8, 0x908c, 0xbbda, 0x908d, 0xe3a3, 0x908e, - 0x908f, 0x9090, 0xe3a4, 0xe3aa, 0x9091, 0xe3a6, 0x9092, 0xcef2, - 0xd3c6, 0x9093, 0x9094, 0xbbbc, 0x9095, 0x9096, 0xd4c3, 0x9097, - 0xc4fa, 0x9098, 0x9099, 0xeda8, 0xd0fc, 0xe3a5, 0x909a, 0xc3f5, - 0x909b, 0xe3ad, 0xb1af, 0x909c, 0xe3b2, 0x909d, 0x909e, 0x909f, - 0xbcc2, 0x90a0, 0x90a1, 0xe3ac, 0xb5bf, 0x90a2, 0x90a3, 0x90a4, - 0x90a5, 0x90a6, 0x90a7, 0x90a8, 0x90a9, 0xc7e9, 0xe3b0, 0x90aa, - 0x90ab, 0x90ac, 0xbeaa, 0xcdef, 0x90ad, 0x90ae, 0x90af, 0x90b0, - 0x90b1, 0xbbf3, 0x90b2, 0x90b3, 0x90b4, 0xcce8, 0x90b5, 0x90b6, - 0xe3af, 0x90b7, 0xe3b1, 0x90b8, 0xcfa7, 0xe3ae, 0x90b9, 0xcea9, - 0xbbdd, 0x90ba, 0x90bb, 0x90bc, 0x90bd, 0x90be, 0xb5eb, 0xbee5, - 0xb2d2, 0xb3cd, 0x90bf, 0xb1b9, 0xe3ab, 0xb2d1, 0xb5ac, 0xb9df, - 0xb6e8, 0x90c0, 0x90c1, 0xcfeb, 0xe3b7, 0x90c2, 0xbbcc, 0x90c3, - 0x90c4, 0xc8c7, 0xd0ca, 0x90c5, 0x90c6, 0x90c7, 0x90c8, 0x90c9, - /* 0x6100 .. 0x61ff */ - 0xe3b8, 0xb3ee, 0x90ca, 0x90cb, 0x90cc, 0x90cd, 0xeda9, 0x90ce, - 0xd3fa, 0xd3e4, 0x90cf, 0x90d0, 0x90d1, 0xedaa, 0xe3b9, 0xd2e2, - 0x90d2, 0x90d3, 0x90d4, 0x90d5, 0x90d6, 0xe3b5, 0x90d7, 0x90d8, - 0x90d9, 0x90da, 0xd3de, 0x90db, 0x90dc, 0x90dd, 0x90de, 0xb8d0, - 0xe3b3, 0x90df, 0x90e0, 0xe3b6, 0xb7df, 0x90e1, 0xe3b4, 0xc0a2, - 0x90e2, 0x90e3, 0x90e4, 0xe3ba, 0x90e5, 0x90e6, 0x90e7, 0x90e8, - 0x90e9, 0x90ea, 0x90eb, 0x90ec, 0x90ed, 0x90ee, 0x90ef, 0x90f0, - 0x90f1, 0x90f2, 0x90f3, 0x90f4, 0x90f5, 0x90f6, 0x90f7, 0xd4b8, - 0x90f8, 0x90f9, 0x90fa, 0x90fb, 0x90fc, 0x90fd, 0x90fe, 0x9140, - 0xb4c8, 0x9141, 0xe3bb, 0x9142, 0xbbc5, 0x9143, 0xc9f7, 0x9144, - 0x9145, 0xc9e5, 0x9146, 0x9147, 0x9148, 0xc4bd, 0x9149, 0x914a, - 0x914b, 0x914c, 0x914d, 0x914e, 0x914f, 0xedab, 0x9150, 0x9151, - 0x9152, 0x9153, 0xc2fd, 0x9154, 0x9155, 0x9156, 0x9157, 0xbbdb, - 0xbfae, 0x9158, 0x9159, 0x915a, 0x915b, 0x915c, 0x915d, 0x915e, - 0xcebf, 0x915f, 0x9160, 0x9161, 0x9162, 0xe3bc, 0x9163, 0xbfb6, - 0x9164, 0x9165, 0x9166, 0x9167, 0x9168, 0x9169, 0x916a, 0x916b, - 0x916c, 0x916d, 0x916e, 0x916f, 0x9170, 0x9171, 0x9172, 0x9173, - 0x9174, 0x9175, 0x9176, 0xb1ef, 0x9177, 0x9178, 0xd4f7, 0x9179, - 0x917a, 0x917b, 0x917c, 0x917d, 0xe3be, 0x917e, 0x9180, 0x9181, - 0x9182, 0x9183, 0x9184, 0x9185, 0x9186, 0xedad, 0x9187, 0x9188, - 0x9189, 0x918a, 0x918b, 0x918c, 0x918d, 0x918e, 0x918f, 0xe3bf, - 0xbaa9, 0xedac, 0x9190, 0x9191, 0xe3bd, 0x9192, 0x9193, 0x9194, - 0x9195, 0x9196, 0x9197, 0x9198, 0x9199, 0x919a, 0x919b, 0xe3c0, - 0x919c, 0x919d, 0x919e, 0x919f, 0x91a0, 0x91a1, 0xbab6, 0x91a2, - 0x91a3, 0x91a4, 0xb6ae, 0x91a5, 0x91a6, 0x91a7, 0x91a8, 0x91a9, - 0xd0b8, 0x91aa, 0xb0c3, 0xedae, 0x91ab, 0x91ac, 0x91ad, 0x91ae, - 0x91af, 0xedaf, 0xc0c1, 0x91b0, 0xe3c1, 0x91b1, 0x91b2, 0x91b3, - 0x91b4, 0x91b5, 0x91b6, 0x91b7, 0x91b8, 0x91b9, 0x91ba, 0x91bb, - 0x91bc, 0x91bd, 0x91be, 0x91bf, 0x91c0, 0x91c1, 0xc5b3, 0x91c2, - 0x91c3, 0x91c4, 0x91c5, 0x91c6, 0x91c7, 0x91c8, 0x91c9, 0x91ca, - 0x91cb, 0x91cc, 0x91cd, 0x91ce, 0x91cf, 0xe3c2, 0x91d0, 0x91d1, - 0x91d2, 0x91d3, 0x91d4, 0x91d5, 0x91d6, 0x91d7, 0x91d8, 0xdcb2, - /* 0x6200 .. 0x62ff */ - 0x91d9, 0x91da, 0x91db, 0x91dc, 0x91dd, 0x91de, 0xedb0, 0x91df, - 0xb8ea, 0x91e0, 0xceec, 0xeaa7, 0xd0e7, 0xcaf9, 0xc8d6, 0xcfb7, - 0xb3c9, 0xced2, 0xbde4, 0x91e1, 0x91e2, 0xe3de, 0xbbf2, 0xeaa8, - 0xd5bd, 0x91e3, 0xc6dd, 0xeaa9, 0x91e4, 0x91e5, 0x91e6, 0xeaaa, - 0x91e7, 0xeaac, 0xeaab, 0x91e8, 0xeaae, 0xeaad, 0x91e9, 0x91ea, - 0x91eb, 0x91ec, 0xbdd8, 0x91ed, 0xeaaf, 0x91ee, 0xc2be, 0x91ef, - 0x91f0, 0x91f1, 0x91f2, 0xb4c1, 0xb4f7, 0x91f3, 0x91f4, 0xbba7, - 0x91f5, 0x91f6, 0x91f7, 0x91f8, 0x91f9, 0xece6, 0xece5, 0xb7bf, - 0xcbf9, 0xb1e2, 0x91fa, 0xece7, 0x91fb, 0x91fc, 0x91fd, 0xc9c8, - 0xece8, 0xece9, 0x91fe, 0xcad6, 0xded0, 0xb2c5, 0xd4fa, 0x9240, - 0x9241, 0xc6cb, 0xb0c7, 0xb4f2, 0xc8d3, 0x9242, 0x9243, 0x9244, - 0xcdd0, 0x9245, 0x9246, 0xbfb8, 0x9247, 0x9248, 0x9249, 0x924a, - 0x924b, 0x924c, 0x924d, 0xbfdb, 0x924e, 0x924f, 0xc7a4, 0xd6b4, - 0x9250, 0xc0a9, 0xded1, 0xc9a8, 0xd1ef, 0xc5a4, 0xb0e7, 0xb3b6, - 0xc8c5, 0x9251, 0x9252, 0xb0e2, 0x9253, 0x9254, 0xb7f6, 0x9255, - 0x9256, 0xc5fa, 0x9257, 0x9258, 0xb6f3, 0x9259, 0xd5d2, 0xb3d0, - 0xbcbc, 0x925a, 0x925b, 0x925c, 0xb3ad, 0x925d, 0x925e, 0x925f, - 0x9260, 0xbef1, 0xb0d1, 0x9261, 0x9262, 0x9263, 0x9264, 0x9265, - 0x9266, 0xd2d6, 0xcae3, 0xd7a5, 0x9267, 0xcdb6, 0xb6b6, 0xbfb9, - 0xd5db, 0x9268, 0xb8a7, 0xc5d7, 0x9269, 0x926a, 0x926b, 0xded2, - 0xbfd9, 0xc2d5, 0xc7c0, 0x926c, 0xbba4, 0xb1a8, 0x926d, 0x926e, - 0xc5ea, 0x926f, 0x9270, 0xc5fb, 0xcca7, 0x9271, 0x9272, 0x9273, - 0x9274, 0xb1a7, 0x9275, 0x9276, 0x9277, 0xb5d6, 0x9278, 0x9279, - 0x927a, 0xc4a8, 0x927b, 0xded3, 0xd1ba, 0xb3e9, 0x927c, 0xc3f2, - 0x927d, 0x927e, 0xb7f7, 0x9280, 0xd6f4, 0xb5a3, 0xb2f0, 0xc4b4, - 0xc4e9, 0xc0ad, 0xded4, 0x9281, 0xb0e8, 0xc5c4, 0xc1e0, 0x9282, - 0xb9d5, 0x9283, 0xbedc, 0xcdd8, 0xb0ce, 0x9284, 0xcdcf, 0xded6, - 0xbed0, 0xd7be, 0xded5, 0xd5d0, 0xb0dd, 0x9285, 0x9286, 0xc4e2, - 0x9287, 0x9288, 0xc2a3, 0xbcf0, 0x9289, 0xd3b5, 0xc0b9, 0xc5a1, - 0xb2a6, 0xd4f1, 0x928a, 0x928b, 0xc0a8, 0xcac3, 0xded7, 0xd5fc, - 0x928c, 0xb9b0, 0x928d, 0xc8ad, 0xcba9, 0x928e, 0xded9, 0xbfbd, - 0x928f, 0x9290, 0x9291, 0x9292, 0xc6b4, 0xd7a7, 0xcab0, 0xc4c3, - /* 0x6300 .. 0x63ff */ - 0x9293, 0xb3d6, 0xb9d2, 0x9294, 0x9295, 0x9296, 0x9297, 0xd6b8, - 0xeafc, 0xb0b4, 0x9298, 0x9299, 0x929a, 0x929b, 0xbfe6, 0x929c, - 0x929d, 0xccf4, 0x929e, 0x929f, 0x92a0, 0x92a1, 0xcdda, 0x92a2, - 0x92a3, 0x92a4, 0xd6bf, 0xc2ce, 0x92a5, 0xcece, 0xcca2, 0xd0ae, - 0xc4d3, 0xb5b2, 0xded8, 0xd5f5, 0xbcb7, 0xbbd3, 0x92a6, 0x92a7, - 0xb0a4, 0x92a8, 0xc5b2, 0xb4ec, 0x92a9, 0x92aa, 0x92ab, 0xd5f1, - 0x92ac, 0x92ad, 0xeafd, 0x92ae, 0x92af, 0x92b0, 0x92b1, 0x92b2, - 0x92b3, 0xdeda, 0xcda6, 0x92b4, 0x92b5, 0xcdec, 0x92b6, 0x92b7, - 0x92b8, 0x92b9, 0xcee6, 0xdedc, 0x92ba, 0xcdb1, 0xc0a6, 0x92bb, - 0x92bc, 0xd7bd, 0x92bd, 0xdedb, 0xb0c6, 0xbab4, 0xc9d3, 0xc4f3, - 0xbee8, 0x92be, 0x92bf, 0x92c0, 0x92c1, 0xb2b6, 0x92c2, 0x92c3, - 0x92c4, 0x92c5, 0x92c6, 0x92c7, 0x92c8, 0x92c9, 0xc0cc, 0xcbf0, - 0x92ca, 0xbcf1, 0xbbbb, 0xb5b7, 0x92cb, 0x92cc, 0x92cd, 0xc5f5, - 0x92ce, 0xdee6, 0x92cf, 0x92d0, 0x92d1, 0xdee3, 0xbedd, 0x92d2, - 0x92d3, 0xdedf, 0x92d4, 0x92d5, 0x92d6, 0x92d7, 0xb4b7, 0xbddd, - 0x92d8, 0x92d9, 0xdee0, 0xc4ed, 0x92da, 0x92db, 0x92dc, 0x92dd, - 0xcfc6, 0x92de, 0xb5e0, 0x92df, 0x92e0, 0x92e1, 0x92e2, 0xb6de, - 0xcada, 0xb5f4, 0xdee5, 0x92e3, 0xd5c6, 0x92e4, 0xdee1, 0xcccd, - 0xc6fe, 0x92e5, 0xc5c5, 0x92e6, 0x92e7, 0x92e8, 0xd2b4, 0x92e9, - 0xbef2, 0x92ea, 0x92eb, 0x92ec, 0x92ed, 0x92ee, 0x92ef, 0x92f0, - 0xc2d3, 0x92f1, 0xccbd, 0xb3b8, 0x92f2, 0xbdd3, 0x92f3, 0xbfd8, - 0xcdc6, 0xd1da, 0xb4eb, 0x92f4, 0xdee4, 0xdedd, 0xdee7, 0x92f5, - 0xeafe, 0x92f6, 0x92f7, 0xc2b0, 0xdee2, 0x92f8, 0x92f9, 0xd6c0, - 0xb5a7, 0x92fa, 0xb2f4, 0x92fb, 0xdee8, 0x92fc, 0xdef2, 0x92fd, - 0x92fe, 0x9340, 0x9341, 0x9342, 0xdeed, 0x9343, 0xdef1, 0x9344, - 0x9345, 0xc8e0, 0x9346, 0x9347, 0x9348, 0xd7e1, 0xdeef, 0xc3e8, - 0xcce1, 0x9349, 0xb2e5, 0x934a, 0x934b, 0x934c, 0xd2be, 0x934d, - 0x934e, 0x934f, 0x9350, 0x9351, 0x9352, 0x9353, 0xdeee, 0x9354, - 0xdeeb, 0xced5, 0x9355, 0xb4a7, 0x9356, 0x9357, 0x9358, 0x9359, - 0x935a, 0xbfab, 0xbebe, 0x935b, 0x935c, 0xbdd2, 0x935d, 0x935e, - 0x935f, 0x9360, 0xdee9, 0x9361, 0xd4ae, 0x9362, 0xdede, 0x9363, - 0xdeea, 0x9364, 0x9365, 0x9366, 0x9367, 0xc0bf, 0x9368, 0xdeec, - /* 0x6400 .. 0x64ff */ - 0xb2f3, 0xb8e9, 0xc2a7, 0x9369, 0x936a, 0xbdc1, 0x936b, 0x936c, - 0x936d, 0x936e, 0x936f, 0xdef5, 0xdef8, 0x9370, 0x9371, 0xb2ab, - 0xb4a4, 0x9372, 0x9373, 0xb4ea, 0xc9a6, 0x9374, 0x9375, 0x9376, - 0x9377, 0x9378, 0x9379, 0xdef6, 0xcbd1, 0x937a, 0xb8e3, 0x937b, - 0xdef7, 0xdefa, 0x937c, 0x937d, 0x937e, 0x9380, 0xdef9, 0x9381, - 0x9382, 0x9383, 0xccc2, 0x9384, 0xb0e1, 0xb4ee, 0x9385, 0x9386, - 0x9387, 0x9388, 0x9389, 0x938a, 0xe5ba, 0x938b, 0x938c, 0x938d, - 0x938e, 0x938f, 0xd0af, 0x9390, 0x9391, 0xb2eb, 0x9392, 0xeba1, - 0x9393, 0xdef4, 0x9394, 0x9395, 0xc9e3, 0xdef3, 0xb0da, 0xd2a1, - 0xb1f7, 0x9396, 0xccaf, 0x9397, 0x9398, 0x9399, 0x939a, 0x939b, - 0x939c, 0x939d, 0xdef0, 0x939e, 0xcba4, 0x939f, 0x93a0, 0x93a1, - 0xd5aa, 0x93a2, 0x93a3, 0x93a4, 0x93a5, 0x93a6, 0xdefb, 0x93a7, - 0x93a8, 0x93a9, 0x93aa, 0x93ab, 0x93ac, 0x93ad, 0x93ae, 0xb4dd, - 0x93af, 0xc4a6, 0x93b0, 0x93b1, 0x93b2, 0xdefd, 0x93b3, 0x93b4, - 0x93b5, 0x93b6, 0x93b7, 0x93b8, 0x93b9, 0x93ba, 0x93bb, 0x93bc, - 0xc3fe, 0xc4a1, 0xdfa1, 0x93bd, 0x93be, 0x93bf, 0x93c0, 0x93c1, - 0x93c2, 0x93c3, 0xc1cc, 0x93c4, 0xdefc, 0xbeef, 0x93c5, 0xc6b2, - 0x93c6, 0x93c7, 0x93c8, 0x93c9, 0x93ca, 0x93cb, 0x93cc, 0x93cd, - 0x93ce, 0xb3c5, 0xc8f6, 0x93cf, 0x93d0, 0xcbba, 0xdefe, 0x93d1, - 0x93d2, 0xdfa4, 0x93d3, 0x93d4, 0x93d5, 0x93d6, 0xd7b2, 0x93d7, - 0x93d8, 0x93d9, 0x93da, 0x93db, 0xb3b7, 0x93dc, 0x93dd, 0x93de, - 0x93df, 0xc1c3, 0x93e0, 0x93e1, 0xc7cb, 0xb2a5, 0xb4e9, 0x93e2, - 0xd7ab, 0x93e3, 0x93e4, 0x93e5, 0x93e6, 0xc4ec, 0x93e7, 0xdfa2, - 0xdfa3, 0x93e8, 0xdfa5, 0x93e9, 0xbab3, 0x93ea, 0x93eb, 0x93ec, - 0xdfa6, 0x93ed, 0xc0de, 0x93ee, 0x93ef, 0xc9c3, 0x93f0, 0x93f1, - 0x93f2, 0x93f3, 0x93f4, 0x93f5, 0x93f6, 0xb2d9, 0xc7e6, 0x93f7, - 0xdfa7, 0x93f8, 0xc7dc, 0x93f9, 0x93fa, 0x93fb, 0x93fc, 0xdfa8, - 0xeba2, 0x93fd, 0x93fe, 0x9440, 0x9441, 0x9442, 0xcbd3, 0x9443, - 0x9444, 0x9445, 0xdfaa, 0x9446, 0xdfa9, 0x9447, 0xb2c1, 0x9448, - 0x9449, 0x944a, 0x944b, 0x944c, 0x944d, 0x944e, 0x944f, 0x9450, - 0x9451, 0x9452, 0x9453, 0x9454, 0x9455, 0x9456, 0x9457, 0x9458, - 0x9459, 0x945a, 0x945b, 0x945c, 0x945d, 0x945e, 0x945f, 0x9460, - /* 0x6500 .. 0x65ff */ - 0xc5ca, 0x9461, 0x9462, 0x9463, 0x9464, 0x9465, 0x9466, 0x9467, - 0x9468, 0xdfab, 0x9469, 0x946a, 0x946b, 0x946c, 0x946d, 0x946e, - 0x946f, 0x9470, 0xd4dc, 0x9471, 0x9472, 0x9473, 0x9474, 0x9475, - 0xc8c1, 0x9476, 0x9477, 0x9478, 0x9479, 0x947a, 0x947b, 0x947c, - 0x947d, 0x947e, 0x9480, 0x9481, 0x9482, 0xdfac, 0x9483, 0x9484, - 0x9485, 0x9486, 0x9487, 0xbef0, 0x9488, 0x9489, 0xdfad, 0xd6a7, - 0x948a, 0x948b, 0x948c, 0x948d, 0xeab7, 0xebb6, 0xcad5, 0x948e, - 0xd8fc, 0xb8c4, 0x948f, 0xb9a5, 0x9490, 0x9491, 0xb7c5, 0xd5fe, - 0x9492, 0x9493, 0x9494, 0x9495, 0x9496, 0xb9ca, 0x9497, 0x9498, - 0xd0a7, 0xf4cd, 0x9499, 0x949a, 0xb5d0, 0x949b, 0x949c, 0xc3f4, - 0x949d, 0xbec8, 0x949e, 0x949f, 0x94a0, 0xebb7, 0xb0bd, 0x94a1, - 0x94a2, 0xbdcc, 0x94a3, 0xc1b2, 0x94a4, 0xb1d6, 0xb3a8, 0x94a5, - 0x94a6, 0x94a7, 0xb8d2, 0xc9a2, 0x94a8, 0x94a9, 0xb6d8, 0x94aa, - 0x94ab, 0x94ac, 0x94ad, 0xebb8, 0xbeb4, 0x94ae, 0x94af, 0x94b0, - 0xcafd, 0x94b1, 0xc7c3, 0x94b2, 0xd5fb, 0x94b3, 0x94b4, 0xb7f3, - 0x94b5, 0x94b6, 0x94b7, 0x94b8, 0x94b9, 0x94ba, 0x94bb, 0x94bc, - 0x94bd, 0x94be, 0x94bf, 0x94c0, 0x94c1, 0x94c2, 0x94c3, 0xcec4, - 0x94c4, 0x94c5, 0x94c6, 0xd5ab, 0xb1f3, 0x94c7, 0x94c8, 0x94c9, - 0xecb3, 0xb0df, 0x94ca, 0xecb5, 0x94cb, 0x94cc, 0x94cd, 0xb6b7, - 0x94ce, 0xc1cf, 0x94cf, 0xf5fa, 0xd0b1, 0x94d0, 0x94d1, 0xd5e5, - 0x94d2, 0xced3, 0x94d3, 0x94d4, 0xbdef, 0xb3e2, 0x94d5, 0xb8ab, - 0x94d6, 0xd5b6, 0x94d7, 0xedbd, 0x94d8, 0xb6cf, 0x94d9, 0xcbb9, - 0xd0c2, 0x94da, 0x94db, 0x94dc, 0x94dd, 0x94de, 0x94df, 0x94e0, - 0x94e1, 0xb7bd, 0x94e2, 0x94e3, 0xecb6, 0xcaa9, 0x94e4, 0x94e5, - 0x94e6, 0xc5d4, 0x94e7, 0xecb9, 0xecb8, 0xc2c3, 0xecb7, 0x94e8, - 0x94e9, 0x94ea, 0x94eb, 0xd0fd, 0xecba, 0x94ec, 0xecbb, 0xd7e5, - 0x94ed, 0x94ee, 0xecbc, 0x94ef, 0x94f0, 0x94f1, 0xecbd, 0xc6ec, - 0x94f2, 0x94f3, 0x94f4, 0x94f5, 0x94f6, 0x94f7, 0x94f8, 0x94f9, - 0xcede, 0x94fa, 0xbcc8, 0x94fb, 0x94fc, 0xc8d5, 0xb5a9, 0xbec9, - 0xd6bc, 0xd4e7, 0x94fd, 0x94fe, 0xd1ae, 0xd0f1, 0xeab8, 0xeab9, - 0xeaba, 0xbab5, 0x9540, 0x9541, 0x9542, 0x9543, 0xcab1, 0xbff5, - 0x9544, 0x9545, 0xcdfa, 0x9546, 0x9547, 0x9548, 0x9549, 0x954a, - /* 0x6600 .. 0x66ff */ - 0xeac0, 0x954b, 0xb0ba, 0xeabe, 0x954c, 0x954d, 0xc0a5, 0x954e, - 0x954f, 0x9550, 0xeabb, 0x9551, 0xb2fd, 0x9552, 0xc3f7, 0xbbe8, - 0x9553, 0x9554, 0x9555, 0xd2d7, 0xcef4, 0xeabf, 0x9556, 0x9557, - 0x9558, 0xeabc, 0x9559, 0x955a, 0x955b, 0xeac3, 0x955c, 0xd0c7, - 0xd3b3, 0x955d, 0x955e, 0x955f, 0x9560, 0xb4ba, 0x9561, 0xc3c1, - 0xd7f2, 0x9562, 0x9563, 0x9564, 0x9565, 0xd5d1, 0x9566, 0xcac7, - 0x9567, 0xeac5, 0x9568, 0x9569, 0xeac4, 0xeac7, 0xeac6, 0x956a, - 0x956b, 0x956c, 0x956d, 0x956e, 0xd6e7, 0x956f, 0xcfd4, 0x9570, - 0x9571, 0xeacb, 0x9572, 0xbbce, 0x9573, 0x9574, 0x9575, 0x9576, - 0x9577, 0x9578, 0x9579, 0xbdfa, 0xc9ce, 0x957a, 0x957b, 0xeacc, - 0x957c, 0x957d, 0xc9b9, 0xcffe, 0xeaca, 0xd4ce, 0xeacd, 0xeacf, - 0x957e, 0x9580, 0xcded, 0x9581, 0x9582, 0x9583, 0x9584, 0xeac9, - 0x9585, 0xeace, 0x9586, 0x9587, 0xceee, 0x9588, 0xbbde, 0x9589, - 0xb3bf, 0x958a, 0x958b, 0x958c, 0x958d, 0x958e, 0xc6d5, 0xbeb0, - 0xcefa, 0x958f, 0x9590, 0x9591, 0xc7e7, 0x9592, 0xbea7, 0xead0, - 0x9593, 0x9594, 0xd6c7, 0x9595, 0x9596, 0x9597, 0xc1c0, 0x9598, - 0x9599, 0x959a, 0xd4dd, 0x959b, 0xead1, 0x959c, 0x959d, 0xcfbe, - 0x959e, 0x959f, 0x95a0, 0x95a1, 0xead2, 0x95a2, 0x95a3, 0x95a4, - 0x95a5, 0xcaee, 0x95a6, 0x95a7, 0x95a8, 0x95a9, 0xc5af, 0xb0b5, - 0x95aa, 0x95ab, 0x95ac, 0x95ad, 0x95ae, 0xead4, 0x95af, 0x95b0, - 0x95b1, 0x95b2, 0x95b3, 0x95b4, 0x95b5, 0x95b6, 0x95b7, 0xead3, - 0xf4df, 0x95b8, 0x95b9, 0x95ba, 0x95bb, 0x95bc, 0xc4ba, 0x95bd, - 0x95be, 0x95bf, 0x95c0, 0x95c1, 0xb1a9, 0x95c2, 0x95c3, 0x95c4, - 0x95c5, 0xe5df, 0x95c6, 0x95c7, 0x95c8, 0x95c9, 0xead5, 0x95ca, - 0x95cb, 0x95cc, 0x95cd, 0x95ce, 0x95cf, 0x95d0, 0x95d1, 0x95d2, - 0x95d3, 0x95d4, 0x95d5, 0x95d6, 0x95d7, 0x95d8, 0x95d9, 0x95da, - 0x95db, 0x95dc, 0x95dd, 0x95de, 0x95df, 0x95e0, 0x95e1, 0x95e2, - 0x95e3, 0xcaef, 0x95e4, 0xead6, 0xead7, 0xc6d8, 0x95e5, 0x95e6, - 0x95e7, 0x95e8, 0x95e9, 0x95ea, 0x95eb, 0x95ec, 0xead8, 0x95ed, - 0x95ee, 0xead9, 0x95ef, 0x95f0, 0x95f1, 0x95f2, 0x95f3, 0x95f4, - 0xd4bb, 0x95f5, 0xc7fa, 0xd2b7, 0xb8fc, 0x95f6, 0x95f7, 0xeac2, - 0x95f8, 0xb2dc, 0x95f9, 0x95fa, 0xc2fc, 0x95fb, 0xd4f8, 0xcce6, - /* 0x6700 .. 0x67ff */ - 0xd7ee, 0x95fc, 0x95fd, 0x95fe, 0x9640, 0x9641, 0x9642, 0x9643, - 0xd4c2, 0xd3d0, 0xebc3, 0xc5f3, 0x9644, 0xb7fe, 0x9645, 0x9646, - 0xebd4, 0x9647, 0x9648, 0x9649, 0xcbb7, 0xebde, 0x964a, 0xc0ca, - 0x964b, 0x964c, 0x964d, 0xcdfb, 0x964e, 0xb3af, 0x964f, 0xc6da, - 0x9650, 0x9651, 0x9652, 0x9653, 0x9654, 0x9655, 0xebfc, 0x9656, - 0xc4be, 0x9657, 0xceb4, 0xc4a9, 0xb1be, 0xd4fd, 0x9658, 0xcaf5, - 0x9659, 0xd6ec, 0x965a, 0x965b, 0xc6d3, 0xb6e4, 0x965c, 0x965d, - 0x965e, 0x965f, 0xbbfa, 0x9660, 0x9661, 0xd0e0, 0x9662, 0x9663, - 0xc9b1, 0x9664, 0xd4d3, 0xc8a8, 0x9665, 0x9666, 0xb8cb, 0x9667, - 0xe8be, 0xc9bc, 0x9668, 0x9669, 0xe8bb, 0x966a, 0xc0ee, 0xd0d3, - 0xb2c4, 0xb4e5, 0x966b, 0xe8bc, 0x966c, 0x966d, 0xd5c8, 0x966e, - 0x966f, 0x9670, 0x9671, 0x9672, 0xb6c5, 0x9673, 0xe8bd, 0xcaf8, - 0xb8dc, 0xccf5, 0x9674, 0x9675, 0x9676, 0xc0b4, 0x9677, 0x9678, - 0xd1ee, 0xe8bf, 0xe8c2, 0x9679, 0x967a, 0xbabc, 0x967b, 0xb1ad, - 0xbddc, 0x967c, 0xeabd, 0xe8c3, 0x967d, 0xe8c6, 0x967e, 0xe8cb, - 0x9680, 0x9681, 0x9682, 0x9683, 0xe8cc, 0x9684, 0xcbc9, 0xb0e5, - 0x9685, 0xbcab, 0x9686, 0x9687, 0xb9b9, 0x9688, 0x9689, 0xe8c1, - 0x968a, 0xcdf7, 0x968b, 0xe8ca, 0x968c, 0x968d, 0x968e, 0x968f, - 0xcef6, 0x9690, 0x9691, 0x9692, 0x9693, 0xd5ed, 0x9694, 0xc1d6, - 0xe8c4, 0x9695, 0xc3b6, 0x9696, 0xb9fb, 0xd6a6, 0xe8c8, 0x9697, - 0x9698, 0x9699, 0xcae0, 0xd4e6, 0x969a, 0xe8c0, 0x969b, 0xe8c5, - 0xe8c7, 0x969c, 0xc7b9, 0xb7e3, 0x969d, 0xe8c9, 0x969e, 0xbfdd, - 0xe8d2, 0x969f, 0x96a0, 0xe8d7, 0x96a1, 0xe8d5, 0xbcdc, 0xbccf, - 0xe8db, 0x96a2, 0x96a3, 0x96a4, 0x96a5, 0x96a6, 0x96a7, 0x96a8, - 0x96a9, 0xe8de, 0x96aa, 0xe8da, 0xb1fa, 0x96ab, 0x96ac, 0x96ad, - 0x96ae, 0x96af, 0x96b0, 0x96b1, 0x96b2, 0x96b3, 0x96b4, 0xb0d8, - 0xc4b3, 0xb8cc, 0xc6e2, 0xc8be, 0xc8e1, 0x96b5, 0x96b6, 0x96b7, - 0xe8cf, 0xe8d4, 0xe8d6, 0x96b8, 0xb9f1, 0xe8d8, 0xd7f5, 0x96b9, - 0xc4fb, 0x96ba, 0xe8dc, 0x96bb, 0x96bc, 0xb2e9, 0x96bd, 0x96be, - 0x96bf, 0xe8d1, 0x96c0, 0x96c1, 0xbced, 0x96c2, 0x96c3, 0xbfc2, - 0xe8cd, 0xd6f9, 0x96c4, 0xc1f8, 0xb2f1, 0x96c5, 0x96c6, 0x96c7, - 0x96c8, 0x96c9, 0x96ca, 0x96cb, 0x96cc, 0xe8df, 0x96cd, 0xcac1, - /* 0x6800 .. 0x68ff */ - 0xe8d9, 0x96ce, 0x96cf, 0x96d0, 0x96d1, 0xd5a4, 0x96d2, 0xb1ea, - 0xd5bb, 0xe8ce, 0xe8d0, 0xb6b0, 0xe8d3, 0x96d3, 0xe8dd, 0xc0b8, - 0x96d4, 0xcaf7, 0x96d5, 0xcba8, 0x96d6, 0x96d7, 0xc6dc, 0xc0f5, - 0x96d8, 0x96d9, 0x96da, 0x96db, 0x96dc, 0xe8e9, 0x96dd, 0x96de, - 0x96df, 0xd0a3, 0x96e0, 0x96e1, 0x96e2, 0x96e3, 0x96e4, 0x96e5, - 0x96e6, 0xe8f2, 0xd6ea, 0x96e7, 0x96e8, 0x96e9, 0x96ea, 0x96eb, - 0x96ec, 0x96ed, 0xe8e0, 0xe8e1, 0x96ee, 0x96ef, 0x96f0, 0xd1f9, - 0xbacb, 0xb8f9, 0x96f1, 0x96f2, 0xb8f1, 0xd4d4, 0xe8ef, 0x96f3, - 0xe8ee, 0xe8ec, 0xb9f0, 0xccd2, 0xe8e6, 0xcea6, 0xbff2, 0x96f4, - 0xb0b8, 0xe8f1, 0xe8f0, 0x96f5, 0xd7c0, 0x96f6, 0xe8e4, 0x96f7, - 0xcda9, 0xc9a3, 0x96f8, 0xbbb8, 0xbddb, 0xe8ea, 0x96f9, 0x96fa, - 0x96fb, 0x96fc, 0x96fd, 0x96fe, 0x9740, 0x9741, 0x9742, 0x9743, - 0xe8e2, 0xe8e3, 0xe8e5, 0xb5b5, 0xe8e7, 0xc7c5, 0xe8eb, 0xe8ed, - 0xbdb0, 0xd7ae, 0x9744, 0xe8f8, 0x9745, 0x9746, 0x9747, 0x9748, - 0x9749, 0x974a, 0x974b, 0x974c, 0xe8f5, 0x974d, 0xcdb0, 0xe8f6, - 0x974e, 0x974f, 0x9750, 0x9751, 0x9752, 0x9753, 0x9754, 0x9755, - 0x9756, 0xc1ba, 0x9757, 0xe8e8, 0x9758, 0xc3b7, 0xb0f0, 0x9759, - 0x975a, 0x975b, 0x975c, 0x975d, 0x975e, 0x975f, 0x9760, 0xe8f4, - 0x9761, 0x9762, 0x9763, 0xe8f7, 0x9764, 0x9765, 0x9766, 0xb9a3, - 0x9767, 0x9768, 0x9769, 0x976a, 0x976b, 0x976c, 0x976d, 0x976e, - 0x976f, 0x9770, 0xc9d2, 0x9771, 0x9772, 0x9773, 0xc3ce, 0xcee0, - 0xc0e6, 0x9774, 0x9775, 0x9776, 0x9777, 0xcbf3, 0x9778, 0xccdd, - 0xd0b5, 0x9779, 0x977a, 0xcae1, 0x977b, 0xe8f3, 0x977c, 0x977d, - 0x977e, 0x9780, 0x9781, 0x9782, 0x9783, 0x9784, 0x9785, 0x9786, - 0xbcec, 0x9787, 0xe8f9, 0x9788, 0x9789, 0x978a, 0x978b, 0x978c, - 0x978d, 0xc3de, 0x978e, 0xc6e5, 0x978f, 0xb9f7, 0x9790, 0x9791, - 0x9792, 0x9793, 0xb0f4, 0x9794, 0x9795, 0xd7d8, 0x9796, 0x9797, - 0xbcac, 0x9798, 0xc5ef, 0x9799, 0x979a, 0x979b, 0x979c, 0x979d, - 0xccc4, 0x979e, 0x979f, 0xe9a6, 0x97a0, 0x97a1, 0x97a2, 0x97a3, - 0x97a4, 0x97a5, 0x97a6, 0x97a7, 0x97a8, 0x97a9, 0xc9ad, 0x97aa, - 0xe9a2, 0xc0e2, 0x97ab, 0x97ac, 0x97ad, 0xbfc3, 0x97ae, 0x97af, - 0x97b0, 0xe8fe, 0xb9d7, 0x97b1, 0xe8fb, 0x97b2, 0x97b3, 0x97b4, - /* 0x6900 .. 0x69ff */ - 0x97b5, 0xe9a4, 0x97b6, 0x97b7, 0x97b8, 0xd2ce, 0x97b9, 0x97ba, - 0x97bb, 0x97bc, 0x97bd, 0xe9a3, 0x97be, 0xd6b2, 0xd7b5, 0x97bf, - 0xe9a7, 0x97c0, 0xbdb7, 0x97c1, 0x97c2, 0x97c3, 0x97c4, 0x97c5, - 0x97c6, 0x97c7, 0x97c8, 0x97c9, 0x97ca, 0x97cb, 0x97cc, 0xe8fc, - 0xe8fd, 0x97cd, 0x97ce, 0x97cf, 0xe9a1, 0x97d0, 0x97d1, 0x97d2, - 0x97d3, 0x97d4, 0x97d5, 0x97d6, 0x97d7, 0xcdd6, 0x97d8, 0x97d9, - 0xd2ac, 0x97da, 0x97db, 0x97dc, 0xe9b2, 0x97dd, 0x97de, 0x97df, - 0x97e0, 0xe9a9, 0x97e1, 0x97e2, 0x97e3, 0xb4aa, 0x97e4, 0xb4bb, - 0x97e5, 0x97e6, 0xe9ab, 0x97e7, 0x97e8, 0x97e9, 0x97ea, 0x97eb, - 0x97ec, 0x97ed, 0x97ee, 0x97ef, 0x97f0, 0x97f1, 0x97f2, 0x97f3, - 0x97f4, 0x97f5, 0x97f6, 0x97f7, 0xd0a8, 0x97f8, 0x97f9, 0xe9a5, - 0x97fa, 0x97fb, 0xb3fe, 0x97fc, 0x97fd, 0xe9ac, 0xc0e3, 0x97fe, - 0xe9aa, 0x9840, 0x9841, 0xe9b9, 0x9842, 0x9843, 0xe9b8, 0x9844, - 0x9845, 0x9846, 0x9847, 0xe9ae, 0x9848, 0x9849, 0xe8fa, 0x984a, - 0x984b, 0xe9a8, 0x984c, 0x984d, 0x984e, 0x984f, 0x9850, 0xbfac, - 0xe9b1, 0xe9ba, 0x9851, 0x9852, 0xc2a5, 0x9853, 0x9854, 0x9855, - 0xe9af, 0x9856, 0xb8c5, 0x9857, 0xe9ad, 0x9858, 0xd3dc, 0xe9b4, - 0xe9b5, 0xe9b7, 0x9859, 0x985a, 0x985b, 0xe9c7, 0x985c, 0x985d, - 0x985e, 0x985f, 0x9860, 0x9861, 0xc0c6, 0xe9c5, 0x9862, 0x9863, - 0xe9b0, 0x9864, 0x9865, 0xe9bb, 0xb0f1, 0x9866, 0x9867, 0x9868, - 0x9869, 0x986a, 0x986b, 0x986c, 0x986d, 0x986e, 0x986f, 0xe9bc, - 0xd5a5, 0x9870, 0x9871, 0xe9be, 0x9872, 0xe9bf, 0x9873, 0x9874, - 0x9875, 0xe9c1, 0x9876, 0x9877, 0xc1f1, 0x9878, 0x9879, 0xc8b6, - 0x987a, 0x987b, 0x987c, 0xe9bd, 0x987d, 0x987e, 0x9880, 0x9881, - 0x9882, 0xe9c2, 0x9883, 0x9884, 0x9885, 0x9886, 0x9887, 0x9888, - 0x9889, 0x988a, 0xe9c3, 0x988b, 0xe9b3, 0x988c, 0xe9b6, 0x988d, - 0xbbb1, 0x988e, 0x988f, 0x9890, 0xe9c0, 0x9891, 0x9892, 0x9893, - 0x9894, 0x9895, 0x9896, 0xbcf7, 0x9897, 0x9898, 0x9899, 0xe9c4, - 0xe9c6, 0x989a, 0x989b, 0x989c, 0x989d, 0x989e, 0x989f, 0x98a0, - 0x98a1, 0x98a2, 0x98a3, 0x98a4, 0x98a5, 0xe9ca, 0x98a6, 0x98a7, - 0x98a8, 0x98a9, 0xe9ce, 0x98aa, 0x98ab, 0x98ac, 0x98ad, 0x98ae, - 0x98af, 0x98b0, 0x98b1, 0x98b2, 0x98b3, 0xb2db, 0x98b4, 0xe9c8, - /* 0x6a00 .. 0x6aff */ - 0x98b5, 0x98b6, 0x98b7, 0x98b8, 0x98b9, 0x98ba, 0x98bb, 0x98bc, - 0x98bd, 0x98be, 0xb7ae, 0x98bf, 0x98c0, 0x98c1, 0x98c2, 0x98c3, - 0x98c4, 0x98c5, 0x98c6, 0x98c7, 0x98c8, 0x98c9, 0x98ca, 0xe9cb, - 0xe9cc, 0x98cb, 0x98cc, 0x98cd, 0x98ce, 0x98cf, 0x98d0, 0xd5c1, - 0x98d1, 0xc4a3, 0x98d2, 0x98d3, 0x98d4, 0x98d5, 0x98d6, 0x98d7, - 0xe9d8, 0x98d8, 0xbae1, 0x98d9, 0x98da, 0x98db, 0x98dc, 0xe9c9, - 0x98dd, 0xd3a3, 0x98de, 0x98df, 0x98e0, 0xe9d4, 0x98e1, 0x98e2, - 0x98e3, 0x98e4, 0x98e5, 0x98e6, 0x98e7, 0xe9d7, 0xe9d0, 0x98e8, - 0x98e9, 0x98ea, 0x98eb, 0x98ec, 0xe9cf, 0x98ed, 0x98ee, 0xc7c1, - 0x98ef, 0x98f0, 0x98f1, 0x98f2, 0x98f3, 0x98f4, 0x98f5, 0x98f6, - 0xe9d2, 0x98f7, 0x98f8, 0x98f9, 0x98fa, 0x98fb, 0x98fc, 0x98fd, - 0xe9d9, 0xb3c8, 0x98fe, 0xe9d3, 0x9940, 0x9941, 0x9942, 0x9943, - 0x9944, 0xcff0, 0x9945, 0x9946, 0x9947, 0xe9cd, 0x9948, 0x9949, - 0x994a, 0x994b, 0x994c, 0x994d, 0x994e, 0x994f, 0x9950, 0x9951, - 0x9952, 0xb3f7, 0x9953, 0x9954, 0x9955, 0x9956, 0x9957, 0x9958, - 0x9959, 0xe9d6, 0x995a, 0x995b, 0xe9da, 0x995c, 0x995d, 0x995e, - 0xccb4, 0x995f, 0x9960, 0x9961, 0xcfad, 0x9962, 0x9963, 0x9964, - 0x9965, 0x9966, 0x9967, 0x9968, 0x9969, 0x996a, 0xe9d5, 0x996b, - 0xe9dc, 0xe9db, 0x996c, 0x996d, 0x996e, 0x996f, 0x9970, 0xe9de, - 0x9971, 0x9972, 0x9973, 0x9974, 0x9975, 0x9976, 0x9977, 0x9978, - 0xe9d1, 0x9979, 0x997a, 0x997b, 0x997c, 0x997d, 0x997e, 0x9980, - 0x9981, 0xe9dd, 0x9982, 0xe9df, 0xc3ca, 0x9983, 0x9984, 0x9985, - 0x9986, 0x9987, 0x9988, 0x9989, 0x998a, 0x998b, 0x998c, 0x998d, - 0x998e, 0x998f, 0x9990, 0x9991, 0x9992, 0x9993, 0x9994, 0x9995, - 0x9996, 0x9997, 0x9998, 0x9999, 0x999a, 0x999b, 0x999c, 0x999d, - 0x999e, 0x999f, 0x99a0, 0x99a1, 0x99a2, 0x99a3, 0x99a4, 0x99a5, - 0x99a6, 0x99a7, 0x99a8, 0x99a9, 0x99aa, 0x99ab, 0x99ac, 0x99ad, - 0x99ae, 0x99af, 0x99b0, 0x99b1, 0x99b2, 0x99b3, 0x99b4, 0x99b5, - 0x99b6, 0x99b7, 0x99b8, 0x99b9, 0x99ba, 0x99bb, 0x99bc, 0x99bd, - 0x99be, 0x99bf, 0x99c0, 0x99c1, 0x99c2, 0x99c3, 0x99c4, 0x99c5, - 0x99c6, 0x99c7, 0x99c8, 0x99c9, 0x99ca, 0x99cb, 0x99cc, 0x99cd, - 0x99ce, 0x99cf, 0x99d0, 0x99d1, 0x99d2, 0x99d3, 0x99d4, 0x99d5, - /* 0x6b00 .. 0x6bff */ - 0x99d6, 0x99d7, 0x99d8, 0x99d9, 0x99da, 0x99db, 0x99dc, 0x99dd, - 0x99de, 0x99df, 0x99e0, 0x99e1, 0x99e2, 0x99e3, 0x99e4, 0x99e5, - 0x99e6, 0x99e7, 0x99e8, 0x99e9, 0x99ea, 0x99eb, 0x99ec, 0x99ed, - 0x99ee, 0x99ef, 0x99f0, 0x99f1, 0x99f2, 0x99f3, 0x99f4, 0x99f5, - 0xc7b7, 0xb4ce, 0xbbb6, 0xd0c0, 0xeca3, 0x99f6, 0x99f7, 0xc5b7, - 0x99f8, 0x99f9, 0x99fa, 0x99fb, 0x99fc, 0x99fd, 0x99fe, 0x9a40, - 0x9a41, 0x9a42, 0xd3fb, 0x9a43, 0x9a44, 0x9a45, 0x9a46, 0xeca4, - 0x9a47, 0xeca5, 0xc6db, 0x9a48, 0x9a49, 0x9a4a, 0xbfee, 0x9a4b, - 0x9a4c, 0x9a4d, 0x9a4e, 0xeca6, 0x9a4f, 0x9a50, 0xeca7, 0xd0aa, - 0x9a51, 0xc7b8, 0x9a52, 0x9a53, 0xb8e8, 0x9a54, 0x9a55, 0x9a56, - 0x9a57, 0x9a58, 0x9a59, 0x9a5a, 0x9a5b, 0x9a5c, 0x9a5d, 0x9a5e, - 0x9a5f, 0xeca8, 0x9a60, 0x9a61, 0x9a62, 0x9a63, 0x9a64, 0x9a65, - 0x9a66, 0x9a67, 0xd6b9, 0xd5fd, 0xb4cb, 0xb2bd, 0xcee4, 0xc6e7, - 0x9a68, 0x9a69, 0xcde1, 0x9a6a, 0x9a6b, 0x9a6c, 0x9a6d, 0x9a6e, - 0x9a6f, 0x9a70, 0x9a71, 0x9a72, 0x9a73, 0x9a74, 0x9a75, 0x9a76, - 0x9a77, 0xb4f5, 0x9a78, 0xcbc0, 0xbcdf, 0x9a79, 0x9a7a, 0x9a7b, - 0x9a7c, 0xe9e2, 0xe9e3, 0xd1ea, 0xe9e5, 0x9a7d, 0xb4f9, 0xe9e4, - 0x9a7e, 0xd1b3, 0xcae2, 0xb2d0, 0x9a80, 0xe9e8, 0x9a81, 0x9a82, - 0x9a83, 0x9a84, 0xe9e6, 0xe9e7, 0x9a85, 0x9a86, 0xd6b3, 0x9a87, - 0x9a88, 0x9a89, 0xe9e9, 0xe9ea, 0x9a8a, 0x9a8b, 0x9a8c, 0x9a8d, - 0x9a8e, 0xe9eb, 0x9a8f, 0x9a90, 0x9a91, 0x9a92, 0x9a93, 0x9a94, - 0x9a95, 0x9a96, 0xe9ec, 0x9a97, 0x9a98, 0x9a99, 0x9a9a, 0x9a9b, - 0x9a9c, 0x9a9d, 0x9a9e, 0xecaf, 0xc5b9, 0xb6ce, 0x9a9f, 0xd2f3, - 0x9aa0, 0x9aa1, 0x9aa2, 0x9aa3, 0x9aa4, 0x9aa5, 0x9aa6, 0xb5ee, - 0x9aa7, 0xbbd9, 0xecb1, 0x9aa8, 0x9aa9, 0xd2e3, 0x9aaa, 0x9aab, - 0x9aac, 0x9aad, 0x9aae, 0xcee3, 0x9aaf, 0xc4b8, 0x9ab0, 0xc3bf, - 0x9ab1, 0x9ab2, 0xb6be, 0xd8b9, 0xb1c8, 0xb1cf, 0xb1d1, 0xc5fe, - 0x9ab3, 0xb1d0, 0x9ab4, 0xc3ab, 0x9ab5, 0x9ab6, 0x9ab7, 0x9ab8, - 0x9ab9, 0xd5b1, 0x9aba, 0x9abb, 0x9abc, 0x9abd, 0x9abe, 0x9abf, - 0x9ac0, 0x9ac1, 0xeba4, 0xbac1, 0x9ac2, 0x9ac3, 0x9ac4, 0xccba, - 0x9ac5, 0x9ac6, 0x9ac7, 0xeba5, 0x9ac8, 0xeba7, 0x9ac9, 0x9aca, - 0x9acb, 0xeba8, 0x9acc, 0x9acd, 0x9ace, 0xeba6, 0x9acf, 0x9ad0, - /* 0x6c00 .. 0x6cff */ - 0x9ad1, 0x9ad2, 0x9ad3, 0x9ad4, 0x9ad5, 0xeba9, 0xebab, 0xebaa, - 0x9ad6, 0x9ad7, 0x9ad8, 0x9ad9, 0x9ada, 0xebac, 0x9adb, 0xcacf, - 0xd8b5, 0xc3f1, 0x9adc, 0xc3a5, 0xc6f8, 0xebad, 0xc4ca, 0x9add, - 0xebae, 0xebaf, 0xebb0, 0xb7d5, 0x9ade, 0x9adf, 0x9ae0, 0xb7fa, - 0x9ae1, 0xebb1, 0xc7e2, 0x9ae2, 0xebb3, 0x9ae3, 0xbaa4, 0xd1f5, - 0xb0b1, 0xebb2, 0xebb4, 0x9ae4, 0x9ae5, 0x9ae6, 0xb5aa, 0xc2c8, - 0xc7e8, 0x9ae7, 0xebb5, 0x9ae8, 0xcbae, 0xe3df, 0x9ae9, 0x9aea, - 0xd3c0, 0x9aeb, 0x9aec, 0x9aed, 0x9aee, 0xd9db, 0x9aef, 0x9af0, - 0xcda1, 0xd6ad, 0xc7f3, 0x9af1, 0x9af2, 0x9af3, 0xd9e0, 0xbbe3, - 0x9af4, 0xbaba, 0xe3e2, 0x9af5, 0x9af6, 0x9af7, 0x9af8, 0x9af9, - 0xcfab, 0x9afa, 0x9afb, 0x9afc, 0xe3e0, 0xc9c7, 0x9afd, 0xbab9, - 0x9afe, 0x9b40, 0x9b41, 0xd1b4, 0xe3e1, 0xc8ea, 0xb9af, 0xbdad, - 0xb3d8, 0xcedb, 0x9b42, 0x9b43, 0xccc0, 0x9b44, 0x9b45, 0x9b46, - 0xe3e8, 0xe3e9, 0xcdf4, 0x9b47, 0x9b48, 0x9b49, 0x9b4a, 0x9b4b, - 0xccad, 0x9b4c, 0xbcb3, 0x9b4d, 0xe3ea, 0x9b4e, 0xe3eb, 0x9b4f, - 0x9b50, 0xd0da, 0x9b51, 0x9b52, 0x9b53, 0xc6fb, 0xb7da, 0x9b54, - 0x9b55, 0xc7df, 0xd2ca, 0xced6, 0x9b56, 0xe3e4, 0xe3ec, 0x9b57, - 0xc9f2, 0xb3c1, 0x9b58, 0x9b59, 0xe3e7, 0x9b5a, 0x9b5b, 0xc6e3, - 0xe3e5, 0x9b5c, 0x9b5d, 0xedb3, 0xe3e6, 0x9b5e, 0x9b5f, 0x9b60, - 0x9b61, 0xc9b3, 0x9b62, 0xc5e6, 0x9b63, 0x9b64, 0x9b65, 0xb9b5, - 0x9b66, 0xc3bb, 0x9b67, 0xe3e3, 0xc5bd, 0xc1a4, 0xc2d9, 0xb2d7, - 0x9b68, 0xe3ed, 0xbba6, 0xc4ad, 0x9b69, 0xe3f0, 0xbeda, 0x9b6a, - 0x9b6b, 0xe3fb, 0xe3f5, 0xbad3, 0x9b6c, 0x9b6d, 0x9b6e, 0x9b6f, - 0xb7d0, 0xd3cd, 0x9b70, 0xd6ce, 0xd5d3, 0xb9c1, 0xd5b4, 0xd1d8, - 0x9b71, 0x9b72, 0x9b73, 0x9b74, 0xd0b9, 0xc7f6, 0x9b75, 0x9b76, - 0x9b77, 0xc8aa, 0xb2b4, 0x9b78, 0xc3da, 0x9b79, 0x9b7a, 0x9b7b, - 0xe3ee, 0x9b7c, 0x9b7d, 0xe3fc, 0xe3ef, 0xb7a8, 0xe3f7, 0xe3f4, - 0x9b7e, 0x9b80, 0x9b81, 0xb7ba, 0x9b82, 0x9b83, 0xc5a2, 0x9b84, - 0xe3f6, 0xc5dd, 0xb2a8, 0xc6fc, 0x9b85, 0xc4e0, 0x9b86, 0x9b87, - 0xd7a2, 0x9b88, 0xc0e1, 0xe3f9, 0x9b89, 0x9b8a, 0xe3fa, 0xe3fd, - 0xcca9, 0xe3f3, 0x9b8b, 0xd3be, 0x9b8c, 0xb1c3, 0xedb4, 0xe3f1, - 0xe3f2, 0x9b8d, 0xe3f8, 0xd0ba, 0xc6c3, 0xd4f3, 0xe3fe, 0x9b8e, - /* 0x6d00 .. 0x6dff */ - 0x9b8f, 0xbde0, 0x9b90, 0x9b91, 0xe4a7, 0x9b92, 0x9b93, 0xe4a6, - 0x9b94, 0x9b95, 0x9b96, 0xd1f3, 0xe4a3, 0x9b97, 0xe4a9, 0x9b98, - 0x9b99, 0x9b9a, 0xc8f7, 0x9b9b, 0x9b9c, 0x9b9d, 0x9b9e, 0xcfb4, - 0x9b9f, 0xe4a8, 0xe4ae, 0xc2e5, 0x9ba0, 0x9ba1, 0xb6b4, 0x9ba2, - 0x9ba3, 0x9ba4, 0x9ba5, 0x9ba6, 0x9ba7, 0xbdf2, 0x9ba8, 0xe4a2, - 0x9ba9, 0x9baa, 0xbae9, 0xe4aa, 0x9bab, 0x9bac, 0xe4ac, 0x9bad, - 0x9bae, 0xb6fd, 0xd6de, 0xe4b2, 0x9baf, 0xe4ad, 0x9bb0, 0x9bb1, - 0x9bb2, 0xe4a1, 0x9bb3, 0xbbee, 0xcddd, 0xc7a2, 0xc5c9, 0x9bb4, - 0x9bb5, 0xc1f7, 0x9bb6, 0xe4a4, 0x9bb7, 0xc7b3, 0xbdac, 0xbdbd, - 0xe4a5, 0x9bb8, 0xd7c7, 0xb2e2, 0x9bb9, 0xe4ab, 0xbcc3, 0xe4af, - 0x9bba, 0xbbeb, 0xe4b0, 0xc5a8, 0xe4b1, 0x9bbb, 0x9bbc, 0x9bbd, - 0x9bbe, 0xd5e3, 0xbfa3, 0x9bbf, 0xe4ba, 0x9bc0, 0xe4b7, 0x9bc1, - 0xe4bb, 0x9bc2, 0x9bc3, 0xe4bd, 0x9bc4, 0x9bc5, 0xc6d6, 0x9bc6, - 0x9bc7, 0xbac6, 0xc0cb, 0x9bc8, 0x9bc9, 0x9bca, 0xb8a1, 0xe4b4, - 0x9bcb, 0x9bcc, 0x9bcd, 0x9bce, 0xd4a1, 0x9bcf, 0x9bd0, 0xbaa3, - 0xbdfe, 0x9bd1, 0x9bd2, 0x9bd3, 0xe4bc, 0x9bd4, 0x9bd5, 0x9bd6, - 0x9bd7, 0x9bd8, 0xcdbf, 0x9bd9, 0x9bda, 0xc4f9, 0x9bdb, 0x9bdc, - 0xcffb, 0xc9e6, 0x9bdd, 0x9bde, 0xd3bf, 0x9bdf, 0xcfd1, 0x9be0, - 0x9be1, 0xe4b3, 0x9be2, 0xe4b8, 0xe4b9, 0xcce9, 0x9be3, 0x9be4, - 0x9be5, 0x9be6, 0x9be7, 0xccce, 0x9be8, 0xc0d4, 0xe4b5, 0xc1b0, - 0xe4b6, 0xced0, 0x9be9, 0xbbc1, 0xb5d3, 0x9bea, 0xc8f3, 0xbda7, - 0xd5c7, 0xc9ac, 0xb8a2, 0xe4ca, 0x9beb, 0x9bec, 0xe4cc, 0xd1c4, - 0x9bed, 0x9bee, 0xd2ba, 0x9bef, 0x9bf0, 0xbaad, 0x9bf1, 0x9bf2, - 0xbad4, 0x9bf3, 0x9bf4, 0x9bf5, 0x9bf6, 0x9bf7, 0x9bf8, 0xe4c3, - 0xb5ed, 0x9bf9, 0x9bfa, 0x9bfb, 0xd7cd, 0xe4c0, 0xcffd, 0xe4bf, - 0x9bfc, 0x9bfd, 0x9bfe, 0xc1dc, 0xccca, 0x9c40, 0x9c41, 0x9c42, - 0x9c43, 0xcae7, 0x9c44, 0x9c45, 0x9c46, 0x9c47, 0xc4d7, 0x9c48, - 0xccd4, 0xe4c8, 0x9c49, 0x9c4a, 0x9c4b, 0xe4c7, 0xe4c1, 0x9c4c, - 0xe4c4, 0xb5ad, 0x9c4d, 0x9c4e, 0xd3d9, 0x9c4f, 0xe4c6, 0x9c50, - 0x9c51, 0x9c52, 0x9c53, 0xd2f9, 0xb4e3, 0x9c54, 0xbbb4, 0x9c55, - 0x9c56, 0xc9ee, 0x9c57, 0xb4be, 0x9c58, 0x9c59, 0x9c5a, 0xbbec, - 0x9c5b, 0xd1cd, 0x9c5c, 0xcced, 0xedb5, 0x9c5d, 0x9c5e, 0x9c5f, - /* 0x6e00 .. 0x6eff */ - 0x9c60, 0x9c61, 0x9c62, 0x9c63, 0x9c64, 0xc7e5, 0x9c65, 0x9c66, - 0x9c67, 0x9c68, 0xd4a8, 0x9c69, 0xe4cb, 0xd7d5, 0xe4c2, 0x9c6a, - 0xbda5, 0xe4c5, 0x9c6b, 0x9c6c, 0xd3e6, 0x9c6d, 0xe4c9, 0xc9f8, - 0x9c6e, 0x9c6f, 0xe4be, 0x9c70, 0x9c71, 0xd3e5, 0x9c72, 0x9c73, - 0xc7fe, 0xb6c9, 0x9c74, 0xd4fc, 0xb2b3, 0xe4d7, 0x9c75, 0x9c76, - 0x9c77, 0xcec2, 0x9c78, 0xe4cd, 0x9c79, 0xcebc, 0x9c7a, 0xb8db, - 0x9c7b, 0x9c7c, 0xe4d6, 0x9c7d, 0xbfca, 0x9c7e, 0x9c80, 0x9c81, - 0xd3ce, 0x9c82, 0xc3ec, 0x9c83, 0x9c84, 0x9c85, 0x9c86, 0x9c87, - 0x9c88, 0x9c89, 0x9c8a, 0xc5c8, 0xe4d8, 0x9c8b, 0x9c8c, 0x9c8d, - 0x9c8e, 0x9c8f, 0x9c90, 0x9c91, 0x9c92, 0xcdc4, 0xe4cf, 0x9c93, - 0x9c94, 0x9c95, 0x9c96, 0xe4d4, 0xe4d5, 0x9c97, 0xbafe, 0x9c98, - 0xcfe6, 0x9c99, 0x9c9a, 0xd5bf, 0x9c9b, 0x9c9c, 0x9c9d, 0xe4d2, - 0x9c9e, 0x9c9f, 0x9ca0, 0x9ca1, 0x9ca2, 0x9ca3, 0x9ca4, 0x9ca5, - 0x9ca6, 0x9ca7, 0x9ca8, 0xe4d0, 0x9ca9, 0x9caa, 0xe4ce, 0x9cab, - 0x9cac, 0x9cad, 0x9cae, 0x9caf, 0x9cb0, 0x9cb1, 0x9cb2, 0x9cb3, - 0x9cb4, 0x9cb5, 0x9cb6, 0x9cb7, 0x9cb8, 0x9cb9, 0xcde5, 0xcaaa, - 0x9cba, 0x9cbb, 0x9cbc, 0xc0a3, 0x9cbd, 0xbda6, 0xe4d3, 0x9cbe, - 0x9cbf, 0xb8c8, 0x9cc0, 0x9cc1, 0x9cc2, 0x9cc3, 0x9cc4, 0xe4e7, - 0xd4b4, 0x9cc5, 0x9cc6, 0x9cc7, 0x9cc8, 0x9cc9, 0x9cca, 0x9ccb, - 0xe4db, 0x9ccc, 0x9ccd, 0x9cce, 0xc1ef, 0x9ccf, 0x9cd0, 0xe4e9, - 0x9cd1, 0x9cd2, 0xd2e7, 0x9cd3, 0x9cd4, 0xe4df, 0x9cd5, 0xe4e0, - 0x9cd6, 0x9cd7, 0xcfaa, 0x9cd8, 0x9cd9, 0x9cda, 0x9cdb, 0xcbdd, - 0x9cdc, 0xe4da, 0xe4d1, 0x9cdd, 0xe4e5, 0x9cde, 0xc8dc, 0xe4e3, - 0x9cdf, 0x9ce0, 0xc4e7, 0xe4e2, 0x9ce1, 0xe4e1, 0x9ce2, 0x9ce3, - 0x9ce4, 0xb3fc, 0xe4e8, 0x9ce5, 0x9ce6, 0x9ce7, 0x9ce8, 0xb5e1, - 0x9ce9, 0x9cea, 0x9ceb, 0xd7cc, 0x9cec, 0x9ced, 0x9cee, 0xe4e6, - 0x9cef, 0xbbac, 0x9cf0, 0xd7d2, 0xcccf, 0xebf8, 0x9cf1, 0xe4e4, - 0x9cf2, 0x9cf3, 0xb9f6, 0x9cf4, 0x9cf5, 0x9cf6, 0xd6cd, 0xe4d9, - 0xe4dc, 0xc2fa, 0xe4de, 0x9cf7, 0xc2cb, 0xc0c4, 0xc2d0, 0x9cf8, - 0xb1f5, 0xccb2, 0x9cf9, 0x9cfa, 0x9cfb, 0x9cfc, 0x9cfd, 0x9cfe, - 0x9d40, 0x9d41, 0x9d42, 0x9d43, 0xb5ce, 0x9d44, 0x9d45, 0x9d46, - 0x9d47, 0xe4ef, 0x9d48, 0x9d49, 0x9d4a, 0x9d4b, 0x9d4c, 0x9d4d, - /* 0x6f00 .. 0x6fff */ - 0x9d4e, 0x9d4f, 0xc6af, 0x9d50, 0x9d51, 0x9d52, 0xc6e1, 0x9d53, - 0x9d54, 0xe4f5, 0x9d55, 0x9d56, 0x9d57, 0x9d58, 0x9d59, 0xc2a9, - 0x9d5a, 0x9d5b, 0x9d5c, 0xc0ec, 0xd1dd, 0xe4ee, 0x9d5d, 0x9d5e, - 0x9d5f, 0x9d60, 0x9d61, 0x9d62, 0x9d63, 0x9d64, 0x9d65, 0x9d66, - 0xc4ae, 0x9d67, 0x9d68, 0x9d69, 0xe4ed, 0x9d6a, 0x9d6b, 0x9d6c, - 0x9d6d, 0xe4f6, 0xe4f4, 0xc2fe, 0x9d6e, 0xe4dd, 0x9d6f, 0xe4f0, - 0x9d70, 0xcafe, 0x9d71, 0xd5c4, 0x9d72, 0x9d73, 0xe4f1, 0x9d74, - 0x9d75, 0x9d76, 0x9d77, 0x9d78, 0x9d79, 0x9d7a, 0xd1fa, 0x9d7b, - 0x9d7c, 0x9d7d, 0x9d7e, 0x9d80, 0x9d81, 0x9d82, 0xe4eb, 0xe4ec, - 0x9d83, 0x9d84, 0x9d85, 0xe4f2, 0x9d86, 0xceab, 0x9d87, 0x9d88, - 0x9d89, 0x9d8a, 0x9d8b, 0x9d8c, 0x9d8d, 0x9d8e, 0x9d8f, 0x9d90, - 0xc5cb, 0x9d91, 0x9d92, 0x9d93, 0xc7b1, 0x9d94, 0xc2ba, 0x9d95, - 0x9d96, 0x9d97, 0xe4ea, 0x9d98, 0x9d99, 0x9d9a, 0xc1ca, 0x9d9b, - 0x9d9c, 0x9d9d, 0x9d9e, 0x9d9f, 0x9da0, 0xccb6, 0xb3b1, 0x9da1, - 0x9da2, 0x9da3, 0xe4fb, 0x9da4, 0xe4f3, 0x9da5, 0x9da6, 0x9da7, - 0xe4fa, 0x9da8, 0xe4fd, 0x9da9, 0xe4fc, 0x9daa, 0x9dab, 0x9dac, - 0x9dad, 0x9dae, 0x9daf, 0x9db0, 0xb3ce, 0x9db1, 0x9db2, 0x9db3, - 0xb3ba, 0xe4f7, 0x9db4, 0x9db5, 0xe4f9, 0xe4f8, 0xc5ec, 0x9db6, - 0x9db7, 0x9db8, 0x9db9, 0x9dba, 0x9dbb, 0x9dbc, 0x9dbd, 0x9dbe, - 0x9dbf, 0x9dc0, 0x9dc1, 0x9dc2, 0xc0bd, 0x9dc3, 0x9dc4, 0x9dc5, - 0x9dc6, 0xd4e8, 0x9dc7, 0x9dc8, 0x9dc9, 0x9dca, 0x9dcb, 0xe5a2, - 0x9dcc, 0x9dcd, 0x9dce, 0x9dcf, 0x9dd0, 0x9dd1, 0x9dd2, 0x9dd3, - 0x9dd4, 0x9dd5, 0x9dd6, 0xb0c4, 0x9dd7, 0x9dd8, 0xe5a4, 0x9dd9, - 0x9dda, 0xe5a3, 0x9ddb, 0x9ddc, 0x9ddd, 0x9dde, 0x9ddf, 0x9de0, - 0xbca4, 0x9de1, 0xe5a5, 0x9de2, 0x9de3, 0x9de4, 0x9de5, 0x9de6, - 0x9de7, 0xe5a1, 0x9de8, 0x9de9, 0x9dea, 0x9deb, 0x9dec, 0x9ded, - 0x9dee, 0xe4fe, 0xb1f4, 0x9def, 0x9df0, 0x9df1, 0x9df2, 0x9df3, - 0x9df4, 0x9df5, 0x9df6, 0x9df7, 0x9df8, 0x9df9, 0xe5a8, 0x9dfa, - 0xe5a9, 0xe5a6, 0x9dfb, 0x9dfc, 0x9dfd, 0x9dfe, 0x9e40, 0x9e41, - 0x9e42, 0x9e43, 0x9e44, 0x9e45, 0x9e46, 0x9e47, 0xe5a7, 0xe5aa, - 0x9e48, 0x9e49, 0x9e4a, 0x9e4b, 0x9e4c, 0x9e4d, 0x9e4e, 0x9e4f, - 0x9e50, 0x9e51, 0x9e52, 0x9e53, 0x9e54, 0x9e55, 0x9e56, 0x9e57, - /* 0x7000 .. 0x70ff */ - 0x9e58, 0x9e59, 0x9e5a, 0x9e5b, 0x9e5c, 0x9e5d, 0x9e5e, 0x9e5f, - 0x9e60, 0x9e61, 0x9e62, 0x9e63, 0x9e64, 0x9e65, 0x9e66, 0x9e67, - 0x9e68, 0xc6d9, 0x9e69, 0x9e6a, 0x9e6b, 0x9e6c, 0x9e6d, 0x9e6e, - 0x9e6f, 0x9e70, 0xe5ab, 0xe5ad, 0x9e71, 0x9e72, 0x9e73, 0x9e74, - 0x9e75, 0x9e76, 0x9e77, 0xe5ac, 0x9e78, 0x9e79, 0x9e7a, 0x9e7b, - 0x9e7c, 0x9e7d, 0x9e7e, 0x9e80, 0x9e81, 0x9e82, 0x9e83, 0x9e84, - 0x9e85, 0x9e86, 0x9e87, 0x9e88, 0x9e89, 0xe5af, 0x9e8a, 0x9e8b, - 0x9e8c, 0xe5ae, 0x9e8d, 0x9e8e, 0x9e8f, 0x9e90, 0x9e91, 0x9e92, - 0x9e93, 0x9e94, 0x9e95, 0x9e96, 0x9e97, 0x9e98, 0x9e99, 0x9e9a, - 0x9e9b, 0x9e9c, 0x9e9d, 0x9e9e, 0xb9e0, 0x9e9f, 0x9ea0, 0xe5b0, - 0x9ea1, 0x9ea2, 0x9ea3, 0x9ea4, 0x9ea5, 0x9ea6, 0x9ea7, 0x9ea8, - 0x9ea9, 0x9eaa, 0x9eab, 0x9eac, 0x9ead, 0x9eae, 0xe5b1, 0x9eaf, - 0x9eb0, 0x9eb1, 0x9eb2, 0x9eb3, 0x9eb4, 0x9eb5, 0x9eb6, 0x9eb7, - 0x9eb8, 0x9eb9, 0x9eba, 0xbbf0, 0xece1, 0xc3f0, 0x9ebb, 0xb5c6, - 0xbbd2, 0x9ebc, 0x9ebd, 0x9ebe, 0x9ebf, 0xc1e9, 0xd4ee, 0x9ec0, - 0xbec4, 0x9ec1, 0x9ec2, 0x9ec3, 0xd7c6, 0x9ec4, 0xd4d6, 0xb2d3, - 0xecbe, 0x9ec5, 0x9ec6, 0x9ec7, 0x9ec8, 0xeac1, 0x9ec9, 0x9eca, - 0x9ecb, 0xc2af, 0xb4b6, 0x9ecc, 0x9ecd, 0x9ece, 0xd1d7, 0x9ecf, - 0x9ed0, 0x9ed1, 0xb3b4, 0x9ed2, 0xc8b2, 0xbfbb, 0xecc0, 0x9ed3, - 0x9ed4, 0xd6cb, 0x9ed5, 0x9ed6, 0xecbf, 0xecc1, 0x9ed7, 0x9ed8, - 0x9ed9, 0x9eda, 0x9edb, 0x9edc, 0x9edd, 0x9ede, 0x9edf, 0x9ee0, - 0x9ee1, 0x9ee2, 0x9ee3, 0xecc5, 0xbee6, 0xccbf, 0xc5da, 0xbebc, - 0x9ee4, 0xecc6, 0x9ee5, 0xb1fe, 0x9ee6, 0x9ee7, 0x9ee8, 0xecc4, - 0xd5a8, 0xb5e3, 0x9ee9, 0xecc2, 0xc1b6, 0xb3e3, 0x9eea, 0x9eeb, - 0xecc3, 0xcbb8, 0xc0c3, 0xccfe, 0x9eec, 0x9eed, 0x9eee, 0x9eef, - 0xc1d2, 0x9ef0, 0xecc8, 0x9ef1, 0x9ef2, 0x9ef3, 0x9ef4, 0x9ef5, - 0x9ef6, 0x9ef7, 0x9ef8, 0x9ef9, 0x9efa, 0x9efb, 0x9efc, 0x9efd, - 0xbae6, 0xc0d3, 0x9efe, 0xd6f2, 0x9f40, 0x9f41, 0x9f42, 0xd1cc, - 0x9f43, 0x9f44, 0x9f45, 0x9f46, 0xbfbe, 0x9f47, 0xb7b3, 0xc9d5, - 0xecc7, 0xbbe2, 0x9f48, 0xcccc, 0xbdfd, 0xc8c8, 0x9f49, 0xcfa9, - 0x9f4a, 0x9f4b, 0x9f4c, 0x9f4d, 0x9f4e, 0x9f4f, 0x9f50, 0xcde9, - 0x9f51, 0xc5eb, 0x9f52, 0x9f53, 0x9f54, 0xb7e9, 0x9f55, 0x9f56, - /* 0x7100 .. 0x71ff */ - 0x9f57, 0x9f58, 0x9f59, 0x9f5a, 0x9f5b, 0x9f5c, 0x9f5d, 0x9f5e, - 0x9f5f, 0xd1c9, 0xbab8, 0x9f60, 0x9f61, 0x9f62, 0x9f63, 0x9f64, - 0xecc9, 0x9f65, 0x9f66, 0xecca, 0x9f67, 0xbbc0, 0xeccb, 0x9f68, - 0xece2, 0xb1ba, 0xb7d9, 0x9f69, 0x9f6a, 0x9f6b, 0x9f6c, 0x9f6d, - 0x9f6e, 0x9f6f, 0x9f70, 0x9f71, 0x9f72, 0x9f73, 0xbdb9, 0x9f74, - 0x9f75, 0x9f76, 0x9f77, 0x9f78, 0x9f79, 0x9f7a, 0x9f7b, 0xeccc, - 0xd1e6, 0xeccd, 0x9f7c, 0x9f7d, 0x9f7e, 0x9f80, 0xc8bb, 0x9f81, - 0x9f82, 0x9f83, 0x9f84, 0x9f85, 0x9f86, 0x9f87, 0x9f88, 0x9f89, - 0x9f8a, 0x9f8b, 0x9f8c, 0x9f8d, 0x9f8e, 0xecd1, 0x9f8f, 0x9f90, - 0x9f91, 0x9f92, 0xecd3, 0x9f93, 0xbbcd, 0x9f94, 0xbce5, 0x9f95, - 0x9f96, 0x9f97, 0x9f98, 0x9f99, 0x9f9a, 0x9f9b, 0x9f9c, 0x9f9d, - 0x9f9e, 0x9f9f, 0x9fa0, 0x9fa1, 0xeccf, 0x9fa2, 0xc9b7, 0x9fa3, - 0x9fa4, 0x9fa5, 0x9fa6, 0x9fa7, 0xc3ba, 0x9fa8, 0xece3, 0xd5d5, - 0xecd0, 0x9fa9, 0x9faa, 0x9fab, 0x9fac, 0x9fad, 0xd6f3, 0x9fae, - 0x9faf, 0x9fb0, 0xecd2, 0xecce, 0x9fb1, 0x9fb2, 0x9fb3, 0x9fb4, - 0xecd4, 0x9fb5, 0xecd5, 0x9fb6, 0x9fb7, 0xc9bf, 0x9fb8, 0x9fb9, - 0x9fba, 0x9fbb, 0x9fbc, 0x9fbd, 0xcfa8, 0x9fbe, 0x9fbf, 0x9fc0, - 0x9fc1, 0x9fc2, 0xd0dc, 0x9fc3, 0x9fc4, 0x9fc5, 0x9fc6, 0xd1ac, - 0x9fc7, 0x9fc8, 0x9fc9, 0x9fca, 0xc8db, 0x9fcb, 0x9fcc, 0x9fcd, - 0xecd6, 0xcef5, 0x9fce, 0x9fcf, 0x9fd0, 0x9fd1, 0x9fd2, 0xcaec, - 0xecda, 0x9fd3, 0x9fd4, 0x9fd5, 0x9fd6, 0x9fd7, 0x9fd8, 0x9fd9, - 0xecd9, 0x9fda, 0x9fdb, 0x9fdc, 0xb0be, 0x9fdd, 0x9fde, 0x9fdf, - 0x9fe0, 0x9fe1, 0x9fe2, 0xecd7, 0x9fe3, 0xecd8, 0x9fe4, 0x9fe5, - 0x9fe6, 0xece4, 0x9fe7, 0x9fe8, 0x9fe9, 0x9fea, 0x9feb, 0x9fec, - 0x9fed, 0x9fee, 0x9fef, 0xc8bc, 0x9ff0, 0x9ff1, 0x9ff2, 0x9ff3, - 0x9ff4, 0x9ff5, 0x9ff6, 0x9ff7, 0x9ff8, 0x9ff9, 0xc1c7, 0x9ffa, - 0x9ffb, 0x9ffc, 0x9ffd, 0x9ffe, 0xecdc, 0xd1e0, 0xa040, 0xa041, - 0xa042, 0xa043, 0xa044, 0xa045, 0xa046, 0xa047, 0xa048, 0xa049, - 0xecdb, 0xa04a, 0xa04b, 0xa04c, 0xa04d, 0xd4ef, 0xa04e, 0xecdd, - 0xa04f, 0xa050, 0xa051, 0xa052, 0xa053, 0xa054, 0xdbc6, 0xa055, - 0xa056, 0xa057, 0xa058, 0xa059, 0xa05a, 0xa05b, 0xa05c, 0xa05d, - 0xa05e, 0xecde, 0xa05f, 0xa060, 0xa061, 0xa062, 0xa063, 0xa064, - /* 0x7200 .. 0x72ff */ - 0xa065, 0xa066, 0xa067, 0xa068, 0xa069, 0xa06a, 0xb1ac, 0xa06b, - 0xa06c, 0xa06d, 0xa06e, 0xa06f, 0xa070, 0xa071, 0xa072, 0xa073, - 0xa074, 0xa075, 0xa076, 0xa077, 0xa078, 0xa079, 0xa07a, 0xa07b, - 0xa07c, 0xa07d, 0xa07e, 0xa080, 0xa081, 0xecdf, 0xa082, 0xa083, - 0xa084, 0xa085, 0xa086, 0xa087, 0xa088, 0xa089, 0xa08a, 0xa08b, - 0xece0, 0xa08c, 0xd7a6, 0xa08d, 0xc5c0, 0xa08e, 0xa08f, 0xa090, - 0xebbc, 0xb0ae, 0xa091, 0xa092, 0xa093, 0xbef4, 0xb8b8, 0xd2af, - 0xb0d6, 0xb5f9, 0xa094, 0xd8b3, 0xa095, 0xcbac, 0xa096, 0xe3dd, - 0xa097, 0xa098, 0xa099, 0xa09a, 0xa09b, 0xa09c, 0xa09d, 0xc6ac, - 0xb0e6, 0xa09e, 0xa09f, 0xa0a0, 0xc5c6, 0xebb9, 0xa0a1, 0xa0a2, - 0xa0a3, 0xa0a4, 0xebba, 0xa0a5, 0xa0a6, 0xa0a7, 0xebbb, 0xa0a8, - 0xa0a9, 0xd1c0, 0xa0aa, 0xc5a3, 0xa0ab, 0xeaf2, 0xa0ac, 0xc4b2, - 0xa0ad, 0xc4b5, 0xc0ce, 0xa0ae, 0xa0af, 0xa0b0, 0xeaf3, 0xc4c1, - 0xa0b1, 0xceef, 0xa0b2, 0xa0b3, 0xa0b4, 0xa0b5, 0xeaf0, 0xeaf4, - 0xa0b6, 0xa0b7, 0xc9fc, 0xa0b8, 0xa0b9, 0xc7a3, 0xa0ba, 0xa0bb, - 0xa0bc, 0xccd8, 0xcefe, 0xa0bd, 0xa0be, 0xa0bf, 0xeaf5, 0xeaf6, - 0xcfac, 0xc0e7, 0xa0c0, 0xa0c1, 0xeaf7, 0xa0c2, 0xa0c3, 0xa0c4, - 0xa0c5, 0xa0c6, 0xb6bf, 0xeaf8, 0xa0c7, 0xeaf9, 0xa0c8, 0xeafa, - 0xa0c9, 0xa0ca, 0xeafb, 0xa0cb, 0xa0cc, 0xa0cd, 0xa0ce, 0xa0cf, - 0xa0d0, 0xa0d1, 0xa0d2, 0xa0d3, 0xa0d4, 0xa0d5, 0xa0d6, 0xeaf1, - 0xa0d7, 0xa0d8, 0xa0d9, 0xa0da, 0xa0db, 0xa0dc, 0xa0dd, 0xa0de, - 0xa0df, 0xa0e0, 0xa0e1, 0xa0e2, 0xc8ae, 0xe1eb, 0xa0e3, 0xb7b8, - 0xe1ec, 0xa0e4, 0xa0e5, 0xa0e6, 0xe1ed, 0xa0e7, 0xd7b4, 0xe1ee, - 0xe1ef, 0xd3cc, 0xa0e8, 0xa0e9, 0xa0ea, 0xa0eb, 0xa0ec, 0xa0ed, - 0xa0ee, 0xe1f1, 0xbff1, 0xe1f0, 0xb5d2, 0xa0ef, 0xa0f0, 0xa0f1, - 0xb1b7, 0xa0f2, 0xa0f3, 0xa0f4, 0xa0f5, 0xe1f3, 0xe1f2, 0xa0f6, - 0xbafc, 0xa0f7, 0xe1f4, 0xa0f8, 0xa0f9, 0xa0fa, 0xa0fb, 0xb9b7, - 0xa0fc, 0xbed1, 0xa0fd, 0xa0fe, 0xaa40, 0xaa41, 0xc4fc, 0xaa42, - 0xbadd, 0xbdc6, 0xaa43, 0xaa44, 0xaa45, 0xaa46, 0xaa47, 0xaa48, - 0xe1f5, 0xe1f7, 0xaa49, 0xaa4a, 0xb6c0, 0xcfc1, 0xcaa8, 0xe1f6, - 0xd5f8, 0xd3fc, 0xe1f8, 0xe1fc, 0xe1f9, 0xaa4b, 0xaa4c, 0xe1fa, - 0xc0ea, 0xaa4d, 0xe1fe, 0xe2a1, 0xc0c7, 0xaa4e, 0xaa4f, 0xaa50, - /* 0x7300 .. 0x73ff */ - 0xaa51, 0xe1fb, 0xaa52, 0xe1fd, 0xaa53, 0xaa54, 0xaa55, 0xaa56, - 0xaa57, 0xaa58, 0xe2a5, 0xaa59, 0xaa5a, 0xaa5b, 0xc1d4, 0xaa5c, - 0xaa5d, 0xaa5e, 0xaa5f, 0xe2a3, 0xaa60, 0xe2a8, 0xb2fe, 0xe2a2, - 0xaa61, 0xaa62, 0xaa63, 0xc3cd, 0xb2c2, 0xe2a7, 0xe2a6, 0xaa64, - 0xaa65, 0xe2a4, 0xe2a9, 0xaa66, 0xaa67, 0xe2ab, 0xaa68, 0xaa69, - 0xaa6a, 0xd0c9, 0xd6ed, 0xc3a8, 0xe2ac, 0xaa6b, 0xcfd7, 0xaa6c, - 0xaa6d, 0xe2ae, 0xaa6e, 0xaa6f, 0xbaef, 0xaa70, 0xaa71, 0xe9e0, - 0xe2ad, 0xe2aa, 0xaa72, 0xaa73, 0xaa74, 0xaa75, 0xbbab, 0xd4b3, - 0xaa76, 0xaa77, 0xaa78, 0xaa79, 0xaa7a, 0xaa7b, 0xaa7c, 0xaa7d, - 0xaa7e, 0xaa80, 0xaa81, 0xaa82, 0xaa83, 0xe2b0, 0xaa84, 0xaa85, - 0xe2af, 0xaa86, 0xe9e1, 0xaa87, 0xaa88, 0xaa89, 0xaa8a, 0xe2b1, - 0xaa8b, 0xaa8c, 0xaa8d, 0xaa8e, 0xaa8f, 0xaa90, 0xaa91, 0xaa92, - 0xe2b2, 0xaa93, 0xaa94, 0xaa95, 0xaa96, 0xaa97, 0xaa98, 0xaa99, - 0xaa9a, 0xaa9b, 0xaa9c, 0xaa9d, 0xe2b3, 0xcca1, 0xaa9e, 0xe2b4, - 0xaa9f, 0xaaa0, 0xab40, 0xab41, 0xab42, 0xab43, 0xab44, 0xab45, - 0xab46, 0xab47, 0xab48, 0xab49, 0xab4a, 0xab4b, 0xe2b5, 0xab4c, - 0xab4d, 0xab4e, 0xab4f, 0xab50, 0xd0fe, 0xab51, 0xab52, 0xc2ca, - 0xab53, 0xd3f1, 0xab54, 0xcdf5, 0xab55, 0xab56, 0xe7e0, 0xab57, - 0xab58, 0xe7e1, 0xab59, 0xab5a, 0xab5b, 0xab5c, 0xbec1, 0xab5d, - 0xab5e, 0xab5f, 0xab60, 0xc2ea, 0xab61, 0xab62, 0xab63, 0xe7e4, - 0xab64, 0xab65, 0xe7e3, 0xab66, 0xab67, 0xab68, 0xab69, 0xab6a, - 0xab6b, 0xcde6, 0xab6c, 0xc3b5, 0xab6d, 0xab6e, 0xe7e2, 0xbbb7, - 0xcfd6, 0xab6f, 0xc1e1, 0xe7e9, 0xab70, 0xab71, 0xab72, 0xe7e8, - 0xab73, 0xab74, 0xe7f4, 0xb2a3, 0xab75, 0xab76, 0xab77, 0xab78, - 0xe7ea, 0xab79, 0xe7e6, 0xab7a, 0xab7b, 0xab7c, 0xab7d, 0xab7e, - 0xe7ec, 0xe7eb, 0xc9ba, 0xab80, 0xab81, 0xd5e4, 0xab82, 0xe7e5, - 0xb7a9, 0xe7e7, 0xab83, 0xab84, 0xab85, 0xab86, 0xab87, 0xab88, - 0xab89, 0xe7ee, 0xab8a, 0xab8b, 0xab8c, 0xab8d, 0xe7f3, 0xab8e, - 0xd6e9, 0xab8f, 0xab90, 0xab91, 0xab92, 0xe7ed, 0xab93, 0xe7f2, - 0xab94, 0xe7f1, 0xab95, 0xab96, 0xab97, 0xb0e0, 0xab98, 0xab99, - 0xab9a, 0xab9b, 0xe7f5, 0xab9c, 0xab9d, 0xab9e, 0xab9f, 0xaba0, - 0xac40, 0xac41, 0xac42, 0xac43, 0xac44, 0xac45, 0xac46, 0xac47, - /* 0x7400 .. 0x74ff */ - 0xac48, 0xac49, 0xac4a, 0xc7f2, 0xac4b, 0xc0c5, 0xc0ed, 0xac4c, - 0xac4d, 0xc1f0, 0xe7f0, 0xac4e, 0xac4f, 0xac50, 0xac51, 0xe7f6, - 0xcbf6, 0xac52, 0xac53, 0xac54, 0xac55, 0xac56, 0xac57, 0xac58, - 0xac59, 0xac5a, 0xe8a2, 0xe8a1, 0xac5b, 0xac5c, 0xac5d, 0xac5e, - 0xac5f, 0xac60, 0xd7c1, 0xac61, 0xac62, 0xe7fa, 0xe7f9, 0xac63, - 0xe7fb, 0xac64, 0xe7f7, 0xac65, 0xe7fe, 0xac66, 0xe7fd, 0xac67, - 0xe7fc, 0xac68, 0xac69, 0xc1d5, 0xc7d9, 0xc5fd, 0xc5c3, 0xac6a, - 0xac6b, 0xac6c, 0xac6d, 0xac6e, 0xc7ed, 0xac6f, 0xac70, 0xac71, - 0xac72, 0xe8a3, 0xac73, 0xac74, 0xac75, 0xac76, 0xac77, 0xac78, - 0xac79, 0xac7a, 0xac7b, 0xac7c, 0xac7d, 0xac7e, 0xac80, 0xac81, - 0xac82, 0xac83, 0xac84, 0xac85, 0xac86, 0xe8a6, 0xac87, 0xe8a5, - 0xac88, 0xe8a7, 0xbaf7, 0xe7f8, 0xe8a4, 0xac89, 0xc8f0, 0xc9aa, - 0xac8a, 0xac8b, 0xac8c, 0xac8d, 0xac8e, 0xac8f, 0xac90, 0xac91, - 0xac92, 0xac93, 0xac94, 0xac95, 0xac96, 0xe8a9, 0xac97, 0xac98, - 0xb9e5, 0xac99, 0xac9a, 0xac9b, 0xac9c, 0xac9d, 0xd1fe, 0xe8a8, - 0xac9e, 0xac9f, 0xaca0, 0xad40, 0xad41, 0xad42, 0xe8aa, 0xad43, - 0xe8ad, 0xe8ae, 0xad44, 0xc1a7, 0xad45, 0xad46, 0xad47, 0xe8af, - 0xad48, 0xad49, 0xad4a, 0xe8b0, 0xad4b, 0xad4c, 0xe8ac, 0xad4d, - 0xe8b4, 0xad4e, 0xad4f, 0xad50, 0xad51, 0xad52, 0xad53, 0xad54, - 0xad55, 0xad56, 0xad57, 0xad58, 0xe8ab, 0xad59, 0xe8b1, 0xad5a, - 0xad5b, 0xad5c, 0xad5d, 0xad5e, 0xad5f, 0xad60, 0xad61, 0xe8b5, - 0xe8b2, 0xe8b3, 0xad62, 0xad63, 0xad64, 0xad65, 0xad66, 0xad67, - 0xad68, 0xad69, 0xad6a, 0xad6b, 0xad6c, 0xad6d, 0xad6e, 0xad6f, - 0xad70, 0xad71, 0xe8b7, 0xad72, 0xad73, 0xad74, 0xad75, 0xad76, - 0xad77, 0xad78, 0xad79, 0xad7a, 0xad7b, 0xad7c, 0xad7d, 0xad7e, - 0xad80, 0xad81, 0xad82, 0xad83, 0xad84, 0xad85, 0xad86, 0xad87, - 0xad88, 0xad89, 0xe8b6, 0xad8a, 0xad8b, 0xad8c, 0xad8d, 0xad8e, - 0xad8f, 0xad90, 0xad91, 0xad92, 0xb9cf, 0xad93, 0xf0ac, 0xad94, - 0xf0ad, 0xad95, 0xc6b0, 0xb0ea, 0xc8bf, 0xad96, 0xcddf, 0xad97, - 0xad98, 0xad99, 0xad9a, 0xad9b, 0xad9c, 0xad9d, 0xcecd, 0xeab1, - 0xad9e, 0xad9f, 0xada0, 0xae40, 0xeab2, 0xae41, 0xc6bf, 0xb4c9, - 0xae42, 0xae43, 0xae44, 0xae45, 0xae46, 0xae47, 0xae48, 0xeab3, - /* 0x7500 .. 0x75ff */ - 0xae49, 0xae4a, 0xae4b, 0xae4c, 0xd5e7, 0xae4d, 0xae4e, 0xae4f, - 0xae50, 0xae51, 0xae52, 0xae53, 0xae54, 0xddf9, 0xae55, 0xeab4, - 0xae56, 0xeab5, 0xae57, 0xeab6, 0xae58, 0xae59, 0xae5a, 0xae5b, - 0xb8ca, 0xdfb0, 0xc9f5, 0xae5c, 0xccf0, 0xae5d, 0xae5e, 0xc9fa, - 0xae5f, 0xae60, 0xae61, 0xae62, 0xae63, 0xc9fb, 0xae64, 0xae65, - 0xd3c3, 0xcba6, 0xae66, 0xb8a6, 0xf0ae, 0xb1c2, 0xae67, 0xe5b8, - 0xccef, 0xd3c9, 0xbcd7, 0xc9ea, 0xae68, 0xb5e7, 0xae69, 0xc4d0, - 0xb5e9, 0xae6a, 0xeeae, 0xbbad, 0xae6b, 0xae6c, 0xe7de, 0xae6d, - 0xeeaf, 0xae6e, 0xae6f, 0xae70, 0xae71, 0xb3a9, 0xae72, 0xae73, - 0xeeb2, 0xae74, 0xae75, 0xeeb1, 0xbde7, 0xae76, 0xeeb0, 0xceb7, - 0xae77, 0xae78, 0xae79, 0xae7a, 0xc5cf, 0xae7b, 0xae7c, 0xae7d, - 0xae7e, 0xc1f4, 0xdbce, 0xeeb3, 0xd0f3, 0xae80, 0xae81, 0xae82, - 0xae83, 0xae84, 0xae85, 0xae86, 0xae87, 0xc2d4, 0xc6e8, 0xae88, - 0xae89, 0xae8a, 0xb7ac, 0xae8b, 0xae8c, 0xae8d, 0xae8e, 0xae8f, - 0xae90, 0xae91, 0xeeb4, 0xae92, 0xb3eb, 0xae93, 0xae94, 0xae95, - 0xbbfb, 0xeeb5, 0xae96, 0xae97, 0xae98, 0xae99, 0xae9a, 0xe7dc, - 0xae9b, 0xae9c, 0xae9d, 0xeeb6, 0xae9e, 0xae9f, 0xbdae, 0xaea0, - 0xaf40, 0xaf41, 0xaf42, 0xf1e2, 0xaf43, 0xaf44, 0xaf45, 0xcae8, - 0xaf46, 0xd2c9, 0xf0da, 0xaf47, 0xf0db, 0xaf48, 0xf0dc, 0xc1c6, - 0xaf49, 0xb8ed, 0xbece, 0xaf4a, 0xaf4b, 0xf0de, 0xaf4c, 0xc5b1, - 0xf0dd, 0xd1f1, 0xaf4d, 0xf0e0, 0xb0cc, 0xbdea, 0xaf4e, 0xaf4f, - 0xaf50, 0xaf51, 0xaf52, 0xd2df, 0xf0df, 0xaf53, 0xb4af, 0xb7e8, - 0xf0e6, 0xf0e5, 0xc6a3, 0xf0e1, 0xf0e2, 0xb4c3, 0xaf54, 0xaf55, - 0xf0e3, 0xd5ee, 0xaf56, 0xaf57, 0xccdb, 0xbed2, 0xbcb2, 0xaf58, - 0xaf59, 0xaf5a, 0xf0e8, 0xf0e7, 0xf0e4, 0xb2a1, 0xaf5b, 0xd6a2, - 0xd3b8, 0xbeb7, 0xc8ac, 0xaf5c, 0xaf5d, 0xf0ea, 0xaf5e, 0xaf5f, - 0xaf60, 0xaf61, 0xd1f7, 0xaf62, 0xd6cc, 0xbadb, 0xf0e9, 0xaf63, - 0xb6bb, 0xaf64, 0xaf65, 0xcdb4, 0xaf66, 0xaf67, 0xc6a6, 0xaf68, - 0xaf69, 0xaf6a, 0xc1a1, 0xf0eb, 0xf0ee, 0xaf6b, 0xf0ed, 0xf0f0, - 0xf0ec, 0xaf6c, 0xbbbe, 0xf0ef, 0xaf6d, 0xaf6e, 0xaf6f, 0xaf70, - 0xccb5, 0xf0f2, 0xaf71, 0xaf72, 0xb3d5, 0xaf73, 0xaf74, 0xaf75, - 0xaf76, 0xb1d4, 0xaf77, 0xaf78, 0xf0f3, 0xaf79, 0xaf7a, 0xf0f4, - /* 0x7600 .. 0x76ff */ - 0xf0f6, 0xb4e1, 0xaf7b, 0xf0f1, 0xaf7c, 0xf0f7, 0xaf7d, 0xaf7e, - 0xaf80, 0xaf81, 0xf0fa, 0xaf82, 0xf0f8, 0xaf83, 0xaf84, 0xaf85, - 0xf0f5, 0xaf86, 0xaf87, 0xaf88, 0xaf89, 0xf0fd, 0xaf8a, 0xf0f9, - 0xf0fc, 0xf0fe, 0xaf8b, 0xf1a1, 0xaf8c, 0xaf8d, 0xaf8e, 0xcec1, - 0xf1a4, 0xaf8f, 0xf1a3, 0xaf90, 0xc1f6, 0xf0fb, 0xcadd, 0xaf91, - 0xaf92, 0xb4f1, 0xb1f1, 0xccb1, 0xaf93, 0xf1a6, 0xaf94, 0xaf95, - 0xf1a7, 0xaf96, 0xaf97, 0xf1ac, 0xd5ce, 0xf1a9, 0xaf98, 0xaf99, - 0xc8b3, 0xaf9a, 0xaf9b, 0xaf9c, 0xf1a2, 0xaf9d, 0xf1ab, 0xf1a8, - 0xf1a5, 0xaf9e, 0xaf9f, 0xf1aa, 0xafa0, 0xb040, 0xb041, 0xb042, - 0xb043, 0xb044, 0xb045, 0xb046, 0xb0a9, 0xf1ad, 0xb047, 0xb048, - 0xb049, 0xb04a, 0xb04b, 0xb04c, 0xf1af, 0xb04d, 0xf1b1, 0xb04e, - 0xb04f, 0xb050, 0xb051, 0xb052, 0xf1b0, 0xb053, 0xf1ae, 0xb054, - 0xb055, 0xb056, 0xb057, 0xd1a2, 0xb058, 0xb059, 0xb05a, 0xb05b, - 0xb05c, 0xb05d, 0xb05e, 0xf1b2, 0xb05f, 0xb060, 0xb061, 0xf1b3, - 0xb062, 0xb063, 0xb064, 0xb065, 0xb066, 0xb067, 0xb068, 0xb069, - 0xb9ef, 0xb06a, 0xb06b, 0xb5c7, 0xb06c, 0xb0d7, 0xb0d9, 0xb06d, - 0xb06e, 0xb06f, 0xd4ed, 0xb070, 0xb5c4, 0xb071, 0xbdd4, 0xbbca, - 0xf0a7, 0xb072, 0xb073, 0xb8de, 0xb074, 0xb075, 0xf0a8, 0xb076, - 0xb077, 0xb0a8, 0xb078, 0xf0a9, 0xb079, 0xb07a, 0xcdee, 0xb07b, - 0xb07c, 0xf0aa, 0xb07d, 0xb07e, 0xb080, 0xb081, 0xb082, 0xb083, - 0xb084, 0xb085, 0xb086, 0xb087, 0xf0ab, 0xb088, 0xb089, 0xb08a, - 0xb08b, 0xb08c, 0xb08d, 0xb08e, 0xb08f, 0xb090, 0xc6a4, 0xb091, - 0xb092, 0xd6e5, 0xf1e4, 0xb093, 0xf1e5, 0xb094, 0xb095, 0xb096, - 0xb097, 0xb098, 0xb099, 0xb09a, 0xb09b, 0xb09c, 0xb09d, 0xc3f3, - 0xb09e, 0xb09f, 0xd3db, 0xb0a0, 0xb140, 0xd6d1, 0xc5e8, 0xb141, - 0xd3af, 0xb142, 0xd2e6, 0xb143, 0xb144, 0xeec1, 0xb0bb, 0xd5b5, - 0xd1ce, 0xbce0, 0xbad0, 0xb145, 0xbff8, 0xb146, 0xb8c7, 0xb5c1, - 0xc5cc, 0xb147, 0xb148, 0xcaa2, 0xb149, 0xb14a, 0xb14b, 0xc3cb, - 0xb14c, 0xb14d, 0xb14e, 0xb14f, 0xb150, 0xeec2, 0xb151, 0xb152, - 0xb153, 0xb154, 0xb155, 0xb156, 0xb157, 0xb158, 0xc4bf, 0xb6a2, - 0xb159, 0xedec, 0xc3a4, 0xb15a, 0xd6b1, 0xb15b, 0xb15c, 0xb15d, - 0xcfe0, 0xedef, 0xb15e, 0xb15f, 0xc5ce, 0xb160, 0xb6dc, 0xb161, - /* 0x7700 .. 0x77ff */ - 0xb162, 0xcaa1, 0xb163, 0xb164, 0xeded, 0xb165, 0xb166, 0xedf0, - 0xedf1, 0xc3bc, 0xb167, 0xbfb4, 0xb168, 0xedee, 0xb169, 0xb16a, - 0xb16b, 0xb16c, 0xb16d, 0xb16e, 0xb16f, 0xb170, 0xb171, 0xb172, - 0xb173, 0xedf4, 0xedf2, 0xb174, 0xb175, 0xb176, 0xb177, 0xd5e6, - 0xc3df, 0xb178, 0xedf3, 0xb179, 0xb17a, 0xb17b, 0xedf6, 0xb17c, - 0xd5a3, 0xd1a3, 0xb17d, 0xb17e, 0xb180, 0xedf5, 0xb181, 0xc3d0, - 0xb182, 0xb183, 0xb184, 0xb185, 0xb186, 0xedf7, 0xbff4, 0xbeec, - 0xedf8, 0xb187, 0xccf7, 0xb188, 0xd1db, 0xb189, 0xb18a, 0xb18b, - 0xd7c5, 0xd5f6, 0xb18c, 0xedfc, 0xb18d, 0xb18e, 0xb18f, 0xedfb, - 0xb190, 0xb191, 0xb192, 0xb193, 0xb194, 0xb195, 0xb196, 0xb197, - 0xedf9, 0xedfa, 0xb198, 0xb199, 0xb19a, 0xb19b, 0xb19c, 0xb19d, - 0xb19e, 0xb19f, 0xedfd, 0xbea6, 0xb1a0, 0xb240, 0xb241, 0xb242, - 0xb243, 0xcbaf, 0xeea1, 0xb6bd, 0xb244, 0xeea2, 0xc4c0, 0xb245, - 0xedfe, 0xb246, 0xb247, 0xbdde, 0xb2c7, 0xb248, 0xb249, 0xb24a, - 0xb24b, 0xb24c, 0xb24d, 0xb24e, 0xb24f, 0xb250, 0xb251, 0xb252, - 0xb253, 0xb6c3, 0xb254, 0xb255, 0xb256, 0xeea5, 0xd8ba, 0xeea3, - 0xeea6, 0xb257, 0xb258, 0xb259, 0xc3e9, 0xb3f2, 0xb25a, 0xb25b, - 0xb25c, 0xb25d, 0xb25e, 0xb25f, 0xeea7, 0xeea4, 0xcfb9, 0xb260, - 0xb261, 0xeea8, 0xc2f7, 0xb262, 0xb263, 0xb264, 0xb265, 0xb266, - 0xb267, 0xb268, 0xb269, 0xb26a, 0xb26b, 0xb26c, 0xb26d, 0xeea9, - 0xeeaa, 0xb26e, 0xdeab, 0xb26f, 0xb270, 0xc6b3, 0xb271, 0xc7c6, - 0xb272, 0xd6f5, 0xb5c9, 0xb273, 0xcbb2, 0xb274, 0xb275, 0xb276, - 0xeeab, 0xb277, 0xb278, 0xcdab, 0xb279, 0xeeac, 0xb27a, 0xb27b, - 0xb27c, 0xb27d, 0xb27e, 0xd5b0, 0xb280, 0xeead, 0xb281, 0xf6c4, - 0xb282, 0xb283, 0xb284, 0xb285, 0xb286, 0xb287, 0xb288, 0xb289, - 0xb28a, 0xb28b, 0xb28c, 0xb28d, 0xb28e, 0xdbc7, 0xb28f, 0xb290, - 0xb291, 0xb292, 0xb293, 0xb294, 0xb295, 0xb296, 0xb297, 0xb4a3, - 0xb298, 0xb299, 0xb29a, 0xc3ac, 0xf1e6, 0xb29b, 0xb29c, 0xb29d, - 0xb29e, 0xb29f, 0xcab8, 0xd2d3, 0xb2a0, 0xd6aa, 0xb340, 0xeff2, - 0xb341, 0xbed8, 0xb342, 0xbdc3, 0xeff3, 0xb6cc, 0xb0ab, 0xb343, - 0xb344, 0xb345, 0xb346, 0xcaaf, 0xb347, 0xb348, 0xedb6, 0xb349, - 0xedb7, 0xb34a, 0xb34b, 0xb34c, 0xb34d, 0xcef9, 0xb7af, 0xbff3, - /* 0x7800 .. 0x78ff */ - 0xedb8, 0xc2eb, 0xc9b0, 0xb34e, 0xb34f, 0xb350, 0xb351, 0xb352, - 0xb353, 0xedb9, 0xb354, 0xb355, 0xc6f6, 0xbfb3, 0xb356, 0xb357, - 0xb358, 0xedbc, 0xc5f8, 0xb359, 0xd1d0, 0xb35a, 0xd7a9, 0xedba, - 0xedbb, 0xb35b, 0xd1e2, 0xb35c, 0xedbf, 0xedc0, 0xb35d, 0xedc4, - 0xb35e, 0xb35f, 0xb360, 0xedc8, 0xb361, 0xedc6, 0xedce, 0xd5e8, - 0xb362, 0xedc9, 0xb363, 0xb364, 0xedc7, 0xedbe, 0xb365, 0xb366, - 0xc5e9, 0xb367, 0xb368, 0xb369, 0xc6c6, 0xb36a, 0xb36b, 0xc9e9, - 0xd4d2, 0xedc1, 0xedc2, 0xedc3, 0xedc5, 0xb36c, 0xc0f9, 0xb36d, - 0xb4a1, 0xb36e, 0xb36f, 0xb370, 0xb371, 0xb9e8, 0xb372, 0xedd0, - 0xb373, 0xb374, 0xb375, 0xb376, 0xedd1, 0xb377, 0xedca, 0xb378, - 0xedcf, 0xb379, 0xcef8, 0xb37a, 0xb37b, 0xcbb6, 0xedcc, 0xedcd, - 0xb37c, 0xb37d, 0xb37e, 0xb380, 0xb381, 0xcff5, 0xb382, 0xb383, - 0xb384, 0xb385, 0xb386, 0xb387, 0xb388, 0xb389, 0xb38a, 0xb38b, - 0xb38c, 0xb38d, 0xedd2, 0xc1f2, 0xd3b2, 0xedcb, 0xc8b7, 0xb38e, - 0xb38f, 0xb390, 0xb391, 0xb392, 0xb393, 0xb394, 0xb395, 0xbcef, - 0xb396, 0xb397, 0xb398, 0xb399, 0xc5f0, 0xb39a, 0xb39b, 0xb39c, - 0xb39d, 0xb39e, 0xb39f, 0xb3a0, 0xb440, 0xb441, 0xb442, 0xedd6, - 0xb443, 0xb5ef, 0xb444, 0xb445, 0xc2b5, 0xb0ad, 0xcbe9, 0xb446, - 0xb447, 0xb1ae, 0xb448, 0xedd4, 0xb449, 0xb44a, 0xb44b, 0xcdeb, - 0xb5e2, 0xb44c, 0xedd5, 0xedd3, 0xedd7, 0xb44d, 0xb44e, 0xb5fa, - 0xb44f, 0xedd8, 0xb450, 0xedd9, 0xb451, 0xeddc, 0xb452, 0xb1cc, - 0xb453, 0xb454, 0xb455, 0xb456, 0xb457, 0xb458, 0xb459, 0xb45a, - 0xc5f6, 0xbcee, 0xedda, 0xccbc, 0xb2ea, 0xb45b, 0xb45c, 0xb45d, - 0xb45e, 0xeddb, 0xb45f, 0xb460, 0xb461, 0xb462, 0xc4eb, 0xb463, - 0xb464, 0xb4c5, 0xb465, 0xb466, 0xb467, 0xb0f5, 0xb468, 0xb469, - 0xb46a, 0xeddf, 0xc0da, 0xb4e8, 0xb46b, 0xb46c, 0xb46d, 0xb46e, - 0xc5cd, 0xb46f, 0xb470, 0xb471, 0xeddd, 0xbfc4, 0xb472, 0xb473, - 0xb474, 0xedde, 0xb475, 0xb476, 0xb477, 0xb478, 0xb479, 0xb47a, - 0xb47b, 0xb47c, 0xb47d, 0xb47e, 0xb480, 0xb481, 0xb482, 0xb483, - 0xc4a5, 0xb484, 0xb485, 0xb486, 0xede0, 0xb487, 0xb488, 0xb489, - 0xb48a, 0xb48b, 0xede1, 0xb48c, 0xede3, 0xb48d, 0xb48e, 0xc1d7, - 0xb48f, 0xb490, 0xbbc7, 0xb491, 0xb492, 0xb493, 0xb494, 0xb495, - /* 0x7900 .. 0x79ff */ - 0xb496, 0xbdb8, 0xb497, 0xb498, 0xb499, 0xede2, 0xb49a, 0xb49b, - 0xb49c, 0xb49d, 0xb49e, 0xb49f, 0xb4a0, 0xb540, 0xb541, 0xb542, - 0xb543, 0xb544, 0xb545, 0xede4, 0xb546, 0xb547, 0xb548, 0xb549, - 0xb54a, 0xb54b, 0xb54c, 0xb54d, 0xb54e, 0xb54f, 0xede6, 0xb550, - 0xb551, 0xb552, 0xb553, 0xb554, 0xede5, 0xb555, 0xb556, 0xb557, - 0xb558, 0xb559, 0xb55a, 0xb55b, 0xb55c, 0xb55d, 0xb55e, 0xb55f, - 0xb560, 0xb561, 0xb562, 0xb563, 0xede7, 0xb564, 0xb565, 0xb566, - 0xb567, 0xb568, 0xcabe, 0xecea, 0xc0f1, 0xb569, 0xc9e7, 0xb56a, - 0xeceb, 0xc6ee, 0xb56b, 0xb56c, 0xb56d, 0xb56e, 0xecec, 0xb56f, - 0xc6ed, 0xeced, 0xb570, 0xb571, 0xb572, 0xb573, 0xb574, 0xb575, - 0xb576, 0xb577, 0xb578, 0xecf0, 0xb579, 0xb57a, 0xd7e6, 0xecf3, - 0xb57b, 0xb57c, 0xecf1, 0xecee, 0xecef, 0xd7a3, 0xc9f1, 0xcbee, - 0xecf4, 0xb57d, 0xecf2, 0xb57e, 0xb580, 0xcfe9, 0xb581, 0xecf6, - 0xc6b1, 0xb582, 0xb583, 0xb584, 0xb585, 0xbcc0, 0xb586, 0xecf5, - 0xb587, 0xb588, 0xb589, 0xb58a, 0xb58b, 0xb58c, 0xb58d, 0xb5bb, - 0xbbf6, 0xb58e, 0xecf7, 0xb58f, 0xb590, 0xb591, 0xb592, 0xb593, - 0xd9f7, 0xbdfb, 0xb594, 0xb595, 0xc2bb, 0xecf8, 0xb596, 0xb597, - 0xb598, 0xb599, 0xecf9, 0xb59a, 0xb59b, 0xb59c, 0xb59d, 0xb8a3, - 0xb59e, 0xb59f, 0xb5a0, 0xb640, 0xb641, 0xb642, 0xb643, 0xb644, - 0xb645, 0xb646, 0xecfa, 0xb647, 0xb648, 0xb649, 0xb64a, 0xb64b, - 0xb64c, 0xb64d, 0xb64e, 0xb64f, 0xb650, 0xb651, 0xb652, 0xecfb, - 0xb653, 0xb654, 0xb655, 0xb656, 0xb657, 0xb658, 0xb659, 0xb65a, - 0xb65b, 0xb65c, 0xb65d, 0xecfc, 0xb65e, 0xb65f, 0xb660, 0xb661, - 0xb662, 0xd3ed, 0xd8ae, 0xc0eb, 0xb663, 0xc7dd, 0xbacc, 0xb664, - 0xd0e3, 0xcbbd, 0xb665, 0xcdba, 0xb666, 0xb667, 0xb8d1, 0xb668, - 0xb669, 0xb1fc, 0xb66a, 0xc7ef, 0xb66b, 0xd6d6, 0xb66c, 0xb66d, - 0xb66e, 0xbfc6, 0xc3eb, 0xb66f, 0xb670, 0xeff5, 0xb671, 0xb672, - 0xc3d8, 0xb673, 0xb674, 0xb675, 0xb676, 0xb677, 0xb678, 0xd7e2, - 0xb679, 0xb67a, 0xb67b, 0xeff7, 0xb3d3, 0xb67c, 0xc7d8, 0xd1ed, - 0xb67d, 0xd6c8, 0xb67e, 0xeff8, 0xb680, 0xeff6, 0xb681, 0xbbfd, - 0xb3c6, 0xb682, 0xb683, 0xb684, 0xb685, 0xb686, 0xb687, 0xb688, - 0xbdd5, 0xb689, 0xb68a, 0xd2c6, 0xb68b, 0xbbe0, 0xb68c, 0xb68d, - /* 0x7a00 .. 0x7aff */ - 0xcfa1, 0xb68e, 0xeffc, 0xeffb, 0xb68f, 0xb690, 0xeff9, 0xb691, - 0xb692, 0xb693, 0xb694, 0xb3cc, 0xb695, 0xc9d4, 0xcbb0, 0xb696, - 0xb697, 0xb698, 0xb699, 0xb69a, 0xeffe, 0xb69b, 0xb69c, 0xb0de, - 0xb69d, 0xb69e, 0xd6c9, 0xb69f, 0xb6a0, 0xb740, 0xeffd, 0xb741, - 0xb3ed, 0xb742, 0xb743, 0xf6d5, 0xb744, 0xb745, 0xb746, 0xb747, - 0xb748, 0xb749, 0xb74a, 0xb74b, 0xb74c, 0xb74d, 0xb74e, 0xb74f, - 0xb750, 0xb751, 0xb752, 0xcec8, 0xb753, 0xb754, 0xb755, 0xf0a2, - 0xb756, 0xf0a1, 0xb757, 0xb5be, 0xbcda, 0xbbfc, 0xb758, 0xb8e5, - 0xb759, 0xb75a, 0xb75b, 0xb75c, 0xb75d, 0xb75e, 0xc4c2, 0xb75f, - 0xb760, 0xb761, 0xb762, 0xb763, 0xb764, 0xb765, 0xb766, 0xb767, - 0xb768, 0xf0a3, 0xb769, 0xb76a, 0xb76b, 0xb76c, 0xb76d, 0xcbeb, - 0xb76e, 0xb76f, 0xb770, 0xb771, 0xb772, 0xb773, 0xb774, 0xb775, - 0xb776, 0xb777, 0xb778, 0xb779, 0xb77a, 0xb77b, 0xb77c, 0xb77d, - 0xb77e, 0xb780, 0xb781, 0xb782, 0xb783, 0xb784, 0xb785, 0xb786, - 0xf0a6, 0xb787, 0xb788, 0xb789, 0xd1a8, 0xb78a, 0xbebf, 0xc7ee, - 0xf1b6, 0xf1b7, 0xbfd5, 0xb78b, 0xb78c, 0xb78d, 0xb78e, 0xb4a9, - 0xf1b8, 0xcdbb, 0xb78f, 0xc7d4, 0xd5ad, 0xb790, 0xf1b9, 0xb791, - 0xf1ba, 0xb792, 0xb793, 0xb794, 0xb795, 0xc7cf, 0xb796, 0xb797, - 0xb798, 0xd2a4, 0xd6cf, 0xb799, 0xb79a, 0xf1bb, 0xbdd1, 0xb4b0, - 0xbebd, 0xb79b, 0xb79c, 0xb79d, 0xb4dc, 0xced1, 0xb79e, 0xbfdf, - 0xf1bd, 0xb79f, 0xb7a0, 0xb840, 0xb841, 0xbffa, 0xf1bc, 0xb842, - 0xf1bf, 0xb843, 0xb844, 0xb845, 0xf1be, 0xf1c0, 0xb846, 0xb847, - 0xb848, 0xb849, 0xb84a, 0xf1c1, 0xb84b, 0xb84c, 0xb84d, 0xb84e, - 0xb84f, 0xb850, 0xb851, 0xb852, 0xb853, 0xb854, 0xb855, 0xc1fe, - 0xb856, 0xb857, 0xb858, 0xb859, 0xb85a, 0xb85b, 0xb85c, 0xb85d, - 0xb85e, 0xb85f, 0xb860, 0xc1a2, 0xb861, 0xb862, 0xb863, 0xb864, - 0xb865, 0xb866, 0xb867, 0xb868, 0xb869, 0xb86a, 0xcafa, 0xb86b, - 0xb86c, 0xd5be, 0xb86d, 0xb86e, 0xb86f, 0xb870, 0xbeba, 0xbeb9, - 0xd5c2, 0xb871, 0xb872, 0xbfa2, 0xb873, 0xcdaf, 0xf1b5, 0xb874, - 0xb875, 0xb876, 0xb877, 0xb878, 0xb879, 0xbddf, 0xb87a, 0xb6cb, - 0xb87b, 0xb87c, 0xb87d, 0xb87e, 0xb880, 0xb881, 0xb882, 0xb883, - 0xb884, 0xd6f1, 0xf3c3, 0xb885, 0xb886, 0xf3c4, 0xb887, 0xb8cd, - /* 0x7b00 .. 0x7bff */ - 0xb888, 0xb889, 0xb88a, 0xf3c6, 0xf3c7, 0xb88b, 0xb0ca, 0xb88c, - 0xf3c5, 0xb88d, 0xf3c9, 0xcbf1, 0xb88e, 0xb88f, 0xb890, 0xf3cb, - 0xb891, 0xd0a6, 0xb892, 0xb893, 0xb1ca, 0xf3c8, 0xb894, 0xb895, - 0xb896, 0xf3cf, 0xb897, 0xb5d1, 0xb898, 0xb899, 0xf3d7, 0xb89a, - 0xf3d2, 0xb89b, 0xb89c, 0xb89d, 0xf3d4, 0xf3d3, 0xb7fb, 0xb89e, - 0xb1bf, 0xb89f, 0xf3ce, 0xf3ca, 0xb5da, 0xb8a0, 0xf3d0, 0xb940, - 0xb941, 0xf3d1, 0xb942, 0xf3d5, 0xb943, 0xb944, 0xb945, 0xb946, - 0xf3cd, 0xb947, 0xbce3, 0xb948, 0xc1fd, 0xb949, 0xf3d6, 0xb94a, - 0xb94b, 0xb94c, 0xb94d, 0xb94e, 0xb94f, 0xf3da, 0xb950, 0xf3cc, - 0xb951, 0xb5c8, 0xb952, 0xbdee, 0xf3dc, 0xb953, 0xb954, 0xb7a4, - 0xbff0, 0xd6fe, 0xcdb2, 0xb955, 0xb4f0, 0xb956, 0xb2df, 0xb957, - 0xf3d8, 0xb958, 0xf3d9, 0xc9b8, 0xb959, 0xf3dd, 0xb95a, 0xb95b, - 0xf3de, 0xb95c, 0xf3e1, 0xb95d, 0xb95e, 0xb95f, 0xb960, 0xb961, - 0xb962, 0xb963, 0xb964, 0xb965, 0xb966, 0xb967, 0xf3df, 0xb968, - 0xb969, 0xf3e3, 0xf3e2, 0xb96a, 0xb96b, 0xf3db, 0xb96c, 0xbfea, - 0xb96d, 0xb3ef, 0xb96e, 0xf3e0, 0xb96f, 0xb970, 0xc7a9, 0xb971, - 0xbcf2, 0xb972, 0xb973, 0xb974, 0xb975, 0xf3eb, 0xb976, 0xb977, - 0xb978, 0xb979, 0xb97a, 0xb97b, 0xb97c, 0xb9bf, 0xb97d, 0xb97e, - 0xf3e4, 0xb980, 0xb981, 0xb982, 0xb2ad, 0xbbfe, 0xb983, 0xcbe3, - 0xb984, 0xb985, 0xb986, 0xb987, 0xf3ed, 0xf3e9, 0xb988, 0xb989, - 0xb98a, 0xb9dc, 0xf3ee, 0xb98b, 0xb98c, 0xb98d, 0xf3e5, 0xf3e6, - 0xf3ea, 0xc2e1, 0xf3ec, 0xf3ef, 0xf3e8, 0xbcfd, 0xb98e, 0xb98f, - 0xb990, 0xcfe4, 0xb991, 0xb992, 0xf3f0, 0xb993, 0xb994, 0xb995, - 0xf3e7, 0xb996, 0xb997, 0xb998, 0xb999, 0xb99a, 0xb99b, 0xb99c, - 0xb99d, 0xf3f2, 0xb99e, 0xb99f, 0xb9a0, 0xba40, 0xd7ad, 0xc6aa, - 0xba41, 0xba42, 0xba43, 0xba44, 0xf3f3, 0xba45, 0xba46, 0xba47, - 0xba48, 0xf3f1, 0xba49, 0xc2a8, 0xba4a, 0xba4b, 0xba4c, 0xba4d, - 0xba4e, 0xb8dd, 0xf3f5, 0xba4f, 0xba50, 0xf3f4, 0xba51, 0xba52, - 0xba53, 0xb4db, 0xba54, 0xba55, 0xba56, 0xf3f6, 0xf3f7, 0xba57, - 0xba58, 0xba59, 0xf3f8, 0xba5a, 0xba5b, 0xba5c, 0xc0ba, 0xba5d, - 0xba5e, 0xc0e9, 0xba5f, 0xba60, 0xba61, 0xba62, 0xba63, 0xc5f1, - 0xba64, 0xba65, 0xba66, 0xba67, 0xf3fb, 0xba68, 0xf3fa, 0xba69, - /* 0x7c00 .. 0x7cff */ - 0xba6a, 0xba6b, 0xba6c, 0xba6d, 0xba6e, 0xba6f, 0xba70, 0xb4d8, - 0xba71, 0xba72, 0xba73, 0xf3fe, 0xf3f9, 0xba74, 0xba75, 0xf3fc, - 0xba76, 0xba77, 0xba78, 0xba79, 0xba7a, 0xba7b, 0xf3fd, 0xba7c, - 0xba7d, 0xba7e, 0xba80, 0xba81, 0xba82, 0xba83, 0xba84, 0xf4a1, - 0xba85, 0xba86, 0xba87, 0xba88, 0xba89, 0xba8a, 0xf4a3, 0xbbc9, - 0xba8b, 0xba8c, 0xf4a2, 0xba8d, 0xba8e, 0xba8f, 0xba90, 0xba91, - 0xba92, 0xba93, 0xba94, 0xba95, 0xba96, 0xba97, 0xba98, 0xba99, - 0xf4a4, 0xba9a, 0xba9b, 0xba9c, 0xba9d, 0xba9e, 0xba9f, 0xb2be, - 0xf4a6, 0xf4a5, 0xbaa0, 0xbb40, 0xbb41, 0xbb42, 0xbb43, 0xbb44, - 0xbb45, 0xbb46, 0xbb47, 0xbb48, 0xbb49, 0xbcae, 0xbb4a, 0xbb4b, - 0xbb4c, 0xbb4d, 0xbb4e, 0xbb4f, 0xbb50, 0xbb51, 0xbb52, 0xbb53, - 0xbb54, 0xbb55, 0xbb56, 0xbb57, 0xbb58, 0xbb59, 0xbb5a, 0xbb5b, - 0xbb5c, 0xbb5d, 0xbb5e, 0xbb5f, 0xbb60, 0xbb61, 0xbb62, 0xbb63, - 0xbb64, 0xbb65, 0xbb66, 0xbb67, 0xbb68, 0xbb69, 0xbb6a, 0xbb6b, - 0xbb6c, 0xbb6d, 0xbb6e, 0xc3d7, 0xd9e1, 0xbb6f, 0xbb70, 0xbb71, - 0xbb72, 0xbb73, 0xbb74, 0xc0e0, 0xf4cc, 0xd7d1, 0xbb75, 0xbb76, - 0xbb77, 0xbb78, 0xbb79, 0xbb7a, 0xbb7b, 0xbb7c, 0xbb7d, 0xbb7e, - 0xbb80, 0xb7db, 0xbb81, 0xbb82, 0xbb83, 0xbb84, 0xbb85, 0xbb86, - 0xbb87, 0xf4ce, 0xc1a3, 0xbb88, 0xbb89, 0xc6c9, 0xbb8a, 0xb4d6, - 0xd5b3, 0xbb8b, 0xbb8c, 0xbb8d, 0xf4d0, 0xf4cf, 0xf4d1, 0xcbda, - 0xbb8e, 0xbb8f, 0xf4d2, 0xbb90, 0xd4c1, 0xd6e0, 0xbb91, 0xbb92, - 0xbb93, 0xbb94, 0xb7e0, 0xbb95, 0xbb96, 0xbb97, 0xc1b8, 0xbb98, - 0xbb99, 0xc1bb, 0xf4d3, 0xbeac, 0xbb9a, 0xbb9b, 0xbb9c, 0xbb9d, - 0xbb9e, 0xb4e2, 0xbb9f, 0xbba0, 0xf4d4, 0xf4d5, 0xbeab, 0xbc40, - 0xbc41, 0xf4d6, 0xbc42, 0xbc43, 0xbc44, 0xf4db, 0xbc45, 0xf4d7, - 0xf4da, 0xbc46, 0xbafd, 0xbc47, 0xf4d8, 0xf4d9, 0xbc48, 0xbc49, - 0xbc4a, 0xbc4b, 0xbc4c, 0xbc4d, 0xbc4e, 0xb8e2, 0xccc7, 0xf4dc, - 0xbc4f, 0xb2da, 0xbc50, 0xbc51, 0xc3d3, 0xbc52, 0xbc53, 0xd4e3, - 0xbfb7, 0xbc54, 0xbc55, 0xbc56, 0xbc57, 0xbc58, 0xbc59, 0xbc5a, - 0xf4dd, 0xbc5b, 0xbc5c, 0xbc5d, 0xbc5e, 0xbc5f, 0xbc60, 0xc5b4, - 0xbc61, 0xbc62, 0xbc63, 0xbc64, 0xbc65, 0xbc66, 0xbc67, 0xbc68, - 0xf4e9, 0xbc69, 0xbc6a, 0xcfb5, 0xbc6b, 0xbc6c, 0xbc6d, 0xbc6e, - /* 0x7d00 .. 0x7dff */ - 0xbc6f, 0xbc70, 0xbc71, 0xbc72, 0xbc73, 0xbc74, 0xbc75, 0xbc76, - 0xbc77, 0xbc78, 0xcec9, 0xbc79, 0xbc7a, 0xbc7b, 0xbc7c, 0xbc7d, - 0xbc7e, 0xbc80, 0xbc81, 0xbc82, 0xbc83, 0xbc84, 0xbc85, 0xbc86, - 0xbc87, 0xbc88, 0xbc89, 0xbc8a, 0xbc8b, 0xbc8c, 0xbc8d, 0xbc8e, - 0xcbd8, 0xbc8f, 0xcbf7, 0xbc90, 0xbc91, 0xbc92, 0xbc93, 0xbdf4, - 0xbc94, 0xbc95, 0xbc96, 0xd7cf, 0xbc97, 0xbc98, 0xbc99, 0xc0db, - 0xbc9a, 0xbc9b, 0xbc9c, 0xbc9d, 0xbc9e, 0xbc9f, 0xbca0, 0xbd40, - 0xbd41, 0xbd42, 0xbd43, 0xbd44, 0xbd45, 0xbd46, 0xbd47, 0xbd48, - 0xbd49, 0xbd4a, 0xbd4b, 0xbd4c, 0xbd4d, 0xbd4e, 0xbd4f, 0xbd50, - 0xbd51, 0xbd52, 0xbd53, 0xbd54, 0xbd55, 0xbd56, 0xbd57, 0xbd58, - 0xbd59, 0xbd5a, 0xbd5b, 0xbd5c, 0xbd5d, 0xbd5e, 0xbd5f, 0xbd60, - 0xbd61, 0xbd62, 0xbd63, 0xbd64, 0xbd65, 0xbd66, 0xbd67, 0xbd68, - 0xbd69, 0xbd6a, 0xbd6b, 0xbd6c, 0xbd6d, 0xbd6e, 0xbd6f, 0xbd70, - 0xbd71, 0xbd72, 0xbd73, 0xbd74, 0xbd75, 0xbd76, 0xd0f5, 0xbd77, - 0xbd78, 0xbd79, 0xbd7a, 0xbd7b, 0xbd7c, 0xbd7d, 0xbd7e, 0xf4ea, - 0xbd80, 0xbd81, 0xbd82, 0xbd83, 0xbd84, 0xbd85, 0xbd86, 0xbd87, - 0xbd88, 0xbd89, 0xbd8a, 0xbd8b, 0xbd8c, 0xbd8d, 0xbd8e, 0xbd8f, - 0xbd90, 0xbd91, 0xbd92, 0xbd93, 0xbd94, 0xbd95, 0xbd96, 0xbd97, - 0xbd98, 0xbd99, 0xbd9a, 0xbd9b, 0xbd9c, 0xbd9d, 0xbd9e, 0xbd9f, - 0xbda0, 0xbe40, 0xbe41, 0xbe42, 0xbe43, 0xbe44, 0xbe45, 0xbe46, - 0xbe47, 0xbe48, 0xbe49, 0xbe4a, 0xbe4b, 0xbe4c, 0xf4eb, 0xbe4d, - 0xbe4e, 0xbe4f, 0xbe50, 0xbe51, 0xbe52, 0xbe53, 0xf4ec, 0xbe54, - 0xbe55, 0xbe56, 0xbe57, 0xbe58, 0xbe59, 0xbe5a, 0xbe5b, 0xbe5c, - 0xbe5d, 0xbe5e, 0xbe5f, 0xbe60, 0xbe61, 0xbe62, 0xbe63, 0xbe64, - 0xbe65, 0xbe66, 0xbe67, 0xbe68, 0xbe69, 0xbe6a, 0xbe6b, 0xbe6c, - 0xbe6d, 0xbe6e, 0xbe6f, 0xbe70, 0xbe71, 0xbe72, 0xbe73, 0xbe74, - 0xbe75, 0xbe76, 0xbe77, 0xbe78, 0xbe79, 0xbe7a, 0xbe7b, 0xbe7c, - 0xbe7d, 0xbe7e, 0xbe80, 0xbe81, 0xbe82, 0xbe83, 0xbe84, 0xbe85, - 0xbe86, 0xbe87, 0xbe88, 0xbe89, 0xbe8a, 0xbe8b, 0xbe8c, 0xbe8d, - 0xbe8e, 0xbe8f, 0xbe90, 0xbe91, 0xbe92, 0xbe93, 0xbe94, 0xbe95, - 0xbe96, 0xbe97, 0xbe98, 0xbe99, 0xbe9a, 0xbe9b, 0xbe9c, 0xbe9d, - 0xbe9e, 0xbe9f, 0xbea0, 0xbf40, 0xbf41, 0xbf42, 0xbf43, 0xbf44, - /* 0x7e00 .. 0x7eff */ - 0xbf45, 0xbf46, 0xbf47, 0xbf48, 0xbf49, 0xbf4a, 0xbf4b, 0xbf4c, - 0xbf4d, 0xbf4e, 0xbf4f, 0xbf50, 0xbf51, 0xbf52, 0xbf53, 0xbf54, - 0xbf55, 0xbf56, 0xbf57, 0xbf58, 0xbf59, 0xbf5a, 0xbf5b, 0xbf5c, - 0xbf5d, 0xbf5e, 0xbf5f, 0xbf60, 0xbf61, 0xbf62, 0xbf63, 0xbf64, - 0xbf65, 0xbf66, 0xbf67, 0xbf68, 0xbf69, 0xbf6a, 0xbf6b, 0xbf6c, - 0xbf6d, 0xbf6e, 0xbf6f, 0xbf70, 0xbf71, 0xbf72, 0xbf73, 0xbf74, - 0xbf75, 0xbf76, 0xbf77, 0xbf78, 0xbf79, 0xbf7a, 0xbf7b, 0xbf7c, - 0xbf7d, 0xbf7e, 0xbf80, 0xf7e3, 0xbf81, 0xbf82, 0xbf83, 0xbf84, - 0xbf85, 0xb7b1, 0xbf86, 0xbf87, 0xbf88, 0xbf89, 0xbf8a, 0xf4ed, - 0xbf8b, 0xbf8c, 0xbf8d, 0xbf8e, 0xbf8f, 0xbf90, 0xbf91, 0xbf92, - 0xbf93, 0xbf94, 0xbf95, 0xbf96, 0xbf97, 0xbf98, 0xbf99, 0xbf9a, - 0xbf9b, 0xbf9c, 0xbf9d, 0xbf9e, 0xbf9f, 0xbfa0, 0xc040, 0xc041, - 0xc042, 0xc043, 0xc044, 0xc045, 0xc046, 0xc047, 0xc048, 0xc049, - 0xc04a, 0xc04b, 0xc04c, 0xc04d, 0xc04e, 0xc04f, 0xc050, 0xc051, - 0xc052, 0xc053, 0xc054, 0xc055, 0xc056, 0xc057, 0xc058, 0xc059, - 0xc05a, 0xc05b, 0xc05c, 0xc05d, 0xc05e, 0xc05f, 0xc060, 0xc061, - 0xc062, 0xc063, 0xd7eb, 0xc064, 0xc065, 0xc066, 0xc067, 0xc068, - 0xc069, 0xc06a, 0xc06b, 0xc06c, 0xc06d, 0xc06e, 0xc06f, 0xc070, - 0xc071, 0xc072, 0xc073, 0xc074, 0xc075, 0xc076, 0xc077, 0xc078, - 0xc079, 0xc07a, 0xc07b, 0xf4ee, 0xc07c, 0xc07d, 0xc07e, 0xe6f9, - 0xbec0, 0xe6fa, 0xbaec, 0xe6fb, 0xcfcb, 0xe6fc, 0xd4bc, 0xbcb6, - 0xe6fd, 0xe6fe, 0xbccd, 0xc8d2, 0xceb3, 0xe7a1, 0xc080, 0xb4bf, - 0xe7a2, 0xc9b4, 0xb8d9, 0xc4c9, 0xc081, 0xd7dd, 0xc2da, 0xb7d7, - 0xd6bd, 0xcec6, 0xb7c4, 0xc082, 0xc083, 0xc5a6, 0xe7a3, 0xcfdf, - 0xe7a4, 0xe7a5, 0xe7a6, 0xc1b7, 0xd7e9, 0xc9f0, 0xcfb8, 0xd6af, - 0xd6d5, 0xe7a7, 0xb0ed, 0xe7a8, 0xe7a9, 0xc9dc, 0xd2ef, 0xbead, - 0xe7aa, 0xb0f3, 0xc8de, 0xbde1, 0xe7ab, 0xc8c6, 0xc084, 0xe7ac, - 0xbbe6, 0xb8f8, 0xd1a4, 0xe7ad, 0xc2e7, 0xbef8, 0xbdca, 0xcdb3, - 0xe7ae, 0xe7af, 0xbeee, 0xd0e5, 0xc085, 0xcbe7, 0xccd0, 0xbccc, - 0xe7b0, 0xbca8, 0xd0f7, 0xe7b1, 0xc086, 0xd0f8, 0xe7b2, 0xe7b3, - 0xb4c2, 0xe7b4, 0xe7b5, 0xc9fe, 0xceac, 0xc3e0, 0xe7b7, 0xb1c1, - 0xb3f1, 0xc087, 0xe7b8, 0xe7b9, 0xd7db, 0xd5c0, 0xe7ba, 0xc2cc, - /* 0x7f00 .. 0x7fff */ - 0xd7ba, 0xe7bb, 0xe7bc, 0xe7bd, 0xbcea, 0xc3e5, 0xc0c2, 0xe7be, - 0xe7bf, 0xbca9, 0xc088, 0xe7c0, 0xe7c1, 0xe7b6, 0xb6d0, 0xe7c2, - 0xc089, 0xe7c3, 0xe7c4, 0xbbba, 0xb5de, 0xc2c6, 0xb1e0, 0xe7c5, - 0xd4b5, 0xe7c6, 0xb8bf, 0xe7c8, 0xe7c7, 0xb7ec, 0xc08a, 0xe7c9, - 0xb2f8, 0xe7ca, 0xe7cb, 0xe7cc, 0xe7cd, 0xe7ce, 0xe7cf, 0xe7d0, - 0xd3a7, 0xcbf5, 0xe7d1, 0xe7d2, 0xe7d3, 0xe7d4, 0xc9c9, 0xe7d5, - 0xe7d6, 0xe7d7, 0xe7d8, 0xe7d9, 0xbdc9, 0xe7da, 0xf3be, 0xc08b, - 0xb8d7, 0xc08c, 0xc8b1, 0xc08d, 0xc08e, 0xc08f, 0xc090, 0xc091, - 0xc092, 0xc093, 0xf3bf, 0xc094, 0xf3c0, 0xf3c1, 0xc095, 0xc096, - 0xc097, 0xc098, 0xc099, 0xc09a, 0xc09b, 0xc09c, 0xc09d, 0xc09e, - 0xb9de, 0xcdf8, 0xc09f, 0xc0a0, 0xd8e8, 0xbab1, 0xc140, 0xc2de, - 0xeeb7, 0xc141, 0xb7a3, 0xc142, 0xc143, 0xc144, 0xc145, 0xeeb9, - 0xc146, 0xeeb8, 0xb0d5, 0xc147, 0xc148, 0xc149, 0xc14a, 0xc14b, - 0xeebb, 0xd5d6, 0xd7ef, 0xc14c, 0xc14d, 0xc14e, 0xd6c3, 0xc14f, - 0xc150, 0xeebd, 0xcaf0, 0xc151, 0xeebc, 0xc152, 0xc153, 0xc154, - 0xc155, 0xeebe, 0xc156, 0xc157, 0xc158, 0xc159, 0xeec0, 0xc15a, - 0xc15b, 0xeebf, 0xc15c, 0xc15d, 0xc15e, 0xc15f, 0xc160, 0xc161, - 0xc162, 0xc163, 0xd1f2, 0xc164, 0xc7bc, 0xc165, 0xc3c0, 0xc166, - 0xc167, 0xc168, 0xc169, 0xc16a, 0xb8e1, 0xc16b, 0xc16c, 0xc16d, - 0xc16e, 0xc16f, 0xc1e7, 0xc170, 0xc171, 0xf4c6, 0xd0df, 0xf4c7, - 0xc172, 0xcfdb, 0xc173, 0xc174, 0xc8ba, 0xc175, 0xc176, 0xf4c8, - 0xc177, 0xc178, 0xc179, 0xc17a, 0xc17b, 0xc17c, 0xc17d, 0xf4c9, - 0xf4ca, 0xc17e, 0xf4cb, 0xc180, 0xc181, 0xc182, 0xc183, 0xc184, - 0xd9fa, 0xb8fe, 0xc185, 0xc186, 0xe5f1, 0xd3f0, 0xc187, 0xf4e0, - 0xc188, 0xcecc, 0xc189, 0xc18a, 0xc18b, 0xb3e1, 0xc18c, 0xc18d, - 0xc18e, 0xc18f, 0xf1b4, 0xc190, 0xd2ee, 0xc191, 0xf4e1, 0xc192, - 0xc193, 0xc194, 0xc195, 0xc196, 0xcfe8, 0xf4e2, 0xc197, 0xc198, - 0xc7cc, 0xc199, 0xc19a, 0xc19b, 0xc19c, 0xc19d, 0xc19e, 0xb5d4, - 0xb4e4, 0xf4e4, 0xc19f, 0xc1a0, 0xc240, 0xf4e3, 0xf4e5, 0xc241, - 0xc242, 0xf4e6, 0xc243, 0xc244, 0xc245, 0xc246, 0xf4e7, 0xc247, - 0xbab2, 0xb0bf, 0xc248, 0xf4e8, 0xc249, 0xc24a, 0xc24b, 0xc24c, - 0xc24d, 0xc24e, 0xc24f, 0xb7ad, 0xd2ed, 0xc250, 0xc251, 0xc252, - /* 0x8000 .. 0x80ff */ - 0xd2ab, 0xc0cf, 0xc253, 0xbfbc, 0xeba3, 0xd5df, 0xeac8, 0xc254, - 0xc255, 0xc256, 0xc257, 0xf1f3, 0xb6f8, 0xcba3, 0xc258, 0xc259, - 0xc4cd, 0xc25a, 0xf1e7, 0xc25b, 0xf1e8, 0xb8fb, 0xf1e9, 0xbac4, - 0xd4c5, 0xb0d2, 0xc25c, 0xc25d, 0xf1ea, 0xc25e, 0xc25f, 0xc260, - 0xf1eb, 0xc261, 0xf1ec, 0xc262, 0xc263, 0xf1ed, 0xf1ee, 0xf1ef, - 0xf1f1, 0xf1f0, 0xc5d5, 0xc264, 0xc265, 0xc266, 0xc267, 0xc268, - 0xc269, 0xf1f2, 0xc26a, 0xb6fa, 0xc26b, 0xf1f4, 0xd2ae, 0xdec7, - 0xcbca, 0xc26c, 0xc26d, 0xb3dc, 0xc26e, 0xb5a2, 0xc26f, 0xb9a2, - 0xc270, 0xc271, 0xc4f4, 0xf1f5, 0xc272, 0xc273, 0xf1f6, 0xc274, - 0xc275, 0xc276, 0xc1c4, 0xc1fb, 0xd6b0, 0xf1f7, 0xc277, 0xc278, - 0xc279, 0xc27a, 0xf1f8, 0xc27b, 0xc1aa, 0xc27c, 0xc27d, 0xc27e, - 0xc6b8, 0xc280, 0xbedb, 0xc281, 0xc282, 0xc283, 0xc284, 0xc285, - 0xc286, 0xc287, 0xc288, 0xc289, 0xc28a, 0xc28b, 0xc28c, 0xc28d, - 0xc28e, 0xf1f9, 0xb4cf, 0xc28f, 0xc290, 0xc291, 0xc292, 0xc293, - 0xc294, 0xf1fa, 0xc295, 0xc296, 0xc297, 0xc298, 0xc299, 0xc29a, - 0xc29b, 0xc29c, 0xc29d, 0xc29e, 0xc29f, 0xc2a0, 0xc340, 0xedb2, - 0xedb1, 0xc341, 0xc342, 0xcbe0, 0xd2de, 0xc343, 0xcbc1, 0xd5d8, - 0xc344, 0xc8e2, 0xc345, 0xc0df, 0xbca1, 0xc346, 0xc347, 0xc348, - 0xc349, 0xc34a, 0xc34b, 0xebc1, 0xc34c, 0xc34d, 0xd0a4, 0xc34e, - 0xd6e2, 0xc34f, 0xb6c7, 0xb8d8, 0xebc0, 0xb8ce, 0xc350, 0xebbf, - 0xb3a6, 0xb9c9, 0xd6ab, 0xc351, 0xb7f4, 0xb7ca, 0xc352, 0xc353, - 0xc354, 0xbce7, 0xb7be, 0xebc6, 0xc355, 0xebc7, 0xb0b9, 0xbfcf, - 0xc356, 0xebc5, 0xd3fd, 0xc357, 0xebc8, 0xc358, 0xc359, 0xebc9, - 0xc35a, 0xc35b, 0xb7ce, 0xc35c, 0xebc2, 0xebc4, 0xc9f6, 0xd6d7, - 0xd5cd, 0xd0b2, 0xebcf, 0xceb8, 0xebd0, 0xc35d, 0xb5a8, 0xc35e, - 0xc35f, 0xc360, 0xc361, 0xc362, 0xb1b3, 0xebd2, 0xcca5, 0xc363, - 0xc364, 0xc365, 0xc366, 0xc367, 0xc368, 0xc369, 0xc5d6, 0xebd3, - 0xc36a, 0xebd1, 0xc5df, 0xebce, 0xcaa4, 0xebd5, 0xb0fb, 0xc36b, - 0xc36c, 0xbafa, 0xc36d, 0xc36e, 0xd8b7, 0xf1e3, 0xc36f, 0xebca, - 0xebcb, 0xebcc, 0xebcd, 0xebd6, 0xe6c0, 0xebd9, 0xc370, 0xbfe8, - 0xd2c8, 0xebd7, 0xebdc, 0xb8ec, 0xebd8, 0xc371, 0xbdba, 0xc372, - 0xd0d8, 0xc373, 0xb0b7, 0xc374, 0xebdd, 0xc4dc, 0xc375, 0xc376, - /* 0x8100 .. 0x81ff */ - 0xc377, 0xc378, 0xd6ac, 0xc379, 0xc37a, 0xc37b, 0xb4e0, 0xc37c, - 0xc37d, 0xc2f6, 0xbcb9, 0xc37e, 0xc380, 0xebda, 0xebdb, 0xd4e0, - 0xc6ea, 0xc4d4, 0xebdf, 0xc5a7, 0xd9f5, 0xc381, 0xb2b1, 0xc382, - 0xebe4, 0xc383, 0xbdc5, 0xc384, 0xc385, 0xc386, 0xebe2, 0xc387, - 0xc388, 0xc389, 0xc38a, 0xc38b, 0xc38c, 0xc38d, 0xc38e, 0xc38f, - 0xc390, 0xc391, 0xc392, 0xc393, 0xebe3, 0xc394, 0xc395, 0xb8ac, - 0xc396, 0xcdd1, 0xebe5, 0xc397, 0xc398, 0xc399, 0xebe1, 0xc39a, - 0xc1b3, 0xc39b, 0xc39c, 0xc39d, 0xc39e, 0xc39f, 0xc6a2, 0xc3a0, - 0xc440, 0xc441, 0xc442, 0xc443, 0xc444, 0xc445, 0xccf3, 0xc446, - 0xebe6, 0xc447, 0xc0b0, 0xd2b8, 0xebe7, 0xc448, 0xc449, 0xc44a, - 0xb8af, 0xb8ad, 0xc44b, 0xebe8, 0xc7bb, 0xcdf3, 0xc44c, 0xc44d, - 0xc44e, 0xebea, 0xebeb, 0xc44f, 0xc450, 0xc451, 0xc452, 0xc453, - 0xebed, 0xc454, 0xc455, 0xc456, 0xc457, 0xd0c8, 0xc458, 0xebf2, - 0xc459, 0xebee, 0xc45a, 0xc45b, 0xc45c, 0xebf1, 0xc8f9, 0xc45d, - 0xd1fc, 0xebec, 0xc45e, 0xc45f, 0xebe9, 0xc460, 0xc461, 0xc462, - 0xc463, 0xb8b9, 0xcfd9, 0xc4e5, 0xebef, 0xebf0, 0xccda, 0xcdc8, - 0xb0f2, 0xc464, 0xebf6, 0xc465, 0xc466, 0xc467, 0xc468, 0xc469, - 0xebf5, 0xc46a, 0xb2b2, 0xc46b, 0xc46c, 0xc46d, 0xc46e, 0xb8e0, - 0xc46f, 0xebf7, 0xc470, 0xc471, 0xc472, 0xc473, 0xc474, 0xc475, - 0xb1ec, 0xc476, 0xc477, 0xccc5, 0xc4a4, 0xcfa5, 0xc478, 0xc479, - 0xc47a, 0xc47b, 0xc47c, 0xebf9, 0xc47d, 0xc47e, 0xeca2, 0xc480, - 0xc5f2, 0xc481, 0xebfa, 0xc482, 0xc483, 0xc484, 0xc485, 0xc486, - 0xc487, 0xc488, 0xc489, 0xc9c5, 0xc48a, 0xc48b, 0xc48c, 0xc48d, - 0xc48e, 0xc48f, 0xe2df, 0xebfe, 0xc490, 0xc491, 0xc492, 0xc493, - 0xcdce, 0xeca1, 0xb1db, 0xd3b7, 0xc494, 0xc495, 0xd2dc, 0xc496, - 0xc497, 0xc498, 0xebfd, 0xc499, 0xebfb, 0xc49a, 0xc49b, 0xc49c, - 0xc49d, 0xc49e, 0xc49f, 0xc4a0, 0xc540, 0xc541, 0xc542, 0xc543, - 0xc544, 0xc545, 0xc546, 0xc547, 0xc548, 0xc549, 0xc54a, 0xc54b, - 0xc54c, 0xc54d, 0xc54e, 0xb3bc, 0xc54f, 0xc550, 0xc551, 0xeab0, - 0xc552, 0xc553, 0xd7d4, 0xc554, 0xf4ab, 0xb3f4, 0xc555, 0xc556, - 0xc557, 0xc558, 0xc559, 0xd6c1, 0xd6c2, 0xc55a, 0xc55b, 0xc55c, - 0xc55d, 0xc55e, 0xc55f, 0xd5e9, 0xbeca, 0xc560, 0xf4a7, 0xc561, - /* 0x8200 .. 0x82ff */ - 0xd2a8, 0xf4a8, 0xf4a9, 0xc562, 0xf4aa, 0xbecb, 0xd3df, 0xc563, - 0xc564, 0xc565, 0xc566, 0xc567, 0xc9e0, 0xc9e1, 0xc568, 0xc569, - 0xf3c2, 0xc56a, 0xcae6, 0xc56b, 0xccf2, 0xc56c, 0xc56d, 0xc56e, - 0xc56f, 0xc570, 0xc571, 0xe2b6, 0xcbb4, 0xc572, 0xcee8, 0xd6db, - 0xc573, 0xf4ad, 0xf4ae, 0xf4af, 0xc574, 0xc575, 0xc576, 0xc577, - 0xf4b2, 0xc578, 0xbabd, 0xf4b3, 0xb0e3, 0xf4b0, 0xc579, 0xf4b1, - 0xbda2, 0xb2d5, 0xc57a, 0xf4b6, 0xf4b7, 0xb6e6, 0xb2b0, 0xcfcf, - 0xf4b4, 0xb4ac, 0xc57b, 0xf4b5, 0xc57c, 0xc57d, 0xf4b8, 0xc57e, - 0xc580, 0xc581, 0xc582, 0xc583, 0xf4b9, 0xc584, 0xc585, 0xcda7, - 0xc586, 0xf4ba, 0xc587, 0xf4bb, 0xc588, 0xc589, 0xc58a, 0xf4bc, - 0xc58b, 0xc58c, 0xc58d, 0xc58e, 0xc58f, 0xc590, 0xc591, 0xc592, - 0xcbd2, 0xc593, 0xf4bd, 0xc594, 0xc595, 0xc596, 0xc597, 0xf4be, - 0xc598, 0xc599, 0xc59a, 0xc59b, 0xc59c, 0xc59d, 0xc59e, 0xc59f, - 0xf4bf, 0xc5a0, 0xc640, 0xc641, 0xc642, 0xc643, 0xf4de, 0xc1bc, - 0xbce8, 0xc644, 0xc9ab, 0xd1de, 0xe5f5, 0xc645, 0xc646, 0xc647, - 0xc648, 0xdcb3, 0xd2d5, 0xc649, 0xc64a, 0xdcb4, 0xb0ac, 0xdcb5, - 0xc64b, 0xc64c, 0xbdda, 0xc64d, 0xdcb9, 0xc64e, 0xc64f, 0xc650, - 0xd8c2, 0xc651, 0xdcb7, 0xd3f3, 0xc652, 0xc9d6, 0xdcba, 0xdcb6, - 0xc653, 0xdcbb, 0xc3a2, 0xc654, 0xc655, 0xc656, 0xc657, 0xdcbc, - 0xdcc5, 0xdcbd, 0xc658, 0xc659, 0xcedf, 0xd6a5, 0xc65a, 0xdccf, - 0xc65b, 0xdccd, 0xc65c, 0xc65d, 0xdcd2, 0xbde6, 0xc2ab, 0xc65e, - 0xdcb8, 0xdccb, 0xdcce, 0xdcbe, 0xb7d2, 0xb0c5, 0xdcc7, 0xd0be, - 0xdcc1, 0xbba8, 0xc65f, 0xb7bc, 0xdccc, 0xc660, 0xc661, 0xdcc6, - 0xdcbf, 0xc7db, 0xc662, 0xc663, 0xc664, 0xd1bf, 0xdcc0, 0xc665, - 0xc666, 0xdcca, 0xc667, 0xc668, 0xdcd0, 0xc669, 0xc66a, 0xcead, - 0xdcc2, 0xc66b, 0xdcc3, 0xdcc8, 0xdcc9, 0xb2d4, 0xdcd1, 0xcbd5, - 0xc66c, 0xd4b7, 0xdcdb, 0xdcdf, 0xcca6, 0xdce6, 0xc66d, 0xc3e7, - 0xdcdc, 0xc66e, 0xc66f, 0xbfc1, 0xdcd9, 0xc670, 0xb0fa, 0xb9b6, - 0xdce5, 0xdcd3, 0xc671, 0xdcc4, 0xdcd6, 0xc8f4, 0xbfe0, 0xc672, - 0xc673, 0xc674, 0xc675, 0xc9bb, 0xc676, 0xc677, 0xc678, 0xb1bd, - 0xc679, 0xd3a2, 0xc67a, 0xc67b, 0xdcda, 0xc67c, 0xc67d, 0xdcd5, - 0xc67e, 0xc6bb, 0xc680, 0xdcde, 0xc681, 0xc682, 0xc683, 0xc684, - /* 0x8300 .. 0x83ff */ - 0xc685, 0xd7c2, 0xc3af, 0xb7b6, 0xc7d1, 0xc3a9, 0xdce2, 0xdcd8, - 0xdceb, 0xdcd4, 0xc686, 0xc687, 0xdcdd, 0xc688, 0xbea5, 0xdcd7, - 0xc689, 0xdce0, 0xc68a, 0xc68b, 0xdce3, 0xdce4, 0xc68c, 0xdcf8, - 0xc68d, 0xc68e, 0xdce1, 0xdda2, 0xdce7, 0xc68f, 0xc690, 0xc691, - 0xc692, 0xc693, 0xc694, 0xc695, 0xc696, 0xc697, 0xc698, 0xbceb, - 0xb4c4, 0xc699, 0xc69a, 0xc3a3, 0xb2e7, 0xdcfa, 0xc69b, 0xdcf2, - 0xc69c, 0xdcef, 0xc69d, 0xdcfc, 0xdcee, 0xd2f0, 0xb2e8, 0xc69e, - 0xc8d7, 0xc8e3, 0xdcfb, 0xc69f, 0xdced, 0xc6a0, 0xc740, 0xc741, - 0xdcf7, 0xc742, 0xc743, 0xdcf5, 0xc744, 0xc745, 0xbea3, 0xdcf4, - 0xc746, 0xb2dd, 0xc747, 0xc748, 0xc749, 0xc74a, 0xc74b, 0xdcf3, - 0xbcf6, 0xdce8, 0xbbc4, 0xc74c, 0xc0f3, 0xc74d, 0xc74e, 0xc74f, - 0xc750, 0xc751, 0xbcd4, 0xdce9, 0xdcea, 0xc752, 0xdcf1, 0xdcf6, - 0xdcf9, 0xb5b4, 0xc753, 0xc8d9, 0xbbe7, 0xdcfe, 0xdcfd, 0xd3ab, - 0xdda1, 0xdda3, 0xdda5, 0xd2f1, 0xdda4, 0xdda6, 0xdda7, 0xd2a9, - 0xc754, 0xc755, 0xc756, 0xc757, 0xc758, 0xc759, 0xc75a, 0xbac9, - 0xdda9, 0xc75b, 0xc75c, 0xddb6, 0xddb1, 0xddb4, 0xc75d, 0xc75e, - 0xc75f, 0xc760, 0xc761, 0xc762, 0xc763, 0xddb0, 0xc6ce, 0xc764, - 0xc765, 0xc0f2, 0xc766, 0xc767, 0xc768, 0xc769, 0xc9af, 0xc76a, - 0xc76b, 0xc76c, 0xdcec, 0xddae, 0xc76d, 0xc76e, 0xc76f, 0xc770, - 0xddb7, 0xc771, 0xc772, 0xdcf0, 0xddaf, 0xc773, 0xddb8, 0xc774, - 0xddac, 0xc775, 0xc776, 0xc777, 0xc778, 0xc779, 0xc77a, 0xc77b, - 0xddb9, 0xddb3, 0xddad, 0xc4aa, 0xc77c, 0xc77d, 0xc77e, 0xc780, - 0xdda8, 0xc0b3, 0xc1ab, 0xddaa, 0xddab, 0xc781, 0xddb2, 0xbbf1, - 0xddb5, 0xd3a8, 0xddba, 0xc782, 0xddbb, 0xc3a7, 0xc783, 0xc784, - 0xddd2, 0xddbc, 0xc785, 0xc786, 0xc787, 0xddd1, 0xc788, 0xb9bd, - 0xc789, 0xc78a, 0xbed5, 0xc78b, 0xbefa, 0xc78c, 0xc78d, 0xbaca, - 0xc78e, 0xc78f, 0xc790, 0xc791, 0xddca, 0xc792, 0xddc5, 0xc793, - 0xddbf, 0xc794, 0xc795, 0xc796, 0xb2cb, 0xddc3, 0xc797, 0xddcb, - 0xb2a4, 0xddd5, 0xc798, 0xc799, 0xc79a, 0xddbe, 0xc79b, 0xc79c, - 0xc79d, 0xc6d0, 0xddd0, 0xc79e, 0xc79f, 0xc7a0, 0xc840, 0xc841, - 0xddd4, 0xc1e2, 0xb7c6, 0xc842, 0xc843, 0xc844, 0xc845, 0xc846, - 0xddce, 0xddcf, 0xc847, 0xc848, 0xc849, 0xddc4, 0xc84a, 0xc84b, - /* 0x8400 .. 0x84ff */ - 0xc84c, 0xddbd, 0xc84d, 0xddcd, 0xccd1, 0xc84e, 0xddc9, 0xc84f, - 0xc850, 0xc851, 0xc852, 0xddc2, 0xc3c8, 0xc6bc, 0xceae, 0xddcc, - 0xc853, 0xddc8, 0xc854, 0xc855, 0xc856, 0xc857, 0xc858, 0xc859, - 0xddc1, 0xc85a, 0xc85b, 0xc85c, 0xddc6, 0xc2dc, 0xc85d, 0xc85e, - 0xc85f, 0xc860, 0xc861, 0xc862, 0xd3a9, 0xd3aa, 0xddd3, 0xcff4, - 0xc8f8, 0xc863, 0xc864, 0xc865, 0xc866, 0xc867, 0xc868, 0xc869, - 0xc86a, 0xdde6, 0xc86b, 0xc86c, 0xc86d, 0xc86e, 0xc86f, 0xc870, - 0xddc7, 0xc871, 0xc872, 0xc873, 0xdde0, 0xc2e4, 0xc874, 0xc875, - 0xc876, 0xc877, 0xc878, 0xc879, 0xc87a, 0xc87b, 0xdde1, 0xc87c, - 0xc87d, 0xc87e, 0xc880, 0xc881, 0xc882, 0xc883, 0xc884, 0xc885, - 0xc886, 0xddd7, 0xc887, 0xc888, 0xc889, 0xc88a, 0xc88b, 0xd6f8, - 0xc88c, 0xddd9, 0xddd8, 0xb8f0, 0xddd6, 0xc88d, 0xc88e, 0xc88f, - 0xc890, 0xc6cf, 0xc891, 0xb6ad, 0xc892, 0xc893, 0xc894, 0xc895, - 0xc896, 0xdde2, 0xc897, 0xbaf9, 0xd4e1, 0xdde7, 0xc898, 0xc899, - 0xc89a, 0xb4d0, 0xc89b, 0xddda, 0xc89c, 0xbffb, 0xdde3, 0xc89d, - 0xdddf, 0xc89e, 0xdddd, 0xc89f, 0xc8a0, 0xc940, 0xc941, 0xc942, - 0xc943, 0xc944, 0xb5d9, 0xc945, 0xc946, 0xc947, 0xc948, 0xdddb, - 0xdddc, 0xddde, 0xc949, 0xbdaf, 0xdde4, 0xc94a, 0xdde5, 0xc94b, - 0xc94c, 0xc94d, 0xc94e, 0xc94f, 0xc950, 0xc951, 0xc952, 0xddf5, - 0xc953, 0xc3c9, 0xc954, 0xc955, 0xcbe2, 0xc956, 0xc957, 0xc958, - 0xc959, 0xddf2, 0xc95a, 0xc95b, 0xc95c, 0xc95d, 0xc95e, 0xc95f, - 0xc960, 0xc961, 0xc962, 0xc963, 0xc964, 0xc965, 0xc966, 0xd8e1, - 0xc967, 0xc968, 0xc6d1, 0xc969, 0xddf4, 0xc96a, 0xc96b, 0xc96c, - 0xd5f4, 0xddf3, 0xddf0, 0xc96d, 0xc96e, 0xddec, 0xc96f, 0xddef, - 0xc970, 0xdde8, 0xc971, 0xc972, 0xd0ee, 0xc973, 0xc974, 0xc975, - 0xc976, 0xc8d8, 0xddee, 0xc977, 0xc978, 0xdde9, 0xc979, 0xc97a, - 0xddea, 0xcbf2, 0xc97b, 0xdded, 0xc97c, 0xc97d, 0xb1cd, 0xc97e, - 0xc980, 0xc981, 0xc982, 0xc983, 0xc984, 0xc0b6, 0xc985, 0xbcbb, - 0xddf1, 0xc986, 0xc987, 0xddf7, 0xc988, 0xddf6, 0xddeb, 0xc989, - 0xc98a, 0xc98b, 0xc98c, 0xc98d, 0xc5ee, 0xc98e, 0xc98f, 0xc990, - 0xddfb, 0xc991, 0xc992, 0xc993, 0xc994, 0xc995, 0xc996, 0xc997, - 0xc998, 0xc999, 0xc99a, 0xc99b, 0xdea4, 0xc99c, 0xc99d, 0xdea3, - /* 0x8500 .. 0x85ff */ - 0xc99e, 0xc99f, 0xc9a0, 0xca40, 0xca41, 0xca42, 0xca43, 0xca44, - 0xca45, 0xca46, 0xca47, 0xca48, 0xddf8, 0xca49, 0xca4a, 0xca4b, - 0xca4c, 0xc3ef, 0xca4d, 0xc2fb, 0xca4e, 0xca4f, 0xca50, 0xd5e1, - 0xca51, 0xca52, 0xceb5, 0xca53, 0xca54, 0xca55, 0xca56, 0xddfd, - 0xca57, 0xb2cc, 0xca58, 0xca59, 0xca5a, 0xca5b, 0xca5c, 0xca5d, - 0xca5e, 0xca5f, 0xca60, 0xc4e8, 0xcadf, 0xca61, 0xca62, 0xca63, - 0xca64, 0xca65, 0xca66, 0xca67, 0xca68, 0xca69, 0xca6a, 0xc7be, - 0xddfa, 0xddfc, 0xddfe, 0xdea2, 0xb0aa, 0xb1ce, 0xca6b, 0xca6c, - 0xca6d, 0xca6e, 0xca6f, 0xdeac, 0xca70, 0xca71, 0xca72, 0xca73, - 0xdea6, 0xbdb6, 0xc8ef, 0xca74, 0xca75, 0xca76, 0xca77, 0xca78, - 0xca79, 0xca7a, 0xca7b, 0xca7c, 0xca7d, 0xca7e, 0xdea1, 0xca80, - 0xca81, 0xdea5, 0xca82, 0xca83, 0xca84, 0xca85, 0xdea9, 0xca86, - 0xca87, 0xca88, 0xca89, 0xca8a, 0xdea8, 0xca8b, 0xca8c, 0xca8d, - 0xdea7, 0xca8e, 0xca8f, 0xca90, 0xca91, 0xca92, 0xca93, 0xca94, - 0xca95, 0xca96, 0xdead, 0xca97, 0xd4cc, 0xca98, 0xca99, 0xca9a, - 0xca9b, 0xdeb3, 0xdeaa, 0xdeae, 0xca9c, 0xca9d, 0xc0d9, 0xca9e, - 0xca9f, 0xcaa0, 0xcb40, 0xcb41, 0xb1a1, 0xdeb6, 0xcb42, 0xdeb1, - 0xcb43, 0xcb44, 0xcb45, 0xcb46, 0xcb47, 0xcb48, 0xcb49, 0xdeb2, - 0xcb4a, 0xcb4b, 0xcb4c, 0xcb4d, 0xcb4e, 0xcb4f, 0xcb50, 0xcb51, - 0xcb52, 0xcb53, 0xcb54, 0xd1a6, 0xdeb5, 0xcb55, 0xcb56, 0xcb57, - 0xcb58, 0xcb59, 0xcb5a, 0xcb5b, 0xdeaf, 0xcb5c, 0xcb5d, 0xcb5e, - 0xdeb0, 0xcb5f, 0xd0bd, 0xcb60, 0xcb61, 0xcb62, 0xdeb4, 0xcaed, - 0xdeb9, 0xcb63, 0xcb64, 0xcb65, 0xcb66, 0xcb67, 0xcb68, 0xdeb8, - 0xcb69, 0xdeb7, 0xcb6a, 0xcb6b, 0xcb6c, 0xcb6d, 0xcb6e, 0xcb6f, - 0xcb70, 0xdebb, 0xcb71, 0xcb72, 0xcb73, 0xcb74, 0xcb75, 0xcb76, - 0xcb77, 0xbde5, 0xcb78, 0xcb79, 0xcb7a, 0xcb7b, 0xcb7c, 0xb2d8, - 0xc3ea, 0xcb7d, 0xcb7e, 0xdeba, 0xcb80, 0xc5ba, 0xcb81, 0xcb82, - 0xcb83, 0xcb84, 0xcb85, 0xcb86, 0xdebc, 0xcb87, 0xcb88, 0xcb89, - 0xcb8a, 0xcb8b, 0xcb8c, 0xcb8d, 0xccd9, 0xcb8e, 0xcb8f, 0xcb90, - 0xcb91, 0xb7aa, 0xcb92, 0xcb93, 0xcb94, 0xcb95, 0xcb96, 0xcb97, - 0xcb98, 0xcb99, 0xcb9a, 0xcb9b, 0xcb9c, 0xcb9d, 0xcb9e, 0xcb9f, - 0xcba0, 0xcc40, 0xcc41, 0xd4e5, 0xcc42, 0xcc43, 0xcc44, 0xdebd, - /* 0x8600 .. 0x86ff */ - 0xcc45, 0xcc46, 0xcc47, 0xcc48, 0xcc49, 0xdebf, 0xcc4a, 0xcc4b, - 0xcc4c, 0xcc4d, 0xcc4e, 0xcc4f, 0xcc50, 0xcc51, 0xcc52, 0xcc53, - 0xcc54, 0xc4a2, 0xcc55, 0xcc56, 0xcc57, 0xcc58, 0xdec1, 0xcc59, - 0xcc5a, 0xcc5b, 0xcc5c, 0xcc5d, 0xcc5e, 0xcc5f, 0xcc60, 0xcc61, - 0xcc62, 0xcc63, 0xcc64, 0xcc65, 0xcc66, 0xcc67, 0xcc68, 0xdebe, - 0xcc69, 0xdec0, 0xcc6a, 0xcc6b, 0xcc6c, 0xcc6d, 0xcc6e, 0xcc6f, - 0xcc70, 0xcc71, 0xcc72, 0xcc73, 0xcc74, 0xcc75, 0xcc76, 0xcc77, - 0xd5ba, 0xcc78, 0xcc79, 0xcc7a, 0xdec2, 0xcc7b, 0xcc7c, 0xcc7d, - 0xcc7e, 0xcc80, 0xcc81, 0xcc82, 0xcc83, 0xcc84, 0xcc85, 0xcc86, - 0xcc87, 0xcc88, 0xcc89, 0xcc8a, 0xcc8b, 0xf2ae, 0xbba2, 0xc2b2, - 0xc5b0, 0xc2c7, 0xcc8c, 0xcc8d, 0xf2af, 0xcc8e, 0xcc8f, 0xcc90, - 0xcc91, 0xcc92, 0xd0e9, 0xcc93, 0xcc94, 0xcc95, 0xd3dd, 0xcc96, - 0xcc97, 0xcc98, 0xebbd, 0xcc99, 0xcc9a, 0xcc9b, 0xcc9c, 0xcc9d, - 0xcc9e, 0xcc9f, 0xcca0, 0xb3e6, 0xf2b0, 0xcd40, 0xf2b1, 0xcd41, - 0xcd42, 0xcaad, 0xcd43, 0xcd44, 0xcd45, 0xcd46, 0xcd47, 0xcd48, - 0xcd49, 0xbae7, 0xf2b3, 0xf2b5, 0xf2b4, 0xcbe4, 0xcfba, 0xf2b2, - 0xcab4, 0xd2cf, 0xc2ec, 0xcd4a, 0xcd4b, 0xcd4c, 0xcd4d, 0xcd4e, - 0xcd4f, 0xcd50, 0xcec3, 0xf2b8, 0xb0f6, 0xf2b7, 0xcd51, 0xcd52, - 0xcd53, 0xcd54, 0xcd55, 0xf2be, 0xcd56, 0xb2cf, 0xcd57, 0xcd58, - 0xcd59, 0xcd5a, 0xcd5b, 0xcd5c, 0xd1c1, 0xf2ba, 0xcd5d, 0xcd5e, - 0xcd5f, 0xcd60, 0xcd61, 0xf2bc, 0xd4e9, 0xcd62, 0xcd63, 0xf2bb, - 0xf2b6, 0xf2bf, 0xf2bd, 0xcd64, 0xf2b9, 0xcd65, 0xcd66, 0xf2c7, - 0xf2c4, 0xf2c6, 0xcd67, 0xcd68, 0xf2ca, 0xf2c2, 0xf2c0, 0xcd69, - 0xcd6a, 0xcd6b, 0xf2c5, 0xcd6c, 0xcd6d, 0xcd6e, 0xcd6f, 0xcd70, - 0xd6fb, 0xcd71, 0xcd72, 0xcd73, 0xf2c1, 0xcd74, 0xc7f9, 0xc9df, - 0xcd75, 0xf2c8, 0xb9c6, 0xb5b0, 0xcd76, 0xcd77, 0xf2c3, 0xf2c9, - 0xf2d0, 0xf2d6, 0xcd78, 0xcd79, 0xbbd7, 0xcd7a, 0xcd7b, 0xcd7c, - 0xf2d5, 0xcddc, 0xcd7d, 0xd6eb, 0xcd7e, 0xcd80, 0xf2d2, 0xf2d4, - 0xcd81, 0xcd82, 0xcd83, 0xcd84, 0xb8f2, 0xcd85, 0xcd86, 0xcd87, - 0xcd88, 0xf2cb, 0xcd89, 0xcd8a, 0xcd8b, 0xf2ce, 0xc2f9, 0xcd8c, - 0xd5dd, 0xf2cc, 0xf2cd, 0xf2cf, 0xf2d3, 0xcd8d, 0xcd8e, 0xcd8f, - 0xf2d9, 0xd3bc, 0xcd90, 0xcd91, 0xcd92, 0xcd93, 0xb6ea, 0xcd94, - /* 0x8700 .. 0x87ff */ - 0xcaf1, 0xcd95, 0xb7e4, 0xf2d7, 0xcd96, 0xcd97, 0xcd98, 0xf2d8, - 0xf2da, 0xf2dd, 0xf2db, 0xcd99, 0xcd9a, 0xf2dc, 0xcd9b, 0xcd9c, - 0xcd9d, 0xcd9e, 0xd1d1, 0xf2d1, 0xcd9f, 0xcdc9, 0xcda0, 0xcecf, - 0xd6a9, 0xce40, 0xf2e3, 0xce41, 0xc3db, 0xce42, 0xf2e0, 0xce43, - 0xce44, 0xc0af, 0xf2ec, 0xf2de, 0xce45, 0xf2e1, 0xce46, 0xce47, - 0xce48, 0xf2e8, 0xce49, 0xce4a, 0xce4b, 0xce4c, 0xf2e2, 0xce4d, - 0xce4e, 0xf2e7, 0xce4f, 0xce50, 0xf2e6, 0xce51, 0xce52, 0xf2e9, - 0xce53, 0xce54, 0xce55, 0xf2df, 0xce56, 0xce57, 0xf2e4, 0xf2ea, - 0xce58, 0xce59, 0xce5a, 0xce5b, 0xce5c, 0xce5d, 0xce5e, 0xd3ac, - 0xf2e5, 0xb2f5, 0xce5f, 0xce60, 0xf2f2, 0xce61, 0xd0ab, 0xce62, - 0xce63, 0xce64, 0xce65, 0xf2f5, 0xce66, 0xce67, 0xce68, 0xbbc8, - 0xce69, 0xf2f9, 0xce6a, 0xce6b, 0xce6c, 0xce6d, 0xce6e, 0xce6f, - 0xf2f0, 0xce70, 0xce71, 0xf2f6, 0xf2f8, 0xf2fa, 0xce72, 0xce73, - 0xce74, 0xce75, 0xce76, 0xce77, 0xce78, 0xce79, 0xf2f3, 0xce7a, - 0xf2f1, 0xce7b, 0xce7c, 0xce7d, 0xbafb, 0xce7e, 0xb5fb, 0xce80, - 0xce81, 0xce82, 0xce83, 0xf2ef, 0xf2f7, 0xf2ed, 0xf2ee, 0xce84, - 0xce85, 0xce86, 0xf2eb, 0xf3a6, 0xce87, 0xf3a3, 0xce88, 0xce89, - 0xf3a2, 0xce8a, 0xce8b, 0xf2f4, 0xce8c, 0xc8da, 0xce8d, 0xce8e, - 0xce8f, 0xce90, 0xce91, 0xf2fb, 0xce92, 0xce93, 0xce94, 0xf3a5, - 0xce95, 0xce96, 0xce97, 0xce98, 0xce99, 0xce9a, 0xce9b, 0xc3f8, - 0xce9c, 0xce9d, 0xce9e, 0xce9f, 0xcea0, 0xcf40, 0xcf41, 0xcf42, - 0xf2fd, 0xcf43, 0xcf44, 0xf3a7, 0xf3a9, 0xf3a4, 0xcf45, 0xf2fc, - 0xcf46, 0xcf47, 0xcf48, 0xf3ab, 0xcf49, 0xf3aa, 0xcf4a, 0xcf4b, - 0xcf4c, 0xcf4d, 0xc2dd, 0xcf4e, 0xcf4f, 0xf3ae, 0xcf50, 0xcf51, - 0xf3b0, 0xcf52, 0xcf53, 0xcf54, 0xcf55, 0xcf56, 0xf3a1, 0xcf57, - 0xcf58, 0xcf59, 0xf3b1, 0xf3ac, 0xcf5a, 0xcf5b, 0xcf5c, 0xcf5d, - 0xcf5e, 0xf3af, 0xf2fe, 0xf3ad, 0xcf5f, 0xcf60, 0xcf61, 0xcf62, - 0xcf63, 0xcf64, 0xcf65, 0xf3b2, 0xcf66, 0xcf67, 0xcf68, 0xcf69, - 0xf3b4, 0xcf6a, 0xcf6b, 0xcf6c, 0xcf6d, 0xf3a8, 0xcf6e, 0xcf6f, - 0xcf70, 0xcf71, 0xf3b3, 0xcf72, 0xcf73, 0xcf74, 0xf3b5, 0xcf75, - 0xcf76, 0xcf77, 0xcf78, 0xcf79, 0xcf7a, 0xcf7b, 0xcf7c, 0xcf7d, - 0xcf7e, 0xd0b7, 0xcf80, 0xcf81, 0xcf82, 0xcf83, 0xf3b8, 0xcf84, - /* 0x8800 .. 0x88ff */ - 0xcf85, 0xcf86, 0xcf87, 0xd9f9, 0xcf88, 0xcf89, 0xcf8a, 0xcf8b, - 0xcf8c, 0xcf8d, 0xf3b9, 0xcf8e, 0xcf8f, 0xcf90, 0xcf91, 0xcf92, - 0xcf93, 0xcf94, 0xcf95, 0xf3b7, 0xcf96, 0xc8e4, 0xf3b6, 0xcf97, - 0xcf98, 0xcf99, 0xcf9a, 0xf3ba, 0xcf9b, 0xcf9c, 0xcf9d, 0xcf9e, - 0xcf9f, 0xf3bb, 0xb4c0, 0xcfa0, 0xd040, 0xd041, 0xd042, 0xd043, - 0xd044, 0xd045, 0xd046, 0xd047, 0xd048, 0xd049, 0xd04a, 0xd04b, - 0xd04c, 0xd04d, 0xeec3, 0xd04e, 0xd04f, 0xd050, 0xd051, 0xd052, - 0xd053, 0xf3bc, 0xd054, 0xd055, 0xf3bd, 0xd056, 0xd057, 0xd058, - 0xd1aa, 0xd059, 0xd05a, 0xd05b, 0xf4ac, 0xd0c6, 0xd05c, 0xd05d, - 0xd05e, 0xd05f, 0xd060, 0xd061, 0xd0d0, 0xd1dc, 0xd062, 0xd063, - 0xd064, 0xd065, 0xd066, 0xd067, 0xcfce, 0xd068, 0xd069, 0xbdd6, - 0xd06a, 0xd1c3, 0xd06b, 0xd06c, 0xd06d, 0xd06e, 0xd06f, 0xd070, - 0xd071, 0xbae2, 0xe1e9, 0xd2c2, 0xf1c2, 0xb2b9, 0xd072, 0xd073, - 0xb1ed, 0xf1c3, 0xd074, 0xc9c0, 0xb3c4, 0xd075, 0xd9f2, 0xd076, - 0xcba5, 0xd077, 0xf1c4, 0xd078, 0xd079, 0xd07a, 0xd07b, 0xd6d4, - 0xd07c, 0xd07d, 0xd07e, 0xd080, 0xd081, 0xf1c5, 0xf4c0, 0xf1c6, - 0xd082, 0xd4ac, 0xf1c7, 0xd083, 0xb0c0, 0xf4c1, 0xd084, 0xd085, - 0xf4c2, 0xd086, 0xd087, 0xb4fc, 0xd088, 0xc5db, 0xd089, 0xd08a, - 0xd08b, 0xd08c, 0xccbb, 0xd08d, 0xd08e, 0xd08f, 0xd0e4, 0xd090, - 0xd091, 0xd092, 0xd093, 0xd094, 0xcde0, 0xd095, 0xd096, 0xd097, - 0xd098, 0xd099, 0xf1c8, 0xd09a, 0xd9f3, 0xd09b, 0xd09c, 0xd09d, - 0xd09e, 0xd09f, 0xd0a0, 0xb1bb, 0xd140, 0xcfae, 0xd141, 0xd142, - 0xd143, 0xb8a4, 0xd144, 0xd145, 0xd146, 0xd147, 0xd148, 0xf1ca, - 0xd149, 0xd14a, 0xd14b, 0xd14c, 0xf1cb, 0xd14d, 0xd14e, 0xd14f, - 0xd150, 0xb2c3, 0xc1d1, 0xd151, 0xd152, 0xd7b0, 0xf1c9, 0xd153, - 0xd154, 0xf1cc, 0xd155, 0xd156, 0xd157, 0xd158, 0xf1ce, 0xd159, - 0xd15a, 0xd15b, 0xd9f6, 0xd15c, 0xd2e1, 0xd4a3, 0xd15d, 0xd15e, - 0xf4c3, 0xc8b9, 0xd15f, 0xd160, 0xd161, 0xd162, 0xd163, 0xf4c4, - 0xd164, 0xd165, 0xf1cd, 0xf1cf, 0xbfe3, 0xf1d0, 0xd166, 0xd167, - 0xf1d4, 0xd168, 0xd169, 0xd16a, 0xd16b, 0xd16c, 0xd16d, 0xd16e, - 0xf1d6, 0xf1d1, 0xd16f, 0xc9d1, 0xc5e1, 0xd170, 0xd171, 0xd172, - 0xc2e3, 0xb9fc, 0xd173, 0xd174, 0xf1d3, 0xd175, 0xf1d5, 0xd176, - /* 0x8900 .. 0x89ff */ - 0xd177, 0xd178, 0xb9d3, 0xd179, 0xd17a, 0xd17b, 0xd17c, 0xd17d, - 0xd17e, 0xd180, 0xf1db, 0xd181, 0xd182, 0xd183, 0xd184, 0xd185, - 0xbad6, 0xd186, 0xb0fd, 0xf1d9, 0xd187, 0xd188, 0xd189, 0xd18a, - 0xd18b, 0xf1d8, 0xf1d2, 0xf1da, 0xd18c, 0xd18d, 0xd18e, 0xd18f, - 0xd190, 0xf1d7, 0xd191, 0xd192, 0xd193, 0xc8ec, 0xd194, 0xd195, - 0xd196, 0xd197, 0xcdca, 0xf1dd, 0xd198, 0xd199, 0xd19a, 0xd19b, - 0xe5bd, 0xd19c, 0xd19d, 0xd19e, 0xf1dc, 0xd19f, 0xf1de, 0xd1a0, - 0xd240, 0xd241, 0xd242, 0xd243, 0xd244, 0xd245, 0xd246, 0xd247, - 0xd248, 0xf1df, 0xd249, 0xd24a, 0xcfe5, 0xd24b, 0xd24c, 0xd24d, - 0xd24e, 0xd24f, 0xd250, 0xd251, 0xd252, 0xd253, 0xd254, 0xd255, - 0xd256, 0xd257, 0xd258, 0xd259, 0xd25a, 0xd25b, 0xd25c, 0xd25d, - 0xd25e, 0xd25f, 0xd260, 0xd261, 0xd262, 0xd263, 0xf4c5, 0xbdf3, - 0xd264, 0xd265, 0xd266, 0xd267, 0xd268, 0xd269, 0xf1e0, 0xd26a, - 0xd26b, 0xd26c, 0xd26d, 0xd26e, 0xd26f, 0xd270, 0xd271, 0xd272, - 0xd273, 0xd274, 0xd275, 0xd276, 0xd277, 0xd278, 0xd279, 0xd27a, - 0xd27b, 0xd27c, 0xd27d, 0xf1e1, 0xd27e, 0xd280, 0xd281, 0xcef7, - 0xd282, 0xd2aa, 0xd283, 0xf1fb, 0xd284, 0xd285, 0xb8b2, 0xd286, - 0xd287, 0xd288, 0xd289, 0xd28a, 0xd28b, 0xd28c, 0xd28d, 0xd28e, - 0xd28f, 0xd290, 0xd291, 0xd292, 0xd293, 0xd294, 0xd295, 0xd296, - 0xd297, 0xd298, 0xd299, 0xd29a, 0xd29b, 0xd29c, 0xd29d, 0xd29e, - 0xd29f, 0xd2a0, 0xd340, 0xd341, 0xd342, 0xd343, 0xd344, 0xd345, - 0xd346, 0xd347, 0xd348, 0xd349, 0xd34a, 0xd34b, 0xd34c, 0xd34d, - 0xd34e, 0xd34f, 0xd350, 0xd351, 0xd352, 0xd353, 0xd354, 0xd355, - 0xd356, 0xd357, 0xd358, 0xd359, 0xd35a, 0xd35b, 0xd35c, 0xd35d, - 0xd35e, 0xbcfb, 0xb9db, 0xd35f, 0xb9e6, 0xc3d9, 0xcad3, 0xeae8, - 0xc0c0, 0xbef5, 0xeae9, 0xeaea, 0xeaeb, 0xd360, 0xeaec, 0xeaed, - 0xeaee, 0xeaef, 0xbdc7, 0xd361, 0xd362, 0xd363, 0xf5fb, 0xd364, - 0xd365, 0xd366, 0xf5fd, 0xd367, 0xf5fe, 0xd368, 0xf5fc, 0xd369, - 0xd36a, 0xd36b, 0xd36c, 0xbde2, 0xd36d, 0xf6a1, 0xb4a5, 0xd36e, - 0xd36f, 0xd370, 0xd371, 0xf6a2, 0xd372, 0xd373, 0xd374, 0xf6a3, - 0xd375, 0xd376, 0xd377, 0xecb2, 0xd378, 0xd379, 0xd37a, 0xd37b, - 0xd37c, 0xd37d, 0xd37e, 0xd380, 0xd381, 0xd382, 0xd383, 0xd384, - /* 0x8a00 .. 0x8aff */ - 0xd1d4, 0xd385, 0xd386, 0xd387, 0xd388, 0xd389, 0xd38a, 0xd9ea, - 0xd38b, 0xd38c, 0xd38d, 0xd38e, 0xd38f, 0xd390, 0xd391, 0xd392, - 0xd393, 0xd394, 0xd395, 0xd396, 0xd397, 0xd398, 0xd399, 0xd39a, - 0xd39b, 0xd39c, 0xd39d, 0xd39e, 0xd39f, 0xd3a0, 0xd440, 0xd441, - 0xd442, 0xd443, 0xd444, 0xd445, 0xd446, 0xd447, 0xd448, 0xd449, - 0xd44a, 0xd44b, 0xd44c, 0xd44d, 0xd44e, 0xd44f, 0xd450, 0xd451, - 0xd452, 0xd453, 0xd454, 0xd455, 0xd456, 0xd457, 0xd458, 0xd459, - 0xd45a, 0xd45b, 0xd45c, 0xd45d, 0xd45e, 0xd45f, 0xf6a4, 0xd460, - 0xd461, 0xd462, 0xd463, 0xd464, 0xd465, 0xd466, 0xd467, 0xd468, - 0xeeba, 0xd469, 0xd46a, 0xd46b, 0xd46c, 0xd46d, 0xd46e, 0xd46f, - 0xd470, 0xd471, 0xd472, 0xd473, 0xd474, 0xd475, 0xd476, 0xd477, - 0xd478, 0xd479, 0xd47a, 0xd47b, 0xd47c, 0xd47d, 0xd47e, 0xd480, - 0xd481, 0xd482, 0xd483, 0xd484, 0xd485, 0xd486, 0xd487, 0xd488, - 0xd489, 0xd48a, 0xd48b, 0xd48c, 0xd48d, 0xd48e, 0xd48f, 0xd490, - 0xd491, 0xd492, 0xd493, 0xd494, 0xd495, 0xd496, 0xd497, 0xd498, - 0xd499, 0xd5b2, 0xd49a, 0xd49b, 0xd49c, 0xd49d, 0xd49e, 0xd49f, - 0xd4a0, 0xd540, 0xd541, 0xd542, 0xd543, 0xd544, 0xd545, 0xd546, - 0xd547, 0xd3fe, 0xccdc, 0xd548, 0xd549, 0xd54a, 0xd54b, 0xd54c, - 0xd54d, 0xd54e, 0xd54f, 0xcac4, 0xd550, 0xd551, 0xd552, 0xd553, - 0xd554, 0xd555, 0xd556, 0xd557, 0xd558, 0xd559, 0xd55a, 0xd55b, - 0xd55c, 0xd55d, 0xd55e, 0xd55f, 0xd560, 0xd561, 0xd562, 0xd563, - 0xd564, 0xd565, 0xd566, 0xd567, 0xd568, 0xd569, 0xd56a, 0xd56b, - 0xd56c, 0xd56d, 0xd56e, 0xd56f, 0xd570, 0xd571, 0xd572, 0xd573, - 0xd574, 0xd575, 0xd576, 0xd577, 0xd578, 0xd579, 0xd57a, 0xd57b, - 0xd57c, 0xd57d, 0xd57e, 0xd580, 0xd581, 0xd582, 0xd583, 0xd584, - 0xd585, 0xd586, 0xd587, 0xd588, 0xd589, 0xd58a, 0xd58b, 0xd58c, - 0xd58d, 0xd58e, 0xd58f, 0xd590, 0xd591, 0xd592, 0xd593, 0xd594, - 0xd595, 0xd596, 0xd597, 0xd598, 0xd599, 0xd59a, 0xd59b, 0xd59c, - 0xd59d, 0xd59e, 0xd59f, 0xd5a0, 0xd640, 0xd641, 0xd642, 0xd643, - 0xd644, 0xd645, 0xd646, 0xd647, 0xd648, 0xd649, 0xd64a, 0xd64b, - 0xd64c, 0xd64d, 0xd64e, 0xd64f, 0xd650, 0xd651, 0xd652, 0xd653, - 0xd654, 0xd655, 0xd656, 0xd657, 0xd658, 0xd659, 0xd65a, 0xd65b, - /* 0x8b00 .. 0x8bff */ - 0xd65c, 0xd65d, 0xd65e, 0xd65f, 0xd660, 0xd661, 0xd662, 0xe5c0, - 0xd663, 0xd664, 0xd665, 0xd666, 0xd667, 0xd668, 0xd669, 0xd66a, - 0xd66b, 0xd66c, 0xd66d, 0xd66e, 0xd66f, 0xd670, 0xd671, 0xd672, - 0xd673, 0xd674, 0xd675, 0xd676, 0xd677, 0xd678, 0xd679, 0xd67a, - 0xd67b, 0xd67c, 0xd67d, 0xd67e, 0xd680, 0xd681, 0xf6a5, 0xd682, - 0xd683, 0xd684, 0xd685, 0xd686, 0xd687, 0xd688, 0xd689, 0xd68a, - 0xd68b, 0xd68c, 0xd68d, 0xd68e, 0xd68f, 0xd690, 0xd691, 0xd692, - 0xd693, 0xd694, 0xd695, 0xd696, 0xd697, 0xd698, 0xd699, 0xd69a, - 0xd69b, 0xd69c, 0xd69d, 0xd69e, 0xd69f, 0xd6a0, 0xd740, 0xd741, - 0xd742, 0xd743, 0xd744, 0xd745, 0xd746, 0xd747, 0xd748, 0xd749, - 0xd74a, 0xd74b, 0xd74c, 0xd74d, 0xd74e, 0xd74f, 0xd750, 0xd751, - 0xd752, 0xd753, 0xd754, 0xd755, 0xd756, 0xd757, 0xd758, 0xd759, - 0xd75a, 0xd75b, 0xd75c, 0xd75d, 0xd75e, 0xd75f, 0xbeaf, 0xd760, - 0xd761, 0xd762, 0xd763, 0xd764, 0xc6a9, 0xd765, 0xd766, 0xd767, - 0xd768, 0xd769, 0xd76a, 0xd76b, 0xd76c, 0xd76d, 0xd76e, 0xd76f, - 0xd770, 0xd771, 0xd772, 0xd773, 0xd774, 0xd775, 0xd776, 0xd777, - 0xd778, 0xd779, 0xd77a, 0xd77b, 0xd77c, 0xd77d, 0xd77e, 0xd780, - 0xd781, 0xd782, 0xd783, 0xd784, 0xd785, 0xd786, 0xd787, 0xd788, - 0xd789, 0xd78a, 0xd78b, 0xd78c, 0xd78d, 0xd78e, 0xd78f, 0xd790, - 0xd791, 0xd792, 0xd793, 0xd794, 0xd795, 0xd796, 0xd797, 0xd798, - 0xdaa5, 0xbcc6, 0xb6a9, 0xb8bc, 0xc8cf, 0xbca5, 0xdaa6, 0xdaa7, - 0xccd6, 0xc8c3, 0xdaa8, 0xc6fd, 0xd799, 0xd1b5, 0xd2e9, 0xd1b6, - 0xbcc7, 0xd79a, 0xbdb2, 0xbbe4, 0xdaa9, 0xdaaa, 0xd1c8, 0xdaab, - 0xd0ed, 0xb6ef, 0xc2db, 0xd79b, 0xcbcf, 0xb7ed, 0xc9e8, 0xb7c3, - 0xbef7, 0xd6a4, 0xdaac, 0xdaad, 0xc6c0, 0xd7e7, 0xcab6, 0xd79c, - 0xd5a9, 0xcbdf, 0xd5ef, 0xdaae, 0xd6df, 0xb4ca, 0xdab0, 0xdaaf, - 0xd79d, 0xd2eb, 0xdab1, 0xdab2, 0xdab3, 0xcad4, 0xdab4, 0xcaab, - 0xdab5, 0xdab6, 0xb3cf, 0xd6ef, 0xdab7, 0xbbb0, 0xb5ae, 0xdab8, - 0xdab9, 0xb9ee, 0xd1af, 0xd2e8, 0xdaba, 0xb8c3, 0xcfea, 0xb2ef, - 0xdabb, 0xdabc, 0xd79e, 0xbdeb, 0xcedc, 0xd3ef, 0xdabd, 0xcef3, - 0xdabe, 0xd3d5, 0xbbe5, 0xdabf, 0xcbb5, 0xcbd0, 0xdac0, 0xc7eb, - 0xd6ee, 0xdac1, 0xc5b5, 0xb6c1, 0xdac2, 0xb7cc, 0xbfce, 0xdac3, - /* 0x8c00 .. 0x8cff */ - 0xdac4, 0xcbad, 0xdac5, 0xb5f7, 0xdac6, 0xc1c2, 0xd7bb, 0xdac7, - 0xccb8, 0xd79f, 0xd2ea, 0xc4b1, 0xdac8, 0xb5fd, 0xbbd1, 0xdac9, - 0xd0b3, 0xdaca, 0xdacb, 0xcebd, 0xdacc, 0xdacd, 0xdace, 0xb2f7, - 0xdad1, 0xdacf, 0xd1e8, 0xdad0, 0xc3d5, 0xdad2, 0xd7a0, 0xdad3, - 0xdad4, 0xdad5, 0xd0bb, 0xd2a5, 0xb0f9, 0xdad6, 0xc7ab, 0xdad7, - 0xbdf7, 0xc3a1, 0xdad8, 0xdad9, 0xc3fd, 0xccb7, 0xdada, 0xdadb, - 0xc0be, 0xc6d7, 0xdadc, 0xdadd, 0xc7b4, 0xdade, 0xdadf, 0xb9c8, - 0xd840, 0xd841, 0xd842, 0xd843, 0xd844, 0xd845, 0xd846, 0xd847, - 0xd848, 0xbbed, 0xd849, 0xd84a, 0xd84b, 0xd84c, 0xb6b9, 0xf4f8, - 0xd84d, 0xf4f9, 0xd84e, 0xd84f, 0xcde3, 0xd850, 0xd851, 0xd852, - 0xd853, 0xd854, 0xd855, 0xd856, 0xd857, 0xf5b9, 0xd858, 0xd859, - 0xd85a, 0xd85b, 0xebe0, 0xd85c, 0xd85d, 0xd85e, 0xd85f, 0xd860, - 0xd861, 0xcff3, 0xbbbf, 0xd862, 0xd863, 0xd864, 0xd865, 0xd866, - 0xd867, 0xd868, 0xbac0, 0xd4a5, 0xd869, 0xd86a, 0xd86b, 0xd86c, - 0xd86d, 0xd86e, 0xd86f, 0xe1d9, 0xd870, 0xd871, 0xd872, 0xd873, - 0xf5f4, 0xb1aa, 0xb2f2, 0xd874, 0xd875, 0xd876, 0xd877, 0xd878, - 0xd879, 0xd87a, 0xf5f5, 0xd87b, 0xd87c, 0xf5f7, 0xd87d, 0xd87e, - 0xd880, 0xbad1, 0xf5f6, 0xd881, 0xc3b2, 0xd882, 0xd883, 0xd884, - 0xd885, 0xd886, 0xd887, 0xd888, 0xf5f9, 0xd889, 0xd88a, 0xd88b, - 0xf5f8, 0xd88c, 0xd88d, 0xd88e, 0xd88f, 0xd890, 0xd891, 0xd892, - 0xd893, 0xd894, 0xd895, 0xd896, 0xd897, 0xd898, 0xd899, 0xd89a, - 0xd89b, 0xd89c, 0xd89d, 0xd89e, 0xd89f, 0xd8a0, 0xd940, 0xd941, - 0xd942, 0xd943, 0xd944, 0xd945, 0xd946, 0xd947, 0xd948, 0xd949, - 0xd94a, 0xd94b, 0xd94c, 0xd94d, 0xd94e, 0xd94f, 0xd950, 0xd951, - 0xd952, 0xd953, 0xd954, 0xd955, 0xd956, 0xd957, 0xd958, 0xd959, - 0xd95a, 0xd95b, 0xd95c, 0xd95d, 0xd95e, 0xd95f, 0xd960, 0xd961, - 0xd962, 0xd963, 0xd964, 0xd965, 0xd966, 0xd967, 0xd968, 0xd969, - 0xd96a, 0xd96b, 0xd96c, 0xd96d, 0xd96e, 0xd96f, 0xd970, 0xd971, - 0xd972, 0xd973, 0xd974, 0xd975, 0xd976, 0xd977, 0xd978, 0xd979, - 0xd97a, 0xd97b, 0xd97c, 0xd97d, 0xd97e, 0xd980, 0xd981, 0xd982, - 0xd983, 0xd984, 0xd985, 0xd986, 0xd987, 0xd988, 0xd989, 0xd98a, - 0xd98b, 0xd98c, 0xd98d, 0xd98e, 0xd98f, 0xd990, 0xd991, 0xd992, - /* 0x8d00 .. 0x8dff */ - 0xd993, 0xd994, 0xd995, 0xd996, 0xd997, 0xd998, 0xd999, 0xd99a, - 0xd99b, 0xd99c, 0xd99d, 0xd99e, 0xd99f, 0xd9a0, 0xda40, 0xda41, - 0xda42, 0xda43, 0xda44, 0xda45, 0xda46, 0xda47, 0xda48, 0xda49, - 0xda4a, 0xda4b, 0xda4c, 0xda4d, 0xda4e, 0xb1b4, 0xd5ea, 0xb8ba, - 0xda4f, 0xb9b1, 0xb2c6, 0xd4f0, 0xcfcd, 0xb0dc, 0xd5cb, 0xbbf5, - 0xd6ca, 0xb7b7, 0xccb0, 0xc6b6, 0xb1e1, 0xb9ba, 0xd6fc, 0xb9e1, - 0xb7a1, 0xbcfa, 0xeada, 0xeadb, 0xccf9, 0xb9f3, 0xeadc, 0xb4fb, - 0xc3b3, 0xb7d1, 0xbad8, 0xeadd, 0xd4f4, 0xeade, 0xbcd6, 0xbbdf, - 0xeadf, 0xc1de, 0xc2b8, 0xd4df, 0xd7ca, 0xeae0, 0xeae1, 0xeae4, - 0xeae2, 0xeae3, 0xc9de, 0xb8b3, 0xb6c4, 0xeae5, 0xcaea, 0xc9cd, - 0xb4cd, 0xda50, 0xda51, 0xe2d9, 0xc5e2, 0xeae6, 0xc0b5, 0xda52, - 0xd7b8, 0xeae7, 0xd7ac, 0xc8fc, 0xd8d3, 0xd8cd, 0xd4de, 0xda53, - 0xd4f9, 0xc9c4, 0xd3ae, 0xb8d3, 0xb3e0, 0xda54, 0xc9e2, 0xf4f6, - 0xda55, 0xda56, 0xda57, 0xbad5, 0xda58, 0xf4f7, 0xda59, 0xda5a, - 0xd7df, 0xda5b, 0xda5c, 0xf4f1, 0xb8b0, 0xd5d4, 0xb8cf, 0xc6f0, - 0xda5d, 0xda5e, 0xda5f, 0xda60, 0xda61, 0xda62, 0xda63, 0xda64, - 0xda65, 0xb3c3, 0xda66, 0xda67, 0xf4f2, 0xb3ac, 0xda68, 0xda69, - 0xda6a, 0xda6b, 0xd4bd, 0xc7f7, 0xda6c, 0xda6d, 0xda6e, 0xda6f, - 0xda70, 0xf4f4, 0xda71, 0xda72, 0xf4f3, 0xda73, 0xda74, 0xda75, - 0xda76, 0xda77, 0xda78, 0xda79, 0xda7a, 0xda7b, 0xda7c, 0xcccb, - 0xda7d, 0xda7e, 0xda80, 0xc8a4, 0xda81, 0xda82, 0xda83, 0xda84, - 0xda85, 0xda86, 0xda87, 0xda88, 0xda89, 0xda8a, 0xda8b, 0xda8c, - 0xda8d, 0xf4f5, 0xda8e, 0xd7e3, 0xc5bf, 0xf5c0, 0xda8f, 0xda90, - 0xf5bb, 0xda91, 0xf5c3, 0xda92, 0xf5c2, 0xda93, 0xd6ba, 0xf5c1, - 0xda94, 0xda95, 0xda96, 0xd4be, 0xf5c4, 0xda97, 0xf5cc, 0xda98, - 0xda99, 0xda9a, 0xda9b, 0xb0cf, 0xb5f8, 0xda9c, 0xf5c9, 0xf5ca, - 0xda9d, 0xc5dc, 0xda9e, 0xda9f, 0xdaa0, 0xdb40, 0xf5c5, 0xf5c6, - 0xdb41, 0xdb42, 0xf5c7, 0xf5cb, 0xdb43, 0xbee0, 0xf5c8, 0xb8fa, - 0xdb44, 0xdb45, 0xdb46, 0xf5d0, 0xf5d3, 0xdb47, 0xdb48, 0xdb49, - 0xbfe7, 0xdb4a, 0xb9f2, 0xf5bc, 0xf5cd, 0xdb4b, 0xdb4c, 0xc2b7, - 0xdb4d, 0xdb4e, 0xdb4f, 0xccf8, 0xdb50, 0xbcf9, 0xdb51, 0xf5ce, - 0xf5cf, 0xf5d1, 0xb6e5, 0xf5d2, 0xdb52, 0xf5d5, 0xdb53, 0xdb54, - /* 0x8e00 .. 0x8eff */ - 0xdb55, 0xdb56, 0xdb57, 0xdb58, 0xdb59, 0xf5bd, 0xdb5a, 0xdb5b, - 0xdb5c, 0xf5d4, 0xd3bb, 0xdb5d, 0xb3ec, 0xdb5e, 0xdb5f, 0xcca4, - 0xdb60, 0xdb61, 0xdb62, 0xdb63, 0xf5d6, 0xdb64, 0xdb65, 0xdb66, - 0xdb67, 0xdb68, 0xdb69, 0xdb6a, 0xdb6b, 0xf5d7, 0xbee1, 0xf5d8, - 0xdb6c, 0xdb6d, 0xccdf, 0xf5db, 0xdb6e, 0xdb6f, 0xdb70, 0xdb71, - 0xdb72, 0xb2c8, 0xd7d9, 0xdb73, 0xf5d9, 0xdb74, 0xf5da, 0xf5dc, - 0xdb75, 0xf5e2, 0xdb76, 0xdb77, 0xdb78, 0xf5e0, 0xdb79, 0xdb7a, - 0xdb7b, 0xf5df, 0xf5dd, 0xdb7c, 0xdb7d, 0xf5e1, 0xdb7e, 0xdb80, - 0xf5de, 0xf5e4, 0xf5e5, 0xdb81, 0xcce3, 0xdb82, 0xdb83, 0xe5bf, - 0xb5b8, 0xf5e3, 0xf5e8, 0xcca3, 0xdb84, 0xdb85, 0xdb86, 0xdb87, - 0xdb88, 0xf5e6, 0xf5e7, 0xdb89, 0xdb8a, 0xdb8b, 0xdb8c, 0xdb8d, - 0xdb8e, 0xf5be, 0xdb8f, 0xdb90, 0xdb91, 0xdb92, 0xdb93, 0xdb94, - 0xdb95, 0xdb96, 0xdb97, 0xdb98, 0xdb99, 0xdb9a, 0xb1c4, 0xdb9b, - 0xdb9c, 0xf5bf, 0xdb9d, 0xdb9e, 0xb5c5, 0xb2e4, 0xdb9f, 0xf5ec, - 0xf5e9, 0xdba0, 0xb6d7, 0xdc40, 0xf5ed, 0xdc41, 0xf5ea, 0xdc42, - 0xdc43, 0xdc44, 0xdc45, 0xdc46, 0xf5eb, 0xdc47, 0xdc48, 0xb4da, - 0xdc49, 0xd4ea, 0xdc4a, 0xdc4b, 0xdc4c, 0xf5ee, 0xdc4d, 0xb3f9, - 0xdc4e, 0xdc4f, 0xdc50, 0xdc51, 0xdc52, 0xdc53, 0xdc54, 0xf5ef, - 0xf5f1, 0xdc55, 0xdc56, 0xdc57, 0xf5f0, 0xdc58, 0xdc59, 0xdc5a, - 0xdc5b, 0xdc5c, 0xdc5d, 0xdc5e, 0xf5f2, 0xdc5f, 0xf5f3, 0xdc60, - 0xdc61, 0xdc62, 0xdc63, 0xdc64, 0xdc65, 0xdc66, 0xdc67, 0xdc68, - 0xdc69, 0xdc6a, 0xdc6b, 0xc9ed, 0xb9aa, 0xdc6c, 0xdc6d, 0xc7fb, - 0xdc6e, 0xdc6f, 0xb6e3, 0xdc70, 0xdc71, 0xdc72, 0xdc73, 0xdc74, - 0xdc75, 0xdc76, 0xccc9, 0xdc77, 0xdc78, 0xdc79, 0xdc7a, 0xdc7b, - 0xdc7c, 0xdc7d, 0xdc7e, 0xdc80, 0xdc81, 0xdc82, 0xdc83, 0xdc84, - 0xdc85, 0xdc86, 0xdc87, 0xdc88, 0xdc89, 0xdc8a, 0xeaa6, 0xdc8b, - 0xdc8c, 0xdc8d, 0xdc8e, 0xdc8f, 0xdc90, 0xdc91, 0xdc92, 0xdc93, - 0xdc94, 0xdc95, 0xdc96, 0xdc97, 0xdc98, 0xdc99, 0xdc9a, 0xdc9b, - 0xdc9c, 0xdc9d, 0xdc9e, 0xdc9f, 0xdca0, 0xdd40, 0xdd41, 0xdd42, - 0xdd43, 0xdd44, 0xdd45, 0xdd46, 0xdd47, 0xdd48, 0xdd49, 0xdd4a, - 0xdd4b, 0xdd4c, 0xdd4d, 0xdd4e, 0xdd4f, 0xdd50, 0xdd51, 0xdd52, - 0xdd53, 0xdd54, 0xdd55, 0xdd56, 0xdd57, 0xdd58, 0xdd59, 0xdd5a, - /* 0x8f00 .. 0x8fff */ - 0xdd5b, 0xdd5c, 0xdd5d, 0xdd5e, 0xdd5f, 0xdd60, 0xdd61, 0xdd62, - 0xdd63, 0xdd64, 0xdd65, 0xdd66, 0xdd67, 0xdd68, 0xdd69, 0xdd6a, - 0xdd6b, 0xdd6c, 0xdd6d, 0xdd6e, 0xdd6f, 0xdd70, 0xdd71, 0xdd72, - 0xdd73, 0xdd74, 0xdd75, 0xdd76, 0xdd77, 0xdd78, 0xdd79, 0xdd7a, - 0xdd7b, 0xdd7c, 0xdd7d, 0xdd7e, 0xdd80, 0xdd81, 0xdd82, 0xdd83, - 0xdd84, 0xdd85, 0xdd86, 0xdd87, 0xdd88, 0xdd89, 0xdd8a, 0xdd8b, - 0xdd8c, 0xdd8d, 0xdd8e, 0xdd8f, 0xdd90, 0xdd91, 0xdd92, 0xdd93, - 0xdd94, 0xdd95, 0xdd96, 0xdd97, 0xdd98, 0xdd99, 0xdd9a, 0xdd9b, - 0xdd9c, 0xdd9d, 0xdd9e, 0xdd9f, 0xdda0, 0xde40, 0xde41, 0xde42, - 0xde43, 0xde44, 0xde45, 0xde46, 0xde47, 0xde48, 0xde49, 0xde4a, - 0xde4b, 0xde4c, 0xde4d, 0xde4e, 0xde4f, 0xde50, 0xde51, 0xde52, - 0xde53, 0xde54, 0xde55, 0xde56, 0xde57, 0xde58, 0xde59, 0xde5a, - 0xde5b, 0xde5c, 0xde5d, 0xde5e, 0xde5f, 0xde60, 0xb3b5, 0xd4fe, - 0xb9ec, 0xd0f9, 0xde61, 0xe9ed, 0xd7aa, 0xe9ee, 0xc2d6, 0xc8ed, - 0xbae4, 0xe9ef, 0xe9f0, 0xe9f1, 0xd6e1, 0xe9f2, 0xe9f3, 0xe9f5, - 0xe9f4, 0xe9f6, 0xe9f7, 0xc7e1, 0xe9f8, 0xd4d8, 0xe9f9, 0xbdce, - 0xde62, 0xe9fa, 0xe9fb, 0xbdcf, 0xe9fc, 0xb8a8, 0xc1be, 0xe9fd, - 0xb1b2, 0xbbd4, 0xb9f5, 0xe9fe, 0xde63, 0xeaa1, 0xeaa2, 0xeaa3, - 0xb7f8, 0xbcad, 0xde64, 0xcae4, 0xe0ce, 0xd4af, 0xcfbd, 0xd5b7, - 0xeaa4, 0xd5de, 0xeaa5, 0xd0c1, 0xb9bc, 0xde65, 0xb4c7, 0xb1d9, - 0xde66, 0xde67, 0xde68, 0xc0b1, 0xde69, 0xde6a, 0xde6b, 0xde6c, - 0xb1e6, 0xb1e7, 0xde6d, 0xb1e8, 0xde6e, 0xde6f, 0xde70, 0xde71, - 0xb3bd, 0xc8e8, 0xde72, 0xde73, 0xde74, 0xde75, 0xe5c1, 0xde76, - 0xde77, 0xb1df, 0xde78, 0xde79, 0xde7a, 0xc1c9, 0xb4ef, 0xde7b, - 0xde7c, 0xc7a8, 0xd3d8, 0xde7d, 0xc6f9, 0xd1b8, 0xde7e, 0xb9fd, - 0xc2f5, 0xde80, 0xde81, 0xde82, 0xde83, 0xde84, 0xd3ad, 0xde85, - 0xd4cb, 0xbdfc, 0xde86, 0xe5c2, 0xb7b5, 0xe5c3, 0xde87, 0xde88, - 0xbbb9, 0xd5e2, 0xde89, 0xbdf8, 0xd4b6, 0xcea5, 0xc1ac, 0xb3d9, - 0xde8a, 0xde8b, 0xccf6, 0xde8c, 0xe5c6, 0xe5c4, 0xe5c8, 0xde8d, - 0xe5ca, 0xe5c7, 0xb5cf, 0xc6c8, 0xde8e, 0xb5fc, 0xe5c5, 0xde8f, - 0xcaf6, 0xde90, 0xde91, 0xe5c9, 0xde92, 0xde93, 0xde94, 0xc3d4, - 0xb1c5, 0xbca3, 0xde95, 0xde96, 0xde97, 0xd7b7, 0xde98, 0xde99, - /* 0x9000 .. 0x90ff */ - 0xcdcb, 0xcbcd, 0xcaca, 0xccd3, 0xe5cc, 0xe5cb, 0xc4e6, 0xde9a, - 0xde9b, 0xd1a1, 0xd1b7, 0xe5cd, 0xde9c, 0xe5d0, 0xde9d, 0xcdb8, - 0xd6f0, 0xe5cf, 0xb5dd, 0xde9e, 0xcdbe, 0xde9f, 0xe5d1, 0xb6ba, - 0xdea0, 0xdf40, 0xcda8, 0xb9e4, 0xdf41, 0xcac5, 0xb3d1, 0xcbd9, - 0xd4ec, 0xe5d2, 0xb7ea, 0xdf42, 0xdf43, 0xdf44, 0xe5ce, 0xdf45, - 0xdf46, 0xdf47, 0xdf48, 0xdf49, 0xdf4a, 0xe5d5, 0xb4fe, 0xe5d6, - 0xdf4b, 0xdf4c, 0xdf4d, 0xdf4e, 0xdf4f, 0xe5d3, 0xe5d4, 0xdf50, - 0xd2dd, 0xdf51, 0xdf52, 0xc2df, 0xb1c6, 0xdf53, 0xd3e2, 0xdf54, - 0xdf55, 0xb6dd, 0xcbec, 0xdf56, 0xe5d7, 0xdf57, 0xdf58, 0xd3f6, - 0xdf59, 0xdf5a, 0xdf5b, 0xdf5c, 0xdf5d, 0xb1e9, 0xdf5e, 0xb6f4, - 0xe5da, 0xe5d8, 0xe5d9, 0xb5c0, 0xdf5f, 0xdf60, 0xdf61, 0xd2c5, - 0xe5dc, 0xdf62, 0xdf63, 0xe5de, 0xdf64, 0xdf65, 0xdf66, 0xdf67, - 0xdf68, 0xdf69, 0xe5dd, 0xc7b2, 0xdf6a, 0xd2a3, 0xdf6b, 0xdf6c, - 0xe5db, 0xdf6d, 0xdf6e, 0xdf6f, 0xdf70, 0xd4e2, 0xd5da, 0xdf71, - 0xdf72, 0xdf73, 0xdf74, 0xdf75, 0xe5e0, 0xd7f1, 0xdf76, 0xdf77, - 0xdf78, 0xdf79, 0xdf7a, 0xdf7b, 0xdf7c, 0xe5e1, 0xdf7d, 0xb1dc, - 0xd1fb, 0xdf7e, 0xe5e2, 0xe5e4, 0xdf80, 0xdf81, 0xdf82, 0xdf83, - 0xe5e3, 0xdf84, 0xdf85, 0xe5e5, 0xdf86, 0xdf87, 0xdf88, 0xdf89, - 0xdf8a, 0xd2d8, 0xdf8b, 0xb5cb, 0xdf8c, 0xe7df, 0xdf8d, 0xdaf5, - 0xdf8e, 0xdaf8, 0xdf8f, 0xdaf6, 0xdf90, 0xdaf7, 0xdf91, 0xdf92, - 0xdf93, 0xdafa, 0xd0cf, 0xc4c7, 0xdf94, 0xdf95, 0xb0ee, 0xdf96, - 0xdf97, 0xdf98, 0xd0b0, 0xdf99, 0xdaf9, 0xdf9a, 0xd3ca, 0xbaaa, - 0xdba2, 0xc7f1, 0xdf9b, 0xdafc, 0xdafb, 0xc9db, 0xdafd, 0xdf9c, - 0xdba1, 0xd7de, 0xdafe, 0xc1da, 0xdf9d, 0xdf9e, 0xdba5, 0xdf9f, - 0xdfa0, 0xd3f4, 0xe040, 0xe041, 0xdba7, 0xdba4, 0xe042, 0xdba8, - 0xe043, 0xe044, 0xbdbc, 0xe045, 0xe046, 0xe047, 0xc0c9, 0xdba3, - 0xdba6, 0xd6a3, 0xe048, 0xdba9, 0xe049, 0xe04a, 0xe04b, 0xdbad, - 0xe04c, 0xe04d, 0xe04e, 0xdbae, 0xdbac, 0xbac2, 0xe04f, 0xe050, - 0xe051, 0xbfa4, 0xdbab, 0xe052, 0xe053, 0xe054, 0xdbaa, 0xd4c7, - 0xb2bf, 0xe055, 0xe056, 0xdbaf, 0xe057, 0xb9f9, 0xe058, 0xdbb0, - 0xe059, 0xe05a, 0xe05b, 0xe05c, 0xb3bb, 0xe05d, 0xe05e, 0xe05f, - 0xb5a6, 0xe060, 0xe061, 0xe062, 0xe063, 0xb6bc, 0xdbb1, 0xe064, - /* 0x9100 .. 0x91ff */ - 0xe065, 0xe066, 0xb6f5, 0xe067, 0xdbb2, 0xe068, 0xe069, 0xe06a, - 0xe06b, 0xe06c, 0xe06d, 0xe06e, 0xe06f, 0xe070, 0xe071, 0xe072, - 0xe073, 0xe074, 0xe075, 0xe076, 0xe077, 0xe078, 0xe079, 0xe07a, - 0xe07b, 0xb1c9, 0xe07c, 0xe07d, 0xe07e, 0xe080, 0xdbb4, 0xe081, - 0xe082, 0xe083, 0xdbb3, 0xdbb5, 0xe084, 0xe085, 0xe086, 0xe087, - 0xe088, 0xe089, 0xe08a, 0xe08b, 0xe08c, 0xe08d, 0xe08e, 0xdbb7, - 0xe08f, 0xdbb6, 0xe090, 0xe091, 0xe092, 0xe093, 0xe094, 0xe095, - 0xe096, 0xdbb8, 0xe097, 0xe098, 0xe099, 0xe09a, 0xe09b, 0xe09c, - 0xe09d, 0xe09e, 0xe09f, 0xdbb9, 0xe0a0, 0xe140, 0xdbba, 0xe141, - 0xe142, 0xd3cf, 0xf4fa, 0xc7f5, 0xd7c3, 0xc5e4, 0xf4fc, 0xf4fd, - 0xf4fb, 0xe143, 0xbec6, 0xe144, 0xe145, 0xe146, 0xe147, 0xd0ef, - 0xe148, 0xe149, 0xb7d3, 0xe14a, 0xe14b, 0xd4cd, 0xccaa, 0xe14c, - 0xe14d, 0xf5a2, 0xf5a1, 0xbaa8, 0xf4fe, 0xcbd6, 0xe14e, 0xe14f, - 0xe150, 0xf5a4, 0xc0d2, 0xe151, 0xb3ea, 0xe152, 0xcdaa, 0xf5a5, - 0xf5a3, 0xbdb4, 0xf5a8, 0xe153, 0xf5a9, 0xbdcd, 0xc3b8, 0xbfe1, - 0xcbe1, 0xf5aa, 0xe154, 0xe155, 0xe156, 0xf5a6, 0xf5a7, 0xc4f0, - 0xe157, 0xe158, 0xe159, 0xe15a, 0xe15b, 0xf5ac, 0xe15c, 0xb4bc, - 0xe15d, 0xd7ed, 0xe15e, 0xb4d7, 0xf5ab, 0xf5ae, 0xe15f, 0xe160, - 0xf5ad, 0xf5af, 0xd0d1, 0xe161, 0xe162, 0xe163, 0xe164, 0xe165, - 0xe166, 0xe167, 0xc3d1, 0xc8a9, 0xe168, 0xe169, 0xe16a, 0xe16b, - 0xe16c, 0xe16d, 0xf5b0, 0xf5b1, 0xe16e, 0xe16f, 0xe170, 0xe171, - 0xe172, 0xe173, 0xf5b2, 0xe174, 0xe175, 0xf5b3, 0xf5b4, 0xf5b5, - 0xe176, 0xe177, 0xe178, 0xe179, 0xf5b7, 0xf5b6, 0xe17a, 0xe17b, - 0xe17c, 0xe17d, 0xf5b8, 0xe17e, 0xe180, 0xe181, 0xe182, 0xe183, - 0xe184, 0xe185, 0xe186, 0xe187, 0xe188, 0xe189, 0xe18a, 0xb2c9, - 0xe18b, 0xd3d4, 0xcacd, 0xe18c, 0xc0ef, 0xd6d8, 0xd2b0, 0xc1bf, - 0xe18d, 0xbdf0, 0xe18e, 0xe18f, 0xe190, 0xe191, 0xe192, 0xe193, - 0xe194, 0xe195, 0xe196, 0xe197, 0xb8aa, 0xe198, 0xe199, 0xe19a, - 0xe19b, 0xe19c, 0xe19d, 0xe19e, 0xe19f, 0xe1a0, 0xe240, 0xe241, - 0xe242, 0xe243, 0xe244, 0xe245, 0xe246, 0xe247, 0xe248, 0xe249, - 0xe24a, 0xe24b, 0xe24c, 0xe24d, 0xe24e, 0xe24f, 0xe250, 0xe251, - 0xe252, 0xe253, 0xe254, 0xe255, 0xe256, 0xe257, 0xe258, 0xe259, - /* 0x9200 .. 0x92ff */ - 0xe25a, 0xe25b, 0xe25c, 0xe25d, 0xe25e, 0xe25f, 0xe260, 0xe261, - 0xe262, 0xe263, 0xe264, 0xe265, 0xe266, 0xe267, 0xe268, 0xe269, - 0xe26a, 0xe26b, 0xe26c, 0xe26d, 0xe26e, 0xe26f, 0xe270, 0xe271, - 0xe272, 0xe273, 0xe274, 0xe275, 0xe276, 0xe277, 0xe278, 0xe279, - 0xe27a, 0xe27b, 0xe27c, 0xe27d, 0xe27e, 0xe280, 0xe281, 0xe282, - 0xe283, 0xe284, 0xe285, 0xe286, 0xe287, 0xe288, 0xe289, 0xe28a, - 0xe28b, 0xe28c, 0xe28d, 0xe28e, 0xe28f, 0xe290, 0xe291, 0xe292, - 0xe293, 0xe294, 0xe295, 0xe296, 0xe297, 0xe298, 0xe299, 0xe29a, - 0xe29b, 0xe29c, 0xe29d, 0xe29e, 0xe29f, 0xe2a0, 0xe340, 0xe341, - 0xe342, 0xe343, 0xe344, 0xe345, 0xe346, 0xe347, 0xe348, 0xe349, - 0xe34a, 0xe34b, 0xe34c, 0xe34d, 0xe34e, 0xe34f, 0xe350, 0xe351, - 0xe352, 0xe353, 0xe354, 0xe355, 0xe356, 0xe357, 0xe358, 0xe359, - 0xe35a, 0xe35b, 0xe35c, 0xe35d, 0xe35e, 0xe35f, 0xe360, 0xe361, - 0xe362, 0xe363, 0xe364, 0xe365, 0xe366, 0xe367, 0xe368, 0xe369, - 0xe36a, 0xe36b, 0xe36c, 0xe36d, 0xbcf8, 0xe36e, 0xe36f, 0xe370, - 0xe371, 0xe372, 0xe373, 0xe374, 0xe375, 0xe376, 0xe377, 0xe378, - 0xe379, 0xe37a, 0xe37b, 0xe37c, 0xe37d, 0xe37e, 0xe380, 0xe381, - 0xe382, 0xe383, 0xe384, 0xe385, 0xe386, 0xe387, 0xf6c6, 0xe388, - 0xe389, 0xe38a, 0xe38b, 0xe38c, 0xe38d, 0xe38e, 0xe38f, 0xe390, - 0xe391, 0xe392, 0xe393, 0xe394, 0xe395, 0xe396, 0xe397, 0xe398, - 0xe399, 0xe39a, 0xe39b, 0xe39c, 0xe39d, 0xe39e, 0xe39f, 0xe3a0, - 0xe440, 0xe441, 0xe442, 0xe443, 0xe444, 0xe445, 0xf6c7, 0xe446, - 0xe447, 0xe448, 0xe449, 0xe44a, 0xe44b, 0xe44c, 0xe44d, 0xe44e, - 0xe44f, 0xe450, 0xe451, 0xe452, 0xe453, 0xe454, 0xe455, 0xe456, - 0xe457, 0xe458, 0xe459, 0xe45a, 0xe45b, 0xe45c, 0xe45d, 0xe45e, - 0xf6c8, 0xe45f, 0xe460, 0xe461, 0xe462, 0xe463, 0xe464, 0xe465, - 0xe466, 0xe467, 0xe468, 0xe469, 0xe46a, 0xe46b, 0xe46c, 0xe46d, - 0xe46e, 0xe46f, 0xe470, 0xe471, 0xe472, 0xe473, 0xe474, 0xe475, - 0xe476, 0xe477, 0xe478, 0xe479, 0xe47a, 0xe47b, 0xe47c, 0xe47d, - 0xe47e, 0xe480, 0xe481, 0xe482, 0xe483, 0xe484, 0xe485, 0xe486, - 0xe487, 0xe488, 0xe489, 0xe48a, 0xe48b, 0xe48c, 0xe48d, 0xe48e, - 0xe48f, 0xe490, 0xe491, 0xe492, 0xe493, 0xe494, 0xe495, 0xe496, - /* 0x9300 .. 0x93ff */ - 0xe497, 0xe498, 0xe499, 0xe49a, 0xe49b, 0xe49c, 0xe49d, 0xe49e, - 0xe49f, 0xe4a0, 0xe540, 0xe541, 0xe542, 0xe543, 0xe544, 0xe545, - 0xe546, 0xe547, 0xe548, 0xe549, 0xe54a, 0xe54b, 0xe54c, 0xe54d, - 0xe54e, 0xe54f, 0xe550, 0xe551, 0xe552, 0xe553, 0xe554, 0xe555, - 0xe556, 0xe557, 0xe558, 0xe559, 0xe55a, 0xe55b, 0xe55c, 0xe55d, - 0xe55e, 0xe55f, 0xe560, 0xe561, 0xe562, 0xe563, 0xe564, 0xe565, - 0xe566, 0xe567, 0xe568, 0xe569, 0xe56a, 0xe56b, 0xe56c, 0xe56d, - 0xe56e, 0xe56f, 0xe570, 0xe571, 0xe572, 0xe573, 0xf6c9, 0xe574, - 0xe575, 0xe576, 0xe577, 0xe578, 0xe579, 0xe57a, 0xe57b, 0xe57c, - 0xe57d, 0xe57e, 0xe580, 0xe581, 0xe582, 0xe583, 0xe584, 0xe585, - 0xe586, 0xe587, 0xe588, 0xe589, 0xe58a, 0xe58b, 0xe58c, 0xe58d, - 0xe58e, 0xe58f, 0xe590, 0xe591, 0xe592, 0xe593, 0xe594, 0xe595, - 0xe596, 0xe597, 0xe598, 0xe599, 0xe59a, 0xe59b, 0xe59c, 0xe59d, - 0xe59e, 0xe59f, 0xf6ca, 0xe5a0, 0xe640, 0xe641, 0xe642, 0xe643, - 0xe644, 0xe645, 0xe646, 0xe647, 0xe648, 0xe649, 0xe64a, 0xe64b, - 0xe64c, 0xe64d, 0xe64e, 0xe64f, 0xe650, 0xe651, 0xe652, 0xe653, - 0xe654, 0xe655, 0xe656, 0xe657, 0xe658, 0xe659, 0xe65a, 0xe65b, - 0xe65c, 0xe65d, 0xe65e, 0xe65f, 0xe660, 0xe661, 0xe662, 0xf6cc, - 0xe663, 0xe664, 0xe665, 0xe666, 0xe667, 0xe668, 0xe669, 0xe66a, - 0xe66b, 0xe66c, 0xe66d, 0xe66e, 0xe66f, 0xe670, 0xe671, 0xe672, - 0xe673, 0xe674, 0xe675, 0xe676, 0xe677, 0xe678, 0xe679, 0xe67a, - 0xe67b, 0xe67c, 0xe67d, 0xe67e, 0xe680, 0xe681, 0xe682, 0xe683, - 0xe684, 0xe685, 0xe686, 0xe687, 0xe688, 0xe689, 0xe68a, 0xe68b, - 0xe68c, 0xe68d, 0xe68e, 0xe68f, 0xe690, 0xe691, 0xe692, 0xe693, - 0xe694, 0xe695, 0xe696, 0xe697, 0xe698, 0xe699, 0xe69a, 0xe69b, - 0xe69c, 0xe69d, 0xf6cb, 0xe69e, 0xe69f, 0xe6a0, 0xe740, 0xe741, - 0xe742, 0xe743, 0xe744, 0xe745, 0xe746, 0xe747, 0xf7e9, 0xe748, - 0xe749, 0xe74a, 0xe74b, 0xe74c, 0xe74d, 0xe74e, 0xe74f, 0xe750, - 0xe751, 0xe752, 0xe753, 0xe754, 0xe755, 0xe756, 0xe757, 0xe758, - 0xe759, 0xe75a, 0xe75b, 0xe75c, 0xe75d, 0xe75e, 0xe75f, 0xe760, - 0xe761, 0xe762, 0xe763, 0xe764, 0xe765, 0xe766, 0xe767, 0xe768, - 0xe769, 0xe76a, 0xe76b, 0xe76c, 0xe76d, 0xe76e, 0xe76f, 0xe770, - /* 0x9400 .. 0x94ff */ - 0xe771, 0xe772, 0xe773, 0xe774, 0xe775, 0xe776, 0xe777, 0xe778, - 0xe779, 0xe77a, 0xe77b, 0xe77c, 0xe77d, 0xe77e, 0xe780, 0xe781, - 0xe782, 0xe783, 0xe784, 0xe785, 0xe786, 0xe787, 0xe788, 0xe789, - 0xe78a, 0xe78b, 0xe78c, 0xe78d, 0xe78e, 0xe78f, 0xe790, 0xe791, - 0xe792, 0xe793, 0xe794, 0xe795, 0xe796, 0xe797, 0xe798, 0xe799, - 0xe79a, 0xe79b, 0xe79c, 0xe79d, 0xe79e, 0xe79f, 0xe7a0, 0xe840, - 0xe841, 0xe842, 0xe843, 0xe844, 0xe845, 0xe846, 0xe847, 0xe848, - 0xe849, 0xe84a, 0xe84b, 0xe84c, 0xe84d, 0xe84e, 0xf6cd, 0xe84f, - 0xe850, 0xe851, 0xe852, 0xe853, 0xe854, 0xe855, 0xe856, 0xe857, - 0xe858, 0xe859, 0xe85a, 0xe85b, 0xe85c, 0xe85d, 0xe85e, 0xe85f, - 0xe860, 0xe861, 0xe862, 0xe863, 0xe864, 0xe865, 0xe866, 0xe867, - 0xe868, 0xe869, 0xe86a, 0xe86b, 0xe86c, 0xe86d, 0xe86e, 0xe86f, - 0xe870, 0xe871, 0xe872, 0xe873, 0xe874, 0xe875, 0xe876, 0xe877, - 0xe878, 0xe879, 0xe87a, 0xf6ce, 0xe87b, 0xe87c, 0xe87d, 0xe87e, - 0xe880, 0xe881, 0xe882, 0xe883, 0xe884, 0xe885, 0xe886, 0xe887, - 0xe888, 0xe889, 0xe88a, 0xe88b, 0xe88c, 0xe88d, 0xe88e, 0xe88f, - 0xe890, 0xe891, 0xe892, 0xe893, 0xe894, 0xeec4, 0xeec5, 0xeec6, - 0xd5eb, 0xb6a4, 0xeec8, 0xeec7, 0xeec9, 0xeeca, 0xc7a5, 0xeecb, - 0xeecc, 0xe895, 0xb7b0, 0xb5f6, 0xeecd, 0xeecf, 0xe896, 0xeece, - 0xe897, 0xb8c6, 0xeed0, 0xeed1, 0xeed2, 0xb6db, 0xb3ae, 0xd6d3, - 0xc4c6, 0xb1b5, 0xb8d6, 0xeed3, 0xeed4, 0xd4bf, 0xc7d5, 0xbefb, - 0xced9, 0xb9b3, 0xeed6, 0xeed5, 0xeed8, 0xeed7, 0xc5a5, 0xeed9, - 0xeeda, 0xc7ae, 0xeedb, 0xc7af, 0xeedc, 0xb2a7, 0xeedd, 0xeede, - 0xeedf, 0xeee0, 0xeee1, 0xd7ea, 0xeee2, 0xeee3, 0xbcd8, 0xeee4, - 0xd3cb, 0xccfa, 0xb2ac, 0xc1e5, 0xeee5, 0xc7a6, 0xc3ad, 0xe898, - 0xeee6, 0xeee7, 0xeee8, 0xeee9, 0xeeea, 0xeeeb, 0xeeec, 0xe899, - 0xeeed, 0xeeee, 0xeeef, 0xe89a, 0xe89b, 0xeef0, 0xeef1, 0xeef2, - 0xeef4, 0xeef3, 0xe89c, 0xeef5, 0xcdad, 0xc2c1, 0xeef6, 0xeef7, - 0xeef8, 0xd5a1, 0xeef9, 0xcfb3, 0xeefa, 0xeefb, 0xe89d, 0xeefc, - 0xeefd, 0xefa1, 0xeefe, 0xefa2, 0xb8f5, 0xc3fa, 0xefa3, 0xefa4, - 0xbdc2, 0xd2bf, 0xb2f9, 0xefa5, 0xefa6, 0xefa7, 0xd2f8, 0xefa8, - 0xd6fd, 0xefa9, 0xc6cc, 0xe89e, 0xefaa, 0xefab, 0xc1b4, 0xefac, - /* 0x9500 .. 0x95ff */ - 0xcffa, 0xcbf8, 0xefae, 0xefad, 0xb3fa, 0xb9f8, 0xefaf, 0xefb0, - 0xd0e2, 0xefb1, 0xefb2, 0xb7e6, 0xd0bf, 0xefb3, 0xefb4, 0xefb5, - 0xc8f1, 0xcce0, 0xefb6, 0xefb7, 0xefb8, 0xefb9, 0xefba, 0xd5e0, - 0xefbb, 0xb4ed, 0xc3aa, 0xefbc, 0xe89f, 0xefbd, 0xefbe, 0xefbf, - 0xe8a0, 0xcefd, 0xefc0, 0xc2e0, 0xb4b8, 0xd7b6, 0xbdf5, 0xe940, - 0xcfc7, 0xefc3, 0xefc1, 0xefc2, 0xefc4, 0xb6a7, 0xbcfc, 0xbee2, - 0xc3cc, 0xefc5, 0xefc6, 0xe941, 0xefc7, 0xefcf, 0xefc8, 0xefc9, - 0xefca, 0xc7c2, 0xeff1, 0xb6cd, 0xefcb, 0xe942, 0xefcc, 0xefcd, - 0xb6c6, 0xc3be, 0xefce, 0xe943, 0xefd0, 0xefd1, 0xefd2, 0xd5f2, - 0xe944, 0xefd3, 0xc4f7, 0xe945, 0xefd4, 0xc4f8, 0xefd5, 0xefd6, - 0xb8e4, 0xb0f7, 0xefd7, 0xefd8, 0xefd9, 0xe946, 0xefda, 0xefdb, - 0xefdc, 0xefdd, 0xe947, 0xefde, 0xbeb5, 0xefe1, 0xefdf, 0xefe0, - 0xe948, 0xefe2, 0xefe3, 0xc1cd, 0xefe4, 0xefe5, 0xefe6, 0xefe7, - 0xefe8, 0xefe9, 0xefea, 0xefeb, 0xefec, 0xc0d8, 0xe949, 0xefed, - 0xc1ad, 0xefee, 0xefef, 0xeff0, 0xe94a, 0xe94b, 0xcfe2, 0xe94c, - 0xe94d, 0xe94e, 0xe94f, 0xe950, 0xe951, 0xe952, 0xe953, 0xb3a4, - 0xe954, 0xe955, 0xe956, 0xe957, 0xe958, 0xe959, 0xe95a, 0xe95b, - 0xe95c, 0xe95d, 0xe95e, 0xe95f, 0xe960, 0xe961, 0xe962, 0xe963, - 0xe964, 0xe965, 0xe966, 0xe967, 0xe968, 0xe969, 0xe96a, 0xe96b, - 0xe96c, 0xe96d, 0xe96e, 0xe96f, 0xe970, 0xe971, 0xe972, 0xe973, - 0xe974, 0xe975, 0xe976, 0xe977, 0xe978, 0xe979, 0xe97a, 0xe97b, - 0xe97c, 0xe97d, 0xe97e, 0xe980, 0xe981, 0xe982, 0xe983, 0xe984, - 0xe985, 0xe986, 0xe987, 0xe988, 0xe989, 0xe98a, 0xe98b, 0xe98c, - 0xe98d, 0xe98e, 0xe98f, 0xe990, 0xe991, 0xe992, 0xe993, 0xe994, - 0xe995, 0xe996, 0xe997, 0xe998, 0xe999, 0xe99a, 0xe99b, 0xe99c, - 0xe99d, 0xe99e, 0xe99f, 0xe9a0, 0xea40, 0xea41, 0xea42, 0xea43, - 0xea44, 0xea45, 0xea46, 0xea47, 0xea48, 0xea49, 0xea4a, 0xea4b, - 0xea4c, 0xea4d, 0xea4e, 0xea4f, 0xea50, 0xea51, 0xea52, 0xea53, - 0xea54, 0xea55, 0xea56, 0xea57, 0xea58, 0xea59, 0xea5a, 0xea5b, - 0xc3c5, 0xe3c5, 0xc9c1, 0xe3c6, 0xea5c, 0xb1d5, 0xceca, 0xb4b3, - 0xc8f2, 0xe3c7, 0xcfd0, 0xe3c8, 0xbce4, 0xe3c9, 0xe3ca, 0xc3c6, - 0xd5a2, 0xc4d6, 0xb9eb, 0xcec5, 0xe3cb, 0xc3f6, 0xe3cc, 0xea5d, - /* 0x9600 .. 0x96ff */ - 0xb7a7, 0xb8f3, 0xbad2, 0xe3cd, 0xe3ce, 0xd4c4, 0xe3cf, 0xea5e, - 0xe3d0, 0xd1cb, 0xe3d1, 0xe3d2, 0xe3d3, 0xe3d4, 0xd1d6, 0xe3d5, - 0xb2fb, 0xc0bb, 0xe3d6, 0xea5f, 0xc0ab, 0xe3d7, 0xe3d8, 0xe3d9, - 0xea60, 0xe3da, 0xe3db, 0xea61, 0xb8b7, 0xdae2, 0xea62, 0xb6d3, - 0xea63, 0xdae4, 0xdae3, 0xea64, 0xea65, 0xea66, 0xea67, 0xea68, - 0xea69, 0xea6a, 0xdae6, 0xea6b, 0xea6c, 0xea6d, 0xc8ee, 0xea6e, - 0xea6f, 0xdae5, 0xb7c0, 0xd1f4, 0xd2f5, 0xd5f3, 0xbdd7, 0xea70, - 0xea71, 0xea72, 0xea73, 0xd7e8, 0xdae8, 0xdae7, 0xea74, 0xb0a2, - 0xcdd3, 0xea75, 0xdae9, 0xea76, 0xb8bd, 0xbcca, 0xc2bd, 0xc2a4, - 0xb3c2, 0xdaea, 0xea77, 0xc2aa, 0xc4b0, 0xbdb5, 0xea78, 0xea79, - 0xcfde, 0xea7a, 0xea7b, 0xea7c, 0xdaeb, 0xc9c2, 0xea7d, 0xea7e, - 0xea80, 0xea81, 0xea82, 0xb1dd, 0xea83, 0xea84, 0xea85, 0xdaec, - 0xea86, 0xb6b8, 0xd4ba, 0xea87, 0xb3fd, 0xea88, 0xea89, 0xdaed, - 0xd4c9, 0xcfd5, 0xc5e3, 0xea8a, 0xdaee, 0xea8b, 0xea8c, 0xea8d, - 0xea8e, 0xea8f, 0xdaef, 0xea90, 0xdaf0, 0xc1ea, 0xccd5, 0xcfdd, - 0xea91, 0xea92, 0xea93, 0xea94, 0xea95, 0xea96, 0xea97, 0xea98, - 0xea99, 0xea9a, 0xea9b, 0xea9c, 0xea9d, 0xd3e7, 0xc2a1, 0xea9e, - 0xdaf1, 0xea9f, 0xeaa0, 0xcbe5, 0xeb40, 0xdaf2, 0xeb41, 0xcbe6, - 0xd2fe, 0xeb42, 0xeb43, 0xeb44, 0xb8f4, 0xeb45, 0xeb46, 0xdaf3, - 0xb0af, 0xcfb6, 0xeb47, 0xeb48, 0xd5cf, 0xeb49, 0xeb4a, 0xeb4b, - 0xeb4c, 0xeb4d, 0xeb4e, 0xeb4f, 0xeb50, 0xeb51, 0xeb52, 0xcbed, - 0xeb53, 0xeb54, 0xeb55, 0xeb56, 0xeb57, 0xeb58, 0xeb59, 0xeb5a, - 0xdaf4, 0xeb5b, 0xeb5c, 0xe3c4, 0xeb5d, 0xeb5e, 0xc1a5, 0xeb5f, - 0xeb60, 0xf6bf, 0xeb61, 0xeb62, 0xf6c0, 0xf6c1, 0xc4d1, 0xeb63, - 0xc8b8, 0xd1e3, 0xeb64, 0xeb65, 0xd0db, 0xd1c5, 0xbcaf, 0xb9cd, - 0xeb66, 0xeff4, 0xeb67, 0xeb68, 0xb4c6, 0xd3ba, 0xf6c2, 0xb3fb, - 0xeb69, 0xeb6a, 0xf6c3, 0xeb6b, 0xeb6c, 0xb5f1, 0xeb6d, 0xeb6e, - 0xeb6f, 0xeb70, 0xeb71, 0xeb72, 0xeb73, 0xeb74, 0xeb75, 0xeb76, - 0xf6c5, 0xeb77, 0xeb78, 0xeb79, 0xeb7a, 0xeb7b, 0xeb7c, 0xeb7d, - 0xd3ea, 0xf6a7, 0xd1a9, 0xeb7e, 0xeb80, 0xeb81, 0xeb82, 0xf6a9, - 0xeb83, 0xeb84, 0xeb85, 0xf6a8, 0xeb86, 0xeb87, 0xc1e3, 0xc0d7, - 0xeb88, 0xb1a2, 0xeb89, 0xeb8a, 0xeb8b, 0xeb8c, 0xceed, 0xeb8d, - /* 0x9700 .. 0x97ff */ - 0xd0e8, 0xf6ab, 0xeb8e, 0xeb8f, 0xcff6, 0xeb90, 0xf6aa, 0xd5f0, - 0xf6ac, 0xc3b9, 0xeb91, 0xeb92, 0xeb93, 0xbbf4, 0xf6ae, 0xf6ad, - 0xeb94, 0xeb95, 0xeb96, 0xc4de, 0xeb97, 0xeb98, 0xc1d8, 0xeb99, - 0xeb9a, 0xeb9b, 0xeb9c, 0xeb9d, 0xcbaa, 0xeb9e, 0xcfbc, 0xeb9f, - 0xeba0, 0xec40, 0xec41, 0xec42, 0xec43, 0xec44, 0xec45, 0xec46, - 0xec47, 0xec48, 0xf6af, 0xec49, 0xec4a, 0xf6b0, 0xec4b, 0xec4c, - 0xf6b1, 0xec4d, 0xc2b6, 0xec4e, 0xec4f, 0xec50, 0xec51, 0xec52, - 0xb0d4, 0xc5f9, 0xec53, 0xec54, 0xec55, 0xec56, 0xf6b2, 0xec57, - 0xec58, 0xec59, 0xec5a, 0xec5b, 0xec5c, 0xec5d, 0xec5e, 0xec5f, - 0xec60, 0xec61, 0xec62, 0xec63, 0xec64, 0xec65, 0xec66, 0xec67, - 0xec68, 0xec69, 0xc7e0, 0xf6a6, 0xec6a, 0xec6b, 0xbeb8, 0xec6c, - 0xec6d, 0xbeb2, 0xec6e, 0xb5e5, 0xec6f, 0xec70, 0xb7c7, 0xec71, - 0xbfbf, 0xc3d2, 0xc3e6, 0xec72, 0xec73, 0xd8cc, 0xec74, 0xec75, - 0xec76, 0xb8ef, 0xec77, 0xec78, 0xec79, 0xec7a, 0xec7b, 0xec7c, - 0xec7d, 0xec7e, 0xec80, 0xbdf9, 0xd1a5, 0xec81, 0xb0d0, 0xec82, - 0xec83, 0xec84, 0xec85, 0xec86, 0xf7b0, 0xec87, 0xec88, 0xec89, - 0xec8a, 0xec8b, 0xec8c, 0xec8d, 0xec8e, 0xf7b1, 0xec8f, 0xec90, - 0xec91, 0xec92, 0xec93, 0xd0ac, 0xec94, 0xb0b0, 0xec95, 0xec96, - 0xec97, 0xf7b2, 0xf7b3, 0xec98, 0xf7b4, 0xec99, 0xec9a, 0xec9b, - 0xc7ca, 0xec9c, 0xec9d, 0xec9e, 0xec9f, 0xeca0, 0xed40, 0xed41, - 0xbecf, 0xed42, 0xed43, 0xf7b7, 0xed44, 0xed45, 0xed46, 0xed47, - 0xed48, 0xed49, 0xed4a, 0xf7b6, 0xed4b, 0xb1de, 0xed4c, 0xf7b5, - 0xed4d, 0xed4e, 0xf7b8, 0xed4f, 0xf7b9, 0xed50, 0xed51, 0xed52, - 0xed53, 0xed54, 0xed55, 0xed56, 0xed57, 0xed58, 0xed59, 0xed5a, - 0xed5b, 0xed5c, 0xed5d, 0xed5e, 0xed5f, 0xed60, 0xed61, 0xed62, - 0xed63, 0xed64, 0xed65, 0xed66, 0xed67, 0xed68, 0xed69, 0xed6a, - 0xed6b, 0xed6c, 0xed6d, 0xed6e, 0xed6f, 0xed70, 0xed71, 0xed72, - 0xed73, 0xed74, 0xed75, 0xed76, 0xed77, 0xed78, 0xed79, 0xed7a, - 0xed7b, 0xed7c, 0xed7d, 0xed7e, 0xed80, 0xed81, 0xcea4, 0xc8cd, - 0xed82, 0xbaab, 0xe8b8, 0xe8b9, 0xe8ba, 0xbec2, 0xed83, 0xed84, - 0xed85, 0xed86, 0xed87, 0xd2f4, 0xed88, 0xd4cf, 0xc9d8, 0xed89, - 0xed8a, 0xed8b, 0xed8c, 0xed8d, 0xed8e, 0xed8f, 0xed90, 0xed91, - /* 0x9800 .. 0x98ff */ - 0xed92, 0xed93, 0xed94, 0xed95, 0xed96, 0xed97, 0xed98, 0xed99, - 0xed9a, 0xed9b, 0xed9c, 0xed9d, 0xed9e, 0xed9f, 0xeda0, 0xee40, - 0xee41, 0xee42, 0xee43, 0xee44, 0xee45, 0xee46, 0xee47, 0xee48, - 0xee49, 0xee4a, 0xee4b, 0xee4c, 0xee4d, 0xee4e, 0xee4f, 0xee50, - 0xee51, 0xee52, 0xee53, 0xee54, 0xee55, 0xee56, 0xee57, 0xee58, - 0xee59, 0xee5a, 0xee5b, 0xee5c, 0xee5d, 0xee5e, 0xee5f, 0xee60, - 0xee61, 0xee62, 0xee63, 0xee64, 0xee65, 0xee66, 0xee67, 0xee68, - 0xee69, 0xee6a, 0xee6b, 0xee6c, 0xee6d, 0xee6e, 0xee6f, 0xee70, - 0xee71, 0xee72, 0xee73, 0xee74, 0xee75, 0xee76, 0xee77, 0xee78, - 0xee79, 0xee7a, 0xee7b, 0xee7c, 0xee7d, 0xee7e, 0xee80, 0xee81, - 0xee82, 0xee83, 0xee84, 0xee85, 0xee86, 0xee87, 0xee88, 0xee89, - 0xee8a, 0xee8b, 0xee8c, 0xee8d, 0xee8e, 0xee8f, 0xee90, 0xee91, - 0xee92, 0xee93, 0xee94, 0xee95, 0xee96, 0xee97, 0xee98, 0xee99, - 0xee9a, 0xee9b, 0xee9c, 0xee9d, 0xee9e, 0xee9f, 0xeea0, 0xef40, - 0xef41, 0xef42, 0xef43, 0xef44, 0xef45, 0xd2b3, 0xb6a5, 0xc7ea, - 0xf1fc, 0xcfee, 0xcbb3, 0xd0eb, 0xe7ef, 0xcde7, 0xb9cb, 0xb6d9, - 0xf1fd, 0xb0e4, 0xcbcc, 0xf1fe, 0xd4a4, 0xc2ad, 0xc1ec, 0xc6c4, - 0xbeb1, 0xf2a1, 0xbcd5, 0xef46, 0xf2a2, 0xf2a3, 0xef47, 0xf2a4, - 0xd2c3, 0xc6b5, 0xef48, 0xcdc7, 0xf2a5, 0xef49, 0xd3b1, 0xbfc5, - 0xcce2, 0xef4a, 0xf2a6, 0xf2a7, 0xd1d5, 0xb6ee, 0xf2a8, 0xf2a9, - 0xb5df, 0xf2aa, 0xf2ab, 0xef4b, 0xb2fc, 0xf2ac, 0xf2ad, 0xc8a7, - 0xef4c, 0xef4d, 0xef4e, 0xef4f, 0xef50, 0xef51, 0xef52, 0xef53, - 0xef54, 0xef55, 0xef56, 0xef57, 0xef58, 0xef59, 0xef5a, 0xef5b, - 0xef5c, 0xef5d, 0xef5e, 0xef5f, 0xef60, 0xef61, 0xef62, 0xef63, - 0xef64, 0xef65, 0xef66, 0xef67, 0xef68, 0xef69, 0xef6a, 0xef6b, - 0xef6c, 0xef6d, 0xef6e, 0xef6f, 0xef70, 0xef71, 0xb7e7, 0xef72, - 0xef73, 0xeca9, 0xecaa, 0xecab, 0xef74, 0xecac, 0xef75, 0xef76, - 0xc6ae, 0xecad, 0xecae, 0xef77, 0xef78, 0xef79, 0xb7c9, 0xcab3, - 0xef7a, 0xef7b, 0xef7c, 0xef7d, 0xef7e, 0xef80, 0xef81, 0xe2b8, - 0xf7cf, 0xef82, 0xef83, 0xef84, 0xef85, 0xef86, 0xef87, 0xef88, - 0xef89, 0xef8a, 0xef8b, 0xef8c, 0xef8d, 0xef8e, 0xef8f, 0xef90, - 0xef91, 0xef92, 0xef93, 0xef94, 0xef95, 0xef96, 0xef97, 0xef98, - /* 0x9900 .. 0x99ff */ - 0xef99, 0xef9a, 0xef9b, 0xef9c, 0xef9d, 0xef9e, 0xef9f, 0xefa0, - 0xf040, 0xf041, 0xf042, 0xf043, 0xf044, 0xf7d0, 0xf045, 0xf046, - 0xb2cd, 0xf047, 0xf048, 0xf049, 0xf04a, 0xf04b, 0xf04c, 0xf04d, - 0xf04e, 0xf04f, 0xf050, 0xf051, 0xf052, 0xf053, 0xf054, 0xf055, - 0xf056, 0xf057, 0xf058, 0xf059, 0xf05a, 0xf05b, 0xf05c, 0xf05d, - 0xf05e, 0xf05f, 0xf060, 0xf061, 0xf062, 0xf063, 0xf7d1, 0xf064, - 0xf065, 0xf066, 0xf067, 0xf068, 0xf069, 0xf06a, 0xf06b, 0xf06c, - 0xf06d, 0xf06e, 0xf06f, 0xf070, 0xf071, 0xf072, 0xf073, 0xf074, - 0xf075, 0xf076, 0xf077, 0xf078, 0xf079, 0xf07a, 0xf07b, 0xf07c, - 0xf07d, 0xf07e, 0xf080, 0xf081, 0xf082, 0xf083, 0xf084, 0xf085, - 0xf086, 0xf087, 0xf088, 0xf089, 0xf7d3, 0xf7d2, 0xf08a, 0xf08b, - 0xf08c, 0xf08d, 0xf08e, 0xf08f, 0xf090, 0xf091, 0xf092, 0xf093, - 0xf094, 0xf095, 0xf096, 0xe2bb, 0xf097, 0xbca2, 0xf098, 0xe2bc, - 0xe2bd, 0xe2be, 0xe2bf, 0xe2c0, 0xe2c1, 0xb7b9, 0xd2fb, 0xbda4, - 0xcace, 0xb1a5, 0xcbc7, 0xf099, 0xe2c2, 0xb6fc, 0xc8c4, 0xe2c3, - 0xf09a, 0xf09b, 0xbdc8, 0xf09c, 0xb1fd, 0xe2c4, 0xf09d, 0xb6f6, - 0xe2c5, 0xc4d9, 0xf09e, 0xf09f, 0xe2c6, 0xcfda, 0xb9dd, 0xe2c7, - 0xc0a1, 0xf0a0, 0xe2c8, 0xb2f6, 0xf140, 0xe2c9, 0xf141, 0xc1f3, - 0xe2ca, 0xe2cb, 0xc2f8, 0xe2cc, 0xe2cd, 0xe2ce, 0xcad7, 0xd8b8, - 0xd9e5, 0xcfe3, 0xf142, 0xf143, 0xf144, 0xf145, 0xf146, 0xf147, - 0xf148, 0xf149, 0xf14a, 0xf14b, 0xf14c, 0xf0a5, 0xf14d, 0xf14e, - 0xdcb0, 0xf14f, 0xf150, 0xf151, 0xf152, 0xf153, 0xf154, 0xf155, - 0xf156, 0xf157, 0xf158, 0xf159, 0xf15a, 0xf15b, 0xf15c, 0xf15d, - 0xf15e, 0xf15f, 0xf160, 0xf161, 0xf162, 0xf163, 0xf164, 0xf165, - 0xf166, 0xf167, 0xf168, 0xf169, 0xf16a, 0xf16b, 0xf16c, 0xf16d, - 0xf16e, 0xf16f, 0xf170, 0xf171, 0xf172, 0xf173, 0xf174, 0xf175, - 0xf176, 0xf177, 0xf178, 0xf179, 0xf17a, 0xf17b, 0xf17c, 0xf17d, - 0xf17e, 0xf180, 0xf181, 0xf182, 0xf183, 0xf184, 0xf185, 0xf186, - 0xf187, 0xf188, 0xf189, 0xf18a, 0xf18b, 0xf18c, 0xf18d, 0xf18e, - 0xf18f, 0xf190, 0xf191, 0xf192, 0xf193, 0xf194, 0xf195, 0xf196, - 0xf197, 0xf198, 0xf199, 0xf19a, 0xf19b, 0xf19c, 0xf19d, 0xf19e, - 0xf19f, 0xf1a0, 0xf240, 0xf241, 0xf242, 0xf243, 0xf244, 0xf245, - /* 0x9a00 .. 0x9aff */ - 0xf246, 0xf247, 0xf248, 0xf249, 0xf24a, 0xf24b, 0xf24c, 0xf24d, - 0xf24e, 0xf24f, 0xf250, 0xf251, 0xf252, 0xf253, 0xf254, 0xf255, - 0xf256, 0xf257, 0xf258, 0xf259, 0xf25a, 0xf25b, 0xf25c, 0xf25d, - 0xf25e, 0xf25f, 0xf260, 0xf261, 0xf262, 0xf263, 0xf264, 0xf265, - 0xf266, 0xf267, 0xf268, 0xf269, 0xf26a, 0xf26b, 0xf26c, 0xf26d, - 0xf26e, 0xf26f, 0xf270, 0xf271, 0xf272, 0xf273, 0xf274, 0xf275, - 0xf276, 0xf277, 0xf278, 0xf279, 0xf27a, 0xf27b, 0xf27c, 0xf27d, - 0xf27e, 0xf280, 0xf281, 0xf282, 0xf283, 0xf284, 0xf285, 0xf286, - 0xf287, 0xf288, 0xf289, 0xf28a, 0xf28b, 0xf28c, 0xf28d, 0xf28e, - 0xf28f, 0xf290, 0xf291, 0xf292, 0xf293, 0xf294, 0xf295, 0xf296, - 0xf297, 0xf298, 0xf299, 0xf29a, 0xf29b, 0xf29c, 0xf29d, 0xf29e, - 0xf29f, 0xf2a0, 0xf340, 0xf341, 0xf342, 0xf343, 0xf344, 0xf345, - 0xf346, 0xf347, 0xf348, 0xf349, 0xf34a, 0xf34b, 0xf34c, 0xf34d, - 0xf34e, 0xf34f, 0xf350, 0xf351, 0xc2ed, 0xd4a6, 0xcdd4, 0xd1b1, - 0xb3db, 0xc7fd, 0xf352, 0xb2b5, 0xc2bf, 0xe6e0, 0xcabb, 0xe6e1, - 0xe6e2, 0xbed4, 0xe6e3, 0xd7a4, 0xcdd5, 0xe6e5, 0xbcdd, 0xe6e4, - 0xe6e6, 0xe6e7, 0xc2ee, 0xf353, 0xbdbe, 0xe6e8, 0xc2e6, 0xbaa7, - 0xe6e9, 0xf354, 0xe6ea, 0xb3d2, 0xd1e9, 0xf355, 0xf356, 0xbfa5, - 0xe6eb, 0xc6ef, 0xe6ec, 0xe6ed, 0xf357, 0xf358, 0xe6ee, 0xc6ad, - 0xe6ef, 0xf359, 0xc9a7, 0xe6f0, 0xe6f1, 0xe6f2, 0xe5b9, 0xe6f3, - 0xe6f4, 0xc2e2, 0xe6f5, 0xe6f6, 0xd6e8, 0xe6f7, 0xf35a, 0xe6f8, - 0xb9c7, 0xf35b, 0xf35c, 0xf35d, 0xf35e, 0xf35f, 0xf360, 0xf361, - 0xf7bb, 0xf7ba, 0xf362, 0xf363, 0xf364, 0xf365, 0xf7be, 0xf7bc, - 0xbaa1, 0xf366, 0xf7bf, 0xf367, 0xf7c0, 0xf368, 0xf369, 0xf36a, - 0xf7c2, 0xf7c1, 0xf7c4, 0xf36b, 0xf36c, 0xf7c3, 0xf36d, 0xf36e, - 0xf36f, 0xf370, 0xf371, 0xf7c5, 0xf7c6, 0xf372, 0xf373, 0xf374, - 0xf375, 0xf7c7, 0xf376, 0xcbe8, 0xf377, 0xf378, 0xf379, 0xf37a, - 0xb8df, 0xf37b, 0xf37c, 0xf37d, 0xf37e, 0xf380, 0xf381, 0xf7d4, - 0xf382, 0xf7d5, 0xf383, 0xf384, 0xf385, 0xf386, 0xf7d6, 0xf387, - 0xf388, 0xf389, 0xf38a, 0xf7d8, 0xf38b, 0xf7da, 0xf38c, 0xf7d7, - 0xf38d, 0xf38e, 0xf38f, 0xf390, 0xf391, 0xf392, 0xf393, 0xf394, - 0xf395, 0xf7db, 0xf396, 0xf7d9, 0xf397, 0xf398, 0xf399, 0xf39a, - /* 0x9b00 .. 0x9bff */ - 0xf39b, 0xf39c, 0xf39d, 0xd7d7, 0xf39e, 0xf39f, 0xf3a0, 0xf440, - 0xf7dc, 0xf441, 0xf442, 0xf443, 0xf444, 0xf445, 0xf446, 0xf7dd, - 0xf447, 0xf448, 0xf449, 0xf7de, 0xf44a, 0xf44b, 0xf44c, 0xf44d, - 0xf44e, 0xf44f, 0xf450, 0xf451, 0xf452, 0xf453, 0xf454, 0xf7df, - 0xf455, 0xf456, 0xf457, 0xf7e0, 0xf458, 0xf459, 0xf45a, 0xf45b, - 0xf45c, 0xf45d, 0xf45e, 0xf45f, 0xf460, 0xf461, 0xf462, 0xdbcb, - 0xf463, 0xf464, 0xd8aa, 0xf465, 0xf466, 0xf467, 0xf468, 0xf469, - 0xf46a, 0xf46b, 0xf46c, 0xe5f7, 0xb9ed, 0xf46d, 0xf46e, 0xf46f, - 0xf470, 0xbffd, 0xbbea, 0xf7c9, 0xc6c7, 0xf7c8, 0xf471, 0xf7ca, - 0xf7cc, 0xf7cb, 0xf472, 0xf473, 0xf474, 0xf7cd, 0xf475, 0xceba, - 0xf476, 0xf7ce, 0xf477, 0xf478, 0xc4a7, 0xf479, 0xf47a, 0xf47b, - 0xf47c, 0xf47d, 0xf47e, 0xf480, 0xf481, 0xf482, 0xf483, 0xf484, - 0xf485, 0xf486, 0xf487, 0xf488, 0xf489, 0xf48a, 0xf48b, 0xf48c, - 0xf48d, 0xf48e, 0xf48f, 0xf490, 0xf491, 0xf492, 0xf493, 0xf494, - 0xf495, 0xf496, 0xf497, 0xf498, 0xf499, 0xf49a, 0xf49b, 0xf49c, - 0xf49d, 0xf49e, 0xf49f, 0xf4a0, 0xf540, 0xf541, 0xf542, 0xf543, - 0xf544, 0xf545, 0xf546, 0xf547, 0xf548, 0xf549, 0xf54a, 0xf54b, - 0xf54c, 0xf54d, 0xf54e, 0xf54f, 0xf550, 0xf551, 0xf552, 0xf553, - 0xf554, 0xf555, 0xf556, 0xf557, 0xf558, 0xf559, 0xf55a, 0xf55b, - 0xf55c, 0xf55d, 0xf55e, 0xf55f, 0xf560, 0xf561, 0xf562, 0xf563, - 0xf564, 0xf565, 0xf566, 0xf567, 0xf568, 0xf569, 0xf56a, 0xf56b, - 0xf56c, 0xf56d, 0xf56e, 0xf56f, 0xf570, 0xf571, 0xf572, 0xf573, - 0xf574, 0xf575, 0xf576, 0xf577, 0xf578, 0xf579, 0xf57a, 0xf57b, - 0xf57c, 0xf57d, 0xf57e, 0xf580, 0xf581, 0xf582, 0xf583, 0xf584, - 0xf585, 0xf586, 0xf587, 0xf588, 0xf589, 0xf58a, 0xf58b, 0xf58c, - 0xf58d, 0xf58e, 0xf58f, 0xf590, 0xf591, 0xf592, 0xf593, 0xf594, - 0xf595, 0xf596, 0xf597, 0xf598, 0xf599, 0xf59a, 0xf59b, 0xf59c, - 0xf59d, 0xf59e, 0xf59f, 0xf5a0, 0xf640, 0xf641, 0xf642, 0xf643, - 0xf644, 0xf645, 0xf646, 0xf647, 0xf648, 0xf649, 0xf64a, 0xf64b, - 0xf64c, 0xf64d, 0xf64e, 0xf64f, 0xf650, 0xf651, 0xf652, 0xf653, - 0xf654, 0xf655, 0xf656, 0xf657, 0xf658, 0xf659, 0xf65a, 0xf65b, - 0xf65c, 0xf65d, 0xf65e, 0xf65f, 0xf660, 0xf661, 0xf662, 0xf663, - /* 0x9c00 .. 0x9cff */ - 0xf664, 0xf665, 0xf666, 0xf667, 0xf668, 0xf669, 0xf66a, 0xf66b, - 0xf66c, 0xf66d, 0xf66e, 0xf66f, 0xf670, 0xf671, 0xf672, 0xf673, - 0xf674, 0xf675, 0xf676, 0xf677, 0xf678, 0xf679, 0xf67a, 0xf67b, - 0xf67c, 0xf67d, 0xf67e, 0xf680, 0xf681, 0xf682, 0xf683, 0xf684, - 0xf685, 0xf686, 0xf687, 0xf688, 0xf689, 0xf68a, 0xf68b, 0xf68c, - 0xf68d, 0xf68e, 0xf68f, 0xf690, 0xf691, 0xf692, 0xf693, 0xf694, - 0xf695, 0xf696, 0xf697, 0xf698, 0xf699, 0xf69a, 0xf69b, 0xf69c, - 0xf69d, 0xf69e, 0xf69f, 0xf6a0, 0xf740, 0xf741, 0xf742, 0xf743, - 0xf744, 0xf745, 0xf746, 0xf747, 0xf748, 0xf749, 0xf74a, 0xf74b, - 0xf74c, 0xf74d, 0xf74e, 0xf74f, 0xf750, 0xf751, 0xf752, 0xf753, - 0xf754, 0xf755, 0xf756, 0xf757, 0xf758, 0xf759, 0xf75a, 0xf75b, - 0xf75c, 0xf75d, 0xf75e, 0xf75f, 0xf760, 0xf761, 0xf762, 0xf763, - 0xf764, 0xf765, 0xf766, 0xf767, 0xf768, 0xf769, 0xf76a, 0xf76b, - 0xf76c, 0xf76d, 0xf76e, 0xf76f, 0xf770, 0xf771, 0xf772, 0xf773, - 0xf774, 0xf775, 0xf776, 0xf777, 0xf778, 0xf779, 0xf77a, 0xf77b, - 0xf77c, 0xf77d, 0xf77e, 0xf780, 0xd3e3, 0xf781, 0xf782, 0xf6cf, - 0xf783, 0xc2b3, 0xf6d0, 0xf784, 0xf785, 0xf6d1, 0xf6d2, 0xf6d3, - 0xf6d4, 0xf786, 0xf787, 0xf6d6, 0xf788, 0xb1ab, 0xf6d7, 0xf789, - 0xf6d8, 0xf6d9, 0xf6da, 0xf78a, 0xf6db, 0xf6dc, 0xf78b, 0xf78c, - 0xf78d, 0xf78e, 0xf6dd, 0xf6de, 0xcfca, 0xf78f, 0xf6df, 0xf6e0, - 0xf6e1, 0xf6e2, 0xf6e3, 0xf6e4, 0xc0f0, 0xf6e5, 0xf6e6, 0xf6e7, - 0xf6e8, 0xf6e9, 0xf790, 0xf6ea, 0xf791, 0xf6eb, 0xf6ec, 0xf792, - 0xf6ed, 0xf6ee, 0xf6ef, 0xf6f0, 0xf6f1, 0xf6f2, 0xf6f3, 0xf6f4, - 0xbea8, 0xf793, 0xf6f5, 0xf6f6, 0xf6f7, 0xf6f8, 0xf794, 0xf795, - 0xf796, 0xf797, 0xf798, 0xc8fa, 0xf6f9, 0xf6fa, 0xf6fb, 0xf6fc, - 0xf799, 0xf79a, 0xf6fd, 0xf6fe, 0xf7a1, 0xf7a2, 0xf7a3, 0xf7a4, - 0xf7a5, 0xf79b, 0xf79c, 0xf7a6, 0xf7a7, 0xf7a8, 0xb1ee, 0xf7a9, - 0xf7aa, 0xf7ab, 0xf79d, 0xf79e, 0xf7ac, 0xf7ad, 0xc1db, 0xf7ae, - 0xf79f, 0xf7a0, 0xf7af, 0xf840, 0xf841, 0xf842, 0xf843, 0xf844, - 0xf845, 0xf846, 0xf847, 0xf848, 0xf849, 0xf84a, 0xf84b, 0xf84c, - 0xf84d, 0xf84e, 0xf84f, 0xf850, 0xf851, 0xf852, 0xf853, 0xf854, - 0xf855, 0xf856, 0xf857, 0xf858, 0xf859, 0xf85a, 0xf85b, 0xf85c, - /* 0x9d00 .. 0x9dff */ - 0xf85d, 0xf85e, 0xf85f, 0xf860, 0xf861, 0xf862, 0xf863, 0xf864, - 0xf865, 0xf866, 0xf867, 0xf868, 0xf869, 0xf86a, 0xf86b, 0xf86c, - 0xf86d, 0xf86e, 0xf86f, 0xf870, 0xf871, 0xf872, 0xf873, 0xf874, - 0xf875, 0xf876, 0xf877, 0xf878, 0xf879, 0xf87a, 0xf87b, 0xf87c, - 0xf87d, 0xf87e, 0xf880, 0xf881, 0xf882, 0xf883, 0xf884, 0xf885, - 0xf886, 0xf887, 0xf888, 0xf889, 0xf88a, 0xf88b, 0xf88c, 0xf88d, - 0xf88e, 0xf88f, 0xf890, 0xf891, 0xf892, 0xf893, 0xf894, 0xf895, - 0xf896, 0xf897, 0xf898, 0xf899, 0xf89a, 0xf89b, 0xf89c, 0xf89d, - 0xf89e, 0xf89f, 0xf8a0, 0xf940, 0xf941, 0xf942, 0xf943, 0xf944, - 0xf945, 0xf946, 0xf947, 0xf948, 0xf949, 0xf94a, 0xf94b, 0xf94c, - 0xf94d, 0xf94e, 0xf94f, 0xf950, 0xf951, 0xf952, 0xf953, 0xf954, - 0xf955, 0xf956, 0xf957, 0xf958, 0xf959, 0xf95a, 0xf95b, 0xf95c, - 0xf95d, 0xf95e, 0xf95f, 0xf960, 0xf961, 0xf962, 0xf963, 0xf964, - 0xf965, 0xf966, 0xf967, 0xf968, 0xf969, 0xf96a, 0xf96b, 0xf96c, - 0xf96d, 0xf96e, 0xf96f, 0xf970, 0xf971, 0xf972, 0xf973, 0xf974, - 0xf975, 0xf976, 0xf977, 0xf978, 0xf979, 0xf97a, 0xf97b, 0xf97c, - 0xf97d, 0xf97e, 0xf980, 0xf981, 0xf982, 0xf983, 0xf984, 0xf985, - 0xf986, 0xf987, 0xf988, 0xf989, 0xf98a, 0xf98b, 0xf98c, 0xf98d, - 0xf98e, 0xf98f, 0xf990, 0xf991, 0xf992, 0xf993, 0xf994, 0xf995, - 0xf996, 0xf997, 0xf998, 0xf999, 0xf99a, 0xf99b, 0xf99c, 0xf99d, - 0xf99e, 0xf99f, 0xf9a0, 0xfa40, 0xfa41, 0xfa42, 0xfa43, 0xfa44, - 0xfa45, 0xfa46, 0xfa47, 0xfa48, 0xfa49, 0xfa4a, 0xfa4b, 0xfa4c, - 0xfa4d, 0xfa4e, 0xfa4f, 0xfa50, 0xfa51, 0xfa52, 0xfa53, 0xfa54, - 0xfa55, 0xfa56, 0xfa57, 0xfa58, 0xfa59, 0xfa5a, 0xfa5b, 0xfa5c, - 0xfa5d, 0xfa5e, 0xfa5f, 0xfa60, 0xfa61, 0xfa62, 0xfa63, 0xfa64, - 0xfa65, 0xfa66, 0xfa67, 0xfa68, 0xfa69, 0xfa6a, 0xfa6b, 0xfa6c, - 0xfa6d, 0xfa6e, 0xfa6f, 0xfa70, 0xfa71, 0xfa72, 0xfa73, 0xfa74, - 0xfa75, 0xfa76, 0xfa77, 0xfa78, 0xfa79, 0xfa7a, 0xfa7b, 0xfa7c, - 0xfa7d, 0xfa7e, 0xfa80, 0xfa81, 0xfa82, 0xfa83, 0xfa84, 0xfa85, - 0xfa86, 0xfa87, 0xfa88, 0xfa89, 0xfa8a, 0xfa8b, 0xfa8c, 0xfa8d, - 0xfa8e, 0xfa8f, 0xfa90, 0xfa91, 0xfa92, 0xfa93, 0xfa94, 0xfa95, - 0xfa96, 0xfa97, 0xfa98, 0xfa99, 0xfa9a, 0xfa9b, 0xfa9c, 0xfa9d, - /* 0x9e00 .. 0x9eff */ - 0xfa9e, 0xfa9f, 0xfaa0, 0xfb40, 0xfb41, 0xfb42, 0xfb43, 0xfb44, - 0xfb45, 0xfb46, 0xfb47, 0xfb48, 0xfb49, 0xfb4a, 0xfb4b, 0xfb4c, - 0xfb4d, 0xfb4e, 0xfb4f, 0xfb50, 0xfb51, 0xfb52, 0xfb53, 0xfb54, - 0xfb55, 0xfb56, 0xfb57, 0xfb58, 0xfb59, 0xfb5a, 0xfb5b, 0xc4f1, - 0xf0af, 0xbca6, 0xf0b0, 0xc3f9, 0xfb5c, 0xc5b8, 0xd1bb, 0xfb5d, - 0xf0b1, 0xf0b2, 0xf0b3, 0xf0b4, 0xf0b5, 0xd1bc, 0xfb5e, 0xd1ec, - 0xfb5f, 0xf0b7, 0xf0b6, 0xd4a7, 0xfb60, 0xcdd2, 0xf0b8, 0xf0ba, - 0xf0b9, 0xf0bb, 0xf0bc, 0xfb61, 0xfb62, 0xb8eb, 0xf0bd, 0xbae8, - 0xfb63, 0xf0be, 0xf0bf, 0xbee9, 0xf0c0, 0xb6ec, 0xf0c1, 0xf0c2, - 0xf0c3, 0xf0c4, 0xc8b5, 0xf0c5, 0xf0c6, 0xfb64, 0xf0c7, 0xc5f4, - 0xfb65, 0xf0c8, 0xfb66, 0xfb67, 0xfb68, 0xf0c9, 0xfb69, 0xf0ca, - 0xf7bd, 0xfb6a, 0xf0cb, 0xf0cc, 0xf0cd, 0xfb6b, 0xf0ce, 0xfb6c, - 0xfb6d, 0xfb6e, 0xfb6f, 0xf0cf, 0xbad7, 0xfb70, 0xf0d0, 0xf0d1, - 0xf0d2, 0xf0d3, 0xf0d4, 0xf0d5, 0xf0d6, 0xf0d8, 0xfb71, 0xfb72, - 0xd3a5, 0xf0d7, 0xfb73, 0xf0d9, 0xfb74, 0xfb75, 0xfb76, 0xfb77, - 0xfb78, 0xfb79, 0xfb7a, 0xfb7b, 0xfb7c, 0xfb7d, 0xf5ba, 0xc2b9, - 0xfb7e, 0xfb80, 0xf7e4, 0xfb81, 0xfb82, 0xfb83, 0xfb84, 0xf7e5, - 0xf7e6, 0xfb85, 0xfb86, 0xf7e7, 0xfb87, 0xfb88, 0xfb89, 0xfb8a, - 0xfb8b, 0xfb8c, 0xf7e8, 0xc2b4, 0xfb8d, 0xfb8e, 0xfb8f, 0xfb90, - 0xfb91, 0xfb92, 0xfb93, 0xfb94, 0xfb95, 0xf7ea, 0xfb96, 0xf7eb, - 0xfb97, 0xfb98, 0xfb99, 0xfb9a, 0xfb9b, 0xfb9c, 0xc2f3, 0xfb9d, - 0xfb9e, 0xfb9f, 0xfba0, 0xfc40, 0xfc41, 0xfc42, 0xfc43, 0xfc44, - 0xfc45, 0xfc46, 0xfc47, 0xfc48, 0xf4f0, 0xfc49, 0xfc4a, 0xfc4b, - 0xf4ef, 0xfc4c, 0xfc4d, 0xc2e9, 0xfc4e, 0xf7e1, 0xf7e2, 0xfc4f, - 0xfc50, 0xfc51, 0xfc52, 0xfc53, 0xbbc6, 0xfc54, 0xfc55, 0xfc56, - 0xfc57, 0xd9e4, 0xfc58, 0xfc59, 0xfc5a, 0xcaf2, 0xc0e8, 0xf0a4, - 0xfc5b, 0xbada, 0xfc5c, 0xfc5d, 0xc7ad, 0xfc5e, 0xfc5f, 0xfc60, - 0xc4ac, 0xfc61, 0xfc62, 0xf7ec, 0xf7ed, 0xf7ee, 0xfc63, 0xf7f0, - 0xf7ef, 0xfc64, 0xf7f1, 0xfc65, 0xfc66, 0xf7f4, 0xfc67, 0xf7f3, - 0xfc68, 0xf7f2, 0xf7f5, 0xfc69, 0xfc6a, 0xfc6b, 0xfc6c, 0xf7f6, - 0xfc6d, 0xfc6e, 0xfc6f, 0xfc70, 0xfc71, 0xfc72, 0xfc73, 0xfc74, - 0xfc75, 0xede9, 0xfc76, 0xedea, 0xedeb, 0xfc77, 0xf6bc, 0xfc78, - /* 0x9f00 .. 0x9fff */ - 0xfc79, 0xfc7a, 0xfc7b, 0xfc7c, 0xfc7d, 0xfc7e, 0xfc80, 0xfc81, - 0xfc82, 0xfc83, 0xfc84, 0xf6bd, 0xfc85, 0xf6be, 0xb6a6, 0xfc86, - 0xd8be, 0xfc87, 0xfc88, 0xb9c4, 0xfc89, 0xfc8a, 0xfc8b, 0xd8bb, - 0xfc8c, 0xdcb1, 0xfc8d, 0xfc8e, 0xfc8f, 0xfc90, 0xfc91, 0xfc92, - 0xcaf3, 0xfc93, 0xf7f7, 0xfc94, 0xfc95, 0xfc96, 0xfc97, 0xfc98, - 0xfc99, 0xfc9a, 0xfc9b, 0xfc9c, 0xf7f8, 0xfc9d, 0xfc9e, 0xf7f9, - 0xfc9f, 0xfca0, 0xfd40, 0xfd41, 0xfd42, 0xfd43, 0xfd44, 0xf7fb, - 0xfd45, 0xf7fa, 0xfd46, 0xb1c7, 0xfd47, 0xf7fc, 0xf7fd, 0xfd48, - 0xfd49, 0xfd4a, 0xfd4b, 0xfd4c, 0xf7fe, 0xfd4d, 0xfd4e, 0xfd4f, - 0xfd50, 0xfd51, 0xfd52, 0xfd53, 0xfd54, 0xfd55, 0xfd56, 0xfd57, - 0xc6eb, 0xecb4, 0xfd58, 0xfd59, 0xfd5a, 0xfd5b, 0xfd5c, 0xfd5d, - 0xfd5e, 0xfd5f, 0xfd60, 0xfd61, 0xfd62, 0xfd63, 0xfd64, 0xfd65, - 0xfd66, 0xfd67, 0xfd68, 0xfd69, 0xfd6a, 0xfd6b, 0xfd6c, 0xfd6d, - 0xfd6e, 0xfd6f, 0xfd70, 0xfd71, 0xfd72, 0xfd73, 0xfd74, 0xfd75, - 0xfd76, 0xfd77, 0xfd78, 0xfd79, 0xfd7a, 0xfd7b, 0xfd7c, 0xfd7d, - 0xfd7e, 0xfd80, 0xfd81, 0xfd82, 0xfd83, 0xfd84, 0xfd85, 0xb3dd, - 0xf6b3, 0xfd86, 0xfd87, 0xf6b4, 0xc1e4, 0xf6b5, 0xf6b6, 0xf6b7, - 0xf6b8, 0xf6b9, 0xf6ba, 0xc8a3, 0xf6bb, 0xfd88, 0xfd89, 0xfd8a, - 0xfd8b, 0xfd8c, 0xfd8d, 0xfd8e, 0xfd8f, 0xfd90, 0xfd91, 0xfd92, - 0xfd93, 0xc1fa, 0xb9a8, 0xede8, 0xfd94, 0xfd95, 0xfd96, 0xb9ea, - 0xd9df, 0xfd97, 0xfd98, 0xfd99, 0xfd9a, 0xfd9b, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xe000 .. 0xe0ff */ - 0xaaa1, 0xaaa2, 0xaaa3, 0xaaa4, 0xaaa5, 0xaaa6, 0xaaa7, 0xaaa8, - 0xaaa9, 0xaaaa, 0xaaab, 0xaaac, 0xaaad, 0xaaae, 0xaaaf, 0xaab0, - 0xaab1, 0xaab2, 0xaab3, 0xaab4, 0xaab5, 0xaab6, 0xaab7, 0xaab8, - 0xaab9, 0xaaba, 0xaabb, 0xaabc, 0xaabd, 0xaabe, 0xaabf, 0xaac0, - 0xaac1, 0xaac2, 0xaac3, 0xaac4, 0xaac5, 0xaac6, 0xaac7, 0xaac8, - 0xaac9, 0xaaca, 0xaacb, 0xaacc, 0xaacd, 0xaace, 0xaacf, 0xaad0, - 0xaad1, 0xaad2, 0xaad3, 0xaad4, 0xaad5, 0xaad6, 0xaad7, 0xaad8, - 0xaad9, 0xaada, 0xaadb, 0xaadc, 0xaadd, 0xaade, 0xaadf, 0xaae0, - 0xaae1, 0xaae2, 0xaae3, 0xaae4, 0xaae5, 0xaae6, 0xaae7, 0xaae8, - 0xaae9, 0xaaea, 0xaaeb, 0xaaec, 0xaaed, 0xaaee, 0xaaef, 0xaaf0, - 0xaaf1, 0xaaf2, 0xaaf3, 0xaaf4, 0xaaf5, 0xaaf6, 0xaaf7, 0xaaf8, - 0xaaf9, 0xaafa, 0xaafb, 0xaafc, 0xaafd, 0xaafe, 0xaba1, 0xaba2, - 0xaba3, 0xaba4, 0xaba5, 0xaba6, 0xaba7, 0xaba8, 0xaba9, 0xabaa, - 0xabab, 0xabac, 0xabad, 0xabae, 0xabaf, 0xabb0, 0xabb1, 0xabb2, - 0xabb3, 0xabb4, 0xabb5, 0xabb6, 0xabb7, 0xabb8, 0xabb9, 0xabba, - 0xabbb, 0xabbc, 0xabbd, 0xabbe, 0xabbf, 0xabc0, 0xabc1, 0xabc2, - 0xabc3, 0xabc4, 0xabc5, 0xabc6, 0xabc7, 0xabc8, 0xabc9, 0xabca, - 0xabcb, 0xabcc, 0xabcd, 0xabce, 0xabcf, 0xabd0, 0xabd1, 0xabd2, - 0xabd3, 0xabd4, 0xabd5, 0xabd6, 0xabd7, 0xabd8, 0xabd9, 0xabda, - 0xabdb, 0xabdc, 0xabdd, 0xabde, 0xabdf, 0xabe0, 0xabe1, 0xabe2, - 0xabe3, 0xabe4, 0xabe5, 0xabe6, 0xabe7, 0xabe8, 0xabe9, 0xabea, - 0xabeb, 0xabec, 0xabed, 0xabee, 0xabef, 0xabf0, 0xabf1, 0xabf2, - 0xabf3, 0xabf4, 0xabf5, 0xabf6, 0xabf7, 0xabf8, 0xabf9, 0xabfa, - 0xabfb, 0xabfc, 0xabfd, 0xabfe, 0xaca1, 0xaca2, 0xaca3, 0xaca4, - 0xaca5, 0xaca6, 0xaca7, 0xaca8, 0xaca9, 0xacaa, 0xacab, 0xacac, - 0xacad, 0xacae, 0xacaf, 0xacb0, 0xacb1, 0xacb2, 0xacb3, 0xacb4, - 0xacb5, 0xacb6, 0xacb7, 0xacb8, 0xacb9, 0xacba, 0xacbb, 0xacbc, - 0xacbd, 0xacbe, 0xacbf, 0xacc0, 0xacc1, 0xacc2, 0xacc3, 0xacc4, - 0xacc5, 0xacc6, 0xacc7, 0xacc8, 0xacc9, 0xacca, 0xaccb, 0xaccc, - 0xaccd, 0xacce, 0xaccf, 0xacd0, 0xacd1, 0xacd2, 0xacd3, 0xacd4, - 0xacd5, 0xacd6, 0xacd7, 0xacd8, 0xacd9, 0xacda, 0xacdb, 0xacdc, - 0xacdd, 0xacde, 0xacdf, 0xace0, 0xace1, 0xace2, 0xace3, 0xace4, - /* 0xe100 .. 0xe1ff */ - 0xace5, 0xace6, 0xace7, 0xace8, 0xace9, 0xacea, 0xaceb, 0xacec, - 0xaced, 0xacee, 0xacef, 0xacf0, 0xacf1, 0xacf2, 0xacf3, 0xacf4, - 0xacf5, 0xacf6, 0xacf7, 0xacf8, 0xacf9, 0xacfa, 0xacfb, 0xacfc, - 0xacfd, 0xacfe, 0xada1, 0xada2, 0xada3, 0xada4, 0xada5, 0xada6, - 0xada7, 0xada8, 0xada9, 0xadaa, 0xadab, 0xadac, 0xadad, 0xadae, - 0xadaf, 0xadb0, 0xadb1, 0xadb2, 0xadb3, 0xadb4, 0xadb5, 0xadb6, - 0xadb7, 0xadb8, 0xadb9, 0xadba, 0xadbb, 0xadbc, 0xadbd, 0xadbe, - 0xadbf, 0xadc0, 0xadc1, 0xadc2, 0xadc3, 0xadc4, 0xadc5, 0xadc6, - 0xadc7, 0xadc8, 0xadc9, 0xadca, 0xadcb, 0xadcc, 0xadcd, 0xadce, - 0xadcf, 0xadd0, 0xadd1, 0xadd2, 0xadd3, 0xadd4, 0xadd5, 0xadd6, - 0xadd7, 0xadd8, 0xadd9, 0xadda, 0xaddb, 0xaddc, 0xaddd, 0xadde, - 0xaddf, 0xade0, 0xade1, 0xade2, 0xade3, 0xade4, 0xade5, 0xade6, - 0xade7, 0xade8, 0xade9, 0xadea, 0xadeb, 0xadec, 0xaded, 0xadee, - 0xadef, 0xadf0, 0xadf1, 0xadf2, 0xadf3, 0xadf4, 0xadf5, 0xadf6, - 0xadf7, 0xadf8, 0xadf9, 0xadfa, 0xadfb, 0xadfc, 0xadfd, 0xadfe, - 0xaea1, 0xaea2, 0xaea3, 0xaea4, 0xaea5, 0xaea6, 0xaea7, 0xaea8, - 0xaea9, 0xaeaa, 0xaeab, 0xaeac, 0xaead, 0xaeae, 0xaeaf, 0xaeb0, - 0xaeb1, 0xaeb2, 0xaeb3, 0xaeb4, 0xaeb5, 0xaeb6, 0xaeb7, 0xaeb8, - 0xaeb9, 0xaeba, 0xaebb, 0xaebc, 0xaebd, 0xaebe, 0xaebf, 0xaec0, - 0xaec1, 0xaec2, 0xaec3, 0xaec4, 0xaec5, 0xaec6, 0xaec7, 0xaec8, - 0xaec9, 0xaeca, 0xaecb, 0xaecc, 0xaecd, 0xaece, 0xaecf, 0xaed0, - 0xaed1, 0xaed2, 0xaed3, 0xaed4, 0xaed5, 0xaed6, 0xaed7, 0xaed8, - 0xaed9, 0xaeda, 0xaedb, 0xaedc, 0xaedd, 0xaede, 0xaedf, 0xaee0, - 0xaee1, 0xaee2, 0xaee3, 0xaee4, 0xaee5, 0xaee6, 0xaee7, 0xaee8, - 0xaee9, 0xaeea, 0xaeeb, 0xaeec, 0xaeed, 0xaeee, 0xaeef, 0xaef0, - 0xaef1, 0xaef2, 0xaef3, 0xaef4, 0xaef5, 0xaef6, 0xaef7, 0xaef8, - 0xaef9, 0xaefa, 0xaefb, 0xaefc, 0xaefd, 0xaefe, 0xafa1, 0xafa2, - 0xafa3, 0xafa4, 0xafa5, 0xafa6, 0xafa7, 0xafa8, 0xafa9, 0xafaa, - 0xafab, 0xafac, 0xafad, 0xafae, 0xafaf, 0xafb0, 0xafb1, 0xafb2, - 0xafb3, 0xafb4, 0xafb5, 0xafb6, 0xafb7, 0xafb8, 0xafb9, 0xafba, - 0xafbb, 0xafbc, 0xafbd, 0xafbe, 0xafbf, 0xafc0, 0xafc1, 0xafc2, - 0xafc3, 0xafc4, 0xafc5, 0xafc6, 0xafc7, 0xafc8, 0xafc9, 0xafca, - /* 0xe200 .. 0xe2ff */ - 0xafcb, 0xafcc, 0xafcd, 0xafce, 0xafcf, 0xafd0, 0xafd1, 0xafd2, - 0xafd3, 0xafd4, 0xafd5, 0xafd6, 0xafd7, 0xafd8, 0xafd9, 0xafda, - 0xafdb, 0xafdc, 0xafdd, 0xafde, 0xafdf, 0xafe0, 0xafe1, 0xafe2, - 0xafe3, 0xafe4, 0xafe5, 0xafe6, 0xafe7, 0xafe8, 0xafe9, 0xafea, - 0xafeb, 0xafec, 0xafed, 0xafee, 0xafef, 0xaff0, 0xaff1, 0xaff2, - 0xaff3, 0xaff4, 0xaff5, 0xaff6, 0xaff7, 0xaff8, 0xaff9, 0xaffa, - 0xaffb, 0xaffc, 0xaffd, 0xaffe, 0xf8a1, 0xf8a2, 0xf8a3, 0xf8a4, - 0xf8a5, 0xf8a6, 0xf8a7, 0xf8a8, 0xf8a9, 0xf8aa, 0xf8ab, 0xf8ac, - 0xf8ad, 0xf8ae, 0xf8af, 0xf8b0, 0xf8b1, 0xf8b2, 0xf8b3, 0xf8b4, - 0xf8b5, 0xf8b6, 0xf8b7, 0xf8b8, 0xf8b9, 0xf8ba, 0xf8bb, 0xf8bc, - 0xf8bd, 0xf8be, 0xf8bf, 0xf8c0, 0xf8c1, 0xf8c2, 0xf8c3, 0xf8c4, - 0xf8c5, 0xf8c6, 0xf8c7, 0xf8c8, 0xf8c9, 0xf8ca, 0xf8cb, 0xf8cc, - 0xf8cd, 0xf8ce, 0xf8cf, 0xf8d0, 0xf8d1, 0xf8d2, 0xf8d3, 0xf8d4, - 0xf8d5, 0xf8d6, 0xf8d7, 0xf8d8, 0xf8d9, 0xf8da, 0xf8db, 0xf8dc, - 0xf8dd, 0xf8de, 0xf8df, 0xf8e0, 0xf8e1, 0xf8e2, 0xf8e3, 0xf8e4, - 0xf8e5, 0xf8e6, 0xf8e7, 0xf8e8, 0xf8e9, 0xf8ea, 0xf8eb, 0xf8ec, - 0xf8ed, 0xf8ee, 0xf8ef, 0xf8f0, 0xf8f1, 0xf8f2, 0xf8f3, 0xf8f4, - 0xf8f5, 0xf8f6, 0xf8f7, 0xf8f8, 0xf8f9, 0xf8fa, 0xf8fb, 0xf8fc, - 0xf8fd, 0xf8fe, 0xf9a1, 0xf9a2, 0xf9a3, 0xf9a4, 0xf9a5, 0xf9a6, - 0xf9a7, 0xf9a8, 0xf9a9, 0xf9aa, 0xf9ab, 0xf9ac, 0xf9ad, 0xf9ae, - 0xf9af, 0xf9b0, 0xf9b1, 0xf9b2, 0xf9b3, 0xf9b4, 0xf9b5, 0xf9b6, - 0xf9b7, 0xf9b8, 0xf9b9, 0xf9ba, 0xf9bb, 0xf9bc, 0xf9bd, 0xf9be, - 0xf9bf, 0xf9c0, 0xf9c1, 0xf9c2, 0xf9c3, 0xf9c4, 0xf9c5, 0xf9c6, - 0xf9c7, 0xf9c8, 0xf9c9, 0xf9ca, 0xf9cb, 0xf9cc, 0xf9cd, 0xf9ce, - 0xf9cf, 0xf9d0, 0xf9d1, 0xf9d2, 0xf9d3, 0xf9d4, 0xf9d5, 0xf9d6, - 0xf9d7, 0xf9d8, 0xf9d9, 0xf9da, 0xf9db, 0xf9dc, 0xf9dd, 0xf9de, - 0xf9df, 0xf9e0, 0xf9e1, 0xf9e2, 0xf9e3, 0xf9e4, 0xf9e5, 0xf9e6, - 0xf9e7, 0xf9e8, 0xf9e9, 0xf9ea, 0xf9eb, 0xf9ec, 0xf9ed, 0xf9ee, - 0xf9ef, 0xf9f0, 0xf9f1, 0xf9f2, 0xf9f3, 0xf9f4, 0xf9f5, 0xf9f6, - 0xf9f7, 0xf9f8, 0xf9f9, 0xf9fa, 0xf9fb, 0xf9fc, 0xf9fd, 0xf9fe, - 0xfaa1, 0xfaa2, 0xfaa3, 0xfaa4, 0xfaa5, 0xfaa6, 0xfaa7, 0xfaa8, - 0xfaa9, 0xfaaa, 0xfaab, 0xfaac, 0xfaad, 0xfaae, 0xfaaf, 0xfab0, - /* 0xe300 .. 0xe3ff */ - 0xfab1, 0xfab2, 0xfab3, 0xfab4, 0xfab5, 0xfab6, 0xfab7, 0xfab8, - 0xfab9, 0xfaba, 0xfabb, 0xfabc, 0xfabd, 0xfabe, 0xfabf, 0xfac0, - 0xfac1, 0xfac2, 0xfac3, 0xfac4, 0xfac5, 0xfac6, 0xfac7, 0xfac8, - 0xfac9, 0xfaca, 0xfacb, 0xfacc, 0xfacd, 0xface, 0xfacf, 0xfad0, - 0xfad1, 0xfad2, 0xfad3, 0xfad4, 0xfad5, 0xfad6, 0xfad7, 0xfad8, - 0xfad9, 0xfada, 0xfadb, 0xfadc, 0xfadd, 0xfade, 0xfadf, 0xfae0, - 0xfae1, 0xfae2, 0xfae3, 0xfae4, 0xfae5, 0xfae6, 0xfae7, 0xfae8, - 0xfae9, 0xfaea, 0xfaeb, 0xfaec, 0xfaed, 0xfaee, 0xfaef, 0xfaf0, - 0xfaf1, 0xfaf2, 0xfaf3, 0xfaf4, 0xfaf5, 0xfaf6, 0xfaf7, 0xfaf8, - 0xfaf9, 0xfafa, 0xfafb, 0xfafc, 0xfafd, 0xfafe, 0xfba1, 0xfba2, - 0xfba3, 0xfba4, 0xfba5, 0xfba6, 0xfba7, 0xfba8, 0xfba9, 0xfbaa, - 0xfbab, 0xfbac, 0xfbad, 0xfbae, 0xfbaf, 0xfbb0, 0xfbb1, 0xfbb2, - 0xfbb3, 0xfbb4, 0xfbb5, 0xfbb6, 0xfbb7, 0xfbb8, 0xfbb9, 0xfbba, - 0xfbbb, 0xfbbc, 0xfbbd, 0xfbbe, 0xfbbf, 0xfbc0, 0xfbc1, 0xfbc2, - 0xfbc3, 0xfbc4, 0xfbc5, 0xfbc6, 0xfbc7, 0xfbc8, 0xfbc9, 0xfbca, - 0xfbcb, 0xfbcc, 0xfbcd, 0xfbce, 0xfbcf, 0xfbd0, 0xfbd1, 0xfbd2, - 0xfbd3, 0xfbd4, 0xfbd5, 0xfbd6, 0xfbd7, 0xfbd8, 0xfbd9, 0xfbda, - 0xfbdb, 0xfbdc, 0xfbdd, 0xfbde, 0xfbdf, 0xfbe0, 0xfbe1, 0xfbe2, - 0xfbe3, 0xfbe4, 0xfbe5, 0xfbe6, 0xfbe7, 0xfbe8, 0xfbe9, 0xfbea, - 0xfbeb, 0xfbec, 0xfbed, 0xfbee, 0xfbef, 0xfbf0, 0xfbf1, 0xfbf2, - 0xfbf3, 0xfbf4, 0xfbf5, 0xfbf6, 0xfbf7, 0xfbf8, 0xfbf9, 0xfbfa, - 0xfbfb, 0xfbfc, 0xfbfd, 0xfbfe, 0xfca1, 0xfca2, 0xfca3, 0xfca4, - 0xfca5, 0xfca6, 0xfca7, 0xfca8, 0xfca9, 0xfcaa, 0xfcab, 0xfcac, - 0xfcad, 0xfcae, 0xfcaf, 0xfcb0, 0xfcb1, 0xfcb2, 0xfcb3, 0xfcb4, - 0xfcb5, 0xfcb6, 0xfcb7, 0xfcb8, 0xfcb9, 0xfcba, 0xfcbb, 0xfcbc, - 0xfcbd, 0xfcbe, 0xfcbf, 0xfcc0, 0xfcc1, 0xfcc2, 0xfcc3, 0xfcc4, - 0xfcc5, 0xfcc6, 0xfcc7, 0xfcc8, 0xfcc9, 0xfcca, 0xfccb, 0xfccc, - 0xfccd, 0xfcce, 0xfccf, 0xfcd0, 0xfcd1, 0xfcd2, 0xfcd3, 0xfcd4, - 0xfcd5, 0xfcd6, 0xfcd7, 0xfcd8, 0xfcd9, 0xfcda, 0xfcdb, 0xfcdc, - 0xfcdd, 0xfcde, 0xfcdf, 0xfce0, 0xfce1, 0xfce2, 0xfce3, 0xfce4, - 0xfce5, 0xfce6, 0xfce7, 0xfce8, 0xfce9, 0xfcea, 0xfceb, 0xfcec, - 0xfced, 0xfcee, 0xfcef, 0xfcf0, 0xfcf1, 0xfcf2, 0xfcf3, 0xfcf4, - /* 0xe400 .. 0xe4ff */ - 0xfcf5, 0xfcf6, 0xfcf7, 0xfcf8, 0xfcf9, 0xfcfa, 0xfcfb, 0xfcfc, - 0xfcfd, 0xfcfe, 0xfda1, 0xfda2, 0xfda3, 0xfda4, 0xfda5, 0xfda6, - 0xfda7, 0xfda8, 0xfda9, 0xfdaa, 0xfdab, 0xfdac, 0xfdad, 0xfdae, - 0xfdaf, 0xfdb0, 0xfdb1, 0xfdb2, 0xfdb3, 0xfdb4, 0xfdb5, 0xfdb6, - 0xfdb7, 0xfdb8, 0xfdb9, 0xfdba, 0xfdbb, 0xfdbc, 0xfdbd, 0xfdbe, - 0xfdbf, 0xfdc0, 0xfdc1, 0xfdc2, 0xfdc3, 0xfdc4, 0xfdc5, 0xfdc6, - 0xfdc7, 0xfdc8, 0xfdc9, 0xfdca, 0xfdcb, 0xfdcc, 0xfdcd, 0xfdce, - 0xfdcf, 0xfdd0, 0xfdd1, 0xfdd2, 0xfdd3, 0xfdd4, 0xfdd5, 0xfdd6, - 0xfdd7, 0xfdd8, 0xfdd9, 0xfdda, 0xfddb, 0xfddc, 0xfddd, 0xfdde, - 0xfddf, 0xfde0, 0xfde1, 0xfde2, 0xfde3, 0xfde4, 0xfde5, 0xfde6, - 0xfde7, 0xfde8, 0xfde9, 0xfdea, 0xfdeb, 0xfdec, 0xfded, 0xfdee, - 0xfdef, 0xfdf0, 0xfdf1, 0xfdf2, 0xfdf3, 0xfdf4, 0xfdf5, 0xfdf6, - 0xfdf7, 0xfdf8, 0xfdf9, 0xfdfa, 0xfdfb, 0xfdfc, 0xfdfd, 0xfdfe, - 0xfea1, 0xfea2, 0xfea3, 0xfea4, 0xfea5, 0xfea6, 0xfea7, 0xfea8, - 0xfea9, 0xfeaa, 0xfeab, 0xfeac, 0xfead, 0xfeae, 0xfeaf, 0xfeb0, - 0xfeb1, 0xfeb2, 0xfeb3, 0xfeb4, 0xfeb5, 0xfeb6, 0xfeb7, 0xfeb8, - 0xfeb9, 0xfeba, 0xfebb, 0xfebc, 0xfebd, 0xfebe, 0xfebf, 0xfec0, - 0xfec1, 0xfec2, 0xfec3, 0xfec4, 0xfec5, 0xfec6, 0xfec7, 0xfec8, - 0xfec9, 0xfeca, 0xfecb, 0xfecc, 0xfecd, 0xfece, 0xfecf, 0xfed0, - 0xfed1, 0xfed2, 0xfed3, 0xfed4, 0xfed5, 0xfed6, 0xfed7, 0xfed8, - 0xfed9, 0xfeda, 0xfedb, 0xfedc, 0xfedd, 0xfede, 0xfedf, 0xfee0, - 0xfee1, 0xfee2, 0xfee3, 0xfee4, 0xfee5, 0xfee6, 0xfee7, 0xfee8, - 0xfee9, 0xfeea, 0xfeeb, 0xfeec, 0xfeed, 0xfeee, 0xfeef, 0xfef0, - 0xfef1, 0xfef2, 0xfef3, 0xfef4, 0xfef5, 0xfef6, 0xfef7, 0xfef8, - 0xfef9, 0xfefa, 0xfefb, 0xfefc, 0xfefd, 0xfefe, 0xa140, 0xa141, - 0xa142, 0xa143, 0xa144, 0xa145, 0xa146, 0xa147, 0xa148, 0xa149, - 0xa14a, 0xa14b, 0xa14c, 0xa14d, 0xa14e, 0xa14f, 0xa150, 0xa151, - 0xa152, 0xa153, 0xa154, 0xa155, 0xa156, 0xa157, 0xa158, 0xa159, - 0xa15a, 0xa15b, 0xa15c, 0xa15d, 0xa15e, 0xa15f, 0xa160, 0xa161, - 0xa162, 0xa163, 0xa164, 0xa165, 0xa166, 0xa167, 0xa168, 0xa169, - 0xa16a, 0xa16b, 0xa16c, 0xa16d, 0xa16e, 0xa16f, 0xa170, 0xa171, - 0xa172, 0xa173, 0xa174, 0xa175, 0xa176, 0xa177, 0xa178, 0xa179, - /* 0xe500 .. 0xe5ff */ - 0xa17a, 0xa17b, 0xa17c, 0xa17d, 0xa17e, 0xa180, 0xa181, 0xa182, - 0xa183, 0xa184, 0xa185, 0xa186, 0xa187, 0xa188, 0xa189, 0xa18a, - 0xa18b, 0xa18c, 0xa18d, 0xa18e, 0xa18f, 0xa190, 0xa191, 0xa192, - 0xa193, 0xa194, 0xa195, 0xa196, 0xa197, 0xa198, 0xa199, 0xa19a, - 0xa19b, 0xa19c, 0xa19d, 0xa19e, 0xa19f, 0xa1a0, 0xa240, 0xa241, - 0xa242, 0xa243, 0xa244, 0xa245, 0xa246, 0xa247, 0xa248, 0xa249, - 0xa24a, 0xa24b, 0xa24c, 0xa24d, 0xa24e, 0xa24f, 0xa250, 0xa251, - 0xa252, 0xa253, 0xa254, 0xa255, 0xa256, 0xa257, 0xa258, 0xa259, - 0xa25a, 0xa25b, 0xa25c, 0xa25d, 0xa25e, 0xa25f, 0xa260, 0xa261, - 0xa262, 0xa263, 0xa264, 0xa265, 0xa266, 0xa267, 0xa268, 0xa269, - 0xa26a, 0xa26b, 0xa26c, 0xa26d, 0xa26e, 0xa26f, 0xa270, 0xa271, - 0xa272, 0xa273, 0xa274, 0xa275, 0xa276, 0xa277, 0xa278, 0xa279, - 0xa27a, 0xa27b, 0xa27c, 0xa27d, 0xa27e, 0xa280, 0xa281, 0xa282, - 0xa283, 0xa284, 0xa285, 0xa286, 0xa287, 0xa288, 0xa289, 0xa28a, - 0xa28b, 0xa28c, 0xa28d, 0xa28e, 0xa28f, 0xa290, 0xa291, 0xa292, - 0xa293, 0xa294, 0xa295, 0xa296, 0xa297, 0xa298, 0xa299, 0xa29a, - 0xa29b, 0xa29c, 0xa29d, 0xa29e, 0xa29f, 0xa2a0, 0xa340, 0xa341, - 0xa342, 0xa343, 0xa344, 0xa345, 0xa346, 0xa347, 0xa348, 0xa349, - 0xa34a, 0xa34b, 0xa34c, 0xa34d, 0xa34e, 0xa34f, 0xa350, 0xa351, - 0xa352, 0xa353, 0xa354, 0xa355, 0xa356, 0xa357, 0xa358, 0xa359, - 0xa35a, 0xa35b, 0xa35c, 0xa35d, 0xa35e, 0xa35f, 0xa360, 0xa361, - 0xa362, 0xa363, 0xa364, 0xa365, 0xa366, 0xa367, 0xa368, 0xa369, - 0xa36a, 0xa36b, 0xa36c, 0xa36d, 0xa36e, 0xa36f, 0xa370, 0xa371, - 0xa372, 0xa373, 0xa374, 0xa375, 0xa376, 0xa377, 0xa378, 0xa379, - 0xa37a, 0xa37b, 0xa37c, 0xa37d, 0xa37e, 0xa380, 0xa381, 0xa382, - 0xa383, 0xa384, 0xa385, 0xa386, 0xa387, 0xa388, 0xa389, 0xa38a, - 0xa38b, 0xa38c, 0xa38d, 0xa38e, 0xa38f, 0xa390, 0xa391, 0xa392, - 0xa393, 0xa394, 0xa395, 0xa396, 0xa397, 0xa398, 0xa399, 0xa39a, - 0xa39b, 0xa39c, 0xa39d, 0xa39e, 0xa39f, 0xa3a0, 0xa440, 0xa441, - 0xa442, 0xa443, 0xa444, 0xa445, 0xa446, 0xa447, 0xa448, 0xa449, - 0xa44a, 0xa44b, 0xa44c, 0xa44d, 0xa44e, 0xa44f, 0xa450, 0xa451, - 0xa452, 0xa453, 0xa454, 0xa455, 0xa456, 0xa457, 0xa458, 0xa459, - /* 0xe600 .. 0xe6ff */ - 0xa45a, 0xa45b, 0xa45c, 0xa45d, 0xa45e, 0xa45f, 0xa460, 0xa461, - 0xa462, 0xa463, 0xa464, 0xa465, 0xa466, 0xa467, 0xa468, 0xa469, - 0xa46a, 0xa46b, 0xa46c, 0xa46d, 0xa46e, 0xa46f, 0xa470, 0xa471, - 0xa472, 0xa473, 0xa474, 0xa475, 0xa476, 0xa477, 0xa478, 0xa479, - 0xa47a, 0xa47b, 0xa47c, 0xa47d, 0xa47e, 0xa480, 0xa481, 0xa482, - 0xa483, 0xa484, 0xa485, 0xa486, 0xa487, 0xa488, 0xa489, 0xa48a, - 0xa48b, 0xa48c, 0xa48d, 0xa48e, 0xa48f, 0xa490, 0xa491, 0xa492, - 0xa493, 0xa494, 0xa495, 0xa496, 0xa497, 0xa498, 0xa499, 0xa49a, - 0xa49b, 0xa49c, 0xa49d, 0xa49e, 0xa49f, 0xa4a0, 0xa540, 0xa541, - 0xa542, 0xa543, 0xa544, 0xa545, 0xa546, 0xa547, 0xa548, 0xa549, - 0xa54a, 0xa54b, 0xa54c, 0xa54d, 0xa54e, 0xa54f, 0xa550, 0xa551, - 0xa552, 0xa553, 0xa554, 0xa555, 0xa556, 0xa557, 0xa558, 0xa559, - 0xa55a, 0xa55b, 0xa55c, 0xa55d, 0xa55e, 0xa55f, 0xa560, 0xa561, - 0xa562, 0xa563, 0xa564, 0xa565, 0xa566, 0xa567, 0xa568, 0xa569, - 0xa56a, 0xa56b, 0xa56c, 0xa56d, 0xa56e, 0xa56f, 0xa570, 0xa571, - 0xa572, 0xa573, 0xa574, 0xa575, 0xa576, 0xa577, 0xa578, 0xa579, - 0xa57a, 0xa57b, 0xa57c, 0xa57d, 0xa57e, 0xa580, 0xa581, 0xa582, - 0xa583, 0xa584, 0xa585, 0xa586, 0xa587, 0xa588, 0xa589, 0xa58a, - 0xa58b, 0xa58c, 0xa58d, 0xa58e, 0xa58f, 0xa590, 0xa591, 0xa592, - 0xa593, 0xa594, 0xa595, 0xa596, 0xa597, 0xa598, 0xa599, 0xa59a, - 0xa59b, 0xa59c, 0xa59d, 0xa59e, 0xa59f, 0xa5a0, 0xa640, 0xa641, - 0xa642, 0xa643, 0xa644, 0xa645, 0xa646, 0xa647, 0xa648, 0xa649, - 0xa64a, 0xa64b, 0xa64c, 0xa64d, 0xa64e, 0xa64f, 0xa650, 0xa651, - 0xa652, 0xa653, 0xa654, 0xa655, 0xa656, 0xa657, 0xa658, 0xa659, - 0xa65a, 0xa65b, 0xa65c, 0xa65d, 0xa65e, 0xa65f, 0xa660, 0xa661, - 0xa662, 0xa663, 0xa664, 0xa665, 0xa666, 0xa667, 0xa668, 0xa669, - 0xa66a, 0xa66b, 0xa66c, 0xa66d, 0xa66e, 0xa66f, 0xa670, 0xa671, - 0xa672, 0xa673, 0xa674, 0xa675, 0xa676, 0xa677, 0xa678, 0xa679, - 0xa67a, 0xa67b, 0xa67c, 0xa67d, 0xa67e, 0xa680, 0xa681, 0xa682, - 0xa683, 0xa684, 0xa685, 0xa686, 0xa687, 0xa688, 0xa689, 0xa68a, - 0xa68b, 0xa68c, 0xa68d, 0xa68e, 0xa68f, 0xa690, 0xa691, 0xa692, - 0xa693, 0xa694, 0xa695, 0xa696, 0xa697, 0xa698, 0xa699, 0xa69a, - /* 0xe700 .. 0xe7ff */ - 0xa69b, 0xa69c, 0xa69d, 0xa69e, 0xa69f, 0xa6a0, 0xa740, 0xa741, - 0xa742, 0xa743, 0xa744, 0xa745, 0xa746, 0xa747, 0xa748, 0xa749, - 0xa74a, 0xa74b, 0xa74c, 0xa74d, 0xa74e, 0xa74f, 0xa750, 0xa751, - 0xa752, 0xa753, 0xa754, 0xa755, 0xa756, 0xa757, 0xa758, 0xa759, - 0xa75a, 0xa75b, 0xa75c, 0xa75d, 0xa75e, 0xa75f, 0xa760, 0xa761, - 0xa762, 0xa763, 0xa764, 0xa765, 0xa766, 0xa767, 0xa768, 0xa769, - 0xa76a, 0xa76b, 0xa76c, 0xa76d, 0xa76e, 0xa76f, 0xa770, 0xa771, - 0xa772, 0xa773, 0xa774, 0xa775, 0xa776, 0xa777, 0xa778, 0xa779, - 0xa77a, 0xa77b, 0xa77c, 0xa77d, 0xa77e, 0xa780, 0xa781, 0xa782, - 0xa783, 0xa784, 0xa785, 0xa786, 0xa787, 0xa788, 0xa789, 0xa78a, - 0xa78b, 0xa78c, 0xa78d, 0xa78e, 0xa78f, 0xa790, 0xa791, 0xa792, - 0xa793, 0xa794, 0xa795, 0xa796, 0xa797, 0xa798, 0xa799, 0xa79a, - 0xa79b, 0xa79c, 0xa79d, 0xa79e, 0xa79f, 0xa7a0, 0xa2ab, 0xa2ac, - 0xa2ad, 0xa2ae, 0xa2af, 0xa2b0, 0xa2e3, 0xa2e4, 0xa2ef, 0xa2f0, - 0xa2fd, 0xa2fe, 0xa4f4, 0xa4f5, 0xa4f6, 0xa4f7, 0xa4f8, 0xa4f9, - 0xa4fa, 0xa4fb, 0xa4fc, 0xa4fd, 0xa4fe, 0xa5f7, 0xa5f8, 0xa5f9, - 0xa5fa, 0xa5fb, 0xa5fc, 0xa5fd, 0xa5fe, 0xa6b9, 0xa6ba, 0xa6bb, - 0xa6bc, 0xa6bd, 0xa6be, 0xa6bf, 0xa6c0, 0xa6d9, 0xa6da, 0xa6db, - 0xa6dc, 0xa6dd, 0xa6de, 0xa6df, 0xa6ec, 0xa6ed, 0xa6f3, 0xa6f6, - 0xa6f7, 0xa6f8, 0xa6f9, 0xa6fa, 0xa6fb, 0xa6fc, 0xa6fd, 0xa6fe, - 0xa7c2, 0xa7c3, 0xa7c4, 0xa7c5, 0xa7c6, 0xa7c7, 0xa7c8, 0xa7c9, - 0xa7ca, 0xa7cb, 0xa7cc, 0xa7cd, 0xa7ce, 0xa7cf, 0xa7d0, 0xa7f2, - 0xa7f3, 0xa7f4, 0xa7f5, 0xa7f6, 0xa7f7, 0xa7f8, 0xa7f9, 0xa7fa, - 0xa7fb, 0xa7fc, 0xa7fd, 0xa7fe, 0xa896, 0xa897, 0xa898, 0xa899, - 0xa89a, 0xa89b, 0xa89c, 0xa89d, 0xa89e, 0xa89f, 0xa8a0, 0xa8bc, - 0xa8bf, 0xa8c1, 0xa8c2, 0xa8c3, 0xa8c4, 0xa8ea, 0xa8eb, 0xa8ec, - 0xa8ed, 0xa8ee, 0xa8ef, 0xa8f0, 0xa8f1, 0xa8f2, 0xa8f3, 0xa8f4, - 0xa8f5, 0xa8f6, 0xa8f7, 0xa8f8, 0xa8f9, 0xa8fa, 0xa8fb, 0xa8fc, - 0xa8fd, 0xa8fe, 0xa958, 0xa95b, 0xa95d, 0xa95e, 0xa95f, 0xa989, - 0xa98a, 0xa98b, 0xa98c, 0xa98d, 0xa98e, 0xa98f, 0xa990, 0xa991, - 0xa992, 0xa993, 0xa994, 0xa995, 0xa997, 0xa998, 0xa999, 0xa99a, - 0xa99b, 0xa99c, 0xa99d, 0xa99e, 0xa99f, 0xa9a0, 0xa9a1, 0xa9a2, - /* 0xe800 .. 0xe8ff */ - 0xa9a3, 0xa9f0, 0xa9f1, 0xa9f2, 0xa9f3, 0xa9f4, 0xa9f5, 0xa9f6, - 0xa9f7, 0xa9f8, 0xa9f9, 0xa9fa, 0xa9fb, 0xa9fc, 0xa9fd, 0xa9fe, - 0xd7fa, 0xd7fb, 0xd7fc, 0xd7fd, 0xd7fe, 0xfe50, 0xfe51, 0xfe52, - 0xfe53, 0xfe54, 0xfe55, 0xfe56, 0xfe57, 0xfe58, 0xfe59, 0xfe5a, - 0xfe5b, 0xfe5c, 0xfe5d, 0xfe5e, 0xfe5f, 0xfe60, 0xfe61, 0xfe62, - 0xfe63, 0xfe64, 0xfe65, 0xfe66, 0xfe67, 0xfe68, 0xfe69, 0xfe6a, - 0xfe6b, 0xfe6c, 0xfe6d, 0xfe6e, 0xfe6f, 0xfe70, 0xfe71, 0xfe72, - 0xfe73, 0xfe74, 0xfe75, 0xfe76, 0xfe77, 0xfe78, 0xfe79, 0xfe7a, - 0xfe7b, 0xfe7c, 0xfe7d, 0xfe7e, 0xfe80, 0xfe81, 0xfe82, 0xfe83, - 0xfe84, 0xfe85, 0xfe86, 0xfe87, 0xfe88, 0xfe89, 0xfe8a, 0xfe8b, - 0xfe8c, 0xfe8d, 0xfe8e, 0xfe8f, 0xfe90, 0xfe91, 0xfe92, 0xfe93, - 0xfe94, 0xfe95, 0xfe96, 0xfe97, 0xfe98, 0xfe99, 0xfe9a, 0xfe9b, - 0xfe9c, 0xfe9d, 0xfe9e, 0xfe9f, 0xfea0, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xf800 .. 0xf8ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x00ff, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xf900 .. 0xf9ff */ - 0xd84d, 0xb8fc, 0xdc87, 0xd95a, 0xbbac, 0xb4ae, 0xbee4, 0xfd94, - 0xfd94, 0xc6f5, 0xbdf0, 0xc0ae, 0xc4ce, 0x91d0, 0xb05d, 0xc15f, - 0xcc7d, 0xc2dd, 0xc2e3, 0xdf89, 0x98b7, 0xc2e5, 0xc0d3, 0xe7f3, - 0xc2e4, 0xc0d2, 0xf198, 0x8179, 0xc2d1, 0x99da, 0xa080, 0xcc6d, - 0xfb5b, 0x8db9, 0x9e45, 0xcb7b, 0xd268, 0xc0ad, 0xc544, 0xcf9e, - 0xc0c8, 0xc0ca, 0xc0cb, 0xc0c7, 0xfd9c, 0x81ed, 0xc0e4, 0x84da, - 0x93ef, 0x99a9, 0xa074, 0xb152, 0xc0cf, 0xcc4a, 0xcc94, 0xc2b7, - 0xc2b6, 0xf494, 0xfa98, 0xc2b5, 0xb593, 0xbe47, 0xc78a, 0xe49b, - 0xc2b9, 0xd593, 0x89c5, 0xc5aa, 0xbb5c, 0xc340, 0xc0ce, 0xc0da, - 0xd954, 0xc0d7, 0x89be, 0x8cd2, 0x98c7, 0x9c49, 0xc2a9, 0xc0db, - 0xbf7c, 0xc2aa, 0xc0d5, 0xc0df, 0x8443, 0xc1e8, 0xb6a0, 0xbe63, - 0xc1e2, 0xc1ea, 0xd778, 0x9282, 0x98b7, 0xd65a, 0xb5a4, 0x8c8e, - 0xc5ad, 0xc2ca, 0xae90, 0xb1b1, 0xb491, 0xb1e3, 0x8fcd, 0xb2bb, - 0xc3da, 0x94b5, 0xcbf7, 0x85a2, 0xc8fb, 0xcaa1, 0xc87e, 0xd566, - 0x9aa2, 0xb3bd, 0xc9f2, 0xcab0, 0xc8f4, 0xc2d3, 0xc2d4, 0xc1c1, - 0x83c9, 0xfd9d, 0xc1ba, 0xbc5a, 0xc1bc, 0xd58f, 0xc1bf, 0x84ee, - 0x85ce, 0xc5ae, 0x8f5d, 0xc2c3, 0x9e56, 0xb55a, 0xe982, 0xf350, - 0xfb90, 0xc0e8, 0xc1a6, 0x95d1, 0x9a76, 0xde5d, 0xc4ea, 0x917a, - 0x91d9, 0x93d3, 0x9d69, 0x9f92, 0xad49, 0xfd9e, 0xbe9a, 0xc293, - 0xdd82, 0xc98f, 0xdf42, 0xe580, 0xc1d0, 0xc1d3, 0xd1ca, 0xc1d2, - 0xc1d1, 0xd566, 0xc1ae, 0xc4ee, 0xc4ed, 0x9a9a, 0xba9f, 0xab43, - 0xc1ee, 0xe0f2, 0x8c8e, 0x8e58, 0xc1af, 0xc1e1, 0xac93, 0xc1e7, - 0xf1f6, 0xe28f, 0xc1e3, 0xec60, 0xee49, 0xc0fd, 0xb659, 0xf5b7, - 0xeb60, 0x90ba, 0xc1cb, 0xc1c5, 0xe5bc, 0xc4f2, 0xc1cf, 0x98b7, - 0xc1c7, 0xaf9f, 0xdea4, 0xdf7c, 0xfd88, 0x959e, 0xc8ee, 0x84a2, - 0x9683, 0xc1f8, 0xc1f7, 0xc1ef, 0xc1f0, 0xc1f4, 0xc1f2, 0xbc7e, - 0xee90, 0xc1f9, 0xc2be, 0xea91, 0x8290, 0x8d91, 0x9c53, 0xdd86, - 0xc2c9, 0x90fc, 0xc0f5, 0xc2ca, 0xc2a1, 0xc0fb, 0xc0f4, 0xc2c4, - 0xd2d7, 0xc0ee, 0xc0e6, 0xc4e0, 0xc0ed, 0xc1a1, 0xeebe, 0xfd9f, - 0xd165, 0xc0ef, 0xeb78, 0xc4e4, 0xc4e7, 0xc1df, 0x9ffb, 0xad55, - 0xcc41, 0xfda0, 0xf75b, 0xf7eb, 0xc1d6, 0xc1dc, 0xc552, 0xc1a2, - 0xf3d2, 0xc1a3, 0xa0ee, 0xd6cb, 0xd752, 0xcab2, 0xb2e8, 0xb4cc, - /* 0xfa00 .. 0xfaff */ - 0xc7d0, 0xb6c8, 0xcdd8, 0xccc7, 0xd5ac, 0xb6b4, 0xb1a9, 0xdd97, - 0xd0d0, 0xbdb5, 0xd28a, 0xc0aa, 0xfe40, 0xfe41, 0xfe42, 0xfe43, - 0x8956, 0xfe44, 0xc7e7, 0xfe45, 0xfe46, 0x8444, 0xd869, 0xd2e6, - 0xfe47, 0xc9f1, 0xcfe9, 0xb8a3, 0xbeb8, 0xbeab, 0xd3f0, 0xfe48, - 0xfe49, 0xfe4a, 0xd654, 0xfe4b, 0xfe4c, 0xd2dd, 0xb6bc, 0xfe4d, - 0xfe4e, 0xfe4f, 0xef88, 0xef95, 0xf05e, 0xfa51, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xfe00 .. 0xfeff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa955, 0xa6f2, 0x003f, 0xa6f4, 0xa6f5, 0xa6e0, 0xa6e1, 0xa6f0, - 0xa6f1, 0xa6e2, 0xa6e3, 0xa6ee, 0xa6ef, 0xa6e6, 0xa6e7, 0xa6e4, - 0xa6e5, 0xa6e8, 0xa6e9, 0xa6ea, 0xa6eb, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa968, 0xa969, 0xa96a, 0xa96b, 0xa96c, 0xa96d, 0xa96e, - 0xa96f, 0xa970, 0xa971, 0x003f, 0xa972, 0xa973, 0xa974, 0xa975, - 0x003f, 0xa976, 0xa977, 0xa978, 0xa979, 0xa97a, 0xa97b, 0xa97c, - 0xa97d, 0xa97e, 0xa980, 0xa981, 0xa982, 0xa983, 0xa984, 0x003f, - 0xa985, 0xa986, 0xa987, 0xa988, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xff00 .. 0xffff */ - 0x003f, 0xa3a1, 0xa3a2, 0xa3a3, 0xa1e7, 0xa3a5, 0xa3a6, 0xa3a7, - 0xa3a8, 0xa3a9, 0xa3aa, 0xa3ab, 0xa3ac, 0xa3ad, 0xa3ae, 0xa3af, - 0xa3b0, 0xa3b1, 0xa3b2, 0xa3b3, 0xa3b4, 0xa3b5, 0xa3b6, 0xa3b7, - 0xa3b8, 0xa3b9, 0xa3ba, 0xa3bb, 0xa3bc, 0xa3bd, 0xa3be, 0xa3bf, - 0xa3c0, 0xa3c1, 0xa3c2, 0xa3c3, 0xa3c4, 0xa3c5, 0xa3c6, 0xa3c7, - 0xa3c8, 0xa3c9, 0xa3ca, 0xa3cb, 0xa3cc, 0xa3cd, 0xa3ce, 0xa3cf, - 0xa3d0, 0xa3d1, 0xa3d2, 0xa3d3, 0xa3d4, 0xa3d5, 0xa3d6, 0xa3d7, - 0xa3d8, 0xa3d9, 0xa3da, 0xa3db, 0xa3dc, 0xa3dd, 0xa3de, 0xa3df, - 0xa3e0, 0xa3e1, 0xa3e2, 0xa3e3, 0xa3e4, 0xa3e5, 0xa3e6, 0xa3e7, - 0xa3e8, 0xa3e9, 0xa3ea, 0xa3eb, 0xa3ec, 0xa3ed, 0xa3ee, 0xa3ef, - 0xa3f0, 0xa3f1, 0xa3f2, 0xa3f3, 0xa3f4, 0xa3f5, 0xa3f6, 0xa3f7, - 0xa3f8, 0xa3f9, 0xa3fa, 0xa3fb, 0xa3fc, 0xa3fd, 0xa1ab, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa1e9, 0xa1ea, 0xa956, 0xa3fe, 0xa957, 0xa3a4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* defaults */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x7000, 0x7000, 0x7000, - 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, - 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, - 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, - 0x0500, 0x0600, 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x7000, - 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, - 0x0c00, 0x0d00, 0x0e00, 0x0f00, 0x7000, 0x7000, 0x7000, 0x7000, - 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, - 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, - 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x1000, 0x1100, - 0x1200, 0x1300, 0x1400, 0x1500, 0x1600, 0x1700, 0x1800, 0x1900, - 0x1a00, 0x1b00, 0x1c00, 0x1d00, 0x1e00, 0x1f00, 0x2000, 0x2100, - 0x2200, 0x2300, 0x2400, 0x2500, 0x2600, 0x2700, 0x2800, 0x2900, - 0x2a00, 0x2b00, 0x2c00, 0x2d00, 0x2e00, 0x2f00, 0x3000, 0x3100, - 0x3200, 0x3300, 0x3400, 0x3500, 0x3600, 0x3700, 0x3800, 0x3900, - 0x3a00, 0x3b00, 0x3c00, 0x3d00, 0x3e00, 0x3f00, 0x4000, 0x4100, - 0x4200, 0x4300, 0x4400, 0x4500, 0x4600, 0x4700, 0x4800, 0x4900, - 0x4a00, 0x4b00, 0x4c00, 0x4d00, 0x4e00, 0x4f00, 0x5000, 0x5100, - 0x5200, 0x5300, 0x5400, 0x5500, 0x5600, 0x5700, 0x5800, 0x5900, - 0x5a00, 0x5b00, 0x5c00, 0x5d00, 0x5e00, 0x5f00, 0x6000, 0x6100, - 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, - 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, - 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, - 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, - 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, - 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, - 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, - 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, - 0x6200, 0x6300, 0x6400, 0x6500, 0x6600, 0x6700, 0x6800, 0x6900, - 0x6a00, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, - 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, - 0x6b00, 0x6c00, 0x6d00, 0x7000, 0x7000, 0x7000, 0x6e00, 0x6f00 -}; - -const struct dbcs_table cptable_936 = -{ - { 936, 2, 0x003f, 0x003f, "ANSI/OEM Simplified Chinese GBK" }, - cp2uni, - cp2uni_leadbytes, - uni2cp_low, - uni2cp_high, - { - 0x81, 0xfe, 0x00, 0x00 - } -}; diff --git a/reactos/tools/unicode/c_949.c b/reactos/tools/unicode/c_949.c deleted file mode 100644 index 1cfcb71bc3b..00000000000 --- a/reactos/tools/unicode/c_949.c +++ /dev/null @@ -1,9204 +0,0 @@ -/* code page 949 (ANSI/OEM Korean Unified Hangul) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit949.txt */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[32512] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x0080, 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, 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, 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, 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, 0xf8f7, - /* lead byte 81 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xac02, 0xac03, 0xac05, 0xac06, 0xac0b, 0xac0c, 0xac0d, - 0xac0e, 0xac0f, 0xac18, 0xac1e, 0xac1f, 0xac21, 0xac22, 0xac23, - 0xac25, 0xac26, 0xac27, 0xac28, 0xac29, 0xac2a, 0xac2b, 0xac2e, - 0xac32, 0xac33, 0xac34, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xac35, 0xac36, 0xac37, 0xac3a, 0xac3b, 0xac3d, 0xac3e, - 0xac3f, 0xac41, 0xac42, 0xac43, 0xac44, 0xac45, 0xac46, 0xac47, - 0xac48, 0xac49, 0xac4a, 0xac4c, 0xac4e, 0xac4f, 0xac50, 0xac51, - 0xac52, 0xac53, 0xac55, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xac56, 0xac57, 0xac59, 0xac5a, 0xac5b, 0xac5d, 0xac5e, - 0xac5f, 0xac60, 0xac61, 0xac62, 0xac63, 0xac64, 0xac65, 0xac66, - 0xac67, 0xac68, 0xac69, 0xac6a, 0xac6b, 0xac6c, 0xac6d, 0xac6e, - 0xac6f, 0xac72, 0xac73, 0xac75, 0xac76, 0xac79, 0xac7b, 0xac7c, - 0xac7d, 0xac7e, 0xac7f, 0xac82, 0xac87, 0xac88, 0xac8d, 0xac8e, - 0xac8f, 0xac91, 0xac92, 0xac93, 0xac95, 0xac96, 0xac97, 0xac98, - 0xac99, 0xac9a, 0xac9b, 0xac9e, 0xaca2, 0xaca3, 0xaca4, 0xaca5, - 0xaca6, 0xaca7, 0xacab, 0xacad, 0xacae, 0xacb1, 0xacb2, 0xacb3, - 0xacb4, 0xacb5, 0xacb6, 0xacb7, 0xacba, 0xacbe, 0xacbf, 0xacc0, - 0xacc2, 0xacc3, 0xacc5, 0xacc6, 0xacc7, 0xacc9, 0xacca, 0xaccb, - 0xaccd, 0xacce, 0xaccf, 0xacd0, 0xacd1, 0xacd2, 0xacd3, 0xacd4, - 0xacd6, 0xacd8, 0xacd9, 0xacda, 0xacdb, 0xacdc, 0xacdd, 0xacde, - 0xacdf, 0xace2, 0xace3, 0xace5, 0xace6, 0xace9, 0xaceb, 0xaced, - 0xacee, 0xacf2, 0xacf4, 0xacf7, 0xacf8, 0xacf9, 0xacfa, 0xacfb, - 0xacfe, 0xacff, 0xad01, 0xad02, 0xad03, 0xad05, 0xad07, 0xad08, - 0xad09, 0xad0a, 0xad0b, 0xad0e, 0xad10, 0xad12, 0xad13, 0x003f, - /* lead byte 82 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xad14, 0xad15, 0xad16, 0xad17, 0xad19, 0xad1a, 0xad1b, - 0xad1d, 0xad1e, 0xad1f, 0xad21, 0xad22, 0xad23, 0xad24, 0xad25, - 0xad26, 0xad27, 0xad28, 0xad2a, 0xad2b, 0xad2e, 0xad2f, 0xad30, - 0xad31, 0xad32, 0xad33, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xad36, 0xad37, 0xad39, 0xad3a, 0xad3b, 0xad3d, 0xad3e, - 0xad3f, 0xad40, 0xad41, 0xad42, 0xad43, 0xad46, 0xad48, 0xad4a, - 0xad4b, 0xad4c, 0xad4d, 0xad4e, 0xad4f, 0xad51, 0xad52, 0xad53, - 0xad55, 0xad56, 0xad57, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xad59, 0xad5a, 0xad5b, 0xad5c, 0xad5d, 0xad5e, 0xad5f, - 0xad60, 0xad62, 0xad64, 0xad65, 0xad66, 0xad67, 0xad68, 0xad69, - 0xad6a, 0xad6b, 0xad6e, 0xad6f, 0xad71, 0xad72, 0xad77, 0xad78, - 0xad79, 0xad7a, 0xad7e, 0xad80, 0xad83, 0xad84, 0xad85, 0xad86, - 0xad87, 0xad8a, 0xad8b, 0xad8d, 0xad8e, 0xad8f, 0xad91, 0xad92, - 0xad93, 0xad94, 0xad95, 0xad96, 0xad97, 0xad98, 0xad99, 0xad9a, - 0xad9b, 0xad9e, 0xad9f, 0xada0, 0xada1, 0xada2, 0xada3, 0xada5, - 0xada6, 0xada7, 0xada8, 0xada9, 0xadaa, 0xadab, 0xadac, 0xadad, - 0xadae, 0xadaf, 0xadb0, 0xadb1, 0xadb2, 0xadb3, 0xadb4, 0xadb5, - 0xadb6, 0xadb8, 0xadb9, 0xadba, 0xadbb, 0xadbc, 0xadbd, 0xadbe, - 0xadbf, 0xadc2, 0xadc3, 0xadc5, 0xadc6, 0xadc7, 0xadc9, 0xadca, - 0xadcb, 0xadcc, 0xadcd, 0xadce, 0xadcf, 0xadd2, 0xadd4, 0xadd5, - 0xadd6, 0xadd7, 0xadd8, 0xadd9, 0xadda, 0xaddb, 0xaddd, 0xadde, - 0xaddf, 0xade1, 0xade2, 0xade3, 0xade5, 0xade6, 0xade7, 0xade8, - 0xade9, 0xadea, 0xadeb, 0xadec, 0xaded, 0xadee, 0xadef, 0xadf0, - 0xadf1, 0xadf2, 0xadf3, 0xadf4, 0xadf5, 0xadf6, 0xadf7, 0x003f, - /* lead byte 83 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xadfa, 0xadfb, 0xadfd, 0xadfe, 0xae02, 0xae03, 0xae04, - 0xae05, 0xae06, 0xae07, 0xae0a, 0xae0c, 0xae0e, 0xae0f, 0xae10, - 0xae11, 0xae12, 0xae13, 0xae15, 0xae16, 0xae17, 0xae18, 0xae19, - 0xae1a, 0xae1b, 0xae1c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xae1d, 0xae1e, 0xae1f, 0xae20, 0xae21, 0xae22, 0xae23, - 0xae24, 0xae25, 0xae26, 0xae27, 0xae28, 0xae29, 0xae2a, 0xae2b, - 0xae2c, 0xae2d, 0xae2e, 0xae2f, 0xae32, 0xae33, 0xae35, 0xae36, - 0xae39, 0xae3b, 0xae3c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xae3d, 0xae3e, 0xae3f, 0xae42, 0xae44, 0xae47, 0xae48, - 0xae49, 0xae4b, 0xae4f, 0xae51, 0xae52, 0xae53, 0xae55, 0xae57, - 0xae58, 0xae59, 0xae5a, 0xae5b, 0xae5e, 0xae62, 0xae63, 0xae64, - 0xae66, 0xae67, 0xae6a, 0xae6b, 0xae6d, 0xae6e, 0xae6f, 0xae71, - 0xae72, 0xae73, 0xae74, 0xae75, 0xae76, 0xae77, 0xae7a, 0xae7e, - 0xae7f, 0xae80, 0xae81, 0xae82, 0xae83, 0xae86, 0xae87, 0xae88, - 0xae89, 0xae8a, 0xae8b, 0xae8d, 0xae8e, 0xae8f, 0xae90, 0xae91, - 0xae92, 0xae93, 0xae94, 0xae95, 0xae96, 0xae97, 0xae98, 0xae99, - 0xae9a, 0xae9b, 0xae9c, 0xae9d, 0xae9e, 0xae9f, 0xaea0, 0xaea1, - 0xaea2, 0xaea3, 0xaea4, 0xaea5, 0xaea6, 0xaea7, 0xaea8, 0xaea9, - 0xaeaa, 0xaeab, 0xaeac, 0xaead, 0xaeae, 0xaeaf, 0xaeb0, 0xaeb1, - 0xaeb2, 0xaeb3, 0xaeb4, 0xaeb5, 0xaeb6, 0xaeb7, 0xaeb8, 0xaeb9, - 0xaeba, 0xaebb, 0xaebf, 0xaec1, 0xaec2, 0xaec3, 0xaec5, 0xaec6, - 0xaec7, 0xaec8, 0xaec9, 0xaeca, 0xaecb, 0xaece, 0xaed2, 0xaed3, - 0xaed4, 0xaed5, 0xaed6, 0xaed7, 0xaeda, 0xaedb, 0xaedd, 0xaede, - 0xaedf, 0xaee0, 0xaee1, 0xaee2, 0xaee3, 0xaee4, 0xaee5, 0x003f, - /* lead byte 84 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xaee6, 0xaee7, 0xaee9, 0xaeea, 0xaeec, 0xaeee, 0xaeef, - 0xaef0, 0xaef1, 0xaef2, 0xaef3, 0xaef5, 0xaef6, 0xaef7, 0xaef9, - 0xaefa, 0xaefb, 0xaefd, 0xaefe, 0xaeff, 0xaf00, 0xaf01, 0xaf02, - 0xaf03, 0xaf04, 0xaf05, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xaf06, 0xaf09, 0xaf0a, 0xaf0b, 0xaf0c, 0xaf0e, 0xaf0f, - 0xaf11, 0xaf12, 0xaf13, 0xaf14, 0xaf15, 0xaf16, 0xaf17, 0xaf18, - 0xaf19, 0xaf1a, 0xaf1b, 0xaf1c, 0xaf1d, 0xaf1e, 0xaf1f, 0xaf20, - 0xaf21, 0xaf22, 0xaf23, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xaf24, 0xaf25, 0xaf26, 0xaf27, 0xaf28, 0xaf29, 0xaf2a, - 0xaf2b, 0xaf2e, 0xaf2f, 0xaf31, 0xaf33, 0xaf35, 0xaf36, 0xaf37, - 0xaf38, 0xaf39, 0xaf3a, 0xaf3b, 0xaf3e, 0xaf40, 0xaf44, 0xaf45, - 0xaf46, 0xaf47, 0xaf4a, 0xaf4b, 0xaf4c, 0xaf4d, 0xaf4e, 0xaf4f, - 0xaf51, 0xaf52, 0xaf53, 0xaf54, 0xaf55, 0xaf56, 0xaf57, 0xaf58, - 0xaf59, 0xaf5a, 0xaf5b, 0xaf5e, 0xaf5f, 0xaf60, 0xaf61, 0xaf62, - 0xaf63, 0xaf66, 0xaf67, 0xaf68, 0xaf69, 0xaf6a, 0xaf6b, 0xaf6c, - 0xaf6d, 0xaf6e, 0xaf6f, 0xaf70, 0xaf71, 0xaf72, 0xaf73, 0xaf74, - 0xaf75, 0xaf76, 0xaf77, 0xaf78, 0xaf7a, 0xaf7b, 0xaf7c, 0xaf7d, - 0xaf7e, 0xaf7f, 0xaf81, 0xaf82, 0xaf83, 0xaf85, 0xaf86, 0xaf87, - 0xaf89, 0xaf8a, 0xaf8b, 0xaf8c, 0xaf8d, 0xaf8e, 0xaf8f, 0xaf92, - 0xaf93, 0xaf94, 0xaf96, 0xaf97, 0xaf98, 0xaf99, 0xaf9a, 0xaf9b, - 0xaf9d, 0xaf9e, 0xaf9f, 0xafa0, 0xafa1, 0xafa2, 0xafa3, 0xafa4, - 0xafa5, 0xafa6, 0xafa7, 0xafa8, 0xafa9, 0xafaa, 0xafab, 0xafac, - 0xafad, 0xafae, 0xafaf, 0xafb0, 0xafb1, 0xafb2, 0xafb3, 0xafb4, - 0xafb5, 0xafb6, 0xafb7, 0xafba, 0xafbb, 0xafbd, 0xafbe, 0x003f, - /* lead byte 85 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xafbf, 0xafc1, 0xafc2, 0xafc3, 0xafc4, 0xafc5, 0xafc6, - 0xafca, 0xafcc, 0xafcf, 0xafd0, 0xafd1, 0xafd2, 0xafd3, 0xafd5, - 0xafd6, 0xafd7, 0xafd8, 0xafd9, 0xafda, 0xafdb, 0xafdd, 0xafde, - 0xafdf, 0xafe0, 0xafe1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xafe2, 0xafe3, 0xafe4, 0xafe5, 0xafe6, 0xafe7, 0xafea, - 0xafeb, 0xafec, 0xafed, 0xafee, 0xafef, 0xaff2, 0xaff3, 0xaff5, - 0xaff6, 0xaff7, 0xaff9, 0xaffa, 0xaffb, 0xaffc, 0xaffd, 0xaffe, - 0xafff, 0xb002, 0xb003, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb005, 0xb006, 0xb007, 0xb008, 0xb009, 0xb00a, 0xb00b, - 0xb00d, 0xb00e, 0xb00f, 0xb011, 0xb012, 0xb013, 0xb015, 0xb016, - 0xb017, 0xb018, 0xb019, 0xb01a, 0xb01b, 0xb01e, 0xb01f, 0xb020, - 0xb021, 0xb022, 0xb023, 0xb024, 0xb025, 0xb026, 0xb027, 0xb029, - 0xb02a, 0xb02b, 0xb02c, 0xb02d, 0xb02e, 0xb02f, 0xb030, 0xb031, - 0xb032, 0xb033, 0xb034, 0xb035, 0xb036, 0xb037, 0xb038, 0xb039, - 0xb03a, 0xb03b, 0xb03c, 0xb03d, 0xb03e, 0xb03f, 0xb040, 0xb041, - 0xb042, 0xb043, 0xb046, 0xb047, 0xb049, 0xb04b, 0xb04d, 0xb04f, - 0xb050, 0xb051, 0xb052, 0xb056, 0xb058, 0xb05a, 0xb05b, 0xb05c, - 0xb05e, 0xb05f, 0xb060, 0xb061, 0xb062, 0xb063, 0xb064, 0xb065, - 0xb066, 0xb067, 0xb068, 0xb069, 0xb06a, 0xb06b, 0xb06c, 0xb06d, - 0xb06e, 0xb06f, 0xb070, 0xb071, 0xb072, 0xb073, 0xb074, 0xb075, - 0xb076, 0xb077, 0xb078, 0xb079, 0xb07a, 0xb07b, 0xb07e, 0xb07f, - 0xb081, 0xb082, 0xb083, 0xb085, 0xb086, 0xb087, 0xb088, 0xb089, - 0xb08a, 0xb08b, 0xb08e, 0xb090, 0xb092, 0xb093, 0xb094, 0xb095, - 0xb096, 0xb097, 0xb09b, 0xb09d, 0xb09e, 0xb0a3, 0xb0a4, 0x003f, - /* lead byte 86 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb0a5, 0xb0a6, 0xb0a7, 0xb0aa, 0xb0b0, 0xb0b2, 0xb0b6, - 0xb0b7, 0xb0b9, 0xb0ba, 0xb0bb, 0xb0bd, 0xb0be, 0xb0bf, 0xb0c0, - 0xb0c1, 0xb0c2, 0xb0c3, 0xb0c6, 0xb0ca, 0xb0cb, 0xb0cc, 0xb0cd, - 0xb0ce, 0xb0cf, 0xb0d2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb0d3, 0xb0d5, 0xb0d6, 0xb0d7, 0xb0d9, 0xb0da, 0xb0db, - 0xb0dc, 0xb0dd, 0xb0de, 0xb0df, 0xb0e1, 0xb0e2, 0xb0e3, 0xb0e4, - 0xb0e6, 0xb0e7, 0xb0e8, 0xb0e9, 0xb0ea, 0xb0eb, 0xb0ec, 0xb0ed, - 0xb0ee, 0xb0ef, 0xb0f0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb0f1, 0xb0f2, 0xb0f3, 0xb0f4, 0xb0f5, 0xb0f6, 0xb0f7, - 0xb0f8, 0xb0f9, 0xb0fa, 0xb0fb, 0xb0fc, 0xb0fd, 0xb0fe, 0xb0ff, - 0xb100, 0xb101, 0xb102, 0xb103, 0xb104, 0xb105, 0xb106, 0xb107, - 0xb10a, 0xb10d, 0xb10e, 0xb10f, 0xb111, 0xb114, 0xb115, 0xb116, - 0xb117, 0xb11a, 0xb11e, 0xb11f, 0xb120, 0xb121, 0xb122, 0xb126, - 0xb127, 0xb129, 0xb12a, 0xb12b, 0xb12d, 0xb12e, 0xb12f, 0xb130, - 0xb131, 0xb132, 0xb133, 0xb136, 0xb13a, 0xb13b, 0xb13c, 0xb13d, - 0xb13e, 0xb13f, 0xb142, 0xb143, 0xb145, 0xb146, 0xb147, 0xb149, - 0xb14a, 0xb14b, 0xb14c, 0xb14d, 0xb14e, 0xb14f, 0xb152, 0xb153, - 0xb156, 0xb157, 0xb159, 0xb15a, 0xb15b, 0xb15d, 0xb15e, 0xb15f, - 0xb161, 0xb162, 0xb163, 0xb164, 0xb165, 0xb166, 0xb167, 0xb168, - 0xb169, 0xb16a, 0xb16b, 0xb16c, 0xb16d, 0xb16e, 0xb16f, 0xb170, - 0xb171, 0xb172, 0xb173, 0xb174, 0xb175, 0xb176, 0xb177, 0xb17a, - 0xb17b, 0xb17d, 0xb17e, 0xb17f, 0xb181, 0xb183, 0xb184, 0xb185, - 0xb186, 0xb187, 0xb18a, 0xb18c, 0xb18e, 0xb18f, 0xb190, 0xb191, - 0xb195, 0xb196, 0xb197, 0xb199, 0xb19a, 0xb19b, 0xb19d, 0x003f, - /* lead byte 87 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb19e, 0xb19f, 0xb1a0, 0xb1a1, 0xb1a2, 0xb1a3, 0xb1a4, - 0xb1a5, 0xb1a6, 0xb1a7, 0xb1a9, 0xb1aa, 0xb1ab, 0xb1ac, 0xb1ad, - 0xb1ae, 0xb1af, 0xb1b0, 0xb1b1, 0xb1b2, 0xb1b3, 0xb1b4, 0xb1b5, - 0xb1b6, 0xb1b7, 0xb1b8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb1b9, 0xb1ba, 0xb1bb, 0xb1bc, 0xb1bd, 0xb1be, 0xb1bf, - 0xb1c0, 0xb1c1, 0xb1c2, 0xb1c3, 0xb1c4, 0xb1c5, 0xb1c6, 0xb1c7, - 0xb1c8, 0xb1c9, 0xb1ca, 0xb1cb, 0xb1cd, 0xb1ce, 0xb1cf, 0xb1d1, - 0xb1d2, 0xb1d3, 0xb1d5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb1d6, 0xb1d7, 0xb1d8, 0xb1d9, 0xb1da, 0xb1db, 0xb1de, - 0xb1e0, 0xb1e1, 0xb1e2, 0xb1e3, 0xb1e4, 0xb1e5, 0xb1e6, 0xb1e7, - 0xb1ea, 0xb1eb, 0xb1ed, 0xb1ee, 0xb1ef, 0xb1f1, 0xb1f2, 0xb1f3, - 0xb1f4, 0xb1f5, 0xb1f6, 0xb1f7, 0xb1f8, 0xb1fa, 0xb1fc, 0xb1fe, - 0xb1ff, 0xb200, 0xb201, 0xb202, 0xb203, 0xb206, 0xb207, 0xb209, - 0xb20a, 0xb20d, 0xb20e, 0xb20f, 0xb210, 0xb211, 0xb212, 0xb213, - 0xb216, 0xb218, 0xb21a, 0xb21b, 0xb21c, 0xb21d, 0xb21e, 0xb21f, - 0xb221, 0xb222, 0xb223, 0xb224, 0xb225, 0xb226, 0xb227, 0xb228, - 0xb229, 0xb22a, 0xb22b, 0xb22c, 0xb22d, 0xb22e, 0xb22f, 0xb230, - 0xb231, 0xb232, 0xb233, 0xb235, 0xb236, 0xb237, 0xb238, 0xb239, - 0xb23a, 0xb23b, 0xb23d, 0xb23e, 0xb23f, 0xb240, 0xb241, 0xb242, - 0xb243, 0xb244, 0xb245, 0xb246, 0xb247, 0xb248, 0xb249, 0xb24a, - 0xb24b, 0xb24c, 0xb24d, 0xb24e, 0xb24f, 0xb250, 0xb251, 0xb252, - 0xb253, 0xb254, 0xb255, 0xb256, 0xb257, 0xb259, 0xb25a, 0xb25b, - 0xb25d, 0xb25e, 0xb25f, 0xb261, 0xb262, 0xb263, 0xb264, 0xb265, - 0xb266, 0xb267, 0xb26a, 0xb26b, 0xb26c, 0xb26d, 0xb26e, 0x003f, - /* lead byte 88 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb26f, 0xb270, 0xb271, 0xb272, 0xb273, 0xb276, 0xb277, - 0xb278, 0xb279, 0xb27a, 0xb27b, 0xb27d, 0xb27e, 0xb27f, 0xb280, - 0xb281, 0xb282, 0xb283, 0xb286, 0xb287, 0xb288, 0xb28a, 0xb28b, - 0xb28c, 0xb28d, 0xb28e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb28f, 0xb292, 0xb293, 0xb295, 0xb296, 0xb297, 0xb29b, - 0xb29c, 0xb29d, 0xb29e, 0xb29f, 0xb2a2, 0xb2a4, 0xb2a7, 0xb2a8, - 0xb2a9, 0xb2ab, 0xb2ad, 0xb2ae, 0xb2af, 0xb2b1, 0xb2b2, 0xb2b3, - 0xb2b5, 0xb2b6, 0xb2b7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb2b8, 0xb2b9, 0xb2ba, 0xb2bb, 0xb2bc, 0xb2bd, 0xb2be, - 0xb2bf, 0xb2c0, 0xb2c1, 0xb2c2, 0xb2c3, 0xb2c4, 0xb2c5, 0xb2c6, - 0xb2c7, 0xb2ca, 0xb2cb, 0xb2cd, 0xb2ce, 0xb2cf, 0xb2d1, 0xb2d3, - 0xb2d4, 0xb2d5, 0xb2d6, 0xb2d7, 0xb2da, 0xb2dc, 0xb2de, 0xb2df, - 0xb2e0, 0xb2e1, 0xb2e3, 0xb2e7, 0xb2e9, 0xb2ea, 0xb2f0, 0xb2f1, - 0xb2f2, 0xb2f6, 0xb2fc, 0xb2fd, 0xb2fe, 0xb302, 0xb303, 0xb305, - 0xb306, 0xb307, 0xb309, 0xb30a, 0xb30b, 0xb30c, 0xb30d, 0xb30e, - 0xb30f, 0xb312, 0xb316, 0xb317, 0xb318, 0xb319, 0xb31a, 0xb31b, - 0xb31d, 0xb31e, 0xb31f, 0xb320, 0xb321, 0xb322, 0xb323, 0xb324, - 0xb325, 0xb326, 0xb327, 0xb328, 0xb329, 0xb32a, 0xb32b, 0xb32c, - 0xb32d, 0xb32e, 0xb32f, 0xb330, 0xb331, 0xb332, 0xb333, 0xb334, - 0xb335, 0xb336, 0xb337, 0xb338, 0xb339, 0xb33a, 0xb33b, 0xb33c, - 0xb33d, 0xb33e, 0xb33f, 0xb340, 0xb341, 0xb342, 0xb343, 0xb344, - 0xb345, 0xb346, 0xb347, 0xb348, 0xb349, 0xb34a, 0xb34b, 0xb34c, - 0xb34d, 0xb34e, 0xb34f, 0xb350, 0xb351, 0xb352, 0xb353, 0xb357, - 0xb359, 0xb35a, 0xb35d, 0xb360, 0xb361, 0xb362, 0xb363, 0x003f, - /* lead byte 89 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb366, 0xb368, 0xb36a, 0xb36c, 0xb36d, 0xb36f, 0xb372, - 0xb373, 0xb375, 0xb376, 0xb377, 0xb379, 0xb37a, 0xb37b, 0xb37c, - 0xb37d, 0xb37e, 0xb37f, 0xb382, 0xb386, 0xb387, 0xb388, 0xb389, - 0xb38a, 0xb38b, 0xb38d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb38e, 0xb38f, 0xb391, 0xb392, 0xb393, 0xb395, 0xb396, - 0xb397, 0xb398, 0xb399, 0xb39a, 0xb39b, 0xb39c, 0xb39d, 0xb39e, - 0xb39f, 0xb3a2, 0xb3a3, 0xb3a4, 0xb3a5, 0xb3a6, 0xb3a7, 0xb3a9, - 0xb3aa, 0xb3ab, 0xb3ad, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb3ae, 0xb3af, 0xb3b0, 0xb3b1, 0xb3b2, 0xb3b3, 0xb3b4, - 0xb3b5, 0xb3b6, 0xb3b7, 0xb3b8, 0xb3b9, 0xb3ba, 0xb3bb, 0xb3bc, - 0xb3bd, 0xb3be, 0xb3bf, 0xb3c0, 0xb3c1, 0xb3c2, 0xb3c3, 0xb3c6, - 0xb3c7, 0xb3c9, 0xb3ca, 0xb3cd, 0xb3cf, 0xb3d1, 0xb3d2, 0xb3d3, - 0xb3d6, 0xb3d8, 0xb3da, 0xb3dc, 0xb3de, 0xb3df, 0xb3e1, 0xb3e2, - 0xb3e3, 0xb3e5, 0xb3e6, 0xb3e7, 0xb3e9, 0xb3ea, 0xb3eb, 0xb3ec, - 0xb3ed, 0xb3ee, 0xb3ef, 0xb3f0, 0xb3f1, 0xb3f2, 0xb3f3, 0xb3f4, - 0xb3f5, 0xb3f6, 0xb3f7, 0xb3f8, 0xb3f9, 0xb3fa, 0xb3fb, 0xb3fd, - 0xb3fe, 0xb3ff, 0xb400, 0xb401, 0xb402, 0xb403, 0xb404, 0xb405, - 0xb406, 0xb407, 0xb408, 0xb409, 0xb40a, 0xb40b, 0xb40c, 0xb40d, - 0xb40e, 0xb40f, 0xb411, 0xb412, 0xb413, 0xb414, 0xb415, 0xb416, - 0xb417, 0xb419, 0xb41a, 0xb41b, 0xb41d, 0xb41e, 0xb41f, 0xb421, - 0xb422, 0xb423, 0xb424, 0xb425, 0xb426, 0xb427, 0xb42a, 0xb42c, - 0xb42d, 0xb42e, 0xb42f, 0xb430, 0xb431, 0xb432, 0xb433, 0xb435, - 0xb436, 0xb437, 0xb438, 0xb439, 0xb43a, 0xb43b, 0xb43c, 0xb43d, - 0xb43e, 0xb43f, 0xb440, 0xb441, 0xb442, 0xb443, 0xb444, 0x003f, - /* lead byte 8a */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb445, 0xb446, 0xb447, 0xb448, 0xb449, 0xb44a, 0xb44b, - 0xb44c, 0xb44d, 0xb44e, 0xb44f, 0xb452, 0xb453, 0xb455, 0xb456, - 0xb457, 0xb459, 0xb45a, 0xb45b, 0xb45c, 0xb45d, 0xb45e, 0xb45f, - 0xb462, 0xb464, 0xb466, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb467, 0xb468, 0xb469, 0xb46a, 0xb46b, 0xb46d, 0xb46e, - 0xb46f, 0xb470, 0xb471, 0xb472, 0xb473, 0xb474, 0xb475, 0xb476, - 0xb477, 0xb478, 0xb479, 0xb47a, 0xb47b, 0xb47c, 0xb47d, 0xb47e, - 0xb47f, 0xb481, 0xb482, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb483, 0xb484, 0xb485, 0xb486, 0xb487, 0xb489, 0xb48a, - 0xb48b, 0xb48c, 0xb48d, 0xb48e, 0xb48f, 0xb490, 0xb491, 0xb492, - 0xb493, 0xb494, 0xb495, 0xb496, 0xb497, 0xb498, 0xb499, 0xb49a, - 0xb49b, 0xb49c, 0xb49e, 0xb49f, 0xb4a0, 0xb4a1, 0xb4a2, 0xb4a3, - 0xb4a5, 0xb4a6, 0xb4a7, 0xb4a9, 0xb4aa, 0xb4ab, 0xb4ad, 0xb4ae, - 0xb4af, 0xb4b0, 0xb4b1, 0xb4b2, 0xb4b3, 0xb4b4, 0xb4b6, 0xb4b8, - 0xb4ba, 0xb4bb, 0xb4bc, 0xb4bd, 0xb4be, 0xb4bf, 0xb4c1, 0xb4c2, - 0xb4c3, 0xb4c5, 0xb4c6, 0xb4c7, 0xb4c9, 0xb4ca, 0xb4cb, 0xb4cc, - 0xb4cd, 0xb4ce, 0xb4cf, 0xb4d1, 0xb4d2, 0xb4d3, 0xb4d4, 0xb4d6, - 0xb4d7, 0xb4d8, 0xb4d9, 0xb4da, 0xb4db, 0xb4de, 0xb4df, 0xb4e1, - 0xb4e2, 0xb4e5, 0xb4e7, 0xb4e8, 0xb4e9, 0xb4ea, 0xb4eb, 0xb4ee, - 0xb4f0, 0xb4f2, 0xb4f3, 0xb4f4, 0xb4f5, 0xb4f6, 0xb4f7, 0xb4f9, - 0xb4fa, 0xb4fb, 0xb4fc, 0xb4fd, 0xb4fe, 0xb4ff, 0xb500, 0xb501, - 0xb502, 0xb503, 0xb504, 0xb505, 0xb506, 0xb507, 0xb508, 0xb509, - 0xb50a, 0xb50b, 0xb50c, 0xb50d, 0xb50e, 0xb50f, 0xb510, 0xb511, - 0xb512, 0xb513, 0xb516, 0xb517, 0xb519, 0xb51a, 0xb51d, 0x003f, - /* lead byte 8b */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb51e, 0xb51f, 0xb520, 0xb521, 0xb522, 0xb523, 0xb526, - 0xb52b, 0xb52c, 0xb52d, 0xb52e, 0xb52f, 0xb532, 0xb533, 0xb535, - 0xb536, 0xb537, 0xb539, 0xb53a, 0xb53b, 0xb53c, 0xb53d, 0xb53e, - 0xb53f, 0xb542, 0xb546, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb547, 0xb548, 0xb549, 0xb54a, 0xb54e, 0xb54f, 0xb551, - 0xb552, 0xb553, 0xb555, 0xb556, 0xb557, 0xb558, 0xb559, 0xb55a, - 0xb55b, 0xb55e, 0xb562, 0xb563, 0xb564, 0xb565, 0xb566, 0xb567, - 0xb568, 0xb569, 0xb56a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb56b, 0xb56c, 0xb56d, 0xb56e, 0xb56f, 0xb570, 0xb571, - 0xb572, 0xb573, 0xb574, 0xb575, 0xb576, 0xb577, 0xb578, 0xb579, - 0xb57a, 0xb57b, 0xb57c, 0xb57d, 0xb57e, 0xb57f, 0xb580, 0xb581, - 0xb582, 0xb583, 0xb584, 0xb585, 0xb586, 0xb587, 0xb588, 0xb589, - 0xb58a, 0xb58b, 0xb58c, 0xb58d, 0xb58e, 0xb58f, 0xb590, 0xb591, - 0xb592, 0xb593, 0xb594, 0xb595, 0xb596, 0xb597, 0xb598, 0xb599, - 0xb59a, 0xb59b, 0xb59c, 0xb59d, 0xb59e, 0xb59f, 0xb5a2, 0xb5a3, - 0xb5a5, 0xb5a6, 0xb5a7, 0xb5a9, 0xb5ac, 0xb5ad, 0xb5ae, 0xb5af, - 0xb5b2, 0xb5b6, 0xb5b7, 0xb5b8, 0xb5b9, 0xb5ba, 0xb5be, 0xb5bf, - 0xb5c1, 0xb5c2, 0xb5c3, 0xb5c5, 0xb5c6, 0xb5c7, 0xb5c8, 0xb5c9, - 0xb5ca, 0xb5cb, 0xb5ce, 0xb5d2, 0xb5d3, 0xb5d4, 0xb5d5, 0xb5d6, - 0xb5d7, 0xb5d9, 0xb5da, 0xb5db, 0xb5dc, 0xb5dd, 0xb5de, 0xb5df, - 0xb5e0, 0xb5e1, 0xb5e2, 0xb5e3, 0xb5e4, 0xb5e5, 0xb5e6, 0xb5e7, - 0xb5e8, 0xb5e9, 0xb5ea, 0xb5eb, 0xb5ed, 0xb5ee, 0xb5ef, 0xb5f0, - 0xb5f1, 0xb5f2, 0xb5f3, 0xb5f4, 0xb5f5, 0xb5f6, 0xb5f7, 0xb5f8, - 0xb5f9, 0xb5fa, 0xb5fb, 0xb5fc, 0xb5fd, 0xb5fe, 0xb5ff, 0x003f, - /* lead byte 8c */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb600, 0xb601, 0xb602, 0xb603, 0xb604, 0xb605, 0xb606, - 0xb607, 0xb608, 0xb609, 0xb60a, 0xb60b, 0xb60c, 0xb60d, 0xb60e, - 0xb60f, 0xb612, 0xb613, 0xb615, 0xb616, 0xb617, 0xb619, 0xb61a, - 0xb61b, 0xb61c, 0xb61d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb61e, 0xb61f, 0xb620, 0xb621, 0xb622, 0xb623, 0xb624, - 0xb626, 0xb627, 0xb628, 0xb629, 0xb62a, 0xb62b, 0xb62d, 0xb62e, - 0xb62f, 0xb630, 0xb631, 0xb632, 0xb633, 0xb635, 0xb636, 0xb637, - 0xb638, 0xb639, 0xb63a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb63b, 0xb63c, 0xb63d, 0xb63e, 0xb63f, 0xb640, 0xb641, - 0xb642, 0xb643, 0xb644, 0xb645, 0xb646, 0xb647, 0xb649, 0xb64a, - 0xb64b, 0xb64c, 0xb64d, 0xb64e, 0xb64f, 0xb650, 0xb651, 0xb652, - 0xb653, 0xb654, 0xb655, 0xb656, 0xb657, 0xb658, 0xb659, 0xb65a, - 0xb65b, 0xb65c, 0xb65d, 0xb65e, 0xb65f, 0xb660, 0xb661, 0xb662, - 0xb663, 0xb665, 0xb666, 0xb667, 0xb669, 0xb66a, 0xb66b, 0xb66c, - 0xb66d, 0xb66e, 0xb66f, 0xb670, 0xb671, 0xb672, 0xb673, 0xb674, - 0xb675, 0xb676, 0xb677, 0xb678, 0xb679, 0xb67a, 0xb67b, 0xb67c, - 0xb67d, 0xb67e, 0xb67f, 0xb680, 0xb681, 0xb682, 0xb683, 0xb684, - 0xb685, 0xb686, 0xb687, 0xb688, 0xb689, 0xb68a, 0xb68b, 0xb68c, - 0xb68d, 0xb68e, 0xb68f, 0xb690, 0xb691, 0xb692, 0xb693, 0xb694, - 0xb695, 0xb696, 0xb697, 0xb698, 0xb699, 0xb69a, 0xb69b, 0xb69e, - 0xb69f, 0xb6a1, 0xb6a2, 0xb6a3, 0xb6a5, 0xb6a6, 0xb6a7, 0xb6a8, - 0xb6a9, 0xb6aa, 0xb6ad, 0xb6ae, 0xb6af, 0xb6b0, 0xb6b2, 0xb6b3, - 0xb6b4, 0xb6b5, 0xb6b6, 0xb6b7, 0xb6b8, 0xb6b9, 0xb6ba, 0xb6bb, - 0xb6bc, 0xb6bd, 0xb6be, 0xb6bf, 0xb6c0, 0xb6c1, 0xb6c2, 0x003f, - /* lead byte 8d */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb6c3, 0xb6c4, 0xb6c5, 0xb6c6, 0xb6c7, 0xb6c8, 0xb6c9, - 0xb6ca, 0xb6cb, 0xb6cc, 0xb6cd, 0xb6ce, 0xb6cf, 0xb6d0, 0xb6d1, - 0xb6d2, 0xb6d3, 0xb6d5, 0xb6d6, 0xb6d7, 0xb6d8, 0xb6d9, 0xb6da, - 0xb6db, 0xb6dc, 0xb6dd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb6de, 0xb6df, 0xb6e0, 0xb6e1, 0xb6e2, 0xb6e3, 0xb6e4, - 0xb6e5, 0xb6e6, 0xb6e7, 0xb6e8, 0xb6e9, 0xb6ea, 0xb6eb, 0xb6ec, - 0xb6ed, 0xb6ee, 0xb6ef, 0xb6f1, 0xb6f2, 0xb6f3, 0xb6f5, 0xb6f6, - 0xb6f7, 0xb6f9, 0xb6fa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb6fb, 0xb6fc, 0xb6fd, 0xb6fe, 0xb6ff, 0xb702, 0xb703, - 0xb704, 0xb706, 0xb707, 0xb708, 0xb709, 0xb70a, 0xb70b, 0xb70c, - 0xb70d, 0xb70e, 0xb70f, 0xb710, 0xb711, 0xb712, 0xb713, 0xb714, - 0xb715, 0xb716, 0xb717, 0xb718, 0xb719, 0xb71a, 0xb71b, 0xb71c, - 0xb71d, 0xb71e, 0xb71f, 0xb720, 0xb721, 0xb722, 0xb723, 0xb724, - 0xb725, 0xb726, 0xb727, 0xb72a, 0xb72b, 0xb72d, 0xb72e, 0xb731, - 0xb732, 0xb733, 0xb734, 0xb735, 0xb736, 0xb737, 0xb73a, 0xb73c, - 0xb73d, 0xb73e, 0xb73f, 0xb740, 0xb741, 0xb742, 0xb743, 0xb745, - 0xb746, 0xb747, 0xb749, 0xb74a, 0xb74b, 0xb74d, 0xb74e, 0xb74f, - 0xb750, 0xb751, 0xb752, 0xb753, 0xb756, 0xb757, 0xb758, 0xb759, - 0xb75a, 0xb75b, 0xb75c, 0xb75d, 0xb75e, 0xb75f, 0xb761, 0xb762, - 0xb763, 0xb765, 0xb766, 0xb767, 0xb769, 0xb76a, 0xb76b, 0xb76c, - 0xb76d, 0xb76e, 0xb76f, 0xb772, 0xb774, 0xb776, 0xb777, 0xb778, - 0xb779, 0xb77a, 0xb77b, 0xb77e, 0xb77f, 0xb781, 0xb782, 0xb783, - 0xb785, 0xb786, 0xb787, 0xb788, 0xb789, 0xb78a, 0xb78b, 0xb78e, - 0xb793, 0xb794, 0xb795, 0xb79a, 0xb79b, 0xb79d, 0xb79e, 0x003f, - /* lead byte 8e */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb79f, 0xb7a1, 0xb7a2, 0xb7a3, 0xb7a4, 0xb7a5, 0xb7a6, - 0xb7a7, 0xb7aa, 0xb7ae, 0xb7af, 0xb7b0, 0xb7b1, 0xb7b2, 0xb7b3, - 0xb7b6, 0xb7b7, 0xb7b9, 0xb7ba, 0xb7bb, 0xb7bc, 0xb7bd, 0xb7be, - 0xb7bf, 0xb7c0, 0xb7c1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb7c2, 0xb7c3, 0xb7c4, 0xb7c5, 0xb7c6, 0xb7c8, 0xb7ca, - 0xb7cb, 0xb7cc, 0xb7cd, 0xb7ce, 0xb7cf, 0xb7d0, 0xb7d1, 0xb7d2, - 0xb7d3, 0xb7d4, 0xb7d5, 0xb7d6, 0xb7d7, 0xb7d8, 0xb7d9, 0xb7da, - 0xb7db, 0xb7dc, 0xb7dd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb7de, 0xb7df, 0xb7e0, 0xb7e1, 0xb7e2, 0xb7e3, 0xb7e4, - 0xb7e5, 0xb7e6, 0xb7e7, 0xb7e8, 0xb7e9, 0xb7ea, 0xb7eb, 0xb7ee, - 0xb7ef, 0xb7f1, 0xb7f2, 0xb7f3, 0xb7f5, 0xb7f6, 0xb7f7, 0xb7f8, - 0xb7f9, 0xb7fa, 0xb7fb, 0xb7fe, 0xb802, 0xb803, 0xb804, 0xb805, - 0xb806, 0xb80a, 0xb80b, 0xb80d, 0xb80e, 0xb80f, 0xb811, 0xb812, - 0xb813, 0xb814, 0xb815, 0xb816, 0xb817, 0xb81a, 0xb81c, 0xb81e, - 0xb81f, 0xb820, 0xb821, 0xb822, 0xb823, 0xb826, 0xb827, 0xb829, - 0xb82a, 0xb82b, 0xb82d, 0xb82e, 0xb82f, 0xb830, 0xb831, 0xb832, - 0xb833, 0xb836, 0xb83a, 0xb83b, 0xb83c, 0xb83d, 0xb83e, 0xb83f, - 0xb841, 0xb842, 0xb843, 0xb845, 0xb846, 0xb847, 0xb848, 0xb849, - 0xb84a, 0xb84b, 0xb84c, 0xb84d, 0xb84e, 0xb84f, 0xb850, 0xb852, - 0xb854, 0xb855, 0xb856, 0xb857, 0xb858, 0xb859, 0xb85a, 0xb85b, - 0xb85e, 0xb85f, 0xb861, 0xb862, 0xb863, 0xb865, 0xb866, 0xb867, - 0xb868, 0xb869, 0xb86a, 0xb86b, 0xb86e, 0xb870, 0xb872, 0xb873, - 0xb874, 0xb875, 0xb876, 0xb877, 0xb879, 0xb87a, 0xb87b, 0xb87d, - 0xb87e, 0xb87f, 0xb880, 0xb881, 0xb882, 0xb883, 0xb884, 0x003f, - /* lead byte 8f */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb885, 0xb886, 0xb887, 0xb888, 0xb889, 0xb88a, 0xb88b, - 0xb88c, 0xb88e, 0xb88f, 0xb890, 0xb891, 0xb892, 0xb893, 0xb894, - 0xb895, 0xb896, 0xb897, 0xb898, 0xb899, 0xb89a, 0xb89b, 0xb89c, - 0xb89d, 0xb89e, 0xb89f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb8a0, 0xb8a1, 0xb8a2, 0xb8a3, 0xb8a4, 0xb8a5, 0xb8a6, - 0xb8a7, 0xb8a9, 0xb8aa, 0xb8ab, 0xb8ac, 0xb8ad, 0xb8ae, 0xb8af, - 0xb8b1, 0xb8b2, 0xb8b3, 0xb8b5, 0xb8b6, 0xb8b7, 0xb8b9, 0xb8ba, - 0xb8bb, 0xb8bc, 0xb8bd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb8be, 0xb8bf, 0xb8c2, 0xb8c4, 0xb8c6, 0xb8c7, 0xb8c8, - 0xb8c9, 0xb8ca, 0xb8cb, 0xb8cd, 0xb8ce, 0xb8cf, 0xb8d1, 0xb8d2, - 0xb8d3, 0xb8d5, 0xb8d6, 0xb8d7, 0xb8d8, 0xb8d9, 0xb8da, 0xb8db, - 0xb8dc, 0xb8de, 0xb8e0, 0xb8e2, 0xb8e3, 0xb8e4, 0xb8e5, 0xb8e6, - 0xb8e7, 0xb8ea, 0xb8eb, 0xb8ed, 0xb8ee, 0xb8ef, 0xb8f1, 0xb8f2, - 0xb8f3, 0xb8f4, 0xb8f5, 0xb8f6, 0xb8f7, 0xb8fa, 0xb8fc, 0xb8fe, - 0xb8ff, 0xb900, 0xb901, 0xb902, 0xb903, 0xb905, 0xb906, 0xb907, - 0xb908, 0xb909, 0xb90a, 0xb90b, 0xb90c, 0xb90d, 0xb90e, 0xb90f, - 0xb910, 0xb911, 0xb912, 0xb913, 0xb914, 0xb915, 0xb916, 0xb917, - 0xb919, 0xb91a, 0xb91b, 0xb91c, 0xb91d, 0xb91e, 0xb91f, 0xb921, - 0xb922, 0xb923, 0xb924, 0xb925, 0xb926, 0xb927, 0xb928, 0xb929, - 0xb92a, 0xb92b, 0xb92c, 0xb92d, 0xb92e, 0xb92f, 0xb930, 0xb931, - 0xb932, 0xb933, 0xb934, 0xb935, 0xb936, 0xb937, 0xb938, 0xb939, - 0xb93a, 0xb93b, 0xb93e, 0xb93f, 0xb941, 0xb942, 0xb943, 0xb945, - 0xb946, 0xb947, 0xb948, 0xb949, 0xb94a, 0xb94b, 0xb94d, 0xb94e, - 0xb950, 0xb952, 0xb953, 0xb954, 0xb955, 0xb956, 0xb957, 0x003f, - /* lead byte 90 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb95a, 0xb95b, 0xb95d, 0xb95e, 0xb95f, 0xb961, 0xb962, - 0xb963, 0xb964, 0xb965, 0xb966, 0xb967, 0xb96a, 0xb96c, 0xb96e, - 0xb96f, 0xb970, 0xb971, 0xb972, 0xb973, 0xb976, 0xb977, 0xb979, - 0xb97a, 0xb97b, 0xb97d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb97e, 0xb97f, 0xb980, 0xb981, 0xb982, 0xb983, 0xb986, - 0xb988, 0xb98b, 0xb98c, 0xb98f, 0xb990, 0xb991, 0xb992, 0xb993, - 0xb994, 0xb995, 0xb996, 0xb997, 0xb998, 0xb999, 0xb99a, 0xb99b, - 0xb99c, 0xb99d, 0xb99e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb99f, 0xb9a0, 0xb9a1, 0xb9a2, 0xb9a3, 0xb9a4, 0xb9a5, - 0xb9a6, 0xb9a7, 0xb9a8, 0xb9a9, 0xb9aa, 0xb9ab, 0xb9ae, 0xb9af, - 0xb9b1, 0xb9b2, 0xb9b3, 0xb9b5, 0xb9b6, 0xb9b7, 0xb9b8, 0xb9b9, - 0xb9ba, 0xb9bb, 0xb9be, 0xb9c0, 0xb9c2, 0xb9c3, 0xb9c4, 0xb9c5, - 0xb9c6, 0xb9c7, 0xb9ca, 0xb9cb, 0xb9cd, 0xb9d3, 0xb9d4, 0xb9d5, - 0xb9d6, 0xb9d7, 0xb9da, 0xb9dc, 0xb9df, 0xb9e0, 0xb9e2, 0xb9e6, - 0xb9e7, 0xb9e9, 0xb9ea, 0xb9eb, 0xb9ed, 0xb9ee, 0xb9ef, 0xb9f0, - 0xb9f1, 0xb9f2, 0xb9f3, 0xb9f6, 0xb9fb, 0xb9fc, 0xb9fd, 0xb9fe, - 0xb9ff, 0xba02, 0xba03, 0xba04, 0xba05, 0xba06, 0xba07, 0xba09, - 0xba0a, 0xba0b, 0xba0c, 0xba0d, 0xba0e, 0xba0f, 0xba10, 0xba11, - 0xba12, 0xba13, 0xba14, 0xba16, 0xba17, 0xba18, 0xba19, 0xba1a, - 0xba1b, 0xba1c, 0xba1d, 0xba1e, 0xba1f, 0xba20, 0xba21, 0xba22, - 0xba23, 0xba24, 0xba25, 0xba26, 0xba27, 0xba28, 0xba29, 0xba2a, - 0xba2b, 0xba2c, 0xba2d, 0xba2e, 0xba2f, 0xba30, 0xba31, 0xba32, - 0xba33, 0xba34, 0xba35, 0xba36, 0xba37, 0xba3a, 0xba3b, 0xba3d, - 0xba3e, 0xba3f, 0xba41, 0xba43, 0xba44, 0xba45, 0xba46, 0x003f, - /* lead byte 91 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xba47, 0xba4a, 0xba4c, 0xba4f, 0xba50, 0xba51, 0xba52, - 0xba56, 0xba57, 0xba59, 0xba5a, 0xba5b, 0xba5d, 0xba5e, 0xba5f, - 0xba60, 0xba61, 0xba62, 0xba63, 0xba66, 0xba6a, 0xba6b, 0xba6c, - 0xba6d, 0xba6e, 0xba6f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xba72, 0xba73, 0xba75, 0xba76, 0xba77, 0xba79, 0xba7a, - 0xba7b, 0xba7c, 0xba7d, 0xba7e, 0xba7f, 0xba80, 0xba81, 0xba82, - 0xba86, 0xba88, 0xba89, 0xba8a, 0xba8b, 0xba8d, 0xba8e, 0xba8f, - 0xba90, 0xba91, 0xba92, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xba93, 0xba94, 0xba95, 0xba96, 0xba97, 0xba98, 0xba99, - 0xba9a, 0xba9b, 0xba9c, 0xba9d, 0xba9e, 0xba9f, 0xbaa0, 0xbaa1, - 0xbaa2, 0xbaa3, 0xbaa4, 0xbaa5, 0xbaa6, 0xbaa7, 0xbaaa, 0xbaad, - 0xbaae, 0xbaaf, 0xbab1, 0xbab3, 0xbab4, 0xbab5, 0xbab6, 0xbab7, - 0xbaba, 0xbabc, 0xbabe, 0xbabf, 0xbac0, 0xbac1, 0xbac2, 0xbac3, - 0xbac5, 0xbac6, 0xbac7, 0xbac9, 0xbaca, 0xbacb, 0xbacc, 0xbacd, - 0xbace, 0xbacf, 0xbad0, 0xbad1, 0xbad2, 0xbad3, 0xbad4, 0xbad5, - 0xbad6, 0xbad7, 0xbada, 0xbadb, 0xbadc, 0xbadd, 0xbade, 0xbadf, - 0xbae0, 0xbae1, 0xbae2, 0xbae3, 0xbae4, 0xbae5, 0xbae6, 0xbae7, - 0xbae8, 0xbae9, 0xbaea, 0xbaeb, 0xbaec, 0xbaed, 0xbaee, 0xbaef, - 0xbaf0, 0xbaf1, 0xbaf2, 0xbaf3, 0xbaf4, 0xbaf5, 0xbaf6, 0xbaf7, - 0xbaf8, 0xbaf9, 0xbafa, 0xbafb, 0xbafd, 0xbafe, 0xbaff, 0xbb01, - 0xbb02, 0xbb03, 0xbb05, 0xbb06, 0xbb07, 0xbb08, 0xbb09, 0xbb0a, - 0xbb0b, 0xbb0c, 0xbb0e, 0xbb10, 0xbb12, 0xbb13, 0xbb14, 0xbb15, - 0xbb16, 0xbb17, 0xbb19, 0xbb1a, 0xbb1b, 0xbb1d, 0xbb1e, 0xbb1f, - 0xbb21, 0xbb22, 0xbb23, 0xbb24, 0xbb25, 0xbb26, 0xbb27, 0x003f, - /* lead byte 92 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbb28, 0xbb2a, 0xbb2c, 0xbb2d, 0xbb2e, 0xbb2f, 0xbb30, - 0xbb31, 0xbb32, 0xbb33, 0xbb37, 0xbb39, 0xbb3a, 0xbb3f, 0xbb40, - 0xbb41, 0xbb42, 0xbb43, 0xbb46, 0xbb48, 0xbb4a, 0xbb4b, 0xbb4c, - 0xbb4e, 0xbb51, 0xbb52, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbb53, 0xbb55, 0xbb56, 0xbb57, 0xbb59, 0xbb5a, 0xbb5b, - 0xbb5c, 0xbb5d, 0xbb5e, 0xbb5f, 0xbb60, 0xbb62, 0xbb64, 0xbb65, - 0xbb66, 0xbb67, 0xbb68, 0xbb69, 0xbb6a, 0xbb6b, 0xbb6d, 0xbb6e, - 0xbb6f, 0xbb70, 0xbb71, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbb72, 0xbb73, 0xbb74, 0xbb75, 0xbb76, 0xbb77, 0xbb78, - 0xbb79, 0xbb7a, 0xbb7b, 0xbb7c, 0xbb7d, 0xbb7e, 0xbb7f, 0xbb80, - 0xbb81, 0xbb82, 0xbb83, 0xbb84, 0xbb85, 0xbb86, 0xbb87, 0xbb89, - 0xbb8a, 0xbb8b, 0xbb8d, 0xbb8e, 0xbb8f, 0xbb91, 0xbb92, 0xbb93, - 0xbb94, 0xbb95, 0xbb96, 0xbb97, 0xbb98, 0xbb99, 0xbb9a, 0xbb9b, - 0xbb9c, 0xbb9d, 0xbb9e, 0xbb9f, 0xbba0, 0xbba1, 0xbba2, 0xbba3, - 0xbba5, 0xbba6, 0xbba7, 0xbba9, 0xbbaa, 0xbbab, 0xbbad, 0xbbae, - 0xbbaf, 0xbbb0, 0xbbb1, 0xbbb2, 0xbbb3, 0xbbb5, 0xbbb6, 0xbbb8, - 0xbbb9, 0xbbba, 0xbbbb, 0xbbbc, 0xbbbd, 0xbbbe, 0xbbbf, 0xbbc1, - 0xbbc2, 0xbbc3, 0xbbc5, 0xbbc6, 0xbbc7, 0xbbc9, 0xbbca, 0xbbcb, - 0xbbcc, 0xbbcd, 0xbbce, 0xbbcf, 0xbbd1, 0xbbd2, 0xbbd4, 0xbbd5, - 0xbbd6, 0xbbd7, 0xbbd8, 0xbbd9, 0xbbda, 0xbbdb, 0xbbdc, 0xbbdd, - 0xbbde, 0xbbdf, 0xbbe0, 0xbbe1, 0xbbe2, 0xbbe3, 0xbbe4, 0xbbe5, - 0xbbe6, 0xbbe7, 0xbbe8, 0xbbe9, 0xbbea, 0xbbeb, 0xbbec, 0xbbed, - 0xbbee, 0xbbef, 0xbbf0, 0xbbf1, 0xbbf2, 0xbbf3, 0xbbf4, 0xbbf5, - 0xbbf6, 0xbbf7, 0xbbfa, 0xbbfb, 0xbbfd, 0xbbfe, 0xbc01, 0x003f, - /* lead byte 93 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbc03, 0xbc04, 0xbc05, 0xbc06, 0xbc07, 0xbc0a, 0xbc0e, - 0xbc10, 0xbc12, 0xbc13, 0xbc19, 0xbc1a, 0xbc20, 0xbc21, 0xbc22, - 0xbc23, 0xbc26, 0xbc28, 0xbc2a, 0xbc2b, 0xbc2c, 0xbc2e, 0xbc2f, - 0xbc32, 0xbc33, 0xbc35, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbc36, 0xbc37, 0xbc39, 0xbc3a, 0xbc3b, 0xbc3c, 0xbc3d, - 0xbc3e, 0xbc3f, 0xbc42, 0xbc46, 0xbc47, 0xbc48, 0xbc4a, 0xbc4b, - 0xbc4e, 0xbc4f, 0xbc51, 0xbc52, 0xbc53, 0xbc54, 0xbc55, 0xbc56, - 0xbc57, 0xbc58, 0xbc59, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbc5a, 0xbc5b, 0xbc5c, 0xbc5e, 0xbc5f, 0xbc60, 0xbc61, - 0xbc62, 0xbc63, 0xbc64, 0xbc65, 0xbc66, 0xbc67, 0xbc68, 0xbc69, - 0xbc6a, 0xbc6b, 0xbc6c, 0xbc6d, 0xbc6e, 0xbc6f, 0xbc70, 0xbc71, - 0xbc72, 0xbc73, 0xbc74, 0xbc75, 0xbc76, 0xbc77, 0xbc78, 0xbc79, - 0xbc7a, 0xbc7b, 0xbc7c, 0xbc7d, 0xbc7e, 0xbc7f, 0xbc80, 0xbc81, - 0xbc82, 0xbc83, 0xbc86, 0xbc87, 0xbc89, 0xbc8a, 0xbc8d, 0xbc8f, - 0xbc90, 0xbc91, 0xbc92, 0xbc93, 0xbc96, 0xbc98, 0xbc9b, 0xbc9c, - 0xbc9d, 0xbc9e, 0xbc9f, 0xbca2, 0xbca3, 0xbca5, 0xbca6, 0xbca9, - 0xbcaa, 0xbcab, 0xbcac, 0xbcad, 0xbcae, 0xbcaf, 0xbcb2, 0xbcb6, - 0xbcb7, 0xbcb8, 0xbcb9, 0xbcba, 0xbcbb, 0xbcbe, 0xbcbf, 0xbcc1, - 0xbcc2, 0xbcc3, 0xbcc5, 0xbcc6, 0xbcc7, 0xbcc8, 0xbcc9, 0xbcca, - 0xbccb, 0xbccc, 0xbcce, 0xbcd2, 0xbcd3, 0xbcd4, 0xbcd6, 0xbcd7, - 0xbcd9, 0xbcda, 0xbcdb, 0xbcdd, 0xbcde, 0xbcdf, 0xbce0, 0xbce1, - 0xbce2, 0xbce3, 0xbce4, 0xbce5, 0xbce6, 0xbce7, 0xbce8, 0xbce9, - 0xbcea, 0xbceb, 0xbcec, 0xbced, 0xbcee, 0xbcef, 0xbcf0, 0xbcf1, - 0xbcf2, 0xbcf3, 0xbcf7, 0xbcf9, 0xbcfa, 0xbcfb, 0xbcfd, 0x003f, - /* lead byte 94 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbcfe, 0xbcff, 0xbd00, 0xbd01, 0xbd02, 0xbd03, 0xbd06, - 0xbd08, 0xbd0a, 0xbd0b, 0xbd0c, 0xbd0d, 0xbd0e, 0xbd0f, 0xbd11, - 0xbd12, 0xbd13, 0xbd15, 0xbd16, 0xbd17, 0xbd18, 0xbd19, 0xbd1a, - 0xbd1b, 0xbd1c, 0xbd1d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbd1e, 0xbd1f, 0xbd20, 0xbd21, 0xbd22, 0xbd23, 0xbd25, - 0xbd26, 0xbd27, 0xbd28, 0xbd29, 0xbd2a, 0xbd2b, 0xbd2d, 0xbd2e, - 0xbd2f, 0xbd30, 0xbd31, 0xbd32, 0xbd33, 0xbd34, 0xbd35, 0xbd36, - 0xbd37, 0xbd38, 0xbd39, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbd3a, 0xbd3b, 0xbd3c, 0xbd3d, 0xbd3e, 0xbd3f, 0xbd41, - 0xbd42, 0xbd43, 0xbd44, 0xbd45, 0xbd46, 0xbd47, 0xbd4a, 0xbd4b, - 0xbd4d, 0xbd4e, 0xbd4f, 0xbd51, 0xbd52, 0xbd53, 0xbd54, 0xbd55, - 0xbd56, 0xbd57, 0xbd5a, 0xbd5b, 0xbd5c, 0xbd5d, 0xbd5e, 0xbd5f, - 0xbd60, 0xbd61, 0xbd62, 0xbd63, 0xbd65, 0xbd66, 0xbd67, 0xbd69, - 0xbd6a, 0xbd6b, 0xbd6c, 0xbd6d, 0xbd6e, 0xbd6f, 0xbd70, 0xbd71, - 0xbd72, 0xbd73, 0xbd74, 0xbd75, 0xbd76, 0xbd77, 0xbd78, 0xbd79, - 0xbd7a, 0xbd7b, 0xbd7c, 0xbd7d, 0xbd7e, 0xbd7f, 0xbd82, 0xbd83, - 0xbd85, 0xbd86, 0xbd8b, 0xbd8c, 0xbd8d, 0xbd8e, 0xbd8f, 0xbd92, - 0xbd94, 0xbd96, 0xbd97, 0xbd98, 0xbd9b, 0xbd9d, 0xbd9e, 0xbd9f, - 0xbda0, 0xbda1, 0xbda2, 0xbda3, 0xbda5, 0xbda6, 0xbda7, 0xbda8, - 0xbda9, 0xbdaa, 0xbdab, 0xbdac, 0xbdad, 0xbdae, 0xbdaf, 0xbdb1, - 0xbdb2, 0xbdb3, 0xbdb4, 0xbdb5, 0xbdb6, 0xbdb7, 0xbdb9, 0xbdba, - 0xbdbb, 0xbdbc, 0xbdbd, 0xbdbe, 0xbdbf, 0xbdc0, 0xbdc1, 0xbdc2, - 0xbdc3, 0xbdc4, 0xbdc5, 0xbdc6, 0xbdc7, 0xbdc8, 0xbdc9, 0xbdca, - 0xbdcb, 0xbdcc, 0xbdcd, 0xbdce, 0xbdcf, 0xbdd0, 0xbdd1, 0x003f, - /* lead byte 95 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbdd2, 0xbdd3, 0xbdd6, 0xbdd7, 0xbdd9, 0xbdda, 0xbddb, - 0xbddd, 0xbdde, 0xbddf, 0xbde0, 0xbde1, 0xbde2, 0xbde3, 0xbde4, - 0xbde5, 0xbde6, 0xbde7, 0xbde8, 0xbdea, 0xbdeb, 0xbdec, 0xbded, - 0xbdee, 0xbdef, 0xbdf1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbdf2, 0xbdf3, 0xbdf5, 0xbdf6, 0xbdf7, 0xbdf9, 0xbdfa, - 0xbdfb, 0xbdfc, 0xbdfd, 0xbdfe, 0xbdff, 0xbe01, 0xbe02, 0xbe04, - 0xbe06, 0xbe07, 0xbe08, 0xbe09, 0xbe0a, 0xbe0b, 0xbe0e, 0xbe0f, - 0xbe11, 0xbe12, 0xbe13, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbe15, 0xbe16, 0xbe17, 0xbe18, 0xbe19, 0xbe1a, 0xbe1b, - 0xbe1e, 0xbe20, 0xbe21, 0xbe22, 0xbe23, 0xbe24, 0xbe25, 0xbe26, - 0xbe27, 0xbe28, 0xbe29, 0xbe2a, 0xbe2b, 0xbe2c, 0xbe2d, 0xbe2e, - 0xbe2f, 0xbe30, 0xbe31, 0xbe32, 0xbe33, 0xbe34, 0xbe35, 0xbe36, - 0xbe37, 0xbe38, 0xbe39, 0xbe3a, 0xbe3b, 0xbe3c, 0xbe3d, 0xbe3e, - 0xbe3f, 0xbe40, 0xbe41, 0xbe42, 0xbe43, 0xbe46, 0xbe47, 0xbe49, - 0xbe4a, 0xbe4b, 0xbe4d, 0xbe4f, 0xbe50, 0xbe51, 0xbe52, 0xbe53, - 0xbe56, 0xbe58, 0xbe5c, 0xbe5d, 0xbe5e, 0xbe5f, 0xbe62, 0xbe63, - 0xbe65, 0xbe66, 0xbe67, 0xbe69, 0xbe6b, 0xbe6c, 0xbe6d, 0xbe6e, - 0xbe6f, 0xbe72, 0xbe76, 0xbe77, 0xbe78, 0xbe79, 0xbe7a, 0xbe7e, - 0xbe7f, 0xbe81, 0xbe82, 0xbe83, 0xbe85, 0xbe86, 0xbe87, 0xbe88, - 0xbe89, 0xbe8a, 0xbe8b, 0xbe8e, 0xbe92, 0xbe93, 0xbe94, 0xbe95, - 0xbe96, 0xbe97, 0xbe9a, 0xbe9b, 0xbe9c, 0xbe9d, 0xbe9e, 0xbe9f, - 0xbea0, 0xbea1, 0xbea2, 0xbea3, 0xbea4, 0xbea5, 0xbea6, 0xbea7, - 0xbea9, 0xbeaa, 0xbeab, 0xbeac, 0xbead, 0xbeae, 0xbeaf, 0xbeb0, - 0xbeb1, 0xbeb2, 0xbeb3, 0xbeb4, 0xbeb5, 0xbeb6, 0xbeb7, 0x003f, - /* lead byte 96 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbeb8, 0xbeb9, 0xbeba, 0xbebb, 0xbebc, 0xbebd, 0xbebe, - 0xbebf, 0xbec0, 0xbec1, 0xbec2, 0xbec3, 0xbec4, 0xbec5, 0xbec6, - 0xbec7, 0xbec8, 0xbec9, 0xbeca, 0xbecb, 0xbecc, 0xbecd, 0xbece, - 0xbecf, 0xbed2, 0xbed3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbed5, 0xbed6, 0xbed9, 0xbeda, 0xbedb, 0xbedc, 0xbedd, - 0xbede, 0xbedf, 0xbee1, 0xbee2, 0xbee6, 0xbee7, 0xbee8, 0xbee9, - 0xbeea, 0xbeeb, 0xbeed, 0xbeee, 0xbeef, 0xbef0, 0xbef1, 0xbef2, - 0xbef3, 0xbef4, 0xbef5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbef6, 0xbef7, 0xbef8, 0xbef9, 0xbefa, 0xbefb, 0xbefc, - 0xbefd, 0xbefe, 0xbeff, 0xbf00, 0xbf02, 0xbf03, 0xbf04, 0xbf05, - 0xbf06, 0xbf07, 0xbf0a, 0xbf0b, 0xbf0c, 0xbf0d, 0xbf0e, 0xbf0f, - 0xbf10, 0xbf11, 0xbf12, 0xbf13, 0xbf14, 0xbf15, 0xbf16, 0xbf17, - 0xbf1a, 0xbf1e, 0xbf1f, 0xbf20, 0xbf21, 0xbf22, 0xbf23, 0xbf24, - 0xbf25, 0xbf26, 0xbf27, 0xbf28, 0xbf29, 0xbf2a, 0xbf2b, 0xbf2c, - 0xbf2d, 0xbf2e, 0xbf2f, 0xbf30, 0xbf31, 0xbf32, 0xbf33, 0xbf34, - 0xbf35, 0xbf36, 0xbf37, 0xbf38, 0xbf39, 0xbf3a, 0xbf3b, 0xbf3c, - 0xbf3d, 0xbf3e, 0xbf3f, 0xbf42, 0xbf43, 0xbf45, 0xbf46, 0xbf47, - 0xbf49, 0xbf4a, 0xbf4b, 0xbf4c, 0xbf4d, 0xbf4e, 0xbf4f, 0xbf52, - 0xbf53, 0xbf54, 0xbf56, 0xbf57, 0xbf58, 0xbf59, 0xbf5a, 0xbf5b, - 0xbf5c, 0xbf5d, 0xbf5e, 0xbf5f, 0xbf60, 0xbf61, 0xbf62, 0xbf63, - 0xbf64, 0xbf65, 0xbf66, 0xbf67, 0xbf68, 0xbf69, 0xbf6a, 0xbf6b, - 0xbf6c, 0xbf6d, 0xbf6e, 0xbf6f, 0xbf70, 0xbf71, 0xbf72, 0xbf73, - 0xbf74, 0xbf75, 0xbf76, 0xbf77, 0xbf78, 0xbf79, 0xbf7a, 0xbf7b, - 0xbf7c, 0xbf7d, 0xbf7e, 0xbf7f, 0xbf80, 0xbf81, 0xbf82, 0x003f, - /* lead byte 97 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbf83, 0xbf84, 0xbf85, 0xbf86, 0xbf87, 0xbf88, 0xbf89, - 0xbf8a, 0xbf8b, 0xbf8c, 0xbf8d, 0xbf8e, 0xbf8f, 0xbf90, 0xbf91, - 0xbf92, 0xbf93, 0xbf95, 0xbf96, 0xbf97, 0xbf98, 0xbf99, 0xbf9a, - 0xbf9b, 0xbf9c, 0xbf9d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbf9e, 0xbf9f, 0xbfa0, 0xbfa1, 0xbfa2, 0xbfa3, 0xbfa4, - 0xbfa5, 0xbfa6, 0xbfa7, 0xbfa8, 0xbfa9, 0xbfaa, 0xbfab, 0xbfac, - 0xbfad, 0xbfae, 0xbfaf, 0xbfb1, 0xbfb2, 0xbfb3, 0xbfb4, 0xbfb5, - 0xbfb6, 0xbfb7, 0xbfb8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xbfb9, 0xbfba, 0xbfbb, 0xbfbc, 0xbfbd, 0xbfbe, 0xbfbf, - 0xbfc0, 0xbfc1, 0xbfc2, 0xbfc3, 0xbfc4, 0xbfc6, 0xbfc7, 0xbfc8, - 0xbfc9, 0xbfca, 0xbfcb, 0xbfce, 0xbfcf, 0xbfd1, 0xbfd2, 0xbfd3, - 0xbfd5, 0xbfd6, 0xbfd7, 0xbfd8, 0xbfd9, 0xbfda, 0xbfdb, 0xbfdd, - 0xbfde, 0xbfe0, 0xbfe2, 0xbfe3, 0xbfe4, 0xbfe5, 0xbfe6, 0xbfe7, - 0xbfe8, 0xbfe9, 0xbfea, 0xbfeb, 0xbfec, 0xbfed, 0xbfee, 0xbfef, - 0xbff0, 0xbff1, 0xbff2, 0xbff3, 0xbff4, 0xbff5, 0xbff6, 0xbff7, - 0xbff8, 0xbff9, 0xbffa, 0xbffb, 0xbffc, 0xbffd, 0xbffe, 0xbfff, - 0xc000, 0xc001, 0xc002, 0xc003, 0xc004, 0xc005, 0xc006, 0xc007, - 0xc008, 0xc009, 0xc00a, 0xc00b, 0xc00c, 0xc00d, 0xc00e, 0xc00f, - 0xc010, 0xc011, 0xc012, 0xc013, 0xc014, 0xc015, 0xc016, 0xc017, - 0xc018, 0xc019, 0xc01a, 0xc01b, 0xc01c, 0xc01d, 0xc01e, 0xc01f, - 0xc020, 0xc021, 0xc022, 0xc023, 0xc024, 0xc025, 0xc026, 0xc027, - 0xc028, 0xc029, 0xc02a, 0xc02b, 0xc02c, 0xc02d, 0xc02e, 0xc02f, - 0xc030, 0xc031, 0xc032, 0xc033, 0xc034, 0xc035, 0xc036, 0xc037, - 0xc038, 0xc039, 0xc03a, 0xc03b, 0xc03d, 0xc03e, 0xc03f, 0x003f, - /* lead byte 98 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc040, 0xc041, 0xc042, 0xc043, 0xc044, 0xc045, 0xc046, - 0xc047, 0xc048, 0xc049, 0xc04a, 0xc04b, 0xc04c, 0xc04d, 0xc04e, - 0xc04f, 0xc050, 0xc052, 0xc053, 0xc054, 0xc055, 0xc056, 0xc057, - 0xc059, 0xc05a, 0xc05b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc05d, 0xc05e, 0xc05f, 0xc061, 0xc062, 0xc063, 0xc064, - 0xc065, 0xc066, 0xc067, 0xc06a, 0xc06b, 0xc06c, 0xc06d, 0xc06e, - 0xc06f, 0xc070, 0xc071, 0xc072, 0xc073, 0xc074, 0xc075, 0xc076, - 0xc077, 0xc078, 0xc079, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc07a, 0xc07b, 0xc07c, 0xc07d, 0xc07e, 0xc07f, 0xc080, - 0xc081, 0xc082, 0xc083, 0xc084, 0xc085, 0xc086, 0xc087, 0xc088, - 0xc089, 0xc08a, 0xc08b, 0xc08c, 0xc08d, 0xc08e, 0xc08f, 0xc092, - 0xc093, 0xc095, 0xc096, 0xc097, 0xc099, 0xc09a, 0xc09b, 0xc09c, - 0xc09d, 0xc09e, 0xc09f, 0xc0a2, 0xc0a4, 0xc0a6, 0xc0a7, 0xc0a8, - 0xc0a9, 0xc0aa, 0xc0ab, 0xc0ae, 0xc0b1, 0xc0b2, 0xc0b7, 0xc0b8, - 0xc0b9, 0xc0ba, 0xc0bb, 0xc0be, 0xc0c2, 0xc0c3, 0xc0c4, 0xc0c6, - 0xc0c7, 0xc0ca, 0xc0cb, 0xc0cd, 0xc0ce, 0xc0cf, 0xc0d1, 0xc0d2, - 0xc0d3, 0xc0d4, 0xc0d5, 0xc0d6, 0xc0d7, 0xc0da, 0xc0de, 0xc0df, - 0xc0e0, 0xc0e1, 0xc0e2, 0xc0e3, 0xc0e6, 0xc0e7, 0xc0e9, 0xc0ea, - 0xc0eb, 0xc0ed, 0xc0ee, 0xc0ef, 0xc0f0, 0xc0f1, 0xc0f2, 0xc0f3, - 0xc0f6, 0xc0f8, 0xc0fa, 0xc0fb, 0xc0fc, 0xc0fd, 0xc0fe, 0xc0ff, - 0xc101, 0xc102, 0xc103, 0xc105, 0xc106, 0xc107, 0xc109, 0xc10a, - 0xc10b, 0xc10c, 0xc10d, 0xc10e, 0xc10f, 0xc111, 0xc112, 0xc113, - 0xc114, 0xc116, 0xc117, 0xc118, 0xc119, 0xc11a, 0xc11b, 0xc121, - 0xc122, 0xc125, 0xc128, 0xc129, 0xc12a, 0xc12b, 0xc12e, 0x003f, - /* lead byte 99 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc132, 0xc133, 0xc134, 0xc135, 0xc137, 0xc13a, 0xc13b, - 0xc13d, 0xc13e, 0xc13f, 0xc141, 0xc142, 0xc143, 0xc144, 0xc145, - 0xc146, 0xc147, 0xc14a, 0xc14e, 0xc14f, 0xc150, 0xc151, 0xc152, - 0xc153, 0xc156, 0xc157, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc159, 0xc15a, 0xc15b, 0xc15d, 0xc15e, 0xc15f, 0xc160, - 0xc161, 0xc162, 0xc163, 0xc166, 0xc16a, 0xc16b, 0xc16c, 0xc16d, - 0xc16e, 0xc16f, 0xc171, 0xc172, 0xc173, 0xc175, 0xc176, 0xc177, - 0xc179, 0xc17a, 0xc17b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc17c, 0xc17d, 0xc17e, 0xc17f, 0xc180, 0xc181, 0xc182, - 0xc183, 0xc184, 0xc186, 0xc187, 0xc188, 0xc189, 0xc18a, 0xc18b, - 0xc18f, 0xc191, 0xc192, 0xc193, 0xc195, 0xc197, 0xc198, 0xc199, - 0xc19a, 0xc19b, 0xc19e, 0xc1a0, 0xc1a2, 0xc1a3, 0xc1a4, 0xc1a6, - 0xc1a7, 0xc1aa, 0xc1ab, 0xc1ad, 0xc1ae, 0xc1af, 0xc1b1, 0xc1b2, - 0xc1b3, 0xc1b4, 0xc1b5, 0xc1b6, 0xc1b7, 0xc1b8, 0xc1b9, 0xc1ba, - 0xc1bb, 0xc1bc, 0xc1be, 0xc1bf, 0xc1c0, 0xc1c1, 0xc1c2, 0xc1c3, - 0xc1c5, 0xc1c6, 0xc1c7, 0xc1c9, 0xc1ca, 0xc1cb, 0xc1cd, 0xc1ce, - 0xc1cf, 0xc1d0, 0xc1d1, 0xc1d2, 0xc1d3, 0xc1d5, 0xc1d6, 0xc1d9, - 0xc1da, 0xc1db, 0xc1dc, 0xc1dd, 0xc1de, 0xc1df, 0xc1e1, 0xc1e2, - 0xc1e3, 0xc1e5, 0xc1e6, 0xc1e7, 0xc1e9, 0xc1ea, 0xc1eb, 0xc1ec, - 0xc1ed, 0xc1ee, 0xc1ef, 0xc1f2, 0xc1f4, 0xc1f5, 0xc1f6, 0xc1f7, - 0xc1f8, 0xc1f9, 0xc1fa, 0xc1fb, 0xc1fe, 0xc1ff, 0xc201, 0xc202, - 0xc203, 0xc205, 0xc206, 0xc207, 0xc208, 0xc209, 0xc20a, 0xc20b, - 0xc20e, 0xc210, 0xc212, 0xc213, 0xc214, 0xc215, 0xc216, 0xc217, - 0xc21a, 0xc21b, 0xc21d, 0xc21e, 0xc221, 0xc222, 0xc223, 0x003f, - /* lead byte 9a */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc224, 0xc225, 0xc226, 0xc227, 0xc22a, 0xc22c, 0xc22e, - 0xc230, 0xc233, 0xc235, 0xc236, 0xc237, 0xc238, 0xc239, 0xc23a, - 0xc23b, 0xc23c, 0xc23d, 0xc23e, 0xc23f, 0xc240, 0xc241, 0xc242, - 0xc243, 0xc244, 0xc245, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc246, 0xc247, 0xc249, 0xc24a, 0xc24b, 0xc24c, 0xc24d, - 0xc24e, 0xc24f, 0xc252, 0xc253, 0xc255, 0xc256, 0xc257, 0xc259, - 0xc25a, 0xc25b, 0xc25c, 0xc25d, 0xc25e, 0xc25f, 0xc261, 0xc262, - 0xc263, 0xc264, 0xc266, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc267, 0xc268, 0xc269, 0xc26a, 0xc26b, 0xc26e, 0xc26f, - 0xc271, 0xc272, 0xc273, 0xc275, 0xc276, 0xc277, 0xc278, 0xc279, - 0xc27a, 0xc27b, 0xc27e, 0xc280, 0xc282, 0xc283, 0xc284, 0xc285, - 0xc286, 0xc287, 0xc28a, 0xc28b, 0xc28c, 0xc28d, 0xc28e, 0xc28f, - 0xc291, 0xc292, 0xc293, 0xc294, 0xc295, 0xc296, 0xc297, 0xc299, - 0xc29a, 0xc29c, 0xc29e, 0xc29f, 0xc2a0, 0xc2a1, 0xc2a2, 0xc2a3, - 0xc2a6, 0xc2a7, 0xc2a9, 0xc2aa, 0xc2ab, 0xc2ae, 0xc2af, 0xc2b0, - 0xc2b1, 0xc2b2, 0xc2b3, 0xc2b6, 0xc2b8, 0xc2ba, 0xc2bb, 0xc2bc, - 0xc2bd, 0xc2be, 0xc2bf, 0xc2c0, 0xc2c1, 0xc2c2, 0xc2c3, 0xc2c4, - 0xc2c5, 0xc2c6, 0xc2c7, 0xc2c8, 0xc2c9, 0xc2ca, 0xc2cb, 0xc2cc, - 0xc2cd, 0xc2ce, 0xc2cf, 0xc2d0, 0xc2d1, 0xc2d2, 0xc2d3, 0xc2d4, - 0xc2d5, 0xc2d6, 0xc2d7, 0xc2d8, 0xc2d9, 0xc2da, 0xc2db, 0xc2de, - 0xc2df, 0xc2e1, 0xc2e2, 0xc2e5, 0xc2e6, 0xc2e7, 0xc2e8, 0xc2e9, - 0xc2ea, 0xc2ee, 0xc2f0, 0xc2f2, 0xc2f3, 0xc2f4, 0xc2f5, 0xc2f7, - 0xc2fa, 0xc2fd, 0xc2fe, 0xc2ff, 0xc301, 0xc302, 0xc303, 0xc304, - 0xc305, 0xc306, 0xc307, 0xc30a, 0xc30b, 0xc30e, 0xc30f, 0x003f, - /* lead byte 9b */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc310, 0xc311, 0xc312, 0xc316, 0xc317, 0xc319, 0xc31a, - 0xc31b, 0xc31d, 0xc31e, 0xc31f, 0xc320, 0xc321, 0xc322, 0xc323, - 0xc326, 0xc327, 0xc32a, 0xc32b, 0xc32c, 0xc32d, 0xc32e, 0xc32f, - 0xc330, 0xc331, 0xc332, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc333, 0xc334, 0xc335, 0xc336, 0xc337, 0xc338, 0xc339, - 0xc33a, 0xc33b, 0xc33c, 0xc33d, 0xc33e, 0xc33f, 0xc340, 0xc341, - 0xc342, 0xc343, 0xc344, 0xc346, 0xc347, 0xc348, 0xc349, 0xc34a, - 0xc34b, 0xc34c, 0xc34d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc34e, 0xc34f, 0xc350, 0xc351, 0xc352, 0xc353, 0xc354, - 0xc355, 0xc356, 0xc357, 0xc358, 0xc359, 0xc35a, 0xc35b, 0xc35c, - 0xc35d, 0xc35e, 0xc35f, 0xc360, 0xc361, 0xc362, 0xc363, 0xc364, - 0xc365, 0xc366, 0xc367, 0xc36a, 0xc36b, 0xc36d, 0xc36e, 0xc36f, - 0xc371, 0xc373, 0xc374, 0xc375, 0xc376, 0xc377, 0xc37a, 0xc37b, - 0xc37e, 0xc37f, 0xc380, 0xc381, 0xc382, 0xc383, 0xc385, 0xc386, - 0xc387, 0xc389, 0xc38a, 0xc38b, 0xc38d, 0xc38e, 0xc38f, 0xc390, - 0xc391, 0xc392, 0xc393, 0xc394, 0xc395, 0xc396, 0xc397, 0xc398, - 0xc399, 0xc39a, 0xc39b, 0xc39c, 0xc39d, 0xc39e, 0xc39f, 0xc3a0, - 0xc3a1, 0xc3a2, 0xc3a3, 0xc3a4, 0xc3a5, 0xc3a6, 0xc3a7, 0xc3a8, - 0xc3a9, 0xc3aa, 0xc3ab, 0xc3ac, 0xc3ad, 0xc3ae, 0xc3af, 0xc3b0, - 0xc3b1, 0xc3b2, 0xc3b3, 0xc3b4, 0xc3b5, 0xc3b6, 0xc3b7, 0xc3b8, - 0xc3b9, 0xc3ba, 0xc3bb, 0xc3bc, 0xc3bd, 0xc3be, 0xc3bf, 0xc3c1, - 0xc3c2, 0xc3c3, 0xc3c4, 0xc3c5, 0xc3c6, 0xc3c7, 0xc3c8, 0xc3c9, - 0xc3ca, 0xc3cb, 0xc3cc, 0xc3cd, 0xc3ce, 0xc3cf, 0xc3d0, 0xc3d1, - 0xc3d2, 0xc3d3, 0xc3d4, 0xc3d5, 0xc3d6, 0xc3d7, 0xc3da, 0x003f, - /* lead byte 9c */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc3db, 0xc3dd, 0xc3de, 0xc3e1, 0xc3e3, 0xc3e4, 0xc3e5, - 0xc3e6, 0xc3e7, 0xc3ea, 0xc3eb, 0xc3ec, 0xc3ee, 0xc3ef, 0xc3f0, - 0xc3f1, 0xc3f2, 0xc3f3, 0xc3f6, 0xc3f7, 0xc3f9, 0xc3fa, 0xc3fb, - 0xc3fc, 0xc3fd, 0xc3fe, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc3ff, 0xc400, 0xc401, 0xc402, 0xc403, 0xc404, 0xc405, - 0xc406, 0xc407, 0xc409, 0xc40a, 0xc40b, 0xc40c, 0xc40d, 0xc40e, - 0xc40f, 0xc411, 0xc412, 0xc413, 0xc414, 0xc415, 0xc416, 0xc417, - 0xc418, 0xc419, 0xc41a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc41b, 0xc41c, 0xc41d, 0xc41e, 0xc41f, 0xc420, 0xc421, - 0xc422, 0xc423, 0xc425, 0xc426, 0xc427, 0xc428, 0xc429, 0xc42a, - 0xc42b, 0xc42d, 0xc42e, 0xc42f, 0xc431, 0xc432, 0xc433, 0xc435, - 0xc436, 0xc437, 0xc438, 0xc439, 0xc43a, 0xc43b, 0xc43e, 0xc43f, - 0xc440, 0xc441, 0xc442, 0xc443, 0xc444, 0xc445, 0xc446, 0xc447, - 0xc449, 0xc44a, 0xc44b, 0xc44c, 0xc44d, 0xc44e, 0xc44f, 0xc450, - 0xc451, 0xc452, 0xc453, 0xc454, 0xc455, 0xc456, 0xc457, 0xc458, - 0xc459, 0xc45a, 0xc45b, 0xc45c, 0xc45d, 0xc45e, 0xc45f, 0xc460, - 0xc461, 0xc462, 0xc463, 0xc466, 0xc467, 0xc469, 0xc46a, 0xc46b, - 0xc46d, 0xc46e, 0xc46f, 0xc470, 0xc471, 0xc472, 0xc473, 0xc476, - 0xc477, 0xc478, 0xc47a, 0xc47b, 0xc47c, 0xc47d, 0xc47e, 0xc47f, - 0xc481, 0xc482, 0xc483, 0xc484, 0xc485, 0xc486, 0xc487, 0xc488, - 0xc489, 0xc48a, 0xc48b, 0xc48c, 0xc48d, 0xc48e, 0xc48f, 0xc490, - 0xc491, 0xc492, 0xc493, 0xc495, 0xc496, 0xc497, 0xc498, 0xc499, - 0xc49a, 0xc49b, 0xc49d, 0xc49e, 0xc49f, 0xc4a0, 0xc4a1, 0xc4a2, - 0xc4a3, 0xc4a4, 0xc4a5, 0xc4a6, 0xc4a7, 0xc4a8, 0xc4a9, 0x003f, - /* lead byte 9d */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc4aa, 0xc4ab, 0xc4ac, 0xc4ad, 0xc4ae, 0xc4af, 0xc4b0, - 0xc4b1, 0xc4b2, 0xc4b3, 0xc4b4, 0xc4b5, 0xc4b6, 0xc4b7, 0xc4b9, - 0xc4ba, 0xc4bb, 0xc4bd, 0xc4be, 0xc4bf, 0xc4c0, 0xc4c1, 0xc4c2, - 0xc4c3, 0xc4c4, 0xc4c5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc4c6, 0xc4c7, 0xc4c8, 0xc4c9, 0xc4ca, 0xc4cb, 0xc4cc, - 0xc4cd, 0xc4ce, 0xc4cf, 0xc4d0, 0xc4d1, 0xc4d2, 0xc4d3, 0xc4d4, - 0xc4d5, 0xc4d6, 0xc4d7, 0xc4d8, 0xc4d9, 0xc4da, 0xc4db, 0xc4dc, - 0xc4dd, 0xc4de, 0xc4df, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc4e0, 0xc4e1, 0xc4e2, 0xc4e3, 0xc4e4, 0xc4e5, 0xc4e6, - 0xc4e7, 0xc4e8, 0xc4ea, 0xc4eb, 0xc4ec, 0xc4ed, 0xc4ee, 0xc4ef, - 0xc4f2, 0xc4f3, 0xc4f5, 0xc4f6, 0xc4f7, 0xc4f9, 0xc4fb, 0xc4fc, - 0xc4fd, 0xc4fe, 0xc502, 0xc503, 0xc504, 0xc505, 0xc506, 0xc507, - 0xc508, 0xc509, 0xc50a, 0xc50b, 0xc50d, 0xc50e, 0xc50f, 0xc511, - 0xc512, 0xc513, 0xc515, 0xc516, 0xc517, 0xc518, 0xc519, 0xc51a, - 0xc51b, 0xc51d, 0xc51e, 0xc51f, 0xc520, 0xc521, 0xc522, 0xc523, - 0xc524, 0xc525, 0xc526, 0xc527, 0xc52a, 0xc52b, 0xc52d, 0xc52e, - 0xc52f, 0xc531, 0xc532, 0xc533, 0xc534, 0xc535, 0xc536, 0xc537, - 0xc53a, 0xc53c, 0xc53e, 0xc53f, 0xc540, 0xc541, 0xc542, 0xc543, - 0xc546, 0xc547, 0xc54b, 0xc54f, 0xc550, 0xc551, 0xc552, 0xc556, - 0xc55a, 0xc55b, 0xc55c, 0xc55f, 0xc562, 0xc563, 0xc565, 0xc566, - 0xc567, 0xc569, 0xc56a, 0xc56b, 0xc56c, 0xc56d, 0xc56e, 0xc56f, - 0xc572, 0xc576, 0xc577, 0xc578, 0xc579, 0xc57a, 0xc57b, 0xc57e, - 0xc57f, 0xc581, 0xc582, 0xc583, 0xc585, 0xc586, 0xc588, 0xc589, - 0xc58a, 0xc58b, 0xc58e, 0xc590, 0xc592, 0xc593, 0xc594, 0x003f, - /* lead byte 9e */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc596, 0xc599, 0xc59a, 0xc59b, 0xc59d, 0xc59e, 0xc59f, - 0xc5a1, 0xc5a2, 0xc5a3, 0xc5a4, 0xc5a5, 0xc5a6, 0xc5a7, 0xc5a8, - 0xc5aa, 0xc5ab, 0xc5ac, 0xc5ad, 0xc5ae, 0xc5af, 0xc5b0, 0xc5b1, - 0xc5b2, 0xc5b3, 0xc5b6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc5b7, 0xc5ba, 0xc5bf, 0xc5c0, 0xc5c1, 0xc5c2, 0xc5c3, - 0xc5cb, 0xc5cd, 0xc5cf, 0xc5d2, 0xc5d3, 0xc5d5, 0xc5d6, 0xc5d7, - 0xc5d9, 0xc5da, 0xc5db, 0xc5dc, 0xc5dd, 0xc5de, 0xc5df, 0xc5e2, - 0xc5e4, 0xc5e6, 0xc5e7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc5e8, 0xc5e9, 0xc5ea, 0xc5eb, 0xc5ef, 0xc5f1, 0xc5f2, - 0xc5f3, 0xc5f5, 0xc5f8, 0xc5f9, 0xc5fa, 0xc5fb, 0xc602, 0xc603, - 0xc604, 0xc609, 0xc60a, 0xc60b, 0xc60d, 0xc60e, 0xc60f, 0xc611, - 0xc612, 0xc613, 0xc614, 0xc615, 0xc616, 0xc617, 0xc61a, 0xc61d, - 0xc61e, 0xc61f, 0xc620, 0xc621, 0xc622, 0xc623, 0xc626, 0xc627, - 0xc629, 0xc62a, 0xc62b, 0xc62f, 0xc631, 0xc632, 0xc636, 0xc638, - 0xc63a, 0xc63c, 0xc63d, 0xc63e, 0xc63f, 0xc642, 0xc643, 0xc645, - 0xc646, 0xc647, 0xc649, 0xc64a, 0xc64b, 0xc64c, 0xc64d, 0xc64e, - 0xc64f, 0xc652, 0xc656, 0xc657, 0xc658, 0xc659, 0xc65a, 0xc65b, - 0xc65e, 0xc65f, 0xc661, 0xc662, 0xc663, 0xc664, 0xc665, 0xc666, - 0xc667, 0xc668, 0xc669, 0xc66a, 0xc66b, 0xc66d, 0xc66e, 0xc670, - 0xc672, 0xc673, 0xc674, 0xc675, 0xc676, 0xc677, 0xc67a, 0xc67b, - 0xc67d, 0xc67e, 0xc67f, 0xc681, 0xc682, 0xc683, 0xc684, 0xc685, - 0xc686, 0xc687, 0xc68a, 0xc68c, 0xc68e, 0xc68f, 0xc690, 0xc691, - 0xc692, 0xc693, 0xc696, 0xc697, 0xc699, 0xc69a, 0xc69b, 0xc69d, - 0xc69e, 0xc69f, 0xc6a0, 0xc6a1, 0xc6a2, 0xc6a3, 0xc6a6, 0x003f, - /* lead byte 9f */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc6a8, 0xc6aa, 0xc6ab, 0xc6ac, 0xc6ad, 0xc6ae, 0xc6af, - 0xc6b2, 0xc6b3, 0xc6b5, 0xc6b6, 0xc6b7, 0xc6bb, 0xc6bc, 0xc6bd, - 0xc6be, 0xc6bf, 0xc6c2, 0xc6c4, 0xc6c6, 0xc6c7, 0xc6c8, 0xc6c9, - 0xc6ca, 0xc6cb, 0xc6ce, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc6cf, 0xc6d1, 0xc6d2, 0xc6d3, 0xc6d5, 0xc6d6, 0xc6d7, - 0xc6d8, 0xc6d9, 0xc6da, 0xc6db, 0xc6de, 0xc6df, 0xc6e2, 0xc6e3, - 0xc6e4, 0xc6e5, 0xc6e6, 0xc6e7, 0xc6ea, 0xc6eb, 0xc6ed, 0xc6ee, - 0xc6ef, 0xc6f1, 0xc6f2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc6f3, 0xc6f4, 0xc6f5, 0xc6f6, 0xc6f7, 0xc6fa, 0xc6fb, - 0xc6fc, 0xc6fe, 0xc6ff, 0xc700, 0xc701, 0xc702, 0xc703, 0xc706, - 0xc707, 0xc709, 0xc70a, 0xc70b, 0xc70d, 0xc70e, 0xc70f, 0xc710, - 0xc711, 0xc712, 0xc713, 0xc716, 0xc718, 0xc71a, 0xc71b, 0xc71c, - 0xc71d, 0xc71e, 0xc71f, 0xc722, 0xc723, 0xc725, 0xc726, 0xc727, - 0xc729, 0xc72a, 0xc72b, 0xc72c, 0xc72d, 0xc72e, 0xc72f, 0xc732, - 0xc734, 0xc736, 0xc738, 0xc739, 0xc73a, 0xc73b, 0xc73e, 0xc73f, - 0xc741, 0xc742, 0xc743, 0xc745, 0xc746, 0xc747, 0xc748, 0xc749, - 0xc74b, 0xc74e, 0xc750, 0xc759, 0xc75a, 0xc75b, 0xc75d, 0xc75e, - 0xc75f, 0xc761, 0xc762, 0xc763, 0xc764, 0xc765, 0xc766, 0xc767, - 0xc769, 0xc76a, 0xc76c, 0xc76d, 0xc76e, 0xc76f, 0xc770, 0xc771, - 0xc772, 0xc773, 0xc776, 0xc777, 0xc779, 0xc77a, 0xc77b, 0xc77f, - 0xc780, 0xc781, 0xc782, 0xc786, 0xc78b, 0xc78c, 0xc78d, 0xc78f, - 0xc792, 0xc793, 0xc795, 0xc799, 0xc79b, 0xc79c, 0xc79d, 0xc79e, - 0xc79f, 0xc7a2, 0xc7a7, 0xc7a8, 0xc7a9, 0xc7aa, 0xc7ab, 0xc7ae, - 0xc7af, 0xc7b1, 0xc7b2, 0xc7b3, 0xc7b5, 0xc7b6, 0xc7b7, 0x003f, - /* lead byte a0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc7b8, 0xc7b9, 0xc7ba, 0xc7bb, 0xc7be, 0xc7c2, 0xc7c3, - 0xc7c4, 0xc7c5, 0xc7c6, 0xc7c7, 0xc7ca, 0xc7cb, 0xc7cd, 0xc7cf, - 0xc7d1, 0xc7d2, 0xc7d3, 0xc7d4, 0xc7d5, 0xc7d6, 0xc7d7, 0xc7d9, - 0xc7da, 0xc7db, 0xc7dc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc7de, 0xc7df, 0xc7e0, 0xc7e1, 0xc7e2, 0xc7e3, 0xc7e5, - 0xc7e6, 0xc7e7, 0xc7e9, 0xc7ea, 0xc7eb, 0xc7ed, 0xc7ee, 0xc7ef, - 0xc7f0, 0xc7f1, 0xc7f2, 0xc7f3, 0xc7f4, 0xc7f5, 0xc7f6, 0xc7f7, - 0xc7f8, 0xc7f9, 0xc7fa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc7fb, 0xc7fc, 0xc7fd, 0xc7fe, 0xc7ff, 0xc802, 0xc803, - 0xc805, 0xc806, 0xc807, 0xc809, 0xc80b, 0xc80c, 0xc80d, 0xc80e, - 0xc80f, 0xc812, 0xc814, 0xc817, 0xc818, 0xc819, 0xc81a, 0xc81b, - 0xc81e, 0xc81f, 0xc821, 0xc822, 0xc823, 0xc825, 0xc826, 0xc827, - 0xc828, 0xc829, 0xc82a, 0xc82b, 0xc82e, 0xc830, 0xc832, 0xc833, - 0xc834, 0xc835, 0xc836, 0xc837, 0xc839, 0xc83a, 0xc83b, 0xc83d, - 0xc83e, 0xc83f, 0xc841, 0xc842, 0xc843, 0xc844, 0xc845, 0xc846, - 0xc847, 0xc84a, 0xc84b, 0xc84e, 0xc84f, 0xc850, 0xc851, 0xc852, - 0xc853, 0xc855, 0xc856, 0xc857, 0xc858, 0xc859, 0xc85a, 0xc85b, - 0xc85c, 0xc85d, 0xc85e, 0xc85f, 0xc860, 0xc861, 0xc862, 0xc863, - 0xc864, 0xc865, 0xc866, 0xc867, 0xc868, 0xc869, 0xc86a, 0xc86b, - 0xc86c, 0xc86d, 0xc86e, 0xc86f, 0xc872, 0xc873, 0xc875, 0xc876, - 0xc877, 0xc879, 0xc87b, 0xc87c, 0xc87d, 0xc87e, 0xc87f, 0xc882, - 0xc884, 0xc888, 0xc889, 0xc88a, 0xc88e, 0xc88f, 0xc890, 0xc891, - 0xc892, 0xc893, 0xc895, 0xc896, 0xc897, 0xc898, 0xc899, 0xc89a, - 0xc89b, 0xc89c, 0xc89e, 0xc8a0, 0xc8a2, 0xc8a3, 0xc8a4, 0x003f, - /* lead byte a1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc8a5, 0xc8a6, 0xc8a7, 0xc8a9, 0xc8aa, 0xc8ab, 0xc8ac, - 0xc8ad, 0xc8ae, 0xc8af, 0xc8b0, 0xc8b1, 0xc8b2, 0xc8b3, 0xc8b4, - 0xc8b5, 0xc8b6, 0xc8b7, 0xc8b8, 0xc8b9, 0xc8ba, 0xc8bb, 0xc8be, - 0xc8bf, 0xc8c0, 0xc8c1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc8c2, 0xc8c3, 0xc8c5, 0xc8c6, 0xc8c7, 0xc8c9, 0xc8ca, - 0xc8cb, 0xc8cd, 0xc8ce, 0xc8cf, 0xc8d0, 0xc8d1, 0xc8d2, 0xc8d3, - 0xc8d6, 0xc8d8, 0xc8da, 0xc8db, 0xc8dc, 0xc8dd, 0xc8de, 0xc8df, - 0xc8e2, 0xc8e3, 0xc8e5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc8e6, 0xc8e7, 0xc8e8, 0xc8e9, 0xc8ea, 0xc8eb, 0xc8ec, - 0xc8ed, 0xc8ee, 0xc8ef, 0xc8f0, 0xc8f1, 0xc8f2, 0xc8f3, 0xc8f4, - 0xc8f6, 0xc8f7, 0xc8f8, 0xc8f9, 0xc8fa, 0xc8fb, 0xc8fe, 0xc8ff, - 0xc901, 0xc902, 0xc903, 0xc907, 0xc908, 0xc909, 0xc90a, 0xc90b, - 0xc90e, 0x3000, 0x3001, 0x3002, 0x00b7, 0x2025, 0x2026, 0x00a8, - 0x3003, 0x00ad, 0x2015, 0x2225, 0xff3c, 0x223c, 0x2018, 0x2019, - 0x201c, 0x201d, 0x3014, 0x3015, 0x3008, 0x3009, 0x300a, 0x300b, - 0x300c, 0x300d, 0x300e, 0x300f, 0x3010, 0x3011, 0x00b1, 0x00d7, - 0x00f7, 0x2260, 0x2264, 0x2265, 0x221e, 0x2234, 0x00b0, 0x2032, - 0x2033, 0x2103, 0x212b, 0xffe0, 0xffe1, 0xffe5, 0x2642, 0x2640, - 0x2220, 0x22a5, 0x2312, 0x2202, 0x2207, 0x2261, 0x2252, 0x00a7, - 0x203b, 0x2606, 0x2605, 0x25cb, 0x25cf, 0x25ce, 0x25c7, 0x25c6, - 0x25a1, 0x25a0, 0x25b3, 0x25b2, 0x25bd, 0x25bc, 0x2192, 0x2190, - 0x2191, 0x2193, 0x2194, 0x3013, 0x226a, 0x226b, 0x221a, 0x223d, - 0x221d, 0x2235, 0x222b, 0x222c, 0x2208, 0x220b, 0x2286, 0x2287, - 0x2282, 0x2283, 0x222a, 0x2229, 0x2227, 0x2228, 0xffe2, 0x003f, - /* lead byte a2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc910, 0xc912, 0xc913, 0xc914, 0xc915, 0xc916, 0xc917, - 0xc919, 0xc91a, 0xc91b, 0xc91c, 0xc91d, 0xc91e, 0xc91f, 0xc920, - 0xc921, 0xc922, 0xc923, 0xc924, 0xc925, 0xc926, 0xc927, 0xc928, - 0xc929, 0xc92a, 0xc92b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc92d, 0xc92e, 0xc92f, 0xc930, 0xc931, 0xc932, 0xc933, - 0xc935, 0xc936, 0xc937, 0xc938, 0xc939, 0xc93a, 0xc93b, 0xc93c, - 0xc93d, 0xc93e, 0xc93f, 0xc940, 0xc941, 0xc942, 0xc943, 0xc944, - 0xc945, 0xc946, 0xc947, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc948, 0xc949, 0xc94a, 0xc94b, 0xc94c, 0xc94d, 0xc94e, - 0xc94f, 0xc952, 0xc953, 0xc955, 0xc956, 0xc957, 0xc959, 0xc95a, - 0xc95b, 0xc95c, 0xc95d, 0xc95e, 0xc95f, 0xc962, 0xc964, 0xc965, - 0xc966, 0xc967, 0xc968, 0xc969, 0xc96a, 0xc96b, 0xc96d, 0xc96e, - 0xc96f, 0x21d2, 0x21d4, 0x2200, 0x2203, 0x00b4, 0xff5e, 0x02c7, - 0x02d8, 0x02dd, 0x02da, 0x02d9, 0x00b8, 0x02db, 0x00a1, 0x00bf, - 0x02d0, 0x222e, 0x2211, 0x220f, 0x00a4, 0x2109, 0x2030, 0x25c1, - 0x25c0, 0x25b7, 0x25b6, 0x2664, 0x2660, 0x2661, 0x2665, 0x2667, - 0x2663, 0x2299, 0x25c8, 0x25a3, 0x25d0, 0x25d1, 0x2592, 0x25a4, - 0x25a5, 0x25a8, 0x25a7, 0x25a6, 0x25a9, 0x2668, 0x260f, 0x260e, - 0x261c, 0x261e, 0x00b6, 0x2020, 0x2021, 0x2195, 0x2197, 0x2199, - 0x2196, 0x2198, 0x266d, 0x2669, 0x266a, 0x266c, 0x327f, 0x321c, - 0x2116, 0x33c7, 0x2122, 0x33c2, 0x33d8, 0x2121, 0x20ac, 0x00ae, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte a3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc971, 0xc972, 0xc973, 0xc975, 0xc976, 0xc977, 0xc978, - 0xc979, 0xc97a, 0xc97b, 0xc97d, 0xc97e, 0xc97f, 0xc980, 0xc981, - 0xc982, 0xc983, 0xc984, 0xc985, 0xc986, 0xc987, 0xc98a, 0xc98b, - 0xc98d, 0xc98e, 0xc98f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc991, 0xc992, 0xc993, 0xc994, 0xc995, 0xc996, 0xc997, - 0xc99a, 0xc99c, 0xc99e, 0xc99f, 0xc9a0, 0xc9a1, 0xc9a2, 0xc9a3, - 0xc9a4, 0xc9a5, 0xc9a6, 0xc9a7, 0xc9a8, 0xc9a9, 0xc9aa, 0xc9ab, - 0xc9ac, 0xc9ad, 0xc9ae, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc9af, 0xc9b0, 0xc9b1, 0xc9b2, 0xc9b3, 0xc9b4, 0xc9b5, - 0xc9b6, 0xc9b7, 0xc9b8, 0xc9b9, 0xc9ba, 0xc9bb, 0xc9bc, 0xc9bd, - 0xc9be, 0xc9bf, 0xc9c2, 0xc9c3, 0xc9c5, 0xc9c6, 0xc9c9, 0xc9cb, - 0xc9cc, 0xc9cd, 0xc9ce, 0xc9cf, 0xc9d2, 0xc9d4, 0xc9d7, 0xc9d8, - 0xc9db, 0xff01, 0xff02, 0xff03, 0xff04, 0xff05, 0xff06, 0xff07, - 0xff08, 0xff09, 0xff0a, 0xff0b, 0xff0c, 0xff0d, 0xff0e, 0xff0f, - 0xff10, 0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17, - 0xff18, 0xff19, 0xff1a, 0xff1b, 0xff1c, 0xff1d, 0xff1e, 0xff1f, - 0xff20, 0xff21, 0xff22, 0xff23, 0xff24, 0xff25, 0xff26, 0xff27, - 0xff28, 0xff29, 0xff2a, 0xff2b, 0xff2c, 0xff2d, 0xff2e, 0xff2f, - 0xff30, 0xff31, 0xff32, 0xff33, 0xff34, 0xff35, 0xff36, 0xff37, - 0xff38, 0xff39, 0xff3a, 0xff3b, 0xffe6, 0xff3d, 0xff3e, 0xff3f, - 0xff40, 0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47, - 0xff48, 0xff49, 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f, - 0xff50, 0xff51, 0xff52, 0xff53, 0xff54, 0xff55, 0xff56, 0xff57, - 0xff58, 0xff59, 0xff5a, 0xff5b, 0xff5c, 0xff5d, 0xffe3, 0x003f, - /* lead byte a4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc9de, 0xc9df, 0xc9e1, 0xc9e3, 0xc9e5, 0xc9e6, 0xc9e8, - 0xc9e9, 0xc9ea, 0xc9eb, 0xc9ee, 0xc9f2, 0xc9f3, 0xc9f4, 0xc9f5, - 0xc9f6, 0xc9f7, 0xc9fa, 0xc9fb, 0xc9fd, 0xc9fe, 0xc9ff, 0xca01, - 0xca02, 0xca03, 0xca04, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xca05, 0xca06, 0xca07, 0xca0a, 0xca0e, 0xca0f, 0xca10, - 0xca11, 0xca12, 0xca13, 0xca15, 0xca16, 0xca17, 0xca19, 0xca1a, - 0xca1b, 0xca1c, 0xca1d, 0xca1e, 0xca1f, 0xca20, 0xca21, 0xca22, - 0xca23, 0xca24, 0xca25, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xca26, 0xca27, 0xca28, 0xca2a, 0xca2b, 0xca2c, 0xca2d, - 0xca2e, 0xca2f, 0xca30, 0xca31, 0xca32, 0xca33, 0xca34, 0xca35, - 0xca36, 0xca37, 0xca38, 0xca39, 0xca3a, 0xca3b, 0xca3c, 0xca3d, - 0xca3e, 0xca3f, 0xca40, 0xca41, 0xca42, 0xca43, 0xca44, 0xca45, - 0xca46, 0x3131, 0x3132, 0x3133, 0x3134, 0x3135, 0x3136, 0x3137, - 0x3138, 0x3139, 0x313a, 0x313b, 0x313c, 0x313d, 0x313e, 0x313f, - 0x3140, 0x3141, 0x3142, 0x3143, 0x3144, 0x3145, 0x3146, 0x3147, - 0x3148, 0x3149, 0x314a, 0x314b, 0x314c, 0x314d, 0x314e, 0x314f, - 0x3150, 0x3151, 0x3152, 0x3153, 0x3154, 0x3155, 0x3156, 0x3157, - 0x3158, 0x3159, 0x315a, 0x315b, 0x315c, 0x315d, 0x315e, 0x315f, - 0x3160, 0x3161, 0x3162, 0x3163, 0x3164, 0x3165, 0x3166, 0x3167, - 0x3168, 0x3169, 0x316a, 0x316b, 0x316c, 0x316d, 0x316e, 0x316f, - 0x3170, 0x3171, 0x3172, 0x3173, 0x3174, 0x3175, 0x3176, 0x3177, - 0x3178, 0x3179, 0x317a, 0x317b, 0x317c, 0x317d, 0x317e, 0x317f, - 0x3180, 0x3181, 0x3182, 0x3183, 0x3184, 0x3185, 0x3186, 0x3187, - 0x3188, 0x3189, 0x318a, 0x318b, 0x318c, 0x318d, 0x318e, 0x003f, - /* lead byte a5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xca47, 0xca48, 0xca49, 0xca4a, 0xca4b, 0xca4e, 0xca4f, - 0xca51, 0xca52, 0xca53, 0xca55, 0xca56, 0xca57, 0xca58, 0xca59, - 0xca5a, 0xca5b, 0xca5e, 0xca62, 0xca63, 0xca64, 0xca65, 0xca66, - 0xca67, 0xca69, 0xca6a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xca6b, 0xca6c, 0xca6d, 0xca6e, 0xca6f, 0xca70, 0xca71, - 0xca72, 0xca73, 0xca74, 0xca75, 0xca76, 0xca77, 0xca78, 0xca79, - 0xca7a, 0xca7b, 0xca7c, 0xca7e, 0xca7f, 0xca80, 0xca81, 0xca82, - 0xca83, 0xca85, 0xca86, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xca87, 0xca88, 0xca89, 0xca8a, 0xca8b, 0xca8c, 0xca8d, - 0xca8e, 0xca8f, 0xca90, 0xca91, 0xca92, 0xca93, 0xca94, 0xca95, - 0xca96, 0xca97, 0xca99, 0xca9a, 0xca9b, 0xca9c, 0xca9d, 0xca9e, - 0xca9f, 0xcaa0, 0xcaa1, 0xcaa2, 0xcaa3, 0xcaa4, 0xcaa5, 0xcaa6, - 0xcaa7, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, - 0x2177, 0x2178, 0x2179, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, - 0x2168, 0x2169, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, - 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, - 0x03a0, 0x03a1, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, - 0x03a9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, - 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, - 0x03c0, 0x03c1, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, - 0x03c9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte a6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcaa8, 0xcaa9, 0xcaaa, 0xcaab, 0xcaac, 0xcaad, 0xcaae, - 0xcaaf, 0xcab0, 0xcab1, 0xcab2, 0xcab3, 0xcab4, 0xcab5, 0xcab6, - 0xcab7, 0xcab8, 0xcab9, 0xcaba, 0xcabb, 0xcabe, 0xcabf, 0xcac1, - 0xcac2, 0xcac3, 0xcac5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcac6, 0xcac7, 0xcac8, 0xcac9, 0xcaca, 0xcacb, 0xcace, - 0xcad0, 0xcad2, 0xcad4, 0xcad5, 0xcad6, 0xcad7, 0xcada, 0xcadb, - 0xcadc, 0xcadd, 0xcade, 0xcadf, 0xcae1, 0xcae2, 0xcae3, 0xcae4, - 0xcae5, 0xcae6, 0xcae7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcae8, 0xcae9, 0xcaea, 0xcaeb, 0xcaed, 0xcaee, 0xcaef, - 0xcaf0, 0xcaf1, 0xcaf2, 0xcaf3, 0xcaf5, 0xcaf6, 0xcaf7, 0xcaf8, - 0xcaf9, 0xcafa, 0xcafb, 0xcafc, 0xcafd, 0xcafe, 0xcaff, 0xcb00, - 0xcb01, 0xcb02, 0xcb03, 0xcb04, 0xcb05, 0xcb06, 0xcb07, 0xcb09, - 0xcb0a, 0x2500, 0x2502, 0x250c, 0x2510, 0x2518, 0x2514, 0x251c, - 0x252c, 0x2524, 0x2534, 0x253c, 0x2501, 0x2503, 0x250f, 0x2513, - 0x251b, 0x2517, 0x2523, 0x2533, 0x252b, 0x253b, 0x254b, 0x2520, - 0x252f, 0x2528, 0x2537, 0x253f, 0x251d, 0x2530, 0x2525, 0x2538, - 0x2542, 0x2512, 0x2511, 0x251a, 0x2519, 0x2516, 0x2515, 0x250e, - 0x250d, 0x251e, 0x251f, 0x2521, 0x2522, 0x2526, 0x2527, 0x2529, - 0x252a, 0x252d, 0x252e, 0x2531, 0x2532, 0x2535, 0x2536, 0x2539, - 0x253a, 0x253d, 0x253e, 0x2540, 0x2541, 0x2543, 0x2544, 0x2545, - 0x2546, 0x2547, 0x2548, 0x2549, 0x254a, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte a7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcb0b, 0xcb0c, 0xcb0d, 0xcb0e, 0xcb0f, 0xcb11, 0xcb12, - 0xcb13, 0xcb15, 0xcb16, 0xcb17, 0xcb19, 0xcb1a, 0xcb1b, 0xcb1c, - 0xcb1d, 0xcb1e, 0xcb1f, 0xcb22, 0xcb23, 0xcb24, 0xcb25, 0xcb26, - 0xcb27, 0xcb28, 0xcb29, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcb2a, 0xcb2b, 0xcb2c, 0xcb2d, 0xcb2e, 0xcb2f, 0xcb30, - 0xcb31, 0xcb32, 0xcb33, 0xcb34, 0xcb35, 0xcb36, 0xcb37, 0xcb38, - 0xcb39, 0xcb3a, 0xcb3b, 0xcb3c, 0xcb3d, 0xcb3e, 0xcb3f, 0xcb40, - 0xcb42, 0xcb43, 0xcb44, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcb45, 0xcb46, 0xcb47, 0xcb4a, 0xcb4b, 0xcb4d, 0xcb4e, - 0xcb4f, 0xcb51, 0xcb52, 0xcb53, 0xcb54, 0xcb55, 0xcb56, 0xcb57, - 0xcb5a, 0xcb5b, 0xcb5c, 0xcb5e, 0xcb5f, 0xcb60, 0xcb61, 0xcb62, - 0xcb63, 0xcb65, 0xcb66, 0xcb67, 0xcb68, 0xcb69, 0xcb6a, 0xcb6b, - 0xcb6c, 0x3395, 0x3396, 0x3397, 0x2113, 0x3398, 0x33c4, 0x33a3, - 0x33a4, 0x33a5, 0x33a6, 0x3399, 0x339a, 0x339b, 0x339c, 0x339d, - 0x339e, 0x339f, 0x33a0, 0x33a1, 0x33a2, 0x33ca, 0x338d, 0x338e, - 0x338f, 0x33cf, 0x3388, 0x3389, 0x33c8, 0x33a7, 0x33a8, 0x33b0, - 0x33b1, 0x33b2, 0x33b3, 0x33b4, 0x33b5, 0x33b6, 0x33b7, 0x33b8, - 0x33b9, 0x3380, 0x3381, 0x3382, 0x3383, 0x3384, 0x33ba, 0x33bb, - 0x33bc, 0x33bd, 0x33be, 0x33bf, 0x3390, 0x3391, 0x3392, 0x3393, - 0x3394, 0x2126, 0x33c0, 0x33c1, 0x338a, 0x338b, 0x338c, 0x33d6, - 0x33c5, 0x33ad, 0x33ae, 0x33af, 0x33db, 0x33a9, 0x33aa, 0x33ab, - 0x33ac, 0x33dd, 0x33d0, 0x33d3, 0x33c3, 0x33c9, 0x33dc, 0x33c6, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte a8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcb6d, 0xcb6e, 0xcb6f, 0xcb70, 0xcb71, 0xcb72, 0xcb73, - 0xcb74, 0xcb75, 0xcb76, 0xcb77, 0xcb7a, 0xcb7b, 0xcb7c, 0xcb7d, - 0xcb7e, 0xcb7f, 0xcb80, 0xcb81, 0xcb82, 0xcb83, 0xcb84, 0xcb85, - 0xcb86, 0xcb87, 0xcb88, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcb89, 0xcb8a, 0xcb8b, 0xcb8c, 0xcb8d, 0xcb8e, 0xcb8f, - 0xcb90, 0xcb91, 0xcb92, 0xcb93, 0xcb94, 0xcb95, 0xcb96, 0xcb97, - 0xcb98, 0xcb99, 0xcb9a, 0xcb9b, 0xcb9d, 0xcb9e, 0xcb9f, 0xcba0, - 0xcba1, 0xcba2, 0xcba3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcba4, 0xcba5, 0xcba6, 0xcba7, 0xcba8, 0xcba9, 0xcbaa, - 0xcbab, 0xcbac, 0xcbad, 0xcbae, 0xcbaf, 0xcbb0, 0xcbb1, 0xcbb2, - 0xcbb3, 0xcbb4, 0xcbb5, 0xcbb6, 0xcbb7, 0xcbb9, 0xcbba, 0xcbbb, - 0xcbbc, 0xcbbd, 0xcbbe, 0xcbbf, 0xcbc0, 0xcbc1, 0xcbc2, 0xcbc3, - 0xcbc4, 0x00c6, 0x00d0, 0x00aa, 0x0126, 0x003f, 0x0132, 0x003f, - 0x013f, 0x0141, 0x00d8, 0x0152, 0x00ba, 0x00de, 0x0166, 0x014a, - 0x003f, 0x3260, 0x3261, 0x3262, 0x3263, 0x3264, 0x3265, 0x3266, - 0x3267, 0x3268, 0x3269, 0x326a, 0x326b, 0x326c, 0x326d, 0x326e, - 0x326f, 0x3270, 0x3271, 0x3272, 0x3273, 0x3274, 0x3275, 0x3276, - 0x3277, 0x3278, 0x3279, 0x327a, 0x327b, 0x24d0, 0x24d1, 0x24d2, - 0x24d3, 0x24d4, 0x24d5, 0x24d6, 0x24d7, 0x24d8, 0x24d9, 0x24da, - 0x24db, 0x24dc, 0x24dd, 0x24de, 0x24df, 0x24e0, 0x24e1, 0x24e2, - 0x24e3, 0x24e4, 0x24e5, 0x24e6, 0x24e7, 0x24e8, 0x24e9, 0x2460, - 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467, 0x2468, - 0x2469, 0x246a, 0x246b, 0x246c, 0x246d, 0x246e, 0x00bd, 0x2153, - 0x2154, 0x00bc, 0x00be, 0x215b, 0x215c, 0x215d, 0x215e, 0x003f, - /* lead byte a9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcbc5, 0xcbc6, 0xcbc7, 0xcbc8, 0xcbc9, 0xcbca, 0xcbcb, - 0xcbcc, 0xcbcd, 0xcbce, 0xcbcf, 0xcbd0, 0xcbd1, 0xcbd2, 0xcbd3, - 0xcbd5, 0xcbd6, 0xcbd7, 0xcbd8, 0xcbd9, 0xcbda, 0xcbdb, 0xcbdc, - 0xcbdd, 0xcbde, 0xcbdf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcbe0, 0xcbe1, 0xcbe2, 0xcbe3, 0xcbe5, 0xcbe6, 0xcbe8, - 0xcbea, 0xcbeb, 0xcbec, 0xcbed, 0xcbee, 0xcbef, 0xcbf0, 0xcbf1, - 0xcbf2, 0xcbf3, 0xcbf4, 0xcbf5, 0xcbf6, 0xcbf7, 0xcbf8, 0xcbf9, - 0xcbfa, 0xcbfb, 0xcbfc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcbfd, 0xcbfe, 0xcbff, 0xcc00, 0xcc01, 0xcc02, 0xcc03, - 0xcc04, 0xcc05, 0xcc06, 0xcc07, 0xcc08, 0xcc09, 0xcc0a, 0xcc0b, - 0xcc0e, 0xcc0f, 0xcc11, 0xcc12, 0xcc13, 0xcc15, 0xcc16, 0xcc17, - 0xcc18, 0xcc19, 0xcc1a, 0xcc1b, 0xcc1e, 0xcc1f, 0xcc20, 0xcc23, - 0xcc24, 0x00e6, 0x0111, 0x00f0, 0x0127, 0x0131, 0x0133, 0x0138, - 0x0140, 0x0142, 0x00f8, 0x0153, 0x00df, 0x00fe, 0x0167, 0x014b, - 0x0149, 0x3200, 0x3201, 0x3202, 0x3203, 0x3204, 0x3205, 0x3206, - 0x3207, 0x3208, 0x3209, 0x320a, 0x320b, 0x320c, 0x320d, 0x320e, - 0x320f, 0x3210, 0x3211, 0x3212, 0x3213, 0x3214, 0x3215, 0x3216, - 0x3217, 0x3218, 0x3219, 0x321a, 0x321b, 0x249c, 0x249d, 0x249e, - 0x249f, 0x24a0, 0x24a1, 0x24a2, 0x24a3, 0x24a4, 0x24a5, 0x24a6, - 0x24a7, 0x24a8, 0x24a9, 0x24aa, 0x24ab, 0x24ac, 0x24ad, 0x24ae, - 0x24af, 0x24b0, 0x24b1, 0x24b2, 0x24b3, 0x24b4, 0x24b5, 0x2474, - 0x2475, 0x2476, 0x2477, 0x2478, 0x2479, 0x247a, 0x247b, 0x247c, - 0x247d, 0x247e, 0x247f, 0x2480, 0x2481, 0x2482, 0x00b9, 0x00b2, - 0x00b3, 0x2074, 0x207f, 0x2081, 0x2082, 0x2083, 0x2084, 0x003f, - /* lead byte aa */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcc25, 0xcc26, 0xcc2a, 0xcc2b, 0xcc2d, 0xcc2f, 0xcc31, - 0xcc32, 0xcc33, 0xcc34, 0xcc35, 0xcc36, 0xcc37, 0xcc3a, 0xcc3f, - 0xcc40, 0xcc41, 0xcc42, 0xcc43, 0xcc46, 0xcc47, 0xcc49, 0xcc4a, - 0xcc4b, 0xcc4d, 0xcc4e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcc4f, 0xcc50, 0xcc51, 0xcc52, 0xcc53, 0xcc56, 0xcc5a, - 0xcc5b, 0xcc5c, 0xcc5d, 0xcc5e, 0xcc5f, 0xcc61, 0xcc62, 0xcc63, - 0xcc65, 0xcc67, 0xcc69, 0xcc6a, 0xcc6b, 0xcc6c, 0xcc6d, 0xcc6e, - 0xcc6f, 0xcc71, 0xcc72, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcc73, 0xcc74, 0xcc76, 0xcc77, 0xcc78, 0xcc79, 0xcc7a, - 0xcc7b, 0xcc7c, 0xcc7d, 0xcc7e, 0xcc7f, 0xcc80, 0xcc81, 0xcc82, - 0xcc83, 0xcc84, 0xcc85, 0xcc86, 0xcc87, 0xcc88, 0xcc89, 0xcc8a, - 0xcc8b, 0xcc8c, 0xcc8d, 0xcc8e, 0xcc8f, 0xcc90, 0xcc91, 0xcc92, - 0xcc93, 0x3041, 0x3042, 0x3043, 0x3044, 0x3045, 0x3046, 0x3047, - 0x3048, 0x3049, 0x304a, 0x304b, 0x304c, 0x304d, 0x304e, 0x304f, - 0x3050, 0x3051, 0x3052, 0x3053, 0x3054, 0x3055, 0x3056, 0x3057, - 0x3058, 0x3059, 0x305a, 0x305b, 0x305c, 0x305d, 0x305e, 0x305f, - 0x3060, 0x3061, 0x3062, 0x3063, 0x3064, 0x3065, 0x3066, 0x3067, - 0x3068, 0x3069, 0x306a, 0x306b, 0x306c, 0x306d, 0x306e, 0x306f, - 0x3070, 0x3071, 0x3072, 0x3073, 0x3074, 0x3075, 0x3076, 0x3077, - 0x3078, 0x3079, 0x307a, 0x307b, 0x307c, 0x307d, 0x307e, 0x307f, - 0x3080, 0x3081, 0x3082, 0x3083, 0x3084, 0x3085, 0x3086, 0x3087, - 0x3088, 0x3089, 0x308a, 0x308b, 0x308c, 0x308d, 0x308e, 0x308f, - 0x3090, 0x3091, 0x3092, 0x3093, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte ab */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcc94, 0xcc95, 0xcc96, 0xcc97, 0xcc9a, 0xcc9b, 0xcc9d, - 0xcc9e, 0xcc9f, 0xcca1, 0xcca2, 0xcca3, 0xcca4, 0xcca5, 0xcca6, - 0xcca7, 0xccaa, 0xccae, 0xccaf, 0xccb0, 0xccb1, 0xccb2, 0xccb3, - 0xccb6, 0xccb7, 0xccb9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xccba, 0xccbb, 0xccbd, 0xccbe, 0xccbf, 0xccc0, 0xccc1, - 0xccc2, 0xccc3, 0xccc6, 0xccc8, 0xccca, 0xcccb, 0xcccc, 0xcccd, - 0xccce, 0xcccf, 0xccd1, 0xccd2, 0xccd3, 0xccd5, 0xccd6, 0xccd7, - 0xccd8, 0xccd9, 0xccda, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xccdb, 0xccdc, 0xccdd, 0xccde, 0xccdf, 0xcce0, 0xcce1, - 0xcce2, 0xcce3, 0xcce5, 0xcce6, 0xcce7, 0xcce8, 0xcce9, 0xccea, - 0xcceb, 0xcced, 0xccee, 0xccef, 0xccf1, 0xccf2, 0xccf3, 0xccf4, - 0xccf5, 0xccf6, 0xccf7, 0xccf8, 0xccf9, 0xccfa, 0xccfb, 0xccfc, - 0xccfd, 0x30a1, 0x30a2, 0x30a3, 0x30a4, 0x30a5, 0x30a6, 0x30a7, - 0x30a8, 0x30a9, 0x30aa, 0x30ab, 0x30ac, 0x30ad, 0x30ae, 0x30af, - 0x30b0, 0x30b1, 0x30b2, 0x30b3, 0x30b4, 0x30b5, 0x30b6, 0x30b7, - 0x30b8, 0x30b9, 0x30ba, 0x30bb, 0x30bc, 0x30bd, 0x30be, 0x30bf, - 0x30c0, 0x30c1, 0x30c2, 0x30c3, 0x30c4, 0x30c5, 0x30c6, 0x30c7, - 0x30c8, 0x30c9, 0x30ca, 0x30cb, 0x30cc, 0x30cd, 0x30ce, 0x30cf, - 0x30d0, 0x30d1, 0x30d2, 0x30d3, 0x30d4, 0x30d5, 0x30d6, 0x30d7, - 0x30d8, 0x30d9, 0x30da, 0x30db, 0x30dc, 0x30dd, 0x30de, 0x30df, - 0x30e0, 0x30e1, 0x30e2, 0x30e3, 0x30e4, 0x30e5, 0x30e6, 0x30e7, - 0x30e8, 0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ee, 0x30ef, - 0x30f0, 0x30f1, 0x30f2, 0x30f3, 0x30f4, 0x30f5, 0x30f6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte ac */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xccfe, 0xccff, 0xcd00, 0xcd02, 0xcd03, 0xcd04, 0xcd05, - 0xcd06, 0xcd07, 0xcd0a, 0xcd0b, 0xcd0d, 0xcd0e, 0xcd0f, 0xcd11, - 0xcd12, 0xcd13, 0xcd14, 0xcd15, 0xcd16, 0xcd17, 0xcd1a, 0xcd1c, - 0xcd1e, 0xcd1f, 0xcd20, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcd21, 0xcd22, 0xcd23, 0xcd25, 0xcd26, 0xcd27, 0xcd29, - 0xcd2a, 0xcd2b, 0xcd2d, 0xcd2e, 0xcd2f, 0xcd30, 0xcd31, 0xcd32, - 0xcd33, 0xcd34, 0xcd35, 0xcd36, 0xcd37, 0xcd38, 0xcd3a, 0xcd3b, - 0xcd3c, 0xcd3d, 0xcd3e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcd3f, 0xcd40, 0xcd41, 0xcd42, 0xcd43, 0xcd44, 0xcd45, - 0xcd46, 0xcd47, 0xcd48, 0xcd49, 0xcd4a, 0xcd4b, 0xcd4c, 0xcd4d, - 0xcd4e, 0xcd4f, 0xcd50, 0xcd51, 0xcd52, 0xcd53, 0xcd54, 0xcd55, - 0xcd56, 0xcd57, 0xcd58, 0xcd59, 0xcd5a, 0xcd5b, 0xcd5d, 0xcd5e, - 0xcd5f, 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401, - 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, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0451, - 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, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte ad */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcd61, 0xcd62, 0xcd63, 0xcd65, 0xcd66, 0xcd67, 0xcd68, - 0xcd69, 0xcd6a, 0xcd6b, 0xcd6e, 0xcd70, 0xcd72, 0xcd73, 0xcd74, - 0xcd75, 0xcd76, 0xcd77, 0xcd79, 0xcd7a, 0xcd7b, 0xcd7c, 0xcd7d, - 0xcd7e, 0xcd7f, 0xcd80, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcd81, 0xcd82, 0xcd83, 0xcd84, 0xcd85, 0xcd86, 0xcd87, - 0xcd89, 0xcd8a, 0xcd8b, 0xcd8c, 0xcd8d, 0xcd8e, 0xcd8f, 0xcd90, - 0xcd91, 0xcd92, 0xcd93, 0xcd96, 0xcd97, 0xcd99, 0xcd9a, 0xcd9b, - 0xcd9d, 0xcd9e, 0xcd9f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcda0, 0xcda1, 0xcda2, 0xcda3, 0xcda6, 0xcda8, 0xcdaa, - 0xcdab, 0xcdac, 0xcdad, 0xcdae, 0xcdaf, 0xcdb1, 0xcdb2, 0xcdb3, - 0xcdb4, 0xcdb5, 0xcdb6, 0xcdb7, 0xcdb8, 0xcdb9, 0xcdba, 0xcdbb, - 0xcdbc, 0xcdbd, 0xcdbe, 0xcdbf, 0xcdc0, 0xcdc1, 0xcdc2, 0xcdc3, - 0xcdc5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte ae */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcdc6, 0xcdc7, 0xcdc8, 0xcdc9, 0xcdca, 0xcdcb, 0xcdcd, - 0xcdce, 0xcdcf, 0xcdd1, 0xcdd2, 0xcdd3, 0xcdd4, 0xcdd5, 0xcdd6, - 0xcdd7, 0xcdd8, 0xcdd9, 0xcdda, 0xcddb, 0xcddc, 0xcddd, 0xcdde, - 0xcddf, 0xcde0, 0xcde1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcde2, 0xcde3, 0xcde4, 0xcde5, 0xcde6, 0xcde7, 0xcde9, - 0xcdea, 0xcdeb, 0xcded, 0xcdee, 0xcdef, 0xcdf1, 0xcdf2, 0xcdf3, - 0xcdf4, 0xcdf5, 0xcdf6, 0xcdf7, 0xcdfa, 0xcdfc, 0xcdfe, 0xcdff, - 0xce00, 0xce01, 0xce02, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xce03, 0xce05, 0xce06, 0xce07, 0xce09, 0xce0a, 0xce0b, - 0xce0d, 0xce0e, 0xce0f, 0xce10, 0xce11, 0xce12, 0xce13, 0xce15, - 0xce16, 0xce17, 0xce18, 0xce1a, 0xce1b, 0xce1c, 0xce1d, 0xce1e, - 0xce1f, 0xce22, 0xce23, 0xce25, 0xce26, 0xce27, 0xce29, 0xce2a, - 0xce2b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte af */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xce2c, 0xce2d, 0xce2e, 0xce2f, 0xce32, 0xce34, 0xce36, - 0xce37, 0xce38, 0xce39, 0xce3a, 0xce3b, 0xce3c, 0xce3d, 0xce3e, - 0xce3f, 0xce40, 0xce41, 0xce42, 0xce43, 0xce44, 0xce45, 0xce46, - 0xce47, 0xce48, 0xce49, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xce4a, 0xce4b, 0xce4c, 0xce4d, 0xce4e, 0xce4f, 0xce50, - 0xce51, 0xce52, 0xce53, 0xce54, 0xce55, 0xce56, 0xce57, 0xce5a, - 0xce5b, 0xce5d, 0xce5e, 0xce62, 0xce63, 0xce64, 0xce65, 0xce66, - 0xce67, 0xce6a, 0xce6c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xce6e, 0xce6f, 0xce70, 0xce71, 0xce72, 0xce73, 0xce76, - 0xce77, 0xce79, 0xce7a, 0xce7b, 0xce7d, 0xce7e, 0xce7f, 0xce80, - 0xce81, 0xce82, 0xce83, 0xce86, 0xce88, 0xce8a, 0xce8b, 0xce8c, - 0xce8d, 0xce8e, 0xce8f, 0xce92, 0xce93, 0xce95, 0xce96, 0xce97, - 0xce99, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte b0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xce9a, 0xce9b, 0xce9c, 0xce9d, 0xce9e, 0xce9f, 0xcea2, - 0xcea6, 0xcea7, 0xcea8, 0xcea9, 0xceaa, 0xceab, 0xceae, 0xceaf, - 0xceb0, 0xceb1, 0xceb2, 0xceb3, 0xceb4, 0xceb5, 0xceb6, 0xceb7, - 0xceb8, 0xceb9, 0xceba, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcebb, 0xcebc, 0xcebd, 0xcebe, 0xcebf, 0xcec0, 0xcec2, - 0xcec3, 0xcec4, 0xcec5, 0xcec6, 0xcec7, 0xcec8, 0xcec9, 0xceca, - 0xcecb, 0xcecc, 0xcecd, 0xcece, 0xcecf, 0xced0, 0xced1, 0xced2, - 0xced3, 0xced4, 0xced5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xced6, 0xced7, 0xced8, 0xced9, 0xceda, 0xcedb, 0xcedc, - 0xcedd, 0xcede, 0xcedf, 0xcee0, 0xcee1, 0xcee2, 0xcee3, 0xcee6, - 0xcee7, 0xcee9, 0xceea, 0xceed, 0xceee, 0xceef, 0xcef0, 0xcef1, - 0xcef2, 0xcef3, 0xcef6, 0xcefa, 0xcefb, 0xcefc, 0xcefd, 0xcefe, - 0xceff, 0xac00, 0xac01, 0xac04, 0xac07, 0xac08, 0xac09, 0xac0a, - 0xac10, 0xac11, 0xac12, 0xac13, 0xac14, 0xac15, 0xac16, 0xac17, - 0xac19, 0xac1a, 0xac1b, 0xac1c, 0xac1d, 0xac20, 0xac24, 0xac2c, - 0xac2d, 0xac2f, 0xac30, 0xac31, 0xac38, 0xac39, 0xac3c, 0xac40, - 0xac4b, 0xac4d, 0xac54, 0xac58, 0xac5c, 0xac70, 0xac71, 0xac74, - 0xac77, 0xac78, 0xac7a, 0xac80, 0xac81, 0xac83, 0xac84, 0xac85, - 0xac86, 0xac89, 0xac8a, 0xac8b, 0xac8c, 0xac90, 0xac94, 0xac9c, - 0xac9d, 0xac9f, 0xaca0, 0xaca1, 0xaca8, 0xaca9, 0xacaa, 0xacac, - 0xacaf, 0xacb0, 0xacb8, 0xacb9, 0xacbb, 0xacbc, 0xacbd, 0xacc1, - 0xacc4, 0xacc8, 0xaccc, 0xacd5, 0xacd7, 0xace0, 0xace1, 0xace4, - 0xace7, 0xace8, 0xacea, 0xacec, 0xacef, 0xacf0, 0xacf1, 0xacf3, - 0xacf5, 0xacf6, 0xacfc, 0xacfd, 0xad00, 0xad04, 0xad06, 0x003f, - /* lead byte b1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcf02, 0xcf03, 0xcf05, 0xcf06, 0xcf07, 0xcf09, 0xcf0a, - 0xcf0b, 0xcf0c, 0xcf0d, 0xcf0e, 0xcf0f, 0xcf12, 0xcf14, 0xcf16, - 0xcf17, 0xcf18, 0xcf19, 0xcf1a, 0xcf1b, 0xcf1d, 0xcf1e, 0xcf1f, - 0xcf21, 0xcf22, 0xcf23, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcf25, 0xcf26, 0xcf27, 0xcf28, 0xcf29, 0xcf2a, 0xcf2b, - 0xcf2e, 0xcf32, 0xcf33, 0xcf34, 0xcf35, 0xcf36, 0xcf37, 0xcf39, - 0xcf3a, 0xcf3b, 0xcf3c, 0xcf3d, 0xcf3e, 0xcf3f, 0xcf40, 0xcf41, - 0xcf42, 0xcf43, 0xcf44, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcf45, 0xcf46, 0xcf47, 0xcf48, 0xcf49, 0xcf4a, 0xcf4b, - 0xcf4c, 0xcf4d, 0xcf4e, 0xcf4f, 0xcf50, 0xcf51, 0xcf52, 0xcf53, - 0xcf56, 0xcf57, 0xcf59, 0xcf5a, 0xcf5b, 0xcf5d, 0xcf5e, 0xcf5f, - 0xcf60, 0xcf61, 0xcf62, 0xcf63, 0xcf66, 0xcf68, 0xcf6a, 0xcf6b, - 0xcf6c, 0xad0c, 0xad0d, 0xad0f, 0xad11, 0xad18, 0xad1c, 0xad20, - 0xad29, 0xad2c, 0xad2d, 0xad34, 0xad35, 0xad38, 0xad3c, 0xad44, - 0xad45, 0xad47, 0xad49, 0xad50, 0xad54, 0xad58, 0xad61, 0xad63, - 0xad6c, 0xad6d, 0xad70, 0xad73, 0xad74, 0xad75, 0xad76, 0xad7b, - 0xad7c, 0xad7d, 0xad7f, 0xad81, 0xad82, 0xad88, 0xad89, 0xad8c, - 0xad90, 0xad9c, 0xad9d, 0xada4, 0xadb7, 0xadc0, 0xadc1, 0xadc4, - 0xadc8, 0xadd0, 0xadd1, 0xadd3, 0xaddc, 0xade0, 0xade4, 0xadf8, - 0xadf9, 0xadfc, 0xadff, 0xae00, 0xae01, 0xae08, 0xae09, 0xae0b, - 0xae0d, 0xae14, 0xae30, 0xae31, 0xae34, 0xae37, 0xae38, 0xae3a, - 0xae40, 0xae41, 0xae43, 0xae45, 0xae46, 0xae4a, 0xae4c, 0xae4d, - 0xae4e, 0xae50, 0xae54, 0xae56, 0xae5c, 0xae5d, 0xae5f, 0xae60, - 0xae61, 0xae65, 0xae68, 0xae69, 0xae6c, 0xae70, 0xae78, 0x003f, - /* lead byte b2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcf6d, 0xcf6e, 0xcf6f, 0xcf72, 0xcf73, 0xcf75, 0xcf76, - 0xcf77, 0xcf79, 0xcf7a, 0xcf7b, 0xcf7c, 0xcf7d, 0xcf7e, 0xcf7f, - 0xcf81, 0xcf82, 0xcf83, 0xcf84, 0xcf86, 0xcf87, 0xcf88, 0xcf89, - 0xcf8a, 0xcf8b, 0xcf8d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcf8e, 0xcf8f, 0xcf90, 0xcf91, 0xcf92, 0xcf93, 0xcf94, - 0xcf95, 0xcf96, 0xcf97, 0xcf98, 0xcf99, 0xcf9a, 0xcf9b, 0xcf9c, - 0xcf9d, 0xcf9e, 0xcf9f, 0xcfa0, 0xcfa2, 0xcfa3, 0xcfa4, 0xcfa5, - 0xcfa6, 0xcfa7, 0xcfa9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcfaa, 0xcfab, 0xcfac, 0xcfad, 0xcfae, 0xcfaf, 0xcfb1, - 0xcfb2, 0xcfb3, 0xcfb4, 0xcfb5, 0xcfb6, 0xcfb7, 0xcfb8, 0xcfb9, - 0xcfba, 0xcfbb, 0xcfbc, 0xcfbd, 0xcfbe, 0xcfbf, 0xcfc0, 0xcfc1, - 0xcfc2, 0xcfc3, 0xcfc5, 0xcfc6, 0xcfc7, 0xcfc8, 0xcfc9, 0xcfca, - 0xcfcb, 0xae79, 0xae7b, 0xae7c, 0xae7d, 0xae84, 0xae85, 0xae8c, - 0xaebc, 0xaebd, 0xaebe, 0xaec0, 0xaec4, 0xaecc, 0xaecd, 0xaecf, - 0xaed0, 0xaed1, 0xaed8, 0xaed9, 0xaedc, 0xaee8, 0xaeeb, 0xaeed, - 0xaef4, 0xaef8, 0xaefc, 0xaf07, 0xaf08, 0xaf0d, 0xaf10, 0xaf2c, - 0xaf2d, 0xaf30, 0xaf32, 0xaf34, 0xaf3c, 0xaf3d, 0xaf3f, 0xaf41, - 0xaf42, 0xaf43, 0xaf48, 0xaf49, 0xaf50, 0xaf5c, 0xaf5d, 0xaf64, - 0xaf65, 0xaf79, 0xaf80, 0xaf84, 0xaf88, 0xaf90, 0xaf91, 0xaf95, - 0xaf9c, 0xafb8, 0xafb9, 0xafbc, 0xafc0, 0xafc7, 0xafc8, 0xafc9, - 0xafcb, 0xafcd, 0xafce, 0xafd4, 0xafdc, 0xafe8, 0xafe9, 0xaff0, - 0xaff1, 0xaff4, 0xaff8, 0xb000, 0xb001, 0xb004, 0xb00c, 0xb010, - 0xb014, 0xb01c, 0xb01d, 0xb028, 0xb044, 0xb045, 0xb048, 0xb04a, - 0xb04c, 0xb04e, 0xb053, 0xb054, 0xb055, 0xb057, 0xb059, 0x003f, - /* lead byte b3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcfcc, 0xcfcd, 0xcfce, 0xcfcf, 0xcfd0, 0xcfd1, 0xcfd2, - 0xcfd3, 0xcfd4, 0xcfd5, 0xcfd6, 0xcfd7, 0xcfd8, 0xcfd9, 0xcfda, - 0xcfdb, 0xcfdc, 0xcfdd, 0xcfde, 0xcfdf, 0xcfe2, 0xcfe3, 0xcfe5, - 0xcfe6, 0xcfe7, 0xcfe9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcfea, 0xcfeb, 0xcfec, 0xcfed, 0xcfee, 0xcfef, 0xcff2, - 0xcff4, 0xcff6, 0xcff7, 0xcff8, 0xcff9, 0xcffa, 0xcffb, 0xcffd, - 0xcffe, 0xcfff, 0xd001, 0xd002, 0xd003, 0xd005, 0xd006, 0xd007, - 0xd008, 0xd009, 0xd00a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd00b, 0xd00c, 0xd00d, 0xd00e, 0xd00f, 0xd010, 0xd012, - 0xd013, 0xd014, 0xd015, 0xd016, 0xd017, 0xd019, 0xd01a, 0xd01b, - 0xd01c, 0xd01d, 0xd01e, 0xd01f, 0xd020, 0xd021, 0xd022, 0xd023, - 0xd024, 0xd025, 0xd026, 0xd027, 0xd028, 0xd029, 0xd02a, 0xd02b, - 0xd02c, 0xb05d, 0xb07c, 0xb07d, 0xb080, 0xb084, 0xb08c, 0xb08d, - 0xb08f, 0xb091, 0xb098, 0xb099, 0xb09a, 0xb09c, 0xb09f, 0xb0a0, - 0xb0a1, 0xb0a2, 0xb0a8, 0xb0a9, 0xb0ab, 0xb0ac, 0xb0ad, 0xb0ae, - 0xb0af, 0xb0b1, 0xb0b3, 0xb0b4, 0xb0b5, 0xb0b8, 0xb0bc, 0xb0c4, - 0xb0c5, 0xb0c7, 0xb0c8, 0xb0c9, 0xb0d0, 0xb0d1, 0xb0d4, 0xb0d8, - 0xb0e0, 0xb0e5, 0xb108, 0xb109, 0xb10b, 0xb10c, 0xb110, 0xb112, - 0xb113, 0xb118, 0xb119, 0xb11b, 0xb11c, 0xb11d, 0xb123, 0xb124, - 0xb125, 0xb128, 0xb12c, 0xb134, 0xb135, 0xb137, 0xb138, 0xb139, - 0xb140, 0xb141, 0xb144, 0xb148, 0xb150, 0xb151, 0xb154, 0xb155, - 0xb158, 0xb15c, 0xb160, 0xb178, 0xb179, 0xb17c, 0xb180, 0xb182, - 0xb188, 0xb189, 0xb18b, 0xb18d, 0xb192, 0xb193, 0xb194, 0xb198, - 0xb19c, 0xb1a8, 0xb1cc, 0xb1d0, 0xb1d4, 0xb1dc, 0xb1dd, 0x003f, - /* lead byte b4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd02e, 0xd02f, 0xd030, 0xd031, 0xd032, 0xd033, 0xd036, - 0xd037, 0xd039, 0xd03a, 0xd03b, 0xd03d, 0xd03e, 0xd03f, 0xd040, - 0xd041, 0xd042, 0xd043, 0xd046, 0xd048, 0xd04a, 0xd04b, 0xd04c, - 0xd04d, 0xd04e, 0xd04f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd051, 0xd052, 0xd053, 0xd055, 0xd056, 0xd057, 0xd059, - 0xd05a, 0xd05b, 0xd05c, 0xd05d, 0xd05e, 0xd05f, 0xd061, 0xd062, - 0xd063, 0xd064, 0xd065, 0xd066, 0xd067, 0xd068, 0xd069, 0xd06a, - 0xd06b, 0xd06e, 0xd06f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd071, 0xd072, 0xd073, 0xd075, 0xd076, 0xd077, 0xd078, - 0xd079, 0xd07a, 0xd07b, 0xd07e, 0xd07f, 0xd080, 0xd082, 0xd083, - 0xd084, 0xd085, 0xd086, 0xd087, 0xd088, 0xd089, 0xd08a, 0xd08b, - 0xd08c, 0xd08d, 0xd08e, 0xd08f, 0xd090, 0xd091, 0xd092, 0xd093, - 0xd094, 0xb1df, 0xb1e8, 0xb1e9, 0xb1ec, 0xb1f0, 0xb1f9, 0xb1fb, - 0xb1fd, 0xb204, 0xb205, 0xb208, 0xb20b, 0xb20c, 0xb214, 0xb215, - 0xb217, 0xb219, 0xb220, 0xb234, 0xb23c, 0xb258, 0xb25c, 0xb260, - 0xb268, 0xb269, 0xb274, 0xb275, 0xb27c, 0xb284, 0xb285, 0xb289, - 0xb290, 0xb291, 0xb294, 0xb298, 0xb299, 0xb29a, 0xb2a0, 0xb2a1, - 0xb2a3, 0xb2a5, 0xb2a6, 0xb2aa, 0xb2ac, 0xb2b0, 0xb2b4, 0xb2c8, - 0xb2c9, 0xb2cc, 0xb2d0, 0xb2d2, 0xb2d8, 0xb2d9, 0xb2db, 0xb2dd, - 0xb2e2, 0xb2e4, 0xb2e5, 0xb2e6, 0xb2e8, 0xb2eb, 0xb2ec, 0xb2ed, - 0xb2ee, 0xb2ef, 0xb2f3, 0xb2f4, 0xb2f5, 0xb2f7, 0xb2f8, 0xb2f9, - 0xb2fa, 0xb2fb, 0xb2ff, 0xb300, 0xb301, 0xb304, 0xb308, 0xb310, - 0xb311, 0xb313, 0xb314, 0xb315, 0xb31c, 0xb354, 0xb355, 0xb356, - 0xb358, 0xb35b, 0xb35c, 0xb35e, 0xb35f, 0xb364, 0xb365, 0x003f, - /* lead byte b5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd095, 0xd096, 0xd097, 0xd098, 0xd099, 0xd09a, 0xd09b, - 0xd09c, 0xd09d, 0xd09e, 0xd09f, 0xd0a0, 0xd0a1, 0xd0a2, 0xd0a3, - 0xd0a6, 0xd0a7, 0xd0a9, 0xd0aa, 0xd0ab, 0xd0ad, 0xd0ae, 0xd0af, - 0xd0b0, 0xd0b1, 0xd0b2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd0b3, 0xd0b6, 0xd0b8, 0xd0ba, 0xd0bb, 0xd0bc, 0xd0bd, - 0xd0be, 0xd0bf, 0xd0c2, 0xd0c3, 0xd0c5, 0xd0c6, 0xd0c7, 0xd0ca, - 0xd0cb, 0xd0cc, 0xd0cd, 0xd0ce, 0xd0cf, 0xd0d2, 0xd0d6, 0xd0d7, - 0xd0d8, 0xd0d9, 0xd0da, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd0db, 0xd0de, 0xd0df, 0xd0e1, 0xd0e2, 0xd0e3, 0xd0e5, - 0xd0e6, 0xd0e7, 0xd0e8, 0xd0e9, 0xd0ea, 0xd0eb, 0xd0ee, 0xd0f2, - 0xd0f3, 0xd0f4, 0xd0f5, 0xd0f6, 0xd0f7, 0xd0f9, 0xd0fa, 0xd0fb, - 0xd0fc, 0xd0fd, 0xd0fe, 0xd0ff, 0xd100, 0xd101, 0xd102, 0xd103, - 0xd104, 0xb367, 0xb369, 0xb36b, 0xb36e, 0xb370, 0xb371, 0xb374, - 0xb378, 0xb380, 0xb381, 0xb383, 0xb384, 0xb385, 0xb38c, 0xb390, - 0xb394, 0xb3a0, 0xb3a1, 0xb3a8, 0xb3ac, 0xb3c4, 0xb3c5, 0xb3c8, - 0xb3cb, 0xb3cc, 0xb3ce, 0xb3d0, 0xb3d4, 0xb3d5, 0xb3d7, 0xb3d9, - 0xb3db, 0xb3dd, 0xb3e0, 0xb3e4, 0xb3e8, 0xb3fc, 0xb410, 0xb418, - 0xb41c, 0xb420, 0xb428, 0xb429, 0xb42b, 0xb434, 0xb450, 0xb451, - 0xb454, 0xb458, 0xb460, 0xb461, 0xb463, 0xb465, 0xb46c, 0xb480, - 0xb488, 0xb49d, 0xb4a4, 0xb4a8, 0xb4ac, 0xb4b5, 0xb4b7, 0xb4b9, - 0xb4c0, 0xb4c4, 0xb4c8, 0xb4d0, 0xb4d5, 0xb4dc, 0xb4dd, 0xb4e0, - 0xb4e3, 0xb4e4, 0xb4e6, 0xb4ec, 0xb4ed, 0xb4ef, 0xb4f1, 0xb4f8, - 0xb514, 0xb515, 0xb518, 0xb51b, 0xb51c, 0xb524, 0xb525, 0xb527, - 0xb528, 0xb529, 0xb52a, 0xb530, 0xb531, 0xb534, 0xb538, 0x003f, - /* lead byte b6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd105, 0xd106, 0xd107, 0xd108, 0xd109, 0xd10a, 0xd10b, - 0xd10c, 0xd10e, 0xd10f, 0xd110, 0xd111, 0xd112, 0xd113, 0xd114, - 0xd115, 0xd116, 0xd117, 0xd118, 0xd119, 0xd11a, 0xd11b, 0xd11c, - 0xd11d, 0xd11e, 0xd11f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd120, 0xd121, 0xd122, 0xd123, 0xd124, 0xd125, 0xd126, - 0xd127, 0xd128, 0xd129, 0xd12a, 0xd12b, 0xd12c, 0xd12d, 0xd12e, - 0xd12f, 0xd132, 0xd133, 0xd135, 0xd136, 0xd137, 0xd139, 0xd13b, - 0xd13c, 0xd13d, 0xd13e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd13f, 0xd142, 0xd146, 0xd147, 0xd148, 0xd149, 0xd14a, - 0xd14b, 0xd14e, 0xd14f, 0xd151, 0xd152, 0xd153, 0xd155, 0xd156, - 0xd157, 0xd158, 0xd159, 0xd15a, 0xd15b, 0xd15e, 0xd160, 0xd162, - 0xd163, 0xd164, 0xd165, 0xd166, 0xd167, 0xd169, 0xd16a, 0xd16b, - 0xd16d, 0xb540, 0xb541, 0xb543, 0xb544, 0xb545, 0xb54b, 0xb54c, - 0xb54d, 0xb550, 0xb554, 0xb55c, 0xb55d, 0xb55f, 0xb560, 0xb561, - 0xb5a0, 0xb5a1, 0xb5a4, 0xb5a8, 0xb5aa, 0xb5ab, 0xb5b0, 0xb5b1, - 0xb5b3, 0xb5b4, 0xb5b5, 0xb5bb, 0xb5bc, 0xb5bd, 0xb5c0, 0xb5c4, - 0xb5cc, 0xb5cd, 0xb5cf, 0xb5d0, 0xb5d1, 0xb5d8, 0xb5ec, 0xb610, - 0xb611, 0xb614, 0xb618, 0xb625, 0xb62c, 0xb634, 0xb648, 0xb664, - 0xb668, 0xb69c, 0xb69d, 0xb6a0, 0xb6a4, 0xb6ab, 0xb6ac, 0xb6b1, - 0xb6d4, 0xb6f0, 0xb6f4, 0xb6f8, 0xb700, 0xb701, 0xb705, 0xb728, - 0xb729, 0xb72c, 0xb72f, 0xb730, 0xb738, 0xb739, 0xb73b, 0xb744, - 0xb748, 0xb74c, 0xb754, 0xb755, 0xb760, 0xb764, 0xb768, 0xb770, - 0xb771, 0xb773, 0xb775, 0xb77c, 0xb77d, 0xb780, 0xb784, 0xb78c, - 0xb78d, 0xb78f, 0xb790, 0xb791, 0xb792, 0xb796, 0xb797, 0x003f, - /* lead byte b7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd16e, 0xd16f, 0xd170, 0xd171, 0xd172, 0xd173, 0xd174, - 0xd175, 0xd176, 0xd177, 0xd178, 0xd179, 0xd17a, 0xd17b, 0xd17d, - 0xd17e, 0xd17f, 0xd180, 0xd181, 0xd182, 0xd183, 0xd185, 0xd186, - 0xd187, 0xd189, 0xd18a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd18b, 0xd18c, 0xd18d, 0xd18e, 0xd18f, 0xd190, 0xd191, - 0xd192, 0xd193, 0xd194, 0xd195, 0xd196, 0xd197, 0xd198, 0xd199, - 0xd19a, 0xd19b, 0xd19c, 0xd19d, 0xd19e, 0xd19f, 0xd1a2, 0xd1a3, - 0xd1a5, 0xd1a6, 0xd1a7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd1a9, 0xd1aa, 0xd1ab, 0xd1ac, 0xd1ad, 0xd1ae, 0xd1af, - 0xd1b2, 0xd1b4, 0xd1b6, 0xd1b7, 0xd1b8, 0xd1b9, 0xd1bb, 0xd1bd, - 0xd1be, 0xd1bf, 0xd1c1, 0xd1c2, 0xd1c3, 0xd1c4, 0xd1c5, 0xd1c6, - 0xd1c7, 0xd1c8, 0xd1c9, 0xd1ca, 0xd1cb, 0xd1cc, 0xd1cd, 0xd1ce, - 0xd1cf, 0xb798, 0xb799, 0xb79c, 0xb7a0, 0xb7a8, 0xb7a9, 0xb7ab, - 0xb7ac, 0xb7ad, 0xb7b4, 0xb7b5, 0xb7b8, 0xb7c7, 0xb7c9, 0xb7ec, - 0xb7ed, 0xb7f0, 0xb7f4, 0xb7fc, 0xb7fd, 0xb7ff, 0xb800, 0xb801, - 0xb807, 0xb808, 0xb809, 0xb80c, 0xb810, 0xb818, 0xb819, 0xb81b, - 0xb81d, 0xb824, 0xb825, 0xb828, 0xb82c, 0xb834, 0xb835, 0xb837, - 0xb838, 0xb839, 0xb840, 0xb844, 0xb851, 0xb853, 0xb85c, 0xb85d, - 0xb860, 0xb864, 0xb86c, 0xb86d, 0xb86f, 0xb871, 0xb878, 0xb87c, - 0xb88d, 0xb8a8, 0xb8b0, 0xb8b4, 0xb8b8, 0xb8c0, 0xb8c1, 0xb8c3, - 0xb8c5, 0xb8cc, 0xb8d0, 0xb8d4, 0xb8dd, 0xb8df, 0xb8e1, 0xb8e8, - 0xb8e9, 0xb8ec, 0xb8f0, 0xb8f8, 0xb8f9, 0xb8fb, 0xb8fd, 0xb904, - 0xb918, 0xb920, 0xb93c, 0xb93d, 0xb940, 0xb944, 0xb94c, 0xb94f, - 0xb951, 0xb958, 0xb959, 0xb95c, 0xb960, 0xb968, 0xb969, 0x003f, - /* lead byte b8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd1d0, 0xd1d1, 0xd1d2, 0xd1d3, 0xd1d4, 0xd1d5, 0xd1d6, - 0xd1d7, 0xd1d9, 0xd1da, 0xd1db, 0xd1dc, 0xd1dd, 0xd1de, 0xd1df, - 0xd1e0, 0xd1e1, 0xd1e2, 0xd1e3, 0xd1e4, 0xd1e5, 0xd1e6, 0xd1e7, - 0xd1e8, 0xd1e9, 0xd1ea, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd1eb, 0xd1ec, 0xd1ed, 0xd1ee, 0xd1ef, 0xd1f0, 0xd1f1, - 0xd1f2, 0xd1f3, 0xd1f5, 0xd1f6, 0xd1f7, 0xd1f9, 0xd1fa, 0xd1fb, - 0xd1fc, 0xd1fd, 0xd1fe, 0xd1ff, 0xd200, 0xd201, 0xd202, 0xd203, - 0xd204, 0xd205, 0xd206, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd208, 0xd20a, 0xd20b, 0xd20c, 0xd20d, 0xd20e, 0xd20f, - 0xd211, 0xd212, 0xd213, 0xd214, 0xd215, 0xd216, 0xd217, 0xd218, - 0xd219, 0xd21a, 0xd21b, 0xd21c, 0xd21d, 0xd21e, 0xd21f, 0xd220, - 0xd221, 0xd222, 0xd223, 0xd224, 0xd225, 0xd226, 0xd227, 0xd228, - 0xd229, 0xb96b, 0xb96d, 0xb974, 0xb975, 0xb978, 0xb97c, 0xb984, - 0xb985, 0xb987, 0xb989, 0xb98a, 0xb98d, 0xb98e, 0xb9ac, 0xb9ad, - 0xb9b0, 0xb9b4, 0xb9bc, 0xb9bd, 0xb9bf, 0xb9c1, 0xb9c8, 0xb9c9, - 0xb9cc, 0xb9ce, 0xb9cf, 0xb9d0, 0xb9d1, 0xb9d2, 0xb9d8, 0xb9d9, - 0xb9db, 0xb9dd, 0xb9de, 0xb9e1, 0xb9e3, 0xb9e4, 0xb9e5, 0xb9e8, - 0xb9ec, 0xb9f4, 0xb9f5, 0xb9f7, 0xb9f8, 0xb9f9, 0xb9fa, 0xba00, - 0xba01, 0xba08, 0xba15, 0xba38, 0xba39, 0xba3c, 0xba40, 0xba42, - 0xba48, 0xba49, 0xba4b, 0xba4d, 0xba4e, 0xba53, 0xba54, 0xba55, - 0xba58, 0xba5c, 0xba64, 0xba65, 0xba67, 0xba68, 0xba69, 0xba70, - 0xba71, 0xba74, 0xba78, 0xba83, 0xba84, 0xba85, 0xba87, 0xba8c, - 0xbaa8, 0xbaa9, 0xbaab, 0xbaac, 0xbab0, 0xbab2, 0xbab8, 0xbab9, - 0xbabb, 0xbabd, 0xbac4, 0xbac8, 0xbad8, 0xbad9, 0xbafc, 0x003f, - /* lead byte b9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd22a, 0xd22b, 0xd22e, 0xd22f, 0xd231, 0xd232, 0xd233, - 0xd235, 0xd236, 0xd237, 0xd238, 0xd239, 0xd23a, 0xd23b, 0xd23e, - 0xd240, 0xd242, 0xd243, 0xd244, 0xd245, 0xd246, 0xd247, 0xd249, - 0xd24a, 0xd24b, 0xd24c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd24d, 0xd24e, 0xd24f, 0xd250, 0xd251, 0xd252, 0xd253, - 0xd254, 0xd255, 0xd256, 0xd257, 0xd258, 0xd259, 0xd25a, 0xd25b, - 0xd25d, 0xd25e, 0xd25f, 0xd260, 0xd261, 0xd262, 0xd263, 0xd265, - 0xd266, 0xd267, 0xd268, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd269, 0xd26a, 0xd26b, 0xd26c, 0xd26d, 0xd26e, 0xd26f, - 0xd270, 0xd271, 0xd272, 0xd273, 0xd274, 0xd275, 0xd276, 0xd277, - 0xd278, 0xd279, 0xd27a, 0xd27b, 0xd27c, 0xd27d, 0xd27e, 0xd27f, - 0xd282, 0xd283, 0xd285, 0xd286, 0xd287, 0xd289, 0xd28a, 0xd28b, - 0xd28c, 0xbb00, 0xbb04, 0xbb0d, 0xbb0f, 0xbb11, 0xbb18, 0xbb1c, - 0xbb20, 0xbb29, 0xbb2b, 0xbb34, 0xbb35, 0xbb36, 0xbb38, 0xbb3b, - 0xbb3c, 0xbb3d, 0xbb3e, 0xbb44, 0xbb45, 0xbb47, 0xbb49, 0xbb4d, - 0xbb4f, 0xbb50, 0xbb54, 0xbb58, 0xbb61, 0xbb63, 0xbb6c, 0xbb88, - 0xbb8c, 0xbb90, 0xbba4, 0xbba8, 0xbbac, 0xbbb4, 0xbbb7, 0xbbc0, - 0xbbc4, 0xbbc8, 0xbbd0, 0xbbd3, 0xbbf8, 0xbbf9, 0xbbfc, 0xbbff, - 0xbc00, 0xbc02, 0xbc08, 0xbc09, 0xbc0b, 0xbc0c, 0xbc0d, 0xbc0f, - 0xbc11, 0xbc14, 0xbc15, 0xbc16, 0xbc17, 0xbc18, 0xbc1b, 0xbc1c, - 0xbc1d, 0xbc1e, 0xbc1f, 0xbc24, 0xbc25, 0xbc27, 0xbc29, 0xbc2d, - 0xbc30, 0xbc31, 0xbc34, 0xbc38, 0xbc40, 0xbc41, 0xbc43, 0xbc44, - 0xbc45, 0xbc49, 0xbc4c, 0xbc4d, 0xbc50, 0xbc5d, 0xbc84, 0xbc85, - 0xbc88, 0xbc8b, 0xbc8c, 0xbc8e, 0xbc94, 0xbc95, 0xbc97, 0x003f, - /* lead byte ba */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd28d, 0xd28e, 0xd28f, 0xd292, 0xd293, 0xd294, 0xd296, - 0xd297, 0xd298, 0xd299, 0xd29a, 0xd29b, 0xd29d, 0xd29e, 0xd29f, - 0xd2a1, 0xd2a2, 0xd2a3, 0xd2a5, 0xd2a6, 0xd2a7, 0xd2a8, 0xd2a9, - 0xd2aa, 0xd2ab, 0xd2ad, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd2ae, 0xd2af, 0xd2b0, 0xd2b2, 0xd2b3, 0xd2b4, 0xd2b5, - 0xd2b6, 0xd2b7, 0xd2ba, 0xd2bb, 0xd2bd, 0xd2be, 0xd2c1, 0xd2c3, - 0xd2c4, 0xd2c5, 0xd2c6, 0xd2c7, 0xd2ca, 0xd2cc, 0xd2cd, 0xd2ce, - 0xd2cf, 0xd2d0, 0xd2d1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd2d2, 0xd2d3, 0xd2d5, 0xd2d6, 0xd2d7, 0xd2d9, 0xd2da, - 0xd2db, 0xd2dd, 0xd2de, 0xd2df, 0xd2e0, 0xd2e1, 0xd2e2, 0xd2e3, - 0xd2e6, 0xd2e7, 0xd2e8, 0xd2e9, 0xd2ea, 0xd2eb, 0xd2ec, 0xd2ed, - 0xd2ee, 0xd2ef, 0xd2f2, 0xd2f3, 0xd2f5, 0xd2f6, 0xd2f7, 0xd2f9, - 0xd2fa, 0xbc99, 0xbc9a, 0xbca0, 0xbca1, 0xbca4, 0xbca7, 0xbca8, - 0xbcb0, 0xbcb1, 0xbcb3, 0xbcb4, 0xbcb5, 0xbcbc, 0xbcbd, 0xbcc0, - 0xbcc4, 0xbccd, 0xbccf, 0xbcd0, 0xbcd1, 0xbcd5, 0xbcd8, 0xbcdc, - 0xbcf4, 0xbcf5, 0xbcf6, 0xbcf8, 0xbcfc, 0xbd04, 0xbd05, 0xbd07, - 0xbd09, 0xbd10, 0xbd14, 0xbd24, 0xbd2c, 0xbd40, 0xbd48, 0xbd49, - 0xbd4c, 0xbd50, 0xbd58, 0xbd59, 0xbd64, 0xbd68, 0xbd80, 0xbd81, - 0xbd84, 0xbd87, 0xbd88, 0xbd89, 0xbd8a, 0xbd90, 0xbd91, 0xbd93, - 0xbd95, 0xbd99, 0xbd9a, 0xbd9c, 0xbda4, 0xbdb0, 0xbdb8, 0xbdd4, - 0xbdd5, 0xbdd8, 0xbddc, 0xbde9, 0xbdf0, 0xbdf4, 0xbdf8, 0xbe00, - 0xbe03, 0xbe05, 0xbe0c, 0xbe0d, 0xbe10, 0xbe14, 0xbe1c, 0xbe1d, - 0xbe1f, 0xbe44, 0xbe45, 0xbe48, 0xbe4c, 0xbe4e, 0xbe54, 0xbe55, - 0xbe57, 0xbe59, 0xbe5a, 0xbe5b, 0xbe60, 0xbe61, 0xbe64, 0x003f, - /* lead byte bb */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd2fb, 0xd2fc, 0xd2fd, 0xd2fe, 0xd2ff, 0xd302, 0xd304, - 0xd306, 0xd307, 0xd308, 0xd309, 0xd30a, 0xd30b, 0xd30f, 0xd311, - 0xd312, 0xd313, 0xd315, 0xd317, 0xd318, 0xd319, 0xd31a, 0xd31b, - 0xd31e, 0xd322, 0xd323, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd324, 0xd326, 0xd327, 0xd32a, 0xd32b, 0xd32d, 0xd32e, - 0xd32f, 0xd331, 0xd332, 0xd333, 0xd334, 0xd335, 0xd336, 0xd337, - 0xd33a, 0xd33e, 0xd33f, 0xd340, 0xd341, 0xd342, 0xd343, 0xd346, - 0xd347, 0xd348, 0xd349, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd34a, 0xd34b, 0xd34c, 0xd34d, 0xd34e, 0xd34f, 0xd350, - 0xd351, 0xd352, 0xd353, 0xd354, 0xd355, 0xd356, 0xd357, 0xd358, - 0xd359, 0xd35a, 0xd35b, 0xd35c, 0xd35d, 0xd35e, 0xd35f, 0xd360, - 0xd361, 0xd362, 0xd363, 0xd364, 0xd365, 0xd366, 0xd367, 0xd368, - 0xd369, 0xbe68, 0xbe6a, 0xbe70, 0xbe71, 0xbe73, 0xbe74, 0xbe75, - 0xbe7b, 0xbe7c, 0xbe7d, 0xbe80, 0xbe84, 0xbe8c, 0xbe8d, 0xbe8f, - 0xbe90, 0xbe91, 0xbe98, 0xbe99, 0xbea8, 0xbed0, 0xbed1, 0xbed4, - 0xbed7, 0xbed8, 0xbee0, 0xbee3, 0xbee4, 0xbee5, 0xbeec, 0xbf01, - 0xbf08, 0xbf09, 0xbf18, 0xbf19, 0xbf1b, 0xbf1c, 0xbf1d, 0xbf40, - 0xbf41, 0xbf44, 0xbf48, 0xbf50, 0xbf51, 0xbf55, 0xbf94, 0xbfb0, - 0xbfc5, 0xbfcc, 0xbfcd, 0xbfd0, 0xbfd4, 0xbfdc, 0xbfdf, 0xbfe1, - 0xc03c, 0xc051, 0xc058, 0xc05c, 0xc060, 0xc068, 0xc069, 0xc090, - 0xc091, 0xc094, 0xc098, 0xc0a0, 0xc0a1, 0xc0a3, 0xc0a5, 0xc0ac, - 0xc0ad, 0xc0af, 0xc0b0, 0xc0b3, 0xc0b4, 0xc0b5, 0xc0b6, 0xc0bc, - 0xc0bd, 0xc0bf, 0xc0c0, 0xc0c1, 0xc0c5, 0xc0c8, 0xc0c9, 0xc0cc, - 0xc0d0, 0xc0d8, 0xc0d9, 0xc0db, 0xc0dc, 0xc0dd, 0xc0e4, 0x003f, - /* lead byte bc */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd36a, 0xd36b, 0xd36c, 0xd36d, 0xd36e, 0xd36f, 0xd370, - 0xd371, 0xd372, 0xd373, 0xd374, 0xd375, 0xd376, 0xd377, 0xd378, - 0xd379, 0xd37a, 0xd37b, 0xd37e, 0xd37f, 0xd381, 0xd382, 0xd383, - 0xd385, 0xd386, 0xd387, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd388, 0xd389, 0xd38a, 0xd38b, 0xd38e, 0xd392, 0xd393, - 0xd394, 0xd395, 0xd396, 0xd397, 0xd39a, 0xd39b, 0xd39d, 0xd39e, - 0xd39f, 0xd3a1, 0xd3a2, 0xd3a3, 0xd3a4, 0xd3a5, 0xd3a6, 0xd3a7, - 0xd3aa, 0xd3ac, 0xd3ae, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd3af, 0xd3b0, 0xd3b1, 0xd3b2, 0xd3b3, 0xd3b5, 0xd3b6, - 0xd3b7, 0xd3b9, 0xd3ba, 0xd3bb, 0xd3bd, 0xd3be, 0xd3bf, 0xd3c0, - 0xd3c1, 0xd3c2, 0xd3c3, 0xd3c6, 0xd3c7, 0xd3ca, 0xd3cb, 0xd3cc, - 0xd3cd, 0xd3ce, 0xd3cf, 0xd3d1, 0xd3d2, 0xd3d3, 0xd3d4, 0xd3d5, - 0xd3d6, 0xc0e5, 0xc0e8, 0xc0ec, 0xc0f4, 0xc0f5, 0xc0f7, 0xc0f9, - 0xc100, 0xc104, 0xc108, 0xc110, 0xc115, 0xc11c, 0xc11d, 0xc11e, - 0xc11f, 0xc120, 0xc123, 0xc124, 0xc126, 0xc127, 0xc12c, 0xc12d, - 0xc12f, 0xc130, 0xc131, 0xc136, 0xc138, 0xc139, 0xc13c, 0xc140, - 0xc148, 0xc149, 0xc14b, 0xc14c, 0xc14d, 0xc154, 0xc155, 0xc158, - 0xc15c, 0xc164, 0xc165, 0xc167, 0xc168, 0xc169, 0xc170, 0xc174, - 0xc178, 0xc185, 0xc18c, 0xc18d, 0xc18e, 0xc190, 0xc194, 0xc196, - 0xc19c, 0xc19d, 0xc19f, 0xc1a1, 0xc1a5, 0xc1a8, 0xc1a9, 0xc1ac, - 0xc1b0, 0xc1bd, 0xc1c4, 0xc1c8, 0xc1cc, 0xc1d4, 0xc1d7, 0xc1d8, - 0xc1e0, 0xc1e4, 0xc1e8, 0xc1f0, 0xc1f1, 0xc1f3, 0xc1fc, 0xc1fd, - 0xc200, 0xc204, 0xc20c, 0xc20d, 0xc20f, 0xc211, 0xc218, 0xc219, - 0xc21c, 0xc21f, 0xc220, 0xc228, 0xc229, 0xc22b, 0xc22d, 0x003f, - /* lead byte bd */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd3d7, 0xd3d9, 0xd3da, 0xd3db, 0xd3dc, 0xd3dd, 0xd3de, - 0xd3df, 0xd3e0, 0xd3e2, 0xd3e4, 0xd3e5, 0xd3e6, 0xd3e7, 0xd3e8, - 0xd3e9, 0xd3ea, 0xd3eb, 0xd3ee, 0xd3ef, 0xd3f1, 0xd3f2, 0xd3f3, - 0xd3f5, 0xd3f6, 0xd3f7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd3f8, 0xd3f9, 0xd3fa, 0xd3fb, 0xd3fe, 0xd400, 0xd402, - 0xd403, 0xd404, 0xd405, 0xd406, 0xd407, 0xd409, 0xd40a, 0xd40b, - 0xd40c, 0xd40d, 0xd40e, 0xd40f, 0xd410, 0xd411, 0xd412, 0xd413, - 0xd414, 0xd415, 0xd416, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd417, 0xd418, 0xd419, 0xd41a, 0xd41b, 0xd41c, 0xd41e, - 0xd41f, 0xd420, 0xd421, 0xd422, 0xd423, 0xd424, 0xd425, 0xd426, - 0xd427, 0xd428, 0xd429, 0xd42a, 0xd42b, 0xd42c, 0xd42d, 0xd42e, - 0xd42f, 0xd430, 0xd431, 0xd432, 0xd433, 0xd434, 0xd435, 0xd436, - 0xd437, 0xc22f, 0xc231, 0xc232, 0xc234, 0xc248, 0xc250, 0xc251, - 0xc254, 0xc258, 0xc260, 0xc265, 0xc26c, 0xc26d, 0xc270, 0xc274, - 0xc27c, 0xc27d, 0xc27f, 0xc281, 0xc288, 0xc289, 0xc290, 0xc298, - 0xc29b, 0xc29d, 0xc2a4, 0xc2a5, 0xc2a8, 0xc2ac, 0xc2ad, 0xc2b4, - 0xc2b5, 0xc2b7, 0xc2b9, 0xc2dc, 0xc2dd, 0xc2e0, 0xc2e3, 0xc2e4, - 0xc2eb, 0xc2ec, 0xc2ed, 0xc2ef, 0xc2f1, 0xc2f6, 0xc2f8, 0xc2f9, - 0xc2fb, 0xc2fc, 0xc300, 0xc308, 0xc309, 0xc30c, 0xc30d, 0xc313, - 0xc314, 0xc315, 0xc318, 0xc31c, 0xc324, 0xc325, 0xc328, 0xc329, - 0xc345, 0xc368, 0xc369, 0xc36c, 0xc370, 0xc372, 0xc378, 0xc379, - 0xc37c, 0xc37d, 0xc384, 0xc388, 0xc38c, 0xc3c0, 0xc3d8, 0xc3d9, - 0xc3dc, 0xc3df, 0xc3e0, 0xc3e2, 0xc3e8, 0xc3e9, 0xc3ed, 0xc3f4, - 0xc3f5, 0xc3f8, 0xc408, 0xc410, 0xc424, 0xc42c, 0xc430, 0x003f, - /* lead byte be */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd438, 0xd439, 0xd43a, 0xd43b, 0xd43c, 0xd43d, 0xd43e, - 0xd43f, 0xd441, 0xd442, 0xd443, 0xd445, 0xd446, 0xd447, 0xd448, - 0xd449, 0xd44a, 0xd44b, 0xd44c, 0xd44d, 0xd44e, 0xd44f, 0xd450, - 0xd451, 0xd452, 0xd453, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd454, 0xd455, 0xd456, 0xd457, 0xd458, 0xd459, 0xd45a, - 0xd45b, 0xd45d, 0xd45e, 0xd45f, 0xd461, 0xd462, 0xd463, 0xd465, - 0xd466, 0xd467, 0xd468, 0xd469, 0xd46a, 0xd46b, 0xd46c, 0xd46e, - 0xd470, 0xd471, 0xd472, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd473, 0xd474, 0xd475, 0xd476, 0xd477, 0xd47a, 0xd47b, - 0xd47d, 0xd47e, 0xd481, 0xd483, 0xd484, 0xd485, 0xd486, 0xd487, - 0xd48a, 0xd48c, 0xd48e, 0xd48f, 0xd490, 0xd491, 0xd492, 0xd493, - 0xd495, 0xd496, 0xd497, 0xd498, 0xd499, 0xd49a, 0xd49b, 0xd49c, - 0xd49d, 0xc434, 0xc43c, 0xc43d, 0xc448, 0xc464, 0xc465, 0xc468, - 0xc46c, 0xc474, 0xc475, 0xc479, 0xc480, 0xc494, 0xc49c, 0xc4b8, - 0xc4bc, 0xc4e9, 0xc4f0, 0xc4f1, 0xc4f4, 0xc4f8, 0xc4fa, 0xc4ff, - 0xc500, 0xc501, 0xc50c, 0xc510, 0xc514, 0xc51c, 0xc528, 0xc529, - 0xc52c, 0xc530, 0xc538, 0xc539, 0xc53b, 0xc53d, 0xc544, 0xc545, - 0xc548, 0xc549, 0xc54a, 0xc54c, 0xc54d, 0xc54e, 0xc553, 0xc554, - 0xc555, 0xc557, 0xc558, 0xc559, 0xc55d, 0xc55e, 0xc560, 0xc561, - 0xc564, 0xc568, 0xc570, 0xc571, 0xc573, 0xc574, 0xc575, 0xc57c, - 0xc57d, 0xc580, 0xc584, 0xc587, 0xc58c, 0xc58d, 0xc58f, 0xc591, - 0xc595, 0xc597, 0xc598, 0xc59c, 0xc5a0, 0xc5a9, 0xc5b4, 0xc5b5, - 0xc5b8, 0xc5b9, 0xc5bb, 0xc5bc, 0xc5bd, 0xc5be, 0xc5c4, 0xc5c5, - 0xc5c6, 0xc5c7, 0xc5c8, 0xc5c9, 0xc5ca, 0xc5cc, 0xc5ce, 0x003f, - /* lead byte bf */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd49e, 0xd49f, 0xd4a0, 0xd4a1, 0xd4a2, 0xd4a3, 0xd4a4, - 0xd4a5, 0xd4a6, 0xd4a7, 0xd4a8, 0xd4aa, 0xd4ab, 0xd4ac, 0xd4ad, - 0xd4ae, 0xd4af, 0xd4b0, 0xd4b1, 0xd4b2, 0xd4b3, 0xd4b4, 0xd4b5, - 0xd4b6, 0xd4b7, 0xd4b8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd4b9, 0xd4ba, 0xd4bb, 0xd4bc, 0xd4bd, 0xd4be, 0xd4bf, - 0xd4c0, 0xd4c1, 0xd4c2, 0xd4c3, 0xd4c4, 0xd4c5, 0xd4c6, 0xd4c7, - 0xd4c8, 0xd4c9, 0xd4ca, 0xd4cb, 0xd4cd, 0xd4ce, 0xd4cf, 0xd4d1, - 0xd4d2, 0xd4d3, 0xd4d5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd4d6, 0xd4d7, 0xd4d8, 0xd4d9, 0xd4da, 0xd4db, 0xd4dd, - 0xd4de, 0xd4e0, 0xd4e1, 0xd4e2, 0xd4e3, 0xd4e4, 0xd4e5, 0xd4e6, - 0xd4e7, 0xd4e9, 0xd4ea, 0xd4eb, 0xd4ed, 0xd4ee, 0xd4ef, 0xd4f1, - 0xd4f2, 0xd4f3, 0xd4f4, 0xd4f5, 0xd4f6, 0xd4f7, 0xd4f9, 0xd4fa, - 0xd4fc, 0xc5d0, 0xc5d1, 0xc5d4, 0xc5d8, 0xc5e0, 0xc5e1, 0xc5e3, - 0xc5e5, 0xc5ec, 0xc5ed, 0xc5ee, 0xc5f0, 0xc5f4, 0xc5f6, 0xc5f7, - 0xc5fc, 0xc5fd, 0xc5fe, 0xc5ff, 0xc600, 0xc601, 0xc605, 0xc606, - 0xc607, 0xc608, 0xc60c, 0xc610, 0xc618, 0xc619, 0xc61b, 0xc61c, - 0xc624, 0xc625, 0xc628, 0xc62c, 0xc62d, 0xc62e, 0xc630, 0xc633, - 0xc634, 0xc635, 0xc637, 0xc639, 0xc63b, 0xc640, 0xc641, 0xc644, - 0xc648, 0xc650, 0xc651, 0xc653, 0xc654, 0xc655, 0xc65c, 0xc65d, - 0xc660, 0xc66c, 0xc66f, 0xc671, 0xc678, 0xc679, 0xc67c, 0xc680, - 0xc688, 0xc689, 0xc68b, 0xc68d, 0xc694, 0xc695, 0xc698, 0xc69c, - 0xc6a4, 0xc6a5, 0xc6a7, 0xc6a9, 0xc6b0, 0xc6b1, 0xc6b4, 0xc6b8, - 0xc6b9, 0xc6ba, 0xc6c0, 0xc6c1, 0xc6c3, 0xc6c5, 0xc6cc, 0xc6cd, - 0xc6d0, 0xc6d4, 0xc6dc, 0xc6dd, 0xc6e0, 0xc6e1, 0xc6e8, 0x003f, - /* lead byte c0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd4fe, 0xd4ff, 0xd500, 0xd501, 0xd502, 0xd503, 0xd505, - 0xd506, 0xd507, 0xd509, 0xd50a, 0xd50b, 0xd50d, 0xd50e, 0xd50f, - 0xd510, 0xd511, 0xd512, 0xd513, 0xd516, 0xd518, 0xd519, 0xd51a, - 0xd51b, 0xd51c, 0xd51d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd51e, 0xd51f, 0xd520, 0xd521, 0xd522, 0xd523, 0xd524, - 0xd525, 0xd526, 0xd527, 0xd528, 0xd529, 0xd52a, 0xd52b, 0xd52c, - 0xd52d, 0xd52e, 0xd52f, 0xd530, 0xd531, 0xd532, 0xd533, 0xd534, - 0xd535, 0xd536, 0xd537, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd538, 0xd539, 0xd53a, 0xd53b, 0xd53e, 0xd53f, 0xd541, - 0xd542, 0xd543, 0xd545, 0xd546, 0xd547, 0xd548, 0xd549, 0xd54a, - 0xd54b, 0xd54e, 0xd550, 0xd552, 0xd553, 0xd554, 0xd555, 0xd556, - 0xd557, 0xd55a, 0xd55b, 0xd55d, 0xd55e, 0xd55f, 0xd561, 0xd562, - 0xd563, 0xc6e9, 0xc6ec, 0xc6f0, 0xc6f8, 0xc6f9, 0xc6fd, 0xc704, - 0xc705, 0xc708, 0xc70c, 0xc714, 0xc715, 0xc717, 0xc719, 0xc720, - 0xc721, 0xc724, 0xc728, 0xc730, 0xc731, 0xc733, 0xc735, 0xc737, - 0xc73c, 0xc73d, 0xc740, 0xc744, 0xc74a, 0xc74c, 0xc74d, 0xc74f, - 0xc751, 0xc752, 0xc753, 0xc754, 0xc755, 0xc756, 0xc757, 0xc758, - 0xc75c, 0xc760, 0xc768, 0xc76b, 0xc774, 0xc775, 0xc778, 0xc77c, - 0xc77d, 0xc77e, 0xc783, 0xc784, 0xc785, 0xc787, 0xc788, 0xc789, - 0xc78a, 0xc78e, 0xc790, 0xc791, 0xc794, 0xc796, 0xc797, 0xc798, - 0xc79a, 0xc7a0, 0xc7a1, 0xc7a3, 0xc7a4, 0xc7a5, 0xc7a6, 0xc7ac, - 0xc7ad, 0xc7b0, 0xc7b4, 0xc7bc, 0xc7bd, 0xc7bf, 0xc7c0, 0xc7c1, - 0xc7c8, 0xc7c9, 0xc7cc, 0xc7ce, 0xc7d0, 0xc7d8, 0xc7dd, 0xc7e4, - 0xc7e8, 0xc7ec, 0xc800, 0xc801, 0xc804, 0xc808, 0xc80a, 0x003f, - /* lead byte c1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd564, 0xd566, 0xd567, 0xd56a, 0xd56c, 0xd56e, 0xd56f, - 0xd570, 0xd571, 0xd572, 0xd573, 0xd576, 0xd577, 0xd579, 0xd57a, - 0xd57b, 0xd57d, 0xd57e, 0xd57f, 0xd580, 0xd581, 0xd582, 0xd583, - 0xd586, 0xd58a, 0xd58b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd58c, 0xd58d, 0xd58e, 0xd58f, 0xd591, 0xd592, 0xd593, - 0xd594, 0xd595, 0xd596, 0xd597, 0xd598, 0xd599, 0xd59a, 0xd59b, - 0xd59c, 0xd59d, 0xd59e, 0xd59f, 0xd5a0, 0xd5a1, 0xd5a2, 0xd5a3, - 0xd5a4, 0xd5a6, 0xd5a7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd5a8, 0xd5a9, 0xd5aa, 0xd5ab, 0xd5ac, 0xd5ad, 0xd5ae, - 0xd5af, 0xd5b0, 0xd5b1, 0xd5b2, 0xd5b3, 0xd5b4, 0xd5b5, 0xd5b6, - 0xd5b7, 0xd5b8, 0xd5b9, 0xd5ba, 0xd5bb, 0xd5bc, 0xd5bd, 0xd5be, - 0xd5bf, 0xd5c0, 0xd5c1, 0xd5c2, 0xd5c3, 0xd5c4, 0xd5c5, 0xd5c6, - 0xd5c7, 0xc810, 0xc811, 0xc813, 0xc815, 0xc816, 0xc81c, 0xc81d, - 0xc820, 0xc824, 0xc82c, 0xc82d, 0xc82f, 0xc831, 0xc838, 0xc83c, - 0xc840, 0xc848, 0xc849, 0xc84c, 0xc84d, 0xc854, 0xc870, 0xc871, - 0xc874, 0xc878, 0xc87a, 0xc880, 0xc881, 0xc883, 0xc885, 0xc886, - 0xc887, 0xc88b, 0xc88c, 0xc88d, 0xc894, 0xc89d, 0xc89f, 0xc8a1, - 0xc8a8, 0xc8bc, 0xc8bd, 0xc8c4, 0xc8c8, 0xc8cc, 0xc8d4, 0xc8d5, - 0xc8d7, 0xc8d9, 0xc8e0, 0xc8e1, 0xc8e4, 0xc8f5, 0xc8fc, 0xc8fd, - 0xc900, 0xc904, 0xc905, 0xc906, 0xc90c, 0xc90d, 0xc90f, 0xc911, - 0xc918, 0xc92c, 0xc934, 0xc950, 0xc951, 0xc954, 0xc958, 0xc960, - 0xc961, 0xc963, 0xc96c, 0xc970, 0xc974, 0xc97c, 0xc988, 0xc989, - 0xc98c, 0xc990, 0xc998, 0xc999, 0xc99b, 0xc99d, 0xc9c0, 0xc9c1, - 0xc9c4, 0xc9c7, 0xc9c8, 0xc9ca, 0xc9d0, 0xc9d1, 0xc9d3, 0x003f, - /* lead byte c2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd5ca, 0xd5cb, 0xd5cd, 0xd5ce, 0xd5cf, 0xd5d1, 0xd5d3, - 0xd5d4, 0xd5d5, 0xd5d6, 0xd5d7, 0xd5da, 0xd5dc, 0xd5de, 0xd5df, - 0xd5e0, 0xd5e1, 0xd5e2, 0xd5e3, 0xd5e6, 0xd5e7, 0xd5e9, 0xd5ea, - 0xd5eb, 0xd5ed, 0xd5ee, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd5ef, 0xd5f0, 0xd5f1, 0xd5f2, 0xd5f3, 0xd5f6, 0xd5f8, - 0xd5fa, 0xd5fb, 0xd5fc, 0xd5fd, 0xd5fe, 0xd5ff, 0xd602, 0xd603, - 0xd605, 0xd606, 0xd607, 0xd609, 0xd60a, 0xd60b, 0xd60c, 0xd60d, - 0xd60e, 0xd60f, 0xd612, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd616, 0xd617, 0xd618, 0xd619, 0xd61a, 0xd61b, 0xd61d, - 0xd61e, 0xd61f, 0xd621, 0xd622, 0xd623, 0xd625, 0xd626, 0xd627, - 0xd628, 0xd629, 0xd62a, 0xd62b, 0xd62c, 0xd62e, 0xd62f, 0xd630, - 0xd631, 0xd632, 0xd633, 0xd634, 0xd635, 0xd636, 0xd637, 0xd63a, - 0xd63b, 0xc9d5, 0xc9d6, 0xc9d9, 0xc9da, 0xc9dc, 0xc9dd, 0xc9e0, - 0xc9e2, 0xc9e4, 0xc9e7, 0xc9ec, 0xc9ed, 0xc9ef, 0xc9f0, 0xc9f1, - 0xc9f8, 0xc9f9, 0xc9fc, 0xca00, 0xca08, 0xca09, 0xca0b, 0xca0c, - 0xca0d, 0xca14, 0xca18, 0xca29, 0xca4c, 0xca4d, 0xca50, 0xca54, - 0xca5c, 0xca5d, 0xca5f, 0xca60, 0xca61, 0xca68, 0xca7d, 0xca84, - 0xca98, 0xcabc, 0xcabd, 0xcac0, 0xcac4, 0xcacc, 0xcacd, 0xcacf, - 0xcad1, 0xcad3, 0xcad8, 0xcad9, 0xcae0, 0xcaec, 0xcaf4, 0xcb08, - 0xcb10, 0xcb14, 0xcb18, 0xcb20, 0xcb21, 0xcb41, 0xcb48, 0xcb49, - 0xcb4c, 0xcb50, 0xcb58, 0xcb59, 0xcb5d, 0xcb64, 0xcb78, 0xcb79, - 0xcb9c, 0xcbb8, 0xcbd4, 0xcbe4, 0xcbe7, 0xcbe9, 0xcc0c, 0xcc0d, - 0xcc10, 0xcc14, 0xcc1c, 0xcc1d, 0xcc21, 0xcc22, 0xcc27, 0xcc28, - 0xcc29, 0xcc2c, 0xcc2e, 0xcc30, 0xcc38, 0xcc39, 0xcc3b, 0x003f, - /* lead byte c3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd63d, 0xd63e, 0xd63f, 0xd641, 0xd642, 0xd643, 0xd644, - 0xd646, 0xd647, 0xd64a, 0xd64c, 0xd64e, 0xd64f, 0xd650, 0xd652, - 0xd653, 0xd656, 0xd657, 0xd659, 0xd65a, 0xd65b, 0xd65d, 0xd65e, - 0xd65f, 0xd660, 0xd661, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd662, 0xd663, 0xd664, 0xd665, 0xd666, 0xd668, 0xd66a, - 0xd66b, 0xd66c, 0xd66d, 0xd66e, 0xd66f, 0xd672, 0xd673, 0xd675, - 0xd676, 0xd677, 0xd678, 0xd679, 0xd67a, 0xd67b, 0xd67c, 0xd67d, - 0xd67e, 0xd67f, 0xd680, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd681, 0xd682, 0xd684, 0xd686, 0xd687, 0xd688, 0xd689, - 0xd68a, 0xd68b, 0xd68e, 0xd68f, 0xd691, 0xd692, 0xd693, 0xd695, - 0xd696, 0xd697, 0xd698, 0xd699, 0xd69a, 0xd69b, 0xd69c, 0xd69e, - 0xd6a0, 0xd6a2, 0xd6a3, 0xd6a4, 0xd6a5, 0xd6a6, 0xd6a7, 0xd6a9, - 0xd6aa, 0xcc3c, 0xcc3d, 0xcc3e, 0xcc44, 0xcc45, 0xcc48, 0xcc4c, - 0xcc54, 0xcc55, 0xcc57, 0xcc58, 0xcc59, 0xcc60, 0xcc64, 0xcc66, - 0xcc68, 0xcc70, 0xcc75, 0xcc98, 0xcc99, 0xcc9c, 0xcca0, 0xcca8, - 0xcca9, 0xccab, 0xccac, 0xccad, 0xccb4, 0xccb5, 0xccb8, 0xccbc, - 0xccc4, 0xccc5, 0xccc7, 0xccc9, 0xccd0, 0xccd4, 0xcce4, 0xccec, - 0xccf0, 0xcd01, 0xcd08, 0xcd09, 0xcd0c, 0xcd10, 0xcd18, 0xcd19, - 0xcd1b, 0xcd1d, 0xcd24, 0xcd28, 0xcd2c, 0xcd39, 0xcd5c, 0xcd60, - 0xcd64, 0xcd6c, 0xcd6d, 0xcd6f, 0xcd71, 0xcd78, 0xcd88, 0xcd94, - 0xcd95, 0xcd98, 0xcd9c, 0xcda4, 0xcda5, 0xcda7, 0xcda9, 0xcdb0, - 0xcdc4, 0xcdcc, 0xcdd0, 0xcde8, 0xcdec, 0xcdf0, 0xcdf8, 0xcdf9, - 0xcdfb, 0xcdfd, 0xce04, 0xce08, 0xce0c, 0xce14, 0xce19, 0xce20, - 0xce21, 0xce24, 0xce28, 0xce30, 0xce31, 0xce33, 0xce35, 0x003f, - /* lead byte c4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd6ab, 0xd6ad, 0xd6ae, 0xd6af, 0xd6b1, 0xd6b2, 0xd6b3, - 0xd6b4, 0xd6b5, 0xd6b6, 0xd6b7, 0xd6b8, 0xd6ba, 0xd6bc, 0xd6bd, - 0xd6be, 0xd6bf, 0xd6c0, 0xd6c1, 0xd6c2, 0xd6c3, 0xd6c6, 0xd6c7, - 0xd6c9, 0xd6ca, 0xd6cb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd6cd, 0xd6ce, 0xd6cf, 0xd6d0, 0xd6d2, 0xd6d3, 0xd6d5, - 0xd6d6, 0xd6d8, 0xd6da, 0xd6db, 0xd6dc, 0xd6dd, 0xd6de, 0xd6df, - 0xd6e1, 0xd6e2, 0xd6e3, 0xd6e5, 0xd6e6, 0xd6e7, 0xd6e9, 0xd6ea, - 0xd6eb, 0xd6ec, 0xd6ed, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd6ee, 0xd6ef, 0xd6f1, 0xd6f2, 0xd6f3, 0xd6f4, 0xd6f6, - 0xd6f7, 0xd6f8, 0xd6f9, 0xd6fa, 0xd6fb, 0xd6fe, 0xd6ff, 0xd701, - 0xd702, 0xd703, 0xd705, 0xd706, 0xd707, 0xd708, 0xd709, 0xd70a, - 0xd70b, 0xd70c, 0xd70d, 0xd70e, 0xd70f, 0xd710, 0xd712, 0xd713, - 0xd714, 0xce58, 0xce59, 0xce5c, 0xce5f, 0xce60, 0xce61, 0xce68, - 0xce69, 0xce6b, 0xce6d, 0xce74, 0xce75, 0xce78, 0xce7c, 0xce84, - 0xce85, 0xce87, 0xce89, 0xce90, 0xce91, 0xce94, 0xce98, 0xcea0, - 0xcea1, 0xcea3, 0xcea4, 0xcea5, 0xceac, 0xcead, 0xcec1, 0xcee4, - 0xcee5, 0xcee8, 0xceeb, 0xceec, 0xcef4, 0xcef5, 0xcef7, 0xcef8, - 0xcef9, 0xcf00, 0xcf01, 0xcf04, 0xcf08, 0xcf10, 0xcf11, 0xcf13, - 0xcf15, 0xcf1c, 0xcf20, 0xcf24, 0xcf2c, 0xcf2d, 0xcf2f, 0xcf30, - 0xcf31, 0xcf38, 0xcf54, 0xcf55, 0xcf58, 0xcf5c, 0xcf64, 0xcf65, - 0xcf67, 0xcf69, 0xcf70, 0xcf71, 0xcf74, 0xcf78, 0xcf80, 0xcf85, - 0xcf8c, 0xcfa1, 0xcfa8, 0xcfb0, 0xcfc4, 0xcfe0, 0xcfe1, 0xcfe4, - 0xcfe8, 0xcff0, 0xcff1, 0xcff3, 0xcff5, 0xcffc, 0xd000, 0xd004, - 0xd011, 0xd018, 0xd02d, 0xd034, 0xd035, 0xd038, 0xd03c, 0x003f, - /* lead byte c5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd715, 0xd716, 0xd717, 0xd71a, 0xd71b, 0xd71d, 0xd71e, - 0xd71f, 0xd721, 0xd722, 0xd723, 0xd724, 0xd725, 0xd726, 0xd727, - 0xd72a, 0xd72c, 0xd72e, 0xd72f, 0xd730, 0xd731, 0xd732, 0xd733, - 0xd736, 0xd737, 0xd739, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd73a, 0xd73b, 0xd73d, 0xd73e, 0xd73f, 0xd740, 0xd741, - 0xd742, 0xd743, 0xd745, 0xd746, 0xd748, 0xd74a, 0xd74b, 0xd74c, - 0xd74d, 0xd74e, 0xd74f, 0xd752, 0xd753, 0xd755, 0xd75a, 0xd75b, - 0xd75c, 0xd75d, 0xd75e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd75f, 0xd762, 0xd764, 0xd766, 0xd767, 0xd768, 0xd76a, - 0xd76b, 0xd76d, 0xd76e, 0xd76f, 0xd771, 0xd772, 0xd773, 0xd775, - 0xd776, 0xd777, 0xd778, 0xd779, 0xd77a, 0xd77b, 0xd77e, 0xd77f, - 0xd780, 0xd782, 0xd783, 0xd784, 0xd785, 0xd786, 0xd787, 0xd78a, - 0xd78b, 0xd044, 0xd045, 0xd047, 0xd049, 0xd050, 0xd054, 0xd058, - 0xd060, 0xd06c, 0xd06d, 0xd070, 0xd074, 0xd07c, 0xd07d, 0xd081, - 0xd0a4, 0xd0a5, 0xd0a8, 0xd0ac, 0xd0b4, 0xd0b5, 0xd0b7, 0xd0b9, - 0xd0c0, 0xd0c1, 0xd0c4, 0xd0c8, 0xd0c9, 0xd0d0, 0xd0d1, 0xd0d3, - 0xd0d4, 0xd0d5, 0xd0dc, 0xd0dd, 0xd0e0, 0xd0e4, 0xd0ec, 0xd0ed, - 0xd0ef, 0xd0f0, 0xd0f1, 0xd0f8, 0xd10d, 0xd130, 0xd131, 0xd134, - 0xd138, 0xd13a, 0xd140, 0xd141, 0xd143, 0xd144, 0xd145, 0xd14c, - 0xd14d, 0xd150, 0xd154, 0xd15c, 0xd15d, 0xd15f, 0xd161, 0xd168, - 0xd16c, 0xd17c, 0xd184, 0xd188, 0xd1a0, 0xd1a1, 0xd1a4, 0xd1a8, - 0xd1b0, 0xd1b1, 0xd1b3, 0xd1b5, 0xd1ba, 0xd1bc, 0xd1c0, 0xd1d8, - 0xd1f4, 0xd1f8, 0xd207, 0xd209, 0xd210, 0xd22c, 0xd22d, 0xd230, - 0xd234, 0xd23c, 0xd23d, 0xd23f, 0xd241, 0xd248, 0xd25c, 0x003f, - /* lead byte c6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd78d, 0xd78e, 0xd78f, 0xd791, 0xd792, 0xd793, 0xd794, - 0xd795, 0xd796, 0xd797, 0xd79a, 0xd79c, 0xd79e, 0xd79f, 0xd7a0, - 0xd7a1, 0xd7a2, 0xd7a3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd264, 0xd280, 0xd281, 0xd284, 0xd288, 0xd290, 0xd291, - 0xd295, 0xd29c, 0xd2a0, 0xd2a4, 0xd2ac, 0xd2b1, 0xd2b8, 0xd2b9, - 0xd2bc, 0xd2bf, 0xd2c0, 0xd2c2, 0xd2c8, 0xd2c9, 0xd2cb, 0xd2d4, - 0xd2d8, 0xd2dc, 0xd2e4, 0xd2e5, 0xd2f0, 0xd2f1, 0xd2f4, 0xd2f8, - 0xd300, 0xd301, 0xd303, 0xd305, 0xd30c, 0xd30d, 0xd30e, 0xd310, - 0xd314, 0xd316, 0xd31c, 0xd31d, 0xd31f, 0xd320, 0xd321, 0xd325, - 0xd328, 0xd329, 0xd32c, 0xd330, 0xd338, 0xd339, 0xd33b, 0xd33c, - 0xd33d, 0xd344, 0xd345, 0xd37c, 0xd37d, 0xd380, 0xd384, 0xd38c, - 0xd38d, 0xd38f, 0xd390, 0xd391, 0xd398, 0xd399, 0xd39c, 0xd3a0, - 0xd3a8, 0xd3a9, 0xd3ab, 0xd3ad, 0xd3b4, 0xd3b8, 0xd3bc, 0xd3c4, - 0xd3c5, 0xd3c8, 0xd3c9, 0xd3d0, 0xd3d8, 0xd3e1, 0xd3e3, 0xd3ec, - 0xd3ed, 0xd3f0, 0xd3f4, 0xd3fc, 0xd3fd, 0xd3ff, 0xd401, 0x003f, - /* lead byte c7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd408, 0xd41d, 0xd440, 0xd444, 0xd45c, 0xd460, 0xd464, - 0xd46d, 0xd46f, 0xd478, 0xd479, 0xd47c, 0xd47f, 0xd480, 0xd482, - 0xd488, 0xd489, 0xd48b, 0xd48d, 0xd494, 0xd4a9, 0xd4cc, 0xd4d0, - 0xd4d4, 0xd4dc, 0xd4df, 0xd4e8, 0xd4ec, 0xd4f0, 0xd4f8, 0xd4fb, - 0xd4fd, 0xd504, 0xd508, 0xd50c, 0xd514, 0xd515, 0xd517, 0xd53c, - 0xd53d, 0xd540, 0xd544, 0xd54c, 0xd54d, 0xd54f, 0xd551, 0xd558, - 0xd559, 0xd55c, 0xd560, 0xd565, 0xd568, 0xd569, 0xd56b, 0xd56d, - 0xd574, 0xd575, 0xd578, 0xd57c, 0xd584, 0xd585, 0xd587, 0xd588, - 0xd589, 0xd590, 0xd5a5, 0xd5c8, 0xd5c9, 0xd5cc, 0xd5d0, 0xd5d2, - 0xd5d8, 0xd5d9, 0xd5db, 0xd5dd, 0xd5e4, 0xd5e5, 0xd5e8, 0xd5ec, - 0xd5f4, 0xd5f5, 0xd5f7, 0xd5f9, 0xd600, 0xd601, 0xd604, 0xd608, - 0xd610, 0xd611, 0xd613, 0xd614, 0xd615, 0xd61c, 0xd620, 0x003f, - /* lead byte c8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd624, 0xd62d, 0xd638, 0xd639, 0xd63c, 0xd640, 0xd645, - 0xd648, 0xd649, 0xd64b, 0xd64d, 0xd651, 0xd654, 0xd655, 0xd658, - 0xd65c, 0xd667, 0xd669, 0xd670, 0xd671, 0xd674, 0xd683, 0xd685, - 0xd68c, 0xd68d, 0xd690, 0xd694, 0xd69d, 0xd69f, 0xd6a1, 0xd6a8, - 0xd6ac, 0xd6b0, 0xd6b9, 0xd6bb, 0xd6c4, 0xd6c5, 0xd6c8, 0xd6cc, - 0xd6d1, 0xd6d4, 0xd6d7, 0xd6d9, 0xd6e0, 0xd6e4, 0xd6e8, 0xd6f0, - 0xd6f5, 0xd6fc, 0xd6fd, 0xd700, 0xd704, 0xd711, 0xd718, 0xd719, - 0xd71c, 0xd720, 0xd728, 0xd729, 0xd72b, 0xd72d, 0xd734, 0xd735, - 0xd738, 0xd73c, 0xd744, 0xd747, 0xd749, 0xd750, 0xd751, 0xd754, - 0xd756, 0xd757, 0xd758, 0xd759, 0xd760, 0xd761, 0xd763, 0xd765, - 0xd769, 0xd76c, 0xd770, 0xd774, 0xd77c, 0xd77d, 0xd781, 0xd788, - 0xd789, 0xd78c, 0xd790, 0xd798, 0xd799, 0xd79b, 0xd79d, 0x003f, - /* lead byte c9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe000, 0xe001, 0xe002, 0xe003, 0xe004, 0xe005, 0xe006, - 0xe007, 0xe008, 0xe009, 0xe00a, 0xe00b, 0xe00c, 0xe00d, 0xe00e, - 0xe00f, 0xe010, 0xe011, 0xe012, 0xe013, 0xe014, 0xe015, 0xe016, - 0xe017, 0xe018, 0xe019, 0xe01a, 0xe01b, 0xe01c, 0xe01d, 0xe01e, - 0xe01f, 0xe020, 0xe021, 0xe022, 0xe023, 0xe024, 0xe025, 0xe026, - 0xe027, 0xe028, 0xe029, 0xe02a, 0xe02b, 0xe02c, 0xe02d, 0xe02e, - 0xe02f, 0xe030, 0xe031, 0xe032, 0xe033, 0xe034, 0xe035, 0xe036, - 0xe037, 0xe038, 0xe039, 0xe03a, 0xe03b, 0xe03c, 0xe03d, 0xe03e, - 0xe03f, 0xe040, 0xe041, 0xe042, 0xe043, 0xe044, 0xe045, 0xe046, - 0xe047, 0xe048, 0xe049, 0xe04a, 0xe04b, 0xe04c, 0xe04d, 0xe04e, - 0xe04f, 0xe050, 0xe051, 0xe052, 0xe053, 0xe054, 0xe055, 0xe056, - 0xe057, 0xe058, 0xe059, 0xe05a, 0xe05b, 0xe05c, 0xe05d, 0x003f, - /* lead byte ca */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x4f3d, 0x4f73, 0x5047, 0x50f9, 0x52a0, 0x53ef, 0x5475, - 0x54e5, 0x5609, 0x5ac1, 0x5bb6, 0x6687, 0x67b6, 0x67b7, 0x67ef, - 0x6b4c, 0x73c2, 0x75c2, 0x7a3c, 0x82db, 0x8304, 0x8857, 0x8888, - 0x8a36, 0x8cc8, 0x8dcf, 0x8efb, 0x8fe6, 0x99d5, 0x523b, 0x5374, - 0x5404, 0x606a, 0x6164, 0x6bbc, 0x73cf, 0x811a, 0x89ba, 0x89d2, - 0x95a3, 0x4f83, 0x520a, 0x58be, 0x5978, 0x59e6, 0x5e72, 0x5e79, - 0x61c7, 0x63c0, 0x6746, 0x67ec, 0x687f, 0x6f97, 0x764e, 0x770b, - 0x78f5, 0x7a08, 0x7aff, 0x7c21, 0x809d, 0x826e, 0x8271, 0x8aeb, - 0x9593, 0x4e6b, 0x559d, 0x66f7, 0x6e34, 0x78a3, 0x7aed, 0x845b, - 0x8910, 0x874e, 0x97a8, 0x52d8, 0x574e, 0x582a, 0x5d4c, 0x611f, - 0x61be, 0x6221, 0x6562, 0x67d1, 0x6a44, 0x6e1b, 0x7518, 0x75b3, - 0x76e3, 0x77b0, 0x7d3a, 0x90af, 0x9451, 0x9452, 0x9f95, 0x003f, - /* lead byte cb */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5323, 0x5cac, 0x7532, 0x80db, 0x9240, 0x9598, 0x525b, - 0x5808, 0x59dc, 0x5ca1, 0x5d17, 0x5eb7, 0x5f3a, 0x5f4a, 0x6177, - 0x6c5f, 0x757a, 0x7586, 0x7ce0, 0x7d73, 0x7db1, 0x7f8c, 0x8154, - 0x8221, 0x8591, 0x8941, 0x8b1b, 0x92fc, 0x964d, 0x9c47, 0x4ecb, - 0x4ef7, 0x500b, 0x51f1, 0x584f, 0x6137, 0x613e, 0x6168, 0x6539, - 0x69ea, 0x6f11, 0x75a5, 0x7686, 0x76d6, 0x7b87, 0x82a5, 0x84cb, - 0xf900, 0x93a7, 0x958b, 0x5580, 0x5ba2, 0x5751, 0xf901, 0x7cb3, - 0x7fb9, 0x91b5, 0x5028, 0x53bb, 0x5c45, 0x5de8, 0x62d2, 0x636e, - 0x64da, 0x64e7, 0x6e20, 0x70ac, 0x795b, 0x8ddd, 0x8e1e, 0xf902, - 0x907d, 0x9245, 0x92f8, 0x4e7e, 0x4ef6, 0x5065, 0x5dfe, 0x5efa, - 0x6106, 0x6957, 0x8171, 0x8654, 0x8e47, 0x9375, 0x9a2b, 0x4e5e, - 0x5091, 0x6770, 0x6840, 0x5109, 0x528d, 0x5292, 0x6aa2, 0x003f, - /* lead byte cc */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x77bc, 0x9210, 0x9ed4, 0x52ab, 0x602f, 0x8ff2, 0x5048, - 0x61a9, 0x63ed, 0x64ca, 0x683c, 0x6a84, 0x6fc0, 0x8188, 0x89a1, - 0x9694, 0x5805, 0x727d, 0x72ac, 0x7504, 0x7d79, 0x7e6d, 0x80a9, - 0x898b, 0x8b74, 0x9063, 0x9d51, 0x6289, 0x6c7a, 0x6f54, 0x7d50, - 0x7f3a, 0x8a23, 0x517c, 0x614a, 0x7b9d, 0x8b19, 0x9257, 0x938c, - 0x4eac, 0x4fd3, 0x501e, 0x50be, 0x5106, 0x52c1, 0x52cd, 0x537f, - 0x5770, 0x5883, 0x5e9a, 0x5f91, 0x6176, 0x61ac, 0x64ce, 0x656c, - 0x666f, 0x66bb, 0x66f4, 0x6897, 0x6d87, 0x7085, 0x70f1, 0x749f, - 0x74a5, 0x74ca, 0x75d9, 0x786c, 0x78ec, 0x7adf, 0x7af6, 0x7d45, - 0x7d93, 0x8015, 0x803f, 0x811b, 0x8396, 0x8b66, 0x8f15, 0x9015, - 0x93e1, 0x9803, 0x9838, 0x9a5a, 0x9be8, 0x4fc2, 0x5553, 0x583a, - 0x5951, 0x5b63, 0x5c46, 0x60b8, 0x6212, 0x6842, 0x68b0, 0x003f, - /* lead byte cd */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x68e8, 0x6eaa, 0x754c, 0x7678, 0x78ce, 0x7a3d, 0x7cfb, - 0x7e6b, 0x7e7c, 0x8a08, 0x8aa1, 0x8c3f, 0x968e, 0x9dc4, 0x53e4, - 0x53e9, 0x544a, 0x5471, 0x56fa, 0x59d1, 0x5b64, 0x5c3b, 0x5eab, - 0x62f7, 0x6537, 0x6545, 0x6572, 0x66a0, 0x67af, 0x69c1, 0x6cbd, - 0x75fc, 0x7690, 0x777e, 0x7a3f, 0x7f94, 0x8003, 0x80a1, 0x818f, - 0x82e6, 0x82fd, 0x83f0, 0x85c1, 0x8831, 0x88b4, 0x8aa5, 0xf903, - 0x8f9c, 0x932e, 0x96c7, 0x9867, 0x9ad8, 0x9f13, 0x54ed, 0x659b, - 0x66f2, 0x688f, 0x7a40, 0x8c37, 0x9d60, 0x56f0, 0x5764, 0x5d11, - 0x6606, 0x68b1, 0x68cd, 0x6efe, 0x7428, 0x889e, 0x9be4, 0x6c68, - 0xf904, 0x9aa8, 0x4f9b, 0x516c, 0x5171, 0x529f, 0x5b54, 0x5de5, - 0x6050, 0x606d, 0x62f1, 0x63a7, 0x653b, 0x73d9, 0x7a7a, 0x86a3, - 0x8ca2, 0x978f, 0x4e32, 0x5be1, 0x6208, 0x679c, 0x74dc, 0x003f, - /* lead byte ce */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x79d1, 0x83d3, 0x8a87, 0x8ab2, 0x8de8, 0x904e, 0x934b, - 0x9846, 0x5ed3, 0x69e8, 0x85ff, 0x90ed, 0xf905, 0x51a0, 0x5b98, - 0x5bec, 0x6163, 0x68fa, 0x6b3e, 0x704c, 0x742f, 0x74d8, 0x7ba1, - 0x7f50, 0x83c5, 0x89c0, 0x8cab, 0x95dc, 0x9928, 0x522e, 0x605d, - 0x62ec, 0x9002, 0x4f8a, 0x5149, 0x5321, 0x58d9, 0x5ee3, 0x66e0, - 0x6d38, 0x709a, 0x72c2, 0x73d6, 0x7b50, 0x80f1, 0x945b, 0x5366, - 0x639b, 0x7f6b, 0x4e56, 0x5080, 0x584a, 0x58de, 0x602a, 0x6127, - 0x62d0, 0x69d0, 0x9b41, 0x5b8f, 0x7d18, 0x80b1, 0x8f5f, 0x4ea4, - 0x50d1, 0x54ac, 0x55ac, 0x5b0c, 0x5da0, 0x5de7, 0x652a, 0x654e, - 0x6821, 0x6a4b, 0x72e1, 0x768e, 0x77ef, 0x7d5e, 0x7ff9, 0x81a0, - 0x854e, 0x86df, 0x8f03, 0x8f4e, 0x90ca, 0x9903, 0x9a55, 0x9bab, - 0x4e18, 0x4e45, 0x4e5d, 0x4ec7, 0x4ff1, 0x5177, 0x52fe, 0x003f, - /* lead byte cf */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5340, 0x53e3, 0x53e5, 0x548e, 0x5614, 0x5775, 0x57a2, - 0x5bc7, 0x5d87, 0x5ed0, 0x61fc, 0x62d8, 0x6551, 0x67b8, 0x67e9, - 0x69cb, 0x6b50, 0x6bc6, 0x6bec, 0x6c42, 0x6e9d, 0x7078, 0x72d7, - 0x7396, 0x7403, 0x77bf, 0x77e9, 0x7a76, 0x7d7f, 0x8009, 0x81fc, - 0x8205, 0x820a, 0x82df, 0x8862, 0x8b33, 0x8cfc, 0x8ec0, 0x9011, - 0x90b1, 0x9264, 0x92b6, 0x99d2, 0x9a45, 0x9ce9, 0x9dd7, 0x9f9c, - 0x570b, 0x5c40, 0x83ca, 0x97a0, 0x97ab, 0x9eb4, 0x541b, 0x7a98, - 0x7fa4, 0x88d9, 0x8ecd, 0x90e1, 0x5800, 0x5c48, 0x6398, 0x7a9f, - 0x5bae, 0x5f13, 0x7a79, 0x7aae, 0x828e, 0x8eac, 0x5026, 0x5238, - 0x52f8, 0x5377, 0x5708, 0x62f3, 0x6372, 0x6b0a, 0x6dc3, 0x7737, - 0x53a5, 0x7357, 0x8568, 0x8e76, 0x95d5, 0x673a, 0x6ac3, 0x6f70, - 0x8a6d, 0x8ecc, 0x994b, 0xf906, 0x6677, 0x6b78, 0x8cb4, 0x003f, - /* lead byte d0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9b3c, 0xf907, 0x53eb, 0x572d, 0x594e, 0x63c6, 0x69fb, - 0x73ea, 0x7845, 0x7aba, 0x7ac5, 0x7cfe, 0x8475, 0x898f, 0x8d73, - 0x9035, 0x95a8, 0x52fb, 0x5747, 0x7547, 0x7b60, 0x83cc, 0x921e, - 0xf908, 0x6a58, 0x514b, 0x524b, 0x5287, 0x621f, 0x68d8, 0x6975, - 0x9699, 0x50c5, 0x52a4, 0x52e4, 0x61c3, 0x65a4, 0x6839, 0x69ff, - 0x747e, 0x7b4b, 0x82b9, 0x83eb, 0x89b2, 0x8b39, 0x8fd1, 0x9949, - 0xf909, 0x4eca, 0x5997, 0x64d2, 0x6611, 0x6a8e, 0x7434, 0x7981, - 0x79bd, 0x82a9, 0x887e, 0x887f, 0x895f, 0xf90a, 0x9326, 0x4f0b, - 0x53ca, 0x6025, 0x6271, 0x6c72, 0x7d1a, 0x7d66, 0x4e98, 0x5162, - 0x77dc, 0x80af, 0x4f01, 0x4f0e, 0x5176, 0x5180, 0x55dc, 0x5668, - 0x573b, 0x57fa, 0x57fc, 0x5914, 0x5947, 0x5993, 0x5bc4, 0x5c90, - 0x5d0e, 0x5df1, 0x5e7e, 0x5fcc, 0x6280, 0x65d7, 0x65e3, 0x003f, - /* lead byte d1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x671e, 0x671f, 0x675e, 0x68cb, 0x68c4, 0x6a5f, 0x6b3a, - 0x6c23, 0x6c7d, 0x6c82, 0x6dc7, 0x7398, 0x7426, 0x742a, 0x7482, - 0x74a3, 0x7578, 0x757f, 0x7881, 0x78ef, 0x7941, 0x7947, 0x7948, - 0x797a, 0x7b95, 0x7d00, 0x7dba, 0x7f88, 0x8006, 0x802d, 0x808c, - 0x8a18, 0x8b4f, 0x8c48, 0x8d77, 0x9321, 0x9324, 0x98e2, 0x9951, - 0x9a0e, 0x9a0f, 0x9a65, 0x9e92, 0x7dca, 0x4f76, 0x5409, 0x62ee, - 0x6854, 0x91d1, 0x55ab, 0x513a, 0xf90b, 0xf90c, 0x5a1c, 0x61e6, - 0xf90d, 0x62cf, 0x62ff, 0xf90e, 0xf90f, 0xf910, 0xf911, 0xf912, - 0xf913, 0x90a3, 0xf914, 0xf915, 0xf916, 0xf917, 0xf918, 0x8afe, - 0xf919, 0xf91a, 0xf91b, 0xf91c, 0x6696, 0xf91d, 0x7156, 0xf91e, - 0xf91f, 0x96e3, 0xf920, 0x634f, 0x637a, 0x5357, 0xf921, 0x678f, - 0x6960, 0x6e73, 0xf922, 0x7537, 0xf923, 0xf924, 0xf925, 0x003f, - /* lead byte d2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7d0d, 0xf926, 0xf927, 0x8872, 0x56ca, 0x5a18, 0xf928, - 0xf929, 0xf92a, 0xf92b, 0xf92c, 0x4e43, 0xf92d, 0x5167, 0x5948, - 0x67f0, 0x8010, 0xf92e, 0x5973, 0x5e74, 0x649a, 0x79ca, 0x5ff5, - 0x606c, 0x62c8, 0x637b, 0x5be7, 0x5bd7, 0x52aa, 0xf92f, 0x5974, - 0x5f29, 0x6012, 0xf930, 0xf931, 0xf932, 0x7459, 0xf933, 0xf934, - 0xf935, 0xf936, 0xf937, 0xf938, 0x99d1, 0xf939, 0xf93a, 0xf93b, - 0xf93c, 0xf93d, 0xf93e, 0xf93f, 0xf940, 0xf941, 0xf942, 0xf943, - 0x6fc3, 0xf944, 0xf945, 0x81bf, 0x8fb2, 0x60f1, 0xf946, 0xf947, - 0x8166, 0xf948, 0xf949, 0x5c3f, 0xf94a, 0xf94b, 0xf94c, 0xf94d, - 0xf94e, 0xf94f, 0xf950, 0xf951, 0x5ae9, 0x8a25, 0x677b, 0x7d10, - 0xf952, 0xf953, 0xf954, 0xf955, 0xf956, 0xf957, 0x80fd, 0xf958, - 0xf959, 0x5c3c, 0x6ce5, 0x533f, 0x6eba, 0x591a, 0x8336, 0x003f, - /* lead byte d3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x4e39, 0x4eb6, 0x4f46, 0x55ae, 0x5718, 0x58c7, 0x5f56, - 0x65b7, 0x65e6, 0x6a80, 0x6bb5, 0x6e4d, 0x77ed, 0x7aef, 0x7c1e, - 0x7dde, 0x86cb, 0x8892, 0x9132, 0x935b, 0x64bb, 0x6fbe, 0x737a, - 0x75b8, 0x9054, 0x5556, 0x574d, 0x61ba, 0x64d4, 0x66c7, 0x6de1, - 0x6e5b, 0x6f6d, 0x6fb9, 0x75f0, 0x8043, 0x81bd, 0x8541, 0x8983, - 0x8ac7, 0x8b5a, 0x931f, 0x6c93, 0x7553, 0x7b54, 0x8e0f, 0x905d, - 0x5510, 0x5802, 0x5858, 0x5e62, 0x6207, 0x649e, 0x68e0, 0x7576, - 0x7cd6, 0x87b3, 0x9ee8, 0x4ee3, 0x5788, 0x576e, 0x5927, 0x5c0d, - 0x5cb1, 0x5e36, 0x5f85, 0x6234, 0x64e1, 0x73b3, 0x81fa, 0x888b, - 0x8cb8, 0x968a, 0x9edb, 0x5b85, 0x5fb7, 0x60b3, 0x5012, 0x5200, - 0x5230, 0x5716, 0x5835, 0x5857, 0x5c0e, 0x5c60, 0x5cf6, 0x5d8b, - 0x5ea6, 0x5f92, 0x60bc, 0x6311, 0x6389, 0x6417, 0x6843, 0x003f, - /* lead byte d4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x68f9, 0x6ac2, 0x6dd8, 0x6e21, 0x6ed4, 0x6fe4, 0x71fe, - 0x76dc, 0x7779, 0x79b1, 0x7a3b, 0x8404, 0x89a9, 0x8ced, 0x8df3, - 0x8e48, 0x9003, 0x9014, 0x9053, 0x90fd, 0x934d, 0x9676, 0x97dc, - 0x6bd2, 0x7006, 0x7258, 0x72a2, 0x7368, 0x7763, 0x79bf, 0x7be4, - 0x7e9b, 0x8b80, 0x58a9, 0x60c7, 0x6566, 0x65fd, 0x66be, 0x6c8c, - 0x711e, 0x71c9, 0x8c5a, 0x9813, 0x4e6d, 0x7a81, 0x4edd, 0x51ac, - 0x51cd, 0x52d5, 0x540c, 0x61a7, 0x6771, 0x6850, 0x68df, 0x6d1e, - 0x6f7c, 0x75bc, 0x77b3, 0x7ae5, 0x80f4, 0x8463, 0x9285, 0x515c, - 0x6597, 0x675c, 0x6793, 0x75d8, 0x7ac7, 0x8373, 0xf95a, 0x8c46, - 0x9017, 0x982d, 0x5c6f, 0x81c0, 0x829a, 0x9041, 0x906f, 0x920d, - 0x5f97, 0x5d9d, 0x6a59, 0x71c8, 0x767b, 0x7b49, 0x85e4, 0x8b04, - 0x9127, 0x9a30, 0x5587, 0x61f6, 0xf95b, 0x7669, 0x7f85, 0x003f, - /* lead byte d5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x863f, 0x87ba, 0x88f8, 0x908f, 0xf95c, 0x6d1b, 0x70d9, - 0x73de, 0x7d61, 0x843d, 0xf95d, 0x916a, 0x99f1, 0xf95e, 0x4e82, - 0x5375, 0x6b04, 0x6b12, 0x703e, 0x721b, 0x862d, 0x9e1e, 0x524c, - 0x8fa3, 0x5d50, 0x64e5, 0x652c, 0x6b16, 0x6feb, 0x7c43, 0x7e9c, - 0x85cd, 0x8964, 0x89bd, 0x62c9, 0x81d8, 0x881f, 0x5eca, 0x6717, - 0x6d6a, 0x72fc, 0x7405, 0x746f, 0x8782, 0x90de, 0x4f86, 0x5d0d, - 0x5fa0, 0x840a, 0x51b7, 0x63a0, 0x7565, 0x4eae, 0x5006, 0x5169, - 0x51c9, 0x6881, 0x6a11, 0x7cae, 0x7cb1, 0x7ce7, 0x826f, 0x8ad2, - 0x8f1b, 0x91cf, 0x4fb6, 0x5137, 0x52f5, 0x5442, 0x5eec, 0x616e, - 0x623e, 0x65c5, 0x6ada, 0x6ffe, 0x792a, 0x85dc, 0x8823, 0x95ad, - 0x9a62, 0x9a6a, 0x9e97, 0x9ece, 0x529b, 0x66c6, 0x6b77, 0x701d, - 0x792b, 0x8f62, 0x9742, 0x6190, 0x6200, 0x6523, 0x6f23, 0x003f, - /* lead byte d6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7149, 0x7489, 0x7df4, 0x806f, 0x84ee, 0x8f26, 0x9023, - 0x934a, 0x51bd, 0x5217, 0x52a3, 0x6d0c, 0x70c8, 0x88c2, 0x5ec9, - 0x6582, 0x6bae, 0x6fc2, 0x7c3e, 0x7375, 0x4ee4, 0x4f36, 0x56f9, - 0xf95f, 0x5cba, 0x5dba, 0x601c, 0x73b2, 0x7b2d, 0x7f9a, 0x7fce, - 0x8046, 0x901e, 0x9234, 0x96f6, 0x9748, 0x9818, 0x9f61, 0x4f8b, - 0x6fa7, 0x79ae, 0x91b4, 0x96b7, 0x52de, 0xf960, 0x6488, 0x64c4, - 0x6ad3, 0x6f5e, 0x7018, 0x7210, 0x76e7, 0x8001, 0x8606, 0x865c, - 0x8def, 0x8f05, 0x9732, 0x9b6f, 0x9dfa, 0x9e75, 0x788c, 0x797f, - 0x7da0, 0x83c9, 0x9304, 0x9e7f, 0x9e93, 0x8ad6, 0x58df, 0x5f04, - 0x6727, 0x7027, 0x74cf, 0x7c60, 0x807e, 0x5121, 0x7028, 0x7262, - 0x78ca, 0x8cc2, 0x8cda, 0x8cf4, 0x96f7, 0x4e86, 0x50da, 0x5bee, - 0x5ed6, 0x6599, 0x71ce, 0x7642, 0x77ad, 0x804a, 0x84fc, 0x003f, - /* lead byte d7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x907c, 0x9b27, 0x9f8d, 0x58d8, 0x5a41, 0x5c62, 0x6a13, - 0x6dda, 0x6f0f, 0x763b, 0x7d2f, 0x7e37, 0x851e, 0x8938, 0x93e4, - 0x964b, 0x5289, 0x65d2, 0x67f3, 0x69b4, 0x6d41, 0x6e9c, 0x700f, - 0x7409, 0x7460, 0x7559, 0x7624, 0x786b, 0x8b2c, 0x985e, 0x516d, - 0x622e, 0x9678, 0x4f96, 0x502b, 0x5d19, 0x6dea, 0x7db8, 0x8f2a, - 0x5f8b, 0x6144, 0x6817, 0xf961, 0x9686, 0x52d2, 0x808b, 0x51dc, - 0x51cc, 0x695e, 0x7a1c, 0x7dbe, 0x83f1, 0x9675, 0x4fda, 0x5229, - 0x5398, 0x540f, 0x550e, 0x5c65, 0x60a7, 0x674e, 0x68a8, 0x6d6c, - 0x7281, 0x72f8, 0x7406, 0x7483, 0xf962, 0x75e2, 0x7c6c, 0x7f79, - 0x7fb8, 0x8389, 0x88cf, 0x88e1, 0x91cc, 0x91d0, 0x96e2, 0x9bc9, - 0x541d, 0x6f7e, 0x71d0, 0x7498, 0x85fa, 0x8eaa, 0x96a3, 0x9c57, - 0x9e9f, 0x6797, 0x6dcb, 0x7433, 0x81e8, 0x9716, 0x782c, 0x003f, - /* lead byte d8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7acb, 0x7b20, 0x7c92, 0x6469, 0x746a, 0x75f2, 0x78bc, - 0x78e8, 0x99ac, 0x9b54, 0x9ebb, 0x5bde, 0x5e55, 0x6f20, 0x819c, - 0x83ab, 0x9088, 0x4e07, 0x534d, 0x5a29, 0x5dd2, 0x5f4e, 0x6162, - 0x633d, 0x6669, 0x66fc, 0x6eff, 0x6f2b, 0x7063, 0x779e, 0x842c, - 0x8513, 0x883b, 0x8f13, 0x9945, 0x9c3b, 0x551c, 0x62b9, 0x672b, - 0x6cab, 0x8309, 0x896a, 0x977a, 0x4ea1, 0x5984, 0x5fd8, 0x5fd9, - 0x671b, 0x7db2, 0x7f54, 0x8292, 0x832b, 0x83bd, 0x8f1e, 0x9099, - 0x57cb, 0x59b9, 0x5a92, 0x5bd0, 0x6627, 0x679a, 0x6885, 0x6bcf, - 0x7164, 0x7f75, 0x8cb7, 0x8ce3, 0x9081, 0x9b45, 0x8108, 0x8c8a, - 0x964c, 0x9a40, 0x9ea5, 0x5b5f, 0x6c13, 0x731b, 0x76f2, 0x76df, - 0x840c, 0x51aa, 0x8993, 0x514d, 0x5195, 0x52c9, 0x68c9, 0x6c94, - 0x7704, 0x7720, 0x7dbf, 0x7dec, 0x9762, 0x9eb5, 0x6ec5, 0x003f, - /* lead byte d9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8511, 0x51a5, 0x540d, 0x547d, 0x660e, 0x669d, 0x6927, - 0x6e9f, 0x76bf, 0x7791, 0x8317, 0x84c2, 0x879f, 0x9169, 0x9298, - 0x9cf4, 0x8882, 0x4fae, 0x5192, 0x52df, 0x59c6, 0x5e3d, 0x6155, - 0x6478, 0x6479, 0x66ae, 0x67d0, 0x6a21, 0x6bcd, 0x6bdb, 0x725f, - 0x7261, 0x7441, 0x7738, 0x77db, 0x8017, 0x82bc, 0x8305, 0x8b00, - 0x8b28, 0x8c8c, 0x6728, 0x6c90, 0x7267, 0x76ee, 0x7766, 0x7a46, - 0x9da9, 0x6b7f, 0x6c92, 0x5922, 0x6726, 0x8499, 0x536f, 0x5893, - 0x5999, 0x5edf, 0x63cf, 0x6634, 0x6773, 0x6e3a, 0x732b, 0x7ad7, - 0x82d7, 0x9328, 0x52d9, 0x5deb, 0x61ae, 0x61cb, 0x620a, 0x62c7, - 0x64ab, 0x65e0, 0x6959, 0x6b66, 0x6bcb, 0x7121, 0x73f7, 0x755d, - 0x7e46, 0x821e, 0x8302, 0x856a, 0x8aa3, 0x8cbf, 0x9727, 0x9d61, - 0x58a8, 0x9ed8, 0x5011, 0x520e, 0x543b, 0x554f, 0x6587, 0x003f, - /* lead byte da */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6c76, 0x7d0a, 0x7d0b, 0x805e, 0x868a, 0x9580, 0x96ef, - 0x52ff, 0x6c95, 0x7269, 0x5473, 0x5a9a, 0x5c3e, 0x5d4b, 0x5f4c, - 0x5fae, 0x672a, 0x68b6, 0x6963, 0x6e3c, 0x6e44, 0x7709, 0x7c73, - 0x7f8e, 0x8587, 0x8b0e, 0x8ff7, 0x9761, 0x9ef4, 0x5cb7, 0x60b6, - 0x610d, 0x61ab, 0x654f, 0x65fb, 0x65fc, 0x6c11, 0x6cef, 0x739f, - 0x73c9, 0x7de1, 0x9594, 0x5bc6, 0x871c, 0x8b10, 0x525d, 0x535a, - 0x62cd, 0x640f, 0x64b2, 0x6734, 0x6a38, 0x6cca, 0x73c0, 0x749e, - 0x7b94, 0x7c95, 0x7e1b, 0x818a, 0x8236, 0x8584, 0x8feb, 0x96f9, - 0x99c1, 0x4f34, 0x534a, 0x53cd, 0x53db, 0x62cc, 0x642c, 0x6500, - 0x6591, 0x69c3, 0x6cee, 0x6f58, 0x73ed, 0x7554, 0x7622, 0x76e4, - 0x76fc, 0x78d0, 0x78fb, 0x792c, 0x7d46, 0x822c, 0x87e0, 0x8fd4, - 0x9812, 0x98ef, 0x52c3, 0x62d4, 0x64a5, 0x6e24, 0x6f51, 0x003f, - /* lead byte db */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x767c, 0x8dcb, 0x91b1, 0x9262, 0x9aee, 0x9b43, 0x5023, - 0x508d, 0x574a, 0x59a8, 0x5c28, 0x5e47, 0x5f77, 0x623f, 0x653e, - 0x65b9, 0x65c1, 0x6609, 0x678b, 0x699c, 0x6ec2, 0x78c5, 0x7d21, - 0x80aa, 0x8180, 0x822b, 0x82b3, 0x84a1, 0x868c, 0x8a2a, 0x8b17, - 0x90a6, 0x9632, 0x9f90, 0x500d, 0x4ff3, 0xf963, 0x57f9, 0x5f98, - 0x62dc, 0x6392, 0x676f, 0x6e43, 0x7119, 0x76c3, 0x80cc, 0x80da, - 0x88f4, 0x88f5, 0x8919, 0x8ce0, 0x8f29, 0x914d, 0x966a, 0x4f2f, - 0x4f70, 0x5e1b, 0x67cf, 0x6822, 0x767d, 0x767e, 0x9b44, 0x5e61, - 0x6a0a, 0x7169, 0x71d4, 0x756a, 0xf964, 0x7e41, 0x8543, 0x85e9, - 0x98dc, 0x4f10, 0x7b4f, 0x7f70, 0x95a5, 0x51e1, 0x5e06, 0x68b5, - 0x6c3e, 0x6c4e, 0x6cdb, 0x72af, 0x7bc4, 0x8303, 0x6cd5, 0x743a, - 0x50fb, 0x5288, 0x58c1, 0x64d8, 0x6a97, 0x74a7, 0x7656, 0x003f, - /* lead byte dc */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x78a7, 0x8617, 0x95e2, 0x9739, 0xf965, 0x535e, 0x5f01, - 0x8b8a, 0x8fa8, 0x8faf, 0x908a, 0x5225, 0x77a5, 0x9c49, 0x9f08, - 0x4e19, 0x5002, 0x5175, 0x5c5b, 0x5e77, 0x661e, 0x663a, 0x67c4, - 0x68c5, 0x70b3, 0x7501, 0x75c5, 0x79c9, 0x7add, 0x8f27, 0x9920, - 0x9a08, 0x4fdd, 0x5821, 0x5831, 0x5bf6, 0x666e, 0x6b65, 0x6d11, - 0x6e7a, 0x6f7d, 0x73e4, 0x752b, 0x83e9, 0x88dc, 0x8913, 0x8b5c, - 0x8f14, 0x4f0f, 0x50d5, 0x5310, 0x535c, 0x5b93, 0x5fa9, 0x670d, - 0x798f, 0x8179, 0x832f, 0x8514, 0x8907, 0x8986, 0x8f39, 0x8f3b, - 0x99a5, 0x9c12, 0x672c, 0x4e76, 0x4ff8, 0x5949, 0x5c01, 0x5cef, - 0x5cf0, 0x6367, 0x68d2, 0x70fd, 0x71a2, 0x742b, 0x7e2b, 0x84ec, - 0x8702, 0x9022, 0x92d2, 0x9cf3, 0x4e0d, 0x4ed8, 0x4fef, 0x5085, - 0x5256, 0x526f, 0x5426, 0x5490, 0x57e0, 0x592b, 0x5a66, 0x003f, - /* lead byte dd */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5b5a, 0x5b75, 0x5bcc, 0x5e9c, 0xf966, 0x6276, 0x6577, - 0x65a7, 0x6d6e, 0x6ea5, 0x7236, 0x7b26, 0x7c3f, 0x7f36, 0x8150, - 0x8151, 0x819a, 0x8240, 0x8299, 0x83a9, 0x8a03, 0x8ca0, 0x8ce6, - 0x8cfb, 0x8d74, 0x8dba, 0x90e8, 0x91dc, 0x961c, 0x9644, 0x99d9, - 0x9ce7, 0x5317, 0x5206, 0x5429, 0x5674, 0x58b3, 0x5954, 0x596e, - 0x5fff, 0x61a4, 0x626e, 0x6610, 0x6c7e, 0x711a, 0x76c6, 0x7c89, - 0x7cde, 0x7d1b, 0x82ac, 0x8cc1, 0x96f0, 0xf967, 0x4f5b, 0x5f17, - 0x5f7f, 0x62c2, 0x5d29, 0x670b, 0x68da, 0x787c, 0x7e43, 0x9d6c, - 0x4e15, 0x5099, 0x5315, 0x532a, 0x5351, 0x5983, 0x5a62, 0x5e87, - 0x60b2, 0x618a, 0x6249, 0x6279, 0x6590, 0x6787, 0x69a7, 0x6bd4, - 0x6bd6, 0x6bd7, 0x6bd8, 0x6cb8, 0xf968, 0x7435, 0x75fa, 0x7812, - 0x7891, 0x79d5, 0x79d8, 0x7c83, 0x7dcb, 0x7fe1, 0x80a5, 0x003f, - /* lead byte de */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x813e, 0x81c2, 0x83f2, 0x871a, 0x88e8, 0x8ab9, 0x8b6c, - 0x8cbb, 0x9119, 0x975e, 0x98db, 0x9f3b, 0x56ac, 0x5b2a, 0x5f6c, - 0x658c, 0x6ab3, 0x6baf, 0x6d5c, 0x6ff1, 0x7015, 0x725d, 0x73ad, - 0x8ca7, 0x8cd3, 0x983b, 0x6191, 0x6c37, 0x8058, 0x9a01, 0x4e4d, - 0x4e8b, 0x4e9b, 0x4ed5, 0x4f3a, 0x4f3c, 0x4f7f, 0x4fdf, 0x50ff, - 0x53f2, 0x53f8, 0x5506, 0x55e3, 0x56db, 0x58eb, 0x5962, 0x5a11, - 0x5beb, 0x5bfa, 0x5c04, 0x5df3, 0x5e2b, 0x5f99, 0x601d, 0x6368, - 0x659c, 0x65af, 0x67f6, 0x67fb, 0x68ad, 0x6b7b, 0x6c99, 0x6cd7, - 0x6e23, 0x7009, 0x7345, 0x7802, 0x793e, 0x7940, 0x7960, 0x79c1, - 0x7be9, 0x7d17, 0x7d72, 0x8086, 0x820d, 0x838e, 0x84d1, 0x86c7, - 0x88df, 0x8a50, 0x8a5e, 0x8b1d, 0x8cdc, 0x8d66, 0x8fad, 0x90aa, - 0x98fc, 0x99df, 0x9e9d, 0x524a, 0xf969, 0x6714, 0xf96a, 0x003f, - /* lead byte df */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5098, 0x522a, 0x5c71, 0x6563, 0x6c55, 0x73ca, 0x7523, - 0x759d, 0x7b97, 0x849c, 0x9178, 0x9730, 0x4e77, 0x6492, 0x6bba, - 0x715e, 0x85a9, 0x4e09, 0xf96b, 0x6749, 0x68ee, 0x6e17, 0x829f, - 0x8518, 0x886b, 0x63f7, 0x6f81, 0x9212, 0x98af, 0x4e0a, 0x50b7, - 0x50cf, 0x511f, 0x5546, 0x55aa, 0x5617, 0x5b40, 0x5c19, 0x5ce0, - 0x5e38, 0x5e8a, 0x5ea0, 0x5ec2, 0x60f3, 0x6851, 0x6a61, 0x6e58, - 0x723d, 0x7240, 0x72c0, 0x76f8, 0x7965, 0x7bb1, 0x7fd4, 0x88f3, - 0x89f4, 0x8a73, 0x8c61, 0x8cde, 0x971c, 0x585e, 0x74bd, 0x8cfd, - 0x55c7, 0xf96c, 0x7a61, 0x7d22, 0x8272, 0x7272, 0x751f, 0x7525, - 0xf96d, 0x7b19, 0x5885, 0x58fb, 0x5dbc, 0x5e8f, 0x5eb6, 0x5f90, - 0x6055, 0x6292, 0x637f, 0x654d, 0x6691, 0x66d9, 0x66f8, 0x6816, - 0x68f2, 0x7280, 0x745e, 0x7b6e, 0x7d6e, 0x7dd6, 0x7f72, 0x003f, - /* lead byte e0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x80e5, 0x8212, 0x85af, 0x897f, 0x8a93, 0x901d, 0x92e4, - 0x9ecd, 0x9f20, 0x5915, 0x596d, 0x5e2d, 0x60dc, 0x6614, 0x6673, - 0x6790, 0x6c50, 0x6dc5, 0x6f5f, 0x77f3, 0x78a9, 0x84c6, 0x91cb, - 0x932b, 0x4ed9, 0x50ca, 0x5148, 0x5584, 0x5b0b, 0x5ba3, 0x6247, - 0x657e, 0x65cb, 0x6e32, 0x717d, 0x7401, 0x7444, 0x7487, 0x74bf, - 0x766c, 0x79aa, 0x7dda, 0x7e55, 0x7fa8, 0x817a, 0x81b3, 0x8239, - 0x861a, 0x87ec, 0x8a75, 0x8de3, 0x9078, 0x9291, 0x9425, 0x994d, - 0x9bae, 0x5368, 0x5c51, 0x6954, 0x6cc4, 0x6d29, 0x6e2b, 0x820c, - 0x859b, 0x893b, 0x8a2d, 0x8aaa, 0x96ea, 0x9f67, 0x5261, 0x66b9, - 0x6bb2, 0x7e96, 0x87fe, 0x8d0d, 0x9583, 0x965d, 0x651d, 0x6d89, - 0x71ee, 0xf96e, 0x57ce, 0x59d3, 0x5bac, 0x6027, 0x60fa, 0x6210, - 0x661f, 0x665f, 0x7329, 0x73f9, 0x76db, 0x7701, 0x7b6c, 0x003f, - /* lead byte e1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8056, 0x8072, 0x8165, 0x8aa0, 0x9192, 0x4e16, 0x52e2, - 0x6b72, 0x6d17, 0x7a05, 0x7b39, 0x7d30, 0xf96f, 0x8cb0, 0x53ec, - 0x562f, 0x5851, 0x5bb5, 0x5c0f, 0x5c11, 0x5de2, 0x6240, 0x6383, - 0x6414, 0x662d, 0x68b3, 0x6cbc, 0x6d88, 0x6eaf, 0x701f, 0x70a4, - 0x71d2, 0x7526, 0x758f, 0x758e, 0x7619, 0x7b11, 0x7be0, 0x7c2b, - 0x7d20, 0x7d39, 0x852c, 0x856d, 0x8607, 0x8a34, 0x900d, 0x9061, - 0x90b5, 0x92b7, 0x97f6, 0x9a37, 0x4fd7, 0x5c6c, 0x675f, 0x6d91, - 0x7c9f, 0x7e8c, 0x8b16, 0x8d16, 0x901f, 0x5b6b, 0x5dfd, 0x640d, - 0x84c0, 0x905c, 0x98e1, 0x7387, 0x5b8b, 0x609a, 0x677e, 0x6dde, - 0x8a1f, 0x8aa6, 0x9001, 0x980c, 0x5237, 0xf970, 0x7051, 0x788e, - 0x9396, 0x8870, 0x91d7, 0x4fee, 0x53d7, 0x55fd, 0x56da, 0x5782, - 0x58fd, 0x5ac2, 0x5b88, 0x5cab, 0x5cc0, 0x5e25, 0x6101, 0x003f, - /* lead byte e2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x620d, 0x624b, 0x6388, 0x641c, 0x6536, 0x6578, 0x6a39, - 0x6b8a, 0x6c34, 0x6d19, 0x6f31, 0x71e7, 0x72e9, 0x7378, 0x7407, - 0x74b2, 0x7626, 0x7761, 0x79c0, 0x7a57, 0x7aea, 0x7cb9, 0x7d8f, - 0x7dac, 0x7e61, 0x7f9e, 0x8129, 0x8331, 0x8490, 0x84da, 0x85ea, - 0x8896, 0x8ab0, 0x8b90, 0x8f38, 0x9042, 0x9083, 0x916c, 0x9296, - 0x92b9, 0x968b, 0x96a7, 0x96a8, 0x96d6, 0x9700, 0x9808, 0x9996, - 0x9ad3, 0x9b1a, 0x53d4, 0x587e, 0x5919, 0x5b70, 0x5bbf, 0x6dd1, - 0x6f5a, 0x719f, 0x7421, 0x74b9, 0x8085, 0x83fd, 0x5de1, 0x5f87, - 0x5faa, 0x6042, 0x65ec, 0x6812, 0x696f, 0x6a53, 0x6b89, 0x6d35, - 0x6df3, 0x73e3, 0x76fe, 0x77ac, 0x7b4d, 0x7d14, 0x8123, 0x821c, - 0x8340, 0x84f4, 0x8563, 0x8a62, 0x8ac4, 0x9187, 0x931e, 0x9806, - 0x99b4, 0x620c, 0x8853, 0x8ff0, 0x9265, 0x5d07, 0x5d27, 0x003f, - /* lead byte e3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5d69, 0x745f, 0x819d, 0x8768, 0x6fd5, 0x62fe, 0x7fd2, - 0x8936, 0x8972, 0x4e1e, 0x4e58, 0x50e7, 0x52dd, 0x5347, 0x627f, - 0x6607, 0x7e69, 0x8805, 0x965e, 0x4f8d, 0x5319, 0x5636, 0x59cb, - 0x5aa4, 0x5c38, 0x5c4e, 0x5c4d, 0x5e02, 0x5f11, 0x6043, 0x65bd, - 0x662f, 0x6642, 0x67be, 0x67f4, 0x731c, 0x77e2, 0x793a, 0x7fc5, - 0x8494, 0x84cd, 0x8996, 0x8a66, 0x8a69, 0x8ae1, 0x8c55, 0x8c7a, - 0x57f4, 0x5bd4, 0x5f0f, 0x606f, 0x62ed, 0x690d, 0x6b96, 0x6e5c, - 0x7184, 0x7bd2, 0x8755, 0x8b58, 0x8efe, 0x98df, 0x98fe, 0x4f38, - 0x4f81, 0x4fe1, 0x547b, 0x5a20, 0x5bb8, 0x613c, 0x65b0, 0x6668, - 0x71fc, 0x7533, 0x795e, 0x7d33, 0x814e, 0x81e3, 0x8398, 0x85aa, - 0x85ce, 0x8703, 0x8a0a, 0x8eab, 0x8f9b, 0xf971, 0x8fc5, 0x5931, - 0x5ba4, 0x5be6, 0x6089, 0x5be9, 0x5c0b, 0x5fc3, 0x6c81, 0x003f, - /* lead byte e4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf972, 0x6df1, 0x700b, 0x751a, 0x82af, 0x8af6, 0x4ec0, - 0x5341, 0xf973, 0x96d9, 0x6c0f, 0x4e9e, 0x4fc4, 0x5152, 0x555e, - 0x5a25, 0x5ce8, 0x6211, 0x7259, 0x82bd, 0x83aa, 0x86fe, 0x8859, - 0x8a1d, 0x963f, 0x96c5, 0x9913, 0x9d09, 0x9d5d, 0x580a, 0x5cb3, - 0x5dbd, 0x5e44, 0x60e1, 0x6115, 0x63e1, 0x6a02, 0x6e25, 0x9102, - 0x9354, 0x984e, 0x9c10, 0x9f77, 0x5b89, 0x5cb8, 0x6309, 0x664f, - 0x6848, 0x773c, 0x96c1, 0x978d, 0x9854, 0x9b9f, 0x65a1, 0x8b01, - 0x8ecb, 0x95bc, 0x5535, 0x5ca9, 0x5dd6, 0x5eb5, 0x6697, 0x764c, - 0x83f4, 0x95c7, 0x58d3, 0x62bc, 0x72ce, 0x9d28, 0x4ef0, 0x592e, - 0x600f, 0x663b, 0x6b83, 0x79e7, 0x9d26, 0x5393, 0x54c0, 0x57c3, - 0x5d16, 0x611b, 0x66d6, 0x6daf, 0x788d, 0x827e, 0x9698, 0x9744, - 0x5384, 0x627c, 0x6396, 0x6db2, 0x7e0a, 0x814b, 0x984d, 0x003f, - /* lead byte e5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6afb, 0x7f4c, 0x9daf, 0x9e1a, 0x4e5f, 0x503b, 0x51b6, - 0x591c, 0x60f9, 0x63f6, 0x6930, 0x723a, 0x8036, 0xf974, 0x91ce, - 0x5f31, 0xf975, 0xf976, 0x7d04, 0x82e5, 0x846f, 0x84bb, 0x85e5, - 0x8e8d, 0xf977, 0x4f6f, 0xf978, 0xf979, 0x58e4, 0x5b43, 0x6059, - 0x63da, 0x6518, 0x656d, 0x6698, 0xf97a, 0x694a, 0x6a23, 0x6d0b, - 0x7001, 0x716c, 0x75d2, 0x760d, 0x79b3, 0x7a70, 0xf97b, 0x7f8a, - 0xf97c, 0x8944, 0xf97d, 0x8b93, 0x91c0, 0x967d, 0xf97e, 0x990a, - 0x5704, 0x5fa1, 0x65bc, 0x6f01, 0x7600, 0x79a6, 0x8a9e, 0x99ad, - 0x9b5a, 0x9f6c, 0x5104, 0x61b6, 0x6291, 0x6a8d, 0x81c6, 0x5043, - 0x5830, 0x5f66, 0x7109, 0x8a00, 0x8afa, 0x5b7c, 0x8616, 0x4ffa, - 0x513c, 0x56b4, 0x5944, 0x63a9, 0x6df9, 0x5daa, 0x696d, 0x5186, - 0x4e88, 0x4f59, 0xf97f, 0xf980, 0xf981, 0x5982, 0xf982, 0x003f, - /* lead byte e6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf983, 0x6b5f, 0x6c5d, 0xf984, 0x74b5, 0x7916, 0xf985, - 0x8207, 0x8245, 0x8339, 0x8f3f, 0x8f5d, 0xf986, 0x9918, 0xf987, - 0xf988, 0xf989, 0x4ea6, 0xf98a, 0x57df, 0x5f79, 0x6613, 0xf98b, - 0xf98c, 0x75ab, 0x7e79, 0x8b6f, 0xf98d, 0x9006, 0x9a5b, 0x56a5, - 0x5827, 0x59f8, 0x5a1f, 0x5bb4, 0xf98e, 0x5ef6, 0xf98f, 0xf990, - 0x6350, 0x633b, 0xf991, 0x693d, 0x6c87, 0x6cbf, 0x6d8e, 0x6d93, - 0x6df5, 0x6f14, 0xf992, 0x70df, 0x7136, 0x7159, 0xf993, 0x71c3, - 0x71d5, 0xf994, 0x784f, 0x786f, 0xf995, 0x7b75, 0x7de3, 0xf996, - 0x7e2f, 0xf997, 0x884d, 0x8edf, 0xf998, 0xf999, 0xf99a, 0x925b, - 0xf99b, 0x9cf6, 0xf99c, 0xf99d, 0xf99e, 0x6085, 0x6d85, 0xf99f, - 0x71b1, 0xf9a0, 0xf9a1, 0x95b1, 0x53ad, 0xf9a2, 0xf9a3, 0xf9a4, - 0x67d3, 0xf9a5, 0x708e, 0x7130, 0x7430, 0x8276, 0x82d2, 0x003f, - /* lead byte e7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf9a6, 0x95bb, 0x9ae5, 0x9e7d, 0x66c4, 0xf9a7, 0x71c1, - 0x8449, 0xf9a8, 0xf9a9, 0x584b, 0xf9aa, 0xf9ab, 0x5db8, 0x5f71, - 0xf9ac, 0x6620, 0x668e, 0x6979, 0x69ae, 0x6c38, 0x6cf3, 0x6e36, - 0x6f41, 0x6fda, 0x701b, 0x702f, 0x7150, 0x71df, 0x7370, 0xf9ad, - 0x745b, 0xf9ae, 0x74d4, 0x76c8, 0x7a4e, 0x7e93, 0xf9af, 0xf9b0, - 0x82f1, 0x8a60, 0x8fce, 0xf9b1, 0x9348, 0xf9b2, 0x9719, 0xf9b3, - 0xf9b4, 0x4e42, 0x502a, 0xf9b5, 0x5208, 0x53e1, 0x66f3, 0x6c6d, - 0x6fca, 0x730a, 0x777f, 0x7a62, 0x82ae, 0x85dd, 0x8602, 0xf9b6, - 0x88d4, 0x8a63, 0x8b7d, 0x8c6b, 0xf9b7, 0x92b3, 0xf9b8, 0x9713, - 0x9810, 0x4e94, 0x4f0d, 0x4fc9, 0x50b2, 0x5348, 0x543e, 0x5433, - 0x55da, 0x5862, 0x58ba, 0x5967, 0x5a1b, 0x5be4, 0x609f, 0xf9b9, - 0x61ca, 0x6556, 0x65ff, 0x6664, 0x68a7, 0x6c5a, 0x6fb3, 0x003f, - /* lead byte e8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x70cf, 0x71ac, 0x7352, 0x7b7d, 0x8708, 0x8aa4, 0x9c32, - 0x9f07, 0x5c4b, 0x6c83, 0x7344, 0x7389, 0x923a, 0x6eab, 0x7465, - 0x761f, 0x7a69, 0x7e15, 0x860a, 0x5140, 0x58c5, 0x64c1, 0x74ee, - 0x7515, 0x7670, 0x7fc1, 0x9095, 0x96cd, 0x9954, 0x6e26, 0x74e6, - 0x7aa9, 0x7aaa, 0x81e5, 0x86d9, 0x8778, 0x8a1b, 0x5a49, 0x5b8c, - 0x5b9b, 0x68a1, 0x6900, 0x6d63, 0x73a9, 0x7413, 0x742c, 0x7897, - 0x7de9, 0x7feb, 0x8118, 0x8155, 0x839e, 0x8c4c, 0x962e, 0x9811, - 0x66f0, 0x5f80, 0x65fa, 0x6789, 0x6c6a, 0x738b, 0x502d, 0x5a03, - 0x6b6a, 0x77ee, 0x5916, 0x5d6c, 0x5dcd, 0x7325, 0x754f, 0xf9ba, - 0xf9bb, 0x50e5, 0x51f9, 0x582f, 0x592d, 0x5996, 0x59da, 0x5be5, - 0xf9bc, 0xf9bd, 0x5da2, 0x62d7, 0x6416, 0x6493, 0x64fe, 0xf9be, - 0x66dc, 0xf9bf, 0x6a48, 0xf9c0, 0x71ff, 0x7464, 0xf9c1, 0x003f, - /* lead byte e9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7a88, 0x7aaf, 0x7e47, 0x7e5e, 0x8000, 0x8170, 0xf9c2, - 0x87ef, 0x8981, 0x8b20, 0x9059, 0xf9c3, 0x9080, 0x9952, 0x617e, - 0x6b32, 0x6d74, 0x7e1f, 0x8925, 0x8fb1, 0x4fd1, 0x50ad, 0x5197, - 0x52c7, 0x57c7, 0x5889, 0x5bb9, 0x5eb8, 0x6142, 0x6995, 0x6d8c, - 0x6e67, 0x6eb6, 0x7194, 0x7462, 0x7528, 0x752c, 0x8073, 0x8338, - 0x84c9, 0x8e0a, 0x9394, 0x93de, 0xf9c4, 0x4e8e, 0x4f51, 0x5076, - 0x512a, 0x53c8, 0x53cb, 0x53f3, 0x5b87, 0x5bd3, 0x5c24, 0x611a, - 0x6182, 0x65f4, 0x725b, 0x7397, 0x7440, 0x76c2, 0x7950, 0x7991, - 0x79b9, 0x7d06, 0x7fbd, 0x828b, 0x85d5, 0x865e, 0x8fc2, 0x9047, - 0x90f5, 0x91ea, 0x9685, 0x96e8, 0x96e9, 0x52d6, 0x5f67, 0x65ed, - 0x6631, 0x682f, 0x715c, 0x7a36, 0x90c1, 0x980a, 0x4e91, 0xf9c5, - 0x6a52, 0x6b9e, 0x6f90, 0x7189, 0x8018, 0x82b8, 0x8553, 0x003f, - /* lead byte ea */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x904b, 0x9695, 0x96f2, 0x97fb, 0x851a, 0x9b31, 0x4e90, - 0x718a, 0x96c4, 0x5143, 0x539f, 0x54e1, 0x5713, 0x5712, 0x57a3, - 0x5a9b, 0x5ac4, 0x5bc3, 0x6028, 0x613f, 0x63f4, 0x6c85, 0x6d39, - 0x6e72, 0x6e90, 0x7230, 0x733f, 0x7457, 0x82d1, 0x8881, 0x8f45, - 0x9060, 0xf9c6, 0x9662, 0x9858, 0x9d1b, 0x6708, 0x8d8a, 0x925e, - 0x4f4d, 0x5049, 0x50de, 0x5371, 0x570d, 0x59d4, 0x5a01, 0x5c09, - 0x6170, 0x6690, 0x6e2d, 0x7232, 0x744b, 0x7def, 0x80c3, 0x840e, - 0x8466, 0x853f, 0x875f, 0x885b, 0x8918, 0x8b02, 0x9055, 0x97cb, - 0x9b4f, 0x4e73, 0x4f91, 0x5112, 0x516a, 0xf9c7, 0x552f, 0x55a9, - 0x5b7a, 0x5ba5, 0x5e7c, 0x5e7d, 0x5ebe, 0x60a0, 0x60df, 0x6108, - 0x6109, 0x63c4, 0x6538, 0x6709, 0xf9c8, 0x67d4, 0x67da, 0xf9c9, - 0x6961, 0x6962, 0x6cb9, 0x6d27, 0xf9ca, 0x6e38, 0xf9cb, 0x003f, - /* lead byte eb */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6fe1, 0x7336, 0x7337, 0xf9cc, 0x745c, 0x7531, 0xf9cd, - 0x7652, 0xf9ce, 0xf9cf, 0x7dad, 0x81fe, 0x8438, 0x88d5, 0x8a98, - 0x8adb, 0x8aed, 0x8e30, 0x8e42, 0x904a, 0x903e, 0x907a, 0x9149, - 0x91c9, 0x936e, 0xf9d0, 0xf9d1, 0x5809, 0xf9d2, 0x6bd3, 0x8089, - 0x80b2, 0xf9d3, 0xf9d4, 0x5141, 0x596b, 0x5c39, 0xf9d5, 0xf9d6, - 0x6f64, 0x73a7, 0x80e4, 0x8d07, 0xf9d7, 0x9217, 0x958f, 0xf9d8, - 0xf9d9, 0xf9da, 0xf9db, 0x807f, 0x620e, 0x701c, 0x7d68, 0x878d, - 0xf9dc, 0x57a0, 0x6069, 0x6147, 0x6bb7, 0x8abe, 0x9280, 0x96b1, - 0x4e59, 0x541f, 0x6deb, 0x852d, 0x9670, 0x97f3, 0x98ee, 0x63d6, - 0x6ce3, 0x9091, 0x51dd, 0x61c9, 0x81ba, 0x9df9, 0x4f9d, 0x501a, - 0x5100, 0x5b9c, 0x610f, 0x61ff, 0x64ec, 0x6905, 0x6bc5, 0x7591, - 0x77e3, 0x7fa9, 0x8264, 0x858f, 0x87fb, 0x8863, 0x8abc, 0x003f, - /* lead byte ec */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8b70, 0x91ab, 0x4e8c, 0x4ee5, 0x4f0a, 0xf9dd, 0xf9de, - 0x5937, 0x59e8, 0xf9df, 0x5df2, 0x5f1b, 0x5f5b, 0x6021, 0xf9e0, - 0xf9e1, 0xf9e2, 0xf9e3, 0x723e, 0x73e5, 0xf9e4, 0x7570, 0x75cd, - 0xf9e5, 0x79fb, 0xf9e6, 0x800c, 0x8033, 0x8084, 0x82e1, 0x8351, - 0xf9e7, 0xf9e8, 0x8cbd, 0x8cb3, 0x9087, 0xf9e9, 0xf9ea, 0x98f4, - 0x990c, 0xf9eb, 0xf9ec, 0x7037, 0x76ca, 0x7fca, 0x7fcc, 0x7ffc, - 0x8b1a, 0x4eba, 0x4ec1, 0x5203, 0x5370, 0xf9ed, 0x54bd, 0x56e0, - 0x59fb, 0x5bc5, 0x5f15, 0x5fcd, 0x6e6e, 0xf9ee, 0xf9ef, 0x7d6a, - 0x8335, 0xf9f0, 0x8693, 0x8a8d, 0xf9f1, 0x976d, 0x9777, 0xf9f2, - 0xf9f3, 0x4e00, 0x4f5a, 0x4f7e, 0x58f9, 0x65e5, 0x6ea2, 0x9038, - 0x93b0, 0x99b9, 0x4efb, 0x58ec, 0x598a, 0x59d9, 0x6041, 0xf9f4, - 0xf9f5, 0x7a14, 0xf9f6, 0x834f, 0x8cc3, 0x5165, 0x5344, 0x003f, - /* lead byte ed */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf9f7, 0xf9f8, 0xf9f9, 0x4ecd, 0x5269, 0x5b55, 0x82bf, - 0x4ed4, 0x523a, 0x54a8, 0x59c9, 0x59ff, 0x5b50, 0x5b57, 0x5b5c, - 0x6063, 0x6148, 0x6ecb, 0x7099, 0x716e, 0x7386, 0x74f7, 0x75b5, - 0x78c1, 0x7d2b, 0x8005, 0x81ea, 0x8328, 0x8517, 0x85c9, 0x8aee, - 0x8cc7, 0x96cc, 0x4f5c, 0x52fa, 0x56bc, 0x65ab, 0x6628, 0x707c, - 0x70b8, 0x7235, 0x7dbd, 0x828d, 0x914c, 0x96c0, 0x9d72, 0x5b71, - 0x68e7, 0x6b98, 0x6f7a, 0x76de, 0x5c91, 0x66ab, 0x6f5b, 0x7bb4, - 0x7c2a, 0x8836, 0x96dc, 0x4e08, 0x4ed7, 0x5320, 0x5834, 0x58bb, - 0x58ef, 0x596c, 0x5c07, 0x5e33, 0x5e84, 0x5f35, 0x638c, 0x66b2, - 0x6756, 0x6a1f, 0x6aa3, 0x6b0c, 0x6f3f, 0x7246, 0xf9fa, 0x7350, - 0x748b, 0x7ae0, 0x7ca7, 0x8178, 0x81df, 0x81e7, 0x838a, 0x846c, - 0x8523, 0x8594, 0x85cf, 0x88dd, 0x8d13, 0x91ac, 0x9577, 0x003f, - /* lead byte ee */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x969c, 0x518d, 0x54c9, 0x5728, 0x5bb0, 0x624d, 0x6750, - 0x683d, 0x6893, 0x6e3d, 0x6ed3, 0x707d, 0x7e21, 0x88c1, 0x8ca1, - 0x8f09, 0x9f4b, 0x9f4e, 0x722d, 0x7b8f, 0x8acd, 0x931a, 0x4f47, - 0x4f4e, 0x5132, 0x5480, 0x59d0, 0x5e95, 0x62b5, 0x6775, 0x696e, - 0x6a17, 0x6cae, 0x6e1a, 0x72d9, 0x732a, 0x75bd, 0x7bb8, 0x7d35, - 0x82e7, 0x83f9, 0x8457, 0x85f7, 0x8a5b, 0x8caf, 0x8e87, 0x9019, - 0x90b8, 0x96ce, 0x9f5f, 0x52e3, 0x540a, 0x5ae1, 0x5bc2, 0x6458, - 0x6575, 0x6ef4, 0x72c4, 0xf9fb, 0x7684, 0x7a4d, 0x7b1b, 0x7c4d, - 0x7e3e, 0x7fdf, 0x837b, 0x8b2b, 0x8cca, 0x8d64, 0x8de1, 0x8e5f, - 0x8fea, 0x8ff9, 0x9069, 0x93d1, 0x4f43, 0x4f7a, 0x50b3, 0x5168, - 0x5178, 0x524d, 0x526a, 0x5861, 0x587c, 0x5960, 0x5c08, 0x5c55, - 0x5edb, 0x609b, 0x6230, 0x6813, 0x6bbf, 0x6c08, 0x6fb1, 0x003f, - /* lead byte ef */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x714e, 0x7420, 0x7530, 0x7538, 0x7551, 0x7672, 0x7b4c, - 0x7b8b, 0x7bad, 0x7bc6, 0x7e8f, 0x8a6e, 0x8f3e, 0x8f49, 0x923f, - 0x9293, 0x9322, 0x942b, 0x96fb, 0x985a, 0x986b, 0x991e, 0x5207, - 0x622a, 0x6298, 0x6d59, 0x7664, 0x7aca, 0x7bc0, 0x7d76, 0x5360, - 0x5cbe, 0x5e97, 0x6f38, 0x70b9, 0x7c98, 0x9711, 0x9b8e, 0x9ede, - 0x63a5, 0x647a, 0x8776, 0x4e01, 0x4e95, 0x4ead, 0x505c, 0x5075, - 0x5448, 0x59c3, 0x5b9a, 0x5e40, 0x5ead, 0x5ef7, 0x5f81, 0x60c5, - 0x633a, 0x653f, 0x6574, 0x65cc, 0x6676, 0x6678, 0x67fe, 0x6968, - 0x6a89, 0x6b63, 0x6c40, 0x6dc0, 0x6de8, 0x6e1f, 0x6e5e, 0x701e, - 0x70a1, 0x738e, 0x73fd, 0x753a, 0x775b, 0x7887, 0x798e, 0x7a0b, - 0x7a7d, 0x7cbe, 0x7d8e, 0x8247, 0x8a02, 0x8aea, 0x8c9e, 0x912d, - 0x914a, 0x91d8, 0x9266, 0x92cc, 0x9320, 0x9706, 0x9756, 0x003f, - /* lead byte f0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x975c, 0x9802, 0x9f0e, 0x5236, 0x5291, 0x557c, 0x5824, - 0x5e1d, 0x5f1f, 0x608c, 0x63d0, 0x68af, 0x6fdf, 0x796d, 0x7b2c, - 0x81cd, 0x85ba, 0x88fd, 0x8af8, 0x8e44, 0x918d, 0x9664, 0x969b, - 0x973d, 0x984c, 0x9f4a, 0x4fce, 0x5146, 0x51cb, 0x52a9, 0x5632, - 0x5f14, 0x5f6b, 0x63aa, 0x64cd, 0x65e9, 0x6641, 0x66fa, 0x66f9, - 0x671d, 0x689d, 0x68d7, 0x69fd, 0x6f15, 0x6f6e, 0x7167, 0x71e5, - 0x722a, 0x74aa, 0x773a, 0x7956, 0x795a, 0x79df, 0x7a20, 0x7a95, - 0x7c97, 0x7cdf, 0x7d44, 0x7e70, 0x8087, 0x85fb, 0x86a4, 0x8a54, - 0x8abf, 0x8d99, 0x8e81, 0x9020, 0x906d, 0x91e3, 0x963b, 0x96d5, - 0x9ce5, 0x65cf, 0x7c07, 0x8db3, 0x93c3, 0x5b58, 0x5c0a, 0x5352, - 0x62d9, 0x731d, 0x5027, 0x5b97, 0x5f9e, 0x60b0, 0x616b, 0x68d5, - 0x6dd9, 0x742e, 0x7a2e, 0x7d42, 0x7d9c, 0x7e31, 0x816b, 0x003f, - /* lead byte f1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8e2a, 0x8e35, 0x937e, 0x9418, 0x4f50, 0x5750, 0x5de6, - 0x5ea7, 0x632b, 0x7f6a, 0x4e3b, 0x4f4f, 0x4f8f, 0x505a, 0x59dd, - 0x80c4, 0x546a, 0x5468, 0x55fe, 0x594f, 0x5b99, 0x5dde, 0x5eda, - 0x665d, 0x6731, 0x67f1, 0x682a, 0x6ce8, 0x6d32, 0x6e4a, 0x6f8d, - 0x70b7, 0x73e0, 0x7587, 0x7c4c, 0x7d02, 0x7d2c, 0x7da2, 0x821f, - 0x86db, 0x8a3b, 0x8a85, 0x8d70, 0x8e8a, 0x8f33, 0x9031, 0x914e, - 0x9152, 0x9444, 0x99d0, 0x7af9, 0x7ca5, 0x4fca, 0x5101, 0x51c6, - 0x57c8, 0x5bef, 0x5cfb, 0x6659, 0x6a3d, 0x6d5a, 0x6e96, 0x6fec, - 0x710c, 0x756f, 0x7ae3, 0x8822, 0x9021, 0x9075, 0x96cb, 0x99ff, - 0x8301, 0x4e2d, 0x4ef2, 0x8846, 0x91cd, 0x537d, 0x6adb, 0x696b, - 0x6c41, 0x847a, 0x589e, 0x618e, 0x66fe, 0x62ef, 0x70dd, 0x7511, - 0x75c7, 0x7e52, 0x84b8, 0x8b49, 0x8d08, 0x4e4b, 0x53ea, 0x003f, - /* lead byte f2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x54ab, 0x5730, 0x5740, 0x5fd7, 0x6301, 0x6307, 0x646f, - 0x652f, 0x65e8, 0x667a, 0x679d, 0x67b3, 0x6b62, 0x6c60, 0x6c9a, - 0x6f2c, 0x77e5, 0x7825, 0x7949, 0x7957, 0x7d19, 0x80a2, 0x8102, - 0x81f3, 0x829d, 0x82b7, 0x8718, 0x8a8c, 0xf9fc, 0x8d04, 0x8dbe, - 0x9072, 0x76f4, 0x7a19, 0x7a37, 0x7e54, 0x8077, 0x5507, 0x55d4, - 0x5875, 0x632f, 0x6422, 0x6649, 0x664b, 0x686d, 0x699b, 0x6b84, - 0x6d25, 0x6eb1, 0x73cd, 0x7468, 0x74a1, 0x755b, 0x75b9, 0x76e1, - 0x771e, 0x778b, 0x79e6, 0x7e09, 0x7e1d, 0x81fb, 0x852f, 0x8897, - 0x8a3a, 0x8cd1, 0x8eeb, 0x8fb0, 0x9032, 0x93ad, 0x9663, 0x9673, - 0x9707, 0x4f84, 0x53f1, 0x59ea, 0x5ac9, 0x5e19, 0x684e, 0x74c6, - 0x75be, 0x79e9, 0x7a92, 0x81a3, 0x86ed, 0x8cea, 0x8dcc, 0x8fed, - 0x659f, 0x6715, 0xf9fd, 0x57f7, 0x6f57, 0x7ddd, 0x8f2f, 0x003f, - /* lead byte f3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x93f6, 0x96c6, 0x5fb5, 0x61f2, 0x6f84, 0x4e14, 0x4f98, - 0x501f, 0x53c9, 0x55df, 0x5d6f, 0x5dee, 0x6b21, 0x6b64, 0x78cb, - 0x7b9a, 0xf9fe, 0x8e49, 0x8eca, 0x906e, 0x6349, 0x643e, 0x7740, - 0x7a84, 0x932f, 0x947f, 0x9f6a, 0x64b0, 0x6faf, 0x71e6, 0x74a8, - 0x74da, 0x7ac4, 0x7c12, 0x7e82, 0x7cb2, 0x7e98, 0x8b9a, 0x8d0a, - 0x947d, 0x9910, 0x994c, 0x5239, 0x5bdf, 0x64e6, 0x672d, 0x7d2e, - 0x50ed, 0x53c3, 0x5879, 0x6158, 0x6159, 0x61fa, 0x65ac, 0x7ad9, - 0x8b92, 0x8b96, 0x5009, 0x5021, 0x5275, 0x5531, 0x5a3c, 0x5ee0, - 0x5f70, 0x6134, 0x655e, 0x660c, 0x6636, 0x66a2, 0x69cd, 0x6ec4, - 0x6f32, 0x7316, 0x7621, 0x7a93, 0x8139, 0x8259, 0x83d6, 0x84bc, - 0x50b5, 0x57f0, 0x5bc0, 0x5be8, 0x5f69, 0x63a1, 0x7826, 0x7db5, - 0x83dc, 0x8521, 0x91c7, 0x91f5, 0x518a, 0x67f5, 0x7b56, 0x003f, - /* lead byte f4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8cac, 0x51c4, 0x59bb, 0x60bd, 0x8655, 0x501c, 0xf9ff, - 0x5254, 0x5c3a, 0x617d, 0x621a, 0x62d3, 0x64f2, 0x65a5, 0x6ecc, - 0x7620, 0x810a, 0x8e60, 0x965f, 0x96bb, 0x4edf, 0x5343, 0x5598, - 0x5929, 0x5ddd, 0x64c5, 0x6cc9, 0x6dfa, 0x7394, 0x7a7f, 0x821b, - 0x85a6, 0x8ce4, 0x8e10, 0x9077, 0x91e7, 0x95e1, 0x9621, 0x97c6, - 0x51f8, 0x54f2, 0x5586, 0x5fb9, 0x64a4, 0x6f88, 0x7db4, 0x8f1f, - 0x8f4d, 0x9435, 0x50c9, 0x5c16, 0x6cbe, 0x6dfb, 0x751b, 0x77bb, - 0x7c3d, 0x7c64, 0x8a79, 0x8ac2, 0x581e, 0x59be, 0x5e16, 0x6377, - 0x7252, 0x758a, 0x776b, 0x8adc, 0x8cbc, 0x8f12, 0x5ef3, 0x6674, - 0x6df8, 0x807d, 0x83c1, 0x8acb, 0x9751, 0x9bd6, 0xfa00, 0x5243, - 0x66ff, 0x6d95, 0x6eef, 0x7de0, 0x8ae6, 0x902e, 0x905e, 0x9ad4, - 0x521d, 0x527f, 0x54e8, 0x6194, 0x6284, 0x62db, 0x68a2, 0x003f, - /* lead byte f5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6912, 0x695a, 0x6a35, 0x7092, 0x7126, 0x785d, 0x7901, - 0x790e, 0x79d2, 0x7a0d, 0x8096, 0x8278, 0x82d5, 0x8349, 0x8549, - 0x8c82, 0x8d85, 0x9162, 0x918b, 0x91ae, 0x4fc3, 0x56d1, 0x71ed, - 0x77d7, 0x8700, 0x89f8, 0x5bf8, 0x5fd6, 0x6751, 0x90a8, 0x53e2, - 0x585a, 0x5bf5, 0x60a4, 0x6181, 0x6460, 0x7e3d, 0x8070, 0x8525, - 0x9283, 0x64ae, 0x50ac, 0x5d14, 0x6700, 0x589c, 0x62bd, 0x63a8, - 0x690e, 0x6978, 0x6a1e, 0x6e6b, 0x76ba, 0x79cb, 0x82bb, 0x8429, - 0x8acf, 0x8da8, 0x8ffd, 0x9112, 0x914b, 0x919c, 0x9310, 0x9318, - 0x939a, 0x96db, 0x9a36, 0x9c0d, 0x4e11, 0x755c, 0x795d, 0x7afa, - 0x7b51, 0x7bc9, 0x7e2e, 0x84c4, 0x8e59, 0x8e74, 0x8ef8, 0x9010, - 0x6625, 0x693f, 0x7443, 0x51fa, 0x672e, 0x9edc, 0x5145, 0x5fe0, - 0x6c96, 0x87f2, 0x885d, 0x8877, 0x60b4, 0x81b5, 0x8403, 0x003f, - /* lead byte f6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8d05, 0x53d6, 0x5439, 0x5634, 0x5a36, 0x5c31, 0x708a, - 0x7fe0, 0x805a, 0x8106, 0x81ed, 0x8da3, 0x9189, 0x9a5f, 0x9df2, - 0x5074, 0x4ec4, 0x53a0, 0x60fb, 0x6e2c, 0x5c64, 0x4f88, 0x5024, - 0x55e4, 0x5cd9, 0x5e5f, 0x6065, 0x6894, 0x6cbb, 0x6dc4, 0x71be, - 0x75d4, 0x75f4, 0x7661, 0x7a1a, 0x7a49, 0x7dc7, 0x7dfb, 0x7f6e, - 0x81f4, 0x86a9, 0x8f1c, 0x96c9, 0x99b3, 0x9f52, 0x5247, 0x52c5, - 0x98ed, 0x89aa, 0x4e03, 0x67d2, 0x6f06, 0x4fb5, 0x5be2, 0x6795, - 0x6c88, 0x6d78, 0x741b, 0x7827, 0x91dd, 0x937c, 0x87c4, 0x79e4, - 0x7a31, 0x5feb, 0x4ed6, 0x54a4, 0x553e, 0x58ae, 0x59a5, 0x60f0, - 0x6253, 0x62d6, 0x6736, 0x6955, 0x8235, 0x9640, 0x99b1, 0x99dd, - 0x502c, 0x5353, 0x5544, 0x577c, 0xfa01, 0x6258, 0xfa02, 0x64e2, - 0x666b, 0x67dd, 0x6fc1, 0x6fef, 0x7422, 0x7438, 0x8a17, 0x003f, - /* lead byte f7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9438, 0x5451, 0x5606, 0x5766, 0x5f48, 0x619a, 0x6b4e, - 0x7058, 0x70ad, 0x7dbb, 0x8a95, 0x596a, 0x812b, 0x63a2, 0x7708, - 0x803d, 0x8caa, 0x5854, 0x642d, 0x69bb, 0x5b95, 0x5e11, 0x6e6f, - 0xfa03, 0x8569, 0x514c, 0x53f0, 0x592a, 0x6020, 0x614b, 0x6b86, - 0x6c70, 0x6cf0, 0x7b1e, 0x80ce, 0x82d4, 0x8dc6, 0x90b0, 0x98b1, - 0xfa04, 0x64c7, 0x6fa4, 0x6491, 0x6504, 0x514e, 0x5410, 0x571f, - 0x8a0e, 0x615f, 0x6876, 0xfa05, 0x75db, 0x7b52, 0x7d71, 0x901a, - 0x5806, 0x69cc, 0x817f, 0x892a, 0x9000, 0x9839, 0x5078, 0x5957, - 0x59ac, 0x6295, 0x900f, 0x9b2a, 0x615d, 0x7279, 0x95d6, 0x5761, - 0x5a46, 0x5df4, 0x628a, 0x64ad, 0x64fa, 0x6777, 0x6ce2, 0x6d3e, - 0x722c, 0x7436, 0x7834, 0x7f77, 0x82ad, 0x8ddb, 0x9817, 0x5224, - 0x5742, 0x677f, 0x7248, 0x74e3, 0x8ca9, 0x8fa6, 0x9211, 0x003f, - /* lead byte f8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x962a, 0x516b, 0x53ed, 0x634c, 0x4f69, 0x5504, 0x6096, - 0x6557, 0x6c9b, 0x6d7f, 0x724c, 0x72fd, 0x7a17, 0x8987, 0x8c9d, - 0x5f6d, 0x6f8e, 0x70f9, 0x81a8, 0x610e, 0x4fbf, 0x504f, 0x6241, - 0x7247, 0x7bc7, 0x7de8, 0x7fe9, 0x904d, 0x97ad, 0x9a19, 0x8cb6, - 0x576a, 0x5e73, 0x67b0, 0x840d, 0x8a55, 0x5420, 0x5b16, 0x5e63, - 0x5ee2, 0x5f0a, 0x6583, 0x80ba, 0x853d, 0x9589, 0x965b, 0x4f48, - 0x5305, 0x530d, 0x530f, 0x5486, 0x54fa, 0x5703, 0x5e03, 0x6016, - 0x629b, 0x62b1, 0x6355, 0xfa06, 0x6ce1, 0x6d66, 0x75b1, 0x7832, - 0x80de, 0x812f, 0x82de, 0x8461, 0x84b2, 0x888d, 0x8912, 0x900b, - 0x92ea, 0x98fd, 0x9b91, 0x5e45, 0x66b4, 0x66dd, 0x7011, 0x7206, - 0xfa07, 0x4ff5, 0x527d, 0x5f6a, 0x6153, 0x6753, 0x6a19, 0x6f02, - 0x74e2, 0x7968, 0x8868, 0x8c79, 0x98c7, 0x98c4, 0x9a43, 0x003f, - /* lead byte f9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x54c1, 0x7a1f, 0x6953, 0x8af7, 0x8c4a, 0x98a8, 0x99ae, - 0x5f7c, 0x62ab, 0x75b2, 0x76ae, 0x88ab, 0x907f, 0x9642, 0x5339, - 0x5f3c, 0x5fc5, 0x6ccc, 0x73cc, 0x7562, 0x758b, 0x7b46, 0x82fe, - 0x999d, 0x4e4f, 0x903c, 0x4e0b, 0x4f55, 0x53a6, 0x590f, 0x5ec8, - 0x6630, 0x6cb3, 0x7455, 0x8377, 0x8766, 0x8cc0, 0x9050, 0x971e, - 0x9c15, 0x58d1, 0x5b78, 0x8650, 0x8b14, 0x9db4, 0x5bd2, 0x6068, - 0x608d, 0x65f1, 0x6c57, 0x6f22, 0x6fa3, 0x701a, 0x7f55, 0x7ff0, - 0x9591, 0x9592, 0x9650, 0x97d3, 0x5272, 0x8f44, 0x51fd, 0x542b, - 0x54b8, 0x5563, 0x558a, 0x6abb, 0x6db5, 0x7dd8, 0x8266, 0x929c, - 0x9677, 0x9e79, 0x5408, 0x54c8, 0x76d2, 0x86e4, 0x95a4, 0x95d4, - 0x965c, 0x4ea2, 0x4f09, 0x59ee, 0x5ae6, 0x5df7, 0x6052, 0x6297, - 0x676d, 0x6841, 0x6c86, 0x6e2f, 0x7f38, 0x809b, 0x822a, 0x003f, - /* lead byte fa */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xfa08, 0xfa09, 0x9805, 0x4ea5, 0x5055, 0x54b3, 0x5793, - 0x595a, 0x5b69, 0x5bb3, 0x61c8, 0x6977, 0x6d77, 0x7023, 0x87f9, - 0x89e3, 0x8a72, 0x8ae7, 0x9082, 0x99ed, 0x9ab8, 0x52be, 0x6838, - 0x5016, 0x5e78, 0x674f, 0x8347, 0x884c, 0x4eab, 0x5411, 0x56ae, - 0x73e6, 0x9115, 0x97ff, 0x9909, 0x9957, 0x9999, 0x5653, 0x589f, - 0x865b, 0x8a31, 0x61b2, 0x6af6, 0x737b, 0x8ed2, 0x6b47, 0x96aa, - 0x9a57, 0x5955, 0x7200, 0x8d6b, 0x9769, 0x4fd4, 0x5cf4, 0x5f26, - 0x61f8, 0x665b, 0x6ceb, 0x70ab, 0x7384, 0x73b9, 0x73fe, 0x7729, - 0x774d, 0x7d43, 0x7d62, 0x7e23, 0x8237, 0x8852, 0xfa0a, 0x8ce2, - 0x9249, 0x986f, 0x5b51, 0x7a74, 0x8840, 0x9801, 0x5acc, 0x4fe0, - 0x5354, 0x593e, 0x5cfd, 0x633e, 0x6d79, 0x72f9, 0x8105, 0x8107, - 0x83a2, 0x92cf, 0x9830, 0x4ea8, 0x5144, 0x5211, 0x578b, 0x003f, - /* lead byte fb */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5f62, 0x6cc2, 0x6ece, 0x7005, 0x7050, 0x70af, 0x7192, - 0x73e9, 0x7469, 0x834a, 0x87a2, 0x8861, 0x9008, 0x90a2, 0x93a3, - 0x99a8, 0x516e, 0x5f57, 0x60e0, 0x6167, 0x66b3, 0x8559, 0x8e4a, - 0x91af, 0x978b, 0x4e4e, 0x4e92, 0x547c, 0x58d5, 0x58fa, 0x597d, - 0x5cb5, 0x5f27, 0x6236, 0x6248, 0x660a, 0x6667, 0x6beb, 0x6d69, - 0x6dcf, 0x6e56, 0x6ef8, 0x6f94, 0x6fe0, 0x6fe9, 0x705d, 0x72d0, - 0x7425, 0x745a, 0x74e0, 0x7693, 0x795c, 0x7cca, 0x7e1e, 0x80e1, - 0x82a6, 0x846b, 0x84bf, 0x864e, 0x865f, 0x8774, 0x8b77, 0x8c6a, - 0x93ac, 0x9800, 0x9865, 0x60d1, 0x6216, 0x9177, 0x5a5a, 0x660f, - 0x6df7, 0x6e3e, 0x743f, 0x9b42, 0x5ffd, 0x60da, 0x7b0f, 0x54c4, - 0x5f18, 0x6c5e, 0x6cd3, 0x6d2a, 0x70d8, 0x7d05, 0x8679, 0x8a0c, - 0x9d3b, 0x5316, 0x548c, 0x5b05, 0x6a3a, 0x706b, 0x7575, 0x003f, - /* lead byte fc */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x798d, 0x79be, 0x82b1, 0x83ef, 0x8a71, 0x8b41, 0x8ca8, - 0x9774, 0xfa0b, 0x64f4, 0x652b, 0x78ba, 0x78bb, 0x7a6b, 0x4e38, - 0x559a, 0x5950, 0x5ba6, 0x5e7b, 0x60a3, 0x63db, 0x6b61, 0x6665, - 0x6853, 0x6e19, 0x7165, 0x74b0, 0x7d08, 0x9084, 0x9a69, 0x9c25, - 0x6d3b, 0x6ed1, 0x733e, 0x8c41, 0x95ca, 0x51f0, 0x5e4c, 0x5fa8, - 0x604d, 0x60f6, 0x6130, 0x614c, 0x6643, 0x6644, 0x69a5, 0x6cc1, - 0x6e5f, 0x6ec9, 0x6f62, 0x714c, 0x749c, 0x7687, 0x7bc1, 0x7c27, - 0x8352, 0x8757, 0x9051, 0x968d, 0x9ec3, 0x532f, 0x56de, 0x5efb, - 0x5f8a, 0x6062, 0x6094, 0x61f7, 0x6666, 0x6703, 0x6a9c, 0x6dee, - 0x6fae, 0x7070, 0x736a, 0x7e6a, 0x81be, 0x8334, 0x86d4, 0x8aa8, - 0x8cc4, 0x5283, 0x7372, 0x5b96, 0x6a6b, 0x9404, 0x54ee, 0x5686, - 0x5b5d, 0x6548, 0x6585, 0x66c9, 0x689f, 0x6d8d, 0x6dc6, 0x003f, - /* lead byte fd */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x723b, 0x80b4, 0x9175, 0x9a4d, 0x4faf, 0x5019, 0x539a, - 0x540e, 0x543c, 0x5589, 0x55c5, 0x5e3f, 0x5f8c, 0x673d, 0x7166, - 0x73dd, 0x9005, 0x52db, 0x52f3, 0x5864, 0x58ce, 0x7104, 0x718f, - 0x71fb, 0x85b0, 0x8a13, 0x6688, 0x85a8, 0x55a7, 0x6684, 0x714a, - 0x8431, 0x5349, 0x5599, 0x6bc1, 0x5f59, 0x5fbd, 0x63ee, 0x6689, - 0x7147, 0x8af1, 0x8f1d, 0x9ebe, 0x4f11, 0x643a, 0x70cb, 0x7566, - 0x8667, 0x6064, 0x8b4e, 0x9df8, 0x5147, 0x51f6, 0x5308, 0x6d36, - 0x80f8, 0x9ed1, 0x6615, 0x6b23, 0x7098, 0x75d5, 0x5403, 0x5c79, - 0x7d07, 0x8a16, 0x6b20, 0x6b3d, 0x6b46, 0x5438, 0x6070, 0x6d3d, - 0x7fd5, 0x8208, 0x50d6, 0x51de, 0x559c, 0x566b, 0x56cd, 0x59ec, - 0x5b09, 0x5e0c, 0x6199, 0x6198, 0x6231, 0x665e, 0x66e6, 0x7199, - 0x71b9, 0x71ba, 0x72a7, 0x79a7, 0x7a00, 0x7fb2, 0x8a70, 0x003f, - /* lead byte fe */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe05e, 0xe05f, 0xe060, 0xe061, 0xe062, 0xe063, 0xe064, - 0xe065, 0xe066, 0xe067, 0xe068, 0xe069, 0xe06a, 0xe06b, 0xe06c, - 0xe06d, 0xe06e, 0xe06f, 0xe070, 0xe071, 0xe072, 0xe073, 0xe074, - 0xe075, 0xe076, 0xe077, 0xe078, 0xe079, 0xe07a, 0xe07b, 0xe07c, - 0xe07d, 0xe07e, 0xe07f, 0xe080, 0xe081, 0xe082, 0xe083, 0xe084, - 0xe085, 0xe086, 0xe087, 0xe088, 0xe089, 0xe08a, 0xe08b, 0xe08c, - 0xe08d, 0xe08e, 0xe08f, 0xe090, 0xe091, 0xe092, 0xe093, 0xe094, - 0xe095, 0xe096, 0xe097, 0xe098, 0xe099, 0xe09a, 0xe09b, 0xe09c, - 0xe09d, 0xe09e, 0xe09f, 0xe0a0, 0xe0a1, 0xe0a2, 0xe0a3, 0xe0a4, - 0xe0a5, 0xe0a6, 0xe0a7, 0xe0a8, 0xe0a9, 0xe0aa, 0xe0ab, 0xe0ac, - 0xe0ad, 0xe0ae, 0xe0af, 0xe0b0, 0xe0b1, 0xe0b2, 0xe0b3, 0xe0b4, - 0xe0b5, 0xe0b6, 0xe0b7, 0xe0b8, 0xe0b9, 0xe0ba, 0xe0bb, 0x003f -}; - -static const unsigned char cp2uni_leadbytes[256] = -{ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x00 -}; - -static const unsigned short uni2cp_low[38144] = -{ - /* 0x0000 .. 0x00ff */ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x0080, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa2ae, 0xa1cb, 0xa1cc, 0xa2b4, 0xa1cd, 0x007c, 0xa1d7, - 0xa1a7, 0xa8cf, 0xa8a3, 0xa1ec, 0xa1fe, 0xa1a9, 0xa2e7, 0x003f, - 0xa1c6, 0xa1be, 0xa9f7, 0xa9f8, 0xa2a5, 0xa5ec, 0xa2d2, 0xa1a4, - 0xa2ac, 0xa9f6, 0xa8ac, 0xa1ed, 0xa8f9, 0xa8f6, 0xa8fa, 0xa2af, - 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0xa8a1, 0x0043, - 0x0045, 0x0045, 0x0045, 0x0045, 0x0049, 0x0049, 0x0049, 0x0049, - 0xa8a2, 0x004e, 0x004f, 0x004f, 0x004f, 0x004f, 0x004f, 0xa1bf, - 0xa8aa, 0x0055, 0x0055, 0x0055, 0x0055, 0x0059, 0xa8ad, 0xa9ac, - 0x0061, 0x0061, 0x0061, 0x0061, 0x0061, 0x0061, 0xa9a1, 0x0063, - 0x0065, 0x0065, 0x0065, 0x0065, 0x0069, 0x0069, 0x0069, 0x0069, - 0xa9a3, 0x006e, 0x006f, 0x006f, 0x006f, 0x006f, 0x006f, 0xa1c0, - 0xa9aa, 0x0075, 0x0075, 0x0075, 0x0075, 0x0079, 0xa9ad, 0x0079, - /* 0x0100 .. 0x01ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa9a2, 0xa9a2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa8a4, 0xa9a4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa9a5, 0xa8a6, 0xa9a6, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa9a7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa8a8, - 0xa9a8, 0xa8a9, 0xa9a9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa9b0, 0xa8af, 0xa9af, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa8ab, 0xa9ab, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa8ae, 0xa9ae, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x0200 .. 0x02ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa2a7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa2b0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa2a8, 0xa2ab, 0xa2aa, 0xa2ad, 0x003f, 0xa2a9, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x0300 .. 0x03ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa5c1, 0xa5c2, 0xa5c3, 0xa5c4, 0xa5c5, 0xa5c6, 0xa5c7, - 0xa5c8, 0xa5c9, 0xa5ca, 0xa5cb, 0xa5cc, 0xa5cd, 0xa5ce, 0xa5cf, - 0xa5d0, 0xa5d1, 0x003f, 0xa5d2, 0xa5d3, 0xa5d4, 0xa5d5, 0xa5d6, - 0xa5d7, 0xa5d8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa5e1, 0xa5e2, 0xa5e3, 0xa5e4, 0xa5e5, 0xa5e6, 0xa5e7, - 0xa5e8, 0xa5e9, 0xa5ea, 0xa5eb, 0xa5ec, 0xa5ed, 0xa5ee, 0xa5ef, - 0xa5f0, 0xa5f1, 0x003f, 0xa5f2, 0xa5f3, 0xa5f4, 0xa5f5, 0xa5f6, - 0xa5f7, 0xa5f8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x0400 .. 0x04ff */ - 0x003f, 0xaca7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xaca1, 0xaca2, 0xaca3, 0xaca4, 0xaca5, 0xaca6, 0xaca8, 0xaca9, - 0xacaa, 0xacab, 0xacac, 0xacad, 0xacae, 0xacaf, 0xacb0, 0xacb1, - 0xacb2, 0xacb3, 0xacb4, 0xacb5, 0xacb6, 0xacb7, 0xacb8, 0xacb9, - 0xacba, 0xacbb, 0xacbc, 0xacbd, 0xacbe, 0xacbf, 0xacc0, 0xacc1, - 0xacd1, 0xacd2, 0xacd3, 0xacd4, 0xacd5, 0xacd6, 0xacd8, 0xacd9, - 0xacda, 0xacdb, 0xacdc, 0xacdd, 0xacde, 0xacdf, 0xace0, 0xace1, - 0xace2, 0xace3, 0xace4, 0xace5, 0xace6, 0xace7, 0xace8, 0xace9, - 0xacea, 0xaceb, 0xacec, 0xaced, 0xacee, 0xacef, 0xacf0, 0xacf1, - 0x003f, 0xacd7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x1100 .. 0x11ff */ - 0xa4a1, 0xa4a2, 0xa4a4, 0xa4a7, 0xa4a8, 0xa4a9, 0xa4b1, 0xa4b2, - 0xa4b3, 0xa4b5, 0xa4b6, 0xa4b7, 0xa4b8, 0xa4b9, 0xa4ba, 0xa4bb, - 0xa4bc, 0xa4bd, 0xa4be, 0x003f, 0xa4d5, 0xa4d6, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa4dd, 0x003f, 0xa4de, 0xa4e1, 0xa4e2, 0x003f, - 0xa4e3, 0xa4b4, 0xa4e4, 0xa4e5, 0x003f, 0x003f, 0x003f, 0xa4e6, - 0x003f, 0xa4e7, 0x003f, 0xa4e8, 0xa4e9, 0xa4ea, 0xa4eb, 0xa4ec, - 0x003f, 0x003f, 0xa4ed, 0x003f, 0x003f, 0x003f, 0xa4ee, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa4b5, 0xa4b6, 0xa4b5, 0xa4b6, - 0xa4ef, 0x003f, 0x003f, 0x003f, 0x003f, 0xa4f2, 0xa4f3, 0xa4f0, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa4b7, 0x003f, 0xa4b8, 0xa4b9, - 0xa4b8, 0xa4b9, 0x003f, 0x003f, 0xa4ba, 0xa4ba, 0x003f, 0xa4f4, - 0xa4f5, 0xa4f6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa4d4, - 0x003f, 0xa4bf, 0xa4c0, 0xa4c1, 0xa4c2, 0xa4c3, 0xa4c4, 0xa4c5, - 0xa4c6, 0xa4c7, 0xa4c8, 0xa4c9, 0xa4ca, 0xa4cb, 0xa4cc, 0xa4cd, - 0xa4ce, 0xa4cf, 0xa4d0, 0xa4d1, 0xa4d2, 0xa4d3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa4f7, 0xa4f8, 0x003f, 0x003f, - 0xa4f9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa4fa, 0xa4fb, 0x003f, 0xa4fc, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa4fd, 0x003f, - 0x003f, 0xa4fe, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa4a1, 0xa4a2, 0xa4a3, 0xa4a4, 0xa4a5, 0xa4a6, 0xa4a7, 0xa4a9, - 0xa4aa, 0xa4ab, 0xa4ac, 0xa4ad, 0xa4ae, 0xa4af, 0xa4b0, 0xa4b1, - 0xa4b2, 0xa4b4, 0xa4b5, 0xa4b6, 0xa4b7, 0xa4b8, 0xa4ba, 0xa4bb, - 0xa4bc, 0xa4bd, 0xa4be, 0x003f, 0x003f, 0x003f, 0xa4d6, 0xa4d7, - 0xa4d8, 0x003f, 0x003f, 0x003f, 0xa4d9, 0x003f, 0xa4da, 0x003f, - 0x003f, 0x003f, 0x003f, 0xa4db, 0x003f, 0x003f, 0x003f, 0xa4dc, - 0x003f, 0xa4dd, 0x003f, 0x003f, 0xa4de, 0xa4df, 0x003f, 0xa4e0, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa4e8, 0xa4ea, - 0xa4ec, 0x003f, 0xa4ed, 0xa4ef, 0x003f, 0x003f, 0xa4f0, 0x003f, - 0xa4b7, 0xa4f2, 0xa4f3, 0x003f, 0xa4f4, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa4f6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2000 .. 0x20ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1aa, 0x003f, 0x003f, - 0xa1ae, 0xa1af, 0x003f, 0x003f, 0xa1b0, 0xa1b1, 0x003f, 0x003f, - 0xa2d3, 0xa2d4, 0x003f, 0x003f, 0x003f, 0xa1a5, 0xa1a6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa2b6, 0x003f, 0xa1c7, 0xa1c8, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xa1d8, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa9f9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa9fa, - 0x003f, 0xa9fb, 0xa9fc, 0xa9fd, 0xa9fe, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x005c, 0x003f, 0x003f, 0xa2e6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2100 .. 0x21ff */ - 0x003f, 0x003f, 0x003f, 0xa1c9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa2b5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xa7a4, 0x003f, 0x003f, 0xa2e0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa2e5, 0xa2e2, 0x003f, 0x003f, 0x003f, 0xa7d9, 0x003f, - 0x003f, 0x003f, 0x003f, 0xa1ca, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xa8f7, 0xa8f8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xa8fb, 0xa8fc, 0xa8fd, 0xa8fe, 0x003f, - 0xa5b0, 0xa5b1, 0xa5b2, 0xa5b3, 0xa5b4, 0xa5b5, 0xa5b6, 0xa5b7, - 0xa5b8, 0xa5b9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa5a1, 0xa5a2, 0xa5a3, 0xa5a4, 0xa5a5, 0xa5a6, 0xa5a7, 0xa5a8, - 0xa5a9, 0xa5aa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa1e7, 0xa1e8, 0xa1e6, 0xa1e9, 0xa1ea, 0xa2d5, 0xa2d8, 0xa2d6, - 0xa2d9, 0xa2d7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa2a1, 0x003f, 0xa2a2, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2200 .. 0x22ff */ - 0xa2a3, 0x003f, 0xa1d3, 0xa2a4, 0x003f, 0x003f, 0x003f, 0xa1d4, - 0xa1f4, 0x003f, 0x003f, 0xa1f5, 0x003f, 0x003f, 0x003f, 0xa2b3, - 0x003f, 0xa2b2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa1ee, 0x003f, 0x003f, 0xa1f0, 0xa1c4, 0x003f, - 0xa1d0, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1ab, 0x003f, 0xa1fc, - 0xa1fd, 0xa1fb, 0xa1fa, 0xa1f2, 0xa1f3, 0x003f, 0xa2b1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa1c5, 0xa1f1, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa1ad, 0xa1ef, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa1d6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa1c1, 0xa1d5, 0x003f, 0x003f, 0xa1c2, 0xa1c3, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa1ec, 0xa1ed, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa1f8, 0xa1f9, 0x003f, 0x003f, 0xa1f6, 0xa1f7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa2c1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1d1, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2300 .. 0x23ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa1d2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2400 .. 0x24ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa8e7, 0xa8e8, 0xa8e9, 0xa8ea, 0xa8eb, 0xa8ec, 0xa8ed, 0xa8ee, - 0xa8ef, 0xa8f0, 0xa8f1, 0xa8f2, 0xa8f3, 0xa8f4, 0xa8f5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa9e7, 0xa9e8, 0xa9e9, 0xa9ea, - 0xa9eb, 0xa9ec, 0xa9ed, 0xa9ee, 0xa9ef, 0xa9f0, 0xa9f1, 0xa9f2, - 0xa9f3, 0xa9f4, 0xa9f5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa9cd, 0xa9ce, 0xa9cf, 0xa9d0, - 0xa9d1, 0xa9d2, 0xa9d3, 0xa9d4, 0xa9d5, 0xa9d6, 0xa9d7, 0xa9d8, - 0xa9d9, 0xa9da, 0xa9db, 0xa9dc, 0xa9dd, 0xa9de, 0xa9df, 0xa9e0, - 0xa9e1, 0xa9e2, 0xa9e3, 0xa9e4, 0xa9e5, 0xa9e6, 0xa8cd, 0xa8ce, - 0xa8cf, 0xa8d0, 0xa8d1, 0xa8d2, 0xa8d3, 0xa8d4, 0xa8d5, 0xa8d6, - 0xa8d7, 0xa8d8, 0xa8d9, 0xa8da, 0xa8db, 0xa8dc, 0xa8dd, 0xa8de, - 0xa8df, 0xa8e0, 0xa8e1, 0xa8e2, 0xa8e3, 0xa8e4, 0xa8e5, 0xa8e6, - 0xa8cd, 0xa8ce, 0xa8cf, 0xa8d0, 0xa8d1, 0xa8d2, 0xa8d3, 0xa8d4, - 0xa8d5, 0xa8d6, 0xa8d7, 0xa8d8, 0xa8d9, 0xa8da, 0xa8db, 0xa8dc, - 0xa8dd, 0xa8de, 0xa8df, 0xa8e0, 0xa8e1, 0xa8e2, 0xa8e3, 0xa8e4, - 0xa8e5, 0xa8e6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2500 .. 0x25ff */ - 0xa6a1, 0xa6ac, 0xa6a2, 0xa6ad, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa6a3, 0xa6c8, 0xa6c7, 0xa6ae, - 0xa6a4, 0xa6c2, 0xa6c1, 0xa6af, 0xa6a6, 0xa6c6, 0xa6c5, 0xa6b1, - 0xa6a5, 0xa6c4, 0xa6c3, 0xa6b0, 0xa6a7, 0xa6bc, 0xa6c9, 0xa6ca, - 0xa6b7, 0xa6cb, 0xa6cc, 0xa6b2, 0xa6a9, 0xa6be, 0xa6cd, 0xa6ce, - 0xa6b9, 0xa6cf, 0xa6d0, 0xa6b4, 0xa6a8, 0xa6d1, 0xa6d2, 0xa6b8, - 0xa6bd, 0xa6d3, 0xa6d4, 0xa6b3, 0xa6aa, 0xa6d5, 0xa6d6, 0xa6ba, - 0xa6bf, 0xa6d7, 0xa6d8, 0xa6b5, 0xa6ab, 0xa6d9, 0xa6da, 0xa6bb, - 0xa6db, 0xa6dc, 0xa6c0, 0xa6dd, 0xa6de, 0xa6df, 0xa6e0, 0xa6e1, - 0xa6e2, 0xa6e3, 0xa6e4, 0xa6b6, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa2c6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa1e1, 0xa1e0, 0x003f, 0xa2c3, 0xa2c7, 0xa2c8, 0xa2cb, 0xa2ca, - 0xa2c9, 0xa2cc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa1e3, 0xa1e2, 0x003f, 0x003f, 0xa2ba, 0xa2b9, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa1e5, 0xa1e4, 0x003f, 0x003f, - 0xa2b8, 0xa2b7, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1df, 0xa1de, - 0xa2c2, 0x003f, 0x003f, 0xa1db, 0x003f, 0x003f, 0xa1dd, 0xa1dc, - 0xa2c4, 0xa2c5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2600 .. 0x26ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1da, 0xa1d9, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa2cf, 0xa2ce, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa2d0, 0x003f, 0xa2d1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa1cf, 0x003f, 0xa1ce, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa2bc, 0xa2bd, 0x003f, 0xa2c0, 0xa2bb, 0xa2be, 0x003f, 0xa2bf, - 0xa2cd, 0xa2db, 0xa2dc, 0x003f, 0xa2dd, 0xa2da, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x3000 .. 0x30ff */ - 0xa1a1, 0xa1a2, 0xa1a3, 0xa1a8, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa1b4, 0xa1b5, 0xa1b6, 0xa1b7, 0xa1b8, 0xa1b9, 0xa1ba, 0xa1bb, - 0xa1bc, 0xa1bd, 0x003f, 0xa1eb, 0xa1b2, 0xa1b3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xaaa1, 0xaaa2, 0xaaa3, 0xaaa4, 0xaaa5, 0xaaa6, 0xaaa7, - 0xaaa8, 0xaaa9, 0xaaaa, 0xaaab, 0xaaac, 0xaaad, 0xaaae, 0xaaaf, - 0xaab0, 0xaab1, 0xaab2, 0xaab3, 0xaab4, 0xaab5, 0xaab6, 0xaab7, - 0xaab8, 0xaab9, 0xaaba, 0xaabb, 0xaabc, 0xaabd, 0xaabe, 0xaabf, - 0xaac0, 0xaac1, 0xaac2, 0xaac3, 0xaac4, 0xaac5, 0xaac6, 0xaac7, - 0xaac8, 0xaac9, 0xaaca, 0xaacb, 0xaacc, 0xaacd, 0xaace, 0xaacf, - 0xaad0, 0xaad1, 0xaad2, 0xaad3, 0xaad4, 0xaad5, 0xaad6, 0xaad7, - 0xaad8, 0xaad9, 0xaada, 0xaadb, 0xaadc, 0xaadd, 0xaade, 0xaadf, - 0xaae0, 0xaae1, 0xaae2, 0xaae3, 0xaae4, 0xaae5, 0xaae6, 0xaae7, - 0xaae8, 0xaae9, 0xaaea, 0xaaeb, 0xaaec, 0xaaed, 0xaaee, 0xaaef, - 0xaaf0, 0xaaf1, 0xaaf2, 0xaaf3, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xaba1, 0xaba2, 0xaba3, 0xaba4, 0xaba5, 0xaba6, 0xaba7, - 0xaba8, 0xaba9, 0xabaa, 0xabab, 0xabac, 0xabad, 0xabae, 0xabaf, - 0xabb0, 0xabb1, 0xabb2, 0xabb3, 0xabb4, 0xabb5, 0xabb6, 0xabb7, - 0xabb8, 0xabb9, 0xabba, 0xabbb, 0xabbc, 0xabbd, 0xabbe, 0xabbf, - 0xabc0, 0xabc1, 0xabc2, 0xabc3, 0xabc4, 0xabc5, 0xabc6, 0xabc7, - 0xabc8, 0xabc9, 0xabca, 0xabcb, 0xabcc, 0xabcd, 0xabce, 0xabcf, - 0xabd0, 0xabd1, 0xabd2, 0xabd3, 0xabd4, 0xabd5, 0xabd6, 0xabd7, - 0xabd8, 0xabd9, 0xabda, 0xabdb, 0xabdc, 0xabdd, 0xabde, 0xabdf, - 0xabe0, 0xabe1, 0xabe2, 0xabe3, 0xabe4, 0xabe5, 0xabe6, 0xabe7, - 0xabe8, 0xabe9, 0xabea, 0xabeb, 0xabec, 0xabed, 0xabee, 0xabef, - 0xabf0, 0xabf1, 0xabf2, 0xabf3, 0xabf4, 0xabf5, 0xabf6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x3100 .. 0x31ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa4a1, 0xa4a2, 0xa4a3, 0xa4a4, 0xa4a5, 0xa4a6, 0xa4a7, - 0xa4a8, 0xa4a9, 0xa4aa, 0xa4ab, 0xa4ac, 0xa4ad, 0xa4ae, 0xa4af, - 0xa4b0, 0xa4b1, 0xa4b2, 0xa4b3, 0xa4b4, 0xa4b5, 0xa4b6, 0xa4b7, - 0xa4b8, 0xa4b9, 0xa4ba, 0xa4bb, 0xa4bc, 0xa4bd, 0xa4be, 0xa4bf, - 0xa4c0, 0xa4c1, 0xa4c2, 0xa4c3, 0xa4c4, 0xa4c5, 0xa4c6, 0xa4c7, - 0xa4c8, 0xa4c9, 0xa4ca, 0xa4cb, 0xa4cc, 0xa4cd, 0xa4ce, 0xa4cf, - 0xa4d0, 0xa4d1, 0xa4d2, 0xa4d3, 0xa4d4, 0xa4d5, 0xa4d6, 0xa4d7, - 0xa4d8, 0xa4d9, 0xa4da, 0xa4db, 0xa4dc, 0xa4dd, 0xa4de, 0xa4df, - 0xa4e0, 0xa4e1, 0xa4e2, 0xa4e3, 0xa4e4, 0xa4e5, 0xa4e6, 0xa4e7, - 0xa4e8, 0xa4e9, 0xa4ea, 0xa4eb, 0xa4ec, 0xa4ed, 0xa4ee, 0xa4ef, - 0xa4f0, 0xa4f1, 0xa4f2, 0xa4f3, 0xa4f4, 0xa4f5, 0xa4f6, 0xa4f7, - 0xa4f8, 0xa4f9, 0xa4fa, 0xa4fb, 0xa4fc, 0xa4fd, 0xa4fe, 0x003f, - 0x003f, 0x003f, 0xece9, 0xeca3, 0xdfb2, 0xdecc, 0xdfbe, 0xf1e9, - 0xf9bb, 0xcba3, 0xebe0, 0xdcb0, 0xefcb, 0xf4b8, 0xf2a2, 0xecd1, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x3200 .. 0x32ff */ - 0xa9b1, 0xa9b2, 0xa9b3, 0xa9b4, 0xa9b5, 0xa9b6, 0xa9b7, 0xa9b8, - 0xa9b9, 0xa9ba, 0xa9bb, 0xa9bc, 0xa9bd, 0xa9be, 0xa9bf, 0xa9c0, - 0xa9c1, 0xa9c2, 0xa9c3, 0xa9c4, 0xa9c5, 0xa9c6, 0xa9c7, 0xa9c8, - 0xa9c9, 0xa9ca, 0xa9cb, 0xa9cc, 0xa2df, 0x003f, 0x003f, 0x003f, - 0xece9, 0xeca3, 0xdfb2, 0xdecc, 0xe7e9, 0xd7bf, 0xf6d2, 0xf8a2, - 0xcefa, 0xe4a8, 0xeac5, 0xfbfd, 0xe2a9, 0xd9ca, 0xd1d1, 0xf7cf, - 0xeced, 0xf1bb, 0xeaf3, 0xdee4, 0xd9a3, 0xf7e5, 0xeeaf, 0xf5e6, - 0xd6cc, 0xd3db, 0xfbbc, 0xf9ca, 0xcaf8, 0xd0ea, 0xedc0, 0xfaf0, - 0xf0ae, 0xfdcc, 0xedbb, 0xf2b8, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa8b1, 0xa8b2, 0xa8b3, 0xa8b4, 0xa8b5, 0xa8b6, 0xa8b7, 0xa8b8, - 0xa8b9, 0xa8ba, 0xa8bb, 0xa8bc, 0xa8bd, 0xa8be, 0xa8bf, 0xa8c0, - 0xa8c1, 0xa8c2, 0xa8c3, 0xa8c4, 0xa8c5, 0xa8c6, 0xa8c7, 0xa8c8, - 0xa8c9, 0xa8ca, 0xa8cb, 0xa8cc, 0x003f, 0x003f, 0x003f, 0xa2de, - 0xece9, 0xeca3, 0xdfb2, 0xdecc, 0xe7e9, 0xd7bf, 0xf6d2, 0xf8a2, - 0xcefa, 0xe4a8, 0xeac5, 0xfbfd, 0xe2a9, 0xd9ca, 0xd1d1, 0xf7cf, - 0xeced, 0xf1bb, 0xeaf3, 0xdee4, 0xd9a3, 0xf7e5, 0xeeaf, 0xf5e6, - 0xd6cc, 0xddfa, 0xd1fb, 0xd2b3, 0xeeea, 0xe9d0, 0xecd4, 0xf1bc, - 0xfaa3, 0xfdcc, 0xded0, 0xefe1, 0xdfbe, 0xf1e9, 0xf9bb, 0xf1a7, - 0xe9d3, 0xeca2, 0xf0f3, 0xf9ca, 0xcaf8, 0xd0ea, 0xedc0, 0xfaf0, - 0xe5a8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x3300 .. 0x33ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa7c9, 0xa7ca, 0xa7cb, 0xa7cc, 0xa7cd, 0x003f, 0x003f, 0x003f, - 0xa7ba, 0xa7bb, 0xa7dc, 0xa7dd, 0xa7de, 0xa7b6, 0xa7b7, 0xa7b8, - 0xa7d4, 0xa7d5, 0xa7d6, 0xa7d7, 0xa7d8, 0xa7a1, 0xa7a2, 0xa7a3, - 0xa7a5, 0xa7ab, 0xa7ac, 0xa7ad, 0xa7ae, 0xa7af, 0xa7b0, 0xa7b1, - 0xa7b2, 0xa7b3, 0xa7b4, 0xa7a7, 0xa7a8, 0xa7a9, 0xa7aa, 0xa7bd, - 0xa7be, 0xa7e5, 0xa7e6, 0xa7e7, 0xa7e8, 0xa7e1, 0xa7e2, 0xa7e3, - 0xa7bf, 0xa7c0, 0xa7c1, 0xa7c2, 0xa7c3, 0xa7c4, 0xa7c5, 0xa7c6, - 0xa7c7, 0xa7c8, 0xa7ce, 0xa7cf, 0xa7d0, 0xa7d1, 0xa7d2, 0xa7d3, - 0xa7da, 0xa7db, 0xa2e3, 0xa7ec, 0xa7a6, 0xa7e0, 0xa7ef, 0xa2e1, - 0xa7bc, 0xa7ed, 0xa7b5, 0x003f, 0x003f, 0x003f, 0x003f, 0xa7b9, - 0xa7ea, 0x003f, 0x003f, 0xa7eb, 0x003f, 0x003f, 0xa7df, 0x003f, - 0xa2e4, 0x003f, 0x003f, 0xa7e4, 0xa7ee, 0xa7e9, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x4e00 .. 0x4eff */ - 0xece9, 0xefcb, 0x003f, 0xf6d2, 0x003f, 0x003f, 0x003f, 0xd8b2, - 0xeddb, 0xdfb2, 0xdfbe, 0xf9bb, 0x003f, 0xdcf4, 0x003f, 0x003f, - 0x003f, 0xf5e4, 0x003f, 0x003f, 0xf3a6, 0xdde0, 0xe1a6, 0x003f, - 0xcef8, 0xdcb0, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3aa, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1e9, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcdfa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xfcaf, 0xd3a1, 0x003f, 0xf1ab, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe7d1, 0xd2ac, 0x003f, 0xcef9, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf1fd, 0x003f, 0xdebf, 0xfbba, 0xf9b9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xced2, 0x003f, - 0xe3ab, 0xebe0, 0x003f, 0x003f, 0x003f, 0xcefa, 0xcbf7, 0xe5a5, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcae1, 0x003f, 0xd4cc, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xeae1, 0x003f, 0x003f, 0xdce3, 0xdfad, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcbeb, 0x003f, - 0x003f, 0x003f, 0xd5af, 0x003f, 0x003f, 0x003f, 0xd6f5, 0x003f, - 0xe5f8, 0x003f, 0x003f, 0xdec0, 0xeca3, 0x003f, 0xe9cd, 0x003f, - 0xeaa7, 0xe9f6, 0xfbbb, 0x003f, 0xe7e9, 0xefcc, 0x003f, 0x003f, - 0xd0e6, 0x003f, 0x003f, 0xdec1, 0x003f, 0x003f, 0xe4ac, 0x003f, - 0x003f, 0xd8cc, 0xf9f1, 0x003f, 0xcedf, 0xfaa4, 0xe6b2, 0x003f, - 0xfafb, 0x003f, 0x003f, 0xfabd, 0xccc8, 0xefcd, 0xd5d5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd3a2, 0x003f, - 0x003f, 0x003f, 0xecd1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe4a7, 0xecd2, 0x003f, 0x003f, 0xf6b1, 0x003f, 0x003f, 0xcefb, - 0x003f, 0x003f, 0xd0d1, 0xcbbf, 0x003f, 0xeda4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xeda8, 0xdec2, 0xf6e2, 0xeddc, - 0xdcf5, 0xe0b9, 0x003f, 0x003f, 0x003f, 0xd4ce, 0x003f, 0xf4b5, - 0x003f, 0x003f, 0x003f, 0xd3db, 0xd6b5, 0xeca4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe4e6, 0x003f, 0xf1ea, 0x003f, 0x003f, 0x003f, 0xcbec, 0xcbc0, - 0x003f, 0x003f, 0x003f, 0xecf2, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x4f00 .. 0x4fff */ - 0x003f, 0xd0ea, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf9f2, 0xeca5, 0xd0df, 0x003f, 0xe7ea, 0xd0eb, 0xdcd1, - 0xdbe9, 0xfdcc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdbd7, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdae1, 0x003f, 0xd6b6, 0x003f, - 0xe3df, 0x003f, 0xdec3, 0x003f, 0xdec4, 0xcaa1, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xeeec, 0x003f, 0x003f, 0xd3a3, 0xeeb7, - 0xf8cf, 0x003f, 0x003f, 0x003f, 0x003f, 0xeac8, 0xeeb8, 0xf1ac, - 0xf1a5, 0xe9ce, 0x003f, 0x003f, 0x003f, 0xf9bc, 0x003f, 0x003f, - 0x003f, 0xe5f9, 0xecea, 0xddd6, 0xedc2, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf8a5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5ba, - 0xdbd8, 0x003f, 0x003f, 0xcaa2, 0x003f, 0x003f, 0xd1cd, 0x003f, - 0x003f, 0x003f, 0xeeed, 0x003f, 0x003f, 0x003f, 0xeceb, 0xdec5, - 0x003f, 0xe3e0, 0x003f, 0xcac9, 0xf2e9, 0x003f, 0xd5ce, 0x003f, - 0xf6b6, 0x003f, 0xcec2, 0xd6c7, 0x003f, 0xe3b4, 0x003f, 0xf1ad, - 0x003f, 0xeae2, 0x003f, 0x003f, 0x003f, 0x003f, 0xd7c2, 0x003f, - 0xf3a7, 0x003f, 0x003f, 0xcdea, 0x003f, 0xebee, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9b2, 0xfda5, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf6d5, 0xd5e2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf8b5, - 0x003f, 0x003f, 0xccf5, 0xf5b5, 0xe4ad, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe7eb, 0xf1d5, 0x003f, 0x003f, 0x003f, 0xf0bb, 0x003f, - 0x003f, 0xe9b5, 0x003f, 0xccc9, 0xfad5, 0x003f, 0x003f, 0xe1d4, - 0x003f, 0x003f, 0xd7d6, 0x003f, 0x003f, 0xdcc1, 0x003f, 0xdec6, - 0xfaef, 0xe3e1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1f3, 0xdcf6, - 0x003f, 0xcefc, 0x003f, 0xdbc4, 0x003f, 0xf8f1, 0x003f, 0x003f, - 0xdce4, 0x003f, 0xe5ef, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x5000 .. 0x50ff */ - 0x003f, 0x003f, 0xdcb1, 0x003f, 0x003f, 0x003f, 0xd5d6, 0x003f, - 0x003f, 0xf3da, 0x003f, 0xcbc1, 0x003f, 0xdbc3, 0x003f, 0x003f, - 0x003f, 0xd9fa, 0xd3ee, 0x003f, 0x003f, 0x003f, 0xfab8, 0x003f, - 0x003f, 0xfda6, 0xebef, 0x003f, 0xf4a6, 0x003f, 0xccca, 0xf3a8, - 0x003f, 0xf3db, 0x003f, 0xdba7, 0xf6b7, 0x003f, 0xcfe6, 0xf0f2, - 0xcbda, 0x003f, 0xe7d2, 0xd7c3, 0xf6f0, 0xe8de, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe5a6, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe5e7, 0x003f, 0x003f, 0x003f, 0xcaa3, - 0xcca7, 0xeac9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf8b6, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfaa5, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf1ae, 0x003f, 0xefce, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcbed, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf6b0, 0xefcf, 0xe9cf, 0x003f, - 0xf7de, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xced3, 0x003f, 0x003f, 0x003f, 0x003f, 0xdcf7, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdba8, 0x003f, 0x003f, - 0x003f, 0xcbf8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdfa1, 0xdde1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf5ca, 0xe9b6, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe7ec, 0xeeee, 0x003f, 0xf3f0, 0x003f, 0xdfbf, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcccb, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd0c1, 0x003f, 0x003f, - 0x003f, 0xf4d2, 0xe0ba, 0x003f, 0x003f, 0x003f, 0x003f, 0xdfc0, - 0x003f, 0xcee0, 0x003f, 0x003f, 0x003f, 0xdcd2, 0xfdea, 0x003f, - 0x003f, 0x003f, 0xd6f6, 0x003f, 0x003f, 0x003f, 0xeaca, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8e9, 0x003f, 0xe3ac, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3d0, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcaa4, 0x003f, 0xdbf8, 0x003f, 0x003f, 0x003f, 0xdec7, - /* 0x5100 .. 0x51ff */ - 0xebf0, 0xf1d6, 0x003f, 0x003f, 0xe5e2, 0x003f, 0xcccc, 0x003f, - 0x003f, 0xcbfb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeae3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdfc1, - 0x003f, 0xd6ed, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe9d0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeeb9, 0x003f, 0x003f, 0x003f, 0x003f, 0xd5e3, - 0x003f, 0x003f, 0xd1d3, 0x003f, 0xe5f0, 0x003f, 0x003f, 0x003f, - 0xe8b4, 0xebc3, 0x003f, 0xeaaa, 0xfafc, 0xf5f6, 0xf0bc, 0xfdd4, - 0xe0bb, 0xcec3, 0x003f, 0xd0ba, 0xf7ba, 0xd8f3, 0xf7cd, 0x003f, - 0x003f, 0x003f, 0xe4ae, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd4df, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd0e7, 0x003f, 0x003f, 0xecfd, 0x003f, 0xd2ae, - 0xeeef, 0xd5d7, 0xeae4, 0xf8a2, 0xcdeb, 0xd7bf, 0xfbb1, 0x003f, - 0x003f, 0xcdec, 0x003f, 0x003f, 0x003f, 0xdcb2, 0xd0ec, 0xcefd, - 0xeef0, 0x003f, 0x003f, 0x003f, 0xccc2, 0x003f, 0x003f, 0x003f, - 0xd0ed, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5f7, 0x003f, - 0x003f, 0x003f, 0xf3fc, 0x003f, 0x003f, 0xeea2, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd9b3, 0x003f, 0x003f, 0xd8f4, 0x003f, 0xe9b7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xceae, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9a2, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd8f1, 0x003f, 0xd4cf, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5a7, 0xd5d2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd6a9, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf4a2, 0x003f, 0xf1d7, 0x003f, - 0x003f, 0xd5d8, 0x003f, 0xf0bd, 0xd7d0, 0xd4d0, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd7cf, 0xebea, 0xfdeb, 0x003f, - 0x003f, 0xdbed, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xfcc5, 0xcbc2, 0x003f, 0x003f, 0x003f, 0x003f, 0xfdd5, 0x003f, - 0xf4c8, 0xe8ea, 0xf5f3, 0x003f, 0x003f, 0xf9de, 0x003f, 0x003f, - /* 0x5200 .. 0x52ff */ - 0xd3ef, 0x003f, 0x003f, 0xecd3, 0x003f, 0x003f, 0xddc2, 0xefb7, - 0xe7d4, 0x003f, 0xcaca, 0x003f, 0x003f, 0x003f, 0xd9fb, 0x003f, - 0x003f, 0xfafd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd6aa, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4f8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf7f7, 0xdcac, 0x003f, 0x003f, - 0x003f, 0xd7d7, 0xdfa2, 0x003f, 0x003f, 0x003f, 0xcebe, 0x003f, - 0xd3f0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf0a4, 0xe1ec, - 0xcfe7, 0xf3cb, 0xeda9, 0xcabe, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf4ef, 0x003f, 0x003f, 0x003f, 0xf6ce, - 0x003f, 0x003f, 0xdefb, 0xd0bb, 0xd5b7, 0xeef1, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf4a8, 0x003f, 0xdcf8, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcba7, 0x003f, 0xdace, 0x003f, 0x003f, - 0x003f, 0xe0e6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeda5, 0xeef2, 0x003f, 0x003f, 0x003f, 0x003f, 0xdcf9, - 0x003f, 0x003f, 0xf9dc, 0x003f, 0x003f, 0xf3dc, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf8f2, 0x003f, 0xf4f9, - 0x003f, 0x003f, 0x003f, 0xfcf1, 0x003f, 0x003f, 0x003f, 0xd0bc, - 0xdbf9, 0xd7b1, 0x003f, 0x003f, 0x003f, 0xcbfc, 0x003f, 0x003f, - 0x003f, 0xf0a5, 0xcbfd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd5f4, 0x003f, 0x003f, 0x003f, 0xcded, - 0xcaa5, 0x003f, 0x003f, 0xd6ab, 0xd0c2, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf0be, 0xd2bd, 0xcca4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfab6, 0x003f, - 0x003f, 0xcccd, 0x003f, 0xdafa, 0x003f, 0xf6cf, 0x003f, 0xe9b8, - 0x003f, 0xd8f5, 0x003f, 0x003f, 0x003f, 0xccce, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd7cd, 0x003f, 0x003f, 0xd4d1, 0xe9ed, 0x003f, - 0xcaeb, 0xd9e2, 0x003f, 0xfdb2, 0x003f, 0xe3ad, 0xd6cc, 0xd9b4, - 0x003f, 0x003f, 0xe1a7, 0xeed3, 0xd0c3, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfdb3, 0x003f, 0xd5e4, 0x003f, 0x003f, - 0xcfe8, 0x003f, 0xedc3, 0xd0b2, 0x003f, 0x003f, 0xcefe, 0xdaa8, - /* 0x5300 .. 0x53ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf8d0, 0x003f, 0x003f, - 0xfdd6, 0x003f, 0x003f, 0x003f, 0x003f, 0xf8d1, 0x003f, 0xf8d2, - 0xdcd3, 0x003f, 0x003f, 0x003f, 0x003f, 0xdde2, 0xfbf9, 0xddc1, - 0x003f, 0xe3b5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeddd, 0xcec4, 0x003f, 0xcba1, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdde3, 0x003f, 0x003f, 0x003f, 0x003f, 0xfcdd, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf9af, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd2fb, - 0xcfa1, 0xe4a8, 0x003f, 0xf4b6, 0xecfe, 0x003f, 0x003f, 0xe3ae, - 0xe7ed, 0xfdc1, 0xdae2, 0x003f, 0x003f, 0xd8b3, 0x003f, 0x003f, - 0x003f, 0xdde4, 0xf0ef, 0xf6f1, 0xfaf0, 0x003f, 0x003f, 0xd1f5, - 0x003f, 0x003f, 0xdacf, 0x003f, 0xdcd4, 0x003f, 0xdca6, 0x003f, - 0xefbf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcecf, 0x003f, - 0xe0d9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9d6, - 0xecd4, 0xeacb, 0x003f, 0x003f, 0xcabf, 0xd5b0, 0x003f, 0xcfe9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1ed, 0x003f, 0xcccf, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe4f8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe4ed, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd7d8, 0x003f, 0xfda7, 0x003f, 0x003f, 0x003f, 0x003f, 0xeaab, - 0xf6b2, 0x003f, 0x003f, 0x003f, 0x003f, 0xcff0, 0xf9bd, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6f4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcbdb, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf3d1, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe9d1, 0xf3a9, 0xd0e0, 0xe9d2, 0x003f, 0xdae3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe2d2, 0x003f, 0xf6a2, 0xe1f4, - 0x003f, 0x003f, 0x003f, 0xdae4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe7d5, 0xf5bf, 0xcfa2, 0xcdaf, 0xcfa3, 0x003f, 0x003f, - 0x003f, 0xcdb0, 0xf1fe, 0xd0a3, 0xe1af, 0xf8a3, 0x003f, 0xcaa6, - 0xf7bb, 0xf2ea, 0xdec8, 0xe9d3, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdec9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x5400 .. 0x54ff */ - 0x003f, 0x003f, 0x003f, 0xfdde, 0xcac0, 0x003f, 0x003f, 0x003f, - 0xf9ea, 0xd1ce, 0xeed4, 0x003f, 0xd4d2, 0xd9a3, 0xfda8, 0xd7d9, - 0xf7ce, 0xfabe, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcfd6, 0x003f, 0xd7f0, 0x003f, 0xebe1, - 0xf8c5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdcfa, 0x003f, - 0x003f, 0xddc3, 0x003f, 0xf9df, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe7ef, 0x003f, 0x003f, 0x003f, 0x003f, - 0xfde5, 0xf6a3, 0x003f, 0xd9fc, 0xfda9, 0x003f, 0xe7ee, 0x003f, - 0x003f, 0x003f, 0xd5e5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xefd0, 0x003f, 0xcdb1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf7a2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf1b2, 0x003f, 0xf1b1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcdb2, 0x003f, 0xdaab, 0x003f, 0xcaa7, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe3e2, 0xfbbc, 0xd9a4, 0x003f, 0x003f, - 0xeeba, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf8d3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xfbfa, 0x003f, 0xcfa4, 0x003f, - 0xdcfb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf6e3, 0x003f, 0x003f, 0x003f, - 0xedaa, 0x003f, 0x003f, 0xf2a1, 0xcee1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfaa6, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf9e0, 0x003f, 0x003f, 0x003f, 0x003f, 0xecd6, 0x003f, 0x003f, - 0xe4ee, 0xf9a1, 0x003f, 0x003f, 0xfbef, 0x003f, 0x003f, 0x003f, - 0xf9eb, 0xeea3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeaac, 0x003f, 0x003f, 0x003f, 0xcaa8, 0x003f, 0x003f, - 0xf4fa, 0x003f, 0x003f, 0x003f, 0x003f, 0xcdd6, 0xfcf6, 0x003f, - 0x003f, 0x003f, 0xf4c9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf8d4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x5500 .. 0x55ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0xf8a6, 0x003f, 0xdeca, 0xf2c6, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd7da, 0x003f, - 0xd3d0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd8c5, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeae6, - 0x003f, 0xf3dd, 0x003f, 0x003f, 0x003f, 0xe4da, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf6e4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf6f2, 0x003f, 0xdfc2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9fd, - 0x003f, 0x003f, 0x003f, 0xccf6, 0x003f, 0x003f, 0xd3ba, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4af, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf9e1, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf0a6, 0x003f, 0x003f, 0x003f, - 0xcbd3, 0x003f, 0x003f, 0x003f, 0xe0bc, 0x003f, 0xf4ca, 0xd4fa, - 0x003f, 0xfdaa, 0xf9e2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf4b7, 0xfdc2, 0xfcb0, 0x003f, 0xfdec, 0xcae2, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfdbd, - 0x003f, 0xeae7, 0xdfc3, 0xd1d2, 0xcee2, 0x003f, 0xd3a4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfdab, 0x003f, 0xdfe0, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf2c7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe7f0, 0x003f, 0xd0ee, 0x003f, 0x003f, 0xf3aa, - 0x003f, 0x003f, 0x003f, 0xdecb, 0xf6b8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1f5, 0xf1b3, 0x003f, - /* 0x5600 .. 0x56ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf7a3, 0x003f, - 0x003f, 0xcaa9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcfa5, 0x003f, 0x003f, 0xdfc4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1b0, - 0x003f, 0x003f, 0xf0bf, 0x003f, 0xf6a4, 0x003f, 0xe3b6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfac6, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd0ef, 0x003f, 0x003f, 0xfded, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xddc4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfcf7, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6bf, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdead, 0x003f, 0xfabf, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe5f1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xedc4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd2a5, 0x003f, 0x003f, 0xfdee, 0x003f, 0x003f, - 0x003f, 0xf5b6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe1f6, 0xdecc, 0x003f, 0x003f, 0xfcde, 0x003f, - 0xecd7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcddd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd6b7, 0xcdb3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x5700 .. 0x57ff */ - 0x003f, 0x003f, 0x003f, 0xf8d5, 0xe5d8, 0x003f, 0x003f, 0x003f, - 0xcfea, 0x003f, 0x003f, 0xcfd0, 0x003f, 0xeacc, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeaae, 0xeaad, 0x003f, 0x003f, 0xd3f1, 0x003f, - 0xd3a5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf7cf, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeea4, 0x003f, 0x003f, 0x003f, 0x003f, 0xd0a4, 0x003f, 0x003f, - 0xf2a2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd0f0, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf2a3, 0x003f, 0xf7f8, 0x003f, 0x003f, 0x003f, 0x003f, 0xd0b3, - 0x003f, 0x003f, 0xdba9, 0x003f, 0x003f, 0xd3bb, 0xcaec, 0x003f, - 0xf1a6, 0xcbd5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf7e7, 0x003f, 0x003f, 0xcdde, 0x003f, 0xf7a4, 0x003f, - 0x003f, 0x003f, 0xf8c0, 0x003f, 0x003f, 0x003f, 0xd3dd, 0x003f, - 0xccd0, 0x003f, 0x003f, 0x003f, 0x003f, 0xcfa6, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf6f3, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe1f7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd3dc, 0x003f, 0x003f, 0xfafe, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfaa7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xebd9, 0x003f, 0xcfa7, 0xeaaf, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe4ef, 0x003f, 0x003f, 0x003f, 0xe9b9, - 0xf1d8, 0x003f, 0x003f, 0xd8d8, 0x003f, 0x003f, 0xe0f2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6b4, - 0xdcfc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf3f1, 0x003f, 0x003f, 0x003f, 0xe3d0, 0x003f, 0x003f, 0xf2fb, - 0x003f, 0xdbc6, 0xd0f1, 0x003f, 0xd0f2, 0x003f, 0x003f, 0x003f, - /* 0x5800 .. 0x58ff */ - 0xcfdc, 0x003f, 0xd3d1, 0x003f, 0x003f, 0xccb1, 0xf7d8, 0x003f, - 0xcba8, 0xebbc, 0xe4be, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4dc, 0x003f, - 0x003f, 0xdcc2, 0x003f, 0x003f, 0xf0a7, 0x003f, 0x003f, 0xe6c0, - 0x003f, 0x003f, 0xcaed, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8eb, - 0xe5e8, 0xdcc3, 0x003f, 0x003f, 0xedde, 0xd3f2, 0x003f, 0x003f, - 0x003f, 0x003f, 0xccf7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xced4, 0xe7ab, 0x003f, 0x003f, 0x003f, 0xcbc3, - 0x003f, 0xe1b1, 0x003f, 0x003f, 0xf7b2, 0x003f, 0x003f, 0xd3f3, - 0xd3d2, 0x003f, 0xf5c0, 0x003f, 0x003f, 0x003f, 0xdfdd, 0x003f, - 0x003f, 0xeef3, 0xe7f1, 0x003f, 0xfdb4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2c8, 0x003f, 0x003f, - 0x003f, 0xf3d2, 0x003f, 0x003f, 0xeef4, 0x003f, 0xe2d3, 0x003f, - 0x003f, 0x003f, 0x003f, 0xccd1, 0x003f, 0xdfea, 0x003f, 0x003f, - 0x003f, 0xe9ba, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd9d7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf5cd, 0x003f, 0xf1f2, 0xfac7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd9f8, 0xd4c2, 0x003f, 0x003f, 0x003f, 0x003f, 0xf6e5, 0x003f, - 0x003f, 0x003f, 0x003f, 0xddc5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe7f2, 0xeddf, 0x003f, 0x003f, 0xcacb, 0x003f, - 0x003f, 0xdbfa, 0x003f, 0x003f, 0x003f, 0xe8b5, 0x003f, 0xd3a6, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfdb5, 0x003f, - 0x003f, 0xf9c9, 0x003f, 0xe4e2, 0x003f, 0xfbbd, 0x003f, 0x003f, - 0xd7a4, 0xcec5, 0x003f, 0x003f, 0x003f, 0x003f, 0xced5, 0xd6e6, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe5bd, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdecd, 0xecf3, 0x003f, 0x003f, 0xede0, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xecec, 0xfbbe, 0xdfeb, 0x003f, 0xe1f8, 0x003f, 0x003f, - /* 0x5900 .. 0x59ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf9be, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd0f3, 0xe0aa, 0xe8e2, 0x003f, - 0x003f, 0xe2d4, 0xd2fd, 0x003f, 0xe5a8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd9d3, 0x003f, 0x003f, 0x003f, 0x003f, 0xd3de, - 0x003f, 0xf4b8, 0xf7bc, 0xdcfd, 0x003f, 0xe8ec, 0xe4e7, 0x003f, - 0x003f, 0xe3f7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeca8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfaf1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe5f2, 0x003f, 0x003f, 0xd0f4, - 0xd2af, 0xdce5, 0x003f, 0x003f, 0x003f, 0x003f, 0xd0a5, 0xf1b4, - 0xfcb1, 0xccf8, 0x003f, 0x003f, 0xddc6, 0xfad1, 0x003f, 0xf7df, - 0x003f, 0x003f, 0xfaa8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeef5, 0x003f, 0xdece, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7f3, - 0x003f, 0x003f, 0xf7ac, 0xebc4, 0xede1, 0xe0ab, 0xddc7, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd2b3, 0xd2bf, 0x003f, 0x003f, 0x003f, - 0xcacc, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbbf, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe5fd, 0xdde5, 0xd8cd, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xecf4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd0f5, 0x003f, 0x003f, 0xe8ed, 0xd0d2, - 0x003f, 0xd9d8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf6e6, 0x003f, 0x003f, - 0xdbaa, 0x003f, 0x003f, 0x003f, 0xf7e0, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd8d9, 0x003f, 0xf4a3, 0x003f, 0x003f, 0xf4dd, 0x003f, - 0x003f, 0x003f, 0x003f, 0xefd1, 0x003f, 0x003f, 0xd9b5, 0x003f, - 0x003f, 0xedab, 0x003f, 0xe3b7, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeebb, 0xcdb4, 0x003f, 0xe0f3, 0xeacd, 0x003f, 0x003f, 0x003f, - 0x003f, 0xecf5, 0xe8ee, 0x003f, 0xcba9, 0xf1af, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcacd, 0x003f, - 0xeca9, 0x003f, 0xf2eb, 0x003f, 0xfdef, 0x003f, 0xf9f3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe6c1, 0x003f, 0x003f, 0xecd8, 0x003f, 0x003f, 0x003f, 0xedac, - /* 0x5a00 .. 0x5aff */ - 0x003f, 0xeace, 0x003f, 0xe8df, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdecf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd2a6, 0x003f, 0x003f, 0xe7f4, 0xd1d6, 0x003f, 0x003f, 0xe6c2, - 0xe3e3, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4b0, 0x003f, 0x003f, - 0x003f, 0xd8b4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf6a5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf3de, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd7a5, 0x003f, 0x003f, 0x003f, 0x003f, 0xf7e8, 0x003f, - 0x003f, 0xe8c6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xfbe6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdde6, 0x003f, 0x003f, 0x003f, 0xdcfe, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd8da, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdaac, 0xeab0, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe3b8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcaaa, 0xe1f9, 0x003f, 0xeab1, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf2ec, 0x003f, 0x003f, 0xfaee, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeed5, 0x003f, 0x003f, 0x003f, 0x003f, 0xf9f4, 0x003f, - 0x003f, 0xd2ec, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x5b00 .. 0x5bff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbfb, 0x003f, 0x003f, - 0x003f, 0xfdf0, 0x003f, 0xe0bd, 0xcee3, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf8c6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdeae, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdfc5, 0x003f, 0x003f, 0xe5be, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xedad, 0xfaea, 0x003f, 0x003f, 0xcdee, 0xeda6, 0x003f, 0xedae, - 0xf0ed, 0x003f, 0xdda1, 0x003f, 0xedaf, 0xfcf8, 0x003f, 0xd8eb, - 0x003f, 0x003f, 0x003f, 0xccf9, 0xcdb5, 0x003f, 0x003f, 0x003f, - 0x003f, 0xfaa9, 0x003f, 0xe1dd, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe2d5, 0xedcf, 0x003f, 0x003f, 0x003f, 0xdda2, 0x003f, 0x003f, - 0xf9ca, 0x003f, 0xeae8, 0x003f, 0xe5ed, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd3eb, 0x003f, 0xe9d4, - 0xe1fa, 0xe4cc, 0x003f, 0xe1e4, 0xe8c7, 0x003f, 0x003f, 0xcedb, - 0x003f, 0x003f, 0x003f, 0xdcd5, 0x003f, 0xf7b5, 0xfcf3, 0xf0f3, - 0xceaf, 0xf1b5, 0xefd2, 0xe8c8, 0xebf1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcbd4, 0xe0be, 0xe3f8, 0xeae9, 0xfcb2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe0f4, 0x003f, 0xcfe0, 0x003f, - 0xeea5, 0x003f, 0x003f, 0xfaaa, 0xe6c3, 0xe1b2, 0xcaab, 0x003f, - 0xe3e4, 0xe9bb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2d6, - 0xf3f2, 0x003f, 0xeed6, 0xeab2, 0xd0f6, 0xecd9, 0xdacb, 0xcfa8, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdda3, 0x003f, 0x003f, 0x003f, - 0xd8db, 0x003f, 0xf9ce, 0xe9d5, 0xe3d1, 0x003f, 0x003f, 0xd2bc, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd8ac, 0xf3cc, - 0x003f, 0xcdfb, 0xf6d6, 0x003f, 0xe7f5, 0xe8ef, 0xe3f9, 0xd2bb, - 0xf3f3, 0xe3fb, 0x003f, 0xded0, 0xceb0, 0x003f, 0xd6f7, 0xf1d9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5c1, 0xdcc4, 0x003f, - 0xf5bb, 0x003f, 0xded1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x5c00 .. 0x5cff */ - 0x003f, 0xdce6, 0x003f, 0x003f, 0xded2, 0x003f, 0x003f, 0xede2, - 0xeef6, 0xeacf, 0xf0ee, 0xe3fc, 0x003f, 0xd3df, 0xd3f4, 0xe1b3, - 0x003f, 0xe1b4, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4d3, 0x003f, - 0x003f, 0xdfc6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe9d6, 0x003f, 0x003f, 0x003f, - 0xdbab, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf6a6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe3b9, 0xebc5, 0xf4a9, 0xcdb6, 0xd2f9, 0x003f, 0xdaad, 0xd2e3, - 0xcfd1, 0x003f, 0x003f, 0x003f, 0x003f, 0xcbdc, 0xccfa, 0x003f, - 0xcfdd, 0x003f, 0x003f, 0xe8a9, 0x003f, 0xe3bb, 0xe3ba, 0x003f, - 0x003f, 0xe0da, 0x003f, 0x003f, 0x003f, 0xeef7, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdcb3, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd3f5, 0x003f, 0xd7a6, 0x003f, 0xf6b5, 0xd7db, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe1d5, 0x003f, 0x003f, 0xd4ea, - 0x003f, 0xdfa3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xfddf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd0f7, 0xedd4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcbaa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe4db, 0x003f, 0xe1fb, 0xcba2, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd3e0, 0x003f, 0xe4bf, 0x003f, 0xfbc0, 0x003f, 0xdabe, - 0xe4cd, 0x003f, 0xd6b9, 0x003f, 0x003f, 0x003f, 0xefc0, 0x003f, - 0xe1fc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf6b9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdfc7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe4b1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdce7, - 0xdce8, 0x003f, 0x003f, 0x003f, 0xfad6, 0x003f, 0xd3f6, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf1da, 0x003f, 0xfaf2, 0x003f, 0x003f, - /* 0x5d00 .. 0x5dff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2fd, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd5cf, 0xd0f8, 0x003f, - 0x003f, 0xcddf, 0x003f, 0x003f, 0xf5cb, 0x003f, 0xe4f0, 0xcbab, - 0x003f, 0xd7c4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2fe, - 0x003f, 0xddda, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdaae, 0xcaee, 0x003f, 0x003f, 0x003f, - 0xd5b9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe3a1, 0x003f, 0x003f, 0xe8e3, 0x003f, 0x003f, 0xf3ab, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcfa9, - 0x003f, 0x003f, 0x003f, 0xd3f7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd4f1, 0x003f, 0x003f, - 0xcee4, 0x003f, 0xe8f2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe5f5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe7ae, 0x003f, 0xd6ba, 0x003f, 0xdfec, 0xe4c0, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8e4, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd8b5, 0x003f, 0x003f, 0x003f, 0xe4dc, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4b9, 0xf1b6, 0x003f, - 0x003f, 0xe2de, 0xe1b5, 0x003f, 0x003f, 0xcdef, 0xf1a7, 0xcee5, - 0xcbdd, 0x003f, 0x003f, 0xd9e3, 0x003f, 0x003f, 0xf3ac, 0x003f, - 0x003f, 0xd0f9, 0xecab, 0xded3, 0xf7e9, 0x003f, 0x003f, 0xf9f5, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1de, 0xcbee, 0x003f, - /* 0x5e00 .. 0x5eff */ - 0x003f, 0x003f, 0xe3bc, 0xf8d6, 0x003f, 0x003f, 0xdbee, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xfdf1, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf7b6, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4de, 0x003f, - 0x003f, 0xf2ed, 0x003f, 0xdbd9, 0x003f, 0xf0a8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1fd, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xded4, 0x003f, 0xe0ac, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xede3, 0x003f, 0x003f, 0xd3e1, 0x003f, - 0xdfc8, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9b6, 0x003f, 0xfdac, - 0xefd3, 0x003f, 0x003f, 0x003f, 0xe4c1, 0xf8eb, 0x003f, 0xdbac, - 0x003f, 0x003f, 0x003f, 0x003f, 0xfcc6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd8ad, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf6ba, - 0x003f, 0xdbdf, 0xd3d3, 0xf8c7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcace, 0xf8c1, 0xd2b4, 0x003f, 0x003f, 0xdcb4, - 0xfab9, 0xcacf, 0x003f, 0xfcb3, 0xeaea, 0xeaeb, 0xd0fa, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xede4, 0x003f, 0x003f, 0xdde7, - 0x003f, 0x003f, 0xdfc9, 0x003f, 0x003f, 0x003f, 0x003f, 0xdfed, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeebc, 0x003f, 0xefc1, - 0x003f, 0x003f, 0xccd2, 0x003f, 0xdda4, 0x003f, 0x003f, 0x003f, - 0xdfca, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd3f8, 0xf1a8, - 0x003f, 0x003f, 0x003f, 0xcdb7, 0x003f, 0xefd4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4dd, 0xdfee, 0xcbac, - 0xe9bc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeaec, 0x003f, - 0x003f, 0x003f, 0xdfcb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf9bf, 0xd6af, 0xd5c6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcfaa, 0x003f, 0x003f, 0xcea9, 0x003f, 0x003f, 0xd6f8, 0x003f, - 0x003f, 0x003f, 0xf1b7, 0xeef8, 0x003f, 0x003f, 0x003f, 0xd9d9, - 0xf3df, 0x003f, 0xf8c8, 0xcec6, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd5e6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf4e6, 0x003f, 0x003f, 0xe6c5, 0xefd5, - 0x003f, 0x003f, 0xcbef, 0xfcdf, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x5f00 .. 0x5fff */ - 0x003f, 0xdca7, 0x003f, 0x003f, 0xd6e7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf8c9, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3d2, - 0x003f, 0xe3bd, 0x003f, 0xcfe1, 0xf0c0, 0xecda, 0x003f, 0xddd7, - 0xfbf0, 0x003f, 0x003f, 0xecac, 0x003f, 0x003f, 0x003f, 0xf0a9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfad7, 0xfbc1, - 0x003f, 0xd2c0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe5b0, 0x003f, 0x003f, 0x003f, 0xede5, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcbad, 0x003f, 0xf9b0, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf7a5, 0x003f, 0xcbae, 0x003f, 0xdaaf, 0x003f, 0xd8b6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd3a7, 0xfbb2, - 0x003f, 0xfdc4, 0x003f, 0xecad, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xfba1, 0x003f, 0x003f, 0x003f, 0xe5e9, 0xe9ee, - 0x003f, 0xf3f4, 0xf8f3, 0xf0c1, 0xdeaf, 0xf8b0, 0x003f, 0x003f, - 0xf3e0, 0xe7af, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdbad, - 0x003f, 0xe6b5, 0x003f, 0x003f, 0xf9a8, 0x003f, 0x003f, 0xddd8, - 0xe8d9, 0xefd6, 0x003f, 0x003f, 0x003f, 0xd3e2, 0x003f, 0xe2df, - 0x003f, 0x003f, 0xfce0, 0xd7c8, 0xfdad, 0x003f, 0x003f, 0x003f, - 0xdfef, 0xccd3, 0xd3f9, 0x003f, 0x003f, 0x003f, 0x003f, 0xd4f0, - 0xdbc7, 0xded5, 0x003f, 0x003f, 0x003f, 0x003f, 0xf0f4, 0x003f, - 0xd5d0, 0xe5d9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xfcc7, 0xdcd6, 0xe2e0, 0x003f, 0x003f, 0x003f, 0xdab0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3a3, 0x003f, 0xd3ec, - 0x003f, 0xf4cb, 0x003f, 0x003f, 0x003f, 0xfdc5, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe3fd, 0x003f, 0xf9b1, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd0fb, 0xecdb, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5bc, 0xf2a4, - 0xd8ce, 0xd8cf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf5f7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf6e1, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd2b7, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbec, 0x003f, 0xddc8, - /* 0x6000 .. 0x60ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4e8, - 0x003f, 0x003f, 0xd2c1, 0x003f, 0x003f, 0x003f, 0xf8d7, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd6bb, 0xded6, 0x003f, 0x003f, - 0xf7bd, 0xecae, 0x003f, 0x003f, 0x003f, 0xd0e1, 0x003f, 0xe0f5, - 0xeab3, 0x003f, 0xced6, 0x003f, 0x003f, 0x003f, 0x003f, 0xcca5, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xecf6, 0xe2e1, 0xe3be, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfcc8, 0x003f, 0x003f, - 0xcdf0, 0x003f, 0xf9f6, 0x003f, 0x003f, 0xdff0, 0x003f, 0x003f, - 0x003f, 0xe5bf, 0x003f, 0x003f, 0x003f, 0xcebf, 0x003f, 0x003f, - 0x003f, 0x003f, 0xfce1, 0xedb0, 0xfdd1, 0xf6bb, 0x003f, 0x003f, - 0xf9cf, 0xebda, 0xcac1, 0x003f, 0xd2b8, 0xcdf1, 0x003f, 0xe3d3, - 0xfde6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6ed, 0x003f, 0x003f, - 0x003f, 0xe3fa, 0x003f, 0x003f, 0xf0aa, 0xf9d0, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xfce2, 0x003f, 0xf8a7, 0x003f, - 0x003f, 0x003f, 0xe1e5, 0xeef9, 0x003f, 0x003f, 0x003f, 0xe7f6, - 0xeaed, 0x003f, 0x003f, 0xfcb4, 0xf5c2, 0x003f, 0x003f, 0xd7dc, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf0f5, 0x003f, 0xdde8, 0xd3ed, 0xf5fc, 0x003f, 0xdabf, 0x003f, - 0xccfb, 0x003f, 0x003f, 0x003f, 0xd3fa, 0xf4a4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xefd7, 0x003f, 0xd4c3, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xfbe3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xfbed, 0x003f, 0xe0ad, 0x003f, 0x003f, 0xeaee, - 0xfbb3, 0xe4c2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf6e7, 0xd2dd, 0x003f, 0xdfcc, 0x003f, 0x003f, 0xfcc9, 0x003f, - 0x003f, 0xe5a9, 0xe0f6, 0xf6b3, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6100 .. 0x61ff */ - 0x003f, 0xe1fe, 0x003f, 0x003f, 0x003f, 0x003f, 0xcbf0, 0x003f, - 0xeaef, 0xeaf0, 0x003f, 0x003f, 0x003f, 0xdac0, 0xf8b4, 0xebf2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4c3, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe9d7, 0xe4f1, 0x003f, 0x003f, 0x003f, 0xcaef, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xced7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xfcca, 0x003f, 0x003f, 0x003f, 0xf3e1, 0x003f, 0x003f, 0xcbc4, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe3e5, 0x003f, 0xcbc5, 0xeab4, - 0x003f, 0x003f, 0xe9bd, 0x003f, 0xd7c9, 0x003f, 0x003f, 0xebdb, - 0xedb1, 0x003f, 0xccc3, 0xf7be, 0xfccb, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf8f4, 0x003f, 0xd9b7, 0x003f, 0x003f, - 0xf3d3, 0xf3d4, 0x003f, 0x003f, 0x003f, 0xf7e4, 0x003f, 0xf7d1, - 0x003f, 0x003f, 0xd8b7, 0xceb1, 0xcac2, 0x003f, 0x003f, 0xfbb4, - 0xcbc6, 0x003f, 0x003f, 0xf0f6, 0x003f, 0x003f, 0xd5e7, 0x003f, - 0xead0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xccd4, 0xcbaf, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4aa, 0xe9af, 0x003f, - 0x003f, 0xf5c3, 0xe9d8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdde9, 0x003f, 0x003f, 0x003f, 0xf1f3, 0x003f, - 0xd5fb, 0xdebb, 0x003f, 0x003f, 0xf4fb, 0x003f, 0x003f, 0x003f, - 0xfdf3, 0xfdf2, 0xf7a6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xddc9, 0x003f, 0x003f, 0xd4d3, - 0x003f, 0xcca8, 0x003f, 0xdac1, 0xccd5, 0x003f, 0xd9e4, 0x003f, - 0x003f, 0x003f, 0xfaca, 0x003f, 0x003f, 0x003f, 0xe5e3, 0x003f, - 0x003f, 0x003f, 0xd3bc, 0x003f, 0x003f, 0x003f, 0xcaf0, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd0c4, 0x003f, 0x003f, 0x003f, 0xcad0, - 0xfaab, 0xebeb, 0xe7f8, 0xd9e5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd1d7, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf3a4, 0x003f, 0x003f, 0x003f, 0xd4fb, 0xfce3, - 0xfad8, 0x003f, 0xf3d5, 0x003f, 0xcfab, 0x003f, 0x003f, 0xebf3, - /* 0x6200 .. 0x62ff */ - 0xd5fc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd3d4, - 0xcdfc, 0x003f, 0xd9e6, 0x003f, 0xe2f9, 0xe2a1, 0xebd4, 0x003f, - 0xe0f7, 0xe4b2, 0xccfc, 0x003f, 0x003f, 0x003f, 0xfbe4, 0x003f, - 0x003f, 0x003f, 0xf4ab, 0x003f, 0x003f, 0x003f, 0x003f, 0xd0bd, - 0x003f, 0xcaf1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xefb8, 0x003f, 0x003f, 0x003f, 0xd7c0, 0x003f, - 0xeefa, 0xfdf4, 0x003f, 0x003f, 0xd3e3, 0x003f, 0xfbc2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd5e8, 0xdbae, - 0xe1b6, 0xf8b7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0bf, - 0xfbc3, 0xddea, 0x003f, 0xe2a2, 0x003f, 0xeea6, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf6e8, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf6f5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xddca, 0x003f, - 0x003f, 0xd0e2, 0x003f, 0x003f, 0x003f, 0x003f, 0xdda6, 0x003f, - 0x003f, 0xddeb, 0x003f, 0x003f, 0xe4f9, 0x003f, 0x003f, 0xe3af, - 0xd0fc, 0x003f, 0x003f, 0x003f, 0xf4fc, 0x003f, 0x003f, 0x003f, - 0x003f, 0xccbc, 0xf7ea, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe5e4, 0xdff1, 0x003f, 0x003f, 0xf7e1, 0x003f, 0xf9f7, - 0xefb9, 0x003f, 0x003f, 0xf8d8, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf9a9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf8d9, 0x003f, 0x003f, 0x003f, 0xeebd, 0x003f, 0x003f, - 0x003f, 0xd8c6, 0x003f, 0x003f, 0xe4e3, 0xf5ce, 0x003f, 0x003f, - 0x003f, 0x003f, 0xddd9, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9e7, - 0xd2b9, 0xd5c3, 0x003f, 0x003f, 0xdae5, 0xdad0, 0x003f, 0xd1d9, - 0xced8, 0x003f, 0xcbde, 0xf4ac, 0xdafb, 0x003f, 0xf6e9, 0xe8f3, - 0xcfac, 0xf0f0, 0x003f, 0xf4fd, 0xdbc8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcec0, 0xe3d4, 0xd1cf, 0xf1f5, - 0x003f, 0xcdf2, 0x003f, 0xcfeb, 0x003f, 0x003f, 0x003f, 0xcdb8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3a6, 0xd1da, - /* 0x6300 .. 0x63ff */ - 0x003f, 0xf2a5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2a6, - 0x003f, 0xe4ce, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd3fb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf1a9, 0x003f, 0x003f, 0x003f, 0xf2c9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xefd8, 0xe6c9, 0x003f, 0xd8b8, 0xfaf3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf3b5, 0x003f, 0x003f, 0xf8a4, 0x003f, 0x003f, 0xd1f3, - 0xe6c8, 0x003f, 0x003f, 0x003f, 0x003f, 0xf8da, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdce9, - 0xded7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcbdf, 0x003f, - 0x003f, 0x003f, 0xcfec, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4df, - 0x003f, 0x003f, 0xd1f4, 0xd2ba, 0x003f, 0x003f, 0x003f, 0xdff2, - 0x003f, 0x003f, 0x003f, 0xe1b7, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe2a3, 0xd3fc, 0x003f, 0x003f, 0xede6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdbc9, 0x003f, 0x003f, 0x003f, 0xe4fa, 0x003f, - 0xcfde, 0x003f, 0x003f, 0xced0, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd5d3, 0xf3f5, 0xf7ae, 0x003f, 0x003f, 0xefc8, 0x003f, 0xcdf3, - 0xf5cf, 0xe5f3, 0xf0c2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcad1, 0x003f, 0x003f, 0x003f, 0xeaf1, 0x003f, 0xd0a6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9da, - 0xf0ab, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xebe7, 0x003f, - 0x003f, 0x003f, 0xe5c0, 0xfcb5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe4c4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcca9, 0xfdc6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xeab5, 0x003f, 0xe5aa, 0xdfba, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6400 .. 0x64ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1df, 0x003f, 0xdad1, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe1b8, 0x003f, 0xe8f4, 0xd3fd, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe2a4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf2ca, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdae6, 0xf7b3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xfdcd, 0x003f, 0x003f, 0x003f, 0xf3b6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeed7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf5c4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd8a4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2a7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd9b8, 0xd9b9, 0xefc9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd6ce, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf7cb, 0xdfae, 0xe8f5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd2b5, 0x003f, 0x003f, 0x003f, 0xd3d5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf4cc, 0xdafc, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd9e8, 0x003f, 0xf7eb, 0xf5c9, 0x003f, - 0xf3bc, 0x003f, 0xdad2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd3b5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe8b6, 0x003f, 0x003f, 0xd6cf, 0xf4ba, 0x003f, 0xf7c9, - 0x003f, 0x003f, 0xccaa, 0x003f, 0x003f, 0xf0c3, 0xccd6, 0x003f, - 0x003f, 0x003f, 0xd0d3, 0x003f, 0xd3bd, 0x003f, 0x003f, 0x003f, - 0xdbfb, 0x003f, 0xcbe0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd3e4, 0xf6f7, 0x003f, 0x003f, 0xd5ba, 0xf3cd, 0xcbe1, - 0x003f, 0x003f, 0x003f, 0x003f, 0xebf4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf4ad, 0x003f, 0xfcaa, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf7ec, 0x003f, 0x003f, 0x003f, 0xe8f6, 0x003f, - /* 0x6500 .. 0x65ff */ - 0xdae7, 0x003f, 0x003f, 0x003f, 0xf7cc, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe5c1, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0ee, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd5fd, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcee6, 0xfcab, 0xd5bb, 0x003f, 0x003f, 0xf2a8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2a5, 0xcdb9, - 0xeaf2, 0xcbc7, 0x003f, 0xcdf4, 0x003f, 0x003f, 0xdbaf, 0xefd9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcdba, 0x003f, 0x003f, - 0xfcf9, 0x003f, 0x003f, 0x003f, 0x003f, 0xdff3, 0xcee7, 0xdac2, - 0x003f, 0xcfad, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7f9, 0xf8a8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3e2, 0x003f, - 0x003f, 0x003f, 0xcaf2, 0xdfa4, 0x003f, 0x003f, 0xd4c4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xccd7, 0xe5c2, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcdbb, 0x003f, 0xefda, 0xeed8, 0x003f, 0xdda7, - 0xe2a6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0c0, 0x003f, - 0x003f, 0x003f, 0xd6b0, 0xf8ca, 0x003f, 0xfcfa, 0x003f, 0xd9fe, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdeb0, 0x003f, 0x003f, 0x003f, - 0xddec, 0xdae8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd4e0, - 0x003f, 0xd6f9, 0x003f, 0xcdd7, 0xded8, 0x003f, 0x003f, 0xf2f8, - 0x003f, 0xe4d6, 0x003f, 0x003f, 0xd0c5, 0xf4ae, 0x003f, 0xdda8, - 0x003f, 0x003f, 0x003f, 0xedc5, 0xf3d6, 0x003f, 0x003f, 0xded9, - 0xe3e6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd3a8, - 0x003f, 0xdbb0, 0x003f, 0x003f, 0xe5da, 0xe3bf, 0x003f, 0x003f, - 0x003f, 0xdbb1, 0x003f, 0x003f, 0x003f, 0xd5e9, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe0c1, 0xefdb, 0x003f, 0x003f, 0xf0e9, - 0x003f, 0x003f, 0xd7b2, 0x003f, 0x003f, 0x003f, 0x003f, 0xd0fd, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd9e9, 0x003f, 0x003f, 0xd0fe, 0x003f, 0xeced, 0xd3a9, 0x003f, - 0xf2a9, 0xf0c4, 0x003f, 0x003f, 0xe2e2, 0xe9ef, 0x003f, 0x003f, - 0x003f, 0xf9d1, 0x003f, 0x003f, 0xe9d9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe8da, 0xdac3, 0xdac4, 0xd4c5, 0x003f, 0xe7fa, - /* 0x6600 .. 0x66ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcde0, 0xe3b0, - 0x003f, 0xdbb2, 0xfbc4, 0x003f, 0xf3e3, 0x003f, 0xd9a5, 0xfbe7, - 0xddcb, 0xd0d4, 0x003f, 0xe6b6, 0xe0ae, 0xfdda, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdcb5, 0xe0f8, - 0xe7b1, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5f0, 0x003f, 0xd8dc, - 0xedc6, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1b9, 0x003f, 0xe3c0, - 0xf9c0, 0xe9f0, 0x003f, 0x003f, 0xd9db, 0x003f, 0xf3e4, 0x003f, - 0x003f, 0x003f, 0xdcb6, 0xe4e9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf0c5, 0xe3c1, 0xfccc, 0xfccd, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf2cb, 0x003f, 0xf2cc, 0x003f, 0x003f, 0x003f, 0xe4cf, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf1db, 0x003f, 0xfad9, 0x003f, 0xf1b8, 0xfdf5, 0xe0f9, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe7fb, 0xfcb7, 0xfce4, 0xfbc5, - 0xe3e7, 0xd8b9, 0x003f, 0xf6f8, 0x003f, 0x003f, 0xdcc5, 0xccd8, - 0x003f, 0x003f, 0x003f, 0xe0af, 0xf4e7, 0x003f, 0xefdc, 0xcffc, - 0xefdd, 0x003f, 0xf2aa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xfdbe, 0x003f, 0x003f, 0xcaac, - 0xfdbb, 0xfdc7, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7b2, 0x003f, - 0xead1, 0xdff4, 0x003f, 0x003f, 0x003f, 0x003f, 0xd1ec, 0xe4de, - 0xe5c3, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9a6, 0x003f, 0x003f, - 0xcdbc, 0x003f, 0xf3e5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xedd5, 0x003f, 0x003f, 0xd9ba, 0x003f, - 0x003f, 0x003f, 0xede7, 0xfbb5, 0xf8ec, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe0e7, 0x003f, 0xccd9, 0x003f, 0x003f, 0xd4c6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe7a5, 0x003f, 0xd5f5, 0xd3be, - 0x003f, 0xfcfb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4f2, 0x003f, - 0x003f, 0xdff5, 0x003f, 0x003f, 0xe8f8, 0xf8ed, 0x003f, 0x003f, - 0xcec7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfdf6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe8d8, 0x003f, 0xcdd8, 0xe7d6, 0xccda, 0x003f, 0x003f, 0xcae3, - 0xdff6, 0xf0c7, 0xf0c6, 0x003f, 0xd8ba, 0x003f, 0xf1f4, 0xf4f0, - /* 0x6700 .. 0x67ff */ - 0xf5cc, 0x003f, 0x003f, 0xfce5, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeac5, 0xeaf3, 0x003f, 0xdddb, 0x003f, 0xdcd7, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdefd, 0xf2f9, 0x003f, 0xd5c7, - 0x003f, 0x003f, 0x003f, 0xd8d0, 0x003f, 0xf0c8, 0xd1a1, 0xd1a2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9d4, 0xd6e8, - 0xd9ca, 0x003f, 0xdab1, 0xd8c7, 0xdce2, 0xf3ce, 0xf5f4, 0x003f, - 0x003f, 0xf1b9, 0x003f, 0x003f, 0xdad3, 0x003f, 0xf6ea, 0x003f, - 0x003f, 0x003f, 0xcff5, 0x003f, 0x003f, 0xfdae, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcad2, 0x003f, - 0x003f, 0xdfb4, 0x003f, 0x003f, 0x003f, 0x003f, 0xd7dd, 0xfaba, - 0xeea7, 0xf5bd, 0x003f, 0xf8f5, 0x003f, 0x003f, 0xede8, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd4e1, 0x003f, 0xd1a3, 0xe1d6, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf9f8, 0x003f, 0xdbca, - 0xcbf9, 0xd4d4, 0x003f, 0xd9dc, 0x003f, 0xeebe, 0x003f, 0xf7ed, - 0x003f, 0x003f, 0x003f, 0xd2ee, 0x003f, 0x003f, 0xe1e6, 0xf7f9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdded, - 0x003f, 0xe8db, 0x003f, 0xdbb3, 0x003f, 0x003f, 0x003f, 0xd1f7, - 0xe0b0, 0x003f, 0x003f, 0xd4e2, 0x003f, 0xf6d7, 0x003f, 0xd7f9, - 0x003f, 0x003f, 0xd8dd, 0x003f, 0xcdfd, 0xf2ab, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcdbd, - 0xf8c2, 0x003f, 0x003f, 0xf2ac, 0x003f, 0x003f, 0xcaad, 0xcaae, - 0xcfae, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3c2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdcb7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdbda, - 0xd9bb, 0xcaf3, 0xf6d3, 0xe6f8, 0xeaf5, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeaf6, 0x003f, 0x003f, 0xf6f9, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcfaf, 0x003f, 0x003f, 0xcad3, 0x003f, 0x003f, 0xcaaf, - 0xd2b0, 0xf1ba, 0x003f, 0xd7b3, 0xe3c3, 0xf3fd, 0xdeda, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdedb, 0x003f, 0x003f, 0xefde, 0x003f, - /* 0x6800 .. 0x68ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe2e3, 0xeefb, 0x003f, 0x003f, 0xdff7, 0xd7ca, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcee8, 0xdbdb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf1bb, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9f1, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xfab7, 0xd0c6, 0x003f, 0x003f, 0xccab, 0xeea8, 0x003f, 0x003f, - 0xcbfa, 0xf9f9, 0xccfd, 0xd3fe, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe4d0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2ee, 0x003f, - 0xd4d5, 0xdfcd, 0x003f, 0xfcb8, 0xd1d0, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2cd, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf7d2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcad4, - 0x003f, 0xd5d9, 0x003f, 0x003f, 0x003f, 0xd8de, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcdd9, - 0x003f, 0x003f, 0x003f, 0xeea9, 0xf6bc, 0x003f, 0x003f, 0xccdb, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf0c9, 0x003f, 0xfcfc, - 0x003f, 0xe8c9, 0xf4fe, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7fc, - 0xd7de, 0x003f, 0x003f, 0x003f, 0x003f, 0xdedc, 0x003f, 0xf0ac, - 0xccfe, 0xcde1, 0x003f, 0xe1ba, 0x003f, 0xdbef, 0xdab2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd1a5, 0xdcb8, 0x003f, 0x003f, - 0x003f, 0xd8f6, 0x003f, 0xd1a4, 0x003f, 0xcde2, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdcea, 0x003f, 0x003f, 0xf0f7, 0x003f, 0xf0ca, - 0xd0be, 0x003f, 0xdddc, 0x003f, 0x003f, 0x003f, 0x003f, 0xd4d6, - 0xd3d6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xedd0, - 0xcda1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdfb5, 0x003f, - 0x003f, 0x003f, 0xdff8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd4a1, 0xceb2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6900 .. 0x69ff */ - 0xe8ca, 0x003f, 0x003f, 0x003f, 0x003f, 0xebf5, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3d5, 0xf5d0, 0x003f, - 0x003f, 0x003f, 0xf5a1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9a7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe5ab, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6cb, 0x003f, 0xf5f1, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe5c5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf9a3, 0xe0db, 0xf6eb, 0x003f, 0xcbf1, - 0x003f, 0xd9ea, 0xf5a2, 0x003f, 0x003f, 0x003f, 0xd7d1, 0x003f, - 0xd1f8, 0xeaf8, 0xeaf9, 0xdab3, 0x003f, 0x003f, 0x003f, 0x003f, - 0xefdf, 0x003f, 0x003f, 0xf1ef, 0x003f, 0xe5f6, 0xeebf, 0xe2e4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd0bf, 0x003f, 0xfaac, - 0xf5d1, 0xe7b3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9be, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf2ce, 0xdbb4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfcce, 0x003f, 0xddee, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7b4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd7b4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf7b4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcdbe, 0x003f, 0xdae9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcfb0, 0xf7d9, 0xf3e6, 0x003f, 0x003f, - 0xced9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xceaa, 0x003f, 0xcbc8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd0a7, 0x003f, 0xf0cb, 0x003f, 0xd0c7, - /* 0x6a00 .. 0x6aff */ - 0x003f, 0x003f, 0xe4c5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdbe0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd5da, 0x003f, 0xd7a7, 0x003f, 0x003f, 0x003f, 0xeec0, - 0x003f, 0xf8f6, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5d2, 0xede9, - 0x003f, 0xd9bc, 0x003f, 0xe5c6, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5a3, 0x003f, 0x003f, - 0xdad4, 0xe2a7, 0xfbfc, 0x003f, 0x003f, 0xf1dc, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcaf4, 0x003f, 0x003f, 0x003f, - 0xe8fa, 0x003f, 0x003f, 0xcee9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe9f8, 0xe2e5, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd0b9, 0xd4f2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd1a6, - 0x003f, 0xdfce, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfcf4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd3aa, 0x003f, 0x003f, 0x003f, 0xccac, 0x003f, 0x003f, 0x003f, - 0x003f, 0xefe0, 0x003f, 0x003f, 0x003f, 0xe5e5, 0xd0d5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdbfc, - 0x003f, 0x003f, 0x003f, 0x003f, 0xfce6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcbfe, 0xedea, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdeb1, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf9e3, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd4a2, 0xcff6, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd6d0, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd5ea, 0xf1ee, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfacb, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe5a1, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6b00 .. 0x6bff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0xd5b1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcfed, 0x003f, 0xedeb, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd5b2, 0x003f, 0x003f, 0x003f, 0xd5bc, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xfde2, 0xf3ad, 0x003f, 0xfddb, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe9b0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd1a7, 0x003f, 0x003f, 0xfde3, 0xceb3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfde4, 0xface, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcab0, 0x003f, 0xf7a7, 0x003f, - 0xcfb1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6a2, - 0x003f, 0xfcb6, 0xf2ad, 0xefe1, 0xf3ae, 0xdcc6, 0xd9eb, 0x003f, - 0x003f, 0x003f, 0xe8e0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe1a8, 0x003f, 0x003f, 0x003f, 0x003f, 0xd5f6, - 0xcffd, 0x003f, 0x003f, 0xdedd, 0x003f, 0x003f, 0x003f, 0xd9d1, - 0x003f, 0x003f, 0x003f, 0xe4ea, 0xf2cf, 0x003f, 0xf7bf, 0x003f, - 0x003f, 0xe2e6, 0xe2a8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3d6, 0x003f, - 0xedd1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9f9, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd6b1, 0xdeb2, - 0x003f, 0x003f, 0xe0e8, 0x003f, 0x003f, 0xd3ab, 0x003f, 0xebdc, - 0x003f, 0x003f, 0xdfaf, 0x003f, 0xcac3, 0x003f, 0x003f, 0xeefc, - 0x003f, 0xfdc3, 0x003f, 0x003f, 0x003f, 0xebf6, 0xcfb2, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd9ec, 0x003f, 0xd9bd, 0x003f, 0xd8df, - 0x003f, 0x003f, 0xd4b8, 0xebbe, 0xddef, 0x003f, 0xddf0, 0xddf1, - 0xddf2, 0x003f, 0x003f, 0xd9be, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfbc6, 0xcfb3, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6c00 .. 0x6cff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeefd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4ab, - 0x003f, 0xdac5, 0x003f, 0xd8ec, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd1a8, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe2a9, 0x003f, 0x003f, 0xdebc, - 0xe7b5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdbf0, 0x003f, - 0xefe2, 0xf1f0, 0xcfb4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdbf1, 0x003f, - 0xe0b1, 0x003f, 0x003f, 0x003f, 0x003f, 0xdfa5, 0x003f, 0xf9d2, - 0x003f, 0x003f, 0xe7fd, 0x003f, 0x003f, 0xe6a3, 0xfbf1, 0xcbb0, - 0xf2ae, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcde7, 0x003f, 0xe8dc, 0x003f, 0x003f, 0xe7d7, 0x003f, 0x003f, - 0xf7c0, 0x003f, 0xd0e3, 0x003f, 0x003f, 0x003f, 0xdaa1, 0x003f, - 0x003f, 0x003f, 0xccbd, 0x003f, 0x003f, 0xd1a9, 0xddcc, 0x003f, - 0x003f, 0xe3fe, 0xd1aa, 0xe8aa, 0x003f, 0xeab6, 0xf9fa, 0xe6cc, - 0xf6d8, 0x003f, 0x003f, 0x003f, 0xd4c7, 0x003f, 0x003f, 0x003f, - 0xd9cb, 0x003f, 0xd9d2, 0xd3cb, 0xd8f7, 0xdaa9, 0xf5f8, 0x003f, - 0x003f, 0xdede, 0xf2af, 0xf8a9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd8c8, 0x003f, 0x003f, 0xeec1, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf9c1, 0x003f, 0x003f, 0x003f, 0x003f, - 0xddf3, 0xeafa, 0x003f, 0xf6bd, 0xe1bb, 0xcdbf, 0xf4d4, 0xe6cd, - 0x003f, 0xfccf, 0xfba2, 0x003f, 0xe0dc, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf4bb, 0xdad5, 0x003f, 0xf9b2, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfbf2, 0x003f, 0xdbf6, 0x003f, 0xdedf, - 0x003f, 0x003f, 0x003f, 0xdbf2, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf8dc, 0xf7ee, 0xebe8, 0x003f, 0xd2fa, 0x003f, 0x003f, - 0xf1bc, 0x003f, 0x003f, 0xfada, 0x003f, 0x003f, 0xdaea, 0xdac6, - 0xf7c1, 0x003f, 0x003f, 0xe7b6, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6d00 .. 0x6dff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe5c7, 0xd6ac, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdcc7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1a9, - 0x003f, 0xe2aa, 0x003f, 0xd5a6, 0x003f, 0x003f, 0xd4d7, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2d0, 0x003f, 0xeafb, - 0x003f, 0xe0dd, 0xfbf3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf1bd, 0x003f, 0x003f, 0xe2e7, 0xfdd7, 0x003f, - 0xcec8, 0xeab7, 0x003f, 0xfcc0, 0x003f, 0xfde7, 0xf7ef, 0x003f, - 0x003f, 0xd7b5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xefba, 0xf1dd, 0x003f, 0xdeb3, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe8cb, 0x003f, 0x003f, 0xf8dd, 0x003f, - 0x003f, 0xfbc7, 0xd5c8, 0x003f, 0xd7df, 0x003f, 0xdda9, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe9b1, 0x003f, 0x003f, 0xfaad, - 0xf6d9, 0xfaf4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf8aa, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6ee, 0x003f, 0xccdc, - 0xe1bc, 0xe0ef, 0x003f, 0x003f, 0xe9bf, 0xfcfd, 0xe6ce, 0x003f, - 0x003f, 0xe1d7, 0x003f, 0xe6cf, 0x003f, 0xf4f1, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4f3, - 0x003f, 0x003f, 0xe4fb, 0x003f, 0x003f, 0xf9e4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xefe3, 0x003f, 0x003f, 0xcfee, 0xf6be, 0xe0b2, 0xfcfe, 0xd1ab, - 0x003f, 0x003f, 0x003f, 0xd7fa, 0x003f, 0x003f, 0x003f, 0xfbc8, - 0x003f, 0xe2d7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd4a3, 0xf0f8, 0xd7a8, 0x003f, 0x003f, 0x003f, 0xe1e7, 0x003f, - 0x003f, 0xd3bf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xefe4, 0x003f, 0xd7c5, 0xebe2, 0x003f, 0x003f, 0xfce7, 0x003f, - 0x003f, 0xe4a2, 0x003f, 0xe2e8, 0x003f, 0xe6d0, 0x003f, 0xfbe8, - 0xf4e8, 0xe5f4, 0xf4bc, 0xf4d5, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6e00 .. 0x6eff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdfb6, - 0x003f, 0xfcb9, 0xeec2, 0xcaf5, 0x003f, 0x003f, 0x003f, 0xefe5, - 0xcbe2, 0xd4a4, 0x003f, 0xdee0, 0xdafd, 0xe4c6, 0xe8be, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe0de, 0xf6b4, 0xead2, 0x003f, 0xf9fb, - 0x003f, 0x003f, 0xe0c2, 0x003f, 0xcae4, 0x003f, 0xe7b7, 0x003f, - 0xeafd, 0x003f, 0xd9dd, 0x003f, 0xdab4, 0xeeaa, 0xfbe9, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdbcb, 0xdab5, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf1be, 0x003f, 0x003f, 0xd3ac, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbc9, 0x003f, - 0xdfcf, 0x003f, 0x003f, 0xd3c0, 0xe3d7, 0x003f, 0xefe6, 0xfcd0, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9c0, - 0x003f, 0x003f, 0x003f, 0xf5d3, 0x003f, 0x003f, 0xecdc, 0xf7b7, - 0x003f, 0x003f, 0xeab8, 0xd1f9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdcc8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeab9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1de, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd7b6, 0xcfb5, 0x003f, 0xd9a8, - 0x003f, 0x003f, 0xecee, 0x003f, 0x003f, 0xddaa, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcda2, 0xe8ae, 0x003f, 0x003f, 0x003f, 0xe1bd, - 0x003f, 0xf2d1, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9c1, 0x003f, - 0x003f, 0x003f, 0xd2fc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdbb5, 0x003f, 0xf3e7, 0xd8fe, 0x003f, 0x003f, - 0x003f, 0xfcd1, 0x003f, 0xedb2, 0xf4af, 0x003f, 0xfba3, 0x003f, - 0x003f, 0xfcc1, 0x003f, 0xeeab, 0xd4a5, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4f2, - 0x003f, 0x003f, 0x003f, 0x003f, 0xeed9, 0x003f, 0x003f, 0x003f, - 0xfbca, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcde3, 0xd8bb, - /* 0x6f00 .. 0x6fff */ - 0x003f, 0xe5db, 0xf8f7, 0x003f, 0x003f, 0x003f, 0xf6d4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd7a9, - 0x003f, 0xcbc9, 0x003f, 0x003f, 0xe6d1, 0xf0cc, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd8ae, 0x003f, 0xf9d3, 0xd5fe, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd8bc, 0xf2b0, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe2ab, 0xf3e8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xefc2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xedec, - 0x003f, 0xe7b8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdafe, 0x003f, 0x003f, 0xccbe, 0x003f, 0x003f, 0xf2fc, - 0xdaeb, 0x003f, 0xe2d8, 0xedd6, 0x003f, 0x003f, 0xd6d1, 0xe0b3, - 0x003f, 0x003f, 0xfcd2, 0x003f, 0xebc8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd3c1, 0xf0cd, 0x003f, - 0xcff7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xedd2, 0x003f, 0xd4d8, 0xdcc9, 0xd7f1, 0x003f, - 0x003f, 0xdfbb, 0x003f, 0x003f, 0xf3a5, 0x003f, 0x003f, 0x003f, - 0xf4cd, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1bf, 0xf8b1, 0x003f, - 0xe9fa, 0x003f, 0x003f, 0x003f, 0xfbcb, 0x003f, 0x003f, 0xcad5, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf9d4, 0xf7ca, 0x003f, 0x003f, 0xd6c8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfce8, 0xf3bd, - 0x003f, 0xeefe, 0x003f, 0xe7fe, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd3c2, 0x003f, 0x003f, 0x003f, 0x003f, 0xd3b6, 0x003f, - 0xccad, 0xf6fa, 0xd6b2, 0xd2d8, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe7d8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3a5, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe7b9, 0x003f, 0x003f, 0x003f, 0x003f, 0xf0ad, - 0xfbcc, 0xeba1, 0x003f, 0x003f, 0xd4a6, 0x003f, 0x003f, 0x003f, - 0x003f, 0xfbcd, 0x003f, 0xd5bd, 0xf1df, 0x003f, 0x003f, 0xf6fb, - 0x003f, 0xdeb4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd5eb, 0x003f, - /* 0x7000 .. 0x70ff */ - 0x003f, 0xe5c8, 0x003f, 0x003f, 0x003f, 0xfba4, 0xd4b9, 0x003f, - 0x003f, 0xdee1, 0x003f, 0xe4a3, 0x003f, 0x003f, 0x003f, 0xd7b7, - 0x003f, 0xf8ee, 0x003f, 0x003f, 0x003f, 0xdeb5, 0x003f, 0x003f, - 0xd6d2, 0x003f, 0xf9d5, 0xe7ba, 0xebd5, 0xd5f7, 0xefe7, 0xe1be, - 0x003f, 0x003f, 0x003f, 0xfaae, 0x003f, 0x003f, 0x003f, 0xd6e9, - 0xd6ee, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7bb, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeccb, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd5b3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xceb4, 0x003f, 0x003f, 0x003f, - 0xfba5, 0xe1ee, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf7a8, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbce, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd8bd, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfbfd, 0x003f, 0x003f, 0x003f, 0x003f, - 0xfce9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcfb6, 0x003f, 0x003f, 0x003f, 0xedc7, 0xeeac, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xccdd, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf6a7, 0x003f, 0x003f, 0x003f, 0xe6fa, 0x003f, - 0x003f, 0x003f, 0xf5a4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xfddc, 0xedb3, 0xcec9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xefe8, 0x003f, 0x003f, 0xe1bf, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfadb, 0xcbe3, 0xf7a9, 0x003f, 0xfba6, - 0x003f, 0x003f, 0x003f, 0xdcb9, 0x003f, 0x003f, 0x003f, 0xf1c0, - 0xedc8, 0xefc3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd6ad, 0x003f, 0x003f, 0xfdce, 0x003f, 0x003f, 0x003f, 0xe8a1, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xfbf4, 0xd5a7, 0x003f, 0x003f, 0x003f, 0xf1f6, 0x003f, 0xe6d3, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xccde, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf8b2, 0x003f, 0x003f, 0x003f, 0xdceb, 0x003f, 0x003f, - /* 0x7100 .. 0x71ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0xfdb6, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe5ea, 0x003f, 0x003f, 0xf1e0, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdbcc, 0xddcd, 0x003f, 0x003f, 0x003f, 0xd4c8, 0x003f, - 0x003f, 0xd9ed, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5a5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe6fb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6d4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfdc8, - 0x003f, 0xd6a1, 0xfdbf, 0x003f, 0xfcd3, 0x003f, 0xefa1, 0x003f, - 0xe7bc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd1ee, 0x003f, - 0x003f, 0xe6d5, 0x003f, 0x003f, 0xe9f2, 0x003f, 0xdfb0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd8e0, 0xfcba, 0xfdaf, 0xf0ce, - 0x003f, 0xdbe1, 0x003f, 0x003f, 0xe5c9, 0x003f, 0xedb4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0c3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe3d8, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe9fb, 0xeaa8, 0x003f, 0x003f, 0x003f, 0x003f, 0xfdb7, - 0x003f, 0x003f, 0xfba7, 0x003f, 0xe9c2, 0x003f, 0x003f, 0x003f, - 0x003f, 0xfdf7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2d9, - 0x003f, 0x003f, 0xdcec, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe8a2, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe6f0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xfdf8, 0xfdf9, 0x003f, 0x003f, 0x003f, 0xf6bf, 0x003f, - 0x003f, 0xe7a7, 0x003f, 0xe6d7, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd4f3, 0xd4c9, 0x003f, 0x003f, 0x003f, 0x003f, 0xd6fa, 0x003f, - 0xd7f2, 0x003f, 0xe1c0, 0x003f, 0xdbe2, 0xe6d8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7bd, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf0cf, 0xf3be, 0xe2ac, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5b7, 0xe0f0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfdb8, 0xe3e8, 0x003f, 0xd4a7, 0xe8fc, - /* 0x7200 .. 0x72ff */ - 0xfad2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf8ef, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd6d3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd5b4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf0d0, 0x003f, 0xf7f0, 0xeeb3, 0x003f, 0x003f, - 0xeaba, 0x003f, 0xead3, 0x003f, 0x003f, 0xedc9, 0xddab, 0x003f, - 0x003f, 0x003f, 0xe5ac, 0xfda1, 0x003f, 0xdfd0, 0xecb3, 0x003f, - 0xdfd1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeded, 0xf8b8, - 0xf7fa, 0x003f, 0x003f, 0x003f, 0xf8ab, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf4e0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd4ba, 0xe4b3, 0x003f, 0xe9da, 0x003f, 0xdeb6, 0x003f, 0xd9bf, - 0x003f, 0xd9c0, 0xd6ef, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9cc, - 0x003f, 0xdaaa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdfe5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf7e5, 0x003f, 0x003f, 0x003f, 0xccb2, 0x003f, 0x003f, - 0xdff9, 0xd7e0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd4bb, 0x003f, 0x003f, 0x003f, 0x003f, 0xfdfa, - 0x003f, 0x003f, 0x003f, 0x003f, 0xccb3, 0x003f, 0x003f, 0xdbf3, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdfd2, 0x003f, 0xceca, 0x003f, 0xeeda, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4e4, 0x003f, - 0xfbcf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcfb7, - 0x003f, 0xeec3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xceea, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe2ad, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd7e1, 0xfaf5, 0x003f, 0x003f, 0xd5c9, 0xf8ac, 0x003f, 0x003f, - /* 0x7300 .. 0x73ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe7d9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3e9, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd8ed, 0xe3c4, 0xf0f1, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8e5, 0x003f, 0x003f, - 0x003f, 0xe0fa, 0xeec4, 0xd9de, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeba2, 0xeba3, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfcc2, 0xeabb, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe8ab, 0xdee2, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xedef, 0x003f, 0xe8a3, 0x003f, 0x003f, 0x003f, 0x003f, 0xcff1, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd4bc, 0x003f, 0xfcea, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe7be, 0x003f, 0xfcf2, 0x003f, 0x003f, 0xd6b4, 0x003f, 0x003f, - 0xe2ae, 0x003f, 0xd3b7, 0xfacc, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xfadc, 0x003f, 0xedb5, 0xe1e3, - 0x003f, 0xe8ac, 0x003f, 0xe8dd, 0x003f, 0x003f, 0xefe9, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf4bd, 0x003f, 0xcfb8, 0xe9db, - 0xd1ac, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdac7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xebc9, - 0x003f, 0xe8cc, 0x003f, 0x003f, 0x003f, 0xdeb7, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd6bc, 0xd3e5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xfadd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdad6, 0x003f, 0xcab1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdac8, 0xdfa6, 0x003f, 0xf9b3, 0xf2d2, 0x003f, 0xcac4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcecb, 0x003f, - 0x003f, 0xcdf5, 0x003f, 0x003f, 0x003f, 0xfdb0, 0xd5a8, 0x003f, - 0xf1c1, 0x003f, 0x003f, 0xe2e9, 0xdcca, 0xecb4, 0xfac0, 0x003f, - 0x003f, 0xfba8, 0xd0a8, 0x003f, 0x003f, 0xdaec, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9ee, - 0x003f, 0xe0fb, 0x003f, 0x003f, 0x003f, 0xefea, 0xfade, 0x003f, - /* 0x7400 .. 0x74ff */ - 0x003f, 0xe0c4, 0x003f, 0xcfb9, 0x003f, 0xd5ca, 0xd7e2, 0xe2af, - 0x003f, 0xd7b8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe8cd, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf6da, 0x003f, 0x003f, 0x003f, 0x003f, - 0xefa2, 0xe2da, 0xf6fc, 0x003f, 0x003f, 0xfbd0, 0xd1ad, 0x003f, - 0xcde4, 0x003f, 0xd1ae, 0xdced, 0xe8ce, 0x003f, 0xf0f9, 0xceb5, - 0xe6fc, 0x003f, 0x003f, 0xd7fb, 0xd0d6, 0xddf5, 0xf7f1, 0x003f, - 0xf6fd, 0x003f, 0xdbf7, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbea, - 0xe9dc, 0xd9c1, 0x003f, 0xf5f2, 0xe0c5, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xead4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf9c2, 0x003f, 0xeabc, - 0x003f, 0xd2c5, 0xfbd1, 0xe7c0, 0xeba5, 0x003f, 0xdffa, 0xe3a2, - 0xd7b9, 0x003f, 0xe9c3, 0x003f, 0xe8fd, 0xe8af, 0x003f, 0x003f, - 0xf2d3, 0xfba9, 0xd8a5, 0x003f, 0x003f, 0x003f, 0x003f, 0xd5cb, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd0c8, 0x003f, - 0x003f, 0x003f, 0xd1af, 0xd7e3, 0x003f, 0x003f, 0x003f, 0xe0c6, - 0x003f, 0xd6a2, 0x003f, 0xedf0, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd7f3, 0x003f, 0x003f, 0x003f, 0xfcd4, 0x003f, 0xdad7, 0xccdf, - 0x003f, 0xf2d4, 0x003f, 0xd1b0, 0x003f, 0xcce0, 0x003f, 0xdbfd, - 0xf3bf, 0x003f, 0xf0d1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xfcbb, 0x003f, 0xe2b0, 0x003f, 0x003f, 0xe6a5, 0x003f, 0x003f, - 0x003f, 0xe2db, 0x003f, 0x003f, 0x003f, 0xdfde, 0x003f, 0xe0c7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2ef, 0x003f, - 0x003f, 0x003f, 0xcce1, 0x003f, 0x003f, 0x003f, 0x003f, 0xd6ea, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe7c2, 0x003f, 0x003f, 0x003f, - 0xceb6, 0x003f, 0xf3c0, 0x003f, 0xcdfe, 0x003f, 0x003f, 0x003f, - 0xfbd2, 0x003f, 0xf8f8, 0xf7fb, 0x003f, 0x003f, 0xe8bf, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8b7, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xedb6, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7500 .. 0x75ff */ - 0x003f, 0xdcba, 0x003f, 0x003f, 0xccb4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf1f7, 0x003f, 0x003f, 0x003f, 0xe8b8, 0x003f, 0x003f, - 0xcaf6, 0x003f, 0xe4a4, 0xf4d6, 0x003f, 0x003f, 0x003f, 0xdfe6, - 0x003f, 0x003f, 0x003f, 0xdfa7, 0x003f, 0xdfe7, 0xe1c1, 0x003f, - 0xe9c4, 0x003f, 0x003f, 0xdccb, 0xe9c5, 0x003f, 0x003f, 0x003f, - 0xefa3, 0xeba6, 0xcba3, 0xe3e9, 0x003f, 0x003f, 0x003f, 0xd1fb, - 0xefa4, 0x003f, 0xefeb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd0b4, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcda3, 0x003f, 0x003f, 0xe8e6, - 0x003f, 0xefa5, 0x003f, 0xd3cc, 0xdaed, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd7ba, 0x003f, 0xf2d5, 0xf5e5, 0xd9ef, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf9b4, 0x003f, 0x003f, 0xd5d4, 0xfdcf, 0x003f, - 0x003f, 0x003f, 0xdbe3, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1e1, - 0xecb6, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbfe, 0xd3d7, 0x003f, - 0xd1b1, 0x003f, 0xcbb1, 0x003f, 0x003f, 0x003f, 0x003f, 0xd1b2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcbb2, 0xf1c2, - 0x003f, 0x003f, 0xf4e1, 0xf9b5, 0x003f, 0x003f, 0xe1c3, 0xe1c2, - 0x003f, 0xebf7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdfa8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcbca, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe6b9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf8de, 0xf9aa, 0xcaf7, 0x003f, 0xedb7, 0x003f, 0x003f, - 0xd3b8, 0xf2d6, 0x003f, 0x003f, 0xd4d9, 0xeec5, 0xf2f0, 0x003f, - 0x003f, 0x003f, 0xcab2, 0x003f, 0x003f, 0xdcbb, 0x003f, 0xf1f8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xecb7, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe5ca, 0x003f, 0xf6c0, 0xfddd, 0x003f, 0x003f, - 0xd4e3, 0xcce2, 0x003f, 0xf7d4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd7e5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd3c3, 0x003f, 0xd8a6, 0x003f, 0xf6c1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xddf6, 0x003f, 0xcdc0, 0x003f, 0x003f, 0x003f, - /* 0x7600 .. 0x76ff */ - 0xe5dc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5cb, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe1c4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8b0, - 0xf4b0, 0xf3ea, 0xdaee, 0x003f, 0xd7bb, 0x003f, 0xe2b1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd7aa, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd6fb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe4df, 0x003f, 0xcad6, 0x003f, - 0x003f, 0x003f, 0xeba8, 0x003f, 0x003f, 0x003f, 0xdbfe, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf6c2, 0x003f, 0x003f, 0xefbb, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd4fd, 0x003f, 0x003f, 0xe0c8, 0x003f, 0x003f, 0x003f, - 0xe8b9, 0x003f, 0xefa6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcda4, 0x003f, 0x003f, 0xd4f4, 0xdba1, 0xdbdc, 0xdbdd, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xeedc, 0x003f, 0xcbcb, 0xfcd5, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xceeb, 0x003f, - 0xcdc1, 0x003f, 0x003f, 0xfbd3, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf9ab, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf5d4, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9a9, - 0x003f, 0x003f, 0xe9dd, 0xdbcd, 0x003f, 0x003f, 0xddce, 0x003f, - 0xe7c3, 0x003f, 0xeccc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf9ec, 0x003f, 0x003f, 0x003f, 0xcbcc, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe0fc, 0xd4a8, 0x003f, 0xedd3, 0xd8ef, - 0x003f, 0xf2d7, 0x003f, 0xcaf8, 0xdaef, 0x003f, 0x003f, 0xd6d4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9cd, 0x003f, - 0x003f, 0x003f, 0xd8ee, 0x003f, 0xf2c1, 0x003f, 0x003f, 0x003f, - 0xdfd3, 0x003f, 0x003f, 0x003f, 0xdaf0, 0x003f, 0xe2ea, 0x003f, - /* 0x7700 .. 0x77ff */ - 0x003f, 0xe0fd, 0x003f, 0x003f, 0xd8f8, 0x003f, 0x003f, 0x003f, - 0xf7af, 0xdab6, 0x003f, 0xcad7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2d8, 0x003f, - 0xd8f9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xfadf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcfef, - 0xd9c2, 0x003f, 0xf0d2, 0x003f, 0xe4d1, 0x003f, 0x003f, 0x003f, - 0xf3b7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfae0, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xefec, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe2b2, 0x003f, 0xd4bd, 0x003f, 0x003f, 0xd9ce, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf4e2, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd4a9, 0x003f, 0x003f, 0x003f, 0x003f, 0xcdc2, 0xe7da, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf2d9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd9aa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd8be, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdcad, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe2eb, 0xd6fc, 0x003f, 0x003f, - 0xcaf9, 0x003f, 0x003f, 0xd4da, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf4d7, 0xcca1, 0x003f, 0x003f, 0xcfba, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5b8, - 0x003f, 0x003f, 0x003f, 0xd9c3, 0xd0e8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe3c5, 0xebf8, 0x003f, 0xf2b1, 0x003f, 0x003f, - 0x003f, 0xcfbb, 0x003f, 0x003f, 0x003f, 0xd3ad, 0xe8e1, 0xceec, - 0x003f, 0x003f, 0x003f, 0xe0b4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7800 .. 0x78ff */ - 0x003f, 0x003f, 0xdee3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xddf7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2b2, 0xf3f6, 0xf6db, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd7fe, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf8df, 0x003f, 0xf7f2, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd0a9, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6da, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5a6, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd7bc, 0xcce3, 0x003f, 0x003f, 0xe6db, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdddd, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd1b3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xefed, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd6de, 0xe4f4, 0xe1ef, 0x003f, - 0x003f, 0xddf8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8cf, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcae5, 0x003f, 0x003f, 0x003f, 0xdca1, - 0x003f, 0xe0b5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xfcac, 0xfcad, 0xd8a7, 0x003f, 0x003f, 0x003f, - 0x003f, 0xedb8, 0x003f, 0x003f, 0x003f, 0xdbb6, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd6f0, 0xf3af, 0x003f, 0x003f, 0xcda5, 0x003f, - 0xdaf1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd8a8, 0x003f, 0x003f, 0x003f, 0xcce4, 0x003f, 0x003f, 0xd1b4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcad8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdaf2, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7900 .. 0x79ff */ - 0x003f, 0xf5a7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5a8, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6a6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd5ec, 0xd5f8, 0xdaf3, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe3c6, 0x003f, 0x003f, 0x003f, 0xdee4, 0x003f, - 0xdee5, 0xd1b5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd1b6, - 0xd1b7, 0xf2b3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe9de, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf0d3, 0xf2b4, - 0x003f, 0x003f, 0xf0d4, 0xcbe4, 0xfbd4, 0xf5e6, 0xe3ea, 0x003f, - 0xdee6, 0x003f, 0x003f, 0x003f, 0x003f, 0xdfd4, 0x003f, 0x003f, - 0xf8f9, 0x003f, 0x003f, 0x003f, 0x003f, 0xf0ae, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd1b8, 0x003f, 0x003f, 0x003f, 0x003f, 0xd6df, - 0x003f, 0xd0d7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfca1, 0xefee, 0xdcd8, - 0x003f, 0xe9df, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5dd, 0xfdfb, - 0x003f, 0x003f, 0xe0c9, 0x003f, 0x003f, 0x003f, 0xd6c9, 0x003f, - 0x003f, 0xd4aa, 0x003f, 0xe5cc, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe9e0, 0x003f, 0x003f, 0x003f, 0xd0d8, 0xfca2, 0xd4be, - 0xe2b3, 0xdee7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdcbc, 0xd2b6, 0xf5d5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcea1, 0xf5a9, 0x003f, 0x003f, 0xddf9, 0x003f, 0x003f, - 0xddfa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf0d5, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf6df, 0x003f, 0xf2da, 0xe4eb, - 0x003f, 0xf2f1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xecb9, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7a00 .. 0x7aff */ - 0xfdfc, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1aa, 0x003f, 0x003f, - 0xcad9, 0x003f, 0x003f, 0xefef, 0x003f, 0xf5aa, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xecf9, 0x003f, 0x003f, 0xf8ad, - 0x003f, 0xf2c2, 0xf6c3, 0x003f, 0xd7d2, 0x003f, 0x003f, 0xf9a2, - 0xf0d6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf0fa, 0x003f, - 0x003f, 0xf6e0, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9f3, 0xf2c3, - 0x003f, 0x003f, 0x003f, 0xd4ab, 0xcab3, 0xcda6, 0x003f, 0xcdc3, - 0xcdda, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9cf, 0x003f, - 0x003f, 0xf6c4, 0x003f, 0x003f, 0x003f, 0xeedd, 0xe7c4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2b4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdfe2, 0xe7db, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe8b1, 0x003f, 0xfcae, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe5cd, 0x003f, 0x003f, 0x003f, 0xfaeb, 0x003f, 0xcfbc, 0x003f, - 0x003f, 0xcfe2, 0xcdf6, 0x003f, 0x003f, 0xeff0, 0x003f, 0xf4be, - 0x003f, 0xd4cd, 0x003f, 0x003f, 0xf3b8, 0x003f, 0x003f, 0x003f, - 0xe9a1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf2f2, 0xf3eb, 0x003f, 0xf0d7, 0x003f, 0x003f, - 0xcfd7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcfdf, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe8c0, 0xe8c1, 0x003f, 0x003f, 0x003f, 0xcfe3, 0xe9a2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd0aa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf3c1, 0xd0ab, 0x003f, 0xd4e4, - 0x003f, 0x003f, 0xefbc, 0xd8a1, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9df, - 0x003f, 0xf3d7, 0x003f, 0x003f, 0x003f, 0xdcbd, 0x003f, 0xcce5, - 0xedf1, 0x003f, 0x003f, 0xf1e2, 0x003f, 0xd4db, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe2b5, 0x003f, 0x003f, 0xcae6, 0x003f, 0xd3ae, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcce6, 0x003f, - 0x003f, 0xf1d3, 0xf5e7, 0x003f, 0x003f, 0x003f, 0x003f, 0xcada, - /* 0x7b00 .. 0x7bff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbee, - 0x003f, 0xe1c5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdfe9, 0x003f, 0xeede, 0x003f, 0x003f, 0xf7c2, 0x003f, - 0xd8a2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xddac, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf0af, 0xd6bd, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe1ab, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf9b6, 0x003f, - 0x003f, 0xd4f5, 0x003f, 0xd0c9, 0xefa7, 0xe2ec, 0x003f, 0xdbea, - 0xcecc, 0xf5e8, 0xf7d5, 0x003f, 0xd3cd, 0x003f, 0xf3fe, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd0b5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe0fe, 0x003f, 0xdffb, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6dd, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8a4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcbcd, - 0x003f, 0x003f, 0x003f, 0xefa8, 0x003f, 0x003f, 0x003f, 0xeeb4, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdad8, 0xd1b9, 0x003f, 0xdfa9, - 0x003f, 0x003f, 0xf3b0, 0x003f, 0x003f, 0xccc4, 0x003f, 0x003f, - 0x003f, 0xceb7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xefa9, 0x003f, 0x003f, - 0x003f, 0xdfd5, 0x003f, 0x003f, 0xedd7, 0x003f, 0x003f, 0x003f, - 0xeec6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xefbd, 0xfcd6, 0x003f, 0x003f, 0xdbf4, 0x003f, 0xefaa, 0xf8b9, - 0x003f, 0xf5e9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe3d9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe1c6, 0x003f, 0x003f, 0x003f, 0xd4bf, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdee8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7c00 .. 0x7cff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf0ea, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf3c2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd3af, 0x003f, - 0x003f, 0xcadb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfcd7, - 0x003f, 0x003f, 0xedd8, 0xe1c7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4d8, 0xd6b3, 0xddad, - 0x003f, 0x003f, 0x003f, 0xd5be, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf1c3, 0xeedf, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd6eb, 0x003f, 0x003f, 0x003f, 0xf4d9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd7e6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdab7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xddfb, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xddcf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd8a3, 0x003f, 0x003f, 0xdad9, 0x003f, 0xf0d8, - 0xefc4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1d8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1d4, 0x003f, 0xedf2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd5db, 0x003f, - 0x003f, 0xd5dc, 0xf3c4, 0xcbd7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe2b6, 0x003f, 0x003f, 0x003f, 0x003f, 0xeff1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xfbd5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd3d8, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xddd0, 0xf0d9, - 0xcbb3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd5dd, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcda7, 0x003f, 0x003f, 0xd0ac, 0x003f, - /* 0x7d00 .. 0x7dff */ - 0xd1ba, 0x003f, 0xf1c4, 0x003f, 0xe5b3, 0xfbf5, 0xe9e1, 0xfde0, - 0xfcbc, 0x003f, 0xdaa2, 0xdaa3, 0x003f, 0xd2a1, 0x003f, 0x003f, - 0xd2ef, 0x003f, 0x003f, 0x003f, 0xe2ed, 0x003f, 0x003f, 0xdee9, - 0xcedc, 0xf2b5, 0xd0e4, 0xddd1, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe1c8, 0xdbb7, 0xdfe3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xedb9, 0xf1c5, 0x003f, 0xf3cf, 0xd7ab, - 0xe1ac, 0x003f, 0x003f, 0xe3eb, 0x003f, 0xeec7, 0x003f, 0x003f, - 0x003f, 0xe1c9, 0xcafa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf0fb, 0xfae1, 0xf0da, 0xcce7, 0xdaf4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xccbf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xceed, 0x003f, - 0x003f, 0xd5a9, 0xfae2, 0x003f, 0x003f, 0x003f, 0xd0e5, 0x003f, - 0xebd6, 0x003f, 0xecdf, 0x003f, 0x003f, 0x003f, 0xdffc, 0x003f, - 0x003f, 0xf7d6, 0xdeea, 0xcbb4, 0x003f, 0x003f, 0xefbe, 0x003f, - 0x003f, 0xccb5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcfbd, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeff2, 0xe2b7, - 0x003f, 0x003f, 0x003f, 0xcce8, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf0fc, 0x003f, 0x003f, 0x003f, - 0xd6e0, 0x003f, 0xf1c6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe2b8, 0xebab, 0x003f, 0x003f, - 0x003f, 0xcbb5, 0xd8d1, 0x003f, 0xf4ce, 0xf3f7, 0x003f, 0x003f, - 0xd7c6, 0x003f, 0xd1bb, 0xf7aa, 0x003f, 0xedca, 0xd7d3, 0xd8fa, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf6c5, - 0x003f, 0x003f, 0xd1cc, 0xddfc, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdffd, 0x003f, - 0xf9e5, 0x003f, 0xe0ca, 0x003f, 0x003f, 0xf2fd, 0xd3b0, 0x003f, - 0xf4f3, 0xdac9, 0x003f, 0xe6de, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf8ba, 0xe8d0, 0x003f, 0x003f, 0xd8fb, 0x003f, 0x003f, 0xead5, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd6a3, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf6c6, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7e00 .. 0x7eff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf2db, 0xe4fc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8b2, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdada, 0x003f, 0xf2dc, 0xfbd6, 0xe9b2, - 0x003f, 0xeead, 0x003f, 0xfae3, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdcee, 0x003f, 0x003f, 0xf5ea, 0xe6e0, - 0x003f, 0xf0fd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd7ac, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5c5, 0xeee0, 0x003f, - 0x003f, 0xdbe5, 0x003f, 0xddde, 0x003f, 0x003f, 0xd9f0, 0xe9a3, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf1f9, 0x003f, 0xf2c4, 0xe0cb, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9a4, 0x003f, - 0x003f, 0xe2b9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe3b1, 0xfceb, 0xcda8, 0x003f, 0xccb6, 0x003f, 0x003f, - 0xf0db, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe6ba, 0x003f, 0x003f, 0xcda9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf3c3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe1d9, 0x003f, 0x003f, 0xefab, - 0x003f, 0x003f, 0x003f, 0xe7c5, 0x003f, 0x003f, 0xe0e9, 0x003f, - 0xf3c5, 0x003f, 0x003f, 0xd4c0, 0xd5bf, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7f00 .. 0x7fff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xddae, 0x003f, - 0xf9fc, 0x003f, 0xccc0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe5a2, 0x003f, 0x003f, 0x003f, - 0xceb8, 0x003f, 0x003f, 0x003f, 0xd8d2, 0xf9d6, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf1aa, 0xced1, 0x003f, 0x003f, 0xf6c7, 0x003f, - 0xdbeb, 0x003f, 0xdffe, 0x003f, 0x003f, 0xd8e1, 0x003f, 0xf7f3, - 0x003f, 0xd7e7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd4fe, 0x003f, 0x003f, - 0xd1bc, 0x003f, 0xe5cf, 0x003f, 0xcbb6, 0x003f, 0xdab8, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcdc4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd6be, 0x003f, 0x003f, 0x003f, 0xe2ba, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcfd8, 0x003f, 0x003f, 0x003f, - 0xe0cc, 0xebf9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xfdfd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd7e8, 0xcbd8, 0x003f, 0x003f, 0x003f, 0xe9e2, 0x003f, 0x003f, - 0x003f, 0xe8ba, 0x003f, 0x003f, 0x003f, 0xe3c7, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeccd, 0x003f, 0xecce, 0x003f, 0xd6bf, 0x003f, - 0x003f, 0x003f, 0xe3a7, 0x003f, 0xdfd6, 0xfde8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeee1, - 0xf6a8, 0xddfd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf8bb, 0x003f, 0xe8d1, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf9d7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xceee, 0x003f, 0x003f, 0xeccf, 0x003f, 0x003f, 0x003f, - /* 0x8000 .. 0x80ff */ - 0xe9a5, 0xd6d5, 0x003f, 0xcdc5, 0x003f, 0xedba, 0xd1bd, 0x003f, - 0x003f, 0xcfbe, 0x003f, 0x003f, 0xecbb, 0x003f, 0x003f, 0x003f, - 0xd2b1, 0x003f, 0x003f, 0x003f, 0x003f, 0xcce9, 0x003f, 0xd9c4, - 0xe9fc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd1be, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xecbc, 0x003f, 0x003f, 0xe5ad, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf7b0, 0x003f, 0xccea, - 0x003f, 0x003f, 0x003f, 0xd3c4, 0x003f, 0x003f, 0xd6c0, 0x003f, - 0x003f, 0x003f, 0xd6fd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1a1, 0x003f, - 0xdebd, 0x003f, 0xf6a9, 0x003f, 0x003f, 0x003f, 0xdaa4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd6a4, - 0xf5c6, 0x003f, 0xe1a2, 0xe9c6, 0x003f, 0x003f, 0x003f, 0xf2c5, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4e9, 0xd6ec, 0xebd3, - 0x003f, 0x003f, 0x003f, 0x003f, 0xecbd, 0xe2dc, 0xdeeb, 0xf0dc, - 0x003f, 0xebbf, 0x003f, 0xd7ce, 0xd1bf, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5ab, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf9fd, 0x003f, 0xcadc, 0x003f, 0x003f, - 0x003f, 0xcdc6, 0xf2b6, 0x003f, 0x003f, 0xddfe, 0x003f, 0x003f, - 0x003f, 0xccb7, 0xdbb8, 0x003f, 0x003f, 0x003f, 0x003f, 0xd0e9, - 0x003f, 0xcedd, 0xebc0, 0x003f, 0xfda2, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf8cb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xead6, 0xf1b0, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdbce, 0x003f, 0xf7c3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdbcf, 0xcba4, 0x003f, 0x003f, 0xf8e0, 0x003f, - 0x003f, 0xfbd7, 0x003f, 0x003f, 0xebca, 0xe0a1, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcecd, 0x003f, 0x003f, 0xd4dc, 0x003f, 0x003f, 0x003f, - 0xfdd8, 0x003f, 0x003f, 0x003f, 0x003f, 0xd2f6, 0x003f, 0x003f, - /* 0x8100 .. 0x81ff */ - 0x003f, 0x003f, 0xf2b7, 0x003f, 0x003f, 0xfaf6, 0xf6aa, 0xfaf7, - 0xd8e6, 0x003f, 0xf4b1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe8d2, 0x003f, 0xcac5, 0xcceb, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe2ee, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe2bb, 0x003f, 0xf7ad, 0x003f, 0x003f, 0x003f, 0xf8e1, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf3ec, 0x003f, 0x003f, 0x003f, 0x003f, 0xdea1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe4fd, 0x003f, 0x003f, 0xe3ec, 0x003f, - 0xddaf, 0xddb0, 0x003f, 0x003f, 0xcbb7, 0xe8d3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1a3, 0xd2e0, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf0fe, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe9a6, 0xcbf2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xedf3, 0xdcd9, 0xe0cd, 0x003f, 0x003f, 0x003f, 0x003f, 0xf7da, - 0xdbb9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xccae, 0x003f, 0xdadb, 0x003f, 0x003f, 0x003f, 0x003f, 0xcdc7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xddb1, 0x003f, 0xd8af, 0xe3a3, 0x003f, 0x003f, - 0xceef, 0x003f, 0x003f, 0xf2f3, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf8b3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe0ce, 0x003f, 0xf5fd, 0x003f, 0x003f, - 0x003f, 0x003f, 0xebec, 0x003f, 0x003f, 0xd3c5, 0xfcec, 0xd2db, - 0xd4eb, 0x003f, 0xdea2, 0x003f, 0x003f, 0x003f, 0xe5e6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf0b0, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd5c4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xedf4, - 0x003f, 0x003f, 0x003f, 0xe3ed, 0x003f, 0xe8c2, 0x003f, 0xedf5, - 0xd7fc, 0x003f, 0xedbb, 0x003f, 0x003f, 0xf6ab, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf2b8, 0xf6c8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd3e6, 0xf2dd, 0xcfbf, 0x003f, 0xebac, 0x003f, - /* 0x8200 .. 0x82ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcfc0, 0x003f, 0xe6a8, - 0xfde9, 0x003f, 0xcfc1, 0x003f, 0xe0df, 0xdeec, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe0a2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf4bf, 0xe2ef, 0x003f, 0xd9f1, 0xf1c7, - 0x003f, 0xcbb8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf9fe, 0xdbba, 0xdaf5, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf6ec, 0xdadc, 0xfae4, - 0x003f, 0xe0cf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xddb2, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6a9, 0x003f, 0xeff3, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf3ed, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xebfa, 0x003f, 0xf9e6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcadd, 0xd5de, - 0x003f, 0xcade, 0xdfe4, 0x003f, 0x003f, 0x003f, 0xe6fd, 0x003f, - 0xf5ac, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4f5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe9e3, 0x003f, 0xedcb, 0xcfe4, 0x003f, - 0x003f, 0x003f, 0xd8d3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xddb3, 0xd4ec, 0x003f, 0x003f, 0xf2b9, 0x003f, 0xdfb7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcbce, 0xfbd8, 0x003f, - 0x003f, 0xd0d9, 0x003f, 0x003f, 0xddd2, 0xf7f4, 0xe7dc, 0xe4a5, - 0x003f, 0xfca3, 0x003f, 0xdbbb, 0x003f, 0x003f, 0x003f, 0xf2ba, - 0xe9fd, 0xd0ca, 0x003f, 0xf5d6, 0xd9c5, 0xe4b4, 0x003f, 0xeda7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeabd, 0xe6fe, 0x003f, 0xf7c4, 0xf5ad, 0x003f, 0xd9e0, - 0x003f, 0x003f, 0x003f, 0xcab4, 0x003f, 0x003f, 0xf8e2, 0xcfc2, - 0x003f, 0xecbe, 0x003f, 0x003f, 0x003f, 0xe5b4, 0xcdc8, 0xeec8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe7c8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcdc9, 0xf9b7, 0x003f, - /* 0x8300 .. 0x83ff */ - 0x003f, 0xf1e8, 0xd9f2, 0xdbf5, 0xcab5, 0xd9c6, 0x003f, 0x003f, - 0x003f, 0xd8c9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9ab, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xedbc, 0x003f, 0x003f, 0xd8d4, 0x003f, 0x003f, 0x003f, 0xdcda, - 0x003f, 0xe2bc, 0x003f, 0x003f, 0xfced, 0xece0, 0xd2fe, 0x003f, - 0xe9c7, 0xe6aa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe2f0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfabb, - 0x003f, 0xf5ae, 0xfbaa, 0x003f, 0x003f, 0x003f, 0x003f, 0xecfb, - 0x003f, 0xecbf, 0xfcd8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd4e5, 0x003f, 0x003f, 0x003f, 0xf9c3, - 0x003f, 0x003f, 0x003f, 0xeee2, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd7e9, 0xedf6, 0x003f, 0x003f, 0x003f, 0xdeed, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xccec, 0x003f, - 0xe3ee, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8d4, 0x003f, - 0x003f, 0x003f, 0xfaf8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xddb4, 0xe4b5, 0xd8b0, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd8d5, 0x003f, 0x003f, - 0x003f, 0xf4ea, 0x003f, 0x003f, 0x003f, 0xceb9, 0x003f, 0x003f, - 0x003f, 0xd6e1, 0xcfd2, 0x003f, 0xd0b6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcea2, 0x003f, 0x003f, 0xf3ee, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf3f8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdccc, 0x003f, 0xd0cb, 0x003f, 0x003f, 0x003f, 0xfca4, - 0xcdca, 0xd7d4, 0xdea3, 0x003f, 0xe4e0, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeec9, 0x003f, 0x003f, 0x003f, 0xe2dd, 0x003f, 0x003f, - /* 0x8400 .. 0x84ff */ - 0x003f, 0x003f, 0x003f, 0xf5fe, 0xd4ac, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd5d1, 0x003f, 0xd8f0, 0xf8c3, 0xead7, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf5d7, 0x003f, 0x003f, 0xd8bf, 0x003f, 0x003f, 0x003f, - 0x003f, 0xfdc0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xebad, 0x003f, 0x003f, 0x003f, 0x003f, 0xd5aa, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe7a8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeeca, - 0x003f, 0x003f, 0x003f, 0xcae7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf8e3, 0x003f, 0xd4dd, 0x003f, 0x003f, 0xead8, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfbd9, 0xedf7, 0x003f, 0x003f, 0xe5b5, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd0ad, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf1f1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe2bd, 0x003f, 0x003f, 0x003f, 0xe3c8, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd9d5, 0x003f, 0x003f, 0xdfaa, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdbbc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf8e4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf1fa, 0x003f, 0x003f, 0xe5b6, 0xf3ef, 0x003f, 0x003f, 0xfbda, - 0xe1e0, 0x003f, 0xd9ac, 0x003f, 0xf5eb, 0x003f, 0xe0b6, 0x003f, - 0x003f, 0xe9c8, 0x003f, 0xcbcf, 0x003f, 0xe3c9, 0x003f, 0x003f, - 0x003f, 0xdeee, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe2be, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdcef, 0x003f, 0xd6a5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe2f1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd6fe, 0x003f, 0x003f, 0x003f, - /* 0x8500 .. 0x85ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd9a1, 0x003f, 0xd8c0, 0xdcdb, 0x003f, 0x003f, 0xedbd, - 0xdfb8, 0x003f, 0xeaa5, 0x003f, 0x003f, 0x003f, 0xd7ad, 0x003f, - 0x003f, 0xf3f9, 0x003f, 0xedf8, 0x003f, 0xf5c7, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe1ca, 0xebe3, 0x003f, 0xf2de, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf8cc, 0x003f, 0xead9, - 0x003f, 0xd3c6, 0x003f, 0xdbe6, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf5af, 0x003f, 0x003f, 0x003f, 0x003f, 0xcef0, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe9fe, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xfbb6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe2f2, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcff2, 0xf7b9, 0xd9f3, 0x003f, 0x003f, 0xe1cb, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdadd, 0x003f, 0x003f, 0xdab9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xebfb, - 0x003f, 0xcbb9, 0x003f, 0x003f, 0xedf9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe0e0, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4c0, 0x003f, - 0xfdbc, 0xdfb1, 0xe3ef, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0a3, - 0xfdb9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf0b1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcdcb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xedbe, 0x003f, 0x003f, 0x003f, 0xd5c0, 0xe3f0, 0xedfa, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9e4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd5ed, 0xe7dd, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd4f6, 0xe5b7, 0x003f, 0x003f, - 0x003f, 0xdbe7, 0xe2bf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeecb, - 0x003f, 0x003f, 0xd7f4, 0xf0dd, 0x003f, 0x003f, 0x003f, 0xceab, - /* 0x8600 .. 0x86ff */ - 0x003f, 0x003f, 0xe7de, 0x003f, 0x003f, 0x003f, 0xd6d6, 0xe1cc, - 0x003f, 0x003f, 0xe8b3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5ee, 0xdca2, - 0x003f, 0x003f, 0xe0d0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd5b5, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd5a1, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbdb, 0x003f, - 0xf9cb, 0x003f, 0x003f, 0x003f, 0xcbf3, 0xf4a5, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfac8, 0xd6d7, 0x003f, 0xe9e5, 0xfbdc, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfdd0, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xfbf6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdaa5, 0x003f, 0xdbbd, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xece2, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcdf7, 0xf0de, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf6c9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdeef, - 0x003f, 0x003f, 0x003f, 0xd3b1, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xfcee, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe8c3, 0x003f, 0xf1c8, 0x003f, 0x003f, 0x003f, 0xcef1, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf9ed, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2f4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4b6, 0x003f, - /* 0x8700 .. 0x87ff */ - 0xf5b9, 0x003f, 0xdcf0, 0xe3f1, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe8a5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf2bb, 0x003f, 0xdea4, 0x003f, 0xdacc, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcae9, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3da, 0x003f, 0xfcd9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeada, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf9c4, 0x003f, - 0xe3a4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xfbdd, 0x003f, 0xefca, 0x003f, - 0xe8c4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd5cc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xebd7, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9ad, - 0x003f, 0x003f, 0xfbab, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd3d9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd5a2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf6de, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdaf6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe0d1, 0x003f, 0x003f, 0xe9a8, - 0x003f, 0x003f, 0xf5f9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xfaaf, 0x003f, 0xebfc, 0x003f, 0x003f, 0xe0ea, 0x003f, - /* 0x8800 .. 0x88ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3b2, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd5c5, - 0x003f, 0x003f, 0xf1e3, 0xd5ee, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcdcc, 0x003f, 0x003f, 0x003f, 0x003f, 0xedd9, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd8c1, 0x003f, 0x003f, 0x003f, 0x003f, - 0xfaec, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1eb, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xfabc, 0xe6e2, 0x003f, 0x003f, - 0x003f, 0x003f, 0xfae5, 0xe2fa, 0x003f, 0x003f, 0x003f, 0xcab6, - 0x003f, 0xe4b7, 0x003f, 0xeadb, 0x003f, 0xf5fa, 0x003f, 0x003f, - 0x003f, 0xfbac, 0xcfc3, 0xebfd, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf8fa, 0x003f, 0x003f, 0xdfb9, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe1f1, 0x003f, 0xd2a4, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5fb, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd0da, 0xd0db, - 0x003f, 0xeabe, 0xd9b1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcab7, 0x003f, 0x003f, 0xd3e7, 0x003f, 0xf8e5, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd3b2, 0x003f, 0x003f, 0x003f, 0xe2c0, 0xf2df, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcde5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf9ac, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcdcd, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeeae, 0xd6ae, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd7ea, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe7e0, 0xebae, 0x003f, 0x003f, - 0x003f, 0xcfd9, 0x003f, 0x003f, 0xdccd, 0xedfb, 0x003f, 0xdef0, - 0x003f, 0xd7eb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdea5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdfd7, 0xdbd0, 0xdbd1, 0x003f, 0x003f, - 0xd5a3, 0x003f, 0x003f, 0x003f, 0x003f, 0xf0b2, 0x003f, 0x003f, - /* 0x8900 .. 0x89ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdcdc, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcae8, 0x003f, 0xf8e6, 0xdcce, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeadc, 0xdbd2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9b3, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf7db, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3a8, 0x003f, - 0xd7ae, 0x003f, 0x003f, 0xe0e1, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcbba, 0x003f, 0x003f, 0xe5d1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd0dc, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd5c1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd8ca, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe3a9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0a4, - 0x003f, 0xe9a9, 0x003f, 0xd3c7, 0x003f, 0x003f, 0xdcdd, 0xf8ae, - 0x003f, 0x003f, 0x003f, 0xccb8, 0x003f, 0x003f, 0x003f, 0xd0ae, - 0x003f, 0x003f, 0x003f, 0xd8f2, 0x003f, 0x003f, 0xe3ca, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xccaf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd4ad, 0xf6d1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd0cc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcac6, 0x003f, 0x003f, 0xd5c2, 0x003f, 0x003f, - 0xceba, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcac7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfab0, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdfd8, 0x003f, 0x003f, 0x003f, - 0xf5ba, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x8a00 .. 0x8aff */ - 0xe5eb, 0x003f, 0xeff4, 0xddb5, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcdaa, 0x003f, 0xe3f2, 0x003f, 0xfbf7, 0x003f, 0xf7d0, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfdba, 0x003f, 0x003f, 0xfde1, 0xf6fe, - 0xd1c0, 0x003f, 0x003f, 0xe8c5, 0x003f, 0xe4b8, 0x003f, 0xe1e8, - 0x003f, 0x003f, 0x003f, 0xccc1, 0x003f, 0xd2ed, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdbbe, 0x003f, 0x003f, 0xe0e2, 0x003f, 0x003f, - 0x003f, 0xfac9, 0x003f, 0x003f, 0xe1cd, 0x003f, 0xcab8, 0x003f, - 0x003f, 0x003f, 0xf2e0, 0xf1c9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdef1, 0x003f, 0x003f, 0x003f, 0xf0df, 0xf8c4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xeecc, 0x003f, 0x003f, 0xdef2, 0x003f, - 0xe7c9, 0x003f, 0xe2f3, 0xe7e1, 0x003f, 0x003f, 0xe3cb, 0x003f, - 0x003f, 0xe3cc, 0x003f, 0x003f, 0x003f, 0xcff8, 0xefac, 0x003f, - 0xfdfe, 0xfca5, 0xfab1, 0xdfd9, 0x003f, 0xe0d2, 0x003f, 0x003f, - 0x003f, 0xf4da, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1ca, 0x003f, 0xcea3, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf2bc, 0xece3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe0a5, 0x003f, 0xf7ab, 0x003f, 0x003f, - 0xebaf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5de, 0x003f, - 0xe1a4, 0xcdab, 0x003f, 0xd9f4, 0xe8a6, 0xcdce, 0xe1e9, 0x003f, - 0xfcef, 0x003f, 0xe0e3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe2c1, 0x003f, 0xcea4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdea6, 0x003f, 0x003f, 0xebfe, 0x003f, 0xebdd, 0xf0e0, - 0x003f, 0x003f, 0xf4db, 0x003f, 0xe2f4, 0x003f, 0x003f, 0xd3c8, - 0x003f, 0x003f, 0x003f, 0xf4eb, 0x003f, 0xeeb5, 0x003f, 0xf5d8, - 0x003f, 0x003f, 0xd5df, 0x003f, 0x003f, 0x003f, 0xd6e5, 0x003f, - 0x003f, 0x003f, 0x003f, 0xebb0, 0xf4e3, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe3cd, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4f4, 0xfab2, - 0x003f, 0x003f, 0xeff5, 0xcadf, 0x003f, 0xebb1, 0xedbf, 0x003f, - 0x003f, 0xfdc9, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4a6, 0xf9a4, - 0xf0b3, 0x003f, 0xe5ec, 0x003f, 0x003f, 0x003f, 0xd1e7, 0x003f, - /* 0x8b00 .. 0x8bff */ - 0xd9c7, 0xe4d7, 0xeadd, 0x003f, 0xd4f7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdaba, 0x003f, - 0xdacd, 0x003f, 0x003f, 0x003f, 0xf9cc, 0x003f, 0xe1da, 0xdbbf, - 0x003f, 0xccc5, 0xecd0, 0xcbbb, 0x003f, 0xdef3, 0x003f, 0x003f, - 0xe9aa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd9c8, 0x003f, 0x003f, 0xeee3, 0xd7bd, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcfc4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd0cd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xfca6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf1fb, 0x003f, 0x003f, 0x003f, 0x003f, 0xfdd2, 0xd1c1, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe3db, 0x003f, 0xd3c9, 0x003f, 0xdccf, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcced, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdea7, 0x003f, 0x003f, 0xe6bb, - 0xeca1, 0x003f, 0x003f, 0x003f, 0xccb9, 0x003f, 0x003f, 0xfbde, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7e2, 0x003f, 0x003f, - 0xd4c1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdca8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe2c2, 0x003f, 0xf3d8, 0xe5d3, 0x003f, 0x003f, 0xf3d9, 0x003f, - 0x003f, 0x003f, 0xf3c6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x8c00 .. 0x8cff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcddb, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcdac, - 0x003f, 0xfcc3, 0x003f, 0x003f, 0x003f, 0x003f, 0xd4e7, 0x003f, - 0xd1c2, 0x003f, 0xf9a5, 0x003f, 0xe8d5, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3ce, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd4ca, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdfda, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xfbdf, 0xe7e3, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf8fb, 0xe3cf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf5b0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd8e7, 0x003f, 0xd9c9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf8af, 0xeff6, 0x003f, - 0xddb6, 0xeeaf, 0xcdf8, 0x003f, 0x003f, 0x003f, 0x003f, 0xdeb8, - 0xfca7, 0xf7fc, 0xf7b1, 0xcebb, 0xf4a1, 0x003f, 0x003f, 0xeecd, - 0xe1ae, 0x003f, 0x003f, 0xecc3, 0xcffe, 0x003f, 0xf8bf, 0xd8e2, - 0xd3e8, 0x003f, 0x003f, 0xdea8, 0xf4e4, 0xecc2, 0x003f, 0xd9f5, - 0xf9c5, 0xddd3, 0xd6f1, 0xecfc, 0xfcf0, 0x003f, 0x003f, 0xedc0, - 0xcab9, 0x003f, 0xeee4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf2e1, 0x003f, 0xdeb9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd6f2, 0x003f, 0xdef4, 0x003f, 0xdfdb, 0x003f, - 0xdbd3, 0x003f, 0xfae7, 0xd8e3, 0xf4c1, 0x003f, 0xddb7, 0x003f, - 0x003f, 0x003f, 0xf2f5, 0x003f, 0x003f, 0xd4ae, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd6f3, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xddb8, 0xcfc5, 0xdfdf, 0x003f, 0x003f, - /* 0x8d00 .. 0x8dff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0xf2be, 0xf6a1, 0x003f, 0xebcb, - 0xf1fc, 0x003f, 0xf3c7, 0x003f, 0x003f, 0xe0eb, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xedfc, 0x003f, 0x003f, 0xe1db, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xeee5, 0x003f, 0xdef5, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfad3, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf1cb, 0x003f, 0x003f, 0xd0af, 0xddb9, 0x003f, 0x003f, 0xd1c3, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5b1, 0x003f, 0x003f, - 0x003f, 0x003f, 0xeac6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf0e1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf6ac, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf5d9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf0eb, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xddba, 0x003f, 0x003f, 0x003f, 0xf2bf, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf7c5, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdba2, 0xf2f6, 0x003f, 0x003f, 0xcaba, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf7f5, 0x003f, 0xcbe5, 0x003f, 0x003f, - 0x003f, 0xeee6, 0x003f, 0xe0d3, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcea5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd6d8, - 0x003f, 0x003f, 0x003f, 0xd4af, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x8e00 .. 0x8eff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe9c9, 0x003f, 0x003f, 0x003f, 0x003f, 0xd3ce, - 0xf4c2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcbe6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf1a1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xebb2, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1a2, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xebb3, 0x003f, 0xf0b4, 0x003f, 0x003f, 0xcbf4, - 0xd4b0, 0xf3b2, 0xfbb7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf5ec, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeee7, - 0xf4b2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf5ed, 0x003f, 0xcff3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf0e2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeece, - 0x003f, 0x003f, 0xf1cc, 0x003f, 0x003f, 0xe5b8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd7f5, 0xe3f3, 0xcfe5, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcfc6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf3b3, 0xe4d8, 0xcff9, 0xcfda, 0x003f, 0x003f, - 0x003f, 0x003f, 0xfacd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6e3, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf2e2, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf5ee, 0x003f, 0x003f, 0xcabb, 0x003f, 0x003f, 0xe3dc, 0x003f, - /* 0x8f00 .. 0x8fff */ - 0x003f, 0x003f, 0x003f, 0xcef2, 0x003f, 0xd6d9, 0x003f, 0x003f, - 0x003f, 0xeeb0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf4e5, 0xd8c2, 0xdcd0, 0xccee, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd5e0, 0xf6ca, 0xfdca, 0xd8d6, 0xf4cf, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd6a6, 0xdcbe, - 0x003f, 0xdbd4, 0xd7c7, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2fe, - 0x003f, 0x003f, 0x003f, 0xf1cd, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe2c3, 0xdcde, 0x003f, 0xdcdf, 0x003f, 0x003f, 0xefad, 0xe6ab, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf9dd, 0xeabf, 0x003f, 0x003f, - 0x003f, 0xefae, 0x003f, 0x003f, 0x003f, 0xf4d0, 0xcef3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6ac, 0x003f, 0xcede, - 0x003f, 0x003f, 0xd5f9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe3f4, 0xcdd0, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd5b8, 0x003f, 0x003f, 0xf7fd, 0x003f, - 0xdca9, 0x003f, 0x003f, 0x003f, 0x003f, 0xdef6, 0x003f, 0xdcaa, - 0xf2e3, 0xe9b4, 0xd2dc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe9e6, 0x003f, 0x003f, 0xe3f6, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7ca, 0x003f, - 0x003f, 0xd0ce, 0x003f, 0x003f, 0xdaf7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcabc, 0x003f, - 0x003f, 0x003f, 0xeee8, 0xdade, 0x003f, 0xf2f7, 0x003f, 0x003f, - 0xe2fb, 0x003f, 0xcca6, 0x003f, 0x003f, 0x003f, 0x003f, 0xdabb, - 0x003f, 0xeee9, 0x003f, 0x003f, 0x003f, 0xf5da, 0x003f, 0x003f, - /* 0x9000 .. 0x90ff */ - 0xf7dc, 0xe1ea, 0xcec1, 0xd4b1, 0x003f, 0xfdb1, 0xe6bd, 0x003f, - 0xfbad, 0x003f, 0x003f, 0xf8e7, 0x003f, 0xe1ce, 0x003f, 0xf7e2, - 0xf5ef, 0xcfc7, 0x003f, 0x003f, 0xd4b2, 0xccef, 0x003f, 0xd4e8, - 0x003f, 0xeecf, 0xf7d7, 0x003f, 0x003f, 0xe0a6, 0xd6c1, 0xe1dc, - 0xf0e3, 0xf1e4, 0xdcf1, 0xd6a7, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4f5, 0x003f, - 0x003f, 0xf1ce, 0xf2e4, 0x003f, 0x003f, 0xd0b0, 0x003f, 0x003f, - 0xecef, 0x003f, 0x003f, 0x003f, 0xf9ba, 0x003f, 0xebb5, 0x003f, - 0x003f, 0xd4ed, 0xe2c4, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9e7, - 0x003f, 0x003f, 0xebb4, 0xeaa1, 0x003f, 0xf8bc, 0xcea6, 0x003f, - 0xf9c6, 0xfcda, 0x003f, 0xd4b3, 0xd3b9, 0xeade, 0x003f, 0x003f, - 0x003f, 0xe9ab, 0x003f, 0x003f, 0xe1e1, 0xd3cf, 0xf4f6, 0x003f, - 0xeac0, 0xe1cf, 0x003f, 0xccba, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeeea, 0x003f, 0x003f, 0x003f, 0xf0e4, 0xf3b4, 0xd4ee, - 0x003f, 0x003f, 0xf2c0, 0x003f, 0x003f, 0xf1e5, 0x003f, 0xf4c3, - 0xe0d4, 0x003f, 0xebb6, 0x003f, 0xd7a1, 0xcbe8, 0x003f, 0xf9ad, - 0xe9ad, 0xd8e4, 0xfab3, 0xe2c5, 0xfcbd, 0x003f, 0x003f, 0xecc4, - 0xd8b1, 0x003f, 0xdcab, 0x003f, 0x003f, 0x003f, 0x003f, 0xd5a4, - 0x003f, 0xebe9, 0x003f, 0x003f, 0x003f, 0xe8bb, 0x003f, 0x003f, - 0x003f, 0xd8d7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xfbae, 0xd1e1, 0x003f, 0x003f, 0xdbc0, 0x003f, - 0xf5be, 0x003f, 0xdef7, 0x003f, 0x003f, 0x003f, 0x003f, 0xcafb, - 0xf7c6, 0xcfc8, 0x003f, 0x003f, 0x003f, 0xe1d0, 0x003f, 0x003f, - 0xeed0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe9f4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcef4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd5cd, 0x003f, - 0x003f, 0xcfdb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xddbb, 0x003f, 0x003f, 0x003f, 0x003f, 0xceac, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9e8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd4b4, 0x003f, 0x003f, - /* 0x9100 .. 0x91ff */ - 0x003f, 0x003f, 0xe4c7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf5db, 0x003f, 0x003f, 0xfac1, 0x003f, 0x003f, - 0x003f, 0xdea9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd4f8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeff7, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd3b3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xebb7, 0xeff8, 0xf5dc, 0xedcc, 0xdbd5, 0xf1cf, 0x003f, - 0x003f, 0x003f, 0xf1d0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf5b2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd9ae, 0xd5ac, 0x003f, 0xe2c6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfda3, 0x003f, 0xfbe5, - 0xdfab, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2f5, - 0x003f, 0xf6ad, 0x003f, 0xf5b3, 0x003f, 0xf0b5, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe1a5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf5dd, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xeca2, 0xedfd, 0x003f, 0xf5b4, 0xfbb8, - 0x003f, 0xdba3, 0x003f, 0x003f, 0xd6ca, 0xcbd9, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe5d4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3fa, - 0x003f, 0xebb8, 0x003f, 0xe0b7, 0xd7ec, 0xf1ec, 0xe5af, 0xd5e1, - 0xd7ed, 0xd1d1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1f2, - 0xeff9, 0x003f, 0x003f, 0x003f, 0xddbc, 0xf6dc, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf0e5, 0x003f, 0x003f, 0x003f, 0xf4c4, - 0x003f, 0x003f, 0xe9e9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3fb, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9200 .. 0x92ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd4ef, 0x003f, 0x003f, - 0xcca2, 0xf7fe, 0xdfbc, 0x003f, 0x003f, 0x003f, 0x003f, 0xebcd, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd0b7, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd6c2, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe8ad, 0x003f, 0x003f, 0x003f, 0x003f, 0xefaf, - 0xcba5, 0x003f, 0x003f, 0x003f, 0x003f, 0xcbe9, 0x003f, 0x003f, - 0x003f, 0xfae8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xccc6, - 0x003f, 0x003f, 0x003f, 0xe6e7, 0x003f, 0x003f, 0xeac7, 0x003f, - 0x003f, 0x003f, 0xdba4, 0x003f, 0xcfc9, 0xe2fc, 0xeffa, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xebde, 0x003f, 0x003f, 0xf5c8, 0x003f, 0xd4de, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe0d5, 0x003f, 0xefb0, 0x003f, 0x003f, 0xe2c7, 0x003f, - 0xd9af, 0x003f, 0x003f, 0x003f, 0xf9e7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe7e5, 0x003f, 0x003f, 0xcfca, 0xe1d1, - 0x003f, 0xe2c8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xeffb, 0x003f, 0x003f, 0xfaf9, - 0x003f, 0x003f, 0xdcf2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe0a7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf8e8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcbea, 0x003f, 0x003f, 0x003f, 0xcbbc, 0x003f, 0x003f, 0x003f, - /* 0x9300 .. 0x93ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0xd6e2, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf5de, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf5df, 0x003f, 0xeeb6, 0x003f, 0x003f, 0x003f, 0xe2f6, 0xd3ca, - 0xeffc, 0xd1c4, 0xefb1, 0x003f, 0xd1c5, 0x003f, 0xd0de, 0x003f, - 0xd9e1, 0x003f, 0x003f, 0xe0b8, 0x003f, 0x003f, 0xcdd1, 0xf3b9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe7cc, 0x003f, 0xd6a8, 0xcea7, 0x003f, 0xd4b5, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe4c8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd3b4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xebb9, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcbf5, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf6dd, 0x003f, 0xf1a3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xccc7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe9ca, 0x003f, 0xe1f0, 0x003f, - 0x003f, 0x003f, 0xf5e0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfbaf, 0x003f, 0x003f, 0x003f, 0xcbd1, - 0x003f, 0x003f, 0x003f, 0x003f, 0xfbe0, 0xf2e5, 0x003f, 0x003f, - 0xecf0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf0ec, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeeeb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9cb, 0x003f, - 0x003f, 0xccf0, 0x003f, 0x003f, 0xd7af, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3a1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9400 .. 0x94ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0xfcf5, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf1a4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0d6, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xefb2, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4d1, 0x003f, 0x003f, - 0xf7a1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf1d1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcafc, 0xcafd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcece, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf3c8, 0x003f, 0xf3ba, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9500 .. 0x95ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xedfe, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdaa6, 0x003f, 0x003f, 0xe0ec, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf8cd, 0x003f, 0xcbd2, 0x003f, 0x003f, 0x003f, 0xebce, - 0x003f, 0xf9d8, 0xf9d9, 0xcae0, 0xdaca, 0x003f, 0x003f, 0x003f, - 0xcba6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcac8, 0xf9ee, 0xdbec, 0x003f, 0x003f, - 0xd0b1, 0x003f, 0x003f, 0x003f, 0x003f, 0xd5ef, 0x003f, 0x003f, - 0x003f, 0xe6f3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe7a2, 0xe4d9, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4e1, - 0x003f, 0x003f, 0xfcc4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf9ef, 0xcff4, 0xf7e6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcebc, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf4c5, 0xdca3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9600 .. 0x96ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xddbd, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf4c6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf8a1, 0x003f, 0x003f, 0x003f, 0xe8d6, 0x003f, - 0x003f, 0x003f, 0xdbc1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf0e6, 0x003f, 0x003f, 0x003f, 0xe4b9, - 0xf6ed, 0x003f, 0xf9ae, 0x003f, 0xddbe, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd7b0, 0xd8e8, 0xcbbd, 0x003f, 0x003f, - 0xf9da, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf8ce, 0xf9f0, 0xe0ed, 0xe3b3, 0xf4b3, - 0x003f, 0x003f, 0xeac2, 0xf2e6, 0xf0b6, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdbd6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xebe4, 0x003f, 0x003f, 0xf2e7, 0x003f, 0xd7d5, 0xd4b6, 0xf9e8, - 0xd7c1, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5d5, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9ea, 0xd7cc, 0x003f, - 0x003f, 0x003f, 0xd3e9, 0xe2c9, 0x003f, 0xfcdb, 0xcdad, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xccb0, 0xeaa2, 0x003f, 0x003f, - 0xe4f6, 0xd0c0, 0x003f, 0xf0b7, 0xeea1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd7f6, 0x003f, 0x003f, 0x003f, 0xe2ca, - 0xe2cb, 0x003f, 0xfacf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xebdf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd6cb, - 0x003f, 0x003f, 0x003f, 0xf4b4, 0x003f, 0x003f, 0x003f, 0x003f, - 0xedcd, 0xe4d2, 0x003f, 0x003f, 0xeaa9, 0xe4ba, 0xf3a2, 0xcdd2, - 0x003f, 0xf6cb, 0x003f, 0xf1e6, 0xedc1, 0xe8bc, 0xeed1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf0e7, 0xe2cc, 0x003f, - 0x003f, 0xe4aa, 0x003f, 0xf5e1, 0xedda, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd7ee, 0xd1f1, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe9eb, 0xe9ec, 0xe0e4, 0x003f, 0x003f, 0x003f, 0x003f, 0xdaa7, - 0xddd4, 0x003f, 0xeaa3, 0x003f, 0x003f, 0x003f, 0xd6c3, 0xd6f4, - 0x003f, 0xdadf, 0x003f, 0xefb3, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9700 .. 0x97ff */ - 0xe2cd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeffd, 0xf2e8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xefc5, 0x003f, 0xe7e7, 0x003f, 0x003f, 0xd7fd, 0x003f, - 0x003f, 0xe7ce, 0x003f, 0x003f, 0xdfdc, 0x003f, 0xf9c7, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9f6, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdfac, 0x003f, 0xd6da, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdca4, 0x003f, 0x003f, 0x003f, 0xf0b8, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd5fa, 0x003f, 0xe4f7, 0x003f, 0x003f, 0x003f, - 0xd6c4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf4ec, 0x003f, 0x003f, 0x003f, 0x003f, 0xeffe, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf0a1, 0x003f, 0xdeaa, 0x003f, - 0x003f, 0xdabc, 0xd8fc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xfad4, 0x003f, 0x003f, 0x003f, 0xece5, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xfca8, 0x003f, 0x003f, 0xece6, - 0x003f, 0x003f, 0xd8cb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfbb9, 0x003f, 0xe4d3, 0x003f, 0xcdf9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcfd3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcaea, 0x003f, 0x003f, 0xcfd4, 0x003f, 0xf8bd, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4c7, 0x003f, - 0x003f, 0x003f, 0x003f, 0xeadf, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf9db, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd4b7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xebe5, 0x003f, 0x003f, 0xe1d2, 0x003f, - 0x003f, 0x003f, 0x003f, 0xeaa4, 0x003f, 0x003f, 0x003f, 0xfac2, - /* 0x9800 .. 0x98ff */ - 0xfbe1, 0xfaed, 0xf0a2, 0xccf1, 0x003f, 0xfaa3, 0xe2f7, 0x003f, - 0xe2ce, 0x003f, 0xe9f5, 0x003f, 0xe1eb, 0x003f, 0x003f, 0x003f, - 0xe7e8, 0xe8d7, 0xdaf8, 0xd4cb, 0x003f, 0x003f, 0x003f, 0xf7f6, - 0xd6c5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd4e9, 0x003f, 0x003f, - 0xfafa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xccf2, 0xf7dd, 0x003f, 0xdeba, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcea8, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf0b9, 0xe4fe, 0xe4c9, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe4d4, 0x003f, 0x003f, 0x003f, - 0xeac3, 0x003f, 0xefb4, 0x003f, 0x003f, 0x003f, 0xd7be, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfbe2, 0x003f, 0xcdd3, - 0x003f, 0x003f, 0x003f, 0xefb5, 0x003f, 0x003f, 0x003f, 0xfae9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf9a6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdfbd, - 0x003f, 0xf7c7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf8fd, 0x003f, 0x003f, 0xf8fc, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdeab, 0xdbe8, 0x003f, 0x003f, 0xe3dd, - 0x003f, 0xe1e2, 0xd1c6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf6d0, 0xebe6, 0xdaf9, - 0x003f, 0x003f, 0x003f, 0x003f, 0xecc7, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdef8, 0xf8e9, 0xe3de, 0x003f, - /* 0x9900 .. 0x99ff */ - 0x003f, 0x003f, 0x003f, 0xcef5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xfac3, 0xe5d7, 0x003f, 0xecc8, 0x003f, 0x003f, 0x003f, - 0xf3c9, 0x003f, 0x003f, 0xe4bb, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe6ae, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xefb6, 0x003f, - 0xdcbf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcebd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd8c3, 0x003f, 0x003f, - 0x003f, 0xd0cf, 0x003f, 0xcffa, 0xf3ca, 0xe0d7, 0x003f, 0x003f, - 0x003f, 0xd1c7, 0xe9ae, 0x003f, 0xe8bd, 0x003f, 0x003f, 0xfac4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2cf, 0x003f, - 0x003f, 0xfac5, 0x003f, 0x003f, 0x003f, 0xf9b8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdce0, 0x003f, 0x003f, - 0xfbb0, 0x003f, 0x003f, 0x003f, 0xd8a9, 0xe5df, 0xf9a7, 0x003f, - 0x003f, 0xf6ee, 0x003f, 0xf6cc, 0xe2f8, 0x003f, 0x003f, 0x003f, - 0x003f, 0xecf1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdae0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf1d2, 0xd2cc, 0xcfcb, 0x003f, 0x003f, 0xcabd, 0x003f, 0x003f, - 0x003f, 0xddbf, 0x003f, 0x003f, 0x003f, 0xf6ef, 0x003f, 0xdef9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfab4, 0x003f, 0x003f, - 0x003f, 0xd5ad, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1e7, - /* 0x9a00 .. 0x9aff */ - 0x003f, 0xdebe, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdcc0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd1c8, 0xd1c9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf8be, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcbf6, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd4f9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5e2, 0xe1d3, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd8e9, 0x003f, 0x003f, 0xf8fe, 0x003f, 0xcfcc, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfda4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcef6, 0x003f, 0xfad0, - 0x003f, 0x003f, 0xccf3, 0xe6be, 0x003f, 0x003f, 0x003f, 0xf6ae, - 0x003f, 0x003f, 0xd5f0, 0x003f, 0x003f, 0xd1ca, 0x003f, 0x003f, - 0x003f, 0xfcbe, 0xd5f1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcde9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xfab5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe2d0, 0xf4f7, 0x003f, 0x003f, 0x003f, - 0xcdd4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe7a3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdba5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9b00 .. 0x9bff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe2d1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd7a2, - 0x003f, 0x003f, 0xf7e3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeaa6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd0a1, 0x003f, 0x003f, 0x003f, - 0x003f, 0xceda, 0xfbeb, 0xdba6, 0xdbde, 0xd8e5, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeae0, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd8aa, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe5e0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd6db, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xefc6, 0x003f, - 0x003f, 0xf8ea, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4d5, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcef7, 0x003f, 0x003f, 0xe0d8, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd7ef, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4ed, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcde6, 0x003f, 0x003f, 0x003f, - 0xccf4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9c00 .. 0x9cff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf5e3, 0x003f, 0x003f, - 0xe4ca, 0x003f, 0xdce1, 0x003f, 0x003f, 0xf9c8, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xfcbf, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe8a7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd8c4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcbbe, - 0x003f, 0xdcae, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd7f7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf0e8, 0x003f, 0xddc0, - 0x003f, 0xcfcd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdcf3, 0xd9b0, 0x003f, 0xe6e9, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9d00 .. 0x9dff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe4bc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xeac4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4ec, 0x003f, - 0xe4e5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfbf8, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xccbb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4bd, 0x003f, 0x003f, - 0xcddc, 0xd9f7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdddf, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xedce, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd9d0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe5a3, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf9cd, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcdae, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcfce, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf6af, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xfdd3, 0xebed, 0xd6dc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9e00 .. 0x9eff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe5a4, 0x003f, 0x003f, 0x003f, 0xd5b6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd6dd, 0x003f, 0x003f, - 0x003f, 0xf9e9, 0x003f, 0x003f, 0x003f, 0xe7a4, 0x003f, 0xd6e3, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd1cb, 0xd6e4, 0x003f, 0x003f, 0x003f, 0xd5f2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdefa, 0x003f, 0xd7f8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd8ea, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcfd5, 0xd8fd, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd8ab, 0x003f, 0x003f, 0xfdcb, 0x003f, - 0x003f, 0x003f, 0x003f, 0xfcdc, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0a8, 0xd5f3, 0x003f, - 0x003f, 0xfdd9, 0x003f, 0x003f, 0xcca3, 0x003f, 0x003f, 0x003f, - 0xd9f9, 0x003f, 0x003f, 0xd3ea, 0xf5f5, 0x003f, 0xefc7, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd3da, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdabd, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9f00 .. 0x9fff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe8a8, - 0xdcaf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf0a3, 0x003f, - 0x003f, 0x003f, 0x003f, 0xcdd5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe0a9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdeac, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf0ba, 0xeeb1, 0x003f, 0x003f, 0xeeb2, 0x003f, - 0x003f, 0x003f, 0xf6cd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xeed2, - 0x003f, 0xd6c6, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe0e5, - 0x003f, 0x003f, 0xf3bb, 0x003f, 0xe5e1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4cb, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd7a3, 0x003f, 0x003f, - 0xdbc2, 0x003f, 0x003f, 0x003f, 0x003f, 0xcafe, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcfcf, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xac00 .. 0xacff */ - 0xb0a1, 0xb0a2, 0x8141, 0x8142, 0xb0a3, 0x8143, 0x8144, 0xb0a4, - 0xb0a5, 0xb0a6, 0xb0a7, 0x8145, 0x8146, 0x8147, 0x8148, 0x8149, - 0xb0a8, 0xb0a9, 0xb0aa, 0xb0ab, 0xb0ac, 0xb0ad, 0xb0ae, 0xb0af, - 0x814a, 0xb0b0, 0xb0b1, 0xb0b2, 0xb0b3, 0xb0b4, 0x814b, 0x814c, - 0xb0b5, 0x814d, 0x814e, 0x814f, 0xb0b6, 0x8150, 0x8151, 0x8152, - 0x8153, 0x8154, 0x8155, 0x8156, 0xb0b7, 0xb0b8, 0x8157, 0xb0b9, - 0xb0ba, 0xb0bb, 0x8158, 0x8159, 0x815a, 0x8161, 0x8162, 0x8163, - 0xb0bc, 0xb0bd, 0x8164, 0x8165, 0xb0be, 0x8166, 0x8167, 0x8168, - 0xb0bf, 0x8169, 0x816a, 0x816b, 0x816c, 0x816d, 0x816e, 0x816f, - 0x8170, 0x8171, 0x8172, 0xb0c0, 0x8173, 0xb0c1, 0x8174, 0x8175, - 0x8176, 0x8177, 0x8178, 0x8179, 0xb0c2, 0x817a, 0x8181, 0x8182, - 0xb0c3, 0x8183, 0x8184, 0x8185, 0xb0c4, 0x8186, 0x8187, 0x8188, - 0x8189, 0x818a, 0x818b, 0x818c, 0x818d, 0x818e, 0x818f, 0x8190, - 0x8191, 0x8192, 0x8193, 0x8194, 0x8195, 0x8196, 0x8197, 0x8198, - 0xb0c5, 0xb0c6, 0x8199, 0x819a, 0xb0c7, 0x819b, 0x819c, 0xb0c8, - 0xb0c9, 0x819d, 0xb0ca, 0x819e, 0x819f, 0x81a0, 0x81a1, 0x81a2, - 0xb0cb, 0xb0cc, 0x81a3, 0xb0cd, 0xb0ce, 0xb0cf, 0xb0d0, 0x81a4, - 0x81a5, 0xb0d1, 0xb0d2, 0xb0d3, 0xb0d4, 0x81a6, 0x81a7, 0x81a8, - 0xb0d5, 0x81a9, 0x81aa, 0x81ab, 0xb0d6, 0x81ac, 0x81ad, 0x81ae, - 0x81af, 0x81b0, 0x81b1, 0x81b2, 0xb0d7, 0xb0d8, 0x81b3, 0xb0d9, - 0xb0da, 0xb0db, 0x81b4, 0x81b5, 0x81b6, 0x81b7, 0x81b8, 0x81b9, - 0xb0dc, 0xb0dd, 0xb0de, 0x81ba, 0xb0df, 0x81bb, 0x81bc, 0xb0e0, - 0xb0e1, 0x81bd, 0x81be, 0x81bf, 0x81c0, 0x81c1, 0x81c2, 0x81c3, - 0xb0e2, 0xb0e3, 0x81c4, 0xb0e4, 0xb0e5, 0xb0e6, 0x81c5, 0x81c6, - 0x81c7, 0xb0e7, 0x81c8, 0x81c9, 0xb0e8, 0x81ca, 0x81cb, 0x81cc, - 0xb0e9, 0x81cd, 0x81ce, 0x81cf, 0xb0ea, 0x81d0, 0x81d1, 0x81d2, - 0x81d3, 0x81d4, 0x81d5, 0x81d6, 0x81d7, 0xb0eb, 0x81d8, 0xb0ec, - 0x81d9, 0x81da, 0x81db, 0x81dc, 0x81dd, 0x81de, 0x81df, 0x81e0, - 0xb0ed, 0xb0ee, 0x81e1, 0x81e2, 0xb0ef, 0x81e3, 0x81e4, 0xb0f0, - 0xb0f1, 0x81e5, 0xb0f2, 0x81e6, 0xb0f3, 0x81e7, 0x81e8, 0xb0f4, - 0xb0f5, 0xb0f6, 0x81e9, 0xb0f7, 0x81ea, 0xb0f8, 0xb0f9, 0x81eb, - 0x81ec, 0x81ed, 0x81ee, 0x81ef, 0xb0fa, 0xb0fb, 0x81f0, 0x81f1, - /* 0xad00 .. 0xadff */ - 0xb0fc, 0x81f2, 0x81f3, 0x81f4, 0xb0fd, 0x81f5, 0xb0fe, 0x81f6, - 0x81f7, 0x81f8, 0x81f9, 0x81fa, 0xb1a1, 0xb1a2, 0x81fb, 0xb1a3, - 0x81fc, 0xb1a4, 0x81fd, 0x81fe, 0x8241, 0x8242, 0x8243, 0x8244, - 0xb1a5, 0x8245, 0x8246, 0x8247, 0xb1a6, 0x8248, 0x8249, 0x824a, - 0xb1a7, 0x824b, 0x824c, 0x824d, 0x824e, 0x824f, 0x8250, 0x8251, - 0x8252, 0xb1a8, 0x8253, 0x8254, 0xb1a9, 0xb1aa, 0x8255, 0x8256, - 0x8257, 0x8258, 0x8259, 0x825a, 0xb1ab, 0xb1ac, 0x8261, 0x8262, - 0xb1ad, 0x8263, 0x8264, 0x8265, 0xb1ae, 0x8266, 0x8267, 0x8268, - 0x8269, 0x826a, 0x826b, 0x826c, 0xb1af, 0xb1b0, 0x826d, 0xb1b1, - 0x826e, 0xb1b2, 0x826f, 0x8270, 0x8271, 0x8272, 0x8273, 0x8274, - 0xb1b3, 0x8275, 0x8276, 0x8277, 0xb1b4, 0x8278, 0x8279, 0x827a, - 0xb1b5, 0x8281, 0x8282, 0x8283, 0x8284, 0x8285, 0x8286, 0x8287, - 0x8288, 0xb1b6, 0x8289, 0xb1b7, 0x828a, 0x828b, 0x828c, 0x828d, - 0x828e, 0x828f, 0x8290, 0x8291, 0xb1b8, 0xb1b9, 0x8292, 0x8293, - 0xb1ba, 0x8294, 0x8295, 0xb1bb, 0xb1bc, 0xb1bd, 0xb1be, 0x8296, - 0x8297, 0x8298, 0x8299, 0xb1bf, 0xb1c0, 0xb1c1, 0x829a, 0xb1c2, - 0x829b, 0xb1c3, 0xb1c4, 0x829c, 0x829d, 0x829e, 0x829f, 0x82a0, - 0xb1c5, 0xb1c6, 0x82a1, 0x82a2, 0xb1c7, 0x82a3, 0x82a4, 0x82a5, - 0xb1c8, 0x82a6, 0x82a7, 0x82a8, 0x82a9, 0x82aa, 0x82ab, 0x82ac, - 0x82ad, 0x82ae, 0x82af, 0x82b0, 0xb1c9, 0xb1ca, 0x82b1, 0x82b2, - 0x82b3, 0x82b4, 0x82b5, 0x82b6, 0xb1cb, 0x82b7, 0x82b8, 0x82b9, - 0x82ba, 0x82bb, 0x82bc, 0x82bd, 0x82be, 0x82bf, 0x82c0, 0x82c1, - 0x82c2, 0x82c3, 0x82c4, 0x82c5, 0x82c6, 0x82c7, 0x82c8, 0xb1cc, - 0x82c9, 0x82ca, 0x82cb, 0x82cc, 0x82cd, 0x82ce, 0x82cf, 0x82d0, - 0xb1cd, 0xb1ce, 0x82d1, 0x82d2, 0xb1cf, 0x82d3, 0x82d4, 0x82d5, - 0xb1d0, 0x82d6, 0x82d7, 0x82d8, 0x82d9, 0x82da, 0x82db, 0x82dc, - 0xb1d1, 0xb1d2, 0x82dd, 0xb1d3, 0x82de, 0x82df, 0x82e0, 0x82e1, - 0x82e2, 0x82e3, 0x82e4, 0x82e5, 0xb1d4, 0x82e6, 0x82e7, 0x82e8, - 0xb1d5, 0x82e9, 0x82ea, 0x82eb, 0xb1d6, 0x82ec, 0x82ed, 0x82ee, - 0x82ef, 0x82f0, 0x82f1, 0x82f2, 0x82f3, 0x82f4, 0x82f5, 0x82f6, - 0x82f7, 0x82f8, 0x82f9, 0x82fa, 0x82fb, 0x82fc, 0x82fd, 0x82fe, - 0xb1d7, 0xb1d8, 0x8341, 0x8342, 0xb1d9, 0x8343, 0x8344, 0xb1da, - /* 0xae00 .. 0xaeff */ - 0xb1db, 0xb1dc, 0x8345, 0x8346, 0x8347, 0x8348, 0x8349, 0x834a, - 0xb1dd, 0xb1de, 0x834b, 0xb1df, 0x834c, 0xb1e0, 0x834d, 0x834e, - 0x834f, 0x8350, 0x8351, 0x8352, 0xb1e1, 0x8353, 0x8354, 0x8355, - 0x8356, 0x8357, 0x8358, 0x8359, 0x835a, 0x8361, 0x8362, 0x8363, - 0x8364, 0x8365, 0x8366, 0x8367, 0x8368, 0x8369, 0x836a, 0x836b, - 0x836c, 0x836d, 0x836e, 0x836f, 0x8370, 0x8371, 0x8372, 0x8373, - 0xb1e2, 0xb1e3, 0x8374, 0x8375, 0xb1e4, 0x8376, 0x8377, 0xb1e5, - 0xb1e6, 0x8378, 0xb1e7, 0x8379, 0x837a, 0x8381, 0x8382, 0x8383, - 0xb1e8, 0xb1e9, 0x8384, 0xb1ea, 0x8385, 0xb1eb, 0xb1ec, 0x8386, - 0x8387, 0x8388, 0xb1ed, 0x8389, 0xb1ee, 0xb1ef, 0xb1f0, 0x838a, - 0xb1f1, 0x838b, 0x838c, 0x838d, 0xb1f2, 0x838e, 0xb1f3, 0x838f, - 0x8390, 0x8391, 0x8392, 0x8393, 0xb1f4, 0xb1f5, 0x8394, 0xb1f6, - 0xb1f7, 0xb1f8, 0x8395, 0x8396, 0x8397, 0xb1f9, 0x8398, 0x8399, - 0xb1fa, 0xb1fb, 0x839a, 0x839b, 0xb1fc, 0x839c, 0x839d, 0x839e, - 0xb1fd, 0x839f, 0x83a0, 0x83a1, 0x83a2, 0x83a3, 0x83a4, 0x83a5, - 0xb1fe, 0xb2a1, 0x83a6, 0xb2a2, 0xb2a3, 0xb2a4, 0x83a7, 0x83a8, - 0x83a9, 0x83aa, 0x83ab, 0x83ac, 0xb2a5, 0xb2a6, 0x83ad, 0x83ae, - 0x83af, 0x83b0, 0x83b1, 0x83b2, 0xb2a7, 0x83b3, 0x83b4, 0x83b5, - 0x83b6, 0x83b7, 0x83b8, 0x83b9, 0x83ba, 0x83bb, 0x83bc, 0x83bd, - 0x83be, 0x83bf, 0x83c0, 0x83c1, 0x83c2, 0x83c3, 0x83c4, 0x83c5, - 0x83c6, 0x83c7, 0x83c8, 0x83c9, 0x83ca, 0x83cb, 0x83cc, 0x83cd, - 0x83ce, 0x83cf, 0x83d0, 0x83d1, 0x83d2, 0x83d3, 0x83d4, 0x83d5, - 0x83d6, 0x83d7, 0x83d8, 0x83d9, 0x83da, 0x83db, 0x83dc, 0x83dd, - 0x83de, 0x83df, 0x83e0, 0x83e1, 0xb2a8, 0xb2a9, 0xb2aa, 0x83e2, - 0xb2ab, 0x83e3, 0x83e4, 0x83e5, 0xb2ac, 0x83e6, 0x83e7, 0x83e8, - 0x83e9, 0x83ea, 0x83eb, 0x83ec, 0xb2ad, 0xb2ae, 0x83ed, 0xb2af, - 0xb2b0, 0xb2b1, 0x83ee, 0x83ef, 0x83f0, 0x83f1, 0x83f2, 0x83f3, - 0xb2b2, 0xb2b3, 0x83f4, 0x83f5, 0xb2b4, 0x83f6, 0x83f7, 0x83f8, - 0x83f9, 0x83fa, 0x83fb, 0x83fc, 0x83fd, 0x83fe, 0x8441, 0x8442, - 0xb2b5, 0x8443, 0x8444, 0xb2b6, 0x8445, 0xb2b7, 0x8446, 0x8447, - 0x8448, 0x8449, 0x844a, 0x844b, 0xb2b8, 0x844c, 0x844d, 0x844e, - 0xb2b9, 0x844f, 0x8450, 0x8451, 0xb2ba, 0x8452, 0x8453, 0x8454, - /* 0xaf00 .. 0xafff */ - 0x8455, 0x8456, 0x8457, 0x8458, 0x8459, 0x845a, 0x8461, 0xb2bb, - 0xb2bc, 0x8462, 0x8463, 0x8464, 0x8465, 0xb2bd, 0x8466, 0x8467, - 0xb2be, 0x8468, 0x8469, 0x846a, 0x846b, 0x846c, 0x846d, 0x846e, - 0x846f, 0x8470, 0x8471, 0x8472, 0x8473, 0x8474, 0x8475, 0x8476, - 0x8477, 0x8478, 0x8479, 0x847a, 0x8481, 0x8482, 0x8483, 0x8484, - 0x8485, 0x8486, 0x8487, 0x8488, 0xb2bf, 0xb2c0, 0x8489, 0x848a, - 0xb2c1, 0x848b, 0xb2c2, 0x848c, 0xb2c3, 0x848d, 0x848e, 0x848f, - 0x8490, 0x8491, 0x8492, 0x8493, 0xb2c4, 0xb2c5, 0x8494, 0xb2c6, - 0x8495, 0xb2c7, 0xb2c8, 0xb2c9, 0x8496, 0x8497, 0x8498, 0x8499, - 0xb2ca, 0xb2cb, 0x849a, 0x849b, 0x849c, 0x849d, 0x849e, 0x849f, - 0xb2cc, 0x84a0, 0x84a1, 0x84a2, 0x84a3, 0x84a4, 0x84a5, 0x84a6, - 0x84a7, 0x84a8, 0x84a9, 0x84aa, 0xb2cd, 0xb2ce, 0x84ab, 0x84ac, - 0x84ad, 0x84ae, 0x84af, 0x84b0, 0xb2cf, 0xb2d0, 0x84b1, 0x84b2, - 0x84b3, 0x84b4, 0x84b5, 0x84b6, 0x84b7, 0x84b8, 0x84b9, 0x84ba, - 0x84bb, 0x84bc, 0x84bd, 0x84be, 0x84bf, 0x84c0, 0x84c1, 0x84c2, - 0x84c3, 0xb2d1, 0x84c4, 0x84c5, 0x84c6, 0x84c7, 0x84c8, 0x84c9, - 0xb2d2, 0x84ca, 0x84cb, 0x84cc, 0xb2d3, 0x84cd, 0x84ce, 0x84cf, - 0xb2d4, 0x84d0, 0x84d1, 0x84d2, 0x84d3, 0x84d4, 0x84d5, 0x84d6, - 0xb2d5, 0xb2d6, 0x84d7, 0x84d8, 0x84d9, 0xb2d7, 0x84da, 0x84db, - 0x84dc, 0x84dd, 0x84de, 0x84df, 0xb2d8, 0x84e0, 0x84e1, 0x84e2, - 0x84e3, 0x84e4, 0x84e5, 0x84e6, 0x84e7, 0x84e8, 0x84e9, 0x84ea, - 0x84eb, 0x84ec, 0x84ed, 0x84ee, 0x84ef, 0x84f0, 0x84f1, 0x84f2, - 0x84f3, 0x84f4, 0x84f5, 0x84f6, 0x84f7, 0x84f8, 0x84f9, 0x84fa, - 0xb2d9, 0xb2da, 0x84fb, 0x84fc, 0xb2db, 0x84fd, 0x84fe, 0x8541, - 0xb2dc, 0x8542, 0x8543, 0x8544, 0x8545, 0x8546, 0x8547, 0xb2dd, - 0xb2de, 0xb2df, 0x8548, 0xb2e0, 0x8549, 0xb2e1, 0xb2e2, 0x854a, - 0x854b, 0x854c, 0x854d, 0x854e, 0xb2e3, 0x854f, 0x8550, 0x8551, - 0x8552, 0x8553, 0x8554, 0x8555, 0xb2e4, 0x8556, 0x8557, 0x8558, - 0x8559, 0x855a, 0x8561, 0x8562, 0x8563, 0x8564, 0x8565, 0x8566, - 0xb2e5, 0xb2e6, 0x8567, 0x8568, 0x8569, 0x856a, 0x856b, 0x856c, - 0xb2e7, 0xb2e8, 0x856d, 0x856e, 0xb2e9, 0x856f, 0x8570, 0x8571, - 0xb2ea, 0x8572, 0x8573, 0x8574, 0x8575, 0x8576, 0x8577, 0x8578, - /* 0xb000 .. 0xb0ff */ - 0xb2eb, 0xb2ec, 0x8579, 0x857a, 0xb2ed, 0x8581, 0x8582, 0x8583, - 0x8584, 0x8585, 0x8586, 0x8587, 0xb2ee, 0x8588, 0x8589, 0x858a, - 0xb2ef, 0x858b, 0x858c, 0x858d, 0xb2f0, 0x858e, 0x858f, 0x8590, - 0x8591, 0x8592, 0x8593, 0x8594, 0xb2f1, 0xb2f2, 0x8595, 0x8596, - 0x8597, 0x8598, 0x8599, 0x859a, 0x859b, 0x859c, 0x859d, 0x859e, - 0xb2f3, 0x859f, 0x85a0, 0x85a1, 0x85a2, 0x85a3, 0x85a4, 0x85a5, - 0x85a6, 0x85a7, 0x85a8, 0x85a9, 0x85aa, 0x85ab, 0x85ac, 0x85ad, - 0x85ae, 0x85af, 0x85b0, 0x85b1, 0x85b2, 0x85b3, 0x85b4, 0x85b5, - 0x85b6, 0x85b7, 0x85b8, 0x85b9, 0xb2f4, 0xb2f5, 0x85ba, 0x85bb, - 0xb2f6, 0x85bc, 0xb2f7, 0x85bd, 0xb2f8, 0x85be, 0xb2f9, 0x85bf, - 0x85c0, 0x85c1, 0x85c2, 0xb2fa, 0xb2fb, 0xb2fc, 0x85c3, 0xb2fd, - 0x85c4, 0xb2fe, 0x85c5, 0x85c6, 0x85c7, 0xb3a1, 0x85c8, 0x85c9, - 0x85ca, 0x85cb, 0x85cc, 0x85cd, 0x85ce, 0x85cf, 0x85d0, 0x85d1, - 0x85d2, 0x85d3, 0x85d4, 0x85d5, 0x85d6, 0x85d7, 0x85d8, 0x85d9, - 0x85da, 0x85db, 0x85dc, 0x85dd, 0x85de, 0x85df, 0x85e0, 0x85e1, - 0x85e2, 0x85e3, 0x85e4, 0x85e5, 0xb3a2, 0xb3a3, 0x85e6, 0x85e7, - 0xb3a4, 0x85e8, 0x85e9, 0x85ea, 0xb3a5, 0x85eb, 0x85ec, 0x85ed, - 0x85ee, 0x85ef, 0x85f0, 0x85f1, 0xb3a6, 0xb3a7, 0x85f2, 0xb3a8, - 0x85f3, 0xb3a9, 0x85f4, 0x85f5, 0x85f6, 0x85f7, 0x85f8, 0x85f9, - 0xb3aa, 0xb3ab, 0xb3ac, 0x85fa, 0xb3ad, 0x85fb, 0x85fc, 0xb3ae, - 0xb3af, 0xb3b0, 0xb3b1, 0x85fd, 0x85fe, 0x8641, 0x8642, 0x8643, - 0xb3b2, 0xb3b3, 0x8644, 0xb3b4, 0xb3b5, 0xb3b6, 0xb3b7, 0xb3b8, - 0x8645, 0xb3b9, 0x8646, 0xb3ba, 0xb3bb, 0xb3bc, 0x8647, 0x8648, - 0xb3bd, 0x8649, 0x864a, 0x864b, 0xb3be, 0x864c, 0x864d, 0x864e, - 0x864f, 0x8650, 0x8651, 0x8652, 0xb3bf, 0xb3c0, 0x8653, 0xb3c1, - 0xb3c2, 0xb3c3, 0x8654, 0x8655, 0x8656, 0x8657, 0x8658, 0x8659, - 0xb3c4, 0xb3c5, 0x865a, 0x8661, 0xb3c6, 0x8662, 0x8663, 0x8664, - 0xb3c7, 0x8665, 0x8666, 0x8667, 0x8668, 0x8669, 0x866a, 0x866b, - 0xb3c8, 0x866c, 0x866d, 0x866e, 0x866f, 0xb3c9, 0x8670, 0x8671, - 0x8672, 0x8673, 0x8674, 0x8675, 0x8676, 0x8677, 0x8678, 0x8679, - 0x867a, 0x8681, 0x8682, 0x8683, 0x8684, 0x8685, 0x8686, 0x8687, - 0x8688, 0x8689, 0x868a, 0x868b, 0x868c, 0x868d, 0x868e, 0x868f, - /* 0xb100 .. 0xb1ff */ - 0x8690, 0x8691, 0x8692, 0x8693, 0x8694, 0x8695, 0x8696, 0x8697, - 0xb3ca, 0xb3cb, 0x8698, 0xb3cc, 0xb3cd, 0x8699, 0x869a, 0x869b, - 0xb3ce, 0x869c, 0xb3cf, 0xb3d0, 0x869d, 0x869e, 0x869f, 0x86a0, - 0xb3d1, 0xb3d2, 0x86a1, 0xb3d3, 0xb3d4, 0xb3d5, 0x86a2, 0x86a3, - 0x86a4, 0x86a5, 0x86a6, 0xb3d6, 0xb3d7, 0xb3d8, 0x86a7, 0x86a8, - 0xb3d9, 0x86a9, 0x86aa, 0x86ab, 0xb3da, 0x86ac, 0x86ad, 0x86ae, - 0x86af, 0x86b0, 0x86b1, 0x86b2, 0xb3db, 0xb3dc, 0x86b3, 0xb3dd, - 0xb3de, 0xb3df, 0x86b4, 0x86b5, 0x86b6, 0x86b7, 0x86b8, 0x86b9, - 0xb3e0, 0xb3e1, 0x86ba, 0x86bb, 0xb3e2, 0x86bc, 0x86bd, 0x86be, - 0xb3e3, 0x86bf, 0x86c0, 0x86c1, 0x86c2, 0x86c3, 0x86c4, 0x86c5, - 0xb3e4, 0xb3e5, 0x86c6, 0x86c7, 0xb3e6, 0xb3e7, 0x86c8, 0x86c9, - 0xb3e8, 0x86ca, 0x86cb, 0x86cc, 0xb3e9, 0x86cd, 0x86ce, 0x86cf, - 0xb3ea, 0x86d0, 0x86d1, 0x86d2, 0x86d3, 0x86d4, 0x86d5, 0x86d6, - 0x86d7, 0x86d8, 0x86d9, 0x86da, 0x86db, 0x86dc, 0x86dd, 0x86de, - 0x86df, 0x86e0, 0x86e1, 0x86e2, 0x86e3, 0x86e4, 0x86e5, 0x86e6, - 0xb3eb, 0xb3ec, 0x86e7, 0x86e8, 0xb3ed, 0x86e9, 0x86ea, 0x86eb, - 0xb3ee, 0x86ec, 0xb3ef, 0x86ed, 0x86ee, 0x86ef, 0x86f0, 0x86f1, - 0xb3f0, 0xb3f1, 0x86f2, 0xb3f2, 0x86f3, 0xb3f3, 0x86f4, 0x86f5, - 0x86f6, 0x86f7, 0xb3f4, 0xb3f5, 0xb3f6, 0x86f8, 0x86f9, 0x86fa, - 0xb3f7, 0x86fb, 0x86fc, 0x86fd, 0xb3f8, 0x86fe, 0x8741, 0x8742, - 0x8743, 0x8744, 0x8745, 0x8746, 0x8747, 0x8748, 0x8749, 0x874a, - 0xb3f9, 0x874b, 0x874c, 0x874d, 0x874e, 0x874f, 0x8750, 0x8751, - 0x8752, 0x8753, 0x8754, 0x8755, 0x8756, 0x8757, 0x8758, 0x8759, - 0x875a, 0x8761, 0x8762, 0x8763, 0x8764, 0x8765, 0x8766, 0x8767, - 0x8768, 0x8769, 0x876a, 0x876b, 0x876c, 0x876d, 0x876e, 0x876f, - 0x8770, 0x8771, 0x8772, 0x8773, 0xb3fa, 0x8774, 0x8775, 0x8776, - 0xb3fb, 0x8777, 0x8778, 0x8779, 0xb3fc, 0x877a, 0x8781, 0x8782, - 0x8783, 0x8784, 0x8785, 0x8786, 0xb3fd, 0xb3fe, 0x8787, 0xb4a1, - 0x8788, 0x8789, 0x878a, 0x878b, 0x878c, 0x878d, 0x878e, 0x878f, - 0xb4a2, 0xb4a3, 0x8790, 0x8791, 0xb4a4, 0x8792, 0x8793, 0x8794, - 0xb4a5, 0x8795, 0x8796, 0x8797, 0x8798, 0x8799, 0x879a, 0x879b, - 0x879c, 0xb4a6, 0x879d, 0xb4a7, 0x879e, 0xb4a8, 0x879f, 0x87a0, - /* 0xb200 .. 0xb2ff */ - 0x87a1, 0x87a2, 0x87a3, 0x87a4, 0xb4a9, 0xb4aa, 0x87a5, 0x87a6, - 0xb4ab, 0x87a7, 0x87a8, 0xb4ac, 0xb4ad, 0x87a9, 0x87aa, 0x87ab, - 0x87ac, 0x87ad, 0x87ae, 0x87af, 0xb4ae, 0xb4af, 0x87b0, 0xb4b0, - 0x87b1, 0xb4b1, 0x87b2, 0x87b3, 0x87b4, 0x87b5, 0x87b6, 0x87b7, - 0xb4b2, 0x87b8, 0x87b9, 0x87ba, 0x87bb, 0x87bc, 0x87bd, 0x87be, - 0x87bf, 0x87c0, 0x87c1, 0x87c2, 0x87c3, 0x87c4, 0x87c5, 0x87c6, - 0x87c7, 0x87c8, 0x87c9, 0x87ca, 0xb4b3, 0x87cb, 0x87cc, 0x87cd, - 0x87ce, 0x87cf, 0x87d0, 0x87d1, 0xb4b4, 0x87d2, 0x87d3, 0x87d4, - 0x87d5, 0x87d6, 0x87d7, 0x87d8, 0x87d9, 0x87da, 0x87db, 0x87dc, - 0x87dd, 0x87de, 0x87df, 0x87e0, 0x87e1, 0x87e2, 0x87e3, 0x87e4, - 0x87e5, 0x87e6, 0x87e7, 0x87e8, 0x87e9, 0x87ea, 0x87eb, 0x87ec, - 0xb4b5, 0x87ed, 0x87ee, 0x87ef, 0xb4b6, 0x87f0, 0x87f1, 0x87f2, - 0xb4b7, 0x87f3, 0x87f4, 0x87f5, 0x87f6, 0x87f7, 0x87f8, 0x87f9, - 0xb4b8, 0xb4b9, 0x87fa, 0x87fb, 0x87fc, 0x87fd, 0x87fe, 0x8841, - 0x8842, 0x8843, 0x8844, 0x8845, 0xb4ba, 0xb4bb, 0x8846, 0x8847, - 0x8848, 0x8849, 0x884a, 0x884b, 0xb4bc, 0x884c, 0x884d, 0x884e, - 0x884f, 0x8850, 0x8851, 0x8852, 0xb4bd, 0xb4be, 0x8853, 0x8854, - 0x8855, 0xb4bf, 0x8856, 0x8857, 0x8858, 0x8859, 0x885a, 0x8861, - 0xb4c0, 0xb4c1, 0x8862, 0x8863, 0xb4c2, 0x8864, 0x8865, 0x8866, - 0xb4c3, 0xb4c4, 0xb4c5, 0x8867, 0x8868, 0x8869, 0x886a, 0x886b, - 0xb4c6, 0xb4c7, 0x886c, 0xb4c8, 0x886d, 0xb4c9, 0xb4ca, 0x886e, - 0x886f, 0x8870, 0xb4cb, 0x8871, 0xb4cc, 0x8872, 0x8873, 0x8874, - 0xb4cd, 0x8875, 0x8876, 0x8877, 0xb4ce, 0x8878, 0x8879, 0x887a, - 0x8881, 0x8882, 0x8883, 0x8884, 0x8885, 0x8886, 0x8887, 0x8888, - 0x8889, 0x888a, 0x888b, 0x888c, 0x888d, 0x888e, 0x888f, 0x8890, - 0xb4cf, 0xb4d0, 0x8891, 0x8892, 0xb4d1, 0x8893, 0x8894, 0x8895, - 0xb4d2, 0x8896, 0xb4d3, 0x8897, 0x8898, 0x8899, 0x889a, 0x889b, - 0xb4d4, 0xb4d5, 0x889c, 0xb4d6, 0x889d, 0xb4d7, 0x889e, 0x889f, - 0x88a0, 0x88a1, 0xb4d8, 0x88a2, 0xb4d9, 0xb4da, 0xb4db, 0x88a3, - 0xb4dc, 0x88a4, 0x88a5, 0xb4dd, 0xb4de, 0xb4df, 0xb4e0, 0xb4e1, - 0x88a6, 0x88a7, 0x88a8, 0xb4e2, 0xb4e3, 0xb4e4, 0x88a9, 0xb4e5, - 0xb4e6, 0xb4e7, 0xb4e8, 0xb4e9, 0x88aa, 0x88ab, 0x88ac, 0xb4ea, - /* 0xb300 .. 0xb3ff */ - 0xb4eb, 0xb4ec, 0x88ad, 0x88ae, 0xb4ed, 0x88af, 0x88b0, 0x88b1, - 0xb4ee, 0x88b2, 0x88b3, 0x88b4, 0x88b5, 0x88b6, 0x88b7, 0x88b8, - 0xb4ef, 0xb4f0, 0x88b9, 0xb4f1, 0xb4f2, 0xb4f3, 0x88ba, 0x88bb, - 0x88bc, 0x88bd, 0x88be, 0x88bf, 0xb4f4, 0x88c0, 0x88c1, 0x88c2, - 0x88c3, 0x88c4, 0x88c5, 0x88c6, 0x88c7, 0x88c8, 0x88c9, 0x88ca, - 0x88cb, 0x88cc, 0x88cd, 0x88ce, 0x88cf, 0x88d0, 0x88d1, 0x88d2, - 0x88d3, 0x88d4, 0x88d5, 0x88d6, 0x88d7, 0x88d8, 0x88d9, 0x88da, - 0x88db, 0x88dc, 0x88dd, 0x88de, 0x88df, 0x88e0, 0x88e1, 0x88e2, - 0x88e3, 0x88e4, 0x88e5, 0x88e6, 0x88e7, 0x88e8, 0x88e9, 0x88ea, - 0x88eb, 0x88ec, 0x88ed, 0x88ee, 0x88ef, 0x88f0, 0x88f1, 0x88f2, - 0x88f3, 0x88f4, 0x88f5, 0x88f6, 0xb4f5, 0xb4f6, 0xb4f7, 0x88f7, - 0xb4f8, 0x88f8, 0x88f9, 0xb4f9, 0xb4fa, 0x88fa, 0xb4fb, 0xb4fc, - 0x88fb, 0x88fc, 0x88fd, 0x88fe, 0xb4fd, 0xb4fe, 0x8941, 0xb5a1, - 0x8942, 0xb5a2, 0x8943, 0xb5a3, 0x8944, 0x8945, 0xb5a4, 0x8946, - 0xb5a5, 0xb5a6, 0x8947, 0x8948, 0xb5a7, 0x8949, 0x894a, 0x894b, - 0xb5a8, 0x894c, 0x894d, 0x894e, 0x894f, 0x8950, 0x8951, 0x8952, - 0xb5a9, 0xb5aa, 0x8953, 0xb5ab, 0xb5ac, 0xb5ad, 0x8954, 0x8955, - 0x8956, 0x8957, 0x8958, 0x8959, 0xb5ae, 0x895a, 0x8961, 0x8962, - 0xb5af, 0x8963, 0x8964, 0x8965, 0xb5b0, 0x8966, 0x8967, 0x8968, - 0x8969, 0x896a, 0x896b, 0x896c, 0x896d, 0x896e, 0x896f, 0x8970, - 0xb5b1, 0xb5b2, 0x8971, 0x8972, 0x8973, 0x8974, 0x8975, 0x8976, - 0xb5b3, 0x8977, 0x8978, 0x8979, 0xb5b4, 0x897a, 0x8981, 0x8982, - 0x8983, 0x8984, 0x8985, 0x8986, 0x8987, 0x8988, 0x8989, 0x898a, - 0x898b, 0x898c, 0x898d, 0x898e, 0x898f, 0x8990, 0x8991, 0x8992, - 0x8993, 0x8994, 0x8995, 0x8996, 0xb5b5, 0xb5b6, 0x8997, 0x8998, - 0xb5b7, 0x8999, 0x899a, 0xb5b8, 0xb5b9, 0x899b, 0xb5ba, 0x899c, - 0xb5bb, 0x899d, 0x899e, 0x899f, 0xb5bc, 0xb5bd, 0x89a0, 0xb5be, - 0x89a1, 0xb5bf, 0x89a2, 0xb5c0, 0x89a3, 0xb5c1, 0x89a4, 0x89a5, - 0xb5c2, 0x89a6, 0x89a7, 0x89a8, 0xb5c3, 0x89a9, 0x89aa, 0x89ab, - 0xb5c4, 0x89ac, 0x89ad, 0x89ae, 0x89af, 0x89b0, 0x89b1, 0x89b2, - 0x89b3, 0x89b4, 0x89b5, 0x89b6, 0x89b7, 0x89b8, 0x89b9, 0x89ba, - 0x89bb, 0x89bc, 0x89bd, 0x89be, 0xb5c5, 0x89bf, 0x89c0, 0x89c1, - /* 0xb400 .. 0xb4ff */ - 0x89c2, 0x89c3, 0x89c4, 0x89c5, 0x89c6, 0x89c7, 0x89c8, 0x89c9, - 0x89ca, 0x89cb, 0x89cc, 0x89cd, 0x89ce, 0x89cf, 0x89d0, 0x89d1, - 0xb5c6, 0x89d2, 0x89d3, 0x89d4, 0x89d5, 0x89d6, 0x89d7, 0x89d8, - 0xb5c7, 0x89d9, 0x89da, 0x89db, 0xb5c8, 0x89dc, 0x89dd, 0x89de, - 0xb5c9, 0x89df, 0x89e0, 0x89e1, 0x89e2, 0x89e3, 0x89e4, 0x89e5, - 0xb5ca, 0xb5cb, 0x89e6, 0xb5cc, 0x89e7, 0x89e8, 0x89e9, 0x89ea, - 0x89eb, 0x89ec, 0x89ed, 0x89ee, 0xb5cd, 0x89ef, 0x89f0, 0x89f1, - 0x89f2, 0x89f3, 0x89f4, 0x89f5, 0x89f6, 0x89f7, 0x89f8, 0x89f9, - 0x89fa, 0x89fb, 0x89fc, 0x89fd, 0x89fe, 0x8a41, 0x8a42, 0x8a43, - 0x8a44, 0x8a45, 0x8a46, 0x8a47, 0x8a48, 0x8a49, 0x8a4a, 0x8a4b, - 0xb5ce, 0xb5cf, 0x8a4c, 0x8a4d, 0xb5d0, 0x8a4e, 0x8a4f, 0x8a50, - 0xb5d1, 0x8a51, 0x8a52, 0x8a53, 0x8a54, 0x8a55, 0x8a56, 0x8a57, - 0xb5d2, 0xb5d3, 0x8a58, 0xb5d4, 0x8a59, 0xb5d5, 0x8a5a, 0x8a61, - 0x8a62, 0x8a63, 0x8a64, 0x8a65, 0xb5d6, 0x8a66, 0x8a67, 0x8a68, - 0x8a69, 0x8a6a, 0x8a6b, 0x8a6c, 0x8a6d, 0x8a6e, 0x8a6f, 0x8a70, - 0x8a71, 0x8a72, 0x8a73, 0x8a74, 0x8a75, 0x8a76, 0x8a77, 0x8a78, - 0xb5d7, 0x8a79, 0x8a7a, 0x8a81, 0x8a82, 0x8a83, 0x8a84, 0x8a85, - 0xb5d8, 0x8a86, 0x8a87, 0x8a88, 0x8a89, 0x8a8a, 0x8a8b, 0x8a8c, - 0x8a8d, 0x8a8e, 0x8a8f, 0x8a90, 0x8a91, 0x8a92, 0x8a93, 0x8a94, - 0x8a95, 0x8a96, 0x8a97, 0x8a98, 0x8a99, 0xb5d9, 0x8a9a, 0x8a9b, - 0x8a9c, 0x8a9d, 0x8a9e, 0x8a9f, 0xb5da, 0x8aa0, 0x8aa1, 0x8aa2, - 0xb5db, 0x8aa3, 0x8aa4, 0x8aa5, 0xb5dc, 0x8aa6, 0x8aa7, 0x8aa8, - 0x8aa9, 0x8aaa, 0x8aab, 0x8aac, 0x8aad, 0xb5dd, 0x8aae, 0xb5de, - 0x8aaf, 0xb5df, 0x8ab0, 0x8ab1, 0x8ab2, 0x8ab3, 0x8ab4, 0x8ab5, - 0xb5e0, 0x8ab6, 0x8ab7, 0x8ab8, 0xb5e1, 0x8ab9, 0x8aba, 0x8abb, - 0xb5e2, 0x8abc, 0x8abd, 0x8abe, 0x8abf, 0x8ac0, 0x8ac1, 0x8ac2, - 0xb5e3, 0x8ac3, 0x8ac4, 0x8ac5, 0x8ac6, 0xb5e4, 0x8ac7, 0x8ac8, - 0x8ac9, 0x8aca, 0x8acb, 0x8acc, 0xb5e5, 0xb5e6, 0x8acd, 0x8ace, - 0xb5e7, 0x8acf, 0x8ad0, 0xb5e8, 0xb5e9, 0x8ad1, 0xb5ea, 0x8ad2, - 0x8ad3, 0x8ad4, 0x8ad5, 0x8ad6, 0xb5eb, 0xb5ec, 0x8ad7, 0xb5ed, - 0x8ad8, 0xb5ee, 0x8ad9, 0x8ada, 0x8adb, 0x8adc, 0x8add, 0x8ade, - 0xb5ef, 0x8adf, 0x8ae0, 0x8ae1, 0x8ae2, 0x8ae3, 0x8ae4, 0x8ae5, - /* 0xb500 .. 0xb5ff */ - 0x8ae6, 0x8ae7, 0x8ae8, 0x8ae9, 0x8aea, 0x8aeb, 0x8aec, 0x8aed, - 0x8aee, 0x8aef, 0x8af0, 0x8af1, 0x8af2, 0x8af3, 0x8af4, 0x8af5, - 0x8af6, 0x8af7, 0x8af8, 0x8af9, 0xb5f0, 0xb5f1, 0x8afa, 0x8afb, - 0xb5f2, 0x8afc, 0x8afd, 0xb5f3, 0xb5f4, 0x8afe, 0x8b41, 0x8b42, - 0x8b43, 0x8b44, 0x8b45, 0x8b46, 0xb5f5, 0xb5f6, 0x8b47, 0xb5f7, - 0xb5f8, 0xb5f9, 0xb5fa, 0x8b48, 0x8b49, 0x8b4a, 0x8b4b, 0x8b4c, - 0xb5fb, 0xb5fc, 0x8b4d, 0x8b4e, 0xb5fd, 0x8b4f, 0x8b50, 0x8b51, - 0xb5fe, 0x8b52, 0x8b53, 0x8b54, 0x8b55, 0x8b56, 0x8b57, 0x8b58, - 0xb6a1, 0xb6a2, 0x8b59, 0xb6a3, 0xb6a4, 0xb6a5, 0x8b5a, 0x8b61, - 0x8b62, 0x8b63, 0x8b64, 0xb6a6, 0xb6a7, 0xb6a8, 0x8b65, 0x8b66, - 0xb6a9, 0x8b67, 0x8b68, 0x8b69, 0xb6aa, 0x8b6a, 0x8b6b, 0x8b6c, - 0x8b6d, 0x8b6e, 0x8b6f, 0x8b70, 0xb6ab, 0xb6ac, 0x8b71, 0xb6ad, - 0xb6ae, 0xb6af, 0x8b72, 0x8b73, 0x8b74, 0x8b75, 0x8b76, 0x8b77, - 0x8b78, 0x8b79, 0x8b7a, 0x8b81, 0x8b82, 0x8b83, 0x8b84, 0x8b85, - 0x8b86, 0x8b87, 0x8b88, 0x8b89, 0x8b8a, 0x8b8b, 0x8b8c, 0x8b8d, - 0x8b8e, 0x8b8f, 0x8b90, 0x8b91, 0x8b92, 0x8b93, 0x8b94, 0x8b95, - 0x8b96, 0x8b97, 0x8b98, 0x8b99, 0x8b9a, 0x8b9b, 0x8b9c, 0x8b9d, - 0x8b9e, 0x8b9f, 0x8ba0, 0x8ba1, 0x8ba2, 0x8ba3, 0x8ba4, 0x8ba5, - 0x8ba6, 0x8ba7, 0x8ba8, 0x8ba9, 0x8baa, 0x8bab, 0x8bac, 0x8bad, - 0x8bae, 0x8baf, 0x8bb0, 0x8bb1, 0x8bb2, 0x8bb3, 0x8bb4, 0x8bb5, - 0xb6b0, 0xb6b1, 0x8bb6, 0x8bb7, 0xb6b2, 0x8bb8, 0x8bb9, 0x8bba, - 0xb6b3, 0x8bbb, 0xb6b4, 0xb6b5, 0x8bbc, 0x8bbd, 0x8bbe, 0x8bbf, - 0xb6b6, 0xb6b7, 0x8bc0, 0xb6b8, 0xb6b9, 0xb6ba, 0x8bc1, 0x8bc2, - 0x8bc3, 0x8bc4, 0x8bc5, 0xb6bb, 0xb6bc, 0xb6bd, 0x8bc6, 0x8bc7, - 0xb6be, 0x8bc8, 0x8bc9, 0x8bca, 0xb6bf, 0x8bcb, 0x8bcc, 0x8bcd, - 0x8bce, 0x8bcf, 0x8bd0, 0x8bd1, 0xb6c0, 0xb6c1, 0x8bd2, 0xb6c2, - 0xb6c3, 0xb6c4, 0x8bd3, 0x8bd4, 0x8bd5, 0x8bd6, 0x8bd7, 0x8bd8, - 0xb6c5, 0x8bd9, 0x8bda, 0x8bdb, 0x8bdc, 0x8bdd, 0x8bde, 0x8bdf, - 0x8be0, 0x8be1, 0x8be2, 0x8be3, 0x8be4, 0x8be5, 0x8be6, 0x8be7, - 0x8be8, 0x8be9, 0x8bea, 0x8beb, 0xb6c6, 0x8bec, 0x8bed, 0x8bee, - 0x8bef, 0x8bf0, 0x8bf1, 0x8bf2, 0x8bf3, 0x8bf4, 0x8bf5, 0x8bf6, - 0x8bf7, 0x8bf8, 0x8bf9, 0x8bfa, 0x8bfb, 0x8bfc, 0x8bfd, 0x8bfe, - /* 0xb600 .. 0xb6ff */ - 0x8c41, 0x8c42, 0x8c43, 0x8c44, 0x8c45, 0x8c46, 0x8c47, 0x8c48, - 0x8c49, 0x8c4a, 0x8c4b, 0x8c4c, 0x8c4d, 0x8c4e, 0x8c4f, 0x8c50, - 0xb6c7, 0xb6c8, 0x8c51, 0x8c52, 0xb6c9, 0x8c53, 0x8c54, 0x8c55, - 0xb6ca, 0x8c56, 0x8c57, 0x8c58, 0x8c59, 0x8c5a, 0x8c61, 0x8c62, - 0x8c63, 0x8c64, 0x8c65, 0x8c66, 0x8c67, 0xb6cb, 0x8c68, 0x8c69, - 0x8c6a, 0x8c6b, 0x8c6c, 0x8c6d, 0xb6cc, 0x8c6e, 0x8c6f, 0x8c70, - 0x8c71, 0x8c72, 0x8c73, 0x8c74, 0xb6cd, 0x8c75, 0x8c76, 0x8c77, - 0x8c78, 0x8c79, 0x8c7a, 0x8c81, 0x8c82, 0x8c83, 0x8c84, 0x8c85, - 0x8c86, 0x8c87, 0x8c88, 0x8c89, 0x8c8a, 0x8c8b, 0x8c8c, 0x8c8d, - 0xb6ce, 0x8c8e, 0x8c8f, 0x8c90, 0x8c91, 0x8c92, 0x8c93, 0x8c94, - 0x8c95, 0x8c96, 0x8c97, 0x8c98, 0x8c99, 0x8c9a, 0x8c9b, 0x8c9c, - 0x8c9d, 0x8c9e, 0x8c9f, 0x8ca0, 0x8ca1, 0x8ca2, 0x8ca3, 0x8ca4, - 0x8ca5, 0x8ca6, 0x8ca7, 0x8ca8, 0xb6cf, 0x8ca9, 0x8caa, 0x8cab, - 0xb6d0, 0x8cac, 0x8cad, 0x8cae, 0x8caf, 0x8cb0, 0x8cb1, 0x8cb2, - 0x8cb3, 0x8cb4, 0x8cb5, 0x8cb6, 0x8cb7, 0x8cb8, 0x8cb9, 0x8cba, - 0x8cbb, 0x8cbc, 0x8cbd, 0x8cbe, 0x8cbf, 0x8cc0, 0x8cc1, 0x8cc2, - 0x8cc3, 0x8cc4, 0x8cc5, 0x8cc6, 0x8cc7, 0x8cc8, 0x8cc9, 0x8cca, - 0x8ccb, 0x8ccc, 0x8ccd, 0x8cce, 0x8ccf, 0x8cd0, 0x8cd1, 0x8cd2, - 0x8cd3, 0x8cd4, 0x8cd5, 0x8cd6, 0x8cd7, 0x8cd8, 0x8cd9, 0x8cda, - 0x8cdb, 0x8cdc, 0x8cdd, 0x8cde, 0xb6d1, 0xb6d2, 0x8cdf, 0x8ce0, - 0xb6d3, 0x8ce1, 0x8ce2, 0x8ce3, 0xb6d4, 0x8ce4, 0x8ce5, 0x8ce6, - 0x8ce7, 0x8ce8, 0x8ce9, 0xb6d5, 0xb6d6, 0x8cea, 0x8ceb, 0x8cec, - 0x8ced, 0xb6d7, 0x8cee, 0x8cef, 0x8cf0, 0x8cf1, 0x8cf2, 0x8cf3, - 0x8cf4, 0x8cf5, 0x8cf6, 0x8cf7, 0x8cf8, 0x8cf9, 0x8cfa, 0x8cfb, - 0x8cfc, 0x8cfd, 0x8cfe, 0x8d41, 0x8d42, 0x8d43, 0x8d44, 0x8d45, - 0x8d46, 0x8d47, 0x8d48, 0x8d49, 0x8d4a, 0x8d4b, 0x8d4c, 0x8d4d, - 0x8d4e, 0x8d4f, 0x8d50, 0x8d51, 0xb6d8, 0x8d52, 0x8d53, 0x8d54, - 0x8d55, 0x8d56, 0x8d57, 0x8d58, 0x8d59, 0x8d5a, 0x8d61, 0x8d62, - 0x8d63, 0x8d64, 0x8d65, 0x8d66, 0x8d67, 0x8d68, 0x8d69, 0x8d6a, - 0x8d6b, 0x8d6c, 0x8d6d, 0x8d6e, 0x8d6f, 0x8d70, 0x8d71, 0x8d72, - 0xb6d9, 0x8d73, 0x8d74, 0x8d75, 0xb6da, 0x8d76, 0x8d77, 0x8d78, - 0xb6db, 0x8d79, 0x8d7a, 0x8d81, 0x8d82, 0x8d83, 0x8d84, 0x8d85, - /* 0xb700 .. 0xb7ff */ - 0xb6dc, 0xb6dd, 0x8d86, 0x8d87, 0x8d88, 0xb6de, 0x8d89, 0x8d8a, - 0x8d8b, 0x8d8c, 0x8d8d, 0x8d8e, 0x8d8f, 0x8d90, 0x8d91, 0x8d92, - 0x8d93, 0x8d94, 0x8d95, 0x8d96, 0x8d97, 0x8d98, 0x8d99, 0x8d9a, - 0x8d9b, 0x8d9c, 0x8d9d, 0x8d9e, 0x8d9f, 0x8da0, 0x8da1, 0x8da2, - 0x8da3, 0x8da4, 0x8da5, 0x8da6, 0x8da7, 0x8da8, 0x8da9, 0x8daa, - 0xb6df, 0xb6e0, 0x8dab, 0x8dac, 0xb6e1, 0x8dad, 0x8dae, 0xb6e2, - 0xb6e3, 0x8daf, 0x8db0, 0x8db1, 0x8db2, 0x8db3, 0x8db4, 0x8db5, - 0xb6e4, 0xb6e5, 0x8db6, 0xb6e6, 0x8db7, 0x8db8, 0x8db9, 0x8dba, - 0x8dbb, 0x8dbc, 0x8dbd, 0x8dbe, 0xb6e7, 0x8dbf, 0x8dc0, 0x8dc1, - 0xb6e8, 0x8dc2, 0x8dc3, 0x8dc4, 0xb6e9, 0x8dc5, 0x8dc6, 0x8dc7, - 0x8dc8, 0x8dc9, 0x8dca, 0x8dcb, 0xb6ea, 0xb6eb, 0x8dcc, 0x8dcd, - 0x8dce, 0x8dcf, 0x8dd0, 0x8dd1, 0x8dd2, 0x8dd3, 0x8dd4, 0x8dd5, - 0xb6ec, 0x8dd6, 0x8dd7, 0x8dd8, 0xb6ed, 0x8dd9, 0x8dda, 0x8ddb, - 0xb6ee, 0x8ddc, 0x8ddd, 0x8dde, 0x8ddf, 0x8de0, 0x8de1, 0x8de2, - 0xb6ef, 0xb6f0, 0x8de3, 0xb6f1, 0x8de4, 0xb6f2, 0x8de5, 0x8de6, - 0x8de7, 0x8de8, 0x8de9, 0x8dea, 0xb6f3, 0xb6f4, 0x8deb, 0x8dec, - 0xb6f5, 0x8ded, 0x8dee, 0x8def, 0xb6f6, 0x8df0, 0x8df1, 0x8df2, - 0x8df3, 0x8df4, 0x8df5, 0x8df6, 0xb6f7, 0xb6f8, 0x8df7, 0xb6f9, - 0xb6fa, 0xb6fb, 0xb6fc, 0x8df8, 0x8df9, 0x8dfa, 0xb6fd, 0xb6fe, - 0xb7a1, 0xb7a2, 0x8dfb, 0x8dfc, 0xb7a3, 0x8dfd, 0x8dfe, 0x8e41, - 0xb7a4, 0x8e42, 0x8e43, 0x8e44, 0x8e45, 0x8e46, 0x8e47, 0x8e48, - 0xb7a5, 0xb7a6, 0x8e49, 0xb7a7, 0xb7a8, 0xb7a9, 0x8e4a, 0x8e4b, - 0x8e4c, 0x8e4d, 0x8e4e, 0x8e4f, 0xb7aa, 0xb7ab, 0x8e50, 0x8e51, - 0xb7ac, 0x8e52, 0x8e53, 0x8e54, 0x8e55, 0x8e56, 0x8e57, 0x8e58, - 0x8e59, 0x8e5a, 0x8e61, 0x8e62, 0x8e63, 0x8e64, 0x8e65, 0xb7ad, - 0x8e66, 0xb7ae, 0x8e67, 0x8e68, 0x8e69, 0x8e6a, 0x8e6b, 0x8e6c, - 0x8e6d, 0x8e6e, 0x8e6f, 0x8e70, 0x8e71, 0x8e72, 0x8e73, 0x8e74, - 0x8e75, 0x8e76, 0x8e77, 0x8e78, 0x8e79, 0x8e7a, 0x8e81, 0x8e82, - 0x8e83, 0x8e84, 0x8e85, 0x8e86, 0x8e87, 0x8e88, 0x8e89, 0x8e8a, - 0x8e8b, 0x8e8c, 0x8e8d, 0x8e8e, 0xb7af, 0xb7b0, 0x8e8f, 0x8e90, - 0xb7b1, 0x8e91, 0x8e92, 0x8e93, 0xb7b2, 0x8e94, 0x8e95, 0x8e96, - 0x8e97, 0x8e98, 0x8e99, 0x8e9a, 0xb7b3, 0xb7b4, 0x8e9b, 0xb7b5, - /* 0xb800 .. 0xb8ff */ - 0xb7b6, 0xb7b7, 0x8e9c, 0x8e9d, 0x8e9e, 0x8e9f, 0x8ea0, 0xb7b8, - 0xb7b9, 0xb7ba, 0x8ea1, 0x8ea2, 0xb7bb, 0x8ea3, 0x8ea4, 0x8ea5, - 0xb7bc, 0x8ea6, 0x8ea7, 0x8ea8, 0x8ea9, 0x8eaa, 0x8eab, 0x8eac, - 0xb7bd, 0xb7be, 0x8ead, 0xb7bf, 0x8eae, 0xb7c0, 0x8eaf, 0x8eb0, - 0x8eb1, 0x8eb2, 0x8eb3, 0x8eb4, 0xb7c1, 0xb7c2, 0x8eb5, 0x8eb6, - 0xb7c3, 0x8eb7, 0x8eb8, 0x8eb9, 0xb7c4, 0x8eba, 0x8ebb, 0x8ebc, - 0x8ebd, 0x8ebe, 0x8ebf, 0x8ec0, 0xb7c5, 0xb7c6, 0x8ec1, 0xb7c7, - 0xb7c8, 0xb7c9, 0x8ec2, 0x8ec3, 0x8ec4, 0x8ec5, 0x8ec6, 0x8ec7, - 0xb7ca, 0x8ec8, 0x8ec9, 0x8eca, 0xb7cb, 0x8ecb, 0x8ecc, 0x8ecd, - 0x8ece, 0x8ecf, 0x8ed0, 0x8ed1, 0x8ed2, 0x8ed3, 0x8ed4, 0x8ed5, - 0x8ed6, 0xb7cc, 0x8ed7, 0xb7cd, 0x8ed8, 0x8ed9, 0x8eda, 0x8edb, - 0x8edc, 0x8edd, 0x8ede, 0x8edf, 0xb7ce, 0xb7cf, 0x8ee0, 0x8ee1, - 0xb7d0, 0x8ee2, 0x8ee3, 0x8ee4, 0xb7d1, 0x8ee5, 0x8ee6, 0x8ee7, - 0x8ee8, 0x8ee9, 0x8eea, 0x8eeb, 0xb7d2, 0xb7d3, 0x8eec, 0xb7d4, - 0x8eed, 0xb7d5, 0x8eee, 0x8eef, 0x8ef0, 0x8ef1, 0x8ef2, 0x8ef3, - 0xb7d6, 0x8ef4, 0x8ef5, 0x8ef6, 0xb7d7, 0x8ef7, 0x8ef8, 0x8ef9, - 0x8efa, 0x8efb, 0x8efc, 0x8efd, 0x8efe, 0x8f41, 0x8f42, 0x8f43, - 0x8f44, 0x8f45, 0x8f46, 0x8f47, 0x8f48, 0xb7d8, 0x8f49, 0x8f4a, - 0x8f4b, 0x8f4c, 0x8f4d, 0x8f4e, 0x8f4f, 0x8f50, 0x8f51, 0x8f52, - 0x8f53, 0x8f54, 0x8f55, 0x8f56, 0x8f57, 0x8f58, 0x8f59, 0x8f5a, - 0x8f61, 0x8f62, 0x8f63, 0x8f64, 0x8f65, 0x8f66, 0x8f67, 0x8f68, - 0xb7d9, 0x8f69, 0x8f6a, 0x8f6b, 0x8f6c, 0x8f6d, 0x8f6e, 0x8f6f, - 0xb7da, 0x8f70, 0x8f71, 0x8f72, 0xb7db, 0x8f73, 0x8f74, 0x8f75, - 0xb7dc, 0x8f76, 0x8f77, 0x8f78, 0x8f79, 0x8f7a, 0x8f81, 0x8f82, - 0xb7dd, 0xb7de, 0x8f83, 0xb7df, 0x8f84, 0xb7e0, 0x8f85, 0x8f86, - 0x8f87, 0x8f88, 0x8f89, 0x8f8a, 0xb7e1, 0x8f8b, 0x8f8c, 0x8f8d, - 0xb7e2, 0x8f8e, 0x8f8f, 0x8f90, 0xb7e3, 0x8f91, 0x8f92, 0x8f93, - 0x8f94, 0x8f95, 0x8f96, 0x8f97, 0x8f98, 0xb7e4, 0x8f99, 0xb7e5, - 0x8f9a, 0xb7e6, 0x8f9b, 0x8f9c, 0x8f9d, 0x8f9e, 0x8f9f, 0x8fa0, - 0xb7e7, 0xb7e8, 0x8fa1, 0x8fa2, 0xb7e9, 0x8fa3, 0x8fa4, 0x8fa5, - 0xb7ea, 0x8fa6, 0x8fa7, 0x8fa8, 0x8fa9, 0x8faa, 0x8fab, 0x8fac, - 0xb7eb, 0xb7ec, 0x8fad, 0xb7ed, 0x8fae, 0xb7ee, 0x8faf, 0x8fb0, - /* 0xb900 .. 0xb9ff */ - 0x8fb1, 0x8fb2, 0x8fb3, 0x8fb4, 0xb7ef, 0x8fb5, 0x8fb6, 0x8fb7, - 0x8fb8, 0x8fb9, 0x8fba, 0x8fbb, 0x8fbc, 0x8fbd, 0x8fbe, 0x8fbf, - 0x8fc0, 0x8fc1, 0x8fc2, 0x8fc3, 0x8fc4, 0x8fc5, 0x8fc6, 0x8fc7, - 0xb7f0, 0x8fc8, 0x8fc9, 0x8fca, 0x8fcb, 0x8fcc, 0x8fcd, 0x8fce, - 0xb7f1, 0x8fcf, 0x8fd0, 0x8fd1, 0x8fd2, 0x8fd3, 0x8fd4, 0x8fd5, - 0x8fd6, 0x8fd7, 0x8fd8, 0x8fd9, 0x8fda, 0x8fdb, 0x8fdc, 0x8fdd, - 0x8fde, 0x8fdf, 0x8fe0, 0x8fe1, 0x8fe2, 0x8fe3, 0x8fe4, 0x8fe5, - 0x8fe6, 0x8fe7, 0x8fe8, 0x8fe9, 0xb7f2, 0xb7f3, 0x8fea, 0x8feb, - 0xb7f4, 0x8fec, 0x8fed, 0x8fee, 0xb7f5, 0x8fef, 0x8ff0, 0x8ff1, - 0x8ff2, 0x8ff3, 0x8ff4, 0x8ff5, 0xb7f6, 0x8ff6, 0x8ff7, 0xb7f7, - 0x8ff8, 0xb7f8, 0x8ff9, 0x8ffa, 0x8ffb, 0x8ffc, 0x8ffd, 0x8ffe, - 0xb7f9, 0xb7fa, 0x9041, 0x9042, 0xb7fb, 0x9043, 0x9044, 0x9045, - 0xb7fc, 0x9046, 0x9047, 0x9048, 0x9049, 0x904a, 0x904b, 0x904c, - 0xb7fd, 0xb7fe, 0x904d, 0xb8a1, 0x904e, 0xb8a2, 0x904f, 0x9050, - 0x9051, 0x9052, 0x9053, 0x9054, 0xb8a3, 0xb8a4, 0x9055, 0x9056, - 0xb8a5, 0x9057, 0x9058, 0x9059, 0xb8a6, 0x905a, 0x9061, 0x9062, - 0x9063, 0x9064, 0x9065, 0x9066, 0xb8a7, 0xb8a8, 0x9067, 0xb8a9, - 0x9068, 0xb8aa, 0xb8ab, 0x9069, 0x906a, 0xb8ac, 0xb8ad, 0x906b, - 0x906c, 0x906d, 0x906e, 0x906f, 0x9070, 0x9071, 0x9072, 0x9073, - 0x9074, 0x9075, 0x9076, 0x9077, 0x9078, 0x9079, 0x907a, 0x9081, - 0x9082, 0x9083, 0x9084, 0x9085, 0x9086, 0x9087, 0x9088, 0x9089, - 0x908a, 0x908b, 0x908c, 0x908d, 0xb8ae, 0xb8af, 0x908e, 0x908f, - 0xb8b0, 0x9090, 0x9091, 0x9092, 0xb8b1, 0x9093, 0x9094, 0x9095, - 0x9096, 0x9097, 0x9098, 0x9099, 0xb8b2, 0xb8b3, 0x909a, 0xb8b4, - 0x909b, 0xb8b5, 0x909c, 0x909d, 0x909e, 0x909f, 0x90a0, 0x90a1, - 0xb8b6, 0xb8b7, 0x90a2, 0x90a3, 0xb8b8, 0x90a4, 0xb8b9, 0xb8ba, - 0xb8bb, 0xb8bc, 0xb8bd, 0x90a5, 0x90a6, 0x90a7, 0x90a8, 0x90a9, - 0xb8be, 0xb8bf, 0x90aa, 0xb8c0, 0x90ab, 0xb8c1, 0xb8c2, 0x90ac, - 0x90ad, 0xb8c3, 0x90ae, 0xb8c4, 0xb8c5, 0xb8c6, 0x90af, 0x90b0, - 0xb8c7, 0x90b1, 0x90b2, 0x90b3, 0xb8c8, 0x90b4, 0x90b5, 0x90b6, - 0x90b7, 0x90b8, 0x90b9, 0x90ba, 0xb8c9, 0xb8ca, 0x90bb, 0xb8cb, - 0xb8cc, 0xb8cd, 0xb8ce, 0x90bc, 0x90bd, 0x90be, 0x90bf, 0x90c0, - /* 0xba00 .. 0xbaff */ - 0xb8cf, 0xb8d0, 0x90c1, 0x90c2, 0x90c3, 0x90c4, 0x90c5, 0x90c6, - 0xb8d1, 0x90c7, 0x90c8, 0x90c9, 0x90ca, 0x90cb, 0x90cc, 0x90cd, - 0x90ce, 0x90cf, 0x90d0, 0x90d1, 0x90d2, 0xb8d2, 0x90d3, 0x90d4, - 0x90d5, 0x90d6, 0x90d7, 0x90d8, 0x90d9, 0x90da, 0x90db, 0x90dc, - 0x90dd, 0x90de, 0x90df, 0x90e0, 0x90e1, 0x90e2, 0x90e3, 0x90e4, - 0x90e5, 0x90e6, 0x90e7, 0x90e8, 0x90e9, 0x90ea, 0x90eb, 0x90ec, - 0x90ed, 0x90ee, 0x90ef, 0x90f0, 0x90f1, 0x90f2, 0x90f3, 0x90f4, - 0xb8d3, 0xb8d4, 0x90f5, 0x90f6, 0xb8d5, 0x90f7, 0x90f8, 0x90f9, - 0xb8d6, 0x90fa, 0xb8d7, 0x90fb, 0x90fc, 0x90fd, 0x90fe, 0x9141, - 0xb8d8, 0xb8d9, 0x9142, 0xb8da, 0x9143, 0xb8db, 0xb8dc, 0x9144, - 0x9145, 0x9146, 0x9147, 0xb8dd, 0xb8de, 0xb8df, 0x9148, 0x9149, - 0xb8e0, 0x914a, 0x914b, 0x914c, 0xb8e1, 0x914d, 0x914e, 0x914f, - 0x9150, 0x9151, 0x9152, 0x9153, 0xb8e2, 0xb8e3, 0x9154, 0xb8e4, - 0xb8e5, 0xb8e6, 0x9155, 0x9156, 0x9157, 0x9158, 0x9159, 0x915a, - 0xb8e7, 0xb8e8, 0x9161, 0x9162, 0xb8e9, 0x9163, 0x9164, 0x9165, - 0xb8ea, 0x9166, 0x9167, 0x9168, 0x9169, 0x916a, 0x916b, 0x916c, - 0x916d, 0x916e, 0x916f, 0xb8eb, 0xb8ec, 0xb8ed, 0x9170, 0xb8ee, - 0x9171, 0x9172, 0x9173, 0x9174, 0xb8ef, 0x9175, 0x9176, 0x9177, - 0x9178, 0x9179, 0x917a, 0x9181, 0x9182, 0x9183, 0x9184, 0x9185, - 0x9186, 0x9187, 0x9188, 0x9189, 0x918a, 0x918b, 0x918c, 0x918d, - 0x918e, 0x918f, 0x9190, 0x9191, 0x9192, 0x9193, 0x9194, 0x9195, - 0xb8f0, 0xb8f1, 0x9196, 0xb8f2, 0xb8f3, 0x9197, 0x9198, 0x9199, - 0xb8f4, 0x919a, 0xb8f5, 0x919b, 0x919c, 0x919d, 0x919e, 0x919f, - 0xb8f6, 0xb8f7, 0x91a0, 0xb8f8, 0x91a1, 0xb8f9, 0x91a2, 0x91a3, - 0x91a4, 0x91a5, 0x91a6, 0x91a7, 0xb8fa, 0x91a8, 0x91a9, 0x91aa, - 0xb8fb, 0x91ab, 0x91ac, 0x91ad, 0x91ae, 0x91af, 0x91b0, 0x91b1, - 0x91b2, 0x91b3, 0x91b4, 0x91b5, 0x91b6, 0x91b7, 0x91b8, 0x91b9, - 0xb8fc, 0xb8fd, 0x91ba, 0x91bb, 0x91bc, 0x91bd, 0x91be, 0x91bf, - 0x91c0, 0x91c1, 0x91c2, 0x91c3, 0x91c4, 0x91c5, 0x91c6, 0x91c7, - 0x91c8, 0x91c9, 0x91ca, 0x91cb, 0x91cc, 0x91cd, 0x91ce, 0x91cf, - 0x91d0, 0x91d1, 0x91d2, 0x91d3, 0x91d4, 0x91d5, 0x91d6, 0x91d7, - 0x91d8, 0x91d9, 0x91da, 0x91db, 0xb8fe, 0x91dc, 0x91dd, 0x91de, - /* 0xbb00 .. 0xbbff */ - 0xb9a1, 0x91df, 0x91e0, 0x91e1, 0xb9a2, 0x91e2, 0x91e3, 0x91e4, - 0x91e5, 0x91e6, 0x91e7, 0x91e8, 0x91e9, 0xb9a3, 0x91ea, 0xb9a4, - 0x91eb, 0xb9a5, 0x91ec, 0x91ed, 0x91ee, 0x91ef, 0x91f0, 0x91f1, - 0xb9a6, 0x91f2, 0x91f3, 0x91f4, 0xb9a7, 0x91f5, 0x91f6, 0x91f7, - 0xb9a8, 0x91f8, 0x91f9, 0x91fa, 0x91fb, 0x91fc, 0x91fd, 0x91fe, - 0x9241, 0xb9a9, 0x9242, 0xb9aa, 0x9243, 0x9244, 0x9245, 0x9246, - 0x9247, 0x9248, 0x9249, 0x924a, 0xb9ab, 0xb9ac, 0xb9ad, 0x924b, - 0xb9ae, 0x924c, 0x924d, 0xb9af, 0xb9b0, 0xb9b1, 0xb9b2, 0x924e, - 0x924f, 0x9250, 0x9251, 0x9252, 0xb9b3, 0xb9b4, 0x9253, 0xb9b5, - 0x9254, 0xb9b6, 0x9255, 0x9256, 0x9257, 0xb9b7, 0x9258, 0xb9b8, - 0xb9b9, 0x9259, 0x925a, 0x9261, 0xb9ba, 0x9262, 0x9263, 0x9264, - 0xb9bb, 0x9265, 0x9266, 0x9267, 0x9268, 0x9269, 0x926a, 0x926b, - 0x926c, 0xb9bc, 0x926d, 0xb9bd, 0x926e, 0x926f, 0x9270, 0x9271, - 0x9272, 0x9273, 0x9274, 0x9275, 0xb9be, 0x9276, 0x9277, 0x9278, - 0x9279, 0x927a, 0x9281, 0x9282, 0x9283, 0x9284, 0x9285, 0x9286, - 0x9287, 0x9288, 0x9289, 0x928a, 0x928b, 0x928c, 0x928d, 0x928e, - 0x928f, 0x9290, 0x9291, 0x9292, 0x9293, 0x9294, 0x9295, 0x9296, - 0xb9bf, 0x9297, 0x9298, 0x9299, 0xb9c0, 0x929a, 0x929b, 0x929c, - 0xb9c1, 0x929d, 0x929e, 0x929f, 0x92a0, 0x92a1, 0x92a2, 0x92a3, - 0x92a4, 0x92a5, 0x92a6, 0x92a7, 0x92a8, 0x92a9, 0x92aa, 0x92ab, - 0x92ac, 0x92ad, 0x92ae, 0x92af, 0xb9c2, 0x92b0, 0x92b1, 0x92b2, - 0xb9c3, 0x92b3, 0x92b4, 0x92b5, 0xb9c4, 0x92b6, 0x92b7, 0x92b8, - 0x92b9, 0x92ba, 0x92bb, 0x92bc, 0xb9c5, 0x92bd, 0x92be, 0xb9c6, - 0x92bf, 0x92c0, 0x92c1, 0x92c2, 0x92c3, 0x92c4, 0x92c5, 0x92c6, - 0xb9c7, 0x92c7, 0x92c8, 0x92c9, 0xb9c8, 0x92ca, 0x92cb, 0x92cc, - 0xb9c9, 0x92cd, 0x92ce, 0x92cf, 0x92d0, 0x92d1, 0x92d2, 0x92d3, - 0xb9ca, 0x92d4, 0x92d5, 0xb9cb, 0x92d6, 0x92d7, 0x92d8, 0x92d9, - 0x92da, 0x92db, 0x92dc, 0x92dd, 0x92de, 0x92df, 0x92e0, 0x92e1, - 0x92e2, 0x92e3, 0x92e4, 0x92e5, 0x92e6, 0x92e7, 0x92e8, 0x92e9, - 0x92ea, 0x92eb, 0x92ec, 0x92ed, 0x92ee, 0x92ef, 0x92f0, 0x92f1, - 0x92f2, 0x92f3, 0x92f4, 0x92f5, 0x92f6, 0x92f7, 0x92f8, 0x92f9, - 0xb9cc, 0xb9cd, 0x92fa, 0x92fb, 0xb9ce, 0x92fc, 0x92fd, 0xb9cf, - /* 0xbc00 .. 0xbcff */ - 0xb9d0, 0x92fe, 0xb9d1, 0x9341, 0x9342, 0x9343, 0x9344, 0x9345, - 0xb9d2, 0xb9d3, 0x9346, 0xb9d4, 0xb9d5, 0xb9d6, 0x9347, 0xb9d7, - 0x9348, 0xb9d8, 0x9349, 0x934a, 0xb9d9, 0xb9da, 0xb9db, 0xb9dc, - 0xb9dd, 0x934b, 0x934c, 0xb9de, 0xb9df, 0xb9e0, 0xb9e1, 0xb9e2, - 0x934d, 0x934e, 0x934f, 0x9350, 0xb9e3, 0xb9e4, 0x9351, 0xb9e5, - 0x9352, 0xb9e6, 0x9353, 0x9354, 0x9355, 0xb9e7, 0x9356, 0x9357, - 0xb9e8, 0xb9e9, 0x9358, 0x9359, 0xb9ea, 0x935a, 0x9361, 0x9362, - 0xb9eb, 0x9363, 0x9364, 0x9365, 0x9366, 0x9367, 0x9368, 0x9369, - 0xb9ec, 0xb9ed, 0x936a, 0xb9ee, 0xb9ef, 0xb9f0, 0x936b, 0x936c, - 0x936d, 0xb9f1, 0x936e, 0x936f, 0xb9f2, 0xb9f3, 0x9370, 0x9371, - 0xb9f4, 0x9372, 0x9373, 0x9374, 0x9375, 0x9376, 0x9377, 0x9378, - 0x9379, 0x937a, 0x9381, 0x9382, 0x9383, 0xb9f5, 0x9384, 0x9385, - 0x9386, 0x9387, 0x9388, 0x9389, 0x938a, 0x938b, 0x938c, 0x938d, - 0x938e, 0x938f, 0x9390, 0x9391, 0x9392, 0x9393, 0x9394, 0x9395, - 0x9396, 0x9397, 0x9398, 0x9399, 0x939a, 0x939b, 0x939c, 0x939d, - 0x939e, 0x939f, 0x93a0, 0x93a1, 0x93a2, 0x93a3, 0x93a4, 0x93a5, - 0x93a6, 0x93a7, 0x93a8, 0x93a9, 0xb9f6, 0xb9f7, 0x93aa, 0x93ab, - 0xb9f8, 0x93ac, 0x93ad, 0xb9f9, 0xb9fa, 0x93ae, 0xb9fb, 0x93af, - 0x93b0, 0x93b1, 0x93b2, 0x93b3, 0xb9fc, 0xb9fd, 0x93b4, 0xb9fe, - 0x93b5, 0xbaa1, 0xbaa2, 0x93b6, 0x93b7, 0x93b8, 0x93b9, 0x93ba, - 0xbaa3, 0xbaa4, 0x93bb, 0x93bc, 0xbaa5, 0x93bd, 0x93be, 0xbaa6, - 0xbaa7, 0x93bf, 0x93c0, 0x93c1, 0x93c2, 0x93c3, 0x93c4, 0x93c5, - 0xbaa8, 0xbaa9, 0x93c6, 0xbaaa, 0xbaab, 0xbaac, 0x93c7, 0x93c8, - 0x93c9, 0x93ca, 0x93cb, 0x93cc, 0xbaad, 0xbaae, 0x93cd, 0x93ce, - 0xbaaf, 0x93cf, 0x93d0, 0x93d1, 0xbab0, 0x93d2, 0x93d3, 0x93d4, - 0x93d5, 0x93d6, 0x93d7, 0x93d8, 0x93d9, 0xbab1, 0x93da, 0xbab2, - 0xbab3, 0xbab4, 0x93db, 0x93dc, 0x93dd, 0xbab5, 0x93de, 0x93df, - 0xbab6, 0x93e0, 0x93e1, 0x93e2, 0xbab7, 0x93e3, 0x93e4, 0x93e5, - 0x93e6, 0x93e7, 0x93e8, 0x93e9, 0x93ea, 0x93eb, 0x93ec, 0x93ed, - 0x93ee, 0x93ef, 0x93f0, 0x93f1, 0x93f2, 0x93f3, 0x93f4, 0x93f5, - 0x93f6, 0x93f7, 0x93f8, 0x93f9, 0xbab8, 0xbab9, 0xbaba, 0x93fa, - 0xbabb, 0x93fb, 0x93fc, 0x93fd, 0xbabc, 0x93fe, 0x9441, 0x9442, - /* 0xbd00 .. 0xbdff */ - 0x9443, 0x9444, 0x9445, 0x9446, 0xbabd, 0xbabe, 0x9447, 0xbabf, - 0x9448, 0xbac0, 0x9449, 0x944a, 0x944b, 0x944c, 0x944d, 0x944e, - 0xbac1, 0x944f, 0x9450, 0x9451, 0xbac2, 0x9452, 0x9453, 0x9454, - 0x9455, 0x9456, 0x9457, 0x9458, 0x9459, 0x945a, 0x9461, 0x9462, - 0x9463, 0x9464, 0x9465, 0x9466, 0xbac3, 0x9467, 0x9468, 0x9469, - 0x946a, 0x946b, 0x946c, 0x946d, 0xbac4, 0x946e, 0x946f, 0x9470, - 0x9471, 0x9472, 0x9473, 0x9474, 0x9475, 0x9476, 0x9477, 0x9478, - 0x9479, 0x947a, 0x9481, 0x9482, 0x9483, 0x9484, 0x9485, 0x9486, - 0xbac5, 0x9487, 0x9488, 0x9489, 0x948a, 0x948b, 0x948c, 0x948d, - 0xbac6, 0xbac7, 0x948e, 0x948f, 0xbac8, 0x9490, 0x9491, 0x9492, - 0xbac9, 0x9493, 0x9494, 0x9495, 0x9496, 0x9497, 0x9498, 0x9499, - 0xbaca, 0xbacb, 0x949a, 0x949b, 0x949c, 0x949d, 0x949e, 0x949f, - 0x94a0, 0x94a1, 0x94a2, 0x94a3, 0xbacc, 0x94a4, 0x94a5, 0x94a6, - 0xbacd, 0x94a7, 0x94a8, 0x94a9, 0x94aa, 0x94ab, 0x94ac, 0x94ad, - 0x94ae, 0x94af, 0x94b0, 0x94b1, 0x94b2, 0x94b3, 0x94b4, 0x94b5, - 0x94b6, 0x94b7, 0x94b8, 0x94b9, 0x94ba, 0x94bb, 0x94bc, 0x94bd, - 0xbace, 0xbacf, 0x94be, 0x94bf, 0xbad0, 0x94c0, 0x94c1, 0xbad1, - 0xbad2, 0xbad3, 0xbad4, 0x94c2, 0x94c3, 0x94c4, 0x94c5, 0x94c6, - 0xbad5, 0xbad6, 0x94c7, 0xbad7, 0x94c8, 0xbad8, 0x94c9, 0x94ca, - 0x94cb, 0xbad9, 0xbada, 0x94cc, 0xbadb, 0x94cd, 0x94ce, 0x94cf, - 0x94d0, 0x94d1, 0x94d2, 0x94d3, 0xbadc, 0x94d4, 0x94d5, 0x94d6, - 0x94d7, 0x94d8, 0x94d9, 0x94da, 0x94db, 0x94dc, 0x94dd, 0x94de, - 0xbadd, 0x94df, 0x94e0, 0x94e1, 0x94e2, 0x94e3, 0x94e4, 0x94e5, - 0xbade, 0x94e6, 0x94e7, 0x94e8, 0x94e9, 0x94ea, 0x94eb, 0x94ec, - 0x94ed, 0x94ee, 0x94ef, 0x94f0, 0x94f1, 0x94f2, 0x94f3, 0x94f4, - 0x94f5, 0x94f6, 0x94f7, 0x94f8, 0x94f9, 0x94fa, 0x94fb, 0x94fc, - 0x94fd, 0x94fe, 0x9541, 0x9542, 0xbadf, 0xbae0, 0x9543, 0x9544, - 0xbae1, 0x9545, 0x9546, 0x9547, 0xbae2, 0x9548, 0x9549, 0x954a, - 0x954b, 0x954c, 0x954d, 0x954e, 0x954f, 0x9550, 0x9551, 0x9552, - 0x9553, 0xbae3, 0x9554, 0x9555, 0x9556, 0x9557, 0x9558, 0x9559, - 0xbae4, 0x955a, 0x9561, 0x9562, 0xbae5, 0x9563, 0x9564, 0x9565, - 0xbae6, 0x9566, 0x9567, 0x9568, 0x9569, 0x956a, 0x956b, 0x956c, - /* 0xbe00 .. 0xbeff */ - 0xbae7, 0x956d, 0x956e, 0xbae8, 0x956f, 0xbae9, 0x9570, 0x9571, - 0x9572, 0x9573, 0x9574, 0x9575, 0xbaea, 0xbaeb, 0x9576, 0x9577, - 0xbaec, 0x9578, 0x9579, 0x957a, 0xbaed, 0x9581, 0x9582, 0x9583, - 0x9584, 0x9585, 0x9586, 0x9587, 0xbaee, 0xbaef, 0x9588, 0xbaf0, - 0x9589, 0x958a, 0x958b, 0x958c, 0x958d, 0x958e, 0x958f, 0x9590, - 0x9591, 0x9592, 0x9593, 0x9594, 0x9595, 0x9596, 0x9597, 0x9598, - 0x9599, 0x959a, 0x959b, 0x959c, 0x959d, 0x959e, 0x959f, 0x95a0, - 0x95a1, 0x95a2, 0x95a3, 0x95a4, 0x95a5, 0x95a6, 0x95a7, 0x95a8, - 0x95a9, 0x95aa, 0x95ab, 0x95ac, 0xbaf1, 0xbaf2, 0x95ad, 0x95ae, - 0xbaf3, 0x95af, 0x95b0, 0x95b1, 0xbaf4, 0x95b2, 0xbaf5, 0x95b3, - 0x95b4, 0x95b5, 0x95b6, 0x95b7, 0xbaf6, 0xbaf7, 0x95b8, 0xbaf8, - 0x95b9, 0xbaf9, 0xbafa, 0xbafb, 0x95ba, 0x95bb, 0x95bc, 0x95bd, - 0xbafc, 0xbafd, 0x95be, 0x95bf, 0xbafe, 0x95c0, 0x95c1, 0x95c2, - 0xbba1, 0x95c3, 0xbba2, 0x95c4, 0x95c5, 0x95c6, 0x95c7, 0x95c8, - 0xbba3, 0xbba4, 0x95c9, 0xbba5, 0xbba6, 0xbba7, 0x95ca, 0x95cb, - 0x95cc, 0x95cd, 0x95ce, 0xbba8, 0xbba9, 0xbbaa, 0x95cf, 0x95d0, - 0xbbab, 0x95d1, 0x95d2, 0x95d3, 0xbbac, 0x95d4, 0x95d5, 0x95d6, - 0x95d7, 0x95d8, 0x95d9, 0x95da, 0xbbad, 0xbbae, 0x95db, 0xbbaf, - 0xbbb0, 0xbbb1, 0x95dc, 0x95dd, 0x95de, 0x95df, 0x95e0, 0x95e1, - 0xbbb2, 0xbbb3, 0x95e2, 0x95e3, 0x95e4, 0x95e5, 0x95e6, 0x95e7, - 0x95e8, 0x95e9, 0x95ea, 0x95eb, 0x95ec, 0x95ed, 0x95ee, 0x95ef, - 0xbbb4, 0x95f0, 0x95f1, 0x95f2, 0x95f3, 0x95f4, 0x95f5, 0x95f6, - 0x95f7, 0x95f8, 0x95f9, 0x95fa, 0x95fb, 0x95fc, 0x95fd, 0x95fe, - 0x9641, 0x9642, 0x9643, 0x9644, 0x9645, 0x9646, 0x9647, 0x9648, - 0x9649, 0x964a, 0x964b, 0x964c, 0x964d, 0x964e, 0x964f, 0x9650, - 0x9651, 0x9652, 0x9653, 0x9654, 0x9655, 0x9656, 0x9657, 0x9658, - 0xbbb5, 0xbbb6, 0x9659, 0x965a, 0xbbb7, 0x9661, 0x9662, 0xbbb8, - 0xbbb9, 0x9663, 0x9664, 0x9665, 0x9666, 0x9667, 0x9668, 0x9669, - 0xbbba, 0x966a, 0x966b, 0xbbbb, 0xbbbc, 0xbbbd, 0x966c, 0x966d, - 0x966e, 0x966f, 0x9670, 0x9671, 0xbbbe, 0x9672, 0x9673, 0x9674, - 0x9675, 0x9676, 0x9677, 0x9678, 0x9679, 0x967a, 0x9681, 0x9682, - 0x9683, 0x9684, 0x9685, 0x9686, 0x9687, 0x9688, 0x9689, 0x968a, - /* 0xbf00 .. 0xbfff */ - 0x968b, 0xbbbf, 0x968c, 0x968d, 0x968e, 0x968f, 0x9690, 0x9691, - 0xbbc0, 0xbbc1, 0x9692, 0x9693, 0x9694, 0x9695, 0x9696, 0x9697, - 0x9698, 0x9699, 0x969a, 0x969b, 0x969c, 0x969d, 0x969e, 0x969f, - 0xbbc2, 0xbbc3, 0x96a0, 0xbbc4, 0xbbc5, 0xbbc6, 0x96a1, 0x96a2, - 0x96a3, 0x96a4, 0x96a5, 0x96a6, 0x96a7, 0x96a8, 0x96a9, 0x96aa, - 0x96ab, 0x96ac, 0x96ad, 0x96ae, 0x96af, 0x96b0, 0x96b1, 0x96b2, - 0x96b3, 0x96b4, 0x96b5, 0x96b6, 0x96b7, 0x96b8, 0x96b9, 0x96ba, - 0x96bb, 0x96bc, 0x96bd, 0x96be, 0x96bf, 0x96c0, 0x96c1, 0x96c2, - 0xbbc7, 0xbbc8, 0x96c3, 0x96c4, 0xbbc9, 0x96c5, 0x96c6, 0x96c7, - 0xbbca, 0x96c8, 0x96c9, 0x96ca, 0x96cb, 0x96cc, 0x96cd, 0x96ce, - 0xbbcb, 0xbbcc, 0x96cf, 0x96d0, 0x96d1, 0xbbcd, 0x96d2, 0x96d3, - 0x96d4, 0x96d5, 0x96d6, 0x96d7, 0x96d8, 0x96d9, 0x96da, 0x96db, - 0x96dc, 0x96dd, 0x96de, 0x96df, 0x96e0, 0x96e1, 0x96e2, 0x96e3, - 0x96e4, 0x96e5, 0x96e6, 0x96e7, 0x96e8, 0x96e9, 0x96ea, 0x96eb, - 0x96ec, 0x96ed, 0x96ee, 0x96ef, 0x96f0, 0x96f1, 0x96f2, 0x96f3, - 0x96f4, 0x96f5, 0x96f6, 0x96f7, 0x96f8, 0x96f9, 0x96fa, 0x96fb, - 0x96fc, 0x96fd, 0x96fe, 0x9741, 0x9742, 0x9743, 0x9744, 0x9745, - 0x9746, 0x9747, 0x9748, 0x9749, 0x974a, 0x974b, 0x974c, 0x974d, - 0x974e, 0x974f, 0x9750, 0x9751, 0xbbce, 0x9752, 0x9753, 0x9754, - 0x9755, 0x9756, 0x9757, 0x9758, 0x9759, 0x975a, 0x9761, 0x9762, - 0x9763, 0x9764, 0x9765, 0x9766, 0x9767, 0x9768, 0x9769, 0x976a, - 0x976b, 0x976c, 0x976d, 0x976e, 0x976f, 0x9770, 0x9771, 0x9772, - 0xbbcf, 0x9773, 0x9774, 0x9775, 0x9776, 0x9777, 0x9778, 0x9779, - 0x977a, 0x9781, 0x9782, 0x9783, 0x9784, 0x9785, 0x9786, 0x9787, - 0x9788, 0x9789, 0x978a, 0x978b, 0x978c, 0xbbd0, 0x978d, 0x978e, - 0x978f, 0x9790, 0x9791, 0x9792, 0xbbd1, 0xbbd2, 0x9793, 0x9794, - 0xbbd3, 0x9795, 0x9796, 0x9797, 0xbbd4, 0x9798, 0x9799, 0x979a, - 0x979b, 0x979c, 0x979d, 0x979e, 0xbbd5, 0x979f, 0x97a0, 0xbbd6, - 0x97a1, 0xbbd7, 0x97a2, 0x97a3, 0x97a4, 0x97a5, 0x97a6, 0x97a7, - 0x97a8, 0x97a9, 0x97aa, 0x97ab, 0x97ac, 0x97ad, 0x97ae, 0x97af, - 0x97b0, 0x97b1, 0x97b2, 0x97b3, 0x97b4, 0x97b5, 0x97b6, 0x97b7, - 0x97b8, 0x97b9, 0x97ba, 0x97bb, 0x97bc, 0x97bd, 0x97be, 0x97bf, - /* 0xc000 .. 0xc0ff */ - 0x97c0, 0x97c1, 0x97c2, 0x97c3, 0x97c4, 0x97c5, 0x97c6, 0x97c7, - 0x97c8, 0x97c9, 0x97ca, 0x97cb, 0x97cc, 0x97cd, 0x97ce, 0x97cf, - 0x97d0, 0x97d1, 0x97d2, 0x97d3, 0x97d4, 0x97d5, 0x97d6, 0x97d7, - 0x97d8, 0x97d9, 0x97da, 0x97db, 0x97dc, 0x97dd, 0x97de, 0x97df, - 0x97e0, 0x97e1, 0x97e2, 0x97e3, 0x97e4, 0x97e5, 0x97e6, 0x97e7, - 0x97e8, 0x97e9, 0x97ea, 0x97eb, 0x97ec, 0x97ed, 0x97ee, 0x97ef, - 0x97f0, 0x97f1, 0x97f2, 0x97f3, 0x97f4, 0x97f5, 0x97f6, 0x97f7, - 0x97f8, 0x97f9, 0x97fa, 0x97fb, 0xbbd8, 0x97fc, 0x97fd, 0x97fe, - 0x9841, 0x9842, 0x9843, 0x9844, 0x9845, 0x9846, 0x9847, 0x9848, - 0x9849, 0x984a, 0x984b, 0x984c, 0x984d, 0x984e, 0x984f, 0x9850, - 0x9851, 0xbbd9, 0x9852, 0x9853, 0x9854, 0x9855, 0x9856, 0x9857, - 0xbbda, 0x9858, 0x9859, 0x985a, 0xbbdb, 0x9861, 0x9862, 0x9863, - 0xbbdc, 0x9864, 0x9865, 0x9866, 0x9867, 0x9868, 0x9869, 0x986a, - 0xbbdd, 0xbbde, 0x986b, 0x986c, 0x986d, 0x986e, 0x986f, 0x9870, - 0x9871, 0x9872, 0x9873, 0x9874, 0x9875, 0x9876, 0x9877, 0x9878, - 0x9879, 0x987a, 0x9881, 0x9882, 0x9883, 0x9884, 0x9885, 0x9886, - 0x9887, 0x9888, 0x9889, 0x988a, 0x988b, 0x988c, 0x988d, 0x988e, - 0x988f, 0x9890, 0x9891, 0x9892, 0x9893, 0x9894, 0x9895, 0x9896, - 0xbbdf, 0xbbe0, 0x9897, 0x9898, 0xbbe1, 0x9899, 0x989a, 0x989b, - 0xbbe2, 0x989c, 0x989d, 0x989e, 0x989f, 0x98a0, 0x98a1, 0x98a2, - 0xbbe3, 0xbbe4, 0x98a3, 0xbbe5, 0x98a4, 0xbbe6, 0x98a5, 0x98a6, - 0x98a7, 0x98a8, 0x98a9, 0x98aa, 0xbbe7, 0xbbe8, 0x98ab, 0xbbe9, - 0xbbea, 0x98ac, 0x98ad, 0xbbeb, 0xbbec, 0xbbed, 0xbbee, 0x98ae, - 0x98af, 0x98b0, 0x98b1, 0x98b2, 0xbbef, 0xbbf0, 0x98b3, 0xbbf1, - 0xbbf2, 0xbbf3, 0x98b4, 0x98b5, 0x98b6, 0xbbf4, 0x98b7, 0x98b8, - 0xbbf5, 0xbbf6, 0x98b9, 0x98ba, 0xbbf7, 0x98bb, 0x98bc, 0x98bd, - 0xbbf8, 0x98be, 0x98bf, 0x98c0, 0x98c1, 0x98c2, 0x98c3, 0x98c4, - 0xbbf9, 0xbbfa, 0x98c5, 0xbbfb, 0xbbfc, 0xbbfd, 0x98c6, 0x98c7, - 0x98c8, 0x98c9, 0x98ca, 0x98cb, 0xbbfe, 0xbca1, 0x98cc, 0x98cd, - 0xbca2, 0x98ce, 0x98cf, 0x98d0, 0xbca3, 0x98d1, 0x98d2, 0x98d3, - 0x98d4, 0x98d5, 0x98d6, 0x98d7, 0xbca4, 0xbca5, 0x98d8, 0xbca6, - 0x98d9, 0xbca7, 0x98da, 0x98db, 0x98dc, 0x98dd, 0x98de, 0x98df, - /* 0xc100 .. 0xc1ff */ - 0xbca8, 0x98e0, 0x98e1, 0x98e2, 0xbca9, 0x98e3, 0x98e4, 0x98e5, - 0xbcaa, 0x98e6, 0x98e7, 0x98e8, 0x98e9, 0x98ea, 0x98eb, 0x98ec, - 0xbcab, 0x98ed, 0x98ee, 0x98ef, 0x98f0, 0xbcac, 0x98f1, 0x98f2, - 0x98f3, 0x98f4, 0x98f5, 0x98f6, 0xbcad, 0xbcae, 0xbcaf, 0xbcb0, - 0xbcb1, 0x98f7, 0x98f8, 0xbcb2, 0xbcb3, 0x98f9, 0xbcb4, 0xbcb5, - 0x98fa, 0x98fb, 0x98fc, 0x98fd, 0xbcb6, 0xbcb7, 0x98fe, 0xbcb8, - 0xbcb9, 0xbcba, 0x9941, 0x9942, 0x9943, 0x9944, 0xbcbb, 0x9945, - 0xbcbc, 0xbcbd, 0x9946, 0x9947, 0xbcbe, 0x9948, 0x9949, 0x994a, - 0xbcbf, 0x994b, 0x994c, 0x994d, 0x994e, 0x994f, 0x9950, 0x9951, - 0xbcc0, 0xbcc1, 0x9952, 0xbcc2, 0xbcc3, 0xbcc4, 0x9953, 0x9954, - 0x9955, 0x9956, 0x9957, 0x9958, 0xbcc5, 0xbcc6, 0x9959, 0x995a, - 0xbcc7, 0x9961, 0x9962, 0x9963, 0xbcc8, 0x9964, 0x9965, 0x9966, - 0x9967, 0x9968, 0x9969, 0x996a, 0xbcc9, 0xbcca, 0x996b, 0xbccb, - 0xbccc, 0xbccd, 0x996c, 0x996d, 0x996e, 0x996f, 0x9970, 0x9971, - 0xbcce, 0x9972, 0x9973, 0x9974, 0xbccf, 0x9975, 0x9976, 0x9977, - 0xbcd0, 0x9978, 0x9979, 0x997a, 0x9981, 0x9982, 0x9983, 0x9984, - 0x9985, 0x9986, 0x9987, 0x9988, 0x9989, 0xbcd1, 0x998a, 0x998b, - 0x998c, 0x998d, 0x998e, 0x998f, 0xbcd2, 0xbcd3, 0xbcd4, 0x9990, - 0xbcd5, 0x9991, 0x9992, 0x9993, 0xbcd6, 0x9994, 0xbcd7, 0x9995, - 0x9996, 0x9997, 0x9998, 0x9999, 0xbcd8, 0xbcd9, 0x999a, 0xbcda, - 0x999b, 0xbcdb, 0x999c, 0x999d, 0x999e, 0xbcdc, 0x999f, 0x99a0, - 0xbcdd, 0xbcde, 0x99a1, 0x99a2, 0xbcdf, 0x99a3, 0x99a4, 0x99a5, - 0xbce0, 0x99a6, 0x99a7, 0x99a8, 0x99a9, 0x99aa, 0x99ab, 0x99ac, - 0x99ad, 0x99ae, 0x99af, 0x99b0, 0x99b1, 0xbce1, 0x99b2, 0x99b3, - 0x99b4, 0x99b5, 0x99b6, 0x99b7, 0xbce2, 0x99b8, 0x99b9, 0x99ba, - 0xbce3, 0x99bb, 0x99bc, 0x99bd, 0xbce4, 0x99be, 0x99bf, 0x99c0, - 0x99c1, 0x99c2, 0x99c3, 0x99c4, 0xbce5, 0x99c5, 0x99c6, 0xbce6, - 0xbce7, 0x99c7, 0x99c8, 0x99c9, 0x99ca, 0x99cb, 0x99cc, 0x99cd, - 0xbce8, 0x99ce, 0x99cf, 0x99d0, 0xbce9, 0x99d1, 0x99d2, 0x99d3, - 0xbcea, 0x99d4, 0x99d5, 0x99d6, 0x99d7, 0x99d8, 0x99d9, 0x99da, - 0xbceb, 0xbcec, 0x99db, 0xbced, 0x99dc, 0x99dd, 0x99de, 0x99df, - 0x99e0, 0x99e1, 0x99e2, 0x99e3, 0xbcee, 0xbcef, 0x99e4, 0x99e5, - /* 0xc200 .. 0xc2ff */ - 0xbcf0, 0x99e6, 0x99e7, 0x99e8, 0xbcf1, 0x99e9, 0x99ea, 0x99eb, - 0x99ec, 0x99ed, 0x99ee, 0x99ef, 0xbcf2, 0xbcf3, 0x99f0, 0xbcf4, - 0x99f1, 0xbcf5, 0x99f2, 0x99f3, 0x99f4, 0x99f5, 0x99f6, 0x99f7, - 0xbcf6, 0xbcf7, 0x99f8, 0x99f9, 0xbcf8, 0x99fa, 0x99fb, 0xbcf9, - 0xbcfa, 0x99fc, 0x99fd, 0x99fe, 0x9a41, 0x9a42, 0x9a43, 0x9a44, - 0xbcfb, 0xbcfc, 0x9a45, 0xbcfd, 0x9a46, 0xbcfe, 0x9a47, 0xbda1, - 0x9a48, 0xbda2, 0xbda3, 0x9a49, 0xbda4, 0x9a4a, 0x9a4b, 0x9a4c, - 0x9a4d, 0x9a4e, 0x9a4f, 0x9a50, 0x9a51, 0x9a52, 0x9a53, 0x9a54, - 0x9a55, 0x9a56, 0x9a57, 0x9a58, 0x9a59, 0x9a5a, 0x9a61, 0x9a62, - 0xbda5, 0x9a63, 0x9a64, 0x9a65, 0x9a66, 0x9a67, 0x9a68, 0x9a69, - 0xbda6, 0xbda7, 0x9a6a, 0x9a6b, 0xbda8, 0x9a6c, 0x9a6d, 0x9a6e, - 0xbda9, 0x9a6f, 0x9a70, 0x9a71, 0x9a72, 0x9a73, 0x9a74, 0x9a75, - 0xbdaa, 0x9a76, 0x9a77, 0x9a78, 0x9a79, 0xbdab, 0x9a7a, 0x9a81, - 0x9a82, 0x9a83, 0x9a84, 0x9a85, 0xbdac, 0xbdad, 0x9a86, 0x9a87, - 0xbdae, 0x9a88, 0x9a89, 0x9a8a, 0xbdaf, 0x9a8b, 0x9a8c, 0x9a8d, - 0x9a8e, 0x9a8f, 0x9a90, 0x9a91, 0xbdb0, 0xbdb1, 0x9a92, 0xbdb2, - 0x9a93, 0xbdb3, 0x9a94, 0x9a95, 0x9a96, 0x9a97, 0x9a98, 0x9a99, - 0xbdb4, 0xbdb5, 0x9a9a, 0x9a9b, 0x9a9c, 0x9a9d, 0x9a9e, 0x9a9f, - 0xbdb6, 0x9aa0, 0x9aa1, 0x9aa2, 0x9aa3, 0x9aa4, 0x9aa5, 0x9aa6, - 0xbdb7, 0x9aa7, 0x9aa8, 0xbdb8, 0x9aa9, 0xbdb9, 0x9aaa, 0x9aab, - 0x9aac, 0x9aad, 0x9aae, 0x9aaf, 0xbdba, 0xbdbb, 0x9ab0, 0x9ab1, - 0xbdbc, 0x9ab2, 0x9ab3, 0x9ab4, 0xbdbd, 0xbdbe, 0x9ab5, 0x9ab6, - 0x9ab7, 0x9ab8, 0x9ab9, 0x9aba, 0xbdbf, 0xbdc0, 0x9abb, 0xbdc1, - 0x9abc, 0xbdc2, 0x9abd, 0x9abe, 0x9abf, 0x9ac0, 0x9ac1, 0x9ac2, - 0x9ac3, 0x9ac4, 0x9ac5, 0x9ac6, 0x9ac7, 0x9ac8, 0x9ac9, 0x9aca, - 0x9acb, 0x9acc, 0x9acd, 0x9ace, 0x9acf, 0x9ad0, 0x9ad1, 0x9ad2, - 0x9ad3, 0x9ad4, 0x9ad5, 0x9ad6, 0x9ad7, 0x9ad8, 0x9ad9, 0x9ada, - 0x9adb, 0x9adc, 0x9add, 0x9ade, 0xbdc3, 0xbdc4, 0x9adf, 0x9ae0, - 0xbdc5, 0x9ae1, 0x9ae2, 0xbdc6, 0xbdc7, 0x9ae3, 0x9ae4, 0x9ae5, - 0x9ae6, 0x9ae7, 0x9ae8, 0xbdc8, 0xbdc9, 0xbdca, 0x9ae9, 0xbdcb, - 0x9aea, 0xbdcc, 0x9aeb, 0x9aec, 0x9aed, 0x9aee, 0xbdcd, 0x9aef, - 0xbdce, 0xbdcf, 0x9af0, 0xbdd0, 0xbdd1, 0x9af1, 0x9af2, 0x9af3, - /* 0xc300 .. 0xc3ff */ - 0xbdd2, 0x9af4, 0x9af5, 0x9af6, 0x9af7, 0x9af8, 0x9af9, 0x9afa, - 0xbdd3, 0xbdd4, 0x9afb, 0x9afc, 0xbdd5, 0xbdd6, 0x9afd, 0x9afe, - 0x9b41, 0x9b42, 0x9b43, 0xbdd7, 0xbdd8, 0xbdd9, 0x9b44, 0x9b45, - 0xbdda, 0x9b46, 0x9b47, 0x9b48, 0xbddb, 0x9b49, 0x9b4a, 0x9b4b, - 0x9b4c, 0x9b4d, 0x9b4e, 0x9b4f, 0xbddc, 0xbddd, 0x9b50, 0x9b51, - 0xbdde, 0xbddf, 0x9b52, 0x9b53, 0x9b54, 0x9b55, 0x9b56, 0x9b57, - 0x9b58, 0x9b59, 0x9b5a, 0x9b61, 0x9b62, 0x9b63, 0x9b64, 0x9b65, - 0x9b66, 0x9b67, 0x9b68, 0x9b69, 0x9b6a, 0x9b6b, 0x9b6c, 0x9b6d, - 0x9b6e, 0x9b6f, 0x9b70, 0x9b71, 0x9b72, 0xbde0, 0x9b73, 0x9b74, - 0x9b75, 0x9b76, 0x9b77, 0x9b78, 0x9b79, 0x9b7a, 0x9b81, 0x9b82, - 0x9b83, 0x9b84, 0x9b85, 0x9b86, 0x9b87, 0x9b88, 0x9b89, 0x9b8a, - 0x9b8b, 0x9b8c, 0x9b8d, 0x9b8e, 0x9b8f, 0x9b90, 0x9b91, 0x9b92, - 0x9b93, 0x9b94, 0x9b95, 0x9b96, 0x9b97, 0x9b98, 0x9b99, 0x9b9a, - 0xbde1, 0xbde2, 0x9b9b, 0x9b9c, 0xbde3, 0x9b9d, 0x9b9e, 0x9b9f, - 0xbde4, 0x9ba0, 0xbde5, 0x9ba1, 0x9ba2, 0x9ba3, 0x9ba4, 0x9ba5, - 0xbde6, 0xbde7, 0x9ba6, 0x9ba7, 0xbde8, 0xbde9, 0x9ba8, 0x9ba9, - 0x9baa, 0x9bab, 0x9bac, 0x9bad, 0xbdea, 0x9bae, 0x9baf, 0x9bb0, - 0xbdeb, 0x9bb1, 0x9bb2, 0x9bb3, 0xbdec, 0x9bb4, 0x9bb5, 0x9bb6, - 0x9bb7, 0x9bb8, 0x9bb9, 0x9bba, 0x9bbb, 0x9bbc, 0x9bbd, 0x9bbe, - 0x9bbf, 0x9bc0, 0x9bc1, 0x9bc2, 0x9bc3, 0x9bc4, 0x9bc5, 0x9bc6, - 0x9bc7, 0x9bc8, 0x9bc9, 0x9bca, 0x9bcb, 0x9bcc, 0x9bcd, 0x9bce, - 0x9bcf, 0x9bd0, 0x9bd1, 0x9bd2, 0x9bd3, 0x9bd4, 0x9bd5, 0x9bd6, - 0x9bd7, 0x9bd8, 0x9bd9, 0x9bda, 0x9bdb, 0x9bdc, 0x9bdd, 0x9bde, - 0x9bdf, 0x9be0, 0x9be1, 0x9be2, 0x9be3, 0x9be4, 0x9be5, 0x9be6, - 0xbded, 0x9be7, 0x9be8, 0x9be9, 0x9bea, 0x9beb, 0x9bec, 0x9bed, - 0x9bee, 0x9bef, 0x9bf0, 0x9bf1, 0x9bf2, 0x9bf3, 0x9bf4, 0x9bf5, - 0x9bf6, 0x9bf7, 0x9bf8, 0x9bf9, 0x9bfa, 0x9bfb, 0x9bfc, 0x9bfd, - 0xbdee, 0xbdef, 0x9bfe, 0x9c41, 0xbdf0, 0x9c42, 0x9c43, 0xbdf1, - 0xbdf2, 0x9c44, 0xbdf3, 0x9c45, 0x9c46, 0x9c47, 0x9c48, 0x9c49, - 0xbdf4, 0xbdf5, 0x9c4a, 0x9c4b, 0x9c4c, 0xbdf6, 0x9c4d, 0x9c4e, - 0x9c4f, 0x9c50, 0x9c51, 0x9c52, 0xbdf7, 0xbdf8, 0x9c53, 0x9c54, - 0xbdf9, 0x9c55, 0x9c56, 0x9c57, 0x9c58, 0x9c59, 0x9c5a, 0x9c61, - /* 0xc400 .. 0xc4ff */ - 0x9c62, 0x9c63, 0x9c64, 0x9c65, 0x9c66, 0x9c67, 0x9c68, 0x9c69, - 0xbdfa, 0x9c6a, 0x9c6b, 0x9c6c, 0x9c6d, 0x9c6e, 0x9c6f, 0x9c70, - 0xbdfb, 0x9c71, 0x9c72, 0x9c73, 0x9c74, 0x9c75, 0x9c76, 0x9c77, - 0x9c78, 0x9c79, 0x9c7a, 0x9c81, 0x9c82, 0x9c83, 0x9c84, 0x9c85, - 0x9c86, 0x9c87, 0x9c88, 0x9c89, 0xbdfc, 0x9c8a, 0x9c8b, 0x9c8c, - 0x9c8d, 0x9c8e, 0x9c8f, 0x9c90, 0xbdfd, 0x9c91, 0x9c92, 0x9c93, - 0xbdfe, 0x9c94, 0x9c95, 0x9c96, 0xbea1, 0x9c97, 0x9c98, 0x9c99, - 0x9c9a, 0x9c9b, 0x9c9c, 0x9c9d, 0xbea2, 0xbea3, 0x9c9e, 0x9c9f, - 0x9ca0, 0x9ca1, 0x9ca2, 0x9ca3, 0x9ca4, 0x9ca5, 0x9ca6, 0x9ca7, - 0xbea4, 0x9ca8, 0x9ca9, 0x9caa, 0x9cab, 0x9cac, 0x9cad, 0x9cae, - 0x9caf, 0x9cb0, 0x9cb1, 0x9cb2, 0x9cb3, 0x9cb4, 0x9cb5, 0x9cb6, - 0x9cb7, 0x9cb8, 0x9cb9, 0x9cba, 0x9cbb, 0x9cbc, 0x9cbd, 0x9cbe, - 0x9cbf, 0x9cc0, 0x9cc1, 0x9cc2, 0xbea5, 0xbea6, 0x9cc3, 0x9cc4, - 0xbea7, 0x9cc5, 0x9cc6, 0x9cc7, 0xbea8, 0x9cc8, 0x9cc9, 0x9cca, - 0x9ccb, 0x9ccc, 0x9ccd, 0x9cce, 0xbea9, 0xbeaa, 0x9ccf, 0x9cd0, - 0x9cd1, 0xbeab, 0x9cd2, 0x9cd3, 0x9cd4, 0x9cd5, 0x9cd6, 0x9cd7, - 0xbeac, 0x9cd8, 0x9cd9, 0x9cda, 0x9cdb, 0x9cdc, 0x9cdd, 0x9cde, - 0x9cdf, 0x9ce0, 0x9ce1, 0x9ce2, 0x9ce3, 0x9ce4, 0x9ce5, 0x9ce6, - 0x9ce7, 0x9ce8, 0x9ce9, 0x9cea, 0xbead, 0x9ceb, 0x9cec, 0x9ced, - 0x9cee, 0x9cef, 0x9cf0, 0x9cf1, 0xbeae, 0x9cf2, 0x9cf3, 0x9cf4, - 0x9cf5, 0x9cf6, 0x9cf7, 0x9cf8, 0x9cf9, 0x9cfa, 0x9cfb, 0x9cfc, - 0x9cfd, 0x9cfe, 0x9d41, 0x9d42, 0x9d43, 0x9d44, 0x9d45, 0x9d46, - 0x9d47, 0x9d48, 0x9d49, 0x9d4a, 0x9d4b, 0x9d4c, 0x9d4d, 0x9d4e, - 0xbeaf, 0x9d4f, 0x9d50, 0x9d51, 0xbeb0, 0x9d52, 0x9d53, 0x9d54, - 0x9d55, 0x9d56, 0x9d57, 0x9d58, 0x9d59, 0x9d5a, 0x9d61, 0x9d62, - 0x9d63, 0x9d64, 0x9d65, 0x9d66, 0x9d67, 0x9d68, 0x9d69, 0x9d6a, - 0x9d6b, 0x9d6c, 0x9d6d, 0x9d6e, 0x9d6f, 0x9d70, 0x9d71, 0x9d72, - 0x9d73, 0x9d74, 0x9d75, 0x9d76, 0x9d77, 0x9d78, 0x9d79, 0x9d7a, - 0x9d81, 0x9d82, 0x9d83, 0x9d84, 0x9d85, 0x9d86, 0x9d87, 0x9d88, - 0x9d89, 0xbeb1, 0x9d8a, 0x9d8b, 0x9d8c, 0x9d8d, 0x9d8e, 0x9d8f, - 0xbeb2, 0xbeb3, 0x9d90, 0x9d91, 0xbeb4, 0x9d92, 0x9d93, 0x9d94, - 0xbeb5, 0x9d95, 0xbeb6, 0x9d96, 0x9d97, 0x9d98, 0x9d99, 0xbeb7, - /* 0xc500 .. 0xc5ff */ - 0xbeb8, 0xbeb9, 0x9d9a, 0x9d9b, 0x9d9c, 0x9d9d, 0x9d9e, 0x9d9f, - 0x9da0, 0x9da1, 0x9da2, 0x9da3, 0xbeba, 0x9da4, 0x9da5, 0x9da6, - 0xbebb, 0x9da7, 0x9da8, 0x9da9, 0xbebc, 0x9daa, 0x9dab, 0x9dac, - 0x9dad, 0x9dae, 0x9daf, 0x9db0, 0xbebd, 0x9db1, 0x9db2, 0x9db3, - 0x9db4, 0x9db5, 0x9db6, 0x9db7, 0x9db8, 0x9db9, 0x9dba, 0x9dbb, - 0xbebe, 0xbebf, 0x9dbc, 0x9dbd, 0xbec0, 0x9dbe, 0x9dbf, 0x9dc0, - 0xbec1, 0x9dc1, 0x9dc2, 0x9dc3, 0x9dc4, 0x9dc5, 0x9dc6, 0x9dc7, - 0xbec2, 0xbec3, 0x9dc8, 0xbec4, 0x9dc9, 0xbec5, 0x9dca, 0x9dcb, - 0x9dcc, 0x9dcd, 0x9dce, 0x9dcf, 0xbec6, 0xbec7, 0x9dd0, 0x9dd1, - 0xbec8, 0xbec9, 0xbeca, 0x9dd2, 0xbecb, 0xbecc, 0xbecd, 0x9dd3, - 0x9dd4, 0x9dd5, 0x9dd6, 0xbece, 0xbecf, 0xbed0, 0x9dd7, 0xbed1, - 0xbed2, 0xbed3, 0x9dd8, 0x9dd9, 0x9dda, 0xbed4, 0xbed5, 0x9ddb, - 0xbed6, 0xbed7, 0x9ddc, 0x9ddd, 0xbed8, 0x9dde, 0x9ddf, 0x9de0, - 0xbed9, 0x9de1, 0x9de2, 0x9de3, 0x9de4, 0x9de5, 0x9de6, 0x9de7, - 0xbeda, 0xbedb, 0x9de8, 0xbedc, 0xbedd, 0xbede, 0x9de9, 0x9dea, - 0x9deb, 0x9dec, 0x9ded, 0x9dee, 0xbedf, 0xbee0, 0x9def, 0x9df0, - 0xbee1, 0x9df1, 0x9df2, 0x9df3, 0xbee2, 0x9df4, 0x9df5, 0xbee3, - 0x9df6, 0x9df7, 0x9df8, 0x9df9, 0xbee4, 0xbee5, 0x9dfa, 0xbee6, - 0x9dfb, 0xbee7, 0x9dfc, 0x9dfd, 0x9dfe, 0xbee8, 0x9e41, 0xbee9, - 0xbeea, 0x9e42, 0x9e43, 0x9e44, 0xbeeb, 0x9e45, 0x9e46, 0x9e47, - 0xbeec, 0x9e48, 0x9e49, 0x9e4a, 0x9e4b, 0x9e4c, 0x9e4d, 0x9e4e, - 0x9e4f, 0xbeed, 0x9e50, 0x9e51, 0x9e52, 0x9e53, 0x9e54, 0x9e55, - 0x9e56, 0x9e57, 0x9e58, 0x9e59, 0xbeee, 0xbeef, 0x9e5a, 0x9e61, - 0xbef0, 0xbef1, 0x9e62, 0xbef2, 0xbef3, 0xbef4, 0xbef5, 0x9e63, - 0x9e64, 0x9e65, 0x9e66, 0x9e67, 0xbef6, 0xbef7, 0xbef8, 0xbef9, - 0xbefa, 0xbefb, 0xbefc, 0x9e68, 0xbefd, 0x9e69, 0xbefe, 0x9e6a, - 0xbfa1, 0xbfa2, 0x9e6b, 0x9e6c, 0xbfa3, 0x9e6d, 0x9e6e, 0x9e6f, - 0xbfa4, 0x9e70, 0x9e71, 0x9e72, 0x9e73, 0x9e74, 0x9e75, 0x9e76, - 0xbfa5, 0xbfa6, 0x9e77, 0xbfa7, 0x9e78, 0xbfa8, 0x9e79, 0x9e7a, - 0x9e81, 0x9e82, 0x9e83, 0x9e84, 0xbfa9, 0xbfaa, 0xbfab, 0x9e85, - 0xbfac, 0x9e86, 0x9e87, 0x9e88, 0xbfad, 0x9e89, 0xbfae, 0xbfaf, - 0x9e8a, 0x9e8b, 0x9e8c, 0x9e8d, 0xbfb0, 0xbfb1, 0xbfb2, 0xbfb3, - /* 0xc600 .. 0xc6ff */ - 0xbfb4, 0xbfb5, 0x9e8e, 0x9e8f, 0x9e90, 0xbfb6, 0xbfb7, 0xbfb8, - 0xbfb9, 0x9e91, 0x9e92, 0x9e93, 0xbfba, 0x9e94, 0x9e95, 0x9e96, - 0xbfbb, 0x9e97, 0x9e98, 0x9e99, 0x9e9a, 0x9e9b, 0x9e9c, 0x9e9d, - 0xbfbc, 0xbfbd, 0x9e9e, 0xbfbe, 0xbfbf, 0x9e9f, 0x9ea0, 0x9ea1, - 0x9ea2, 0x9ea3, 0x9ea4, 0x9ea5, 0xbfc0, 0xbfc1, 0x9ea6, 0x9ea7, - 0xbfc2, 0x9ea8, 0x9ea9, 0x9eaa, 0xbfc3, 0xbfc4, 0xbfc5, 0x9eab, - 0xbfc6, 0x9eac, 0x9ead, 0xbfc7, 0xbfc8, 0xbfc9, 0x9eae, 0xbfca, - 0x9eaf, 0xbfcb, 0x9eb0, 0xbfcc, 0x9eb1, 0x9eb2, 0x9eb3, 0x9eb4, - 0xbfcd, 0xbfce, 0x9eb5, 0x9eb6, 0xbfcf, 0x9eb7, 0x9eb8, 0x9eb9, - 0xbfd0, 0x9eba, 0x9ebb, 0x9ebc, 0x9ebd, 0x9ebe, 0x9ebf, 0x9ec0, - 0xbfd1, 0xbfd2, 0x9ec1, 0xbfd3, 0xbfd4, 0xbfd5, 0x9ec2, 0x9ec3, - 0x9ec4, 0x9ec5, 0x9ec6, 0x9ec7, 0xbfd6, 0xbfd7, 0x9ec8, 0x9ec9, - 0xbfd8, 0x9eca, 0x9ecb, 0x9ecc, 0x9ecd, 0x9ece, 0x9ecf, 0x9ed0, - 0x9ed1, 0x9ed2, 0x9ed3, 0x9ed4, 0xbfd9, 0x9ed5, 0x9ed6, 0xbfda, - 0x9ed7, 0xbfdb, 0x9ed8, 0x9ed9, 0x9eda, 0x9edb, 0x9edc, 0x9edd, - 0xbfdc, 0xbfdd, 0x9ede, 0x9edf, 0xbfde, 0x9ee0, 0x9ee1, 0x9ee2, - 0xbfdf, 0x9ee3, 0x9ee4, 0x9ee5, 0x9ee6, 0x9ee7, 0x9ee8, 0x9ee9, - 0xbfe0, 0xbfe1, 0x9eea, 0xbfe2, 0x9eeb, 0xbfe3, 0x9eec, 0x9eed, - 0x9eee, 0x9eef, 0x9ef0, 0x9ef1, 0xbfe4, 0xbfe5, 0x9ef2, 0x9ef3, - 0xbfe6, 0x9ef4, 0x9ef5, 0x9ef6, 0xbfe7, 0x9ef7, 0x9ef8, 0x9ef9, - 0x9efa, 0x9efb, 0x9efc, 0x9efd, 0xbfe8, 0xbfe9, 0x9efe, 0xbfea, - 0x9f41, 0xbfeb, 0x9f42, 0x9f43, 0x9f44, 0x9f45, 0x9f46, 0x9f47, - 0xbfec, 0xbfed, 0x9f48, 0x9f49, 0xbfee, 0x9f4a, 0x9f4b, 0x9f4c, - 0xbfef, 0xbff0, 0xbff1, 0x9f4d, 0x9f4e, 0x9f4f, 0x9f50, 0x9f51, - 0xbff2, 0xbff3, 0x9f52, 0xbff4, 0x9f53, 0xbff5, 0x9f54, 0x9f55, - 0x9f56, 0x9f57, 0x9f58, 0x9f59, 0xbff6, 0xbff7, 0x9f5a, 0x9f61, - 0xbff8, 0x9f62, 0x9f63, 0x9f64, 0xbff9, 0x9f65, 0x9f66, 0x9f67, - 0x9f68, 0x9f69, 0x9f6a, 0x9f6b, 0xbffa, 0xbffb, 0x9f6c, 0x9f6d, - 0xbffc, 0xbffd, 0x9f6e, 0x9f6f, 0x9f70, 0x9f71, 0x9f72, 0x9f73, - 0xbffe, 0xc0a1, 0x9f74, 0x9f75, 0xc0a2, 0x9f76, 0x9f77, 0x9f78, - 0xc0a3, 0x9f79, 0x9f7a, 0x9f81, 0x9f82, 0x9f83, 0x9f84, 0x9f85, - 0xc0a4, 0xc0a5, 0x9f86, 0x9f87, 0x9f88, 0xc0a6, 0x9f89, 0x9f8a, - /* 0xc700 .. 0xc7ff */ - 0x9f8b, 0x9f8c, 0x9f8d, 0x9f8e, 0xc0a7, 0xc0a8, 0x9f8f, 0x9f90, - 0xc0a9, 0x9f91, 0x9f92, 0x9f93, 0xc0aa, 0x9f94, 0x9f95, 0x9f96, - 0x9f97, 0x9f98, 0x9f99, 0x9f9a, 0xc0ab, 0xc0ac, 0x9f9b, 0xc0ad, - 0x9f9c, 0xc0ae, 0x9f9d, 0x9f9e, 0x9f9f, 0x9fa0, 0x9fa1, 0x9fa2, - 0xc0af, 0xc0b0, 0x9fa3, 0x9fa4, 0xc0b1, 0x9fa5, 0x9fa6, 0x9fa7, - 0xc0b2, 0x9fa8, 0x9fa9, 0x9faa, 0x9fab, 0x9fac, 0x9fad, 0x9fae, - 0xc0b3, 0xc0b4, 0x9faf, 0xc0b5, 0x9fb0, 0xc0b6, 0x9fb1, 0xc0b7, - 0x9fb2, 0x9fb3, 0x9fb4, 0x9fb5, 0xc0b8, 0xc0b9, 0x9fb6, 0x9fb7, - 0xc0ba, 0x9fb8, 0x9fb9, 0x9fba, 0xc0bb, 0x9fbb, 0x9fbc, 0x9fbd, - 0x9fbe, 0x9fbf, 0xc0bc, 0x9fc0, 0xc0bd, 0xc0be, 0x9fc1, 0xc0bf, - 0x9fc2, 0xc0c0, 0xc0c1, 0xc0c2, 0xc0c3, 0xc0c4, 0xc0c5, 0xc0c6, - 0xc0c7, 0x9fc3, 0x9fc4, 0x9fc5, 0xc0c8, 0x9fc6, 0x9fc7, 0x9fc8, - 0xc0c9, 0x9fc9, 0x9fca, 0x9fcb, 0x9fcc, 0x9fcd, 0x9fce, 0x9fcf, - 0xc0ca, 0x9fd0, 0x9fd1, 0xc0cb, 0x9fd2, 0x9fd3, 0x9fd4, 0x9fd5, - 0x9fd6, 0x9fd7, 0x9fd8, 0x9fd9, 0xc0cc, 0xc0cd, 0x9fda, 0x9fdb, - 0xc0ce, 0x9fdc, 0x9fdd, 0x9fde, 0xc0cf, 0xc0d0, 0xc0d1, 0x9fdf, - 0x9fe0, 0x9fe1, 0x9fe2, 0xc0d2, 0xc0d3, 0xc0d4, 0x9fe3, 0xc0d5, - 0xc0d6, 0xc0d7, 0xc0d8, 0x9fe4, 0x9fe5, 0x9fe6, 0xc0d9, 0x9fe7, - 0xc0da, 0xc0db, 0x9fe8, 0x9fe9, 0xc0dc, 0x9fea, 0xc0dd, 0xc0de, - 0xc0df, 0x9feb, 0xc0e0, 0x9fec, 0x9fed, 0x9fee, 0x9fef, 0x9ff0, - 0xc0e1, 0xc0e2, 0x9ff1, 0xc0e3, 0xc0e4, 0xc0e5, 0xc0e6, 0x9ff2, - 0x9ff3, 0x9ff4, 0x9ff5, 0x9ff6, 0xc0e7, 0xc0e8, 0x9ff7, 0x9ff8, - 0xc0e9, 0x9ff9, 0x9ffa, 0x9ffb, 0xc0ea, 0x9ffc, 0x9ffd, 0x9ffe, - 0xa041, 0xa042, 0xa043, 0xa044, 0xc0eb, 0xc0ec, 0xa045, 0xc0ed, - 0xc0ee, 0xc0ef, 0xa046, 0xa047, 0xa048, 0xa049, 0xa04a, 0xa04b, - 0xc0f0, 0xc0f1, 0xa04c, 0xa04d, 0xc0f2, 0xa04e, 0xc0f3, 0xa04f, - 0xc0f4, 0xa050, 0xa051, 0xa052, 0xa053, 0xa054, 0xa055, 0xa056, - 0xc0f5, 0xa057, 0xa058, 0xa059, 0xa05a, 0xc0f6, 0xa061, 0xa062, - 0xa063, 0xa064, 0xa065, 0xa066, 0xc0f7, 0xa067, 0xa068, 0xa069, - 0xc0f8, 0xa06a, 0xa06b, 0xa06c, 0xc0f9, 0xa06d, 0xa06e, 0xa06f, - 0xa070, 0xa071, 0xa072, 0xa073, 0xa074, 0xa075, 0xa076, 0xa077, - 0xa078, 0xa079, 0xa07a, 0xa081, 0xa082, 0xa083, 0xa084, 0xa085, - /* 0xc800 .. 0xc8ff */ - 0xc0fa, 0xc0fb, 0xa086, 0xa087, 0xc0fc, 0xa088, 0xa089, 0xa08a, - 0xc0fd, 0xa08b, 0xc0fe, 0xa08c, 0xa08d, 0xa08e, 0xa08f, 0xa090, - 0xc1a1, 0xc1a2, 0xa091, 0xc1a3, 0xa092, 0xc1a4, 0xc1a5, 0xa093, - 0xa094, 0xa095, 0xa096, 0xa097, 0xc1a6, 0xc1a7, 0xa098, 0xa099, - 0xc1a8, 0xa09a, 0xa09b, 0xa09c, 0xc1a9, 0xa09d, 0xa09e, 0xa09f, - 0xa0a0, 0xa0a1, 0xa0a2, 0xa0a3, 0xc1aa, 0xc1ab, 0xa0a4, 0xc1ac, - 0xa0a5, 0xc1ad, 0xa0a6, 0xa0a7, 0xa0a8, 0xa0a9, 0xa0aa, 0xa0ab, - 0xc1ae, 0xa0ac, 0xa0ad, 0xa0ae, 0xc1af, 0xa0af, 0xa0b0, 0xa0b1, - 0xc1b0, 0xa0b2, 0xa0b3, 0xa0b4, 0xa0b5, 0xa0b6, 0xa0b7, 0xa0b8, - 0xc1b1, 0xc1b2, 0xa0b9, 0xa0ba, 0xc1b3, 0xc1b4, 0xa0bb, 0xa0bc, - 0xa0bd, 0xa0be, 0xa0bf, 0xa0c0, 0xc1b5, 0xa0c1, 0xa0c2, 0xa0c3, - 0xa0c4, 0xa0c5, 0xa0c6, 0xa0c7, 0xa0c8, 0xa0c9, 0xa0ca, 0xa0cb, - 0xa0cc, 0xa0cd, 0xa0ce, 0xa0cf, 0xa0d0, 0xa0d1, 0xa0d2, 0xa0d3, - 0xa0d4, 0xa0d5, 0xa0d6, 0xa0d7, 0xa0d8, 0xa0d9, 0xa0da, 0xa0db, - 0xc1b6, 0xc1b7, 0xa0dc, 0xa0dd, 0xc1b8, 0xa0de, 0xa0df, 0xa0e0, - 0xc1b9, 0xa0e1, 0xc1ba, 0xa0e2, 0xa0e3, 0xa0e4, 0xa0e5, 0xa0e6, - 0xc1bb, 0xc1bc, 0xa0e7, 0xc1bd, 0xa0e8, 0xc1be, 0xc1bf, 0xc1c0, - 0xa0e9, 0xa0ea, 0xa0eb, 0xc1c1, 0xc1c2, 0xc1c3, 0xa0ec, 0xa0ed, - 0xa0ee, 0xa0ef, 0xa0f0, 0xa0f1, 0xc1c4, 0xa0f2, 0xa0f3, 0xa0f4, - 0xa0f5, 0xa0f6, 0xa0f7, 0xa0f8, 0xa0f9, 0xc1c5, 0xa0fa, 0xc1c6, - 0xa0fb, 0xc1c7, 0xa0fc, 0xa0fd, 0xa0fe, 0xa141, 0xa142, 0xa143, - 0xc1c8, 0xa144, 0xa145, 0xa146, 0xa147, 0xa148, 0xa149, 0xa14a, - 0xa14b, 0xa14c, 0xa14d, 0xa14e, 0xa14f, 0xa150, 0xa151, 0xa152, - 0xa153, 0xa154, 0xa155, 0xa156, 0xc1c9, 0xc1ca, 0xa157, 0xa158, - 0xa159, 0xa15a, 0xa161, 0xa162, 0xc1cb, 0xa163, 0xa164, 0xa165, - 0xc1cc, 0xa166, 0xa167, 0xa168, 0xc1cd, 0xa169, 0xa16a, 0xa16b, - 0xa16c, 0xa16d, 0xa16e, 0xa16f, 0xc1ce, 0xc1cf, 0xa170, 0xc1d0, - 0xa171, 0xc1d1, 0xa172, 0xa173, 0xa174, 0xa175, 0xa176, 0xa177, - 0xc1d2, 0xc1d3, 0xa178, 0xa179, 0xc1d4, 0xa17a, 0xa181, 0xa182, - 0xa183, 0xa184, 0xa185, 0xa186, 0xa187, 0xa188, 0xa189, 0xa18a, - 0xa18b, 0xa18c, 0xa18d, 0xa18e, 0xa18f, 0xc1d5, 0xa190, 0xa191, - 0xa192, 0xa193, 0xa194, 0xa195, 0xc1d6, 0xc1d7, 0xa196, 0xa197, - /* 0xc900 .. 0xc9ff */ - 0xc1d8, 0xa198, 0xa199, 0xa19a, 0xc1d9, 0xc1da, 0xc1db, 0xa19b, - 0xa19c, 0xa19d, 0xa19e, 0xa19f, 0xc1dc, 0xc1dd, 0xa1a0, 0xc1de, - 0xa241, 0xc1df, 0xa242, 0xa243, 0xa244, 0xa245, 0xa246, 0xa247, - 0xc1e0, 0xa248, 0xa249, 0xa24a, 0xa24b, 0xa24c, 0xa24d, 0xa24e, - 0xa24f, 0xa250, 0xa251, 0xa252, 0xa253, 0xa254, 0xa255, 0xa256, - 0xa257, 0xa258, 0xa259, 0xa25a, 0xc1e1, 0xa261, 0xa262, 0xa263, - 0xa264, 0xa265, 0xa266, 0xa267, 0xc1e2, 0xa268, 0xa269, 0xa26a, - 0xa26b, 0xa26c, 0xa26d, 0xa26e, 0xa26f, 0xa270, 0xa271, 0xa272, - 0xa273, 0xa274, 0xa275, 0xa276, 0xa277, 0xa278, 0xa279, 0xa27a, - 0xa281, 0xa282, 0xa283, 0xa284, 0xa285, 0xa286, 0xa287, 0xa288, - 0xc1e3, 0xc1e4, 0xa289, 0xa28a, 0xc1e5, 0xa28b, 0xa28c, 0xa28d, - 0xc1e6, 0xa28e, 0xa28f, 0xa290, 0xa291, 0xa292, 0xa293, 0xa294, - 0xc1e7, 0xc1e8, 0xa295, 0xc1e9, 0xa296, 0xa297, 0xa298, 0xa299, - 0xa29a, 0xa29b, 0xa29c, 0xa29d, 0xc1ea, 0xa29e, 0xa29f, 0xa2a0, - 0xc1eb, 0xa341, 0xa342, 0xa343, 0xc1ec, 0xa344, 0xa345, 0xa346, - 0xa347, 0xa348, 0xa349, 0xa34a, 0xc1ed, 0xa34b, 0xa34c, 0xa34d, - 0xa34e, 0xa34f, 0xa350, 0xa351, 0xa352, 0xa353, 0xa354, 0xa355, - 0xc1ee, 0xc1ef, 0xa356, 0xa357, 0xc1f0, 0xa358, 0xa359, 0xa35a, - 0xc1f1, 0xa361, 0xa362, 0xa363, 0xa364, 0xa365, 0xa366, 0xa367, - 0xc1f2, 0xc1f3, 0xa368, 0xc1f4, 0xa369, 0xc1f5, 0xa36a, 0xa36b, - 0xa36c, 0xa36d, 0xa36e, 0xa36f, 0xa370, 0xa371, 0xa372, 0xa373, - 0xa374, 0xa375, 0xa376, 0xa377, 0xa378, 0xa379, 0xa37a, 0xa381, - 0xa382, 0xa383, 0xa384, 0xa385, 0xa386, 0xa387, 0xa388, 0xa389, - 0xa38a, 0xa38b, 0xa38c, 0xa38d, 0xa38e, 0xa38f, 0xa390, 0xa391, - 0xc1f6, 0xc1f7, 0xa392, 0xa393, 0xc1f8, 0xa394, 0xa395, 0xc1f9, - 0xc1fa, 0xa396, 0xc1fb, 0xa397, 0xa398, 0xa399, 0xa39a, 0xa39b, - 0xc1fc, 0xc1fd, 0xa39c, 0xc1fe, 0xa39d, 0xc2a1, 0xc2a2, 0xa39e, - 0xa39f, 0xc2a3, 0xc2a4, 0xa3a0, 0xc2a5, 0xc2a6, 0xa441, 0xa442, - 0xc2a7, 0xa443, 0xc2a8, 0xa444, 0xc2a9, 0xa445, 0xa446, 0xc2aa, - 0xa447, 0xa448, 0xa449, 0xa44a, 0xc2ab, 0xc2ac, 0xa44b, 0xc2ad, - 0xc2ae, 0xc2af, 0xa44c, 0xa44d, 0xa44e, 0xa44f, 0xa450, 0xa451, - 0xc2b0, 0xc2b1, 0xa452, 0xa453, 0xc2b2, 0xa454, 0xa455, 0xa456, - /* 0xca00 .. 0xcaff */ - 0xc2b3, 0xa457, 0xa458, 0xa459, 0xa45a, 0xa461, 0xa462, 0xa463, - 0xc2b4, 0xc2b5, 0xa464, 0xc2b6, 0xc2b7, 0xc2b8, 0xa465, 0xa466, - 0xa467, 0xa468, 0xa469, 0xa46a, 0xc2b9, 0xa46b, 0xa46c, 0xa46d, - 0xc2ba, 0xa46e, 0xa46f, 0xa470, 0xa471, 0xa472, 0xa473, 0xa474, - 0xa475, 0xa476, 0xa477, 0xa478, 0xa479, 0xa47a, 0xa481, 0xa482, - 0xa483, 0xc2bb, 0xa484, 0xa485, 0xa486, 0xa487, 0xa488, 0xa489, - 0xa48a, 0xa48b, 0xa48c, 0xa48d, 0xa48e, 0xa48f, 0xa490, 0xa491, - 0xa492, 0xa493, 0xa494, 0xa495, 0xa496, 0xa497, 0xa498, 0xa499, - 0xa49a, 0xa49b, 0xa49c, 0xa49d, 0xa49e, 0xa49f, 0xa4a0, 0xa541, - 0xa542, 0xa543, 0xa544, 0xa545, 0xc2bc, 0xc2bd, 0xa546, 0xa547, - 0xc2be, 0xa548, 0xa549, 0xa54a, 0xc2bf, 0xa54b, 0xa54c, 0xa54d, - 0xa54e, 0xa54f, 0xa550, 0xa551, 0xc2c0, 0xc2c1, 0xa552, 0xc2c2, - 0xc2c3, 0xc2c4, 0xa553, 0xa554, 0xa555, 0xa556, 0xa557, 0xa558, - 0xc2c5, 0xa559, 0xa55a, 0xa561, 0xa562, 0xa563, 0xa564, 0xa565, - 0xa566, 0xa567, 0xa568, 0xa569, 0xa56a, 0xa56b, 0xa56c, 0xa56d, - 0xa56e, 0xa56f, 0xa570, 0xa571, 0xa572, 0xc2c6, 0xa573, 0xa574, - 0xa575, 0xa576, 0xa577, 0xa578, 0xc2c7, 0xa579, 0xa57a, 0xa581, - 0xa582, 0xa583, 0xa584, 0xa585, 0xa586, 0xa587, 0xa588, 0xa589, - 0xa58a, 0xa58b, 0xa58c, 0xa58d, 0xa58e, 0xa58f, 0xa590, 0xa591, - 0xc2c8, 0xa592, 0xa593, 0xa594, 0xa595, 0xa596, 0xa597, 0xa598, - 0xa599, 0xa59a, 0xa59b, 0xa59c, 0xa59d, 0xa59e, 0xa59f, 0xa5a0, - 0xa641, 0xa642, 0xa643, 0xa644, 0xa645, 0xa646, 0xa647, 0xa648, - 0xa649, 0xa64a, 0xa64b, 0xa64c, 0xa64d, 0xa64e, 0xa64f, 0xa650, - 0xa651, 0xa652, 0xa653, 0xa654, 0xc2c9, 0xc2ca, 0xa655, 0xa656, - 0xc2cb, 0xa657, 0xa658, 0xa659, 0xc2cc, 0xa65a, 0xa661, 0xa662, - 0xa663, 0xa664, 0xa665, 0xa666, 0xc2cd, 0xc2ce, 0xa667, 0xc2cf, - 0xa668, 0xc2d0, 0xa669, 0xc2d1, 0xa66a, 0xa66b, 0xa66c, 0xa66d, - 0xc2d2, 0xc2d3, 0xa66e, 0xa66f, 0xa670, 0xa671, 0xa672, 0xa673, - 0xc2d4, 0xa674, 0xa675, 0xa676, 0xa677, 0xa678, 0xa679, 0xa67a, - 0xa681, 0xa682, 0xa683, 0xa684, 0xc2d5, 0xa685, 0xa686, 0xa687, - 0xa688, 0xa689, 0xa68a, 0xa68b, 0xc2d6, 0xa68c, 0xa68d, 0xa68e, - 0xa68f, 0xa690, 0xa691, 0xa692, 0xa693, 0xa694, 0xa695, 0xa696, - /* 0xcb00 .. 0xcbff */ - 0xa697, 0xa698, 0xa699, 0xa69a, 0xa69b, 0xa69c, 0xa69d, 0xa69e, - 0xc2d7, 0xa69f, 0xa6a0, 0xa741, 0xa742, 0xa743, 0xa744, 0xa745, - 0xc2d8, 0xa746, 0xa747, 0xa748, 0xc2d9, 0xa749, 0xa74a, 0xa74b, - 0xc2da, 0xa74c, 0xa74d, 0xa74e, 0xa74f, 0xa750, 0xa751, 0xa752, - 0xc2db, 0xc2dc, 0xa753, 0xa754, 0xa755, 0xa756, 0xa757, 0xa758, - 0xa759, 0xa75a, 0xa761, 0xa762, 0xa763, 0xa764, 0xa765, 0xa766, - 0xa767, 0xa768, 0xa769, 0xa76a, 0xa76b, 0xa76c, 0xa76d, 0xa76e, - 0xa76f, 0xa770, 0xa771, 0xa772, 0xa773, 0xa774, 0xa775, 0xa776, - 0xa777, 0xc2dd, 0xa778, 0xa779, 0xa77a, 0xa781, 0xa782, 0xa783, - 0xc2de, 0xc2df, 0xa784, 0xa785, 0xc2e0, 0xa786, 0xa787, 0xa788, - 0xc2e1, 0xa789, 0xa78a, 0xa78b, 0xa78c, 0xa78d, 0xa78e, 0xa78f, - 0xc2e2, 0xc2e3, 0xa790, 0xa791, 0xa792, 0xc2e4, 0xa793, 0xa794, - 0xa795, 0xa796, 0xa797, 0xa798, 0xc2e5, 0xa799, 0xa79a, 0xa79b, - 0xa79c, 0xa79d, 0xa79e, 0xa79f, 0xa7a0, 0xa841, 0xa842, 0xa843, - 0xa844, 0xa845, 0xa846, 0xa847, 0xa848, 0xa849, 0xa84a, 0xa84b, - 0xc2e6, 0xc2e7, 0xa84c, 0xa84d, 0xa84e, 0xa84f, 0xa850, 0xa851, - 0xa852, 0xa853, 0xa854, 0xa855, 0xa856, 0xa857, 0xa858, 0xa859, - 0xa85a, 0xa861, 0xa862, 0xa863, 0xa864, 0xa865, 0xa866, 0xa867, - 0xa868, 0xa869, 0xa86a, 0xa86b, 0xa86c, 0xa86d, 0xa86e, 0xa86f, - 0xa870, 0xa871, 0xa872, 0xa873, 0xc2e8, 0xa874, 0xa875, 0xa876, - 0xa877, 0xa878, 0xa879, 0xa87a, 0xa881, 0xa882, 0xa883, 0xa884, - 0xa885, 0xa886, 0xa887, 0xa888, 0xa889, 0xa88a, 0xa88b, 0xa88c, - 0xa88d, 0xa88e, 0xa88f, 0xa890, 0xa891, 0xa892, 0xa893, 0xa894, - 0xc2e9, 0xa895, 0xa896, 0xa897, 0xa898, 0xa899, 0xa89a, 0xa89b, - 0xa89c, 0xa89d, 0xa89e, 0xa89f, 0xa8a0, 0xa941, 0xa942, 0xa943, - 0xa944, 0xa945, 0xa946, 0xa947, 0xa948, 0xa949, 0xa94a, 0xa94b, - 0xa94c, 0xa94d, 0xa94e, 0xa94f, 0xc2ea, 0xa950, 0xa951, 0xa952, - 0xa953, 0xa954, 0xa955, 0xa956, 0xa957, 0xa958, 0xa959, 0xa95a, - 0xa961, 0xa962, 0xa963, 0xa964, 0xc2eb, 0xa965, 0xa966, 0xc2ec, - 0xa967, 0xc2ed, 0xa968, 0xa969, 0xa96a, 0xa96b, 0xa96c, 0xa96d, - 0xa96e, 0xa96f, 0xa970, 0xa971, 0xa972, 0xa973, 0xa974, 0xa975, - 0xa976, 0xa977, 0xa978, 0xa979, 0xa97a, 0xa981, 0xa982, 0xa983, - /* 0xcc00 .. 0xccff */ - 0xa984, 0xa985, 0xa986, 0xa987, 0xa988, 0xa989, 0xa98a, 0xa98b, - 0xa98c, 0xa98d, 0xa98e, 0xa98f, 0xc2ee, 0xc2ef, 0xa990, 0xa991, - 0xc2f0, 0xa992, 0xa993, 0xa994, 0xc2f1, 0xa995, 0xa996, 0xa997, - 0xa998, 0xa999, 0xa99a, 0xa99b, 0xc2f2, 0xc2f3, 0xa99c, 0xa99d, - 0xa99e, 0xc2f4, 0xc2f5, 0xa99f, 0xa9a0, 0xaa41, 0xaa42, 0xc2f6, - 0xc2f7, 0xc2f8, 0xaa43, 0xaa44, 0xc2f9, 0xaa45, 0xc2fa, 0xaa46, - 0xc2fb, 0xaa47, 0xaa48, 0xaa49, 0xaa4a, 0xaa4b, 0xaa4c, 0xaa4d, - 0xc2fc, 0xc2fd, 0xaa4e, 0xc2fe, 0xc3a1, 0xc3a2, 0xc3a3, 0xaa4f, - 0xaa50, 0xaa51, 0xaa52, 0xaa53, 0xc3a4, 0xc3a5, 0xaa54, 0xaa55, - 0xc3a6, 0xaa56, 0xaa57, 0xaa58, 0xc3a7, 0xaa59, 0xaa5a, 0xaa61, - 0xaa62, 0xaa63, 0xaa64, 0xaa65, 0xc3a8, 0xc3a9, 0xaa66, 0xc3aa, - 0xc3ab, 0xc3ac, 0xaa67, 0xaa68, 0xaa69, 0xaa6a, 0xaa6b, 0xaa6c, - 0xc3ad, 0xaa6d, 0xaa6e, 0xaa6f, 0xc3ae, 0xaa70, 0xc3af, 0xaa71, - 0xc3b0, 0xaa72, 0xaa73, 0xaa74, 0xaa75, 0xaa76, 0xaa77, 0xaa78, - 0xc3b1, 0xaa79, 0xaa7a, 0xaa81, 0xaa82, 0xc3b2, 0xaa83, 0xaa84, - 0xaa85, 0xaa86, 0xaa87, 0xaa88, 0xaa89, 0xaa8a, 0xaa8b, 0xaa8c, - 0xaa8d, 0xaa8e, 0xaa8f, 0xaa90, 0xaa91, 0xaa92, 0xaa93, 0xaa94, - 0xaa95, 0xaa96, 0xaa97, 0xaa98, 0xaa99, 0xaa9a, 0xaa9b, 0xaa9c, - 0xaa9d, 0xaa9e, 0xaa9f, 0xaaa0, 0xab41, 0xab42, 0xab43, 0xab44, - 0xc3b3, 0xc3b4, 0xab45, 0xab46, 0xc3b5, 0xab47, 0xab48, 0xab49, - 0xc3b6, 0xab4a, 0xab4b, 0xab4c, 0xab4d, 0xab4e, 0xab4f, 0xab50, - 0xc3b7, 0xc3b8, 0xab51, 0xc3b9, 0xc3ba, 0xc3bb, 0xab52, 0xab53, - 0xab54, 0xab55, 0xab56, 0xab57, 0xc3bc, 0xc3bd, 0xab58, 0xab59, - 0xc3be, 0xab5a, 0xab61, 0xab62, 0xc3bf, 0xab63, 0xab64, 0xab65, - 0xab66, 0xab67, 0xab68, 0xab69, 0xc3c0, 0xc3c1, 0xab6a, 0xc3c2, - 0xab6b, 0xc3c3, 0xab6c, 0xab6d, 0xab6e, 0xab6f, 0xab70, 0xab71, - 0xc3c4, 0xab72, 0xab73, 0xab74, 0xc3c5, 0xab75, 0xab76, 0xab77, - 0xab78, 0xab79, 0xab7a, 0xab81, 0xab82, 0xab83, 0xab84, 0xab85, - 0xab86, 0xab87, 0xab88, 0xab89, 0xc3c6, 0xab8a, 0xab8b, 0xab8c, - 0xab8d, 0xab8e, 0xab8f, 0xab90, 0xc3c7, 0xab91, 0xab92, 0xab93, - 0xc3c8, 0xab94, 0xab95, 0xab96, 0xab97, 0xab98, 0xab99, 0xab9a, - 0xab9b, 0xab9c, 0xab9d, 0xab9e, 0xab9f, 0xaba0, 0xac41, 0xac42, - /* 0xcd00 .. 0xcdff */ - 0xac43, 0xc3c9, 0xac44, 0xac45, 0xac46, 0xac47, 0xac48, 0xac49, - 0xc3ca, 0xc3cb, 0xac4a, 0xac4b, 0xc3cc, 0xac4c, 0xac4d, 0xac4e, - 0xc3cd, 0xac4f, 0xac50, 0xac51, 0xac52, 0xac53, 0xac54, 0xac55, - 0xc3ce, 0xc3cf, 0xac56, 0xc3d0, 0xac57, 0xc3d1, 0xac58, 0xac59, - 0xac5a, 0xac61, 0xac62, 0xac63, 0xc3d2, 0xac64, 0xac65, 0xac66, - 0xc3d3, 0xac67, 0xac68, 0xac69, 0xc3d4, 0xac6a, 0xac6b, 0xac6c, - 0xac6d, 0xac6e, 0xac6f, 0xac70, 0xac71, 0xac72, 0xac73, 0xac74, - 0xac75, 0xc3d5, 0xac76, 0xac77, 0xac78, 0xac79, 0xac7a, 0xac81, - 0xac82, 0xac83, 0xac84, 0xac85, 0xac86, 0xac87, 0xac88, 0xac89, - 0xac8a, 0xac8b, 0xac8c, 0xac8d, 0xac8e, 0xac8f, 0xac90, 0xac91, - 0xac92, 0xac93, 0xac94, 0xac95, 0xac96, 0xac97, 0xac98, 0xac99, - 0xac9a, 0xac9b, 0xac9c, 0xac9d, 0xc3d6, 0xac9e, 0xac9f, 0xaca0, - 0xc3d7, 0xad41, 0xad42, 0xad43, 0xc3d8, 0xad44, 0xad45, 0xad46, - 0xad47, 0xad48, 0xad49, 0xad4a, 0xc3d9, 0xc3da, 0xad4b, 0xc3db, - 0xad4c, 0xc3dc, 0xad4d, 0xad4e, 0xad4f, 0xad50, 0xad51, 0xad52, - 0xc3dd, 0xad53, 0xad54, 0xad55, 0xad56, 0xad57, 0xad58, 0xad59, - 0xad5a, 0xad61, 0xad62, 0xad63, 0xad64, 0xad65, 0xad66, 0xad67, - 0xc3de, 0xad68, 0xad69, 0xad6a, 0xad6b, 0xad6c, 0xad6d, 0xad6e, - 0xad6f, 0xad70, 0xad71, 0xad72, 0xc3df, 0xc3e0, 0xad73, 0xad74, - 0xc3e1, 0xad75, 0xad76, 0xad77, 0xc3e2, 0xad78, 0xad79, 0xad7a, - 0xad81, 0xad82, 0xad83, 0xad84, 0xc3e3, 0xc3e4, 0xad85, 0xc3e5, - 0xad86, 0xc3e6, 0xad87, 0xad88, 0xad89, 0xad8a, 0xad8b, 0xad8c, - 0xc3e7, 0xad8d, 0xad8e, 0xad8f, 0xad90, 0xad91, 0xad92, 0xad93, - 0xad94, 0xad95, 0xad96, 0xad97, 0xad98, 0xad99, 0xad9a, 0xad9b, - 0xad9c, 0xad9d, 0xad9e, 0xad9f, 0xc3e8, 0xada0, 0xae41, 0xae42, - 0xae43, 0xae44, 0xae45, 0xae46, 0xc3e9, 0xae47, 0xae48, 0xae49, - 0xc3ea, 0xae4a, 0xae4b, 0xae4c, 0xae4d, 0xae4e, 0xae4f, 0xae50, - 0xae51, 0xae52, 0xae53, 0xae54, 0xae55, 0xae56, 0xae57, 0xae58, - 0xae59, 0xae5a, 0xae61, 0xae62, 0xae63, 0xae64, 0xae65, 0xae66, - 0xc3eb, 0xae67, 0xae68, 0xae69, 0xc3ec, 0xae6a, 0xae6b, 0xae6c, - 0xc3ed, 0xae6d, 0xae6e, 0xae6f, 0xae70, 0xae71, 0xae72, 0xae73, - 0xc3ee, 0xc3ef, 0xae74, 0xc3f0, 0xae75, 0xc3f1, 0xae76, 0xae77, - /* 0xce00 .. 0xceff */ - 0xae78, 0xae79, 0xae7a, 0xae81, 0xc3f2, 0xae82, 0xae83, 0xae84, - 0xc3f3, 0xae85, 0xae86, 0xae87, 0xc3f4, 0xae88, 0xae89, 0xae8a, - 0xae8b, 0xae8c, 0xae8d, 0xae8e, 0xc3f5, 0xae8f, 0xae90, 0xae91, - 0xae92, 0xc3f6, 0xae93, 0xae94, 0xae95, 0xae96, 0xae97, 0xae98, - 0xc3f7, 0xc3f8, 0xae99, 0xae9a, 0xc3f9, 0xae9b, 0xae9c, 0xae9d, - 0xc3fa, 0xae9e, 0xae9f, 0xaea0, 0xaf41, 0xaf42, 0xaf43, 0xaf44, - 0xc3fb, 0xc3fc, 0xaf45, 0xc3fd, 0xaf46, 0xc3fe, 0xaf47, 0xaf48, - 0xaf49, 0xaf4a, 0xaf4b, 0xaf4c, 0xaf4d, 0xaf4e, 0xaf4f, 0xaf50, - 0xaf51, 0xaf52, 0xaf53, 0xaf54, 0xaf55, 0xaf56, 0xaf57, 0xaf58, - 0xaf59, 0xaf5a, 0xaf61, 0xaf62, 0xaf63, 0xaf64, 0xaf65, 0xaf66, - 0xaf67, 0xaf68, 0xaf69, 0xaf6a, 0xaf6b, 0xaf6c, 0xaf6d, 0xaf6e, - 0xc4a1, 0xc4a2, 0xaf6f, 0xaf70, 0xc4a3, 0xaf71, 0xaf72, 0xc4a4, - 0xc4a5, 0xc4a6, 0xaf73, 0xaf74, 0xaf75, 0xaf76, 0xaf77, 0xaf78, - 0xc4a7, 0xc4a8, 0xaf79, 0xc4a9, 0xaf7a, 0xc4aa, 0xaf81, 0xaf82, - 0xaf83, 0xaf84, 0xaf85, 0xaf86, 0xc4ab, 0xc4ac, 0xaf87, 0xaf88, - 0xc4ad, 0xaf89, 0xaf8a, 0xaf8b, 0xc4ae, 0xaf8c, 0xaf8d, 0xaf8e, - 0xaf8f, 0xaf90, 0xaf91, 0xaf92, 0xc4af, 0xc4b0, 0xaf93, 0xc4b1, - 0xaf94, 0xc4b2, 0xaf95, 0xaf96, 0xaf97, 0xaf98, 0xaf99, 0xaf9a, - 0xc4b3, 0xc4b4, 0xaf9b, 0xaf9c, 0xc4b5, 0xaf9d, 0xaf9e, 0xaf9f, - 0xc4b6, 0xafa0, 0xb041, 0xb042, 0xb043, 0xb044, 0xb045, 0xb046, - 0xc4b7, 0xc4b8, 0xb047, 0xc4b9, 0xc4ba, 0xc4bb, 0xb048, 0xb049, - 0xb04a, 0xb04b, 0xb04c, 0xb04d, 0xc4bc, 0xc4bd, 0xb04e, 0xb04f, - 0xb050, 0xb051, 0xb052, 0xb053, 0xb054, 0xb055, 0xb056, 0xb057, - 0xb058, 0xb059, 0xb05a, 0xb061, 0xb062, 0xb063, 0xb064, 0xb065, - 0xb066, 0xc4be, 0xb067, 0xb068, 0xb069, 0xb06a, 0xb06b, 0xb06c, - 0xb06d, 0xb06e, 0xb06f, 0xb070, 0xb071, 0xb072, 0xb073, 0xb074, - 0xb075, 0xb076, 0xb077, 0xb078, 0xb079, 0xb07a, 0xb081, 0xb082, - 0xb083, 0xb084, 0xb085, 0xb086, 0xb087, 0xb088, 0xb089, 0xb08a, - 0xb08b, 0xb08c, 0xb08d, 0xb08e, 0xc4bf, 0xc4c0, 0xb08f, 0xb090, - 0xc4c1, 0xb091, 0xb092, 0xc4c2, 0xc4c3, 0xb093, 0xb094, 0xb095, - 0xb096, 0xb097, 0xb098, 0xb099, 0xc4c4, 0xc4c5, 0xb09a, 0xc4c6, - 0xc4c7, 0xc4c8, 0xb09b, 0xb09c, 0xb09d, 0xb09e, 0xb09f, 0xb0a0, - /* 0xcf00 .. 0xcfff */ - 0xc4c9, 0xc4ca, 0xb141, 0xb142, 0xc4cb, 0xb143, 0xb144, 0xb145, - 0xc4cc, 0xb146, 0xb147, 0xb148, 0xb149, 0xb14a, 0xb14b, 0xb14c, - 0xc4cd, 0xc4ce, 0xb14d, 0xc4cf, 0xb14e, 0xc4d0, 0xb14f, 0xb150, - 0xb151, 0xb152, 0xb153, 0xb154, 0xc4d1, 0xb155, 0xb156, 0xb157, - 0xc4d2, 0xb158, 0xb159, 0xb15a, 0xc4d3, 0xb161, 0xb162, 0xb163, - 0xb164, 0xb165, 0xb166, 0xb167, 0xc4d4, 0xc4d5, 0xb168, 0xc4d6, - 0xc4d7, 0xc4d8, 0xb169, 0xb16a, 0xb16b, 0xb16c, 0xb16d, 0xb16e, - 0xc4d9, 0xb16f, 0xb170, 0xb171, 0xb172, 0xb173, 0xb174, 0xb175, - 0xb176, 0xb177, 0xb178, 0xb179, 0xb17a, 0xb181, 0xb182, 0xb183, - 0xb184, 0xb185, 0xb186, 0xb187, 0xb188, 0xb189, 0xb18a, 0xb18b, - 0xb18c, 0xb18d, 0xb18e, 0xb18f, 0xc4da, 0xc4db, 0xb190, 0xb191, - 0xc4dc, 0xb192, 0xb193, 0xb194, 0xc4dd, 0xb195, 0xb196, 0xb197, - 0xb198, 0xb199, 0xb19a, 0xb19b, 0xc4de, 0xc4df, 0xb19c, 0xc4e0, - 0xb19d, 0xc4e1, 0xb19e, 0xb19f, 0xb1a0, 0xb241, 0xb242, 0xb243, - 0xc4e2, 0xc4e3, 0xb244, 0xb245, 0xc4e4, 0xb246, 0xb247, 0xb248, - 0xc4e5, 0xb249, 0xb24a, 0xb24b, 0xb24c, 0xb24d, 0xb24e, 0xb24f, - 0xc4e6, 0xb250, 0xb251, 0xb252, 0xb253, 0xc4e7, 0xb254, 0xb255, - 0xb256, 0xb257, 0xb258, 0xb259, 0xc4e8, 0xb25a, 0xb261, 0xb262, - 0xb263, 0xb264, 0xb265, 0xb266, 0xb267, 0xb268, 0xb269, 0xb26a, - 0xb26b, 0xb26c, 0xb26d, 0xb26e, 0xb26f, 0xb270, 0xb271, 0xb272, - 0xb273, 0xc4e9, 0xb274, 0xb275, 0xb276, 0xb277, 0xb278, 0xb279, - 0xc4ea, 0xb27a, 0xb281, 0xb282, 0xb283, 0xb284, 0xb285, 0xb286, - 0xc4eb, 0xb287, 0xb288, 0xb289, 0xb28a, 0xb28b, 0xb28c, 0xb28d, - 0xb28e, 0xb28f, 0xb290, 0xb291, 0xb292, 0xb293, 0xb294, 0xb295, - 0xb296, 0xb297, 0xb298, 0xb299, 0xc4ec, 0xb29a, 0xb29b, 0xb29c, - 0xb29d, 0xb29e, 0xb29f, 0xb2a0, 0xb341, 0xb342, 0xb343, 0xb344, - 0xb345, 0xb346, 0xb347, 0xb348, 0xb349, 0xb34a, 0xb34b, 0xb34c, - 0xb34d, 0xb34e, 0xb34f, 0xb350, 0xb351, 0xb352, 0xb353, 0xb354, - 0xc4ed, 0xc4ee, 0xb355, 0xb356, 0xc4ef, 0xb357, 0xb358, 0xb359, - 0xc4f0, 0xb35a, 0xb361, 0xb362, 0xb363, 0xb364, 0xb365, 0xb366, - 0xc4f1, 0xc4f2, 0xb367, 0xc4f3, 0xb368, 0xc4f4, 0xb369, 0xb36a, - 0xb36b, 0xb36c, 0xb36d, 0xb36e, 0xc4f5, 0xb36f, 0xb370, 0xb371, - /* 0xd000 .. 0xd0ff */ - 0xc4f6, 0xb372, 0xb373, 0xb374, 0xc4f7, 0xb375, 0xb376, 0xb377, - 0xb378, 0xb379, 0xb37a, 0xb381, 0xb382, 0xb383, 0xb384, 0xb385, - 0xb386, 0xc4f8, 0xb387, 0xb388, 0xb389, 0xb38a, 0xb38b, 0xb38c, - 0xc4f9, 0xb38d, 0xb38e, 0xb38f, 0xb390, 0xb391, 0xb392, 0xb393, - 0xb394, 0xb395, 0xb396, 0xb397, 0xb398, 0xb399, 0xb39a, 0xb39b, - 0xb39c, 0xb39d, 0xb39e, 0xb39f, 0xb3a0, 0xc4fa, 0xb441, 0xb442, - 0xb443, 0xb444, 0xb445, 0xb446, 0xc4fb, 0xc4fc, 0xb447, 0xb448, - 0xc4fd, 0xb449, 0xb44a, 0xb44b, 0xc4fe, 0xb44c, 0xb44d, 0xb44e, - 0xb44f, 0xb450, 0xb451, 0xb452, 0xc5a1, 0xc5a2, 0xb453, 0xc5a3, - 0xb454, 0xc5a4, 0xb455, 0xb456, 0xb457, 0xb458, 0xb459, 0xb45a, - 0xc5a5, 0xb461, 0xb462, 0xb463, 0xc5a6, 0xb464, 0xb465, 0xb466, - 0xc5a7, 0xb467, 0xb468, 0xb469, 0xb46a, 0xb46b, 0xb46c, 0xb46d, - 0xc5a8, 0xb46e, 0xb46f, 0xb470, 0xb471, 0xb472, 0xb473, 0xb474, - 0xb475, 0xb476, 0xb477, 0xb478, 0xc5a9, 0xc5aa, 0xb479, 0xb47a, - 0xc5ab, 0xb481, 0xb482, 0xb483, 0xc5ac, 0xb484, 0xb485, 0xb486, - 0xb487, 0xb488, 0xb489, 0xb48a, 0xc5ad, 0xc5ae, 0xb48b, 0xb48c, - 0xb48d, 0xc5af, 0xb48e, 0xb48f, 0xb490, 0xb491, 0xb492, 0xb493, - 0xb494, 0xb495, 0xb496, 0xb497, 0xb498, 0xb499, 0xb49a, 0xb49b, - 0xb49c, 0xb49d, 0xb49e, 0xb49f, 0xb4a0, 0xb541, 0xb542, 0xb543, - 0xb544, 0xb545, 0xb546, 0xb547, 0xb548, 0xb549, 0xb54a, 0xb54b, - 0xb54c, 0xb54d, 0xb54e, 0xb54f, 0xc5b0, 0xc5b1, 0xb550, 0xb551, - 0xc5b2, 0xb552, 0xb553, 0xb554, 0xc5b3, 0xb555, 0xb556, 0xb557, - 0xb558, 0xb559, 0xb55a, 0xb561, 0xc5b4, 0xc5b5, 0xb562, 0xc5b6, - 0xb563, 0xc5b7, 0xb564, 0xb565, 0xb566, 0xb567, 0xb568, 0xb569, - 0xc5b8, 0xc5b9, 0xb56a, 0xb56b, 0xc5ba, 0xb56c, 0xb56d, 0xb56e, - 0xc5bb, 0xc5bc, 0xb56f, 0xb570, 0xb571, 0xb572, 0xb573, 0xb574, - 0xc5bd, 0xc5be, 0xb575, 0xc5bf, 0xc5c0, 0xc5c1, 0xb576, 0xb577, - 0xb578, 0xb579, 0xb57a, 0xb581, 0xc5c2, 0xc5c3, 0xb582, 0xb583, - 0xc5c4, 0xb584, 0xb585, 0xb586, 0xc5c5, 0xb587, 0xb588, 0xb589, - 0xb58a, 0xb58b, 0xb58c, 0xb58d, 0xc5c6, 0xc5c7, 0xb58e, 0xc5c8, - 0xc5c9, 0xc5ca, 0xb58f, 0xb590, 0xb591, 0xb592, 0xb593, 0xb594, - 0xc5cb, 0xb595, 0xb596, 0xb597, 0xb598, 0xb599, 0xb59a, 0xb59b, - /* 0xd100 .. 0xd1ff */ - 0xb59c, 0xb59d, 0xb59e, 0xb59f, 0xb5a0, 0xb641, 0xb642, 0xb643, - 0xb644, 0xb645, 0xb646, 0xb647, 0xb648, 0xc5cc, 0xb649, 0xb64a, - 0xb64b, 0xb64c, 0xb64d, 0xb64e, 0xb64f, 0xb650, 0xb651, 0xb652, - 0xb653, 0xb654, 0xb655, 0xb656, 0xb657, 0xb658, 0xb659, 0xb65a, - 0xb661, 0xb662, 0xb663, 0xb664, 0xb665, 0xb666, 0xb667, 0xb668, - 0xb669, 0xb66a, 0xb66b, 0xb66c, 0xb66d, 0xb66e, 0xb66f, 0xb670, - 0xc5cd, 0xc5ce, 0xb671, 0xb672, 0xc5cf, 0xb673, 0xb674, 0xb675, - 0xc5d0, 0xb676, 0xc5d1, 0xb677, 0xb678, 0xb679, 0xb67a, 0xb681, - 0xc5d2, 0xc5d3, 0xb682, 0xc5d4, 0xc5d5, 0xc5d6, 0xb683, 0xb684, - 0xb685, 0xb686, 0xb687, 0xb688, 0xc5d7, 0xc5d8, 0xb689, 0xb68a, - 0xc5d9, 0xb68b, 0xb68c, 0xb68d, 0xc5da, 0xb68e, 0xb68f, 0xb690, - 0xb691, 0xb692, 0xb693, 0xb694, 0xc5db, 0xc5dc, 0xb695, 0xc5dd, - 0xb696, 0xc5de, 0xb697, 0xb698, 0xb699, 0xb69a, 0xb69b, 0xb69c, - 0xc5df, 0xb69d, 0xb69e, 0xb69f, 0xc5e0, 0xb6a0, 0xb741, 0xb742, - 0xb743, 0xb744, 0xb745, 0xb746, 0xb747, 0xb748, 0xb749, 0xb74a, - 0xb74b, 0xb74c, 0xb74d, 0xb74e, 0xc5e1, 0xb74f, 0xb750, 0xb751, - 0xb752, 0xb753, 0xb754, 0xb755, 0xc5e2, 0xb756, 0xb757, 0xb758, - 0xc5e3, 0xb759, 0xb75a, 0xb761, 0xb762, 0xb763, 0xb764, 0xb765, - 0xb766, 0xb767, 0xb768, 0xb769, 0xb76a, 0xb76b, 0xb76c, 0xb76d, - 0xb76e, 0xb76f, 0xb770, 0xb771, 0xb772, 0xb773, 0xb774, 0xb775, - 0xc5e4, 0xc5e5, 0xb776, 0xb777, 0xc5e6, 0xb778, 0xb779, 0xb77a, - 0xc5e7, 0xb781, 0xb782, 0xb783, 0xb784, 0xb785, 0xb786, 0xb787, - 0xc5e8, 0xc5e9, 0xb788, 0xc5ea, 0xb789, 0xc5eb, 0xb78a, 0xb78b, - 0xb78c, 0xb78d, 0xc5ec, 0xb78e, 0xc5ed, 0xb78f, 0xb790, 0xb791, - 0xc5ee, 0xb792, 0xb793, 0xb794, 0xb795, 0xb796, 0xb797, 0xb798, - 0xb799, 0xb79a, 0xb79b, 0xb79c, 0xb79d, 0xb79e, 0xb79f, 0xb7a0, - 0xb841, 0xb842, 0xb843, 0xb844, 0xb845, 0xb846, 0xb847, 0xb848, - 0xc5ef, 0xb849, 0xb84a, 0xb84b, 0xb84c, 0xb84d, 0xb84e, 0xb84f, - 0xb850, 0xb851, 0xb852, 0xb853, 0xb854, 0xb855, 0xb856, 0xb857, - 0xb858, 0xb859, 0xb85a, 0xb861, 0xb862, 0xb863, 0xb864, 0xb865, - 0xb866, 0xb867, 0xb868, 0xb869, 0xc5f0, 0xb86a, 0xb86b, 0xb86c, - 0xc5f1, 0xb86d, 0xb86e, 0xb86f, 0xb870, 0xb871, 0xb872, 0xb873, - /* 0xd200 .. 0xd2ff */ - 0xb874, 0xb875, 0xb876, 0xb877, 0xb878, 0xb879, 0xb87a, 0xc5f2, - 0xb881, 0xc5f3, 0xb882, 0xb883, 0xb884, 0xb885, 0xb886, 0xb887, - 0xc5f4, 0xb888, 0xb889, 0xb88a, 0xb88b, 0xb88c, 0xb88d, 0xb88e, - 0xb88f, 0xb890, 0xb891, 0xb892, 0xb893, 0xb894, 0xb895, 0xb896, - 0xb897, 0xb898, 0xb899, 0xb89a, 0xb89b, 0xb89c, 0xb89d, 0xb89e, - 0xb89f, 0xb8a0, 0xb941, 0xb942, 0xc5f5, 0xc5f6, 0xb943, 0xb944, - 0xc5f7, 0xb945, 0xb946, 0xb947, 0xc5f8, 0xb948, 0xb949, 0xb94a, - 0xb94b, 0xb94c, 0xb94d, 0xb94e, 0xc5f9, 0xc5fa, 0xb94f, 0xc5fb, - 0xb950, 0xc5fc, 0xb951, 0xb952, 0xb953, 0xb954, 0xb955, 0xb956, - 0xc5fd, 0xb957, 0xb958, 0xb959, 0xb95a, 0xb961, 0xb962, 0xb963, - 0xb964, 0xb965, 0xb966, 0xb967, 0xb968, 0xb969, 0xb96a, 0xb96b, - 0xb96c, 0xb96d, 0xb96e, 0xb96f, 0xc5fe, 0xb970, 0xb971, 0xb972, - 0xb973, 0xb974, 0xb975, 0xb976, 0xc6a1, 0xb977, 0xb978, 0xb979, - 0xb97a, 0xb981, 0xb982, 0xb983, 0xb984, 0xb985, 0xb986, 0xb987, - 0xb988, 0xb989, 0xb98a, 0xb98b, 0xb98c, 0xb98d, 0xb98e, 0xb98f, - 0xb990, 0xb991, 0xb992, 0xb993, 0xb994, 0xb995, 0xb996, 0xb997, - 0xc6a2, 0xc6a3, 0xb998, 0xb999, 0xc6a4, 0xb99a, 0xb99b, 0xb99c, - 0xc6a5, 0xb99d, 0xb99e, 0xb99f, 0xb9a0, 0xba41, 0xba42, 0xba43, - 0xc6a6, 0xc6a7, 0xba44, 0xba45, 0xba46, 0xc6a8, 0xba47, 0xba48, - 0xba49, 0xba4a, 0xba4b, 0xba4c, 0xc6a9, 0xba4d, 0xba4e, 0xba4f, - 0xc6aa, 0xba50, 0xba51, 0xba52, 0xc6ab, 0xba53, 0xba54, 0xba55, - 0xba56, 0xba57, 0xba58, 0xba59, 0xc6ac, 0xba5a, 0xba61, 0xba62, - 0xba63, 0xc6ad, 0xba64, 0xba65, 0xba66, 0xba67, 0xba68, 0xba69, - 0xc6ae, 0xc6af, 0xba6a, 0xba6b, 0xc6b0, 0xba6c, 0xba6d, 0xc6b1, - 0xc6b2, 0xba6e, 0xc6b3, 0xba6f, 0xba70, 0xba71, 0xba72, 0xba73, - 0xc6b4, 0xc6b5, 0xba74, 0xc6b6, 0xba75, 0xba76, 0xba77, 0xba78, - 0xba79, 0xba7a, 0xba81, 0xba82, 0xc6b7, 0xba83, 0xba84, 0xba85, - 0xc6b8, 0xba86, 0xba87, 0xba88, 0xc6b9, 0xba89, 0xba8a, 0xba8b, - 0xba8c, 0xba8d, 0xba8e, 0xba8f, 0xc6ba, 0xc6bb, 0xba90, 0xba91, - 0xba92, 0xba93, 0xba94, 0xba95, 0xba96, 0xba97, 0xba98, 0xba99, - 0xc6bc, 0xc6bd, 0xba9a, 0xba9b, 0xc6be, 0xba9c, 0xba9d, 0xba9e, - 0xc6bf, 0xba9f, 0xbaa0, 0xbb41, 0xbb42, 0xbb43, 0xbb44, 0xbb45, - /* 0xd300 .. 0xd3ff */ - 0xc6c0, 0xc6c1, 0xbb46, 0xc6c2, 0xbb47, 0xc6c3, 0xbb48, 0xbb49, - 0xbb4a, 0xbb4b, 0xbb4c, 0xbb4d, 0xc6c4, 0xc6c5, 0xc6c6, 0xbb4e, - 0xc6c7, 0xbb4f, 0xbb50, 0xbb51, 0xc6c8, 0xbb52, 0xc6c9, 0xbb53, - 0xbb54, 0xbb55, 0xbb56, 0xbb57, 0xc6ca, 0xc6cb, 0xbb58, 0xc6cc, - 0xc6cd, 0xc6ce, 0xbb59, 0xbb5a, 0xbb61, 0xc6cf, 0xbb62, 0xbb63, - 0xc6d0, 0xc6d1, 0xbb64, 0xbb65, 0xc6d2, 0xbb66, 0xbb67, 0xbb68, - 0xc6d3, 0xbb69, 0xbb6a, 0xbb6b, 0xbb6c, 0xbb6d, 0xbb6e, 0xbb6f, - 0xc6d4, 0xc6d5, 0xbb70, 0xc6d6, 0xc6d7, 0xc6d8, 0xbb71, 0xbb72, - 0xbb73, 0xbb74, 0xbb75, 0xbb76, 0xc6d9, 0xc6da, 0xbb77, 0xbb78, - 0xbb79, 0xbb7a, 0xbb81, 0xbb82, 0xbb83, 0xbb84, 0xbb85, 0xbb86, - 0xbb87, 0xbb88, 0xbb89, 0xbb8a, 0xbb8b, 0xbb8c, 0xbb8d, 0xbb8e, - 0xbb8f, 0xbb90, 0xbb91, 0xbb92, 0xbb93, 0xbb94, 0xbb95, 0xbb96, - 0xbb97, 0xbb98, 0xbb99, 0xbb9a, 0xbb9b, 0xbb9c, 0xbb9d, 0xbb9e, - 0xbb9f, 0xbba0, 0xbc41, 0xbc42, 0xbc43, 0xbc44, 0xbc45, 0xbc46, - 0xbc47, 0xbc48, 0xbc49, 0xbc4a, 0xbc4b, 0xbc4c, 0xbc4d, 0xbc4e, - 0xbc4f, 0xbc50, 0xbc51, 0xbc52, 0xc6db, 0xc6dc, 0xbc53, 0xbc54, - 0xc6dd, 0xbc55, 0xbc56, 0xbc57, 0xc6de, 0xbc58, 0xbc59, 0xbc5a, - 0xbc61, 0xbc62, 0xbc63, 0xbc64, 0xc6df, 0xc6e0, 0xbc65, 0xc6e1, - 0xc6e2, 0xc6e3, 0xbc66, 0xbc67, 0xbc68, 0xbc69, 0xbc6a, 0xbc6b, - 0xc6e4, 0xc6e5, 0xbc6c, 0xbc6d, 0xc6e6, 0xbc6e, 0xbc6f, 0xbc70, - 0xc6e7, 0xbc71, 0xbc72, 0xbc73, 0xbc74, 0xbc75, 0xbc76, 0xbc77, - 0xc6e8, 0xc6e9, 0xbc78, 0xc6ea, 0xbc79, 0xc6eb, 0xbc7a, 0xbc81, - 0xbc82, 0xbc83, 0xbc84, 0xbc85, 0xc6ec, 0xbc86, 0xbc87, 0xbc88, - 0xc6ed, 0xbc89, 0xbc8a, 0xbc8b, 0xc6ee, 0xbc8c, 0xbc8d, 0xbc8e, - 0xbc8f, 0xbc90, 0xbc91, 0xbc92, 0xc6ef, 0xc6f0, 0xbc93, 0xbc94, - 0xc6f1, 0xc6f2, 0xbc95, 0xbc96, 0xbc97, 0xbc98, 0xbc99, 0xbc9a, - 0xc6f3, 0xbc9b, 0xbc9c, 0xbc9d, 0xbc9e, 0xbc9f, 0xbca0, 0xbd41, - 0xc6f4, 0xbd42, 0xbd43, 0xbd44, 0xbd45, 0xbd46, 0xbd47, 0xbd48, - 0xbd49, 0xc6f5, 0xbd4a, 0xc6f6, 0xbd4b, 0xbd4c, 0xbd4d, 0xbd4e, - 0xbd4f, 0xbd50, 0xbd51, 0xbd52, 0xc6f7, 0xc6f8, 0xbd53, 0xbd54, - 0xc6f9, 0xbd55, 0xbd56, 0xbd57, 0xc6fa, 0xbd58, 0xbd59, 0xbd5a, - 0xbd61, 0xbd62, 0xbd63, 0xbd64, 0xc6fb, 0xc6fc, 0xbd65, 0xc6fd, - /* 0xd400 .. 0xd4ff */ - 0xbd66, 0xc6fe, 0xbd67, 0xbd68, 0xbd69, 0xbd6a, 0xbd6b, 0xbd6c, - 0xc7a1, 0xbd6d, 0xbd6e, 0xbd6f, 0xbd70, 0xbd71, 0xbd72, 0xbd73, - 0xbd74, 0xbd75, 0xbd76, 0xbd77, 0xbd78, 0xbd79, 0xbd7a, 0xbd81, - 0xbd82, 0xbd83, 0xbd84, 0xbd85, 0xbd86, 0xc7a2, 0xbd87, 0xbd88, - 0xbd89, 0xbd8a, 0xbd8b, 0xbd8c, 0xbd8d, 0xbd8e, 0xbd8f, 0xbd90, - 0xbd91, 0xbd92, 0xbd93, 0xbd94, 0xbd95, 0xbd96, 0xbd97, 0xbd98, - 0xbd99, 0xbd9a, 0xbd9b, 0xbd9c, 0xbd9d, 0xbd9e, 0xbd9f, 0xbda0, - 0xbe41, 0xbe42, 0xbe43, 0xbe44, 0xbe45, 0xbe46, 0xbe47, 0xbe48, - 0xc7a3, 0xbe49, 0xbe4a, 0xbe4b, 0xc7a4, 0xbe4c, 0xbe4d, 0xbe4e, - 0xbe4f, 0xbe50, 0xbe51, 0xbe52, 0xbe53, 0xbe54, 0xbe55, 0xbe56, - 0xbe57, 0xbe58, 0xbe59, 0xbe5a, 0xbe61, 0xbe62, 0xbe63, 0xbe64, - 0xbe65, 0xbe66, 0xbe67, 0xbe68, 0xc7a5, 0xbe69, 0xbe6a, 0xbe6b, - 0xc7a6, 0xbe6c, 0xbe6d, 0xbe6e, 0xc7a7, 0xbe6f, 0xbe70, 0xbe71, - 0xbe72, 0xbe73, 0xbe74, 0xbe75, 0xbe76, 0xc7a8, 0xbe77, 0xc7a9, - 0xbe78, 0xbe79, 0xbe7a, 0xbe81, 0xbe82, 0xbe83, 0xbe84, 0xbe85, - 0xc7aa, 0xc7ab, 0xbe86, 0xbe87, 0xc7ac, 0xbe88, 0xbe89, 0xc7ad, - 0xc7ae, 0xbe8a, 0xc7af, 0xbe8b, 0xbe8c, 0xbe8d, 0xbe8e, 0xbe8f, - 0xc7b0, 0xc7b1, 0xbe90, 0xc7b2, 0xbe91, 0xc7b3, 0xbe92, 0xbe93, - 0xbe94, 0xbe95, 0xbe96, 0xbe97, 0xc7b4, 0xbe98, 0xbe99, 0xbe9a, - 0xbe9b, 0xbe9c, 0xbe9d, 0xbe9e, 0xbe9f, 0xbea0, 0xbf41, 0xbf42, - 0xbf43, 0xbf44, 0xbf45, 0xbf46, 0xbf47, 0xbf48, 0xbf49, 0xbf4a, - 0xbf4b, 0xc7b5, 0xbf4c, 0xbf4d, 0xbf4e, 0xbf4f, 0xbf50, 0xbf51, - 0xbf52, 0xbf53, 0xbf54, 0xbf55, 0xbf56, 0xbf57, 0xbf58, 0xbf59, - 0xbf5a, 0xbf61, 0xbf62, 0xbf63, 0xbf64, 0xbf65, 0xbf66, 0xbf67, - 0xbf68, 0xbf69, 0xbf6a, 0xbf6b, 0xbf6c, 0xbf6d, 0xbf6e, 0xbf6f, - 0xbf70, 0xbf71, 0xbf72, 0xbf73, 0xc7b6, 0xbf74, 0xbf75, 0xbf76, - 0xc7b7, 0xbf77, 0xbf78, 0xbf79, 0xc7b8, 0xbf7a, 0xbf81, 0xbf82, - 0xbf83, 0xbf84, 0xbf85, 0xbf86, 0xc7b9, 0xbf87, 0xbf88, 0xc7ba, - 0xbf89, 0xbf8a, 0xbf8b, 0xbf8c, 0xbf8d, 0xbf8e, 0xbf8f, 0xbf90, - 0xc7bb, 0xbf91, 0xbf92, 0xbf93, 0xc7bc, 0xbf94, 0xbf95, 0xbf96, - 0xc7bd, 0xbf97, 0xbf98, 0xbf99, 0xbf9a, 0xbf9b, 0xbf9c, 0xbf9d, - 0xc7be, 0xbf9e, 0xbf9f, 0xc7bf, 0xbfa0, 0xc7c0, 0xc041, 0xc042, - /* 0xd500 .. 0xd5ff */ - 0xc043, 0xc044, 0xc045, 0xc046, 0xc7c1, 0xc047, 0xc048, 0xc049, - 0xc7c2, 0xc04a, 0xc04b, 0xc04c, 0xc7c3, 0xc04d, 0xc04e, 0xc04f, - 0xc050, 0xc051, 0xc052, 0xc053, 0xc7c4, 0xc7c5, 0xc054, 0xc7c6, - 0xc055, 0xc056, 0xc057, 0xc058, 0xc059, 0xc05a, 0xc061, 0xc062, - 0xc063, 0xc064, 0xc065, 0xc066, 0xc067, 0xc068, 0xc069, 0xc06a, - 0xc06b, 0xc06c, 0xc06d, 0xc06e, 0xc06f, 0xc070, 0xc071, 0xc072, - 0xc073, 0xc074, 0xc075, 0xc076, 0xc077, 0xc078, 0xc079, 0xc07a, - 0xc081, 0xc082, 0xc083, 0xc084, 0xc7c7, 0xc7c8, 0xc085, 0xc086, - 0xc7c9, 0xc087, 0xc088, 0xc089, 0xc7ca, 0xc08a, 0xc08b, 0xc08c, - 0xc08d, 0xc08e, 0xc08f, 0xc090, 0xc7cb, 0xc7cc, 0xc091, 0xc7cd, - 0xc092, 0xc7ce, 0xc093, 0xc094, 0xc095, 0xc096, 0xc097, 0xc098, - 0xc7cf, 0xc7d0, 0xc099, 0xc09a, 0xc7d1, 0xc09b, 0xc09c, 0xc09d, - 0xc7d2, 0xc09e, 0xc09f, 0xc0a0, 0xc141, 0xc7d3, 0xc142, 0xc143, - 0xc7d4, 0xc7d5, 0xc144, 0xc7d6, 0xc145, 0xc7d7, 0xc146, 0xc147, - 0xc148, 0xc149, 0xc14a, 0xc14b, 0xc7d8, 0xc7d9, 0xc14c, 0xc14d, - 0xc7da, 0xc14e, 0xc14f, 0xc150, 0xc7db, 0xc151, 0xc152, 0xc153, - 0xc154, 0xc155, 0xc156, 0xc157, 0xc7dc, 0xc7dd, 0xc158, 0xc7de, - 0xc7df, 0xc7e0, 0xc159, 0xc15a, 0xc161, 0xc162, 0xc163, 0xc164, - 0xc7e1, 0xc165, 0xc166, 0xc167, 0xc168, 0xc169, 0xc16a, 0xc16b, - 0xc16c, 0xc16d, 0xc16e, 0xc16f, 0xc170, 0xc171, 0xc172, 0xc173, - 0xc174, 0xc175, 0xc176, 0xc177, 0xc178, 0xc7e2, 0xc179, 0xc17a, - 0xc181, 0xc182, 0xc183, 0xc184, 0xc185, 0xc186, 0xc187, 0xc188, - 0xc189, 0xc18a, 0xc18b, 0xc18c, 0xc18d, 0xc18e, 0xc18f, 0xc190, - 0xc191, 0xc192, 0xc193, 0xc194, 0xc195, 0xc196, 0xc197, 0xc198, - 0xc199, 0xc19a, 0xc19b, 0xc19c, 0xc19d, 0xc19e, 0xc19f, 0xc1a0, - 0xc7e3, 0xc7e4, 0xc241, 0xc242, 0xc7e5, 0xc243, 0xc244, 0xc245, - 0xc7e6, 0xc246, 0xc7e7, 0xc247, 0xc248, 0xc249, 0xc24a, 0xc24b, - 0xc7e8, 0xc7e9, 0xc24c, 0xc7ea, 0xc24d, 0xc7eb, 0xc24e, 0xc24f, - 0xc250, 0xc251, 0xc252, 0xc253, 0xc7ec, 0xc7ed, 0xc254, 0xc255, - 0xc7ee, 0xc256, 0xc257, 0xc258, 0xc7ef, 0xc259, 0xc25a, 0xc261, - 0xc262, 0xc263, 0xc264, 0xc265, 0xc7f0, 0xc7f1, 0xc266, 0xc7f2, - 0xc267, 0xc7f3, 0xc268, 0xc269, 0xc26a, 0xc26b, 0xc26c, 0xc26d, - /* 0xd600 .. 0xd6ff */ - 0xc7f4, 0xc7f5, 0xc26e, 0xc26f, 0xc7f6, 0xc270, 0xc271, 0xc272, - 0xc7f7, 0xc273, 0xc274, 0xc275, 0xc276, 0xc277, 0xc278, 0xc279, - 0xc7f8, 0xc7f9, 0xc27a, 0xc7fa, 0xc7fb, 0xc7fc, 0xc281, 0xc282, - 0xc283, 0xc284, 0xc285, 0xc286, 0xc7fd, 0xc287, 0xc288, 0xc289, - 0xc7fe, 0xc28a, 0xc28b, 0xc28c, 0xc8a1, 0xc28d, 0xc28e, 0xc28f, - 0xc290, 0xc291, 0xc292, 0xc293, 0xc294, 0xc8a2, 0xc295, 0xc296, - 0xc297, 0xc298, 0xc299, 0xc29a, 0xc29b, 0xc29c, 0xc29d, 0xc29e, - 0xc8a3, 0xc8a4, 0xc29f, 0xc2a0, 0xc8a5, 0xc341, 0xc342, 0xc343, - 0xc8a6, 0xc344, 0xc345, 0xc346, 0xc347, 0xc8a7, 0xc348, 0xc349, - 0xc8a8, 0xc8a9, 0xc34a, 0xc8aa, 0xc34b, 0xc8ab, 0xc34c, 0xc34d, - 0xc34e, 0xc8ac, 0xc34f, 0xc350, 0xc8ad, 0xc8ae, 0xc351, 0xc352, - 0xc8af, 0xc353, 0xc354, 0xc355, 0xc8b0, 0xc356, 0xc357, 0xc358, - 0xc359, 0xc35a, 0xc361, 0xc362, 0xc363, 0xc364, 0xc365, 0xc8b1, - 0xc366, 0xc8b2, 0xc367, 0xc368, 0xc369, 0xc36a, 0xc36b, 0xc36c, - 0xc8b3, 0xc8b4, 0xc36d, 0xc36e, 0xc8b5, 0xc36f, 0xc370, 0xc371, - 0xc372, 0xc373, 0xc374, 0xc375, 0xc376, 0xc377, 0xc378, 0xc379, - 0xc37a, 0xc381, 0xc382, 0xc8b6, 0xc383, 0xc8b7, 0xc384, 0xc385, - 0xc386, 0xc387, 0xc388, 0xc389, 0xc8b8, 0xc8b9, 0xc38a, 0xc38b, - 0xc8ba, 0xc38c, 0xc38d, 0xc38e, 0xc8bb, 0xc38f, 0xc390, 0xc391, - 0xc392, 0xc393, 0xc394, 0xc395, 0xc396, 0xc8bc, 0xc397, 0xc8bd, - 0xc398, 0xc8be, 0xc399, 0xc39a, 0xc39b, 0xc39c, 0xc39d, 0xc39e, - 0xc8bf, 0xc39f, 0xc3a0, 0xc441, 0xc8c0, 0xc442, 0xc443, 0xc444, - 0xc8c1, 0xc445, 0xc446, 0xc447, 0xc448, 0xc449, 0xc44a, 0xc44b, - 0xc44c, 0xc8c2, 0xc44d, 0xc8c3, 0xc44e, 0xc44f, 0xc450, 0xc451, - 0xc452, 0xc453, 0xc454, 0xc455, 0xc8c4, 0xc8c5, 0xc456, 0xc457, - 0xc8c6, 0xc458, 0xc459, 0xc45a, 0xc8c7, 0xc461, 0xc462, 0xc463, - 0xc464, 0xc8c8, 0xc465, 0xc466, 0xc8c9, 0xc467, 0xc468, 0xc8ca, - 0xc469, 0xc8cb, 0xc46a, 0xc46b, 0xc46c, 0xc46d, 0xc46e, 0xc46f, - 0xc8cc, 0xc470, 0xc471, 0xc472, 0xc8cd, 0xc473, 0xc474, 0xc475, - 0xc8ce, 0xc476, 0xc477, 0xc478, 0xc479, 0xc47a, 0xc481, 0xc482, - 0xc8cf, 0xc483, 0xc484, 0xc485, 0xc486, 0xc8d0, 0xc487, 0xc488, - 0xc489, 0xc48a, 0xc48b, 0xc48c, 0xc8d1, 0xc8d2, 0xc48d, 0xc48e, - /* 0xd700 .. 0xd7ff */ - 0xc8d3, 0xc48f, 0xc490, 0xc491, 0xc8d4, 0xc492, 0xc493, 0xc494, - 0xc495, 0xc496, 0xc497, 0xc498, 0xc499, 0xc49a, 0xc49b, 0xc49c, - 0xc49d, 0xc8d5, 0xc49e, 0xc49f, 0xc4a0, 0xc541, 0xc542, 0xc543, - 0xc8d6, 0xc8d7, 0xc544, 0xc545, 0xc8d8, 0xc546, 0xc547, 0xc548, - 0xc8d9, 0xc549, 0xc54a, 0xc54b, 0xc54c, 0xc54d, 0xc54e, 0xc54f, - 0xc8da, 0xc8db, 0xc550, 0xc8dc, 0xc551, 0xc8dd, 0xc552, 0xc553, - 0xc554, 0xc555, 0xc556, 0xc557, 0xc8de, 0xc8df, 0xc558, 0xc559, - 0xc8e0, 0xc55a, 0xc561, 0xc562, 0xc8e1, 0xc563, 0xc564, 0xc565, - 0xc566, 0xc567, 0xc568, 0xc569, 0xc8e2, 0xc56a, 0xc56b, 0xc8e3, - 0xc56c, 0xc8e4, 0xc56d, 0xc56e, 0xc56f, 0xc570, 0xc571, 0xc572, - 0xc8e5, 0xc8e6, 0xc573, 0xc574, 0xc8e7, 0xc575, 0xc8e8, 0xc8e9, - 0xc8ea, 0xc8eb, 0xc576, 0xc577, 0xc578, 0xc579, 0xc57a, 0xc581, - 0xc8ec, 0xc8ed, 0xc582, 0xc8ee, 0xc583, 0xc8ef, 0xc584, 0xc585, - 0xc586, 0xc8f0, 0xc587, 0xc588, 0xc8f1, 0xc589, 0xc58a, 0xc58b, - 0xc8f2, 0xc58c, 0xc58d, 0xc58e, 0xc8f3, 0xc58f, 0xc590, 0xc591, - 0xc592, 0xc593, 0xc594, 0xc595, 0xc8f4, 0xc8f5, 0xc596, 0xc597, - 0xc598, 0xc8f6, 0xc599, 0xc59a, 0xc59b, 0xc59c, 0xc59d, 0xc59e, - 0xc8f7, 0xc8f8, 0xc59f, 0xc5a0, 0xc8f9, 0xc641, 0xc642, 0xc643, - 0xc8fa, 0xc644, 0xc645, 0xc646, 0xc647, 0xc648, 0xc649, 0xc64a, - 0xc8fb, 0xc8fc, 0xc64b, 0xc8fd, 0xc64c, 0xc8fe, 0xc64d, 0xc64e, - 0xc64f, 0xc650, 0xc651, 0xc652, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xe000 .. 0xe0ff */ - 0xc9a1, 0xc9a2, 0xc9a3, 0xc9a4, 0xc9a5, 0xc9a6, 0xc9a7, 0xc9a8, - 0xc9a9, 0xc9aa, 0xc9ab, 0xc9ac, 0xc9ad, 0xc9ae, 0xc9af, 0xc9b0, - 0xc9b1, 0xc9b2, 0xc9b3, 0xc9b4, 0xc9b5, 0xc9b6, 0xc9b7, 0xc9b8, - 0xc9b9, 0xc9ba, 0xc9bb, 0xc9bc, 0xc9bd, 0xc9be, 0xc9bf, 0xc9c0, - 0xc9c1, 0xc9c2, 0xc9c3, 0xc9c4, 0xc9c5, 0xc9c6, 0xc9c7, 0xc9c8, - 0xc9c9, 0xc9ca, 0xc9cb, 0xc9cc, 0xc9cd, 0xc9ce, 0xc9cf, 0xc9d0, - 0xc9d1, 0xc9d2, 0xc9d3, 0xc9d4, 0xc9d5, 0xc9d6, 0xc9d7, 0xc9d8, - 0xc9d9, 0xc9da, 0xc9db, 0xc9dc, 0xc9dd, 0xc9de, 0xc9df, 0xc9e0, - 0xc9e1, 0xc9e2, 0xc9e3, 0xc9e4, 0xc9e5, 0xc9e6, 0xc9e7, 0xc9e8, - 0xc9e9, 0xc9ea, 0xc9eb, 0xc9ec, 0xc9ed, 0xc9ee, 0xc9ef, 0xc9f0, - 0xc9f1, 0xc9f2, 0xc9f3, 0xc9f4, 0xc9f5, 0xc9f6, 0xc9f7, 0xc9f8, - 0xc9f9, 0xc9fa, 0xc9fb, 0xc9fc, 0xc9fd, 0xc9fe, 0xfea1, 0xfea2, - 0xfea3, 0xfea4, 0xfea5, 0xfea6, 0xfea7, 0xfea8, 0xfea9, 0xfeaa, - 0xfeab, 0xfeac, 0xfead, 0xfeae, 0xfeaf, 0xfeb0, 0xfeb1, 0xfeb2, - 0xfeb3, 0xfeb4, 0xfeb5, 0xfeb6, 0xfeb7, 0xfeb8, 0xfeb9, 0xfeba, - 0xfebb, 0xfebc, 0xfebd, 0xfebe, 0xfebf, 0xfec0, 0xfec1, 0xfec2, - 0xfec3, 0xfec4, 0xfec5, 0xfec6, 0xfec7, 0xfec8, 0xfec9, 0xfeca, - 0xfecb, 0xfecc, 0xfecd, 0xfece, 0xfecf, 0xfed0, 0xfed1, 0xfed2, - 0xfed3, 0xfed4, 0xfed5, 0xfed6, 0xfed7, 0xfed8, 0xfed9, 0xfeda, - 0xfedb, 0xfedc, 0xfedd, 0xfede, 0xfedf, 0xfee0, 0xfee1, 0xfee2, - 0xfee3, 0xfee4, 0xfee5, 0xfee6, 0xfee7, 0xfee8, 0xfee9, 0xfeea, - 0xfeeb, 0xfeec, 0xfeed, 0xfeee, 0xfeef, 0xfef0, 0xfef1, 0xfef2, - 0xfef3, 0xfef4, 0xfef5, 0xfef6, 0xfef7, 0xfef8, 0xfef9, 0xfefa, - 0xfefb, 0xfefc, 0xfefd, 0xfefe, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xf800 .. 0xf8ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x00ff, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xf900 .. 0xf9ff */ - 0xcbd0, 0xcbd6, 0xcbe7, 0xcdcf, 0xcde8, 0xcead, 0xcffb, 0xd0a2, - 0xd0b8, 0xd0d0, 0xd0dd, 0xd1d4, 0xd1d5, 0xd1d8, 0xd1db, 0xd1dc, - 0xd1dd, 0xd1de, 0xd1df, 0xd1e0, 0xd1e2, 0xd1e3, 0xd1e4, 0xd1e5, - 0xd1e6, 0xd1e8, 0xd1e9, 0xd1ea, 0xd1eb, 0xd1ed, 0xd1ef, 0xd1f0, - 0xd1f2, 0xd1f6, 0xd1fa, 0xd1fc, 0xd1fd, 0xd1fe, 0xd2a2, 0xd2a3, - 0xd2a7, 0xd2a8, 0xd2a9, 0xd2aa, 0xd2ab, 0xd2ad, 0xd2b2, 0xd2be, - 0xd2c2, 0xd2c3, 0xd2c4, 0xd2c6, 0xd2c7, 0xd2c8, 0xd2c9, 0xd2ca, - 0xd2cb, 0xd2cd, 0xd2ce, 0xd2cf, 0xd2d0, 0xd2d1, 0xd2d2, 0xd2d3, - 0xd2d4, 0xd2d5, 0xd2d6, 0xd2d7, 0xd2d9, 0xd2da, 0xd2de, 0xd2df, - 0xd2e1, 0xd2e2, 0xd2e4, 0xd2e5, 0xd2e6, 0xd2e7, 0xd2e8, 0xd2e9, - 0xd2ea, 0xd2eb, 0xd2f0, 0xd2f1, 0xd2f2, 0xd2f3, 0xd2f4, 0xd2f5, - 0xd2f7, 0xd2f8, 0xd4e6, 0xd4fc, 0xd5a5, 0xd5ab, 0xd5ae, 0xd6b8, - 0xd6cd, 0xd7cb, 0xd7e4, 0xdbc5, 0xdbe4, 0xdca5, 0xdda5, 0xddd5, - 0xddf4, 0xdefc, 0xdefe, 0xdfb3, 0xdfe1, 0xdfe8, 0xe0f1, 0xe1ad, - 0xe1ed, 0xe3f5, 0xe4a1, 0xe4a9, 0xe5ae, 0xe5b1, 0xe5b2, 0xe5b9, - 0xe5bb, 0xe5bc, 0xe5c4, 0xe5ce, 0xe5d0, 0xe5d2, 0xe5d6, 0xe5fa, - 0xe5fb, 0xe5fc, 0xe5fe, 0xe6a1, 0xe6a4, 0xe6a7, 0xe6ad, 0xe6af, - 0xe6b0, 0xe6b1, 0xe6b3, 0xe6b7, 0xe6b8, 0xe6bc, 0xe6c4, 0xe6c6, - 0xe6c7, 0xe6ca, 0xe6d2, 0xe6d6, 0xe6d9, 0xe6dc, 0xe6df, 0xe6e1, - 0xe6e4, 0xe6e5, 0xe6e6, 0xe6e8, 0xe6ea, 0xe6eb, 0xe6ec, 0xe6ef, - 0xe6f1, 0xe6f2, 0xe6f5, 0xe6f6, 0xe6f7, 0xe6f9, 0xe7a1, 0xe7a6, - 0xe7a9, 0xe7aa, 0xe7ac, 0xe7ad, 0xe7b0, 0xe7bf, 0xe7c1, 0xe7c6, - 0xe7c7, 0xe7cb, 0xe7cd, 0xe7cf, 0xe7d0, 0xe7d3, 0xe7df, 0xe7e4, - 0xe7e6, 0xe7f7, 0xe8e7, 0xe8e8, 0xe8f0, 0xe8f1, 0xe8f7, 0xe8f9, - 0xe8fb, 0xe8fe, 0xe9a7, 0xe9ac, 0xe9cc, 0xe9f7, 0xeac1, 0xeae5, - 0xeaf4, 0xeaf7, 0xeafc, 0xeafe, 0xeba4, 0xeba7, 0xeba9, 0xebaa, - 0xebba, 0xebbb, 0xebbd, 0xebc1, 0xebc2, 0xebc6, 0xebc7, 0xebcc, - 0xebcf, 0xebd0, 0xebd1, 0xebd2, 0xebd8, 0xeca6, 0xeca7, 0xecaa, - 0xecaf, 0xecb0, 0xecb1, 0xecb2, 0xecb5, 0xecb8, 0xecba, 0xecc0, - 0xecc1, 0xecc5, 0xecc6, 0xecc9, 0xecca, 0xecd5, 0xecdd, 0xecde, - 0xece1, 0xece4, 0xece7, 0xece8, 0xecf7, 0xecf8, 0xecfa, 0xeda1, - 0xeda2, 0xeda3, 0xedee, 0xeedb, 0xf2bd, 0xf2fa, 0xf3b1, 0xf4a7, - /* 0xfa00 .. 0xfaff */ - 0xf4ee, 0xf6f4, 0xf6f6, 0xf7b8, 0xf7c8, 0xf7d3, 0xf8db, 0xf8f0, - 0xfaa1, 0xfaa2, 0xfae6, 0xfca9, 0xe8b4, 0x003f, 0x003f, 0x003f, - 0xf5c0, 0x003f, 0xf4e7, 0x003f, 0x003f, 0xfdeb, 0x003f, 0xeccc, - 0x003f, 0xe3ea, 0xdfd4, 0xdcd8, 0xeffe, 0xeff1, 0xe9e2, 0x003f, - 0x003f, 0x003f, 0xf0b3, 0x003f, 0x003f, 0xecef, 0xd4b4, 0x003f, - 0x003f, 0x003f, 0xdaf9, 0xdef8, 0xcebd, 0xf9cd, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xff00 .. 0xffff */ - 0x003f, 0xa3a1, 0xa3a2, 0xa3a3, 0xa3a4, 0xa3a5, 0xa3a6, 0xa3a7, - 0xa3a8, 0xa3a9, 0xa3aa, 0xa3ab, 0xa3ac, 0xa3ad, 0xa3ae, 0xa3af, - 0xa3b0, 0xa3b1, 0xa3b2, 0xa3b3, 0xa3b4, 0xa3b5, 0xa3b6, 0xa3b7, - 0xa3b8, 0xa3b9, 0xa3ba, 0xa3bb, 0xa3bc, 0xa3bd, 0xa3be, 0xa3bf, - 0xa3c0, 0xa3c1, 0xa3c2, 0xa3c3, 0xa3c4, 0xa3c5, 0xa3c6, 0xa3c7, - 0xa3c8, 0xa3c9, 0xa3ca, 0xa3cb, 0xa3cc, 0xa3cd, 0xa3ce, 0xa3cf, - 0xa3d0, 0xa3d1, 0xa3d2, 0xa3d3, 0xa3d4, 0xa3d5, 0xa3d6, 0xa3d7, - 0xa3d8, 0xa3d9, 0xa3da, 0xa3db, 0xa1ac, 0xa3dd, 0xa3de, 0xa3df, - 0xa3e0, 0xa3e1, 0xa3e2, 0xa3e3, 0xa3e4, 0xa3e5, 0xa3e6, 0xa3e7, - 0xa3e8, 0xa3e9, 0xa3ea, 0xa3eb, 0xa3ec, 0xa3ed, 0xa3ee, 0xa3ef, - 0xa3f0, 0xa3f1, 0xa3f2, 0xa3f3, 0xa3f4, 0xa3f5, 0xa3f6, 0xa3f7, - 0xa3f8, 0xa3f9, 0xa3fa, 0xa3fb, 0xa3fc, 0xa3fd, 0xa2a6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa4d4, 0xa4a1, 0xa4a2, 0xa4a3, 0xa4a4, 0xa4a5, 0xa4a6, 0xa4a7, - 0xa4a8, 0xa4a9, 0xa4aa, 0xa4ab, 0xa4ac, 0xa4ad, 0xa4ae, 0xa4af, - 0xa4b0, 0xa4b1, 0xa4b2, 0xa4b3, 0xa4b4, 0xa4b5, 0xa4b6, 0xa4b7, - 0xa4b8, 0xa4b9, 0xa4ba, 0xa4bb, 0xa4bc, 0xa4bd, 0xa4be, 0x003f, - 0x003f, 0x003f, 0xa4bf, 0xa4c0, 0xa4c1, 0xa4c2, 0xa4c3, 0xa4c4, - 0x003f, 0x003f, 0xa4c5, 0xa4c6, 0xa4c7, 0xa4c8, 0xa4c9, 0xa4ca, - 0x003f, 0x003f, 0xa4cb, 0xa4cc, 0xa4cd, 0xa4ce, 0xa4cf, 0xa4d0, - 0x003f, 0x003f, 0xa4d1, 0xa4d2, 0xa4d3, 0x003f, 0x003f, 0x003f, - 0xa1cb, 0xa1cc, 0xa1fe, 0xa3fe, 0x003f, 0xa1cd, 0xa3dc, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* defaults */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x9400, 0x9400, 0x9400, - 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, - 0x9400, 0x0500, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, - 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, - 0x0600, 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x9400, - 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, - 0x0d00, 0x0e00, 0x0f00, 0x1000, 0x9400, 0x9400, 0x9400, 0x9400, - 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, - 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, - 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x1100, 0x1200, - 0x1300, 0x1400, 0x1500, 0x1600, 0x1700, 0x1800, 0x1900, 0x1a00, - 0x1b00, 0x1c00, 0x1d00, 0x1e00, 0x1f00, 0x2000, 0x2100, 0x2200, - 0x2300, 0x2400, 0x2500, 0x2600, 0x2700, 0x2800, 0x2900, 0x2a00, - 0x2b00, 0x2c00, 0x2d00, 0x2e00, 0x2f00, 0x3000, 0x3100, 0x3200, - 0x3300, 0x3400, 0x3500, 0x3600, 0x3700, 0x3800, 0x3900, 0x3a00, - 0x3b00, 0x3c00, 0x3d00, 0x3e00, 0x3f00, 0x4000, 0x4100, 0x4200, - 0x4300, 0x4400, 0x4500, 0x4600, 0x4700, 0x4800, 0x4900, 0x4a00, - 0x4b00, 0x4c00, 0x4d00, 0x4e00, 0x4f00, 0x5000, 0x5100, 0x5200, - 0x5300, 0x5400, 0x5500, 0x5600, 0x5700, 0x5800, 0x5900, 0x5a00, - 0x5b00, 0x5c00, 0x5d00, 0x5e00, 0x5f00, 0x6000, 0x6100, 0x6200, - 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, - 0x9400, 0x9400, 0x9400, 0x9400, 0x6300, 0x6400, 0x6500, 0x6600, - 0x6700, 0x6800, 0x6900, 0x6a00, 0x6b00, 0x6c00, 0x6d00, 0x6e00, - 0x6f00, 0x7000, 0x7100, 0x7200, 0x7300, 0x7400, 0x7500, 0x7600, - 0x7700, 0x7800, 0x7900, 0x7a00, 0x7b00, 0x7c00, 0x7d00, 0x7e00, - 0x7f00, 0x8000, 0x8100, 0x8200, 0x8300, 0x8400, 0x8500, 0x8600, - 0x8700, 0x8800, 0x8900, 0x8a00, 0x8b00, 0x8c00, 0x8d00, 0x8e00, - 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, - 0x8f00, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, - 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, - 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, 0x9400, - 0x9000, 0x9100, 0x9200, 0x9400, 0x9400, 0x9400, 0x9400, 0x9300 -}; - -const struct dbcs_table cptable_949 = -{ - { 949, 2, 0x003f, 0x003f, "ANSI/OEM Korean Unified Hangul" }, - cp2uni, - cp2uni_leadbytes, - uni2cp_low, - uni2cp_high, - { - 0x81, 0xfe, 0x00, 0x00 - } -}; diff --git a/reactos/tools/unicode/c_950.c b/reactos/tools/unicode/c_950.c deleted file mode 100644 index fc7f76f034a..00000000000 --- a/reactos/tools/unicode/c_950.c +++ /dev/null @@ -1,8412 +0,0 @@ -/* code page 950 (ANSI/OEM Traditional Chinese Big5) */ -/* generated from http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit950.txt */ -/* DO NOT EDIT!! */ - -#include "wine/unicode.h" - -static const WCHAR cp2uni[32512] = -{ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x0080, 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, 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, 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, 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, 0xf8f8, - /* lead byte 81 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeeb8, 0xeeb9, 0xeeba, 0xeebb, 0xeebc, 0xeebd, 0xeebe, 0xeebf, - 0xeec0, 0xeec1, 0xeec2, 0xeec3, 0xeec4, 0xeec5, 0xeec6, 0xeec7, - 0xeec8, 0xeec9, 0xeeca, 0xeecb, 0xeecc, 0xeecd, 0xeece, 0xeecf, - 0xeed0, 0xeed1, 0xeed2, 0xeed3, 0xeed4, 0xeed5, 0xeed6, 0xeed7, - 0xeed8, 0xeed9, 0xeeda, 0xeedb, 0xeedc, 0xeedd, 0xeede, 0xeedf, - 0xeee0, 0xeee1, 0xeee2, 0xeee3, 0xeee4, 0xeee5, 0xeee6, 0xeee7, - 0xeee8, 0xeee9, 0xeeea, 0xeeeb, 0xeeec, 0xeeed, 0xeeee, 0xeeef, - 0xeef0, 0xeef1, 0xeef2, 0xeef3, 0xeef4, 0xeef5, 0xeef6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeef7, 0xeef8, 0xeef9, 0xeefa, 0xeefb, 0xeefc, 0xeefd, - 0xeefe, 0xeeff, 0xef00, 0xef01, 0xef02, 0xef03, 0xef04, 0xef05, - 0xef06, 0xef07, 0xef08, 0xef09, 0xef0a, 0xef0b, 0xef0c, 0xef0d, - 0xef0e, 0xef0f, 0xef10, 0xef11, 0xef12, 0xef13, 0xef14, 0xef15, - 0xef16, 0xef17, 0xef18, 0xef19, 0xef1a, 0xef1b, 0xef1c, 0xef1d, - 0xef1e, 0xef1f, 0xef20, 0xef21, 0xef22, 0xef23, 0xef24, 0xef25, - 0xef26, 0xef27, 0xef28, 0xef29, 0xef2a, 0xef2b, 0xef2c, 0xef2d, - 0xef2e, 0xef2f, 0xef30, 0xef31, 0xef32, 0xef33, 0xef34, 0xef35, - 0xef36, 0xef37, 0xef38, 0xef39, 0xef3a, 0xef3b, 0xef3c, 0xef3d, - 0xef3e, 0xef3f, 0xef40, 0xef41, 0xef42, 0xef43, 0xef44, 0xef45, - 0xef46, 0xef47, 0xef48, 0xef49, 0xef4a, 0xef4b, 0xef4c, 0xef4d, - 0xef4e, 0xef4f, 0xef50, 0xef51, 0xef52, 0xef53, 0xef54, 0x003f, - /* lead byte 82 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xef55, 0xef56, 0xef57, 0xef58, 0xef59, 0xef5a, 0xef5b, 0xef5c, - 0xef5d, 0xef5e, 0xef5f, 0xef60, 0xef61, 0xef62, 0xef63, 0xef64, - 0xef65, 0xef66, 0xef67, 0xef68, 0xef69, 0xef6a, 0xef6b, 0xef6c, - 0xef6d, 0xef6e, 0xef6f, 0xef70, 0xef71, 0xef72, 0xef73, 0xef74, - 0xef75, 0xef76, 0xef77, 0xef78, 0xef79, 0xef7a, 0xef7b, 0xef7c, - 0xef7d, 0xef7e, 0xef7f, 0xef80, 0xef81, 0xef82, 0xef83, 0xef84, - 0xef85, 0xef86, 0xef87, 0xef88, 0xef89, 0xef8a, 0xef8b, 0xef8c, - 0xef8d, 0xef8e, 0xef8f, 0xef90, 0xef91, 0xef92, 0xef93, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xef94, 0xef95, 0xef96, 0xef97, 0xef98, 0xef99, 0xef9a, - 0xef9b, 0xef9c, 0xef9d, 0xef9e, 0xef9f, 0xefa0, 0xefa1, 0xefa2, - 0xefa3, 0xefa4, 0xefa5, 0xefa6, 0xefa7, 0xefa8, 0xefa9, 0xefaa, - 0xefab, 0xefac, 0xefad, 0xefae, 0xefaf, 0xefb0, 0xefb1, 0xefb2, - 0xefb3, 0xefb4, 0xefb5, 0xefb6, 0xefb7, 0xefb8, 0xefb9, 0xefba, - 0xefbb, 0xefbc, 0xefbd, 0xefbe, 0xefbf, 0xefc0, 0xefc1, 0xefc2, - 0xefc3, 0xefc4, 0xefc5, 0xefc6, 0xefc7, 0xefc8, 0xefc9, 0xefca, - 0xefcb, 0xefcc, 0xefcd, 0xefce, 0xefcf, 0xefd0, 0xefd1, 0xefd2, - 0xefd3, 0xefd4, 0xefd5, 0xefd6, 0xefd7, 0xefd8, 0xefd9, 0xefda, - 0xefdb, 0xefdc, 0xefdd, 0xefde, 0xefdf, 0xefe0, 0xefe1, 0xefe2, - 0xefe3, 0xefe4, 0xefe5, 0xefe6, 0xefe7, 0xefe8, 0xefe9, 0xefea, - 0xefeb, 0xefec, 0xefed, 0xefee, 0xefef, 0xeff0, 0xeff1, 0x003f, - /* lead byte 83 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeff2, 0xeff3, 0xeff4, 0xeff5, 0xeff6, 0xeff7, 0xeff8, 0xeff9, - 0xeffa, 0xeffb, 0xeffc, 0xeffd, 0xeffe, 0xefff, 0xf000, 0xf001, - 0xf002, 0xf003, 0xf004, 0xf005, 0xf006, 0xf007, 0xf008, 0xf009, - 0xf00a, 0xf00b, 0xf00c, 0xf00d, 0xf00e, 0xf00f, 0xf010, 0xf011, - 0xf012, 0xf013, 0xf014, 0xf015, 0xf016, 0xf017, 0xf018, 0xf019, - 0xf01a, 0xf01b, 0xf01c, 0xf01d, 0xf01e, 0xf01f, 0xf020, 0xf021, - 0xf022, 0xf023, 0xf024, 0xf025, 0xf026, 0xf027, 0xf028, 0xf029, - 0xf02a, 0xf02b, 0xf02c, 0xf02d, 0xf02e, 0xf02f, 0xf030, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036, 0xf037, - 0xf038, 0xf039, 0xf03a, 0xf03b, 0xf03c, 0xf03d, 0xf03e, 0xf03f, - 0xf040, 0xf041, 0xf042, 0xf043, 0xf044, 0xf045, 0xf046, 0xf047, - 0xf048, 0xf049, 0xf04a, 0xf04b, 0xf04c, 0xf04d, 0xf04e, 0xf04f, - 0xf050, 0xf051, 0xf052, 0xf053, 0xf054, 0xf055, 0xf056, 0xf057, - 0xf058, 0xf059, 0xf05a, 0xf05b, 0xf05c, 0xf05d, 0xf05e, 0xf05f, - 0xf060, 0xf061, 0xf062, 0xf063, 0xf064, 0xf065, 0xf066, 0xf067, - 0xf068, 0xf069, 0xf06a, 0xf06b, 0xf06c, 0xf06d, 0xf06e, 0xf06f, - 0xf070, 0xf071, 0xf072, 0xf073, 0xf074, 0xf075, 0xf076, 0xf077, - 0xf078, 0xf079, 0xf07a, 0xf07b, 0xf07c, 0xf07d, 0xf07e, 0xf07f, - 0xf080, 0xf081, 0xf082, 0xf083, 0xf084, 0xf085, 0xf086, 0xf087, - 0xf088, 0xf089, 0xf08a, 0xf08b, 0xf08c, 0xf08d, 0xf08e, 0x003f, - /* lead byte 84 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf08f, 0xf090, 0xf091, 0xf092, 0xf093, 0xf094, 0xf095, 0xf096, - 0xf097, 0xf098, 0xf099, 0xf09a, 0xf09b, 0xf09c, 0xf09d, 0xf09e, - 0xf09f, 0xf0a0, 0xf0a1, 0xf0a2, 0xf0a3, 0xf0a4, 0xf0a5, 0xf0a6, - 0xf0a7, 0xf0a8, 0xf0a9, 0xf0aa, 0xf0ab, 0xf0ac, 0xf0ad, 0xf0ae, - 0xf0af, 0xf0b0, 0xf0b1, 0xf0b2, 0xf0b3, 0xf0b4, 0xf0b5, 0xf0b6, - 0xf0b7, 0xf0b8, 0xf0b9, 0xf0ba, 0xf0bb, 0xf0bc, 0xf0bd, 0xf0be, - 0xf0bf, 0xf0c0, 0xf0c1, 0xf0c2, 0xf0c3, 0xf0c4, 0xf0c5, 0xf0c6, - 0xf0c7, 0xf0c8, 0xf0c9, 0xf0ca, 0xf0cb, 0xf0cc, 0xf0cd, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf0ce, 0xf0cf, 0xf0d0, 0xf0d1, 0xf0d2, 0xf0d3, 0xf0d4, - 0xf0d5, 0xf0d6, 0xf0d7, 0xf0d8, 0xf0d9, 0xf0da, 0xf0db, 0xf0dc, - 0xf0dd, 0xf0de, 0xf0df, 0xf0e0, 0xf0e1, 0xf0e2, 0xf0e3, 0xf0e4, - 0xf0e5, 0xf0e6, 0xf0e7, 0xf0e8, 0xf0e9, 0xf0ea, 0xf0eb, 0xf0ec, - 0xf0ed, 0xf0ee, 0xf0ef, 0xf0f0, 0xf0f1, 0xf0f2, 0xf0f3, 0xf0f4, - 0xf0f5, 0xf0f6, 0xf0f7, 0xf0f8, 0xf0f9, 0xf0fa, 0xf0fb, 0xf0fc, - 0xf0fd, 0xf0fe, 0xf0ff, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104, - 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf10a, 0xf10b, 0xf10c, - 0xf10d, 0xf10e, 0xf10f, 0xf110, 0xf111, 0xf112, 0xf113, 0xf114, - 0xf115, 0xf116, 0xf117, 0xf118, 0xf119, 0xf11a, 0xf11b, 0xf11c, - 0xf11d, 0xf11e, 0xf11f, 0xf120, 0xf121, 0xf122, 0xf123, 0xf124, - 0xf125, 0xf126, 0xf127, 0xf128, 0xf129, 0xf12a, 0xf12b, 0x003f, - /* lead byte 85 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf12c, 0xf12d, 0xf12e, 0xf12f, 0xf130, 0xf131, 0xf132, 0xf133, - 0xf134, 0xf135, 0xf136, 0xf137, 0xf138, 0xf139, 0xf13a, 0xf13b, - 0xf13c, 0xf13d, 0xf13e, 0xf13f, 0xf140, 0xf141, 0xf142, 0xf143, - 0xf144, 0xf145, 0xf146, 0xf147, 0xf148, 0xf149, 0xf14a, 0xf14b, - 0xf14c, 0xf14d, 0xf14e, 0xf14f, 0xf150, 0xf151, 0xf152, 0xf153, - 0xf154, 0xf155, 0xf156, 0xf157, 0xf158, 0xf159, 0xf15a, 0xf15b, - 0xf15c, 0xf15d, 0xf15e, 0xf15f, 0xf160, 0xf161, 0xf162, 0xf163, - 0xf164, 0xf165, 0xf166, 0xf167, 0xf168, 0xf169, 0xf16a, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf16b, 0xf16c, 0xf16d, 0xf16e, 0xf16f, 0xf170, 0xf171, - 0xf172, 0xf173, 0xf174, 0xf175, 0xf176, 0xf177, 0xf178, 0xf179, - 0xf17a, 0xf17b, 0xf17c, 0xf17d, 0xf17e, 0xf17f, 0xf180, 0xf181, - 0xf182, 0xf183, 0xf184, 0xf185, 0xf186, 0xf187, 0xf188, 0xf189, - 0xf18a, 0xf18b, 0xf18c, 0xf18d, 0xf18e, 0xf18f, 0xf190, 0xf191, - 0xf192, 0xf193, 0xf194, 0xf195, 0xf196, 0xf197, 0xf198, 0xf199, - 0xf19a, 0xf19b, 0xf19c, 0xf19d, 0xf19e, 0xf19f, 0xf1a0, 0xf1a1, - 0xf1a2, 0xf1a3, 0xf1a4, 0xf1a5, 0xf1a6, 0xf1a7, 0xf1a8, 0xf1a9, - 0xf1aa, 0xf1ab, 0xf1ac, 0xf1ad, 0xf1ae, 0xf1af, 0xf1b0, 0xf1b1, - 0xf1b2, 0xf1b3, 0xf1b4, 0xf1b5, 0xf1b6, 0xf1b7, 0xf1b8, 0xf1b9, - 0xf1ba, 0xf1bb, 0xf1bc, 0xf1bd, 0xf1be, 0xf1bf, 0xf1c0, 0xf1c1, - 0xf1c2, 0xf1c3, 0xf1c4, 0xf1c5, 0xf1c6, 0xf1c7, 0xf1c8, 0x003f, - /* lead byte 86 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf1c9, 0xf1ca, 0xf1cb, 0xf1cc, 0xf1cd, 0xf1ce, 0xf1cf, 0xf1d0, - 0xf1d1, 0xf1d2, 0xf1d3, 0xf1d4, 0xf1d5, 0xf1d6, 0xf1d7, 0xf1d8, - 0xf1d9, 0xf1da, 0xf1db, 0xf1dc, 0xf1dd, 0xf1de, 0xf1df, 0xf1e0, - 0xf1e1, 0xf1e2, 0xf1e3, 0xf1e4, 0xf1e5, 0xf1e6, 0xf1e7, 0xf1e8, - 0xf1e9, 0xf1ea, 0xf1eb, 0xf1ec, 0xf1ed, 0xf1ee, 0xf1ef, 0xf1f0, - 0xf1f1, 0xf1f2, 0xf1f3, 0xf1f4, 0xf1f5, 0xf1f6, 0xf1f7, 0xf1f8, - 0xf1f9, 0xf1fa, 0xf1fb, 0xf1fc, 0xf1fd, 0xf1fe, 0xf1ff, 0xf200, - 0xf201, 0xf202, 0xf203, 0xf204, 0xf205, 0xf206, 0xf207, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf208, 0xf209, 0xf20a, 0xf20b, 0xf20c, 0xf20d, 0xf20e, - 0xf20f, 0xf210, 0xf211, 0xf212, 0xf213, 0xf214, 0xf215, 0xf216, - 0xf217, 0xf218, 0xf219, 0xf21a, 0xf21b, 0xf21c, 0xf21d, 0xf21e, - 0xf21f, 0xf220, 0xf221, 0xf222, 0xf223, 0xf224, 0xf225, 0xf226, - 0xf227, 0xf228, 0xf229, 0xf22a, 0xf22b, 0xf22c, 0xf22d, 0xf22e, - 0xf22f, 0xf230, 0xf231, 0xf232, 0xf233, 0xf234, 0xf235, 0xf236, - 0xf237, 0xf238, 0xf239, 0xf23a, 0xf23b, 0xf23c, 0xf23d, 0xf23e, - 0xf23f, 0xf240, 0xf241, 0xf242, 0xf243, 0xf244, 0xf245, 0xf246, - 0xf247, 0xf248, 0xf249, 0xf24a, 0xf24b, 0xf24c, 0xf24d, 0xf24e, - 0xf24f, 0xf250, 0xf251, 0xf252, 0xf253, 0xf254, 0xf255, 0xf256, - 0xf257, 0xf258, 0xf259, 0xf25a, 0xf25b, 0xf25c, 0xf25d, 0xf25e, - 0xf25f, 0xf260, 0xf261, 0xf262, 0xf263, 0xf264, 0xf265, 0x003f, - /* lead byte 87 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf266, 0xf267, 0xf268, 0xf269, 0xf26a, 0xf26b, 0xf26c, 0xf26d, - 0xf26e, 0xf26f, 0xf270, 0xf271, 0xf272, 0xf273, 0xf274, 0xf275, - 0xf276, 0xf277, 0xf278, 0xf279, 0xf27a, 0xf27b, 0xf27c, 0xf27d, - 0xf27e, 0xf27f, 0xf280, 0xf281, 0xf282, 0xf283, 0xf284, 0xf285, - 0xf286, 0xf287, 0xf288, 0xf289, 0xf28a, 0xf28b, 0xf28c, 0xf28d, - 0xf28e, 0xf28f, 0xf290, 0xf291, 0xf292, 0xf293, 0xf294, 0xf295, - 0xf296, 0xf297, 0xf298, 0xf299, 0xf29a, 0xf29b, 0xf29c, 0xf29d, - 0xf29e, 0xf29f, 0xf2a0, 0xf2a1, 0xf2a2, 0xf2a3, 0xf2a4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf2a5, 0xf2a6, 0xf2a7, 0xf2a8, 0xf2a9, 0xf2aa, 0xf2ab, - 0xf2ac, 0xf2ad, 0xf2ae, 0xf2af, 0xf2b0, 0xf2b1, 0xf2b2, 0xf2b3, - 0xf2b4, 0xf2b5, 0xf2b6, 0xf2b7, 0xf2b8, 0xf2b9, 0xf2ba, 0xf2bb, - 0xf2bc, 0xf2bd, 0xf2be, 0xf2bf, 0xf2c0, 0xf2c1, 0xf2c2, 0xf2c3, - 0xf2c4, 0xf2c5, 0xf2c6, 0xf2c7, 0xf2c8, 0xf2c9, 0xf2ca, 0xf2cb, - 0xf2cc, 0xf2cd, 0xf2ce, 0xf2cf, 0xf2d0, 0xf2d1, 0xf2d2, 0xf2d3, - 0xf2d4, 0xf2d5, 0xf2d6, 0xf2d7, 0xf2d8, 0xf2d9, 0xf2da, 0xf2db, - 0xf2dc, 0xf2dd, 0xf2de, 0xf2df, 0xf2e0, 0xf2e1, 0xf2e2, 0xf2e3, - 0xf2e4, 0xf2e5, 0xf2e6, 0xf2e7, 0xf2e8, 0xf2e9, 0xf2ea, 0xf2eb, - 0xf2ec, 0xf2ed, 0xf2ee, 0xf2ef, 0xf2f0, 0xf2f1, 0xf2f2, 0xf2f3, - 0xf2f4, 0xf2f5, 0xf2f6, 0xf2f7, 0xf2f8, 0xf2f9, 0xf2fa, 0xf2fb, - 0xf2fc, 0xf2fd, 0xf2fe, 0xf2ff, 0xf300, 0xf301, 0xf302, 0x003f, - /* lead byte 88 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf303, 0xf304, 0xf305, 0xf306, 0xf307, 0xf308, 0xf309, 0xf30a, - 0xf30b, 0xf30c, 0xf30d, 0xf30e, 0xf30f, 0xf310, 0xf311, 0xf312, - 0xf313, 0xf314, 0xf315, 0xf316, 0xf317, 0xf318, 0xf319, 0xf31a, - 0xf31b, 0xf31c, 0xf31d, 0xf31e, 0xf31f, 0xf320, 0xf321, 0xf322, - 0xf323, 0xf324, 0xf325, 0xf326, 0xf327, 0xf328, 0xf329, 0xf32a, - 0xf32b, 0xf32c, 0xf32d, 0xf32e, 0xf32f, 0xf330, 0xf331, 0xf332, - 0xf333, 0xf334, 0xf335, 0xf336, 0xf337, 0xf338, 0xf339, 0xf33a, - 0xf33b, 0xf33c, 0xf33d, 0xf33e, 0xf33f, 0xf340, 0xf341, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf342, 0xf343, 0xf344, 0xf345, 0xf346, 0xf347, 0xf348, - 0xf349, 0xf34a, 0xf34b, 0xf34c, 0xf34d, 0xf34e, 0xf34f, 0xf350, - 0xf351, 0xf352, 0xf353, 0xf354, 0xf355, 0xf356, 0xf357, 0xf358, - 0xf359, 0xf35a, 0xf35b, 0xf35c, 0xf35d, 0xf35e, 0xf35f, 0xf360, - 0xf361, 0xf362, 0xf363, 0xf364, 0xf365, 0xf366, 0xf367, 0xf368, - 0xf369, 0xf36a, 0xf36b, 0xf36c, 0xf36d, 0xf36e, 0xf36f, 0xf370, - 0xf371, 0xf372, 0xf373, 0xf374, 0xf375, 0xf376, 0xf377, 0xf378, - 0xf379, 0xf37a, 0xf37b, 0xf37c, 0xf37d, 0xf37e, 0xf37f, 0xf380, - 0xf381, 0xf382, 0xf383, 0xf384, 0xf385, 0xf386, 0xf387, 0xf388, - 0xf389, 0xf38a, 0xf38b, 0xf38c, 0xf38d, 0xf38e, 0xf38f, 0xf390, - 0xf391, 0xf392, 0xf393, 0xf394, 0xf395, 0xf396, 0xf397, 0xf398, - 0xf399, 0xf39a, 0xf39b, 0xf39c, 0xf39d, 0xf39e, 0xf39f, 0x003f, - /* lead byte 89 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf3a0, 0xf3a1, 0xf3a2, 0xf3a3, 0xf3a4, 0xf3a5, 0xf3a6, 0xf3a7, - 0xf3a8, 0xf3a9, 0xf3aa, 0xf3ab, 0xf3ac, 0xf3ad, 0xf3ae, 0xf3af, - 0xf3b0, 0xf3b1, 0xf3b2, 0xf3b3, 0xf3b4, 0xf3b5, 0xf3b6, 0xf3b7, - 0xf3b8, 0xf3b9, 0xf3ba, 0xf3bb, 0xf3bc, 0xf3bd, 0xf3be, 0xf3bf, - 0xf3c0, 0xf3c1, 0xf3c2, 0xf3c3, 0xf3c4, 0xf3c5, 0xf3c6, 0xf3c7, - 0xf3c8, 0xf3c9, 0xf3ca, 0xf3cb, 0xf3cc, 0xf3cd, 0xf3ce, 0xf3cf, - 0xf3d0, 0xf3d1, 0xf3d2, 0xf3d3, 0xf3d4, 0xf3d5, 0xf3d6, 0xf3d7, - 0xf3d8, 0xf3d9, 0xf3da, 0xf3db, 0xf3dc, 0xf3dd, 0xf3de, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf3df, 0xf3e0, 0xf3e1, 0xf3e2, 0xf3e3, 0xf3e4, 0xf3e5, - 0xf3e6, 0xf3e7, 0xf3e8, 0xf3e9, 0xf3ea, 0xf3eb, 0xf3ec, 0xf3ed, - 0xf3ee, 0xf3ef, 0xf3f0, 0xf3f1, 0xf3f2, 0xf3f3, 0xf3f4, 0xf3f5, - 0xf3f6, 0xf3f7, 0xf3f8, 0xf3f9, 0xf3fa, 0xf3fb, 0xf3fc, 0xf3fd, - 0xf3fe, 0xf3ff, 0xf400, 0xf401, 0xf402, 0xf403, 0xf404, 0xf405, - 0xf406, 0xf407, 0xf408, 0xf409, 0xf40a, 0xf40b, 0xf40c, 0xf40d, - 0xf40e, 0xf40f, 0xf410, 0xf411, 0xf412, 0xf413, 0xf414, 0xf415, - 0xf416, 0xf417, 0xf418, 0xf419, 0xf41a, 0xf41b, 0xf41c, 0xf41d, - 0xf41e, 0xf41f, 0xf420, 0xf421, 0xf422, 0xf423, 0xf424, 0xf425, - 0xf426, 0xf427, 0xf428, 0xf429, 0xf42a, 0xf42b, 0xf42c, 0xf42d, - 0xf42e, 0xf42f, 0xf430, 0xf431, 0xf432, 0xf433, 0xf434, 0xf435, - 0xf436, 0xf437, 0xf438, 0xf439, 0xf43a, 0xf43b, 0xf43c, 0x003f, - /* lead byte 8a */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf43d, 0xf43e, 0xf43f, 0xf440, 0xf441, 0xf442, 0xf443, 0xf444, - 0xf445, 0xf446, 0xf447, 0xf448, 0xf449, 0xf44a, 0xf44b, 0xf44c, - 0xf44d, 0xf44e, 0xf44f, 0xf450, 0xf451, 0xf452, 0xf453, 0xf454, - 0xf455, 0xf456, 0xf457, 0xf458, 0xf459, 0xf45a, 0xf45b, 0xf45c, - 0xf45d, 0xf45e, 0xf45f, 0xf460, 0xf461, 0xf462, 0xf463, 0xf464, - 0xf465, 0xf466, 0xf467, 0xf468, 0xf469, 0xf46a, 0xf46b, 0xf46c, - 0xf46d, 0xf46e, 0xf46f, 0xf470, 0xf471, 0xf472, 0xf473, 0xf474, - 0xf475, 0xf476, 0xf477, 0xf478, 0xf479, 0xf47a, 0xf47b, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf47c, 0xf47d, 0xf47e, 0xf47f, 0xf480, 0xf481, 0xf482, - 0xf483, 0xf484, 0xf485, 0xf486, 0xf487, 0xf488, 0xf489, 0xf48a, - 0xf48b, 0xf48c, 0xf48d, 0xf48e, 0xf48f, 0xf490, 0xf491, 0xf492, - 0xf493, 0xf494, 0xf495, 0xf496, 0xf497, 0xf498, 0xf499, 0xf49a, - 0xf49b, 0xf49c, 0xf49d, 0xf49e, 0xf49f, 0xf4a0, 0xf4a1, 0xf4a2, - 0xf4a3, 0xf4a4, 0xf4a5, 0xf4a6, 0xf4a7, 0xf4a8, 0xf4a9, 0xf4aa, - 0xf4ab, 0xf4ac, 0xf4ad, 0xf4ae, 0xf4af, 0xf4b0, 0xf4b1, 0xf4b2, - 0xf4b3, 0xf4b4, 0xf4b5, 0xf4b6, 0xf4b7, 0xf4b8, 0xf4b9, 0xf4ba, - 0xf4bb, 0xf4bc, 0xf4bd, 0xf4be, 0xf4bf, 0xf4c0, 0xf4c1, 0xf4c2, - 0xf4c3, 0xf4c4, 0xf4c5, 0xf4c6, 0xf4c7, 0xf4c8, 0xf4c9, 0xf4ca, - 0xf4cb, 0xf4cc, 0xf4cd, 0xf4ce, 0xf4cf, 0xf4d0, 0xf4d1, 0xf4d2, - 0xf4d3, 0xf4d4, 0xf4d5, 0xf4d6, 0xf4d7, 0xf4d8, 0xf4d9, 0x003f, - /* lead byte 8b */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf4da, 0xf4db, 0xf4dc, 0xf4dd, 0xf4de, 0xf4df, 0xf4e0, 0xf4e1, - 0xf4e2, 0xf4e3, 0xf4e4, 0xf4e5, 0xf4e6, 0xf4e7, 0xf4e8, 0xf4e9, - 0xf4ea, 0xf4eb, 0xf4ec, 0xf4ed, 0xf4ee, 0xf4ef, 0xf4f0, 0xf4f1, - 0xf4f2, 0xf4f3, 0xf4f4, 0xf4f5, 0xf4f6, 0xf4f7, 0xf4f8, 0xf4f9, - 0xf4fa, 0xf4fb, 0xf4fc, 0xf4fd, 0xf4fe, 0xf4ff, 0xf500, 0xf501, - 0xf502, 0xf503, 0xf504, 0xf505, 0xf506, 0xf507, 0xf508, 0xf509, - 0xf50a, 0xf50b, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510, 0xf511, - 0xf512, 0xf513, 0xf514, 0xf515, 0xf516, 0xf517, 0xf518, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf519, 0xf51a, 0xf51b, 0xf51c, 0xf51d, 0xf51e, 0xf51f, - 0xf520, 0xf521, 0xf522, 0xf523, 0xf524, 0xf525, 0xf526, 0xf527, - 0xf528, 0xf529, 0xf52a, 0xf52b, 0xf52c, 0xf52d, 0xf52e, 0xf52f, - 0xf530, 0xf531, 0xf532, 0xf533, 0xf534, 0xf535, 0xf536, 0xf537, - 0xf538, 0xf539, 0xf53a, 0xf53b, 0xf53c, 0xf53d, 0xf53e, 0xf53f, - 0xf540, 0xf541, 0xf542, 0xf543, 0xf544, 0xf545, 0xf546, 0xf547, - 0xf548, 0xf549, 0xf54a, 0xf54b, 0xf54c, 0xf54d, 0xf54e, 0xf54f, - 0xf550, 0xf551, 0xf552, 0xf553, 0xf554, 0xf555, 0xf556, 0xf557, - 0xf558, 0xf559, 0xf55a, 0xf55b, 0xf55c, 0xf55d, 0xf55e, 0xf55f, - 0xf560, 0xf561, 0xf562, 0xf563, 0xf564, 0xf565, 0xf566, 0xf567, - 0xf568, 0xf569, 0xf56a, 0xf56b, 0xf56c, 0xf56d, 0xf56e, 0xf56f, - 0xf570, 0xf571, 0xf572, 0xf573, 0xf574, 0xf575, 0xf576, 0x003f, - /* lead byte 8c */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf577, 0xf578, 0xf579, 0xf57a, 0xf57b, 0xf57c, 0xf57d, 0xf57e, - 0xf57f, 0xf580, 0xf581, 0xf582, 0xf583, 0xf584, 0xf585, 0xf586, - 0xf587, 0xf588, 0xf589, 0xf58a, 0xf58b, 0xf58c, 0xf58d, 0xf58e, - 0xf58f, 0xf590, 0xf591, 0xf592, 0xf593, 0xf594, 0xf595, 0xf596, - 0xf597, 0xf598, 0xf599, 0xf59a, 0xf59b, 0xf59c, 0xf59d, 0xf59e, - 0xf59f, 0xf5a0, 0xf5a1, 0xf5a2, 0xf5a3, 0xf5a4, 0xf5a5, 0xf5a6, - 0xf5a7, 0xf5a8, 0xf5a9, 0xf5aa, 0xf5ab, 0xf5ac, 0xf5ad, 0xf5ae, - 0xf5af, 0xf5b0, 0xf5b1, 0xf5b2, 0xf5b3, 0xf5b4, 0xf5b5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf5b6, 0xf5b7, 0xf5b8, 0xf5b9, 0xf5ba, 0xf5bb, 0xf5bc, - 0xf5bd, 0xf5be, 0xf5bf, 0xf5c0, 0xf5c1, 0xf5c2, 0xf5c3, 0xf5c4, - 0xf5c5, 0xf5c6, 0xf5c7, 0xf5c8, 0xf5c9, 0xf5ca, 0xf5cb, 0xf5cc, - 0xf5cd, 0xf5ce, 0xf5cf, 0xf5d0, 0xf5d1, 0xf5d2, 0xf5d3, 0xf5d4, - 0xf5d5, 0xf5d6, 0xf5d7, 0xf5d8, 0xf5d9, 0xf5da, 0xf5db, 0xf5dc, - 0xf5dd, 0xf5de, 0xf5df, 0xf5e0, 0xf5e1, 0xf5e2, 0xf5e3, 0xf5e4, - 0xf5e5, 0xf5e6, 0xf5e7, 0xf5e8, 0xf5e9, 0xf5ea, 0xf5eb, 0xf5ec, - 0xf5ed, 0xf5ee, 0xf5ef, 0xf5f0, 0xf5f1, 0xf5f2, 0xf5f3, 0xf5f4, - 0xf5f5, 0xf5f6, 0xf5f7, 0xf5f8, 0xf5f9, 0xf5fa, 0xf5fb, 0xf5fc, - 0xf5fd, 0xf5fe, 0xf5ff, 0xf600, 0xf601, 0xf602, 0xf603, 0xf604, - 0xf605, 0xf606, 0xf607, 0xf608, 0xf609, 0xf60a, 0xf60b, 0xf60c, - 0xf60d, 0xf60e, 0xf60f, 0xf610, 0xf611, 0xf612, 0xf613, 0x003f, - /* lead byte 8d */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf614, 0xf615, 0xf616, 0xf617, 0xf618, 0xf619, 0xf61a, 0xf61b, - 0xf61c, 0xf61d, 0xf61e, 0xf61f, 0xf620, 0xf621, 0xf622, 0xf623, - 0xf624, 0xf625, 0xf626, 0xf627, 0xf628, 0xf629, 0xf62a, 0xf62b, - 0xf62c, 0xf62d, 0xf62e, 0xf62f, 0xf630, 0xf631, 0xf632, 0xf633, - 0xf634, 0xf635, 0xf636, 0xf637, 0xf638, 0xf639, 0xf63a, 0xf63b, - 0xf63c, 0xf63d, 0xf63e, 0xf63f, 0xf640, 0xf641, 0xf642, 0xf643, - 0xf644, 0xf645, 0xf646, 0xf647, 0xf648, 0xf649, 0xf64a, 0xf64b, - 0xf64c, 0xf64d, 0xf64e, 0xf64f, 0xf650, 0xf651, 0xf652, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf653, 0xf654, 0xf655, 0xf656, 0xf657, 0xf658, 0xf659, - 0xf65a, 0xf65b, 0xf65c, 0xf65d, 0xf65e, 0xf65f, 0xf660, 0xf661, - 0xf662, 0xf663, 0xf664, 0xf665, 0xf666, 0xf667, 0xf668, 0xf669, - 0xf66a, 0xf66b, 0xf66c, 0xf66d, 0xf66e, 0xf66f, 0xf670, 0xf671, - 0xf672, 0xf673, 0xf674, 0xf675, 0xf676, 0xf677, 0xf678, 0xf679, - 0xf67a, 0xf67b, 0xf67c, 0xf67d, 0xf67e, 0xf67f, 0xf680, 0xf681, - 0xf682, 0xf683, 0xf684, 0xf685, 0xf686, 0xf687, 0xf688, 0xf689, - 0xf68a, 0xf68b, 0xf68c, 0xf68d, 0xf68e, 0xf68f, 0xf690, 0xf691, - 0xf692, 0xf693, 0xf694, 0xf695, 0xf696, 0xf697, 0xf698, 0xf699, - 0xf69a, 0xf69b, 0xf69c, 0xf69d, 0xf69e, 0xf69f, 0xf6a0, 0xf6a1, - 0xf6a2, 0xf6a3, 0xf6a4, 0xf6a5, 0xf6a6, 0xf6a7, 0xf6a8, 0xf6a9, - 0xf6aa, 0xf6ab, 0xf6ac, 0xf6ad, 0xf6ae, 0xf6af, 0xf6b0, 0x003f, - /* lead byte 8e */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe311, 0xe312, 0xe313, 0xe314, 0xe315, 0xe316, 0xe317, 0xe318, - 0xe319, 0xe31a, 0xe31b, 0xe31c, 0xe31d, 0xe31e, 0xe31f, 0xe320, - 0xe321, 0xe322, 0xe323, 0xe324, 0xe325, 0xe326, 0xe327, 0xe328, - 0xe329, 0xe32a, 0xe32b, 0xe32c, 0xe32d, 0xe32e, 0xe32f, 0xe330, - 0xe331, 0xe332, 0xe333, 0xe334, 0xe335, 0xe336, 0xe337, 0xe338, - 0xe339, 0xe33a, 0xe33b, 0xe33c, 0xe33d, 0xe33e, 0xe33f, 0xe340, - 0xe341, 0xe342, 0xe343, 0xe344, 0xe345, 0xe346, 0xe347, 0xe348, - 0xe349, 0xe34a, 0xe34b, 0xe34c, 0xe34d, 0xe34e, 0xe34f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe350, 0xe351, 0xe352, 0xe353, 0xe354, 0xe355, 0xe356, - 0xe357, 0xe358, 0xe359, 0xe35a, 0xe35b, 0xe35c, 0xe35d, 0xe35e, - 0xe35f, 0xe360, 0xe361, 0xe362, 0xe363, 0xe364, 0xe365, 0xe366, - 0xe367, 0xe368, 0xe369, 0xe36a, 0xe36b, 0xe36c, 0xe36d, 0xe36e, - 0xe36f, 0xe370, 0xe371, 0xe372, 0xe373, 0xe374, 0xe375, 0xe376, - 0xe377, 0xe378, 0xe379, 0xe37a, 0xe37b, 0xe37c, 0xe37d, 0xe37e, - 0xe37f, 0xe380, 0xe381, 0xe382, 0xe383, 0xe384, 0xe385, 0xe386, - 0xe387, 0xe388, 0xe389, 0xe38a, 0xe38b, 0xe38c, 0xe38d, 0xe38e, - 0xe38f, 0xe390, 0xe391, 0xe392, 0xe393, 0xe394, 0xe395, 0xe396, - 0xe397, 0xe398, 0xe399, 0xe39a, 0xe39b, 0xe39c, 0xe39d, 0xe39e, - 0xe39f, 0xe3a0, 0xe3a1, 0xe3a2, 0xe3a3, 0xe3a4, 0xe3a5, 0xe3a6, - 0xe3a7, 0xe3a8, 0xe3a9, 0xe3aa, 0xe3ab, 0xe3ac, 0xe3ad, 0x003f, - /* lead byte 8f */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe3ae, 0xe3af, 0xe3b0, 0xe3b1, 0xe3b2, 0xe3b3, 0xe3b4, 0xe3b5, - 0xe3b6, 0xe3b7, 0xe3b8, 0xe3b9, 0xe3ba, 0xe3bb, 0xe3bc, 0xe3bd, - 0xe3be, 0xe3bf, 0xe3c0, 0xe3c1, 0xe3c2, 0xe3c3, 0xe3c4, 0xe3c5, - 0xe3c6, 0xe3c7, 0xe3c8, 0xe3c9, 0xe3ca, 0xe3cb, 0xe3cc, 0xe3cd, - 0xe3ce, 0xe3cf, 0xe3d0, 0xe3d1, 0xe3d2, 0xe3d3, 0xe3d4, 0xe3d5, - 0xe3d6, 0xe3d7, 0xe3d8, 0xe3d9, 0xe3da, 0xe3db, 0xe3dc, 0xe3dd, - 0xe3de, 0xe3df, 0xe3e0, 0xe3e1, 0xe3e2, 0xe3e3, 0xe3e4, 0xe3e5, - 0xe3e6, 0xe3e7, 0xe3e8, 0xe3e9, 0xe3ea, 0xe3eb, 0xe3ec, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe3ed, 0xe3ee, 0xe3ef, 0xe3f0, 0xe3f1, 0xe3f2, 0xe3f3, - 0xe3f4, 0xe3f5, 0xe3f6, 0xe3f7, 0xe3f8, 0xe3f9, 0xe3fa, 0xe3fb, - 0xe3fc, 0xe3fd, 0xe3fe, 0xe3ff, 0xe400, 0xe401, 0xe402, 0xe403, - 0xe404, 0xe405, 0xe406, 0xe407, 0xe408, 0xe409, 0xe40a, 0xe40b, - 0xe40c, 0xe40d, 0xe40e, 0xe40f, 0xe410, 0xe411, 0xe412, 0xe413, - 0xe414, 0xe415, 0xe416, 0xe417, 0xe418, 0xe419, 0xe41a, 0xe41b, - 0xe41c, 0xe41d, 0xe41e, 0xe41f, 0xe420, 0xe421, 0xe422, 0xe423, - 0xe424, 0xe425, 0xe426, 0xe427, 0xe428, 0xe429, 0xe42a, 0xe42b, - 0xe42c, 0xe42d, 0xe42e, 0xe42f, 0xe430, 0xe431, 0xe432, 0xe433, - 0xe434, 0xe435, 0xe436, 0xe437, 0xe438, 0xe439, 0xe43a, 0xe43b, - 0xe43c, 0xe43d, 0xe43e, 0xe43f, 0xe440, 0xe441, 0xe442, 0xe443, - 0xe444, 0xe445, 0xe446, 0xe447, 0xe448, 0xe449, 0xe44a, 0x003f, - /* lead byte 90 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe44b, 0xe44c, 0xe44d, 0xe44e, 0xe44f, 0xe450, 0xe451, 0xe452, - 0xe453, 0xe454, 0xe455, 0xe456, 0xe457, 0xe458, 0xe459, 0xe45a, - 0xe45b, 0xe45c, 0xe45d, 0xe45e, 0xe45f, 0xe460, 0xe461, 0xe462, - 0xe463, 0xe464, 0xe465, 0xe466, 0xe467, 0xe468, 0xe469, 0xe46a, - 0xe46b, 0xe46c, 0xe46d, 0xe46e, 0xe46f, 0xe470, 0xe471, 0xe472, - 0xe473, 0xe474, 0xe475, 0xe476, 0xe477, 0xe478, 0xe479, 0xe47a, - 0xe47b, 0xe47c, 0xe47d, 0xe47e, 0xe47f, 0xe480, 0xe481, 0xe482, - 0xe483, 0xe484, 0xe485, 0xe486, 0xe487, 0xe488, 0xe489, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe48a, 0xe48b, 0xe48c, 0xe48d, 0xe48e, 0xe48f, 0xe490, - 0xe491, 0xe492, 0xe493, 0xe494, 0xe495, 0xe496, 0xe497, 0xe498, - 0xe499, 0xe49a, 0xe49b, 0xe49c, 0xe49d, 0xe49e, 0xe49f, 0xe4a0, - 0xe4a1, 0xe4a2, 0xe4a3, 0xe4a4, 0xe4a5, 0xe4a6, 0xe4a7, 0xe4a8, - 0xe4a9, 0xe4aa, 0xe4ab, 0xe4ac, 0xe4ad, 0xe4ae, 0xe4af, 0xe4b0, - 0xe4b1, 0xe4b2, 0xe4b3, 0xe4b4, 0xe4b5, 0xe4b6, 0xe4b7, 0xe4b8, - 0xe4b9, 0xe4ba, 0xe4bb, 0xe4bc, 0xe4bd, 0xe4be, 0xe4bf, 0xe4c0, - 0xe4c1, 0xe4c2, 0xe4c3, 0xe4c4, 0xe4c5, 0xe4c6, 0xe4c7, 0xe4c8, - 0xe4c9, 0xe4ca, 0xe4cb, 0xe4cc, 0xe4cd, 0xe4ce, 0xe4cf, 0xe4d0, - 0xe4d1, 0xe4d2, 0xe4d3, 0xe4d4, 0xe4d5, 0xe4d6, 0xe4d7, 0xe4d8, - 0xe4d9, 0xe4da, 0xe4db, 0xe4dc, 0xe4dd, 0xe4de, 0xe4df, 0xe4e0, - 0xe4e1, 0xe4e2, 0xe4e3, 0xe4e4, 0xe4e5, 0xe4e6, 0xe4e7, 0x003f, - /* lead byte 91 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe4e8, 0xe4e9, 0xe4ea, 0xe4eb, 0xe4ec, 0xe4ed, 0xe4ee, 0xe4ef, - 0xe4f0, 0xe4f1, 0xe4f2, 0xe4f3, 0xe4f4, 0xe4f5, 0xe4f6, 0xe4f7, - 0xe4f8, 0xe4f9, 0xe4fa, 0xe4fb, 0xe4fc, 0xe4fd, 0xe4fe, 0xe4ff, - 0xe500, 0xe501, 0xe502, 0xe503, 0xe504, 0xe505, 0xe506, 0xe507, - 0xe508, 0xe509, 0xe50a, 0xe50b, 0xe50c, 0xe50d, 0xe50e, 0xe50f, - 0xe510, 0xe511, 0xe512, 0xe513, 0xe514, 0xe515, 0xe516, 0xe517, - 0xe518, 0xe519, 0xe51a, 0xe51b, 0xe51c, 0xe51d, 0xe51e, 0xe51f, - 0xe520, 0xe521, 0xe522, 0xe523, 0xe524, 0xe525, 0xe526, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe527, 0xe528, 0xe529, 0xe52a, 0xe52b, 0xe52c, 0xe52d, - 0xe52e, 0xe52f, 0xe530, 0xe531, 0xe532, 0xe533, 0xe534, 0xe535, - 0xe536, 0xe537, 0xe538, 0xe539, 0xe53a, 0xe53b, 0xe53c, 0xe53d, - 0xe53e, 0xe53f, 0xe540, 0xe541, 0xe542, 0xe543, 0xe544, 0xe545, - 0xe546, 0xe547, 0xe548, 0xe549, 0xe54a, 0xe54b, 0xe54c, 0xe54d, - 0xe54e, 0xe54f, 0xe550, 0xe551, 0xe552, 0xe553, 0xe554, 0xe555, - 0xe556, 0xe557, 0xe558, 0xe559, 0xe55a, 0xe55b, 0xe55c, 0xe55d, - 0xe55e, 0xe55f, 0xe560, 0xe561, 0xe562, 0xe563, 0xe564, 0xe565, - 0xe566, 0xe567, 0xe568, 0xe569, 0xe56a, 0xe56b, 0xe56c, 0xe56d, - 0xe56e, 0xe56f, 0xe570, 0xe571, 0xe572, 0xe573, 0xe574, 0xe575, - 0xe576, 0xe577, 0xe578, 0xe579, 0xe57a, 0xe57b, 0xe57c, 0xe57d, - 0xe57e, 0xe57f, 0xe580, 0xe581, 0xe582, 0xe583, 0xe584, 0x003f, - /* lead byte 92 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe585, 0xe586, 0xe587, 0xe588, 0xe589, 0xe58a, 0xe58b, 0xe58c, - 0xe58d, 0xe58e, 0xe58f, 0xe590, 0xe591, 0xe592, 0xe593, 0xe594, - 0xe595, 0xe596, 0xe597, 0xe598, 0xe599, 0xe59a, 0xe59b, 0xe59c, - 0xe59d, 0xe59e, 0xe59f, 0xe5a0, 0xe5a1, 0xe5a2, 0xe5a3, 0xe5a4, - 0xe5a5, 0xe5a6, 0xe5a7, 0xe5a8, 0xe5a9, 0xe5aa, 0xe5ab, 0xe5ac, - 0xe5ad, 0xe5ae, 0xe5af, 0xe5b0, 0xe5b1, 0xe5b2, 0xe5b3, 0xe5b4, - 0xe5b5, 0xe5b6, 0xe5b7, 0xe5b8, 0xe5b9, 0xe5ba, 0xe5bb, 0xe5bc, - 0xe5bd, 0xe5be, 0xe5bf, 0xe5c0, 0xe5c1, 0xe5c2, 0xe5c3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe5c4, 0xe5c5, 0xe5c6, 0xe5c7, 0xe5c8, 0xe5c9, 0xe5ca, - 0xe5cb, 0xe5cc, 0xe5cd, 0xe5ce, 0xe5cf, 0xe5d0, 0xe5d1, 0xe5d2, - 0xe5d3, 0xe5d4, 0xe5d5, 0xe5d6, 0xe5d7, 0xe5d8, 0xe5d9, 0xe5da, - 0xe5db, 0xe5dc, 0xe5dd, 0xe5de, 0xe5df, 0xe5e0, 0xe5e1, 0xe5e2, - 0xe5e3, 0xe5e4, 0xe5e5, 0xe5e6, 0xe5e7, 0xe5e8, 0xe5e9, 0xe5ea, - 0xe5eb, 0xe5ec, 0xe5ed, 0xe5ee, 0xe5ef, 0xe5f0, 0xe5f1, 0xe5f2, - 0xe5f3, 0xe5f4, 0xe5f5, 0xe5f6, 0xe5f7, 0xe5f8, 0xe5f9, 0xe5fa, - 0xe5fb, 0xe5fc, 0xe5fd, 0xe5fe, 0xe5ff, 0xe600, 0xe601, 0xe602, - 0xe603, 0xe604, 0xe605, 0xe606, 0xe607, 0xe608, 0xe609, 0xe60a, - 0xe60b, 0xe60c, 0xe60d, 0xe60e, 0xe60f, 0xe610, 0xe611, 0xe612, - 0xe613, 0xe614, 0xe615, 0xe616, 0xe617, 0xe618, 0xe619, 0xe61a, - 0xe61b, 0xe61c, 0xe61d, 0xe61e, 0xe61f, 0xe620, 0xe621, 0x003f, - /* lead byte 93 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe622, 0xe623, 0xe624, 0xe625, 0xe626, 0xe627, 0xe628, 0xe629, - 0xe62a, 0xe62b, 0xe62c, 0xe62d, 0xe62e, 0xe62f, 0xe630, 0xe631, - 0xe632, 0xe633, 0xe634, 0xe635, 0xe636, 0xe637, 0xe638, 0xe639, - 0xe63a, 0xe63b, 0xe63c, 0xe63d, 0xe63e, 0xe63f, 0xe640, 0xe641, - 0xe642, 0xe643, 0xe644, 0xe645, 0xe646, 0xe647, 0xe648, 0xe649, - 0xe64a, 0xe64b, 0xe64c, 0xe64d, 0xe64e, 0xe64f, 0xe650, 0xe651, - 0xe652, 0xe653, 0xe654, 0xe655, 0xe656, 0xe657, 0xe658, 0xe659, - 0xe65a, 0xe65b, 0xe65c, 0xe65d, 0xe65e, 0xe65f, 0xe660, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe661, 0xe662, 0xe663, 0xe664, 0xe665, 0xe666, 0xe667, - 0xe668, 0xe669, 0xe66a, 0xe66b, 0xe66c, 0xe66d, 0xe66e, 0xe66f, - 0xe670, 0xe671, 0xe672, 0xe673, 0xe674, 0xe675, 0xe676, 0xe677, - 0xe678, 0xe679, 0xe67a, 0xe67b, 0xe67c, 0xe67d, 0xe67e, 0xe67f, - 0xe680, 0xe681, 0xe682, 0xe683, 0xe684, 0xe685, 0xe686, 0xe687, - 0xe688, 0xe689, 0xe68a, 0xe68b, 0xe68c, 0xe68d, 0xe68e, 0xe68f, - 0xe690, 0xe691, 0xe692, 0xe693, 0xe694, 0xe695, 0xe696, 0xe697, - 0xe698, 0xe699, 0xe69a, 0xe69b, 0xe69c, 0xe69d, 0xe69e, 0xe69f, - 0xe6a0, 0xe6a1, 0xe6a2, 0xe6a3, 0xe6a4, 0xe6a5, 0xe6a6, 0xe6a7, - 0xe6a8, 0xe6a9, 0xe6aa, 0xe6ab, 0xe6ac, 0xe6ad, 0xe6ae, 0xe6af, - 0xe6b0, 0xe6b1, 0xe6b2, 0xe6b3, 0xe6b4, 0xe6b5, 0xe6b6, 0xe6b7, - 0xe6b8, 0xe6b9, 0xe6ba, 0xe6bb, 0xe6bc, 0xe6bd, 0xe6be, 0x003f, - /* lead byte 94 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe6bf, 0xe6c0, 0xe6c1, 0xe6c2, 0xe6c3, 0xe6c4, 0xe6c5, 0xe6c6, - 0xe6c7, 0xe6c8, 0xe6c9, 0xe6ca, 0xe6cb, 0xe6cc, 0xe6cd, 0xe6ce, - 0xe6cf, 0xe6d0, 0xe6d1, 0xe6d2, 0xe6d3, 0xe6d4, 0xe6d5, 0xe6d6, - 0xe6d7, 0xe6d8, 0xe6d9, 0xe6da, 0xe6db, 0xe6dc, 0xe6dd, 0xe6de, - 0xe6df, 0xe6e0, 0xe6e1, 0xe6e2, 0xe6e3, 0xe6e4, 0xe6e5, 0xe6e6, - 0xe6e7, 0xe6e8, 0xe6e9, 0xe6ea, 0xe6eb, 0xe6ec, 0xe6ed, 0xe6ee, - 0xe6ef, 0xe6f0, 0xe6f1, 0xe6f2, 0xe6f3, 0xe6f4, 0xe6f5, 0xe6f6, - 0xe6f7, 0xe6f8, 0xe6f9, 0xe6fa, 0xe6fb, 0xe6fc, 0xe6fd, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe6fe, 0xe6ff, 0xe700, 0xe701, 0xe702, 0xe703, 0xe704, - 0xe705, 0xe706, 0xe707, 0xe708, 0xe709, 0xe70a, 0xe70b, 0xe70c, - 0xe70d, 0xe70e, 0xe70f, 0xe710, 0xe711, 0xe712, 0xe713, 0xe714, - 0xe715, 0xe716, 0xe717, 0xe718, 0xe719, 0xe71a, 0xe71b, 0xe71c, - 0xe71d, 0xe71e, 0xe71f, 0xe720, 0xe721, 0xe722, 0xe723, 0xe724, - 0xe725, 0xe726, 0xe727, 0xe728, 0xe729, 0xe72a, 0xe72b, 0xe72c, - 0xe72d, 0xe72e, 0xe72f, 0xe730, 0xe731, 0xe732, 0xe733, 0xe734, - 0xe735, 0xe736, 0xe737, 0xe738, 0xe739, 0xe73a, 0xe73b, 0xe73c, - 0xe73d, 0xe73e, 0xe73f, 0xe740, 0xe741, 0xe742, 0xe743, 0xe744, - 0xe745, 0xe746, 0xe747, 0xe748, 0xe749, 0xe74a, 0xe74b, 0xe74c, - 0xe74d, 0xe74e, 0xe74f, 0xe750, 0xe751, 0xe752, 0xe753, 0xe754, - 0xe755, 0xe756, 0xe757, 0xe758, 0xe759, 0xe75a, 0xe75b, 0x003f, - /* lead byte 95 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe75c, 0xe75d, 0xe75e, 0xe75f, 0xe760, 0xe761, 0xe762, 0xe763, - 0xe764, 0xe765, 0xe766, 0xe767, 0xe768, 0xe769, 0xe76a, 0xe76b, - 0xe76c, 0xe76d, 0xe76e, 0xe76f, 0xe770, 0xe771, 0xe772, 0xe773, - 0xe774, 0xe775, 0xe776, 0xe777, 0xe778, 0xe779, 0xe77a, 0xe77b, - 0xe77c, 0xe77d, 0xe77e, 0xe77f, 0xe780, 0xe781, 0xe782, 0xe783, - 0xe784, 0xe785, 0xe786, 0xe787, 0xe788, 0xe789, 0xe78a, 0xe78b, - 0xe78c, 0xe78d, 0xe78e, 0xe78f, 0xe790, 0xe791, 0xe792, 0xe793, - 0xe794, 0xe795, 0xe796, 0xe797, 0xe798, 0xe799, 0xe79a, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe79b, 0xe79c, 0xe79d, 0xe79e, 0xe79f, 0xe7a0, 0xe7a1, - 0xe7a2, 0xe7a3, 0xe7a4, 0xe7a5, 0xe7a6, 0xe7a7, 0xe7a8, 0xe7a9, - 0xe7aa, 0xe7ab, 0xe7ac, 0xe7ad, 0xe7ae, 0xe7af, 0xe7b0, 0xe7b1, - 0xe7b2, 0xe7b3, 0xe7b4, 0xe7b5, 0xe7b6, 0xe7b7, 0xe7b8, 0xe7b9, - 0xe7ba, 0xe7bb, 0xe7bc, 0xe7bd, 0xe7be, 0xe7bf, 0xe7c0, 0xe7c1, - 0xe7c2, 0xe7c3, 0xe7c4, 0xe7c5, 0xe7c6, 0xe7c7, 0xe7c8, 0xe7c9, - 0xe7ca, 0xe7cb, 0xe7cc, 0xe7cd, 0xe7ce, 0xe7cf, 0xe7d0, 0xe7d1, - 0xe7d2, 0xe7d3, 0xe7d4, 0xe7d5, 0xe7d6, 0xe7d7, 0xe7d8, 0xe7d9, - 0xe7da, 0xe7db, 0xe7dc, 0xe7dd, 0xe7de, 0xe7df, 0xe7e0, 0xe7e1, - 0xe7e2, 0xe7e3, 0xe7e4, 0xe7e5, 0xe7e6, 0xe7e7, 0xe7e8, 0xe7e9, - 0xe7ea, 0xe7eb, 0xe7ec, 0xe7ed, 0xe7ee, 0xe7ef, 0xe7f0, 0xe7f1, - 0xe7f2, 0xe7f3, 0xe7f4, 0xe7f5, 0xe7f6, 0xe7f7, 0xe7f8, 0x003f, - /* lead byte 96 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe7f9, 0xe7fa, 0xe7fb, 0xe7fc, 0xe7fd, 0xe7fe, 0xe7ff, 0xe800, - 0xe801, 0xe802, 0xe803, 0xe804, 0xe805, 0xe806, 0xe807, 0xe808, - 0xe809, 0xe80a, 0xe80b, 0xe80c, 0xe80d, 0xe80e, 0xe80f, 0xe810, - 0xe811, 0xe812, 0xe813, 0xe814, 0xe815, 0xe816, 0xe817, 0xe818, - 0xe819, 0xe81a, 0xe81b, 0xe81c, 0xe81d, 0xe81e, 0xe81f, 0xe820, - 0xe821, 0xe822, 0xe823, 0xe824, 0xe825, 0xe826, 0xe827, 0xe828, - 0xe829, 0xe82a, 0xe82b, 0xe82c, 0xe82d, 0xe82e, 0xe82f, 0xe830, - 0xe831, 0xe832, 0xe833, 0xe834, 0xe835, 0xe836, 0xe837, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe838, 0xe839, 0xe83a, 0xe83b, 0xe83c, 0xe83d, 0xe83e, - 0xe83f, 0xe840, 0xe841, 0xe842, 0xe843, 0xe844, 0xe845, 0xe846, - 0xe847, 0xe848, 0xe849, 0xe84a, 0xe84b, 0xe84c, 0xe84d, 0xe84e, - 0xe84f, 0xe850, 0xe851, 0xe852, 0xe853, 0xe854, 0xe855, 0xe856, - 0xe857, 0xe858, 0xe859, 0xe85a, 0xe85b, 0xe85c, 0xe85d, 0xe85e, - 0xe85f, 0xe860, 0xe861, 0xe862, 0xe863, 0xe864, 0xe865, 0xe866, - 0xe867, 0xe868, 0xe869, 0xe86a, 0xe86b, 0xe86c, 0xe86d, 0xe86e, - 0xe86f, 0xe870, 0xe871, 0xe872, 0xe873, 0xe874, 0xe875, 0xe876, - 0xe877, 0xe878, 0xe879, 0xe87a, 0xe87b, 0xe87c, 0xe87d, 0xe87e, - 0xe87f, 0xe880, 0xe881, 0xe882, 0xe883, 0xe884, 0xe885, 0xe886, - 0xe887, 0xe888, 0xe889, 0xe88a, 0xe88b, 0xe88c, 0xe88d, 0xe88e, - 0xe88f, 0xe890, 0xe891, 0xe892, 0xe893, 0xe894, 0xe895, 0x003f, - /* lead byte 97 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe896, 0xe897, 0xe898, 0xe899, 0xe89a, 0xe89b, 0xe89c, 0xe89d, - 0xe89e, 0xe89f, 0xe8a0, 0xe8a1, 0xe8a2, 0xe8a3, 0xe8a4, 0xe8a5, - 0xe8a6, 0xe8a7, 0xe8a8, 0xe8a9, 0xe8aa, 0xe8ab, 0xe8ac, 0xe8ad, - 0xe8ae, 0xe8af, 0xe8b0, 0xe8b1, 0xe8b2, 0xe8b3, 0xe8b4, 0xe8b5, - 0xe8b6, 0xe8b7, 0xe8b8, 0xe8b9, 0xe8ba, 0xe8bb, 0xe8bc, 0xe8bd, - 0xe8be, 0xe8bf, 0xe8c0, 0xe8c1, 0xe8c2, 0xe8c3, 0xe8c4, 0xe8c5, - 0xe8c6, 0xe8c7, 0xe8c8, 0xe8c9, 0xe8ca, 0xe8cb, 0xe8cc, 0xe8cd, - 0xe8ce, 0xe8cf, 0xe8d0, 0xe8d1, 0xe8d2, 0xe8d3, 0xe8d4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe8d5, 0xe8d6, 0xe8d7, 0xe8d8, 0xe8d9, 0xe8da, 0xe8db, - 0xe8dc, 0xe8dd, 0xe8de, 0xe8df, 0xe8e0, 0xe8e1, 0xe8e2, 0xe8e3, - 0xe8e4, 0xe8e5, 0xe8e6, 0xe8e7, 0xe8e8, 0xe8e9, 0xe8ea, 0xe8eb, - 0xe8ec, 0xe8ed, 0xe8ee, 0xe8ef, 0xe8f0, 0xe8f1, 0xe8f2, 0xe8f3, - 0xe8f4, 0xe8f5, 0xe8f6, 0xe8f7, 0xe8f8, 0xe8f9, 0xe8fa, 0xe8fb, - 0xe8fc, 0xe8fd, 0xe8fe, 0xe8ff, 0xe900, 0xe901, 0xe902, 0xe903, - 0xe904, 0xe905, 0xe906, 0xe907, 0xe908, 0xe909, 0xe90a, 0xe90b, - 0xe90c, 0xe90d, 0xe90e, 0xe90f, 0xe910, 0xe911, 0xe912, 0xe913, - 0xe914, 0xe915, 0xe916, 0xe917, 0xe918, 0xe919, 0xe91a, 0xe91b, - 0xe91c, 0xe91d, 0xe91e, 0xe91f, 0xe920, 0xe921, 0xe922, 0xe923, - 0xe924, 0xe925, 0xe926, 0xe927, 0xe928, 0xe929, 0xe92a, 0xe92b, - 0xe92c, 0xe92d, 0xe92e, 0xe92f, 0xe930, 0xe931, 0xe932, 0x003f, - /* lead byte 98 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe933, 0xe934, 0xe935, 0xe936, 0xe937, 0xe938, 0xe939, 0xe93a, - 0xe93b, 0xe93c, 0xe93d, 0xe93e, 0xe93f, 0xe940, 0xe941, 0xe942, - 0xe943, 0xe944, 0xe945, 0xe946, 0xe947, 0xe948, 0xe949, 0xe94a, - 0xe94b, 0xe94c, 0xe94d, 0xe94e, 0xe94f, 0xe950, 0xe951, 0xe952, - 0xe953, 0xe954, 0xe955, 0xe956, 0xe957, 0xe958, 0xe959, 0xe95a, - 0xe95b, 0xe95c, 0xe95d, 0xe95e, 0xe95f, 0xe960, 0xe961, 0xe962, - 0xe963, 0xe964, 0xe965, 0xe966, 0xe967, 0xe968, 0xe969, 0xe96a, - 0xe96b, 0xe96c, 0xe96d, 0xe96e, 0xe96f, 0xe970, 0xe971, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe972, 0xe973, 0xe974, 0xe975, 0xe976, 0xe977, 0xe978, - 0xe979, 0xe97a, 0xe97b, 0xe97c, 0xe97d, 0xe97e, 0xe97f, 0xe980, - 0xe981, 0xe982, 0xe983, 0xe984, 0xe985, 0xe986, 0xe987, 0xe988, - 0xe989, 0xe98a, 0xe98b, 0xe98c, 0xe98d, 0xe98e, 0xe98f, 0xe990, - 0xe991, 0xe992, 0xe993, 0xe994, 0xe995, 0xe996, 0xe997, 0xe998, - 0xe999, 0xe99a, 0xe99b, 0xe99c, 0xe99d, 0xe99e, 0xe99f, 0xe9a0, - 0xe9a1, 0xe9a2, 0xe9a3, 0xe9a4, 0xe9a5, 0xe9a6, 0xe9a7, 0xe9a8, - 0xe9a9, 0xe9aa, 0xe9ab, 0xe9ac, 0xe9ad, 0xe9ae, 0xe9af, 0xe9b0, - 0xe9b1, 0xe9b2, 0xe9b3, 0xe9b4, 0xe9b5, 0xe9b6, 0xe9b7, 0xe9b8, - 0xe9b9, 0xe9ba, 0xe9bb, 0xe9bc, 0xe9bd, 0xe9be, 0xe9bf, 0xe9c0, - 0xe9c1, 0xe9c2, 0xe9c3, 0xe9c4, 0xe9c5, 0xe9c6, 0xe9c7, 0xe9c8, - 0xe9c9, 0xe9ca, 0xe9cb, 0xe9cc, 0xe9cd, 0xe9ce, 0xe9cf, 0x003f, - /* lead byte 99 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe9d0, 0xe9d1, 0xe9d2, 0xe9d3, 0xe9d4, 0xe9d5, 0xe9d6, 0xe9d7, - 0xe9d8, 0xe9d9, 0xe9da, 0xe9db, 0xe9dc, 0xe9dd, 0xe9de, 0xe9df, - 0xe9e0, 0xe9e1, 0xe9e2, 0xe9e3, 0xe9e4, 0xe9e5, 0xe9e6, 0xe9e7, - 0xe9e8, 0xe9e9, 0xe9ea, 0xe9eb, 0xe9ec, 0xe9ed, 0xe9ee, 0xe9ef, - 0xe9f0, 0xe9f1, 0xe9f2, 0xe9f3, 0xe9f4, 0xe9f5, 0xe9f6, 0xe9f7, - 0xe9f8, 0xe9f9, 0xe9fa, 0xe9fb, 0xe9fc, 0xe9fd, 0xe9fe, 0xe9ff, - 0xea00, 0xea01, 0xea02, 0xea03, 0xea04, 0xea05, 0xea06, 0xea07, - 0xea08, 0xea09, 0xea0a, 0xea0b, 0xea0c, 0xea0d, 0xea0e, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xea0f, 0xea10, 0xea11, 0xea12, 0xea13, 0xea14, 0xea15, - 0xea16, 0xea17, 0xea18, 0xea19, 0xea1a, 0xea1b, 0xea1c, 0xea1d, - 0xea1e, 0xea1f, 0xea20, 0xea21, 0xea22, 0xea23, 0xea24, 0xea25, - 0xea26, 0xea27, 0xea28, 0xea29, 0xea2a, 0xea2b, 0xea2c, 0xea2d, - 0xea2e, 0xea2f, 0xea30, 0xea31, 0xea32, 0xea33, 0xea34, 0xea35, - 0xea36, 0xea37, 0xea38, 0xea39, 0xea3a, 0xea3b, 0xea3c, 0xea3d, - 0xea3e, 0xea3f, 0xea40, 0xea41, 0xea42, 0xea43, 0xea44, 0xea45, - 0xea46, 0xea47, 0xea48, 0xea49, 0xea4a, 0xea4b, 0xea4c, 0xea4d, - 0xea4e, 0xea4f, 0xea50, 0xea51, 0xea52, 0xea53, 0xea54, 0xea55, - 0xea56, 0xea57, 0xea58, 0xea59, 0xea5a, 0xea5b, 0xea5c, 0xea5d, - 0xea5e, 0xea5f, 0xea60, 0xea61, 0xea62, 0xea63, 0xea64, 0xea65, - 0xea66, 0xea67, 0xea68, 0xea69, 0xea6a, 0xea6b, 0xea6c, 0x003f, - /* lead byte 9a */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xea6d, 0xea6e, 0xea6f, 0xea70, 0xea71, 0xea72, 0xea73, 0xea74, - 0xea75, 0xea76, 0xea77, 0xea78, 0xea79, 0xea7a, 0xea7b, 0xea7c, - 0xea7d, 0xea7e, 0xea7f, 0xea80, 0xea81, 0xea82, 0xea83, 0xea84, - 0xea85, 0xea86, 0xea87, 0xea88, 0xea89, 0xea8a, 0xea8b, 0xea8c, - 0xea8d, 0xea8e, 0xea8f, 0xea90, 0xea91, 0xea92, 0xea93, 0xea94, - 0xea95, 0xea96, 0xea97, 0xea98, 0xea99, 0xea9a, 0xea9b, 0xea9c, - 0xea9d, 0xea9e, 0xea9f, 0xeaa0, 0xeaa1, 0xeaa2, 0xeaa3, 0xeaa4, - 0xeaa5, 0xeaa6, 0xeaa7, 0xeaa8, 0xeaa9, 0xeaaa, 0xeaab, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeaac, 0xeaad, 0xeaae, 0xeaaf, 0xeab0, 0xeab1, 0xeab2, - 0xeab3, 0xeab4, 0xeab5, 0xeab6, 0xeab7, 0xeab8, 0xeab9, 0xeaba, - 0xeabb, 0xeabc, 0xeabd, 0xeabe, 0xeabf, 0xeac0, 0xeac1, 0xeac2, - 0xeac3, 0xeac4, 0xeac5, 0xeac6, 0xeac7, 0xeac8, 0xeac9, 0xeaca, - 0xeacb, 0xeacc, 0xeacd, 0xeace, 0xeacf, 0xead0, 0xead1, 0xead2, - 0xead3, 0xead4, 0xead5, 0xead6, 0xead7, 0xead8, 0xead9, 0xeada, - 0xeadb, 0xeadc, 0xeadd, 0xeade, 0xeadf, 0xeae0, 0xeae1, 0xeae2, - 0xeae3, 0xeae4, 0xeae5, 0xeae6, 0xeae7, 0xeae8, 0xeae9, 0xeaea, - 0xeaeb, 0xeaec, 0xeaed, 0xeaee, 0xeaef, 0xeaf0, 0xeaf1, 0xeaf2, - 0xeaf3, 0xeaf4, 0xeaf5, 0xeaf6, 0xeaf7, 0xeaf8, 0xeaf9, 0xeafa, - 0xeafb, 0xeafc, 0xeafd, 0xeafe, 0xeaff, 0xeb00, 0xeb01, 0xeb02, - 0xeb03, 0xeb04, 0xeb05, 0xeb06, 0xeb07, 0xeb08, 0xeb09, 0x003f, - /* lead byte 9b */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeb0a, 0xeb0b, 0xeb0c, 0xeb0d, 0xeb0e, 0xeb0f, 0xeb10, 0xeb11, - 0xeb12, 0xeb13, 0xeb14, 0xeb15, 0xeb16, 0xeb17, 0xeb18, 0xeb19, - 0xeb1a, 0xeb1b, 0xeb1c, 0xeb1d, 0xeb1e, 0xeb1f, 0xeb20, 0xeb21, - 0xeb22, 0xeb23, 0xeb24, 0xeb25, 0xeb26, 0xeb27, 0xeb28, 0xeb29, - 0xeb2a, 0xeb2b, 0xeb2c, 0xeb2d, 0xeb2e, 0xeb2f, 0xeb30, 0xeb31, - 0xeb32, 0xeb33, 0xeb34, 0xeb35, 0xeb36, 0xeb37, 0xeb38, 0xeb39, - 0xeb3a, 0xeb3b, 0xeb3c, 0xeb3d, 0xeb3e, 0xeb3f, 0xeb40, 0xeb41, - 0xeb42, 0xeb43, 0xeb44, 0xeb45, 0xeb46, 0xeb47, 0xeb48, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeb49, 0xeb4a, 0xeb4b, 0xeb4c, 0xeb4d, 0xeb4e, 0xeb4f, - 0xeb50, 0xeb51, 0xeb52, 0xeb53, 0xeb54, 0xeb55, 0xeb56, 0xeb57, - 0xeb58, 0xeb59, 0xeb5a, 0xeb5b, 0xeb5c, 0xeb5d, 0xeb5e, 0xeb5f, - 0xeb60, 0xeb61, 0xeb62, 0xeb63, 0xeb64, 0xeb65, 0xeb66, 0xeb67, - 0xeb68, 0xeb69, 0xeb6a, 0xeb6b, 0xeb6c, 0xeb6d, 0xeb6e, 0xeb6f, - 0xeb70, 0xeb71, 0xeb72, 0xeb73, 0xeb74, 0xeb75, 0xeb76, 0xeb77, - 0xeb78, 0xeb79, 0xeb7a, 0xeb7b, 0xeb7c, 0xeb7d, 0xeb7e, 0xeb7f, - 0xeb80, 0xeb81, 0xeb82, 0xeb83, 0xeb84, 0xeb85, 0xeb86, 0xeb87, - 0xeb88, 0xeb89, 0xeb8a, 0xeb8b, 0xeb8c, 0xeb8d, 0xeb8e, 0xeb8f, - 0xeb90, 0xeb91, 0xeb92, 0xeb93, 0xeb94, 0xeb95, 0xeb96, 0xeb97, - 0xeb98, 0xeb99, 0xeb9a, 0xeb9b, 0xeb9c, 0xeb9d, 0xeb9e, 0xeb9f, - 0xeba0, 0xeba1, 0xeba2, 0xeba3, 0xeba4, 0xeba5, 0xeba6, 0x003f, - /* lead byte 9c */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xeba7, 0xeba8, 0xeba9, 0xebaa, 0xebab, 0xebac, 0xebad, 0xebae, - 0xebaf, 0xebb0, 0xebb1, 0xebb2, 0xebb3, 0xebb4, 0xebb5, 0xebb6, - 0xebb7, 0xebb8, 0xebb9, 0xebba, 0xebbb, 0xebbc, 0xebbd, 0xebbe, - 0xebbf, 0xebc0, 0xebc1, 0xebc2, 0xebc3, 0xebc4, 0xebc5, 0xebc6, - 0xebc7, 0xebc8, 0xebc9, 0xebca, 0xebcb, 0xebcc, 0xebcd, 0xebce, - 0xebcf, 0xebd0, 0xebd1, 0xebd2, 0xebd3, 0xebd4, 0xebd5, 0xebd6, - 0xebd7, 0xebd8, 0xebd9, 0xebda, 0xebdb, 0xebdc, 0xebdd, 0xebde, - 0xebdf, 0xebe0, 0xebe1, 0xebe2, 0xebe3, 0xebe4, 0xebe5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xebe6, 0xebe7, 0xebe8, 0xebe9, 0xebea, 0xebeb, 0xebec, - 0xebed, 0xebee, 0xebef, 0xebf0, 0xebf1, 0xebf2, 0xebf3, 0xebf4, - 0xebf5, 0xebf6, 0xebf7, 0xebf8, 0xebf9, 0xebfa, 0xebfb, 0xebfc, - 0xebfd, 0xebfe, 0xebff, 0xec00, 0xec01, 0xec02, 0xec03, 0xec04, - 0xec05, 0xec06, 0xec07, 0xec08, 0xec09, 0xec0a, 0xec0b, 0xec0c, - 0xec0d, 0xec0e, 0xec0f, 0xec10, 0xec11, 0xec12, 0xec13, 0xec14, - 0xec15, 0xec16, 0xec17, 0xec18, 0xec19, 0xec1a, 0xec1b, 0xec1c, - 0xec1d, 0xec1e, 0xec1f, 0xec20, 0xec21, 0xec22, 0xec23, 0xec24, - 0xec25, 0xec26, 0xec27, 0xec28, 0xec29, 0xec2a, 0xec2b, 0xec2c, - 0xec2d, 0xec2e, 0xec2f, 0xec30, 0xec31, 0xec32, 0xec33, 0xec34, - 0xec35, 0xec36, 0xec37, 0xec38, 0xec39, 0xec3a, 0xec3b, 0xec3c, - 0xec3d, 0xec3e, 0xec3f, 0xec40, 0xec41, 0xec42, 0xec43, 0x003f, - /* lead byte 9d */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xec44, 0xec45, 0xec46, 0xec47, 0xec48, 0xec49, 0xec4a, 0xec4b, - 0xec4c, 0xec4d, 0xec4e, 0xec4f, 0xec50, 0xec51, 0xec52, 0xec53, - 0xec54, 0xec55, 0xec56, 0xec57, 0xec58, 0xec59, 0xec5a, 0xec5b, - 0xec5c, 0xec5d, 0xec5e, 0xec5f, 0xec60, 0xec61, 0xec62, 0xec63, - 0xec64, 0xec65, 0xec66, 0xec67, 0xec68, 0xec69, 0xec6a, 0xec6b, - 0xec6c, 0xec6d, 0xec6e, 0xec6f, 0xec70, 0xec71, 0xec72, 0xec73, - 0xec74, 0xec75, 0xec76, 0xec77, 0xec78, 0xec79, 0xec7a, 0xec7b, - 0xec7c, 0xec7d, 0xec7e, 0xec7f, 0xec80, 0xec81, 0xec82, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xec83, 0xec84, 0xec85, 0xec86, 0xec87, 0xec88, 0xec89, - 0xec8a, 0xec8b, 0xec8c, 0xec8d, 0xec8e, 0xec8f, 0xec90, 0xec91, - 0xec92, 0xec93, 0xec94, 0xec95, 0xec96, 0xec97, 0xec98, 0xec99, - 0xec9a, 0xec9b, 0xec9c, 0xec9d, 0xec9e, 0xec9f, 0xeca0, 0xeca1, - 0xeca2, 0xeca3, 0xeca4, 0xeca5, 0xeca6, 0xeca7, 0xeca8, 0xeca9, - 0xecaa, 0xecab, 0xecac, 0xecad, 0xecae, 0xecaf, 0xecb0, 0xecb1, - 0xecb2, 0xecb3, 0xecb4, 0xecb5, 0xecb6, 0xecb7, 0xecb8, 0xecb9, - 0xecba, 0xecbb, 0xecbc, 0xecbd, 0xecbe, 0xecbf, 0xecc0, 0xecc1, - 0xecc2, 0xecc3, 0xecc4, 0xecc5, 0xecc6, 0xecc7, 0xecc8, 0xecc9, - 0xecca, 0xeccb, 0xeccc, 0xeccd, 0xecce, 0xeccf, 0xecd0, 0xecd1, - 0xecd2, 0xecd3, 0xecd4, 0xecd5, 0xecd6, 0xecd7, 0xecd8, 0xecd9, - 0xecda, 0xecdb, 0xecdc, 0xecdd, 0xecde, 0xecdf, 0xece0, 0x003f, - /* lead byte 9e */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xece1, 0xece2, 0xece3, 0xece4, 0xece5, 0xece6, 0xece7, 0xece8, - 0xece9, 0xecea, 0xeceb, 0xecec, 0xeced, 0xecee, 0xecef, 0xecf0, - 0xecf1, 0xecf2, 0xecf3, 0xecf4, 0xecf5, 0xecf6, 0xecf7, 0xecf8, - 0xecf9, 0xecfa, 0xecfb, 0xecfc, 0xecfd, 0xecfe, 0xecff, 0xed00, - 0xed01, 0xed02, 0xed03, 0xed04, 0xed05, 0xed06, 0xed07, 0xed08, - 0xed09, 0xed0a, 0xed0b, 0xed0c, 0xed0d, 0xed0e, 0xed0f, 0xed10, - 0xed11, 0xed12, 0xed13, 0xed14, 0xed15, 0xed16, 0xed17, 0xed18, - 0xed19, 0xed1a, 0xed1b, 0xed1c, 0xed1d, 0xed1e, 0xed1f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xed20, 0xed21, 0xed22, 0xed23, 0xed24, 0xed25, 0xed26, - 0xed27, 0xed28, 0xed29, 0xed2a, 0xed2b, 0xed2c, 0xed2d, 0xed2e, - 0xed2f, 0xed30, 0xed31, 0xed32, 0xed33, 0xed34, 0xed35, 0xed36, - 0xed37, 0xed38, 0xed39, 0xed3a, 0xed3b, 0xed3c, 0xed3d, 0xed3e, - 0xed3f, 0xed40, 0xed41, 0xed42, 0xed43, 0xed44, 0xed45, 0xed46, - 0xed47, 0xed48, 0xed49, 0xed4a, 0xed4b, 0xed4c, 0xed4d, 0xed4e, - 0xed4f, 0xed50, 0xed51, 0xed52, 0xed53, 0xed54, 0xed55, 0xed56, - 0xed57, 0xed58, 0xed59, 0xed5a, 0xed5b, 0xed5c, 0xed5d, 0xed5e, - 0xed5f, 0xed60, 0xed61, 0xed62, 0xed63, 0xed64, 0xed65, 0xed66, - 0xed67, 0xed68, 0xed69, 0xed6a, 0xed6b, 0xed6c, 0xed6d, 0xed6e, - 0xed6f, 0xed70, 0xed71, 0xed72, 0xed73, 0xed74, 0xed75, 0xed76, - 0xed77, 0xed78, 0xed79, 0xed7a, 0xed7b, 0xed7c, 0xed7d, 0x003f, - /* lead byte 9f */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xed7e, 0xed7f, 0xed80, 0xed81, 0xed82, 0xed83, 0xed84, 0xed85, - 0xed86, 0xed87, 0xed88, 0xed89, 0xed8a, 0xed8b, 0xed8c, 0xed8d, - 0xed8e, 0xed8f, 0xed90, 0xed91, 0xed92, 0xed93, 0xed94, 0xed95, - 0xed96, 0xed97, 0xed98, 0xed99, 0xed9a, 0xed9b, 0xed9c, 0xed9d, - 0xed9e, 0xed9f, 0xeda0, 0xeda1, 0xeda2, 0xeda3, 0xeda4, 0xeda5, - 0xeda6, 0xeda7, 0xeda8, 0xeda9, 0xedaa, 0xedab, 0xedac, 0xedad, - 0xedae, 0xedaf, 0xedb0, 0xedb1, 0xedb2, 0xedb3, 0xedb4, 0xedb5, - 0xedb6, 0xedb7, 0xedb8, 0xedb9, 0xedba, 0xedbb, 0xedbc, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xedbd, 0xedbe, 0xedbf, 0xedc0, 0xedc1, 0xedc2, 0xedc3, - 0xedc4, 0xedc5, 0xedc6, 0xedc7, 0xedc8, 0xedc9, 0xedca, 0xedcb, - 0xedcc, 0xedcd, 0xedce, 0xedcf, 0xedd0, 0xedd1, 0xedd2, 0xedd3, - 0xedd4, 0xedd5, 0xedd6, 0xedd7, 0xedd8, 0xedd9, 0xedda, 0xeddb, - 0xeddc, 0xeddd, 0xedde, 0xeddf, 0xede0, 0xede1, 0xede2, 0xede3, - 0xede4, 0xede5, 0xede6, 0xede7, 0xede8, 0xede9, 0xedea, 0xedeb, - 0xedec, 0xeded, 0xedee, 0xedef, 0xedf0, 0xedf1, 0xedf2, 0xedf3, - 0xedf4, 0xedf5, 0xedf6, 0xedf7, 0xedf8, 0xedf9, 0xedfa, 0xedfb, - 0xedfc, 0xedfd, 0xedfe, 0xedff, 0xee00, 0xee01, 0xee02, 0xee03, - 0xee04, 0xee05, 0xee06, 0xee07, 0xee08, 0xee09, 0xee0a, 0xee0b, - 0xee0c, 0xee0d, 0xee0e, 0xee0f, 0xee10, 0xee11, 0xee12, 0xee13, - 0xee14, 0xee15, 0xee16, 0xee17, 0xee18, 0xee19, 0xee1a, 0x003f, - /* lead byte a0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xee1b, 0xee1c, 0xee1d, 0xee1e, 0xee1f, 0xee20, 0xee21, 0xee22, - 0xee23, 0xee24, 0xee25, 0xee26, 0xee27, 0xee28, 0xee29, 0xee2a, - 0xee2b, 0xee2c, 0xee2d, 0xee2e, 0xee2f, 0xee30, 0xee31, 0xee32, - 0xee33, 0xee34, 0xee35, 0xee36, 0xee37, 0xee38, 0xee39, 0xee3a, - 0xee3b, 0xee3c, 0xee3d, 0xee3e, 0xee3f, 0xee40, 0xee41, 0xee42, - 0xee43, 0xee44, 0xee45, 0xee46, 0xee47, 0xee48, 0xee49, 0xee4a, - 0xee4b, 0xee4c, 0xee4d, 0xee4e, 0xee4f, 0xee50, 0xee51, 0xee52, - 0xee53, 0xee54, 0xee55, 0xee56, 0xee57, 0xee58, 0xee59, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xee5a, 0xee5b, 0xee5c, 0xee5d, 0xee5e, 0xee5f, 0xee60, - 0xee61, 0xee62, 0xee63, 0xee64, 0xee65, 0xee66, 0xee67, 0xee68, - 0xee69, 0xee6a, 0xee6b, 0xee6c, 0xee6d, 0xee6e, 0xee6f, 0xee70, - 0xee71, 0xee72, 0xee73, 0xee74, 0xee75, 0xee76, 0xee77, 0xee78, - 0xee79, 0xee7a, 0xee7b, 0xee7c, 0xee7d, 0xee7e, 0xee7f, 0xee80, - 0xee81, 0xee82, 0xee83, 0xee84, 0xee85, 0xee86, 0xee87, 0xee88, - 0xee89, 0xee8a, 0xee8b, 0xee8c, 0xee8d, 0xee8e, 0xee8f, 0xee90, - 0xee91, 0xee92, 0xee93, 0xee94, 0xee95, 0xee96, 0xee97, 0xee98, - 0xee99, 0xee9a, 0xee9b, 0xee9c, 0xee9d, 0xee9e, 0xee9f, 0xeea0, - 0xeea1, 0xeea2, 0xeea3, 0xeea4, 0xeea5, 0xeea6, 0xeea7, 0xeea8, - 0xeea9, 0xeeaa, 0xeeab, 0xeeac, 0xeead, 0xeeae, 0xeeaf, 0xeeb0, - 0xeeb1, 0xeeb2, 0xeeb3, 0xeeb4, 0xeeb5, 0xeeb6, 0xeeb7, 0x003f, - /* lead byte a1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x3000, 0xff0c, 0x3001, 0x3002, 0xff0e, 0x2027, 0xff1b, 0xff1a, - 0xff1f, 0xff01, 0xfe30, 0x2026, 0x2025, 0xfe50, 0xfe51, 0xfe52, - 0x00b7, 0xfe54, 0xfe55, 0xfe56, 0xfe57, 0xff5c, 0x2013, 0xfe31, - 0x2014, 0xfe33, 0x2574, 0xfe34, 0xfe4f, 0xff08, 0xff09, 0xfe35, - 0xfe36, 0xff5b, 0xff5d, 0xfe37, 0xfe38, 0x3014, 0x3015, 0xfe39, - 0xfe3a, 0x3010, 0x3011, 0xfe3b, 0xfe3c, 0x300a, 0x300b, 0xfe3d, - 0xfe3e, 0x3008, 0x3009, 0xfe3f, 0xfe40, 0x300c, 0x300d, 0xfe41, - 0xfe42, 0x300e, 0x300f, 0xfe43, 0xfe44, 0xfe59, 0xfe5a, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xfe5b, 0xfe5c, 0xfe5d, 0xfe5e, 0x2018, 0x2019, 0x201c, - 0x201d, 0x301d, 0x301e, 0x2035, 0x2032, 0xff03, 0xff06, 0xff0a, - 0x203b, 0x00a7, 0x3003, 0x25cb, 0x25cf, 0x25b3, 0x25b2, 0x25ce, - 0x2606, 0x2605, 0x25c7, 0x25c6, 0x25a1, 0x25a0, 0x25bd, 0x25bc, - 0x32a3, 0x2105, 0x00af, 0xffe3, 0xff3f, 0x02cd, 0xfe49, 0xfe4a, - 0xfe4d, 0xfe4e, 0xfe4b, 0xfe4c, 0xfe5f, 0xfe60, 0xfe61, 0xff0b, - 0xff0d, 0x00d7, 0x00f7, 0x00b1, 0x221a, 0xff1c, 0xff1e, 0xff1d, - 0x2266, 0x2267, 0x2260, 0x221e, 0x2252, 0x2261, 0xfe62, 0xfe63, - 0xfe64, 0xfe65, 0xfe66, 0xff5e, 0x2229, 0x222a, 0x22a5, 0x2220, - 0x221f, 0x22bf, 0x33d2, 0x33d1, 0x222b, 0x222e, 0x2235, 0x2234, - 0x2640, 0x2642, 0x2295, 0x2299, 0x2191, 0x2193, 0x2190, 0x2192, - 0x2196, 0x2197, 0x2199, 0x2198, 0x2225, 0x2223, 0xff0f, 0x003f, - /* lead byte a2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xff3c, 0x2215, 0xfe68, 0xff04, 0xffe5, 0x3012, 0xffe0, 0xffe1, - 0xff05, 0xff20, 0x2103, 0x2109, 0xfe69, 0xfe6a, 0xfe6b, 0x33d5, - 0x339c, 0x339d, 0x339e, 0x33ce, 0x33a1, 0x338e, 0x338f, 0x33c4, - 0x00b0, 0x5159, 0x515b, 0x515e, 0x515d, 0x5161, 0x5163, 0x55e7, - 0x74e9, 0x7cce, 0x2581, 0x2582, 0x2583, 0x2584, 0x2585, 0x2586, - 0x2587, 0x2588, 0x258f, 0x258e, 0x258d, 0x258c, 0x258b, 0x258a, - 0x2589, 0x253c, 0x2534, 0x252c, 0x2524, 0x251c, 0x2594, 0x2500, - 0x2502, 0x2595, 0x250c, 0x2510, 0x2514, 0x2518, 0x256d, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x256e, 0x2570, 0x256f, 0x2550, 0x255e, 0x256a, 0x2561, - 0x25e2, 0x25e3, 0x25e5, 0x25e4, 0x2571, 0x2572, 0x2573, 0xff10, - 0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17, 0xff18, - 0xff19, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, - 0x2167, 0x2168, 0x2169, 0x3021, 0x3022, 0x3023, 0x3024, 0x3025, - 0x3026, 0x3027, 0x3028, 0x3029, 0x5341, 0x5344, 0x5345, 0xff21, - 0xff22, 0xff23, 0xff24, 0xff25, 0xff26, 0xff27, 0xff28, 0xff29, - 0xff2a, 0xff2b, 0xff2c, 0xff2d, 0xff2e, 0xff2f, 0xff30, 0xff31, - 0xff32, 0xff33, 0xff34, 0xff35, 0xff36, 0xff37, 0xff38, 0xff39, - 0xff3a, 0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47, - 0xff48, 0xff49, 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f, - 0xff50, 0xff51, 0xff52, 0xff53, 0xff54, 0xff55, 0xff56, 0x003f, - /* lead byte a3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xff57, 0xff58, 0xff59, 0xff5a, 0x0391, 0x0392, 0x0393, 0x0394, - 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, - 0x039d, 0x039e, 0x039f, 0x03a0, 0x03a1, 0x03a3, 0x03a4, 0x03a5, - 0x03a6, 0x03a7, 0x03a8, 0x03a9, 0x03b1, 0x03b2, 0x03b3, 0x03b4, - 0x03b5, 0x03b6, 0x03b7, 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, - 0x03bd, 0x03be, 0x03bf, 0x03c0, 0x03c1, 0x03c3, 0x03c4, 0x03c5, - 0x03c6, 0x03c7, 0x03c8, 0x03c9, 0x3105, 0x3106, 0x3107, 0x3108, - 0x3109, 0x310a, 0x310b, 0x310c, 0x310d, 0x310e, 0x310f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x3110, 0x3111, 0x3112, 0x3113, 0x3114, 0x3115, 0x3116, - 0x3117, 0x3118, 0x3119, 0x311a, 0x311b, 0x311c, 0x311d, 0x311e, - 0x311f, 0x3120, 0x3121, 0x3122, 0x3123, 0x3124, 0x3125, 0x3126, - 0x3127, 0x3128, 0x3129, 0x02d9, 0x02c9, 0x02ca, 0x02c7, 0x02cb, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x20ac, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* lead byte a4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x4e00, 0x4e59, 0x4e01, 0x4e03, 0x4e43, 0x4e5d, 0x4e86, 0x4e8c, - 0x4eba, 0x513f, 0x5165, 0x516b, 0x51e0, 0x5200, 0x5201, 0x529b, - 0x5315, 0x5341, 0x535c, 0x53c8, 0x4e09, 0x4e0b, 0x4e08, 0x4e0a, - 0x4e2b, 0x4e38, 0x51e1, 0x4e45, 0x4e48, 0x4e5f, 0x4e5e, 0x4e8e, - 0x4ea1, 0x5140, 0x5203, 0x52fa, 0x5343, 0x53c9, 0x53e3, 0x571f, - 0x58eb, 0x5915, 0x5927, 0x5973, 0x5b50, 0x5b51, 0x5b53, 0x5bf8, - 0x5c0f, 0x5c22, 0x5c38, 0x5c71, 0x5ddd, 0x5de5, 0x5df1, 0x5df2, - 0x5df3, 0x5dfe, 0x5e72, 0x5efe, 0x5f0b, 0x5f13, 0x624d, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x4e11, 0x4e10, 0x4e0d, 0x4e2d, 0x4e30, 0x4e39, 0x4e4b, - 0x5c39, 0x4e88, 0x4e91, 0x4e95, 0x4e92, 0x4e94, 0x4ea2, 0x4ec1, - 0x4ec0, 0x4ec3, 0x4ec6, 0x4ec7, 0x4ecd, 0x4eca, 0x4ecb, 0x4ec4, - 0x5143, 0x5141, 0x5167, 0x516d, 0x516e, 0x516c, 0x5197, 0x51f6, - 0x5206, 0x5207, 0x5208, 0x52fb, 0x52fe, 0x52ff, 0x5316, 0x5339, - 0x5348, 0x5347, 0x5345, 0x535e, 0x5384, 0x53cb, 0x53ca, 0x53cd, - 0x58ec, 0x5929, 0x592b, 0x592a, 0x592d, 0x5b54, 0x5c11, 0x5c24, - 0x5c3a, 0x5c6f, 0x5df4, 0x5e7b, 0x5eff, 0x5f14, 0x5f15, 0x5fc3, - 0x6208, 0x6236, 0x624b, 0x624e, 0x652f, 0x6587, 0x6597, 0x65a4, - 0x65b9, 0x65e5, 0x66f0, 0x6708, 0x6728, 0x6b20, 0x6b62, 0x6b79, - 0x6bcb, 0x6bd4, 0x6bdb, 0x6c0f, 0x6c34, 0x706b, 0x722a, 0x7236, - 0x723b, 0x7247, 0x7259, 0x725b, 0x72ac, 0x738b, 0x4e19, 0x003f, - /* lead byte a5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x4e16, 0x4e15, 0x4e14, 0x4e18, 0x4e3b, 0x4e4d, 0x4e4f, 0x4e4e, - 0x4ee5, 0x4ed8, 0x4ed4, 0x4ed5, 0x4ed6, 0x4ed7, 0x4ee3, 0x4ee4, - 0x4ed9, 0x4ede, 0x5145, 0x5144, 0x5189, 0x518a, 0x51ac, 0x51f9, - 0x51fa, 0x51f8, 0x520a, 0x52a0, 0x529f, 0x5305, 0x5306, 0x5317, - 0x531d, 0x4edf, 0x534a, 0x5349, 0x5361, 0x5360, 0x536f, 0x536e, - 0x53bb, 0x53ef, 0x53e4, 0x53f3, 0x53ec, 0x53ee, 0x53e9, 0x53e8, - 0x53fc, 0x53f8, 0x53f5, 0x53eb, 0x53e6, 0x53ea, 0x53f2, 0x53f1, - 0x53f0, 0x53e5, 0x53ed, 0x53fb, 0x56db, 0x56da, 0x5916, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x592e, 0x5931, 0x5974, 0x5976, 0x5b55, 0x5b83, 0x5c3c, - 0x5de8, 0x5de7, 0x5de6, 0x5e02, 0x5e03, 0x5e73, 0x5e7c, 0x5f01, - 0x5f18, 0x5f17, 0x5fc5, 0x620a, 0x6253, 0x6254, 0x6252, 0x6251, - 0x65a5, 0x65e6, 0x672e, 0x672c, 0x672a, 0x672b, 0x672d, 0x6b63, - 0x6bcd, 0x6c11, 0x6c10, 0x6c38, 0x6c41, 0x6c40, 0x6c3e, 0x72af, - 0x7384, 0x7389, 0x74dc, 0x74e6, 0x7518, 0x751f, 0x7528, 0x7529, - 0x7530, 0x7531, 0x7532, 0x7533, 0x758b, 0x767d, 0x76ae, 0x76bf, - 0x76ee, 0x77db, 0x77e2, 0x77f3, 0x793a, 0x79be, 0x7a74, 0x7acb, - 0x4e1e, 0x4e1f, 0x4e52, 0x4e53, 0x4e69, 0x4e99, 0x4ea4, 0x4ea6, - 0x4ea5, 0x4eff, 0x4f09, 0x4f19, 0x4f0a, 0x4f15, 0x4f0d, 0x4f10, - 0x4f11, 0x4f0f, 0x4ef2, 0x4ef6, 0x4efb, 0x4ef0, 0x4ef3, 0x4efd, - 0x4f01, 0x4f0b, 0x5149, 0x5147, 0x5146, 0x5148, 0x5168, 0x003f, - /* lead byte a6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x5171, 0x518d, 0x51b0, 0x5217, 0x5211, 0x5212, 0x520e, 0x5216, - 0x52a3, 0x5308, 0x5321, 0x5320, 0x5370, 0x5371, 0x5409, 0x540f, - 0x540c, 0x540a, 0x5410, 0x5401, 0x540b, 0x5404, 0x5411, 0x540d, - 0x5408, 0x5403, 0x540e, 0x5406, 0x5412, 0x56e0, 0x56de, 0x56dd, - 0x5733, 0x5730, 0x5728, 0x572d, 0x572c, 0x572f, 0x5729, 0x5919, - 0x591a, 0x5937, 0x5938, 0x5984, 0x5978, 0x5983, 0x597d, 0x5979, - 0x5982, 0x5981, 0x5b57, 0x5b58, 0x5b87, 0x5b88, 0x5b85, 0x5b89, - 0x5bfa, 0x5c16, 0x5c79, 0x5dde, 0x5e06, 0x5e76, 0x5e74, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5f0f, 0x5f1b, 0x5fd9, 0x5fd6, 0x620e, 0x620c, 0x620d, - 0x6210, 0x6263, 0x625b, 0x6258, 0x6536, 0x65e9, 0x65e8, 0x65ec, - 0x65ed, 0x66f2, 0x66f3, 0x6709, 0x673d, 0x6734, 0x6731, 0x6735, - 0x6b21, 0x6b64, 0x6b7b, 0x6c16, 0x6c5d, 0x6c57, 0x6c59, 0x6c5f, - 0x6c60, 0x6c50, 0x6c55, 0x6c61, 0x6c5b, 0x6c4d, 0x6c4e, 0x7070, - 0x725f, 0x725d, 0x767e, 0x7af9, 0x7c73, 0x7cf8, 0x7f36, 0x7f8a, - 0x7fbd, 0x8001, 0x8003, 0x800c, 0x8012, 0x8033, 0x807f, 0x8089, - 0x808b, 0x808c, 0x81e3, 0x81ea, 0x81f3, 0x81fc, 0x820c, 0x821b, - 0x821f, 0x826e, 0x8272, 0x827e, 0x866b, 0x8840, 0x884c, 0x8863, - 0x897f, 0x9621, 0x4e32, 0x4ea8, 0x4f4d, 0x4f4f, 0x4f47, 0x4f57, - 0x4f5e, 0x4f34, 0x4f5b, 0x4f55, 0x4f30, 0x4f50, 0x4f51, 0x4f3d, - 0x4f3a, 0x4f38, 0x4f43, 0x4f54, 0x4f3c, 0x4f46, 0x4f63, 0x003f, - /* lead byte a7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x4f5c, 0x4f60, 0x4f2f, 0x4f4e, 0x4f36, 0x4f59, 0x4f5d, 0x4f48, - 0x4f5a, 0x514c, 0x514b, 0x514d, 0x5175, 0x51b6, 0x51b7, 0x5225, - 0x5224, 0x5229, 0x522a, 0x5228, 0x52ab, 0x52a9, 0x52aa, 0x52ac, - 0x5323, 0x5373, 0x5375, 0x541d, 0x542d, 0x541e, 0x543e, 0x5426, - 0x544e, 0x5427, 0x5446, 0x5443, 0x5433, 0x5448, 0x5442, 0x541b, - 0x5429, 0x544a, 0x5439, 0x543b, 0x5438, 0x542e, 0x5435, 0x5436, - 0x5420, 0x543c, 0x5440, 0x5431, 0x542b, 0x541f, 0x542c, 0x56ea, - 0x56f0, 0x56e4, 0x56eb, 0x574a, 0x5751, 0x5740, 0x574d, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5747, 0x574e, 0x573e, 0x5750, 0x574f, 0x573b, 0x58ef, - 0x593e, 0x599d, 0x5992, 0x59a8, 0x599e, 0x59a3, 0x5999, 0x5996, - 0x598d, 0x59a4, 0x5993, 0x598a, 0x59a5, 0x5b5d, 0x5b5c, 0x5b5a, - 0x5b5b, 0x5b8c, 0x5b8b, 0x5b8f, 0x5c2c, 0x5c40, 0x5c41, 0x5c3f, - 0x5c3e, 0x5c90, 0x5c91, 0x5c94, 0x5c8c, 0x5deb, 0x5e0c, 0x5e8f, - 0x5e87, 0x5e8a, 0x5ef7, 0x5f04, 0x5f1f, 0x5f64, 0x5f62, 0x5f77, - 0x5f79, 0x5fd8, 0x5fcc, 0x5fd7, 0x5fcd, 0x5ff1, 0x5feb, 0x5ff8, - 0x5fea, 0x6212, 0x6211, 0x6284, 0x6297, 0x6296, 0x6280, 0x6276, - 0x6289, 0x626d, 0x628a, 0x627c, 0x627e, 0x6279, 0x6273, 0x6292, - 0x626f, 0x6298, 0x626e, 0x6295, 0x6293, 0x6291, 0x6286, 0x6539, - 0x653b, 0x6538, 0x65f1, 0x66f4, 0x675f, 0x674e, 0x674f, 0x6750, - 0x6751, 0x675c, 0x6756, 0x675e, 0x6749, 0x6746, 0x6760, 0x003f, - /* lead byte a8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6753, 0x6757, 0x6b65, 0x6bcf, 0x6c42, 0x6c5e, 0x6c99, 0x6c81, - 0x6c88, 0x6c89, 0x6c85, 0x6c9b, 0x6c6a, 0x6c7a, 0x6c90, 0x6c70, - 0x6c8c, 0x6c68, 0x6c96, 0x6c92, 0x6c7d, 0x6c83, 0x6c72, 0x6c7e, - 0x6c74, 0x6c86, 0x6c76, 0x6c8d, 0x6c94, 0x6c98, 0x6c82, 0x7076, - 0x707c, 0x707d, 0x7078, 0x7262, 0x7261, 0x7260, 0x72c4, 0x72c2, - 0x7396, 0x752c, 0x752b, 0x7537, 0x7538, 0x7682, 0x76ef, 0x77e3, - 0x79c1, 0x79c0, 0x79bf, 0x7a76, 0x7cfb, 0x7f55, 0x8096, 0x8093, - 0x809d, 0x8098, 0x809b, 0x809a, 0x80b2, 0x826f, 0x8292, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x828b, 0x828d, 0x898b, 0x89d2, 0x8a00, 0x8c37, 0x8c46, - 0x8c55, 0x8c9d, 0x8d64, 0x8d70, 0x8db3, 0x8eab, 0x8eca, 0x8f9b, - 0x8fb0, 0x8fc2, 0x8fc6, 0x8fc5, 0x8fc4, 0x5de1, 0x9091, 0x90a2, - 0x90aa, 0x90a6, 0x90a3, 0x9149, 0x91c6, 0x91cc, 0x9632, 0x962e, - 0x9631, 0x962a, 0x962c, 0x4e26, 0x4e56, 0x4e73, 0x4e8b, 0x4e9b, - 0x4e9e, 0x4eab, 0x4eac, 0x4f6f, 0x4f9d, 0x4f8d, 0x4f73, 0x4f7f, - 0x4f6c, 0x4f9b, 0x4f8b, 0x4f86, 0x4f83, 0x4f70, 0x4f75, 0x4f88, - 0x4f69, 0x4f7b, 0x4f96, 0x4f7e, 0x4f8f, 0x4f91, 0x4f7a, 0x5154, - 0x5152, 0x5155, 0x5169, 0x5177, 0x5176, 0x5178, 0x51bd, 0x51fd, - 0x523b, 0x5238, 0x5237, 0x523a, 0x5230, 0x522e, 0x5236, 0x5241, - 0x52be, 0x52bb, 0x5352, 0x5354, 0x5353, 0x5351, 0x5366, 0x5377, - 0x5378, 0x5379, 0x53d6, 0x53d4, 0x53d7, 0x5473, 0x5475, 0x003f, - /* lead byte a9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x5496, 0x5478, 0x5495, 0x5480, 0x547b, 0x5477, 0x5484, 0x5492, - 0x5486, 0x547c, 0x5490, 0x5471, 0x5476, 0x548c, 0x549a, 0x5462, - 0x5468, 0x548b, 0x547d, 0x548e, 0x56fa, 0x5783, 0x5777, 0x576a, - 0x5769, 0x5761, 0x5766, 0x5764, 0x577c, 0x591c, 0x5949, 0x5947, - 0x5948, 0x5944, 0x5954, 0x59be, 0x59bb, 0x59d4, 0x59b9, 0x59ae, - 0x59d1, 0x59c6, 0x59d0, 0x59cd, 0x59cb, 0x59d3, 0x59ca, 0x59af, - 0x59b3, 0x59d2, 0x59c5, 0x5b5f, 0x5b64, 0x5b63, 0x5b97, 0x5b9a, - 0x5b98, 0x5b9c, 0x5b99, 0x5b9b, 0x5c1a, 0x5c48, 0x5c45, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5c46, 0x5cb7, 0x5ca1, 0x5cb8, 0x5ca9, 0x5cab, 0x5cb1, - 0x5cb3, 0x5e18, 0x5e1a, 0x5e16, 0x5e15, 0x5e1b, 0x5e11, 0x5e78, - 0x5e9a, 0x5e97, 0x5e9c, 0x5e95, 0x5e96, 0x5ef6, 0x5f26, 0x5f27, - 0x5f29, 0x5f80, 0x5f81, 0x5f7f, 0x5f7c, 0x5fdd, 0x5fe0, 0x5ffd, - 0x5ff5, 0x5fff, 0x600f, 0x6014, 0x602f, 0x6035, 0x6016, 0x602a, - 0x6015, 0x6021, 0x6027, 0x6029, 0x602b, 0x601b, 0x6216, 0x6215, - 0x623f, 0x623e, 0x6240, 0x627f, 0x62c9, 0x62cc, 0x62c4, 0x62bf, - 0x62c2, 0x62b9, 0x62d2, 0x62db, 0x62ab, 0x62d3, 0x62d4, 0x62cb, - 0x62c8, 0x62a8, 0x62bd, 0x62bc, 0x62d0, 0x62d9, 0x62c7, 0x62cd, - 0x62b5, 0x62da, 0x62b1, 0x62d8, 0x62d6, 0x62d7, 0x62c6, 0x62ac, - 0x62ce, 0x653e, 0x65a7, 0x65bc, 0x65fa, 0x6614, 0x6613, 0x660c, - 0x6606, 0x6602, 0x660e, 0x6600, 0x660f, 0x6615, 0x660a, 0x003f, - /* lead byte aa */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6607, 0x670d, 0x670b, 0x676d, 0x678b, 0x6795, 0x6771, 0x679c, - 0x6773, 0x6777, 0x6787, 0x679d, 0x6797, 0x676f, 0x6770, 0x677f, - 0x6789, 0x677e, 0x6790, 0x6775, 0x679a, 0x6793, 0x677c, 0x676a, - 0x6772, 0x6b23, 0x6b66, 0x6b67, 0x6b7f, 0x6c13, 0x6c1b, 0x6ce3, - 0x6ce8, 0x6cf3, 0x6cb1, 0x6ccc, 0x6ce5, 0x6cb3, 0x6cbd, 0x6cbe, - 0x6cbc, 0x6ce2, 0x6cab, 0x6cd5, 0x6cd3, 0x6cb8, 0x6cc4, 0x6cb9, - 0x6cc1, 0x6cae, 0x6cd7, 0x6cc5, 0x6cf1, 0x6cbf, 0x6cbb, 0x6ce1, - 0x6cdb, 0x6cca, 0x6cac, 0x6cef, 0x6cdc, 0x6cd6, 0x6ce0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7095, 0x708e, 0x7092, 0x708a, 0x7099, 0x722c, 0x722d, - 0x7238, 0x7248, 0x7267, 0x7269, 0x72c0, 0x72ce, 0x72d9, 0x72d7, - 0x72d0, 0x73a9, 0x73a8, 0x739f, 0x73ab, 0x73a5, 0x753d, 0x759d, - 0x7599, 0x759a, 0x7684, 0x76c2, 0x76f2, 0x76f4, 0x77e5, 0x77fd, - 0x793e, 0x7940, 0x7941, 0x79c9, 0x79c8, 0x7a7a, 0x7a79, 0x7afa, - 0x7cfe, 0x7f54, 0x7f8c, 0x7f8b, 0x8005, 0x80ba, 0x80a5, 0x80a2, - 0x80b1, 0x80a1, 0x80ab, 0x80a9, 0x80b4, 0x80aa, 0x80af, 0x81e5, - 0x81fe, 0x820d, 0x82b3, 0x829d, 0x8299, 0x82ad, 0x82bd, 0x829f, - 0x82b9, 0x82b1, 0x82ac, 0x82a5, 0x82af, 0x82b8, 0x82a3, 0x82b0, - 0x82be, 0x82b7, 0x864e, 0x8671, 0x521d, 0x8868, 0x8ecb, 0x8fce, - 0x8fd4, 0x8fd1, 0x90b5, 0x90b8, 0x90b1, 0x90b6, 0x91c7, 0x91d1, - 0x9577, 0x9580, 0x961c, 0x9640, 0x963f, 0x963b, 0x9644, 0x003f, - /* lead byte ab */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9642, 0x96b9, 0x96e8, 0x9752, 0x975e, 0x4e9f, 0x4ead, 0x4eae, - 0x4fe1, 0x4fb5, 0x4faf, 0x4fbf, 0x4fe0, 0x4fd1, 0x4fcf, 0x4fdd, - 0x4fc3, 0x4fb6, 0x4fd8, 0x4fdf, 0x4fca, 0x4fd7, 0x4fae, 0x4fd0, - 0x4fc4, 0x4fc2, 0x4fda, 0x4fce, 0x4fde, 0x4fb7, 0x5157, 0x5192, - 0x5191, 0x51a0, 0x524e, 0x5243, 0x524a, 0x524d, 0x524c, 0x524b, - 0x5247, 0x52c7, 0x52c9, 0x52c3, 0x52c1, 0x530d, 0x5357, 0x537b, - 0x539a, 0x53db, 0x54ac, 0x54c0, 0x54a8, 0x54ce, 0x54c9, 0x54b8, - 0x54a6, 0x54b3, 0x54c7, 0x54c2, 0x54bd, 0x54aa, 0x54c1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x54c4, 0x54c8, 0x54af, 0x54ab, 0x54b1, 0x54bb, 0x54a9, - 0x54a7, 0x54bf, 0x56ff, 0x5782, 0x578b, 0x57a0, 0x57a3, 0x57a2, - 0x57ce, 0x57ae, 0x5793, 0x5955, 0x5951, 0x594f, 0x594e, 0x5950, - 0x59dc, 0x59d8, 0x59ff, 0x59e3, 0x59e8, 0x5a03, 0x59e5, 0x59ea, - 0x59da, 0x59e6, 0x5a01, 0x59fb, 0x5b69, 0x5ba3, 0x5ba6, 0x5ba4, - 0x5ba2, 0x5ba5, 0x5c01, 0x5c4e, 0x5c4f, 0x5c4d, 0x5c4b, 0x5cd9, - 0x5cd2, 0x5df7, 0x5e1d, 0x5e25, 0x5e1f, 0x5e7d, 0x5ea0, 0x5ea6, - 0x5efa, 0x5f08, 0x5f2d, 0x5f65, 0x5f88, 0x5f85, 0x5f8a, 0x5f8b, - 0x5f87, 0x5f8c, 0x5f89, 0x6012, 0x601d, 0x6020, 0x6025, 0x600e, - 0x6028, 0x604d, 0x6070, 0x6068, 0x6062, 0x6046, 0x6043, 0x606c, - 0x606b, 0x606a, 0x6064, 0x6241, 0x62dc, 0x6316, 0x6309, 0x62fc, - 0x62ed, 0x6301, 0x62ee, 0x62fd, 0x6307, 0x62f1, 0x62f7, 0x003f, - /* lead byte ac */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x62ef, 0x62ec, 0x62fe, 0x62f4, 0x6311, 0x6302, 0x653f, 0x6545, - 0x65ab, 0x65bd, 0x65e2, 0x6625, 0x662d, 0x6620, 0x6627, 0x662f, - 0x661f, 0x6628, 0x6631, 0x6624, 0x66f7, 0x67ff, 0x67d3, 0x67f1, - 0x67d4, 0x67d0, 0x67ec, 0x67b6, 0x67af, 0x67f5, 0x67e9, 0x67ef, - 0x67c4, 0x67d1, 0x67b4, 0x67da, 0x67e5, 0x67b8, 0x67cf, 0x67de, - 0x67f3, 0x67b0, 0x67d9, 0x67e2, 0x67dd, 0x67d2, 0x6b6a, 0x6b83, - 0x6b86, 0x6bb5, 0x6bd2, 0x6bd7, 0x6c1f, 0x6cc9, 0x6d0b, 0x6d32, - 0x6d2a, 0x6d41, 0x6d25, 0x6d0c, 0x6d31, 0x6d1e, 0x6d17, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6d3b, 0x6d3d, 0x6d3e, 0x6d36, 0x6d1b, 0x6cf5, 0x6d39, - 0x6d27, 0x6d38, 0x6d29, 0x6d2e, 0x6d35, 0x6d0e, 0x6d2b, 0x70ab, - 0x70ba, 0x70b3, 0x70ac, 0x70af, 0x70ad, 0x70b8, 0x70ae, 0x70a4, - 0x7230, 0x7272, 0x726f, 0x7274, 0x72e9, 0x72e0, 0x72e1, 0x73b7, - 0x73ca, 0x73bb, 0x73b2, 0x73cd, 0x73c0, 0x73b3, 0x751a, 0x752d, - 0x754f, 0x754c, 0x754e, 0x754b, 0x75ab, 0x75a4, 0x75a5, 0x75a2, - 0x75a3, 0x7678, 0x7686, 0x7687, 0x7688, 0x76c8, 0x76c6, 0x76c3, - 0x76c5, 0x7701, 0x76f9, 0x76f8, 0x7709, 0x770b, 0x76fe, 0x76fc, - 0x7707, 0x77dc, 0x7802, 0x7814, 0x780c, 0x780d, 0x7946, 0x7949, - 0x7948, 0x7947, 0x79b9, 0x79ba, 0x79d1, 0x79d2, 0x79cb, 0x7a7f, - 0x7a81, 0x7aff, 0x7afd, 0x7c7d, 0x7d02, 0x7d05, 0x7d00, 0x7d09, - 0x7d07, 0x7d04, 0x7d06, 0x7f38, 0x7f8e, 0x7fbf, 0x8004, 0x003f, - /* lead byte ad */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8010, 0x800d, 0x8011, 0x8036, 0x80d6, 0x80e5, 0x80da, 0x80c3, - 0x80c4, 0x80cc, 0x80e1, 0x80db, 0x80ce, 0x80de, 0x80e4, 0x80dd, - 0x81f4, 0x8222, 0x82e7, 0x8303, 0x8305, 0x82e3, 0x82db, 0x82e6, - 0x8304, 0x82e5, 0x8302, 0x8309, 0x82d2, 0x82d7, 0x82f1, 0x8301, - 0x82dc, 0x82d4, 0x82d1, 0x82de, 0x82d3, 0x82df, 0x82ef, 0x8306, - 0x8650, 0x8679, 0x867b, 0x867a, 0x884d, 0x886b, 0x8981, 0x89d4, - 0x8a08, 0x8a02, 0x8a03, 0x8c9e, 0x8ca0, 0x8d74, 0x8d73, 0x8db4, - 0x8ecd, 0x8ecc, 0x8ff0, 0x8fe6, 0x8fe2, 0x8fea, 0x8fe5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8fed, 0x8feb, 0x8fe4, 0x8fe8, 0x90ca, 0x90ce, 0x90c1, - 0x90c3, 0x914b, 0x914a, 0x91cd, 0x9582, 0x9650, 0x964b, 0x964c, - 0x964d, 0x9762, 0x9769, 0x97cb, 0x97ed, 0x97f3, 0x9801, 0x98a8, - 0x98db, 0x98df, 0x9996, 0x9999, 0x4e58, 0x4eb3, 0x500c, 0x500d, - 0x5023, 0x4fef, 0x5026, 0x5025, 0x4ff8, 0x5029, 0x5016, 0x5006, - 0x503c, 0x501f, 0x501a, 0x5012, 0x5011, 0x4ffa, 0x5000, 0x5014, - 0x5028, 0x4ff1, 0x5021, 0x500b, 0x5019, 0x5018, 0x4ff3, 0x4fee, - 0x502d, 0x502a, 0x4ffe, 0x502b, 0x5009, 0x517c, 0x51a4, 0x51a5, - 0x51a2, 0x51cd, 0x51cc, 0x51c6, 0x51cb, 0x5256, 0x525c, 0x5254, - 0x525b, 0x525d, 0x532a, 0x537f, 0x539f, 0x539d, 0x53df, 0x54e8, - 0x5510, 0x5501, 0x5537, 0x54fc, 0x54e5, 0x54f2, 0x5506, 0x54fa, - 0x5514, 0x54e9, 0x54ed, 0x54e1, 0x5509, 0x54ee, 0x54ea, 0x003f, - /* lead byte ae */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x54e6, 0x5527, 0x5507, 0x54fd, 0x550f, 0x5703, 0x5704, 0x57c2, - 0x57d4, 0x57cb, 0x57c3, 0x5809, 0x590f, 0x5957, 0x5958, 0x595a, - 0x5a11, 0x5a18, 0x5a1c, 0x5a1f, 0x5a1b, 0x5a13, 0x59ec, 0x5a20, - 0x5a23, 0x5a29, 0x5a25, 0x5a0c, 0x5a09, 0x5b6b, 0x5c58, 0x5bb0, - 0x5bb3, 0x5bb6, 0x5bb4, 0x5bae, 0x5bb5, 0x5bb9, 0x5bb8, 0x5c04, - 0x5c51, 0x5c55, 0x5c50, 0x5ced, 0x5cfd, 0x5cfb, 0x5cea, 0x5ce8, - 0x5cf0, 0x5cf6, 0x5d01, 0x5cf4, 0x5dee, 0x5e2d, 0x5e2b, 0x5eab, - 0x5ead, 0x5ea7, 0x5f31, 0x5f92, 0x5f91, 0x5f90, 0x6059, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6063, 0x6065, 0x6050, 0x6055, 0x606d, 0x6069, 0x606f, - 0x6084, 0x609f, 0x609a, 0x608d, 0x6094, 0x608c, 0x6085, 0x6096, - 0x6247, 0x62f3, 0x6308, 0x62ff, 0x634e, 0x633e, 0x632f, 0x6355, - 0x6342, 0x6346, 0x634f, 0x6349, 0x633a, 0x6350, 0x633d, 0x632a, - 0x632b, 0x6328, 0x634d, 0x634c, 0x6548, 0x6549, 0x6599, 0x65c1, - 0x65c5, 0x6642, 0x6649, 0x664f, 0x6643, 0x6652, 0x664c, 0x6645, - 0x6641, 0x66f8, 0x6714, 0x6715, 0x6717, 0x6821, 0x6838, 0x6848, - 0x6846, 0x6853, 0x6839, 0x6842, 0x6854, 0x6829, 0x68b3, 0x6817, - 0x684c, 0x6851, 0x683d, 0x67f4, 0x6850, 0x6840, 0x683c, 0x6843, - 0x682a, 0x6845, 0x6813, 0x6818, 0x6841, 0x6b8a, 0x6b89, 0x6bb7, - 0x6c23, 0x6c27, 0x6c28, 0x6c26, 0x6c24, 0x6cf0, 0x6d6a, 0x6d95, - 0x6d88, 0x6d87, 0x6d66, 0x6d78, 0x6d77, 0x6d59, 0x6d93, 0x003f, - /* lead byte af */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6d6c, 0x6d89, 0x6d6e, 0x6d5a, 0x6d74, 0x6d69, 0x6d8c, 0x6d8a, - 0x6d79, 0x6d85, 0x6d65, 0x6d94, 0x70ca, 0x70d8, 0x70e4, 0x70d9, - 0x70c8, 0x70cf, 0x7239, 0x7279, 0x72fc, 0x72f9, 0x72fd, 0x72f8, - 0x72f7, 0x7386, 0x73ed, 0x7409, 0x73ee, 0x73e0, 0x73ea, 0x73de, - 0x7554, 0x755d, 0x755c, 0x755a, 0x7559, 0x75be, 0x75c5, 0x75c7, - 0x75b2, 0x75b3, 0x75bd, 0x75bc, 0x75b9, 0x75c2, 0x75b8, 0x768b, - 0x76b0, 0x76ca, 0x76cd, 0x76ce, 0x7729, 0x771f, 0x7720, 0x7728, - 0x77e9, 0x7830, 0x7827, 0x7838, 0x781d, 0x7834, 0x7837, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7825, 0x782d, 0x7820, 0x781f, 0x7832, 0x7955, 0x7950, - 0x7960, 0x795f, 0x7956, 0x795e, 0x795d, 0x7957, 0x795a, 0x79e4, - 0x79e3, 0x79e7, 0x79df, 0x79e6, 0x79e9, 0x79d8, 0x7a84, 0x7a88, - 0x7ad9, 0x7b06, 0x7b11, 0x7c89, 0x7d21, 0x7d17, 0x7d0b, 0x7d0a, - 0x7d20, 0x7d22, 0x7d14, 0x7d10, 0x7d15, 0x7d1a, 0x7d1c, 0x7d0d, - 0x7d19, 0x7d1b, 0x7f3a, 0x7f5f, 0x7f94, 0x7fc5, 0x7fc1, 0x8006, - 0x8018, 0x8015, 0x8019, 0x8017, 0x803d, 0x803f, 0x80f1, 0x8102, - 0x80f0, 0x8105, 0x80ed, 0x80f4, 0x8106, 0x80f8, 0x80f3, 0x8108, - 0x80fd, 0x810a, 0x80fc, 0x80ef, 0x81ed, 0x81ec, 0x8200, 0x8210, - 0x822a, 0x822b, 0x8228, 0x822c, 0x82bb, 0x832b, 0x8352, 0x8354, - 0x834a, 0x8338, 0x8350, 0x8349, 0x8335, 0x8334, 0x834f, 0x8332, - 0x8339, 0x8336, 0x8317, 0x8340, 0x8331, 0x8328, 0x8343, 0x003f, - /* lead byte b0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8654, 0x868a, 0x86aa, 0x8693, 0x86a4, 0x86a9, 0x868c, 0x86a3, - 0x869c, 0x8870, 0x8877, 0x8881, 0x8882, 0x887d, 0x8879, 0x8a18, - 0x8a10, 0x8a0e, 0x8a0c, 0x8a15, 0x8a0a, 0x8a17, 0x8a13, 0x8a16, - 0x8a0f, 0x8a11, 0x8c48, 0x8c7a, 0x8c79, 0x8ca1, 0x8ca2, 0x8d77, - 0x8eac, 0x8ed2, 0x8ed4, 0x8ecf, 0x8fb1, 0x9001, 0x9006, 0x8ff7, - 0x9000, 0x8ffa, 0x8ff4, 0x9003, 0x8ffd, 0x9005, 0x8ff8, 0x9095, - 0x90e1, 0x90dd, 0x90e2, 0x9152, 0x914d, 0x914c, 0x91d8, 0x91dd, - 0x91d7, 0x91dc, 0x91d9, 0x9583, 0x9662, 0x9663, 0x9661, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x965b, 0x965d, 0x9664, 0x9658, 0x965e, 0x96bb, 0x98e2, - 0x99ac, 0x9aa8, 0x9ad8, 0x9b25, 0x9b32, 0x9b3c, 0x4e7e, 0x507a, - 0x507d, 0x505c, 0x5047, 0x5043, 0x504c, 0x505a, 0x5049, 0x5065, - 0x5076, 0x504e, 0x5055, 0x5075, 0x5074, 0x5077, 0x504f, 0x500f, - 0x506f, 0x506d, 0x515c, 0x5195, 0x51f0, 0x526a, 0x526f, 0x52d2, - 0x52d9, 0x52d8, 0x52d5, 0x5310, 0x530f, 0x5319, 0x533f, 0x5340, - 0x533e, 0x53c3, 0x66fc, 0x5546, 0x556a, 0x5566, 0x5544, 0x555e, - 0x5561, 0x5543, 0x554a, 0x5531, 0x5556, 0x554f, 0x5555, 0x552f, - 0x5564, 0x5538, 0x552e, 0x555c, 0x552c, 0x5563, 0x5533, 0x5541, - 0x5557, 0x5708, 0x570b, 0x5709, 0x57df, 0x5805, 0x580a, 0x5806, - 0x57e0, 0x57e4, 0x57fa, 0x5802, 0x5835, 0x57f7, 0x57f9, 0x5920, - 0x5962, 0x5a36, 0x5a41, 0x5a49, 0x5a66, 0x5a6a, 0x5a40, 0x003f, - /* lead byte b1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x5a3c, 0x5a62, 0x5a5a, 0x5a46, 0x5a4a, 0x5b70, 0x5bc7, 0x5bc5, - 0x5bc4, 0x5bc2, 0x5bbf, 0x5bc6, 0x5c09, 0x5c08, 0x5c07, 0x5c60, - 0x5c5c, 0x5c5d, 0x5d07, 0x5d06, 0x5d0e, 0x5d1b, 0x5d16, 0x5d22, - 0x5d11, 0x5d29, 0x5d14, 0x5d19, 0x5d24, 0x5d27, 0x5d17, 0x5de2, - 0x5e38, 0x5e36, 0x5e33, 0x5e37, 0x5eb7, 0x5eb8, 0x5eb6, 0x5eb5, - 0x5ebe, 0x5f35, 0x5f37, 0x5f57, 0x5f6c, 0x5f69, 0x5f6b, 0x5f97, - 0x5f99, 0x5f9e, 0x5f98, 0x5fa1, 0x5fa0, 0x5f9c, 0x607f, 0x60a3, - 0x6089, 0x60a0, 0x60a8, 0x60cb, 0x60b4, 0x60e6, 0x60bd, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x60c5, 0x60bb, 0x60b5, 0x60dc, 0x60bc, 0x60d8, 0x60d5, - 0x60c6, 0x60df, 0x60b8, 0x60da, 0x60c7, 0x621a, 0x621b, 0x6248, - 0x63a0, 0x63a7, 0x6372, 0x6396, 0x63a2, 0x63a5, 0x6377, 0x6367, - 0x6398, 0x63aa, 0x6371, 0x63a9, 0x6389, 0x6383, 0x639b, 0x636b, - 0x63a8, 0x6384, 0x6388, 0x6399, 0x63a1, 0x63ac, 0x6392, 0x638f, - 0x6380, 0x637b, 0x6369, 0x6368, 0x637a, 0x655d, 0x6556, 0x6551, - 0x6559, 0x6557, 0x555f, 0x654f, 0x6558, 0x6555, 0x6554, 0x659c, - 0x659b, 0x65ac, 0x65cf, 0x65cb, 0x65cc, 0x65ce, 0x665d, 0x665a, - 0x6664, 0x6668, 0x6666, 0x665e, 0x66f9, 0x52d7, 0x671b, 0x6881, - 0x68af, 0x68a2, 0x6893, 0x68b5, 0x687f, 0x6876, 0x68b1, 0x68a7, - 0x6897, 0x68b0, 0x6883, 0x68c4, 0x68ad, 0x6886, 0x6885, 0x6894, - 0x689d, 0x68a8, 0x689f, 0x68a1, 0x6882, 0x6b32, 0x6bba, 0x003f, - /* lead byte b2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6beb, 0x6bec, 0x6c2b, 0x6d8e, 0x6dbc, 0x6df3, 0x6dd9, 0x6db2, - 0x6de1, 0x6dcc, 0x6de4, 0x6dfb, 0x6dfa, 0x6e05, 0x6dc7, 0x6dcb, - 0x6daf, 0x6dd1, 0x6dae, 0x6dde, 0x6df9, 0x6db8, 0x6df7, 0x6df5, - 0x6dc5, 0x6dd2, 0x6e1a, 0x6db5, 0x6dda, 0x6deb, 0x6dd8, 0x6dea, - 0x6df1, 0x6dee, 0x6de8, 0x6dc6, 0x6dc4, 0x6daa, 0x6dec, 0x6dbf, - 0x6de6, 0x70f9, 0x7109, 0x710a, 0x70fd, 0x70ef, 0x723d, 0x727d, - 0x7281, 0x731c, 0x731b, 0x7316, 0x7313, 0x7319, 0x7387, 0x7405, - 0x740a, 0x7403, 0x7406, 0x73fe, 0x740d, 0x74e0, 0x74f6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x74f7, 0x751c, 0x7522, 0x7565, 0x7566, 0x7562, 0x7570, - 0x758f, 0x75d4, 0x75d5, 0x75b5, 0x75ca, 0x75cd, 0x768e, 0x76d4, - 0x76d2, 0x76db, 0x7737, 0x773e, 0x773c, 0x7736, 0x7738, 0x773a, - 0x786b, 0x7843, 0x784e, 0x7965, 0x7968, 0x796d, 0x79fb, 0x7a92, - 0x7a95, 0x7b20, 0x7b28, 0x7b1b, 0x7b2c, 0x7b26, 0x7b19, 0x7b1e, - 0x7b2e, 0x7c92, 0x7c97, 0x7c95, 0x7d46, 0x7d43, 0x7d71, 0x7d2e, - 0x7d39, 0x7d3c, 0x7d40, 0x7d30, 0x7d33, 0x7d44, 0x7d2f, 0x7d42, - 0x7d32, 0x7d31, 0x7f3d, 0x7f9e, 0x7f9a, 0x7fcc, 0x7fce, 0x7fd2, - 0x801c, 0x804a, 0x8046, 0x812f, 0x8116, 0x8123, 0x812b, 0x8129, - 0x8130, 0x8124, 0x8202, 0x8235, 0x8237, 0x8236, 0x8239, 0x838e, - 0x839e, 0x8398, 0x8378, 0x83a2, 0x8396, 0x83bd, 0x83ab, 0x8392, - 0x838a, 0x8393, 0x8389, 0x83a0, 0x8377, 0x837b, 0x837c, 0x003f, - /* lead byte b3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8386, 0x83a7, 0x8655, 0x5f6a, 0x86c7, 0x86c0, 0x86b6, 0x86c4, - 0x86b5, 0x86c6, 0x86cb, 0x86b1, 0x86af, 0x86c9, 0x8853, 0x889e, - 0x8888, 0x88ab, 0x8892, 0x8896, 0x888d, 0x888b, 0x8993, 0x898f, - 0x8a2a, 0x8a1d, 0x8a23, 0x8a25, 0x8a31, 0x8a2d, 0x8a1f, 0x8a1b, - 0x8a22, 0x8c49, 0x8c5a, 0x8ca9, 0x8cac, 0x8cab, 0x8ca8, 0x8caa, - 0x8ca7, 0x8d67, 0x8d66, 0x8dbe, 0x8dba, 0x8edb, 0x8edf, 0x9019, - 0x900d, 0x901a, 0x9017, 0x9023, 0x901f, 0x901d, 0x9010, 0x9015, - 0x901e, 0x9020, 0x900f, 0x9022, 0x9016, 0x901b, 0x9014, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x90e8, 0x90ed, 0x90fd, 0x9157, 0x91ce, 0x91f5, 0x91e6, - 0x91e3, 0x91e7, 0x91ed, 0x91e9, 0x9589, 0x966a, 0x9675, 0x9673, - 0x9678, 0x9670, 0x9674, 0x9676, 0x9677, 0x966c, 0x96c0, 0x96ea, - 0x96e9, 0x7ae0, 0x7adf, 0x9802, 0x9803, 0x9b5a, 0x9ce5, 0x9e75, - 0x9e7f, 0x9ea5, 0x9ebb, 0x50a2, 0x508d, 0x5085, 0x5099, 0x5091, - 0x5080, 0x5096, 0x5098, 0x509a, 0x6700, 0x51f1, 0x5272, 0x5274, - 0x5275, 0x5269, 0x52de, 0x52dd, 0x52db, 0x535a, 0x53a5, 0x557b, - 0x5580, 0x55a7, 0x557c, 0x558a, 0x559d, 0x5598, 0x5582, 0x559c, - 0x55aa, 0x5594, 0x5587, 0x558b, 0x5583, 0x55b3, 0x55ae, 0x559f, - 0x553e, 0x55b2, 0x559a, 0x55bb, 0x55ac, 0x55b1, 0x557e, 0x5589, - 0x55ab, 0x5599, 0x570d, 0x582f, 0x582a, 0x5834, 0x5824, 0x5830, - 0x5831, 0x5821, 0x581d, 0x5820, 0x58f9, 0x58fa, 0x5960, 0x003f, - /* lead byte b4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x5a77, 0x5a9a, 0x5a7f, 0x5a92, 0x5a9b, 0x5aa7, 0x5b73, 0x5b71, - 0x5bd2, 0x5bcc, 0x5bd3, 0x5bd0, 0x5c0a, 0x5c0b, 0x5c31, 0x5d4c, - 0x5d50, 0x5d34, 0x5d47, 0x5dfd, 0x5e45, 0x5e3d, 0x5e40, 0x5e43, - 0x5e7e, 0x5eca, 0x5ec1, 0x5ec2, 0x5ec4, 0x5f3c, 0x5f6d, 0x5fa9, - 0x5faa, 0x5fa8, 0x60d1, 0x60e1, 0x60b2, 0x60b6, 0x60e0, 0x611c, - 0x6123, 0x60fa, 0x6115, 0x60f0, 0x60fb, 0x60f4, 0x6168, 0x60f1, - 0x610e, 0x60f6, 0x6109, 0x6100, 0x6112, 0x621f, 0x6249, 0x63a3, - 0x638c, 0x63cf, 0x63c0, 0x63e9, 0x63c9, 0x63c6, 0x63cd, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x63d2, 0x63e3, 0x63d0, 0x63e1, 0x63d6, 0x63ed, 0x63ee, - 0x6376, 0x63f4, 0x63ea, 0x63db, 0x6452, 0x63da, 0x63f9, 0x655e, - 0x6566, 0x6562, 0x6563, 0x6591, 0x6590, 0x65af, 0x666e, 0x6670, - 0x6674, 0x6676, 0x666f, 0x6691, 0x667a, 0x667e, 0x6677, 0x66fe, - 0x66ff, 0x671f, 0x671d, 0x68fa, 0x68d5, 0x68e0, 0x68d8, 0x68d7, - 0x6905, 0x68df, 0x68f5, 0x68ee, 0x68e7, 0x68f9, 0x68d2, 0x68f2, - 0x68e3, 0x68cb, 0x68cd, 0x690d, 0x6912, 0x690e, 0x68c9, 0x68da, - 0x696e, 0x68fb, 0x6b3e, 0x6b3a, 0x6b3d, 0x6b98, 0x6b96, 0x6bbc, - 0x6bef, 0x6c2e, 0x6c2f, 0x6c2c, 0x6e2f, 0x6e38, 0x6e54, 0x6e21, - 0x6e32, 0x6e67, 0x6e4a, 0x6e20, 0x6e25, 0x6e23, 0x6e1b, 0x6e5b, - 0x6e58, 0x6e24, 0x6e56, 0x6e6e, 0x6e2d, 0x6e26, 0x6e6f, 0x6e34, - 0x6e4d, 0x6e3a, 0x6e2c, 0x6e43, 0x6e1d, 0x6e3e, 0x6ecb, 0x003f, - /* lead byte b5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6e89, 0x6e19, 0x6e4e, 0x6e63, 0x6e44, 0x6e72, 0x6e69, 0x6e5f, - 0x7119, 0x711a, 0x7126, 0x7130, 0x7121, 0x7136, 0x716e, 0x711c, - 0x724c, 0x7284, 0x7280, 0x7336, 0x7325, 0x7334, 0x7329, 0x743a, - 0x742a, 0x7433, 0x7422, 0x7425, 0x7435, 0x7436, 0x7434, 0x742f, - 0x741b, 0x7426, 0x7428, 0x7525, 0x7526, 0x756b, 0x756a, 0x75e2, - 0x75db, 0x75e3, 0x75d9, 0x75d8, 0x75de, 0x75e0, 0x767b, 0x767c, - 0x7696, 0x7693, 0x76b4, 0x76dc, 0x774f, 0x77ed, 0x785d, 0x786c, - 0x786f, 0x7a0d, 0x7a08, 0x7a0b, 0x7a05, 0x7a00, 0x7a98, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7a97, 0x7a96, 0x7ae5, 0x7ae3, 0x7b49, 0x7b56, 0x7b46, - 0x7b50, 0x7b52, 0x7b54, 0x7b4d, 0x7b4b, 0x7b4f, 0x7b51, 0x7c9f, - 0x7ca5, 0x7d5e, 0x7d50, 0x7d68, 0x7d55, 0x7d2b, 0x7d6e, 0x7d72, - 0x7d61, 0x7d66, 0x7d62, 0x7d70, 0x7d73, 0x5584, 0x7fd4, 0x7fd5, - 0x800b, 0x8052, 0x8085, 0x8155, 0x8154, 0x814b, 0x8151, 0x814e, - 0x8139, 0x8146, 0x813e, 0x814c, 0x8153, 0x8174, 0x8212, 0x821c, - 0x83e9, 0x8403, 0x83f8, 0x840d, 0x83e0, 0x83c5, 0x840b, 0x83c1, - 0x83ef, 0x83f1, 0x83f4, 0x8457, 0x840a, 0x83f0, 0x840c, 0x83cc, - 0x83fd, 0x83f2, 0x83ca, 0x8438, 0x840e, 0x8404, 0x83dc, 0x8407, - 0x83d4, 0x83df, 0x865b, 0x86df, 0x86d9, 0x86ed, 0x86d4, 0x86db, - 0x86e4, 0x86d0, 0x86de, 0x8857, 0x88c1, 0x88c2, 0x88b1, 0x8983, - 0x8996, 0x8a3b, 0x8a60, 0x8a55, 0x8a5e, 0x8a3c, 0x8a41, 0x003f, - /* lead byte b6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8a54, 0x8a5b, 0x8a50, 0x8a46, 0x8a34, 0x8a3a, 0x8a36, 0x8a56, - 0x8c61, 0x8c82, 0x8caf, 0x8cbc, 0x8cb3, 0x8cbd, 0x8cc1, 0x8cbb, - 0x8cc0, 0x8cb4, 0x8cb7, 0x8cb6, 0x8cbf, 0x8cb8, 0x8d8a, 0x8d85, - 0x8d81, 0x8dce, 0x8ddd, 0x8dcb, 0x8dda, 0x8dd1, 0x8dcc, 0x8ddb, - 0x8dc6, 0x8efb, 0x8ef8, 0x8efc, 0x8f9c, 0x902e, 0x9035, 0x9031, - 0x9038, 0x9032, 0x9036, 0x9102, 0x90f5, 0x9109, 0x90fe, 0x9163, - 0x9165, 0x91cf, 0x9214, 0x9215, 0x9223, 0x9209, 0x921e, 0x920d, - 0x9210, 0x9207, 0x9211, 0x9594, 0x958f, 0x958b, 0x9591, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9593, 0x9592, 0x958e, 0x968a, 0x968e, 0x968b, 0x967d, - 0x9685, 0x9686, 0x968d, 0x9672, 0x9684, 0x96c1, 0x96c5, 0x96c4, - 0x96c6, 0x96c7, 0x96ef, 0x96f2, 0x97cc, 0x9805, 0x9806, 0x9808, - 0x98e7, 0x98ea, 0x98ef, 0x98e9, 0x98f2, 0x98ed, 0x99ae, 0x99ad, - 0x9ec3, 0x9ecd, 0x9ed1, 0x4e82, 0x50ad, 0x50b5, 0x50b2, 0x50b3, - 0x50c5, 0x50be, 0x50ac, 0x50b7, 0x50bb, 0x50af, 0x50c7, 0x527f, - 0x5277, 0x527d, 0x52df, 0x52e6, 0x52e4, 0x52e2, 0x52e3, 0x532f, - 0x55df, 0x55e8, 0x55d3, 0x55e6, 0x55ce, 0x55dc, 0x55c7, 0x55d1, - 0x55e3, 0x55e4, 0x55ef, 0x55da, 0x55e1, 0x55c5, 0x55c6, 0x55e5, - 0x55c9, 0x5712, 0x5713, 0x585e, 0x5851, 0x5858, 0x5857, 0x585a, - 0x5854, 0x586b, 0x584c, 0x586d, 0x584a, 0x5862, 0x5852, 0x584b, - 0x5967, 0x5ac1, 0x5ac9, 0x5acc, 0x5abe, 0x5abd, 0x5abc, 0x003f, - /* lead byte b7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x5ab3, 0x5ac2, 0x5ab2, 0x5d69, 0x5d6f, 0x5e4c, 0x5e79, 0x5ec9, - 0x5ec8, 0x5f12, 0x5f59, 0x5fac, 0x5fae, 0x611a, 0x610f, 0x6148, - 0x611f, 0x60f3, 0x611b, 0x60f9, 0x6101, 0x6108, 0x614e, 0x614c, - 0x6144, 0x614d, 0x613e, 0x6134, 0x6127, 0x610d, 0x6106, 0x6137, - 0x6221, 0x6222, 0x6413, 0x643e, 0x641e, 0x642a, 0x642d, 0x643d, - 0x642c, 0x640f, 0x641c, 0x6414, 0x640d, 0x6436, 0x6416, 0x6417, - 0x6406, 0x656c, 0x659f, 0x65b0, 0x6697, 0x6689, 0x6687, 0x6688, - 0x6696, 0x6684, 0x6698, 0x668d, 0x6703, 0x6994, 0x696d, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x695a, 0x6977, 0x6960, 0x6954, 0x6975, 0x6930, 0x6982, - 0x694a, 0x6968, 0x696b, 0x695e, 0x6953, 0x6979, 0x6986, 0x695d, - 0x6963, 0x695b, 0x6b47, 0x6b72, 0x6bc0, 0x6bbf, 0x6bd3, 0x6bfd, - 0x6ea2, 0x6eaf, 0x6ed3, 0x6eb6, 0x6ec2, 0x6e90, 0x6e9d, 0x6ec7, - 0x6ec5, 0x6ea5, 0x6e98, 0x6ebc, 0x6eba, 0x6eab, 0x6ed1, 0x6e96, - 0x6e9c, 0x6ec4, 0x6ed4, 0x6eaa, 0x6ea7, 0x6eb4, 0x714e, 0x7159, - 0x7169, 0x7164, 0x7149, 0x7167, 0x715c, 0x716c, 0x7166, 0x714c, - 0x7165, 0x715e, 0x7146, 0x7168, 0x7156, 0x723a, 0x7252, 0x7337, - 0x7345, 0x733f, 0x733e, 0x746f, 0x745a, 0x7455, 0x745f, 0x745e, - 0x7441, 0x743f, 0x7459, 0x745b, 0x745c, 0x7576, 0x7578, 0x7600, - 0x75f0, 0x7601, 0x75f2, 0x75f1, 0x75fa, 0x75ff, 0x75f4, 0x75f3, - 0x76de, 0x76df, 0x775b, 0x776b, 0x7766, 0x775e, 0x7763, 0x003f, - /* lead byte b8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7779, 0x776a, 0x776c, 0x775c, 0x7765, 0x7768, 0x7762, 0x77ee, - 0x788e, 0x78b0, 0x7897, 0x7898, 0x788c, 0x7889, 0x787c, 0x7891, - 0x7893, 0x787f, 0x797a, 0x797f, 0x7981, 0x842c, 0x79bd, 0x7a1c, - 0x7a1a, 0x7a20, 0x7a14, 0x7a1f, 0x7a1e, 0x7a9f, 0x7aa0, 0x7b77, - 0x7bc0, 0x7b60, 0x7b6e, 0x7b67, 0x7cb1, 0x7cb3, 0x7cb5, 0x7d93, - 0x7d79, 0x7d91, 0x7d81, 0x7d8f, 0x7d5b, 0x7f6e, 0x7f69, 0x7f6a, - 0x7f72, 0x7fa9, 0x7fa8, 0x7fa4, 0x8056, 0x8058, 0x8086, 0x8084, - 0x8171, 0x8170, 0x8178, 0x8165, 0x816e, 0x8173, 0x816b, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8179, 0x817a, 0x8166, 0x8205, 0x8247, 0x8482, 0x8477, - 0x843d, 0x8431, 0x8475, 0x8466, 0x846b, 0x8449, 0x846c, 0x845b, - 0x843c, 0x8435, 0x8461, 0x8463, 0x8469, 0x846d, 0x8446, 0x865e, - 0x865c, 0x865f, 0x86f9, 0x8713, 0x8708, 0x8707, 0x8700, 0x86fe, - 0x86fb, 0x8702, 0x8703, 0x8706, 0x870a, 0x8859, 0x88df, 0x88d4, - 0x88d9, 0x88dc, 0x88d8, 0x88dd, 0x88e1, 0x88ca, 0x88d5, 0x88d2, - 0x899c, 0x89e3, 0x8a6b, 0x8a72, 0x8a73, 0x8a66, 0x8a69, 0x8a70, - 0x8a87, 0x8a7c, 0x8a63, 0x8aa0, 0x8a71, 0x8a85, 0x8a6d, 0x8a62, - 0x8a6e, 0x8a6c, 0x8a79, 0x8a7b, 0x8a3e, 0x8a68, 0x8c62, 0x8c8a, - 0x8c89, 0x8cca, 0x8cc7, 0x8cc8, 0x8cc4, 0x8cb2, 0x8cc3, 0x8cc2, - 0x8cc5, 0x8de1, 0x8ddf, 0x8de8, 0x8def, 0x8df3, 0x8dfa, 0x8dea, - 0x8de4, 0x8de6, 0x8eb2, 0x8f03, 0x8f09, 0x8efe, 0x8f0a, 0x003f, - /* lead byte b9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8f9f, 0x8fb2, 0x904b, 0x904a, 0x9053, 0x9042, 0x9054, 0x903c, - 0x9055, 0x9050, 0x9047, 0x904f, 0x904e, 0x904d, 0x9051, 0x903e, - 0x9041, 0x9112, 0x9117, 0x916c, 0x916a, 0x9169, 0x91c9, 0x9237, - 0x9257, 0x9238, 0x923d, 0x9240, 0x923e, 0x925b, 0x924b, 0x9264, - 0x9251, 0x9234, 0x9249, 0x924d, 0x9245, 0x9239, 0x923f, 0x925a, - 0x9598, 0x9698, 0x9694, 0x9695, 0x96cd, 0x96cb, 0x96c9, 0x96ca, - 0x96f7, 0x96fb, 0x96f9, 0x96f6, 0x9756, 0x9774, 0x9776, 0x9810, - 0x9811, 0x9813, 0x980a, 0x9812, 0x980c, 0x98fc, 0x98f4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x98fd, 0x98fe, 0x99b3, 0x99b1, 0x99b4, 0x9ae1, 0x9ce9, - 0x9e82, 0x9f0e, 0x9f13, 0x9f20, 0x50e7, 0x50ee, 0x50e5, 0x50d6, - 0x50ed, 0x50da, 0x50d5, 0x50cf, 0x50d1, 0x50f1, 0x50ce, 0x50e9, - 0x5162, 0x51f3, 0x5283, 0x5282, 0x5331, 0x53ad, 0x55fe, 0x5600, - 0x561b, 0x5617, 0x55fd, 0x5614, 0x5606, 0x5609, 0x560d, 0x560e, - 0x55f7, 0x5616, 0x561f, 0x5608, 0x5610, 0x55f6, 0x5718, 0x5716, - 0x5875, 0x587e, 0x5883, 0x5893, 0x588a, 0x5879, 0x5885, 0x587d, - 0x58fd, 0x5925, 0x5922, 0x5924, 0x596a, 0x5969, 0x5ae1, 0x5ae6, - 0x5ae9, 0x5ad7, 0x5ad6, 0x5ad8, 0x5ae3, 0x5b75, 0x5bde, 0x5be7, - 0x5be1, 0x5be5, 0x5be6, 0x5be8, 0x5be2, 0x5be4, 0x5bdf, 0x5c0d, - 0x5c62, 0x5d84, 0x5d87, 0x5e5b, 0x5e63, 0x5e55, 0x5e57, 0x5e54, - 0x5ed3, 0x5ed6, 0x5f0a, 0x5f46, 0x5f70, 0x5fb9, 0x6147, 0x003f, - /* lead byte ba */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x613f, 0x614b, 0x6177, 0x6162, 0x6163, 0x615f, 0x615a, 0x6158, - 0x6175, 0x622a, 0x6487, 0x6458, 0x6454, 0x64a4, 0x6478, 0x645f, - 0x647a, 0x6451, 0x6467, 0x6434, 0x646d, 0x647b, 0x6572, 0x65a1, - 0x65d7, 0x65d6, 0x66a2, 0x66a8, 0x669d, 0x699c, 0x69a8, 0x6995, - 0x69c1, 0x69ae, 0x69d3, 0x69cb, 0x699b, 0x69b7, 0x69bb, 0x69ab, - 0x69b4, 0x69d0, 0x69cd, 0x69ad, 0x69cc, 0x69a6, 0x69c3, 0x69a3, - 0x6b49, 0x6b4c, 0x6c33, 0x6f33, 0x6f14, 0x6efe, 0x6f13, 0x6ef4, - 0x6f29, 0x6f3e, 0x6f20, 0x6f2c, 0x6f0f, 0x6f02, 0x6f22, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6eff, 0x6eef, 0x6f06, 0x6f31, 0x6f38, 0x6f32, 0x6f23, - 0x6f15, 0x6f2b, 0x6f2f, 0x6f88, 0x6f2a, 0x6eec, 0x6f01, 0x6ef2, - 0x6ecc, 0x6ef7, 0x7194, 0x7199, 0x717d, 0x718a, 0x7184, 0x7192, - 0x723e, 0x7292, 0x7296, 0x7344, 0x7350, 0x7464, 0x7463, 0x746a, - 0x7470, 0x746d, 0x7504, 0x7591, 0x7627, 0x760d, 0x760b, 0x7609, - 0x7613, 0x76e1, 0x76e3, 0x7784, 0x777d, 0x777f, 0x7761, 0x78c1, - 0x789f, 0x78a7, 0x78b3, 0x78a9, 0x78a3, 0x798e, 0x798f, 0x798d, - 0x7a2e, 0x7a31, 0x7aaa, 0x7aa9, 0x7aed, 0x7aef, 0x7ba1, 0x7b95, - 0x7b8b, 0x7b75, 0x7b97, 0x7b9d, 0x7b94, 0x7b8f, 0x7bb8, 0x7b87, - 0x7b84, 0x7cb9, 0x7cbd, 0x7cbe, 0x7dbb, 0x7db0, 0x7d9c, 0x7dbd, - 0x7dbe, 0x7da0, 0x7dca, 0x7db4, 0x7db2, 0x7db1, 0x7dba, 0x7da2, - 0x7dbf, 0x7db5, 0x7db8, 0x7dad, 0x7dd2, 0x7dc7, 0x7dac, 0x003f, - /* lead byte bb */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7f70, 0x7fe0, 0x7fe1, 0x7fdf, 0x805e, 0x805a, 0x8087, 0x8150, - 0x8180, 0x818f, 0x8188, 0x818a, 0x817f, 0x8182, 0x81e7, 0x81fa, - 0x8207, 0x8214, 0x821e, 0x824b, 0x84c9, 0x84bf, 0x84c6, 0x84c4, - 0x8499, 0x849e, 0x84b2, 0x849c, 0x84cb, 0x84b8, 0x84c0, 0x84d3, - 0x8490, 0x84bc, 0x84d1, 0x84ca, 0x873f, 0x871c, 0x873b, 0x8722, - 0x8725, 0x8734, 0x8718, 0x8755, 0x8737, 0x8729, 0x88f3, 0x8902, - 0x88f4, 0x88f9, 0x88f8, 0x88fd, 0x88e8, 0x891a, 0x88ef, 0x8aa6, - 0x8a8c, 0x8a9e, 0x8aa3, 0x8a8d, 0x8aa1, 0x8a93, 0x8aa4, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8aaa, 0x8aa5, 0x8aa8, 0x8a98, 0x8a91, 0x8a9a, 0x8aa7, - 0x8c6a, 0x8c8d, 0x8c8c, 0x8cd3, 0x8cd1, 0x8cd2, 0x8d6b, 0x8d99, - 0x8d95, 0x8dfc, 0x8f14, 0x8f12, 0x8f15, 0x8f13, 0x8fa3, 0x9060, - 0x9058, 0x905c, 0x9063, 0x9059, 0x905e, 0x9062, 0x905d, 0x905b, - 0x9119, 0x9118, 0x911e, 0x9175, 0x9178, 0x9177, 0x9174, 0x9278, - 0x9280, 0x9285, 0x9298, 0x9296, 0x927b, 0x9293, 0x929c, 0x92a8, - 0x927c, 0x9291, 0x95a1, 0x95a8, 0x95a9, 0x95a3, 0x95a5, 0x95a4, - 0x9699, 0x969c, 0x969b, 0x96cc, 0x96d2, 0x9700, 0x977c, 0x9785, - 0x97f6, 0x9817, 0x9818, 0x98af, 0x98b1, 0x9903, 0x9905, 0x990c, - 0x9909, 0x99c1, 0x9aaf, 0x9ab0, 0x9ae6, 0x9b41, 0x9b42, 0x9cf4, - 0x9cf6, 0x9cf3, 0x9ebc, 0x9f3b, 0x9f4a, 0x5104, 0x5100, 0x50fb, - 0x50f5, 0x50f9, 0x5102, 0x5108, 0x5109, 0x5105, 0x51dc, 0x003f, - /* lead byte bc */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x5287, 0x5288, 0x5289, 0x528d, 0x528a, 0x52f0, 0x53b2, 0x562e, - 0x563b, 0x5639, 0x5632, 0x563f, 0x5634, 0x5629, 0x5653, 0x564e, - 0x5657, 0x5674, 0x5636, 0x562f, 0x5630, 0x5880, 0x589f, 0x589e, - 0x58b3, 0x589c, 0x58ae, 0x58a9, 0x58a6, 0x596d, 0x5b09, 0x5afb, - 0x5b0b, 0x5af5, 0x5b0c, 0x5b08, 0x5bee, 0x5bec, 0x5be9, 0x5beb, - 0x5c64, 0x5c65, 0x5d9d, 0x5d94, 0x5e62, 0x5e5f, 0x5e61, 0x5ee2, - 0x5eda, 0x5edf, 0x5edd, 0x5ee3, 0x5ee0, 0x5f48, 0x5f71, 0x5fb7, - 0x5fb5, 0x6176, 0x6167, 0x616e, 0x615d, 0x6155, 0x6182, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x617c, 0x6170, 0x616b, 0x617e, 0x61a7, 0x6190, 0x61ab, - 0x618e, 0x61ac, 0x619a, 0x61a4, 0x6194, 0x61ae, 0x622e, 0x6469, - 0x646f, 0x6479, 0x649e, 0x64b2, 0x6488, 0x6490, 0x64b0, 0x64a5, - 0x6493, 0x6495, 0x64a9, 0x6492, 0x64ae, 0x64ad, 0x64ab, 0x649a, - 0x64ac, 0x6499, 0x64a2, 0x64b3, 0x6575, 0x6577, 0x6578, 0x66ae, - 0x66ab, 0x66b4, 0x66b1, 0x6a23, 0x6a1f, 0x69e8, 0x6a01, 0x6a1e, - 0x6a19, 0x69fd, 0x6a21, 0x6a13, 0x6a0a, 0x69f3, 0x6a02, 0x6a05, - 0x69ed, 0x6a11, 0x6b50, 0x6b4e, 0x6ba4, 0x6bc5, 0x6bc6, 0x6f3f, - 0x6f7c, 0x6f84, 0x6f51, 0x6f66, 0x6f54, 0x6f86, 0x6f6d, 0x6f5b, - 0x6f78, 0x6f6e, 0x6f8e, 0x6f7a, 0x6f70, 0x6f64, 0x6f97, 0x6f58, - 0x6ed5, 0x6f6f, 0x6f60, 0x6f5f, 0x719f, 0x71ac, 0x71b1, 0x71a8, - 0x7256, 0x729b, 0x734e, 0x7357, 0x7469, 0x748b, 0x7483, 0x003f, - /* lead byte bd */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x747e, 0x7480, 0x757f, 0x7620, 0x7629, 0x761f, 0x7624, 0x7626, - 0x7621, 0x7622, 0x769a, 0x76ba, 0x76e4, 0x778e, 0x7787, 0x778c, - 0x7791, 0x778b, 0x78cb, 0x78c5, 0x78ba, 0x78ca, 0x78be, 0x78d5, - 0x78bc, 0x78d0, 0x7a3f, 0x7a3c, 0x7a40, 0x7a3d, 0x7a37, 0x7a3b, - 0x7aaf, 0x7aae, 0x7bad, 0x7bb1, 0x7bc4, 0x7bb4, 0x7bc6, 0x7bc7, - 0x7bc1, 0x7ba0, 0x7bcc, 0x7cca, 0x7de0, 0x7df4, 0x7def, 0x7dfb, - 0x7dd8, 0x7dec, 0x7ddd, 0x7de8, 0x7de3, 0x7dda, 0x7dde, 0x7de9, - 0x7d9e, 0x7dd9, 0x7df2, 0x7df9, 0x7f75, 0x7f77, 0x7faf, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7fe9, 0x8026, 0x819b, 0x819c, 0x819d, 0x81a0, 0x819a, - 0x8198, 0x8517, 0x853d, 0x851a, 0x84ee, 0x852c, 0x852d, 0x8513, - 0x8511, 0x8523, 0x8521, 0x8514, 0x84ec, 0x8525, 0x84ff, 0x8506, - 0x8782, 0x8774, 0x8776, 0x8760, 0x8766, 0x8778, 0x8768, 0x8759, - 0x8757, 0x874c, 0x8753, 0x885b, 0x885d, 0x8910, 0x8907, 0x8912, - 0x8913, 0x8915, 0x890a, 0x8abc, 0x8ad2, 0x8ac7, 0x8ac4, 0x8a95, - 0x8acb, 0x8af8, 0x8ab2, 0x8ac9, 0x8ac2, 0x8abf, 0x8ab0, 0x8ad6, - 0x8acd, 0x8ab6, 0x8ab9, 0x8adb, 0x8c4c, 0x8c4e, 0x8c6c, 0x8ce0, - 0x8cde, 0x8ce6, 0x8ce4, 0x8cec, 0x8ced, 0x8ce2, 0x8ce3, 0x8cdc, - 0x8cea, 0x8ce1, 0x8d6d, 0x8d9f, 0x8da3, 0x8e2b, 0x8e10, 0x8e1d, - 0x8e22, 0x8e0f, 0x8e29, 0x8e1f, 0x8e21, 0x8e1e, 0x8eba, 0x8f1d, - 0x8f1b, 0x8f1f, 0x8f29, 0x8f26, 0x8f2a, 0x8f1c, 0x8f1e, 0x003f, - /* lead byte be */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8f25, 0x9069, 0x906e, 0x9068, 0x906d, 0x9077, 0x9130, 0x912d, - 0x9127, 0x9131, 0x9187, 0x9189, 0x918b, 0x9183, 0x92c5, 0x92bb, - 0x92b7, 0x92ea, 0x92ac, 0x92e4, 0x92c1, 0x92b3, 0x92bc, 0x92d2, - 0x92c7, 0x92f0, 0x92b2, 0x95ad, 0x95b1, 0x9704, 0x9706, 0x9707, - 0x9709, 0x9760, 0x978d, 0x978b, 0x978f, 0x9821, 0x982b, 0x981c, - 0x98b3, 0x990a, 0x9913, 0x9912, 0x9918, 0x99dd, 0x99d0, 0x99df, - 0x99db, 0x99d1, 0x99d5, 0x99d2, 0x99d9, 0x9ab7, 0x9aee, 0x9aef, - 0x9b27, 0x9b45, 0x9b44, 0x9b77, 0x9b6f, 0x9d06, 0x9d09, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9d03, 0x9ea9, 0x9ebe, 0x9ece, 0x58a8, 0x9f52, 0x5112, - 0x5118, 0x5114, 0x5110, 0x5115, 0x5180, 0x51aa, 0x51dd, 0x5291, - 0x5293, 0x52f3, 0x5659, 0x566b, 0x5679, 0x5669, 0x5664, 0x5678, - 0x566a, 0x5668, 0x5665, 0x5671, 0x566f, 0x566c, 0x5662, 0x5676, - 0x58c1, 0x58be, 0x58c7, 0x58c5, 0x596e, 0x5b1d, 0x5b34, 0x5b78, - 0x5bf0, 0x5c0e, 0x5f4a, 0x61b2, 0x6191, 0x61a9, 0x618a, 0x61cd, - 0x61b6, 0x61be, 0x61ca, 0x61c8, 0x6230, 0x64c5, 0x64c1, 0x64cb, - 0x64bb, 0x64bc, 0x64da, 0x64c4, 0x64c7, 0x64c2, 0x64cd, 0x64bf, - 0x64d2, 0x64d4, 0x64be, 0x6574, 0x66c6, 0x66c9, 0x66b9, 0x66c4, - 0x66c7, 0x66b8, 0x6a3d, 0x6a38, 0x6a3a, 0x6a59, 0x6a6b, 0x6a58, - 0x6a39, 0x6a44, 0x6a62, 0x6a61, 0x6a4b, 0x6a47, 0x6a35, 0x6a5f, - 0x6a48, 0x6b59, 0x6b77, 0x6c05, 0x6fc2, 0x6fb1, 0x6fa1, 0x003f, - /* lead byte bf */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6fc3, 0x6fa4, 0x6fc1, 0x6fa7, 0x6fb3, 0x6fc0, 0x6fb9, 0x6fb6, - 0x6fa6, 0x6fa0, 0x6fb4, 0x71be, 0x71c9, 0x71d0, 0x71d2, 0x71c8, - 0x71d5, 0x71b9, 0x71ce, 0x71d9, 0x71dc, 0x71c3, 0x71c4, 0x7368, - 0x749c, 0x74a3, 0x7498, 0x749f, 0x749e, 0x74e2, 0x750c, 0x750d, - 0x7634, 0x7638, 0x763a, 0x76e7, 0x76e5, 0x77a0, 0x779e, 0x779f, - 0x77a5, 0x78e8, 0x78da, 0x78ec, 0x78e7, 0x79a6, 0x7a4d, 0x7a4e, - 0x7a46, 0x7a4c, 0x7a4b, 0x7aba, 0x7bd9, 0x7c11, 0x7bc9, 0x7be4, - 0x7bdb, 0x7be1, 0x7be9, 0x7be6, 0x7cd5, 0x7cd6, 0x7e0a, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7e11, 0x7e08, 0x7e1b, 0x7e23, 0x7e1e, 0x7e1d, 0x7e09, - 0x7e10, 0x7f79, 0x7fb2, 0x7ff0, 0x7ff1, 0x7fee, 0x8028, 0x81b3, - 0x81a9, 0x81a8, 0x81fb, 0x8208, 0x8258, 0x8259, 0x854a, 0x8559, - 0x8548, 0x8568, 0x8569, 0x8543, 0x8549, 0x856d, 0x856a, 0x855e, - 0x8783, 0x879f, 0x879e, 0x87a2, 0x878d, 0x8861, 0x892a, 0x8932, - 0x8925, 0x892b, 0x8921, 0x89aa, 0x89a6, 0x8ae6, 0x8afa, 0x8aeb, - 0x8af1, 0x8b00, 0x8adc, 0x8ae7, 0x8aee, 0x8afe, 0x8b01, 0x8b02, - 0x8af7, 0x8aed, 0x8af3, 0x8af6, 0x8afc, 0x8c6b, 0x8c6d, 0x8c93, - 0x8cf4, 0x8e44, 0x8e31, 0x8e34, 0x8e42, 0x8e39, 0x8e35, 0x8f3b, - 0x8f2f, 0x8f38, 0x8f33, 0x8fa8, 0x8fa6, 0x9075, 0x9074, 0x9078, - 0x9072, 0x907c, 0x907a, 0x9134, 0x9192, 0x9320, 0x9336, 0x92f8, - 0x9333, 0x932f, 0x9322, 0x92fc, 0x932b, 0x9304, 0x931a, 0x003f, - /* lead byte c0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9310, 0x9326, 0x9321, 0x9315, 0x932e, 0x9319, 0x95bb, 0x96a7, - 0x96a8, 0x96aa, 0x96d5, 0x970e, 0x9711, 0x9716, 0x970d, 0x9713, - 0x970f, 0x975b, 0x975c, 0x9766, 0x9798, 0x9830, 0x9838, 0x983b, - 0x9837, 0x982d, 0x9839, 0x9824, 0x9910, 0x9928, 0x991e, 0x991b, - 0x9921, 0x991a, 0x99ed, 0x99e2, 0x99f1, 0x9ab8, 0x9abc, 0x9afb, - 0x9aed, 0x9b28, 0x9b91, 0x9d15, 0x9d23, 0x9d26, 0x9d28, 0x9d12, - 0x9d1b, 0x9ed8, 0x9ed4, 0x9f8d, 0x9f9c, 0x512a, 0x511f, 0x5121, - 0x5132, 0x52f5, 0x568e, 0x5680, 0x5690, 0x5685, 0x5687, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x568f, 0x58d5, 0x58d3, 0x58d1, 0x58ce, 0x5b30, 0x5b2a, - 0x5b24, 0x5b7a, 0x5c37, 0x5c68, 0x5dbc, 0x5dba, 0x5dbd, 0x5db8, - 0x5e6b, 0x5f4c, 0x5fbd, 0x61c9, 0x61c2, 0x61c7, 0x61e6, 0x61cb, - 0x6232, 0x6234, 0x64ce, 0x64ca, 0x64d8, 0x64e0, 0x64f0, 0x64e6, - 0x64ec, 0x64f1, 0x64e2, 0x64ed, 0x6582, 0x6583, 0x66d9, 0x66d6, - 0x6a80, 0x6a94, 0x6a84, 0x6aa2, 0x6a9c, 0x6adb, 0x6aa3, 0x6a7e, - 0x6a97, 0x6a90, 0x6aa0, 0x6b5c, 0x6bae, 0x6bda, 0x6c08, 0x6fd8, - 0x6ff1, 0x6fdf, 0x6fe0, 0x6fdb, 0x6fe4, 0x6feb, 0x6fef, 0x6f80, - 0x6fec, 0x6fe1, 0x6fe9, 0x6fd5, 0x6fee, 0x6ff0, 0x71e7, 0x71df, - 0x71ee, 0x71e6, 0x71e5, 0x71ed, 0x71ec, 0x71f4, 0x71e0, 0x7235, - 0x7246, 0x7370, 0x7372, 0x74a9, 0x74b0, 0x74a6, 0x74a8, 0x7646, - 0x7642, 0x764c, 0x76ea, 0x77b3, 0x77aa, 0x77b0, 0x77ac, 0x003f, - /* lead byte c1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x77a7, 0x77ad, 0x77ef, 0x78f7, 0x78fa, 0x78f4, 0x78ef, 0x7901, - 0x79a7, 0x79aa, 0x7a57, 0x7abf, 0x7c07, 0x7c0d, 0x7bfe, 0x7bf7, - 0x7c0c, 0x7be0, 0x7ce0, 0x7cdc, 0x7cde, 0x7ce2, 0x7cdf, 0x7cd9, - 0x7cdd, 0x7e2e, 0x7e3e, 0x7e46, 0x7e37, 0x7e32, 0x7e43, 0x7e2b, - 0x7e3d, 0x7e31, 0x7e45, 0x7e41, 0x7e34, 0x7e39, 0x7e48, 0x7e35, - 0x7e3f, 0x7e2f, 0x7f44, 0x7ff3, 0x7ffc, 0x8071, 0x8072, 0x8070, - 0x806f, 0x8073, 0x81c6, 0x81c3, 0x81ba, 0x81c2, 0x81c0, 0x81bf, - 0x81bd, 0x81c9, 0x81be, 0x81e8, 0x8209, 0x8271, 0x85aa, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8584, 0x857e, 0x859c, 0x8591, 0x8594, 0x85af, 0x859b, - 0x8587, 0x85a8, 0x858a, 0x8667, 0x87c0, 0x87d1, 0x87b3, 0x87d2, - 0x87c6, 0x87ab, 0x87bb, 0x87ba, 0x87c8, 0x87cb, 0x893b, 0x8936, - 0x8944, 0x8938, 0x893d, 0x89ac, 0x8b0e, 0x8b17, 0x8b19, 0x8b1b, - 0x8b0a, 0x8b20, 0x8b1d, 0x8b04, 0x8b10, 0x8c41, 0x8c3f, 0x8c73, - 0x8cfa, 0x8cfd, 0x8cfc, 0x8cf8, 0x8cfb, 0x8da8, 0x8e49, 0x8e4b, - 0x8e48, 0x8e4a, 0x8f44, 0x8f3e, 0x8f42, 0x8f45, 0x8f3f, 0x907f, - 0x907d, 0x9084, 0x9081, 0x9082, 0x9080, 0x9139, 0x91a3, 0x919e, - 0x919c, 0x934d, 0x9382, 0x9328, 0x9375, 0x934a, 0x9365, 0x934b, - 0x9318, 0x937e, 0x936c, 0x935b, 0x9370, 0x935a, 0x9354, 0x95ca, - 0x95cb, 0x95cc, 0x95c8, 0x95c6, 0x96b1, 0x96b8, 0x96d6, 0x971c, - 0x971e, 0x97a0, 0x97d3, 0x9846, 0x98b6, 0x9935, 0x9a01, 0x003f, - /* lead byte c2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x99ff, 0x9bae, 0x9bab, 0x9baa, 0x9bad, 0x9d3b, 0x9d3f, 0x9e8b, - 0x9ecf, 0x9ede, 0x9edc, 0x9edd, 0x9edb, 0x9f3e, 0x9f4b, 0x53e2, - 0x5695, 0x56ae, 0x58d9, 0x58d8, 0x5b38, 0x5f5d, 0x61e3, 0x6233, - 0x64f4, 0x64f2, 0x64fe, 0x6506, 0x64fa, 0x64fb, 0x64f7, 0x65b7, - 0x66dc, 0x6726, 0x6ab3, 0x6aac, 0x6ac3, 0x6abb, 0x6ab8, 0x6ac2, - 0x6aae, 0x6aaf, 0x6b5f, 0x6b78, 0x6baf, 0x7009, 0x700b, 0x6ffe, - 0x7006, 0x6ffa, 0x7011, 0x700f, 0x71fb, 0x71fc, 0x71fe, 0x71f8, - 0x7377, 0x7375, 0x74a7, 0x74bf, 0x7515, 0x7656, 0x7658, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7652, 0x77bd, 0x77bf, 0x77bb, 0x77bc, 0x790e, 0x79ae, - 0x7a61, 0x7a62, 0x7a60, 0x7ac4, 0x7ac5, 0x7c2b, 0x7c27, 0x7c2a, - 0x7c1e, 0x7c23, 0x7c21, 0x7ce7, 0x7e54, 0x7e55, 0x7e5e, 0x7e5a, - 0x7e61, 0x7e52, 0x7e59, 0x7f48, 0x7ff9, 0x7ffb, 0x8077, 0x8076, - 0x81cd, 0x81cf, 0x820a, 0x85cf, 0x85a9, 0x85cd, 0x85d0, 0x85c9, - 0x85b0, 0x85ba, 0x85b9, 0x85a6, 0x87ef, 0x87ec, 0x87f2, 0x87e0, - 0x8986, 0x89b2, 0x89f4, 0x8b28, 0x8b39, 0x8b2c, 0x8b2b, 0x8c50, - 0x8d05, 0x8e59, 0x8e63, 0x8e66, 0x8e64, 0x8e5f, 0x8e55, 0x8ec0, - 0x8f49, 0x8f4d, 0x9087, 0x9083, 0x9088, 0x91ab, 0x91ac, 0x91d0, - 0x9394, 0x938a, 0x9396, 0x93a2, 0x93b3, 0x93ae, 0x93ac, 0x93b0, - 0x9398, 0x939a, 0x9397, 0x95d4, 0x95d6, 0x95d0, 0x95d5, 0x96e2, - 0x96dc, 0x96d9, 0x96db, 0x96de, 0x9724, 0x97a3, 0x97a6, 0x003f, - /* lead byte c3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x97ad, 0x97f9, 0x984d, 0x984f, 0x984c, 0x984e, 0x9853, 0x98ba, - 0x993e, 0x993f, 0x993d, 0x992e, 0x99a5, 0x9a0e, 0x9ac1, 0x9b03, - 0x9b06, 0x9b4f, 0x9b4e, 0x9b4d, 0x9bca, 0x9bc9, 0x9bfd, 0x9bc8, - 0x9bc0, 0x9d51, 0x9d5d, 0x9d60, 0x9ee0, 0x9f15, 0x9f2c, 0x5133, - 0x56a5, 0x58de, 0x58df, 0x58e2, 0x5bf5, 0x9f90, 0x5eec, 0x61f2, - 0x61f7, 0x61f6, 0x61f5, 0x6500, 0x650f, 0x66e0, 0x66dd, 0x6ae5, - 0x6add, 0x6ada, 0x6ad3, 0x701b, 0x701f, 0x7028, 0x701a, 0x701d, - 0x7015, 0x7018, 0x7206, 0x720d, 0x7258, 0x72a2, 0x7378, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x737a, 0x74bd, 0x74ca, 0x74e3, 0x7587, 0x7586, 0x765f, - 0x7661, 0x77c7, 0x7919, 0x79b1, 0x7a6b, 0x7a69, 0x7c3e, 0x7c3f, - 0x7c38, 0x7c3d, 0x7c37, 0x7c40, 0x7e6b, 0x7e6d, 0x7e79, 0x7e69, - 0x7e6a, 0x7f85, 0x7e73, 0x7fb6, 0x7fb9, 0x7fb8, 0x81d8, 0x85e9, - 0x85dd, 0x85ea, 0x85d5, 0x85e4, 0x85e5, 0x85f7, 0x87fb, 0x8805, - 0x880d, 0x87f9, 0x87fe, 0x8960, 0x895f, 0x8956, 0x895e, 0x8b41, - 0x8b5c, 0x8b58, 0x8b49, 0x8b5a, 0x8b4e, 0x8b4f, 0x8b46, 0x8b59, - 0x8d08, 0x8d0a, 0x8e7c, 0x8e72, 0x8e87, 0x8e76, 0x8e6c, 0x8e7a, - 0x8e74, 0x8f54, 0x8f4e, 0x8fad, 0x908a, 0x908b, 0x91b1, 0x91ae, - 0x93e1, 0x93d1, 0x93df, 0x93c3, 0x93c8, 0x93dc, 0x93dd, 0x93d6, - 0x93e2, 0x93cd, 0x93d8, 0x93e4, 0x93d7, 0x93e8, 0x95dc, 0x96b4, - 0x96e3, 0x972a, 0x9727, 0x9761, 0x97dc, 0x97fb, 0x985e, 0x003f, - /* lead byte c4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x9858, 0x985b, 0x98bc, 0x9945, 0x9949, 0x9a16, 0x9a19, 0x9b0d, - 0x9be8, 0x9be7, 0x9bd6, 0x9bdb, 0x9d89, 0x9d61, 0x9d72, 0x9d6a, - 0x9d6c, 0x9e92, 0x9e97, 0x9e93, 0x9eb4, 0x52f8, 0x56a8, 0x56b7, - 0x56b6, 0x56b4, 0x56bc, 0x58e4, 0x5b40, 0x5b43, 0x5b7d, 0x5bf6, - 0x5dc9, 0x61f8, 0x61fa, 0x6518, 0x6514, 0x6519, 0x66e6, 0x6727, - 0x6aec, 0x703e, 0x7030, 0x7032, 0x7210, 0x737b, 0x74cf, 0x7662, - 0x7665, 0x7926, 0x792a, 0x792c, 0x792b, 0x7ac7, 0x7af6, 0x7c4c, - 0x7c43, 0x7c4d, 0x7cef, 0x7cf0, 0x8fae, 0x7e7d, 0x7e7c, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7e82, 0x7f4c, 0x8000, 0x81da, 0x8266, 0x85fb, 0x85f9, - 0x8611, 0x85fa, 0x8606, 0x860b, 0x8607, 0x860a, 0x8814, 0x8815, - 0x8964, 0x89ba, 0x89f8, 0x8b70, 0x8b6c, 0x8b66, 0x8b6f, 0x8b5f, - 0x8b6b, 0x8d0f, 0x8d0d, 0x8e89, 0x8e81, 0x8e85, 0x8e82, 0x91b4, - 0x91cb, 0x9418, 0x9403, 0x93fd, 0x95e1, 0x9730, 0x98c4, 0x9952, - 0x9951, 0x99a8, 0x9a2b, 0x9a30, 0x9a37, 0x9a35, 0x9c13, 0x9c0d, - 0x9e79, 0x9eb5, 0x9ee8, 0x9f2f, 0x9f5f, 0x9f63, 0x9f61, 0x5137, - 0x5138, 0x56c1, 0x56c0, 0x56c2, 0x5914, 0x5c6c, 0x5dcd, 0x61fc, - 0x61fe, 0x651d, 0x651c, 0x6595, 0x66e9, 0x6afb, 0x6b04, 0x6afa, - 0x6bb2, 0x704c, 0x721b, 0x72a7, 0x74d6, 0x74d4, 0x7669, 0x77d3, - 0x7c50, 0x7e8f, 0x7e8c, 0x7fbc, 0x8617, 0x862d, 0x861a, 0x8823, - 0x8822, 0x8821, 0x881f, 0x896a, 0x896c, 0x89bd, 0x8b74, 0x003f, - /* lead byte c5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8b77, 0x8b7d, 0x8d13, 0x8e8a, 0x8e8d, 0x8e8b, 0x8f5f, 0x8faf, - 0x91ba, 0x942e, 0x9433, 0x9435, 0x943a, 0x9438, 0x9432, 0x942b, - 0x95e2, 0x9738, 0x9739, 0x9732, 0x97ff, 0x9867, 0x9865, 0x9957, - 0x9a45, 0x9a43, 0x9a40, 0x9a3e, 0x9acf, 0x9b54, 0x9b51, 0x9c2d, - 0x9c25, 0x9daf, 0x9db4, 0x9dc2, 0x9db8, 0x9e9d, 0x9eef, 0x9f19, - 0x9f5c, 0x9f66, 0x9f67, 0x513c, 0x513b, 0x56c8, 0x56ca, 0x56c9, - 0x5b7f, 0x5dd4, 0x5dd2, 0x5f4e, 0x61ff, 0x6524, 0x6b0a, 0x6b61, - 0x7051, 0x7058, 0x7380, 0x74e4, 0x758a, 0x766e, 0x766c, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x79b3, 0x7c60, 0x7c5f, 0x807e, 0x807d, 0x81df, 0x8972, - 0x896f, 0x89fc, 0x8b80, 0x8d16, 0x8d17, 0x8e91, 0x8e93, 0x8f61, - 0x9148, 0x9444, 0x9451, 0x9452, 0x973d, 0x973e, 0x97c3, 0x97c1, - 0x986b, 0x9955, 0x9a55, 0x9a4d, 0x9ad2, 0x9b1a, 0x9c49, 0x9c31, - 0x9c3e, 0x9c3b, 0x9dd3, 0x9dd7, 0x9f34, 0x9f6c, 0x9f6a, 0x9f94, - 0x56cc, 0x5dd6, 0x6200, 0x6523, 0x652b, 0x652a, 0x66ec, 0x6b10, - 0x74da, 0x7aca, 0x7c64, 0x7c63, 0x7c65, 0x7e93, 0x7e96, 0x7e94, - 0x81e2, 0x8638, 0x863f, 0x8831, 0x8b8a, 0x9090, 0x908f, 0x9463, - 0x9460, 0x9464, 0x9768, 0x986f, 0x995c, 0x9a5a, 0x9a5b, 0x9a57, - 0x9ad3, 0x9ad4, 0x9ad1, 0x9c54, 0x9c57, 0x9c56, 0x9de5, 0x9e9f, - 0x9ef4, 0x56d1, 0x58e9, 0x652c, 0x705e, 0x7671, 0x7672, 0x77d7, - 0x7f50, 0x7f88, 0x8836, 0x8839, 0x8862, 0x8b93, 0x8b92, 0x003f, - /* lead byte c6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8b96, 0x8277, 0x8d1b, 0x91c0, 0x946a, 0x9742, 0x9748, 0x9744, - 0x97c6, 0x9870, 0x9a5f, 0x9b22, 0x9b58, 0x9c5f, 0x9df9, 0x9dfa, - 0x9e7c, 0x9e7d, 0x9f07, 0x9f77, 0x9f72, 0x5ef3, 0x6b16, 0x7063, - 0x7c6c, 0x7c6e, 0x883b, 0x89c0, 0x8ea1, 0x91c1, 0x9472, 0x9470, - 0x9871, 0x995e, 0x9ad6, 0x9b23, 0x9ecc, 0x7064, 0x77da, 0x8b9a, - 0x9477, 0x97c9, 0x9a62, 0x9a65, 0x7e9c, 0x8b9c, 0x8eaa, 0x91c5, - 0x947d, 0x947e, 0x947c, 0x9c77, 0x9c78, 0x9ef7, 0x8c54, 0x947f, - 0x9e1a, 0x7228, 0x9a6a, 0x9b31, 0x9e1b, 0x9e1e, 0x7c72, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf6b1, 0xf6b2, 0xf6b3, 0xf6b4, 0xf6b5, 0xf6b6, 0xf6b7, - 0xf6b8, 0xf6b9, 0xf6ba, 0xf6bb, 0xf6bc, 0xf6bd, 0xf6be, 0xf6bf, - 0xf6c0, 0xf6c1, 0xf6c2, 0xf6c3, 0xf6c4, 0xf6c5, 0xf6c6, 0xf6c7, - 0xf6c8, 0xf6c9, 0xf6ca, 0xf6cb, 0xf6cc, 0xf6cd, 0xf6ce, 0xf6cf, - 0xf6d0, 0xf6d1, 0xf6d2, 0xf6d3, 0xf6d4, 0xf6d5, 0xf6d6, 0xf6d7, - 0xf6d8, 0xf6d9, 0xf6da, 0xf6db, 0xf6dc, 0xf6dd, 0xf6de, 0xf6df, - 0xf6e0, 0xf6e1, 0xf6e2, 0xf6e3, 0xf6e4, 0xf6e5, 0xf6e6, 0xf6e7, - 0xf6e8, 0xf6e9, 0xf6ea, 0xf6eb, 0xf6ec, 0xf6ed, 0xf6ee, 0xf6ef, - 0xf6f0, 0xf6f1, 0xf6f2, 0xf6f3, 0xf6f4, 0xf6f5, 0xf6f6, 0xf6f7, - 0xf6f8, 0xf6f9, 0xf6fa, 0xf6fb, 0xf6fc, 0xf6fd, 0xf6fe, 0xf6ff, - 0xf700, 0xf701, 0xf702, 0xf703, 0xf704, 0xf705, 0xf706, 0xf707, - 0xf708, 0xf709, 0xf70a, 0xf70b, 0xf70c, 0xf70d, 0xf70e, 0x003f, - /* lead byte c7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf70f, 0xf710, 0xf711, 0xf712, 0xf713, 0xf714, 0xf715, 0xf716, - 0xf717, 0xf718, 0xf719, 0xf71a, 0xf71b, 0xf71c, 0xf71d, 0xf71e, - 0xf71f, 0xf720, 0xf721, 0xf722, 0xf723, 0xf724, 0xf725, 0xf726, - 0xf727, 0xf728, 0xf729, 0xf72a, 0xf72b, 0xf72c, 0xf72d, 0xf72e, - 0xf72f, 0xf730, 0xf731, 0xf732, 0xf733, 0xf734, 0xf735, 0xf736, - 0xf737, 0xf738, 0xf739, 0xf73a, 0xf73b, 0xf73c, 0xf73d, 0xf73e, - 0xf73f, 0xf740, 0xf741, 0xf742, 0xf743, 0xf744, 0xf745, 0xf746, - 0xf747, 0xf748, 0xf749, 0xf74a, 0xf74b, 0xf74c, 0xf74d, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf74e, 0xf74f, 0xf750, 0xf751, 0xf752, 0xf753, 0xf754, - 0xf755, 0xf756, 0xf757, 0xf758, 0xf759, 0xf75a, 0xf75b, 0xf75c, - 0xf75d, 0xf75e, 0xf75f, 0xf760, 0xf761, 0xf762, 0xf763, 0xf764, - 0xf765, 0xf766, 0xf767, 0xf768, 0xf769, 0xf76a, 0xf76b, 0xf76c, - 0xf76d, 0xf76e, 0xf76f, 0xf770, 0xf771, 0xf772, 0xf773, 0xf774, - 0xf775, 0xf776, 0xf777, 0xf778, 0xf779, 0xf77a, 0xf77b, 0xf77c, - 0xf77d, 0xf77e, 0xf77f, 0xf780, 0xf781, 0xf782, 0xf783, 0xf784, - 0xf785, 0xf786, 0xf787, 0xf788, 0xf789, 0xf78a, 0xf78b, 0xf78c, - 0xf78d, 0xf78e, 0xf78f, 0xf790, 0xf791, 0xf792, 0xf793, 0xf794, - 0xf795, 0xf796, 0xf797, 0xf798, 0xf799, 0xf79a, 0xf79b, 0xf79c, - 0xf79d, 0xf79e, 0xf79f, 0xf7a0, 0xf7a1, 0xf7a2, 0xf7a3, 0xf7a4, - 0xf7a5, 0xf7a6, 0xf7a7, 0xf7a8, 0xf7a9, 0xf7aa, 0xf7ab, 0x003f, - /* lead byte c8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf7ac, 0xf7ad, 0xf7ae, 0xf7af, 0xf7b0, 0xf7b1, 0xf7b2, 0xf7b3, - 0xf7b4, 0xf7b5, 0xf7b6, 0xf7b7, 0xf7b8, 0xf7b9, 0xf7ba, 0xf7bb, - 0xf7bc, 0xf7bd, 0xf7be, 0xf7bf, 0xf7c0, 0xf7c1, 0xf7c2, 0xf7c3, - 0xf7c4, 0xf7c5, 0xf7c6, 0xf7c7, 0xf7c8, 0xf7c9, 0xf7ca, 0xf7cb, - 0xf7cc, 0xf7cd, 0xf7ce, 0xf7cf, 0xf7d0, 0xf7d1, 0xf7d2, 0xf7d3, - 0xf7d4, 0xf7d5, 0xf7d6, 0xf7d7, 0xf7d8, 0xf7d9, 0xf7da, 0xf7db, - 0xf7dc, 0xf7dd, 0xf7de, 0xf7df, 0xf7e0, 0xf7e1, 0xf7e2, 0xf7e3, - 0xf7e4, 0xf7e5, 0xf7e6, 0xf7e7, 0xf7e8, 0xf7e9, 0xf7ea, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf7eb, 0xf7ec, 0xf7ed, 0xf7ee, 0xf7ef, 0xf7f0, 0xf7f1, - 0xf7f2, 0xf7f3, 0xf7f4, 0xf7f5, 0xf7f6, 0xf7f7, 0xf7f8, 0xf7f9, - 0xf7fa, 0xf7fb, 0xf7fc, 0xf7fd, 0xf7fe, 0xf7ff, 0xf800, 0xf801, - 0xf802, 0xf803, 0xf804, 0xf805, 0xf806, 0xf807, 0xf808, 0xf809, - 0xf80a, 0xf80b, 0xf80c, 0xf80d, 0xf80e, 0xf80f, 0xf810, 0xf811, - 0xf812, 0xf813, 0xf814, 0xf815, 0xf816, 0xf817, 0xf818, 0xf819, - 0xf81a, 0xf81b, 0xf81c, 0xf81d, 0xf81e, 0xf81f, 0xf820, 0xf821, - 0xf822, 0xf823, 0xf824, 0xf825, 0xf826, 0xf827, 0xf828, 0xf829, - 0xf82a, 0xf82b, 0xf82c, 0xf82d, 0xf82e, 0xf82f, 0xf830, 0xf831, - 0xf832, 0xf833, 0xf834, 0xf835, 0xf836, 0xf837, 0xf838, 0xf839, - 0xf83a, 0xf83b, 0xf83c, 0xf83d, 0xf83e, 0xf83f, 0xf840, 0xf841, - 0xf842, 0xf843, 0xf844, 0xf845, 0xf846, 0xf847, 0xf848, 0x003f, - /* lead byte c9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x4e42, 0x4e5c, 0x51f5, 0x531a, 0x5382, 0x4e07, 0x4e0c, 0x4e47, - 0x4e8d, 0x56d7, 0xfa0c, 0x5c6e, 0x5f73, 0x4e0f, 0x5187, 0x4e0e, - 0x4e2e, 0x4e93, 0x4ec2, 0x4ec9, 0x4ec8, 0x5198, 0x52fc, 0x536c, - 0x53b9, 0x5720, 0x5903, 0x592c, 0x5c10, 0x5dff, 0x65e1, 0x6bb3, - 0x6bcc, 0x6c14, 0x723f, 0x4e31, 0x4e3c, 0x4ee8, 0x4edc, 0x4ee9, - 0x4ee1, 0x4edd, 0x4eda, 0x520c, 0x531c, 0x534c, 0x5722, 0x5723, - 0x5917, 0x592f, 0x5b81, 0x5b84, 0x5c12, 0x5c3b, 0x5c74, 0x5c73, - 0x5e04, 0x5e80, 0x5e82, 0x5fc9, 0x6209, 0x6250, 0x6c15, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6c36, 0x6c43, 0x6c3f, 0x6c3b, 0x72ae, 0x72b0, 0x738a, - 0x79b8, 0x808a, 0x961e, 0x4f0e, 0x4f18, 0x4f2c, 0x4ef5, 0x4f14, - 0x4ef1, 0x4f00, 0x4ef7, 0x4f08, 0x4f1d, 0x4f02, 0x4f05, 0x4f22, - 0x4f13, 0x4f04, 0x4ef4, 0x4f12, 0x51b1, 0x5213, 0x5209, 0x5210, - 0x52a6, 0x5322, 0x531f, 0x534d, 0x538a, 0x5407, 0x56e1, 0x56df, - 0x572e, 0x572a, 0x5734, 0x593c, 0x5980, 0x597c, 0x5985, 0x597b, - 0x597e, 0x5977, 0x597f, 0x5b56, 0x5c15, 0x5c25, 0x5c7c, 0x5c7a, - 0x5c7b, 0x5c7e, 0x5ddf, 0x5e75, 0x5e84, 0x5f02, 0x5f1a, 0x5f74, - 0x5fd5, 0x5fd4, 0x5fcf, 0x625c, 0x625e, 0x6264, 0x6261, 0x6266, - 0x6262, 0x6259, 0x6260, 0x625a, 0x6265, 0x65ef, 0x65ee, 0x673e, - 0x6739, 0x6738, 0x673b, 0x673a, 0x673f, 0x673c, 0x6733, 0x6c18, - 0x6c46, 0x6c52, 0x6c5c, 0x6c4f, 0x6c4a, 0x6c54, 0x6c4b, 0x003f, - /* lead byte ca */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6c4c, 0x7071, 0x725e, 0x72b4, 0x72b5, 0x738e, 0x752a, 0x767f, - 0x7a75, 0x7f51, 0x8278, 0x827c, 0x8280, 0x827d, 0x827f, 0x864d, - 0x897e, 0x9099, 0x9097, 0x9098, 0x909b, 0x9094, 0x9622, 0x9624, - 0x9620, 0x9623, 0x4f56, 0x4f3b, 0x4f62, 0x4f49, 0x4f53, 0x4f64, - 0x4f3e, 0x4f67, 0x4f52, 0x4f5f, 0x4f41, 0x4f58, 0x4f2d, 0x4f33, - 0x4f3f, 0x4f61, 0x518f, 0x51b9, 0x521c, 0x521e, 0x5221, 0x52ad, - 0x52ae, 0x5309, 0x5363, 0x5372, 0x538e, 0x538f, 0x5430, 0x5437, - 0x542a, 0x5454, 0x5445, 0x5419, 0x541c, 0x5425, 0x5418, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x543d, 0x544f, 0x5441, 0x5428, 0x5424, 0x5447, 0x56ee, - 0x56e7, 0x56e5, 0x5741, 0x5745, 0x574c, 0x5749, 0x574b, 0x5752, - 0x5906, 0x5940, 0x59a6, 0x5998, 0x59a0, 0x5997, 0x598e, 0x59a2, - 0x5990, 0x598f, 0x59a7, 0x59a1, 0x5b8e, 0x5b92, 0x5c28, 0x5c2a, - 0x5c8d, 0x5c8f, 0x5c88, 0x5c8b, 0x5c89, 0x5c92, 0x5c8a, 0x5c86, - 0x5c93, 0x5c95, 0x5de0, 0x5e0a, 0x5e0e, 0x5e8b, 0x5e89, 0x5e8c, - 0x5e88, 0x5e8d, 0x5f05, 0x5f1d, 0x5f78, 0x5f76, 0x5fd2, 0x5fd1, - 0x5fd0, 0x5fed, 0x5fe8, 0x5fee, 0x5ff3, 0x5fe1, 0x5fe4, 0x5fe3, - 0x5ffa, 0x5fef, 0x5ff7, 0x5ffb, 0x6000, 0x5ff4, 0x623a, 0x6283, - 0x628c, 0x628e, 0x628f, 0x6294, 0x6287, 0x6271, 0x627b, 0x627a, - 0x6270, 0x6281, 0x6288, 0x6277, 0x627d, 0x6272, 0x6274, 0x6537, - 0x65f0, 0x65f4, 0x65f3, 0x65f2, 0x65f5, 0x6745, 0x6747, 0x003f, - /* lead byte cb */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6759, 0x6755, 0x674c, 0x6748, 0x675d, 0x674d, 0x675a, 0x674b, - 0x6bd0, 0x6c19, 0x6c1a, 0x6c78, 0x6c67, 0x6c6b, 0x6c84, 0x6c8b, - 0x6c8f, 0x6c71, 0x6c6f, 0x6c69, 0x6c9a, 0x6c6d, 0x6c87, 0x6c95, - 0x6c9c, 0x6c66, 0x6c73, 0x6c65, 0x6c7b, 0x6c8e, 0x7074, 0x707a, - 0x7263, 0x72bf, 0x72bd, 0x72c3, 0x72c6, 0x72c1, 0x72ba, 0x72c5, - 0x7395, 0x7397, 0x7393, 0x7394, 0x7392, 0x753a, 0x7539, 0x7594, - 0x7595, 0x7681, 0x793d, 0x8034, 0x8095, 0x8099, 0x8090, 0x8092, - 0x809c, 0x8290, 0x828f, 0x8285, 0x828e, 0x8291, 0x8293, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x828a, 0x8283, 0x8284, 0x8c78, 0x8fc9, 0x8fbf, 0x909f, - 0x90a1, 0x90a5, 0x909e, 0x90a7, 0x90a0, 0x9630, 0x9628, 0x962f, - 0x962d, 0x4e33, 0x4f98, 0x4f7c, 0x4f85, 0x4f7d, 0x4f80, 0x4f87, - 0x4f76, 0x4f74, 0x4f89, 0x4f84, 0x4f77, 0x4f4c, 0x4f97, 0x4f6a, - 0x4f9a, 0x4f79, 0x4f81, 0x4f78, 0x4f90, 0x4f9c, 0x4f94, 0x4f9e, - 0x4f92, 0x4f82, 0x4f95, 0x4f6b, 0x4f6e, 0x519e, 0x51bc, 0x51be, - 0x5235, 0x5232, 0x5233, 0x5246, 0x5231, 0x52bc, 0x530a, 0x530b, - 0x533c, 0x5392, 0x5394, 0x5487, 0x547f, 0x5481, 0x5491, 0x5482, - 0x5488, 0x546b, 0x547a, 0x547e, 0x5465, 0x546c, 0x5474, 0x5466, - 0x548d, 0x546f, 0x5461, 0x5460, 0x5498, 0x5463, 0x5467, 0x5464, - 0x56f7, 0x56f9, 0x576f, 0x5772, 0x576d, 0x576b, 0x5771, 0x5770, - 0x5776, 0x5780, 0x5775, 0x577b, 0x5773, 0x5774, 0x5762, 0x003f, - /* lead byte cc */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x5768, 0x577d, 0x590c, 0x5945, 0x59b5, 0x59ba, 0x59cf, 0x59ce, - 0x59b2, 0x59cc, 0x59c1, 0x59b6, 0x59bc, 0x59c3, 0x59d6, 0x59b1, - 0x59bd, 0x59c0, 0x59c8, 0x59b4, 0x59c7, 0x5b62, 0x5b65, 0x5b93, - 0x5b95, 0x5c44, 0x5c47, 0x5cae, 0x5ca4, 0x5ca0, 0x5cb5, 0x5caf, - 0x5ca8, 0x5cac, 0x5c9f, 0x5ca3, 0x5cad, 0x5ca2, 0x5caa, 0x5ca7, - 0x5c9d, 0x5ca5, 0x5cb6, 0x5cb0, 0x5ca6, 0x5e17, 0x5e14, 0x5e19, - 0x5f28, 0x5f22, 0x5f23, 0x5f24, 0x5f54, 0x5f82, 0x5f7e, 0x5f7d, - 0x5fde, 0x5fe5, 0x602d, 0x6026, 0x6019, 0x6032, 0x600b, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6034, 0x600a, 0x6017, 0x6033, 0x601a, 0x601e, 0x602c, - 0x6022, 0x600d, 0x6010, 0x602e, 0x6013, 0x6011, 0x600c, 0x6009, - 0x601c, 0x6214, 0x623d, 0x62ad, 0x62b4, 0x62d1, 0x62be, 0x62aa, - 0x62b6, 0x62ca, 0x62ae, 0x62b3, 0x62af, 0x62bb, 0x62a9, 0x62b0, - 0x62b8, 0x653d, 0x65a8, 0x65bb, 0x6609, 0x65fc, 0x6604, 0x6612, - 0x6608, 0x65fb, 0x6603, 0x660b, 0x660d, 0x6605, 0x65fd, 0x6611, - 0x6610, 0x66f6, 0x670a, 0x6785, 0x676c, 0x678e, 0x6792, 0x6776, - 0x677b, 0x6798, 0x6786, 0x6784, 0x6774, 0x678d, 0x678c, 0x677a, - 0x679f, 0x6791, 0x6799, 0x6783, 0x677d, 0x6781, 0x6778, 0x6779, - 0x6794, 0x6b25, 0x6b80, 0x6b7e, 0x6bde, 0x6c1d, 0x6c93, 0x6cec, - 0x6ceb, 0x6cee, 0x6cd9, 0x6cb6, 0x6cd4, 0x6cad, 0x6ce7, 0x6cb7, - 0x6cd0, 0x6cc2, 0x6cba, 0x6cc3, 0x6cc6, 0x6ced, 0x6cf2, 0x003f, - /* lead byte cd */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6cd2, 0x6cdd, 0x6cb4, 0x6c8a, 0x6c9d, 0x6c80, 0x6cde, 0x6cc0, - 0x6d30, 0x6ccd, 0x6cc7, 0x6cb0, 0x6cf9, 0x6ccf, 0x6ce9, 0x6cd1, - 0x7094, 0x7098, 0x7085, 0x7093, 0x7086, 0x7084, 0x7091, 0x7096, - 0x7082, 0x709a, 0x7083, 0x726a, 0x72d6, 0x72cb, 0x72d8, 0x72c9, - 0x72dc, 0x72d2, 0x72d4, 0x72da, 0x72cc, 0x72d1, 0x73a4, 0x73a1, - 0x73ad, 0x73a6, 0x73a2, 0x73a0, 0x73ac, 0x739d, 0x74dd, 0x74e8, - 0x753f, 0x7540, 0x753e, 0x758c, 0x7598, 0x76af, 0x76f3, 0x76f1, - 0x76f0, 0x76f5, 0x77f8, 0x77fc, 0x77f9, 0x77fb, 0x77fa, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x77f7, 0x7942, 0x793f, 0x79c5, 0x7a78, 0x7a7b, 0x7afb, - 0x7c75, 0x7cfd, 0x8035, 0x808f, 0x80ae, 0x80a3, 0x80b8, 0x80b5, - 0x80ad, 0x8220, 0x82a0, 0x82c0, 0x82ab, 0x829a, 0x8298, 0x829b, - 0x82b5, 0x82a7, 0x82ae, 0x82bc, 0x829e, 0x82ba, 0x82b4, 0x82a8, - 0x82a1, 0x82a9, 0x82c2, 0x82a4, 0x82c3, 0x82b6, 0x82a2, 0x8670, - 0x866f, 0x866d, 0x866e, 0x8c56, 0x8fd2, 0x8fcb, 0x8fd3, 0x8fcd, - 0x8fd6, 0x8fd5, 0x8fd7, 0x90b2, 0x90b4, 0x90af, 0x90b3, 0x90b0, - 0x9639, 0x963d, 0x963c, 0x963a, 0x9643, 0x4fcd, 0x4fc5, 0x4fd3, - 0x4fb2, 0x4fc9, 0x4fcb, 0x4fc1, 0x4fd4, 0x4fdc, 0x4fd9, 0x4fbb, - 0x4fb3, 0x4fdb, 0x4fc7, 0x4fd6, 0x4fba, 0x4fc0, 0x4fb9, 0x4fec, - 0x5244, 0x5249, 0x52c0, 0x52c2, 0x533d, 0x537c, 0x5397, 0x5396, - 0x5399, 0x5398, 0x54ba, 0x54a1, 0x54ad, 0x54a5, 0x54cf, 0x003f, - /* lead byte ce */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x54c3, 0x830d, 0x54b7, 0x54ae, 0x54d6, 0x54b6, 0x54c5, 0x54c6, - 0x54a0, 0x5470, 0x54bc, 0x54a2, 0x54be, 0x5472, 0x54de, 0x54b0, - 0x57b5, 0x579e, 0x579f, 0x57a4, 0x578c, 0x5797, 0x579d, 0x579b, - 0x5794, 0x5798, 0x578f, 0x5799, 0x57a5, 0x579a, 0x5795, 0x58f4, - 0x590d, 0x5953, 0x59e1, 0x59de, 0x59ee, 0x5a00, 0x59f1, 0x59dd, - 0x59fa, 0x59fd, 0x59fc, 0x59f6, 0x59e4, 0x59f2, 0x59f7, 0x59db, - 0x59e9, 0x59f3, 0x59f5, 0x59e0, 0x59fe, 0x59f4, 0x59ed, 0x5ba8, - 0x5c4c, 0x5cd0, 0x5cd8, 0x5ccc, 0x5cd7, 0x5ccb, 0x5cdb, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5cde, 0x5cda, 0x5cc9, 0x5cc7, 0x5cca, 0x5cd6, 0x5cd3, - 0x5cd4, 0x5ccf, 0x5cc8, 0x5cc6, 0x5cce, 0x5cdf, 0x5cf8, 0x5df9, - 0x5e21, 0x5e22, 0x5e23, 0x5e20, 0x5e24, 0x5eb0, 0x5ea4, 0x5ea2, - 0x5e9b, 0x5ea3, 0x5ea5, 0x5f07, 0x5f2e, 0x5f56, 0x5f86, 0x6037, - 0x6039, 0x6054, 0x6072, 0x605e, 0x6045, 0x6053, 0x6047, 0x6049, - 0x605b, 0x604c, 0x6040, 0x6042, 0x605f, 0x6024, 0x6044, 0x6058, - 0x6066, 0x606e, 0x6242, 0x6243, 0x62cf, 0x630d, 0x630b, 0x62f5, - 0x630e, 0x6303, 0x62eb, 0x62f9, 0x630f, 0x630c, 0x62f8, 0x62f6, - 0x6300, 0x6313, 0x6314, 0x62fa, 0x6315, 0x62fb, 0x62f0, 0x6541, - 0x6543, 0x65aa, 0x65bf, 0x6636, 0x6621, 0x6632, 0x6635, 0x661c, - 0x6626, 0x6622, 0x6633, 0x662b, 0x663a, 0x661d, 0x6634, 0x6639, - 0x662e, 0x670f, 0x6710, 0x67c1, 0x67f2, 0x67c8, 0x67ba, 0x003f, - /* lead byte cf */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x67dc, 0x67bb, 0x67f8, 0x67d8, 0x67c0, 0x67b7, 0x67c5, 0x67eb, - 0x67e4, 0x67df, 0x67b5, 0x67cd, 0x67b3, 0x67f7, 0x67f6, 0x67ee, - 0x67e3, 0x67c2, 0x67b9, 0x67ce, 0x67e7, 0x67f0, 0x67b2, 0x67fc, - 0x67c6, 0x67ed, 0x67cc, 0x67ae, 0x67e6, 0x67db, 0x67fa, 0x67c9, - 0x67ca, 0x67c3, 0x67ea, 0x67cb, 0x6b28, 0x6b82, 0x6b84, 0x6bb6, - 0x6bd6, 0x6bd8, 0x6be0, 0x6c20, 0x6c21, 0x6d28, 0x6d34, 0x6d2d, - 0x6d1f, 0x6d3c, 0x6d3f, 0x6d12, 0x6d0a, 0x6cda, 0x6d33, 0x6d04, - 0x6d19, 0x6d3a, 0x6d1a, 0x6d11, 0x6d00, 0x6d1d, 0x6d42, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6d01, 0x6d18, 0x6d37, 0x6d03, 0x6d0f, 0x6d40, 0x6d07, - 0x6d20, 0x6d2c, 0x6d08, 0x6d22, 0x6d09, 0x6d10, 0x70b7, 0x709f, - 0x70be, 0x70b1, 0x70b0, 0x70a1, 0x70b4, 0x70b5, 0x70a9, 0x7241, - 0x7249, 0x724a, 0x726c, 0x7270, 0x7273, 0x726e, 0x72ca, 0x72e4, - 0x72e8, 0x72eb, 0x72df, 0x72ea, 0x72e6, 0x72e3, 0x7385, 0x73cc, - 0x73c2, 0x73c8, 0x73c5, 0x73b9, 0x73b6, 0x73b5, 0x73b4, 0x73eb, - 0x73bf, 0x73c7, 0x73be, 0x73c3, 0x73c6, 0x73b8, 0x73cb, 0x74ec, - 0x74ee, 0x752e, 0x7547, 0x7548, 0x75a7, 0x75aa, 0x7679, 0x76c4, - 0x7708, 0x7703, 0x7704, 0x7705, 0x770a, 0x76f7, 0x76fb, 0x76fa, - 0x77e7, 0x77e8, 0x7806, 0x7811, 0x7812, 0x7805, 0x7810, 0x780f, - 0x780e, 0x7809, 0x7803, 0x7813, 0x794a, 0x794c, 0x794b, 0x7945, - 0x7944, 0x79d5, 0x79cd, 0x79cf, 0x79d6, 0x79ce, 0x7a80, 0x003f, - /* lead byte d0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7a7e, 0x7ad1, 0x7b00, 0x7b01, 0x7c7a, 0x7c78, 0x7c79, 0x7c7f, - 0x7c80, 0x7c81, 0x7d03, 0x7d08, 0x7d01, 0x7f58, 0x7f91, 0x7f8d, - 0x7fbe, 0x8007, 0x800e, 0x800f, 0x8014, 0x8037, 0x80d8, 0x80c7, - 0x80e0, 0x80d1, 0x80c8, 0x80c2, 0x80d0, 0x80c5, 0x80e3, 0x80d9, - 0x80dc, 0x80ca, 0x80d5, 0x80c9, 0x80cf, 0x80d7, 0x80e6, 0x80cd, - 0x81ff, 0x8221, 0x8294, 0x82d9, 0x82fe, 0x82f9, 0x8307, 0x82e8, - 0x8300, 0x82d5, 0x833a, 0x82eb, 0x82d6, 0x82f4, 0x82ec, 0x82e1, - 0x82f2, 0x82f5, 0x830c, 0x82fb, 0x82f6, 0x82f0, 0x82ea, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x82e4, 0x82e0, 0x82fa, 0x82f3, 0x82ed, 0x8677, 0x8674, - 0x867c, 0x8673, 0x8841, 0x884e, 0x8867, 0x886a, 0x8869, 0x89d3, - 0x8a04, 0x8a07, 0x8d72, 0x8fe3, 0x8fe1, 0x8fee, 0x8fe0, 0x90f1, - 0x90bd, 0x90bf, 0x90d5, 0x90c5, 0x90be, 0x90c7, 0x90cb, 0x90c8, - 0x91d4, 0x91d3, 0x9654, 0x964f, 0x9651, 0x9653, 0x964a, 0x964e, - 0x501e, 0x5005, 0x5007, 0x5013, 0x5022, 0x5030, 0x501b, 0x4ff5, - 0x4ff4, 0x5033, 0x5037, 0x502c, 0x4ff6, 0x4ff7, 0x5017, 0x501c, - 0x5020, 0x5027, 0x5035, 0x502f, 0x5031, 0x500e, 0x515a, 0x5194, - 0x5193, 0x51ca, 0x51c4, 0x51c5, 0x51c8, 0x51ce, 0x5261, 0x525a, - 0x5252, 0x525e, 0x525f, 0x5255, 0x5262, 0x52cd, 0x530e, 0x539e, - 0x5526, 0x54e2, 0x5517, 0x5512, 0x54e7, 0x54f3, 0x54e4, 0x551a, - 0x54ff, 0x5504, 0x5508, 0x54eb, 0x5511, 0x5505, 0x54f1, 0x003f, - /* lead byte d1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x550a, 0x54fb, 0x54f7, 0x54f8, 0x54e0, 0x550e, 0x5503, 0x550b, - 0x5701, 0x5702, 0x57cc, 0x5832, 0x57d5, 0x57d2, 0x57ba, 0x57c6, - 0x57bd, 0x57bc, 0x57b8, 0x57b6, 0x57bf, 0x57c7, 0x57d0, 0x57b9, - 0x57c1, 0x590e, 0x594a, 0x5a19, 0x5a16, 0x5a2d, 0x5a2e, 0x5a15, - 0x5a0f, 0x5a17, 0x5a0a, 0x5a1e, 0x5a33, 0x5b6c, 0x5ba7, 0x5bad, - 0x5bac, 0x5c03, 0x5c56, 0x5c54, 0x5cec, 0x5cff, 0x5cee, 0x5cf1, - 0x5cf7, 0x5d00, 0x5cf9, 0x5e29, 0x5e28, 0x5ea8, 0x5eae, 0x5eaa, - 0x5eac, 0x5f33, 0x5f30, 0x5f67, 0x605d, 0x605a, 0x6067, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6041, 0x60a2, 0x6088, 0x6080, 0x6092, 0x6081, 0x609d, - 0x6083, 0x6095, 0x609b, 0x6097, 0x6087, 0x609c, 0x608e, 0x6219, - 0x6246, 0x62f2, 0x6310, 0x6356, 0x632c, 0x6344, 0x6345, 0x6336, - 0x6343, 0x63e4, 0x6339, 0x634b, 0x634a, 0x633c, 0x6329, 0x6341, - 0x6334, 0x6358, 0x6354, 0x6359, 0x632d, 0x6347, 0x6333, 0x635a, - 0x6351, 0x6338, 0x6357, 0x6340, 0x6348, 0x654a, 0x6546, 0x65c6, - 0x65c3, 0x65c4, 0x65c2, 0x664a, 0x665f, 0x6647, 0x6651, 0x6712, - 0x6713, 0x681f, 0x681a, 0x6849, 0x6832, 0x6833, 0x683b, 0x684b, - 0x684f, 0x6816, 0x6831, 0x681c, 0x6835, 0x682b, 0x682d, 0x682f, - 0x684e, 0x6844, 0x6834, 0x681d, 0x6812, 0x6814, 0x6826, 0x6828, - 0x682e, 0x684d, 0x683a, 0x6825, 0x6820, 0x6b2c, 0x6b2f, 0x6b2d, - 0x6b31, 0x6b34, 0x6b6d, 0x8082, 0x6b88, 0x6be6, 0x6be4, 0x003f, - /* lead byte d2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6be8, 0x6be3, 0x6be2, 0x6be7, 0x6c25, 0x6d7a, 0x6d63, 0x6d64, - 0x6d76, 0x6d0d, 0x6d61, 0x6d92, 0x6d58, 0x6d62, 0x6d6d, 0x6d6f, - 0x6d91, 0x6d8d, 0x6def, 0x6d7f, 0x6d86, 0x6d5e, 0x6d67, 0x6d60, - 0x6d97, 0x6d70, 0x6d7c, 0x6d5f, 0x6d82, 0x6d98, 0x6d2f, 0x6d68, - 0x6d8b, 0x6d7e, 0x6d80, 0x6d84, 0x6d16, 0x6d83, 0x6d7b, 0x6d7d, - 0x6d75, 0x6d90, 0x70dc, 0x70d3, 0x70d1, 0x70dd, 0x70cb, 0x7f39, - 0x70e2, 0x70d7, 0x70d2, 0x70de, 0x70e0, 0x70d4, 0x70cd, 0x70c5, - 0x70c6, 0x70c7, 0x70da, 0x70ce, 0x70e1, 0x7242, 0x7278, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7277, 0x7276, 0x7300, 0x72fa, 0x72f4, 0x72fe, 0x72f6, - 0x72f3, 0x72fb, 0x7301, 0x73d3, 0x73d9, 0x73e5, 0x73d6, 0x73bc, - 0x73e7, 0x73e3, 0x73e9, 0x73dc, 0x73d2, 0x73db, 0x73d4, 0x73dd, - 0x73da, 0x73d7, 0x73d8, 0x73e8, 0x74de, 0x74df, 0x74f4, 0x74f5, - 0x7521, 0x755b, 0x755f, 0x75b0, 0x75c1, 0x75bb, 0x75c4, 0x75c0, - 0x75bf, 0x75b6, 0x75ba, 0x768a, 0x76c9, 0x771d, 0x771b, 0x7710, - 0x7713, 0x7712, 0x7723, 0x7711, 0x7715, 0x7719, 0x771a, 0x7722, - 0x7727, 0x7823, 0x782c, 0x7822, 0x7835, 0x782f, 0x7828, 0x782e, - 0x782b, 0x7821, 0x7829, 0x7833, 0x782a, 0x7831, 0x7954, 0x795b, - 0x794f, 0x795c, 0x7953, 0x7952, 0x7951, 0x79eb, 0x79ec, 0x79e0, - 0x79ee, 0x79ed, 0x79ea, 0x79dc, 0x79de, 0x79dd, 0x7a86, 0x7a89, - 0x7a85, 0x7a8b, 0x7a8c, 0x7a8a, 0x7a87, 0x7ad8, 0x7b10, 0x003f, - /* lead byte d3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7b04, 0x7b13, 0x7b05, 0x7b0f, 0x7b08, 0x7b0a, 0x7b0e, 0x7b09, - 0x7b12, 0x7c84, 0x7c91, 0x7c8a, 0x7c8c, 0x7c88, 0x7c8d, 0x7c85, - 0x7d1e, 0x7d1d, 0x7d11, 0x7d0e, 0x7d18, 0x7d16, 0x7d13, 0x7d1f, - 0x7d12, 0x7d0f, 0x7d0c, 0x7f5c, 0x7f61, 0x7f5e, 0x7f60, 0x7f5d, - 0x7f5b, 0x7f96, 0x7f92, 0x7fc3, 0x7fc2, 0x7fc0, 0x8016, 0x803e, - 0x8039, 0x80fa, 0x80f2, 0x80f9, 0x80f5, 0x8101, 0x80fb, 0x8100, - 0x8201, 0x822f, 0x8225, 0x8333, 0x832d, 0x8344, 0x8319, 0x8351, - 0x8325, 0x8356, 0x833f, 0x8341, 0x8326, 0x831c, 0x8322, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8342, 0x834e, 0x831b, 0x832a, 0x8308, 0x833c, 0x834d, - 0x8316, 0x8324, 0x8320, 0x8337, 0x832f, 0x8329, 0x8347, 0x8345, - 0x834c, 0x8353, 0x831e, 0x832c, 0x834b, 0x8327, 0x8348, 0x8653, - 0x8652, 0x86a2, 0x86a8, 0x8696, 0x868d, 0x8691, 0x869e, 0x8687, - 0x8697, 0x8686, 0x868b, 0x869a, 0x8685, 0x86a5, 0x8699, 0x86a1, - 0x86a7, 0x8695, 0x8698, 0x868e, 0x869d, 0x8690, 0x8694, 0x8843, - 0x8844, 0x886d, 0x8875, 0x8876, 0x8872, 0x8880, 0x8871, 0x887f, - 0x886f, 0x8883, 0x887e, 0x8874, 0x887c, 0x8a12, 0x8c47, 0x8c57, - 0x8c7b, 0x8ca4, 0x8ca3, 0x8d76, 0x8d78, 0x8db5, 0x8db7, 0x8db6, - 0x8ed1, 0x8ed3, 0x8ffe, 0x8ff5, 0x9002, 0x8fff, 0x8ffb, 0x9004, - 0x8ffc, 0x8ff6, 0x90d6, 0x90e0, 0x90d9, 0x90da, 0x90e3, 0x90df, - 0x90e5, 0x90d8, 0x90db, 0x90d7, 0x90dc, 0x90e4, 0x9150, 0x003f, - /* lead byte d4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x914e, 0x914f, 0x91d5, 0x91e2, 0x91da, 0x965c, 0x965f, 0x96bc, - 0x98e3, 0x9adf, 0x9b2f, 0x4e7f, 0x5070, 0x506a, 0x5061, 0x505e, - 0x5060, 0x5053, 0x504b, 0x505d, 0x5072, 0x5048, 0x504d, 0x5041, - 0x505b, 0x504a, 0x5062, 0x5015, 0x5045, 0x505f, 0x5069, 0x506b, - 0x5063, 0x5064, 0x5046, 0x5040, 0x506e, 0x5073, 0x5057, 0x5051, - 0x51d0, 0x526b, 0x526d, 0x526c, 0x526e, 0x52d6, 0x52d3, 0x532d, - 0x539c, 0x5575, 0x5576, 0x553c, 0x554d, 0x5550, 0x5534, 0x552a, - 0x5551, 0x5562, 0x5536, 0x5535, 0x5530, 0x5552, 0x5545, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x550c, 0x5532, 0x5565, 0x554e, 0x5539, 0x5548, 0x552d, - 0x553b, 0x5540, 0x554b, 0x570a, 0x5707, 0x57fb, 0x5814, 0x57e2, - 0x57f6, 0x57dc, 0x57f4, 0x5800, 0x57ed, 0x57fd, 0x5808, 0x57f8, - 0x580b, 0x57f3, 0x57cf, 0x5807, 0x57ee, 0x57e3, 0x57f2, 0x57e5, - 0x57ec, 0x57e1, 0x580e, 0x57fc, 0x5810, 0x57e7, 0x5801, 0x580c, - 0x57f1, 0x57e9, 0x57f0, 0x580d, 0x5804, 0x595c, 0x5a60, 0x5a58, - 0x5a55, 0x5a67, 0x5a5e, 0x5a38, 0x5a35, 0x5a6d, 0x5a50, 0x5a5f, - 0x5a65, 0x5a6c, 0x5a53, 0x5a64, 0x5a57, 0x5a43, 0x5a5d, 0x5a52, - 0x5a44, 0x5a5b, 0x5a48, 0x5a8e, 0x5a3e, 0x5a4d, 0x5a39, 0x5a4c, - 0x5a70, 0x5a69, 0x5a47, 0x5a51, 0x5a56, 0x5a42, 0x5a5c, 0x5b72, - 0x5b6e, 0x5bc1, 0x5bc0, 0x5c59, 0x5d1e, 0x5d0b, 0x5d1d, 0x5d1a, - 0x5d20, 0x5d0c, 0x5d28, 0x5d0d, 0x5d26, 0x5d25, 0x5d0f, 0x003f, - /* lead byte d5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x5d30, 0x5d12, 0x5d23, 0x5d1f, 0x5d2e, 0x5e3e, 0x5e34, 0x5eb1, - 0x5eb4, 0x5eb9, 0x5eb2, 0x5eb3, 0x5f36, 0x5f38, 0x5f9b, 0x5f96, - 0x5f9f, 0x608a, 0x6090, 0x6086, 0x60be, 0x60b0, 0x60ba, 0x60d3, - 0x60d4, 0x60cf, 0x60e4, 0x60d9, 0x60dd, 0x60c8, 0x60b1, 0x60db, - 0x60b7, 0x60ca, 0x60bf, 0x60c3, 0x60cd, 0x60c0, 0x6332, 0x6365, - 0x638a, 0x6382, 0x637d, 0x63bd, 0x639e, 0x63ad, 0x639d, 0x6397, - 0x63ab, 0x638e, 0x636f, 0x6387, 0x6390, 0x636e, 0x63af, 0x6375, - 0x639c, 0x636d, 0x63ae, 0x637c, 0x63a4, 0x633b, 0x639f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6378, 0x6385, 0x6381, 0x6391, 0x638d, 0x6370, 0x6553, - 0x65cd, 0x6665, 0x6661, 0x665b, 0x6659, 0x665c, 0x6662, 0x6718, - 0x6879, 0x6887, 0x6890, 0x689c, 0x686d, 0x686e, 0x68ae, 0x68ab, - 0x6956, 0x686f, 0x68a3, 0x68ac, 0x68a9, 0x6875, 0x6874, 0x68b2, - 0x688f, 0x6877, 0x6892, 0x687c, 0x686b, 0x6872, 0x68aa, 0x6880, - 0x6871, 0x687e, 0x689b, 0x6896, 0x688b, 0x68a0, 0x6889, 0x68a4, - 0x6878, 0x687b, 0x6891, 0x688c, 0x688a, 0x687d, 0x6b36, 0x6b33, - 0x6b37, 0x6b38, 0x6b91, 0x6b8f, 0x6b8d, 0x6b8e, 0x6b8c, 0x6c2a, - 0x6dc0, 0x6dab, 0x6db4, 0x6db3, 0x6e74, 0x6dac, 0x6de9, 0x6de2, - 0x6db7, 0x6df6, 0x6dd4, 0x6e00, 0x6dc8, 0x6de0, 0x6ddf, 0x6dd6, - 0x6dbe, 0x6de5, 0x6ddc, 0x6ddd, 0x6ddb, 0x6df4, 0x6dca, 0x6dbd, - 0x6ded, 0x6df0, 0x6dba, 0x6dd5, 0x6dc2, 0x6dcf, 0x6dc9, 0x003f, - /* lead byte d6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6dd0, 0x6df2, 0x6dd3, 0x6dfd, 0x6dd7, 0x6dcd, 0x6de3, 0x6dbb, - 0x70fa, 0x710d, 0x70f7, 0x7117, 0x70f4, 0x710c, 0x70f0, 0x7104, - 0x70f3, 0x7110, 0x70fc, 0x70ff, 0x7106, 0x7113, 0x7100, 0x70f8, - 0x70f6, 0x710b, 0x7102, 0x710e, 0x727e, 0x727b, 0x727c, 0x727f, - 0x731d, 0x7317, 0x7307, 0x7311, 0x7318, 0x730a, 0x7308, 0x72ff, - 0x730f, 0x731e, 0x7388, 0x73f6, 0x73f8, 0x73f5, 0x7404, 0x7401, - 0x73fd, 0x7407, 0x7400, 0x73fa, 0x73fc, 0x73ff, 0x740c, 0x740b, - 0x73f4, 0x7408, 0x7564, 0x7563, 0x75ce, 0x75d2, 0x75cf, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x75cb, 0x75cc, 0x75d1, 0x75d0, 0x768f, 0x7689, 0x76d3, - 0x7739, 0x772f, 0x772d, 0x7731, 0x7732, 0x7734, 0x7733, 0x773d, - 0x7725, 0x773b, 0x7735, 0x7848, 0x7852, 0x7849, 0x784d, 0x784a, - 0x784c, 0x7826, 0x7845, 0x7850, 0x7964, 0x7967, 0x7969, 0x796a, - 0x7963, 0x796b, 0x7961, 0x79bb, 0x79fa, 0x79f8, 0x79f6, 0x79f7, - 0x7a8f, 0x7a94, 0x7a90, 0x7b35, 0x7b47, 0x7b34, 0x7b25, 0x7b30, - 0x7b22, 0x7b24, 0x7b33, 0x7b18, 0x7b2a, 0x7b1d, 0x7b31, 0x7b2b, - 0x7b2d, 0x7b2f, 0x7b32, 0x7b38, 0x7b1a, 0x7b23, 0x7c94, 0x7c98, - 0x7c96, 0x7ca3, 0x7d35, 0x7d3d, 0x7d38, 0x7d36, 0x7d3a, 0x7d45, - 0x7d2c, 0x7d29, 0x7d41, 0x7d47, 0x7d3e, 0x7d3f, 0x7d4a, 0x7d3b, - 0x7d28, 0x7f63, 0x7f95, 0x7f9c, 0x7f9d, 0x7f9b, 0x7fca, 0x7fcb, - 0x7fcd, 0x7fd0, 0x7fd1, 0x7fc7, 0x7fcf, 0x7fc9, 0x801f, 0x003f, - /* lead byte d7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x801e, 0x801b, 0x8047, 0x8043, 0x8048, 0x8118, 0x8125, 0x8119, - 0x811b, 0x812d, 0x811f, 0x812c, 0x811e, 0x8121, 0x8115, 0x8127, - 0x811d, 0x8122, 0x8211, 0x8238, 0x8233, 0x823a, 0x8234, 0x8232, - 0x8274, 0x8390, 0x83a3, 0x83a8, 0x838d, 0x837a, 0x8373, 0x83a4, - 0x8374, 0x838f, 0x8381, 0x8395, 0x8399, 0x8375, 0x8394, 0x83a9, - 0x837d, 0x8383, 0x838c, 0x839d, 0x839b, 0x83aa, 0x838b, 0x837e, - 0x83a5, 0x83af, 0x8388, 0x8397, 0x83b0, 0x837f, 0x83a6, 0x8387, - 0x83ae, 0x8376, 0x839a, 0x8659, 0x8656, 0x86bf, 0x86b7, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x86c2, 0x86c1, 0x86c5, 0x86ba, 0x86b0, 0x86c8, 0x86b9, - 0x86b3, 0x86b8, 0x86cc, 0x86b4, 0x86bb, 0x86bc, 0x86c3, 0x86bd, - 0x86be, 0x8852, 0x8889, 0x8895, 0x88a8, 0x88a2, 0x88aa, 0x889a, - 0x8891, 0x88a1, 0x889f, 0x8898, 0x88a7, 0x8899, 0x889b, 0x8897, - 0x88a4, 0x88ac, 0x888c, 0x8893, 0x888e, 0x8982, 0x89d6, 0x89d9, - 0x89d5, 0x8a30, 0x8a27, 0x8a2c, 0x8a1e, 0x8c39, 0x8c3b, 0x8c5c, - 0x8c5d, 0x8c7d, 0x8ca5, 0x8d7d, 0x8d7b, 0x8d79, 0x8dbc, 0x8dc2, - 0x8db9, 0x8dbf, 0x8dc1, 0x8ed8, 0x8ede, 0x8edd, 0x8edc, 0x8ed7, - 0x8ee0, 0x8ee1, 0x9024, 0x900b, 0x9011, 0x901c, 0x900c, 0x9021, - 0x90ef, 0x90ea, 0x90f0, 0x90f4, 0x90f2, 0x90f3, 0x90d4, 0x90eb, - 0x90ec, 0x90e9, 0x9156, 0x9158, 0x915a, 0x9153, 0x9155, 0x91ec, - 0x91f4, 0x91f1, 0x91f3, 0x91f8, 0x91e4, 0x91f9, 0x91ea, 0x003f, - /* lead byte d8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x91eb, 0x91f7, 0x91e8, 0x91ee, 0x957a, 0x9586, 0x9588, 0x967c, - 0x966d, 0x966b, 0x9671, 0x966f, 0x96bf, 0x976a, 0x9804, 0x98e5, - 0x9997, 0x509b, 0x5095, 0x5094, 0x509e, 0x508b, 0x50a3, 0x5083, - 0x508c, 0x508e, 0x509d, 0x5068, 0x509c, 0x5092, 0x5082, 0x5087, - 0x515f, 0x51d4, 0x5312, 0x5311, 0x53a4, 0x53a7, 0x5591, 0x55a8, - 0x55a5, 0x55ad, 0x5577, 0x5645, 0x55a2, 0x5593, 0x5588, 0x558f, - 0x55b5, 0x5581, 0x55a3, 0x5592, 0x55a4, 0x557d, 0x558c, 0x55a6, - 0x557f, 0x5595, 0x55a1, 0x558e, 0x570c, 0x5829, 0x5837, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5819, 0x581e, 0x5827, 0x5823, 0x5828, 0x57f5, 0x5848, - 0x5825, 0x581c, 0x581b, 0x5833, 0x583f, 0x5836, 0x582e, 0x5839, - 0x5838, 0x582d, 0x582c, 0x583b, 0x5961, 0x5aaf, 0x5a94, 0x5a9f, - 0x5a7a, 0x5aa2, 0x5a9e, 0x5a78, 0x5aa6, 0x5a7c, 0x5aa5, 0x5aac, - 0x5a95, 0x5aae, 0x5a37, 0x5a84, 0x5a8a, 0x5a97, 0x5a83, 0x5a8b, - 0x5aa9, 0x5a7b, 0x5a7d, 0x5a8c, 0x5a9c, 0x5a8f, 0x5a93, 0x5a9d, - 0x5bea, 0x5bcd, 0x5bcb, 0x5bd4, 0x5bd1, 0x5bca, 0x5bce, 0x5c0c, - 0x5c30, 0x5d37, 0x5d43, 0x5d6b, 0x5d41, 0x5d4b, 0x5d3f, 0x5d35, - 0x5d51, 0x5d4e, 0x5d55, 0x5d33, 0x5d3a, 0x5d52, 0x5d3d, 0x5d31, - 0x5d59, 0x5d42, 0x5d39, 0x5d49, 0x5d38, 0x5d3c, 0x5d32, 0x5d36, - 0x5d40, 0x5d45, 0x5e44, 0x5e41, 0x5f58, 0x5fa6, 0x5fa5, 0x5fab, - 0x60c9, 0x60b9, 0x60cc, 0x60e2, 0x60ce, 0x60c4, 0x6114, 0x003f, - /* lead byte d9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x60f2, 0x610a, 0x6116, 0x6105, 0x60f5, 0x6113, 0x60f8, 0x60fc, - 0x60fe, 0x60c1, 0x6103, 0x6118, 0x611d, 0x6110, 0x60ff, 0x6104, - 0x610b, 0x624a, 0x6394, 0x63b1, 0x63b0, 0x63ce, 0x63e5, 0x63e8, - 0x63ef, 0x63c3, 0x649d, 0x63f3, 0x63ca, 0x63e0, 0x63f6, 0x63d5, - 0x63f2, 0x63f5, 0x6461, 0x63df, 0x63be, 0x63dd, 0x63dc, 0x63c4, - 0x63d8, 0x63d3, 0x63c2, 0x63c7, 0x63cc, 0x63cb, 0x63c8, 0x63f0, - 0x63d7, 0x63d9, 0x6532, 0x6567, 0x656a, 0x6564, 0x655c, 0x6568, - 0x6565, 0x658c, 0x659d, 0x659e, 0x65ae, 0x65d0, 0x65d2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x667c, 0x666c, 0x667b, 0x6680, 0x6671, 0x6679, 0x666a, - 0x6672, 0x6701, 0x690c, 0x68d3, 0x6904, 0x68dc, 0x692a, 0x68ec, - 0x68ea, 0x68f1, 0x690f, 0x68d6, 0x68f7, 0x68eb, 0x68e4, 0x68f6, - 0x6913, 0x6910, 0x68f3, 0x68e1, 0x6907, 0x68cc, 0x6908, 0x6970, - 0x68b4, 0x6911, 0x68ef, 0x68c6, 0x6914, 0x68f8, 0x68d0, 0x68fd, - 0x68fc, 0x68e8, 0x690b, 0x690a, 0x6917, 0x68ce, 0x68c8, 0x68dd, - 0x68de, 0x68e6, 0x68f4, 0x68d1, 0x6906, 0x68d4, 0x68e9, 0x6915, - 0x6925, 0x68c7, 0x6b39, 0x6b3b, 0x6b3f, 0x6b3c, 0x6b94, 0x6b97, - 0x6b99, 0x6b95, 0x6bbd, 0x6bf0, 0x6bf2, 0x6bf3, 0x6c30, 0x6dfc, - 0x6e46, 0x6e47, 0x6e1f, 0x6e49, 0x6e88, 0x6e3c, 0x6e3d, 0x6e45, - 0x6e62, 0x6e2b, 0x6e3f, 0x6e41, 0x6e5d, 0x6e73, 0x6e1c, 0x6e33, - 0x6e4b, 0x6e40, 0x6e51, 0x6e3b, 0x6e03, 0x6e2e, 0x6e5e, 0x003f, - /* lead byte da */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6e68, 0x6e5c, 0x6e61, 0x6e31, 0x6e28, 0x6e60, 0x6e71, 0x6e6b, - 0x6e39, 0x6e22, 0x6e30, 0x6e53, 0x6e65, 0x6e27, 0x6e78, 0x6e64, - 0x6e77, 0x6e55, 0x6e79, 0x6e52, 0x6e66, 0x6e35, 0x6e36, 0x6e5a, - 0x7120, 0x711e, 0x712f, 0x70fb, 0x712e, 0x7131, 0x7123, 0x7125, - 0x7122, 0x7132, 0x711f, 0x7128, 0x713a, 0x711b, 0x724b, 0x725a, - 0x7288, 0x7289, 0x7286, 0x7285, 0x728b, 0x7312, 0x730b, 0x7330, - 0x7322, 0x7331, 0x7333, 0x7327, 0x7332, 0x732d, 0x7326, 0x7323, - 0x7335, 0x730c, 0x742e, 0x742c, 0x7430, 0x742b, 0x7416, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x741a, 0x7421, 0x742d, 0x7431, 0x7424, 0x7423, 0x741d, - 0x7429, 0x7420, 0x7432, 0x74fb, 0x752f, 0x756f, 0x756c, 0x75e7, - 0x75da, 0x75e1, 0x75e6, 0x75dd, 0x75df, 0x75e4, 0x75d7, 0x7695, - 0x7692, 0x76da, 0x7746, 0x7747, 0x7744, 0x774d, 0x7745, 0x774a, - 0x774e, 0x774b, 0x774c, 0x77de, 0x77ec, 0x7860, 0x7864, 0x7865, - 0x785c, 0x786d, 0x7871, 0x786a, 0x786e, 0x7870, 0x7869, 0x7868, - 0x785e, 0x7862, 0x7974, 0x7973, 0x7972, 0x7970, 0x7a02, 0x7a0a, - 0x7a03, 0x7a0c, 0x7a04, 0x7a99, 0x7ae6, 0x7ae4, 0x7b4a, 0x7b3b, - 0x7b44, 0x7b48, 0x7b4c, 0x7b4e, 0x7b40, 0x7b58, 0x7b45, 0x7ca2, - 0x7c9e, 0x7ca8, 0x7ca1, 0x7d58, 0x7d6f, 0x7d63, 0x7d53, 0x7d56, - 0x7d67, 0x7d6a, 0x7d4f, 0x7d6d, 0x7d5c, 0x7d6b, 0x7d52, 0x7d54, - 0x7d69, 0x7d51, 0x7d5f, 0x7d4e, 0x7f3e, 0x7f3f, 0x7f65, 0x003f, - /* lead byte db */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7f66, 0x7fa2, 0x7fa0, 0x7fa1, 0x7fd7, 0x8051, 0x804f, 0x8050, - 0x80fe, 0x80d4, 0x8143, 0x814a, 0x8152, 0x814f, 0x8147, 0x813d, - 0x814d, 0x813a, 0x81e6, 0x81ee, 0x81f7, 0x81f8, 0x81f9, 0x8204, - 0x823c, 0x823d, 0x823f, 0x8275, 0x833b, 0x83cf, 0x83f9, 0x8423, - 0x83c0, 0x83e8, 0x8412, 0x83e7, 0x83e4, 0x83fc, 0x83f6, 0x8410, - 0x83c6, 0x83c8, 0x83eb, 0x83e3, 0x83bf, 0x8401, 0x83dd, 0x83e5, - 0x83d8, 0x83ff, 0x83e1, 0x83cb, 0x83ce, 0x83d6, 0x83f5, 0x83c9, - 0x8409, 0x840f, 0x83de, 0x8411, 0x8406, 0x83c2, 0x83f3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x83d5, 0x83fa, 0x83c7, 0x83d1, 0x83ea, 0x8413, 0x83c3, - 0x83ec, 0x83ee, 0x83c4, 0x83fb, 0x83d7, 0x83e2, 0x841b, 0x83db, - 0x83fe, 0x86d8, 0x86e2, 0x86e6, 0x86d3, 0x86e3, 0x86da, 0x86ea, - 0x86dd, 0x86eb, 0x86dc, 0x86ec, 0x86e9, 0x86d7, 0x86e8, 0x86d1, - 0x8848, 0x8856, 0x8855, 0x88ba, 0x88d7, 0x88b9, 0x88b8, 0x88c0, - 0x88be, 0x88b6, 0x88bc, 0x88b7, 0x88bd, 0x88b2, 0x8901, 0x88c9, - 0x8995, 0x8998, 0x8997, 0x89dd, 0x89da, 0x89db, 0x8a4e, 0x8a4d, - 0x8a39, 0x8a59, 0x8a40, 0x8a57, 0x8a58, 0x8a44, 0x8a45, 0x8a52, - 0x8a48, 0x8a51, 0x8a4a, 0x8a4c, 0x8a4f, 0x8c5f, 0x8c81, 0x8c80, - 0x8cba, 0x8cbe, 0x8cb0, 0x8cb9, 0x8cb5, 0x8d84, 0x8d80, 0x8d89, - 0x8dd8, 0x8dd3, 0x8dcd, 0x8dc7, 0x8dd6, 0x8ddc, 0x8dcf, 0x8dd5, - 0x8dd9, 0x8dc8, 0x8dd7, 0x8dc5, 0x8eef, 0x8ef7, 0x8efa, 0x003f, - /* lead byte dc */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8ef9, 0x8ee6, 0x8eee, 0x8ee5, 0x8ef5, 0x8ee7, 0x8ee8, 0x8ef6, - 0x8eeb, 0x8ef1, 0x8eec, 0x8ef4, 0x8ee9, 0x902d, 0x9034, 0x902f, - 0x9106, 0x912c, 0x9104, 0x90ff, 0x90fc, 0x9108, 0x90f9, 0x90fb, - 0x9101, 0x9100, 0x9107, 0x9105, 0x9103, 0x9161, 0x9164, 0x915f, - 0x9162, 0x9160, 0x9201, 0x920a, 0x9225, 0x9203, 0x921a, 0x9226, - 0x920f, 0x920c, 0x9200, 0x9212, 0x91ff, 0x91fd, 0x9206, 0x9204, - 0x9227, 0x9202, 0x921c, 0x9224, 0x9219, 0x9217, 0x9205, 0x9216, - 0x957b, 0x958d, 0x958c, 0x9590, 0x9687, 0x967e, 0x9688, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9689, 0x9683, 0x9680, 0x96c2, 0x96c8, 0x96c3, 0x96f1, - 0x96f0, 0x976c, 0x9770, 0x976e, 0x9807, 0x98a9, 0x98eb, 0x9ce6, - 0x9ef9, 0x4e83, 0x4e84, 0x4eb6, 0x50bd, 0x50bf, 0x50c6, 0x50ae, - 0x50c4, 0x50ca, 0x50b4, 0x50c8, 0x50c2, 0x50b0, 0x50c1, 0x50ba, - 0x50b1, 0x50cb, 0x50c9, 0x50b6, 0x50b8, 0x51d7, 0x527a, 0x5278, - 0x527b, 0x527c, 0x55c3, 0x55db, 0x55cc, 0x55d0, 0x55cb, 0x55ca, - 0x55dd, 0x55c0, 0x55d4, 0x55c4, 0x55e9, 0x55bf, 0x55d2, 0x558d, - 0x55cf, 0x55d5, 0x55e2, 0x55d6, 0x55c8, 0x55f2, 0x55cd, 0x55d9, - 0x55c2, 0x5714, 0x5853, 0x5868, 0x5864, 0x584f, 0x584d, 0x5849, - 0x586f, 0x5855, 0x584e, 0x585d, 0x5859, 0x5865, 0x585b, 0x583d, - 0x5863, 0x5871, 0x58fc, 0x5ac7, 0x5ac4, 0x5acb, 0x5aba, 0x5ab8, - 0x5ab1, 0x5ab5, 0x5ab0, 0x5abf, 0x5ac8, 0x5abb, 0x5ac6, 0x003f, - /* lead byte dd */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x5ab7, 0x5ac0, 0x5aca, 0x5ab4, 0x5ab6, 0x5acd, 0x5ab9, 0x5a90, - 0x5bd6, 0x5bd8, 0x5bd9, 0x5c1f, 0x5c33, 0x5d71, 0x5d63, 0x5d4a, - 0x5d65, 0x5d72, 0x5d6c, 0x5d5e, 0x5d68, 0x5d67, 0x5d62, 0x5df0, - 0x5e4f, 0x5e4e, 0x5e4a, 0x5e4d, 0x5e4b, 0x5ec5, 0x5ecc, 0x5ec6, - 0x5ecb, 0x5ec7, 0x5f40, 0x5faf, 0x5fad, 0x60f7, 0x6149, 0x614a, - 0x612b, 0x6145, 0x6136, 0x6132, 0x612e, 0x6146, 0x612f, 0x614f, - 0x6129, 0x6140, 0x6220, 0x9168, 0x6223, 0x6225, 0x6224, 0x63c5, - 0x63f1, 0x63eb, 0x6410, 0x6412, 0x6409, 0x6420, 0x6424, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6433, 0x6443, 0x641f, 0x6415, 0x6418, 0x6439, 0x6437, - 0x6422, 0x6423, 0x640c, 0x6426, 0x6430, 0x6428, 0x6441, 0x6435, - 0x642f, 0x640a, 0x641a, 0x6440, 0x6425, 0x6427, 0x640b, 0x63e7, - 0x641b, 0x642e, 0x6421, 0x640e, 0x656f, 0x6592, 0x65d3, 0x6686, - 0x668c, 0x6695, 0x6690, 0x668b, 0x668a, 0x6699, 0x6694, 0x6678, - 0x6720, 0x6966, 0x695f, 0x6938, 0x694e, 0x6962, 0x6971, 0x693f, - 0x6945, 0x696a, 0x6939, 0x6942, 0x6957, 0x6959, 0x697a, 0x6948, - 0x6949, 0x6935, 0x696c, 0x6933, 0x693d, 0x6965, 0x68f0, 0x6978, - 0x6934, 0x6969, 0x6940, 0x696f, 0x6944, 0x6976, 0x6958, 0x6941, - 0x6974, 0x694c, 0x693b, 0x694b, 0x6937, 0x695c, 0x694f, 0x6951, - 0x6932, 0x6952, 0x692f, 0x697b, 0x693c, 0x6b46, 0x6b45, 0x6b43, - 0x6b42, 0x6b48, 0x6b41, 0x6b9b, 0xfa0d, 0x6bfb, 0x6bfc, 0x003f, - /* lead byte de */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6bf9, 0x6bf7, 0x6bf8, 0x6e9b, 0x6ed6, 0x6ec8, 0x6e8f, 0x6ec0, - 0x6e9f, 0x6e93, 0x6e94, 0x6ea0, 0x6eb1, 0x6eb9, 0x6ec6, 0x6ed2, - 0x6ebd, 0x6ec1, 0x6e9e, 0x6ec9, 0x6eb7, 0x6eb0, 0x6ecd, 0x6ea6, - 0x6ecf, 0x6eb2, 0x6ebe, 0x6ec3, 0x6edc, 0x6ed8, 0x6e99, 0x6e92, - 0x6e8e, 0x6e8d, 0x6ea4, 0x6ea1, 0x6ebf, 0x6eb3, 0x6ed0, 0x6eca, - 0x6e97, 0x6eae, 0x6ea3, 0x7147, 0x7154, 0x7152, 0x7163, 0x7160, - 0x7141, 0x715d, 0x7162, 0x7172, 0x7178, 0x716a, 0x7161, 0x7142, - 0x7158, 0x7143, 0x714b, 0x7170, 0x715f, 0x7150, 0x7153, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7144, 0x714d, 0x715a, 0x724f, 0x728d, 0x728c, 0x7291, - 0x7290, 0x728e, 0x733c, 0x7342, 0x733b, 0x733a, 0x7340, 0x734a, - 0x7349, 0x7444, 0x744a, 0x744b, 0x7452, 0x7451, 0x7457, 0x7440, - 0x744f, 0x7450, 0x744e, 0x7442, 0x7446, 0x744d, 0x7454, 0x74e1, - 0x74ff, 0x74fe, 0x74fd, 0x751d, 0x7579, 0x7577, 0x6983, 0x75ef, - 0x760f, 0x7603, 0x75f7, 0x75fe, 0x75fc, 0x75f9, 0x75f8, 0x7610, - 0x75fb, 0x75f6, 0x75ed, 0x75f5, 0x75fd, 0x7699, 0x76b5, 0x76dd, - 0x7755, 0x775f, 0x7760, 0x7752, 0x7756, 0x775a, 0x7769, 0x7767, - 0x7754, 0x7759, 0x776d, 0x77e0, 0x7887, 0x789a, 0x7894, 0x788f, - 0x7884, 0x7895, 0x7885, 0x7886, 0x78a1, 0x7883, 0x7879, 0x7899, - 0x7880, 0x7896, 0x787b, 0x797c, 0x7982, 0x797d, 0x7979, 0x7a11, - 0x7a18, 0x7a19, 0x7a12, 0x7a17, 0x7a15, 0x7a22, 0x7a13, 0x003f, - /* lead byte df */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7a1b, 0x7a10, 0x7aa3, 0x7aa2, 0x7a9e, 0x7aeb, 0x7b66, 0x7b64, - 0x7b6d, 0x7b74, 0x7b69, 0x7b72, 0x7b65, 0x7b73, 0x7b71, 0x7b70, - 0x7b61, 0x7b78, 0x7b76, 0x7b63, 0x7cb2, 0x7cb4, 0x7caf, 0x7d88, - 0x7d86, 0x7d80, 0x7d8d, 0x7d7f, 0x7d85, 0x7d7a, 0x7d8e, 0x7d7b, - 0x7d83, 0x7d7c, 0x7d8c, 0x7d94, 0x7d84, 0x7d7d, 0x7d92, 0x7f6d, - 0x7f6b, 0x7f67, 0x7f68, 0x7f6c, 0x7fa6, 0x7fa5, 0x7fa7, 0x7fdb, - 0x7fdc, 0x8021, 0x8164, 0x8160, 0x8177, 0x815c, 0x8169, 0x815b, - 0x8162, 0x8172, 0x6721, 0x815e, 0x8176, 0x8167, 0x816f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8144, 0x8161, 0x821d, 0x8249, 0x8244, 0x8240, 0x8242, - 0x8245, 0x84f1, 0x843f, 0x8456, 0x8476, 0x8479, 0x848f, 0x848d, - 0x8465, 0x8451, 0x8440, 0x8486, 0x8467, 0x8430, 0x844d, 0x847d, - 0x845a, 0x8459, 0x8474, 0x8473, 0x845d, 0x8507, 0x845e, 0x8437, - 0x843a, 0x8434, 0x847a, 0x8443, 0x8478, 0x8432, 0x8445, 0x8429, - 0x83d9, 0x844b, 0x842f, 0x8442, 0x842d, 0x845f, 0x8470, 0x8439, - 0x844e, 0x844c, 0x8452, 0x846f, 0x84c5, 0x848e, 0x843b, 0x8447, - 0x8436, 0x8433, 0x8468, 0x847e, 0x8444, 0x842b, 0x8460, 0x8454, - 0x846e, 0x8450, 0x870b, 0x8704, 0x86f7, 0x870c, 0x86fa, 0x86d6, - 0x86f5, 0x874d, 0x86f8, 0x870e, 0x8709, 0x8701, 0x86f6, 0x870d, - 0x8705, 0x88d6, 0x88cb, 0x88cd, 0x88ce, 0x88de, 0x88db, 0x88da, - 0x88cc, 0x88d0, 0x8985, 0x899b, 0x89df, 0x89e5, 0x89e4, 0x003f, - /* lead byte e0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x89e1, 0x89e0, 0x89e2, 0x89dc, 0x89e6, 0x8a76, 0x8a86, 0x8a7f, - 0x8a61, 0x8a3f, 0x8a77, 0x8a82, 0x8a84, 0x8a75, 0x8a83, 0x8a81, - 0x8a74, 0x8a7a, 0x8c3c, 0x8c4b, 0x8c4a, 0x8c65, 0x8c64, 0x8c66, - 0x8c86, 0x8c84, 0x8c85, 0x8ccc, 0x8d68, 0x8d69, 0x8d91, 0x8d8c, - 0x8d8e, 0x8d8f, 0x8d8d, 0x8d93, 0x8d94, 0x8d90, 0x8d92, 0x8df0, - 0x8de0, 0x8dec, 0x8df1, 0x8dee, 0x8dd0, 0x8de9, 0x8de3, 0x8de2, - 0x8de7, 0x8df2, 0x8deb, 0x8df4, 0x8f06, 0x8eff, 0x8f01, 0x8f00, - 0x8f05, 0x8f07, 0x8f08, 0x8f02, 0x8f0b, 0x9052, 0x903f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9044, 0x9049, 0x903d, 0x9110, 0x910d, 0x910f, 0x9111, - 0x9116, 0x9114, 0x910b, 0x910e, 0x916e, 0x916f, 0x9248, 0x9252, - 0x9230, 0x923a, 0x9266, 0x9233, 0x9265, 0x925e, 0x9283, 0x922e, - 0x924a, 0x9246, 0x926d, 0x926c, 0x924f, 0x9260, 0x9267, 0x926f, - 0x9236, 0x9261, 0x9270, 0x9231, 0x9254, 0x9263, 0x9250, 0x9272, - 0x924e, 0x9253, 0x924c, 0x9256, 0x9232, 0x959f, 0x959c, 0x959e, - 0x959b, 0x9692, 0x9693, 0x9691, 0x9697, 0x96ce, 0x96fa, 0x96fd, - 0x96f8, 0x96f5, 0x9773, 0x9777, 0x9778, 0x9772, 0x980f, 0x980d, - 0x980e, 0x98ac, 0x98f6, 0x98f9, 0x99af, 0x99b2, 0x99b0, 0x99b5, - 0x9aad, 0x9aab, 0x9b5b, 0x9cea, 0x9ced, 0x9ce7, 0x9e80, 0x9efd, - 0x50e6, 0x50d4, 0x50d7, 0x50e8, 0x50f3, 0x50db, 0x50ea, 0x50dd, - 0x50e4, 0x50d3, 0x50ec, 0x50f0, 0x50ef, 0x50e3, 0x50e0, 0x003f, - /* lead byte e1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x51d8, 0x5280, 0x5281, 0x52e9, 0x52eb, 0x5330, 0x53ac, 0x5627, - 0x5615, 0x560c, 0x5612, 0x55fc, 0x560f, 0x561c, 0x5601, 0x5613, - 0x5602, 0x55fa, 0x561d, 0x5604, 0x55ff, 0x55f9, 0x5889, 0x587c, - 0x5890, 0x5898, 0x5886, 0x5881, 0x587f, 0x5874, 0x588b, 0x587a, - 0x5887, 0x5891, 0x588e, 0x5876, 0x5882, 0x5888, 0x587b, 0x5894, - 0x588f, 0x58fe, 0x596b, 0x5adc, 0x5aee, 0x5ae5, 0x5ad5, 0x5aea, - 0x5ada, 0x5aed, 0x5aeb, 0x5af3, 0x5ae2, 0x5ae0, 0x5adb, 0x5aec, - 0x5ade, 0x5add, 0x5ad9, 0x5ae8, 0x5adf, 0x5b77, 0x5be0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x5be3, 0x5c63, 0x5d82, 0x5d80, 0x5d7d, 0x5d86, 0x5d7a, - 0x5d81, 0x5d77, 0x5d8a, 0x5d89, 0x5d88, 0x5d7e, 0x5d7c, 0x5d8d, - 0x5d79, 0x5d7f, 0x5e58, 0x5e59, 0x5e53, 0x5ed8, 0x5ed1, 0x5ed7, - 0x5ece, 0x5edc, 0x5ed5, 0x5ed9, 0x5ed2, 0x5ed4, 0x5f44, 0x5f43, - 0x5f6f, 0x5fb6, 0x612c, 0x6128, 0x6141, 0x615e, 0x6171, 0x6173, - 0x6152, 0x6153, 0x6172, 0x616c, 0x6180, 0x6174, 0x6154, 0x617a, - 0x615b, 0x6165, 0x613b, 0x616a, 0x6161, 0x6156, 0x6229, 0x6227, - 0x622b, 0x642b, 0x644d, 0x645b, 0x645d, 0x6474, 0x6476, 0x6472, - 0x6473, 0x647d, 0x6475, 0x6466, 0x64a6, 0x644e, 0x6482, 0x645e, - 0x645c, 0x644b, 0x6453, 0x6460, 0x6450, 0x647f, 0x643f, 0x646c, - 0x646b, 0x6459, 0x6465, 0x6477, 0x6573, 0x65a0, 0x66a1, 0x66a0, - 0x669f, 0x6705, 0x6704, 0x6722, 0x69b1, 0x69b6, 0x69c9, 0x003f, - /* lead byte e2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x69a0, 0x69ce, 0x6996, 0x69b0, 0x69ac, 0x69bc, 0x6991, 0x6999, - 0x698e, 0x69a7, 0x698d, 0x69a9, 0x69be, 0x69af, 0x69bf, 0x69c4, - 0x69bd, 0x69a4, 0x69d4, 0x69b9, 0x69ca, 0x699a, 0x69cf, 0x69b3, - 0x6993, 0x69aa, 0x69a1, 0x699e, 0x69d9, 0x6997, 0x6990, 0x69c2, - 0x69b5, 0x69a5, 0x69c6, 0x6b4a, 0x6b4d, 0x6b4b, 0x6b9e, 0x6b9f, - 0x6ba0, 0x6bc3, 0x6bc4, 0x6bfe, 0x6ece, 0x6ef5, 0x6ef1, 0x6f03, - 0x6f25, 0x6ef8, 0x6f37, 0x6efb, 0x6f2e, 0x6f09, 0x6f4e, 0x6f19, - 0x6f1a, 0x6f27, 0x6f18, 0x6f3b, 0x6f12, 0x6eed, 0x6f0a, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x6f36, 0x6f73, 0x6ef9, 0x6eee, 0x6f2d, 0x6f40, 0x6f30, - 0x6f3c, 0x6f35, 0x6eeb, 0x6f07, 0x6f0e, 0x6f43, 0x6f05, 0x6efd, - 0x6ef6, 0x6f39, 0x6f1c, 0x6efc, 0x6f3a, 0x6f1f, 0x6f0d, 0x6f1e, - 0x6f08, 0x6f21, 0x7187, 0x7190, 0x7189, 0x7180, 0x7185, 0x7182, - 0x718f, 0x717b, 0x7186, 0x7181, 0x7197, 0x7244, 0x7253, 0x7297, - 0x7295, 0x7293, 0x7343, 0x734d, 0x7351, 0x734c, 0x7462, 0x7473, - 0x7471, 0x7475, 0x7472, 0x7467, 0x746e, 0x7500, 0x7502, 0x7503, - 0x757d, 0x7590, 0x7616, 0x7608, 0x760c, 0x7615, 0x7611, 0x760a, - 0x7614, 0x76b8, 0x7781, 0x777c, 0x7785, 0x7782, 0x776e, 0x7780, - 0x776f, 0x777e, 0x7783, 0x78b2, 0x78aa, 0x78b4, 0x78ad, 0x78a8, - 0x787e, 0x78ab, 0x789e, 0x78a5, 0x78a0, 0x78ac, 0x78a2, 0x78a4, - 0x7998, 0x798a, 0x798b, 0x7996, 0x7995, 0x7994, 0x7993, 0x003f, - /* lead byte e3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7997, 0x7988, 0x7992, 0x7990, 0x7a2b, 0x7a4a, 0x7a30, 0x7a2f, - 0x7a28, 0x7a26, 0x7aa8, 0x7aab, 0x7aac, 0x7aee, 0x7b88, 0x7b9c, - 0x7b8a, 0x7b91, 0x7b90, 0x7b96, 0x7b8d, 0x7b8c, 0x7b9b, 0x7b8e, - 0x7b85, 0x7b98, 0x5284, 0x7b99, 0x7ba4, 0x7b82, 0x7cbb, 0x7cbf, - 0x7cbc, 0x7cba, 0x7da7, 0x7db7, 0x7dc2, 0x7da3, 0x7daa, 0x7dc1, - 0x7dc0, 0x7dc5, 0x7d9d, 0x7dce, 0x7dc4, 0x7dc6, 0x7dcb, 0x7dcc, - 0x7daf, 0x7db9, 0x7d96, 0x7dbc, 0x7d9f, 0x7da6, 0x7dae, 0x7da9, - 0x7da1, 0x7dc9, 0x7f73, 0x7fe2, 0x7fe3, 0x7fe5, 0x7fde, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8024, 0x805d, 0x805c, 0x8189, 0x8186, 0x8183, 0x8187, - 0x818d, 0x818c, 0x818b, 0x8215, 0x8497, 0x84a4, 0x84a1, 0x849f, - 0x84ba, 0x84ce, 0x84c2, 0x84ac, 0x84ae, 0x84ab, 0x84b9, 0x84b4, - 0x84c1, 0x84cd, 0x84aa, 0x849a, 0x84b1, 0x84d0, 0x849d, 0x84a7, - 0x84bb, 0x84a2, 0x8494, 0x84c7, 0x84cc, 0x849b, 0x84a9, 0x84af, - 0x84a8, 0x84d6, 0x8498, 0x84b6, 0x84cf, 0x84a0, 0x84d7, 0x84d4, - 0x84d2, 0x84db, 0x84b0, 0x8491, 0x8661, 0x8733, 0x8723, 0x8728, - 0x876b, 0x8740, 0x872e, 0x871e, 0x8721, 0x8719, 0x871b, 0x8743, - 0x872c, 0x8741, 0x873e, 0x8746, 0x8720, 0x8732, 0x872a, 0x872d, - 0x873c, 0x8712, 0x873a, 0x8731, 0x8735, 0x8742, 0x8726, 0x8727, - 0x8738, 0x8724, 0x871a, 0x8730, 0x8711, 0x88f7, 0x88e7, 0x88f1, - 0x88f2, 0x88fa, 0x88fe, 0x88ee, 0x88fc, 0x88f6, 0x88fb, 0x003f, - /* lead byte e4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x88f0, 0x88ec, 0x88eb, 0x899d, 0x89a1, 0x899f, 0x899e, 0x89e9, - 0x89eb, 0x89e8, 0x8aab, 0x8a99, 0x8a8b, 0x8a92, 0x8a8f, 0x8a96, - 0x8c3d, 0x8c68, 0x8c69, 0x8cd5, 0x8ccf, 0x8cd7, 0x8d96, 0x8e09, - 0x8e02, 0x8dff, 0x8e0d, 0x8dfd, 0x8e0a, 0x8e03, 0x8e07, 0x8e06, - 0x8e05, 0x8dfe, 0x8e00, 0x8e04, 0x8f10, 0x8f11, 0x8f0e, 0x8f0d, - 0x9123, 0x911c, 0x9120, 0x9122, 0x911f, 0x911d, 0x911a, 0x9124, - 0x9121, 0x911b, 0x917a, 0x9172, 0x9179, 0x9173, 0x92a5, 0x92a4, - 0x9276, 0x929b, 0x927a, 0x92a0, 0x9294, 0x92aa, 0x928d, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x92a6, 0x929a, 0x92ab, 0x9279, 0x9297, 0x927f, 0x92a3, - 0x92ee, 0x928e, 0x9282, 0x9295, 0x92a2, 0x927d, 0x9288, 0x92a1, - 0x928a, 0x9286, 0x928c, 0x9299, 0x92a7, 0x927e, 0x9287, 0x92a9, - 0x929d, 0x928b, 0x922d, 0x969e, 0x96a1, 0x96ff, 0x9758, 0x977d, - 0x977a, 0x977e, 0x9783, 0x9780, 0x9782, 0x977b, 0x9784, 0x9781, - 0x977f, 0x97ce, 0x97cd, 0x9816, 0x98ad, 0x98ae, 0x9902, 0x9900, - 0x9907, 0x999d, 0x999c, 0x99c3, 0x99b9, 0x99bb, 0x99ba, 0x99c2, - 0x99bd, 0x99c7, 0x9ab1, 0x9ae3, 0x9ae7, 0x9b3e, 0x9b3f, 0x9b60, - 0x9b61, 0x9b5f, 0x9cf1, 0x9cf2, 0x9cf5, 0x9ea7, 0x50ff, 0x5103, - 0x5130, 0x50f8, 0x5106, 0x5107, 0x50f6, 0x50fe, 0x510b, 0x510c, - 0x50fd, 0x510a, 0x528b, 0x528c, 0x52f1, 0x52ef, 0x5648, 0x5642, - 0x564c, 0x5635, 0x5641, 0x564a, 0x5649, 0x5646, 0x5658, 0x003f, - /* lead byte e5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x565a, 0x5640, 0x5633, 0x563d, 0x562c, 0x563e, 0x5638, 0x562a, - 0x563a, 0x571a, 0x58ab, 0x589d, 0x58b1, 0x58a0, 0x58a3, 0x58af, - 0x58ac, 0x58a5, 0x58a1, 0x58ff, 0x5aff, 0x5af4, 0x5afd, 0x5af7, - 0x5af6, 0x5b03, 0x5af8, 0x5b02, 0x5af9, 0x5b01, 0x5b07, 0x5b05, - 0x5b0f, 0x5c67, 0x5d99, 0x5d97, 0x5d9f, 0x5d92, 0x5da2, 0x5d93, - 0x5d95, 0x5da0, 0x5d9c, 0x5da1, 0x5d9a, 0x5d9e, 0x5e69, 0x5e5d, - 0x5e60, 0x5e5c, 0x7df3, 0x5edb, 0x5ede, 0x5ee1, 0x5f49, 0x5fb2, - 0x618b, 0x6183, 0x6179, 0x61b1, 0x61b0, 0x61a2, 0x6189, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x619b, 0x6193, 0x61af, 0x61ad, 0x619f, 0x6192, 0x61aa, - 0x61a1, 0x618d, 0x6166, 0x61b3, 0x622d, 0x646e, 0x6470, 0x6496, - 0x64a0, 0x6485, 0x6497, 0x649c, 0x648f, 0x648b, 0x648a, 0x648c, - 0x64a3, 0x649f, 0x6468, 0x64b1, 0x6498, 0x6576, 0x657a, 0x6579, - 0x657b, 0x65b2, 0x65b3, 0x66b5, 0x66b0, 0x66a9, 0x66b2, 0x66b7, - 0x66aa, 0x66af, 0x6a00, 0x6a06, 0x6a17, 0x69e5, 0x69f8, 0x6a15, - 0x69f1, 0x69e4, 0x6a20, 0x69ff, 0x69ec, 0x69e2, 0x6a1b, 0x6a1d, - 0x69fe, 0x6a27, 0x69f2, 0x69ee, 0x6a14, 0x69f7, 0x69e7, 0x6a40, - 0x6a08, 0x69e6, 0x69fb, 0x6a0d, 0x69fc, 0x69eb, 0x6a09, 0x6a04, - 0x6a18, 0x6a25, 0x6a0f, 0x69f6, 0x6a26, 0x6a07, 0x69f4, 0x6a16, - 0x6b51, 0x6ba5, 0x6ba3, 0x6ba2, 0x6ba6, 0x6c01, 0x6c00, 0x6bff, - 0x6c02, 0x6f41, 0x6f26, 0x6f7e, 0x6f87, 0x6fc6, 0x6f92, 0x003f, - /* lead byte e6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6f8d, 0x6f89, 0x6f8c, 0x6f62, 0x6f4f, 0x6f85, 0x6f5a, 0x6f96, - 0x6f76, 0x6f6c, 0x6f82, 0x6f55, 0x6f72, 0x6f52, 0x6f50, 0x6f57, - 0x6f94, 0x6f93, 0x6f5d, 0x6f00, 0x6f61, 0x6f6b, 0x6f7d, 0x6f67, - 0x6f90, 0x6f53, 0x6f8b, 0x6f69, 0x6f7f, 0x6f95, 0x6f63, 0x6f77, - 0x6f6a, 0x6f7b, 0x71b2, 0x71af, 0x719b, 0x71b0, 0x71a0, 0x719a, - 0x71a9, 0x71b5, 0x719d, 0x71a5, 0x719e, 0x71a4, 0x71a1, 0x71aa, - 0x719c, 0x71a7, 0x71b3, 0x7298, 0x729a, 0x7358, 0x7352, 0x735e, - 0x735f, 0x7360, 0x735d, 0x735b, 0x7361, 0x735a, 0x7359, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7362, 0x7487, 0x7489, 0x748a, 0x7486, 0x7481, 0x747d, - 0x7485, 0x7488, 0x747c, 0x7479, 0x7508, 0x7507, 0x757e, 0x7625, - 0x761e, 0x7619, 0x761d, 0x761c, 0x7623, 0x761a, 0x7628, 0x761b, - 0x769c, 0x769d, 0x769e, 0x769b, 0x778d, 0x778f, 0x7789, 0x7788, - 0x78cd, 0x78bb, 0x78cf, 0x78cc, 0x78d1, 0x78ce, 0x78d4, 0x78c8, - 0x78c3, 0x78c4, 0x78c9, 0x799a, 0x79a1, 0x79a0, 0x799c, 0x79a2, - 0x799b, 0x6b76, 0x7a39, 0x7ab2, 0x7ab4, 0x7ab3, 0x7bb7, 0x7bcb, - 0x7bbe, 0x7bac, 0x7bce, 0x7baf, 0x7bb9, 0x7bca, 0x7bb5, 0x7cc5, - 0x7cc8, 0x7ccc, 0x7ccb, 0x7df7, 0x7ddb, 0x7dea, 0x7de7, 0x7dd7, - 0x7de1, 0x7e03, 0x7dfa, 0x7de6, 0x7df6, 0x7df1, 0x7df0, 0x7dee, - 0x7ddf, 0x7f76, 0x7fac, 0x7fb0, 0x7fad, 0x7fed, 0x7feb, 0x7fea, - 0x7fec, 0x7fe6, 0x7fe8, 0x8064, 0x8067, 0x81a3, 0x819f, 0x003f, - /* lead byte e7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x819e, 0x8195, 0x81a2, 0x8199, 0x8197, 0x8216, 0x824f, 0x8253, - 0x8252, 0x8250, 0x824e, 0x8251, 0x8524, 0x853b, 0x850f, 0x8500, - 0x8529, 0x850e, 0x8509, 0x850d, 0x851f, 0x850a, 0x8527, 0x851c, - 0x84fb, 0x852b, 0x84fa, 0x8508, 0x850c, 0x84f4, 0x852a, 0x84f2, - 0x8515, 0x84f7, 0x84eb, 0x84f3, 0x84fc, 0x8512, 0x84ea, 0x84e9, - 0x8516, 0x84fe, 0x8528, 0x851d, 0x852e, 0x8502, 0x84fd, 0x851e, - 0x84f6, 0x8531, 0x8526, 0x84e7, 0x84e8, 0x84f0, 0x84ef, 0x84f9, - 0x8518, 0x8520, 0x8530, 0x850b, 0x8519, 0x852f, 0x8662, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8756, 0x8763, 0x8764, 0x8777, 0x87e1, 0x8773, 0x8758, - 0x8754, 0x875b, 0x8752, 0x8761, 0x875a, 0x8751, 0x875e, 0x876d, - 0x876a, 0x8750, 0x874e, 0x875f, 0x875d, 0x876f, 0x876c, 0x877a, - 0x876e, 0x875c, 0x8765, 0x874f, 0x877b, 0x8775, 0x8762, 0x8767, - 0x8769, 0x885a, 0x8905, 0x890c, 0x8914, 0x890b, 0x8917, 0x8918, - 0x8919, 0x8906, 0x8916, 0x8911, 0x890e, 0x8909, 0x89a2, 0x89a4, - 0x89a3, 0x89ed, 0x89f0, 0x89ec, 0x8acf, 0x8ac6, 0x8ab8, 0x8ad3, - 0x8ad1, 0x8ad4, 0x8ad5, 0x8abb, 0x8ad7, 0x8abe, 0x8ac0, 0x8ac5, - 0x8ad8, 0x8ac3, 0x8aba, 0x8abd, 0x8ad9, 0x8c3e, 0x8c4d, 0x8c8f, - 0x8ce5, 0x8cdf, 0x8cd9, 0x8ce8, 0x8cda, 0x8cdd, 0x8ce7, 0x8da0, - 0x8d9c, 0x8da1, 0x8d9b, 0x8e20, 0x8e23, 0x8e25, 0x8e24, 0x8e2e, - 0x8e15, 0x8e1b, 0x8e16, 0x8e11, 0x8e19, 0x8e26, 0x8e27, 0x003f, - /* lead byte e8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8e14, 0x8e12, 0x8e18, 0x8e13, 0x8e1c, 0x8e17, 0x8e1a, 0x8f2c, - 0x8f24, 0x8f18, 0x8f1a, 0x8f20, 0x8f23, 0x8f16, 0x8f17, 0x9073, - 0x9070, 0x906f, 0x9067, 0x906b, 0x912f, 0x912b, 0x9129, 0x912a, - 0x9132, 0x9126, 0x912e, 0x9185, 0x9186, 0x918a, 0x9181, 0x9182, - 0x9184, 0x9180, 0x92d0, 0x92c3, 0x92c4, 0x92c0, 0x92d9, 0x92b6, - 0x92cf, 0x92f1, 0x92df, 0x92d8, 0x92e9, 0x92d7, 0x92dd, 0x92cc, - 0x92ef, 0x92c2, 0x92e8, 0x92ca, 0x92c8, 0x92ce, 0x92e6, 0x92cd, - 0x92d5, 0x92c9, 0x92e0, 0x92de, 0x92e7, 0x92d1, 0x92d3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x92b5, 0x92e1, 0x92c6, 0x92b4, 0x957c, 0x95ac, 0x95ab, - 0x95ae, 0x95b0, 0x96a4, 0x96a2, 0x96d3, 0x9705, 0x9708, 0x9702, - 0x975a, 0x978a, 0x978e, 0x9788, 0x97d0, 0x97cf, 0x981e, 0x981d, - 0x9826, 0x9829, 0x9828, 0x9820, 0x981b, 0x9827, 0x98b2, 0x9908, - 0x98fa, 0x9911, 0x9914, 0x9916, 0x9917, 0x9915, 0x99dc, 0x99cd, - 0x99cf, 0x99d3, 0x99d4, 0x99ce, 0x99c9, 0x99d6, 0x99d8, 0x99cb, - 0x99d7, 0x99cc, 0x9ab3, 0x9aec, 0x9aeb, 0x9af3, 0x9af2, 0x9af1, - 0x9b46, 0x9b43, 0x9b67, 0x9b74, 0x9b71, 0x9b66, 0x9b76, 0x9b75, - 0x9b70, 0x9b68, 0x9b64, 0x9b6c, 0x9cfc, 0x9cfa, 0x9cfd, 0x9cff, - 0x9cf7, 0x9d07, 0x9d00, 0x9cf9, 0x9cfb, 0x9d08, 0x9d05, 0x9d04, - 0x9e83, 0x9ed3, 0x9f0f, 0x9f10, 0x511c, 0x5113, 0x5117, 0x511a, - 0x5111, 0x51de, 0x5334, 0x53e1, 0x5670, 0x5660, 0x566e, 0x003f, - /* lead byte e9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x5673, 0x5666, 0x5663, 0x566d, 0x5672, 0x565e, 0x5677, 0x571c, - 0x571b, 0x58c8, 0x58bd, 0x58c9, 0x58bf, 0x58ba, 0x58c2, 0x58bc, - 0x58c6, 0x5b17, 0x5b19, 0x5b1b, 0x5b21, 0x5b14, 0x5b13, 0x5b10, - 0x5b16, 0x5b28, 0x5b1a, 0x5b20, 0x5b1e, 0x5bef, 0x5dac, 0x5db1, - 0x5da9, 0x5da7, 0x5db5, 0x5db0, 0x5dae, 0x5daa, 0x5da8, 0x5db2, - 0x5dad, 0x5daf, 0x5db4, 0x5e67, 0x5e68, 0x5e66, 0x5e6f, 0x5ee9, - 0x5ee7, 0x5ee6, 0x5ee8, 0x5ee5, 0x5f4b, 0x5fbc, 0x619d, 0x61a8, - 0x6196, 0x61c5, 0x61b4, 0x61c6, 0x61c1, 0x61cc, 0x61ba, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x61bf, 0x61b8, 0x618c, 0x64d7, 0x64d6, 0x64d0, 0x64cf, - 0x64c9, 0x64bd, 0x6489, 0x64c3, 0x64db, 0x64f3, 0x64d9, 0x6533, - 0x657f, 0x657c, 0x65a2, 0x66c8, 0x66be, 0x66c0, 0x66ca, 0x66cb, - 0x66cf, 0x66bd, 0x66bb, 0x66ba, 0x66cc, 0x6723, 0x6a34, 0x6a66, - 0x6a49, 0x6a67, 0x6a32, 0x6a68, 0x6a3e, 0x6a5d, 0x6a6d, 0x6a76, - 0x6a5b, 0x6a51, 0x6a28, 0x6a5a, 0x6a3b, 0x6a3f, 0x6a41, 0x6a6a, - 0x6a64, 0x6a50, 0x6a4f, 0x6a54, 0x6a6f, 0x6a69, 0x6a60, 0x6a3c, - 0x6a5e, 0x6a56, 0x6a55, 0x6a4d, 0x6a4e, 0x6a46, 0x6b55, 0x6b54, - 0x6b56, 0x6ba7, 0x6baa, 0x6bab, 0x6bc8, 0x6bc7, 0x6c04, 0x6c03, - 0x6c06, 0x6fad, 0x6fcb, 0x6fa3, 0x6fc7, 0x6fbc, 0x6fce, 0x6fc8, - 0x6f5e, 0x6fc4, 0x6fbd, 0x6f9e, 0x6fca, 0x6fa8, 0x7004, 0x6fa5, - 0x6fae, 0x6fba, 0x6fac, 0x6faa, 0x6fcf, 0x6fbf, 0x6fb8, 0x003f, - /* lead byte ea */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6fa2, 0x6fc9, 0x6fab, 0x6fcd, 0x6faf, 0x6fb2, 0x6fb0, 0x71c5, - 0x71c2, 0x71bf, 0x71b8, 0x71d6, 0x71c0, 0x71c1, 0x71cb, 0x71d4, - 0x71ca, 0x71c7, 0x71cf, 0x71bd, 0x71d8, 0x71bc, 0x71c6, 0x71da, - 0x71db, 0x729d, 0x729e, 0x7369, 0x7366, 0x7367, 0x736c, 0x7365, - 0x736b, 0x736a, 0x747f, 0x749a, 0x74a0, 0x7494, 0x7492, 0x7495, - 0x74a1, 0x750b, 0x7580, 0x762f, 0x762d, 0x7631, 0x763d, 0x7633, - 0x763c, 0x7635, 0x7632, 0x7630, 0x76bb, 0x76e6, 0x779a, 0x779d, - 0x77a1, 0x779c, 0x779b, 0x77a2, 0x77a3, 0x7795, 0x7799, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7797, 0x78dd, 0x78e9, 0x78e5, 0x78ea, 0x78de, 0x78e3, - 0x78db, 0x78e1, 0x78e2, 0x78ed, 0x78df, 0x78e0, 0x79a4, 0x7a44, - 0x7a48, 0x7a47, 0x7ab6, 0x7ab8, 0x7ab5, 0x7ab1, 0x7ab7, 0x7bde, - 0x7be3, 0x7be7, 0x7bdd, 0x7bd5, 0x7be5, 0x7bda, 0x7be8, 0x7bf9, - 0x7bd4, 0x7bea, 0x7be2, 0x7bdc, 0x7beb, 0x7bd8, 0x7bdf, 0x7cd2, - 0x7cd4, 0x7cd7, 0x7cd0, 0x7cd1, 0x7e12, 0x7e21, 0x7e17, 0x7e0c, - 0x7e1f, 0x7e20, 0x7e13, 0x7e0e, 0x7e1c, 0x7e15, 0x7e1a, 0x7e22, - 0x7e0b, 0x7e0f, 0x7e16, 0x7e0d, 0x7e14, 0x7e25, 0x7e24, 0x7f43, - 0x7f7b, 0x7f7c, 0x7f7a, 0x7fb1, 0x7fef, 0x802a, 0x8029, 0x806c, - 0x81b1, 0x81a6, 0x81ae, 0x81b9, 0x81b5, 0x81ab, 0x81b0, 0x81ac, - 0x81b4, 0x81b2, 0x81b7, 0x81a7, 0x81f2, 0x8255, 0x8256, 0x8257, - 0x8556, 0x8545, 0x856b, 0x854d, 0x8553, 0x8561, 0x8558, 0x003f, - /* lead byte eb */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8540, 0x8546, 0x8564, 0x8541, 0x8562, 0x8544, 0x8551, 0x8547, - 0x8563, 0x853e, 0x855b, 0x8571, 0x854e, 0x856e, 0x8575, 0x8555, - 0x8567, 0x8560, 0x858c, 0x8566, 0x855d, 0x8554, 0x8565, 0x856c, - 0x8663, 0x8665, 0x8664, 0x879b, 0x878f, 0x8797, 0x8793, 0x8792, - 0x8788, 0x8781, 0x8796, 0x8798, 0x8779, 0x8787, 0x87a3, 0x8785, - 0x8790, 0x8791, 0x879d, 0x8784, 0x8794, 0x879c, 0x879a, 0x8789, - 0x891e, 0x8926, 0x8930, 0x892d, 0x892e, 0x8927, 0x8931, 0x8922, - 0x8929, 0x8923, 0x892f, 0x892c, 0x891f, 0x89f1, 0x8ae0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8ae2, 0x8af2, 0x8af4, 0x8af5, 0x8add, 0x8b14, 0x8ae4, - 0x8adf, 0x8af0, 0x8ac8, 0x8ade, 0x8ae1, 0x8ae8, 0x8aff, 0x8aef, - 0x8afb, 0x8c91, 0x8c92, 0x8c90, 0x8cf5, 0x8cee, 0x8cf1, 0x8cf0, - 0x8cf3, 0x8d6c, 0x8d6e, 0x8da5, 0x8da7, 0x8e33, 0x8e3e, 0x8e38, - 0x8e40, 0x8e45, 0x8e36, 0x8e3c, 0x8e3d, 0x8e41, 0x8e30, 0x8e3f, - 0x8ebd, 0x8f36, 0x8f2e, 0x8f35, 0x8f32, 0x8f39, 0x8f37, 0x8f34, - 0x9076, 0x9079, 0x907b, 0x9086, 0x90fa, 0x9133, 0x9135, 0x9136, - 0x9193, 0x9190, 0x9191, 0x918d, 0x918f, 0x9327, 0x931e, 0x9308, - 0x931f, 0x9306, 0x930f, 0x937a, 0x9338, 0x933c, 0x931b, 0x9323, - 0x9312, 0x9301, 0x9346, 0x932d, 0x930e, 0x930d, 0x92cb, 0x931d, - 0x92fa, 0x9325, 0x9313, 0x92f9, 0x92f7, 0x9334, 0x9302, 0x9324, - 0x92ff, 0x9329, 0x9339, 0x9335, 0x932a, 0x9314, 0x930c, 0x003f, - /* lead byte ec */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x930b, 0x92fe, 0x9309, 0x9300, 0x92fb, 0x9316, 0x95bc, 0x95cd, - 0x95be, 0x95b9, 0x95ba, 0x95b6, 0x95bf, 0x95b5, 0x95bd, 0x96a9, - 0x96d4, 0x970b, 0x9712, 0x9710, 0x9799, 0x9797, 0x9794, 0x97f0, - 0x97f8, 0x9835, 0x982f, 0x9832, 0x9924, 0x991f, 0x9927, 0x9929, - 0x999e, 0x99ee, 0x99ec, 0x99e5, 0x99e4, 0x99f0, 0x99e3, 0x99ea, - 0x99e9, 0x99e7, 0x9ab9, 0x9abf, 0x9ab4, 0x9abb, 0x9af6, 0x9afa, - 0x9af9, 0x9af7, 0x9b33, 0x9b80, 0x9b85, 0x9b87, 0x9b7c, 0x9b7e, - 0x9b7b, 0x9b82, 0x9b93, 0x9b92, 0x9b90, 0x9b7a, 0x9b95, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9b7d, 0x9b88, 0x9d25, 0x9d17, 0x9d20, 0x9d1e, 0x9d14, - 0x9d29, 0x9d1d, 0x9d18, 0x9d22, 0x9d10, 0x9d19, 0x9d1f, 0x9e88, - 0x9e86, 0x9e87, 0x9eae, 0x9ead, 0x9ed5, 0x9ed6, 0x9efa, 0x9f12, - 0x9f3d, 0x5126, 0x5125, 0x5122, 0x5124, 0x5120, 0x5129, 0x52f4, - 0x5693, 0x568c, 0x568d, 0x5686, 0x5684, 0x5683, 0x567e, 0x5682, - 0x567f, 0x5681, 0x58d6, 0x58d4, 0x58cf, 0x58d2, 0x5b2d, 0x5b25, - 0x5b32, 0x5b23, 0x5b2c, 0x5b27, 0x5b26, 0x5b2f, 0x5b2e, 0x5b7b, - 0x5bf1, 0x5bf2, 0x5db7, 0x5e6c, 0x5e6a, 0x5fbe, 0x5fbb, 0x61c3, - 0x61b5, 0x61bc, 0x61e7, 0x61e0, 0x61e5, 0x61e4, 0x61e8, 0x61de, - 0x64ef, 0x64e9, 0x64e3, 0x64eb, 0x64e4, 0x64e8, 0x6581, 0x6580, - 0x65b6, 0x65da, 0x66d2, 0x6a8d, 0x6a96, 0x6a81, 0x6aa5, 0x6a89, - 0x6a9f, 0x6a9b, 0x6aa1, 0x6a9e, 0x6a87, 0x6a93, 0x6a8e, 0x003f, - /* lead byte ed */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x6a95, 0x6a83, 0x6aa8, 0x6aa4, 0x6a91, 0x6a7f, 0x6aa6, 0x6a9a, - 0x6a85, 0x6a8c, 0x6a92, 0x6b5b, 0x6bad, 0x6c09, 0x6fcc, 0x6fa9, - 0x6ff4, 0x6fd4, 0x6fe3, 0x6fdc, 0x6fed, 0x6fe7, 0x6fe6, 0x6fde, - 0x6ff2, 0x6fdd, 0x6fe2, 0x6fe8, 0x71e1, 0x71f1, 0x71e8, 0x71f2, - 0x71e4, 0x71f0, 0x71e2, 0x7373, 0x736e, 0x736f, 0x7497, 0x74b2, - 0x74ab, 0x7490, 0x74aa, 0x74ad, 0x74b1, 0x74a5, 0x74af, 0x7510, - 0x7511, 0x7512, 0x750f, 0x7584, 0x7643, 0x7648, 0x7649, 0x7647, - 0x76a4, 0x76e9, 0x77b5, 0x77ab, 0x77b2, 0x77b7, 0x77b6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x77b4, 0x77b1, 0x77a8, 0x77f0, 0x78f3, 0x78fd, 0x7902, - 0x78fb, 0x78fc, 0x78f2, 0x7905, 0x78f9, 0x78fe, 0x7904, 0x79ab, - 0x79a8, 0x7a5c, 0x7a5b, 0x7a56, 0x7a58, 0x7a54, 0x7a5a, 0x7abe, - 0x7ac0, 0x7ac1, 0x7c05, 0x7c0f, 0x7bf2, 0x7c00, 0x7bff, 0x7bfb, - 0x7c0e, 0x7bf4, 0x7c0b, 0x7bf3, 0x7c02, 0x7c09, 0x7c03, 0x7c01, - 0x7bf8, 0x7bfd, 0x7c06, 0x7bf0, 0x7bf1, 0x7c10, 0x7c0a, 0x7ce8, - 0x7e2d, 0x7e3c, 0x7e42, 0x7e33, 0x9848, 0x7e38, 0x7e2a, 0x7e49, - 0x7e40, 0x7e47, 0x7e29, 0x7e4c, 0x7e30, 0x7e3b, 0x7e36, 0x7e44, - 0x7e3a, 0x7f45, 0x7f7f, 0x7f7e, 0x7f7d, 0x7ff4, 0x7ff2, 0x802c, - 0x81bb, 0x81c4, 0x81cc, 0x81ca, 0x81c5, 0x81c7, 0x81bc, 0x81e9, - 0x825b, 0x825a, 0x825c, 0x8583, 0x8580, 0x858f, 0x85a7, 0x8595, - 0x85a0, 0x858b, 0x85a3, 0x857b, 0x85a4, 0x859a, 0x859e, 0x003f, - /* lead byte ee */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8577, 0x857c, 0x8589, 0x85a1, 0x857a, 0x8578, 0x8557, 0x858e, - 0x8596, 0x8586, 0x858d, 0x8599, 0x859d, 0x8581, 0x85a2, 0x8582, - 0x8588, 0x8585, 0x8579, 0x8576, 0x8598, 0x8590, 0x859f, 0x8668, - 0x87be, 0x87aa, 0x87ad, 0x87c5, 0x87b0, 0x87ac, 0x87b9, 0x87b5, - 0x87bc, 0x87ae, 0x87c9, 0x87c3, 0x87c2, 0x87cc, 0x87b7, 0x87af, - 0x87c4, 0x87ca, 0x87b4, 0x87b6, 0x87bf, 0x87b8, 0x87bd, 0x87de, - 0x87b2, 0x8935, 0x8933, 0x893c, 0x893e, 0x8941, 0x8952, 0x8937, - 0x8942, 0x89ad, 0x89af, 0x89ae, 0x89f2, 0x89f3, 0x8b1e, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x8b18, 0x8b16, 0x8b11, 0x8b05, 0x8b0b, 0x8b22, 0x8b0f, - 0x8b12, 0x8b15, 0x8b07, 0x8b0d, 0x8b08, 0x8b06, 0x8b1c, 0x8b13, - 0x8b1a, 0x8c4f, 0x8c70, 0x8c72, 0x8c71, 0x8c6f, 0x8c95, 0x8c94, - 0x8cf9, 0x8d6f, 0x8e4e, 0x8e4d, 0x8e53, 0x8e50, 0x8e4c, 0x8e47, - 0x8f43, 0x8f40, 0x9085, 0x907e, 0x9138, 0x919a, 0x91a2, 0x919b, - 0x9199, 0x919f, 0x91a1, 0x919d, 0x91a0, 0x93a1, 0x9383, 0x93af, - 0x9364, 0x9356, 0x9347, 0x937c, 0x9358, 0x935c, 0x9376, 0x9349, - 0x9350, 0x9351, 0x9360, 0x936d, 0x938f, 0x934c, 0x936a, 0x9379, - 0x9357, 0x9355, 0x9352, 0x934f, 0x9371, 0x9377, 0x937b, 0x9361, - 0x935e, 0x9363, 0x9367, 0x9380, 0x934e, 0x9359, 0x95c7, 0x95c0, - 0x95c9, 0x95c3, 0x95c5, 0x95b7, 0x96ae, 0x96b0, 0x96ac, 0x9720, - 0x971f, 0x9718, 0x971d, 0x9719, 0x979a, 0x97a1, 0x979c, 0x003f, - /* lead byte ef */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x979e, 0x979d, 0x97d5, 0x97d4, 0x97f1, 0x9841, 0x9844, 0x984a, - 0x9849, 0x9845, 0x9843, 0x9925, 0x992b, 0x992c, 0x992a, 0x9933, - 0x9932, 0x992f, 0x992d, 0x9931, 0x9930, 0x9998, 0x99a3, 0x99a1, - 0x9a02, 0x99fa, 0x99f4, 0x99f7, 0x99f9, 0x99f8, 0x99f6, 0x99fb, - 0x99fd, 0x99fe, 0x99fc, 0x9a03, 0x9abe, 0x9afe, 0x9afd, 0x9b01, - 0x9afc, 0x9b48, 0x9b9a, 0x9ba8, 0x9b9e, 0x9b9b, 0x9ba6, 0x9ba1, - 0x9ba5, 0x9ba4, 0x9b86, 0x9ba2, 0x9ba0, 0x9baf, 0x9d33, 0x9d41, - 0x9d67, 0x9d36, 0x9d2e, 0x9d2f, 0x9d31, 0x9d38, 0x9d30, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9d45, 0x9d42, 0x9d43, 0x9d3e, 0x9d37, 0x9d40, 0x9d3d, - 0x7ff5, 0x9d2d, 0x9e8a, 0x9e89, 0x9e8d, 0x9eb0, 0x9ec8, 0x9eda, - 0x9efb, 0x9eff, 0x9f24, 0x9f23, 0x9f22, 0x9f54, 0x9fa0, 0x5131, - 0x512d, 0x512e, 0x5698, 0x569c, 0x5697, 0x569a, 0x569d, 0x5699, - 0x5970, 0x5b3c, 0x5c69, 0x5c6a, 0x5dc0, 0x5e6d, 0x5e6e, 0x61d8, - 0x61df, 0x61ed, 0x61ee, 0x61f1, 0x61ea, 0x61f0, 0x61eb, 0x61d6, - 0x61e9, 0x64ff, 0x6504, 0x64fd, 0x64f8, 0x6501, 0x6503, 0x64fc, - 0x6594, 0x65db, 0x66da, 0x66db, 0x66d8, 0x6ac5, 0x6ab9, 0x6abd, - 0x6ae1, 0x6ac6, 0x6aba, 0x6ab6, 0x6ab7, 0x6ac7, 0x6ab4, 0x6aad, - 0x6b5e, 0x6bc9, 0x6c0b, 0x7007, 0x700c, 0x700d, 0x7001, 0x7005, - 0x7014, 0x700e, 0x6fff, 0x7000, 0x6ffb, 0x7026, 0x6ffc, 0x6ff7, - 0x700a, 0x7201, 0x71ff, 0x71f9, 0x7203, 0x71fd, 0x7376, 0x003f, - /* lead byte f0 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x74b8, 0x74c0, 0x74b5, 0x74c1, 0x74be, 0x74b6, 0x74bb, 0x74c2, - 0x7514, 0x7513, 0x765c, 0x7664, 0x7659, 0x7650, 0x7653, 0x7657, - 0x765a, 0x76a6, 0x76bd, 0x76ec, 0x77c2, 0x77ba, 0x78ff, 0x790c, - 0x7913, 0x7914, 0x7909, 0x7910, 0x7912, 0x7911, 0x79ad, 0x79ac, - 0x7a5f, 0x7c1c, 0x7c29, 0x7c19, 0x7c20, 0x7c1f, 0x7c2d, 0x7c1d, - 0x7c26, 0x7c28, 0x7c22, 0x7c25, 0x7c30, 0x7e5c, 0x7e50, 0x7e56, - 0x7e63, 0x7e58, 0x7e62, 0x7e5f, 0x7e51, 0x7e60, 0x7e57, 0x7e53, - 0x7fb5, 0x7fb3, 0x7ff7, 0x7ff8, 0x8075, 0x81d1, 0x81d2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x81d0, 0x825f, 0x825e, 0x85b4, 0x85c6, 0x85c0, 0x85c3, - 0x85c2, 0x85b3, 0x85b5, 0x85bd, 0x85c7, 0x85c4, 0x85bf, 0x85cb, - 0x85ce, 0x85c8, 0x85c5, 0x85b1, 0x85b6, 0x85d2, 0x8624, 0x85b8, - 0x85b7, 0x85be, 0x8669, 0x87e7, 0x87e6, 0x87e2, 0x87db, 0x87eb, - 0x87ea, 0x87e5, 0x87df, 0x87f3, 0x87e4, 0x87d4, 0x87dc, 0x87d3, - 0x87ed, 0x87d8, 0x87e3, 0x87a4, 0x87d7, 0x87d9, 0x8801, 0x87f4, - 0x87e8, 0x87dd, 0x8953, 0x894b, 0x894f, 0x894c, 0x8946, 0x8950, - 0x8951, 0x8949, 0x8b2a, 0x8b27, 0x8b23, 0x8b33, 0x8b30, 0x8b35, - 0x8b47, 0x8b2f, 0x8b3c, 0x8b3e, 0x8b31, 0x8b25, 0x8b37, 0x8b26, - 0x8b36, 0x8b2e, 0x8b24, 0x8b3b, 0x8b3d, 0x8b3a, 0x8c42, 0x8c75, - 0x8c99, 0x8c98, 0x8c97, 0x8cfe, 0x8d04, 0x8d02, 0x8d00, 0x8e5c, - 0x8e62, 0x8e60, 0x8e57, 0x8e56, 0x8e5e, 0x8e65, 0x8e67, 0x003f, - /* lead byte f1 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8e5b, 0x8e5a, 0x8e61, 0x8e5d, 0x8e69, 0x8e54, 0x8f46, 0x8f47, - 0x8f48, 0x8f4b, 0x9128, 0x913a, 0x913b, 0x913e, 0x91a8, 0x91a5, - 0x91a7, 0x91af, 0x91aa, 0x93b5, 0x938c, 0x9392, 0x93b7, 0x939b, - 0x939d, 0x9389, 0x93a7, 0x938e, 0x93aa, 0x939e, 0x93a6, 0x9395, - 0x9388, 0x9399, 0x939f, 0x938d, 0x93b1, 0x9391, 0x93b2, 0x93a4, - 0x93a8, 0x93b4, 0x93a3, 0x93a5, 0x95d2, 0x95d3, 0x95d1, 0x96b3, - 0x96d7, 0x96da, 0x5dc2, 0x96df, 0x96d8, 0x96dd, 0x9723, 0x9722, - 0x9725, 0x97ac, 0x97ae, 0x97a8, 0x97ab, 0x97a4, 0x97aa, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x97a2, 0x97a5, 0x97d7, 0x97d9, 0x97d6, 0x97d8, 0x97fa, - 0x9850, 0x9851, 0x9852, 0x98b8, 0x9941, 0x993c, 0x993a, 0x9a0f, - 0x9a0b, 0x9a09, 0x9a0d, 0x9a04, 0x9a11, 0x9a0a, 0x9a05, 0x9a07, - 0x9a06, 0x9ac0, 0x9adc, 0x9b08, 0x9b04, 0x9b05, 0x9b29, 0x9b35, - 0x9b4a, 0x9b4c, 0x9b4b, 0x9bc7, 0x9bc6, 0x9bc3, 0x9bbf, 0x9bc1, - 0x9bb5, 0x9bb8, 0x9bd3, 0x9bb6, 0x9bc4, 0x9bb9, 0x9bbd, 0x9d5c, - 0x9d53, 0x9d4f, 0x9d4a, 0x9d5b, 0x9d4b, 0x9d59, 0x9d56, 0x9d4c, - 0x9d57, 0x9d52, 0x9d54, 0x9d5f, 0x9d58, 0x9d5a, 0x9e8e, 0x9e8c, - 0x9edf, 0x9f01, 0x9f00, 0x9f16, 0x9f25, 0x9f2b, 0x9f2a, 0x9f29, - 0x9f28, 0x9f4c, 0x9f55, 0x5134, 0x5135, 0x5296, 0x52f7, 0x53b4, - 0x56ab, 0x56ad, 0x56a6, 0x56a7, 0x56aa, 0x56ac, 0x58da, 0x58dd, - 0x58db, 0x5912, 0x5b3d, 0x5b3e, 0x5b3f, 0x5dc3, 0x5e70, 0x003f, - /* lead byte f2 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x5fbf, 0x61fb, 0x6507, 0x6510, 0x650d, 0x6509, 0x650c, 0x650e, - 0x6584, 0x65de, 0x65dd, 0x66de, 0x6ae7, 0x6ae0, 0x6acc, 0x6ad1, - 0x6ad9, 0x6acb, 0x6adf, 0x6adc, 0x6ad0, 0x6aeb, 0x6acf, 0x6acd, - 0x6ade, 0x6b60, 0x6bb0, 0x6c0c, 0x7019, 0x7027, 0x7020, 0x7016, - 0x702b, 0x7021, 0x7022, 0x7023, 0x7029, 0x7017, 0x7024, 0x701c, - 0x702a, 0x720c, 0x720a, 0x7207, 0x7202, 0x7205, 0x72a5, 0x72a6, - 0x72a4, 0x72a3, 0x72a1, 0x74cb, 0x74c5, 0x74b7, 0x74c3, 0x7516, - 0x7660, 0x77c9, 0x77ca, 0x77c4, 0x77f1, 0x791d, 0x791b, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x7921, 0x791c, 0x7917, 0x791e, 0x79b0, 0x7a67, 0x7a68, - 0x7c33, 0x7c3c, 0x7c39, 0x7c2c, 0x7c3b, 0x7cec, 0x7cea, 0x7e76, - 0x7e75, 0x7e78, 0x7e70, 0x7e77, 0x7e6f, 0x7e7a, 0x7e72, 0x7e74, - 0x7e68, 0x7f4b, 0x7f4a, 0x7f83, 0x7f86, 0x7fb7, 0x7ffd, 0x7ffe, - 0x8078, 0x81d7, 0x81d5, 0x8264, 0x8261, 0x8263, 0x85eb, 0x85f1, - 0x85ed, 0x85d9, 0x85e1, 0x85e8, 0x85da, 0x85d7, 0x85ec, 0x85f2, - 0x85f8, 0x85d8, 0x85df, 0x85e3, 0x85dc, 0x85d1, 0x85f0, 0x85e6, - 0x85ef, 0x85de, 0x85e2, 0x8800, 0x87fa, 0x8803, 0x87f6, 0x87f7, - 0x8809, 0x880c, 0x880b, 0x8806, 0x87fc, 0x8808, 0x87ff, 0x880a, - 0x8802, 0x8962, 0x895a, 0x895b, 0x8957, 0x8961, 0x895c, 0x8958, - 0x895d, 0x8959, 0x8988, 0x89b7, 0x89b6, 0x89f6, 0x8b50, 0x8b48, - 0x8b4a, 0x8b40, 0x8b53, 0x8b56, 0x8b54, 0x8b4b, 0x8b55, 0x003f, - /* lead byte f3 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8b51, 0x8b42, 0x8b52, 0x8b57, 0x8c43, 0x8c77, 0x8c76, 0x8c9a, - 0x8d06, 0x8d07, 0x8d09, 0x8dac, 0x8daa, 0x8dad, 0x8dab, 0x8e6d, - 0x8e78, 0x8e73, 0x8e6a, 0x8e6f, 0x8e7b, 0x8ec2, 0x8f52, 0x8f51, - 0x8f4f, 0x8f50, 0x8f53, 0x8fb4, 0x9140, 0x913f, 0x91b0, 0x91ad, - 0x93de, 0x93c7, 0x93cf, 0x93c2, 0x93da, 0x93d0, 0x93f9, 0x93ec, - 0x93cc, 0x93d9, 0x93a9, 0x93e6, 0x93ca, 0x93d4, 0x93ee, 0x93e3, - 0x93d5, 0x93c4, 0x93ce, 0x93c0, 0x93d2, 0x93e7, 0x957d, 0x95da, - 0x95db, 0x96e1, 0x9729, 0x972b, 0x972c, 0x9728, 0x9726, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x97b3, 0x97b7, 0x97b6, 0x97dd, 0x97de, 0x97df, 0x985c, - 0x9859, 0x985d, 0x9857, 0x98bf, 0x98bd, 0x98bb, 0x98be, 0x9948, - 0x9947, 0x9943, 0x99a6, 0x99a7, 0x9a1a, 0x9a15, 0x9a25, 0x9a1d, - 0x9a24, 0x9a1b, 0x9a22, 0x9a20, 0x9a27, 0x9a23, 0x9a1e, 0x9a1c, - 0x9a14, 0x9ac2, 0x9b0b, 0x9b0a, 0x9b0e, 0x9b0c, 0x9b37, 0x9bea, - 0x9beb, 0x9be0, 0x9bde, 0x9be4, 0x9be6, 0x9be2, 0x9bf0, 0x9bd4, - 0x9bd7, 0x9bec, 0x9bdc, 0x9bd9, 0x9be5, 0x9bd5, 0x9be1, 0x9bda, - 0x9d77, 0x9d81, 0x9d8a, 0x9d84, 0x9d88, 0x9d71, 0x9d80, 0x9d78, - 0x9d86, 0x9d8b, 0x9d8c, 0x9d7d, 0x9d6b, 0x9d74, 0x9d75, 0x9d70, - 0x9d69, 0x9d85, 0x9d73, 0x9d7b, 0x9d82, 0x9d6f, 0x9d79, 0x9d7f, - 0x9d87, 0x9d68, 0x9e94, 0x9e91, 0x9ec0, 0x9efc, 0x9f2d, 0x9f40, - 0x9f41, 0x9f4d, 0x9f56, 0x9f57, 0x9f58, 0x5337, 0x56b2, 0x003f, - /* lead byte f4 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x56b5, 0x56b3, 0x58e3, 0x5b45, 0x5dc6, 0x5dc7, 0x5eee, 0x5eef, - 0x5fc0, 0x5fc1, 0x61f9, 0x6517, 0x6516, 0x6515, 0x6513, 0x65df, - 0x66e8, 0x66e3, 0x66e4, 0x6af3, 0x6af0, 0x6aea, 0x6ae8, 0x6af9, - 0x6af1, 0x6aee, 0x6aef, 0x703c, 0x7035, 0x702f, 0x7037, 0x7034, - 0x7031, 0x7042, 0x7038, 0x703f, 0x703a, 0x7039, 0x7040, 0x703b, - 0x7033, 0x7041, 0x7213, 0x7214, 0x72a8, 0x737d, 0x737c, 0x74ba, - 0x76ab, 0x76aa, 0x76be, 0x76ed, 0x77cc, 0x77ce, 0x77cf, 0x77cd, - 0x77f2, 0x7925, 0x7923, 0x7927, 0x7928, 0x7924, 0x7929, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x79b2, 0x7a6e, 0x7a6c, 0x7a6d, 0x7af7, 0x7c49, 0x7c48, - 0x7c4a, 0x7c47, 0x7c45, 0x7cee, 0x7e7b, 0x7e7e, 0x7e81, 0x7e80, - 0x7fba, 0x7fff, 0x8079, 0x81db, 0x81d9, 0x820b, 0x8268, 0x8269, - 0x8622, 0x85ff, 0x8601, 0x85fe, 0x861b, 0x8600, 0x85f6, 0x8604, - 0x8609, 0x8605, 0x860c, 0x85fd, 0x8819, 0x8810, 0x8811, 0x8817, - 0x8813, 0x8816, 0x8963, 0x8966, 0x89b9, 0x89f7, 0x8b60, 0x8b6a, - 0x8b5d, 0x8b68, 0x8b63, 0x8b65, 0x8b67, 0x8b6d, 0x8dae, 0x8e86, - 0x8e88, 0x8e84, 0x8f59, 0x8f56, 0x8f57, 0x8f55, 0x8f58, 0x8f5a, - 0x908d, 0x9143, 0x9141, 0x91b7, 0x91b5, 0x91b2, 0x91b3, 0x940b, - 0x9413, 0x93fb, 0x9420, 0x940f, 0x9414, 0x93fe, 0x9415, 0x9410, - 0x9428, 0x9419, 0x940d, 0x93f5, 0x9400, 0x93f7, 0x9407, 0x940e, - 0x9416, 0x9412, 0x93fa, 0x9409, 0x93f8, 0x940a, 0x93ff, 0x003f, - /* lead byte f5 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x93fc, 0x940c, 0x93f6, 0x9411, 0x9406, 0x95de, 0x95e0, 0x95df, - 0x972e, 0x972f, 0x97b9, 0x97bb, 0x97fd, 0x97fe, 0x9860, 0x9862, - 0x9863, 0x985f, 0x98c1, 0x98c2, 0x9950, 0x994e, 0x9959, 0x994c, - 0x994b, 0x9953, 0x9a32, 0x9a34, 0x9a31, 0x9a2c, 0x9a2a, 0x9a36, - 0x9a29, 0x9a2e, 0x9a38, 0x9a2d, 0x9ac7, 0x9aca, 0x9ac6, 0x9b10, - 0x9b12, 0x9b11, 0x9c0b, 0x9c08, 0x9bf7, 0x9c05, 0x9c12, 0x9bf8, - 0x9c40, 0x9c07, 0x9c0e, 0x9c06, 0x9c17, 0x9c14, 0x9c09, 0x9d9f, - 0x9d99, 0x9da4, 0x9d9d, 0x9d92, 0x9d98, 0x9d90, 0x9d9b, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9da0, 0x9d94, 0x9d9c, 0x9daa, 0x9d97, 0x9da1, 0x9d9a, - 0x9da2, 0x9da8, 0x9d9e, 0x9da3, 0x9dbf, 0x9da9, 0x9d96, 0x9da6, - 0x9da7, 0x9e99, 0x9e9b, 0x9e9a, 0x9ee5, 0x9ee4, 0x9ee7, 0x9ee6, - 0x9f30, 0x9f2e, 0x9f5b, 0x9f60, 0x9f5e, 0x9f5d, 0x9f59, 0x9f91, - 0x513a, 0x5139, 0x5298, 0x5297, 0x56c3, 0x56bd, 0x56be, 0x5b48, - 0x5b47, 0x5dcb, 0x5dcf, 0x5ef1, 0x61fd, 0x651b, 0x6b02, 0x6afc, - 0x6b03, 0x6af8, 0x6b00, 0x7043, 0x7044, 0x704a, 0x7048, 0x7049, - 0x7045, 0x7046, 0x721d, 0x721a, 0x7219, 0x737e, 0x7517, 0x766a, - 0x77d0, 0x792d, 0x7931, 0x792f, 0x7c54, 0x7c53, 0x7cf2, 0x7e8a, - 0x7e87, 0x7e88, 0x7e8b, 0x7e86, 0x7e8d, 0x7f4d, 0x7fbb, 0x8030, - 0x81dd, 0x8618, 0x862a, 0x8626, 0x861f, 0x8623, 0x861c, 0x8619, - 0x8627, 0x862e, 0x8621, 0x8620, 0x8629, 0x861e, 0x8625, 0x003f, - /* lead byte f6 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8829, 0x881d, 0x881b, 0x8820, 0x8824, 0x881c, 0x882b, 0x884a, - 0x896d, 0x8969, 0x896e, 0x896b, 0x89fa, 0x8b79, 0x8b78, 0x8b45, - 0x8b7a, 0x8b7b, 0x8d10, 0x8d14, 0x8daf, 0x8e8e, 0x8e8c, 0x8f5e, - 0x8f5b, 0x8f5d, 0x9146, 0x9144, 0x9145, 0x91b9, 0x943f, 0x943b, - 0x9436, 0x9429, 0x943d, 0x943c, 0x9430, 0x9439, 0x942a, 0x9437, - 0x942c, 0x9440, 0x9431, 0x95e5, 0x95e4, 0x95e3, 0x9735, 0x973a, - 0x97bf, 0x97e1, 0x9864, 0x98c9, 0x98c6, 0x98c0, 0x9958, 0x9956, - 0x9a39, 0x9a3d, 0x9a46, 0x9a44, 0x9a42, 0x9a41, 0x9a3a, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9a3f, 0x9acd, 0x9b15, 0x9b17, 0x9b18, 0x9b16, 0x9b3a, - 0x9b52, 0x9c2b, 0x9c1d, 0x9c1c, 0x9c2c, 0x9c23, 0x9c28, 0x9c29, - 0x9c24, 0x9c21, 0x9db7, 0x9db6, 0x9dbc, 0x9dc1, 0x9dc7, 0x9dca, - 0x9dcf, 0x9dbe, 0x9dc5, 0x9dc3, 0x9dbb, 0x9db5, 0x9dce, 0x9db9, - 0x9dba, 0x9dac, 0x9dc8, 0x9db1, 0x9dad, 0x9dcc, 0x9db3, 0x9dcd, - 0x9db2, 0x9e7a, 0x9e9c, 0x9eeb, 0x9eee, 0x9eed, 0x9f1b, 0x9f18, - 0x9f1a, 0x9f31, 0x9f4e, 0x9f65, 0x9f64, 0x9f92, 0x4eb9, 0x56c6, - 0x56c5, 0x56cb, 0x5971, 0x5b4b, 0x5b4c, 0x5dd5, 0x5dd1, 0x5ef2, - 0x6521, 0x6520, 0x6526, 0x6522, 0x6b0b, 0x6b08, 0x6b09, 0x6c0d, - 0x7055, 0x7056, 0x7057, 0x7052, 0x721e, 0x721f, 0x72a9, 0x737f, - 0x74d8, 0x74d5, 0x74d9, 0x74d7, 0x766d, 0x76ad, 0x7935, 0x79b4, - 0x7a70, 0x7a71, 0x7c57, 0x7c5c, 0x7c59, 0x7c5b, 0x7c5a, 0x003f, - /* lead byte f7 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7cf4, 0x7cf1, 0x7e91, 0x7f4f, 0x7f87, 0x81de, 0x826b, 0x8634, - 0x8635, 0x8633, 0x862c, 0x8632, 0x8636, 0x882c, 0x8828, 0x8826, - 0x882a, 0x8825, 0x8971, 0x89bf, 0x89be, 0x89fb, 0x8b7e, 0x8b84, - 0x8b82, 0x8b86, 0x8b85, 0x8b7f, 0x8d15, 0x8e95, 0x8e94, 0x8e9a, - 0x8e92, 0x8e90, 0x8e96, 0x8e97, 0x8f60, 0x8f62, 0x9147, 0x944c, - 0x9450, 0x944a, 0x944b, 0x944f, 0x9447, 0x9445, 0x9448, 0x9449, - 0x9446, 0x973f, 0x97e3, 0x986a, 0x9869, 0x98cb, 0x9954, 0x995b, - 0x9a4e, 0x9a53, 0x9a54, 0x9a4c, 0x9a4f, 0x9a48, 0x9a4a, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9a49, 0x9a52, 0x9a50, 0x9ad0, 0x9b19, 0x9b2b, 0x9b3b, - 0x9b56, 0x9b55, 0x9c46, 0x9c48, 0x9c3f, 0x9c44, 0x9c39, 0x9c33, - 0x9c41, 0x9c3c, 0x9c37, 0x9c34, 0x9c32, 0x9c3d, 0x9c36, 0x9ddb, - 0x9dd2, 0x9dde, 0x9dda, 0x9dcb, 0x9dd0, 0x9ddc, 0x9dd1, 0x9ddf, - 0x9de9, 0x9dd9, 0x9dd8, 0x9dd6, 0x9df5, 0x9dd5, 0x9ddd, 0x9eb6, - 0x9ef0, 0x9f35, 0x9f33, 0x9f32, 0x9f42, 0x9f6b, 0x9f95, 0x9fa2, - 0x513d, 0x5299, 0x58e8, 0x58e7, 0x5972, 0x5b4d, 0x5dd8, 0x882f, - 0x5f4f, 0x6201, 0x6203, 0x6204, 0x6529, 0x6525, 0x6596, 0x66eb, - 0x6b11, 0x6b12, 0x6b0f, 0x6bca, 0x705b, 0x705a, 0x7222, 0x7382, - 0x7381, 0x7383, 0x7670, 0x77d4, 0x7c67, 0x7c66, 0x7e95, 0x826c, - 0x863a, 0x8640, 0x8639, 0x863c, 0x8631, 0x863b, 0x863e, 0x8830, - 0x8832, 0x882e, 0x8833, 0x8976, 0x8974, 0x8973, 0x89fe, 0x003f, - /* lead byte f8 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x8b8c, 0x8b8e, 0x8b8b, 0x8b88, 0x8c45, 0x8d19, 0x8e98, 0x8f64, - 0x8f63, 0x91bc, 0x9462, 0x9455, 0x945d, 0x9457, 0x945e, 0x97c4, - 0x97c5, 0x9800, 0x9a56, 0x9a59, 0x9b1e, 0x9b1f, 0x9b20, 0x9c52, - 0x9c58, 0x9c50, 0x9c4a, 0x9c4d, 0x9c4b, 0x9c55, 0x9c59, 0x9c4c, - 0x9c4e, 0x9dfb, 0x9df7, 0x9def, 0x9de3, 0x9deb, 0x9df8, 0x9de4, - 0x9df6, 0x9de1, 0x9dee, 0x9de6, 0x9df2, 0x9df0, 0x9de2, 0x9dec, - 0x9df4, 0x9df3, 0x9de8, 0x9ded, 0x9ec2, 0x9ed0, 0x9ef2, 0x9ef3, - 0x9f06, 0x9f1c, 0x9f38, 0x9f37, 0x9f36, 0x9f43, 0x9f4f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9f71, 0x9f70, 0x9f6e, 0x9f6f, 0x56d3, 0x56cd, 0x5b4e, - 0x5c6d, 0x652d, 0x66ed, 0x66ee, 0x6b13, 0x705f, 0x7061, 0x705d, - 0x7060, 0x7223, 0x74db, 0x74e5, 0x77d5, 0x7938, 0x79b7, 0x79b6, - 0x7c6a, 0x7e97, 0x7f89, 0x826d, 0x8643, 0x8838, 0x8837, 0x8835, - 0x884b, 0x8b94, 0x8b95, 0x8e9e, 0x8e9f, 0x8ea0, 0x8e9d, 0x91be, - 0x91bd, 0x91c2, 0x946b, 0x9468, 0x9469, 0x96e5, 0x9746, 0x9743, - 0x9747, 0x97c7, 0x97e5, 0x9a5e, 0x9ad5, 0x9b59, 0x9c63, 0x9c67, - 0x9c66, 0x9c62, 0x9c5e, 0x9c60, 0x9e02, 0x9dfe, 0x9e07, 0x9e03, - 0x9e06, 0x9e05, 0x9e00, 0x9e01, 0x9e09, 0x9dff, 0x9dfd, 0x9e04, - 0x9ea0, 0x9f1e, 0x9f46, 0x9f74, 0x9f75, 0x9f76, 0x56d4, 0x652e, - 0x65b8, 0x6b18, 0x6b19, 0x6b17, 0x6b1a, 0x7062, 0x7226, 0x72aa, - 0x77d8, 0x77d9, 0x7939, 0x7c69, 0x7c6b, 0x7cf6, 0x7e9a, 0x003f, - /* lead byte f9 */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x7e98, 0x7e9b, 0x7e99, 0x81e0, 0x81e1, 0x8646, 0x8647, 0x8648, - 0x8979, 0x897a, 0x897c, 0x897b, 0x89ff, 0x8b98, 0x8b99, 0x8ea5, - 0x8ea4, 0x8ea3, 0x946e, 0x946d, 0x946f, 0x9471, 0x9473, 0x9749, - 0x9872, 0x995f, 0x9c68, 0x9c6e, 0x9c6d, 0x9e0b, 0x9e0d, 0x9e10, - 0x9e0f, 0x9e12, 0x9e11, 0x9ea1, 0x9ef5, 0x9f09, 0x9f47, 0x9f78, - 0x9f7b, 0x9f7a, 0x9f79, 0x571e, 0x7066, 0x7c6f, 0x883c, 0x8db2, - 0x8ea6, 0x91c3, 0x9474, 0x9478, 0x9476, 0x9475, 0x9a60, 0x9c74, - 0x9c73, 0x9c71, 0x9c75, 0x9e14, 0x9e13, 0x9ef6, 0x9f0a, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x9fa4, 0x7068, 0x7065, 0x7cf7, 0x866a, 0x883e, 0x883d, - 0x883f, 0x8b9e, 0x8c9c, 0x8ea9, 0x8ec9, 0x974b, 0x9873, 0x9874, - 0x98cc, 0x9961, 0x99ab, 0x9a64, 0x9a66, 0x9a67, 0x9b24, 0x9e15, - 0x9e17, 0x9f48, 0x6207, 0x6b1e, 0x7227, 0x864c, 0x8ea8, 0x9482, - 0x9480, 0x9481, 0x9a69, 0x9a68, 0x9b2e, 0x9e19, 0x7229, 0x864b, - 0x8b9f, 0x9483, 0x9c79, 0x9eb7, 0x7675, 0x9a6b, 0x9c7a, 0x9e1d, - 0x7069, 0x706a, 0x9ea4, 0x9f7e, 0x9f49, 0x9f98, 0x7881, 0x92b9, - 0x88cf, 0x58bb, 0x6052, 0x7ca7, 0x5afa, 0x2554, 0x2566, 0x2557, - 0x2560, 0x256c, 0x2563, 0x255a, 0x2569, 0x255d, 0x2552, 0x2564, - 0x2555, 0x255e, 0x256a, 0x2561, 0x2558, 0x2567, 0x255b, 0x2553, - 0x2565, 0x2556, 0x255f, 0x256b, 0x2562, 0x2559, 0x2568, 0x255c, - 0x2551, 0x2550, 0x256d, 0x256e, 0x2570, 0x256f, 0x2593, 0x003f, - /* lead byte fa */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe000, 0xe001, 0xe002, 0xe003, 0xe004, 0xe005, 0xe006, 0xe007, - 0xe008, 0xe009, 0xe00a, 0xe00b, 0xe00c, 0xe00d, 0xe00e, 0xe00f, - 0xe010, 0xe011, 0xe012, 0xe013, 0xe014, 0xe015, 0xe016, 0xe017, - 0xe018, 0xe019, 0xe01a, 0xe01b, 0xe01c, 0xe01d, 0xe01e, 0xe01f, - 0xe020, 0xe021, 0xe022, 0xe023, 0xe024, 0xe025, 0xe026, 0xe027, - 0xe028, 0xe029, 0xe02a, 0xe02b, 0xe02c, 0xe02d, 0xe02e, 0xe02f, - 0xe030, 0xe031, 0xe032, 0xe033, 0xe034, 0xe035, 0xe036, 0xe037, - 0xe038, 0xe039, 0xe03a, 0xe03b, 0xe03c, 0xe03d, 0xe03e, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe03f, 0xe040, 0xe041, 0xe042, 0xe043, 0xe044, 0xe045, - 0xe046, 0xe047, 0xe048, 0xe049, 0xe04a, 0xe04b, 0xe04c, 0xe04d, - 0xe04e, 0xe04f, 0xe050, 0xe051, 0xe052, 0xe053, 0xe054, 0xe055, - 0xe056, 0xe057, 0xe058, 0xe059, 0xe05a, 0xe05b, 0xe05c, 0xe05d, - 0xe05e, 0xe05f, 0xe060, 0xe061, 0xe062, 0xe063, 0xe064, 0xe065, - 0xe066, 0xe067, 0xe068, 0xe069, 0xe06a, 0xe06b, 0xe06c, 0xe06d, - 0xe06e, 0xe06f, 0xe070, 0xe071, 0xe072, 0xe073, 0xe074, 0xe075, - 0xe076, 0xe077, 0xe078, 0xe079, 0xe07a, 0xe07b, 0xe07c, 0xe07d, - 0xe07e, 0xe07f, 0xe080, 0xe081, 0xe082, 0xe083, 0xe084, 0xe085, - 0xe086, 0xe087, 0xe088, 0xe089, 0xe08a, 0xe08b, 0xe08c, 0xe08d, - 0xe08e, 0xe08f, 0xe090, 0xe091, 0xe092, 0xe093, 0xe094, 0xe095, - 0xe096, 0xe097, 0xe098, 0xe099, 0xe09a, 0xe09b, 0xe09c, 0x003f, - /* lead byte fb */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe09d, 0xe09e, 0xe09f, 0xe0a0, 0xe0a1, 0xe0a2, 0xe0a3, 0xe0a4, - 0xe0a5, 0xe0a6, 0xe0a7, 0xe0a8, 0xe0a9, 0xe0aa, 0xe0ab, 0xe0ac, - 0xe0ad, 0xe0ae, 0xe0af, 0xe0b0, 0xe0b1, 0xe0b2, 0xe0b3, 0xe0b4, - 0xe0b5, 0xe0b6, 0xe0b7, 0xe0b8, 0xe0b9, 0xe0ba, 0xe0bb, 0xe0bc, - 0xe0bd, 0xe0be, 0xe0bf, 0xe0c0, 0xe0c1, 0xe0c2, 0xe0c3, 0xe0c4, - 0xe0c5, 0xe0c6, 0xe0c7, 0xe0c8, 0xe0c9, 0xe0ca, 0xe0cb, 0xe0cc, - 0xe0cd, 0xe0ce, 0xe0cf, 0xe0d0, 0xe0d1, 0xe0d2, 0xe0d3, 0xe0d4, - 0xe0d5, 0xe0d6, 0xe0d7, 0xe0d8, 0xe0d9, 0xe0da, 0xe0db, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe0dc, 0xe0dd, 0xe0de, 0xe0df, 0xe0e0, 0xe0e1, 0xe0e2, - 0xe0e3, 0xe0e4, 0xe0e5, 0xe0e6, 0xe0e7, 0xe0e8, 0xe0e9, 0xe0ea, - 0xe0eb, 0xe0ec, 0xe0ed, 0xe0ee, 0xe0ef, 0xe0f0, 0xe0f1, 0xe0f2, - 0xe0f3, 0xe0f4, 0xe0f5, 0xe0f6, 0xe0f7, 0xe0f8, 0xe0f9, 0xe0fa, - 0xe0fb, 0xe0fc, 0xe0fd, 0xe0fe, 0xe0ff, 0xe100, 0xe101, 0xe102, - 0xe103, 0xe104, 0xe105, 0xe106, 0xe107, 0xe108, 0xe109, 0xe10a, - 0xe10b, 0xe10c, 0xe10d, 0xe10e, 0xe10f, 0xe110, 0xe111, 0xe112, - 0xe113, 0xe114, 0xe115, 0xe116, 0xe117, 0xe118, 0xe119, 0xe11a, - 0xe11b, 0xe11c, 0xe11d, 0xe11e, 0xe11f, 0xe120, 0xe121, 0xe122, - 0xe123, 0xe124, 0xe125, 0xe126, 0xe127, 0xe128, 0xe129, 0xe12a, - 0xe12b, 0xe12c, 0xe12d, 0xe12e, 0xe12f, 0xe130, 0xe131, 0xe132, - 0xe133, 0xe134, 0xe135, 0xe136, 0xe137, 0xe138, 0xe139, 0x003f, - /* lead byte fc */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe13a, 0xe13b, 0xe13c, 0xe13d, 0xe13e, 0xe13f, 0xe140, 0xe141, - 0xe142, 0xe143, 0xe144, 0xe145, 0xe146, 0xe147, 0xe148, 0xe149, - 0xe14a, 0xe14b, 0xe14c, 0xe14d, 0xe14e, 0xe14f, 0xe150, 0xe151, - 0xe152, 0xe153, 0xe154, 0xe155, 0xe156, 0xe157, 0xe158, 0xe159, - 0xe15a, 0xe15b, 0xe15c, 0xe15d, 0xe15e, 0xe15f, 0xe160, 0xe161, - 0xe162, 0xe163, 0xe164, 0xe165, 0xe166, 0xe167, 0xe168, 0xe169, - 0xe16a, 0xe16b, 0xe16c, 0xe16d, 0xe16e, 0xe16f, 0xe170, 0xe171, - 0xe172, 0xe173, 0xe174, 0xe175, 0xe176, 0xe177, 0xe178, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe179, 0xe17a, 0xe17b, 0xe17c, 0xe17d, 0xe17e, 0xe17f, - 0xe180, 0xe181, 0xe182, 0xe183, 0xe184, 0xe185, 0xe186, 0xe187, - 0xe188, 0xe189, 0xe18a, 0xe18b, 0xe18c, 0xe18d, 0xe18e, 0xe18f, - 0xe190, 0xe191, 0xe192, 0xe193, 0xe194, 0xe195, 0xe196, 0xe197, - 0xe198, 0xe199, 0xe19a, 0xe19b, 0xe19c, 0xe19d, 0xe19e, 0xe19f, - 0xe1a0, 0xe1a1, 0xe1a2, 0xe1a3, 0xe1a4, 0xe1a5, 0xe1a6, 0xe1a7, - 0xe1a8, 0xe1a9, 0xe1aa, 0xe1ab, 0xe1ac, 0xe1ad, 0xe1ae, 0xe1af, - 0xe1b0, 0xe1b1, 0xe1b2, 0xe1b3, 0xe1b4, 0xe1b5, 0xe1b6, 0xe1b7, - 0xe1b8, 0xe1b9, 0xe1ba, 0xe1bb, 0xe1bc, 0xe1bd, 0xe1be, 0xe1bf, - 0xe1c0, 0xe1c1, 0xe1c2, 0xe1c3, 0xe1c4, 0xe1c5, 0xe1c6, 0xe1c7, - 0xe1c8, 0xe1c9, 0xe1ca, 0xe1cb, 0xe1cc, 0xe1cd, 0xe1ce, 0xe1cf, - 0xe1d0, 0xe1d1, 0xe1d2, 0xe1d3, 0xe1d4, 0xe1d5, 0xe1d6, 0x003f, - /* lead byte fd */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe1d7, 0xe1d8, 0xe1d9, 0xe1da, 0xe1db, 0xe1dc, 0xe1dd, 0xe1de, - 0xe1df, 0xe1e0, 0xe1e1, 0xe1e2, 0xe1e3, 0xe1e4, 0xe1e5, 0xe1e6, - 0xe1e7, 0xe1e8, 0xe1e9, 0xe1ea, 0xe1eb, 0xe1ec, 0xe1ed, 0xe1ee, - 0xe1ef, 0xe1f0, 0xe1f1, 0xe1f2, 0xe1f3, 0xe1f4, 0xe1f5, 0xe1f6, - 0xe1f7, 0xe1f8, 0xe1f9, 0xe1fa, 0xe1fb, 0xe1fc, 0xe1fd, 0xe1fe, - 0xe1ff, 0xe200, 0xe201, 0xe202, 0xe203, 0xe204, 0xe205, 0xe206, - 0xe207, 0xe208, 0xe209, 0xe20a, 0xe20b, 0xe20c, 0xe20d, 0xe20e, - 0xe20f, 0xe210, 0xe211, 0xe212, 0xe213, 0xe214, 0xe215, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe216, 0xe217, 0xe218, 0xe219, 0xe21a, 0xe21b, 0xe21c, - 0xe21d, 0xe21e, 0xe21f, 0xe220, 0xe221, 0xe222, 0xe223, 0xe224, - 0xe225, 0xe226, 0xe227, 0xe228, 0xe229, 0xe22a, 0xe22b, 0xe22c, - 0xe22d, 0xe22e, 0xe22f, 0xe230, 0xe231, 0xe232, 0xe233, 0xe234, - 0xe235, 0xe236, 0xe237, 0xe238, 0xe239, 0xe23a, 0xe23b, 0xe23c, - 0xe23d, 0xe23e, 0xe23f, 0xe240, 0xe241, 0xe242, 0xe243, 0xe244, - 0xe245, 0xe246, 0xe247, 0xe248, 0xe249, 0xe24a, 0xe24b, 0xe24c, - 0xe24d, 0xe24e, 0xe24f, 0xe250, 0xe251, 0xe252, 0xe253, 0xe254, - 0xe255, 0xe256, 0xe257, 0xe258, 0xe259, 0xe25a, 0xe25b, 0xe25c, - 0xe25d, 0xe25e, 0xe25f, 0xe260, 0xe261, 0xe262, 0xe263, 0xe264, - 0xe265, 0xe266, 0xe267, 0xe268, 0xe269, 0xe26a, 0xe26b, 0xe26c, - 0xe26d, 0xe26e, 0xe26f, 0xe270, 0xe271, 0xe272, 0xe273, 0x003f, - /* lead byte fe */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe274, 0xe275, 0xe276, 0xe277, 0xe278, 0xe279, 0xe27a, 0xe27b, - 0xe27c, 0xe27d, 0xe27e, 0xe27f, 0xe280, 0xe281, 0xe282, 0xe283, - 0xe284, 0xe285, 0xe286, 0xe287, 0xe288, 0xe289, 0xe28a, 0xe28b, - 0xe28c, 0xe28d, 0xe28e, 0xe28f, 0xe290, 0xe291, 0xe292, 0xe293, - 0xe294, 0xe295, 0xe296, 0xe297, 0xe298, 0xe299, 0xe29a, 0xe29b, - 0xe29c, 0xe29d, 0xe29e, 0xe29f, 0xe2a0, 0xe2a1, 0xe2a2, 0xe2a3, - 0xe2a4, 0xe2a5, 0xe2a6, 0xe2a7, 0xe2a8, 0xe2a9, 0xe2aa, 0xe2ab, - 0xe2ac, 0xe2ad, 0xe2ae, 0xe2af, 0xe2b0, 0xe2b1, 0xe2b2, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe2b3, 0xe2b4, 0xe2b5, 0xe2b6, 0xe2b7, 0xe2b8, 0xe2b9, - 0xe2ba, 0xe2bb, 0xe2bc, 0xe2bd, 0xe2be, 0xe2bf, 0xe2c0, 0xe2c1, - 0xe2c2, 0xe2c3, 0xe2c4, 0xe2c5, 0xe2c6, 0xe2c7, 0xe2c8, 0xe2c9, - 0xe2ca, 0xe2cb, 0xe2cc, 0xe2cd, 0xe2ce, 0xe2cf, 0xe2d0, 0xe2d1, - 0xe2d2, 0xe2d3, 0xe2d4, 0xe2d5, 0xe2d6, 0xe2d7, 0xe2d8, 0xe2d9, - 0xe2da, 0xe2db, 0xe2dc, 0xe2dd, 0xe2de, 0xe2df, 0xe2e0, 0xe2e1, - 0xe2e2, 0xe2e3, 0xe2e4, 0xe2e5, 0xe2e6, 0xe2e7, 0xe2e8, 0xe2e9, - 0xe2ea, 0xe2eb, 0xe2ec, 0xe2ed, 0xe2ee, 0xe2ef, 0xe2f0, 0xe2f1, - 0xe2f2, 0xe2f3, 0xe2f4, 0xe2f5, 0xe2f6, 0xe2f7, 0xe2f8, 0xe2f9, - 0xe2fa, 0xe2fb, 0xe2fc, 0xe2fd, 0xe2fe, 0xe2ff, 0xe300, 0xe301, - 0xe302, 0xe303, 0xe304, 0xe305, 0xe306, 0xe307, 0xe308, 0xe309, - 0xe30a, 0xe30b, 0xe30c, 0xe30d, 0xe30e, 0xe30f, 0xe310, 0x003f -}; - -static const unsigned char cp2uni_leadbytes[256] = -{ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 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, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, - 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, - 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, - 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x00 -}; - -static const unsigned short uni2cp_low[32000] = -{ - /* 0x0000 .. 0x00ff */ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, - 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, - 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, - 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, - 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, - 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, - 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, - 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, - 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, - 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, - 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, - 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, - 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, - 0x0080, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x0021, 0xa246, 0xa247, 0x003f, 0xa244, 0x007c, 0xa1b1, - 0xa14c, 0x0063, 0x0061, 0x003f, 0x003f, 0x002d, 0x0052, 0xa1c2, - 0xa258, 0xa1d3, 0x0032, 0x0033, 0xa1a6, 0xa367, 0x003f, 0xa150, - 0xa14d, 0x0031, 0x006f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x0041, 0x0043, - 0x0045, 0x0045, 0x0045, 0x0045, 0x0049, 0x0049, 0x0049, 0x0049, - 0x0044, 0x004e, 0x004f, 0x004f, 0x004f, 0x004f, 0x004f, 0xa1d1, - 0x004f, 0x0055, 0x0055, 0x0055, 0x0055, 0x0059, 0x0054, 0x0073, - 0x0061, 0x0061, 0x0061, 0x0061, 0x0061, 0x0061, 0x0061, 0x0063, - 0x0065, 0x0065, 0x0065, 0x0065, 0x0069, 0x0069, 0x0069, 0x0069, - 0x0065, 0x006e, 0x006f, 0x006f, 0x006f, 0x006f, 0x006f, 0xa1d2, - 0x006f, 0x0075, 0x0075, 0x0075, 0x0075, 0x0079, 0x0074, 0x0079, - /* 0x0200 .. 0x02ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa3be, - 0x003f, 0xa3bc, 0xa3bd, 0xa3bf, 0x003f, 0xa1c5, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa3bb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x0300 .. 0x03ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1c2, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa344, 0xa345, 0xa346, 0xa347, 0xa348, 0xa349, 0xa34a, - 0xa34b, 0xa34c, 0xa34d, 0xa34e, 0xa34f, 0xa350, 0xa351, 0xa352, - 0xa353, 0xa354, 0x003f, 0xa355, 0xa356, 0xa357, 0xa358, 0xa359, - 0xa35a, 0xa35b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa35c, 0xa35d, 0xa35e, 0xa35f, 0xa360, 0xa361, 0xa362, - 0xa363, 0xa364, 0xa365, 0xa366, 0xa367, 0xa368, 0xa369, 0xa36a, - 0xa36b, 0xa36c, 0x003f, 0xa36d, 0xa36e, 0xa36f, 0xa370, 0xa371, - 0xa372, 0xa373, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2000 .. 0x20ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xa156, 0xa158, 0xa277, 0xa1fc, 0x003f, - 0xa1a5, 0xa1a6, 0x003f, 0x003f, 0xa1a7, 0xa1a8, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa145, 0x003f, 0xa3bb, 0xa14c, 0xa14b, 0xa145, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa1ac, 0xa1b2, 0x003f, 0xa1ab, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xa1b0, 0x003f, 0x003f, 0xa1c3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa3e1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2100 .. 0x21ff */ - 0x003f, 0x003f, 0x003f, 0xa24a, 0x003f, 0xa1c1, 0x003f, 0x003f, - 0x003f, 0xa24b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa2b9, 0xa2ba, 0xa2bb, 0xa2bc, 0xa2bd, 0xa2be, 0xa2bf, 0xa2c0, - 0xa2c1, 0xa2c2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa1f6, 0xa1f4, 0xa1f7, 0xa1f5, 0x003f, 0x003f, 0xa1f8, 0xa1f9, - 0xa1fb, 0xa1fa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2200 .. 0x22ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa241, 0xa242, 0x003f, - 0xa258, 0x003f, 0xa1d4, 0x003f, 0x003f, 0x003f, 0xa1db, 0xa1e8, - 0xa1e7, 0x003f, 0x003f, 0xa1fd, 0x003f, 0xa1fc, 0x003f, 0x003f, - 0x003f, 0xa1e4, 0xa1e5, 0xa1ec, 0x003f, 0x003f, 0xa1ed, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa1ef, 0xa1ee, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa1dc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa1da, 0xa1dd, 0x003f, 0xa1dd, 0x003f, 0x003f, 0xa1d8, 0xa1d9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1f2, 0x003f, 0x003f, - 0x003f, 0xa1f3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1e6, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1e9, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2300 .. 0x23ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa15b, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2500 .. 0x25ff */ - 0xa277, 0x003f, 0xa278, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa27a, 0x003f, 0x003f, 0x003f, - 0xa27b, 0x003f, 0x003f, 0x003f, 0xa27c, 0x003f, 0x003f, 0x003f, - 0xa27d, 0x003f, 0x003f, 0x003f, 0xa275, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa274, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa273, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa272, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa271, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf9f9, 0xf9f8, 0xf9e6, 0xf9ef, 0xf9dd, 0xf9e8, 0xf9f1, 0xf9df, - 0xf9ec, 0xf9f5, 0xf9e3, 0xf9ee, 0xf9f7, 0xf9e5, 0xf9e9, 0xf9f2, - 0xf9e0, 0xf9eb, 0xf9f4, 0xf9e2, 0xf9e7, 0xf9f0, 0xf9de, 0xf9ed, - 0xf9f6, 0xf9e4, 0xf9ea, 0xf9f3, 0xf9e1, 0xa27e, 0xa2a1, 0xa2a3, - 0xa2a2, 0xa2ac, 0xa2ad, 0xa2ae, 0xa15a, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa262, 0xa263, 0xa264, 0xa265, 0xa266, 0xa267, 0xa268, - 0xa269, 0xa270, 0xa26f, 0xa26e, 0xa26d, 0xa26c, 0xa26b, 0xa26a, - 0x003f, 0x003f, 0x003f, 0xf9fe, 0xa276, 0xa279, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa1bd, 0xa1bc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa1b6, 0xa1b5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa1bf, 0xa1be, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1bb, 0xa1ba, - 0x003f, 0x003f, 0x003f, 0xa1b3, 0x003f, 0x003f, 0xa1b7, 0xa1b4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa2a8, 0xa2a9, 0xa2ab, 0xa2aa, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x2600 .. 0x26ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa1b9, 0xa1b8, 0x003f, - 0x003f, 0xa1f3, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa1f0, 0xa1f2, 0xa1f1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x3000 .. 0x30ff */ - 0xa140, 0xa142, 0xa143, 0xa1b2, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa171, 0xa172, 0xa16d, 0xa16e, 0xa175, 0xa176, 0xa179, 0xa17a, - 0xa169, 0xa16a, 0xa245, 0x003f, 0xa165, 0xa166, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa1e3, 0xa1a9, 0xa1aa, 0x003f, - 0x003f, 0xa2c3, 0xa2c4, 0xa2c5, 0xa2c6, 0xa2c7, 0xa2c8, 0xa2c9, - 0xa2ca, 0xa2cb, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa1ca, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x3100 .. 0x31ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa374, 0xa375, 0xa376, - 0xa377, 0xa378, 0xa379, 0xa37a, 0xa37b, 0xa37c, 0xa37d, 0xa37e, - 0xa3a1, 0xa3a2, 0xa3a3, 0xa3a4, 0xa3a5, 0xa3a6, 0xa3a7, 0xa3a8, - 0xa3a9, 0xa3aa, 0xa3ab, 0xa3ac, 0xa3ad, 0xa3ae, 0xa3af, 0xa3b0, - 0xa3b1, 0xa3b2, 0xa3b3, 0xa3b4, 0xa3b5, 0xa3b6, 0xa3b7, 0xa3b8, - 0xa3b9, 0xa3ba, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa440, 0xa447, 0xa454, 0xa57c, 0xa457, 0xa4a4, - 0xa455, 0xa5d2, 0xa441, 0xa4fe, 0xa442, 0xa4d1, 0xa661, 0xa448, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x3200 .. 0x32ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa440, 0xa447, 0xa454, 0xa57c, 0xa4ad, 0xa4bb, 0xa443, 0xa44b, - 0xa445, 0xa451, 0xa4eb, 0xa4f5, 0xa4f4, 0xa4ec, 0xaaf7, 0xa467, - 0xa4e9, 0xaee8, 0xa6b3, 0xaac0, 0xa657, 0xaf53, 0xb05d, 0xafac, - 0xb3d2, 0xa54e, 0xa949, 0xbec7, 0xbaca, 0xa5f8, 0xb8ea, 0xa8f3, - 0xb2bd, 0xa5f0, 0xa6db, 0xa6dc, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa440, 0xa447, 0xa454, 0xa57c, 0xa4ad, 0xa4bb, 0xa443, 0xa44b, - 0xa445, 0xa451, 0xa4eb, 0xa4f5, 0xa4f4, 0xa4ec, 0xaaf7, 0xa467, - 0xa4e9, 0xaee8, 0xa6b3, 0xaac0, 0xa657, 0xaf53, 0xb05d, 0xafac, - 0xb3d2, 0xafb5, 0xa86b, 0xa46b, 0xbe41, 0xc075, 0xa64c, 0xaa60, - 0xb6b5, 0xa5f0, 0xbc67, 0xa1c0, 0xa457, 0xa4a4, 0xa455, 0xa5aa, - 0xa56b, 0xc2e5, 0xa976, 0xbec7, 0xbaca, 0xa5f8, 0xb8ea, 0xa8f3, - 0xa95d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x3300 .. 0x33ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa255, 0xa256, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa250, 0xa251, 0xa252, 0x003f, - 0x003f, 0xa254, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa257, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa253, 0x003f, - 0x003f, 0xa1eb, 0xa1ea, 0x003f, 0x003f, 0xa24f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x4e00 .. 0x4eff */ - 0xa440, 0xa442, 0x003f, 0xa443, 0x003f, 0x003f, 0x003f, 0xc945, - 0xa456, 0xa454, 0xa457, 0xa455, 0xc946, 0xa4a3, 0xc94f, 0xc94d, - 0xa4a2, 0xa4a1, 0x003f, 0x003f, 0xa542, 0xa541, 0xa540, 0x003f, - 0xa543, 0xa4fe, 0x003f, 0x003f, 0x003f, 0x003f, 0xa5e0, 0xa5e1, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa8c3, 0x003f, - 0x003f, 0x003f, 0x003f, 0xa458, 0x003f, 0xa4a4, 0xc950, 0x003f, - 0xa4a5, 0xc963, 0xa6ea, 0xcbb1, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa459, 0xa4a6, 0x003f, 0xa544, 0xc964, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc940, 0xa444, 0x003f, 0xa45b, 0x003f, 0xc947, - 0xa45c, 0x003f, 0x003f, 0xa4a7, 0x003f, 0xa545, 0xa547, 0xa546, - 0x003f, 0x003f, 0xa5e2, 0xa5e3, 0x003f, 0x003f, 0xa8c4, 0x003f, - 0xadbc, 0xa441, 0x003f, 0x003f, 0xc941, 0xa445, 0xa45e, 0xa45d, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa5e4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xa8c5, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb0ae, 0xd44b, - 0x003f, 0x003f, 0xb6c3, 0xdcb1, 0xdcb2, 0x003f, 0xa446, 0x003f, - 0xa4a9, 0x003f, 0x003f, 0xa8c6, 0xa447, 0xc948, 0xa45f, 0x003f, - 0x003f, 0xa4aa, 0xa4ac, 0xc951, 0xa4ad, 0xa4ab, 0x003f, 0x003f, - 0x003f, 0xa5e5, 0x003f, 0xa8c7, 0x003f, 0x003f, 0xa8c8, 0xab45, - 0x003f, 0xa460, 0xa4ae, 0x003f, 0xa5e6, 0xa5e8, 0xa5e7, 0x003f, - 0xa6eb, 0x003f, 0x003f, 0xa8c9, 0xa8ca, 0xab46, 0xab47, 0x003f, - 0x003f, 0x003f, 0x003f, 0xadbd, 0x003f, 0x003f, 0xdcb3, 0x003f, - 0x003f, 0xf6d6, 0xa448, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa4b0, 0xa4af, 0xc952, 0xa4b1, 0xa4b7, 0x003f, 0xa4b2, 0xa4b3, - 0xc954, 0xc953, 0xa4b5, 0xa4b6, 0x003f, 0xa4b4, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa54a, 0xa54b, 0xa54c, 0xa54d, - 0xa549, 0xa550, 0xc96a, 0x003f, 0xc966, 0xc969, 0xa551, 0xa561, - 0x003f, 0xc968, 0x003f, 0xa54e, 0xa54f, 0xa548, 0x003f, 0x003f, - 0xc965, 0xc967, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa5f5, 0xc9b0, 0xa5f2, 0xa5f6, 0xc9ba, 0xc9ae, 0xa5f3, 0xc9b2, - 0x003f, 0x003f, 0x003f, 0xa5f4, 0x003f, 0xa5f7, 0x003f, 0xa5e9, - /* 0x4f00 .. 0x4fff */ - 0xc9b1, 0xa5f8, 0xc9b5, 0x003f, 0xc9b9, 0xc9b6, 0x003f, 0x003f, - 0xc9b3, 0xa5ea, 0xa5ec, 0xa5f9, 0x003f, 0xa5ee, 0xc9ab, 0xa5f1, - 0xa5ef, 0xa5f0, 0xc9bb, 0xc9b8, 0xc9af, 0xa5ed, 0x003f, 0x003f, - 0xc9ac, 0xa5eb, 0x003f, 0x003f, 0x003f, 0xc9b4, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc9b7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xc9ad, 0xca66, 0x003f, 0xa742, - 0xa6f4, 0x003f, 0x003f, 0xca67, 0xa6f1, 0x003f, 0xa744, 0x003f, - 0xa6f9, 0x003f, 0xa6f8, 0xca5b, 0xa6fc, 0xa6f7, 0xca60, 0xca68, - 0x003f, 0xca64, 0x003f, 0xa6fa, 0x003f, 0x003f, 0xa6fd, 0xa6ee, - 0xa747, 0xca5d, 0x003f, 0x003f, 0xcbbd, 0xa6ec, 0xa743, 0xa6ed, - 0xa6f5, 0xa6f6, 0xca62, 0xca5e, 0xa6fb, 0xa6f3, 0xca5a, 0xa6ef, - 0xca65, 0xa745, 0xa748, 0xa6f2, 0xa740, 0xa746, 0xa6f0, 0xca63, - 0xa741, 0xca69, 0xca5c, 0xa6fe, 0xca5f, 0x003f, 0x003f, 0xca61, - 0x003f, 0xa8d8, 0xcbbf, 0xcbcb, 0xa8d0, 0x003f, 0xcbcc, 0xa8cb, - 0xa8d5, 0x003f, 0x003f, 0xa8ce, 0xcbb9, 0xa8d6, 0xcbb8, 0xcbbc, - 0xcbc3, 0xcbc1, 0xa8de, 0xa8d9, 0xcbb3, 0xcbb5, 0xa8db, 0xa8cf, - 0xcbb6, 0xcbc2, 0xcbc9, 0xa8d4, 0xcbbb, 0xcbb4, 0xa8d3, 0xcbb7, - 0xa8d7, 0xcbba, 0x003f, 0xa8d2, 0x003f, 0xa8cd, 0x003f, 0xa8dc, - 0xcbc4, 0xa8dd, 0xcbc8, 0x003f, 0xcbc6, 0xcbca, 0xa8da, 0xcbbe, - 0xcbb2, 0x003f, 0xcbc0, 0xa8d1, 0xcbc5, 0xa8cc, 0xcbc7, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xab56, 0xab4a, - 0x003f, 0x003f, 0xcde0, 0xcde8, 0x003f, 0xab49, 0xab51, 0xab5d, - 0x003f, 0xcdee, 0xcdec, 0xcde7, 0x003f, 0x003f, 0x003f, 0xab4b, - 0xcded, 0xcde3, 0xab59, 0xab50, 0xab58, 0xcdde, 0x003f, 0xcdea, - 0x003f, 0xcde1, 0xab54, 0xcde2, 0x003f, 0xcddd, 0xab5b, 0xab4e, - 0xab57, 0xab4d, 0x003f, 0xcddf, 0xcde4, 0x003f, 0xcdeb, 0xab55, - 0xab52, 0xcde6, 0xab5a, 0xcde9, 0xcde5, 0xab4f, 0xab5c, 0xab53, - 0xab4c, 0xab48, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcdef, 0x003f, 0xadd7, 0xadc1, - 0x003f, 0xadd1, 0x003f, 0xadd6, 0xd0d0, 0xd0cf, 0xd0d4, 0xd0d5, - 0xadc4, 0x003f, 0xadcd, 0x003f, 0x003f, 0x003f, 0xadda, 0x003f, - /* 0x5000 .. 0x50ff */ - 0xadce, 0x003f, 0x003f, 0x003f, 0x003f, 0xd0c9, 0xadc7, 0xd0ca, - 0x003f, 0xaddc, 0x003f, 0xadd3, 0xadbe, 0xadbf, 0xd0dd, 0xb0bf, - 0x003f, 0xadcc, 0xadcb, 0xd0cb, 0xadcf, 0xd45b, 0xadc6, 0xd0d6, - 0xadd5, 0xadd4, 0xadca, 0xd0ce, 0xd0d7, 0x003f, 0xd0c8, 0xadc9, - 0xd0d8, 0xadd2, 0xd0cc, 0xadc0, 0x003f, 0xadc3, 0xadc2, 0xd0d9, - 0xadd0, 0xadc5, 0xadd9, 0xaddb, 0xd0d3, 0xadd8, 0x003f, 0xd0db, - 0xd0cd, 0xd0dc, 0x003f, 0xd0d1, 0x003f, 0xd0da, 0x003f, 0xd0d2, - 0x003f, 0x003f, 0x003f, 0x003f, 0xadc8, 0x003f, 0x003f, 0x003f, - 0xd463, 0xd457, 0x003f, 0xb0b3, 0x003f, 0xd45c, 0xd462, 0xb0b2, - 0xd455, 0xb0b6, 0xd459, 0xd452, 0xb0b4, 0xd456, 0xb0b9, 0xb0be, - 0x003f, 0xd467, 0x003f, 0xd451, 0x003f, 0xb0ba, 0x003f, 0xd466, - 0x003f, 0x003f, 0xb0b5, 0xd458, 0xb0b1, 0xd453, 0xd44f, 0xd45d, - 0xd450, 0xd44e, 0xd45a, 0xd460, 0xd461, 0xb0b7, 0x003f, 0x003f, - 0xd85b, 0xd45e, 0xd44d, 0xd45f, 0x003f, 0xb0c1, 0xd464, 0xb0c0, - 0xd44c, 0x003f, 0xd454, 0xd465, 0xb0bc, 0xb0bb, 0xb0b8, 0xb0bd, - 0x003f, 0x003f, 0xb0af, 0x003f, 0x003f, 0xb0b0, 0x003f, 0x003f, - 0xb3c8, 0x003f, 0xd85e, 0xd857, 0x003f, 0xb3c5, 0x003f, 0xd85f, - 0x003f, 0x003f, 0x003f, 0xd855, 0xd858, 0xb3c4, 0xd859, 0x003f, - 0x003f, 0xb3c7, 0xd85d, 0x003f, 0xd853, 0xd852, 0xb3c9, 0x003f, - 0xb3ca, 0xb3c6, 0xb3cb, 0xd851, 0xd85c, 0xd85a, 0xd854, 0x003f, - 0x003f, 0x003f, 0xb3c3, 0xd856, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xb6ca, 0xb6c4, 0xdcb7, 0xb6cd, - 0xdcbd, 0xdcc0, 0xb6c6, 0xb6c7, 0xdcba, 0xb6c5, 0xdcc3, 0xb6cb, - 0xdcc4, 0x003f, 0xdcbf, 0xb6cc, 0x003f, 0xdcb4, 0xb6c9, 0xdcb5, - 0x003f, 0xdcbe, 0xdcbc, 0x003f, 0xdcb8, 0xb6c8, 0xdcb6, 0xb6ce, - 0xdcbb, 0xdcc2, 0xdcb9, 0xdcc1, 0x003f, 0x003f, 0xb9b6, 0xb9b3, - 0x003f, 0xb9b4, 0x003f, 0xe0f9, 0xe0f1, 0xb9b2, 0xb9af, 0xe0f2, - 0x003f, 0x003f, 0xb9b1, 0xe0f5, 0x003f, 0xe0f7, 0x003f, 0x003f, - 0xe0fe, 0x003f, 0x003f, 0xe0fd, 0xe0f8, 0xb9ae, 0xe0f0, 0xb9ac, - 0xe0f3, 0xb9b7, 0xe0f6, 0x003f, 0xe0fa, 0xb9b0, 0xb9ad, 0xe0fc, - 0xe0fb, 0xb9b5, 0x003f, 0xe0f4, 0x003f, 0xbbf8, 0xe4ec, 0x003f, - 0xe4e9, 0xbbf9, 0x003f, 0xbbf7, 0x003f, 0xe4f0, 0xe4ed, 0xe4e6, - /* 0x5100 .. 0x51ff */ - 0xbbf6, 0x003f, 0xbbfa, 0xe4e7, 0xbbf5, 0xbbfd, 0xe4ea, 0xe4eb, - 0xbbfb, 0xbbfc, 0xe4f1, 0xe4ee, 0xe4ef, 0x003f, 0x003f, 0x003f, - 0xbeaa, 0xe8f8, 0xbea7, 0xe8f5, 0xbea9, 0xbeab, 0x003f, 0xe8f6, - 0xbea8, 0x003f, 0xe8f7, 0x003f, 0xe8f4, 0x003f, 0x003f, 0xc076, - 0xecbd, 0xc077, 0xecbb, 0x003f, 0xecbc, 0xecba, 0xecb9, 0x003f, - 0x003f, 0xecbe, 0xc075, 0x003f, 0x003f, 0xefb8, 0xefb9, 0x003f, - 0xe4e8, 0xefb7, 0xc078, 0xc35f, 0xf1eb, 0xf1ec, 0x003f, 0xc4d7, - 0xc4d8, 0xf5c1, 0xf5c0, 0xc56c, 0xc56b, 0xf7d0, 0x003f, 0xa449, - 0xa461, 0xa4b9, 0x003f, 0xa4b8, 0xa553, 0xa552, 0xa5fc, 0xa5fb, - 0xa5fd, 0xa5fa, 0x003f, 0xa74a, 0xa749, 0xa74b, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa8e0, 0x003f, 0xa8df, 0xa8e1, 0x003f, 0xab5e, - 0x003f, 0xa259, 0xd0de, 0xa25a, 0xb0c2, 0xa25c, 0xa25b, 0xd860, - 0x003f, 0xa25d, 0xb9b8, 0xa25e, 0x003f, 0xa44a, 0x003f, 0xa4ba, - 0xa5fe, 0xa8e2, 0x003f, 0xa44b, 0xa4bd, 0xa4bb, 0xa4bc, 0x003f, - 0x003f, 0xa640, 0x003f, 0x003f, 0x003f, 0xa74c, 0xa8e4, 0xa8e3, - 0xa8e5, 0x003f, 0x003f, 0x003f, 0xaddd, 0x003f, 0x003f, 0x003f, - 0xbeac, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc94e, - 0x003f, 0xa554, 0xa555, 0x003f, 0x003f, 0xa641, 0x003f, 0xca6a, - 0x003f, 0xab60, 0xab5f, 0xd0e0, 0xd0df, 0xb0c3, 0x003f, 0xa4be, - 0xc955, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcbcd, 0x003f, - 0xab61, 0x003f, 0xade0, 0x003f, 0xadde, 0xaddf, 0x003f, 0x003f, - 0x003f, 0x003f, 0xbead, 0x003f, 0xa556, 0x003f, 0x003f, 0x003f, - 0xa642, 0xc9bc, 0x003f, 0x003f, 0x003f, 0x003f, 0xa74d, 0xa74e, - 0x003f, 0xca6b, 0x003f, 0x003f, 0xcbce, 0xa8e6, 0xcbcf, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd0e2, 0xd0e3, 0xade3, 0x003f, - 0xd0e4, 0x003f, 0xd0e1, 0xade4, 0xade2, 0xade1, 0xd0e5, 0x003f, - 0xd468, 0x003f, 0x003f, 0x003f, 0xd861, 0x003f, 0x003f, 0xdcc5, - 0xe140, 0x003f, 0x003f, 0x003f, 0xbbfe, 0xbeae, 0xe8f9, 0x003f, - 0xa44c, 0xa45a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb0c4, 0xb3cd, 0x003f, 0xb9b9, 0x003f, 0xc942, 0xa4bf, 0x003f, - 0xa559, 0xa557, 0xa558, 0x003f, 0x003f, 0xa8e7, 0x003f, 0x003f, - /* 0x5200 .. 0x52ff */ - 0xa44d, 0xa44e, 0x003f, 0xa462, 0x003f, 0x003f, 0xa4c0, 0xa4c1, - 0xa4c2, 0xc9be, 0xa55a, 0x003f, 0xc96b, 0x003f, 0xa646, 0x003f, - 0xc9bf, 0xa644, 0xa645, 0xc9bd, 0x003f, 0x003f, 0xa647, 0xa643, - 0x003f, 0x003f, 0x003f, 0x003f, 0xca6c, 0xaaec, 0xca6d, 0x003f, - 0x003f, 0xca6e, 0x003f, 0x003f, 0xa750, 0xa74f, 0x003f, 0x003f, - 0xa753, 0xa751, 0xa752, 0x003f, 0x003f, 0x003f, 0xa8ed, 0x003f, - 0xa8ec, 0xcbd4, 0xcbd1, 0xcbd2, 0x003f, 0xcbd0, 0xa8ee, 0xa8ea, - 0xa8e9, 0x003f, 0xa8eb, 0xa8e8, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa8ef, 0x003f, 0xab63, 0xcdf0, 0x003f, 0xcbd3, 0xab68, - 0x003f, 0xcdf1, 0xab64, 0xab67, 0xab66, 0xab65, 0xab62, 0x003f, - 0x003f, 0x003f, 0xd0e8, 0x003f, 0xade7, 0xd0eb, 0xade5, 0x003f, - 0x003f, 0x003f, 0xd0e7, 0xade8, 0xade6, 0xade9, 0xd0e9, 0xd0ea, - 0x003f, 0xd0e6, 0xd0ec, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb3d1, 0xb0c5, 0xd469, 0xd46b, 0xd46a, 0xd46c, 0xb0c6, - 0x003f, 0x003f, 0xb3ce, 0x003f, 0xb3cf, 0xb3d0, 0x003f, 0xb6d0, - 0xdcc7, 0x003f, 0xdcc6, 0xdcc8, 0xdcc9, 0xb6d1, 0x003f, 0xb6cf, - 0xe141, 0xe142, 0xb9bb, 0xb9ba, 0xe35a, 0x003f, 0x003f, 0xbc40, - 0xbc41, 0xbc42, 0xbc44, 0xe4f2, 0xe4f3, 0xbc43, 0x003f, 0x003f, - 0x003f, 0xbeaf, 0x003f, 0xbeb0, 0x003f, 0x003f, 0xf1ed, 0xf5c3, - 0xf5c2, 0xf7d1, 0x003f, 0xa44f, 0x003f, 0x003f, 0x003f, 0xa55c, - 0xa55b, 0x003f, 0x003f, 0xa648, 0x003f, 0x003f, 0xc9c0, 0x003f, - 0x003f, 0xa755, 0xa756, 0xa754, 0xa757, 0xca6f, 0xca70, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xa8f1, 0xcbd5, 0x003f, 0xa8f0, 0x003f, - 0xcdf2, 0xab6c, 0xcdf3, 0xab6b, 0x003f, 0x003f, 0x003f, 0xab69, - 0x003f, 0xab6a, 0x003f, 0x003f, 0x003f, 0xd0ed, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb0c7, 0xd46e, 0x003f, 0xb0ca, 0xd46d, 0xb1e5, - 0xb0c9, 0xb0c8, 0x003f, 0xb3d4, 0x003f, 0xb3d3, 0xb3d2, 0xb6d2, - 0x003f, 0x003f, 0xb6d5, 0xb6d6, 0xb6d4, 0x003f, 0xb6d3, 0x003f, - 0x003f, 0xe143, 0x003f, 0xe144, 0x003f, 0x003f, 0x003f, 0xe4f5, - 0xbc45, 0xe4f4, 0x003f, 0xbeb1, 0xecbf, 0xc079, 0x003f, 0xf1ee, - 0xc455, 0x003f, 0xa463, 0xa4c3, 0xc956, 0x003f, 0xa4c4, 0xa4c5, - /* 0x5300 .. 0x53ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa55d, 0xa55e, 0x003f, - 0xa649, 0xca71, 0xcbd6, 0xcbd7, 0x003f, 0xab6d, 0xd0ee, 0xb0cc, - 0xb0cb, 0xd863, 0xd862, 0x003f, 0x003f, 0xa450, 0xa4c6, 0xa55f, - 0x003f, 0xb0cd, 0xc943, 0x003f, 0xc96c, 0xa560, 0x003f, 0xc9c2, - 0xa64b, 0xa64a, 0xc9c1, 0xa758, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xadea, 0x003f, 0x003f, 0xd46f, 0x003f, 0xb6d7, - 0xe145, 0xb9bc, 0x003f, 0x003f, 0xe8fa, 0x003f, 0x003f, 0xf3fd, - 0x003f, 0xa4c7, 0x003f, 0x003f, 0xcbd8, 0xcdf4, 0xb0d0, 0xb0ce, - 0xb0cf, 0xa451, 0x003f, 0xa464, 0xa2cd, 0xa4ca, 0x003f, 0xa4c9, - 0xa4c8, 0xa563, 0xa562, 0x003f, 0xc96d, 0xc9c3, 0x003f, 0x003f, - 0x003f, 0xa8f5, 0xa8f2, 0xa8f4, 0xa8f3, 0x003f, 0x003f, 0xab6e, - 0x003f, 0x003f, 0xb3d5, 0x003f, 0xa452, 0x003f, 0xa4cb, 0x003f, - 0xa565, 0xa564, 0x003f, 0xca72, 0x003f, 0x003f, 0xa8f6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xc957, 0x003f, 0xa567, 0xa566, - 0xa64c, 0xa64d, 0xca73, 0xa759, 0x003f, 0xa75a, 0x003f, 0xa8f7, - 0xa8f8, 0xa8f9, 0x003f, 0xab6f, 0xcdf5, 0x003f, 0x003f, 0xadeb, - 0x003f, 0x003f, 0xc944, 0x003f, 0xa4cc, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc9c4, 0x003f, 0x003f, 0x003f, 0xca74, 0xca75, - 0x003f, 0x003f, 0xcbd9, 0x003f, 0xcbda, 0x003f, 0xcdf7, 0xcdf6, - 0xcdf9, 0xcdf8, 0xab70, 0x003f, 0xd470, 0xaded, 0xd0ef, 0xadec, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd864, 0xb3d6, 0x003f, 0xd865, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe146, 0xb9bd, 0x003f, 0x003f, - 0x003f, 0x003f, 0xbc46, 0x003f, 0xf1ef, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc958, 0x003f, 0xa568, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb0d1, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa453, 0xa465, 0xa4ce, 0xa4cd, 0x003f, 0xa4cf, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa8fb, 0x003f, 0xa8fa, 0xa8fc, - 0x003f, 0x003f, 0x003f, 0xab71, 0x003f, 0x003f, 0x003f, 0xadee, - 0x003f, 0xe8fb, 0xc24f, 0xa466, 0xa56a, 0xa579, 0xa574, 0x003f, - 0xa56f, 0xa56e, 0xa575, 0xa573, 0xa56c, 0xa57a, 0xa56d, 0xa569, - 0xa578, 0xa577, 0xa576, 0xa56b, 0x003f, 0xa572, 0x003f, 0x003f, - 0xa571, 0x003f, 0x003f, 0xa57b, 0xa570, 0x003f, 0x003f, 0x003f, - /* 0x5400 .. 0x54ff */ - 0x003f, 0xa653, 0x003f, 0xa659, 0xa655, 0x003f, 0xa65b, 0xc9c5, - 0xa658, 0xa64e, 0xa651, 0xa654, 0xa650, 0xa657, 0xa65a, 0xa64f, - 0xa652, 0xa656, 0xa65c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xca7e, 0xca7b, 0x003f, 0xa767, 0xca7c, 0xa75b, 0xa75d, 0xa775, - 0xa770, 0x003f, 0x003f, 0x003f, 0xcaa5, 0xca7d, 0xa75f, 0xa761, - 0xcaa4, 0xa768, 0xca78, 0xa774, 0xa776, 0xa75c, 0xa76d, 0x003f, - 0xca76, 0xa773, 0x003f, 0xa764, 0x003f, 0xa76e, 0xa76f, 0xca77, - 0xa76c, 0xa76a, 0x003f, 0xa76b, 0xa771, 0xcaa1, 0xa75e, 0x003f, - 0xa772, 0xcaa3, 0xa766, 0xa763, 0x003f, 0xca7a, 0xa762, 0xcaa6, - 0xa765, 0x003f, 0xa769, 0x003f, 0x003f, 0x003f, 0xa760, 0xcaa2, - 0x003f, 0x003f, 0x003f, 0x003f, 0xca79, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcbeb, 0xcbea, 0xa94f, 0xcbed, 0xcbef, 0xcbe4, 0xcbe7, 0xcbee, - 0xa950, 0x003f, 0x003f, 0xcbe1, 0xcbe5, 0x003f, 0x003f, 0xcbe9, - 0xce49, 0xa94b, 0xce4d, 0xa8fd, 0xcbe6, 0xa8fe, 0xa94c, 0xa945, - 0xa941, 0x003f, 0xcbe2, 0xa944, 0xa949, 0xa952, 0xcbe3, 0xcbdc, - 0xa943, 0xcbdd, 0xcbdf, 0x003f, 0xa946, 0x003f, 0xa948, 0xcbdb, - 0xcbe0, 0x003f, 0x003f, 0xa951, 0xa94d, 0xcbe8, 0xa953, 0x003f, - 0xa94a, 0xcbde, 0xa947, 0x003f, 0x003f, 0xa942, 0xa940, 0x003f, - 0xcbec, 0x003f, 0xa94e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xce48, 0xcdfb, 0xce4b, 0x003f, 0x003f, 0xcdfd, 0xab78, 0xaba8, - 0xab74, 0xaba7, 0xab7d, 0xaba4, 0xab72, 0xcdfc, 0xce43, 0xaba3, - 0xce4f, 0xaba5, 0x003f, 0xab79, 0x003f, 0x003f, 0xce45, 0xce42, - 0xab77, 0x003f, 0xcdfa, 0xaba6, 0xce4a, 0xab7c, 0xce4c, 0xaba9, - 0xab73, 0xab7e, 0xab7b, 0xce40, 0xaba1, 0xce46, 0xce47, 0xab7a, - 0xaba2, 0xab76, 0x003f, 0x003f, 0x003f, 0x003f, 0xab75, 0xcdfe, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xce44, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xce4e, 0x003f, - 0xd144, 0xadfb, 0xd0f1, 0x003f, 0xd0f6, 0xadf4, 0xae40, 0xd0f4, - 0xadef, 0xadf9, 0xadfe, 0xd0fb, 0x003f, 0xadfa, 0xadfd, 0x003f, - 0x003f, 0xd0fe, 0xadf5, 0xd0f5, 0x003f, 0x003f, 0x003f, 0xd142, - 0xd143, 0x003f, 0xadf7, 0xd141, 0xadf3, 0xae43, 0x003f, 0xd0f8, - /* 0x5500 .. 0x55ff */ - 0x003f, 0xadf1, 0x003f, 0xd146, 0xd0f9, 0xd0fd, 0xadf6, 0xae42, - 0xd0fa, 0xadfc, 0xd140, 0xd147, 0xd4a1, 0x003f, 0xd145, 0xae44, - 0xadf0, 0xd0fc, 0xd0f3, 0x003f, 0xadf8, 0x003f, 0x003f, 0xd0f2, - 0x003f, 0x003f, 0xd0f7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd0f0, 0xae41, - 0x003f, 0x003f, 0xd477, 0x003f, 0xb0e4, 0xd4a7, 0xb0e2, 0xb0df, - 0xd47c, 0xb0db, 0xd4a2, 0xb0e6, 0xd476, 0xd47b, 0xd47a, 0xadf2, - 0xb0e1, 0xd4a5, 0x003f, 0xd4a8, 0xd473, 0x003f, 0xb3e8, 0x003f, - 0xd4a9, 0xb0e7, 0x003f, 0xb0d9, 0xb0d6, 0xd47e, 0xb0d3, 0x003f, - 0xd4a6, 0x003f, 0xb0da, 0xd4aa, 0x003f, 0xd474, 0xd4a4, 0xb0dd, - 0xd475, 0xd478, 0xd47d, 0x003f, 0x003f, 0xb0de, 0xb0dc, 0xb0e8, - 0x003f, 0x003f, 0x003f, 0x003f, 0xb0e3, 0x003f, 0xb0d7, 0xb1d2, - 0x003f, 0xb0d8, 0xd479, 0xb0e5, 0xb0e0, 0xd4a3, 0xb0d5, 0x003f, - 0x003f, 0x003f, 0xb0d4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd471, 0xd472, 0xd86a, - 0x003f, 0x003f, 0x003f, 0xb3d7, 0xb3da, 0xd875, 0xb3ee, 0xd878, - 0xb3d8, 0xd871, 0xb3de, 0xb3e4, 0xb5bd, 0x003f, 0x003f, 0xb3e2, - 0xd86e, 0xb3ef, 0xb3db, 0xb3e3, 0xd876, 0xdcd7, 0xd87b, 0xd86f, - 0x003f, 0xd866, 0xd873, 0xd86d, 0xb3e1, 0xd879, 0x003f, 0x003f, - 0xb3dd, 0xb3f1, 0xb3ea, 0x003f, 0xb3df, 0xb3dc, 0x003f, 0xb3e7, - 0x003f, 0xd87a, 0xd86c, 0xd872, 0xd874, 0xd868, 0xd877, 0xb3d9, - 0xd867, 0x003f, 0xb3e0, 0xb3f0, 0xb3ec, 0xd869, 0xb3e6, 0x003f, - 0x003f, 0xb3ed, 0xb3e9, 0xb3e5, 0x003f, 0xd870, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb3eb, 0x003f, 0x003f, 0x003f, 0xdcd5, - 0xdcd1, 0x003f, 0xdce0, 0xdcca, 0xdcd3, 0xb6e5, 0xb6e6, 0xb6de, - 0xdcdc, 0xb6e8, 0xdccf, 0xdcce, 0xdccc, 0xdcde, 0xb6dc, 0xdcd8, - 0xdccd, 0xb6df, 0xdcd6, 0xb6da, 0xdcd2, 0xdcd9, 0xdcdb, 0x003f, - 0x003f, 0xdcdf, 0xb6e3, 0xdccb, 0xb6dd, 0xdcd0, 0x003f, 0xb6d8, - 0x003f, 0xb6e4, 0xdcda, 0xb6e0, 0xb6e1, 0xb6e7, 0xb6db, 0xa25f, - 0xb6d9, 0xdcd4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb6e2, - 0x003f, 0x003f, 0xdcdd, 0x003f, 0x003f, 0x003f, 0xb9cd, 0xb9c8, - 0x003f, 0xe155, 0xe151, 0x003f, 0xe14b, 0xb9c2, 0xb9be, 0xe154, - /* 0x5600 .. 0x56ff */ - 0xb9bf, 0xe14e, 0xe150, 0x003f, 0xe153, 0x003f, 0xb9c4, 0x003f, - 0xb9cb, 0xb9c5, 0x003f, 0x003f, 0xe149, 0xb9c6, 0xb9c7, 0xe14c, - 0xb9cc, 0x003f, 0xe14a, 0xe14f, 0xb9c3, 0xe148, 0xb9c9, 0xb9c1, - 0x003f, 0x003f, 0x003f, 0xb9c0, 0xe14d, 0xe152, 0x003f, 0xb9ca, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe147, - 0x003f, 0xbc4d, 0xe547, 0x003f, 0xe544, 0x003f, 0xbc47, 0xbc53, - 0xbc54, 0x003f, 0xbc4a, 0xe542, 0xbc4c, 0xe4f9, 0xbc52, 0x003f, - 0xe546, 0xbc49, 0xe548, 0xbc48, 0x003f, 0xe543, 0xe545, 0xbc4b, - 0xe541, 0xe4fa, 0xe4f7, 0x003f, 0x003f, 0xd86b, 0xe4fd, 0x003f, - 0xe4f6, 0xe4fc, 0xe4fb, 0x003f, 0xe4f8, 0x003f, 0xbc4f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xbc4e, 0x003f, 0x003f, 0x003f, 0xbc50, - 0xe4fe, 0xbeb2, 0xe540, 0x003f, 0x003f, 0x003f, 0xe945, 0x003f, - 0xe8fd, 0x003f, 0xbebe, 0xe942, 0xbeb6, 0xbeba, 0xe941, 0x003f, - 0xbeb9, 0xbeb5, 0xbeb8, 0xbeb3, 0xbebd, 0xe943, 0xe8fe, 0xbebc, - 0xe8fc, 0xbebb, 0xe944, 0xe940, 0xbc51, 0x003f, 0xbebf, 0xe946, - 0xbeb7, 0xbeb4, 0x003f, 0x003f, 0x003f, 0x003f, 0xecc6, 0xecc8, - 0xc07b, 0xecc9, 0xecc7, 0xecc5, 0xecc4, 0xc07d, 0xecc3, 0xc07e, - 0x003f, 0x003f, 0x003f, 0x003f, 0xecc1, 0xecc2, 0xc07a, 0xc0a1, - 0xc07c, 0x003f, 0x003f, 0xecc0, 0x003f, 0xc250, 0x003f, 0xefbc, - 0xefba, 0xefbf, 0xefbd, 0x003f, 0xefbb, 0xefbe, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc360, 0xf1f2, 0xf1f3, - 0xc456, 0x003f, 0xf1f4, 0xf1f0, 0xf1f5, 0xf1f1, 0xc251, 0x003f, - 0x003f, 0x003f, 0xf3fe, 0xf441, 0xc459, 0xf440, 0xc458, 0xc457, - 0x003f, 0x003f, 0x003f, 0x003f, 0xc45a, 0xf5c5, 0xf5c6, 0x003f, - 0xc4da, 0xc4d9, 0xc4db, 0xf5c4, 0x003f, 0xf6d8, 0xf6d7, 0x003f, - 0xc56d, 0xc56f, 0xc56e, 0xf6d9, 0xc5c8, 0xf8a6, 0x003f, 0x003f, - 0x003f, 0xc5f1, 0x003f, 0xf8a5, 0xf8ee, 0x003f, 0x003f, 0xc949, - 0x003f, 0x003f, 0xa57d, 0xa57c, 0x003f, 0xa65f, 0xa65e, 0xc9c7, - 0xa65d, 0xc9c6, 0x003f, 0x003f, 0xa779, 0xcaa9, 0x003f, 0xcaa8, - 0x003f, 0x003f, 0xa777, 0xa77a, 0x003f, 0x003f, 0xcaa7, 0x003f, - 0xa778, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcbf0, - 0x003f, 0xcbf1, 0xa954, 0x003f, 0x003f, 0x003f, 0x003f, 0xabaa, - /* 0x5700 .. 0x57ff */ - 0x003f, 0xd148, 0xd149, 0xae45, 0xae46, 0x003f, 0x003f, 0xd4ac, - 0xb0e9, 0xb0eb, 0xd4ab, 0xb0ea, 0xd87c, 0xb3f2, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb6e9, 0xb6ea, 0xdce1, 0x003f, 0xb9cf, 0x003f, - 0xb9ce, 0x003f, 0xe549, 0xe948, 0xe947, 0x003f, 0xf96b, 0xa467, - 0xc959, 0x003f, 0xc96e, 0xc96f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa662, 0xa666, 0xc9c9, 0x003f, 0xa664, 0xa663, 0xc9c8, 0xa665, - 0xa661, 0x003f, 0x003f, 0xa660, 0xc9ca, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xa7a6, 0x003f, 0x003f, 0xa7a3, 0x003f, - 0xa77d, 0xcaaa, 0x003f, 0x003f, 0x003f, 0xcaab, 0x003f, 0xa7a1, - 0x003f, 0xcaad, 0xa77b, 0xcaae, 0xcaac, 0xa77e, 0xa7a2, 0xa7a5, - 0xa7a4, 0xa77c, 0xcaaf, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa959, 0xcbfe, 0x003f, 0xa95b, 0x003f, 0xa95a, 0x003f, - 0xcc40, 0xa958, 0xa957, 0xcbf5, 0x003f, 0xcbf4, 0x003f, 0xcbf2, - 0xcbf7, 0xcbf6, 0xcbf3, 0xcbfc, 0xcbfd, 0xcbfa, 0xcbf8, 0xa956, - 0x003f, 0x003f, 0x003f, 0xcbfb, 0xa95c, 0xcc41, 0x003f, 0x003f, - 0xcbf9, 0x003f, 0xabab, 0xa955, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xabac, 0xce54, 0x003f, 0x003f, 0xce5a, - 0x003f, 0x003f, 0x003f, 0xabb2, 0xce58, 0xce5e, 0x003f, 0xce55, - 0xce59, 0xce5b, 0xce5d, 0xce57, 0x003f, 0xce56, 0xce51, 0xce52, - 0xabad, 0x003f, 0xabaf, 0xabae, 0xce53, 0xce5c, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xabb1, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xce50, 0xd153, 0x003f, - 0xd152, 0xd157, 0xd14e, 0x003f, 0xd151, 0xd150, 0x003f, 0xd154, - 0x003f, 0xd158, 0xae47, 0xae4a, 0x003f, 0x003f, 0xd14f, 0xd155, - 0x003f, 0x003f, 0x003f, 0xae49, 0xd14a, 0x003f, 0xabb0, 0xd4ba, - 0xd156, 0x003f, 0xd14d, 0x003f, 0xae48, 0xd14c, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd4b1, 0x003f, 0x003f, 0xb0ec, - 0xb0f0, 0xd4c1, 0xd4af, 0xd4bd, 0xb0f1, 0xd4bf, 0x003f, 0xd4c5, - 0x003f, 0xd4c9, 0x003f, 0x003f, 0xd4c0, 0xd4b4, 0xd4bc, 0x003f, - 0xd4ca, 0xd4c8, 0xd4be, 0xd4b9, 0xd4b2, 0xd8a6, 0xd4b0, 0xb0f5, - 0xd4b7, 0xb0f6, 0xb0f2, 0xd4ad, 0xd4c3, 0xd4b5, 0x003f, 0x003f, - /* 0x5800 .. 0x58ff */ - 0xd4b3, 0xd4c6, 0xb0f3, 0x003f, 0xd4cc, 0xb0ed, 0xb0ef, 0xd4bb, - 0xd4b6, 0xae4b, 0xb0ee, 0xd4b8, 0xd4c7, 0xd4cb, 0xd4c2, 0x003f, - 0xd4c4, 0x003f, 0x003f, 0x003f, 0xd4ae, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd8a1, 0x003f, 0xd8aa, 0xd8a9, 0xb3fa, 0xd8a2, 0x003f, - 0xb3fb, 0xb3f9, 0x003f, 0xd8a4, 0xb3f6, 0xd8a8, 0x003f, 0xd8a3, - 0xd8a5, 0xd87d, 0xb3f4, 0x003f, 0xd8b2, 0xd8b1, 0xd8ae, 0xb3f3, - 0xb3f7, 0xb3f8, 0xd14b, 0xd8ab, 0xb3f5, 0xb0f4, 0xd8ad, 0xd87e, - 0xd8b0, 0xd8af, 0x003f, 0xd8b3, 0x003f, 0xdcef, 0x003f, 0xd8ac, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd8a7, 0xdce7, 0xb6f4, 0xb6f7, 0xb6f2, 0xdce6, 0xdcea, 0xdce5, - 0x003f, 0xb6ec, 0xb6f6, 0xdce2, 0xb6f0, 0xdce9, 0x003f, 0xb6ee, - 0xb6ed, 0xdcec, 0xb6ef, 0xdcee, 0x003f, 0xdceb, 0xb6eb, 0x003f, - 0x003f, 0x003f, 0xb6f5, 0xdcf0, 0xdce4, 0xdced, 0x003f, 0x003f, - 0xdce3, 0x003f, 0x003f, 0xb6f1, 0x003f, 0xb6f3, 0x003f, 0xdce8, - 0x003f, 0xdcf1, 0x003f, 0x003f, 0xe15d, 0xb9d0, 0xe163, 0x003f, - 0x003f, 0xb9d5, 0xe15f, 0xe166, 0xe157, 0xb9d7, 0xb9d1, 0xe15c, - 0xbc55, 0xe15b, 0xe164, 0xb9d2, 0x003f, 0xb9d6, 0xe15a, 0xe160, - 0xe165, 0xe156, 0xb9d4, 0xe15e, 0x003f, 0x003f, 0xe162, 0xe168, - 0xe158, 0xe161, 0x003f, 0xb9d3, 0xe167, 0x003f, 0x003f, 0x003f, - 0xe159, 0x003f, 0x003f, 0x003f, 0xbc59, 0xe54b, 0xbc57, 0xbc56, - 0xe54d, 0xe552, 0x003f, 0xe54e, 0x003f, 0xe551, 0xbc5c, 0x003f, - 0xbea5, 0xbc5b, 0x003f, 0xe54a, 0xe550, 0x003f, 0xbc5a, 0xe54f, - 0x003f, 0xe54c, 0x003f, 0xbc58, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe94d, 0xf9d9, 0xe94f, 0xe94a, 0xbec1, 0xe94c, - 0x003f, 0xbec0, 0xe94e, 0x003f, 0x003f, 0xbec3, 0xe950, 0xbec2, - 0xe949, 0xe94b, 0x003f, 0x003f, 0x003f, 0x003f, 0xc0a5, 0xeccc, - 0x003f, 0xc0a4, 0xeccd, 0xc0a3, 0xeccb, 0xc0a2, 0xecca, 0x003f, - 0xc253, 0xc252, 0xf1f6, 0xf1f8, 0x003f, 0xf1f7, 0xc361, 0xc362, - 0x003f, 0x003f, 0xc363, 0xf442, 0xc45b, 0x003f, 0x003f, 0xf7d3, - 0xf7d2, 0xc5f2, 0x003f, 0xa468, 0xa4d0, 0x003f, 0x003f, 0xa7a7, - 0x003f, 0x003f, 0x003f, 0x003f, 0xce5f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb3fc, 0xb3fd, 0x003f, 0xdcf2, 0xb9d8, 0xe169, 0xe553, - /* 0x5900 .. 0x59ff */ - 0x003f, 0x003f, 0x003f, 0xc95a, 0x003f, 0x003f, 0xcab0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcc42, 0xce60, 0xd159, 0xae4c, - 0x003f, 0x003f, 0xf1f9, 0x003f, 0xc4dc, 0xa469, 0xa57e, 0xc970, - 0x003f, 0xa667, 0xa668, 0x003f, 0xa95d, 0x003f, 0x003f, 0x003f, - 0xb0f7, 0x003f, 0xb9da, 0x003f, 0xb9db, 0xb9d9, 0x003f, 0xa46a, - 0x003f, 0xa4d1, 0xa4d3, 0xa4d2, 0xc95b, 0xa4d4, 0xa5a1, 0xc971, - 0x003f, 0xa5a2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa669, - 0xa66a, 0x003f, 0x003f, 0x003f, 0xc9cb, 0x003f, 0xa7a8, 0x003f, - 0xcab1, 0x003f, 0x003f, 0x003f, 0xa961, 0xcc43, 0x003f, 0xa95f, - 0xa960, 0xa95e, 0xd15a, 0x003f, 0x003f, 0x003f, 0xabb6, 0xabb5, - 0xabb7, 0xabb4, 0x003f, 0xce61, 0xa962, 0xabb3, 0x003f, 0xae4d, - 0xae4e, 0x003f, 0xae4f, 0x003f, 0xd4cd, 0x003f, 0x003f, 0x003f, - 0xb3fe, 0xd8b4, 0xb0f8, 0x003f, 0x003f, 0x003f, 0x003f, 0xb6f8, - 0x003f, 0xb9dd, 0xb9dc, 0xe16a, 0x003f, 0xbc5d, 0xbec4, 0x003f, - 0xefc0, 0xf6da, 0xf7d4, 0xa46b, 0xa5a3, 0x003f, 0xa5a4, 0xc9d1, - 0xa66c, 0xa66f, 0x003f, 0xc9cf, 0xc9cd, 0xa66e, 0xc9d0, 0xc9d2, - 0xc9cc, 0xa671, 0xa670, 0xa66d, 0xa66b, 0xc9ce, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa7b3, 0x003f, 0x003f, 0xa7b0, 0xcab6, 0xcab9, - 0xcab8, 0x003f, 0xa7aa, 0xa7b2, 0x003f, 0x003f, 0xa7af, 0xcab5, - 0xcab3, 0xa7ae, 0x003f, 0x003f, 0x003f, 0xa7a9, 0xa7ac, 0x003f, - 0xcab4, 0xcabb, 0xcab7, 0xa7ad, 0xa7b1, 0xa7b4, 0xcab2, 0xcaba, - 0xa7ab, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa967, 0xa96f, - 0x003f, 0xcc4f, 0xcc48, 0xa970, 0xcc53, 0xcc44, 0xcc4b, 0x003f, - 0x003f, 0xa966, 0xcc45, 0xa964, 0xcc4c, 0xcc50, 0xa963, 0x003f, - 0xcc51, 0xcc4a, 0x003f, 0xcc4d, 0x003f, 0xa972, 0xa969, 0xcc54, - 0xcc52, 0x003f, 0xa96e, 0xa96c, 0xcc49, 0xa96b, 0xcc47, 0xcc46, - 0xa96a, 0xa968, 0xa971, 0xa96d, 0xa965, 0x003f, 0xcc4e, 0x003f, - 0xabb9, 0x003f, 0xabc0, 0xce6f, 0xabb8, 0xce67, 0xce63, 0x003f, - 0xce73, 0xce62, 0x003f, 0xabbb, 0xce6c, 0xabbe, 0xabc1, 0x003f, - 0xabbc, 0xce70, 0xabbf, 0x003f, 0xae56, 0xce76, 0xce64, 0x003f, - 0x003f, 0xce66, 0xce6d, 0xce71, 0xce75, 0xce72, 0xce6b, 0xce6e, - 0x003f, 0x003f, 0xce68, 0xabc3, 0xce6a, 0xce69, 0xce74, 0xabba, - /* 0x5a00 .. 0x5aff */ - 0xce65, 0xabc2, 0x003f, 0xabbd, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xae5c, 0xd162, 0x003f, 0xae5b, 0x003f, 0x003f, 0xd160, - 0x003f, 0xae50, 0x003f, 0xae55, 0x003f, 0xd15f, 0xd15c, 0xd161, - 0xae51, 0xd15b, 0x003f, 0xae54, 0xae52, 0x003f, 0xd163, 0xae53, - 0xae57, 0x003f, 0x003f, 0xae58, 0x003f, 0xae5a, 0x003f, 0x003f, - 0x003f, 0xae59, 0x003f, 0x003f, 0x003f, 0xd15d, 0xd15e, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd164, 0x003f, 0xd4d4, 0xb0f9, 0xd8c2, - 0xd4d3, 0xd4e6, 0x003f, 0x003f, 0xb140, 0x003f, 0xd4e4, 0x003f, - 0xb0fe, 0xb0fa, 0xd4ed, 0xd4dd, 0xd4e0, 0x003f, 0xb143, 0xd4ea, - 0xd4e2, 0xb0fb, 0xb144, 0x003f, 0xd4e7, 0xd4e5, 0x003f, 0x003f, - 0xd4d6, 0xd4eb, 0xd4df, 0xd4da, 0x003f, 0xd4d0, 0xd4ec, 0xd4dc, - 0xd4cf, 0x003f, 0xb142, 0xd4e1, 0xd4ee, 0xd4de, 0xd4d2, 0xd4d7, - 0xd4ce, 0x003f, 0xb141, 0x003f, 0xd4db, 0xd4d8, 0xb0fc, 0xd4d1, - 0x003f, 0xd4e9, 0xb0fd, 0x003f, 0xd4d9, 0xd4d5, 0x003f, 0x003f, - 0xd4e8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb440, - 0xd8bb, 0x003f, 0xd8b8, 0xd8c9, 0xd8bd, 0xd8ca, 0x003f, 0xb442, - 0x003f, 0x003f, 0x003f, 0xd8c6, 0xd8c3, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd8c4, 0xd8c7, 0xd8cb, 0x003f, 0xd4e3, 0xd8cd, - 0xdd47, 0x003f, 0xb443, 0xd8ce, 0xd8b6, 0xd8c0, 0x003f, 0xd8c5, - 0x003f, 0x003f, 0xb441, 0xb444, 0xd8cc, 0xd8cf, 0xd8ba, 0xd8b7, - 0x003f, 0x003f, 0xd8b9, 0x003f, 0x003f, 0xd8be, 0xd8bc, 0xb445, - 0x003f, 0xd8c8, 0x003f, 0x003f, 0xd8bf, 0x003f, 0xd8c1, 0xd8b5, - 0xdcfa, 0xdcf8, 0xb742, 0xb740, 0xdd43, 0xdcf9, 0xdd44, 0xdd40, - 0xdcf7, 0xdd46, 0xdcf6, 0xdcfd, 0xb6fe, 0xb6fd, 0xb6fc, 0xdcfb, - 0xdd41, 0xb6f9, 0xb741, 0x003f, 0xdcf4, 0x003f, 0xdcfe, 0xdcf3, - 0xdcfc, 0xb6fa, 0xdd42, 0xdcf5, 0xb6fb, 0xdd45, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe16e, 0xb9e2, 0xb9e1, - 0xb9e3, 0xe17a, 0xe170, 0xe176, 0xe16b, 0xe179, 0xe178, 0xe17c, - 0xe175, 0xb9de, 0xe174, 0xb9e4, 0x003f, 0xe16d, 0xb9df, 0x003f, - 0xe17b, 0xb9e0, 0xe16f, 0xe172, 0xe177, 0xe171, 0xe16c, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe173, 0xe555, 0xbc61, 0xe558, 0xe557, - 0xe55a, 0xe55c, 0xf9dc, 0xbc5f, 0x003f, 0xe556, 0x003f, 0xe554, - /* 0x5b00 .. 0x5bff */ - 0x003f, 0xe55d, 0xe55b, 0xe559, 0x003f, 0xe55f, 0x003f, 0xe55e, - 0xbc63, 0xbc5e, 0x003f, 0xbc60, 0xbc62, 0x003f, 0x003f, 0xe560, - 0xe957, 0x003f, 0x003f, 0xe956, 0xe955, 0x003f, 0xe958, 0xe951, - 0x003f, 0xe952, 0xe95a, 0xe953, 0x003f, 0xbec5, 0xe95c, 0x003f, - 0xe95b, 0xe954, 0x003f, 0xecd1, 0xc0a8, 0xeccf, 0xecd4, 0xecd3, - 0xe959, 0x003f, 0xc0a7, 0x003f, 0xecd2, 0xecce, 0xecd6, 0xecd5, - 0xc0a6, 0x003f, 0xecd0, 0x003f, 0xbec6, 0x003f, 0x003f, 0x003f, - 0xc254, 0x003f, 0x003f, 0x003f, 0xefc1, 0xf1fa, 0xf1fb, 0xf1fc, - 0xc45c, 0x003f, 0x003f, 0xc45d, 0x003f, 0xf443, 0x003f, 0xf5c8, - 0xf5c7, 0x003f, 0x003f, 0xf6db, 0xf6dc, 0xf7d5, 0xf8a7, 0x003f, - 0xa46c, 0xa46d, 0x003f, 0xa46e, 0xa4d5, 0xa5a5, 0xc9d3, 0xa672, - 0xa673, 0x003f, 0xa7b7, 0xa7b8, 0xa7b6, 0xa7b5, 0x003f, 0xa973, - 0x003f, 0x003f, 0xcc55, 0xa975, 0xa974, 0xcc56, 0x003f, 0x003f, - 0x003f, 0xabc4, 0x003f, 0xae5d, 0xd165, 0x003f, 0xd4f0, 0x003f, - 0xb145, 0xb447, 0xd4ef, 0xb446, 0x003f, 0xb9e5, 0x003f, 0xe17d, - 0xbec7, 0x003f, 0xc0a9, 0xecd7, 0x003f, 0xc45e, 0x003f, 0xc570, - 0x003f, 0xc972, 0x003f, 0xa5a6, 0xc973, 0xa676, 0x003f, 0xa674, - 0xa675, 0xa677, 0x003f, 0xa7ba, 0xa7b9, 0x003f, 0xcabc, 0xa7bb, - 0x003f, 0x003f, 0xcabd, 0xcc57, 0x003f, 0xcc58, 0x003f, 0xa976, - 0xa978, 0xa97a, 0xa977, 0xa97b, 0xa979, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xabc8, 0xabc5, 0xabc7, 0xabc9, 0xabc6, 0xd166, - 0xce77, 0x003f, 0x003f, 0x003f, 0xd168, 0xd167, 0xae63, 0x003f, - 0xae5f, 0x003f, 0x003f, 0xae60, 0xae62, 0xae64, 0xae61, 0x003f, - 0xae66, 0xae65, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb14a, - 0xd4f2, 0xd4f1, 0xb149, 0x003f, 0xb148, 0xb147, 0xb14b, 0xb146, - 0x003f, 0x003f, 0xd8d5, 0xd8d2, 0xb449, 0xd8d1, 0xd8d6, 0x003f, - 0xb44b, 0xd8d4, 0xb448, 0xb44a, 0xd8d3, 0x003f, 0xdd48, 0x003f, - 0xdd49, 0xdd4a, 0x003f, 0x003f, 0x003f, 0x003f, 0xb9e6, 0xb9ee, - 0xe17e, 0xb9e8, 0xb9ec, 0xe1a1, 0xb9ed, 0xb9e9, 0xb9ea, 0xb9e7, - 0xb9eb, 0xbc66, 0xd8d0, 0xbc67, 0xbc65, 0x003f, 0xbc64, 0xe95d, - 0xbec8, 0xecd8, 0xecd9, 0x003f, 0x003f, 0xc364, 0xc45f, 0x003f, - 0xa46f, 0x003f, 0xa678, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x5c00 .. 0x5cff */ - 0x003f, 0xabca, 0x003f, 0xd169, 0xae67, 0x003f, 0x003f, 0xb14e, - 0xb14d, 0xb14c, 0xb44c, 0xb44d, 0xd8d7, 0xb9ef, 0xbec9, 0xa470, - 0xc95c, 0xa4d6, 0xc974, 0x003f, 0x003f, 0xc9d4, 0xa679, 0x003f, - 0x003f, 0x003f, 0xa97c, 0x003f, 0x003f, 0x003f, 0x003f, 0xdd4b, - 0x003f, 0x003f, 0xa471, 0x003f, 0xa4d7, 0xc9d5, 0x003f, 0x003f, - 0xcabe, 0x003f, 0xcabf, 0x003f, 0xa7bc, 0x003f, 0x003f, 0x003f, - 0xd8d8, 0xb44e, 0x003f, 0xdd4c, 0x003f, 0x003f, 0x003f, 0xc0aa, - 0xa472, 0xa4a8, 0xa4d8, 0xc975, 0xa5a7, 0x003f, 0xa7c0, 0xa7bf, - 0xa7bd, 0xa7be, 0x003f, 0x003f, 0xcc59, 0xa97e, 0xa9a1, 0xcc5a, - 0xa97d, 0x003f, 0x003f, 0xabce, 0xce78, 0xabcd, 0xabcb, 0xabcc, - 0xae6a, 0xae68, 0x003f, 0x003f, 0xd16b, 0xae69, 0xd16a, 0x003f, - 0xae5e, 0xd4f3, 0x003f, 0x003f, 0xb150, 0xb151, 0x003f, 0x003f, - 0xb14f, 0x003f, 0xb9f0, 0xe1a2, 0xbc68, 0xbc69, 0x003f, 0xe561, - 0xc0ab, 0xefc2, 0xefc3, 0x003f, 0xc4dd, 0xf8a8, 0xc94b, 0xa4d9, - 0x003f, 0xa473, 0x003f, 0xc977, 0xc976, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa67a, 0xc9d7, 0xc9d8, 0xc9d6, 0x003f, 0xc9d9, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcac7, 0x003f, - 0xcac2, 0xcac4, 0xcac6, 0xcac3, 0xa7c4, 0xcac0, 0x003f, 0xcac1, - 0xa7c1, 0xa7c2, 0xcac5, 0xcac8, 0xa7c3, 0xcac9, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcc68, 0x003f, 0xcc62, - 0xcc5d, 0xa9a3, 0xcc65, 0xcc63, 0xcc5c, 0xcc69, 0xcc6c, 0xcc67, - 0xcc60, 0xa9a5, 0xcc66, 0xa9a6, 0xcc61, 0xcc64, 0xcc5b, 0xcc5f, - 0xcc6b, 0xa9a7, 0x003f, 0xa9a8, 0x003f, 0xcc5e, 0xcc6a, 0xa9a2, - 0xa9a4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xceab, 0xcea4, - 0xceaa, 0xcea3, 0xcea5, 0xce7d, 0xce7b, 0x003f, 0xceac, 0xcea9, - 0xce79, 0x003f, 0xabd0, 0xcea7, 0xcea8, 0x003f, 0xcea6, 0xce7c, - 0xce7a, 0xabcf, 0xcea2, 0xce7e, 0x003f, 0x003f, 0xcea1, 0xcead, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xae6f, 0x003f, 0xae6e, 0x003f, 0xd16c, 0xae6b, 0xd16e, 0x003f, - 0xae70, 0xd16f, 0x003f, 0x003f, 0xae73, 0x003f, 0xae71, 0xd170, - 0xceae, 0xd172, 0x003f, 0xae6d, 0x003f, 0xae6c, 0x003f, 0xd16d, - /* 0x5d00 .. 0x5dff */ - 0xd171, 0xae72, 0x003f, 0x003f, 0x003f, 0x003f, 0xb153, 0xb152, - 0x003f, 0x003f, 0x003f, 0xd4f5, 0xd4f9, 0xd4fb, 0xb154, 0xd4fe, - 0x003f, 0xb158, 0xd541, 0x003f, 0xb15a, 0x003f, 0xb156, 0xb15e, - 0x003f, 0xb15b, 0xd4f7, 0xb155, 0x003f, 0xd4f6, 0xd4f4, 0xd543, - 0xd4f8, 0x003f, 0xb157, 0xd542, 0xb15c, 0xd4fd, 0xd4fc, 0xb15d, - 0xd4fa, 0xb159, 0x003f, 0x003f, 0x003f, 0x003f, 0xd544, 0x003f, - 0xd540, 0xd8e7, 0xd8ee, 0xd8e3, 0xb451, 0xd8df, 0xd8ef, 0xd8d9, - 0xd8ec, 0xd8ea, 0xd8e4, 0x003f, 0xd8ed, 0xd8e6, 0x003f, 0xd8de, - 0xd8f0, 0xd8dc, 0xd8e9, 0xd8da, 0x003f, 0xd8f1, 0x003f, 0xb452, - 0x003f, 0xd8eb, 0xdd4f, 0xd8dd, 0xb44f, 0x003f, 0xd8e1, 0x003f, - 0xb450, 0xd8e0, 0xd8e5, 0x003f, 0x003f, 0xd8e2, 0x003f, 0x003f, - 0x003f, 0xd8e8, 0x003f, 0x003f, 0x003f, 0x003f, 0xdd53, 0x003f, - 0x003f, 0x003f, 0xdd56, 0xdd4e, 0x003f, 0xdd50, 0x003f, 0xdd55, - 0xdd54, 0xb743, 0x003f, 0xd8db, 0xdd52, 0x003f, 0x003f, 0xb744, - 0x003f, 0xdd4d, 0xdd51, 0x003f, 0x003f, 0x003f, 0x003f, 0xe1a9, - 0x003f, 0xe1b0, 0xe1a7, 0x003f, 0xe1ae, 0xe1a5, 0xe1ad, 0xe1b1, - 0xe1a4, 0xe1a8, 0xe1a3, 0x003f, 0xb9f1, 0x003f, 0xe1a6, 0xb9f2, - 0xe1ac, 0xe1ab, 0xe1aa, 0x003f, 0x003f, 0xe1af, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe565, 0xe567, 0xbc6b, 0xe568, 0x003f, 0xe563, - 0x003f, 0xe562, 0xe56c, 0x003f, 0xe56a, 0xbc6a, 0xe56d, 0xe564, - 0xe569, 0xe56b, 0xe566, 0x003f, 0x003f, 0x003f, 0x003f, 0xe961, - 0xe966, 0xe960, 0xe965, 0x003f, 0xe95e, 0xe968, 0xe964, 0xe969, - 0xe963, 0xe95f, 0xe967, 0x003f, 0xe96a, 0xe962, 0x003f, 0xecda, - 0xc0af, 0x003f, 0xc0ad, 0x003f, 0xc0ac, 0xc0ae, 0x003f, 0x003f, - 0xefc4, 0x003f, 0xf172, 0xf1fd, 0x003f, 0x003f, 0xf444, 0xf445, - 0x003f, 0xc460, 0x003f, 0xf5c9, 0x003f, 0xc4de, 0x003f, 0xf5ca, - 0x003f, 0xf6de, 0xc572, 0x003f, 0xc571, 0xf6dd, 0xc5c9, 0x003f, - 0xf7d6, 0x003f, 0x003f, 0x003f, 0x003f, 0xa474, 0xa67b, 0xc9da, - 0xcaca, 0xa8b5, 0xb15f, 0x003f, 0x003f, 0xa475, 0xa5aa, 0xa5a9, - 0xa5a8, 0x003f, 0x003f, 0xa7c5, 0x003f, 0x003f, 0xae74, 0x003f, - 0xdd57, 0xa476, 0xa477, 0xa478, 0xa4da, 0x003f, 0x003f, 0xabd1, - 0x003f, 0xceaf, 0x003f, 0x003f, 0x003f, 0xb453, 0xa479, 0xc95d, - /* 0x5e00 .. 0x5eff */ - 0x003f, 0x003f, 0xa5ab, 0xa5ac, 0xc978, 0x003f, 0xa67c, 0x003f, - 0x003f, 0x003f, 0xcacb, 0x003f, 0xa7c6, 0x003f, 0xcacc, 0x003f, - 0x003f, 0xa9ae, 0x003f, 0x003f, 0xcc6e, 0xa9ac, 0xa9ab, 0xcc6d, - 0xa9a9, 0xcc6f, 0xa9aa, 0xa9ad, 0x003f, 0xabd2, 0x003f, 0xabd4, - 0xceb3, 0xceb0, 0xceb1, 0xceb2, 0xceb4, 0xabd3, 0x003f, 0x003f, - 0xd174, 0xd173, 0x003f, 0xae76, 0x003f, 0xae75, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb162, 0xd546, 0x003f, 0xb161, 0xb163, - 0xb160, 0x003f, 0x003f, 0x003f, 0x003f, 0xb455, 0xd545, 0x003f, - 0xb456, 0xd8f3, 0x003f, 0xb457, 0xd8f2, 0xb454, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdd5a, 0xdd5c, 0xb745, 0xdd5b, 0xdd59, 0xdd58, - 0x003f, 0x003f, 0x003f, 0xe1b4, 0xb9f7, 0xb9f5, 0x003f, 0xb9f6, - 0xe1b2, 0xe1b3, 0x003f, 0xb9f3, 0xe571, 0xe56f, 0x003f, 0xbc6d, - 0xe570, 0xbc6e, 0xbc6c, 0xb9f4, 0x003f, 0x003f, 0xe96d, 0xe96b, - 0xe96c, 0xe56e, 0xecdc, 0xc0b0, 0xecdb, 0xefc5, 0xefc6, 0xe96e, - 0xf1fe, 0x003f, 0xa47a, 0xa5ad, 0xa67e, 0xc9db, 0xa67d, 0x003f, - 0xa9af, 0xb746, 0x003f, 0xa4db, 0xa5ae, 0xabd5, 0xb458, 0x003f, - 0xc979, 0x003f, 0xc97a, 0x003f, 0xc9dc, 0x003f, 0x003f, 0xa7c8, - 0xcad0, 0xcace, 0xa7c9, 0xcacd, 0xcacf, 0xcad1, 0x003f, 0xa7c7, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa9b3, 0xa9b4, 0xa9b1, - 0x003f, 0x003f, 0xa9b0, 0xceb8, 0xa9b2, 0x003f, 0x003f, 0x003f, - 0xabd6, 0x003f, 0xceb7, 0xceb9, 0xceb6, 0xceba, 0xabd7, 0xae79, - 0xd175, 0x003f, 0xd177, 0xae77, 0xd178, 0xae78, 0xd176, 0x003f, - 0xceb5, 0xd547, 0xd54a, 0xd54b, 0xd548, 0xb167, 0xb166, 0xb164, - 0xb165, 0xd549, 0x003f, 0x003f, 0x003f, 0x003f, 0xb168, 0x003f, - 0x003f, 0xb45a, 0xb45b, 0x003f, 0xb45c, 0xdd5d, 0xdd5f, 0xdd61, - 0xb748, 0xb747, 0xb459, 0xdd60, 0xdd5e, 0x003f, 0xe1b8, 0x003f, - 0x003f, 0xe1b6, 0xe1bc, 0xb9f8, 0xe1bd, 0xe1ba, 0xb9f9, 0xe1b7, - 0xe1b5, 0xe1bb, 0xbc70, 0xe573, 0xe1b9, 0xbc72, 0xe574, 0xbc71, - 0xbc74, 0xe575, 0xbc6f, 0xbc73, 0x003f, 0xe973, 0xe971, 0xe970, - 0xe972, 0xe96f, 0x003f, 0x003f, 0xc366, 0x003f, 0xf446, 0xf447, - 0x003f, 0xf5cb, 0xf6df, 0xc655, 0x003f, 0x003f, 0xa9b5, 0xa7ca, - 0x003f, 0x003f, 0xabd8, 0x003f, 0x003f, 0x003f, 0xa47b, 0xa4dc, - /* 0x5f00 .. 0x5fff */ - 0x003f, 0xa5af, 0xc9dd, 0x003f, 0xa7cb, 0xcad2, 0x003f, 0xcebb, - 0xabd9, 0x003f, 0xb9fa, 0xa47c, 0x003f, 0x003f, 0x003f, 0xa6a1, - 0x003f, 0x003f, 0xb749, 0xa47d, 0xa4dd, 0xa4de, 0x003f, 0xa5b1, - 0xa5b0, 0x003f, 0xc9de, 0xa6a2, 0x003f, 0xcad3, 0x003f, 0xa7cc, - 0x003f, 0x003f, 0xcc71, 0xcc72, 0xcc73, 0x003f, 0xa9b6, 0xa9b7, - 0xcc70, 0xa9b8, 0x003f, 0x003f, 0x003f, 0xabda, 0xcebc, 0x003f, - 0xd17a, 0xae7a, 0x003f, 0xd179, 0x003f, 0xb169, 0xd54c, 0xb16a, - 0xd54d, 0x003f, 0x003f, 0x003f, 0xb45d, 0x003f, 0x003f, 0x003f, - 0xdd62, 0x003f, 0x003f, 0xe1bf, 0xe1be, 0x003f, 0xb9fb, 0x003f, - 0xbc75, 0xe576, 0xbeca, 0xe974, 0xc0b1, 0x003f, 0xc573, 0xf7d8, - 0x003f, 0x003f, 0x003f, 0x003f, 0xcc74, 0x003f, 0xcebd, 0xb16b, - 0xd8f4, 0xb74a, 0x003f, 0x003f, 0x003f, 0xc255, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa7ce, 0x003f, 0xa7cd, 0xabdb, 0x003f, 0xd17b, - 0x003f, 0xb16d, 0xb343, 0xb16e, 0xb16c, 0xb45e, 0x003f, 0xe1c0, - 0xb9fc, 0xbc76, 0x003f, 0xc94c, 0xc9df, 0x003f, 0xcad5, 0xa7cf, - 0xcad4, 0xa7d0, 0x003f, 0x003f, 0xa9bc, 0xcc77, 0xcc76, 0xa9bb, - 0xa9b9, 0xa9ba, 0xcc75, 0x003f, 0x003f, 0xabdd, 0xcebe, 0xabe0, - 0xabdc, 0xabe2, 0xabde, 0xabdf, 0xabe1, 0x003f, 0x003f, 0x003f, - 0xae7d, 0xae7c, 0xae7b, 0x003f, 0x003f, 0x003f, 0xd54f, 0xb16f, - 0xb172, 0xb170, 0x003f, 0xd54e, 0xb175, 0x003f, 0xb171, 0xd550, - 0xb174, 0xb173, 0x003f, 0x003f, 0x003f, 0xd8f6, 0xd8f5, 0x003f, - 0xb461, 0xb45f, 0xb460, 0xd8f7, 0xb74b, 0xdd64, 0xb74c, 0xdd63, - 0x003f, 0x003f, 0xe577, 0x003f, 0x003f, 0xbc78, 0xe1c1, 0xbc77, - 0x003f, 0xb9fd, 0x003f, 0xecde, 0xe975, 0xc0b2, 0xecdd, 0xf240, - 0xf448, 0xf449, 0x003f, 0xa4df, 0x003f, 0xa5b2, 0x003f, 0x003f, - 0x003f, 0xc97b, 0x003f, 0x003f, 0xa7d2, 0xa7d4, 0x003f, 0xc9e2, - 0xcad8, 0xcad7, 0xcad6, 0x003f, 0xc9e1, 0xc9e0, 0xa6a4, 0xa7d3, - 0xa7d1, 0xa6a3, 0x003f, 0x003f, 0x003f, 0xa9bd, 0xcc78, 0x003f, - 0xa9be, 0xcadd, 0x003f, 0xcadf, 0xcade, 0xcc79, 0x003f, 0x003f, - 0xcada, 0x003f, 0xa7d8, 0xa7d6, 0x003f, 0xcad9, 0xcadb, 0xcae1, - 0x003f, 0xa7d5, 0x003f, 0xcadc, 0xcae5, 0xa9c0, 0x003f, 0xcae2, - 0xa7d7, 0x003f, 0xcae0, 0xcae3, 0x003f, 0xa9bf, 0x003f, 0xa9c1, - /* 0x6000 .. 0x60ff */ - 0xcae4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xccaf, 0xcca2, 0xcc7e, 0xccae, 0xcca9, 0xabe7, 0xa9c2, - 0xccaa, 0xccad, 0xabe3, 0xccac, 0xa9c3, 0xa9c8, 0xa9c6, 0xcca3, - 0x003f, 0xcc7c, 0xcca5, 0xa9cd, 0xccb0, 0xabe4, 0xcca6, 0x003f, - 0xabe5, 0xa9c9, 0xcca8, 0x003f, 0xcecd, 0xabe6, 0xcc7b, 0xa9ca, - 0xabe8, 0xa9cb, 0xa9c7, 0xa9cc, 0xcca7, 0xcc7a, 0xccab, 0xa9c4, - 0x003f, 0x003f, 0xcc7d, 0xcca4, 0xcca1, 0xa9c5, 0x003f, 0xcebf, - 0x003f, 0xcec0, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xceca, 0xd1a1, 0xcecb, 0xabee, 0xcece, 0xcec4, 0xabed, 0xcec6, - 0x003f, 0xcec7, 0x003f, 0x003f, 0xcec9, 0xabe9, 0x003f, 0x003f, - 0xaea3, 0x003f, 0xf9da, 0xcec5, 0xcec1, 0xaea4, 0x003f, 0x003f, - 0xcecf, 0xae7e, 0xd17d, 0xcec8, 0x003f, 0xd17c, 0xcec3, 0xcecc, - 0x003f, 0x003f, 0xabec, 0xaea1, 0xabf2, 0xaea2, 0xced0, 0xd17e, - 0xabeb, 0xaea6, 0xabf1, 0xabf0, 0xabef, 0xaea5, 0xced1, 0xaea7, - 0xabea, 0x003f, 0xcec2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb176, - 0xd1a4, 0xd1a6, 0x003f, 0xd1a8, 0xaea8, 0xaeae, 0xd553, 0xd1ac, - 0xd1a3, 0xb178, 0xd551, 0x003f, 0xaead, 0xaeab, 0xd1ae, 0x003f, - 0xd552, 0x003f, 0xd1a5, 0x003f, 0xaeac, 0xd1a9, 0xaeaf, 0xd1ab, - 0x003f, 0x003f, 0xaeaa, 0xd1aa, 0xd1ad, 0xd1a7, 0x003f, 0xaea9, - 0xb179, 0x003f, 0xd1a2, 0xb177, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb17a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd555, 0xd55e, 0xb464, 0x003f, 0xb17c, 0xb1a3, 0xb465, 0xd560, - 0xb1aa, 0xd8f9, 0xd556, 0xb1a2, 0xb1a5, 0xb17e, 0xd554, 0xd562, - 0xd565, 0xd949, 0x003f, 0xd563, 0xd8fd, 0xb1a1, 0xb1a8, 0xb1ac, - 0xd55d, 0xd8f8, 0xd561, 0xb17b, 0xd8fa, 0xd564, 0xd8fc, 0xd559, - 0x003f, 0xb462, 0x003f, 0xd557, 0xd558, 0xb1a7, 0x003f, 0x003f, - 0xb1a6, 0xd55b, 0xb1ab, 0xd55f, 0xb1a4, 0xd55c, 0x003f, 0xb1a9, - 0xb466, 0xb463, 0xd8fb, 0x003f, 0xd55a, 0x003f, 0xb17d, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb46b, 0xb46f, 0xd940, 0xb751, 0xb46d, 0xd944, 0xb471, 0xdd65, - 0xd946, 0xb753, 0xb469, 0xb46c, 0xd947, 0x003f, 0xd948, 0xd94e, - /* 0x6100 .. 0x61ff */ - 0xb473, 0xb754, 0x003f, 0xd94a, 0xd94f, 0xd943, 0xb75e, 0x003f, - 0xb755, 0xb472, 0xd941, 0xd950, 0x003f, 0xb75d, 0xb470, 0xb74e, - 0xd94d, 0x003f, 0xb474, 0xd945, 0xd8fe, 0xb46a, 0xd942, 0x003f, - 0xd94b, 0x003f, 0xb74d, 0xb752, 0xb467, 0xd94c, 0x003f, 0xb750, - 0x003f, 0x003f, 0x003f, 0xb468, 0x003f, 0x003f, 0x003f, 0xb75c, - 0xe1c3, 0xdd70, 0x003f, 0xdd68, 0xe1c2, 0x003f, 0xdd6c, 0xdd6e, - 0x003f, 0x003f, 0xdd6b, 0x003f, 0xb75b, 0x003f, 0xdd6a, 0xb75f, - 0x003f, 0x003f, 0x003f, 0xe1d2, 0x003f, 0x003f, 0xb75a, 0xba40, - 0xdd71, 0xe1c4, 0x003f, 0x003f, 0xb758, 0xdd69, 0xdd6d, 0xb9fe, - 0xb74f, 0xdd66, 0xdd67, 0xba41, 0xb757, 0xb759, 0xb756, 0xdd6f, - 0x003f, 0x003f, 0xe1c8, 0xe1c9, 0xe1ce, 0xbc7d, 0xe1d5, 0x003f, - 0xba47, 0x003f, 0xba46, 0xe1d0, 0x003f, 0xbc7c, 0xe1c5, 0xba45, - 0x003f, 0xe1d4, 0xba43, 0xba44, 0x003f, 0xe1d1, 0xe5aa, 0xbc7a, - 0xb46e, 0x003f, 0xe1d3, 0xbca3, 0xe1cb, 0x003f, 0xbc7b, 0x003f, - 0xbca2, 0xe1c6, 0xe1ca, 0xe1c7, 0xe1cd, 0xba48, 0xbc79, 0xba42, - 0x003f, 0xe57a, 0xe1cf, 0x003f, 0xbca1, 0x003f, 0xbca4, 0x003f, - 0xe1cc, 0x003f, 0xbc7e, 0xe579, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe57e, 0xbece, 0xe578, 0xe9a3, 0xe5a9, 0xbca8, 0x003f, - 0xbca6, 0xbecc, 0xe5a6, 0xe5a2, 0xbcac, 0x003f, 0xe978, 0x003f, - 0x003f, 0x003f, 0xbcaa, 0xe5a1, 0x003f, 0xe976, 0x003f, 0xe5a5, - 0x003f, 0xe5a8, 0xe57d, 0x003f, 0xbcab, 0x003f, 0x003f, 0xbca5, - 0xe977, 0xbecd, 0xe5a7, 0xbca7, 0xbca9, 0xe5a4, 0xbcad, 0xe5a3, - 0xe57c, 0xe57b, 0xbecb, 0xe5ab, 0xe97a, 0xece0, 0xbed0, 0x003f, - 0xe9a2, 0x003f, 0xe97e, 0x003f, 0xece1, 0x003f, 0xbed1, 0xe9a1, - 0x003f, 0xe97c, 0xc0b4, 0xecdf, 0x003f, 0xe979, 0xe97b, 0xc0b5, - 0xbed3, 0xc0b3, 0xbed2, 0xc0b7, 0xe97d, 0xbecf, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xefcf, 0x003f, - 0xefc7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xece7, 0xefc8, - 0xece3, 0x003f, 0x003f, 0xc256, 0xece5, 0xece4, 0xc0b6, 0xece2, - 0xece6, 0xefd0, 0xefcc, 0xefce, 0x003f, 0xefc9, 0xefca, 0x003f, - 0xefcd, 0xefcb, 0xc367, 0x003f, 0x003f, 0xc36a, 0xc369, 0xc368, - 0xc461, 0xf44a, 0xc462, 0xf241, 0xc4df, 0xf5cc, 0xc4e0, 0xc574, - /* 0x6200 .. 0x62ff */ - 0xc5ca, 0xf7d9, 0x003f, 0xf7da, 0xf7db, 0x003f, 0x003f, 0xf9ba, - 0xa4e0, 0xc97c, 0xa5b3, 0x003f, 0xa6a6, 0xa6a7, 0xa6a5, 0x003f, - 0xa6a8, 0xa7da, 0xa7d9, 0x003f, 0xccb1, 0xa9cf, 0xa9ce, 0x003f, - 0x003f, 0xd1af, 0xb1ad, 0xb1ae, 0x003f, 0x003f, 0x003f, 0xb475, - 0xdd72, 0xb760, 0xb761, 0xdd74, 0xdd76, 0xdd75, 0x003f, 0xe1d7, - 0x003f, 0xe1d6, 0xba49, 0xe1d8, 0x003f, 0xe5ac, 0xbcae, 0x003f, - 0xbed4, 0x003f, 0xc0b8, 0xc257, 0xc0b9, 0x003f, 0xa4e1, 0x003f, - 0x003f, 0x003f, 0xcae6, 0x003f, 0x003f, 0xccb2, 0xa9d1, 0xa9d0, - 0xa9d2, 0xabf3, 0xced2, 0xced3, 0x003f, 0x003f, 0xd1b0, 0xaeb0, - 0xb1af, 0xb476, 0xd951, 0xa4e2, 0x003f, 0xa47e, 0xa4e3, 0x003f, - 0xc97d, 0xa5b7, 0xa5b6, 0xa5b4, 0xa5b5, 0x003f, 0x003f, 0x003f, - 0xa6ab, 0xc9e9, 0xc9eb, 0xa6aa, 0xc9e3, 0x003f, 0xc9e4, 0x003f, - 0xc9ea, 0xc9e6, 0xc9e8, 0xa6a9, 0xc9e5, 0xc9ec, 0xc9e7, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa7e1, 0xa7ea, 0xa7e8, - 0xcaf0, 0xcaed, 0xcaf5, 0xa7e6, 0xcaf6, 0x003f, 0xa7df, 0xcaf3, - 0x003f, 0xa7e5, 0xcaef, 0xcaee, 0xa7e3, 0xcaf4, 0xa7e4, 0xa9d3, - 0xa7de, 0xcaf1, 0x003f, 0xcae7, 0xa7db, 0x003f, 0xa7ee, 0xcaec, - 0xcaf2, 0xa7e0, 0xa7e2, 0x003f, 0xcae8, 0x003f, 0xcae9, 0xcaea, - 0x003f, 0xa7ed, 0xa7e7, 0xa7ec, 0xcaeb, 0xa7eb, 0xa7dd, 0xa7dc, - 0xa7e9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa9e1, 0xccbe, 0xccb7, 0xa9dc, 0xa9ef, 0xccb3, 0xccba, 0xccbc, - 0xccbf, 0xa9ea, 0x003f, 0xccbb, 0xccb4, 0xa9e8, 0xccb8, 0x003f, - 0xccc0, 0xa9d9, 0x003f, 0xccbd, 0xa9e3, 0xa9e2, 0xccb6, 0xa9d7, - 0x003f, 0x003f, 0xa9d8, 0x003f, 0xa9d6, 0x003f, 0xa9ee, 0xa9e6, - 0xa9e0, 0xa9d4, 0xccb9, 0xa9df, 0xa9d5, 0xa9e7, 0xa9f0, 0xced4, - 0xa9e4, 0xccb5, 0xa9da, 0xa9dd, 0xa9de, 0x003f, 0xa9ec, 0xa9ed, - 0xa9eb, 0xa9e5, 0xa9e9, 0xa9db, 0xabf4, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xceda, 0xac41, 0xabf8, 0xabfa, 0xac40, - 0xcee6, 0xabfd, 0xd1b1, 0xaeb1, 0xac43, 0xced7, 0xcedf, 0xabfe, - 0xcede, 0xcedb, 0xcee3, 0xcee5, 0xabf7, 0xabfb, 0xac42, 0xaeb3, - /* 0x6300 .. 0x63ff */ - 0xcee0, 0xabf9, 0xac45, 0xced9, 0x003f, 0x003f, 0x003f, 0xabfc, - 0xaeb2, 0xabf6, 0x003f, 0xced6, 0xcedd, 0xced5, 0xced8, 0xcedc, - 0xd1b2, 0xac44, 0x003f, 0xcee1, 0xcee2, 0xcee4, 0xabf5, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xaec1, 0xd1be, 0xaebf, 0xaec0, 0xd1b4, 0xd1c4, 0x003f, 0xaeb6, - 0x003f, 0x003f, 0xd566, 0xd1c6, 0xd1c0, 0x003f, 0xd1b7, 0x003f, - 0xd1c9, 0xd1ba, 0xaebc, 0xd57d, 0xd1bd, 0xaebe, 0xaeb5, 0x003f, - 0xd1cb, 0xd1bf, 0xaeb8, 0xd1b8, 0xd1b5, 0xd1b6, 0xaeb9, 0xd1c5, - 0xd1cc, 0xaebb, 0xd1bc, 0xd1bb, 0xaec3, 0xaec2, 0xaeb4, 0xaeba, - 0xaebd, 0xd1c8, 0x003f, 0x003f, 0xd1c2, 0xaeb7, 0xd1b3, 0xd1ca, - 0xd1c1, 0xd1c3, 0xd1c7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd567, 0x003f, 0xb1b7, - 0xb1cb, 0xb1ca, 0x003f, 0xb1bf, 0x003f, 0xd579, 0xd575, 0xd572, - 0xd5a6, 0xb1ba, 0xb1b2, 0x003f, 0x003f, 0xd577, 0xb4a8, 0xb1b6, - 0xd5a1, 0x003f, 0xb1cc, 0xb1c9, 0xd57b, 0xd56a, 0x003f, 0x003f, - 0xb1c8, 0xd5a3, 0xd569, 0xb1bd, 0xb1c1, 0xd5a2, 0x003f, 0xd573, - 0xb1c2, 0xb1bc, 0xd568, 0x003f, 0xb478, 0xd5a5, 0xd571, 0xb1c7, - 0xd574, 0xd5a4, 0xb1c6, 0x003f, 0xd952, 0x003f, 0xb1b3, 0xd56f, - 0xb1b8, 0xb1c3, 0x003f, 0xb1be, 0xd578, 0xd56e, 0xd56c, 0xd57e, - 0xb1b0, 0xb1c4, 0xb1b4, 0xb477, 0xd57c, 0xb1b5, 0x003f, 0xb1b1, - 0xb1c0, 0xb1bb, 0xb1b9, 0xd570, 0xb1c5, 0xd56d, 0xd57a, 0xd576, - 0xd954, 0xd953, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd56b, 0xd964, 0x003f, - 0xb47a, 0x003f, 0xd96a, 0xd959, 0xd967, 0xdd77, 0xb47d, 0xd96b, - 0xd96e, 0xb47c, 0xd95c, 0xd96d, 0xd96c, 0xb47e, 0xd955, 0xb479, - 0xb4a3, 0x003f, 0xb4a1, 0xd969, 0x003f, 0xd95f, 0xb4a5, 0xd970, - 0xd968, 0xd971, 0xb4ad, 0xb4ab, 0xd966, 0xd965, 0x003f, 0xd963, - 0xd95d, 0xb4a4, 0x003f, 0xb4a2, 0xd1b9, 0xd956, 0x003f, 0xddb7, - 0xd957, 0xb47b, 0xb4aa, 0xdd79, 0x003f, 0xb4a6, 0xb4a7, 0xd958, - 0xd96f, 0xdd78, 0xd960, 0xd95b, 0xb4a9, 0xd961, 0xd95e, 0x003f, - 0x003f, 0xb4ae, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6400 .. 0x64ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb770, 0x003f, - 0x003f, 0xdd7c, 0xddb1, 0xddb6, 0xddaa, 0xb76c, 0xddbb, 0xb769, - 0xdd7a, 0x003f, 0xdd7b, 0xb762, 0xb76b, 0xdda4, 0xb76e, 0xb76f, - 0xdda5, 0x003f, 0xddb2, 0xddb8, 0xb76a, 0x003f, 0xb764, 0xdda3, - 0xdd7d, 0xddba, 0xdda8, 0xdda9, 0xdd7e, 0xddb4, 0xddab, 0xddb5, - 0xddad, 0x003f, 0xb765, 0xe1d9, 0xb768, 0xb766, 0xddb9, 0xddb0, - 0xddac, 0x003f, 0x003f, 0xdda1, 0xba53, 0xddaf, 0xb76d, 0xdda7, - 0x003f, 0xdda6, 0x003f, 0x003f, 0x003f, 0xb767, 0xb763, 0xe1ee, - 0xddb3, 0xddae, 0x003f, 0xdda2, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe1e9, 0x003f, 0xe1da, 0xe1e5, 0x003f, - 0xe1ec, 0xba51, 0xb4ac, 0xe1ea, 0xba4c, 0x003f, 0x003f, 0x003f, - 0xba4b, 0xe1f1, 0x003f, 0xe1db, 0xe1e8, 0xe1dc, 0xe1e7, 0xba4f, - 0xe1eb, 0xd962, 0x003f, 0x003f, 0x003f, 0xe1f2, 0xe1e3, 0xba52, - 0xe5ba, 0xbcaf, 0x003f, 0xe1f0, 0xe1ef, 0xba54, 0xe5ad, 0xbcb0, - 0xe5ae, 0x003f, 0xe1df, 0xe1e0, 0xe1dd, 0xe1e2, 0xe1de, 0xe1f3, - 0xba4e, 0xbcb1, 0xba50, 0xba55, 0x003f, 0xe1e1, 0x003f, 0xe1ed, - 0x003f, 0x003f, 0xe1e6, 0x003f, 0x003f, 0xe5b1, 0x003f, 0xba4a, - 0xbcb4, 0xe9aa, 0xe5b6, 0xe5b5, 0xe5b7, 0x003f, 0x003f, 0xe5b4, - 0xbcb5, 0x003f, 0xbcbb, 0xbcb8, 0x003f, 0xbcb9, 0xe5af, 0xe5b2, - 0xe5bc, 0xbcc1, 0xbcbf, 0x003f, 0xe5b3, 0xd95a, 0xbcb2, 0xe5b9, - 0xe5b0, 0x003f, 0xbcc2, 0xe5b8, 0xba4d, 0xbcb7, 0xe1e4, 0x003f, - 0x003f, 0xbcba, 0x003f, 0xbcbe, 0xbcc0, 0xbcbd, 0xbcbc, 0x003f, - 0xbcb6, 0xe5bb, 0xbcb3, 0xbcc3, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xbed8, 0xbed9, 0xe9a9, 0xbee2, 0xbedf, - 0x003f, 0xbed6, 0xbedd, 0xe9ab, 0xbedb, 0xbed5, 0x003f, 0xbedc, - 0x003f, 0xe9a8, 0xc0bb, 0xbed7, 0x003f, 0xbede, 0xc0ba, 0xe9a7, - 0xe9a6, 0x003f, 0xbee0, 0x003f, 0xbee1, 0x003f, 0xe9a5, 0xe9a4, - 0xc0bc, 0xe9ae, 0xbeda, 0xe9ac, 0x003f, 0x003f, 0x003f, 0x003f, - 0xc0bd, 0x003f, 0xc0c2, 0xecea, 0xecec, 0x003f, 0xc0bf, 0x003f, - 0xeced, 0xece9, 0x003f, 0xeceb, 0xc0c0, 0xc0c3, 0x003f, 0xece8, - 0xc0be, 0xc0c1, 0xc259, 0xe9ad, 0xc258, 0x003f, 0x003f, 0xc25e, - 0xefd4, 0x003f, 0xc25c, 0xc25d, 0xefd7, 0xefd3, 0xc25a, 0xefd1, - /* 0x6500 .. 0x65ff */ - 0xc36b, 0xefd5, 0x003f, 0xefd6, 0xefd2, 0x003f, 0xc25b, 0xf242, - 0x003f, 0xf245, 0x003f, 0x003f, 0xf246, 0xf244, 0xf247, 0xc36c, - 0xf243, 0x003f, 0x003f, 0xf44e, 0xc464, 0xf44d, 0xf44c, 0xf44b, - 0xc463, 0xc465, 0x003f, 0xf5cd, 0xc4e2, 0xc4e1, 0x003f, 0x003f, - 0xf6e1, 0xf6e0, 0xf6e3, 0xc5cb, 0xc575, 0xf7dd, 0xf6e2, 0x003f, - 0x003f, 0xf7dc, 0xc5cd, 0xc5cc, 0xc5f3, 0xf8a9, 0xf8ef, 0xa4e4, - 0x003f, 0x003f, 0xd972, 0xe9af, 0x003f, 0x003f, 0xa6ac, 0xcaf7, - 0xa7f1, 0xa7ef, 0x003f, 0xa7f0, 0x003f, 0xccc1, 0xa9f1, 0xac46, - 0x003f, 0xcee7, 0x003f, 0xcee8, 0x003f, 0xac47, 0xd1ce, 0x003f, - 0xaec4, 0xaec5, 0xd1cd, 0x003f, 0x003f, 0x003f, 0x003f, 0xb1d3, - 0x003f, 0xb1cf, 0x003f, 0xd5a7, 0xb1d6, 0xb1d5, 0xb1ce, 0xb1d1, - 0xb1d4, 0xb1d0, 0x003f, 0x003f, 0xd976, 0xb1cd, 0xb4af, 0x003f, - 0x003f, 0x003f, 0xb4b1, 0xb4b2, 0xd975, 0xd978, 0xb4b0, 0xd973, - 0xd977, 0x003f, 0xd974, 0x003f, 0xb771, 0x003f, 0x003f, 0xddbc, - 0x003f, 0x003f, 0xba56, 0xe1f4, 0xbee3, 0xbcc4, 0xe5bd, 0xbcc5, - 0xbcc6, 0xe5bf, 0xe5be, 0xe5c0, 0xe9b1, 0x003f, 0x003f, 0xe9b0, - 0xecef, 0xecee, 0xc0c4, 0xc0c5, 0xf248, 0x003f, 0x003f, 0xa4e5, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd979, 0x003f, 0x003f, 0x003f, - 0xb4b4, 0xb4b3, 0xddbd, 0x003f, 0xefd8, 0xc4e3, 0xf7de, 0xa4e6, - 0x003f, 0xaec6, 0x003f, 0xb1d8, 0xb1d7, 0xd97a, 0xd97b, 0xb772, - 0xe1f5, 0xba57, 0xe9b2, 0x003f, 0xa4e7, 0xa5b8, 0x003f, 0xa9f2, - 0xccc2, 0x003f, 0xcee9, 0xac48, 0xb1d9, 0x003f, 0xd97c, 0xb4b5, - 0xb773, 0x003f, 0xe5c1, 0xe5c2, 0x003f, 0x003f, 0xecf0, 0xc25f, - 0xf8f0, 0xa4e8, 0x003f, 0xccc3, 0xa9f3, 0xac49, 0x003f, 0xceea, - 0x003f, 0xaec7, 0xd1d2, 0xd1d0, 0xd1d1, 0xaec8, 0xd1cf, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb1db, 0xb1dc, 0xd5a8, 0xb1dd, 0xb1da, - 0xd97d, 0x003f, 0xd97e, 0xddbe, 0x003f, 0x003f, 0xba59, 0xba58, - 0x003f, 0x003f, 0xecf1, 0xefd9, 0x003f, 0xf24a, 0xf249, 0xf44f, - 0x003f, 0xc95e, 0xac4a, 0x003f, 0x003f, 0xa4e9, 0xa5b9, 0x003f, - 0xa6ae, 0xa6ad, 0x003f, 0x003f, 0xa6af, 0xa6b0, 0xc9ee, 0xc9ed, - 0xcaf8, 0xa7f2, 0xcafb, 0xcafa, 0xcaf9, 0xcafc, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa9f4, 0xccc9, 0xccc5, 0xccce, 0x003f, 0x003f, - /* 0x6600 .. 0x66ff */ - 0xa9fb, 0x003f, 0xa9f9, 0xccca, 0xccc6, 0xcccd, 0xa9f8, 0xaa40, - 0xccc8, 0xccc4, 0xa9fe, 0xcccb, 0xa9f7, 0xcccc, 0xa9fa, 0xa9fc, - 0xccd0, 0xcccf, 0xccc7, 0xa9f6, 0xa9f5, 0xa9fd, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xceef, 0xcef5, 0x003f, 0xac50, - 0xac4d, 0xceec, 0xcef1, 0x003f, 0xac53, 0xac4b, 0xcef0, 0xac4e, - 0xac51, 0x003f, 0x003f, 0xcef3, 0x003f, 0xac4c, 0xcef8, 0xac4f, - 0x003f, 0xac52, 0xceed, 0xcef2, 0xcef6, 0xceee, 0xceeb, 0x003f, - 0x003f, 0xcef7, 0xcef4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xaed0, 0xaec9, 0xaecc, 0x003f, 0xaecf, 0x003f, 0xd1d5, - 0x003f, 0xaeca, 0xd1d3, 0x003f, 0xaece, 0x003f, 0x003f, 0xaecb, - 0x003f, 0xd1d6, 0xaecd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd5ac, 0xb1df, 0xd5ab, 0xd5ad, 0xb1de, 0xb1e3, 0xd1d4, - 0x003f, 0xd5aa, 0xd5ae, 0x003f, 0xb1e0, 0xd5a9, 0xb1e2, 0x003f, - 0xb1e1, 0x003f, 0xd9a7, 0x003f, 0xd9a2, 0x003f, 0xb4b6, 0xb4ba, - 0xb4b7, 0xd9a5, 0xd9a8, 0x003f, 0xb4b8, 0x003f, 0xb4b9, 0xb4be, - 0xddc7, 0xd9a6, 0xb4bc, 0xd9a3, 0xd9a1, 0x003f, 0xb4bd, 0x003f, - 0xd9a4, 0x003f, 0x003f, 0x003f, 0xb779, 0x003f, 0xddbf, 0xb776, - 0xb777, 0xb775, 0xddc4, 0xddc3, 0xddc0, 0xb77b, 0x003f, 0x003f, - 0xddc2, 0xb4bb, 0x003f, 0x003f, 0xddc6, 0xddc1, 0xb778, 0xb774, - 0xb77a, 0xddc5, 0x003f, 0x003f, 0x003f, 0xba5c, 0x003f, 0xe1f8, - 0xe1f7, 0xe1f6, 0xba5a, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xba5b, 0xe5c5, 0xe5c8, 0xbcc8, 0x003f, 0x003f, 0xbcc7, 0xe5c9, - 0xe5c4, 0xbcca, 0xe5c6, 0x003f, 0xbcc9, 0xe5c3, 0x003f, 0xe5c7, - 0xbee9, 0xbee6, 0xe9bb, 0xe9ba, 0x003f, 0xe9b9, 0xe9b4, 0x003f, - 0xe9b5, 0x003f, 0x003f, 0x003f, 0xbee7, 0x003f, 0xbee4, 0xbee8, - 0xe9b3, 0xbee5, 0xe9b6, 0xe9b7, 0xe9bc, 0x003f, 0x003f, 0xe9b8, - 0x003f, 0x003f, 0xecf2, 0x003f, 0x003f, 0x003f, 0xc0c7, 0x003f, - 0xefdc, 0xc0c6, 0xefda, 0xefdb, 0xc260, 0xc36e, 0xf24b, 0x003f, - 0xc36d, 0x003f, 0x003f, 0xf451, 0xf452, 0x003f, 0xc466, 0x003f, - 0xf450, 0xc4e4, 0x003f, 0xf7df, 0xc5ce, 0xf8aa, 0xf8ab, 0x003f, - 0xa4ea, 0x003f, 0xa6b1, 0xa6b2, 0xa7f3, 0x003f, 0xccd1, 0xac54, - 0xaed1, 0xb1e4, 0x003f, 0x003f, 0xb0d2, 0x003f, 0xb4bf, 0xb4c0, - /* 0x6700 .. 0x67ff */ - 0xb3cc, 0xd9a9, 0x003f, 0xb77c, 0xe1fa, 0xe1f9, 0x003f, 0x003f, - 0xa4eb, 0xa6b3, 0xccd2, 0xaa42, 0x003f, 0xaa41, 0x003f, 0xcef9, - 0xcefa, 0x003f, 0xd1d7, 0xd1d8, 0xaed2, 0xaed3, 0x003f, 0xaed4, - 0xd5af, 0x003f, 0x003f, 0xb1e6, 0x003f, 0xb4c2, 0x003f, 0xb4c1, - 0xddc8, 0xdf7a, 0xe1fb, 0xe9bd, 0x003f, 0x003f, 0xc261, 0xc467, - 0xa4ec, 0x003f, 0xa5bc, 0xa5bd, 0xa5bb, 0xa5be, 0xa5ba, 0x003f, - 0x003f, 0xa6b6, 0x003f, 0xc9f6, 0xa6b5, 0xa6b7, 0x003f, 0x003f, - 0xc9f1, 0xc9f0, 0xc9f3, 0xc9f2, 0xc9f5, 0xa6b4, 0xc9ef, 0xc9f4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcafd, 0xa7fd, 0xcafe, - 0xcb43, 0xa7fc, 0x003f, 0xcb47, 0xcb42, 0xcb45, 0xa7f5, 0xa7f6, - 0xa7f7, 0xa7f8, 0x003f, 0xa840, 0x003f, 0xcb41, 0xa7fa, 0xa841, - 0x003f, 0xcb40, 0xcb46, 0x003f, 0xa7f9, 0xcb44, 0xa7fb, 0xa7f4, - 0xa7fe, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xaa57, 0x003f, 0xccd4, 0xaa43, 0x003f, 0xaa4d, - 0xaa4e, 0xaa46, 0xaa58, 0xaa48, 0xccdc, 0xaa53, 0xccd7, 0xaa49, - 0xcce6, 0xcce7, 0xccdf, 0xccd8, 0xaa56, 0xcce4, 0xaa51, 0xaa4f, - 0x003f, 0xcce5, 0x003f, 0xcce3, 0xccdb, 0xccd3, 0xccda, 0xaa4a, - 0x003f, 0xaa50, 0x003f, 0xaa44, 0xccde, 0xccdd, 0xccd5, 0x003f, - 0xaa52, 0xcce1, 0xccd6, 0xaa55, 0xcce8, 0xaa45, 0x003f, 0xaa4c, - 0xccd9, 0xcce2, 0xaa54, 0x003f, 0xaa47, 0xaa4b, 0x003f, 0xcce0, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcf5b, 0xac5c, - 0xac69, 0x003f, 0xcf56, 0xcf4c, 0xac62, 0xcf4a, 0xac5b, 0xcf45, - 0xac65, 0xcf52, 0xcefe, 0xcf41, 0x003f, 0x003f, 0x003f, 0x003f, - 0xcf44, 0xcefb, 0xcf51, 0xcf61, 0xac60, 0xcf46, 0xcf58, 0x003f, - 0xcefd, 0xcf5f, 0xcf60, 0xcf63, 0xcf5a, 0xcf4b, 0xcf53, 0xac66, - 0xac59, 0xac61, 0xac6d, 0xac56, 0xac58, 0x003f, 0x003f, 0x003f, - 0xcf43, 0xac6a, 0xac63, 0xcf5d, 0xcf40, 0xac6c, 0xac67, 0xcf49, - 0x003f, 0x003f, 0xac6b, 0xcf50, 0xcf48, 0xac64, 0xcf5c, 0xcf54, - 0x003f, 0xac5e, 0xcf62, 0xcf47, 0xac5a, 0xcf59, 0xcf4f, 0xac5f, - 0xcf55, 0xac57, 0xcefc, 0xac68, 0xaee3, 0xac5d, 0xcf4e, 0xcf4d, - 0xcf42, 0x003f, 0xcf5e, 0x003f, 0xcf57, 0x003f, 0x003f, 0xac55, - /* 0x6800 .. 0x68ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd1ec, 0xaeea, 0xd1ed, 0x003f, 0xd1e1, 0xaedf, - 0xaeeb, 0x003f, 0xd1da, 0x003f, 0xd1e3, 0xd1eb, 0x003f, 0xd1d9, - 0xd1f4, 0xaed5, 0x003f, 0x003f, 0x003f, 0xd1f3, 0xd1ee, 0x003f, - 0xd1ef, 0xaedd, 0xaee8, 0xd1e5, 0x003f, 0xd1e6, 0xd1f0, 0xd1e7, - 0x003f, 0xd1e2, 0xd1dc, 0xd1dd, 0xd1ea, 0xd1e4, 0x003f, 0x003f, - 0xaed6, 0xaeda, 0xd1f2, 0xd1de, 0xaee6, 0xaee2, 0x003f, 0x003f, - 0xaee5, 0xaeec, 0xaedb, 0xaee7, 0xd1e9, 0xaee9, 0xaed8, 0x003f, - 0xaed7, 0xd1db, 0x003f, 0xd1df, 0xaee0, 0xd1f1, 0xd1e8, 0xd1e0, - 0xaee4, 0xaee1, 0x003f, 0xaed9, 0xaedc, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd5c4, 0x003f, 0xd5b4, 0xd5b5, 0xd5b9, - 0x003f, 0xd5c8, 0xd5c5, 0x003f, 0xd5be, 0xd5bd, 0xb1ed, 0xd5c1, - 0xd5d0, 0xd5b0, 0x003f, 0xd5d1, 0xd5c3, 0xd5d5, 0xd5c9, 0xb1ec, - 0xd5c7, 0xb1e7, 0xb1fc, 0xb1f2, 0x003f, 0xb1f6, 0xb1f5, 0xd5b1, - 0x003f, 0xd5ce, 0xd5d4, 0xd5cc, 0xd5d3, 0x003f, 0x003f, 0xd5c0, - 0xd5b2, 0xd5d2, 0xd5c2, 0xb1ea, 0xb1f7, 0x003f, 0xd5cb, 0xb1f0, - 0x003f, 0x003f, 0x003f, 0xd5ca, 0xd5b3, 0xb1f8, 0x003f, 0xb1fa, - 0xd5cd, 0xb1fb, 0xb1e9, 0xd5ba, 0xd5cf, 0x003f, 0x003f, 0xb1ef, - 0xb1f9, 0xd5bc, 0xd5c6, 0xd5b7, 0xd5bb, 0xb1f4, 0xd5b6, 0xb1e8, - 0xb1f1, 0xb1ee, 0xd5bf, 0xaede, 0xd9c0, 0xb1eb, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xb1f3, 0x003f, 0xd9c3, 0xd9d9, - 0xd9ce, 0xb4d6, 0x003f, 0xb4d1, 0xd9bd, 0xb4d2, 0xd9cd, 0x003f, - 0xd9c6, 0xd9d3, 0xb4ce, 0xd9ab, 0xd9d5, 0xb4c4, 0xd9b3, 0xb4c7, - 0xb4c6, 0x003f, 0xb4d7, 0x003f, 0xd9ad, 0xd9cf, 0xd9d0, 0xb4c9, - 0xb4c5, 0xd9bb, 0x003f, 0xb4d0, 0xd9b6, 0x003f, 0xd9d1, 0xb4cc, - 0xd9c9, 0xd9d6, 0xd9b0, 0xd9b5, 0xd9af, 0x003f, 0xb4cb, 0xd9c2, - 0xddde, 0xd9b1, 0xb4cf, 0xd9ba, 0xd9d2, 0xb4ca, 0xd9b7, 0xd9b4, - 0xd9c5, 0xb4cd, 0xb4c3, 0xb4d9, 0xd9c8, 0xd9c7, 0x003f, 0x003f, - /* 0x6900 .. 0x69ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0xd9ac, 0xb4c8, 0xd9d4, 0xd9bc, - 0xd9be, 0x003f, 0xd9cb, 0xd9ca, 0xd9aa, 0xb4d3, 0xb4d5, 0xd9b2, - 0xd9b9, 0xd9c1, 0xb4d4, 0xd9b8, 0xd9c4, 0xd9d7, 0x003f, 0xd9cc, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd9d8, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd9ae, 0x003f, 0x003f, 0x003f, 0x003f, 0xddf2, - 0xb7a6, 0x003f, 0xddf0, 0xdddb, 0xdde0, 0xddd9, 0x003f, 0xddec, - 0xddcb, 0xddd2, 0x003f, 0xddea, 0xddf4, 0xdddc, 0x003f, 0xddcf, - 0xdde2, 0xdde7, 0xddd3, 0x003f, 0xdde4, 0xddd0, 0x003f, 0x003f, - 0xddd7, 0xddd8, 0xb7a8, 0xddeb, 0xdde9, 0x003f, 0xddcc, 0xddee, - 0x003f, 0xddef, 0xddf1, 0xb7ac, 0xb7a4, 0x003f, 0xd5b8, 0xddd4, - 0xdde6, 0xddd5, 0xb7a1, 0xb7b1, 0xdded, 0xb7af, 0xb7ab, 0xddca, - 0xb7a3, 0x003f, 0xddcd, 0xb7b0, 0x003f, 0xdddd, 0xddc9, 0x003f, - 0xb7a9, 0xdde1, 0xddd1, 0xb7aa, 0xddda, 0xb77e, 0xb4d8, 0xdde3, - 0xd9bf, 0xddce, 0x003f, 0x003f, 0xdde8, 0xb7a5, 0xdde5, 0xb7a2, - 0xdddf, 0xb7ad, 0xddd6, 0xddf3, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb7a7, 0xdec6, 0x003f, 0x003f, 0xb7ae, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe24a, 0xe248, 0x003f, - 0xe25e, 0xe246, 0x003f, 0xe258, 0xb77d, 0xba5f, 0xe242, 0xe25d, - 0x003f, 0xe247, 0xe255, 0xba64, 0xba5d, 0x003f, 0xe25b, 0x003f, - 0xe240, 0xe25a, 0x003f, 0xba6f, 0xe251, 0xe261, 0xba6d, 0xe249, - 0xba5e, 0xe24b, 0xe259, 0xba67, 0xe244, 0xba6b, 0xba61, 0xe24d, - 0xe243, 0xe1fc, 0x003f, 0xe257, 0xba68, 0xe260, 0xe1fd, 0xba65, - 0x003f, 0xe253, 0x003f, 0xba66, 0xe245, 0xe250, 0xe24c, 0xe24e, - 0x003f, 0xba60, 0xe25f, 0xba6e, 0xe24f, 0x003f, 0xe262, 0x003f, - 0x003f, 0xe1fe, 0xe254, 0xba63, 0xba6c, 0xba6a, 0xe241, 0xe256, - 0xba69, 0x003f, 0x003f, 0xba62, 0xe252, 0x003f, 0x003f, 0x003f, - 0x003f, 0xe25c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe5d5, 0x003f, 0xe5d1, 0xe5cd, 0xe5e1, 0xe5de, - 0xbccd, 0x003f, 0x003f, 0xe5e5, 0xe5d4, 0xbcd8, 0xe5db, 0x003f, - 0x003f, 0xe5d0, 0xe5da, 0xbcd5, 0xe5ee, 0x003f, 0xe5eb, 0xe5dd, - 0xe5ce, 0x003f, 0x003f, 0xe5e2, 0xe5e4, 0xbcd1, 0xe5d8, 0xe5d3, - /* 0x6a00 .. 0x6aff */ - 0xe5ca, 0xbcce, 0xbcd6, 0x003f, 0xe5e7, 0xbcd7, 0xe5cb, 0xe5ed, - 0xe5e0, 0xe5e6, 0xbcd4, 0x003f, 0x003f, 0xe5e3, 0x003f, 0xe5ea, - 0x003f, 0xbcd9, 0x003f, 0xbcd3, 0xe5dc, 0xe5cf, 0xe5ef, 0xe5cc, - 0xe5e8, 0xbcd0, 0x003f, 0xe5d6, 0x003f, 0xe5d7, 0xbccf, 0xbccc, - 0xe5d2, 0xbcd2, 0x003f, 0xbccb, 0x003f, 0xe5e9, 0xe5ec, 0xe5d9, - 0xe9ca, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe9c2, 0x003f, 0xe9be, 0xbef6, 0x003f, 0x003f, - 0xbeeb, 0xbef0, 0xbeec, 0xe9cc, 0xe9d7, 0xbeea, 0xe9c4, 0xe9cd, - 0xe5df, 0xe9ce, 0x003f, 0x003f, 0xbef1, 0x003f, 0xe9dd, 0xbef5, - 0xbef8, 0xe9c0, 0x003f, 0xbef4, 0x003f, 0xe9db, 0xe9dc, 0xe9d2, - 0xe9d1, 0xe9c9, 0x003f, 0x003f, 0xe9d3, 0xe9da, 0xe9d9, 0x003f, - 0xbeef, 0xbeed, 0xe9cb, 0xe9c8, 0x003f, 0xe9c5, 0xe9d8, 0xbef7, - 0xe9d6, 0xbef3, 0xbef2, 0x003f, 0xe9d0, 0x003f, 0xe9bf, 0xe9c1, - 0xe9c3, 0xe9d5, 0xe9cf, 0xbeee, 0x003f, 0xe9c6, 0x003f, 0xe9d4, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9c7, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc0cf, 0xed45, - 0xc0c8, 0xecf5, 0x003f, 0xed41, 0xc0ca, 0xed48, 0x003f, 0xecfc, - 0x003f, 0xecf7, 0x003f, 0x003f, 0xed49, 0xecf3, 0xecfe, 0x003f, - 0xc0d1, 0xed44, 0xed4a, 0xecfd, 0xc0c9, 0xed40, 0xecf4, 0xc0d0, - 0x003f, 0x003f, 0xed47, 0xecf9, 0xc0cc, 0x003f, 0xecfb, 0xecf8, - 0xc0d2, 0xecfa, 0xc0cb, 0xc0ce, 0xed43, 0xecf6, 0xed46, 0x003f, - 0xed42, 0x003f, 0x003f, 0x003f, 0xc263, 0xefe7, 0xc268, 0xc269, - 0x003f, 0x003f, 0x003f, 0xc262, 0xefe6, 0x003f, 0xefe3, 0xefe4, - 0xc266, 0xefde, 0xefe2, 0xc265, 0x003f, 0xefdf, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc267, 0xc264, 0x003f, 0xefdd, 0xefe1, 0xefe5, - 0x003f, 0x003f, 0x003f, 0xf251, 0xf24e, 0xf257, 0x003f, 0xf256, - 0xf254, 0xf24f, 0x003f, 0xc372, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf250, 0xc371, 0xc0cd, 0xf253, 0xc370, 0xf258, 0xf252, - 0xf24d, 0xefe0, 0x003f, 0x003f, 0x003f, 0xc36f, 0x003f, 0xf24c, - 0xf456, 0x003f, 0xf455, 0xf255, 0xc468, 0x003f, 0xf459, 0xf45a, - 0xf454, 0xf458, 0x003f, 0xf453, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf5d1, 0xf457, 0xc4e7, 0xc4e5, 0xf5cf, 0x003f, 0x003f, 0x003f, - /* 0x6b00 .. 0x6bff */ - 0xf5d2, 0x003f, 0xf5ce, 0xf5d0, 0xc4e6, 0x003f, 0x003f, 0x003f, - 0xf6e5, 0xf6e6, 0xc576, 0xf6e4, 0x003f, 0x003f, 0x003f, 0xf7e2, - 0xc5cf, 0xf7e0, 0xf7e1, 0xf8ac, 0x003f, 0x003f, 0xc656, 0xf8f3, - 0xf8f1, 0xf8f2, 0xf8f4, 0x003f, 0x003f, 0x003f, 0xf9bb, 0x003f, - 0xa4ed, 0xa6b8, 0x003f, 0xaa59, 0x003f, 0xcce9, 0x003f, 0x003f, - 0xcf64, 0x003f, 0x003f, 0x003f, 0xd1f5, 0xd1f7, 0x003f, 0xd1f6, - 0x003f, 0xd1f8, 0xb1fd, 0xd5d7, 0xd1f9, 0x003f, 0xd5d6, 0xd5d8, - 0xd5d9, 0xd9da, 0xb4db, 0xd9db, 0xd9dd, 0xb4dc, 0xb4da, 0xd9dc, - 0x003f, 0xddfa, 0xddf8, 0xddf7, 0x003f, 0xddf6, 0xddf5, 0xb7b2, - 0xddf9, 0xba70, 0xe263, 0xe265, 0xba71, 0xe264, 0xbcdb, 0x003f, - 0xbcda, 0xe5f0, 0x003f, 0x003f, 0xe9df, 0xe9de, 0xe9e0, 0x003f, - 0x003f, 0xbef9, 0x003f, 0xed4b, 0xc0d3, 0x003f, 0xefe8, 0xc26a, - 0xf259, 0xc577, 0xa4ee, 0xa5bf, 0xa6b9, 0xa842, 0xaa5a, 0xaa5b, - 0x003f, 0x003f, 0xac6e, 0x003f, 0x003f, 0xd1fa, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb7b3, 0x003f, 0x003f, 0x003f, 0xe6d1, 0xbefa, - 0xc26b, 0xa4ef, 0x003f, 0xa6ba, 0x003f, 0x003f, 0xcceb, 0xaa5c, - 0xccea, 0x003f, 0xcf65, 0xac6f, 0xcf66, 0x003f, 0xac70, 0x003f, - 0xd1fc, 0xaeee, 0xaeed, 0x003f, 0xd5de, 0xd5dc, 0xd5dd, 0xd5db, - 0x003f, 0xd5da, 0x003f, 0x003f, 0xd9de, 0xd9e1, 0xb4de, 0xd9df, - 0xb4dd, 0xd9e0, 0x003f, 0xddfb, 0x003f, 0x003f, 0xe266, 0xe267, - 0xe268, 0x003f, 0xe5f3, 0xe5f2, 0xbcdc, 0xe5f1, 0xe5f4, 0xe9e1, - 0x003f, 0x003f, 0xe9e2, 0xe9e3, 0x003f, 0xed4c, 0xc0d4, 0xc26c, - 0xf25a, 0x003f, 0xc4e8, 0xc95f, 0x003f, 0xac71, 0xcf67, 0xaeef, - 0x003f, 0x003f, 0xb1fe, 0x003f, 0xb4df, 0xd9e2, 0x003f, 0xb7b5, - 0xb7b4, 0x003f, 0x003f, 0xe269, 0xe26a, 0xbcdd, 0xbcde, 0xe9e5, - 0xe9e4, 0xefe9, 0xf7e3, 0xa4f0, 0xc960, 0xa5c0, 0x003f, 0xa843, - 0xcb48, 0x003f, 0xac72, 0xb7b6, 0xa4f1, 0x003f, 0xcf68, 0xac73, - 0xcf69, 0x003f, 0xc0d5, 0xa4f2, 0x003f, 0x003f, 0xccec, 0x003f, - 0xcf6a, 0x003f, 0xd242, 0xd241, 0xd1fe, 0x003f, 0xd1fd, 0xd243, - 0xd240, 0x003f, 0x003f, 0xb240, 0xb241, 0x003f, 0x003f, 0xb4e0, - 0xd9e3, 0x003f, 0xd9e4, 0xd9e5, 0x003f, 0x003f, 0x003f, 0xde41, - 0xde42, 0xde40, 0x003f, 0xddfd, 0xddfe, 0xb7b7, 0xe26b, 0xe5f7, - /* 0x6c00 .. 0x6cff */ - 0xe5f6, 0xe5f5, 0xe5f8, 0xe9e7, 0xe9e6, 0xbefb, 0xe9e8, 0x003f, - 0xc0d6, 0xed4d, 0x003f, 0xefea, 0xf25b, 0xf6e7, 0x003f, 0xa4f3, - 0xa5c2, 0xa5c1, 0x003f, 0xaa5d, 0xc961, 0xc97e, 0xa6bb, 0x003f, - 0xc9f7, 0xcb49, 0xcb4a, 0xaa5e, 0x003f, 0xcced, 0x003f, 0xac74, - 0xcf6b, 0xcf6c, 0x003f, 0xaef0, 0xaef4, 0xd244, 0xaef3, 0xaef1, - 0xaef2, 0x003f, 0xd5df, 0xb242, 0xb4e3, 0x003f, 0xb4e1, 0xb4e2, - 0xd9e6, 0x003f, 0x003f, 0xba72, 0xa4f4, 0x003f, 0xc9a1, 0x003f, - 0xa5c3, 0x003f, 0x003f, 0xc9a4, 0x003f, 0x003f, 0xa5c6, 0xc9a3, - 0xa5c5, 0xa5c4, 0xa844, 0xc9a2, 0x003f, 0x003f, 0xc9f8, 0x003f, - 0x003f, 0x003f, 0xc9fc, 0xc9fe, 0xca40, 0xa6c5, 0xa6c6, 0xc9fb, - 0xa6c1, 0x003f, 0xc9f9, 0x003f, 0xc9fd, 0xa6c2, 0x003f, 0xa6bd, - 0x003f, 0xa6be, 0x003f, 0xa6c4, 0xc9fa, 0xa6bc, 0xa845, 0xa6bf, - 0xa6c0, 0xa6c3, 0x003f, 0x003f, 0x003f, 0xcb5b, 0xcb59, 0xcb4c, - 0xa851, 0xcb53, 0xa84c, 0xcb4d, 0x003f, 0xcb55, 0x003f, 0xcb52, - 0xa84f, 0xcb51, 0xa856, 0xcb5a, 0xa858, 0x003f, 0xa85a, 0x003f, - 0xcb4b, 0x003f, 0xa84d, 0xcb5c, 0x003f, 0xa854, 0xa857, 0x003f, - 0xcd45, 0xa847, 0xa85e, 0xa855, 0xcb4e, 0xa84a, 0xa859, 0xcb56, - 0xa848, 0xa849, 0xcd43, 0xcb4f, 0xa850, 0xa85b, 0xcb5d, 0xcb50, - 0xa84e, 0x003f, 0xa853, 0xccee, 0xa85c, 0xcb57, 0xa852, 0x003f, - 0xa85d, 0xa846, 0xcb54, 0xa84b, 0xcb58, 0xcd44, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xaa6a, 0xaa7a, 0xccf5, 0xaa71, 0x003f, - 0xcd4b, 0xaa62, 0x003f, 0xaa65, 0xcd42, 0x003f, 0xccf3, 0xccf7, - 0xaa6d, 0xaa6f, 0xccfa, 0xaa76, 0xaa68, 0xaa66, 0xaa67, 0xaa75, - 0xcd47, 0xaa70, 0xccf9, 0xccfb, 0xaa6e, 0xaa73, 0xccfc, 0xcd4a, - 0x003f, 0xac75, 0xaa79, 0x003f, 0xaa63, 0xcd49, 0x003f, 0xcd4d, - 0xccf8, 0xcd4f, 0xcd40, 0xaa6c, 0xccf4, 0xaa6b, 0xaa7d, 0xaa72, - 0x003f, 0xccf2, 0xcf75, 0xaa78, 0xaa7c, 0xcd41, 0xcd46, 0x003f, - 0xaa7e, 0xaa77, 0xaa69, 0xaa5f, 0x003f, 0xaa64, 0x003f, 0xccf6, - 0xaa60, 0xcd4e, 0x003f, 0xccf0, 0xccef, 0xccfd, 0xccf1, 0xaa7b, - 0xaef5, 0xaa74, 0xccfe, 0xaa61, 0x003f, 0xaca6, 0x003f, 0x003f, - 0x003f, 0xcd4c, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x6d00 .. 0x6dff */ - 0xcf7c, 0xcfa1, 0x003f, 0xcfa4, 0xcf77, 0x003f, 0x003f, 0xcfa7, - 0xcfaa, 0xcfac, 0xcf74, 0xac76, 0xac7b, 0xd249, 0xacad, 0xcfa5, - 0xcfad, 0xcf7b, 0xcf73, 0x003f, 0x003f, 0x003f, 0xd264, 0xac7e, - 0xcfa2, 0xcf78, 0xcf7a, 0xaca5, 0x003f, 0xcf7d, 0xac7d, 0xcf70, - 0xcfa8, 0x003f, 0xcfab, 0x003f, 0x003f, 0xac7a, 0x003f, 0xaca8, - 0xcf6d, 0xacaa, 0xac78, 0xacae, 0xcfa9, 0xcf6f, 0xacab, 0xd25e, - 0xcd48, 0xac7c, 0xac77, 0xcf76, 0xcf6e, 0xacac, 0xaca4, 0xcfa3, - 0xaca9, 0xaca7, 0xcf79, 0xaca1, 0xcf71, 0xaca2, 0xaca3, 0xcf72, - 0xcfa6, 0xac79, 0xcf7e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd24c, 0xaefd, 0xaf43, 0x003f, 0x003f, 0x003f, 0xd255, 0xd25b, - 0xd257, 0xd24a, 0xd24d, 0xd246, 0xd247, 0xaf4a, 0xaefa, 0xd256, - 0xd25f, 0xaf45, 0xaef6, 0x003f, 0xaf40, 0xd24e, 0xaf42, 0xd24f, - 0xd259, 0x003f, 0x003f, 0x003f, 0xaf44, 0xd268, 0xd248, 0xaefc, - 0xaefb, 0xaf48, 0xd245, 0xd266, 0xd25a, 0xd267, 0xd261, 0xd253, - 0xd262, 0x003f, 0xd25c, 0xd265, 0xd263, 0xaf49, 0xd254, 0xaef9, - 0xaef8, 0xaf41, 0xaf47, 0xd260, 0xaf46, 0xd251, 0xb243, 0x003f, - 0xd269, 0xd250, 0xd24b, 0xaefe, 0xaf4b, 0xaef7, 0x003f, 0xd258, - 0xd25d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb265, 0xd5e1, 0xd5e5, 0x003f, 0xb252, 0xb250, - 0x003f, 0x003f, 0xb247, 0xd5e3, 0xd5e2, 0xb25b, 0x003f, 0xd5e8, - 0xb255, 0x003f, 0xd5fa, 0xd647, 0xb244, 0xd5f7, 0xd5f0, 0xb267, - 0xd5e0, 0x003f, 0xd5fc, 0x003f, 0xb264, 0xb258, 0xb263, 0xb24e, - 0xd5ec, 0xd5fe, 0xd5f6, 0xb24f, 0xb249, 0xd645, 0x003f, 0xd5fd, - 0xd640, 0xb251, 0xb259, 0xd642, 0xd5ea, 0xd5fb, 0xd5ef, 0xd644, - 0xb25e, 0xb246, 0xb25c, 0xd5f4, 0xd5f2, 0xd5f3, 0xb253, 0xd5ee, - 0xd5ed, 0xb248, 0xd5e7, 0xd646, 0xb24a, 0xd5f1, 0xb268, 0x003f, - 0xb262, 0xd5e6, 0xb25f, 0xb25d, 0xb266, 0xd5f8, 0xb261, 0xd252, - 0xd5f9, 0xb260, 0xd641, 0xb245, 0xd5f5, 0xb257, 0xd5e9, 0xb256, - 0x003f, 0xb254, 0xb24c, 0xb24b, 0xd9e7, 0xd643, 0x003f, 0x003f, - /* 0x6e00 .. 0x6eff */ - 0xd5eb, 0x003f, 0x003f, 0xd9fc, 0x003f, 0xb24d, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb541, 0xb25a, 0xb4ee, 0xd9f6, 0xb4fc, 0x003f, 0xd9ea, - 0xb4eb, 0xb4e7, 0xda49, 0xb4ed, 0xb4f1, 0xb4ec, 0xb4f5, 0xda4d, - 0xda44, 0x003f, 0x003f, 0xd9f1, 0xb4fa, 0xb4f4, 0xd9fd, 0xb4e4, - 0xda4a, 0xda43, 0xb4e8, 0xd9f7, 0xb4f7, 0xda55, 0xda56, 0x003f, - 0xb4e5, 0xda48, 0xb4f9, 0xd9fb, 0xd9ed, 0xd9ee, 0xb4fd, 0xd9f2, - 0xd9f9, 0xd9f3, 0x003f, 0xb4fb, 0xb544, 0xd9ef, 0xd9e8, 0xd9e9, - 0x003f, 0xd9eb, 0xb4ea, 0xd9f8, 0x003f, 0xb4f8, 0xb542, 0x003f, - 0x003f, 0xd9fa, 0xda53, 0xda4b, 0xb4e6, 0xda51, 0xb4f2, 0x003f, - 0xb4f0, 0x003f, 0xda57, 0xb4ef, 0xda41, 0xd9f4, 0xd9fe, 0xb547, - 0xda45, 0xda42, 0xd9f0, 0xb543, 0xda4f, 0xda4c, 0xda54, 0xb4e9, - 0xda40, 0xb546, 0x003f, 0xda47, 0x003f, 0x003f, 0xb4f3, 0xb4f6, - 0x003f, 0xda46, 0xb545, 0xd9f5, 0xd5e4, 0x003f, 0x003f, 0xda50, - 0xda4e, 0xda52, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd9ec, 0xb540, 0x003f, 0x003f, 0x003f, 0xde61, 0xde60, 0xde46, - 0xb7bd, 0x003f, 0xde5f, 0xde49, 0xde4a, 0x003f, 0xb7c7, 0xde68, - 0xb7c2, 0xde5e, 0x003f, 0xde43, 0xb7c8, 0xb7be, 0xde52, 0xde48, - 0xde4b, 0xde63, 0xb7b8, 0xde6a, 0xde62, 0xb7c1, 0xde57, 0xb7cc, - 0x003f, 0x003f, 0xb7cb, 0xb7c5, 0x003f, 0x003f, 0xde69, 0xb7b9, - 0xde55, 0xde4c, 0xde59, 0xde65, 0xb7cd, 0x003f, 0xb7bb, 0xde54, - 0x003f, 0xde4d, 0xb7c4, 0x003f, 0xb7c3, 0xde50, 0xde5a, 0xde64, - 0xde47, 0xde51, 0xb7bc, 0xde5b, 0xb7c9, 0xb7c0, 0xde4e, 0xb7bf, - 0xde45, 0xde53, 0xde67, 0xb4fe, 0xbab0, 0xde56, 0xe26c, 0xde58, - 0xde66, 0xb7c6, 0xde4f, 0xb7ba, 0xb7ca, 0xbcf0, 0xde44, 0x003f, - 0xde5d, 0x003f, 0x003f, 0x003f, 0xde5c, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe2aa, 0xbaad, 0xe27d, 0xe2a4, 0xbaa2, - 0x003f, 0xe26e, 0xbaaf, 0x003f, 0xba77, 0xe26d, 0xe2b0, 0xbab1, - 0xe271, 0xe2a3, 0x003f, 0xe273, 0xe2b3, 0xe2af, 0xba75, 0xbaa1, - /* 0x6f00 .. 0x6fff */ - 0xe653, 0xbaae, 0xba7d, 0xe26f, 0x003f, 0xe2ae, 0xbaa3, 0xe2ab, - 0xe2b8, 0xe275, 0xe27e, 0x003f, 0x003f, 0xe2b6, 0xe2ac, 0xba7c, - 0x003f, 0x003f, 0xe27c, 0xba76, 0xba74, 0xbaa8, 0x003f, 0x003f, - 0xe27a, 0xe277, 0xe278, 0x003f, 0xe2b2, 0x003f, 0xe2b7, 0xe2b5, - 0xba7a, 0xe2b9, 0xba7e, 0xbaa7, 0x003f, 0xe270, 0xe5fa, 0xe279, - 0x003f, 0xba78, 0xbaac, 0xbaa9, 0xba7b, 0xe2a5, 0xe274, 0xbaaa, - 0xe2a7, 0xbaa4, 0xbaa6, 0xba73, 0x003f, 0xe2a9, 0xe2a1, 0xe272, - 0xbaa5, 0xe2b1, 0xe2b4, 0xe27b, 0xe2a8, 0x003f, 0xba79, 0xbcdf, - 0xe2a6, 0xe5f9, 0x003f, 0xe2ad, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe276, 0xe644, - 0xe64e, 0xbce2, 0xe64d, 0xe659, 0xbce4, 0xe64b, 0x003f, 0xe64f, - 0xbcef, 0x003f, 0xe646, 0xbce7, 0x003f, 0xe652, 0xe9f0, 0xbcf3, - 0xbcf2, 0xe654, 0xe643, 0xe65e, 0xbced, 0x003f, 0xbce3, 0xe657, - 0x003f, 0xe65b, 0xe660, 0xe655, 0xe649, 0xbce6, 0xbce9, 0xbcf1, - 0xbcec, 0x003f, 0xe64c, 0xe2a2, 0x003f, 0x003f, 0xe648, 0xe65f, - 0xbce8, 0x003f, 0xbceb, 0xe661, 0xbce0, 0xe656, 0xe5fb, 0xe65c, - 0xc0df, 0x003f, 0xe64a, 0x003f, 0xbce1, 0xe645, 0xbce5, 0xe5fc, - 0xbaab, 0xe641, 0x003f, 0xe65a, 0xe642, 0xe640, 0xbcea, 0x003f, - 0xe658, 0x003f, 0xe5fe, 0xe651, 0xe650, 0xe65d, 0xe647, 0xbcee, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe9f3, 0x003f, - 0xbf49, 0xbefe, 0xea40, 0xe9eb, 0xbf41, 0xe9f7, 0xbf48, 0xbf43, - 0xe9f5, 0xed4f, 0xe9fb, 0xea42, 0xe9fa, 0xe9e9, 0xe9f8, 0xea44, - 0xea46, 0xbefd, 0xea45, 0xbf44, 0xbf4a, 0x003f, 0xbf47, 0x003f, - 0xe9fe, 0xbf46, 0xe9f9, 0x003f, 0xe9ed, 0xe9f2, 0x003f, 0xe9fd, - 0xbf45, 0xbf42, 0xbefc, 0xbf40, 0xe9f1, 0x003f, 0xe5fd, 0xe9ec, - 0xe9ef, 0xea41, 0xe9f4, 0xe9ea, 0xed4e, 0xea43, 0xe9ee, 0xe9fc, - 0x003f, 0x003f, 0x003f, 0x003f, 0xed51, 0xc0e3, 0x003f, 0x003f, - 0xc0d7, 0x003f, 0x003f, 0xc0db, 0xed53, 0xed59, 0xed57, 0xc0d9, - 0xc0da, 0xc0e1, 0xed5a, 0xed52, 0xc0dc, 0x003f, 0xed56, 0xed55, - 0xed5b, 0xc0e2, 0x003f, 0xc0dd, 0xc0e0, 0xed54, 0xc0e4, 0xc0de, - 0xc0e5, 0xc0d8, 0xed58, 0x003f, 0xed50, 0x003f, 0x003f, 0xeff7, - 0x003f, 0x003f, 0xc271, 0xeff4, 0xeff6, 0x003f, 0xc26f, 0xeff2, - /* 0x7000 .. 0x70ff */ - 0xeff3, 0xefee, 0x003f, 0x003f, 0xe9f6, 0xefef, 0xc270, 0xefeb, - 0x003f, 0xc26d, 0xeff8, 0xc26e, 0xefec, 0xefed, 0xeff1, 0xc273, - 0x003f, 0xc272, 0x003f, 0x003f, 0xeff0, 0xc378, 0xf25f, 0xf265, - 0xc379, 0xf25c, 0xc376, 0xc373, 0xf267, 0xc377, 0x003f, 0xc374, - 0xf25e, 0xf261, 0xf262, 0xf263, 0xf266, 0x003f, 0xeff5, 0xf25d, - 0xc375, 0xf264, 0xf268, 0xf260, 0x003f, 0x003f, 0x003f, 0xf45d, - 0xc46a, 0xf460, 0xc46b, 0xf468, 0xf45f, 0xf45c, 0x003f, 0xf45e, - 0xf462, 0xf465, 0xf464, 0xf467, 0xf45b, 0x003f, 0xc469, 0xf463, - 0xf466, 0xf469, 0xf461, 0xf5d3, 0xf5d4, 0xf5d8, 0xf5d9, 0x003f, - 0xf5d6, 0xf5d7, 0xf5d5, 0x003f, 0xc4e9, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc578, 0xf6eb, 0x003f, 0x003f, 0xf6e8, 0xf6e9, 0xf6ea, - 0xc579, 0x003f, 0xf7e5, 0xf7e4, 0x003f, 0xf8af, 0xc5f4, 0xf8ad, - 0xf8b0, 0xf8ae, 0xf8f5, 0xc657, 0xc665, 0xf9a3, 0xf96c, 0x003f, - 0xf9a2, 0xf9d0, 0xf9d1, 0xa4f5, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa6c7, 0xca41, 0x003f, 0x003f, 0xcb5e, 0x003f, 0xa85f, 0x003f, - 0xa862, 0x003f, 0xcb5f, 0x003f, 0xa860, 0xa861, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcd58, 0xcd5a, 0xcd55, 0xcd52, 0xcd54, 0x003f, - 0x003f, 0x003f, 0xaaa4, 0x003f, 0x003f, 0x003f, 0xaaa2, 0x003f, - 0x003f, 0xcd56, 0xaaa3, 0xcd53, 0xcd50, 0xaaa1, 0xcd57, 0x003f, - 0xcd51, 0xaaa5, 0xcd59, 0x003f, 0x003f, 0x003f, 0x003f, 0xcfaf, - 0x003f, 0xcfb3, 0x003f, 0x003f, 0xacb7, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcfb6, 0x003f, 0xacaf, 0xacb2, 0xacb4, 0xacb6, 0xacb3, - 0xcfb2, 0xcfb1, 0x003f, 0xacb1, 0xcfb4, 0xcfb5, 0x003f, 0xcfae, - 0xacb5, 0x003f, 0xacb0, 0x003f, 0x003f, 0x003f, 0xcfb0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd277, 0xd278, 0xd279, - 0xaf50, 0x003f, 0xaf4c, 0xd26e, 0x003f, 0xd276, 0xd27b, 0xaf51, - 0x003f, 0xd26c, 0xd272, 0xd26b, 0xd275, 0x003f, 0x003f, 0xd271, - 0xaf4d, 0xaf4f, 0xd27a, 0x003f, 0xd26a, 0xd26d, 0xd273, 0x003f, - 0xd274, 0xd27c, 0xd270, 0x003f, 0xaf4e, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb26d, - 0xd64e, 0x003f, 0x003f, 0xd650, 0xd64c, 0x003f, 0xd658, 0xd64a, - 0xd657, 0xb269, 0xd648, 0xda5b, 0xd652, 0xb26c, 0x003f, 0xd653, - /* 0x7100 .. 0x71ff */ - 0xd656, 0x003f, 0xd65a, 0x003f, 0xd64f, 0x003f, 0xd654, 0x003f, - 0x003f, 0xb26a, 0xb26b, 0xd659, 0xd64d, 0xd649, 0xd65b, 0x003f, - 0xd651, 0x003f, 0x003f, 0xd655, 0x003f, 0x003f, 0x003f, 0xd64b, - 0x003f, 0xb548, 0xb549, 0xda65, 0xb54f, 0x003f, 0xda59, 0xda62, - 0xda58, 0xb54c, 0xda60, 0xda5e, 0x003f, 0xda5f, 0xb54a, 0x003f, - 0xda63, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xda5c, 0xda5a, - 0xb54b, 0xda5d, 0xda61, 0x003f, 0x003f, 0x003f, 0xb54d, 0x003f, - 0x003f, 0x003f, 0xda64, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xde70, 0xde77, 0xde79, 0xdea1, 0x003f, 0xb7da, 0xde6b, - 0x003f, 0xb7d2, 0x003f, 0xde7a, 0xb7d7, 0xdea2, 0xb7ce, 0x003f, - 0xde7d, 0x003f, 0xde6d, 0xde7e, 0xde6c, 0x003f, 0xb7dc, 0x003f, - 0xde78, 0xb7cf, 0xdea3, 0x003f, 0xb7d4, 0xde71, 0xb7d9, 0xde7c, - 0xde6f, 0xde76, 0xde72, 0xde6e, 0xb7d1, 0xb7d8, 0xb7d6, 0xb7d3, - 0xb7db, 0xb7d0, 0xde75, 0x003f, 0xb7d5, 0x003f, 0xb54e, 0x003f, - 0xde7b, 0x003f, 0xde73, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xde74, 0x003f, 0x003f, 0xe2c1, 0x003f, 0xbab4, 0x003f, 0x003f, - 0xe2bd, 0xe2c3, 0xe2bf, 0x003f, 0xbab6, 0xe2be, 0xe2c2, 0xe2ba, - 0x003f, 0xe2bc, 0xbab5, 0x003f, 0x003f, 0x003f, 0x003f, 0xe2c0, - 0xe2bb, 0x003f, 0xbab7, 0x003f, 0xbab2, 0x003f, 0x003f, 0xe2c4, - 0x003f, 0xbab3, 0xe667, 0xe664, 0xe670, 0xe66a, 0xe66c, 0xbcf4, - 0xe666, 0xe66e, 0x003f, 0x003f, 0xe66d, 0xe66b, 0x003f, 0xe671, - 0xbcf7, 0xe668, 0xe66f, 0x003f, 0xbcf5, 0x003f, 0x003f, 0xe663, - 0xe665, 0xbcf6, 0xe662, 0xe672, 0x003f, 0xe669, 0x003f, 0x003f, - 0xea4a, 0xbf51, 0x003f, 0x003f, 0xea55, 0xea53, 0xbf4b, 0xea49, - 0xea4c, 0xea4d, 0xea48, 0xbf55, 0xbf56, 0xea47, 0xea56, 0xea51, - 0xbf4f, 0xbf4c, 0xea50, 0xea4e, 0x003f, 0x003f, 0xbf52, 0xea52, - 0xbf4d, 0x003f, 0xbf4e, 0x003f, 0xea4f, 0xbf50, 0xea4b, 0x003f, - 0xea54, 0xbf53, 0xea57, 0xea58, 0xbf54, 0x003f, 0x003f, 0xc0e7, - 0xc0ee, 0xed5c, 0xed62, 0x003f, 0xed60, 0xc0ea, 0xc0e9, 0xc0e6, - 0xed5e, 0x003f, 0x003f, 0x003f, 0xc0ec, 0xc0eb, 0xc0e8, 0x003f, - 0xed61, 0xed5d, 0xed5f, 0x003f, 0xc0ed, 0x003f, 0x003f, 0x003f, - 0xc277, 0xeffb, 0x003f, 0xc274, 0xc275, 0xeffd, 0xc276, 0xeffa, - /* 0x7200 .. 0x72ff */ - 0x003f, 0xeff9, 0xf26c, 0xeffc, 0x003f, 0xf26d, 0xc37a, 0xf26b, - 0x003f, 0x003f, 0xf26a, 0x003f, 0xf269, 0xc37b, 0x003f, 0x003f, - 0xc46c, 0x003f, 0x003f, 0xf46a, 0xf46b, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf5dc, 0xf5db, 0xc4ea, 0x003f, 0xf5da, 0xf6ec, 0xf6ed, - 0x003f, 0x003f, 0xf7e6, 0xf8b1, 0x003f, 0x003f, 0xf8f6, 0xf9bc, - 0xc679, 0xf9c6, 0xa4f6, 0x003f, 0xaaa6, 0xaaa7, 0x003f, 0x003f, - 0xacb8, 0x003f, 0x003f, 0x003f, 0x003f, 0xc0ef, 0xa4f7, 0x003f, - 0xaaa8, 0xaf52, 0xb7dd, 0xa4f8, 0x003f, 0xb26e, 0xbab8, 0xc962, - 0x003f, 0xcfb7, 0xd27d, 0x003f, 0xe2c5, 0x003f, 0xc0f0, 0xa4f9, - 0xaaa9, 0xcfb8, 0xcfb9, 0xda66, 0xb550, 0x003f, 0x003f, 0xdea4, - 0x003f, 0x003f, 0xb7de, 0xe2c6, 0x003f, 0x003f, 0xbcf8, 0x003f, - 0xc37c, 0xa4fa, 0xda67, 0xa4fb, 0x003f, 0xa6c9, 0xca42, 0xa6c8, - 0xa865, 0xa864, 0xa863, 0xcb60, 0x003f, 0x003f, 0x003f, 0xaaaa, - 0x003f, 0xaaab, 0xcd5b, 0x003f, 0xcfba, 0x003f, 0xcfbd, 0xacba, - 0xcfbb, 0x003f, 0xacb9, 0xcfbc, 0xacbb, 0x003f, 0xd2a2, 0xd2a1, - 0xd27e, 0xaf53, 0x003f, 0xd65d, 0xd65e, 0xb26f, 0xd65c, 0xd65f, - 0xb552, 0xb270, 0x003f, 0x003f, 0xb551, 0xda6b, 0xda6a, 0x003f, - 0xda68, 0xda69, 0x003f, 0xda6c, 0xdea6, 0xdea5, 0xdea9, 0x003f, - 0xdea8, 0xdea7, 0xbab9, 0xe2c9, 0x003f, 0xe2c8, 0xbaba, 0xe2c7, - 0xe673, 0x003f, 0xe674, 0xbcf9, 0x003f, 0xea59, 0xea5a, 0x003f, - 0x003f, 0xf272, 0xc37d, 0xf271, 0xf270, 0xf26e, 0xf26f, 0xc4eb, - 0xf46c, 0xf6ee, 0xf8f7, 0x003f, 0xa4fc, 0x003f, 0xc9a5, 0xa5c7, - 0xc9a6, 0x003f, 0x003f, 0x003f, 0xca43, 0xca44, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcb66, 0x003f, 0x003f, 0xcb62, 0x003f, 0xcb61, - 0xaaac, 0xcb65, 0xa867, 0xcb63, 0xa866, 0xcb67, 0xcb64, 0x003f, - 0x003f, 0xcd5f, 0xcfbe, 0xcd5d, 0xcd64, 0x003f, 0xaaad, 0x003f, - 0xaab0, 0xcd65, 0xcd61, 0x003f, 0xcd62, 0x003f, 0xcd5c, 0xaaaf, - 0xcd5e, 0xaaae, 0xcd63, 0x003f, 0xcd60, 0x003f, 0x003f, 0xcfc2, - 0xacbd, 0xacbe, 0x003f, 0xcfc5, 0xcfbf, 0x003f, 0xcfc4, 0x003f, - 0xcfc0, 0xacbc, 0xcfc3, 0xcfc1, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd2a8, 0xd2a5, 0x003f, 0xd2a7, 0xaf58, - 0xaf57, 0xaf55, 0xd2a4, 0xd2a9, 0xaf54, 0xaf56, 0xd2a6, 0xd667, - /* 0x7300 .. 0x73ff */ - 0xd2a3, 0xd2aa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd662, - 0xd666, 0x003f, 0xd665, 0xda6e, 0xda79, 0x003f, 0x003f, 0xd668, - 0x003f, 0xd663, 0xda6d, 0xb274, 0x003f, 0x003f, 0xb273, 0xd661, - 0xd664, 0xb275, 0x003f, 0xb272, 0xb271, 0xd660, 0xd669, 0x003f, - 0x003f, 0x003f, 0xda70, 0xda77, 0x003f, 0xb554, 0xda76, 0xda73, - 0x003f, 0xb556, 0x003f, 0x003f, 0x003f, 0xda75, 0x003f, 0x003f, - 0xda6f, 0xda71, 0xda74, 0xda72, 0xb555, 0xda78, 0xb553, 0xb7df, - 0x003f, 0x003f, 0xdead, 0xdeac, 0xdeaa, 0x003f, 0xb7e2, 0xb7e1, - 0xdeae, 0x003f, 0xdeab, 0xe2ca, 0xbabb, 0xb7e0, 0x003f, 0x003f, - 0x003f, 0xdeb0, 0xdeaf, 0x003f, 0xe2cd, 0xe2cb, 0xbcfa, 0x003f, - 0xbabc, 0xe2cc, 0xe676, 0x003f, 0x003f, 0x003f, 0x003f, 0xbcfb, - 0xe675, 0xe67e, 0xe67d, 0xe67b, 0x003f, 0xe67a, 0xe677, 0xe678, - 0xe679, 0xe67c, 0xe6a1, 0x003f, 0x003f, 0xea5f, 0xea5c, 0xea5d, - 0xbf57, 0xea5b, 0xea61, 0xea60, 0xea5e, 0x003f, 0xed64, 0xed65, - 0xc0f1, 0x003f, 0xc0f2, 0xed63, 0x003f, 0xc279, 0xeffe, 0xc278, - 0xc37e, 0x003f, 0xc3a1, 0xc46d, 0xf46e, 0xf46d, 0xf5dd, 0xf6ef, - 0xc57a, 0xf7e8, 0xf7e7, 0xf7e9, 0xa5c8, 0xcfc6, 0xaf59, 0xb276, - 0xd66a, 0xa5c9, 0xc9a7, 0xa4fd, 0x003f, 0x003f, 0xca45, 0x003f, - 0x003f, 0x003f, 0xcb6c, 0xcb6a, 0xcb6b, 0xcb68, 0xa868, 0xcb69, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcd6d, 0x003f, 0xaab3, - 0xcd6b, 0xcd67, 0xcd6a, 0x003f, 0xcd66, 0xaab5, 0xcd69, 0x003f, - 0xaab2, 0xaab1, 0x003f, 0xaab4, 0xcd6c, 0xcd68, 0x003f, 0x003f, - 0x003f, 0x003f, 0xacc2, 0xacc5, 0xcfce, 0xcfcd, 0xcfcc, 0xacbf, - 0xcfd5, 0xcfcb, 0x003f, 0xacc1, 0xd2af, 0x003f, 0xcfd2, 0xcfd0, - 0xacc4, 0x003f, 0xcfc8, 0xcfd3, 0x003f, 0xcfca, 0xcfd4, 0xcfd1, - 0xcfc9, 0x003f, 0xacc0, 0xcfd6, 0xcfc7, 0xacc3, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd2b4, 0xd2ab, 0xd2b6, 0x003f, 0xd2ae, 0xd2b9, - 0xd2ba, 0xd2ac, 0xd2b8, 0xd2b5, 0xd2b3, 0xd2b7, 0xaf5f, 0x003f, - 0xaf5d, 0x003f, 0x003f, 0xd2b1, 0x003f, 0xd2ad, 0x003f, 0xd2b0, - 0xd2bb, 0xd2b2, 0xaf5e, 0xcfcf, 0x003f, 0xaf5a, 0xaf5c, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd678, 0xd66d, 0xd66b, 0x003f, - 0xd66c, 0x003f, 0xd673, 0x003f, 0xd674, 0xd670, 0xb27b, 0xd675, - /* 0x7400 .. 0x74ff */ - 0xd672, 0xd66f, 0x003f, 0xb279, 0xd66e, 0xb277, 0xb27a, 0xd671, - 0xd679, 0xaf5b, 0xb278, 0xd677, 0xd676, 0xb27c, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xda7e, 0x003f, - 0x003f, 0x003f, 0xdaa1, 0xb560, 0x003f, 0xdaa7, 0x003f, 0x003f, - 0xdaa9, 0xdaa2, 0xb55a, 0xdaa6, 0xdaa5, 0xb55b, 0xb561, 0x003f, - 0xb562, 0xdaa8, 0xb558, 0xda7d, 0xda7b, 0xdaa3, 0xda7a, 0xb55f, - 0xda7c, 0xdaa4, 0xdaaa, 0xb559, 0xb55e, 0xb55c, 0xb55d, 0x003f, - 0x003f, 0x003f, 0xb557, 0x003f, 0x003f, 0x003f, 0x003f, 0xb7e9, - 0xdeb7, 0xb7e8, 0xdebb, 0x003f, 0xdeb1, 0x003f, 0xdebc, 0x003f, - 0x003f, 0x003f, 0xdeb2, 0xdeb3, 0x003f, 0xdebd, 0xdeba, 0xdeb8, - 0xdeb9, 0xdeb5, 0xdeb4, 0x003f, 0xdebe, 0xb7e5, 0x003f, 0xdeb6, - 0x003f, 0xb7ea, 0xb7e4, 0xb7eb, 0xb7ec, 0x003f, 0xb7e7, 0xb7e6, - 0x003f, 0x003f, 0xe2ce, 0xbabe, 0xbabd, 0x003f, 0x003f, 0xe2d3, - 0x003f, 0xbcfc, 0xbabf, 0x003f, 0x003f, 0xbac1, 0xe2d4, 0xb7e3, - 0xbac0, 0xe2d0, 0xe2d2, 0xe2cf, 0x003f, 0xe2d1, 0x003f, 0x003f, - 0x003f, 0xe6ab, 0x003f, 0x003f, 0xe6aa, 0xe6a7, 0xbd40, 0xea62, - 0xbd41, 0xe6a6, 0x003f, 0xbcfe, 0x003f, 0xe6a8, 0xe6a5, 0xe6a2, - 0xe6a9, 0xe6a3, 0xe6a4, 0xbcfd, 0x003f, 0x003f, 0x003f, 0x003f, - 0xed69, 0x003f, 0xea66, 0x003f, 0xea65, 0xea67, 0x003f, 0xed66, - 0xbf5a, 0x003f, 0xea63, 0x003f, 0xbf58, 0x003f, 0xbf5c, 0xbf5b, - 0xea64, 0xea68, 0x003f, 0xbf59, 0x003f, 0xed6d, 0xc0f5, 0xc27a, - 0xc0f6, 0xc0f3, 0xed6a, 0xed68, 0x003f, 0xed6b, 0x003f, 0xed6e, - 0xc0f4, 0xed6c, 0xed67, 0x003f, 0x003f, 0xf042, 0xf045, 0xf275, - 0xf040, 0x003f, 0xf46f, 0xf046, 0x003f, 0xc3a2, 0xf044, 0xc27b, - 0xf041, 0xf043, 0xf047, 0xf276, 0x003f, 0xf274, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc3a3, 0xf273, 0x003f, 0x003f, 0x003f, 0xc46e, - 0x003f, 0x003f, 0x003f, 0x003f, 0xc4ed, 0xf6f1, 0xc4ec, 0xf6f3, - 0xf6f0, 0xf6f2, 0xc5d0, 0xf8b2, 0xa5ca, 0xcd6e, 0xd2bc, 0xd2bd, - 0xb27d, 0xdebf, 0xbf5d, 0xc3a4, 0xc57b, 0xf8b3, 0xa5cb, 0x003f, - 0xcd6f, 0xa260, 0x003f, 0x003f, 0xcfd7, 0x003f, 0xcfd8, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd2be, 0xd2bf, 0xb27e, 0xb2a1, - 0x003f, 0x003f, 0x003f, 0xdaab, 0x003f, 0xdec2, 0xdec1, 0xdec0, - /* 0x7500 .. 0x75ff */ - 0xe2d5, 0x003f, 0xe2d6, 0xe2d7, 0xbac2, 0x003f, 0x003f, 0xe6ad, - 0xe6ac, 0x003f, 0x003f, 0xea69, 0xbf5e, 0xbf5f, 0x003f, 0xed72, - 0xed6f, 0xed70, 0xed71, 0xf049, 0xf048, 0xc27c, 0xf277, 0xf5de, - 0xa5cc, 0x003f, 0xacc6, 0x003f, 0xb2a2, 0xdec3, 0x003f, 0xa5cd, - 0x003f, 0xd2c0, 0xb2a3, 0x003f, 0x003f, 0xb563, 0xb564, 0x003f, - 0xa5ce, 0xa5cf, 0xca46, 0xa86a, 0xa869, 0xacc7, 0xcfd9, 0xdaac, - 0xa5d0, 0xa5d1, 0xa5d2, 0xa5d3, 0x003f, 0x003f, 0x003f, 0xa86b, - 0xa86c, 0xcb6e, 0xcb6d, 0x003f, 0x003f, 0xaab6, 0xcd72, 0xcd70, - 0xcd71, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcfda, - 0xcfdb, 0x003f, 0x003f, 0xaccb, 0xacc9, 0x003f, 0xacca, 0xacc8, - 0x003f, 0x003f, 0x003f, 0x003f, 0xaf60, 0x003f, 0x003f, 0x003f, - 0x003f, 0xaf64, 0xaf63, 0xd2c1, 0xaf62, 0xaf61, 0x003f, 0xd2c2, - 0x003f, 0x003f, 0xb2a6, 0xd67b, 0xd67a, 0xb2a4, 0xb2a5, 0x003f, - 0x003f, 0x003f, 0xb566, 0xb565, 0xdaae, 0x003f, 0x003f, 0xdaad, - 0xb2a7, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb7ed, 0xdec5, - 0xb7ee, 0xdec4, 0x003f, 0x003f, 0x003f, 0xe2d8, 0xe6ae, 0xbd42, - 0xea6a, 0x003f, 0x003f, 0x003f, 0xed73, 0x003f, 0xc3a6, 0xc3a5, - 0x003f, 0x003f, 0xc57c, 0xa5d4, 0xcd73, 0x003f, 0x003f, 0xb2a8, - 0xe2d9, 0xbac3, 0x003f, 0x003f, 0xcb6f, 0xcb70, 0x003f, 0x003f, - 0xcd74, 0xaab8, 0xaab9, 0x003f, 0x003f, 0xaab7, 0x003f, 0x003f, - 0x003f, 0x003f, 0xaccf, 0xacd0, 0xaccd, 0xacce, 0x003f, 0xcfdc, - 0x003f, 0x003f, 0xcfdd, 0xaccc, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd2c3, 0x003f, 0xaf68, 0xaf69, 0x003f, 0xb2ab, 0xd2c9, 0x003f, - 0xaf6e, 0xaf6c, 0xd2ca, 0xd2c5, 0xaf6b, 0xaf6a, 0xaf65, 0xd2c8, - 0xd2c7, 0xd2c4, 0xaf6d, 0x003f, 0xd2c6, 0xaf66, 0x003f, 0xaf67, - 0x003f, 0x003f, 0xb2ac, 0xd6a1, 0xd6a2, 0xb2ad, 0xd67c, 0xd67e, - 0xd6a4, 0xd6a3, 0xd67d, 0x003f, 0xb2a9, 0xb2aa, 0x003f, 0xdab6, - 0xb56b, 0xb56a, 0xdab0, 0xb568, 0x003f, 0xdab3, 0xb56c, 0xdab4, - 0xb56d, 0xdab1, 0xb567, 0xb569, 0xdab5, 0x003f, 0xdab2, 0xdaaf, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xded2, 0x003f, 0xdec7, - 0xb7f0, 0xb7f3, 0xb7f2, 0xb7f7, 0xb7f6, 0xded3, 0xded1, 0xdeca, - 0xdece, 0xdecd, 0xb7f4, 0xded0, 0xdecc, 0xded4, 0xdecb, 0xb7f5, - /* 0x7600 .. 0x76ff */ - 0xb7ef, 0xb7f1, 0x003f, 0xdec9, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe2db, 0xbac7, 0xe2df, 0xbac6, 0xe2dc, 0xbac5, 0x003f, 0xdec8, - 0xdecf, 0xe2de, 0x003f, 0xbac8, 0xe2e0, 0xe2dd, 0xe2da, 0x003f, - 0x003f, 0xe6b1, 0xe6b5, 0xe6b7, 0xe6b3, 0xe6b2, 0xe6b0, 0xbd45, - 0xbd43, 0xbd48, 0xbd49, 0xe6b4, 0xbd46, 0xe6af, 0xbd47, 0xbac4, - 0xe6b6, 0xbd44, 0x003f, 0x003f, 0x003f, 0xea6c, 0x003f, 0xea6b, - 0xea73, 0xea6d, 0xea72, 0xea6f, 0xbf60, 0xea71, 0x003f, 0x003f, - 0xbf61, 0x003f, 0xbf62, 0x003f, 0xea70, 0xea6e, 0x003f, 0x003f, - 0x003f, 0x003f, 0xc0f8, 0xed74, 0x003f, 0x003f, 0xc0f7, 0xed77, - 0xed75, 0xed76, 0x003f, 0x003f, 0xc0f9, 0x003f, 0x003f, 0x003f, - 0xf04d, 0x003f, 0xc2a1, 0xf04e, 0x003f, 0x003f, 0xc27d, 0xf04f, - 0xc27e, 0xf04c, 0xf050, 0x003f, 0xf04a, 0x003f, 0x003f, 0xc3a7, - 0xf278, 0xc3a8, 0xc46f, 0x003f, 0xf04b, 0xc470, 0x003f, 0x003f, - 0x003f, 0xc4ee, 0xf5df, 0x003f, 0xc57e, 0xf6f4, 0xc57d, 0x003f, - 0xf7ea, 0xc5f5, 0xc5f6, 0x003f, 0x003f, 0xf9cc, 0x003f, 0x003f, - 0xacd1, 0xcfde, 0x003f, 0xb56e, 0xb56f, 0xa5d5, 0xa6ca, 0xca47, - 0x003f, 0xcb71, 0xa86d, 0x003f, 0xaaba, 0x003f, 0xacd2, 0xacd3, - 0xacd4, 0xd6a6, 0xd2cb, 0xaf6f, 0x003f, 0x003f, 0xb2ae, 0xd6a5, - 0x003f, 0x003f, 0xdab8, 0xb571, 0x003f, 0xdab7, 0xb570, 0x003f, - 0x003f, 0xded5, 0xbd4a, 0xe6bb, 0xe6b8, 0xe6b9, 0xe6ba, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xed78, 0x003f, 0xf051, 0x003f, - 0x003f, 0x003f, 0xf471, 0xf470, 0x003f, 0xf6f5, 0xa5d6, 0xcd75, - 0xaf70, 0x003f, 0x003f, 0x003f, 0xb572, 0xded6, 0x003f, 0x003f, - 0xe2e1, 0x003f, 0xbd4b, 0xea74, 0x003f, 0xf052, 0xf472, 0xa5d7, - 0x003f, 0x003f, 0xaabb, 0xacd7, 0xcfdf, 0xacd8, 0xacd6, 0x003f, - 0xacd5, 0xd2cc, 0xaf71, 0x003f, 0x003f, 0xaf72, 0xaf73, 0x003f, - 0x003f, 0x003f, 0xb2b0, 0xd6a7, 0xb2af, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xdab9, 0xb2b1, 0xb573, 0xded7, 0xb7f8, 0xb7f9, - 0x003f, 0xbac9, 0x003f, 0xbaca, 0xbd4c, 0xbf64, 0xea75, 0xbf63, - 0x003f, 0xed79, 0xc0fa, 0x003f, 0xf053, 0xf473, 0xa5d8, 0xa86e, - 0xcd78, 0xcd77, 0xaabc, 0xcd76, 0xaabd, 0xcd79, 0x003f, 0xcfe5, - 0xacdb, 0xacda, 0xcfe7, 0xcfe6, 0xacdf, 0x003f, 0xacde, 0x003f, - /* 0x7700 .. 0x77ff */ - 0x003f, 0xacd9, 0x003f, 0xcfe1, 0xcfe2, 0xcfe3, 0x003f, 0xace0, - 0xcfe0, 0xacdc, 0xcfe4, 0xacdd, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd2cf, 0xd2d3, 0xd2d1, 0xd2d0, 0x003f, 0xd2d4, 0x003f, 0x003f, - 0x003f, 0xd2d5, 0xd2d6, 0xd2ce, 0x003f, 0xd2cd, 0x003f, 0xaf75, - 0xaf76, 0x003f, 0xd2d7, 0xd2d2, 0x003f, 0xd6b0, 0x003f, 0xd2d8, - 0xaf77, 0xaf74, 0x003f, 0x003f, 0x003f, 0xd6aa, 0x003f, 0xd6a9, - 0x003f, 0xd6ab, 0xd6ac, 0xd6ae, 0xd6ad, 0xd6b2, 0xb2b5, 0xb2b2, - 0xb2b6, 0xd6a8, 0xb2b7, 0xd6b1, 0xb2b4, 0xd6af, 0xb2b3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdabc, 0xdabe, 0xdaba, 0xdabb, - 0x003f, 0x003f, 0xdabf, 0xdac1, 0xdac2, 0xdabd, 0xdac0, 0xb574, - 0x003f, 0x003f, 0xdedb, 0x003f, 0xdee0, 0xded8, 0xdedc, 0x003f, - 0x003f, 0xdee1, 0xdedd, 0xb7fa, 0xb843, 0x003f, 0xb7fd, 0xded9, - 0xdeda, 0xbace, 0xb846, 0xb7fe, 0x003f, 0xb844, 0xb7fc, 0xdedf, - 0xb845, 0xdede, 0xb841, 0xb7fb, 0xb842, 0xdee2, 0xe2e6, 0xe2e8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb840, 0x003f, 0x003f, 0xe2e3, 0xbacc, 0xe2e9, 0xbacd, - 0xe2e7, 0xe2e2, 0xe2e5, 0xe2ea, 0xbacb, 0xe2e4, 0x003f, 0xbd4e, - 0xe6bf, 0xe6be, 0x003f, 0xbd51, 0xbd4f, 0xe6bc, 0xbd4d, 0xe6bd, - 0x003f, 0xbd50, 0x003f, 0x003f, 0x003f, 0xea7d, 0x003f, 0xeaa1, - 0x003f, 0xea7e, 0xea76, 0xea7a, 0xea79, 0xea77, 0xbf66, 0xbf67, - 0xbf65, 0xea78, 0xea7b, 0xea7c, 0x003f, 0xbf68, 0x003f, 0xc140, - 0xeda3, 0x003f, 0xc0fc, 0xed7b, 0xc0fe, 0xc141, 0x003f, 0x003f, - 0xc0fd, 0xeda2, 0xed7c, 0xc0fb, 0xeda1, 0xed7a, 0xed7e, 0xed7d, - 0x003f, 0x003f, 0xf055, 0xc2a4, 0xc2a5, 0xc2a2, 0x003f, 0xc2a3, - 0x003f, 0x003f, 0xf054, 0x003f, 0xf27b, 0x003f, 0x003f, 0xc3a9, - 0x003f, 0xf279, 0xf27a, 0x003f, 0xf474, 0xf477, 0xf475, 0xf476, - 0xf5e0, 0x003f, 0x003f, 0xc4ef, 0xf7eb, 0xf8b4, 0x003f, 0xc5f7, - 0xf8f8, 0xf8f9, 0xc666, 0xa5d9, 0xace1, 0x003f, 0xdac3, 0x003f, - 0xdee3, 0x003f, 0xa5da, 0xa86f, 0x003f, 0xaabe, 0x003f, 0xcfe8, - 0xcfe9, 0xaf78, 0x003f, 0x003f, 0xdac4, 0xb575, 0xb847, 0xc142, - 0xeda4, 0xf27c, 0xf478, 0xa5db, 0x003f, 0x003f, 0x003f, 0xcda1, - 0xcd7a, 0xcd7c, 0xcd7e, 0xcd7d, 0xcd7b, 0xaabf, 0x003f, 0x003f, - /* 0x7800 .. 0x78ff */ - 0x003f, 0x003f, 0xace2, 0xcff2, 0x003f, 0xcfed, 0xcfea, 0x003f, - 0x003f, 0xcff1, 0x003f, 0x003f, 0xace4, 0xace5, 0xcff0, 0xcfef, - 0xcfee, 0xcfeb, 0xcfec, 0xcff3, 0xace3, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xaf7c, 0x003f, 0xafa4, - 0xafa3, 0xd2e1, 0xd2db, 0xd2d9, 0x003f, 0xafa1, 0xd6b9, 0xaf7a, - 0xd2de, 0xd2e2, 0xd2e4, 0xd2e0, 0xd2da, 0xafa2, 0xd2df, 0xd2dd, - 0xaf79, 0xd2e5, 0xafa5, 0xd2e3, 0xaf7d, 0xd2dc, 0x003f, 0xaf7e, - 0xaf7b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb2b9, 0x003f, 0xd6ba, 0x003f, 0x003f, - 0xd6b3, 0xd6b5, 0xd6b7, 0x003f, 0xd6b8, 0xd6b6, 0xb2ba, 0x003f, - 0xd6bb, 0x003f, 0xd6b4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xdac8, 0xb576, 0xdad0, 0x003f, - 0xdac5, 0x003f, 0xdad1, 0x003f, 0xdac6, 0xdac7, 0x003f, 0x003f, - 0xdacf, 0xdace, 0xdacb, 0xb2b8, 0xb577, 0xdac9, 0xdacc, 0xb578, - 0xdacd, 0xdaca, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdeee, 0x003f, 0xdef2, 0xb84e, 0x003f, 0xe2f0, 0xb851, - 0xdef0, 0xf9d6, 0x003f, 0xdeed, 0xdee8, 0xdeea, 0xdeeb, 0xdee4, - 0x003f, 0xb84d, 0x003f, 0x003f, 0xb84c, 0x003f, 0xb848, 0xdee7, - 0x003f, 0xb84f, 0x003f, 0xb850, 0xdee6, 0xdee9, 0xdef1, 0xb84a, - 0xb84b, 0xdeef, 0xdee5, 0x003f, 0x003f, 0x003f, 0xe2f2, 0xbad0, - 0xe2f4, 0xdeec, 0xe2f6, 0xbad4, 0xe2f7, 0xe2f3, 0x003f, 0xbad1, - 0xe2ef, 0xbad3, 0xe2ec, 0xe2f1, 0xe2f5, 0xe2ee, 0x003f, 0x003f, - 0xb849, 0x003f, 0xe2eb, 0xbad2, 0xe2ed, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xbd54, 0xe6c1, 0xbd58, 0x003f, 0xbd56, 0x003f, - 0x003f, 0xbacf, 0x003f, 0xe6c8, 0xe6c9, 0xbd53, 0x003f, 0x003f, - 0xe6c7, 0xe6ca, 0xbd55, 0xbd52, 0xe6c3, 0xe6c0, 0xe6c5, 0xe6c2, - 0xbd59, 0xe6c4, 0x003f, 0x003f, 0xe6c6, 0xbd57, 0x003f, 0x003f, - 0x003f, 0x003f, 0xbf6a, 0xeaa8, 0x003f, 0xeaa2, 0xeaa6, 0xeaac, - 0xeaad, 0xeaa9, 0xeaaa, 0xeaa7, 0x003f, 0xeaa4, 0x003f, 0xbf6c, - 0xbf69, 0xeaa3, 0xeaa5, 0x003f, 0xbf6b, 0xeaab, 0x003f, 0xc146, - 0x003f, 0x003f, 0xedaa, 0xeda5, 0xc145, 0x003f, 0x003f, 0xc143, - 0x003f, 0xedac, 0xc144, 0xeda8, 0xeda9, 0xeda6, 0xedad, 0xf056, - /* 0x7900 .. 0x79ff */ - 0x003f, 0xc147, 0xeda7, 0x003f, 0xedae, 0xedab, 0x003f, 0x003f, - 0x003f, 0xf05a, 0x003f, 0x003f, 0xf057, 0x003f, 0xc2a6, 0x003f, - 0xf05b, 0xf05d, 0xf05c, 0xf058, 0xf059, 0x003f, 0x003f, 0xf2a3, - 0x003f, 0xc3aa, 0x003f, 0xf27e, 0xf2a2, 0xf27d, 0xf2a4, 0x003f, - 0x003f, 0xf2a1, 0x003f, 0xf47a, 0xf47d, 0xf479, 0xc471, 0xf47b, - 0xf47c, 0xf47e, 0xc472, 0xc474, 0xc473, 0xf5e1, 0x003f, 0xf5e3, - 0x003f, 0xf5e2, 0x003f, 0x003f, 0x003f, 0xf6f6, 0x003f, 0x003f, - 0xf8b5, 0xf8fa, 0xa5dc, 0x003f, 0x003f, 0xcb72, 0xaac0, 0xcda3, - 0xaac1, 0xaac2, 0xcda2, 0x003f, 0xcff8, 0xcff7, 0xace6, 0xace9, - 0xace8, 0xace7, 0xcff4, 0xcff6, 0xcff5, 0x003f, 0x003f, 0xd2e8, - 0xafa7, 0xd2ec, 0xd2eb, 0xd2ea, 0xd2e6, 0xafa6, 0xafaa, 0xafad, - 0x003f, 0x003f, 0xafae, 0xd2e7, 0xd2e9, 0xafac, 0xafab, 0xafa9, - 0xafa8, 0xd6c2, 0x003f, 0xd6c0, 0xd6bc, 0xb2bb, 0x003f, 0xd6bd, - 0xb2bc, 0xd6be, 0xd6bf, 0xd6c1, 0x003f, 0xb2bd, 0x003f, 0x003f, - 0xdad5, 0x003f, 0xdad4, 0xdad3, 0xdad2, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdef6, 0xb852, 0x003f, 0xdef3, 0xdef5, 0x003f, 0xb853, - 0x003f, 0xb854, 0xdef4, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe341, 0x003f, 0xe2f9, 0xe2fa, 0x003f, 0xbad7, 0xbad5, 0xbad6, - 0xe343, 0x003f, 0xe342, 0xe2fe, 0xe2fd, 0xe2fc, 0xe2fb, 0xe340, - 0xe2f8, 0x003f, 0xe6cb, 0xe6d0, 0xe6ce, 0x003f, 0x003f, 0x003f, - 0xe6cd, 0xe6cc, 0xe6cf, 0x003f, 0xeaae, 0x003f, 0xbf6d, 0xc148, - 0xedb0, 0x003f, 0xc149, 0xedaf, 0xf05f, 0xf05e, 0xc2a7, 0x003f, - 0xf2a5, 0xc3ab, 0xf4a1, 0xc5a1, 0xf6f7, 0x003f, 0xf8b7, 0xf8b6, - 0xc9a8, 0xacea, 0xaceb, 0xd6c3, 0x003f, 0xb856, 0xa5dd, 0xa872, - 0xa871, 0xa870, 0x003f, 0x003f, 0x003f, 0xcda4, 0x003f, 0x003f, - 0xaac4, 0xaac3, 0x003f, 0xacee, 0x003f, 0xcffa, 0xcffd, 0xcffb, - 0x003f, 0xacec, 0xaced, 0x003f, 0x003f, 0xcff9, 0xcffc, 0x003f, - 0xafb5, 0x003f, 0x003f, 0x003f, 0xd2f3, 0xd2f5, 0xd2f4, 0xafb2, - 0xd2ef, 0x003f, 0x003f, 0xafb0, 0xafaf, 0x003f, 0xafb3, 0xafb1, - 0x003f, 0xafb4, 0xd2f2, 0xd2ed, 0xd2ee, 0xd2f1, 0xd2f0, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd6c6, 0xd6c7, - 0xd6c5, 0x003f, 0xd6c4, 0xb2be, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7a00 .. 0x7aff */ - 0xb57d, 0x003f, 0xdad6, 0xdad8, 0xdada, 0xb57c, 0x003f, 0x003f, - 0xb57a, 0x003f, 0xdad7, 0xb57b, 0xdad9, 0xb579, 0x003f, 0x003f, - 0xdf41, 0xdef7, 0xdefa, 0xdefe, 0xb85a, 0xdefc, 0x003f, 0xdefb, - 0xdef8, 0xdef9, 0xb858, 0xdf40, 0xb857, 0x003f, 0xb85c, 0xb85b, - 0xb859, 0x003f, 0xdefd, 0x003f, 0x003f, 0x003f, 0xe349, 0x003f, - 0xe348, 0x003f, 0x003f, 0xe344, 0x003f, 0x003f, 0xbad8, 0xe347, - 0xe346, 0xbad9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xbd5e, - 0x003f, 0xe6d2, 0x003f, 0xbd5f, 0xbd5b, 0xbd5d, 0x003f, 0xbd5a, - 0xbd5c, 0x003f, 0x003f, 0x003f, 0xeaaf, 0x003f, 0xbf70, 0xeab1, - 0xeab0, 0x003f, 0xe345, 0xbf72, 0xbf71, 0xbf6e, 0xbf6f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xedb5, 0x003f, 0xedb3, 0xc14a, - 0xedb4, 0x003f, 0xedb6, 0xedb2, 0xedb1, 0x003f, 0x003f, 0xf060, - 0xc2aa, 0xc2a8, 0xc2a9, 0x003f, 0x003f, 0x003f, 0x003f, 0xf2a6, - 0xf2a7, 0xc3ad, 0x003f, 0xc3ac, 0xf4a3, 0xf4a4, 0xf4a2, 0x003f, - 0xf6f8, 0xf6f9, 0x003f, 0x003f, 0xa5de, 0xca48, 0xa873, 0x003f, - 0xcda5, 0xaac6, 0xaac5, 0xcda6, 0x003f, 0x003f, 0xd040, 0xacef, - 0xcffe, 0xacf0, 0x003f, 0x003f, 0xafb6, 0xd2f8, 0xd2f6, 0xd2fc, - 0xafb7, 0xd2f7, 0xd2fb, 0xd2f9, 0xd2fa, 0x003f, 0x003f, 0xd6c8, - 0xd6ca, 0x003f, 0xb2bf, 0x003f, 0xd6c9, 0xb2c0, 0xb5a2, 0xb5a1, - 0xb57e, 0xdadb, 0x003f, 0x003f, 0x003f, 0x003f, 0xdf44, 0xb85d, - 0xb85e, 0x003f, 0xdf43, 0xdf42, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe34a, 0xbadb, 0xbada, 0xe34b, 0xe34c, 0x003f, 0xbd61, 0xbd60, - 0x003f, 0xeab5, 0xe6d3, 0xe6d5, 0xe6d4, 0xeab4, 0xeab2, 0xeab6, - 0xeab3, 0x003f, 0xbf73, 0x003f, 0x003f, 0x003f, 0xedb7, 0xc14b, - 0xedb8, 0xedb9, 0x003f, 0x003f, 0xc2ab, 0xc2ac, 0x003f, 0xc475, - 0x003f, 0x003f, 0xc5d1, 0xa5df, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xd041, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd2fd, 0xafb8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb3ba, - 0xb3b9, 0x003f, 0x003f, 0xb5a4, 0xdadd, 0xb5a3, 0xdadc, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdf45, 0x003f, 0xbadc, 0xe34d, 0xbadd, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc476, 0xf4a5, - 0x003f, 0xa6cb, 0xaac7, 0xcda7, 0x003f, 0xacf2, 0x003f, 0xacf1, - /* 0x7b00 .. 0x7bff */ - 0xd042, 0xd043, 0x003f, 0x003f, 0xd340, 0xd342, 0xafb9, 0x003f, - 0xd344, 0xd347, 0xd345, 0x003f, 0x003f, 0x003f, 0xd346, 0xd343, - 0xd2fe, 0xafba, 0xd348, 0xd341, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd6d3, 0xb2c6, 0xd6dc, 0xb2c3, 0x003f, 0xd6d5, 0xb2c7, 0x003f, - 0xb2c1, 0x003f, 0xd6d0, 0xd6dd, 0xd6d1, 0xd6ce, 0xb2c5, 0x003f, - 0xb2c2, 0x003f, 0xd6d4, 0xd6d7, 0xb2c4, 0xd6d8, 0xb2c8, 0xd6d9, - 0xd6cf, 0xd6d6, 0xd6da, 0xd6d2, 0xd6cd, 0xd6cb, 0x003f, 0x003f, - 0xd6db, 0x003f, 0x003f, 0xdadf, 0x003f, 0x003f, 0x003f, 0x003f, - 0xdae4, 0x003f, 0x003f, 0x003f, 0xdae0, 0xdae6, 0xb5a7, 0xd6cc, - 0xdae1, 0xb5a5, 0xdade, 0xb5ac, 0xdae2, 0xb5ab, 0xdae3, 0xb5ad, - 0xb5a8, 0xb5ae, 0xb5a9, 0x003f, 0xb5aa, 0x003f, 0xb5a6, 0x003f, - 0xdae5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb861, 0xdf50, 0x003f, 0xdf53, 0xdf47, 0xdf4c, 0xdf46, 0xb863, - 0x003f, 0xdf4a, 0x003f, 0x003f, 0x003f, 0xdf48, 0xb862, 0x003f, - 0xdf4f, 0xdf4e, 0xdf4b, 0xdf4d, 0xdf49, 0xbae1, 0xdf52, 0xb85f, - 0xdf51, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xe35d, 0x003f, 0xbae8, 0xe358, 0x003f, 0xbae7, - 0xe34e, 0x003f, 0xe350, 0xbae0, 0xe355, 0xe354, 0xe357, 0xbae5, - 0xe352, 0xe351, 0x003f, 0x003f, 0xbae4, 0xbadf, 0xe353, 0xbae2, - 0xe359, 0xe35b, 0x003f, 0xe356, 0xe34f, 0xbae3, 0x003f, 0x003f, - 0xbd69, 0xbade, 0x003f, 0x003f, 0xe35c, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe6d9, 0xbd62, 0x003f, 0xe6db, - 0x003f, 0xbd63, 0x003f, 0x003f, 0xbd65, 0xe6de, 0x003f, 0xe6d6, - 0xbae6, 0xe6dc, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6d8, 0x003f, - 0xb860, 0xbd68, 0x003f, 0x003f, 0xbd64, 0x003f, 0xbd66, 0xbd67, - 0x003f, 0xbf76, 0xe6dd, 0xe6d7, 0xbd6a, 0x003f, 0xe6da, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xeac0, 0xeabb, 0x003f, 0x003f, - 0xeac5, 0xbf74, 0xeabd, 0xbf78, 0xeac3, 0xeaba, 0xeab7, 0xeac6, - 0xc151, 0xbf79, 0xeac2, 0xeab8, 0xbf77, 0xeabc, 0xbf7b, 0xeab9, - 0xeabe, 0xbf7a, 0xeac1, 0xeac4, 0x003f, 0x003f, 0x003f, 0x003f, - 0xedcb, 0xedcc, 0xedbc, 0xedc3, 0xedc1, 0x003f, 0x003f, 0xc14f, - 0xedc8, 0xeabf, 0x003f, 0xedbf, 0x003f, 0xedc9, 0xc14e, 0xedbe, - /* 0x7c00 .. 0x7cff */ - 0xedbd, 0xedc7, 0xedc4, 0xedc6, 0x003f, 0xedba, 0xedca, 0xc14c, - 0x003f, 0xedc5, 0xedce, 0xedc2, 0xc150, 0xc14d, 0xedc0, 0xedbb, - 0xedcd, 0xbf75, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf063, 0x003f, 0x003f, 0xf061, 0xf067, 0xc2b0, 0xf065, - 0xf064, 0xc2b2, 0xf06a, 0xc2b1, 0x003f, 0xf06b, 0xf068, 0xc2ae, - 0xf069, 0xf062, 0xc2af, 0xc2ad, 0xf2ab, 0xf066, 0x003f, 0x003f, - 0xf06c, 0x003f, 0x003f, 0xf2a8, 0x003f, 0x003f, 0x003f, 0xc3b2, - 0xc3b0, 0xf2aa, 0x003f, 0xf2ac, 0xf2a9, 0xc3b1, 0xc3ae, 0xc3af, - 0xc3b3, 0x003f, 0x003f, 0xc478, 0x003f, 0xf4aa, 0x003f, 0xf4a9, - 0xf4a7, 0xf4a6, 0xf4a8, 0x003f, 0xc477, 0xc479, 0x003f, 0x003f, - 0xc4f0, 0x003f, 0x003f, 0xf5e5, 0xf5e4, 0x003f, 0x003f, 0xf6fa, - 0x003f, 0xf6fc, 0xf6fe, 0xf6fd, 0xf6fb, 0x003f, 0x003f, 0xc5a3, - 0xc5a2, 0x003f, 0x003f, 0xc5d3, 0xc5d2, 0xc5d4, 0xf7ed, 0xf7ec, - 0x003f, 0xf8fb, 0xf8b8, 0xf8fc, 0xc658, 0x003f, 0xc659, 0xf96d, - 0x003f, 0x003f, 0xc67e, 0xa6cc, 0x003f, 0xcda8, 0x003f, 0x003f, - 0xd045, 0xd046, 0xd044, 0x003f, 0x003f, 0xacf3, 0x003f, 0xd047, - 0xd048, 0xd049, 0x003f, 0x003f, 0xd349, 0xd34f, 0x003f, 0x003f, - 0xd34d, 0xafbb, 0xd34b, 0x003f, 0xd34c, 0xd34e, 0x003f, 0x003f, - 0x003f, 0xd34a, 0xb2c9, 0x003f, 0xd6de, 0xb2cb, 0xd6e0, 0xb2ca, - 0xd6df, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdae8, 0xb5af, - 0x003f, 0xdaea, 0xdae7, 0xd6e1, 0x003f, 0xb5b0, 0x003f, 0xf9db, - 0xdae9, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdf56, - 0x003f, 0xb864, 0xdf54, 0xb865, 0xdf55, 0xb866, 0x003f, 0x003f, - 0x003f, 0xbae9, 0xe361, 0xe35e, 0xe360, 0xbaea, 0xbaeb, 0xe35f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6df, 0x003f, 0x003f, - 0xe6e0, 0x003f, 0xbd6b, 0xe6e2, 0xe6e1, 0x003f, 0xa261, 0x003f, - 0xeaca, 0xeacb, 0xeac7, 0x003f, 0xeac8, 0xbf7c, 0xbf7d, 0xeac9, - 0x003f, 0xc157, 0x003f, 0x003f, 0xc153, 0xc158, 0xc154, 0xc156, - 0xc152, 0x003f, 0xc155, 0x003f, 0x003f, 0x003f, 0x003f, 0xc2b3, - 0xedcf, 0x003f, 0xf2ae, 0x003f, 0xf2ad, 0x003f, 0xf4ab, 0xc47a, - 0xc47b, 0xf741, 0xf5e6, 0x003f, 0xf740, 0x003f, 0xf8fd, 0xf9a4, - 0xa6cd, 0x003f, 0x003f, 0xa874, 0x003f, 0xcda9, 0xaac8, 0x003f, - /* 0x7d00 .. 0x7dff */ - 0xacf6, 0xd04c, 0xacf4, 0xd04a, 0xacf9, 0xacf5, 0xacfa, 0xacf8, - 0xd04b, 0xacf7, 0xafbf, 0xafbe, 0xd35a, 0xafc7, 0xd353, 0xd359, - 0xafc3, 0xd352, 0xd358, 0xd356, 0xafc2, 0xafc4, 0xd355, 0xafbd, - 0xd354, 0xafc8, 0xafc5, 0xafc9, 0xafc6, 0xd351, 0xd350, 0xd357, - 0xafc0, 0xafbc, 0xafc1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd6f0, 0xd6e9, 0x003f, 0xb5b5, 0xd6e8, 0x003f, 0xb2cf, 0xb2d6, - 0xb2d3, 0xb2d9, 0xb2d8, 0xb2d4, 0x003f, 0xd6e2, 0xd6e5, 0x003f, - 0xd6e4, 0xb2d0, 0xd6e6, 0xd6ef, 0xb2d1, 0xd6e3, 0xd6ec, 0xd6ed, - 0xb2d2, 0xd6ea, 0xb2d7, 0xb2cd, 0xb2d5, 0xd6e7, 0xb2cc, 0xd6eb, - 0x003f, 0x003f, 0xd6ee, 0x003f, 0x003f, 0x003f, 0xdafb, 0xdaf2, - 0xb5b2, 0xdaf9, 0xdaf6, 0xdaee, 0xdaf7, 0xb5b4, 0xdaef, 0x003f, - 0xdaeb, 0x003f, 0x003f, 0xb86c, 0xdaf4, 0x003f, 0xb5b1, 0xdafa, - 0x003f, 0xb5b8, 0xb5ba, 0xdaed, 0x003f, 0x003f, 0xb5b9, 0xdaf0, - 0xb5b3, 0xdaf8, 0xdaf1, 0xdaf5, 0x003f, 0xdaf3, 0xb5b6, 0xdaec, - 0xb5bb, 0xb2ce, 0xb5b7, 0xb5bc, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb868, 0xdf5d, 0xdf5f, 0xdf61, 0xdf65, 0x003f, 0xdf5b, - 0xdf59, 0xb86a, 0x003f, 0xdf60, 0xdf64, 0xdf5c, 0xdf58, 0x003f, - 0xdf57, 0x003f, 0x003f, 0x003f, 0xdf62, 0xdf5a, 0xdf5e, 0xb86b, - 0x003f, 0xb869, 0xdf66, 0xb867, 0xdf63, 0x003f, 0xe372, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xbaee, 0xe36a, 0xbd78, 0xe374, - 0xbaf1, 0xe378, 0xbaf7, 0xe365, 0x003f, 0x003f, 0xe375, 0xe362, - 0x003f, 0xe377, 0xe366, 0x003f, 0xbafe, 0xbafb, 0xe376, 0xe370, - 0xbaed, 0xbaf5, 0xbaf4, 0x003f, 0xbaf3, 0xbaf9, 0x003f, 0xe363, - 0xbafa, 0xe371, 0xbaf6, 0xbaec, 0xe373, 0xbaef, 0xbaf0, 0xbaf8, - 0xe368, 0xe367, 0xe364, 0x003f, 0xe36c, 0xe369, 0xe36d, 0xbafd, - 0x003f, 0xe379, 0xbaf2, 0xe36e, 0xe36f, 0x003f, 0xe36b, 0x003f, - 0x003f, 0x003f, 0xbafc, 0x003f, 0x003f, 0x003f, 0x003f, 0xe6e7, - 0xbd70, 0xbd79, 0xbd75, 0xe6e4, 0x003f, 0xbd72, 0xbd76, 0xe6f0, - 0xbd6c, 0xe6e8, 0x003f, 0xbd74, 0x003f, 0x003f, 0xe6eb, 0xe6e6, - 0xbd73, 0xbd77, 0xe6e5, 0x003f, 0xbd71, 0x003f, 0xe6ef, 0xbd6e, - 0xe6ee, 0xe6ed, 0xbd7a, 0xe572, 0xbd6d, 0x003f, 0xe6ec, 0xe6e3, - 0x003f, 0xbd7b, 0xe6ea, 0xbd6f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7e00 .. 0x7eff */ - 0x003f, 0x003f, 0x003f, 0xe6e9, 0x003f, 0x003f, 0x003f, 0x003f, - 0xbfa2, 0xbfa7, 0xbf7e, 0xead8, 0xeacf, 0xeadb, 0xead3, 0xead9, - 0xbfa8, 0xbfa1, 0xeacc, 0xead2, 0xeadc, 0xead5, 0xeada, 0xeace, - 0x003f, 0x003f, 0xead6, 0xbfa3, 0xead4, 0xbfa6, 0xbfa5, 0xead0, - 0xead1, 0xeacd, 0xead7, 0xbfa4, 0xeade, 0xeadd, 0x003f, 0x003f, - 0x003f, 0xedda, 0xedd6, 0xc15f, 0x003f, 0xedd0, 0xc159, 0xc169, - 0xeddc, 0xc161, 0xc15d, 0xedd3, 0xc164, 0xc167, 0xedde, 0xc15c, - 0xedd5, 0xc165, 0xede0, 0xeddd, 0xedd1, 0xc160, 0xc15a, 0xc168, - 0xedd8, 0xc163, 0xedd2, 0xc15e, 0xeddf, 0xc162, 0xc15b, 0xedd9, - 0xc166, 0xedd7, 0x003f, 0x003f, 0xeddb, 0x003f, 0x003f, 0x003f, - 0xf06e, 0xf074, 0xc2b9, 0xf077, 0xc2b4, 0xc2b5, 0xf06f, 0xf076, - 0xf071, 0xc2ba, 0xc2b7, 0x003f, 0xf06d, 0x003f, 0xc2b6, 0xf073, - 0xf075, 0xc2b8, 0xf072, 0xf070, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf2b8, 0xc3b7, 0xc3b8, 0xc3b4, 0x003f, 0xc3b5, 0x003f, 0xf2b4, - 0xf2b2, 0x003f, 0xf2b6, 0xc3ba, 0xf2b7, 0xf2b0, 0xf2af, 0xf2b3, - 0xf2b1, 0xc3b6, 0xf2b5, 0xf4ac, 0xc47e, 0xc47d, 0xf4ad, 0x003f, - 0xf4af, 0xf4ae, 0xc4a1, 0x003f, 0x003f, 0x003f, 0xf5eb, 0xf5e8, - 0xf5e9, 0x003f, 0xf5e7, 0xf5ea, 0xc4f2, 0xf5ec, 0x003f, 0xc4f1, - 0x003f, 0xf742, 0x003f, 0xc5d5, 0xc5d7, 0xf7ee, 0xc5d6, 0xf8b9, - 0xf940, 0xf942, 0xf8fe, 0xf941, 0xc66c, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x7f00 .. 0x7fff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa6ce, 0x003f, - 0xacfb, 0xd26f, 0xafca, 0x003f, 0x003f, 0xb2da, 0xdafc, 0xdafd, - 0x003f, 0x003f, 0x003f, 0xeadf, 0xc16a, 0xede1, 0x003f, 0x003f, - 0xc2bb, 0x003f, 0xf2ba, 0xf2b9, 0xc4a2, 0xf5ed, 0x003f, 0xf743, - 0xc5f8, 0xca49, 0x003f, 0x003f, 0xaac9, 0xa875, 0x003f, 0x003f, - 0xd04d, 0x003f, 0x003f, 0xd360, 0xd35b, 0xd35f, 0xd35d, 0xafcb, - 0xd35e, 0xd35c, 0x003f, 0xd6f1, 0x003f, 0xdafe, 0xdb40, 0xdf69, - 0xdf6a, 0xb86e, 0xb86f, 0xdf68, 0xdf6b, 0xdf67, 0xb86d, 0x003f, - 0xbb40, 0x003f, 0xb870, 0xe37a, 0x003f, 0xbd7c, 0xe6f1, 0xbd7d, - 0x003f, 0xbfa9, 0xeae2, 0xeae0, 0xeae1, 0xede4, 0xede3, 0xede2, - 0x003f, 0x003f, 0x003f, 0xf2bb, 0x003f, 0xc3b9, 0xf2bc, 0xf744, - 0xc5f9, 0xf8ba, 0xa6cf, 0xaacb, 0xaaca, 0xd04f, 0xacfc, 0x003f, - 0x003f, 0xd04e, 0xd362, 0x003f, 0xafcc, 0xd6f2, 0xd361, 0x003f, - 0x003f, 0x003f, 0xb2dc, 0xd6f5, 0xd6f3, 0xd6f4, 0xb2db, 0x003f, - 0xdb42, 0xdb43, 0xdb41, 0x003f, 0xb873, 0xdf6d, 0xdf6c, 0xdf6e, - 0xb872, 0xb871, 0x003f, 0x003f, 0xe6f2, 0xe6f4, 0x003f, 0xbd7e, - 0xe6f3, 0xeae3, 0xbfaa, 0xf079, 0x003f, 0xf078, 0xc3bb, 0xf2bd, - 0xc3bd, 0xc3bc, 0xf4b0, 0xf5ee, 0xc4f3, 0xa6d0, 0xd050, 0xacfd, - 0xd365, 0xafce, 0xd364, 0xd363, 0x003f, 0xafcd, 0x003f, 0xd6fb, - 0x003f, 0xd6fd, 0xd6f6, 0xd6f7, 0xb2dd, 0xd6f8, 0xb2de, 0xd6fc, - 0xd6f9, 0xd6fa, 0xb2df, 0x003f, 0xb5be, 0xb5bf, 0x003f, 0xdb44, - 0x003f, 0x003f, 0x003f, 0xdf6f, 0xdf70, 0x003f, 0xe37e, 0xbb43, - 0xbb41, 0xbb42, 0xe37b, 0xe37c, 0x003f, 0xe37d, 0xe6f9, 0x003f, - 0xe6fa, 0xbda1, 0xe6f7, 0xe6f6, 0xe6f8, 0xe6f5, 0xbfad, 0xeae4, - 0xbfab, 0xbfac, 0xede6, 0xc16b, 0xede5, 0xefa8, 0x003f, 0xf07a, - 0xf07b, 0xc2bc, 0x003f, 0xc2bd, 0xc16c, 0xf2be, 0xf2bf, 0xf4b1, - /* 0x8000 .. 0x80ff */ - 0xc4a3, 0xa6d1, 0x003f, 0xa6d2, 0xacfe, 0xaacc, 0xafcf, 0xd051, - 0x003f, 0x003f, 0x003f, 0xb5c0, 0xa6d3, 0xad41, 0xd052, 0xd053, - 0xad40, 0xad42, 0xa6d4, 0x003f, 0xd054, 0xafd1, 0xd366, 0xafd3, - 0xafd0, 0xafd2, 0x003f, 0xd741, 0xb2e0, 0x003f, 0xd740, 0xd6fe, - 0x003f, 0xdf71, 0x003f, 0x003f, 0xe3a1, 0x003f, 0xbda2, 0x003f, - 0xbfae, 0xeae6, 0xeae5, 0x003f, 0xede7, 0x003f, 0x003f, 0x003f, - 0xf5ef, 0x003f, 0x003f, 0xa6d5, 0xcb73, 0xcdaa, 0xad43, 0xd055, - 0x003f, 0xd368, 0x003f, 0x003f, 0x003f, 0xafd4, 0xd367, 0xafd5, - 0x003f, 0x003f, 0x003f, 0xd743, 0x003f, 0x003f, 0xb2e2, 0xd742, - 0xd744, 0x003f, 0xb2e1, 0x003f, 0x003f, 0x003f, 0x003f, 0xdb46, - 0xdb47, 0xdb45, 0xb5c1, 0x003f, 0x003f, 0x003f, 0xb874, 0x003f, - 0xb875, 0x003f, 0xbb45, 0x003f, 0xe3a3, 0xe3a2, 0xbb44, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe6fb, 0x003f, 0x003f, 0xe6fc, - 0x003f, 0x003f, 0x003f, 0x003f, 0xeae7, 0x003f, 0x003f, 0xc170, - 0xc16f, 0xc16d, 0xc16e, 0xc171, 0x003f, 0xf07c, 0xc2bf, 0xc2be, - 0xf2c0, 0xf4b2, 0x003f, 0x003f, 0x003f, 0xc5a5, 0xc5a4, 0xa6d6, - 0x003f, 0x003f, 0xd1fb, 0x003f, 0xb877, 0xb5c2, 0xb876, 0xbb46, - 0x003f, 0xa6d7, 0xc9a9, 0xa6d8, 0xa6d9, 0x003f, 0x003f, 0xcdab, - 0xcb76, 0x003f, 0xcb77, 0xa877, 0x003f, 0xcb74, 0xa876, 0x003f, - 0xa879, 0xcb75, 0xa87b, 0xa87a, 0xcb78, 0xa878, 0x003f, 0x003f, - 0x003f, 0xaad1, 0xaacf, 0xcdad, 0x003f, 0xaace, 0x003f, 0x003f, - 0x003f, 0xaad3, 0xaad5, 0xaad2, 0x003f, 0xcdb0, 0xcdac, 0xaad6, - 0x003f, 0xaad0, 0xa87c, 0x003f, 0xaad4, 0xcdaf, 0x003f, 0x003f, - 0xcdae, 0x003f, 0xaacd, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd05b, 0xad47, 0xad48, 0xd05d, 0x003f, 0xd057, - 0xd05a, 0xd063, 0xd061, 0x003f, 0xad49, 0xd067, 0xad4c, 0xd064, - 0xd05c, 0xd059, 0x003f, 0x003f, 0xdb49, 0xd062, 0xad44, 0xd065, - 0xd056, 0xd05f, 0xad46, 0xad4b, 0xd060, 0xad4f, 0xad4d, 0x003f, - 0xd058, 0xad4a, 0x003f, 0xd05e, 0xad4e, 0xad45, 0xd066, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xafda, 0x003f, 0xafe3, - 0xafd8, 0xafd6, 0xd36a, 0xafde, 0xafdb, 0xd36c, 0x003f, 0x003f, - 0xafdd, 0xd36b, 0xd369, 0xd36e, 0xafe2, 0xafe0, 0xdb48, 0x003f, - /* 0x8100 .. 0x81ff */ - 0xd36f, 0xd36d, 0xafd7, 0x003f, 0x003f, 0xafd9, 0xafdc, 0x003f, - 0xafdf, 0x003f, 0xafe1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd74e, 0xb2e4, 0x003f, - 0xd745, 0xd747, 0x003f, 0xd748, 0x003f, 0xd750, 0xd74c, 0xd74a, - 0x003f, 0xd74d, 0xd751, 0xb2e5, 0xb2e9, 0xd746, 0x003f, 0xd74f, - 0x003f, 0xb2e7, 0x003f, 0xb2e6, 0xd74b, 0xd749, 0x003f, 0xb2e3, - 0xb2e8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb5c8, 0xdb51, 0x003f, 0x003f, 0xdb4f, 0xb5ca, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdb4a, 0xdfa1, 0x003f, 0xb5c9, 0xdb4e, - 0x003f, 0x003f, 0xdb4b, 0xb5c5, 0xb5cb, 0xdb50, 0xb5c7, 0xdb4d, - 0xbb47, 0xb5c6, 0xdb4c, 0xb5cc, 0xb5c4, 0xb5c3, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdf77, 0xdf75, 0x003f, 0xdf7b, 0x003f, - 0xdf73, 0xdfa2, 0xdf78, 0x003f, 0xdf72, 0xb87b, 0xb8a3, 0xdf7d, - 0x003f, 0xdf76, 0x003f, 0xb87e, 0x003f, 0x003f, 0xb87c, 0xdf7e, - 0xb879, 0xb878, 0xdf79, 0xb87d, 0xb5cd, 0x003f, 0xdf7c, 0xdf74, - 0xb87a, 0xb8a1, 0xb8a2, 0x003f, 0x003f, 0x003f, 0x003f, 0xbb4c, - 0xbb48, 0x003f, 0xbb4d, 0xe3a6, 0x003f, 0x003f, 0xe3a5, 0xe3a7, - 0xbb4a, 0xe3a4, 0xbb4b, 0xe3aa, 0xe3a9, 0xe3a8, 0x003f, 0xbb49, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe741, 0x003f, 0xe744, - 0xbda8, 0xe743, 0xbda7, 0xbda3, 0xbda4, 0xbda5, 0xe740, 0xe6fe, - 0xbda6, 0x003f, 0xe742, 0xe6fd, 0x003f, 0x003f, 0xeae9, 0xeaf3, - 0xbfb1, 0xbfb0, 0x003f, 0xeaed, 0xeaef, 0x003f, 0xeaea, 0x003f, - 0xeaee, 0xeae8, 0xeaf1, 0xbfaf, 0xeaf0, 0xeaec, 0x003f, 0xeaf2, - 0x003f, 0xeaeb, 0xc174, 0xede8, 0xedee, 0xc178, 0xc17a, 0xc177, - 0xc176, 0x003f, 0xc175, 0xc173, 0xede9, 0xedec, 0xc172, 0xeded, - 0x003f, 0xc179, 0xedeb, 0x003f, 0xedea, 0xc2c0, 0x003f, 0xc2c1, - 0xf0a1, 0xf07d, 0xf07e, 0x003f, 0x003f, 0xf2c2, 0x003f, 0xf2c1, - 0xc3be, 0xf4b4, 0xc4a4, 0xf4b3, 0x003f, 0xf5f0, 0xf745, 0xc5a6, - 0xf943, 0xf944, 0xc5d8, 0xa6da, 0x003f, 0xaad7, 0xdb52, 0xbb4e, - 0xc17b, 0xedef, 0xa6db, 0x003f, 0xafe5, 0xafe4, 0xdb53, 0x003f, - 0x003f, 0x003f, 0xeaf4, 0xa6dc, 0xad50, 0x003f, 0x003f, 0xdb54, - 0xdb55, 0xdb56, 0xbb4f, 0xbfb2, 0xa6dd, 0x003f, 0xaad8, 0xd068, - /* 0x8200 .. 0x82ff */ - 0xafe6, 0xd370, 0xb2ea, 0x003f, 0xdb57, 0xb8a4, 0x003f, 0xbb50, - 0xbfb3, 0xc17c, 0xc2c2, 0xf4b5, 0xa6de, 0xaad9, 0x003f, 0x003f, - 0xafe7, 0xd752, 0xb5ce, 0x003f, 0xbb51, 0xe3ab, 0xe745, 0x003f, - 0x003f, 0x003f, 0x003f, 0xa6df, 0xb5cf, 0xdfa3, 0xbb52, 0xa6e0, - 0xcdb1, 0xd069, 0xad51, 0x003f, 0x003f, 0xd372, 0x003f, 0x003f, - 0xafea, 0x003f, 0xafe8, 0xafe9, 0xafeb, 0x003f, 0x003f, 0xd371, - 0x003f, 0x003f, 0xd757, 0xd754, 0xd756, 0xb2eb, 0xb2ed, 0xb2ec, - 0xd753, 0xb2ee, 0xd755, 0x003f, 0xdb58, 0xdb59, 0x003f, 0xdb5a, - 0xdfa6, 0x003f, 0xdfa7, 0x003f, 0xdfa5, 0xdfa8, 0x003f, 0xb8a5, - 0x003f, 0xdfa4, 0x003f, 0xbb53, 0x003f, 0x003f, 0xe74a, 0xe746, - 0xe749, 0xe74b, 0xe748, 0xe747, 0x003f, 0xeaf5, 0xeaf6, 0xeaf7, - 0xbfb4, 0xbfb5, 0xedf1, 0xedf0, 0xedf2, 0x003f, 0xf0a3, 0xf0a2, - 0x003f, 0xf2c4, 0x003f, 0xf2c5, 0xf2c3, 0x003f, 0xc4a5, 0x003f, - 0xf4b6, 0xf4b7, 0x003f, 0xf746, 0xf7ef, 0xf8bb, 0xa6e1, 0xa87d, - 0x003f, 0xc17d, 0xa6e2, 0x003f, 0xd758, 0xdb5b, 0x003f, 0xc641, - 0xca4a, 0x003f, 0x003f, 0x003f, 0xca4b, 0xca4d, 0xa6e3, 0xca4e, - 0xca4c, 0x003f, 0x003f, 0xcba2, 0xcba3, 0xcb7b, 0x003f, 0x003f, - 0x003f, 0x003f, 0xcba1, 0xa8a1, 0x003f, 0xa8a2, 0xcb7c, 0xcb7a, - 0xcb79, 0xcb7d, 0xa87e, 0xcb7e, 0xd06a, 0x003f, 0x003f, 0x003f, - 0xcdb6, 0xaadc, 0xcdb5, 0xcdb7, 0x003f, 0xaadb, 0xcdbc, 0xaadf, - 0xcdb2, 0xcdc0, 0xcdc6, 0xaae6, 0xcdc3, 0xaae3, 0x003f, 0xcdb9, - 0xcdbf, 0xcdc1, 0x003f, 0xcdb4, 0xaae2, 0xaadd, 0xcdba, 0xaae4, - 0xaae7, 0xaae1, 0x003f, 0xaada, 0xcdbe, 0xcdb8, 0xcdc5, 0xaae9, - 0xaae5, 0xaae0, 0xcdbd, 0xafec, 0xcdbb, 0xaade, 0xaae8, 0x003f, - 0xcdb3, 0x003f, 0xcdc2, 0xcdc4, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xad62, 0xad5c, 0xad64, 0xad61, 0xd071, 0xd074, 0xad5d, - 0x003f, 0xd06b, 0x003f, 0xad56, 0xad60, 0x003f, 0xad63, 0xad65, - 0xd0a2, 0xd077, 0x003f, 0xad55, 0xd0a1, 0xad59, 0xad57, 0xad52, - 0xd06f, 0x003f, 0xd07e, 0xd073, 0xd076, 0xd0a5, 0x003f, 0xad66, - 0xd07d, 0xad5e, 0xd078, 0xd0a4, 0xd075, 0xd079, 0xd07c, 0x003f, - 0x003f, 0xd06d, 0xd0a3, 0xd07b, 0x003f, 0x003f, 0xd06c, 0x003f, - /* 0x8300 .. 0x83ff */ - 0xd070, 0xad5f, 0xad5a, 0xad53, 0xad58, 0xad54, 0xad67, 0xd06e, - 0xd3a5, 0xad5b, 0x003f, 0x003f, 0xd07a, 0xce41, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd3a8, 0xaffa, - 0x003f, 0xd376, 0x003f, 0xd3a3, 0xd37d, 0x003f, 0xd3b2, 0x003f, - 0xd3aa, 0x003f, 0xd37e, 0x003f, 0xd3a9, 0xd378, 0xd37c, 0xd3b5, - 0xaffd, 0xd3ad, 0xd3a4, 0xafed, 0xd3b3, 0xd374, 0x003f, 0xd3ac, - 0x003f, 0xaffc, 0xaff7, 0xd373, 0xaff5, 0xaff4, 0xaff9, 0xd3ab, - 0xaff1, 0xaff8, 0xd072, 0xdb5c, 0xd3a6, 0x003f, 0x003f, 0xd37a, - 0xaffb, 0xd37b, 0xd3a1, 0xaffe, 0xd375, 0xd3af, 0x003f, 0xd3ae, - 0xd3b6, 0xaff3, 0xaff0, 0xd3b4, 0xd3b0, 0xd3a7, 0xd3a2, 0xaff6, - 0xaff2, 0xd377, 0xafee, 0xd3b1, 0xafef, 0x003f, 0xd379, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd75e, 0xd760, 0xd765, 0xd779, 0xb2fc, - 0xb2f2, 0x003f, 0xd75d, 0xb2fd, 0xb2fe, 0xd768, 0xd76f, 0xd775, - 0x003f, 0xd762, 0x003f, 0xd769, 0x003f, 0x003f, 0xb340, 0xd777, - 0xd772, 0xb2fa, 0xb2f8, 0xd76e, 0xd76a, 0xd75c, 0xb2ef, 0xd761, - 0xd759, 0x003f, 0xb2f7, 0xb2f9, 0xd766, 0xd763, 0xb2f4, 0xd773, - 0xb2f1, 0xd764, 0xd77a, 0xd76c, 0x003f, 0xd76b, 0xb2f0, 0x003f, - 0xb2fb, 0x003f, 0xb2f3, 0xd75a, 0xd75f, 0xd770, 0xd776, 0xb341, - 0xd75b, 0xd767, 0xd76d, 0xb2f6, 0x003f, 0x003f, 0xd778, 0xd771, - 0xd774, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb2f5, 0x003f, 0xdb6c, - 0xdb60, 0xb5d7, 0xdb7d, 0xdba7, 0xdbaa, 0xb5d5, 0xdb68, 0xdba3, - 0xdb69, 0xdb77, 0xb5e2, 0xdb73, 0xb5df, 0x003f, 0xdb74, 0xdb5d, - 0x003f, 0xdba4, 0x003f, 0x003f, 0xb5e8, 0xdba1, 0xdb75, 0xdbac, - 0xdb70, 0xdfc8, 0x003f, 0xdbaf, 0xb5e6, 0xdb6e, 0xdb7a, 0xb5e9, - 0xb5d4, 0xdb72, 0xdbad, 0xdb6b, 0xdb64, 0xdb6f, 0x003f, 0xdb63, - 0xdb61, 0xb5d0, 0xdba5, 0xdb6a, 0xdba8, 0x003f, 0xdba9, 0xb5d8, - 0xb5dd, 0xb5d9, 0xb5e1, 0xdb7e, 0xb5da, 0xdb76, 0xdb66, 0x003f, - 0xb5d2, 0xdb5e, 0xdba2, 0xdbab, 0xdb65, 0xb5e0, 0xdbb0, 0xdb71, - /* 0x8400 .. 0x84ff */ - 0x003f, 0xdb6d, 0x003f, 0xb5d1, 0xb5e5, 0x003f, 0xdb7c, 0xb5e7, - 0x003f, 0xdb78, 0xb5dc, 0xb5d6, 0xb5de, 0xb5d3, 0xb5e4, 0xdb79, - 0xdb67, 0xdb7b, 0xdb62, 0xdba6, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdbae, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xdb5f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdfc7, 0x003f, 0xdfdd, 0xb855, 0xdfcc, 0x003f, 0xdfca, - 0xdfb5, 0xb8a9, 0xdfc5, 0xdfd9, 0xdfc1, 0xb8b1, 0xdfd8, 0xdfbf, - 0xb5e3, 0xdfcf, 0xdfc0, 0xdfd6, 0xb8b0, 0xb8a8, 0x003f, 0xdfaa, - 0xdfb2, 0x003f, 0xdfcb, 0xdfc3, 0xdfdc, 0xdfc6, 0xb8b6, 0xdfd7, - 0x003f, 0xb8ad, 0x003f, 0xdfc9, 0xdfd1, 0xdfb6, 0xdfd0, 0x003f, - 0xdfe1, 0xdfb1, 0xdfd2, 0x003f, 0xdfdf, 0x003f, 0xdfab, 0xb5db, - 0x003f, 0xdfb9, 0xdfb8, 0xb8af, 0x003f, 0xdfbc, 0xdfbe, 0xdfcd, - 0xdfde, 0xb8b2, 0x003f, 0xb8b3, 0x003f, 0xdfb0, 0xb8ab, 0xdfb4, - 0xdfda, 0xb8b4, 0x003f, 0xb8ac, 0xb8ae, 0xb8b5, 0xdfe0, 0xdfd3, - 0xdfce, 0x003f, 0x003f, 0xdfbb, 0xdfba, 0xb8aa, 0xdfac, 0xb8a7, - 0xdfc4, 0xdfad, 0xdfc2, 0x003f, 0x003f, 0xdfb7, 0xdfdb, 0x003f, - 0x003f, 0x003f, 0xb8a6, 0x003f, 0x003f, 0x003f, 0xdfb3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdfaf, 0xdfd5, 0xdfae, - 0xbb60, 0xe3d3, 0x003f, 0x003f, 0xe3c2, 0x003f, 0x003f, 0xe3ac, - 0xe3ca, 0xbb58, 0xe3bb, 0xe3c5, 0xbb5b, 0xe3be, 0xbb59, 0xe3af, - 0xe3cd, 0xe3ae, 0xe3c1, 0x003f, 0xe3ad, 0x003f, 0x003f, 0xe3bf, - 0xe3c8, 0xe3c6, 0xe3ba, 0xe3b5, 0xe3b3, 0x003f, 0xe3b4, 0xe3c7, - 0xe3d2, 0xe3bc, 0xbb5a, 0x003f, 0xe3b7, 0x003f, 0xe3cb, 0x003f, - 0xbb5d, 0xe3b6, 0xe3b0, 0xe3c0, 0xbb61, 0x003f, 0x003f, 0xbb55, - 0xbb5e, 0xe3b8, 0xe3b2, 0x003f, 0xbb57, 0xdfd4, 0xbb56, 0xe3c3, - 0x003f, 0xbb54, 0xbb63, 0xbb5c, 0xe3c4, 0xe3b9, 0xe3b1, 0xe3cc, - 0xe3bd, 0xbb62, 0xe3d0, 0xbb5f, 0xe3cf, 0x003f, 0xe3c9, 0xe3ce, - 0x003f, 0x003f, 0x003f, 0xe3d1, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe773, - 0xe774, 0xe767, 0xe766, 0xe762, 0xbdb4, 0x003f, 0xbdac, 0xe776, - 0xe775, 0xdfa9, 0xe75f, 0xe763, 0xe75d, 0x003f, 0xe770, 0xe761, - 0x003f, 0xe777, 0xe75a, 0xe758, 0xe764, 0xe76e, 0xe769, 0xbdb6, - /* 0x8500 .. 0x85ff */ - 0xe74f, 0x003f, 0xe76d, 0x003f, 0x003f, 0x003f, 0xbdb7, 0xdfbd, - 0xe75b, 0xe752, 0xe755, 0xe77b, 0xe75c, 0xe753, 0xe751, 0xe74e, - 0x003f, 0xbdb0, 0xe765, 0xbdaf, 0xbdb3, 0xe760, 0xe768, 0xbda9, - 0xe778, 0xe77c, 0xbdab, 0x003f, 0xe757, 0xe76b, 0xe76f, 0xe754, - 0xe779, 0xbdb2, 0x003f, 0xbdb1, 0xe74c, 0xbdb5, 0xe772, 0xe756, - 0xe76a, 0xe750, 0xe75e, 0xe759, 0xbdad, 0xbdae, 0xe76c, 0xe77d, - 0xe77a, 0xe771, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xe74d, 0x003f, 0xbdaa, 0xeb49, 0x003f, - 0xeb40, 0xeb43, 0x003f, 0xbfbb, 0xeb45, 0xeaf9, 0xeb41, 0xeb47, - 0xbfb8, 0xbfbc, 0xbfb6, 0x003f, 0x003f, 0xeafb, 0xeb4c, 0x003f, - 0x003f, 0xeb46, 0x003f, 0xeafc, 0xeb55, 0xeb4f, 0xeaf8, 0xee46, - 0xeafe, 0xbfb7, 0x003f, 0xeb4a, 0x003f, 0xeb54, 0xbfbf, 0x003f, - 0xeb51, 0xeafd, 0xeb44, 0xeb48, 0xeb42, 0xeb56, 0xeb53, 0xeb50, - 0xbfb9, 0xbfba, 0xbfbe, 0xeafa, 0xeb57, 0xbfbd, 0xeb4d, 0x003f, - 0x003f, 0xeb4b, 0x003f, 0x003f, 0x003f, 0xeb4e, 0xee53, 0xee40, - 0xee45, 0xee52, 0xee44, 0xedfb, 0xee41, 0x003f, 0xc1a2, 0x003f, - 0xedf4, 0xee4d, 0xee4f, 0xedf3, 0xc1a1, 0xee51, 0xee49, 0xc1a8, - 0xee50, 0xee42, 0xc1aa, 0xedf9, 0xeb52, 0xee4a, 0xee47, 0xedf5, - 0xee55, 0xc1a4, 0x003f, 0x003f, 0xc1a5, 0xedf7, 0xee48, 0x003f, - 0xee54, 0xee4b, 0xedfd, 0xc1a7, 0xc1a3, 0xee4c, 0xedfe, 0xee56, - 0xedf8, 0xee43, 0xee4e, 0xedfa, 0xedfc, 0x003f, 0xc2cb, 0xedf6, - 0xc1a9, 0xc2c4, 0xc17e, 0x003f, 0x003f, 0x003f, 0x003f, 0xc1a6, - 0xc2c8, 0xf0b3, 0x003f, 0xf0a9, 0xf0a4, 0xf0aa, 0xf0b4, 0xf0b8, - 0xf0b7, 0xc2ca, 0xc2c9, 0x003f, 0x003f, 0xf0ab, 0xf0b9, 0xf0ae, - 0xf0a6, 0x003f, 0xf0a8, 0xf0a7, 0xf0ad, 0xf0b2, 0xf0a5, 0xf0ac, - 0xf0b1, 0xc2c7, 0x003f, 0xf0af, 0x003f, 0xc2c5, 0xf0b0, 0xc2c3, - 0xc2c6, 0xf2d5, 0xf0b5, 0x003f, 0x003f, 0xc3c2, 0x003f, 0xf2cd, - 0xf2d1, 0xf2c9, 0xf2cc, 0x003f, 0xf2d4, 0xc3c0, 0xf2d9, 0xf2d2, - 0x003f, 0xf2ca, 0xf2da, 0xf2d3, 0xc3c3, 0xc3c4, 0xf2d7, 0x003f, - 0xf2cb, 0xc3bf, 0xc3c1, 0xf2c6, 0xf2ce, 0xf2c8, 0x003f, 0xf2d8, - 0xf2d6, 0xf2c7, 0xf2cf, 0x003f, 0x003f, 0x003f, 0xf4be, 0xc3c5, - 0xf2d0, 0xc4a7, 0xc4a9, 0xc4a6, 0x003f, 0xf4c3, 0xf4bb, 0xf4b9, - /* 0x8600 .. 0x86ff */ - 0xf4bd, 0xf4ba, 0x003f, 0x003f, 0xf4bf, 0xf4c1, 0xc4aa, 0xc4ac, - 0x003f, 0xf4c0, 0xc4ad, 0xc4ab, 0xf4c2, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc4a8, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc4f4, - 0xf5f1, 0xf5f7, 0xc4f6, 0xf4bc, 0xf5f6, 0x003f, 0xf5fd, 0xf5f4, - 0xf5fb, 0xf5fa, 0xf4b8, 0xf5f5, 0xf0b6, 0xf5fe, 0xf5f3, 0xf5f8, - 0x003f, 0xf5fc, 0xf5f2, 0x003f, 0xf74a, 0xc4f5, 0xf5f9, 0x003f, - 0x003f, 0xf7f4, 0xf74b, 0xf749, 0xf747, 0xf748, 0xf74c, 0x003f, - 0xc5d9, 0xf7f2, 0xf7f0, 0xf7f5, 0xf7f3, 0x003f, 0xf7f6, 0xc5da, - 0xf7f1, 0x003f, 0x003f, 0xf8bc, 0x003f, 0x003f, 0xf945, 0xf946, - 0xf947, 0x003f, 0x003f, 0xf9c7, 0xf9bd, 0xca4f, 0xaaea, 0x003f, - 0xad68, 0x003f, 0xd3b8, 0xd3b7, 0xb040, 0xb342, 0xd77c, 0x003f, - 0x003f, 0xd77b, 0x003f, 0xb5ea, 0xb8b8, 0x003f, 0xb8b7, 0xb8b9, - 0x003f, 0xe3d4, 0xe77e, 0xeb58, 0xeb5a, 0xeb59, 0x003f, 0xc1ab, - 0xee57, 0xf0ba, 0xf9a5, 0xa6e4, 0x003f, 0xcdc9, 0xcdca, 0xcdc8, - 0xcdc7, 0xaaeb, 0x003f, 0xd0a9, 0xd0a7, 0x003f, 0x003f, 0xd0a6, - 0x003f, 0xad69, 0xad6b, 0xad6a, 0xd0a8, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xd3c4, 0xd3c1, 0xd3bf, - 0x003f, 0x003f, 0xb041, 0xd3c2, 0xb046, 0xd3bc, 0xd3cb, 0x003f, - 0xd3cd, 0xd3bd, 0x003f, 0xb043, 0xd3ce, 0xd3c9, 0xd3bb, 0xd3c0, - 0xd3ca, 0xd3c6, 0xd3c3, 0x003f, 0xb048, 0xd3cc, 0xd3be, 0x003f, - 0x003f, 0xd3c7, 0xd3b9, 0xb047, 0xb044, 0xd3c5, 0x003f, 0xd3c8, - 0xd3ba, 0xb045, 0xb042, 0x003f, 0x003f, 0x003f, 0x003f, 0xb34c, - 0xd7a5, 0xb34b, 0x003f, 0xd7a8, 0xd7ab, 0xb348, 0xb346, 0xd77e, - 0xd7a9, 0xd7a7, 0xd7a4, 0xd7ac, 0xd7ad, 0xd7af, 0xd7b0, 0xd77d, - 0xb345, 0xd7a2, 0xd7a1, 0xd7ae, 0xb347, 0xd7a3, 0xb349, 0xb344, - 0xd7a6, 0xb34d, 0x003f, 0xb34a, 0xd7aa, 0x003f, 0x003f, 0x003f, - 0xb5f1, 0xdbbf, 0x003f, 0xdbb4, 0xb5ee, 0x003f, 0xdfe7, 0xdbbd, - 0xdbb1, 0xb5ec, 0xdbb6, 0xb5ef, 0xdbba, 0xdbb8, 0xb5f2, 0xb5eb, - 0x003f, 0x003f, 0xdbb2, 0xdbb5, 0xb5f0, 0x003f, 0xdbb3, 0x003f, - 0xdbbe, 0xdbbc, 0xdbb7, 0xdbb9, 0xdbbb, 0xb5ed, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdfe8, 0xdfee, 0xdfe4, - 0xdfea, 0xb8ba, 0xdfe6, 0xb8c0, 0x003f, 0x003f, 0xb8bf, 0x003f, - /* 0x8700 .. 0x87ff */ - 0xb8be, 0xdfed, 0xb8c1, 0xb8c2, 0xdfe3, 0xdff0, 0xb8c3, 0xb8bd, - 0xb8bc, 0xdfec, 0xb8c4, 0xdfe2, 0xdfe5, 0xdfef, 0xdfeb, 0x003f, - 0x003f, 0xe3f4, 0xe3e9, 0xb8bb, 0x003f, 0x003f, 0x003f, 0x003f, - 0xbb6a, 0xe3dd, 0xe3f2, 0xe3de, 0xbb65, 0x003f, 0xe3db, 0x003f, - 0xe3e4, 0xe3dc, 0xbb67, 0xe3d6, 0xe3f1, 0xbb68, 0xe3ee, 0xe3ef, - 0xe3d7, 0xbb6d, 0xe3e6, 0x003f, 0xe3e0, 0xe3e7, 0xe3da, 0x003f, - 0xe3f3, 0xe3eb, 0xe3e5, 0xe3d5, 0xbb69, 0xe3ec, 0x003f, 0xbb6c, - 0xe3f0, 0x003f, 0xe3ea, 0xbb66, 0xe3e8, 0x003f, 0xe3e2, 0xbb64, - 0xe3d9, 0xe3e1, 0xe3ed, 0xe3df, 0x003f, 0x003f, 0xe3e3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xbdc1, 0xdfe9, 0xe7b2, 0xe7bb, - 0xe7b1, 0xe7ad, 0xe7aa, 0xbdc2, 0xe7a8, 0xbb6b, 0xe7a1, 0xbdc0, - 0xe7a7, 0xbdbf, 0xe7ac, 0xe7a9, 0xe7b9, 0xe7b4, 0xe7ae, 0xe7b3, - 0xbdbb, 0xe7ab, 0xe7be, 0xe7a2, 0xe7a3, 0xe7ba, 0xbdbc, 0xe7bf, - 0xbdbe, 0xe7c0, 0xe7b0, 0xe3d8, 0xe7b6, 0xe7af, 0xe7b8, 0xe7b5, - 0x003f, 0x003f, 0x003f, 0xe7a6, 0xbdb9, 0xe7bd, 0xbdba, 0xe7a4, - 0xbdbd, 0xeb64, 0xe7b7, 0xe7bc, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeb61, 0xbdb8, 0xbfc0, 0xeb6b, 0xeb67, 0x003f, 0xeb65, - 0xeb60, 0xeb6f, 0x003f, 0x003f, 0x003f, 0xbfc4, 0x003f, 0xeb5c, - 0xeb68, 0xeb69, 0xeb5f, 0xeb5e, 0xeb6c, 0x003f, 0xeb62, 0xeb5d, - 0xeb63, 0x003f, 0xeb6e, 0xeb5b, 0xeb6d, 0xeb6a, 0xbfc2, 0xbfc1, - 0x003f, 0x003f, 0xbfc3, 0xeb66, 0xf0cb, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xee59, 0xc1b1, 0xee5d, 0xee5a, 0xee61, 0xee67, - 0xee5c, 0x003f, 0xee70, 0xc1ae, 0xee6a, 0xee5f, 0xee6b, 0xee66, - 0xee6d, 0xee5e, 0xc1b3, 0xc1b2, 0xee60, 0xee6e, 0xee58, 0xee6c, - 0xc1ac, 0x003f, 0xee64, 0xee63, 0xee68, 0xee5b, 0xc1b0, 0x003f, - 0xc1b4, 0xee62, 0xee69, 0xc1b5, 0xee65, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc1ad, 0xc1af, 0xf0c7, 0xf0c5, 0x003f, 0x003f, 0xf0cc, - 0xf0c9, 0xf0cd, 0x003f, 0xf0be, 0xf0c6, 0xf0d1, 0xee6f, 0xf0c2, - 0xc2cf, 0xe7a5, 0xf0bd, 0xf0ca, 0xf0c4, 0xf0c1, 0xf0bc, 0xf0bb, - 0xf0d0, 0x003f, 0xf0c0, 0xf0bf, 0xc2cd, 0xf0c8, 0x003f, 0xc2cc, - 0x003f, 0x003f, 0xc2ce, 0xf0c3, 0xf0cf, 0x003f, 0xf2de, 0xf2df, - 0x003f, 0xc3c9, 0xf2dc, 0xc3c6, 0xf2e4, 0x003f, 0xc3ca, 0xf2e6, - /* 0x8800 .. 0x88ff */ - 0xf2db, 0xf0ce, 0xf2e8, 0xf2dd, 0x003f, 0xc3c7, 0xf2e3, 0x003f, - 0xf2e5, 0xf2e0, 0xf2e7, 0xf2e2, 0xf2e1, 0xc3c8, 0x003f, 0x003f, - 0xf4c5, 0xf4c6, 0x003f, 0xf4c8, 0xc4ae, 0xc4af, 0xf4c9, 0xf4c7, - 0x003f, 0xf4c4, 0x003f, 0xf642, 0xf645, 0xf641, 0x003f, 0xc4fa, - 0xf643, 0xc4f9, 0xc4f8, 0xc4f7, 0xf644, 0xf751, 0xf74f, 0x003f, - 0xf74e, 0xf640, 0xf750, 0xf646, 0xf74d, 0x003f, 0xf7f9, 0xf7d7, - 0xf7f7, 0xc5db, 0xf7f8, 0xf7fa, 0x003f, 0xf8bf, 0xc5fa, 0xf8be, - 0xf8bd, 0xc5fb, 0x003f, 0xc65a, 0xf96e, 0xf9a7, 0xf9a6, 0xf9a8, - 0xa6e5, 0xd0aa, 0x003f, 0xd3cf, 0xd3d0, 0x003f, 0x003f, 0x003f, - 0xdbc0, 0x003f, 0xf647, 0xf8c0, 0xa6e6, 0xad6c, 0xd0ab, 0x003f, - 0x003f, 0x003f, 0xd7b1, 0xb34e, 0x003f, 0xdbc2, 0xdbc1, 0xb5f3, - 0x003f, 0xb8c5, 0xe7c1, 0xbdc3, 0x003f, 0xbdc4, 0x003f, 0x003f, - 0x003f, 0xbfc5, 0xc5fc, 0xa6e7, 0x003f, 0x003f, 0x003f, 0xd0ac, - 0xaaed, 0xd0ae, 0xd0ad, 0xad6d, 0x003f, 0xd3d1, 0x003f, 0xd3d8, - 0xb049, 0xd3d6, 0xd3d4, 0x003f, 0xd3db, 0xd3d2, 0xd3d3, 0xb04a, - 0x003f, 0xb04e, 0x003f, 0x003f, 0xd3dc, 0xb04d, 0xd3da, 0xd3d7, - 0xd3d5, 0xb04b, 0xb04c, 0xd3d9, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb350, 0xd7b2, 0x003f, 0xb355, 0xd7c2, 0xb354, 0xd7c4, 0x003f, - 0x003f, 0xd7b8, 0xb352, 0xd7c3, 0x003f, 0xd7b3, 0xb353, 0xd7bf, - 0xd7bb, 0xd7bd, 0xd7b7, 0xd7be, 0x003f, 0x003f, 0xb34f, 0xd7ba, - 0x003f, 0xd7b9, 0xd7b5, 0x003f, 0xd7c0, 0x003f, 0x003f, 0xd7bc, - 0xd7b4, 0x003f, 0xd7b6, 0xb351, 0xd7c1, 0x003f, 0x003f, 0x003f, - 0x003f, 0xb5f6, 0xdbcd, 0x003f, 0x003f, 0x003f, 0xdbc9, 0xdbcb, - 0xdbc6, 0xdbc5, 0xdbc3, 0x003f, 0xdbca, 0xdbcc, 0xdbc8, 0x003f, - 0xdbc7, 0xb5f4, 0xb5f5, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xdbcf, 0xb8cd, 0xdff2, 0xdff8, 0xdff3, 0xdff4, 0xf9d8, - 0xdff9, 0x003f, 0xb8cf, 0x003f, 0xb8c7, 0xb8ce, 0xdff1, 0xdbc4, - 0xb8ca, 0xb8c8, 0xdff7, 0xdff6, 0xb8c9, 0xb8cb, 0xdff5, 0xb8c6, - 0x003f, 0xb8cc, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe3f6, - 0xbb74, 0x003f, 0x003f, 0xe442, 0xe441, 0x003f, 0xe3fb, 0xbb76, - 0xe440, 0xe3f7, 0xe3f8, 0xbb6e, 0xbb70, 0x003f, 0xe3fd, 0xe3f5, - 0xbb72, 0xbb71, 0xe3f9, 0xe3fe, 0xe3fc, 0xbb73, 0xe3fa, 0x003f, - /* 0x8900 .. 0x89ff */ - 0x003f, 0xdbce, 0xbb6f, 0x003f, 0x003f, 0xe7c2, 0xe7c9, 0xbdc6, - 0x003f, 0xe7cd, 0xbdca, 0xe7c5, 0xe7c3, 0x003f, 0xe7cc, 0x003f, - 0xbdc5, 0xe7cb, 0xbdc7, 0xbdc8, 0xe7c4, 0xbdc9, 0xe7ca, 0xe7c6, - 0xe7c7, 0xe7c8, 0xbb75, 0x003f, 0x003f, 0x003f, 0xeb70, 0xeb7c, - 0x003f, 0xbfca, 0xeb77, 0xeb79, 0x003f, 0xbfc8, 0xeb71, 0xeb75, - 0x003f, 0xeb78, 0xbfc6, 0xbfc9, 0xeb7b, 0xeb73, 0xeb74, 0xeb7a, - 0xeb72, 0xeb76, 0xbfc7, 0xee72, 0x003f, 0xee71, 0xc1b7, 0xee77, - 0xc1b9, 0x003f, 0x003f, 0xc1b6, 0xee73, 0xc1ba, 0xee74, 0x003f, - 0x003f, 0xee75, 0xee78, 0x003f, 0xc1b8, 0x003f, 0xf0d6, 0x003f, - 0x003f, 0xf0d9, 0x003f, 0xf0d3, 0xf0d5, 0x003f, 0x003f, 0xf0d4, - 0xf0d7, 0xf0d8, 0xee76, 0xf0d2, 0x003f, 0x003f, 0xc3cd, 0xf2ec, - 0xf2ef, 0xf2f1, 0xf2ea, 0xf2eb, 0xf2ee, 0xf2f0, 0xc3ce, 0xc3cc, - 0xc3cb, 0xf2ed, 0xf2e9, 0xf4ca, 0xc4b0, 0x003f, 0xf4cb, 0x003f, - 0x003f, 0xf649, 0xc4fb, 0xf64b, 0xc4fc, 0xf648, 0xf64a, 0xc5a8, - 0x003f, 0xf752, 0xc5a7, 0xf7fd, 0xf7fc, 0x003f, 0xf7fb, 0x003f, - 0x003f, 0xf948, 0xf949, 0xf94b, 0xf94a, 0x003f, 0xca50, 0xa6e8, - 0x003f, 0xad6e, 0xd7c5, 0xb5f7, 0x003f, 0xdffa, 0xc2d0, 0x003f, - 0xf2f2, 0x003f, 0x003f, 0xa8a3, 0x003f, 0x003f, 0x003f, 0xb357, - 0x003f, 0x003f, 0x003f, 0xb356, 0x003f, 0xdbd0, 0xb5f8, 0xdbd2, - 0xdbd1, 0x003f, 0x003f, 0xdffb, 0xb8d0, 0xe443, 0xe446, 0xe445, - 0x003f, 0xe444, 0xe7ce, 0xe7d0, 0xe7cf, 0x003f, 0xbfcc, 0x003f, - 0x003f, 0x003f, 0xbfcb, 0x003f, 0xc1bb, 0xee79, 0xee7b, 0xee7a, - 0x003f, 0x003f, 0xc2d1, 0x003f, 0x003f, 0x003f, 0xf2f4, 0xf2f3, - 0x003f, 0xf4cc, 0xc4b1, 0x003f, 0x003f, 0xc4fd, 0xf754, 0xf753, - 0xc65b, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xa8a4, 0xd0af, 0xad6f, 0xd7c8, 0xd7c6, 0x003f, - 0x003f, 0xd7c7, 0xdbd4, 0xdbd5, 0xe043, 0xdbd3, 0x003f, 0xdffc, - 0xe041, 0xe040, 0xe042, 0xb8d1, 0xdffe, 0xdffd, 0xe044, 0x003f, - 0xe449, 0xe447, 0x003f, 0xe448, 0xe7d3, 0xe7d1, 0x003f, 0x003f, - 0xe7d2, 0xeb7d, 0xee7c, 0xee7d, 0xc2d2, 0x003f, 0xf2f5, 0xf4cd, - 0xc4b2, 0x003f, 0xf64c, 0xf755, 0xc5a9, 0x003f, 0xf7fe, 0xf94c, - /* 0x8a00 .. 0x8aff */ - 0xa8a5, 0x003f, 0xad71, 0xad72, 0xd0b0, 0x003f, 0x003f, 0xd0b1, - 0xad70, 0x003f, 0xb054, 0x003f, 0xb052, 0x003f, 0xb051, 0xb058, - 0xb050, 0xb059, 0xd3dd, 0xb056, 0x003f, 0xb053, 0xb057, 0xb055, - 0xb04f, 0x003f, 0x003f, 0xb35f, 0x003f, 0xb359, 0xd7cc, 0xb35e, - 0x003f, 0x003f, 0xb360, 0xb35a, 0x003f, 0xb35b, 0x003f, 0xd7ca, - 0x003f, 0x003f, 0xb358, 0x003f, 0xd7cb, 0xb35d, 0x003f, 0x003f, - 0xd7c9, 0xb35c, 0x003f, 0x003f, 0xb644, 0x003f, 0xb646, 0x003f, - 0x003f, 0xdbd8, 0xb645, 0xb5f9, 0xb5fd, 0x003f, 0xb8e4, 0xe049, - 0xdbda, 0xb5fe, 0x003f, 0x003f, 0xdbdd, 0xdbde, 0xb643, 0x003f, - 0xdbe0, 0x003f, 0xdbe2, 0x003f, 0xdbe3, 0xdbd7, 0xdbd6, 0xdbe4, - 0xb642, 0xdbe1, 0xdbdf, 0x003f, 0xb640, 0xb5fb, 0xb647, 0xdbdb, - 0xdbdc, 0xdbd9, 0x003f, 0xb641, 0x003f, 0x003f, 0xb5fc, 0x003f, - 0xb5fa, 0xe048, 0xb8df, 0xb8da, 0x003f, 0x003f, 0xb8d5, 0x003f, - 0xb8e5, 0xb8d6, 0x003f, 0xb8d2, 0xb8e1, 0xb8de, 0xb8e0, 0x003f, - 0xb8d7, 0xb8dc, 0xb8d3, 0xb8d4, 0xe050, 0xe04d, 0xe045, 0xe04a, - 0x003f, 0xb8e2, 0xe051, 0xb8e3, 0xb8d9, 0x003f, 0x003f, 0xe047, - 0x003f, 0xe04f, 0xe04b, 0xe04e, 0xe04c, 0xb8dd, 0xe046, 0xb8d8, - 0x003f, 0x003f, 0x003f, 0xe44c, 0xbb78, 0xbb7b, 0x003f, 0xe44e, - 0x003f, 0xbba5, 0xe44d, 0xbb7d, 0x003f, 0xbdcf, 0xe44f, 0x003f, - 0xbba4, 0xe44b, 0xbba6, 0x003f, 0x003f, 0x003f, 0xbb79, 0x003f, - 0xb8db, 0xbb7c, 0x003f, 0xbb7a, 0xbb7e, 0xbba2, 0xbb77, 0xbba7, - 0xbba3, 0x003f, 0xbba1, 0xe44a, 0x003f, 0x003f, 0x003f, 0x003f, - 0xbdd6, 0x003f, 0xbdd2, 0x003f, 0x003f, 0x003f, 0xbdd9, 0x003f, - 0xe7d6, 0xbdda, 0xe7e2, 0xe7db, 0xbdcb, 0xe7e3, 0xe7dd, 0xbdd5, - 0xe7de, 0x003f, 0xbdd4, 0xe7e1, 0xbdce, 0xe7df, 0xe7d5, 0xbdcd, - 0xebaa, 0xbdd3, 0x003f, 0xbdd0, 0x003f, 0xbdd8, 0x003f, 0xe7d4, - 0x003f, 0xe7d8, 0xbdcc, 0xe7d7, 0xe7d9, 0xe7da, 0xbdd7, 0xe7dc, - 0xe7e0, 0xe7e4, 0x003f, 0xbddb, 0xbfd2, 0xeba5, 0xebab, 0xeba8, - 0xeb7e, 0xebac, 0xeba1, 0x003f, 0xeba7, 0x003f, 0xbfcd, 0xbfd3, - 0xebad, 0x003f, 0x003f, 0xbfcf, 0x003f, 0xbfd9, 0xbfd4, 0xebaf, - 0xeba9, 0xbfd0, 0xeba2, 0xbfda, 0xeba3, 0xeba4, 0xbfdb, 0xbfd8, - 0xbdd1, 0x003f, 0xbfce, 0xebb0, 0xbfdc, 0x003f, 0xbfd5, 0xebae, - /* 0x8b00 .. 0x8bff */ - 0xbfd1, 0xbfd6, 0xbfd7, 0x003f, 0xc1c3, 0xeea4, 0xeead, 0xeeaa, - 0xeeac, 0x003f, 0xc1c0, 0xeea5, 0x003f, 0xeeab, 0xc1bc, 0xeea7, - 0xc1c4, 0xeea3, 0xeea8, 0xeeaf, 0xeba6, 0xeea9, 0xeea2, 0xc1bd, - 0xeea1, 0xc1be, 0xeeb0, 0xc1bf, 0xeeae, 0xc1c2, 0xee7e, 0x003f, - 0xc1c1, 0x003f, 0xeea6, 0xf0dc, 0xf0ea, 0xf0e5, 0xf0e7, 0xf0db, - 0xc2d3, 0x003f, 0xf0da, 0xc2d6, 0xc2d5, 0x003f, 0xf0e9, 0xf0e1, - 0xf0de, 0xf0e4, 0x003f, 0xf0dd, 0x003f, 0xf0df, 0xf0e8, 0xf0e6, - 0x003f, 0xc2d4, 0xf0ed, 0xf0eb, 0xf0e2, 0xf0ec, 0xf0e3, 0x003f, - 0xf2f9, 0xc3cf, 0xf341, 0x003f, 0x003f, 0xf64f, 0xc3d6, 0xf0e0, - 0xf2f7, 0xc3d2, 0xf2f8, 0xf2fd, 0x003f, 0x003f, 0xc3d4, 0xc3d5, - 0xf2f6, 0xf340, 0xf342, 0xf2fa, 0xf2fc, 0xf2fe, 0xf2fb, 0xf343, - 0xc3d1, 0xc3d7, 0xc3d3, 0x003f, 0xc3d0, 0xf4d0, 0x003f, 0xc4b7, - 0xf4ce, 0x003f, 0x003f, 0xf4d2, 0x003f, 0xf4d3, 0xc4b5, 0xf4d4, - 0xf4d1, 0x003f, 0xf4cf, 0xc4b8, 0xc4b4, 0xf4d5, 0x003f, 0xc4b6, - 0xc4b3, 0x003f, 0x003f, 0x003f, 0xc4fe, 0x003f, 0x003f, 0xc540, - 0xf64e, 0xf64d, 0xf650, 0xf651, 0x003f, 0xc541, 0xf756, 0xf75b, - 0xc5aa, 0x003f, 0xf758, 0x003f, 0xf757, 0xf75a, 0xf759, 0x003f, - 0xf843, 0x003f, 0xc5dc, 0xf842, 0xf840, 0x003f, 0xf841, 0x003f, - 0x003f, 0x003f, 0xc5fe, 0xc5fd, 0xf8c1, 0xf8c2, 0xc640, 0x003f, - 0xf94d, 0xf94e, 0xc667, 0x003f, 0xc66d, 0x003f, 0xf9a9, 0xf9c8, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x8c00 .. 0x8cff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xa8a6, - 0x003f, 0xd7cd, 0x003f, 0xd7ce, 0xe052, 0xe450, 0xe7e5, 0xc1c6, - 0x003f, 0xc1c5, 0xf0ee, 0xf344, 0x003f, 0xf844, 0xa8a7, 0xd3de, - 0xb05a, 0xb361, 0xe054, 0xe053, 0xbddc, 0xe7e6, 0xbddd, 0xeeb1, - 0xc2d7, 0x003f, 0x003f, 0x003f, 0xc676, 0xa8a8, 0xcdcb, 0xd3df, - 0x003f, 0x003f, 0xb362, 0x003f, 0xd7cf, 0xd7d0, 0x003f, 0xdbe5, - 0x003f, 0xb648, 0xb8e6, 0x003f, 0xe056, 0xe055, 0xe057, 0x003f, - 0xe451, 0xe452, 0xbba8, 0xbfdd, 0xbdde, 0xbfde, 0x003f, 0xeeb5, - 0xeeb2, 0xeeb4, 0xeeb3, 0xc1c7, 0x003f, 0xf0ef, 0xf346, 0xf345, - 0xcba4, 0xb05c, 0xb05b, 0xd3e0, 0x003f, 0xd7d1, 0x003f, 0x003f, - 0xdbe7, 0xdbe6, 0xb649, 0x003f, 0xe059, 0xe05a, 0xe058, 0x003f, - 0x003f, 0xb8e8, 0xb8e7, 0x003f, 0xbbaa, 0xbba9, 0x003f, 0xe7e7, - 0xebb3, 0xebb1, 0xebb2, 0xbfdf, 0xeeb7, 0xeeb6, 0x003f, 0xf0f2, - 0xf0f1, 0xf0f0, 0xf347, 0x003f, 0xf9aa, 0xa8a9, 0xad73, 0x003f, - 0xad74, 0xb05d, 0xb05e, 0xd3e2, 0xd3e1, 0xd7d2, 0x003f, 0xb368, - 0xb366, 0xb363, 0xb367, 0xb365, 0xb364, 0x003f, 0x003f, 0xb64a, - 0xdbea, 0x003f, 0xb8ed, 0xb64c, 0xb651, 0xdbec, 0xb653, 0xb652, - 0xb655, 0xdbeb, 0xdbe8, 0xb64f, 0xb64b, 0xb64d, 0xdbe9, 0xb654, - 0xb650, 0xb64e, 0xb8ef, 0xb8ee, 0xb8ec, 0xb8f0, 0x003f, 0xb8ea, - 0xb8eb, 0x003f, 0xb8e9, 0x003f, 0xe05b, 0x003f, 0x003f, 0xe454, - 0x003f, 0xbbac, 0xbbad, 0xbbab, 0x003f, 0xe453, 0x003f, 0xe455, - 0x003f, 0xe7ea, 0xe7ec, 0x003f, 0xbde7, 0xe7ed, 0xbde0, 0xe7e9, - 0xbddf, 0xbde9, 0xbde5, 0xbde6, 0xbde2, 0xe7e8, 0xbde1, 0xe7ee, - 0xe7eb, 0x003f, 0xbde8, 0x003f, 0xbde3, 0xbde4, 0xebb5, 0x003f, - 0xebb7, 0xebb6, 0x003f, 0xebb8, 0xbfe0, 0xebb4, 0x003f, 0x003f, - 0xc1cb, 0xeeb8, 0xc1c8, 0xc1cc, 0xc1ca, 0xc1c9, 0xf0f3, 0x003f, - /* 0x8d00 .. 0x8dff */ - 0xf0f6, 0x003f, 0xf0f5, 0x003f, 0xf0f4, 0xc2d8, 0xf348, 0xf349, - 0xc3d8, 0xf34a, 0xc3d9, 0x003f, 0x003f, 0xc4ba, 0x003f, 0xc4b9, - 0xf652, 0x003f, 0x003f, 0xc542, 0xf653, 0xf75c, 0xc5ab, 0xc5ac, - 0x003f, 0xf845, 0x003f, 0xc642, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa8aa, 0x003f, 0xb36a, 0xb369, - 0xe05c, 0xe05d, 0x003f, 0xbbae, 0xebb9, 0xbdea, 0xebba, 0xeeb9, - 0xa8ab, 0x003f, 0xd0b2, 0xad76, 0xad75, 0x003f, 0xd3e3, 0xb05f, - 0xd3e4, 0xd7d5, 0x003f, 0xd7d4, 0x003f, 0xd7d3, 0x003f, 0x003f, - 0xdbee, 0xb658, 0x003f, 0x003f, 0xdbed, 0xb657, 0x003f, 0x003f, - 0x003f, 0xdbef, 0xb656, 0x003f, 0xe05f, 0xe062, 0xe060, 0xe061, - 0xe065, 0xe05e, 0xe066, 0xe063, 0xe064, 0xbbb0, 0xe456, 0x003f, - 0x003f, 0xbbaf, 0x003f, 0xe7f2, 0xe7f0, 0x003f, 0x003f, 0xbdeb, - 0xe7ef, 0xe7f1, 0x003f, 0xbdec, 0x003f, 0xebbb, 0x003f, 0xebbc, - 0xc1cd, 0x003f, 0xf34c, 0xf34e, 0xf34b, 0xf34d, 0xf4d6, 0xf654, - 0x003f, 0x003f, 0xf96f, 0xa8ac, 0xad77, 0xd3e5, 0xd3e7, 0xd3e6, - 0x003f, 0xd7d8, 0xb36c, 0x003f, 0xd7d6, 0x003f, 0xb36b, 0xd7d9, - 0x003f, 0xd7da, 0xd7d7, 0x003f, 0x003f, 0xdbfb, 0xb660, 0xdbf3, - 0xdbf9, 0x003f, 0x003f, 0xb65b, 0xb65e, 0xdbf2, 0xb659, 0xdbf6, - 0xe06c, 0xb65d, 0x003f, 0xdbf1, 0x003f, 0xdbf7, 0xdbf4, 0xdbfa, - 0xdbf0, 0xdbf8, 0xb65c, 0xb65f, 0xdbf5, 0xb65a, 0x003f, 0xb8f2, - 0xe068, 0xb8f1, 0xe06f, 0xe06e, 0xb8f8, 0x003f, 0xb8f9, 0xe070, - 0xb8f3, 0xe06d, 0xb8f7, 0xe072, 0xe069, 0x003f, 0xe06b, 0xb8f4, - 0xe067, 0xe06a, 0xe071, 0xb8f5, 0xe073, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb8f6, 0x003f, 0xbbb1, 0xe45b, 0xe461, 0xe459, - /* 0x8e00 .. 0x8eff */ - 0xe462, 0x003f, 0xe458, 0xe45d, 0xe463, 0xe460, 0xe45f, 0xe45e, - 0x003f, 0xe457, 0xe45c, 0x003f, 0x003f, 0xe45a, 0x003f, 0xbdf1, - 0xbdee, 0xe7fb, 0xe841, 0xe843, 0xe840, 0xe7f8, 0xe7fa, 0xe845, - 0xe842, 0xe7fc, 0xe846, 0xe7f9, 0xe844, 0xbdef, 0xbdf5, 0xbdf3, - 0xe7f3, 0xbdf4, 0xbdf0, 0xe7f4, 0xe7f6, 0xe7f5, 0xe7fd, 0xe7fe, - 0x003f, 0xbdf2, 0x003f, 0xbded, 0x003f, 0x003f, 0xe7f7, 0x003f, - 0xebc6, 0xbfe2, 0x003f, 0xebbd, 0xbfe3, 0xbfe6, 0xebc2, 0x003f, - 0xebbf, 0xbfe5, 0x003f, 0x003f, 0xebc3, 0xebc4, 0xebbe, 0xebc7, - 0xebc0, 0xebc5, 0xbfe4, 0x003f, 0xbfe1, 0xebc1, 0x003f, 0xeebf, - 0xc1d0, 0xc1ce, 0xc1d1, 0xc1cf, 0xeebe, 0xeebb, 0xeeba, 0x003f, - 0xeebd, 0x003f, 0x003f, 0xeebc, 0xf145, 0xc2de, 0xf0fb, 0xf0fa, - 0x003f, 0xc2d9, 0xf141, 0xf140, 0xf0f7, 0xf143, 0xf0fc, 0xc2dd, - 0xf0f9, 0xf142, 0xf0f8, 0xc2da, 0xc2dc, 0xf0fd, 0xc2db, 0xf0fe, - 0x003f, 0xf144, 0xf352, 0x003f, 0xc3de, 0xf34f, 0x003f, 0xf353, - 0x003f, 0x003f, 0xc3db, 0xf351, 0xc3e0, 0x003f, 0xc3dd, 0x003f, - 0xf350, 0x003f, 0xc3df, 0xf354, 0xc3da, 0x003f, 0x003f, 0x003f, - 0x003f, 0xc4bc, 0xc4be, 0x003f, 0xf4d9, 0xc4bd, 0xf4d7, 0xc3dc, - 0xf4d8, 0xc4bb, 0xc543, 0xc545, 0xf656, 0xc544, 0xf655, 0x003f, - 0xf761, 0xc5ad, 0xf760, 0xc5ae, 0xf75e, 0xf75d, 0xf762, 0xf763, - 0xf846, 0x003f, 0xf75f, 0x003f, 0x003f, 0xf8c6, 0xf8c3, 0xf8c4, - 0xf8c5, 0xc65c, 0x003f, 0xf951, 0xf950, 0xf94f, 0xf970, 0x003f, - 0xf9be, 0xf9ab, 0xc66e, 0xa8ad, 0xb060, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb8fa, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xbdf6, 0x003f, 0x003f, 0xebc8, 0x003f, 0x003f, - 0xc2df, 0x003f, 0xf355, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xf9ac, 0xa8ae, 0xaaee, 0xad79, 0xad78, 0x003f, 0xb063, - 0x003f, 0xd3e8, 0xb061, 0xd3e9, 0xb062, 0x003f, 0x003f, 0xd7df, - 0xd7db, 0x003f, 0x003f, 0xb36d, 0xd7de, 0xd7dd, 0xd7dc, 0xb36e, - 0xd7e0, 0xd7e1, 0x003f, 0x003f, 0x003f, 0xdc43, 0xdc41, 0xdc45, - 0xdc46, 0xdc4c, 0x003f, 0xdc48, 0xdc4a, 0x003f, 0xdc42, 0xdbfc, - 0x003f, 0xdc49, 0x003f, 0x003f, 0xdc4b, 0xdc44, 0xdc47, 0xdbfd, - 0xb662, 0xdc40, 0xdbfe, 0xb661, 0xb663, 0x003f, 0xb8fd, 0xe075, - /* 0x8f00 .. 0x8fff */ - 0xe077, 0xe076, 0xe07b, 0xb8fb, 0x003f, 0xe078, 0xe074, 0xe079, - 0xe07a, 0xb8fc, 0xb8fe, 0xe07c, 0x003f, 0xe467, 0xe466, 0x003f, - 0xe464, 0xe465, 0xbbb3, 0xbbb5, 0xbbb2, 0xbbb4, 0xe84d, 0xe84e, - 0xe849, 0x003f, 0xe84a, 0xbdf8, 0xbdfd, 0xbdf7, 0xbdfe, 0xbdf9, - 0xe84b, 0x003f, 0x003f, 0xe84c, 0xe848, 0xbe40, 0xbdfb, 0x003f, - 0x003f, 0xbdfa, 0xbdfc, 0x003f, 0xe847, 0x003f, 0xebca, 0xbfe8, - 0x003f, 0x003f, 0xebcc, 0xbfea, 0xebcf, 0xebcb, 0xebc9, 0xebce, - 0xbfe9, 0xebcd, 0x003f, 0xbfe7, 0x003f, 0x003f, 0xc1d3, 0xc1d6, - 0xeec1, 0x003f, 0xc1d4, 0xeec0, 0xc1d2, 0xc1d5, 0xf146, 0xf147, - 0xf148, 0xc2e0, 0x003f, 0xf149, 0x003f, 0xc2e1, 0xc3e2, 0xf358, - 0xf359, 0xf357, 0xf356, 0xf35a, 0xc3e1, 0xf4dd, 0xf4db, 0xf4dc, - 0xf4de, 0xf4da, 0xf4df, 0xf658, 0x003f, 0xf659, 0xf657, 0xc546, - 0xf764, 0xc5af, 0xf765, 0xf848, 0xf847, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xa8af, 0xb664, 0x003f, 0x003f, 0xb940, - 0x003f, 0x003f, 0x003f, 0xbbb6, 0x003f, 0x003f, 0xbfec, 0x003f, - 0xbfeb, 0x003f, 0x003f, 0x003f, 0x003f, 0xc3e3, 0xc47c, 0xc547, - 0xa8b0, 0xb064, 0xb941, 0x003f, 0xf35b, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xcba6, - 0x003f, 0x003f, 0xa8b1, 0x003f, 0xa8b4, 0xa8b3, 0xa8b2, 0x003f, - 0x003f, 0xcba5, 0x003f, 0xcdcd, 0x003f, 0xcdcf, 0xaaef, 0x003f, - 0x003f, 0xaaf1, 0xcdcc, 0xcdce, 0xaaf0, 0xcdd1, 0xcdd0, 0xcdd2, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xd0b6, 0xd0b4, 0xad7c, 0xd0b3, 0xada3, 0xad7e, 0xad7b, 0x003f, - 0xada4, 0x003f, 0xad7d, 0xada2, 0x003f, 0xada1, 0xd0b5, 0x003f, - 0xad7a, 0x003f, 0x003f, 0x003f, 0xb06a, 0xd3eb, 0xd3f1, 0xb067, - 0xb06e, 0x003f, 0xb069, 0xd3ee, 0xd3f0, 0xb06c, 0xd3ea, 0xd3ed, - /* 0x9000 .. 0x90ff */ - 0xb068, 0xb065, 0xd3ec, 0xb06b, 0xd3ef, 0xb06d, 0xb066, 0x003f, - 0x003f, 0x003f, 0x003f, 0xd7e3, 0xd7e6, 0xb370, 0x003f, 0xb37a, - 0xb376, 0xd7e4, 0x003f, 0x003f, 0xb37e, 0xb377, 0xb37c, 0xb372, - 0x003f, 0xb36f, 0xb371, 0xb37d, 0xd7e5, 0xb375, 0xb378, 0xb374, - 0xb379, 0xd7e7, 0xb37b, 0xb373, 0xd7e2, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xdc4d, 0xb665, 0xdc4f, - 0x003f, 0xb667, 0xb669, 0x003f, 0xdc4e, 0xb666, 0xb66a, 0x003f, - 0xb668, 0x003f, 0x003f, 0x003f, 0xb947, 0xe0a3, 0xb94f, 0xe07e, - 0x003f, 0xb950, 0xb945, 0x003f, 0xe0a1, 0x003f, 0x003f, 0xb94a, - 0x003f, 0xe0a2, 0xb943, 0xb942, 0x003f, 0xb94d, 0xb94c, 0xb94b, - 0xb949, 0xb94e, 0xe07d, 0xb944, 0xb946, 0xb948, 0x003f, 0x003f, - 0xbbb8, 0xbbbb, 0x003f, 0xbbbf, 0xbbb9, 0xbbbe, 0xbbbc, 0x003f, - 0xbbb7, 0x003f, 0xbbbd, 0xbbba, 0x003f, 0x003f, 0x003f, 0xe852, - 0xbe43, 0xbe41, 0x003f, 0xe853, 0x003f, 0xbe44, 0xbe42, 0xe851, - 0xe850, 0x003f, 0xbff0, 0xe84f, 0xbfee, 0xbfed, 0xebd0, 0xbe45, - 0xbfef, 0xebd1, 0xbff2, 0xebd2, 0xbff1, 0xc1d8, 0xeec3, 0xc1d7, - 0xc1dc, 0xc1da, 0xc1db, 0xc2e3, 0xc1d9, 0xeec2, 0xebd3, 0xc2e2, - 0xc2e4, 0x003f, 0xc3e4, 0xc3e5, 0x003f, 0xf4e0, 0x003f, 0xc5de, - 0xc5dd, 0xa8b6, 0x003f, 0x003f, 0xca55, 0xb06f, 0x003f, 0xca52, - 0xca53, 0xca51, 0x003f, 0xca54, 0x003f, 0x003f, 0xcbaa, 0xcba7, - 0xcbac, 0xcba8, 0xa8b7, 0xa8ba, 0x003f, 0xcba9, 0xa8b9, 0xcbab, - 0x003f, 0x003f, 0xa8b8, 0x003f, 0x003f, 0x003f, 0x003f, 0xcdd5, - 0xcdd7, 0xaaf4, 0xcdd3, 0xcdd6, 0xcdd4, 0xaaf2, 0xaaf5, 0x003f, - 0xaaf3, 0x003f, 0x003f, 0x003f, 0x003f, 0xd0b8, 0xd0bc, 0xd0b9, - 0x003f, 0xada7, 0x003f, 0xada8, 0x003f, 0xd0bb, 0x003f, 0xd0bd, - 0xd0bf, 0x003f, 0xada5, 0xd0be, 0x003f, 0x003f, 0xada6, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xd7ee, 0xd0ba, 0xd3f2, 0xd3fb, - 0xd3f9, 0xd3f4, 0xd3f5, 0xd3fa, 0xd3fc, 0xb071, 0x003f, 0xd3f7, - 0xd3f3, 0xb070, 0xb072, 0xd3f6, 0xd3fd, 0xd3f8, 0x003f, 0x003f, - 0xb3a1, 0xd7f1, 0xd7e9, 0xd7ef, 0xd7f0, 0xb3a2, 0x003f, 0xd7e8, - 0xd7ea, 0xd0b7, 0xd7ec, 0xd7ed, 0xd7eb, 0xb66c, 0x003f, 0x003f, - 0x003f, 0xdc56, 0xebd4, 0xdc57, 0xdc54, 0xb3a3, 0xb66e, 0xdc53, - /* 0x9100 .. 0x91ff */ - 0xdc59, 0xdc58, 0xb66b, 0xdc5c, 0xdc52, 0xdc5b, 0xdc50, 0xdc5a, - 0xdc55, 0xb66d, 0x003f, 0xe0aa, 0x003f, 0xe0a5, 0xe0ab, 0xe0a6, - 0xe0a4, 0xe0a7, 0xb951, 0x003f, 0xe0a9, 0x003f, 0xe0a8, 0xb952, - 0xbbc1, 0xbbc0, 0xe46e, 0xe471, 0xe469, 0xe46d, 0xbbc2, 0xe46c, - 0xe46a, 0xe470, 0xe46b, 0xe468, 0xe46f, 0x003f, 0xe859, 0xbe48, - 0xf14a, 0xe856, 0xe857, 0xe855, 0xdc51, 0xbe47, 0xe85a, 0xe854, - 0xbe46, 0xbe49, 0xe858, 0xebd5, 0xbff3, 0xebd6, 0xebd7, 0x003f, - 0xeec4, 0xc1dd, 0xf14b, 0xf14c, 0x003f, 0x003f, 0xf14d, 0xf35d, - 0xf35c, 0xf4e2, 0x003f, 0xf4e1, 0xf65b, 0xf65c, 0xf65a, 0xf766, - 0xc5b0, 0xa8bb, 0xadaa, 0xada9, 0xb075, 0xb074, 0xd440, 0xd441, - 0xd3fe, 0x003f, 0xb073, 0xd7f5, 0x003f, 0xd7f6, 0xd7f2, 0xb3a4, - 0xd7f3, 0x003f, 0xd7f4, 0x003f, 0x003f, 0x003f, 0x003f, 0xdc5f, - 0xdc61, 0xdc5d, 0xdc60, 0xb66f, 0xdc5e, 0xb670, 0x003f, 0x003f, - 0xdd73, 0xb955, 0xb954, 0x003f, 0xb953, 0x003f, 0xe0ac, 0xe0ad, - 0x003f, 0x003f, 0xe473, 0xe475, 0xbbc6, 0xbbc3, 0x003f, 0xbbc5, - 0xbbc4, 0xe474, 0xe472, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xe861, 0xe85e, 0xe85f, 0xbe4d, 0xe860, 0xe85b, 0xe85c, 0xbe4a, - 0x003f, 0xbe4b, 0xe85d, 0xbe4c, 0x003f, 0xebdb, 0x003f, 0xebdc, - 0xebd9, 0xebda, 0xbff4, 0xebd8, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xeec8, 0xeec5, 0xeec7, 0xc1e0, 0xeecb, 0xc1df, 0xeec9, - 0xeecc, 0xeeca, 0xeec6, 0xc1de, 0x003f, 0xf14f, 0x003f, 0xf150, - 0xf14e, 0x003f, 0xf152, 0xc2e5, 0xc2e6, 0xf35f, 0xc3e7, 0xf151, - 0xf35e, 0xc3e6, 0xf4e5, 0xf4e6, 0xc4bf, 0xf4e4, 0x003f, 0xf4e3, - 0x003f, 0xf65d, 0xc548, 0x003f, 0xf849, 0xf8c8, 0xf8c7, 0x003f, - 0xc643, 0xc65d, 0xf8c9, 0xf971, 0x003f, 0xc66f, 0xa8bc, 0xaaf6, - 0x003f, 0xb956, 0x003f, 0xc4c0, 0xa8bd, 0xadab, 0xb3a5, 0xb671, - 0xc2e7, 0xaaf7, 0x003f, 0xd0c1, 0xd0c0, 0xd442, 0x003f, 0xb078, - 0xb076, 0xb07a, 0xd444, 0x003f, 0xb079, 0xb077, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd443, 0xb3a8, 0xd7fc, 0x003f, 0xb3a7, 0xb3a9, - 0xd842, 0xb3ab, 0xd7fe, 0xd840, 0xd7f7, 0xb3aa, 0xd843, 0x003f, - 0x003f, 0xd7f9, 0x003f, 0xd7fa, 0xd7f8, 0xb3a6, 0x003f, 0xd841, - 0xd7fb, 0xd7fd, 0x003f, 0x003f, 0x003f, 0xdc6d, 0x003f, 0xdc6c, - /* 0x9200 .. 0x92ff */ - 0xdc6a, 0xdc62, 0xdc71, 0xdc65, 0xdc6f, 0xdc76, 0xdc6e, 0xb679, - 0x003f, 0xb675, 0xdc63, 0x003f, 0xdc69, 0xb677, 0x003f, 0xdc68, - 0xb678, 0xb67a, 0xdc6b, 0x003f, 0xb672, 0xb673, 0xdc77, 0xdc75, - 0x003f, 0xdc74, 0xdc66, 0x003f, 0xdc72, 0x003f, 0xb676, 0x003f, - 0x003f, 0x003f, 0x003f, 0xb674, 0xdc73, 0xdc64, 0xdc67, 0xdc70, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xe4ba, 0xe0b7, 0x003f, - 0xe0b0, 0xe0c3, 0xe0cc, 0xe0b3, 0xb961, 0x003f, 0xe0c0, 0xb957, - 0xb959, 0xb965, 0xe0b1, 0x003f, 0x003f, 0xb95a, 0xb95c, 0xb966, - 0xb95b, 0x003f, 0x003f, 0x003f, 0x003f, 0xb964, 0xe0b9, 0x003f, - 0xe0ae, 0xb962, 0xe0b8, 0xb95e, 0xe0ca, 0xb963, 0xe0c8, 0xe0bc, - 0xe0c6, 0xb960, 0xe0af, 0xe0c9, 0xe0c4, 0x003f, 0xe0cb, 0xb958, - 0x003f, 0x003f, 0xb967, 0xb95d, 0x003f, 0x003f, 0xe0b5, 0x003f, - 0xe0bd, 0xe0c1, 0x003f, 0xe0c5, 0xb95f, 0xe0b4, 0xe0b2, 0xe0be, - 0x003f, 0x003f, 0x003f, 0x003f, 0xe0bb, 0xe0ba, 0x003f, 0xe0bf, - 0xe0c2, 0x003f, 0xe0c7, 0x003f, 0x003f, 0x003f, 0xe478, 0x003f, - 0xbbc7, 0xe4a4, 0xe47a, 0xbbcc, 0xbbd0, 0xe4ad, 0xe4b5, 0xe4a6, - 0xbbc8, 0x003f, 0xe4aa, 0xe0b6, 0x003f, 0xbbc9, 0xe4b1, 0xe4b6, - 0xe4ae, 0x003f, 0xe4b0, 0xe4b9, 0xe4b2, 0xe47e, 0xe4a9, 0x003f, - 0x003f, 0xbbd1, 0x003f, 0xbbcd, 0xe47c, 0xe4ab, 0xbbcb, 0xe4a5, - 0xbbca, 0xe4b3, 0xe4a2, 0xe479, 0xbbce, 0xe4b8, 0x003f, 0x003f, - 0xe47b, 0xe4af, 0xe4ac, 0xe4a7, 0xe477, 0xe476, 0xe4a1, 0xe4b4, - 0xbbcf, 0xe4b7, 0xe47d, 0xe4a3, 0xbe52, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xbe5a, 0xbe55, 0xe8a4, 0xe8a1, 0xe867, 0xbe50, - 0x003f, 0xf9d7, 0x003f, 0xbe4f, 0xbe56, 0x003f, 0x003f, 0x003f, - 0xe865, 0xbe54, 0xe871, 0xe863, 0xe864, 0xbe4e, 0xe8a3, 0xbe58, - 0xe874, 0xe879, 0xe873, 0xebee, 0xe86f, 0xe877, 0xe875, 0xe868, - 0xe862, 0xe87d, 0xbe57, 0xe87e, 0x003f, 0xe878, 0x003f, 0xe86d, - 0xe86b, 0xe866, 0x003f, 0x003f, 0x003f, 0xe86e, 0xe87b, 0xe86a, - 0xe87a, 0xe8a2, 0x003f, 0x003f, 0xbe53, 0x003f, 0xe876, 0xe87c, - 0xe872, 0xe86c, 0xbe51, 0x003f, 0x003f, 0x003f, 0xe4a8, 0xe870, - 0xbe59, 0xe869, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xebf4, - 0xbff7, 0xebf3, 0xebf0, 0xec44, 0xbffb, 0x003f, 0xec41, 0xebf8, - /* 0x9300 .. 0x93ff */ - 0xec43, 0xebe9, 0xebf6, 0x003f, 0xbffd, 0x003f, 0xebe1, 0x003f, - 0xebdf, 0xec42, 0x003f, 0xec40, 0xebfe, 0xebed, 0xebec, 0xebe2, - 0xc040, 0x003f, 0xebe8, 0xebf2, 0xebfd, 0xc043, 0xec45, 0x003f, - 0xc1e8, 0xc045, 0xbffe, 0xebe6, 0x003f, 0xebef, 0xebde, 0xebe0, - 0xbff5, 0xc042, 0xbffa, 0xebe7, 0xebf7, 0xebf1, 0xc041, 0xebdd, - 0xc1e3, 0xebf9, 0xebfc, 0xbffc, 0x003f, 0xebeb, 0xc044, 0xbff9, - 0x003f, 0x003f, 0x003f, 0xbff8, 0xebf5, 0xebfb, 0xbff6, 0x003f, - 0xebe4, 0xebfa, 0x003f, 0x003f, 0xebe5, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xebea, 0xeed2, - 0x003f, 0xeed7, 0xc1e5, 0xc1e7, 0xeedd, 0xc1e1, 0xeeec, 0xeee3, - 0xeed8, 0xeed9, 0xeee2, 0x003f, 0xc1ee, 0xeee1, 0xeed1, 0xeee0, - 0xeed4, 0xeeed, 0xc1ed, 0xc1eb, 0xeed5, 0x003f, 0xeee8, 0x003f, - 0xeeda, 0xeee7, 0x003f, 0xeee9, 0xeed0, 0xc1e6, 0x003f, 0xeeea, - 0x003f, 0x003f, 0xeede, 0x003f, 0xc1ea, 0xeedb, 0x003f, 0x003f, - 0xc1ec, 0xeee4, 0x003f, 0x003f, 0x003f, 0xc1e4, 0xeed6, 0xeee5, - 0x003f, 0xeedf, 0xebe3, 0xeee6, 0xeed3, 0x003f, 0xc1e9, 0x003f, - 0xeeeb, 0x003f, 0xc1e2, 0xeece, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf160, 0xf159, 0xc2e9, 0x003f, 0xf154, 0xf163, 0xf15b, 0xeedc, - 0x003f, 0xf165, 0xf155, 0x003f, 0xc2e8, 0xf15f, 0xc2ea, 0xc2f2, - 0xc2f0, 0xf161, 0xc2f1, 0xf157, 0x003f, 0xf158, 0xf15d, 0xf162, - 0x003f, 0xeecd, 0xc2eb, 0xf16a, 0xf167, 0xf16b, 0xf15e, 0xf15a, - 0xf168, 0xf36a, 0xf15c, 0x003f, 0xc2ee, 0x003f, 0xc2ed, 0xeecf, - 0xc2ef, 0xf164, 0xf166, 0xc2ec, 0xf169, 0xf153, 0x003f, 0xf156, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf373, 0x003f, 0xf363, 0xc3eb, 0xf371, 0x003f, 0x003f, 0xf361, - 0xc3ec, 0x003f, 0xf36c, 0x003f, 0xf368, 0xc3f1, 0xf372, 0xf362, - 0xf365, 0xc3e9, 0xf374, 0x003f, 0xf36d, 0xf370, 0xc3ef, 0xc3f4, - 0xc3f2, 0xf369, 0xf364, 0x003f, 0xc3ed, 0xc3ee, 0xf360, 0xc3ea, - 0x003f, 0xc3e8, 0xc3f0, 0xf36f, 0xc3f3, 0x003f, 0xf36b, 0xf375, - 0xc3f5, 0x003f, 0x003f, 0x003f, 0xf367, 0x003f, 0xf36e, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf4f3, 0xf542, 0xf4f5, - 0xf4fc, 0xf366, 0xf4fa, 0xf4e9, 0xf540, 0xc4c3, 0xf4ed, 0xf4fe, - /* 0x9400 .. 0x94ff */ - 0xf4f4, 0x003f, 0x003f, 0xc4c2, 0x003f, 0x003f, 0xf544, 0xf4f6, - 0x003f, 0xf4fb, 0xf4fd, 0xf4e7, 0xf541, 0xf4f2, 0xf4f7, 0xf4eb, - 0xf4ef, 0xf543, 0xf4f9, 0xf4e8, 0xf4ec, 0xf4ee, 0xf4f8, 0x003f, - 0xc4c1, 0xf4f1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf4ea, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xf4f0, 0xf661, 0xf666, 0xc54f, 0xf668, 0x003f, 0xc549, 0x003f, - 0xf664, 0xf66a, 0xc54e, 0xc54a, 0x003f, 0xc54b, 0xf660, 0xf667, - 0xc54d, 0xf665, 0xc54c, 0xf65f, 0xf663, 0xf662, 0x003f, 0xf65e, - 0xf669, 0x003f, 0x003f, 0x003f, 0xc5b1, 0xf76d, 0xf770, 0xf76c, - 0xf76e, 0xf76f, 0xf769, 0xf76a, 0xf767, 0x003f, 0x003f, 0xf76b, - 0xf768, 0xc5b2, 0xc5b3, 0x003f, 0x003f, 0xf84b, 0x003f, 0xf84d, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf84c, 0xf84e, 0x003f, - 0xc5e0, 0x003f, 0xf84a, 0xc5df, 0xc5e1, 0x003f, 0x003f, 0x003f, - 0xf8cb, 0xf8cc, 0xc644, 0xf8ca, 0x003f, 0xf953, 0xf952, 0xf954, - 0xc65f, 0xf955, 0xc65e, 0xf956, 0xf972, 0xf975, 0xf974, 0xc668, - 0xf973, 0x003f, 0x003f, 0x003f, 0xc672, 0xc670, 0xc671, 0xc677, - 0xf9c0, 0xf9c1, 0xf9bf, 0xf9c9, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9500 .. 0x95ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xaaf8, - 0x003f, 0x003f, 0xd844, 0xdc78, 0xe8a5, 0xf376, 0x003f, 0x003f, - 0xaaf9, 0x003f, 0xadac, 0xb07b, 0x003f, 0x003f, 0xd845, 0x003f, - 0xd846, 0xb3ac, 0x003f, 0xb67d, 0xdc7a, 0xdc79, 0xb6a3, 0xb67c, - 0xdc7b, 0xb67e, 0xb6a2, 0xb6a1, 0xb67b, 0x003f, 0x003f, 0x003f, - 0xb968, 0x003f, 0x003f, 0xe0d0, 0xe0ce, 0x003f, 0xe0cf, 0xe0cd, - 0x003f, 0xbbd2, 0x003f, 0xbbd5, 0xbbd7, 0xbbd6, 0x003f, 0x003f, - 0xbbd3, 0xbbd4, 0x003f, 0xe8a7, 0xe8a6, 0xbe5b, 0xe8a8, 0x003f, - 0xe8a9, 0xbe5c, 0x003f, 0x003f, 0x003f, 0xec4d, 0xec4b, 0xeef3, - 0x003f, 0xec49, 0xec4a, 0xc046, 0xec46, 0xec4e, 0xec48, 0xec4c, - 0xeeef, 0x003f, 0x003f, 0xeef1, 0x003f, 0xeef2, 0xc1f3, 0xeeee, - 0xc1f2, 0xeef0, 0xc1ef, 0xc1f0, 0xc1f1, 0xec47, 0x003f, 0x003f, - 0xc2f5, 0xf16e, 0xf16c, 0xf16d, 0xc2f3, 0xc2f6, 0xc2f4, 0x003f, - 0x003f, 0x003f, 0xf377, 0xf378, 0xc3f6, 0x003f, 0xf545, 0xf547, - 0xf546, 0xc4c4, 0xc550, 0xf66d, 0xf66c, 0xf66b, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0x9600 .. 0x96ff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xaafa, 0x003f, 0xc9aa, 0x003f, - 0xca58, 0xa6e9, 0xca56, 0xca59, 0xca57, 0x003f, 0x003f, 0x003f, - 0xcbae, 0x003f, 0xa8c1, 0x003f, 0xa8c2, 0xcbb0, 0xa8bf, 0xcbaf, - 0xcbad, 0xa8c0, 0xa8be, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xcdd8, 0xcddb, 0xaafd, 0xcdda, 0xcdd9, 0x003f, 0xaafc, - 0xaafb, 0x003f, 0xab40, 0xcddc, 0xaafe, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xd0c6, 0xadae, 0xadaf, 0xadb0, 0xd0c7, 0xd0c3, - 0xadad, 0xd0c4, 0x003f, 0xd0c5, 0xd0c2, 0x003f, 0x003f, 0x003f, - 0xb0a4, 0x003f, 0x003f, 0xb0a1, 0xd445, 0xb0a2, 0xb0a5, 0xd446, - 0x003f, 0xb07e, 0xb07c, 0xb07d, 0xb0a3, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xb3ad, 0xd849, 0xb3b5, 0xd848, 0x003f, 0xd84b, - 0xb3b1, 0xd84a, 0xb6ab, 0xb3af, 0xb3b2, 0xb3ae, 0xb3b3, 0xb3b4, - 0xb3b0, 0x003f, 0x003f, 0x003f, 0xd847, 0xb6a7, 0xdc7d, 0x003f, - 0xdca3, 0x003f, 0x003f, 0xdca2, 0xb6ac, 0xb6a8, 0xb6a9, 0xdc7c, - 0xdc7e, 0xdca1, 0xb6a4, 0xb6a6, 0x003f, 0xb6aa, 0xb6a5, 0x003f, - 0x003f, 0xe0d3, 0xe0d1, 0xe0d2, 0xb96a, 0xb96b, 0x003f, 0xe0d4, - 0xb969, 0xbbd8, 0x003f, 0xbbda, 0xbbd9, 0x003f, 0xe4bb, 0x003f, - 0x003f, 0xe4bc, 0xe8ab, 0x003f, 0xe8aa, 0x003f, 0x003f, 0xc047, - 0xc048, 0xec4f, 0xc049, 0x003f, 0xeef6, 0x003f, 0xeef4, 0x003f, - 0xeef5, 0xc1f4, 0x003f, 0xf16f, 0xc3f7, 0x003f, 0x003f, 0x003f, - 0xc1f5, 0xab41, 0x003f, 0xb0a6, 0xd447, 0x003f, 0x003f, 0xd84c, - 0xb3b6, 0xb6ad, 0xdca4, 0xdca6, 0xb6af, 0xb6ae, 0xb6b0, 0xb6b1, - 0xdca5, 0xb96e, 0xb96f, 0xb96d, 0xbbdb, 0xb96c, 0xe0d5, 0x003f, - 0x003f, 0x003f, 0xbbdc, 0xe8ac, 0xec50, 0xc04a, 0xc1f6, 0xf170, - 0xf174, 0xc2f9, 0xf171, 0xc2fa, 0xc2f8, 0xf175, 0xc2fb, 0xf173, - 0x003f, 0xf379, 0xc2f7, 0xc3f8, 0x003f, 0xf8cd, 0x003f, 0x003f, - 0xab42, 0xb3b8, 0xb3b7, 0x003f, 0x003f, 0x003f, 0x003f, 0xb6b2, - 0xdca8, 0xdca7, 0xb6b3, 0x003f, 0x003f, 0xe0d9, 0xb973, 0xb970, - 0xe0d8, 0xb972, 0xe0d6, 0xb971, 0x003f, 0xe0d7, 0x003f, 0xe4bd, - /* 0x9700 .. 0x97ff */ - 0xbbdd, 0x003f, 0xe8af, 0x003f, 0xbe5d, 0xe8ad, 0xbe5e, 0xbe5f, - 0xe8ae, 0xbe60, 0x003f, 0xec51, 0x003f, 0xc04e, 0xc04b, 0xc050, - 0xec53, 0xc04c, 0xec52, 0xc04f, 0x003f, 0x003f, 0xc04d, 0x003f, - 0xeef9, 0xeefb, 0x003f, 0x003f, 0xc1f7, 0xeefa, 0xc1f8, 0xeef8, - 0xeef7, 0x003f, 0xf177, 0xf176, 0xc2fc, 0xf178, 0xf37e, 0xc3fa, - 0xf37d, 0xf37a, 0xc3f9, 0xf37b, 0xf37c, 0x003f, 0xf548, 0xf549, - 0xc4c5, 0x003f, 0xc553, 0x003f, 0x003f, 0xf66e, 0x003f, 0x003f, - 0xc551, 0xc552, 0xf66f, 0x003f, 0x003f, 0xc5b4, 0xc5b5, 0xf771, - 0x003f, 0x003f, 0xc645, 0xf8cf, 0xc647, 0x003f, 0xf8ce, 0xf8d0, - 0xc646, 0xf957, 0x003f, 0xf9ad, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0xab43, 0x003f, 0x003f, 0x003f, 0xb974, 0x003f, - 0xe4be, 0x003f, 0xe8b0, 0xc051, 0xc052, 0x003f, 0xab44, 0x003f, - 0xbe61, 0xc3fb, 0xadb1, 0x003f, 0x003f, 0x003f, 0xc053, 0x003f, - 0xc5e2, 0xadb2, 0xd84d, 0x003f, 0xdca9, 0x003f, 0xdcab, 0x003f, - 0xdcaa, 0x003f, 0xe0dd, 0xe0da, 0xb975, 0x003f, 0xb976, 0xe0db, - 0xe0dc, 0x003f, 0xe4c0, 0xe4c5, 0xbbde, 0xe4bf, 0xe4c1, 0xe4c8, - 0xe4c3, 0xe4c7, 0xe4c4, 0xe4c2, 0xe4c6, 0xbbdf, 0x003f, 0x003f, - 0xe8b3, 0x003f, 0xe8b1, 0xbe63, 0x003f, 0xbe62, 0xe8b2, 0xbe64, - 0x003f, 0x003f, 0x003f, 0x003f, 0xec56, 0x003f, 0x003f, 0xec55, - 0xc054, 0xec54, 0xeefc, 0x003f, 0xeefe, 0xef41, 0xef40, 0x003f, - 0xc1f9, 0xeefd, 0xf1a1, 0xc2fd, 0xf17d, 0xf1a2, 0xc2fe, 0x003f, - 0xf17b, 0x003f, 0xf17e, 0xf17c, 0xf179, 0xc340, 0xf17a, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf3a1, 0x003f, 0x003f, 0xf3a3, 0xf3a2, - 0x003f, 0xf54a, 0x003f, 0xf54b, 0x003f, 0x003f, 0x003f, 0xf670, - 0x003f, 0xc5b7, 0x003f, 0xc5b6, 0xf84f, 0xf850, 0xc648, 0xf8d1, - 0x003f, 0xc669, 0x003f, 0xadb3, 0xb6b4, 0xe4ca, 0xe4c9, 0xe8b5, - 0xe8b4, 0x003f, 0x003f, 0xc1fa, 0xef43, 0xef42, 0xf1a5, 0xf1a3, - 0xf1a6, 0xf1a4, 0x003f, 0x003f, 0xc3fc, 0xf3a4, 0xf3a5, 0xf3a6, - 0x003f, 0xf671, 0x003f, 0xf772, 0x003f, 0xf8d2, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xadb4, 0x003f, 0x003f, - 0xec57, 0xef44, 0x003f, 0xadb5, 0x003f, 0x003f, 0xbbe0, 0x003f, - 0xec58, 0xc341, 0xf1a7, 0xc3fd, 0x003f, 0xf54c, 0xf54d, 0xc554, - /* 0x9800 .. 0x98ff */ - 0xf851, 0xadb6, 0xb3bb, 0xb3bc, 0xd84e, 0xb6b5, 0xb6b6, 0xdcac, - 0xb6b7, 0x003f, 0xb97a, 0x003f, 0xb97c, 0xe0df, 0xe0e0, 0xe0de, - 0xb977, 0xb978, 0xb97b, 0xb979, 0x003f, 0x003f, 0xe4cb, 0xbbe1, - 0xbbe2, 0x003f, 0x003f, 0xe8bc, 0xbe67, 0xe8b7, 0xe8b6, 0x003f, - 0xe8bb, 0xbe65, 0x003f, 0x003f, 0xc05b, 0x003f, 0xe8b8, 0xe8bd, - 0xe8ba, 0xe8b9, 0x003f, 0xbe66, 0x003f, 0xc059, 0x003f, 0xec5a, - 0xc055, 0x003f, 0xec5b, 0x003f, 0x003f, 0xec59, 0x003f, 0xc058, - 0xc056, 0xc05a, 0x003f, 0xc057, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0xef45, 0x003f, 0xef4a, 0xef46, 0xef49, 0xc1fb, 0x003f, - 0xedd4, 0xef48, 0xef47, 0x003f, 0xc344, 0xc342, 0xc345, 0xc343, - 0xf1a8, 0xf1a9, 0xf1aa, 0xc346, 0x003f, 0x003f, 0x003f, 0xf3aa, - 0xc440, 0xf3a8, 0x003f, 0xc441, 0xf3a7, 0xf3a9, 0xc3fe, 0xf551, - 0xf54e, 0x003f, 0xf54f, 0xf550, 0xf672, 0xc556, 0x003f, 0xc555, - 0x003f, 0xf774, 0xf773, 0xc5b8, 0x003f, 0x003f, 0x003f, 0xc5e3, - 0xc649, 0xc660, 0xf958, 0xf9ae, 0xf9af, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xadb7, 0xdcad, 0x003f, 0x003f, 0xe0e1, 0xe4cc, 0xe4cd, 0xbbe3, - 0x003f, 0xbbe4, 0xe8be, 0xbe68, 0x003f, 0x003f, 0xc1fc, 0x003f, - 0xf1ab, 0x003f, 0xc347, 0xf3ad, 0xc442, 0xf3ac, 0xf3ae, 0xf3ab, - 0xf675, 0xf552, 0xf553, 0x003f, 0xc4c6, 0x003f, 0xf674, 0x003f, - 0x003f, 0xf673, 0x003f, 0xf775, 0xf9b0, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xadb8, 0x003f, 0x003f, 0x003f, 0xadb9, - 0x003f, 0x003f, 0xb0a7, 0xd448, 0x003f, 0xd84f, 0x003f, 0xb6b8, - 0x003f, 0xb6bb, 0xb6b9, 0xdcae, 0x003f, 0xb6bd, 0x003f, 0xb6ba, - 0x003f, 0x003f, 0xb6bc, 0x003f, 0xb97e, 0x003f, 0xe0e2, 0x003f, - 0x003f, 0xe0e3, 0xe8c0, 0x003f, 0xb97d, 0xb9a1, 0xb9a2, 0x003f, - /* 0x9900 .. 0x99ff */ - 0xe4cf, 0x003f, 0xe4ce, 0xbbe5, 0x003f, 0xbbe6, 0x003f, 0xe4d0, - 0xe8bf, 0xbbe8, 0xbe69, 0x003f, 0xbbe7, 0x003f, 0x003f, 0x003f, - 0xc05c, 0xe8c1, 0xbe6b, 0xbe6a, 0xe8c2, 0xe8c5, 0xe8c3, 0xe8c4, - 0xbe6c, 0x003f, 0xc061, 0xc05f, 0x003f, 0x003f, 0xc05e, 0xec5d, - 0x003f, 0xc060, 0x003f, 0x003f, 0xec5c, 0xef4b, 0x003f, 0xec5e, - 0xc05d, 0xec5f, 0xef4e, 0xef4c, 0xef4d, 0xef52, 0xc34b, 0xef51, - 0xef54, 0xef53, 0xef50, 0xef4f, 0x003f, 0xc1fd, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf1ae, 0x003f, 0xf1ad, 0xc34a, 0xc348, 0xc349, - 0x003f, 0xf1ac, 0x003f, 0xf3b1, 0x003f, 0xc443, 0x003f, 0xf3b0, - 0xf3af, 0xc444, 0x003f, 0xf558, 0xf557, 0x003f, 0xf555, 0x003f, - 0xf554, 0xc4c8, 0xc4c7, 0xf559, 0xf776, 0xc5b9, 0xf677, 0xc557, - 0xf676, 0xf556, 0x003f, 0xf777, 0xc5e4, 0x003f, 0xc661, 0xf959, - 0x003f, 0xf9b1, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xadba, 0xd850, - 0xef55, 0xadbb, 0x003f, 0x003f, 0xe4d2, 0xe4d1, 0xec60, 0x003f, - 0x003f, 0xef57, 0x003f, 0xef56, 0x003f, 0xc34c, 0xf3b2, 0xf3b3, - 0xc4c9, 0x003f, 0x003f, 0xf9b2, 0xb0a8, 0xb6bf, 0xb6be, 0xe0e4, - 0xe0e6, 0xb9a4, 0xe0e5, 0xb9a3, 0xb9a5, 0xe0e7, 0x003f, 0x003f, - 0x003f, 0xe4d4, 0xe4d6, 0xe4d5, 0x003f, 0xe4d8, 0x003f, 0x003f, - 0x003f, 0xbbe9, 0xe4d7, 0xe4d3, 0x003f, 0x003f, 0x003f, 0xe4d9, - 0x003f, 0xe8cc, 0x003f, 0xe8cf, 0xe8d1, 0xe8c7, 0xe8cb, 0xe8c8, - 0xbe6e, 0xbe71, 0xbe73, 0xe8c9, 0xe8ca, 0xbe72, 0xe8cd, 0xe8d0, - 0xe8ce, 0xbe74, 0x003f, 0xbe70, 0xe8c6, 0xbe6d, 0x003f, 0xbe6f, - 0x003f, 0x003f, 0xc063, 0xec66, 0xec64, 0xec63, 0x003f, 0xec69, - 0x003f, 0xec68, 0xec67, 0x003f, 0xec62, 0xc062, 0xec61, 0x003f, - 0xec65, 0xc064, 0x003f, 0x003f, 0xef5a, 0x003f, 0xef5e, 0xef5b, - 0xef5d, 0xef5c, 0xef59, 0xef5f, 0xef62, 0xef60, 0xef61, 0xc240, - /* 0x9a00 .. 0x9aff */ - 0x003f, 0xc1fe, 0xef58, 0xef63, 0xf1b3, 0xf1b6, 0xf1b8, 0xf1b7, - 0x003f, 0xf1b1, 0xf1b5, 0xf1b0, 0x003f, 0xf1b2, 0xc34d, 0xf1af, - 0x003f, 0xf1b4, 0x003f, 0x003f, 0xf3c0, 0xf3b5, 0xc445, 0x003f, - 0x003f, 0xc446, 0xf3b4, 0xf3b9, 0xf3bf, 0xf3b7, 0xf3be, 0x003f, - 0xf3bb, 0x003f, 0xf3ba, 0xf3bd, 0xf3b8, 0xf3b6, 0x003f, 0xf3bc, - 0x003f, 0xf560, 0xf55e, 0xc4ca, 0xf55d, 0xf563, 0xf561, 0x003f, - 0xc4cb, 0xf55c, 0xf55a, 0x003f, 0xf55b, 0xc4cd, 0xf55f, 0xc4cc, - 0xf562, 0xf678, 0xf67e, 0x003f, 0x003f, 0xf679, 0xc55b, 0xf6a1, - 0xc55a, 0xf67d, 0xf67c, 0xc559, 0xf67b, 0xc558, 0xf67a, 0x003f, - 0xf77d, 0xf7a1, 0xf77e, 0x003f, 0xf77b, 0xc5bb, 0xf778, 0xf77c, - 0xf7a3, 0x003f, 0xf7a2, 0xf779, 0xf77a, 0xc5ba, 0xf852, 0xc5e7, - 0x003f, 0xf853, 0xc5e5, 0xc5e6, 0x003f, 0x003f, 0xf8d3, 0xc64a, - 0xf976, 0x003f, 0xc66a, 0x003f, 0xf9b3, 0xc66b, 0xf9b4, 0xf9b5, - 0xf9c3, 0xf9c2, 0xc67a, 0xf9cd, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xb0a9, 0x003f, 0x003f, 0xe0e9, 0x003f, 0xe0e8, 0x003f, 0xbbea, - 0xbbeb, 0xe4da, 0x003f, 0xe8d2, 0xec6c, 0x003f, 0x003f, 0xbe75, - 0xc065, 0xec6a, 0x003f, 0xec6d, 0xc066, 0x003f, 0xef64, 0xec6b, - 0xf1b9, 0xc34e, 0xf3c1, 0x003f, 0x003f, 0x003f, 0xf566, 0xf564, - 0x003f, 0x003f, 0xf565, 0x003f, 0x003f, 0xf6a2, 0x003f, 0xc55c, - 0xf7a4, 0xc5ea, 0xc5bc, 0xc5e8, 0xc5e9, 0xf8d4, 0xc662, 0x003f, - 0xb0aa, 0x003f, 0x003f, 0x003f, 0xf1ba, 0x003f, 0x003f, 0xd449, - 0x003f, 0xb9a6, 0x003f, 0xe4db, 0x003f, 0x003f, 0xbbec, 0xe4dc, - 0x003f, 0x003f, 0x003f, 0xe8d4, 0xe8d3, 0xc068, 0xbe76, 0xbe77, - 0x003f, 0xe8d7, 0xe8d6, 0xe8d5, 0x003f, 0x003f, 0xec6e, 0xec71, - 0x003f, 0xec70, 0xec6f, 0xc067, 0xef68, 0xef66, 0xef65, 0x003f, - /* 0x9b00 .. 0x9bff */ - 0x003f, 0xef67, 0x003f, 0xc34f, 0xf1bc, 0xf1bd, 0xc350, 0x003f, - 0xf1bb, 0x003f, 0xf3c3, 0xf3c2, 0xf3c5, 0xc447, 0xf3c4, 0x003f, - 0xf567, 0xf569, 0xf568, 0x003f, 0x003f, 0xf6a3, 0xf6a6, 0xf6a4, - 0xf6a5, 0xf7a5, 0xc5bd, 0x003f, 0x003f, 0x003f, 0xf854, 0xf855, - 0xf856, 0x003f, 0xc64b, 0xc663, 0xf9b6, 0xb0ab, 0x003f, 0xbe78, - 0xc069, 0xf1be, 0x003f, 0xf7a6, 0x003f, 0x003f, 0xf9c4, 0xd44a, - 0x003f, 0xc67b, 0xb0ac, 0xec72, 0x003f, 0xf1bf, 0x003f, 0xf3c6, - 0x003f, 0x003f, 0xf6a7, 0xf7a7, 0xb0ad, 0x003f, 0xe4dd, 0xe4de, - 0x003f, 0xbbed, 0xbbee, 0xe8d9, 0xbe7a, 0xbe79, 0xe8d8, 0x003f, - 0xef69, 0x003f, 0xf1c0, 0xf1c2, 0xf1c1, 0xc353, 0xc352, 0xc351, - 0x003f, 0xc55e, 0xf6a8, 0x003f, 0xc55d, 0xf7a9, 0xf7a8, 0x003f, - 0xc64c, 0xf8d5, 0xb3bd, 0xe0ea, 0x003f, 0x003f, 0x003f, 0xe4e1, - 0xe4df, 0xe4e0, 0x003f, 0x003f, 0xe8e2, 0x003f, 0xe8dd, 0xe8da, - 0xe8e1, 0x003f, 0x003f, 0x003f, 0xe8e3, 0x003f, 0x003f, 0xbe7c, - 0xe8e0, 0xe8dc, 0x003f, 0x003f, 0xe8db, 0xe8df, 0xe8de, 0xbe7b, - 0x003f, 0x003f, 0xec7d, 0xec78, 0xec76, 0xeca1, 0xec77, 0x003f, - 0xec73, 0x003f, 0xec79, 0x003f, 0x003f, 0xec74, 0xef72, 0xec75, - 0xeca2, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xec7c, 0xc06a, 0xec7b, 0xec7a, 0x003f, 0xec7e, 0x003f, 0x003f, - 0x003f, 0x003f, 0xef6a, 0xef6d, 0x003f, 0x003f, 0xef6c, 0x003f, - 0xef74, 0xef6f, 0xef73, 0x003f, 0xef71, 0xef70, 0xef6e, 0x003f, - 0xef6b, 0x003f, 0xc243, 0xc242, 0x003f, 0xc244, 0xc241, 0xef75, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf1c8, 0xf1cb, 0x003f, - 0xf1c9, 0xf1cd, 0x003f, 0x003f, 0x003f, 0xf1ce, 0x003f, 0xf1c6, - 0xc358, 0xf1c7, 0x003f, 0xf1c5, 0xf1cc, 0x003f, 0xf1c4, 0xf1c3, - 0xc357, 0xc355, 0xc354, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0xf1ca, 0xf3cf, 0xf3d5, 0xc44a, 0xf3d0, - 0x003f, 0xf3d3, 0xf3d7, 0xc44b, 0xf3d2, 0x003f, 0xf3ca, 0x003f, - 0xf3c9, 0xf3d6, 0xf3cd, 0x003f, 0xf3cb, 0xf3d4, 0xf3cc, 0xc449, - 0xc448, 0x003f, 0xf3c7, 0xf3c8, 0xf3d1, 0x003f, 0x003f, 0x003f, - 0xf3ce, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf56c, - 0xf56f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc356, 0x003f, 0x003f, - /* 0x9c00 .. 0x9cff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xf56d, 0xf573, 0xf571, - 0xf56b, 0xf576, 0x003f, 0xf56a, 0x003f, 0xc4cf, 0xf572, 0x003f, - 0x003f, 0x003f, 0xf56e, 0xc4ce, 0xf575, 0x003f, 0x003f, 0xf574, - 0x003f, 0x003f, 0x003f, 0x003f, 0xf6ab, 0xf6aa, 0x003f, 0x003f, - 0x003f, 0xf6b1, 0x003f, 0xf6ad, 0xf6b0, 0xc560, 0x003f, 0x003f, - 0xf6ae, 0xf6af, 0x003f, 0xf6a9, 0xf6ac, 0xc55f, 0x003f, 0x003f, - 0x003f, 0xc5bf, 0xf7b4, 0xf7af, 0xf7b3, 0x003f, 0xf7b6, 0xf7b2, - 0x003f, 0xf7ae, 0x003f, 0xc5c1, 0xf7b1, 0xf7b5, 0xc5c0, 0xf7ac, - 0xf570, 0xf7b0, 0x003f, 0x003f, 0xf7ad, 0x003f, 0xf7aa, 0x003f, - 0xf7ab, 0xc5be, 0xf85a, 0xf85c, 0xf85f, 0xf85b, 0xf860, 0x003f, - 0xf859, 0x003f, 0xf857, 0x003f, 0xc5eb, 0xf85d, 0xc5ed, 0xc5ec, - 0xf858, 0xf85e, 0x003f, 0x003f, 0x003f, 0x003f, 0xf8da, 0xc64d, - 0xf8db, 0x003f, 0xf8d9, 0xf8d6, 0x003f, 0x003f, 0xf8d8, 0xf8d7, - 0xf95a, 0x003f, 0x003f, 0x003f, 0x003f, 0xf95c, 0xf95b, 0x003f, - 0x003f, 0xf979, 0x003f, 0xf978, 0xf977, 0xf97a, 0x003f, 0xc673, - 0xc674, 0xf9ca, 0xf9ce, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb3be, 0xdcaf, 0xe0ed, - 0x003f, 0xb9a7, 0xe0eb, 0x003f, 0x003f, 0xe0ec, 0x003f, 0x003f, - 0x003f, 0xe4e2, 0xe4e3, 0xbbf1, 0xbbef, 0xe4e4, 0xbbf0, 0xe8e8, - 0x003f, 0xe8eb, 0xe8e5, 0xe8ec, 0xe8e4, 0xe8e6, 0x003f, 0xe8e7, - /* 0x9d00 .. 0x9dff */ - 0xe8ea, 0x003f, 0x003f, 0xbea1, 0xe8ef, 0xe8ee, 0xbe7d, 0xe8e9, - 0xe8ed, 0xbe7e, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xecac, 0x003f, 0xc06f, 0x003f, 0xeca7, 0xc06b, 0x003f, 0xeca4, - 0xecaa, 0xecad, 0x003f, 0xc070, 0x003f, 0xeca9, 0xeca6, 0xecae, - 0xeca5, 0x003f, 0xecab, 0xc06c, 0x003f, 0xeca3, 0xc06d, 0x003f, - 0xc06e, 0xeca8, 0x003f, 0x003f, 0x003f, 0xefa9, 0xef7a, 0xef7b, - 0xef7e, 0xef7c, 0x003f, 0xef76, 0x003f, 0x003f, 0xef79, 0xefa5, - 0xef7d, 0x003f, 0x003f, 0xc245, 0x003f, 0xefa7, 0xefa4, 0xc246, - 0xefa6, 0xef77, 0xefa2, 0xefa3, 0x003f, 0xefa1, 0x003f, 0x003f, - 0x003f, 0x003f, 0xf1d2, 0xf1d4, 0xf1d7, 0x003f, 0x003f, 0xf1d1, - 0x003f, 0xc359, 0xf1d9, 0xf1d0, 0xf1da, 0x003f, 0xf1d6, 0xf1d8, - 0xf1dc, 0xf1d5, 0xf1dd, 0xf1d3, 0xf1cf, 0xc35a, 0x003f, 0xf1db, - 0xc35b, 0xc44d, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xef78, - 0xf3f1, 0xf3e8, 0xc44f, 0xf3e4, 0xc450, 0x003f, 0x003f, 0xf3ed, - 0xf3e7, 0xf3dd, 0xc44e, 0xf3ea, 0xf3e5, 0xf3e6, 0x003f, 0xf3d8, - 0xf3df, 0xf3ee, 0x003f, 0xf3eb, 0x003f, 0xf3e3, 0x003f, 0xf3ef, - 0xf3de, 0xf3d9, 0xf3ec, 0x003f, 0xf3db, 0xf3e9, 0xf3e0, 0xf3f0, - 0xf3dc, 0xc44c, 0xf3da, 0xf3e1, 0xf3e2, 0x003f, 0x003f, 0x003f, - 0xf57d, 0x003f, 0xf57b, 0x003f, 0xf5a2, 0x003f, 0xf5ae, 0xf5a5, - 0xf57c, 0xf578, 0xf5a7, 0xf57e, 0xf5a3, 0xf57a, 0xf5aa, 0xf577, - 0xf5a1, 0xf5a6, 0xf5a8, 0xf5ab, 0xf579, 0x003f, 0xf5af, 0xf5b0, - 0xf5a9, 0xf5ad, 0xf5a4, 0x003f, 0xf6c1, 0xf6c4, 0x003f, 0xc561, - 0x003f, 0xf6c3, 0xf6c8, 0xf6c6, 0xc562, 0xf6bd, 0xf6b3, 0xf6b2, - 0xc564, 0xf6bf, 0xf6c0, 0xf6bc, 0xf6b4, 0x003f, 0xf6b9, 0xf5ac, - 0x003f, 0xf6b5, 0xc563, 0xf6bb, 0x003f, 0xf6ba, 0x003f, 0xf6b6, - 0xf6c2, 0x003f, 0xf6b7, 0xf7bb, 0xf6c5, 0xf6c7, 0xf6be, 0xf6b8, - 0xf7bc, 0xf7be, 0xf7b8, 0xc5c2, 0x003f, 0xf7c5, 0xf7c3, 0xc5c3, - 0xf7c2, 0xf7c1, 0xf7ba, 0xf7b7, 0xf7bd, 0xf7c6, 0xf7b9, 0xf7bf, - 0x003f, 0xf869, 0xf86e, 0xf864, 0xf867, 0xc5ee, 0xf86b, 0x003f, - 0xf872, 0xf7c0, 0x003f, 0xf865, 0xf86f, 0xf873, 0xf86a, 0xf863, - 0xf86d, 0x003f, 0xf86c, 0xf871, 0xf870, 0xf7c4, 0xf868, 0xf862, - 0xf866, 0xc64e, 0xc64f, 0xf861, 0x003f, 0xf8e6, 0xf8dd, 0xf8e5, - /* 0x9e00 .. 0x9eff */ - 0xf8e2, 0xf8e3, 0xf8dc, 0xf8df, 0xf8e7, 0xf8e1, 0xf8e0, 0xf8de, - 0x003f, 0xf8e4, 0x003f, 0xf95d, 0x003f, 0xf95e, 0x003f, 0xf960, - 0xf95f, 0xf962, 0xf961, 0xf97c, 0xf97b, 0xf9b7, 0x003f, 0xf9b8, - 0x003f, 0xf9c5, 0xc678, 0xc67c, 0x003f, 0xf9cf, 0xc67d, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xb3bf, 0x003f, 0x003f, - 0x003f, 0xc4d0, 0xf6c9, 0x003f, 0xc650, 0xc651, 0x003f, 0xb3c0, - 0xe0ee, 0x003f, 0xb9a8, 0xe8f0, 0x003f, 0x003f, 0xecb0, 0xecb1, - 0xecaf, 0xefab, 0xefaa, 0xc247, 0xf1df, 0xefac, 0xf1de, 0x003f, - 0x003f, 0xf3f3, 0xc451, 0xc453, 0xf3f2, 0x003f, 0x003f, 0xc452, - 0x003f, 0xf5b1, 0xf5b3, 0xf5b2, 0xf6ca, 0xc565, 0x003f, 0xc5ef, - 0xf8e8, 0xf963, 0x003f, 0x003f, 0xf9d2, 0xb3c1, 0x003f, 0xe4e5, - 0x003f, 0xbea2, 0x003f, 0x003f, 0x003f, 0xecb3, 0xecb2, 0x003f, - 0xefad, 0x003f, 0x003f, 0x003f, 0xc454, 0xc4d1, 0xf7c7, 0xf9cb, - 0x003f, 0x003f, 0x003f, 0xb3c2, 0xbbf2, 0x003f, 0xbea3, 0x003f, - 0xf3f4, 0x003f, 0xf874, 0xb6c0, 0x003f, 0x003f, 0x003f, 0x003f, - 0xefae, 0x003f, 0x003f, 0x003f, 0xc664, 0xb6c1, 0xbea4, 0xc248, - 0xf875, 0xb6c2, 0x003f, 0xe8f1, 0xc072, 0xecb4, 0xecb5, 0x003f, - 0xc071, 0x003f, 0xefaf, 0xc24c, 0xc24a, 0xc24b, 0xc249, 0xf1e0, - 0xc35c, 0x003f, 0x003f, 0x003f, 0xf5b5, 0xf5b4, 0xf5b7, 0xf5b6, - 0xc4d2, 0x003f, 0x003f, 0xf6cb, 0x003f, 0xf6cd, 0xf6cc, 0xc566, - 0xf7c8, 0x003f, 0xf876, 0xf877, 0xc5f0, 0xf964, 0xf97d, 0xc675, - 0x003f, 0xdcb0, 0xecb6, 0xefb0, 0xf3f5, 0xe0ef, 0x003f, 0xefb1, - /* 0x9f00 .. 0x9fff */ - 0xf1e2, 0xf1e1, 0x003f, 0x003f, 0x003f, 0x003f, 0xf878, 0xc652, - 0x003f, 0xf965, 0xf97e, 0x003f, 0x003f, 0x003f, 0xb9a9, 0xe8f2, - 0xe8f3, 0x003f, 0xecb7, 0xb9aa, 0x003f, 0xc35d, 0xf1e3, 0x003f, - 0xf6cf, 0xc567, 0xf6d0, 0xf6ce, 0xf879, 0x003f, 0xf8e9, 0x003f, - 0xb9ab, 0x003f, 0xefb4, 0xefb3, 0xefb2, 0xf1e4, 0x003f, 0x003f, - 0xf1e8, 0xf1e7, 0xf1e6, 0xf1e5, 0xc35e, 0xf3f6, 0xf5b9, 0xc4d3, - 0xf5b8, 0xf6d1, 0xf7cb, 0xf7ca, 0xc5c4, 0xf7c9, 0xf87c, 0xf87b, - 0xf87a, 0x003f, 0x003f, 0xbbf3, 0x003f, 0xecb8, 0xc24d, 0x003f, - 0xf3f7, 0xf3f8, 0xf7cc, 0xf87d, 0x003f, 0x003f, 0xf8ea, 0xf966, - 0xf9b9, 0xf9d4, 0xbbf4, 0xc24e, 0xf1e9, 0xf3f9, 0xf6d2, 0xf87e, - 0x003f, 0x003f, 0xbea6, 0x003f, 0xefb5, 0xf1ea, 0xf3fa, 0xf3fb, - 0xf3fc, 0xf5be, 0x003f, 0xf5ba, 0xc568, 0xf5bd, 0xf5bc, 0xc4d4, - 0xf5bb, 0xc4d6, 0x003f, 0xc4d5, 0xf6d4, 0xf6d3, 0xc569, 0xc56a, - 0x003f, 0x003f, 0xc5c6, 0xf7cd, 0xc5c5, 0x003f, 0xf8a3, 0xf8a4, - 0xf8a2, 0xf8a1, 0xc654, 0x003f, 0xf8eb, 0xf8ec, 0xf8ed, 0xc653, - 0xf967, 0xf96a, 0xf969, 0xf968, 0x003f, 0x003f, 0xf9d3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0xc073, 0x003f, 0x003f, - 0xc365, 0xf5bf, 0xf6d5, 0x003f, 0xc5c7, 0xf7ce, 0x003f, 0x003f, - 0xf9d5, 0x003f, 0x003f, 0x003f, 0xc074, 0x003f, 0x003f, 0x003f, - 0xefb6, 0x003f, 0xf7cf, 0x003f, 0xf9a1, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xe000 .. 0xe0ff */ - 0xfa40, 0xfa41, 0xfa42, 0xfa43, 0xfa44, 0xfa45, 0xfa46, 0xfa47, - 0xfa48, 0xfa49, 0xfa4a, 0xfa4b, 0xfa4c, 0xfa4d, 0xfa4e, 0xfa4f, - 0xfa50, 0xfa51, 0xfa52, 0xfa53, 0xfa54, 0xfa55, 0xfa56, 0xfa57, - 0xfa58, 0xfa59, 0xfa5a, 0xfa5b, 0xfa5c, 0xfa5d, 0xfa5e, 0xfa5f, - 0xfa60, 0xfa61, 0xfa62, 0xfa63, 0xfa64, 0xfa65, 0xfa66, 0xfa67, - 0xfa68, 0xfa69, 0xfa6a, 0xfa6b, 0xfa6c, 0xfa6d, 0xfa6e, 0xfa6f, - 0xfa70, 0xfa71, 0xfa72, 0xfa73, 0xfa74, 0xfa75, 0xfa76, 0xfa77, - 0xfa78, 0xfa79, 0xfa7a, 0xfa7b, 0xfa7c, 0xfa7d, 0xfa7e, 0xfaa1, - 0xfaa2, 0xfaa3, 0xfaa4, 0xfaa5, 0xfaa6, 0xfaa7, 0xfaa8, 0xfaa9, - 0xfaaa, 0xfaab, 0xfaac, 0xfaad, 0xfaae, 0xfaaf, 0xfab0, 0xfab1, - 0xfab2, 0xfab3, 0xfab4, 0xfab5, 0xfab6, 0xfab7, 0xfab8, 0xfab9, - 0xfaba, 0xfabb, 0xfabc, 0xfabd, 0xfabe, 0xfabf, 0xfac0, 0xfac1, - 0xfac2, 0xfac3, 0xfac4, 0xfac5, 0xfac6, 0xfac7, 0xfac8, 0xfac9, - 0xfaca, 0xfacb, 0xfacc, 0xfacd, 0xface, 0xfacf, 0xfad0, 0xfad1, - 0xfad2, 0xfad3, 0xfad4, 0xfad5, 0xfad6, 0xfad7, 0xfad8, 0xfad9, - 0xfada, 0xfadb, 0xfadc, 0xfadd, 0xfade, 0xfadf, 0xfae0, 0xfae1, - 0xfae2, 0xfae3, 0xfae4, 0xfae5, 0xfae6, 0xfae7, 0xfae8, 0xfae9, - 0xfaea, 0xfaeb, 0xfaec, 0xfaed, 0xfaee, 0xfaef, 0xfaf0, 0xfaf1, - 0xfaf2, 0xfaf3, 0xfaf4, 0xfaf5, 0xfaf6, 0xfaf7, 0xfaf8, 0xfaf9, - 0xfafa, 0xfafb, 0xfafc, 0xfafd, 0xfafe, 0xfb40, 0xfb41, 0xfb42, - 0xfb43, 0xfb44, 0xfb45, 0xfb46, 0xfb47, 0xfb48, 0xfb49, 0xfb4a, - 0xfb4b, 0xfb4c, 0xfb4d, 0xfb4e, 0xfb4f, 0xfb50, 0xfb51, 0xfb52, - 0xfb53, 0xfb54, 0xfb55, 0xfb56, 0xfb57, 0xfb58, 0xfb59, 0xfb5a, - 0xfb5b, 0xfb5c, 0xfb5d, 0xfb5e, 0xfb5f, 0xfb60, 0xfb61, 0xfb62, - 0xfb63, 0xfb64, 0xfb65, 0xfb66, 0xfb67, 0xfb68, 0xfb69, 0xfb6a, - 0xfb6b, 0xfb6c, 0xfb6d, 0xfb6e, 0xfb6f, 0xfb70, 0xfb71, 0xfb72, - 0xfb73, 0xfb74, 0xfb75, 0xfb76, 0xfb77, 0xfb78, 0xfb79, 0xfb7a, - 0xfb7b, 0xfb7c, 0xfb7d, 0xfb7e, 0xfba1, 0xfba2, 0xfba3, 0xfba4, - 0xfba5, 0xfba6, 0xfba7, 0xfba8, 0xfba9, 0xfbaa, 0xfbab, 0xfbac, - 0xfbad, 0xfbae, 0xfbaf, 0xfbb0, 0xfbb1, 0xfbb2, 0xfbb3, 0xfbb4, - 0xfbb5, 0xfbb6, 0xfbb7, 0xfbb8, 0xfbb9, 0xfbba, 0xfbbb, 0xfbbc, - 0xfbbd, 0xfbbe, 0xfbbf, 0xfbc0, 0xfbc1, 0xfbc2, 0xfbc3, 0xfbc4, - /* 0xe100 .. 0xe1ff */ - 0xfbc5, 0xfbc6, 0xfbc7, 0xfbc8, 0xfbc9, 0xfbca, 0xfbcb, 0xfbcc, - 0xfbcd, 0xfbce, 0xfbcf, 0xfbd0, 0xfbd1, 0xfbd2, 0xfbd3, 0xfbd4, - 0xfbd5, 0xfbd6, 0xfbd7, 0xfbd8, 0xfbd9, 0xfbda, 0xfbdb, 0xfbdc, - 0xfbdd, 0xfbde, 0xfbdf, 0xfbe0, 0xfbe1, 0xfbe2, 0xfbe3, 0xfbe4, - 0xfbe5, 0xfbe6, 0xfbe7, 0xfbe8, 0xfbe9, 0xfbea, 0xfbeb, 0xfbec, - 0xfbed, 0xfbee, 0xfbef, 0xfbf0, 0xfbf1, 0xfbf2, 0xfbf3, 0xfbf4, - 0xfbf5, 0xfbf6, 0xfbf7, 0xfbf8, 0xfbf9, 0xfbfa, 0xfbfb, 0xfbfc, - 0xfbfd, 0xfbfe, 0xfc40, 0xfc41, 0xfc42, 0xfc43, 0xfc44, 0xfc45, - 0xfc46, 0xfc47, 0xfc48, 0xfc49, 0xfc4a, 0xfc4b, 0xfc4c, 0xfc4d, - 0xfc4e, 0xfc4f, 0xfc50, 0xfc51, 0xfc52, 0xfc53, 0xfc54, 0xfc55, - 0xfc56, 0xfc57, 0xfc58, 0xfc59, 0xfc5a, 0xfc5b, 0xfc5c, 0xfc5d, - 0xfc5e, 0xfc5f, 0xfc60, 0xfc61, 0xfc62, 0xfc63, 0xfc64, 0xfc65, - 0xfc66, 0xfc67, 0xfc68, 0xfc69, 0xfc6a, 0xfc6b, 0xfc6c, 0xfc6d, - 0xfc6e, 0xfc6f, 0xfc70, 0xfc71, 0xfc72, 0xfc73, 0xfc74, 0xfc75, - 0xfc76, 0xfc77, 0xfc78, 0xfc79, 0xfc7a, 0xfc7b, 0xfc7c, 0xfc7d, - 0xfc7e, 0xfca1, 0xfca2, 0xfca3, 0xfca4, 0xfca5, 0xfca6, 0xfca7, - 0xfca8, 0xfca9, 0xfcaa, 0xfcab, 0xfcac, 0xfcad, 0xfcae, 0xfcaf, - 0xfcb0, 0xfcb1, 0xfcb2, 0xfcb3, 0xfcb4, 0xfcb5, 0xfcb6, 0xfcb7, - 0xfcb8, 0xfcb9, 0xfcba, 0xfcbb, 0xfcbc, 0xfcbd, 0xfcbe, 0xfcbf, - 0xfcc0, 0xfcc1, 0xfcc2, 0xfcc3, 0xfcc4, 0xfcc5, 0xfcc6, 0xfcc7, - 0xfcc8, 0xfcc9, 0xfcca, 0xfccb, 0xfccc, 0xfccd, 0xfcce, 0xfccf, - 0xfcd0, 0xfcd1, 0xfcd2, 0xfcd3, 0xfcd4, 0xfcd5, 0xfcd6, 0xfcd7, - 0xfcd8, 0xfcd9, 0xfcda, 0xfcdb, 0xfcdc, 0xfcdd, 0xfcde, 0xfcdf, - 0xfce0, 0xfce1, 0xfce2, 0xfce3, 0xfce4, 0xfce5, 0xfce6, 0xfce7, - 0xfce8, 0xfce9, 0xfcea, 0xfceb, 0xfcec, 0xfced, 0xfcee, 0xfcef, - 0xfcf0, 0xfcf1, 0xfcf2, 0xfcf3, 0xfcf4, 0xfcf5, 0xfcf6, 0xfcf7, - 0xfcf8, 0xfcf9, 0xfcfa, 0xfcfb, 0xfcfc, 0xfcfd, 0xfcfe, 0xfd40, - 0xfd41, 0xfd42, 0xfd43, 0xfd44, 0xfd45, 0xfd46, 0xfd47, 0xfd48, - 0xfd49, 0xfd4a, 0xfd4b, 0xfd4c, 0xfd4d, 0xfd4e, 0xfd4f, 0xfd50, - 0xfd51, 0xfd52, 0xfd53, 0xfd54, 0xfd55, 0xfd56, 0xfd57, 0xfd58, - 0xfd59, 0xfd5a, 0xfd5b, 0xfd5c, 0xfd5d, 0xfd5e, 0xfd5f, 0xfd60, - 0xfd61, 0xfd62, 0xfd63, 0xfd64, 0xfd65, 0xfd66, 0xfd67, 0xfd68, - /* 0xe200 .. 0xe2ff */ - 0xfd69, 0xfd6a, 0xfd6b, 0xfd6c, 0xfd6d, 0xfd6e, 0xfd6f, 0xfd70, - 0xfd71, 0xfd72, 0xfd73, 0xfd74, 0xfd75, 0xfd76, 0xfd77, 0xfd78, - 0xfd79, 0xfd7a, 0xfd7b, 0xfd7c, 0xfd7d, 0xfd7e, 0xfda1, 0xfda2, - 0xfda3, 0xfda4, 0xfda5, 0xfda6, 0xfda7, 0xfda8, 0xfda9, 0xfdaa, - 0xfdab, 0xfdac, 0xfdad, 0xfdae, 0xfdaf, 0xfdb0, 0xfdb1, 0xfdb2, - 0xfdb3, 0xfdb4, 0xfdb5, 0xfdb6, 0xfdb7, 0xfdb8, 0xfdb9, 0xfdba, - 0xfdbb, 0xfdbc, 0xfdbd, 0xfdbe, 0xfdbf, 0xfdc0, 0xfdc1, 0xfdc2, - 0xfdc3, 0xfdc4, 0xfdc5, 0xfdc6, 0xfdc7, 0xfdc8, 0xfdc9, 0xfdca, - 0xfdcb, 0xfdcc, 0xfdcd, 0xfdce, 0xfdcf, 0xfdd0, 0xfdd1, 0xfdd2, - 0xfdd3, 0xfdd4, 0xfdd5, 0xfdd6, 0xfdd7, 0xfdd8, 0xfdd9, 0xfdda, - 0xfddb, 0xfddc, 0xfddd, 0xfdde, 0xfddf, 0xfde0, 0xfde1, 0xfde2, - 0xfde3, 0xfde4, 0xfde5, 0xfde6, 0xfde7, 0xfde8, 0xfde9, 0xfdea, - 0xfdeb, 0xfdec, 0xfded, 0xfdee, 0xfdef, 0xfdf0, 0xfdf1, 0xfdf2, - 0xfdf3, 0xfdf4, 0xfdf5, 0xfdf6, 0xfdf7, 0xfdf8, 0xfdf9, 0xfdfa, - 0xfdfb, 0xfdfc, 0xfdfd, 0xfdfe, 0xfe40, 0xfe41, 0xfe42, 0xfe43, - 0xfe44, 0xfe45, 0xfe46, 0xfe47, 0xfe48, 0xfe49, 0xfe4a, 0xfe4b, - 0xfe4c, 0xfe4d, 0xfe4e, 0xfe4f, 0xfe50, 0xfe51, 0xfe52, 0xfe53, - 0xfe54, 0xfe55, 0xfe56, 0xfe57, 0xfe58, 0xfe59, 0xfe5a, 0xfe5b, - 0xfe5c, 0xfe5d, 0xfe5e, 0xfe5f, 0xfe60, 0xfe61, 0xfe62, 0xfe63, - 0xfe64, 0xfe65, 0xfe66, 0xfe67, 0xfe68, 0xfe69, 0xfe6a, 0xfe6b, - 0xfe6c, 0xfe6d, 0xfe6e, 0xfe6f, 0xfe70, 0xfe71, 0xfe72, 0xfe73, - 0xfe74, 0xfe75, 0xfe76, 0xfe77, 0xfe78, 0xfe79, 0xfe7a, 0xfe7b, - 0xfe7c, 0xfe7d, 0xfe7e, 0xfea1, 0xfea2, 0xfea3, 0xfea4, 0xfea5, - 0xfea6, 0xfea7, 0xfea8, 0xfea9, 0xfeaa, 0xfeab, 0xfeac, 0xfead, - 0xfeae, 0xfeaf, 0xfeb0, 0xfeb1, 0xfeb2, 0xfeb3, 0xfeb4, 0xfeb5, - 0xfeb6, 0xfeb7, 0xfeb8, 0xfeb9, 0xfeba, 0xfebb, 0xfebc, 0xfebd, - 0xfebe, 0xfebf, 0xfec0, 0xfec1, 0xfec2, 0xfec3, 0xfec4, 0xfec5, - 0xfec6, 0xfec7, 0xfec8, 0xfec9, 0xfeca, 0xfecb, 0xfecc, 0xfecd, - 0xfece, 0xfecf, 0xfed0, 0xfed1, 0xfed2, 0xfed3, 0xfed4, 0xfed5, - 0xfed6, 0xfed7, 0xfed8, 0xfed9, 0xfeda, 0xfedb, 0xfedc, 0xfedd, - 0xfede, 0xfedf, 0xfee0, 0xfee1, 0xfee2, 0xfee3, 0xfee4, 0xfee5, - 0xfee6, 0xfee7, 0xfee8, 0xfee9, 0xfeea, 0xfeeb, 0xfeec, 0xfeed, - /* 0xe300 .. 0xe3ff */ - 0xfeee, 0xfeef, 0xfef0, 0xfef1, 0xfef2, 0xfef3, 0xfef4, 0xfef5, - 0xfef6, 0xfef7, 0xfef8, 0xfef9, 0xfefa, 0xfefb, 0xfefc, 0xfefd, - 0xfefe, 0x8e40, 0x8e41, 0x8e42, 0x8e43, 0x8e44, 0x8e45, 0x8e46, - 0x8e47, 0x8e48, 0x8e49, 0x8e4a, 0x8e4b, 0x8e4c, 0x8e4d, 0x8e4e, - 0x8e4f, 0x8e50, 0x8e51, 0x8e52, 0x8e53, 0x8e54, 0x8e55, 0x8e56, - 0x8e57, 0x8e58, 0x8e59, 0x8e5a, 0x8e5b, 0x8e5c, 0x8e5d, 0x8e5e, - 0x8e5f, 0x8e60, 0x8e61, 0x8e62, 0x8e63, 0x8e64, 0x8e65, 0x8e66, - 0x8e67, 0x8e68, 0x8e69, 0x8e6a, 0x8e6b, 0x8e6c, 0x8e6d, 0x8e6e, - 0x8e6f, 0x8e70, 0x8e71, 0x8e72, 0x8e73, 0x8e74, 0x8e75, 0x8e76, - 0x8e77, 0x8e78, 0x8e79, 0x8e7a, 0x8e7b, 0x8e7c, 0x8e7d, 0x8e7e, - 0x8ea1, 0x8ea2, 0x8ea3, 0x8ea4, 0x8ea5, 0x8ea6, 0x8ea7, 0x8ea8, - 0x8ea9, 0x8eaa, 0x8eab, 0x8eac, 0x8ead, 0x8eae, 0x8eaf, 0x8eb0, - 0x8eb1, 0x8eb2, 0x8eb3, 0x8eb4, 0x8eb5, 0x8eb6, 0x8eb7, 0x8eb8, - 0x8eb9, 0x8eba, 0x8ebb, 0x8ebc, 0x8ebd, 0x8ebe, 0x8ebf, 0x8ec0, - 0x8ec1, 0x8ec2, 0x8ec3, 0x8ec4, 0x8ec5, 0x8ec6, 0x8ec7, 0x8ec8, - 0x8ec9, 0x8eca, 0x8ecb, 0x8ecc, 0x8ecd, 0x8ece, 0x8ecf, 0x8ed0, - 0x8ed1, 0x8ed2, 0x8ed3, 0x8ed4, 0x8ed5, 0x8ed6, 0x8ed7, 0x8ed8, - 0x8ed9, 0x8eda, 0x8edb, 0x8edc, 0x8edd, 0x8ede, 0x8edf, 0x8ee0, - 0x8ee1, 0x8ee2, 0x8ee3, 0x8ee4, 0x8ee5, 0x8ee6, 0x8ee7, 0x8ee8, - 0x8ee9, 0x8eea, 0x8eeb, 0x8eec, 0x8eed, 0x8eee, 0x8eef, 0x8ef0, - 0x8ef1, 0x8ef2, 0x8ef3, 0x8ef4, 0x8ef5, 0x8ef6, 0x8ef7, 0x8ef8, - 0x8ef9, 0x8efa, 0x8efb, 0x8efc, 0x8efd, 0x8efe, 0x8f40, 0x8f41, - 0x8f42, 0x8f43, 0x8f44, 0x8f45, 0x8f46, 0x8f47, 0x8f48, 0x8f49, - 0x8f4a, 0x8f4b, 0x8f4c, 0x8f4d, 0x8f4e, 0x8f4f, 0x8f50, 0x8f51, - 0x8f52, 0x8f53, 0x8f54, 0x8f55, 0x8f56, 0x8f57, 0x8f58, 0x8f59, - 0x8f5a, 0x8f5b, 0x8f5c, 0x8f5d, 0x8f5e, 0x8f5f, 0x8f60, 0x8f61, - 0x8f62, 0x8f63, 0x8f64, 0x8f65, 0x8f66, 0x8f67, 0x8f68, 0x8f69, - 0x8f6a, 0x8f6b, 0x8f6c, 0x8f6d, 0x8f6e, 0x8f6f, 0x8f70, 0x8f71, - 0x8f72, 0x8f73, 0x8f74, 0x8f75, 0x8f76, 0x8f77, 0x8f78, 0x8f79, - 0x8f7a, 0x8f7b, 0x8f7c, 0x8f7d, 0x8f7e, 0x8fa1, 0x8fa2, 0x8fa3, - 0x8fa4, 0x8fa5, 0x8fa6, 0x8fa7, 0x8fa8, 0x8fa9, 0x8faa, 0x8fab, - 0x8fac, 0x8fad, 0x8fae, 0x8faf, 0x8fb0, 0x8fb1, 0x8fb2, 0x8fb3, - /* 0xe400 .. 0xe4ff */ - 0x8fb4, 0x8fb5, 0x8fb6, 0x8fb7, 0x8fb8, 0x8fb9, 0x8fba, 0x8fbb, - 0x8fbc, 0x8fbd, 0x8fbe, 0x8fbf, 0x8fc0, 0x8fc1, 0x8fc2, 0x8fc3, - 0x8fc4, 0x8fc5, 0x8fc6, 0x8fc7, 0x8fc8, 0x8fc9, 0x8fca, 0x8fcb, - 0x8fcc, 0x8fcd, 0x8fce, 0x8fcf, 0x8fd0, 0x8fd1, 0x8fd2, 0x8fd3, - 0x8fd4, 0x8fd5, 0x8fd6, 0x8fd7, 0x8fd8, 0x8fd9, 0x8fda, 0x8fdb, - 0x8fdc, 0x8fdd, 0x8fde, 0x8fdf, 0x8fe0, 0x8fe1, 0x8fe2, 0x8fe3, - 0x8fe4, 0x8fe5, 0x8fe6, 0x8fe7, 0x8fe8, 0x8fe9, 0x8fea, 0x8feb, - 0x8fec, 0x8fed, 0x8fee, 0x8fef, 0x8ff0, 0x8ff1, 0x8ff2, 0x8ff3, - 0x8ff4, 0x8ff5, 0x8ff6, 0x8ff7, 0x8ff8, 0x8ff9, 0x8ffa, 0x8ffb, - 0x8ffc, 0x8ffd, 0x8ffe, 0x9040, 0x9041, 0x9042, 0x9043, 0x9044, - 0x9045, 0x9046, 0x9047, 0x9048, 0x9049, 0x904a, 0x904b, 0x904c, - 0x904d, 0x904e, 0x904f, 0x9050, 0x9051, 0x9052, 0x9053, 0x9054, - 0x9055, 0x9056, 0x9057, 0x9058, 0x9059, 0x905a, 0x905b, 0x905c, - 0x905d, 0x905e, 0x905f, 0x9060, 0x9061, 0x9062, 0x9063, 0x9064, - 0x9065, 0x9066, 0x9067, 0x9068, 0x9069, 0x906a, 0x906b, 0x906c, - 0x906d, 0x906e, 0x906f, 0x9070, 0x9071, 0x9072, 0x9073, 0x9074, - 0x9075, 0x9076, 0x9077, 0x9078, 0x9079, 0x907a, 0x907b, 0x907c, - 0x907d, 0x907e, 0x90a1, 0x90a2, 0x90a3, 0x90a4, 0x90a5, 0x90a6, - 0x90a7, 0x90a8, 0x90a9, 0x90aa, 0x90ab, 0x90ac, 0x90ad, 0x90ae, - 0x90af, 0x90b0, 0x90b1, 0x90b2, 0x90b3, 0x90b4, 0x90b5, 0x90b6, - 0x90b7, 0x90b8, 0x90b9, 0x90ba, 0x90bb, 0x90bc, 0x90bd, 0x90be, - 0x90bf, 0x90c0, 0x90c1, 0x90c2, 0x90c3, 0x90c4, 0x90c5, 0x90c6, - 0x90c7, 0x90c8, 0x90c9, 0x90ca, 0x90cb, 0x90cc, 0x90cd, 0x90ce, - 0x90cf, 0x90d0, 0x90d1, 0x90d2, 0x90d3, 0x90d4, 0x90d5, 0x90d6, - 0x90d7, 0x90d8, 0x90d9, 0x90da, 0x90db, 0x90dc, 0x90dd, 0x90de, - 0x90df, 0x90e0, 0x90e1, 0x90e2, 0x90e3, 0x90e4, 0x90e5, 0x90e6, - 0x90e7, 0x90e8, 0x90e9, 0x90ea, 0x90eb, 0x90ec, 0x90ed, 0x90ee, - 0x90ef, 0x90f0, 0x90f1, 0x90f2, 0x90f3, 0x90f4, 0x90f5, 0x90f6, - 0x90f7, 0x90f8, 0x90f9, 0x90fa, 0x90fb, 0x90fc, 0x90fd, 0x90fe, - 0x9140, 0x9141, 0x9142, 0x9143, 0x9144, 0x9145, 0x9146, 0x9147, - 0x9148, 0x9149, 0x914a, 0x914b, 0x914c, 0x914d, 0x914e, 0x914f, - 0x9150, 0x9151, 0x9152, 0x9153, 0x9154, 0x9155, 0x9156, 0x9157, - /* 0xe500 .. 0xe5ff */ - 0x9158, 0x9159, 0x915a, 0x915b, 0x915c, 0x915d, 0x915e, 0x915f, - 0x9160, 0x9161, 0x9162, 0x9163, 0x9164, 0x9165, 0x9166, 0x9167, - 0x9168, 0x9169, 0x916a, 0x916b, 0x916c, 0x916d, 0x916e, 0x916f, - 0x9170, 0x9171, 0x9172, 0x9173, 0x9174, 0x9175, 0x9176, 0x9177, - 0x9178, 0x9179, 0x917a, 0x917b, 0x917c, 0x917d, 0x917e, 0x91a1, - 0x91a2, 0x91a3, 0x91a4, 0x91a5, 0x91a6, 0x91a7, 0x91a8, 0x91a9, - 0x91aa, 0x91ab, 0x91ac, 0x91ad, 0x91ae, 0x91af, 0x91b0, 0x91b1, - 0x91b2, 0x91b3, 0x91b4, 0x91b5, 0x91b6, 0x91b7, 0x91b8, 0x91b9, - 0x91ba, 0x91bb, 0x91bc, 0x91bd, 0x91be, 0x91bf, 0x91c0, 0x91c1, - 0x91c2, 0x91c3, 0x91c4, 0x91c5, 0x91c6, 0x91c7, 0x91c8, 0x91c9, - 0x91ca, 0x91cb, 0x91cc, 0x91cd, 0x91ce, 0x91cf, 0x91d0, 0x91d1, - 0x91d2, 0x91d3, 0x91d4, 0x91d5, 0x91d6, 0x91d7, 0x91d8, 0x91d9, - 0x91da, 0x91db, 0x91dc, 0x91dd, 0x91de, 0x91df, 0x91e0, 0x91e1, - 0x91e2, 0x91e3, 0x91e4, 0x91e5, 0x91e6, 0x91e7, 0x91e8, 0x91e9, - 0x91ea, 0x91eb, 0x91ec, 0x91ed, 0x91ee, 0x91ef, 0x91f0, 0x91f1, - 0x91f2, 0x91f3, 0x91f4, 0x91f5, 0x91f6, 0x91f7, 0x91f8, 0x91f9, - 0x91fa, 0x91fb, 0x91fc, 0x91fd, 0x91fe, 0x9240, 0x9241, 0x9242, - 0x9243, 0x9244, 0x9245, 0x9246, 0x9247, 0x9248, 0x9249, 0x924a, - 0x924b, 0x924c, 0x924d, 0x924e, 0x924f, 0x9250, 0x9251, 0x9252, - 0x9253, 0x9254, 0x9255, 0x9256, 0x9257, 0x9258, 0x9259, 0x925a, - 0x925b, 0x925c, 0x925d, 0x925e, 0x925f, 0x9260, 0x9261, 0x9262, - 0x9263, 0x9264, 0x9265, 0x9266, 0x9267, 0x9268, 0x9269, 0x926a, - 0x926b, 0x926c, 0x926d, 0x926e, 0x926f, 0x9270, 0x9271, 0x9272, - 0x9273, 0x9274, 0x9275, 0x9276, 0x9277, 0x9278, 0x9279, 0x927a, - 0x927b, 0x927c, 0x927d, 0x927e, 0x92a1, 0x92a2, 0x92a3, 0x92a4, - 0x92a5, 0x92a6, 0x92a7, 0x92a8, 0x92a9, 0x92aa, 0x92ab, 0x92ac, - 0x92ad, 0x92ae, 0x92af, 0x92b0, 0x92b1, 0x92b2, 0x92b3, 0x92b4, - 0x92b5, 0x92b6, 0x92b7, 0x92b8, 0x92b9, 0x92ba, 0x92bb, 0x92bc, - 0x92bd, 0x92be, 0x92bf, 0x92c0, 0x92c1, 0x92c2, 0x92c3, 0x92c4, - 0x92c5, 0x92c6, 0x92c7, 0x92c8, 0x92c9, 0x92ca, 0x92cb, 0x92cc, - 0x92cd, 0x92ce, 0x92cf, 0x92d0, 0x92d1, 0x92d2, 0x92d3, 0x92d4, - 0x92d5, 0x92d6, 0x92d7, 0x92d8, 0x92d9, 0x92da, 0x92db, 0x92dc, - /* 0xe600 .. 0xe6ff */ - 0x92dd, 0x92de, 0x92df, 0x92e0, 0x92e1, 0x92e2, 0x92e3, 0x92e4, - 0x92e5, 0x92e6, 0x92e7, 0x92e8, 0x92e9, 0x92ea, 0x92eb, 0x92ec, - 0x92ed, 0x92ee, 0x92ef, 0x92f0, 0x92f1, 0x92f2, 0x92f3, 0x92f4, - 0x92f5, 0x92f6, 0x92f7, 0x92f8, 0x92f9, 0x92fa, 0x92fb, 0x92fc, - 0x92fd, 0x92fe, 0x9340, 0x9341, 0x9342, 0x9343, 0x9344, 0x9345, - 0x9346, 0x9347, 0x9348, 0x9349, 0x934a, 0x934b, 0x934c, 0x934d, - 0x934e, 0x934f, 0x9350, 0x9351, 0x9352, 0x9353, 0x9354, 0x9355, - 0x9356, 0x9357, 0x9358, 0x9359, 0x935a, 0x935b, 0x935c, 0x935d, - 0x935e, 0x935f, 0x9360, 0x9361, 0x9362, 0x9363, 0x9364, 0x9365, - 0x9366, 0x9367, 0x9368, 0x9369, 0x936a, 0x936b, 0x936c, 0x936d, - 0x936e, 0x936f, 0x9370, 0x9371, 0x9372, 0x9373, 0x9374, 0x9375, - 0x9376, 0x9377, 0x9378, 0x9379, 0x937a, 0x937b, 0x937c, 0x937d, - 0x937e, 0x93a1, 0x93a2, 0x93a3, 0x93a4, 0x93a5, 0x93a6, 0x93a7, - 0x93a8, 0x93a9, 0x93aa, 0x93ab, 0x93ac, 0x93ad, 0x93ae, 0x93af, - 0x93b0, 0x93b1, 0x93b2, 0x93b3, 0x93b4, 0x93b5, 0x93b6, 0x93b7, - 0x93b8, 0x93b9, 0x93ba, 0x93bb, 0x93bc, 0x93bd, 0x93be, 0x93bf, - 0x93c0, 0x93c1, 0x93c2, 0x93c3, 0x93c4, 0x93c5, 0x93c6, 0x93c7, - 0x93c8, 0x93c9, 0x93ca, 0x93cb, 0x93cc, 0x93cd, 0x93ce, 0x93cf, - 0x93d0, 0x93d1, 0x93d2, 0x93d3, 0x93d4, 0x93d5, 0x93d6, 0x93d7, - 0x93d8, 0x93d9, 0x93da, 0x93db, 0x93dc, 0x93dd, 0x93de, 0x93df, - 0x93e0, 0x93e1, 0x93e2, 0x93e3, 0x93e4, 0x93e5, 0x93e6, 0x93e7, - 0x93e8, 0x93e9, 0x93ea, 0x93eb, 0x93ec, 0x93ed, 0x93ee, 0x93ef, - 0x93f0, 0x93f1, 0x93f2, 0x93f3, 0x93f4, 0x93f5, 0x93f6, 0x93f7, - 0x93f8, 0x93f9, 0x93fa, 0x93fb, 0x93fc, 0x93fd, 0x93fe, 0x9440, - 0x9441, 0x9442, 0x9443, 0x9444, 0x9445, 0x9446, 0x9447, 0x9448, - 0x9449, 0x944a, 0x944b, 0x944c, 0x944d, 0x944e, 0x944f, 0x9450, - 0x9451, 0x9452, 0x9453, 0x9454, 0x9455, 0x9456, 0x9457, 0x9458, - 0x9459, 0x945a, 0x945b, 0x945c, 0x945d, 0x945e, 0x945f, 0x9460, - 0x9461, 0x9462, 0x9463, 0x9464, 0x9465, 0x9466, 0x9467, 0x9468, - 0x9469, 0x946a, 0x946b, 0x946c, 0x946d, 0x946e, 0x946f, 0x9470, - 0x9471, 0x9472, 0x9473, 0x9474, 0x9475, 0x9476, 0x9477, 0x9478, - 0x9479, 0x947a, 0x947b, 0x947c, 0x947d, 0x947e, 0x94a1, 0x94a2, - /* 0xe700 .. 0xe7ff */ - 0x94a3, 0x94a4, 0x94a5, 0x94a6, 0x94a7, 0x94a8, 0x94a9, 0x94aa, - 0x94ab, 0x94ac, 0x94ad, 0x94ae, 0x94af, 0x94b0, 0x94b1, 0x94b2, - 0x94b3, 0x94b4, 0x94b5, 0x94b6, 0x94b7, 0x94b8, 0x94b9, 0x94ba, - 0x94bb, 0x94bc, 0x94bd, 0x94be, 0x94bf, 0x94c0, 0x94c1, 0x94c2, - 0x94c3, 0x94c4, 0x94c5, 0x94c6, 0x94c7, 0x94c8, 0x94c9, 0x94ca, - 0x94cb, 0x94cc, 0x94cd, 0x94ce, 0x94cf, 0x94d0, 0x94d1, 0x94d2, - 0x94d3, 0x94d4, 0x94d5, 0x94d6, 0x94d7, 0x94d8, 0x94d9, 0x94da, - 0x94db, 0x94dc, 0x94dd, 0x94de, 0x94df, 0x94e0, 0x94e1, 0x94e2, - 0x94e3, 0x94e4, 0x94e5, 0x94e6, 0x94e7, 0x94e8, 0x94e9, 0x94ea, - 0x94eb, 0x94ec, 0x94ed, 0x94ee, 0x94ef, 0x94f0, 0x94f1, 0x94f2, - 0x94f3, 0x94f4, 0x94f5, 0x94f6, 0x94f7, 0x94f8, 0x94f9, 0x94fa, - 0x94fb, 0x94fc, 0x94fd, 0x94fe, 0x9540, 0x9541, 0x9542, 0x9543, - 0x9544, 0x9545, 0x9546, 0x9547, 0x9548, 0x9549, 0x954a, 0x954b, - 0x954c, 0x954d, 0x954e, 0x954f, 0x9550, 0x9551, 0x9552, 0x9553, - 0x9554, 0x9555, 0x9556, 0x9557, 0x9558, 0x9559, 0x955a, 0x955b, - 0x955c, 0x955d, 0x955e, 0x955f, 0x9560, 0x9561, 0x9562, 0x9563, - 0x9564, 0x9565, 0x9566, 0x9567, 0x9568, 0x9569, 0x956a, 0x956b, - 0x956c, 0x956d, 0x956e, 0x956f, 0x9570, 0x9571, 0x9572, 0x9573, - 0x9574, 0x9575, 0x9576, 0x9577, 0x9578, 0x9579, 0x957a, 0x957b, - 0x957c, 0x957d, 0x957e, 0x95a1, 0x95a2, 0x95a3, 0x95a4, 0x95a5, - 0x95a6, 0x95a7, 0x95a8, 0x95a9, 0x95aa, 0x95ab, 0x95ac, 0x95ad, - 0x95ae, 0x95af, 0x95b0, 0x95b1, 0x95b2, 0x95b3, 0x95b4, 0x95b5, - 0x95b6, 0x95b7, 0x95b8, 0x95b9, 0x95ba, 0x95bb, 0x95bc, 0x95bd, - 0x95be, 0x95bf, 0x95c0, 0x95c1, 0x95c2, 0x95c3, 0x95c4, 0x95c5, - 0x95c6, 0x95c7, 0x95c8, 0x95c9, 0x95ca, 0x95cb, 0x95cc, 0x95cd, - 0x95ce, 0x95cf, 0x95d0, 0x95d1, 0x95d2, 0x95d3, 0x95d4, 0x95d5, - 0x95d6, 0x95d7, 0x95d8, 0x95d9, 0x95da, 0x95db, 0x95dc, 0x95dd, - 0x95de, 0x95df, 0x95e0, 0x95e1, 0x95e2, 0x95e3, 0x95e4, 0x95e5, - 0x95e6, 0x95e7, 0x95e8, 0x95e9, 0x95ea, 0x95eb, 0x95ec, 0x95ed, - 0x95ee, 0x95ef, 0x95f0, 0x95f1, 0x95f2, 0x95f3, 0x95f4, 0x95f5, - 0x95f6, 0x95f7, 0x95f8, 0x95f9, 0x95fa, 0x95fb, 0x95fc, 0x95fd, - 0x95fe, 0x9640, 0x9641, 0x9642, 0x9643, 0x9644, 0x9645, 0x9646, - /* 0xe800 .. 0xe8ff */ - 0x9647, 0x9648, 0x9649, 0x964a, 0x964b, 0x964c, 0x964d, 0x964e, - 0x964f, 0x9650, 0x9651, 0x9652, 0x9653, 0x9654, 0x9655, 0x9656, - 0x9657, 0x9658, 0x9659, 0x965a, 0x965b, 0x965c, 0x965d, 0x965e, - 0x965f, 0x9660, 0x9661, 0x9662, 0x9663, 0x9664, 0x9665, 0x9666, - 0x9667, 0x9668, 0x9669, 0x966a, 0x966b, 0x966c, 0x966d, 0x966e, - 0x966f, 0x9670, 0x9671, 0x9672, 0x9673, 0x9674, 0x9675, 0x9676, - 0x9677, 0x9678, 0x9679, 0x967a, 0x967b, 0x967c, 0x967d, 0x967e, - 0x96a1, 0x96a2, 0x96a3, 0x96a4, 0x96a5, 0x96a6, 0x96a7, 0x96a8, - 0x96a9, 0x96aa, 0x96ab, 0x96ac, 0x96ad, 0x96ae, 0x96af, 0x96b0, - 0x96b1, 0x96b2, 0x96b3, 0x96b4, 0x96b5, 0x96b6, 0x96b7, 0x96b8, - 0x96b9, 0x96ba, 0x96bb, 0x96bc, 0x96bd, 0x96be, 0x96bf, 0x96c0, - 0x96c1, 0x96c2, 0x96c3, 0x96c4, 0x96c5, 0x96c6, 0x96c7, 0x96c8, - 0x96c9, 0x96ca, 0x96cb, 0x96cc, 0x96cd, 0x96ce, 0x96cf, 0x96d0, - 0x96d1, 0x96d2, 0x96d3, 0x96d4, 0x96d5, 0x96d6, 0x96d7, 0x96d8, - 0x96d9, 0x96da, 0x96db, 0x96dc, 0x96dd, 0x96de, 0x96df, 0x96e0, - 0x96e1, 0x96e2, 0x96e3, 0x96e4, 0x96e5, 0x96e6, 0x96e7, 0x96e8, - 0x96e9, 0x96ea, 0x96eb, 0x96ec, 0x96ed, 0x96ee, 0x96ef, 0x96f0, - 0x96f1, 0x96f2, 0x96f3, 0x96f4, 0x96f5, 0x96f6, 0x96f7, 0x96f8, - 0x96f9, 0x96fa, 0x96fb, 0x96fc, 0x96fd, 0x96fe, 0x9740, 0x9741, - 0x9742, 0x9743, 0x9744, 0x9745, 0x9746, 0x9747, 0x9748, 0x9749, - 0x974a, 0x974b, 0x974c, 0x974d, 0x974e, 0x974f, 0x9750, 0x9751, - 0x9752, 0x9753, 0x9754, 0x9755, 0x9756, 0x9757, 0x9758, 0x9759, - 0x975a, 0x975b, 0x975c, 0x975d, 0x975e, 0x975f, 0x9760, 0x9761, - 0x9762, 0x9763, 0x9764, 0x9765, 0x9766, 0x9767, 0x9768, 0x9769, - 0x976a, 0x976b, 0x976c, 0x976d, 0x976e, 0x976f, 0x9770, 0x9771, - 0x9772, 0x9773, 0x9774, 0x9775, 0x9776, 0x9777, 0x9778, 0x9779, - 0x977a, 0x977b, 0x977c, 0x977d, 0x977e, 0x97a1, 0x97a2, 0x97a3, - 0x97a4, 0x97a5, 0x97a6, 0x97a7, 0x97a8, 0x97a9, 0x97aa, 0x97ab, - 0x97ac, 0x97ad, 0x97ae, 0x97af, 0x97b0, 0x97b1, 0x97b2, 0x97b3, - 0x97b4, 0x97b5, 0x97b6, 0x97b7, 0x97b8, 0x97b9, 0x97ba, 0x97bb, - 0x97bc, 0x97bd, 0x97be, 0x97bf, 0x97c0, 0x97c1, 0x97c2, 0x97c3, - 0x97c4, 0x97c5, 0x97c6, 0x97c7, 0x97c8, 0x97c9, 0x97ca, 0x97cb, - /* 0xe900 .. 0xe9ff */ - 0x97cc, 0x97cd, 0x97ce, 0x97cf, 0x97d0, 0x97d1, 0x97d2, 0x97d3, - 0x97d4, 0x97d5, 0x97d6, 0x97d7, 0x97d8, 0x97d9, 0x97da, 0x97db, - 0x97dc, 0x97dd, 0x97de, 0x97df, 0x97e0, 0x97e1, 0x97e2, 0x97e3, - 0x97e4, 0x97e5, 0x97e6, 0x97e7, 0x97e8, 0x97e9, 0x97ea, 0x97eb, - 0x97ec, 0x97ed, 0x97ee, 0x97ef, 0x97f0, 0x97f1, 0x97f2, 0x97f3, - 0x97f4, 0x97f5, 0x97f6, 0x97f7, 0x97f8, 0x97f9, 0x97fa, 0x97fb, - 0x97fc, 0x97fd, 0x97fe, 0x9840, 0x9841, 0x9842, 0x9843, 0x9844, - 0x9845, 0x9846, 0x9847, 0x9848, 0x9849, 0x984a, 0x984b, 0x984c, - 0x984d, 0x984e, 0x984f, 0x9850, 0x9851, 0x9852, 0x9853, 0x9854, - 0x9855, 0x9856, 0x9857, 0x9858, 0x9859, 0x985a, 0x985b, 0x985c, - 0x985d, 0x985e, 0x985f, 0x9860, 0x9861, 0x9862, 0x9863, 0x9864, - 0x9865, 0x9866, 0x9867, 0x9868, 0x9869, 0x986a, 0x986b, 0x986c, - 0x986d, 0x986e, 0x986f, 0x9870, 0x9871, 0x9872, 0x9873, 0x9874, - 0x9875, 0x9876, 0x9877, 0x9878, 0x9879, 0x987a, 0x987b, 0x987c, - 0x987d, 0x987e, 0x98a1, 0x98a2, 0x98a3, 0x98a4, 0x98a5, 0x98a6, - 0x98a7, 0x98a8, 0x98a9, 0x98aa, 0x98ab, 0x98ac, 0x98ad, 0x98ae, - 0x98af, 0x98b0, 0x98b1, 0x98b2, 0x98b3, 0x98b4, 0x98b5, 0x98b6, - 0x98b7, 0x98b8, 0x98b9, 0x98ba, 0x98bb, 0x98bc, 0x98bd, 0x98be, - 0x98bf, 0x98c0, 0x98c1, 0x98c2, 0x98c3, 0x98c4, 0x98c5, 0x98c6, - 0x98c7, 0x98c8, 0x98c9, 0x98ca, 0x98cb, 0x98cc, 0x98cd, 0x98ce, - 0x98cf, 0x98d0, 0x98d1, 0x98d2, 0x98d3, 0x98d4, 0x98d5, 0x98d6, - 0x98d7, 0x98d8, 0x98d9, 0x98da, 0x98db, 0x98dc, 0x98dd, 0x98de, - 0x98df, 0x98e0, 0x98e1, 0x98e2, 0x98e3, 0x98e4, 0x98e5, 0x98e6, - 0x98e7, 0x98e8, 0x98e9, 0x98ea, 0x98eb, 0x98ec, 0x98ed, 0x98ee, - 0x98ef, 0x98f0, 0x98f1, 0x98f2, 0x98f3, 0x98f4, 0x98f5, 0x98f6, - 0x98f7, 0x98f8, 0x98f9, 0x98fa, 0x98fb, 0x98fc, 0x98fd, 0x98fe, - 0x9940, 0x9941, 0x9942, 0x9943, 0x9944, 0x9945, 0x9946, 0x9947, - 0x9948, 0x9949, 0x994a, 0x994b, 0x994c, 0x994d, 0x994e, 0x994f, - 0x9950, 0x9951, 0x9952, 0x9953, 0x9954, 0x9955, 0x9956, 0x9957, - 0x9958, 0x9959, 0x995a, 0x995b, 0x995c, 0x995d, 0x995e, 0x995f, - 0x9960, 0x9961, 0x9962, 0x9963, 0x9964, 0x9965, 0x9966, 0x9967, - 0x9968, 0x9969, 0x996a, 0x996b, 0x996c, 0x996d, 0x996e, 0x996f, - /* 0xea00 .. 0xeaff */ - 0x9970, 0x9971, 0x9972, 0x9973, 0x9974, 0x9975, 0x9976, 0x9977, - 0x9978, 0x9979, 0x997a, 0x997b, 0x997c, 0x997d, 0x997e, 0x99a1, - 0x99a2, 0x99a3, 0x99a4, 0x99a5, 0x99a6, 0x99a7, 0x99a8, 0x99a9, - 0x99aa, 0x99ab, 0x99ac, 0x99ad, 0x99ae, 0x99af, 0x99b0, 0x99b1, - 0x99b2, 0x99b3, 0x99b4, 0x99b5, 0x99b6, 0x99b7, 0x99b8, 0x99b9, - 0x99ba, 0x99bb, 0x99bc, 0x99bd, 0x99be, 0x99bf, 0x99c0, 0x99c1, - 0x99c2, 0x99c3, 0x99c4, 0x99c5, 0x99c6, 0x99c7, 0x99c8, 0x99c9, - 0x99ca, 0x99cb, 0x99cc, 0x99cd, 0x99ce, 0x99cf, 0x99d0, 0x99d1, - 0x99d2, 0x99d3, 0x99d4, 0x99d5, 0x99d6, 0x99d7, 0x99d8, 0x99d9, - 0x99da, 0x99db, 0x99dc, 0x99dd, 0x99de, 0x99df, 0x99e0, 0x99e1, - 0x99e2, 0x99e3, 0x99e4, 0x99e5, 0x99e6, 0x99e7, 0x99e8, 0x99e9, - 0x99ea, 0x99eb, 0x99ec, 0x99ed, 0x99ee, 0x99ef, 0x99f0, 0x99f1, - 0x99f2, 0x99f3, 0x99f4, 0x99f5, 0x99f6, 0x99f7, 0x99f8, 0x99f9, - 0x99fa, 0x99fb, 0x99fc, 0x99fd, 0x99fe, 0x9a40, 0x9a41, 0x9a42, - 0x9a43, 0x9a44, 0x9a45, 0x9a46, 0x9a47, 0x9a48, 0x9a49, 0x9a4a, - 0x9a4b, 0x9a4c, 0x9a4d, 0x9a4e, 0x9a4f, 0x9a50, 0x9a51, 0x9a52, - 0x9a53, 0x9a54, 0x9a55, 0x9a56, 0x9a57, 0x9a58, 0x9a59, 0x9a5a, - 0x9a5b, 0x9a5c, 0x9a5d, 0x9a5e, 0x9a5f, 0x9a60, 0x9a61, 0x9a62, - 0x9a63, 0x9a64, 0x9a65, 0x9a66, 0x9a67, 0x9a68, 0x9a69, 0x9a6a, - 0x9a6b, 0x9a6c, 0x9a6d, 0x9a6e, 0x9a6f, 0x9a70, 0x9a71, 0x9a72, - 0x9a73, 0x9a74, 0x9a75, 0x9a76, 0x9a77, 0x9a78, 0x9a79, 0x9a7a, - 0x9a7b, 0x9a7c, 0x9a7d, 0x9a7e, 0x9aa1, 0x9aa2, 0x9aa3, 0x9aa4, - 0x9aa5, 0x9aa6, 0x9aa7, 0x9aa8, 0x9aa9, 0x9aaa, 0x9aab, 0x9aac, - 0x9aad, 0x9aae, 0x9aaf, 0x9ab0, 0x9ab1, 0x9ab2, 0x9ab3, 0x9ab4, - 0x9ab5, 0x9ab6, 0x9ab7, 0x9ab8, 0x9ab9, 0x9aba, 0x9abb, 0x9abc, - 0x9abd, 0x9abe, 0x9abf, 0x9ac0, 0x9ac1, 0x9ac2, 0x9ac3, 0x9ac4, - 0x9ac5, 0x9ac6, 0x9ac7, 0x9ac8, 0x9ac9, 0x9aca, 0x9acb, 0x9acc, - 0x9acd, 0x9ace, 0x9acf, 0x9ad0, 0x9ad1, 0x9ad2, 0x9ad3, 0x9ad4, - 0x9ad5, 0x9ad6, 0x9ad7, 0x9ad8, 0x9ad9, 0x9ada, 0x9adb, 0x9adc, - 0x9add, 0x9ade, 0x9adf, 0x9ae0, 0x9ae1, 0x9ae2, 0x9ae3, 0x9ae4, - 0x9ae5, 0x9ae6, 0x9ae7, 0x9ae8, 0x9ae9, 0x9aea, 0x9aeb, 0x9aec, - 0x9aed, 0x9aee, 0x9aef, 0x9af0, 0x9af1, 0x9af2, 0x9af3, 0x9af4, - /* 0xeb00 .. 0xebff */ - 0x9af5, 0x9af6, 0x9af7, 0x9af8, 0x9af9, 0x9afa, 0x9afb, 0x9afc, - 0x9afd, 0x9afe, 0x9b40, 0x9b41, 0x9b42, 0x9b43, 0x9b44, 0x9b45, - 0x9b46, 0x9b47, 0x9b48, 0x9b49, 0x9b4a, 0x9b4b, 0x9b4c, 0x9b4d, - 0x9b4e, 0x9b4f, 0x9b50, 0x9b51, 0x9b52, 0x9b53, 0x9b54, 0x9b55, - 0x9b56, 0x9b57, 0x9b58, 0x9b59, 0x9b5a, 0x9b5b, 0x9b5c, 0x9b5d, - 0x9b5e, 0x9b5f, 0x9b60, 0x9b61, 0x9b62, 0x9b63, 0x9b64, 0x9b65, - 0x9b66, 0x9b67, 0x9b68, 0x9b69, 0x9b6a, 0x9b6b, 0x9b6c, 0x9b6d, - 0x9b6e, 0x9b6f, 0x9b70, 0x9b71, 0x9b72, 0x9b73, 0x9b74, 0x9b75, - 0x9b76, 0x9b77, 0x9b78, 0x9b79, 0x9b7a, 0x9b7b, 0x9b7c, 0x9b7d, - 0x9b7e, 0x9ba1, 0x9ba2, 0x9ba3, 0x9ba4, 0x9ba5, 0x9ba6, 0x9ba7, - 0x9ba8, 0x9ba9, 0x9baa, 0x9bab, 0x9bac, 0x9bad, 0x9bae, 0x9baf, - 0x9bb0, 0x9bb1, 0x9bb2, 0x9bb3, 0x9bb4, 0x9bb5, 0x9bb6, 0x9bb7, - 0x9bb8, 0x9bb9, 0x9bba, 0x9bbb, 0x9bbc, 0x9bbd, 0x9bbe, 0x9bbf, - 0x9bc0, 0x9bc1, 0x9bc2, 0x9bc3, 0x9bc4, 0x9bc5, 0x9bc6, 0x9bc7, - 0x9bc8, 0x9bc9, 0x9bca, 0x9bcb, 0x9bcc, 0x9bcd, 0x9bce, 0x9bcf, - 0x9bd0, 0x9bd1, 0x9bd2, 0x9bd3, 0x9bd4, 0x9bd5, 0x9bd6, 0x9bd7, - 0x9bd8, 0x9bd9, 0x9bda, 0x9bdb, 0x9bdc, 0x9bdd, 0x9bde, 0x9bdf, - 0x9be0, 0x9be1, 0x9be2, 0x9be3, 0x9be4, 0x9be5, 0x9be6, 0x9be7, - 0x9be8, 0x9be9, 0x9bea, 0x9beb, 0x9bec, 0x9bed, 0x9bee, 0x9bef, - 0x9bf0, 0x9bf1, 0x9bf2, 0x9bf3, 0x9bf4, 0x9bf5, 0x9bf6, 0x9bf7, - 0x9bf8, 0x9bf9, 0x9bfa, 0x9bfb, 0x9bfc, 0x9bfd, 0x9bfe, 0x9c40, - 0x9c41, 0x9c42, 0x9c43, 0x9c44, 0x9c45, 0x9c46, 0x9c47, 0x9c48, - 0x9c49, 0x9c4a, 0x9c4b, 0x9c4c, 0x9c4d, 0x9c4e, 0x9c4f, 0x9c50, - 0x9c51, 0x9c52, 0x9c53, 0x9c54, 0x9c55, 0x9c56, 0x9c57, 0x9c58, - 0x9c59, 0x9c5a, 0x9c5b, 0x9c5c, 0x9c5d, 0x9c5e, 0x9c5f, 0x9c60, - 0x9c61, 0x9c62, 0x9c63, 0x9c64, 0x9c65, 0x9c66, 0x9c67, 0x9c68, - 0x9c69, 0x9c6a, 0x9c6b, 0x9c6c, 0x9c6d, 0x9c6e, 0x9c6f, 0x9c70, - 0x9c71, 0x9c72, 0x9c73, 0x9c74, 0x9c75, 0x9c76, 0x9c77, 0x9c78, - 0x9c79, 0x9c7a, 0x9c7b, 0x9c7c, 0x9c7d, 0x9c7e, 0x9ca1, 0x9ca2, - 0x9ca3, 0x9ca4, 0x9ca5, 0x9ca6, 0x9ca7, 0x9ca8, 0x9ca9, 0x9caa, - 0x9cab, 0x9cac, 0x9cad, 0x9cae, 0x9caf, 0x9cb0, 0x9cb1, 0x9cb2, - 0x9cb3, 0x9cb4, 0x9cb5, 0x9cb6, 0x9cb7, 0x9cb8, 0x9cb9, 0x9cba, - /* 0xec00 .. 0xecff */ - 0x9cbb, 0x9cbc, 0x9cbd, 0x9cbe, 0x9cbf, 0x9cc0, 0x9cc1, 0x9cc2, - 0x9cc3, 0x9cc4, 0x9cc5, 0x9cc6, 0x9cc7, 0x9cc8, 0x9cc9, 0x9cca, - 0x9ccb, 0x9ccc, 0x9ccd, 0x9cce, 0x9ccf, 0x9cd0, 0x9cd1, 0x9cd2, - 0x9cd3, 0x9cd4, 0x9cd5, 0x9cd6, 0x9cd7, 0x9cd8, 0x9cd9, 0x9cda, - 0x9cdb, 0x9cdc, 0x9cdd, 0x9cde, 0x9cdf, 0x9ce0, 0x9ce1, 0x9ce2, - 0x9ce3, 0x9ce4, 0x9ce5, 0x9ce6, 0x9ce7, 0x9ce8, 0x9ce9, 0x9cea, - 0x9ceb, 0x9cec, 0x9ced, 0x9cee, 0x9cef, 0x9cf0, 0x9cf1, 0x9cf2, - 0x9cf3, 0x9cf4, 0x9cf5, 0x9cf6, 0x9cf7, 0x9cf8, 0x9cf9, 0x9cfa, - 0x9cfb, 0x9cfc, 0x9cfd, 0x9cfe, 0x9d40, 0x9d41, 0x9d42, 0x9d43, - 0x9d44, 0x9d45, 0x9d46, 0x9d47, 0x9d48, 0x9d49, 0x9d4a, 0x9d4b, - 0x9d4c, 0x9d4d, 0x9d4e, 0x9d4f, 0x9d50, 0x9d51, 0x9d52, 0x9d53, - 0x9d54, 0x9d55, 0x9d56, 0x9d57, 0x9d58, 0x9d59, 0x9d5a, 0x9d5b, - 0x9d5c, 0x9d5d, 0x9d5e, 0x9d5f, 0x9d60, 0x9d61, 0x9d62, 0x9d63, - 0x9d64, 0x9d65, 0x9d66, 0x9d67, 0x9d68, 0x9d69, 0x9d6a, 0x9d6b, - 0x9d6c, 0x9d6d, 0x9d6e, 0x9d6f, 0x9d70, 0x9d71, 0x9d72, 0x9d73, - 0x9d74, 0x9d75, 0x9d76, 0x9d77, 0x9d78, 0x9d79, 0x9d7a, 0x9d7b, - 0x9d7c, 0x9d7d, 0x9d7e, 0x9da1, 0x9da2, 0x9da3, 0x9da4, 0x9da5, - 0x9da6, 0x9da7, 0x9da8, 0x9da9, 0x9daa, 0x9dab, 0x9dac, 0x9dad, - 0x9dae, 0x9daf, 0x9db0, 0x9db1, 0x9db2, 0x9db3, 0x9db4, 0x9db5, - 0x9db6, 0x9db7, 0x9db8, 0x9db9, 0x9dba, 0x9dbb, 0x9dbc, 0x9dbd, - 0x9dbe, 0x9dbf, 0x9dc0, 0x9dc1, 0x9dc2, 0x9dc3, 0x9dc4, 0x9dc5, - 0x9dc6, 0x9dc7, 0x9dc8, 0x9dc9, 0x9dca, 0x9dcb, 0x9dcc, 0x9dcd, - 0x9dce, 0x9dcf, 0x9dd0, 0x9dd1, 0x9dd2, 0x9dd3, 0x9dd4, 0x9dd5, - 0x9dd6, 0x9dd7, 0x9dd8, 0x9dd9, 0x9dda, 0x9ddb, 0x9ddc, 0x9ddd, - 0x9dde, 0x9ddf, 0x9de0, 0x9de1, 0x9de2, 0x9de3, 0x9de4, 0x9de5, - 0x9de6, 0x9de7, 0x9de8, 0x9de9, 0x9dea, 0x9deb, 0x9dec, 0x9ded, - 0x9dee, 0x9def, 0x9df0, 0x9df1, 0x9df2, 0x9df3, 0x9df4, 0x9df5, - 0x9df6, 0x9df7, 0x9df8, 0x9df9, 0x9dfa, 0x9dfb, 0x9dfc, 0x9dfd, - 0x9dfe, 0x9e40, 0x9e41, 0x9e42, 0x9e43, 0x9e44, 0x9e45, 0x9e46, - 0x9e47, 0x9e48, 0x9e49, 0x9e4a, 0x9e4b, 0x9e4c, 0x9e4d, 0x9e4e, - 0x9e4f, 0x9e50, 0x9e51, 0x9e52, 0x9e53, 0x9e54, 0x9e55, 0x9e56, - 0x9e57, 0x9e58, 0x9e59, 0x9e5a, 0x9e5b, 0x9e5c, 0x9e5d, 0x9e5e, - /* 0xed00 .. 0xedff */ - 0x9e5f, 0x9e60, 0x9e61, 0x9e62, 0x9e63, 0x9e64, 0x9e65, 0x9e66, - 0x9e67, 0x9e68, 0x9e69, 0x9e6a, 0x9e6b, 0x9e6c, 0x9e6d, 0x9e6e, - 0x9e6f, 0x9e70, 0x9e71, 0x9e72, 0x9e73, 0x9e74, 0x9e75, 0x9e76, - 0x9e77, 0x9e78, 0x9e79, 0x9e7a, 0x9e7b, 0x9e7c, 0x9e7d, 0x9e7e, - 0x9ea1, 0x9ea2, 0x9ea3, 0x9ea4, 0x9ea5, 0x9ea6, 0x9ea7, 0x9ea8, - 0x9ea9, 0x9eaa, 0x9eab, 0x9eac, 0x9ead, 0x9eae, 0x9eaf, 0x9eb0, - 0x9eb1, 0x9eb2, 0x9eb3, 0x9eb4, 0x9eb5, 0x9eb6, 0x9eb7, 0x9eb8, - 0x9eb9, 0x9eba, 0x9ebb, 0x9ebc, 0x9ebd, 0x9ebe, 0x9ebf, 0x9ec0, - 0x9ec1, 0x9ec2, 0x9ec3, 0x9ec4, 0x9ec5, 0x9ec6, 0x9ec7, 0x9ec8, - 0x9ec9, 0x9eca, 0x9ecb, 0x9ecc, 0x9ecd, 0x9ece, 0x9ecf, 0x9ed0, - 0x9ed1, 0x9ed2, 0x9ed3, 0x9ed4, 0x9ed5, 0x9ed6, 0x9ed7, 0x9ed8, - 0x9ed9, 0x9eda, 0x9edb, 0x9edc, 0x9edd, 0x9ede, 0x9edf, 0x9ee0, - 0x9ee1, 0x9ee2, 0x9ee3, 0x9ee4, 0x9ee5, 0x9ee6, 0x9ee7, 0x9ee8, - 0x9ee9, 0x9eea, 0x9eeb, 0x9eec, 0x9eed, 0x9eee, 0x9eef, 0x9ef0, - 0x9ef1, 0x9ef2, 0x9ef3, 0x9ef4, 0x9ef5, 0x9ef6, 0x9ef7, 0x9ef8, - 0x9ef9, 0x9efa, 0x9efb, 0x9efc, 0x9efd, 0x9efe, 0x9f40, 0x9f41, - 0x9f42, 0x9f43, 0x9f44, 0x9f45, 0x9f46, 0x9f47, 0x9f48, 0x9f49, - 0x9f4a, 0x9f4b, 0x9f4c, 0x9f4d, 0x9f4e, 0x9f4f, 0x9f50, 0x9f51, - 0x9f52, 0x9f53, 0x9f54, 0x9f55, 0x9f56, 0x9f57, 0x9f58, 0x9f59, - 0x9f5a, 0x9f5b, 0x9f5c, 0x9f5d, 0x9f5e, 0x9f5f, 0x9f60, 0x9f61, - 0x9f62, 0x9f63, 0x9f64, 0x9f65, 0x9f66, 0x9f67, 0x9f68, 0x9f69, - 0x9f6a, 0x9f6b, 0x9f6c, 0x9f6d, 0x9f6e, 0x9f6f, 0x9f70, 0x9f71, - 0x9f72, 0x9f73, 0x9f74, 0x9f75, 0x9f76, 0x9f77, 0x9f78, 0x9f79, - 0x9f7a, 0x9f7b, 0x9f7c, 0x9f7d, 0x9f7e, 0x9fa1, 0x9fa2, 0x9fa3, - 0x9fa4, 0x9fa5, 0x9fa6, 0x9fa7, 0x9fa8, 0x9fa9, 0x9faa, 0x9fab, - 0x9fac, 0x9fad, 0x9fae, 0x9faf, 0x9fb0, 0x9fb1, 0x9fb2, 0x9fb3, - 0x9fb4, 0x9fb5, 0x9fb6, 0x9fb7, 0x9fb8, 0x9fb9, 0x9fba, 0x9fbb, - 0x9fbc, 0x9fbd, 0x9fbe, 0x9fbf, 0x9fc0, 0x9fc1, 0x9fc2, 0x9fc3, - 0x9fc4, 0x9fc5, 0x9fc6, 0x9fc7, 0x9fc8, 0x9fc9, 0x9fca, 0x9fcb, - 0x9fcc, 0x9fcd, 0x9fce, 0x9fcf, 0x9fd0, 0x9fd1, 0x9fd2, 0x9fd3, - 0x9fd4, 0x9fd5, 0x9fd6, 0x9fd7, 0x9fd8, 0x9fd9, 0x9fda, 0x9fdb, - 0x9fdc, 0x9fdd, 0x9fde, 0x9fdf, 0x9fe0, 0x9fe1, 0x9fe2, 0x9fe3, - /* 0xee00 .. 0xeeff */ - 0x9fe4, 0x9fe5, 0x9fe6, 0x9fe7, 0x9fe8, 0x9fe9, 0x9fea, 0x9feb, - 0x9fec, 0x9fed, 0x9fee, 0x9fef, 0x9ff0, 0x9ff1, 0x9ff2, 0x9ff3, - 0x9ff4, 0x9ff5, 0x9ff6, 0x9ff7, 0x9ff8, 0x9ff9, 0x9ffa, 0x9ffb, - 0x9ffc, 0x9ffd, 0x9ffe, 0xa040, 0xa041, 0xa042, 0xa043, 0xa044, - 0xa045, 0xa046, 0xa047, 0xa048, 0xa049, 0xa04a, 0xa04b, 0xa04c, - 0xa04d, 0xa04e, 0xa04f, 0xa050, 0xa051, 0xa052, 0xa053, 0xa054, - 0xa055, 0xa056, 0xa057, 0xa058, 0xa059, 0xa05a, 0xa05b, 0xa05c, - 0xa05d, 0xa05e, 0xa05f, 0xa060, 0xa061, 0xa062, 0xa063, 0xa064, - 0xa065, 0xa066, 0xa067, 0xa068, 0xa069, 0xa06a, 0xa06b, 0xa06c, - 0xa06d, 0xa06e, 0xa06f, 0xa070, 0xa071, 0xa072, 0xa073, 0xa074, - 0xa075, 0xa076, 0xa077, 0xa078, 0xa079, 0xa07a, 0xa07b, 0xa07c, - 0xa07d, 0xa07e, 0xa0a1, 0xa0a2, 0xa0a3, 0xa0a4, 0xa0a5, 0xa0a6, - 0xa0a7, 0xa0a8, 0xa0a9, 0xa0aa, 0xa0ab, 0xa0ac, 0xa0ad, 0xa0ae, - 0xa0af, 0xa0b0, 0xa0b1, 0xa0b2, 0xa0b3, 0xa0b4, 0xa0b5, 0xa0b6, - 0xa0b7, 0xa0b8, 0xa0b9, 0xa0ba, 0xa0bb, 0xa0bc, 0xa0bd, 0xa0be, - 0xa0bf, 0xa0c0, 0xa0c1, 0xa0c2, 0xa0c3, 0xa0c4, 0xa0c5, 0xa0c6, - 0xa0c7, 0xa0c8, 0xa0c9, 0xa0ca, 0xa0cb, 0xa0cc, 0xa0cd, 0xa0ce, - 0xa0cf, 0xa0d0, 0xa0d1, 0xa0d2, 0xa0d3, 0xa0d4, 0xa0d5, 0xa0d6, - 0xa0d7, 0xa0d8, 0xa0d9, 0xa0da, 0xa0db, 0xa0dc, 0xa0dd, 0xa0de, - 0xa0df, 0xa0e0, 0xa0e1, 0xa0e2, 0xa0e3, 0xa0e4, 0xa0e5, 0xa0e6, - 0xa0e7, 0xa0e8, 0xa0e9, 0xa0ea, 0xa0eb, 0xa0ec, 0xa0ed, 0xa0ee, - 0xa0ef, 0xa0f0, 0xa0f1, 0xa0f2, 0xa0f3, 0xa0f4, 0xa0f5, 0xa0f6, - 0xa0f7, 0xa0f8, 0xa0f9, 0xa0fa, 0xa0fb, 0xa0fc, 0xa0fd, 0xa0fe, - 0x8140, 0x8141, 0x8142, 0x8143, 0x8144, 0x8145, 0x8146, 0x8147, - 0x8148, 0x8149, 0x814a, 0x814b, 0x814c, 0x814d, 0x814e, 0x814f, - 0x8150, 0x8151, 0x8152, 0x8153, 0x8154, 0x8155, 0x8156, 0x8157, - 0x8158, 0x8159, 0x815a, 0x815b, 0x815c, 0x815d, 0x815e, 0x815f, - 0x8160, 0x8161, 0x8162, 0x8163, 0x8164, 0x8165, 0x8166, 0x8167, - 0x8168, 0x8169, 0x816a, 0x816b, 0x816c, 0x816d, 0x816e, 0x816f, - 0x8170, 0x8171, 0x8172, 0x8173, 0x8174, 0x8175, 0x8176, 0x8177, - 0x8178, 0x8179, 0x817a, 0x817b, 0x817c, 0x817d, 0x817e, 0x81a1, - 0x81a2, 0x81a3, 0x81a4, 0x81a5, 0x81a6, 0x81a7, 0x81a8, 0x81a9, - /* 0xef00 .. 0xefff */ - 0x81aa, 0x81ab, 0x81ac, 0x81ad, 0x81ae, 0x81af, 0x81b0, 0x81b1, - 0x81b2, 0x81b3, 0x81b4, 0x81b5, 0x81b6, 0x81b7, 0x81b8, 0x81b9, - 0x81ba, 0x81bb, 0x81bc, 0x81bd, 0x81be, 0x81bf, 0x81c0, 0x81c1, - 0x81c2, 0x81c3, 0x81c4, 0x81c5, 0x81c6, 0x81c7, 0x81c8, 0x81c9, - 0x81ca, 0x81cb, 0x81cc, 0x81cd, 0x81ce, 0x81cf, 0x81d0, 0x81d1, - 0x81d2, 0x81d3, 0x81d4, 0x81d5, 0x81d6, 0x81d7, 0x81d8, 0x81d9, - 0x81da, 0x81db, 0x81dc, 0x81dd, 0x81de, 0x81df, 0x81e0, 0x81e1, - 0x81e2, 0x81e3, 0x81e4, 0x81e5, 0x81e6, 0x81e7, 0x81e8, 0x81e9, - 0x81ea, 0x81eb, 0x81ec, 0x81ed, 0x81ee, 0x81ef, 0x81f0, 0x81f1, - 0x81f2, 0x81f3, 0x81f4, 0x81f5, 0x81f6, 0x81f7, 0x81f8, 0x81f9, - 0x81fa, 0x81fb, 0x81fc, 0x81fd, 0x81fe, 0x8240, 0x8241, 0x8242, - 0x8243, 0x8244, 0x8245, 0x8246, 0x8247, 0x8248, 0x8249, 0x824a, - 0x824b, 0x824c, 0x824d, 0x824e, 0x824f, 0x8250, 0x8251, 0x8252, - 0x8253, 0x8254, 0x8255, 0x8256, 0x8257, 0x8258, 0x8259, 0x825a, - 0x825b, 0x825c, 0x825d, 0x825e, 0x825f, 0x8260, 0x8261, 0x8262, - 0x8263, 0x8264, 0x8265, 0x8266, 0x8267, 0x8268, 0x8269, 0x826a, - 0x826b, 0x826c, 0x826d, 0x826e, 0x826f, 0x8270, 0x8271, 0x8272, - 0x8273, 0x8274, 0x8275, 0x8276, 0x8277, 0x8278, 0x8279, 0x827a, - 0x827b, 0x827c, 0x827d, 0x827e, 0x82a1, 0x82a2, 0x82a3, 0x82a4, - 0x82a5, 0x82a6, 0x82a7, 0x82a8, 0x82a9, 0x82aa, 0x82ab, 0x82ac, - 0x82ad, 0x82ae, 0x82af, 0x82b0, 0x82b1, 0x82b2, 0x82b3, 0x82b4, - 0x82b5, 0x82b6, 0x82b7, 0x82b8, 0x82b9, 0x82ba, 0x82bb, 0x82bc, - 0x82bd, 0x82be, 0x82bf, 0x82c0, 0x82c1, 0x82c2, 0x82c3, 0x82c4, - 0x82c5, 0x82c6, 0x82c7, 0x82c8, 0x82c9, 0x82ca, 0x82cb, 0x82cc, - 0x82cd, 0x82ce, 0x82cf, 0x82d0, 0x82d1, 0x82d2, 0x82d3, 0x82d4, - 0x82d5, 0x82d6, 0x82d7, 0x82d8, 0x82d9, 0x82da, 0x82db, 0x82dc, - 0x82dd, 0x82de, 0x82df, 0x82e0, 0x82e1, 0x82e2, 0x82e3, 0x82e4, - 0x82e5, 0x82e6, 0x82e7, 0x82e8, 0x82e9, 0x82ea, 0x82eb, 0x82ec, - 0x82ed, 0x82ee, 0x82ef, 0x82f0, 0x82f1, 0x82f2, 0x82f3, 0x82f4, - 0x82f5, 0x82f6, 0x82f7, 0x82f8, 0x82f9, 0x82fa, 0x82fb, 0x82fc, - 0x82fd, 0x82fe, 0x8340, 0x8341, 0x8342, 0x8343, 0x8344, 0x8345, - 0x8346, 0x8347, 0x8348, 0x8349, 0x834a, 0x834b, 0x834c, 0x834d, - /* 0xf000 .. 0xf0ff */ - 0x834e, 0x834f, 0x8350, 0x8351, 0x8352, 0x8353, 0x8354, 0x8355, - 0x8356, 0x8357, 0x8358, 0x8359, 0x835a, 0x835b, 0x835c, 0x835d, - 0x835e, 0x835f, 0x8360, 0x8361, 0x8362, 0x8363, 0x8364, 0x8365, - 0x8366, 0x8367, 0x8368, 0x8369, 0x836a, 0x836b, 0x836c, 0x836d, - 0x836e, 0x836f, 0x8370, 0x8371, 0x8372, 0x8373, 0x8374, 0x8375, - 0x8376, 0x8377, 0x8378, 0x8379, 0x837a, 0x837b, 0x837c, 0x837d, - 0x837e, 0x83a1, 0x83a2, 0x83a3, 0x83a4, 0x83a5, 0x83a6, 0x83a7, - 0x83a8, 0x83a9, 0x83aa, 0x83ab, 0x83ac, 0x83ad, 0x83ae, 0x83af, - 0x83b0, 0x83b1, 0x83b2, 0x83b3, 0x83b4, 0x83b5, 0x83b6, 0x83b7, - 0x83b8, 0x83b9, 0x83ba, 0x83bb, 0x83bc, 0x83bd, 0x83be, 0x83bf, - 0x83c0, 0x83c1, 0x83c2, 0x83c3, 0x83c4, 0x83c5, 0x83c6, 0x83c7, - 0x83c8, 0x83c9, 0x83ca, 0x83cb, 0x83cc, 0x83cd, 0x83ce, 0x83cf, - 0x83d0, 0x83d1, 0x83d2, 0x83d3, 0x83d4, 0x83d5, 0x83d6, 0x83d7, - 0x83d8, 0x83d9, 0x83da, 0x83db, 0x83dc, 0x83dd, 0x83de, 0x83df, - 0x83e0, 0x83e1, 0x83e2, 0x83e3, 0x83e4, 0x83e5, 0x83e6, 0x83e7, - 0x83e8, 0x83e9, 0x83ea, 0x83eb, 0x83ec, 0x83ed, 0x83ee, 0x83ef, - 0x83f0, 0x83f1, 0x83f2, 0x83f3, 0x83f4, 0x83f5, 0x83f6, 0x83f7, - 0x83f8, 0x83f9, 0x83fa, 0x83fb, 0x83fc, 0x83fd, 0x83fe, 0x8440, - 0x8441, 0x8442, 0x8443, 0x8444, 0x8445, 0x8446, 0x8447, 0x8448, - 0x8449, 0x844a, 0x844b, 0x844c, 0x844d, 0x844e, 0x844f, 0x8450, - 0x8451, 0x8452, 0x8453, 0x8454, 0x8455, 0x8456, 0x8457, 0x8458, - 0x8459, 0x845a, 0x845b, 0x845c, 0x845d, 0x845e, 0x845f, 0x8460, - 0x8461, 0x8462, 0x8463, 0x8464, 0x8465, 0x8466, 0x8467, 0x8468, - 0x8469, 0x846a, 0x846b, 0x846c, 0x846d, 0x846e, 0x846f, 0x8470, - 0x8471, 0x8472, 0x8473, 0x8474, 0x8475, 0x8476, 0x8477, 0x8478, - 0x8479, 0x847a, 0x847b, 0x847c, 0x847d, 0x847e, 0x84a1, 0x84a2, - 0x84a3, 0x84a4, 0x84a5, 0x84a6, 0x84a7, 0x84a8, 0x84a9, 0x84aa, - 0x84ab, 0x84ac, 0x84ad, 0x84ae, 0x84af, 0x84b0, 0x84b1, 0x84b2, - 0x84b3, 0x84b4, 0x84b5, 0x84b6, 0x84b7, 0x84b8, 0x84b9, 0x84ba, - 0x84bb, 0x84bc, 0x84bd, 0x84be, 0x84bf, 0x84c0, 0x84c1, 0x84c2, - 0x84c3, 0x84c4, 0x84c5, 0x84c6, 0x84c7, 0x84c8, 0x84c9, 0x84ca, - 0x84cb, 0x84cc, 0x84cd, 0x84ce, 0x84cf, 0x84d0, 0x84d1, 0x84d2, - /* 0xf100 .. 0xf1ff */ - 0x84d3, 0x84d4, 0x84d5, 0x84d6, 0x84d7, 0x84d8, 0x84d9, 0x84da, - 0x84db, 0x84dc, 0x84dd, 0x84de, 0x84df, 0x84e0, 0x84e1, 0x84e2, - 0x84e3, 0x84e4, 0x84e5, 0x84e6, 0x84e7, 0x84e8, 0x84e9, 0x84ea, - 0x84eb, 0x84ec, 0x84ed, 0x84ee, 0x84ef, 0x84f0, 0x84f1, 0x84f2, - 0x84f3, 0x84f4, 0x84f5, 0x84f6, 0x84f7, 0x84f8, 0x84f9, 0x84fa, - 0x84fb, 0x84fc, 0x84fd, 0x84fe, 0x8540, 0x8541, 0x8542, 0x8543, - 0x8544, 0x8545, 0x8546, 0x8547, 0x8548, 0x8549, 0x854a, 0x854b, - 0x854c, 0x854d, 0x854e, 0x854f, 0x8550, 0x8551, 0x8552, 0x8553, - 0x8554, 0x8555, 0x8556, 0x8557, 0x8558, 0x8559, 0x855a, 0x855b, - 0x855c, 0x855d, 0x855e, 0x855f, 0x8560, 0x8561, 0x8562, 0x8563, - 0x8564, 0x8565, 0x8566, 0x8567, 0x8568, 0x8569, 0x856a, 0x856b, - 0x856c, 0x856d, 0x856e, 0x856f, 0x8570, 0x8571, 0x8572, 0x8573, - 0x8574, 0x8575, 0x8576, 0x8577, 0x8578, 0x8579, 0x857a, 0x857b, - 0x857c, 0x857d, 0x857e, 0x85a1, 0x85a2, 0x85a3, 0x85a4, 0x85a5, - 0x85a6, 0x85a7, 0x85a8, 0x85a9, 0x85aa, 0x85ab, 0x85ac, 0x85ad, - 0x85ae, 0x85af, 0x85b0, 0x85b1, 0x85b2, 0x85b3, 0x85b4, 0x85b5, - 0x85b6, 0x85b7, 0x85b8, 0x85b9, 0x85ba, 0x85bb, 0x85bc, 0x85bd, - 0x85be, 0x85bf, 0x85c0, 0x85c1, 0x85c2, 0x85c3, 0x85c4, 0x85c5, - 0x85c6, 0x85c7, 0x85c8, 0x85c9, 0x85ca, 0x85cb, 0x85cc, 0x85cd, - 0x85ce, 0x85cf, 0x85d0, 0x85d1, 0x85d2, 0x85d3, 0x85d4, 0x85d5, - 0x85d6, 0x85d7, 0x85d8, 0x85d9, 0x85da, 0x85db, 0x85dc, 0x85dd, - 0x85de, 0x85df, 0x85e0, 0x85e1, 0x85e2, 0x85e3, 0x85e4, 0x85e5, - 0x85e6, 0x85e7, 0x85e8, 0x85e9, 0x85ea, 0x85eb, 0x85ec, 0x85ed, - 0x85ee, 0x85ef, 0x85f0, 0x85f1, 0x85f2, 0x85f3, 0x85f4, 0x85f5, - 0x85f6, 0x85f7, 0x85f8, 0x85f9, 0x85fa, 0x85fb, 0x85fc, 0x85fd, - 0x85fe, 0x8640, 0x8641, 0x8642, 0x8643, 0x8644, 0x8645, 0x8646, - 0x8647, 0x8648, 0x8649, 0x864a, 0x864b, 0x864c, 0x864d, 0x864e, - 0x864f, 0x8650, 0x8651, 0x8652, 0x8653, 0x8654, 0x8655, 0x8656, - 0x8657, 0x8658, 0x8659, 0x865a, 0x865b, 0x865c, 0x865d, 0x865e, - 0x865f, 0x8660, 0x8661, 0x8662, 0x8663, 0x8664, 0x8665, 0x8666, - 0x8667, 0x8668, 0x8669, 0x866a, 0x866b, 0x866c, 0x866d, 0x866e, - 0x866f, 0x8670, 0x8671, 0x8672, 0x8673, 0x8674, 0x8675, 0x8676, - /* 0xf200 .. 0xf2ff */ - 0x8677, 0x8678, 0x8679, 0x867a, 0x867b, 0x867c, 0x867d, 0x867e, - 0x86a1, 0x86a2, 0x86a3, 0x86a4, 0x86a5, 0x86a6, 0x86a7, 0x86a8, - 0x86a9, 0x86aa, 0x86ab, 0x86ac, 0x86ad, 0x86ae, 0x86af, 0x86b0, - 0x86b1, 0x86b2, 0x86b3, 0x86b4, 0x86b5, 0x86b6, 0x86b7, 0x86b8, - 0x86b9, 0x86ba, 0x86bb, 0x86bc, 0x86bd, 0x86be, 0x86bf, 0x86c0, - 0x86c1, 0x86c2, 0x86c3, 0x86c4, 0x86c5, 0x86c6, 0x86c7, 0x86c8, - 0x86c9, 0x86ca, 0x86cb, 0x86cc, 0x86cd, 0x86ce, 0x86cf, 0x86d0, - 0x86d1, 0x86d2, 0x86d3, 0x86d4, 0x86d5, 0x86d6, 0x86d7, 0x86d8, - 0x86d9, 0x86da, 0x86db, 0x86dc, 0x86dd, 0x86de, 0x86df, 0x86e0, - 0x86e1, 0x86e2, 0x86e3, 0x86e4, 0x86e5, 0x86e6, 0x86e7, 0x86e8, - 0x86e9, 0x86ea, 0x86eb, 0x86ec, 0x86ed, 0x86ee, 0x86ef, 0x86f0, - 0x86f1, 0x86f2, 0x86f3, 0x86f4, 0x86f5, 0x86f6, 0x86f7, 0x86f8, - 0x86f9, 0x86fa, 0x86fb, 0x86fc, 0x86fd, 0x86fe, 0x8740, 0x8741, - 0x8742, 0x8743, 0x8744, 0x8745, 0x8746, 0x8747, 0x8748, 0x8749, - 0x874a, 0x874b, 0x874c, 0x874d, 0x874e, 0x874f, 0x8750, 0x8751, - 0x8752, 0x8753, 0x8754, 0x8755, 0x8756, 0x8757, 0x8758, 0x8759, - 0x875a, 0x875b, 0x875c, 0x875d, 0x875e, 0x875f, 0x8760, 0x8761, - 0x8762, 0x8763, 0x8764, 0x8765, 0x8766, 0x8767, 0x8768, 0x8769, - 0x876a, 0x876b, 0x876c, 0x876d, 0x876e, 0x876f, 0x8770, 0x8771, - 0x8772, 0x8773, 0x8774, 0x8775, 0x8776, 0x8777, 0x8778, 0x8779, - 0x877a, 0x877b, 0x877c, 0x877d, 0x877e, 0x87a1, 0x87a2, 0x87a3, - 0x87a4, 0x87a5, 0x87a6, 0x87a7, 0x87a8, 0x87a9, 0x87aa, 0x87ab, - 0x87ac, 0x87ad, 0x87ae, 0x87af, 0x87b0, 0x87b1, 0x87b2, 0x87b3, - 0x87b4, 0x87b5, 0x87b6, 0x87b7, 0x87b8, 0x87b9, 0x87ba, 0x87bb, - 0x87bc, 0x87bd, 0x87be, 0x87bf, 0x87c0, 0x87c1, 0x87c2, 0x87c3, - 0x87c4, 0x87c5, 0x87c6, 0x87c7, 0x87c8, 0x87c9, 0x87ca, 0x87cb, - 0x87cc, 0x87cd, 0x87ce, 0x87cf, 0x87d0, 0x87d1, 0x87d2, 0x87d3, - 0x87d4, 0x87d5, 0x87d6, 0x87d7, 0x87d8, 0x87d9, 0x87da, 0x87db, - 0x87dc, 0x87dd, 0x87de, 0x87df, 0x87e0, 0x87e1, 0x87e2, 0x87e3, - 0x87e4, 0x87e5, 0x87e6, 0x87e7, 0x87e8, 0x87e9, 0x87ea, 0x87eb, - 0x87ec, 0x87ed, 0x87ee, 0x87ef, 0x87f0, 0x87f1, 0x87f2, 0x87f3, - 0x87f4, 0x87f5, 0x87f6, 0x87f7, 0x87f8, 0x87f9, 0x87fa, 0x87fb, - /* 0xf300 .. 0xf3ff */ - 0x87fc, 0x87fd, 0x87fe, 0x8840, 0x8841, 0x8842, 0x8843, 0x8844, - 0x8845, 0x8846, 0x8847, 0x8848, 0x8849, 0x884a, 0x884b, 0x884c, - 0x884d, 0x884e, 0x884f, 0x8850, 0x8851, 0x8852, 0x8853, 0x8854, - 0x8855, 0x8856, 0x8857, 0x8858, 0x8859, 0x885a, 0x885b, 0x885c, - 0x885d, 0x885e, 0x885f, 0x8860, 0x8861, 0x8862, 0x8863, 0x8864, - 0x8865, 0x8866, 0x8867, 0x8868, 0x8869, 0x886a, 0x886b, 0x886c, - 0x886d, 0x886e, 0x886f, 0x8870, 0x8871, 0x8872, 0x8873, 0x8874, - 0x8875, 0x8876, 0x8877, 0x8878, 0x8879, 0x887a, 0x887b, 0x887c, - 0x887d, 0x887e, 0x88a1, 0x88a2, 0x88a3, 0x88a4, 0x88a5, 0x88a6, - 0x88a7, 0x88a8, 0x88a9, 0x88aa, 0x88ab, 0x88ac, 0x88ad, 0x88ae, - 0x88af, 0x88b0, 0x88b1, 0x88b2, 0x88b3, 0x88b4, 0x88b5, 0x88b6, - 0x88b7, 0x88b8, 0x88b9, 0x88ba, 0x88bb, 0x88bc, 0x88bd, 0x88be, - 0x88bf, 0x88c0, 0x88c1, 0x88c2, 0x88c3, 0x88c4, 0x88c5, 0x88c6, - 0x88c7, 0x88c8, 0x88c9, 0x88ca, 0x88cb, 0x88cc, 0x88cd, 0x88ce, - 0x88cf, 0x88d0, 0x88d1, 0x88d2, 0x88d3, 0x88d4, 0x88d5, 0x88d6, - 0x88d7, 0x88d8, 0x88d9, 0x88da, 0x88db, 0x88dc, 0x88dd, 0x88de, - 0x88df, 0x88e0, 0x88e1, 0x88e2, 0x88e3, 0x88e4, 0x88e5, 0x88e6, - 0x88e7, 0x88e8, 0x88e9, 0x88ea, 0x88eb, 0x88ec, 0x88ed, 0x88ee, - 0x88ef, 0x88f0, 0x88f1, 0x88f2, 0x88f3, 0x88f4, 0x88f5, 0x88f6, - 0x88f7, 0x88f8, 0x88f9, 0x88fa, 0x88fb, 0x88fc, 0x88fd, 0x88fe, - 0x8940, 0x8941, 0x8942, 0x8943, 0x8944, 0x8945, 0x8946, 0x8947, - 0x8948, 0x8949, 0x894a, 0x894b, 0x894c, 0x894d, 0x894e, 0x894f, - 0x8950, 0x8951, 0x8952, 0x8953, 0x8954, 0x8955, 0x8956, 0x8957, - 0x8958, 0x8959, 0x895a, 0x895b, 0x895c, 0x895d, 0x895e, 0x895f, - 0x8960, 0x8961, 0x8962, 0x8963, 0x8964, 0x8965, 0x8966, 0x8967, - 0x8968, 0x8969, 0x896a, 0x896b, 0x896c, 0x896d, 0x896e, 0x896f, - 0x8970, 0x8971, 0x8972, 0x8973, 0x8974, 0x8975, 0x8976, 0x8977, - 0x8978, 0x8979, 0x897a, 0x897b, 0x897c, 0x897d, 0x897e, 0x89a1, - 0x89a2, 0x89a3, 0x89a4, 0x89a5, 0x89a6, 0x89a7, 0x89a8, 0x89a9, - 0x89aa, 0x89ab, 0x89ac, 0x89ad, 0x89ae, 0x89af, 0x89b0, 0x89b1, - 0x89b2, 0x89b3, 0x89b4, 0x89b5, 0x89b6, 0x89b7, 0x89b8, 0x89b9, - 0x89ba, 0x89bb, 0x89bc, 0x89bd, 0x89be, 0x89bf, 0x89c0, 0x89c1, - /* 0xf400 .. 0xf4ff */ - 0x89c2, 0x89c3, 0x89c4, 0x89c5, 0x89c6, 0x89c7, 0x89c8, 0x89c9, - 0x89ca, 0x89cb, 0x89cc, 0x89cd, 0x89ce, 0x89cf, 0x89d0, 0x89d1, - 0x89d2, 0x89d3, 0x89d4, 0x89d5, 0x89d6, 0x89d7, 0x89d8, 0x89d9, - 0x89da, 0x89db, 0x89dc, 0x89dd, 0x89de, 0x89df, 0x89e0, 0x89e1, - 0x89e2, 0x89e3, 0x89e4, 0x89e5, 0x89e6, 0x89e7, 0x89e8, 0x89e9, - 0x89ea, 0x89eb, 0x89ec, 0x89ed, 0x89ee, 0x89ef, 0x89f0, 0x89f1, - 0x89f2, 0x89f3, 0x89f4, 0x89f5, 0x89f6, 0x89f7, 0x89f8, 0x89f9, - 0x89fa, 0x89fb, 0x89fc, 0x89fd, 0x89fe, 0x8a40, 0x8a41, 0x8a42, - 0x8a43, 0x8a44, 0x8a45, 0x8a46, 0x8a47, 0x8a48, 0x8a49, 0x8a4a, - 0x8a4b, 0x8a4c, 0x8a4d, 0x8a4e, 0x8a4f, 0x8a50, 0x8a51, 0x8a52, - 0x8a53, 0x8a54, 0x8a55, 0x8a56, 0x8a57, 0x8a58, 0x8a59, 0x8a5a, - 0x8a5b, 0x8a5c, 0x8a5d, 0x8a5e, 0x8a5f, 0x8a60, 0x8a61, 0x8a62, - 0x8a63, 0x8a64, 0x8a65, 0x8a66, 0x8a67, 0x8a68, 0x8a69, 0x8a6a, - 0x8a6b, 0x8a6c, 0x8a6d, 0x8a6e, 0x8a6f, 0x8a70, 0x8a71, 0x8a72, - 0x8a73, 0x8a74, 0x8a75, 0x8a76, 0x8a77, 0x8a78, 0x8a79, 0x8a7a, - 0x8a7b, 0x8a7c, 0x8a7d, 0x8a7e, 0x8aa1, 0x8aa2, 0x8aa3, 0x8aa4, - 0x8aa5, 0x8aa6, 0x8aa7, 0x8aa8, 0x8aa9, 0x8aaa, 0x8aab, 0x8aac, - 0x8aad, 0x8aae, 0x8aaf, 0x8ab0, 0x8ab1, 0x8ab2, 0x8ab3, 0x8ab4, - 0x8ab5, 0x8ab6, 0x8ab7, 0x8ab8, 0x8ab9, 0x8aba, 0x8abb, 0x8abc, - 0x8abd, 0x8abe, 0x8abf, 0x8ac0, 0x8ac1, 0x8ac2, 0x8ac3, 0x8ac4, - 0x8ac5, 0x8ac6, 0x8ac7, 0x8ac8, 0x8ac9, 0x8aca, 0x8acb, 0x8acc, - 0x8acd, 0x8ace, 0x8acf, 0x8ad0, 0x8ad1, 0x8ad2, 0x8ad3, 0x8ad4, - 0x8ad5, 0x8ad6, 0x8ad7, 0x8ad8, 0x8ad9, 0x8ada, 0x8adb, 0x8adc, - 0x8add, 0x8ade, 0x8adf, 0x8ae0, 0x8ae1, 0x8ae2, 0x8ae3, 0x8ae4, - 0x8ae5, 0x8ae6, 0x8ae7, 0x8ae8, 0x8ae9, 0x8aea, 0x8aeb, 0x8aec, - 0x8aed, 0x8aee, 0x8aef, 0x8af0, 0x8af1, 0x8af2, 0x8af3, 0x8af4, - 0x8af5, 0x8af6, 0x8af7, 0x8af8, 0x8af9, 0x8afa, 0x8afb, 0x8afc, - 0x8afd, 0x8afe, 0x8b40, 0x8b41, 0x8b42, 0x8b43, 0x8b44, 0x8b45, - 0x8b46, 0x8b47, 0x8b48, 0x8b49, 0x8b4a, 0x8b4b, 0x8b4c, 0x8b4d, - 0x8b4e, 0x8b4f, 0x8b50, 0x8b51, 0x8b52, 0x8b53, 0x8b54, 0x8b55, - 0x8b56, 0x8b57, 0x8b58, 0x8b59, 0x8b5a, 0x8b5b, 0x8b5c, 0x8b5d, - 0x8b5e, 0x8b5f, 0x8b60, 0x8b61, 0x8b62, 0x8b63, 0x8b64, 0x8b65, - /* 0xf500 .. 0xf5ff */ - 0x8b66, 0x8b67, 0x8b68, 0x8b69, 0x8b6a, 0x8b6b, 0x8b6c, 0x8b6d, - 0x8b6e, 0x8b6f, 0x8b70, 0x8b71, 0x8b72, 0x8b73, 0x8b74, 0x8b75, - 0x8b76, 0x8b77, 0x8b78, 0x8b79, 0x8b7a, 0x8b7b, 0x8b7c, 0x8b7d, - 0x8b7e, 0x8ba1, 0x8ba2, 0x8ba3, 0x8ba4, 0x8ba5, 0x8ba6, 0x8ba7, - 0x8ba8, 0x8ba9, 0x8baa, 0x8bab, 0x8bac, 0x8bad, 0x8bae, 0x8baf, - 0x8bb0, 0x8bb1, 0x8bb2, 0x8bb3, 0x8bb4, 0x8bb5, 0x8bb6, 0x8bb7, - 0x8bb8, 0x8bb9, 0x8bba, 0x8bbb, 0x8bbc, 0x8bbd, 0x8bbe, 0x8bbf, - 0x8bc0, 0x8bc1, 0x8bc2, 0x8bc3, 0x8bc4, 0x8bc5, 0x8bc6, 0x8bc7, - 0x8bc8, 0x8bc9, 0x8bca, 0x8bcb, 0x8bcc, 0x8bcd, 0x8bce, 0x8bcf, - 0x8bd0, 0x8bd1, 0x8bd2, 0x8bd3, 0x8bd4, 0x8bd5, 0x8bd6, 0x8bd7, - 0x8bd8, 0x8bd9, 0x8bda, 0x8bdb, 0x8bdc, 0x8bdd, 0x8bde, 0x8bdf, - 0x8be0, 0x8be1, 0x8be2, 0x8be3, 0x8be4, 0x8be5, 0x8be6, 0x8be7, - 0x8be8, 0x8be9, 0x8bea, 0x8beb, 0x8bec, 0x8bed, 0x8bee, 0x8bef, - 0x8bf0, 0x8bf1, 0x8bf2, 0x8bf3, 0x8bf4, 0x8bf5, 0x8bf6, 0x8bf7, - 0x8bf8, 0x8bf9, 0x8bfa, 0x8bfb, 0x8bfc, 0x8bfd, 0x8bfe, 0x8c40, - 0x8c41, 0x8c42, 0x8c43, 0x8c44, 0x8c45, 0x8c46, 0x8c47, 0x8c48, - 0x8c49, 0x8c4a, 0x8c4b, 0x8c4c, 0x8c4d, 0x8c4e, 0x8c4f, 0x8c50, - 0x8c51, 0x8c52, 0x8c53, 0x8c54, 0x8c55, 0x8c56, 0x8c57, 0x8c58, - 0x8c59, 0x8c5a, 0x8c5b, 0x8c5c, 0x8c5d, 0x8c5e, 0x8c5f, 0x8c60, - 0x8c61, 0x8c62, 0x8c63, 0x8c64, 0x8c65, 0x8c66, 0x8c67, 0x8c68, - 0x8c69, 0x8c6a, 0x8c6b, 0x8c6c, 0x8c6d, 0x8c6e, 0x8c6f, 0x8c70, - 0x8c71, 0x8c72, 0x8c73, 0x8c74, 0x8c75, 0x8c76, 0x8c77, 0x8c78, - 0x8c79, 0x8c7a, 0x8c7b, 0x8c7c, 0x8c7d, 0x8c7e, 0x8ca1, 0x8ca2, - 0x8ca3, 0x8ca4, 0x8ca5, 0x8ca6, 0x8ca7, 0x8ca8, 0x8ca9, 0x8caa, - 0x8cab, 0x8cac, 0x8cad, 0x8cae, 0x8caf, 0x8cb0, 0x8cb1, 0x8cb2, - 0x8cb3, 0x8cb4, 0x8cb5, 0x8cb6, 0x8cb7, 0x8cb8, 0x8cb9, 0x8cba, - 0x8cbb, 0x8cbc, 0x8cbd, 0x8cbe, 0x8cbf, 0x8cc0, 0x8cc1, 0x8cc2, - 0x8cc3, 0x8cc4, 0x8cc5, 0x8cc6, 0x8cc7, 0x8cc8, 0x8cc9, 0x8cca, - 0x8ccb, 0x8ccc, 0x8ccd, 0x8cce, 0x8ccf, 0x8cd0, 0x8cd1, 0x8cd2, - 0x8cd3, 0x8cd4, 0x8cd5, 0x8cd6, 0x8cd7, 0x8cd8, 0x8cd9, 0x8cda, - 0x8cdb, 0x8cdc, 0x8cdd, 0x8cde, 0x8cdf, 0x8ce0, 0x8ce1, 0x8ce2, - 0x8ce3, 0x8ce4, 0x8ce5, 0x8ce6, 0x8ce7, 0x8ce8, 0x8ce9, 0x8cea, - /* 0xf600 .. 0xf6ff */ - 0x8ceb, 0x8cec, 0x8ced, 0x8cee, 0x8cef, 0x8cf0, 0x8cf1, 0x8cf2, - 0x8cf3, 0x8cf4, 0x8cf5, 0x8cf6, 0x8cf7, 0x8cf8, 0x8cf9, 0x8cfa, - 0x8cfb, 0x8cfc, 0x8cfd, 0x8cfe, 0x8d40, 0x8d41, 0x8d42, 0x8d43, - 0x8d44, 0x8d45, 0x8d46, 0x8d47, 0x8d48, 0x8d49, 0x8d4a, 0x8d4b, - 0x8d4c, 0x8d4d, 0x8d4e, 0x8d4f, 0x8d50, 0x8d51, 0x8d52, 0x8d53, - 0x8d54, 0x8d55, 0x8d56, 0x8d57, 0x8d58, 0x8d59, 0x8d5a, 0x8d5b, - 0x8d5c, 0x8d5d, 0x8d5e, 0x8d5f, 0x8d60, 0x8d61, 0x8d62, 0x8d63, - 0x8d64, 0x8d65, 0x8d66, 0x8d67, 0x8d68, 0x8d69, 0x8d6a, 0x8d6b, - 0x8d6c, 0x8d6d, 0x8d6e, 0x8d6f, 0x8d70, 0x8d71, 0x8d72, 0x8d73, - 0x8d74, 0x8d75, 0x8d76, 0x8d77, 0x8d78, 0x8d79, 0x8d7a, 0x8d7b, - 0x8d7c, 0x8d7d, 0x8d7e, 0x8da1, 0x8da2, 0x8da3, 0x8da4, 0x8da5, - 0x8da6, 0x8da7, 0x8da8, 0x8da9, 0x8daa, 0x8dab, 0x8dac, 0x8dad, - 0x8dae, 0x8daf, 0x8db0, 0x8db1, 0x8db2, 0x8db3, 0x8db4, 0x8db5, - 0x8db6, 0x8db7, 0x8db8, 0x8db9, 0x8dba, 0x8dbb, 0x8dbc, 0x8dbd, - 0x8dbe, 0x8dbf, 0x8dc0, 0x8dc1, 0x8dc2, 0x8dc3, 0x8dc4, 0x8dc5, - 0x8dc6, 0x8dc7, 0x8dc8, 0x8dc9, 0x8dca, 0x8dcb, 0x8dcc, 0x8dcd, - 0x8dce, 0x8dcf, 0x8dd0, 0x8dd1, 0x8dd2, 0x8dd3, 0x8dd4, 0x8dd5, - 0x8dd6, 0x8dd7, 0x8dd8, 0x8dd9, 0x8dda, 0x8ddb, 0x8ddc, 0x8ddd, - 0x8dde, 0x8ddf, 0x8de0, 0x8de1, 0x8de2, 0x8de3, 0x8de4, 0x8de5, - 0x8de6, 0x8de7, 0x8de8, 0x8de9, 0x8dea, 0x8deb, 0x8dec, 0x8ded, - 0x8dee, 0x8def, 0x8df0, 0x8df1, 0x8df2, 0x8df3, 0x8df4, 0x8df5, - 0x8df6, 0x8df7, 0x8df8, 0x8df9, 0x8dfa, 0x8dfb, 0x8dfc, 0x8dfd, - 0x8dfe, 0xc6a1, 0xc6a2, 0xc6a3, 0xc6a4, 0xc6a5, 0xc6a6, 0xc6a7, - 0xc6a8, 0xc6a9, 0xc6aa, 0xc6ab, 0xc6ac, 0xc6ad, 0xc6ae, 0xc6af, - 0xc6b0, 0xc6b1, 0xc6b2, 0xc6b3, 0xc6b4, 0xc6b5, 0xc6b6, 0xc6b7, - 0xc6b8, 0xc6b9, 0xc6ba, 0xc6bb, 0xc6bc, 0xc6bd, 0xc6be, 0xc6bf, - 0xc6c0, 0xc6c1, 0xc6c2, 0xc6c3, 0xc6c4, 0xc6c5, 0xc6c6, 0xc6c7, - 0xc6c8, 0xc6c9, 0xc6ca, 0xc6cb, 0xc6cc, 0xc6cd, 0xc6ce, 0xc6cf, - 0xc6d0, 0xc6d1, 0xc6d2, 0xc6d3, 0xc6d4, 0xc6d5, 0xc6d6, 0xc6d7, - 0xc6d8, 0xc6d9, 0xc6da, 0xc6db, 0xc6dc, 0xc6dd, 0xc6de, 0xc6df, - 0xc6e0, 0xc6e1, 0xc6e2, 0xc6e3, 0xc6e4, 0xc6e5, 0xc6e6, 0xc6e7, - 0xc6e8, 0xc6e9, 0xc6ea, 0xc6eb, 0xc6ec, 0xc6ed, 0xc6ee, 0xc6ef, - /* 0xf700 .. 0xf7ff */ - 0xc6f0, 0xc6f1, 0xc6f2, 0xc6f3, 0xc6f4, 0xc6f5, 0xc6f6, 0xc6f7, - 0xc6f8, 0xc6f9, 0xc6fa, 0xc6fb, 0xc6fc, 0xc6fd, 0xc6fe, 0xc740, - 0xc741, 0xc742, 0xc743, 0xc744, 0xc745, 0xc746, 0xc747, 0xc748, - 0xc749, 0xc74a, 0xc74b, 0xc74c, 0xc74d, 0xc74e, 0xc74f, 0xc750, - 0xc751, 0xc752, 0xc753, 0xc754, 0xc755, 0xc756, 0xc757, 0xc758, - 0xc759, 0xc75a, 0xc75b, 0xc75c, 0xc75d, 0xc75e, 0xc75f, 0xc760, - 0xc761, 0xc762, 0xc763, 0xc764, 0xc765, 0xc766, 0xc767, 0xc768, - 0xc769, 0xc76a, 0xc76b, 0xc76c, 0xc76d, 0xc76e, 0xc76f, 0xc770, - 0xc771, 0xc772, 0xc773, 0xc774, 0xc775, 0xc776, 0xc777, 0xc778, - 0xc779, 0xc77a, 0xc77b, 0xc77c, 0xc77d, 0xc77e, 0xc7a1, 0xc7a2, - 0xc7a3, 0xc7a4, 0xc7a5, 0xc7a6, 0xc7a7, 0xc7a8, 0xc7a9, 0xc7aa, - 0xc7ab, 0xc7ac, 0xc7ad, 0xc7ae, 0xc7af, 0xc7b0, 0xc7b1, 0xc7b2, - 0xc7b3, 0xc7b4, 0xc7b5, 0xc7b6, 0xc7b7, 0xc7b8, 0xc7b9, 0xc7ba, - 0xc7bb, 0xc7bc, 0xc7bd, 0xc7be, 0xc7bf, 0xc7c0, 0xc7c1, 0xc7c2, - 0xc7c3, 0xc7c4, 0xc7c5, 0xc7c6, 0xc7c7, 0xc7c8, 0xc7c9, 0xc7ca, - 0xc7cb, 0xc7cc, 0xc7cd, 0xc7ce, 0xc7cf, 0xc7d0, 0xc7d1, 0xc7d2, - 0xc7d3, 0xc7d4, 0xc7d5, 0xc7d6, 0xc7d7, 0xc7d8, 0xc7d9, 0xc7da, - 0xc7db, 0xc7dc, 0xc7dd, 0xc7de, 0xc7df, 0xc7e0, 0xc7e1, 0xc7e2, - 0xc7e3, 0xc7e4, 0xc7e5, 0xc7e6, 0xc7e7, 0xc7e8, 0xc7e9, 0xc7ea, - 0xc7eb, 0xc7ec, 0xc7ed, 0xc7ee, 0xc7ef, 0xc7f0, 0xc7f1, 0xc7f2, - 0xc7f3, 0xc7f4, 0xc7f5, 0xc7f6, 0xc7f7, 0xc7f8, 0xc7f9, 0xc7fa, - 0xc7fb, 0xc7fc, 0xc7fd, 0xc7fe, 0xc840, 0xc841, 0xc842, 0xc843, - 0xc844, 0xc845, 0xc846, 0xc847, 0xc848, 0xc849, 0xc84a, 0xc84b, - 0xc84c, 0xc84d, 0xc84e, 0xc84f, 0xc850, 0xc851, 0xc852, 0xc853, - 0xc854, 0xc855, 0xc856, 0xc857, 0xc858, 0xc859, 0xc85a, 0xc85b, - 0xc85c, 0xc85d, 0xc85e, 0xc85f, 0xc860, 0xc861, 0xc862, 0xc863, - 0xc864, 0xc865, 0xc866, 0xc867, 0xc868, 0xc869, 0xc86a, 0xc86b, - 0xc86c, 0xc86d, 0xc86e, 0xc86f, 0xc870, 0xc871, 0xc872, 0xc873, - 0xc874, 0xc875, 0xc876, 0xc877, 0xc878, 0xc879, 0xc87a, 0xc87b, - 0xc87c, 0xc87d, 0xc87e, 0xc8a1, 0xc8a2, 0xc8a3, 0xc8a4, 0xc8a5, - 0xc8a6, 0xc8a7, 0xc8a8, 0xc8a9, 0xc8aa, 0xc8ab, 0xc8ac, 0xc8ad, - 0xc8ae, 0xc8af, 0xc8b0, 0xc8b1, 0xc8b2, 0xc8b3, 0xc8b4, 0xc8b5, - /* 0xf800 .. 0xf8ff */ - 0xc8b6, 0xc8b7, 0xc8b8, 0xc8b9, 0xc8ba, 0xc8bb, 0xc8bc, 0xc8bd, - 0xc8be, 0xc8bf, 0xc8c0, 0xc8c1, 0xc8c2, 0xc8c3, 0xc8c4, 0xc8c5, - 0xc8c6, 0xc8c7, 0xc8c8, 0xc8c9, 0xc8ca, 0xc8cb, 0xc8cc, 0xc8cd, - 0xc8ce, 0xc8cf, 0xc8d0, 0xc8d1, 0xc8d2, 0xc8d3, 0xc8d4, 0xc8d5, - 0xc8d6, 0xc8d7, 0xc8d8, 0xc8d9, 0xc8da, 0xc8db, 0xc8dc, 0xc8dd, - 0xc8de, 0xc8df, 0xc8e0, 0xc8e1, 0xc8e2, 0xc8e3, 0xc8e4, 0xc8e5, - 0xc8e6, 0xc8e7, 0xc8e8, 0xc8e9, 0xc8ea, 0xc8eb, 0xc8ec, 0xc8ed, - 0xc8ee, 0xc8ef, 0xc8f0, 0xc8f1, 0xc8f2, 0xc8f3, 0xc8f4, 0xc8f5, - 0xc8f6, 0xc8f7, 0xc8f8, 0xc8f9, 0xc8fa, 0xc8fb, 0xc8fc, 0xc8fd, - 0xc8fe, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x00ff, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xf900 .. 0xf9ff */ - 0xb05a, 0xa7f3, 0xa8ae, 0xb8eb, 0xb7c6, 0xa6ea, 0xa579, 0xc074, - 0xc074, 0xabb4, 0xaaf7, 0xb3e2, 0xa960, 0xc369, 0xc4ee, 0xc3b9, - 0xc5da, 0xc1b3, 0xbb72, 0xc5de, 0xbcd6, 0xaca5, 0xaf4f, 0xaf5f, - 0xb8a8, 0xb954, 0xc064, 0xb6c3, 0xa75a, 0xc4e6, 0xc4ea, 0xc4f5, - 0xc67d, 0xb450, 0xc0dd, 0xc2c5, 0xc4b0, 0xa9d4, 0xc3be, 0xc4fa, - 0xb459, 0xaed4, 0xaef6, 0xaf54, 0x003f, 0xa8d3, 0xa74e, 0xb3d2, - 0xbedb, 0xc372, 0xc46c, 0xbf63, 0xa6d1, 0xc4aa, 0xb8b8, 0xb8f4, - 0xc553, 0xbe7c, 0xc64f, 0xb84c, 0xb853, 0xbaf1, 0xdb77, 0xbffd, - 0xb3c0, 0xbdd7, 0xc362, 0xa7cb, 0xc5a2, 0xc5a4, 0xa863, 0xbd55, - 0xb8ef, 0xb970, 0xc253, 0xb9f0, 0xbcd3, 0xb25c, 0xba7c, 0xb2d6, - 0xc15c, 0xadae, 0xb0c7, 0xa6d8, 0xbbfe, 0xade2, 0xb857, 0xbaf0, - 0xb5d9, 0xb3ae, 0xc5aa, 0xced4, 0xbcd6, 0xbfd5, 0xa4a6, 0xb9e7, - 0xabe3, 0xb276, 0xb2a7, 0xa55f, 0xeda8, 0xab4b, 0xb45f, 0xa4a3, - 0xaa63, 0xbcc6, 0xafc1, 0xb0d1, 0xb6eb, 0xacd9, 0xb8ad, 0xbba1, - 0xb1fe, 0xa8b0, 0xa848, 0xac42, 0xad59, 0xb1b0, 0xb2a4, 0xab47, - 0xa8e2, 0x003f, 0xb1e7, 0xc2b3, 0xa87d, 0xbdcc, 0xb671, 0xc079, - 0xa766, 0xa46b, 0xc366, 0xaec8, 0xc26f, 0xc472, 0xbe5b, 0xc67a, - 0xc452, 0xbea4, 0xa44f, 0xbee4, 0xbefa, 0xf765, 0xa67e, 0xbca6, - 0xc5ca, 0xbcbf, 0xbaa7, 0xb7d2, 0xe6a3, 0x003f, 0xbd6d, 0xc170, - 0xbdfb, 0xbdac, 0xb373, 0xc1e5, 0xa643, 0xa648, 0xab7c, 0xaf50, - 0xb5f5, 0xbba1, 0xb747, 0xa9c0, 0xb1c9, 0xc0d4, 0xc3ae, 0xc279, - 0xa54f, 0xcbf1, 0xb9e7, 0xc0ad, 0xccb0, 0xacc2, 0xbcfc, 0xb2dc, - 0xb2e2, 0xb961, 0xb973, 0xc646, 0xbbe2, 0xa8d2, 0xc2a7, 0xc4bf, - 0xc1f5, 0xb463, 0xa446, 0xb9b1, 0xbc64, 0xa7bf, 0xaec6, 0xbcd6, - 0xbf52, 0xc0f8, 0xe764, 0xbff1, 0xc073, 0xb777, 0xa8bf, 0xbc42, - 0xccd8, 0xac68, 0xac79, 0xb7c8, 0xaf5b, 0xaf64, 0xb2b8, 0xafc3, - 0xc3fe, 0xa4bb, 0xbcae, 0xb3b0, 0xaddb, 0xb15b, 0xb25f, 0xbdfc, - 0xabdf, 0xb758, 0xaedf, 0xb276, 0xb6a9, 0xa751, 0xa64f, 0xbc69, - 0xa9f6, 0xa7f5, 0xb1f9, 0xaa64, 0xb27a, 0xb567, 0xbfa9, 0x003f, - 0xb8cc, 0xa8bd, 0xc2f7, 0xb0ce, 0xb7c4, 0xa75b, 0xbf4d, 0xbf5a, - 0xc4a9, 0x003f, 0xc5ec, 0xc5ef, 0xaa4c, 0xb24f, 0xc17b, 0xa5df, - 0xb2c1, 0xb2c9, 0xaaac, 0xaaa5, 0xc3d1, 0xa4b0, 0xaff9, 0xa8eb, - /* 0xfa00 .. 0xfaff */ - 0xa4c1, 0xabd7, 0xa9dd, 0xbf7d, 0xa676, 0xac7d, 0xbcc9, 0xbfe7, - 0xa6e6, 0xadb0, 0xa8a3, 0xb9f8, 0xc94a, 0xddfc, 0x003f, 0x003f, - 0xb6ef, 0x003f, 0xb4b8, 0x003f, 0x003f, 0xe8f9, 0xbdde, 0xaf71, - 0x003f, 0xafab, 0xb2bb, 0xbad6, 0xb974, 0xbaeb, 0xa6d0, 0x003f, - 0x003f, 0x003f, 0xbdd1, 0x003f, 0x003f, 0xb668, 0xb3a3, 0x003f, - 0x003f, 0x003f, 0xb6ba, 0xb97d, 0xc05d, 0xc562, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xfe00 .. 0xfeff */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa14a, 0xa157, 0x003f, 0xa159, 0xa15b, 0xa15f, 0xa160, 0xa163, - 0xa164, 0xa167, 0xa168, 0xa16b, 0xa16c, 0xa16f, 0xa170, 0xa173, - 0xa174, 0xa177, 0xa178, 0xa17b, 0xa17c, 0x003f, 0x003f, 0x003f, - 0x003f, 0xa1c6, 0xa1c7, 0xa1ca, 0xa1cb, 0xa1c8, 0xa1c9, 0xa15c, - 0xa14d, 0xa14e, 0xa14f, 0x003f, 0xa151, 0xa152, 0xa153, 0xa154, - 0x003f, 0xa17d, 0xa17e, 0xa1a1, 0xa1a2, 0xa1a3, 0xa1a4, 0xa1cc, - 0xa1cd, 0xa1ce, 0xa1de, 0xa1df, 0xa1e0, 0xa1e1, 0xa1e2, 0x003f, - 0xa242, 0xa24c, 0xa24d, 0xa24e, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* 0xff00 .. 0xffff */ - 0x003f, 0xa149, 0xa1a8, 0xa1ad, 0xa243, 0xa248, 0xa1ae, 0xa1a6, - 0xa15d, 0xa15e, 0xa1af, 0xa1cf, 0xa141, 0xa1d0, 0xa144, 0xa1fe, - 0xa2af, 0xa2b0, 0xa2b1, 0xa2b2, 0xa2b3, 0xa2b4, 0xa2b5, 0xa2b6, - 0xa2b7, 0xa2b8, 0xa147, 0xa146, 0xa1d5, 0xa1d7, 0xa1d6, 0xa148, - 0xa249, 0xa2cf, 0xa2d0, 0xa2d1, 0xa2d2, 0xa2d3, 0xa2d4, 0xa2d5, - 0xa2d6, 0xa2d7, 0xa2d8, 0xa2d9, 0xa2da, 0xa2db, 0xa2dc, 0xa2dd, - 0xa2de, 0xa2df, 0xa2e0, 0xa2e1, 0xa2e2, 0xa2e3, 0xa2e4, 0xa2e5, - 0xa2e6, 0xa2e7, 0xa2e8, 0xa165, 0xa240, 0xa166, 0xa173, 0xa1c4, - 0xa1a5, 0xa2e9, 0xa2ea, 0xa2eb, 0xa2ec, 0xa2ed, 0xa2ee, 0xa2ef, - 0xa2f0, 0xa2f1, 0xa2f2, 0xa2f3, 0xa2f4, 0xa2f5, 0xa2f6, 0xa2f7, - 0xa2f8, 0xa2f9, 0xa2fa, 0xa2fb, 0xa2fc, 0xa2fd, 0xa2fe, 0xa340, - 0xa341, 0xa342, 0xa343, 0xa161, 0xa155, 0xa162, 0xa1e3, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0xa14e, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0xa246, 0xa247, 0x003f, 0xa1c3, 0x003f, 0xa244, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - /* defaults */ - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, - 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f -}; - -static const unsigned short uni2cp_high[256] = -{ - 0x0000, 0x7c00, 0x0100, 0x0200, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x0300, 0x0400, 0x0500, 0x0600, 0x7c00, 0x0700, 0x0800, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x0d00, 0x0e00, - 0x0f00, 0x1000, 0x1100, 0x1200, 0x1300, 0x1400, 0x1500, 0x1600, - 0x1700, 0x1800, 0x1900, 0x1a00, 0x1b00, 0x1c00, 0x1d00, 0x1e00, - 0x1f00, 0x2000, 0x2100, 0x2200, 0x2300, 0x2400, 0x2500, 0x2600, - 0x2700, 0x2800, 0x2900, 0x2a00, 0x2b00, 0x2c00, 0x2d00, 0x2e00, - 0x2f00, 0x3000, 0x3100, 0x3200, 0x3300, 0x3400, 0x3500, 0x3600, - 0x3700, 0x3800, 0x3900, 0x3a00, 0x3b00, 0x3c00, 0x3d00, 0x3e00, - 0x3f00, 0x4000, 0x4100, 0x4200, 0x4300, 0x4400, 0x4500, 0x4600, - 0x4700, 0x4800, 0x4900, 0x4a00, 0x4b00, 0x4c00, 0x4d00, 0x4e00, - 0x4f00, 0x5000, 0x5100, 0x5200, 0x5300, 0x5400, 0x5500, 0x5600, - 0x5700, 0x5800, 0x5900, 0x5a00, 0x5b00, 0x5c00, 0x5d00, 0x5e00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, - 0x5f00, 0x6000, 0x6100, 0x6200, 0x6300, 0x6400, 0x6500, 0x6600, - 0x6700, 0x6800, 0x6900, 0x6a00, 0x6b00, 0x6c00, 0x6d00, 0x6e00, - 0x6f00, 0x7000, 0x7100, 0x7200, 0x7300, 0x7400, 0x7500, 0x7600, - 0x7700, 0x7800, 0x7900, 0x7c00, 0x7c00, 0x7c00, 0x7a00, 0x7b00 -}; - -const struct dbcs_table cptable_950 = -{ - { 950, 2, 0x003f, 0x003f, "ANSI/OEM Traditional Chinese Big5" }, - cp2uni, - cp2uni_leadbytes, - uni2cp_low, - uni2cp_high, - { - 0x81, 0xfe, 0x00, 0x00 - } -}; diff --git a/reactos/tools/unicode/casemap.c b/reactos/tools/unicode/casemap.c deleted file mode 100644 index 56371283ac2..00000000000 --- a/reactos/tools/unicode/casemap.c +++ /dev/null @@ -1,1992 +0,0 @@ -/* Unicode case mappings */ -/* Automatically generated; DO NOT EDIT!! */ - -#include "wine/unicode.h" - -const WCHAR wine_casemap_lower[3802] = -{ - /* index */ - 0x01bf, 0x02bf, 0x03bf, 0x044f, 0x054f, 0x064f, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x06af, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x07af, 0x08ae, - 0x0100, 0x09ab, 0x0100, 0x0100, 0x0a2f, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0b2f, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0c1d, 0x0cfb, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0dda, - /* defaults */ - 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, - 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, - 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, - 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, - 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, - 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, - 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, - 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, - /* 0x0041 .. 0x00ff */ - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - 0x0020, 0x0020, 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, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0020, - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0000, 0x0020, - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 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, 0x0000, - /* 0x0100 .. 0x01ff */ - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0xff39, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, - 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, - 0x0000, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0xff87, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, - 0x0000, 0x00d2, 0x0001, 0x0000, 0x0001, 0x0000, 0x00ce, 0x0001, - 0x0000, 0x00cd, 0x00cd, 0x0001, 0x0000, 0x0000, 0x004f, 0x00ca, - 0x00cb, 0x0001, 0x0000, 0x00cd, 0x00cf, 0x0000, 0x00d3, 0x00d1, - 0x0001, 0x0000, 0x0000, 0x0000, 0x00d3, 0x00d5, 0x0000, 0x00d6, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x00da, 0x0001, - 0x0000, 0x00da, 0x0000, 0x0000, 0x0001, 0x0000, 0x00da, 0x0001, - 0x0000, 0x00d9, 0x00d9, 0x0001, 0x0000, 0x0001, 0x0000, 0x00db, - 0x0001, 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0002, 0x0001, 0x0000, 0x0002, - 0x0001, 0x0000, 0x0002, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, - 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, - 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0000, 0x0002, 0x0001, 0x0000, 0x0001, 0x0000, 0xff9f, 0xffc8, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - /* 0x0200 .. 0x02ff */ - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0xff7e, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x2a2b, 0x0001, 0x0000, 0xff5d, 0x2a28, 0x0000, - 0x0000, 0x0001, 0x0000, 0xff3d, 0x0045, 0x0047, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 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, 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, 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, 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, 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, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0370 .. 0x03ff */ - 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0026, 0x0000, - 0x0025, 0x0025, 0x0025, 0x0000, 0x0040, 0x0000, 0x003f, 0x003f, - 0x0000, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - 0x0020, 0x0020, 0x0000, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - 0x0020, 0x0020, 0x0020, 0x0020, 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, 0x0000, 0x0000, 0x0000, 0x0008, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0xffc4, 0x0000, 0x0000, 0x0001, - 0x0000, 0xfff9, 0x0001, 0x0000, 0x0000, 0xff7e, 0xff7e, 0xff7e, - /* 0x0400 .. 0x04ff */ - 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, - 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - 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, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x000f, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, - 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - /* 0x0500 .. 0x05ff */ - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, - 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, - 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, - 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, - 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 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, 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, 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, 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, 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, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x10a0 .. 0x10ff */ - 0x1c60, 0x1c60, 0x1c60, 0x1c60, 0x1c60, 0x1c60, 0x1c60, 0x1c60, - 0x1c60, 0x1c60, 0x1c60, 0x1c60, 0x1c60, 0x1c60, 0x1c60, 0x1c60, - 0x1c60, 0x1c60, 0x1c60, 0x1c60, 0x1c60, 0x1c60, 0x1c60, 0x1c60, - 0x1c60, 0x1c60, 0x1c60, 0x1c60, 0x1c60, 0x1c60, 0x1c60, 0x1c60, - 0x1c60, 0x1c60, 0x1c60, 0x1c60, 0x1c60, 0x1c60, 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, 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, - /* 0x1e00 .. 0x1eff */ - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xe241, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - /* 0x1f01 .. 0x1fff */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfff8, - 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfff8, - 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfff8, - 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfff8, - 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfff8, - 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xfff8, 0x0000, 0xfff8, 0x0000, 0xfff8, 0x0000, 0xfff8, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfff8, - 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfff8, - 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfff8, - 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfff8, - 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfff8, - 0xfff8, 0xffb6, 0xffb6, 0xfff7, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffaa, - 0xffaa, 0xffaa, 0xffaa, 0xfff7, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfff8, - 0xfff8, 0xff9c, 0xff9c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfff8, - 0xfff8, 0xff90, 0xff90, 0xfff9, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xff80, - 0xff80, 0xff82, 0xff82, 0xfff7, 0x0000, 0x0000, 0x0000, - /* 0x2103 .. 0x21ff */ - 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, - 0x0000, 0x0000, 0x0000, 0xe2a3, 0x0000, 0x0000, 0x0000, 0xdf41, - 0xdfba, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x001c, - 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, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0001, 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, 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, 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, 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, - /* 0x247c .. 0x24ff */ - 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, - 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, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, - 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, - 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, - 0x001a, 0x001a, 0x001a, 0x001a, 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, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x2c00 .. 0x2cff */ - 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, - 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, - 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, - 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, - 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, - 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 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, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0001, 0x0000, 0xd609, 0xf11a, 0xd619, 0x0000, 0x0000, 0x0001, - 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0xd5e4, 0xd603, 0xd5e1, - 0xd5e2, 0x0000, 0x0001, 0x0000, 0x0000, 0x0001, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xd5c1, 0xd5c1, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0xa612 .. 0xa6ff */ - 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, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 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, 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, 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, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0xa722 .. 0xa7ff */ - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, - 0x0000, 0x0001, 0x0000, 0x75fc, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0001, 0x0000, 0x5ad8, 0x0000, 0x0000, 0x0001, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 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, 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, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0xff21 .. 0xffff */ - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - 0x0020, 0x0020, 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, 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, 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, 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, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 -}; -const WCHAR wine_casemap_upper[3994] = -{ - /* index */ - 0x019f, 0x029f, 0x039f, 0x045a, 0x0556, 0x0656, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x06dd, 0x07dc, 0x08dc, - 0x0100, 0x09d0, 0x0100, 0x0100, 0x0a55, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0b3f, 0x0c3f, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0cfe, 0x0ddb, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0e9a, - /* defaults */ - 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, - 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, - 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, - 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, - 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, - 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, - 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, - 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, - /* 0x0061 .. 0x00ff */ - 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, - 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, - 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, - 0xffe0, 0xffe0, 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, 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, 0x02e7, 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, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffe0, - 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, - 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, - 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0x0000, 0xffe0, - 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0x0079, - /* 0x0100 .. 0x01ff */ - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xff18, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0xfed4, - 0x00c3, 0x0000, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0x0000, - 0xffff, 0x0000, 0x0000, 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0xffff, 0x0000, 0x0000, 0x0061, 0x0000, 0x0000, - 0x0000, 0xffff, 0x00a3, 0x0000, 0x0000, 0x0000, 0x0082, 0x0000, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0x0000, - 0xffff, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0x0000, 0x0000, - 0xffff, 0x0000, 0x0000, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, 0xffff, 0x0000, 0x0038, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xfffe, 0x0000, - 0xffff, 0xfffe, 0x0000, 0xffff, 0xfffe, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0xffb1, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0x0000, 0xffff, 0xfffe, 0x0000, 0xffff, 0x0000, 0x0000, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - /* 0x0200 .. 0x02ff */ - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0x0000, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0x0000, 0x0000, 0x2a3f, - 0x2a3f, 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x2a1f, 0x2a1c, 0x2a1e, 0xff2e, 0xff32, 0x0000, 0xff33, 0xff33, - 0x0000, 0xff36, 0x0000, 0xff35, 0x0000, 0x0000, 0x0000, 0x0000, - 0xff33, 0x0000, 0x0000, 0xff31, 0x0000, 0xa528, 0x0000, 0x0000, - 0xff2f, 0xff2d, 0x0000, 0x29f7, 0x0000, 0x0000, 0x0000, 0xff2d, - 0x0000, 0x29fd, 0xff2b, 0x0000, 0x0000, 0xff2a, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x29e7, 0x0000, 0x0000, - 0xff26, 0x0000, 0x0000, 0xff26, 0x0000, 0x0000, 0x0000, 0x0000, - 0xff26, 0xffbb, 0xff27, 0xff27, 0xffb9, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0xff25, 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, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0345 .. 0x03ff */ - 0x0054, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0x0000, 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, 0x0082, 0x0082, - 0x0082, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffda, - 0xffdb, 0xffdb, 0xffdb, 0x0000, 0xffe0, 0xffe0, 0xffe0, 0xffe0, - 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, - 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe1, 0xffe0, 0xffe0, - 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffc0, - 0xffc1, 0xffc1, 0x0000, 0xffc2, 0xffc7, 0x0000, 0x0000, 0x0000, - 0xffd1, 0xffca, 0xfff8, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0xffaa, 0xffb0, 0x0007, 0x0000, 0x0000, - 0xffa0, 0x0000, 0x0000, 0xffff, 0x0000, 0x0000, 0xffff, 0x0000, - 0x0000, 0x0000, 0x0000, - /* 0x0404 .. 0x04ff */ - 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, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0xffe0, 0xffe0, 0xffe0, 0xffe0, - 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, - 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, - 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, - 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffb0, 0xffb0, 0xffb0, 0xffb0, - 0xffb0, 0xffb0, 0xffb0, 0xffb0, 0xffb0, 0xffb0, 0xffb0, 0xffb0, - 0xffb0, 0xffb0, 0xffb0, 0xffb0, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0xfff1, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, - /* 0x0500 .. 0x05ff */ - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 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, - 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, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, - 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, - 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, - 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, - 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 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, 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, 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, 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, - /* 0x1d79 .. 0x1dff */ - 0x8a04, 0x0000, 0x0000, 0x0000, 0x0ee6, 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, 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, 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, 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, 0x0000, 0x0000, - /* 0x1e01 .. 0x1eff */ - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0xffc5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - /* 0x1f00 .. 0x1fff */ - 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0008, 0x0000, 0x0008, 0x0000, 0x0008, 0x0000, 0x0008, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x004a, 0x004a, 0x0056, 0x0056, 0x0056, 0x0056, 0x0064, 0x0064, - 0x0080, 0x0080, 0x0070, 0x0070, 0x007e, 0x007e, 0x0000, 0x0000, - 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0008, 0x0008, 0x0000, 0x0009, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xe3db, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0009, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0008, 0x0008, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0008, 0x0008, 0x0000, 0x0000, 0x0000, 0x0007, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0009, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x210c .. 0x21ff */ - 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, - 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, - 0x0000, 0x0000, 0xffe4, 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, 0x0000, 0xfff0, 0xfff0, 0xfff0, 0xfff0, - 0xfff0, 0xfff0, 0xfff0, 0xfff0, 0xfff0, 0xfff0, 0xfff0, 0xfff0, - 0xfff0, 0xfff0, 0xfff0, 0xfff0, 0x0000, 0x0000, 0x0000, 0x0000, - 0xffff, 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, 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, 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, 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, - /* 0x247b .. 0x24ff */ - 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, - 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, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffe6, 0xffe6, 0xffe6, - 0xffe6, 0xffe6, 0xffe6, 0xffe6, 0xffe6, 0xffe6, 0xffe6, 0xffe6, - 0xffe6, 0xffe6, 0xffe6, 0xffe6, 0xffe6, 0xffe6, 0xffe6, 0xffe6, - 0xffe6, 0xffe6, 0xffe6, 0xffe6, 0xffe6, 0xffe6, 0xffe6, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x2c16 .. 0x2cff */ - 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, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, - 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, - 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, - 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, - 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, - 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, - 0xffd0, 0x0000, 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, 0xd5d5, - 0xd5d8, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0x0000, 0x0000, - 0xffff, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, - /* 0x2d00 .. 0x2dff */ - 0xe3a0, 0xe3a0, 0xe3a0, 0xe3a0, 0xe3a0, 0xe3a0, 0xe3a0, 0xe3a0, - 0xe3a0, 0xe3a0, 0xe3a0, 0xe3a0, 0xe3a0, 0xe3a0, 0xe3a0, 0xe3a0, - 0xe3a0, 0xe3a0, 0xe3a0, 0xe3a0, 0xe3a0, 0xe3a0, 0xe3a0, 0xe3a0, - 0xe3a0, 0xe3a0, 0xe3a0, 0xe3a0, 0xe3a0, 0xe3a0, 0xe3a0, 0xe3a0, - 0xe3a0, 0xe3a0, 0xe3a0, 0xe3a0, 0xe3a0, 0xe3a0, 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, 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, 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, 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, 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, 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, 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, - /* 0xa641 .. 0xa6ff */ - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 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, 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, 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, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0xa723 .. 0xa7ff */ - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, - 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 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, 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, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0xff41 .. 0xffff */ - 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, - 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, - 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, - 0xffe0, 0xffe0, 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, 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, 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, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 -}; -const WCHAR wine_digitmap[5837] = -{ - /* index */ - 0x01d0, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x028a, 0x0384, - 0x0100, 0x044e, 0x053e, 0x062e, 0x071e, 0x080e, 0x08be, 0x099e, - 0x0a5e, 0x0100, 0x0100, 0x0af8, 0x0100, 0x0100, 0x0100, 0x0b6a, - 0x0c5a, 0x0d14, 0x0def, 0x0e9f, 0x0f5f, 0x0100, 0x0100, 0x0100, - 0x0fef, 0x0100, 0x0100, 0x0100, 0x108f, 0x0100, 0x0100, 0x118f, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x126f, 0x0100, - 0x129f, 0x139f, 0x1479, 0x14d3, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x15cd, - /* defaults */ - 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, - 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, - 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, - 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, - 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, - 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, - 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, - 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, - /* 0x0030 .. 0x00ff */ - 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, - 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, - 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, - 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, - 0x0000, 0x0000, 0xff80, 0xff80, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0xff78, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0646 .. 0x06ff */ - 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, 0xf9d0, 0xf9d0, 0xf9d0, 0xf9d0, 0xf9d0, 0xf9d0, - 0xf9d0, 0xf9d0, 0xf9d0, 0xf9d0, 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, 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, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0xf940, 0xf940, 0xf940, 0xf940, 0xf940, 0xf940, - 0xf940, 0xf940, 0xf940, 0xf940, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, - /* 0x0706 .. 0x07ff */ - 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, - 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, - 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, - 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, - 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, - 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, 0xf870, 0xf870, 0xf870, 0xf870, 0xf870, 0xf870, - 0xf870, 0xf870, 0xf870, 0xf870, 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, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, - /* 0x0936 .. 0x09ff */ - 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, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xf6ca, 0xf6ca, 0xf6ca, 0xf6ca, 0xf6ca, 0xf6ca, 0xf6ca, 0xf6ca, - 0xf6ca, 0xf6ca, 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, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xf64a, 0xf64a, 0xf64a, 0xf64a, 0xf64a, 0xf64a, 0xf64a, 0xf64a, - 0xf64a, 0xf64a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, - /* 0x0a10 .. 0x0aff */ - 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, - 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, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xf5ca, 0xf5ca, - 0xf5ca, 0xf5ca, 0xf5ca, 0xf5ca, 0xf5ca, 0xf5ca, 0xf5ca, 0xf5ca, - 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, - 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, - 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, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xf54a, 0xf54a, - 0xf54a, 0xf54a, 0xf54a, 0xf54a, 0xf54a, 0xf54a, 0xf54a, 0xf54a, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0b10 .. 0x0bff */ - 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, - 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, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xf4ca, 0xf4ca, - 0xf4ca, 0xf4ca, 0xf4ca, 0xf4ca, 0xf4ca, 0xf4ca, 0xf4ca, 0xf4ca, - 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, - 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, - 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, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xf44a, 0xf44a, - 0xf44a, 0xf44a, 0xf44a, 0xf44a, 0xf44a, 0xf44a, 0xf44a, 0xf44a, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0c10 .. 0x0cff */ - 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, - 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, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xf3ca, 0xf3ca, - 0xf3ca, 0xf3ca, 0xf3ca, 0xf3ca, 0xf3ca, 0xf3ca, 0xf3ca, 0xf3ca, - 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, - 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, - 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, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xf34a, 0xf34a, - 0xf34a, 0xf34a, 0xf34a, 0xf34a, 0xf34a, 0xf34a, 0xf34a, 0xf34a, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0d10 .. 0x0dff */ - 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, - 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, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xf2ca, 0xf2ca, - 0xf2ca, 0xf2ca, 0xf2ca, 0xf2ca, 0xf2ca, 0xf2ca, 0xf2ca, 0xf2ca, - 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, - 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, - 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, - 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, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0e50 .. 0x0eff */ - 0xf1e0, 0xf1e0, 0xf1e0, 0xf1e0, 0xf1e0, 0xf1e0, 0xf1e0, 0xf1e0, - 0xf1e0, 0xf1e0, 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, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xf160, 0xf160, 0xf160, 0xf160, 0xf160, 0xf160, 0xf160, 0xf160, - 0xf160, 0xf160, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0f20 .. 0x0fff */ - 0xf110, 0xf110, 0xf110, 0xf110, 0xf110, 0xf110, 0xf110, 0xf110, - 0xf110, 0xf110, 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, 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, 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, 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, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x1040 .. 0x10ff */ - 0xeff0, 0xeff0, 0xeff0, 0xeff0, 0xeff0, 0xeff0, 0xeff0, 0xeff0, - 0xeff0, 0xeff0, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xefa0, 0xefa0, 0xefa0, 0xefa0, 0xefa0, 0xefa0, 0xefa0, 0xefa0, - 0xefa0, 0xefa0, 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, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x1366 .. 0x13ff */ - 0x0000, 0x0000, 0x0000, 0xecc8, 0xecc8, 0xecc8, 0xecc8, 0xecc8, - 0xecc8, 0xecc8, 0xecc8, 0xecc8, 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, 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, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, - /* 0x178e .. 0x17ff */ - 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, - 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, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0xe850, 0xe850, 0xe850, 0xe850, 0xe850, 0xe850, - 0xe850, 0xe850, 0xe850, 0xe850, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, - /* 0x1810 .. 0x18ff */ - 0xe820, 0xe820, 0xe820, 0xe820, 0xe820, 0xe820, 0xe820, 0xe820, - 0xe820, 0xe820, 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, 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, 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, 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, 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, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x1946 .. 0x19ff */ - 0xe6ea, 0xe6ea, 0xe6ea, 0xe6ea, 0xe6ea, 0xe6ea, 0xe6ea, 0xe6ea, - 0xe6ea, 0xe6ea, 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, 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, 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, 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, 0xe660, 0xe660, 0xe660, 0xe660, 0xe660, 0xe660, - 0xe660, 0xe660, 0xe660, 0xe660, 0xe657, 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, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, - /* 0x1a25 .. 0x1aff */ - 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, - 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, - 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, 0xe5b0, 0xe5b0, 0xe5b0, 0xe5b0, 0xe5b0, - 0xe5b0, 0xe5b0, 0xe5b0, 0xe5b0, 0xe5b0, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0xe5a0, 0xe5a0, 0xe5a0, 0xe5a0, 0xe5a0, - 0xe5a0, 0xe5a0, 0xe5a0, 0xe5a0, 0xe5a0, 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, 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, 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, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, - /* 0x1b50 .. 0x1bff */ - 0xe4e0, 0xe4e0, 0xe4e0, 0xe4e0, 0xe4e0, 0xe4e0, 0xe4e0, 0xe4e0, - 0xe4e0, 0xe4e0, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xe480, 0xe480, 0xe480, 0xe480, 0xe480, 0xe480, 0xe480, 0xe480, - 0xe480, 0xe480, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x1c40 .. 0x1cff */ - 0xe3f0, 0xe3f0, 0xe3f0, 0xe3f0, 0xe3f0, 0xe3f0, 0xe3f0, 0xe3f0, - 0xe3f0, 0xe3f0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xe3e0, 0xe3e0, 0xe3e0, 0xe3e0, 0xe3e0, 0xe3e0, 0xe3e0, 0xe3e0, - 0xe3e0, 0xe3e0, 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, 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, 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, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x2070 .. 0x20ff */ - 0xdfc0, 0x0000, 0x0000, 0x0000, 0xdfc0, 0xdfc0, 0xdfc0, 0xdfc0, - 0xdfc0, 0xdfc0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xdfb0, 0xdfb0, 0xdfb0, 0xdfb0, 0xdfb0, 0xdfb0, 0xdfb0, 0xdfb0, - 0xdfb0, 0xdfb0, 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, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x2460 .. 0x24ff */ - 0xdbd1, 0xdbd1, 0xdbd1, 0xdbd1, 0xdbd1, 0xdbd1, 0xdbd1, 0xdbd1, - 0xdbd1, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0xdbbd, 0xdbbd, 0xdbbd, 0xdbbd, - 0xdbbd, 0xdbbd, 0xdbbd, 0xdbbd, 0xdbbd, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xdba9, 0xdba9, 0xdba9, 0xdba9, 0xdba9, 0xdba9, 0xdba9, 0xdba9, - 0xdba9, 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, 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, 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, 0xdb46, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xdb3c, 0xdb3c, 0xdb3c, - 0xdb3c, 0xdb3c, 0xdb3c, 0xdb3c, 0xdb3c, 0xdb3c, 0x0000, 0xdb31, - /* 0x2700 .. 0x27ff */ - 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, - 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, - 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, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xd8bb, 0xd8bb, - 0xd8bb, 0xd8bb, 0xd8bb, 0xd8bb, 0xd8bb, 0xd8bb, 0xd8bb, 0x0000, - 0xd8b1, 0xd8b1, 0xd8b1, 0xd8b1, 0xd8b1, 0xd8b1, 0xd8b1, 0xd8b1, - 0xd8b1, 0x0000, 0xd8a7, 0xd8a7, 0xd8a7, 0xd8a7, 0xd8a7, 0xd8a7, - 0xd8a7, 0xd8a7, 0xd8a7, 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, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0xa620 .. 0xa6ff */ - 0x5a10, 0x5a10, 0x5a10, 0x5a10, 0x5a10, 0x5a10, 0x5a10, 0x5a10, - 0x5a10, 0x5a10, 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, 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, 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, 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, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0xa8d0 .. 0xa8ff */ - 0x5760, 0x5760, 0x5760, 0x5760, 0x5760, 0x5760, 0x5760, 0x5760, - 0x5760, 0x5760, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0xa900 .. 0xa9ff */ - 0x5730, 0x5730, 0x5730, 0x5730, 0x5730, 0x5730, 0x5730, 0x5730, - 0x5730, 0x5730, 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, 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, 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, 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, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x5660, 0x5660, 0x5660, 0x5660, 0x5660, 0x5660, 0x5660, 0x5660, - 0x5660, 0x5660, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0xaa26 .. 0xaaff */ - 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, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x55e0, 0x55e0, 0x55e0, 0x55e0, 0x55e0, 0x55e0, - 0x55e0, 0x55e0, 0x55e0, 0x55e0, 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, 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, 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, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, - /* 0xaba6 .. 0xabff */ - 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, - 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, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x5440, 0x5440, 0x5440, 0x5440, 0x5440, 0x5440, - 0x5440, 0x5440, 0x5440, 0x5440, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, - /* 0xff06 .. 0xffff */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, - 0x0120, 0x0120, 0x0120, 0x0120, 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, 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, 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, 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, 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, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000 -}; -const WCHAR wine_compatmap[1497] = -{ - /* index */ - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0200, 0x0300, 0x0100, 0x0100, 0x0100, 0x03da, 0x04d9, - /* defaults */ - 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, - 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, - 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, - 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, - 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, - 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, - 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, - 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, - /* 0xf900 .. 0xf9ff */ - 0x9348, 0x6df3, 0x95c8, 0x93c5, 0x75cd, 0x552d, 0x5adf, 0xa695, - 0xa694, 0x6048, 0x98c7, 0x5c7c, 0x603c, 0x68e9, 0x7d5b, 0x8676, - 0x8d2f, 0x8ea9, 0x8fe6, 0x977c, 0x70ee, 0x7406, 0x77c3, 0x7ac7, - 0x8b25, 0x9851, 0xa0d7, 0x5567, 0x5a59, 0x71e7, 0x78fd, 0x8d0e, - 0xa4fe, 0x642f, 0x76c9, 0x8caa, 0x9040, 0x69a4, 0x88b2, 0x8ef8, - 0x65a2, 0x6dee, 0x7440, 0x79d1, 0x97a2, 0x5659, 0x5889, 0x59af, - 0x6b94, 0x71a2, 0x78de, 0x7db4, 0x86cd, 0x8cd1, 0x8d26, 0x94b8, - 0x9dfa, 0xa236, 0xa4c0, 0x7f51, 0x8043, 0x8463, 0x8a8b, 0x99c5, - 0xa53f, 0x9195, 0x5f9d, 0x65c1, 0x831c, 0x8739, 0x791c, 0x7f83, - 0x937a, 0x9dae, 0x5f8e, 0x6317, 0x70c7, 0x748d, 0x75c1, 0x83e0, - 0x84e7, 0x9cfa, 0x5980, 0x8738, 0x5888, 0x5877, 0x80c6, 0x8467, - 0x8a99, 0x9d1c, 0x9226, 0x6974, 0x70a6, 0x91a1, 0x54db, 0x6288, - 0x66b2, 0x7a26, 0x7c0e, 0x59b4, 0x7f97, 0x565a, 0x6643, 0x54a6, - 0x7364, 0x6c0f, 0x83b8, 0x5a58, 0x5ef2, 0x7d94, 0x8adb, 0x913b, - 0x724a, 0x963f, 0x7316, 0x698b, 0x8971, 0x6a2b, 0x7bef, 0x5537, - 0x57f1, 0x5850, 0x6f07, 0x836c, 0x88f3, 0x9155, 0x9851, 0x5976, - 0x5ac2, 0x5ff2, 0x656a, 0x6c42, 0x767a, 0x7fa5, 0x9c27, 0xa0e3, - 0xa50f, 0xa545, 0x5911, 0x6d3b, 0x71eb, 0x95d5, 0x64e6, 0x6801, - 0x6870, 0x6b09, 0x7591, 0x77b6, 0x7af5, 0x8035, 0x845e, 0x86d8, - 0x958e, 0x8b55, 0x9689, 0x99af, 0x587b, 0x5906, 0x5b1f, 0x7729, - 0x8f22, 0x9109, 0x6527, 0x6652, 0x69d7, 0x7209, 0x8298, 0x79ce, - 0x553c, 0x5d50, 0x623d, 0x640f, 0x6670, 0x7a05, 0x7abb, 0x85eb, - 0x8696, 0x9883, 0x9d44, 0x9d95, 0x9e64, 0x55d6, 0x7ff8, 0x97fd, - 0x9d00, 0x6728, 0x54cc, 0x571f, 0x6232, 0x6282, 0x6bdb, 0x7043, - 0x780e, 0x7c81, 0x8b3a, 0x96b9, 0xa5c9, 0x6cc3, 0x9c68, 0x58c2, - 0x6db3, 0x6e2a, 0x7377, 0x74d1, 0x7a3d, 0x7b8c, 0x7e9d, 0x8341, - 0x9e8e, 0x579c, 0x685c, 0x9ca5, 0x5657, 0x6344, 0x7414, 0x9553, - 0x65b3, 0x676b, 0x6e3d, 0x79ac, 0x9caa, 0x584c, 0x5a31, 0x6286, - 0x6c33, 0x6d6d, 0x6ec6, 0x7302, 0x7a22, 0x7bfd, 0x8593, 0x8ee8, - 0x8ef9, 0x97e3, 0x9cf8, 0x5954, 0x74ce, 0x5a30, 0x77e2, 0x7aa9, - 0x8c0a, 0x9cb2, 0xa265, 0xa4ac, 0x6da3, 0x73d6, 0x87f2, 0x80d4, - 0x8128, 0x8299, 0x78c6, 0x769e, 0x915c, 0x54c3, 0x8938, 0x583b, - /* 0xfa00 .. 0xfaff */ - 0x5807, 0x64a5, 0x68d1, 0x82d3, 0x6181, 0x7319, 0x6cae, 0x9534, - 0x8e44, 0x9c44, 0x8f81, 0x64c8, 0x5734, 0x5bb3, 0x0000, 0x0000, - 0x5e4a, 0x0000, 0x6c62, 0x0000, 0x0000, 0x57c9, 0x7914, 0x7cb3, - 0x7f24, 0x7f45, 0x7f4b, 0x7f74, 0x9d3a, 0x82a1, 0x859f, 0x0000, - 0x8bf2, 0x0000, 0x90d6, 0x0000, 0x0000, 0x9613, 0x96d7, 0x0000, - 0x0000, 0x0000, 0x9ec5, 0x9ed1, 0x9efc, 0xa387, 0x0000, 0x0000, - 0x557e, 0x56b6, 0x571b, 0x5896, 0x58b0, 0x591c, 0x5b67, 0x5bcf, - 0x5c30, 0x5e07, 0x5e6e, 0x6229, 0x6232, 0x6657, 0x672a, 0x674f, - 0x67b2, 0x6b0e, 0x6ba0, 0x6c4e, 0x6e41, 0x7332, 0x73d4, 0x74db, - 0x7726, 0x77e2, 0x79d8, 0x7e46, 0x7ef2, 0x7efc, 0x7efa, 0x7f01, - 0x7f06, 0x7f0c, 0x7f3b, 0x7f3b, 0x7fec, 0x802c, 0x816a, 0x839d, - 0x83b1, 0x83e8, 0x8518, 0x85aa, 0x8791, 0x881c, 0x881b, 0x89f8, - 0x8eb0, 0x8f35, 0x909f, 0x90d6, 0x926f, 0x92a3, 0x9550, 0x95d1, - 0x9c7b, 0x9d96, 0x9dd1, 0x660a, 0x4882, 0x87ab, 0x0000, 0x0000, - 0x53b6, 0x5744, 0x56f6, 0x550d, 0x56d1, 0x570b, 0x5851, 0x5883, - 0x5b25, 0x5adc, 0x5b1f, 0x5b67, 0x5dde, 0x5e36, 0x5ec6, 0x5ed5, - 0x5fe2, 0x60a7, 0x6450, 0x6456, 0x64e5, 0x6528, 0x6652, 0x66c7, - 0x6680, 0x6705, 0x66d6, 0x6767, 0x67a8, 0x6937, 0x698e, 0x69c3, - 0x6ac6, 0x6be3, 0x6c85, 0x6c88, 0x6cc2, 0x70e4, 0x7124, 0x72aa, - 0x7443, 0x7432, 0x7488, 0x7583, 0x76d2, 0x7d0a, 0x7797, 0x7810, - 0x788a, 0x79d0, 0x7a64, 0x7a98, 0x7b79, 0x7b7a, 0x7c24, 0x7c34, - 0x7c4c, 0x7ca1, 0x7c96, 0x7e21, 0x8005, 0x8113, 0x81cd, 0x82ac, - 0x8344, 0x848d, 0x8553, 0x889f, 0x893b, 0x8cc4, 0x8e8b, 0x8ecf, - 0x8ede, 0x9006, 0x903e, 0x9010, 0x9045, 0x9041, 0x902f, 0x907a, - 0x90ca, 0x9247, 0x9476, 0x95af, 0x96d5, 0x97b1, 0x9bb6, 0x9c1c, - 0x9c8e, 0x9d12, 0x9d35, 0x9d40, 0x9d6f, 0xa045, 0xa4ce, 0x2d7b, - 0x2d74, 0x3904, 0x40cb, 0x4545, 0x4565, 0x5774, 0x61fa, 0x83fc, - 0xa46b, 0xa4b5, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0xfe26 .. 0xfeff */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x21f5, 0x21e3, 0x21e1, 0x022c, 0x022b, 0x01f3, - 0x01f3, 0x0244, 0x0245, 0x31db, 0x31db, 0x31d5, 0x31d5, 0x31cd, - 0x31cd, 0x31c9, 0x31c9, 0x31cb, 0x31cb, 0x31cb, 0x31cb, 0x0000, - 0x0000, 0x0214, 0x0215, 0x21f5, 0x21f4, 0x21f3, 0x21f2, 0x0212, - 0x0211, 0x0210, 0x01dc, 0x31b0, 0x01dc, 0x0000, 0x01e7, 0x01e5, - 0x01e9, 0x01ca, 0x21bc, 0x01cf, 0x01cf, 0x0220, 0x0221, 0x31b7, - 0x31b7, 0x01c4, 0x01c6, 0x01c9, 0x01c9, 0x01ca, 0x01d8, 0x01d9, - 0x01d7, 0x0000, 0x01f4, 0x01bb, 0x01bb, 0x01d5, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x07a1, 0x07a1, 0x07a0, 0x07a0, 0x079f, 0x079f, - 0x079e, 0x079e, 0x079d, 0x079d, 0x079c, 0x079b, 0x079a, 0x079a, - 0x0799, 0x0799, 0x0798, 0x0797, 0x0796, 0x0796, 0x0795, 0x0795, - 0x0794, 0x0793, 0x0792, 0x0792, 0x0791, 0x0790, 0x078f, 0x078f, - 0x078e, 0x078d, 0x078c, 0x078c, 0x078b, 0x078a, 0x0789, 0x0789, - 0x0788, 0x0787, 0x0786, 0x0786, 0x0785, 0x0785, 0x0784, 0x0784, - 0x0783, 0x0783, 0x0782, 0x0782, 0x0781, 0x0780, 0x077f, 0x077f, - 0x077e, 0x077d, 0x077c, 0x077c, 0x077b, 0x077a, 0x0779, 0x0779, - 0x0778, 0x0777, 0x0776, 0x0776, 0x0775, 0x0774, 0x0773, 0x0773, - 0x0772, 0x0771, 0x0770, 0x0770, 0x076f, 0x076e, 0x076d, 0x076d, - 0x076c, 0x076b, 0x076a, 0x0770, 0x076f, 0x076e, 0x076d, 0x076d, - 0x076c, 0x076b, 0x076a, 0x076a, 0x0769, 0x0768, 0x0767, 0x0767, - 0x0766, 0x0765, 0x0764, 0x0764, 0x0763, 0x0762, 0x0761, 0x0761, - 0x0760, 0x075f, 0x075e, 0x075e, 0x075d, 0x075c, 0x075b, 0x075b, - 0x075a, 0x075a, 0x0759, 0x0759, 0x0758, 0x0757, 0x0756, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, - /* 0xff01 .. 0xffff */ - 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, - 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, - 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, - 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, - 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, - 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, - 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, - 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, - 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, - 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, - 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, - 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x2a26, 0x2a26, - 0x30a1, 0x30aa, 0x30aa, 0x309d, 0x3196, 0x318c, 0x313a, 0x313b, - 0x313c, 0x313d, 0x313e, 0x3177, 0x3178, 0x3179, 0x3154, 0x318c, - 0x3131, 0x3132, 0x3133, 0x3134, 0x3135, 0x3135, 0x3136, 0x3137, - 0x3138, 0x3139, 0x313a, 0x313b, 0x313c, 0x313d, 0x313e, 0x313f, - 0x3140, 0x3142, 0x3143, 0x3144, 0x3145, 0x3145, 0x3145, 0x3145, - 0x3145, 0x3145, 0x3147, 0x3149, 0x314b, 0x314d, 0x314f, 0x314f, - 0x314f, 0x314f, 0x314f, 0x3150, 0x3151, 0x3152, 0x3152, 0x3152, - 0x3152, 0x3152, 0x3152, 0x3153, 0x3156, 0x30fb, 0x30fb, 0x31c4, - 0x3190, 0x3190, 0x3190, 0x3190, 0x3190, 0x3190, 0x3190, 0x3190, - 0x3190, 0x3190, 0x3190, 0x3190, 0x3190, 0x3190, 0x3190, 0x3190, - 0x3190, 0x3190, 0x3190, 0x3190, 0x3190, 0x3190, 0x3190, 0x3190, - 0x3190, 0x3190, 0x3190, 0x3190, 0x3190, 0x3190, 0x0000, 0x0000, - 0x0000, 0x318d, 0x318d, 0x318d, 0x318d, 0x318d, 0x318d, 0x0000, - 0x0000, 0x318b, 0x318b, 0x318b, 0x318b, 0x318b, 0x318b, 0x0000, - 0x0000, 0x3189, 0x3189, 0x3189, 0x3189, 0x3189, 0x3189, 0x0000, - 0x0000, 0x3187, 0x3187, 0x3187, 0x0000, 0x0000, 0x0000, 0x00c2, - 0x00c2, 0x00ca, 0x00cc, 0x00c2, 0x00c0, 0x20c3, 0x0000, 0x251a, - 0x21a7, 0x21a7, 0x21a7, 0x21a7, 0x25b3, 0x25dd, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 -}; diff --git a/reactos/tools/unicode/collation.c b/reactos/tools/unicode/collation.c deleted file mode 100644 index 465d740001b..00000000000 --- a/reactos/tools/unicode/collation.c +++ /dev/null @@ -1,1657 +0,0 @@ -/* Unicode collation element table */ -/* generated from http://www.unicode.org/reports/tr10/allkeys.txt */ -/* DO NOT EDIT!! */ - -const unsigned int collation_table[12800] = -{ - /* index */ - 0x00000200, 0x00000300, 0x00000400, 0x00000500, 0x00000600, 0x00000700, 0x00000800, 0x00000900, - 0x00000100, 0x00000a00, 0x00000b00, 0x00000c00, 0x00000d00, 0x00000e00, 0x00000f00, 0x00001000, - 0x00001100, 0x00001200, 0x00001300, 0x00001400, 0x00001500, 0x00001600, 0x00001700, 0x00001800, - 0x00001900, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00001a00, 0x00001b00, - 0x00001c00, 0x00001d00, 0x00001e00, 0x00001f00, 0x00002000, 0x00002100, 0x00002200, 0x00002300, - 0x00002400, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00002500, 0x00002600, - 0x00002700, 0x00002800, 0x00002900, 0x00002a00, 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00002b00, 0x00002c00, 0x00002d00, 0x00002e00, 0x00002f00, 0x00003000, 0x00003100, - /* defaults */ - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x0000 .. 0x00ff */ - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x02010111, 0x02020111, 0x02030111, 0x02040111, 0x02050111, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x02090111, 0x024b0111, 0x02700111, 0x02a90111, 0x09e00111, 0x02aa0111, 0x02a70111, 0x02690111, - 0x027a0111, 0x027b0111, 0x02a20111, 0x039f0111, 0x022d0111, 0x02210111, 0x02550111, 0x02a40111, - 0x0a0b0111, 0x0a0c0111, 0x0a0d0111, 0x0a0e0111, 0x0a0f0111, 0x0a100111, 0x0a110111, 0x0a120111, - 0x0a130111, 0x0a140111, 0x02370111, 0x02350111, 0x03a30111, 0x03a40111, 0x03a50111, 0x024e0111, - 0x02a10111, 0x0a150151, 0x0a290141, 0x0a3d0151, 0x0a490151, 0x0a650151, 0x0a910151, 0x0a990151, - 0x0ab90151, 0x0ad30161, 0x0ae70141, 0x0af70141, 0x0b030161, 0x0b2b0151, 0x0b330151, 0x0b4b0161, - 0x0b670141, 0x0b730141, 0x0b7f0141, 0x0ba70151, 0x0bbf0151, 0x0bd70141, 0x0bef0151, 0x0bfb0141, - 0x0c030151, 0x0c070141, 0x0c130141, 0x027c0111, 0x02a60111, 0x027d0111, 0x020f0111, 0x021b0111, - 0x020c0111, 0x0a150111, 0x0a290111, 0x0a3d0111, 0x0a490111, 0x0a650111, 0x0a910111, 0x0a990111, - 0x0ab90111, 0x0ad30111, 0x0ae70111, 0x0af70111, 0x0b030111, 0x0b2b0111, 0x0b330111, 0x0b4b0111, - 0x0b670111, 0x0b730111, 0x0b7f0111, 0x0ba70111, 0x0bbf0111, 0x0bd70111, 0x0bef0111, 0x0bfb0111, - 0x0c030111, 0x0c070111, 0x0c130111, 0x027e0111, 0x03a70111, 0x027f0111, 0x03aa0111, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02060111, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x02090141, 0x024c0111, 0x09df0111, 0x09e10111, 0x09de0111, 0x09e20111, 0x03a80111, 0x029c0111, - 0x02140111, 0x029f0111, 0x0a150181, 0x02780111, 0x03a60111, 0x02200111, 0x02a00111, 0x02100111, - 0x030a0111, 0x03a00111, 0x0a0d0151, 0x0a0e0151, 0x020d0111, 0x0c9f0121, 0x029d0111, 0x025f0111, - 0x02190111, 0x0a0c0151, 0x0b4b01a1, 0x02790111, 0x0a0c0171, 0x0a0c0171, 0x0a0e0171, 0x024f0111, - 0x0a150151, 0x0a150151, 0x0a150151, 0x0a150151, 0x0a150151, 0x0a150151, 0x0a190121, 0x0a3d0151, - 0x0a650151, 0x0a650151, 0x0a650151, 0x0a650151, 0x0ad30161, 0x0ad30161, 0x0ad30161, 0x0ad30161, - 0x0a5d0121, 0x0b330151, 0x0b4b0161, 0x0b4b0161, 0x0b4b0161, 0x0b4b0161, 0x0b4b0161, 0x03a20111, - 0x0b530121, 0x0bd70141, 0x0bd70141, 0x0bd70141, 0x0bd70141, 0x0c070141, 0x0c3b0121, 0x0ba70131, - 0x0a150111, 0x0a150111, 0x0a150111, 0x0a150111, 0x0a150111, 0x0a150111, 0x0a190111, 0x0a3d0111, - 0x0a650111, 0x0a650111, 0x0a650111, 0x0a650111, 0x0ad30111, 0x0ad30111, 0x0ad30111, 0x0ad30111, - 0x0a5d0111, 0x0b330111, 0x0b4b0111, 0x0b4b0111, 0x0b4b0111, 0x0b4b0111, 0x0b4b0111, 0x03a10111, - 0x0b530111, 0x0bd70111, 0x0bd70111, 0x0bd70111, 0x0bd70111, 0x0c070111, 0x0c3b0111, 0x0c070111, - /* 0x0100 .. 0x01ff */ - 0x0a150151, 0x0a150111, 0x0a150151, 0x0a150111, 0x0a150151, 0x0a150111, 0x0a3d0151, 0x0a3d0111, - 0x0a3d0151, 0x0a3d0111, 0x0a3d0151, 0x0a3d0111, 0x0a3d0151, 0x0a3d0111, 0x0a490151, 0x0a490111, - 0x0a4d0121, 0x0a4d0111, 0x0a650151, 0x0a650111, 0x0a650151, 0x0a650111, 0x0a650151, 0x0a650111, - 0x0a650151, 0x0a650111, 0x0a650151, 0x0a650111, 0x0a990151, 0x0a990111, 0x0a990151, 0x0a990111, - 0x0a990151, 0x0a990111, 0x0a990151, 0x0a990111, 0x0ab90151, 0x0ab90111, 0x0ac50131, 0x0ac50111, - 0x0ad30161, 0x0ad30111, 0x0ad30161, 0x0ad30111, 0x0ad30161, 0x0ad30111, 0x0ad30161, 0x0ad30111, - 0x0ad30161, 0x0ad70111, 0x0ad30181, 0x0ad30131, 0x0ae70141, 0x0ae70111, 0x0af70141, 0x0af70111, - 0x0b7b0111, 0x0b030161, 0x0b030111, 0x0b030161, 0x0b030111, 0x0b030161, 0x0b030111, 0x0b030181, - 0x0b030131, 0x0b0b0121, 0x0b0b0111, 0x0b330151, 0x0b330111, 0x0b330151, 0x0b330111, 0x0b330151, - 0x0b330111, 0x0c580121, 0x0b470121, 0x0b470111, 0x0b4b0161, 0x0b4b0111, 0x0b4b0161, 0x0b4b0111, - 0x0b4b0161, 0x0b4b0111, 0x0b4b0181, 0x0b4b0131, 0x0b7f0141, 0x0b7f0111, 0x0b7f0141, 0x0b7f0111, - 0x0b7f0141, 0x0b7f0111, 0x0ba70151, 0x0ba70111, 0x0ba70151, 0x0ba70111, 0x0ba70151, 0x0ba70111, - 0x0ba70151, 0x0ba70111, 0x0bbf0151, 0x0bbf0111, 0x0bbf0151, 0x0bbf0111, 0x0bc30121, 0x0bc30111, - 0x0bd70141, 0x0bd70111, 0x0bd70141, 0x0bd70111, 0x0bd70141, 0x0bd70111, 0x0bd70141, 0x0bd70111, - 0x0bd70141, 0x0bd70111, 0x0bd70141, 0x0bd70111, 0x0bfb0141, 0x0bfb0111, 0x0c070141, 0x0c070111, - 0x0c070141, 0x0c130141, 0x0c130111, 0x0c130141, 0x0c130111, 0x0c130141, 0x0c130111, 0x0ba70131, - 0x0a310111, 0x0a350121, 0x0a390121, 0x0a390111, 0x0c4f0121, 0x0c4f0111, 0x0b570121, 0x0a410121, - 0x0a410111, 0x0a510121, 0x0a550121, 0x0a590121, 0x0a590111, 0x0a610111, 0x0a690121, 0x0a6d0121, - 0x0a710121, 0x0a950121, 0x0a950111, 0x0aa50121, 0x0aad0121, 0x0ac10111, 0x0ae30121, 0x0adf0121, - 0x0afb0121, 0x0afb0111, 0x0b0f0111, 0x0b230111, 0x0be30121, 0x0b3b0121, 0x0b3f0111, 0x0b5b0121, - 0x0b4b0161, 0x0b4b0111, 0x0ab50121, 0x0ab50111, 0x0b6b0121, 0x0b6b0111, 0x0b830121, 0x0c470121, - 0x0c470111, 0x0baf0121, 0x0bb30111, 0x0bc70111, 0x0bcb0121, 0x0bcb0111, 0x0bcf0121, 0x0bd70141, - 0x0bd70111, 0x0beb0121, 0x0bf30121, 0x0c0f0121, 0x0c0f0111, 0x0c170121, 0x0c170111, 0x0c270121, - 0x0c2b0121, 0x0c2b0111, 0x0c2f0111, 0x0c430111, 0x0c4b0121, 0x0c4b0111, 0x0c610111, 0x0c3f0111, - 0x0c710111, 0x0c750111, 0x0c790111, 0x0c7d0111, 0x0a490171, 0x0a490171, 0x0a490131, 0x0b030181, - 0x0b030181, 0x0b030131, 0x0b330171, 0x0b330171, 0x0b330131, 0x0a150151, 0x0a150111, 0x0ad30161, - 0x0ad30111, 0x0b4b0161, 0x0b4b0111, 0x0bd70141, 0x0bd70111, 0x0bd70141, 0x0bd70111, 0x0bd70141, - 0x0bd70111, 0x0bd70141, 0x0bd70111, 0x0bd70141, 0x0bd70111, 0x0a690111, 0x0a150151, 0x0a150111, - 0x0a150151, 0x0a150111, 0x0a190121, 0x0a190111, 0x0aa10121, 0x0aa10111, 0x0a990151, 0x0a990111, - 0x0af70141, 0x0af70111, 0x0b4b0161, 0x0b4b0111, 0x0b4b0161, 0x0b4b0111, 0x0c270121, 0x0c270111, - 0x0ae70111, 0x0a490171, 0x0a490171, 0x0a490131, 0x0a990151, 0x0a990111, 0x0ac10121, 0x0c3f0121, - 0x0b330151, 0x0b330111, 0x0a150151, 0x0a150111, 0x0a190121, 0x0a190111, 0x0b530121, 0x0b530111, - /* 0x0200 .. 0x02ff */ - 0x0a150151, 0x0a150111, 0x0a150151, 0x0a150111, 0x0a650151, 0x0a650111, 0x0a650151, 0x0a650111, - 0x0ad30161, 0x0ad30111, 0x0ad30161, 0x0ad30111, 0x0b4b0161, 0x0b4b0111, 0x0b4b0161, 0x0b4b0111, - 0x0b7f0141, 0x0b7f0111, 0x0b7f0141, 0x0b7f0111, 0x0bd70141, 0x0bd70111, 0x0bd70141, 0x0bd70111, - 0x0ba70151, 0x0ba70111, 0x0bbf0151, 0x0bbf0111, 0x0c370121, 0x0c370111, 0x0ab90151, 0x0ab90111, - 0xffffffff, 0xffffffff, 0x0b630121, 0x0b630111, 0x0c1b0121, 0x0c1b0111, 0x0a150151, 0x0a150111, - 0x0a650151, 0x0a650111, 0x0b4b0161, 0x0b4b0111, 0x0b4b0161, 0x0b4b0111, 0x0b4b0161, 0x0b4b0111, - 0x0b4b0161, 0x0b4b0111, 0x0c070141, 0x0c070111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x0a1d0111, 0x0a210111, 0x0a250111, 0x0a350111, 0x0b570111, 0x0a450111, 0x0a510111, 0x0a550111, - 0x0a750111, 0x0a6d0111, 0x0a790111, 0x0a710111, 0x0a7d0111, 0x0a810111, 0x0a850111, 0x0aef0111, - 0x0aa50111, 0x0ab10111, 0x0a9d0111, 0x0aad0111, 0x0a8d0111, 0x0bdf0111, 0x0ac90111, 0x0acd0111, - 0x0adf0111, 0x0ae30111, 0x0adb0111, 0x0b130111, 0x0b170111, 0x0b1b0111, 0x0b1f0111, 0x0be30111, - 0x0be70111, 0x0b2f0111, 0x0b3b0111, 0x0b430111, 0x0b370111, 0x0b5b0111, 0x0b4f0111, 0x0b5f0111, - 0x0b6f0111, 0x0b870111, 0x0b8b0111, 0x0b8f0111, 0x0b930111, 0x0b970111, 0x0b9b0111, 0x0b9f0111, - 0x0b830111, 0x0ba30111, 0x0bab0111, 0x0baf0111, 0x0af30111, 0x0bb70111, 0x0bbb0111, 0x0bd30111, - 0x0bcf0111, 0x0bdb0111, 0x0beb0111, 0x0bf30111, 0x0bf70111, 0x0bff0111, 0x0b270111, 0x0c0b0111, - 0x0c1f0111, 0x0c230111, 0x0c270111, 0x0c330111, 0x0c530111, 0x0c5b0111, 0x0c6d0111, 0x0c810111, - 0x0c850111, 0x0a2d0111, 0x0a890111, 0x0aa90111, 0x0abd0111, 0x0aeb0111, 0x0aff0111, 0x0b070111, - 0x0b770111, 0x0c650111, 0x0c690111, 0x0a490131, 0x0a490131, 0x0a490131, 0x0bbf0131, 0x0bbf0131, - 0x0bbf0131, 0x0a910131, 0x0b030131, 0x0b030131, 0x0c890111, 0x0c8d0111, 0xffffffff, 0xffffffff, - 0x0ab90191, 0x0ac90121, 0x0ae70171, 0x0b7f0191, 0x0b870121, 0x0b8f0121, 0x0ba30121, 0x0bfb0171, - 0x0c070171, 0x02e90111, 0x02eb0111, 0x0ad10111, 0x0c580111, 0x0ad20111, 0x0c5a0111, 0x0c5f0111, - 0x0c570111, 0x0c600111, 0x02ec0111, 0x02ed0111, 0x02ee0111, 0x02ef0111, 0x02f00111, 0x02f10111, - 0x02f20111, 0x02f30111, 0x02f40111, 0x02f50111, 0x02f60111, 0x02f70111, 0x02f80111, 0x02f90111, - 0x09d30111, 0x09d40111, 0x02fa0111, 0x02fb0111, 0x02fc0111, 0x02fd0111, 0x02fe0111, 0x02ff0111, - 0x02120111, 0x02130111, 0x02150111, 0x021a0111, 0x020e0111, 0x02160111, 0x03000111, 0xffffffff, - 0x0aad0131, 0x0b0301b1, 0x0ba70181, 0x0c030191, 0x0c5b0121, 0x03010111, 0x03020111, 0x03030111, - 0x03040111, 0x03050111, 0x03060111, 0x03070111, 0x03080111, 0x03090111, 0x0c590111, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x0300 .. 0x03ff */ - 0x00000611, 0x00000511, 0x00000811, 0x00000e11, 0x00001311, 0x00001411, 0x00000711, 0x00000f11, - 0x00000c11, 0x00001511, 0x00000a11, 0x00000d11, 0x00000911, 0x00001611, 0x00001711, 0x00001811, - 0x00001911, 0x00001a11, 0x00001b11, 0x00000311, 0x00000411, 0x00001c11, 0x00001d11, 0x00001e11, - 0x00001f11, 0x00002011, 0x00002111, 0x00002211, 0x00002311, 0x00002411, 0x00002511, 0x00002611, - 0x00002711, 0x00002811, 0x00002911, 0x00002a11, 0x00002b11, 0x00002c11, 0x00002d11, 0x00001111, - 0x00001211, 0x00002e11, 0x00002f11, 0x00003011, 0x00003111, 0x00003211, 0x00003311, 0x00003411, - 0x00003511, 0x00003611, 0x00000211, 0x00003711, 0x00003811, 0x00003911, 0x00003a11, 0x00003b11, - 0x00001011, 0x00003c11, 0x00003d11, 0x00003e11, 0x00003f11, 0x00004011, 0x00004111, 0x00004211, - 0x00000611, 0x00000511, 0x00000b11, 0x00000311, 0x00000c11, 0x00004311, 0x00004411, 0x00004511, - 0x00004611, 0x00004711, 0x00004811, 0x00004911, 0x00004a11, 0x00004b11, 0x00004c11, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x00004d11, 0x00004e11, 0x00004f11, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x02e90111, 0x02ea0111, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0x0c9b0111, 0xffffffff, 0xffffffff, 0xffffffff, 0x02350111, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x020d0111, 0x02140111, 0x0c910121, 0x025f0111, - 0x0c950131, 0x0c990121, 0x0c9b0121, 0xffffffff, 0x0ca20121, 0xffffffff, 0x0ca80121, 0x0cac0121, - 0x0c9b0111, 0x0c910121, 0x0c920131, 0x0c930121, 0x0c940121, 0x0c950131, 0x0c980121, 0x0c990121, - 0x0c9a0131, 0x0c9b0121, 0x0c9d0131, 0x0c9e0121, 0x0c9f0131, 0x0ca00121, 0x0ca10121, 0x0ca20121, - 0x0ca30131, 0x0ca50131, 0xffffffff, 0x0ca60131, 0x0ca70121, 0x0ca80121, 0x0ca90131, 0x0caa0121, - 0x0cab0121, 0x0cac0121, 0x0c9b0121, 0x0ca80121, 0x0c910111, 0x0c950111, 0x0c990111, 0x0c9b0111, - 0x0ca80111, 0x0c910111, 0x0c920111, 0x0c930111, 0x0c940111, 0x0c950111, 0x0c980111, 0x0c990111, - 0x0c9a0111, 0x0c9b0111, 0x0c9d0111, 0x0c9e0111, 0x0c9f0111, 0x0ca00111, 0x0ca10111, 0x0ca20111, - 0x0ca30111, 0x0ca50111, 0x0ca60141, 0x0ca60111, 0x0ca70111, 0x0ca80111, 0x0ca90111, 0x0caa0111, - 0x0cab0111, 0x0cac0111, 0x0c9b0111, 0x0ca80111, 0x0ca20111, 0x0ca80111, 0x0cac0111, 0xffffffff, - 0x0c920121, 0x0c9a0121, 0x0ca80131, 0x0ca80131, 0x0ca80131, 0x0ca90121, 0x0ca30121, 0x0c9d0121, - 0xffffffff, 0xffffffff, 0x0c970121, 0x0c970111, 0x0c960121, 0x0c960111, 0x0ca40121, 0x0ca40111, - 0x0cad0121, 0x0cad0111, 0x0cae0121, 0x0cae0111, 0x0caf0121, 0x0caf0111, 0x0cb00121, 0x0cb00111, - 0x0cb10121, 0x0cb10111, 0x0cb20121, 0x0cb20111, 0x0cb30121, 0x0cb30111, 0x0cb40121, 0x0cb40111, - 0x0c9d0121, 0x0ca50121, 0x0ca60121, 0x0c9c0111, 0x0c9a0141, 0x0c950121, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x0400 .. 0x04ff */ - 0x0cf10121, 0x0cf10121, 0x0ce50121, 0x0ce90121, 0x0cf90121, 0x0d110121, 0x0d210121, 0x0d250121, - 0x0d2d0121, 0x0d4d0121, 0x0d650121, 0x0d9d0121, 0x0da10121, 0x0d190121, 0x0da90121, 0x0e050121, - 0x0cb50121, 0x0ccd0121, 0x0cd10121, 0x0cd50131, 0x0ce10121, 0x0cf10121, 0x0cfd0121, 0x0d090121, - 0x0d190121, 0x0d290121, 0x0d310121, 0x0d490121, 0x0d510121, 0x0d550121, 0x0d690121, 0x0d790121, - 0x0d850121, 0x0d8d0121, 0x0d950121, 0x0da50121, 0x0dc10121, 0x0dc50121, 0x0de10121, 0x0de90121, - 0x0e090121, 0x0e0d0121, 0x0e110121, 0x0e150121, 0x0e1d0121, 0x0e290121, 0x0e310121, 0x0e350121, - 0x0cb50111, 0x0ccd0111, 0x0cd10111, 0x0cd50111, 0x0ce10111, 0x0cf10111, 0x0cfd0111, 0x0d090111, - 0x0d190111, 0x0d290111, 0x0d310111, 0x0d490111, 0x0d510111, 0x0d550111, 0x0d690111, 0x0d790111, - 0x0d850111, 0x0d8d0111, 0x0d950111, 0x0da50111, 0x0dc10111, 0x0dc50111, 0x0de10111, 0x0de90111, - 0x0e090111, 0x0e0d0111, 0x0e110111, 0x0e150111, 0x0e1d0111, 0x0e290111, 0x0e310111, 0x0e350111, - 0x0cf10111, 0x0cf10111, 0x0ce50111, 0x0ce90111, 0x0cf90111, 0x0d110111, 0x0d210111, 0x0d250111, - 0x0d2d0111, 0x0d4d0111, 0x0d650111, 0x0d9d0111, 0x0da10111, 0x0d190111, 0x0da90111, 0x0e050111, - 0x0dd10121, 0x0dd10111, 0x0e250121, 0x0e250111, 0x0e390121, 0x0e390111, 0x0e3d0121, 0x0e3d0111, - 0x0e450121, 0x0e450111, 0x0e410121, 0x0e410111, 0x0e490121, 0x0e490111, 0x0e4d0121, 0x0e4d0111, - 0x0e510121, 0x0e510111, 0x0e550121, 0x0e550111, 0x0e590121, 0x0e590111, 0x0e5d0121, 0x0e5d0111, - 0x0dbd0121, 0x0dbd0111, 0x0ddd0121, 0x0ddd0111, 0x0dd90121, 0x0dd90111, 0x0dd50121, 0x0dd50111, - 0x0d810121, 0x0d810111, 0x030b0111, 0x00005411, 0x00005511, 0x00005611, 0x00005711, 0xffffffff, - 0x00000001, 0x00000001, 0xffffffff, 0xffffffff, 0x0e210121, 0x0e210111, 0x0d890121, 0x0d890111, - 0x0cd50141, 0x0cd50121, 0x0cd90121, 0x0cd90111, 0x0cdd0121, 0x0cdd0111, 0x0d050121, 0x0d050111, - 0x0ced0121, 0x0ced0111, 0x0d350121, 0x0d350111, 0x0d450121, 0x0d450111, 0x0d410121, 0x0d410111, - 0x0d3d0121, 0x0d3d0111, 0x0d590121, 0x0d590111, 0x0d610121, 0x0d610111, 0x0d7d0121, 0x0d7d0111, - 0x0e610121, 0x0e610111, 0x0d910121, 0x0d910111, 0x0d990121, 0x0d990111, 0x0db50121, 0x0db50111, - 0x0db90121, 0x0db90111, 0x0dc90121, 0x0dc90111, 0x0de50121, 0x0de50111, 0x0df10121, 0x0df10111, - 0x0df90121, 0x0df90111, 0x0dcd0121, 0x0dcd0111, 0x0dfd0121, 0x0dfd0111, 0x0e010121, 0x0e010111, - 0x0e650111, 0x0cfd0121, 0x0cfd0111, 0x0d390121, 0x0d390111, 0xffffffff, 0xffffffff, 0x0d5d0121, - 0x0d5d0111, 0xffffffff, 0xffffffff, 0x0df50121, 0x0df50111, 0xffffffff, 0xffffffff, 0xffffffff, - 0x0cb90121, 0x0cb90111, 0x0cbd0121, 0x0cbd0111, 0x0cc90121, 0x0cc90111, 0x0cf50121, 0x0cf50111, - 0x0cc10121, 0x0cc10111, 0x0cc50121, 0x0cc50111, 0x0d010121, 0x0d010111, 0x0d0d0121, 0x0d0d0111, - 0x0d150121, 0x0d150111, 0x0d190121, 0x0d190111, 0x0d1d0121, 0x0d1d0111, 0x0d6d0121, 0x0d6d0111, - 0x0d710121, 0x0d710111, 0x0d750121, 0x0d750111, 0x0e2d0121, 0x0e2d0111, 0x0da50121, 0x0da50111, - 0x0dad0121, 0x0dad0111, 0x0db10121, 0x0db10111, 0x0ded0121, 0x0ded0111, 0xffffffff, 0xffffffff, - 0x0e190121, 0x0e190111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x0500 .. 0x05ff */ - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0x0e900121, 0x0e910121, 0x0e920121, 0x0e930121, 0x0e940131, 0x0e950121, 0x0e960121, - 0x0e970121, 0x0e980121, 0x0e990121, 0x0e9a0121, 0x0e9b0121, 0x0e9c0121, 0x0e9d0121, 0x0e9e0121, - 0x0e9f0121, 0x0ea00121, 0x0ea10121, 0x0ea20121, 0x0ea30131, 0x0ea40121, 0x0ea50121, 0x0ea60121, - 0x0ea70121, 0x0ea80121, 0x0ea90121, 0x0eaa0121, 0x0eab0121, 0x0eac0121, 0x0ead0131, 0x0eae0121, - 0x0eaf0121, 0x0eb00121, 0x0eb10121, 0x0eb20121, 0x0eb30121, 0x0eb40121, 0x0eb50121, 0xffffffff, - 0xffffffff, 0x0eb60111, 0x02bf0111, 0x02c00111, 0x024d0111, 0x022e0111, 0x02500111, 0x02c10111, - 0xffffffff, 0x0e900111, 0x0e910111, 0x0e920111, 0x0e930111, 0x0e940111, 0x0e950111, 0x0e960111, - 0x0e970111, 0x0e980111, 0x0e990111, 0x0e9a0111, 0x0e9b0111, 0x0e9c0111, 0x0e9d0111, 0x0e9e0111, - 0x0e9f0111, 0x0ea00111, 0x0ea10111, 0x0ea20111, 0x0ea30111, 0x0ea40111, 0x0ea50111, 0x0ea60111, - 0x0ea70111, 0x0ea80111, 0x0ea90111, 0x0eaa0111, 0x0eab0111, 0x0eac0111, 0x0ead0111, 0x0eae0111, - 0x0eaf0111, 0x0eb00111, 0x0eb10111, 0x0eb20111, 0x0eb30111, 0x0eb40111, 0x0eb50111, 0x0e940121, - 0xffffffff, 0x02380111, 0x02220111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, - 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, - 0x00000001, 0x00000001, 0xffffffff, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, - 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, - 0x00005811, 0x00005911, 0x00005a11, 0x00005b11, 0x00005c11, 0x00005d11, 0x00005e11, 0x00005f11, - 0x00006011, 0x00006111, 0xffffffff, 0x00006211, 0x00006311, 0x00000001, 0x02c20111, 0x00006411, - 0x02c30111, 0x00006511, 0x00006611, 0x02c40111, 0x00000001, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x0eb70111, 0x0eb80111, 0x0eb90111, 0x0eba0111, 0x0ebb0111, 0x0ebc0111, 0x0ebd0111, 0x0ebe0111, - 0x0ebf0111, 0x0ec00111, 0x0ec10131, 0x0ec10111, 0x0ec20111, 0x0ec30131, 0x0ec30111, 0x0ec40121, - 0x0ec40111, 0x0ec50111, 0x0ec60111, 0x0ec70121, 0x0ec70111, 0x0ec80121, 0x0ec80111, 0x0ec90111, - 0x0eca0111, 0x0ecb0111, 0x0ecc0111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x0ebc0121, 0x0ebc0121, 0x0ec00121, 0x02c50111, 0x02c60111, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x0600 .. 0x06ff */ - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x022f0111, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0x02360111, 0xffffffff, 0xffffffff, 0xffffffff, 0x02510111, - 0xffffffff, 0x0ecd0111, 0x0ece0111, 0x0ecf0111, 0x0ed20111, 0x0ed30111, 0x0ed50111, 0x0ed60111, - 0x0ed70111, 0x0edb0111, 0x0edc0111, 0x0edd0111, 0x0ee30111, 0x0ee90111, 0x0eea0111, 0x0eee0111, - 0x0eef0111, 0x0ef90111, 0x0efa0111, 0x0f040111, 0x0f050111, 0x0f0a0111, 0x0f0b0111, 0x0f0f0111, - 0x0f100111, 0x0f120111, 0x0f130111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x020b0111, 0x0f160111, 0x0f1d0111, 0x0f200111, 0x0f2d0111, 0x0f320111, 0x0f330111, 0x0f390111, - 0x0f3e0111, 0x0f480111, 0x0f490111, 0x00006811, 0x00006911, 0x00006a11, 0x00006b11, 0x00006c11, - 0x00006d11, 0x00006e11, 0x00006f11, 0x00007011, 0x00007111, 0x00007211, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x0a0b0111, 0x0a0c0111, 0x0a0d0111, 0x0a0e0111, 0x0a0f0111, 0x0a100111, 0x0a110111, 0x0a120111, - 0x0a130111, 0x0a140111, 0x02ab0111, 0x02300111, 0x02310111, 0x02a30111, 0xffffffff, 0xffffffff, - 0x00007311, 0x0ed10111, 0x0ed00111, 0x0ed40111, 0x0ecd0111, 0x0ed60121, 0x0f3e0121, 0x0f420121, - 0x0f490121, 0x0ede0111, 0x0edf0111, 0x0ed80111, 0x0ee00111, 0x0ee10111, 0x0ed90111, 0x0ee20111, - 0x0eda0111, 0x0eeb0111, 0x0eec0111, 0x0ee40111, 0x0ee50111, 0x0eed0111, 0x0ee60111, 0x0ee80111, - 0x0ef00111, 0x0ef10111, 0x0ef20111, 0x0ef30111, 0x0ef40111, 0x0ef50111, 0x0ef60111, 0x0ef70111, - 0x0ef80111, 0x0efb0111, 0x0efc0111, 0x0efd0111, 0x0efe0111, 0x0eff0111, 0x0f000111, 0x0f010111, - 0x0f020111, 0x0f030111, 0x0f060111, 0x0f070111, 0x0f080111, 0x0f0c0111, 0x0f0d0111, 0x0f110111, - 0x0f140111, 0x0f170111, 0x0f180111, 0x0f190111, 0x0f1a0111, 0x0f1b0111, 0x0f1c0111, 0x0f1e0111, - 0x0f1f0111, 0x0f210111, 0x0f220111, 0x0f230111, 0x0f240111, 0x0f250111, 0x0f260111, 0x0f270111, - 0x0f280111, 0x0f290111, 0x0f2a0111, 0x0f2b0111, 0x0f2c0111, 0x0f2e0111, 0x0f2f0111, 0x0f300111, - 0x0f310111, 0x0f380111, 0x0f340111, 0x0f350111, 0x0f360111, 0x0f370111, 0x0f3a0111, 0x0ee70111, - 0x0f3d0111, 0x0f3b0111, 0x0f3b0111, 0x0f3c0111, 0x0f3f0111, 0x0f400111, 0x0f410111, 0x0f420111, - 0x0f430111, 0x0f440111, 0x0f450111, 0x0f460111, 0x0f4a0111, 0x0f4b0111, 0x0f4c0111, 0x0f470111, - 0x0f4d0111, 0x0f4e0111, 0x0f4f0111, 0x0f4f0111, 0x02570111, 0x0f3d0111, 0x00007411, 0x00007511, - 0x00007611, 0x00007711, 0x00007811, 0x00007911, 0x00007a11, 0x00000001, 0x00000001, 0x00000001, - 0x00000001, 0x00007b11, 0x00007c11, 0x00007d11, 0x00007e11, 0x0f3e0121, 0x0f490121, 0x00007f11, - 0x00008011, 0x030c0111, 0x00000001, 0x00000001, 0x00000001, 0x00008111, 0xffffffff, 0xffffffff, - 0x0a0b0111, 0x0a0c0111, 0x0a0d0111, 0x0a0e0111, 0x0a0f0111, 0x0a100111, 0x0a110111, 0x0a120111, - 0x0a130111, 0x0a140111, 0x0f090111, 0x0f0e0111, 0x0f150111, 0x0ecd0121, 0x0f320121, 0xffffffff, - /* 0x0700 .. 0x07ff */ - 0x02660111, 0x02580111, 0x02590111, 0x02390111, 0x023a0111, 0x023b0111, 0x023c0111, 0x023d0111, - 0x023e0111, 0x02520111, 0x02c70111, 0x02c80111, 0x02c90111, 0x02ca0111, 0xffffffff, 0x00000000, - 0x0f500111, 0x00008211, 0x0f510111, 0x0f520111, 0x0f520121, 0x0f530111, 0x0f540111, 0x0f550111, - 0x0f560111, 0x0f570111, 0x0f580111, 0x0f590111, 0x0f590121, 0x0f5a0111, 0x0f5b0111, 0x0f5c0111, - 0x0f5d0111, 0x0f5e0111, 0x0f5f0111, 0x0f600111, 0x0f600121, 0x0f610111, 0x0f620111, 0x0f620121, - 0x0f630111, 0x0f640111, 0x0f650111, 0x0f660111, 0x0f670111, 0xffffffff, 0xffffffff, 0xffffffff, - 0x00008311, 0x00008411, 0x00008511, 0x00008611, 0x00008711, 0x00008811, 0x00008911, 0x00008a11, - 0x00008b11, 0x00008c11, 0x00008d11, 0x00008e11, 0x00008f11, 0x00009011, 0x00009111, 0x00009211, - 0x00009311, 0x00009411, 0x00009511, 0x00009611, 0x00009711, 0x00009811, 0x00009911, 0x00009a11, - 0x00009b11, 0x00009c11, 0x00009d11, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x0f680111, 0x0f6b0111, 0x0f6c0111, 0x0f6d0111, 0x0f6f0111, 0x0f700111, 0x0f710111, 0x0f720111, - 0x0f750111, 0x0f770111, 0x0f780111, 0x0f790111, 0x0f7b0111, 0x0f7f0111, 0x0f800111, 0x0f820111, - 0x0f830111, 0x0f870111, 0x0f880111, 0x0f890111, 0x0f8a0111, 0x0f8b0111, 0x0f8c0111, 0x0f8d0111, - 0x0f7c0111, 0x0f690111, 0x0f6a0111, 0x0f7a0111, 0x0f6e0111, 0x0f840111, 0x0f850111, 0x0f860111, - 0x0f7d0111, 0x0f7e0111, 0x0f730111, 0x0f740111, 0x0f810111, 0x0f760111, 0x0f8e0111, 0x0f8f0111, - 0x0f900111, 0x0f910111, 0x0f920111, 0x0f930111, 0x0f940111, 0x0f950111, 0x0f960111, 0x0f970111, - 0x0f980111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x0900 .. 0x09ff */ - 0xffffffff, 0x00009f11, 0x0000a011, 0x0000a111, 0xffffffff, 0x10d70111, 0x10d80111, 0x10d90111, - 0x10da0111, 0x10db0111, 0x10dc0111, 0x10dd0111, 0x10df0111, 0x10e10111, 0x10e20111, 0x10e30111, - 0x10e40111, 0x10e50111, 0x10e60111, 0x10e70111, 0x10e80111, 0x10e90111, 0x10ea0111, 0x10eb0111, - 0x10ec0111, 0x10ed0111, 0x10ee0111, 0x10ef0111, 0x10f00111, 0x10f10111, 0x10f20111, 0x10f30111, - 0x10f40111, 0x10f50111, 0x10f60111, 0x10f70111, 0x10f80111, 0x10f90111, 0x10fa0111, 0x10fb0111, - 0x10fc0111, 0x10fc0111, 0x10fd0111, 0x10fe0111, 0x10ff0111, 0x11000111, 0x11010111, 0x11020111, - 0x11030111, 0x11030111, 0x11040111, 0x11050111, 0x11050111, 0x11060111, 0x11070111, 0x11080111, - 0x11090111, 0x110a0111, 0xffffffff, 0xffffffff, 0x00009e11, 0x110b0111, 0x110c0111, 0x110d0111, - 0x110e0111, 0x110f0111, 0x11100111, 0x11110111, 0x11120111, 0x11150111, 0x11160111, 0x11170111, - 0x11180111, 0x11190111, 0x111a0111, 0x111b0111, 0x111c0111, 0x111d0111, 0xffffffff, 0xffffffff, - 0x10d60111, 0x0000a211, 0x0000a311, 0x0000a411, 0x0000a511, 0xffffffff, 0xffffffff, 0xffffffff, - 0x10e90111, 0x10ea0111, 0x10eb0111, 0x10f00111, 0x10f50111, 0x10f60111, 0x10fe0111, 0x11020111, - 0x10de0111, 0x10e00111, 0x11130111, 0x11140111, 0x02600111, 0x02610111, 0x0a0b0111, 0x0a0c0111, - 0x0a0d0111, 0x0a0e0111, 0x0a0f0111, 0x0a100111, 0x0a110111, 0x0a120111, 0x0a130111, 0x0a140111, - 0x02cd0111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0x0000a711, 0x0000a811, 0x0000a911, 0xffffffff, 0x111e0111, 0x111f0111, 0x11200111, - 0x11210111, 0x11220111, 0x11230111, 0x11240111, 0x11260111, 0xffffffff, 0xffffffff, 0x11280111, - 0x11290111, 0xffffffff, 0xffffffff, 0x112a0111, 0x112b0111, 0x112c0111, 0x112d0111, 0x112e0111, - 0x112f0111, 0x11300111, 0x11310111, 0x11320111, 0x11330111, 0x11340111, 0x11350111, 0x11360111, - 0x11370111, 0x11380111, 0x11390111, 0x113a0111, 0x113b0111, 0x113c0111, 0x113d0111, 0x113e0111, - 0x113f0111, 0xffffffff, 0x11400111, 0x11410111, 0x11420111, 0x11430111, 0x11440111, 0x11450111, - 0x11460111, 0xffffffff, 0x11480111, 0xffffffff, 0xffffffff, 0xffffffff, 0x114a0111, 0x114b0111, - 0x114c0111, 0x114d0111, 0xffffffff, 0xffffffff, 0x0000a611, 0xffffffff, 0x114e0111, 0x114f0111, - 0x11500111, 0x11510111, 0x11520111, 0x11530111, 0x11540111, 0xffffffff, 0xffffffff, 0x11570111, - 0x11580111, 0xffffffff, 0xffffffff, 0x11590111, 0x115a0111, 0x115b0111, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x115c0111, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x11380111, 0x11390111, 0xffffffff, 0x11450111, - 0x11250111, 0x11270111, 0x11550111, 0x11560111, 0xffffffff, 0xffffffff, 0x0a0b0111, 0x0a0c0111, - 0x0a0d0111, 0x0a0e0111, 0x0a0f0111, 0x0a100111, 0x0a110111, 0x0a120111, 0x0a130111, 0x0a140111, - 0x11470111, 0x11490111, 0x09e30111, 0x09e40111, 0x0a0c0111, 0x0a0d0111, 0x0a0e0111, 0x0a0f0111, - 0x09c10111, 0x09c20111, 0x030d0111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x0a00 .. 0x0aff */ - 0xffffffff, 0xffffffff, 0x0000ab11, 0xffffffff, 0xffffffff, 0x11620111, 0x11630111, 0x11670111, - 0x11680111, 0x115f0111, 0x11600111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x11690111, - 0x11640111, 0xffffffff, 0xffffffff, 0x11610111, 0x11650111, 0x116c0111, 0x116d0111, 0x116e0111, - 0x116f0111, 0x11700111, 0x11710111, 0x11720111, 0x11730111, 0x11740111, 0x11750111, 0x11760111, - 0x11770111, 0x11780111, 0x11790111, 0x117a0111, 0x117b0111, 0x117c0111, 0x117d0111, 0x117e0111, - 0x117f0111, 0xffffffff, 0x11800111, 0x11810111, 0x11820111, 0x11830111, 0x11840111, 0x11850111, - 0x11860111, 0xffffffff, 0x11870111, 0x11870111, 0xffffffff, 0x11880111, 0x116a0111, 0xffffffff, - 0x116a0111, 0x116b0111, 0xffffffff, 0xffffffff, 0x0000aa11, 0xffffffff, 0x118a0111, 0x118b0111, - 0x118c0111, 0x118d0111, 0x118e0111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x118f0111, - 0x11900111, 0xffffffff, 0xffffffff, 0x11910111, 0x11920111, 0x11930111, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0x116d0111, 0x116e0111, 0x11730111, 0x11890111, 0xffffffff, 0x11810111, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x0a0b0111, 0x0a0c0111, - 0x0a0d0111, 0x0a0e0111, 0x0a0f0111, 0x0a100111, 0x0a110111, 0x0a120111, 0x0a130111, 0x0a140111, - 0x0000ac11, 0x0000ad11, 0x11660111, 0x115e0111, 0x115d0111, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0x0000af11, 0x0000b011, 0x0000b111, 0xffffffff, 0x11950111, 0x11960111, 0x11970111, - 0x11980111, 0x11990111, 0x119a0111, 0x119b0111, 0xffffffff, 0x119d0111, 0xffffffff, 0x119e0111, - 0x119f0111, 0x11a00111, 0xffffffff, 0x11a10111, 0x11a20111, 0x11a30111, 0x11a40111, 0x11a50111, - 0x11a60111, 0x11a70111, 0x11a80111, 0x11a90111, 0x11aa0111, 0x11ab0111, 0x11ac0111, 0x11ad0111, - 0x11ae0111, 0x11af0111, 0x11b00111, 0x11b10111, 0x11b20111, 0x11b30111, 0x11b40111, 0x11b50111, - 0x11b60111, 0xffffffff, 0x11b70111, 0x11b80111, 0x11b90111, 0x11ba0111, 0x11bb0111, 0x11bc0111, - 0x11bd0111, 0xffffffff, 0x11be0111, 0x11bf0111, 0xffffffff, 0x11c00111, 0x11c10111, 0x11c20111, - 0x11c30111, 0x11c40111, 0xffffffff, 0xffffffff, 0x0000ae11, 0x11c50111, 0x11c60111, 0x11c70111, - 0x11c80111, 0x11c90111, 0x11ca0111, 0x11cb0111, 0x11cc0111, 0x11cd0111, 0xffffffff, 0x11ce0111, - 0x11cf0111, 0x11d00111, 0xffffffff, 0x11d10111, 0x11d20111, 0x11d30111, 0xffffffff, 0xffffffff, - 0x11940111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x119c0111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x0a0b0111, 0x0a0c0111, - 0x0a0d0111, 0x0a0e0111, 0x0a0f0111, 0x0a100111, 0x0a110111, 0x0a120111, 0x0a130111, 0x0a140111, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x0b00 .. 0x0bff */ - 0xffffffff, 0x0000b311, 0x0000b411, 0x0000b511, 0xffffffff, 0x11d40111, 0x11d50111, 0x11d60111, - 0x11d70111, 0x11d80111, 0x11d90111, 0x11da0111, 0x11dc0111, 0xffffffff, 0xffffffff, 0x11de0111, - 0x11df0111, 0xffffffff, 0xffffffff, 0x11e00111, 0x11e10111, 0x11e20111, 0x11e30111, 0x11e40111, - 0x11e50111, 0x11e60111, 0x11e70111, 0x11e80111, 0x11e90111, 0x11ea0111, 0x11eb0111, 0x11ec0111, - 0x11ed0111, 0x11ee0111, 0x11ef0111, 0x11f00111, 0x11f10111, 0x11f20111, 0x11f30111, 0x11f40111, - 0x11f50111, 0xffffffff, 0x11f60111, 0x11f70111, 0x11f80111, 0x11f90111, 0x11fa0111, 0x11fb0111, - 0x11fd0111, 0xffffffff, 0x11fe0111, 0x11ff0111, 0xffffffff, 0xffffffff, 0x12000111, 0x12010111, - 0x12020111, 0x12030111, 0xffffffff, 0xffffffff, 0x0000b211, 0x12040111, 0x12050111, 0x12060111, - 0x12070111, 0x12080111, 0x12090111, 0x120a0111, 0xffffffff, 0xffffffff, 0xffffffff, 0x120b0111, - 0x120c0111, 0xffffffff, 0xffffffff, 0x120d0111, 0x120e0111, 0x120f0111, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x12100111, 0x12110111, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x11ee0111, 0x11ef0111, 0xffffffff, 0x11fc0111, - 0x11db0111, 0x11dd0111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x0a0b0111, 0x0a0c0111, - 0x0a0d0111, 0x0a0e0111, 0x0a0f0111, 0x0a100111, 0x0a110111, 0x0a120111, 0x0a130111, 0x0a140111, - 0x030e0111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0x0000b611, 0x12120111, 0xffffffff, 0x12130111, 0x12140111, 0x12150111, - 0x12160111, 0x12170111, 0x12180111, 0xffffffff, 0xffffffff, 0xffffffff, 0x12190111, 0x121a0111, - 0x121b0111, 0xffffffff, 0x121c0111, 0x121d0111, 0x121e0111, 0x121f0111, 0xffffffff, 0xffffffff, - 0xffffffff, 0x12200111, 0x12210111, 0xffffffff, 0x12220111, 0xffffffff, 0x12230111, 0x12240111, - 0xffffffff, 0xffffffff, 0xffffffff, 0x12250111, 0x12260111, 0xffffffff, 0xffffffff, 0xffffffff, - 0x12270111, 0x12280111, 0x12290111, 0xffffffff, 0xffffffff, 0xffffffff, 0x122a0111, 0x122b0111, - 0x122c0111, 0x122d0111, 0x122e0111, 0x122f0111, 0x12300111, 0x12310111, 0xffffffff, 0x12320111, - 0x12330111, 0x12340111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x12350111, 0x12360111, - 0x12370111, 0x12380111, 0x12390111, 0xffffffff, 0xffffffff, 0xffffffff, 0x123a0111, 0x123b0111, - 0x123c0111, 0xffffffff, 0x123d0111, 0x123e0111, 0x123f0111, 0x12400111, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x12410111, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x0a0c0111, - 0x0a0d0111, 0x0a0e0111, 0x0a0f0111, 0x0a100111, 0x0a110111, 0x0a120111, 0x0a130111, 0x0a140111, - 0x09c30111, 0x09c40111, 0x09c50111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x0c00 .. 0x0cff */ - 0xffffffff, 0x0000b711, 0x0000b811, 0x0000b911, 0xffffffff, 0x12420111, 0x12430111, 0x12440111, - 0x12450111, 0x12460111, 0x12470111, 0x12480111, 0x124a0111, 0xffffffff, 0x124c0111, 0x124d0111, - 0x124e0111, 0xffffffff, 0x124f0111, 0x12500111, 0x12510111, 0x12520111, 0x12530111, 0x12540111, - 0x12550111, 0x12560111, 0x12570111, 0x12580111, 0x12590111, 0x125a0111, 0x125b0111, 0x125c0111, - 0x125d0111, 0x125e0111, 0x125f0111, 0x12600111, 0x12610111, 0x12620111, 0x12630111, 0x12640111, - 0x12650111, 0xffffffff, 0x12660111, 0x12670111, 0x12680111, 0x12690111, 0x126a0111, 0x126b0111, - 0x126c0111, 0x126d0111, 0x126e0111, 0x126f0111, 0xffffffff, 0x12700111, 0x12710111, 0x12720111, - 0x12730111, 0x12740111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x12750111, 0x12760111, - 0x12770111, 0x12780111, 0x12790111, 0x127a0111, 0x127b0111, 0xffffffff, 0x127c0111, 0x127d0111, - 0x127e0111, 0xffffffff, 0x127f0111, 0x12800111, 0x12810111, 0x12820111, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x12830111, 0x12840111, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x12490111, 0x124b0111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x0a0b0111, 0x0a0c0111, - 0x0a0d0111, 0x0a0e0111, 0x0a0f0111, 0x0a100111, 0x0a110111, 0x0a120111, 0x0a130111, 0x0a140111, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0x0000ba11, 0x0000bb11, 0xffffffff, 0x12850111, 0x12860111, 0x12870111, - 0x12880111, 0x12890111, 0x128a0111, 0x128b0111, 0x128d0111, 0xffffffff, 0x128f0111, 0x12900111, - 0x12910111, 0xffffffff, 0x12920111, 0x12930111, 0x12940111, 0x12950111, 0x12960111, 0x12970111, - 0x12980111, 0x12990111, 0x129a0111, 0x129b0111, 0x129c0111, 0x129d0111, 0x129e0111, 0x129f0111, - 0x12a00111, 0x12a10111, 0x12a20111, 0x12a30111, 0x12a40111, 0x12a50111, 0x12a60111, 0x12a70111, - 0x12a80111, 0xffffffff, 0x12a90111, 0x12aa0111, 0x12ab0111, 0x12ac0111, 0x12ad0111, 0x12ae0111, - 0x12af0111, 0x12b00111, 0x12b10111, 0x12b70111, 0xffffffff, 0x12b20111, 0x12b30111, 0x12b40111, - 0x12b50111, 0x12b60111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x12b90111, 0x12ba0111, - 0x12bb0111, 0x12bc0111, 0x12bd0111, 0x12be0111, 0x12bf0111, 0xffffffff, 0x12c00111, 0x12c10111, - 0x12c20111, 0xffffffff, 0x12c30111, 0x12c40111, 0x12c50111, 0x12c60111, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x12c70111, 0x12c80111, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x12b80111, 0xffffffff, - 0x128c0111, 0x128e0111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x0a0b0111, 0x0a0c0111, - 0x0a0d0111, 0x0a0e0111, 0x0a0f0111, 0x0a100111, 0x0a110111, 0x0a120111, 0x0a130111, 0x0a140111, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x0d00 .. 0x0dff */ - 0xffffffff, 0xffffffff, 0x0000bc11, 0x0000bd11, 0xffffffff, 0x12c90111, 0x12ca0111, 0x12cb0111, - 0x12cc0111, 0x12cd0111, 0x12ce0111, 0x12cf0111, 0x12d10111, 0xffffffff, 0x12d30111, 0x12d40111, - 0x12d50111, 0xffffffff, 0x12d60111, 0x12d70111, 0x12d80111, 0x12d90111, 0x12da0111, 0x12db0111, - 0x12dc0111, 0x12dd0111, 0x12de0111, 0x12df0111, 0x12e00111, 0x12e10111, 0x12e20111, 0x12e30111, - 0x12e40111, 0x12e50111, 0x12e60111, 0x12e70111, 0x12e80111, 0x12e90111, 0x12ea0111, 0x12eb0111, - 0x12ec0111, 0xffffffff, 0x12ed0111, 0x12ee0111, 0x12ef0111, 0x12f00111, 0x12f10111, 0x12f20111, - 0x12f30111, 0x12f40111, 0x12f50111, 0x12f60111, 0x12f70111, 0x12f80111, 0x12f90111, 0x12fa0111, - 0x12fb0111, 0x12fc0111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x12fd0111, 0x12fe0111, - 0x12ff0111, 0x13000111, 0x13010111, 0x13020111, 0xffffffff, 0xffffffff, 0x13030111, 0x13040111, - 0x13050111, 0xffffffff, 0x13060111, 0x13070111, 0x13080111, 0x13090111, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x130a0111, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x12d00111, 0x12d20111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x0a0b0111, 0x0a0c0111, - 0x0a0d0111, 0x0a0e0111, 0x0a0f0111, 0x0a100111, 0x0a110111, 0x0a120111, 0x0a130111, 0x0a140111, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0x0000be11, 0x0000bf11, 0xffffffff, 0x130b0111, 0x130c0111, 0x130d0111, - 0x130e0111, 0x130f0111, 0x13100111, 0x13110111, 0x13120111, 0x13130111, 0x13140111, 0x13150111, - 0x13160111, 0x13170111, 0x13180111, 0x13190111, 0x131a0111, 0x131b0111, 0x131c0111, 0xffffffff, - 0xffffffff, 0xffffffff, 0x131d0111, 0x131e0111, 0x131f0111, 0x13200111, 0x13210111, 0x13220111, - 0x13230111, 0x13240111, 0x13250111, 0x13260111, 0x13270111, 0x13280111, 0x13290111, 0x132a0111, - 0x132b0111, 0x132c0111, 0x132d0111, 0x132e0111, 0x132f0111, 0x13300111, 0x13310111, 0x13320111, - 0x13330111, 0x13340111, 0xffffffff, 0x13350111, 0x13360111, 0x13370111, 0x13380111, 0x13390111, - 0x133a0111, 0x133b0111, 0x133c0111, 0x133d0111, 0xffffffff, 0x133e0111, 0xffffffff, 0xffffffff, - 0x133f0111, 0x13400111, 0x13410111, 0x13420111, 0x13430111, 0x13440111, 0x13450111, 0xffffffff, - 0xffffffff, 0xffffffff, 0x13460111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x13470111, - 0x13480111, 0x13490111, 0x134a0111, 0x134b0111, 0x134c0111, 0xffffffff, 0x134d0111, 0xffffffff, - 0x134e0111, 0x134f0111, 0x13500111, 0x13510111, 0x13520111, 0x13530111, 0x13540111, 0x13550111, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0x13560111, 0x13570111, 0x02ce0111, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x0e00 .. 0x0eff */ - 0xffffffff, 0x13580111, 0x13590111, 0x135a0111, 0x135b0111, 0x135c0111, 0x135d0111, 0x135e0111, - 0x135f0111, 0x13600111, 0x13610111, 0x13620111, 0x13630111, 0x13640111, 0x13650111, 0x13660111, - 0x13670111, 0x13680111, 0x13690111, 0x136a0111, 0x136b0111, 0x136c0111, 0x136d0111, 0x136e0111, - 0x136f0111, 0x13700111, 0x13710111, 0x13720111, 0x13730111, 0x13740111, 0x13750111, 0x13760111, - 0x13770111, 0x13780111, 0x13790111, 0x137a0111, 0x137b0111, 0x137c0111, 0x137d0111, 0x137e0111, - 0x137f0111, 0x13800111, 0x13810111, 0x13820111, 0x13830111, 0x13840111, 0x13850111, 0x13860111, - 0x13870111, 0x13880111, 0x13890111, 0x138a0111, 0x138b0111, 0x138c0111, 0x138d0111, 0x138e0111, - 0x138f0111, 0x13900111, 0x13910111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x09e50111, - 0x13920111, 0x13930111, 0x13940111, 0x13950111, 0x13960111, 0x13970111, 0x09d50111, 0x0000c011, - 0x0000c111, 0x0000c211, 0x0000c311, 0x0000c411, 0x13980111, 0x13990111, 0x00000001, 0x030f0111, - 0x0a0b0111, 0x0a0c0111, 0x0a0d0111, 0x0a0e0111, 0x0a0f0111, 0x0a100111, 0x0a110111, 0x0a120111, - 0x0a130111, 0x0a140111, 0x02cf0111, 0x02d00111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0x139a0111, 0x139b0111, 0xffffffff, 0x139c0111, 0xffffffff, 0xffffffff, 0x139d0111, - 0x139e0111, 0xffffffff, 0x139f0111, 0xffffffff, 0xffffffff, 0x13a00111, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x13a10111, 0x13a20111, 0x13a30111, 0x13a40111, - 0xffffffff, 0x13a50111, 0x13a60111, 0x13a70111, 0x13a80111, 0x13a90111, 0x13aa0111, 0x13ab0111, - 0xffffffff, 0x13ac0111, 0x13ad0111, 0x13ae0111, 0xffffffff, 0x13af0111, 0xffffffff, 0x13b00111, - 0xffffffff, 0xffffffff, 0x13b10111, 0x13b20111, 0xffffffff, 0x13b30111, 0x13b40111, 0x13b50111, - 0x13b60111, 0x13b70111, 0x13b80111, 0x13b90111, 0x13ba0111, 0x13bb0111, 0x13bc0111, 0x13bd0111, - 0x13be0111, 0x13bf0111, 0xffffffff, 0x13c00111, 0x13c10111, 0x13c20111, 0xffffffff, 0xffffffff, - 0x13c30111, 0x13c40111, 0x13c50111, 0x13c60111, 0x13c70111, 0xffffffff, 0x09d60111, 0xffffffff, - 0x0000c511, 0x0000c611, 0x0000c711, 0x0000c811, 0x13c80111, 0x13c90111, 0xffffffff, 0xffffffff, - 0x0a0b0111, 0x0a0c0111, 0x0a0d0111, 0x0a0e0111, 0x0a0f0111, 0x0a100111, 0x0a110111, 0x0a120111, - 0x0a130111, 0x0a140111, 0xffffffff, 0xffffffff, 0x13b20121, 0x13b20121, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x0f00 .. 0x0fff */ - 0x140e0121, 0x03100111, 0x03110111, 0x03120111, 0x02d10111, 0x02d20111, 0x02d30111, 0x02d40111, - 0x02d50111, 0x02d60111, 0x02d70111, 0x02d80111, 0x02d80121, 0x02d90111, 0x02da0111, 0x02db0111, - 0x02dc0111, 0x02dd0111, 0x02de0111, 0x03130111, 0x02460111, 0x03140111, 0x03150111, 0x03160111, - 0x00000001, 0x00000001, 0x03170111, 0x03180111, 0x03190111, 0x031a0111, 0x031b0111, 0x031c0111, - 0x0a0b0111, 0x0a0c0111, 0x0a0d0111, 0x0a0e0111, 0x0a0f0111, 0x0a100111, 0x0a110111, 0x0a120111, - 0x0a130111, 0x0a140111, 0x0a0c0111, 0x0a0d0111, 0x0a0e0111, 0x0a0f0111, 0x0a100111, 0x0a110111, - 0x0a120111, 0x0a130111, 0x0a140111, 0x0a0b0111, 0x031d0111, 0x00000001, 0x031e0111, 0x00000001, - 0x031f0111, 0x0000c911, 0x02800111, 0x02810111, 0x02820111, 0x02830111, 0x03200111, 0x03210111, - 0x13ca0111, 0x13cc0111, 0x13ce0111, 0x13ce0111, 0x13d00111, 0x13d20111, 0x13d40111, 0x13d60111, - 0xffffffff, 0x13d80111, 0x13da0111, 0x13dc0111, 0x13de0111, 0x13de0111, 0x13e00111, 0x13e20111, - 0x13e40111, 0x13e60111, 0x13e60111, 0x13e80111, 0x13ea0111, 0x13ec0111, 0x13ee0111, 0x13ee0111, - 0x13f00111, 0x13f20111, 0x13f40111, 0x13f60111, 0x13f60111, 0x13f80111, 0x13fa0111, 0x13fc0111, - 0x13fe0111, 0x14000111, 0x14020111, 0x14040111, 0x14060111, 0x14080111, 0x140a0111, 0x140c0111, - 0x140e0111, 0x13ca0111, 0x14020121, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0x14140111, 0x14150111, 0x14160111, 0x14190111, 0x141a0111, 0x141b0111, 0x141c0111, - 0x141d0111, 0x141e0111, 0x141f0111, 0x14200111, 0x14210111, 0x14220111, 0x0000ca11, 0x0000cb11, - 0x14170111, 0x14180111, 0x00000001, 0x00000001, 0x14230111, 0x02df0111, 0x00000001, 0x00000001, - 0x14100111, 0x14110111, 0x14120111, 0x14130111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x13cb0111, 0x13cd0111, 0x13cf0111, 0x13cf0111, 0x13d10111, 0x13d30111, 0x13d50111, 0x13d70111, - 0xffffffff, 0x13d90111, 0x13db0111, 0x13dd0111, 0x13df0111, 0x13df0111, 0x13e10111, 0x13e30111, - 0x13e50111, 0x13e70111, 0x13e70111, 0x13e90111, 0x13eb0111, 0x13ed0111, 0x13ef0111, 0x13ef0111, - 0x13f10111, 0x13f30111, 0x13f50111, 0x13f70111, 0x13f70111, 0x13f90111, 0x13fb0111, 0x13fd0111, - 0x13ff0111, 0x14010111, 0x14030111, 0x14050111, 0x14070111, 0x14090111, 0x140b0111, 0x140d0111, - 0x140f0111, 0x13cb0111, 0x13f90121, 0x14010121, 0x14030121, 0xffffffff, 0x03220111, 0x03230111, - 0x03240111, 0x03250111, 0x03260111, 0x03270111, 0x03280111, 0x03290111, 0x00000001, 0x032a0111, - 0x032b0111, 0x032c0111, 0x032d0111, 0x032e0111, 0x032f0111, 0xffffffff, 0xffffffff, 0x03300111, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x1000 .. 0x10ff */ - 0x14240111, 0x14250111, 0x14260111, 0x14270111, 0x14280111, 0x14290111, 0x142a0111, 0x142b0111, - 0x142c0111, 0x142d0111, 0x142e0111, 0x142f0111, 0x14300111, 0x14310111, 0x14320111, 0x14330111, - 0x14340111, 0x14350111, 0x14360111, 0x14370111, 0x14380111, 0x14390111, 0x143a0111, 0x143b0111, - 0x143c0111, 0x143d0111, 0x143e0111, 0x143f0111, 0x14400111, 0x14410111, 0x14440111, 0x14450111, - 0x14460111, 0x14470111, 0xffffffff, 0x14480111, 0x14490111, 0x144a0111, 0x144b0111, 0x144c0111, - 0xffffffff, 0x144d0111, 0x144e0111, 0xffffffff, 0x14530111, 0x14540111, 0x14550111, 0x14560111, - 0x14570111, 0x14580111, 0x14590111, 0xffffffff, 0xffffffff, 0xffffffff, 0x0000cc11, 0x0000cd11, - 0x0000ce11, 0x145e0111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x0a0b0111, 0x0a0c0111, 0x0a0d0111, 0x0a0e0111, 0x0a0f0111, 0x0a100111, 0x0a110111, 0x0a120111, - 0x0a130111, 0x0a140111, 0x02620111, 0x02630111, 0x02e00111, 0x02e10111, 0x02e20111, 0x02e30111, - 0x14420111, 0x14430111, 0x144f0111, 0x14500111, 0x14510111, 0x14520111, 0x145a0111, 0x145b0111, - 0x145c0111, 0x145d0111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x0e690121, 0x0e6a0121, 0x0e6b0121, 0x0e6c0121, 0x0e6d0121, 0x0e6e0121, 0x0e6f0121, 0x0e710121, - 0x0e720121, 0x0e730121, 0x0e740121, 0x0e750121, 0x0e760121, 0x0e780121, 0x0e790121, 0x0e7a0121, - 0x0e7b0121, 0x0e7c0121, 0x0e7d0121, 0x0e7f0121, 0x0e800121, 0x0e810121, 0x0e820121, 0x0e830121, - 0x0e840121, 0x0e850121, 0x0e860121, 0x0e870121, 0x0e880121, 0x0e890121, 0x0e8a0121, 0x0e8c0121, - 0x0e8d0121, 0x0e700121, 0x0e770121, 0x0e7e0121, 0x0e8b0121, 0x0e8e0121, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x0e690111, 0x0e6a0111, 0x0e6b0111, 0x0e6c0111, 0x0e6d0111, 0x0e6e0111, 0x0e6f0111, 0x0e710111, - 0x0e720111, 0x0e730111, 0x0e740111, 0x0e750111, 0x0e760111, 0x0e780111, 0x0e790111, 0x0e7a0111, - 0x0e7b0111, 0x0e7c0111, 0x0e7d0111, 0x0e7f0111, 0x0e800111, 0x0e810111, 0x0e820111, 0x0e830111, - 0x0e840111, 0x0e850111, 0x0e860111, 0x0e870111, 0x0e880111, 0x0e890111, 0x0e8a0111, 0x0e8c0111, - 0x0e8d0111, 0x0e700111, 0x0e770111, 0x0e7e0111, 0x0e8b0111, 0x0e8e0111, 0x0e8f0111, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0x02670111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x1100 .. 0x11ff */ - 0x18310111, 0x18320111, 0x18330111, 0x18340111, 0x18350111, 0x18360111, 0x18370111, 0x18380111, - 0x18390111, 0x183a0111, 0x183b0111, 0x183c0111, 0x183d0111, 0x183e0111, 0x183f0111, 0x18400111, - 0x18410111, 0x18420111, 0x18430111, 0x18440111, 0x18450111, 0x18460111, 0x18470111, 0x18480111, - 0x18490111, 0x184a0111, 0x184b0111, 0x184c0111, 0x184d0111, 0x184e0111, 0x184f0111, 0x18500111, - 0x18510111, 0x18520111, 0x18530111, 0x18540111, 0x18550111, 0x18560111, 0x18570111, 0x18580111, - 0x18590111, 0x185a0111, 0x185b0111, 0x185c0111, 0x185d0111, 0x185e0111, 0x185f0111, 0x18600111, - 0x18610111, 0x18620111, 0x18630111, 0x18640111, 0x18650111, 0x18660111, 0x18670111, 0x18680111, - 0x18690111, 0x186a0111, 0x186b0111, 0x186c0111, 0x186d0111, 0x186e0111, 0x186f0111, 0x18700111, - 0x18710111, 0x18720111, 0x18730111, 0x18740111, 0x18750111, 0x18760111, 0x18770111, 0x18780111, - 0x18790111, 0x187a0111, 0x187b0111, 0x187c0111, 0x187d0111, 0x187e0111, 0x187f0111, 0x18800111, - 0x18810111, 0x18820111, 0x18830111, 0x18840111, 0x18850111, 0x18860111, 0x18870111, 0x18880111, - 0x18890111, 0x188a0111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x188b0111, - 0x188c0111, 0x188d0111, 0x188e0111, 0x188f0111, 0x18900111, 0x18910111, 0x18920111, 0x18930111, - 0x18940111, 0x18950111, 0x18960111, 0x18970111, 0x18980111, 0x18990111, 0x189a0111, 0x189b0111, - 0x189c0111, 0x189d0111, 0x189e0111, 0x189f0111, 0x18a00111, 0x18a10111, 0x18a20111, 0x18a30111, - 0x18a40111, 0x18a50111, 0x18a60111, 0x18a70111, 0x18a80111, 0x18a90111, 0x18aa0111, 0x18ab0111, - 0x18ac0111, 0x18ad0111, 0x18ae0111, 0x18af0111, 0x18b00111, 0x18b10111, 0x18b20111, 0x18b30111, - 0x18b40111, 0x18b50111, 0x18b60111, 0x18b70111, 0x18b80111, 0x18b90111, 0x18ba0111, 0x18bb0111, - 0x18bc0111, 0x18bd0111, 0x18be0111, 0x18bf0111, 0x18c00111, 0x18c10111, 0x18c20111, 0x18c30111, - 0x18c40111, 0x18c50111, 0x18c60111, 0x18c70111, 0x18c80111, 0x18c90111, 0x18ca0111, 0x18cb0111, - 0x18cc0111, 0x18cd0111, 0x18ce0111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x18cf0111, 0x18d00111, 0x18d10111, 0x18d20111, 0x18d30111, 0x18d40111, 0x18d50111, 0x18d60111, - 0x18d70111, 0x18d80111, 0x18d90111, 0x18da0111, 0x18db0111, 0x18dc0111, 0x18dd0111, 0x18de0111, - 0x18df0111, 0x18e00111, 0x18e10111, 0x18e20111, 0x18e30111, 0x18e40111, 0x18e50111, 0x18e60111, - 0x18e70111, 0x18e80111, 0x18e90111, 0x18ea0111, 0x18eb0111, 0x18ec0111, 0x18ed0111, 0x18ee0111, - 0x18ef0111, 0x18f00111, 0x18f10111, 0x18f20111, 0x18f30111, 0x18f40111, 0x18f50111, 0x18f60111, - 0x18f70111, 0x18f80111, 0x18f90111, 0x18fa0111, 0x18fb0111, 0x18fc0111, 0x18fd0111, 0x18fe0111, - 0x18ff0111, 0x19000111, 0x19010111, 0x19020111, 0x19030111, 0x19040111, 0x19050111, 0x19060111, - 0x19070111, 0x19080111, 0x19090111, 0x190a0111, 0x190b0111, 0x190c0111, 0x190d0111, 0x190e0111, - 0x190f0111, 0x19100111, 0x19110111, 0x19120111, 0x19130111, 0x19140111, 0x19150111, 0x19160111, - 0x19170111, 0x19180111, 0x19190111, 0x191a0111, 0x191b0111, 0x191c0111, 0x191d0111, 0x191e0111, - 0x191f0111, 0x19200111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x1200 .. 0x12ff */ - 0x0f990111, 0x0f9a0111, 0x0f9b0111, 0x0f9c0111, 0x0f9d0111, 0x0f9e0111, 0x0f9f0111, 0xffffffff, - 0x0fa00111, 0x0fa10111, 0x0fa20111, 0x0fa30111, 0x0fa40111, 0x0fa50111, 0x0fa60111, 0x0fa70111, - 0x0fa80111, 0x0fa90111, 0x0faa0111, 0x0fab0111, 0x0fac0111, 0x0fad0111, 0x0fae0111, 0x0faf0111, - 0x0fb00111, 0x0fb10111, 0x0fb20111, 0x0fb30111, 0x0fb40111, 0x0fb50111, 0x0fb60111, 0x0fb70111, - 0x0fb80111, 0x0fb90111, 0x0fba0111, 0x0fbb0111, 0x0fbc0111, 0x0fbd0111, 0x0fbe0111, 0x0fbf0111, - 0x0fc00111, 0x0fc10111, 0x0fc20111, 0x0fc30111, 0x0fc40111, 0x0fc50111, 0x0fc60111, 0x0fc70111, - 0x0fc80111, 0x0fc90111, 0x0fca0111, 0x0fcb0111, 0x0fcc0111, 0x0fcd0111, 0x0fce0111, 0x0fcf0111, - 0x0fd00111, 0x0fd10111, 0x0fd20111, 0x0fd30111, 0x0fd40111, 0x0fd50111, 0x0fd60111, 0x0fd70111, - 0x0fd80111, 0x0fd90111, 0x0fda0111, 0x0fdb0111, 0x0fdc0111, 0x0fdd0111, 0x0fde0111, 0xffffffff, - 0x0fdf0111, 0xffffffff, 0x0fe00111, 0x0fe10111, 0x0fe20111, 0x0fe30111, 0xffffffff, 0xffffffff, - 0x0fe40111, 0x0fe50111, 0x0fe60111, 0x0fe70111, 0x0fe80111, 0x0fe90111, 0x0fea0111, 0xffffffff, - 0x0feb0111, 0xffffffff, 0x0fec0111, 0x0fed0111, 0x0fee0111, 0x0fef0111, 0xffffffff, 0xffffffff, - 0x0ff00111, 0x0ff10111, 0x0ff20111, 0x0ff30111, 0x0ff40111, 0x0ff50111, 0x0ff60111, 0x0ff70111, - 0x0ff80111, 0x0ff90111, 0x0ffa0111, 0x0ffb0111, 0x0ffc0111, 0x0ffd0111, 0x0ffe0111, 0x0fff0111, - 0x10000111, 0x10010111, 0x10020111, 0x10030111, 0x10040111, 0x10050111, 0x10060111, 0x10070111, - 0x10080111, 0x10090111, 0x100a0111, 0x100b0111, 0x100c0111, 0x100d0111, 0x100e0111, 0x100f0111, - 0x10100111, 0x10110111, 0x10120111, 0x10130111, 0x10140111, 0x10150111, 0x10160111, 0xffffffff, - 0x10170111, 0xffffffff, 0x10180111, 0x10190111, 0x101a0111, 0x101b0111, 0xffffffff, 0xffffffff, - 0x101c0111, 0x101d0111, 0x101e0111, 0x101f0111, 0x10200111, 0x10210111, 0x10220111, 0x10230111, - 0x10240111, 0x10250111, 0x10260111, 0x10270111, 0x10280111, 0x10290111, 0x102a0111, 0x102b0111, - 0x102c0111, 0x102d0111, 0x102e0111, 0x102f0111, 0x10300111, 0x10310111, 0x10320111, 0x10330111, - 0x10340111, 0x10350111, 0x10360111, 0x10370111, 0x10380111, 0x10390111, 0x103a0111, 0xffffffff, - 0x103b0111, 0xffffffff, 0x103c0111, 0x103d0111, 0x103e0111, 0x103f0111, 0xffffffff, 0xffffffff, - 0x10400111, 0x10410111, 0x10420111, 0x10430111, 0x10440111, 0x10450111, 0x10460111, 0xffffffff, - 0x10470111, 0xffffffff, 0x10480111, 0x10490111, 0x104a0111, 0x104b0111, 0xffffffff, 0xffffffff, - 0x104c0111, 0x104d0111, 0x104e0111, 0x104f0111, 0x10500111, 0x10510111, 0x10520111, 0xffffffff, - 0x10530111, 0x10540111, 0x10550111, 0x10560111, 0x10570111, 0x10580111, 0x10590111, 0xffffffff, - 0x105a0111, 0x105b0111, 0x105c0111, 0x105d0111, 0x105e0111, 0x105f0111, 0x10600111, 0x10610111, - 0x10620111, 0x10630111, 0x10640111, 0x10650111, 0x10660111, 0x10670111, 0x10680111, 0x10690111, - 0x106a0111, 0x106b0111, 0x106c0111, 0x106d0111, 0x106e0111, 0x106f0111, 0x10700111, 0xffffffff, - 0x10710111, 0x10720111, 0x10730111, 0x10740111, 0x10750111, 0x10760111, 0x10770111, 0x10780111, - 0x10790111, 0x107a0111, 0x107b0111, 0x107c0111, 0x107d0111, 0x107e0111, 0x107f0111, 0x10800111, - /* 0x1300 .. 0x13ff */ - 0x10810111, 0x10820111, 0x10830111, 0x10840111, 0x10850111, 0x10860111, 0x10870111, 0x10880111, - 0x10890111, 0x108a0111, 0x108b0111, 0x108c0111, 0x108d0111, 0x108e0111, 0x108f0111, 0xffffffff, - 0x10900111, 0xffffffff, 0x10910111, 0x10920111, 0x10930111, 0x10940111, 0xffffffff, 0xffffffff, - 0x10950111, 0x10960111, 0x10970111, 0x10980111, 0x10990111, 0x109a0111, 0x109b0111, 0xffffffff, - 0x109c0111, 0x109d0111, 0x109e0111, 0x109f0111, 0x10a00111, 0x10a10111, 0x10a20111, 0x10a30111, - 0x10a40111, 0x10a50111, 0x10a60111, 0x10a70111, 0x10a80111, 0x10a90111, 0x10aa0111, 0x10ab0111, - 0x10ac0111, 0x10ad0111, 0x10ae0111, 0x10af0111, 0x10b00111, 0x10b10111, 0x10b20111, 0x10b30111, - 0x10b40111, 0x10b50111, 0x10b60111, 0x10b70111, 0x10b80111, 0x10b90111, 0x10ba0111, 0x10bb0111, - 0x10bc0111, 0x10bd0111, 0x10be0111, 0x10bf0111, 0x10c00111, 0x10c10111, 0x10c20111, 0xffffffff, - 0x10c30111, 0x10c40111, 0x10c50111, 0x10c60111, 0x10c70111, 0x10c80111, 0x10c90111, 0x10ca0111, - 0x10cb0111, 0x10cc0111, 0x10cd0111, 0x10ce0111, 0x10cf0111, 0x10d00111, 0x10d10111, 0x10d20111, - 0x10d30111, 0x10d40111, 0x10d50111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0x023f0111, 0x025a0111, 0x02400111, 0x02410111, 0x02420111, 0x02430111, 0x02530111, - 0x02680111, 0x0a0c0111, 0x0a0d0111, 0x0a0e0111, 0x0a0f0111, 0x0a100111, 0x0a110111, 0x0a120111, - 0x0a130111, 0x0a140111, 0x09c60111, 0x09c70111, 0x09c80111, 0x09c90111, 0x09ca0111, 0x09cb0111, - 0x09cc0111, 0x09cd0111, 0x09ce0111, 0x09cf0111, 0x09d00111, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x15280111, 0x15290111, 0x152a0111, 0x152b0111, 0x152c0111, 0x152d0111, 0x152e0111, 0x152f0111, - 0x15300111, 0x15310111, 0x15320111, 0x15330111, 0x15340111, 0x15350111, 0x15360111, 0x15370111, - 0x15380111, 0x15390111, 0x153a0111, 0x153b0111, 0x153c0111, 0x153d0111, 0x153e0111, 0x153f0111, - 0x15400111, 0x15410111, 0x15420111, 0x15430111, 0x15440111, 0x15450111, 0x15460111, 0x15470111, - 0x15480111, 0x15490111, 0x154a0111, 0x154b0111, 0x154c0111, 0x154d0111, 0x154e0111, 0x154f0111, - 0x15500111, 0x15510111, 0x15520111, 0x15530111, 0x15540111, 0x15550111, 0x15560111, 0x15570111, - 0x15580111, 0x15590111, 0x155a0111, 0x155b0111, 0x155c0111, 0x155d0111, 0x155e0111, 0x155f0111, - 0x15600111, 0x15610111, 0x15620111, 0x15630111, 0x15640111, 0x15650111, 0x15660111, 0x15670111, - 0x15680111, 0x15690111, 0x156a0111, 0x156b0111, 0x156c0111, 0x156d0111, 0x156e0111, 0x156f0111, - 0x15700111, 0x15710111, 0x15720111, 0x15730111, 0x15740111, 0x15750111, 0x15760111, 0x15770111, - 0x15780111, 0x15790111, 0x157a0111, 0x157b0111, 0x157c0111, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x1400 .. 0x14ff */ - 0xffffffff, 0x157d0111, 0x157e0111, 0x157f0111, 0x15800111, 0x15810111, 0x15820111, 0x15830111, - 0x15840111, 0x15850111, 0x15860111, 0x15870111, 0x15880111, 0x15890111, 0x158a0111, 0x158b0111, - 0x158c0111, 0x158d0111, 0x158e0111, 0x158f0111, 0x15900111, 0x15910111, 0x15920111, 0x15930111, - 0x15940111, 0x15950111, 0x15960111, 0x15970111, 0x15980111, 0x15990111, 0x159a0111, 0x159b0111, - 0x159c0111, 0x159d0111, 0x159e0111, 0x159f0111, 0x15a00111, 0x15a10111, 0x15a20111, 0x15a30111, - 0x15a40111, 0x15a50111, 0x15a60111, 0x15a70111, 0x15a80111, 0x15a90111, 0x15aa0111, 0x15ab0111, - 0x15ac0111, 0x15ad0111, 0x15ae0111, 0x15af0111, 0x15b00111, 0x15b10111, 0x15b20111, 0x15b30111, - 0x15b40111, 0x15b50111, 0x15b60111, 0x15b70111, 0x15b80111, 0x15b90111, 0x15ba0111, 0x15bb0111, - 0x15bc0111, 0x15bd0111, 0x15be0111, 0x15bf0111, 0x15c00111, 0x15c10111, 0x15c20111, 0x15c30111, - 0x15c40111, 0x15c50111, 0x15c60111, 0x15c70111, 0x15c80111, 0x15c90111, 0x15ca0111, 0x15cb0111, - 0x15cc0111, 0x15cd0111, 0x15ce0111, 0x15cf0111, 0x15d00111, 0x15d10111, 0x15d20111, 0x15d30111, - 0x15d40111, 0x15d50111, 0x15d60111, 0x15d70111, 0x15d80111, 0x15d90111, 0x15da0111, 0x15db0111, - 0x15dc0111, 0x15dd0111, 0x15de0111, 0x15df0111, 0x15e00111, 0x15e10111, 0x15e20111, 0x15e30111, - 0x15e40111, 0x15e50111, 0x15e60111, 0x15e70111, 0x15e80111, 0x15e90111, 0x15ea0111, 0x15eb0111, - 0x15ec0111, 0x15ed0111, 0x15ee0111, 0x15ef0111, 0x15f00111, 0x15f10111, 0x15f20111, 0x15f30111, - 0x15f40111, 0x15f50111, 0x15f60111, 0x15f70111, 0x15f80111, 0x15f90111, 0x15fa0111, 0x15fb0111, - 0x15fc0111, 0x15fd0111, 0x15fe0111, 0x15ff0111, 0x16000111, 0x16010111, 0x16020111, 0x16030111, - 0x16040111, 0x16050111, 0x16060111, 0x16070111, 0x16080111, 0x16090111, 0x160a0111, 0x160b0111, - 0x160c0111, 0x160d0111, 0x160e0111, 0x160f0111, 0x16100111, 0x16110111, 0x16120111, 0x16130111, - 0x16140111, 0x16150111, 0x16160111, 0x16170111, 0x16180111, 0x16190111, 0x161a0111, 0x161b0111, - 0x161c0111, 0x161d0111, 0x161e0111, 0x161f0111, 0x16200111, 0x16210111, 0x16220111, 0x16230111, - 0x16240111, 0x16250111, 0x16260111, 0x16270111, 0x16280111, 0x16290111, 0x162a0111, 0x162b0111, - 0x162c0111, 0x162d0111, 0x162e0111, 0x162f0111, 0x16300111, 0x16310111, 0x16320111, 0x16330111, - 0x16340111, 0x16350111, 0x16360111, 0x16370111, 0x16380111, 0x16390111, 0x163a0111, 0x163b0111, - 0x163c0111, 0x163d0111, 0x163e0111, 0x163f0111, 0x16400111, 0x16410111, 0x16420111, 0x16430111, - 0x16440111, 0x16450111, 0x16460111, 0x16470111, 0x16480111, 0x16490111, 0x164a0111, 0x164b0111, - 0x164c0111, 0x164d0111, 0x164e0111, 0x164f0111, 0x16500111, 0x16510111, 0x16520111, 0x16530111, - 0x16540111, 0x16550111, 0x16560111, 0x16570111, 0x16580111, 0x16590111, 0x165a0111, 0x165b0111, - 0x165c0111, 0x165d0111, 0x165e0111, 0x165f0111, 0x16600111, 0x16610111, 0x16620111, 0x16630111, - 0x16640111, 0x16650111, 0x16660111, 0x16670111, 0x16680111, 0x16690111, 0x166a0111, 0x166b0111, - 0x166c0111, 0x166d0111, 0x166e0111, 0x166f0111, 0x16700111, 0x16710111, 0x16720111, 0x16730111, - 0x16740111, 0x16750111, 0x16760111, 0x16770111, 0x16780111, 0x16790111, 0x167a0111, 0x167b0111, - /* 0x1500 .. 0x15ff */ - 0x167c0111, 0x167d0111, 0x167e0111, 0x167f0111, 0x16800111, 0x16810111, 0x16820111, 0x16830111, - 0x16840111, 0x16850111, 0x16860111, 0x16870111, 0x16880111, 0x16890111, 0x168a0111, 0x168b0111, - 0x168c0111, 0x168d0111, 0x168e0111, 0x168f0111, 0x16900111, 0x16910111, 0x16920111, 0x16930111, - 0x16940111, 0x16950111, 0x16960111, 0x16970111, 0x16980111, 0x16990111, 0x169a0111, 0x169b0111, - 0x169c0111, 0x169d0111, 0x169e0111, 0x169f0111, 0x16a00111, 0x16a10111, 0x16a20111, 0x16a30111, - 0x16a40111, 0x16a50111, 0x16a60111, 0x16a70111, 0x16a80111, 0x16a90111, 0x16aa0111, 0x16ab0111, - 0x16ac0111, 0x16ad0111, 0x16ae0111, 0x16af0111, 0x16b00111, 0x16b10111, 0x16b20111, 0x16b30111, - 0x16b40111, 0x16b50111, 0x16b60111, 0x16b70111, 0x16b80111, 0x16b90111, 0x16ba0111, 0x16bb0111, - 0x16bc0111, 0x16bd0111, 0x16be0111, 0x16bf0111, 0x16c00111, 0x16c10111, 0x16c20111, 0x16c30111, - 0x16c40111, 0x16c50111, 0x16c60111, 0x16c70111, 0x16c80111, 0x16c90111, 0x16ca0111, 0x16cb0111, - 0x16cc0111, 0x16cd0111, 0x16ce0111, 0x16cf0111, 0x16d00111, 0x16d10111, 0x16d20111, 0x16d30111, - 0x16d40111, 0x16d50111, 0x16d60111, 0x16d70111, 0x16d80111, 0x16d90111, 0x16da0111, 0x16db0111, - 0x16dc0111, 0x16dd0111, 0x16de0111, 0x16df0111, 0x16e00111, 0x16e10111, 0x16e20111, 0x16e30111, - 0x16e40111, 0x16e50111, 0x16e60111, 0x16e70111, 0x16e80111, 0x16e90111, 0x16ea0111, 0x16eb0111, - 0x16ec0111, 0x16ed0111, 0x16ee0111, 0x16ef0111, 0x16f00111, 0x16f10111, 0x16f20111, 0x16f30111, - 0x16f40111, 0x16f50111, 0x16f60111, 0x16f70111, 0x172a0111, 0x16f80111, 0x16fa0111, 0x16fb0111, - 0x16fc0111, 0x16fd0111, 0x16fe0111, 0x16ff0111, 0x17000111, 0x17010111, 0x17020111, 0x17030111, - 0x17040111, 0x17050111, 0x17060111, 0x17070111, 0x17080111, 0x17090111, 0x170b0111, 0x170c0111, - 0x170d0111, 0x170e0111, 0x170f0111, 0x17100111, 0x17110111, 0x17120111, 0x17190111, 0x171a0111, - 0x171b0111, 0x171c0111, 0x171d0111, 0x171e0111, 0x171f0111, 0x17200111, 0x17210111, 0x17220111, - 0x17230111, 0x17240111, 0x17250111, 0x17260111, 0x17270111, 0x17280111, 0x17290111, 0x172b0111, - 0x172c0111, 0x172d0111, 0x172e0111, 0x172f0111, 0x17300111, 0x17310111, 0x17320111, 0x17330111, - 0x17340111, 0x17350111, 0x17360111, 0x17370111, 0x17380111, 0x17390111, 0x173a0111, 0x173b0111, - 0x173c0111, 0x173d0111, 0x173e0111, 0x173f0111, 0x17400111, 0x17410111, 0x17420111, 0x17430111, - 0x17440111, 0x17450111, 0x17460111, 0x17470111, 0x17480111, 0x17490111, 0x174a0111, 0x174b0111, - 0x174c0111, 0x174d0111, 0x174e0111, 0x174f0111, 0x17500111, 0x17510111, 0x17520111, 0x17530111, - 0x17540111, 0x17550111, 0x17560111, 0x17570111, 0x17580111, 0x17590111, 0x175a0111, 0x175b0111, - 0x175c0111, 0x175d0111, 0x175e0111, 0x175f0111, 0x17600111, 0x17610111, 0x17620111, 0x17630111, - 0x17640111, 0x17650111, 0x17660111, 0x17670111, 0x17680111, 0x17690111, 0x176a0111, 0x176b0111, - 0x176c0111, 0x176d0111, 0x176e0111, 0x176f0111, 0x17700111, 0x17710111, 0x17720111, 0x17730111, - 0x17740111, 0x17750111, 0x17760111, 0x17770111, 0x17780111, 0x17790111, 0x177a0111, 0x177b0111, - 0x177c0111, 0x177d0111, 0x177e0111, 0x177f0111, 0x17800111, 0x17810111, 0x17820111, 0x17830111, - /* 0x1600 .. 0x16ff */ - 0x17840111, 0x17850111, 0x17860111, 0x17870111, 0x17880111, 0x17890111, 0x178a0111, 0x178b0111, - 0x178c0111, 0x178d0111, 0x178e0111, 0x178f0111, 0x17900111, 0x17910111, 0x17920111, 0x17930111, - 0x17940111, 0x17950111, 0x17960111, 0x17970111, 0x17980111, 0x17990111, 0x179a0111, 0x179b0111, - 0x179c0111, 0x179d0111, 0x179e0111, 0x179f0111, 0x17a00111, 0x17a10111, 0x17a20111, 0x17a30111, - 0x17a40111, 0x17a50111, 0x17a60111, 0x17a70111, 0x17a80111, 0x17a90111, 0x17aa0111, 0x17ab0111, - 0x17ac0111, 0x17ad0111, 0x17ae0111, 0x17af0111, 0x17b00111, 0x17b10111, 0x17b20111, 0x17b30111, - 0x17b40111, 0x17b50111, 0x17b60111, 0x17b70111, 0x17b80111, 0x17b90111, 0x17ba0111, 0x17bb0111, - 0x17bc0111, 0x17bd0111, 0x17be0111, 0x17bf0111, 0x17c00111, 0x17c10111, 0x17c20111, 0x17c30111, - 0x17c40111, 0x17c50111, 0x17c60111, 0x17c70111, 0x17c80111, 0x17c90111, 0x17ca0111, 0x17cb0111, - 0x17cc0111, 0x17cd0111, 0x17ce0111, 0x17cf0111, 0x17d00111, 0x17d10111, 0x17d20111, 0x17d30111, - 0x17d40111, 0x17d50111, 0x17d60111, 0x17d70111, 0x17d80111, 0x17d90111, 0x17da0111, 0x17db0111, - 0x17dc0111, 0x17dd0111, 0x17de0111, 0x17df0111, 0x17e00111, 0x17e10111, 0x17e20111, 0x17e30111, - 0x17e40111, 0x17e50111, 0x17e60111, 0x17e70111, 0x17e80111, 0x17e90111, 0x17ea0111, 0x17eb0111, - 0x17ec0111, 0x17ed0111, 0x17ee0111, 0x17ef0111, 0x17f00111, 0x03310111, 0x025d0111, 0x16f90111, - 0x170a0111, 0x17130111, 0x17140111, 0x17150111, 0x17160111, 0x17170111, 0x17180111, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x020a0111, 0x17f10111, 0x17f20111, 0x17f30111, 0x17f40111, 0x17f50111, 0x17f60111, 0x17f70111, - 0x17f80111, 0x17f90111, 0x17fa0111, 0x17fb0111, 0x17fc0111, 0x17fd0111, 0x17fe0111, 0x17ff0111, - 0x18000111, 0x18010111, 0x18020111, 0x18030111, 0x18040111, 0x18050111, 0x18060111, 0x18070111, - 0x18080111, 0x18090111, 0x180a0111, 0x02840111, 0x02850111, 0xffffffff, 0xffffffff, 0xffffffff, - 0x180b0111, 0x180b0121, 0x180c0111, 0x18280111, 0x180c0121, 0x180c0121, 0x180d0111, 0x180d0121, - 0x180e0111, 0x180e0121, 0x18260111, 0x18270111, 0x180e0121, 0x180e0121, 0x180e0121, 0x180f0111, - 0x18100111, 0x18110111, 0x18120111, 0x18120121, 0x18120121, 0x18120121, 0x18120121, 0x18130111, - 0x182b0111, 0x18140111, 0x18150111, 0x18150121, 0x18150121, 0x18150121, 0x18160111, 0x18160121, - 0x18160121, 0x18170111, 0x18170121, 0x18180111, 0x18180121, 0x18190111, 0x18190121, 0x181a0111, - 0x181b0111, 0x181c0111, 0x181d0111, 0x181d0121, 0x181d0121, 0x181d0121, 0x181d0121, 0x181e0111, - 0x181e0121, 0x181e0121, 0x181f0111, 0x181f0121, 0x181f0121, 0x181b0121, 0x18200111, 0x18210111, - 0x18210121, 0x18210121, 0x18220111, 0x18220121, 0x18230111, 0x18230121, 0x18240111, 0x18250111, - 0x18290111, 0x182d0111, 0x182e0111, 0x182a0111, 0x182c0111, 0x182f0111, 0x18300111, 0x18300121, - 0x18300121, 0x18140121, 0x181d0121, 0x02480111, 0x02490111, 0x024a0111, 0x18190121, 0x18210121, - 0x180d0121, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x1700 .. 0x17ff */ - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x145f0111, 0x14600111, 0x14610111, 0x14620111, 0x14630111, 0x14640111, 0x14650111, 0x14660111, - 0x14670111, 0x14680111, 0x14690111, 0x146a0111, 0x146b0111, 0x146c0111, 0x146d0111, 0x146e0111, - 0x146f0111, 0x14700111, 0x14710111, 0x14720111, 0x14730111, 0x14740111, 0x14750111, 0x14760111, - 0x14770111, 0x14780111, 0x14790111, 0x147a0111, 0x147b0111, 0x147c0111, 0x147d0111, 0x147e0111, - 0x147f0111, 0x14800111, 0x14810111, 0x14820111, 0x14830111, 0x14840111, 0x14850111, 0x14860111, - 0x14870111, 0x14880111, 0x14890111, 0x148a0111, 0x148b0111, 0x148c0111, 0x148d0111, 0x148e0111, - 0x148f0111, 0x14900111, 0x14910111, 0x14920111, 0x14930111, 0x14940111, 0x14950111, 0x14960111, - 0x14970111, 0x14980111, 0x14990111, 0x149a0111, 0x149b0111, 0x149c0111, 0x149d0111, 0x149e0111, - 0x149f0111, 0x14a00111, 0x14a10111, 0x14a20111, 0x14a30111, 0x14a40111, 0x0000cf11, 0x0000d011, - 0x0000d111, 0x0000d211, 0x0000d311, 0x0000d411, 0x0000d511, 0x0000d611, 0x0000d711, 0x0000d811, - 0x0000d911, 0x0000da11, 0x14a50111, 0x0000db11, 0x02640111, 0x02650111, 0x02470111, 0x02e40111, - 0x02e50111, 0x02e60111, 0x02e70111, 0x09e60111, 0x02e80111, 0xffffffff, 0xffffffff, 0xffffffff, - 0x0a0b0111, 0x0a0c0111, 0x0a0d0111, 0x0a0e0111, 0x0a0f0111, 0x0a100111, 0x0a110111, 0x0a120111, - 0x0a130111, 0x0a140111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x1800 .. 0x18ff */ - 0x02cb0111, 0x02560111, 0x02320111, 0x025b0111, 0x02440111, 0x02450111, 0x02230111, 0x02240111, - 0x02330111, 0x025c0111, 0x02cc0111, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, - 0x0a0b0111, 0x0a0c0111, 0x0a0d0111, 0x0a0e0111, 0x0a0f0111, 0x0a100111, 0x0a110111, 0x0a120111, - 0x0a130111, 0x0a140111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x14ae0111, 0x14b00111, 0x14b30111, 0x14b90111, 0x14bb0111, 0x14be0111, 0x14c00111, 0x14c30111, - 0x14c40111, 0x14c50111, 0x14ca0111, 0x14cc0111, 0x14cf0111, 0x14d10111, 0x14d60111, 0x14d80111, - 0x14d90111, 0x14da0111, 0x14e10111, 0x14e40111, 0x14e70111, 0x14ec0111, 0x14f00111, 0x14f30111, - 0x14f50111, 0x14f70111, 0x14fa0111, 0x14ff0111, 0x15000111, 0x15030111, 0x15070111, 0x150a0111, - 0x150b0111, 0x150c0111, 0x150d0111, 0x14ad0111, 0x14b10111, 0x14b40111, 0x14ba0111, 0x14bc0111, - 0x14bf0111, 0x14c10111, 0x14c60111, 0x14cb0111, 0x14cd0111, 0x14d00111, 0x14d20111, 0x14d70111, - 0x14e20111, 0x14e50111, 0x14e80111, 0x14ed0111, 0x15010111, 0x14f10111, 0x14f60111, 0x14fb0111, - 0x15050111, 0x15080111, 0x150e0111, 0x150f0111, 0x14ea0111, 0x14b20111, 0x14b50111, 0x14b80111, - 0x14c20111, 0x14bd0111, 0x14c70111, 0x14fc0111, 0x14d30111, 0x14d50111, 0x14ce0111, 0x14db0111, - 0x14e30111, 0x14e60111, 0x14ee0111, 0x14f80111, 0x15060111, 0x15090111, 0x15020111, 0x15040111, - 0x15100111, 0x14e90111, 0x14f20111, 0x14b60111, 0x14fd0111, 0x14f40111, 0x14f90111, 0x14ef0111, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x14a60111, 0x14a70111, 0x14a80111, 0x14a90111, 0x14aa0111, 0x14ab0111, 0x14ac0111, 0x14af0111, - 0x14b70111, 0x14fe0111, 0x14c80111, 0x14eb0111, 0x15110111, 0x15130111, 0x15140111, 0x15160111, - 0x15170111, 0x151a0111, 0x151c0111, 0x151d0111, 0x151f0111, 0x15210111, 0x15230111, 0x15240111, - 0x15180111, 0x15220111, 0x14d40111, 0x14c90111, 0x14dc0111, 0x14dd0111, 0x15120111, 0x15150111, - 0x15190111, 0x151b0111, 0x14de0111, 0x15200111, 0x14df0111, 0x14e00111, 0x15250111, 0x15260111, - 0x151e0111, 0x15270111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x1e00 .. 0x1eff */ - 0x0a150151, 0x0a150111, 0x0a290141, 0x0a290111, 0x0a290141, 0x0a290111, 0x0a290141, 0x0a290111, - 0x0a3d0151, 0x0a3d0111, 0x0a490151, 0x0a490111, 0x0a490151, 0x0a490111, 0x0a490151, 0x0a490111, - 0x0a490151, 0x0a490111, 0x0a490151, 0x0a490111, 0x0a650151, 0x0a650111, 0x0a650151, 0x0a650111, - 0x0a650151, 0x0a650111, 0x0a650151, 0x0a650111, 0x0a650151, 0x0a650111, 0x0a910151, 0x0a910111, - 0x0a990151, 0x0a990111, 0x0ab90151, 0x0ab90111, 0x0ab90151, 0x0ab90111, 0x0ab90151, 0x0ab90111, - 0x0ab90151, 0x0ab90111, 0x0ab90151, 0x0ab90111, 0x0ad30161, 0x0ad30111, 0x0ad30161, 0x0ad30111, - 0x0af70141, 0x0af70111, 0x0af70141, 0x0af70111, 0x0af70141, 0x0af70111, 0x0b030161, 0x0b030111, - 0x0b030161, 0x0b030111, 0x0b030161, 0x0b030111, 0x0b030161, 0x0b030111, 0x0b2b0151, 0x0b2b0111, - 0x0b2b0151, 0x0b2b0111, 0x0b2b0151, 0x0b2b0111, 0x0b330151, 0x0b330111, 0x0b330151, 0x0b330111, - 0x0b330151, 0x0b330111, 0x0b330151, 0x0b330111, 0x0b4b0161, 0x0b4b0111, 0x0b4b0161, 0x0b4b0111, - 0x0b4b0161, 0x0b4b0111, 0x0b4b0161, 0x0b4b0111, 0x0b670141, 0x0b670111, 0x0b670141, 0x0b670111, - 0x0b7f0141, 0x0b7f0111, 0x0b7f0141, 0x0b7f0111, 0x0b7f0141, 0x0b7f0111, 0x0b7f0141, 0x0b7f0111, - 0x0ba70151, 0x0ba70111, 0x0ba70151, 0x0ba70111, 0x0ba70151, 0x0ba70111, 0x0ba70151, 0x0ba70111, - 0x0ba70151, 0x0ba70111, 0x0bbf0151, 0x0bbf0111, 0x0bbf0151, 0x0bbf0111, 0x0bbf0151, 0x0bbf0111, - 0x0bbf0151, 0x0bbf0111, 0x0bd70141, 0x0bd70111, 0x0bd70141, 0x0bd70111, 0x0bd70141, 0x0bd70111, - 0x0bd70141, 0x0bd70111, 0x0bd70141, 0x0bd70111, 0x0bef0151, 0x0bef0111, 0x0bef0151, 0x0bef0111, - 0x0bfb0141, 0x0bfb0111, 0x0bfb0141, 0x0bfb0111, 0x0bfb0141, 0x0bfb0111, 0x0bfb0141, 0x0bfb0111, - 0x0bfb0141, 0x0bfb0111, 0x0c030151, 0x0c030111, 0x0c030151, 0x0c030111, 0x0c070141, 0x0c070111, - 0x0c130141, 0x0c130111, 0x0c130141, 0x0c130111, 0x0c130141, 0x0c130111, 0x0ab90111, 0x0bbf0111, - 0x0bfb0111, 0x0c070111, 0x0a150131, 0x0ba70131, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x0a150151, 0x0a150111, 0x0a150151, 0x0a150111, 0x0a150151, 0x0a150111, 0x0a150151, 0x0a150111, - 0x0a150151, 0x0a150111, 0x0a150151, 0x0a150111, 0x0a150151, 0x0a150111, 0x0a150151, 0x0a150111, - 0x0a150151, 0x0a150111, 0x0a150151, 0x0a150111, 0x0a150151, 0x0a150111, 0x0a150151, 0x0a150111, - 0x0a650151, 0x0a650111, 0x0a650151, 0x0a650111, 0x0a650151, 0x0a650111, 0x0a650151, 0x0a650111, - 0x0a650151, 0x0a650111, 0x0a650151, 0x0a650111, 0x0a650151, 0x0a650111, 0x0a650151, 0x0a650111, - 0x0ad30161, 0x0ad30111, 0x0ad30161, 0x0ad30111, 0x0b4b0161, 0x0b4b0111, 0x0b4b0161, 0x0b4b0111, - 0x0b4b0161, 0x0b4b0111, 0x0b4b0161, 0x0b4b0111, 0x0b4b0161, 0x0b4b0111, 0x0b4b0161, 0x0b4b0111, - 0x0b4b0161, 0x0b4b0111, 0x0b4b0161, 0x0b4b0111, 0x0b4b0161, 0x0b4b0111, 0x0b4b0161, 0x0b4b0111, - 0x0b4b0161, 0x0b4b0111, 0x0b4b0161, 0x0b4b0111, 0x0bd70141, 0x0bd70111, 0x0bd70141, 0x0bd70111, - 0x0bd70141, 0x0bd70111, 0x0bd70141, 0x0bd70111, 0x0bd70141, 0x0bd70111, 0x0bd70141, 0x0bd70111, - 0x0bd70141, 0x0bd70111, 0x0c070141, 0x0c070111, 0x0c070141, 0x0c070111, 0x0c070141, 0x0c070111, - 0x0c070141, 0x0c070111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x1f00 .. 0x1fff */ - 0x0c910111, 0x0c910111, 0x0c910111, 0x0c910111, 0x0c910111, 0x0c910111, 0x0c910111, 0x0c910111, - 0x0c910121, 0x0c910121, 0x0c910121, 0x0c910121, 0x0c910121, 0x0c910121, 0x0c910121, 0x0c910121, - 0x0c950111, 0x0c950111, 0x0c950111, 0x0c950111, 0x0c950111, 0x0c950111, 0xffffffff, 0xffffffff, - 0x0c950131, 0x0c950131, 0x0c950131, 0x0c950131, 0x0c950131, 0x0c950131, 0xffffffff, 0xffffffff, - 0x0c990111, 0x0c990111, 0x0c990111, 0x0c990111, 0x0c990111, 0x0c990111, 0x0c990111, 0x0c990111, - 0x0c990121, 0x0c990121, 0x0c990121, 0x0c990121, 0x0c990121, 0x0c990121, 0x0c990121, 0x0c990121, - 0x0c9b0111, 0x0c9b0111, 0x0c9b0111, 0x0c9b0111, 0x0c9b0111, 0x0c9b0111, 0x0c9b0111, 0x0c9b0111, - 0x0c9b0121, 0x0c9b0121, 0x0c9b0121, 0x0c9b0121, 0x0c9b0121, 0x0c9b0121, 0x0c9b0121, 0x0c9b0121, - 0x0ca20111, 0x0ca20111, 0x0ca20111, 0x0ca20111, 0x0ca20111, 0x0ca20111, 0xffffffff, 0xffffffff, - 0x0ca20121, 0x0ca20121, 0x0ca20121, 0x0ca20121, 0x0ca20121, 0x0ca20121, 0xffffffff, 0xffffffff, - 0x0ca80111, 0x0ca80111, 0x0ca80111, 0x0ca80111, 0x0ca80111, 0x0ca80111, 0x0ca80111, 0x0ca80111, - 0xffffffff, 0x0ca80121, 0xffffffff, 0x0ca80121, 0xffffffff, 0x0ca80121, 0xffffffff, 0x0ca80121, - 0x0cac0111, 0x0cac0111, 0x0cac0111, 0x0cac0111, 0x0cac0111, 0x0cac0111, 0x0cac0111, 0x0cac0111, - 0x0cac0121, 0x0cac0121, 0x0cac0121, 0x0cac0121, 0x0cac0121, 0x0cac0121, 0x0cac0121, 0x0cac0121, - 0x0c910111, 0x0c910111, 0x0c950111, 0x0c950111, 0x0c990111, 0x0c990111, 0x0c9b0111, 0x0c9b0111, - 0x0ca20111, 0x0ca20111, 0x0ca80111, 0x0ca80111, 0x0cac0111, 0x0cac0111, 0xffffffff, 0xffffffff, - 0x0c910111, 0x0c910111, 0x0c910111, 0x0c910111, 0x0c910111, 0x0c910111, 0x0c910111, 0x0c910111, - 0x0c910121, 0x0c910121, 0x0c910121, 0x0c910121, 0x0c910121, 0x0c910121, 0x0c910121, 0x0c910121, - 0x0c990111, 0x0c990111, 0x0c990111, 0x0c990111, 0x0c990111, 0x0c990111, 0x0c990111, 0x0c990111, - 0x0c990121, 0x0c990121, 0x0c990121, 0x0c990121, 0x0c990121, 0x0c990121, 0x0c990121, 0x0c990121, - 0x0cac0111, 0x0cac0111, 0x0cac0111, 0x0cac0111, 0x0cac0111, 0x0cac0111, 0x0cac0111, 0x0cac0111, - 0x0cac0121, 0x0cac0121, 0x0cac0121, 0x0cac0121, 0x0cac0121, 0x0cac0121, 0x0cac0121, 0x0cac0121, - 0x0c910111, 0x0c910111, 0x0c910111, 0x0c910111, 0x0c910111, 0xffffffff, 0x0c910111, 0x0c910111, - 0x0c910121, 0x0c910121, 0x0c910121, 0x0c910121, 0x0c910121, 0x02170111, 0x0c9b0111, 0x02170111, - 0x021d0111, 0x02140111, 0x0c990111, 0x0c990111, 0x0c990111, 0xffffffff, 0x0c990111, 0x0c990111, - 0x0c950131, 0x0c950131, 0x0c990121, 0x0c990121, 0x0c990121, 0x02170111, 0x02170111, 0x02170111, - 0x0c9b0111, 0x0c9b0111, 0x0c9b0111, 0x0c9b0111, 0xffffffff, 0xffffffff, 0x0c9b0111, 0x0c9b0111, - 0x0c9b0121, 0x0c9b0121, 0x0c9b0121, 0x0c9b0121, 0xffffffff, 0x02180111, 0x02180111, 0x02180111, - 0x0ca80111, 0x0ca80111, 0x0ca80111, 0x0ca80111, 0x0ca50111, 0x0ca50111, 0x0ca80111, 0x0ca80111, - 0x0ca80121, 0x0ca80121, 0x0ca80121, 0x0ca80121, 0x0ca50131, 0x02140111, 0x02140111, 0x020c0111, - 0xffffffff, 0xffffffff, 0x0cac0111, 0x0cac0111, 0x0cac0111, 0xffffffff, 0x0cac0111, 0x0cac0111, - 0x0ca20121, 0x0ca20121, 0x0cac0121, 0x0cac0121, 0x0cac0121, 0x020d0111, 0x02180111, 0xffffffff, - /* 0x2000 .. 0x20ff */ - 0x02090131, 0x02090131, 0x02090131, 0x02090131, 0x02090131, 0x02090131, 0x02090131, 0x02090141, - 0x02090131, 0x02090131, 0x02090131, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x02250111, 0x02250121, 0x02260111, 0x02270111, 0x02280111, 0x02290111, 0x03a90111, 0x021c0111, - 0x026a0111, 0x026b0111, 0x026c0111, 0x026d0111, 0x02710111, 0x02720111, 0x02730111, 0x02740111, - 0x02ae0111, 0x02af0111, 0x02b00111, 0x02b10111, 0x02550131, 0x02550131, 0x02550131, 0x02b20111, - 0x02070111, 0x02080111, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02090141, - 0x02ac0111, 0x02ad0111, 0x02b60111, 0x02b60121, 0x02b60121, 0x02b70111, 0x02b70121, 0x02b70121, - 0x02b90111, 0x026e0111, 0x026f0111, 0x02ba0111, 0x024b0131, 0x02540111, 0x02110111, 0x02bb0111, - 0x02bc0111, 0x02bd0111, 0x02be0111, 0x02b30111, 0x02a50111, 0x02860111, 0x02870111, 0xffffffff, - 0x024e0131, 0x024b0131, 0x02a80111, 0x029e0111, 0x02b40111, 0x02b50111, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x0a0b0151, 0xffffffff, 0xffffffff, 0xffffffff, 0x0a0f0151, 0x0a100151, 0x0a110151, 0x0a120151, - 0x0a130151, 0x0a140151, 0x039f0151, 0x03ab0121, 0x03a40141, 0x027a0151, 0x027b0141, 0x0b3301a1, - 0x0a0b0161, 0x0a0c0161, 0x0a0d0161, 0x0a0e0161, 0x0a0f0161, 0x0a100161, 0x0a110161, 0x0a120161, - 0x0a130161, 0x0a140161, 0x039f0161, 0x03ab0131, 0x03a40151, 0x027a0161, 0x027b0151, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x09e70111, 0x09e80111, 0x09e90111, 0x09ea0111, 0x09eb0111, 0x09ec0111, 0x09ed0111, 0x09ee0111, - 0x0b7f0161, 0x09ef0111, 0x09f00111, 0x09f10111, 0x09f20111, 0x09f30111, 0x09f40111, 0x09f50111, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x0000e411, 0x0000e511, 0x0000e611, 0x0000e711, 0x0000e811, 0x0000e911, 0x0000ea11, 0x0000eb11, - 0x0000ec11, 0x0000ed11, 0x0000ee11, 0x0000ef11, 0x0000f011, 0x0000f111, 0x0000f211, 0x0000f311, - 0x0000f411, 0x0000f511, 0x0000f611, 0x0000f711, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x2100 .. 0x21ff */ - 0x0a150131, 0x0a150131, 0x0a3d0181, 0x030a0121, 0x09f60111, 0x0a3d0131, 0x0a3d0131, 0x0a710131, - 0x09f70111, 0x030a0121, 0x0a990131, 0x0ab90171, 0x0ab90171, 0x0ab90171, 0x0ab90131, 0x0ac50121, - 0x0ad30191, 0x0ad30191, 0x0b030191, 0x0b030141, 0x09f80111, 0x0b330181, 0x0b330171, 0x09f90111, - 0x09fa0111, 0x0b670161, 0x0b730161, 0x0b7f0171, 0x0b7f0171, 0x0b7f0171, 0x09fb0111, 0x09fc0111, - 0x0ba70181, 0x0bbf0171, 0x0bbf0191, 0x09fd0111, 0x0c130161, 0x09fe0111, 0x0cac0121, 0x09ff0111, - 0x0c130161, 0x0a000111, 0x0af70141, 0x0a150151, 0x0a290161, 0x0a3d0181, 0x0a010111, 0x0a650131, - 0x0a650171, 0x0a910171, 0x0a020111, 0x0b2b0181, 0x0b4b0141, 0x0eb70121, 0x0eb80121, 0x0eb90121, - 0x0eba0121, 0x0ad30141, 0x0a030111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0x0a0c0171, 0x0a0d0171, 0x0a0c0171, 0x0a0d0171, 0x0a0e0171, - 0x0a0f0171, 0x0a0c0171, 0x0a100171, 0x0a0c0171, 0x0a0e0171, 0x0a100171, 0x0a120171, 0x0a0c0171, - 0x0ad30181, 0x0ad30181, 0x0ad30181, 0x0ad30181, 0x0bef0171, 0x0bef0171, 0x0bef0171, 0x0bef0171, - 0x0ad30181, 0x0c030171, 0x0c030171, 0x0c030171, 0x0b030181, 0x0a3d0171, 0x0a490171, 0x0b2b0171, - 0x0ad30131, 0x0ad30131, 0x0ad30131, 0x0ad30131, 0x0bef0131, 0x0bef0131, 0x0bef0131, 0x0bef0131, - 0x0ad30131, 0x0c030131, 0x0c030131, 0x0c030131, 0x0b030131, 0x0a3d0131, 0x0a490131, 0x0b2b0131, - 0x0a040111, 0x0a050111, 0x0a060111, 0x0a070111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x03320111, 0x03340111, 0x03330111, 0x03350111, 0x03360111, 0x03370111, 0x03380111, 0x03390111, - 0x033a0111, 0x033b0111, 0x03320111, 0x03330111, 0x033c0111, 0x033d0111, 0x033e0111, 0x033f0111, - 0x03400111, 0x03410111, 0x03420111, 0x03430111, 0x03440111, 0x03450111, 0x03460111, 0x03470111, - 0x03480111, 0x03490111, 0x034a0111, 0x034b0111, 0x034c0111, 0x034d0111, 0x03360111, 0x034e0111, - 0x034f0111, 0x03500111, 0x03510111, 0x03520111, 0x03530111, 0x03540111, 0x03550111, 0x03560111, - 0x03570111, 0x03580111, 0x03590111, 0x035a0111, 0x035b0111, 0x035c0111, 0x035d0111, 0x035e0111, - 0x035f0111, 0x03600111, 0x03610111, 0x03620111, 0x03630111, 0x03640111, 0x03650111, 0x03660111, - 0x03670111, 0x03680111, 0x03690111, 0x036a0111, 0x036b0111, 0x036c0111, 0x03700111, 0x036e0111, - 0x036c0111, 0x036d0111, 0x036e0111, 0x036f0111, 0x03700111, 0x03710111, 0x03720111, 0x03730111, - 0x03740111, 0x03750111, 0x03760111, 0x03770111, 0x03780111, 0x03790111, 0x037a0111, 0x037b0111, - 0x037c0111, 0x037d0111, 0x037e0111, 0x037f0111, 0x03800111, 0x03810111, 0x03820111, 0x03830111, - 0x03840111, 0x03850111, 0x03860111, 0x03870111, 0x03880111, 0x03890111, 0x038a0111, 0x038b0111, - 0x038c0111, 0x038d0111, 0x038e0111, 0x038f0111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x2200 .. 0x22ff */ - 0x03900111, 0x03910111, 0x03920111, 0x03930111, 0x03930111, 0x03940111, 0x03950111, 0x03960111, - 0x03970111, 0x03970111, 0x03980111, 0x03990111, 0x03990111, 0x039a0111, 0x039b0111, 0x039c0111, - 0x039d0111, 0x039e0111, 0x03ab0111, 0x03ac0111, 0x03ad0111, 0x03ae0111, 0x03af0111, 0x03b00111, - 0x03b10111, 0x03b20111, 0x03b30111, 0x03b40111, 0x03b50111, 0x03b60111, 0x03b70111, 0x03b80111, - 0x03b90111, 0x03ba0111, 0x03bb0111, 0x03bc0111, 0x03bc0111, 0x03bd0111, 0x03bd0111, 0x03be0111, - 0x03bf0111, 0x03c00111, 0x03c10111, 0x03c20111, 0x03c20121, 0x03c20121, 0x03c30111, 0x03c30121, - 0x03c30121, 0x03c40111, 0x03c50111, 0x03c60111, 0x03c70111, 0x03c80111, 0x03c90111, 0x03ca0111, - 0x03cb0111, 0x03cc0111, 0x03cd0111, 0x03ce0111, 0x03cf0111, 0x03d00111, 0x03d10111, 0x03d20111, - 0x03d30111, 0x03cf0111, 0x03d40111, 0x03d50111, 0x03d50111, 0x03d60111, 0x03d70111, 0x03d60111, - 0x03d80111, 0x03d80111, 0x03d90111, 0x03da0111, 0x03db0111, 0x03dc0111, 0x03dd0111, 0x03de0111, - 0x03df0111, 0x03e00111, 0x03e10111, 0x03e20111, 0x03e30111, 0x03e40111, 0x03e50111, 0x03e60111, - 0x03e70111, 0x03e80111, 0x03e90111, 0x03ea0111, 0x03eb0111, 0x03ec0111, 0x03ed0111, 0x03ee0111, - 0x03a40111, 0x03ef0111, 0x03ef0111, 0x03f00111, 0x03f10111, 0x03f20111, 0x03f30111, 0x03f40111, - 0x03f50111, 0x03f60111, 0x03f70111, 0x03f80111, 0x03f90111, 0x03dc0111, 0x03a30111, 0x03a50111, - 0x03f10111, 0x03f20111, 0x03fa0111, 0x03fb0111, 0x03fa0111, 0x03fb0111, 0x03fc0111, 0x03fd0111, - 0x03fc0111, 0x03fd0111, 0x03fe0111, 0x03ff0111, 0x04000111, 0x04010111, 0x04020111, 0x04030111, - 0x03fe0111, 0x03ff0111, 0x04040111, 0x04050111, 0x04040111, 0x04050111, 0x04060111, 0x04070111, - 0x04060111, 0x04070111, 0x04080111, 0x04090111, 0x040a0111, 0x040b0111, 0x040c0111, 0x040d0111, - 0x040e0111, 0x040f0111, 0x04100111, 0x04110111, 0x04120111, 0x04130111, 0x04140111, 0x04150111, - 0x04160111, 0x04170111, 0x04180111, 0x04190111, 0x041a0111, 0x041b0111, 0x041c0111, 0x041d0111, - 0x041e0111, 0x041f0111, 0x04200111, 0x04210111, 0x04220111, 0x04230111, 0x04240111, 0x04250111, - 0x04260111, 0x04270111, 0x04280111, 0x04290111, 0x04200111, 0x04260111, 0x04270111, 0x04290111, - 0x042a0111, 0x042b0111, 0x042c0111, 0x042d0111, 0x042e0111, 0x042f0111, 0x04300111, 0x04310111, - 0x04320111, 0x04330111, 0x04340111, 0x04350111, 0x04360111, 0x04370111, 0x04380111, 0x04390111, - 0x043a0111, 0x043b0111, 0x043c0111, 0x043d0111, 0x043e0111, 0x043f0111, 0x04400111, 0x04410111, - 0x04420111, 0x04430111, 0x04440111, 0x04450111, 0x04460111, 0x04470111, 0x04480111, 0x04490111, - 0x044a0111, 0x044b0111, 0x044c0111, 0x044d0111, 0x044e0111, 0x044f0111, 0x04500111, 0x04510111, - 0x04520111, 0x04530111, 0x04540111, 0x04550111, 0x04560111, 0x04570111, 0x04580111, 0x04590111, - 0x04000111, 0x04010111, 0x040f0111, 0x04100111, 0x045a0111, 0x045b0111, 0x045c0111, 0x045d0111, - 0x045e0111, 0x045f0111, 0x042c0111, 0x042d0111, 0x042e0111, 0x042f0111, 0x04600111, 0x04610111, - 0x04620111, 0x04630111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x2300 .. 0x23ff */ - 0x04640111, 0x04650111, 0x04660111, 0x04670111, 0x04680111, 0x04690111, 0x046a0111, 0x046b0111, - 0x046c0111, 0x046d0111, 0x046e0111, 0x046f0111, 0x04700111, 0x04710111, 0x04720111, 0x04730111, - 0x04740111, 0x04750111, 0x04760111, 0x04770111, 0x04780111, 0x04790111, 0x047a0111, 0x047b0111, - 0x047c0111, 0x047d0111, 0x047e0111, 0x047f0111, 0x04800111, 0x04810111, 0x04820111, 0x04830111, - 0x04840111, 0x04850111, 0x04860111, 0x04870111, 0x04880111, 0x04890111, 0x048a0111, 0x048b0111, - 0x048c0111, 0x02880111, 0x02890111, 0x048d0111, 0x048e0111, 0x048f0111, 0x04900111, 0x04910111, - 0x04920111, 0x04930111, 0x04940111, 0x04950111, 0x04960111, 0x04970111, 0x04980111, 0x04990111, - 0x049a0111, 0x049b0111, 0x049c0111, 0x049d0111, 0x049e0111, 0x049f0111, 0x04a00111, 0x04a10111, - 0x04a20111, 0x04a30111, 0x04a40111, 0x04a50111, 0x04a60111, 0x04a70111, 0x04a80111, 0x04a90111, - 0x04aa0111, 0x04ab0111, 0x04ac0111, 0x04ad0111, 0x04ae0111, 0x04af0111, 0x04b00111, 0x04b10111, - 0x04b20111, 0x04b30111, 0x04b40111, 0x04b50111, 0x04b60111, 0x04b70111, 0x04b80111, 0x04b90111, - 0x04ba0111, 0x04bb0111, 0x04bc0111, 0x04bd0111, 0x04be0111, 0x04bf0111, 0x04c00111, 0x04c10111, - 0x04c20111, 0x04c30111, 0x04c40111, 0x04c50111, 0x04c60111, 0x04c70111, 0x04c80111, 0x04c90111, - 0x04ca0111, 0x04cb0111, 0x04cc0111, 0x04cd0111, 0x04ce0111, 0x04cf0111, 0x04d00111, 0x04d10111, - 0x04d20111, 0x04d30111, 0x04d40111, 0x04d50111, 0x04d60111, 0x04d70111, 0x04d80111, 0x04d90111, - 0x04da0111, 0x04db0111, 0x04dc0111, 0x04dd0111, 0xffffffff, 0x04de0111, 0x04df0111, 0x04e00111, - 0x04e10111, 0x04e20111, 0x04e30111, 0x04e40111, 0x04e50111, 0x04e60111, 0x04e70111, 0x04e80111, - 0x04e90111, 0x04ea0111, 0x04eb0111, 0x04ec0111, 0x04ed0111, 0x04ee0111, 0x04ef0111, 0x04f00111, - 0x04f10111, 0x04f20111, 0x04f30111, 0x04f40111, 0x04f50111, 0x04f60111, 0x04f70111, 0x04f80111, - 0x04f90111, 0x04fa0111, 0x04fb0111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x2400 .. 0x24ff */ - 0x04fc0111, 0x04fd0111, 0x04fe0111, 0x04ff0111, 0x05000111, 0x05010111, 0x05020111, 0x05030111, - 0x05040111, 0x05050111, 0x05060111, 0x05070111, 0x05080111, 0x05090111, 0x050a0111, 0x050b0111, - 0x050c0111, 0x050d0111, 0x050e0111, 0x050f0111, 0x05100111, 0x05110111, 0x05120111, 0x05130111, - 0x05140111, 0x05150111, 0x05160111, 0x05170111, 0x05180111, 0x05190111, 0x051a0111, 0x051b0111, - 0x051c0111, 0x051d0111, 0x051e0111, 0x051f0111, 0x05200111, 0x05210111, 0x05220111, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x05230111, 0x05240111, 0x05250111, 0x05260111, 0x05270111, 0x05280111, 0x05290111, 0x052a0111, - 0x052b0111, 0x052c0111, 0x052d0111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x0a0c0141, 0x0a0d0141, 0x0a0e0141, 0x0a0f0141, 0x0a100141, 0x0a110141, 0x0a120141, 0x0a130141, - 0x0a140141, 0x0a0c0141, 0x0a0c0141, 0x0a0c0141, 0x0a0c0141, 0x0a0c0141, 0x0a0c0141, 0x0a0c0141, - 0x0a0c0141, 0x0a0c0141, 0x0a0c0141, 0x0a0d0141, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, - 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, - 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, - 0x0a0c0131, 0x0a0d0131, 0x0a0e0131, 0x0a0f0131, 0x0a100131, 0x0a110131, 0x0a120131, 0x0a130131, - 0x0a140131, 0x0a0c0131, 0x0a0c0131, 0x0a0c0131, 0x0a0c0131, 0x0a0c0131, 0x0a0c0131, 0x0a0c0131, - 0x0a0c0131, 0x0a0c0131, 0x0a0c0131, 0x0a0d0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, - 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, - 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, - 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x0a150171, 0x0a290171, - 0x0a3d0191, 0x0a490181, 0x0a650181, 0x0a910181, 0x0a990171, 0x0ab90181, 0x0ad301a1, 0x0ae70161, - 0x0af70161, 0x0b0301a1, 0x0b2b0191, 0x0b330191, 0x0b4b0191, 0x0b670171, 0x0b730171, 0x0b7f0181, - 0x0ba70171, 0x0bbf0181, 0x0bd70161, 0x0bef0181, 0x0bfb0161, 0x0c030181, 0x0c070161, 0x0c130171, - 0x0a150141, 0x0a290131, 0x0a3d0141, 0x0a490141, 0x0a650141, 0x0a910141, 0x0a990141, 0x0ab90141, - 0x0ad30151, 0x0ae70131, 0x0af70131, 0x0b030151, 0x0b2b0141, 0x0b330141, 0x0b4b0151, 0x0b670131, - 0x0b730131, 0x0b7f0131, 0x0ba70141, 0x0bbf0141, 0x0bd70131, 0x0bef0141, 0x0bfb0131, 0x0c030141, - 0x0c070131, 0x0c130131, 0x0a0b0141, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x2500 .. 0x25ff */ - 0x052e0111, 0x052f0111, 0x05300111, 0x05310111, 0x05320111, 0x05330111, 0x05340111, 0x05350111, - 0x05360111, 0x05370111, 0x05380111, 0x05390111, 0x053a0111, 0x053b0111, 0x053c0111, 0x053d0111, - 0x053e0111, 0x053f0111, 0x05400111, 0x05410111, 0x05420111, 0x05430111, 0x05440111, 0x05450111, - 0x05460111, 0x05470111, 0x05480111, 0x05490111, 0x054a0111, 0x054b0111, 0x054c0111, 0x054d0111, - 0x054e0111, 0x054f0111, 0x05500111, 0x05510111, 0x05520111, 0x05530111, 0x05540111, 0x05550111, - 0x05560111, 0x05570111, 0x05580111, 0x05590111, 0x055a0111, 0x055b0111, 0x055c0111, 0x055d0111, - 0x055e0111, 0x055f0111, 0x05600111, 0x05610111, 0x05620111, 0x05630111, 0x05640111, 0x05650111, - 0x05660111, 0x05670111, 0x05680111, 0x05690111, 0x056a0111, 0x056b0111, 0x056c0111, 0x056d0111, - 0x056e0111, 0x056f0111, 0x05700111, 0x05710111, 0x05720111, 0x05730111, 0x05740111, 0x05750111, - 0x05760111, 0x05770111, 0x05780111, 0x05790111, 0x057a0111, 0x057b0111, 0x057c0111, 0x057d0111, - 0x057e0111, 0x057f0111, 0x05800111, 0x05810111, 0x05820111, 0x05830111, 0x05840111, 0x05850111, - 0x05860111, 0x05870111, 0x05880111, 0x05890111, 0x058a0111, 0x058b0111, 0x058c0111, 0x058d0111, - 0x058e0111, 0x058f0111, 0x05900111, 0x05910111, 0x05920111, 0x05930111, 0x05940111, 0x05950111, - 0x05960111, 0x05970111, 0x05980111, 0x05990111, 0x059a0111, 0x059b0111, 0x059c0111, 0x059d0111, - 0x059e0111, 0x059f0111, 0x05a00111, 0x05a10111, 0x05a20111, 0x05a30111, 0x05a40111, 0x05a50111, - 0x05a60111, 0x05a70111, 0x05a80111, 0x05a90111, 0x05aa0111, 0x05ab0111, 0x05ac0111, 0x05ad0111, - 0x05ae0111, 0x05af0111, 0x05b00111, 0x05b10111, 0x05b20111, 0x05b30111, 0x05b40111, 0x05b50111, - 0x05b60111, 0x05b70111, 0x05b80111, 0x05b90111, 0x05ba0111, 0x05bb0111, 0x05bc0111, 0x05bd0111, - 0x05be0111, 0x05bf0111, 0x05c00111, 0x05c10111, 0x05c20111, 0x05c30111, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x05c40111, 0x05c50111, 0x05c60111, 0x05c70111, 0x05c80111, 0x05c90111, 0x05ca0111, 0x05cb0111, - 0x05cc0111, 0x05cd0111, 0x05ce0111, 0x05cf0111, 0x05d00111, 0x05d10111, 0x05d20111, 0x05d30111, - 0x05d40111, 0x05d50111, 0x05d60111, 0x05d70111, 0x05d80111, 0x05d90111, 0x05da0111, 0x05db0111, - 0x05dc0111, 0x05dd0111, 0x05de0111, 0x05df0111, 0x05e00111, 0x05e10111, 0x05e20111, 0x05e30111, - 0x05e40111, 0x05e50111, 0x05e60111, 0x05e70111, 0x05e80111, 0x05e90111, 0x05ea0111, 0x05eb0111, - 0x05ec0111, 0x05ed0111, 0x05ee0111, 0x05ef0111, 0x05f00111, 0x05f10111, 0x05f20111, 0x05f30111, - 0x05f40111, 0x05f50111, 0x05f60111, 0x05f70111, 0x05f80111, 0x05f90111, 0x05fa0111, 0x05fb0111, - 0x05fc0111, 0x05fd0111, 0x05fe0111, 0x05ff0111, 0x06000111, 0x06010111, 0x06020111, 0x06030111, - 0x06040111, 0x06050111, 0x06060111, 0x06070111, 0x06080111, 0x06090111, 0x060a0111, 0x060b0111, - 0x060c0111, 0x060d0111, 0x060e0111, 0x060f0111, 0x06100111, 0x06110111, 0x06120111, 0x06130111, - 0x06140111, 0x06150111, 0x06160111, 0x06170111, 0x06180111, 0x06190111, 0x061a0111, 0x061b0111, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x2600 .. 0x26ff */ - 0x061c0111, 0x061d0111, 0x061e0111, 0x061f0111, 0x06200111, 0x06210111, 0x06220111, 0x06230111, - 0x06240111, 0x06250111, 0x06260111, 0x06270111, 0x06280111, 0x06290111, 0x062a0111, 0x062b0111, - 0x062c0111, 0x062d0111, 0x062e0111, 0x062f0111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0x06300111, 0x06310111, 0x06320111, 0x06330111, 0x06340111, 0x06350111, 0x06360111, - 0x06370111, 0x06380111, 0x06390111, 0x063a0111, 0x063b0111, 0x063c0111, 0x063d0111, 0x063e0111, - 0x063f0111, 0x06400111, 0x06410111, 0x06420111, 0x06430111, 0x06440111, 0x06450111, 0x06460111, - 0x06470111, 0x06480111, 0x06490111, 0x064a0111, 0x064b0111, 0x064c0111, 0x064d0111, 0x064e0111, - 0x064f0111, 0x06500111, 0x06510111, 0x06520111, 0x06530111, 0x06540111, 0x06550111, 0x06560111, - 0x06570111, 0x06580111, 0x06590111, 0x065a0111, 0x065b0111, 0x065c0111, 0x065d0111, 0x065e0111, - 0x065f0111, 0x06600111, 0x06610111, 0x06620111, 0x06630111, 0x06640111, 0x06650111, 0x06660111, - 0x06670111, 0x06680111, 0x06690111, 0x066a0111, 0x066b0111, 0x066c0111, 0x066d0111, 0x066e0111, - 0x066f0111, 0x06700111, 0x06710111, 0x06720111, 0x06730111, 0x06740111, 0x06750111, 0x06760111, - 0x06770111, 0x06780111, 0x06790111, 0x067a0111, 0x067b0111, 0x067c0111, 0x067d0111, 0x067e0111, - 0x067f0111, 0x06800111, 0x06810111, 0x06820111, 0x06830111, 0x0a080111, 0x0a090111, 0x0a0a0111, - 0x06840111, 0x06850111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x2700 .. 0x27ff */ - 0xffffffff, 0x06860111, 0x06870111, 0x06880111, 0x06890111, 0xffffffff, 0x068a0111, 0x068b0111, - 0x068c0111, 0x068d0111, 0xffffffff, 0xffffffff, 0x068e0111, 0x068f0111, 0x06900111, 0x06910111, - 0x06920111, 0x06930111, 0x06940111, 0x06950111, 0x06960111, 0x06970111, 0x06980111, 0x06990111, - 0x069a0111, 0x069b0111, 0x069c0111, 0x069d0111, 0x069e0111, 0x069f0111, 0x06a00111, 0x06a10111, - 0x06a20111, 0x06a30111, 0x06a40111, 0x06a50111, 0x06a60111, 0x06a70111, 0x06a80111, 0x06a90111, - 0xffffffff, 0x06aa0111, 0x06ab0111, 0x06ac0111, 0x06ad0111, 0x06ae0111, 0x06af0111, 0x06b00111, - 0x06b10111, 0x06b20111, 0x06b30111, 0x06b40111, 0x06b50111, 0x06b60111, 0x06b70111, 0x06b80111, - 0x06b90111, 0x06ba0111, 0x06bb0111, 0x06bc0111, 0x06bd0111, 0x06be0111, 0x06bf0111, 0x06c00111, - 0x06c10111, 0x06c20111, 0x06c30111, 0x06c40111, 0x06c50111, 0x06c60111, 0x06c70111, 0x06c80111, - 0x06c90111, 0x06ca0111, 0x06cb0111, 0x06cc0111, 0xffffffff, 0x06cd0111, 0xffffffff, 0x06ce0111, - 0x06cf0111, 0x06d00111, 0x06d10111, 0xffffffff, 0xffffffff, 0xffffffff, 0x06d20111, 0xffffffff, - 0x06d30111, 0x06d40111, 0x06d50111, 0x06d60111, 0x06d70111, 0x06d80111, 0x06d90111, 0xffffffff, - 0xffffffff, 0x06da0111, 0x06db0111, 0x06dc0111, 0x06dd0111, 0x06de0111, 0x06df0111, 0x06e00111, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x0a0c0141, 0x0a0d0141, - 0x0a0e0141, 0x0a0f0141, 0x0a100141, 0x0a110141, 0x0a120141, 0x0a130141, 0x0a140141, 0x06e10111, - 0x0a0c0141, 0x0a0d0141, 0x0a0e0141, 0x0a0f0141, 0x0a100141, 0x0a110141, 0x0a120141, 0x0a130141, - 0x0a140141, 0x06e20111, 0x0a0c0141, 0x0a0d0141, 0x0a0e0141, 0x0a0f0141, 0x0a100141, 0x0a110141, - 0x0a120141, 0x0a130141, 0x0a140141, 0x06e30111, 0x06e40111, 0xffffffff, 0xffffffff, 0xffffffff, - 0x06e50111, 0x06e60111, 0x06e70111, 0x06e80111, 0x06e90111, 0x06ea0111, 0x06eb0111, 0x06ec0111, - 0x06ed0111, 0x06ee0111, 0x06ef0111, 0x06f00111, 0x06f10111, 0x06f20111, 0x06f30111, 0x06f40111, - 0x06f50111, 0x06f60111, 0x06f70111, 0x06f80111, 0x06f90111, 0x06fa0111, 0x06fb0111, 0x06fc0111, - 0xffffffff, 0x06fd0111, 0x06fe0111, 0x06ff0111, 0x07000111, 0x07010111, 0x07020111, 0x07030111, - 0x07040111, 0x07050111, 0x07060111, 0x07070111, 0x07080111, 0x07090111, 0x070a0111, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x2800 .. 0x28ff */ - 0x070b0111, 0x070c0111, 0x070d0111, 0x070e0111, 0x070f0111, 0x07100111, 0x07110111, 0x07120111, - 0x07130111, 0x07140111, 0x07150111, 0x07160111, 0x07170111, 0x07180111, 0x07190111, 0x071a0111, - 0x071b0111, 0x071c0111, 0x071d0111, 0x071e0111, 0x071f0111, 0x07200111, 0x07210111, 0x07220111, - 0x07230111, 0x07240111, 0x07250111, 0x07260111, 0x07270111, 0x07280111, 0x07290111, 0x072a0111, - 0x072b0111, 0x072c0111, 0x072d0111, 0x072e0111, 0x072f0111, 0x07300111, 0x07310111, 0x07320111, - 0x07330111, 0x07340111, 0x07350111, 0x07360111, 0x07370111, 0x07380111, 0x07390111, 0x073a0111, - 0x073b0111, 0x073c0111, 0x073d0111, 0x073e0111, 0x073f0111, 0x07400111, 0x07410111, 0x07420111, - 0x07430111, 0x07440111, 0x07450111, 0x07460111, 0x07470111, 0x07480111, 0x07490111, 0x074a0111, - 0x074b0111, 0x074c0111, 0x074d0111, 0x074e0111, 0x074f0111, 0x07500111, 0x07510111, 0x07520111, - 0x07530111, 0x07540111, 0x07550111, 0x07560111, 0x07570111, 0x07580111, 0x07590111, 0x075a0111, - 0x075b0111, 0x075c0111, 0x075d0111, 0x075e0111, 0x075f0111, 0x07600111, 0x07610111, 0x07620111, - 0x07630111, 0x07640111, 0x07650111, 0x07660111, 0x07670111, 0x07680111, 0x07690111, 0x076a0111, - 0x076b0111, 0x076c0111, 0x076d0111, 0x076e0111, 0x076f0111, 0x07700111, 0x07710111, 0x07720111, - 0x07730111, 0x07740111, 0x07750111, 0x07760111, 0x07770111, 0x07780111, 0x07790111, 0x077a0111, - 0x077b0111, 0x077c0111, 0x077d0111, 0x077e0111, 0x077f0111, 0x07800111, 0x07810111, 0x07820111, - 0x07830111, 0x07840111, 0x07850111, 0x07860111, 0x07870111, 0x07880111, 0x07890111, 0x078a0111, - 0x078b0111, 0x078c0111, 0x078d0111, 0x078e0111, 0x078f0111, 0x07900111, 0x07910111, 0x07920111, - 0x07930111, 0x07940111, 0x07950111, 0x07960111, 0x07970111, 0x07980111, 0x07990111, 0x079a0111, - 0x079b0111, 0x079c0111, 0x079d0111, 0x079e0111, 0x079f0111, 0x07a00111, 0x07a10111, 0x07a20111, - 0x07a30111, 0x07a40111, 0x07a50111, 0x07a60111, 0x07a70111, 0x07a80111, 0x07a90111, 0x07aa0111, - 0x07ab0111, 0x07ac0111, 0x07ad0111, 0x07ae0111, 0x07af0111, 0x07b00111, 0x07b10111, 0x07b20111, - 0x07b30111, 0x07b40111, 0x07b50111, 0x07b60111, 0x07b70111, 0x07b80111, 0x07b90111, 0x07ba0111, - 0x07bb0111, 0x07bc0111, 0x07bd0111, 0x07be0111, 0x07bf0111, 0x07c00111, 0x07c10111, 0x07c20111, - 0x07c30111, 0x07c40111, 0x07c50111, 0x07c60111, 0x07c70111, 0x07c80111, 0x07c90111, 0x07ca0111, - 0x07cb0111, 0x07cc0111, 0x07cd0111, 0x07ce0111, 0x07cf0111, 0x07d00111, 0x07d10111, 0x07d20111, - 0x07d30111, 0x07d40111, 0x07d50111, 0x07d60111, 0x07d70111, 0x07d80111, 0x07d90111, 0x07da0111, - 0x07db0111, 0x07dc0111, 0x07dd0111, 0x07de0111, 0x07df0111, 0x07e00111, 0x07e10111, 0x07e20111, - 0x07e30111, 0x07e40111, 0x07e50111, 0x07e60111, 0x07e70111, 0x07e80111, 0x07e90111, 0x07ea0111, - 0x07eb0111, 0x07ec0111, 0x07ed0111, 0x07ee0111, 0x07ef0111, 0x07f00111, 0x07f10111, 0x07f20111, - 0x07f30111, 0x07f40111, 0x07f50111, 0x07f60111, 0x07f70111, 0x07f80111, 0x07f90111, 0x07fa0111, - 0x07fb0111, 0x07fc0111, 0x07fd0111, 0x07fe0111, 0x07ff0111, 0x08000111, 0x08010111, 0x08020111, - 0x08030111, 0x08040111, 0x08050111, 0x08060111, 0x08070111, 0x08080111, 0x08090111, 0x080a0111, - /* 0x2e00 .. 0x2eff */ - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xfb400121, 0xfb400121, 0xfb400111, 0xfb400111, 0xfb400121, 0xfb400111, 0xfb400121, 0xfb400121, - 0xfb400121, 0xfb400111, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400111, - 0xfb400111, 0xfb400121, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400121, 0xfb400111, 0xfb400121, - 0xfb400111, 0xfb400111, 0xffffffff, 0xfb400111, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, - 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400121, 0xfb400111, 0xfb400121, - 0xfb400111, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400111, 0xfb400121, 0xfb400111, - 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, - 0xfb400111, 0xfb410111, 0xfb410111, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410111, 0xfb410121, - 0xfb410121, 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410121, - 0xfb410111, 0xfb410111, 0xfb410121, 0xfb410111, 0xfb410111, 0xfb410121, 0xfb410121, 0xfb410121, - 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410121, 0xfb410111, 0xfb410121, - 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410121, 0xfb410111, - 0xfb410111, 0xfb410121, 0xfb410111, 0xfb410121, 0xfb410121, 0xfb410111, 0xfb410111, 0xfb410121, - 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410121, 0xfb410111, 0xfb410121, 0xfb410111, 0xfb410121, - 0xfb410111, 0xfb410121, 0xfb410121, 0xfb410121, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x2f00 .. 0x2fff */ - 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, - 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, - 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, - 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, - 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, - 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, - 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, - 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, - 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, - 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, - 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, - 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, - 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, - 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, - 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, - 0xfb400121, 0xfb400121, 0xfb400121, 0xfb400121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, - 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, - 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, - 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, - 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, - 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, - 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, - 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, - 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, - 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, - 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, - 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xfb410121, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x09a90111, 0x09aa0111, 0x09ab0111, 0x09ac0111, 0x09ad0111, 0x09ae0111, 0x09af0111, 0x09b00111, - 0x09b10111, 0x09b20111, 0x09b30111, 0x09b40111, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x3000 .. 0x30ff */ - 0x02090121, 0x02340111, 0x025e0111, 0x02b80111, 0x09b50111, 0x09d70111, 0x192c0111, 0x0a0b0111, - 0x02880111, 0x02890111, 0x028a0111, 0x028b0111, 0x028c0111, 0x028d0111, 0x028e0111, 0x028f0111, - 0x02900111, 0x02910111, 0x09b60111, 0x09b70111, 0x02920111, 0x02930111, 0x02940111, 0x02950111, - 0x02960111, 0x02970111, 0x02980111, 0x02990111, 0x022a0111, 0x02750111, 0x02760111, 0x02770111, - 0x09b80111, 0x0a0c0111, 0x0a0d0111, 0x0a0e0111, 0x0a0f0111, 0x0a100111, 0x0a110111, 0x0a120111, - 0x0a130111, 0x0a140111, 0x0000dc11, 0x0000dd11, 0x0000de11, 0x0000df11, 0x0000e011, 0x0000e111, - 0x022b0111, 0x09d80111, 0x09d80111, 0x09d90111, 0x09d90111, 0x09da0111, 0x09b60121, 0x09b90111, - 0xfb400121, 0xfb400121, 0xfb400121, 0xffffffff, 0xffffffff, 0xffffffff, 0x09ba0111, 0x09bb0111, - 0xffffffff, 0x19210111, 0x19210121, 0x19220111, 0x19220121, 0x19230111, 0x19230121, 0x19240111, - 0x19240121, 0x19250111, 0x19250121, 0x19260111, 0x19260111, 0x19270111, 0x19270111, 0x19280111, - 0x19280111, 0x19290111, 0x19290111, 0x192a0111, 0x192a0111, 0x192b0111, 0x192b0111, 0x192c0121, - 0x192c0121, 0x192d0111, 0x192d0111, 0x192e0111, 0x192e0111, 0x192f0111, 0x192f0111, 0x19300111, - 0x19300111, 0x19310111, 0x19310111, 0x19320111, 0x19320121, 0x19320121, 0x19330111, 0x19330111, - 0x19340111, 0x19340111, 0x19350111, 0x19360111, 0x19370111, 0x19380111, 0x19390111, 0x193a0111, - 0x193a0111, 0x193a0111, 0x193b0111, 0x193b0111, 0x193b0111, 0x193c0111, 0x193c0111, 0x193c0111, - 0x193d0111, 0x193d0111, 0x193d0111, 0x193e0111, 0x193e0111, 0x193e0111, 0x193f0111, 0x19400111, - 0x19410111, 0x19420111, 0x19430111, 0x19440111, 0x19440121, 0x19450111, 0x19450121, 0x19460111, - 0x19460121, 0x19470111, 0x19480111, 0x19490111, 0x194a0111, 0x194b0111, 0x194c0111, 0x194c0121, - 0x194d0111, 0x194e0111, 0x194f0111, 0x19500111, 0x19230121, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0x0000e211, 0x0000e311, 0x021e0111, 0x021f0111, 0x09db0111, 0x09db0111, 0xffffffff, - 0xffffffff, 0x19210131, 0x19210151, 0x19220131, 0x19220151, 0x19230131, 0x19230151, 0x19240131, - 0x19240151, 0x19250131, 0x19250151, 0x19260131, 0x19260131, 0x19270121, 0x19270121, 0x19280121, - 0x19280121, 0x19290131, 0x19290131, 0x192a0121, 0x192a0121, 0x192b0121, 0x192b0121, 0x192c0131, - 0x192c0131, 0x192d0121, 0x192d0121, 0x192e0121, 0x192e0121, 0x192f0121, 0x192f0121, 0x19300121, - 0x19300121, 0x19310121, 0x19310121, 0x19320131, 0x19320151, 0x19320151, 0x19330121, 0x19330121, - 0x19340121, 0x19340121, 0x19350121, 0x19360121, 0x19370121, 0x19380121, 0x19390121, 0x193a0121, - 0x193a0121, 0x193a0121, 0x193b0121, 0x193b0121, 0x193b0121, 0x193c0121, 0x193c0121, 0x193c0121, - 0x193d0121, 0x193d0121, 0x193d0121, 0x193e0121, 0x193e0121, 0x193e0121, 0x193f0121, 0x19400121, - 0x19410121, 0x19420121, 0x19430121, 0x19440131, 0x19440151, 0x19450131, 0x19450151, 0x19460131, - 0x19460151, 0x19470121, 0x19480121, 0x19490121, 0x194a0121, 0x194b0121, 0x194c0131, 0x194c0141, - 0x194d0121, 0x194e0121, 0x194f0121, 0x19500121, 0x19230151, 0x19260121, 0x19290121, 0x194c0141, - 0x194d0121, 0x194e0121, 0x194f0121, 0x022c0111, 0x09dc0111, 0x09dd0111, 0x09dd0111, 0xffffffff, - /* 0x3100 .. 0x31ff */ - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x19510111, 0x19520111, 0x19530111, - 0x19540111, 0x19560111, 0x19570111, 0x19580111, 0x19590111, 0x195a0111, 0x195b0111, 0x195e0111, - 0x195f0111, 0x19600111, 0x19610111, 0x19630111, 0x19640111, 0x19650111, 0x19660111, 0x19670111, - 0x19680111, 0x19690111, 0x196a0111, 0x196b0111, 0x196d0111, 0x196e0111, 0x19700111, 0x19710111, - 0x19720111, 0x19730111, 0x19740111, 0x19750111, 0x19760111, 0x19780111, 0x197c0111, 0x197d0111, - 0x197e0111, 0x197f0111, 0x19550111, 0x195c0111, 0x19620111, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0x18310121, 0x18320121, 0x18d10121, 0x18330121, 0x18d30121, 0x18d40121, 0x18340121, - 0x18350121, 0x18360121, 0x18d70121, 0x18d80121, 0x18d90121, 0x18da0121, 0x18db0121, 0x18dc0121, - 0x184b0121, 0x18370121, 0x18380121, 0x18390121, 0x18520121, 0x183a0121, 0x183b0121, 0x183c0121, - 0x183d0121, 0x183e0121, 0x183f0121, 0x18400121, 0x18410121, 0x18420121, 0x18430121, 0x188d0121, - 0x188e0121, 0x188f0121, 0x18900121, 0x18910121, 0x18920121, 0x18930121, 0x18940121, 0x18950121, - 0x18960121, 0x18970121, 0x18980121, 0x18990121, 0x189a0121, 0x189b0121, 0x189c0121, 0x189d0121, - 0x189e0121, 0x189f0121, 0x18a00121, 0x18a10121, 0x188c0121, 0x18450121, 0x18460121, 0x18ee0121, - 0x18ef0121, 0x18f30121, 0x18f50121, 0x18fa0121, 0x18fe0121, 0x19000121, 0x184d0121, 0x19040121, - 0x19060121, 0x184e0121, 0x184f0121, 0x18510121, 0x18530121, 0x18540121, 0x18580121, 0x185a0121, - 0x185c0121, 0x185d0121, 0x185e0121, 0x185f0121, 0x18600121, 0x18630121, 0x18670121, 0x18710121, - 0x18780121, 0x187d0121, 0x19180121, 0x19190121, 0x18880121, 0x18890121, 0x188a0121, 0x18b00121, - 0x18b10121, 0x18b40121, 0x18bd0121, 0x18be0121, 0x18c00121, 0x18ca0121, 0x18cd0121, 0xffffffff, - 0x09bc0111, 0x09bd0111, 0xfb400141, 0xfb400141, 0xfb400141, 0xfb400141, 0xfb400141, 0xfb400141, - 0xfb400141, 0xfb400141, 0xfb400141, 0xfb400141, 0xfb400141, 0xfb400141, 0xfb400141, 0xfb400141, - 0x19510121, 0x19670121, 0x195f0121, 0x195a0121, 0x196f0111, 0x196f0121, 0x196c0111, 0x196b0121, - 0x197e0121, 0x196a0121, 0x197d0121, 0x197e0121, 0x197b0111, 0x195d0111, 0x19700121, 0x19720121, - 0x19790111, 0x197a0111, 0x19770111, 0x197d0131, 0x19520121, 0x19570121, 0x195b0121, 0x195e0121, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0x3200 .. 0x32ff */ - 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, - 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, - 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, - 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0xffffffff, 0xffffffff, 0xffffffff, - 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, - 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, - 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, - 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, - 0x027a0131, 0x027a0131, 0x027a0131, 0x027a0131, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x18310131, 0x18330131, 0x18340131, 0x18360131, 0x18370131, 0x18380131, 0x183a0131, 0x183c0131, - 0x183d0131, 0x183f0131, 0x18400131, 0x18410131, 0x18420131, 0x18430131, 0x18310131, 0x18330131, - 0x18340131, 0x18360131, 0x18370131, 0x18380131, 0x183a0131, 0x183c0131, 0x183d0131, 0x183f0131, - 0x18400131, 0x18410131, 0x18420131, 0x18430131, 0xffffffff, 0xffffffff, 0xffffffff, 0x09be0111, - 0xfb400131, 0xfb400131, 0xfb400131, 0xfb400131, 0xfb400131, 0xfb400131, 0xfb400131, 0xfb400131, - 0xfb400131, 0xfb400131, 0xfb400131, 0xfb400131, 0xfb400131, 0xfb400131, 0xfb410131, 0xfb400131, - 0xfb400131, 0xfb400131, 0xfb400131, 0xfb400131, 0xfb400131, 0xfb400131, 0xfb410131, 0xfb400131, - 0xfb400131, 0xfb400131, 0xfb400131, 0xfb400131, 0xfb410131, 0xfb400131, 0xfb400131, 0xfb400131, - 0xfb410131, 0xfb400131, 0xfb400131, 0xfb400131, 0xfb400131, 0xfb400131, 0xfb400131, 0xfb400131, - 0xfb400131, 0xfb400131, 0xfb400131, 0xfb400131, 0xfb400131, 0xfb400131, 0xfb410131, 0xfb400131, - 0xfb400131, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x0a0c0131, 0x0a0d0131, 0x0a0e0131, 0x0a0f0131, 0x0a100131, 0x0a110131, 0x0a120131, 0x0a130131, - 0x0a140131, 0x0a0c0131, 0x0a0c0131, 0x0a0c0131, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x19210171, 0x19220171, 0x19230171, 0x19240171, 0x19250171, 0x19260151, 0x19270141, 0x19280141, - 0x19290151, 0x192a0141, 0x192b0141, 0x192c0151, 0x192d0141, 0x192e0141, 0x192f0141, 0x19300141, - 0x19310141, 0x19320171, 0x19330141, 0x19340141, 0x19350141, 0x19360141, 0x19370141, 0x19380141, - 0x19390141, 0x193a0141, 0x193b0141, 0x193c0141, 0x193d0141, 0x193e0141, 0x193f0141, 0x19400141, - 0x19410141, 0x19420141, 0x19430141, 0x19440171, 0x19450171, 0x19460171, 0x19470141, 0x19480141, - 0x19490141, 0x194a0141, 0x194b0141, 0x194c0161, 0x194d0131, 0x194e0131, 0x194f0141, 0xffffffff, - /* 0x3300 .. 0x33ff */ - 0x19210181, 0x19210181, 0x19210181, 0x19210181, 0x19220181, 0x19220181, 0x19230181, 0x19240181, - 0x19240181, 0x19250181, 0x19250181, 0x19260161, 0x19260161, 0x19260161, 0x19260161, 0x19260161, - 0x19270151, 0x19270151, 0x19270151, 0x19270151, 0x19270151, 0x19270151, 0x19270151, 0x19270151, - 0x19280151, 0x19280151, 0x19280151, 0x19280151, 0x19290161, 0x192a0151, 0x192a0151, 0x192b0151, - 0x192b0151, 0x192c0161, 0x192e0151, 0x192e0151, 0x19300151, 0x19330151, 0x19340151, 0x19340151, - 0x19350151, 0x19390151, 0x193a0151, 0x193a0151, 0x193a0151, 0x193a0151, 0x193b0151, 0x193b0151, - 0x193b0151, 0x193b0151, 0x193c0151, 0x193c0151, 0x193c0151, 0x193c0151, 0x193d0151, 0x193d0151, - 0x193d0151, 0x193d0151, 0x193d0151, 0x193d0151, 0x193d0151, 0x193e0151, 0x193e0151, 0x193e0151, - 0x193e0151, 0x193e0151, 0x193e0151, 0x193f0151, 0x193f0151, 0x193f0151, 0x193f0151, 0x193f0151, - 0x19400151, 0x19400151, 0x19400151, 0x19420151, 0x19420151, 0x19420151, 0x19440181, 0x19440181, - 0x19450181, 0x19480151, 0x19480151, 0x19490151, 0x19490151, 0x194a0151, 0x194a0151, 0x194c0171, - 0x0a0b0131, 0x0a0c0131, 0x0a0d0131, 0x0a0e0131, 0x0a0f0131, 0x0a100131, 0x0a110131, 0x0a120131, - 0x0a130131, 0x0a140131, 0x0a0c0131, 0x0a0c0131, 0x0a0c0131, 0x0a0c0131, 0x0a0c0131, 0x0a0c0131, - 0x0a0c0131, 0x0a0c0131, 0x0a0c0131, 0x0a0c0131, 0x0a0d0131, 0x0a0d0131, 0x0a0d0131, 0x0a0d0131, - 0x0a0d0131, 0x0ab901a1, 0x0a490191, 0x0a1501a1, 0x0a290181, 0x0b4b01b1, 0x0b670181, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xfb400151, 0xfb400151, 0xfb400151, 0xfb400151, 0xfb400151, - 0x0b670181, 0x0b3301b1, 0x0c9f0141, 0x0b2b01a1, 0x0af70171, 0x0af70181, 0x0b2b01b1, 0x0a990181, - 0x0a3d01a1, 0x0af70171, 0x0b670181, 0x0b3301b1, 0x0c9f0141, 0x0c9f0141, 0x0b2b01a1, 0x0af70171, - 0x0ab901b1, 0x0af70171, 0x0b2b01b1, 0x0a990181, 0x0bbf01a1, 0x0c9f0141, 0x0b2b01a1, 0x0a490191, - 0x0af70171, 0x0a910191, 0x0b3301b1, 0x0c9f0141, 0x0b2b01a1, 0x0a3d01a1, 0x0af70171, 0x0b2b01a1, - 0x0a3d01a1, 0x0b2b01a1, 0x0af70171, 0x0b2b01a1, 0x0a3d01a1, 0x0b2b01a1, 0x0af70171, 0x0b2b01a1, - 0x0b2b01a1, 0x0b670191, 0x0af70171, 0x0b2b01b1, 0x0a990181, 0x0b7f01a1, 0x0b7f01a1, 0x0b7f01a1, - 0x0b670181, 0x0b3301b1, 0x0c9f0141, 0x0b2b01a1, 0x0b670181, 0x0b3301b1, 0x0c9f0141, 0x0b2b01a1, - 0x0af70171, 0x0b2b01b1, 0x0b670181, 0x0b3301b1, 0x0c9f0141, 0x0b2b01a1, 0x0af70171, 0x0b2b01b1, - 0x0af70171, 0x0b2b01b1, 0x0a150191, 0x0a290191, 0x0a3d01a1, 0x0a3d01a1, 0x0a3d01b1, 0x0a3d01b1, - 0x0a490191, 0x0a990181, 0x0ab901a1, 0x0ab901b1, 0x0ad301b1, 0x0af70181, 0x0af70181, 0x0af70171, - 0x0b0301c1, 0x0b0301c1, 0x0b0301c1, 0x0b0301c1, 0x0b2b01a1, 0x0b2b01a1, 0x0b2b01a1, 0x0b670191, - 0x0b670181, 0x0b670191, 0x0b670191, 0x0ba70191, 0x0ba701a1, 0x0bfb0181, 0xffffffff, 0xffffffff, - 0x0a0c0131, 0x0a0d0131, 0x0a0e0131, 0x0a0f0131, 0x0a100131, 0x0a110131, 0x0a120131, 0x0a130131, - 0x0a140131, 0x0a0c0131, 0x0a0c0131, 0x0a0c0131, 0x0a0c0131, 0x0a0c0131, 0x0a0c0131, 0x0a0c0131, - 0x0a0c0131, 0x0a0c0131, 0x0a0c0131, 0x0a0d0131, 0x0a0d0131, 0x0a0d0131, 0x0a0d0131, 0x0a0d0131, - 0x0a0d0131, 0x0a0d0131, 0x0a0d0131, 0x0a0d0131, 0x0a0d0131, 0x0a0e0131, 0x0a0e0131, 0xffffffff, - /* 0xf900 .. 0xf9ff */ - 0xfb410111, 0xfb400111, 0xfb410111, 0xfb410111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb410111, - 0xfb410111, 0xfb400111, 0xfb410111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, - 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, - 0xfb410111, 0xfb410111, 0xfb410111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb410111, - 0xfb410111, 0xfb400111, 0xfb400111, 0xfb410111, 0xfb410111, 0xfb400111, 0xfb410111, 0xfb410111, - 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb410111, 0xfb400111, 0xfb400111, 0xfb400111, - 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410111, - 0xfb410111, 0xfb410111, 0xfb410111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb410111, 0xfb410111, - 0xfb410111, 0xfb410111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb410111, 0xfb400111, 0xfb400111, - 0xfb410111, 0xfb410111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, - 0xfb400111, 0xfb410111, 0xfb400111, 0xfb410111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, - 0xfb410111, 0xfb410111, 0xfb410111, 0xfb400111, 0xfb400111, 0xfb410111, 0xfb400111, 0xfb400111, - 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, - 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb410111, 0xfb410111, - 0xfb400111, 0xfb410111, 0xfb400111, 0xfb400111, 0xfb410111, 0xfb400111, 0xfb400111, 0xfb400111, - 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb410111, 0xfb410111, 0xfb410111, 0xfb400111, - 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb410111, 0xfb410111, - 0xfb410111, 0xfb410111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb410111, 0xfb400111, 0xfb400111, - 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb410111, - 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, - 0xfb410111, 0xfb410111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, - 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, - 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410111, 0xfb400111, 0xfb400111, 0xfb410111, - 0xfb410111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, - 0xfb400111, 0xfb400111, 0xfb410111, 0xfb410111, 0xfb410111, 0xfb400111, 0xfb410111, 0xfb400111, - 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, - 0xfb410111, 0xfb400111, 0xfb400111, 0xfb410111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb410111, - 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb410111, 0xfb400111, 0xfb400111, 0xfb400111, - 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb410111, - 0xfb410111, 0xfb410111, 0xfb410111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, - 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410111, 0xfb400111, 0xfb400111, 0xfb410111, 0xfb400111, - 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb410111, 0xfb400111, 0xfb410111, 0xfb400111, - /* 0xfa00 .. 0xfaff */ - 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb410111, - 0xfb410111, 0xfb410111, 0xfb410111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb410111, 0xfb410111, - 0xfb400111, 0xfb410111, 0xfb400111, 0xfb410111, 0xfb410111, 0xfb400111, 0xfb400111, 0xfb400111, - 0xfb400111, 0xfb400111, 0xfb400111, 0xfb400111, 0xfb410111, 0xfb400111, 0xfb400111, 0xfb410111, - 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410111, - 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410111, 0xfb410111, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0xfb00 .. 0xfbff */ - 0x0a910131, 0x0a910131, 0x0a910131, 0x0a910131, 0x0a910131, 0x0ba70131, 0x0ba70131, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0x0ea30121, 0x0ea30121, 0x0ea30121, 0x0ead0121, 0x0ea30121, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x0ec00111, 0x00006711, 0x0ec00121, - 0x0ec60121, 0x0eb70131, 0x0eba0131, 0x0ebb0121, 0x0ec10121, 0x0ec20121, 0x0ec30121, 0x0eca0121, - 0x0ecc0121, 0x039f0131, 0x0ecb0111, 0x0ecb0111, 0x0ecb0111, 0x0ecb0111, 0x0eb70111, 0x0eb70111, - 0x0eb70111, 0x0eb80111, 0x0eb90111, 0x0eba0111, 0x0ebb0111, 0x0ebc0111, 0x0ebd0111, 0xffffffff, - 0x0ebf0111, 0x0ec00111, 0x0ec10131, 0x0ec10111, 0x0ec20111, 0xffffffff, 0x0ec30111, 0xffffffff, - 0x0ec40111, 0x0ec50111, 0xffffffff, 0x0ec70121, 0x0ec70111, 0xffffffff, 0x0ec80111, 0x0ec90111, - 0x0eca0111, 0x0ecb0111, 0x0ecc0111, 0x0ebc0111, 0x0eb80111, 0x0ec10111, 0x0ec70111, 0x0eb70121, - 0x0ed10131, 0x0ed10121, 0x0ed80151, 0x0ed80141, 0x0ed80121, 0x0ed80131, 0x0ed90151, 0x0ed90141, - 0x0ed90121, 0x0ed90131, 0x0eda0151, 0x0eda0141, 0x0eda0121, 0x0eda0131, 0x0edf0151, 0x0edf0141, - 0x0edf0121, 0x0edf0131, 0x0ee20151, 0x0ee20141, 0x0ee20121, 0x0ee20131, 0x0ede0151, 0x0ede0141, - 0x0ede0121, 0x0ede0131, 0x0f1a0151, 0x0f1a0141, 0x0f1a0121, 0x0f1a0131, 0x0f1c0151, 0x0f1c0141, - 0x0f1c0121, 0x0f1c0131, 0x0ee50151, 0x0ee50141, 0x0ee50121, 0x0ee50131, 0x0ee40151, 0x0ee40141, - 0x0ee40121, 0x0ee40131, 0x0ee60151, 0x0ee60141, 0x0ee60121, 0x0ee60131, 0x0ee80151, 0x0ee80141, - 0x0ee80121, 0x0ee80131, 0x0ef50131, 0x0ef50121, 0x0ef40131, 0x0ef40121, 0x0ef60131, 0x0ef60121, - 0x0ef00131, 0x0ef00121, 0x0f020131, 0x0f020121, 0x0efb0131, 0x0efb0121, 0x0f210151, 0x0f210141, - 0x0f210121, 0x0f210131, 0x0f270151, 0x0f270141, 0x0f270121, 0x0f270131, 0x0f2b0151, 0x0f2b0141, - 0x0f2b0121, 0x0f2b0131, 0x0f290151, 0x0f290141, 0x0f290121, 0x0f290131, 0x0f340131, 0x0f340121, - 0x0f350151, 0x0f350141, 0x0f350121, 0x0f350131, 0x0f3d0131, 0x0f3d0121, 0x0f3b0151, 0x0f3b0141, - 0x0f3b0121, 0x0f3b0131, 0x0f3a0151, 0x0f3a0141, 0x0f3a0121, 0x0f3a0131, 0x0f4f0131, 0x0f4f0121, - 0x0f4f0131, 0x0f4f0121, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0x0f250151, 0x0f250141, 0x0f250121, 0x0f250131, 0x0f420141, - 0x0f420131, 0x0f410131, 0x0f410121, 0x0f430131, 0x0f430121, 0x0f420141, 0x0f460131, 0x0f460121, - 0x0f400131, 0x0f400121, 0x0f440131, 0x0f440121, 0x0f4d0151, 0x0f4d0141, 0x0f4d0121, 0x0f4d0131, - 0x0f480121, 0x0f480131, 0x0ed50151, 0x0ed50141, 0x0ed50151, 0x0ed50141, 0x0ed50151, 0x0ed50141, - 0x0ed50151, 0x0ed50141, 0x0ed50151, 0x0ed50141, 0x0ed50151, 0x0ed50141, 0x0ed50151, 0x0ed50141, - 0x0ed50121, 0x0ed50151, 0x0ed50141, 0x0ed50121, 0x0f4a0151, 0x0f4a0141, 0x0f4a0121, 0x0f4a0131, - /* 0xfc00 .. 0xfcff */ - 0x0ed50151, 0x0ed50151, 0x0ed50151, 0x0ed50151, 0x0ed50151, 0x0ed70151, 0x0ed70151, 0x0ed70151, - 0x0ed70151, 0x0ed70151, 0x0ed70151, 0x0edc0151, 0x0edc0151, 0x0edc0151, 0x0edc0151, 0x0edc0151, - 0x0edc0151, 0x0edd0151, 0x0edd0151, 0x0edd0151, 0x0edd0151, 0x0ee30151, 0x0ee30151, 0x0ee90151, - 0x0ee90151, 0x0eea0151, 0x0eea0151, 0x0eea0151, 0x0f040151, 0x0f040151, 0x0f040151, 0x0f040151, - 0x0f0a0151, 0x0f0a0151, 0x0f0b0151, 0x0f0b0151, 0x0f0b0151, 0x0f0b0151, 0x0f0f0151, 0x0f0f0151, - 0x0f100151, 0x0f120151, 0x0f120151, 0x0f130151, 0x0f130151, 0x0f160151, 0x0f160151, 0x0f160151, - 0x0f160151, 0x0f160151, 0x0f160151, 0x0f1d0151, 0x0f1d0151, 0x0f1d0151, 0x0f1d0151, 0x0f200151, - 0x0f200151, 0x0f200151, 0x0f200151, 0x0f200151, 0x0f200151, 0x0f200151, 0x0f200151, 0x0f2d0151, - 0x0f2d0151, 0x0f2d0151, 0x0f2d0151, 0x0f2d0151, 0x0f2d0151, 0x0f320161, 0x0f320161, 0x0f320161, - 0x0f320161, 0x0f320161, 0x0f320161, 0x0f330151, 0x0f330151, 0x0f330151, 0x0f330151, 0x0f330151, - 0x0f330151, 0x0f390151, 0x0f390151, 0x0f390151, 0x0f390151, 0x0f490161, 0x0f490161, 0x0f490161, - 0x0f490161, 0x0f490161, 0x0f490161, 0x0eef0131, 0x0ef90131, 0x0f480151, 0x00006e31, 0x00006e31, - 0x00006e31, 0x00006e31, 0x00006e31, 0x00006e31, 0x0ed50141, 0x0ed50141, 0x0ed50141, 0x0ed50141, - 0x0ed50141, 0x0ed50141, 0x0ed70141, 0x0ed70141, 0x0ed70141, 0x0ed70141, 0x0ed70141, 0x0ed70141, - 0x0edc0141, 0x0edc0141, 0x0edc0141, 0x0edc0141, 0x0edc0141, 0x0edc0141, 0x0edd0141, 0x0edd0141, - 0x0edd0141, 0x0edd0141, 0x0edd0141, 0x0edd0141, 0x0f160141, 0x0f160141, 0x0f1d0141, 0x0f1d0141, - 0x0f200141, 0x0f200141, 0x0f200141, 0x0f200141, 0x0f200141, 0x0f2d0141, 0x0f2d0141, 0x0f2d0141, - 0x0f320151, 0x0f320151, 0x0f330141, 0x0f330141, 0x0f330141, 0x0f330141, 0x0f330141, 0x0f330141, - 0x0f480141, 0x0f490151, 0x0f490151, 0x0f490151, 0x0f490151, 0x0f490151, 0x0f490151, 0x0ed50121, - 0x0ed50121, 0x0ed50121, 0x0ed50121, 0x0ed50121, 0x0ed70121, 0x0ed70121, 0x0ed70121, 0x0ed70121, - 0x0ed70121, 0x0edc0121, 0x0edc0121, 0x0edc0121, 0x0edc0121, 0x0edc0121, 0x0edd0121, 0x0ee30121, - 0x0ee30121, 0x0ee90121, 0x0ee90121, 0x0eea0121, 0x0eea0121, 0x0f040121, 0x0f040121, 0x0f040121, - 0x0f040121, 0x0f0a0121, 0x0f0a0121, 0x0f0a0121, 0x0f0b0121, 0x0f0b0121, 0x0f0b0121, 0x0f0b0121, - 0x0f0f0121, 0x0f100121, 0x0f120121, 0x0f120121, 0x0f130121, 0x0f130121, 0x0f160121, 0x0f160121, - 0x0f160121, 0x0f160121, 0x0f1d0121, 0x0f1d0121, 0x0f200121, 0x0f200121, 0x0f200121, 0x0f200121, - 0x0f200121, 0x0f2d0121, 0x0f2d0121, 0x0f2d0121, 0x0f2d0121, 0x0f2d0121, 0x0f320131, 0x0f320131, - 0x0f320131, 0x0f320131, 0x0f330121, 0x0f330121, 0x0f330121, 0x0f330121, 0x0f330121, 0x0f390121, - 0x0f390121, 0x0f390121, 0x0f490131, 0x0f490131, 0x0f490131, 0x0f490131, 0x0f490131, 0x0ed50131, - 0x0ed50131, 0x0ed70131, 0x0ed70131, 0x0edc0131, 0x0edc0131, 0x0edd0131, 0x0edd0131, 0x0f040131, - 0x0f040131, 0x0f050131, 0x0f050131, 0x0f200131, 0x0f200131, 0x0f2d0131, 0x0f330131, 0x0f330131, - 0x0f490141, 0x0f490141, 0x00006e21, 0x00006e21, 0x00006e21, 0x0f0f0151, 0x0f0f0151, 0x0f120151, - 0x0f120151, 0x0f130151, 0x0f130151, 0x0f040151, 0x0f040151, 0x0f050151, 0x0f050151, 0x0ee90151, - /* 0xfd00 .. 0xfdff */ - 0x0ee90151, 0x0ee30151, 0x0ee30151, 0x0eea0151, 0x0eea0151, 0x0f0a0151, 0x0f0a0151, 0x0f0b0151, - 0x0f0b0151, 0x0f050151, 0x0f050151, 0x0f050151, 0x0f050151, 0x0f050151, 0x0f040151, 0x0f0a0151, - 0x0f0b0151, 0x0f0f0141, 0x0f0f0141, 0x0f120141, 0x0f120141, 0x0f130141, 0x0f130141, 0x0f040141, - 0x0f040141, 0x0f050141, 0x0f050141, 0x0ee90141, 0x0ee90141, 0x0ee30141, 0x0ee30141, 0x0eea0141, - 0x0eea0141, 0x0f0a0141, 0x0f0a0141, 0x0f0b0141, 0x0f0b0141, 0x0f050141, 0x0f050141, 0x0f050141, - 0x0f050141, 0x0f050141, 0x0f040141, 0x0f0a0141, 0x0f0b0141, 0x0f050121, 0x0f050121, 0x0f050121, - 0x0f050121, 0x0f040121, 0x0f050121, 0x0f0f0121, 0x0f040131, 0x0f040131, 0x0f040131, 0x0f050131, - 0x0f050131, 0x0f050131, 0x0f0f0131, 0x0f100131, 0x0ed60131, 0x0ed60141, 0x029a0111, 0x029b0111, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x0edc0121, 0x0edc0141, 0x0edc0121, 0x0edc0121, 0x0edc0121, 0x0edc0121, 0x0edc0121, 0x0edc0121, - 0x0ee30141, 0x0ee30121, 0x0ee90141, 0x0ee90141, 0x0f040121, 0x0f040121, 0x0f040141, 0x0f040141, - 0x0f040121, 0x0f040121, 0x0f040141, 0x0f040121, 0x0f0a0141, 0x0f0a0121, 0x0f0a0141, 0x0f050141, - 0x0f050121, 0x0f050141, 0x0f050141, 0x0f050121, 0x0f050141, 0x0f050121, 0x0f0b0141, 0x0f0b0141, - 0x0f0b0121, 0x0f0f0141, 0x0f0f0121, 0x0f0f0121, 0x0f0f0141, 0x0f120141, 0x0f120141, 0x0f120121, - 0x0f120141, 0x0f130141, 0x0f130141, 0x0f130141, 0x0f160141, 0x0f160121, 0x0f1d0141, 0x0f1d0141, - 0x0f2d0141, 0x0f2d0141, 0x0f2d0141, 0x0f2d0121, 0x0f2d0141, 0x0f2d0141, 0x0f2d0121, 0x0f2d0141, - 0x0f2d0121, 0x0f320131, 0x0f320131, 0x0f320151, 0x0f320131, 0x0f320131, 0x0f320131, 0x0f320131, - 0xffffffff, 0xffffffff, 0x0f320131, 0x0f390121, 0x0f390121, 0x0f330121, 0x0f330141, 0x0f330141, - 0x0f330121, 0x0f330141, 0x0f330141, 0x0f330141, 0x0f490151, 0x0f490131, 0x0ed70141, 0x0edc0141, - 0x0edc0141, 0x0edc0141, 0x0edc0141, 0x0edc0141, 0x0edc0141, 0x0ee30141, 0x0ee30141, 0x0ee30141, - 0x0f040141, 0x0f0a0141, 0x0f050141, 0x0f0b0141, 0x0f2d0141, 0x0f2d0141, 0x0f490151, 0x0f490151, - 0x0f490151, 0x0f320151, 0x0f1d0141, 0x0f330141, 0x0f1d0121, 0x0f2d0121, 0x0f120141, 0x0f200141, - 0x0f330121, 0x0f320151, 0x0f2d0121, 0x0f200141, 0x0f2d0141, 0x0f330141, 0x0ee30141, 0x0ee90141, - 0x0f320151, 0x0f160141, 0x0ed70141, 0x0f200121, 0x0f120121, 0x0f0a0121, 0x0f040141, 0x0f330141, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x0f0a0151, 0x0f1d0151, 0x0ed60141, 0x0ed60141, 0x0f320161, 0x0f0a0151, 0x0ef90131, 0x0f120151, - 0x0f3e0141, 0x0f0a0151, 0x0f0a0151, 0x0ee30151, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - /* 0xfe00 .. 0xfeff */ - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x00005011, 0x00005111, 0x00005211, 0x00005311, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x02550151, 0x02280131, 0x02270121, 0x021b0141, 0x021b0141, 0x027a0171, 0x027b0161, 0x027e0141, - 0x027f0141, 0x02920131, 0x02930131, 0x02900121, 0x02910121, 0x028a0121, 0x028b0121, 0x02880121, - 0x02890121, 0x028c0131, 0x028d0131, 0x028e0121, 0x028f0121, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0x02110121, 0x02110121, 0x02110121, 0x02110121, 0x021b0131, 0x021b0131, 0x021b0131, - 0x022d0131, 0x02340121, 0x02550141, 0xffffffff, 0x02350131, 0x02370131, 0x024e0141, 0x024b0141, - 0x02280121, 0x027a0141, 0x027b0131, 0x027e0131, 0x027f0131, 0x02920121, 0x02930121, 0x02a90131, - 0x02a70131, 0x02a20131, 0x039f0141, 0x02210131, 0x03a30131, 0x03a50131, 0x03a40131, 0xffffffff, - 0x02a60131, 0x09e00131, 0x02aa0131, 0x02a10131, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x00006831, 0x00006821, 0x00006921, 0xffffffff, 0x00006a21, 0xffffffff, 0x00006b31, 0x00006b21, - 0x00006c31, 0x00006c21, 0x00006d31, 0x00006d21, 0x00006e31, 0x00006e21, 0x00006f31, 0x00006f21, - 0x0ecd0131, 0x0ece0131, 0x0ece0121, 0x0ecf0131, 0x0ecf0121, 0x0ed20131, 0x0ed20121, 0x0ed30131, - 0x0ed30121, 0x0ed50151, 0x0ed50141, 0x0ed50121, 0x0ed50131, 0x0ed60141, 0x0ed60131, 0x0ed70151, - 0x0ed70141, 0x0ed70121, 0x0ed70131, 0x0edb0131, 0x0edb0121, 0x0edc0151, 0x0edc0141, 0x0edc0121, - 0x0edc0131, 0x0edd0151, 0x0edd0141, 0x0edd0121, 0x0edd0131, 0x0ee30151, 0x0ee30141, 0x0ee30121, - 0x0ee30131, 0x0ee90151, 0x0ee90141, 0x0ee90121, 0x0ee90131, 0x0eea0151, 0x0eea0141, 0x0eea0121, - 0x0eea0131, 0x0eee0131, 0x0eee0121, 0x0eef0131, 0x0eef0121, 0x0ef90131, 0x0ef90121, 0x0efa0131, - 0x0efa0121, 0x0f040151, 0x0f040141, 0x0f040121, 0x0f040131, 0x0f050151, 0x0f050141, 0x0f050121, - 0x0f050131, 0x0f0a0151, 0x0f0a0141, 0x0f0a0121, 0x0f0a0131, 0x0f0b0151, 0x0f0b0141, 0x0f0b0121, - 0x0f0b0131, 0x0f0f0151, 0x0f0f0141, 0x0f0f0121, 0x0f0f0131, 0x0f100151, 0x0f100141, 0x0f100121, - 0x0f100131, 0x0f120151, 0x0f120141, 0x0f120121, 0x0f120131, 0x0f130151, 0x0f130141, 0x0f130121, - 0x0f130131, 0x0f160151, 0x0f160141, 0x0f160121, 0x0f160131, 0x0f1d0151, 0x0f1d0141, 0x0f1d0121, - 0x0f1d0131, 0x0f200151, 0x0f200141, 0x0f200121, 0x0f200131, 0x0f2d0151, 0x0f2d0141, 0x0f2d0121, - 0x0f2d0131, 0x0f320161, 0x0f320151, 0x0f320131, 0x0f320141, 0x0f330151, 0x0f330141, 0x0f330121, - 0x0f330131, 0x0f390151, 0x0f390141, 0x0f390121, 0x0f390131, 0x0f3e0141, 0x0f3e0131, 0x0f480151, - 0x0f480141, 0x0f490161, 0x0f490151, 0x0f490131, 0x0f490141, 0x0f2d0151, 0x0f2d0141, 0x0f2d0151, - 0x0f2d0141, 0x0f2d0151, 0x0f2d0141, 0x0f2d0151, 0x0f2d0141, 0xffffffff, 0xffffffff, 0x00000000, - /* 0xff00 .. 0xffff */ - 0xffffffff, 0x024b0121, 0x02700121, 0x02a90121, 0x09e00121, 0x02aa0121, 0x02a70121, 0x02690121, - 0x027a0121, 0x027b0121, 0x02a20121, 0x039f0121, 0x022d0121, 0x02210121, 0x02550121, 0x02a40121, - 0x0a0b0121, 0x0a0c0121, 0x0a0d0121, 0x0a0e0121, 0x0a0f0121, 0x0a100121, 0x0a110121, 0x0a120121, - 0x0a130121, 0x0a140121, 0x02370121, 0x02350121, 0x03a30121, 0x03a40121, 0x03a50121, 0x024e0121, - 0x02a10121, 0x0a150161, 0x0a290151, 0x0a3d0161, 0x0a490161, 0x0a650161, 0x0a910161, 0x0a990161, - 0x0ab90161, 0x0ad30171, 0x0ae70151, 0x0af70151, 0x0b030171, 0x0b2b0161, 0x0b330161, 0x0b4b0171, - 0x0b670151, 0x0b730151, 0x0b7f0151, 0x0ba70161, 0x0bbf0161, 0x0bd70151, 0x0bef0161, 0x0bfb0151, - 0x0c030161, 0x0c070151, 0x0c130151, 0x027c0121, 0x02a60121, 0x027d0121, 0x020f0121, 0x021b0121, - 0x020c0121, 0x0a150121, 0x0a290121, 0x0a3d0121, 0x0a490121, 0x0a650121, 0x0a910121, 0x0a990121, - 0x0ab90121, 0x0ad30121, 0x0ae70121, 0x0af70121, 0x0b030121, 0x0b2b0121, 0x0b330121, 0x0b4b0121, - 0x0b670121, 0x0b730121, 0x0b7f0121, 0x0ba70121, 0x0bbf0121, 0x0bd70121, 0x0bef0121, 0x0bfb0121, - 0x0c030121, 0x0c070121, 0x0c130121, 0x027e0121, 0x03a70121, 0x027f0121, 0x03aa0121, 0xffffffff, - 0xffffffff, 0x025e0121, 0x028c0121, 0x028d0121, 0x02340131, 0x022c0121, 0x194f0131, 0x19210141, - 0x19220141, 0x19230141, 0x19240141, 0x19250141, 0x19440141, 0x19450141, 0x19460141, 0x19320141, - 0x09dc0121, 0x19210161, 0x19220161, 0x19230161, 0x19240161, 0x19250161, 0x19260141, 0x19270131, - 0x19280131, 0x19290141, 0x192a0131, 0x192b0131, 0x192c0141, 0x192d0131, 0x192e0131, 0x192f0131, - 0x19300131, 0x19310131, 0x19320161, 0x19330131, 0x19340131, 0x19350131, 0x19360131, 0x19370131, - 0x19380131, 0x19390131, 0x193a0131, 0x193b0131, 0x193c0131, 0x193d0131, 0x193e0131, 0x193f0131, - 0x19400131, 0x19410131, 0x19420131, 0x19430131, 0x19440161, 0x19450161, 0x19460161, 0x19470131, - 0x19480131, 0x19490131, 0x194a0131, 0x194b0131, 0x194c0151, 0x19500131, 0x0000e221, 0x0000e321, - 0x188c0131, 0x18310141, 0x18320131, 0x18d10131, 0x18330141, 0x18d30131, 0x18d40131, 0x18340141, - 0x18350131, 0x18360141, 0x18d70131, 0x18d80131, 0x18d90131, 0x18da0131, 0x18db0131, 0x18dc0131, - 0x184b0131, 0x18370141, 0x18380141, 0x18390131, 0x18520131, 0x183a0141, 0x183b0131, 0x183c0141, - 0x183d0141, 0x183e0131, 0x183f0141, 0x18400141, 0x18410141, 0x18420141, 0x18430141, 0xffffffff, - 0xffffffff, 0xffffffff, 0x188d0131, 0x188e0131, 0x188f0131, 0x18900131, 0x18910131, 0x18920131, - 0xffffffff, 0xffffffff, 0x18930131, 0x18940131, 0x18950131, 0x18960131, 0x18970131, 0x18980131, - 0xffffffff, 0xffffffff, 0x18990131, 0x189a0131, 0x189b0131, 0x189c0131, 0x189d0131, 0x189e0131, - 0xffffffff, 0xffffffff, 0x189f0131, 0x18a00131, 0x18a10131, 0xffffffff, 0xffffffff, 0xffffffff, - 0x09df0121, 0x09e10121, 0x03a60121, 0x02100121, 0x03a80121, 0x09e20121, 0x09ef0121, 0xffffffff, - 0x05300121, 0x03320121, 0x03340121, 0x03330121, 0x03350121, 0x05c40121, 0x05ef0121, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x09bf0111, 0x09c00111, 0xffffffff, 0xffffffff -}; diff --git a/reactos/tools/unicode/compose.c b/reactos/tools/unicode/compose.c deleted file mode 100644 index be886d0390d..00000000000 --- a/reactos/tools/unicode/compose.c +++ /dev/null @@ -1,1125 +0,0 @@ -/* Unicode char composition */ -/* Automatically generated; DO NOT EDIT!! */ - -#include "wine/unicode.h" - -const WCHAR unicode_compose_table[0x85e] = -{ - /* second chars + offsets */ - 0x0300, 0x0047, 0x0301, 0x009b, 0x0302, 0x0111, 0x0303, 0x0131, - 0x0304, 0x014d, 0x0306, 0x0179, 0x0307, 0x0199, 0x0308, 0x01c7, - 0x0309, 0x01fd, 0x030a, 0x0215, 0x030b, 0x021b, 0x030c, 0x0221, - 0x030f, 0x0246, 0x0311, 0x0254, 0x0313, 0x0260, 0x0314, 0x026e, - 0x031b, 0x027e, 0x0323, 0x0282, 0x0324, 0x02ac, 0x0325, 0x02ae, - 0x0326, 0x02b0, 0x0327, 0x02b4, 0x0328, 0x02ca, 0x032d, 0x02d4, - 0x032e, 0x02e0, 0x0330, 0x02e2, 0x0331, 0x02e8, 0x0338, 0x02f9, - 0x0342, 0x0326, 0x0345, 0x0343, 0x05b4, 0x0382, 0x05b7, 0x0383, - 0x05b8, 0x0385, 0x05b9, 0x0386, 0x05bc, 0x0387, 0x05bf, 0x039d, - 0x05c1, 0x03a0, 0x05c2, 0x03a2, 0x0653, 0x03a4, 0x0654, 0x03a5, - 0x0655, 0x03ab, 0x093c, 0x03ac, 0x09bc, 0x03b7, 0x09be, 0x03ba, - 0x09d7, 0x03bb, 0x0a3c, 0x03bc, 0x0b3c, 0x03c2, 0x0b3e, 0x03c4, - 0x0b56, 0x03c5, 0x0b57, 0x03c6, 0x0bbe, 0x03c7, 0x0bd7, 0x03c9, - 0x0c56, 0x03cb, 0x0cc2, 0x03cc, 0x0cd5, 0x03cd, 0x0cd6, 0x03d0, - 0x0d3e, 0x03d1, 0x0d57, 0x03d3, 0x0dca, 0x03d4, 0x0dcf, 0x03d6, - 0x0ddf, 0x03d7, 0x0f72, 0x03d8, 0x0f74, 0x03d9, 0x0f80, 0x03da, - 0x0fb5, 0x03dd, 0x0fb7, 0x03df, 0x102e, 0x03e9, 0x1b35, 0x03ea, - 0x3099, 0x03f5, 0x309a, 0x0425, 0x0000, 0x042f, - /* 0x0300 */ - 0x0041, 0x00c0, 0x0045, 0x00c8, 0x0049, 0x00cc, 0x004e, 0x01f8, - 0x004f, 0x00d2, 0x0055, 0x00d9, 0x0057, 0x1e80, 0x0059, 0x1ef2, - 0x0061, 0x00e0, 0x0065, 0x00e8, 0x0069, 0x00ec, 0x006e, 0x01f9, - 0x006f, 0x00f2, 0x0075, 0x00f9, 0x0077, 0x1e81, 0x0079, 0x1ef3, - 0x00a8, 0x1fed, 0x00c2, 0x1ea6, 0x00ca, 0x1ec0, 0x00d4, 0x1ed2, - 0x00dc, 0x01db, 0x00e2, 0x1ea7, 0x00ea, 0x1ec1, 0x00f4, 0x1ed3, - 0x00fc, 0x01dc, 0x0102, 0x1eb0, 0x0103, 0x1eb1, 0x0112, 0x1e14, - 0x0113, 0x1e15, 0x014c, 0x1e50, 0x014d, 0x1e51, 0x01a0, 0x1edc, - 0x01a1, 0x1edd, 0x01af, 0x1eea, 0x01b0, 0x1eeb, 0x0391, 0x1fba, - 0x0395, 0x1fc8, 0x0397, 0x1fca, 0x0399, 0x1fda, 0x039f, 0x1ff8, - 0x03a5, 0x1fea, 0x03a9, 0x1ffa, 0x03b1, 0x1f70, 0x03b5, 0x1f72, - 0x03b7, 0x1f74, 0x03b9, 0x1f76, 0x03bf, 0x1f78, 0x03c5, 0x1f7a, - 0x03c9, 0x1f7c, 0x03ca, 0x1fd2, 0x03cb, 0x1fe2, 0x0415, 0x0400, - 0x0418, 0x040d, 0x0435, 0x0450, 0x0438, 0x045d, 0x1f00, 0x1f02, - 0x1f01, 0x1f03, 0x1f08, 0x1f0a, 0x1f09, 0x1f0b, 0x1f10, 0x1f12, - 0x1f11, 0x1f13, 0x1f18, 0x1f1a, 0x1f19, 0x1f1b, 0x1f20, 0x1f22, - 0x1f21, 0x1f23, 0x1f28, 0x1f2a, 0x1f29, 0x1f2b, 0x1f30, 0x1f32, - 0x1f31, 0x1f33, 0x1f38, 0x1f3a, 0x1f39, 0x1f3b, 0x1f40, 0x1f42, - 0x1f41, 0x1f43, 0x1f48, 0x1f4a, 0x1f49, 0x1f4b, 0x1f50, 0x1f52, - 0x1f51, 0x1f53, 0x1f59, 0x1f5b, 0x1f60, 0x1f62, 0x1f61, 0x1f63, - 0x1f68, 0x1f6a, 0x1f69, 0x1f6b, 0x1fbf, 0x1fcd, 0x1ffe, 0x1fdd, - /* 0x0301 */ - 0x0041, 0x00c1, 0x0043, 0x0106, 0x0045, 0x00c9, 0x0047, 0x01f4, - 0x0049, 0x00cd, 0x004b, 0x1e30, 0x004c, 0x0139, 0x004d, 0x1e3e, - 0x004e, 0x0143, 0x004f, 0x00d3, 0x0050, 0x1e54, 0x0052, 0x0154, - 0x0053, 0x015a, 0x0055, 0x00da, 0x0057, 0x1e82, 0x0059, 0x00dd, - 0x005a, 0x0179, 0x0061, 0x00e1, 0x0063, 0x0107, 0x0065, 0x00e9, - 0x0067, 0x01f5, 0x0069, 0x00ed, 0x006b, 0x1e31, 0x006c, 0x013a, - 0x006d, 0x1e3f, 0x006e, 0x0144, 0x006f, 0x00f3, 0x0070, 0x1e55, - 0x0072, 0x0155, 0x0073, 0x015b, 0x0075, 0x00fa, 0x0077, 0x1e83, - 0x0079, 0x00fd, 0x007a, 0x017a, 0x00a8, 0x0385, 0x00c2, 0x1ea4, - 0x00c5, 0x01fa, 0x00c6, 0x01fc, 0x00c7, 0x1e08, 0x00ca, 0x1ebe, - 0x00cf, 0x1e2e, 0x00d4, 0x1ed0, 0x00d5, 0x1e4c, 0x00d8, 0x01fe, - 0x00dc, 0x01d7, 0x00e2, 0x1ea5, 0x00e5, 0x01fb, 0x00e6, 0x01fd, - 0x00e7, 0x1e09, 0x00ea, 0x1ebf, 0x00ef, 0x1e2f, 0x00f4, 0x1ed1, - 0x00f5, 0x1e4d, 0x00f8, 0x01ff, 0x00fc, 0x01d8, 0x0102, 0x1eae, - 0x0103, 0x1eaf, 0x0112, 0x1e16, 0x0113, 0x1e17, 0x014c, 0x1e52, - 0x014d, 0x1e53, 0x0168, 0x1e78, 0x0169, 0x1e79, 0x01a0, 0x1eda, - 0x01a1, 0x1edb, 0x01af, 0x1ee8, 0x01b0, 0x1ee9, 0x0308, 0x0344, - 0x0391, 0x0386, 0x0395, 0x0388, 0x0397, 0x0389, 0x0399, 0x038a, - 0x039f, 0x038c, 0x03a5, 0x038e, 0x03a9, 0x038f, 0x03b1, 0x03ac, - 0x03b5, 0x03ad, 0x03b7, 0x03ae, 0x03b9, 0x03af, 0x03bf, 0x03cc, - 0x03c5, 0x03cd, 0x03c9, 0x03ce, 0x03ca, 0x0390, 0x03cb, 0x03b0, - 0x03d2, 0x03d3, 0x0413, 0x0403, 0x041a, 0x040c, 0x0433, 0x0453, - 0x043a, 0x045c, 0x1f00, 0x1f04, 0x1f01, 0x1f05, 0x1f08, 0x1f0c, - 0x1f09, 0x1f0d, 0x1f10, 0x1f14, 0x1f11, 0x1f15, 0x1f18, 0x1f1c, - 0x1f19, 0x1f1d, 0x1f20, 0x1f24, 0x1f21, 0x1f25, 0x1f28, 0x1f2c, - 0x1f29, 0x1f2d, 0x1f30, 0x1f34, 0x1f31, 0x1f35, 0x1f38, 0x1f3c, - 0x1f39, 0x1f3d, 0x1f40, 0x1f44, 0x1f41, 0x1f45, 0x1f48, 0x1f4c, - 0x1f49, 0x1f4d, 0x1f50, 0x1f54, 0x1f51, 0x1f55, 0x1f59, 0x1f5d, - 0x1f60, 0x1f64, 0x1f61, 0x1f65, 0x1f68, 0x1f6c, 0x1f69, 0x1f6d, - 0x1fbf, 0x1fce, 0x1ffe, 0x1fde, - /* 0x0302 */ - 0x0041, 0x00c2, 0x0043, 0x0108, 0x0045, 0x00ca, 0x0047, 0x011c, - 0x0048, 0x0124, 0x0049, 0x00ce, 0x004a, 0x0134, 0x004f, 0x00d4, - 0x0053, 0x015c, 0x0055, 0x00db, 0x0057, 0x0174, 0x0059, 0x0176, - 0x005a, 0x1e90, 0x0061, 0x00e2, 0x0063, 0x0109, 0x0065, 0x00ea, - 0x0067, 0x011d, 0x0068, 0x0125, 0x0069, 0x00ee, 0x006a, 0x0135, - 0x006f, 0x00f4, 0x0073, 0x015d, 0x0075, 0x00fb, 0x0077, 0x0175, - 0x0079, 0x0177, 0x007a, 0x1e91, 0x1ea0, 0x1eac, 0x1ea1, 0x1ead, - 0x1eb8, 0x1ec6, 0x1eb9, 0x1ec7, 0x1ecc, 0x1ed8, 0x1ecd, 0x1ed9, - /* 0x0303 */ - 0x0041, 0x00c3, 0x0045, 0x1ebc, 0x0049, 0x0128, 0x004e, 0x00d1, - 0x004f, 0x00d5, 0x0055, 0x0168, 0x0056, 0x1e7c, 0x0059, 0x1ef8, - 0x0061, 0x00e3, 0x0065, 0x1ebd, 0x0069, 0x0129, 0x006e, 0x00f1, - 0x006f, 0x00f5, 0x0075, 0x0169, 0x0076, 0x1e7d, 0x0079, 0x1ef9, - 0x00c2, 0x1eaa, 0x00ca, 0x1ec4, 0x00d4, 0x1ed6, 0x00e2, 0x1eab, - 0x00ea, 0x1ec5, 0x00f4, 0x1ed7, 0x0102, 0x1eb4, 0x0103, 0x1eb5, - 0x01a0, 0x1ee0, 0x01a1, 0x1ee1, 0x01af, 0x1eee, 0x01b0, 0x1eef, - /* 0x0304 */ - 0x0041, 0x0100, 0x0045, 0x0112, 0x0047, 0x1e20, 0x0049, 0x012a, - 0x004f, 0x014c, 0x0055, 0x016a, 0x0059, 0x0232, 0x0061, 0x0101, - 0x0065, 0x0113, 0x0067, 0x1e21, 0x0069, 0x012b, 0x006f, 0x014d, - 0x0075, 0x016b, 0x0079, 0x0233, 0x00c4, 0x01de, 0x00c6, 0x01e2, - 0x00d5, 0x022c, 0x00d6, 0x022a, 0x00dc, 0x01d5, 0x00e4, 0x01df, - 0x00e6, 0x01e3, 0x00f5, 0x022d, 0x00f6, 0x022b, 0x00fc, 0x01d6, - 0x01ea, 0x01ec, 0x01eb, 0x01ed, 0x0226, 0x01e0, 0x0227, 0x01e1, - 0x022e, 0x0230, 0x022f, 0x0231, 0x0391, 0x1fb9, 0x0399, 0x1fd9, - 0x03a5, 0x1fe9, 0x03b1, 0x1fb1, 0x03b9, 0x1fd1, 0x03c5, 0x1fe1, - 0x0418, 0x04e2, 0x0423, 0x04ee, 0x0438, 0x04e3, 0x0443, 0x04ef, - 0x1e36, 0x1e38, 0x1e37, 0x1e39, 0x1e5a, 0x1e5c, 0x1e5b, 0x1e5d, - /* 0x0306 */ - 0x0041, 0x0102, 0x0045, 0x0114, 0x0047, 0x011e, 0x0049, 0x012c, - 0x004f, 0x014e, 0x0055, 0x016c, 0x0061, 0x0103, 0x0065, 0x0115, - 0x0067, 0x011f, 0x0069, 0x012d, 0x006f, 0x014f, 0x0075, 0x016d, - 0x0228, 0x1e1c, 0x0229, 0x1e1d, 0x0391, 0x1fb8, 0x0399, 0x1fd8, - 0x03a5, 0x1fe8, 0x03b1, 0x1fb0, 0x03b9, 0x1fd0, 0x03c5, 0x1fe0, - 0x0410, 0x04d0, 0x0415, 0x04d6, 0x0416, 0x04c1, 0x0418, 0x0419, - 0x0423, 0x040e, 0x0430, 0x04d1, 0x0435, 0x04d7, 0x0436, 0x04c2, - 0x0438, 0x0439, 0x0443, 0x045e, 0x1ea0, 0x1eb6, 0x1ea1, 0x1eb7, - /* 0x0307 */ - 0x0041, 0x0226, 0x0042, 0x1e02, 0x0043, 0x010a, 0x0044, 0x1e0a, - 0x0045, 0x0116, 0x0046, 0x1e1e, 0x0047, 0x0120, 0x0048, 0x1e22, - 0x0049, 0x0130, 0x004d, 0x1e40, 0x004e, 0x1e44, 0x004f, 0x022e, - 0x0050, 0x1e56, 0x0052, 0x1e58, 0x0053, 0x1e60, 0x0054, 0x1e6a, - 0x0057, 0x1e86, 0x0058, 0x1e8a, 0x0059, 0x1e8e, 0x005a, 0x017b, - 0x0061, 0x0227, 0x0062, 0x1e03, 0x0063, 0x010b, 0x0064, 0x1e0b, - 0x0065, 0x0117, 0x0066, 0x1e1f, 0x0067, 0x0121, 0x0068, 0x1e23, - 0x006d, 0x1e41, 0x006e, 0x1e45, 0x006f, 0x022f, 0x0070, 0x1e57, - 0x0072, 0x1e59, 0x0073, 0x1e61, 0x0074, 0x1e6b, 0x0077, 0x1e87, - 0x0078, 0x1e8b, 0x0079, 0x1e8f, 0x007a, 0x017c, 0x015a, 0x1e64, - 0x015b, 0x1e65, 0x0160, 0x1e66, 0x0161, 0x1e67, 0x017f, 0x1e9b, - 0x1e62, 0x1e68, 0x1e63, 0x1e69, - /* 0x0308 */ - 0x0041, 0x00c4, 0x0045, 0x00cb, 0x0048, 0x1e26, 0x0049, 0x00cf, - 0x004f, 0x00d6, 0x0055, 0x00dc, 0x0057, 0x1e84, 0x0058, 0x1e8c, - 0x0059, 0x0178, 0x0061, 0x00e4, 0x0065, 0x00eb, 0x0068, 0x1e27, - 0x0069, 0x00ef, 0x006f, 0x00f6, 0x0074, 0x1e97, 0x0075, 0x00fc, - 0x0077, 0x1e85, 0x0078, 0x1e8d, 0x0079, 0x00ff, 0x00d5, 0x1e4e, - 0x00f5, 0x1e4f, 0x016a, 0x1e7a, 0x016b, 0x1e7b, 0x0399, 0x03aa, - 0x03a5, 0x03ab, 0x03b9, 0x03ca, 0x03c5, 0x03cb, 0x03d2, 0x03d4, - 0x0406, 0x0407, 0x0410, 0x04d2, 0x0415, 0x0401, 0x0416, 0x04dc, - 0x0417, 0x04de, 0x0418, 0x04e4, 0x041e, 0x04e6, 0x0423, 0x04f0, - 0x0427, 0x04f4, 0x042b, 0x04f8, 0x042d, 0x04ec, 0x0430, 0x04d3, - 0x0435, 0x0451, 0x0436, 0x04dd, 0x0437, 0x04df, 0x0438, 0x04e5, - 0x043e, 0x04e7, 0x0443, 0x04f1, 0x0447, 0x04f5, 0x044b, 0x04f9, - 0x044d, 0x04ed, 0x0456, 0x0457, 0x04d8, 0x04da, 0x04d9, 0x04db, - 0x04e8, 0x04ea, 0x04e9, 0x04eb, - /* 0x0309 */ - 0x0041, 0x1ea2, 0x0045, 0x1eba, 0x0049, 0x1ec8, 0x004f, 0x1ece, - 0x0055, 0x1ee6, 0x0059, 0x1ef6, 0x0061, 0x1ea3, 0x0065, 0x1ebb, - 0x0069, 0x1ec9, 0x006f, 0x1ecf, 0x0075, 0x1ee7, 0x0079, 0x1ef7, - 0x00c2, 0x1ea8, 0x00ca, 0x1ec2, 0x00d4, 0x1ed4, 0x00e2, 0x1ea9, - 0x00ea, 0x1ec3, 0x00f4, 0x1ed5, 0x0102, 0x1eb2, 0x0103, 0x1eb3, - 0x01a0, 0x1ede, 0x01a1, 0x1edf, 0x01af, 0x1eec, 0x01b0, 0x1eed, - /* 0x030a */ - 0x0041, 0x00c5, 0x0055, 0x016e, 0x0061, 0x00e5, 0x0075, 0x016f, - 0x0077, 0x1e98, 0x0079, 0x1e99, - /* 0x030b */ - 0x004f, 0x0150, 0x0055, 0x0170, 0x006f, 0x0151, 0x0075, 0x0171, - 0x0423, 0x04f2, 0x0443, 0x04f3, - /* 0x030c */ - 0x0041, 0x01cd, 0x0043, 0x010c, 0x0044, 0x010e, 0x0045, 0x011a, - 0x0047, 0x01e6, 0x0048, 0x021e, 0x0049, 0x01cf, 0x004b, 0x01e8, - 0x004c, 0x013d, 0x004e, 0x0147, 0x004f, 0x01d1, 0x0052, 0x0158, - 0x0053, 0x0160, 0x0054, 0x0164, 0x0055, 0x01d3, 0x005a, 0x017d, - 0x0061, 0x01ce, 0x0063, 0x010d, 0x0064, 0x010f, 0x0065, 0x011b, - 0x0067, 0x01e7, 0x0068, 0x021f, 0x0069, 0x01d0, 0x006a, 0x01f0, - 0x006b, 0x01e9, 0x006c, 0x013e, 0x006e, 0x0148, 0x006f, 0x01d2, - 0x0072, 0x0159, 0x0073, 0x0161, 0x0074, 0x0165, 0x0075, 0x01d4, - 0x007a, 0x017e, 0x00dc, 0x01d9, 0x00fc, 0x01da, 0x01b7, 0x01ee, - 0x0292, 0x01ef, - /* 0x030f */ - 0x0041, 0x0200, 0x0045, 0x0204, 0x0049, 0x0208, 0x004f, 0x020c, - 0x0052, 0x0210, 0x0055, 0x0214, 0x0061, 0x0201, 0x0065, 0x0205, - 0x0069, 0x0209, 0x006f, 0x020d, 0x0072, 0x0211, 0x0075, 0x0215, - 0x0474, 0x0476, 0x0475, 0x0477, - /* 0x0311 */ - 0x0041, 0x0202, 0x0045, 0x0206, 0x0049, 0x020a, 0x004f, 0x020e, - 0x0052, 0x0212, 0x0055, 0x0216, 0x0061, 0x0203, 0x0065, 0x0207, - 0x0069, 0x020b, 0x006f, 0x020f, 0x0072, 0x0213, 0x0075, 0x0217, - /* 0x0313 */ - 0x0391, 0x1f08, 0x0395, 0x1f18, 0x0397, 0x1f28, 0x0399, 0x1f38, - 0x039f, 0x1f48, 0x03a9, 0x1f68, 0x03b1, 0x1f00, 0x03b5, 0x1f10, - 0x03b7, 0x1f20, 0x03b9, 0x1f30, 0x03bf, 0x1f40, 0x03c1, 0x1fe4, - 0x03c5, 0x1f50, 0x03c9, 0x1f60, - /* 0x0314 */ - 0x0391, 0x1f09, 0x0395, 0x1f19, 0x0397, 0x1f29, 0x0399, 0x1f39, - 0x039f, 0x1f49, 0x03a1, 0x1fec, 0x03a5, 0x1f59, 0x03a9, 0x1f69, - 0x03b1, 0x1f01, 0x03b5, 0x1f11, 0x03b7, 0x1f21, 0x03b9, 0x1f31, - 0x03bf, 0x1f41, 0x03c1, 0x1fe5, 0x03c5, 0x1f51, 0x03c9, 0x1f61, - /* 0x031b */ - 0x004f, 0x01a0, 0x0055, 0x01af, 0x006f, 0x01a1, 0x0075, 0x01b0, - /* 0x0323 */ - 0x0041, 0x1ea0, 0x0042, 0x1e04, 0x0044, 0x1e0c, 0x0045, 0x1eb8, - 0x0048, 0x1e24, 0x0049, 0x1eca, 0x004b, 0x1e32, 0x004c, 0x1e36, - 0x004d, 0x1e42, 0x004e, 0x1e46, 0x004f, 0x1ecc, 0x0052, 0x1e5a, - 0x0053, 0x1e62, 0x0054, 0x1e6c, 0x0055, 0x1ee4, 0x0056, 0x1e7e, - 0x0057, 0x1e88, 0x0059, 0x1ef4, 0x005a, 0x1e92, 0x0061, 0x1ea1, - 0x0062, 0x1e05, 0x0064, 0x1e0d, 0x0065, 0x1eb9, 0x0068, 0x1e25, - 0x0069, 0x1ecb, 0x006b, 0x1e33, 0x006c, 0x1e37, 0x006d, 0x1e43, - 0x006e, 0x1e47, 0x006f, 0x1ecd, 0x0072, 0x1e5b, 0x0073, 0x1e63, - 0x0074, 0x1e6d, 0x0075, 0x1ee5, 0x0076, 0x1e7f, 0x0077, 0x1e89, - 0x0079, 0x1ef5, 0x007a, 0x1e93, 0x01a0, 0x1ee2, 0x01a1, 0x1ee3, - 0x01af, 0x1ef0, 0x01b0, 0x1ef1, - /* 0x0324 */ - 0x0055, 0x1e72, 0x0075, 0x1e73, - /* 0x0325 */ - 0x0041, 0x1e00, 0x0061, 0x1e01, - /* 0x0326 */ - 0x0053, 0x0218, 0x0054, 0x021a, 0x0073, 0x0219, 0x0074, 0x021b, - /* 0x0327 */ - 0x0043, 0x00c7, 0x0044, 0x1e10, 0x0045, 0x0228, 0x0047, 0x0122, - 0x0048, 0x1e28, 0x004b, 0x0136, 0x004c, 0x013b, 0x004e, 0x0145, - 0x0052, 0x0156, 0x0053, 0x015e, 0x0054, 0x0162, 0x0063, 0x00e7, - 0x0064, 0x1e11, 0x0065, 0x0229, 0x0067, 0x0123, 0x0068, 0x1e29, - 0x006b, 0x0137, 0x006c, 0x013c, 0x006e, 0x0146, 0x0072, 0x0157, - 0x0073, 0x015f, 0x0074, 0x0163, - /* 0x0328 */ - 0x0041, 0x0104, 0x0045, 0x0118, 0x0049, 0x012e, 0x004f, 0x01ea, - 0x0055, 0x0172, 0x0061, 0x0105, 0x0065, 0x0119, 0x0069, 0x012f, - 0x006f, 0x01eb, 0x0075, 0x0173, - /* 0x032d */ - 0x0044, 0x1e12, 0x0045, 0x1e18, 0x004c, 0x1e3c, 0x004e, 0x1e4a, - 0x0054, 0x1e70, 0x0055, 0x1e76, 0x0064, 0x1e13, 0x0065, 0x1e19, - 0x006c, 0x1e3d, 0x006e, 0x1e4b, 0x0074, 0x1e71, 0x0075, 0x1e77, - /* 0x032e */ - 0x0048, 0x1e2a, 0x0068, 0x1e2b, - /* 0x0330 */ - 0x0045, 0x1e1a, 0x0049, 0x1e2c, 0x0055, 0x1e74, 0x0065, 0x1e1b, - 0x0069, 0x1e2d, 0x0075, 0x1e75, - /* 0x0331 */ - 0x0042, 0x1e06, 0x0044, 0x1e0e, 0x004b, 0x1e34, 0x004c, 0x1e3a, - 0x004e, 0x1e48, 0x0052, 0x1e5e, 0x0054, 0x1e6e, 0x005a, 0x1e94, - 0x0062, 0x1e07, 0x0064, 0x1e0f, 0x0068, 0x1e96, 0x006b, 0x1e35, - 0x006c, 0x1e3b, 0x006e, 0x1e49, 0x0072, 0x1e5f, 0x0074, 0x1e6f, - 0x007a, 0x1e95, - /* 0x0338 */ - 0x003c, 0x226e, 0x003d, 0x2260, 0x003e, 0x226f, 0x2190, 0x219a, - 0x2192, 0x219b, 0x2194, 0x21ae, 0x21d0, 0x21cd, 0x21d2, 0x21cf, - 0x21d4, 0x21ce, 0x2203, 0x2204, 0x2208, 0x2209, 0x220b, 0x220c, - 0x2223, 0x2224, 0x2225, 0x2226, 0x223c, 0x2241, 0x2243, 0x2244, - 0x2245, 0x2247, 0x2248, 0x2249, 0x224d, 0x226d, 0x2261, 0x2262, - 0x2264, 0x2270, 0x2265, 0x2271, 0x2272, 0x2274, 0x2273, 0x2275, - 0x2276, 0x2278, 0x2277, 0x2279, 0x227a, 0x2280, 0x227b, 0x2281, - 0x227c, 0x22e0, 0x227d, 0x22e1, 0x2282, 0x2284, 0x2283, 0x2285, - 0x2286, 0x2288, 0x2287, 0x2289, 0x2291, 0x22e2, 0x2292, 0x22e3, - 0x22a2, 0x22ac, 0x22a8, 0x22ad, 0x22a9, 0x22ae, 0x22ab, 0x22af, - 0x22b2, 0x22ea, 0x22b3, 0x22eb, 0x22b4, 0x22ec, 0x22b5, 0x22ed, - 0x2add, 0x2adc, - /* 0x0342 */ - 0x00a8, 0x1fc1, 0x03b1, 0x1fb6, 0x03b7, 0x1fc6, 0x03b9, 0x1fd6, - 0x03c5, 0x1fe6, 0x03c9, 0x1ff6, 0x03ca, 0x1fd7, 0x03cb, 0x1fe7, - 0x1f00, 0x1f06, 0x1f01, 0x1f07, 0x1f08, 0x1f0e, 0x1f09, 0x1f0f, - 0x1f20, 0x1f26, 0x1f21, 0x1f27, 0x1f28, 0x1f2e, 0x1f29, 0x1f2f, - 0x1f30, 0x1f36, 0x1f31, 0x1f37, 0x1f38, 0x1f3e, 0x1f39, 0x1f3f, - 0x1f50, 0x1f56, 0x1f51, 0x1f57, 0x1f59, 0x1f5f, 0x1f60, 0x1f66, - 0x1f61, 0x1f67, 0x1f68, 0x1f6e, 0x1f69, 0x1f6f, 0x1fbf, 0x1fcf, - 0x1ffe, 0x1fdf, - /* 0x0345 */ - 0x0391, 0x1fbc, 0x0397, 0x1fcc, 0x03a9, 0x1ffc, 0x03ac, 0x1fb4, - 0x03ae, 0x1fc4, 0x03b1, 0x1fb3, 0x03b7, 0x1fc3, 0x03c9, 0x1ff3, - 0x03ce, 0x1ff4, 0x1f00, 0x1f80, 0x1f01, 0x1f81, 0x1f02, 0x1f82, - 0x1f03, 0x1f83, 0x1f04, 0x1f84, 0x1f05, 0x1f85, 0x1f06, 0x1f86, - 0x1f07, 0x1f87, 0x1f08, 0x1f88, 0x1f09, 0x1f89, 0x1f0a, 0x1f8a, - 0x1f0b, 0x1f8b, 0x1f0c, 0x1f8c, 0x1f0d, 0x1f8d, 0x1f0e, 0x1f8e, - 0x1f0f, 0x1f8f, 0x1f20, 0x1f90, 0x1f21, 0x1f91, 0x1f22, 0x1f92, - 0x1f23, 0x1f93, 0x1f24, 0x1f94, 0x1f25, 0x1f95, 0x1f26, 0x1f96, - 0x1f27, 0x1f97, 0x1f28, 0x1f98, 0x1f29, 0x1f99, 0x1f2a, 0x1f9a, - 0x1f2b, 0x1f9b, 0x1f2c, 0x1f9c, 0x1f2d, 0x1f9d, 0x1f2e, 0x1f9e, - 0x1f2f, 0x1f9f, 0x1f60, 0x1fa0, 0x1f61, 0x1fa1, 0x1f62, 0x1fa2, - 0x1f63, 0x1fa3, 0x1f64, 0x1fa4, 0x1f65, 0x1fa5, 0x1f66, 0x1fa6, - 0x1f67, 0x1fa7, 0x1f68, 0x1fa8, 0x1f69, 0x1fa9, 0x1f6a, 0x1faa, - 0x1f6b, 0x1fab, 0x1f6c, 0x1fac, 0x1f6d, 0x1fad, 0x1f6e, 0x1fae, - 0x1f6f, 0x1faf, 0x1f70, 0x1fb2, 0x1f74, 0x1fc2, 0x1f7c, 0x1ff2, - 0x1fb6, 0x1fb7, 0x1fc6, 0x1fc7, 0x1ff6, 0x1ff7, - /* 0x05b4 */ - 0x05d9, 0xfb1d, - /* 0x05b7 */ - 0x05d0, 0xfb2e, 0x05f2, 0xfb1f, - /* 0x05b8 */ - 0x05d0, 0xfb2f, - /* 0x05b9 */ - 0x05d5, 0xfb4b, - /* 0x05bc */ - 0x05d0, 0xfb30, 0x05d1, 0xfb31, 0x05d2, 0xfb32, 0x05d3, 0xfb33, - 0x05d4, 0xfb34, 0x05d5, 0xfb35, 0x05d6, 0xfb36, 0x05d8, 0xfb38, - 0x05d9, 0xfb39, 0x05da, 0xfb3a, 0x05db, 0xfb3b, 0x05dc, 0xfb3c, - 0x05de, 0xfb3e, 0x05e0, 0xfb40, 0x05e1, 0xfb41, 0x05e3, 0xfb43, - 0x05e4, 0xfb44, 0x05e6, 0xfb46, 0x05e7, 0xfb47, 0x05e8, 0xfb48, - 0x05e9, 0xfb49, 0x05ea, 0xfb4a, - /* 0x05bf */ - 0x05d1, 0xfb4c, 0x05db, 0xfb4d, 0x05e4, 0xfb4e, - /* 0x05c1 */ - 0x05e9, 0xfb2a, 0xfb49, 0xfb2c, - /* 0x05c2 */ - 0x05e9, 0xfb2b, 0xfb49, 0xfb2d, - /* 0x0653 */ - 0x0627, 0x0622, - /* 0x0654 */ - 0x0627, 0x0623, 0x0648, 0x0624, 0x064a, 0x0626, 0x06c1, 0x06c2, - 0x06d2, 0x06d3, 0x06d5, 0x06c0, - /* 0x0655 */ - 0x0627, 0x0625, - /* 0x093c */ - 0x0915, 0x0958, 0x0916, 0x0959, 0x0917, 0x095a, 0x091c, 0x095b, - 0x0921, 0x095c, 0x0922, 0x095d, 0x0928, 0x0929, 0x092b, 0x095e, - 0x092f, 0x095f, 0x0930, 0x0931, 0x0933, 0x0934, - /* 0x09bc */ - 0x09a1, 0x09dc, 0x09a2, 0x09dd, 0x09af, 0x09df, - /* 0x09be */ - 0x09c7, 0x09cb, - /* 0x09d7 */ - 0x09c7, 0x09cc, - /* 0x0a3c */ - 0x0a16, 0x0a59, 0x0a17, 0x0a5a, 0x0a1c, 0x0a5b, 0x0a2b, 0x0a5e, - 0x0a32, 0x0a33, 0x0a38, 0x0a36, - /* 0x0b3c */ - 0x0b21, 0x0b5c, 0x0b22, 0x0b5d, - /* 0x0b3e */ - 0x0b47, 0x0b4b, - /* 0x0b56 */ - 0x0b47, 0x0b48, - /* 0x0b57 */ - 0x0b47, 0x0b4c, - /* 0x0bbe */ - 0x0bc6, 0x0bca, 0x0bc7, 0x0bcb, - /* 0x0bd7 */ - 0x0b92, 0x0b94, 0x0bc6, 0x0bcc, - /* 0x0c56 */ - 0x0c46, 0x0c48, - /* 0x0cc2 */ - 0x0cc6, 0x0cca, - /* 0x0cd5 */ - 0x0cbf, 0x0cc0, 0x0cc6, 0x0cc7, 0x0cca, 0x0ccb, - /* 0x0cd6 */ - 0x0cc6, 0x0cc8, - /* 0x0d3e */ - 0x0d46, 0x0d4a, 0x0d47, 0x0d4b, - /* 0x0d57 */ - 0x0d46, 0x0d4c, - /* 0x0dca */ - 0x0dd9, 0x0dda, 0x0ddc, 0x0ddd, - /* 0x0dcf */ - 0x0dd9, 0x0ddc, - /* 0x0ddf */ - 0x0dd9, 0x0dde, - /* 0x0f72 */ - 0x0f71, 0x0f73, - /* 0x0f74 */ - 0x0f71, 0x0f75, - /* 0x0f80 */ - 0x0f71, 0x0f81, 0x0fb2, 0x0f76, 0x0fb3, 0x0f78, - /* 0x0fb5 */ - 0x0f40, 0x0f69, 0x0f90, 0x0fb9, - /* 0x0fb7 */ - 0x0f42, 0x0f43, 0x0f4c, 0x0f4d, 0x0f51, 0x0f52, 0x0f56, 0x0f57, - 0x0f5b, 0x0f5c, 0x0f92, 0x0f93, 0x0f9c, 0x0f9d, 0x0fa1, 0x0fa2, - 0x0fa6, 0x0fa7, 0x0fab, 0x0fac, - /* 0x102e */ - 0x1025, 0x1026, - /* 0x1b35 */ - 0x1b05, 0x1b06, 0x1b07, 0x1b08, 0x1b09, 0x1b0a, 0x1b0b, 0x1b0c, - 0x1b0d, 0x1b0e, 0x1b11, 0x1b12, 0x1b3a, 0x1b3b, 0x1b3c, 0x1b3d, - 0x1b3e, 0x1b40, 0x1b3f, 0x1b41, 0x1b42, 0x1b43, - /* 0x3099 */ - 0x3046, 0x3094, 0x304b, 0x304c, 0x304d, 0x304e, 0x304f, 0x3050, - 0x3051, 0x3052, 0x3053, 0x3054, 0x3055, 0x3056, 0x3057, 0x3058, - 0x3059, 0x305a, 0x305b, 0x305c, 0x305d, 0x305e, 0x305f, 0x3060, - 0x3061, 0x3062, 0x3064, 0x3065, 0x3066, 0x3067, 0x3068, 0x3069, - 0x306f, 0x3070, 0x3072, 0x3073, 0x3075, 0x3076, 0x3078, 0x3079, - 0x307b, 0x307c, 0x309d, 0x309e, 0x30a6, 0x30f4, 0x30ab, 0x30ac, - 0x30ad, 0x30ae, 0x30af, 0x30b0, 0x30b1, 0x30b2, 0x30b3, 0x30b4, - 0x30b5, 0x30b6, 0x30b7, 0x30b8, 0x30b9, 0x30ba, 0x30bb, 0x30bc, - 0x30bd, 0x30be, 0x30bf, 0x30c0, 0x30c1, 0x30c2, 0x30c4, 0x30c5, - 0x30c6, 0x30c7, 0x30c8, 0x30c9, 0x30cf, 0x30d0, 0x30d2, 0x30d3, - 0x30d5, 0x30d6, 0x30d8, 0x30d9, 0x30db, 0x30dc, 0x30ef, 0x30f7, - 0x30f0, 0x30f8, 0x30f1, 0x30f9, 0x30f2, 0x30fa, 0x30fd, 0x30fe, - /* 0x309a */ - 0x306f, 0x3071, 0x3072, 0x3074, 0x3075, 0x3077, 0x3078, 0x307a, - 0x307b, 0x307d, 0x30cf, 0x30d1, 0x30d2, 0x30d4, 0x30d5, 0x30d7, - 0x30d8, 0x30da, 0x30db, 0x30dd -}; - -const unsigned int unicode_compose_table_size = 70; - -const WCHAR unicode_decompose_table[4704] = -{ - /* index */ - 0x0110, 0x0120, 0x0130, 0x0140, 0x0150, 0x0100, 0x0160, 0x0100, - 0x0100, 0x0170, 0x0180, 0x0190, 0x01a0, 0x01b0, 0x0100, 0x01c0, - 0x01d0, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x01e0, 0x0100, 0x0100, 0x01f0, 0x0200, - 0x0100, 0x0210, 0x0220, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0230, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0240, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0250, 0x0100, 0x0100, 0x0100, 0x0100, - /* null sub-index */ - 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, - 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, - /* sub-index 00 */ - 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, - 0x0260, 0x0260, 0x0260, 0x0260, 0x0280, 0x02a0, 0x02c0, 0x02e0, - /* sub-index 01 */ - 0x0300, 0x0320, 0x0340, 0x0360, 0x0380, 0x03a0, 0x03c0, 0x03e0, - 0x0260, 0x0260, 0x0400, 0x0420, 0x0440, 0x0460, 0x0480, 0x04a0, - /* sub-index 02 */ - 0x04c0, 0x04e0, 0x0500, 0x0520, 0x0260, 0x0260, 0x0260, 0x0260, - 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, - /* sub-index 03 */ - 0x0260, 0x0260, 0x0260, 0x0260, 0x0540, 0x0260, 0x0260, 0x0260, - 0x0560, 0x0580, 0x05a0, 0x05c0, 0x05e0, 0x0600, 0x0260, 0x0260, - /* sub-index 04 */ - 0x0620, 0x0640, 0x0260, 0x0660, 0x0260, 0x0680, 0x0260, 0x06a0, - 0x0260, 0x0260, 0x0260, 0x0260, 0x06c0, 0x06e0, 0x0700, 0x0720, - /* sub-index 06 */ - 0x0260, 0x0260, 0x0740, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, - 0x0260, 0x0260, 0x0260, 0x0260, 0x0760, 0x0780, 0x0260, 0x0260, - /* sub-index 09 */ - 0x0260, 0x0260, 0x07a0, 0x07c0, 0x0260, 0x07e0, 0x0260, 0x0260, - 0x0260, 0x0260, 0x0260, 0x0260, 0x0800, 0x0820, 0x0260, 0x0260, - /* sub-index 0a */ - 0x0260, 0x0260, 0x0260, 0x0840, 0x0260, 0x0860, 0x0260, 0x0260, - 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, - /* sub-index 0b */ - 0x0260, 0x0260, 0x0260, 0x0260, 0x0880, 0x08a0, 0x0260, 0x0260, - 0x0260, 0x08c0, 0x0260, 0x0260, 0x08e0, 0x0260, 0x0260, 0x0260, - /* sub-index 0c */ - 0x0260, 0x0260, 0x0260, 0x0260, 0x0900, 0x0260, 0x0260, 0x0260, - 0x0260, 0x0260, 0x0260, 0x0260, 0x0920, 0x0260, 0x0260, 0x0260, - /* sub-index 0d */ - 0x0260, 0x0260, 0x0260, 0x0260, 0x0940, 0x0260, 0x0260, 0x0260, - 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0960, 0x0260, 0x0260, - /* sub-index 0f */ - 0x0260, 0x0260, 0x0260, 0x0260, 0x0980, 0x09a0, 0x09c0, 0x09e0, - 0x0a00, 0x0a20, 0x0a40, 0x0a60, 0x0260, 0x0260, 0x0260, 0x0260, - /* sub-index 10 */ - 0x0260, 0x0260, 0x0a80, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, - 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, - /* sub-index 1b */ - 0x0aa0, 0x0ac0, 0x0260, 0x0ae0, 0x0b00, 0x0260, 0x0260, 0x0260, - 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, - /* sub-index 1e */ - 0x0b20, 0x0b40, 0x0b60, 0x0b80, 0x0ba0, 0x0bc0, 0x0be0, 0x0c00, - 0x0c20, 0x0c40, 0x0c60, 0x0c80, 0x0ca0, 0x0cc0, 0x0ce0, 0x0d00, - /* sub-index 1f */ - 0x0d20, 0x0d40, 0x0d60, 0x0d80, 0x0da0, 0x0dc0, 0x0de0, 0x0e00, - 0x0e20, 0x0e40, 0x0e60, 0x0e80, 0x0ea0, 0x0ec0, 0x0ee0, 0x0f00, - /* sub-index 21 */ - 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, - 0x0260, 0x0f20, 0x0f40, 0x0260, 0x0f60, 0x0260, 0x0260, 0x0260, - /* sub-index 22 */ - 0x0f80, 0x0260, 0x0fa0, 0x0260, 0x0fc0, 0x0260, 0x0fe0, 0x1000, - 0x1020, 0x0260, 0x1040, 0x0260, 0x0260, 0x0260, 0x1060, 0x0260, - /* sub-index 2a */ - 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, - 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x1080, 0x0260, 0x0260, - /* sub-index 30 */ - 0x0260, 0x0260, 0x0260, 0x0260, 0x10a0, 0x10c0, 0x10e0, 0x1100, - 0x0260, 0x1120, 0x1140, 0x1160, 0x1180, 0x11a0, 0x0260, 0x11c0, - /* sub-index fb */ - 0x0260, 0x11e0, 0x1200, 0x1220, 0x1240, 0x0260, 0x0260, 0x0260, - 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, - /* null mapping */ - 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, - /* 0x00c0 .. 0x00cf */ - 0x0041, 0x0300, 0x0041, 0x0301, 0x0041, 0x0302, 0x0041, 0x0303, - 0x0041, 0x0308, 0x0041, 0x030a, 0x0000, 0x0000, 0x0043, 0x0327, - 0x0045, 0x0300, 0x0045, 0x0301, 0x0045, 0x0302, 0x0045, 0x0308, - 0x0049, 0x0300, 0x0049, 0x0301, 0x0049, 0x0302, 0x0049, 0x0308, - /* 0x00d0 .. 0x00df */ - 0x0000, 0x0000, 0x004e, 0x0303, 0x004f, 0x0300, 0x004f, 0x0301, - 0x004f, 0x0302, 0x004f, 0x0303, 0x004f, 0x0308, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0055, 0x0300, 0x0055, 0x0301, 0x0055, 0x0302, - 0x0055, 0x0308, 0x0059, 0x0301, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x00e0 .. 0x00ef */ - 0x0061, 0x0300, 0x0061, 0x0301, 0x0061, 0x0302, 0x0061, 0x0303, - 0x0061, 0x0308, 0x0061, 0x030a, 0x0000, 0x0000, 0x0063, 0x0327, - 0x0065, 0x0300, 0x0065, 0x0301, 0x0065, 0x0302, 0x0065, 0x0308, - 0x0069, 0x0300, 0x0069, 0x0301, 0x0069, 0x0302, 0x0069, 0x0308, - /* 0x00f0 .. 0x00ff */ - 0x0000, 0x0000, 0x006e, 0x0303, 0x006f, 0x0300, 0x006f, 0x0301, - 0x006f, 0x0302, 0x006f, 0x0303, 0x006f, 0x0308, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0075, 0x0300, 0x0075, 0x0301, 0x0075, 0x0302, - 0x0075, 0x0308, 0x0079, 0x0301, 0x0000, 0x0000, 0x0079, 0x0308, - /* 0x0100 .. 0x010f */ - 0x0041, 0x0304, 0x0061, 0x0304, 0x0041, 0x0306, 0x0061, 0x0306, - 0x0041, 0x0328, 0x0061, 0x0328, 0x0043, 0x0301, 0x0063, 0x0301, - 0x0043, 0x0302, 0x0063, 0x0302, 0x0043, 0x0307, 0x0063, 0x0307, - 0x0043, 0x030c, 0x0063, 0x030c, 0x0044, 0x030c, 0x0064, 0x030c, - /* 0x0110 .. 0x011f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0045, 0x0304, 0x0065, 0x0304, - 0x0045, 0x0306, 0x0065, 0x0306, 0x0045, 0x0307, 0x0065, 0x0307, - 0x0045, 0x0328, 0x0065, 0x0328, 0x0045, 0x030c, 0x0065, 0x030c, - 0x0047, 0x0302, 0x0067, 0x0302, 0x0047, 0x0306, 0x0067, 0x0306, - /* 0x0120 .. 0x012f */ - 0x0047, 0x0307, 0x0067, 0x0307, 0x0047, 0x0327, 0x0067, 0x0327, - 0x0048, 0x0302, 0x0068, 0x0302, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0049, 0x0303, 0x0069, 0x0303, 0x0049, 0x0304, 0x0069, 0x0304, - 0x0049, 0x0306, 0x0069, 0x0306, 0x0049, 0x0328, 0x0069, 0x0328, - /* 0x0130 .. 0x013f */ - 0x0049, 0x0307, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x004a, 0x0302, 0x006a, 0x0302, 0x004b, 0x0327, 0x006b, 0x0327, - 0x0000, 0x0000, 0x004c, 0x0301, 0x006c, 0x0301, 0x004c, 0x0327, - 0x006c, 0x0327, 0x004c, 0x030c, 0x006c, 0x030c, 0x0000, 0x0000, - /* 0x0140 .. 0x014f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x004e, 0x0301, - 0x006e, 0x0301, 0x004e, 0x0327, 0x006e, 0x0327, 0x004e, 0x030c, - 0x006e, 0x030c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x004f, 0x0304, 0x006f, 0x0304, 0x004f, 0x0306, 0x006f, 0x0306, - /* 0x0150 .. 0x015f */ - 0x004f, 0x030b, 0x006f, 0x030b, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0052, 0x0301, 0x0072, 0x0301, 0x0052, 0x0327, 0x0072, 0x0327, - 0x0052, 0x030c, 0x0072, 0x030c, 0x0053, 0x0301, 0x0073, 0x0301, - 0x0053, 0x0302, 0x0073, 0x0302, 0x0053, 0x0327, 0x0073, 0x0327, - /* 0x0160 .. 0x016f */ - 0x0053, 0x030c, 0x0073, 0x030c, 0x0054, 0x0327, 0x0074, 0x0327, - 0x0054, 0x030c, 0x0074, 0x030c, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0055, 0x0303, 0x0075, 0x0303, 0x0055, 0x0304, 0x0075, 0x0304, - 0x0055, 0x0306, 0x0075, 0x0306, 0x0055, 0x030a, 0x0075, 0x030a, - /* 0x0170 .. 0x017f */ - 0x0055, 0x030b, 0x0075, 0x030b, 0x0055, 0x0328, 0x0075, 0x0328, - 0x0057, 0x0302, 0x0077, 0x0302, 0x0059, 0x0302, 0x0079, 0x0302, - 0x0059, 0x0308, 0x005a, 0x0301, 0x007a, 0x0301, 0x005a, 0x0307, - 0x007a, 0x0307, 0x005a, 0x030c, 0x007a, 0x030c, 0x0000, 0x0000, - /* 0x01a0 .. 0x01af */ - 0x004f, 0x031b, 0x006f, 0x031b, 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, 0x0055, 0x031b, - /* 0x01b0 .. 0x01bf */ - 0x0075, 0x031b, 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, - /* 0x01c0 .. 0x01cf */ - 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, 0x0041, 0x030c, 0x0061, 0x030c, 0x0049, 0x030c, - /* 0x01d0 .. 0x01df */ - 0x0069, 0x030c, 0x004f, 0x030c, 0x006f, 0x030c, 0x0055, 0x030c, - 0x0075, 0x030c, 0x00dc, 0x0304, 0x00fc, 0x0304, 0x00dc, 0x0301, - 0x00fc, 0x0301, 0x00dc, 0x030c, 0x00fc, 0x030c, 0x00dc, 0x0300, - 0x00fc, 0x0300, 0x0000, 0x0000, 0x00c4, 0x0304, 0x00e4, 0x0304, - /* 0x01e0 .. 0x01ef */ - 0x0226, 0x0304, 0x0227, 0x0304, 0x00c6, 0x0304, 0x00e6, 0x0304, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0047, 0x030c, 0x0067, 0x030c, - 0x004b, 0x030c, 0x006b, 0x030c, 0x004f, 0x0328, 0x006f, 0x0328, - 0x01ea, 0x0304, 0x01eb, 0x0304, 0x01b7, 0x030c, 0x0292, 0x030c, - /* 0x01f0 .. 0x01ff */ - 0x006a, 0x030c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0047, 0x0301, 0x0067, 0x0301, 0x0000, 0x0000, 0x0000, 0x0000, - 0x004e, 0x0300, 0x006e, 0x0300, 0x00c5, 0x0301, 0x00e5, 0x0301, - 0x00c6, 0x0301, 0x00e6, 0x0301, 0x00d8, 0x0301, 0x00f8, 0x0301, - /* 0x0200 .. 0x020f */ - 0x0041, 0x030f, 0x0061, 0x030f, 0x0041, 0x0311, 0x0061, 0x0311, - 0x0045, 0x030f, 0x0065, 0x030f, 0x0045, 0x0311, 0x0065, 0x0311, - 0x0049, 0x030f, 0x0069, 0x030f, 0x0049, 0x0311, 0x0069, 0x0311, - 0x004f, 0x030f, 0x006f, 0x030f, 0x004f, 0x0311, 0x006f, 0x0311, - /* 0x0210 .. 0x021f */ - 0x0052, 0x030f, 0x0072, 0x030f, 0x0052, 0x0311, 0x0072, 0x0311, - 0x0055, 0x030f, 0x0075, 0x030f, 0x0055, 0x0311, 0x0075, 0x0311, - 0x0053, 0x0326, 0x0073, 0x0326, 0x0054, 0x0326, 0x0074, 0x0326, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0048, 0x030c, 0x0068, 0x030c, - /* 0x0220 .. 0x022f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0041, 0x0307, 0x0061, 0x0307, - 0x0045, 0x0327, 0x0065, 0x0327, 0x00d6, 0x0304, 0x00f6, 0x0304, - 0x00d5, 0x0304, 0x00f5, 0x0304, 0x004f, 0x0307, 0x006f, 0x0307, - /* 0x0230 .. 0x023f */ - 0x022e, 0x0304, 0x022f, 0x0304, 0x0059, 0x0304, 0x0079, 0x0304, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0340 .. 0x034f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0308, 0x0301, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0380 .. 0x038f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x00a8, 0x0301, 0x0391, 0x0301, 0x0000, 0x0000, - 0x0395, 0x0301, 0x0397, 0x0301, 0x0399, 0x0301, 0x0000, 0x0000, - 0x039f, 0x0301, 0x0000, 0x0000, 0x03a5, 0x0301, 0x03a9, 0x0301, - /* 0x0390 .. 0x039f */ - 0x03ca, 0x0301, 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, - /* 0x03a0 .. 0x03af */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0399, 0x0308, 0x03a5, 0x0308, - 0x03b1, 0x0301, 0x03b5, 0x0301, 0x03b7, 0x0301, 0x03b9, 0x0301, - /* 0x03b0 .. 0x03bf */ - 0x03cb, 0x0301, 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, - /* 0x03c0 .. 0x03cf */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x03b9, 0x0308, 0x03c5, 0x0308, - 0x03bf, 0x0301, 0x03c5, 0x0301, 0x03c9, 0x0301, 0x0000, 0x0000, - /* 0x03d0 .. 0x03df */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x03d2, 0x0301, - 0x03d2, 0x0308, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0400 .. 0x040f */ - 0x0415, 0x0300, 0x0415, 0x0308, 0x0000, 0x0000, 0x0413, 0x0301, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0406, 0x0308, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x041a, 0x0301, 0x0418, 0x0300, 0x0423, 0x0306, 0x0000, 0x0000, - /* 0x0410 .. 0x041f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0418, 0x0306, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0430 .. 0x043f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0438, 0x0306, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0450 .. 0x045f */ - 0x0435, 0x0300, 0x0435, 0x0308, 0x0000, 0x0000, 0x0433, 0x0301, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0456, 0x0308, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x043a, 0x0301, 0x0438, 0x0300, 0x0443, 0x0306, 0x0000, 0x0000, - /* 0x0470 .. 0x047f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0474, 0x030f, 0x0475, 0x030f, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x04c0 .. 0x04cf */ - 0x0000, 0x0000, 0x0416, 0x0306, 0x0436, 0x0306, 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, - /* 0x04d0 .. 0x04df */ - 0x0410, 0x0306, 0x0430, 0x0306, 0x0410, 0x0308, 0x0430, 0x0308, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0415, 0x0306, 0x0435, 0x0306, - 0x0000, 0x0000, 0x0000, 0x0000, 0x04d8, 0x0308, 0x04d9, 0x0308, - 0x0416, 0x0308, 0x0436, 0x0308, 0x0417, 0x0308, 0x0437, 0x0308, - /* 0x04e0 .. 0x04ef */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0418, 0x0304, 0x0438, 0x0304, - 0x0418, 0x0308, 0x0438, 0x0308, 0x041e, 0x0308, 0x043e, 0x0308, - 0x0000, 0x0000, 0x0000, 0x0000, 0x04e8, 0x0308, 0x04e9, 0x0308, - 0x042d, 0x0308, 0x044d, 0x0308, 0x0423, 0x0304, 0x0443, 0x0304, - /* 0x04f0 .. 0x04ff */ - 0x0423, 0x0308, 0x0443, 0x0308, 0x0423, 0x030b, 0x0443, 0x030b, - 0x0427, 0x0308, 0x0447, 0x0308, 0x0000, 0x0000, 0x0000, 0x0000, - 0x042b, 0x0308, 0x044b, 0x0308, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0620 .. 0x062f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0627, 0x0653, 0x0627, 0x0654, - 0x0648, 0x0654, 0x0627, 0x0655, 0x064a, 0x0654, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x06c0 .. 0x06cf */ - 0x06d5, 0x0654, 0x0000, 0x0000, 0x06c1, 0x0654, 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, - /* 0x06d0 .. 0x06df */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x06d2, 0x0654, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0920 .. 0x092f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0928, 0x093c, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0930 .. 0x093f */ - 0x0000, 0x0000, 0x0930, 0x093c, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0933, 0x093c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0950 .. 0x095f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0915, 0x093c, 0x0916, 0x093c, 0x0917, 0x093c, 0x091c, 0x093c, - 0x0921, 0x093c, 0x0922, 0x093c, 0x092b, 0x093c, 0x092f, 0x093c, - /* 0x09c0 .. 0x09cf */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x09c7, 0x09be, - 0x09c7, 0x09d7, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x09d0 .. 0x09df */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x09a1, 0x09bc, 0x09a2, 0x09bc, 0x0000, 0x0000, 0x09af, 0x09bc, - /* 0x0a30 .. 0x0a3f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0a32, 0x0a3c, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0a38, 0x0a3c, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0a50 .. 0x0a5f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0a16, 0x0a3c, 0x0a17, 0x0a3c, 0x0a1c, 0x0a3c, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0a2b, 0x0a3c, 0x0000, 0x0000, - /* 0x0b40 .. 0x0b4f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0b47, 0x0b56, 0x0000, 0x0000, 0x0000, 0x0000, 0x0b47, 0x0b3e, - 0x0b47, 0x0b57, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0b50 .. 0x0b5f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0b21, 0x0b3c, 0x0b22, 0x0b3c, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0b90 .. 0x0b9f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0b92, 0x0bd7, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0bc0 .. 0x0bcf */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0bc6, 0x0bbe, 0x0bc7, 0x0bbe, - 0x0bc6, 0x0bd7, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0c40 .. 0x0c4f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0c46, 0x0c56, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0cc0 .. 0x0ccf */ - 0x0cbf, 0x0cd5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0cc6, 0x0cd5, - 0x0cc6, 0x0cd6, 0x0000, 0x0000, 0x0cc6, 0x0cc2, 0x0cca, 0x0cd5, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0d40 .. 0x0d4f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0d46, 0x0d3e, 0x0d47, 0x0d3e, - 0x0d46, 0x0d57, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0dd0 .. 0x0ddf */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0dd9, 0x0dca, 0x0000, 0x0000, - 0x0dd9, 0x0dcf, 0x0ddc, 0x0dca, 0x0dd9, 0x0ddf, 0x0000, 0x0000, - /* 0x0f40 .. 0x0f4f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0f42, 0x0fb7, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0f4c, 0x0fb7, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0f50 .. 0x0f5f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0f51, 0x0fb7, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0f56, 0x0fb7, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0f5b, 0x0fb7, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0f60 .. 0x0f6f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0f40, 0x0fb5, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0f70 .. 0x0f7f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0f71, 0x0f72, - 0x0000, 0x0000, 0x0f71, 0x0f74, 0x0fb2, 0x0f80, 0x0000, 0x0000, - 0x0fb3, 0x0f80, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0f80 .. 0x0f8f */ - 0x0000, 0x0000, 0x0f71, 0x0f80, 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, - /* 0x0f90 .. 0x0f9f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0f92, 0x0fb7, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0f9c, 0x0fb7, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0fa0 .. 0x0faf */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0fa1, 0x0fb7, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0fa6, 0x0fb7, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0fab, 0x0fb7, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0fb0 .. 0x0fbf */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0f90, 0x0fb5, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x1020 .. 0x102f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x1025, 0x102e, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x1b00 .. 0x1b0f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x1b05, 0x1b35, 0x0000, 0x0000, - 0x1b07, 0x1b35, 0x0000, 0x0000, 0x1b09, 0x1b35, 0x0000, 0x0000, - 0x1b0b, 0x1b35, 0x0000, 0x0000, 0x1b0d, 0x1b35, 0x0000, 0x0000, - /* 0x1b10 .. 0x1b1f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x1b11, 0x1b35, 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, - /* 0x1b30 .. 0x1b3f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1b3a, 0x1b35, - 0x0000, 0x0000, 0x1b3c, 0x1b35, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x1b40 .. 0x1b4f */ - 0x1b3e, 0x1b35, 0x1b3f, 0x1b35, 0x0000, 0x0000, 0x1b42, 0x1b35, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x1e00 .. 0x1e0f */ - 0x0041, 0x0325, 0x0061, 0x0325, 0x0042, 0x0307, 0x0062, 0x0307, - 0x0042, 0x0323, 0x0062, 0x0323, 0x0042, 0x0331, 0x0062, 0x0331, - 0x00c7, 0x0301, 0x00e7, 0x0301, 0x0044, 0x0307, 0x0064, 0x0307, - 0x0044, 0x0323, 0x0064, 0x0323, 0x0044, 0x0331, 0x0064, 0x0331, - /* 0x1e10 .. 0x1e1f */ - 0x0044, 0x0327, 0x0064, 0x0327, 0x0044, 0x032d, 0x0064, 0x032d, - 0x0112, 0x0300, 0x0113, 0x0300, 0x0112, 0x0301, 0x0113, 0x0301, - 0x0045, 0x032d, 0x0065, 0x032d, 0x0045, 0x0330, 0x0065, 0x0330, - 0x0228, 0x0306, 0x0229, 0x0306, 0x0046, 0x0307, 0x0066, 0x0307, - /* 0x1e20 .. 0x1e2f */ - 0x0047, 0x0304, 0x0067, 0x0304, 0x0048, 0x0307, 0x0068, 0x0307, - 0x0048, 0x0323, 0x0068, 0x0323, 0x0048, 0x0308, 0x0068, 0x0308, - 0x0048, 0x0327, 0x0068, 0x0327, 0x0048, 0x032e, 0x0068, 0x032e, - 0x0049, 0x0330, 0x0069, 0x0330, 0x00cf, 0x0301, 0x00ef, 0x0301, - /* 0x1e30 .. 0x1e3f */ - 0x004b, 0x0301, 0x006b, 0x0301, 0x004b, 0x0323, 0x006b, 0x0323, - 0x004b, 0x0331, 0x006b, 0x0331, 0x004c, 0x0323, 0x006c, 0x0323, - 0x1e36, 0x0304, 0x1e37, 0x0304, 0x004c, 0x0331, 0x006c, 0x0331, - 0x004c, 0x032d, 0x006c, 0x032d, 0x004d, 0x0301, 0x006d, 0x0301, - /* 0x1e40 .. 0x1e4f */ - 0x004d, 0x0307, 0x006d, 0x0307, 0x004d, 0x0323, 0x006d, 0x0323, - 0x004e, 0x0307, 0x006e, 0x0307, 0x004e, 0x0323, 0x006e, 0x0323, - 0x004e, 0x0331, 0x006e, 0x0331, 0x004e, 0x032d, 0x006e, 0x032d, - 0x00d5, 0x0301, 0x00f5, 0x0301, 0x00d5, 0x0308, 0x00f5, 0x0308, - /* 0x1e50 .. 0x1e5f */ - 0x014c, 0x0300, 0x014d, 0x0300, 0x014c, 0x0301, 0x014d, 0x0301, - 0x0050, 0x0301, 0x0070, 0x0301, 0x0050, 0x0307, 0x0070, 0x0307, - 0x0052, 0x0307, 0x0072, 0x0307, 0x0052, 0x0323, 0x0072, 0x0323, - 0x1e5a, 0x0304, 0x1e5b, 0x0304, 0x0052, 0x0331, 0x0072, 0x0331, - /* 0x1e60 .. 0x1e6f */ - 0x0053, 0x0307, 0x0073, 0x0307, 0x0053, 0x0323, 0x0073, 0x0323, - 0x015a, 0x0307, 0x015b, 0x0307, 0x0160, 0x0307, 0x0161, 0x0307, - 0x1e62, 0x0307, 0x1e63, 0x0307, 0x0054, 0x0307, 0x0074, 0x0307, - 0x0054, 0x0323, 0x0074, 0x0323, 0x0054, 0x0331, 0x0074, 0x0331, - /* 0x1e70 .. 0x1e7f */ - 0x0054, 0x032d, 0x0074, 0x032d, 0x0055, 0x0324, 0x0075, 0x0324, - 0x0055, 0x0330, 0x0075, 0x0330, 0x0055, 0x032d, 0x0075, 0x032d, - 0x0168, 0x0301, 0x0169, 0x0301, 0x016a, 0x0308, 0x016b, 0x0308, - 0x0056, 0x0303, 0x0076, 0x0303, 0x0056, 0x0323, 0x0076, 0x0323, - /* 0x1e80 .. 0x1e8f */ - 0x0057, 0x0300, 0x0077, 0x0300, 0x0057, 0x0301, 0x0077, 0x0301, - 0x0057, 0x0308, 0x0077, 0x0308, 0x0057, 0x0307, 0x0077, 0x0307, - 0x0057, 0x0323, 0x0077, 0x0323, 0x0058, 0x0307, 0x0078, 0x0307, - 0x0058, 0x0308, 0x0078, 0x0308, 0x0059, 0x0307, 0x0079, 0x0307, - /* 0x1e90 .. 0x1e9f */ - 0x005a, 0x0302, 0x007a, 0x0302, 0x005a, 0x0323, 0x007a, 0x0323, - 0x005a, 0x0331, 0x007a, 0x0331, 0x0068, 0x0331, 0x0074, 0x0308, - 0x0077, 0x030a, 0x0079, 0x030a, 0x0000, 0x0000, 0x017f, 0x0307, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x1ea0 .. 0x1eaf */ - 0x0041, 0x0323, 0x0061, 0x0323, 0x0041, 0x0309, 0x0061, 0x0309, - 0x00c2, 0x0301, 0x00e2, 0x0301, 0x00c2, 0x0300, 0x00e2, 0x0300, - 0x00c2, 0x0309, 0x00e2, 0x0309, 0x00c2, 0x0303, 0x00e2, 0x0303, - 0x1ea0, 0x0302, 0x1ea1, 0x0302, 0x0102, 0x0301, 0x0103, 0x0301, - /* 0x1eb0 .. 0x1ebf */ - 0x0102, 0x0300, 0x0103, 0x0300, 0x0102, 0x0309, 0x0103, 0x0309, - 0x0102, 0x0303, 0x0103, 0x0303, 0x1ea0, 0x0306, 0x1ea1, 0x0306, - 0x0045, 0x0323, 0x0065, 0x0323, 0x0045, 0x0309, 0x0065, 0x0309, - 0x0045, 0x0303, 0x0065, 0x0303, 0x00ca, 0x0301, 0x00ea, 0x0301, - /* 0x1ec0 .. 0x1ecf */ - 0x00ca, 0x0300, 0x00ea, 0x0300, 0x00ca, 0x0309, 0x00ea, 0x0309, - 0x00ca, 0x0303, 0x00ea, 0x0303, 0x1eb8, 0x0302, 0x1eb9, 0x0302, - 0x0049, 0x0309, 0x0069, 0x0309, 0x0049, 0x0323, 0x0069, 0x0323, - 0x004f, 0x0323, 0x006f, 0x0323, 0x004f, 0x0309, 0x006f, 0x0309, - /* 0x1ed0 .. 0x1edf */ - 0x00d4, 0x0301, 0x00f4, 0x0301, 0x00d4, 0x0300, 0x00f4, 0x0300, - 0x00d4, 0x0309, 0x00f4, 0x0309, 0x00d4, 0x0303, 0x00f4, 0x0303, - 0x1ecc, 0x0302, 0x1ecd, 0x0302, 0x01a0, 0x0301, 0x01a1, 0x0301, - 0x01a0, 0x0300, 0x01a1, 0x0300, 0x01a0, 0x0309, 0x01a1, 0x0309, - /* 0x1ee0 .. 0x1eef */ - 0x01a0, 0x0303, 0x01a1, 0x0303, 0x01a0, 0x0323, 0x01a1, 0x0323, - 0x0055, 0x0323, 0x0075, 0x0323, 0x0055, 0x0309, 0x0075, 0x0309, - 0x01af, 0x0301, 0x01b0, 0x0301, 0x01af, 0x0300, 0x01b0, 0x0300, - 0x01af, 0x0309, 0x01b0, 0x0309, 0x01af, 0x0303, 0x01b0, 0x0303, - /* 0x1ef0 .. 0x1eff */ - 0x01af, 0x0323, 0x01b0, 0x0323, 0x0059, 0x0300, 0x0079, 0x0300, - 0x0059, 0x0323, 0x0079, 0x0323, 0x0059, 0x0309, 0x0079, 0x0309, - 0x0059, 0x0303, 0x0079, 0x0303, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x1f00 .. 0x1f0f */ - 0x03b1, 0x0313, 0x03b1, 0x0314, 0x1f00, 0x0300, 0x1f01, 0x0300, - 0x1f00, 0x0301, 0x1f01, 0x0301, 0x1f00, 0x0342, 0x1f01, 0x0342, - 0x0391, 0x0313, 0x0391, 0x0314, 0x1f08, 0x0300, 0x1f09, 0x0300, - 0x1f08, 0x0301, 0x1f09, 0x0301, 0x1f08, 0x0342, 0x1f09, 0x0342, - /* 0x1f10 .. 0x1f1f */ - 0x03b5, 0x0313, 0x03b5, 0x0314, 0x1f10, 0x0300, 0x1f11, 0x0300, - 0x1f10, 0x0301, 0x1f11, 0x0301, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0395, 0x0313, 0x0395, 0x0314, 0x1f18, 0x0300, 0x1f19, 0x0300, - 0x1f18, 0x0301, 0x1f19, 0x0301, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x1f20 .. 0x1f2f */ - 0x03b7, 0x0313, 0x03b7, 0x0314, 0x1f20, 0x0300, 0x1f21, 0x0300, - 0x1f20, 0x0301, 0x1f21, 0x0301, 0x1f20, 0x0342, 0x1f21, 0x0342, - 0x0397, 0x0313, 0x0397, 0x0314, 0x1f28, 0x0300, 0x1f29, 0x0300, - 0x1f28, 0x0301, 0x1f29, 0x0301, 0x1f28, 0x0342, 0x1f29, 0x0342, - /* 0x1f30 .. 0x1f3f */ - 0x03b9, 0x0313, 0x03b9, 0x0314, 0x1f30, 0x0300, 0x1f31, 0x0300, - 0x1f30, 0x0301, 0x1f31, 0x0301, 0x1f30, 0x0342, 0x1f31, 0x0342, - 0x0399, 0x0313, 0x0399, 0x0314, 0x1f38, 0x0300, 0x1f39, 0x0300, - 0x1f38, 0x0301, 0x1f39, 0x0301, 0x1f38, 0x0342, 0x1f39, 0x0342, - /* 0x1f40 .. 0x1f4f */ - 0x03bf, 0x0313, 0x03bf, 0x0314, 0x1f40, 0x0300, 0x1f41, 0x0300, - 0x1f40, 0x0301, 0x1f41, 0x0301, 0x0000, 0x0000, 0x0000, 0x0000, - 0x039f, 0x0313, 0x039f, 0x0314, 0x1f48, 0x0300, 0x1f49, 0x0300, - 0x1f48, 0x0301, 0x1f49, 0x0301, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x1f50 .. 0x1f5f */ - 0x03c5, 0x0313, 0x03c5, 0x0314, 0x1f50, 0x0300, 0x1f51, 0x0300, - 0x1f50, 0x0301, 0x1f51, 0x0301, 0x1f50, 0x0342, 0x1f51, 0x0342, - 0x0000, 0x0000, 0x03a5, 0x0314, 0x0000, 0x0000, 0x1f59, 0x0300, - 0x0000, 0x0000, 0x1f59, 0x0301, 0x0000, 0x0000, 0x1f59, 0x0342, - /* 0x1f60 .. 0x1f6f */ - 0x03c9, 0x0313, 0x03c9, 0x0314, 0x1f60, 0x0300, 0x1f61, 0x0300, - 0x1f60, 0x0301, 0x1f61, 0x0301, 0x1f60, 0x0342, 0x1f61, 0x0342, - 0x03a9, 0x0313, 0x03a9, 0x0314, 0x1f68, 0x0300, 0x1f69, 0x0300, - 0x1f68, 0x0301, 0x1f69, 0x0301, 0x1f68, 0x0342, 0x1f69, 0x0342, - /* 0x1f70 .. 0x1f7f */ - 0x03b1, 0x0300, 0x0000, 0x0000, 0x03b5, 0x0300, 0x0000, 0x0000, - 0x03b7, 0x0300, 0x0000, 0x0000, 0x03b9, 0x0300, 0x0000, 0x0000, - 0x03bf, 0x0300, 0x0000, 0x0000, 0x03c5, 0x0300, 0x0000, 0x0000, - 0x03c9, 0x0300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x1f80 .. 0x1f8f */ - 0x1f00, 0x0345, 0x1f01, 0x0345, 0x1f02, 0x0345, 0x1f03, 0x0345, - 0x1f04, 0x0345, 0x1f05, 0x0345, 0x1f06, 0x0345, 0x1f07, 0x0345, - 0x1f08, 0x0345, 0x1f09, 0x0345, 0x1f0a, 0x0345, 0x1f0b, 0x0345, - 0x1f0c, 0x0345, 0x1f0d, 0x0345, 0x1f0e, 0x0345, 0x1f0f, 0x0345, - /* 0x1f90 .. 0x1f9f */ - 0x1f20, 0x0345, 0x1f21, 0x0345, 0x1f22, 0x0345, 0x1f23, 0x0345, - 0x1f24, 0x0345, 0x1f25, 0x0345, 0x1f26, 0x0345, 0x1f27, 0x0345, - 0x1f28, 0x0345, 0x1f29, 0x0345, 0x1f2a, 0x0345, 0x1f2b, 0x0345, - 0x1f2c, 0x0345, 0x1f2d, 0x0345, 0x1f2e, 0x0345, 0x1f2f, 0x0345, - /* 0x1fa0 .. 0x1faf */ - 0x1f60, 0x0345, 0x1f61, 0x0345, 0x1f62, 0x0345, 0x1f63, 0x0345, - 0x1f64, 0x0345, 0x1f65, 0x0345, 0x1f66, 0x0345, 0x1f67, 0x0345, - 0x1f68, 0x0345, 0x1f69, 0x0345, 0x1f6a, 0x0345, 0x1f6b, 0x0345, - 0x1f6c, 0x0345, 0x1f6d, 0x0345, 0x1f6e, 0x0345, 0x1f6f, 0x0345, - /* 0x1fb0 .. 0x1fbf */ - 0x03b1, 0x0306, 0x03b1, 0x0304, 0x1f70, 0x0345, 0x03b1, 0x0345, - 0x03ac, 0x0345, 0x0000, 0x0000, 0x03b1, 0x0342, 0x1fb6, 0x0345, - 0x0391, 0x0306, 0x0391, 0x0304, 0x0391, 0x0300, 0x0000, 0x0000, - 0x0391, 0x0345, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x1fc0 .. 0x1fcf */ - 0x0000, 0x0000, 0x00a8, 0x0342, 0x1f74, 0x0345, 0x03b7, 0x0345, - 0x03ae, 0x0345, 0x0000, 0x0000, 0x03b7, 0x0342, 0x1fc6, 0x0345, - 0x0395, 0x0300, 0x0000, 0x0000, 0x0397, 0x0300, 0x0000, 0x0000, - 0x0397, 0x0345, 0x1fbf, 0x0300, 0x1fbf, 0x0301, 0x1fbf, 0x0342, - /* 0x1fd0 .. 0x1fdf */ - 0x03b9, 0x0306, 0x03b9, 0x0304, 0x03ca, 0x0300, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x03b9, 0x0342, 0x03ca, 0x0342, - 0x0399, 0x0306, 0x0399, 0x0304, 0x0399, 0x0300, 0x0000, 0x0000, - 0x0000, 0x0000, 0x1ffe, 0x0300, 0x1ffe, 0x0301, 0x1ffe, 0x0342, - /* 0x1fe0 .. 0x1fef */ - 0x03c5, 0x0306, 0x03c5, 0x0304, 0x03cb, 0x0300, 0x0000, 0x0000, - 0x03c1, 0x0313, 0x03c1, 0x0314, 0x03c5, 0x0342, 0x03cb, 0x0342, - 0x03a5, 0x0306, 0x03a5, 0x0304, 0x03a5, 0x0300, 0x0000, 0x0000, - 0x03a1, 0x0314, 0x00a8, 0x0300, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x1ff0 .. 0x1fff */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x1f7c, 0x0345, 0x03c9, 0x0345, - 0x03ce, 0x0345, 0x0000, 0x0000, 0x03c9, 0x0342, 0x1ff6, 0x0345, - 0x039f, 0x0300, 0x0000, 0x0000, 0x03a9, 0x0300, 0x0000, 0x0000, - 0x03a9, 0x0345, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x2190 .. 0x219f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x2190, 0x0338, 0x2192, 0x0338, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x21a0 .. 0x21af */ - 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, 0x2194, 0x0338, 0x0000, 0x0000, - /* 0x21c0 .. 0x21cf */ - 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, 0x21d0, 0x0338, 0x21d4, 0x0338, 0x21d2, 0x0338, - /* 0x2200 .. 0x220f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x2203, 0x0338, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x2208, 0x0338, 0x0000, 0x0000, 0x0000, 0x0000, - 0x220b, 0x0338, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x2220 .. 0x222f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x2223, 0x0338, 0x0000, 0x0000, 0x2225, 0x0338, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x2240 .. 0x224f */ - 0x0000, 0x0000, 0x223c, 0x0338, 0x0000, 0x0000, 0x0000, 0x0000, - 0x2243, 0x0338, 0x0000, 0x0000, 0x0000, 0x0000, 0x2245, 0x0338, - 0x0000, 0x0000, 0x2248, 0x0338, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x2260 .. 0x226f */ - 0x003d, 0x0338, 0x0000, 0x0000, 0x2261, 0x0338, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x224d, 0x0338, 0x003c, 0x0338, 0x003e, 0x0338, - /* 0x2270 .. 0x227f */ - 0x2264, 0x0338, 0x2265, 0x0338, 0x0000, 0x0000, 0x0000, 0x0000, - 0x2272, 0x0338, 0x2273, 0x0338, 0x0000, 0x0000, 0x0000, 0x0000, - 0x2276, 0x0338, 0x2277, 0x0338, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x2280 .. 0x228f */ - 0x227a, 0x0338, 0x227b, 0x0338, 0x0000, 0x0000, 0x0000, 0x0000, - 0x2282, 0x0338, 0x2283, 0x0338, 0x0000, 0x0000, 0x0000, 0x0000, - 0x2286, 0x0338, 0x2287, 0x0338, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x22a0 .. 0x22af */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x22a2, 0x0338, 0x22a8, 0x0338, 0x22a9, 0x0338, 0x22ab, 0x0338, - /* 0x22e0 .. 0x22ef */ - 0x227c, 0x0338, 0x227d, 0x0338, 0x2291, 0x0338, 0x2292, 0x0338, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x22b2, 0x0338, 0x22b3, 0x0338, - 0x22b4, 0x0338, 0x22b5, 0x0338, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x2ad0 .. 0x2adf */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x2add, 0x0338, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x3040 .. 0x304f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x304b, 0x3099, 0x0000, 0x0000, 0x304d, 0x3099, 0x0000, 0x0000, - /* 0x3050 .. 0x305f */ - 0x304f, 0x3099, 0x0000, 0x0000, 0x3051, 0x3099, 0x0000, 0x0000, - 0x3053, 0x3099, 0x0000, 0x0000, 0x3055, 0x3099, 0x0000, 0x0000, - 0x3057, 0x3099, 0x0000, 0x0000, 0x3059, 0x3099, 0x0000, 0x0000, - 0x305b, 0x3099, 0x0000, 0x0000, 0x305d, 0x3099, 0x0000, 0x0000, - /* 0x3060 .. 0x306f */ - 0x305f, 0x3099, 0x0000, 0x0000, 0x3061, 0x3099, 0x0000, 0x0000, - 0x0000, 0x0000, 0x3064, 0x3099, 0x0000, 0x0000, 0x3066, 0x3099, - 0x0000, 0x0000, 0x3068, 0x3099, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x3070 .. 0x307f */ - 0x306f, 0x3099, 0x306f, 0x309a, 0x0000, 0x0000, 0x3072, 0x3099, - 0x3072, 0x309a, 0x0000, 0x0000, 0x3075, 0x3099, 0x3075, 0x309a, - 0x0000, 0x0000, 0x3078, 0x3099, 0x3078, 0x309a, 0x0000, 0x0000, - 0x307b, 0x3099, 0x307b, 0x309a, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x3090 .. 0x309f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x3046, 0x3099, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x309d, 0x3099, 0x0000, 0x0000, - /* 0x30a0 .. 0x30af */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x30ab, 0x3099, 0x0000, 0x0000, 0x30ad, 0x3099, 0x0000, 0x0000, - /* 0x30b0 .. 0x30bf */ - 0x30af, 0x3099, 0x0000, 0x0000, 0x30b1, 0x3099, 0x0000, 0x0000, - 0x30b3, 0x3099, 0x0000, 0x0000, 0x30b5, 0x3099, 0x0000, 0x0000, - 0x30b7, 0x3099, 0x0000, 0x0000, 0x30b9, 0x3099, 0x0000, 0x0000, - 0x30bb, 0x3099, 0x0000, 0x0000, 0x30bd, 0x3099, 0x0000, 0x0000, - /* 0x30c0 .. 0x30cf */ - 0x30bf, 0x3099, 0x0000, 0x0000, 0x30c1, 0x3099, 0x0000, 0x0000, - 0x0000, 0x0000, 0x30c4, 0x3099, 0x0000, 0x0000, 0x30c6, 0x3099, - 0x0000, 0x0000, 0x30c8, 0x3099, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x30d0 .. 0x30df */ - 0x30cf, 0x3099, 0x30cf, 0x309a, 0x0000, 0x0000, 0x30d2, 0x3099, - 0x30d2, 0x309a, 0x0000, 0x0000, 0x30d5, 0x3099, 0x30d5, 0x309a, - 0x0000, 0x0000, 0x30d8, 0x3099, 0x30d8, 0x309a, 0x0000, 0x0000, - 0x30db, 0x3099, 0x30db, 0x309a, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x30f0 .. 0x30ff */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x30a6, 0x3099, 0x0000, 0x0000, 0x0000, 0x0000, 0x30ef, 0x3099, - 0x30f0, 0x3099, 0x30f1, 0x3099, 0x30f2, 0x3099, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x30fd, 0x3099, 0x0000, 0x0000, - /* 0xfb10 .. 0xfb1f */ - 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, 0x05d9, 0x05b4, 0x0000, 0x0000, 0x05f2, 0x05b7, - /* 0xfb20 .. 0xfb2f */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x05e9, 0x05c1, 0x05e9, 0x05c2, - 0xfb49, 0x05c1, 0xfb49, 0x05c2, 0x05d0, 0x05b7, 0x05d0, 0x05b8, - /* 0xfb30 .. 0xfb3f */ - 0x05d0, 0x05bc, 0x05d1, 0x05bc, 0x05d2, 0x05bc, 0x05d3, 0x05bc, - 0x05d4, 0x05bc, 0x05d5, 0x05bc, 0x05d6, 0x05bc, 0x0000, 0x0000, - 0x05d8, 0x05bc, 0x05d9, 0x05bc, 0x05da, 0x05bc, 0x05db, 0x05bc, - 0x05dc, 0x05bc, 0x0000, 0x0000, 0x05de, 0x05bc, 0x0000, 0x0000, - /* 0xfb40 .. 0xfb4f */ - 0x05e0, 0x05bc, 0x05e1, 0x05bc, 0x0000, 0x0000, 0x05e3, 0x05bc, - 0x05e4, 0x05bc, 0x0000, 0x0000, 0x05e6, 0x05bc, 0x05e7, 0x05bc, - 0x05e8, 0x05bc, 0x05e9, 0x05bc, 0x05ea, 0x05bc, 0x05d5, 0x05b9, - 0x05d1, 0x05bf, 0x05db, 0x05bf, 0x05e4, 0x05bf, 0x0000, 0x0000 -}; diff --git a/reactos/tools/unicode/cpmap.pl b/reactos/tools/unicode/cpmap.pl deleted file mode 100644 index a04b10d9015..00000000000 --- a/reactos/tools/unicode/cpmap.pl +++ /dev/null @@ -1,1310 +0,0 @@ -#!/usr/bin/perl -# -# Generate code page .c files from ftp.unicode.org descriptions -# -# 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 -# - -# base directory for ftp.unicode.org files -$BASEDIR = "ftp.unicode.org/Public/"; -$MAPPREFIX = $BASEDIR . "MAPPINGS/"; - -# UnicodeData file -$UNICODEDATA = $BASEDIR . "UNIDATA/UnicodeData.txt"; - -# Sort keys file -$SORTKEYS = "www.unicode.org/reports/tr10/allkeys.txt"; - -# Defaults mapping -$DEFAULTS = "./defaults"; - -# Default char for undefined mappings -$DEF_CHAR = ord '?'; - -@allfiles = -( - [ 37, "VENDORS/MICSFT/EBCDIC/CP037.TXT", 0, "IBM EBCDIC US Canada" ], - [ 424, "VENDORS/MISC/CP424.TXT", 0, "IBM EBCDIC Hebrew" ], - [ 437, "VENDORS/MICSFT/PC/CP437.TXT", 1, "OEM United States" ], - [ 500, "VENDORS/MICSFT/EBCDIC/CP500.TXT", 0, "IBM EBCDIC International" ], - [ 737, "VENDORS/MICSFT/PC/CP737.TXT", 1, "OEM Greek 437G" ], - [ 775, "VENDORS/MICSFT/PC/CP775.TXT", 1, "OEM Baltic" ], - [ 850, "VENDORS/MICSFT/PC/CP850.TXT", 1, "OEM Multilingual Latin 1" ], - [ 852, "VENDORS/MICSFT/PC/CP852.TXT", 1, "OEM Slovak Latin 2" ], - [ 855, "VENDORS/MICSFT/PC/CP855.TXT", 1, "OEM Cyrillic" ], - [ 856, "VENDORS/MISC/CP856.TXT", 0, "Hebrew PC" ], - [ 857, "VENDORS/MICSFT/PC/CP857.TXT", 1, "OEM Turkish" ], - [ 860, "VENDORS/MICSFT/PC/CP860.TXT", 1, "OEM Portuguese" ], - [ 861, "VENDORS/MICSFT/PC/CP861.TXT", 1, "OEM Icelandic" ], - [ 862, "VENDORS/MICSFT/PC/CP862.TXT", 1, "OEM Hebrew" ], - [ 863, "VENDORS/MICSFT/PC/CP863.TXT", 1, "OEM Canadian French" ], - [ 864, "VENDORS/MICSFT/PC/CP864.TXT", 0, "OEM Arabic" ], - [ 865, "VENDORS/MICSFT/PC/CP865.TXT", 1, "OEM Nordic" ], - [ 866, "VENDORS/MICSFT/PC/CP866.TXT", 1, "OEM Russian" ], - [ 869, "VENDORS/MICSFT/PC/CP869.TXT", 1, "OEM Greek" ], - [ 874, "VENDORS/MICSFT/PC/CP874.TXT", 1, "ANSI/OEM Thai" ], - [ 875, "VENDORS/MICSFT/EBCDIC/CP875.TXT", 0, "IBM EBCDIC Greek" ], - [ 878, "VENDORS/MISC/KOI8-R.TXT", 0, "Russian KOI8" ], - [ 932, "VENDORS/MICSFT/WINDOWS/CP932.TXT", 0, "ANSI/OEM Japanese Shift-JIS" ], - [ 936, "VENDORS/MICSFT/WINDOWS/CP936.TXT", 0, "ANSI/OEM Simplified Chinese GBK" ], - [ 949, "VENDORS/MICSFT/WINDOWS/CP949.TXT", 0, "ANSI/OEM Korean Unified Hangul" ], - [ 950, "VENDORS/MICSFT/WINDOWS/CP950.TXT", 0, "ANSI/OEM Traditional Chinese Big5" ], - [ 1006, "VENDORS/MISC/CP1006.TXT", 0, "IBM Arabic" ], - [ 1026, "VENDORS/MICSFT/EBCDIC/CP1026.TXT", 0, "IBM EBCDIC Latin 5 Turkish" ], - [ 1250, "VENDORS/MICSFT/WINDOWS/CP1250.TXT", 0, "ANSI Eastern Europe" ], - [ 1251, "VENDORS/MICSFT/WINDOWS/CP1251.TXT", 0, "ANSI Cyrillic" ], - [ 1252, "VENDORS/MICSFT/WINDOWS/CP1252.TXT", 0, "ANSI Latin 1" ], - [ 1253, "VENDORS/MICSFT/WINDOWS/CP1253.TXT", 0, "ANSI Greek" ], - [ 1254, "VENDORS/MICSFT/WINDOWS/CP1254.TXT", 0, "ANSI Turkish" ], - [ 1255, "VENDORS/MICSFT/WINDOWS/CP1255.TXT", 0, "ANSI Hebrew" ], - [ 1256, "VENDORS/MICSFT/WINDOWS/CP1256.TXT", 0, "ANSI Arabic" ], - [ 1257, "VENDORS/MICSFT/WINDOWS/CP1257.TXT", 0, "ANSI Baltic" ], - [ 1258, "VENDORS/MICSFT/WINDOWS/CP1258.TXT", 0, "ANSI/OEM Viet Nam" ], - [ 1361, "OBSOLETE/EASTASIA/KSC/JOHAB.TXT", 0, "Korean Johab" ], - [ 10000, "VENDORS/MICSFT/MAC/ROMAN.TXT", 0, "Mac Roman" ], - [ 10006, "VENDORS/MICSFT/MAC/GREEK.TXT", 0, "Mac Greek" ], - [ 10007, "VENDORS/MICSFT/MAC/CYRILLIC.TXT", 0, "Mac Cyrillic" ], - [ 10029, "VENDORS/MICSFT/MAC/LATIN2.TXT", 0, "Mac Latin 2" ], - [ 10079, "VENDORS/MICSFT/MAC/ICELAND.TXT", 0, "Mac Icelandic" ], - [ 10081, "VENDORS/MICSFT/MAC/TURKISH.TXT", 0, "Mac Turkish" ], - [ 20127, undef, 0, "US-ASCII (7bit)" ], - [ 20866, "VENDORS/MISC/KOI8-R.TXT", 0, "Russian KOI8" ], - [ 20932, "OBSOLETE/EASTASIA/JIS/JIS0208.TXT", 0, "EUC-JP" ], - [ 21866, "VENDORS/MISC/KOI8-U.TXT", 0, "Ukrainian KOI8" ], - [ 28591, "ISO8859/8859-1.TXT", 0, "ISO 8859-1 Latin 1" ], - [ 28592, "ISO8859/8859-2.TXT", 0, "ISO 8859-2 Latin 2 (East European)" ], - [ 28593, "ISO8859/8859-3.TXT", 0, "ISO 8859-3 Latin 3 (South European)" ], - [ 28594, "ISO8859/8859-4.TXT", 0, "ISO 8859-4 Latin 4 (Baltic old)" ], - [ 28595, "ISO8859/8859-5.TXT", 0, "ISO 8859-5 Cyrillic" ], - [ 28596, "ISO8859/8859-6.TXT", 0, "ISO 8859-6 Arabic" ], - [ 28597, "ISO8859/8859-7.TXT", 0, "ISO 8859-7 Greek" ], - [ 28598, "ISO8859/8859-8.TXT", 0, "ISO 8859-8 Hebrew" ], - [ 28599, "ISO8859/8859-9.TXT", 0, "ISO 8859-9 Latin 5 (Turkish)" ], - [ 28600, "ISO8859/8859-10.TXT", 0, "ISO 8859-10 Latin 6 (Nordic)" ], - [ 28603, "ISO8859/8859-13.TXT", 0, "ISO 8859-13 Latin 7 (Baltic)" ], - [ 28604, "ISO8859/8859-14.TXT", 0, "ISO 8859-14 Latin 8 (Celtic)" ], - [ 28605, "ISO8859/8859-15.TXT", 0, "ISO 8859-15 Latin 9 (Euro)" ], - [ 28606, "ISO8859/8859-16.TXT", 0, "ISO 8859-16 Latin 10 (Balkan)" ] -); - - -%ctype = -( - "upper" => 0x0001, - "lower" => 0x0002, - "digit" => 0x0004, - "space" => 0x0008, - "punct" => 0x0010, - "cntrl" => 0x0020, - "blank" => 0x0040, - "xdigit" => 0x0080, - "alpha" => 0x0100 -); - -%categories = -( - "Lu" => $ctype{"alpha"}|$ctype{"upper"}, # Letter, Uppercase - "Ll" => $ctype{"alpha"}|$ctype{"lower"}, # Letter, Lowercase - "Lt" => $ctype{"alpha"}, # Letter, Titlecase - "Mn" => $ctype{"punct"}, # Mark, Non-Spacing - "Mc" => $ctype{"punct"}, # Mark, Spacing Combining - "Me" => $ctype{"punct"}, # Mark, Enclosing - "Nd" => $ctype{"digit"}, # Number, Decimal Digit - "Nl" => $ctype{"punct"}, # Number, Letter - "No" => $ctype{"punct"}, # Number, Other - "Zs" => $ctype{"space"}, # Separator, Space - "Zl" => $ctype{"space"}, # Separator, Line - "Zp" => $ctype{"space"}, # Separator, Paragraph - "Cc" => $ctype{"cntrl"}, # Other, Control - "Cf" => 0, # Other, Format - "Cs" => 0, # Other, Surrogate - "Co" => 0, # Other, Private Use - "Cn" => 0, # Other, Not Assigned - "Lm" => $ctype{"punct"}, # Letter, Modifier - "Lo" => $ctype{"alpha"}, # Letter, Other - "Pc" => $ctype{"punct"}, # Punctuation, Connector - "Pd" => $ctype{"punct"}, # Punctuation, Dash - "Ps" => $ctype{"punct"}, # Punctuation, Open - "Pe" => $ctype{"punct"}, # Punctuation, Close - "Pi" => $ctype{"punct"}, # Punctuation, Initial quote - "Pf" => $ctype{"punct"}, # Punctuation, Final quote - "Po" => $ctype{"punct"}, # Punctuation, Other - "Sm" => $ctype{"punct"}, # Symbol, Math - "Sc" => $ctype{"punct"}, # Symbol, Currency - "Sk" => $ctype{"punct"}, # Symbol, Modifier - "So" => $ctype{"punct"} # Symbol, Other -); - -# a few characters need additional categories that cannot be determined automatically -%special_categories = -( - "xdigit" => [ ord('0')..ord('9'),ord('A')..ord('F'),ord('a')..ord('f'), - 0xff10..0xff19, 0xff21..0xff26, 0xff41..0xff46 ], - "space" => [ 0x09..0x0d, 0x85 ], - "blank" => [ 0x09, 0x20, 0xa0, 0x3000, 0xfeff ], - "cntrl" => [ 0x070f, 0x180b, 0x180c, 0x180d, 0x180e, 0x200c, 0x200d, - 0x200e, 0x200f, 0x202a, 0x202b, 0x202c, 0x202d, 0x202e, - 0x206a, 0x206b, 0x206c, 0x206d, 0x206e, 0x206f, 0xfeff, - 0xfff9, 0xfffa, 0xfffb ] -); - -%directions = -( - "L" => 1, # Left-to-Right - "LRE" => 11, # Left-to-Right Embedding - "LRO" => 11, # Left-to-Right Override - "R" => 2, # Right-to-Left - "AL" => 2, # Right-to-Left Arabic - "RLE" => 11, # Right-to-Left Embedding - "RLO" => 11, # Right-to-Left Override - "PDF" => 11, # Pop Directional Format - "EN" => 3, # European Number - "ES" => 4, # European Number Separator - "ET" => 5, # European Number Terminator - "AN" => 6, # Arabic Number - "CS" => 7, # Common Number Separator - "NSM" => 0, # Non-Spacing Mark - "BN" => 0, # Boundary Neutral - "B" => 8, # Paragraph Separator - "S" => 9, # Segment Separator - "WS" => 10, # Whitespace - "ON" => 11 # Other Neutrals -); - - -################################################################ -# main routine - -READ_DEFAULTS(); -my @sortkeys = READ_SORTKEYS_FILE(); -DUMP_CASE_MAPPINGS(); -DUMP_SORTKEYS(@sortkeys); -DUMP_COMPOSE_TABLES(); -DUMP_CTYPE_TABLES(); - -foreach $file (@allfiles) { HANDLE_FILE( @$file ); } - -OUTPUT_CPTABLE(); - -exit(0); - - -################################################################ -# read in the defaults file -sub READ_DEFAULTS -{ - @unicode_defaults = (); - @unicode_aliases = (); - @tolower_table = (); - @toupper_table = (); - @digitmap_table = (); - @compatmap_table = (); - @category_table = (); - @direction_table = (); - @decomp_table = (); - @compose_table = (); - - # first setup a few default mappings - - open DEFAULTS or die "Cannot open $DEFAULTS"; - print "Loading $DEFAULTS\n"; - while () - { - next if /^\#/; # skip comments - next if /^$/; # skip empty lines - if (/^(([0-9a-fA-F]+)(,[0-9a-fA-F]+)*)\s+([0-9a-fA-F]+|'.'|none)\s+(\#.*)?/) - { - my @src = map hex, split /,/,$1; - my $dst = $4; - my $comment = $5; - if ($#src > 0) { push @unicode_aliases, \@src; } - next if ($dst eq "none"); - $dst = ($dst =~ /\'.\'/) ? ord substr($dst,1,1) : hex $dst; - foreach $src (@src) - { - die "Duplicate value" if defined($unicode_defaults[$src]); - $unicode_defaults[$src] = $dst; - } - next; - } - die "Unrecognized line $_\n"; - } - - # now build mappings from the decomposition field of the Unicode database - - open UNICODEDATA or die "Cannot open $UNICODEDATA"; - print "Loading $UNICODEDATA\n"; - while () - { - # Decode the fields ... - ($code, $name, $cat, $comb, $bidi, - $decomp, $dec, $dig, $num, $mirror, - $oldname, $comment, $upper, $lower, $title) = split /;/; - - my $src = hex $code; - - die "unknown category $cat" unless defined $categories{$cat}; - die "unknown directionality $bidi" unless defined $directions{$bidi}; - - $uniname[$src] = $name; - $category_table[$src] = $categories{$cat}; - $direction_table[$src] = $directions{$bidi}; - - if ($lower ne "") - { - $tolower_table[$src] = hex $lower; - $category_table[$src] |= $ctype{"upper"}|$ctype{"alpha"}; - } - if ($upper ne "") - { - $toupper_table[$src] = hex $upper; - $category_table[$src] |= $ctype{"lower"}|$ctype{"alpha"}; - } - if ($dec ne "") - { - $category_table[$src] |= $ctype{"digit"}; - } - if ($dig ne "") - { - $digitmap_table[$src] = ord $dig; - } - - # copy the category and direction for everything between First/Last pairs - if ($name =~ /, First>/) { $start = $src; } - if ($name =~ /, Last>/) - { - while ($start < $src) - { - $category_table[$start] = $category_table[$src]; - $direction_table[$start] = $direction_table[$src]; - $start++; - } - } - - next if $decomp eq ""; # no decomposition, skip it - - if ($decomp =~ /^<([a-zA-Z]+)>\s+([0-9a-fA-F]+)$/) - { - # decomposition of the form " 1234" -> use char if type is known - if (($src >= 0xf900 && $src < 0xfb00) || ($src >= 0xfe30 && $src < 0xfffd)) - { - # Single char decomposition in the compatibility range - $compatmap_table[$src] = hex $2; - } - next unless ($1 eq "font" || - $1 eq "noBreak" || - $1 eq "circle" || - $1 eq "super" || - $1 eq "sub" || - $1 eq "wide" || - $1 eq "narrow" || - $1 eq "compat" || - $1 eq "small"); - $dst = hex $2; - } - elsif ($decomp =~ /^\s+0020\s+([0-9a-fA-F]+)/) - { - # decomposition " 0020 1234" -> combining accent - $dst = hex $1; - } - elsif ($decomp =~ /^([0-9a-fA-F]+)/) - { - # decomposition contains only char values without prefix -> use first char - $dst = hex $1; - $category_table[$src] |= $category_table[$dst]; - # store decomposition if it contains two chars - if ($decomp =~ /^([0-9a-fA-F]+)\s+([0-9a-fA-F]+)$/) - { - $decomp_table[$src] = [ hex $1, hex $2 ]; - push @compose_table, [ hex $1, hex $2, $src ]; - } - elsif ($decomp =~ /^(<[a-z]+>\s)*([0-9a-fA-F]+)$/ && - (($src >= 0xf900 && $src < 0xfb00) || ($src >= 0xfe30 && $src < 0xfffd))) - { - # Single char decomposition in the compatibility range - $compatmap_table[$src] = hex $2; - } - } - else - { - next; - } - - next if defined($unicode_defaults[$src]); # may have been set in the defaults file - - # check for loops - for ($i = $dst; ; $i = $unicode_defaults[$i]) - { - die sprintf("loop detected for %04x -> %04x",$src,$dst) if $i == $src; - last unless defined($unicode_defaults[$i]); - } - $unicode_defaults[$src] = $dst; - } - - # patch the category of some special characters - - foreach $cat (keys %special_categories) - { - my $flag = $ctype{$cat}; - foreach $i (@{$special_categories{$cat}}) { $category_table[$i] |= $flag; } - } -} - - -################################################################ -# parse the input file -sub READ_FILE -{ - my $name = shift; - open INPUT,$name or die "Cannot open $name"; - - while () - { - next if /^\#/; # skip comments - next if /^$/; # skip empty lines - next if /\x1a/; # skip ^Z - next if (/^0x([0-9a-fA-F]+)\s+\#UNDEFINED/); # undefined char - - if (/^0x([0-9a-fA-F]+)\s+\#DBCS LEAD BYTE/) - { - $cp = hex $1; - push @lead_bytes,$cp; - $cp2uni[$cp] = 0; - next; - } - if (/^0x([0-9a-fA-F]+)\s+0x([0-9a-fA-F]+)\s+(\#.*)?/) - { - $cp = hex $1; - $uni = hex $2; - $cp2uni[$cp] = $uni unless defined($cp2uni[$cp]); - $uni2cp[$uni] = $cp unless defined($uni2cp[$uni]); - if ($cp > 0xff && !defined($cp2uni[$cp >> 8])) - { - push @lead_bytes,$cp >> 8; - $cp2uni[$cp >> 8] = 0; - } - next; - } - die "$name: Unrecognized line $_\n"; - } -} - - -################################################################ -# fill input data for the 20127 (us-ascii) codepage -sub fill_20127_codepage() -{ - for (my $i = 0; $i < 128; $i++) { $cp2uni[$i] = $uni2cp[$i] = $i; } - for (my $i = 128; $i < 256; $i++) { $cp2uni[$i] = $i & 0x7f; } -} - -################################################################ -# get a mapping including glyph chars for MB_USEGLYPHCHARS - -sub get_glyphs_mapping(@) -{ - $_[0x01] = 0x263a; # (WHITE SMILING FACE) - $_[0x02] = 0x263b; # (BLACK SMILING FACE) - $_[0x03] = 0x2665; # (BLACK HEART SUIT) - $_[0x04] = 0x2666; # (BLACK DIAMOND SUIT) - $_[0x05] = 0x2663; # (BLACK CLUB SUIT) - $_[0x06] = 0x2660; # (BLACK SPADE SUIT) - $_[0x07] = 0x2022; # (BULLET) - $_[0x08] = 0x25d8; # (INVERSE BULLET) - $_[0x09] = 0x25cb; # (WHITE CIRCLE) - $_[0x0a] = 0x25d9; # (INVERSE WHITE CIRCLE) - $_[0x0b] = 0x2642; # (MALE SIGN) - $_[0x0c] = 0x2640; # (FEMALE SIGN) - $_[0x0d] = 0x266a; # (EIGHTH NOTE) - $_[0x0e] = 0x266b; # (BEAMED EIGHTH NOTES) - $_[0x0f] = 0x263c; # (WHITE SUN WITH RAYS) - $_[0x10] = 0x25ba; # (BLACK RIGHT-POINTING POINTER) - $_[0x11] = 0x25c4; # (BLACK LEFT-POINTING POINTER) - $_[0x12] = 0x2195; # (UP DOWN ARROW) - $_[0x13] = 0x203c; # (DOUBLE EXCLAMATION MARK) - $_[0x14] = 0x00b6; # (PILCROW SIGN) - $_[0x15] = 0x00a7; # (SECTION SIGN) - $_[0x16] = 0x25ac; # (BLACK RECTANGLE) - $_[0x17] = 0x21a8; # (UP DOWN ARROW WITH BASE) - $_[0x18] = 0x2191; # (UPWARDS ARROW) - $_[0x19] = 0x2193; # (DOWNWARDS ARROW) - $_[0x1a] = 0x2192; # (RIGHTWARDS ARROW) - $_[0x1b] = 0x2190; # (LEFTWARDS ARROW) - $_[0x1c] = 0x221f; # (RIGHT ANGLE) - $_[0x1d] = 0x2194; # (LEFT RIGHT ARROW) - $_[0x1e] = 0x25b2; # (BLACK UP-POINTING TRIANGLE) - $_[0x1f] = 0x25bc; # (BLACK DOWN-POINTING TRIANGLE) - $_[0x7f] = 0x2302; # (HOUSE) - return @_; -} - -################################################################ -# build EUC-JP table from the JIS 0208 file -# FIXME: for proper EUC-JP we should probably read JIS 0212 too -# but this would require 3-byte DBCS characters -sub READ_JIS0208_FILE -{ - my $name = shift; - - # ASCII chars - for ($i = 0x00; $i <= 0x7f; $i++) - { - $cp2uni[$i] = $i; - $uni2cp[$i] = $i; - } - - # JIS X 0201 right plane - for ($i = 0xa1; $i <= 0xdf; $i++) - { - $cp2uni[0x8e00 + $i] = 0xfec0 + $i; - $uni2cp[0xfec0 + $i] = 0x8e00 + $i; - } - - # lead bytes - foreach $i (0x8e, 0x8f, 0xa1 .. 0xfe) - { - push @lead_bytes,$i; - $cp2uni[$i] = 0; - } - - # undefined chars - foreach $i (0x80 .. 0x8d, 0x90 .. 0xa0, 0xff) - { - $cp2uni[$i] = $DEF_CHAR; - } - - # Shift-JIS compatibility - $uni2cp[0x00a5] = 0x5c; - $uni2cp[0x203e] = 0x7e; - - # Fix backslash conversion - $cp2uni[0xa1c0] = 0xff3c; - $uni2cp[0xff3c] = 0xa1c0; - - open INPUT, "$name" or die "Cannot open $name"; - while () - { - next if /^\#/; # skip comments - next if /^$/; # skip empty lines - next if /\x1a/; # skip ^Z - if (/^0x[0-9a-fA-F]+\s+0x([0-9a-fA-F]+)\s+0x([0-9a-fA-F]+)\s+(\#.*)?/) - { - $cp = 0x8080 + hex $1; - $uni = hex $2; - $cp2uni[$cp] = $uni unless defined($cp2uni[$cp]); - $uni2cp[$uni] = $cp unless defined($uni2cp[$uni]); - next; - } - die "$name: Unrecognized line $_\n"; - } -} - - -################################################################ -# build the sort keys table -sub READ_SORTKEYS_FILE -{ - my @sortkeys = (); - for (my $i = 0; $i < 65536; $i++) { $sortkeys[$i] = [ -1, 0, 0, 0, 0 ] }; - - open INPUT, "$SORTKEYS" or die "Cannot open $SORTKEYS"; - print "Loading $SORTKEYS\n"; - while () - { - next if /^\#/; # skip comments - next if /^$/; # skip empty lines - next if /\x1a/; # skip ^Z - next if /^\@version/; # skip @version header - if (/^([0-9a-fA-F]+)\s+;\s+\[([*.])([0-9a-fA-F]{4})\.([0-9a-fA-F]{4})\.([0-9a-fA-F]{4})\.([0-9a-fA-F]+)\]/) - { - my ($uni,$variable) = (hex $1, $2); - next if $uni > 65535; - $sortkeys[$uni] = [ $uni, hex $3, hex $4, hex $5, hex $6 ]; - next; - } - if (/^([0-9a-fA-F]+\s+)+;\s+\[[*.]([0-9a-fA-F]{4})\.([0-9a-fA-F]{4})\.([0-9a-fA-F]{4})\.([0-9a-fA-F]+)\]/) - { - # multiple character sequence, ignored for now - next; - } - die "$SORTKEYS: Unrecognized line $_\n"; - } - close INPUT; - - # compress the keys to 32 bit: - # key 1 to 16 bits, key 2 to 8 bits, key 3 to 4 bits, key 4 to 1 bit - - @sortkeys = sort { ${$a}[1] <=> ${$b}[1] or - ${$a}[2] <=> ${$b}[2] or - ${$a}[3] <=> ${$b}[3] or - ${$a}[4] <=> ${$b}[4] or - $a cmp $b; } @sortkeys; - - my ($n2, $n3) = (1, 1); - my @keys = (-1, -1, -1, -1, -1 ); - my @flatkeys = (); - - for (my $i = 0; $i < 65536; $i++) - { - my @current = @{$sortkeys[$i]}; - next if $current[0] == -1; - if ($current[1] == $keys[1]) - { - if ($current[2] == $keys[2]) - { - if ($current[3] == $keys[3]) - { - # nothing - } - else - { - $keys[3] = $current[3]; - $n3++; - die if ($n3 >= 16); - } - } - else - { - $keys[2] = $current[2]; - $keys[3] = $current[3]; - $n2++; - $n3 = 1; - die if ($n2 >= 256); - } - } - else - { - $keys[1] = $current[1]; - $keys[2] = $current[2]; - $keys[3] = $current[3]; - $n2 = 1; - $n3 = 1; - } - - if ($current[2]) { $current[2] = $n2; } - if ($current[3]) { $current[3] = $n3; } - if ($current[4]) { $current[4] = 1; } - - $flatkeys[$current[0]] = ($current[1] << 16) | ($current[2] << 8) | ($current[3] << 4) | $current[4]; - } - return @flatkeys; -} - - -################################################################ -# build the sort keys table -sub DUMP_SORTKEYS -{ - my @keys = @_; - - # count the number of 256-key ranges that contain something - - my @offsets = (); - my $ranges = 2; - for (my $i = 0; $i < 256; $i++) { $offsets[$i] = 256; } - for (my $i = 0; $i < 65536; $i++) - { - next unless defined $keys[$i]; - $offsets[$i >> 8] = $ranges * 256; - $ranges++; - $i |= 255; - } - - # output the range offsets - - open OUTPUT,">collation.c.new" or die "Cannot create collation.c"; - printf "Building collation.c\n"; - printf OUTPUT "/* Unicode collation element table */\n"; - printf OUTPUT "/* generated from %s */\n", $SORTKEYS; - printf OUTPUT "/* DO NOT EDIT!! */\n\n"; - - printf OUTPUT "const unsigned int collation_table[%d] =\n{\n", $ranges*256; - printf OUTPUT " /* index */\n"; - printf OUTPUT "%s,\n", DUMP_ARRAY( "0x%08x", 0, @offsets ); - - # output the default values - - printf OUTPUT " /* defaults */\n"; - printf OUTPUT "%s", DUMP_ARRAY( "0x%08x", 0, (0xffffffff) x 256 ); - - # output all the key ranges - - for (my $i = 0; $i < 256; $i++) - { - next if $offsets[$i] == 256; - printf OUTPUT ",\n /* 0x%02x00 .. 0x%02xff */\n", $i, $i; - printf OUTPUT "%s", DUMP_ARRAY( "0x%08x", 0xffffffff, @keys[($i<<8) .. ($i<<8)+255] ); - } - printf OUTPUT "\n};\n"; - close OUTPUT; - save_file("collation.c"); -} - - -################################################################ -# add default mappings once the file had been read -sub ADD_DEFAULT_MAPPINGS -{ - # Apply aliases - - foreach $alias (@unicode_aliases) - { - my $target = undef; - foreach $src (@$alias) - { - if (defined($uni2cp[$src])) - { - $target = $uni2cp[$src]; - last; - } - } - next unless defined($target); - - # At least one char of the alias set is defined, set the others to the same value - foreach $src (@$alias) - { - $uni2cp[$src] = $target unless defined($uni2cp[$src]); - } - } - - # For every src -> target mapping in the defaults table, - # make uni2cp[src] = uni2cp[target] if uni2cp[target] is defined - - for ($src = 0; $src < 65536; $src++) - { - next if defined($uni2cp[$src]); # source has a definition already - next unless defined($unicode_defaults[$src]); # no default for this char - my $target = $unicode_defaults[$src]; - - # do a recursive mapping until we find a target char that is defined - while (!defined($uni2cp[$target]) && - defined($unicode_defaults[$target])) { $target = $unicode_defaults[$target]; } - - if (defined($uni2cp[$target])) { $uni2cp[$src] = $uni2cp[$target]; } - } - - # Add an identity mapping for all undefined chars - - for ($i = 0; $i < 256; $i++) - { - next if defined($cp2uni[$i]); - next if defined($uni2cp[$i]); - $cp2uni[$i] = $uni2cp[$i] = $i; - } -} - -################################################################ -# dump an array of integers -sub DUMP_ARRAY -{ - my ($format,$default,@array) = @_; - my $i, $ret = " "; - for ($i = 0; $i < $#array; $i++) - { - $ret .= sprintf($format, defined $array[$i] ? $array[$i] : $default); - $ret .= (($i % 8) != 7) ? ", " : ",\n "; - } - $ret .= sprintf($format, defined $array[$i] ? $array[$i] : $default); - return $ret; -} - -################################################################ -# dump an SBCS mapping table -sub DUMP_SBCS_TABLE -{ - my ($codepage, $has_glyphs, $name) = @_; - my $i; - - # output the ascii->unicode table - - if ($has_glyphs) - { - printf OUTPUT "static const WCHAR cp2uni[512] =\n"; - printf OUTPUT "{\n%s", DUMP_ARRAY( "0x%04x", $DEF_CHAR, @cp2uni[0 .. 255] ); - printf OUTPUT ",\n /* glyphs */\n%s\n};\n\n", - DUMP_ARRAY( "0x%04x", $DEF_CHAR, get_glyphs_mapping(@cp2uni[0 .. 255]) ); - } - else - { - printf OUTPUT "static const WCHAR cp2uni[256] =\n"; - printf OUTPUT "{\n%s\n};\n\n", DUMP_ARRAY( "0x%04x", $DEF_CHAR, @cp2uni[0 .. 255] ); - } - - # count the number of unicode->ascii subtables that contain something - - my @filled = (); - my $subtables = 1; - for ($i = 0; $i < 65536; $i++) - { - next unless defined $uni2cp[$i]; - $filled[$i >> 8] = 1; - $subtables++; - $i |= 255; - } - - # output all the subtables into a single array - - printf OUTPUT "static const unsigned char uni2cp_low[%d] =\n{\n", $subtables*256; - for ($i = 0; $i < 256; $i++) - { - next unless $filled[$i]; - printf OUTPUT " /* 0x%02x00 .. 0x%02xff */\n", $i, $i; - printf OUTPUT "%s,\n", DUMP_ARRAY( "0x%02x", $DEF_CHAR, @uni2cp[($i<<8) .. ($i<<8)+255] ); - } - printf OUTPUT " /* defaults */\n"; - printf OUTPUT "%s\n};\n\n", DUMP_ARRAY( "0x%02x", 0, ($DEF_CHAR) x 256 ); - - # output a table of the offsets of the subtables in the previous array - - my $pos = 0; - my @offsets = (); - for ($i = 0; $i < 256; $i++) - { - if ($filled[$i]) { push @offsets, $pos; $pos += 256; } - else { push @offsets, ($subtables-1) * 256; } - } - printf OUTPUT "static const unsigned short uni2cp_high[256] =\n"; - printf OUTPUT "{\n%s\n};\n\n", DUMP_ARRAY( "0x%04x", 0, @offsets ); - - # output the code page descriptor - - printf OUTPUT "const struct sbcs_table cptable_%03d =\n{\n", $codepage; - printf OUTPUT " { %d, 1, 0x%04x, 0x%04x, \"%s\" },\n", - $codepage, $DEF_CHAR, $DEF_CHAR, $name; - printf OUTPUT " cp2uni,\n"; - if ($has_glyphs) { printf OUTPUT " cp2uni + 256,\n"; } - else { printf OUTPUT " cp2uni,\n"; } - printf OUTPUT " uni2cp_low,\n"; - printf OUTPUT " uni2cp_high\n};\n"; -} - - -################################################################ -# dump a DBCS mapping table -sub DUMP_DBCS_TABLE -{ - my ($codepage, $name) = @_; - my $i, $x, $y; - - # build a list of lead bytes that are actually used - - my @lblist = (); - LBLOOP: for ($y = 0; $y <= $#lead_bytes; $y++) - { - my $base = $lead_bytes[$y] << 8; - for ($x = 0; $x < 256; $x++) - { - if (defined $cp2uni[$base+$x]) - { - push @lblist,$lead_bytes[$y]; - next LBLOOP; - } - } - } - my $unused = ($#lead_bytes > $#lblist); - - # output the ascii->unicode table for the single byte chars - - printf OUTPUT "static const WCHAR cp2uni[%d] =\n", 256 * ($#lblist + 2 + $unused); - printf OUTPUT "{\n%s,\n", DUMP_ARRAY( "0x%04x", $DEF_CHAR, @cp2uni[0 .. 255] ); - - # output the default table for unused lead bytes - - if ($unused) - { - printf OUTPUT " /* unused lead bytes */\n"; - printf OUTPUT "%s,\n", DUMP_ARRAY( "0x%04x", 0, ($DEF_CHAR) x 256 ); - } - - # output the ascii->unicode table for each DBCS lead byte - - for ($y = 0; $y <= $#lblist; $y++) - { - my $base = $lblist[$y] << 8; - printf OUTPUT " /* lead byte %02x */\n", $lblist[$y]; - printf OUTPUT "%s", DUMP_ARRAY( "0x%04x", $DEF_CHAR, @cp2uni[$base .. $base+255] ); - printf OUTPUT ($y < $#lblist) ? ",\n" : "\n};\n\n"; - } - - # output the lead byte subtables offsets - - my @offsets = (); - for ($x = 0; $x < 256; $x++) { $offsets[$x] = 0; } - for ($x = 0; $x <= $#lblist; $x++) { $offsets[$lblist[$x]] = $x + 1; } - if ($unused) - { - # increment all lead bytes offset to take into account the unused table - for ($x = 0; $x <= $#lead_bytes; $x++) { $offsets[$lead_bytes[$x]]++; } - } - printf OUTPUT "static const unsigned char cp2uni_leadbytes[256] =\n"; - printf OUTPUT "{\n%s\n};\n\n", DUMP_ARRAY( "0x%02x", 0, @offsets ); - - # count the number of unicode->ascii subtables that contain something - - my @filled = (); - my $subtables = 1; - for ($i = 0; $i < 65536; $i++) - { - next unless defined $uni2cp[$i]; - $filled[$i >> 8] = 1; - $subtables++; - $i |= 255; - } - - # output all the subtables into a single array - - printf OUTPUT "static const unsigned short uni2cp_low[%d] =\n{\n", $subtables*256; - for ($y = 0; $y < 256; $y++) - { - next unless $filled[$y]; - printf OUTPUT " /* 0x%02x00 .. 0x%02xff */\n", $y, $y; - printf OUTPUT "%s,\n", DUMP_ARRAY( "0x%04x", $DEF_CHAR, @uni2cp[($y<<8) .. ($y<<8)+255] ); - } - printf OUTPUT " /* defaults */\n"; - printf OUTPUT "%s\n};\n\n", DUMP_ARRAY( "0x%04x", 0, ($DEF_CHAR) x 256 ); - - # output a table of the offsets of the subtables in the previous array - - my $pos = 0; - my @offsets = (); - for ($y = 0; $y < 256; $y++) - { - if ($filled[$y]) { push @offsets, $pos; $pos += 256; } - else { push @offsets, ($subtables-1) * 256; } - } - printf OUTPUT "static const unsigned short uni2cp_high[256] =\n"; - printf OUTPUT "{\n%s\n};\n\n", DUMP_ARRAY( "0x%04x", 0, @offsets ); - - # output the code page descriptor - - printf OUTPUT "const struct dbcs_table cptable_%03d =\n{\n", $codepage; - printf OUTPUT " { %d, 2, 0x%04x, 0x%04x, \"%s\" },\n", - $codepage, $DEF_CHAR, $DEF_CHAR, $name; - printf OUTPUT " cp2uni,\n"; - printf OUTPUT " cp2uni_leadbytes,\n"; - printf OUTPUT " uni2cp_low,\n"; - printf OUTPUT " uni2cp_high,\n"; - DUMP_LB_RANGES(); - printf OUTPUT "};\n"; -} - - -################################################################ -# dump the list of defined lead byte ranges -sub DUMP_LB_RANGES -{ - my @list = (); - my $i = 0; - foreach $i (@lead_bytes) { $list[$i] = 1; } - my $on = 0; - printf OUTPUT " { "; - for ($i = 0; $i < 256; $i++) - { - if ($on) - { - if (!defined $list[$i]) { printf OUTPUT "0x%02x, ", $i-1; $on = 0; } - } - else - { - if ($list[$i]) { printf OUTPUT "0x%02x, ", $i; $on = 1; } - } - } - if ($on) { printf OUTPUT "0xff, "; } - printf OUTPUT "0x00, 0x00 }\n"; -} - - -################################################################ -# dump the case mapping tables -sub DUMP_CASE_MAPPINGS -{ - open OUTPUT,">casemap.c.new" or die "Cannot create casemap.c"; - printf "Building casemap.c\n"; - printf OUTPUT "/* Unicode case mappings */\n"; - printf OUTPUT "/* Automatically generated; DO NOT EDIT!! */\n\n"; - printf OUTPUT "#include \"wine/unicode.h\"\n\n"; - - DUMP_CASE_TABLE( "wine_casemap_lower", @tolower_table ); - DUMP_CASE_TABLE( "wine_casemap_upper", @toupper_table ); - DUMP_CASE_TABLE( "wine_digitmap", @digitmap_table ); - DUMP_CASE_TABLE( "wine_compatmap", @compatmap_table ); - close OUTPUT; - save_file("casemap.c"); -} - - -################################################################ -# dump a case mapping table -sub DUMP_CASE_TABLE -{ - my ($name,@table) = @_; - - # count the number of sub tables that contain something - # also compute the low and upper populated bounds - - my @lowerbounds = ( 0, 0 ); - my @upperbounds = ( 0, 255 ); - my $index = 0; - my @filled = (); - for ($i = 0; $i < 65536; $i++) - { - next unless defined $table[$i]; - if (!defined $filled[$i >> 8]) - { - $lowerbounds[$index] = $i & 0xff; - $upperbounds[$index] = 0xff - $lowerbounds[$index]; - $filled[$i >> 8] = $index * 256 + 512; - $index++; - } - else - { - $upperbounds[$index-1] = 0xff - ($i & 0xff); - } - $table[$i] = ($table[$i] - $i) & 0xffff; - } - - # Collapse blocks upwards if possible - my $removed = 0; - $index = 0; - for ($i = 0; $i < 256; $i++) - { - next unless defined $filled[$i]; - if ($upperbounds[$index - 1] > $lowerbounds[$index]) - { - $removed = $removed + $lowerbounds[$index]; - } - else - { - $removed = $removed + $upperbounds[$index - 1]; - $lowerbounds[$index] = $upperbounds[$index - 1]; - } - $filled[$i] = $filled[$i] - $removed; - $index++; - } - - # dump the table - - printf OUTPUT "const WCHAR %s[%d] =\n", $name, $index * 256 + 512 - $removed; - printf OUTPUT "{\n /* index */\n"; - printf OUTPUT "%s,\n", DUMP_ARRAY( "0x%04x", 256, @filled ); - printf OUTPUT " /* defaults */\n"; - printf OUTPUT "%s", DUMP_ARRAY( "0x%04x", 0, (0) x 256 ); - $index = 0; - for ($i = 0; $i < 256; $i++) - { - next unless $filled[$i]; - printf OUTPUT ",\n /* 0x%02x%02x .. 0x%02xff */\n", $i, $lowerbounds[$index], $i; - printf OUTPUT "%s", DUMP_ARRAY( "0x%04x", 0, - @table[($i<<8) + $lowerbounds[$index] .. ($i<<8)+255] ); - $index++; - } - printf OUTPUT "\n};\n"; -} - - -################################################################ -# dump the ctype tables -sub DUMP_CTYPE_TABLES -{ - open OUTPUT,">wctype.c.new" or die "Cannot create wctype.c"; - printf "Building wctype.c\n"; - printf OUTPUT "/* Unicode ctype tables */\n"; - printf OUTPUT "/* Automatically generated; DO NOT EDIT!! */\n\n"; - printf OUTPUT "#include \"wine/unicode.h\"\n\n"; - - my $i; - my @array = (0) x 256; - - # add the direction in the high 4 bits of the category - for ($i = 0; $i < 65536; $i++) - { - $category_table[$i] |= $direction_table[$i] << 12; - } - - # try to merge table rows - for ($row = 0; $row < 256; $row++) - { - my $rowtxt = sprintf "%04x" x 256, @category_table[($row<<8)..($row<<8)+255]; - if (defined($sequences{$rowtxt})) - { - # reuse an existing row - $array[$row] = $sequences{$rowtxt}; - } - else - { - # create a new row - $sequences{$rowtxt} = $array[$row] = $#array + 1; - push @array, @category_table[($row<<8)..($row<<8)+255]; - } - } - - printf OUTPUT "const unsigned short wine_wctype_table[%d] =\n{\n", $#array+1; - printf OUTPUT " /* offsets */\n%s,\n", DUMP_ARRAY( "0x%04x", 0, @array[0..255] ); - printf OUTPUT " /* values */\n%s\n};\n", DUMP_ARRAY( "0x%04x", 0, @array[256..$#array] ); - - close OUTPUT; - save_file("wctype.c"); -} - - -################################################################ -# dump the char composition tables -sub DUMP_COMPOSE_TABLES -{ - open OUTPUT,">compose.c.new" or die "Cannot create compose.c"; - printf "Building compose.c\n"; - printf OUTPUT "/* Unicode char composition */\n"; - printf OUTPUT "/* Automatically generated; DO NOT EDIT!! */\n\n"; - printf OUTPUT "#include \"wine/unicode.h\"\n\n"; - - ######### composition table - - my @filled = (); - foreach $i (@compose_table) - { - my @comp = @$i; - push @{$filled[$comp[1]]}, [ $comp[0], $comp[2] ]; - } - - # count how many different second chars we have - - for ($i = $count = 0; $i < 65536; $i++) - { - next unless defined $filled[$i]; - $count++; - } - - # build the table of second chars and offsets - - my $pos = $count + 1; - for ($i = 0; $i < 65536; $i++) - { - next unless defined $filled[$i]; - push @table, $i, $pos; - $pos += @{$filled[$i]}; - } - # terminator with last position - push @table, 0, $pos; - printf OUTPUT "const WCHAR unicode_compose_table[0x%x] =\n{\n", 2*$pos; - printf OUTPUT " /* second chars + offsets */\n%s", DUMP_ARRAY( "0x%04x", 0, @table ); - - # build the table of first chars and mappings - - for ($i = 0; $i < 65536; $i++) - { - next unless defined $filled[$i]; - my @table = (); - my @list = sort { $a->[0] <=> $b->[0] } @{$filled[$i]}; - for ($j = 0; $j <= $#list; $j++) - { - push @table, $list[$j][0], $list[$j][1]; - } - printf OUTPUT ",\n /* 0x%04x */\n%s", $i, DUMP_ARRAY( "0x%04x", 0, @table ); - } - printf OUTPUT "\n};\n\nconst unsigned int unicode_compose_table_size = %d;\n\n", $count; - - ######### decomposition table - - # first determine all the 16-char subsets that contain something - - my @filled = (0) x 4096; - my $pos = 16*2; # for the null subset - for ($i = 0; $i < 65536; $i++) - { - next unless defined $decomp_table[$i]; - $filled[$i >> 4] = $pos; - $pos += 16*2; - $i |= 15; - } - my $total = $pos; - - # now count the 256-char subsets that contain something - - my @filled_idx = (256) x 256; - $pos = 256 + 16; - for ($i = 0; $i < 4096; $i++) - { - next unless $filled[$i]; - $filled_idx[$i >> 4] = $pos; - $pos += 16; - $i |= 15; - } - my $null_offset = $pos; # null mapping - $total += $pos; - - # add the index offsets to the subsets positions - - for ($i = 0; $i < 4096; $i++) - { - next unless $filled[$i]; - $filled[$i] += $null_offset; - } - - # dump the main index - - printf OUTPUT "const WCHAR unicode_decompose_table[%d] =\n", $total; - printf OUTPUT "{\n /* index */\n"; - printf OUTPUT "%s", DUMP_ARRAY( "0x%04x", 0, @filled_idx ); - printf OUTPUT ",\n /* null sub-index */\n%s", DUMP_ARRAY( "0x%04x", 0, ($null_offset) x 16 ); - - # dump the second-level indexes - - for ($i = 0; $i < 256; $i++) - { - next unless ($filled_idx[$i] > 256); - my @table = @filled[($i<<4)..($i<<4)+15]; - for ($j = 0; $j < 16; $j++) { $table[$j] ||= $null_offset; } - printf OUTPUT ",\n /* sub-index %02x */\n", $i; - printf OUTPUT "%s", DUMP_ARRAY( "0x%04x", 0, @table ); - } - - # dump the 16-char subsets - - printf OUTPUT ",\n /* null mapping */\n"; - printf OUTPUT "%s", DUMP_ARRAY( "0x%04x", 0, (0) x 32 ); - - for ($i = 0; $i < 4096; $i++) - { - next unless $filled[$i]; - my @table = (0) x 32; - for ($j = 0; $j < 16; $j++) - { - if (defined $decomp_table[($i<<4) + $j]) - { - $table[2 * $j] = ${$decomp_table[($i << 4) + $j]}[0]; - $table[2 * $j + 1] = ${$decomp_table[($i << 4) + $j]}[1]; - } - } - printf OUTPUT ",\n /* 0x%03x0 .. 0x%03xf */\n", $i, $i; - printf OUTPUT "%s", DUMP_ARRAY( "0x%04x", 0, @table ); - } - - printf OUTPUT "\n};\n"; - close OUTPUT; - save_file("compose.c"); -} - - -################################################################ -# read an input file and generate the corresponding .c file -sub HANDLE_FILE -{ - my ($codepage,$filename,$has_glyphs,$comment) = @_; - - @cp2uni = (); - @lead_bytes = (); - @uni2cp = (); - - # symbol codepage file is special - if ($codepage == 20932) { READ_JIS0208_FILE($MAPPREFIX . $filename); } - elsif ($codepage == 20127) { fill_20127_codepage(); } - else { READ_FILE($MAPPREFIX . $filename); } - - # hack: 0x00a5 must map to backslash in Shift-JIS - if ($codepage == 932) { $uni2cp[0x00a5] = 0x5c; } - - ADD_DEFAULT_MAPPINGS(); - - my $output = sprintf "c_%03d.c", $codepage; - open OUTPUT,">$output.new" or die "Cannot create $output"; - - printf "Building %s from %s (%s)\n", $output, $filename || "hardcoded data", $comment; - - # dump all tables - - printf OUTPUT "/* code page %03d (%s) */\n", $codepage, $comment; - if ($filename) - { - printf OUTPUT "/* generated from %s */\n", $MAPPREFIX . $filename; - printf OUTPUT "/* DO NOT EDIT!! */\n\n"; - } - else - { - printf OUTPUT "/* Automatically generated; DO NOT EDIT!! */\n\n"; - } - printf OUTPUT "#include \"wine/unicode.h\"\n\n"; - - if ($#lead_bytes == -1) { DUMP_SBCS_TABLE( $codepage, $has_glyphs, $comment ); } - else { DUMP_DBCS_TABLE( $codepage, $comment ); } - close OUTPUT; - save_file($output); -} - - -################################################################ -# save a file if modified -sub save_file($) -{ - my $file = shift; - if (-f $file && !system "cmp $file $file.new >/dev/null") - { - unlink "$file.new"; - } - else - { - rename "$file.new", "$file"; - } -} - - -################################################################ -# output the list of codepage tables into the cptable.c file -sub OUTPUT_CPTABLE -{ - @tables_decl = (); - - foreach $file (@allfiles) - { - my ($codepage,$filename,$comment) = @$file; - push @tables_decl, sprintf("extern union cptable cptable_%03d;\n",$codepage); - } - - push @tables_decl, sprintf("\nstatic const union cptable * const cptables[%d] =\n{\n",$#allfiles+1); - foreach $file (@allfiles) - { - my ($codepage,$filename,$comment) = @$file; - push @tables_decl, sprintf(" &cptable_%03d,\n", $codepage); - } - push @tables_decl, "};"; - REPLACE_IN_FILE( "cptable.c", @tables_decl ); -} - -################################################################ -# replace the contents of a file between ### cpmap ### marks - -sub REPLACE_IN_FILE -{ - my $name = shift; - my @data = @_; - my @lines = (); - open(FILE,$name) or die "Can't open $name"; - while () - { - push @lines, $_; - last if /\#\#\# cpmap begin \#\#\#/; - } - push @lines, @data; - while () - { - if (/\#\#\# cpmap end \#\#\#/) { push @lines, "\n", $_; last; } - } - push @lines, ; - open(FILE,">$name.new") or die "Can't modify $name"; - print FILE @lines; - close(FILE); - save_file($name); -} diff --git a/reactos/tools/unicode/cptable.c b/reactos/tools/unicode/cptable.c deleted file mode 100644 index 50849468e65..00000000000 --- a/reactos/tools/unicode/cptable.c +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Codepage tables - * - * 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 - */ - -#include - -#include "wine/unicode.h" - -/* Everything below this line is generated automatically by cpmap.pl */ -/* ### cpmap begin ### */ -extern union cptable cptable_037; -extern union cptable cptable_424; -extern union cptable cptable_437; -extern union cptable cptable_500; -extern union cptable cptable_737; -extern union cptable cptable_775; -extern union cptable cptable_850; -extern union cptable cptable_852; -extern union cptable cptable_855; -extern union cptable cptable_856; -extern union cptable cptable_857; -extern union cptable cptable_860; -extern union cptable cptable_861; -extern union cptable cptable_862; -extern union cptable cptable_863; -extern union cptable cptable_864; -extern union cptable cptable_865; -extern union cptable cptable_866; -extern union cptable cptable_869; -extern union cptable cptable_874; -extern union cptable cptable_875; -extern union cptable cptable_878; -extern union cptable cptable_932; -extern union cptable cptable_936; -extern union cptable cptable_949; -extern union cptable cptable_950; -extern union cptable cptable_1006; -extern union cptable cptable_1026; -extern union cptable cptable_1250; -extern union cptable cptable_1251; -extern union cptable cptable_1252; -extern union cptable cptable_1253; -extern union cptable cptable_1254; -extern union cptable cptable_1255; -extern union cptable cptable_1256; -extern union cptable cptable_1257; -extern union cptable cptable_1258; -extern union cptable cptable_1361; -extern union cptable cptable_10000; -extern union cptable cptable_10006; -extern union cptable cptable_10007; -extern union cptable cptable_10029; -extern union cptable cptable_10079; -extern union cptable cptable_10081; -extern union cptable cptable_20127; -extern union cptable cptable_20866; -extern union cptable cptable_20932; -extern union cptable cptable_21866; -extern union cptable cptable_28591; -extern union cptable cptable_28592; -extern union cptable cptable_28593; -extern union cptable cptable_28594; -extern union cptable cptable_28595; -extern union cptable cptable_28596; -extern union cptable cptable_28597; -extern union cptable cptable_28598; -extern union cptable cptable_28599; -extern union cptable cptable_28600; -extern union cptable cptable_28603; -extern union cptable cptable_28604; -extern union cptable cptable_28605; -extern union cptable cptable_28606; - -static const union cptable * const cptables[62] = -{ - &cptable_037, - &cptable_424, - &cptable_437, - &cptable_500, - &cptable_737, - &cptable_775, - &cptable_850, - &cptable_852, - &cptable_855, - &cptable_856, - &cptable_857, - &cptable_860, - &cptable_861, - &cptable_862, - &cptable_863, - &cptable_864, - &cptable_865, - &cptable_866, - &cptable_869, - &cptable_874, - &cptable_875, - &cptable_878, - &cptable_932, - &cptable_936, - &cptable_949, - &cptable_950, - &cptable_1006, - &cptable_1026, - &cptable_1250, - &cptable_1251, - &cptable_1252, - &cptable_1253, - &cptable_1254, - &cptable_1255, - &cptable_1256, - &cptable_1257, - &cptable_1258, - &cptable_1361, - &cptable_10000, - &cptable_10006, - &cptable_10007, - &cptable_10029, - &cptable_10079, - &cptable_10081, - &cptable_20127, - &cptable_20866, - &cptable_20932, - &cptable_21866, - &cptable_28591, - &cptable_28592, - &cptable_28593, - &cptable_28594, - &cptable_28595, - &cptable_28596, - &cptable_28597, - &cptable_28598, - &cptable_28599, - &cptable_28600, - &cptable_28603, - &cptable_28604, - &cptable_28605, - &cptable_28606, -}; -/* ### cpmap end ### */ -/* Everything above this line is generated automatically by cpmap.pl */ - -#define NB_CODEPAGES (sizeof(cptables)/sizeof(cptables[0])) - - -static int cmp_codepage( const void *codepage, const void *entry ) -{ - return *(const unsigned int *)codepage - (*(const union cptable *const *)entry)->info.codepage; -} - - -/* get the table of a given code page */ -const union cptable *wine_cp_get_table( unsigned int codepage ) -{ - const union cptable **res; - - if (!(res = bsearch( &codepage, cptables, NB_CODEPAGES, - sizeof(cptables[0]), cmp_codepage ))) return NULL; - return *res; -} - - -/* enum valid codepages */ -const union cptable *wine_cp_enum_table( unsigned int index ) -{ - if (index >= NB_CODEPAGES) return NULL; - return cptables[index]; -} diff --git a/reactos/tools/unicode/defaults b/reactos/tools/unicode/defaults deleted file mode 100644 index b823fb4c91b..00000000000 --- a/reactos/tools/unicode/defaults +++ /dev/null @@ -1,202 +0,0 @@ -# Default Unicode mappings -# -# 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 -# -# NOTES: -# -# This file contains default mappings for Unicode chars that aren't -# defined directly in the code page file. It is used by the cpmap.pl -# tool to build codepage tables. -# -# The first column defines equivalence sets; if any character in the set -# is defined in the codepage file, all others in the set will map to the -# same value. -# -# The second column specifies the default char to map the whole set to, -# if no characters in the set are defined by the codepage file. -# -# Characters that have an explicit decomposition in the UnicodeData.txt -# file (for instance 00c0 LATIN CAPITAL LETTER A WITH GRAVE -> 0041 0300) -# are handled automatically and do not have to be defined here. They can -# still be defined if necessary to override the unicode decomposition. -# - -# letters - -00a2,20a1 'c' # CENT SIGN, COLON SIGN -00a3,20a4 'L' # POUND SIGN, LIRA SIGN -00a5 'Y' # YEN SIGN -00a6 '|' # BROKEN BAR -00a9 'c' # COPYRIGHT SIGN -00ae 'r' # REGISTERED SIGN -00b5,03bc 'u' # MICRO SIGN, GREEK SMALL LETTER MU -00c6 'A' # LATIN CAPITAL LETTER AE -00d0,0110,0189 'D' # LATIN CAPITAL LETTER D WITH STROKE/AFRICAN D/ETH -00d7 'x' # MULTIPLICATION SIGN -00d8,2205 'O' # LATIN CAPITAL LETTER O WITH STROKE, EMPTY SET -00df,03b2 none # LATIN SMALL LETTER SHARP S, GREEK SMALL LETTER BETA -00e6 'a' # LATIN SMALL LETTER AE -00f0 'd' # LATIN SMALL LETTER ETH -00f8 'o' # LATIN SMALL LETTER O WITH STROKE -0111 'd' # LATIN SMALL LETTER D WITH STROKE -0126 'H' # LATIN CAPITAL LETTER H WITH STROKE -0127 'h' # LATIN SMALL LETTER H WITH STROKE -0131 'i' # LATIN SMALL LETTER DOTLESS I -0141 'L' # LATIN CAPITAL LETTER L WITH STROKE -0142 'l' # LATIN SMALL LETTER L WITH STROKE -0152 'O' # LATIN CAPITAL LIGATURE OE -0153 'o' # LATIN SMALL LIGATURE OE -0166 'T' # LATIN CAPITAL LETTER T WITH STROKE -0167 't' # LATIN SMALL LETTER T WITH STROKE -0180 'b' # LATIN SMALL LETTER B WITH STROKE -0190 'E' # LATIN CAPITAL LETTER OPEN E -0191 'F' # LATIN CAPITAL LETTER F WITH HOOK -0192 'f' # LATIN SMALL LETTER F WITH HOOK -0197 'I' # LATIN CAPITAL LETTER I WITH STROKE -019a 'l' # LATIN SMALL LETTER L WITH BAR -019f 'O' # LATIN CAPITAL LETTER O WITH MIDDLE TILDE -01ab 't' # LATIN SMALL LETTER T WITH PALATAL HOOK -01ae 'T' # LATIN CAPITAL LETTER T WITH RETROFLEX HOOK -01b6 'z' # LATIN SMALL LETTER Z WITH STROKE -0391 'A' # GREEK CAPITAL LETTER ALPHA -0392 'B' # GREEK CAPITAL LETTER BETA -0395 'E' # GREEK CAPITAL LETTER EPSILON -0396 'Z' # GREEK CAPITAL LETTER ZETA -0397 'H' # GREEK CAPITAL LETTER ETA -0399 'I' # GREEK CAPITAL LETTER IOTA -039a 'K' # GREEK CAPITAL LETTER KAPPA -039c 'M' # GREEK CAPITAL LETTER MU -039d 'N' # GREEK CAPITAL LETTER NU -039f 'O' # GREEK CAPITAL LETTER OMICRON -03a1 'P' # GREEK CAPITAL LETTER RHO -03a4 'T' # GREEK CAPITAL LETTER TAU -03a5 'Y' # GREEK CAPITAL LETTER UPSILON -03a7 'X' # GREEK CAPITAL LETTER CHI -01e4 'G' # LATIN CAPITAL LETTER G WITH STROKE -01e5 'g' # LATIN SMALL LETTER G WITH STROKE -0261 'g' # LATIN SMALL LETTER SCRIPT G -2118 'P' # SCRIPT CAPITAL P -212e 'e' # ESTIMATED SYMBOL - -# accents - -00a8,0308 '"' # DIAERESIS -00af,02c9,0304 2014 # MACRON -> EM DASH -00b4,02b9,02ca,0301,2032 ''' # ACUTE ACCENT, PRIME -00b8,0327 ',' # CEDILLA -02ba,02dd,030b,2033 '"' # DOUBLE ACUTE ACCENT, DOUBLE PRIME -02c4,2303 '^' # UP ARROWHEAD -02c6,0302 '^' # CIRCUMFLEX ACCENT -02c7,030c 'v' # COMBINING CARON -> CARON -02c8 ''' # MODIFIER LETTER VERTICAL LINE -02cb,0300 '`' # GRAVE ACCENT -02cd,0331,0332 '_' # MODIFIER LETTER LOW MACRON, COMBINING MACRON BELOW, COMBINING LOW LINE -02d8,0306 none # BREVE -02d9,0307 none # DOT ABOVE -02da,030a,2070,2218 00b0 # RING ABOVE, SUPERSCRIPT ZERO, RING OPERATOR -> DEGREE SIGN -02db,0328 none # OGONEK -02dc,0303 '~' # SMALL TILDE -0305,203e 00af # OVERLINE -> MACRON -030e '"' # COMBINING DOUBLE VERTICAL LINE ABOVE -0333 '_' # COMBINING DOUBLE LOW LINE - -# mathematical symbols - -00b1,2213 none # PLUS-MINUS SIGN, MINUS-OR-PLUS SIGN -2044,2215 '/' # FRACTION/DIVISION SLASH -2216 '\' # SET MINUS -2217 '*' # ASTERISK OPERATOR -221a 'V' # SQUARE ROOT -221f 'L' # RIGHT ANGLE -2223 '|' # DIVIDES -2229 'n' # INTERSECTION -2236 ':' # RATIO -2248 02DC # ALMOST EQUAL TO -> SMALL TILDE -2261,2263 '=' # IDENTICAL TO, STRICTLY EQUIVALENT TO -226a 00ab # MUCH LESS-THAN -> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK -226b 00bb # MUCH GREATER-THAN -> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -22c5 00b7 # DOT OPERATOR -> MIDDLE DOT - -# misc symbols - -00a1 '!' # INVERTED EXCLAMATION MARK -00ab,300a '<' # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK, LEFT DOUBLE ANGLE BRACKET -00ad '-' # SOFT HYPHEN -00bb,300b '>' # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK, RIGHT DOUBLE ANGLE BRACKET -01c0 2502 # LATIN LETTER DENTAL CLICK -> BOX DRAWINGS LIGHT VERTICAL -01c3 '!' # LATIN LETTER RETROFLEX CLICK -02bb 2018 # MODIFIER LETTER TURNED COMMA -> LEFT SINGLE QUOTATION MARK -02bc,2019 ''' # RIGHT SINGLE QUOTATION MARK -2010,2011,2212 '-' # HYPHEN, MINUS SIGN -2013,2014,2015 '-' # EN DASH, EM DASH, HORIZONTAL BAR, MINUS SIGN -2018,201b,2035 '`' # LEFT SINGLE QUOTATION MARK, SINGLE HIGH-REVERSED-9 QUOTATION MARK, REVERSED PRIME -201a ',' # SINGLE LOW-9 QUOTATION MARK -201c,301d '"' # LEFT DOUBLE QUOTATION MARK, REVERSED DOUBLE PRIME QUOTATION MARK -201d,301e '"' # RIGHT DOUBLE QUOTATION MARK, DOUBLE PRIME QUOTATION MARK -201e,301f ',' # LOW DOUBLE PRIME QUOTATION MARK, DOUBLE LOW-9 QUOTATION MARK -2022,2219 none # BULLET, BULLET OPERATOR -2039,3008 '<' # SINGLE LEFT-POINTING ANGLE QUOTATION MARK, LEFT ANGLE BRACKET -203a,3009 '>' # SINGLE RIGHT-POINTING ANGLE QUOTATION MARK, RIGHT ANGLE BRACKET -203c '!' # DOUBLE EXCLAMATION MARK -2190 2039 # LEFTWARDS ARROW -> SINGLE LEFT-POINTING ANGLE QUOTATION MARK -2191 02c6 # UPWARDS ARROW -> MODIFIER LETTER CIRCUMFLEX ACCENT -2192 203a # RIGHTWARDS ARROW -> SINGLE RIGHT-POINTING ANGLE QUOTATION MARK -2193 02c7 # DOWNWARDS ARROW -> CARON -2194 '-' # LEFT RIGHT ARROW -2195 '|' # UP DOWN ARROW -223c '~' # TILDE -301a '[' # LEFT WHITE SQUARE BRACKET -301b ']' # RIGHT WHITE SQUARE BRACKET -fe49,fe4a,fe4b,fe4c 203e # DOUBLE WAVY OVERLINE -> OVERLINE -fe4d,fe4e,fe4f '_' # DASHED/CENTRELINE/WAVY LOW LINE - -# box drawing chars - -2500,2501 '-' # BOX DRAWINGS LIGHT/HEAVY HORIZONTAL -2502,2503 '|' # BOX DRAWINGS LIGHT/HEAVY VERTICAL -2504,2505 '-' # BOX DRAWINGS LIGHT/HEAVY TRIPLE DASH HORIZONTAL -2506,2507 00a6 # BOX DRAWINGS LIGHT/HEAVY TRIPLE DASH VERTICAL -> BROKEN BAR -2508,2509 '-' # BOX DRAWINGS LIGHT/HEAVY QUADRUPLE DASH HORIZONTAL -250a,250b 00a6 # BOX DRAWINGS LIGHT/HEAVY QUADRUPLE DASH VERTICAL -> BROKEN BAR -250c,250d,250e,250f '+' # BOX DRAWINGS LIGHT/HEAVY DOWN AND RIGHT -2510,2511,2512,2513 00ac # BOX DRAWINGS LIGHT/HEAVY DOWN AND LEFT -> NOT SIGN -2514,2515,2516,2517 'L' # BOX DRAWINGS LIGHT/HEAVY UP AND RIGHT -2518,2519,251a,251b '+' # BOX DRAWINGS LIGHT/HEAVY UP AND LEFT -251c,251d,251e,251f,2520,2521,2522,2523 '+' # BOX DRAWINGS LIGHT/HEAVY VERTICAL AND RIGHT -2524,2525,2526,2527,2528,2529,252a,252b '+' # BOX DRAWINGS LIGHT/HEAVY VERTICAL AND LEFT -252c,252d,252e,252f,2530,2531,2532,2533 'T' # BOX DRAWINGS LIGHT/HEAVY DOWN AND HORIZONTAL -2534,2535,2536,2537,2538,2539,253a,253b '+' # BOX DRAWINGS LIGHT/HEAVY UP AND HORIZONTAL -253c,253d,253e,253f,2540,2541,2542,2543,2544,2545,2546,2547,2548,2549,254a,254b '+' # BOX DRAWINGS LIGHT/HEAVY VERTICAL AND HORIZONTAL -254c,254d '-' # BOX DRAWINGS LIGHT/HEAVY DOUBLE DASH HORIZONTAL -254e,254f 00a6 # BOX DRAWINGS LIGHT/HEAVY DOUBLE DASH VERTICAL -> BROKEN BAR -2550 '=' # BOX DRAWINGS DOUBLE HORIZONTAL -2551 '|' # BOX DRAWINGS DOUBLE VERTICAL -2552,2553,2554 '+' # BOX DRAWINGS DOWN AND RIGHT -2555,2556,2557 00ac # BOX DRAWINGS DOWN AND LEFT -> NOT SIGN -2558,2559,255a 'L' # BOX DRAWINGS UP AND RIGHT -255b,255c,255d '+' # BOX DRAWINGS UP AND LEFT -255e,255f,2560 '+' # BOX DRAWINGS VERTICAL AND RIGHT -2561,2562,2563 '+' # BOX DRAWINGS VERTICAL AND LEFT -2564,2565,2566 'T' # BOX DRAWINGS DOWN AND HORIZONTAL -2567,2568,2569 '+' # BOX DRAWINGS UP AND HORIZONTAL -256a,256b,256c '+' # BOX DRAWINGS VERTICAL AND HORIZONTAL -2571 '/' # BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT -2572 '\' # BOX DRAWINGS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT -2573 'X' # BOX DRAWINGS LIGHT DIAGONAL CROSS -2574,2576,2578,257a,257c,257e '-' # BOX DRAWINGS LIGHT/HEAVY LEFT/RIGHT -2575,2577,2579,257b,257d,257f '|' # BOX DRAWINGS LIGHT/HEAVY UP/DOWN -25cb,25ef 'O' # WHITE/LARGE CIRCLE diff --git a/reactos/tools/unicode/fold.c b/reactos/tools/unicode/fold.c deleted file mode 100644 index 87a4a418faa..00000000000 --- a/reactos/tools/unicode/fold.c +++ /dev/null @@ -1,198 +0,0 @@ -/* - * String folding - * - * Copyright 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 "wine/unicode.h" - -static inline WCHAR to_unicode_digit( WCHAR ch ) -{ - extern const WCHAR wine_digitmap[]; - return ch + wine_digitmap[wine_digitmap[ch >> 8] + (ch & 0xff)]; -} - -static inline WCHAR to_unicode_native( WCHAR ch ) -{ - extern const WCHAR wine_compatmap[]; - return ch + wine_compatmap[wine_compatmap[ch >> 8] + (ch & 0xff)]; -} - -static const WCHAR wine_ligatures[] = -{ - 0x00c6, 0x00de, 0x00df, 0x00e6, 0x00fe, 0x0132, 0x0133, 0x0152, - 0x0153, 0x01c4, 0x01c5, 0x01c6, 0x01c7, 0x01c8, 0x01c9, 0x01ca, - 0x01cb, 0x01cc, 0x01e2, 0x01e3, 0x01f1, 0x01f2, 0x01f3, 0x01fc, - 0x01fd, 0x05f0, 0x05f1, 0x05f2, 0xfb00, 0xfb01, 0xfb02, 0xfb03, - 0xfb04, 0xfb05, 0xfb06 -}; - -/* Unicode expanded ligatures */ -static const WCHAR wine_expanded_ligatures[][4] = -{ - { 'A','E','\0',1 }, - { 'T','H','\0',1 }, - { 's','s','\0',1 }, - { 'a','e','\0',1 }, - { 't','h','\0',1 }, - { 'I','J','\0',1 }, - { 'i','j','\0',1 }, - { 'O','E','\0',1 }, - { 'o','e','\0',1 }, - { 'D',0x017d,'\0',1 }, - { 'D',0x017e,'\0',1 }, - { 'd',0x017e,'\0',1 }, - { 'L','J','\0',1 }, - { 'L','j','\0',1 }, - { 'l','j','\0',1 }, - { 'N','J','\0',1 }, - { 'N','j','\0',1 }, - { 'n','j','\0',1 }, - { 0x0100,0x0112,'\0',1 }, - { 0x0101,0x0113,'\0',1 }, - { 'D','Z','\0',1 }, - { 'D','z','\0',1 }, - { 'd','z','\0',1 }, - { 0x00c1,0x00c9,'\0',1 }, - { 0x00e1,0x00e9,'\0',1 }, - { 0x05d5,0x05d5,'\0',1 }, - { 0x05d5,0x05d9,'\0',1 }, - { 0x05d9,0x05d9,'\0',1 }, - { 'f','f','\0',1 }, - { 'f','i','\0',1 }, - { 'f','l','\0',1 }, - { 'f','f','i',2 }, - { 'f','f','l',2 }, - { 0x017f,'t','\0',1 }, - { 's','t','\0',1 } -}; - -static inline int get_ligature_len( WCHAR wc ) -{ - int low = 0, high = sizeof(wine_ligatures)/sizeof(WCHAR) -1; - while (low <= high) - { - int pos = (low + high) / 2; - if (wine_ligatures[pos] < wc) - low = pos + 1; - else if (wine_ligatures[pos] > wc) - high = pos - 1; - else - return wine_expanded_ligatures[pos][3]; - } - return 0; -} - -static inline const WCHAR* get_ligature( WCHAR wc ) -{ - static const WCHAR empty_ligature[] = { '\0','\0','\0', 0 }; - int low = 0, high = sizeof(wine_ligatures)/sizeof(WCHAR) -1; - while (low <= high) - { - int pos = (low + high) / 2; - if (wine_ligatures[pos] < wc) - low = pos + 1; - else if (wine_ligatures[pos] > wc) - high = pos - 1; - else - return wine_expanded_ligatures[pos]; - } - return empty_ligature; -} - -/* fold a unicode string */ -int wine_fold_string( int flags, const WCHAR *src, int srclen, WCHAR *dst, int dstlen ) -{ - WCHAR *dstbase = dst; - const WCHAR *expand; - int i; - - if (srclen == -1) - srclen = strlenW(src) + 1; /* Include terminating NUL in count */ - - if (!dstlen) - { - /* Calculate the required size for dst */ - dstlen = srclen; - - if (flags & MAP_EXPAND_LIGATURES) - { - while (srclen--) - { - dstlen += get_ligature_len(*src); - src++; - } - } - else if (flags & MAP_COMPOSITE) - { - /* FIXME */ - } - else if (flags & MAP_PRECOMPOSED) - { - /* FIXME */ - } - return dstlen; - } - - if (srclen > dstlen) - return 0; - - dstlen -= srclen; - - /* Actually perform the mapping(s) specified */ - for (i = 0; i < srclen; i++) - { - WCHAR ch = *src; - - if (flags & MAP_EXPAND_LIGATURES) - { - expand = get_ligature(ch); - if (expand[0]) - { - if (!dstlen--) - return 0; - dst[0] = expand[0]; - if (expand[2]) - { - if (!dstlen--) - return 0; - *++dst = expand[1]; - ch = expand[2]; - } - else - ch = expand[1]; - dst++; - } - } - else if (flags & MAP_COMPOSITE) - { - /* FIXME */ - } - else if (flags & MAP_PRECOMPOSED) - { - /* FIXME */ - } - if (flags & MAP_FOLDDIGITS) - ch = to_unicode_digit(ch); - if (flags & MAP_FOLDCZONE) - ch = to_unicode_native(ch); - - *dst++ = ch; - src++; - } - return dst - dstbase; -} diff --git a/reactos/tools/unicode/mbtowc.c b/reactos/tools/unicode/mbtowc.c deleted file mode 100644 index 1995b31a227..00000000000 --- a/reactos/tools/unicode/mbtowc.c +++ /dev/null @@ -1,312 +0,0 @@ -/* - * MultiByteToWideChar implementation - * - * 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 - */ - -#include - -#include "wine/unicode.h" - -/* get the decomposition of a Unicode char */ -static int get_decomposition( WCHAR src, WCHAR *dst, unsigned int dstlen ) -{ - extern const WCHAR unicode_decompose_table[]; - const WCHAR *ptr = unicode_decompose_table; - int res; - - *dst = src; - ptr = unicode_decompose_table + ptr[src >> 8]; - ptr = unicode_decompose_table + ptr[(src >> 4) & 0x0f] + 2 * (src & 0x0f); - if (!*ptr) return 1; - if (dstlen <= 1) return 0; - /* apply the decomposition recursively to the first char */ - if ((res = get_decomposition( *ptr, dst, dstlen-1 ))) dst[res++] = ptr[1]; - return res; -} - -/* check the code whether it is in Unicode Private Use Area (PUA). */ -/* MB_ERR_INVALID_CHARS raises an error converting from 1-byte character to PUA. */ -static inline int is_private_use_area_char(WCHAR code) -{ - return (code >= 0xe000 && code <= 0xf8ff); -} - -/* check src string for invalid chars; return non-zero if invalid char found */ -static inline int check_invalid_chars_sbcs( const struct sbcs_table *table, int flags, - const unsigned char *src, unsigned int srclen ) -{ - const WCHAR * const cp2uni = (flags & MB_USEGLYPHCHARS) ? table->cp2uni_glyphs : table->cp2uni; - const WCHAR def_unicode_char = table->info.def_unicode_char; - const unsigned char def_char = table->uni2cp_low[table->uni2cp_high[def_unicode_char >> 8] - + (def_unicode_char & 0xff)]; - while (srclen) - { - if ((cp2uni[*src] == def_unicode_char && *src != def_char) || - is_private_use_area_char(cp2uni[*src])) break; - src++; - srclen--; - } - return srclen; -} - -/* mbstowcs for single-byte code page */ -/* all lengths are in characters, not bytes */ -static inline int mbstowcs_sbcs( const struct sbcs_table *table, int flags, - const unsigned char *src, unsigned int srclen, - WCHAR *dst, unsigned int dstlen ) -{ - const WCHAR * const cp2uni = (flags & MB_USEGLYPHCHARS) ? table->cp2uni_glyphs : table->cp2uni; - int ret = srclen; - - if (dstlen < srclen) - { - /* buffer too small: fill it up to dstlen and return error */ - srclen = dstlen; - ret = -1; - } - - for (;;) - { - switch(srclen) - { - default: - case 16: dst[15] = cp2uni[src[15]]; - case 15: dst[14] = cp2uni[src[14]]; - case 14: dst[13] = cp2uni[src[13]]; - case 13: dst[12] = cp2uni[src[12]]; - case 12: dst[11] = cp2uni[src[11]]; - case 11: dst[10] = cp2uni[src[10]]; - case 10: dst[9] = cp2uni[src[9]]; - case 9: dst[8] = cp2uni[src[8]]; - case 8: dst[7] = cp2uni[src[7]]; - case 7: dst[6] = cp2uni[src[6]]; - case 6: dst[5] = cp2uni[src[5]]; - case 5: dst[4] = cp2uni[src[4]]; - case 4: dst[3] = cp2uni[src[3]]; - case 3: dst[2] = cp2uni[src[2]]; - case 2: dst[1] = cp2uni[src[1]]; - case 1: dst[0] = cp2uni[src[0]]; - case 0: break; - } - if (srclen < 16) return ret; - dst += 16; - src += 16; - srclen -= 16; - } -} - -/* mbstowcs for single-byte code page with char decomposition */ -static int mbstowcs_sbcs_decompose( const struct sbcs_table *table, int flags, - const unsigned char *src, unsigned int srclen, - WCHAR *dst, unsigned int dstlen ) -{ - const WCHAR * const cp2uni = (flags & MB_USEGLYPHCHARS) ? table->cp2uni_glyphs : table->cp2uni; - unsigned int len; - - if (!dstlen) /* compute length */ - { - WCHAR dummy[4]; /* no decomposition is larger than 4 chars */ - for (len = 0; srclen; srclen--, src++) - len += get_decomposition( cp2uni[*src], dummy, 4 ); - return len; - } - - for (len = dstlen; srclen && len; srclen--, src++) - { - int res = get_decomposition( cp2uni[*src], dst, len ); - if (!res) break; - len -= res; - dst += res; - } - if (srclen) return -1; /* overflow */ - return dstlen - len; -} - -/* query necessary dst length for src string */ -static inline int get_length_dbcs( const struct dbcs_table *table, - const unsigned char *src, unsigned int srclen ) -{ - const unsigned char * const cp2uni_lb = table->cp2uni_leadbytes; - int len; - - for (len = 0; srclen; srclen--, src++, len++) - { - if (cp2uni_lb[*src]) - { - if (!--srclen) break; /* partial char, ignore it */ - src++; - } - } - return len; -} - -/* check src string for invalid chars; return non-zero if invalid char found */ -static inline int check_invalid_chars_dbcs( const struct dbcs_table *table, - const unsigned char *src, unsigned int srclen ) -{ - const WCHAR * const cp2uni = table->cp2uni; - const unsigned char * const cp2uni_lb = table->cp2uni_leadbytes; - const WCHAR def_unicode_char = table->info.def_unicode_char; - const unsigned short def_char = table->uni2cp_low[table->uni2cp_high[def_unicode_char >> 8] - + (def_unicode_char & 0xff)]; - while (srclen) - { - unsigned char off = cp2uni_lb[*src]; - if (off) /* multi-byte char */ - { - if (srclen == 1) break; /* partial char, error */ - if (cp2uni[(off << 8) + src[1]] == def_unicode_char && - ((src[0] << 8) | src[1]) != def_char) break; - src++; - srclen--; - } - else if ((cp2uni[*src] == def_unicode_char && *src != def_char) || - is_private_use_area_char(cp2uni[*src])) break; - src++; - srclen--; - } - return srclen; -} - -/* mbstowcs for double-byte code page */ -/* all lengths are in characters, not bytes */ -static inline int mbstowcs_dbcs( const struct dbcs_table *table, - const unsigned char *src, unsigned int srclen, - WCHAR *dst, unsigned int dstlen ) -{ - const WCHAR * const cp2uni = table->cp2uni; - const unsigned char * const cp2uni_lb = table->cp2uni_leadbytes; - unsigned int len; - - if (!dstlen) return get_length_dbcs( table, src, srclen ); - - for (len = dstlen; srclen && len; len--, srclen--, src++, dst++) - { - unsigned char off = cp2uni_lb[*src]; - if (off) - { - if (!--srclen) break; /* partial char, ignore it */ - src++; - *dst = cp2uni[(off << 8) + *src]; - } - else *dst = cp2uni[*src]; - } - if (srclen) return -1; /* overflow */ - return dstlen - len; -} - - -/* mbstowcs for double-byte code page with character decomposition */ -static int mbstowcs_dbcs_decompose( const struct dbcs_table *table, - const unsigned char *src, unsigned int srclen, - WCHAR *dst, unsigned int dstlen ) -{ - const WCHAR * const cp2uni = table->cp2uni; - const unsigned char * const cp2uni_lb = table->cp2uni_leadbytes; - unsigned int len; - WCHAR ch; - int res; - - if (!dstlen) /* compute length */ - { - WCHAR dummy[4]; /* no decomposition is larger than 4 chars */ - for (len = 0; srclen; srclen--, src++) - { - unsigned char off = cp2uni_lb[*src]; - if (off) - { - if (!--srclen) break; /* partial char, ignore it */ - src++; - ch = cp2uni[(off << 8) + *src]; - } - else ch = cp2uni[*src]; - len += get_decomposition( ch, dummy, 4 ); - } - return len; - } - - for (len = dstlen; srclen && len; srclen--, src++) - { - unsigned char off = cp2uni_lb[*src]; - if (off) - { - if (!--srclen) break; /* partial char, ignore it */ - src++; - ch = cp2uni[(off << 8) + *src]; - } - else ch = cp2uni[*src]; - if (!(res = get_decomposition( ch, dst, len ))) break; - dst += res; - len -= res; - } - if (srclen) return -1; /* overflow */ - return dstlen - len; -} - - -/* return -1 on dst buffer overflow, -2 on invalid input char */ -int wine_cp_mbstowcs( const union cptable *table, int flags, - const char *s, int srclen, - WCHAR *dst, int dstlen ) -{ - const unsigned char *src = (const unsigned char*) s; - - if (table->info.char_size == 1) - { - if (flags & MB_ERR_INVALID_CHARS) - { - if (check_invalid_chars_sbcs( &table->sbcs, flags, src, srclen )) return -2; - } - if (!(flags & MB_COMPOSITE)) - { - if (!dstlen) return srclen; - return mbstowcs_sbcs( &table->sbcs, flags, src, srclen, dst, dstlen ); - } - return mbstowcs_sbcs_decompose( &table->sbcs, flags, src, srclen, dst, dstlen ); - } - else /* mbcs */ - { - if (flags & MB_ERR_INVALID_CHARS) - { - if (check_invalid_chars_dbcs( &table->dbcs, src, srclen )) return -2; - } - if (!(flags & MB_COMPOSITE)) - return mbstowcs_dbcs( &table->dbcs, src, srclen, dst, dstlen ); - else - return mbstowcs_dbcs_decompose( &table->dbcs, src, srclen, dst, dstlen ); - } -} - -/* CP_SYMBOL implementation */ -/* return -1 on dst buffer overflow */ -int wine_cpsymbol_mbstowcs( const char *src, int srclen, WCHAR *dst, int dstlen) -{ - int len, i; - if( dstlen == 0) return srclen; - len = dstlen > srclen ? srclen : dstlen; - for( i = 0; i < len; i++) - { - unsigned char c = src [ i ]; - if( c < 0x20 ) - dst[i] = c; - else - dst[i] = c + 0xf000; - } - if( srclen > len) return -1; - return len; -} diff --git a/reactos/tools/unicode/sortkey.c b/reactos/tools/unicode/sortkey.c deleted file mode 100644 index 17b55374c51..00000000000 --- a/reactos/tools/unicode/sortkey.c +++ /dev/null @@ -1,350 +0,0 @@ -/* - * Unicode sort key generation - * - * Copyright 2003 Dmitry Timoshkov - * - * 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/unicode.h" - -extern int get_decomposition(WCHAR src, WCHAR *dst, unsigned int dstlen); -extern const unsigned int collation_table[]; - -/* - * flags - normalization NORM_* flags - * - * FIXME: 'variable' flag not handled - */ -int wine_get_sortkey(int flags, const WCHAR *src, int srclen, char *dst, int dstlen) -{ - WCHAR dummy[4]; /* no decomposition is larger than 4 chars */ - int key_len[4]; - char *key_ptr[4]; - const WCHAR *src_save = src; - int srclen_save = srclen; - - key_len[0] = key_len[1] = key_len[2] = key_len[3] = 0; - for (; srclen; srclen--, src++) - { - int decomposed_len = 1;/*get_decomposition(*src, dummy, 4);*/ - dummy[0] = *src; - if (decomposed_len) - { - int i; - for (i = 0; i < decomposed_len; i++) - { - WCHAR wch = dummy[i]; - unsigned int ce; - - /* tests show that win2k just ignores NORM_IGNORENONSPACE, - * and skips white space and punctuation characters for - * NORM_IGNORESYMBOLS. - */ - if ((flags & NORM_IGNORESYMBOLS) && (get_char_typeW(wch) & (C1_PUNCT | C1_SPACE))) - continue; - - if (flags & NORM_IGNORECASE) wch = tolowerW(wch); - - ce = collation_table[collation_table[wch >> 8] + (wch & 0xff)]; - if (ce != (unsigned int)-1) - { - if (ce >> 16) key_len[0] += 2; - if ((ce >> 8) & 0xff) key_len[1]++; - if ((ce >> 4) & 0x0f) key_len[2]++; - if (ce & 1) - { - if (wch >> 8) key_len[3]++; - key_len[3]++; - } - } - else - { - key_len[0] += 2; - if (wch >> 8) key_len[0]++; - if (wch & 0xff) key_len[0]++; - } - } - } - } - - if (!dstlen) /* compute length */ - /* 4 * '\1' + 1 * '\0' + key length */ - return key_len[0] + key_len[1] + key_len[2] + key_len[3] + 4 + 1; - - if (dstlen < key_len[0] + key_len[1] + key_len[2] + key_len[3] + 4 + 1) - return 0; /* overflow */ - - src = src_save; - srclen = srclen_save; - - key_ptr[0] = dst; - key_ptr[1] = key_ptr[0] + key_len[0] + 1; - key_ptr[2] = key_ptr[1] + key_len[1] + 1; - key_ptr[3] = key_ptr[2] + key_len[2] + 1; - - for (; srclen; srclen--, src++) - { - int decomposed_len = 1;/*get_decomposition(*src, dummy, 4);*/ - dummy[0] = *src; - if (decomposed_len) - { - int i; - for (i = 0; i < decomposed_len; i++) - { - WCHAR wch = dummy[i]; - unsigned int ce; - - /* tests show that win2k just ignores NORM_IGNORENONSPACE, - * and skips white space and punctuation characters for - * NORM_IGNORESYMBOLS. - */ - if ((flags & NORM_IGNORESYMBOLS) && (get_char_typeW(wch) & (C1_PUNCT | C1_SPACE))) - continue; - - if (flags & NORM_IGNORECASE) wch = tolowerW(wch); - - ce = collation_table[collation_table[wch >> 8] + (wch & 0xff)]; - if (ce != (unsigned int)-1) - { - WCHAR key; - if ((key = ce >> 16)) - { - *key_ptr[0]++ = key >> 8; - *key_ptr[0]++ = key & 0xff; - } - /* make key 1 start from 2 */ - if ((key = (ce >> 8) & 0xff)) *key_ptr[1]++ = key + 1; - /* make key 2 start from 2 */ - if ((key = (ce >> 4) & 0x0f)) *key_ptr[2]++ = key + 1; - /* key 3 is always a character code */ - if (ce & 1) - { - if (wch >> 8) *key_ptr[3]++ = wch >> 8; - if (wch & 0xff) *key_ptr[3]++ = wch & 0xff; - } - } - else - { - *key_ptr[0]++ = 0xff; - *key_ptr[0]++ = 0xfe; - if (wch >> 8) *key_ptr[0]++ = wch >> 8; - if (wch & 0xff) *key_ptr[0]++ = wch & 0xff; - } - } - } - } - - *key_ptr[0] = '\1'; - *key_ptr[1] = '\1'; - *key_ptr[2] = '\1'; - *key_ptr[3]++ = '\1'; - *key_ptr[3] = 0; - - return key_ptr[3] - dst; -} - -static inline int compare_unicode_weights(int flags, const WCHAR *str1, int len1, - const WCHAR *str2, int len2) -{ - unsigned int ce1, ce2; - int ret; - - /* 32-bit collation element table format: - * unicode weight - high 16 bit, diacritic weight - high 8 bit of low 16 bit, - * case weight - high 4 bit of low 8 bit. - */ - while (len1 > 0 && len2 > 0) - { - if (flags & NORM_IGNORESYMBOLS) - { - int skip = 0; - /* FIXME: not tested */ - if (get_char_typeW(*str1) & (C1_PUNCT | C1_SPACE)) - { - str1++; - len1--; - skip = 1; - } - if (get_char_typeW(*str2) & (C1_PUNCT | C1_SPACE)) - { - str2++; - len2--; - skip = 1; - } - if (skip) continue; - } - - /* hyphen and apostrophe are treated differently depending on - * whether SORT_STRINGSORT specified or not - */ - if (!(flags & SORT_STRINGSORT)) - { - if (*str1 == '-' || *str1 == '\'') - { - if (*str2 != '-' && *str2 != '\'') - { - str1++; - len1--; - continue; - } - } - else if (*str2 == '-' || *str2 == '\'') - { - str2++; - len2--; - continue; - } - } - - ce1 = collation_table[collation_table[*str1 >> 8] + (*str1 & 0xff)]; - ce2 = collation_table[collation_table[*str2 >> 8] + (*str2 & 0xff)]; - - if (ce1 != (unsigned int)-1 && ce2 != (unsigned int)-1) - ret = (ce1 >> 16) - (ce2 >> 16); - else - ret = *str1 - *str2; - - if (ret) return ret; - - str1++; - str2++; - len1--; - len2--; - } - return len1 - len2; -} - -static inline int compare_diacritic_weights(int flags, const WCHAR *str1, int len1, - const WCHAR *str2, int len2) -{ - unsigned int ce1, ce2; - int ret; - - /* 32-bit collation element table format: - * unicode weight - high 16 bit, diacritic weight - high 8 bit of low 16 bit, - * case weight - high 4 bit of low 8 bit. - */ - while (len1 > 0 && len2 > 0) - { - if (flags & NORM_IGNORESYMBOLS) - { - int skip = 0; - /* FIXME: not tested */ - if (get_char_typeW(*str1) & (C1_PUNCT | C1_SPACE)) - { - str1++; - len1--; - skip = 1; - } - if (get_char_typeW(*str2) & (C1_PUNCT | C1_SPACE)) - { - str2++; - len2--; - skip = 1; - } - if (skip) continue; - } - - ce1 = collation_table[collation_table[*str1 >> 8] + (*str1 & 0xff)]; - ce2 = collation_table[collation_table[*str2 >> 8] + (*str2 & 0xff)]; - - if (ce1 != (unsigned int)-1 && ce2 != (unsigned int)-1) - ret = ((ce1 >> 8) & 0xff) - ((ce2 >> 8) & 0xff); - else - ret = *str1 - *str2; - - if (ret) return ret; - - str1++; - str2++; - len1--; - len2--; - } - return len1 - len2; -} - -static inline int compare_case_weights(int flags, const WCHAR *str1, int len1, - const WCHAR *str2, int len2) -{ - unsigned int ce1, ce2; - int ret; - - /* 32-bit collation element table format: - * unicode weight - high 16 bit, diacritic weight - high 8 bit of low 16 bit, - * case weight - high 4 bit of low 8 bit. - */ - while (len1 > 0 && len2 > 0) - { - if (flags & NORM_IGNORESYMBOLS) - { - int skip = 0; - /* FIXME: not tested */ - if (get_char_typeW(*str1) & (C1_PUNCT | C1_SPACE)) - { - str1++; - len1--; - skip = 1; - } - if (get_char_typeW(*str2) & (C1_PUNCT | C1_SPACE)) - { - str2++; - len2--; - skip = 1; - } - if (skip) continue; - } - - ce1 = collation_table[collation_table[*str1 >> 8] + (*str1 & 0xff)]; - ce2 = collation_table[collation_table[*str2 >> 8] + (*str2 & 0xff)]; - - if (ce1 != (unsigned int)-1 && ce2 != (unsigned int)-1) - ret = ((ce1 >> 4) & 0x0f) - ((ce2 >> 4) & 0x0f); - else - ret = *str1 - *str2; - - if (ret) return ret; - - str1++; - str2++; - len1--; - len2--; - } - return len1 - len2; -} - -static inline int real_length(const WCHAR *str, int len) -{ - while (len && !str[len - 1]) len--; - return len; -} - -int wine_compare_string(int flags, const WCHAR *str1, int len1, - const WCHAR *str2, int len2) -{ - int ret; - - len1 = real_length(str1, len1); - len2 = real_length(str2, len2); - - ret = compare_unicode_weights(flags, str1, len1, str2, len2); - if (!ret) - { - if (!(flags & NORM_IGNORENONSPACE)) - ret = compare_diacritic_weights(flags, str1, len1, str2, len2); - if (!ret && !(flags & NORM_IGNORECASE)) - ret = compare_case_weights(flags, str1, len1, str2, len2); - } - return ret; -} diff --git a/reactos/tools/unicode/string.c b/reactos/tools/unicode/string.c deleted file mode 100644 index 8f85c632062..00000000000 --- a/reactos/tools/unicode/string.c +++ /dev/null @@ -1,517 +0,0 @@ -/* - * Unicode string manipulation functions - * - * 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 - */ - -#include -#include -#include - -#define WINE_UNICODE_INLINE /* nothing */ -#include "wine/unicode.h" - -int strcmpiW( const WCHAR *str1, const WCHAR *str2 ) -{ - for (;;) - { - int ret = tolowerW(*str1) - tolowerW(*str2); - if (ret || !*str1) return ret; - str1++; - str2++; - } -} - -int strncmpiW( const WCHAR *str1, const WCHAR *str2, int n ) -{ - int ret = 0; - for ( ; n > 0; n--, str1++, str2++) - if ((ret = tolowerW(*str1) - tolowerW(*str2)) || !*str1) break; - return ret; -} - -int memicmpW( const WCHAR *str1, const WCHAR *str2, int n ) -{ - int ret = 0; - for ( ; n > 0; n--, str1++, str2++) - if ((ret = tolowerW(*str1) - tolowerW(*str2))) break; - return ret; -} - -WCHAR *strstrW( const WCHAR *str, const WCHAR *sub ) -{ - while (*str) - { - const WCHAR *p1 = str, *p2 = sub; - while (*p1 && *p2 && *p1 == *p2) { p1++; p2++; } - if (!*p2) return (WCHAR *)str; - str++; - } - return NULL; -} - -/* strtolW and strtoulW implementation based on the GNU C library code */ -/* Copyright (C) 1991,92,94,95,96,97,98,99,2000,2001 Free Software Foundation, Inc. */ - -long int strtolW( const WCHAR *nptr, WCHAR **endptr, int base ) -{ - int negative; - register unsigned long int cutoff; - register unsigned int cutlim; - register unsigned long int i; - register const WCHAR *s; - register WCHAR c; - const WCHAR *save, *end; - int overflow; - - if (base < 0 || base == 1 || base > 36) return 0; - - save = s = nptr; - - /* Skip white space. */ - while (isspaceW (*s)) - ++s; - if (!*s) goto noconv; - - /* Check for a sign. */ - negative = 0; - if (*s == '-') - { - negative = 1; - ++s; - } - else if (*s == '+') - ++s; - - /* Recognize number prefix and if BASE is zero, figure it out ourselves. */ - if (*s == '0') - { - if ((base == 0 || base == 16) && toupperW(s[1]) == 'X') - { - s += 2; - base = 16; - } - else if (base == 0) - base = 8; - } - else if (base == 0) - base = 10; - - /* Save the pointer so we can check later if anything happened. */ - save = s; - end = NULL; - - cutoff = ULONG_MAX / (unsigned long int) base; - cutlim = ULONG_MAX % (unsigned long int) base; - - overflow = 0; - i = 0; - c = *s; - for (;c != '\0'; c = *++s) - { - if (s == end) - break; - if (c >= '0' && c <= '9') - c -= '0'; - else if (isalphaW (c)) - c = toupperW (c) - 'A' + 10; - else - break; - if ((int) c >= base) - break; - /* Check for overflow. */ - if (i > cutoff || (i == cutoff && c > cutlim)) - overflow = 1; - else - { - i *= (unsigned long int) base; - i += c; - } - } - - /* Check if anything actually happened. */ - if (s == save) - goto noconv; - - /* Store in ENDPTR the address of one character - past the last character we converted. */ - if (endptr != NULL) - *endptr = (WCHAR *)s; - - /* Check for a value that is within the range of - `unsigned LONG int', but outside the range of `LONG int'. */ - if (overflow == 0 - && i > (negative - ? -((unsigned long int) (LONG_MIN + 1)) + 1 - : (unsigned long int) LONG_MAX)) - overflow = 1; - - if (overflow) - { - return negative ? LONG_MIN : LONG_MAX; - } - - /* Return the result of the appropriate sign. */ - return negative ? -i : i; - -noconv: - /* We must handle a special case here: the base is 0 or 16 and the - first two characters are '0' and 'x', but the rest are not - hexadecimal digits. This is no error case. We return 0 and - ENDPTR points to the `x`. */ - if (endptr != NULL) - { - if (save - nptr >= 2 && toupperW (save[-1]) == 'X' - && save[-2] == '0') - *endptr = (WCHAR *)&save[-1]; - else - /* There was no number to convert. */ - *endptr = (WCHAR *)nptr; - } - - return 0L; -} - - -unsigned long int strtoulW( const WCHAR *nptr, WCHAR **endptr, int base ) -{ - int negative; - register unsigned long int cutoff; - register unsigned int cutlim; - register unsigned long int i; - register const WCHAR *s; - register WCHAR c; - const WCHAR *save, *end; - int overflow; - - if (base < 0 || base == 1 || base > 36) return 0; - - save = s = nptr; - - /* Skip white space. */ - while (isspaceW (*s)) - ++s; - if (!*s) goto noconv; - - /* Check for a sign. */ - negative = 0; - if (*s == '-') - { - negative = 1; - ++s; - } - else if (*s == '+') - ++s; - - /* Recognize number prefix and if BASE is zero, figure it out ourselves. */ - if (*s == '0') - { - if ((base == 0 || base == 16) && toupperW(s[1]) == 'X') - { - s += 2; - base = 16; - } - else if (base == 0) - base = 8; - } - else if (base == 0) - base = 10; - - /* Save the pointer so we can check later if anything happened. */ - save = s; - end = NULL; - - cutoff = ULONG_MAX / (unsigned long int) base; - cutlim = ULONG_MAX % (unsigned long int) base; - - overflow = 0; - i = 0; - c = *s; - for (;c != '\0'; c = *++s) - { - if (s == end) - break; - if (c >= '0' && c <= '9') - c -= '0'; - else if (isalphaW (c)) - c = toupperW (c) - 'A' + 10; - else - break; - if ((int) c >= base) - break; - /* Check for overflow. */ - if (i > cutoff || (i == cutoff && c > cutlim)) - overflow = 1; - else - { - i *= (unsigned long int) base; - i += c; - } - } - - /* Check if anything actually happened. */ - if (s == save) - goto noconv; - - /* Store in ENDPTR the address of one character - past the last character we converted. */ - if (endptr != NULL) - *endptr = (WCHAR *)s; - - if (overflow) - { - return ULONG_MAX; - } - - /* Return the result of the appropriate sign. */ - return negative ? -i : i; - -noconv: - /* We must handle a special case here: the base is 0 or 16 and the - first two characters are '0' and 'x', but the rest are not - hexadecimal digits. This is no error case. We return 0 and - ENDPTR points to the `x`. */ - if (endptr != NULL) - { - if (save - nptr >= 2 && toupperW (save[-1]) == 'X' - && save[-2] == '0') - *endptr = (WCHAR *)&save[-1]; - else - /* There was no number to convert. */ - *endptr = (WCHAR *)nptr; - } - - return 0L; -} - - -/* format a WCHAR string according to a printf format; helper for vsnprintfW */ -static int format_string( WCHAR *buffer, size_t len, const char *format, const WCHAR *str, int str_len ) -{ - size_t count = 0; - int i, left_align = 0, width = 0, max = 0; - - assert( *format == '%' ); - format++; /* skip '%' */ - - while (*format == '0' || *format == '+' || *format == '-' || *format == ' ' || *format == '#') - { - if (*format == '-') left_align = 1; - format++; - } - - while (isdigit(*format)) width = width * 10 + *format++ - '0'; - - if (str_len == -1) str_len = strlenW( str ); - if (*format == '.') - { - format++; - while (isdigit(*format)) max = max * 10 + *format++ - '0'; - if (max > str_len) max = str_len; - } - else max = str_len; - - if (*format == 'h' || *format == 'l') format++; - - assert( *format == 's' ); - - if (!left_align && width > max) - { - if ((count += width - max) >= len) return -1; - for (i = 0; i < width - max; i++) *buffer++ = ' '; - } - - if ((count += max) >= len) return -1; - memcpy( buffer, str, max * sizeof(WCHAR) ); - buffer += max; - - if (left_align && width > max) - { - if ((count += width - max) >= len) return -1; - for (i = 0; i < width - max; i++) *buffer++ = ' '; - } - return count; -} - -int vsnprintfW(WCHAR *str, size_t len, const WCHAR *format, va_list valist) -{ - unsigned int written = 0; - const WCHAR *iter = format; - char bufa[256], fmtbufa[64], *fmta; - - while (*iter) - { - while (*iter && *iter != '%') - { - if (written++ >= len) - return -1; - *str++ = *iter++; - } - if (*iter == '%') - { - if (iter[1] == '%') - { - if (written++ >= len) - return -1; - *str++ = '%'; /* "%%"->'%' */ - iter += 2; - continue; - } - - fmta = fmtbufa; - *fmta++ = *iter++; - while (*iter == '0' || - *iter == '+' || - *iter == '-' || - *iter == ' ' || - *iter == '*' || - *iter == '#') - { - if (*iter == '*') - { - char *buffiter = bufa; - int fieldlen = va_arg(valist, int); - sprintf(buffiter, "%d", fieldlen); - while (*buffiter) - *fmta++ = *buffiter++; - } - else - *fmta++ = *iter; - iter++; - } - - while (isdigit(*iter)) - *fmta++ = *iter++; - - if (*iter == '.') - { - *fmta++ = *iter++; - if (*iter == '*') - { - char *buffiter = bufa; - int fieldlen = va_arg(valist, int); - sprintf(buffiter, "%d", fieldlen); - while (*buffiter) - *fmta++ = *buffiter++; - iter++; - } - else - while (isdigit(*iter)) - *fmta++ = *iter++; - } - if (*iter == 'h' || *iter == 'l') - *fmta++ = *iter++; - - switch (*iter) - { - case 's': - { - static const WCHAR none[] = { '(','n','u','l','l',')',0 }; - const WCHAR *wstr = va_arg(valist, const WCHAR *); - int count; - - *fmta++ = 's'; - *fmta = 0; - count = format_string( str, len - written, fmtbufa, wstr ? wstr : none, -1 ); - if (count == -1) return -1; - str += count; - written += count; - iter++; - break; - } - - case 'c': - { - WCHAR wstr; - int count; - - wstr = va_arg(valist, int); - *fmta++ = 's'; - *fmta = 0; - count = format_string( str, len - written, fmtbufa, &wstr, 1 ); - if (count == -1) return -1; - str += count; - written += count; - iter++; - break; - } - - default: - { - /* For non wc types, use system sprintf and append to wide char output */ - /* FIXME: for unrecognised types, should ignore % when printing */ - char *bufaiter = bufa; - if (*iter == 'p') - sprintf(bufaiter, "%0*lX", 2 * (int)sizeof(void*), - (unsigned long)va_arg(valist, void *)); - else - { - *fmta++ = *iter; - *fmta = '\0'; - if (*iter == 'a' || *iter == 'A' || - *iter == 'e' || *iter == 'E' || - *iter == 'f' || *iter == 'F' || - *iter == 'g' || *iter == 'G') - sprintf(bufaiter, fmtbufa, va_arg(valist, double)); - else - { - /* FIXME: On 32 bit systems this doesn't handle int 64's. */ - sprintf(bufaiter, fmtbufa, va_arg(valist, void *)); - } - } - while (*bufaiter) - { - if (written++ >= len) - return -1; - *str++ = *bufaiter++; - } - iter++; - break; - } - } - } - } - if (written >= len) - return -1; - *str++ = 0; - return (int)written; -} - -int vsprintfW( WCHAR *str, const WCHAR *format, va_list valist ) -{ - return vsnprintfW( str, INT_MAX, format, valist ); -} - -int snprintfW( WCHAR *str, size_t len, const WCHAR *format, ...) -{ - int retval; - va_list valist; - va_start(valist, format); - retval = vsnprintfW(str, len, format, valist); - va_end(valist); - return retval; -} - -int sprintfW( WCHAR *str, const WCHAR *format, ...) -{ - int retval; - va_list valist; - va_start(valist, format); - retval = vsnprintfW(str, INT_MAX, format, valist); - va_end(valist); - return retval; -} diff --git a/reactos/tools/unicode/unicode.rbuild b/reactos/tools/unicode/unicode.rbuild deleted file mode 100644 index 17c11935b2e..00000000000 --- a/reactos/tools/unicode/unicode.rbuild +++ /dev/null @@ -1,74 +0,0 @@ - - - - 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 - diff --git a/reactos/tools/unicode/utf8.c b/reactos/tools/unicode/utf8.c deleted file mode 100644 index c95bc519155..00000000000 --- a/reactos/tools/unicode/utf8.c +++ /dev/null @@ -1,338 +0,0 @@ -/* - * UTF-8 support routines - * - * 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 - */ - -#include - -#include "wine/unicode.h" - -extern WCHAR compose( const WCHAR *str ); - -/* number of following bytes in sequence based on first byte value (for bytes above 0x7f) */ -static const char utf8_length[128] = -{ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x80-0x8f */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x90-0x9f */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0xa0-0xaf */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0xb0-0xbf */ - 0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 0xc0-0xcf */ - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 0xd0-0xdf */ - 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, /* 0xe0-0xef */ - 3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0 /* 0xf0-0xff */ -}; - -/* first byte mask depending on UTF-8 sequence length */ -static const unsigned char utf8_mask[4] = { 0x7f, 0x1f, 0x0f, 0x07 }; - -/* minimum Unicode value depending on UTF-8 sequence length */ -static const unsigned int utf8_minval[4] = { 0x0, 0x80, 0x800, 0x10000 }; - - -/* get the next char value taking surrogates into account */ -static inline unsigned int get_surrogate_value( const WCHAR *src, unsigned int srclen ) -{ - if (src[0] >= 0xd800 && src[0] <= 0xdfff) /* surrogate pair */ - { - if (src[0] > 0xdbff || /* invalid high surrogate */ - srclen <= 1 || /* missing low surrogate */ - src[1] < 0xdc00 || src[1] > 0xdfff) /* invalid low surrogate */ - return 0; - return 0x10000 + ((src[0] & 0x3ff) << 10) + (src[1] & 0x3ff); - } - return src[0]; -} - -/* query necessary dst length for src string */ -static inline int get_length_wcs_utf8( int flags, const WCHAR *src, unsigned int srclen ) -{ - int len; - unsigned int val; - - for (len = 0; srclen; srclen--, src++) - { - if (*src < 0x80) /* 0x00-0x7f: 1 byte */ - { - len++; - continue; - } - if (*src < 0x800) /* 0x80-0x7ff: 2 bytes */ - { - len += 2; - continue; - } - if (!(val = get_surrogate_value( src, srclen ))) - { - if (flags & WC_ERR_INVALID_CHARS) return -2; - continue; - } - if (val < 0x10000) /* 0x800-0xffff: 3 bytes */ - len += 3; - else /* 0x10000-0x10ffff: 4 bytes */ - { - len += 4; - src++; - srclen--; - } - } - return len; -} - -/* wide char to UTF-8 string conversion */ -/* return -1 on dst buffer overflow, -2 on invalid input char */ -int wine_utf8_wcstombs( int flags, const WCHAR *src, int srclen, char *dst, int dstlen ) -{ - int len; - - if (!dstlen) return get_length_wcs_utf8( flags, src, srclen ); - - for (len = dstlen; srclen; srclen--, src++) - { - WCHAR ch = *src; - unsigned int val; - - if (ch < 0x80) /* 0x00-0x7f: 1 byte */ - { - if (!len--) return -1; /* overflow */ - *dst++ = ch; - continue; - } - - if (ch < 0x800) /* 0x80-0x7ff: 2 bytes */ - { - if ((len -= 2) < 0) return -1; /* overflow */ - dst[1] = 0x80 | (ch & 0x3f); - ch >>= 6; - dst[0] = 0xc0 | ch; - dst += 2; - continue; - } - - if (!(val = get_surrogate_value( src, srclen ))) - { - if (flags & WC_ERR_INVALID_CHARS) return -2; - continue; - } - - if (val < 0x10000) /* 0x800-0xffff: 3 bytes */ - { - if ((len -= 3) < 0) return -1; /* overflow */ - dst[2] = 0x80 | (val & 0x3f); - val >>= 6; - dst[1] = 0x80 | (val & 0x3f); - val >>= 6; - dst[0] = 0xe0 | val; - dst += 3; - } - else /* 0x10000-0x10ffff: 4 bytes */ - { - if ((len -= 4) < 0) return -1; /* overflow */ - dst[3] = 0x80 | (val & 0x3f); - val >>= 6; - dst[2] = 0x80 | (val & 0x3f); - val >>= 6; - dst[1] = 0x80 | (val & 0x3f); - val >>= 6; - dst[0] = 0xf0 | val; - dst += 4; - src++; - srclen--; - } - } - return dstlen - len; -} - -/* helper for the various utf8 mbstowcs functions */ -static inline unsigned int decode_utf8_char( unsigned char ch, const char **str, const char *strend ) -{ - unsigned int len = utf8_length[ch-0x80]; - unsigned int res = ch & utf8_mask[len]; - const char *end = *str + len; - - if (end > strend) return ~0; - switch(len) - { - case 3: - if ((ch = end[-3] ^ 0x80) >= 0x40) break; - res = (res << 6) | ch; - (*str)++; - case 2: - if ((ch = end[-2] ^ 0x80) >= 0x40) break; - res = (res << 6) | ch; - (*str)++; - case 1: - if ((ch = end[-1] ^ 0x80) >= 0x40) break; - res = (res << 6) | ch; - (*str)++; - if (res < utf8_minval[len]) break; - return res; - } - return ~0; -} - -/* query necessary dst length for src string with composition */ -static inline int get_length_mbs_utf8_compose( int flags, const char *src, int srclen ) -{ - int ret = 0; - unsigned int res; - WCHAR composed[2]; - const char *srcend = src + srclen; - - composed[0] = 0; - while (src < srcend) - { - unsigned char ch = *src++; - if (ch < 0x80) /* special fast case for 7-bit ASCII */ - { - composed[0] = ch; - ret++; - continue; - } - if ((res = decode_utf8_char( ch, &src, srcend )) <= 0xffff) - { - if (composed[0]) - { - composed[1] = res; - if ((composed[0] = compose( composed ))) continue; - } - composed[0] = res; - ret++; - } - else if (res <= 0x10ffff) - { - ret += 2; - composed[0] = 0; /* no composition for surrogates */ - } - else if (flags & MB_ERR_INVALID_CHARS) return -2; /* bad char */ - /* otherwise ignore it */ - } - return ret; -} - -/* UTF-8 to wide char string conversion with composition */ -/* return -1 on dst buffer overflow, -2 on invalid input char */ -static int utf8_mbstowcs_compose( int flags, const char *src, int srclen, WCHAR *dst, int dstlen ) -{ - unsigned int res; - const char *srcend = src + srclen; - WCHAR composed[2]; - WCHAR *dstend = dst + dstlen; - - if (!dstlen) return get_length_mbs_utf8_compose( flags, src, srclen ); - - composed[0] = 0; - while (src < srcend) - { - unsigned char ch = *src++; - if (ch < 0x80) /* special fast case for 7-bit ASCII */ - { - if (dst >= dstend) return -1; /* overflow */ - *dst++ = composed[0] = ch; - continue; - } - if ((res = decode_utf8_char( ch, &src, srcend )) <= 0xffff) - { - if (composed[0]) - { - composed[1] = res; - if ((composed[0] = compose( composed ))) - { - dst[-1] = composed[0]; - continue; - } - } - if (dst >= dstend) return -1; /* overflow */ - *dst++ = composed[0] = res; - } - else if (res <= 0x10ffff) /* we need surrogates */ - { - if (dst >= dstend - 1) return -1; /* overflow */ - res -= 0x10000; - *dst++ = 0xd800 | (res >> 10); - *dst++ = 0xdc00 | (res & 0x3ff); - composed[0] = 0; /* no composition for surrogates */ - } - else if (flags & MB_ERR_INVALID_CHARS) return -2; /* bad char */ - /* otherwise ignore it */ - } - return dstlen - (dstend - dst); -} - -/* query necessary dst length for src string */ -static inline int get_length_mbs_utf8( int flags, const char *src, int srclen ) -{ - int ret = 0; - unsigned int res; - const char *srcend = src + srclen; - - while (src < srcend) - { - unsigned char ch = *src++; - if (ch < 0x80) /* special fast case for 7-bit ASCII */ - { - ret++; - continue; - } - if ((res = decode_utf8_char( ch, &src, srcend )) <= 0x10ffff) - { - if (res > 0xffff) ret++; - ret++; - } - else if (flags & MB_ERR_INVALID_CHARS) return -2; /* bad char */ - /* otherwise ignore it */ - } - return ret; -} - -/* UTF-8 to wide char string conversion */ -/* return -1 on dst buffer overflow, -2 on invalid input char */ -int wine_utf8_mbstowcs( int flags, const char *src, int srclen, WCHAR *dst, int dstlen ) -{ - unsigned int res; - const char *srcend = src + srclen; - WCHAR *dstend = dst + dstlen; - - if (flags & MB_COMPOSITE) return utf8_mbstowcs_compose( flags, src, srclen, dst, dstlen ); - - if (!dstlen) return get_length_mbs_utf8( flags, src, srclen ); - - while ((dst < dstend) && (src < srcend)) - { - unsigned char ch = *src++; - if (ch < 0x80) /* special fast case for 7-bit ASCII */ - { - *dst++ = ch; - continue; - } - if ((res = decode_utf8_char( ch, &src, srcend )) <= 0xffff) - { - *dst++ = res; - } - else if (res <= 0x10ffff) /* we need surrogates */ - { - if (dst == dstend - 1) return -1; /* overflow */ - res -= 0x10000; - *dst++ = 0xd800 | (res >> 10); - *dst++ = 0xdc00 | (res & 0x3ff); - } - else if (flags & MB_ERR_INVALID_CHARS) return -2; /* bad char */ - /* otherwise ignore it */ - } - if (src < srcend) return -1; /* overflow */ - return dstlen - (dstend - dst); -} diff --git a/reactos/tools/unicode/wctomb.c b/reactos/tools/unicode/wctomb.c deleted file mode 100644 index 3b081d45653..00000000000 --- a/reactos/tools/unicode/wctomb.c +++ /dev/null @@ -1,487 +0,0 @@ -/* - * WideCharToMultiByte implementation - * - * 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 - */ - -#include - -#include "wine/unicode.h" - -/* search for a character in the unicode_compose_table; helper for compose() */ -static inline int binary_search( WCHAR ch, int low, int high ) -{ - extern const WCHAR unicode_compose_table[]; - while (low <= high) - { - int pos = (low + high) / 2; - if (unicode_compose_table[2*pos] < ch) - { - low = pos + 1; - continue; - } - if (unicode_compose_table[2*pos] > ch) - { - high = pos - 1; - continue; - } - return pos; - } - return -1; -} - -/* return the result of the composition of two Unicode chars, or 0 if none */ -WCHAR compose( const WCHAR *str ) -{ - extern const WCHAR unicode_compose_table[]; - extern const unsigned int unicode_compose_table_size; - - int idx = 1, low = 0, high = unicode_compose_table_size - 1; - for (;;) - { - int pos = binary_search( str[idx], low, high ); - if (pos == -1) return 0; - if (!idx--) return unicode_compose_table[2*pos+1]; - low = unicode_compose_table[2*pos+1]; - high = unicode_compose_table[2*pos+3] - 1; - } -} - - -/****************************************************************/ -/* sbcs support */ - -/* check if 'ch' is an acceptable sbcs mapping for 'wch' */ -static inline int is_valid_sbcs_mapping( const struct sbcs_table *table, int flags, - WCHAR wch, unsigned char ch ) -{ - if ((flags & WC_NO_BEST_FIT_CHARS) || ch == (unsigned char)table->info.def_char) - return (table->cp2uni[ch] == wch); - return 1; -} - -/* query necessary dst length for src string */ -static int get_length_sbcs( const struct sbcs_table *table, int flags, - const WCHAR *src, unsigned int srclen, int *used ) -{ - const unsigned char * const uni2cp_low = table->uni2cp_low; - const unsigned short * const uni2cp_high = table->uni2cp_high; - int ret, tmp; - WCHAR composed; - - if (!used) used = &tmp; /* avoid checking on every char */ - *used = 0; - - for (ret = 0; srclen; ret++, src++, srclen--) - { - WCHAR wch = *src; - unsigned char ch; - - if ((flags & WC_COMPOSITECHECK) && (srclen > 1) && (composed = compose(src))) - { - /* now check if we can use the composed char */ - ch = uni2cp_low[uni2cp_high[composed >> 8] + (composed & 0xff)]; - if (is_valid_sbcs_mapping( table, flags, composed, ch )) - { - /* we have a good mapping, use it */ - src++; - srclen--; - continue; - } - /* no mapping for the composed char, check the other flags */ - if (flags & WC_DEFAULTCHAR) /* use the default char instead */ - { - *used = 1; - src++; /* skip the non-spacing char */ - srclen--; - continue; - } - if (flags & WC_DISCARDNS) /* skip the second char of the composition */ - { - src++; - srclen--; - } - /* WC_SEPCHARS is the default */ - } - if (!*used) - { - ch = uni2cp_low[uni2cp_high[wch >> 8] + (wch & 0xff)]; - *used = !is_valid_sbcs_mapping( table, flags, wch, ch ); - } - } - return ret; -} - -/* wcstombs for single-byte code page */ -static inline int wcstombs_sbcs( const struct sbcs_table *table, - const WCHAR *src, unsigned int srclen, - char *dst, unsigned int dstlen ) -{ - const unsigned char * const uni2cp_low = table->uni2cp_low; - const unsigned short * const uni2cp_high = table->uni2cp_high; - int ret = srclen; - - if (dstlen < srclen) - { - /* buffer too small: fill it up to dstlen and return error */ - srclen = dstlen; - ret = -1; - } - - while (srclen >= 16) - { - dst[0] = uni2cp_low[uni2cp_high[src[0] >> 8] + (src[0] & 0xff)]; - dst[1] = uni2cp_low[uni2cp_high[src[1] >> 8] + (src[1] & 0xff)]; - dst[2] = uni2cp_low[uni2cp_high[src[2] >> 8] + (src[2] & 0xff)]; - dst[3] = uni2cp_low[uni2cp_high[src[3] >> 8] + (src[3] & 0xff)]; - dst[4] = uni2cp_low[uni2cp_high[src[4] >> 8] + (src[4] & 0xff)]; - dst[5] = uni2cp_low[uni2cp_high[src[5] >> 8] + (src[5] & 0xff)]; - dst[6] = uni2cp_low[uni2cp_high[src[6] >> 8] + (src[6] & 0xff)]; - dst[7] = uni2cp_low[uni2cp_high[src[7] >> 8] + (src[7] & 0xff)]; - dst[8] = uni2cp_low[uni2cp_high[src[8] >> 8] + (src[8] & 0xff)]; - dst[9] = uni2cp_low[uni2cp_high[src[9] >> 8] + (src[9] & 0xff)]; - dst[10] = uni2cp_low[uni2cp_high[src[10] >> 8] + (src[10] & 0xff)]; - dst[11] = uni2cp_low[uni2cp_high[src[11] >> 8] + (src[11] & 0xff)]; - dst[12] = uni2cp_low[uni2cp_high[src[12] >> 8] + (src[12] & 0xff)]; - dst[13] = uni2cp_low[uni2cp_high[src[13] >> 8] + (src[13] & 0xff)]; - dst[14] = uni2cp_low[uni2cp_high[src[14] >> 8] + (src[14] & 0xff)]; - dst[15] = uni2cp_low[uni2cp_high[src[15] >> 8] + (src[15] & 0xff)]; - src += 16; - dst += 16; - srclen -= 16; - } - - /* now handle remaining characters */ - src += srclen; - dst += srclen; - switch(srclen) - { - case 15: dst[-15] = uni2cp_low[uni2cp_high[src[-15] >> 8] + (src[-15] & 0xff)]; - case 14: dst[-14] = uni2cp_low[uni2cp_high[src[-14] >> 8] + (src[-14] & 0xff)]; - case 13: dst[-13] = uni2cp_low[uni2cp_high[src[-13] >> 8] + (src[-13] & 0xff)]; - case 12: dst[-12] = uni2cp_low[uni2cp_high[src[-12] >> 8] + (src[-12] & 0xff)]; - case 11: dst[-11] = uni2cp_low[uni2cp_high[src[-11] >> 8] + (src[-11] & 0xff)]; - case 10: dst[-10] = uni2cp_low[uni2cp_high[src[-10] >> 8] + (src[-10] & 0xff)]; - case 9: dst[-9] = uni2cp_low[uni2cp_high[src[-9] >> 8] + (src[-9] & 0xff)]; - case 8: dst[-8] = uni2cp_low[uni2cp_high[src[-8] >> 8] + (src[-8] & 0xff)]; - case 7: dst[-7] = uni2cp_low[uni2cp_high[src[-7] >> 8] + (src[-7] & 0xff)]; - case 6: dst[-6] = uni2cp_low[uni2cp_high[src[-6] >> 8] + (src[-6] & 0xff)]; - case 5: dst[-5] = uni2cp_low[uni2cp_high[src[-5] >> 8] + (src[-5] & 0xff)]; - case 4: dst[-4] = uni2cp_low[uni2cp_high[src[-4] >> 8] + (src[-4] & 0xff)]; - case 3: dst[-3] = uni2cp_low[uni2cp_high[src[-3] >> 8] + (src[-3] & 0xff)]; - case 2: dst[-2] = uni2cp_low[uni2cp_high[src[-2] >> 8] + (src[-2] & 0xff)]; - case 1: dst[-1] = uni2cp_low[uni2cp_high[src[-1] >> 8] + (src[-1] & 0xff)]; - case 0: break; - } - return ret; -} - -/* slow version of wcstombs_sbcs that handles the various flags */ -static int wcstombs_sbcs_slow( const struct sbcs_table *table, int flags, - const WCHAR *src, unsigned int srclen, - char *dst, unsigned int dstlen, - const char *defchar, int *used ) -{ - const unsigned char * const uni2cp_low = table->uni2cp_low; - const unsigned short * const uni2cp_high = table->uni2cp_high; - unsigned char def; - unsigned int len; - int tmp; - WCHAR composed; - - if (!defchar) - def = table->info.def_char & 0xff; - else - def = *defchar; - - if (!used) used = &tmp; /* avoid checking on every char */ - *used = 0; - - for (len = dstlen; srclen && len; dst++, len--, src++, srclen--) - { - WCHAR wch = *src; - - if ((flags & WC_COMPOSITECHECK) && (srclen > 1) && (composed = compose(src))) - { - /* now check if we can use the composed char */ - *dst = uni2cp_low[uni2cp_high[composed >> 8] + (composed & 0xff)]; - if (is_valid_sbcs_mapping( table, flags, composed, *dst )) - { - /* we have a good mapping, use it */ - src++; - srclen--; - continue; - } - /* no mapping for the composed char, check the other flags */ - if (flags & WC_DEFAULTCHAR) /* use the default char instead */ - { - *dst = def; - *used = 1; - src++; /* skip the non-spacing char */ - srclen--; - continue; - } - if (flags & WC_DISCARDNS) /* skip the second char of the composition */ - { - src++; - srclen--; - } - /* WC_SEPCHARS is the default */ - } - - *dst = uni2cp_low[uni2cp_high[wch >> 8] + (wch & 0xff)]; - if (!is_valid_sbcs_mapping( table, flags, wch, *dst )) - { - *dst = def; - *used = 1; - } - } - if (srclen) return -1; /* overflow */ - return dstlen - len; -} - - -/****************************************************************/ -/* dbcs support */ - -/* check if 'ch' is an acceptable dbcs mapping for 'wch' */ -static inline int is_valid_dbcs_mapping( const struct dbcs_table *table, int flags, - WCHAR wch, unsigned short ch ) -{ - if ((flags & WC_NO_BEST_FIT_CHARS) || ch == table->info.def_char) - { - /* check if char maps back to the same Unicode value */ - if (ch & 0xff00) - { - unsigned char off = table->cp2uni_leadbytes[ch >> 8]; - return (table->cp2uni[(off << 8) + (ch & 0xff)] == wch); - } - return (table->cp2uni[ch & 0xff] == wch); - } - return 1; -} - -/* query necessary dst length for src string */ -static int get_length_dbcs( const struct dbcs_table *table, int flags, - const WCHAR *src, unsigned int srclen, - const char *defchar, int *used ) -{ - const unsigned short * const uni2cp_low = table->uni2cp_low; - const unsigned short * const uni2cp_high = table->uni2cp_high; - WCHAR defchar_value = table->info.def_char; - WCHAR composed; - int len, tmp; - - if (!defchar && !used && !(flags & WC_COMPOSITECHECK)) - { - for (len = 0; srclen; srclen--, src++, len++) - { - if (uni2cp_low[uni2cp_high[*src >> 8] + (*src & 0xff)] & 0xff00) len++; - } - return len; - } - - if (defchar) defchar_value = defchar[1] ? ((defchar[0] << 8) | defchar[1]) : defchar[0]; - if (!used) used = &tmp; /* avoid checking on every char */ - *used = 0; - for (len = 0; srclen; len++, srclen--, src++) - { - unsigned short res; - WCHAR wch = *src; - - if ((flags & WC_COMPOSITECHECK) && (srclen > 1) && (composed = compose(src))) - { - /* now check if we can use the composed char */ - res = uni2cp_low[uni2cp_high[composed >> 8] + (composed & 0xff)]; - - if (is_valid_dbcs_mapping( table, flags, composed, res )) - { - /* we have a good mapping for the composed char, use it */ - if (res & 0xff00) len++; - src++; - srclen--; - continue; - } - /* no mapping for the composed char, check the other flags */ - if (flags & WC_DEFAULTCHAR) /* use the default char instead */ - { - if (defchar_value & 0xff00) len++; - *used = 1; - src++; /* skip the non-spacing char */ - srclen--; - continue; - } - if (flags & WC_DISCARDNS) /* skip the second char of the composition */ - { - src++; - srclen--; - } - /* WC_SEPCHARS is the default */ - } - - res = uni2cp_low[uni2cp_high[wch >> 8] + (wch & 0xff)]; - if (!is_valid_dbcs_mapping( table, flags, wch, res )) - { - res = defchar_value; - *used = 1; - } - if (res & 0xff00) len++; - } - return len; -} - -/* wcstombs for double-byte code page */ -static inline int wcstombs_dbcs( const struct dbcs_table *table, - const WCHAR *src, unsigned int srclen, - char *dst, unsigned int dstlen ) -{ - const unsigned short * const uni2cp_low = table->uni2cp_low; - const unsigned short * const uni2cp_high = table->uni2cp_high; - int len; - - for (len = dstlen; srclen && len; len--, srclen--, src++) - { - unsigned short res = uni2cp_low[uni2cp_high[*src >> 8] + (*src & 0xff)]; - if (res & 0xff00) - { - if (len == 1) break; /* do not output a partial char */ - len--; - *dst++ = res >> 8; - } - *dst++ = (char)res; - } - if (srclen) return -1; /* overflow */ - return dstlen - len; -} - -/* slow version of wcstombs_dbcs that handles the various flags */ -static int wcstombs_dbcs_slow( const struct dbcs_table *table, int flags, - const WCHAR *src, unsigned int srclen, - char *dst, unsigned int dstlen, - const char *defchar, int *used ) -{ - const unsigned short * const uni2cp_low = table->uni2cp_low; - const unsigned short * const uni2cp_high = table->uni2cp_high; - WCHAR defchar_value = table->info.def_char; - WCHAR composed; - int len, tmp; - - if (defchar) defchar_value = defchar[1] ? ((defchar[0] << 8) | defchar[1]) : defchar[0]; - if (!used) used = &tmp; /* avoid checking on every char */ - *used = 0; - - for (len = dstlen; srclen && len; len--, srclen--, src++) - { - unsigned short res; - WCHAR wch = *src; - - if ((flags & WC_COMPOSITECHECK) && (srclen > 1) && (composed = compose(src))) - { - /* now check if we can use the composed char */ - res = uni2cp_low[uni2cp_high[composed >> 8] + (composed & 0xff)]; - - if (is_valid_dbcs_mapping( table, flags, composed, res )) - { - /* we have a good mapping for the composed char, use it */ - src++; - srclen--; - goto output_char; - } - /* no mapping for the composed char, check the other flags */ - if (flags & WC_DEFAULTCHAR) /* use the default char instead */ - { - res = defchar_value; - *used = 1; - src++; /* skip the non-spacing char */ - srclen--; - goto output_char; - } - if (flags & WC_DISCARDNS) /* skip the second char of the composition */ - { - src++; - srclen--; - } - /* WC_SEPCHARS is the default */ - } - - res = uni2cp_low[uni2cp_high[wch >> 8] + (wch & 0xff)]; - if (!is_valid_dbcs_mapping( table, flags, wch, res )) - { - res = defchar_value; - *used = 1; - } - - output_char: - if (res & 0xff00) - { - if (len == 1) break; /* do not output a partial char */ - len--; - *dst++ = res >> 8; - } - *dst++ = (char)res; - } - if (srclen) return -1; /* overflow */ - return dstlen - len; -} - -/* wide char to multi byte string conversion */ -/* return -1 on dst buffer overflow */ -int wine_cp_wcstombs( const union cptable *table, int flags, - const WCHAR *src, int srclen, - char *dst, int dstlen, const char *defchar, int *used ) -{ - if (table->info.char_size == 1) - { - if (flags || defchar || used) - { - if (!dstlen) return get_length_sbcs( &table->sbcs, flags, src, srclen, used ); - return wcstombs_sbcs_slow( &table->sbcs, flags, src, srclen, - dst, dstlen, defchar, used ); - } - if (!dstlen) return srclen; - return wcstombs_sbcs( &table->sbcs, src, srclen, dst, dstlen ); - } - else /* mbcs */ - { - if (!dstlen) return get_length_dbcs( &table->dbcs, flags, src, srclen, defchar, used ); - if (flags || defchar || used) - return wcstombs_dbcs_slow( &table->dbcs, flags, src, srclen, - dst, dstlen, defchar, used ); - return wcstombs_dbcs( &table->dbcs, src, srclen, dst, dstlen ); - } -} - -/* CP_SYMBOL implementation */ -/* return -1 on dst buffer overflow, -2 on invalid character */ -int wine_cpsymbol_wcstombs( const WCHAR *src, int srclen, char *dst, int dstlen) -{ - int len, i; - if( dstlen == 0) return srclen; - len = dstlen > srclen ? srclen : dstlen; - for( i = 0; i < len; i++) - { - WCHAR w = src [ i ]; - if( w < 0x20 ) - dst[i] = w; - else if( w >= 0xf020 && w < 0xf100) - dst[i] = w - 0xf000; - else - return -2; - } - if( srclen > len) return -1; - return len; -} diff --git a/reactos/tools/unicode/wctype.c b/reactos/tools/unicode/wctype.c deleted file mode 100644 index 12ce9c85fb0..00000000000 --- a/reactos/tools/unicode/wctype.c +++ /dev/null @@ -1,2154 +0,0 @@ -/* Unicode ctype tables */ -/* Automatically generated; DO NOT EDIT!! */ - -#include "wine/unicode.h" - -const unsigned short wine_wctype_table[17152] = -{ - /* offsets */ - 0x0100, 0x0200, 0x0300, 0x0400, 0x0500, 0x0600, 0x0700, 0x0800, - 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x0e00, 0x0f00, 0x1000, - 0x1100, 0x1200, 0x1300, 0x1400, 0x1500, 0x1200, 0x1600, 0x1700, - 0x1800, 0x1900, 0x1a00, 0x1b00, 0x1c00, 0x1d00, 0x1e00, 0x1f00, - 0x2000, 0x2100, 0x2200, 0x2300, 0x2400, 0x2500, 0x2600, 0x2700, - 0x2800, 0x2900, 0x2500, 0x2a00, 0x2b00, 0x2c00, 0x2d00, 0x2e00, - 0x2f00, 0x3000, 0x3100, 0x3200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x3300, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x3400, - 0x1200, 0x1200, 0x1200, 0x1200, 0x3500, 0x1200, 0x3600, 0x3700, - 0x3800, 0x3900, 0x3a00, 0x3b00, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x3c00, - 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, - 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, - 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, - 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, - 0x2800, 0x1200, 0x3d00, 0x3e00, 0x3f00, 0x4000, 0x4100, 0x4200, - /* values */ - 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, - 0xe220, 0x9268, 0x8228, 0x9228, 0xa228, 0x8228, 0xe220, 0xe220, - 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, - 0xe220, 0xe220, 0xe220, 0xe220, 0x8220, 0x8220, 0x8220, 0x9220, - 0xa248, 0xb210, 0xb210, 0x5210, 0x5210, 0x5210, 0xb210, 0xb210, - 0xb210, 0xb210, 0xb210, 0x4210, 0x7210, 0x4210, 0x7210, 0x7210, - 0x3284, 0x3284, 0x3284, 0x3284, 0x3284, 0x3284, 0x3284, 0x3284, - 0x3284, 0x3284, 0x7210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0xb210, 0x1381, 0x1381, 0x1381, 0x1381, 0x1381, 0x1381, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0xb210, 0x1382, 0x1382, 0x1382, 0x1382, 0x1382, 0x1382, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0xb210, 0xb210, 0xb210, 0xb210, 0xe220, - 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0x8228, 0xe220, 0xe220, - 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, - 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, - 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, - 0x7248, 0xb210, 0x5210, 0x5210, 0x5210, 0x5210, 0xb210, 0xb210, - 0xb210, 0xb210, 0x1312, 0xb210, 0xb210, 0xe230, 0xb210, 0xb210, - 0x5210, 0x5210, 0x3214, 0x3214, 0xb210, 0x1312, 0xb210, 0xb210, - 0xb210, 0x3214, 0x1312, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0xb210, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0xb210, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, - 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, - 0x1302, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1302, - 0x1302, 0x1301, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1301, - 0x1302, 0x1301, 0x1301, 0x1301, 0x1302, 0x1302, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1302, 0x1301, 0x1301, 0x1302, 0x1301, 0x1301, - 0x1301, 0x1302, 0x1302, 0x1302, 0x1301, 0x1301, 0x1302, 0x1301, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1301, - 0x1302, 0x1301, 0x1302, 0x1302, 0x1301, 0x1302, 0x1301, 0x1301, - 0x1302, 0x1301, 0x1301, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, - 0x1301, 0x1302, 0x1302, 0x1300, 0x1301, 0x1302, 0x1302, 0x1302, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1301, 0x1303, 0x1302, 0x1301, - 0x1303, 0x1302, 0x1301, 0x1303, 0x1302, 0x1301, 0x1302, 0x1301, - 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, - 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1302, 0x1301, 0x1303, 0x1302, 0x1301, 0x1302, 0x1301, 0x1301, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1301, 0x1301, 0x1302, 0x1301, 0x1301, 0x1302, - 0x1302, 0x1301, 0x1302, 0x1301, 0x1301, 0x1301, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1300, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0xb300, 0xb300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0xb200, 0xb200, 0xb200, 0xb200, 0xb300, 0xb300, - 0xb300, 0xb300, 0xb300, 0xb300, 0xb300, 0xb300, 0xb300, 0xb300, - 0x1300, 0x1300, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb300, 0xb200, 0x1300, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0x1301, 0x1302, 0x1301, 0x1302, 0xb300, 0xb200, 0x1301, 0x1302, - 0x0000, 0x0000, 0x1300, 0x1302, 0x1302, 0x1302, 0xb210, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0xb200, 0xb200, 0x1301, 0xb210, - 0x1301, 0x1301, 0x1301, 0x0000, 0x1301, 0x0000, 0x1301, 0x1301, - 0x1302, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x0000, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1301, - 0x1302, 0x1302, 0x1301, 0x1301, 0x1301, 0x1302, 0x1302, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1301, 0x1302, 0xb200, 0x1301, - 0x1302, 0x1301, 0x1301, 0x1302, 0x1302, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, - 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x0000, - 0x0000, 0x1300, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, - 0x0000, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x0000, 0x1210, 0xb210, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x2210, 0xd200, - 0x2210, 0xd200, 0xd200, 0x2210, 0xd200, 0xd200, 0x2210, 0xd200, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, - 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, - 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, - 0x2300, 0x2300, 0x2300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x2300, 0x2300, 0x2300, 0x2210, 0x2210, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x6220, 0x6220, 0x6220, 0x6220, 0x0000, 0x0000, 0xb200, 0xb200, - 0xc200, 0x5210, 0x5210, 0xc200, 0x7210, 0xc210, 0xb200, 0xb200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xc210, 0x0000, 0x0000, 0xc210, 0xc210, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0x6204, 0x6204, 0x6204, 0x6204, 0x6204, 0x6204, 0x6204, 0x6204, - 0x6204, 0x6204, 0x5210, 0x6210, 0x6210, 0xc210, 0xc300, 0xc300, - 0xd200, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc210, 0xc300, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x6220, 0xb200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xc300, 0xc300, 0xd200, - 0xd200, 0xb200, 0xd200, 0xd200, 0xd200, 0xd200, 0xc300, 0xc300, - 0x3204, 0x3204, 0x3204, 0x3204, 0x3204, 0x3204, 0x3204, 0x3204, - 0x3204, 0x3204, 0xc300, 0xc300, 0xc300, 0xc200, 0xc200, 0xc300, - 0xc210, 0xc210, 0xc210, 0xc210, 0xc210, 0xc210, 0xc210, 0xc210, - 0xc210, 0xc210, 0xc210, 0xc210, 0xc210, 0xc210, 0x0000, 0x6220, - 0xc300, 0xd200, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0x0000, 0x0000, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xc300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x2204, 0x2204, 0x2204, 0x2204, 0x2204, 0x2204, 0x2204, 0x2204, - 0x2204, 0x2204, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, - 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, - 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, - 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, - 0x2300, 0x2300, 0x2300, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0x2300, 0x2300, 0xb200, 0xb210, - 0xb210, 0xb210, 0x2300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, - 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, - 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0xd200, 0xd200, - 0xd200, 0xd200, 0x2300, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0x2300, 0xd200, 0xd200, 0xd200, - 0x2300, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x0000, 0x0000, - 0x2210, 0x2210, 0x2210, 0x2210, 0x2210, 0x2210, 0x2210, 0x2210, - 0x2210, 0x2210, 0x2210, 0x2210, 0x2210, 0x2210, 0x2210, 0x0000, - 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, - 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, - 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, - 0x2300, 0xd200, 0xd200, 0xd200, 0x0000, 0x0000, 0x2210, 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, 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, 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, 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, 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, 0x0000, - 0xd200, 0xd200, 0xd200, 0x1200, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0xd200, 0x1200, 0xd200, 0x1300, 0x1200, 0x1200, - 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0x1200, 0x1200, 0x1200, 0x1200, 0xd200, 0x1200, 0x1200, - 0x1300, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0xd200, 0xd200, 0x1210, 0x1210, 0x1204, 0x1204, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1210, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x0000, 0xd200, 0x1200, 0x1200, 0x0000, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x1300, - 0x1300, 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x0000, 0x1300, 0x0000, 0x0000, 0x0000, 0x1300, 0x1300, - 0x1300, 0x1300, 0x0000, 0x0000, 0xd200, 0x1300, 0x1200, 0x1200, - 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, 0x0000, 0x0000, 0x1200, - 0x1200, 0x0000, 0x0000, 0x1200, 0x1200, 0xd200, 0x1300, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1200, - 0x0000, 0x0000, 0x0000, 0x0000, 0x1300, 0x1300, 0x0000, 0x1300, - 0x1300, 0x1300, 0xd200, 0xd200, 0x0000, 0x0000, 0x1204, 0x1204, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1300, 0x1300, 0x5200, 0x5200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x5200, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0xd200, 0xd200, 0x1200, 0x0000, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x1300, - 0x1300, 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x0000, 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, 0x0000, - 0x1300, 0x1300, 0x0000, 0x0000, 0xd200, 0x0000, 0x1200, 0x1200, - 0x1200, 0xd200, 0xd200, 0x0000, 0x0000, 0x0000, 0x0000, 0xd200, - 0xd200, 0x0000, 0x0000, 0xd200, 0xd200, 0xd200, 0x0000, 0x0000, - 0x0000, 0xd200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x1300, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1204, 0x1204, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0xd200, 0xd200, 0x1300, 0x1300, 0x1300, 0xd200, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0xd200, 0xd200, 0x1200, 0x0000, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x1300, - 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x0000, 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x0000, 0x0000, 0xd200, 0x1300, 0x1200, 0x1200, - 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x0000, 0xd200, - 0xd200, 0x1200, 0x0000, 0x1200, 0x1200, 0xd200, 0x0000, 0x0000, - 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0xd200, 0xd200, 0x0000, 0x0000, 0x1204, 0x1204, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x0000, 0x5200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0xd200, 0x1200, 0x1200, 0x0000, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x1300, - 0x1300, 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x0000, 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x0000, 0x0000, 0xd200, 0x1300, 0x1200, 0xd200, - 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, 0x0000, 0x0000, 0x1200, - 0x1200, 0x0000, 0x0000, 0x1200, 0x1200, 0xd200, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xd200, 0x1200, - 0x0000, 0x0000, 0x0000, 0x0000, 0x1300, 0x1300, 0x0000, 0x1300, - 0x1300, 0x1300, 0xd200, 0xd200, 0x0000, 0x0000, 0x1204, 0x1204, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1200, 0x1300, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0xd200, 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x1300, 0x1300, - 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, - 0x0000, 0x1300, 0x1300, 0x0000, 0x1300, 0x0000, 0x1300, 0x1300, - 0x0000, 0x0000, 0x0000, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x1200, 0x1200, - 0xd200, 0x1200, 0x1200, 0x0000, 0x0000, 0x0000, 0x1200, 0x1200, - 0x1200, 0x0000, 0x1200, 0x1200, 0x1200, 0xd200, 0x0000, 0x0000, - 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1200, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1204, 0x1204, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1200, 0x1200, 0x1200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0x5200, 0xb200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x1200, 0x1200, 0x1200, 0x0000, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, - 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x1300, 0xd200, 0xd200, - 0xd200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0000, 0xd200, 0xd200, - 0xd200, 0x0000, 0xd200, 0xd200, 0xd200, 0xd200, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xd200, 0xd200, 0x0000, - 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0xd200, 0xd200, 0x0000, 0x0000, 0x1204, 0x1204, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0x1200, - 0x0000, 0x0000, 0x1200, 0x1200, 0x0000, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, - 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x0000, 0x0000, 0xd200, 0x1300, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0000, 0x1200, 0x1200, - 0x1200, 0x0000, 0x1200, 0x1200, 0xd200, 0xd200, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1200, 0x1200, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1300, 0x0000, - 0x1300, 0x1300, 0xd200, 0xd200, 0x0000, 0x0000, 0x1204, 0x1204, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x0000, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x1200, 0x1200, 0x0000, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, - 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x1300, 0x1200, 0x1200, - 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, 0x0000, 0x1200, 0x1200, - 0x1200, 0x0000, 0x1200, 0x1200, 0x1200, 0xd200, 0x1300, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1200, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0xd200, 0xd200, 0x0000, 0x0000, 0x1204, 0x1204, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0000, 0x0000, - 0x0000, 0x1200, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x0000, 0x0000, 0x1200, 0x1200, 0x0000, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, - 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x1300, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, - 0x0000, 0x0000, 0xd200, 0x0000, 0x0000, 0x0000, 0x0000, 0x1200, - 0x1200, 0x1200, 0xd200, 0xd200, 0xd200, 0x0000, 0xd200, 0x0000, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x1200, 0x1200, 0x1210, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0xd200, 0x1300, 0x1300, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0x0000, 0x0000, 0x0000, 0x0000, 0x5200, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x1210, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1204, 0x1204, 0x1210, 0x1210, 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, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x1300, 0x1300, 0x0000, 0x1300, 0x0000, 0x0000, 0x1300, - 0x1300, 0x0000, 0x1300, 0x0000, 0x0000, 0x1300, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, - 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x0000, 0x1300, 0x1300, 0x1300, 0x0000, 0x1300, 0x0000, 0x1300, - 0x0000, 0x0000, 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, - 0x1300, 0xd200, 0x1300, 0x1300, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0x0000, 0xd200, 0xd200, 0x1300, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x1300, 0x0000, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x0000, 0x0000, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1204, 0x1204, 0x0000, 0x0000, 0x1300, 0x1300, 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, 0x0000, 0x0000, - 0x1300, 0x1200, 0x1200, 0x1200, 0x1210, 0x1210, 0x1210, 0x1210, - 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, - 0x1210, 0x1210, 0x1210, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0xd200, 0xd200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1204, 0x1204, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0xd200, 0x1200, 0xd200, - 0x1200, 0xd200, 0xb210, 0xb210, 0xb210, 0xb210, 0x1200, 0x1200, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, - 0x0000, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x1200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x1210, 0xd200, 0xd200, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0x0000, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x0000, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0xd200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0000, 0x1200, 0x1200, - 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1210, 0x1210, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1200, 0x1200, 0xd200, 0xd200, 0xd200, - 0xd200, 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0x1200, 0xd200, 0xd200, 0x1200, 0x1200, 0xd200, 0xd200, 0x1300, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1204, 0x1204, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1200, 0x1200, - 0xd200, 0xd200, 0x1300, 0x1300, 0x1300, 0x1300, 0xd200, 0xd200, - 0xd200, 0x1300, 0x1200, 0x1200, 0x1200, 0x1300, 0x1300, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1300, 0x1300, - 0x1300, 0xd200, 0xd200, 0xd200, 0xd200, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0xd200, 0x1200, 0x1200, 0xd200, 0xd200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0xd200, 0x1300, 0x1200, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1204, 0x1204, 0x1200, 0x1200, 0x1200, 0xd200, 0x1200, 0x1200, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1210, 0x1300, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, - 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, - 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0xd200, 0xd200, 0xd200, - 0x1200, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, - 0x1210, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb210, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1210, 0x1210, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0xa208, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0xb210, 0xb210, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1210, 0x1210, 0x1210, 0x1300, 0x1300, - 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, - 0x1300, 0x1300, 0xd200, 0xd200, 0xd200, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0xd200, 0xd200, 0xd200, 0x1210, 0x1210, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0xd200, 0xd200, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, - 0x1300, 0x0000, 0xd200, 0xd200, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1220, 0x1220, 0x1200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0xd200, 0x1200, - 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0x1210, 0x1210, 0x1210, 0x1300, - 0x1210, 0x1210, 0x1210, 0x5200, 0x1300, 0xd200, 0x0000, 0x0000, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1204, 0x1204, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0xb210, 0xb210, 0xb210, 0xd200, 0xd200, 0xd200, 0xa208, 0x0000, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1204, 0x1204, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0xd200, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, - 0xd200, 0xd200, 0xd200, 0x1200, 0x1200, 0x1200, 0x1200, 0xd200, - 0xd200, 0x1200, 0x1200, 0x1200, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1200, 0x1200, 0xd200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0xd200, 0xd200, 0xd200, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb200, 0x0000, 0x0000, 0x0000, 0xb210, 0xb210, 0x1204, 0x1204, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1200, 0x1200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1204, 0x1204, 0x1200, 0x0000, 0x0000, 0x0000, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0xd200, - 0xd200, 0x1200, 0x1200, 0x1200, 0x0000, 0x0000, 0x1210, 0x1210, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1200, 0xd200, 0x1200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x0000, - 0xd200, 0x1200, 0xd200, 0x1200, 0x1200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x0000, 0x0000, 0xd200, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1204, 0x1204, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1204, 0x1204, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1300, - 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 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, 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, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xd200, 0xd200, 0xd200, 0xd200, 0x1200, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0xd200, 0x1200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0x1200, 0xd200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0xd200, 0x1200, 0x1200, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1204, 0x1204, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, - 0x1210, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0000, 0x0000, 0x0000, - 0xd200, 0xd200, 0x1200, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, 0x1200, 0x1200, - 0xd200, 0xd200, 0x1200, 0x0000, 0x0000, 0x0000, 0x1300, 0x1300, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1204, 0x1204, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0xd200, 0x1200, - 0xd200, 0xd200, 0x1200, 0x1200, 0x1200, 0xd200, 0x1200, 0xd200, - 0xd200, 0xd200, 0x1200, 0x1200, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x1210, 0x1210, 0x1210, 0x1210, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0x1200, 0x1200, 0xd200, 0xd200, - 0x0000, 0x0000, 0x0000, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1204, 0x1204, 0x0000, 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1204, 0x1204, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1210, 0x1210, - 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, - 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, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xd200, 0xd200, 0xd200, 0x1210, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0x1300, 0x1300, 0x1300, 0x1300, 0xd200, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1300, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0xd200, 0xd200, 0xd200, 0xd200, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x0000, 0x0000, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x0000, 0x0000, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x0000, 0x0000, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x0000, 0x0000, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x0000, 0x1301, 0x0000, 0x1301, 0x0000, 0x1301, 0x0000, 0x1301, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x0000, 0x0000, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1303, 0x1303, 0x1303, 0x1303, 0x1303, 0x1303, 0x1303, 0x1303, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1303, 0x1303, 0x1303, 0x1303, 0x1303, 0x1303, 0x1303, 0x1303, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1303, 0x1303, 0x1303, 0x1303, 0x1303, 0x1303, 0x1303, 0x1303, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x0000, 0x1302, 0x1302, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1303, 0xb200, 0x1302, 0xb200, - 0xb200, 0xb200, 0x1302, 0x1302, 0x1302, 0x0000, 0x1302, 0x1302, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1303, 0xb200, 0xb200, 0xb200, - 0x1302, 0x1302, 0x1302, 0x1302, 0x0000, 0x0000, 0x1302, 0x1302, - 0x1301, 0x1301, 0x1301, 0x1301, 0x0000, 0xb200, 0xb200, 0xb200, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0xb200, 0xb200, 0xb200, - 0x0000, 0x0000, 0x1302, 0x1302, 0x1302, 0x0000, 0x1302, 0x1302, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1303, 0xb200, 0xb200, 0x0000, - 0xa208, 0xa208, 0xa208, 0xa208, 0xa208, 0xa208, 0xa208, 0xa208, - 0xa208, 0xa208, 0xa208, 0xe220, 0xe220, 0xe220, 0x1220, 0x2220, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0xa208, 0x8208, 0xf220, 0xf220, 0xf220, 0xf220, 0xf220, 0x7208, - 0x5210, 0x5210, 0x5210, 0x5210, 0x5210, 0xb210, 0xb210, 0xb210, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0xb210, 0xb210, 0xb210, 0xb210, 0x7200, 0xb210, 0xb210, 0xb210, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0xb210, 0xb210, 0xb200, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xa208, - 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, - 0x3200, 0x1302, 0x0000, 0x0000, 0x3200, 0x3200, 0x3200, 0x3200, - 0x3200, 0x3200, 0x4200, 0x4200, 0xb200, 0xb210, 0xb210, 0x1302, - 0x3200, 0x3200, 0x3200, 0x3200, 0x3200, 0x3200, 0x3200, 0x3200, - 0x3200, 0x3200, 0x4200, 0x4200, 0xb200, 0xb210, 0xb210, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, - 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, - 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, - 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, - 0x5200, 0x5200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb200, 0xb200, 0x1301, 0xb200, 0xb200, 0xb200, 0xb200, 0x1301, - 0xb200, 0xb200, 0x1302, 0x1301, 0x1301, 0x1301, 0x1302, 0x1302, - 0x1301, 0x1301, 0x1301, 0x1302, 0xb200, 0x1301, 0xb200, 0xb200, - 0xb200, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0x1301, 0xb200, 0x1301, 0xb200, - 0x1301, 0xb200, 0x1301, 0x1301, 0x1301, 0x1301, 0x5200, 0x1302, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1302, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1302, 0xb200, 0xb200, 0x1302, 0x1302, 0x1301, 0x1301, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0x1301, 0x1302, 0x1302, - 0x1302, 0x1302, 0xb200, 0xb200, 0xb200, 0xb200, 0x1302, 0x1200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1301, 0x1302, 0x1300, 0x1300, 0x1300, - 0x1300, 0xb200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0x4200, 0x5200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb210, 0xb210, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0x1200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 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, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0x3200, 0x3200, 0x3200, 0x3200, 0x3200, 0x3200, 0x3200, 0x3200, - 0x3200, 0x3200, 0x3200, 0x3200, 0x3200, 0x3200, 0x3200, 0x3200, - 0x3200, 0x3200, 0x3200, 0x3200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0x1200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0x0000, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb210, 0xb210, 0xb200, - 0xb200, 0xb200, 0xb200, 0x0000, 0xb200, 0x0000, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb210, 0xb210, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0xb210, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb210, 0xb210, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0x0000, 0x0000, 0x0000, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 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, 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, 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, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x0000, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x0000, - 0x1301, 0x1302, 0x1301, 0x1301, 0x1301, 0x1302, 0x1302, 0x1301, - 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1302, 0x1301, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1300, 0x1301, 0x1301, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1302, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0x1301, 0x1302, 0x1301, 0x1302, 0xd200, - 0xd200, 0xd200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0xb210, 0xb210, 0xb210, 0xb210, 0xb200, 0xb210, 0xb210, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1300, - 0x1210, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xd200, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb300, - 0xb210, 0xb210, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0x0000, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 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, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0x0000, 0x0000, 0x0000, 0x0000, - 0xa248, 0xb210, 0xb210, 0xb210, 0xb200, 0x1300, 0x1300, 0x1300, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0xb210, 0xb210, 0xb200, 0xb200, 0xb210, 0xb210, 0xb210, 0xb210, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0xb200, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xb210, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0xb200, 0xb200, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0xb210, 0xb200, 0xb200, - 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, - 0x0000, 0xd200, 0xd200, 0xb200, 0xb200, 0x1300, 0x1300, 0x1300, - 0xb210, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0xb210, 0x1300, 0x1300, 0x1300, 0x1300, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, - 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0xb200, 0xb200, 0x0000, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0xb200, 0xb200, 0xb200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0xb200, 0xb200, 0xb200, 0xb200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0000, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0xb200, - 0xb200, 0xb200, 0xb200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0xb200, 0xb200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0xb200, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 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, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1210, 0x1210, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0xb210, 0xb210, 0xb210, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1204, 0x1204, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1300, 0xd200, - 0xd200, 0xd200, 0xd200, 0xb210, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0xd200, 0xd200, 0xb210, 0xb300, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0xd200, 0xd200, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb300, - 0xb300, 0xb300, 0xb300, 0xb300, 0xb300, 0xb300, 0xb300, 0xb300, - 0xb200, 0xb200, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1302, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1300, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1301, 0x1302, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0xb300, 0x1200, 0x1200, 0x1301, 0x1302, 0x1301, 0x1302, 0x0000, - 0x1301, 0x1302, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, - 0x1301, 0x1302, 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, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x1302, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0xd200, 0x1300, 0x1300, 0x1300, 0xd200, 0x1300, - 0x1300, 0x1300, 0x1300, 0xd200, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1200, 0x1200, 0xd200, 0xd200, 0x1200, - 0xb200, 0xb200, 0xb200, 0xb200, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x5200, 0x5200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0xb210, 0xb210, 0xb210, 0xb210, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1200, 0x1200, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1200, 0x1200, 0x1200, 0xd200, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1210, 0x1210, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1204, 0x1204, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1210, 0x1210, 0x1210, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1204, 0x1204, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x1210, 0x1210, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0x1200, 0x1200, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1210, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, - 0xd200, 0xd200, 0xd200, 0x1200, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0xd200, 0x1200, 0x1200, 0xd200, 0xd200, - 0xd200, 0xd200, 0x1200, 0x1200, 0xd200, 0x1200, 0x1200, 0x1200, - 0x1200, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, - 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x0000, 0x1300, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1204, 0x1204, 0x0000, 0x0000, 0x0000, 0x0000, 0x1210, 0x1210, - 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, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x1200, - 0x1200, 0xd200, 0xd200, 0x1200, 0x1200, 0xd200, 0xd200, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0xd200, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0xd200, 0x1200, 0x0000, 0x0000, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1204, 0x1204, 0x0000, 0x0000, 0x1210, 0x1210, 0x1210, 0x1210, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1200, - 0x1200, 0x1200, 0x1300, 0x1200, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0xd200, 0x1300, 0xd200, 0xd200, 0xd200, 0x1300, 0x1300, 0xd200, - 0xd200, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0xd200, 0xd200, - 0x1300, 0xd200, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, 0x1210, 0x1210, - 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, - 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, - 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, - 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 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, 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, 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, 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, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1200, 0x1200, 0xd200, 0x1200, 0x1200, - 0xd200, 0x1200, 0x1200, 0x1210, 0x1200, 0xd200, 0x0000, 0x0000, - 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, - 0x1204, 0x1204, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, - 0x0000, 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 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, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2300, 0xd200, 0x2300, - 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, - 0x2300, 0x4200, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, - 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x0000, - 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x0000, 0x2300, 0x0000, - 0x2300, 0x2300, 0x0000, 0x2300, 0x2300, 0x0000, 0x2300, 0x2300, - 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc200, 0xc200, 0xc200, 0xc200, 0xc200, 0xc200, - 0xc200, 0xc200, 0xc200, 0xc200, 0xc200, 0xc200, 0xc200, 0xc200, - 0xc200, 0xc200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xb210, 0xb210, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0x0000, 0x0000, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 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, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc200, 0xb200, 0x0000, 0x0000, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0xb210, 0xb210, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, - 0x7210, 0xb210, 0x7210, 0x0000, 0xb210, 0x7210, 0xb210, 0xb210, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0x5210, - 0xb210, 0xb210, 0x4200, 0x4210, 0xb200, 0xb200, 0xb200, 0x0000, - 0xb210, 0x5200, 0x5210, 0xb210, 0x0000, 0x0000, 0x0000, 0x0000, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0x0000, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, - 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0x0000, 0x0000, 0xe260, - 0x0000, 0xb210, 0xb210, 0x5210, 0x5200, 0x5210, 0xb210, 0xb210, - 0xb210, 0xb210, 0xb210, 0x4200, 0x7210, 0x4210, 0x7210, 0x7210, - 0x3284, 0x3284, 0x3284, 0x3284, 0x3284, 0x3284, 0x3284, 0x3284, - 0x3284, 0x3284, 0x7210, 0xb210, 0xb200, 0xb200, 0xb200, 0xb210, - 0xb210, 0x1381, 0x1381, 0x1381, 0x1381, 0x1381, 0x1381, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, - 0x1301, 0x1301, 0x1301, 0xb210, 0xb210, 0xb210, 0xb200, 0xb210, - 0xb200, 0x1382, 0x1382, 0x1382, 0x1382, 0x1382, 0x1382, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, - 0x1302, 0x1302, 0x1302, 0xb210, 0xb200, 0xb210, 0xb200, 0xb210, - 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, - 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, - 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, - 0x5200, 0x5200, 0xb200, 0xb200, 0xb200, 0x5200, 0x5200, 0x0000, - 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0xb220, 0xb220, 0xb220, 0xb200, 0xb200, 0x0000, 0x0000 -}; diff --git a/reactos/tools/unicode/wine_unicode.def b/reactos/tools/unicode/wine_unicode.def deleted file mode 100644 index e582d88c29d..00000000000 --- a/reactos/tools/unicode/wine_unicode.def +++ /dev/null @@ -1,58 +0,0 @@ -LIBRARY libwine_unicode.dll - -EXPORTS - atoiW - atolW - get_char_typeW - isalnumW - isalphaW - iscntrlW - isdigitW - isgraphW - islowerW - isprintW - ispunctW - isspaceW - isupperW - isxdigitW - memchrW - memicmpW - memrchrW - snprintfW - sprintfW - strcatW - strchrW - strcmpW - strcmpiW - strcpyW - strcspnW - strlenW - strlwrW - strncmpW - strncmpiW - strpbrkW - strrchrW - strspnW - strstrW - strtolW - strtoulW - struprW - tolowerW - toupperW - vsnprintfW - vsprintfW - wine_casemap_lower - wine_casemap_upper - wine_compare_string - wine_cp_enum_table - wine_cp_get_table - wine_cp_mbstowcs - wine_cp_wcstombs - wine_cpsymbol_mbstowcs - wine_cpsymbol_wcstombs - wine_fold_string - wine_get_sortkey - wine_is_dbcs_leadbyte - wine_utf8_mbstowcs - wine_utf8_wcstombs - wine_wctype_table diff --git a/reactos/tools/utf16le/utf16le.cpp b/reactos/tools/utf16le/utf16le.cpp deleted file mode 100644 index 54b23b26d03..00000000000 --- a/reactos/tools/utf16le/utf16le.cpp +++ /dev/null @@ -1,290 +0,0 @@ -/* - * Usage: utf16le inputfile outputfile - * - * This is a tool and is compiled using the host compiler, - * i.e. on Linux gcc and not mingw-gcc (cross-compiler). - * It's a converter from utf-8, utf-16 (LE/BE) and utf-32 (LE/BE) - * to utf-16 LE and especially made for automatic conversions of - * INF-files from utf-8 to utf-16LE (so we can furthermore - * store the INF files in utf-8 for subversion. - * - * Author: Matthias Kupfer (mkupfer@reactos.org) - */ - -#include -#include - -//#define DISPLAY_DETECTED_UNICODE - -using namespace std; - -class utf_converter -{ - public: - // detect can detect utf-8 and both utf-16 variants, but assume utf-32 only - // due to ambiguous BOM - enum enc_types { detect, utf8, utf16le, utf16be, utf32le, utf32be }; - enum err_types { none, iopen, oopen, eof, read, write, decode }; - protected: - err_types error; - enc_types encoding; - unsigned char buffer[4], fill, index; // need 4 char buffer for optional BOM handling - fstream inputfile,outputfile; - static const unsigned char utf8table[64]; - public: - utf_converter(string ifname, string ofname, enc_types enc = detect) : error(none), encoding(enc), fill(0), index(0) - { - enc_types tmp_enc; - inputfile.open(ifname.c_str(), ios::in); - if (!inputfile) - { - error = iopen; - return; - } - outputfile.open(ofname.c_str(), ios::out); - if (!outputfile) - { - error = oopen; - return; - } - tmp_enc = getBOM(); - if (enc != detect) - { - if (enc != tmp_enc) - cerr << "Warning: UTF-BOM doesn't match encoding setting, but given encoding forced" << endl; - } - else - encoding = tmp_enc; - } - err_types getError() - { - return error; - } - enc_types getBOM() - { - index = 0; - /* first byte can also detect with: - if ((buffer[0] & 0x11) || !buffer[0])) - valid values are 0xef, 0xff, 0xfe, 0x00 - */ - inputfile.read(reinterpret_cast(&buffer),4); - fill =inputfile.gcount(); - // stupid utf8 bom - if ((fill > 2) && - (buffer[0] == 0xef) && - (buffer[1] == 0xbb) && - (buffer[2] == 0xbf)) - { - index += 3; - fill -=3; -#ifdef DISPLAY_DETECTED_UNICODE - cerr << "UTF-8 BOM found" << endl; -#endif - return utf8; - } - if ((fill > 1) && - (buffer[0] == 0xfe) && - (buffer[1] == 0xff)) - { - index += 2; - fill -= 2; -#ifdef DISPLAY_DETECTED_UNICODE - cerr << "UTF-16BE BOM found" << endl; -#endif - return utf16be; - } - if ((fill > 1) && - (buffer[0] == 0xff) && - (buffer[1] == 0xfe)) - { - if ((fill == 4) && - (buffer[2] == 0x00) && - (buffer[3] == 0x00)) - { - cerr << "UTF Error: ambiguous BOM UTF-16 or UTF-32; assume UTF-32" << endl; - fill = 0; - index = 0; - return utf32le; - } - fill -= 2; - index += 2; -#ifdef DISPLAY_DETECTED_UNICODE - cerr << "UTF-16LE BOM found" << endl; -#endif - return utf16le; - } - if ((fill == 4) && - (buffer[0] == 0x00) && - (buffer[1] == 0x00) && - (buffer[2] == 0xfe) && - (buffer[3] == 0xff)) - { - fill = 0; - index = 0; -#ifdef DISPLAY_DETECTED_UNICODE - cerr << "UTF-32BE BOM found" << endl; -#endif - return utf32be; - } - return utf8; // no valid bom so use utf8 as default - } - int getByte(unsigned char &c) - { - if (fill) - { - index %= 4; - --fill; - c = buffer[index++]; - return 1; - } else - { - inputfile.read(reinterpret_cast(&c),1); - return inputfile.gcount(); - } - } - int getWord(unsigned short &w) - { - unsigned char c[2]; - if (!getByte(c[0])) - return 0; - if (!getByte(c[1])) - return 1; - if (encoding == utf16le) - w = c[0] | (c[1] << 8); - else - w = c[1] | (c[0] << 8); - return 2; - } - int getDWord(wchar_t &d) - { - unsigned char c[4]; - for (int i=0;i<4;i++) - if (!getByte(c[i])) - return i; - if (encoding == utf32le) - d = c[0] | (c[1] << 8) | (c[2] << 16) | (c[3] << 24); - else - d = c[3] | (c[2] << 8) | (c[1] << 16) | (c[0] << 24); - return 4; - } - wchar_t get_wchar_t() - { - wchar_t ret = (wchar_t)-1; - switch (encoding) - { - case detect: // if still unknwon - encoding = utf8; // assume utf8 as default - case utf8: - unsigned char c, tmp; - if (!getByte(tmp)) - return ret; - // table for 64 bytes (all 11xxxxxx resp. >=192) - // resulting byte is determined: - // lower 3 bits: number of following bytes (max.8) 0=error - // upper 5 bits: data filled with 0 - if (tmp & 0x80) - { - if ((tmp & 0xc0) != 0xc0) - { - cerr << "UTF-8 Error: invalid data byte" << endl; - return ret; - } - unsigned char i = utf8table[tmp & 0x3f]; - ret = i >> 3; - i &= 7; - while (i--) - { - ret <<= 6; - if (!getByte(c)) - return wchar_t(-1); - ret |= c & 0x3f; - } - return ret; - } - else - return wchar_t(tmp); - case utf16le: - case utf16be: - unsigned short w,w2; - if (getWord(w) != 2) - return ret; - if ((w & 0xfc00) == 0xd800) // high surrogate first - { - if (getWord(w2) != 2) - return ret; - if ((w2 & 0xfc00) != 0xdc00) - { - cerr << "UTF-16 Error: invalid low surrogate" << endl; - return ret; - } - return (((w & 0x3ff) + 0x40) << 10) | (w2 & 0x3ff); - } - return w; - case utf32le: - case utf32be: - if (getDWord(ret) != 4) - return wchar_t (-1); - return ret; - } - return ret; - } - void convert2utf16le() - { - wchar_t c; - unsigned char buffer[2] = {0xff, 0xfe}; - outputfile.write(reinterpret_cast(&buffer),2); // write BOM - c = get_wchar_t(); - while (!inputfile.eof()) - { - buffer[0] = c & 0xff; - buffer[1] = (c >> 8) & 0xff; // create utf16-le char - outputfile.write(reinterpret_cast(&buffer),2); // write char - c = get_wchar_t(); - } - } - ~utf_converter() - { - if (inputfile) - inputfile.close(); - if (outputfile) - outputfile.close(); - } -}; - -const unsigned char utf_converter::utf8table[64] = { -1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, 97, 105, 113, 121, -129, 137, 145, 153, 161, 169, 177, 185, 193, 201, 209, 217, 225, 233, 241, 249, -2, 10, 18, 26, 34, 42, 50, 58, 66, 74, 82, 90, 98, 106, 114, 122, -3, 11, 19, 27, 35, 43, 51, 59, 4, 12, 20, 28, 5, 13, 6, 7 -}; - - -int main(int argc, char* argv[]) -{ - utf_converter::err_types err; - if (argc < 3) - { - cout << "usage: " << argv[0] << " inputfile outputfile" << endl; - return -1; - } - utf_converter conv(argv[1],argv[2]); - if ((err = conv.getError())!=utf_converter::none) - { - switch (err) - { - case utf_converter::iopen: - cerr << "Couldn't open input file." << endl; - break; - case utf_converter::oopen: - cerr << "Couldn't open output file." << endl; - break; - default: - cerr << "Unknown error." << endl; - } - return -1; - } else - conv.convert2utf16le(); - return 0; -} - -// vim:set ts=4 sw=4: diff --git a/reactos/tools/utf16le/utf16le.rbuild b/reactos/tools/utf16le/utf16le.rbuild deleted file mode 100644 index e0d71a05fb0..00000000000 --- a/reactos/tools/utf16le/utf16le.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - - - utf16le.cpp - diff --git a/reactos/tools/widl/CMakeLists.txt b/reactos/tools/widl/CMakeLists.txt deleted file mode 100644 index d11f1fa9948..00000000000 --- a/reactos/tools/widl/CMakeLists.txt +++ /dev/null @@ -1,25 +0,0 @@ - -list(APPEND SOURCE - client.c - expr.c - hash.c - header.c - proxy.c - register.c - server.c - typegen.c - typelib.c - typetree.c - utils.c - widl.c - write_msft.c - parser.yy.c - parser.tab.c - port/mkstemps.c) - -# Taken from widl.rbuild -add_definitions(-DINT16=SHORT) - -add_executable(widl ${SOURCE}) - -target_link_libraries(widl wpp) diff --git a/reactos/tools/widl/client.c b/reactos/tools/widl/client.c deleted file mode 100644 index be42b1b8122..00000000000 --- a/reactos/tools/widl/client.c +++ /dev/null @@ -1,556 +0,0 @@ -/* - * IDL Compiler - * - * Copyright 2005-2006 Eric Kohl - * - * 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 -#include -#ifdef HAVE_UNISTD_H -# include -#endif -#include -#include - -#include "widl.h" -#include "utils.h" -#include "parser.h" -#include "header.h" - -#include "widltypes.h" -#include "typegen.h" -#include "expr.h" - -static FILE* client; -static int indent = 0; - -static void print_client( const char *format, ... ) __attribute__((format (printf, 1, 2))); -static void print_client( const char *format, ... ) -{ - va_list va; - va_start(va, format); - print(client, indent, format, va); - va_end(va); -} - -static void write_client_func_decl( const type_t *iface, const var_t *func ) -{ - const char *callconv = get_attrp(func->type->attrs, ATTR_CALLCONV); - const var_list_t *args = type_get_function_args(func->type); - type_t *rettype = type_function_get_rettype(func->type); - - if (!callconv) callconv = "__cdecl"; - write_type_decl_left(client, rettype); - fprintf(client, " %s ", callconv); - fprintf(client, "%s%s(\n", prefix_client, get_name(func)); - indent++; - if (args) - write_args(client, args, iface->name, 0, TRUE); - else - print_client("void"); - fprintf(client, ")\n"); - indent--; -} - -static void write_function_stub( const type_t *iface, const var_t *func, - int method_count, unsigned int proc_offset ) -{ - unsigned char explicit_fc, implicit_fc; - int has_full_pointer = is_full_pointer_function(func); - type_t *rettype = type_function_get_rettype(func->type); - const var_t *handle_var = get_func_handle_var( iface, func, &explicit_fc, &implicit_fc ); - int has_ret = !is_void(rettype); - - if (is_interpreted_func( iface, func )) - { - write_client_func_decl( iface, func ); - write_client_call_routine( client, iface, func, iface->name, proc_offset ); - return; - } - - print_client( "struct __frame_%s%s\n{\n", prefix_client, get_name(func) ); - indent++; - print_client( "__DECL_EXCEPTION_FRAME\n" ); - print_client("MIDL_STUB_MESSAGE _StubMsg;\n"); - if (handle_var) - { - if (explicit_fc == RPC_FC_BIND_GENERIC) - print_client("%s %s;\n", - get_explicit_generic_handle_type(handle_var)->name, handle_var->name ); - print_client("RPC_BINDING_HANDLE _Handle;\n"); - } - - if (has_ret && decl_indirect(rettype)) - { - print_client("void *_p_%s;\n", "_RetVal" ); - } - indent--; - print_client( "};\n\n" ); - - print_client( "static void __finally_%s%s(", prefix_client, get_name(func) ); - print_client( " struct __frame_%s%s *__frame )\n{\n", prefix_client, get_name(func) ); - indent++; - - if (has_full_pointer) - write_full_pointer_free(client, indent, func); - - print_client("NdrFreeBuffer(&__frame->_StubMsg);\n"); - - if (explicit_fc == RPC_FC_BIND_GENERIC) - { - fprintf(client, "\n"); - print_client("if (__frame->_Handle)\n"); - indent++; - print_client("%s_unbind(__frame->%s, __frame->_Handle);\n", - get_explicit_generic_handle_type(handle_var)->name, handle_var->name); - indent--; - } - indent--; - print_client( "}\n\n" ); - - write_client_func_decl( iface, func ); - - /* write the functions body */ - fprintf(client, "{\n"); - indent++; - print_client( "struct __frame_%s%s __f, * const __frame = &__f;\n", prefix_client, get_name(func) ); - - /* declare return value '_RetVal' */ - if (has_ret) - { - print_client("%s", ""); - write_type_decl_left(client, rettype); - fprintf(client, " _RetVal;\n"); - } - print_client("RPC_MESSAGE _RpcMessage;\n"); - - if (handle_var) - { - print_client( "__frame->_Handle = 0;\n" ); - if (explicit_fc == RPC_FC_BIND_GENERIC) - print_client("__frame->%s = %s;\n", handle_var->name, handle_var->name ); - } - if (has_ret && decl_indirect(rettype)) - { - print_client("__frame->_p_%s = &%s;\n", - "_RetVal", "_RetVal"); - } - fprintf(client, "\n"); - - print_client( "RpcExceptionInit( 0, __finally_%s%s );\n", prefix_client, get_name(func) ); - - if (has_full_pointer) - write_full_pointer_init(client, indent, func, FALSE); - - /* check pointers */ - write_pointer_checks( client, indent, func ); - - print_client("RpcTryFinally\n"); - print_client("{\n"); - indent++; - - print_client("NdrClientInitializeNew(&_RpcMessage, &__frame->_StubMsg, &%s_StubDesc, %d);\n", - iface->name, method_count); - - if (is_attr(func->attrs, ATTR_IDEMPOTENT) || is_attr(func->attrs, ATTR_BROADCAST)) - { - print_client("_RpcMessage.RpcFlags = ( RPC_NCA_FLAGS_DEFAULT "); - if (is_attr(func->attrs, ATTR_IDEMPOTENT)) - fprintf(client, "| RPC_NCA_FLAGS_IDEMPOTENT "); - if (is_attr(func->attrs, ATTR_BROADCAST)) - fprintf(client, "| RPC_NCA_FLAGS_BROADCAST "); - fprintf(client, ");\n\n"); - } - - switch (explicit_fc) - { - case RPC_FC_BIND_PRIMITIVE: - print_client("__frame->_Handle = %s;\n", handle_var->name); - fprintf(client, "\n"); - break; - case RPC_FC_BIND_GENERIC: - print_client("__frame->_Handle = %s_bind(%s);\n", - get_explicit_generic_handle_type(handle_var)->name, handle_var->name); - fprintf(client, "\n"); - break; - case RPC_FC_BIND_CONTEXT: - { - /* if the context_handle attribute appears in the chain of types - * without pointers being followed, then the context handle must - * be direct, otherwise it is a pointer */ - int is_ch_ptr = !is_aliaschain_attr(handle_var->type, ATTR_CONTEXTHANDLE); - print_client("if (%s%s != 0)\n", is_ch_ptr ? "*" : "", handle_var->name); - indent++; - print_client("__frame->_Handle = NDRCContextBinding(%s%s);\n", - is_ch_ptr ? "*" : "", handle_var->name); - indent--; - if (is_attr(handle_var->attrs, ATTR_IN) && !is_attr(handle_var->attrs, ATTR_OUT)) - { - print_client("else\n"); - indent++; - print_client("RpcRaiseException(RPC_X_SS_IN_NULL_CONTEXT);\n"); - indent--; - } - fprintf(client, "\n"); - break; - } - case 0: /* implicit handle */ - if (handle_var) - { - print_client("__frame->_Handle = %s;\n", handle_var->name); - fprintf(client, "\n"); - } - break; - } - - write_remoting_arguments(client, indent, func, "", PASS_IN, PHASE_BUFFERSIZE); - - print_client("NdrGetBuffer(&__frame->_StubMsg, __frame->_StubMsg.BufferLength, "); - if (handle_var) - fprintf(client, "__frame->_Handle);\n\n"); - else - fprintf(client,"%s__MIDL_AutoBindHandle);\n\n", iface->name); - - /* marshal arguments */ - write_remoting_arguments(client, indent, func, "", PASS_IN, PHASE_MARSHAL); - - /* send/receive message */ - /* print_client("NdrNsSendReceive(\n"); */ - /* print_client("(unsigned char *)__frame->_StubMsg.Buffer,\n"); */ - /* print_client("(RPC_BINDING_HANDLE *) &%s__MIDL_AutoBindHandle);\n", iface->name); */ - print_client("NdrSendReceive(&__frame->_StubMsg, __frame->_StubMsg.Buffer);\n\n"); - - print_client("__frame->_StubMsg.BufferStart = _RpcMessage.Buffer;\n"); - print_client("__frame->_StubMsg.BufferEnd = __frame->_StubMsg.BufferStart + _RpcMessage.BufferLength;\n"); - - if (has_out_arg_or_return(func)) - { - fprintf(client, "\n"); - - print_client("if ((_RpcMessage.DataRepresentation & 0x0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION)\n"); - indent++; - print_client("NdrConvert(&__frame->_StubMsg, (PFORMAT_STRING)&__MIDL_ProcFormatString.Format[%u]);\n", - proc_offset); - indent--; - } - - /* unmarshall arguments */ - fprintf(client, "\n"); - write_remoting_arguments(client, indent, func, "", PASS_OUT, PHASE_UNMARSHAL); - - /* unmarshal return value */ - if (has_ret) - { - if (decl_indirect(rettype)) - print_client("MIDL_memset(&%s, 0, sizeof(%s));\n", "_RetVal", "_RetVal"); - else if (is_ptr(rettype) || is_array(rettype)) - print_client("%s = 0;\n", "_RetVal"); - write_remoting_arguments(client, indent, func, "", PASS_RETURN, PHASE_UNMARSHAL); - } - - indent--; - print_client("}\n"); - print_client("RpcFinally\n"); - print_client("{\n"); - indent++; - print_client( "__finally_%s%s( __frame );\n", prefix_client, get_name(func) ); - indent--; - print_client("}\n"); - print_client("RpcEndFinally\n"); - - - /* emit return code */ - if (has_ret) - { - fprintf(client, "\n"); - print_client("return _RetVal;\n"); - } - - indent--; - fprintf(client, "}\n"); - fprintf(client, "\n"); -} - -static void write_function_stubs(type_t *iface, unsigned int *proc_offset) -{ - const statement_t *stmt; - const var_t *implicit_handle = get_attrp(iface->attrs, ATTR_IMPLICIT_HANDLE); - int method_count = 0; - - if (!implicit_handle) - print_client("static RPC_BINDING_HANDLE %s__MIDL_AutoBindHandle;\n\n", iface->name); - - STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) ) - { - const var_t *func = stmt->u.var; - write_function_stub( iface, func, method_count++, *proc_offset ); - *proc_offset += get_size_procformatstring_func( iface, func ); - } -} - - -static void write_stubdescdecl(type_t *iface) -{ - print_client("static const MIDL_STUB_DESC %s_StubDesc;\n", iface->name); - fprintf(client, "\n"); -} - - -static void write_stubdescriptor(type_t *iface, int expr_eval_routines) -{ - const var_t *implicit_handle = get_attrp(iface->attrs, ATTR_IMPLICIT_HANDLE); - - print_client("static const MIDL_STUB_DESC %s_StubDesc =\n", iface->name); - print_client("{\n"); - indent++; - print_client("(void *)& %s___RpcClientInterface,\n", iface->name); - print_client("MIDL_user_allocate,\n"); - print_client("MIDL_user_free,\n"); - print_client("{\n"); - indent++; - if (implicit_handle) - print_client("&%s,\n", implicit_handle->name); - else - print_client("&%s__MIDL_AutoBindHandle,\n", iface->name); - indent--; - print_client("},\n"); - print_client("0,\n"); - if (!list_empty( &generic_handle_list )) - print_client("BindingRoutines,\n"); - else - print_client("0,\n"); - if (expr_eval_routines) - print_client("ExprEvalRoutines,\n"); - else - print_client("0,\n"); - print_client("0,\n"); - print_client("__MIDL_TypeFormatString.Format,\n"); - print_client("1, /* -error bounds_check flag */\n"); - print_client("0x%x, /* Ndr library version */\n", get_stub_mode() == MODE_Oif ? 0x50002 : 0x10001); - print_client("0,\n"); - print_client("0x50100a4, /* MIDL Version 5.1.164 */\n"); - print_client("0,\n"); - print_client("%s,\n", list_empty(&user_type_list) ? "0" : "UserMarshalRoutines"); - print_client("0, /* notify & notify_flag routine table */\n"); - print_client("1, /* Flags */\n"); - print_client("0, /* Reserved3 */\n"); - print_client("0, /* Reserved4 */\n"); - print_client("0 /* Reserved5 */\n"); - indent--; - print_client("};\n"); - fprintf(client, "\n"); -} - - -static void write_clientinterfacedecl(type_t *iface) -{ - unsigned int ver = get_attrv(iface->attrs, ATTR_VERSION); - const UUID *uuid = get_attrp(iface->attrs, ATTR_UUID); - const str_list_t *endpoints = get_attrp(iface->attrs, ATTR_ENDPOINT); - - if (endpoints) write_endpoints( client, iface->name, endpoints ); - - print_client("static const RPC_CLIENT_INTERFACE %s___RpcClientInterface =\n", iface->name ); - print_client("{\n"); - indent++; - print_client("sizeof(RPC_CLIENT_INTERFACE),\n"); - print_client("{{0x%08x,0x%04x,0x%04x,{0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x}},{%d,%d}},\n", - uuid->Data1, uuid->Data2, uuid->Data3, uuid->Data4[0], uuid->Data4[1], - uuid->Data4[2], uuid->Data4[3], uuid->Data4[4], uuid->Data4[5], uuid->Data4[6], - uuid->Data4[7], MAJORVERSION(ver), MINORVERSION(ver)); - print_client("{{0x8a885d04,0x1ceb,0x11c9,{0x9f,0xe8,0x08,0x00,0x2b,0x10,0x48,0x60}},{2,0}},\n"); /* FIXME */ - print_client("0,\n"); - if (endpoints) - { - print_client("%u,\n", list_count(endpoints)); - print_client("(PRPC_PROTSEQ_ENDPOINT)%s__RpcProtseqEndpoint,\n", iface->name); - } - else - { - print_client("0,\n"); - print_client("0,\n"); - } - print_client("0,\n"); - print_client("0,\n"); - print_client("0,\n"); - indent--; - print_client("};\n"); - if (old_names) - print_client("RPC_IF_HANDLE %s_ClientIfHandle DECLSPEC_HIDDEN = (RPC_IF_HANDLE)& %s___RpcClientInterface;\n", - iface->name, iface->name); - else - print_client("RPC_IF_HANDLE %s%s_v%d_%d_c_ifspec DECLSPEC_HIDDEN = (RPC_IF_HANDLE)& %s___RpcClientInterface;\n", - prefix_client, iface->name, MAJORVERSION(ver), MINORVERSION(ver), iface->name); - fprintf(client, "\n"); -} - - -static void write_implicithandledecl(type_t *iface) -{ - const var_t *implicit_handle = get_attrp(iface->attrs, ATTR_IMPLICIT_HANDLE); - - if (implicit_handle) - { - write_type_decl( client, implicit_handle->type, implicit_handle->name ); - fprintf(client, ";\n\n"); - } -} - - -static void init_client(void) -{ - if (client) return; - if (!(client = fopen(client_name, "w"))) - error("Could not open %s for output\n", client_name); - - print_client("/*** Autogenerated by WIDL %s from %s - Do not edit ***/\n", PACKAGE_VERSION, input_name); - print_client("#include \n"); - print_client( "\n"); - print_client("#include \"%s\"\n", header_name); - print_client( "\n"); - print_client( "#ifndef DECLSPEC_HIDDEN\n"); - print_client( "#define DECLSPEC_HIDDEN\n"); - print_client( "#endif\n"); - print_client( "\n"); -} - - -static void write_client_ifaces(const statement_list_t *stmts, int expr_eval_routines, unsigned int *proc_offset) -{ - const statement_t *stmt; - if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) - { - if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE) - { - int has_func = 0; - const statement_t *stmt2; - type_t *iface = stmt->u.type; - if (!need_stub(iface)) - return; - - fprintf(client, "/*****************************************************************************\n"); - fprintf(client, " * %s interface\n", iface->name); - fprintf(client, " */\n"); - fprintf(client, "\n"); - - STATEMENTS_FOR_EACH_FUNC(stmt2, type_iface_get_stmts(iface)) - { - has_func = 1; - break; - } - - if (has_func) - { - write_implicithandledecl(iface); - - write_clientinterfacedecl(iface); - write_stubdescdecl(iface); - write_function_stubs(iface, proc_offset); - - print_client("#if !defined(__RPC_WIN%u__)\n", pointer_size == 8 ? 64 : 32); - print_client("#error Invalid build platform for this stub.\n"); - print_client("#endif\n"); - - fprintf(client, "\n"); - write_stubdescriptor(iface, expr_eval_routines); - } - } - else if (stmt->type == STMT_LIBRARY) - write_client_ifaces(stmt->u.lib->stmts, expr_eval_routines, proc_offset); - } -} - -static void write_generic_handle_routine_list(void) -{ - generic_handle_t *gh; - - if (list_empty( &generic_handle_list )) return; - print_client( "static const GENERIC_BINDING_ROUTINE_PAIR BindingRoutines[] =\n" ); - print_client( "{\n" ); - indent++; - LIST_FOR_EACH_ENTRY( gh, &generic_handle_list, generic_handle_t, entry ) - { - print_client( "{ (GENERIC_BINDING_ROUTINE)%s_bind, (GENERIC_UNBIND_ROUTINE)%s_unbind },\n", - gh->name, gh->name ); - } - indent--; - print_client( "};\n\n" ); -} - -static void write_client_routines(const statement_list_t *stmts) -{ - unsigned int proc_offset = 0; - int expr_eval_routines; - - if (need_inline_stubs_file( stmts )) - { - write_exceptions( client ); - print_client( "\n"); - } - - write_formatstringsdecl(client, indent, stmts, need_stub); - expr_eval_routines = write_expr_eval_routines(client, client_token); - if (expr_eval_routines) - write_expr_eval_routine_list(client, client_token); - write_generic_handle_routine_list(); - write_user_quad_list(client); - - write_client_ifaces(stmts, expr_eval_routines, &proc_offset); - - fprintf(client, "\n"); - - write_procformatstring(client, stmts, need_stub); - write_typeformatstring(client, stmts, need_stub); -} - -void write_client(const statement_list_t *stmts) -{ - if (!do_client) - return; - if (do_everything && !need_stub_files(stmts)) - return; - - init_client(); - if (!client) - return; - - if (do_win32 && do_win64) - { - fprintf(client, "#ifndef _WIN64\n\n"); - pointer_size = 4; - write_client_routines( stmts ); - fprintf(client, "\n#else /* _WIN64 */\n\n"); - pointer_size = 8; - write_client_routines( stmts ); - fprintf(client, "\n#endif /* _WIN64 */\n"); - } - else if (do_win32) - { - pointer_size = 4; - write_client_routines( stmts ); - } - else if (do_win64) - { - pointer_size = 8; - write_client_routines( stmts ); - } - - fclose(client); -} diff --git a/reactos/tools/widl/expr.c b/reactos/tools/widl/expr.c deleted file mode 100644 index 70123825072..00000000000 --- a/reactos/tools/widl/expr.c +++ /dev/null @@ -1,935 +0,0 @@ -/* - * Expression Abstract Syntax Tree Functions - * - * Copyright 2002 Ove Kaaven - * Copyright 2006-2008 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 "config.h" - -#include -#include -#include -#include -#include -#include - -#include "widl.h" -#include "utils.h" -#include "expr.h" -#include "header.h" -#include "typetree.h" -#include "typegen.h" - -static int is_integer_type(const type_t *type) -{ - switch (type_get_type(type)) - { - case TYPE_ENUM: - return TRUE; - case TYPE_BASIC: - switch (type_basic_get_type(type)) - { - case TYPE_BASIC_INT8: - case TYPE_BASIC_INT16: - case TYPE_BASIC_INT32: - case TYPE_BASIC_INT64: - case TYPE_BASIC_INT: - case TYPE_BASIC_INT3264: - case TYPE_BASIC_CHAR: - case TYPE_BASIC_HYPER: - case TYPE_BASIC_BYTE: - case TYPE_BASIC_WCHAR: - case TYPE_BASIC_ERROR_STATUS_T: - return TRUE; - case TYPE_BASIC_FLOAT: - case TYPE_BASIC_DOUBLE: - case TYPE_BASIC_HANDLE: - return FALSE; - } - return FALSE; - default: - return FALSE; - } -} - -static int is_signed_integer_type(const type_t *type) -{ - switch (type_get_type(type)) - { - case TYPE_ENUM: - return FALSE; - case TYPE_BASIC: - switch (type_basic_get_type(type)) - { - case TYPE_BASIC_INT8: - case TYPE_BASIC_INT16: - case TYPE_BASIC_INT32: - case TYPE_BASIC_INT64: - case TYPE_BASIC_INT: - case TYPE_BASIC_INT3264: - return type_basic_get_sign(type) < 0; - case TYPE_BASIC_CHAR: - return TRUE; - case TYPE_BASIC_HYPER: - case TYPE_BASIC_BYTE: - case TYPE_BASIC_WCHAR: - case TYPE_BASIC_ERROR_STATUS_T: - case TYPE_BASIC_FLOAT: - case TYPE_BASIC_DOUBLE: - case TYPE_BASIC_HANDLE: - return FALSE; - } - /* FALLTHROUGH */ - default: - return FALSE; - } -} - -static int is_float_type(const type_t *type) -{ - return (type_get_type(type) == TYPE_BASIC && - (type_basic_get_type(type) == TYPE_BASIC_FLOAT || - type_basic_get_type(type) == TYPE_BASIC_DOUBLE)); -} - -expr_t *make_expr(enum expr_type type) -{ - expr_t *e = xmalloc(sizeof(expr_t)); - e->type = type; - e->ref = NULL; - e->u.lval = 0; - e->is_const = FALSE; - e->cval = 0; - return e; -} - -expr_t *make_exprl(enum expr_type type, int val) -{ - expr_t *e = xmalloc(sizeof(expr_t)); - e->type = type; - e->ref = NULL; - e->u.lval = val; - e->is_const = FALSE; - /* check for numeric constant */ - if (type == EXPR_NUM || type == EXPR_HEXNUM || type == EXPR_TRUEFALSE) - { - /* make sure true/false value is valid */ - assert(type != EXPR_TRUEFALSE || val == 0 || val == 1); - e->is_const = TRUE; - e->cval = val; - } - return e; -} - -expr_t *make_exprd(enum expr_type type, double val) -{ - expr_t *e = xmalloc(sizeof(expr_t)); - e->type = type; - e->ref = NULL; - e->u.dval = val; - e->is_const = TRUE; - e->cval = val; - return e; -} - -expr_t *make_exprs(enum expr_type type, char *val) -{ - expr_t *e; - e = xmalloc(sizeof(expr_t)); - e->type = type; - e->ref = NULL; - e->u.sval = val; - e->is_const = FALSE; - /* check for predefined constants */ - switch (type) - { - case EXPR_IDENTIFIER: - { - var_t *c = find_const(val, 0); - if (c) - { - e->u.sval = c->name; - free(val); - e->is_const = TRUE; - e->cval = c->eval->cval; - } - break; - } - case EXPR_CHARCONST: - if (!val[0]) - error_loc("empty character constant\n"); - else if (val[1]) - error_loc("multi-character constants are endian dependent\n"); - else - { - e->is_const = TRUE; - e->cval = *val; - } - break; - default: - break; - } - return e; -} - -expr_t *make_exprt(enum expr_type type, var_t *var, expr_t *expr) -{ - expr_t *e; - type_t *tref; - - if (var->stgclass != STG_NONE && var->stgclass != STG_REGISTER) - error_loc("invalid storage class for type expression\n"); - - tref = var->type; - - e = xmalloc(sizeof(expr_t)); - e->type = type; - e->ref = expr; - e->u.tref = tref; - e->is_const = FALSE; - if (type == EXPR_SIZEOF) - { - /* only do this for types that should be the same on all platforms */ - if (is_integer_type(tref) || is_float_type(tref)) - { - e->is_const = TRUE; - e->cval = type_memsize(tref); - } - } - /* check for cast of constant expression */ - if (type == EXPR_CAST && expr->is_const) - { - if (is_integer_type(tref)) - { - unsigned int cast_type_bits = type_memsize(tref) * 8; - unsigned int cast_mask; - - e->is_const = TRUE; - if (is_signed_integer_type(tref)) - { - cast_mask = (1 << (cast_type_bits - 1)) - 1; - if (expr->cval & (1 << (cast_type_bits - 1))) - e->cval = -((-expr->cval) & cast_mask); - else - e->cval = expr->cval & cast_mask; - } - else - { - /* calculate ((1 << cast_type_bits) - 1) avoiding overflow */ - cast_mask = ((1 << (cast_type_bits - 1)) - 1) | - 1 << (cast_type_bits - 1); - e->cval = expr->cval & cast_mask; - } - } - else - { - e->is_const = TRUE; - e->cval = expr->cval; - } - } - free(var); - return e; -} - -expr_t *make_expr1(enum expr_type type, expr_t *expr) -{ - expr_t *e; - e = xmalloc(sizeof(expr_t)); - e->type = type; - e->ref = expr; - e->u.lval = 0; - e->is_const = FALSE; - /* check for compile-time optimization */ - if (expr->is_const) - { - e->is_const = TRUE; - switch (type) - { - case EXPR_LOGNOT: - e->cval = !expr->cval; - break; - case EXPR_POS: - e->cval = +expr->cval; - break; - case EXPR_NEG: - e->cval = -expr->cval; - break; - case EXPR_NOT: - e->cval = ~expr->cval; - break; - default: - e->is_const = FALSE; - break; - } - } - return e; -} - -expr_t *make_expr2(enum expr_type type, expr_t *expr1, expr_t *expr2) -{ - expr_t *e; - e = xmalloc(sizeof(expr_t)); - e->type = type; - e->ref = expr1; - e->u.ext = expr2; - e->is_const = FALSE; - /* check for compile-time optimization */ - if (expr1->is_const && expr2->is_const) - { - e->is_const = TRUE; - switch (type) - { - case EXPR_ADD: - e->cval = expr1->cval + expr2->cval; - break; - case EXPR_SUB: - e->cval = expr1->cval - expr2->cval; - break; - case EXPR_MOD: - if (expr2->cval == 0) - { - error_loc("divide by zero in expression\n"); - e->cval = 0; - } - else - e->cval = expr1->cval % expr2->cval; - break; - case EXPR_MUL: - e->cval = expr1->cval * expr2->cval; - break; - case EXPR_DIV: - if (expr2->cval == 0) - { - error_loc("divide by zero in expression\n"); - e->cval = 0; - } - else - e->cval = expr1->cval / expr2->cval; - break; - case EXPR_OR: - e->cval = expr1->cval | expr2->cval; - break; - case EXPR_AND: - e->cval = expr1->cval & expr2->cval; - break; - case EXPR_SHL: - e->cval = expr1->cval << expr2->cval; - break; - case EXPR_SHR: - e->cval = expr1->cval >> expr2->cval; - break; - case EXPR_LOGOR: - e->cval = expr1->cval || expr2->cval; - break; - case EXPR_LOGAND: - e->cval = expr1->cval && expr2->cval; - break; - case EXPR_XOR: - e->cval = expr1->cval ^ expr2->cval; - break; - case EXPR_EQUALITY: - e->cval = expr1->cval == expr2->cval; - break; - case EXPR_INEQUALITY: - e->cval = expr1->cval != expr2->cval; - break; - case EXPR_GTR: - e->cval = expr1->cval > expr2->cval; - break; - case EXPR_LESS: - e->cval = expr1->cval < expr2->cval; - break; - case EXPR_GTREQL: - e->cval = expr1->cval >= expr2->cval; - break; - case EXPR_LESSEQL: - e->cval = expr1->cval <= expr2->cval; - break; - default: - e->is_const = FALSE; - break; - } - } - return e; -} - -expr_t *make_expr3(enum expr_type type, expr_t *expr1, expr_t *expr2, expr_t *expr3) -{ - expr_t *e; - e = xmalloc(sizeof(expr_t)); - e->type = type; - e->ref = expr1; - e->u.ext = expr2; - e->ext2 = expr3; - e->is_const = FALSE; - /* check for compile-time optimization */ - if (expr1->is_const && expr2->is_const && expr3->is_const) - { - e->is_const = TRUE; - switch (type) - { - case EXPR_COND: - e->cval = expr1->cval ? expr2->cval : expr3->cval; - break; - default: - e->is_const = FALSE; - break; - } - } - return e; -} - -struct expression_type -{ - int is_variable; /* is the expression resolved to a variable? */ - int is_temporary; /* should the type be freed? */ - type_t *type; -}; - -static void check_scalar_type(const struct expr_loc *expr_loc, - const type_t *cont_type, const type_t *type) -{ - if (!cont_type || (!is_integer_type(type) && !is_ptr(type) && - !is_float_type(type))) - error_loc_info(&expr_loc->v->loc_info, "scalar type required in expression%s%s\n", - expr_loc->attr ? " for attribute " : "", - expr_loc->attr ? expr_loc->attr : ""); -} - -static void check_arithmetic_type(const struct expr_loc *expr_loc, - const type_t *cont_type, const type_t *type) -{ - if (!cont_type || (!is_integer_type(type) && !is_float_type(type))) - error_loc_info(&expr_loc->v->loc_info, "arithmetic type required in expression%s%s\n", - expr_loc->attr ? " for attribute " : "", - expr_loc->attr ? expr_loc->attr : ""); -} - -static void check_integer_type(const struct expr_loc *expr_loc, - const type_t *cont_type, const type_t *type) -{ - if (!cont_type || !is_integer_type(type)) - error_loc_info(&expr_loc->v->loc_info, "integer type required in expression%s%s\n", - expr_loc->attr ? " for attribute " : "", - expr_loc->attr ? expr_loc->attr : ""); -} - -static type_t *find_identifier(const char *identifier, const type_t *cont_type, int *found_in_cont_type) -{ - type_t *type = NULL; - const var_t *field; - const var_list_t *fields = NULL; - - *found_in_cont_type = 0; - - if (cont_type) - { - switch (type_get_type(cont_type)) - { - case TYPE_FUNCTION: - fields = type_function_get_args(cont_type); - break; - case TYPE_STRUCT: - fields = type_struct_get_fields(cont_type); - break; - case TYPE_UNION: - case TYPE_ENCAPSULATED_UNION: - fields = type_union_get_cases(cont_type); - break; - case TYPE_VOID: - case TYPE_BASIC: - case TYPE_ENUM: - case TYPE_MODULE: - case TYPE_COCLASS: - case TYPE_INTERFACE: - case TYPE_POINTER: - case TYPE_ARRAY: - case TYPE_BITFIELD: - /* nothing to do */ - break; - case TYPE_ALIAS: - /* shouldn't get here because of using type_get_type above */ - assert(0); - break; - } - } - - if (fields) LIST_FOR_EACH_ENTRY( field, fields, const var_t, entry ) - if (field->name && !strcmp(identifier, field->name)) - { - type = field->type; - *found_in_cont_type = 1; - break; - } - - if (!type) - { - var_t *const_var = find_const(identifier, 0); - if (const_var) type = const_var->type; - } - - return type; -} - -static int is_valid_member_operand(const type_t *type) -{ - switch (type_get_type(type)) - { - case TYPE_STRUCT: - case TYPE_UNION: - case TYPE_ENUM: - return TRUE; - default: - return FALSE; - } -} - -static struct expression_type resolve_expression(const struct expr_loc *expr_loc, - const type_t *cont_type, - const expr_t *e) -{ - struct expression_type result; - result.is_variable = FALSE; - result.is_temporary = FALSE; - result.type = NULL; - switch (e->type) - { - case EXPR_VOID: - break; - case EXPR_HEXNUM: - case EXPR_NUM: - case EXPR_TRUEFALSE: - result.is_temporary = FALSE; - result.type = type_new_int(TYPE_BASIC_INT, 0); - break; - case EXPR_STRLIT: - result.is_temporary = TRUE; - result.type = type_new_pointer(RPC_FC_UP, type_new_int(TYPE_BASIC_CHAR, 0), NULL); - break; - case EXPR_WSTRLIT: - result.is_temporary = TRUE; - result.type = type_new_pointer(RPC_FC_UP, type_new_int(TYPE_BASIC_WCHAR, 0), NULL); - break; - case EXPR_CHARCONST: - result.is_temporary = TRUE; - result.type = type_new_int(TYPE_BASIC_CHAR, 0); - break; - case EXPR_DOUBLE: - result.is_temporary = TRUE; - result.type = type_new_basic(TYPE_BASIC_DOUBLE); - break; - case EXPR_IDENTIFIER: - { - int found_in_cont_type; - result.is_variable = TRUE; - result.is_temporary = FALSE; - result.type = find_identifier(e->u.sval, cont_type, &found_in_cont_type); - if (!result.type) - { - error_loc_info(&expr_loc->v->loc_info, "identifier %s cannot be resolved in expression%s%s\n", - e->u.sval, expr_loc->attr ? " for attribute " : "", - expr_loc->attr ? expr_loc->attr : ""); - } - break; - } - case EXPR_LOGNOT: - result = resolve_expression(expr_loc, cont_type, e->ref); - check_scalar_type(expr_loc, cont_type, result.type); - result.is_variable = FALSE; - result.is_temporary = FALSE; - result.type = type_new_int(TYPE_BASIC_INT, 0); - break; - case EXPR_NOT: - result = resolve_expression(expr_loc, cont_type, e->ref); - check_integer_type(expr_loc, cont_type, result.type); - result.is_variable = FALSE; - break; - case EXPR_POS: - case EXPR_NEG: - result = resolve_expression(expr_loc, cont_type, e->ref); - check_arithmetic_type(expr_loc, cont_type, result.type); - result.is_variable = FALSE; - break; - case EXPR_ADDRESSOF: - result = resolve_expression(expr_loc, cont_type, e->ref); - if (!result.is_variable) - error_loc_info(&expr_loc->v->loc_info, "address-of operator applied to non-variable type in expression%s%s\n", - expr_loc->attr ? " for attribute " : "", - expr_loc->attr ? expr_loc->attr : ""); - result.is_variable = FALSE; - result.is_temporary = TRUE; - result.type = type_new_pointer(RPC_FC_UP, result.type, NULL); - break; - case EXPR_PPTR: - result = resolve_expression(expr_loc, cont_type, e->ref); - if (result.type && is_ptr(result.type)) - result.type = type_pointer_get_ref(result.type); - else if(result.type && is_array(result.type) - && type_array_is_decl_as_ptr(result.type)) - result.type = type_array_get_element(result.type); - else - error_loc_info(&expr_loc->v->loc_info, "dereference operator applied to non-pointer type in expression%s%s\n", - expr_loc->attr ? " for attribute " : "", - expr_loc->attr ? expr_loc->attr : ""); - break; - case EXPR_CAST: - result = resolve_expression(expr_loc, cont_type, e->ref); - result.type = e->u.tref; - break; - case EXPR_SIZEOF: - result.is_temporary = FALSE; - result.type = type_new_int(TYPE_BASIC_INT, 0); - break; - case EXPR_SHL: - case EXPR_SHR: - case EXPR_MOD: - case EXPR_MUL: - case EXPR_DIV: - case EXPR_ADD: - case EXPR_SUB: - case EXPR_AND: - case EXPR_OR: - case EXPR_XOR: - { - struct expression_type result_right; - result = resolve_expression(expr_loc, cont_type, e->ref); - result.is_variable = FALSE; - result_right = resolve_expression(expr_loc, cont_type, e->u.ext); - /* FIXME: these checks aren't strict enough for some of the operators */ - check_scalar_type(expr_loc, cont_type, result.type); - check_scalar_type(expr_loc, cont_type, result_right.type); - break; - } - case EXPR_LOGOR: - case EXPR_LOGAND: - case EXPR_EQUALITY: - case EXPR_INEQUALITY: - case EXPR_GTR: - case EXPR_LESS: - case EXPR_GTREQL: - case EXPR_LESSEQL: - { - struct expression_type result_left, result_right; - result_left = resolve_expression(expr_loc, cont_type, e->ref); - result_right = resolve_expression(expr_loc, cont_type, e->u.ext); - check_scalar_type(expr_loc, cont_type, result_left.type); - check_scalar_type(expr_loc, cont_type, result_right.type); - result.is_temporary = FALSE; - result.type = type_new_int(TYPE_BASIC_INT, 0); - break; - } - case EXPR_MEMBER: - result = resolve_expression(expr_loc, cont_type, e->ref); - if (result.type && is_valid_member_operand(result.type)) - result = resolve_expression(expr_loc, result.type, e->u.ext); - else - error_loc_info(&expr_loc->v->loc_info, "'.' or '->' operator applied to a type that isn't a structure, union or enumeration in expression%s%s\n", - expr_loc->attr ? " for attribute " : "", - expr_loc->attr ? expr_loc->attr : ""); - break; - case EXPR_COND: - { - struct expression_type result_first, result_second, result_third; - result_first = resolve_expression(expr_loc, cont_type, e->ref); - check_scalar_type(expr_loc, cont_type, result_first.type); - result_second = resolve_expression(expr_loc, cont_type, e->u.ext); - result_third = resolve_expression(expr_loc, cont_type, e->ext2); - check_scalar_type(expr_loc, cont_type, result_second.type); - check_scalar_type(expr_loc, cont_type, result_third.type); - if (!is_ptr(result_second.type) ^ !is_ptr(result_third.type)) - error_loc_info(&expr_loc->v->loc_info, "type mismatch in ?: expression\n" ); - /* FIXME: determine the correct return type */ - result = result_second; - result.is_variable = FALSE; - break; - } - case EXPR_ARRAY: - result = resolve_expression(expr_loc, cont_type, e->ref); - if (result.type && is_array(result.type)) - { - struct expression_type index_result; - result.type = type_array_get_element(result.type); - index_result = resolve_expression(expr_loc, cont_type /* FIXME */, e->u.ext); - if (!index_result.type || !is_integer_type(index_result.type)) - error_loc_info(&expr_loc->v->loc_info, "array subscript not of integral type in expression%s%s\n", - expr_loc->attr ? " for attribute " : "", - expr_loc->attr ? expr_loc->attr : ""); - } - else - error_loc_info(&expr_loc->v->loc_info, "array subscript operator applied to non-array type in expression%s%s\n", - expr_loc->attr ? " for attribute " : "", - expr_loc->attr ? expr_loc->attr : ""); - break; - } - return result; -} - -const type_t *expr_resolve_type(const struct expr_loc *expr_loc, const type_t *cont_type, const expr_t *expr) -{ - struct expression_type expr_type; - expr_type = resolve_expression(expr_loc, cont_type, expr); - return expr_type.type; -} - -void write_expr(FILE *h, const expr_t *e, int brackets, - int toplevel, const char *toplevel_prefix, - const type_t *cont_type, const char *local_var_prefix) -{ - switch (e->type) - { - case EXPR_VOID: - break; - case EXPR_NUM: - fprintf(h, "%u", e->u.lval); - break; - case EXPR_HEXNUM: - fprintf(h, "0x%x", e->u.lval); - break; - case EXPR_DOUBLE: - fprintf(h, "%#.15g", e->u.dval); - break; - case EXPR_TRUEFALSE: - if (e->u.lval == 0) - fprintf(h, "FALSE"); - else - fprintf(h, "TRUE"); - break; - case EXPR_IDENTIFIER: - if (toplevel && toplevel_prefix && cont_type) - { - int found_in_cont_type; - find_identifier(e->u.sval, cont_type, &found_in_cont_type); - if (found_in_cont_type) - { - fprintf(h, "%s%s", toplevel_prefix, e->u.sval); - break; - } - } - fprintf(h, "%s%s", local_var_prefix, e->u.sval); - break; - case EXPR_STRLIT: - fprintf(h, "\"%s\"", e->u.sval); - break; - case EXPR_WSTRLIT: - fprintf(h, "L\"%s\"", e->u.sval); - break; - case EXPR_CHARCONST: - fprintf(h, "'%s'", e->u.sval); - break; - case EXPR_LOGNOT: - fprintf(h, "!"); - write_expr(h, e->ref, 1, toplevel, toplevel_prefix, cont_type, local_var_prefix); - break; - case EXPR_NOT: - fprintf(h, "~"); - write_expr(h, e->ref, 1, toplevel, toplevel_prefix, cont_type, local_var_prefix); - break; - case EXPR_POS: - fprintf(h, "+"); - write_expr(h, e->ref, 1, toplevel, toplevel_prefix, cont_type, local_var_prefix); - break; - case EXPR_NEG: - fprintf(h, "-"); - write_expr(h, e->ref, 1, toplevel, toplevel_prefix, cont_type, local_var_prefix); - break; - case EXPR_ADDRESSOF: - fprintf(h, "&"); - write_expr(h, e->ref, 1, toplevel, toplevel_prefix, cont_type, local_var_prefix); - break; - case EXPR_PPTR: - fprintf(h, "*"); - write_expr(h, e->ref, 1, toplevel, toplevel_prefix, cont_type, local_var_prefix); - break; - case EXPR_CAST: - fprintf(h, "("); - write_type_decl(h, e->u.tref, NULL); - fprintf(h, ")"); - write_expr(h, e->ref, 1, toplevel, toplevel_prefix, cont_type, local_var_prefix); - break; - case EXPR_SIZEOF: - fprintf(h, "sizeof("); - write_type_decl(h, e->u.tref, NULL); - fprintf(h, ")"); - break; - case EXPR_SHL: - case EXPR_SHR: - case EXPR_MOD: - case EXPR_MUL: - case EXPR_DIV: - case EXPR_ADD: - case EXPR_SUB: - case EXPR_AND: - case EXPR_OR: - case EXPR_LOGOR: - case EXPR_LOGAND: - case EXPR_XOR: - case EXPR_EQUALITY: - case EXPR_INEQUALITY: - case EXPR_GTR: - case EXPR_LESS: - case EXPR_GTREQL: - case EXPR_LESSEQL: - if (brackets) fprintf(h, "("); - write_expr(h, e->ref, 1, toplevel, toplevel_prefix, cont_type, local_var_prefix); - switch (e->type) - { - case EXPR_SHL: fprintf(h, " << "); break; - case EXPR_SHR: fprintf(h, " >> "); break; - case EXPR_MOD: fprintf(h, " %% "); break; - case EXPR_MUL: fprintf(h, " * "); break; - case EXPR_DIV: fprintf(h, " / "); break; - case EXPR_ADD: fprintf(h, " + "); break; - case EXPR_SUB: fprintf(h, " - "); break; - case EXPR_AND: fprintf(h, " & "); break; - case EXPR_OR: fprintf(h, " | "); break; - case EXPR_LOGOR: fprintf(h, " || "); break; - case EXPR_LOGAND: fprintf(h, " && "); break; - case EXPR_XOR: fprintf(h, " ^ "); break; - case EXPR_EQUALITY: fprintf(h, " == "); break; - case EXPR_INEQUALITY: fprintf(h, " != "); break; - case EXPR_GTR: fprintf(h, " > "); break; - case EXPR_LESS: fprintf(h, " < "); break; - case EXPR_GTREQL: fprintf(h, " >= "); break; - case EXPR_LESSEQL: fprintf(h, " <= "); break; - default: break; - } - write_expr(h, e->u.ext, 1, toplevel, toplevel_prefix, cont_type, local_var_prefix); - if (brackets) fprintf(h, ")"); - break; - case EXPR_MEMBER: - if (brackets) fprintf(h, "("); - if (e->ref->type == EXPR_PPTR) - { - write_expr(h, e->ref->ref, 1, toplevel, toplevel_prefix, cont_type, local_var_prefix); - fprintf(h, "->"); - } - else - { - write_expr(h, e->ref, 1, toplevel, toplevel_prefix, cont_type, local_var_prefix); - fprintf(h, "."); - } - write_expr(h, e->u.ext, 1, 0, toplevel_prefix, cont_type, ""); - if (brackets) fprintf(h, ")"); - break; - case EXPR_COND: - if (brackets) fprintf(h, "("); - write_expr(h, e->ref, 1, toplevel, toplevel_prefix, cont_type, local_var_prefix); - fprintf(h, " ? "); - write_expr(h, e->u.ext, 1, toplevel, toplevel_prefix, cont_type, local_var_prefix); - fprintf(h, " : "); - write_expr(h, e->ext2, 1, toplevel, toplevel_prefix, cont_type, local_var_prefix); - if (brackets) fprintf(h, ")"); - break; - case EXPR_ARRAY: - if (brackets) fprintf(h, "("); - write_expr(h, e->ref, 1, toplevel, toplevel_prefix, cont_type, local_var_prefix); - fprintf(h, "["); - write_expr(h, e->u.ext, 1, 1, toplevel_prefix, cont_type, local_var_prefix); - fprintf(h, "]"); - if (brackets) fprintf(h, ")"); - break; - } -} - -/* This is actually fairly involved to implement precisely, due to the - effects attributes may have and things like that. Right now this is - only used for optimization, so just check for a very small set of - criteria that guarantee the types are equivalent; assume every thing - else is different. */ -static int compare_type(const type_t *a, const type_t *b) -{ - if (a == b - || (a->name - && b->name - && strcmp(a->name, b->name) == 0)) - return 0; - /* Ordering doesn't need to be implemented yet. */ - return 1; -} - -int compare_expr(const expr_t *a, const expr_t *b) -{ - int ret; - - if (a->type != b->type) - return a->type - b->type; - - switch (a->type) - { - case EXPR_NUM: - case EXPR_HEXNUM: - case EXPR_TRUEFALSE: - return a->u.lval - b->u.lval; - case EXPR_DOUBLE: - return a->u.dval - b->u.dval; - case EXPR_IDENTIFIER: - case EXPR_STRLIT: - case EXPR_WSTRLIT: - case EXPR_CHARCONST: - return strcmp(a->u.sval, b->u.sval); - case EXPR_COND: - ret = compare_expr(a->ref, b->ref); - if (ret != 0) - return ret; - ret = compare_expr(a->u.ext, b->u.ext); - if (ret != 0) - return ret; - return compare_expr(a->ext2, b->ext2); - case EXPR_OR: - case EXPR_AND: - case EXPR_ADD: - case EXPR_SUB: - case EXPR_MOD: - case EXPR_MUL: - case EXPR_DIV: - case EXPR_SHL: - case EXPR_SHR: - case EXPR_MEMBER: - case EXPR_ARRAY: - case EXPR_LOGOR: - case EXPR_LOGAND: - case EXPR_XOR: - case EXPR_EQUALITY: - case EXPR_INEQUALITY: - case EXPR_GTR: - case EXPR_LESS: - case EXPR_GTREQL: - case EXPR_LESSEQL: - ret = compare_expr(a->ref, b->ref); - if (ret != 0) - return ret; - return compare_expr(a->u.ext, b->u.ext); - case EXPR_CAST: - ret = compare_type(a->u.tref, b->u.tref); - if (ret != 0) - return ret; - /* Fall through. */ - case EXPR_NOT: - case EXPR_NEG: - case EXPR_PPTR: - case EXPR_ADDRESSOF: - case EXPR_LOGNOT: - case EXPR_POS: - return compare_expr(a->ref, b->ref); - case EXPR_SIZEOF: - return compare_type(a->u.tref, b->u.tref); - case EXPR_VOID: - return 0; - } - return -1; -} diff --git a/reactos/tools/widl/expr.h b/reactos/tools/widl/expr.h deleted file mode 100644 index 7b0e1b2c7ba..00000000000 --- a/reactos/tools/widl/expr.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Expression Abstract Syntax Tree Functions - * - * Copyright 2002 Ove Kaaven - * Copyright 2006-2008 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 - */ - -struct expr_loc -{ - const var_t *v; - const char *attr; -}; - -extern expr_t *make_expr(enum expr_type type); -extern expr_t *make_exprl(enum expr_type type, int val); -extern expr_t *make_exprd(enum expr_type type, double val); -extern expr_t *make_exprs(enum expr_type type, char *val); -extern expr_t *make_exprt(enum expr_type type, var_t *var, expr_t *expr); -extern expr_t *make_expr1(enum expr_type type, expr_t *expr); -extern expr_t *make_expr2(enum expr_type type, expr_t *exp1, expr_t *exp2); -extern expr_t *make_expr3(enum expr_type type, expr_t *expr1, expr_t *expr2, expr_t *expr3); - -extern const type_t *expr_resolve_type(const struct expr_loc *expr_loc, const type_t *cont_type, const expr_t *expr); -extern int compare_expr(const expr_t *a, const expr_t *b); - -extern void write_expr(FILE *h, const expr_t *e, int brackets, int toplevel, const char *toplevel_prefix, - const type_t *cont_type, const char *local_var_prefix); diff --git a/reactos/tools/widl/hash.c b/reactos/tools/widl/hash.c deleted file mode 100644 index a084a7c8854..00000000000 --- a/reactos/tools/widl/hash.c +++ /dev/null @@ -1,639 +0,0 @@ -/* - * 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: case LANG_NEUTRAL: -/* 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/reactos/tools/widl/hash.h b/reactos/tools/widl/hash.h deleted file mode 100644 index 3c2fd2914bf..00000000000 --- a/reactos/tools/widl/hash.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Hash definitions - * - * Copyright 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 - * - */ - -#ifndef __WIDL_HASH_H -#define __WIDL_HASH_H - -extern unsigned int lhash_val_of_name_sys( syskind_t skind, LCID lcid, LPCSTR lpStr); - -#endif diff --git a/reactos/tools/widl/header.c b/reactos/tools/widl/header.c deleted file mode 100644 index 9d20a3ee2bd..00000000000 --- a/reactos/tools/widl/header.c +++ /dev/null @@ -1,1397 +0,0 @@ -/* - * IDL Compiler - * - * Copyright 2002 Ove Kaaven - * - * 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 -#ifdef HAVE_UNISTD_H -# include -#endif -#include -#include - -#include "widl.h" -#include "utils.h" -#include "parser.h" -#include "header.h" -#include "expr.h" -#include "typetree.h" - -static int indentation = 0; -static int is_object_interface = 0; -user_type_list_t user_type_list = LIST_INIT(user_type_list); -context_handle_list_t context_handle_list = LIST_INIT(context_handle_list); -generic_handle_list_t generic_handle_list = LIST_INIT(generic_handle_list); - -static void write_type_def_or_decl(FILE *f, type_t *t, int field, const char *name); - -static void indent(FILE *h, int delta) -{ - int c; - if (delta < 0) indentation += delta; - for (c=0; c 0) indentation += delta; -} - -int is_ptrchain_attr(const var_t *var, enum attr_type t) -{ - if (is_attr(var->attrs, t)) - return 1; - else - { - type_t *type = var->type; - for (;;) - { - if (is_attr(type->attrs, t)) - return 1; - else if (type_is_alias(type)) - type = type_alias_get_aliasee(type); - else if (is_ptr(type)) - type = type_pointer_get_ref(type); - else return 0; - } - } -} - -int is_aliaschain_attr(const type_t *type, enum attr_type attr) -{ - const type_t *t = type; - for (;;) - { - if (is_attr(t->attrs, attr)) - return 1; - else if (type_is_alias(t)) - t = type_alias_get_aliasee(t); - else return 0; - } -} - -int is_attr(const attr_list_t *list, enum attr_type t) -{ - const attr_t *attr; - if (list) LIST_FOR_EACH_ENTRY( attr, list, const attr_t, entry ) - if (attr->type == t) return 1; - return 0; -} - -void *get_attrp(const attr_list_t *list, enum attr_type t) -{ - const attr_t *attr; - if (list) LIST_FOR_EACH_ENTRY( attr, list, const attr_t, entry ) - if (attr->type == t) return attr->u.pval; - return NULL; -} - -unsigned int get_attrv(const attr_list_t *list, enum attr_type t) -{ - const attr_t *attr; - if (list) LIST_FOR_EACH_ENTRY( attr, list, const attr_t, entry ) - if (attr->type == t) return attr->u.ival; - return 0; -} - -int is_void(const type_t *t) -{ - return type_get_type(t) == TYPE_VOID; -} - -int is_conformant_array(const type_t *t) -{ - return is_array(t) && type_array_has_conformance(t); -} - -void write_guid(FILE *f, const char *guid_prefix, const char *name, const UUID *uuid) -{ - if (!uuid) return; - fprintf(f, "DEFINE_GUID(%s_%s, 0x%08x, 0x%04x, 0x%04x, 0x%02x,0x%02x, 0x%02x," - "0x%02x,0x%02x,0x%02x,0x%02x,0x%02x);\n", - guid_prefix, name, uuid->Data1, uuid->Data2, uuid->Data3, uuid->Data4[0], - uuid->Data4[1], uuid->Data4[2], uuid->Data4[3], uuid->Data4[4], uuid->Data4[5], - uuid->Data4[6], uuid->Data4[7]); -} - -static void write_uuid_decl(FILE *f, const char *name, const UUID *uuid) -{ - fprintf(f, "#ifdef __CRT_UUID_DECL\n"); - fprintf(f, "__CRT_UUID_DECL(%s, 0x%08x, 0x%04x, 0x%04x, 0x%02x,0x%02x, 0x%02x," - "0x%02x,0x%02x,0x%02x,0x%02x,0x%02x)\n", - name, uuid->Data1, uuid->Data2, uuid->Data3, uuid->Data4[0], uuid->Data4[1], - uuid->Data4[2], uuid->Data4[3], uuid->Data4[4], uuid->Data4[5], uuid->Data4[6], - uuid->Data4[7]); - fprintf(f, "#endif\n"); -} - -static const char *uuid_string(const UUID *uuid) -{ - static char buf[37]; - - sprintf(buf, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", - uuid->Data1, uuid->Data2, uuid->Data3, uuid->Data4[0], uuid->Data4[1], uuid->Data4[2], - uuid->Data4[3], uuid->Data4[4], uuid->Data4[5], uuid->Data4[6], uuid->Data4[7]); - - return buf; -} - -const char *get_name(const var_t *v) -{ - static char buffer[256]; - - if (is_attr( v->attrs, ATTR_PROPGET )) - strcpy( buffer, "get_" ); - else if (is_attr( v->attrs, ATTR_PROPPUT )) - strcpy( buffer, "put_" ); - else if (is_attr( v->attrs, ATTR_PROPPUTREF )) - strcpy( buffer, "putref_" ); - else - buffer[0] = 0; - strcat( buffer, v->name ); - return buffer; -} - -static void write_field(FILE *h, var_t *v) -{ - if (!v) return; - if (v->type) { - indent(h, 0); - write_type_def_or_decl(h, v->type, TRUE, v->name); - fprintf(h, ";\n"); - } -} - -static void write_fields(FILE *h, var_list_t *fields) -{ - var_t *v; - if (!fields) return; - LIST_FOR_EACH_ENTRY( v, fields, var_t, entry ) write_field(h, v); -} - -static void write_enums(FILE *h, var_list_t *enums) -{ - var_t *v; - if (!enums) return; - LIST_FOR_EACH_ENTRY( v, enums, var_t, entry ) - { - if (v->name) { - indent(h, 0); - fprintf(h, "%s", get_name(v)); - if (v->eval) { - fprintf(h, " = "); - write_expr(h, v->eval, 0, 1, NULL, NULL, ""); - } - } - if (list_next( enums, &v->entry )) fprintf(h, ",\n"); - } - fprintf(h, "\n"); -} - -int needs_space_after(type_t *t) -{ - return (type_is_alias(t) || - (!is_ptr(t) && (!is_array(t) || !type_array_is_decl_as_ptr(t) || t->name))); -} - -void write_type_left(FILE *h, type_t *t, int declonly) -{ - if (!h) return; - - if (is_attr(t->attrs, ATTR_CONST) && - (type_is_alias(t) || !is_ptr(t))) - fprintf(h, "const "); - - if (type_is_alias(t)) fprintf(h, "%s", t->name); - else { - switch (type_get_type_detect_alias(t)) { - case TYPE_ENUM: - if (!declonly && t->defined && !t->written) { - if (t->name) fprintf(h, "enum %s {\n", t->name); - else fprintf(h, "enum {\n"); - t->written = TRUE; - indentation++; - write_enums(h, type_enum_get_values(t)); - indent(h, -1); - fprintf(h, "}"); - } - else fprintf(h, "enum %s", t->name ? t->name : ""); - break; - case TYPE_STRUCT: - case TYPE_ENCAPSULATED_UNION: - if (!declonly && t->defined && !t->written) { - if (t->name) fprintf(h, "struct %s {\n", t->name); - else fprintf(h, "struct {\n"); - t->written = TRUE; - indentation++; - if (type_get_type(t) != TYPE_STRUCT) - write_fields(h, type_encapsulated_union_get_fields(t)); - else - write_fields(h, type_struct_get_fields(t)); - indent(h, -1); - fprintf(h, "}"); - } - else fprintf(h, "struct %s", t->name ? t->name : ""); - break; - case TYPE_UNION: - if (!declonly && t->defined && !t->written) { - if (t->name) fprintf(h, "union %s {\n", t->name); - else fprintf(h, "union {\n"); - t->written = TRUE; - indentation++; - write_fields(h, type_union_get_cases(t)); - indent(h, -1); - fprintf(h, "}"); - } - else fprintf(h, "union %s", t->name ? t->name : ""); - break; - case TYPE_POINTER: - write_type_left(h, type_pointer_get_ref(t), declonly); - fprintf(h, "%s*", needs_space_after(type_pointer_get_ref(t)) ? " " : ""); - if (is_attr(t->attrs, ATTR_CONST)) fprintf(h, "const "); - break; - case TYPE_ARRAY: - if (t->name && type_array_is_decl_as_ptr(t)) - fprintf(h, "%s", t->name); - else - { - write_type_left(h, type_array_get_element(t), declonly); - if (type_array_is_decl_as_ptr(t)) - fprintf(h, "%s*", needs_space_after(type_array_get_element(t)) ? " " : ""); - } - break; - case TYPE_BASIC: - if (type_basic_get_type(t) != TYPE_BASIC_INT32 && - type_basic_get_type(t) != TYPE_BASIC_INT64 && - type_basic_get_type(t) != TYPE_BASIC_HYPER) - { - if (type_basic_get_sign(t) < 0) fprintf(h, "signed "); - else if (type_basic_get_sign(t) > 0) fprintf(h, "unsigned "); - } - switch (type_basic_get_type(t)) - { - case TYPE_BASIC_INT8: fprintf(h, "small"); break; - case TYPE_BASIC_INT16: fprintf(h, "short"); break; - case TYPE_BASIC_INT: fprintf(h, "int"); break; - case TYPE_BASIC_INT3264: fprintf(h, "__int3264"); break; - case TYPE_BASIC_BYTE: fprintf(h, "byte"); break; - case TYPE_BASIC_CHAR: fprintf(h, "char"); break; - case TYPE_BASIC_WCHAR: fprintf(h, "wchar_t"); break; - case TYPE_BASIC_FLOAT: fprintf(h, "float"); break; - case TYPE_BASIC_DOUBLE: fprintf(h, "double"); break; - case TYPE_BASIC_ERROR_STATUS_T: fprintf(h, "error_status_t"); break; - case TYPE_BASIC_HANDLE: fprintf(h, "handle_t"); break; - case TYPE_BASIC_INT32: - if (type_basic_get_sign(t) > 0) - fprintf(h, "ULONG"); - else - fprintf(h, "LONG"); - break; - case TYPE_BASIC_INT64: - if (type_basic_get_sign(t) > 0) - fprintf(h, "UINT64"); - else - fprintf(h, "INT64"); - break; - case TYPE_BASIC_HYPER: - if (type_basic_get_sign(t) > 0) - fprintf(h, "MIDL_uhyper"); - else - fprintf(h, "hyper"); - break; - } - break; - case TYPE_INTERFACE: - case TYPE_MODULE: - case TYPE_COCLASS: - fprintf(h, "%s", t->name); - break; - case TYPE_VOID: - fprintf(h, "void"); - break; - case TYPE_BITFIELD: - write_type_left(h, type_bitfield_get_field(t), declonly); - break; - case TYPE_ALIAS: - case TYPE_FUNCTION: - /* handled elsewhere */ - assert(0); - break; - } - } -} - -void write_type_right(FILE *h, type_t *t, int is_field) -{ - if (!h) return; - - switch (type_get_type(t)) - { - case TYPE_ARRAY: - if (!type_array_is_decl_as_ptr(t)) - { - if (is_conformant_array(t)) - { - fprintf(h, "[%s]", is_field ? "1" : ""); - t = type_array_get_element(t); - } - for ( ; - type_get_type(t) == TYPE_ARRAY && !type_array_is_decl_as_ptr(t); - t = type_array_get_element(t)) - fprintf(h, "[%u]", type_array_get_dim(t)); - } - break; - case TYPE_BITFIELD: - fprintf(h, " : %u", type_bitfield_get_bits(t)->cval); - break; - case TYPE_VOID: - case TYPE_BASIC: - case TYPE_ENUM: - case TYPE_STRUCT: - case TYPE_ENCAPSULATED_UNION: - case TYPE_UNION: - case TYPE_ALIAS: - case TYPE_MODULE: - case TYPE_COCLASS: - case TYPE_FUNCTION: - case TYPE_INTERFACE: - case TYPE_POINTER: - break; - } -} - -static void write_type_v(FILE *h, type_t *t, int is_field, int declonly, const char *name) -{ - type_t *pt = NULL; - int ptr_level = 0; - - if (!h) return; - - if (t) { - for (pt = t; is_ptr(pt); pt = type_pointer_get_ref(pt), ptr_level++) - ; - - if (type_get_type_detect_alias(pt) == TYPE_FUNCTION) { - int i; - const char *callconv = get_attrp(pt->attrs, ATTR_CALLCONV); - if (!callconv && is_object_interface) callconv = "STDMETHODCALLTYPE"; - if (is_attr(pt->attrs, ATTR_INLINE)) fprintf(h, "inline "); - write_type_left(h, type_function_get_rettype(pt), declonly); - fputc(' ', h); - if (ptr_level) fputc('(', h); - if (callconv) fprintf(h, "%s ", callconv); - for (i = 0; i < ptr_level; i++) - fputc('*', h); - } else - write_type_left(h, t, declonly); - } - - if (name) fprintf(h, "%s%s", !t || needs_space_after(t) ? " " : "", name ); - - if (t) { - if (type_get_type_detect_alias(pt) == TYPE_FUNCTION) { - const var_list_t *args = type_function_get_args(pt); - - if (ptr_level) fputc(')', h); - fputc('(', h); - if (args) - write_args(h, args, NULL, 0, FALSE); - else - fprintf(h, "void"); - fputc(')', h); - } else - write_type_right(h, t, is_field); - } -} - -static void write_type_def_or_decl(FILE *f, type_t *t, int field, const char *name) -{ - write_type_v(f, t, field, FALSE, name); -} - -void write_type_decl(FILE *f, type_t *t, const char *name) -{ - write_type_v(f, t, FALSE, TRUE, name); -} - -void write_type_decl_left(FILE *f, type_t *t) -{ - write_type_left(f, t, TRUE); -} - -static int user_type_registered(const char *name) -{ - user_type_t *ut; - LIST_FOR_EACH_ENTRY(ut, &user_type_list, user_type_t, entry) - if (!strcmp(name, ut->name)) - return 1; - return 0; -} - -static int context_handle_registered(const char *name) -{ - context_handle_t *ch; - LIST_FOR_EACH_ENTRY(ch, &context_handle_list, context_handle_t, entry) - if (!strcmp(name, ch->name)) - return 1; - return 0; -} - -static int generic_handle_registered(const char *name) -{ - generic_handle_t *gh; - LIST_FOR_EACH_ENTRY(gh, &generic_handle_list, generic_handle_t, entry) - if (!strcmp(name, gh->name)) - return 1; - return 0; -} - -unsigned int get_context_handle_offset( const type_t *type ) -{ - context_handle_t *ch; - unsigned int index = 0; - - while (!is_attr( type->attrs, ATTR_CONTEXTHANDLE )) - { - if (type_is_alias( type )) type = type_alias_get_aliasee( type ); - else if (is_ptr( type )) type = type_pointer_get_ref( type ); - else error( "internal error: %s is not a context handle\n", type->name ); - } - LIST_FOR_EACH_ENTRY( ch, &context_handle_list, context_handle_t, entry ) - { - if (!strcmp( type->name, ch->name )) return index; - index++; - } - error( "internal error: %s is not registered as a context handle\n", type->name ); - return index; -} - -unsigned int get_generic_handle_offset( const type_t *type ) -{ - generic_handle_t *gh; - unsigned int index = 0; - - while (!is_attr( type->attrs, ATTR_HANDLE )) - { - if (type_is_alias( type )) type = type_alias_get_aliasee( type ); - else if (is_ptr( type )) type = type_pointer_get_ref( type ); - else error( "internal error: %s is not a generic handle\n", type->name ); - } - LIST_FOR_EACH_ENTRY( gh, &generic_handle_list, generic_handle_t, entry ) - { - if (!strcmp( type->name, gh->name )) return index; - index++; - } - error( "internal error: %s is not registered as a generic handle\n", type->name ); - return index; -} - -/* check for types which require additional prototypes to be generated in the - * header */ -void check_for_additional_prototype_types(const var_list_t *list) -{ - const var_t *v; - - if (!list) return; - LIST_FOR_EACH_ENTRY( v, list, const var_t, entry ) - { - type_t *type = v->type; - if (!type) continue; - for (;;) { - const char *name = type->name; - if (type->user_types_registered) break; - type->user_types_registered = 1; - if (is_attr(type->attrs, ATTR_CONTEXTHANDLE)) { - if (!context_handle_registered(name)) - { - context_handle_t *ch = xmalloc(sizeof(*ch)); - ch->name = xstrdup(name); - list_add_tail(&context_handle_list, &ch->entry); - } - /* don't carry on parsing fields within this type */ - break; - } - if ((type_get_type(type) != TYPE_BASIC || - type_basic_get_type(type) != TYPE_BASIC_HANDLE) && - is_attr(type->attrs, ATTR_HANDLE)) { - if (!generic_handle_registered(name)) - { - generic_handle_t *gh = xmalloc(sizeof(*gh)); - gh->name = xstrdup(name); - list_add_tail(&generic_handle_list, &gh->entry); - } - /* don't carry on parsing fields within this type */ - break; - } - if (is_attr(type->attrs, ATTR_WIREMARSHAL)) { - if (!user_type_registered(name)) - { - user_type_t *ut = xmalloc(sizeof *ut); - ut->name = xstrdup(name); - list_add_tail(&user_type_list, &ut->entry); - } - /* don't carry on parsing fields within this type as we are already - * using a wire marshaled type */ - break; - } - else if (type_is_complete(type)) - { - var_list_t *vars; - switch (type_get_type_detect_alias(type)) - { - case TYPE_ENUM: - vars = type_enum_get_values(type); - break; - case TYPE_STRUCT: - vars = type_struct_get_fields(type); - break; - case TYPE_UNION: - vars = type_union_get_cases(type); - break; - default: - vars = NULL; - break; - } - check_for_additional_prototype_types(vars); - } - - if (type_is_alias(type)) - type = type_alias_get_aliasee(type); - else if (is_ptr(type)) - type = type_pointer_get_ref(type); - else if (is_array(type)) - type = type_array_get_element(type); - else - break; - } - } -} - -static void write_user_types(FILE *header) -{ - user_type_t *ut; - LIST_FOR_EACH_ENTRY(ut, &user_type_list, user_type_t, entry) - { - const char *name = ut->name; - fprintf(header, "ULONG __RPC_USER %s_UserSize (ULONG *, ULONG, %s *);\n", name, name); - fprintf(header, "unsigned char * __RPC_USER %s_UserMarshal (ULONG *, unsigned char *, %s *);\n", name, name); - fprintf(header, "unsigned char * __RPC_USER %s_UserUnmarshal(ULONG *, unsigned char *, %s *);\n", name, name); - fprintf(header, "void __RPC_USER %s_UserFree (ULONG *, %s *);\n", name, name); - } -} - -static void write_context_handle_rundowns(FILE *header) -{ - context_handle_t *ch; - LIST_FOR_EACH_ENTRY(ch, &context_handle_list, context_handle_t, entry) - { - const char *name = ch->name; - fprintf(header, "void __RPC_USER %s_rundown(%s);\n", name, name); - } -} - -static void write_generic_handle_routines(FILE *header) -{ - generic_handle_t *gh; - LIST_FOR_EACH_ENTRY(gh, &generic_handle_list, generic_handle_t, entry) - { - const char *name = gh->name; - fprintf(header, "handle_t __RPC_USER %s_bind(%s);\n", name, name); - fprintf(header, "void __RPC_USER %s_unbind(%s, handle_t);\n", name, name); - } -} - -static void write_typedef(FILE *header, type_t *type) -{ - fprintf(header, "typedef "); - write_type_def_or_decl(header, type_alias_get_aliasee(type), FALSE, type->name); - fprintf(header, ";\n"); -} - -int is_const_decl(const var_t *var) -{ - const type_t *t; - /* strangely, MIDL accepts a const attribute on any pointer in the - * declaration to mean that data isn't being instantiated. this appears - * to be a bug, but there is no benefit to being incompatible with MIDL, - * so we'll do the same thing */ - for (t = var->type; ; ) - { - if (is_attr(t->attrs, ATTR_CONST)) - return TRUE; - else if (is_ptr(t)) - t = type_pointer_get_ref(t); - else break; - } - return FALSE; -} - -static void write_declaration(FILE *header, const var_t *v) -{ - if (is_const_decl(v) && v->eval) - { - fprintf(header, "#define %s (", v->name); - write_expr(header, v->eval, 0, 1, NULL, NULL, ""); - fprintf(header, ")\n\n"); - } - else - { - switch (v->stgclass) - { - case STG_NONE: - case STG_REGISTER: /* ignored */ - break; - case STG_STATIC: - fprintf(header, "static "); - break; - case STG_EXTERN: - fprintf(header, "extern "); - break; - } - write_type_def_or_decl(header, v->type, FALSE, v->name); - fprintf(header, ";\n\n"); - } -} - -static void write_library(FILE *header, const typelib_t *typelib) -{ - const UUID *uuid = get_attrp(typelib->attrs, ATTR_UUID); - fprintf(header, "\n"); - write_guid(header, "LIBID", typelib->name, uuid); - fprintf(header, "\n"); -} - - -const type_t* get_explicit_generic_handle_type(const var_t* var) -{ - const type_t *t; - for (t = var->type; - is_ptr(t) || type_is_alias(t); - t = type_is_alias(t) ? type_alias_get_aliasee(t) : type_pointer_get_ref(t)) - if ((type_get_type_detect_alias(t) != TYPE_BASIC || type_basic_get_type(t) != TYPE_BASIC_HANDLE) && - is_attr(t->attrs, ATTR_HANDLE)) - return t; - return NULL; -} - -const var_t *get_func_handle_var( const type_t *iface, const var_t *func, - unsigned char *explicit_fc, unsigned char *implicit_fc ) -{ - const var_t *var; - const var_list_t *args = type_get_function_args( func->type ); - - *explicit_fc = *implicit_fc = 0; - if (args) LIST_FOR_EACH_ENTRY( var, args, const var_t, entry ) - { - if (!is_attr( var->attrs, ATTR_IN ) && is_attr( var->attrs, ATTR_OUT )) continue; - if (type_get_type( var->type ) == TYPE_BASIC && type_basic_get_type( var->type ) == TYPE_BASIC_HANDLE) - { - *explicit_fc = RPC_FC_BIND_PRIMITIVE; - return var; - } - if (get_explicit_generic_handle_type( var )) - { - *explicit_fc = RPC_FC_BIND_GENERIC; - return var; - } - if (is_context_handle( var->type )) - { - *explicit_fc = RPC_FC_BIND_CONTEXT; - return var; - } - } - - if ((var = get_attrp( iface->attrs, ATTR_IMPLICIT_HANDLE ))) - { - if (type_get_type( var->type ) == TYPE_BASIC && - type_basic_get_type( var->type ) == TYPE_BASIC_HANDLE) - *implicit_fc = RPC_FC_BIND_PRIMITIVE; - else - *implicit_fc = RPC_FC_BIND_GENERIC; - return var; - } - - *implicit_fc = RPC_FC_AUTO_HANDLE; - return NULL; -} - -int has_out_arg_or_return(const var_t *func) -{ - const var_t *var; - - if (!is_void(type_function_get_rettype(func->type))) - return 1; - - if (!type_get_function_args(func->type)) - return 0; - - LIST_FOR_EACH_ENTRY( var, type_get_function_args(func->type), const var_t, entry ) - if (is_attr(var->attrs, ATTR_OUT)) - return 1; - - return 0; -} - - -/********** INTERFACES **********/ - -int is_object(const type_t *iface) -{ - const attr_t *attr; - if (type_is_defined(iface) && type_iface_get_inherit(iface)) - return 1; - if (iface->attrs) LIST_FOR_EACH_ENTRY( attr, iface->attrs, const attr_t, entry ) - if (attr->type == ATTR_OBJECT || attr->type == ATTR_ODL) return 1; - return 0; -} - -int is_local(const attr_list_t *a) -{ - return is_attr(a, ATTR_LOCAL); -} - -const var_t *is_callas(const attr_list_t *a) -{ - return get_attrp(a, ATTR_CALLAS); -} - -static void write_method_macro(FILE *header, const type_t *iface, const char *name) -{ - const statement_t *stmt; - int first_iface = 1; - - if (type_iface_get_inherit(iface)) - write_method_macro(header, type_iface_get_inherit(iface), name); - - STATEMENTS_FOR_EACH_FUNC(stmt, type_iface_get_stmts(iface)) - { - const var_t *func = stmt->u.var; - - if (first_iface) - { - fprintf(header, "/*** %s methods ***/\n", iface->name); - first_iface = 0; - } - - if (!is_callas(func->attrs)) { - const var_t *arg; - - fprintf(header, "#define %s_%s(This", name, get_name(func)); - if (type_get_function_args(func->type)) - LIST_FOR_EACH_ENTRY( arg, type_get_function_args(func->type), const var_t, entry ) - fprintf(header, ",%s", arg->name); - fprintf(header, ") "); - - fprintf(header, "(This)->lpVtbl->%s(This", get_name(func)); - if (type_get_function_args(func->type)) - LIST_FOR_EACH_ENTRY( arg, type_get_function_args(func->type), const var_t, entry ) - fprintf(header, ",%s", arg->name); - fprintf(header, ")\n"); - } - } -} - -void write_args(FILE *h, const var_list_t *args, const char *name, int method, int do_indent) -{ - const var_t *arg; - int count = 0; - - if (do_indent) - { - indentation++; - indent(h, 0); - } - if (method == 1) { - fprintf(h, "%s* This", name); - count++; - } - if (args) LIST_FOR_EACH_ENTRY( arg, args, const var_t, entry ) { - if (count) { - if (do_indent) - { - fprintf(h, ",\n"); - indent(h, 0); - } - else fprintf(h, ","); - } - write_type_decl(h, arg->type, arg->name); - count++; - } - if (do_indent) indentation--; -} - -static void write_cpp_method_def(FILE *header, const type_t *iface) -{ - const statement_t *stmt; - - STATEMENTS_FOR_EACH_FUNC(stmt, type_iface_get_stmts(iface)) - { - const var_t *func = stmt->u.var; - if (!is_callas(func->attrs)) { - const char *callconv = get_attrp(func->type->attrs, ATTR_CALLCONV); - if (!callconv) callconv = "STDMETHODCALLTYPE"; - indent(header, 0); - fprintf(header, "virtual "); - write_type_decl_left(header, type_function_get_rettype(func->type)); - fprintf(header, " %s %s(\n", callconv, get_name(func)); - write_args(header, type_get_function_args(func->type), iface->name, 2, TRUE); - fprintf(header, ") = 0;\n"); - fprintf(header, "\n"); - } - } -} - -static void do_write_c_method_def(FILE *header, const type_t *iface, const char *name) -{ - const statement_t *stmt; - int first_iface = 1; - - if (type_iface_get_inherit(iface)) - do_write_c_method_def(header, type_iface_get_inherit(iface), name); - - STATEMENTS_FOR_EACH_FUNC(stmt, type_iface_get_stmts(iface)) - { - const var_t *func = stmt->u.var; - if (first_iface) { - indent(header, 0); - fprintf(header, "/*** %s methods ***/\n", iface->name); - first_iface = 0; - } - if (!is_callas(func->attrs)) { - const char *callconv = get_attrp(func->type->attrs, ATTR_CALLCONV); - if (!callconv) callconv = "STDMETHODCALLTYPE"; - indent(header, 0); - write_type_decl_left(header, type_function_get_rettype(func->type)); - fprintf(header, " (%s *%s)(\n", callconv, get_name(func)); - write_args(header, type_get_function_args(func->type), name, 1, TRUE); - fprintf(header, ");\n"); - fprintf(header, "\n"); - } - } -} - -static void write_c_method_def(FILE *header, const type_t *iface) -{ - do_write_c_method_def(header, iface, iface->name); -} - -static void write_c_disp_method_def(FILE *header, const type_t *iface) -{ - do_write_c_method_def(header, type_iface_get_inherit(iface), iface->name); -} - -static void write_method_proto(FILE *header, const type_t *iface) -{ - const statement_t *stmt; - - STATEMENTS_FOR_EACH_FUNC(stmt, type_iface_get_stmts(iface)) - { - const var_t *func = stmt->u.var; - - if (!is_local(func->attrs)) { - const char *callconv = get_attrp(func->type->attrs, ATTR_CALLCONV); - if (!callconv) callconv = "STDMETHODCALLTYPE"; - /* proxy prototype */ - write_type_decl_left(header, type_function_get_rettype(func->type)); - fprintf(header, " %s %s_%s_Proxy(\n", callconv, iface->name, get_name(func)); - write_args(header, type_get_function_args(func->type), iface->name, 1, TRUE); - fprintf(header, ");\n"); - /* stub prototype */ - fprintf(header, "void __RPC_STUB %s_%s_Stub(\n", iface->name, get_name(func)); - fprintf(header, " IRpcStubBuffer* This,\n"); - fprintf(header, " IRpcChannelBuffer* pRpcChannelBuffer,\n"); - fprintf(header, " PRPC_MESSAGE pRpcMessage,\n"); - fprintf(header, " DWORD* pdwStubPhase);\n"); - } - } -} - -static void write_locals(FILE *fp, const type_t *iface, int body) -{ - static const char comment[] - = "/* WIDL-generated stub. You must provide an implementation for this. */"; - const statement_t *stmt; - - if (!is_object(iface)) - return; - - STATEMENTS_FOR_EACH_FUNC(stmt, type_iface_get_stmts(iface)) { - const var_t *func = stmt->u.var; - const var_t *cas = is_callas(func->attrs); - - if (cas) { - const statement_t *stmt2 = NULL; - STATEMENTS_FOR_EACH_FUNC(stmt2, type_iface_get_stmts(iface)) - if (!strcmp(stmt2->u.var->name, cas->name)) - break; - if (&stmt2->entry != type_iface_get_stmts(iface)) { - const var_t *m = stmt2->u.var; - /* proxy prototype - use local prototype */ - write_type_decl_left(fp, type_function_get_rettype(m->type)); - fprintf(fp, " CALLBACK %s_%s_Proxy(\n", iface->name, get_name(m)); - write_args(fp, type_get_function_args(m->type), iface->name, 1, TRUE); - fprintf(fp, ")"); - if (body) { - type_t *rt = type_function_get_rettype(m->type); - fprintf(fp, "\n{\n"); - fprintf(fp, " %s\n", comment); - if (rt->name && strcmp(rt->name, "HRESULT") == 0) - fprintf(fp, " return E_NOTIMPL;\n"); - else if (type_get_type(rt) != TYPE_VOID) { - fprintf(fp, " "); - write_type_decl(fp, rt, "rv"); - fprintf(fp, ";\n"); - fprintf(fp, " memset(&rv, 0, sizeof rv);\n"); - fprintf(fp, " return rv;\n"); - } - fprintf(fp, "}\n\n"); - } - else - fprintf(fp, ";\n"); - /* stub prototype - use remotable prototype */ - write_type_decl_left(fp, type_function_get_rettype(func->type)); - fprintf(fp, " __RPC_STUB %s_%s_Stub(\n", iface->name, get_name(m)); - write_args(fp, type_get_function_args(func->type), iface->name, 1, TRUE); - fprintf(fp, ")"); - if (body) - /* Remotable methods must all return HRESULTs. */ - fprintf(fp, "\n{\n %s\n return E_NOTIMPL;\n}\n\n", comment); - else - fprintf(fp, ";\n"); - } - else - error_loc("invalid call_as attribute (%s -> %s)\n", func->name, cas->name); - } - } -} - -static void write_local_stubs_stmts(FILE *local_stubs, const statement_list_t *stmts) -{ - const statement_t *stmt; - if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) - { - if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE) - write_locals(local_stubs, stmt->u.type, TRUE); - else if (stmt->type == STMT_LIBRARY) - write_local_stubs_stmts(local_stubs, stmt->u.lib->stmts); - } -} - -void write_local_stubs(const statement_list_t *stmts) -{ - FILE *local_stubs; - - if (!local_stubs_name) return; - - local_stubs = fopen(local_stubs_name, "w"); - if (!local_stubs) { - error("Could not open %s for output\n", local_stubs_name); - return; - } - fprintf(local_stubs, "/* call_as/local stubs for %s */\n\n", input_name); - fprintf(local_stubs, "#include \n"); - fprintf(local_stubs, "#include \"%s\"\n\n", header_name); - - write_local_stubs_stmts(local_stubs, stmts); - - fclose(local_stubs); -} - -static void write_function_proto(FILE *header, const type_t *iface, const var_t *fun, const char *prefix) -{ - const char *callconv = get_attrp(fun->type->attrs, ATTR_CALLCONV); - - if (!callconv) callconv = "__cdecl"; - /* FIXME: do we need to handle call_as? */ - write_type_decl_left(header, type_function_get_rettype(fun->type)); - fprintf(header, " %s ", callconv); - fprintf(header, "%s%s(\n", prefix, get_name(fun)); - if (type_get_function_args(fun->type)) - write_args(header, type_get_function_args(fun->type), iface->name, 0, TRUE); - else - fprintf(header, " void"); - fprintf(header, ");\n\n"); -} - -static void write_forward(FILE *header, type_t *iface) -{ - fprintf(header, "#ifndef __%s_FWD_DEFINED__\n", iface->name); - fprintf(header, "#define __%s_FWD_DEFINED__\n", iface->name); - fprintf(header, "typedef interface %s %s;\n", iface->name, iface->name); - fprintf(header, "#endif\n\n" ); -} - -static void write_com_interface_start(FILE *header, const type_t *iface) -{ - int dispinterface = is_attr(iface->attrs, ATTR_DISPINTERFACE); - fprintf(header, "/*****************************************************************************\n"); - fprintf(header, " * %s %sinterface\n", iface->name, dispinterface ? "disp" : ""); - fprintf(header, " */\n"); - fprintf(header,"#ifndef __%s_%sINTERFACE_DEFINED__\n", iface->name, dispinterface ? "DISP" : ""); - fprintf(header,"#define __%s_%sINTERFACE_DEFINED__\n\n", iface->name, dispinterface ? "DISP" : ""); -} - -static void write_com_interface_end(FILE *header, type_t *iface) -{ - int dispinterface = is_attr(iface->attrs, ATTR_DISPINTERFACE); - const UUID *uuid = get_attrp(iface->attrs, ATTR_UUID); - - if (uuid) - write_guid(header, dispinterface ? "DIID" : "IID", iface->name, uuid); - - /* C++ interface */ - fprintf(header, "#if defined(__cplusplus) && !defined(CINTERFACE)\n"); - if (uuid) - fprintf(header, "MIDL_INTERFACE(\"%s\")\n", uuid_string(uuid)); - else - fprintf(header, "interface "); - if (type_iface_get_inherit(iface)) - { - fprintf(header, "%s : public %s\n", iface->name, - type_iface_get_inherit(iface)->name); - fprintf(header, "{\n"); - } - else - { - fprintf(header, "%s\n", iface->name); - fprintf(header, "{\n"); - fprintf(header, " BEGIN_INTERFACE\n"); - fprintf(header, "\n"); - } - /* dispinterfaces don't have real functions, so don't write C++ functions for - * them */ - if (!dispinterface) - { - indentation++; - write_cpp_method_def(header, iface); - indentation--; - } - if (!type_iface_get_inherit(iface)) - fprintf(header, " END_INTERFACE\n"); - fprintf(header, "};\n"); - if (uuid) - write_uuid_decl(header, iface->name, uuid); - fprintf(header, "#else\n"); - /* C interface */ - fprintf(header, "typedef struct %sVtbl {\n", iface->name); - indentation++; - fprintf(header, " BEGIN_INTERFACE\n"); - fprintf(header, "\n"); - if (dispinterface) - write_c_disp_method_def(header, iface); - else - write_c_method_def(header, iface); - indentation--; - fprintf(header, " END_INTERFACE\n"); - fprintf(header, "} %sVtbl;\n", iface->name); - fprintf(header, "interface %s {\n", iface->name); - fprintf(header, " CONST_VTBL %sVtbl* lpVtbl;\n", iface->name); - fprintf(header, "};\n"); - fprintf(header, "\n"); - fprintf(header, "#ifdef COBJMACROS\n"); - /* dispinterfaces don't have real functions, so don't write macros for them, - * only for the interface this interface inherits from, i.e. IDispatch */ - write_method_macro(header, dispinterface ? type_iface_get_inherit(iface) : iface, iface->name); - fprintf(header, "#endif\n"); - fprintf(header, "\n"); - fprintf(header, "#endif\n"); - fprintf(header, "\n"); - /* dispinterfaces don't have real functions, so don't write prototypes for - * them */ - if (!dispinterface) - { - write_method_proto(header, iface); - write_locals(header, iface, FALSE); - fprintf(header, "\n"); - } - fprintf(header,"#endif /* __%s_%sINTERFACE_DEFINED__ */\n\n", iface->name, dispinterface ? "DISP" : ""); -} - -static void write_rpc_interface_start(FILE *header, const type_t *iface) -{ - unsigned int ver = get_attrv(iface->attrs, ATTR_VERSION); - const var_t *var = get_attrp(iface->attrs, ATTR_IMPLICIT_HANDLE); - - fprintf(header, "/*****************************************************************************\n"); - fprintf(header, " * %s interface (v%d.%d)\n", iface->name, MAJORVERSION(ver), MINORVERSION(ver)); - fprintf(header, " */\n"); - fprintf(header,"#ifndef __%s_INTERFACE_DEFINED__\n", iface->name); - fprintf(header,"#define __%s_INTERFACE_DEFINED__\n\n", iface->name); - if (var) - { - fprintf(header, "extern "); - write_type_decl( header, var->type, var->name ); - fprintf(header, ";\n"); - } - if (old_names) - { - fprintf(header, "extern RPC_IF_HANDLE %s%s_ClientIfHandle;\n", prefix_client, iface->name); - fprintf(header, "extern RPC_IF_HANDLE %s%s_ServerIfHandle;\n", prefix_server, iface->name); - } - else - { - fprintf(header, "extern RPC_IF_HANDLE %s%s_v%d_%d_c_ifspec;\n", - prefix_client, iface->name, MAJORVERSION(ver), MINORVERSION(ver)); - fprintf(header, "extern RPC_IF_HANDLE %s%s_v%d_%d_s_ifspec;\n", - prefix_server, iface->name, MAJORVERSION(ver), MINORVERSION(ver)); - } -} - -static void write_rpc_interface_end(FILE *header, const type_t *iface) -{ - fprintf(header,"\n#endif /* __%s_INTERFACE_DEFINED__ */\n\n", iface->name); -} - -static void write_coclass(FILE *header, type_t *cocl) -{ - const UUID *uuid = get_attrp(cocl->attrs, ATTR_UUID); - - fprintf(header, "/*****************************************************************************\n"); - fprintf(header, " * %s coclass\n", cocl->name); - fprintf(header, " */\n\n"); - if (uuid) - write_guid(header, "CLSID", cocl->name, uuid); - fprintf(header, "\n#ifdef __cplusplus\n"); - if (uuid) - { - fprintf(header, "class DECLSPEC_UUID(\"%s\") %s;\n", uuid_string(uuid), cocl->name); - write_uuid_decl(header, cocl->name, uuid); - } - else - { - fprintf(header, "class %s;\n", cocl->name); - } - fprintf(header, "#endif\n"); - fprintf(header, "\n"); -} - -static void write_coclass_forward(FILE *header, type_t *cocl) -{ - fprintf(header, "#ifndef __%s_FWD_DEFINED__\n", cocl->name); - fprintf(header, "#define __%s_FWD_DEFINED__\n", cocl->name); - fprintf(header, "typedef struct %s %s;\n", cocl->name, cocl->name); - fprintf(header, "#endif /* defined __%s_FWD_DEFINED__ */\n\n", cocl->name ); -} - -static void write_import(FILE *header, const char *fname) -{ - char *hname, *p; - - hname = dup_basename(fname, ".idl"); - p = hname + strlen(hname) - 2; - if (p <= hname || strcmp( p, ".h" )) strcat(hname, ".h"); - - fprintf(header, "#include <%s>\n", hname); - free(hname); -} - -static void write_imports(FILE *header, const statement_list_t *stmts) -{ - const statement_t *stmt; - if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) - { - switch (stmt->type) - { - case STMT_TYPE: - if (type_get_type(stmt->u.type) == TYPE_INTERFACE) - write_imports(header, type_iface_get_stmts(stmt->u.type)); - break; - case STMT_TYPEREF: - case STMT_IMPORTLIB: - /* not included in header */ - break; - case STMT_IMPORT: - write_import(header, stmt->u.str); - break; - case STMT_TYPEDEF: - case STMT_MODULE: - case STMT_CPPQUOTE: - case STMT_DECLARATION: - /* not processed here */ - break; - case STMT_LIBRARY: - write_imports(header, stmt->u.lib->stmts); - break; - } - } -} - -static void write_forward_decls(FILE *header, const statement_list_t *stmts) -{ - const statement_t *stmt; - if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) - { - switch (stmt->type) - { - case STMT_TYPE: - if (type_get_type(stmt->u.type) == TYPE_INTERFACE) - { - if (is_object(stmt->u.type) || is_attr(stmt->u.type->attrs, ATTR_DISPINTERFACE)) - write_forward(header, stmt->u.type); - } - else if (type_get_type(stmt->u.type) == TYPE_COCLASS) - write_coclass_forward(header, stmt->u.type); - break; - case STMT_TYPEREF: - case STMT_IMPORTLIB: - /* not included in header */ - break; - case STMT_IMPORT: - case STMT_TYPEDEF: - case STMT_MODULE: - case STMT_CPPQUOTE: - case STMT_DECLARATION: - /* not processed here */ - break; - case STMT_LIBRARY: - write_forward_decls(header, stmt->u.lib->stmts); - break; - } - } -} - -static void write_header_stmts(FILE *header, const statement_list_t *stmts, const type_t *iface, int ignore_funcs) -{ - const statement_t *stmt; - if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) - { - switch (stmt->type) - { - case STMT_TYPE: - if (type_get_type(stmt->u.type) == TYPE_INTERFACE) - { - type_t *iface = stmt->u.type; - if (is_object(iface)) is_object_interface++; - if (is_attr(stmt->u.type->attrs, ATTR_DISPINTERFACE) || is_object(stmt->u.type)) - { - write_com_interface_start(header, iface); - write_header_stmts(header, type_iface_get_stmts(iface), stmt->u.type, TRUE); - write_com_interface_end(header, iface); - } - else - { - write_rpc_interface_start(header, iface); - write_header_stmts(header, type_iface_get_stmts(iface), iface, FALSE); - write_rpc_interface_end(header, iface); - } - if (is_object(iface)) is_object_interface--; - } - else if (type_get_type(stmt->u.type) == TYPE_COCLASS) - write_coclass(header, stmt->u.type); - else - { - write_type_def_or_decl(header, stmt->u.type, FALSE, NULL); - fprintf(header, ";\n\n"); - } - break; - case STMT_TYPEREF: - /* FIXME: shouldn't write out forward declarations for undefined - * interfaces but a number of our IDL files depend on this */ - if (type_get_type(stmt->u.type) == TYPE_INTERFACE && !stmt->u.type->written) - write_forward(header, stmt->u.type); - break; - case STMT_IMPORTLIB: - case STMT_MODULE: - /* not included in header */ - break; - case STMT_IMPORT: - /* 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) - write_typedef(header, type_entry->type); - break; - } - case STMT_LIBRARY: - write_library(header, stmt->u.lib); - write_header_stmts(header, stmt->u.lib->stmts, NULL, FALSE); - break; - case STMT_CPPQUOTE: - fprintf(header, "%s\n", stmt->u.str); - break; - case STMT_DECLARATION: - if (iface && type_get_type(stmt->u.var->type) == TYPE_FUNCTION) - { - if (!ignore_funcs) - { - int prefixes_differ = strcmp(prefix_client, prefix_server); - - if (prefixes_differ) - { - fprintf(header, "/* client prototype */\n"); - write_function_proto(header, iface, stmt->u.var, prefix_client); - fprintf(header, "/* server prototype */\n"); - } - write_function_proto(header, iface, stmt->u.var, prefix_server); - } - } - else - write_declaration(header, stmt->u.var); - break; - } - } -} - -void write_header(const statement_list_t *stmts) -{ - FILE *header; - - if (!do_header) return; - - if(!(header = fopen(header_name, "w"))) { - error("Could not open %s for output\n", header_name); - return; - } - fprintf(header, "/*** Autogenerated by WIDL %s from %s - Do not edit ***/\n\n", PACKAGE_VERSION, input_name); - fprintf(header, "#include \n" ); - fprintf(header, "#include \n\n" ); - - fprintf(header, "#if !defined(COM_NO_WINDOWS_H) && !defined(__WINESRC__)\n"); - fprintf(header, "#include \n"); - fprintf(header, "#include \n"); - fprintf(header, "#endif\n\n"); - - fprintf(header, "#ifndef __WIDL_%s\n", header_token); - fprintf(header, "#define __WIDL_%s\n\n", header_token); - - fprintf(header, "/* Forward declarations */\n\n"); - write_forward_decls(header, stmts); - - fprintf(header, "/* Headers for imported files */\n\n"); - write_imports(header, stmts); - fprintf(header, "\n"); - start_cplusplus_guard(header); - - write_header_stmts(header, stmts, NULL, FALSE); - - fprintf(header, "/* Begin additional prototypes for all interfaces */\n"); - fprintf(header, "\n"); - write_user_types(header); - write_generic_handle_routines(header); - write_context_handle_rundowns(header); - fprintf(header, "\n"); - fprintf(header, "/* End additional prototypes */\n"); - fprintf(header, "\n"); - - end_cplusplus_guard(header); - fprintf(header, "#endif /* __WIDL_%s */\n", header_token); - - fclose(header); -} diff --git a/reactos/tools/widl/header.h b/reactos/tools/widl/header.h deleted file mode 100644 index 6d056db2df5..00000000000 --- a/reactos/tools/widl/header.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * IDL Compiler - * - * Copyright 2002 Ove Kaaven - * - * 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_HEADER_H -#define __WIDL_HEADER_H - -#include "typetree.h" - -extern int is_ptrchain_attr(const var_t *var, enum attr_type t); -extern int is_aliaschain_attr(const type_t *var, enum attr_type t); -extern int is_attr(const attr_list_t *list, enum attr_type t); -extern void *get_attrp(const attr_list_t *list, enum attr_type t); -extern unsigned int get_attrv(const attr_list_t *list, enum attr_type t); -extern int is_void(const type_t *t); -extern int is_conformant_array(const type_t *t); -extern int is_declptr(const type_t *t); -extern const char* get_name(const var_t *v); -extern void write_type_left(FILE *h, type_t *t, int declonly); -extern void write_type_right(FILE *h, type_t *t, int is_field); -extern void write_type_decl(FILE *f, type_t *t, const char *name); -extern void write_type_decl_left(FILE *f, type_t *t); -extern unsigned int get_context_handle_offset( const type_t *type ); -extern unsigned int get_generic_handle_offset( const type_t *type ); -extern int needs_space_after(type_t *t); -extern int is_object(const type_t *iface); -extern int is_local(const attr_list_t *list); -extern int count_methods(const type_t *iface); -extern int need_stub(const type_t *iface); -extern int need_proxy(const type_t *iface); -extern int need_inline_stubs(const type_t *iface); -extern int need_stub_files(const statement_list_t *stmts); -extern int need_proxy_file(const statement_list_t *stmts); -extern int need_inline_stubs_file(const statement_list_t *stmts); -extern const var_t *is_callas(const attr_list_t *list); -extern void write_args(FILE *h, const var_list_t *arg, const char *name, int obj, int do_indent); -extern void write_array(FILE *h, array_dims_t *v, int field); -extern const type_t* get_explicit_generic_handle_type(const var_t* var); -extern const var_t *get_func_handle_var( const type_t *iface, const var_t *func, - unsigned char *explicit_fc, unsigned char *implicit_fc ); -extern int has_out_arg_or_return(const var_t *func); -extern void write_guid(FILE *f, const char *guid_prefix, const char *name, - const UUID *uuid); -extern int is_const_decl(const var_t *var); - -static inline int last_ptr(const type_t *type) -{ - return is_ptr(type) && !is_declptr(type_pointer_get_ref(type)); -} - -static inline int last_array(const type_t *type) -{ - return is_array(type) && !is_array(type_array_get_element(type)); -} - -static inline int is_string_type(const attr_list_t *attrs, const type_t *type) -{ - return ((is_attr(attrs, ATTR_STRING) || is_aliaschain_attr(type, ATTR_STRING)) - && (last_ptr(type) || last_array(type))); -} - -static inline int is_context_handle(const type_t *type) -{ - const type_t *t; - for (t = type; - is_ptr(t) || type_is_alias(t); - t = type_is_alias(t) ? type_alias_get_aliasee(t) : type_pointer_get_ref(t)) - if (is_attr(t->attrs, ATTR_CONTEXTHANDLE)) - return 1; - return 0; -} - -#endif diff --git a/reactos/tools/widl/parser.h b/reactos/tools/widl/parser.h deleted file mode 100644 index 1bcc3c182f2..00000000000 --- a/reactos/tools/widl/parser.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * IDL Compiler - * - * Copyright 2002 Ove Kaaven - * - * 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_PARSER_H -#define __WIDL_PARSER_H - -typedef struct -{ - type_t *interface; - unsigned char old_pointer_default; -} interface_info_t; - -int parser_parse(void); - -extern FILE *parser_in; -extern char *parser_text; -extern int parser_debug; -extern int yy_flex_debug; - -int parser_lex(void); - -extern int import_stack_ptr; -int do_import(char *fname); -void abort_import(void); -void pop_import(void); - -#define parse_only import_stack_ptr - -int is_type(const char *name); - -extern char *temp_name; - -#endif diff --git a/reactos/tools/widl/parser.l b/reactos/tools/widl/parser.l deleted file mode 100644 index e80616792b4..00000000000 --- a/reactos/tools/widl/parser.l +++ /dev/null @@ -1,536 +0,0 @@ -/* -*-C-*- - * IDL Compiler - * - * Copyright 2002 Ove Kaaven - * - * 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 - */ - -%option stack -%option noinput nounput noyy_top_state -%option 8bit never-interactive prefix="parser_" - -nl \r?\n -ws [ \f\t\r] -cident [a-zA-Z_][0-9a-zA-Z_]* -u_suffix (u|U) -l_suffix (l|L) -int [0-9]+({l_suffix}?{u_suffix}?|{u_suffix}?{l_suffix}?)? -hexd [0-9a-fA-F] -hex 0(x|X){hexd}+({l_suffix}?{u_suffix}?|{u_suffix}?{l_suffix}?)? -uuid {hexd}{8}-{hexd}{4}-{hexd}{4}-{hexd}{4}-{hexd}{12} -double [0-9]+\.[0-9]+([eE][+-]?[0-9]+)* - -%x QUOTE -%x WSTRQUOTE -%x ATTR -%x PP_LINE -%x SQUOTE - -%{ - -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#else -#define YY_NO_UNISTD_H -#endif - -#include "widl.h" -#include "utils.h" -#include "parser.h" -#include "wine/wpp.h" - -#include "parser.tab.h" - -static void addcchar(char c); -static char *get_buffered_cstring(void); - -static char *cbuffer; -static int cbufidx; -static int cbufalloc = 0; - -static int kw_token(const char *kw); -static int attr_token(const char *kw); - -#define MAX_IMPORT_DEPTH 10 -struct { - YY_BUFFER_STATE state; - char *input_name; - int line_number; - char *temp_name; -} import_stack[MAX_IMPORT_DEPTH]; -int import_stack_ptr = 0; - -/* converts an integer in string form to an unsigned long and prints an error - * on overflow */ -static unsigned int xstrtoul(const char *nptr, char **endptr, int base) -{ - unsigned long val; - - errno = 0; - val = strtoul(nptr, endptr, base); - if ((val == ULONG_MAX && errno == ERANGE) || ((unsigned int)val != val)) - error_loc("integer constant %s is too large\n", nptr); - return val; -} - -UUID *parse_uuid(const char *u) -{ - UUID* uuid = xmalloc(sizeof(UUID)); - char b[3]; - /* it would be nice to use UuidFromStringA */ - uuid->Data1 = strtoul(u, NULL, 16); - uuid->Data2 = strtoul(u+9, NULL, 16); - uuid->Data3 = strtoul(u+14, NULL, 16); - b[2] = 0; - memcpy(b, u+19, 2); uuid->Data4[0] = strtoul(b, NULL, 16); - memcpy(b, u+21, 2); uuid->Data4[1] = strtoul(b, NULL, 16); - memcpy(b, u+24, 2); uuid->Data4[2] = strtoul(b, NULL, 16); - memcpy(b, u+26, 2); uuid->Data4[3] = strtoul(b, NULL, 16); - memcpy(b, u+28, 2); uuid->Data4[4] = strtoul(b, NULL, 16); - memcpy(b, u+30, 2); uuid->Data4[5] = strtoul(b, NULL, 16); - memcpy(b, u+32, 2); uuid->Data4[6] = strtoul(b, NULL, 16); - memcpy(b, u+34, 2); uuid->Data4[7] = strtoul(b, NULL, 16); - return uuid; -} - -%} - -/* - ************************************************************************** - * The flexer starts here - ************************************************************************** - */ -%% -^{ws}*\#{ws}* yy_push_state(PP_LINE); -[^\n]* { - int lineno; - char *cptr, *fname; - yy_pop_state(); - lineno = (int)strtol(yytext, &cptr, 10); - if(!lineno) - error_loc("Malformed '#...' line-directive; invalid linenumber\n"); - fname = strchr(cptr, '"'); - if(!fname) - error_loc("Malformed '#...' line-directive; missing filename\n"); - fname++; - cptr = strchr(fname, '"'); - if(!cptr) - error_loc("Malformed '#...' line-directive; missing terminating \"\n"); - *cptr = '\0'; - line_number = lineno - 1; /* We didn't read the newline */ - input_name = xstrdup(fname); - } -\" yy_push_state(QUOTE); cbufidx = 0; -\" { - yy_pop_state(); - parser_lval.str = get_buffered_cstring(); - return aSTRING; - } -L\" yy_push_state(WSTRQUOTE); cbufidx = 0; -\" { - yy_pop_state(); - parser_lval.str = get_buffered_cstring(); - return aWSTRING; - } -\' yy_push_state(SQUOTE); cbufidx = 0; -\' { - yy_pop_state(); - parser_lval.str = get_buffered_cstring(); - return aSQSTRING; - } -\\\\ | -\\\" addcchar(yytext[1]); -\\\' addcchar(yytext[1]); -\\. addcchar('\\'); addcchar(yytext[1]); -. addcchar(yytext[0]); -\[ yy_push_state(ATTR); return '['; -\] yy_pop_state(); return ']'; -{cident} return attr_token(yytext); -{uuid} { - parser_lval.uuid = parse_uuid(yytext); - return aUUID; - } -{hex} { - parser_lval.num = xstrtoul(yytext, NULL, 0); - return aHEXNUM; - } -{int} { - parser_lval.num = xstrtoul(yytext, NULL, 0); - return aNUM; - } -{double} { - parser_lval.dbl = strtod(yytext, NULL); - return aDOUBLE; - } -SAFEARRAY{ws}*/\( return tSAFEARRAY; -{cident} return kw_token(yytext); -\n line_number++; -{ws} -\<\< return SHL; -\>\> return SHR; -\-\> return MEMBERPTR; -== return EQUALITY; -!= return INEQUALITY; -\>= return GREATEREQUAL; -\<= return LESSEQUAL; -\|\| return LOGICALOR; -&& return LOGICALAND; -\.\.\. return ELLIPSIS; -. return yytext[0]; -<> { - if (import_stack_ptr) - return aEOF; - else yyterminate(); - } -%% - -#ifndef parser_wrap -int parser_wrap(void) -{ - return 1; -} -#endif - -struct keyword { - const char *kw; - int token; -}; - -/* This table MUST be alphabetically sorted on the kw field */ -static const struct keyword keywords[] = { - {"FALSE", tFALSE}, - {"NULL", tNULL}, - {"TRUE", tTRUE}, - {"__cdecl", tCDECL}, - {"__fastcall", tFASTCALL}, - {"__int3264", tINT3264}, - {"__int64", tINT64}, - {"__pascal", tPASCAL}, - {"__stdcall", tSTDCALL}, - {"_cdecl", tCDECL}, - {"_fastcall", tFASTCALL}, - {"_pascal", tPASCAL}, - {"_stdcall", tSTDCALL}, - {"boolean", tBOOLEAN}, - {"byte", tBYTE}, - {"case", tCASE}, - {"cdecl", tCDECL}, - {"char", tCHAR}, - {"coclass", tCOCLASS}, - {"const", tCONST}, - {"cpp_quote", tCPPQUOTE}, - {"default", tDEFAULT}, - {"dispinterface", tDISPINTERFACE}, - {"double", tDOUBLE}, - {"enum", tENUM}, - {"error_status_t", tERRORSTATUST}, - {"extern", tEXTERN}, - {"float", tFLOAT}, - {"handle_t", tHANDLET}, - {"hyper", tHYPER}, - {"import", tIMPORT}, - {"importlib", tIMPORTLIB}, - {"inline", tINLINE}, - {"int", tINT}, - {"interface", tINTERFACE}, - {"library", tLIBRARY}, - {"long", tLONG}, - {"methods", tMETHODS}, - {"module", tMODULE}, - {"pascal", tPASCAL}, - {"properties", tPROPERTIES}, - {"register", tREGISTER}, - {"short", tSHORT}, - {"signed", tSIGNED}, - {"sizeof", tSIZEOF}, - {"small", tSMALL}, - {"static", tSTATIC}, - {"stdcall", tSTDCALL}, - {"struct", tSTRUCT}, - {"switch", tSWITCH}, - {"typedef", tTYPEDEF}, - {"union", tUNION}, - {"unsigned", tUNSIGNED}, - {"void", tVOID}, - {"wchar_t", tWCHAR}, -}; -#define NKEYWORDS (sizeof(keywords)/sizeof(keywords[0])) - -/* keywords only recognized in attribute lists - * This table MUST be alphabetically sorted on the kw field - */ -static const struct keyword attr_keywords[] = -{ - {"aggregatable", tAGGREGATABLE}, - {"allocate", tALLOCATE}, - {"annotation", tANNOTATION}, - {"apartment", tAPARTMENT}, - {"appobject", tAPPOBJECT}, - {"async", tASYNC}, - {"async_uuid", tASYNCUUID}, - {"auto_handle", tAUTOHANDLE}, - {"bindable", tBINDABLE}, - {"both", tBOTH}, - {"broadcast", tBROADCAST}, - {"byte_count", tBYTECOUNT}, - {"call_as", tCALLAS}, - {"callback", tCALLBACK}, - {"code", tCODE}, - {"comm_status", tCOMMSTATUS}, - {"context_handle", tCONTEXTHANDLE}, - {"context_handle_noserialize", tCONTEXTHANDLENOSERIALIZE}, - {"context_handle_serialize", tCONTEXTHANDLENOSERIALIZE}, - {"control", tCONTROL}, - {"decode", tDECODE}, - {"defaultbind", tDEFAULTBIND}, - {"defaultcollelem", tDEFAULTCOLLELEM}, - {"defaultvalue", tDEFAULTVALUE}, - {"defaultvtable", tDEFAULTVTABLE}, - {"disable_consistency_check", tDISABLECONSISTENCYCHECK}, - {"displaybind", tDISPLAYBIND}, - {"dllname", tDLLNAME}, - {"dual", tDUAL}, - {"enable_allocate", tENABLEALLOCATE}, - {"encode", tENCODE}, - {"endpoint", tENDPOINT}, - {"entry", tENTRY}, - {"explicit_handle", tEXPLICITHANDLE}, - {"fault_status", tFAULTSTATUS}, - {"force_allocate", tFORCEALLOCATE}, - {"free", tFREE}, - {"handle", tHANDLE}, - {"helpcontext", tHELPCONTEXT}, - {"helpfile", tHELPFILE}, - {"helpstring", tHELPSTRING}, - {"helpstringcontext", tHELPSTRINGCONTEXT}, - {"helpstringdll", tHELPSTRINGDLL}, - {"hidden", tHIDDEN}, - {"id", tID}, - {"idempotent", tIDEMPOTENT}, - {"ignore", tIGNORE}, - {"iid_is", tIIDIS}, - {"immediatebind", tIMMEDIATEBIND}, - {"implicit_handle", tIMPLICITHANDLE}, - {"in", tIN}, - {"in_line", tIN_LINE}, - {"input_sync", tINPUTSYNC}, - {"lcid", tLCID}, - {"length_is", tLENGTHIS}, - {"licensed", tLICENSED}, - {"local", tLOCAL}, - {"maybe", tMAYBE}, - {"message", tMESSAGE}, - {"neutral", tNEUTRAL}, - {"nocode", tNOCODE}, - {"nonbrowsable", tNONBROWSABLE}, - {"noncreatable", tNONCREATABLE}, - {"nonextensible", tNONEXTENSIBLE}, - {"notify", tNOTIFY}, - {"notify_flag", tNOTIFYFLAG}, - {"object", tOBJECT}, - {"odl", tODL}, - {"oleautomation", tOLEAUTOMATION}, - {"optimize", tOPTIMIZE}, - {"optional", tOPTIONAL}, - {"out", tOUT}, - {"partial_ignore", tPARTIALIGNORE}, - {"pointer_default", tPOINTERDEFAULT}, - {"progid", tPROGID}, - {"propget", tPROPGET}, - {"propput", tPROPPUT}, - {"propputref", tPROPPUTREF}, - {"proxy", tPROXY}, - {"ptr", tPTR}, - {"public", tPUBLIC}, - {"range", tRANGE}, - {"readonly", tREADONLY}, - {"ref", tREF}, - {"represent_as", tREPRESENTAS}, - {"requestedit", tREQUESTEDIT}, - {"restricted", tRESTRICTED}, - {"retval", tRETVAL}, - {"single", tSINGLE}, - {"size_is", tSIZEIS}, - {"source", tSOURCE}, - {"strict_context_handle", tSTRICTCONTEXTHANDLE}, - {"string", tSTRING}, - {"switch_is", tSWITCHIS}, - {"switch_type", tSWITCHTYPE}, - {"threading", tTHREADING}, - {"transmit_as", tTRANSMITAS}, - {"uidefault", tUIDEFAULT}, - {"unique", tUNIQUE}, - {"user_marshal", tUSERMARSHAL}, - {"usesgetlasterror", tUSESGETLASTERROR}, - {"uuid", tUUID}, - {"v1_enum", tV1ENUM}, - {"vararg", tVARARG}, - {"version", tVERSION}, - {"vi_progid", tVIPROGID}, - {"wire_marshal", tWIREMARSHAL}, -}; - -/* attributes TODO: - custom - first_is - last_is - max_is - min_is -*/ - -#define KWP(p) ((const struct keyword *)(p)) - -static int kw_cmp_func(const void *s1, const void *s2) -{ - return strcmp(KWP(s1)->kw, KWP(s2)->kw); -} - -static int kw_token(const char *kw) -{ - struct keyword key, *kwp; - key.kw = kw; - kwp = bsearch(&key, keywords, NKEYWORDS, sizeof(keywords[0]), kw_cmp_func); - if (kwp) { - parser_lval.str = xstrdup(kwp->kw); - return kwp->token; - } - parser_lval.str = xstrdup(kw); - return is_type(kw) ? aKNOWNTYPE : aIDENTIFIER; -} - -static int attr_token(const char *kw) -{ - struct keyword key, *kwp; - key.kw = kw; - kwp = bsearch(&key, attr_keywords, sizeof(attr_keywords)/sizeof(attr_keywords[0]), - sizeof(attr_keywords[0]), kw_cmp_func); - if (kwp) { - parser_lval.str = xstrdup(kwp->kw); - return kwp->token; - } - return kw_token(kw); -} - -static void addcchar(char c) -{ - if(cbufidx >= cbufalloc) - { - cbufalloc += 1024; - cbuffer = xrealloc(cbuffer, cbufalloc * sizeof(cbuffer[0])); - if(cbufalloc > 65536) - parser_warning("Reallocating string buffer larger than 64kB\n"); - } - cbuffer[cbufidx++] = c; -} - -static char *get_buffered_cstring(void) -{ - addcchar(0); - return xstrdup(cbuffer); -} - -void pop_import(void) -{ - int ptr = import_stack_ptr-1; - - fclose(yyin); - yy_delete_buffer( YY_CURRENT_BUFFER ); - yy_switch_to_buffer( import_stack[ptr].state ); - if (temp_name) { - unlink(temp_name); - free(temp_name); - } - temp_name = import_stack[ptr].temp_name; - input_name = import_stack[ptr].input_name; - line_number = import_stack[ptr].line_number; - import_stack_ptr--; -} - -struct imports { - char *name; - struct imports *next; -} *first_import; - -int do_import(char *fname) -{ - FILE *f; - char *path, *name; - struct imports *import; - int ptr = import_stack_ptr; - int ret, fd; - - import = first_import; - while (import && strcmp(import->name, fname)) - import = import->next; - if (import) return 0; /* already imported */ - - import = xmalloc(sizeof(struct imports)); - import->name = xstrdup(fname); - import->next = first_import; - first_import = import; - - /* don't search for a file name with a path in the include directories, - * for compatibility with MIDL */ - if (strchr( fname, '/' ) || strchr( fname, '\\' )) - path = xstrdup( fname ); - else if (!(path = wpp_find_include( fname, input_name ))) - error_loc("Unable to open include file %s\n", fname); - - import_stack[ptr].temp_name = temp_name; - import_stack[ptr].input_name = input_name; - import_stack[ptr].line_number = line_number; - import_stack_ptr++; - input_name = path; - line_number = 1; - - name = xstrdup( "widl.XXXXXX" ); - if((fd = mkstemps( name, 0 )) == -1) - error("Could not generate a temp name from %s\n", name); - - temp_name = name; - if (!(f = fdopen(fd, "wt"))) - error("Could not open fd %s for writing\n", name); - - ret = wpp_parse( path, f ); - fclose( f ); - if (ret) exit(1); - - if((f = fopen(temp_name, "r")) == NULL) - error_loc("Unable to open %s\n", temp_name); - - import_stack[ptr].state = YY_CURRENT_BUFFER; - yy_switch_to_buffer(yy_create_buffer(f, YY_BUF_SIZE)); - return 1; -} - -void abort_import(void) -{ - int ptr; - - for (ptr=0; ptr. */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "2.4.2" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 0 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - -/* Using locations. */ -#define YYLSP_NEEDED 0 - -/* Substitute the variable and function names. */ -#define yyparse parser_parse -#define yylex parser_lex -#define yyerror parser_error -#define yylval parser_lval -#define yychar parser_char -#define yydebug parser_debug -#define yynerrs parser_nerrs - - -/* Copy the first part of user declarations. */ - -/* Line 189 of yacc.c */ -#line 1 "parser.y" - -/* - * IDL Compiler - * - * Copyright 2002 Ove Kaaven - * Copyright 2006-2008 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 "config.h" - -#include -#include -#include -#include -#include -#include - -#include "widl.h" -#include "utils.h" -#include "parser.h" -#include "header.h" -#include "typelib.h" -#include "typegen.h" -#include "expr.h" -#include "typetree.h" - -#if defined(YYBYACC) - /* Berkeley yacc (byacc) doesn't seem to know about these */ - /* Some *BSD supplied versions do define these though */ -# ifndef YYEMPTY -# define YYEMPTY (-1) /* Empty lookahead value of yychar */ -# endif -# ifndef YYLEX -# define YYLEX yylex() -# endif - -#elif defined(YYBISON) - /* Bison was used for original development */ - /* #define YYEMPTY -2 */ - /* #define YYLEX yylex() */ - -#else - /* No yacc we know yet */ -# if !defined(YYEMPTY) || !defined(YYLEX) -# error Yacc version/type unknown. This version needs to be verified for settings of YYEMPTY and YYLEX. -# elif defined(__GNUC__) /* gcc defines the #warning directive */ -# warning Yacc version/type unknown. It defines YYEMPTY and YYLEX, but is not tested - /* #else we just take a chance that it works... */ -# endif -#endif - -#define YYERROR_VERBOSE - -static unsigned char pointer_default = RPC_FC_UP; - -typedef struct list typelist_t; -struct typenode { - type_t *type; - struct list entry; -}; - -struct _import_t -{ - char *name; - int import_performed; -}; - -typedef struct _decl_spec_t -{ - type_t *type; - attr_list_t *attrs; - enum storage_class stgclass; -} decl_spec_t; - -typelist_t incomplete_types = LIST_INIT(incomplete_types); - -static void fix_incomplete(void); -static void fix_incomplete_types(type_t *complete_type); - -static str_list_t *append_str(str_list_t *list, char *str); -static attr_list_t *append_attr(attr_list_t *list, attr_t *attr); -static attr_list_t *append_attr_list(attr_list_t *new_list, attr_list_t *old_list); -static decl_spec_t *make_decl_spec(type_t *type, decl_spec_t *left, decl_spec_t *right, attr_t *attr, enum storage_class stgclass); -static attr_t *make_attr(enum attr_type type); -static attr_t *make_attrv(enum attr_type type, unsigned int val); -static attr_t *make_attrp(enum attr_type type, void *val); -static expr_list_t *append_expr(expr_list_t *list, expr_t *expr); -static array_dims_t *append_array(array_dims_t *list, expr_t *expr); -static var_t *declare_var(attr_list_t *attrs, decl_spec_t *decl_spec, const declarator_t *decl, int top); -static var_list_t *set_var_types(attr_list_t *attrs, decl_spec_t *decl_spec, declarator_list_t *decls); -static ifref_list_t *append_ifref(ifref_list_t *list, ifref_t *iface); -static ifref_t *make_ifref(type_t *iface); -static var_list_t *append_var_list(var_list_t *list, var_list_t *vars); -static declarator_list_t *append_declarator(declarator_list_t *list, declarator_t *p); -static declarator_t *make_declarator(var_t *var); -static type_t *make_safearray(type_t *type); -static typelib_t *make_library(const char *name, const attr_list_t *attrs); -static type_t *append_ptrchain_type(type_t *ptrchain, type_t *type); - -static type_t *reg_typedefs(decl_spec_t *decl_spec, var_list_t *names, attr_list_t *attrs); -static type_t *find_type_or_error(const char *name, int t); -static type_t *find_type_or_error2(char *name, int t); - -static var_t *reg_const(var_t *var); - -static char *gen_name(void); -static void check_arg_attrs(const var_t *arg); -static void check_statements(const statement_list_t *stmts, int is_inside_library); -static void check_all_user_types(const statement_list_t *stmts); -static attr_list_t *check_iface_attrs(const char *name, attr_list_t *attrs); -static attr_list_t *check_function_attrs(const char *name, attr_list_t *attrs); -static attr_list_t *check_typedef_attrs(attr_list_t *attrs); -static attr_list_t *check_enum_attrs(attr_list_t *attrs); -static attr_list_t *check_struct_attrs(attr_list_t *attrs); -static attr_list_t *check_union_attrs(attr_list_t *attrs); -static attr_list_t *check_field_attrs(const char *name, attr_list_t *attrs); -static attr_list_t *check_library_attrs(const char *name, attr_list_t *attrs); -static attr_list_t *check_dispiface_attrs(const char *name, attr_list_t *attrs); -static attr_list_t *check_module_attrs(const char *name, attr_list_t *attrs); -static attr_list_t *check_coclass_attrs(const char *name, attr_list_t *attrs); -const char *get_attr_display_name(enum attr_type type); -static void add_explicit_handle_if_necessary(const type_t *iface, var_t *func); -static void check_def(const type_t *t); - -static statement_t *make_statement(enum statement_type type); -static statement_t *make_statement_type_decl(type_t *type); -static statement_t *make_statement_reference(type_t *type); -static statement_t *make_statement_declaration(var_t *var); -static statement_t *make_statement_library(typelib_t *typelib); -static statement_t *make_statement_cppquote(const char *str); -static statement_t *make_statement_importlib(const char *str); -static statement_t *make_statement_module(type_t *type); -static statement_t *make_statement_typedef(var_list_t *names); -static statement_t *make_statement_import(const char *str); -static statement_t *make_statement_typedef(var_list_t *names); -static statement_list_t *append_statement(statement_list_t *list, statement_t *stmt); - - - -/* Line 189 of yacc.c */ -#line 234 "parser.tab.c" - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - aIDENTIFIER = 258, - aKNOWNTYPE = 259, - aNUM = 260, - aHEXNUM = 261, - aDOUBLE = 262, - aSTRING = 263, - aWSTRING = 264, - aSQSTRING = 265, - aUUID = 266, - aEOF = 267, - SHL = 268, - SHR = 269, - MEMBERPTR = 270, - EQUALITY = 271, - INEQUALITY = 272, - GREATEREQUAL = 273, - LESSEQUAL = 274, - LOGICALOR = 275, - LOGICALAND = 276, - ELLIPSIS = 277, - tAGGREGATABLE = 278, - tALLOCATE = 279, - tANNOTATION = 280, - tAPPOBJECT = 281, - tASYNC = 282, - tASYNCUUID = 283, - tAUTOHANDLE = 284, - tBINDABLE = 285, - tBOOLEAN = 286, - tBROADCAST = 287, - tBYTE = 288, - tBYTECOUNT = 289, - tCALLAS = 290, - tCALLBACK = 291, - tCASE = 292, - tCDECL = 293, - tCHAR = 294, - tCOCLASS = 295, - tCODE = 296, - tCOMMSTATUS = 297, - tCONST = 298, - tCONTEXTHANDLE = 299, - tCONTEXTHANDLENOSERIALIZE = 300, - tCONTEXTHANDLESERIALIZE = 301, - tCONTROL = 302, - tCPPQUOTE = 303, - tDECODE = 304, - tDEFAULT = 305, - tDEFAULTBIND = 306, - tDEFAULTCOLLELEM = 307, - tDEFAULTVALUE = 308, - tDEFAULTVTABLE = 309, - tDISABLECONSISTENCYCHECK = 310, - tDISPLAYBIND = 311, - tDISPINTERFACE = 312, - tDLLNAME = 313, - tDOUBLE = 314, - tDUAL = 315, - tENABLEALLOCATE = 316, - tENCODE = 317, - tENDPOINT = 318, - tENTRY = 319, - tENUM = 320, - tERRORSTATUST = 321, - tEXPLICITHANDLE = 322, - tEXTERN = 323, - tFALSE = 324, - tFASTCALL = 325, - tFAULTSTATUS = 326, - tFLOAT = 327, - tFORCEALLOCATE = 328, - tHANDLE = 329, - tHANDLET = 330, - tHELPCONTEXT = 331, - tHELPFILE = 332, - tHELPSTRING = 333, - tHELPSTRINGCONTEXT = 334, - tHELPSTRINGDLL = 335, - tHIDDEN = 336, - tHYPER = 337, - tID = 338, - tIDEMPOTENT = 339, - tIGNORE = 340, - tIIDIS = 341, - tIMMEDIATEBIND = 342, - tIMPLICITHANDLE = 343, - tIMPORT = 344, - tIMPORTLIB = 345, - tIN = 346, - tIN_LINE = 347, - tINLINE = 348, - tINPUTSYNC = 349, - tINT = 350, - tINT3264 = 351, - tINT64 = 352, - tINTERFACE = 353, - tLCID = 354, - tLENGTHIS = 355, - tLIBRARY = 356, - tLICENSED = 357, - tLOCAL = 358, - tLONG = 359, - tMAYBE = 360, - tMESSAGE = 361, - tMETHODS = 362, - tMODULE = 363, - tNOCODE = 364, - tNONBROWSABLE = 365, - tNONCREATABLE = 366, - tNONEXTENSIBLE = 367, - tNOTIFY = 368, - tNOTIFYFLAG = 369, - tNULL = 370, - tOBJECT = 371, - tODL = 372, - tOLEAUTOMATION = 373, - tOPTIMIZE = 374, - tOPTIONAL = 375, - tOUT = 376, - tPARTIALIGNORE = 377, - tPASCAL = 378, - tPOINTERDEFAULT = 379, - tPROGID = 380, - tPROPERTIES = 381, - tPROPGET = 382, - tPROPPUT = 383, - tPROPPUTREF = 384, - tPROXY = 385, - tPTR = 386, - tPUBLIC = 387, - tRANGE = 388, - tREADONLY = 389, - tREF = 390, - tREGISTER = 391, - tREPRESENTAS = 392, - tREQUESTEDIT = 393, - tRESTRICTED = 394, - tRETVAL = 395, - tSAFEARRAY = 396, - tSHORT = 397, - tSIGNED = 398, - tSIZEIS = 399, - tSIZEOF = 400, - tSMALL = 401, - tSOURCE = 402, - tSTATIC = 403, - tSTDCALL = 404, - tSTRICTCONTEXTHANDLE = 405, - tSTRING = 406, - tSTRUCT = 407, - tSWITCH = 408, - tSWITCHIS = 409, - tSWITCHTYPE = 410, - tTHREADING = 411, - tTRANSMITAS = 412, - tTRUE = 413, - tTYPEDEF = 414, - tUIDEFAULT = 415, - tUNION = 416, - tUNIQUE = 417, - tUNSIGNED = 418, - tUSESGETLASTERROR = 419, - tUSERMARSHAL = 420, - tUUID = 421, - tV1ENUM = 422, - tVARARG = 423, - tVERSION = 424, - tVIPROGID = 425, - tVOID = 426, - tWCHAR = 427, - tWIREMARSHAL = 428, - tAPARTMENT = 429, - tNEUTRAL = 430, - tSINGLE = 431, - tFREE = 432, - tBOTH = 433, - ADDRESSOF = 434, - NEG = 435, - POS = 436, - PPTR = 437, - CAST = 438 - }; -#endif - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -{ - -/* Line 214 of yacc.c */ -#line 153 "parser.y" - - attr_t *attr; - attr_list_t *attr_list; - str_list_t *str_list; - expr_t *expr; - expr_list_t *expr_list; - array_dims_t *array_dims; - type_t *type; - var_t *var; - var_list_t *var_list; - declarator_t *declarator; - declarator_list_t *declarator_list; - statement_t *statement; - statement_list_t *stmt_list; - ifref_t *ifref; - ifref_list_t *ifref_list; - char *str; - UUID *uuid; - unsigned int num; - double dbl; - interface_info_t ifinfo; - typelib_t *typelib; - struct _import_t *import; - struct _decl_spec_t *declspec; - enum storage_class stgclass; - - - -/* Line 214 of yacc.c */ -#line 482 "parser.tab.c" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - - -/* Copy the second part of user declarations. */ - - -/* Line 264 of yacc.c */ -#line 494 "parser.tab.c" - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; -#else -typedef short int yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) -# endif -# endif -# ifndef YY_ -# define YY_(msgid) msgid -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) -#else -# define YYUSE(e) /* empty */ -#endif - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) - int yyi; -#endif -{ - return yyi; -} -#endif - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined _STDLIB_H \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) - -#endif - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 3 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 2742 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 208 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 100 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 380 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 661 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 438 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 192, 2, 2, 2, 191, 184, 2, - 203, 204, 189, 188, 179, 187, 199, 190, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 181, 202, - 185, 207, 186, 180, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 200, 2, 201, 183, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 205, 182, 206, 193, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 194, 195, 196, 197, 198 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint16 yyprhs[] = -{ - 0, 0, 3, 5, 6, 9, 12, 16, 19, 22, - 25, 28, 29, 32, 35, 39, 42, 45, 48, 51, - 54, 55, 58, 59, 61, 63, 66, 69, 71, 74, - 76, 79, 81, 84, 86, 89, 92, 95, 98, 103, - 107, 111, 117, 120, 124, 129, 130, 132, 134, 138, - 140, 144, 148, 151, 155, 159, 162, 163, 165, 169, - 171, 175, 180, 182, 186, 187, 189, 194, 196, 198, - 200, 202, 204, 209, 214, 216, 218, 220, 222, 224, - 226, 228, 230, 232, 234, 239, 241, 243, 245, 250, - 252, 254, 256, 261, 266, 268, 270, 272, 274, 279, - 284, 289, 294, 299, 301, 306, 308, 310, 315, 317, - 322, 324, 326, 331, 336, 338, 340, 342, 344, 346, - 348, 350, 352, 354, 356, 358, 360, 362, 364, 369, - 371, 373, 375, 380, 385, 387, 389, 391, 393, 395, - 402, 404, 409, 411, 413, 415, 420, 422, 424, 426, - 431, 436, 441, 446, 448, 450, 455, 460, 462, 464, - 469, 474, 479, 481, 483, 485, 487, 489, 491, 493, - 494, 497, 502, 506, 507, 510, 512, 514, 518, 522, - 524, 530, 532, 536, 537, 539, 541, 543, 545, 547, - 549, 551, 553, 555, 557, 559, 565, 569, 573, 577, - 581, 585, 589, 593, 597, 601, 605, 609, 613, 617, - 621, 625, 629, 633, 637, 640, 643, 646, 649, 652, - 655, 659, 663, 669, 675, 680, 684, 686, 690, 692, - 694, 695, 698, 703, 707, 710, 713, 714, 717, 720, - 722, 726, 728, 732, 735, 736, 738, 739, 741, 743, - 745, 747, 749, 751, 753, 756, 759, 761, 763, 765, - 767, 769, 771, 772, 774, 776, 779, 781, 784, 787, - 789, 791, 793, 796, 799, 802, 808, 809, 812, 815, - 818, 821, 824, 827, 831, 834, 838, 844, 850, 851, - 854, 857, 860, 863, 870, 879, 882, 885, 888, 891, - 894, 897, 903, 905, 907, 909, 911, 913, 914, 917, - 920, 924, 925, 927, 930, 933, 936, 940, 943, 945, - 947, 951, 954, 959, 963, 966, 968, 972, 975, 976, - 978, 982, 985, 987, 991, 996, 1000, 1003, 1005, 1009, - 1012, 1013, 1015, 1017, 1021, 1024, 1026, 1030, 1035, 1037, - 1041, 1042, 1045, 1048, 1050, 1054, 1056, 1060, 1062, 1064, - 1066, 1068, 1070, 1072, 1074, 1076, 1082, 1084, 1086, 1088, - 1090, 1093, 1095, 1098, 1100, 1103, 1108, 1113, 1119, 1130, - 1132 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int16 yyrhs[] = -{ - 209, 0, -1, 210, -1, -1, 210, 275, -1, 210, - 274, -1, 210, 261, 202, -1, 210, 263, -1, 210, - 278, -1, 210, 222, -1, 210, 214, -1, -1, 211, - 275, -1, 211, 274, -1, 211, 261, 202, -1, 211, - 263, -1, 211, 278, -1, 211, 214, -1, 211, 219, - -1, 211, 222, -1, -1, 212, 214, -1, -1, 202, - -1, 216, -1, 215, 202, -1, 254, 202, -1, 218, - -1, 305, 202, -1, 240, -1, 65, 3, -1, 303, - -1, 152, 3, -1, 306, -1, 161, 3, -1, 229, - 240, -1, 229, 303, -1, 229, 306, -1, 48, 203, - 8, 204, -1, 89, 8, 202, -1, 217, 211, 12, - -1, 90, 203, 8, 204, 213, -1, 101, 3, -1, - 229, 220, 205, -1, 221, 211, 206, 213, -1, -1, - 225, -1, 226, -1, 224, 179, 226, -1, 224, -1, - 224, 179, 22, -1, 229, 283, 294, -1, 283, 294, - -1, 200, 243, 201, -1, 200, 189, 201, -1, 200, - 201, -1, -1, 229, -1, 200, 230, 201, -1, 232, - -1, 230, 179, 232, -1, 230, 201, 200, 232, -1, - 8, -1, 231, 179, 8, -1, -1, 23, -1, 25, - 203, 8, 204, -1, 26, -1, 27, -1, 29, -1, - 30, -1, 32, -1, 35, 203, 257, 204, -1, 37, - 203, 244, 204, -1, 41, -1, 42, -1, 44, -1, - 45, -1, 46, -1, 47, -1, 49, -1, 50, -1, - 51, -1, 52, -1, 53, 203, 246, 204, -1, 54, - -1, 55, -1, 56, -1, 58, 203, 8, 204, -1, - 60, -1, 61, -1, 62, -1, 63, 203, 231, 204, - -1, 64, 203, 246, 204, -1, 67, -1, 71, -1, - 73, -1, 74, -1, 76, 203, 245, 204, -1, 77, - 203, 8, 204, -1, 78, 203, 8, 204, -1, 79, - 203, 245, 204, -1, 80, 203, 8, 204, -1, 81, - -1, 83, 203, 245, 204, -1, 84, -1, 85, -1, - 86, 203, 243, 204, -1, 87, -1, 88, 203, 226, - 204, -1, 91, -1, 94, -1, 100, 203, 241, 204, - -1, 99, 203, 245, 204, -1, 99, -1, 102, -1, - 103, -1, 105, -1, 106, -1, 109, -1, 110, -1, - 111, -1, 112, -1, 113, -1, 114, -1, 116, -1, - 117, -1, 118, -1, 119, 203, 8, 204, -1, 120, - -1, 121, -1, 122, -1, 124, 203, 302, 204, -1, - 125, 203, 8, 204, -1, 127, -1, 128, -1, 129, - -1, 130, -1, 132, -1, 133, 203, 245, 179, 245, - 204, -1, 134, -1, 137, 203, 304, 204, -1, 138, - -1, 139, -1, 140, -1, 144, 203, 241, 204, -1, - 147, -1, 150, -1, 151, -1, 154, 203, 243, 204, - -1, 155, 203, 304, 204, -1, 157, 203, 304, 204, - -1, 156, 203, 301, 204, -1, 160, -1, 164, -1, - 165, 203, 304, 204, -1, 166, 203, 233, 204, -1, - 167, -1, 168, -1, 169, 203, 307, 204, -1, 170, - 203, 8, 204, -1, 173, 203, 304, 204, -1, 302, - -1, 11, -1, 8, -1, 38, -1, 70, -1, 123, - -1, 149, -1, -1, 235, 236, -1, 37, 245, 181, - 251, -1, 50, 181, 251, -1, -1, 238, 179, -1, - 238, -1, 239, -1, 238, 179, 239, -1, 257, 207, - 245, -1, 257, -1, 65, 256, 205, 237, 206, -1, - 242, -1, 241, 179, 242, -1, -1, 243, -1, 5, - -1, 6, -1, 7, -1, 69, -1, 115, -1, 158, - -1, 8, -1, 9, -1, 10, -1, 3, -1, 243, - 180, 243, 181, 243, -1, 243, 20, 243, -1, 243, - 21, 243, -1, 243, 182, 243, -1, 243, 183, 243, - -1, 243, 184, 243, -1, 243, 16, 243, -1, 243, - 17, 243, -1, 243, 186, 243, -1, 243, 185, 243, - -1, 243, 18, 243, -1, 243, 19, 243, -1, 243, - 13, 243, -1, 243, 14, 243, -1, 243, 188, 243, - -1, 243, 187, 243, -1, 243, 191, 243, -1, 243, - 189, 243, -1, 243, 190, 243, -1, 192, 243, -1, - 193, 243, -1, 188, 243, -1, 187, 243, -1, 184, - 243, -1, 189, 243, -1, 243, 15, 3, -1, 243, - 199, 3, -1, 203, 283, 290, 204, 243, -1, 145, - 203, 283, 290, 204, -1, 243, 200, 243, 201, -1, - 203, 243, 204, -1, 245, -1, 244, 179, 245, -1, - 243, -1, 243, -1, -1, 247, 248, -1, 228, 283, - 299, 202, -1, 228, 306, 202, -1, 252, 202, -1, - 229, 202, -1, -1, 250, 249, -1, 252, 202, -1, - 202, -1, 228, 283, 286, -1, 254, -1, 229, 283, - 300, -1, 283, 300, -1, -1, 257, -1, -1, 3, - -1, 4, -1, 3, -1, 4, -1, 33, -1, 172, - -1, 260, -1, 143, 260, -1, 163, 260, -1, 163, - -1, 72, -1, 59, -1, 31, -1, 66, -1, 75, - -1, -1, 95, -1, 95, -1, 142, 259, -1, 146, - -1, 104, 259, -1, 82, 259, -1, 97, -1, 39, - -1, 96, -1, 40, 3, -1, 40, 4, -1, 229, - 261, -1, 262, 205, 264, 206, 213, -1, -1, 264, - 265, -1, 228, 275, -1, 57, 3, -1, 57, 4, - -1, 229, 266, -1, 126, 181, -1, 268, 252, 202, - -1, 107, 181, -1, 269, 253, 202, -1, 267, 205, - 268, 269, 206, -1, 267, 205, 272, 202, 206, -1, - -1, 181, 4, -1, 98, 3, -1, 98, 4, -1, - 229, 272, -1, 273, 271, 205, 212, 206, 213, -1, - 273, 181, 3, 205, 218, 212, 206, 213, -1, 270, - 213, -1, 272, 202, -1, 266, 202, -1, 108, 3, - -1, 108, 4, -1, 229, 276, -1, 277, 205, 212, - 206, 213, -1, 68, -1, 148, -1, 136, -1, 93, - -1, 43, -1, -1, 282, 281, -1, 304, 284, -1, - 285, 304, 284, -1, -1, 285, -1, 281, 284, -1, - 280, 284, -1, 279, 284, -1, 189, 282, 286, -1, - 234, 286, -1, 287, -1, 257, -1, 203, 286, 204, - -1, 287, 227, -1, 287, 203, 223, 204, -1, 189, - 282, 290, -1, 234, 290, -1, 291, -1, 189, 282, - 294, -1, 234, 294, -1, -1, 288, -1, 203, 289, - 204, -1, 291, 227, -1, 227, -1, 203, 223, 204, - -1, 291, 203, 223, 204, -1, 189, 282, 294, -1, - 234, 294, -1, 295, -1, 189, 282, 294, -1, 234, - 294, -1, -1, 292, -1, 257, -1, 203, 293, 204, - -1, 295, 227, -1, 227, -1, 203, 223, 204, -1, - 295, 203, 223, 204, -1, 286, -1, 296, 179, 286, - -1, -1, 181, 246, -1, 292, 297, -1, 298, -1, - 299, 179, 298, -1, 286, -1, 286, 207, 246, -1, - 174, -1, 175, -1, 176, -1, 177, -1, 178, -1, - 135, -1, 162, -1, 131, -1, 152, 256, 205, 247, - 206, -1, 171, -1, 4, -1, 258, -1, 240, -1, - 65, 3, -1, 303, -1, 152, 3, -1, 306, -1, - 161, 3, -1, 141, 203, 304, 204, -1, 159, 228, - 283, 296, -1, 161, 256, 205, 250, 206, -1, 161, - 256, 153, 203, 252, 204, 255, 205, 235, 206, -1, - 5, -1, 5, 199, 5, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = -{ - 0, 328, 328, 342, 343, 344, 345, 348, 351, 352, - 353, 356, 357, 358, 359, 360, 363, 364, 365, 366, - 369, 370, 373, 374, 378, 379, 380, 381, 382, 386, - 387, 388, 389, 390, 391, 392, 393, 394, 397, 399, - 407, 413, 417, 419, 423, 430, 431, 434, 435, 438, - 439, 443, 448, 455, 459, 460, 463, 464, 468, 471, - 472, 473, 476, 477, 480, 481, 482, 483, 484, 485, - 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, - 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, - 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, - 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, - 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, - 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, - 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, - 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, - 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, - 579, 580, 581, 585, 586, 591, 592, 593, 594, 597, - 598, 601, 605, 611, 612, 613, 616, 620, 629, 633, - 638, 641, 642, 645, 646, 649, 650, 651, 652, 653, - 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, - 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, - 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, - 684, 685, 686, 688, 690, 691, 694, 695, 698, 704, - 710, 711, 714, 719, 726, 727, 730, 731, 735, 736, - 739, 745, 753, 757, 762, 763, 766, 767, 768, 771, - 773, 776, 777, 778, 779, 780, 781, 782, 783, 784, - 785, 786, 789, 790, 793, 794, 795, 796, 797, 798, - 799, 800, 803, 804, 812, 818, 822, 823, 827, 830, - 831, 834, 843, 844, 847, 848, 851, 857, 863, 864, - 867, 868, 871, 881, 888, 894, 898, 899, 902, 903, - 906, 911, 918, 919, 920, 924, 928, 931, 932, 935, - 936, 940, 941, 945, 946, 947, 951, 953, 955, 959, - 960, 961, 962, 970, 972, 974, 979, 981, 986, 987, - 992, 993, 994, 995, 1000, 1009, 1011, 1012, 1017, 1019, - 1023, 1024, 1031, 1032, 1033, 1034, 1035, 1040, 1048, 1049, - 1052, 1053, 1056, 1063, 1064, 1069, 1070, 1074, 1075, 1076, - 1077, 1078, 1082, 1083, 1084, 1087, 1090, 1091, 1092, 1093, - 1094, 1095, 1096, 1097, 1098, 1099, 1102, 1108, 1110, 1116, - 1117 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "aIDENTIFIER", "aKNOWNTYPE", "aNUM", - "aHEXNUM", "aDOUBLE", "aSTRING", "aWSTRING", "aSQSTRING", "aUUID", - "aEOF", "SHL", "SHR", "MEMBERPTR", "EQUALITY", "INEQUALITY", - "GREATEREQUAL", "LESSEQUAL", "LOGICALOR", "LOGICALAND", "ELLIPSIS", - "tAGGREGATABLE", "tALLOCATE", "tANNOTATION", "tAPPOBJECT", "tASYNC", - "tASYNCUUID", "tAUTOHANDLE", "tBINDABLE", "tBOOLEAN", "tBROADCAST", - "tBYTE", "tBYTECOUNT", "tCALLAS", "tCALLBACK", "tCASE", "tCDECL", - "tCHAR", "tCOCLASS", "tCODE", "tCOMMSTATUS", "tCONST", "tCONTEXTHANDLE", - "tCONTEXTHANDLENOSERIALIZE", "tCONTEXTHANDLESERIALIZE", "tCONTROL", - "tCPPQUOTE", "tDECODE", "tDEFAULT", "tDEFAULTBIND", "tDEFAULTCOLLELEM", - "tDEFAULTVALUE", "tDEFAULTVTABLE", "tDISABLECONSISTENCYCHECK", - "tDISPLAYBIND", "tDISPINTERFACE", "tDLLNAME", "tDOUBLE", "tDUAL", - "tENABLEALLOCATE", "tENCODE", "tENDPOINT", "tENTRY", "tENUM", - "tERRORSTATUST", "tEXPLICITHANDLE", "tEXTERN", "tFALSE", "tFASTCALL", - "tFAULTSTATUS", "tFLOAT", "tFORCEALLOCATE", "tHANDLE", "tHANDLET", - "tHELPCONTEXT", "tHELPFILE", "tHELPSTRING", "tHELPSTRINGCONTEXT", - "tHELPSTRINGDLL", "tHIDDEN", "tHYPER", "tID", "tIDEMPOTENT", "tIGNORE", - "tIIDIS", "tIMMEDIATEBIND", "tIMPLICITHANDLE", "tIMPORT", "tIMPORTLIB", - "tIN", "tIN_LINE", "tINLINE", "tINPUTSYNC", "tINT", "tINT3264", "tINT64", - "tINTERFACE", "tLCID", "tLENGTHIS", "tLIBRARY", "tLICENSED", "tLOCAL", - "tLONG", "tMAYBE", "tMESSAGE", "tMETHODS", "tMODULE", "tNOCODE", - "tNONBROWSABLE", "tNONCREATABLE", "tNONEXTENSIBLE", "tNOTIFY", - "tNOTIFYFLAG", "tNULL", "tOBJECT", "tODL", "tOLEAUTOMATION", "tOPTIMIZE", - "tOPTIONAL", "tOUT", "tPARTIALIGNORE", "tPASCAL", "tPOINTERDEFAULT", - "tPROGID", "tPROPERTIES", "tPROPGET", "tPROPPUT", "tPROPPUTREF", - "tPROXY", "tPTR", "tPUBLIC", "tRANGE", "tREADONLY", "tREF", "tREGISTER", - "tREPRESENTAS", "tREQUESTEDIT", "tRESTRICTED", "tRETVAL", "tSAFEARRAY", - "tSHORT", "tSIGNED", "tSIZEIS", "tSIZEOF", "tSMALL", "tSOURCE", - "tSTATIC", "tSTDCALL", "tSTRICTCONTEXTHANDLE", "tSTRING", "tSTRUCT", - "tSWITCH", "tSWITCHIS", "tSWITCHTYPE", "tTHREADING", "tTRANSMITAS", - "tTRUE", "tTYPEDEF", "tUIDEFAULT", "tUNION", "tUNIQUE", "tUNSIGNED", - "tUSESGETLASTERROR", "tUSERMARSHAL", "tUUID", "tV1ENUM", "tVARARG", - "tVERSION", "tVIPROGID", "tVOID", "tWCHAR", "tWIREMARSHAL", "tAPARTMENT", - "tNEUTRAL", "tSINGLE", "tFREE", "tBOTH", "','", "'?'", "':'", "'|'", - "'^'", "'&'", "'<'", "'>'", "'-'", "'+'", "'*'", "'/'", "'%'", "'!'", - "'~'", "ADDRESSOF", "NEG", "POS", "PPTR", "CAST", "'.'", "'['", "']'", - "';'", "'('", "')'", "'{'", "'}'", "'='", "$accept", "input", - "gbl_statements", "imp_statements", "int_statements", "semicolon_opt", - "statement", "typedecl", "cppquote", "import_start", "import", - "importlib", "libraryhdr", "library_start", "librarydef", "m_args", - "arg_list", "args", "arg", "array", "m_attributes", "attributes", - "attrib_list", "str_list", "attribute", "uuid_string", "callconv", - "cases", "case", "enums", "enum_list", "enum", "enumdef", "m_exprs", - "m_expr", "expr", "expr_list_int_const", "expr_int_const", "expr_const", - "fields", "field", "ne_union_field", "ne_union_fields", "union_field", - "s_field", "funcdef", "declaration", "m_ident", "t_ident", "ident", - "base_type", "m_int", "int_std", "coclass", "coclasshdr", "coclassdef", - "coclass_ints", "coclass_int", "dispinterface", "dispinterfacehdr", - "dispint_props", "dispint_meths", "dispinterfacedef", "inherit", - "interface", "interfacehdr", "interfacedef", "interfacedec", "module", - "modulehdr", "moduledef", "storage_cls_spec", "function_specifier", - "type_qualifier", "m_type_qual_list", "decl_spec", "m_decl_spec_no_type", - "decl_spec_no_type", "declarator", "direct_declarator", - "abstract_declarator", "abstract_declarator_no_direct", - "m_abstract_declarator", "abstract_direct_declarator", "any_declarator", - "any_declarator_no_direct", "m_any_declarator", "any_direct_declarator", - "declarator_list", "m_bitfield", "struct_declarator", - "struct_declarator_list", "init_declarator", "threading_type", - "pointer_type", "structdef", "type", "typedef", "uniondef", "version", 0 -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, - 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, - 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, - 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, - 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, - 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, - 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, - 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, - 425, 426, 427, 428, 429, 430, 431, 432, 433, 44, - 63, 58, 124, 94, 38, 60, 62, 45, 43, 42, - 47, 37, 33, 126, 434, 435, 436, 437, 438, 46, - 91, 93, 59, 40, 41, 123, 125, 61 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint16 yyr1[] = -{ - 0, 208, 209, 210, 210, 210, 210, 210, 210, 210, - 210, 211, 211, 211, 211, 211, 211, 211, 211, 211, - 212, 212, 213, 213, 214, 214, 214, 214, 214, 215, - 215, 215, 215, 215, 215, 215, 215, 215, 216, 217, - 218, 219, 220, 221, 222, 223, 223, 224, 224, 225, - 225, 226, 226, 227, 227, 227, 228, 228, 229, 230, - 230, 230, 231, 231, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 233, 233, 234, 234, 234, 234, 235, - 235, 236, 236, 237, 237, 237, 238, 238, 239, 239, - 240, 241, 241, 242, 242, 243, 243, 243, 243, 243, - 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, - 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, - 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, - 243, 243, 243, 243, 243, 243, 244, 244, 245, 246, - 247, 247, 248, 248, 249, 249, 250, 250, 251, 251, - 252, 253, 254, 254, 255, 255, 256, 256, 256, 257, - 257, 258, 258, 258, 258, 258, 258, 258, 258, 258, - 258, 258, 259, 259, 260, 260, 260, 260, 260, 260, - 260, 260, 261, 261, 262, 263, 264, 264, 265, 266, - 266, 267, 268, 268, 269, 269, 270, 270, 271, 271, - 272, 272, 273, 274, 274, 274, 275, 275, 276, 276, - 277, 278, 279, 279, 279, 280, 281, 282, 282, 283, - 283, 284, 284, 285, 285, 285, 286, 286, 286, 287, - 287, 287, 287, 288, 288, 288, 289, 289, 290, 290, - 291, 291, 291, 291, 291, 292, 292, 292, 293, 293, - 294, 294, 295, 295, 295, 295, 295, 295, 296, 296, - 297, 297, 298, 299, 299, 300, 300, 301, 301, 301, - 301, 301, 302, 302, 302, 303, 304, 304, 304, 304, - 304, 304, 304, 304, 304, 304, 305, 306, 306, 307, - 307 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 0, 2, 2, 3, 2, 2, 2, - 2, 0, 2, 2, 3, 2, 2, 2, 2, 2, - 0, 2, 0, 1, 1, 2, 2, 1, 2, 1, - 2, 1, 2, 1, 2, 2, 2, 2, 4, 3, - 3, 5, 2, 3, 4, 0, 1, 1, 3, 1, - 3, 3, 2, 3, 3, 2, 0, 1, 3, 1, - 3, 4, 1, 3, 0, 1, 4, 1, 1, 1, - 1, 1, 4, 4, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, - 1, 1, 4, 4, 1, 1, 1, 1, 4, 4, - 4, 4, 4, 1, 4, 1, 1, 4, 1, 4, - 1, 1, 4, 4, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, - 1, 1, 4, 4, 1, 1, 1, 1, 1, 6, - 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, - 4, 4, 4, 1, 1, 4, 4, 1, 1, 4, - 4, 4, 1, 1, 1, 1, 1, 1, 1, 0, - 2, 4, 3, 0, 2, 1, 1, 3, 3, 1, - 5, 1, 3, 0, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 5, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, - 3, 3, 5, 5, 4, 3, 1, 3, 1, 1, - 0, 2, 4, 3, 2, 2, 0, 2, 2, 1, - 3, 1, 3, 2, 0, 1, 0, 1, 1, 1, - 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, - 1, 1, 0, 1, 1, 2, 1, 2, 2, 1, - 1, 1, 2, 2, 2, 5, 0, 2, 2, 2, - 2, 2, 2, 3, 2, 3, 5, 5, 0, 2, - 2, 2, 2, 6, 8, 2, 2, 2, 2, 2, - 2, 5, 1, 1, 1, 1, 1, 0, 2, 2, - 3, 0, 1, 2, 2, 2, 3, 2, 1, 1, - 3, 2, 4, 3, 2, 1, 3, 2, 0, 1, - 3, 2, 1, 3, 4, 3, 2, 1, 3, 2, - 0, 1, 1, 3, 2, 1, 3, 4, 1, 3, - 0, 2, 2, 1, 3, 1, 3, 1, 1, 1, - 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, - 2, 1, 2, 1, 2, 4, 4, 5, 10, 1, - 3 -}; - -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint16 yydefact[] = -{ - 3, 0, 2, 1, 367, 259, 251, 270, 0, 306, - 0, 0, 258, 246, 260, 302, 257, 261, 262, 0, - 305, 264, 271, 269, 0, 262, 304, 0, 262, 0, - 266, 303, 246, 56, 246, 256, 366, 252, 64, 10, - 0, 24, 11, 27, 11, 9, 0, 369, 0, 368, - 253, 0, 0, 7, 0, 0, 22, 0, 288, 5, - 4, 0, 8, 311, 311, 311, 0, 0, 371, 311, - 0, 373, 272, 273, 0, 279, 280, 370, 248, 0, - 263, 268, 0, 290, 291, 267, 0, 265, 254, 372, - 0, 0, 57, 374, 0, 255, 65, 0, 67, 68, - 69, 70, 71, 0, 0, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 0, 85, 86, 87, 0, - 89, 90, 91, 0, 0, 94, 95, 96, 97, 0, - 0, 0, 0, 0, 103, 0, 105, 106, 0, 108, - 0, 110, 111, 114, 0, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 0, 129, - 130, 131, 0, 0, 134, 135, 136, 137, 364, 138, - 0, 140, 362, 0, 142, 143, 144, 0, 146, 147, - 148, 0, 0, 0, 0, 153, 363, 154, 0, 0, - 157, 158, 0, 0, 0, 0, 59, 162, 25, 0, - 0, 246, 0, 0, 246, 246, 0, 369, 274, 281, - 292, 300, 0, 371, 373, 26, 6, 276, 297, 0, - 23, 295, 296, 0, 0, 20, 315, 312, 314, 313, - 249, 250, 165, 166, 167, 168, 307, 0, 0, 319, - 355, 318, 243, 369, 371, 311, 373, 309, 28, 0, - 173, 39, 0, 230, 0, 0, 236, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 183, 0, 0, 0, 0, 0, 183, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, - 58, 40, 0, 17, 18, 19, 0, 15, 13, 12, - 16, 22, 370, 42, 298, 299, 372, 374, 43, 242, - 56, 0, 56, 0, 0, 289, 20, 0, 0, 0, - 317, 0, 0, 45, 321, 310, 38, 0, 175, 176, - 179, 375, 56, 348, 376, 56, 56, 0, 0, 194, - 185, 186, 187, 191, 192, 193, 188, 189, 0, 190, - 0, 0, 0, 0, 0, 0, 0, 228, 0, 226, - 229, 0, 0, 62, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 340, 0, 0, 181, 184, - 0, 0, 0, 0, 0, 0, 0, 0, 357, 358, - 359, 360, 361, 0, 0, 0, 164, 163, 0, 379, - 0, 0, 0, 60, 64, 0, 14, 44, 22, 0, - 277, 282, 0, 0, 0, 0, 0, 0, 0, 22, - 21, 0, 308, 316, 320, 356, 0, 55, 0, 0, - 49, 46, 47, 180, 174, 0, 365, 0, 231, 0, - 0, 377, 57, 237, 0, 66, 72, 0, 218, 217, - 216, 219, 214, 215, 0, 328, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, - 84, 88, 0, 92, 93, 98, 99, 100, 101, 102, - 104, 107, 109, 340, 307, 45, 345, 340, 342, 341, - 52, 337, 113, 183, 112, 128, 132, 133, 0, 141, - 145, 149, 150, 152, 151, 155, 156, 0, 159, 160, - 161, 61, 0, 275, 278, 284, 0, 283, 286, 0, - 0, 241, 287, 20, 22, 301, 54, 53, 322, 0, - 177, 178, 0, 373, 349, 244, 235, 234, 328, 225, - 307, 45, 332, 328, 329, 0, 325, 207, 208, 220, - 201, 202, 205, 206, 196, 197, 0, 198, 199, 200, - 204, 203, 210, 209, 212, 213, 211, 221, 0, 227, - 63, 51, 340, 307, 0, 340, 0, 336, 45, 344, - 182, 0, 380, 22, 240, 285, 0, 293, 50, 48, - 350, 353, 0, 233, 0, 245, 0, 328, 307, 0, - 340, 0, 324, 0, 45, 331, 0, 224, 335, 340, - 346, 339, 343, 0, 139, 41, 22, 0, 352, 0, - 232, 169, 223, 323, 340, 333, 327, 330, 222, 0, - 195, 338, 347, 294, 351, 354, 0, 326, 334, 0, - 0, 378, 170, 0, 56, 56, 239, 172, 0, 171, - 238 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 1, 2, 199, 317, 221, 420, 40, 41, 42, - 43, 294, 206, 44, 295, 429, 430, 431, 432, 496, - 413, 92, 195, 364, 196, 398, 497, 646, 652, 327, - 328, 329, 243, 377, 378, 357, 358, 359, 361, 332, - 438, 443, 336, 657, 658, 530, 48, 604, 79, 498, - 49, 81, 50, 296, 52, 297, 310, 410, 54, 55, - 312, 415, 56, 224, 57, 58, 298, 299, 211, 61, - 300, 63, 64, 65, 318, 66, 226, 67, 240, 241, - 554, 611, 555, 556, 499, 586, 500, 501, 334, 628, - 601, 602, 242, 393, 197, 244, 69, 70, 246, 400 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -509 -static const yytype_int16 yypact[] = -{ - -509, 85, 1435, -509, -509, -509, -509, -509, 73, -509, - -105, 90, -509, 205, -509, -509, -509, -509, 12, 110, - -509, -509, -509, -509, 258, 12, -509, -83, 12, 362, - -509, -509, 260, -70, 262, 362, -509, -509, 2569, -509, - -58, -509, -509, -509, -509, -509, 2253, -42, -40, -509, - -509, -31, -73, -509, -9, -68, 11, 13, -26, -509, - -509, -17, -509, 56, 56, 56, 93, 2419, 17, 56, - 21, 33, -509, -509, 170, -509, -509, -60, -509, 40, - -509, -509, 70, -509, -509, -509, 2419, -509, -509, -52, - 65, 2325, -509, -99, -97, -509, -509, 76, -509, -509, - -509, -509, -509, 78, 101, -509, -509, -509, -509, -509, - -509, -509, -509, -509, -509, 113, -509, -509, -509, 117, - -509, -509, -509, 123, 128, -509, -509, -509, -509, 130, - 133, 134, 135, 136, -509, 137, -509, -509, 138, -509, - 140, -509, -509, 141, 144, -509, -509, -509, -509, -509, - -509, -509, -509, -509, -509, -509, -509, -509, 145, -509, - -509, -509, 146, 147, -509, -509, -509, -509, -509, -509, - 148, -509, -509, 151, -509, -509, -509, 169, -509, -509, - -509, 173, 174, 175, 177, -509, -509, -509, 179, 180, - -509, -509, 182, 185, 188, -121, -509, -509, -509, 1308, - 495, 274, 342, 285, 289, 303, 189, 191, -509, -509, - -509, -509, 93, 194, 195, -509, -509, -509, -509, -59, - -509, -509, -509, 305, 193, -509, -509, -509, -509, -509, - -509, -509, -509, -509, -509, -509, -509, 93, 93, -509, - 139, -57, -509, -509, -509, 56, -509, -509, -509, 196, - 325, -509, 198, -509, 93, 201, -509, 399, 325, 821, - 821, 400, 401, 821, 821, 404, 406, 821, 409, 821, - 821, 1854, 821, 821, 411, -78, 414, 821, 2419, 821, - 821, 2419, 9, 2419, 2419, 143, 420, 418, 2419, 2569, - 228, -509, 226, -509, -509, -509, 230, -509, -509, -509, - -509, 11, 229, -509, -509, -509, 229, -92, -509, -509, - -128, 252, -81, 233, 231, -509, -509, 596, 71, 234, - -509, 821, 1110, 1854, -509, -509, -509, 235, 263, -509, - 232, -509, -84, -509, 264, -70, -71, 241, 256, -509, - -509, -509, -509, -509, -509, -509, -509, -509, 253, -509, - 821, 821, 821, 821, 821, 821, 1039, 2065, -134, -509, - 2065, 261, 265, -509, -117, 266, 267, 268, 269, 270, - 271, 272, 1231, 273, 2325, 87, 276, -93, -509, 2065, - 277, 278, 280, 283, 281, -87, 1852, 287, -509, -509, - -509, -509, -509, 288, 290, 291, -509, -509, 292, 279, - 296, 297, 298, -509, 2569, 459, -509, -509, 11, -19, - -509, -509, 306, 2325, 301, 925, 299, 379, 710, 11, - -509, 2325, -509, -509, -509, -509, 1143, -509, 433, 302, - 310, -509, -509, -509, 325, 821, -509, 2325, -509, 93, - 307, -509, 308, -509, 311, -509, -509, 2325, 22, 22, - 22, 22, 22, 22, 1924, -21, 821, 821, 511, 821, - 821, 821, 821, 821, 821, 821, 821, 821, 821, 821, - 821, 821, 821, 821, 821, 821, 512, 821, 821, -509, - -509, -509, 508, -509, -509, -509, -509, -509, -509, -509, - -509, -509, -509, 87, -509, 1562, -509, 87, -509, -509, - -509, -39, -509, 821, -509, -509, -509, -509, 821, -509, - -509, -509, -509, -509, -509, -509, -509, 513, -509, -509, - -509, -509, 313, -509, -509, -509, 93, -509, -509, 2325, - 318, -509, -509, -509, 11, -509, -509, -509, -509, 1760, - -509, -509, 87, 319, -509, 325, -509, -509, -21, -509, - -509, 1688, -509, -21, -509, 320, -23, 112, 112, -509, - 732, 732, 68, 68, 1970, 1994, 2044, 1076, 2082, 1018, - 68, 68, 95, 95, 22, 22, 22, -509, 1949, -509, - -509, -509, 25, -509, 321, 87, 323, -509, 1854, -509, - -509, 327, -509, 11, -509, -509, 811, -509, -509, -509, - 348, -509, -114, -509, 317, -509, 328, 341, -509, 329, - 87, 332, -509, 821, 1854, -509, 821, -509, -509, 25, - -509, -509, -509, 335, -509, -509, 11, 821, -509, 87, - -509, -509, -509, -509, 25, -509, -509, -509, 22, 336, - 2065, -509, -509, -509, -509, -509, -10, -509, -509, 821, - 364, -509, -509, 365, -136, -136, -509, -509, 345, -509, - -509 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -509, -509, -509, 504, -304, -296, 41, -509, -509, -509, - 149, -509, -509, -509, 548, -462, -509, -509, -264, -221, - -27, -2, -509, -509, -268, -509, -65, -509, -509, -509, - -509, 119, 2, 286, 48, -104, -509, -254, -252, -509, - -509, -509, -509, -100, -197, -509, 153, -509, 39, -47, - -509, 142, 105, 58, -509, 555, -509, -509, 516, -509, - -509, -509, -509, -509, -24, -509, 556, 1, -509, -509, - 557, -509, -509, -309, -450, -32, -14, -33, -213, -509, - -509, -509, -506, -509, -508, -509, -179, -509, -509, -509, - -56, -509, 352, -509, 294, 6, -51, -509, 0, -509 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -248 -static const yytype_int16 yytable[] = -{ - 46, 238, 71, 60, 47, 407, 91, 373, 68, 422, - 366, 365, 418, 369, 212, 371, 245, 232, 376, 239, - 324, 403, 210, 383, 319, 320, 412, 649, 230, 231, - 227, 227, 227, 584, 600, 252, 227, 458, 11, 24, - 650, 333, 606, 39, 582, 478, 214, 612, 207, 233, - 228, 229, 213, 168, -247, 247, 255, 172, 289, 254, - 51, -247, 482, 232, 38, 629, 656, 311, 9, 425, - 479, 90, 38, 94, 230, 231, 72, 73, 408, 24, - 290, 456, 457, 458, 186, 3, 503, 483, 630, 609, - 230, 231, 503, 75, 76, 233, 230, 231, 74, 9, - 607, 633, 234, -34, 208, 423, -247, 80, 256, 232, - 458, 504, 523, -247, 9, 414, 38, 510, 82, 38, - 86, 600, 436, 535, 15, 232, 623, 458, 235, 38, - 38, 232, 217, 619, 88, 441, 521, 219, 440, 444, - 95, 233, -30, 322, 198, -247, 323, 238, 234, 20, - -32, 396, 639, -247, 397, 223, 360, 233, 634, 360, - -29, 322, 215, 233, 588, 239, 372, 85, 550, 379, - 87, 216, 238, 238, 235, 379, 386, 322, 249, 322, - 614, 541, 551, 388, 389, 390, 391, 392, 225, 238, - 239, 239, 26, 218, 234, 313, 651, 46, 46, 71, - 71, 47, 47, 330, 31, 68, 68, 239, 77, 78, - 234, 338, 227, 220, 494, 222, 234, 360, 428, -31, - 235, 476, 477, 248, 579, 322, 544, 384, 495, 596, - 387, 325, 394, 395, 552, -33, 235, 402, 597, 375, - 293, 293, 235, 90, 94, 250, 448, 449, 450, 451, - 452, 453, 454, 238, 591, 471, 472, 473, 474, 475, - 236, 83, 84, 89, 78, 93, 78, 476, 477, 374, - 253, 239, 251, 422, 237, 599, 494, 302, 78, 257, - 589, 258, 236, 409, 473, 474, 475, 322, 304, 305, - 495, 375, 306, 78, 476, 477, 237, 625, 422, 471, - 472, 473, 474, 475, 259, 437, 307, 78, 314, 315, - 422, 476, 477, 594, 581, 421, 260, 71, 587, 47, - 261, 374, 451, 68, 455, 422, 262, 552, 230, 231, - 643, 263, 552, 264, 442, 615, 265, 266, 267, 268, - 269, 270, 493, 271, 272, 303, 321, 273, 274, 275, - 276, 277, 557, 558, 278, 560, 561, 562, 563, 564, - 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, - 575, 576, 279, 578, 238, 644, 280, 281, 282, 232, - 283, 526, 284, 285, 9, 286, 552, 330, 287, 212, - 553, 288, 239, -35, 308, 653, -36, -37, 316, 379, - 326, 7, 331, 618, 335, 542, 621, 337, 362, 363, - 524, 233, 367, 529, 368, 548, 421, 370, 71, 380, - 47, 214, 382, 207, 68, 399, 401, 213, 404, 405, - 585, 636, 406, 411, -247, 416, 417, 543, 424, 435, - 641, 433, 434, 439, 18, 445, 456, 457, 458, 459, - 460, 461, 462, 463, 464, 647, 447, 21, 22, 23, - 446, 238, 508, 375, 234, 480, 25, 522, 19, 481, - 484, 485, 486, 487, 488, 489, 490, 492, 517, 239, - 502, 505, 506, 553, 507, 509, 610, 525, 553, 539, - 235, 512, 513, 374, 514, 515, 516, 212, 605, 4, - 518, 519, 520, 527, 28, 532, 538, 375, 30, 638, - 546, 545, 640, 547, 559, 577, 580, 593, 592, 375, - 595, 603, 631, 360, 613, 620, 5, 622, 6, 627, - 550, 624, 632, 635, 7, 8, 637, 374, 9, 642, - 648, 322, 553, 10, 551, 654, 655, 660, 200, 374, - 45, 590, 11, 540, 12, 659, 375, 53, 59, 62, - 13, 14, 209, 15, 309, 385, 533, 16, 531, 381, - 17, 0, 0, 645, 0, 0, 0, 18, 0, 0, - 0, 0, 375, 0, 19, 292, 374, 0, 20, 0, - 21, 22, 23, 24, 421, 0, 71, 0, 47, 25, - 4, 0, 68, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 374, 465, 0, 466, 467, 468, 469, 470, - 471, 472, 473, 474, 475, 0, 0, 5, 0, 6, - 0, 26, 476, 477, 537, 7, 27, 28, 29, 9, - 0, 30, 0, 31, 10, 0, 0, 32, 0, 0, - 0, 0, 0, 0, 33, 12, 34, 0, 35, 0, - 0, 13, 14, 0, 15, 0, 36, 37, 16, 0, - 0, 17, 0, 0, 0, 0, 0, 0, 18, 0, - 0, 0, 0, 0, 0, 19, 0, 0, 0, 20, - 0, 21, 22, 23, 0, 38, 0, 0, 0, 0, - 25, 301, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 26, 0, 0, 0, 0, 27, 28, 29, - 0, 5, 30, 6, 31, 456, 457, 458, 32, 7, - 461, 462, 0, 9, 0, 33, 0, 34, 10, 35, - 0, 0, 0, 0, 0, 0, 0, 36, 37, 12, - 0, 0, 0, 0, 0, 13, 14, 0, 15, 0, - 0, 0, 16, 0, 0, 17, 0, 0, 0, 0, - 0, 0, 18, 0, 0, 0, 38, 0, 0, 19, - 0, 0, 419, 20, 0, 21, 22, 23, 0, 0, - 0, 0, 0, 0, 25, 4, 0, 0, 0, 0, - 0, 0, 0, 0, 339, 0, 340, 341, 342, 343, - 344, 345, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 5, 0, 6, 0, 26, 0, 0, 0, - 7, 27, 28, 29, 9, 0, 30, 0, 31, 10, - 0, 0, 32, 0, 0, 0, 0, 0, 0, 33, - 12, 34, 0, 35, 0, 0, 13, 14, 0, 15, - 0, 36, 37, 16, 0, 0, 17, 0, 0, 0, - 346, 0, 0, 18, 0, 0, 0, 0, 0, 0, - 19, 0, 0, 0, 20, 0, 21, 22, 23, 0, - 38, 0, 0, 0, 0, 25, 534, 469, 470, 471, - 472, 473, 474, 475, 0, 0, 0, 0, 0, 4, - 0, 476, 477, 0, 0, 0, 347, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, - 0, 0, 27, 28, 29, 0, 5, 30, 6, 31, - 0, 0, 0, 32, 7, 0, 348, 0, 9, 0, - 33, 0, 34, 0, 35, 0, 0, 0, 0, 349, - 0, 0, 36, 37, 12, 0, 0, 0, 0, 0, - 201, 14, 0, 15, 0, 0, 0, 16, 0, 0, - 17, 0, 0, 0, 0, 350, 0, 18, 351, 352, - 353, 38, 0, 354, 355, 0, 0, 626, 20, 0, - 21, 22, 23, 0, 356, 0, 0, 0, 0, 25, - 0, 456, 457, 458, 459, 460, 461, 462, 0, 0, - 0, 0, 339, 4, 340, 341, 342, 343, 344, 345, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 26, 0, 0, 0, 0, 27, 28, 29, 0, - 5, 30, 6, 31, 0, 0, 0, 204, 7, 0, - 0, 0, 9, 0, 0, 0, 205, 0, 35, 456, - 457, 458, 459, 460, 461, 462, 36, 37, 12, 0, - 0, 0, 0, 0, 201, 14, 0, 15, 346, 0, - 0, 16, 0, 339, 17, 340, 341, 342, 343, 344, - 345, 18, 0, 0, 0, 38, 0, 0, 0, 0, - 0, 528, 20, 0, 21, 22, 23, 0, 0, 0, - 0, 0, 0, 25, 0, 0, 339, 0, 340, 341, - 342, 343, 344, 345, 347, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 26, 0, 0, 0, 346, - 27, 28, 29, 0, 348, 30, 0, 31, 0, 0, - 0, 204, 0, 0, 0, 0, 0, 349, 0, 0, - 205, 0, 35, 469, 470, 471, 472, 473, 474, 475, - 36, 37, 346, 0, 0, 0, 0, 476, 477, 0, - 0, 0, 0, 350, 0, 347, 351, 352, 353, 0, - 0, 354, 355, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 356, 0, 456, 457, 458, 459, 460, 461, - 462, 463, 464, 0, 0, 348, 0, 0, 347, 467, - 468, 469, 470, 471, 472, 473, 474, 475, 349, 0, - 0, 0, 0, 0, 0, 476, 477, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 348, 0, - 0, 0, 0, 0, 350, 0, 0, 351, 352, 426, - 0, 349, 354, 355, 0, 0, 0, 0, 0, 0, - 0, 427, 4, 356, 0, 0, 0, 0, 0, 0, - 291, 0, 0, 0, 0, 0, 0, 350, 0, 0, - 351, 352, 353, 0, 0, 354, 355, 0, 0, 5, - 0, 6, 0, 0, 536, 0, 356, 7, 8, 0, - 0, 9, 0, 0, 0, 0, 10, 0, 0, 0, - 0, 0, 0, 0, 0, 11, 0, 12, 0, 0, - 0, 0, 0, 13, 14, 0, 15, 0, 0, 0, - 16, 0, 0, 17, 0, 0, 0, 0, 0, 0, - 18, 0, 0, 0, 0, 0, 0, 19, 292, 0, - 0, 20, 0, 21, 22, 23, 24, 0, 0, 0, - 0, 465, 25, 466, 467, 468, 469, 470, 471, 472, - 473, 474, 475, 0, 0, 0, 0, 0, 0, 0, - 476, 477, 0, 0, 0, 491, 0, 0, 0, 4, - 0, 0, 0, 0, 26, 0, 0, 0, 0, 27, - 28, 29, 0, 0, 30, 0, 31, 0, 0, 0, - 32, 0, 0, 0, 0, 0, 5, 33, 6, 34, - 0, 35, 0, 0, 7, 8, 0, 0, 9, 36, - 37, 0, 0, 10, 0, 0, 0, 0, 0, 0, - 0, 0, 11, 0, 12, 0, 0, 0, 0, 0, - 13, 14, 0, 15, 0, 0, 0, 16, 38, 0, - 17, 0, 0, 0, 0, 0, 0, 18, 0, 0, - 0, 0, 0, 0, 19, 0, 0, 0, 20, 0, - 21, 22, 23, 24, 0, 0, 0, 0, 0, 25, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, - 0, 26, 0, 0, 0, 0, 27, 28, 29, 0, - 0, 30, 0, 31, 0, 0, 0, 32, 0, 0, - 0, 0, 0, 5, 33, 6, 34, 0, 35, 0, - 232, 7, 0, 0, 0, 9, 36, 37, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 12, 0, 0, 0, 0, 0, 201, 14, 0, - 15, 0, 233, 0, 16, 38, 0, 17, 0, 0, - 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 20, 0, 21, 22, 23, - 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 234, 0, 0, 0, 0, - 0, 0, 4, 0, 0, 0, 0, 0, 26, 0, - 0, 0, 0, 27, 28, 29, 0, 0, 30, 0, - 31, 235, 0, 0, 204, 0, 0, 0, 0, 5, - 0, 6, 0, 205, 0, 35, 232, 7, 0, 0, - 0, 9, 0, 36, 37, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, - 0, 583, 0, 201, 14, 0, 15, 0, 233, 0, - 16, 0, 38, 17, 4, 0, 0, 0, 0, 0, - 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 20, 598, 21, 22, 23, 0, 0, 0, 0, - 0, 5, 25, 6, 0, 0, 0, 0, 0, 7, - 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, - 0, 234, 0, 0, 0, 0, 0, 0, 0, 12, - 0, 0, 0, 0, 26, 201, 14, 0, 15, 27, - 28, 29, 16, 0, 30, 17, 31, 235, 0, 0, - 204, 0, 18, 0, 0, 0, 0, 0, 0, 205, - 0, 35, 0, 20, 0, 21, 22, 23, 4, 36, - 37, 0, 0, 0, 25, 456, 457, 458, 459, 460, - 461, 462, 463, 464, 0, 0, 0, 608, 0, 0, - 0, 0, 0, 0, 0, 5, 0, 6, 38, 0, - 0, 0, 0, 7, 0, 0, 26, 9, 0, 0, - 0, 27, 28, 29, 0, 0, 30, 0, 31, 0, - 0, 0, 204, 12, 0, 0, 0, 0, 0, 201, - 14, 205, 15, 35, 0, 0, 16, 0, 0, 17, - 0, 36, 37, 0, 0, 0, 18, 456, 457, 458, - 459, 460, 461, 462, 463, 464, 0, 20, 0, 21, - 22, 23, 0, 0, 0, 0, 0, 0, 25, 0, - 38, 0, 456, 457, 458, 459, 460, 461, 462, 463, - 464, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 456, 457, 458, 459, 460, 461, 462, - 26, 464, 0, 0, 0, 27, 28, 29, 0, 0, - 30, 0, 31, 0, 0, 0, 204, 456, 457, 458, - 459, 460, 461, 462, 0, 205, 0, 35, 0, 0, - 0, 0, 0, 0, 0, 36, 37, 0, 0, 0, - 0, 0, 465, 0, 466, 467, 468, 469, 470, 471, - 472, 473, 474, 475, 0, 0, 0, 0, 0, 0, - 0, 476, 477, 0, 38, 0, 511, 456, 457, 458, - 459, 460, 461, 462, 463, 464, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 456, 457, - 458, 459, 460, 461, 462, 463, 464, 0, 0, 0, - 0, 0, 0, 0, 0, 456, 457, 458, 459, 460, - 461, 462, 0, 0, 465, 0, 466, 467, 468, 469, - 470, 471, 472, 473, 474, 475, 0, 0, 0, 0, - 0, 0, 0, 476, 477, 0, 0, 0, 549, 465, - 0, 466, 467, 468, 469, 470, 471, 472, 473, 474, - 475, 0, 0, 0, 0, 0, 0, 0, 476, 477, - 617, 0, 466, 467, 468, 469, 470, 471, 472, 473, - 474, 475, 0, 0, 0, 0, 0, 0, 0, 476, - 477, 0, 0, 0, 0, 0, 466, 467, 468, 469, - 470, 471, 472, 473, 474, 475, 0, 0, 0, 0, - 0, 0, 0, 476, 477, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 465, 616, 466, 467, 468, 469, - 470, 471, 472, 473, 474, 475, 0, 0, 0, 0, - 0, 0, 0, 476, 477, 465, 0, 466, 467, 468, - 469, 470, 471, 472, 473, 474, 475, 4, 0, 0, - 0, 0, 0, 0, 476, 477, 468, 469, 470, 471, - 472, 473, 474, 475, 0, 0, 0, 0, 0, 0, - 0, 476, 477, 0, 5, 0, 6, 0, 0, 0, - 0, 0, 7, 8, 0, 0, 9, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 11, 0, 12, 0, 0, 0, 0, 0, 201, 14, - 0, 15, 0, 0, 0, 16, 0, 0, 17, 4, - 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 20, 0, 21, 22, - 23, 24, 0, 0, 202, 0, 5, 25, 6, 0, - 0, 203, 0, 0, 7, 0, 0, 0, 9, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 12, 0, 0, 0, 0, 26, - 201, 14, 0, 15, 27, 28, 29, 16, 0, 30, - 17, 31, 0, 0, 0, 204, 0, 18, 0, 0, - 0, 0, 0, 0, 205, 0, 35, 0, 20, 0, - 21, 22, 23, 4, 36, 37, 0, 0, 0, 25, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 5, 0, 6, 0, 0, 0, 0, 0, 7, 0, - 0, 26, 0, 0, 0, 0, 27, 28, 29, 0, - 0, 30, 0, 31, 0, 0, 0, 204, 12, 0, - 0, 0, 0, 0, 201, 14, 205, 0, 35, 0, - 0, 16, 0, 0, 17, 0, 36, 37, 0, 0, - 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 21, 22, 23, 0, 0, 0, - 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 27, 28, 29, 0, 0, 30, 0, 0, 0, 0, - 0, 204, 0, 0, 0, 0, 0, 0, 0, 0, - 205, 0, 35, 0, 0, 0, 0, 0, 0, 0, - 36, 37, 96, 0, 97, 98, 99, 0, 100, 101, - 0, 102, 0, 0, 103, 0, 104, 0, 0, 0, - 105, 106, 0, 107, 108, 109, 110, 0, 111, 112, - 113, 114, 115, 116, 117, 118, 0, 119, 0, 120, - 121, 122, 123, 124, 0, 0, 125, 0, 0, 0, - 126, 0, 127, 128, 0, 129, 130, 131, 132, 133, - 134, 0, 135, 136, 137, 138, 139, 140, 0, 0, - 141, 0, 0, 142, 0, 0, 0, 0, 143, 144, - 0, 145, 146, 0, 147, 148, 0, 0, 149, 150, - 151, 152, 153, 154, 0, 155, 156, 157, 158, 159, - 160, 161, 0, 162, 163, 0, 164, 165, 166, 167, - 168, 169, 170, 171, 172, 0, 173, 174, 175, 176, - 0, 0, 0, 177, 0, 0, 178, 0, 0, 179, - 180, 0, 0, 181, 182, 183, 184, 0, 0, 185, - 0, 186, 0, 187, 188, 189, 190, 191, 192, 193, - 0, 0, 194 -}; - -static const yytype_int16 yycheck[] = -{ - 2, 66, 2, 2, 2, 301, 33, 271, 2, 318, - 264, 263, 316, 267, 46, 269, 67, 38, 272, 66, - 241, 289, 46, 277, 237, 238, 107, 37, 3, 4, - 63, 64, 65, 495, 542, 86, 69, 15, 57, 98, - 50, 254, 548, 2, 494, 179, 46, 553, 46, 70, - 64, 65, 46, 131, 153, 69, 153, 135, 179, 91, - 2, 153, 179, 38, 200, 179, 202, 126, 43, 321, - 204, 32, 200, 34, 3, 4, 3, 4, 206, 98, - 201, 13, 14, 15, 162, 0, 179, 204, 202, 551, - 3, 4, 179, 3, 4, 70, 3, 4, 203, 43, - 550, 607, 123, 202, 46, 318, 205, 95, 205, 38, - 15, 204, 408, 205, 43, 312, 200, 204, 8, 200, - 203, 629, 206, 419, 68, 38, 588, 15, 149, 200, - 200, 38, 205, 583, 29, 206, 404, 205, 335, 336, - 35, 70, 202, 200, 202, 205, 203, 212, 123, 93, - 202, 8, 614, 205, 11, 181, 260, 70, 608, 263, - 202, 200, 202, 70, 203, 212, 270, 25, 189, 273, - 28, 202, 237, 238, 149, 279, 280, 200, 8, 200, - 203, 435, 203, 174, 175, 176, 177, 178, 205, 254, - 237, 238, 136, 202, 123, 219, 206, 199, 200, 199, - 200, 199, 200, 250, 148, 199, 200, 254, 3, 4, - 123, 258, 245, 202, 189, 202, 123, 321, 322, 202, - 149, 199, 200, 202, 478, 200, 439, 278, 203, 533, - 281, 245, 283, 284, 455, 202, 149, 288, 534, 271, - 199, 200, 149, 204, 205, 205, 350, 351, 352, 353, - 354, 355, 356, 318, 508, 187, 188, 189, 190, 191, - 189, 3, 4, 3, 4, 3, 4, 199, 200, 271, - 205, 318, 202, 582, 203, 539, 189, 3, 4, 203, - 501, 203, 189, 310, 189, 190, 191, 200, 3, 4, - 203, 323, 3, 4, 199, 200, 203, 593, 607, 187, - 188, 189, 190, 191, 203, 332, 3, 4, 3, 4, - 619, 199, 200, 526, 493, 317, 203, 317, 497, 317, - 203, 323, 426, 317, 356, 634, 203, 548, 3, 4, - 626, 203, 553, 203, 336, 556, 203, 203, 203, 203, - 203, 203, 374, 203, 203, 3, 207, 203, 203, 203, - 203, 203, 456, 457, 203, 459, 460, 461, 462, 463, - 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, - 474, 475, 203, 477, 439, 627, 203, 203, 203, 38, - 203, 413, 203, 203, 43, 203, 607, 434, 203, 421, - 455, 203, 439, 202, 205, 649, 202, 202, 205, 503, - 204, 39, 204, 582, 203, 437, 585, 8, 8, 8, - 409, 70, 8, 415, 8, 447, 418, 8, 418, 8, - 418, 421, 8, 421, 418, 5, 8, 421, 200, 203, - 495, 610, 202, 181, 205, 202, 205, 437, 204, 207, - 619, 206, 179, 179, 82, 204, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 634, 203, 95, 96, 97, - 204, 526, 179, 495, 123, 204, 104, 8, 89, 204, - 204, 204, 204, 204, 204, 204, 204, 204, 199, 526, - 204, 204, 204, 548, 204, 204, 551, 181, 553, 179, - 149, 204, 204, 495, 204, 204, 204, 529, 545, 4, - 204, 204, 204, 202, 142, 206, 204, 539, 146, 613, - 202, 204, 616, 202, 3, 3, 8, 204, 5, 551, - 202, 202, 205, 627, 204, 204, 31, 204, 33, 181, - 189, 204, 204, 204, 39, 40, 204, 539, 43, 204, - 204, 200, 607, 48, 203, 181, 181, 202, 44, 551, - 2, 503, 57, 434, 59, 655, 588, 2, 2, 2, - 65, 66, 46, 68, 212, 279, 417, 72, 415, 275, - 75, -1, -1, 629, -1, -1, -1, 82, -1, -1, - -1, -1, 614, -1, 89, 90, 588, -1, 93, -1, - 95, 96, 97, 98, 596, -1, 596, -1, 596, 104, - 4, -1, 596, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 614, 180, -1, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, -1, -1, 31, -1, 33, - -1, 136, 199, 200, 201, 39, 141, 142, 143, 43, - -1, 146, -1, 148, 48, -1, -1, 152, -1, -1, - -1, -1, -1, -1, 159, 59, 161, -1, 163, -1, - -1, 65, 66, -1, 68, -1, 171, 172, 72, -1, - -1, 75, -1, -1, -1, -1, -1, -1, 82, -1, - -1, -1, -1, -1, -1, 89, -1, -1, -1, 93, - -1, 95, 96, 97, -1, 200, -1, -1, -1, -1, - 104, 206, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 136, -1, -1, -1, -1, 141, 142, 143, - -1, 31, 146, 33, 148, 13, 14, 15, 152, 39, - 18, 19, -1, 43, -1, 159, -1, 161, 48, 163, - -1, -1, -1, -1, -1, -1, -1, 171, 172, 59, - -1, -1, -1, -1, -1, 65, 66, -1, 68, -1, - -1, -1, 72, -1, -1, 75, -1, -1, -1, -1, - -1, -1, 82, -1, -1, -1, 200, -1, -1, 89, - -1, -1, 206, 93, -1, 95, 96, 97, -1, -1, - -1, -1, -1, -1, 104, 4, -1, -1, -1, -1, - -1, -1, -1, -1, 3, -1, 5, 6, 7, 8, - 9, 10, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 31, -1, 33, -1, 136, -1, -1, -1, - 39, 141, 142, 143, 43, -1, 146, -1, 148, 48, - -1, -1, 152, -1, -1, -1, -1, -1, -1, 159, - 59, 161, -1, 163, -1, -1, 65, 66, -1, 68, - -1, 171, 172, 72, -1, -1, 75, -1, -1, -1, - 69, -1, -1, 82, -1, -1, -1, -1, -1, -1, - 89, -1, -1, -1, 93, -1, 95, 96, 97, -1, - 200, -1, -1, -1, -1, 104, 206, 185, 186, 187, - 188, 189, 190, 191, -1, -1, -1, -1, -1, 4, - -1, 199, 200, -1, -1, -1, 115, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 136, -1, -1, - -1, -1, 141, 142, 143, -1, 31, 146, 33, 148, - -1, -1, -1, 152, 39, -1, 145, -1, 43, -1, - 159, -1, 161, -1, 163, -1, -1, -1, -1, 158, - -1, -1, 171, 172, 59, -1, -1, -1, -1, -1, - 65, 66, -1, 68, -1, -1, -1, 72, -1, -1, - 75, -1, -1, -1, -1, 184, -1, 82, 187, 188, - 189, 200, -1, 192, 193, -1, -1, 206, 93, -1, - 95, 96, 97, -1, 203, -1, -1, -1, -1, 104, - -1, 13, 14, 15, 16, 17, 18, 19, -1, -1, - -1, -1, 3, 4, 5, 6, 7, 8, 9, 10, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 136, -1, -1, -1, -1, 141, 142, 143, -1, - 31, 146, 33, 148, -1, -1, -1, 152, 39, -1, - -1, -1, 43, -1, -1, -1, 161, -1, 163, 13, - 14, 15, 16, 17, 18, 19, 171, 172, 59, -1, - -1, -1, -1, -1, 65, 66, -1, 68, 69, -1, - -1, 72, -1, 3, 75, 5, 6, 7, 8, 9, - 10, 82, -1, -1, -1, 200, -1, -1, -1, -1, - -1, 206, 93, -1, 95, 96, 97, -1, -1, -1, - -1, -1, -1, 104, -1, -1, 3, -1, 5, 6, - 7, 8, 9, 10, 115, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 136, -1, -1, -1, 69, - 141, 142, 143, -1, 145, 146, -1, 148, -1, -1, - -1, 152, -1, -1, -1, -1, -1, 158, -1, -1, - 161, -1, 163, 185, 186, 187, 188, 189, 190, 191, - 171, 172, 69, -1, -1, -1, -1, 199, 200, -1, - -1, -1, -1, 184, -1, 115, 187, 188, 189, -1, - -1, 192, 193, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 203, -1, 13, 14, 15, 16, 17, 18, - 19, 20, 21, -1, -1, 145, -1, -1, 115, 183, - 184, 185, 186, 187, 188, 189, 190, 191, 158, -1, - -1, -1, -1, -1, -1, 199, 200, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 145, -1, - -1, -1, -1, -1, 184, -1, -1, 187, 188, 189, - -1, 158, 192, 193, -1, -1, -1, -1, -1, -1, - -1, 201, 4, 203, -1, -1, -1, -1, -1, -1, - 12, -1, -1, -1, -1, -1, -1, 184, -1, -1, - 187, 188, 189, -1, -1, 192, 193, -1, -1, 31, - -1, 33, -1, -1, 201, -1, 203, 39, 40, -1, - -1, 43, -1, -1, -1, -1, 48, -1, -1, -1, - -1, -1, -1, -1, -1, 57, -1, 59, -1, -1, - -1, -1, -1, 65, 66, -1, 68, -1, -1, -1, - 72, -1, -1, 75, -1, -1, -1, -1, -1, -1, - 82, -1, -1, -1, -1, -1, -1, 89, 90, -1, - -1, 93, -1, 95, 96, 97, 98, -1, -1, -1, - -1, 180, 104, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, - 199, 200, -1, -1, -1, 204, -1, -1, -1, 4, - -1, -1, -1, -1, 136, -1, -1, -1, -1, 141, - 142, 143, -1, -1, 146, -1, 148, -1, -1, -1, - 152, -1, -1, -1, -1, -1, 31, 159, 33, 161, - -1, 163, -1, -1, 39, 40, -1, -1, 43, 171, - 172, -1, -1, 48, -1, -1, -1, -1, -1, -1, - -1, -1, 57, -1, 59, -1, -1, -1, -1, -1, - 65, 66, -1, 68, -1, -1, -1, 72, 200, -1, - 75, -1, -1, -1, -1, -1, -1, 82, -1, -1, - -1, -1, -1, -1, 89, -1, -1, -1, 93, -1, - 95, 96, 97, 98, -1, -1, -1, -1, -1, 104, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 4, -1, -1, -1, - -1, 136, -1, -1, -1, -1, 141, 142, 143, -1, - -1, 146, -1, 148, -1, -1, -1, 152, -1, -1, - -1, -1, -1, 31, 159, 33, 161, -1, 163, -1, - 38, 39, -1, -1, -1, 43, 171, 172, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 59, -1, -1, -1, -1, -1, 65, 66, -1, - 68, -1, 70, -1, 72, 200, -1, 75, -1, -1, - -1, -1, -1, -1, 82, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 93, -1, 95, 96, 97, - -1, -1, -1, -1, -1, -1, 104, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 123, -1, -1, -1, -1, - -1, -1, 4, -1, -1, -1, -1, -1, 136, -1, - -1, -1, -1, 141, 142, 143, -1, -1, 146, -1, - 148, 149, -1, -1, 152, -1, -1, -1, -1, 31, - -1, 33, -1, 161, -1, 163, 38, 39, -1, -1, - -1, 43, -1, 171, 172, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, - -1, 189, -1, 65, 66, -1, 68, -1, 70, -1, - 72, -1, 200, 75, 4, -1, -1, -1, -1, -1, - 82, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 93, 22, 95, 96, 97, -1, -1, -1, -1, - -1, 31, 104, 33, -1, -1, -1, -1, -1, 39, - -1, -1, -1, 43, -1, -1, -1, -1, -1, -1, - -1, 123, -1, -1, -1, -1, -1, -1, -1, 59, - -1, -1, -1, -1, 136, 65, 66, -1, 68, 141, - 142, 143, 72, -1, 146, 75, 148, 149, -1, -1, - 152, -1, 82, -1, -1, -1, -1, -1, -1, 161, - -1, 163, -1, 93, -1, 95, 96, 97, 4, 171, - 172, -1, -1, -1, 104, 13, 14, 15, 16, 17, - 18, 19, 20, 21, -1, -1, -1, 189, -1, -1, - -1, -1, -1, -1, -1, 31, -1, 33, 200, -1, - -1, -1, -1, 39, -1, -1, 136, 43, -1, -1, - -1, 141, 142, 143, -1, -1, 146, -1, 148, -1, - -1, -1, 152, 59, -1, -1, -1, -1, -1, 65, - 66, 161, 68, 163, -1, -1, 72, -1, -1, 75, - -1, 171, 172, -1, -1, -1, 82, 13, 14, 15, - 16, 17, 18, 19, 20, 21, -1, 93, -1, 95, - 96, 97, -1, -1, -1, -1, -1, -1, 104, -1, - 200, -1, 13, 14, 15, 16, 17, 18, 19, 20, - 21, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 13, 14, 15, 16, 17, 18, 19, - 136, 21, -1, -1, -1, 141, 142, 143, -1, -1, - 146, -1, 148, -1, -1, -1, 152, 13, 14, 15, - 16, 17, 18, 19, -1, 161, -1, 163, -1, -1, - -1, -1, -1, -1, -1, 171, 172, -1, -1, -1, - -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, - -1, 199, 200, -1, 200, -1, 204, 13, 14, 15, - 16, 17, 18, 19, 20, 21, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 13, 14, - 15, 16, 17, 18, 19, 20, 21, -1, -1, -1, - -1, -1, -1, -1, -1, 13, 14, 15, 16, 17, - 18, 19, -1, -1, 180, -1, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, - -1, -1, -1, 199, 200, -1, -1, -1, 204, 180, - -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, - 191, -1, -1, -1, -1, -1, -1, -1, 199, 200, - 201, -1, 182, 183, 184, 185, 186, 187, 188, 189, - 190, 191, -1, -1, -1, -1, -1, -1, -1, 199, - 200, -1, -1, -1, -1, -1, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, - -1, -1, -1, 199, 200, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 180, 181, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, - -1, -1, -1, 199, 200, 180, -1, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 4, -1, -1, - -1, -1, -1, -1, 199, 200, 184, 185, 186, 187, - 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, - -1, 199, 200, -1, 31, -1, 33, -1, -1, -1, - -1, -1, 39, 40, -1, -1, 43, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 57, -1, 59, -1, -1, -1, -1, -1, 65, 66, - -1, 68, -1, -1, -1, 72, -1, -1, 75, 4, - -1, -1, -1, -1, -1, 82, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 93, -1, 95, 96, - 97, 98, -1, -1, 101, -1, 31, 104, 33, -1, - -1, 108, -1, -1, 39, -1, -1, -1, 43, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 59, -1, -1, -1, -1, 136, - 65, 66, -1, 68, 141, 142, 143, 72, -1, 146, - 75, 148, -1, -1, -1, 152, -1, 82, -1, -1, - -1, -1, -1, -1, 161, -1, 163, -1, 93, -1, - 95, 96, 97, 4, 171, 172, -1, -1, -1, 104, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 31, -1, 33, -1, -1, -1, -1, -1, 39, -1, - -1, 136, -1, -1, -1, -1, 141, 142, 143, -1, - -1, 146, -1, 148, -1, -1, -1, 152, 59, -1, - -1, -1, -1, -1, 65, 66, 161, -1, 163, -1, - -1, 72, -1, -1, 75, -1, 171, 172, -1, -1, - -1, 82, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 95, 96, 97, -1, -1, -1, - -1, -1, -1, 104, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 141, 142, 143, -1, -1, 146, -1, -1, -1, -1, - -1, 152, -1, -1, -1, -1, -1, -1, -1, -1, - 161, -1, 163, -1, -1, -1, -1, -1, -1, -1, - 171, 172, 23, -1, 25, 26, 27, -1, 29, 30, - -1, 32, -1, -1, 35, -1, 37, -1, -1, -1, - 41, 42, -1, 44, 45, 46, 47, -1, 49, 50, - 51, 52, 53, 54, 55, 56, -1, 58, -1, 60, - 61, 62, 63, 64, -1, -1, 67, -1, -1, -1, - 71, -1, 73, 74, -1, 76, 77, 78, 79, 80, - 81, -1, 83, 84, 85, 86, 87, 88, -1, -1, - 91, -1, -1, 94, -1, -1, -1, -1, 99, 100, - -1, 102, 103, -1, 105, 106, -1, -1, 109, 110, - 111, 112, 113, 114, -1, 116, 117, 118, 119, 120, - 121, 122, -1, 124, 125, -1, 127, 128, 129, 130, - 131, 132, 133, 134, 135, -1, 137, 138, 139, 140, - -1, -1, -1, 144, -1, -1, 147, -1, -1, 150, - 151, -1, -1, 154, 155, 156, 157, -1, -1, 160, - -1, 162, -1, 164, 165, 166, 167, 168, 169, 170, - -1, -1, 173 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint16 yystos[] = -{ - 0, 209, 210, 0, 4, 31, 33, 39, 40, 43, - 48, 57, 59, 65, 66, 68, 72, 75, 82, 89, - 93, 95, 96, 97, 98, 104, 136, 141, 142, 143, - 146, 148, 152, 159, 161, 163, 171, 172, 200, 214, - 215, 216, 217, 218, 221, 222, 229, 240, 254, 258, - 260, 261, 262, 263, 266, 267, 270, 272, 273, 274, - 275, 277, 278, 279, 280, 281, 283, 285, 303, 304, - 305, 306, 3, 4, 203, 3, 4, 3, 4, 256, - 95, 259, 8, 3, 4, 259, 203, 259, 260, 3, - 256, 228, 229, 3, 256, 260, 23, 25, 26, 27, - 29, 30, 32, 35, 37, 41, 42, 44, 45, 46, - 47, 49, 50, 51, 52, 53, 54, 55, 56, 58, - 60, 61, 62, 63, 64, 67, 71, 73, 74, 76, - 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, - 88, 91, 94, 99, 100, 102, 103, 105, 106, 109, - 110, 111, 112, 113, 114, 116, 117, 118, 119, 120, - 121, 122, 124, 125, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 137, 138, 139, 140, 144, 147, 150, - 151, 154, 155, 156, 157, 160, 162, 164, 165, 166, - 167, 168, 169, 170, 173, 230, 232, 302, 202, 211, - 211, 65, 101, 108, 152, 161, 220, 240, 261, 266, - 272, 276, 283, 303, 306, 202, 202, 205, 202, 205, - 202, 213, 202, 181, 271, 205, 284, 285, 284, 284, - 3, 4, 38, 70, 123, 149, 189, 203, 234, 257, - 286, 287, 300, 240, 303, 304, 306, 284, 202, 8, - 205, 202, 304, 205, 283, 153, 205, 203, 203, 203, - 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, - 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, - 203, 203, 203, 203, 203, 203, 203, 203, 203, 179, - 201, 12, 90, 214, 219, 222, 261, 263, 274, 275, - 278, 206, 3, 3, 3, 4, 3, 3, 205, 300, - 264, 126, 268, 272, 3, 4, 205, 212, 282, 286, - 286, 207, 200, 203, 227, 284, 204, 237, 238, 239, - 257, 204, 247, 286, 296, 203, 250, 8, 257, 3, - 5, 6, 7, 8, 9, 10, 69, 115, 145, 158, - 184, 187, 188, 189, 192, 193, 203, 243, 244, 245, - 243, 246, 8, 8, 231, 246, 245, 8, 8, 245, - 8, 245, 243, 226, 229, 283, 245, 241, 242, 243, - 8, 302, 8, 245, 304, 241, 243, 304, 174, 175, - 176, 177, 178, 301, 304, 304, 8, 11, 233, 5, - 307, 8, 304, 232, 200, 203, 202, 213, 206, 228, - 265, 181, 107, 228, 252, 269, 202, 205, 212, 206, - 214, 229, 281, 286, 204, 246, 189, 201, 243, 223, - 224, 225, 226, 206, 179, 207, 206, 228, 248, 179, - 252, 206, 229, 249, 252, 204, 204, 203, 243, 243, - 243, 243, 243, 243, 243, 283, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 180, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, 199, 200, 179, 204, - 204, 204, 179, 204, 204, 204, 204, 204, 204, 204, - 204, 204, 204, 283, 189, 203, 227, 234, 257, 292, - 294, 295, 204, 179, 204, 204, 204, 204, 179, 204, - 204, 204, 204, 204, 204, 204, 204, 199, 204, 204, - 204, 232, 8, 213, 275, 181, 283, 202, 206, 229, - 253, 254, 206, 218, 206, 213, 201, 201, 204, 179, - 239, 245, 283, 306, 286, 204, 202, 202, 283, 204, - 189, 203, 227, 234, 288, 290, 291, 243, 243, 3, - 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, - 243, 243, 243, 243, 243, 243, 243, 3, 243, 245, - 8, 294, 282, 189, 223, 234, 293, 294, 203, 227, - 242, 245, 5, 204, 286, 202, 212, 213, 22, 226, - 292, 298, 299, 202, 255, 257, 290, 282, 189, 223, - 234, 289, 290, 204, 203, 227, 181, 201, 294, 282, - 204, 294, 204, 223, 204, 213, 206, 181, 297, 179, - 202, 205, 204, 290, 282, 204, 294, 204, 243, 223, - 243, 294, 204, 213, 246, 298, 235, 294, 204, 37, - 50, 206, 236, 245, 181, 181, 202, 251, 252, 251, - 202 -}; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - - -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif - - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -#ifndef YY_LOCATION_PRINT -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) -#else -# define YYLEX yylex () -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif -{ - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - switch (yytype) - { - default: - break; - } -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif -{ - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - yy_symbol_value_print (yyoutput, yytype, yyvaluep); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule) -#else -static void -yy_reduce_print (yyvsp, yyrule) - YYSTYPE *yyvsp; - int yyrule; -#endif -{ - int yynrhs = yyr2[yyrule]; - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule); \ -} while (YYID (0)) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static YYSIZE_T -yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static char * -yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into YYRESULT an error message about the unexpected token - YYCHAR while in state YYSTATE. Return the number of bytes copied, - including the terminating null byte. If YYRESULT is null, do not - copy anything; just return the number of bytes that would be - copied. As a special case, return 0 if an ordinary "syntax error" - message will do. Return YYSIZE_MAXIMUM if overflow occurs during - size calculation. */ -static YYSIZE_T -yysyntax_error (char *yyresult, int yystate, int yychar) -{ - int yyn = yypact[yystate]; - - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else - { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } - - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - - if (yysize_overflow) - return YYSIZE_MAXIMUM; - - if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } - return yysize; - } -} -#endif /* YYERROR_VERBOSE */ - - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yymsg, yytype, yyvaluep) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; -#endif -{ - YYUSE (yyvaluep); - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - switch (yytype) - { - - default: - break; - } -} - -/* Prevent warnings from -Wmissing-prototypes. */ -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - -/* The lookahead symbol. */ -int yychar; - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; - -/* Number of syntax errors so far. */ -int yynerrs; - - - -/*-------------------------. -| yyparse or yypush_parse. | -`-------------------------*/ - -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void) -#else -int -yyparse () - -#endif -#endif -{ - - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - yyssp = yyss; - yyvsp = yyvs; - - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - *++yyvsp = yylval; - - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: - -/* Line 1464 of yacc.c */ -#line 328 "parser.y" - { fix_incomplete(); - check_statements((yyvsp[(1) - (1)].stmt_list), FALSE); - check_all_user_types((yyvsp[(1) - (1)].stmt_list)); - write_header((yyvsp[(1) - (1)].stmt_list)); - write_id_data((yyvsp[(1) - (1)].stmt_list)); - write_proxies((yyvsp[(1) - (1)].stmt_list)); - write_client((yyvsp[(1) - (1)].stmt_list)); - write_server((yyvsp[(1) - (1)].stmt_list)); - write_regscript((yyvsp[(1) - (1)].stmt_list)); - write_dlldata((yyvsp[(1) - (1)].stmt_list)); - write_local_stubs((yyvsp[(1) - (1)].stmt_list)); - ;} - break; - - case 3: - -/* Line 1464 of yacc.c */ -#line 342 "parser.y" - { (yyval.stmt_list) = NULL; ;} - break; - - case 4: - -/* Line 1464 of yacc.c */ -#line 343 "parser.y" - { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_reference((yyvsp[(2) - (2)].type))); ;} - break; - - case 5: - -/* Line 1464 of yacc.c */ -#line 344 "parser.y" - { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_type_decl((yyvsp[(2) - (2)].type))); ;} - break; - - case 6: - -/* Line 1464 of yacc.c */ -#line 345 "parser.y" - { (yyval.stmt_list) = (yyvsp[(1) - (3)].stmt_list); - reg_type((yyvsp[(2) - (3)].type), (yyvsp[(2) - (3)].type)->name, 0); - ;} - break; - - case 7: - -/* Line 1464 of yacc.c */ -#line 348 "parser.y" - { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_type_decl((yyvsp[(2) - (2)].type))); - reg_type((yyvsp[(2) - (2)].type), (yyvsp[(2) - (2)].type)->name, 0); - ;} - break; - - case 8: - -/* Line 1464 of yacc.c */ -#line 351 "parser.y" - { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_module((yyvsp[(2) - (2)].type))); ;} - break; - - case 9: - -/* Line 1464 of yacc.c */ -#line 352 "parser.y" - { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_library((yyvsp[(2) - (2)].typelib))); ;} - break; - - case 10: - -/* Line 1464 of yacc.c */ -#line 353 "parser.y" - { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), (yyvsp[(2) - (2)].statement)); ;} - break; - - case 11: - -/* Line 1464 of yacc.c */ -#line 356 "parser.y" - { (yyval.stmt_list) = NULL; ;} - break; - - case 12: - -/* Line 1464 of yacc.c */ -#line 357 "parser.y" - { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_reference((yyvsp[(2) - (2)].type))); ;} - break; - - case 13: - -/* Line 1464 of yacc.c */ -#line 358 "parser.y" - { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_type_decl((yyvsp[(2) - (2)].type))); ;} - break; - - case 14: - -/* Line 1464 of yacc.c */ -#line 359 "parser.y" - { (yyval.stmt_list) = (yyvsp[(1) - (3)].stmt_list); reg_type((yyvsp[(2) - (3)].type), (yyvsp[(2) - (3)].type)->name, 0); ;} - break; - - case 15: - -/* Line 1464 of yacc.c */ -#line 360 "parser.y" - { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_type_decl((yyvsp[(2) - (2)].type))); - reg_type((yyvsp[(2) - (2)].type), (yyvsp[(2) - (2)].type)->name, 0); - ;} - break; - - case 16: - -/* Line 1464 of yacc.c */ -#line 363 "parser.y" - { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_module((yyvsp[(2) - (2)].type))); ;} - break; - - case 17: - -/* Line 1464 of yacc.c */ -#line 364 "parser.y" - { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), (yyvsp[(2) - (2)].statement)); ;} - break; - - case 18: - -/* Line 1464 of yacc.c */ -#line 365 "parser.y" - { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_importlib((yyvsp[(2) - (2)].str))); ;} - break; - - case 19: - -/* Line 1464 of yacc.c */ -#line 366 "parser.y" - { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_library((yyvsp[(2) - (2)].typelib))); ;} - break; - - case 20: - -/* Line 1464 of yacc.c */ -#line 369 "parser.y" - { (yyval.stmt_list) = NULL; ;} - break; - - case 21: - -/* Line 1464 of yacc.c */ -#line 370 "parser.y" - { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), (yyvsp[(2) - (2)].statement)); ;} - break; - - case 24: - -/* Line 1464 of yacc.c */ -#line 378 "parser.y" - { (yyval.statement) = make_statement_cppquote((yyvsp[(1) - (1)].str)); ;} - break; - - case 25: - -/* Line 1464 of yacc.c */ -#line 379 "parser.y" - { (yyval.statement) = make_statement_type_decl((yyvsp[(1) - (2)].type)); ;} - break; - - case 26: - -/* Line 1464 of yacc.c */ -#line 380 "parser.y" - { (yyval.statement) = make_statement_declaration((yyvsp[(1) - (2)].var)); ;} - break; - - case 27: - -/* Line 1464 of yacc.c */ -#line 381 "parser.y" - { (yyval.statement) = make_statement_import((yyvsp[(1) - (1)].str)); ;} - break; - - case 28: - -/* Line 1464 of yacc.c */ -#line 382 "parser.y" - { (yyval.statement) = (yyvsp[(1) - (2)].statement); ;} - break; - - case 30: - -/* Line 1464 of yacc.c */ -#line 387 "parser.y" - { (yyval.type) = type_new_enum((yyvsp[(2) - (2)].str), FALSE, NULL); ;} - break; - - case 32: - -/* Line 1464 of yacc.c */ -#line 389 "parser.y" - { (yyval.type) = type_new_struct((yyvsp[(2) - (2)].str), FALSE, NULL); ;} - break; - - case 34: - -/* Line 1464 of yacc.c */ -#line 391 "parser.y" - { (yyval.type) = type_new_nonencapsulated_union((yyvsp[(2) - (2)].str), FALSE, NULL); ;} - break; - - case 35: - -/* Line 1464 of yacc.c */ -#line 392 "parser.y" - { (yyval.type) = (yyvsp[(2) - (2)].type); (yyval.type)->attrs = check_enum_attrs((yyvsp[(1) - (2)].attr_list)); ;} - break; - - case 36: - -/* Line 1464 of yacc.c */ -#line 393 "parser.y" - { (yyval.type) = (yyvsp[(2) - (2)].type); (yyval.type)->attrs = check_struct_attrs((yyvsp[(1) - (2)].attr_list)); ;} - break; - - case 37: - -/* Line 1464 of yacc.c */ -#line 394 "parser.y" - { (yyval.type) = (yyvsp[(2) - (2)].type); (yyval.type)->attrs = check_union_attrs((yyvsp[(1) - (2)].attr_list)); ;} - break; - - case 38: - -/* Line 1464 of yacc.c */ -#line 397 "parser.y" - { (yyval.str) = (yyvsp[(3) - (4)].str); ;} - break; - - case 39: - -/* Line 1464 of yacc.c */ -#line 399 "parser.y" - { assert(yychar == YYEMPTY); - (yyval.import) = xmalloc(sizeof(struct _import_t)); - (yyval.import)->name = (yyvsp[(2) - (3)].str); - (yyval.import)->import_performed = do_import((yyvsp[(2) - (3)].str)); - if (!(yyval.import)->import_performed) yychar = aEOF; - ;} - break; - - case 40: - -/* Line 1464 of yacc.c */ -#line 407 "parser.y" - { (yyval.str) = (yyvsp[(1) - (3)].import)->name; - if ((yyvsp[(1) - (3)].import)->import_performed) pop_import(); - free((yyvsp[(1) - (3)].import)); - ;} - break; - - case 41: - -/* Line 1464 of yacc.c */ -#line 414 "parser.y" - { (yyval.str) = (yyvsp[(3) - (5)].str); if(!parse_only) add_importlib((yyvsp[(3) - (5)].str)); ;} - break; - - case 42: - -/* Line 1464 of yacc.c */ -#line 417 "parser.y" - { (yyval.str) = (yyvsp[(2) - (2)].str); ;} - break; - - case 43: - -/* Line 1464 of yacc.c */ -#line 419 "parser.y" - { (yyval.typelib) = make_library((yyvsp[(2) - (3)].str), check_library_attrs((yyvsp[(2) - (3)].str), (yyvsp[(1) - (3)].attr_list))); - if (!parse_only) start_typelib((yyval.typelib)); - ;} - break; - - case 44: - -/* Line 1464 of yacc.c */ -#line 424 "parser.y" - { (yyval.typelib) = (yyvsp[(1) - (4)].typelib); - (yyval.typelib)->stmts = (yyvsp[(2) - (4)].stmt_list); - if (!parse_only) end_typelib(); - ;} - break; - - case 45: - -/* Line 1464 of yacc.c */ -#line 430 "parser.y" - { (yyval.var_list) = NULL; ;} - break; - - case 47: - -/* Line 1464 of yacc.c */ -#line 434 "parser.y" - { check_arg_attrs((yyvsp[(1) - (1)].var)); (yyval.var_list) = append_var( NULL, (yyvsp[(1) - (1)].var) ); ;} - break; - - case 48: - -/* Line 1464 of yacc.c */ -#line 435 "parser.y" - { check_arg_attrs((yyvsp[(3) - (3)].var)); (yyval.var_list) = append_var( (yyvsp[(1) - (3)].var_list), (yyvsp[(3) - (3)].var) ); ;} - break; - - case 50: - -/* Line 1464 of yacc.c */ -#line 439 "parser.y" - { (yyval.var_list) = append_var( (yyvsp[(1) - (3)].var_list), make_var(strdup("...")) ); ;} - break; - - case 51: - -/* Line 1464 of yacc.c */ -#line 443 "parser.y" - { if ((yyvsp[(2) - (3)].declspec)->stgclass != STG_NONE && (yyvsp[(2) - (3)].declspec)->stgclass != STG_REGISTER) - error_loc("invalid storage class for function parameter\n"); - (yyval.var) = declare_var((yyvsp[(1) - (3)].attr_list), (yyvsp[(2) - (3)].declspec), (yyvsp[(3) - (3)].declarator), TRUE); - free((yyvsp[(2) - (3)].declspec)); free((yyvsp[(3) - (3)].declarator)); - ;} - break; - - case 52: - -/* Line 1464 of yacc.c */ -#line 448 "parser.y" - { if ((yyvsp[(1) - (2)].declspec)->stgclass != STG_NONE && (yyvsp[(1) - (2)].declspec)->stgclass != STG_REGISTER) - error_loc("invalid storage class for function parameter\n"); - (yyval.var) = declare_var(NULL, (yyvsp[(1) - (2)].declspec), (yyvsp[(2) - (2)].declarator), TRUE); - free((yyvsp[(1) - (2)].declspec)); free((yyvsp[(2) - (2)].declarator)); - ;} - break; - - case 53: - -/* Line 1464 of yacc.c */ -#line 455 "parser.y" - { (yyval.expr) = (yyvsp[(2) - (3)].expr); - if (!(yyval.expr)->is_const) - error_loc("array dimension is not an integer constant\n"); - ;} - break; - - case 54: - -/* Line 1464 of yacc.c */ -#line 459 "parser.y" - { (yyval.expr) = make_expr(EXPR_VOID); ;} - break; - - case 55: - -/* Line 1464 of yacc.c */ -#line 460 "parser.y" - { (yyval.expr) = make_expr(EXPR_VOID); ;} - break; - - case 56: - -/* Line 1464 of yacc.c */ -#line 463 "parser.y" - { (yyval.attr_list) = NULL; ;} - break; - - case 58: - -/* Line 1464 of yacc.c */ -#line 468 "parser.y" - { (yyval.attr_list) = (yyvsp[(2) - (3)].attr_list); ;} - break; - - case 59: - -/* Line 1464 of yacc.c */ -#line 471 "parser.y" - { (yyval.attr_list) = append_attr( NULL, (yyvsp[(1) - (1)].attr) ); ;} - break; - - case 60: - -/* Line 1464 of yacc.c */ -#line 472 "parser.y" - { (yyval.attr_list) = append_attr( (yyvsp[(1) - (3)].attr_list), (yyvsp[(3) - (3)].attr) ); ;} - break; - - case 61: - -/* Line 1464 of yacc.c */ -#line 473 "parser.y" - { (yyval.attr_list) = append_attr( (yyvsp[(1) - (4)].attr_list), (yyvsp[(4) - (4)].attr) ); ;} - break; - - case 62: - -/* Line 1464 of yacc.c */ -#line 476 "parser.y" - { (yyval.str_list) = append_str( NULL, (yyvsp[(1) - (1)].str) ); ;} - break; - - case 63: - -/* Line 1464 of yacc.c */ -#line 477 "parser.y" - { (yyval.str_list) = append_str( (yyvsp[(1) - (3)].str_list), (yyvsp[(3) - (3)].str) ); ;} - break; - - case 64: - -/* Line 1464 of yacc.c */ -#line 480 "parser.y" - { (yyval.attr) = NULL; ;} - break; - - case 65: - -/* Line 1464 of yacc.c */ -#line 481 "parser.y" - { (yyval.attr) = make_attr(ATTR_AGGREGATABLE); ;} - break; - - case 66: - -/* Line 1464 of yacc.c */ -#line 482 "parser.y" - { (yyval.attr) = make_attrp(ATTR_ANNOTATION, (yyvsp[(3) - (4)].str)); ;} - break; - - case 67: - -/* Line 1464 of yacc.c */ -#line 483 "parser.y" - { (yyval.attr) = make_attr(ATTR_APPOBJECT); ;} - break; - - case 68: - -/* Line 1464 of yacc.c */ -#line 484 "parser.y" - { (yyval.attr) = make_attr(ATTR_ASYNC); ;} - break; - - case 69: - -/* Line 1464 of yacc.c */ -#line 485 "parser.y" - { (yyval.attr) = make_attr(ATTR_AUTO_HANDLE); ;} - break; - - case 70: - -/* Line 1464 of yacc.c */ -#line 486 "parser.y" - { (yyval.attr) = make_attr(ATTR_BINDABLE); ;} - break; - - case 71: - -/* Line 1464 of yacc.c */ -#line 487 "parser.y" - { (yyval.attr) = make_attr(ATTR_BROADCAST); ;} - break; - - case 72: - -/* Line 1464 of yacc.c */ -#line 488 "parser.y" - { (yyval.attr) = make_attrp(ATTR_CALLAS, (yyvsp[(3) - (4)].var)); ;} - break; - - case 73: - -/* Line 1464 of yacc.c */ -#line 489 "parser.y" - { (yyval.attr) = make_attrp(ATTR_CASE, (yyvsp[(3) - (4)].expr_list)); ;} - break; - - case 74: - -/* Line 1464 of yacc.c */ -#line 490 "parser.y" - { (yyval.attr) = make_attr(ATTR_CODE); ;} - break; - - case 75: - -/* Line 1464 of yacc.c */ -#line 491 "parser.y" - { (yyval.attr) = make_attr(ATTR_COMMSTATUS); ;} - break; - - case 76: - -/* Line 1464 of yacc.c */ -#line 492 "parser.y" - { (yyval.attr) = make_attrv(ATTR_CONTEXTHANDLE, 0); ;} - break; - - case 77: - -/* Line 1464 of yacc.c */ -#line 493 "parser.y" - { (yyval.attr) = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_DONT_SERIALIZE */ ;} - break; - - case 78: - -/* Line 1464 of yacc.c */ -#line 494 "parser.y" - { (yyval.attr) = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_SERIALIZE */ ;} - break; - - case 79: - -/* Line 1464 of yacc.c */ -#line 495 "parser.y" - { (yyval.attr) = make_attr(ATTR_CONTROL); ;} - break; - - case 80: - -/* Line 1464 of yacc.c */ -#line 496 "parser.y" - { (yyval.attr) = make_attr(ATTR_DECODE); ;} - break; - - case 81: - -/* Line 1464 of yacc.c */ -#line 497 "parser.y" - { (yyval.attr) = make_attr(ATTR_DEFAULT); ;} - break; - - case 82: - -/* Line 1464 of yacc.c */ -#line 498 "parser.y" - { (yyval.attr) = make_attr(ATTR_DEFAULTBIND); ;} - break; - - case 83: - -/* Line 1464 of yacc.c */ -#line 499 "parser.y" - { (yyval.attr) = make_attr(ATTR_DEFAULTCOLLELEM); ;} - break; - - case 84: - -/* Line 1464 of yacc.c */ -#line 500 "parser.y" - { (yyval.attr) = make_attrp(ATTR_DEFAULTVALUE, (yyvsp[(3) - (4)].expr)); ;} - break; - - case 85: - -/* Line 1464 of yacc.c */ -#line 501 "parser.y" - { (yyval.attr) = make_attr(ATTR_DEFAULTVTABLE); ;} - break; - - case 86: - -/* Line 1464 of yacc.c */ -#line 502 "parser.y" - { (yyval.attr) = make_attr(ATTR_DISABLECONSISTENCYCHECK); ;} - break; - - case 87: - -/* Line 1464 of yacc.c */ -#line 503 "parser.y" - { (yyval.attr) = make_attr(ATTR_DISPLAYBIND); ;} - break; - - case 88: - -/* Line 1464 of yacc.c */ -#line 504 "parser.y" - { (yyval.attr) = make_attrp(ATTR_DLLNAME, (yyvsp[(3) - (4)].str)); ;} - break; - - case 89: - -/* Line 1464 of yacc.c */ -#line 505 "parser.y" - { (yyval.attr) = make_attr(ATTR_DUAL); ;} - break; - - case 90: - -/* Line 1464 of yacc.c */ -#line 506 "parser.y" - { (yyval.attr) = make_attr(ATTR_ENABLEALLOCATE); ;} - break; - - case 91: - -/* Line 1464 of yacc.c */ -#line 507 "parser.y" - { (yyval.attr) = make_attr(ATTR_ENCODE); ;} - break; - - case 92: - -/* Line 1464 of yacc.c */ -#line 508 "parser.y" - { (yyval.attr) = make_attrp(ATTR_ENDPOINT, (yyvsp[(3) - (4)].str_list)); ;} - break; - - case 93: - -/* Line 1464 of yacc.c */ -#line 509 "parser.y" - { (yyval.attr) = make_attrp(ATTR_ENTRY, (yyvsp[(3) - (4)].expr)); ;} - break; - - case 94: - -/* Line 1464 of yacc.c */ -#line 510 "parser.y" - { (yyval.attr) = make_attr(ATTR_EXPLICIT_HANDLE); ;} - break; - - case 95: - -/* Line 1464 of yacc.c */ -#line 511 "parser.y" - { (yyval.attr) = make_attr(ATTR_FAULTSTATUS); ;} - break; - - case 96: - -/* Line 1464 of yacc.c */ -#line 512 "parser.y" - { (yyval.attr) = make_attr(ATTR_FORCEALLOCATE); ;} - break; - - case 97: - -/* Line 1464 of yacc.c */ -#line 513 "parser.y" - { (yyval.attr) = make_attr(ATTR_HANDLE); ;} - break; - - case 98: - -/* Line 1464 of yacc.c */ -#line 514 "parser.y" - { (yyval.attr) = make_attrp(ATTR_HELPCONTEXT, (yyvsp[(3) - (4)].expr)); ;} - break; - - case 99: - -/* Line 1464 of yacc.c */ -#line 515 "parser.y" - { (yyval.attr) = make_attrp(ATTR_HELPFILE, (yyvsp[(3) - (4)].str)); ;} - break; - - case 100: - -/* Line 1464 of yacc.c */ -#line 516 "parser.y" - { (yyval.attr) = make_attrp(ATTR_HELPSTRING, (yyvsp[(3) - (4)].str)); ;} - break; - - case 101: - -/* Line 1464 of yacc.c */ -#line 517 "parser.y" - { (yyval.attr) = make_attrp(ATTR_HELPSTRINGCONTEXT, (yyvsp[(3) - (4)].expr)); ;} - break; - - case 102: - -/* Line 1464 of yacc.c */ -#line 518 "parser.y" - { (yyval.attr) = make_attrp(ATTR_HELPSTRINGDLL, (yyvsp[(3) - (4)].str)); ;} - break; - - case 103: - -/* Line 1464 of yacc.c */ -#line 519 "parser.y" - { (yyval.attr) = make_attr(ATTR_HIDDEN); ;} - break; - - case 104: - -/* Line 1464 of yacc.c */ -#line 520 "parser.y" - { (yyval.attr) = make_attrp(ATTR_ID, (yyvsp[(3) - (4)].expr)); ;} - break; - - case 105: - -/* Line 1464 of yacc.c */ -#line 521 "parser.y" - { (yyval.attr) = make_attr(ATTR_IDEMPOTENT); ;} - break; - - case 106: - -/* Line 1464 of yacc.c */ -#line 522 "parser.y" - { (yyval.attr) = make_attr(ATTR_IGNORE); ;} - break; - - case 107: - -/* Line 1464 of yacc.c */ -#line 523 "parser.y" - { (yyval.attr) = make_attrp(ATTR_IIDIS, (yyvsp[(3) - (4)].expr)); ;} - break; - - case 108: - -/* Line 1464 of yacc.c */ -#line 524 "parser.y" - { (yyval.attr) = make_attr(ATTR_IMMEDIATEBIND); ;} - break; - - case 109: - -/* Line 1464 of yacc.c */ -#line 525 "parser.y" - { (yyval.attr) = make_attrp(ATTR_IMPLICIT_HANDLE, (yyvsp[(3) - (4)].var)); ;} - break; - - case 110: - -/* Line 1464 of yacc.c */ -#line 526 "parser.y" - { (yyval.attr) = make_attr(ATTR_IN); ;} - break; - - case 111: - -/* Line 1464 of yacc.c */ -#line 527 "parser.y" - { (yyval.attr) = make_attr(ATTR_INPUTSYNC); ;} - break; - - case 112: - -/* Line 1464 of yacc.c */ -#line 528 "parser.y" - { (yyval.attr) = make_attrp(ATTR_LENGTHIS, (yyvsp[(3) - (4)].expr_list)); ;} - break; - - case 113: - -/* Line 1464 of yacc.c */ -#line 529 "parser.y" - { (yyval.attr) = make_attrp(ATTR_LIBLCID, (yyvsp[(3) - (4)].expr)); ;} - break; - - case 114: - -/* Line 1464 of yacc.c */ -#line 530 "parser.y" - { (yyval.attr) = make_attr(ATTR_PARAMLCID); ;} - break; - - case 115: - -/* Line 1464 of yacc.c */ -#line 531 "parser.y" - { (yyval.attr) = make_attr(ATTR_LICENSED); ;} - break; - - case 116: - -/* Line 1464 of yacc.c */ -#line 532 "parser.y" - { (yyval.attr) = make_attr(ATTR_LOCAL); ;} - break; - - case 117: - -/* Line 1464 of yacc.c */ -#line 533 "parser.y" - { (yyval.attr) = make_attr(ATTR_MAYBE); ;} - break; - - case 118: - -/* Line 1464 of yacc.c */ -#line 534 "parser.y" - { (yyval.attr) = make_attr(ATTR_MESSAGE); ;} - break; - - case 119: - -/* Line 1464 of yacc.c */ -#line 535 "parser.y" - { (yyval.attr) = make_attr(ATTR_NOCODE); ;} - break; - - case 120: - -/* Line 1464 of yacc.c */ -#line 536 "parser.y" - { (yyval.attr) = make_attr(ATTR_NONBROWSABLE); ;} - break; - - case 121: - -/* Line 1464 of yacc.c */ -#line 537 "parser.y" - { (yyval.attr) = make_attr(ATTR_NONCREATABLE); ;} - break; - - case 122: - -/* Line 1464 of yacc.c */ -#line 538 "parser.y" - { (yyval.attr) = make_attr(ATTR_NONEXTENSIBLE); ;} - break; - - case 123: - -/* Line 1464 of yacc.c */ -#line 539 "parser.y" - { (yyval.attr) = make_attr(ATTR_NOTIFY); ;} - break; - - case 124: - -/* Line 1464 of yacc.c */ -#line 540 "parser.y" - { (yyval.attr) = make_attr(ATTR_NOTIFYFLAG); ;} - break; - - case 125: - -/* Line 1464 of yacc.c */ -#line 541 "parser.y" - { (yyval.attr) = make_attr(ATTR_OBJECT); ;} - break; - - case 126: - -/* Line 1464 of yacc.c */ -#line 542 "parser.y" - { (yyval.attr) = make_attr(ATTR_ODL); ;} - break; - - case 127: - -/* Line 1464 of yacc.c */ -#line 543 "parser.y" - { (yyval.attr) = make_attr(ATTR_OLEAUTOMATION); ;} - break; - - case 128: - -/* Line 1464 of yacc.c */ -#line 544 "parser.y" - { (yyval.attr) = make_attrp(ATTR_OPTIMIZE, (yyvsp[(3) - (4)].str)); ;} - break; - - case 129: - -/* Line 1464 of yacc.c */ -#line 545 "parser.y" - { (yyval.attr) = make_attr(ATTR_OPTIONAL); ;} - break; - - case 130: - -/* Line 1464 of yacc.c */ -#line 546 "parser.y" - { (yyval.attr) = make_attr(ATTR_OUT); ;} - break; - - case 131: - -/* Line 1464 of yacc.c */ -#line 547 "parser.y" - { (yyval.attr) = make_attr(ATTR_PARTIALIGNORE); ;} - break; - - case 132: - -/* Line 1464 of yacc.c */ -#line 548 "parser.y" - { (yyval.attr) = make_attrv(ATTR_POINTERDEFAULT, (yyvsp[(3) - (4)].num)); ;} - break; - - case 133: - -/* Line 1464 of yacc.c */ -#line 549 "parser.y" - { (yyval.attr) = make_attrp(ATTR_PROGID, (yyvsp[(3) - (4)].str)); ;} - break; - - case 134: - -/* Line 1464 of yacc.c */ -#line 550 "parser.y" - { (yyval.attr) = make_attr(ATTR_PROPGET); ;} - break; - - case 135: - -/* Line 1464 of yacc.c */ -#line 551 "parser.y" - { (yyval.attr) = make_attr(ATTR_PROPPUT); ;} - break; - - case 136: - -/* Line 1464 of yacc.c */ -#line 552 "parser.y" - { (yyval.attr) = make_attr(ATTR_PROPPUTREF); ;} - break; - - case 137: - -/* Line 1464 of yacc.c */ -#line 553 "parser.y" - { (yyval.attr) = make_attr(ATTR_PROXY); ;} - break; - - case 138: - -/* Line 1464 of yacc.c */ -#line 554 "parser.y" - { (yyval.attr) = make_attr(ATTR_PUBLIC); ;} - break; - - case 139: - -/* Line 1464 of yacc.c */ -#line 556 "parser.y" - { expr_list_t *list = append_expr( NULL, (yyvsp[(3) - (6)].expr) ); - list = append_expr( list, (yyvsp[(5) - (6)].expr) ); - (yyval.attr) = make_attrp(ATTR_RANGE, list); ;} - break; - - case 140: - -/* Line 1464 of yacc.c */ -#line 559 "parser.y" - { (yyval.attr) = make_attr(ATTR_READONLY); ;} - break; - - case 141: - -/* Line 1464 of yacc.c */ -#line 560 "parser.y" - { (yyval.attr) = make_attrp(ATTR_REPRESENTAS, (yyvsp[(3) - (4)].type)); ;} - break; - - case 142: - -/* Line 1464 of yacc.c */ -#line 561 "parser.y" - { (yyval.attr) = make_attr(ATTR_REQUESTEDIT); ;} - break; - - case 143: - -/* Line 1464 of yacc.c */ -#line 562 "parser.y" - { (yyval.attr) = make_attr(ATTR_RESTRICTED); ;} - break; - - case 144: - -/* Line 1464 of yacc.c */ -#line 563 "parser.y" - { (yyval.attr) = make_attr(ATTR_RETVAL); ;} - break; - - case 145: - -/* Line 1464 of yacc.c */ -#line 564 "parser.y" - { (yyval.attr) = make_attrp(ATTR_SIZEIS, (yyvsp[(3) - (4)].expr_list)); ;} - break; - - case 146: - -/* Line 1464 of yacc.c */ -#line 565 "parser.y" - { (yyval.attr) = make_attr(ATTR_SOURCE); ;} - break; - - case 147: - -/* Line 1464 of yacc.c */ -#line 566 "parser.y" - { (yyval.attr) = make_attr(ATTR_STRICTCONTEXTHANDLE); ;} - break; - - case 148: - -/* Line 1464 of yacc.c */ -#line 567 "parser.y" - { (yyval.attr) = make_attr(ATTR_STRING); ;} - break; - - case 149: - -/* Line 1464 of yacc.c */ -#line 568 "parser.y" - { (yyval.attr) = make_attrp(ATTR_SWITCHIS, (yyvsp[(3) - (4)].expr)); ;} - break; - - case 150: - -/* Line 1464 of yacc.c */ -#line 569 "parser.y" - { (yyval.attr) = make_attrp(ATTR_SWITCHTYPE, (yyvsp[(3) - (4)].type)); ;} - break; - - case 151: - -/* Line 1464 of yacc.c */ -#line 570 "parser.y" - { (yyval.attr) = make_attrp(ATTR_TRANSMITAS, (yyvsp[(3) - (4)].type)); ;} - break; - - case 152: - -/* Line 1464 of yacc.c */ -#line 571 "parser.y" - { (yyval.attr) = make_attrv(ATTR_THREADING, (yyvsp[(3) - (4)].num)); ;} - break; - - case 153: - -/* Line 1464 of yacc.c */ -#line 572 "parser.y" - { (yyval.attr) = make_attr(ATTR_UIDEFAULT); ;} - break; - - case 154: - -/* Line 1464 of yacc.c */ -#line 573 "parser.y" - { (yyval.attr) = make_attr(ATTR_USESGETLASTERROR); ;} - break; - - case 155: - -/* Line 1464 of yacc.c */ -#line 574 "parser.y" - { (yyval.attr) = make_attrp(ATTR_USERMARSHAL, (yyvsp[(3) - (4)].type)); ;} - break; - - case 156: - -/* Line 1464 of yacc.c */ -#line 575 "parser.y" - { (yyval.attr) = make_attrp(ATTR_UUID, (yyvsp[(3) - (4)].uuid)); ;} - break; - - case 157: - -/* Line 1464 of yacc.c */ -#line 576 "parser.y" - { (yyval.attr) = make_attr(ATTR_V1ENUM); ;} - break; - - case 158: - -/* Line 1464 of yacc.c */ -#line 577 "parser.y" - { (yyval.attr) = make_attr(ATTR_VARARG); ;} - break; - - case 159: - -/* Line 1464 of yacc.c */ -#line 578 "parser.y" - { (yyval.attr) = make_attrv(ATTR_VERSION, (yyvsp[(3) - (4)].num)); ;} - break; - - case 160: - -/* Line 1464 of yacc.c */ -#line 579 "parser.y" - { (yyval.attr) = make_attrp(ATTR_VIPROGID, (yyvsp[(3) - (4)].str)); ;} - break; - - case 161: - -/* Line 1464 of yacc.c */ -#line 580 "parser.y" - { (yyval.attr) = make_attrp(ATTR_WIREMARSHAL, (yyvsp[(3) - (4)].type)); ;} - break; - - case 162: - -/* Line 1464 of yacc.c */ -#line 581 "parser.y" - { (yyval.attr) = make_attrv(ATTR_POINTERTYPE, (yyvsp[(1) - (1)].num)); ;} - break; - - case 164: - -/* Line 1464 of yacc.c */ -#line 586 "parser.y" - { if (!is_valid_uuid((yyvsp[(1) - (1)].str))) - error_loc("invalid UUID: %s\n", (yyvsp[(1) - (1)].str)); - (yyval.uuid) = parse_uuid((yyvsp[(1) - (1)].str)); ;} - break; - - case 165: - -/* Line 1464 of yacc.c */ -#line 591 "parser.y" - { (yyval.str) = xstrdup("__cdecl"); ;} - break; - - case 166: - -/* Line 1464 of yacc.c */ -#line 592 "parser.y" - { (yyval.str) = xstrdup("__fastcall"); ;} - break; - - case 167: - -/* Line 1464 of yacc.c */ -#line 593 "parser.y" - { (yyval.str) = xstrdup("__pascal"); ;} - break; - - case 168: - -/* Line 1464 of yacc.c */ -#line 594 "parser.y" - { (yyval.str) = xstrdup("__stdcall"); ;} - break; - - case 169: - -/* Line 1464 of yacc.c */ -#line 597 "parser.y" - { (yyval.var_list) = NULL; ;} - break; - - case 170: - -/* Line 1464 of yacc.c */ -#line 598 "parser.y" - { (yyval.var_list) = append_var( (yyvsp[(1) - (2)].var_list), (yyvsp[(2) - (2)].var) ); ;} - break; - - case 171: - -/* Line 1464 of yacc.c */ -#line 601 "parser.y" - { attr_t *a = make_attrp(ATTR_CASE, append_expr( NULL, (yyvsp[(2) - (4)].expr) )); - (yyval.var) = (yyvsp[(4) - (4)].var); if (!(yyval.var)) (yyval.var) = make_var(NULL); - (yyval.var)->attrs = append_attr( (yyval.var)->attrs, a ); - ;} - break; - - case 172: - -/* Line 1464 of yacc.c */ -#line 605 "parser.y" - { attr_t *a = make_attr(ATTR_DEFAULT); - (yyval.var) = (yyvsp[(3) - (3)].var); if (!(yyval.var)) (yyval.var) = make_var(NULL); - (yyval.var)->attrs = append_attr( (yyval.var)->attrs, a ); - ;} - break; - - case 173: - -/* Line 1464 of yacc.c */ -#line 611 "parser.y" - { (yyval.var_list) = NULL; ;} - break; - - case 174: - -/* Line 1464 of yacc.c */ -#line 612 "parser.y" - { (yyval.var_list) = (yyvsp[(1) - (2)].var_list); ;} - break; - - case 176: - -/* Line 1464 of yacc.c */ -#line 616 "parser.y" - { if (!(yyvsp[(1) - (1)].var)->eval) - (yyvsp[(1) - (1)].var)->eval = make_exprl(EXPR_NUM, 0 /* default for first enum entry */); - (yyval.var_list) = append_var( NULL, (yyvsp[(1) - (1)].var) ); - ;} - break; - - case 177: - -/* Line 1464 of yacc.c */ -#line 620 "parser.y" - { if (!(yyvsp[(3) - (3)].var)->eval) - { - var_t *last = LIST_ENTRY( list_tail((yyval.var_list)), var_t, entry ); - (yyvsp[(3) - (3)].var)->eval = make_exprl(EXPR_NUM, last->eval->cval + 1); - } - (yyval.var_list) = append_var( (yyvsp[(1) - (3)].var_list), (yyvsp[(3) - (3)].var) ); - ;} - break; - - case 178: - -/* Line 1464 of yacc.c */ -#line 629 "parser.y" - { (yyval.var) = reg_const((yyvsp[(1) - (3)].var)); - (yyval.var)->eval = (yyvsp[(3) - (3)].expr); - (yyval.var)->type = type_new_int(TYPE_BASIC_INT, 0); - ;} - break; - - case 179: - -/* Line 1464 of yacc.c */ -#line 633 "parser.y" - { (yyval.var) = reg_const((yyvsp[(1) - (1)].var)); - (yyval.var)->type = type_new_int(TYPE_BASIC_INT, 0); - ;} - break; - - case 180: - -/* Line 1464 of yacc.c */ -#line 638 "parser.y" - { (yyval.type) = type_new_enum((yyvsp[(2) - (5)].str), TRUE, (yyvsp[(4) - (5)].var_list)); ;} - break; - - case 181: - -/* Line 1464 of yacc.c */ -#line 641 "parser.y" - { (yyval.expr_list) = append_expr( NULL, (yyvsp[(1) - (1)].expr) ); ;} - break; - - case 182: - -/* Line 1464 of yacc.c */ -#line 642 "parser.y" - { (yyval.expr_list) = append_expr( (yyvsp[(1) - (3)].expr_list), (yyvsp[(3) - (3)].expr) ); ;} - break; - - case 183: - -/* Line 1464 of yacc.c */ -#line 645 "parser.y" - { (yyval.expr) = make_expr(EXPR_VOID); ;} - break; - - case 185: - -/* Line 1464 of yacc.c */ -#line 649 "parser.y" - { (yyval.expr) = make_exprl(EXPR_NUM, (yyvsp[(1) - (1)].num)); ;} - break; - - case 186: - -/* Line 1464 of yacc.c */ -#line 650 "parser.y" - { (yyval.expr) = make_exprl(EXPR_HEXNUM, (yyvsp[(1) - (1)].num)); ;} - break; - - case 187: - -/* Line 1464 of yacc.c */ -#line 651 "parser.y" - { (yyval.expr) = make_exprd(EXPR_DOUBLE, (yyvsp[(1) - (1)].dbl)); ;} - break; - - case 188: - -/* Line 1464 of yacc.c */ -#line 652 "parser.y" - { (yyval.expr) = make_exprl(EXPR_TRUEFALSE, 0); ;} - break; - - case 189: - -/* Line 1464 of yacc.c */ -#line 653 "parser.y" - { (yyval.expr) = make_exprl(EXPR_NUM, 0); ;} - break; - - case 190: - -/* Line 1464 of yacc.c */ -#line 654 "parser.y" - { (yyval.expr) = make_exprl(EXPR_TRUEFALSE, 1); ;} - break; - - case 191: - -/* Line 1464 of yacc.c */ -#line 655 "parser.y" - { (yyval.expr) = make_exprs(EXPR_STRLIT, (yyvsp[(1) - (1)].str)); ;} - break; - - case 192: - -/* Line 1464 of yacc.c */ -#line 656 "parser.y" - { (yyval.expr) = make_exprs(EXPR_WSTRLIT, (yyvsp[(1) - (1)].str)); ;} - break; - - case 193: - -/* Line 1464 of yacc.c */ -#line 657 "parser.y" - { (yyval.expr) = make_exprs(EXPR_CHARCONST, (yyvsp[(1) - (1)].str)); ;} - break; - - case 194: - -/* Line 1464 of yacc.c */ -#line 658 "parser.y" - { (yyval.expr) = make_exprs(EXPR_IDENTIFIER, (yyvsp[(1) - (1)].str)); ;} - break; - - case 195: - -/* Line 1464 of yacc.c */ -#line 659 "parser.y" - { (yyval.expr) = make_expr3(EXPR_COND, (yyvsp[(1) - (5)].expr), (yyvsp[(3) - (5)].expr), (yyvsp[(5) - (5)].expr)); ;} - break; - - case 196: - -/* Line 1464 of yacc.c */ -#line 660 "parser.y" - { (yyval.expr) = make_expr2(EXPR_LOGOR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} - break; - - case 197: - -/* Line 1464 of yacc.c */ -#line 661 "parser.y" - { (yyval.expr) = make_expr2(EXPR_LOGAND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} - break; - - case 198: - -/* Line 1464 of yacc.c */ -#line 662 "parser.y" - { (yyval.expr) = make_expr2(EXPR_OR , (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} - break; - - case 199: - -/* Line 1464 of yacc.c */ -#line 663 "parser.y" - { (yyval.expr) = make_expr2(EXPR_XOR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} - break; - - case 200: - -/* Line 1464 of yacc.c */ -#line 664 "parser.y" - { (yyval.expr) = make_expr2(EXPR_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} - break; - - case 201: - -/* Line 1464 of yacc.c */ -#line 665 "parser.y" - { (yyval.expr) = make_expr2(EXPR_EQUALITY, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} - break; - - case 202: - -/* Line 1464 of yacc.c */ -#line 666 "parser.y" - { (yyval.expr) = make_expr2(EXPR_INEQUALITY, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} - break; - - case 203: - -/* Line 1464 of yacc.c */ -#line 667 "parser.y" - { (yyval.expr) = make_expr2(EXPR_GTR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} - break; - - case 204: - -/* Line 1464 of yacc.c */ -#line 668 "parser.y" - { (yyval.expr) = make_expr2(EXPR_LESS, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} - break; - - case 205: - -/* Line 1464 of yacc.c */ -#line 669 "parser.y" - { (yyval.expr) = make_expr2(EXPR_GTREQL, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} - break; - - case 206: - -/* Line 1464 of yacc.c */ -#line 670 "parser.y" - { (yyval.expr) = make_expr2(EXPR_LESSEQL, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} - break; - - case 207: - -/* Line 1464 of yacc.c */ -#line 671 "parser.y" - { (yyval.expr) = make_expr2(EXPR_SHL, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} - break; - - case 208: - -/* Line 1464 of yacc.c */ -#line 672 "parser.y" - { (yyval.expr) = make_expr2(EXPR_SHR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} - break; - - case 209: - -/* Line 1464 of yacc.c */ -#line 673 "parser.y" - { (yyval.expr) = make_expr2(EXPR_ADD, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} - break; - - case 210: - -/* Line 1464 of yacc.c */ -#line 674 "parser.y" - { (yyval.expr) = make_expr2(EXPR_SUB, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} - break; - - case 211: - -/* Line 1464 of yacc.c */ -#line 675 "parser.y" - { (yyval.expr) = make_expr2(EXPR_MOD, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} - break; - - case 212: - -/* Line 1464 of yacc.c */ -#line 676 "parser.y" - { (yyval.expr) = make_expr2(EXPR_MUL, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} - break; - - case 213: - -/* Line 1464 of yacc.c */ -#line 677 "parser.y" - { (yyval.expr) = make_expr2(EXPR_DIV, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} - break; - - case 214: - -/* Line 1464 of yacc.c */ -#line 678 "parser.y" - { (yyval.expr) = make_expr1(EXPR_LOGNOT, (yyvsp[(2) - (2)].expr)); ;} - break; - - case 215: - -/* Line 1464 of yacc.c */ -#line 679 "parser.y" - { (yyval.expr) = make_expr1(EXPR_NOT, (yyvsp[(2) - (2)].expr)); ;} - break; - - case 216: - -/* Line 1464 of yacc.c */ -#line 680 "parser.y" - { (yyval.expr) = make_expr1(EXPR_POS, (yyvsp[(2) - (2)].expr)); ;} - break; - - case 217: - -/* Line 1464 of yacc.c */ -#line 681 "parser.y" - { (yyval.expr) = make_expr1(EXPR_NEG, (yyvsp[(2) - (2)].expr)); ;} - break; - - case 218: - -/* Line 1464 of yacc.c */ -#line 682 "parser.y" - { (yyval.expr) = make_expr1(EXPR_ADDRESSOF, (yyvsp[(2) - (2)].expr)); ;} - break; - - case 219: - -/* Line 1464 of yacc.c */ -#line 683 "parser.y" - { (yyval.expr) = make_expr1(EXPR_PPTR, (yyvsp[(2) - (2)].expr)); ;} - break; - - case 220: - -/* Line 1464 of yacc.c */ -#line 684 "parser.y" - { (yyval.expr) = make_expr2(EXPR_MEMBER, make_expr1(EXPR_PPTR, (yyvsp[(1) - (3)].expr)), make_exprs(EXPR_IDENTIFIER, (yyvsp[(3) - (3)].str))); ;} - break; - - case 221: - -/* Line 1464 of yacc.c */ -#line 685 "parser.y" - { (yyval.expr) = make_expr2(EXPR_MEMBER, (yyvsp[(1) - (3)].expr), make_exprs(EXPR_IDENTIFIER, (yyvsp[(3) - (3)].str))); ;} - break; - - case 222: - -/* Line 1464 of yacc.c */ -#line 687 "parser.y" - { (yyval.expr) = make_exprt(EXPR_CAST, declare_var(NULL, (yyvsp[(2) - (5)].declspec), (yyvsp[(3) - (5)].declarator), 0), (yyvsp[(5) - (5)].expr)); free((yyvsp[(2) - (5)].declspec)); free((yyvsp[(3) - (5)].declarator)); ;} - break; - - case 223: - -/* Line 1464 of yacc.c */ -#line 689 "parser.y" - { (yyval.expr) = make_exprt(EXPR_SIZEOF, declare_var(NULL, (yyvsp[(3) - (5)].declspec), (yyvsp[(4) - (5)].declarator), 0), NULL); free((yyvsp[(3) - (5)].declspec)); free((yyvsp[(4) - (5)].declarator)); ;} - break; - - case 224: - -/* Line 1464 of yacc.c */ -#line 690 "parser.y" - { (yyval.expr) = make_expr2(EXPR_ARRAY, (yyvsp[(1) - (4)].expr), (yyvsp[(3) - (4)].expr)); ;} - break; - - case 225: - -/* Line 1464 of yacc.c */ -#line 691 "parser.y" - { (yyval.expr) = (yyvsp[(2) - (3)].expr); ;} - break; - - case 226: - -/* Line 1464 of yacc.c */ -#line 694 "parser.y" - { (yyval.expr_list) = append_expr( NULL, (yyvsp[(1) - (1)].expr) ); ;} - break; - - case 227: - -/* Line 1464 of yacc.c */ -#line 695 "parser.y" - { (yyval.expr_list) = append_expr( (yyvsp[(1) - (3)].expr_list), (yyvsp[(3) - (3)].expr) ); ;} - break; - - case 228: - -/* Line 1464 of yacc.c */ -#line 698 "parser.y" - { (yyval.expr) = (yyvsp[(1) - (1)].expr); - if (!(yyval.expr)->is_const) - error_loc("expression is not an integer constant\n"); - ;} - break; - - case 229: - -/* Line 1464 of yacc.c */ -#line 704 "parser.y" - { (yyval.expr) = (yyvsp[(1) - (1)].expr); - if (!(yyval.expr)->is_const && (yyval.expr)->type != EXPR_STRLIT && (yyval.expr)->type != EXPR_WSTRLIT) - error_loc("expression is not constant\n"); - ;} - break; - - case 230: - -/* Line 1464 of yacc.c */ -#line 710 "parser.y" - { (yyval.var_list) = NULL; ;} - break; - - case 231: - -/* Line 1464 of yacc.c */ -#line 711 "parser.y" - { (yyval.var_list) = append_var_list((yyvsp[(1) - (2)].var_list), (yyvsp[(2) - (2)].var_list)); ;} - break; - - case 232: - -/* Line 1464 of yacc.c */ -#line 715 "parser.y" - { const char *first = LIST_ENTRY(list_head((yyvsp[(3) - (4)].declarator_list)), declarator_t, entry)->var->name; - check_field_attrs(first, (yyvsp[(1) - (4)].attr_list)); - (yyval.var_list) = set_var_types((yyvsp[(1) - (4)].attr_list), (yyvsp[(2) - (4)].declspec), (yyvsp[(3) - (4)].declarator_list)); - ;} - break; - - case 233: - -/* Line 1464 of yacc.c */ -#line 719 "parser.y" - { var_t *v = make_var(NULL); - v->type = (yyvsp[(2) - (3)].type); v->attrs = (yyvsp[(1) - (3)].attr_list); - (yyval.var_list) = append_var(NULL, v); - ;} - break; - - case 234: - -/* Line 1464 of yacc.c */ -#line 726 "parser.y" - { (yyval.var) = (yyvsp[(1) - (2)].var); ;} - break; - - case 235: - -/* Line 1464 of yacc.c */ -#line 727 "parser.y" - { (yyval.var) = make_var(NULL); (yyval.var)->attrs = (yyvsp[(1) - (2)].attr_list); ;} - break; - - case 236: - -/* Line 1464 of yacc.c */ -#line 730 "parser.y" - { (yyval.var_list) = NULL; ;} - break; - - case 237: - -/* Line 1464 of yacc.c */ -#line 731 "parser.y" - { (yyval.var_list) = append_var( (yyvsp[(1) - (2)].var_list), (yyvsp[(2) - (2)].var) ); ;} - break; - - case 238: - -/* Line 1464 of yacc.c */ -#line 735 "parser.y" - { (yyval.var) = (yyvsp[(1) - (2)].var); ;} - break; - - case 239: - -/* Line 1464 of yacc.c */ -#line 736 "parser.y" - { (yyval.var) = NULL; ;} - break; - - case 240: - -/* Line 1464 of yacc.c */ -#line 739 "parser.y" - { (yyval.var) = declare_var(check_field_attrs((yyvsp[(3) - (3)].declarator)->var->name, (yyvsp[(1) - (3)].attr_list)), - (yyvsp[(2) - (3)].declspec), (yyvsp[(3) - (3)].declarator), FALSE); - free((yyvsp[(3) - (3)].declarator)); - ;} - break; - - case 241: - -/* Line 1464 of yacc.c */ -#line 745 "parser.y" - { (yyval.var) = (yyvsp[(1) - (1)].var); - if (type_get_type((yyval.var)->type) != TYPE_FUNCTION) - error_loc("only methods may be declared inside the methods section of a dispinterface\n"); - check_function_attrs((yyval.var)->name, (yyval.var)->attrs); - ;} - break; - - case 242: - -/* Line 1464 of yacc.c */ -#line 754 "parser.y" - { (yyval.var) = declare_var((yyvsp[(1) - (3)].attr_list), (yyvsp[(2) - (3)].declspec), (yyvsp[(3) - (3)].declarator), FALSE); - free((yyvsp[(3) - (3)].declarator)); - ;} - break; - - case 243: - -/* Line 1464 of yacc.c */ -#line 757 "parser.y" - { (yyval.var) = declare_var(NULL, (yyvsp[(1) - (2)].declspec), (yyvsp[(2) - (2)].declarator), FALSE); - free((yyvsp[(2) - (2)].declarator)); - ;} - break; - - case 244: - -/* Line 1464 of yacc.c */ -#line 762 "parser.y" - { (yyval.var) = NULL; ;} - break; - - case 246: - -/* Line 1464 of yacc.c */ -#line 766 "parser.y" - { (yyval.str) = NULL; ;} - break; - - case 247: - -/* Line 1464 of yacc.c */ -#line 767 "parser.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); ;} - break; - - case 248: - -/* Line 1464 of yacc.c */ -#line 768 "parser.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); ;} - break; - - case 249: - -/* Line 1464 of yacc.c */ -#line 771 "parser.y" - { (yyval.var) = make_var((yyvsp[(1) - (1)].str)); ;} - break; - - case 250: - -/* Line 1464 of yacc.c */ -#line 773 "parser.y" - { (yyval.var) = make_var((yyvsp[(1) - (1)].str)); ;} - break; - - case 251: - -/* Line 1464 of yacc.c */ -#line 776 "parser.y" - { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); ;} - break; - - case 252: - -/* Line 1464 of yacc.c */ -#line 777 "parser.y" - { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); ;} - break; - - case 254: - -/* Line 1464 of yacc.c */ -#line 779 "parser.y" - { (yyval.type) = type_new_int(type_basic_get_type((yyvsp[(2) - (2)].type)), -1); ;} - break; - - case 255: - -/* Line 1464 of yacc.c */ -#line 780 "parser.y" - { (yyval.type) = type_new_int(type_basic_get_type((yyvsp[(2) - (2)].type)), 1); ;} - break; - - case 256: - -/* Line 1464 of yacc.c */ -#line 781 "parser.y" - { (yyval.type) = type_new_int(TYPE_BASIC_INT, 1); ;} - break; - - case 257: - -/* Line 1464 of yacc.c */ -#line 782 "parser.y" - { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); ;} - break; - - case 258: - -/* Line 1464 of yacc.c */ -#line 783 "parser.y" - { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); ;} - break; - - case 259: - -/* Line 1464 of yacc.c */ -#line 784 "parser.y" - { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); ;} - break; - - case 260: - -/* Line 1464 of yacc.c */ -#line 785 "parser.y" - { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); ;} - break; - - case 261: - -/* Line 1464 of yacc.c */ -#line 786 "parser.y" - { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); ;} - break; - - case 264: - -/* Line 1464 of yacc.c */ -#line 793 "parser.y" - { (yyval.type) = type_new_int(TYPE_BASIC_INT, 0); ;} - break; - - case 265: - -/* Line 1464 of yacc.c */ -#line 794 "parser.y" - { (yyval.type) = type_new_int(TYPE_BASIC_INT16, 0); ;} - break; - - case 266: - -/* Line 1464 of yacc.c */ -#line 795 "parser.y" - { (yyval.type) = type_new_int(TYPE_BASIC_INT8, 0); ;} - break; - - case 267: - -/* Line 1464 of yacc.c */ -#line 796 "parser.y" - { (yyval.type) = type_new_int(TYPE_BASIC_INT32, 0); ;} - break; - - case 268: - -/* Line 1464 of yacc.c */ -#line 797 "parser.y" - { (yyval.type) = type_new_int(TYPE_BASIC_HYPER, 0); ;} - break; - - case 269: - -/* Line 1464 of yacc.c */ -#line 798 "parser.y" - { (yyval.type) = type_new_int(TYPE_BASIC_INT64, 0); ;} - break; - - case 270: - -/* Line 1464 of yacc.c */ -#line 799 "parser.y" - { (yyval.type) = type_new_int(TYPE_BASIC_CHAR, 0); ;} - break; - - case 271: - -/* Line 1464 of yacc.c */ -#line 800 "parser.y" - { (yyval.type) = type_new_int(TYPE_BASIC_INT3264, 0); ;} - break; - - case 272: - -/* Line 1464 of yacc.c */ -#line 803 "parser.y" - { (yyval.type) = type_new_coclass((yyvsp[(2) - (2)].str)); ;} - break; - - case 273: - -/* Line 1464 of yacc.c */ -#line 804 "parser.y" - { (yyval.type) = find_type((yyvsp[(2) - (2)].str), 0); - if (type_get_type_detect_alias((yyval.type)) != TYPE_COCLASS) - error_loc("%s was not declared a coclass at %s:%d\n", - (yyvsp[(2) - (2)].str), (yyval.type)->loc_info.input_name, - (yyval.type)->loc_info.line_number); - ;} - break; - - case 274: - -/* Line 1464 of yacc.c */ -#line 812 "parser.y" - { (yyval.type) = (yyvsp[(2) - (2)].type); - check_def((yyval.type)); - (yyval.type)->attrs = check_coclass_attrs((yyvsp[(2) - (2)].type)->name, (yyvsp[(1) - (2)].attr_list)); - ;} - break; - - case 275: - -/* Line 1464 of yacc.c */ -#line 819 "parser.y" - { (yyval.type) = type_coclass_define((yyvsp[(1) - (5)].type), (yyvsp[(3) - (5)].ifref_list)); ;} - break; - - case 276: - -/* Line 1464 of yacc.c */ -#line 822 "parser.y" - { (yyval.ifref_list) = NULL; ;} - break; - - case 277: - -/* Line 1464 of yacc.c */ -#line 823 "parser.y" - { (yyval.ifref_list) = append_ifref( (yyvsp[(1) - (2)].ifref_list), (yyvsp[(2) - (2)].ifref) ); ;} - break; - - case 278: - -/* Line 1464 of yacc.c */ -#line 827 "parser.y" - { (yyval.ifref) = make_ifref((yyvsp[(2) - (2)].type)); (yyval.ifref)->attrs = (yyvsp[(1) - (2)].attr_list); ;} - break; - - case 279: - -/* Line 1464 of yacc.c */ -#line 830 "parser.y" - { (yyval.type) = get_type(TYPE_INTERFACE, (yyvsp[(2) - (2)].str), 0); ;} - break; - - case 280: - -/* Line 1464 of yacc.c */ -#line 831 "parser.y" - { (yyval.type) = get_type(TYPE_INTERFACE, (yyvsp[(2) - (2)].str), 0); ;} - break; - - case 281: - -/* Line 1464 of yacc.c */ -#line 834 "parser.y" - { attr_t *attrs; - (yyval.type) = (yyvsp[(2) - (2)].type); - check_def((yyval.type)); - attrs = make_attr(ATTR_DISPINTERFACE); - (yyval.type)->attrs = append_attr( check_dispiface_attrs((yyvsp[(2) - (2)].type)->name, (yyvsp[(1) - (2)].attr_list)), attrs ); - (yyval.type)->defined = TRUE; - ;} - break; - - case 282: - -/* Line 1464 of yacc.c */ -#line 843 "parser.y" - { (yyval.var_list) = NULL; ;} - break; - - case 283: - -/* Line 1464 of yacc.c */ -#line 844 "parser.y" - { (yyval.var_list) = append_var( (yyvsp[(1) - (3)].var_list), (yyvsp[(2) - (3)].var) ); ;} - break; - - case 284: - -/* Line 1464 of yacc.c */ -#line 847 "parser.y" - { (yyval.var_list) = NULL; ;} - break; - - case 285: - -/* Line 1464 of yacc.c */ -#line 848 "parser.y" - { (yyval.var_list) = append_var( (yyvsp[(1) - (3)].var_list), (yyvsp[(2) - (3)].var) ); ;} - break; - - case 286: - -/* Line 1464 of yacc.c */ -#line 854 "parser.y" - { (yyval.type) = (yyvsp[(1) - (5)].type); - type_dispinterface_define((yyval.type), (yyvsp[(3) - (5)].var_list), (yyvsp[(4) - (5)].var_list)); - ;} - break; - - case 287: - -/* Line 1464 of yacc.c */ -#line 858 "parser.y" - { (yyval.type) = (yyvsp[(1) - (5)].type); - type_dispinterface_define_from_iface((yyval.type), (yyvsp[(3) - (5)].type)); - ;} - break; - - case 288: - -/* Line 1464 of yacc.c */ -#line 863 "parser.y" - { (yyval.type) = NULL; ;} - break; - - case 289: - -/* Line 1464 of yacc.c */ -#line 864 "parser.y" - { (yyval.type) = find_type_or_error2((yyvsp[(2) - (2)].str), 0); ;} - break; - - case 290: - -/* Line 1464 of yacc.c */ -#line 867 "parser.y" - { (yyval.type) = get_type(TYPE_INTERFACE, (yyvsp[(2) - (2)].str), 0); ;} - break; - - case 291: - -/* Line 1464 of yacc.c */ -#line 868 "parser.y" - { (yyval.type) = get_type(TYPE_INTERFACE, (yyvsp[(2) - (2)].str), 0); ;} - break; - - case 292: - -/* Line 1464 of yacc.c */ -#line 871 "parser.y" - { (yyval.ifinfo).interface = (yyvsp[(2) - (2)].type); - (yyval.ifinfo).old_pointer_default = pointer_default; - if (is_attr((yyvsp[(1) - (2)].attr_list), ATTR_POINTERDEFAULT)) - pointer_default = get_attrv((yyvsp[(1) - (2)].attr_list), ATTR_POINTERDEFAULT); - check_def((yyvsp[(2) - (2)].type)); - (yyvsp[(2) - (2)].type)->attrs = check_iface_attrs((yyvsp[(2) - (2)].type)->name, (yyvsp[(1) - (2)].attr_list)); - (yyvsp[(2) - (2)].type)->defined = TRUE; - ;} - break; - - case 293: - -/* Line 1464 of yacc.c */ -#line 882 "parser.y" - { (yyval.type) = (yyvsp[(1) - (6)].ifinfo).interface; - type_interface_define((yyval.type), (yyvsp[(2) - (6)].type), (yyvsp[(4) - (6)].stmt_list)); - pointer_default = (yyvsp[(1) - (6)].ifinfo).old_pointer_default; - ;} - break; - - case 294: - -/* Line 1464 of yacc.c */ -#line 890 "parser.y" - { (yyval.type) = (yyvsp[(1) - (8)].ifinfo).interface; - type_interface_define((yyval.type), find_type_or_error2((yyvsp[(3) - (8)].str), 0), (yyvsp[(6) - (8)].stmt_list)); - pointer_default = (yyvsp[(1) - (8)].ifinfo).old_pointer_default; - ;} - break; - - case 295: - -/* Line 1464 of yacc.c */ -#line 894 "parser.y" - { (yyval.type) = (yyvsp[(1) - (2)].type); ;} - break; - - case 296: - -/* Line 1464 of yacc.c */ -#line 898 "parser.y" - { (yyval.type) = (yyvsp[(1) - (2)].type); ;} - break; - - case 297: - -/* Line 1464 of yacc.c */ -#line 899 "parser.y" - { (yyval.type) = (yyvsp[(1) - (2)].type); ;} - break; - - case 298: - -/* Line 1464 of yacc.c */ -#line 902 "parser.y" - { (yyval.type) = type_new_module((yyvsp[(2) - (2)].str)); ;} - break; - - case 299: - -/* Line 1464 of yacc.c */ -#line 903 "parser.y" - { (yyval.type) = type_new_module((yyvsp[(2) - (2)].str)); ;} - break; - - case 300: - -/* Line 1464 of yacc.c */ -#line 906 "parser.y" - { (yyval.type) = (yyvsp[(2) - (2)].type); - (yyval.type)->attrs = check_module_attrs((yyvsp[(2) - (2)].type)->name, (yyvsp[(1) - (2)].attr_list)); - ;} - break; - - case 301: - -/* Line 1464 of yacc.c */ -#line 912 "parser.y" - { (yyval.type) = (yyvsp[(1) - (5)].type); - type_module_define((yyval.type), (yyvsp[(3) - (5)].stmt_list)); - ;} - break; - - case 302: - -/* Line 1464 of yacc.c */ -#line 918 "parser.y" - { (yyval.stgclass) = STG_EXTERN; ;} - break; - - case 303: - -/* Line 1464 of yacc.c */ -#line 919 "parser.y" - { (yyval.stgclass) = STG_STATIC; ;} - break; - - case 304: - -/* Line 1464 of yacc.c */ -#line 920 "parser.y" - { (yyval.stgclass) = STG_REGISTER; ;} - break; - - case 305: - -/* Line 1464 of yacc.c */ -#line 924 "parser.y" - { (yyval.attr) = make_attr(ATTR_INLINE); ;} - break; - - case 306: - -/* Line 1464 of yacc.c */ -#line 928 "parser.y" - { (yyval.attr) = make_attr(ATTR_CONST); ;} - break; - - case 307: - -/* Line 1464 of yacc.c */ -#line 931 "parser.y" - { (yyval.attr_list) = NULL; ;} - break; - - case 308: - -/* Line 1464 of yacc.c */ -#line 932 "parser.y" - { (yyval.attr_list) = append_attr((yyvsp[(1) - (2)].attr_list), (yyvsp[(2) - (2)].attr)); ;} - break; - - case 309: - -/* Line 1464 of yacc.c */ -#line 935 "parser.y" - { (yyval.declspec) = make_decl_spec((yyvsp[(1) - (2)].type), (yyvsp[(2) - (2)].declspec), NULL, NULL, STG_NONE); ;} - break; - - case 310: - -/* Line 1464 of yacc.c */ -#line 937 "parser.y" - { (yyval.declspec) = make_decl_spec((yyvsp[(2) - (3)].type), (yyvsp[(1) - (3)].declspec), (yyvsp[(3) - (3)].declspec), NULL, STG_NONE); ;} - break; - - case 311: - -/* Line 1464 of yacc.c */ -#line 940 "parser.y" - { (yyval.declspec) = NULL; ;} - break; - - case 313: - -/* Line 1464 of yacc.c */ -#line 945 "parser.y" - { (yyval.declspec) = make_decl_spec(NULL, (yyvsp[(2) - (2)].declspec), NULL, (yyvsp[(1) - (2)].attr), STG_NONE); ;} - break; - - case 314: - -/* Line 1464 of yacc.c */ -#line 946 "parser.y" - { (yyval.declspec) = make_decl_spec(NULL, (yyvsp[(2) - (2)].declspec), NULL, (yyvsp[(1) - (2)].attr), STG_NONE); ;} - break; - - case 315: - -/* Line 1464 of yacc.c */ -#line 947 "parser.y" - { (yyval.declspec) = make_decl_spec(NULL, (yyvsp[(2) - (2)].declspec), NULL, NULL, (yyvsp[(1) - (2)].stgclass)); ;} - break; - - case 316: - -/* Line 1464 of yacc.c */ -#line 952 "parser.y" - { (yyval.declarator) = (yyvsp[(3) - (3)].declarator); (yyval.declarator)->type = append_ptrchain_type((yyval.declarator)->type, type_new_pointer(pointer_default, NULL, (yyvsp[(2) - (3)].attr_list))); ;} - break; - - case 317: - -/* Line 1464 of yacc.c */ -#line 953 "parser.y" - { (yyval.declarator) = (yyvsp[(2) - (2)].declarator); if ((yyval.declarator)->func_type) (yyval.declarator)->func_type->attrs = append_attr((yyval.declarator)->func_type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); - else if ((yyval.declarator)->type) (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); ;} - break; - - case 319: - -/* Line 1464 of yacc.c */ -#line 959 "parser.y" - { (yyval.declarator) = make_declarator((yyvsp[(1) - (1)].var)); ;} - break; - - case 320: - -/* Line 1464 of yacc.c */ -#line 960 "parser.y" - { (yyval.declarator) = (yyvsp[(2) - (3)].declarator); ;} - break; - - case 321: - -/* Line 1464 of yacc.c */ -#line 961 "parser.y" - { (yyval.declarator) = (yyvsp[(1) - (2)].declarator); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[(2) - (2)].expr)); ;} - break; - - case 322: - -/* Line 1464 of yacc.c */ -#line 962 "parser.y" - { (yyval.declarator) = (yyvsp[(1) - (4)].declarator); - (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, type_new_function((yyvsp[(3) - (4)].var_list))); - (yyval.declarator)->type = NULL; - ;} - break; - - case 323: - -/* Line 1464 of yacc.c */ -#line 971 "parser.y" - { (yyval.declarator) = (yyvsp[(3) - (3)].declarator); (yyval.declarator)->type = append_ptrchain_type((yyval.declarator)->type, type_new_pointer(pointer_default, NULL, (yyvsp[(2) - (3)].attr_list))); ;} - break; - - case 324: - -/* Line 1464 of yacc.c */ -#line 972 "parser.y" - { (yyval.declarator) = (yyvsp[(2) - (2)].declarator); if ((yyval.declarator)->func_type) (yyval.declarator)->func_type->attrs = append_attr((yyval.declarator)->func_type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); - else if ((yyval.declarator)->type) (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); ;} - break; - - case 326: - -/* Line 1464 of yacc.c */ -#line 980 "parser.y" - { (yyval.declarator) = (yyvsp[(3) - (3)].declarator); (yyval.declarator)->type = append_ptrchain_type((yyval.declarator)->type, type_new_pointer(pointer_default, NULL, (yyvsp[(2) - (3)].attr_list))); ;} - break; - - case 327: - -/* Line 1464 of yacc.c */ -#line 981 "parser.y" - { (yyval.declarator) = (yyvsp[(2) - (2)].declarator); if ((yyval.declarator)->func_type) (yyval.declarator)->func_type->attrs = append_attr((yyval.declarator)->func_type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); - else if ((yyval.declarator)->type) (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); ;} - break; - - case 328: - -/* Line 1464 of yacc.c */ -#line 986 "parser.y" - { (yyval.declarator) = make_declarator(NULL); ;} - break; - - case 330: - -/* Line 1464 of yacc.c */ -#line 992 "parser.y" - { (yyval.declarator) = (yyvsp[(2) - (3)].declarator); ;} - break; - - case 331: - -/* Line 1464 of yacc.c */ -#line 993 "parser.y" - { (yyval.declarator) = (yyvsp[(1) - (2)].declarator); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[(2) - (2)].expr)); ;} - break; - - case 332: - -/* Line 1464 of yacc.c */ -#line 994 "parser.y" - { (yyval.declarator) = make_declarator(NULL); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[(1) - (1)].expr)); ;} - break; - - case 333: - -/* Line 1464 of yacc.c */ -#line 996 "parser.y" - { (yyval.declarator) = make_declarator(NULL); - (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, type_new_function((yyvsp[(2) - (3)].var_list))); - (yyval.declarator)->type = NULL; - ;} - break; - - case 334: - -/* Line 1464 of yacc.c */ -#line 1001 "parser.y" - { (yyval.declarator) = (yyvsp[(1) - (4)].declarator); - (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, type_new_function((yyvsp[(3) - (4)].var_list))); - (yyval.declarator)->type = NULL; - ;} - break; - - case 335: - -/* Line 1464 of yacc.c */ -#line 1010 "parser.y" - { (yyval.declarator) = (yyvsp[(3) - (3)].declarator); (yyval.declarator)->type = append_ptrchain_type((yyval.declarator)->type, type_new_pointer(pointer_default, NULL, (yyvsp[(2) - (3)].attr_list))); ;} - break; - - case 336: - -/* Line 1464 of yacc.c */ -#line 1011 "parser.y" - { (yyval.declarator) = (yyvsp[(2) - (2)].declarator); (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); ;} - break; - - case 338: - -/* Line 1464 of yacc.c */ -#line 1018 "parser.y" - { (yyval.declarator) = (yyvsp[(3) - (3)].declarator); (yyval.declarator)->type = append_ptrchain_type((yyval.declarator)->type, type_new_pointer(pointer_default, NULL, (yyvsp[(2) - (3)].attr_list))); ;} - break; - - case 339: - -/* Line 1464 of yacc.c */ -#line 1019 "parser.y" - { (yyval.declarator) = (yyvsp[(2) - (2)].declarator); (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); ;} - break; - - case 340: - -/* Line 1464 of yacc.c */ -#line 1023 "parser.y" - { (yyval.declarator) = make_declarator(NULL); ;} - break; - - case 342: - -/* Line 1464 of yacc.c */ -#line 1031 "parser.y" - { (yyval.declarator) = make_declarator((yyvsp[(1) - (1)].var)); ;} - break; - - case 343: - -/* Line 1464 of yacc.c */ -#line 1032 "parser.y" - { (yyval.declarator) = (yyvsp[(2) - (3)].declarator); ;} - break; - - case 344: - -/* Line 1464 of yacc.c */ -#line 1033 "parser.y" - { (yyval.declarator) = (yyvsp[(1) - (2)].declarator); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[(2) - (2)].expr)); ;} - break; - - case 345: - -/* Line 1464 of yacc.c */ -#line 1034 "parser.y" - { (yyval.declarator) = make_declarator(NULL); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[(1) - (1)].expr)); ;} - break; - - case 346: - -/* Line 1464 of yacc.c */ -#line 1036 "parser.y" - { (yyval.declarator) = make_declarator(NULL); - (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, type_new_function((yyvsp[(2) - (3)].var_list))); - (yyval.declarator)->type = NULL; - ;} - break; - - case 347: - -/* Line 1464 of yacc.c */ -#line 1041 "parser.y" - { (yyval.declarator) = (yyvsp[(1) - (4)].declarator); - (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, type_new_function((yyvsp[(3) - (4)].var_list))); - (yyval.declarator)->type = NULL; - ;} - break; - - case 348: - -/* Line 1464 of yacc.c */ -#line 1048 "parser.y" - { (yyval.declarator_list) = append_declarator( NULL, (yyvsp[(1) - (1)].declarator) ); ;} - break; - - case 349: - -/* Line 1464 of yacc.c */ -#line 1049 "parser.y" - { (yyval.declarator_list) = append_declarator( (yyvsp[(1) - (3)].declarator_list), (yyvsp[(3) - (3)].declarator) ); ;} - break; - - case 350: - -/* Line 1464 of yacc.c */ -#line 1052 "parser.y" - { (yyval.expr) = NULL; ;} - break; - - case 351: - -/* Line 1464 of yacc.c */ -#line 1053 "parser.y" - { (yyval.expr) = (yyvsp[(2) - (2)].expr); ;} - break; - - case 352: - -/* Line 1464 of yacc.c */ -#line 1056 "parser.y" - { (yyval.declarator) = (yyvsp[(1) - (2)].declarator); (yyval.declarator)->bits = (yyvsp[(2) - (2)].expr); - if (!(yyval.declarator)->bits && !(yyval.declarator)->var->name) - error_loc("unnamed fields are not allowed\n"); - ;} - break; - - case 353: - -/* Line 1464 of yacc.c */ -#line 1063 "parser.y" - { (yyval.declarator_list) = append_declarator( NULL, (yyvsp[(1) - (1)].declarator) ); ;} - break; - - case 354: - -/* Line 1464 of yacc.c */ -#line 1065 "parser.y" - { (yyval.declarator_list) = append_declarator( (yyvsp[(1) - (3)].declarator_list), (yyvsp[(3) - (3)].declarator) ); ;} - break; - - case 355: - -/* Line 1464 of yacc.c */ -#line 1069 "parser.y" - { (yyval.declarator) = (yyvsp[(1) - (1)].declarator); ;} - break; - - case 356: - -/* Line 1464 of yacc.c */ -#line 1070 "parser.y" - { (yyval.declarator) = (yyvsp[(1) - (3)].declarator); (yyvsp[(1) - (3)].declarator)->var->eval = (yyvsp[(3) - (3)].expr); ;} - break; - - case 357: - -/* Line 1464 of yacc.c */ -#line 1074 "parser.y" - { (yyval.num) = THREADING_APARTMENT; ;} - break; - - case 358: - -/* Line 1464 of yacc.c */ -#line 1075 "parser.y" - { (yyval.num) = THREADING_NEUTRAL; ;} - break; - - case 359: - -/* Line 1464 of yacc.c */ -#line 1076 "parser.y" - { (yyval.num) = THREADING_SINGLE; ;} - break; - - case 360: - -/* Line 1464 of yacc.c */ -#line 1077 "parser.y" - { (yyval.num) = THREADING_FREE; ;} - break; - - case 361: - -/* Line 1464 of yacc.c */ -#line 1078 "parser.y" - { (yyval.num) = THREADING_BOTH; ;} - break; - - case 362: - -/* Line 1464 of yacc.c */ -#line 1082 "parser.y" - { (yyval.num) = RPC_FC_RP; ;} - break; - - case 363: - -/* Line 1464 of yacc.c */ -#line 1083 "parser.y" - { (yyval.num) = RPC_FC_UP; ;} - break; - - case 364: - -/* Line 1464 of yacc.c */ -#line 1084 "parser.y" - { (yyval.num) = RPC_FC_FP; ;} - break; - - case 365: - -/* Line 1464 of yacc.c */ -#line 1087 "parser.y" - { (yyval.type) = type_new_struct((yyvsp[(2) - (5)].str), TRUE, (yyvsp[(4) - (5)].var_list)); ;} - break; - - case 366: - -/* Line 1464 of yacc.c */ -#line 1090 "parser.y" - { (yyval.type) = type_new_void(); ;} - break; - - case 367: - -/* Line 1464 of yacc.c */ -#line 1091 "parser.y" - { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); ;} - break; - - case 368: - -/* Line 1464 of yacc.c */ -#line 1092 "parser.y" - { (yyval.type) = (yyvsp[(1) - (1)].type); ;} - break; - - case 369: - -/* Line 1464 of yacc.c */ -#line 1093 "parser.y" - { (yyval.type) = (yyvsp[(1) - (1)].type); ;} - break; - - case 370: - -/* Line 1464 of yacc.c */ -#line 1094 "parser.y" - { (yyval.type) = type_new_enum((yyvsp[(2) - (2)].str), FALSE, NULL); ;} - break; - - case 371: - -/* Line 1464 of yacc.c */ -#line 1095 "parser.y" - { (yyval.type) = (yyvsp[(1) - (1)].type); ;} - break; - - case 372: - -/* Line 1464 of yacc.c */ -#line 1096 "parser.y" - { (yyval.type) = type_new_struct((yyvsp[(2) - (2)].str), FALSE, NULL); ;} - break; - - case 373: - -/* Line 1464 of yacc.c */ -#line 1097 "parser.y" - { (yyval.type) = (yyvsp[(1) - (1)].type); ;} - break; - - case 374: - -/* Line 1464 of yacc.c */ -#line 1098 "parser.y" - { (yyval.type) = type_new_nonencapsulated_union((yyvsp[(2) - (2)].str), FALSE, NULL); ;} - break; - - case 375: - -/* Line 1464 of yacc.c */ -#line 1099 "parser.y" - { (yyval.type) = make_safearray((yyvsp[(3) - (4)].type)); ;} - break; - - case 376: - -/* Line 1464 of yacc.c */ -#line 1103 "parser.y" - { reg_typedefs((yyvsp[(3) - (4)].declspec), (yyvsp[(4) - (4)].declarator_list), check_typedef_attrs((yyvsp[(2) - (4)].attr_list))); - (yyval.statement) = make_statement_typedef((yyvsp[(4) - (4)].declarator_list)); - ;} - break; - - case 377: - -/* Line 1464 of yacc.c */ -#line 1109 "parser.y" - { (yyval.type) = type_new_nonencapsulated_union((yyvsp[(2) - (5)].str), TRUE, (yyvsp[(4) - (5)].var_list)); ;} - break; - - case 378: - -/* Line 1464 of yacc.c */ -#line 1112 "parser.y" - { (yyval.type) = type_new_encapsulated_union((yyvsp[(2) - (10)].str), (yyvsp[(5) - (10)].var), (yyvsp[(7) - (10)].var), (yyvsp[(9) - (10)].var_list)); ;} - break; - - case 379: - -/* Line 1464 of yacc.c */ -#line 1116 "parser.y" - { (yyval.num) = MAKEVERSION((yyvsp[(1) - (1)].num), 0); ;} - break; - - case 380: - -/* Line 1464 of yacc.c */ -#line 1117 "parser.y" - { (yyval.num) = MAKEVERSION((yyvsp[(1) - (3)].num), (yyvsp[(3) - (3)].num)); ;} - break; - - - -/* Line 1464 of yacc.c */ -#line 5456 "parser.tab.c" - default: break; - } - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (YY_("syntax error")); -#else - { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - } - } - - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (yymsg); - } - else - { - yyerror (YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } - } -#endif - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - - yydestruct ("Error: popping", - yystos[yystate], yyvsp); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - *++yyvsp = yylval; - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined(yyoverflow) || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); -} - - - -/* Line 1684 of yacc.c */ -#line 1120 "parser.y" - - -static void decl_builtin_basic(const char *name, enum type_basic_type type) -{ - type_t *t = type_new_basic(type); - reg_type(t, name, 0); -} - -static void decl_builtin_alias(const char *name, type_t *t) -{ - reg_type(type_new_alias(t, name), name, 0); -} - -void init_types(void) -{ - decl_builtin_basic("byte", TYPE_BASIC_BYTE); - decl_builtin_basic("wchar_t", TYPE_BASIC_WCHAR); - decl_builtin_basic("float", TYPE_BASIC_FLOAT); - decl_builtin_basic("double", TYPE_BASIC_DOUBLE); - decl_builtin_basic("error_status_t", TYPE_BASIC_ERROR_STATUS_T); - decl_builtin_basic("handle_t", TYPE_BASIC_HANDLE); - decl_builtin_alias("boolean", type_new_basic(TYPE_BASIC_BYTE)); -} - -static str_list_t *append_str(str_list_t *list, char *str) -{ - struct str_list_entry_t *entry; - - if (!str) return list; - if (!list) - { - list = xmalloc( sizeof(*list) ); - list_init( list ); - } - entry = xmalloc( sizeof(*entry) ); - entry->str = str; - list_add_tail( list, &entry->entry ); - return list; -} - -static attr_list_t *append_attr(attr_list_t *list, attr_t *attr) -{ - attr_t *attr_existing; - if (!attr) return list; - if (!list) - { - list = xmalloc( sizeof(*list) ); - list_init( list ); - } - LIST_FOR_EACH_ENTRY(attr_existing, list, attr_t, entry) - if (attr_existing->type == attr->type) - { - parser_warning("duplicate attribute %s\n", get_attr_display_name(attr->type)); - /* use the last attribute, like MIDL does */ - list_remove(&attr_existing->entry); - break; - } - list_add_tail( list, &attr->entry ); - return list; -} - -static attr_list_t *move_attr(attr_list_t *dst, attr_list_t *src, enum attr_type type) -{ - attr_t *attr; - if (!src) return dst; - LIST_FOR_EACH_ENTRY(attr, src, attr_t, entry) - if (attr->type == type) - { - list_remove(&attr->entry); - return append_attr(dst, attr); - } - return dst; -} - -static attr_list_t *append_attr_list(attr_list_t *new_list, attr_list_t *old_list) -{ - struct list *entry; - - if (!old_list) return new_list; - - while ((entry = list_head(old_list))) - { - attr_t *attr = LIST_ENTRY(entry, attr_t, entry); - list_remove(entry); - new_list = append_attr(new_list, attr); - } - return new_list; -} - -static attr_list_t *dupattrs(const attr_list_t *list) -{ - attr_list_t *new_list; - const attr_t *attr; - - if (!list) return NULL; - - new_list = xmalloc( sizeof(*list) ); - list_init( new_list ); - LIST_FOR_EACH_ENTRY(attr, list, const attr_t, entry) - { - attr_t *new_attr = xmalloc(sizeof(*new_attr)); - *new_attr = *attr; - list_add_tail(new_list, &new_attr->entry); - } - return new_list; -} - -static decl_spec_t *make_decl_spec(type_t *type, decl_spec_t *left, decl_spec_t *right, attr_t *attr, enum storage_class stgclass) -{ - decl_spec_t *declspec = left ? left : right; - if (!declspec) - { - declspec = xmalloc(sizeof(*declspec)); - declspec->type = NULL; - declspec->attrs = NULL; - declspec->stgclass = STG_NONE; - } - declspec->type = type; - if (left && declspec != left) - { - declspec->attrs = append_attr_list(declspec->attrs, left->attrs); - if (declspec->stgclass == STG_NONE) - declspec->stgclass = left->stgclass; - else if (left->stgclass != STG_NONE) - error_loc("only one storage class can be specified\n"); - assert(!left->type); - free(left); - } - if (right && declspec != right) - { - declspec->attrs = append_attr_list(declspec->attrs, right->attrs); - if (declspec->stgclass == STG_NONE) - declspec->stgclass = right->stgclass; - else if (right->stgclass != STG_NONE) - error_loc("only one storage class can be specified\n"); - assert(!right->type); - free(right); - } - - declspec->attrs = append_attr(declspec->attrs, attr); - if (declspec->stgclass == STG_NONE) - declspec->stgclass = stgclass; - else if (stgclass != STG_NONE) - error_loc("only one storage class can be specified\n"); - - /* apply attributes to type */ - if (type && declspec->attrs) - { - attr_list_t *attrs; - declspec->type = duptype(type, 1); - attrs = dupattrs(type->attrs); - declspec->type->attrs = append_attr_list(attrs, declspec->attrs); - declspec->attrs = NULL; - } - - return declspec; -} - -static attr_t *make_attr(enum attr_type type) -{ - attr_t *a = xmalloc(sizeof(attr_t)); - a->type = type; - a->u.ival = 0; - return a; -} - -static attr_t *make_attrv(enum attr_type type, unsigned int val) -{ - attr_t *a = xmalloc(sizeof(attr_t)); - a->type = type; - a->u.ival = val; - return a; -} - -static attr_t *make_attrp(enum attr_type type, void *val) -{ - attr_t *a = xmalloc(sizeof(attr_t)); - a->type = type; - a->u.pval = val; - return a; -} - -static expr_list_t *append_expr(expr_list_t *list, expr_t *expr) -{ - if (!expr) return list; - if (!list) - { - list = xmalloc( sizeof(*list) ); - list_init( list ); - } - list_add_tail( list, &expr->entry ); - return list; -} - -static array_dims_t *append_array(array_dims_t *list, expr_t *expr) -{ - if (!expr) return list; - if (!list) - { - list = xmalloc( sizeof(*list) ); - list_init( list ); - } - list_add_tail( list, &expr->entry ); - return list; -} - -static struct list type_pool = LIST_INIT(type_pool); -typedef struct -{ - type_t data; - struct list link; -} type_pool_node_t; - -type_t *alloc_type(void) -{ - type_pool_node_t *node = xmalloc(sizeof *node); - list_add_tail(&type_pool, &node->link); - return &node->data; -} - -void set_all_tfswrite(int val) -{ - type_pool_node_t *node; - LIST_FOR_EACH_ENTRY(node, &type_pool, type_pool_node_t, link) - node->data.tfswrite = val; -} - -void clear_all_offsets(void) -{ - type_pool_node_t *node; - LIST_FOR_EACH_ENTRY(node, &type_pool, type_pool_node_t, link) - node->data.typestring_offset = node->data.ptrdesc = 0; -} - -static void type_function_add_head_arg(type_t *type, var_t *arg) -{ - if (!type->details.function->args) - { - type->details.function->args = xmalloc( sizeof(*type->details.function->args) ); - list_init( type->details.function->args ); - } - list_add_head( type->details.function->args, &arg->entry ); -} - -static int is_allowed_range_type(const type_t *type) -{ - switch (type_get_type(type)) - { - case TYPE_ENUM: - return TRUE; - case TYPE_BASIC: - switch (type_basic_get_type(type)) - { - case TYPE_BASIC_INT8: - case TYPE_BASIC_INT16: - case TYPE_BASIC_INT32: - case TYPE_BASIC_INT64: - case TYPE_BASIC_INT: - case TYPE_BASIC_INT3264: - case TYPE_BASIC_BYTE: - case TYPE_BASIC_CHAR: - case TYPE_BASIC_WCHAR: - case TYPE_BASIC_HYPER: - return TRUE; - case TYPE_BASIC_FLOAT: - case TYPE_BASIC_DOUBLE: - case TYPE_BASIC_ERROR_STATUS_T: - case TYPE_BASIC_HANDLE: - return FALSE; - } - return FALSE; - default: - return FALSE; - } -} - -static type_t *append_ptrchain_type(type_t *ptrchain, type_t *type) -{ - type_t *ptrchain_type; - if (!ptrchain) - return type; - for (ptrchain_type = ptrchain; type_pointer_get_ref(ptrchain_type); ptrchain_type = type_pointer_get_ref(ptrchain_type)) - ; - assert(ptrchain_type->type_type == TYPE_POINTER); - ptrchain_type->details.pointer.ref = type; - return ptrchain; -} - -static var_t *declare_var(attr_list_t *attrs, decl_spec_t *decl_spec, const declarator_t *decl, - int top) -{ - var_t *v = decl->var; - expr_list_t *sizes = get_attrp(attrs, ATTR_SIZEIS); - expr_list_t *lengs = get_attrp(attrs, ATTR_LENGTHIS); - int sizeless; - expr_t *dim; - type_t **ptype; - array_dims_t *arr = decl ? decl->array : NULL; - type_t *func_type = decl ? decl->func_type : NULL; - type_t *type = decl_spec->type; - - /* In case of a ranged type, duplicate it */ - if(is_attr(attrs, ATTR_RANGE)) - type = duptype(type, 1); - - if (is_attr(type->attrs, ATTR_INLINE)) - { - if (!func_type) - error_loc("inline attribute applied to non-function type\n"); - else - { - type_t *t; - /* move inline attribute from return type node to function node */ - for (t = func_type; is_ptr(t); t = type_pointer_get_ref(t)) - ; - t->attrs = move_attr(t->attrs, type->attrs, ATTR_INLINE); - } - } - - /* add type onto the end of the pointers in pident->type */ - v->type = append_ptrchain_type(decl ? decl->type : NULL, type); - v->stgclass = decl_spec->stgclass; - v->attrs = attrs; - - /* check for pointer attribute being applied to non-pointer, non-array - * type */ - if (!arr) - { - int ptr_attr = get_attrv(v->attrs, ATTR_POINTERTYPE); - const type_t *ptr = NULL; - /* pointer attributes on the left side of the type belong to the function - * pointer, if one is being declared */ - type_t **pt = func_type ? &func_type : &v->type; - for (ptr = *pt; ptr && !ptr_attr; ) - { - ptr_attr = get_attrv(ptr->attrs, ATTR_POINTERTYPE); - if (!ptr_attr && type_is_alias(ptr)) - ptr = type_alias_get_aliasee(ptr); - else - break; - } - if (is_ptr(ptr)) - { - if (ptr_attr && ptr_attr != RPC_FC_UP && - type_get_type(type_pointer_get_ref(ptr)) == TYPE_INTERFACE) - warning_loc_info(&v->loc_info, - "%s: pointer attribute applied to interface " - "pointer type has no effect\n", v->name); - if (!ptr_attr && top && (*pt)->details.pointer.def_fc != RPC_FC_RP) - { - /* FIXME: this is a horrible hack to cope with the issue that we - * store an offset to the typeformat string in the type object, but - * two typeformat strings may be written depending on whether the - * pointer is a toplevel parameter or not */ - *pt = duptype(*pt, 1); - } - } - else if (ptr_attr) - error_loc("%s: pointer attribute applied to non-pointer type\n", v->name); - } - - if (is_attr(v->attrs, ATTR_STRING)) - { - type_t *t = type; - - if (!is_ptr(v->type) && !arr) - error_loc("'%s': [string] attribute applied to non-pointer, non-array type\n", - v->name); - - while (is_ptr(t)) - t = type_pointer_get_ref(t); - - if (type_get_type(t) != TYPE_BASIC && - (get_basic_fc(t) != RPC_FC_CHAR && - get_basic_fc(t) != RPC_FC_BYTE && - get_basic_fc(t) != RPC_FC_WCHAR)) - { - error_loc("'%s': [string] attribute is only valid on 'char', 'byte', or 'wchar_t' pointers and arrays\n", - v->name); - } - } - - if (is_attr(v->attrs, ATTR_V1ENUM)) - { - if (type_get_type_detect_alias(v->type) != TYPE_ENUM) - error_loc("'%s': [v1_enum] attribute applied to non-enum type\n", v->name); - } - - if (is_attr(v->attrs, ATTR_RANGE) && !is_allowed_range_type(v->type)) - error_loc("'%s': [range] attribute applied to non-integer type\n", - v->name); - - ptype = &v->type; - sizeless = FALSE; - if (arr) LIST_FOR_EACH_ENTRY_REV(dim, arr, expr_t, entry) - { - if (sizeless) - error_loc("%s: only the first array dimension can be unspecified\n", v->name); - - if (dim->is_const) - { - if (dim->cval <= 0) - error_loc("%s: array dimension must be positive\n", v->name); - - /* FIXME: should use a type_memsize that allows us to pass in a pointer size */ - if (0) - { - unsigned int size = type_memsize(v->type); - - if (0xffffffffu / size < dim->cval) - error_loc("%s: total array size is too large\n", v->name); - } - } - else - sizeless = TRUE; - - *ptype = type_new_array(NULL, *ptype, FALSE, - dim->is_const ? dim->cval : 0, - dim->is_const ? NULL : dim, NULL, - pointer_default); - } - - ptype = &v->type; - if (sizes) LIST_FOR_EACH_ENTRY(dim, sizes, expr_t, entry) - { - if (dim->type != EXPR_VOID) - { - if (is_array(*ptype)) - { - if (!type_array_get_conformance(*ptype) || - type_array_get_conformance(*ptype)->type != EXPR_VOID) - error_loc("%s: cannot specify size_is for an already sized array\n", v->name); - else - *ptype = type_new_array((*ptype)->name, - type_array_get_element(*ptype), FALSE, - 0, dim, NULL, 0); - } - else if (is_ptr(*ptype)) - *ptype = type_new_array((*ptype)->name, type_pointer_get_ref(*ptype), TRUE, - 0, dim, NULL, pointer_default); - else - error_loc("%s: size_is attribute applied to illegal type\n", v->name); - } - - if (is_ptr(*ptype)) - ptype = &(*ptype)->details.pointer.ref; - else if (is_array(*ptype)) - ptype = &(*ptype)->details.array.elem; - else - error_loc("%s: too many expressions in size_is attribute\n", v->name); - } - - ptype = &v->type; - if (lengs) LIST_FOR_EACH_ENTRY(dim, lengs, expr_t, entry) - { - if (dim->type != EXPR_VOID) - { - if (is_array(*ptype)) - { - *ptype = type_new_array((*ptype)->name, - type_array_get_element(*ptype), - type_array_is_decl_as_ptr(*ptype), - type_array_get_dim(*ptype), - type_array_get_conformance(*ptype), - dim, type_array_get_ptr_default_fc(*ptype)); - } - else - error_loc("%s: length_is attribute applied to illegal type\n", v->name); - } - - if (is_ptr(*ptype)) - ptype = &(*ptype)->details.pointer.ref; - else if (is_array(*ptype)) - ptype = &(*ptype)->details.array.elem; - else - error_loc("%s: too many expressions in length_is attribute\n", v->name); - } - - /* v->type is currently pointing to the type on the left-side of the - * declaration, so we need to fix this up so that it is the return type of the - * function and make v->type point to the function side of the declaration */ - if (func_type) - { - type_t *ft, *t; - type_t *return_type = v->type; - v->type = func_type; - for (ft = v->type; is_ptr(ft); ft = type_pointer_get_ref(ft)) - ; - assert(type_get_type_detect_alias(ft) == TYPE_FUNCTION); - ft->details.function->rettype = return_type; - /* move calling convention attribute, if present, from pointer nodes to - * function node */ - for (t = v->type; is_ptr(t); t = type_pointer_get_ref(t)) - ft->attrs = move_attr(ft->attrs, t->attrs, ATTR_CALLCONV); - } - else - { - type_t *t; - for (t = v->type; is_ptr(t); t = type_pointer_get_ref(t)) - if (is_attr(t->attrs, ATTR_CALLCONV)) - error_loc("calling convention applied to non-function-pointer type\n"); - } - - if (decl->bits) - v->type = type_new_bitfield(v->type, decl->bits); - - return v; -} - -static var_list_t *set_var_types(attr_list_t *attrs, decl_spec_t *decl_spec, declarator_list_t *decls) -{ - declarator_t *decl, *next; - var_list_t *var_list = NULL; - - LIST_FOR_EACH_ENTRY_SAFE( decl, next, decls, declarator_t, entry ) - { - var_t *var = declare_var(attrs, decl_spec, decl, 0); - var_list = append_var(var_list, var); - free(decl); - } - free(decl_spec); - return var_list; -} - -static ifref_list_t *append_ifref(ifref_list_t *list, ifref_t *iface) -{ - if (!iface) return list; - if (!list) - { - list = xmalloc( sizeof(*list) ); - list_init( list ); - } - list_add_tail( list, &iface->entry ); - return list; -} - -static ifref_t *make_ifref(type_t *iface) -{ - ifref_t *l = xmalloc(sizeof(ifref_t)); - l->iface = iface; - l->attrs = NULL; - return l; -} - -var_list_t *append_var(var_list_t *list, var_t *var) -{ - if (!var) return list; - if (!list) - { - list = xmalloc( sizeof(*list) ); - list_init( list ); - } - list_add_tail( list, &var->entry ); - return list; -} - -static var_list_t *append_var_list(var_list_t *list, var_list_t *vars) -{ - if (!vars) return list; - if (!list) - { - list = xmalloc( sizeof(*list) ); - list_init( list ); - } - list_move_tail( list, vars ); - return list; -} - -var_t *make_var(char *name) -{ - var_t *v = xmalloc(sizeof(var_t)); - v->name = name; - v->type = NULL; - v->attrs = NULL; - v->eval = NULL; - v->stgclass = STG_NONE; - init_loc_info(&v->loc_info); - return v; -} - -static declarator_list_t *append_declarator(declarator_list_t *list, declarator_t *d) -{ - if (!d) return list; - if (!list) { - list = xmalloc(sizeof(*list)); - list_init(list); - } - list_add_tail(list, &d->entry); - return list; -} - -static declarator_t *make_declarator(var_t *var) -{ - declarator_t *d = xmalloc(sizeof(*d)); - d->var = var ? var : make_var(NULL); - d->type = NULL; - d->func_type = NULL; - d->array = NULL; - d->bits = NULL; - return d; -} - -static type_t *make_safearray(type_t *type) -{ - return type_new_array(NULL, type_new_alias(type, "SAFEARRAY"), TRUE, 0, - NULL, NULL, RPC_FC_RP); -} - -static typelib_t *make_library(const char *name, const attr_list_t *attrs) -{ - typelib_t *typelib = xmalloc(sizeof(*typelib)); - typelib->name = xstrdup(name); - typelib->attrs = attrs; - list_init( &typelib->importlibs ); - return typelib; -} - -#define HASHMAX 64 - -static int hash_ident(const char *name) -{ - const char *p = name; - int sum = 0; - /* a simple sum hash is probably good enough */ - while (*p) { - sum += *p; - p++; - } - return sum & (HASHMAX-1); -} - -/***** type repository *****/ - -struct rtype { - const char *name; - type_t *type; - int t; - struct rtype *next; -}; - -struct rtype *type_hash[HASHMAX]; - -type_t *reg_type(type_t *type, const char *name, int t) -{ - struct rtype *nt; - int hash; - if (!name) { - error_loc("registering named type without name\n"); - return type; - } - hash = hash_ident(name); - nt = xmalloc(sizeof(struct rtype)); - nt->name = name; - nt->type = type; - nt->t = t; - nt->next = type_hash[hash]; - type_hash[hash] = nt; - if ((t == tsSTRUCT || t == tsUNION)) - fix_incomplete_types(type); - return type; -} - -static int is_incomplete(const type_t *t) -{ - return !t->defined && - (type_get_type_detect_alias(t) == TYPE_STRUCT || - type_get_type_detect_alias(t) == TYPE_UNION || - type_get_type_detect_alias(t) == TYPE_ENCAPSULATED_UNION); -} - -void add_incomplete(type_t *t) -{ - struct typenode *tn = xmalloc(sizeof *tn); - tn->type = t; - list_add_tail(&incomplete_types, &tn->entry); -} - -static void fix_type(type_t *t) -{ - if (type_is_alias(t) && is_incomplete(t)) { - type_t *ot = type_alias_get_aliasee(t); - fix_type(ot); - if (type_get_type_detect_alias(ot) == TYPE_STRUCT || - type_get_type_detect_alias(ot) == TYPE_UNION || - type_get_type_detect_alias(ot) == TYPE_ENCAPSULATED_UNION) - t->details.structure = ot->details.structure; - t->defined = ot->defined; - } -} - -static void fix_incomplete(void) -{ - struct typenode *tn, *next; - - LIST_FOR_EACH_ENTRY_SAFE(tn, next, &incomplete_types, struct typenode, entry) { - fix_type(tn->type); - list_remove(&tn->entry); - free(tn); - } -} - -static void fix_incomplete_types(type_t *complete_type) -{ - struct typenode *tn, *next; - - LIST_FOR_EACH_ENTRY_SAFE(tn, next, &incomplete_types, struct typenode, entry) - { - if (type_is_equal(complete_type, tn->type)) - { - tn->type->details.structure = complete_type->details.structure; - list_remove(&tn->entry); - free(tn); - } - } -} - -static type_t *reg_typedefs(decl_spec_t *decl_spec, declarator_list_t *decls, attr_list_t *attrs) -{ - const declarator_t *decl; - type_t *type = decl_spec->type; - - /* We must generate names for tagless enum, struct or union. - Typedef-ing a tagless enum, struct or union means we want the typedef - to be included in a library hence the public attribute. */ - if ((type_get_type_detect_alias(type) == TYPE_ENUM || - type_get_type_detect_alias(type) == TYPE_STRUCT || - type_get_type_detect_alias(type) == TYPE_UNION || - type_get_type_detect_alias(type) == TYPE_ENCAPSULATED_UNION) && - !type->name && !parse_only) - { - if (! is_attr(attrs, ATTR_PUBLIC)) - attrs = append_attr( attrs, make_attr(ATTR_PUBLIC) ); - type->name = gen_name(); - } - else if (is_attr(attrs, ATTR_UUID) && !is_attr(attrs, ATTR_PUBLIC)) - attrs = append_attr( attrs, make_attr(ATTR_PUBLIC) ); - - /* Append the SWITCHTYPE attribute to a non-encapsulated union if it does not already have it. */ - if (type_get_type_detect_alias(type) == TYPE_UNION && - is_attr(attrs, ATTR_SWITCHTYPE) && - !is_attr(type->attrs, ATTR_SWITCHTYPE)) - type->attrs = append_attr(type->attrs, make_attrp(ATTR_SWITCHTYPE, get_attrp(attrs, ATTR_SWITCHTYPE))); - - LIST_FOR_EACH_ENTRY( decl, decls, const declarator_t, entry ) - { - - if (decl->var->name) { - type_t *cur; - var_t *name; - - cur = find_type(decl->var->name, 0); - if (cur) - error_loc("%s: redefinition error; original definition was at %s:%d\n", - cur->name, cur->loc_info.input_name, - cur->loc_info.line_number); - - name = declare_var(attrs, decl_spec, decl, 0); - cur = type_new_alias(name->type, name->name); - cur->attrs = attrs; - - if (is_incomplete(cur)) - add_incomplete(cur); - reg_type(cur, cur->name, 0); - } - } - return type; -} - -type_t *find_type(const char *name, int t) -{ - struct rtype *cur = type_hash[hash_ident(name)]; - while (cur && (cur->t != t || strcmp(cur->name, name))) - cur = cur->next; - return cur ? cur->type : NULL; -} - -static type_t *find_type_or_error(const char *name, int t) -{ - type_t *type = find_type(name, t); - if (!type) { - error_loc("type '%s' not found\n", name); - return NULL; - } - return type; -} - -static type_t *find_type_or_error2(char *name, int t) -{ - type_t *tp = find_type_or_error(name, t); - free(name); - return tp; -} - -int is_type(const char *name) -{ - return find_type(name, 0) != NULL; -} - -type_t *get_type(enum type_type type, char *name, int t) -{ - type_t *tp; - if (name) { - tp = find_type(name, t); - if (tp) { - free(name); - return tp; - } - } - tp = make_type(type); - tp->name = name; - if (!name) return tp; - return reg_type(tp, name, t); -} - -/***** constant repository *****/ - -struct rconst { - char *name; - var_t *var; - struct rconst *next; -}; - -struct rconst *const_hash[HASHMAX]; - -static var_t *reg_const(var_t *var) -{ - struct rconst *nc; - int hash; - if (!var->name) { - error_loc("registering constant without name\n"); - return var; - } - hash = hash_ident(var->name); - nc = xmalloc(sizeof(struct rconst)); - nc->name = var->name; - nc->var = var; - nc->next = const_hash[hash]; - const_hash[hash] = nc; - return var; -} - -var_t *find_const(const char *name, int f) -{ - struct rconst *cur = const_hash[hash_ident(name)]; - while (cur && strcmp(cur->name, name)) - cur = cur->next; - if (!cur) { - if (f) error_loc("constant '%s' not found\n", name); - return NULL; - } - return cur->var; -} - -static char *gen_name(void) -{ - static const char format[] = "__WIDL_%s_generated_name_%08lX"; - static unsigned long n = 0; - static const char *file_id; - static size_t size; - char *name; - - if (! file_id) - { - char *dst = dup_basename(input_name, ".idl"); - file_id = dst; - - for (; *dst; ++dst) - if (! isalnum((unsigned char) *dst)) - *dst = '_'; - - size = sizeof format - 7 + strlen(file_id) + 8; - } - - name = xmalloc(size); - sprintf(name, format, file_id, n++); - return name; -} - -struct allowed_attr -{ - unsigned int dce_compatible : 1; - unsigned int acf : 1; - unsigned int on_interface : 1; - unsigned int on_function : 1; - unsigned int on_arg : 1; - unsigned int on_type : 1; - unsigned int on_enum : 1; - unsigned int on_struct : 1; - unsigned int on_union : 1; - unsigned int on_field : 1; - unsigned int on_library : 1; - unsigned int on_dispinterface : 1; - unsigned int on_module : 1; - unsigned int on_coclass : 1; - const char *display_name; -}; - -struct allowed_attr allowed_attr[] = -{ - /* attr { D ACF I Fn ARG T En St Un Fi L DI M C } */ - /* ATTR_AGGREGATABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "aggregatable" }, - /* ATTR_ANNOTATION */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "annotation" }, - /* ATTR_APPOBJECT */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "appobject" }, - /* ATTR_ASYNC */ { 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "async" }, - /* ATTR_AUTO_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "auto_handle" }, - /* ATTR_BINDABLE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "bindable" }, - /* ATTR_BROADCAST */ { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "broadcast" }, - /* ATTR_CALLAS */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "call_as" }, - /* ATTR_CALLCONV */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL }, - /* ATTR_CASE */ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "case" }, - /* ATTR_CODE */ { 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "code" }, - /* ATTR_COMMSTATUS */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "comm_status" }, - /* ATTR_CONST */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "const" }, - /* ATTR_CONTEXTHANDLE */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "context_handle" }, - /* ATTR_CONTROL */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, "control" }, - /* ATTR_DECODE */ { 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "decode" }, - /* ATTR_DEFAULT */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, "default" }, - /* ATTR_DEFAULTBIND */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "defaultbind" }, - /* ATTR_DEFAULTCOLLELEM */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "defaultcollelem" }, - /* ATTR_DEFAULTVALUE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "defaultvalue" }, - /* ATTR_DEFAULTVTABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "defaultvtable" }, - /* ATTR_DISABLECONSISTENCYCHECK */{ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "disable_consistency_check" }, - /* ATTR_DISPINTERFACE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL }, - /* ATTR_DISPLAYBIND */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "displaybind" }, - /* ATTR_DLLNAME */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, "dllname" }, - /* ATTR_DUAL */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "dual" }, - /* ATTR_ENABLEALLOCATE */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "enable_allocate" }, - /* ATTR_ENCODE */ { 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "encode" }, - /* ATTR_ENDPOINT */ { 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "endpoint" }, - /* ATTR_ENTRY */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "entry" }, - /* ATTR_EXPLICIT_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "explicit_handle" }, - /* ATTR_FAULTSTATUS */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "fault_status" }, - /* ATTR_FORCEALLOCATE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "force_allocate" }, - /* ATTR_HANDLE */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "handle" }, - /* ATTR_HELPCONTEXT */ { 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, "helpcontext" }, - /* ATTR_HELPFILE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "helpfile" }, - /* ATTR_HELPSTRING */ { 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, "helpstring" }, - /* ATTR_HELPSTRINGCONTEXT */ { 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, "helpstringcontext" }, - /* ATTR_HELPSTRINGDLL */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "helpstringdll" }, - /* ATTR_HIDDEN */ { 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, "hidden" }, - /* ATTR_ID */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "id" }, - /* ATTR_IDEMPOTENT */ { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "idempotent" }, - /* ATTR_IGNORE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "ignore" }, - /* ATTR_IIDIS */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "iid_is" }, - /* ATTR_IMMEDIATEBIND */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "immediatebind" }, - /* ATTR_IMPLICIT_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "implicit_handle" }, - /* ATTR_IN */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "in" }, - /* ATTR_INLINE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "inline" }, - /* ATTR_INPUTSYNC */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "inputsync" }, - /* ATTR_LENGTHIS */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "length_is" }, - /* ATTR_LIBLCID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "lcid" }, - /* ATTR_LICENSED */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "licensed" }, - /* ATTR_LOCAL */ { 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "local" }, - /* ATTR_MAYBE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "maybe" }, - /* ATTR_MESSAGE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "message" }, - /* ATTR_NOCODE */ { 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "nocode" }, - /* ATTR_NONBROWSABLE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "nonbrowsable" }, - /* ATTR_NONCREATABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "noncreatable" }, - /* ATTR_NONEXTENSIBLE */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "nonextensible" }, - /* ATTR_NOTIFY */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "notify" }, - /* ATTR_NOTIFYFLAG */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "notify_flag" }, - /* ATTR_OBJECT */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "object" }, - /* ATTR_ODL */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, "odl" }, - /* ATTR_OLEAUTOMATION */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "oleautomation" }, - /* ATTR_OPTIMIZE */ { 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "optimize" }, - /* ATTR_OPTIONAL */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "optional" }, - /* ATTR_OUT */ { 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "out" }, - /* ATTR_PARAMLCID */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "lcid" }, - /* ATTR_PARTIALIGNORE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "partial_ignore" }, - /* ATTR_POINTERDEFAULT */ { 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "pointer_default" }, - /* ATTR_POINTERTYPE */ { 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, "ref, unique or ptr" }, - /* ATTR_PROGID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "progid" }, - /* ATTR_PROPGET */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "propget" }, - /* ATTR_PROPPUT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "propput" }, - /* ATTR_PROPPUTREF */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "propputref" }, - /* ATTR_PROXY */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "proxy" }, - /* ATTR_PUBLIC */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "public" }, - /* ATTR_RANGE */ { 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, "range" }, - /* ATTR_READONLY */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "readonly" }, - /* ATTR_REPRESENTAS */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "represent_as" }, - /* ATTR_REQUESTEDIT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "requestedit" }, - /* ATTR_RESTRICTED */ { 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, "restricted" }, - /* ATTR_RETVAL */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "retval" }, - /* ATTR_SIZEIS */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "size_is" }, - /* ATTR_SOURCE */ { 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, "source" }, - /* ATTR_STRICTCONTEXTHANDLE */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "strict_context_handle" }, - /* ATTR_STRING */ { 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, "string" }, - /* ATTR_SWITCHIS */ { 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "switch_is" }, - /* ATTR_SWITCHTYPE */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, "switch_type" }, - /* ATTR_THREADING */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "threading" }, - /* ATTR_TRANSMITAS */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "transmit_as" }, - /* ATTR_UIDEFAULT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "uidefault" }, - /* ATTR_USESGETLASTERROR */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "usesgetlasterror" }, - /* ATTR_USERMARSHAL */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "user_marshal" }, - /* ATTR_UUID */ { 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, "uuid" }, - /* ATTR_V1ENUM */ { 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, "v1_enum" }, - /* ATTR_VARARG */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "vararg" }, - /* ATTR_VERSION */ { 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, "version" }, - /* ATTR_VIPROGID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "vi_progid" }, - /* ATTR_WIREMARSHAL */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "wire_marshal" }, -}; - -const char *get_attr_display_name(enum attr_type type) -{ - return allowed_attr[type].display_name; -} - -static attr_list_t *check_iface_attrs(const char *name, attr_list_t *attrs) -{ - const attr_t *attr; - if (!attrs) return attrs; - LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) - { - if (!allowed_attr[attr->type].on_interface) - error_loc("inapplicable attribute %s for interface %s\n", - allowed_attr[attr->type].display_name, name); - if (attr->type == ATTR_IMPLICIT_HANDLE) - { - const var_t *var = attr->u.pval; - if (type_get_type( var->type) == TYPE_BASIC && - type_basic_get_type( var->type ) == TYPE_BASIC_HANDLE) - continue; - if (is_aliaschain_attr( var->type, ATTR_HANDLE )) - continue; - error_loc("attribute %s requires a handle type in interface %s\n", - allowed_attr[attr->type].display_name, name); - } - } - return attrs; -} - -static attr_list_t *check_function_attrs(const char *name, attr_list_t *attrs) -{ - const attr_t *attr; - if (!attrs) return attrs; - LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) - { - if (!allowed_attr[attr->type].on_function) - error_loc("inapplicable attribute %s for function %s\n", - allowed_attr[attr->type].display_name, name); - } - return attrs; -} - -static void check_arg_attrs(const var_t *arg) -{ - const attr_t *attr; - - if (arg->attrs) - { - LIST_FOR_EACH_ENTRY(attr, arg->attrs, const attr_t, entry) - { - if (!allowed_attr[attr->type].on_arg) - error_loc("inapplicable attribute %s for argument %s\n", - allowed_attr[attr->type].display_name, arg->name); - } - } -} - -static attr_list_t *check_typedef_attrs(attr_list_t *attrs) -{ - const attr_t *attr; - if (!attrs) return attrs; - LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) - { - if (!allowed_attr[attr->type].on_type) - error_loc("inapplicable attribute %s for typedef\n", - allowed_attr[attr->type].display_name); - } - return attrs; -} - -static attr_list_t *check_enum_attrs(attr_list_t *attrs) -{ - const attr_t *attr; - if (!attrs) return attrs; - LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) - { - if (!allowed_attr[attr->type].on_enum) - error_loc("inapplicable attribute %s for enum\n", - allowed_attr[attr->type].display_name); - } - return attrs; -} - -static attr_list_t *check_struct_attrs(attr_list_t *attrs) -{ - const attr_t *attr; - if (!attrs) return attrs; - LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) - { - if (!allowed_attr[attr->type].on_struct) - error_loc("inapplicable attribute %s for struct\n", - allowed_attr[attr->type].display_name); - } - return attrs; -} - -static attr_list_t *check_union_attrs(attr_list_t *attrs) -{ - const attr_t *attr; - if (!attrs) return attrs; - LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) - { - if (!allowed_attr[attr->type].on_union) - error_loc("inapplicable attribute %s for union\n", - allowed_attr[attr->type].display_name); - } - return attrs; -} - -static attr_list_t *check_field_attrs(const char *name, attr_list_t *attrs) -{ - const attr_t *attr; - if (!attrs) return attrs; - LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) - { - if (!allowed_attr[attr->type].on_field) - error_loc("inapplicable attribute %s for field %s\n", - allowed_attr[attr->type].display_name, name); - } - return attrs; -} - -static attr_list_t *check_library_attrs(const char *name, attr_list_t *attrs) -{ - const attr_t *attr; - if (!attrs) return attrs; - LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) - { - if (!allowed_attr[attr->type].on_library) - error_loc("inapplicable attribute %s for library %s\n", - allowed_attr[attr->type].display_name, name); - } - return attrs; -} - -static attr_list_t *check_dispiface_attrs(const char *name, attr_list_t *attrs) -{ - const attr_t *attr; - if (!attrs) return attrs; - LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) - { - if (!allowed_attr[attr->type].on_dispinterface) - error_loc("inapplicable attribute %s for dispinterface %s\n", - allowed_attr[attr->type].display_name, name); - } - return attrs; -} - -static attr_list_t *check_module_attrs(const char *name, attr_list_t *attrs) -{ - const attr_t *attr; - if (!attrs) return attrs; - LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) - { - if (!allowed_attr[attr->type].on_module) - error_loc("inapplicable attribute %s for module %s\n", - allowed_attr[attr->type].display_name, name); - } - return attrs; -} - -static attr_list_t *check_coclass_attrs(const char *name, attr_list_t *attrs) -{ - const attr_t *attr; - if (!attrs) return attrs; - LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) - { - if (!allowed_attr[attr->type].on_coclass) - error_loc("inapplicable attribute %s for coclass %s\n", - allowed_attr[attr->type].display_name, name); - } - return attrs; -} - -static int is_allowed_conf_type(const type_t *type) -{ - switch (type_get_type(type)) - { - case TYPE_ENUM: - return TRUE; - case TYPE_BASIC: - switch (type_basic_get_type(type)) - { - case TYPE_BASIC_INT8: - case TYPE_BASIC_INT16: - case TYPE_BASIC_INT32: - case TYPE_BASIC_INT64: - case TYPE_BASIC_INT: - case TYPE_BASIC_CHAR: - case TYPE_BASIC_HYPER: - case TYPE_BASIC_BYTE: - case TYPE_BASIC_WCHAR: - return TRUE; - default: - return FALSE; - } - case TYPE_ALIAS: - /* shouldn't get here because of type_get_type call above */ - assert(0); - /* fall through */ - case TYPE_STRUCT: - case TYPE_UNION: - case TYPE_ENCAPSULATED_UNION: - case TYPE_ARRAY: - case TYPE_POINTER: - case TYPE_VOID: - case TYPE_MODULE: - case TYPE_COCLASS: - case TYPE_FUNCTION: - case TYPE_INTERFACE: - case TYPE_BITFIELD: - return FALSE; - } - return FALSE; -} - -static int is_ptr_guid_type(const type_t *type) -{ - /* first, make sure it is a pointer to something */ - if (!is_ptr(type)) return FALSE; - - /* second, make sure it is a pointer to something of size sizeof(GUID), - * i.e. 16 bytes */ - return (type_memsize(type_pointer_get_ref(type)) == 16); -} - -static void check_conformance_expr_list(const char *attr_name, const var_t *arg, const type_t *container_type, expr_list_t *expr_list) -{ - expr_t *dim; - struct expr_loc expr_loc; - expr_loc.v = arg; - expr_loc.attr = attr_name; - if (expr_list) LIST_FOR_EACH_ENTRY(dim, expr_list, expr_t, entry) - { - if (dim->type != EXPR_VOID) - { - const type_t *expr_type = expr_resolve_type(&expr_loc, container_type, dim); - if (!is_allowed_conf_type(expr_type)) - error_loc_info(&arg->loc_info, "expression must resolve to integral type <= 32bits for attribute %s\n", - attr_name); - } - } -} - -static void check_remoting_fields(const var_t *var, type_t *type); - -/* checks that properties common to fields and arguments are consistent */ -static void check_field_common(const type_t *container_type, - const char *container_name, const var_t *arg) -{ - type_t *type = arg->type; - int more_to_do; - const char *container_type_name; - const char *var_type; - - switch (type_get_type(container_type)) - { - case TYPE_STRUCT: - container_type_name = "struct"; - var_type = "field"; - break; - case TYPE_UNION: - container_type_name = "union"; - var_type = "arm"; - break; - case TYPE_ENCAPSULATED_UNION: - container_type_name = "encapsulated union"; - var_type = "arm"; - break; - case TYPE_FUNCTION: - container_type_name = "function"; - var_type = "parameter"; - break; - default: - /* should be no other container types */ - assert(0); - return; - } - - if (is_attr(arg->attrs, ATTR_LENGTHIS) && - (is_attr(arg->attrs, ATTR_STRING) || is_aliaschain_attr(arg->type, ATTR_STRING))) - error_loc_info(&arg->loc_info, - "string and length_is specified for argument %s are mutually exclusive attributes\n", - arg->name); - - if (is_attr(arg->attrs, ATTR_SIZEIS)) - { - expr_list_t *size_is_exprs = get_attrp(arg->attrs, ATTR_SIZEIS); - check_conformance_expr_list("size_is", arg, container_type, size_is_exprs); - } - if (is_attr(arg->attrs, ATTR_LENGTHIS)) - { - expr_list_t *length_is_exprs = get_attrp(arg->attrs, ATTR_LENGTHIS); - check_conformance_expr_list("length_is", arg, container_type, length_is_exprs); - } - if (is_attr(arg->attrs, ATTR_IIDIS)) - { - struct expr_loc expr_loc; - expr_t *expr = get_attrp(arg->attrs, ATTR_IIDIS); - if (expr->type != EXPR_VOID) - { - const type_t *expr_type; - expr_loc.v = arg; - expr_loc.attr = "iid_is"; - expr_type = expr_resolve_type(&expr_loc, container_type, expr); - if (!expr_type || !is_ptr_guid_type(expr_type)) - error_loc_info(&arg->loc_info, "expression must resolve to pointer to GUID type for attribute iid_is\n"); - } - } - if (is_attr(arg->attrs, ATTR_SWITCHIS)) - { - struct expr_loc expr_loc; - expr_t *expr = get_attrp(arg->attrs, ATTR_SWITCHIS); - if (expr->type != EXPR_VOID) - { - const type_t *expr_type; - expr_loc.v = arg; - expr_loc.attr = "switch_is"; - expr_type = expr_resolve_type(&expr_loc, container_type, expr); - if (!expr_type || !is_allowed_conf_type(expr_type)) - error_loc_info(&arg->loc_info, "expression must resolve to integral type <= 32bits for attribute %s\n", - expr_loc.attr); - } - } - - do - { - more_to_do = FALSE; - - switch (typegen_detect_type(type, arg->attrs, TDT_IGNORE_STRINGS)) - { - case TGT_STRUCT: - case TGT_UNION: - check_remoting_fields(arg, type); - break; - case TGT_INVALID: - { - const char *reason = "is invalid"; - switch (type_get_type(type)) - { - case TYPE_VOID: - reason = "cannot derive from void *"; - break; - case TYPE_FUNCTION: - reason = "cannot be a function pointer"; - break; - case TYPE_BITFIELD: - reason = "cannot be a bit-field"; - break; - case TYPE_COCLASS: - reason = "cannot be a class"; - break; - case TYPE_INTERFACE: - reason = "cannot be a non-pointer to an interface"; - break; - case TYPE_MODULE: - reason = "cannot be a module"; - break; - default: - break; - } - error_loc_info(&arg->loc_info, "%s \'%s\' of %s \'%s\' %s\n", - var_type, arg->name, container_type_name, container_name, reason); - break; - } - case TGT_CTXT_HANDLE: - case TGT_CTXT_HANDLE_POINTER: - if (type_get_type(container_type) != TYPE_FUNCTION) - error_loc_info(&arg->loc_info, - "%s \'%s\' of %s \'%s\' cannot be a context handle\n", - var_type, arg->name, container_type_name, - container_name); - break; - case TGT_STRING: - { - const type_t *t = type; - while (is_ptr(t)) - t = type_pointer_get_ref(t); - if (is_aliaschain_attr(t, ATTR_RANGE)) - warning_loc_info(&arg->loc_info, "%s: range not verified for a string of ranged types\n", arg->name); - break; - } - case TGT_POINTER: - type = type_pointer_get_ref(type); - more_to_do = TRUE; - break; - case TGT_ARRAY: - type = type_array_get_element(type); - more_to_do = TRUE; - break; - case TGT_USER_TYPE: - case TGT_IFACE_POINTER: - case TGT_BASIC: - case TGT_ENUM: - case TGT_RANGE: - /* nothing to do */ - break; - } - } while (more_to_do); -} - -static void check_remoting_fields(const var_t *var, type_t *type) -{ - const var_t *field; - const var_list_t *fields = NULL; - - type = type_get_real_type(type); - - if (type->checked) - return; - - type->checked = TRUE; - - if (type_get_type(type) == TYPE_STRUCT) - { - if (type_is_complete(type)) - fields = type_struct_get_fields(type); - else - error_loc_info(&var->loc_info, "undefined type declaration %s\n", type->name); - } - else if (type_get_type(type) == TYPE_UNION || type_get_type(type) == TYPE_ENCAPSULATED_UNION) - fields = type_union_get_cases(type); - - if (fields) LIST_FOR_EACH_ENTRY( field, fields, const var_t, entry ) - if (field->type) check_field_common(type, type->name, field); -} - -/* checks that arguments for a function make sense for marshalling and unmarshalling */ -static void check_remoting_args(const var_t *func) -{ - const char *funcname = func->name; - const var_t *arg; - - if (func->type->details.function->args) LIST_FOR_EACH_ENTRY( arg, func->type->details.function->args, const var_t, entry ) - { - const type_t *type = arg->type; - - /* check that [out] parameters have enough pointer levels */ - if (is_attr(arg->attrs, ATTR_OUT)) - { - switch (typegen_detect_type(type, arg->attrs, TDT_ALL_TYPES)) - { - case TGT_BASIC: - case TGT_ENUM: - case TGT_RANGE: - case TGT_STRUCT: - case TGT_UNION: - case TGT_CTXT_HANDLE: - case TGT_USER_TYPE: - error_loc_info(&arg->loc_info, "out parameter \'%s\' of function \'%s\' is not a pointer\n", arg->name, funcname); - break; - case TGT_IFACE_POINTER: - error_loc_info(&arg->loc_info, "out interface pointer \'%s\' of function \'%s\' is not a double pointer\n", arg->name, funcname); - break; - case TGT_STRING: - if (is_array(type)) - { - /* needs conformance or fixed dimension */ - if (type_array_has_conformance(type) && - type_array_get_conformance(type)->type != EXPR_VOID) break; - if (!type_array_has_conformance(type) && type_array_get_dim(type)) break; - } - if (is_attr( arg->attrs, ATTR_IN )) break; - error_loc_info(&arg->loc_info, "out parameter \'%s\' of function \'%s\' cannot be an unsized string\n", arg->name, funcname); - break; - case TGT_INVALID: - /* already error'd before we get here */ - case TGT_CTXT_HANDLE_POINTER: - case TGT_POINTER: - case TGT_ARRAY: - /* OK */ - break; - } - } - - check_field_common(func->type, funcname, arg); - } - - if (type_get_type(type_function_get_rettype(func->type)) != TYPE_VOID) - { - var_t var; - var = *func; - var.type = type_function_get_rettype(func->type); - var.name = xstrdup("return value"); - check_field_common(func->type, funcname, &var); - free(var.name); - } -} - -static void add_explicit_handle_if_necessary(const type_t *iface, var_t *func) -{ - unsigned char explicit_fc, implicit_fc; - - /* check for a defined binding handle */ - if (!get_func_handle_var( iface, func, &explicit_fc, &implicit_fc ) || !explicit_fc) - { - /* no explicit handle specified so add - * "[in] handle_t IDL_handle" as the first parameter to the - * function */ - var_t *idl_handle = make_var(xstrdup("IDL_handle")); - idl_handle->attrs = append_attr(NULL, make_attr(ATTR_IN)); - idl_handle->type = find_type_or_error("handle_t", 0); - type_function_add_head_arg(func->type, idl_handle); - } -} - -static void check_functions(const type_t *iface, int is_inside_library) -{ - const statement_t *stmt; - if (is_attr(iface->attrs, ATTR_EXPLICIT_HANDLE)) - { - STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) ) - { - var_t *func = stmt->u.var; - add_explicit_handle_if_necessary(iface, func); - } - } - if (!is_inside_library && !is_attr(iface->attrs, ATTR_LOCAL)) - { - STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) ) - { - const var_t *func = stmt->u.var; - if (!is_attr(func->attrs, ATTR_LOCAL)) - check_remoting_args(func); - } - } -} - -static void check_statements(const statement_list_t *stmts, int is_inside_library) -{ - const statement_t *stmt; - - if (stmts) LIST_FOR_EACH_ENTRY(stmt, stmts, const statement_t, entry) - { - if (stmt->type == STMT_LIBRARY) - check_statements(stmt->u.lib->stmts, TRUE); - else if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE) - check_functions(stmt->u.type, is_inside_library); - } -} - -static void check_all_user_types(const statement_list_t *stmts) -{ - const statement_t *stmt; - - if (stmts) LIST_FOR_EACH_ENTRY(stmt, stmts, const statement_t, entry) - { - if (stmt->type == STMT_LIBRARY) - check_all_user_types(stmt->u.lib->stmts); - else if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE && - !is_local(stmt->u.type->attrs)) - { - const statement_t *stmt_func; - STATEMENTS_FOR_EACH_FUNC(stmt_func, type_iface_get_stmts(stmt->u.type)) { - const var_t *func = stmt_func->u.var; - check_for_additional_prototype_types(func->type->details.function->args); - } - } - } -} - -int is_valid_uuid(const char *s) -{ - int i; - - for (i = 0; i < 36; ++i) - if (i == 8 || i == 13 || i == 18 || i == 23) - { - if (s[i] != '-') - return FALSE; - } - else - if (!isxdigit(s[i])) - return FALSE; - - return s[i] == '\0'; -} - -static statement_t *make_statement(enum statement_type type) -{ - statement_t *stmt = xmalloc(sizeof(*stmt)); - stmt->type = type; - return stmt; -} - -static statement_t *make_statement_type_decl(type_t *type) -{ - statement_t *stmt = make_statement(STMT_TYPE); - stmt->u.type = type; - return stmt; -} - -static statement_t *make_statement_reference(type_t *type) -{ - statement_t *stmt = make_statement(STMT_TYPEREF); - stmt->u.type = type; - return stmt; -} - -static statement_t *make_statement_declaration(var_t *var) -{ - statement_t *stmt = make_statement(STMT_DECLARATION); - stmt->u.var = var; - if (var->stgclass == STG_EXTERN && var->eval) - warning("'%s' initialised and declared extern\n", var->name); - if (is_const_decl(var)) - { - if (var->eval) - reg_const(var); - } - else if (type_get_type(var->type) == TYPE_FUNCTION) - check_function_attrs(var->name, var->attrs); - else if (var->stgclass == STG_NONE || var->stgclass == STG_REGISTER) - error_loc("instantiation of data is illegal\n"); - return stmt; -} - -static statement_t *make_statement_library(typelib_t *typelib) -{ - statement_t *stmt = make_statement(STMT_LIBRARY); - stmt->u.lib = typelib; - return stmt; -} - -static statement_t *make_statement_cppquote(const char *str) -{ - statement_t *stmt = make_statement(STMT_CPPQUOTE); - stmt->u.str = str; - return stmt; -} - -static statement_t *make_statement_importlib(const char *str) -{ - statement_t *stmt = make_statement(STMT_IMPORTLIB); - stmt->u.str = str; - return stmt; -} - -static statement_t *make_statement_import(const char *str) -{ - statement_t *stmt = make_statement(STMT_IMPORT); - stmt->u.str = str; - return stmt; -} - -static statement_t *make_statement_module(type_t *type) -{ - statement_t *stmt = make_statement(STMT_MODULE); - stmt->u.type = type; - return stmt; -} - -static statement_t *make_statement_typedef(declarator_list_t *decls) -{ - declarator_t *decl, *next; - statement_t *stmt; - type_list_t **type_list; - - if (!decls) return NULL; - - stmt = make_statement(STMT_TYPEDEF); - stmt->u.type_list = NULL; - type_list = &stmt->u.type_list; - - LIST_FOR_EACH_ENTRY_SAFE( decl, next, decls, declarator_t, entry ) - { - var_t *var = decl->var; - type_t *type = find_type_or_error(var->name, 0); - *type_list = xmalloc(sizeof(type_list_t)); - (*type_list)->type = type; - (*type_list)->next = NULL; - - type_list = &(*type_list)->next; - free(decl); - free(var); - } - - return stmt; -} - -static statement_list_t *append_statement(statement_list_t *list, statement_t *stmt) -{ - if (!stmt) return list; - if (!list) - { - list = xmalloc( sizeof(*list) ); - list_init( list ); - } - list_add_tail( list, &stmt->entry ); - return list; -} - -void init_loc_info(loc_info_t *i) -{ - i->input_name = input_name ? input_name : "stdin"; - i->line_number = line_number; - i->near_text = parser_text; -} - -static void check_def(const type_t *t) -{ - if (t->defined) - error_loc("%s: redefinition error; original definition was at %s:%d\n", - t->name, t->loc_info.input_name, t->loc_info.line_number); -} - diff --git a/reactos/tools/widl/parser.tab.h b/reactos/tools/widl/parser.tab.h deleted file mode 100644 index d94b58bb108..00000000000 --- a/reactos/tools/widl/parser.tab.h +++ /dev/null @@ -1,271 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.4.2. */ - -/* Skeleton interface for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software - Foundation, Inc. - - 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 . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - aIDENTIFIER = 258, - aKNOWNTYPE = 259, - aNUM = 260, - aHEXNUM = 261, - aDOUBLE = 262, - aSTRING = 263, - aWSTRING = 264, - aSQSTRING = 265, - aUUID = 266, - aEOF = 267, - SHL = 268, - SHR = 269, - MEMBERPTR = 270, - EQUALITY = 271, - INEQUALITY = 272, - GREATEREQUAL = 273, - LESSEQUAL = 274, - LOGICALOR = 275, - LOGICALAND = 276, - ELLIPSIS = 277, - tAGGREGATABLE = 278, - tALLOCATE = 279, - tANNOTATION = 280, - tAPPOBJECT = 281, - tASYNC = 282, - tASYNCUUID = 283, - tAUTOHANDLE = 284, - tBINDABLE = 285, - tBOOLEAN = 286, - tBROADCAST = 287, - tBYTE = 288, - tBYTECOUNT = 289, - tCALLAS = 290, - tCALLBACK = 291, - tCASE = 292, - tCDECL = 293, - tCHAR = 294, - tCOCLASS = 295, - tCODE = 296, - tCOMMSTATUS = 297, - tCONST = 298, - tCONTEXTHANDLE = 299, - tCONTEXTHANDLENOSERIALIZE = 300, - tCONTEXTHANDLESERIALIZE = 301, - tCONTROL = 302, - tCPPQUOTE = 303, - tDECODE = 304, - tDEFAULT = 305, - tDEFAULTBIND = 306, - tDEFAULTCOLLELEM = 307, - tDEFAULTVALUE = 308, - tDEFAULTVTABLE = 309, - tDISABLECONSISTENCYCHECK = 310, - tDISPLAYBIND = 311, - tDISPINTERFACE = 312, - tDLLNAME = 313, - tDOUBLE = 314, - tDUAL = 315, - tENABLEALLOCATE = 316, - tENCODE = 317, - tENDPOINT = 318, - tENTRY = 319, - tENUM = 320, - tERRORSTATUST = 321, - tEXPLICITHANDLE = 322, - tEXTERN = 323, - tFALSE = 324, - tFASTCALL = 325, - tFAULTSTATUS = 326, - tFLOAT = 327, - tFORCEALLOCATE = 328, - tHANDLE = 329, - tHANDLET = 330, - tHELPCONTEXT = 331, - tHELPFILE = 332, - tHELPSTRING = 333, - tHELPSTRINGCONTEXT = 334, - tHELPSTRINGDLL = 335, - tHIDDEN = 336, - tHYPER = 337, - tID = 338, - tIDEMPOTENT = 339, - tIGNORE = 340, - tIIDIS = 341, - tIMMEDIATEBIND = 342, - tIMPLICITHANDLE = 343, - tIMPORT = 344, - tIMPORTLIB = 345, - tIN = 346, - tIN_LINE = 347, - tINLINE = 348, - tINPUTSYNC = 349, - tINT = 350, - tINT3264 = 351, - tINT64 = 352, - tINTERFACE = 353, - tLCID = 354, - tLENGTHIS = 355, - tLIBRARY = 356, - tLICENSED = 357, - tLOCAL = 358, - tLONG = 359, - tMAYBE = 360, - tMESSAGE = 361, - tMETHODS = 362, - tMODULE = 363, - tNOCODE = 364, - tNONBROWSABLE = 365, - tNONCREATABLE = 366, - tNONEXTENSIBLE = 367, - tNOTIFY = 368, - tNOTIFYFLAG = 369, - tNULL = 370, - tOBJECT = 371, - tODL = 372, - tOLEAUTOMATION = 373, - tOPTIMIZE = 374, - tOPTIONAL = 375, - tOUT = 376, - tPARTIALIGNORE = 377, - tPASCAL = 378, - tPOINTERDEFAULT = 379, - tPROGID = 380, - tPROPERTIES = 381, - tPROPGET = 382, - tPROPPUT = 383, - tPROPPUTREF = 384, - tPROXY = 385, - tPTR = 386, - tPUBLIC = 387, - tRANGE = 388, - tREADONLY = 389, - tREF = 390, - tREGISTER = 391, - tREPRESENTAS = 392, - tREQUESTEDIT = 393, - tRESTRICTED = 394, - tRETVAL = 395, - tSAFEARRAY = 396, - tSHORT = 397, - tSIGNED = 398, - tSIZEIS = 399, - tSIZEOF = 400, - tSMALL = 401, - tSOURCE = 402, - tSTATIC = 403, - tSTDCALL = 404, - tSTRICTCONTEXTHANDLE = 405, - tSTRING = 406, - tSTRUCT = 407, - tSWITCH = 408, - tSWITCHIS = 409, - tSWITCHTYPE = 410, - tTHREADING = 411, - tTRANSMITAS = 412, - tTRUE = 413, - tTYPEDEF = 414, - tUIDEFAULT = 415, - tUNION = 416, - tUNIQUE = 417, - tUNSIGNED = 418, - tUSESGETLASTERROR = 419, - tUSERMARSHAL = 420, - tUUID = 421, - tV1ENUM = 422, - tVARARG = 423, - tVERSION = 424, - tVIPROGID = 425, - tVOID = 426, - tWCHAR = 427, - tWIREMARSHAL = 428, - tAPARTMENT = 429, - tNEUTRAL = 430, - tSINGLE = 431, - tFREE = 432, - tBOTH = 433, - ADDRESSOF = 434, - NEG = 435, - POS = 436, - PPTR = 437, - CAST = 438 - }; -#endif - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -{ - -/* Line 1685 of yacc.c */ -#line 153 "parser.y" - - attr_t *attr; - attr_list_t *attr_list; - str_list_t *str_list; - expr_t *expr; - expr_list_t *expr_list; - array_dims_t *array_dims; - type_t *type; - var_t *var; - var_list_t *var_list; - declarator_t *declarator; - declarator_list_t *declarator_list; - statement_t *statement; - statement_list_t *stmt_list; - ifref_t *ifref; - ifref_list_t *ifref_list; - char *str; - UUID *uuid; - unsigned int num; - double dbl; - interface_info_t ifinfo; - typelib_t *typelib; - struct _import_t *import; - struct _decl_spec_t *declspec; - enum storage_class stgclass; - - - -/* Line 1685 of yacc.c */ -#line 263 "parser.tab.h" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - -extern YYSTYPE parser_lval; - - diff --git a/reactos/tools/widl/parser.y b/reactos/tools/widl/parser.y deleted file mode 100644 index a88d344240c..00000000000 --- a/reactos/tools/widl/parser.y +++ /dev/null @@ -1,2827 +0,0 @@ -%{ -/* - * IDL Compiler - * - * Copyright 2002 Ove Kaaven - * Copyright 2006-2008 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 "config.h" - -#include -#include -#include -#include -#include -#include - -#include "widl.h" -#include "utils.h" -#include "parser.h" -#include "header.h" -#include "typelib.h" -#include "typegen.h" -#include "expr.h" -#include "typetree.h" - -#if defined(YYBYACC) - /* Berkeley yacc (byacc) doesn't seem to know about these */ - /* Some *BSD supplied versions do define these though */ -# ifndef YYEMPTY -# define YYEMPTY (-1) /* Empty lookahead value of yychar */ -# endif -# ifndef YYLEX -# define YYLEX yylex() -# endif - -#elif defined(YYBISON) - /* Bison was used for original development */ - /* #define YYEMPTY -2 */ - /* #define YYLEX yylex() */ - -#else - /* No yacc we know yet */ -# if !defined(YYEMPTY) || !defined(YYLEX) -# error Yacc version/type unknown. This version needs to be verified for settings of YYEMPTY and YYLEX. -# elif defined(__GNUC__) /* gcc defines the #warning directive */ -# warning Yacc version/type unknown. It defines YYEMPTY and YYLEX, but is not tested - /* #else we just take a chance that it works... */ -# endif -#endif - -#define YYERROR_VERBOSE - -static unsigned char pointer_default = RPC_FC_UP; - -typedef struct list typelist_t; -struct typenode { - type_t *type; - struct list entry; -}; - -struct _import_t -{ - char *name; - int import_performed; -}; - -typedef struct _decl_spec_t -{ - type_t *type; - attr_list_t *attrs; - enum storage_class stgclass; -} decl_spec_t; - -typelist_t incomplete_types = LIST_INIT(incomplete_types); - -static void fix_incomplete(void); -static void fix_incomplete_types(type_t *complete_type); - -static str_list_t *append_str(str_list_t *list, char *str); -static attr_list_t *append_attr(attr_list_t *list, attr_t *attr); -static attr_list_t *append_attr_list(attr_list_t *new_list, attr_list_t *old_list); -static decl_spec_t *make_decl_spec(type_t *type, decl_spec_t *left, decl_spec_t *right, attr_t *attr, enum storage_class stgclass); -static attr_t *make_attr(enum attr_type type); -static attr_t *make_attrv(enum attr_type type, unsigned int val); -static attr_t *make_attrp(enum attr_type type, void *val); -static expr_list_t *append_expr(expr_list_t *list, expr_t *expr); -static array_dims_t *append_array(array_dims_t *list, expr_t *expr); -static var_t *declare_var(attr_list_t *attrs, decl_spec_t *decl_spec, const declarator_t *decl, int top); -static var_list_t *set_var_types(attr_list_t *attrs, decl_spec_t *decl_spec, declarator_list_t *decls); -static ifref_list_t *append_ifref(ifref_list_t *list, ifref_t *iface); -static ifref_t *make_ifref(type_t *iface); -static var_list_t *append_var_list(var_list_t *list, var_list_t *vars); -static declarator_list_t *append_declarator(declarator_list_t *list, declarator_t *p); -static declarator_t *make_declarator(var_t *var); -static type_t *make_safearray(type_t *type); -static typelib_t *make_library(const char *name, const attr_list_t *attrs); -static type_t *append_ptrchain_type(type_t *ptrchain, type_t *type); - -static type_t *reg_typedefs(decl_spec_t *decl_spec, var_list_t *names, attr_list_t *attrs); -static type_t *find_type_or_error(const char *name, int t); -static type_t *find_type_or_error2(char *name, int t); - -static var_t *reg_const(var_t *var); - -static char *gen_name(void); -static void check_arg_attrs(const var_t *arg); -static void check_statements(const statement_list_t *stmts, int is_inside_library); -static void check_all_user_types(const statement_list_t *stmts); -static attr_list_t *check_iface_attrs(const char *name, attr_list_t *attrs); -static attr_list_t *check_function_attrs(const char *name, attr_list_t *attrs); -static attr_list_t *check_typedef_attrs(attr_list_t *attrs); -static attr_list_t *check_enum_attrs(attr_list_t *attrs); -static attr_list_t *check_struct_attrs(attr_list_t *attrs); -static attr_list_t *check_union_attrs(attr_list_t *attrs); -static attr_list_t *check_field_attrs(const char *name, attr_list_t *attrs); -static attr_list_t *check_library_attrs(const char *name, attr_list_t *attrs); -static attr_list_t *check_dispiface_attrs(const char *name, attr_list_t *attrs); -static attr_list_t *check_module_attrs(const char *name, attr_list_t *attrs); -static attr_list_t *check_coclass_attrs(const char *name, attr_list_t *attrs); -const char *get_attr_display_name(enum attr_type type); -static void add_explicit_handle_if_necessary(const type_t *iface, var_t *func); -static void check_def(const type_t *t); - -static statement_t *make_statement(enum statement_type type); -static statement_t *make_statement_type_decl(type_t *type); -static statement_t *make_statement_reference(type_t *type); -static statement_t *make_statement_declaration(var_t *var); -static statement_t *make_statement_library(typelib_t *typelib); -static statement_t *make_statement_cppquote(const char *str); -static statement_t *make_statement_importlib(const char *str); -static statement_t *make_statement_module(type_t *type); -static statement_t *make_statement_typedef(var_list_t *names); -static statement_t *make_statement_import(const char *str); -static statement_t *make_statement_typedef(var_list_t *names); -static statement_list_t *append_statement(statement_list_t *list, statement_t *stmt); - -%} -%union { - attr_t *attr; - attr_list_t *attr_list; - str_list_t *str_list; - expr_t *expr; - expr_list_t *expr_list; - array_dims_t *array_dims; - type_t *type; - var_t *var; - var_list_t *var_list; - declarator_t *declarator; - declarator_list_t *declarator_list; - statement_t *statement; - statement_list_t *stmt_list; - ifref_t *ifref; - ifref_list_t *ifref_list; - char *str; - UUID *uuid; - unsigned int num; - double dbl; - interface_info_t ifinfo; - typelib_t *typelib; - struct _import_t *import; - struct _decl_spec_t *declspec; - enum storage_class stgclass; -} - -%token aIDENTIFIER -%token aKNOWNTYPE -%token aNUM aHEXNUM -%token aDOUBLE -%token aSTRING aWSTRING aSQSTRING -%token aUUID -%token aEOF -%token SHL SHR -%token MEMBERPTR -%token EQUALITY INEQUALITY -%token GREATEREQUAL LESSEQUAL -%token LOGICALOR LOGICALAND -%token ELLIPSIS -%token tAGGREGATABLE tALLOCATE tANNOTATION tAPPOBJECT tASYNC tASYNCUUID -%token tAUTOHANDLE tBINDABLE tBOOLEAN tBROADCAST tBYTE tBYTECOUNT -%token tCALLAS tCALLBACK tCASE tCDECL tCHAR tCOCLASS tCODE tCOMMSTATUS -%token tCONST tCONTEXTHANDLE tCONTEXTHANDLENOSERIALIZE -%token tCONTEXTHANDLESERIALIZE tCONTROL tCPPQUOTE -%token tDECODE tDEFAULT tDEFAULTBIND -%token tDEFAULTCOLLELEM -%token tDEFAULTVALUE -%token tDEFAULTVTABLE -%token tDISABLECONSISTENCYCHECK tDISPLAYBIND -%token tDISPINTERFACE -%token tDLLNAME tDOUBLE tDUAL -%token tENABLEALLOCATE tENCODE tENDPOINT -%token tENTRY tENUM tERRORSTATUST -%token tEXPLICITHANDLE tEXTERN -%token tFALSE -%token tFASTCALL tFAULTSTATUS -%token tFLOAT tFORCEALLOCATE -%token tHANDLE -%token tHANDLET -%token tHELPCONTEXT tHELPFILE -%token tHELPSTRING tHELPSTRINGCONTEXT tHELPSTRINGDLL -%token tHIDDEN -%token tHYPER tID tIDEMPOTENT -%token tIGNORE tIIDIS -%token tIMMEDIATEBIND -%token tIMPLICITHANDLE -%token tIMPORT tIMPORTLIB -%token tIN tIN_LINE tINLINE -%token tINPUTSYNC -%token tINT tINT3264 tINT64 -%token tINTERFACE -%token tLCID -%token tLENGTHIS tLIBRARY -%token tLICENSED tLOCAL -%token tLONG -%token tMAYBE tMESSAGE -%token tMETHODS -%token tMODULE -%token tNOCODE tNONBROWSABLE -%token tNONCREATABLE -%token tNONEXTENSIBLE -%token tNOTIFY tNOTIFYFLAG -%token tNULL -%token tOBJECT tODL tOLEAUTOMATION -%token tOPTIMIZE tOPTIONAL -%token tOUT -%token tPARTIALIGNORE tPASCAL -%token tPOINTERDEFAULT -%token tPROGID tPROPERTIES -%token tPROPGET tPROPPUT tPROPPUTREF -%token tPROXY tPTR -%token tPUBLIC -%token tRANGE -%token tREADONLY tREF -%token tREGISTER tREPRESENTAS -%token tREQUESTEDIT -%token tRESTRICTED -%token tRETVAL -%token tSAFEARRAY -%token tSHORT -%token tSIGNED -%token tSIZEIS tSIZEOF -%token tSMALL -%token tSOURCE -%token tSTATIC -%token tSTDCALL -%token tSTRICTCONTEXTHANDLE -%token tSTRING tSTRUCT -%token tSWITCH tSWITCHIS tSWITCHTYPE -%token tTHREADING tTRANSMITAS -%token tTRUE -%token tTYPEDEF -%token tUIDEFAULT tUNION -%token tUNIQUE -%token tUNSIGNED -%token tUSESGETLASTERROR tUSERMARSHAL tUUID -%token tV1ENUM -%token tVARARG -%token tVERSION tVIPROGID -%token tVOID -%token tWCHAR tWIREMARSHAL -%token tAPARTMENT tNEUTRAL tSINGLE tFREE tBOTH - -%type attribute type_qualifier function_specifier -%type m_attributes attributes attrib_list m_type_qual_list -%type str_list -%type m_expr expr expr_const expr_int_const array m_bitfield -%type m_exprs /* exprs expr_list */ expr_list_int_const -%type interfacehdr -%type storage_cls_spec -%type decl_spec decl_spec_no_type m_decl_spec_no_type -%type inherit interface interfacedef interfacedec -%type dispinterface dispinterfacehdr dispinterfacedef -%type module modulehdr moduledef -%type base_type int_std -%type enumdef structdef uniondef typedecl -%type type -%type coclass_int -%type coclass_ints -%type arg ne_union_field union_field s_field case enum declaration -%type funcdef -%type m_args arg_list args dispint_meths -%type fields ne_union_fields cases enums enum_list dispint_props field -%type m_ident ident -%type declarator direct_declarator init_declarator struct_declarator -%type m_any_declarator any_declarator any_declarator_no_direct any_direct_declarator -%type m_abstract_declarator abstract_declarator abstract_declarator_no_direct abstract_direct_declarator -%type declarator_list struct_declarator_list -%type coclass coclasshdr coclassdef -%type pointer_type threading_type version -%type libraryhdr callconv cppquote importlib import t_ident -%type uuid_string -%type import_start -%type library_start librarydef -%type statement typedef -%type gbl_statements imp_statements int_statements - -%left ',' -%right '?' ':' -%left LOGICALOR -%left LOGICALAND -%left '|' -%left '^' -%left '&' -%left EQUALITY INEQUALITY -%left '<' '>' LESSEQUAL GREATEREQUAL -%left SHL SHR -%left '-' '+' -%left '*' '/' '%' -%right '!' '~' CAST PPTR POS NEG ADDRESSOF tSIZEOF -%left '.' MEMBERPTR '[' ']' - -%% - -input: gbl_statements { fix_incomplete(); - check_statements($1, FALSE); - check_all_user_types($1); - write_header($1); - write_id_data($1); - write_proxies($1); - write_client($1); - write_server($1); - write_regscript($1); - write_dlldata($1); - write_local_stubs($1); - } - ; - -gbl_statements: { $$ = NULL; } - | gbl_statements interfacedec { $$ = append_statement($1, make_statement_reference($2)); } - | gbl_statements interfacedef { $$ = append_statement($1, make_statement_type_decl($2)); } - | gbl_statements coclass ';' { $$ = $1; - reg_type($2, $2->name, 0); - } - | gbl_statements coclassdef { $$ = append_statement($1, make_statement_type_decl($2)); - reg_type($2, $2->name, 0); - } - | gbl_statements moduledef { $$ = append_statement($1, make_statement_module($2)); } - | gbl_statements librarydef { $$ = append_statement($1, make_statement_library($2)); } - | gbl_statements statement { $$ = append_statement($1, $2); } - ; - -imp_statements: { $$ = NULL; } - | imp_statements interfacedec { $$ = append_statement($1, make_statement_reference($2)); } - | imp_statements interfacedef { $$ = append_statement($1, make_statement_type_decl($2)); } - | imp_statements coclass ';' { $$ = $1; reg_type($2, $2->name, 0); } - | imp_statements coclassdef { $$ = append_statement($1, make_statement_type_decl($2)); - reg_type($2, $2->name, 0); - } - | imp_statements moduledef { $$ = append_statement($1, make_statement_module($2)); } - | imp_statements statement { $$ = append_statement($1, $2); } - | imp_statements importlib { $$ = append_statement($1, make_statement_importlib($2)); } - | imp_statements librarydef { $$ = append_statement($1, make_statement_library($2)); } - ; - -int_statements: { $$ = NULL; } - | int_statements statement { $$ = append_statement($1, $2); } - ; - -semicolon_opt: - | ';' - ; - -statement: - cppquote { $$ = make_statement_cppquote($1); } - | typedecl ';' { $$ = make_statement_type_decl($1); } - | declaration ';' { $$ = make_statement_declaration($1); } - | import { $$ = make_statement_import($1); } - | typedef ';' { $$ = $1; } - ; - -typedecl: - enumdef - | tENUM aIDENTIFIER { $$ = type_new_enum($2, FALSE, NULL); } - | structdef - | tSTRUCT aIDENTIFIER { $$ = type_new_struct($2, FALSE, NULL); } - | uniondef - | tUNION aIDENTIFIER { $$ = type_new_nonencapsulated_union($2, FALSE, NULL); } - | attributes enumdef { $$ = $2; $$->attrs = check_enum_attrs($1); } - | attributes structdef { $$ = $2; $$->attrs = check_struct_attrs($1); } - | attributes uniondef { $$ = $2; $$->attrs = check_union_attrs($1); } - ; - -cppquote: tCPPQUOTE '(' aSTRING ')' { $$ = $3; } - ; -import_start: tIMPORT aSTRING ';' { assert(yychar == YYEMPTY); - $$ = xmalloc(sizeof(struct _import_t)); - $$->name = $2; - $$->import_performed = do_import($2); - if (!$$->import_performed) yychar = aEOF; - } - ; - -import: import_start imp_statements aEOF { $$ = $1->name; - if ($1->import_performed) pop_import(); - free($1); - } - ; - -importlib: tIMPORTLIB '(' aSTRING ')' - semicolon_opt { $$ = $3; if(!parse_only) add_importlib($3); } - ; - -libraryhdr: tLIBRARY aIDENTIFIER { $$ = $2; } - ; -library_start: attributes libraryhdr '{' { $$ = make_library($2, check_library_attrs($2, $1)); - if (!parse_only) start_typelib($$); - } - ; -librarydef: library_start imp_statements '}' - semicolon_opt { $$ = $1; - $$->stmts = $2; - if (!parse_only) end_typelib(); - } - ; - -m_args: { $$ = NULL; } - | args - ; - -arg_list: arg { check_arg_attrs($1); $$ = append_var( NULL, $1 ); } - | arg_list ',' arg { check_arg_attrs($3); $$ = append_var( $1, $3 ); } - ; - -args: arg_list - | arg_list ',' ELLIPSIS { $$ = append_var( $1, make_var(strdup("...")) ); } - ; - -/* split into two rules to get bison to resolve a tVOID conflict */ -arg: attributes decl_spec m_any_declarator { if ($2->stgclass != STG_NONE && $2->stgclass != STG_REGISTER) - error_loc("invalid storage class for function parameter\n"); - $$ = declare_var($1, $2, $3, TRUE); - free($2); free($3); - } - | decl_spec m_any_declarator { if ($1->stgclass != STG_NONE && $1->stgclass != STG_REGISTER) - error_loc("invalid storage class for function parameter\n"); - $$ = declare_var(NULL, $1, $2, TRUE); - free($1); free($2); - } - ; - -array: '[' expr ']' { $$ = $2; - if (!$$->is_const) - error_loc("array dimension is not an integer constant\n"); - } - | '[' '*' ']' { $$ = make_expr(EXPR_VOID); } - | '[' ']' { $$ = make_expr(EXPR_VOID); } - ; - -m_attributes: { $$ = NULL; } - | attributes - ; - -attributes: - '[' attrib_list ']' { $$ = $2; } - ; - -attrib_list: attribute { $$ = append_attr( NULL, $1 ); } - | attrib_list ',' attribute { $$ = append_attr( $1, $3 ); } - | attrib_list ']' '[' attribute { $$ = append_attr( $1, $4 ); } - ; - -str_list: aSTRING { $$ = append_str( NULL, $1 ); } - | str_list ',' aSTRING { $$ = append_str( $1, $3 ); } - ; - -attribute: { $$ = NULL; } - | tAGGREGATABLE { $$ = make_attr(ATTR_AGGREGATABLE); } - | tANNOTATION '(' aSTRING ')' { $$ = make_attrp(ATTR_ANNOTATION, $3); } - | tAPPOBJECT { $$ = make_attr(ATTR_APPOBJECT); } - | tASYNC { $$ = make_attr(ATTR_ASYNC); } - | tAUTOHANDLE { $$ = make_attr(ATTR_AUTO_HANDLE); } - | tBINDABLE { $$ = make_attr(ATTR_BINDABLE); } - | tBROADCAST { $$ = make_attr(ATTR_BROADCAST); } - | tCALLAS '(' ident ')' { $$ = make_attrp(ATTR_CALLAS, $3); } - | tCASE '(' expr_list_int_const ')' { $$ = make_attrp(ATTR_CASE, $3); } - | tCODE { $$ = make_attr(ATTR_CODE); } - | tCOMMSTATUS { $$ = make_attr(ATTR_COMMSTATUS); } - | tCONTEXTHANDLE { $$ = make_attrv(ATTR_CONTEXTHANDLE, 0); } - | tCONTEXTHANDLENOSERIALIZE { $$ = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_DONT_SERIALIZE */ } - | tCONTEXTHANDLESERIALIZE { $$ = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_SERIALIZE */ } - | tCONTROL { $$ = make_attr(ATTR_CONTROL); } - | tDECODE { $$ = make_attr(ATTR_DECODE); } - | tDEFAULT { $$ = make_attr(ATTR_DEFAULT); } - | tDEFAULTBIND { $$ = make_attr(ATTR_DEFAULTBIND); } - | tDEFAULTCOLLELEM { $$ = make_attr(ATTR_DEFAULTCOLLELEM); } - | tDEFAULTVALUE '(' expr_const ')' { $$ = make_attrp(ATTR_DEFAULTVALUE, $3); } - | tDEFAULTVTABLE { $$ = make_attr(ATTR_DEFAULTVTABLE); } - | tDISABLECONSISTENCYCHECK { $$ = make_attr(ATTR_DISABLECONSISTENCYCHECK); } - | tDISPLAYBIND { $$ = make_attr(ATTR_DISPLAYBIND); } - | tDLLNAME '(' aSTRING ')' { $$ = make_attrp(ATTR_DLLNAME, $3); } - | tDUAL { $$ = make_attr(ATTR_DUAL); } - | tENABLEALLOCATE { $$ = make_attr(ATTR_ENABLEALLOCATE); } - | tENCODE { $$ = make_attr(ATTR_ENCODE); } - | tENDPOINT '(' str_list ')' { $$ = make_attrp(ATTR_ENDPOINT, $3); } - | tENTRY '(' expr_const ')' { $$ = make_attrp(ATTR_ENTRY, $3); } - | tEXPLICITHANDLE { $$ = make_attr(ATTR_EXPLICIT_HANDLE); } - | tFAULTSTATUS { $$ = make_attr(ATTR_FAULTSTATUS); } - | tFORCEALLOCATE { $$ = make_attr(ATTR_FORCEALLOCATE); } - | tHANDLE { $$ = make_attr(ATTR_HANDLE); } - | tHELPCONTEXT '(' expr_int_const ')' { $$ = make_attrp(ATTR_HELPCONTEXT, $3); } - | tHELPFILE '(' aSTRING ')' { $$ = make_attrp(ATTR_HELPFILE, $3); } - | tHELPSTRING '(' aSTRING ')' { $$ = make_attrp(ATTR_HELPSTRING, $3); } - | tHELPSTRINGCONTEXT '(' expr_int_const ')' { $$ = make_attrp(ATTR_HELPSTRINGCONTEXT, $3); } - | tHELPSTRINGDLL '(' aSTRING ')' { $$ = make_attrp(ATTR_HELPSTRINGDLL, $3); } - | tHIDDEN { $$ = make_attr(ATTR_HIDDEN); } - | tID '(' expr_int_const ')' { $$ = make_attrp(ATTR_ID, $3); } - | tIDEMPOTENT { $$ = make_attr(ATTR_IDEMPOTENT); } - | tIGNORE { $$ = make_attr(ATTR_IGNORE); } - | tIIDIS '(' expr ')' { $$ = make_attrp(ATTR_IIDIS, $3); } - | tIMMEDIATEBIND { $$ = make_attr(ATTR_IMMEDIATEBIND); } - | tIMPLICITHANDLE '(' arg ')' { $$ = make_attrp(ATTR_IMPLICIT_HANDLE, $3); } - | tIN { $$ = make_attr(ATTR_IN); } - | tINPUTSYNC { $$ = make_attr(ATTR_INPUTSYNC); } - | tLENGTHIS '(' m_exprs ')' { $$ = make_attrp(ATTR_LENGTHIS, $3); } - | tLCID '(' expr_int_const ')' { $$ = make_attrp(ATTR_LIBLCID, $3); } - | tLCID { $$ = make_attr(ATTR_PARAMLCID); } - | tLICENSED { $$ = make_attr(ATTR_LICENSED); } - | tLOCAL { $$ = make_attr(ATTR_LOCAL); } - | tMAYBE { $$ = make_attr(ATTR_MAYBE); } - | tMESSAGE { $$ = make_attr(ATTR_MESSAGE); } - | tNOCODE { $$ = make_attr(ATTR_NOCODE); } - | tNONBROWSABLE { $$ = make_attr(ATTR_NONBROWSABLE); } - | tNONCREATABLE { $$ = make_attr(ATTR_NONCREATABLE); } - | tNONEXTENSIBLE { $$ = make_attr(ATTR_NONEXTENSIBLE); } - | tNOTIFY { $$ = make_attr(ATTR_NOTIFY); } - | tNOTIFYFLAG { $$ = make_attr(ATTR_NOTIFYFLAG); } - | tOBJECT { $$ = make_attr(ATTR_OBJECT); } - | tODL { $$ = make_attr(ATTR_ODL); } - | tOLEAUTOMATION { $$ = make_attr(ATTR_OLEAUTOMATION); } - | tOPTIMIZE '(' aSTRING ')' { $$ = make_attrp(ATTR_OPTIMIZE, $3); } - | tOPTIONAL { $$ = make_attr(ATTR_OPTIONAL); } - | tOUT { $$ = make_attr(ATTR_OUT); } - | tPARTIALIGNORE { $$ = make_attr(ATTR_PARTIALIGNORE); } - | tPOINTERDEFAULT '(' pointer_type ')' { $$ = make_attrv(ATTR_POINTERDEFAULT, $3); } - | tPROGID '(' aSTRING ')' { $$ = make_attrp(ATTR_PROGID, $3); } - | tPROPGET { $$ = make_attr(ATTR_PROPGET); } - | tPROPPUT { $$ = make_attr(ATTR_PROPPUT); } - | tPROPPUTREF { $$ = make_attr(ATTR_PROPPUTREF); } - | tPROXY { $$ = make_attr(ATTR_PROXY); } - | tPUBLIC { $$ = make_attr(ATTR_PUBLIC); } - | tRANGE '(' expr_int_const ',' expr_int_const ')' - { expr_list_t *list = append_expr( NULL, $3 ); - list = append_expr( list, $5 ); - $$ = make_attrp(ATTR_RANGE, list); } - | tREADONLY { $$ = make_attr(ATTR_READONLY); } - | tREPRESENTAS '(' type ')' { $$ = make_attrp(ATTR_REPRESENTAS, $3); } - | tREQUESTEDIT { $$ = make_attr(ATTR_REQUESTEDIT); } - | tRESTRICTED { $$ = make_attr(ATTR_RESTRICTED); } - | tRETVAL { $$ = make_attr(ATTR_RETVAL); } - | tSIZEIS '(' m_exprs ')' { $$ = make_attrp(ATTR_SIZEIS, $3); } - | tSOURCE { $$ = make_attr(ATTR_SOURCE); } - | tSTRICTCONTEXTHANDLE { $$ = make_attr(ATTR_STRICTCONTEXTHANDLE); } - | tSTRING { $$ = make_attr(ATTR_STRING); } - | tSWITCHIS '(' expr ')' { $$ = make_attrp(ATTR_SWITCHIS, $3); } - | tSWITCHTYPE '(' type ')' { $$ = make_attrp(ATTR_SWITCHTYPE, $3); } - | tTRANSMITAS '(' type ')' { $$ = make_attrp(ATTR_TRANSMITAS, $3); } - | tTHREADING '(' threading_type ')' { $$ = make_attrv(ATTR_THREADING, $3); } - | tUIDEFAULT { $$ = make_attr(ATTR_UIDEFAULT); } - | tUSESGETLASTERROR { $$ = make_attr(ATTR_USESGETLASTERROR); } - | tUSERMARSHAL '(' type ')' { $$ = make_attrp(ATTR_USERMARSHAL, $3); } - | tUUID '(' uuid_string ')' { $$ = make_attrp(ATTR_UUID, $3); } - | tV1ENUM { $$ = make_attr(ATTR_V1ENUM); } - | tVARARG { $$ = make_attr(ATTR_VARARG); } - | tVERSION '(' version ')' { $$ = make_attrv(ATTR_VERSION, $3); } - | tVIPROGID '(' aSTRING ')' { $$ = make_attrp(ATTR_VIPROGID, $3); } - | tWIREMARSHAL '(' type ')' { $$ = make_attrp(ATTR_WIREMARSHAL, $3); } - | pointer_type { $$ = make_attrv(ATTR_POINTERTYPE, $1); } - ; - -uuid_string: - aUUID - | aSTRING { if (!is_valid_uuid($1)) - error_loc("invalid UUID: %s\n", $1); - $$ = parse_uuid($1); } - ; - -callconv: tCDECL { $$ = xstrdup("__cdecl"); } - | tFASTCALL { $$ = xstrdup("__fastcall"); } - | tPASCAL { $$ = xstrdup("__pascal"); } - | tSTDCALL { $$ = xstrdup("__stdcall"); } - ; - -cases: { $$ = NULL; } - | cases case { $$ = append_var( $1, $2 ); } - ; - -case: tCASE expr_int_const ':' union_field { attr_t *a = make_attrp(ATTR_CASE, append_expr( NULL, $2 )); - $$ = $4; if (!$$) $$ = make_var(NULL); - $$->attrs = append_attr( $$->attrs, a ); - } - | tDEFAULT ':' union_field { attr_t *a = make_attr(ATTR_DEFAULT); - $$ = $3; if (!$$) $$ = make_var(NULL); - $$->attrs = append_attr( $$->attrs, a ); - } - ; - -enums: { $$ = NULL; } - | enum_list ',' { $$ = $1; } - | enum_list - ; - -enum_list: enum { if (!$1->eval) - $1->eval = make_exprl(EXPR_NUM, 0 /* default for first enum entry */); - $$ = append_var( NULL, $1 ); - } - | enum_list ',' enum { if (!$3->eval) - { - var_t *last = LIST_ENTRY( list_tail($$), var_t, entry ); - $3->eval = make_exprl(EXPR_NUM, last->eval->cval + 1); - } - $$ = append_var( $1, $3 ); - } - ; - -enum: ident '=' expr_int_const { $$ = reg_const($1); - $$->eval = $3; - $$->type = type_new_int(TYPE_BASIC_INT, 0); - } - | ident { $$ = reg_const($1); - $$->type = type_new_int(TYPE_BASIC_INT, 0); - } - ; - -enumdef: tENUM t_ident '{' enums '}' { $$ = type_new_enum($2, TRUE, $4); } - ; - -m_exprs: m_expr { $$ = append_expr( NULL, $1 ); } - | m_exprs ',' m_expr { $$ = append_expr( $1, $3 ); } - ; - -m_expr: { $$ = make_expr(EXPR_VOID); } - | expr - ; - -expr: aNUM { $$ = make_exprl(EXPR_NUM, $1); } - | aHEXNUM { $$ = make_exprl(EXPR_HEXNUM, $1); } - | aDOUBLE { $$ = make_exprd(EXPR_DOUBLE, $1); } - | tFALSE { $$ = make_exprl(EXPR_TRUEFALSE, 0); } - | tNULL { $$ = make_exprl(EXPR_NUM, 0); } - | tTRUE { $$ = make_exprl(EXPR_TRUEFALSE, 1); } - | aSTRING { $$ = make_exprs(EXPR_STRLIT, $1); } - | aWSTRING { $$ = make_exprs(EXPR_WSTRLIT, $1); } - | aSQSTRING { $$ = make_exprs(EXPR_CHARCONST, $1); } - | aIDENTIFIER { $$ = make_exprs(EXPR_IDENTIFIER, $1); } - | expr '?' expr ':' expr { $$ = make_expr3(EXPR_COND, $1, $3, $5); } - | expr LOGICALOR expr { $$ = make_expr2(EXPR_LOGOR, $1, $3); } - | expr LOGICALAND expr { $$ = make_expr2(EXPR_LOGAND, $1, $3); } - | expr '|' expr { $$ = make_expr2(EXPR_OR , $1, $3); } - | expr '^' expr { $$ = make_expr2(EXPR_XOR, $1, $3); } - | expr '&' expr { $$ = make_expr2(EXPR_AND, $1, $3); } - | expr EQUALITY expr { $$ = make_expr2(EXPR_EQUALITY, $1, $3); } - | expr INEQUALITY expr { $$ = make_expr2(EXPR_INEQUALITY, $1, $3); } - | expr '>' expr { $$ = make_expr2(EXPR_GTR, $1, $3); } - | expr '<' expr { $$ = make_expr2(EXPR_LESS, $1, $3); } - | expr GREATEREQUAL expr { $$ = make_expr2(EXPR_GTREQL, $1, $3); } - | expr LESSEQUAL expr { $$ = make_expr2(EXPR_LESSEQL, $1, $3); } - | expr SHL expr { $$ = make_expr2(EXPR_SHL, $1, $3); } - | expr SHR expr { $$ = make_expr2(EXPR_SHR, $1, $3); } - | expr '+' expr { $$ = make_expr2(EXPR_ADD, $1, $3); } - | expr '-' expr { $$ = make_expr2(EXPR_SUB, $1, $3); } - | expr '%' expr { $$ = make_expr2(EXPR_MOD, $1, $3); } - | expr '*' expr { $$ = make_expr2(EXPR_MUL, $1, $3); } - | expr '/' expr { $$ = make_expr2(EXPR_DIV, $1, $3); } - | '!' expr { $$ = make_expr1(EXPR_LOGNOT, $2); } - | '~' expr { $$ = make_expr1(EXPR_NOT, $2); } - | '+' expr %prec POS { $$ = make_expr1(EXPR_POS, $2); } - | '-' expr %prec NEG { $$ = make_expr1(EXPR_NEG, $2); } - | '&' expr %prec ADDRESSOF { $$ = make_expr1(EXPR_ADDRESSOF, $2); } - | '*' expr %prec PPTR { $$ = make_expr1(EXPR_PPTR, $2); } - | expr MEMBERPTR aIDENTIFIER { $$ = make_expr2(EXPR_MEMBER, make_expr1(EXPR_PPTR, $1), make_exprs(EXPR_IDENTIFIER, $3)); } - | expr '.' aIDENTIFIER { $$ = make_expr2(EXPR_MEMBER, $1, make_exprs(EXPR_IDENTIFIER, $3)); } - | '(' decl_spec m_abstract_declarator ')' expr %prec CAST - { $$ = make_exprt(EXPR_CAST, declare_var(NULL, $2, $3, 0), $5); free($2); free($3); } - | tSIZEOF '(' decl_spec m_abstract_declarator ')' - { $$ = make_exprt(EXPR_SIZEOF, declare_var(NULL, $3, $4, 0), NULL); free($3); free($4); } - | expr '[' expr ']' { $$ = make_expr2(EXPR_ARRAY, $1, $3); } - | '(' expr ')' { $$ = $2; } - ; - -expr_list_int_const: expr_int_const { $$ = append_expr( NULL, $1 ); } - | expr_list_int_const ',' expr_int_const { $$ = append_expr( $1, $3 ); } - ; - -expr_int_const: expr { $$ = $1; - if (!$$->is_const) - error_loc("expression is not an integer constant\n"); - } - ; - -expr_const: expr { $$ = $1; - if (!$$->is_const && $$->type != EXPR_STRLIT && $$->type != EXPR_WSTRLIT) - error_loc("expression is not constant\n"); - } - ; - -fields: { $$ = NULL; } - | fields field { $$ = append_var_list($1, $2); } - ; - -field: m_attributes decl_spec struct_declarator_list ';' - { const char *first = LIST_ENTRY(list_head($3), declarator_t, entry)->var->name; - check_field_attrs(first, $1); - $$ = set_var_types($1, $2, $3); - } - | m_attributes uniondef ';' { var_t *v = make_var(NULL); - v->type = $2; v->attrs = $1; - $$ = append_var(NULL, v); - } - ; - -ne_union_field: - s_field ';' { $$ = $1; } - | attributes ';' { $$ = make_var(NULL); $$->attrs = $1; } - ; - -ne_union_fields: { $$ = NULL; } - | ne_union_fields ne_union_field { $$ = append_var( $1, $2 ); } - ; - -union_field: - s_field ';' { $$ = $1; } - | ';' { $$ = NULL; } - ; - -s_field: m_attributes decl_spec declarator { $$ = declare_var(check_field_attrs($3->var->name, $1), - $2, $3, FALSE); - free($3); - } - ; - -funcdef: declaration { $$ = $1; - if (type_get_type($$->type) != TYPE_FUNCTION) - error_loc("only methods may be declared inside the methods section of a dispinterface\n"); - check_function_attrs($$->name, $$->attrs); - } - ; - -declaration: - attributes decl_spec init_declarator - { $$ = declare_var($1, $2, $3, FALSE); - free($3); - } - | decl_spec init_declarator { $$ = declare_var(NULL, $1, $2, FALSE); - free($2); - } - ; - -m_ident: { $$ = NULL; } - | ident - ; - -t_ident: { $$ = NULL; } - | aIDENTIFIER { $$ = $1; } - | aKNOWNTYPE { $$ = $1; } - ; - -ident: aIDENTIFIER { $$ = make_var($1); } -/* some "reserved words" used in attributes are also used as field names in some MS IDL files */ - | aKNOWNTYPE { $$ = make_var($1); } - ; - -base_type: tBYTE { $$ = find_type_or_error($1, 0); } - | tWCHAR { $$ = find_type_or_error($1, 0); } - | int_std - | tSIGNED int_std { $$ = type_new_int(type_basic_get_type($2), -1); } - | tUNSIGNED int_std { $$ = type_new_int(type_basic_get_type($2), 1); } - | tUNSIGNED { $$ = type_new_int(TYPE_BASIC_INT, 1); } - | tFLOAT { $$ = find_type_or_error($1, 0); } - | tDOUBLE { $$ = find_type_or_error($1, 0); } - | tBOOLEAN { $$ = find_type_or_error($1, 0); } - | tERRORSTATUST { $$ = find_type_or_error($1, 0); } - | tHANDLET { $$ = find_type_or_error($1, 0); } - ; - -m_int: - | tINT - ; - -int_std: tINT { $$ = type_new_int(TYPE_BASIC_INT, 0); } - | tSHORT m_int { $$ = type_new_int(TYPE_BASIC_INT16, 0); } - | tSMALL { $$ = type_new_int(TYPE_BASIC_INT8, 0); } - | tLONG m_int { $$ = type_new_int(TYPE_BASIC_INT32, 0); } - | tHYPER m_int { $$ = type_new_int(TYPE_BASIC_HYPER, 0); } - | tINT64 { $$ = type_new_int(TYPE_BASIC_INT64, 0); } - | tCHAR { $$ = type_new_int(TYPE_BASIC_CHAR, 0); } - | tINT3264 { $$ = type_new_int(TYPE_BASIC_INT3264, 0); } - ; - -coclass: tCOCLASS aIDENTIFIER { $$ = type_new_coclass($2); } - | tCOCLASS aKNOWNTYPE { $$ = find_type($2, 0); - if (type_get_type_detect_alias($$) != TYPE_COCLASS) - error_loc("%s was not declared a coclass at %s:%d\n", - $2, $$->loc_info.input_name, - $$->loc_info.line_number); - } - ; - -coclasshdr: attributes coclass { $$ = $2; - check_def($$); - $$->attrs = check_coclass_attrs($2->name, $1); - } - ; - -coclassdef: coclasshdr '{' coclass_ints '}' semicolon_opt - { $$ = type_coclass_define($1, $3); } - ; - -coclass_ints: { $$ = NULL; } - | coclass_ints coclass_int { $$ = append_ifref( $1, $2 ); } - ; - -coclass_int: - m_attributes interfacedec { $$ = make_ifref($2); $$->attrs = $1; } - ; - -dispinterface: tDISPINTERFACE aIDENTIFIER { $$ = get_type(TYPE_INTERFACE, $2, 0); } - | tDISPINTERFACE aKNOWNTYPE { $$ = get_type(TYPE_INTERFACE, $2, 0); } - ; - -dispinterfacehdr: attributes dispinterface { attr_t *attrs; - $$ = $2; - check_def($$); - attrs = make_attr(ATTR_DISPINTERFACE); - $$->attrs = append_attr( check_dispiface_attrs($2->name, $1), attrs ); - $$->defined = TRUE; - } - ; - -dispint_props: tPROPERTIES ':' { $$ = NULL; } - | dispint_props s_field ';' { $$ = append_var( $1, $2 ); } - ; - -dispint_meths: tMETHODS ':' { $$ = NULL; } - | dispint_meths funcdef ';' { $$ = append_var( $1, $2 ); } - ; - -dispinterfacedef: dispinterfacehdr '{' - dispint_props - dispint_meths - '}' { $$ = $1; - type_dispinterface_define($$, $3, $4); - } - | dispinterfacehdr - '{' interface ';' '}' { $$ = $1; - type_dispinterface_define_from_iface($$, $3); - } - ; - -inherit: { $$ = NULL; } - | ':' aKNOWNTYPE { $$ = find_type_or_error2($2, 0); } - ; - -interface: tINTERFACE aIDENTIFIER { $$ = get_type(TYPE_INTERFACE, $2, 0); } - | tINTERFACE aKNOWNTYPE { $$ = get_type(TYPE_INTERFACE, $2, 0); } - ; - -interfacehdr: attributes interface { $$.interface = $2; - $$.old_pointer_default = pointer_default; - if (is_attr($1, ATTR_POINTERDEFAULT)) - pointer_default = get_attrv($1, ATTR_POINTERDEFAULT); - check_def($2); - $2->attrs = check_iface_attrs($2->name, $1); - $2->defined = TRUE; - } - ; - -interfacedef: interfacehdr inherit - '{' int_statements '}' semicolon_opt { $$ = $1.interface; - type_interface_define($$, $2, $4); - pointer_default = $1.old_pointer_default; - } -/* MIDL is able to import the definition of a base class from inside the - * definition of a derived class, I'll try to support it with this rule */ - | interfacehdr ':' aIDENTIFIER - '{' import int_statements '}' - semicolon_opt { $$ = $1.interface; - type_interface_define($$, find_type_or_error2($3, 0), $6); - pointer_default = $1.old_pointer_default; - } - | dispinterfacedef semicolon_opt { $$ = $1; } - ; - -interfacedec: - interface ';' { $$ = $1; } - | dispinterface ';' { $$ = $1; } - ; - -module: tMODULE aIDENTIFIER { $$ = type_new_module($2); } - | tMODULE aKNOWNTYPE { $$ = type_new_module($2); } - ; - -modulehdr: attributes module { $$ = $2; - $$->attrs = check_module_attrs($2->name, $1); - } - ; - -moduledef: modulehdr '{' int_statements '}' - semicolon_opt { $$ = $1; - type_module_define($$, $3); - } - ; - -storage_cls_spec: - tEXTERN { $$ = STG_EXTERN; } - | tSTATIC { $$ = STG_STATIC; } - | tREGISTER { $$ = STG_REGISTER; } - ; - -function_specifier: - tINLINE { $$ = make_attr(ATTR_INLINE); } - ; - -type_qualifier: - tCONST { $$ = make_attr(ATTR_CONST); } - ; - -m_type_qual_list: { $$ = NULL; } - | m_type_qual_list type_qualifier { $$ = append_attr($1, $2); } - ; - -decl_spec: type m_decl_spec_no_type { $$ = make_decl_spec($1, $2, NULL, NULL, STG_NONE); } - | decl_spec_no_type type m_decl_spec_no_type - { $$ = make_decl_spec($2, $1, $3, NULL, STG_NONE); } - ; - -m_decl_spec_no_type: { $$ = NULL; } - | decl_spec_no_type - ; - -decl_spec_no_type: - type_qualifier m_decl_spec_no_type { $$ = make_decl_spec(NULL, $2, NULL, $1, STG_NONE); } - | function_specifier m_decl_spec_no_type { $$ = make_decl_spec(NULL, $2, NULL, $1, STG_NONE); } - | storage_cls_spec m_decl_spec_no_type { $$ = make_decl_spec(NULL, $2, NULL, NULL, $1); } - ; - -declarator: - '*' m_type_qual_list declarator %prec PPTR - { $$ = $3; $$->type = append_ptrchain_type($$->type, type_new_pointer(pointer_default, NULL, $2)); } - | callconv declarator { $$ = $2; if ($$->func_type) $$->func_type->attrs = append_attr($$->func_type->attrs, make_attrp(ATTR_CALLCONV, $1)); - else if ($$->type) $$->type->attrs = append_attr($$->type->attrs, make_attrp(ATTR_CALLCONV, $1)); } - | direct_declarator - ; - -direct_declarator: - ident { $$ = make_declarator($1); } - | '(' declarator ')' { $$ = $2; } - | direct_declarator array { $$ = $1; $$->array = append_array($$->array, $2); } - | direct_declarator '(' m_args ')' { $$ = $1; - $$->func_type = append_ptrchain_type($$->type, type_new_function($3)); - $$->type = NULL; - } - ; - -/* abstract declarator */ -abstract_declarator: - '*' m_type_qual_list m_abstract_declarator %prec PPTR - { $$ = $3; $$->type = append_ptrchain_type($$->type, type_new_pointer(pointer_default, NULL, $2)); } - | callconv m_abstract_declarator { $$ = $2; if ($$->func_type) $$->func_type->attrs = append_attr($$->func_type->attrs, make_attrp(ATTR_CALLCONV, $1)); - else if ($$->type) $$->type->attrs = append_attr($$->type->attrs, make_attrp(ATTR_CALLCONV, $1)); } - | abstract_direct_declarator - ; - -/* abstract declarator without accepting direct declarator */ -abstract_declarator_no_direct: - '*' m_type_qual_list m_any_declarator %prec PPTR - { $$ = $3; $$->type = append_ptrchain_type($$->type, type_new_pointer(pointer_default, NULL, $2)); } - | callconv m_any_declarator { $$ = $2; if ($$->func_type) $$->func_type->attrs = append_attr($$->func_type->attrs, make_attrp(ATTR_CALLCONV, $1)); - else if ($$->type) $$->type->attrs = append_attr($$->type->attrs, make_attrp(ATTR_CALLCONV, $1)); } - ; - -/* abstract declarator or empty */ -m_abstract_declarator: { $$ = make_declarator(NULL); } - | abstract_declarator - ; - -/* abstract direct declarator */ -abstract_direct_declarator: - '(' abstract_declarator_no_direct ')' { $$ = $2; } - | abstract_direct_declarator array { $$ = $1; $$->array = append_array($$->array, $2); } - | array { $$ = make_declarator(NULL); $$->array = append_array($$->array, $1); } - | '(' m_args ')' - { $$ = make_declarator(NULL); - $$->func_type = append_ptrchain_type($$->type, type_new_function($2)); - $$->type = NULL; - } - | abstract_direct_declarator '(' m_args ')' - { $$ = $1; - $$->func_type = append_ptrchain_type($$->type, type_new_function($3)); - $$->type = NULL; - } - ; - -/* abstract or non-abstract declarator */ -any_declarator: - '*' m_type_qual_list m_any_declarator %prec PPTR - { $$ = $3; $$->type = append_ptrchain_type($$->type, type_new_pointer(pointer_default, NULL, $2)); } - | callconv m_any_declarator { $$ = $2; $$->type->attrs = append_attr($$->type->attrs, make_attrp(ATTR_CALLCONV, $1)); } - | any_direct_declarator - ; - -/* abstract or non-abstract declarator without accepting direct declarator */ -any_declarator_no_direct: - '*' m_type_qual_list m_any_declarator %prec PPTR - { $$ = $3; $$->type = append_ptrchain_type($$->type, type_new_pointer(pointer_default, NULL, $2)); } - | callconv m_any_declarator { $$ = $2; $$->type->attrs = append_attr($$->type->attrs, make_attrp(ATTR_CALLCONV, $1)); } - ; - -/* abstract or non-abstract declarator or empty */ -m_any_declarator: { $$ = make_declarator(NULL); } - | any_declarator - ; - -/* abstract or non-abstract direct declarator. note: direct declarators - * aren't accepted inside brackets to avoid ambiguity with the rule for - * function arguments */ -any_direct_declarator: - ident { $$ = make_declarator($1); } - | '(' any_declarator_no_direct ')' { $$ = $2; } - | any_direct_declarator array { $$ = $1; $$->array = append_array($$->array, $2); } - | array { $$ = make_declarator(NULL); $$->array = append_array($$->array, $1); } - | '(' m_args ')' - { $$ = make_declarator(NULL); - $$->func_type = append_ptrchain_type($$->type, type_new_function($2)); - $$->type = NULL; - } - | any_direct_declarator '(' m_args ')' - { $$ = $1; - $$->func_type = append_ptrchain_type($$->type, type_new_function($3)); - $$->type = NULL; - } - ; - -declarator_list: - declarator { $$ = append_declarator( NULL, $1 ); } - | declarator_list ',' declarator { $$ = append_declarator( $1, $3 ); } - ; - -m_bitfield: { $$ = NULL; } - | ':' expr_const { $$ = $2; } - ; - -struct_declarator: any_declarator m_bitfield { $$ = $1; $$->bits = $2; - if (!$$->bits && !$$->var->name) - error_loc("unnamed fields are not allowed\n"); - } - ; - -struct_declarator_list: - struct_declarator { $$ = append_declarator( NULL, $1 ); } - | struct_declarator_list ',' struct_declarator - { $$ = append_declarator( $1, $3 ); } - ; - -init_declarator: - declarator { $$ = $1; } - | declarator '=' expr_const { $$ = $1; $1->var->eval = $3; } - ; - -threading_type: - tAPARTMENT { $$ = THREADING_APARTMENT; } - | tNEUTRAL { $$ = THREADING_NEUTRAL; } - | tSINGLE { $$ = THREADING_SINGLE; } - | tFREE { $$ = THREADING_FREE; } - | tBOTH { $$ = THREADING_BOTH; } - ; - -pointer_type: - tREF { $$ = RPC_FC_RP; } - | tUNIQUE { $$ = RPC_FC_UP; } - | tPTR { $$ = RPC_FC_FP; } - ; - -structdef: tSTRUCT t_ident '{' fields '}' { $$ = type_new_struct($2, TRUE, $4); } - ; - -type: tVOID { $$ = type_new_void(); } - | aKNOWNTYPE { $$ = find_type_or_error($1, 0); } - | base_type { $$ = $1; } - | enumdef { $$ = $1; } - | tENUM aIDENTIFIER { $$ = type_new_enum($2, FALSE, NULL); } - | structdef { $$ = $1; } - | tSTRUCT aIDENTIFIER { $$ = type_new_struct($2, FALSE, NULL); } - | uniondef { $$ = $1; } - | tUNION aIDENTIFIER { $$ = type_new_nonencapsulated_union($2, FALSE, NULL); } - | tSAFEARRAY '(' type ')' { $$ = make_safearray($3); } - ; - -typedef: tTYPEDEF m_attributes decl_spec declarator_list - { reg_typedefs($3, $4, check_typedef_attrs($2)); - $$ = make_statement_typedef($4); - } - ; - -uniondef: tUNION t_ident '{' ne_union_fields '}' - { $$ = type_new_nonencapsulated_union($2, TRUE, $4); } - | tUNION t_ident - tSWITCH '(' s_field ')' - m_ident '{' cases '}' { $$ = type_new_encapsulated_union($2, $5, $7, $9); } - ; - -version: - aNUM { $$ = MAKEVERSION($1, 0); } - | aNUM '.' aNUM { $$ = MAKEVERSION($1, $3); } - ; - -%% - -static void decl_builtin_basic(const char *name, enum type_basic_type type) -{ - type_t *t = type_new_basic(type); - reg_type(t, name, 0); -} - -static void decl_builtin_alias(const char *name, type_t *t) -{ - reg_type(type_new_alias(t, name), name, 0); -} - -void init_types(void) -{ - decl_builtin_basic("byte", TYPE_BASIC_BYTE); - decl_builtin_basic("wchar_t", TYPE_BASIC_WCHAR); - decl_builtin_basic("float", TYPE_BASIC_FLOAT); - decl_builtin_basic("double", TYPE_BASIC_DOUBLE); - decl_builtin_basic("error_status_t", TYPE_BASIC_ERROR_STATUS_T); - decl_builtin_basic("handle_t", TYPE_BASIC_HANDLE); - decl_builtin_alias("boolean", type_new_basic(TYPE_BASIC_BYTE)); -} - -static str_list_t *append_str(str_list_t *list, char *str) -{ - struct str_list_entry_t *entry; - - if (!str) return list; - if (!list) - { - list = xmalloc( sizeof(*list) ); - list_init( list ); - } - entry = xmalloc( sizeof(*entry) ); - entry->str = str; - list_add_tail( list, &entry->entry ); - return list; -} - -static attr_list_t *append_attr(attr_list_t *list, attr_t *attr) -{ - attr_t *attr_existing; - if (!attr) return list; - if (!list) - { - list = xmalloc( sizeof(*list) ); - list_init( list ); - } - LIST_FOR_EACH_ENTRY(attr_existing, list, attr_t, entry) - if (attr_existing->type == attr->type) - { - parser_warning("duplicate attribute %s\n", get_attr_display_name(attr->type)); - /* use the last attribute, like MIDL does */ - list_remove(&attr_existing->entry); - break; - } - list_add_tail( list, &attr->entry ); - return list; -} - -static attr_list_t *move_attr(attr_list_t *dst, attr_list_t *src, enum attr_type type) -{ - attr_t *attr; - if (!src) return dst; - LIST_FOR_EACH_ENTRY(attr, src, attr_t, entry) - if (attr->type == type) - { - list_remove(&attr->entry); - return append_attr(dst, attr); - } - return dst; -} - -static attr_list_t *append_attr_list(attr_list_t *new_list, attr_list_t *old_list) -{ - struct list *entry; - - if (!old_list) return new_list; - - while ((entry = list_head(old_list))) - { - attr_t *attr = LIST_ENTRY(entry, attr_t, entry); - list_remove(entry); - new_list = append_attr(new_list, attr); - } - return new_list; -} - -static attr_list_t *dupattrs(const attr_list_t *list) -{ - attr_list_t *new_list; - const attr_t *attr; - - if (!list) return NULL; - - new_list = xmalloc( sizeof(*list) ); - list_init( new_list ); - LIST_FOR_EACH_ENTRY(attr, list, const attr_t, entry) - { - attr_t *new_attr = xmalloc(sizeof(*new_attr)); - *new_attr = *attr; - list_add_tail(new_list, &new_attr->entry); - } - return new_list; -} - -static decl_spec_t *make_decl_spec(type_t *type, decl_spec_t *left, decl_spec_t *right, attr_t *attr, enum storage_class stgclass) -{ - decl_spec_t *declspec = left ? left : right; - if (!declspec) - { - declspec = xmalloc(sizeof(*declspec)); - declspec->type = NULL; - declspec->attrs = NULL; - declspec->stgclass = STG_NONE; - } - declspec->type = type; - if (left && declspec != left) - { - declspec->attrs = append_attr_list(declspec->attrs, left->attrs); - if (declspec->stgclass == STG_NONE) - declspec->stgclass = left->stgclass; - else if (left->stgclass != STG_NONE) - error_loc("only one storage class can be specified\n"); - assert(!left->type); - free(left); - } - if (right && declspec != right) - { - declspec->attrs = append_attr_list(declspec->attrs, right->attrs); - if (declspec->stgclass == STG_NONE) - declspec->stgclass = right->stgclass; - else if (right->stgclass != STG_NONE) - error_loc("only one storage class can be specified\n"); - assert(!right->type); - free(right); - } - - declspec->attrs = append_attr(declspec->attrs, attr); - if (declspec->stgclass == STG_NONE) - declspec->stgclass = stgclass; - else if (stgclass != STG_NONE) - error_loc("only one storage class can be specified\n"); - - /* apply attributes to type */ - if (type && declspec->attrs) - { - attr_list_t *attrs; - declspec->type = duptype(type, 1); - attrs = dupattrs(type->attrs); - declspec->type->attrs = append_attr_list(attrs, declspec->attrs); - declspec->attrs = NULL; - } - - return declspec; -} - -static attr_t *make_attr(enum attr_type type) -{ - attr_t *a = xmalloc(sizeof(attr_t)); - a->type = type; - a->u.ival = 0; - return a; -} - -static attr_t *make_attrv(enum attr_type type, unsigned int val) -{ - attr_t *a = xmalloc(sizeof(attr_t)); - a->type = type; - a->u.ival = val; - return a; -} - -static attr_t *make_attrp(enum attr_type type, void *val) -{ - attr_t *a = xmalloc(sizeof(attr_t)); - a->type = type; - a->u.pval = val; - return a; -} - -static expr_list_t *append_expr(expr_list_t *list, expr_t *expr) -{ - if (!expr) return list; - if (!list) - { - list = xmalloc( sizeof(*list) ); - list_init( list ); - } - list_add_tail( list, &expr->entry ); - return list; -} - -static array_dims_t *append_array(array_dims_t *list, expr_t *expr) -{ - if (!expr) return list; - if (!list) - { - list = xmalloc( sizeof(*list) ); - list_init( list ); - } - list_add_tail( list, &expr->entry ); - return list; -} - -static struct list type_pool = LIST_INIT(type_pool); -typedef struct -{ - type_t data; - struct list link; -} type_pool_node_t; - -type_t *alloc_type(void) -{ - type_pool_node_t *node = xmalloc(sizeof *node); - list_add_tail(&type_pool, &node->link); - return &node->data; -} - -void set_all_tfswrite(int val) -{ - type_pool_node_t *node; - LIST_FOR_EACH_ENTRY(node, &type_pool, type_pool_node_t, link) - node->data.tfswrite = val; -} - -void clear_all_offsets(void) -{ - type_pool_node_t *node; - LIST_FOR_EACH_ENTRY(node, &type_pool, type_pool_node_t, link) - node->data.typestring_offset = node->data.ptrdesc = 0; -} - -static void type_function_add_head_arg(type_t *type, var_t *arg) -{ - if (!type->details.function->args) - { - type->details.function->args = xmalloc( sizeof(*type->details.function->args) ); - list_init( type->details.function->args ); - } - list_add_head( type->details.function->args, &arg->entry ); -} - -static int is_allowed_range_type(const type_t *type) -{ - switch (type_get_type(type)) - { - case TYPE_ENUM: - return TRUE; - case TYPE_BASIC: - switch (type_basic_get_type(type)) - { - case TYPE_BASIC_INT8: - case TYPE_BASIC_INT16: - case TYPE_BASIC_INT32: - case TYPE_BASIC_INT64: - case TYPE_BASIC_INT: - case TYPE_BASIC_INT3264: - case TYPE_BASIC_BYTE: - case TYPE_BASIC_CHAR: - case TYPE_BASIC_WCHAR: - case TYPE_BASIC_HYPER: - return TRUE; - case TYPE_BASIC_FLOAT: - case TYPE_BASIC_DOUBLE: - case TYPE_BASIC_ERROR_STATUS_T: - case TYPE_BASIC_HANDLE: - return FALSE; - } - return FALSE; - default: - return FALSE; - } -} - -static type_t *append_ptrchain_type(type_t *ptrchain, type_t *type) -{ - type_t *ptrchain_type; - if (!ptrchain) - return type; - for (ptrchain_type = ptrchain; type_pointer_get_ref(ptrchain_type); ptrchain_type = type_pointer_get_ref(ptrchain_type)) - ; - assert(ptrchain_type->type_type == TYPE_POINTER); - ptrchain_type->details.pointer.ref = type; - return ptrchain; -} - -static var_t *declare_var(attr_list_t *attrs, decl_spec_t *decl_spec, const declarator_t *decl, - int top) -{ - var_t *v = decl->var; - expr_list_t *sizes = get_attrp(attrs, ATTR_SIZEIS); - expr_list_t *lengs = get_attrp(attrs, ATTR_LENGTHIS); - int sizeless; - expr_t *dim; - type_t **ptype; - array_dims_t *arr = decl ? decl->array : NULL; - type_t *func_type = decl ? decl->func_type : NULL; - type_t *type = decl_spec->type; - - /* In case of a range attribute, duplicate the type to keep track of - * the min/max values in the type format string */ - if(is_attr(attrs, ATTR_RANGE)) - type = duptype(type, 1); - - if (is_attr(type->attrs, ATTR_INLINE)) - { - if (!func_type) - error_loc("inline attribute applied to non-function type\n"); - else - { - type_t *t; - /* move inline attribute from return type node to function node */ - for (t = func_type; is_ptr(t); t = type_pointer_get_ref(t)) - ; - t->attrs = move_attr(t->attrs, type->attrs, ATTR_INLINE); - } - } - - /* add type onto the end of the pointers in pident->type */ - v->type = append_ptrchain_type(decl ? decl->type : NULL, type); - v->stgclass = decl_spec->stgclass; - v->attrs = attrs; - - /* check for pointer attribute being applied to non-pointer, non-array - * type */ - if (!arr) - { - int ptr_attr = get_attrv(v->attrs, ATTR_POINTERTYPE); - const type_t *ptr = NULL; - /* pointer attributes on the left side of the type belong to the function - * pointer, if one is being declared */ - type_t **pt = func_type ? &func_type : &v->type; - for (ptr = *pt; ptr && !ptr_attr; ) - { - ptr_attr = get_attrv(ptr->attrs, ATTR_POINTERTYPE); - if (!ptr_attr && type_is_alias(ptr)) - ptr = type_alias_get_aliasee(ptr); - else - break; - } - if (is_ptr(ptr)) - { - if (ptr_attr && ptr_attr != RPC_FC_UP && - type_get_type(type_pointer_get_ref(ptr)) == TYPE_INTERFACE) - warning_loc_info(&v->loc_info, - "%s: pointer attribute applied to interface " - "pointer type has no effect\n", v->name); - if (!ptr_attr && top && (*pt)->details.pointer.def_fc != RPC_FC_RP) - { - /* FIXME: this is a horrible hack to cope with the issue that we - * store an offset to the typeformat string in the type object, but - * two typeformat strings may be written depending on whether the - * pointer is a toplevel parameter or not */ - *pt = duptype(*pt, 1); - } - } - else if (ptr_attr) - error_loc("%s: pointer attribute applied to non-pointer type\n", v->name); - } - - if (is_attr(v->attrs, ATTR_STRING)) - { - type_t *t = type; - - if (!is_ptr(v->type) && !arr) - error_loc("'%s': [string] attribute applied to non-pointer, non-array type\n", - v->name); - - while (is_ptr(t)) - t = type_pointer_get_ref(t); - - if (type_get_type(t) != TYPE_BASIC && - (get_basic_fc(t) != RPC_FC_CHAR && - get_basic_fc(t) != RPC_FC_BYTE && - get_basic_fc(t) != RPC_FC_WCHAR)) - { - error_loc("'%s': [string] attribute is only valid on 'char', 'byte', or 'wchar_t' pointers and arrays\n", - v->name); - } - } - - if (is_attr(v->attrs, ATTR_V1ENUM)) - { - if (type_get_type_detect_alias(v->type) != TYPE_ENUM) - error_loc("'%s': [v1_enum] attribute applied to non-enum type\n", v->name); - } - - if (is_attr(v->attrs, ATTR_RANGE) && !is_allowed_range_type(v->type)) - error_loc("'%s': [range] attribute applied to non-integer type\n", - v->name); - - ptype = &v->type; - sizeless = FALSE; - if (arr) LIST_FOR_EACH_ENTRY_REV(dim, arr, expr_t, entry) - { - if (sizeless) - error_loc("%s: only the first array dimension can be unspecified\n", v->name); - - if (dim->is_const) - { - if (dim->cval <= 0) - error_loc("%s: array dimension must be positive\n", v->name); - - /* FIXME: should use a type_memsize that allows us to pass in a pointer size */ - if (0) - { - unsigned int size = type_memsize(v->type); - - if (0xffffffffu / size < dim->cval) - error_loc("%s: total array size is too large\n", v->name); - } - } - else - sizeless = TRUE; - - *ptype = type_new_array(NULL, *ptype, FALSE, - dim->is_const ? dim->cval : 0, - dim->is_const ? NULL : dim, NULL, - pointer_default); - } - - ptype = &v->type; - if (sizes) LIST_FOR_EACH_ENTRY(dim, sizes, expr_t, entry) - { - if (dim->type != EXPR_VOID) - { - if (is_array(*ptype)) - { - if (!type_array_get_conformance(*ptype) || - type_array_get_conformance(*ptype)->type != EXPR_VOID) - error_loc("%s: cannot specify size_is for an already sized array\n", v->name); - else - *ptype = type_new_array((*ptype)->name, - type_array_get_element(*ptype), FALSE, - 0, dim, NULL, 0); - } - else if (is_ptr(*ptype)) - *ptype = type_new_array((*ptype)->name, type_pointer_get_ref(*ptype), TRUE, - 0, dim, NULL, pointer_default); - else - error_loc("%s: size_is attribute applied to illegal type\n", v->name); - } - - if (is_ptr(*ptype)) - ptype = &(*ptype)->details.pointer.ref; - else if (is_array(*ptype)) - ptype = &(*ptype)->details.array.elem; - else - error_loc("%s: too many expressions in size_is attribute\n", v->name); - } - - ptype = &v->type; - if (lengs) LIST_FOR_EACH_ENTRY(dim, lengs, expr_t, entry) - { - if (dim->type != EXPR_VOID) - { - if (is_array(*ptype)) - { - *ptype = type_new_array((*ptype)->name, - type_array_get_element(*ptype), - type_array_is_decl_as_ptr(*ptype), - type_array_get_dim(*ptype), - type_array_get_conformance(*ptype), - dim, type_array_get_ptr_default_fc(*ptype)); - } - else - error_loc("%s: length_is attribute applied to illegal type\n", v->name); - } - - if (is_ptr(*ptype)) - ptype = &(*ptype)->details.pointer.ref; - else if (is_array(*ptype)) - ptype = &(*ptype)->details.array.elem; - else - error_loc("%s: too many expressions in length_is attribute\n", v->name); - } - - /* v->type is currently pointing to the type on the left-side of the - * declaration, so we need to fix this up so that it is the return type of the - * function and make v->type point to the function side of the declaration */ - if (func_type) - { - type_t *ft, *t; - type_t *return_type = v->type; - v->type = func_type; - for (ft = v->type; is_ptr(ft); ft = type_pointer_get_ref(ft)) - ; - assert(type_get_type_detect_alias(ft) == TYPE_FUNCTION); - ft->details.function->rettype = return_type; - /* move calling convention attribute, if present, from pointer nodes to - * function node */ - for (t = v->type; is_ptr(t); t = type_pointer_get_ref(t)) - ft->attrs = move_attr(ft->attrs, t->attrs, ATTR_CALLCONV); - } - else - { - type_t *t; - for (t = v->type; is_ptr(t); t = type_pointer_get_ref(t)) - if (is_attr(t->attrs, ATTR_CALLCONV)) - error_loc("calling convention applied to non-function-pointer type\n"); - } - - if (decl->bits) - v->type = type_new_bitfield(v->type, decl->bits); - - return v; -} - -static var_list_t *set_var_types(attr_list_t *attrs, decl_spec_t *decl_spec, declarator_list_t *decls) -{ - declarator_t *decl, *next; - var_list_t *var_list = NULL; - - LIST_FOR_EACH_ENTRY_SAFE( decl, next, decls, declarator_t, entry ) - { - var_t *var = declare_var(attrs, decl_spec, decl, 0); - var_list = append_var(var_list, var); - free(decl); - } - free(decl_spec); - return var_list; -} - -static ifref_list_t *append_ifref(ifref_list_t *list, ifref_t *iface) -{ - if (!iface) return list; - if (!list) - { - list = xmalloc( sizeof(*list) ); - list_init( list ); - } - list_add_tail( list, &iface->entry ); - return list; -} - -static ifref_t *make_ifref(type_t *iface) -{ - ifref_t *l = xmalloc(sizeof(ifref_t)); - l->iface = iface; - l->attrs = NULL; - return l; -} - -var_list_t *append_var(var_list_t *list, var_t *var) -{ - if (!var) return list; - if (!list) - { - list = xmalloc( sizeof(*list) ); - list_init( list ); - } - list_add_tail( list, &var->entry ); - return list; -} - -static var_list_t *append_var_list(var_list_t *list, var_list_t *vars) -{ - if (!vars) return list; - if (!list) - { - list = xmalloc( sizeof(*list) ); - list_init( list ); - } - list_move_tail( list, vars ); - return list; -} - -var_t *make_var(char *name) -{ - var_t *v = xmalloc(sizeof(var_t)); - v->name = name; - v->type = NULL; - v->attrs = NULL; - v->eval = NULL; - v->stgclass = STG_NONE; - init_loc_info(&v->loc_info); - return v; -} - -static declarator_list_t *append_declarator(declarator_list_t *list, declarator_t *d) -{ - if (!d) return list; - if (!list) { - list = xmalloc(sizeof(*list)); - list_init(list); - } - list_add_tail(list, &d->entry); - return list; -} - -static declarator_t *make_declarator(var_t *var) -{ - declarator_t *d = xmalloc(sizeof(*d)); - d->var = var ? var : make_var(NULL); - d->type = NULL; - d->func_type = NULL; - d->array = NULL; - d->bits = NULL; - return d; -} - -static type_t *make_safearray(type_t *type) -{ - return type_new_array(NULL, type_new_alias(type, "SAFEARRAY"), TRUE, 0, - NULL, NULL, RPC_FC_RP); -} - -static typelib_t *make_library(const char *name, const attr_list_t *attrs) -{ - typelib_t *typelib = xmalloc(sizeof(*typelib)); - typelib->name = xstrdup(name); - typelib->attrs = attrs; - list_init( &typelib->importlibs ); - return typelib; -} - -#define HASHMAX 64 - -static int hash_ident(const char *name) -{ - const char *p = name; - int sum = 0; - /* a simple sum hash is probably good enough */ - while (*p) { - sum += *p; - p++; - } - return sum & (HASHMAX-1); -} - -/***** type repository *****/ - -struct rtype { - const char *name; - type_t *type; - int t; - struct rtype *next; -}; - -struct rtype *type_hash[HASHMAX]; - -type_t *reg_type(type_t *type, const char *name, int t) -{ - struct rtype *nt; - int hash; - if (!name) { - error_loc("registering named type without name\n"); - return type; - } - hash = hash_ident(name); - nt = xmalloc(sizeof(struct rtype)); - nt->name = name; - nt->type = type; - nt->t = t; - nt->next = type_hash[hash]; - type_hash[hash] = nt; - if ((t == tsSTRUCT || t == tsUNION)) - fix_incomplete_types(type); - return type; -} - -static int is_incomplete(const type_t *t) -{ - return !t->defined && - (type_get_type_detect_alias(t) == TYPE_STRUCT || - type_get_type_detect_alias(t) == TYPE_UNION || - type_get_type_detect_alias(t) == TYPE_ENCAPSULATED_UNION); -} - -void add_incomplete(type_t *t) -{ - struct typenode *tn = xmalloc(sizeof *tn); - tn->type = t; - list_add_tail(&incomplete_types, &tn->entry); -} - -static void fix_type(type_t *t) -{ - if (type_is_alias(t) && is_incomplete(t)) { - type_t *ot = type_alias_get_aliasee(t); - fix_type(ot); - if (type_get_type_detect_alias(ot) == TYPE_STRUCT || - type_get_type_detect_alias(ot) == TYPE_UNION || - type_get_type_detect_alias(ot) == TYPE_ENCAPSULATED_UNION) - t->details.structure = ot->details.structure; - t->defined = ot->defined; - } -} - -static void fix_incomplete(void) -{ - struct typenode *tn, *next; - - LIST_FOR_EACH_ENTRY_SAFE(tn, next, &incomplete_types, struct typenode, entry) { - fix_type(tn->type); - list_remove(&tn->entry); - free(tn); - } -} - -static void fix_incomplete_types(type_t *complete_type) -{ - struct typenode *tn, *next; - - LIST_FOR_EACH_ENTRY_SAFE(tn, next, &incomplete_types, struct typenode, entry) - { - if (type_is_equal(complete_type, tn->type)) - { - tn->type->details.structure = complete_type->details.structure; - list_remove(&tn->entry); - free(tn); - } - } -} - -static type_t *reg_typedefs(decl_spec_t *decl_spec, declarator_list_t *decls, attr_list_t *attrs) -{ - const declarator_t *decl; - type_t *type = decl_spec->type; - - /* We must generate names for tagless enum, struct or union. - Typedef-ing a tagless enum, struct or union means we want the typedef - to be included in a library hence the public attribute. */ - if ((type_get_type_detect_alias(type) == TYPE_ENUM || - type_get_type_detect_alias(type) == TYPE_STRUCT || - type_get_type_detect_alias(type) == TYPE_UNION || - type_get_type_detect_alias(type) == TYPE_ENCAPSULATED_UNION) && - !type->name && !parse_only) - { - if (! is_attr(attrs, ATTR_PUBLIC)) - attrs = append_attr( attrs, make_attr(ATTR_PUBLIC) ); - type->name = gen_name(); - } - else if (is_attr(attrs, ATTR_UUID) && !is_attr(attrs, ATTR_PUBLIC)) - attrs = append_attr( attrs, make_attr(ATTR_PUBLIC) ); - - /* Append the SWITCHTYPE attribute to a non-encapsulated union if it does not already have it. */ - if (type_get_type_detect_alias(type) == TYPE_UNION && - is_attr(attrs, ATTR_SWITCHTYPE) && - !is_attr(type->attrs, ATTR_SWITCHTYPE)) - type->attrs = append_attr(type->attrs, make_attrp(ATTR_SWITCHTYPE, get_attrp(attrs, ATTR_SWITCHTYPE))); - - LIST_FOR_EACH_ENTRY( decl, decls, const declarator_t, entry ) - { - - if (decl->var->name) { - type_t *cur; - var_t *name; - - cur = find_type(decl->var->name, 0); - if (cur) - error_loc("%s: redefinition error; original definition was at %s:%d\n", - cur->name, cur->loc_info.input_name, - cur->loc_info.line_number); - - name = declare_var(attrs, decl_spec, decl, 0); - cur = type_new_alias(name->type, name->name); - cur->attrs = attrs; - - if (is_incomplete(cur)) - add_incomplete(cur); - reg_type(cur, cur->name, 0); - } - } - return type; -} - -type_t *find_type(const char *name, int t) -{ - struct rtype *cur = type_hash[hash_ident(name)]; - while (cur && (cur->t != t || strcmp(cur->name, name))) - cur = cur->next; - return cur ? cur->type : NULL; -} - -static type_t *find_type_or_error(const char *name, int t) -{ - type_t *type = find_type(name, t); - if (!type) { - error_loc("type '%s' not found\n", name); - return NULL; - } - return type; -} - -static type_t *find_type_or_error2(char *name, int t) -{ - type_t *tp = find_type_or_error(name, t); - free(name); - return tp; -} - -int is_type(const char *name) -{ - return find_type(name, 0) != NULL; -} - -type_t *get_type(enum type_type type, char *name, int t) -{ - type_t *tp; - if (name) { - tp = find_type(name, t); - if (tp) { - free(name); - return tp; - } - } - tp = make_type(type); - tp->name = name; - if (!name) return tp; - return reg_type(tp, name, t); -} - -/***** constant repository *****/ - -struct rconst { - char *name; - var_t *var; - struct rconst *next; -}; - -struct rconst *const_hash[HASHMAX]; - -static var_t *reg_const(var_t *var) -{ - struct rconst *nc; - int hash; - if (!var->name) { - error_loc("registering constant without name\n"); - return var; - } - hash = hash_ident(var->name); - nc = xmalloc(sizeof(struct rconst)); - nc->name = var->name; - nc->var = var; - nc->next = const_hash[hash]; - const_hash[hash] = nc; - return var; -} - -var_t *find_const(const char *name, int f) -{ - struct rconst *cur = const_hash[hash_ident(name)]; - while (cur && strcmp(cur->name, name)) - cur = cur->next; - if (!cur) { - if (f) error_loc("constant '%s' not found\n", name); - return NULL; - } - return cur->var; -} - -static char *gen_name(void) -{ - static const char format[] = "__WIDL_%s_generated_name_%08lX"; - static unsigned long n = 0; - static const char *file_id; - static size_t size; - char *name; - - if (! file_id) - { - char *dst = dup_basename(input_name, ".idl"); - file_id = dst; - - for (; *dst; ++dst) - if (! isalnum((unsigned char) *dst)) - *dst = '_'; - - size = sizeof format - 7 + strlen(file_id) + 8; - } - - name = xmalloc(size); - sprintf(name, format, file_id, n++); - return name; -} - -struct allowed_attr -{ - unsigned int dce_compatible : 1; - unsigned int acf : 1; - unsigned int on_interface : 1; - unsigned int on_function : 1; - unsigned int on_arg : 1; - unsigned int on_type : 1; - unsigned int on_enum : 1; - unsigned int on_struct : 1; - unsigned int on_union : 1; - unsigned int on_field : 1; - unsigned int on_library : 1; - unsigned int on_dispinterface : 1; - unsigned int on_module : 1; - unsigned int on_coclass : 1; - const char *display_name; -}; - -struct allowed_attr allowed_attr[] = -{ - /* attr { D ACF I Fn ARG T En St Un Fi L DI M C } */ - /* ATTR_AGGREGATABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "aggregatable" }, - /* ATTR_ANNOTATION */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "annotation" }, - /* ATTR_APPOBJECT */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "appobject" }, - /* ATTR_ASYNC */ { 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "async" }, - /* ATTR_AUTO_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "auto_handle" }, - /* ATTR_BINDABLE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "bindable" }, - /* ATTR_BROADCAST */ { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "broadcast" }, - /* ATTR_CALLAS */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "call_as" }, - /* ATTR_CALLCONV */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL }, - /* ATTR_CASE */ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "case" }, - /* ATTR_CODE */ { 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "code" }, - /* ATTR_COMMSTATUS */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "comm_status" }, - /* ATTR_CONST */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "const" }, - /* ATTR_CONTEXTHANDLE */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "context_handle" }, - /* ATTR_CONTROL */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, "control" }, - /* ATTR_DECODE */ { 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "decode" }, - /* ATTR_DEFAULT */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, "default" }, - /* ATTR_DEFAULTBIND */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "defaultbind" }, - /* ATTR_DEFAULTCOLLELEM */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "defaultcollelem" }, - /* ATTR_DEFAULTVALUE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "defaultvalue" }, - /* ATTR_DEFAULTVTABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "defaultvtable" }, - /* ATTR_DISABLECONSISTENCYCHECK */{ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "disable_consistency_check" }, - /* ATTR_DISPINTERFACE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL }, - /* ATTR_DISPLAYBIND */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "displaybind" }, - /* ATTR_DLLNAME */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, "dllname" }, - /* ATTR_DUAL */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "dual" }, - /* ATTR_ENABLEALLOCATE */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "enable_allocate" }, - /* ATTR_ENCODE */ { 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "encode" }, - /* ATTR_ENDPOINT */ { 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "endpoint" }, - /* ATTR_ENTRY */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "entry" }, - /* ATTR_EXPLICIT_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "explicit_handle" }, - /* ATTR_FAULTSTATUS */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "fault_status" }, - /* ATTR_FORCEALLOCATE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "force_allocate" }, - /* ATTR_HANDLE */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "handle" }, - /* ATTR_HELPCONTEXT */ { 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, "helpcontext" }, - /* ATTR_HELPFILE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "helpfile" }, - /* ATTR_HELPSTRING */ { 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, "helpstring" }, - /* ATTR_HELPSTRINGCONTEXT */ { 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, "helpstringcontext" }, - /* ATTR_HELPSTRINGDLL */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "helpstringdll" }, - /* ATTR_HIDDEN */ { 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, "hidden" }, - /* ATTR_ID */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "id" }, - /* ATTR_IDEMPOTENT */ { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "idempotent" }, - /* ATTR_IGNORE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "ignore" }, - /* ATTR_IIDIS */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "iid_is" }, - /* ATTR_IMMEDIATEBIND */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "immediatebind" }, - /* ATTR_IMPLICIT_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "implicit_handle" }, - /* ATTR_IN */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "in" }, - /* ATTR_INLINE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "inline" }, - /* ATTR_INPUTSYNC */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "inputsync" }, - /* ATTR_LENGTHIS */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "length_is" }, - /* ATTR_LIBLCID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "lcid" }, - /* ATTR_LICENSED */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "licensed" }, - /* ATTR_LOCAL */ { 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "local" }, - /* ATTR_MAYBE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "maybe" }, - /* ATTR_MESSAGE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "message" }, - /* ATTR_NOCODE */ { 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "nocode" }, - /* ATTR_NONBROWSABLE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "nonbrowsable" }, - /* ATTR_NONCREATABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "noncreatable" }, - /* ATTR_NONEXTENSIBLE */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "nonextensible" }, - /* ATTR_NOTIFY */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "notify" }, - /* ATTR_NOTIFYFLAG */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "notify_flag" }, - /* ATTR_OBJECT */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "object" }, - /* ATTR_ODL */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, "odl" }, - /* ATTR_OLEAUTOMATION */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "oleautomation" }, - /* ATTR_OPTIMIZE */ { 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "optimize" }, - /* ATTR_OPTIONAL */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "optional" }, - /* ATTR_OUT */ { 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "out" }, - /* ATTR_PARAMLCID */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "lcid" }, - /* ATTR_PARTIALIGNORE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "partial_ignore" }, - /* ATTR_POINTERDEFAULT */ { 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "pointer_default" }, - /* ATTR_POINTERTYPE */ { 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, "ref, unique or ptr" }, - /* ATTR_PROGID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "progid" }, - /* ATTR_PROPGET */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "propget" }, - /* ATTR_PROPPUT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "propput" }, - /* ATTR_PROPPUTREF */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "propputref" }, - /* ATTR_PROXY */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "proxy" }, - /* ATTR_PUBLIC */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "public" }, - /* ATTR_RANGE */ { 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, "range" }, - /* ATTR_READONLY */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "readonly" }, - /* ATTR_REPRESENTAS */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "represent_as" }, - /* ATTR_REQUESTEDIT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "requestedit" }, - /* ATTR_RESTRICTED */ { 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, "restricted" }, - /* ATTR_RETVAL */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "retval" }, - /* ATTR_SIZEIS */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "size_is" }, - /* ATTR_SOURCE */ { 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, "source" }, - /* ATTR_STRICTCONTEXTHANDLE */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "strict_context_handle" }, - /* ATTR_STRING */ { 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, "string" }, - /* ATTR_SWITCHIS */ { 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "switch_is" }, - /* ATTR_SWITCHTYPE */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, "switch_type" }, - /* ATTR_THREADING */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "threading" }, - /* ATTR_TRANSMITAS */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "transmit_as" }, - /* ATTR_UIDEFAULT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "uidefault" }, - /* ATTR_USESGETLASTERROR */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "usesgetlasterror" }, - /* ATTR_USERMARSHAL */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "user_marshal" }, - /* ATTR_UUID */ { 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, "uuid" }, - /* ATTR_V1ENUM */ { 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, "v1_enum" }, - /* ATTR_VARARG */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "vararg" }, - /* ATTR_VERSION */ { 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, "version" }, - /* ATTR_VIPROGID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "vi_progid" }, - /* ATTR_WIREMARSHAL */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "wire_marshal" }, -}; - -const char *get_attr_display_name(enum attr_type type) -{ - return allowed_attr[type].display_name; -} - -static attr_list_t *check_iface_attrs(const char *name, attr_list_t *attrs) -{ - const attr_t *attr; - if (!attrs) return attrs; - LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) - { - if (!allowed_attr[attr->type].on_interface) - error_loc("inapplicable attribute %s for interface %s\n", - allowed_attr[attr->type].display_name, name); - if (attr->type == ATTR_IMPLICIT_HANDLE) - { - const var_t *var = attr->u.pval; - if (type_get_type( var->type) == TYPE_BASIC && - type_basic_get_type( var->type ) == TYPE_BASIC_HANDLE) - continue; - if (is_aliaschain_attr( var->type, ATTR_HANDLE )) - continue; - error_loc("attribute %s requires a handle type in interface %s\n", - allowed_attr[attr->type].display_name, name); - } - } - return attrs; -} - -static attr_list_t *check_function_attrs(const char *name, attr_list_t *attrs) -{ - const attr_t *attr; - if (!attrs) return attrs; - LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) - { - if (!allowed_attr[attr->type].on_function) - error_loc("inapplicable attribute %s for function %s\n", - allowed_attr[attr->type].display_name, name); - } - return attrs; -} - -static void check_arg_attrs(const var_t *arg) -{ - const attr_t *attr; - - if (arg->attrs) - { - LIST_FOR_EACH_ENTRY(attr, arg->attrs, const attr_t, entry) - { - if (!allowed_attr[attr->type].on_arg) - error_loc("inapplicable attribute %s for argument %s\n", - allowed_attr[attr->type].display_name, arg->name); - } - } -} - -static attr_list_t *check_typedef_attrs(attr_list_t *attrs) -{ - const attr_t *attr; - if (!attrs) return attrs; - LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) - { - if (!allowed_attr[attr->type].on_type) - error_loc("inapplicable attribute %s for typedef\n", - allowed_attr[attr->type].display_name); - } - return attrs; -} - -static attr_list_t *check_enum_attrs(attr_list_t *attrs) -{ - const attr_t *attr; - if (!attrs) return attrs; - LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) - { - if (!allowed_attr[attr->type].on_enum) - error_loc("inapplicable attribute %s for enum\n", - allowed_attr[attr->type].display_name); - } - return attrs; -} - -static attr_list_t *check_struct_attrs(attr_list_t *attrs) -{ - const attr_t *attr; - if (!attrs) return attrs; - LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) - { - if (!allowed_attr[attr->type].on_struct) - error_loc("inapplicable attribute %s for struct\n", - allowed_attr[attr->type].display_name); - } - return attrs; -} - -static attr_list_t *check_union_attrs(attr_list_t *attrs) -{ - const attr_t *attr; - if (!attrs) return attrs; - LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) - { - if (!allowed_attr[attr->type].on_union) - error_loc("inapplicable attribute %s for union\n", - allowed_attr[attr->type].display_name); - } - return attrs; -} - -static attr_list_t *check_field_attrs(const char *name, attr_list_t *attrs) -{ - const attr_t *attr; - if (!attrs) return attrs; - LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) - { - if (!allowed_attr[attr->type].on_field) - error_loc("inapplicable attribute %s for field %s\n", - allowed_attr[attr->type].display_name, name); - } - return attrs; -} - -static attr_list_t *check_library_attrs(const char *name, attr_list_t *attrs) -{ - const attr_t *attr; - if (!attrs) return attrs; - LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) - { - if (!allowed_attr[attr->type].on_library) - error_loc("inapplicable attribute %s for library %s\n", - allowed_attr[attr->type].display_name, name); - } - return attrs; -} - -static attr_list_t *check_dispiface_attrs(const char *name, attr_list_t *attrs) -{ - const attr_t *attr; - if (!attrs) return attrs; - LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) - { - if (!allowed_attr[attr->type].on_dispinterface) - error_loc("inapplicable attribute %s for dispinterface %s\n", - allowed_attr[attr->type].display_name, name); - } - return attrs; -} - -static attr_list_t *check_module_attrs(const char *name, attr_list_t *attrs) -{ - const attr_t *attr; - if (!attrs) return attrs; - LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) - { - if (!allowed_attr[attr->type].on_module) - error_loc("inapplicable attribute %s for module %s\n", - allowed_attr[attr->type].display_name, name); - } - return attrs; -} - -static attr_list_t *check_coclass_attrs(const char *name, attr_list_t *attrs) -{ - const attr_t *attr; - if (!attrs) return attrs; - LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) - { - if (!allowed_attr[attr->type].on_coclass) - error_loc("inapplicable attribute %s for coclass %s\n", - allowed_attr[attr->type].display_name, name); - } - return attrs; -} - -static int is_allowed_conf_type(const type_t *type) -{ - switch (type_get_type(type)) - { - case TYPE_ENUM: - return TRUE; - case TYPE_BASIC: - switch (type_basic_get_type(type)) - { - case TYPE_BASIC_INT8: - case TYPE_BASIC_INT16: - case TYPE_BASIC_INT32: - case TYPE_BASIC_INT64: - case TYPE_BASIC_INT: - case TYPE_BASIC_CHAR: - case TYPE_BASIC_HYPER: - case TYPE_BASIC_BYTE: - case TYPE_BASIC_WCHAR: - return TRUE; - default: - return FALSE; - } - case TYPE_ALIAS: - /* shouldn't get here because of type_get_type call above */ - assert(0); - /* fall through */ - case TYPE_STRUCT: - case TYPE_UNION: - case TYPE_ENCAPSULATED_UNION: - case TYPE_ARRAY: - case TYPE_POINTER: - case TYPE_VOID: - case TYPE_MODULE: - case TYPE_COCLASS: - case TYPE_FUNCTION: - case TYPE_INTERFACE: - case TYPE_BITFIELD: - return FALSE; - } - return FALSE; -} - -static int is_ptr_guid_type(const type_t *type) -{ - /* first, make sure it is a pointer to something */ - if (!is_ptr(type)) return FALSE; - - /* second, make sure it is a pointer to something of size sizeof(GUID), - * i.e. 16 bytes */ - return (type_memsize(type_pointer_get_ref(type)) == 16); -} - -static void check_conformance_expr_list(const char *attr_name, const var_t *arg, const type_t *container_type, expr_list_t *expr_list) -{ - expr_t *dim; - struct expr_loc expr_loc; - expr_loc.v = arg; - expr_loc.attr = attr_name; - if (expr_list) LIST_FOR_EACH_ENTRY(dim, expr_list, expr_t, entry) - { - if (dim->type != EXPR_VOID) - { - const type_t *expr_type = expr_resolve_type(&expr_loc, container_type, dim); - if (!is_allowed_conf_type(expr_type)) - error_loc_info(&arg->loc_info, "expression must resolve to integral type <= 32bits for attribute %s\n", - attr_name); - } - } -} - -static void check_remoting_fields(const var_t *var, type_t *type); - -/* checks that properties common to fields and arguments are consistent */ -static void check_field_common(const type_t *container_type, - const char *container_name, const var_t *arg) -{ - type_t *type = arg->type; - int more_to_do; - const char *container_type_name; - const char *var_type; - - switch (type_get_type(container_type)) - { - case TYPE_STRUCT: - container_type_name = "struct"; - var_type = "field"; - break; - case TYPE_UNION: - container_type_name = "union"; - var_type = "arm"; - break; - case TYPE_ENCAPSULATED_UNION: - container_type_name = "encapsulated union"; - var_type = "arm"; - break; - case TYPE_FUNCTION: - container_type_name = "function"; - var_type = "parameter"; - break; - default: - /* should be no other container types */ - assert(0); - return; - } - - if (is_attr(arg->attrs, ATTR_LENGTHIS) && - (is_attr(arg->attrs, ATTR_STRING) || is_aliaschain_attr(arg->type, ATTR_STRING))) - error_loc_info(&arg->loc_info, - "string and length_is specified for argument %s are mutually exclusive attributes\n", - arg->name); - - if (is_attr(arg->attrs, ATTR_SIZEIS)) - { - expr_list_t *size_is_exprs = get_attrp(arg->attrs, ATTR_SIZEIS); - check_conformance_expr_list("size_is", arg, container_type, size_is_exprs); - } - if (is_attr(arg->attrs, ATTR_LENGTHIS)) - { - expr_list_t *length_is_exprs = get_attrp(arg->attrs, ATTR_LENGTHIS); - check_conformance_expr_list("length_is", arg, container_type, length_is_exprs); - } - if (is_attr(arg->attrs, ATTR_IIDIS)) - { - struct expr_loc expr_loc; - expr_t *expr = get_attrp(arg->attrs, ATTR_IIDIS); - if (expr->type != EXPR_VOID) - { - const type_t *expr_type; - expr_loc.v = arg; - expr_loc.attr = "iid_is"; - expr_type = expr_resolve_type(&expr_loc, container_type, expr); - if (!expr_type || !is_ptr_guid_type(expr_type)) - error_loc_info(&arg->loc_info, "expression must resolve to pointer to GUID type for attribute iid_is\n"); - } - } - if (is_attr(arg->attrs, ATTR_SWITCHIS)) - { - struct expr_loc expr_loc; - expr_t *expr = get_attrp(arg->attrs, ATTR_SWITCHIS); - if (expr->type != EXPR_VOID) - { - const type_t *expr_type; - expr_loc.v = arg; - expr_loc.attr = "switch_is"; - expr_type = expr_resolve_type(&expr_loc, container_type, expr); - if (!expr_type || !is_allowed_conf_type(expr_type)) - error_loc_info(&arg->loc_info, "expression must resolve to integral type <= 32bits for attribute %s\n", - expr_loc.attr); - } - } - - do - { - more_to_do = FALSE; - - switch (typegen_detect_type(type, arg->attrs, TDT_IGNORE_STRINGS)) - { - case TGT_STRUCT: - case TGT_UNION: - check_remoting_fields(arg, type); - break; - case TGT_INVALID: - { - const char *reason = "is invalid"; - switch (type_get_type(type)) - { - case TYPE_VOID: - reason = "cannot derive from void *"; - break; - case TYPE_FUNCTION: - reason = "cannot be a function pointer"; - break; - case TYPE_BITFIELD: - reason = "cannot be a bit-field"; - break; - case TYPE_COCLASS: - reason = "cannot be a class"; - break; - case TYPE_INTERFACE: - reason = "cannot be a non-pointer to an interface"; - break; - case TYPE_MODULE: - reason = "cannot be a module"; - break; - default: - break; - } - error_loc_info(&arg->loc_info, "%s \'%s\' of %s \'%s\' %s\n", - var_type, arg->name, container_type_name, container_name, reason); - break; - } - case TGT_CTXT_HANDLE: - case TGT_CTXT_HANDLE_POINTER: - if (type_get_type(container_type) != TYPE_FUNCTION) - error_loc_info(&arg->loc_info, - "%s \'%s\' of %s \'%s\' cannot be a context handle\n", - var_type, arg->name, container_type_name, - container_name); - break; - case TGT_STRING: - { - const type_t *t = type; - while (is_ptr(t)) - t = type_pointer_get_ref(t); - if (is_aliaschain_attr(t, ATTR_RANGE)) - warning_loc_info(&arg->loc_info, "%s: range not verified for a string of ranged types\n", arg->name); - break; - } - case TGT_POINTER: - type = type_pointer_get_ref(type); - more_to_do = TRUE; - break; - case TGT_ARRAY: - type = type_array_get_element(type); - more_to_do = TRUE; - break; - case TGT_USER_TYPE: - case TGT_IFACE_POINTER: - case TGT_BASIC: - case TGT_ENUM: - case TGT_RANGE: - /* nothing to do */ - break; - } - } while (more_to_do); -} - -static void check_remoting_fields(const var_t *var, type_t *type) -{ - const var_t *field; - const var_list_t *fields = NULL; - - type = type_get_real_type(type); - - if (type->checked) - return; - - type->checked = TRUE; - - if (type_get_type(type) == TYPE_STRUCT) - { - if (type_is_complete(type)) - fields = type_struct_get_fields(type); - else - error_loc_info(&var->loc_info, "undefined type declaration %s\n", type->name); - } - else if (type_get_type(type) == TYPE_UNION || type_get_type(type) == TYPE_ENCAPSULATED_UNION) - fields = type_union_get_cases(type); - - if (fields) LIST_FOR_EACH_ENTRY( field, fields, const var_t, entry ) - if (field->type) check_field_common(type, type->name, field); -} - -/* checks that arguments for a function make sense for marshalling and unmarshalling */ -static void check_remoting_args(const var_t *func) -{ - const char *funcname = func->name; - const var_t *arg; - - if (func->type->details.function->args) LIST_FOR_EACH_ENTRY( arg, func->type->details.function->args, const var_t, entry ) - { - const type_t *type = arg->type; - - /* check that [out] parameters have enough pointer levels */ - if (is_attr(arg->attrs, ATTR_OUT)) - { - switch (typegen_detect_type(type, arg->attrs, TDT_ALL_TYPES)) - { - case TGT_BASIC: - case TGT_ENUM: - case TGT_RANGE: - case TGT_STRUCT: - case TGT_UNION: - case TGT_CTXT_HANDLE: - case TGT_USER_TYPE: - error_loc_info(&arg->loc_info, "out parameter \'%s\' of function \'%s\' is not a pointer\n", arg->name, funcname); - break; - case TGT_IFACE_POINTER: - error_loc_info(&arg->loc_info, "out interface pointer \'%s\' of function \'%s\' is not a double pointer\n", arg->name, funcname); - break; - case TGT_STRING: - if (is_array(type)) - { - /* needs conformance or fixed dimension */ - if (type_array_has_conformance(type) && - type_array_get_conformance(type)->type != EXPR_VOID) break; - if (!type_array_has_conformance(type) && type_array_get_dim(type)) break; - } - if (is_attr( arg->attrs, ATTR_IN )) break; - error_loc_info(&arg->loc_info, "out parameter \'%s\' of function \'%s\' cannot be an unsized string\n", arg->name, funcname); - break; - case TGT_INVALID: - /* already error'd before we get here */ - case TGT_CTXT_HANDLE_POINTER: - case TGT_POINTER: - case TGT_ARRAY: - /* OK */ - break; - } - } - - check_field_common(func->type, funcname, arg); - } - - if (type_get_type(type_function_get_rettype(func->type)) != TYPE_VOID) - { - var_t var; - var = *func; - var.type = type_function_get_rettype(func->type); - var.name = xstrdup("return value"); - check_field_common(func->type, funcname, &var); - free(var.name); - } -} - -static void add_explicit_handle_if_necessary(const type_t *iface, var_t *func) -{ - unsigned char explicit_fc, implicit_fc; - - /* check for a defined binding handle */ - if (!get_func_handle_var( iface, func, &explicit_fc, &implicit_fc ) || !explicit_fc) - { - /* no explicit handle specified so add - * "[in] handle_t IDL_handle" as the first parameter to the - * function */ - var_t *idl_handle = make_var(xstrdup("IDL_handle")); - idl_handle->attrs = append_attr(NULL, make_attr(ATTR_IN)); - idl_handle->type = find_type_or_error("handle_t", 0); - type_function_add_head_arg(func->type, idl_handle); - } -} - -static void check_functions(const type_t *iface, int is_inside_library) -{ - const statement_t *stmt; - if (is_attr(iface->attrs, ATTR_EXPLICIT_HANDLE)) - { - STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) ) - { - var_t *func = stmt->u.var; - add_explicit_handle_if_necessary(iface, func); - } - } - if (!is_inside_library && !is_attr(iface->attrs, ATTR_LOCAL)) - { - STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) ) - { - const var_t *func = stmt->u.var; - if (!is_attr(func->attrs, ATTR_LOCAL)) - check_remoting_args(func); - } - } -} - -static void check_statements(const statement_list_t *stmts, int is_inside_library) -{ - const statement_t *stmt; - - if (stmts) LIST_FOR_EACH_ENTRY(stmt, stmts, const statement_t, entry) - { - if (stmt->type == STMT_LIBRARY) - check_statements(stmt->u.lib->stmts, TRUE); - else if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE) - check_functions(stmt->u.type, is_inside_library); - } -} - -static void check_all_user_types(const statement_list_t *stmts) -{ - const statement_t *stmt; - - if (stmts) LIST_FOR_EACH_ENTRY(stmt, stmts, const statement_t, entry) - { - if (stmt->type == STMT_LIBRARY) - check_all_user_types(stmt->u.lib->stmts); - else if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE && - !is_local(stmt->u.type->attrs)) - { - const statement_t *stmt_func; - STATEMENTS_FOR_EACH_FUNC(stmt_func, type_iface_get_stmts(stmt->u.type)) { - const var_t *func = stmt_func->u.var; - check_for_additional_prototype_types(func->type->details.function->args); - } - } - } -} - -int is_valid_uuid(const char *s) -{ - int i; - - for (i = 0; i < 36; ++i) - if (i == 8 || i == 13 || i == 18 || i == 23) - { - if (s[i] != '-') - return FALSE; - } - else - if (!isxdigit(s[i])) - return FALSE; - - return s[i] == '\0'; -} - -static statement_t *make_statement(enum statement_type type) -{ - statement_t *stmt = xmalloc(sizeof(*stmt)); - stmt->type = type; - return stmt; -} - -static statement_t *make_statement_type_decl(type_t *type) -{ - statement_t *stmt = make_statement(STMT_TYPE); - stmt->u.type = type; - return stmt; -} - -static statement_t *make_statement_reference(type_t *type) -{ - statement_t *stmt = make_statement(STMT_TYPEREF); - stmt->u.type = type; - return stmt; -} - -static statement_t *make_statement_declaration(var_t *var) -{ - statement_t *stmt = make_statement(STMT_DECLARATION); - stmt->u.var = var; - if (var->stgclass == STG_EXTERN && var->eval) - warning("'%s' initialised and declared extern\n", var->name); - if (is_const_decl(var)) - { - if (var->eval) - reg_const(var); - } - else if (type_get_type(var->type) == TYPE_FUNCTION) - check_function_attrs(var->name, var->attrs); - else if (var->stgclass == STG_NONE || var->stgclass == STG_REGISTER) - error_loc("instantiation of data is illegal\n"); - return stmt; -} - -static statement_t *make_statement_library(typelib_t *typelib) -{ - statement_t *stmt = make_statement(STMT_LIBRARY); - stmt->u.lib = typelib; - return stmt; -} - -static statement_t *make_statement_cppquote(const char *str) -{ - statement_t *stmt = make_statement(STMT_CPPQUOTE); - stmt->u.str = str; - return stmt; -} - -static statement_t *make_statement_importlib(const char *str) -{ - statement_t *stmt = make_statement(STMT_IMPORTLIB); - stmt->u.str = str; - return stmt; -} - -static statement_t *make_statement_import(const char *str) -{ - statement_t *stmt = make_statement(STMT_IMPORT); - stmt->u.str = str; - return stmt; -} - -static statement_t *make_statement_module(type_t *type) -{ - statement_t *stmt = make_statement(STMT_MODULE); - stmt->u.type = type; - return stmt; -} - -static statement_t *make_statement_typedef(declarator_list_t *decls) -{ - declarator_t *decl, *next; - statement_t *stmt; - type_list_t **type_list; - - if (!decls) return NULL; - - stmt = make_statement(STMT_TYPEDEF); - stmt->u.type_list = NULL; - type_list = &stmt->u.type_list; - - LIST_FOR_EACH_ENTRY_SAFE( decl, next, decls, declarator_t, entry ) - { - var_t *var = decl->var; - type_t *type = find_type_or_error(var->name, 0); - *type_list = xmalloc(sizeof(type_list_t)); - (*type_list)->type = type; - (*type_list)->next = NULL; - - type_list = &(*type_list)->next; - free(decl); - free(var); - } - - return stmt; -} - -static statement_list_t *append_statement(statement_list_t *list, statement_t *stmt) -{ - if (!stmt) return list; - if (!list) - { - list = xmalloc( sizeof(*list) ); - list_init( list ); - } - list_add_tail( list, &stmt->entry ); - return list; -} - -void init_loc_info(loc_info_t *i) -{ - i->input_name = input_name ? input_name : "stdin"; - i->line_number = line_number; - i->near_text = parser_text; -} - -static void check_def(const type_t *t) -{ - if (t->defined) - error_loc("%s: redefinition error; original definition was at %s:%d\n", - t->name, t->loc_info.input_name, t->loc_info.line_number); -} diff --git a/reactos/tools/widl/parser.yy.c b/reactos/tools/widl/parser.yy.c deleted file mode 100644 index 1b7041fafe9..00000000000 --- a/reactos/tools/widl/parser.yy.c +++ /dev/null @@ -1,2600 +0,0 @@ -#line 2 "parser.yy.c" - -#line 4 "parser.yy.c" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define yy_create_buffer parser__create_buffer -#define yy_delete_buffer parser__delete_buffer -#define yy_flex_debug parser__flex_debug -#define yy_init_buffer parser__init_buffer -#define yy_flush_buffer parser__flush_buffer -#define yy_load_buffer_state parser__load_buffer_state -#define yy_switch_to_buffer parser__switch_to_buffer -#define yyin parser_in -#define yyleng parser_leng -#define yylex parser_lex -#define yylineno parser_lineno -#define yyout parser_out -#define yyrestart parser_restart -#define yytext parser_text -#define yywrap parser_wrap -#define yyalloc parser_alloc -#define yyrealloc parser_realloc -#define yyfree parser_free - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! C99 */ - -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN (yy_start) = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START (((yy_start) - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE parser_restart(parser_in ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else -#define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -extern int parser_leng; - -extern FILE *parser_in, *parser_out; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up parser_text. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = (yy_hold_char); \ - YY_RESTORE_YY_MORE_OFFSET \ - (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up parser_text again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, (yytext_ptr) ) - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via parser_restart()), so that the user can continue scanning by - * just pointing parser_in at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* Stack of input buffers. */ -static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ -static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ - ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] - -/* yy_hold_char holds the character lost when parser_text is formed. */ -static char yy_hold_char; -static int yy_n_chars; /* number of characters read into yy_ch_buf */ -int parser_leng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; -static int yy_init = 0; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* Flag which is used to allow parser_wrap()'s to do buffer switches - * instead of setting up a fresh parser_in. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -void parser_restart (FILE *input_file ); -void parser__switch_to_buffer (YY_BUFFER_STATE new_buffer ); -YY_BUFFER_STATE parser__create_buffer (FILE *file,int size ); -void parser__delete_buffer (YY_BUFFER_STATE b ); -void parser__flush_buffer (YY_BUFFER_STATE b ); -void parser_push_buffer_state (YY_BUFFER_STATE new_buffer ); -void parser_pop_buffer_state (void ); - -static void parser_ensure_buffer_stack (void ); -static void parser__load_buffer_state (void ); -static void parser__init_buffer (YY_BUFFER_STATE b,FILE *file ); - -#define YY_FLUSH_BUFFER parser__flush_buffer(YY_CURRENT_BUFFER ) - -YY_BUFFER_STATE parser__scan_buffer (char *base,yy_size_t size ); -YY_BUFFER_STATE parser__scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE parser__scan_bytes (yyconst char *bytes,int len ); - -void *parser_alloc (yy_size_t ); -void *parser_realloc (void *,yy_size_t ); -void parser_free (void * ); - -#define yy_new_buffer parser__create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - parser_ensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - parser__create_buffer(parser_in,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - parser_ensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - parser__create_buffer(parser_in,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -typedef unsigned char YY_CHAR; - -FILE *parser_in = (FILE *) 0, *parser_out = (FILE *) 0; - -typedef int yy_state_type; - -extern int parser_lineno; - -int parser_lineno = 1; - -extern char *parser_text; -#define yytext_ptr parser_text - -static yy_state_type yy_get_previous_state (void ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); -static int yy_get_next_buffer (void ); -static void yy_fatal_error (yyconst char msg[] ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up parser_text. - */ -#define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - parser_leng = (size_t) (yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ - *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; - -#define YY_NUM_RULES 36 -#define YY_END_OF_BUFFER 37 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[148] = - { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, - 0, 0, 37, 35, 24, 23, 35, 3, 35, 7, - 35, 35, 19, 19, 35, 35, 35, 22, 22, 22, - 14, 35, 24, 1, 13, 36, 4, 13, 6, 19, - 19, 16, 16, 16, 15, 2, 8, 13, 29, 33, - 27, 0, 0, 19, 19, 19, 0, 25, 31, 28, - 30, 26, 22, 5, 22, 32, 0, 1, 1, 12, - 10, 9, 19, 0, 16, 16, 2, 11, 34, 20, - 19, 19, 18, 22, 19, 0, 16, 0, 18, 18, - 22, 19, 0, 16, 0, 20, 18, 18, 22, 19, - - 0, 16, 22, 19, 0, 16, 22, 19, 0, 16, - 22, 19, 0, 16, 22, 0, 19, 0, 21, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 17, 0 - } ; - -static yyconst flex_int32_t yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 5, 6, 1, 1, 7, 8, 9, - 1, 1, 10, 1, 11, 12, 1, 13, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 1, 1, 15, - 16, 17, 1, 1, 18, 19, 19, 19, 20, 21, - 22, 22, 22, 22, 22, 23, 22, 22, 22, 22, - 22, 24, 25, 22, 26, 22, 22, 27, 28, 22, - 29, 30, 31, 1, 22, 1, 19, 19, 19, 19, - - 32, 19, 22, 22, 22, 22, 22, 33, 22, 22, - 22, 22, 22, 22, 22, 22, 34, 22, 22, 35, - 22, 22, 1, 36, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst flex_int32_t yy_meta[37] = - { 0, - 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 3, 3, 1, 1, 1, 3, 3, 3, - 3, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 3, 4, 4, 4, 1 - } ; - -static yyconst flex_int16_t yy_base[184] = - { 0, - 0, 35, 35, 39, 40, 43, 61, 45, 262, 261, - 46, 47, 263, 481, 481, 481, 246, 481, 254, 481, - 243, 243, 85, 25, 41, 238, 42, 0, 248, 229, - 481, 210, 60, 243, 481, 481, 481, 34, 481, 108, - 26, 131, 154, 239, 481, 0, 481, 60, 481, 481, - 481, 231, 58, 0, 75, 77, 0, 481, 481, 481, - 481, 481, 0, 481, 220, 481, 61, 238, 236, 481, - 481, 481, 174, 0, 196, 0, 0, 481, 481, 93, - 481, 481, 113, 213, 216, 0, 238, 166, 89, 81, - 214, 258, 0, 280, 89, 169, 481, 481, 207, 300, - - 0, 322, 203, 342, 0, 364, 208, 384, 0, 406, - 197, 428, 213, 212, 115, 0, 211, 128, 481, 0, - 0, 0, 210, 0, 0, 0, 0, 209, 0, 0, - 0, 0, 208, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 481, 481, 462, 466, 468, - 472, 476, 215, 210, 209, 208, 202, 201, 200, 199, - 196, 195, 193, 188, 187, 182, 181, 178, 175, 168, - 167, 166, 159, 158, 157, 145, 135, 130, 129, 113, - 102, 88, 75 - } ; - -static yyconst flex_int16_t yy_def[184] = - { 0, - 147, 1, 148, 148, 148, 148, 1, 7, 149, 149, - 148, 148, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 147, 147, 23, 147, 147, 147, 150, 150, 150, - 147, 147, 147, 147, 147, 147, 147, 151, 147, 147, - 40, 147, 42, 43, 147, 152, 147, 151, 147, 147, - 147, 147, 147, 24, 147, 147, 153, 147, 147, 147, - 147, 147, 150, 147, 150, 147, 147, 147, 147, 147, - 147, 147, 147, 154, 43, 43, 152, 147, 147, 147, - 147, 147, 153, 150, 147, 155, 43, 147, 147, 147, - 150, 147, 156, 43, 147, 147, 147, 147, 150, 147, - - 157, 43, 150, 147, 158, 43, 150, 147, 159, 43, - 150, 147, 147, 43, 150, 160, 112, 147, 147, 161, - 162, 163, 147, 164, 165, 166, 167, 147, 168, 169, - 170, 171, 147, 172, 173, 174, 175, 176, 177, 178, - 179, 180, 181, 182, 183, 147, 0, 147, 147, 147, - 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 147, 147 - } ; - -static yyconst flex_int16_t yy_nxt[518] = - { 0, - 14, 15, 16, 17, 18, 14, 19, 20, 14, 14, - 21, 22, 23, 24, 25, 26, 27, 28, 28, 28, - 28, 28, 29, 28, 30, 28, 28, 28, 31, 14, - 14, 28, 28, 28, 28, 32, 33, 36, 71, 37, - 34, 36, 36, 37, 39, 36, 33, 39, 36, 36, - 34, 147, 147, 47, 47, 58, 59, 61, 62, 147, - 147, 67, 67, 72, 38, 68, 68, 78, 38, 38, - 80, 80, 38, 40, 41, 48, 48, 146, 42, 42, - 42, 42, 43, 44, 43, 43, 43, 43, 43, 72, - 145, 45, 42, 43, 43, 43, 53, 54, 54, 82, - - 81, 96, 96, 98, 144, 80, 80, 55, 81, 82, - 56, 57, 88, 98, 97, 143, 118, 55, 56, 57, - 73, 73, 97, 119, 88, 74, 74, 74, 74, 118, - 55, 142, 141, 56, 57, 89, 119, 140, 90, 74, - 55, 56, 57, 75, 75, 89, 90, 139, 75, 75, - 75, 75, 76, 76, 76, 76, 76, 76, 76, 138, - 137, 136, 75, 76, 76, 76, 76, 76, 135, 133, - 132, 76, 76, 76, 76, 95, 95, 131, 96, 96, - 130, 96, 96, 128, 127, 76, 85, 85, 88, 126, - 125, 86, 86, 86, 86, 123, 55, 122, 121, 56, - - 88, 120, 113, 109, 105, 86, 55, 56, 87, 87, - 101, 93, 86, 87, 87, 87, 87, 83, 134, 129, - 124, 147, 116, 116, 115, 111, 107, 87, 92, 92, - 103, 99, 91, 93, 93, 93, 93, 69, 55, 69, - 84, 56, 79, 64, 69, 66, 65, 93, 55, 56, - 94, 94, 64, 60, 52, 94, 94, 94, 94, 51, - 50, 49, 147, 36, 36, 147, 147, 147, 147, 94, - 100, 100, 147, 147, 147, 101, 101, 101, 101, 147, - 55, 147, 147, 56, 147, 147, 147, 147, 147, 101, - 55, 56, 102, 102, 147, 147, 147, 102, 102, 102, - - 102, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 102, 104, 104, 147, 147, 147, 105, 105, 105, - 105, 147, 55, 147, 147, 56, 147, 147, 147, 147, - 147, 105, 55, 56, 106, 106, 147, 147, 147, 106, - 106, 106, 106, 147, 147, 147, 147, 147, 147, 147, - 147, 147, 147, 106, 108, 108, 147, 147, 147, 109, - 109, 109, 109, 147, 55, 147, 147, 56, 147, 147, - 147, 147, 147, 109, 55, 56, 110, 110, 147, 147, - 147, 110, 110, 110, 110, 147, 147, 147, 147, 147, - 147, 147, 147, 147, 147, 110, 112, 112, 147, 147, - - 147, 113, 113, 113, 113, 147, 55, 147, 147, 56, - 147, 147, 147, 147, 147, 113, 55, 56, 114, 114, - 147, 147, 147, 114, 114, 114, 114, 147, 147, 147, - 147, 147, 147, 147, 147, 147, 147, 114, 116, 147, - 117, 117, 147, 147, 147, 147, 147, 147, 147, 147, - 55, 147, 147, 56, 147, 147, 147, 147, 147, 147, - 55, 56, 35, 35, 35, 35, 46, 46, 46, 46, - 63, 63, 70, 147, 70, 70, 77, 147, 77, 77, - 13, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, - - 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 147, 147, 147, 147, 147, 147 - } ; - -static yyconst flex_int16_t yy_chk[518] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 3, 38, 3, - 2, 4, 5, 4, 5, 6, 8, 6, 11, 12, - 8, 24, 41, 11, 12, 25, 25, 27, 27, 24, - 41, 33, 67, 38, 3, 33, 67, 48, 4, 5, - 53, 53, 6, 7, 7, 11, 12, 183, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 48, - 182, 7, 7, 7, 7, 7, 23, 23, 23, 56, - - 55, 95, 95, 90, 181, 80, 80, 23, 55, 56, - 23, 23, 80, 90, 89, 180, 115, 23, 23, 23, - 40, 40, 89, 115, 80, 40, 40, 40, 40, 118, - 40, 179, 178, 40, 40, 83, 118, 177, 83, 40, - 40, 40, 40, 42, 42, 83, 83, 176, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 175, - 174, 173, 42, 42, 42, 42, 43, 43, 172, 171, - 170, 43, 43, 43, 43, 88, 88, 169, 88, 88, - 168, 96, 96, 167, 166, 43, 73, 73, 96, 165, - 164, 73, 73, 73, 73, 163, 73, 162, 161, 73, - - 96, 160, 159, 158, 157, 73, 73, 73, 75, 75, - 156, 155, 154, 75, 75, 75, 75, 153, 133, 128, - 123, 117, 114, 113, 111, 107, 103, 75, 85, 85, - 99, 91, 84, 85, 85, 85, 85, 69, 85, 68, - 65, 85, 52, 44, 34, 32, 30, 85, 85, 85, - 87, 87, 29, 26, 22, 87, 87, 87, 87, 21, - 19, 17, 13, 10, 9, 0, 0, 0, 0, 87, - 92, 92, 0, 0, 0, 92, 92, 92, 92, 0, - 92, 0, 0, 92, 0, 0, 0, 0, 0, 92, - 92, 92, 94, 94, 0, 0, 0, 94, 94, 94, - - 94, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 94, 100, 100, 0, 0, 0, 100, 100, 100, - 100, 0, 100, 0, 0, 100, 0, 0, 0, 0, - 0, 100, 100, 100, 102, 102, 0, 0, 0, 102, - 102, 102, 102, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 102, 104, 104, 0, 0, 0, 104, - 104, 104, 104, 0, 104, 0, 0, 104, 0, 0, - 0, 0, 0, 104, 104, 104, 106, 106, 0, 0, - 0, 106, 106, 106, 106, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 106, 108, 108, 0, 0, - - 0, 108, 108, 108, 108, 0, 108, 0, 0, 108, - 0, 0, 0, 0, 0, 108, 108, 108, 110, 110, - 0, 0, 0, 110, 110, 110, 110, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 110, 112, 0, - 112, 112, 0, 0, 0, 0, 0, 0, 0, 0, - 112, 0, 0, 112, 0, 0, 0, 0, 0, 0, - 112, 112, 148, 148, 148, 148, 149, 149, 149, 149, - 150, 150, 151, 0, 151, 151, 152, 0, 152, 152, - 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, - - 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 147, 147, 147, 147, 147, 147 - } ; - -static yy_state_type yy_last_accepting_state; -static char *yy_last_accepting_cpos; - -extern int parser__flex_debug; -int parser__flex_debug = 0; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -char *parser_text; -#line 1 "parser.l" -/* -*-C-*- - * IDL Compiler - * - * Copyright 2002 Ove Kaaven - * - * 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 YY_NO_INPUT 1 - - - - - -#line 43 "parser.l" - -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#else -#define YY_NO_UNISTD_H -#endif - -#include "widl.h" -#include "utils.h" -#include "parser.h" -#include "wine/wpp.h" - -#include "parser.tab.h" - -static void addcchar(char c); -static char *get_buffered_cstring(void); - -static char *cbuffer; -static int cbufidx; -static int cbufalloc = 0; - -static int kw_token(const char *kw); -static int attr_token(const char *kw); - -#define MAX_IMPORT_DEPTH 10 -struct { - YY_BUFFER_STATE state; - char *input_name; - int line_number; - char *temp_name; -} import_stack[MAX_IMPORT_DEPTH]; -int import_stack_ptr = 0; - -/* converts an integer in string form to an unsigned long and prints an error - * on overflow */ -static unsigned int xstrtoul(const char *nptr, char **endptr, int base) -{ - unsigned long val; - - errno = 0; - val = strtoul(nptr, endptr, base); - if ((val == ULONG_MAX && errno == ERANGE) || ((unsigned int)val != val)) - error_loc("integer constant %s is too large\n", nptr); - return val; -} - -UUID *parse_uuid(const char *u) -{ - UUID* uuid = xmalloc(sizeof(UUID)); - char b[3]; - /* it would be nice to use UuidFromStringA */ - uuid->Data1 = strtoul(u, NULL, 16); - uuid->Data2 = strtoul(u+9, NULL, 16); - uuid->Data3 = strtoul(u+14, NULL, 16); - b[2] = 0; - memcpy(b, u+19, 2); uuid->Data4[0] = strtoul(b, NULL, 16); - memcpy(b, u+21, 2); uuid->Data4[1] = strtoul(b, NULL, 16); - memcpy(b, u+24, 2); uuid->Data4[2] = strtoul(b, NULL, 16); - memcpy(b, u+26, 2); uuid->Data4[3] = strtoul(b, NULL, 16); - memcpy(b, u+28, 2); uuid->Data4[4] = strtoul(b, NULL, 16); - memcpy(b, u+30, 2); uuid->Data4[5] = strtoul(b, NULL, 16); - memcpy(b, u+32, 2); uuid->Data4[6] = strtoul(b, NULL, 16); - memcpy(b, u+34, 2); uuid->Data4[7] = strtoul(b, NULL, 16); - return uuid; -} - -/* - ************************************************************************** - * The flexer starts here - ************************************************************************** - */ -#line 754 "parser.yy.c" - -#define INITIAL 0 -#define QUOTE 1 -#define WSTRQUOTE 2 -#define ATTR 3 -#define PP_LINE 4 -#define SQUOTE 5 - -#ifndef YY_NO_UNISTD_H -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -#include -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -static int yy_init_globals (void ); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int parser_lex_destroy (void ); - -int parser_get_debug (void ); - -void parser_set_debug (int debug_flag ); - -YY_EXTRA_TYPE parser_get_extra (void ); - -void parser_set_extra (YY_EXTRA_TYPE user_defined ); - -FILE *parser_get_in (void ); - -void parser_set_in (FILE * in_str ); - -FILE *parser_get_out (void ); - -void parser_set_out (FILE * out_str ); - -int parser_get_leng (void ); - -char *parser_get_text (void ); - -int parser_get_lineno (void ); - -void parser_set_lineno (int line_number ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int parser_wrap (void ); -#else -extern int parser_wrap (void ); -#endif -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (void ); -#else -static int input (void ); -#endif - -#endif - - static int yy_start_stack_ptr = 0; - static int yy_start_stack_depth = 0; - static int *yy_start_stack = NULL; - - static void yy_push_state (int new_state ); - - static void yy_pop_state (void ); - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else -#define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO do { if (fwrite( parser_text, parser_leng, 1, parser_out )) {} } while (0) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( parser_in )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( parser_in ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = fread(buf, 1, max_size, parser_in))==0 && ferror(parser_in)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(parser_in); \ - } \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int parser_lex (void); - -#define YY_DECL int parser_lex (void) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after parser_text and parser_leng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - if ( parser_leng > 0 ) \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ - (parser_text[parser_leng - 1] == '\n'); \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - -#line 127 "parser.l" - -#line 957 "parser.yy.c" - - if ( !(yy_init) ) - { - (yy_init) = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! (yy_start) ) - (yy_start) = 1; /* first start state */ - - if ( ! parser_in ) - parser_in = stdin; - - if ( ! parser_out ) - parser_out = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - parser_ensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - parser__create_buffer(parser_in,YY_BUF_SIZE ); - } - - parser__load_buffer_state( ); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = (yy_c_buf_p); - - /* Support of parser_text. */ - *yy_cp = (yy_hold_char); - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = (yy_start); - yy_current_state += YY_AT_BOL(); -yy_match: - do - { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 148 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_current_state != 147 ); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = (yy_hold_char); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - -case 1: -YY_RULE_SETUP -#line 128 "parser.l" -yy_push_state(PP_LINE); - YY_BREAK -case 2: -YY_RULE_SETUP -#line 129 "parser.l" -{ - int lineno; - char *cptr, *fname; - yy_pop_state(); - lineno = (int)strtol(parser_text, &cptr, 10); - if(!lineno) - error_loc("Malformed '#...' line-directive; invalid linenumber\n"); - fname = strchr(cptr, '"'); - if(!fname) - error_loc("Malformed '#...' line-directive; missing filename\n"); - fname++; - cptr = strchr(fname, '"'); - if(!cptr) - error_loc("Malformed '#...' line-directive; missing terminating \"\n"); - *cptr = '\0'; - line_number = lineno - 1; /* We didn't read the newline */ - input_name = xstrdup(fname); - } - YY_BREAK -case 3: -YY_RULE_SETUP -#line 147 "parser.l" -yy_push_state(QUOTE); cbufidx = 0; - YY_BREAK -case 4: -YY_RULE_SETUP -#line 148 "parser.l" -{ - yy_pop_state(); - parser_lval.str = get_buffered_cstring(); - return aSTRING; - } - YY_BREAK -case 5: -YY_RULE_SETUP -#line 153 "parser.l" -yy_push_state(WSTRQUOTE); cbufidx = 0; - YY_BREAK -case 6: -YY_RULE_SETUP -#line 154 "parser.l" -{ - yy_pop_state(); - parser_lval.str = get_buffered_cstring(); - return aWSTRING; - } - YY_BREAK -case 7: -YY_RULE_SETUP -#line 159 "parser.l" -yy_push_state(SQUOTE); cbufidx = 0; - YY_BREAK -case 8: -YY_RULE_SETUP -#line 160 "parser.l" -{ - yy_pop_state(); - parser_lval.str = get_buffered_cstring(); - return aSQSTRING; - } - YY_BREAK -case 9: -#line 166 "parser.l" -case 10: -YY_RULE_SETUP -#line 166 "parser.l" -addcchar(parser_text[1]); - YY_BREAK -case 11: -YY_RULE_SETUP -#line 167 "parser.l" -addcchar(parser_text[1]); - YY_BREAK -case 12: -YY_RULE_SETUP -#line 168 "parser.l" -addcchar('\\'); addcchar(parser_text[1]); - YY_BREAK -case 13: -YY_RULE_SETUP -#line 169 "parser.l" -addcchar(parser_text[0]); - YY_BREAK -case 14: -YY_RULE_SETUP -#line 170 "parser.l" -yy_push_state(ATTR); return '['; - YY_BREAK -case 15: -YY_RULE_SETUP -#line 171 "parser.l" -yy_pop_state(); return ']'; - YY_BREAK -case 16: -YY_RULE_SETUP -#line 172 "parser.l" -return attr_token(parser_text); - YY_BREAK -case 17: -YY_RULE_SETUP -#line 173 "parser.l" -{ - parser_lval.uuid = parse_uuid(parser_text); - return aUUID; - } - YY_BREAK -case 18: -YY_RULE_SETUP -#line 177 "parser.l" -{ - parser_lval.num = xstrtoul(parser_text, NULL, 0); - return aHEXNUM; - } - YY_BREAK -case 19: -YY_RULE_SETUP -#line 181 "parser.l" -{ - parser_lval.num = xstrtoul(parser_text, NULL, 0); - return aNUM; - } - YY_BREAK -case 20: -YY_RULE_SETUP -#line 185 "parser.l" -{ - parser_lval.dbl = strtod(parser_text, NULL); - return aDOUBLE; - } - YY_BREAK -case 21: -*yy_cp = (yy_hold_char); /* undo effects of setting up parser_text */ -(yy_c_buf_p) = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up parser_text again */ -YY_RULE_SETUP -#line 189 "parser.l" -return tSAFEARRAY; - YY_BREAK -case 22: -YY_RULE_SETUP -#line 190 "parser.l" -return kw_token(parser_text); - YY_BREAK -case 23: -/* rule 23 can match eol */ -YY_RULE_SETUP -#line 191 "parser.l" -line_number++; - YY_BREAK -case 24: -YY_RULE_SETUP -#line 192 "parser.l" - - YY_BREAK -case 25: -YY_RULE_SETUP -#line 193 "parser.l" -return SHL; - YY_BREAK -case 26: -YY_RULE_SETUP -#line 194 "parser.l" -return SHR; - YY_BREAK -case 27: -YY_RULE_SETUP -#line 195 "parser.l" -return MEMBERPTR; - YY_BREAK -case 28: -YY_RULE_SETUP -#line 196 "parser.l" -return EQUALITY; - YY_BREAK -case 29: -YY_RULE_SETUP -#line 197 "parser.l" -return INEQUALITY; - YY_BREAK -case 30: -YY_RULE_SETUP -#line 198 "parser.l" -return GREATEREQUAL; - YY_BREAK -case 31: -YY_RULE_SETUP -#line 199 "parser.l" -return LESSEQUAL; - YY_BREAK -case 32: -YY_RULE_SETUP -#line 200 "parser.l" -return LOGICALOR; - YY_BREAK -case 33: -YY_RULE_SETUP -#line 201 "parser.l" -return LOGICALAND; - YY_BREAK -case 34: -YY_RULE_SETUP -#line 202 "parser.l" -return ELLIPSIS; - YY_BREAK -case 35: -YY_RULE_SETUP -#line 203 "parser.l" -return parser_text[0]; - YY_BREAK -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(QUOTE): -case YY_STATE_EOF(WSTRQUOTE): -case YY_STATE_EOF(ATTR): -case YY_STATE_EOF(PP_LINE): -case YY_STATE_EOF(SQUOTE): -#line 204 "parser.l" -{ - if (import_stack_ptr) - return aEOF; - else yyterminate(); - } - YY_BREAK -case 36: -YY_RULE_SETUP -#line 209 "parser.l" -ECHO; - YY_BREAK -#line 1272 "parser.yy.c" - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = (yy_hold_char); - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed parser_in at a new source and called - * parser_lex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = parser_in; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++(yy_c_buf_p); - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_END_OF_FILE: - { - (yy_did_buffer_switch_on_eof) = 0; - - if ( parser_wrap( ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * parser_text, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = - (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - (yy_c_buf_p) = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ -} /* end of parser_lex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (void) -{ - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = (yytext_ptr); - register int number_to_move, i; - int ret_val; - - if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; - - int yy_c_buf_p_offset = - (int) ((yy_c_buf_p) - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - parser_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), (size_t) num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - if ( (yy_n_chars) == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - parser_restart(parser_in ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) parser_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - (yy_n_chars) += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; - - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (void) -{ - register yy_state_type yy_current_state; - register char *yy_cp; - - yy_current_state = (yy_start); - yy_current_state += YY_AT_BOL(); - - for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 148 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) -{ - register int yy_is_jam; - register char *yy_cp = (yy_c_buf_p); - - register YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 148 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 147); - - return yy_is_jam ? 0 : yy_current_state; -} - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (void) -#else - static int input (void) -#endif - -{ - int c; - - *(yy_c_buf_p) = (yy_hold_char); - - if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - /* This was really a NUL. */ - *(yy_c_buf_p) = '\0'; - - else - { /* need more input */ - int offset = (yy_c_buf_p) - (yytext_ptr); - ++(yy_c_buf_p); - - switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - parser_restart(parser_in ); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( parser_wrap( ) ) - return EOF; - - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(); -#else - return input(); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + offset; - break; - } - } - } - - c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve parser_text */ - (yy_hold_char) = *++(yy_c_buf_p); - - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * - * @note This function does not reset the start condition to @c INITIAL . - */ - void parser_restart (FILE * input_file ) -{ - - if ( ! YY_CURRENT_BUFFER ){ - parser_ensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - parser__create_buffer(parser_in,YY_BUF_SIZE ); - } - - parser__init_buffer(YY_CURRENT_BUFFER,input_file ); - parser__load_buffer_state( ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * - */ - void parser__switch_to_buffer (YY_BUFFER_STATE new_buffer ) -{ - - /* TODO. We should be able to replace this entire function body - * with - * parser_pop_buffer_state(); - * parser_push_buffer_state(new_buffer); - */ - parser_ensure_buffer_stack (); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - parser__load_buffer_state( ); - - /* We don't actually know whether we did this switch during - * EOF (parser_wrap()) processing, but the only time this flag - * is looked at is after parser_wrap() is called, so it's safe - * to go ahead and always set it. - */ - (yy_did_buffer_switch_on_eof) = 1; -} - -static void parser__load_buffer_state (void) -{ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - parser_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - (yy_hold_char) = *(yy_c_buf_p); -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * - * @return the allocated buffer state. - */ - YY_BUFFER_STATE parser__create_buffer (FILE * file, int size ) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) parser_alloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in parser__create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) parser_alloc(b->yy_buf_size + 2 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in parser__create_buffer()" ); - - b->yy_is_our_buffer = 1; - - parser__init_buffer(b,file ); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with parser__create_buffer() - * - */ - void parser__delete_buffer (YY_BUFFER_STATE b ) -{ - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - parser_free((void *) b->yy_ch_buf ); - - parser_free((void *) b ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a parser_restart() or at EOF. - */ - static void parser__init_buffer (YY_BUFFER_STATE b, FILE * file ) - -{ - int oerrno = errno; - - parser__flush_buffer(b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then parser__init_buffer was _probably_ - * called from parser_restart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * - */ - void parser__flush_buffer (YY_BUFFER_STATE b ) -{ - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - parser__load_buffer_state( ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * - */ -void parser_push_buffer_state (YY_BUFFER_STATE new_buffer ) -{ - if (new_buffer == NULL) - return; - - parser_ensure_buffer_stack(); - - /* This block is copied from parser__switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - (yy_buffer_stack_top)++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from parser__switch_to_buffer. */ - parser__load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * - */ -void parser_pop_buffer_state (void) -{ - if (!YY_CURRENT_BUFFER) - return; - - parser__delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - parser__load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void parser_ensure_buffer_stack (void) -{ - int num_to_alloc; - - if (!(yy_buffer_stack)) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; - (yy_buffer_stack) = (struct yy_buffer_state**)parser_alloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in parser_ensure_buffer_stack()" ); - - memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - (yy_buffer_stack_max) = num_to_alloc; - (yy_buffer_stack_top) = 0; - return; - } - - if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**)parser_realloc - ((yy_buffer_stack), - num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in parser_ensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); - (yy_buffer_stack_max) = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE parser__scan_buffer (char * base, yy_size_t size ) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) parser_alloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in parser__scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - parser__switch_to_buffer(b ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to parser_lex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * parser__scan_bytes() instead. - */ -YY_BUFFER_STATE parser__scan_string (yyconst char * yystr ) -{ - - return parser__scan_bytes(yystr,strlen(yystr) ); -} - -/** Setup the input buffer state to scan the given bytes. The next call to parser_lex() will - * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE parser__scan_bytes (yyconst char * yybytes, int _yybytes_len ) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) parser_alloc(n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in parser__scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = parser__scan_buffer(buf,n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in parser__scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - - static void yy_push_state (int new_state ) -{ - if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) ) - { - yy_size_t new_size; - - (yy_start_stack_depth) += YY_START_STACK_INCR; - new_size = (yy_start_stack_depth) * sizeof( int ); - - if ( ! (yy_start_stack) ) - (yy_start_stack) = (int *) parser_alloc(new_size ); - - else - (yy_start_stack) = (int *) parser_realloc((void *) (yy_start_stack),new_size ); - - if ( ! (yy_start_stack) ) - YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); - } - - (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START; - - BEGIN(new_state); -} - - static void yy_pop_state (void) -{ - if ( --(yy_start_stack_ptr) < 0 ) - YY_FATAL_ERROR( "start-condition stack underflow" ); - - BEGIN((yy_start_stack)[(yy_start_stack_ptr)]); -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yy_fatal_error (yyconst char* msg ) -{ - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up parser_text. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - parser_text[parser_leng] = (yy_hold_char); \ - (yy_c_buf_p) = parser_text + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - parser_leng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the current line number. - * - */ -int parser_get_lineno (void) -{ - - return parser_lineno; -} - -/** Get the input stream. - * - */ -FILE *parser_get_in (void) -{ - return parser_in; -} - -/** Get the output stream. - * - */ -FILE *parser_get_out (void) -{ - return parser_out; -} - -/** Get the length of the current token. - * - */ -int parser_get_leng (void) -{ - return parser_leng; -} - -/** Get the current token. - * - */ - -char *parser_get_text (void) -{ - return parser_text; -} - -/** Set the current line number. - * @param line_number - * - */ -void parser_set_lineno (int line_number ) -{ - - parser_lineno = line_number; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param in_str A readable stream. - * - * @see parser__switch_to_buffer - */ -void parser_set_in (FILE * in_str ) -{ - parser_in = in_str ; -} - -void parser_set_out (FILE * out_str ) -{ - parser_out = out_str ; -} - -int parser_get_debug (void) -{ - return parser__flex_debug; -} - -void parser_set_debug (int bdebug ) -{ - parser__flex_debug = bdebug ; -} - -static int yy_init_globals (void) -{ - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from parser_lex_destroy(), so don't allocate here. - */ - - (yy_buffer_stack) = 0; - (yy_buffer_stack_top) = 0; - (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = (char *) 0; - (yy_init) = 0; - (yy_start) = 0; - - (yy_start_stack_ptr) = 0; - (yy_start_stack_depth) = 0; - (yy_start_stack) = NULL; - -/* Defined in main.c */ -#ifdef YY_STDINIT - parser_in = stdin; - parser_out = stdout; -#else - parser_in = (FILE *) 0; - parser_out = (FILE *) 0; -#endif - - /* For future reference: Set errno on error, since we are called by - * parser_lex_init() - */ - return 0; -} - -/* parser_lex_destroy is for both reentrant and non-reentrant scanners. */ -int parser_lex_destroy (void) -{ - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - parser__delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - parser_pop_buffer_state(); - } - - /* Destroy the stack itself. */ - parser_free((yy_buffer_stack) ); - (yy_buffer_stack) = NULL; - - /* Destroy the start condition stack. */ - parser_free((yy_start_stack) ); - (yy_start_stack) = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * parser_lex() is called, initialization will occur. */ - yy_init_globals( ); - - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) -{ - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s ) -{ - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *parser_alloc (yy_size_t size ) -{ - return (void *) malloc( size ); -} - -void *parser_realloc (void * ptr, yy_size_t size ) -{ - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); -} - -void parser_free (void * ptr ) -{ - free( (char *) ptr ); /* see parser_realloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 209 "parser.l" - - - -#ifndef parser_wrap -int parser_wrap(void) -{ - return 1; -} -#endif - -struct keyword { - const char *kw; - int token; -}; - -/* This table MUST be alphabetically sorted on the kw field */ -static const struct keyword keywords[] = { - {"FALSE", tFALSE}, - {"NULL", tNULL}, - {"TRUE", tTRUE}, - {"__cdecl", tCDECL}, - {"__fastcall", tFASTCALL}, - {"__int3264", tINT3264}, - {"__int64", tINT64}, - {"__pascal", tPASCAL}, - {"__stdcall", tSTDCALL}, - {"_cdecl", tCDECL}, - {"_fastcall", tFASTCALL}, - {"_pascal", tPASCAL}, - {"_stdcall", tSTDCALL}, - {"boolean", tBOOLEAN}, - {"byte", tBYTE}, - {"case", tCASE}, - {"cdecl", tCDECL}, - {"char", tCHAR}, - {"coclass", tCOCLASS}, - {"const", tCONST}, - {"cpp_quote", tCPPQUOTE}, - {"default", tDEFAULT}, - {"dispinterface", tDISPINTERFACE}, - {"double", tDOUBLE}, - {"enum", tENUM}, - {"error_status_t", tERRORSTATUST}, - {"extern", tEXTERN}, - {"float", tFLOAT}, - {"handle_t", tHANDLET}, - {"hyper", tHYPER}, - {"import", tIMPORT}, - {"importlib", tIMPORTLIB}, - {"inline", tINLINE}, - {"int", tINT}, - {"interface", tINTERFACE}, - {"library", tLIBRARY}, - {"long", tLONG}, - {"methods", tMETHODS}, - {"module", tMODULE}, - {"pascal", tPASCAL}, - {"properties", tPROPERTIES}, - {"register", tREGISTER}, - {"short", tSHORT}, - {"signed", tSIGNED}, - {"sizeof", tSIZEOF}, - {"small", tSMALL}, - {"static", tSTATIC}, - {"stdcall", tSTDCALL}, - {"struct", tSTRUCT}, - {"switch", tSWITCH}, - {"typedef", tTYPEDEF}, - {"union", tUNION}, - {"unsigned", tUNSIGNED}, - {"void", tVOID}, - {"wchar_t", tWCHAR}, -}; -#define NKEYWORDS (sizeof(keywords)/sizeof(keywords[0])) - -/* keywords only recognized in attribute lists - * This table MUST be alphabetically sorted on the kw field - */ -static const struct keyword attr_keywords[] = -{ - {"aggregatable", tAGGREGATABLE}, - {"allocate", tALLOCATE}, - {"annotation", tANNOTATION}, - {"apartment", tAPARTMENT}, - {"appobject", tAPPOBJECT}, - {"async", tASYNC}, - {"async_uuid", tASYNCUUID}, - {"auto_handle", tAUTOHANDLE}, - {"bindable", tBINDABLE}, - {"both", tBOTH}, - {"broadcast", tBROADCAST}, - {"byte_count", tBYTECOUNT}, - {"call_as", tCALLAS}, - {"callback", tCALLBACK}, - {"code", tCODE}, - {"comm_status", tCOMMSTATUS}, - {"context_handle", tCONTEXTHANDLE}, - {"context_handle_noserialize", tCONTEXTHANDLENOSERIALIZE}, - {"context_handle_serialize", tCONTEXTHANDLENOSERIALIZE}, - {"control", tCONTROL}, - {"decode", tDECODE}, - {"defaultbind", tDEFAULTBIND}, - {"defaultcollelem", tDEFAULTCOLLELEM}, - {"defaultvalue", tDEFAULTVALUE}, - {"defaultvtable", tDEFAULTVTABLE}, - {"disable_consistency_check", tDISABLECONSISTENCYCHECK}, - {"displaybind", tDISPLAYBIND}, - {"dllname", tDLLNAME}, - {"dual", tDUAL}, - {"enable_allocate", tENABLEALLOCATE}, - {"encode", tENCODE}, - {"endpoint", tENDPOINT}, - {"entry", tENTRY}, - {"explicit_handle", tEXPLICITHANDLE}, - {"fault_status", tFAULTSTATUS}, - {"force_allocate", tFORCEALLOCATE}, - {"free", tFREE}, - {"handle", tHANDLE}, - {"helpcontext", tHELPCONTEXT}, - {"helpfile", tHELPFILE}, - {"helpstring", tHELPSTRING}, - {"helpstringcontext", tHELPSTRINGCONTEXT}, - {"helpstringdll", tHELPSTRINGDLL}, - {"hidden", tHIDDEN}, - {"id", tID}, - {"idempotent", tIDEMPOTENT}, - {"ignore", tIGNORE}, - {"iid_is", tIIDIS}, - {"immediatebind", tIMMEDIATEBIND}, - {"implicit_handle", tIMPLICITHANDLE}, - {"in", tIN}, - {"in_line", tIN_LINE}, - {"input_sync", tINPUTSYNC}, - {"lcid", tLCID}, - {"length_is", tLENGTHIS}, - {"licensed", tLICENSED}, - {"local", tLOCAL}, - {"maybe", tMAYBE}, - {"message", tMESSAGE}, - {"neutral", tNEUTRAL}, - {"nocode", tNOCODE}, - {"nonbrowsable", tNONBROWSABLE}, - {"noncreatable", tNONCREATABLE}, - {"nonextensible", tNONEXTENSIBLE}, - {"notify", tNOTIFY}, - {"notify_flag", tNOTIFYFLAG}, - {"object", tOBJECT}, - {"odl", tODL}, - {"oleautomation", tOLEAUTOMATION}, - {"optimize", tOPTIMIZE}, - {"optional", tOPTIONAL}, - {"out", tOUT}, - {"partial_ignore", tPARTIALIGNORE}, - {"pointer_default", tPOINTERDEFAULT}, - {"progid", tPROGID}, - {"propget", tPROPGET}, - {"propput", tPROPPUT}, - {"propputref", tPROPPUTREF}, - {"proxy", tPROXY}, - {"ptr", tPTR}, - {"public", tPUBLIC}, - {"range", tRANGE}, - {"readonly", tREADONLY}, - {"ref", tREF}, - {"represent_as", tREPRESENTAS}, - {"requestedit", tREQUESTEDIT}, - {"restricted", tRESTRICTED}, - {"retval", tRETVAL}, - {"single", tSINGLE}, - {"size_is", tSIZEIS}, - {"source", tSOURCE}, - {"strict_context_handle", tSTRICTCONTEXTHANDLE}, - {"string", tSTRING}, - {"switch_is", tSWITCHIS}, - {"switch_type", tSWITCHTYPE}, - {"threading", tTHREADING}, - {"transmit_as", tTRANSMITAS}, - {"uidefault", tUIDEFAULT}, - {"unique", tUNIQUE}, - {"user_marshal", tUSERMARSHAL}, - {"usesgetlasterror", tUSESGETLASTERROR}, - {"uuid", tUUID}, - {"v1_enum", tV1ENUM}, - {"vararg", tVARARG}, - {"version", tVERSION}, - {"vi_progid", tVIPROGID}, - {"wire_marshal", tWIREMARSHAL}, -}; - -/* attributes TODO: - custom - first_is - last_is - max_is - min_is -*/ - -#define KWP(p) ((const struct keyword *)(p)) - -static int kw_cmp_func(const void *s1, const void *s2) -{ - return strcmp(KWP(s1)->kw, KWP(s2)->kw); -} - -static int kw_token(const char *kw) -{ - struct keyword key, *kwp; - key.kw = kw; - kwp = bsearch(&key, keywords, NKEYWORDS, sizeof(keywords[0]), kw_cmp_func); - if (kwp) { - parser_lval.str = xstrdup(kwp->kw); - return kwp->token; - } - parser_lval.str = xstrdup(kw); - return is_type(kw) ? aKNOWNTYPE : aIDENTIFIER; -} - -static int attr_token(const char *kw) -{ - struct keyword key, *kwp; - key.kw = kw; - kwp = bsearch(&key, attr_keywords, sizeof(attr_keywords)/sizeof(attr_keywords[0]), - sizeof(attr_keywords[0]), kw_cmp_func); - if (kwp) { - parser_lval.str = xstrdup(kwp->kw); - return kwp->token; - } - return kw_token(kw); -} - -static void addcchar(char c) -{ - if(cbufidx >= cbufalloc) - { - cbufalloc += 1024; - cbuffer = xrealloc(cbuffer, cbufalloc * sizeof(cbuffer[0])); - if(cbufalloc > 65536) - parser_warning("Reallocating string buffer larger than 64kB\n"); - } - cbuffer[cbufidx++] = c; -} - -static char *get_buffered_cstring(void) -{ - addcchar(0); - return xstrdup(cbuffer); -} - -void pop_import(void) -{ - int ptr = import_stack_ptr-1; - - fclose(parser_in); - parser__delete_buffer(YY_CURRENT_BUFFER ); - parser__switch_to_buffer(import_stack[ptr].state ); - if (temp_name) { - unlink(temp_name); - free(temp_name); - } - temp_name = import_stack[ptr].temp_name; - input_name = import_stack[ptr].input_name; - line_number = import_stack[ptr].line_number; - import_stack_ptr--; -} - -struct imports { - char *name; - struct imports *next; -} *first_import; - -int do_import(char *fname) -{ - FILE *f; - char *path, *name; - struct imports *import; - int ptr = import_stack_ptr; - int ret, fd; - - import = first_import; - while (import && strcmp(import->name, fname)) - import = import->next; - if (import) return 0; /* already imported */ - - import = xmalloc(sizeof(struct imports)); - import->name = xstrdup(fname); - import->next = first_import; - first_import = import; - - /* don't search for a file name with a path in the include directories, - * for compatibility with MIDL */ - if (strchr( fname, '/' ) || strchr( fname, '\\' )) - path = xstrdup( fname ); - else if (!(path = wpp_find_include( fname, input_name ))) - error_loc("Unable to open include file %s\n", fname); - - import_stack[ptr].temp_name = temp_name; - import_stack[ptr].input_name = input_name; - import_stack[ptr].line_number = line_number; - import_stack_ptr++; - input_name = path; - line_number = 1; - - name = xstrdup( "widl.XXXXXX" ); - if((fd = mkstemps( name, 0 )) == -1) - error("Could not generate a temp name from %s\n", name); - - temp_name = name; - if (!(f = fdopen(fd, "wt"))) - error("Could not open fd %s for writing\n", name); - - ret = wpp_parse( path, f ); - fclose( f ); - if (ret) exit(1); - - if((f = fopen(temp_name, "r")) == NULL) - error_loc("Unable to open %s\n", temp_name); - - import_stack[ptr].state = YY_CURRENT_BUFFER; - parser__switch_to_buffer(parser__create_buffer(f,YY_BUF_SIZE)); - return 1; -} - -void abort_import(void) -{ - int ptr; - - for (ptr=0; ptr -#include -#include -#include -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_SYS_TIME_H -#include -#endif -#ifdef HAVE_PROCESS_H -#include -#endif - -/* We need to provide a type for gcc_uint64_t. */ -#ifdef __GNUC__ -__extension__ typedef unsigned long long gcc_uint64_t; -#else -typedef unsigned long gcc_uint64_t; -#endif - -#ifndef TMP_MAX -#define TMP_MAX 16384 -#endif - -/* - -@deftypefn Replacement int mkstemps (char *@var{template}, int @var{suffix_len}) - -Generate a unique temporary file name from @var{template}. -@var{template} has the form: - -@example - @var{path}/ccXXXXXX@var{suffix} -@end example - -@var{suffix_len} tells us how long @var{suffix} is (it can be zero -length). The last six characters of @var{template} before @var{suffix} -must be @samp{XXXXXX}; they are replaced with a string that makes the -filename unique. Returns a file descriptor open on the file for -reading and writing. - -@end deftypefn - -*/ - -int -mkstemps ( - char *template, - int suffix_len) -{ - static const char letters[] - = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; - static gcc_uint64_t value; -#ifdef HAVE_GETTIMEOFDAY - struct timeval tv; -#endif - char *XXXXXX; - size_t len; - int count; - - len = strlen (template); - - if ((int) len < 6 + suffix_len - || strncmp (&template[len - 6 - suffix_len], "XXXXXX", 6)) - { - return -1; - } - - XXXXXX = &template[len - 6 - suffix_len]; - -#ifdef HAVE_GETTIMEOFDAY - /* Get some more or less random data. */ - gettimeofday (&tv, NULL); - value += ((gcc_uint64_t) tv.tv_usec << 16) ^ tv.tv_sec ^ getpid (); -#else - value += getpid (); -#endif - - for (count = 0; count < TMP_MAX; ++count) - { - gcc_uint64_t v = value; - int fd; - - /* Fill in the random bits. */ - XXXXXX[0] = letters[v % 62]; - v /= 62; - XXXXXX[1] = letters[v % 62]; - v /= 62; - XXXXXX[2] = letters[v % 62]; - v /= 62; - XXXXXX[3] = letters[v % 62]; - v /= 62; - XXXXXX[4] = letters[v % 62]; - v /= 62; - XXXXXX[5] = letters[v % 62]; - -#ifdef VMS - fd = open (template, O_RDWR|O_CREAT|O_EXCL, 0600, "fop=tmd"); -#else - fd = open (template, O_RDWR|O_CREAT|O_EXCL, 0600); -#endif - if (fd >= 0) - /* The file does not exist. */ - return fd; - - /* This is a random value. It is only necessary that the next - TMP_MAX values generated by adding 7777 to VALUE are different - with (module 2^32). */ - value += 7777; - } - - /* We return the null string if we can't find a unique file name. */ - template[0] = '\0'; - return -1; -} diff --git a/reactos/tools/widl/proxy.c b/reactos/tools/widl/proxy.c deleted file mode 100644 index 699e073bc35..00000000000 --- a/reactos/tools/widl/proxy.c +++ /dev/null @@ -1,1051 +0,0 @@ -/* - * IDL Compiler - * - * Copyright 2002 Ove Kaaven - * Copyright 2004 Mike McCormack - * - * 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 -#include -#ifdef HAVE_UNISTD_H -# include -#endif -#include -#include - -#include "widl.h" -#include "utils.h" -#include "parser.h" -#include "header.h" -#include "typegen.h" -#include "expr.h" - -#define END_OF_LIST(list) \ - do { \ - if (list) { \ - while (NEXT_LINK(list)) \ - list = NEXT_LINK(list); \ - } \ - } while(0) - -static FILE* proxy; -static int indent = 0; - -static void print_proxy( const char *format, ... ) __attribute__((format (printf, 1, 2))); -static void print_proxy( const char *format, ... ) -{ - va_list va; - va_start( va, format ); - print( proxy, indent, format, va ); - va_end( va ); -} - -static void write_stubdescproto(void) -{ - print_proxy( "static const MIDL_STUB_DESC Object_StubDesc;\n"); - print_proxy( "\n"); -} - -static void write_stubdesc(int expr_eval_routines) -{ - print_proxy( "static const MIDL_STUB_DESC Object_StubDesc =\n{\n"); - indent++; - print_proxy( "0,\n"); - print_proxy( "NdrOleAllocate,\n"); - print_proxy( "NdrOleFree,\n"); - print_proxy( "{0}, 0, 0, %s, 0,\n", expr_eval_routines ? "ExprEvalRoutines" : "0"); - print_proxy( "__MIDL_TypeFormatString.Format,\n"); - print_proxy( "1, /* -error bounds_check flag */\n"); - print_proxy( "0x%x, /* Ndr library version */\n", get_stub_mode() == MODE_Oif ? 0x50002 : 0x10001); - print_proxy( "0,\n"); - print_proxy( "0x50100a4, /* MIDL Version 5.1.164 */\n"); - print_proxy( "0,\n"); - print_proxy("%s,\n", list_empty(&user_type_list) ? "0" : "UserMarshalRoutines"); - print_proxy( "0, /* notify & notify_flag routine table */\n"); - print_proxy( "1, /* Flags */\n"); - print_proxy( "0, /* Reserved3 */\n"); - print_proxy( "0, /* Reserved4 */\n"); - print_proxy( "0 /* Reserved5 */\n"); - indent--; - print_proxy( "};\n"); - print_proxy( "\n"); -} - -static void init_proxy(const statement_list_t *stmts) -{ - if (proxy) return; - if(!(proxy = fopen(proxy_name, "w"))) - error("Could not open %s for output\n", proxy_name); - print_proxy( "/*** Autogenerated by WIDL %s from %s - Do not edit ***/\n", PACKAGE_VERSION, input_name); - print_proxy( "\n"); - print_proxy( "#define __midl_proxy\n"); - print_proxy( "#include \"objbase.h\"\n"); - print_proxy( "\n"); - print_proxy( "#ifndef DECLSPEC_HIDDEN\n"); - print_proxy( "#define DECLSPEC_HIDDEN\n"); - print_proxy( "#endif\n"); - print_proxy( "\n"); -} - -static void clear_output_vars( const var_list_t *args ) -{ - const var_t *arg; - - if (!args) return; - LIST_FOR_EACH_ENTRY( arg, args, const var_t, entry ) - { - if (is_attr(arg->attrs, ATTR_IN)) continue; - if (!is_attr(arg->attrs, ATTR_OUT)) continue; - if (is_ptr(arg->type)) - { - if (type_get_type(type_pointer_get_ref(arg->type)) == TYPE_BASIC) continue; - if (type_get_type(type_pointer_get_ref(arg->type)) == TYPE_ENUM) continue; - } - print_proxy( "if (%s) MIDL_memset( %s, 0, sizeof( *%s ));\n", arg->name, arg->name, arg->name ); - } -} - -static int need_delegation(const type_t *iface) -{ - const type_t *parent = type_iface_get_inherit( iface ); - return parent && type_iface_get_inherit(parent) && (parent->ignore || is_local( parent->attrs )); -} - -static int get_delegation_indirect(const type_t *iface, const type_t ** delegate_to) -{ - const type_t * cur_iface; - for (cur_iface = iface; cur_iface != NULL; cur_iface = type_iface_get_inherit(cur_iface)) - if (need_delegation(cur_iface)) - { - if(delegate_to) - *delegate_to = type_iface_get_inherit(cur_iface); - return 1; - } - return 0; -} - -static int need_delegation_indirect(const type_t *iface) -{ - return get_delegation_indirect(iface, NULL); -} - -static void free_variable( const var_t *arg, const char *local_var_prefix ) -{ - unsigned int type_offset = arg->type->typestring_offset; - type_t *type = arg->type; - - write_parameter_conf_or_var_exprs(proxy, indent, local_var_prefix, PHASE_FREE, arg, FALSE); - - switch (typegen_detect_type(type, arg->attrs, TDT_IGNORE_STRINGS)) - { - case TGT_ENUM: - case TGT_BASIC: - break; - - case TGT_STRUCT: - if (get_struct_fc(type) != RPC_FC_STRUCT) - print_proxy("/* FIXME: %s code for %s struct type 0x%x missing */\n", __FUNCTION__, arg->name, get_struct_fc(type) ); - break; - - case TGT_IFACE_POINTER: - case TGT_POINTER: - case TGT_ARRAY: - print_proxy( "NdrClearOutParameters( &__frame->_StubMsg, "); - fprintf(proxy, "&__MIDL_TypeFormatString.Format[%u], ", type_offset ); - fprintf(proxy, "(void *)%s );\n", arg->name ); - break; - - default: - print_proxy("/* FIXME: %s code for %s type %d missing */\n", __FUNCTION__, arg->name, type_get_type(type) ); - } -} - -static void proxy_free_variables( var_list_t *args, const char *local_var_prefix ) -{ - const var_t *arg; - - if (!args) return; - LIST_FOR_EACH_ENTRY( arg, args, const var_t, entry ) - if (is_attr(arg->attrs, ATTR_OUT)) - { - free_variable( arg, local_var_prefix ); - fprintf(proxy, "\n"); - } -} - -static void gen_proxy(type_t *iface, const var_t *func, int idx, - unsigned int proc_offset) -{ - type_t *rettype = type_function_get_rettype(func->type); - int has_ret = !is_void(rettype); - int has_full_pointer = is_full_pointer_function(func); - const char *callconv = get_attrp(func->type->attrs, ATTR_CALLCONV); - const var_list_t *args = type_get_function_args(func->type); - if (!callconv) callconv = "STDMETHODCALLTYPE"; - - indent = 0; - if (is_interpreted_func( iface, func )) - { - if (get_stub_mode() == MODE_Oif && !is_callas( func->attrs )) return; - write_type_decl_left(proxy, type_function_get_rettype(func->type)); - print_proxy( " %s %s_%s_Proxy(\n", callconv, iface->name, get_name(func)); - write_args(proxy, args, iface->name, 1, TRUE); - print_proxy( ")\n"); - write_client_call_routine( proxy, iface, func, "Object", proc_offset ); - return; - } - print_proxy( "static void __finally_%s_%s_Proxy( struct __proxy_frame *__frame )\n", - iface->name, get_name(func) ); - print_proxy( "{\n"); - indent++; - if (has_full_pointer) write_full_pointer_free(proxy, indent, func); - print_proxy( "NdrProxyFreeBuffer( __frame->This, &__frame->_StubMsg );\n" ); - indent--; - print_proxy( "}\n"); - print_proxy( "\n"); - - write_type_decl_left(proxy, rettype); - print_proxy( " %s %s_%s_Proxy(\n", callconv, iface->name, get_name(func)); - write_args(proxy, args, iface->name, 1, TRUE); - print_proxy( ")\n"); - print_proxy( "{\n"); - indent ++; - print_proxy( "struct __proxy_frame __f, * const __frame = &__f;\n" ); - /* local variables */ - if (has_ret) { - print_proxy( "%s", "" ); - write_type_decl_left(proxy, rettype); - print_proxy( " _RetVal;\n"); - } - print_proxy( "RPC_MESSAGE _RpcMessage;\n" ); - if (has_ret) { - if (decl_indirect(rettype)) - print_proxy("void *_p_%s = &%s;\n", - "_RetVal", "_RetVal"); - } - print_proxy( "\n"); - - print_proxy( "RpcExceptionInit( __proxy_filter, __finally_%s_%s_Proxy );\n", iface->name, get_name(func) ); - print_proxy( "__frame->This = This;\n" ); - - if (has_full_pointer) - write_full_pointer_init(proxy, indent, func, FALSE); - - /* FIXME: trace */ - clear_output_vars( type_get_function_args(func->type) ); - - print_proxy( "RpcTryExcept\n" ); - print_proxy( "{\n" ); - indent++; - print_proxy( "NdrProxyInitialize(This, &_RpcMessage, &__frame->_StubMsg, &Object_StubDesc, %d);\n", idx); - write_pointer_checks( proxy, indent, func ); - - print_proxy( "RpcTryFinally\n" ); - print_proxy( "{\n" ); - indent++; - - write_remoting_arguments(proxy, indent, func, "", PASS_IN, PHASE_BUFFERSIZE); - - print_proxy( "NdrProxyGetBuffer(This, &__frame->_StubMsg);\n" ); - - write_remoting_arguments(proxy, indent, func, "", PASS_IN, PHASE_MARSHAL); - - print_proxy( "NdrProxySendReceive(This, &__frame->_StubMsg);\n" ); - fprintf(proxy, "\n"); - print_proxy( "__frame->_StubMsg.BufferStart = _RpcMessage.Buffer;\n" ); - print_proxy( "__frame->_StubMsg.BufferEnd = __frame->_StubMsg.BufferStart + _RpcMessage.BufferLength;\n\n" ); - - print_proxy("if ((_RpcMessage.DataRepresentation & 0xffff) != NDR_LOCAL_DATA_REPRESENTATION)\n"); - indent++; - print_proxy("NdrConvert( &__frame->_StubMsg, &__MIDL_ProcFormatString.Format[%u]);\n", proc_offset ); - indent--; - fprintf(proxy, "\n"); - - write_remoting_arguments(proxy, indent, func, "", PASS_OUT, PHASE_UNMARSHAL); - - if (has_ret) - { - if (decl_indirect(rettype)) - print_proxy("MIDL_memset(&%s, 0, sizeof(%s));\n", "_RetVal", "_RetVal"); - else if (is_ptr(rettype) || is_array(rettype)) - print_proxy("%s = 0;\n", "_RetVal"); - write_remoting_arguments(proxy, indent, func, "", PASS_RETURN, PHASE_UNMARSHAL); - } - - indent--; - print_proxy( "}\n"); - print_proxy( "RpcFinally\n" ); - print_proxy( "{\n" ); - indent++; - print_proxy( "__finally_%s_%s_Proxy( __frame );\n", iface->name, get_name(func) ); - indent--; - print_proxy( "}\n"); - print_proxy( "RpcEndFinally\n" ); - indent--; - print_proxy( "}\n" ); - print_proxy( "RpcExcept(__frame->_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)\n" ); - print_proxy( "{\n" ); - if (has_ret) { - indent++; - proxy_free_variables( type_get_function_args(func->type), "" ); - print_proxy( "_RetVal = NdrProxyErrorHandler(RpcExceptionCode());\n" ); - indent--; - } - print_proxy( "}\n" ); - print_proxy( "RpcEndExcept\n" ); - - if (has_ret) { - print_proxy( "return _RetVal;\n" ); - } - indent--; - print_proxy( "}\n"); - print_proxy( "\n"); -} - -static void gen_stub(type_t *iface, const var_t *func, const char *cas, - unsigned int proc_offset) -{ - const var_t *arg; - int has_ret = !is_void(type_function_get_rettype(func->type)); - int has_full_pointer = is_full_pointer_function(func); - - if (is_interpreted_func( iface, func )) return; - - indent = 0; - print_proxy( "struct __frame_%s_%s_Stub\n{\n", iface->name, get_name(func)); - indent++; - print_proxy( "__DECL_EXCEPTION_FRAME\n" ); - print_proxy( "MIDL_STUB_MESSAGE _StubMsg;\n"); - print_proxy( "%s * _This;\n", iface->name ); - declare_stub_args( proxy, indent, func ); - indent--; - print_proxy( "};\n\n" ); - - print_proxy( "static void __finally_%s_%s_Stub(", iface->name, get_name(func) ); - print_proxy( " struct __frame_%s_%s_Stub *__frame )\n{\n", iface->name, get_name(func) ); - indent++; - write_remoting_arguments(proxy, indent, func, "__frame->", PASS_OUT, PHASE_FREE); - if (has_full_pointer) - write_full_pointer_free(proxy, indent, func); - indent--; - print_proxy( "}\n\n" ); - - print_proxy( "void __RPC_STUB %s_%s_Stub(\n", iface->name, get_name(func)); - indent++; - print_proxy( "IRpcStubBuffer* This,\n"); - print_proxy( "IRpcChannelBuffer *_pRpcChannelBuffer,\n"); - print_proxy( "PRPC_MESSAGE _pRpcMessage,\n"); - print_proxy( "DWORD* _pdwStubPhase)\n"); - indent--; - print_proxy( "{\n"); - indent++; - print_proxy( "struct __frame_%s_%s_Stub __f, * const __frame = &__f;\n\n", - iface->name, get_name(func) ); - - print_proxy("__frame->_This = (%s*)((CStdStubBuffer*)This)->pvServerObject;\n\n", iface->name); - - /* FIXME: trace */ - - print_proxy("NdrStubInitialize(_pRpcMessage, &__frame->_StubMsg, &Object_StubDesc, _pRpcChannelBuffer);\n"); - fprintf(proxy, "\n"); - print_proxy( "RpcExceptionInit( 0, __finally_%s_%s_Stub );\n", iface->name, get_name(func) ); - - write_parameters_init(proxy, indent, func, "__frame->"); - - print_proxy("RpcTryFinally\n"); - print_proxy("{\n"); - indent++; - if (has_full_pointer) - write_full_pointer_init(proxy, indent, func, TRUE); - print_proxy("if ((_pRpcMessage->DataRepresentation & 0xffff) != NDR_LOCAL_DATA_REPRESENTATION)\n"); - indent++; - print_proxy("NdrConvert( &__frame->_StubMsg, &__MIDL_ProcFormatString.Format[%u]);\n", proc_offset ); - indent--; - fprintf(proxy, "\n"); - - write_remoting_arguments(proxy, indent, func, "__frame->", PASS_IN, PHASE_UNMARSHAL); - fprintf(proxy, "\n"); - - assign_stub_out_args( proxy, indent, func, "__frame->" ); - - print_proxy("*_pdwStubPhase = STUB_CALL_SERVER;\n"); - fprintf(proxy, "\n"); - print_proxy( "%s", has_ret ? "__frame->_RetVal = " : "" ); - if (cas) fprintf(proxy, "%s_%s_Stub", iface->name, cas); - else fprintf(proxy, "__frame->_This->lpVtbl->%s", get_name(func)); - fprintf(proxy, "(__frame->_This"); - - if (type_get_function_args(func->type)) - { - LIST_FOR_EACH_ENTRY( arg, type_get_function_args(func->type), const var_t, entry ) - fprintf(proxy, ", %s__frame->%s", is_array(arg->type) && !type_array_is_decl_as_ptr(arg->type) ? "*" :"" , arg->name); - } - fprintf(proxy, ");\n"); - fprintf(proxy, "\n"); - print_proxy("*_pdwStubPhase = STUB_MARSHAL;\n"); - fprintf(proxy, "\n"); - - write_remoting_arguments(proxy, indent, func, "__frame->", PASS_OUT, PHASE_BUFFERSIZE); - - if (!is_void(type_function_get_rettype(func->type))) - write_remoting_arguments(proxy, indent, func, "__frame->", PASS_RETURN, PHASE_BUFFERSIZE); - - print_proxy("NdrStubGetBuffer(This, _pRpcChannelBuffer, &__frame->_StubMsg);\n"); - - write_remoting_arguments(proxy, indent, func, "__frame->", PASS_OUT, PHASE_MARSHAL); - fprintf(proxy, "\n"); - - /* marshall the return value */ - if (!is_void(type_function_get_rettype(func->type))) - write_remoting_arguments(proxy, indent, func, "__frame->", PASS_RETURN, PHASE_MARSHAL); - - indent--; - print_proxy("}\n"); - print_proxy("RpcFinally\n"); - print_proxy("{\n"); - indent++; - print_proxy( "__finally_%s_%s_Stub( __frame );\n", iface->name, get_name(func) ); - indent--; - print_proxy("}\n"); - print_proxy("RpcEndFinally\n"); - - print_proxy("_pRpcMessage->BufferLength = __frame->_StubMsg.Buffer - (unsigned char *)_pRpcMessage->Buffer;\n"); - indent--; - - print_proxy("}\n"); - print_proxy("\n"); -} - -static void gen_stub_thunk( type_t *iface, const var_t *func, unsigned int proc_offset ) -{ - int has_ret = !is_void( type_function_get_rettype( func->type )); - const var_t *arg, *callas = is_callas( func->attrs ); - const var_list_t *args = type_get_function_args( func->type ); - - indent = 0; - print_proxy( "void __RPC_API %s_%s_Thunk( PMIDL_STUB_MESSAGE pStubMsg )\n", - iface->name, get_name(func) ); - print_proxy( "{\n"); - indent++; - write_func_param_struct( proxy, iface, func->type, - "*pParamStruct = (struct _PARAM_STRUCT *)pStubMsg->StackTop", has_ret ); - print_proxy( "%s%s_%s_Stub( pParamStruct->This", - has_ret ? "pParamStruct->_RetVal = " : "", iface->name, callas->name ); - indent++; - if (args) LIST_FOR_EACH_ENTRY( arg, args, const var_t, entry ) - { - fprintf( proxy, ",\n%*spParamStruct->%s", 4 * indent, "", arg->name ); - } - fprintf( proxy, " );\n" ); - indent--; - indent--; - print_proxy( "}\n\n"); -} - -int count_methods(const type_t *iface) -{ - const statement_t *stmt; - int count = 0; - - if (type_iface_get_inherit(iface)) - count = count_methods(type_iface_get_inherit(iface)); - - STATEMENTS_FOR_EACH_FUNC(stmt, type_iface_get_stmts(iface)) { - const var_t *func = stmt->u.var; - if (!is_callas(func->attrs)) count++; - } - return count; -} - -static const statement_t * get_callas_source(const type_t * iface, const var_t * def) -{ - const statement_t * source; - STATEMENTS_FOR_EACH_FUNC( source, type_iface_get_stmts(iface)) { - const var_t * cas = is_callas(source->u.var->attrs ); - if (cas && !strcmp(def->name, cas->name)) - return source; - } - return NULL; -} - -static void write_proxy_procformatstring_offsets( const type_t *iface, int skip ) -{ - const statement_t *stmt; - - if (type_iface_get_inherit(iface)) - write_proxy_procformatstring_offsets( type_iface_get_inherit(iface), need_delegation(iface)); - else - return; - - STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) ) - { - const var_t *func = stmt->u.var; - int missing = 0; - - if (is_callas(func->attrs)) continue; - if (is_local(func->attrs)) - { - const statement_t * callas_source = get_callas_source(iface, func); - if (!callas_source) - missing = 1; - else - func = callas_source->u.var; - } - if (skip || missing) - print_proxy( "(unsigned short)-1, /* %s::%s */\n", iface->name, get_name(func)); - else - print_proxy( "%u, /* %s::%s */\n", func->procstring_offset, iface->name, get_name(func)); - } -} - -static int write_proxy_methods(type_t *iface, int skip) -{ - const statement_t *stmt; - int i = 0; - - if (type_iface_get_inherit(iface)) - i = write_proxy_methods(type_iface_get_inherit(iface), - need_delegation(iface)); - STATEMENTS_FOR_EACH_FUNC(stmt, type_iface_get_stmts(iface)) { - const var_t *func = stmt->u.var; - if (!is_callas(func->attrs)) { - if (skip || (is_local(func->attrs) && !get_callas_source(iface, func))) - print_proxy( "0, /* %s::%s */\n", iface->name, get_name(func)); - else if (is_interpreted_func( iface, func ) && - !is_local( func->attrs ) && - type_iface_get_inherit(iface)) - print_proxy( "(void *)-1, /* %s::%s */\n", iface->name, get_name(func)); - else - print_proxy( "%s_%s_Proxy,\n", iface->name, get_name(func)); - i++; - } - } - return i; -} - -static int write_stub_methods(type_t *iface, int skip) -{ - const statement_t *stmt; - int i = 0; - - if (type_iface_get_inherit(iface)) - i = write_stub_methods(type_iface_get_inherit(iface), need_delegation(iface)); - else - return i; /* skip IUnknown */ - - STATEMENTS_FOR_EACH_FUNC(stmt, type_iface_get_stmts(iface)) { - const var_t *func = stmt->u.var; - if (!is_callas(func->attrs)) { - int missing = 0; - const char * fname = get_name(func); - if(is_local(func->attrs)) { - const statement_t * callas_source = get_callas_source(iface, func); - if(!callas_source) - missing = 1; - else - fname = get_name(callas_source->u.var); - } - if (i) fprintf(proxy,",\n"); - if (skip || missing) print_proxy("STUB_FORWARDING_FUNCTION"); - else if (is_interpreted_func( iface, func )) - print_proxy( "(PRPC_STUB_FUNCTION)%s", get_stub_mode() == MODE_Oif ? "NdrStubCall2" : "NdrStubCall" ); - else print_proxy( "%s_%s_Stub", iface->name, fname); - i++; - } - } - return i; -} - -static void write_thunk_methods( type_t *iface, int skip ) -{ - const statement_t *stmt; - - if (type_iface_get_inherit( iface )) - write_thunk_methods( type_iface_get_inherit(iface), need_delegation(iface) ); - else - return; /* skip IUnknown */ - - STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) ) - { - var_t *func = stmt->u.var; - const statement_t * callas_source = NULL; - - if (is_callas(func->attrs)) continue; - if (is_local(func->attrs)) callas_source = get_callas_source(iface, func); - - if (!skip && callas_source && is_interpreted_func( iface, func )) - print_proxy( "%s_%s_Thunk,\n", iface->name, get_name(callas_source->u.var) ); - else - print_proxy( "0, /* %s::%s */\n", iface->name, get_name(func) ); - } -} - -static void write_proxy(type_t *iface, unsigned int *proc_offset) -{ - int count; - const statement_t *stmt; - int first_func = 1; - int needs_stub_thunks = 0; - int needs_inline_stubs = need_inline_stubs( iface ) || need_delegation( iface ); - - STATEMENTS_FOR_EACH_FUNC(stmt, type_iface_get_stmts(iface)) { - var_t *func = stmt->u.var; - if (first_func) { - fprintf(proxy, "/*****************************************************************************\n"); - fprintf(proxy, " * %s interface\n", iface->name); - fprintf(proxy, " */\n"); - first_func = 0; - } - if (!is_local(func->attrs)) { - const var_t *cas = is_callas(func->attrs); - const char *cname = cas ? cas->name : NULL; - int idx = func->type->details.function->idx; - if (cname) { - const statement_t *stmt2; - STATEMENTS_FOR_EACH_FUNC(stmt2, type_iface_get_stmts(iface)) { - const var_t *m = stmt2->u.var; - if (!strcmp(m->name, cname)) - { - idx = m->type->details.function->idx; - break; - } - } - } - func->procstring_offset = *proc_offset; - gen_proxy(iface, func, idx, *proc_offset); - gen_stub(iface, func, cname, *proc_offset); - if (cas && is_interpreted_func( iface, func )) - { - needs_stub_thunks = 1; - gen_stub_thunk(iface, func, *proc_offset); - } - *proc_offset += get_size_procformatstring_func( iface, func ); - } - } - - count = count_methods(iface); - - print_proxy( "static const unsigned short %s_FormatStringOffsetTable[] =\n", iface->name ); - print_proxy( "{\n" ); - indent++; - write_proxy_procformatstring_offsets( iface, 0 ); - indent--; - print_proxy( "};\n\n" ); - - /* proxy info */ - if (get_stub_mode() == MODE_Oif) - { - print_proxy( "static const MIDL_STUBLESS_PROXY_INFO %s_ProxyInfo =\n", iface->name ); - print_proxy( "{\n" ); - indent++; - print_proxy( "&Object_StubDesc,\n" ); - print_proxy( "__MIDL_ProcFormatString.Format,\n" ); - print_proxy( "&%s_FormatStringOffsetTable[-3],\n", iface->name ); - print_proxy( "0,\n" ); - print_proxy( "0,\n" ); - print_proxy( "0\n" ); - indent--; - print_proxy( "};\n\n" ); - } - - /* proxy vtable */ - print_proxy( "static %sCINTERFACE_PROXY_VTABLE(%d) _%sProxyVtbl =\n", - need_delegation_indirect(iface) ? "" : "const ", count, iface->name); - print_proxy( "{\n"); - indent++; - print_proxy( "{\n"); - indent++; - if (get_stub_mode() == MODE_Oif) print_proxy( "&%s_ProxyInfo,\n", iface->name ); - print_proxy( "&IID_%s,\n", iface->name); - indent--; - print_proxy( "},\n"); - print_proxy( "{\n"); - indent++; - write_proxy_methods(iface, FALSE); - indent--; - print_proxy( "}\n"); - indent--; - print_proxy( "};\n\n"); - - /* stub thunk table */ - if (needs_stub_thunks) - { - print_proxy( "static const STUB_THUNK %s_StubThunkTable[] =\n", iface->name); - print_proxy( "{\n"); - indent++; - write_thunk_methods( iface, 0 ); - indent--; - print_proxy( "};\n\n"); - } - - /* server info */ - print_proxy( "static const MIDL_SERVER_INFO %s_ServerInfo =\n", iface->name ); - print_proxy( "{\n" ); - indent++; - print_proxy( "&Object_StubDesc,\n" ); - print_proxy( "0,\n" ); - print_proxy( "__MIDL_ProcFormatString.Format,\n" ); - print_proxy( "&%s_FormatStringOffsetTable[-3],\n", iface->name ); - if (needs_stub_thunks) - print_proxy( "&%s_StubThunkTable[-3],\n", iface->name ); - else - print_proxy( "0,\n" ); - print_proxy( "0,\n" ); - print_proxy( "0,\n" ); - print_proxy( "0\n" ); - indent--; - print_proxy( "};\n\n" ); - - /* stub vtable */ - if (needs_inline_stubs) - { - print_proxy( "static const PRPC_STUB_FUNCTION %s_table[] =\n", iface->name); - print_proxy( "{\n"); - indent++; - write_stub_methods(iface, FALSE); - fprintf(proxy, "\n"); - indent--; - fprintf(proxy, "};\n\n"); - } - print_proxy( "static %sCInterfaceStubVtbl _%sStubVtbl =\n", - need_delegation_indirect(iface) ? "" : "const ", iface->name); - print_proxy( "{\n"); - indent++; - print_proxy( "{\n"); - indent++; - print_proxy( "&IID_%s,\n", iface->name); - print_proxy( "&%s_ServerInfo,\n", iface->name ); - print_proxy( "%d,\n", count); - if (needs_inline_stubs) print_proxy( "&%s_table[-3]\n", iface->name ); - else print_proxy( "0\n" ); - indent--; - print_proxy( "},\n"); - print_proxy( "{\n"); - indent++; - print_proxy( "CStdStubBuffer_%s\n", need_delegation_indirect(iface) ? "DELEGATING_METHODS" : "METHODS"); - indent--; - print_proxy( "}\n"); - indent--; - print_proxy( "};\n"); - print_proxy( "\n"); -} - -static int does_any_iface(const statement_list_t *stmts, type_pred_t pred) -{ - const statement_t *stmt; - - if (stmts) - LIST_FOR_EACH_ENTRY(stmt, stmts, const statement_t, entry) - { - if (stmt->type == STMT_LIBRARY) - { - if (does_any_iface(stmt->u.lib->stmts, pred)) - return TRUE; - } - else if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE) - { - if (pred(stmt->u.type)) - return TRUE; - } - } - - return FALSE; -} - -int need_proxy(const type_t *iface) -{ - if (!is_object( iface )) return 0; - if (is_local( iface->attrs )) return 0; - if (is_attr( iface->attrs, ATTR_OLEAUTOMATION )) return 0; - if (is_attr( iface->attrs, ATTR_DISPINTERFACE )) return 0; - return 1; -} - -int need_stub(const type_t *iface) -{ - return !is_object(iface) && !is_local(iface->attrs); -} - -int need_proxy_file(const statement_list_t *stmts) -{ - return does_any_iface(stmts, need_proxy); -} - -int need_inline_stubs(const type_t *iface) -{ - const statement_t *stmt; - - if (get_stub_mode() == MODE_Os) return 1; - - STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) ) - { - const var_t *func = stmt->u.var; - if (is_local( func->attrs )) continue; - if (!is_interpreted_func( iface, func )) return 1; - } - return 0; -} - -static int need_proxy_and_inline_stubs(const type_t *iface) -{ - const statement_t *stmt; - - if (!need_proxy( iface )) return 0; - if (get_stub_mode() == MODE_Os) return 1; - - STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) ) - { - const var_t *func = stmt->u.var; - if (is_local( func->attrs )) continue; - if (!is_interpreted_func( iface, func )) return 1; - } - return 0; -} - -int need_stub_files(const statement_list_t *stmts) -{ - return does_any_iface(stmts, need_stub); -} - -int need_inline_stubs_file(const statement_list_t *stmts) -{ - return does_any_iface(stmts, need_inline_stubs); -} - -static void write_proxy_stmts(const statement_list_t *stmts, unsigned int *proc_offset) -{ - const statement_t *stmt; - if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) - { - if (stmt->type == STMT_LIBRARY) - write_proxy_stmts(stmt->u.lib->stmts, proc_offset); - else if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE) - { - if (need_proxy(stmt->u.type)) - write_proxy(stmt->u.type, proc_offset); - } - } -} - -static int cmp_iid( const void *ptr1, const void *ptr2 ) -{ - const type_t * const *iface1 = ptr1; - const type_t * const *iface2 = ptr2; - const UUID *uuid1 = get_attrp( (*iface1)->attrs, ATTR_UUID ); - const UUID *uuid2 = get_attrp( (*iface2)->attrs, ATTR_UUID ); - return memcmp( uuid1, uuid2, sizeof(UUID) ); -} - -static void build_iface_list( const statement_list_t *stmts, type_t **ifaces[], int *count ) -{ - const statement_t *stmt; - - if (!stmts) return; - LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) - { - if (stmt->type == STMT_LIBRARY) - build_iface_list(stmt->u.lib->stmts, ifaces, count); - else if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE) - { - type_t *iface = stmt->u.type; - if (type_iface_get_inherit(iface) && need_proxy(iface)) - { - *ifaces = xrealloc( *ifaces, (*count + 1) * sizeof(**ifaces) ); - (*ifaces)[(*count)++] = iface; - } - } - } -} - -static type_t **sort_interfaces( const statement_list_t *stmts, int *count ) -{ - type_t **ifaces = NULL; - - *count = 0; - build_iface_list( stmts, &ifaces, count ); - qsort( ifaces, *count, sizeof(*ifaces), cmp_iid ); - return ifaces; -} - -static void write_proxy_routines(const statement_list_t *stmts) -{ - int expr_eval_routines; - unsigned int proc_offset = 0; - char *file_id = proxy_token; - int i, count, have_baseiid = 0; - type_t **interfaces; - const type_t * delegate_to; - - print_proxy( "#ifndef __REDQ_RPCPROXY_H_VERSION__\n"); - print_proxy( "#define __REQUIRED_RPCPROXY_H_VERSION__ %u\n", get_stub_mode() == MODE_Oif ? 475 : 440); - print_proxy( "#endif\n"); - print_proxy( "\n"); - if (get_stub_mode() == MODE_Oif) print_proxy( "#define USE_STUBLESS_PROXY\n"); - print_proxy( "#include \"rpcproxy.h\"\n"); - print_proxy( "#ifndef __RPCPROXY_H_VERSION__\n"); - print_proxy( "#error This code needs a newer version of rpcproxy.h\n"); - print_proxy( "#endif /* __RPCPROXY_H_VERSION__ */\n"); - print_proxy( "\n"); - print_proxy( "#include \"%s\"\n", header_name); - print_proxy( "\n"); - - if (does_any_iface(stmts, need_proxy_and_inline_stubs)) - { - write_exceptions( proxy ); - print_proxy( "\n"); - print_proxy( "struct __proxy_frame\n"); - print_proxy( "{\n"); - print_proxy( " __DECL_EXCEPTION_FRAME\n"); - print_proxy( " MIDL_STUB_MESSAGE _StubMsg;\n"); - print_proxy( " void *This;\n"); - print_proxy( "};\n"); - print_proxy( "\n"); - print_proxy("static int __proxy_filter( struct __proxy_frame *__frame )\n"); - print_proxy( "{\n"); - print_proxy( " return (__frame->_StubMsg.dwStubPhase != PROXY_SENDRECEIVE);\n"); - print_proxy( "}\n"); - print_proxy( "\n"); - } - - write_formatstringsdecl(proxy, indent, stmts, need_proxy); - write_stubdescproto(); - write_proxy_stmts(stmts, &proc_offset); - - expr_eval_routines = write_expr_eval_routines(proxy, proxy_token); - if (expr_eval_routines) - write_expr_eval_routine_list(proxy, proxy_token); - write_user_quad_list(proxy); - write_stubdesc(expr_eval_routines); - - print_proxy( "#if !defined(__RPC_WIN%u__)\n", pointer_size == 8 ? 64 : 32); - print_proxy( "#error Currently only Wine and WIN32 are supported.\n"); - print_proxy( "#endif\n"); - print_proxy( "\n"); - write_procformatstring(proxy, stmts, need_proxy); - write_typeformatstring(proxy, stmts, need_proxy); - - interfaces = sort_interfaces(stmts, &count); - fprintf(proxy, "static const CInterfaceProxyVtbl* const _%s_ProxyVtblList[] =\n", file_id); - fprintf(proxy, "{\n"); - for (i = 0; i < count; i++) - fprintf(proxy, " (const CInterfaceProxyVtbl*)&_%sProxyVtbl,\n", interfaces[i]->name); - fprintf(proxy, " 0\n"); - fprintf(proxy, "};\n"); - fprintf(proxy, "\n"); - - fprintf(proxy, "static const CInterfaceStubVtbl* const _%s_StubVtblList[] =\n", file_id); - fprintf(proxy, "{\n"); - for (i = 0; i < count; i++) - fprintf(proxy, " &_%sStubVtbl,\n", interfaces[i]->name); - fprintf(proxy, " 0\n"); - fprintf(proxy, "};\n"); - fprintf(proxy, "\n"); - - fprintf(proxy, "static PCInterfaceName const _%s_InterfaceNamesList[] =\n", file_id); - fprintf(proxy, "{\n"); - for (i = 0; i < count; i++) - fprintf(proxy, " \"%s\",\n", interfaces[i]->name); - fprintf(proxy, " 0\n"); - fprintf(proxy, "};\n"); - fprintf(proxy, "\n"); - - for (i = 0; i < count; i++) - if ((have_baseiid = get_delegation_indirect( interfaces[i], NULL ))) break; - - if (have_baseiid) - { - fprintf(proxy, "static const IID * _%s_BaseIIDList[] =\n", file_id); - fprintf(proxy, "{\n"); - for (i = 0; i < count; i++) - { - if (get_delegation_indirect(interfaces[i], &delegate_to)) - fprintf( proxy, " &IID_%s, /* %s */\n", delegate_to->name, interfaces[i]->name ); - else - fprintf( proxy, " 0,\n" ); - } - fprintf(proxy, " 0\n"); - fprintf(proxy, "};\n"); - fprintf(proxy, "\n"); - } - - fprintf(proxy, "static int __stdcall _%s_IID_Lookup(const IID* pIID, int* pIndex)\n", file_id); - fprintf(proxy, "{\n"); - fprintf(proxy, " int low = 0, high = %d;\n", count - 1); - fprintf(proxy, "\n"); - fprintf(proxy, " while (low <= high)\n"); - fprintf(proxy, " {\n"); - fprintf(proxy, " int pos = (low + high) / 2;\n"); - fprintf(proxy, " int res = IID_GENERIC_CHECK_IID(_%s, pIID, pos);\n", file_id); - fprintf(proxy, " if (!res) { *pIndex = pos; return 1; }\n"); - fprintf(proxy, " if (res > 0) low = pos + 1;\n"); - fprintf(proxy, " else high = pos - 1;\n"); - fprintf(proxy, " }\n"); - fprintf(proxy, " return 0;\n"); - fprintf(proxy, "}\n"); - fprintf(proxy, "\n"); - - fprintf(proxy, "const ExtendedProxyFileInfo %s_ProxyFileInfo DECLSPEC_HIDDEN =\n", file_id); - fprintf(proxy, "{\n"); - fprintf(proxy, " (const PCInterfaceProxyVtblList*)_%s_ProxyVtblList,\n", file_id); - fprintf(proxy, " (const PCInterfaceStubVtblList*)_%s_StubVtblList,\n", file_id); - fprintf(proxy, " _%s_InterfaceNamesList,\n", file_id); - if (have_baseiid) fprintf(proxy, " _%s_BaseIIDList,\n", file_id); - else fprintf(proxy, " 0,\n"); - fprintf(proxy, " _%s_IID_Lookup,\n", file_id); - fprintf(proxy, " %d,\n", count); - fprintf(proxy, " %d,\n", get_stub_mode() == MODE_Oif ? 2 : 1); - fprintf(proxy, " 0,\n"); - fprintf(proxy, " 0,\n"); - fprintf(proxy, " 0,\n"); - fprintf(proxy, " 0\n"); - fprintf(proxy, "};\n"); -} - -void write_proxies(const statement_list_t *stmts) -{ - if (!do_proxies) return; - if (do_everything && !need_proxy_file(stmts)) return; - - init_proxy(stmts); - if(!proxy) return; - - if (do_win32 && do_win64) - { - fprintf(proxy, "\n#ifndef _WIN64\n\n"); - pointer_size = 4; - write_proxy_routines( stmts ); - fprintf(proxy, "\n#else /* _WIN64 */\n\n"); - pointer_size = 8; - write_proxy_routines( stmts ); - fprintf(proxy, "\n#endif /* _WIN64 */\n"); - } - else if (do_win32) - { - pointer_size = 4; - write_proxy_routines( stmts ); - } - else if (do_win64) - { - pointer_size = 8; - write_proxy_routines( stmts ); - } - - fclose(proxy); -} diff --git a/reactos/tools/widl/register.c b/reactos/tools/widl/register.c deleted file mode 100644 index c75a6acd88e..00000000000 --- a/reactos/tools/widl/register.c +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Generation of dll registration scripts - * - * Copyright 2010 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 - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include -#ifdef HAVE_UNISTD_H -# include -#endif -#include -#include - -#include "widl.h" -#include "utils.h" -#include "parser.h" -#include "header.h" -#include "typegen.h" - -static int indent; - -static const char *format_uuid( const UUID *uuid ) -{ - static char buffer[40]; - sprintf( buffer, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", - uuid->Data1, uuid->Data2, uuid->Data3, - uuid->Data4[0], uuid->Data4[1], uuid->Data4[2], uuid->Data4[3], - uuid->Data4[4], uuid->Data4[5], uuid->Data4[6], uuid->Data4[7] ); - return buffer; -} - -static const char *get_coclass_threading( const type_t *class ) -{ - static const char * const models[] = - { - NULL, - "Apartment", /* THREADING_APARTMENT */ - "Neutral", /* THREADING_NEUTRAL */ - "Single", /* THREADING_SINGLE */ - "Free", /* THREADING_FREE */ - "Both", /* THREADING_BOTH */ - }; - return models[get_attrv( class->attrs, ATTR_THREADING )]; -} - -static const type_t *find_ps_factory( const statement_list_t *stmts ) -{ - const statement_t *stmt; - - if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) - { - if (stmt->type == STMT_TYPE) - { - const type_t *type = stmt->u.type; - if (type_get_type(type) == TYPE_COCLASS && !strcmp( type->name, "PSFactoryBuffer" )) - return type; - } - } - return NULL; -} - -static void write_interface( const type_t *iface, const type_t *ps_factory ) -{ - const UUID *uuid = get_attrp( iface->attrs, ATTR_UUID ); - const UUID *ps_uuid = get_attrp( ps_factory->attrs, ATTR_UUID ); - - if (!uuid) return; - if (!is_object( iface )) return; - if (!type_iface_get_inherit(iface)) /* special case for IUnknown */ - { - put_str( indent, "'%s' = s '%s'\n", format_uuid( uuid ), iface->name ); - return; - } - if (is_local( iface->attrs )) return; - put_str( indent, "'%s' = s '%s'\n", format_uuid( uuid ), iface->name ); - put_str( indent, "{\n" ); - indent++; - put_str( indent, "NumMethods = s %u\n", count_methods( iface )); - put_str( indent, "ProxyStubClsid32 = s '%s'\n", format_uuid( ps_uuid )); - indent--; - put_str( indent, "}\n" ); -} - -static void write_interfaces( const statement_list_t *stmts, const type_t *ps_factory ) -{ - const statement_t *stmt; - - if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) - { - if (stmt->type == STMT_TYPE && type_get_type( stmt->u.type ) == TYPE_INTERFACE) - write_interface( stmt->u.type, ps_factory ); - } -} - -static void write_typelib_interface( const type_t *iface, const typelib_t *typelib ) -{ - const UUID *typelib_uuid = get_attrp( typelib->attrs, ATTR_UUID ); - const UUID *uuid = get_attrp( iface->attrs, ATTR_UUID ); - unsigned int version = get_attrv( typelib->attrs, ATTR_VERSION ); - - if (!uuid) return; - if (!is_object( iface )) return; - if (!is_attr( iface->attrs, ATTR_OLEAUTOMATION ) && !is_attr( iface->attrs, ATTR_DISPINTERFACE )) - return; - put_str( indent, "'%s' = s '%s'\n", format_uuid( uuid ), iface->name ); - put_str( indent, "{\n" ); - indent++; - put_str( indent, "ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}'\n" ); - put_str( indent, "ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}'\n" ); - if (version) - put_str( indent, "TypeLib = s '%s' { val Version = s '%u.%u' }\n", - format_uuid( typelib_uuid ), MAJORVERSION(version), MINORVERSION(version) ); - else - put_str( indent, "TypeLib = s '%s'", format_uuid( typelib_uuid )); - indent--; - put_str( indent, "}\n" ); -} - -static void write_typelib_interfaces( const typelib_t *typelib ) -{ - const statement_t *stmt; - - if (typelib->stmts) LIST_FOR_EACH_ENTRY( stmt, typelib->stmts, const statement_t, entry ) - { - if (stmt->type == STMT_TYPE && type_get_type( stmt->u.type ) == TYPE_INTERFACE) - write_typelib_interface( stmt->u.type, typelib ); - } -} - -static int write_coclass( const type_t *class, const typelib_t *typelib ) -{ - const UUID *uuid = get_attrp( class->attrs, ATTR_UUID ); - const char *descr = get_attrp( class->attrs, ATTR_HELPSTRING ); - const char *progid = get_attrp( class->attrs, ATTR_PROGID ); - const char *vi_progid = get_attrp( class->attrs, ATTR_VIPROGID ); - const char *threading = get_coclass_threading( class ); - unsigned int version = get_attrv( class->attrs, ATTR_VERSION ); - - if (!uuid) return 0; - if (typelib && !threading && !progid) return 0; - if (!descr) descr = class->name; - - put_str( indent, "'%s' = s '%s'\n", format_uuid( uuid ), descr ); - put_str( indent++, "{\n" ); - if (threading) put_str( indent, "InprocServer32 = s '%%MODULE%%' { val ThreadingModel = s '%s' }\n", - threading ); - if (progid) put_str( indent, "ProgId = s '%s'\n", progid ); - if (typelib) - { - const UUID *typelib_uuid = get_attrp( typelib->attrs, ATTR_UUID ); - put_str( indent, "TypeLib = s '%s'\n", format_uuid( typelib_uuid )); - if (!version) version = get_attrv( typelib->attrs, ATTR_VERSION ); - } - if (version) put_str( indent, "Version = s '%u.%u'\n", MAJORVERSION(version), MINORVERSION(version) ); - if (vi_progid) put_str( indent, "VersionIndependentProgId = s '%s'\n", vi_progid ); - put_str( --indent, "}\n" ); - return 1; -} - -static void write_coclasses( const statement_list_t *stmts, const typelib_t *typelib ) -{ - const statement_t *stmt; - - if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) - { - if (stmt->type == STMT_TYPE) - { - const type_t *type = stmt->u.type; - if (type_get_type(type) == TYPE_COCLASS) write_coclass( type, typelib ); - } - } -} - -static int write_progid( const type_t *class ) -{ - const UUID *uuid = get_attrp( class->attrs, ATTR_UUID ); - const char *descr = get_attrp( class->attrs, ATTR_HELPSTRING ); - const char *progid = get_attrp( class->attrs, ATTR_PROGID ); - const char *vi_progid = get_attrp( class->attrs, ATTR_VIPROGID ); - - if (!uuid) return 0; - if (!descr) descr = class->name; - - if (progid) - { - put_str( indent, "'%s' = s '%s'\n", progid, descr ); - put_str( indent++, "{\n" ); - put_str( indent, "CLSID = s '%s'\n", format_uuid( uuid ) ); - put_str( --indent, "}\n" ); - } - if (vi_progid) - { - put_str( indent, "'%s' = s '%s'\n", vi_progid, descr ); - put_str( indent++, "{\n" ); - put_str( indent, "CLSID = s '%s'\n", format_uuid( uuid ) ); - if (progid && strcmp( progid, vi_progid )) put_str( indent, "CurVer = s '%s'\n", progid ); - put_str( --indent, "}\n" ); - } - return 1; -} - -static void write_progids( const statement_list_t *stmts ) -{ - const statement_t *stmt; - - if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) - { - if (stmt->type == STMT_TYPE) - { - const type_t *type = stmt->u.type; - if (type_get_type(type) == TYPE_COCLASS) write_progid( type ); - } - } -} - -void write_regscript( const statement_list_t *stmts ) -{ - const type_t *ps_factory; - - if (!do_regscript) return; - if (do_everything && !need_proxy_file( stmts )) return; - - init_output_buffer(); - - put_str( indent, "HKCR\n" ); - put_str( indent++, "{\n" ); - - put_str( indent, "NoRemove Interface\n" ); - put_str( indent++, "{\n" ); - ps_factory = find_ps_factory( stmts ); - if (ps_factory) write_interfaces( stmts, ps_factory ); - put_str( --indent, "}\n" ); - - put_str( indent, "NoRemove CLSID\n" ); - put_str( indent++, "{\n" ); - write_coclasses( stmts, NULL ); - put_str( --indent, "}\n" ); - - write_progids( stmts ); - put_str( --indent, "}\n" ); - - if (strendswith( regscript_name, ".res" )) /* create a binary resource file */ - { - add_output_to_resources( "WINE_REGISTRY", regscript_token ); - flush_output_resources( regscript_name ); - } - else - { - FILE *f = fopen( regscript_name, "w" ); - if (!f) error( "Could not open %s for output\n", regscript_name ); - if (fwrite( output_buffer, output_buffer_pos, 1, f ) != output_buffer_pos) - error( "Failed to write to %s\n", regscript_name ); - if (fclose( f )) - error( "Failed to write to %s\n", regscript_name ); - } -} - -void output_typelib_regscript( const typelib_t *typelib ) -{ - const UUID *typelib_uuid = get_attrp( typelib->attrs, ATTR_UUID ); - const char *descr = get_attrp( typelib->attrs, ATTR_HELPSTRING ); - const expr_t *lcid_expr = get_attrp( typelib->attrs, ATTR_LIBLCID ); - unsigned int version = get_attrv( typelib->attrs, ATTR_VERSION ); - unsigned int flags = 0; - - if (is_attr( typelib->attrs, ATTR_RESTRICTED )) flags |= 1; /* LIBFLAG_FRESTRICTED */ - if (is_attr( typelib->attrs, ATTR_CONTROL )) flags |= 2; /* LIBFLAG_FCONTROL */ - if (is_attr( typelib->attrs, ATTR_HIDDEN )) flags |= 4; /* LIBFLAG_FHIDDEN */ - - put_str( indent, "HKCR\n" ); - put_str( indent++, "{\n" ); - - put_str( indent, "NoRemove Typelib\n" ); - put_str( indent++, "{\n" ); - put_str( indent, "NoRemove '%s'\n", format_uuid( typelib_uuid )); - put_str( indent++, "{\n" ); - put_str( indent, "'%u.%u' = s '%s'\n", - MAJORVERSION(version), MINORVERSION(version), descr ? descr : typelib->name ); - put_str( indent++, "{\n" ); - put_str( indent, "'%x' { %s = s '%%MODULE%%' }\n", - lcid_expr ? lcid_expr->cval : 0, typelib_kind == SYS_WIN64 ? "win64" : "win32" ); - put_str( indent, "FLAGS = s '%u'\n", flags ); - put_str( --indent, "}\n" ); - put_str( --indent, "}\n" ); - put_str( --indent, "}\n" ); - - put_str( indent, "NoRemove Interface\n" ); - put_str( indent++, "{\n" ); - write_typelib_interfaces( typelib ); - put_str( --indent, "}\n" ); - - put_str( indent, "NoRemove CLSID\n" ); - put_str( indent++, "{\n" ); - write_coclasses( typelib->stmts, typelib ); - put_str( --indent, "}\n" ); - - write_progids( typelib->stmts ); - put_str( --indent, "}\n" ); - - add_output_to_resources( "WINE_REGISTRY", typelib_name ); -} diff --git a/reactos/tools/widl/server.c b/reactos/tools/widl/server.c deleted file mode 100644 index 3a8810e05e6..00000000000 --- a/reactos/tools/widl/server.c +++ /dev/null @@ -1,572 +0,0 @@ -/* - * IDL Compiler - * - * Copyright 2005-2006 Eric Kohl - * - * 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 -#include -#ifdef HAVE_UNISTD_H -# include -#endif -#include -#include - -#include "widl.h" -#include "utils.h" -#include "parser.h" -#include "header.h" - -#include "typegen.h" - -static FILE* server; -static int indent = 0; - - -static void print_server(const char *format, ...) __attribute__((format (printf, 1, 2))); -static void print_server(const char *format, ...) -{ - va_list va; - va_start(va, format); - print(server, indent, format, va); - va_end(va); -} - -static void write_function_stub(const type_t *iface, const var_t *func, unsigned int proc_offset) -{ - const var_t *var; - unsigned char explicit_fc, implicit_fc; - int has_full_pointer = is_full_pointer_function(func); - const var_t *handle_var = get_func_handle_var( iface, func, &explicit_fc, &implicit_fc ); - - if (is_interpreted_func( iface, func )) return; - - print_server("struct __frame_%s_%s\n{\n", iface->name, get_name(func)); - indent++; - print_server("__DECL_EXCEPTION_FRAME\n"); - print_server("MIDL_STUB_MESSAGE _StubMsg;\n"); - - /* Declare arguments */ - declare_stub_args(server, indent, func); - - indent--; - print_server("};\n\n"); - - print_server("static void __finally_%s_%s(", iface->name, get_name(func)); - fprintf(server," struct __frame_%s_%s *__frame )\n{\n", iface->name, get_name(func)); - - indent++; - write_remoting_arguments(server, indent, func, "__frame->", PASS_OUT, PHASE_FREE); - - if (!is_void(type_function_get_rettype(func->type))) - write_remoting_arguments(server, indent, func, "__frame->", PASS_RETURN, PHASE_FREE); - - if (has_full_pointer) - write_full_pointer_free(server, indent, func); - - indent--; - print_server("}\n\n"); - - print_server("void __RPC_STUB %s_%s( PRPC_MESSAGE _pRpcMessage )\n", iface->name, get_name(func)); - - /* write the functions body */ - fprintf(server, "{\n"); - indent++; - print_server("struct __frame_%s_%s __f, * const __frame = &__f;\n", iface->name, get_name(func)); - if (has_out_arg_or_return(func)) print_server("RPC_STATUS _Status;\n"); - fprintf(server, "\n"); - - print_server("NdrServerInitializeNew(\n"); - indent++; - print_server("_pRpcMessage,\n"); - print_server("&__frame->_StubMsg,\n"); - print_server("&%s_StubDesc);\n", iface->name); - indent--; - fprintf(server, "\n"); - print_server( "RpcExceptionInit( __server_filter, __finally_%s_%s );\n", iface->name, get_name(func)); - - write_parameters_init(server, indent, func, "__frame->"); - - if (explicit_fc == RPC_FC_BIND_PRIMITIVE) - { - print_server("__frame->%s = _pRpcMessage->Handle;\n", handle_var->name); - fprintf(server, "\n"); - } - - print_server("RpcTryFinally\n"); - print_server("{\n"); - indent++; - print_server("RpcTryExcept\n"); - print_server("{\n"); - indent++; - - if (has_full_pointer) - write_full_pointer_init(server, indent, func, TRUE); - - if (type_get_function_args(func->type)) - { - print_server("if ((_pRpcMessage->DataRepresentation & 0x0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION)\n"); - indent++; - print_server("NdrConvert(&__frame->_StubMsg, (PFORMAT_STRING)&__MIDL_ProcFormatString.Format[%u]);\n", - proc_offset); - indent--; - fprintf(server, "\n"); - - /* unmarshall arguments */ - write_remoting_arguments(server, indent, func, "__frame->", PASS_IN, PHASE_UNMARSHAL); - } - - print_server("if (__frame->_StubMsg.Buffer > __frame->_StubMsg.BufferEnd)\n"); - print_server("{\n"); - indent++; - print_server("RpcRaiseException(RPC_X_BAD_STUB_DATA);\n"); - indent--; - print_server("}\n"); - indent--; - print_server("}\n"); - print_server("RpcExcept(RPC_BAD_STUB_DATA_EXCEPTION_FILTER)\n"); - print_server("{\n"); - indent++; - print_server("RpcRaiseException(RPC_X_BAD_STUB_DATA);\n"); - indent--; - print_server("}\n"); - print_server("RpcEndExcept\n"); - fprintf(server, "\n"); - - /* Assign 'out' arguments */ - assign_stub_out_args(server, indent, func, "__frame->"); - - /* Call the real server function */ - print_server("%s%s%s", - is_void(type_function_get_rettype(func->type)) ? "" : "__frame->_RetVal = ", - prefix_server, get_name(func)); - - if (type_get_function_args(func->type)) - { - int first_arg = 1; - - fprintf(server, "(\n"); - indent++; - LIST_FOR_EACH_ENTRY( var, type_get_function_args(func->type), const var_t, entry ) - { - if (first_arg) - first_arg = 0; - else - fprintf(server, ",\n"); - if (is_context_handle(var->type)) - { - /* if the context_handle attribute appears in the chain of types - * without pointers being followed, then the context handle must - * be direct, otherwise it is a pointer */ - int is_ch_ptr = is_aliaschain_attr(var->type, ATTR_CONTEXTHANDLE) ? FALSE : TRUE; - print_server("("); - write_type_decl_left(server, var->type); - fprintf(server, ")%sNDRSContextValue(__frame->%s)", - is_ch_ptr ? "" : "*", var->name); - } - else - { - print_server("%s__frame->%s", is_array(var->type) && !type_array_is_decl_as_ptr(var->type) ? "*" : "", var->name); - } - } - fprintf(server, ");\n"); - indent--; - } - else - { - fprintf(server, "();\n"); - } - - if (has_out_arg_or_return(func)) - { - write_remoting_arguments(server, indent, func, "__frame->", PASS_OUT, PHASE_BUFFERSIZE); - - if (!is_void(type_function_get_rettype(func->type))) - write_remoting_arguments(server, indent, func, "__frame->", PASS_RETURN, PHASE_BUFFERSIZE); - - print_server("_pRpcMessage->BufferLength = __frame->_StubMsg.BufferLength;\n"); - fprintf(server, "\n"); - print_server("_Status = I_RpcGetBuffer(_pRpcMessage);\n"); - print_server("if (_Status)\n"); - indent++; - print_server("RpcRaiseException(_Status);\n"); - indent--; - fprintf(server, "\n"); - print_server("__frame->_StubMsg.Buffer = _pRpcMessage->Buffer;\n"); - fprintf(server, "\n"); - } - - /* marshall arguments */ - write_remoting_arguments(server, indent, func, "__frame->", PASS_OUT, PHASE_MARSHAL); - - /* marshall the return value */ - if (!is_void(type_function_get_rettype(func->type))) - write_remoting_arguments(server, indent, func, "__frame->", PASS_RETURN, PHASE_MARSHAL); - - indent--; - print_server("}\n"); - print_server("RpcFinally\n"); - print_server("{\n"); - indent++; - print_server("__finally_%s_%s( __frame );\n", iface->name, get_name(func)); - indent--; - print_server("}\n"); - print_server("RpcEndFinally\n"); - - /* calculate buffer length */ - fprintf(server, "\n"); - print_server("_pRpcMessage->BufferLength = __frame->_StubMsg.Buffer - (unsigned char *)_pRpcMessage->Buffer;\n"); - indent--; - fprintf(server, "}\n"); - fprintf(server, "\n"); -} - - -static void write_function_stubs(type_t *iface, unsigned int *proc_offset) -{ - const statement_t *stmt; - - STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) ) - { - var_t *func = stmt->u.var; - - write_function_stub( iface, func, *proc_offset ); - - /* update proc_offset */ - func->procstring_offset = *proc_offset; - *proc_offset += get_size_procformatstring_func( iface, func ); - } -} - - -static void write_dispatchtable(type_t *iface) -{ - unsigned int ver = get_attrv(iface->attrs, ATTR_VERSION); - unsigned int method_count = 0; - const statement_t *stmt; - - print_server("static RPC_DISPATCH_FUNCTION %s_table[] =\n", iface->name); - print_server("{\n"); - indent++; - - STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) ) - { - var_t *func = stmt->u.var; - if (is_interpreted_func( iface, func )) - print_server("%s,\n", get_stub_mode() == MODE_Oif ? "NdrServerCall2" : "NdrServerCall"); - else - print_server("%s_%s,\n", iface->name, get_name(func)); - method_count++; - } - print_server("0\n"); - indent--; - print_server("};\n"); - print_server("static RPC_DISPATCH_TABLE %s_v%d_%d_DispatchTable =\n", iface->name, MAJORVERSION(ver), MINORVERSION(ver)); - print_server("{\n"); - indent++; - print_server("%u,\n", method_count); - print_server("%s_table\n", iface->name); - indent--; - print_server("};\n"); - fprintf(server, "\n"); -} - - -static void write_routinetable(type_t *iface) -{ - const statement_t *stmt; - - print_server( "static const SERVER_ROUTINE %s_ServerRoutineTable[] =\n", iface->name ); - print_server( "{\n" ); - indent++; - STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) ) - { - var_t *func = stmt->u.var; - if (is_local( func->attrs )) continue; - print_server( "(SERVER_ROUTINE)%s%s,\n", prefix_server, get_name(func)); - } - indent--; - print_server( "};\n\n" ); -} - - -static void write_rundown_routines(void) -{ - context_handle_t *ch; - int count = list_count( &context_handle_list ); - - if (!count) return; - print_server( "static const NDR_RUNDOWN RundownRoutines[] =\n" ); - print_server( "{\n" ); - indent++; - LIST_FOR_EACH_ENTRY( ch, &context_handle_list, context_handle_t, entry ) - { - print_server( "%s_rundown", ch->name ); - if (--count) fputc( ',', server ); - fputc( '\n', server ); - } - indent--; - print_server( "};\n\n" ); -} - - -static void write_serverinfo(type_t *iface) -{ - print_server( "static const MIDL_SERVER_INFO %s_ServerInfo =\n", iface->name ); - print_server( "{\n" ); - indent++; - print_server( "&%s_StubDesc,\n", iface->name ); - print_server( "%s_ServerRoutineTable,\n", iface->name ); - print_server( "__MIDL_ProcFormatString.Format,\n" ); - print_server( "%s_FormatStringOffsetTable,\n", iface->name ); - print_server( "0,\n" ); - print_server( "0,\n" ); - print_server( "0,\n" ); - print_server( "0\n" ); - indent--; - print_server( "};\n\n" ); -} - - -static void write_stubdescdecl(type_t *iface) -{ - print_server("static const MIDL_STUB_DESC %s_StubDesc;\n", iface->name); - fprintf(server, "\n"); -} - - -static void write_stubdescriptor(type_t *iface, int expr_eval_routines) -{ - print_server("static const MIDL_STUB_DESC %s_StubDesc =\n", iface->name); - print_server("{\n"); - indent++; - print_server("(void *)& %s___RpcServerInterface,\n", iface->name); - print_server("MIDL_user_allocate,\n"); - print_server("MIDL_user_free,\n"); - print_server("{\n"); - indent++; - print_server("0,\n"); - indent--; - print_server("},\n"); - if (!list_empty( &context_handle_list )) - print_server("RundownRoutines,\n"); - else - print_server("0,\n"); - print_server("0,\n"); - if (expr_eval_routines) - print_server("ExprEvalRoutines,\n"); - else - print_server("0,\n"); - print_server("0,\n"); - print_server("__MIDL_TypeFormatString.Format,\n"); - print_server("1, /* -error bounds_check flag */\n"); - print_server("0x%x, /* Ndr library version */\n", get_stub_mode() == MODE_Oif ? 0x50002 : 0x10001); - print_server("0,\n"); - print_server("0x50100a4, /* MIDL Version 5.1.164 */\n"); - print_server("0,\n"); - print_server("%s,\n", list_empty(&user_type_list) ? "0" : "UserMarshalRoutines"); - print_server("0, /* notify & notify_flag routine table */\n"); - print_server("1, /* Flags */\n"); - print_server("0, /* Reserved3 */\n"); - print_server("0, /* Reserved4 */\n"); - print_server("0 /* Reserved5 */\n"); - indent--; - print_server("};\n"); - fprintf(server, "\n"); -} - - -static void write_serverinterfacedecl(type_t *iface) -{ - unsigned int ver = get_attrv(iface->attrs, ATTR_VERSION); - UUID *uuid = get_attrp(iface->attrs, ATTR_UUID); - const str_list_t *endpoints = get_attrp(iface->attrs, ATTR_ENDPOINT); - - if (endpoints) write_endpoints( server, iface->name, endpoints ); - - print_server("static RPC_DISPATCH_TABLE %s_v%d_%d_DispatchTable;\n", iface->name, MAJORVERSION(ver), MINORVERSION(ver)); - print_server( "static const MIDL_SERVER_INFO %s_ServerInfo;\n", iface->name ); - fprintf(server, "\n"); - print_server("static const RPC_SERVER_INTERFACE %s___RpcServerInterface =\n", iface->name ); - print_server("{\n"); - indent++; - print_server("sizeof(RPC_SERVER_INTERFACE),\n"); - print_server("{{0x%08x,0x%04x,0x%04x,{0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x}},{%d,%d}},\n", - uuid->Data1, uuid->Data2, uuid->Data3, uuid->Data4[0], uuid->Data4[1], - uuid->Data4[2], uuid->Data4[3], uuid->Data4[4], uuid->Data4[5], uuid->Data4[6], - uuid->Data4[7], MAJORVERSION(ver), MINORVERSION(ver)); - print_server("{{0x8a885d04,0x1ceb,0x11c9,{0x9f,0xe8,0x08,0x00,0x2b,0x10,0x48,0x60}},{2,0}},\n"); /* FIXME */ - print_server("&%s_v%d_%d_DispatchTable,\n", iface->name, MAJORVERSION(ver), MINORVERSION(ver)); - if (endpoints) - { - print_server("%u,\n", list_count(endpoints)); - print_server("(PRPC_PROTSEQ_ENDPOINT)%s__RpcProtseqEndpoint,\n", iface->name); - } - else - { - print_server("0,\n"); - print_server("0,\n"); - } - print_server("0,\n"); - print_server("&%s_ServerInfo,\n", iface->name); - print_server("0,\n"); - indent--; - print_server("};\n"); - if (old_names) - print_server("RPC_IF_HANDLE %s_ServerIfHandle DECLSPEC_HIDDEN = (RPC_IF_HANDLE)& %s___RpcServerInterface;\n", - iface->name, iface->name); - else - print_server("RPC_IF_HANDLE %s%s_v%d_%d_s_ifspec DECLSPEC_HIDDEN = (RPC_IF_HANDLE)& %s___RpcServerInterface;\n", - prefix_server, iface->name, MAJORVERSION(ver), MINORVERSION(ver), iface->name); - fprintf(server, "\n"); -} - - -static void init_server(void) -{ - if (server) - return; - if (!(server = fopen(server_name, "w"))) - error("Could not open %s for output\n", server_name); - - print_server("/*** Autogenerated by WIDL %s from %s - Do not edit ***/\n", PACKAGE_VERSION, input_name); - print_server("#include \n"); - fprintf(server, "\n"); - print_server("#include \"%s\"\n", header_name); - print_server("\n"); - print_server( "#ifndef DECLSPEC_HIDDEN\n"); - print_server( "#define DECLSPEC_HIDDEN\n"); - print_server( "#endif\n"); - print_server( "\n"); -} - - -static void write_server_stmts(const statement_list_t *stmts, int expr_eval_routines, unsigned int *proc_offset) -{ - const statement_t *stmt; - if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) - { - if (stmt->type == STMT_LIBRARY) - write_server_stmts(stmt->u.lib->stmts, expr_eval_routines, proc_offset); - else if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE) - { - type_t *iface = stmt->u.type; - if (!need_stub(iface)) - continue; - - fprintf(server, "/*****************************************************************************\n"); - fprintf(server, " * %s interface\n", iface->name); - fprintf(server, " */\n"); - fprintf(server, "\n"); - - if (statements_has_func(type_iface_get_stmts(iface))) - { - write_serverinterfacedecl(iface); - write_stubdescdecl(iface); - - write_function_stubs(iface, proc_offset); - - print_server("#if !defined(__RPC_WIN%u__)\n", pointer_size == 8 ? 64 : 32); - print_server("#error Invalid build platform for this stub.\n"); - print_server("#endif\n"); - - fprintf(server, "\n"); - write_procformatstring_offsets( server, iface ); - write_stubdescriptor(iface, expr_eval_routines); - write_dispatchtable(iface); - write_routinetable(iface); - write_serverinfo(iface); - } - } - } -} - -static void write_server_routines(const statement_list_t *stmts) -{ - unsigned int proc_offset = 0; - int expr_eval_routines; - - if (need_inline_stubs_file( stmts )) - { - write_exceptions( server ); - print_server("\n"); - print_server("struct __server_frame\n"); - print_server("{\n"); - print_server(" __DECL_EXCEPTION_FRAME\n"); - print_server(" MIDL_STUB_MESSAGE _StubMsg;\n"); - print_server("};\n"); - print_server("\n"); - print_server("static int __server_filter( struct __server_frame *__frame )\n"); - print_server( "{\n"); - print_server( " return (__frame->code == STATUS_ACCESS_VIOLATION) ||\n"); - print_server( " (__frame->code == STATUS_DATATYPE_MISALIGNMENT) ||\n"); - print_server( " (__frame->code == RPC_X_BAD_STUB_DATA) ||\n"); - print_server( " (__frame->code == RPC_S_INVALID_BOUND);\n"); - print_server( "}\n"); - print_server( "\n"); - } - - write_formatstringsdecl(server, indent, stmts, need_stub); - expr_eval_routines = write_expr_eval_routines(server, server_token); - if (expr_eval_routines) - write_expr_eval_routine_list(server, server_token); - write_user_quad_list(server); - write_rundown_routines(); - - write_server_stmts(stmts, expr_eval_routines, &proc_offset); - - write_procformatstring(server, stmts, need_stub); - write_typeformatstring(server, stmts, need_stub); -} - -void write_server(const statement_list_t *stmts) -{ - if (!do_server) - return; - if (do_everything && !need_stub_files(stmts)) - return; - - init_server(); - if (!server) - return; - - if (do_win32 && do_win64) - { - fprintf(server, "#ifndef _WIN64\n\n"); - pointer_size = 4; - write_server_routines( stmts ); - fprintf(server, "\n#else /* _WIN64 */\n\n"); - pointer_size = 8; - write_server_routines( stmts ); - fprintf(server, "\n#endif /* _WIN64 */\n"); - } - else if (do_win32) - { - pointer_size = 4; - write_server_routines( stmts ); - } - else if (do_win64) - { - pointer_size = 8; - write_server_routines( stmts ); - } - - fclose(server); -} diff --git a/reactos/tools/widl/typegen.c b/reactos/tools/widl/typegen.c deleted file mode 100644 index dfc5a505166..00000000000 --- a/reactos/tools/widl/typegen.c +++ /dev/null @@ -1,5059 +0,0 @@ -/* - * Format String Generator for IDL Compiler - * - * Copyright 2005-2006 Eric Kohl - * Copyright 2005-2006 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 "config.h" -#include "wine/port.h" - -#include -#include -#ifdef HAVE_UNISTD_H -# include -#endif -#include -#include -#include -#include - -#include "widl.h" -#include "utils.h" -#include "parser.h" -#include "header.h" -#include "typetree.h" - -#include "typegen.h" -#include "expr.h" - -/* round size up to multiple of alignment */ -#define ROUND_SIZE(size, alignment) (((size) + ((alignment) - 1)) & ~((alignment) - 1)) -/* value to add on to round size up to a multiple of alignment */ -#define ROUNDING(size, alignment) (((alignment) - 1) - (((size) + ((alignment) - 1)) & ((alignment) - 1))) - -static const type_t *current_structure; -static const var_t *current_func; -static const type_t *current_iface; - -static struct list expr_eval_routines = LIST_INIT(expr_eval_routines); -struct expr_eval_routine -{ - struct list entry; - const type_t *iface; - const type_t *cont_type; - char *name; - unsigned int baseoff; - const expr_t *expr; -}; - -enum type_context -{ - TYPE_CONTEXT_TOPLEVELPARAM, - TYPE_CONTEXT_PARAM, - TYPE_CONTEXT_CONTAINER, - TYPE_CONTEXT_CONTAINER_NO_POINTERS, -}; - -/* parameter flags in Oif mode */ -static const unsigned short MustSize = 0x0001; -static const unsigned short MustFree = 0x0002; -static const unsigned short IsPipe = 0x0004; -static const unsigned short IsIn = 0x0008; -static const unsigned short IsOut = 0x0010; -static const unsigned short IsReturn = 0x0020; -static const unsigned short IsBasetype = 0x0040; -static const unsigned short IsByValue = 0x0080; -static const unsigned short IsSimpleRef = 0x0100; -/* static const unsigned short IsDontCallFreeInst = 0x0200; */ -/* static const unsigned short SaveForAsyncFinish = 0x0400; */ - -static unsigned int field_memsize(const type_t *type, unsigned int *offset); -static unsigned int fields_memsize(const var_list_t *fields, unsigned int *align); -static unsigned int type_memsize_and_alignment(const type_t *t, unsigned int *align); -static unsigned int write_struct_tfs(FILE *file, type_t *type, const char *name, unsigned int *tfsoff); -static int write_embedded_types(FILE *file, const attr_list_t *attrs, type_t *type, - const char *name, int write_ptr, unsigned int *tfsoff); -static const var_t *find_array_or_string_in_struct(const type_t *type); -static unsigned int write_string_tfs(FILE *file, const attr_list_t *attrs, - type_t *type, enum type_context context, - const char *name, unsigned int *typestring_offset); -static unsigned int get_required_buffer_size_type( const type_t *type, const char *name, - const attr_list_t *attrs, int toplevel_param, - unsigned int *alignment ); -static unsigned int get_function_buffer_size( const var_t *func, enum pass pass ); - -static const char *string_of_type(unsigned char type) -{ - switch (type) - { - case RPC_FC_BYTE: return "FC_BYTE"; - case RPC_FC_CHAR: return "FC_CHAR"; - case RPC_FC_SMALL: return "FC_SMALL"; - case RPC_FC_USMALL: return "FC_USMALL"; - case RPC_FC_WCHAR: return "FC_WCHAR"; - case RPC_FC_SHORT: return "FC_SHORT"; - case RPC_FC_USHORT: return "FC_USHORT"; - case RPC_FC_LONG: return "FC_LONG"; - case RPC_FC_ULONG: return "FC_ULONG"; - case RPC_FC_FLOAT: return "FC_FLOAT"; - case RPC_FC_HYPER: return "FC_HYPER"; - case RPC_FC_DOUBLE: return "FC_DOUBLE"; - case RPC_FC_ENUM16: return "FC_ENUM16"; - case RPC_FC_ENUM32: return "FC_ENUM32"; - case RPC_FC_IGNORE: return "FC_IGNORE"; - case RPC_FC_ERROR_STATUS_T: return "FC_ERROR_STATUS_T"; - case RPC_FC_RP: return "FC_RP"; - case RPC_FC_UP: return "FC_UP"; - case RPC_FC_OP: return "FC_OP"; - case RPC_FC_FP: return "FC_FP"; - case RPC_FC_ENCAPSULATED_UNION: return "FC_ENCAPSULATED_UNION"; - case RPC_FC_NON_ENCAPSULATED_UNION: return "FC_NON_ENCAPSULATED_UNION"; - case RPC_FC_STRUCT: return "FC_STRUCT"; - case RPC_FC_PSTRUCT: return "FC_PSTRUCT"; - case RPC_FC_CSTRUCT: return "FC_CSTRUCT"; - case RPC_FC_CPSTRUCT: return "FC_CPSTRUCT"; - case RPC_FC_CVSTRUCT: return "FC_CVSTRUCT"; - case RPC_FC_BOGUS_STRUCT: return "FC_BOGUS_STRUCT"; - case RPC_FC_SMFARRAY: return "FC_SMFARRAY"; - case RPC_FC_LGFARRAY: return "FC_LGFARRAY"; - case RPC_FC_SMVARRAY: return "FC_SMVARRAY"; - case RPC_FC_LGVARRAY: return "FC_LGVARRAY"; - case RPC_FC_CARRAY: return "FC_CARRAY"; - case RPC_FC_CVARRAY: return "FC_CVARRAY"; - case RPC_FC_BOGUS_ARRAY: return "FC_BOGUS_ARRAY"; - case RPC_FC_ALIGNM2: return "FC_ALIGNM2"; - case RPC_FC_ALIGNM4: return "FC_ALIGNM4"; - case RPC_FC_ALIGNM8: return "FC_ALIGNM8"; - case RPC_FC_POINTER: return "FC_POINTER"; - case RPC_FC_C_CSTRING: return "FC_C_CSTRING"; - case RPC_FC_C_WSTRING: return "FC_C_WSTRING"; - case RPC_FC_CSTRING: return "FC_CSTRING"; - case RPC_FC_WSTRING: return "FC_WSTRING"; - case RPC_FC_BYTE_COUNT_POINTER: return "FC_BYTE_COUNT_POINTER"; - case RPC_FC_TRANSMIT_AS: return "FC_TRANSMIT_AS"; - case RPC_FC_REPRESENT_AS: return "FC_REPRESENT_AS"; - case RPC_FC_IP: return "FC_IP"; - case RPC_FC_BIND_CONTEXT: return "FC_BIND_CONTEXT"; - case RPC_FC_BIND_GENERIC: return "FC_BIND_GENERIC"; - case RPC_FC_BIND_PRIMITIVE: return "FC_BIND_PRIMITIVE"; - case RPC_FC_AUTO_HANDLE: return "FC_AUTO_HANDLE"; - case RPC_FC_CALLBACK_HANDLE: return "FC_CALLBACK_HANDLE"; - case RPC_FC_STRUCTPAD1: return "FC_STRUCTPAD1"; - case RPC_FC_STRUCTPAD2: return "FC_STRUCTPAD2"; - case RPC_FC_STRUCTPAD3: return "FC_STRUCTPAD3"; - case RPC_FC_STRUCTPAD4: return "FC_STRUCTPAD4"; - case RPC_FC_STRUCTPAD5: return "FC_STRUCTPAD5"; - case RPC_FC_STRUCTPAD6: return "FC_STRUCTPAD6"; - case RPC_FC_STRUCTPAD7: return "FC_STRUCTPAD7"; - case RPC_FC_STRING_SIZED: return "FC_STRING_SIZED"; - case RPC_FC_NO_REPEAT: return "FC_NO_REPEAT"; - case RPC_FC_FIXED_REPEAT: return "FC_FIXED_REPEAT"; - case RPC_FC_VARIABLE_REPEAT: return "FC_VARIABLE_REPEAT"; - case RPC_FC_FIXED_OFFSET: return "FC_FIXED_OFFSET"; - case RPC_FC_VARIABLE_OFFSET: return "FC_VARIABLE_OFFSET"; - case RPC_FC_PP: return "FC_PP"; - case RPC_FC_EMBEDDED_COMPLEX: return "FC_EMBEDDED_COMPLEX"; - case RPC_FC_DEREFERENCE: return "FC_DEREFERENCE"; - case RPC_FC_DIV_2: return "FC_DIV_2"; - case RPC_FC_MULT_2: return "FC_MULT_2"; - case RPC_FC_ADD_1: return "FC_ADD_1"; - case RPC_FC_SUB_1: return "FC_SUB_1"; - case RPC_FC_CALLBACK: return "FC_CALLBACK"; - case RPC_FC_CONSTANT_IID: return "FC_CONSTANT_IID"; - case RPC_FC_END: return "FC_END"; - case RPC_FC_PAD: return "FC_PAD"; - case RPC_FC_USER_MARSHAL: return "FC_USER_MARSHAL"; - case RPC_FC_RANGE: return "FC_RANGE"; - case RPC_FC_INT3264: return "FC_INT3264"; - case RPC_FC_UINT3264: return "FC_UINT3264"; - default: - error("string_of_type: unknown type 0x%02x\n", type); - return NULL; - } -} - -static void *get_aliaschain_attrp(const type_t *type, enum attr_type attr) -{ - const type_t *t = type; - for (;;) - { - if (is_attr(t->attrs, attr)) - return get_attrp(t->attrs, attr); - else if (type_is_alias(t)) - t = type_alias_get_aliasee(t); - else return NULL; - } -} - -unsigned char get_basic_fc(const type_t *type) -{ - int sign = type_basic_get_sign(type); - switch (type_basic_get_type(type)) - { - case TYPE_BASIC_INT8: return (sign <= 0 ? RPC_FC_SMALL : RPC_FC_USMALL); - case TYPE_BASIC_INT16: return (sign <= 0 ? RPC_FC_SHORT : RPC_FC_USHORT); - case TYPE_BASIC_INT32: return (sign <= 0 ? RPC_FC_LONG : RPC_FC_ULONG); - case TYPE_BASIC_INT64: return RPC_FC_HYPER; - case TYPE_BASIC_INT: return (sign <= 0 ? RPC_FC_LONG : RPC_FC_ULONG); - case TYPE_BASIC_INT3264: return (sign <= 0 ? RPC_FC_INT3264 : RPC_FC_UINT3264); - case TYPE_BASIC_BYTE: return RPC_FC_BYTE; - case TYPE_BASIC_CHAR: return RPC_FC_CHAR; - case TYPE_BASIC_WCHAR: return RPC_FC_WCHAR; - case TYPE_BASIC_HYPER: return RPC_FC_HYPER; - case TYPE_BASIC_FLOAT: return RPC_FC_FLOAT; - case TYPE_BASIC_DOUBLE: return RPC_FC_DOUBLE; - case TYPE_BASIC_ERROR_STATUS_T: return RPC_FC_ERROR_STATUS_T; - case TYPE_BASIC_HANDLE: return RPC_FC_BIND_PRIMITIVE; - } - return 0; -} - -static unsigned char get_basic_fc_signed(const type_t *type) -{ - switch (type_basic_get_type(type)) - { - case TYPE_BASIC_INT8: return RPC_FC_SMALL; - case TYPE_BASIC_INT16: return RPC_FC_SHORT; - case TYPE_BASIC_INT32: return RPC_FC_LONG; - case TYPE_BASIC_INT64: return RPC_FC_HYPER; - case TYPE_BASIC_INT: return RPC_FC_LONG; - case TYPE_BASIC_INT3264: return RPC_FC_INT3264; - case TYPE_BASIC_BYTE: return RPC_FC_BYTE; - case TYPE_BASIC_CHAR: return RPC_FC_CHAR; - case TYPE_BASIC_WCHAR: return RPC_FC_WCHAR; - case TYPE_BASIC_HYPER: return RPC_FC_HYPER; - case TYPE_BASIC_FLOAT: return RPC_FC_FLOAT; - case TYPE_BASIC_DOUBLE: return RPC_FC_DOUBLE; - case TYPE_BASIC_ERROR_STATUS_T: return RPC_FC_ERROR_STATUS_T; - case TYPE_BASIC_HANDLE: return RPC_FC_BIND_PRIMITIVE; - } - return 0; -} - -static inline unsigned int clamp_align(unsigned int align) -{ - unsigned int packing = (pointer_size == 4) ? win32_packing : win64_packing; - if(align > packing) align = packing; - return align; -} - -unsigned char get_pointer_fc(const type_t *type, const attr_list_t *attrs, int toplevel_param) -{ - const type_t *t; - int pointer_type; - - assert(is_ptr(type) || is_array(type)); - - pointer_type = get_attrv(attrs, ATTR_POINTERTYPE); - if (pointer_type) - return pointer_type; - - for (t = type; type_is_alias(t); t = type_alias_get_aliasee(t)) - { - pointer_type = get_attrv(t->attrs, ATTR_POINTERTYPE); - if (pointer_type) - return pointer_type; - } - - if (toplevel_param) - return RPC_FC_RP; - else if (is_ptr(type)) - return type_pointer_get_default_fc(type); - else - return type_array_get_ptr_default_fc(type); -} - -static unsigned char get_pointer_fc_context( const type_t *type, const attr_list_t *attrs, - enum type_context context ) -{ - int pointer_fc = get_pointer_fc(type, attrs, context == TYPE_CONTEXT_TOPLEVELPARAM); - - if (pointer_fc == RPC_FC_UP && is_attr( attrs, ATTR_OUT ) && - context == TYPE_CONTEXT_PARAM && is_object( current_iface )) - pointer_fc = RPC_FC_OP; - - return pointer_fc; -} - -static unsigned char get_enum_fc(const type_t *type) -{ - assert(type_get_type(type) == TYPE_ENUM); - if (is_aliaschain_attr(type, ATTR_V1ENUM)) - return RPC_FC_ENUM32; - else - return RPC_FC_ENUM16; -} - -static type_t *get_user_type(const type_t *t, const char **pname) -{ - for (;;) - { - type_t *ut = get_attrp(t->attrs, ATTR_WIREMARSHAL); - if (ut) - { - if (pname) - *pname = t->name; - return ut; - } - - if (type_is_alias(t)) - t = type_alias_get_aliasee(t); - else - return NULL; - } -} - -static int is_user_type(const type_t *t) -{ - return get_user_type(t, NULL) != NULL; -} - -enum typegen_type typegen_detect_type(const type_t *type, const attr_list_t *attrs, unsigned int flags) -{ - if (is_user_type(type)) - return TGT_USER_TYPE; - - if (is_aliaschain_attr(type, ATTR_CONTEXTHANDLE)) - return TGT_CTXT_HANDLE; - - if (!(flags & TDT_IGNORE_STRINGS) && is_string_type(attrs, type)) - return TGT_STRING; - - switch (type_get_type(type)) - { - case TYPE_BASIC: - if (!(flags & TDT_IGNORE_RANGES) && - (is_attr(attrs, ATTR_RANGE) || is_aliaschain_attr(type, ATTR_RANGE))) - return TGT_RANGE; - return TGT_BASIC; - case TYPE_ENUM: - if (!(flags & TDT_IGNORE_RANGES) && - (is_attr(attrs, ATTR_RANGE) || is_aliaschain_attr(type, ATTR_RANGE))) - return TGT_RANGE; - return TGT_ENUM; - case TYPE_POINTER: - if (type_get_type(type_pointer_get_ref(type)) == TYPE_INTERFACE || - (type_get_type(type_pointer_get_ref(type)) == TYPE_VOID && is_attr(attrs, ATTR_IIDIS))) - return TGT_IFACE_POINTER; - else if (is_aliaschain_attr(type_pointer_get_ref(type), ATTR_CONTEXTHANDLE)) - return TGT_CTXT_HANDLE_POINTER; - else - return TGT_POINTER; - case TYPE_STRUCT: - return TGT_STRUCT; - case TYPE_ENCAPSULATED_UNION: - case TYPE_UNION: - return TGT_UNION; - case TYPE_ARRAY: - return TGT_ARRAY; - case TYPE_FUNCTION: - case TYPE_COCLASS: - case TYPE_INTERFACE: - case TYPE_MODULE: - case TYPE_VOID: - case TYPE_ALIAS: - case TYPE_BITFIELD: - break; - } - return TGT_INVALID; -} - -static int cant_be_null(const var_t *v) -{ - switch (typegen_detect_type(v->type, v->attrs, TDT_IGNORE_STRINGS)) - { - case TGT_ARRAY: - if (!type_array_is_decl_as_ptr( v->type )) return 0; - /* fall through */ - case TGT_POINTER: - return (get_pointer_fc(v->type, v->attrs, TRUE) == RPC_FC_RP); - case TGT_CTXT_HANDLE_POINTER: - return TRUE; - default: - return 0; - } - -} - -static int get_padding(const var_list_t *fields) -{ - unsigned short offset = 0; - unsigned int salign = 1; - const var_t *f; - - if (!fields) - return 0; - - LIST_FOR_EACH_ENTRY(f, fields, const var_t, entry) - { - type_t *ft = f->type; - unsigned int align = 0; - unsigned int size = type_memsize_and_alignment(ft, &align); - align = clamp_align(align); - if (align > salign) salign = align; - offset = ROUND_SIZE(offset, align); - offset += size; - } - - return ROUNDING(offset, salign); -} - -static unsigned int get_stack_size( const type_t *type, const attr_list_t *attrs, int *by_value ) -{ - unsigned int stack_size; - int by_val; - - switch (typegen_detect_type( type, attrs, TDT_ALL_TYPES )) - { - case TGT_BASIC: - case TGT_ENUM: - case TGT_RANGE: - case TGT_STRUCT: - case TGT_UNION: - case TGT_USER_TYPE: - stack_size = type_memsize( type ); - by_val = (pointer_size < 8 || stack_size <= pointer_size); /* FIXME: should be platform-specific */ - break; - default: - by_val = 0; - break; - } - if (!by_val) stack_size = pointer_size; - if (by_value) *by_value = by_val; - return ROUND_SIZE( stack_size, pointer_size ); -} - -static unsigned char get_contexthandle_flags( const type_t *iface, const attr_list_t *attrs, - const type_t *type ) -{ - unsigned char flags = 0; - - if (is_attr(iface->attrs, ATTR_STRICTCONTEXTHANDLE)) flags |= NDR_STRICT_CONTEXT_HANDLE; - - if (is_ptr(type) && - !is_attr( type->attrs, ATTR_CONTEXTHANDLE ) && - !is_attr( attrs, ATTR_CONTEXTHANDLE )) - flags |= 0x80; - - if (is_attr(attrs, ATTR_IN)) - { - flags |= 0x40; - if (!is_attr(attrs, ATTR_OUT)) flags |= NDR_CONTEXT_HANDLE_CANNOT_BE_NULL; - } - if (is_attr(attrs, ATTR_OUT)) flags |= 0x20; - - return flags; -} - -static unsigned int get_rpc_flags( const attr_list_t *attrs ) -{ - unsigned int flags = 0; - - if (is_attr( attrs, ATTR_IDEMPOTENT )) flags |= 0x0001; - if (is_attr( attrs, ATTR_BROADCAST )) flags |= 0x0002; - if (is_attr( attrs, ATTR_MAYBE )) flags |= 0x0004; - if (is_attr( attrs, ATTR_MESSAGE )) flags |= 0x0100; - if (is_attr( attrs, ATTR_ASYNC )) flags |= 0x4000; - return flags; -} - -unsigned char get_struct_fc(const type_t *type) -{ - int has_pointer = 0; - int has_conformance = 0; - int has_variance = 0; - var_t *field; - var_list_t *fields; - - fields = type_struct_get_fields(type); - - if (get_padding(fields)) - return RPC_FC_BOGUS_STRUCT; - - if (fields) LIST_FOR_EACH_ENTRY( field, fields, var_t, entry ) - { - type_t *t = field->type; - enum typegen_type typegen_type; - - typegen_type = typegen_detect_type(t, field->attrs, TDT_IGNORE_STRINGS); - - if (typegen_type == TGT_ARRAY && !type_array_is_decl_as_ptr(t)) - { - if (is_string_type(field->attrs, field->type)) - { - if (is_conformant_array(t)) - has_conformance = 1; - has_variance = 1; - continue; - } - - if (is_array(type_array_get_element(field->type))) - return RPC_FC_BOGUS_STRUCT; - - if (type_array_has_conformance(field->type)) - { - has_conformance = 1; - if (list_next(fields, &field->entry)) - error_loc("field '%s' deriving from a conformant array must be the last field in the structure\n", - field->name); - } - if (type_array_has_variance(t)) - has_variance = 1; - - t = type_array_get_element(t); - typegen_type = typegen_detect_type(t, field->attrs, TDT_IGNORE_STRINGS); - } - - switch (typegen_type) - { - case TGT_USER_TYPE: - case TGT_IFACE_POINTER: - return RPC_FC_BOGUS_STRUCT; - case TGT_BASIC: - if (type_basic_get_type(t) == TYPE_BASIC_INT3264 && pointer_size != 4) - return RPC_FC_BOGUS_STRUCT; - break; - case TGT_ENUM: - if (get_enum_fc(t) == RPC_FC_ENUM16) - return RPC_FC_BOGUS_STRUCT; - break; - case TGT_POINTER: - case TGT_ARRAY: - if (get_pointer_fc(t, field->attrs, FALSE) == RPC_FC_RP || pointer_size != 4) - return RPC_FC_BOGUS_STRUCT; - has_pointer = 1; - break; - case TGT_UNION: - return RPC_FC_BOGUS_STRUCT; - case TGT_STRUCT: - { - unsigned char fc = get_struct_fc(t); - switch (fc) - { - case RPC_FC_STRUCT: - break; - case RPC_FC_CVSTRUCT: - has_conformance = 1; - has_variance = 1; - has_pointer = 1; - break; - - case RPC_FC_CPSTRUCT: - has_conformance = 1; - if (list_next( fields, &field->entry )) - error_loc("field '%s' deriving from a conformant array must be the last field in the structure\n", - field->name); - has_pointer = 1; - break; - - case RPC_FC_CSTRUCT: - has_conformance = 1; - if (list_next( fields, &field->entry )) - error_loc("field '%s' deriving from a conformant array must be the last field in the structure\n", - field->name); - break; - - case RPC_FC_PSTRUCT: - has_pointer = 1; - break; - - default: - error_loc("Unknown struct member %s with type (0x%02x)\n", field->name, fc); - /* fallthru - treat it as complex */ - - /* as soon as we see one of these these members, it's bogus... */ - case RPC_FC_BOGUS_STRUCT: - return RPC_FC_BOGUS_STRUCT; - } - break; - } - case TGT_RANGE: - return RPC_FC_BOGUS_STRUCT; - case TGT_STRING: - /* shouldn't get here because of TDT_IGNORE_STRINGS above. fall through */ - case TGT_INVALID: - case TGT_CTXT_HANDLE: - case TGT_CTXT_HANDLE_POINTER: - /* checking after parsing should mean that we don't get here. if we do, - * it's a checker bug */ - assert(0); - } - } - - if( has_variance ) - { - if ( has_conformance ) - return RPC_FC_CVSTRUCT; - else - return RPC_FC_BOGUS_STRUCT; - } - if( has_conformance && has_pointer ) - return RPC_FC_CPSTRUCT; - if( has_conformance ) - return RPC_FC_CSTRUCT; - if( has_pointer ) - return RPC_FC_PSTRUCT; - return RPC_FC_STRUCT; -} - -static unsigned char get_array_fc(const type_t *type) -{ - unsigned char fc; - const expr_t *size_is; - const type_t *elem_type; - - elem_type = type_array_get_element(type); - size_is = type_array_get_conformance(type); - - if (!size_is) - { - unsigned int size = type_memsize(elem_type); - if (size * type_array_get_dim(type) > 0xffffuL) - fc = RPC_FC_LGFARRAY; - else - fc = RPC_FC_SMFARRAY; - } - else - fc = RPC_FC_CARRAY; - - if (type_array_has_variance(type)) - { - if (fc == RPC_FC_SMFARRAY) - fc = RPC_FC_SMVARRAY; - else if (fc == RPC_FC_LGFARRAY) - fc = RPC_FC_LGVARRAY; - else if (fc == RPC_FC_CARRAY) - fc = RPC_FC_CVARRAY; - } - - switch (typegen_detect_type(elem_type, NULL, TDT_IGNORE_STRINGS)) - { - case TGT_USER_TYPE: - fc = RPC_FC_BOGUS_ARRAY; - break; - case TGT_BASIC: - if (type_basic_get_type(elem_type) == TYPE_BASIC_INT3264 && - pointer_size != 4) - fc = RPC_FC_BOGUS_ARRAY; - break; - case TGT_STRUCT: - switch (get_struct_fc(elem_type)) - { - case RPC_FC_BOGUS_STRUCT: - fc = RPC_FC_BOGUS_ARRAY; - break; - } - break; - case TGT_ENUM: - /* is 16-bit enum - if so, wire size differs from mem size and so - * the array cannot be block copied, which means the array is complex */ - if (get_enum_fc(elem_type) == RPC_FC_ENUM16) - fc = RPC_FC_BOGUS_ARRAY; - break; - case TGT_UNION: - case TGT_IFACE_POINTER: - fc = RPC_FC_BOGUS_ARRAY; - break; - case TGT_POINTER: - /* ref pointers cannot just be block copied. unique pointers to - * interfaces need special treatment. either case means the array is - * complex */ - if (get_pointer_fc(elem_type, NULL, FALSE) == RPC_FC_RP || pointer_size != 4) - fc = RPC_FC_BOGUS_ARRAY; - break; - case TGT_RANGE: - fc = RPC_FC_BOGUS_ARRAY; - break; - case TGT_CTXT_HANDLE: - case TGT_CTXT_HANDLE_POINTER: - case TGT_STRING: - case TGT_INVALID: - case TGT_ARRAY: - /* nothing to do for everything else */ - break; - } - - return fc; -} - -static int is_non_complex_struct(const type_t *type) -{ - return (type_get_type(type) == TYPE_STRUCT && - get_struct_fc(type) != RPC_FC_BOGUS_STRUCT); -} - -static int type_has_pointers(const type_t *type) -{ - switch (typegen_detect_type(type, NULL, TDT_IGNORE_STRINGS)) - { - case TGT_USER_TYPE: - return FALSE; - case TGT_POINTER: - return TRUE; - case TGT_ARRAY: - return type_array_is_decl_as_ptr(type) || type_has_pointers(type_array_get_element(type)); - case TGT_STRUCT: - { - var_list_t *fields = type_struct_get_fields(type); - const var_t *field; - if (fields) LIST_FOR_EACH_ENTRY( field, fields, const var_t, entry ) - { - if (type_has_pointers(field->type)) - return TRUE; - } - break; - } - case TGT_UNION: - { - var_list_t *fields; - const var_t *field; - fields = type_union_get_cases(type); - if (fields) LIST_FOR_EACH_ENTRY( field, fields, const var_t, entry ) - { - if (field->type && type_has_pointers(field->type)) - return TRUE; - } - break; - } - case TGT_CTXT_HANDLE: - case TGT_CTXT_HANDLE_POINTER: - case TGT_STRING: - case TGT_IFACE_POINTER: - case TGT_BASIC: - case TGT_ENUM: - case TGT_RANGE: - case TGT_INVALID: - break; - } - - return FALSE; -} - -static int type_has_full_pointer(const type_t *type, const attr_list_t *attrs, - int toplevel_param) -{ - switch (typegen_detect_type(type, NULL, TDT_IGNORE_STRINGS)) - { - case TGT_USER_TYPE: - return FALSE; - case TGT_POINTER: - if (get_pointer_fc(type, attrs, toplevel_param) == RPC_FC_FP) - return TRUE; - else - return FALSE; - case TGT_ARRAY: - if (get_pointer_fc(type, attrs, toplevel_param) == RPC_FC_FP) - return TRUE; - else - return type_has_full_pointer(type_array_get_element(type), NULL, FALSE); - case TGT_STRUCT: - { - var_list_t *fields = type_struct_get_fields(type); - const var_t *field; - if (fields) LIST_FOR_EACH_ENTRY( field, fields, const var_t, entry ) - { - if (type_has_full_pointer(field->type, field->attrs, FALSE)) - return TRUE; - } - break; - } - case TGT_UNION: - { - var_list_t *fields; - const var_t *field; - fields = type_union_get_cases(type); - if (fields) LIST_FOR_EACH_ENTRY( field, fields, const var_t, entry ) - { - if (field->type && type_has_full_pointer(field->type, field->attrs, FALSE)) - return TRUE; - } - break; - } - case TGT_CTXT_HANDLE: - case TGT_CTXT_HANDLE_POINTER: - case TGT_STRING: - case TGT_IFACE_POINTER: - case TGT_BASIC: - case TGT_ENUM: - case TGT_RANGE: - case TGT_INVALID: - break; - } - - return FALSE; -} - -static unsigned short user_type_offset(const char *name) -{ - user_type_t *ut; - unsigned short off = 0; - LIST_FOR_EACH_ENTRY(ut, &user_type_list, user_type_t, entry) - { - if (strcmp(name, ut->name) == 0) - return off; - ++off; - } - error("user_type_offset: couldn't find type (%s)\n", name); - return 0; -} - -static void update_tfsoff(type_t *type, unsigned int offset, FILE *file) -{ - type->typestring_offset = offset; - if (file) type->tfswrite = FALSE; -} - -static void guard_rec(type_t *type) -{ - /* types that contain references to themselves (like a linked list), - need to be shielded from infinite recursion when writing embedded - types */ - if (type->typestring_offset) - type->tfswrite = FALSE; - else - type->typestring_offset = 1; -} - -static int is_embedded_complex(const type_t *type) -{ - switch (typegen_detect_type(type, NULL, TDT_ALL_TYPES)) - { - case TGT_USER_TYPE: - case TGT_STRUCT: - case TGT_UNION: - case TGT_ARRAY: - case TGT_IFACE_POINTER: - return TRUE; - default: - return FALSE; - } -} - -static const char *get_context_handle_type_name(const type_t *type) -{ - const type_t *t; - for (t = type; - is_ptr(t) || type_is_alias(t); - t = type_is_alias(t) ? type_alias_get_aliasee(t) : type_pointer_get_ref(t)) - if (is_attr(t->attrs, ATTR_CONTEXTHANDLE)) - return t->name; - assert(0); - return NULL; -} - -#define WRITE_FCTYPE(file, fctype, typestring_offset) \ - do { \ - if (file) \ - fprintf(file, "/* %2u */\n", typestring_offset); \ - print_file((file), 2, "0x%02x, /* " #fctype " */\n", RPC_##fctype); \ - } \ - while (0) - -static void print_file(FILE *file, int indent, const char *format, ...) __attribute__((format (printf, 3, 4))); -static void print_file(FILE *file, int indent, const char *format, ...) -{ - va_list va; - va_start(va, format); - print(file, indent, format, va); - va_end(va); -} - -void print(FILE *file, int indent, const char *format, va_list va) -{ - if (file) - { - if (format[0] != '\n') - while (0 < indent--) - fprintf(file, " "); - vfprintf(file, format, va); - } -} - - -static void write_var_init(FILE *file, int indent, const type_t *t, const char *n, const char *local_var_prefix) -{ - if (decl_indirect(t)) - { - print_file(file, indent, "MIDL_memset(&%s%s, 0, sizeof(%s%s));\n", - local_var_prefix, n, local_var_prefix, n); - print_file(file, indent, "%s_p_%s = &%s%s;\n", local_var_prefix, n, local_var_prefix, n); - } - else if (is_ptr(t) || is_array(t)) - print_file(file, indent, "%s%s = 0;\n", local_var_prefix, n); -} - -void write_parameters_init(FILE *file, int indent, const var_t *func, const char *local_var_prefix) -{ - const var_t *var; - - if (!is_void(type_function_get_rettype(func->type))) - write_var_init(file, indent, type_function_get_rettype(func->type), "_RetVal", local_var_prefix); - - if (!type_get_function_args(func->type)) - return; - - LIST_FOR_EACH_ENTRY( var, type_get_function_args(func->type), const var_t, entry ) - write_var_init(file, indent, var->type, var->name, local_var_prefix); - - fprintf(file, "\n"); -} - -static void write_formatdesc(FILE *f, int indent, const char *str) -{ - print_file(f, indent, "typedef struct _MIDL_%s_FORMAT_STRING\n", str); - print_file(f, indent, "{\n"); - print_file(f, indent + 1, "short Pad;\n"); - print_file(f, indent + 1, "unsigned char Format[%s_FORMAT_STRING_SIZE];\n", str); - print_file(f, indent, "} MIDL_%s_FORMAT_STRING;\n", str); - print_file(f, indent, "\n"); -} - -void write_formatstringsdecl(FILE *f, int indent, const statement_list_t *stmts, type_pred_t pred) -{ - clear_all_offsets(); - - print_file(f, indent, "#define TYPE_FORMAT_STRING_SIZE %d\n", - get_size_typeformatstring(stmts, pred)); - - print_file(f, indent, "#define PROC_FORMAT_STRING_SIZE %d\n", - get_size_procformatstring(stmts, pred)); - - fprintf(f, "\n"); - write_formatdesc(f, indent, "TYPE"); - write_formatdesc(f, indent, "PROC"); - fprintf(f, "\n"); - print_file(f, indent, "static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;\n"); - print_file(f, indent, "static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;\n"); - print_file(f, indent, "\n"); -} - -int decl_indirect(const type_t *t) -{ - if (is_user_type(t)) - return TRUE; - return (type_get_type(t) != TYPE_BASIC && - type_get_type(t) != TYPE_ENUM && - type_get_type(t) != TYPE_POINTER && - type_get_type(t) != TYPE_ARRAY); -} - -static unsigned char get_parameter_fc( const type_t *type, const attr_list_t *attrs, int is_return, - unsigned short *flags, unsigned int *stack_size, - unsigned int *typestring_offset ) -{ - unsigned int alignment, server_size = 0, buffer_size = 0; - unsigned char fc = 0; - int is_byval; - int is_in = is_attr(attrs, ATTR_IN); - int is_out = is_attr(attrs, ATTR_OUT); - - if (is_return) is_out = TRUE; - else if (!is_in && !is_out) is_in = TRUE; - - *flags = 0; - *stack_size = get_stack_size( type, attrs, &is_byval ); - *typestring_offset = type->typestring_offset; - - if (is_in) *flags |= IsIn; - if (is_out) *flags |= IsOut; - if (is_return) *flags |= IsReturn; - - if (!is_string_type( attrs, type )) - buffer_size = get_required_buffer_size_type( type, NULL, attrs, TRUE, &alignment ); - - switch (typegen_detect_type( type, attrs, TDT_ALL_TYPES )) - { - case TGT_BASIC: - *flags |= IsBasetype; - fc = get_basic_fc_signed( type ); - if (fc == RPC_FC_BIND_PRIMITIVE) - { - buffer_size = 4; /* actually 0 but avoids setting MustSize */ - fc = RPC_FC_LONG; - } - break; - case TGT_ENUM: - *flags |= IsBasetype; - fc = get_enum_fc( type ); - break; - case TGT_RANGE: - *flags |= IsByValue; - break; - case TGT_STRUCT: - case TGT_UNION: - case TGT_USER_TYPE: - *flags |= MustFree | (is_byval ? IsByValue : IsSimpleRef); - break; - case TGT_IFACE_POINTER: - *flags |= MustFree; - break; - case TGT_ARRAY: - *flags |= MustFree; - if (type_array_is_decl_as_ptr(type) && type->details.array.ptr_tfsoff && - get_pointer_fc( type, attrs, !is_return ) == RPC_FC_RP) - *flags |= IsSimpleRef; - break; - case TGT_STRING: - *flags |= MustFree; - if (is_declptr( type ) && get_pointer_fc( type, attrs, !is_return ) == RPC_FC_RP) - { - /* skip over pointer description straight to string description */ - if (is_conformant_array( type )) *typestring_offset += 4; - else *typestring_offset += 2; - *flags |= IsSimpleRef; - } - break; - case TGT_CTXT_HANDLE_POINTER: - *flags |= IsSimpleRef; - *typestring_offset += 4; - /* fall through */ - case TGT_CTXT_HANDLE: - buffer_size = 20; - break; - case TGT_POINTER: - if (get_pointer_fc( type, attrs, !is_return ) == RPC_FC_RP) - { - const type_t *ref = type_pointer_get_ref( type ); - - if (!is_string_type( attrs, ref )) - buffer_size = get_required_buffer_size_type( ref, NULL, NULL, TRUE, &alignment ); - - switch (typegen_detect_type( ref, NULL, TDT_ALL_TYPES )) - { - case TGT_BASIC: - *flags |= IsSimpleRef | IsBasetype; - fc = get_basic_fc( ref ); - if (!is_in && is_out) server_size = pointer_size; - break; - case TGT_ENUM: - if ((fc = get_enum_fc( ref )) == RPC_FC_ENUM32) - { - *flags |= IsSimpleRef | IsBasetype; - if (!is_in && is_out) server_size = pointer_size; - } - else - { - server_size = pointer_size; - } - break; - case TGT_UNION: - case TGT_USER_TYPE: - case TGT_RANGE: - *flags |= IsSimpleRef | MustFree; - *typestring_offset = ref->typestring_offset; - if (!is_in && is_out) server_size = type_memsize( ref ); - break; - case TGT_STRING: - case TGT_POINTER: - case TGT_ARRAY: - case TGT_CTXT_HANDLE: - case TGT_CTXT_HANDLE_POINTER: - *flags |= MustFree; - server_size = pointer_size; - break; - case TGT_IFACE_POINTER: - *flags |= MustFree; - if (is_in && is_out) server_size = pointer_size; - break; - case TGT_STRUCT: - *flags |= IsSimpleRef | MustFree; - *typestring_offset = ref->typestring_offset; - switch (get_struct_fc(ref)) - { - case RPC_FC_STRUCT: - case RPC_FC_PSTRUCT: - case RPC_FC_BOGUS_STRUCT: - if (!is_in && is_out) server_size = type_memsize( ref ); - break; - default: - break; - } - break; - case TGT_INVALID: - assert(0); - } - } - else /* not ref pointer */ - { - *flags |= MustFree; - } - break; - case TGT_INVALID: - assert(0); - } - - if (!buffer_size) *flags |= MustSize; - - if (server_size) - { - server_size = (server_size + 7) / 8; - if (server_size < 8) *flags |= server_size << 13; - } - return fc; -} - -static unsigned char get_func_oi2_flags( const var_t *func ) -{ - const var_t *var; - var_list_t *args = type_get_function_args( func->type ); - type_t *ret_type = type_function_get_rettype( func->type ); - unsigned char oi2_flags = 0x40; /* HasExtensions */ - unsigned short flags; - unsigned int stack_size, typestring_offset; - - if (args) LIST_FOR_EACH_ENTRY( var, args, const var_t, entry ) - { - get_parameter_fc( var->type, var->attrs, 0, &flags, &stack_size, &typestring_offset ); - if (flags & MustSize) - { - if (flags & IsIn) oi2_flags |= 0x02; /* ClientMustSize */ - if (flags & IsOut) oi2_flags |= 0x01; /* ServerMustSize */ - } - } - - if (!is_void( ret_type )) - { - oi2_flags |= 0x04; /* HasRet */ - get_parameter_fc( ret_type, NULL, 1, &flags, &stack_size, &typestring_offset ); - if (flags & MustSize) oi2_flags |= 0x01; /* ServerMustSize */ - } - return oi2_flags; -} - -static unsigned int write_new_procformatstring_type(FILE *file, int indent, - const type_t *type, - const attr_list_t *attrs, - int is_return, unsigned int *stack_offset) -{ - char buffer[64]; - unsigned int stack_size, typestring_offset; - unsigned short flags; - unsigned char fc = get_parameter_fc( type, attrs, is_return, &flags, &stack_size, &typestring_offset ); - - strcpy( buffer, "/* flags:" ); - if (flags & MustSize) strcat( buffer, " must size," ); - if (flags & MustFree) strcat( buffer, " must free," ); - if (flags & IsPipe) strcat( buffer, " pipe," ); - if (flags & IsIn) strcat( buffer, " in," ); - if (flags & IsOut) strcat( buffer, " out," ); - if (flags & IsReturn) strcat( buffer, " return," ); - if (flags & IsBasetype) strcat( buffer, " base type," ); - if (flags & IsByValue) strcat( buffer, " by value," ); - if (flags & IsSimpleRef) strcat( buffer, " simple ref," ); - if (flags >> 13) sprintf( buffer + strlen(buffer), " srv size=%u,", (flags >> 13) * 8 ); - strcpy( buffer + strlen( buffer ) - 1, " */" ); - print_file( file, indent, "NdrFcShort(0x%hx),\t%s\n", flags, buffer ); - print_file( file, indent, "NdrFcShort(0x%hx), /* stack offset = %hu */\n", - *stack_offset, *stack_offset ); - if (flags & IsBasetype) - { - print_file( file, indent, "0x%02x, /* %s */\n", fc, string_of_type(fc) ); - print_file( file, indent, "0x0,\n" ); - } - else - print_file( file, indent, "NdrFcShort(0x%x), /* type offset = %u */\n", - typestring_offset, typestring_offset ); - *stack_offset += max( stack_size, pointer_size ); - return 6; -} - -static unsigned int write_old_procformatstring_type(FILE *file, int indent, - const type_t *type, - const attr_list_t *attrs, - int is_return, int is_interpreted) -{ - unsigned int size; - - int is_in = is_attr(attrs, ATTR_IN); - int is_out = is_attr(attrs, ATTR_OUT); - - if (!is_in && !is_out) is_in = TRUE; - - if (type_get_type(type) == TYPE_BASIC || - type_get_type(type) == TYPE_ENUM) - { - unsigned char fc; - - if (is_return) - print_file(file, indent, "0x53, /* FC_RETURN_PARAM_BASETYPE */\n"); - else - print_file(file, indent, "0x4e, /* FC_IN_PARAM_BASETYPE */\n"); - - if (type_get_type(type) == TYPE_ENUM) - { - fc = get_enum_fc(type); - } - else - { - fc = get_basic_fc_signed(type); - - if (fc == RPC_FC_BIND_PRIMITIVE) - fc = RPC_FC_IGNORE; - } - - print_file(file, indent, "0x%02x, /* %s */\n", - fc, string_of_type(fc)); - size = 2; /* includes param type prefix */ - } - else - { - unsigned short offset = type->typestring_offset; - - if (is_interpreted && is_array(type) && - type_array_is_decl_as_ptr(type) && - type->details.array.ptr_tfsoff) - offset = type->details.array.ptr_tfsoff; - - if (is_return) - print_file(file, indent, "0x52, /* FC_RETURN_PARAM */\n"); - else if (is_in && is_out) - print_file(file, indent, "0x50, /* FC_IN_OUT_PARAM */\n"); - else if (is_out) - print_file(file, indent, "0x51, /* FC_OUT_PARAM */\n"); - else - print_file(file, indent, "0x4d, /* FC_IN_PARAM */\n"); - - size = get_stack_size( type, attrs, NULL ); - print_file(file, indent, "0x%02x,\n", size / pointer_size ); - print_file(file, indent, "NdrFcShort(0x%x), /* type offset = %u */\n", offset, offset); - size = 4; /* includes param type prefix */ - } - return size; -} - -int is_interpreted_func( const type_t *iface, const var_t *func ) -{ - const char *str; - const var_t *var; - const var_list_t *args = type_get_function_args( func->type ); - const type_t *ret_type = type_function_get_rettype( func->type ); - - if (type_get_type( ret_type ) == TYPE_BASIC) - { - switch (type_basic_get_type( ret_type )) - { - case TYPE_BASIC_INT64: - case TYPE_BASIC_HYPER: - /* return value must fit in a long_ptr */ - if (pointer_size < 8) return 0; - break; - case TYPE_BASIC_FLOAT: - case TYPE_BASIC_DOUBLE: - /* floating point values can't be returned */ - return 0; - default: - break; - } - } - if (get_stub_mode() != MODE_Oif && args) - { - LIST_FOR_EACH_ENTRY( var, args, const var_t, entry ) - switch (type_get_type( var->type )) - { - case TYPE_BASIC: - switch (type_basic_get_type( var->type )) - { - /* floating point arguments are not supported in Oi mode */ - case TYPE_BASIC_FLOAT: return 0; - case TYPE_BASIC_DOUBLE: return 0; - default: break; - } - break; - /* unions passed by value are not supported in Oi mode */ - case TYPE_UNION: return 0; - case TYPE_ENCAPSULATED_UNION: return 0; - default: break; - } - } - - if ((str = get_attrp( func->attrs, ATTR_OPTIMIZE ))) return !strcmp( str, "i" ); - if ((str = get_attrp( iface->attrs, ATTR_OPTIMIZE ))) return !strcmp( str, "i" ); - return (get_stub_mode() != MODE_Os); -} - -static void write_proc_func_header( FILE *file, int indent, const type_t *iface, - const var_t *func, unsigned int *offset, - unsigned short num_proc ) -{ - var_t *var; - var_list_t *args = type_get_function_args( func->type ); - unsigned char explicit_fc, implicit_fc; - unsigned char handle_flags; - const var_t *handle_var = get_func_handle_var( iface, func, &explicit_fc, &implicit_fc ); - unsigned char oi_flags = RPC_FC_PROC_OIF_RPCFLAGS | RPC_FC_PROC_OIF_NEWINIT; - unsigned int rpc_flags = get_rpc_flags( func->attrs ); - unsigned int nb_args = 0; - unsigned int stack_size = 0; - unsigned short param_num = 0; - unsigned short handle_stack_offset = 0; - unsigned short handle_param_num = 0; - - if (is_full_pointer_function( func )) oi_flags |= RPC_FC_PROC_OIF_FULLPTR; - if (is_object( iface )) - { - oi_flags |= RPC_FC_PROC_OIF_OBJECT; - if (get_stub_mode() == MODE_Oif) oi_flags |= RPC_FC_PROC_OIF_OBJ_V2; - stack_size += pointer_size; - } - - if (args) LIST_FOR_EACH_ENTRY( var, args, var_t, entry ) - { - if (var == handle_var) - { - handle_stack_offset = stack_size; - handle_param_num = param_num; - } - stack_size += get_stack_size( var->type, var->attrs, NULL ); - param_num++; - nb_args++; - } - if (!is_void( type_function_get_rettype( func->type ))) - { - stack_size += pointer_size; - nb_args++; - } - - print_file( file, 0, "/* %u (procedure %s::%s) */\n", *offset, iface->name, func->name ); - print_file( file, indent, "0x%02x,\t/* %s */\n", implicit_fc, - implicit_fc ? string_of_type(implicit_fc) : "explicit handle" ); - print_file( file, indent, "0x%02x,\n", oi_flags ); - print_file( file, indent, "NdrFcLong(0x%x),\n", rpc_flags ); - print_file( file, indent, "NdrFcShort(0x%hx),\t/* method %hu */\n", num_proc, num_proc ); - print_file( file, indent, "NdrFcShort(0x%hx),\t/* stack size = %hu */\n", stack_size, stack_size ); - *offset += 10; - - if (!implicit_fc) - { - switch (explicit_fc) - { - case RPC_FC_BIND_PRIMITIVE: - handle_flags = 0; - print_file( file, indent, "0x%02x,\t/* %s */\n", explicit_fc, string_of_type(explicit_fc) ); - print_file( file, indent, "0x%02x,\n", handle_flags ); - print_file( file, indent, "NdrFcShort(0x%hx),\t/* stack offset = %hu */\n", - handle_stack_offset, handle_stack_offset ); - *offset += 4; - break; - case RPC_FC_BIND_GENERIC: - handle_flags = type_memsize( handle_var->type ); - print_file( file, indent, "0x%02x,\t/* %s */\n", explicit_fc, string_of_type(explicit_fc) ); - print_file( file, indent, "0x%02x,\n", handle_flags ); - print_file( file, indent, "NdrFcShort(0x%hx),\t/* stack offset = %hu */\n", - handle_stack_offset, handle_stack_offset ); - print_file( file, indent, "0x%02x,\n", get_generic_handle_offset( handle_var->type ) ); - print_file( file, indent, "0x%x,\t/* FC_PAD */\n", RPC_FC_PAD); - *offset += 6; - break; - case RPC_FC_BIND_CONTEXT: - handle_flags = get_contexthandle_flags( iface, handle_var->attrs, handle_var->type ); - print_file( file, indent, "0x%02x,\t/* %s */\n", explicit_fc, string_of_type(explicit_fc) ); - print_file( file, indent, "0x%02x,\n", handle_flags ); - print_file( file, indent, "NdrFcShort(0x%hx),\t/* stack offset = %hu */\n", - handle_stack_offset, handle_stack_offset ); - print_file( file, indent, "0x%02x,\n", get_context_handle_offset( handle_var->type ) ); - print_file( file, indent, "0x%02x,\t/* param %hu */\n", handle_param_num, handle_param_num ); - *offset += 6; - break; - } - } - - if (get_stub_mode() == MODE_Oif) - { - unsigned char oi2_flags = get_func_oi2_flags( func ); - unsigned char ext_flags = 0; - unsigned int size; - - if (is_attr( func->attrs, ATTR_NOTIFY )) ext_flags |= 0x08; /* HasNotify */ - if (is_attr( func->attrs, ATTR_NOTIFYFLAG )) ext_flags |= 0x10; /* HasNotify2 */ - - size = get_function_buffer_size( func, PASS_IN ); - print_file( file, indent, "NdrFcShort(0x%x),\t/* client buffer = %hu */\n", size, size ); - size = get_function_buffer_size( func, PASS_OUT ); - print_file( file, indent, "NdrFcShort(0x%x),\t/* server buffer = %hu */\n", size, size ); - print_file( file, indent, "0x%02x,\n", oi2_flags ); - print_file( file, indent, "0x%02x,\t/* %u params */\n", nb_args, nb_args ); - print_file( file, indent, "0x%02x,\n", pointer_size == 8 ? 10 : 8 ); - print_file( file, indent, "0x%02x,\n", ext_flags ); - print_file( file, indent, "NdrFcShort(0x0),\n" ); /* server corr hint */ - print_file( file, indent, "NdrFcShort(0x0),\n" ); /* client corr hint */ - print_file( file, indent, "NdrFcShort(0x0),\n" ); /* FIXME: notify index */ - *offset += 14; - if (pointer_size == 8) - { - unsigned short pos = 0, fpu_mask = 0; - - if (is_object( iface )) pos += 2; - if (args) LIST_FOR_EACH_ENTRY( var, args, var_t, entry ) - { - if (type_get_type( var->type ) == TYPE_BASIC) - { - switch (type_basic_get_type( var->type )) - { - case TYPE_BASIC_FLOAT: fpu_mask |= 1 << pos; break; - case TYPE_BASIC_DOUBLE: fpu_mask |= 2 << pos; break; - default: break; - } - } - pos += 2; - if (pos >= 16) break; - } - print_file( file, indent, "NdrFcShort(0x%x),\n", fpu_mask ); /* floating point mask */ - *offset += 2; - } - } -} - -static void write_procformatstring_func( FILE *file, int indent, const type_t *iface, - const var_t *func, unsigned int *offset, - unsigned short num_proc ) -{ - unsigned int stack_offset = is_object( iface ) ? pointer_size : 0; - int is_interpreted = is_interpreted_func( iface, func ); - int is_new_style = is_interpreted && (get_stub_mode() == MODE_Oif); - - if (is_interpreted) write_proc_func_header( file, indent, iface, func, offset, num_proc ); - - /* emit argument data */ - if (type_get_function_args(func->type)) - { - const var_t *var; - LIST_FOR_EACH_ENTRY( var, type_get_function_args(func->type), const var_t, entry ) - { - print_file( file, 0, "/* %u (parameter %s) */\n", *offset, var->name ); - if (is_new_style) - *offset += write_new_procformatstring_type(file, indent, var->type, var->attrs, - FALSE, &stack_offset); - else - *offset += write_old_procformatstring_type(file, indent, var->type, var->attrs, - FALSE, is_interpreted); - } - } - - /* emit return value data */ - if (is_void(type_function_get_rettype(func->type))) - { - if (!is_new_style) - { - print_file(file, 0, "/* %u (void) */\n", *offset); - print_file(file, indent, "0x5b, /* FC_END */\n"); - print_file(file, indent, "0x5c, /* FC_PAD */\n"); - *offset += 2; - } - } - else - { - print_file( file, 0, "/* %u (return value) */\n", *offset ); - if (is_new_style) - *offset += write_new_procformatstring_type(file, indent, type_function_get_rettype(func->type), - NULL, TRUE, &stack_offset); - else - *offset += write_old_procformatstring_type(file, indent, type_function_get_rettype(func->type), - NULL, TRUE, is_interpreted); - } -} - -static void write_procformatstring_stmts(FILE *file, int indent, const statement_list_t *stmts, - type_pred_t pred, unsigned int *offset) -{ - const statement_t *stmt; - if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) - { - if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE) - { - const statement_t *stmt_func; - const type_t *iface = stmt->u.type; - const type_t *parent = type_iface_get_inherit( iface ); - int count = parent ? count_methods( parent ) : 0; - - if (!pred(iface)) continue; - STATEMENTS_FOR_EACH_FUNC(stmt_func, type_iface_get_stmts(iface)) - { - var_t *func = stmt_func->u.var; - if (is_local(func->attrs)) continue; - write_procformatstring_func( file, indent, iface, func, offset, count++ ); - } - } - else if (stmt->type == STMT_LIBRARY) - write_procformatstring_stmts(file, indent, stmt->u.lib->stmts, pred, offset); - } -} - -void write_procformatstring(FILE *file, const statement_list_t *stmts, type_pred_t pred) -{ - int indent = 0; - unsigned int offset = 0; - - print_file(file, indent, "static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =\n"); - print_file(file, indent, "{\n"); - indent++; - print_file(file, indent, "0,\n"); - print_file(file, indent, "{\n"); - indent++; - - write_procformatstring_stmts(file, indent, stmts, pred, &offset); - - print_file(file, indent, "0x0\n"); - indent--; - print_file(file, indent, "}\n"); - indent--; - print_file(file, indent, "};\n"); - print_file(file, indent, "\n"); -} - -void write_procformatstring_offsets( FILE *file, const type_t *iface ) -{ - const statement_t *stmt; - int indent = 0; - - print_file( file, indent, "static const unsigned short %s_FormatStringOffsetTable[] =\n", - iface->name ); - print_file( file, indent, "{\n" ); - indent++; - STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) ) - { - var_t *func = stmt->u.var; - if (is_local( func->attrs )) continue; - print_file( file, indent, "%u, /* %s */\n", func->procstring_offset, func->name ); - } - indent--; - print_file( file, indent, "};\n\n" ); -} - -static int write_base_type(FILE *file, const type_t *type, unsigned int *typestring_offset) -{ - unsigned char fc; - - if (type_get_type(type) == TYPE_BASIC) - fc = get_basic_fc_signed(type); - else if (type_get_type(type) == TYPE_ENUM) - fc = get_enum_fc(type); - else - return 0; - - print_file(file, 2, "0x%02x,\t/* %s */\n", fc, string_of_type(fc)); - *typestring_offset += 1; - return 1; -} - -/* write conformance / variance descriptor */ -static unsigned int write_conf_or_var_desc(FILE *file, const type_t *cont_type, - unsigned int baseoff, const type_t *type, - const expr_t *expr) -{ - unsigned char operator_type = 0; - unsigned char conftype = RPC_FC_NORMAL_CONFORMANCE; - const char *conftype_string = "field"; - const expr_t *subexpr; - const type_t *iface = NULL; - const char *name; - - if (!expr) - { - print_file(file, 2, "NdrFcLong(0xffffffff),\t/* -1 */\n"); - return 4; - } - - if (expr->is_const) - { - if (expr->cval > UCHAR_MAX * (USHRT_MAX + 1) + USHRT_MAX) - error("write_conf_or_var_desc: constant value %d is greater than " - "the maximum constant size of %d\n", expr->cval, - UCHAR_MAX * (USHRT_MAX + 1) + USHRT_MAX); - - print_file(file, 2, "0x%x, /* Corr desc: constant, val = %d */\n", - RPC_FC_CONSTANT_CONFORMANCE, expr->cval); - print_file(file, 2, "0x%x,\n", expr->cval >> 16); - print_file(file, 2, "NdrFcShort(0x%hx),\n", (unsigned short)expr->cval); - - return 4; - } - - if (!cont_type) /* top-level conformance */ - { - conftype = RPC_FC_TOP_LEVEL_CONFORMANCE; - conftype_string = "parameter"; - cont_type = current_func->type; - name = current_func->name; - iface = current_iface; - } - else - { - name = cont_type->name; - if (is_ptr(type) || (is_array(type) && type_array_is_decl_as_ptr(type))) - { - conftype = RPC_FC_POINTER_CONFORMANCE; - conftype_string = "field pointer"; - } - } - - subexpr = expr; - switch (subexpr->type) - { - case EXPR_PPTR: - subexpr = subexpr->ref; - operator_type = RPC_FC_DEREFERENCE; - break; - case EXPR_DIV: - if (subexpr->u.ext->is_const && (subexpr->u.ext->cval == 2)) - { - subexpr = subexpr->ref; - operator_type = RPC_FC_DIV_2; - } - break; - case EXPR_MUL: - if (subexpr->u.ext->is_const && (subexpr->u.ext->cval == 2)) - { - subexpr = subexpr->ref; - operator_type = RPC_FC_MULT_2; - } - break; - case EXPR_SUB: - if (subexpr->u.ext->is_const && (subexpr->u.ext->cval == 1)) - { - subexpr = subexpr->ref; - operator_type = RPC_FC_SUB_1; - } - break; - case EXPR_ADD: - if (subexpr->u.ext->is_const && (subexpr->u.ext->cval == 1)) - { - subexpr = subexpr->ref; - operator_type = RPC_FC_ADD_1; - } - break; - default: - break; - } - - if (subexpr->type == EXPR_IDENTIFIER) - { - const type_t *correlation_variable = NULL; - unsigned char param_type = 0; - unsigned int offset = 0; - const var_t *var; - struct expr_loc expr_loc; - - if (type_get_type(cont_type) == TYPE_FUNCTION) - { - var_list_t *args = type_get_function_args( cont_type ); - - if (is_object( iface )) offset += pointer_size; - if (args) LIST_FOR_EACH_ENTRY( var, args, const var_t, entry ) - { - if (var->name && !strcmp(var->name, subexpr->u.sval)) - { - expr_loc.v = var; - correlation_variable = var->type; - break; - } - offset += get_stack_size( var->type, var->attrs, NULL ); - } - } - else - { - var_list_t *fields = type_struct_get_fields( cont_type ); - - if (fields) LIST_FOR_EACH_ENTRY( var, fields, const var_t, entry ) - { - unsigned int size = field_memsize( var->type, &offset ); - if (var->name && !strcmp(var->name, subexpr->u.sval)) - { - expr_loc.v = var; - correlation_variable = var->type; - break; - } - offset += size; - } - } - - if (!correlation_variable) - error("write_conf_or_var_desc: couldn't find variable %s in %s\n", subexpr->u.sval, name); - expr_loc.attr = NULL; - correlation_variable = expr_resolve_type(&expr_loc, cont_type, expr); - - offset -= baseoff; - - if (type_get_type(correlation_variable) == TYPE_BASIC) - { - switch (get_basic_fc(correlation_variable)) - { - case RPC_FC_CHAR: - case RPC_FC_SMALL: - param_type = RPC_FC_SMALL; - break; - case RPC_FC_BYTE: - case RPC_FC_USMALL: - param_type = RPC_FC_USMALL; - break; - case RPC_FC_WCHAR: - case RPC_FC_SHORT: - param_type = RPC_FC_SHORT; - break; - case RPC_FC_USHORT: - param_type = RPC_FC_USHORT; - break; - case RPC_FC_LONG: - param_type = RPC_FC_LONG; - break; - case RPC_FC_ULONG: - param_type = RPC_FC_ULONG; - break; - default: - error("write_conf_or_var_desc: conformance variable type not supported 0x%x\n", - get_basic_fc(correlation_variable)); - } - } - else if (type_get_type(correlation_variable) == TYPE_ENUM) - { - if (get_enum_fc(correlation_variable) == RPC_FC_ENUM32) - param_type = RPC_FC_LONG; - else - param_type = RPC_FC_SHORT; - } - else if (type_get_type(correlation_variable) == TYPE_POINTER) - { - if (pointer_size == 8) - param_type = RPC_FC_HYPER; - else - param_type = RPC_FC_LONG; - } - else - { - error("write_conf_or_var_desc: non-arithmetic type used as correlation variable %s\n", - subexpr->u.sval); - return 0; - } - - print_file(file, 2, "0x%x,\t/* Corr desc: %s %s, %s */\n", - conftype | param_type, conftype_string, subexpr->u.sval, string_of_type(param_type)); - print_file(file, 2, "0x%x,\t/* %s */\n", operator_type, - operator_type ? string_of_type(operator_type) : "no operators"); - print_file(file, 2, "NdrFcShort(0x%hx),\t/* offset = %d */\n", - (unsigned short)offset, offset); - } - else if (!iface || is_interpreted_func( iface, current_func )) - { - unsigned int callback_offset = 0; - struct expr_eval_routine *eval; - int found = 0; - - LIST_FOR_EACH_ENTRY(eval, &expr_eval_routines, struct expr_eval_routine, entry) - { - if (eval->cont_type == cont_type || - (type_get_type( eval->cont_type ) == type_get_type( cont_type ) && - eval->iface == iface && - eval->name && name && !strcmp(eval->name, name) && - !compare_expr(eval->expr, expr))) - { - found = 1; - break; - } - callback_offset++; - } - - if (!found) - { - eval = xmalloc (sizeof(*eval)); - eval->iface = iface; - eval->cont_type = cont_type; - eval->name = xstrdup( name ); - eval->baseoff = baseoff; - eval->expr = expr; - list_add_tail (&expr_eval_routines, &eval->entry); - } - - if (callback_offset > USHRT_MAX) - error("Maximum number of callback routines reached\n"); - - print_file(file, 2, "0x%x,\t/* Corr desc: %s in %s */\n", conftype, conftype_string, name); - print_file(file, 2, "0x%x,\t/* %s */\n", RPC_FC_CALLBACK, "FC_CALLBACK"); - print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", (unsigned short)callback_offset, callback_offset); - } - else /* output a dummy corr desc that isn't used */ - { - print_file(file, 2, "0x%x,\t/* Corr desc: unused for %s */\n", conftype, name); - print_file(file, 2, "0x0,\n" ); - print_file(file, 2, "NdrFcShort(0x0),\n" ); - } - return 4; -} - -/* return size and start offset of a data field based on current offset */ -static unsigned int field_memsize(const type_t *type, unsigned int *offset) -{ - unsigned int align = 0; - unsigned int size = type_memsize_and_alignment( type, &align ); - - *offset = ROUND_SIZE( *offset, align ); - return size; -} - -static unsigned int fields_memsize(const var_list_t *fields, unsigned int *align) -{ - unsigned int size = 0; - unsigned int max_align; - const var_t *v; - - if (!fields) return 0; - LIST_FOR_EACH_ENTRY( v, fields, const var_t, entry ) - { - unsigned int falign = 0; - unsigned int fsize = type_memsize_and_alignment(v->type, &falign); - if (*align < falign) *align = falign; - falign = clamp_align(falign); - size = ROUND_SIZE(size, falign); - size += fsize; - } - - max_align = clamp_align(*align); - size = ROUND_SIZE(size, max_align); - - return size; -} - -static unsigned int union_memsize(const var_list_t *fields, unsigned int *pmaxa) -{ - unsigned int size, maxs = 0; - unsigned int align = *pmaxa; - const var_t *v; - - if (fields) LIST_FOR_EACH_ENTRY( v, fields, const var_t, entry ) - { - /* we could have an empty default field with NULL type */ - if (v->type) - { - size = type_memsize_and_alignment(v->type, &align); - if (maxs < size) maxs = size; - if (*pmaxa < align) *pmaxa = align; - } - } - - return maxs; -} - -static unsigned int type_memsize_and_alignment(const type_t *t, unsigned int *align) -{ - unsigned int size = 0; - - switch (type_get_type(t)) - { - case TYPE_BASIC: - switch (get_basic_fc(t)) - { - case RPC_FC_BYTE: - case RPC_FC_CHAR: - case RPC_FC_USMALL: - case RPC_FC_SMALL: - size = 1; - if (size > *align) *align = size; - break; - case RPC_FC_WCHAR: - case RPC_FC_USHORT: - case RPC_FC_SHORT: - size = 2; - if (size > *align) *align = size; - break; - case RPC_FC_ULONG: - case RPC_FC_LONG: - case RPC_FC_ERROR_STATUS_T: - case RPC_FC_FLOAT: - size = 4; - if (size > *align) *align = size; - break; - case RPC_FC_HYPER: - case RPC_FC_DOUBLE: - size = 8; - if (size > *align) *align = size; - break; - case RPC_FC_INT3264: - case RPC_FC_UINT3264: - case RPC_FC_BIND_PRIMITIVE: - assert( pointer_size ); - size = pointer_size; - if (size > *align) *align = size; - break; - default: - error("type_memsize: Unknown type 0x%x\n", get_basic_fc(t)); - size = 0; - } - break; - case TYPE_ENUM: - switch (get_enum_fc(t)) - { - case RPC_FC_ENUM16: - case RPC_FC_ENUM32: - size = 4; - if (size > *align) *align = size; - break; - default: - error("type_memsize: Unknown enum type\n"); - size = 0; - } - break; - case TYPE_STRUCT: - size = fields_memsize(type_struct_get_fields(t), align); - break; - case TYPE_ENCAPSULATED_UNION: - size = fields_memsize(type_encapsulated_union_get_fields(t), align); - break; - case TYPE_UNION: - size = union_memsize(type_union_get_cases(t), align); - break; - case TYPE_POINTER: - assert( pointer_size ); - size = pointer_size; - if (size > *align) *align = size; - break; - case TYPE_ARRAY: - if (!type_array_is_decl_as_ptr(t)) - { - if (is_conformant_array(t)) - { - type_memsize_and_alignment(type_array_get_element(t), align); - size = 0; - } - else - size = type_array_get_dim(t) * - type_memsize_and_alignment(type_array_get_element(t), align); - } - else /* declared as a pointer */ - { - assert( pointer_size ); - size = pointer_size; - if (size > *align) *align = size; - } - break; - case TYPE_INTERFACE: - case TYPE_ALIAS: - case TYPE_VOID: - case TYPE_COCLASS: - case TYPE_MODULE: - case TYPE_FUNCTION: - case TYPE_BITFIELD: - /* these types should not be encountered here due to language - * restrictions (interface, void, coclass, module), logical - * restrictions (alias - due to type_get_type call above) or - * checking restrictions (function, bitfield). */ - assert(0); - } - - return size; -} - -unsigned int type_memsize(const type_t *t) -{ - unsigned int align = 0; - return type_memsize_and_alignment( t, &align ); -} - -static unsigned int type_buffer_alignment(const type_t *t) -{ - const var_list_t *fields; - const var_t *var; - unsigned int max = 0, align; - - switch (type_get_type(t)) - { - case TYPE_BASIC: - switch (get_basic_fc(t)) - { - case RPC_FC_BYTE: - case RPC_FC_CHAR: - case RPC_FC_USMALL: - case RPC_FC_SMALL: - return 1; - case RPC_FC_WCHAR: - case RPC_FC_USHORT: - case RPC_FC_SHORT: - return 2; - case RPC_FC_ULONG: - case RPC_FC_LONG: - case RPC_FC_ERROR_STATUS_T: - case RPC_FC_FLOAT: - case RPC_FC_INT3264: - case RPC_FC_UINT3264: - return 4; - case RPC_FC_HYPER: - case RPC_FC_DOUBLE: - return 8; - default: - error("type_buffer_alignment: Unknown type 0x%x\n", get_basic_fc(t)); - } - break; - case TYPE_ENUM: - switch (get_enum_fc(t)) - { - case RPC_FC_ENUM16: - return 2; - case RPC_FC_ENUM32: - return 4; - default: - error("type_buffer_alignment: Unknown enum type\n"); - } - break; - case TYPE_STRUCT: - if (!(fields = type_struct_get_fields(t))) break; - LIST_FOR_EACH_ENTRY( var, fields, const var_t, entry ) - { - if (!var->type) continue; - align = type_buffer_alignment( var->type ); - if (max < align) max = align; - } - break; - case TYPE_ENCAPSULATED_UNION: - if (!(fields = type_encapsulated_union_get_fields(t))) break; - LIST_FOR_EACH_ENTRY( var, fields, const var_t, entry ) - { - if (!var->type) continue; - align = type_buffer_alignment( var->type ); - if (max < align) max = align; - } - break; - case TYPE_UNION: - if (!(fields = type_union_get_cases(t))) break; - LIST_FOR_EACH_ENTRY( var, fields, const var_t, entry ) - { - if (!var->type) continue; - align = type_buffer_alignment( var->type ); - if (max < align) max = align; - } - break; - case TYPE_ARRAY: - if (!type_array_is_decl_as_ptr(t)) - return type_buffer_alignment( type_array_get_element(t) ); - /* else fall through */ - case TYPE_POINTER: - return 4; - case TYPE_INTERFACE: - case TYPE_ALIAS: - case TYPE_VOID: - case TYPE_COCLASS: - case TYPE_MODULE: - case TYPE_FUNCTION: - case TYPE_BITFIELD: - /* these types should not be encountered here due to language - * restrictions (interface, void, coclass, module), logical - * restrictions (alias - due to type_get_type call above) or - * checking restrictions (function, bitfield). */ - assert(0); - } - return max; -} - -int is_full_pointer_function(const var_t *func) -{ - const var_t *var; - if (type_has_full_pointer(type_function_get_rettype(func->type), func->attrs, TRUE)) - return TRUE; - if (!type_get_function_args(func->type)) - return FALSE; - LIST_FOR_EACH_ENTRY( var, type_get_function_args(func->type), const var_t, entry ) - if (type_has_full_pointer( var->type, var->attrs, TRUE )) - return TRUE; - return FALSE; -} - -void write_full_pointer_init(FILE *file, int indent, const var_t *func, int is_server) -{ - print_file(file, indent, "__frame->_StubMsg.FullPtrXlatTables = NdrFullPointerXlatInit(0,%s);\n", - is_server ? "XLAT_SERVER" : "XLAT_CLIENT"); - fprintf(file, "\n"); -} - -void write_full_pointer_free(FILE *file, int indent, const var_t *func) -{ - print_file(file, indent, "NdrFullPointerXlatFree(__frame->_StubMsg.FullPtrXlatTables);\n"); - fprintf(file, "\n"); -} - -static unsigned int write_nonsimple_pointer(FILE *file, const attr_list_t *attrs, - const type_t *type, - enum type_context context, - unsigned int offset, - unsigned int *typeformat_offset) -{ - unsigned int start_offset = *typeformat_offset; - short reloff = offset - (*typeformat_offset + 2); - int in_attr, out_attr; - int pointer_type; - unsigned char flags = 0; - - pointer_type = get_pointer_fc_context(type, attrs, context); - - in_attr = is_attr(attrs, ATTR_IN); - out_attr = is_attr(attrs, ATTR_OUT); - if (!in_attr && !out_attr) in_attr = 1; - - if (out_attr && !in_attr && pointer_type == RPC_FC_RP) - flags |= RPC_FC_P_ONSTACK; - - if (is_ptr(type)) - { - type_t *ref = type_pointer_get_ref(type); - if(is_declptr(ref) && !is_user_type(ref)) - flags |= RPC_FC_P_DEREF; - } - - print_file(file, 2, "0x%x, 0x%x,\t\t/* %s", - pointer_type, - flags, - string_of_type(pointer_type)); - if (file) - { - if (flags & RPC_FC_P_ONSTACK) - fprintf(file, " [allocated_on_stack]"); - if (flags & RPC_FC_P_DEREF) - fprintf(file, " [pointer_deref]"); - fprintf(file, " */\n"); - } - - print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset= %hd (%u) */\n", reloff, reloff, offset); - *typeformat_offset += 4; - - return start_offset; -} - -static unsigned int write_simple_pointer(FILE *file, const attr_list_t *attrs, - const type_t *type, enum type_context context) -{ - unsigned char fc; - unsigned char pointer_fc; - const type_t *ref; - int in_attr = is_attr(attrs, ATTR_IN); - int out_attr = is_attr(attrs, ATTR_OUT); - unsigned char flags = RPC_FC_P_SIMPLEPOINTER; - - /* for historical reasons, write_simple_pointer also handled string types, - * but no longer does. catch bad uses of the function with this check */ - if (is_string_type(attrs, type)) - error("write_simple_pointer: can't handle type %s which is a string type\n", type->name); - - pointer_fc = get_pointer_fc_context(type, attrs, context); - - ref = type_pointer_get_ref(type); - if (type_get_type(ref) == TYPE_ENUM) - fc = get_enum_fc(ref); - else - fc = get_basic_fc(ref); - - if (out_attr && !in_attr) - flags |= RPC_FC_P_ONSTACK; - - print_file(file, 2, "0x%02x, 0x%x,\t/* %s %s[simple_pointer] */\n", - pointer_fc, flags, string_of_type(pointer_fc), - flags & RPC_FC_P_ONSTACK ? "[allocated_on_stack] " : ""); - print_file(file, 2, "0x%02x,\t/* %s */\n", fc, string_of_type(fc)); - print_file(file, 2, "0x5c,\t/* FC_PAD */\n"); - return 4; -} - -static void print_start_tfs_comment(FILE *file, type_t *t, unsigned int tfsoff) -{ - print_file(file, 0, "/* %u (", tfsoff); - write_type_decl(file, t, NULL); - print_file(file, 0, ") */\n"); -} - -static unsigned int write_pointer_tfs(FILE *file, const attr_list_t *attrs, - type_t *type, unsigned int ref_offset, - enum type_context context, - unsigned int *typestring_offset) -{ - unsigned int offset = *typestring_offset; - type_t *ref = type_pointer_get_ref(type); - - print_start_tfs_comment(file, type, offset); - update_tfsoff(type, offset, file); - - switch (typegen_detect_type(ref, attrs, TDT_ALL_TYPES)) - { - case TGT_BASIC: - case TGT_ENUM: - *typestring_offset += write_simple_pointer(file, attrs, type, context); - break; - default: - if (ref_offset) - write_nonsimple_pointer(file, attrs, type, context, ref_offset, typestring_offset); - break; - } - - return offset; -} - -static int processed(const type_t *type) -{ - return type->typestring_offset && !type->tfswrite; -} - -static int user_type_has_variable_size(const type_t *t) -{ - if (is_ptr(t)) - return TRUE; - else if (type_get_type(t) == TYPE_STRUCT) - { - switch (get_struct_fc(t)) - { - case RPC_FC_PSTRUCT: - case RPC_FC_CSTRUCT: - case RPC_FC_CPSTRUCT: - case RPC_FC_CVSTRUCT: - return TRUE; - } - } - /* Note: Since this only applies to user types, we can't have a conformant - array here, and strings should get filed under pointer in this case. */ - return FALSE; -} - -static unsigned int write_user_tfs(FILE *file, type_t *type, unsigned int *tfsoff) -{ - unsigned int start, absoff, flags; - const char *name = NULL; - type_t *utype = get_user_type(type, &name); - unsigned int usize = type_memsize(utype); - unsigned int ualign = type_buffer_alignment(utype); - unsigned int size = type_memsize(type); - unsigned short funoff = user_type_offset(name); - short reloff; - - if (processed(type)) return type->typestring_offset; - - guard_rec(type); - - if(user_type_has_variable_size(utype)) usize = 0; - - if (type_get_type(utype) == TYPE_BASIC || - type_get_type(utype) == TYPE_ENUM) - { - unsigned char fc; - - if (type_get_type(utype) == TYPE_ENUM) - fc = get_enum_fc(utype); - else - fc = get_basic_fc(utype); - - absoff = *tfsoff; - print_start_tfs_comment(file, utype, absoff); - print_file(file, 2, "0x%x,\t/* %s */\n", fc, string_of_type(fc)); - print_file(file, 2, "0x5c,\t/* FC_PAD */\n"); - *tfsoff += 2; - } - else - { - if (!processed(utype)) - write_embedded_types(file, NULL, utype, utype->name, TRUE, tfsoff); - absoff = utype->typestring_offset; - } - - if (type_get_type(utype) == TYPE_POINTER && get_pointer_fc(utype, NULL, FALSE) == RPC_FC_RP) - flags = 0x40; - else if (type_get_type(utype) == TYPE_POINTER && get_pointer_fc(utype, NULL, FALSE) == RPC_FC_UP) - flags = 0x80; - else - flags = 0; - - start = *tfsoff; - update_tfsoff(type, start, file); - print_start_tfs_comment(file, type, start); - print_file(file, 2, "0x%x,\t/* FC_USER_MARSHAL */\n", RPC_FC_USER_MARSHAL); - print_file(file, 2, "0x%x,\t/* Alignment= %d, Flags= %02x */\n", - flags | (ualign - 1), ualign - 1, flags); - print_file(file, 2, "NdrFcShort(0x%hx),\t/* Function offset= %hu */\n", funoff, funoff); - print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", (unsigned short)size, size); - print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", (unsigned short)usize, usize); - *tfsoff += 8; - reloff = absoff - *tfsoff; - print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset= %hd (%u) */\n", reloff, reloff, absoff); - *tfsoff += 2; - return start; -} - -static void write_member_type(FILE *file, const type_t *cont, - int cont_is_complex, const attr_list_t *attrs, - const type_t *type, unsigned int *corroff, - unsigned int *tfsoff) -{ - if (is_embedded_complex(type) && !is_conformant_array(type)) - { - unsigned int absoff; - short reloff; - - if (type_get_type(type) == TYPE_UNION && is_attr(attrs, ATTR_SWITCHIS)) - { - absoff = *corroff; - *corroff += 8; - } - else - { - absoff = type->typestring_offset; - } - reloff = absoff - (*tfsoff + 2); - - print_file(file, 2, "0x4c,\t/* FC_EMBEDDED_COMPLEX */\n"); - /* padding is represented using FC_STRUCTPAD* types, so presumably - * this is left over in the format for historical purposes in MIDL - * or rpcrt4. */ - print_file(file, 2, "0x0,\n"); - print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset= %hd (%u) */\n", - reloff, reloff, absoff); - *tfsoff += 4; - } - else if (is_ptr(type) || is_conformant_array(type)) - { - unsigned char fc = cont_is_complex ? RPC_FC_POINTER : RPC_FC_LONG; - print_file(file, 2, "0x%x,\t/* %s */\n", fc, string_of_type(fc)); - *tfsoff += 1; - } - else if (!write_base_type(file, type, tfsoff)) - error("Unsupported member type %d\n", type_get_type(type)); -} - -static void write_array_element_type(FILE *file, const type_t *type, - int cont_is_complex, unsigned int *tfsoff) -{ - type_t *elem = type_array_get_element(type); - - if (!is_embedded_complex(elem) && is_ptr(elem)) - { - type_t *ref = type_pointer_get_ref(elem); - - if (processed(ref)) - { - write_nonsimple_pointer(file, NULL, elem, TYPE_CONTEXT_CONTAINER, - ref->typestring_offset, tfsoff); - return; - } - if (!is_string_type(NULL, elem) && - (type_get_type(ref) == TYPE_BASIC || type_get_type(ref) == TYPE_ENUM)) - { - *tfsoff += write_simple_pointer(file, NULL, elem, TYPE_CONTEXT_CONTAINER); - return; - } - } - return write_member_type(file, type, cont_is_complex, NULL, elem, NULL, tfsoff); -} - -static void write_end(FILE *file, unsigned int *tfsoff) -{ - if (*tfsoff % 2 == 0) - { - print_file(file, 2, "0x%x,\t\t/* FC_PAD */\n", RPC_FC_PAD); - *tfsoff += 1; - } - print_file(file, 2, "0x%x,\t\t/* FC_END */\n", RPC_FC_END); - *tfsoff += 1; -} - -static void write_descriptors(FILE *file, type_t *type, unsigned int *tfsoff) -{ - unsigned int offset = 0; - var_list_t *fs = type_struct_get_fields(type); - var_t *f; - - if (fs) LIST_FOR_EACH_ENTRY(f, fs, var_t, entry) - { - type_t *ft = f->type; - unsigned int size = field_memsize( ft, &offset ); - if (type_get_type(ft) == TYPE_UNION && is_attr(f->attrs, ATTR_SWITCHIS)) - { - short reloff; - unsigned int absoff = ft->typestring_offset; - if (is_attr(ft->attrs, ATTR_SWITCHTYPE)) - absoff += 8; /* we already have a corr descr, skip it */ - reloff = absoff - (*tfsoff + 6); - print_file(file, 0, "/* %d */\n", *tfsoff); - print_file(file, 2, "0x%x,\t/* FC_NON_ENCAPSULATED_UNION */\n", RPC_FC_NON_ENCAPSULATED_UNION); - print_file(file, 2, "0x%x,\t/* FIXME: always FC_LONG */\n", RPC_FC_LONG); - write_conf_or_var_desc(file, current_structure, offset, ft, - get_attrp(f->attrs, ATTR_SWITCHIS)); - print_file(file, 2, "NdrFcShort(%hd),\t/* Offset= %hd (%u) */\n", - reloff, reloff, absoff); - *tfsoff += 8; - } - offset += size; - } -} - -static int write_pointer_description_offsets( - FILE *file, const attr_list_t *attrs, type_t *type, - unsigned int *offset_in_memory, unsigned int *offset_in_buffer, - unsigned int *typestring_offset) -{ - int written = 0; - - if ((is_ptr(type) && type_get_type(type_pointer_get_ref(type)) != TYPE_INTERFACE) || - (is_array(type) && type_array_is_decl_as_ptr(type))) - { - if (offset_in_memory && offset_in_buffer) - { - unsigned int memsize; - - /* pointer instance - * - * note that MSDN states that for pointer layouts in structures, - * this is a negative offset from the end of the structure, but - * this statement is incorrect. all offsets are positive */ - print_file(file, 2, "NdrFcShort(0x%hx),\t/* Memory offset = %d */\n", (unsigned short)*offset_in_memory, *offset_in_memory); - print_file(file, 2, "NdrFcShort(0x%hx),\t/* Buffer offset = %d */\n", (unsigned short)*offset_in_buffer, *offset_in_buffer); - - memsize = type_memsize(type); - *offset_in_memory += memsize; - /* increment these separately as in the case of conformant (varying) - * structures these start at different values */ - *offset_in_buffer += memsize; - } - *typestring_offset += 4; - - if (is_ptr(type)) - { - type_t *ref = type_pointer_get_ref(type); - - if (is_string_type(attrs, type)) - write_string_tfs(file, attrs, type, TYPE_CONTEXT_CONTAINER, NULL, typestring_offset); - else if (processed(ref)) - write_nonsimple_pointer(file, attrs, type, TYPE_CONTEXT_CONTAINER, - ref->typestring_offset, typestring_offset); - else if (type_get_type(ref) == TYPE_BASIC || type_get_type(ref) == TYPE_ENUM) - *typestring_offset += write_simple_pointer(file, attrs, type, TYPE_CONTEXT_CONTAINER); - else - error("write_pointer_description_offsets: type format string unknown\n"); - } - else - { - unsigned int offset = type->typestring_offset; - /* skip over the pointer that is written for strings, since a - * pointer has to be written in-place here */ - if (is_string_type(attrs, type)) - offset += 4; - write_nonsimple_pointer(file, attrs, type, TYPE_CONTEXT_CONTAINER, offset, typestring_offset); - } - - return 1; - } - - if (is_array(type)) - { - return write_pointer_description_offsets( - file, attrs, type_array_get_element(type), offset_in_memory, - offset_in_buffer, typestring_offset); - } - else if (is_non_complex_struct(type)) - { - /* otherwise search for interesting fields to parse */ - const var_t *v; - LIST_FOR_EACH_ENTRY( v, type_struct_get_fields(type), const var_t, entry ) - { - if (offset_in_memory && offset_in_buffer) - { - unsigned int padding; - unsigned int align = 0; - type_memsize_and_alignment(v->type, &align); - padding = ROUNDING(*offset_in_memory, align); - *offset_in_memory += padding; - *offset_in_buffer += padding; - } - written += write_pointer_description_offsets( - file, v->attrs, v->type, offset_in_memory, offset_in_buffer, - typestring_offset); - } - } - else - { - if (offset_in_memory && offset_in_buffer) - { - unsigned int memsize = type_memsize(type); - *offset_in_memory += memsize; - /* increment these separately as in the case of conformant (varying) - * structures these start at different values */ - *offset_in_buffer += memsize; - } - } - - return written; -} - -static int write_no_repeat_pointer_descriptions( - FILE *file, const attr_list_t *attrs, type_t *type, - unsigned int *offset_in_memory, unsigned int *offset_in_buffer, - unsigned int *typestring_offset) -{ - int written = 0; - - if (is_ptr(type) || - (is_conformant_array(type) && type_array_is_decl_as_ptr(type))) - { - print_file(file, 2, "0x%02x, /* FC_NO_REPEAT */\n", RPC_FC_NO_REPEAT); - print_file(file, 2, "0x%02x, /* FC_PAD */\n", RPC_FC_PAD); - *typestring_offset += 2; - - return write_pointer_description_offsets(file, attrs, type, - offset_in_memory, offset_in_buffer, typestring_offset); - } - - if (is_non_complex_struct(type)) - { - const var_t *v; - LIST_FOR_EACH_ENTRY( v, type_struct_get_fields(type), const var_t, entry ) - { - if (offset_in_memory && offset_in_buffer) - { - unsigned int padding; - unsigned int align = 0; - type_memsize_and_alignment(v->type, &align); - padding = ROUNDING(*offset_in_memory, align); - *offset_in_memory += padding; - *offset_in_buffer += padding; - } - written += write_no_repeat_pointer_descriptions( - file, v->attrs, v->type, - offset_in_memory, offset_in_buffer, typestring_offset); - } - } - else - { - unsigned int memsize = type_memsize(type); - *offset_in_memory += memsize; - /* increment these separately as in the case of conformant (varying) - * structures these start at different values */ - *offset_in_buffer += memsize; - } - - return written; -} - -/* Note: if file is NULL return value is number of pointers to write, else - * it is the number of type format characters written */ -static int write_fixed_array_pointer_descriptions( - FILE *file, const attr_list_t *attrs, type_t *type, - unsigned int *offset_in_memory, unsigned int *offset_in_buffer, - unsigned int *typestring_offset) -{ - int pointer_count = 0; - - if (type_get_type(type) == TYPE_ARRAY && - !type_array_has_conformance(type) && !type_array_has_variance(type)) - { - unsigned int temp = 0; - /* unfortunately, this needs to be done in two passes to avoid - * writing out redundant FC_FIXED_REPEAT descriptions */ - pointer_count = write_pointer_description_offsets( - NULL, attrs, type_array_get_element(type), NULL, NULL, &temp); - if (pointer_count > 0) - { - unsigned int increment_size; - unsigned int offset_of_array_pointer_mem = 0; - unsigned int offset_of_array_pointer_buf = 0; - - increment_size = type_memsize(type_array_get_element(type)); - - print_file(file, 2, "0x%02x, /* FC_FIXED_REPEAT */\n", RPC_FC_FIXED_REPEAT); - print_file(file, 2, "0x%02x, /* FC_PAD */\n", RPC_FC_PAD); - print_file(file, 2, "NdrFcShort(0x%hx),\t/* Iterations = %d */\n", (unsigned short)type_array_get_dim(type), type_array_get_dim(type)); - print_file(file, 2, "NdrFcShort(0x%hx),\t/* Increment = %d */\n", (unsigned short)increment_size, increment_size); - print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset to array = %d */\n", (unsigned short)*offset_in_memory, *offset_in_memory); - print_file(file, 2, "NdrFcShort(0x%hx),\t/* Number of pointers = %d */\n", (unsigned short)pointer_count, pointer_count); - *typestring_offset += 10; - - pointer_count = write_pointer_description_offsets( - file, attrs, type, &offset_of_array_pointer_mem, - &offset_of_array_pointer_buf, typestring_offset); - } - } - else if (type_get_type(type) == TYPE_STRUCT) - { - const var_t *v; - LIST_FOR_EACH_ENTRY( v, type_struct_get_fields(type), const var_t, entry ) - { - if (offset_in_memory && offset_in_buffer) - { - unsigned int padding; - unsigned int align = 0; - type_memsize_and_alignment(v->type, &align); - padding = ROUNDING(*offset_in_memory, align); - *offset_in_memory += padding; - *offset_in_buffer += padding; - } - pointer_count += write_fixed_array_pointer_descriptions( - file, v->attrs, v->type, offset_in_memory, offset_in_buffer, - typestring_offset); - } - } - else - { - if (offset_in_memory && offset_in_buffer) - { - unsigned int memsize; - memsize = type_memsize(type); - *offset_in_memory += memsize; - /* increment these separately as in the case of conformant (varying) - * structures these start at different values */ - *offset_in_buffer += memsize; - } - } - - return pointer_count; -} - -/* Note: if file is NULL return value is number of pointers to write, else - * it is the number of type format characters written */ -static int write_conformant_array_pointer_descriptions( - FILE *file, const attr_list_t *attrs, type_t *type, - unsigned int offset_in_memory, unsigned int *typestring_offset) -{ - int pointer_count = 0; - - if (is_conformant_array(type) && !type_array_has_variance(type)) - { - unsigned int temp = 0; - /* unfortunately, this needs to be done in two passes to avoid - * writing out redundant FC_VARIABLE_REPEAT descriptions */ - pointer_count = write_pointer_description_offsets( - NULL, attrs, type_array_get_element(type), NULL, NULL, &temp); - if (pointer_count > 0) - { - unsigned int increment_size; - unsigned int offset_of_array_pointer_mem = offset_in_memory; - unsigned int offset_of_array_pointer_buf = offset_in_memory; - - increment_size = type_memsize(type_array_get_element(type)); - - if (increment_size > USHRT_MAX) - error("array size of %u bytes is too large\n", increment_size); - - print_file(file, 2, "0x%02x, /* FC_VARIABLE_REPEAT */\n", RPC_FC_VARIABLE_REPEAT); - print_file(file, 2, "0x%02x, /* FC_FIXED_OFFSET */\n", RPC_FC_FIXED_OFFSET); - print_file(file, 2, "NdrFcShort(0x%hx),\t/* Increment = %d */\n", (unsigned short)increment_size, increment_size); - print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset to array = %d */\n", (unsigned short)offset_in_memory, offset_in_memory); - print_file(file, 2, "NdrFcShort(0x%hx),\t/* Number of pointers = %d */\n", (unsigned short)pointer_count, pointer_count); - *typestring_offset += 8; - - pointer_count = write_pointer_description_offsets( - file, attrs, type_array_get_element(type), - &offset_of_array_pointer_mem, &offset_of_array_pointer_buf, - typestring_offset); - } - } - - return pointer_count; -} - -/* Note: if file is NULL return value is number of pointers to write, else - * it is the number of type format characters written */ -static int write_varying_array_pointer_descriptions( - FILE *file, const attr_list_t *attrs, type_t *type, - unsigned int *offset_in_memory, unsigned int *offset_in_buffer, - unsigned int *typestring_offset) -{ - int pointer_count = 0; - - if (is_array(type) && type_array_has_variance(type)) - { - unsigned int temp = 0; - /* unfortunately, this needs to be done in two passes to avoid - * writing out redundant FC_VARIABLE_REPEAT descriptions */ - pointer_count = write_pointer_description_offsets( - NULL, attrs, type_array_get_element(type), NULL, NULL, &temp); - if (pointer_count > 0) - { - unsigned int increment_size; - - increment_size = type_memsize(type_array_get_element(type)); - - if (increment_size > USHRT_MAX) - error("array size of %u bytes is too large\n", increment_size); - - print_file(file, 2, "0x%02x, /* FC_VARIABLE_REPEAT */\n", RPC_FC_VARIABLE_REPEAT); - print_file(file, 2, "0x%02x, /* FC_VARIABLE_OFFSET */\n", RPC_FC_VARIABLE_OFFSET); - print_file(file, 2, "NdrFcShort(0x%hx),\t/* Increment = %d */\n", (unsigned short)increment_size, increment_size); - print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset to array = %d */\n", (unsigned short)*offset_in_memory, *offset_in_memory); - print_file(file, 2, "NdrFcShort(0x%hx),\t/* Number of pointers = %d */\n", (unsigned short)pointer_count, pointer_count); - *typestring_offset += 8; - - pointer_count = write_pointer_description_offsets( - file, attrs, type_array_get_element(type), offset_in_memory, - offset_in_buffer, typestring_offset); - } - } - else if (type_get_type(type) == TYPE_STRUCT) - { - const var_t *v; - LIST_FOR_EACH_ENTRY( v, type_struct_get_fields(type), const var_t, entry ) - { - if (offset_in_memory && offset_in_buffer) - { - unsigned int align = 0, padding; - - if (is_array(v->type) && type_array_has_variance(v->type)) - { - *offset_in_buffer = ROUND_SIZE(*offset_in_buffer, 4); - /* skip over variance and offset in buffer */ - *offset_in_buffer += 8; - } - - type_memsize_and_alignment(v->type, &align); - padding = ROUNDING(*offset_in_memory, align); - *offset_in_memory += padding; - *offset_in_buffer += padding; - } - pointer_count += write_varying_array_pointer_descriptions( - file, v->attrs, v->type, offset_in_memory, offset_in_buffer, - typestring_offset); - } - } - else - { - if (offset_in_memory && offset_in_buffer) - { - unsigned int memsize = type_memsize(type); - *offset_in_memory += memsize; - /* increment these separately as in the case of conformant (varying) - * structures these start at different values */ - *offset_in_buffer += memsize; - } - } - - return pointer_count; -} - -static void write_pointer_description(FILE *file, type_t *type, - unsigned int *typestring_offset) -{ - unsigned int offset_in_buffer; - unsigned int offset_in_memory; - - /* pass 1: search for single instance of a pointer (i.e. don't descend - * into arrays) */ - if (!is_array(type)) - { - offset_in_memory = 0; - offset_in_buffer = 0; - write_no_repeat_pointer_descriptions( - file, NULL, type, - &offset_in_memory, &offset_in_buffer, typestring_offset); - } - - /* pass 2: search for pointers in fixed arrays */ - offset_in_memory = 0; - offset_in_buffer = 0; - write_fixed_array_pointer_descriptions( - file, NULL, type, - &offset_in_memory, &offset_in_buffer, typestring_offset); - - /* pass 3: search for pointers in conformant only arrays (but don't descend - * into conformant varying or varying arrays) */ - if (is_conformant_array(type) && - (type_array_is_decl_as_ptr(type) || !current_structure)) - write_conformant_array_pointer_descriptions( - file, NULL, type, 0, typestring_offset); - else if (type_get_type(type) == TYPE_STRUCT && - get_struct_fc(type) == RPC_FC_CPSTRUCT) - { - type_t *carray = find_array_or_string_in_struct(type)->type; - write_conformant_array_pointer_descriptions( file, NULL, carray, - type_memsize(type), typestring_offset); - } - - /* pass 4: search for pointers in varying arrays */ - offset_in_memory = 0; - offset_in_buffer = 0; - write_varying_array_pointer_descriptions( - file, NULL, type, - &offset_in_memory, &offset_in_buffer, typestring_offset); -} - -int is_declptr(const type_t *t) -{ - return is_ptr(t) || (type_get_type(t) == TYPE_ARRAY && type_array_is_decl_as_ptr(t)); -} - -static unsigned int write_string_tfs(FILE *file, const attr_list_t *attrs, - type_t *type, enum type_context context, - const char *name, unsigned int *typestring_offset) -{ - unsigned int start_offset; - unsigned char rtype; - type_t *elem_type; - int is_processed = processed(type); - - start_offset = *typestring_offset; - - if (is_declptr(type)) - { - unsigned char flag = is_conformant_array(type) ? 0 : RPC_FC_P_SIMPLEPOINTER; - int pointer_type = get_pointer_fc_context(type, attrs, context); - if (!pointer_type) - pointer_type = RPC_FC_RP; - print_start_tfs_comment(file, type, *typestring_offset); - print_file(file, 2,"0x%x, 0x%x,\t/* %s%s */\n", - pointer_type, flag, string_of_type(pointer_type), - flag ? " [simple_pointer]" : ""); - *typestring_offset += 2; - if (!flag) - { - print_file(file, 2, "NdrFcShort(0x2),\n"); - *typestring_offset += 2; - } - is_processed = FALSE; - } - - if (is_array(type)) - elem_type = type_array_get_element(type); - else - elem_type = type_pointer_get_ref(type); - - if (type_get_type(elem_type) != TYPE_BASIC) - { - error("write_string_tfs: Unimplemented for non-basic type %s\n", name); - return start_offset; - } - - rtype = get_basic_fc(elem_type); - if ((rtype != RPC_FC_BYTE) && (rtype != RPC_FC_CHAR) && (rtype != RPC_FC_WCHAR)) - { - error("write_string_tfs: Unimplemented for type 0x%x of name: %s\n", rtype, name); - return start_offset; - } - - if (type_get_type(type) == TYPE_ARRAY && !type_array_has_conformance(type)) - { - unsigned int dim = type_array_get_dim(type); - - if (is_processed) return start_offset; - - /* FIXME: multi-dimensional array */ - if (0xffffu < dim) - error("array size for parameter %s exceeds %u bytes by %u bytes\n", - name, 0xffffu, dim - 0xffffu); - - if (rtype == RPC_FC_WCHAR) - WRITE_FCTYPE(file, FC_WSTRING, *typestring_offset); - else - WRITE_FCTYPE(file, FC_CSTRING, *typestring_offset); - print_file(file, 2, "0x%x, /* FC_PAD */\n", RPC_FC_PAD); - *typestring_offset += 2; - - print_file(file, 2, "NdrFcShort(0x%hx),\t/* %d */\n", (unsigned short)dim, dim); - *typestring_offset += 2; - - update_tfsoff(type, start_offset, file); - return start_offset; - } - else if (is_conformant_array(type)) - { - if (rtype == RPC_FC_WCHAR) - WRITE_FCTYPE(file, FC_C_WSTRING, *typestring_offset); - else - WRITE_FCTYPE(file, FC_C_CSTRING, *typestring_offset); - print_file(file, 2, "0x%x, /* FC_STRING_SIZED */\n", RPC_FC_STRING_SIZED); - *typestring_offset += 2; - - *typestring_offset += write_conf_or_var_desc( - file, current_structure, - (!type_array_is_decl_as_ptr(type) && current_structure - ? type_memsize(current_structure) - : 0), - type, type_array_get_conformance(type)); - - update_tfsoff(type, start_offset, file); - return start_offset; - } - else - { - if (is_processed) return start_offset; - - if (rtype == RPC_FC_WCHAR) - WRITE_FCTYPE(file, FC_C_WSTRING, *typestring_offset); - else - WRITE_FCTYPE(file, FC_C_CSTRING, *typestring_offset); - print_file(file, 2, "0x%x, /* FC_PAD */\n", RPC_FC_PAD); - *typestring_offset += 2; - - update_tfsoff(type, start_offset, file); - return start_offset; - } -} - -static unsigned int write_array_tfs(FILE *file, const attr_list_t *attrs, type_t *type, - const char *name, unsigned int *typestring_offset) -{ - const expr_t *length_is = type_array_get_variance(type); - const expr_t *size_is = type_array_get_conformance(type); - unsigned int align; - unsigned int size; - unsigned int start_offset; - unsigned char fc; - int pointer_type = get_attrv(attrs, ATTR_POINTERTYPE); - unsigned int baseoff - = !type_array_is_decl_as_ptr(type) && current_structure - ? type_memsize(current_structure) - : 0; - - if (!pointer_type) - pointer_type = RPC_FC_RP; - - write_embedded_types(file, attrs, type_array_get_element(type), name, FALSE, typestring_offset); - - size = type_memsize(is_conformant_array(type) ? type_array_get_element(type) : type); - align = type_buffer_alignment(is_conformant_array(type) ? type_array_get_element(type) : type); - fc = get_array_fc(type); - - start_offset = *typestring_offset; - update_tfsoff(type, start_offset, file); - print_start_tfs_comment(file, type, start_offset); - print_file(file, 2, "0x%02x,\t/* %s */\n", fc, string_of_type(fc)); - print_file(file, 2, "0x%x,\t/* %d */\n", align - 1, align - 1); - *typestring_offset += 2; - - align = 0; - if (fc != RPC_FC_BOGUS_ARRAY) - { - if (fc == RPC_FC_LGFARRAY || fc == RPC_FC_LGVARRAY) - { - print_file(file, 2, "NdrFcLong(0x%x),\t/* %u */\n", size, size); - *typestring_offset += 4; - } - else - { - print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", (unsigned short)size, size); - *typestring_offset += 2; - } - - if (is_conformant_array(type)) - *typestring_offset - += write_conf_or_var_desc(file, current_structure, baseoff, - type, size_is); - - if (fc == RPC_FC_SMVARRAY || fc == RPC_FC_LGVARRAY) - { - unsigned int elsize = type_memsize(type_array_get_element(type)); - unsigned int dim = type_array_get_dim(type); - - if (fc == RPC_FC_LGVARRAY) - { - print_file(file, 2, "NdrFcLong(0x%x),\t/* %u */\n", dim, dim); - *typestring_offset += 4; - } - else - { - print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", (unsigned short)dim, dim); - *typestring_offset += 2; - } - - print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", (unsigned short)elsize, elsize); - *typestring_offset += 2; - } - - if (length_is) - *typestring_offset - += write_conf_or_var_desc(file, current_structure, baseoff, - type, length_is); - - if (type_has_pointers(type_array_get_element(type)) && - (type_array_is_decl_as_ptr(type) || !current_structure)) - { - print_file(file, 2, "0x%x, /* FC_PP */\n", RPC_FC_PP); - print_file(file, 2, "0x%x, /* FC_PAD */\n", RPC_FC_PAD); - *typestring_offset += 2; - write_pointer_description(file, type, typestring_offset); - print_file(file, 2, "0x%x, /* FC_END */\n", RPC_FC_END); - *typestring_offset += 1; - } - - write_array_element_type(file, type, FALSE, typestring_offset); - write_end(file, typestring_offset); - } - else - { - unsigned int dim = size_is ? 0 : type_array_get_dim(type); - print_file(file, 2, "NdrFcShort(0x%hx),\t/* %u */\n", (unsigned short)dim, dim); - *typestring_offset += 2; - *typestring_offset - += write_conf_or_var_desc(file, current_structure, baseoff, - type, size_is); - *typestring_offset - += write_conf_or_var_desc(file, current_structure, baseoff, - type, length_is); - - write_array_element_type(file, type, TRUE, typestring_offset); - write_end(file, typestring_offset); - } - - return start_offset; -} - -static const var_t *find_array_or_string_in_struct(const type_t *type) -{ - const var_list_t *fields = type_struct_get_fields(type); - const var_t *last_field; - const type_t *ft; - - if (!fields || list_empty(fields)) - return NULL; - - last_field = LIST_ENTRY( list_tail(fields), const var_t, entry ); - ft = last_field->type; - - if (is_conformant_array(ft) && !type_array_is_decl_as_ptr(ft)) - return last_field; - - if (type_get_type(ft) == TYPE_STRUCT) - return find_array_or_string_in_struct(ft); - else - return NULL; -} - -static void write_struct_members(FILE *file, const type_t *type, - int is_complex, unsigned int *corroff, - unsigned int *typestring_offset) -{ - const var_t *field; - unsigned short offset = 0; - unsigned int salign = 1; - int padding; - var_list_t *fields = type_struct_get_fields(type); - - if (fields) LIST_FOR_EACH_ENTRY( field, fields, const var_t, entry ) - { - type_t *ft = field->type; - unsigned int align = 0; - unsigned int size = type_memsize_and_alignment(ft, &align); - align = clamp_align(align); - if (salign < align) salign = align; - - if (!is_conformant_array(ft) || type_array_is_decl_as_ptr(ft)) - { - if ((align - 1) & offset) - { - unsigned char fc = 0; - switch (align) - { - case 2: - fc = RPC_FC_ALIGNM2; - break; - case 4: - fc = RPC_FC_ALIGNM4; - break; - case 8: - fc = RPC_FC_ALIGNM8; - break; - default: - error("write_struct_members: cannot align type %d\n", type_get_type(ft)); - } - print_file(file, 2, "0x%x,\t/* %s */\n", fc, string_of_type(fc)); - offset = ROUND_SIZE(offset, align); - *typestring_offset += 1; - } - write_member_type(file, type, is_complex, field->attrs, field->type, corroff, - typestring_offset); - offset += size; - } - } - - padding = ROUNDING(offset, salign); - if (padding) - { - print_file(file, 2, "0x%x,\t/* FC_STRUCTPAD%d */\n", - RPC_FC_STRUCTPAD1 + padding - 1, - padding); - *typestring_offset += 1; - } - - write_end(file, typestring_offset); -} - -static unsigned int write_struct_tfs(FILE *file, type_t *type, - const char *name, unsigned int *tfsoff) -{ - const type_t *save_current_structure = current_structure; - unsigned int total_size; - const var_t *array; - unsigned int start_offset; - unsigned int align; - unsigned int corroff; - var_t *f; - unsigned char fc = get_struct_fc(type); - var_list_t *fields = type_struct_get_fields(type); - - if (processed(type)) return type->typestring_offset; - - guard_rec(type); - current_structure = type; - - total_size = type_memsize(type); - align = type_buffer_alignment(type); - if (total_size > USHRT_MAX) - error("structure size for %s exceeds %d bytes by %d bytes\n", - name, USHRT_MAX, total_size - USHRT_MAX); - - if (fields) LIST_FOR_EACH_ENTRY(f, fields, var_t, entry) - write_embedded_types(file, f->attrs, f->type, f->name, FALSE, tfsoff); - - array = find_array_or_string_in_struct(type); - if (array && !processed(array->type)) - { - if(is_string_type(array->attrs, array->type)) - write_string_tfs(file, array->attrs, array->type, TYPE_CONTEXT_CONTAINER, array->name, tfsoff); - else - write_array_tfs(file, array->attrs, array->type, array->name, tfsoff); - } - - corroff = *tfsoff; - write_descriptors(file, type, tfsoff); - - start_offset = *tfsoff; - update_tfsoff(type, start_offset, file); - print_start_tfs_comment(file, type, start_offset); - print_file(file, 2, "0x%x,\t/* %s */\n", fc, string_of_type(fc)); - print_file(file, 2, "0x%x,\t/* %d */\n", align - 1, align - 1); - print_file(file, 2, "NdrFcShort(0x%hx),\t/* %d */\n", (unsigned short)total_size, total_size); - *tfsoff += 4; - - if (array) - { - unsigned int absoff = array->type->typestring_offset; - short reloff = absoff - *tfsoff; - print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset= %hd (%u) */\n", - reloff, reloff, absoff); - *tfsoff += 2; - } - else if (fc == RPC_FC_BOGUS_STRUCT) - { - print_file(file, 2, "NdrFcShort(0x0),\n"); - *tfsoff += 2; - } - - if (fc == RPC_FC_BOGUS_STRUCT) - { - /* On the sizing pass, type->ptrdesc may be zero, but it's ok as - nothing is written to file yet. On the actual writing pass, - this will have been updated. */ - unsigned int absoff = type->ptrdesc ? type->ptrdesc : *tfsoff; - int reloff = absoff - *tfsoff; - assert( reloff >= 0 ); - print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset= %d (%u) */\n", - (unsigned short)reloff, reloff, absoff); - *tfsoff += 2; - } - else if ((fc == RPC_FC_PSTRUCT) || - (fc == RPC_FC_CPSTRUCT) || - (fc == RPC_FC_CVSTRUCT && type_has_pointers(type))) - { - print_file(file, 2, "0x%x, /* FC_PP */\n", RPC_FC_PP); - print_file(file, 2, "0x%x, /* FC_PAD */\n", RPC_FC_PAD); - *tfsoff += 2; - write_pointer_description(file, type, tfsoff); - print_file(file, 2, "0x%x, /* FC_END */\n", RPC_FC_END); - *tfsoff += 1; - } - - write_struct_members(file, type, fc == RPC_FC_BOGUS_STRUCT, &corroff, - tfsoff); - - if (fc == RPC_FC_BOGUS_STRUCT) - { - const var_t *f; - - type->ptrdesc = *tfsoff; - if (fields) LIST_FOR_EACH_ENTRY(f, fields, const var_t, entry) - { - type_t *ft = f->type; - switch (typegen_detect_type(ft, f->attrs, TDT_IGNORE_STRINGS)) - { - case TGT_POINTER: - if (is_string_type(f->attrs, ft)) - write_string_tfs(file, f->attrs, ft, TYPE_CONTEXT_CONTAINER, f->name, tfsoff); - else - write_pointer_tfs(file, f->attrs, ft, - type_pointer_get_ref(ft)->typestring_offset, - TYPE_CONTEXT_CONTAINER, tfsoff); - break; - case TGT_ARRAY: - if (type_array_is_decl_as_ptr(ft)) - { - unsigned int offset; - - print_file(file, 0, "/* %d */\n", *tfsoff); - - offset = ft->typestring_offset; - /* skip over the pointer that is written for strings, since a - * pointer has to be written in-place here */ - if (is_string_type(f->attrs, ft)) - offset += 4; - write_nonsimple_pointer(file, f->attrs, ft, TYPE_CONTEXT_CONTAINER, offset, tfsoff); - } - break; - default: - break; - } - } - if (type->ptrdesc == *tfsoff) - type->ptrdesc = 0; - } - - current_structure = save_current_structure; - return start_offset; -} - -static void write_branch_type(FILE *file, const type_t *t, unsigned int *tfsoff) -{ - if (t == NULL) - { - print_file(file, 2, "NdrFcShort(0x0),\t/* No type */\n"); - } - else - { - if (type_get_type(t) == TYPE_BASIC || type_get_type(t) == TYPE_ENUM) - { - unsigned char fc; - if (type_get_type(t) == TYPE_BASIC) - fc = get_basic_fc(t); - else - fc = get_enum_fc(t); - print_file(file, 2, "NdrFcShort(0x80%02x),\t/* Simple arm type: %s */\n", - fc, string_of_type(fc)); - } - else if (t->typestring_offset) - { - short reloff = t->typestring_offset - *tfsoff; - print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset= %d (%d) */\n", - reloff, reloff, t->typestring_offset); - } - else - error("write_branch_type: type unimplemented %d\n", type_get_type(t)); - } - - *tfsoff += 2; -} - -static unsigned int write_union_tfs(FILE *file, const attr_list_t *attrs, - type_t *type, unsigned int *tfsoff) -{ - unsigned int start_offset; - unsigned int size; - var_list_t *fields; - unsigned int nbranch = 0; - type_t *deftype = NULL; - short nodeftype = 0xffff; - var_t *f; - - if (processed(type) && - (type_get_type(type) == TYPE_ENCAPSULATED_UNION || !is_attr(type->attrs, ATTR_SWITCHTYPE))) - return type->typestring_offset; - - guard_rec(type); - - size = type_memsize(type); - - fields = type_union_get_cases(type); - - if (fields) LIST_FOR_EACH_ENTRY(f, fields, var_t, entry) - { - expr_list_t *cases = get_attrp(f->attrs, ATTR_CASE); - if (cases) - nbranch += list_count(cases); - if (f->type) - write_embedded_types(file, f->attrs, f->type, f->name, TRUE, tfsoff); - } - - start_offset = *tfsoff; - update_tfsoff(type, start_offset, file); - print_start_tfs_comment(file, type, start_offset); - if (type_get_type(type) == TYPE_ENCAPSULATED_UNION) - { - const var_t *sv = type_union_get_switch_value(type); - const type_t *st = sv->type; - unsigned char fc; - - if (type_get_type(st) == TYPE_BASIC) - { - fc = get_basic_fc(st); - switch (fc) - { - case RPC_FC_CHAR: - case RPC_FC_SMALL: - case RPC_FC_BYTE: - case RPC_FC_USMALL: - case RPC_FC_WCHAR: - case RPC_FC_SHORT: - case RPC_FC_USHORT: - case RPC_FC_LONG: - case RPC_FC_ULONG: - break; - default: - fc = 0; - error("union switch type must be an integer, char, or enum\n"); - } - } - else if (type_get_type(st) == TYPE_ENUM) - fc = get_enum_fc(st); - else - error("union switch type must be an integer, char, or enum\n"); - - print_file(file, 2, "0x%x,\t/* FC_ENCAPSULATED_UNION */\n", RPC_FC_ENCAPSULATED_UNION); - print_file(file, 2, "0x%x,\t/* Switch type= %s */\n", - 0x40 | fc, string_of_type(fc)); - *tfsoff += 2; - } - else if (is_attr(type->attrs, ATTR_SWITCHTYPE)) - { - const expr_t *switch_is = get_attrp(attrs, ATTR_SWITCHIS); - const type_t *st = get_attrp(type->attrs, ATTR_SWITCHTYPE); - unsigned char fc; - - if (type_get_type(st) == TYPE_BASIC) - { - fc = get_basic_fc(st); - switch (fc) - { - case RPC_FC_CHAR: - case RPC_FC_SMALL: - case RPC_FC_USMALL: - case RPC_FC_SHORT: - case RPC_FC_USHORT: - case RPC_FC_LONG: - case RPC_FC_ULONG: - case RPC_FC_ENUM16: - case RPC_FC_ENUM32: - break; - default: - fc = 0; - error("union switch type must be an integer, char, or enum\n"); - } - } - else if (type_get_type(st) == TYPE_ENUM) - fc = get_enum_fc(st); - else - error("union switch type must be an integer, char, or enum\n"); - - print_file(file, 2, "0x%x,\t/* FC_NON_ENCAPSULATED_UNION */\n", RPC_FC_NON_ENCAPSULATED_UNION); - print_file(file, 2, "0x%x,\t/* Switch type= %s */\n", - fc, string_of_type(fc)); - *tfsoff += 2; - *tfsoff += write_conf_or_var_desc(file, current_structure, 0, st, switch_is ); - print_file(file, 2, "NdrFcShort(0x2),\t/* Offset= 2 (%u) */\n", *tfsoff + 2); - *tfsoff += 2; - print_file(file, 0, "/* %u */\n", *tfsoff); - } - - print_file(file, 2, "NdrFcShort(0x%hx),\t/* %d */\n", (unsigned short)size, size); - print_file(file, 2, "NdrFcShort(0x%hx),\t/* %d */\n", (unsigned short)nbranch, nbranch); - *tfsoff += 4; - - if (fields) LIST_FOR_EACH_ENTRY(f, fields, var_t, entry) - { - type_t *ft = f->type; - expr_list_t *cases = get_attrp(f->attrs, ATTR_CASE); - int deflt = is_attr(f->attrs, ATTR_DEFAULT); - expr_t *c; - - if (cases == NULL && !deflt) - error("union field %s with neither case nor default attribute\n", f->name); - - if (cases) LIST_FOR_EACH_ENTRY(c, cases, expr_t, entry) - { - /* MIDL doesn't check for duplicate cases, even though that seems - like a reasonable thing to do, it just dumps them to the TFS - like we're going to do here. */ - print_file(file, 2, "NdrFcLong(0x%x),\t/* %d */\n", c->cval, c->cval); - *tfsoff += 4; - write_branch_type(file, ft, tfsoff); - } - - /* MIDL allows multiple default branches, even though that seems - illogical, it just chooses the last one, which is what we will - do. */ - if (deflt) - { - deftype = ft; - nodeftype = 0; - } - } - - if (deftype) - { - write_branch_type(file, deftype, tfsoff); - } - else - { - print_file(file, 2, "NdrFcShort(0x%hx),\n", nodeftype); - *tfsoff += 2; - } - - return start_offset; -} - -static unsigned int write_ip_tfs(FILE *file, const attr_list_t *attrs, type_t *type, - unsigned int *typeformat_offset) -{ - unsigned int i; - unsigned int start_offset = *typeformat_offset; - expr_t *iid = get_attrp(attrs, ATTR_IIDIS); - - if (!iid && processed(type)) return type->typestring_offset; - - print_start_tfs_comment(file, type, start_offset); - update_tfsoff(type, start_offset, file); - - if (iid) - { - print_file(file, 2, "0x2f, /* FC_IP */\n"); - print_file(file, 2, "0x5c, /* FC_PAD */\n"); - *typeformat_offset - += write_conf_or_var_desc(file, current_structure, 0, type, iid) + 2; - } - else - { - const type_t *base = is_ptr(type) ? type_pointer_get_ref(type) : type; - const UUID *uuid = get_attrp(base->attrs, ATTR_UUID); - - if (! uuid) - error("%s: interface %s missing UUID\n", __FUNCTION__, base->name); - - print_file(file, 2, "0x2f,\t/* FC_IP */\n"); - print_file(file, 2, "0x5a,\t/* FC_CONSTANT_IID */\n"); - print_file(file, 2, "NdrFcLong(0x%08x),\n", uuid->Data1); - print_file(file, 2, "NdrFcShort(0x%04x),\n", uuid->Data2); - print_file(file, 2, "NdrFcShort(0x%04x),\n", uuid->Data3); - for (i = 0; i < 8; ++i) - print_file(file, 2, "0x%02x,\n", uuid->Data4[i]); - - if (file) - fprintf(file, "\n"); - - *typeformat_offset += 18; - } - return start_offset; -} - -static unsigned int write_contexthandle_tfs(FILE *file, - const attr_list_t *attrs, - type_t *type, - int toplevel_param, - unsigned int *typeformat_offset) -{ - unsigned int start_offset = *typeformat_offset; - unsigned char flags = get_contexthandle_flags( current_iface, attrs, type ); - - print_start_tfs_comment(file, type, start_offset); - - if (flags & 0x80) /* via ptr */ - { - int pointer_type = get_pointer_fc( type, attrs, toplevel_param ); - if (!pointer_type) pointer_type = RPC_FC_RP; - *typeformat_offset += 4; - print_file(file, 2,"0x%x, 0x0,\t/* %s */\n", pointer_type, string_of_type(pointer_type) ); - print_file(file, 2, "NdrFcShort(0x2),\t /* Offset= 2 (%u) */\n", *typeformat_offset); - print_file(file, 0, "/* %2u */\n", *typeformat_offset); - } - - print_file(file, 2, "0x%02x,\t/* FC_BIND_CONTEXT */\n", RPC_FC_BIND_CONTEXT); - print_file(file, 2, "0x%x,\t/* Context flags: ", flags); - /* return and can't be null values overlap */ - if (((flags & 0x21) != 0x21) && (flags & NDR_CONTEXT_HANDLE_CANNOT_BE_NULL)) - print_file(file, 0, "can't be null, "); - if (flags & NDR_CONTEXT_HANDLE_SERIALIZE) - print_file(file, 0, "serialize, "); - if (flags & NDR_CONTEXT_HANDLE_NO_SERIALIZE) - print_file(file, 0, "no serialize, "); - if (flags & NDR_STRICT_CONTEXT_HANDLE) - print_file(file, 0, "strict, "); - if ((flags & 0x21) == 0x20) - print_file(file, 0, "out, "); - if ((flags & 0x21) == 0x21) - print_file(file, 0, "return, "); - if (flags & 0x40) - print_file(file, 0, "in, "); - if (flags & 0x80) - print_file(file, 0, "via ptr, "); - print_file(file, 0, "*/\n"); - print_file(file, 2, "0x%x,\t/* rundown routine */\n", get_context_handle_offset( type )); - print_file(file, 2, "0, /* FIXME: param num */\n"); - *typeformat_offset += 4; - - update_tfsoff( type, start_offset, file ); - return start_offset; -} - -static unsigned int write_range_tfs(FILE *file, const attr_list_t *attrs, - type_t *type, expr_list_t *range_list, - unsigned int *typeformat_offset) -{ - unsigned char fc; - unsigned int start_offset = *typeformat_offset; - const expr_t *range_min = LIST_ENTRY(list_head(range_list), const expr_t, entry); - const expr_t *range_max = LIST_ENTRY(list_next(range_list, list_head(range_list)), const expr_t, entry); - - if (type_get_type(type) == TYPE_BASIC) - fc = get_basic_fc(type); - else - fc = get_enum_fc(type); - - /* fc must fit in lower 4-bits of 8-bit field below */ - assert(fc <= 0xf); - - print_file(file, 0, "/* %u */\n", *typeformat_offset); - print_file(file, 2, "0x%x,\t/* FC_RANGE */\n", RPC_FC_RANGE); - print_file(file, 2, "0x%x,\t/* %s */\n", fc, string_of_type(fc)); - print_file(file, 2, "NdrFcLong(0x%x),\t/* %u */\n", range_min->cval, range_min->cval); - print_file(file, 2, "NdrFcLong(0x%x),\t/* %u */\n", range_max->cval, range_max->cval); - update_tfsoff( type, start_offset, file ); - *typeformat_offset += 10; - - return start_offset; -} - -static unsigned int write_type_tfs(FILE *file, int indent, - const attr_list_t *attrs, type_t *type, - const char *name, - enum type_context context, - unsigned int *typeformat_offset) -{ - unsigned int offset; - - switch (typegen_detect_type(type, attrs, TDT_ALL_TYPES)) - { - case TGT_CTXT_HANDLE: - case TGT_CTXT_HANDLE_POINTER: - return write_contexthandle_tfs(file, attrs, type, - context == TYPE_CONTEXT_TOPLEVELPARAM, typeformat_offset); - case TGT_USER_TYPE: - return write_user_tfs(file, type, typeformat_offset); - case TGT_STRING: - return write_string_tfs(file, attrs, type, context, name, typeformat_offset); - case TGT_ARRAY: - { - unsigned int off; - /* conformant and pointer arrays are handled specially */ - if ((context != TYPE_CONTEXT_CONTAINER && - context != TYPE_CONTEXT_CONTAINER_NO_POINTERS) || - !is_conformant_array(type) || type_array_is_decl_as_ptr(type)) - off = write_array_tfs(file, attrs, type, name, typeformat_offset); - else - off = 0; - if (context != TYPE_CONTEXT_CONTAINER && - context != TYPE_CONTEXT_CONTAINER_NO_POINTERS) - { - int ptr_type; - ptr_type = get_pointer_fc(type, attrs, - context == TYPE_CONTEXT_TOPLEVELPARAM); - if (ptr_type != RPC_FC_RP || type_array_is_decl_as_ptr(type)) - { - unsigned int absoff = type->typestring_offset; - short reloff = absoff - (*typeformat_offset + 2); - off = *typeformat_offset; - print_file(file, 0, "/* %d */\n", off); - print_file(file, 2, "0x%x, 0x0,\t/* %s */\n", ptr_type, - string_of_type(ptr_type)); - print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset= %hd (%u) */\n", - reloff, reloff, absoff); - if (ptr_type != RPC_FC_RP) update_tfsoff( type, off, file ); - *typeformat_offset += 4; - } - type->details.array.ptr_tfsoff = off; - } - return off; - } - case TGT_STRUCT: - return write_struct_tfs(file, type, name, typeformat_offset); - case TGT_UNION: - return write_union_tfs(file, attrs, type, typeformat_offset); - case TGT_ENUM: - case TGT_BASIC: - /* nothing to do */ - return 0; - case TGT_RANGE: - { - expr_list_t *range_list = get_attrp(attrs, ATTR_RANGE); - if (!range_list) - range_list = get_aliaschain_attrp(type, ATTR_RANGE); - return write_range_tfs(file, attrs, type, range_list, typeformat_offset); - } - case TGT_IFACE_POINTER: - return write_ip_tfs(file, attrs, type, typeformat_offset); - case TGT_POINTER: - { - enum type_context ref_context; - if (context == TYPE_CONTEXT_TOPLEVELPARAM) - ref_context = TYPE_CONTEXT_PARAM; - else if (context == TYPE_CONTEXT_CONTAINER_NO_POINTERS) - ref_context = TYPE_CONTEXT_CONTAINER; - else - ref_context = context; - offset = write_type_tfs( file, indent, attrs, type_pointer_get_ref(type), name, - ref_context, typeformat_offset); - if (context == TYPE_CONTEXT_CONTAINER_NO_POINTERS) - return 0; - return write_pointer_tfs(file, attrs, type, offset, context, typeformat_offset); - } - case TGT_INVALID: - break; - } - error("invalid type %s for var %s\n", type->name, name); - return 0; -} - -static int write_embedded_types(FILE *file, const attr_list_t *attrs, type_t *type, - const char *name, int write_ptr, unsigned int *tfsoff) -{ - return write_type_tfs(file, 2, attrs, type, name, write_ptr ? TYPE_CONTEXT_CONTAINER : TYPE_CONTEXT_CONTAINER_NO_POINTERS, tfsoff); -} - -static unsigned int process_tfs_stmts(FILE *file, const statement_list_t *stmts, - type_pred_t pred, unsigned int *typeformat_offset) -{ - const var_t *var; - const statement_t *stmt; - - if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) - { - const type_t *iface; - const statement_t *stmt_func; - - if (stmt->type == STMT_LIBRARY) - { - process_tfs_stmts(file, stmt->u.lib->stmts, pred, typeformat_offset); - continue; - } - else if (stmt->type != STMT_TYPE || type_get_type(stmt->u.type) != TYPE_INTERFACE) - continue; - - iface = stmt->u.type; - if (!pred(iface)) - continue; - - current_iface = iface; - STATEMENTS_FOR_EACH_FUNC( stmt_func, type_iface_get_stmts(iface) ) - { - const var_t *func = stmt_func->u.var; - current_func = func; - if (is_local(func->attrs)) continue; - - if (!is_void(type_function_get_rettype(func->type))) - { - write_type_tfs( file, 2, func->attrs, type_function_get_rettype(func->type), - func->name, TYPE_CONTEXT_PARAM, typeformat_offset); - } - - if (type_get_function_args(func->type)) - LIST_FOR_EACH_ENTRY( var, type_get_function_args(func->type), const var_t, entry ) - write_type_tfs( file, 2, var->attrs, var->type, var->name, - TYPE_CONTEXT_TOPLEVELPARAM, typeformat_offset ); - } - } - - return *typeformat_offset + 1; -} - -static unsigned int process_tfs(FILE *file, const statement_list_t *stmts, type_pred_t pred) -{ - unsigned int typeformat_offset = 2; - - return process_tfs_stmts(file, stmts, pred, &typeformat_offset); -} - - -void write_typeformatstring(FILE *file, const statement_list_t *stmts, type_pred_t pred) -{ - int indent = 0; - - print_file(file, indent, "static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =\n"); - print_file(file, indent, "{\n"); - indent++; - print_file(file, indent, "0,\n"); - print_file(file, indent, "{\n"); - indent++; - print_file(file, indent, "NdrFcShort(0x0),\n"); - - set_all_tfswrite(TRUE); - process_tfs(file, stmts, pred); - - print_file(file, indent, "0x0\n"); - indent--; - print_file(file, indent, "}\n"); - indent--; - print_file(file, indent, "};\n"); - print_file(file, indent, "\n"); -} - -static unsigned int get_required_buffer_size_type( - const type_t *type, const char *name, const attr_list_t *attrs, int toplevel_param, unsigned int *alignment) -{ - *alignment = 0; - switch (typegen_detect_type(type, NULL, TDT_IGNORE_RANGES)) - { - case TGT_USER_TYPE: - { - const char *uname; - const type_t *utype = get_user_type(type, &uname); - return get_required_buffer_size_type(utype, uname, NULL, FALSE, alignment); - } - case TGT_BASIC: - switch (get_basic_fc(type)) - { - case RPC_FC_BYTE: - case RPC_FC_CHAR: - case RPC_FC_USMALL: - case RPC_FC_SMALL: - *alignment = 4; - return 1; - - case RPC_FC_WCHAR: - case RPC_FC_USHORT: - case RPC_FC_SHORT: - *alignment = 4; - return 2; - - case RPC_FC_ULONG: - case RPC_FC_LONG: - case RPC_FC_FLOAT: - case RPC_FC_ERROR_STATUS_T: - *alignment = 4; - return 4; - - case RPC_FC_HYPER: - case RPC_FC_DOUBLE: - *alignment = 8; - return 8; - - case RPC_FC_INT3264: - case RPC_FC_UINT3264: - assert( pointer_size ); - *alignment = pointer_size; - return pointer_size; - - case RPC_FC_IGNORE: - case RPC_FC_BIND_PRIMITIVE: - return 0; - - default: - error("get_required_buffer_size: unknown basic type 0x%02x\n", - get_basic_fc(type)); - return 0; - } - break; - - case TGT_ENUM: - switch (get_enum_fc(type)) - { - case RPC_FC_ENUM32: - *alignment = 4; - return 4; - case RPC_FC_ENUM16: - *alignment = 4; - return 2; - } - break; - - case TGT_STRUCT: - if (get_struct_fc(type) == RPC_FC_STRUCT) - { - if (!type_struct_get_fields(type)) return 0; - return fields_memsize(type_struct_get_fields(type), alignment); - } - break; - - case TGT_POINTER: - { - unsigned int size, align; - const type_t *ref = type_pointer_get_ref(type); - if (is_string_type( attrs, ref )) break; - if (!(size = get_required_buffer_size_type( ref, name, NULL, FALSE, &align ))) break; - if (get_pointer_fc(type, attrs, toplevel_param) != RPC_FC_RP) - { - size += 4 + align; - align = 4; - } - *alignment = align; - return size; - } - - case TGT_ARRAY: - if (get_pointer_fc(type, attrs, toplevel_param) == RPC_FC_RP) - { - switch (get_array_fc(type)) - { - case RPC_FC_SMFARRAY: - case RPC_FC_LGFARRAY: - return type_array_get_dim(type) * - get_required_buffer_size_type(type_array_get_element(type), name, - NULL, FALSE, alignment); - } - } - break; - - default: - break; - } - return 0; -} - -static unsigned int get_required_buffer_size(const var_t *var, unsigned int *alignment, enum pass pass) -{ - int in_attr = is_attr(var->attrs, ATTR_IN); - int out_attr = is_attr(var->attrs, ATTR_OUT); - - if (!in_attr && !out_attr) - in_attr = 1; - - *alignment = 0; - - if ((pass == PASS_IN && in_attr) || (pass == PASS_OUT && out_attr) || - pass == PASS_RETURN) - { - if (is_ptrchain_attr(var, ATTR_CONTEXTHANDLE)) - { - *alignment = 4; - return 20; - } - - if (!is_string_type(var->attrs, var->type)) - return get_required_buffer_size_type(var->type, var->name, - var->attrs, TRUE, alignment); - } - return 0; -} - -static unsigned int get_function_buffer_size( const var_t *func, enum pass pass ) -{ - const var_t *var; - unsigned int total_size = 0, alignment; - - if (type_get_function_args(func->type)) - { - LIST_FOR_EACH_ENTRY( var, type_get_function_args(func->type), const var_t, entry ) - { - total_size += get_required_buffer_size(var, &alignment, pass); - total_size += alignment; - } - } - - if (pass == PASS_OUT && !is_void(type_function_get_rettype(func->type))) - { - var_t v = *func; - v.type = type_function_get_rettype(func->type); - total_size += get_required_buffer_size(&v, &alignment, PASS_RETURN); - total_size += alignment; - } - return total_size; -} - -static void print_phase_function(FILE *file, int indent, const char *type, - const char *local_var_prefix, enum remoting_phase phase, - const var_t *var, unsigned int type_offset) -{ - const char *function; - switch (phase) - { - case PHASE_BUFFERSIZE: - function = "BufferSize"; - break; - case PHASE_MARSHAL: - function = "Marshall"; - break; - case PHASE_UNMARSHAL: - function = "Unmarshall"; - break; - case PHASE_FREE: - function = "Free"; - break; - default: - assert(0); - return; - } - - print_file(file, indent, "Ndr%s%s(\n", type, function); - indent++; - print_file(file, indent, "&__frame->_StubMsg,\n"); - print_file(file, indent, "%s%s%s%s%s,\n", - (phase == PHASE_UNMARSHAL) ? "(unsigned char **)" : "(unsigned char *)", - (phase == PHASE_UNMARSHAL || decl_indirect(var->type)) ? "&" : "", - local_var_prefix, - (phase == PHASE_UNMARSHAL && decl_indirect(var->type)) ? "_p_" : "", - var->name); - print_file(file, indent, "(PFORMAT_STRING)&__MIDL_TypeFormatString.Format[%d]%s\n", - type_offset, (phase == PHASE_UNMARSHAL) ? "," : ");"); - if (phase == PHASE_UNMARSHAL) - print_file(file, indent, "0);\n"); - indent--; -} - -void print_phase_basetype(FILE *file, int indent, const char *local_var_prefix, - enum remoting_phase phase, enum pass pass, const var_t *var, - const char *varname) -{ - type_t *type = var->type; - unsigned int alignment = 0; - - /* no work to do for other phases, buffer sizing is done elsewhere */ - if (phase != PHASE_MARSHAL && phase != PHASE_UNMARSHAL) - return; - - if (type_get_type(type) == TYPE_ENUM || - (type_get_type(type) == TYPE_BASIC && - type_basic_get_type(type) == TYPE_BASIC_INT3264 && - pointer_size != 4)) - { - unsigned char fc; - - if (type_get_type(type) == TYPE_ENUM) - fc = get_enum_fc(type); - else - fc = get_basic_fc(type); - - if (phase == PHASE_MARSHAL) - print_file(file, indent, "NdrSimpleTypeMarshall(\n"); - else - print_file(file, indent, "NdrSimpleTypeUnmarshall(\n"); - print_file(file, indent+1, "&__frame->_StubMsg,\n"); - print_file(file, indent+1, "(unsigned char *)&%s%s,\n", - local_var_prefix, - var->name); - print_file(file, indent+1, "0x%02x /* %s */);\n", fc, string_of_type(fc)); - } - else - { - const type_t *ref = is_ptr(type) ? type_pointer_get_ref(type) : type; - switch (get_basic_fc(ref)) - { - case RPC_FC_BYTE: - case RPC_FC_CHAR: - case RPC_FC_SMALL: - case RPC_FC_USMALL: - alignment = 1; - break; - - case RPC_FC_WCHAR: - case RPC_FC_USHORT: - case RPC_FC_SHORT: - alignment = 2; - break; - - case RPC_FC_ULONG: - case RPC_FC_LONG: - case RPC_FC_FLOAT: - case RPC_FC_ERROR_STATUS_T: - /* pointer_size must be 4 if we got here in these two cases */ - case RPC_FC_INT3264: - case RPC_FC_UINT3264: - alignment = 4; - break; - - case RPC_FC_HYPER: - case RPC_FC_DOUBLE: - alignment = 8; - break; - - case RPC_FC_IGNORE: - case RPC_FC_BIND_PRIMITIVE: - /* no marshalling needed */ - return; - - default: - error("print_phase_basetype: Unsupported type: %s (0x%02x, ptr_level: 0)\n", - var->name, get_basic_fc(ref)); - } - - if (phase == PHASE_MARSHAL && alignment > 1) - print_file(file, indent, "MIDL_memset(__frame->_StubMsg.Buffer, 0, (0x%x - (ULONG_PTR)__frame->_StubMsg.Buffer) & 0x%x);\n", alignment, alignment - 1); - print_file(file, indent, "__frame->_StubMsg.Buffer = (unsigned char *)(((ULONG_PTR)__frame->_StubMsg.Buffer + %u) & ~0x%x);\n", - alignment - 1, alignment - 1); - - if (phase == PHASE_MARSHAL) - { - print_file(file, indent, "*("); - write_type_decl(file, is_ptr(type) ? type_pointer_get_ref(type) : type, NULL); - if (is_ptr(type)) - fprintf(file, " *)__frame->_StubMsg.Buffer = *"); - else - fprintf(file, " *)__frame->_StubMsg.Buffer = "); - fprintf(file, "%s%s", local_var_prefix, varname); - fprintf(file, ";\n"); - } - else if (phase == PHASE_UNMARSHAL) - { - print_file(file, indent, "if (__frame->_StubMsg.Buffer + sizeof("); - write_type_decl(file, is_ptr(type) ? type_pointer_get_ref(type) : type, NULL); - fprintf(file, ") > __frame->_StubMsg.BufferEnd)\n"); - print_file(file, indent, "{\n"); - print_file(file, indent + 1, "RpcRaiseException(RPC_X_BAD_STUB_DATA);\n"); - print_file(file, indent, "}\n"); - print_file(file, indent, "%s%s%s", - (pass == PASS_IN || pass == PASS_RETURN) ? "" : "*", - local_var_prefix, varname); - if (pass == PASS_IN && is_ptr(type)) - fprintf(file, " = ("); - else - fprintf(file, " = *("); - write_type_decl(file, is_ptr(type) ? type_pointer_get_ref(type) : type, NULL); - fprintf(file, " *)__frame->_StubMsg.Buffer;\n"); - } - - print_file(file, indent, "__frame->_StubMsg.Buffer += sizeof("); - write_type_decl(file, is_ptr(type) ? type_pointer_get_ref(type) : type, NULL); - fprintf(file, ");\n"); - } -} - -/* returns whether the MaxCount, Offset or ActualCount members need to be - * filled in for the specified phase */ -static inline int is_conformance_needed_for_phase(enum remoting_phase phase) -{ - return (phase != PHASE_UNMARSHAL); -} - -expr_t *get_size_is_expr(const type_t *t, const char *name) -{ - expr_t *x = NULL; - - for ( ; is_array(t); t = type_array_get_element(t)) - if (type_array_has_conformance(t) && - type_array_get_conformance(t)->type != EXPR_VOID) - { - if (!x) - x = type_array_get_conformance(t); - else - error("%s: multidimensional conformant" - " arrays not supported at the top level\n", - name); - } - - return x; -} - -void write_parameter_conf_or_var_exprs(FILE *file, int indent, const char *local_var_prefix, - enum remoting_phase phase, const var_t *var, int valid_variance) -{ - const type_t *type = var->type; - /* get fundamental type for the argument */ - for (;;) - { - switch (typegen_detect_type(type, var->attrs, TDT_IGNORE_STRINGS|TDT_IGNORE_RANGES)) - { - case TGT_ARRAY: - if (is_conformance_needed_for_phase(phase)) - { - if (type_array_has_conformance(type) && - type_array_get_conformance(type)->type != EXPR_VOID) - { - print_file(file, indent, "__frame->_StubMsg.MaxCount = (ULONG_PTR)"); - write_expr(file, type_array_get_conformance(type), 1, 1, NULL, NULL, local_var_prefix); - fprintf(file, ";\n\n"); - } - if (type_array_has_variance(type)) - { - print_file(file, indent, "__frame->_StubMsg.Offset = 0;\n"); /* FIXME */ - if (valid_variance) - { - print_file(file, indent, "__frame->_StubMsg.ActualCount = (ULONG_PTR)"); - write_expr(file, type_array_get_variance(type), 1, 1, NULL, NULL, local_var_prefix); - fprintf(file, ";\n\n"); - } - else - print_file(file, indent, "__frame->_StubMsg.ActualCount = __frame->_StubMsg.MaxCount;\n\n"); - } - } - break; - case TGT_UNION: - if (type_get_type(type) == TYPE_UNION && - is_conformance_needed_for_phase(phase)) - { - print_file(file, indent, "__frame->_StubMsg.MaxCount = (ULONG_PTR)"); - write_expr(file, get_attrp(var->attrs, ATTR_SWITCHIS), 1, 1, NULL, NULL, local_var_prefix); - fprintf(file, ";\n\n"); - } - break; - case TGT_IFACE_POINTER: - { - expr_t *iid; - - if (is_conformance_needed_for_phase(phase) && (iid = get_attrp( var->attrs, ATTR_IIDIS ))) - { - print_file( file, indent, "__frame->_StubMsg.MaxCount = (ULONG_PTR) " ); - write_expr( file, iid, 1, 1, NULL, NULL, local_var_prefix ); - fprintf( file, ";\n\n" ); - } - break; - } - case TGT_POINTER: - type = type_pointer_get_ref(type); - continue; - case TGT_INVALID: - case TGT_USER_TYPE: - case TGT_CTXT_HANDLE: - case TGT_CTXT_HANDLE_POINTER: - case TGT_STRING: - case TGT_BASIC: - case TGT_ENUM: - case TGT_STRUCT: - case TGT_RANGE: - break; - } - break; - } -} - -static void write_remoting_arg(FILE *file, int indent, const var_t *func, const char *local_var_prefix, - enum pass pass, enum remoting_phase phase, const var_t *var) -{ - int in_attr, out_attr, pointer_type; - const char *type_str = NULL; - const type_t *type = var->type; - unsigned int alignment, start_offset = type->typestring_offset; - - if (is_ptr(type) || is_array(type)) - pointer_type = get_pointer_fc(type, var->attrs, pass != PASS_RETURN); - else - pointer_type = 0; - - in_attr = is_attr(var->attrs, ATTR_IN); - out_attr = is_attr(var->attrs, ATTR_OUT); - if (!in_attr && !out_attr) - in_attr = 1; - - if (phase != PHASE_FREE) - switch (pass) - { - case PASS_IN: - if (!in_attr) return; - break; - case PASS_OUT: - if (!out_attr) return; - break; - case PASS_RETURN: - break; - } - - if (phase == PHASE_BUFFERSIZE && get_required_buffer_size( var, &alignment, pass )) return; - - write_parameter_conf_or_var_exprs(file, indent, local_var_prefix, phase, var, TRUE); - - switch (typegen_detect_type(type, var->attrs, TDT_ALL_TYPES)) - { - case TGT_CTXT_HANDLE: - case TGT_CTXT_HANDLE_POINTER: - if (phase == PHASE_MARSHAL) - { - if (pass == PASS_IN) - { - /* if the context_handle attribute appears in the chain of types - * without pointers being followed, then the context handle must - * be direct, otherwise it is a pointer */ - int is_ch_ptr = is_aliaschain_attr(type, ATTR_CONTEXTHANDLE) ? FALSE : TRUE; - print_file(file, indent, "NdrClientContextMarshall(\n"); - print_file(file, indent + 1, "&__frame->_StubMsg,\n"); - print_file(file, indent + 1, "(NDR_CCONTEXT)%s%s%s,\n", is_ch_ptr ? "*" : "", local_var_prefix, var->name); - print_file(file, indent + 1, "%s);\n", in_attr && out_attr ? "1" : "0"); - } - else - { - print_file(file, indent, "NdrServerContextNewMarshall(\n"); - print_file(file, indent + 1, "&__frame->_StubMsg,\n"); - print_file(file, indent + 1, "(NDR_SCONTEXT)%s%s,\n", local_var_prefix, var->name); - print_file(file, indent + 1, "(NDR_RUNDOWN)%s_rundown,\n", get_context_handle_type_name(var->type)); - print_file(file, indent + 1, "(PFORMAT_STRING)&__MIDL_TypeFormatString.Format[%d]);\n", start_offset); - } - } - else if (phase == PHASE_UNMARSHAL) - { - if (pass == PASS_OUT) - { - if (!in_attr) - print_file(file, indent, "*%s%s = 0;\n", local_var_prefix, var->name); - print_file(file, indent, "NdrClientContextUnmarshall(\n"); - print_file(file, indent + 1, "&__frame->_StubMsg,\n"); - print_file(file, indent + 1, "(NDR_CCONTEXT *)%s%s,\n", local_var_prefix, var->name); - print_file(file, indent + 1, "__frame->_Handle);\n"); - } - else - { - print_file(file, indent, "%s%s = NdrServerContextNewUnmarshall(\n", local_var_prefix, var->name); - print_file(file, indent + 1, "&__frame->_StubMsg,\n"); - print_file(file, indent + 1, "(PFORMAT_STRING)&__MIDL_TypeFormatString.Format[%d]);\n", start_offset); - } - } - break; - case TGT_USER_TYPE: - print_phase_function(file, indent, "UserMarshal", local_var_prefix, phase, var, start_offset); - break; - case TGT_STRING: - if (phase == PHASE_FREE || pass == PASS_RETURN || - pointer_type != RPC_FC_RP) - { - /* strings returned are assumed to be global and hence don't - * need freeing */ - if (is_declptr(type) && !(phase == PHASE_FREE && pass == PASS_RETURN)) - print_phase_function(file, indent, "Pointer", local_var_prefix, - phase, var, start_offset); - else if (pointer_type == RPC_FC_RP && phase == PHASE_FREE && - !in_attr && is_conformant_array(type)) - { - print_file(file, indent, "if (%s%s)\n", local_var_prefix, var->name); - indent++; - print_file(file, indent, "__frame->_StubMsg.pfnFree(%s%s);\n", local_var_prefix, var->name); - } - } - else - { - unsigned int real_start_offset = start_offset; - /* skip over pointer description straight to string description */ - if (is_declptr(type)) - { - if (is_conformant_array(type)) - real_start_offset += 4; - else - real_start_offset += 2; - } - if (is_array(type) && !is_conformant_array(type)) - print_phase_function(file, indent, "NonConformantString", - local_var_prefix, phase, var, - real_start_offset); - else - print_phase_function(file, indent, "ConformantString", local_var_prefix, - phase, var, real_start_offset); - } - break; - case TGT_ARRAY: - { - unsigned char tc = get_array_fc(type); - const char *array_type = NULL; - - /* We already have the size_is expression since it's at the - top level, but do checks for multidimensional conformant - arrays. When we handle them, we'll need to extend this - function to return a list, and then we'll actually use - the return value. */ - get_size_is_expr(type, var->name); - - switch (tc) - { - case RPC_FC_SMFARRAY: - case RPC_FC_LGFARRAY: - array_type = "FixedArray"; - break; - case RPC_FC_SMVARRAY: - case RPC_FC_LGVARRAY: - array_type = "VaryingArray"; - break; - case RPC_FC_CARRAY: - array_type = "ConformantArray"; - break; - case RPC_FC_CVARRAY: - array_type = "ConformantVaryingArray"; - break; - case RPC_FC_BOGUS_ARRAY: - array_type = "ComplexArray"; - break; - } - - if (pointer_type != RPC_FC_RP) array_type = "Pointer"; - - if (phase == PHASE_FREE && pointer_type == RPC_FC_RP) - { - /* these are all unmarshalled by allocating memory */ - if (tc == RPC_FC_BOGUS_ARRAY || - tc == RPC_FC_CVARRAY || - ((tc == RPC_FC_SMVARRAY || tc == RPC_FC_LGVARRAY) && in_attr) || - (tc == RPC_FC_CARRAY && !in_attr)) - { - if (type_array_is_decl_as_ptr(type) && type->details.array.ptr_tfsoff) - { - print_phase_function(file, indent, "Pointer", local_var_prefix, phase, var, - type->details.array.ptr_tfsoff); - break; - } - print_phase_function(file, indent, array_type, local_var_prefix, phase, var, start_offset); - print_file(file, indent, "if (%s%s)\n", local_var_prefix, var->name); - indent++; - print_file(file, indent, "__frame->_StubMsg.pfnFree(%s%s);\n", local_var_prefix, var->name); - break; - } - } - print_phase_function(file, indent, array_type, local_var_prefix, phase, var, start_offset); - break; - } - case TGT_BASIC: - print_phase_basetype(file, indent, local_var_prefix, phase, pass, var, var->name); - break; - case TGT_ENUM: - print_phase_basetype(file, indent, local_var_prefix, phase, pass, var, var->name); - break; - case TGT_RANGE: - print_phase_basetype(file, indent, local_var_prefix, phase, pass, var, var->name); - /* Note: this goes beyond what MIDL does - it only supports arguments - * with the [range] attribute in Oicf mode */ - if (phase == PHASE_UNMARSHAL) - { - const expr_t *range_min; - const expr_t *range_max; - expr_list_t *range_list = get_attrp(var->attrs, ATTR_RANGE); - if (!range_list) - range_list = get_aliaschain_attrp(type, ATTR_RANGE); - range_min = LIST_ENTRY(list_head(range_list), const expr_t, entry); - range_max = LIST_ENTRY(list_next(range_list, list_head(range_list)), const expr_t, entry); - - print_file(file, indent, "if ((%s%s < (", local_var_prefix, var->name); - write_type_decl(file, var->type, NULL); - fprintf(file, ")0x%x) || (%s%s > (", range_min->cval, local_var_prefix, var->name); - write_type_decl(file, var->type, NULL); - fprintf(file, ")0x%x))\n", range_max->cval); - print_file(file, indent, "{\n"); - print_file(file, indent+1, "RpcRaiseException(RPC_S_INVALID_BOUND);\n"); - print_file(file, indent, "}\n"); - } - break; - case TGT_STRUCT: - switch (get_struct_fc(type)) - { - case RPC_FC_STRUCT: - if (phase == PHASE_MARSHAL || phase == PHASE_UNMARSHAL) - print_phase_function(file, indent, "SimpleStruct", local_var_prefix, phase, var, start_offset); - break; - case RPC_FC_PSTRUCT: - print_phase_function(file, indent, "SimpleStruct", local_var_prefix, phase, var, start_offset); - break; - case RPC_FC_CSTRUCT: - case RPC_FC_CPSTRUCT: - print_phase_function(file, indent, "ConformantStruct", local_var_prefix, phase, var, start_offset); - break; - case RPC_FC_CVSTRUCT: - print_phase_function(file, indent, "ConformantVaryingStruct", local_var_prefix, phase, var, start_offset); - break; - case RPC_FC_BOGUS_STRUCT: - print_phase_function(file, indent, "ComplexStruct", local_var_prefix, phase, var, start_offset); - break; - default: - error("write_remoting_arguments: Unsupported type: %s (0x%02x)\n", var->name, get_struct_fc(type)); - } - break; - case TGT_UNION: - { - const char *union_type = NULL; - - if (type_get_type(type) == TYPE_UNION) - union_type = "NonEncapsulatedUnion"; - else if (type_get_type(type) == TYPE_ENCAPSULATED_UNION) - union_type = "EncapsulatedUnion"; - - print_phase_function(file, indent, union_type, local_var_prefix, - phase, var, start_offset); - break; - } - case TGT_POINTER: - { - const type_t *ref = type_pointer_get_ref(type); - if (pointer_type == RPC_FC_RP) switch (typegen_detect_type(ref, NULL, TDT_ALL_TYPES)) - { - case TGT_BASIC: - print_phase_basetype(file, indent, local_var_prefix, phase, pass, var, var->name); - break; - case TGT_ENUM: - /* base types have known sizes, so don't need a sizing pass - * and don't have any memory to free and so don't need a - * freeing pass */ - if (phase == PHASE_MARSHAL || phase == PHASE_UNMARSHAL) - print_phase_function(file, indent, "Pointer", local_var_prefix, phase, var, start_offset); - break; - case TGT_STRUCT: - switch (get_struct_fc(ref)) - { - case RPC_FC_STRUCT: - /* simple structs have known sizes, so don't need a sizing - * pass and don't have any memory to free and so don't - * need a freeing pass */ - if (phase == PHASE_MARSHAL || phase == PHASE_UNMARSHAL) - type_str = "SimpleStruct"; - else if (phase == PHASE_FREE && pass == PASS_RETURN) - { - print_file(file, indent, "if (%s%s)\n", local_var_prefix, var->name); - indent++; - print_file(file, indent, "__frame->_StubMsg.pfnFree(%s%s);\n", local_var_prefix, var->name); - indent--; - } - break; - case RPC_FC_PSTRUCT: - type_str = "SimpleStruct"; - break; - case RPC_FC_CSTRUCT: - case RPC_FC_CPSTRUCT: - type_str = "ConformantStruct"; - break; - case RPC_FC_CVSTRUCT: - type_str = "ConformantVaryingStruct"; - break; - case RPC_FC_BOGUS_STRUCT: - type_str = "ComplexStruct"; - break; - default: - error("write_remoting_arguments: Unsupported type: %s (0x%02x)\n", var->name, get_struct_fc(ref)); - } - - if (type_str) - { - if (phase == PHASE_FREE) - type_str = "Pointer"; - else - start_offset = ref->typestring_offset; - print_phase_function(file, indent, type_str, local_var_prefix, phase, var, start_offset); - } - break; - case TGT_UNION: - if (phase == PHASE_FREE) - type_str = "Pointer"; - else - { - if (type_get_type(ref) == TYPE_UNION) - type_str = "NonEncapsulatedUnion"; - else if (type_get_type(ref) == TYPE_ENCAPSULATED_UNION) - type_str = "EncapsulatedUnion"; - - start_offset = ref->typestring_offset; - } - - print_phase_function(file, indent, type_str, local_var_prefix, - phase, var, start_offset); - break; - case TGT_USER_TYPE: - if (phase != PHASE_FREE) - { - type_str = "UserMarshal"; - start_offset = ref->typestring_offset; - } - else type_str = "Pointer"; - - print_phase_function(file, indent, type_str, local_var_prefix, phase, var, start_offset); - break; - case TGT_STRING: - case TGT_POINTER: - case TGT_ARRAY: - case TGT_RANGE: - case TGT_IFACE_POINTER: - case TGT_CTXT_HANDLE: - case TGT_CTXT_HANDLE_POINTER: - print_phase_function(file, indent, "Pointer", local_var_prefix, phase, var, start_offset); - break; - case TGT_INVALID: - assert(0); - break; - } - else - print_phase_function(file, indent, "Pointer", local_var_prefix, phase, var, start_offset); - break; - } - case TGT_IFACE_POINTER: - print_phase_function(file, indent, "InterfacePointer", local_var_prefix, phase, var, start_offset); - break; - case TGT_INVALID: - assert(0); - break; - } - fprintf(file, "\n"); -} - -void write_remoting_arguments(FILE *file, int indent, const var_t *func, const char *local_var_prefix, - enum pass pass, enum remoting_phase phase) -{ - if (phase == PHASE_BUFFERSIZE && pass != PASS_RETURN) - { - unsigned int size = get_function_buffer_size( func, pass ); - print_file(file, indent, "__frame->_StubMsg.BufferLength = %u;\n", size); - } - - if (pass == PASS_RETURN) - { - var_t var; - var = *func; - var.type = type_function_get_rettype(func->type); - var.name = xstrdup( "_RetVal" ); - write_remoting_arg( file, indent, func, local_var_prefix, pass, phase, &var ); - free( var.name ); - } - else - { - const var_t *var; - if (!type_get_function_args(func->type)) - return; - LIST_FOR_EACH_ENTRY( var, type_get_function_args(func->type), const var_t, entry ) - write_remoting_arg( file, indent, func, local_var_prefix, pass, phase, var ); - } -} - - -unsigned int get_size_procformatstring_func(const type_t *iface, const var_t *func) -{ - unsigned int offset = 0; - write_procformatstring_func( NULL, 0, iface, func, &offset, 0 ); - return offset; -} - -unsigned int get_size_procformatstring(const statement_list_t *stmts, type_pred_t pred) -{ - const statement_t *stmt; - unsigned int size = 1; - - if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) - { - const type_t *iface; - const statement_t *stmt_func; - - if (stmt->type == STMT_LIBRARY) - { - size += get_size_procformatstring(stmt->u.lib->stmts, pred) - 1; - continue; - } - else if (stmt->type != STMT_TYPE || type_get_type(stmt->u.type) != TYPE_INTERFACE) - continue; - - iface = stmt->u.type; - if (!pred(iface)) - continue; - - STATEMENTS_FOR_EACH_FUNC( stmt_func, type_iface_get_stmts(iface) ) - { - const var_t *func = stmt_func->u.var; - if (!is_local(func->attrs)) - size += get_size_procformatstring_func( iface, func ); - } - } - return size; -} - -unsigned int get_size_typeformatstring(const statement_list_t *stmts, type_pred_t pred) -{ - set_all_tfswrite(FALSE); - return process_tfs(NULL, stmts, pred); -} - -void declare_stub_args( FILE *file, int indent, const var_t *func ) -{ - int in_attr, out_attr; - int i = 0; - const var_t *var; - - /* declare return value '_RetVal' */ - if (!is_void(type_function_get_rettype(func->type))) - { - print_file(file, indent, "%s", ""); - write_type_decl_left(file, type_function_get_rettype(func->type)); - fprintf(file, " _RetVal;\n"); - } - - if (!type_get_function_args(func->type)) - return; - - LIST_FOR_EACH_ENTRY( var, type_get_function_args(func->type), const var_t, entry ) - { - in_attr = is_attr(var->attrs, ATTR_IN); - out_attr = is_attr(var->attrs, ATTR_OUT); - if (!out_attr && !in_attr) - in_attr = 1; - - if (is_context_handle(var->type)) - print_file(file, indent, "NDR_SCONTEXT %s;\n", var->name); - else - { - if (!in_attr && !is_conformant_array(var->type)) - { - type_t *type_to_print; - char name[16]; - print_file(file, indent, "%s", ""); - if (type_get_type(var->type) == TYPE_ARRAY && - !type_array_is_decl_as_ptr(var->type)) - type_to_print = var->type; - else - type_to_print = type_pointer_get_ref(var->type); - sprintf(name, "_W%u", i++); - write_type_decl(file, type_to_print, name); - fprintf(file, ";\n"); - } - - print_file(file, indent, "%s", ""); - write_type_decl_left(file, var->type); - fprintf(file, " "); - if (type_get_type(var->type) == TYPE_ARRAY && - !type_array_is_decl_as_ptr(var->type)) { - fprintf(file, "(*%s)", var->name); - } else - fprintf(file, "%s", var->name); - write_type_right(file, var->type, FALSE); - fprintf(file, ";\n"); - - if (decl_indirect(var->type)) - print_file(file, indent, "void *_p_%s;\n", var->name); - } - } -} - - -void assign_stub_out_args( FILE *file, int indent, const var_t *func, const char *local_var_prefix ) -{ - int in_attr, out_attr; - int i = 0, sep = 0; - const var_t *var; - - if (!type_get_function_args(func->type)) - return; - - LIST_FOR_EACH_ENTRY( var, type_get_function_args(func->type), const var_t, entry ) - { - in_attr = is_attr(var->attrs, ATTR_IN); - out_attr = is_attr(var->attrs, ATTR_OUT); - if (!out_attr && !in_attr) - in_attr = 1; - - if (!in_attr) - { - print_file(file, indent, "%s%s", local_var_prefix, var->name); - - switch (typegen_detect_type(var->type, var->attrs, TDT_IGNORE_STRINGS)) - { - case TGT_CTXT_HANDLE_POINTER: - fprintf(file, " = NdrContextHandleInitialize(\n"); - print_file(file, indent + 1, "&__frame->_StubMsg,\n"); - print_file(file, indent + 1, "(PFORMAT_STRING)&__MIDL_TypeFormatString.Format[%d]);\n", - var->type->typestring_offset); - break; - case TGT_ARRAY: - if (type_array_has_conformance(var->type)) - { - unsigned int size; - type_t *type; - - fprintf(file, " = NdrAllocate(&__frame->_StubMsg, "); - for (type = var->type; - is_array(type) && type_array_has_conformance(type); - type = type_array_get_element(type)) - { - write_expr(file, type_array_get_conformance(type), TRUE, - TRUE, NULL, NULL, local_var_prefix); - fprintf(file, " * "); - } - size = type_memsize(type); - fprintf(file, "%u);\n", size); - - print_file(file, indent, "memset(%s%s, 0, ", local_var_prefix, var->name); - for (type = var->type; - is_array(type) && type_array_has_conformance(type); - type = type_array_get_element(type)) - { - write_expr(file, type_array_get_conformance(type), TRUE, - TRUE, NULL, NULL, local_var_prefix); - fprintf(file, " * "); - } - size = type_memsize(type); - fprintf(file, "%u);\n", size); - } - else - fprintf(file, " = &%s_W%u;\n", local_var_prefix, i++); - break; - case TGT_POINTER: - fprintf(file, " = &%s_W%u;\n", local_var_prefix, i); - switch (typegen_detect_type(type_pointer_get_ref(var->type), var->attrs, TDT_IGNORE_STRINGS)) - { - case TGT_BASIC: - case TGT_ENUM: - case TGT_POINTER: - case TGT_RANGE: - case TGT_IFACE_POINTER: - print_file(file, indent, "%s_W%u = 0;\n", local_var_prefix, i); - break; - case TGT_USER_TYPE: - print_file(file, indent, "memset(&%s_W%u, 0, sizeof(%s_W%u));\n", - local_var_prefix, i, local_var_prefix, i); - break; - case TGT_STRUCT: - case TGT_UNION: - case TGT_ARRAY: - case TGT_CTXT_HANDLE: - case TGT_CTXT_HANDLE_POINTER: - case TGT_INVALID: - case TGT_STRING: - /* not initialised */ - break; - } - i++; - break; - default: - break; - } - - sep = 1; - } - } - if (sep) - fprintf(file, "\n"); -} - - -void write_func_param_struct( FILE *file, const type_t *iface, const type_t *func, - const char *var_decl, int add_retval ) -{ - type_t *rettype = type_function_get_rettype( func ); - const var_list_t *args = type_get_function_args( func ); - const var_t *arg; - int needs_packing; - unsigned int align = 0; - - if (args) - LIST_FOR_EACH_ENTRY( arg, args, const var_t, entry ) - if (!is_array( arg->type )) type_memsize_and_alignment( arg->type, &align ); - - needs_packing = (align > pointer_size); - - if (needs_packing) print_file( file, 0, "#include \n", pointer_size ); - print_file(file, 1, "struct _PARAM_STRUCT\n" ); - print_file(file, 1, "{\n" ); - if (is_object( iface )) print_file(file, 2, "%s *This;\n", iface->name ); - - if (args) LIST_FOR_EACH_ENTRY( arg, args, const var_t, entry ) - { - print_file(file, 2, "%s", ""); - write_type_left( file, (type_t *)arg->type, TRUE ); - if (needs_space_after( arg->type )) fputc( ' ', file ); - if (is_array( arg->type ) && !type_array_is_decl_as_ptr( arg->type )) fputc( '*', file ); - - /* FIXME: should check for large args being passed by pointer */ - align = 0; - if (is_array( arg->type ) || is_ptr( arg->type )) align = pointer_size; - else type_memsize_and_alignment( arg->type, &align ); - - if (align >= pointer_size) - fprintf( file, "%s;\n", arg->name ); - else - fprintf( file, "%s DECLSPEC_ALIGN(%u);\n", arg->name, pointer_size ); - } - if (add_retval && !is_void( rettype )) - { - print_file(file, 2, "%s", ""); - write_type_decl( file, rettype, "_RetVal" ); - if (is_array( rettype ) || is_ptr( rettype ) || type_memsize( rettype ) == pointer_size) - fprintf( file, ";\n" ); - else - fprintf( file, " DECLSPEC_ALIGN(%u);\n", pointer_size ); - } - print_file(file, 1, "} %s;\n", var_decl ); - if (needs_packing) print_file( file, 0, "#include \n" ); - print_file( file, 0, "\n" ); -} - -void write_pointer_checks( FILE *file, int indent, const var_t *func ) -{ - const var_list_t *args = type_get_function_args( func->type ); - const var_t *var; - - if (!args) return; - - LIST_FOR_EACH_ENTRY( var, args, const var_t, entry ) - if (cant_be_null( var )) - print_file( file, indent, "if (!%s) RpcRaiseException(RPC_X_NULL_REF_POINTER);\n", var->name ); -} - -int write_expr_eval_routines(FILE *file, const char *iface) -{ - static const char *var_name = "pS"; - static const char *var_name_expr = "pS->"; - int result = 0; - struct expr_eval_routine *eval; - unsigned short callback_offset = 0; - - LIST_FOR_EACH_ENTRY(eval, &expr_eval_routines, struct expr_eval_routine, entry) - { - const char *name = eval->name; - result = 1; - - print_file(file, 0, "static void __RPC_USER %s_%sExprEval_%04u(PMIDL_STUB_MESSAGE pStubMsg)\n", - eval->iface ? eval->iface->name : iface, name, callback_offset); - print_file(file, 0, "{\n"); - if (type_get_type( eval->cont_type ) == TYPE_FUNCTION) - { - write_func_param_struct( file, eval->iface, eval->cont_type, - "*pS = (struct _PARAM_STRUCT *)pStubMsg->StackTop", FALSE ); - } - else - { - print_file(file, 1, "%s", ""); - write_type_left(file, (type_t *)eval->cont_type, TRUE); - fprintf(file, " *%s = (", var_name); - write_type_left(file, (type_t *)eval->cont_type, TRUE); - fprintf(file, " *)(pStubMsg->StackTop - %u);\n", eval->baseoff); - } - print_file(file, 1, "pStubMsg->Offset = 0;\n"); /* FIXME */ - print_file(file, 1, "pStubMsg->MaxCount = (ULONG_PTR)"); - write_expr(file, eval->expr, 1, 1, var_name_expr, eval->cont_type, ""); - fprintf(file, ";\n"); - print_file(file, 0, "}\n\n"); - callback_offset++; - } - return result; -} - -void write_expr_eval_routine_list(FILE *file, const char *iface) -{ - struct expr_eval_routine *eval; - struct expr_eval_routine *cursor; - unsigned short callback_offset = 0; - - fprintf(file, "static const EXPR_EVAL ExprEvalRoutines[] =\n"); - fprintf(file, "{\n"); - - LIST_FOR_EACH_ENTRY_SAFE(eval, cursor, &expr_eval_routines, struct expr_eval_routine, entry) - { - print_file(file, 1, "%s_%sExprEval_%04u,\n", - eval->iface ? eval->iface->name : iface, eval->name, callback_offset); - callback_offset++; - list_remove(&eval->entry); - free(eval->name); - free(eval); - } - - fprintf(file, "};\n\n"); -} - -void write_user_quad_list(FILE *file) -{ - user_type_t *ut; - - if (list_empty(&user_type_list)) - return; - - fprintf(file, "static const USER_MARSHAL_ROUTINE_QUADRUPLE UserMarshalRoutines[] =\n"); - fprintf(file, "{\n"); - LIST_FOR_EACH_ENTRY(ut, &user_type_list, user_type_t, entry) - { - const char *sep = &ut->entry == list_tail(&user_type_list) ? "" : ","; - print_file(file, 1, "{\n"); - print_file(file, 2, "(USER_MARSHAL_SIZING_ROUTINE)%s_UserSize,\n", ut->name); - print_file(file, 2, "(USER_MARSHAL_MARSHALLING_ROUTINE)%s_UserMarshal,\n", ut->name); - print_file(file, 2, "(USER_MARSHAL_UNMARSHALLING_ROUTINE)%s_UserUnmarshal,\n", ut->name); - print_file(file, 2, "(USER_MARSHAL_FREEING_ROUTINE)%s_UserFree\n", ut->name); - print_file(file, 1, "}%s\n", sep); - } - fprintf(file, "};\n\n"); -} - -void write_endpoints( FILE *f, const char *prefix, const str_list_t *list ) -{ - const struct str_list_entry_t *endpoint; - const char *p; - - /* this should be an array of RPC_PROTSEQ_ENDPOINT but we want const strings */ - print_file( f, 0, "static const unsigned char * const %s__RpcProtseqEndpoint[][2] =\n{\n", prefix ); - LIST_FOR_EACH_ENTRY( endpoint, list, const struct str_list_entry_t, entry ) - { - print_file( f, 1, "{ (const unsigned char *)\"" ); - for (p = endpoint->str; *p && *p != ':'; p++) - { - if (*p == '"' || *p == '\\') fputc( '\\', f ); - fputc( *p, f ); - } - if (!*p) goto error; - if (p[1] != '[') goto error; - - fprintf( f, "\", (const unsigned char *)\"" ); - for (p += 2; *p && *p != ']'; p++) - { - if (*p == '"' || *p == '\\') fputc( '\\', f ); - fputc( *p, f ); - } - if (*p != ']') goto error; - fprintf( f, "\" },\n" ); - } - print_file( f, 0, "};\n\n" ); - return; - -error: - error("Invalid endpoint syntax '%s'\n", endpoint->str); -} - -void write_client_call_routine( FILE *file, const type_t *iface, const var_t *func, - const char *prefix, unsigned int proc_offset ) -{ - type_t *rettype = type_function_get_rettype( func->type ); - int has_ret = !is_void( rettype ); - const var_list_t *args = type_get_function_args( func->type ); - const var_t *arg; - int len, needs_params = 0; - - /* we need a param structure if we have more than one arg */ - if (pointer_size == 4 && args) needs_params = is_object( iface ) || list_count( args ) > 1; - - print_file( file, 0, "{\n"); - if (needs_params) - { - if (has_ret) print_file( file, 1, "%s", "CLIENT_CALL_RETURN _RetVal;\n" ); - write_func_param_struct( file, iface, func->type, "__params", FALSE ); - if (is_object( iface )) print_file( file, 1, "__params.This = This;\n" ); - if (args) - LIST_FOR_EACH_ENTRY( arg, args, const var_t, entry ) - print_file( file, 1, "__params.%s = %s;\n", arg->name, arg->name ); - } - else if (has_ret) print_file( file, 1, "%s", "CLIENT_CALL_RETURN _RetVal;\n\n" ); - - len = fprintf( file, " %s%s( ", - has_ret ? "_RetVal = " : "", - get_stub_mode() == MODE_Oif ? "NdrClientCall2" : "NdrClientCall" ); - fprintf( file, "&%s_StubDesc,", prefix ); - fprintf( file, "\n%*s&__MIDL_ProcFormatString.Format[%u]", len, "", proc_offset ); - if (needs_params) - { - fprintf( file, ",\n%*s&__params", len, "" ); - } - else if (pointer_size == 8) - { - if (is_object( iface )) fprintf( file, ",\n%*sThis", len, "" ); - if (args) - LIST_FOR_EACH_ENTRY( arg, args, const var_t, entry ) - fprintf( file, ",\n%*s%s", len, "", arg->name ); - } - else - { - if (is_object( iface )) fprintf( file, ",\n%*s&This", len, "" ); - else if (args) - { - arg = LIST_ENTRY( list_head(args), const var_t, entry ); - fprintf( file, ",\n%*s&%s", len, "", arg->name ); - } - } - fprintf( file, " );\n" ); - if (has_ret) - { - print_file( file, 1, "return (" ); - write_type_decl_left(file, rettype); - fprintf( file, ")%s;\n", pointer_size == 8 ? "_RetVal.Simple" : "*(LONG_PTR *)&_RetVal" ); - } - print_file( file, 0, "}\n\n"); -} - -void write_exceptions( FILE *file ) -{ - fprintf( file, "#ifndef USE_COMPILER_EXCEPTIONS\n"); - fprintf( file, "\n"); - fprintf( file, "#include \"wine/exception.h\"\n"); - fprintf( file, "#undef RpcTryExcept\n"); - fprintf( file, "#undef RpcExcept\n"); - fprintf( file, "#undef RpcEndExcept\n"); - fprintf( file, "#undef RpcTryFinally\n"); - fprintf( file, "#undef RpcFinally\n"); - fprintf( file, "#undef RpcEndFinally\n"); - fprintf( file, "#undef RpcExceptionCode\n"); - fprintf( file, "#undef RpcAbnormalTermination\n"); - fprintf( file, "\n"); - fprintf( file, "struct __exception_frame;\n"); - fprintf( file, "typedef int (*__filter_func)(struct __exception_frame *);\n"); - fprintf( file, "typedef void (*__finally_func)(struct __exception_frame *);\n"); - fprintf( file, "\n"); - fprintf( file, "#define __DECL_EXCEPTION_FRAME \\\n"); - fprintf( file, " EXCEPTION_REGISTRATION_RECORD frame; \\\n"); - fprintf( file, " __filter_func filter; \\\n"); - fprintf( file, " __finally_func finally; \\\n"); - fprintf( file, " sigjmp_buf jmp; \\\n"); - fprintf( file, " DWORD code; \\\n"); - fprintf( file, " unsigned char abnormal_termination; \\\n"); - fprintf( file, " unsigned char filter_level; \\\n"); - fprintf( file, " unsigned char finally_level;\n"); - fprintf( file, "\n"); - fprintf( file, "struct __exception_frame\n{\n"); - fprintf( file, " __DECL_EXCEPTION_FRAME\n"); - fprintf( file, "};\n"); - fprintf( file, "\n"); - fprintf( file, "static inline void __widl_unwind_target(void)\n" ); - fprintf( file, "{\n"); - fprintf( file, " struct __exception_frame *exc_frame = (struct __exception_frame *)__wine_get_frame();\n" ); - fprintf( file, " if (exc_frame->finally_level > exc_frame->filter_level)\n" ); - fprintf( file, " {\n"); - fprintf( file, " exc_frame->abnormal_termination = 1;\n"); - fprintf( file, " exc_frame->finally( exc_frame );\n"); - fprintf( file, " __wine_pop_frame( &exc_frame->frame );\n"); - fprintf( file, " }\n"); - fprintf( file, " exc_frame->filter_level = 0;\n"); - fprintf( file, " siglongjmp( exc_frame->jmp, 1 );\n"); - fprintf( file, "}\n"); - fprintf( file, "\n"); - fprintf( file, "static DWORD __widl_exception_handler( EXCEPTION_RECORD *record,\n"); - fprintf( file, " EXCEPTION_REGISTRATION_RECORD *frame,\n"); - fprintf( file, " CONTEXT *context,\n"); - fprintf( file, " EXCEPTION_REGISTRATION_RECORD **pdispatcher )\n"); - fprintf( file, "{\n"); - fprintf( file, " struct __exception_frame *exc_frame = (struct __exception_frame *)frame;\n"); - fprintf( file, "\n"); - fprintf( file, " if (record->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND | EH_NESTED_CALL))\n"); - fprintf( file, " {\n" ); - fprintf( file, " if (exc_frame->finally_level && (record->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND)))\n"); - fprintf( file, " {\n" ); - fprintf( file, " exc_frame->abnormal_termination = 1;\n"); - fprintf( file, " exc_frame->finally( exc_frame );\n"); - fprintf( file, " }\n" ); - fprintf( file, " return ExceptionContinueSearch;\n"); - fprintf( file, " }\n" ); - fprintf( file, " exc_frame->code = record->ExceptionCode;\n"); - fprintf( file, " if (exc_frame->filter_level && exc_frame->filter( exc_frame ) == EXCEPTION_EXECUTE_HANDLER)\n" ); - fprintf( file, " __wine_rtl_unwind( frame, record, __widl_unwind_target );\n"); - fprintf( file, " return ExceptionContinueSearch;\n"); - fprintf( file, "}\n"); - fprintf( file, "\n"); - fprintf( file, "#define RpcTryExcept \\\n"); - fprintf( file, " if (!sigsetjmp( __frame->jmp, 0 )) \\\n"); - fprintf( file, " { \\\n"); - fprintf( file, " if (!__frame->finally_level) \\\n" ); - fprintf( file, " __wine_push_frame( &__frame->frame ); \\\n"); - fprintf( file, " __frame->filter_level = __frame->finally_level + 1;\n" ); - fprintf( file, "\n"); - fprintf( file, "#define RpcExcept(expr) \\\n"); - fprintf( file, " if (!__frame->finally_level) \\\n" ); - fprintf( file, " __wine_pop_frame( &__frame->frame ); \\\n"); - fprintf( file, " __frame->filter_level = 0; \\\n" ); - fprintf( file, " } \\\n"); - fprintf( file, " else \\\n"); - fprintf( file, "\n"); - fprintf( file, "#define RpcEndExcept\n"); - fprintf( file, "\n"); - fprintf( file, "#define RpcExceptionCode() (__frame->code)\n"); - fprintf( file, "\n"); - fprintf( file, "#define RpcTryFinally \\\n"); - fprintf( file, " if (!__frame->filter_level) \\\n"); - fprintf( file, " __wine_push_frame( &__frame->frame ); \\\n"); - fprintf( file, " __frame->finally_level = __frame->filter_level + 1;\n"); - fprintf( file, "\n"); - fprintf( file, "#define RpcFinally \\\n"); - fprintf( file, " if (!__frame->filter_level) \\\n"); - fprintf( file, " __wine_pop_frame( &__frame->frame ); \\\n"); - fprintf( file, " __frame->finally_level = 0;\n"); - fprintf( file, "\n"); - fprintf( file, "#define RpcEndFinally\n"); - fprintf( file, "\n"); - fprintf( file, "#define RpcAbnormalTermination() (__frame->abnormal_termination)\n"); - fprintf( file, "\n"); - fprintf( file, "#define RpcExceptionInit(filter_func,finally_func) \\\n"); - fprintf( file, " do { \\\n"); - fprintf( file, " __frame->frame.Handler = __widl_exception_handler; \\\n"); - fprintf( file, " __frame->filter = (__filter_func)(filter_func); \\\n" ); - fprintf( file, " __frame->finally = (__finally_func)(finally_func); \\\n"); - fprintf( file, " __frame->abnormal_termination = 0; \\\n"); - fprintf( file, " __frame->filter_level = 0; \\\n"); - fprintf( file, " __frame->finally_level = 0; \\\n"); - fprintf( file, " } while (0)\n"); - fprintf( file, "\n"); - fprintf( file, "#else /* USE_COMPILER_EXCEPTIONS */\n"); - fprintf( file, "\n"); - fprintf( file, "#define RpcExceptionInit(filter_func,finally_func) \\\n"); - fprintf( file, " do { (void)(filter_func); } while(0)\n"); - fprintf( file, "\n"); - fprintf( file, "#define __DECL_EXCEPTION_FRAME \\\n"); - fprintf( file, " DWORD code;\n"); - fprintf( file, "\n"); - fprintf( file, "#endif /* USE_COMPILER_EXCEPTIONS */\n"); -} diff --git a/reactos/tools/widl/typegen.h b/reactos/tools/widl/typegen.h deleted file mode 100644 index b6540e28c41..00000000000 --- a/reactos/tools/widl/typegen.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Format String Generator for IDL Compiler - * - * Copyright 2005-2006 Eric Kohl - * 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 - */ - -#include - -enum pass -{ - PASS_IN, - PASS_OUT, - PASS_RETURN -}; - -enum remoting_phase -{ - PHASE_BUFFERSIZE, - PHASE_MARSHAL, - PHASE_UNMARSHAL, - PHASE_FREE -}; - -enum typegen_detect_flags -{ - TDT_ALL_TYPES = 1 << 0, - TDT_IGNORE_STRINGS = 1 << 1, - TDT_IGNORE_RANGES = 1 << 2, -}; - -enum typegen_type -{ - TGT_INVALID, - TGT_USER_TYPE, - TGT_CTXT_HANDLE, - TGT_CTXT_HANDLE_POINTER, - TGT_STRING, - TGT_POINTER, - TGT_ARRAY, - TGT_IFACE_POINTER, - TGT_BASIC, - TGT_ENUM, - TGT_STRUCT, - TGT_UNION, - TGT_RANGE, -}; - -typedef int (*type_pred_t)(const type_t *); - -void write_formatstringsdecl(FILE *f, int indent, const statement_list_t *stmts, type_pred_t pred); -void write_procformatstring(FILE *file, const statement_list_t *stmts, type_pred_t pred); -void write_typeformatstring(FILE *file, const statement_list_t *stmts, type_pred_t pred); -void write_procformatstring_offsets( FILE *file, const type_t *iface ); -void print_phase_basetype(FILE *file, int indent, const char *local_var_prefix, enum remoting_phase phase, - enum pass pass, const var_t *var, const char *varname); -void write_parameter_conf_or_var_exprs(FILE *file, int indent, const char *local_var_prefix, - enum remoting_phase phase, const var_t *var, int valid_variance); -void write_remoting_arguments(FILE *file, int indent, const var_t *func, const char *local_var_prefix, - enum pass pass, enum remoting_phase phase); -unsigned int get_size_procformatstring_func(const type_t *iface, const var_t *func); -unsigned int get_size_procformatstring(const statement_list_t *stmts, type_pred_t pred); -unsigned int get_size_typeformatstring(const statement_list_t *stmts, type_pred_t pred); -void assign_stub_out_args( FILE *file, int indent, const var_t *func, const char *local_var_prefix ); -void declare_stub_args( FILE *file, int indent, const var_t *func ); -void write_func_param_struct( FILE *file, const type_t *iface, const type_t *func, - const char *var_decl, int add_retval ); -void write_pointer_checks( FILE *file, int indent, const var_t *func ); -int write_expr_eval_routines(FILE *file, const char *iface); -void write_expr_eval_routine_list(FILE *file, const char *iface); -void write_user_quad_list(FILE *file); -void write_endpoints( FILE *f, const char *prefix, const str_list_t *list ); -void write_client_call_routine( FILE *file, const type_t *iface, const var_t *func, - const char *prefix, unsigned int proc_offset ); -void write_exceptions( FILE *file ); -unsigned int type_memsize(const type_t *t); -int decl_indirect(const type_t *t); -int is_interpreted_func(const type_t *iface, const var_t *func); -void write_parameters_init(FILE *file, int indent, const var_t *func, const char *local_var_prefix); -void print(FILE *file, int indent, const char *format, va_list ap); -expr_t *get_size_is_expr(const type_t *t, const char *name); -int is_full_pointer_function(const var_t *func); -void write_full_pointer_init(FILE *file, int indent, const var_t *func, int is_server); -void write_full_pointer_free(FILE *file, int indent, const var_t *func); -unsigned char get_basic_fc(const type_t *type); -unsigned char get_pointer_fc(const type_t *type, const attr_list_t *attrs, int toplevel_param); -unsigned char get_struct_fc(const type_t *type); -enum typegen_type typegen_detect_type(const type_t *type, const attr_list_t *attrs, unsigned int flags); diff --git a/reactos/tools/widl/typelib.c b/reactos/tools/widl/typelib.c deleted file mode 100644 index a63af091437..00000000000 --- a/reactos/tools/widl/typelib.c +++ /dev/null @@ -1,388 +0,0 @@ -/* - * 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; -} - -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/reactos/tools/widl/typelib.h b/reactos/tools/widl/typelib.h deleted file mode 100644 index 18e6cdbcc56..00000000000 --- a/reactos/tools/widl/typelib.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * IDL Compiler - * - * Copyright 2004 Ove Kaaven - * - * 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_H -#define __WIDL_TYPELIB_H - -extern void start_typelib(typelib_t *typelib_type); -extern void end_typelib(void); -extern void add_importlib(const char *name); - -/* Copied from wtypes.h. Not included directly because that would create a - * circular dependency (after all, wtypes.h is generated by widl...) */ - -enum VARENUM { - VT_EMPTY = 0, - VT_NULL = 1, - VT_I2 = 2, - VT_I4 = 3, - VT_R4 = 4, - VT_R8 = 5, - VT_CY = 6, - VT_DATE = 7, - VT_BSTR = 8, - VT_DISPATCH = 9, - VT_ERROR = 10, - VT_BOOL = 11, - VT_VARIANT = 12, - VT_UNKNOWN = 13, - VT_DECIMAL = 14, - VT_I1 = 16, - VT_UI1 = 17, - VT_UI2 = 18, - VT_UI4 = 19, - VT_I8 = 20, - VT_UI8 = 21, - VT_INT = 22, - VT_UINT = 23, - VT_VOID = 24, - VT_HRESULT = 25, - VT_PTR = 26, - VT_SAFEARRAY = 27, - VT_CARRAY = 28, - VT_USERDEFINED = 29, - VT_LPSTR = 30, - VT_LPWSTR = 31, - VT_RECORD = 36, - VT_INT_PTR = 37, - VT_UINT_PTR = 38, - VT_FILETIME = 64, - VT_BLOB = 65, - VT_STREAM = 66, - VT_STORAGE = 67, - VT_STREAMED_OBJECT = 68, - VT_STORED_OBJECT = 69, - VT_BLOB_OBJECT = 70, - VT_CF = 71, - VT_CLSID = 72, - VT_VERSIONED_STREAM = 73, - VT_BSTR_BLOB = 0xfff, - VT_VECTOR = 0x1000, - VT_ARRAY = 0x2000, - VT_BYREF = 0x4000, - VT_RESERVED = 0x8000, - VT_ILLEGAL = 0xffff, - VT_ILLEGALMASKED = 0xfff, - VT_TYPEMASK = 0xfff -}; -extern unsigned short get_type_vt(type_t *t); - -extern int create_msft_typelib(typelib_t *typelib); -#endif diff --git a/reactos/tools/widl/typelib_struct.h b/reactos/tools/widl/typelib_struct.h deleted file mode 100644 index 79b86b91216..00000000000 --- a/reactos/tools/widl/typelib_struct.h +++ /dev/null @@ -1,605 +0,0 @@ -/* - * 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 "pshpack1.h" - -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 "poppack.h" - -/*---------------------------END--------------------------------------------*/ -#endif diff --git a/reactos/tools/widl/typetree.c b/reactos/tools/widl/typetree.c deleted file mode 100644 index a9e71bef1db..00000000000 --- a/reactos/tools/widl/typetree.c +++ /dev/null @@ -1,435 +0,0 @@ -/* - * IDL Type Tree - * - * Copyright 2008 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 "config.h" - -#include -#include -#include - -#include "widl.h" -#include "utils.h" -#include "parser.h" -#include "typetree.h" -#include "header.h" - -type_t *duptype(type_t *t, int dupname) -{ - type_t *d = alloc_type(); - - *d = *t; - if (dupname && t->name) - d->name = xstrdup(t->name); - - return d; -} - -type_t *make_type(enum type_type type) -{ - type_t *t = alloc_type(); - t->name = NULL; - t->type_type = type; - t->attrs = NULL; - t->orig = NULL; - memset(&t->details, 0, sizeof(t->details)); - t->typestring_offset = 0; - t->ptrdesc = 0; - t->ignore = (parse_only != 0); - t->defined = FALSE; - t->written = FALSE; - t->user_types_registered = FALSE; - t->tfswrite = FALSE; - t->checked = FALSE; - t->is_alias = FALSE; - t->typelib_idx = -1; - init_loc_info(&t->loc_info); - return t; -} - -static const var_t *find_arg(const var_list_t *args, const char *name) -{ - const var_t *arg; - - if (args) LIST_FOR_EACH_ENTRY(arg, args, const var_t, entry) - { - if (arg->name && !strcmp(name, arg->name)) - return arg; - } - - return NULL; -} - -type_t *type_new_function(var_list_t *args) -{ - var_t *arg; - type_t *t; - unsigned int i = 0; - - if (args) - { - arg = LIST_ENTRY(list_head(args), var_t, entry); - if (list_count(args) == 1 && !arg->name && arg->type && type_get_type(arg->type) == TYPE_VOID) - { - list_remove(&arg->entry); - free(arg); - free(args); - args = NULL; - } - } - if (args) LIST_FOR_EACH_ENTRY(arg, args, var_t, entry) - { - if (arg->type && type_get_type(arg->type) == TYPE_VOID) - error_loc("argument '%s' has void type\n", arg->name); - if (!arg->name) - { - if (i > 26 * 26) - error_loc("too many unnamed arguments\n"); - else - { - int unique; - do - { - char name[3]; - name[0] = i > 26 ? 'a' + i / 26 : 'a' + i; - name[1] = i > 26 ? 'a' + i % 26 : 0; - name[2] = 0; - unique = !find_arg(args, name); - if (unique) - arg->name = xstrdup(name); - i++; - } while (!unique); - } - } - } - - t = make_type(TYPE_FUNCTION); - t->details.function = xmalloc(sizeof(*t->details.function)); - t->details.function->args = args; - t->details.function->idx = -1; - return t; -} - -type_t *type_new_pointer(unsigned char pointer_default, type_t *ref, attr_list_t *attrs) -{ - type_t *t = make_type(TYPE_POINTER); - t->details.pointer.def_fc = pointer_default; - t->details.pointer.ref = ref; - t->attrs = attrs; - return t; -} - -type_t *type_new_alias(type_t *t, const char *name) -{ - type_t *a = duptype(t, 0); - - a->name = xstrdup(name); - a->attrs = NULL; - a->orig = t; - a->is_alias = TRUE; - /* for pointer types */ - a->details = t->details; - init_loc_info(&a->loc_info); - - return a; -} - -type_t *type_new_module(char *name) -{ - type_t *type = get_type(TYPE_MODULE, name, 0); - if (type->type_type != TYPE_MODULE || type->defined) - error_loc("%s: redefinition error; original definition was at %s:%d\n", - type->name, type->loc_info.input_name, type->loc_info.line_number); - type->name = name; - return type; -} - -type_t *type_new_coclass(char *name) -{ - type_t *type = get_type(TYPE_COCLASS, name, 0); - if (type->type_type != TYPE_COCLASS || type->defined) - error_loc("%s: redefinition error; original definition was at %s:%d\n", - type->name, type->loc_info.input_name, type->loc_info.line_number); - type->name = name; - return type; -} - - -type_t *type_new_array(const char *name, type_t *element, int declptr, - unsigned int dim, expr_t *size_is, expr_t *length_is, - unsigned char ptr_default_fc) -{ - type_t *t = make_type(TYPE_ARRAY); - if (name) t->name = xstrdup(name); - t->details.array.declptr = declptr; - t->details.array.length_is = length_is; - if (size_is) - t->details.array.size_is = size_is; - else - t->details.array.dim = dim; - t->details.array.elem = element; - t->details.array.ptr_def_fc = ptr_default_fc; - return t; -} - -type_t *type_new_basic(enum type_basic_type basic_type) -{ - type_t *t = make_type(TYPE_BASIC); - t->details.basic.type = basic_type; - t->details.basic.sign = 0; - return t; -} - -type_t *type_new_int(enum type_basic_type basic_type, int sign) -{ - static type_t *int_types[TYPE_BASIC_INT_MAX+1][3]; - - assert(basic_type <= TYPE_BASIC_INT_MAX); - - /* map sign { -1, 0, 1 } -> { 0, 1, 2 } */ - if (!int_types[basic_type][sign + 1]) - { - int_types[basic_type][sign + 1] = type_new_basic(basic_type); - int_types[basic_type][sign + 1]->details.basic.sign = sign; - } - return int_types[basic_type][sign + 1]; -} - -type_t *type_new_void(void) -{ - static type_t *void_type = NULL; - if (!void_type) - void_type = make_type(TYPE_VOID); - return void_type; -} - -type_t *type_new_enum(const char *name, int defined, var_list_t *enums) -{ - type_t *tag_type = name ? find_type(name, tsENUM) : NULL; - type_t *t = make_type(TYPE_ENUM); - t->name = name; - - if (tag_type && tag_type->details.enumeration) - t->details.enumeration = tag_type->details.enumeration; - else if (defined) - { - t->details.enumeration = xmalloc(sizeof(*t->details.enumeration)); - t->details.enumeration->enums = enums; - t->defined = TRUE; - } - - if (name) - { - if (defined) - reg_type(t, name, tsENUM); - else - add_incomplete(t); - } - return t; -} - -type_t *type_new_struct(char *name, int defined, var_list_t *fields) -{ - type_t *tag_type = name ? find_type(name, tsSTRUCT) : NULL; - type_t *t = make_type(TYPE_STRUCT); - t->name = name; - if (tag_type && tag_type->details.structure) - t->details.structure = tag_type->details.structure; - else if (defined) - { - t->details.structure = xmalloc(sizeof(*t->details.structure)); - t->details.structure->fields = fields; - t->defined = TRUE; - } - if (name) - { - if (defined) - reg_type(t, name, tsSTRUCT); - else - add_incomplete(t); - } - return t; -} - -type_t *type_new_nonencapsulated_union(const char *name, int defined, var_list_t *fields) -{ - type_t *tag_type = name ? find_type(name, tsUNION) : NULL; - type_t *t = make_type(TYPE_UNION); - t->name = name; - if (tag_type && tag_type->details.structure) - t->details.structure = tag_type->details.structure; - else if (defined) - { - t->details.structure = xmalloc(sizeof(*t->details.structure)); - t->details.structure->fields = fields; - t->defined = TRUE; - } - if (name) - { - if (defined) - reg_type(t, name, tsUNION); - else - add_incomplete(t); - } - return t; -} - -type_t *type_new_encapsulated_union(char *name, var_t *switch_field, var_t *union_field, var_list_t *cases) -{ - type_t *t = get_type(TYPE_ENCAPSULATED_UNION, name, tsUNION); - if (!union_field) union_field = make_var( xstrdup("tagged_union") ); - union_field->type = type_new_nonencapsulated_union(NULL, TRUE, cases); - t->details.structure = xmalloc(sizeof(*t->details.structure)); - t->details.structure->fields = append_var( NULL, switch_field ); - t->details.structure->fields = append_var( t->details.structure->fields, union_field ); - t->defined = TRUE; - return t; -} - -static int is_valid_bitfield_type(const type_t *type) -{ - switch (type_get_type(type)) - { - case TYPE_ENUM: - return TRUE; - case TYPE_BASIC: - switch (type_basic_get_type(type)) - { - case TYPE_BASIC_INT8: - case TYPE_BASIC_INT16: - case TYPE_BASIC_INT32: - case TYPE_BASIC_INT64: - case TYPE_BASIC_INT: - case TYPE_BASIC_INT3264: - case TYPE_BASIC_CHAR: - case TYPE_BASIC_HYPER: - case TYPE_BASIC_BYTE: - case TYPE_BASIC_WCHAR: - case TYPE_BASIC_ERROR_STATUS_T: - return TRUE; - case TYPE_BASIC_FLOAT: - case TYPE_BASIC_DOUBLE: - case TYPE_BASIC_HANDLE: - return FALSE; - } - return FALSE; - default: - return FALSE; - } -} - -type_t *type_new_bitfield(type_t *field, const expr_t *bits) -{ - type_t *t; - - if (!is_valid_bitfield_type(field)) - error_loc("bit-field has invalid type\n"); - - if (bits->cval < 0) - error_loc("negative width for bit-field\n"); - - /* FIXME: validate bits->cval <= memsize(field) * 8 */ - - t = make_type(TYPE_BITFIELD); - t->details.bitfield.field = field; - t->details.bitfield.bits = bits; - return t; -} - -static int compute_method_indexes(type_t *iface) -{ - int idx; - statement_t *stmt; - - if (!iface->details.iface) - return 0; - - if (type_iface_get_inherit(iface)) - idx = compute_method_indexes(type_iface_get_inherit(iface)); - else - idx = 0; - - STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) ) - { - var_t *func = stmt->u.var; - if (!is_callas(func->attrs)) - func->type->details.function->idx = idx++; - } - - return idx; -} - -void type_interface_define(type_t *iface, type_t *inherit, statement_list_t *stmts) -{ - iface->details.iface = xmalloc(sizeof(*iface->details.iface)); - iface->details.iface->disp_props = NULL; - iface->details.iface->disp_methods = NULL; - iface->details.iface->stmts = stmts; - iface->details.iface->inherit = inherit; - iface->defined = TRUE; - compute_method_indexes(iface); -} - -void type_dispinterface_define(type_t *iface, var_list_t *props, var_list_t *methods) -{ - iface->details.iface = xmalloc(sizeof(*iface->details.iface)); - iface->details.iface->disp_props = props; - iface->details.iface->disp_methods = methods; - iface->details.iface->stmts = NULL; - iface->details.iface->inherit = find_type("IDispatch", 0); - if (!iface->details.iface->inherit) error_loc("IDispatch is undefined\n"); - iface->defined = TRUE; - compute_method_indexes(iface); -} - -void type_dispinterface_define_from_iface(type_t *dispiface, type_t *iface) -{ - type_dispinterface_define(dispiface, iface->details.iface->disp_props, - iface->details.iface->disp_methods); -} - -void type_module_define(type_t *module, statement_list_t *stmts) -{ - if (module->details.module) error_loc("multiple definition error\n"); - module->details.module = xmalloc(sizeof(*module->details.module)); - module->details.module->stmts = stmts; - module->defined = TRUE; -} - -type_t *type_coclass_define(type_t *coclass, ifref_list_t *ifaces) -{ - coclass->details.coclass.ifaces = ifaces; - coclass->defined = TRUE; - return coclass; -} - -int type_is_equal(const type_t *type1, const type_t *type2) -{ - if (type_get_type_detect_alias(type1) != type_get_type_detect_alias(type2)) - return FALSE; - - if (type1->name && type2->name) - return !strcmp(type1->name, type2->name); - else if ((!type1->name && type2->name) || (type1->name && !type2->name)) - return FALSE; - - /* FIXME: do deep inspection of types to determine if they are equal */ - - return FALSE; -} diff --git a/reactos/tools/widl/typetree.h b/reactos/tools/widl/typetree.h deleted file mode 100644 index 8b19739f33a..00000000000 --- a/reactos/tools/widl/typetree.h +++ /dev/null @@ -1,302 +0,0 @@ -/* - * IDL Type Tree - * - * Copyright 2008 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 "widltypes.h" -#include - -#ifndef WIDL_TYPE_TREE_H -#define WIDL_TYPE_TREE_H - -type_t *type_new_function(var_list_t *args); -type_t *type_new_pointer(unsigned char pointer_default, type_t *ref, attr_list_t *attrs); -type_t *type_new_alias(type_t *t, const char *name); -type_t *type_new_module(char *name); -type_t *type_new_array(const char *name, type_t *element, int declptr, - unsigned int dim, expr_t *size_is, expr_t *length_is, - unsigned char ptr_default_fc); -type_t *type_new_basic(enum type_basic_type basic_type); -type_t *type_new_int(enum type_basic_type basic_type, int sign); -type_t *type_new_void(void); -type_t *type_new_coclass(char *name); -type_t *type_new_enum(const char *name, int defined, var_list_t *enums); -type_t *type_new_struct(char *name, int defined, var_list_t *fields); -type_t *type_new_nonencapsulated_union(const char *name, int defined, var_list_t *fields); -type_t *type_new_encapsulated_union(char *name, var_t *switch_field, var_t *union_field, var_list_t *cases); -type_t *type_new_bitfield(type_t *field_type, const expr_t *bits); -void type_interface_define(type_t *iface, type_t *inherit, statement_list_t *stmts); -void type_dispinterface_define(type_t *iface, var_list_t *props, var_list_t *methods); -void type_dispinterface_define_from_iface(type_t *dispiface, type_t *iface); -void type_module_define(type_t *module, statement_list_t *stmts); -type_t *type_coclass_define(type_t *coclass, ifref_list_t *ifaces); -int type_is_equal(const type_t *type1, const type_t *type2); - -/* FIXME: shouldn't need to export this */ -type_t *duptype(type_t *t, int dupname); - -/* un-alias the type until finding the non-alias type */ -static inline type_t *type_get_real_type(const type_t *type) -{ - if (type->is_alias) - return type_get_real_type(type->orig); - else - return (type_t *)type; -} - -static inline enum type_type type_get_type(const type_t *type) -{ - return type_get_type_detect_alias(type_get_real_type(type)); -} - -static inline enum type_basic_type type_basic_get_type(const type_t *type) -{ - type = type_get_real_type(type); - assert(type_get_type(type) == TYPE_BASIC); - return type->details.basic.type; -} - -static inline int type_basic_get_sign(const type_t *type) -{ - type = type_get_real_type(type); - assert(type_get_type(type) == TYPE_BASIC); - return type->details.basic.sign; -} - -static inline var_list_t *type_struct_get_fields(const type_t *type) -{ - type = type_get_real_type(type); - assert(type_get_type(type) == TYPE_STRUCT); - return type->details.structure->fields; -} - -static inline var_list_t *type_function_get_args(const type_t *type) -{ - type = type_get_real_type(type); - assert(type_get_type(type) == TYPE_FUNCTION); - return type->details.function->args; -} - -static inline type_t *type_function_get_rettype(const type_t *type) -{ - type = type_get_real_type(type); - assert(type_get_type(type) == TYPE_FUNCTION); - return type->details.function->rettype; -} - -static inline var_list_t *type_enum_get_values(const type_t *type) -{ - type = type_get_real_type(type); - assert(type_get_type(type) == TYPE_ENUM); - return type->details.enumeration->enums; -} - -static inline var_t *type_union_get_switch_value(const type_t *type) -{ - type = type_get_real_type(type); - assert(type_get_type(type) == TYPE_ENCAPSULATED_UNION); - return LIST_ENTRY(list_head(type->details.structure->fields), var_t, entry); -} - -static inline var_list_t *type_encapsulated_union_get_fields(const type_t *type) -{ - type = type_get_real_type(type); - assert(type_get_type(type) == TYPE_ENCAPSULATED_UNION); - return type->details.structure->fields; -} - -static inline var_list_t *type_union_get_cases(const type_t *type) -{ - enum type_type type_type; - - type = type_get_real_type(type); - type_type = type_get_type(type); - - assert(type_type == TYPE_UNION || type_type == TYPE_ENCAPSULATED_UNION); - if (type_type == TYPE_ENCAPSULATED_UNION) - { - const var_t *uv = LIST_ENTRY(list_tail(type->details.structure->fields), const var_t, entry); - return uv->type->details.structure->fields; - } - else - return type->details.structure->fields; -} - -static inline statement_list_t *type_iface_get_stmts(const type_t *type) -{ - type = type_get_real_type(type); - assert(type_get_type(type) == TYPE_INTERFACE); - return type->details.iface->stmts; -} - -static inline type_t *type_iface_get_inherit(const type_t *type) -{ - type = type_get_real_type(type); - assert(type_get_type(type) == TYPE_INTERFACE); - return type->details.iface->inherit; -} - -static inline var_list_t *type_dispiface_get_props(const type_t *type) -{ - type = type_get_real_type(type); - assert(type_get_type(type) == TYPE_INTERFACE); - return type->details.iface->disp_props; -} - -static inline var_list_t *type_dispiface_get_methods(const type_t *type) -{ - type = type_get_real_type(type); - assert(type_get_type(type) == TYPE_INTERFACE); - return type->details.iface->disp_methods; -} - -static inline int type_is_defined(const type_t *type) -{ - return type->defined; -} - -static inline int type_is_complete(const type_t *type) -{ - switch (type_get_type_detect_alias(type)) - { - case TYPE_FUNCTION: - return (type->details.function != NULL); - case TYPE_INTERFACE: - return (type->details.iface != NULL); - case TYPE_ENUM: - return (type->details.enumeration != NULL); - case TYPE_UNION: - case TYPE_ENCAPSULATED_UNION: - case TYPE_STRUCT: - return (type->details.structure != NULL); - case TYPE_VOID: - case TYPE_BASIC: - case TYPE_ALIAS: - case TYPE_MODULE: - case TYPE_COCLASS: - case TYPE_POINTER: - case TYPE_ARRAY: - case TYPE_BITFIELD: - return TRUE; - } - return FALSE; -} - -static inline int type_array_has_conformance(const type_t *type) -{ - type = type_get_real_type(type); - assert(type_get_type(type) == TYPE_ARRAY); - return (type->details.array.size_is != NULL); -} - -static inline int type_array_has_variance(const type_t *type) -{ - type = type_get_real_type(type); - assert(type_get_type(type) == TYPE_ARRAY); - return (type->details.array.length_is != NULL); -} - -static inline unsigned int type_array_get_dim(const type_t *type) -{ - type = type_get_real_type(type); - assert(type_get_type(type) == TYPE_ARRAY); - return type->details.array.dim; -} - -static inline expr_t *type_array_get_conformance(const type_t *type) -{ - type = type_get_real_type(type); - assert(type_get_type(type) == TYPE_ARRAY); - return type->details.array.size_is; -} - -static inline expr_t *type_array_get_variance(const type_t *type) -{ - type = type_get_real_type(type); - assert(type_get_type(type) == TYPE_ARRAY); - return type->details.array.length_is; -} - -static inline type_t *type_array_get_element(const type_t *type) -{ - type = type_get_real_type(type); - assert(type_get_type(type) == TYPE_ARRAY); - return type->details.array.elem; -} - -static inline int type_array_is_decl_as_ptr(const type_t *type) -{ - type = type_get_real_type(type); - assert(type_get_type(type) == TYPE_ARRAY); - return type->details.array.declptr; -} - -static inline unsigned char type_array_get_ptr_default_fc(const type_t *type) -{ - type = type_get_real_type(type); - assert(type_get_type(type) == TYPE_ARRAY); - return type->details.array.ptr_def_fc; -} - -static inline int type_is_alias(const type_t *type) -{ - return type->is_alias; -} - -static inline type_t *type_alias_get_aliasee(const type_t *type) -{ - assert(type_is_alias(type)); - return type->orig; -} - -static inline ifref_list_t *type_coclass_get_ifaces(const type_t *type) -{ - type = type_get_real_type(type); - assert(type_get_type(type) == TYPE_COCLASS); - return type->details.coclass.ifaces; -} - -static inline type_t *type_pointer_get_ref(const type_t *type) -{ - type = type_get_real_type(type); - assert(type_get_type(type) == TYPE_POINTER); - return type->details.pointer.ref; -} - -static inline unsigned char type_pointer_get_default_fc(const type_t *type) -{ - type = type_get_real_type(type); - assert(type_get_type(type) == TYPE_POINTER); - return type->details.pointer.def_fc; -} - -static inline type_t *type_bitfield_get_field(const type_t *type) -{ - type = type_get_real_type(type); - assert(type_get_type(type) == TYPE_BITFIELD); - return type->details.bitfield.field; -} - -static inline const expr_t *type_bitfield_get_bits(const type_t *type) -{ - type = type_get_real_type(type); - assert(type_get_type(type) == TYPE_BITFIELD); - return type->details.bitfield.bits; -} - -#endif /* WIDL_TYPE_TREE_H */ diff --git a/reactos/tools/widl/utils.c b/reactos/tools/widl/utils.c deleted file mode 100644 index dc77ae87438..00000000000 --- a/reactos/tools/widl/utils.c +++ /dev/null @@ -1,457 +0,0 @@ -/* - * Utility routines - * - * Copyright 1998 Bertho A. Stultiens - * Copyright 2002 Ove Kaaven - * - * 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 -#include -#include -#include -#include -#include - -#include "widl.h" -#include "utils.h" -#include "parser.h" - -#define CURRENT_LOCATION { input_name ? input_name : "stdin", line_number, parser_text } - -static const int want_near_indication = 0; - -static void make_print(char *str) -{ - while(*str) - { - if(!isprint(*str)) - *str = ' '; - str++; - } -} - -static void generic_msg(const loc_info_t *loc_info, const char *s, const char *t, va_list ap) -{ - fprintf(stderr, "%s:%d: %s: ", loc_info->input_name, loc_info->line_number, t); - vfprintf(stderr, s, ap); - - if (want_near_indication) - { - char *cpy; - if(loc_info->near_text) - { - cpy = xstrdup(loc_info->near_text); - make_print(cpy); - fprintf(stderr, " near '%s'", cpy); - free(cpy); - } - } -} - - -void error_loc(const char *s, ...) -{ - loc_info_t cur_loc = CURRENT_LOCATION; - va_list ap; - va_start(ap, s); - generic_msg(&cur_loc, s, "error", ap); - va_end(ap); - exit(1); -} - -/* yyerror: yacc assumes this is not newline terminated. */ -void parser_error(const char *s) -{ - error_loc("%s\n", s); -} - -void error_loc_info(const loc_info_t *loc_info, const char *s, ...) -{ - va_list ap; - va_start(ap, s); - generic_msg(loc_info, s, "error", ap); - va_end(ap); - exit(1); -} - -int parser_warning(const char *s, ...) -{ - loc_info_t cur_loc = CURRENT_LOCATION; - va_list ap; - va_start(ap, s); - generic_msg(&cur_loc, s, "warning", ap); - va_end(ap); - return 0; -} - -void error(const char *s, ...) -{ - va_list ap; - va_start(ap, s); - fprintf(stderr, "error: "); - vfprintf(stderr, s, ap); - va_end(ap); - exit(2); -} - -void warning(const char *s, ...) -{ - va_list ap; - va_start(ap, s); - fprintf(stderr, "warning: "); - vfprintf(stderr, s, ap); - va_end(ap); -} - -void warning_loc_info(const loc_info_t *loc_info, const char *s, ...) -{ - va_list ap; - va_start(ap, s); - generic_msg(loc_info, s, "warning", ap); - va_end(ap); -} - -void chat(const char *s, ...) -{ - if(debuglevel & DEBUGLEVEL_CHAT) - { - va_list ap; - va_start(ap, s); - fprintf(stderr, "chat: "); - vfprintf(stderr, s, ap); - va_end(ap); - } -} - -char *dup_basename(const char *name, const char *ext) -{ - int namelen; - int extlen = strlen(ext); - char *base; - char *slash; - - if(!name) - name = "widl.tab"; - - slash = strrchr(name, '/'); - if (!slash) - slash = strrchr(name, '\\'); - - if (slash) - name = slash + 1; - - namelen = strlen(name); - - /* +4 for later extension and +1 for '\0' */ - base = xmalloc(namelen +4 +1); - strcpy(base, name); - if(!strcasecmp(name + namelen-extlen, ext)) - { - base[namelen - extlen] = '\0'; - } - return base; -} - -size_t widl_getline(char **linep, size_t *lenp, FILE *fp) -{ - char *line = *linep; - size_t len = *lenp; - size_t n = 0; - - if (!line) - { - len = 64; - line = xmalloc(len); - } - - while (fgets(&line[n], len - n, fp)) - { - n += strlen(&line[n]); - if (line[n - 1] == '\n') - break; - else if (n == len - 1) - { - len *= 2; - line = xrealloc(line, len); - } - } - - *linep = line; - *lenp = len; - return n; -} - -void *xmalloc(size_t size) -{ - void *res; - - assert(size > 0); - res = malloc(size); - if(res == NULL) - { - error("Virtual memory exhausted.\n"); - } - memset(res, 0x55, size); - return res; -} - - -void *xrealloc(void *p, size_t size) -{ - void *res; - - assert(size > 0); - res = realloc(p, size); - if(res == NULL) - { - error("Virtual memory exhausted.\n"); - } - return res; -} - -char *xstrdup(const char *str) -{ - char *s; - - assert(str != NULL); - s = xmalloc(strlen(str)+1); - return strcpy(s, str); -} - -int strendswith(const char* str, const char* end) -{ - int l = strlen(str); - int m = strlen(end); - return l >= m && strcmp(str + l - m, end) == 0; -} - -/******************************************************************* - * buffer management - * - * Function for writing to a memory buffer. - */ - -int byte_swapped = 0; -unsigned char *output_buffer; -size_t output_buffer_pos; -size_t output_buffer_size; - -static struct resource -{ - unsigned char *data; - size_t size; -} resources[16]; -static unsigned int nb_resources; - -static void check_output_buffer_space( size_t size ) -{ - if (output_buffer_pos + size >= output_buffer_size) - { - output_buffer_size = max( output_buffer_size * 2, output_buffer_pos + size ); - output_buffer = xrealloc( output_buffer, output_buffer_size ); - } -} - -void init_output_buffer(void) -{ - output_buffer_size = 1024; - output_buffer_pos = 0; - output_buffer = xmalloc( output_buffer_size ); -} - -void flush_output_buffer( const char *name ) -{ - int fd = open( name, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0666 ); - if (fd == -1) error( "Error creating %s\n", name ); - if (write( fd, output_buffer, output_buffer_pos ) != output_buffer_pos) - error( "Error writing to %s\n", name ); - close( fd ); - free( output_buffer ); -} - -static inline void put_resource_id( const char *str ) -{ - if (str[0] != '#') - { - while (*str) - { - unsigned char ch = *str++; - put_word( toupper(ch) ); - } - put_word( 0 ); - } - else - { - put_word( 0xffff ); - put_word( atoi( str + 1 )); - } -} - -void add_output_to_resources( const char *type, const char *name ) -{ - size_t data_size = output_buffer_pos; - size_t header_size = 5 * sizeof(unsigned int) + 2 * sizeof(unsigned short); - - assert( nb_resources < sizeof(resources)/sizeof(resources[0]) ); - - if (type[0] != '#') header_size += (strlen( type ) + 1) * sizeof(unsigned short); - else header_size += 2 * sizeof(unsigned short); - if (name[0] != '#') header_size += (strlen( name ) + 1) * sizeof(unsigned short); - else header_size += 2 * sizeof(unsigned short); - - header_size = (header_size + 3) & ~3; - align_output( 4 ); - check_output_buffer_space( header_size ); - resources[nb_resources].size = header_size + output_buffer_pos; - memmove( output_buffer + header_size, output_buffer, output_buffer_pos ); - - output_buffer_pos = 0; - put_dword( data_size ); /* ResSize */ - put_dword( header_size ); /* HeaderSize */ - put_resource_id( type ); /* ResType */ - put_resource_id( name ); /* ResName */ - align_output( 4 ); - put_dword( 0 ); /* DataVersion */ - put_word( 0 ); /* Memory options */ - put_word( 0 ); /* Language */ - put_dword( 0 ); /* Version */ - put_dword( 0 ); /* Characteristics */ - - resources[nb_resources++].data = output_buffer; - init_output_buffer(); -} - -void flush_output_resources( const char *name ) -{ - int fd; - unsigned int i; - - /* all output must have been saved with add_output_to_resources() first */ - assert( !output_buffer_pos ); - - put_dword( 0 ); /* ResSize */ - put_dword( 32 ); /* HeaderSize */ - put_word( 0xffff ); /* ResType */ - put_word( 0x0000 ); - put_word( 0xffff ); /* ResName */ - put_word( 0x0000 ); - put_dword( 0 ); /* DataVersion */ - put_word( 0 ); /* Memory options */ - put_word( 0 ); /* Language */ - put_dword( 0 ); /* Version */ - put_dword( 0 ); /* Characteristics */ - - fd = open( name, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0666 ); - if (fd == -1) error( "Error creating %s\n", name ); - if (write( fd, output_buffer, output_buffer_pos ) != output_buffer_pos) - error( "Error writing to %s\n", name ); - for (i = 0; i < nb_resources; i++) - { - if (write( fd, resources[i].data, resources[i].size ) != resources[i].size) - error( "Error writing to %s\n", name ); - free( resources[i].data ); - } - close( fd ); - nb_resources = 0; - free( output_buffer ); -} - -void put_data( const void *data, size_t size ) -{ - check_output_buffer_space( size ); - memcpy( output_buffer + output_buffer_pos, data, size ); - output_buffer_pos += size; -} - -void put_byte( unsigned char val ) -{ - check_output_buffer_space( 1 ); - output_buffer[output_buffer_pos++] = val; -} - -void put_word( unsigned short val ) -{ - if (byte_swapped) val = (val << 8) | (val >> 8); - put_data( &val, sizeof(val) ); -} - -void put_dword( unsigned int val ) -{ - if (byte_swapped) - val = ((val << 24) | ((val << 8) & 0x00ff0000) | ((val >> 8) & 0x0000ff00) | (val >> 24)); - put_data( &val, sizeof(val) ); -} - -void put_qword( unsigned int val ) -{ - if (byte_swapped) - { - put_dword( 0 ); - put_dword( val ); - } - else - { - put_dword( val ); - put_dword( 0 ); - } -} - -/* pointer-sized word */ -void put_pword( unsigned int val ) -{ - if (pointer_size == 8) put_qword( val ); - else put_dword( val ); -} - -void put_str( int indent, const char *format, ... ) -{ - int n; - va_list args; - - check_output_buffer_space( 4 * indent ); - memset( output_buffer + output_buffer_pos, ' ', 4 * indent ); - output_buffer_pos += 4 * indent; - - for (;;) - { - size_t size = output_buffer_size - output_buffer_pos; - va_start( args, format ); - n = vsnprintf( (char *)output_buffer + output_buffer_pos, size, format, args ); - va_end( args ); - if (n == -1) size *= 2; - else if ((size_t)n >= size) size = n + 1; - else - { - output_buffer_pos += n; - return; - } - check_output_buffer_space( size ); - } -} - -void align_output( unsigned int align ) -{ - size_t size = align - (output_buffer_pos % align); - - if (size == align) return; - check_output_buffer_space( size ); - memset( output_buffer + output_buffer_pos, 0, size ); - output_buffer_pos += size; -} diff --git a/reactos/tools/widl/utils.h b/reactos/tools/widl/utils.h deleted file mode 100644 index ec02fc7c372..00000000000 --- a/reactos/tools/widl/utils.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Utility routines' prototypes etc. - * - * Copyright 1998 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 __WIDL_UTILS_H -#define __WIDL_UTILS_H - -#include "widltypes.h" - -#include /* size_t */ - -void *xmalloc(size_t); -void *xrealloc(void *, size_t); -char *xstrdup(const char *str); -int strendswith(const char* str, const char* end); - -#ifndef __GNUC__ -#define __attribute__(X) -#endif - -void parser_error(const char *s) __attribute__((noreturn)); -int parser_warning(const char *s, ...) __attribute__((format (printf, 1, 2))); -void error_loc(const char *s, ...) __attribute__((format (printf, 1, 2))) __attribute__((noreturn)); -void error(const char *s, ...) __attribute__((format (printf, 1, 2))) __attribute__((noreturn)); -void error_loc_info(const loc_info_t *, const char *s, ...) __attribute__((format (printf, 2, 3))) __attribute__((noreturn)); -void warning(const char *s, ...) __attribute__((format (printf, 1, 2))); -void warning_loc_info(const loc_info_t *, const char *s, ...) __attribute__((format (printf, 2, 3))); -void chat(const char *s, ...) __attribute__((format (printf, 1, 2))); - -char *dup_basename(const char *name, const char *ext); -size_t widl_getline(char **linep, size_t *lenp, FILE *fp); - -UUID *parse_uuid(const char *u); -int is_valid_uuid(const char *s); - -/* buffer management */ - -extern int byte_swapped; -extern unsigned char *output_buffer; -extern size_t output_buffer_pos; -extern size_t output_buffer_size; - -extern void init_output_buffer(void); -extern void flush_output_buffer( const char *name ); -extern void add_output_to_resources( const char *type, const char *name ); -extern void flush_output_resources( const char *name ); -extern void put_data( const void *data, size_t size ); -extern void put_byte( unsigned char val ); -extern void put_word( unsigned short val ); -extern void put_dword( unsigned int val ); -extern void put_qword( unsigned int val ); -extern void put_pword( unsigned int val ); -extern void put_str( int indent, const char *format, ... ) __attribute__((format (printf, 2, 3))); -extern void align_output( unsigned int align ); - -/* typelibs expect the minor version to be stored in the higher bits and - * major to be stored in the lower bits */ -#define MAKEVERSION(major, minor) ((((minor) & 0xffff) << 16) | ((major) & 0xffff)) -#define MAJORVERSION(version) ((version) & 0xffff) -#define MINORVERSION(version) (((version) >> 16) & 0xffff) - -#ifndef max -#define max(a,b) (((a) > (b)) ? (a) : (b)) -#endif -#ifndef min -#define min(a,b) (((a) < (b)) ? (a) : (b)) -#endif - -#endif diff --git a/reactos/tools/widl/widl.c b/reactos/tools/widl/widl.c deleted file mode 100644 index 88d2d78b940..00000000000 --- a/reactos/tools/widl/widl.c +++ /dev/null @@ -1,826 +0,0 @@ -/* - * IDL Compiler - * - * Copyright 2002 Ove Kaaven - * based on WRC code by Bertho 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 "wine/port.h" - -#include -#include -#include -#include -#ifdef HAVE_UNISTD_H -# include -#endif -#include -#include -#include -#include -#ifdef HAVE_GETOPT_H -# include -#endif - -#include "widl.h" -#include "utils.h" -#include "parser.h" -#include "wine/wpp.h" -#include "header.h" - -/* future options to reserve characters for: */ -/* A = ACF input filename */ -/* J = do not search standard include path */ -/* w = select win16/win32 output (?) */ - -static const char usage[] = -"Usage: widl [options...] infile.idl\n" -" or: widl [options...] --dlldata-only name1 [name2...]\n" -" -b arch Set the target architecture\n" -" -c Generate client stub\n" -" -d n Set debug level to 'n'\n" -" -D id[=val] Define preprocessor identifier id=val\n" -" -E Preprocess only\n" -" -h Generate headers\n" -" -H file Name of header file (default is infile.h)\n" -" -I path Set include search dir to path (multiple -I allowed)\n" -" --local-stubs=file Write empty stubs for call_as/local methods to file\n" -" -m32, -m64 Set the kind of typelib to build (Win32 or Win64)\n" -" -N Do not preprocess input\n" -" --oldnames Use old naming conventions\n" -" -o, --output=NAME Set the output file name\n" -" -Otype Type of stubs to generate (-Os, -Oi, -Oif)\n" -" -p Generate proxy\n" -" --prefix-all=p Prefix names of client stubs / server functions with 'p'\n" -" --prefix-client=p Prefix names of client stubs with 'p'\n" -" --prefix-server=p Prefix names of server functions with 'p'\n" -" -r Generate registration script\n" -" -s Generate server stub\n" -" -t Generate typelib\n" -" -u Generate interface identifiers file\n" -" -V Print version and exit\n" -" -W Enable pedantic warnings\n" -" --win32 Only generate 32-bit code\n" -" --win64 Only generate 64-bit code\n" -" --win32-align n Set win32 structure alignment to 'n'\n" -" --win64-align n Set win64 structure alignment to 'n'\n" -"Debug level 'n' is a bitmask with following meaning:\n" -" * 0x01 Tell which resource is parsed (verbose mode)\n" -" * 0x02 Dump internal structures\n" -" * 0x04 Create a parser trace (yydebug=1)\n" -" * 0x08 Preprocessor messages\n" -" * 0x10 Preprocessor lex messages\n" -" * 0x20 Preprocessor yacc trace\n" -; - -static const char version_string[] = "Wine IDL Compiler version " PACKAGE_VERSION "\n" - "Copyright 2002 Ove Kaaven\n"; - -int debuglevel = DEBUGLEVEL_NONE; -int parser_debug, yy_flex_debug; - -int pedantic = 0; -int do_everything = 1; -static int preprocess_only = 0; -int do_header = 0; -int do_typelib = 0; -int do_proxies = 0; -int do_client = 0; -int do_server = 0; -int do_regscript = 0; -int do_idfile = 0; -int do_dlldata = 0; -static int no_preprocess = 0; -int old_names = 0; -int do_win32 = 1; -int do_win64 = 1; -int win32_packing = 8; -int win64_packing = 8; -static enum stub_mode stub_mode = MODE_Os; - -char *input_name; -char *header_name; -char *local_stubs_name; -char *header_token; -char *typelib_name; -char *dlldata_name; -char *proxy_name; -char *proxy_token; -char *client_name; -char *client_token; -char *server_name; -char *server_token; -char *regscript_name; -char *regscript_token; -static char *idfile_name; -static char *idfile_token; -char *temp_name; -const char *prefix_client = ""; -const char *prefix_server = ""; - -int line_number = 1; - -static FILE *idfile; - -unsigned int pointer_size = 0; -syskind_t typelib_kind = sizeof(void*) == 8 ? SYS_WIN64 : SYS_WIN32; - -time_t now; - -enum { - OLDNAMES_OPTION = CHAR_MAX + 1, - DLLDATA_OPTION, - DLLDATA_ONLY_OPTION, - LOCAL_STUBS_OPTION, - PREFIX_ALL_OPTION, - PREFIX_CLIENT_OPTION, - PREFIX_SERVER_OPTION, - WIN32_OPTION, - WIN64_OPTION, - WIN32_ALIGN_OPTION, - WIN64_ALIGN_OPTION -}; - -static const char short_options[] = - "b:cC:d:D:EhH:I:m:No:O:pP:rsS:tT:uU:VW"; -static const struct option long_options[] = { - { "dlldata", 1, NULL, DLLDATA_OPTION }, - { "dlldata-only", 0, NULL, DLLDATA_ONLY_OPTION }, - { "local-stubs", 1, NULL, LOCAL_STUBS_OPTION }, - { "oldnames", 0, NULL, OLDNAMES_OPTION }, - { "output", 0, NULL, 'o' }, - { "prefix-all", 1, NULL, PREFIX_ALL_OPTION }, - { "prefix-client", 1, NULL, PREFIX_CLIENT_OPTION }, - { "prefix-server", 1, NULL, PREFIX_SERVER_OPTION }, - { "win32", 0, NULL, WIN32_OPTION }, - { "win64", 0, NULL, WIN64_OPTION }, - { "win32-align", 1, NULL, WIN32_ALIGN_OPTION }, - { "win64-align", 1, NULL, WIN64_ALIGN_OPTION }, - { NULL, 0, NULL, 0 } -}; - -static void rm_tempfile(void); - -enum stub_mode get_stub_mode(void) -{ - /* old-style interpreted stubs are not supported on 64-bit */ - if (stub_mode == MODE_Oi && pointer_size == 8) return MODE_Oif; - return stub_mode; -} - -static char *make_token(const char *name) -{ - char *token; - char *slash; - int i; - - slash = strrchr(name, '/'); - if(!slash) - slash = strrchr(name, '\\'); - - if (slash) name = slash + 1; - - token = xstrdup(name); - for (i=0; token[i]; i++) { - if (!isalnum(token[i])) token[i] = '_'; - else token[i] = toupper(token[i]); - } - return token; -} - -/* duplicate a basename into a valid C token */ -static char *dup_basename_token(const char *name, const char *ext) -{ - char *p, *ret = dup_basename( name, ext ); - /* map invalid characters to '_' */ - for (p = ret; *p; p++) if (!isalnum(*p)) *p = '_'; - return ret; -} - -static void add_widl_version_define(void) -{ - unsigned int version; - const char *p = PACKAGE_VERSION; - - /* major */ - version = atoi(p) * 0x10000; - p = strchr(p, '.'); - - /* minor */ - if (p) - { - version += atoi(p + 1) * 0x100; - p = strchr(p + 1, '.'); - } - - /* build */ - if (p) - version += atoi(p + 1); - - if (version != 0) - { - char version_str[11]; - snprintf(version_str, sizeof(version_str), "0x%x", version); - wpp_add_define("__WIDL__", version_str); - } - else - wpp_add_define("__WIDL__", NULL); -} - -/* set the target platform */ -static void set_target( const char *target ) -{ - static const struct - { - const char *name; - syskind_t kind; - } cpu_names[] = - { - { "i386", SYS_WIN32 }, - { "i486", SYS_WIN32 }, - { "i586", SYS_WIN32 }, - { "i686", SYS_WIN32 }, - { "i786", SYS_WIN32 }, - { "amd64", SYS_WIN64 }, - { "x86_64", SYS_WIN64 }, - { "sparc", SYS_WIN32 }, - { "alpha", SYS_WIN32 }, - { "powerpc", SYS_WIN32 }, - { "arm", SYS_WIN32 } - }; - - unsigned int i; - char *p, *spec = xstrdup( target ); - - /* target specification is in the form CPU-MANUFACTURER-OS or CPU-MANUFACTURER-KERNEL-OS */ - - if (!(p = strchr( spec, '-' ))) error( "Invalid target specification '%s'\n", target ); - *p++ = 0; - for (i = 0; i < sizeof(cpu_names)/sizeof(cpu_names[0]); i++) - { - if (!strcmp( cpu_names[i].name, spec )) - { - typelib_kind = cpu_names[i].kind; - free( spec ); - return; - } - } - error( "Unrecognized CPU '%s'\n", spec ); -} - -/* clean things up when aborting on a signal */ -static void exit_on_signal( int sig ) -{ - exit(1); /* this will call the atexit functions */ -} - -static void set_everything(int x) -{ - do_header = x; - do_typelib = x; - do_proxies = x; - do_client = x; - do_server = x; - do_regscript = x; - do_idfile = x; - do_dlldata = x; -} - -void start_cplusplus_guard(FILE *fp) -{ - fprintf(fp, "#ifdef __cplusplus\n"); - fprintf(fp, "extern \"C\" {\n"); - fprintf(fp, "#endif\n\n"); -} - -void end_cplusplus_guard(FILE *fp) -{ - fprintf(fp, "#ifdef __cplusplus\n"); - fprintf(fp, "}\n"); - fprintf(fp, "#endif\n\n"); -} - -typedef struct -{ - char *filename; - struct list link; -} filename_node_t; - -static void add_filename_node(struct list *list, const char *name) -{ - filename_node_t *node = xmalloc(sizeof *node); - node->filename = dup_basename( name, ".idl" ); - list_add_tail(list, &node->link); -} - -static void free_filename_nodes(struct list *list) -{ - filename_node_t *node, *next; - LIST_FOR_EACH_ENTRY_SAFE(node, next, list, filename_node_t, link) { - list_remove(&node->link); - free(node->filename); - free(node); - } -} - -static void write_dlldata_list(struct list *filenames) -{ - FILE *dlldata; - filename_node_t *node; - - dlldata = fopen(dlldata_name, "w"); - if (!dlldata) - error("couldn't open %s: %s\n", dlldata_name, strerror(errno)); - - fprintf(dlldata, "/*** Autogenerated by WIDL %s ", PACKAGE_VERSION); - fprintf(dlldata, "- Do not edit ***/\n\n"); - fprintf(dlldata, "#include \n"); - fprintf(dlldata, "#include \n\n"); - start_cplusplus_guard(dlldata); - - LIST_FOR_EACH_ENTRY(node, filenames, filename_node_t, link) - fprintf(dlldata, "EXTERN_PROXY_FILE(%s)\n", node->filename); - - fprintf(dlldata, "\nPROXYFILE_LIST_START\n"); - fprintf(dlldata, "/* Start of list */\n"); - LIST_FOR_EACH_ENTRY(node, filenames, filename_node_t, link) - fprintf(dlldata, " REFERENCE_PROXY_FILE(%s),\n", node->filename); - fprintf(dlldata, "/* End of list */\n"); - fprintf(dlldata, "PROXYFILE_LIST_END\n\n"); - - fprintf(dlldata, "DLLDATA_ROUTINES(aProxyFileList, GET_DLL_CLSID)\n\n"); - end_cplusplus_guard(dlldata); - fclose(dlldata); -} - -static char *eat_space(char *s) -{ - while (isspace((unsigned char) *s)) - ++s; - return s; -} - -void write_dlldata(const statement_list_t *stmts) -{ - struct list filenames = LIST_INIT(filenames); - filename_node_t *node; - FILE *dlldata; - - if (!do_dlldata || !need_proxy_file(stmts)) - return; - - dlldata = fopen(dlldata_name, "r"); - if (dlldata) { - static char marker[] = "REFERENCE_PROXY_FILE"; - char *line = NULL; - size_t len = 0; - - while (widl_getline(&line, &len, dlldata)) { - char *start, *end; - start = eat_space(line); - if (strncmp(start, marker, sizeof marker - 1) == 0) { - start = eat_space(start + sizeof marker - 1); - if (*start != '(') - continue; - end = start = eat_space(start + 1); - while (*end && *end != ')') - ++end; - if (*end != ')') - continue; - while (isspace((unsigned char) end[-1])) - --end; - *end = '\0'; - if (start < end) - add_filename_node(&filenames, start); - } - } - - if (ferror(dlldata)) - error("couldn't read from %s: %s\n", dlldata_name, strerror(errno)); - - free(line); - fclose(dlldata); - } - - LIST_FOR_EACH_ENTRY(node, &filenames, filename_node_t, link) - if (strcmp(proxy_token, node->filename) == 0) { - /* We're already in the list, no need to regenerate this file. */ - free_filename_nodes(&filenames); - return; - } - - add_filename_node(&filenames, proxy_token); - write_dlldata_list(&filenames); - free_filename_nodes(&filenames); -} - -static void write_id_data_stmts(const statement_list_t *stmts) -{ - const statement_t *stmt; - if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) - { - if (stmt->type == STMT_TYPE) - { - const type_t *type = stmt->u.type; - if (type_get_type(type) == TYPE_INTERFACE) - { - const UUID *uuid; - if (!is_object(type) && !is_attr(type->attrs, ATTR_DISPINTERFACE)) - continue; - uuid = get_attrp(type->attrs, ATTR_UUID); - write_guid(idfile, is_attr(type->attrs, ATTR_DISPINTERFACE) ? "DIID" : "IID", - type->name, uuid); - } - else if (type_get_type(type) == TYPE_COCLASS) - { - const UUID *uuid = get_attrp(type->attrs, ATTR_UUID); - write_guid(idfile, "CLSID", type->name, uuid); - } - } - else if (stmt->type == STMT_LIBRARY) - { - const UUID *uuid = get_attrp(stmt->u.lib->attrs, ATTR_UUID); - write_guid(idfile, "LIBID", stmt->u.lib->name, uuid); - write_id_data_stmts(stmt->u.lib->stmts); - } - } -} - -void write_id_data(const statement_list_t *stmts) -{ - if (!do_idfile) return; - - idfile_token = make_token(idfile_name); - - idfile = fopen(idfile_name, "w"); - if (! idfile) { - error("Could not open %s for output\n", idfile_name); - return; - } - - fprintf(idfile, "/*** Autogenerated by WIDL %s ", PACKAGE_VERSION); - fprintf(idfile, "from %s - Do not edit ***/\n\n", input_name); - fprintf(idfile, "#include \n"); - fprintf(idfile, "#include \n\n"); - fprintf(idfile, "#include \n\n"); - start_cplusplus_guard(idfile); - - write_id_data_stmts(stmts); - - fprintf(idfile, "\n"); - end_cplusplus_guard(idfile); - - fclose(idfile); -} - -int main(int argc,char *argv[]) -{ - int optc; - int ret = 0; - int opti = 0; - char *output_name = NULL; - - signal( SIGTERM, exit_on_signal ); - signal( SIGINT, exit_on_signal ); -#ifdef SIGHUP - signal( SIGHUP, exit_on_signal ); -#endif - - now = time(NULL); - - while((optc = getopt_long(argc, argv, short_options, long_options, &opti)) != EOF) { - switch(optc) { - case DLLDATA_OPTION: - dlldata_name = xstrdup(optarg); - break; - case DLLDATA_ONLY_OPTION: - do_everything = 0; - do_dlldata = 1; - break; - case LOCAL_STUBS_OPTION: - do_everything = 0; - local_stubs_name = xstrdup(optarg); - break; - case OLDNAMES_OPTION: - old_names = 1; - break; - case PREFIX_ALL_OPTION: - prefix_client = xstrdup(optarg); - prefix_server = xstrdup(optarg); - break; - case PREFIX_CLIENT_OPTION: - prefix_client = xstrdup(optarg); - break; - case PREFIX_SERVER_OPTION: - prefix_server = xstrdup(optarg); - break; - case WIN32_OPTION: - do_win32 = 1; - do_win64 = 0; - break; - case WIN64_OPTION: - do_win32 = 0; - do_win64 = 1; - break; - case WIN32_ALIGN_OPTION: - win32_packing = strtol(optarg, NULL, 0); - if(win32_packing != 2 && win32_packing != 4 && win32_packing != 8) - error("Packing must be one of 2, 4 or 8\n"); - break; - case WIN64_ALIGN_OPTION: - win64_packing = strtol(optarg, NULL, 0); - if(win64_packing != 2 && win64_packing != 4 && win64_packing != 8) - error("Packing must be one of 2, 4 or 8\n"); - break; - case 'b': - set_target( optarg ); - break; - case 'c': - do_everything = 0; - do_client = 1; - break; - case 'C': - client_name = xstrdup(optarg); - break; - case 'd': - debuglevel = strtol(optarg, NULL, 0); - break; - case 'D': - wpp_add_cmdline_define(optarg); - break; - case 'E': - do_everything = 0; - preprocess_only = 1; - break; - case 'h': - do_everything = 0; - do_header = 1; - break; - case 'H': - header_name = xstrdup(optarg); - break; - case 'I': - wpp_add_include_path(optarg); - break; - case 'm': - if (!strcmp( optarg, "32" )) typelib_kind = SYS_WIN32; - else if (!strcmp( optarg, "64" )) typelib_kind = SYS_WIN64; - else error( "Invalid -m argument '%s'\n", optarg ); - break; - case 'N': - no_preprocess = 1; - break; - case 'o': - output_name = xstrdup(optarg); - break; - case 'O': - if (!strcmp( optarg, "s" )) stub_mode = MODE_Os; - else if (!strcmp( optarg, "i" )) stub_mode = MODE_Oi; - else if (!strcmp( optarg, "ic" )) stub_mode = MODE_Oif; - else if (!strcmp( optarg, "if" )) stub_mode = MODE_Oif; - else if (!strcmp( optarg, "icf" )) stub_mode = MODE_Oif; - else error( "Invalid argument '-O%s'\n", optarg ); - break; - case 'p': - do_everything = 0; - do_proxies = 1; - break; - case 'P': - proxy_name = xstrdup(optarg); - break; - case 'r': - do_everything = 0; - do_regscript = 1; - break; - case 's': - do_everything = 0; - do_server = 1; - break; - case 'S': - server_name = xstrdup(optarg); - break; - case 't': - do_everything = 0; - do_typelib = 1; - break; - case 'T': - typelib_name = xstrdup(optarg); - break; - case 'u': - do_everything = 0; - do_idfile = 1; - break; - case 'U': - idfile_name = xstrdup(optarg); - break; - case 'V': - printf("%s", version_string); - return 0; - case 'W': - pedantic = 1; - break; - default: - fprintf(stderr, "%s", usage); - return 1; - } - } - - if(do_everything) { - set_everything(TRUE); - } - - if (!output_name) output_name = dup_basename(input_name, ".idl"); - - if (!do_everything && - do_header + do_typelib + do_proxies + do_client + - do_server + do_regscript + do_idfile + do_dlldata == 1) - { - if (do_header) header_name = output_name; - else if (do_typelib) typelib_name = output_name; - else if (do_proxies) proxy_name = output_name; - else if (do_client) client_name = output_name; - else if (do_server) server_name = output_name; - else if (do_regscript) regscript_name = output_name; - else if (do_idfile) idfile_name = output_name; - else if (do_dlldata) dlldata_name = output_name; - } - - if (!dlldata_name && do_dlldata) - dlldata_name = xstrdup("dlldata.c"); - - if(optind < argc) { - if (do_dlldata && !do_everything) { - struct list filenames = LIST_INIT(filenames); - for ( ; optind < argc; ++optind) - add_filename_node(&filenames, argv[optind]); - - write_dlldata_list(&filenames); - free_filename_nodes(&filenames); - return 0; - } - else if (optind != argc - 1) { - fprintf(stderr, "%s", usage); - return 1; - } - else - input_name = xstrdup(argv[optind]); - } - else { - fprintf(stderr, "%s", usage); - return 1; - } - - if(debuglevel) - { - setbuf(stdout, NULL); - setbuf(stderr, NULL); - } - - parser_debug = debuglevel & DEBUGLEVEL_TRACE ? 1 : 0; - yy_flex_debug = debuglevel & DEBUGLEVEL_TRACE ? 1 : 0; - - wpp_set_debug( (debuglevel & DEBUGLEVEL_PPLEX) != 0, - (debuglevel & DEBUGLEVEL_PPTRACE) != 0, - (debuglevel & DEBUGLEVEL_PPMSG) != 0 ); - - if (!header_name) { - header_name = dup_basename(input_name, ".idl"); - strcat(header_name, ".h"); - } - - if (!typelib_name && do_typelib) { - typelib_name = dup_basename(input_name, ".idl"); - strcat(typelib_name, ".tlb"); - } - - if (!proxy_name && do_proxies) { - proxy_name = dup_basename(input_name, ".idl"); - strcat(proxy_name, "_p.c"); - } - - if (!client_name && do_client) { - client_name = dup_basename(input_name, ".idl"); - strcat(client_name, "_c.c"); - } - - if (!server_name && do_server) { - server_name = dup_basename(input_name, ".idl"); - strcat(server_name, "_s.c"); - } - - if (!regscript_name && do_regscript) { - regscript_name = dup_basename(input_name, ".idl"); - strcat(regscript_name, "_r.rgs"); - } - - if (!idfile_name && do_idfile) { - idfile_name = dup_basename(input_name, ".idl"); - strcat(idfile_name, "_i.c"); - } - - if (do_proxies) proxy_token = dup_basename_token(proxy_name,"_p.c"); - if (do_client) client_token = dup_basename_token(client_name,"_c.c"); - if (do_server) server_token = dup_basename_token(server_name,"_s.c"); - if (do_regscript) regscript_token = dup_basename_token(regscript_name,"_r.rgs"); - - add_widl_version_define(); - wpp_add_define("_WIN32", NULL); - - atexit(rm_tempfile); - if (!no_preprocess) - { - chat("Starting preprocess\n"); - - if (!preprocess_only) - { - FILE *output; - int fd; - char *name = xmalloc( strlen(header_name) + 8 ); - - strcpy( name, header_name ); - strcat( name, ".XXXXXX" ); - - if ((fd = mkstemps( name, 0 )) == -1) - error("Could not generate a temp name from %s\n", name); - - temp_name = name; - if (!(output = fdopen(fd, "wt"))) - error("Could not open fd %s for writing\n", name); - - ret = wpp_parse( input_name, output ); - fclose( output ); - } - else - { - ret = wpp_parse( input_name, stdout ); - } - - if(ret) exit(1); - if(preprocess_only) exit(0); - if(!(parser_in = fopen(temp_name, "r"))) { - fprintf(stderr, "Could not open %s for input\n", temp_name); - return 1; - } - } - else { - if(!(parser_in = fopen(input_name, "r"))) { - fprintf(stderr, "Could not open %s for input\n", input_name); - return 1; - } - } - - header_token = make_token(header_name); - - init_types(); - ret = parser_parse(); - - fclose(parser_in); - - if(ret) { - exit(1); - } - - /* Everything has been done successfully, don't delete any files. */ - set_everything(FALSE); - local_stubs_name = NULL; - - return 0; -} - -static void rm_tempfile(void) -{ - abort_import(); - if(temp_name) - unlink(temp_name); - if (do_header) - unlink(header_name); - if (local_stubs_name) - unlink(local_stubs_name); - if (do_client) - unlink(client_name); - if (do_server) - unlink(server_name); - if (do_regscript) - unlink(regscript_name); - if (do_idfile) - unlink(idfile_name); - if (do_proxies) - unlink(proxy_name); - if (do_typelib) - unlink(typelib_name); -} diff --git a/reactos/tools/widl/widl.h b/reactos/tools/widl/widl.h deleted file mode 100644 index 6551fa07fbe..00000000000 --- a/reactos/tools/widl/widl.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * IDL Compiler - * - * Copyright 2002 Ove Kaaven - * - * 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_WIDL_H -#define __WIDL_WIDL_H - -#include "widltypes.h" - -#include - -extern int debuglevel; -#define DEBUGLEVEL_NONE 0x0000 -#define DEBUGLEVEL_CHAT 0x0001 -#define DEBUGLEVEL_DUMP 0x0002 -#define DEBUGLEVEL_TRACE 0x0004 -#define DEBUGLEVEL_PPMSG 0x0008 -#define DEBUGLEVEL_PPLEX 0x0010 -#define DEBUGLEVEL_PPTRACE 0x0020 - -extern int pedantic; -extern int do_everything; -extern int do_header; -extern int do_typelib; -extern int do_proxies; -extern int do_client; -extern int do_server; -extern int do_regscript; -extern int do_idfile; -extern int do_dlldata; -extern int old_names; -extern int do_win32; -extern int do_win64; -extern int win32_packing; -extern int win64_packing; - -extern char *input_name; -extern char *header_name; -extern char *header_token; -extern char *local_stubs_name; -extern char *typelib_name; -extern char *dlldata_name; -extern char *proxy_name; -extern char *proxy_token; -extern char *client_name; -extern char *client_token; -extern char *server_name; -extern char *server_token; -extern char *regscript_name; -extern char *regscript_token; -extern const char *prefix_client; -extern const char *prefix_server; -extern unsigned int pointer_size; -extern time_t now; - -extern int line_number; -extern int char_number; - -enum stub_mode -{ - MODE_Os, /* inline stubs */ - MODE_Oi, /* old-style interpreted stubs */ - MODE_Oif /* new-style fully interpreted stubs */ -}; -extern enum stub_mode get_stub_mode(void); - -extern void write_header(const statement_list_t *stmts); -extern void write_id_data(const statement_list_t *stmts); -extern void write_proxies(const statement_list_t *stmts); -extern void write_client(const statement_list_t *stmts); -extern void write_server(const statement_list_t *stmts); -extern void write_regscript(const statement_list_t *stmts); -extern void output_typelib_regscript( const typelib_t *typelib ); -extern void write_local_stubs(const statement_list_t *stmts); -extern void write_dlldata(const statement_list_t *stmts); - -extern void start_cplusplus_guard(FILE *fp); -extern void end_cplusplus_guard(FILE *fp); - -#endif diff --git a/reactos/tools/widl/widl.rbuild b/reactos/tools/widl/widl.rbuild deleted file mode 100644 index 8e070b5eab8..00000000000 --- a/reactos/tools/widl/widl.rbuild +++ /dev/null @@ -1,25 +0,0 @@ - - - - SHORT - . - wpp - client.c - expr.c - hash.c - header.c - proxy.c - register.c - server.c - typegen.c - typelib.c - typetree.c - utils.c - widl.c - write_msft.c - parser.yy.c - parser.tab.c - - mkstemps.c - - diff --git a/reactos/tools/widl/widl_ros.diff b/reactos/tools/widl/widl_ros.diff deleted file mode 100644 index 919fc39e57c..00000000000 --- a/reactos/tools/widl/widl_ros.diff +++ /dev/null @@ -1,126 +0,0 @@ -diff -u wine-1.3.4/tools/widl/hash.c tools/widl/hash.c ---- wine-1.3.4/tools/widl/hash.c 2010-09-19 17:48:47.640625000 +0200 -+++ tools/widl/hash.c 2010-09-19 19:17:19.000000000 +0200 -@@ -21,9 +21,7 @@ - #include - #include - --#include "windef.h" --#include "winbase.h" --#include "winnls.h" -+#include - - #include "widltypes.h" - #include "hash.h" -diff -u wine-1.3.4/tools/widl/header.c tools/widl/header.c ---- wine-1.3.4/tools/widl/header.c 2010-09-19 17:48:47.640625000 +0200 -+++ tools/widl/header.c 2010-10-26 18:30:19.000000000 +0200 -@@ -1081,15 +1081,7 @@ - { - unsigned int ver = get_attrv(iface->attrs, ATTR_VERSION); - const char *var = get_attrp(iface->attrs, ATTR_IMPLICIT_HANDLE); -- static int allocate_written = 0; - -- if (!allocate_written) -- { -- allocate_written = 1; -- fprintf(header, "void * __RPC_USER MIDL_user_allocate(SIZE_T);\n"); -- fprintf(header, "void __RPC_USER MIDL_user_free(void *);\n\n"); -- } -- - fprintf(header, "/*****************************************************************************\n"); - fprintf(header, " * %s interface (v%d.%d)\n", iface->name, MAJORVERSION(ver), MINORVERSION(ver)); - fprintf(header, " */\n"); -diff -u wine-1.3.4/tools/widl/parser.y tools/widl/parser.y ---- wine-1.3.4/tools/widl/parser.y 2010-09-19 17:49:40.578125000 +0200 -+++ tools/widl/parser.y 2010-10-03 16:44:18.781250000 +0200 -@@ -1816,6 +1816,12 @@ - else if (is_attr(attrs, ATTR_UUID) && !is_attr(attrs, ATTR_PUBLIC)) - attrs = append_attr( attrs, make_attr(ATTR_PUBLIC) ); - -+ /* Append the SWITCHTYPE attribute to a union if it does not already have one. */ -+ if (type_get_type_detect_alias(type) == TYPE_UNION && -+ is_attr(attrs, ATTR_SWITCHTYPE) && -+ !is_attr(type->attrs, ATTR_SWITCHTYPE)) -+ type->attrs = append_attr(type->attrs, make_attrp(ATTR_SWITCHTYPE, get_attrp(attrs, ATTR_SWITCHTYPE))); -+ - LIST_FOR_EACH_ENTRY( decl, decls, const declarator_t, entry ) - { - -diff -u wine-1.3.4/tools/widl/typelib.c tools/widl/typelib.c ---- wine-1.3.4/tools/widl/typelib.c 2010-09-19 17:50:24.000000000 +0200 -+++ tools/widl/typelib.c 2010-09-26 20:23:47.000000000 +0200 -@@ -35,8 +35,7 @@ - #define NONAMELESSUNION - #define NONAMELESSSTRUCT - --#include "windef.h" --#include "winbase.h" -+#include - - #include "widl.h" - #include "utils.h" -diff -u wine-1.3.4/tools/widl/typelib_struct.h tools/widl/typelib_struct.h ---- wine-1.3.4/tools/widl/typelib_struct.h 2010-09-19 17:50:40.953125000 +0200 -+++ tools/widl/typelib_struct.h 2010-10-10 00:50:32.921875000 +0200 -@@ -302,7 +302,7 @@ - * - */ - --#include "pshpack1.h" -+#include - - typedef struct { - /*00*/ DWORD SLTG_magic; /* 0x47544c53 == "SLTG" */ -@@ -599,7 +599,7 @@ - WORD typeofarray - */ - --#include "poppack.h" -+#include - - /*---------------------------END--------------------------------------------*/ - #endif -diff -u wine-1.3.4/tools/widl/widltypes.h tools/widl/widltypes.h ---- wine-1.3.4/tools/widl/widltypes.h 2010-09-19 17:51:38.890625000 +0200 -+++ tools/widl/widltypes.h 2010-09-19 19:17:19.656250000 +0200 -@@ -21,6 +21,13 @@ - #ifndef __WIDL_WIDLTYPES_H - #define __WIDL_WIDLTYPES_H - -+#define S_OK 0 -+#define S_FALSE 1 -+#define E_OUTOFMEMORY ((HRESULT)0x8007000EL) -+#define TYPE_E_IOERROR ((HRESULT)0x80028CA2L) -+ -+#define max(a, b) ((a) > (b) ? a : b) -+ - #include - #include - #include "guiddef.h" -@@ -32,7 +39,9 @@ - typedef GUID UUID; - #endif - -+#ifndef TRUE - #define TRUE 1 -+#endif - #define FALSE 0 - - typedef struct _loc_info_t loc_info_t; -diff -u wine-1.3.4/tools/widl/write_msft.c tools/widl/write_msft.c ---- wine-1.3.4/tools/widl/write_msft.c 2010-09-19 17:51:48.531250000 +0200 -+++ tools/widl/write_msft.c 2010-09-26 20:23:47.000000000 +0200 -@@ -40,10 +40,8 @@ - #define NONAMELESSUNION - #define NONAMELESSSTRUCT - --#include "winerror.h" --#include "windef.h" --#include "winbase.h" --#include "winnls.h" -+#include -+#include - - #include "widl.h" - #include "typelib.h" diff --git a/reactos/tools/widl/widltypes.h b/reactos/tools/widl/widltypes.h deleted file mode 100644 index 0ef07bec8a6..00000000000 --- a/reactos/tools/widl/widltypes.h +++ /dev/null @@ -1,599 +0,0 @@ -/* - * IDL Compiler - * - * Copyright 2002 Ove Kaaven - * - * 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_WIDLTYPES_H -#define __WIDL_WIDLTYPES_H - -#define S_OK 0 -#define S_FALSE 1 -#define E_OUTOFMEMORY ((HRESULT)0x8007000EL) -#define TYPE_E_IOERROR ((HRESULT)0x80028CA2L) - -#define max(a, b) ((a) > (b) ? a : b) - -#include -#include -#include "guiddef.h" -#include "wine/rpcfc.h" -#include "wine/list.h" - -#ifndef UUID_DEFINED -#define UUID_DEFINED -typedef GUID UUID; -#endif - -#define TRUE 1 -#define FALSE 0 - -typedef struct _loc_info_t loc_info_t; -typedef struct _attr_t attr_t; -typedef struct _expr_t expr_t; -typedef struct _type_t type_t; -typedef struct _var_t var_t; -typedef struct _declarator_t declarator_t; -typedef struct _ifref_t ifref_t; -typedef struct _typelib_entry_t typelib_entry_t; -typedef struct _importlib_t importlib_t; -typedef struct _importinfo_t importinfo_t; -typedef struct _typelib_t typelib_t; -typedef struct _user_type_t user_type_t; -typedef struct _user_type_t context_handle_t; -typedef struct _user_type_t generic_handle_t; -typedef struct _type_list_t type_list_t; -typedef struct _statement_t statement_t; - -typedef struct list attr_list_t; -typedef struct list str_list_t; -typedef struct list expr_list_t; -typedef struct list var_list_t; -typedef struct list declarator_list_t; -typedef struct list ifref_list_t; -typedef struct list array_dims_t; -typedef struct list user_type_list_t; -typedef struct list context_handle_list_t; -typedef struct list generic_handle_list_t; -typedef struct list statement_list_t; - -enum attr_type -{ - ATTR_AGGREGATABLE, - ATTR_ANNOTATION, - ATTR_APPOBJECT, - ATTR_ASYNC, - ATTR_AUTO_HANDLE, - ATTR_BINDABLE, - ATTR_BROADCAST, - ATTR_CALLAS, - ATTR_CALLCONV, /* calling convention pseudo-attribute */ - ATTR_CASE, - ATTR_CODE, - ATTR_COMMSTATUS, - ATTR_CONST, /* const pseudo-attribute */ - ATTR_CONTEXTHANDLE, - ATTR_CONTROL, - ATTR_DECODE, - ATTR_DEFAULT, - ATTR_DEFAULTBIND, - ATTR_DEFAULTCOLLELEM, - ATTR_DEFAULTVALUE, - ATTR_DEFAULTVTABLE, - ATTR_DISABLECONSISTENCYCHECK, - ATTR_DISPINTERFACE, - ATTR_DISPLAYBIND, - ATTR_DLLNAME, - ATTR_DUAL, - ATTR_ENABLEALLOCATE, - ATTR_ENCODE, - ATTR_ENDPOINT, - ATTR_ENTRY, - ATTR_EXPLICIT_HANDLE, - ATTR_FAULTSTATUS, - ATTR_FORCEALLOCATE, - ATTR_HANDLE, - ATTR_HELPCONTEXT, - ATTR_HELPFILE, - ATTR_HELPSTRING, - ATTR_HELPSTRINGCONTEXT, - ATTR_HELPSTRINGDLL, - ATTR_HIDDEN, - ATTR_ID, - ATTR_IDEMPOTENT, - ATTR_IGNORE, - ATTR_IIDIS, - ATTR_IMMEDIATEBIND, - ATTR_IMPLICIT_HANDLE, - ATTR_IN, - ATTR_INLINE, - ATTR_INPUTSYNC, - ATTR_LENGTHIS, - ATTR_LIBLCID, - ATTR_LICENSED, - ATTR_LOCAL, - ATTR_MAYBE, - ATTR_MESSAGE, - ATTR_NOCODE, - ATTR_NONBROWSABLE, - ATTR_NONCREATABLE, - ATTR_NONEXTENSIBLE, - ATTR_NOTIFY, - ATTR_NOTIFYFLAG, - ATTR_OBJECT, - ATTR_ODL, - ATTR_OLEAUTOMATION, - ATTR_OPTIMIZE, - ATTR_OPTIONAL, - ATTR_OUT, - ATTR_PARAMLCID, - ATTR_PARTIALIGNORE, - ATTR_POINTERDEFAULT, - ATTR_POINTERTYPE, - ATTR_PROGID, - ATTR_PROPGET, - ATTR_PROPPUT, - ATTR_PROPPUTREF, - ATTR_PROXY, - ATTR_PUBLIC, - ATTR_RANGE, - ATTR_READONLY, - ATTR_REPRESENTAS, - ATTR_REQUESTEDIT, - ATTR_RESTRICTED, - ATTR_RETVAL, - ATTR_SIZEIS, - ATTR_SOURCE, - ATTR_STRICTCONTEXTHANDLE, - ATTR_STRING, - ATTR_SWITCHIS, - ATTR_SWITCHTYPE, - ATTR_THREADING, - ATTR_TRANSMITAS, - ATTR_UIDEFAULT, - ATTR_USERMARSHAL, - ATTR_USESGETLASTERROR, - ATTR_UUID, - ATTR_V1ENUM, - ATTR_VARARG, - ATTR_VERSION, - ATTR_VIPROGID, - ATTR_WIREMARSHAL -}; - -enum expr_type -{ - EXPR_VOID, - EXPR_NUM, - EXPR_HEXNUM, - EXPR_DOUBLE, - EXPR_IDENTIFIER, - EXPR_NEG, - EXPR_NOT, - EXPR_PPTR, - EXPR_CAST, - EXPR_SIZEOF, - EXPR_SHL, - EXPR_SHR, - EXPR_MUL, - EXPR_DIV, - EXPR_ADD, - EXPR_SUB, - EXPR_AND, - EXPR_OR, - EXPR_COND, - EXPR_TRUEFALSE, - EXPR_ADDRESSOF, - EXPR_MEMBER, - EXPR_ARRAY, - EXPR_MOD, - EXPR_LOGOR, - EXPR_LOGAND, - EXPR_XOR, - EXPR_EQUALITY, - EXPR_INEQUALITY, - EXPR_GTR, - EXPR_LESS, - EXPR_GTREQL, - EXPR_LESSEQL, - EXPR_LOGNOT, - EXPR_POS, - EXPR_STRLIT, - EXPR_WSTRLIT, - EXPR_CHARCONST, -}; - -enum type_kind -{ - TKIND_PRIMITIVE = -1, - TKIND_ENUM, - TKIND_RECORD, - TKIND_MODULE, - TKIND_INTERFACE, - TKIND_DISPATCH, - TKIND_COCLASS, - TKIND_ALIAS, - TKIND_UNION, - TKIND_MAX -}; - -enum storage_class -{ - STG_NONE, - STG_STATIC, - STG_EXTERN, - STG_REGISTER, -}; - -enum statement_type -{ - STMT_LIBRARY, - STMT_DECLARATION, - STMT_TYPE, - STMT_TYPEREF, - STMT_MODULE, - STMT_TYPEDEF, - STMT_IMPORT, - STMT_IMPORTLIB, - STMT_CPPQUOTE -}; - -enum threading_type -{ - THREADING_APARTMENT = 1, - THREADING_NEUTRAL, - THREADING_SINGLE, - THREADING_FREE, - THREADING_BOTH -}; - -enum type_basic_type -{ - TYPE_BASIC_INT8 = 1, - TYPE_BASIC_INT16, - TYPE_BASIC_INT32, - TYPE_BASIC_INT64, - TYPE_BASIC_INT, - TYPE_BASIC_INT3264, - TYPE_BASIC_CHAR, - TYPE_BASIC_HYPER, - TYPE_BASIC_BYTE, - TYPE_BASIC_WCHAR, - TYPE_BASIC_FLOAT, - TYPE_BASIC_DOUBLE, - TYPE_BASIC_ERROR_STATUS_T, - TYPE_BASIC_HANDLE, -}; - -#define TYPE_BASIC_MAX TYPE_BASIC_HANDLE -#define TYPE_BASIC_INT_MIN TYPE_BASIC_INT8 -#define TYPE_BASIC_INT_MAX TYPE_BASIC_HYPER - -struct _loc_info_t -{ - const char *input_name; - int line_number; - const char *near_text; -}; - -struct str_list_entry_t -{ - char *str; - struct list entry; -}; - -struct _attr_t { - enum attr_type type; - union { - unsigned int ival; - void *pval; - } u; - /* parser-internal */ - struct list entry; -}; - -struct _expr_t { - enum expr_type type; - const expr_t *ref; - union { - int lval; - double dval; - const char *sval; - const expr_t *ext; - type_t *tref; - } u; - const expr_t *ext2; - int is_const; - int cval; - /* parser-internal */ - struct list entry; -}; - -struct struct_details -{ - var_list_t *fields; -}; - -struct enumeration_details -{ - var_list_t *enums; -}; - -struct func_details -{ - var_list_t *args; - struct _type_t *rettype; - int idx; -}; - -struct iface_details -{ - statement_list_t *stmts; - var_list_t *disp_methods; - var_list_t *disp_props; - struct _type_t *inherit; -}; - -struct module_details -{ - statement_list_t *stmts; -}; - -struct array_details -{ - expr_t *size_is; - expr_t *length_is; - struct _type_t *elem; - unsigned int dim; - unsigned char ptr_def_fc; - unsigned char declptr; /* if declared as a pointer */ - unsigned short ptr_tfsoff; /* offset of pointer definition for declptr */ -}; - -struct coclass_details -{ - ifref_list_t *ifaces; -}; - -struct basic_details -{ - enum type_basic_type type; - int sign; -}; - -struct pointer_details -{ - struct _type_t *ref; - unsigned char def_fc; -}; - -struct bitfield_details -{ - struct _type_t *field; - const expr_t *bits; -}; - -enum type_type -{ - TYPE_VOID, - TYPE_BASIC, /* ints, floats and handles */ - TYPE_ENUM, - TYPE_STRUCT, - TYPE_ENCAPSULATED_UNION, - TYPE_UNION, - TYPE_ALIAS, - TYPE_MODULE, - TYPE_COCLASS, - TYPE_FUNCTION, - TYPE_INTERFACE, - TYPE_POINTER, - TYPE_ARRAY, - TYPE_BITFIELD, -}; - -struct _type_t { - const char *name; - enum type_type type_type; - attr_list_t *attrs; - union - { - struct struct_details *structure; - struct enumeration_details *enumeration; - struct func_details *function; - struct iface_details *iface; - struct module_details *module; - struct array_details array; - struct coclass_details coclass; - struct basic_details basic; - struct pointer_details pointer; - struct bitfield_details bitfield; - } details; - type_t *orig; /* dup'd types */ - unsigned int typestring_offset; - unsigned int ptrdesc; /* used for complex structs */ - int typelib_idx; - loc_info_t loc_info; - unsigned int ignore : 1; - unsigned int defined : 1; - unsigned int written : 1; - unsigned int user_types_registered : 1; - unsigned int tfswrite : 1; /* if the type needs to be written to the TFS */ - unsigned int checked : 1; - unsigned int is_alias : 1; /* is the type an alias? */ -}; - -struct _var_t { - char *name; - type_t *type; - attr_list_t *attrs; - expr_t *eval; - enum storage_class stgclass; - unsigned int procstring_offset; - - struct _loc_info_t loc_info; - - /* parser-internal */ - struct list entry; -}; - -struct _declarator_t { - var_t *var; - type_t *type; - type_t *func_type; - array_dims_t *array; - expr_t *bits; - - /* parser-internal */ - struct list entry; -}; - -struct _ifref_t { - type_t *iface; - attr_list_t *attrs; - - /* parser-internal */ - struct list entry; -}; - -struct _typelib_entry_t { - type_t *type; - struct list entry; -}; - -struct _importinfo_t { - int offset; - GUID guid; - int flags; - int id; - - char *name; - - importlib_t *importlib; -}; - -struct _importlib_t { - char *name; - - int version; - GUID guid; - - importinfo_t *importinfos; - int ntypeinfos; - - int allocated; - - struct list entry; -}; - -struct _typelib_t { - char *name; - const attr_list_t *attrs; - struct list importlibs; - statement_list_t *stmts; -}; - -struct _user_type_t { - struct list entry; - const char *name; -}; - -struct _type_list_t { - type_t *type; - struct _type_list_t *next; -}; - -struct _statement_t { - struct list entry; - enum statement_type type; - union - { - ifref_t iface; - type_t *type; - const char *str; - var_t *var; - typelib_t *lib; - type_list_t *type_list; - } u; -}; - -typedef enum { - SYS_WIN16, - SYS_WIN32, - SYS_MAC, - SYS_WIN64 -} syskind_t; - -extern syskind_t typelib_kind; -extern user_type_list_t user_type_list; -extern context_handle_list_t context_handle_list; -extern generic_handle_list_t generic_handle_list; -void check_for_additional_prototype_types(const var_list_t *list); - -void init_types(void); -type_t *alloc_type(void); -void set_all_tfswrite(int val); -void clear_all_offsets(void); - -int is_ptr(const type_t *t); -int is_array(const type_t *t); - -#define tsENUM 1 -#define tsSTRUCT 2 -#define tsUNION 3 - -var_t *find_const(const char *name, int f); -type_t *find_type(const char *name, int t); -type_t *make_type(enum type_type type); -type_t *get_type(enum type_type type, char *name, int t); -type_t *reg_type(type_t *type, const char *name, int t); -void add_incomplete(type_t *t); - -var_t *make_var(char *name); -var_list_t *append_var(var_list_t *list, var_t *var); - -void init_loc_info(loc_info_t *); - -static inline var_list_t *type_get_function_args(const type_t *func_type) -{ - return func_type->details.function->args; -} - -static inline enum type_type type_get_type_detect_alias(const type_t *type) -{ - if (type->is_alias) - return TYPE_ALIAS; - return type->type_type; -} - -#define STATEMENTS_FOR_EACH_FUNC(stmt, stmts) \ - if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, statement_t, entry ) \ - if (stmt->type == STMT_DECLARATION && stmt->u.var->stgclass == STG_NONE && \ - type_get_type_detect_alias(stmt->u.var->type) == TYPE_FUNCTION) - -static inline int statements_has_func(const statement_list_t *stmts) -{ - const statement_t *stmt; - int has_func = 0; - STATEMENTS_FOR_EACH_FUNC(stmt, stmts) - { - has_func = 1; - break; - } - return has_func; -} - -#endif diff --git a/reactos/tools/widl/write_msft.c b/reactos/tools/widl/write_msft.c deleted file mode 100644 index 5e5020dd29b..00000000000 --- a/reactos/tools/widl/write_msft.c +++ /dev/null @@ -1,2619 +0,0 @@ -/* - * 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]; - unsigned 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]) { - unsigned 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[((unsigned 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; - unsigned 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) | - typelib->typelib_segment_data[MSFT_SEG_STRING][offset + 0]) + 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) | - typelib->typelib_segment_data[MSFT_SEG_IMPORTFILES][offset + 0xc]) >> 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; - unsigned 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; - unsigned 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); - - if (strendswith( typelib_name, ".res" )) /* create a binary resource file */ - { - add_output_to_resources( "TYPELIB", "#1" ); - output_typelib_regscript( typelib->typelib ); - flush_output_resources( typelib_name ); - } - else flush_output_buffer( typelib_name ); -} - -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/reactos/tools/winebuild/Makefile.in b/reactos/tools/winebuild/Makefile.in deleted file mode 100644 index c4ae029efe8..00000000000 --- a/reactos/tools/winebuild/Makefile.in +++ /dev/null @@ -1,39 +0,0 @@ -TOPSRCDIR = @top_srcdir@ -TOPOBJDIR = ../.. -SRCDIR = @srcdir@ -VPATH = @srcdir@ -EXEEXT = @EXEEXT@ -DEFS = -D__WINESRC__ $(EXTRADEFS) - -PROGRAMS = winebuild$(EXEEXT) -MANPAGES = winebuild.man -MODULE = none - -C_SRCS = \ - import.c \ - main.c \ - parser.c \ - relay.c \ - res16.c \ - res32.c \ - spec16.c \ - spec32.c \ - utils.c - -INSTALLDIRS = $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man$(prog_manext) - -all: $(PROGRAMS) $(MANPAGES) - -@MAKE_RULES@ - -winebuild$(EXEEXT): $(OBJS) - $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBPORT) $(LDFLAGS) - -install install-dev:: $(PROGRAMS) $(MANPAGES) $(INSTALLDIRS) - $(INSTALL_PROGRAM) winebuild$(EXEEXT) $(DESTDIR)$(bindir)/winebuild$(EXEEXT) - $(INSTALL_DATA) winebuild.man $(DESTDIR)$(mandir)/man$(prog_manext)/winebuild.$(prog_manext) - -uninstall:: - $(RM) $(DESTDIR)$(bindir)/winebuild$(EXEEXT) $(DESTDIR)$(mandir)/man$(prog_manext)/winebuild.$(prog_manext) - -@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/reactos/tools/winebuild/build.h b/reactos/tools/winebuild/build.h deleted file mode 100644 index 39e04b2a477..00000000000 --- a/reactos/tools/winebuild/build.h +++ /dev/null @@ -1,329 +0,0 @@ -/* - * Copyright 1993 Robert J. Amstadt - * Copyright 1995 Martin von Loewis - * Copyright 1995, 1996, 1997 Alexandre Julliard - * Copyright 1997 Eric Youngdale - * Copyright 1999 Ulrich Weigand - * - * 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_BUILD_H -#define __WINE_BUILD_H - -#ifndef __WINE_CONFIG_H -# error You must include config.h to use this header -#endif - -#include -#include -#include - -#ifndef max -#define max(a,b) (((a) > (b)) ? (a) : (b)) -#endif -#ifndef min -#define min(a,b) (((a) < (b)) ? (a) : (b)) -#endif - -#define EXEEXT ".exe" - -typedef enum -{ - TYPE_VARIABLE, /* variable */ - TYPE_PASCAL, /* pascal function (Win16) */ - TYPE_ABS, /* absolute value (Win16) */ - TYPE_STUB, /* unimplemented stub */ - TYPE_STDCALL, /* stdcall function (Win32) */ - TYPE_CDECL, /* cdecl function (Win32) */ - TYPE_VARARGS, /* varargs function (Win32) */ - TYPE_FASTCALL, /* fastcall function (Win32) */ - TYPE_EXTERN, /* external symbol (Win32) */ - TYPE_NBTYPES -} ORD_TYPE; - -typedef enum -{ - SPEC_WIN16, - SPEC_WIN32 -} SPEC_TYPE; - -typedef struct -{ - int n_values; - int *values; -} ORD_VARIABLE; - -typedef struct -{ - char arg_types[21]; -} ORD_FUNCTION; - -typedef struct -{ - unsigned short value; -} ORD_ABS; - -typedef struct -{ - ORD_TYPE type; - int ordinal; - int lineno; - int flags; - char *name; /* public name of this function */ - char *link_name; /* name of the C symbol to link to */ - char *export_name; /* name exported under for noname exports */ - union - { - ORD_VARIABLE var; - ORD_FUNCTION func; - ORD_ABS abs; - } u; -} ORDDEF; - -typedef struct -{ - char *src_name; /* file name of the source spec file */ - char *file_name; /* file name of the dll */ - char *dll_name; /* internal name of the dll */ - char *init_func; /* initialization routine */ - char *main_module; /* main Win32 module for Win16 specs */ - SPEC_TYPE type; /* type of dll (Win16/Win32) */ - int base; /* ordinal base */ - int limit; /* ordinal limit */ - int stack_size; /* exe stack size */ - int heap_size; /* exe heap size */ - int nb_entry_points; /* number of used entry points */ - int alloc_entry_points; /* number of allocated entry points */ - int nb_names; /* number of entry points with names */ - unsigned int nb_resources; /* number of resources */ - int characteristics; /* characteristics for the PE header */ - int dll_characteristics;/* DLL characteristics for the PE header */ - int subsystem; /* subsystem id */ - int subsystem_major; /* subsystem version major number */ - int subsystem_minor; /* subsystem version minor number */ - ORDDEF *entry_points; /* dll entry points */ - ORDDEF **names; /* array of entry point names (points into entry_points) */ - ORDDEF **ordinals; /* array of dll ordinals (points into entry_points) */ - struct resource *resources; /* array of dll resources (format differs between Win16/Win32) */ -} DLLSPEC; - -enum target_cpu -{ - CPU_x86, CPU_x86_64, CPU_SPARC, CPU_ALPHA, CPU_POWERPC, CPU_ARM, CPU_LAST = CPU_ARM -}; - -enum target_platform -{ - PLATFORM_UNSPECIFIED, - PLATFORM_APPLE, - PLATFORM_FREEBSD, - PLATFORM_SOLARIS, - PLATFORM_WINDOWS -}; - -extern char *target_alias; -extern enum target_cpu target_cpu; -extern enum target_platform target_platform; - -/* entry point flags */ -#define FLAG_NORELAY 0x01 /* don't use relay debugging for this function */ -#define FLAG_NONAME 0x02 /* don't export function by name */ -#define FLAG_RET16 0x04 /* function returns a 16-bit value */ -#define FLAG_RET64 0x08 /* function returns a 64-bit value */ -#define FLAG_REGISTER 0x10 /* use register calling convention */ -#define FLAG_PRIVATE 0x20 /* function is private (cannot be imported) */ -#define FLAG_ORDINAL 0x40 /* function should be imported by ordinal */ - -#define FLAG_FORWARD 0x100 /* function is a forwarded name */ -#define FLAG_EXT_LINK 0x200 /* function links to an external symbol */ - -#define FLAG_CPU(cpu) (0x01000 << (cpu)) -#define FLAG_CPU_MASK (FLAG_CPU(CPU_LAST + 1) - FLAG_CPU(0)) -#define FLAG_CPU_WIN64 (FLAG_CPU(CPU_x86_64)) -#define FLAG_CPU_WIN32 (FLAG_CPU_MASK & ~FLAG_CPU_WIN64) - -#define MAX_ORDINALS 65535 - -/* some Windows constants */ - -#define IMAGE_FILE_RELOCS_STRIPPED 0x0001 /* No relocation info */ -#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002 -#define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004 -#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008 -#define IMAGE_FILE_AGGRESIVE_WS_TRIM 0x0010 -#define IMAGE_FILE_LARGE_ADDRESS_AWARE 0x0020 -#define IMAGE_FILE_16BIT_MACHINE 0x0040 -#define IMAGE_FILE_BYTES_REVERSED_LO 0x0080 -#define IMAGE_FILE_32BIT_MACHINE 0x0100 -#define IMAGE_FILE_DEBUG_STRIPPED 0x0200 -#define IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP 0x0400 -#define IMAGE_FILE_NET_RUN_FROM_SWAP 0x0800 -#define IMAGE_FILE_SYSTEM 0x1000 -#define IMAGE_FILE_DLL 0x2000 -#define IMAGE_FILE_UP_SYSTEM_ONLY 0x4000 -#define IMAGE_FILE_BYTES_REVERSED_HI 0x8000 - -#define IMAGE_DLLCHARACTERISTICS_NX_COMPAT 0x0100 - -#define IMAGE_SUBSYSTEM_NATIVE 1 -#define IMAGE_SUBSYSTEM_WINDOWS_GUI 2 -#define IMAGE_SUBSYSTEM_WINDOWS_CUI 3 - -/* global functions */ - -#ifndef __GNUC__ -#define __attribute__(X) -#endif - -#ifndef DECLSPEC_NORETURN -# if defined(_MSC_VER) && (_MSC_VER >= 1200) && !defined(MIDL_PASS) -# define DECLSPEC_NORETURN __declspec(noreturn) -# else -# define DECLSPEC_NORETURN __attribute__((noreturn)) -# endif -#endif - -extern void *xmalloc (size_t size); -extern void *xrealloc (void *ptr, size_t size); -extern char *xstrdup( const char *str ); -extern char *strupper(char *s); -extern int strendswith(const char* str, const char* end); -extern DECLSPEC_NORETURN void fatal_error( const char *msg, ... ) - __attribute__ ((__format__ (__printf__, 1, 2))); -extern DECLSPEC_NORETURN void fatal_perror( const char *msg, ... ) - __attribute__ ((__format__ (__printf__, 1, 2))); -extern void error( const char *msg, ... ) - __attribute__ ((__format__ (__printf__, 1, 2))); -extern void warning( const char *msg, ... ) - __attribute__ ((__format__ (__printf__, 1, 2))); -extern int output( const char *format, ... ) - __attribute__ ((__format__ (__printf__, 1, 2))); -extern const char *get_as_command(void); -extern const char *get_ld_command(void); -extern const char *get_nm_command(void); -extern const char *get_windres_command(void); -extern char *get_temp_file_name( const char *prefix, const char *suffix ); -extern void output_standard_file_header(void); -extern FILE *open_input_file( const char *srcdir, const char *name ); -extern void close_input_file( FILE *file ); -extern void dump_bytes( const void *buffer, unsigned int size ); -extern int remove_stdcall_decoration( char *name ); -extern void assemble_file( const char *src_file, const char *obj_file ); -extern DLLSPEC *alloc_dll_spec(void); -extern void free_dll_spec( DLLSPEC *spec ); -extern const char *make_c_identifier( const char *str ); -extern const char *get_stub_name( const ORDDEF *odp, const DLLSPEC *spec ); -extern enum target_cpu get_cpu_from_name( const char *name ); -extern unsigned int get_alignment(unsigned int align); -extern unsigned int get_page_size(void); -extern unsigned int get_ptr_size(void); -extern const char *asm_name( const char *func ); -extern const char *func_declaration( const char *func ); -extern const char *asm_globl( const char *func ); -extern const char *get_asm_ptr_keyword(void); -extern const char *get_asm_string_keyword(void); -extern const char *get_asm_short_keyword(void); -extern const char *get_asm_rodata_section(void); -extern const char *get_asm_string_section(void); -extern void output_function_size( const char *name ); -extern void output_gnu_stack_note(void); - -extern void add_import_dll( const char *name, const char *filename ); -extern void add_delayed_import( const char *name ); -extern void add_ignore_symbol( const char *name ); -extern void add_extra_ld_symbol( const char *name ); -extern void read_undef_symbols( DLLSPEC *spec, char **argv ); -extern int resolve_imports( DLLSPEC *spec ); -extern int has_imports(void); -extern int has_relays( DLLSPEC *spec ); -extern void output_get_pc_thunk(void); -extern void output_module( DLLSPEC *spec ); -extern void output_stubs( DLLSPEC *spec ); -extern void output_imports( DLLSPEC *spec ); -extern void output_exports( DLLSPEC *spec ); -extern int load_res32_file( const char *name, DLLSPEC *spec ); -extern void output_resources( DLLSPEC *spec ); -extern void output_bin_resources( DLLSPEC *spec, unsigned int start_rva ); -extern void output_fake_module( DLLSPEC *spec ); -extern void load_res16_file( const char *name, DLLSPEC *spec ); -extern void output_res16_data( DLLSPEC *spec ); -extern void output_bin_res16_data( DLLSPEC *spec ); -extern void output_res16_directory( DLLSPEC *spec ); -extern void output_bin_res16_directory( DLLSPEC *spec, unsigned int data_offset ); -extern void output_spec16_file( DLLSPEC *spec ); -extern void output_fake_module16( DLLSPEC *spec16 ); -extern void output_res_o_file( DLLSPEC *spec ); - -extern void BuildRelays16(void); -extern void BuildRelays32(void); -extern void BuildSpec16File( DLLSPEC *spec ); -extern void BuildSpec32File( DLLSPEC *spec ); -extern void BuildDef32File( DLLSPEC *spec ); -extern void BuildPedllFile( DLLSPEC *spec ); - -extern void add_16bit_exports( DLLSPEC *spec32, DLLSPEC *spec16 ); -extern int parse_spec_file( FILE *file, DLLSPEC *spec ); -extern int parse_def_file( FILE *file, DLLSPEC *spec ); - -/* buffer management */ - -extern int byte_swapped; -extern const char *input_buffer_filename; -extern const unsigned char *input_buffer; -extern size_t input_buffer_pos; -extern size_t input_buffer_size; -extern unsigned char *output_buffer; -extern size_t output_buffer_pos; -extern size_t output_buffer_size; - -extern void init_input_buffer( const char *file ); -extern void init_output_buffer(void); -extern void flush_output_buffer(void); -extern unsigned char get_byte(void); -extern unsigned short get_word(void); -extern unsigned int get_dword(void); -extern void put_data( const void *data, size_t size ); -extern void put_byte( unsigned char val ); -extern void put_word( unsigned short val ); -extern void put_dword( unsigned int val ); -extern void put_qword( unsigned int val ); -extern void put_pword( unsigned int val ); -extern void align_output( unsigned int align ); - -/* global variables */ - -extern int current_line; -extern int UsePIC; -extern int nb_lib_paths; -extern int nb_errors; -extern int display_warnings; -extern int kill_at; -extern int verbose; -extern int save_temps; -extern int link_ext_symbols; -extern int force_pointer_size; - -extern char *input_file_name; -extern char *spec_file_name; -extern FILE *output_file; -extern const char *output_file_name; -extern char **lib_path; - -extern char *as_command; -extern char *ld_command; -extern char *nm_command; - -#endif /* __WINE_BUILD_H */ diff --git a/reactos/tools/winebuild/import.c b/reactos/tools/winebuild/import.c deleted file mode 100644 index d41a754ac41..00000000000 --- a/reactos/tools/winebuild/import.c +++ /dev/null @@ -1,1306 +0,0 @@ -/* - * DLL imports support - * - * Copyright 2000, 2004 Alexandre Julliard - * Copyright 2000 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 "config.h" -#include "wine/port.h" - -#include -#include -#include -#include -#include -#include -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif - -#include "build.h" - -struct import -{ - DLLSPEC *spec; /* description of the imported dll */ - char *full_name; /* full name of the input file */ - dev_t dev; /* device/inode of the input file */ - ino_t ino; - int delay; /* delay or not dll loading ? */ - ORDDEF **exports; /* functions exported from this dll */ - int nb_exports; /* number of exported functions */ - ORDDEF **imports; /* functions we want to import from this dll */ - int nb_imports; /* number of imported functions */ -}; - -struct name_table -{ - char **names; - unsigned int count, size; -}; - -static struct name_table undef_symbols; /* list of undefined symbols */ -static struct name_table ignore_symbols; /* list of symbols to ignore */ -static struct name_table extra_ld_symbols; /* list of extra symbols that ld should resolve */ -static struct name_table delayed_imports; /* list of delayed import dlls */ -static struct name_table ext_link_imports; /* list of external symbols to link to */ - -static struct import **dll_imports = NULL; -static int nb_imports = 0; /* number of imported dlls (delayed or not) */ -static int nb_delayed = 0; /* number of delayed dlls */ -static int total_imports = 0; /* total number of imported functions */ -static int total_delayed = 0; /* total number of imported functions in delayed DLLs */ - - -static inline const char *ppc_reg( int reg ) -{ - static const char * const ppc_regs[32] = { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", - "r8", "r9", "r10","r11","r12","r13","r14","r15", - "r16","r17","r18","r19","r20","r21","r22","r23", - "r24","r25","r26","r27","r28","r29","r30","r31" }; - if (target_platform == PLATFORM_APPLE) return ppc_regs[reg]; - return ppc_regs[reg] + 1; /* skip the 'r' */ -} - -/* compare function names; helper for resolve_imports */ -static int name_cmp( const void *name, const void *entry ) -{ - return strcmp( *(const char* const *)name, *(const char* const *)entry ); -} - -/* compare function names; helper for resolve_imports */ -static int func_cmp( const void *func1, const void *func2 ) -{ - const ORDDEF *odp1 = *(const ORDDEF * const *)func1; - const ORDDEF *odp2 = *(const ORDDEF * const *)func2; - return strcmp( odp1->name ? odp1->name : odp1->export_name, - odp2->name ? odp2->name : odp2->export_name ); -} - -/* add a name to a name table */ -static inline void add_name( struct name_table *table, const char *name ) -{ - if (table->count == table->size) - { - table->size += (table->size / 2); - if (table->size < 32) table->size = 32; - table->names = xrealloc( table->names, table->size * sizeof(*table->names) ); - } - table->names[table->count++] = xstrdup( name ); -} - -/* remove a name from a name table */ -static inline void remove_name( struct name_table *table, unsigned int idx ) -{ - assert( idx < table->count ); - free( table->names[idx] ); - memmove( table->names + idx, table->names + idx + 1, - (table->count - idx - 1) * sizeof(*table->names) ); - table->count--; -} - -/* make a name table empty */ -static inline void empty_name_table( struct name_table *table ) -{ - unsigned int i; - - for (i = 0; i < table->count; i++) free( table->names[i] ); - table->count = 0; -} - -/* locate a name in a (sorted) list */ -static inline const char *find_name( const char *name, const struct name_table *table ) -{ - char **res = NULL; - - if (table->count) res = bsearch( &name, table->names, table->count, sizeof(*table->names), name_cmp ); - return res ? *res : NULL; -} - -/* sort a name table */ -static inline void sort_names( struct name_table *table ) -{ - if (table->count) qsort( table->names, table->count, sizeof(*table->names), name_cmp ); -} - -/* locate an export in a (sorted) export list */ -static inline ORDDEF *find_export( const char *name, ORDDEF **table, int size ) -{ - ORDDEF func, *odp, **res = NULL; - - func.name = xstrdup(name); - func.ordinal = -1; - odp = &func; - if (table) res = bsearch( &odp, table, size, sizeof(*table), func_cmp ); - free( func.name ); - return res ? *res : NULL; -} - -/* free an import structure */ -static void free_imports( struct import *imp ) -{ - free( imp->exports ); - free( imp->imports ); - free_dll_spec( imp->spec ); - free( imp->full_name ); - free( imp ); -} - -/* check whether a given dll is imported in delayed mode */ -static int is_delayed_import( const char *name ) -{ - unsigned int i; - - for (i = 0; i < delayed_imports.count; i++) - { - if (!strcmp( delayed_imports.names[i], name )) return 1; - } - return 0; -} - -/* check whether a given dll has already been imported */ -static struct import *is_already_imported( const char *name ) -{ - int i; - - for (i = 0; i < nb_imports; i++) - { - if (!strcmp( dll_imports[i]->spec->file_name, name )) return dll_imports[i]; - } - return NULL; -} - -/* open the .so library for a given dll in a specified path */ -static char *try_library_path( const char *path, const char *name ) -{ - char *buffer; - int fd; - - buffer = xmalloc( strlen(path) + strlen(name) + 9 ); - sprintf( buffer, "%s/lib%s.def", path, name ); - - /* check if the file exists */ - if ((fd = open( buffer, O_RDONLY )) != -1) - { - close( fd ); - return buffer; - } - free( buffer ); - return NULL; -} - -/* find the .def import library for a given dll */ -static char *find_library( const char *name ) -{ - char *fullname; - int i; - - for (i = 0; i < nb_lib_paths; i++) - { - if ((fullname = try_library_path( lib_path[i], name ))) return fullname; - } - fatal_error( "could not open .def file for %s\n", name ); - return NULL; -} - -/* read in the list of exported symbols of an import library */ -static int read_import_lib( struct import *imp ) -{ - FILE *f; - int i, ret; - struct stat stat; - struct import *prev_imp; - DLLSPEC *spec = imp->spec; - - f = open_input_file( NULL, imp->full_name ); - fstat( fileno(f), &stat ); - imp->dev = stat.st_dev; - imp->ino = stat.st_ino; - ret = parse_def_file( f, spec ); - close_input_file( f ); - if (!ret) return 0; - - /* check if we already imported that library from a different file */ - if ((prev_imp = is_already_imported( spec->file_name ))) - { - if (prev_imp->dev != imp->dev || prev_imp->ino != imp->ino) - fatal_error( "%s and %s have the same export name '%s'\n", - prev_imp->full_name, imp->full_name, spec->file_name ); - return 0; /* the same file was already loaded, ignore this one */ - } - - if (is_delayed_import( spec->file_name )) - { - imp->delay = 1; - nb_delayed++; - } - - if (spec->nb_entry_points) - { - imp->exports = xmalloc( spec->nb_entry_points * sizeof(*imp->exports) ); - for (i = 0; i < spec->nb_entry_points; i++) - imp->exports[imp->nb_exports++] = &spec->entry_points[i]; - qsort( imp->exports, imp->nb_exports, sizeof(*imp->exports), func_cmp ); - } - return 1; -} - -/* build the dll exported name from the import lib name or path */ -static char *get_dll_name( const char *name, const char *filename ) -{ - char *ret; - - if (filename) - { - const char *basename = strrchr( filename, '/' ); - if (!basename) basename = filename; - else basename++; - if (!strncmp( basename, "lib", 3 )) basename += 3; - ret = xmalloc( strlen(basename) + 5 ); - strcpy( ret, basename ); - if (strendswith( ret, ".def" )) ret[strlen(ret)-4] = 0; - } - else - { - ret = xmalloc( strlen(name) + 5 ); - strcpy( ret, name ); - } - if (!strchr( ret, '.' )) strcat( ret, ".dll" ); - return ret; -} - -/* add a dll to the list of imports */ -void add_import_dll( const char *name, const char *filename ) -{ - struct import *imp = xmalloc( sizeof(*imp) ); - - imp->spec = alloc_dll_spec(); - imp->spec->file_name = get_dll_name( name, filename ); - imp->delay = 0; - imp->imports = NULL; - imp->nb_imports = 0; - imp->exports = NULL; - imp->nb_exports = 0; - - if (filename) imp->full_name = xstrdup( filename ); - else imp->full_name = find_library( name ); - - if (read_import_lib( imp )) - { - dll_imports = xrealloc( dll_imports, (nb_imports+1) * sizeof(*dll_imports) ); - dll_imports[nb_imports++] = imp; - } - else - { - free_imports( imp ); - if (nb_errors) exit(1); - } -} - -/* add a library to the list of delayed imports */ -void add_delayed_import( const char *name ) -{ - struct import *imp; - char *fullname = get_dll_name( name, NULL ); - - add_name( &delayed_imports, fullname ); - if ((imp = is_already_imported( fullname )) && !imp->delay) - { - imp->delay = 1; - nb_delayed++; - } - free( fullname ); -} - -/* remove an imported dll, based on its index in the dll_imports array */ -static void remove_import_dll( int index ) -{ - struct import *imp = dll_imports[index]; - - memmove( &dll_imports[index], &dll_imports[index+1], sizeof(imp) * (nb_imports - index - 1) ); - nb_imports--; - if (imp->delay) nb_delayed--; - free_imports( imp ); -} - -/* add a symbol to the ignored symbol list */ -/* if the name starts with '-' the symbol is removed instead */ -void add_ignore_symbol( const char *name ) -{ - unsigned int i; - - if (name[0] == '-') /* remove it */ - { - if (!name[1]) empty_name_table( &ignore_symbols ); /* remove everything */ - else for (i = 0; i < ignore_symbols.count; i++) - { - if (!strcmp( ignore_symbols.names[i], name+1 )) remove_name( &ignore_symbols, i-- ); - } - } - else add_name( &ignore_symbols, name ); -} - -/* add a symbol to the list of extra symbols that ld must resolve */ -void add_extra_ld_symbol( const char *name ) -{ - add_name( &extra_ld_symbols, name ); -} - -/* add a function to the list of imports from a given dll */ -static void add_import_func( struct import *imp, ORDDEF *func ) -{ - imp->imports = xrealloc( imp->imports, (imp->nb_imports+1) * sizeof(*imp->imports) ); - imp->imports[imp->nb_imports++] = func; - total_imports++; - if (imp->delay) total_delayed++; -} - -/* get the default entry point for a given spec file */ -static const char *get_default_entry_point( const DLLSPEC *spec ) -{ - if (spec->characteristics & IMAGE_FILE_DLL) return "__wine_spec_dll_entry"; - if (spec->subsystem == IMAGE_SUBSYSTEM_NATIVE) return "__wine_spec_drv_entry"; - if (spec->type == SPEC_WIN16) return "__wine_spec_exe16_entry"; - return "__wine_spec_exe_entry"; -} - -/* check if the spec file exports any stubs */ -static int has_stubs( const DLLSPEC *spec ) -{ - int i; - for (i = 0; i < spec->nb_entry_points; i++) - { - ORDDEF *odp = &spec->entry_points[i]; - if (odp->type == TYPE_STUB) return 1; - } - return 0; -} - -/* add the extra undefined symbols that will be contained in the generated spec file itself */ -static void add_extra_undef_symbols( DLLSPEC *spec ) -{ - if (!spec->init_func) spec->init_func = xstrdup( get_default_entry_point(spec) ); - add_extra_ld_symbol( spec->init_func ); - if (has_stubs( spec )) add_extra_ld_symbol( "__wine_spec_unimplemented_stub" ); - if (nb_delayed) add_extra_ld_symbol( "__wine_spec_delay_load" ); -} - -/* check if a given imported dll is not needed, taking forwards into account */ -static int check_unused( const struct import* imp, const DLLSPEC *spec ) -{ - int i; - const char *file_name = imp->spec->file_name; - size_t len = strlen( file_name ); - const char *p = strchr( file_name, '.' ); - if (p && !strcasecmp( p, ".dll" )) len = p - file_name; - - for (i = spec->base; i <= spec->limit; i++) - { - ORDDEF *odp = spec->ordinals[i]; - if (!odp || !(odp->flags & FLAG_FORWARD)) continue; - if (!strncasecmp( odp->link_name, file_name, len ) && - odp->link_name[len] == '.') - return 0; /* found a forward, it is used */ - } - return 1; -} - -/* check if a given forward does exist in one of the imported dlls */ -static void check_undefined_forwards( DLLSPEC *spec ) -{ - char *link_name, *api_name, *dll_name, *p; - int i, j; - - for (i = 0; i < spec->nb_entry_points; i++) - { - ORDDEF *odp = &spec->entry_points[i]; - - if (!(odp->flags & FLAG_FORWARD)) continue; - - link_name = xstrdup( odp->link_name ); - p = strrchr( link_name, '.' ); - *p = 0; - api_name = p + 1; - dll_name = get_dll_name( link_name, NULL ); - - for (j = 0; j < nb_imports; j++) - { - struct import *imp = dll_imports[j]; - - if (strcasecmp( imp->spec->file_name, dll_name )) continue; - if (!find_export( api_name, imp->exports, imp->nb_exports )) - warning( "%s:%d: forward '%s' not found in %s\n", - spec->src_name, odp->lineno, odp->link_name, imp->spec->file_name ); - break; - } - if (j == nb_imports) - warning( "%s:%d: forward '%s' not found in the imported dll list\n", - spec->src_name, odp->lineno, odp->link_name ); - free( link_name ); - free( dll_name ); - } -} - -/* flag the dll exports that link to an undefined symbol */ -static void check_undefined_exports( DLLSPEC *spec ) -{ - int i; - - for (i = 0; i < spec->nb_entry_points; i++) - { - ORDDEF *odp = &spec->entry_points[i]; - if (odp->type == TYPE_STUB || odp->type == TYPE_ABS) continue; - if (odp->flags & FLAG_FORWARD) continue; - if (find_name( odp->link_name, &undef_symbols )) - { - switch(odp->type) - { - case TYPE_PASCAL: - case TYPE_STDCALL: - case TYPE_CDECL: - case TYPE_VARARGS: - if (link_ext_symbols) - { - odp->flags |= FLAG_EXT_LINK; - add_name( &ext_link_imports, odp->link_name ); - } - else error( "%s:%d: function '%s' not defined\n", - spec->src_name, odp->lineno, odp->link_name ); - break; - default: - error( "%s:%d: external symbol '%s' is not a function\n", - spec->src_name, odp->lineno, odp->link_name ); - break; - } - } - } -} - -/* create a .o file that references all the undefined symbols we want to resolve */ -static char *create_undef_symbols_file( DLLSPEC *spec ) -{ - char *as_file, *obj_file; - int i; - unsigned int j; - FILE *f; - - as_file = get_temp_file_name( output_file_name, ".s" ); - if (!(f = fopen( as_file, "w" ))) fatal_error( "Cannot create %s\n", as_file ); - fprintf( f, "\t.data\n" ); - - for (i = 0; i < spec->nb_entry_points; i++) - { - ORDDEF *odp = &spec->entry_points[i]; - if (odp->type == TYPE_STUB || odp->type == TYPE_ABS) continue; - if (odp->flags & FLAG_FORWARD) continue; - fprintf( f, "\t%s %s\n", get_asm_ptr_keyword(), asm_name(odp->link_name) ); - } - for (j = 0; j < extra_ld_symbols.count; j++) - fprintf( f, "\t%s %s\n", get_asm_ptr_keyword(), asm_name(extra_ld_symbols.names[j]) ); - fclose( f ); - - obj_file = get_temp_file_name( output_file_name, ".o" ); - assemble_file( as_file, obj_file ); - return obj_file; -} - -/* combine a list of object files with ld into a single object file */ -/* returns the name of the combined file */ -static const char *ldcombine_files( DLLSPEC *spec, char **argv ) -{ - unsigned int i, len = 0; - const char *prog = get_ld_command(); - char *cmd, *p, *ld_tmp_file, *undef_file; - int err; - - undef_file = create_undef_symbols_file( spec ); - len += strlen(undef_file) + 1; - ld_tmp_file = get_temp_file_name( output_file_name, ".o" ); - for (i = 0; argv[i]; i++) len += strlen(argv[i]) + 1; - cmd = p = xmalloc( len + strlen(ld_tmp_file) + 8 + strlen(prog) ); - p += sprintf( cmd, "%s -r -o %s %s", prog, ld_tmp_file, undef_file ); - for (i = 0; argv[i]; i++) - p += sprintf( p, " %s", argv[i] ); - if (verbose) fprintf( stderr, "%s\n", cmd ); - err = system( cmd ); - if (err) fatal_error( "%s -r failed with status %d\n", prog, err ); - free( cmd ); - return ld_tmp_file; -} - -/* read in the list of undefined symbols */ -void read_undef_symbols( DLLSPEC *spec, char **argv ) -{ - size_t prefix_len; - FILE *f; - const char *prog = get_nm_command(); - char *cmd, buffer[1024], name_prefix[16]; - int err; - const char *name; - - if (!argv[0]) return; - - add_extra_undef_symbols( spec ); - - strcpy( name_prefix, asm_name("") ); - prefix_len = strlen( name_prefix ); - - name = ldcombine_files( spec, argv ); - - cmd = xmalloc( strlen(prog) + strlen(name) + 5 ); - sprintf( cmd, "%s -u %s", prog, name ); - if (!(f = popen( cmd, "r" ))) - fatal_error( "Cannot execute '%s'\n", cmd ); - - while (fgets( buffer, sizeof(buffer), f )) - { - char *p = buffer + strlen(buffer) - 1; - if (p < buffer) continue; - if (*p == '\n') *p-- = 0; - p = buffer; - while (*p == ' ') p++; - if (p[0] == 'U' && p[1] == ' ' && p[2]) p += 2; - if (prefix_len && !strncmp( p, name_prefix, prefix_len )) p += prefix_len; - add_name( &undef_symbols, p ); - } - if ((err = pclose( f ))) warning( "%s failed with status %d\n", cmd, err ); - free( cmd ); -} - -/* resolve the imports for a Win32 module */ -int resolve_imports( DLLSPEC *spec ) -{ - int i; - unsigned int j, removed; - ORDDEF *odp; - - sort_names( &ignore_symbols ); - check_undefined_forwards( spec ); - - for (i = 0; i < nb_imports; i++) - { - struct import *imp = dll_imports[i]; - - for (j = removed = 0; j < undef_symbols.count; j++) - { - if (find_name( undef_symbols.names[j], &ignore_symbols )) continue; - odp = find_export( undef_symbols.names[j], imp->exports, imp->nb_exports ); - if (odp) - { - if (odp->flags & FLAG_PRIVATE) continue; - if (odp->type != TYPE_STDCALL && odp->type != TYPE_CDECL) - warning( "winebuild: Data export '%s' cannot be imported from %s\n", - odp->link_name, imp->spec->file_name ); - else - { - add_import_func( imp, odp ); - remove_name( &undef_symbols, j-- ); - removed++; - } - } - } - if (!removed) - { - /* the dll is not used, get rid of it */ - if (check_unused( imp, spec )) - warning( "winebuild: %s imported but no symbols used\n", imp->spec->file_name ); - remove_import_dll( i ); - i--; - } - } - - sort_names( &undef_symbols ); - check_undefined_exports( spec ); - - return 1; -} - -/* output the get_pc thunk if needed */ -void output_get_pc_thunk(void) -{ - if (target_cpu != CPU_x86) return; - if (!UsePIC) return; - output( "\n\t.text\n" ); - output( "\t.align %d\n", get_alignment(4) ); - output( "\t%s\n", func_declaration("__wine_spec_get_pc_thunk_eax") ); - output( "%s:\n", asm_name("__wine_spec_get_pc_thunk_eax") ); - output( "\tpopl %%eax\n" ); - output( "\tpushl %%eax\n" ); - output( "\tret\n" ); - output_function_size( "__wine_spec_get_pc_thunk_eax" ); -} - -/* output a single import thunk */ -static void output_import_thunk( const char *name, const char *table, int pos ) -{ - output( "\n\t.align %d\n", get_alignment(4) ); - output( "\t%s\n", func_declaration(name) ); - output( "%s\n", asm_globl(name) ); - - switch(target_cpu) - { - case CPU_x86: - if (!UsePIC) - { - output( "\tjmp *(%s+%d)\n", table, pos ); - } - else - { - output( "\tcall %s\n", asm_name("__wine_spec_get_pc_thunk_eax") ); - output( "1:\tjmp *%s+%d-1b(%%eax)\n", table, pos ); - } - break; - case CPU_x86_64: - output( "\t.cfi_startproc\n" ); - output( "\tjmpq *%s+%d(%%rip)\n", table, pos ); - output( "\t.cfi_endproc\n" ); - break; - case CPU_SPARC: - if ( !UsePIC ) - { - output( "\tsethi %%hi(%s+%d), %%g1\n", table, pos ); - output( "\tld [%%g1+%%lo(%s+%d)], %%g1\n", table, pos ); - output( "\tjmp %%g1\n" ); - output( "\tnop\n" ); - } - else - { - /* Hmpf. Stupid sparc assembler always interprets global variable - names as GOT offsets, so we have to do it the long way ... */ - output( "\tsave %%sp, -96, %%sp\n" ); - output( "0:\tcall 1f\n" ); - output( "\tnop\n" ); - output( "1:\tsethi %%hi(%s+%d-0b), %%g1\n", table, pos ); - output( "\tor %%g1, %%lo(%s+%d-0b), %%g1\n", table, pos ); - output( "\tld [%%g1+%%o7], %%g1\n" ); - output( "\tjmp %%g1\n" ); - output( "\trestore\n" ); - } - break; - case CPU_ALPHA: - output( "\tlda $0,%s\n", table ); - output( "\tlda $0,%d($0)\n", pos ); - output( "\tjmp $31,($0)\n" ); - break; - case CPU_ARM: - output( "\tmov r4, #%s\n", table ); - output( "\tldr r15, [r4, #%d]\n", pos ); - break; - case CPU_POWERPC: - output( "\tmr %s, %s\n", ppc_reg(0), ppc_reg(31) ); - if (target_platform == PLATFORM_APPLE) - { - output( "\tlis %s, ha16(%s+%d+32768)\n", ppc_reg(31), table, pos ); - output( "\tla %s, lo16(%s+%d)(%s)\n", ppc_reg(31), table, pos, ppc_reg(31) ); - } - else - { - output( "\tlis %s, (%s+%d+32768)@h\n", ppc_reg(31), table, pos ); - output( "\tla %s, (%s+%d)@l(%s)\n", ppc_reg(31), table, pos, ppc_reg(31) ); - } - output( "\tlwz %s, 0(%s)\n", ppc_reg(31), ppc_reg(31) ); - output( "\tmtctr %s\n", ppc_reg(31) ); - output( "\tmr %s, %s\n", ppc_reg(31), ppc_reg(0) ); - output( "\tbctr\n" ); - break; - } - output_function_size( name ); -} - -/* check if we need an import directory */ -int has_imports(void) -{ - return (nb_imports - nb_delayed) > 0; -} - -/* output the import table of a Win32 module */ -static void output_immediate_imports(void) -{ - int i, j; - const char *dll_name; - - if (nb_imports == nb_delayed) return; /* no immediate imports */ - - /* main import header */ - - output( "\n/* import table */\n" ); - output( "\n\t.data\n" ); - output( "\t.align %d\n", get_alignment(4) ); - output( ".L__wine_spec_imports:\n" ); - - /* list of dlls */ - - for (i = j = 0; i < nb_imports; i++) - { - if (dll_imports[i]->delay) continue; - dll_name = make_c_identifier( dll_imports[i]->spec->file_name ); - output( "\t.long .L__wine_spec_import_data_names+%d-.L__wine_spec_rva_base\n", /* OriginalFirstThunk */ - j * get_ptr_size() ); - output( "\t.long 0\n" ); /* TimeDateStamp */ - output( "\t.long 0\n" ); /* ForwarderChain */ - output( "\t.long .L__wine_spec_import_name_%s-.L__wine_spec_rva_base\n", /* Name */ - dll_name ); - output( "\t.long .L__wine_spec_import_data_ptrs+%d-.L__wine_spec_rva_base\n", /* FirstThunk */ - j * get_ptr_size() ); - j += dll_imports[i]->nb_imports + 1; - } - output( "\t.long 0\n" ); /* OriginalFirstThunk */ - output( "\t.long 0\n" ); /* TimeDateStamp */ - output( "\t.long 0\n" ); /* ForwarderChain */ - output( "\t.long 0\n" ); /* Name */ - output( "\t.long 0\n" ); /* FirstThunk */ - - output( "\n\t.align %d\n", get_alignment(get_ptr_size()) ); - output( ".L__wine_spec_import_data_names:\n" ); - for (i = 0; i < nb_imports; i++) - { - if (dll_imports[i]->delay) continue; - dll_name = make_c_identifier( dll_imports[i]->spec->file_name ); - for (j = 0; j < dll_imports[i]->nb_imports; j++) - { - ORDDEF *odp = dll_imports[i]->imports[j]; - if (!(odp->flags & FLAG_NONAME)) - output( "\t%s .L__wine_spec_import_data_%s_%s-.L__wine_spec_rva_base\n", - get_asm_ptr_keyword(), dll_name, odp->name ); - else - { - if (get_ptr_size() == 8) - output( "\t.quad 0x800000000000%04x\n", odp->ordinal ); - else - output( "\t.long 0x8000%04x\n", odp->ordinal ); - } - } - output( "\t%s 0\n", get_asm_ptr_keyword() ); - } - output( ".L__wine_spec_import_data_ptrs:\n" ); - for (i = 0; i < nb_imports; i++) - { - if (dll_imports[i]->delay) continue; - for (j = 0; j < dll_imports[i]->nb_imports; j++) output( "\t%s 0\n", get_asm_ptr_keyword() ); - output( "\t%s 0\n", get_asm_ptr_keyword() ); - } - output( ".L__wine_spec_imports_end:\n" ); - - for (i = 0; i < nb_imports; i++) - { - if (dll_imports[i]->delay) continue; - dll_name = make_c_identifier( dll_imports[i]->spec->file_name ); - for (j = 0; j < dll_imports[i]->nb_imports; j++) - { - ORDDEF *odp = dll_imports[i]->imports[j]; - if (!(odp->flags & FLAG_NONAME)) - { - output( "\t.align %d\n", get_alignment(2) ); - output( ".L__wine_spec_import_data_%s_%s:\n", dll_name, odp->name ); - output( "\t%s %d\n", get_asm_short_keyword(), odp->ordinal ); - output( "\t%s \"%s\"\n", get_asm_string_keyword(), odp->name ); - } - } - } - - for (i = 0; i < nb_imports; i++) - { - if (dll_imports[i]->delay) continue; - dll_name = make_c_identifier( dll_imports[i]->spec->file_name ); - output( ".L__wine_spec_import_name_%s:\n\t%s \"%s\"\n", - dll_name, get_asm_string_keyword(), dll_imports[i]->spec->file_name ); - } -} - -/* output the import thunks of a Win32 module */ -static void output_immediate_import_thunks(void) -{ - int i, j, pos; - int nb_imm = nb_imports - nb_delayed; - static const char import_thunks[] = "__wine_spec_import_thunks"; - - if (!nb_imm) return; - - output( "\n/* immediate import thunks */\n\n" ); - output( "\t.text\n" ); - output( "\t.align %d\n", get_alignment(8) ); - output( "%s:\n", asm_name(import_thunks)); - - for (i = pos = 0; i < nb_imports; i++) - { - if (dll_imports[i]->delay) continue; - for (j = 0; j < dll_imports[i]->nb_imports; j++, pos += get_ptr_size()) - { - ORDDEF *odp = dll_imports[i]->imports[j]; - output_import_thunk( odp->name ? odp->name : odp->export_name, - ".L__wine_spec_import_data_ptrs", pos ); - } - pos += get_ptr_size(); - } - output_function_size( import_thunks ); -} - -/* output the delayed import table of a Win32 module */ -static void output_delayed_imports( const DLLSPEC *spec ) -{ - int i, j, mod; - - if (!nb_delayed) return; - - output( "\n/* delayed imports */\n\n" ); - output( "\t.data\n" ); - output( "\t.align %d\n", get_alignment(get_ptr_size()) ); - output( "%s\n", asm_globl("__wine_spec_delay_imports") ); - - /* list of dlls */ - - for (i = j = mod = 0; i < nb_imports; i++) - { - if (!dll_imports[i]->delay) continue; - output( "\t%s 0\n", get_asm_ptr_keyword() ); /* grAttrs */ - output( "\t%s .L__wine_delay_name_%d\n", /* szName */ - get_asm_ptr_keyword(), i ); - output( "\t%s .L__wine_delay_modules+%d\n", /* phmod */ - get_asm_ptr_keyword(), mod * get_ptr_size() ); - output( "\t%s .L__wine_delay_IAT+%d\n", /* pIAT */ - get_asm_ptr_keyword(), j * get_ptr_size() ); - output( "\t%s .L__wine_delay_INT+%d\n", /* pINT */ - get_asm_ptr_keyword(), j * get_ptr_size() ); - output( "\t%s 0\n", get_asm_ptr_keyword() ); /* pBoundIAT */ - output( "\t%s 0\n", get_asm_ptr_keyword() ); /* pUnloadIAT */ - output( "\t%s 0\n", get_asm_ptr_keyword() ); /* dwTimeStamp */ - j += dll_imports[i]->nb_imports; - mod++; - } - output( "\t%s 0\n", get_asm_ptr_keyword() ); /* grAttrs */ - output( "\t%s 0\n", get_asm_ptr_keyword() ); /* szName */ - output( "\t%s 0\n", get_asm_ptr_keyword() ); /* phmod */ - output( "\t%s 0\n", get_asm_ptr_keyword() ); /* pIAT */ - output( "\t%s 0\n", get_asm_ptr_keyword() ); /* pINT */ - output( "\t%s 0\n", get_asm_ptr_keyword() ); /* pBoundIAT */ - output( "\t%s 0\n", get_asm_ptr_keyword() ); /* pUnloadIAT */ - output( "\t%s 0\n", get_asm_ptr_keyword() ); /* dwTimeStamp */ - - output( "\n.L__wine_delay_IAT:\n" ); - for (i = 0; i < nb_imports; i++) - { - if (!dll_imports[i]->delay) continue; - for (j = 0; j < dll_imports[i]->nb_imports; j++) - { - ORDDEF *odp = dll_imports[i]->imports[j]; - const char *name = odp->name ? odp->name : odp->export_name; - output( "\t%s .L__wine_delay_imp_%d_%s\n", - get_asm_ptr_keyword(), i, name ); - } - } - - output( "\n.L__wine_delay_INT:\n" ); - for (i = 0; i < nb_imports; i++) - { - if (!dll_imports[i]->delay) continue; - for (j = 0; j < dll_imports[i]->nb_imports; j++) - { - ORDDEF *odp = dll_imports[i]->imports[j]; - if (!odp->name) - output( "\t%s %d\n", get_asm_ptr_keyword(), odp->ordinal ); - else - output( "\t%s .L__wine_delay_data_%d_%s\n", - get_asm_ptr_keyword(), i, odp->name ); - } - } - - output( "\n.L__wine_delay_modules:\n" ); - for (i = 0; i < nb_imports; i++) - { - if (dll_imports[i]->delay) output( "\t%s 0\n", get_asm_ptr_keyword() ); - } - - for (i = 0; i < nb_imports; i++) - { - if (!dll_imports[i]->delay) continue; - output( ".L__wine_delay_name_%d:\n", i ); - output( "\t%s \"%s\"\n", - get_asm_string_keyword(), dll_imports[i]->spec->file_name ); - } - - for (i = 0; i < nb_imports; i++) - { - if (!dll_imports[i]->delay) continue; - for (j = 0; j < dll_imports[i]->nb_imports; j++) - { - ORDDEF *odp = dll_imports[i]->imports[j]; - if (!odp->name) continue; - output( ".L__wine_delay_data_%d_%s:\n", i, odp->name ); - output( "\t%s \"%s\"\n", get_asm_string_keyword(), odp->name ); - } - } - output_function_size( "__wine_spec_delay_imports" ); -} - -/* output the delayed import thunks of a Win32 module */ -static void output_delayed_import_thunks( const DLLSPEC *spec ) -{ - int i, idx, j, pos, extra_stack_storage = 0; - static const char delayed_import_loaders[] = "__wine_spec_delayed_import_loaders"; - static const char delayed_import_thunks[] = "__wine_spec_delayed_import_thunks"; - - if (!nb_delayed) return; - - output( "\n/* delayed import thunks */\n\n" ); - output( "\t.text\n" ); - output( "\t.align %d\n", get_alignment(8) ); - output( "%s:\n", asm_name(delayed_import_loaders)); - output( "\t%s\n", func_declaration("__wine_delay_load_asm") ); - output( "%s:\n", asm_name("__wine_delay_load_asm") ); - switch(target_cpu) - { - case CPU_x86: - output( "\tpushl %%ecx\n" ); - output( "\tpushl %%edx\n" ); - output( "\tpushl %%eax\n" ); - output( "\tcall %s\n", asm_name("__wine_spec_delay_load") ); - output( "\tpopl %%edx\n" ); - output( "\tpopl %%ecx\n" ); - output( "\tjmp *%%eax\n" ); - break; - case CPU_x86_64: - output( "\t.cfi_startproc\n" ); - output( "\tsubq $88,%%rsp\n" ); - output( "\t.cfi_adjust_cfa_offset 88\n" ); - output( "\tmovq %%rdx,80(%%rsp)\n" ); - output( "\tmovq %%rcx,72(%%rsp)\n" ); - output( "\tmovq %%r8,64(%%rsp)\n" ); - output( "\tmovq %%r9,56(%%rsp)\n" ); - output( "\tmovq %%r10,48(%%rsp)\n" ); - output( "\tmovq %%r11,40(%%rsp)\n" ); - output( "\tmovq %%rax,%%rcx\n" ); - output( "\tcall %s\n", asm_name("__wine_spec_delay_load") ); - output( "\tmovq 40(%%rsp),%%r11\n" ); - output( "\tmovq 48(%%rsp),%%r10\n" ); - output( "\tmovq 56(%%rsp),%%r9\n" ); - output( "\tmovq 64(%%rsp),%%r8\n" ); - output( "\tmovq 72(%%rsp),%%rcx\n" ); - output( "\tmovq 80(%%rsp),%%rdx\n" ); - output( "\taddq $88,%%rsp\n" ); - output( "\t.cfi_adjust_cfa_offset -88\n" ); - output( "\tjmp *%%rax\n" ); - output( "\t.cfi_endproc\n" ); - break; - case CPU_SPARC: - output( "\tsave %%sp, -96, %%sp\n" ); - output( "\tcall %s\n", asm_name("__wine_spec_delay_load") ); - output( "\tmov %%g1, %%o0\n" ); - output( "\tjmp %%o0\n" ); - output( "\trestore\n" ); - break; - case CPU_ALPHA: - output( "\tjsr $26,%s\n", asm_name("__wine_spec_delay_load") ); - output( "\tjmp $31,($0)\n" ); - break; - case CPU_ARM: - output( "\tstmfd sp!, {r4, r5, r6, r7, r8, r9, r10, lr}\n" ); - output( "\tblx %s\n", asm_name("__wine_spec_delay_load") ); - output( "\tldmfd sp!, {r4, r5, r6, r7, r8, r9, r10, pc}\n" ); - break; - case CPU_POWERPC: - if (target_platform == PLATFORM_APPLE) extra_stack_storage = 56; - - /* Save all callee saved registers into a stackframe. */ - output( "\tstwu %s, -%d(%s)\n",ppc_reg(1), 48+extra_stack_storage, ppc_reg(1)); - output( "\tstw %s, %d(%s)\n", ppc_reg(3), 4+extra_stack_storage, ppc_reg(1)); - output( "\tstw %s, %d(%s)\n", ppc_reg(4), 8+extra_stack_storage, ppc_reg(1)); - output( "\tstw %s, %d(%s)\n", ppc_reg(5), 12+extra_stack_storage, ppc_reg(1)); - output( "\tstw %s, %d(%s)\n", ppc_reg(6), 16+extra_stack_storage, ppc_reg(1)); - output( "\tstw %s, %d(%s)\n", ppc_reg(7), 20+extra_stack_storage, ppc_reg(1)); - output( "\tstw %s, %d(%s)\n", ppc_reg(8), 24+extra_stack_storage, ppc_reg(1)); - output( "\tstw %s, %d(%s)\n", ppc_reg(9), 28+extra_stack_storage, ppc_reg(1)); - output( "\tstw %s, %d(%s)\n", ppc_reg(10),32+extra_stack_storage, ppc_reg(1)); - output( "\tstw %s, %d(%s)\n", ppc_reg(11),36+extra_stack_storage, ppc_reg(1)); - output( "\tstw %s, %d(%s)\n", ppc_reg(12),40+extra_stack_storage, ppc_reg(1)); - - /* r0 -> r3 (arg1) */ - output( "\tmr %s, %s\n", ppc_reg(3), ppc_reg(0)); - - /* save return address */ - output( "\tmflr %s\n", ppc_reg(0)); - output( "\tstw %s, %d(%s)\n", ppc_reg(0), 44+extra_stack_storage, ppc_reg(1)); - - /* Call the __wine_delay_load function, arg1 is arg1. */ - output( "\tbl %s\n", asm_name("__wine_spec_delay_load") ); - - /* Load return value from call into ctr register */ - output( "\tmtctr %s\n", ppc_reg(3)); - - /* restore all saved registers and drop stackframe. */ - output( "\tlwz %s, %d(%s)\n", ppc_reg(3), 4+extra_stack_storage, ppc_reg(1)); - output( "\tlwz %s, %d(%s)\n", ppc_reg(4), 8+extra_stack_storage, ppc_reg(1)); - output( "\tlwz %s, %d(%s)\n", ppc_reg(5), 12+extra_stack_storage, ppc_reg(1)); - output( "\tlwz %s, %d(%s)\n", ppc_reg(6), 16+extra_stack_storage, ppc_reg(1)); - output( "\tlwz %s, %d(%s)\n", ppc_reg(7), 20+extra_stack_storage, ppc_reg(1)); - output( "\tlwz %s, %d(%s)\n", ppc_reg(8), 24+extra_stack_storage, ppc_reg(1)); - output( "\tlwz %s, %d(%s)\n", ppc_reg(9), 28+extra_stack_storage, ppc_reg(1)); - output( "\tlwz %s, %d(%s)\n", ppc_reg(10),32+extra_stack_storage, ppc_reg(1)); - output( "\tlwz %s, %d(%s)\n", ppc_reg(11),36+extra_stack_storage, ppc_reg(1)); - output( "\tlwz %s, %d(%s)\n", ppc_reg(12),40+extra_stack_storage, ppc_reg(1)); - - /* Load return value from call into return register */ - output( "\tlwz %s, %d(%s)\n", ppc_reg(0), 44+extra_stack_storage, ppc_reg(1)); - output( "\tmtlr %s\n", ppc_reg(0)); - output( "\taddi %s, %s, %d\n", ppc_reg(1), ppc_reg(1), 48+extra_stack_storage); - - /* branch to ctr register. */ - output( "\tbctr\n"); - break; - } - output_function_size( "__wine_delay_load_asm" ); - output( "\n" ); - - for (i = idx = 0; i < nb_imports; i++) - { - if (!dll_imports[i]->delay) continue; - for (j = 0; j < dll_imports[i]->nb_imports; j++) - { - ORDDEF *odp = dll_imports[i]->imports[j]; - const char *name = odp->name ? odp->name : odp->export_name; - - output( ".L__wine_delay_imp_%d_%s:\n", i, name ); - switch(target_cpu) - { - case CPU_x86: - output( "\tmovl $%d, %%eax\n", (idx << 16) | j ); - output( "\tjmp %s\n", asm_name("__wine_delay_load_asm") ); - break; - case CPU_x86_64: - output( "\t.cfi_startproc\n" ); - output( "\tmovq $%d,%%rax\n", (idx << 16) | j ); - output( "\tjmp %s\n", asm_name("__wine_delay_load_asm") ); - output( "\t.cfi_endproc\n" ); - break; - case CPU_SPARC: - output( "\tset %d, %%g1\n", (idx << 16) | j ); - output( "\tb,a %s\n", asm_name("__wine_delay_load_asm") ); - break; - case CPU_ALPHA: - output( "\tlda $0,%d($31)\n", j); - output( "\tldah $0,%d($0)\n", idx); - output( "\tjmp $31,%s\n", asm_name("__wine_delay_load_asm") ); - break; - case CPU_ARM: - output( "\tb %s\n", asm_name("__wine_delay_load_asm") ); - break; - case CPU_POWERPC: - switch(target_platform) - { - case PLATFORM_APPLE: - /* On Darwin we can use r0 and r2 */ - /* Upper part in r2 */ - output( "\tlis %s, %d\n", ppc_reg(2), idx); - /* Lower part + r2 -> r0, Note we can't use r0 directly */ - output( "\taddi %s, %s, %d\n", ppc_reg(0), ppc_reg(2), j); - output( "\tb %s\n", asm_name("__wine_delay_load_asm") ); - break; - default: - /* On linux we can't use r2 since r2 is not a scratch register (hold the TOC) */ - /* Save r13 on the stack */ - output( "\taddi %s, %s, -0x4\n", ppc_reg(1), ppc_reg(1)); - output( "\tstw %s, 0(%s)\n", ppc_reg(13), ppc_reg(1)); - /* Upper part in r13 */ - output( "\tlis %s, %d\n", ppc_reg(13), idx); - /* Lower part + r13 -> r0, Note we can't use r0 directly */ - output( "\taddi %s, %s, %d\n", ppc_reg(0), ppc_reg(13), j); - /* Restore r13 */ - output( "\tstw %s, 0(%s)\n", ppc_reg(13), ppc_reg(1)); - output( "\taddic %s, %s, 0x4\n", ppc_reg(1), ppc_reg(1)); - output( "\tb %s\n", asm_name("__wine_delay_load_asm") ); - break; - } - break; - } - } - idx++; - } - output_function_size( delayed_import_loaders ); - - output( "\n\t.align %d\n", get_alignment(get_ptr_size()) ); - output( "%s:\n", asm_name(delayed_import_thunks)); - for (i = pos = 0; i < nb_imports; i++) - { - if (!dll_imports[i]->delay) continue; - for (j = 0; j < dll_imports[i]->nb_imports; j++, pos += get_ptr_size()) - { - ORDDEF *odp = dll_imports[i]->imports[j]; - output_import_thunk( odp->name ? odp->name : odp->export_name, - ".L__wine_delay_IAT", pos ); - } - } - output_function_size( delayed_import_thunks ); -} - -/* output import stubs for exported entry points that link to external symbols */ -static void output_external_link_imports( DLLSPEC *spec ) -{ - unsigned int i, pos; - - if (!ext_link_imports.count) return; /* nothing to do */ - - sort_names( &ext_link_imports ); - - /* get rid of duplicate names */ - for (i = 1; i < ext_link_imports.count; i++) - { - if (!strcmp( ext_link_imports.names[i-1], ext_link_imports.names[i] )) - remove_name( &ext_link_imports, i-- ); - } - - output( "\n/* external link thunks */\n\n" ); - output( "\t.data\n" ); - output( "\t.align %d\n", get_alignment(get_ptr_size()) ); - output( ".L__wine_spec_external_links:\n" ); - for (i = 0; i < ext_link_imports.count; i++) - output( "\t%s %s\n", get_asm_ptr_keyword(), asm_name(ext_link_imports.names[i]) ); - - output( "\n\t.text\n" ); - output( "\t.align %d\n", get_alignment(get_ptr_size()) ); - output( "%s:\n", asm_name("__wine_spec_external_link_thunks") ); - - for (i = pos = 0; i < ext_link_imports.count; i++) - { - char buffer[256]; - sprintf( buffer, "__wine_spec_ext_link_%s", ext_link_imports.names[i] ); - output_import_thunk( buffer, ".L__wine_spec_external_links", pos ); - pos += get_ptr_size(); - } - output_function_size( "__wine_spec_external_link_thunks" ); -} - -/******************************************************************* - * output_stubs - * - * Output the functions for stub entry points - */ -void output_stubs( DLLSPEC *spec ) -{ - const char *name, *exp_name; - int i, count; - - if (!has_stubs( spec )) return; - - output( "\n/* stub functions */\n\n" ); - output( "\t.text\n" ); - - for (i = count = 0; i < spec->nb_entry_points; i++) - { - ORDDEF *odp = &spec->entry_points[i]; - if (odp->type != TYPE_STUB) continue; - - name = get_stub_name( odp, spec ); - exp_name = odp->name ? odp->name : odp->export_name; - output( "\t.align %d\n", get_alignment(4) ); - output( "\t%s\n", func_declaration(name) ); - output( "%s:\n", asm_name(name) ); - - switch (target_cpu) - { - case CPU_x86: - /* flesh out the stub a bit to make safedisc happy */ - output(" \tnop\n" ); - output(" \tnop\n" ); - output(" \tnop\n" ); - output(" \tnop\n" ); - output(" \tnop\n" ); - output(" \tnop\n" ); - output(" \tnop\n" ); - output(" \tnop\n" ); - output(" \tnop\n" ); - - output( "\tsubl $4,%%esp\n" ); - if (UsePIC) - { - output( "\tcall %s\n", asm_name("__wine_spec_get_pc_thunk_eax") ); - output( "1:" ); - if (exp_name) - { - output( "\tleal .L%s_string-1b(%%eax),%%ecx\n", name ); - output( "\tpushl %%ecx\n" ); - count++; - } - else - output( "\tpushl $%d\n", odp->ordinal ); - output( "\tleal .L__wine_spec_file_name-1b(%%eax),%%ecx\n" ); - output( "\tpushl %%ecx\n" ); - } - else - { - if (exp_name) - { - output( "\tpushl $.L%s_string\n", name ); - count++; - } - else - output( "\tpushl $%d\n", odp->ordinal ); - output( "\tpushl $.L__wine_spec_file_name\n" ); - } - output( "\tcall %s\n", asm_name("__wine_spec_unimplemented_stub") ); - break; - case CPU_x86_64: - output( "\t.cfi_startproc\n" ); - output( "\tsubq $8,%%rsp\n" ); - output( "\t.cfi_adjust_cfa_offset 8\n" ); - output( "\tleaq .L__wine_spec_file_name(%%rip),%%rdi\n" ); - if (exp_name) - { - output( "leaq .L%s_string(%%rip),%%rsi\n", name ); - count++; - } - else - output( "\tmovq $%d,%%rsi\n", odp->ordinal ); - output( "\tcall %s\n", asm_name("__wine_spec_unimplemented_stub") ); - output( "\t.cfi_endproc\n" ); - break; - default: - assert(0); - } - output_function_size( name ); - } - - if (count) - { - output( "\t%s\n", get_asm_string_section() ); - for (i = 0; i < spec->nb_entry_points; i++) - { - ORDDEF *odp = &spec->entry_points[i]; - if (odp->type != TYPE_STUB) continue; - exp_name = odp->name ? odp->name : odp->export_name; - if (exp_name) - { - name = get_stub_name( odp, spec ); - output( ".L%s_string:\n", name ); - output( "\t%s \"%s\"\n", get_asm_string_keyword(), exp_name ); - } - } - } -} - -/* output the import and delayed import tables of a Win32 module */ -void output_imports( DLLSPEC *spec ) -{ - output_immediate_imports(); - output_delayed_imports( spec ); - output_immediate_import_thunks(); - output_delayed_import_thunks( spec ); - output_external_link_imports( spec ); - if (nb_imports || ext_link_imports.count || has_stubs(spec) || has_relays(spec)) - output_get_pc_thunk(); -} diff --git a/reactos/tools/winebuild/main.c b/reactos/tools/winebuild/main.c deleted file mode 100644 index 24807032fcc..00000000000 --- a/reactos/tools/winebuild/main.c +++ /dev/null @@ -1,685 +0,0 @@ -/* - * Main function - * - * Copyright 1993 Robert J. Amstadt - * Copyright 1995 Martin von Loewis - * Copyright 1995, 1996, 1997 Alexandre Julliard - * Copyright 1997 Eric Youngdale - * Copyright 1999 Ulrich Weigand - * - * 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 -#include -#include -#include -#include -#include -#include -#ifdef HAVE_GETOPT_H -# include -#endif - -#include "build.h" - -int UsePIC = 0; -int nb_lib_paths = 0; -int nb_errors = 0; -int display_warnings = 0; -int kill_at = 0; -int verbose = 0; -int save_temps = 0; -int link_ext_symbols = 0; -int force_pointer_size = 0; - -#if defined(TARGET_i386) -enum target_cpu target_cpu = CPU_x86; -#elif defined(TARGET_amd64) -enum target_cpu target_cpu = CPU_x86_64; -#elif defined(__sparc__) -enum target_cpu target_cpu = CPU_SPARC; -#elif defined(__ALPHA__) -enum target_cpu target_cpu = CPU_ALPHA; -#elif defined(__powerpc__) -enum target_cpu target_cpu = CPU_POWERPC; -#elif defined(TARGET_arm) -enum target_cpu target_cpu = CPU_ARM; -#else -#error Unsupported CPU -#endif - -#ifdef __APPLE__ -enum target_platform target_platform = PLATFORM_APPLE; -#elif defined(__FreeBSD__) -enum target_platform target_platform = PLATFORM_FREEBSD; -#elif defined(__sun) -enum target_platform target_platform = PLATFORM_SOLARIS; -#elif defined(_WIN32) -enum target_platform target_platform = PLATFORM_WINDOWS; -#else -enum target_platform target_platform = PLATFORM_UNSPECIFIED; -#endif - -char *target_alias = NULL; -char **lib_path = NULL; - -char *input_file_name = NULL; -char *spec_file_name = NULL; -FILE *output_file = NULL; -const char *output_file_name = NULL; -static const char *output_file_source_name; -static int fake_module; - -char *as_command = NULL; -char *ld_command = NULL; -char *nm_command = NULL; - -static int nb_res_files; -static char **res_files; - -/* execution mode */ -enum exec_mode_values -{ - MODE_NONE, - MODE_DLL, - MODE_EXE, - MODE_DEF, - MODE_RELAY16, - MODE_RELAY32, - MODE_RESOURCES, - MODE_PEDLL -}; - -static enum exec_mode_values exec_mode = MODE_NONE; - -static const struct -{ - const char *name; - enum target_platform platform; -} platform_names[] = -{ - { "macos", PLATFORM_APPLE }, - { "darwin", PLATFORM_APPLE }, - { "freebsd", PLATFORM_FREEBSD }, - { "solaris", PLATFORM_SOLARIS }, - { "windows", PLATFORM_WINDOWS }, - { "winnt", PLATFORM_WINDOWS } -}; - -/* set the dll file name from the input file name */ -static void set_dll_file_name( const char *name, DLLSPEC *spec ) -{ - char *p; - - if (spec->file_name) return; - - if ((p = strrchr( name, '\\' ))) name = p + 1; - if ((p = strrchr( name, '/' ))) name = p + 1; - spec->file_name = xmalloc( strlen(name) + 5 ); - strcpy( spec->file_name, name ); - if ((p = strrchr( spec->file_name, '.' ))) - { - if (!strcmp( p, ".spec" ) || !strcmp( p, ".def" )) *p = 0; - } -} - -/* set the dll subsystem */ -static void set_subsystem( const char *subsystem, DLLSPEC *spec ) -{ - char *major, *minor, *str = xstrdup( subsystem ); - - if ((major = strchr( str, ':' ))) *major++ = 0; - if (!strcmp( str, "native" )) spec->subsystem = IMAGE_SUBSYSTEM_NATIVE; - else if (!strcmp( str, "windows" )) spec->subsystem = IMAGE_SUBSYSTEM_WINDOWS_GUI; - else if (!strcmp( str, "console" )) spec->subsystem = IMAGE_SUBSYSTEM_WINDOWS_CUI; - else if (!strcmp( str, "win16" )) spec->type = SPEC_WIN16; - else fatal_error( "Invalid subsystem name '%s'\n", subsystem ); - if (major) - { - if ((minor = strchr( major, '.' ))) - { - *minor++ = 0; - spec->subsystem_minor = atoi( minor ); - } - spec->subsystem_major = atoi( major ); - } - free( str ); -} - -/* set the target CPU and platform */ -static void set_target( const char *target ) -{ - unsigned int i; - char *p, *platform, *spec = xstrdup( target ); - - /* target specification is in the form CPU-MANUFACTURER-OS or CPU-MANUFACTURER-KERNEL-OS */ - - target_alias = xstrdup( target ); - - /* get the CPU part */ - - if (!(p = strchr( spec, '-' ))) fatal_error( "Invalid target specification '%s'\n", target ); - *p++ = 0; - if ((target_cpu = get_cpu_from_name( spec )) == -1) - fatal_error( "Unrecognized CPU '%s'\n", spec ); - platform = p; - if ((p = strrchr( p, '-' ))) platform = p + 1; - - /* get the OS part */ - - target_platform = PLATFORM_UNSPECIFIED; /* default value */ - for (i = 0; i < sizeof(platform_names)/sizeof(platform_names[0]); i++) - { - if (!strncmp( platform_names[i].name, platform, strlen(platform_names[i].name) )) - { - target_platform = platform_names[i].platform; - break; - } - } - - free( spec ); -} - -/* cleanup on program exit */ -static void cleanup(void) -{ - if (output_file_name) unlink( output_file_name ); -} - -/* clean things up when aborting on a signal */ -static void exit_on_signal( int sig ) -{ - exit(1); /* this will call atexit functions */ -} - -/******************************************************************* - * command-line option handling - */ -static const char usage_str[] = -"Usage: winebuild [OPTIONS] [FILES]\n\n" -"Options:\n" -" --as-cmd=AS Command to use for assembling (default: as)\n" -" -b, --target=TARGET Specify target CPU and platform for cross-compiling\n" -" -d, --delay-lib=LIB Import the specified library in delayed mode\n" -" -D SYM Ignored for C flags compatibility\n" -" -e, --entry=FUNC Set the DLL entry point function (default: DllMain)\n" -" -E, --export=FILE Export the symbols defined in the .spec or .def file\n" -" --external-symbols Allow linking to external symbols\n" -" -f FLAGS Compiler flags (only -fPIC is supported)\n" -" -F, --filename=DLLFILE Set the DLL filename (default: from input file name)\n" -" --fake-module Create a fake binary module\n" -" -h, --help Display this help message\n" -" -H, --heap=SIZE Set the heap size for a Win16 dll\n" -" -i, --ignore=SYM[,SYM] Ignore specified symbols when resolving imports\n" -" -I DIR Ignored for C flags compatibility\n" -" -k, --kill-at Kill stdcall decorations in generated .def files\n" -" -K, FLAGS Compiler flags (only -KPIC is supported)\n" -" --large-address-aware Support an address space larger than 2Gb\n" -" --ld-cmd=LD Command to use for linking (default: ld)\n" -" -l, --library=LIB Import the specified library\n" -" -L, --library-path=DIR Look for imports libraries in DIR\n" -" -m32, -m64 Force building 32-bit resp. 64-bit code\n" -" -M, --main-module=MODULE Set the name of the main module for a Win16 dll\n" -" --nm-cmd=NM Command to use to get undefined symbols (default: nm)\n" -" --nxcompat=y|n Set the NX compatibility flag (default: yes)\n" -" -N, --dll-name=DLLNAME Set the DLL name (default: from input file name)\n" -" -o, --output=NAME Set the output file name (default: stdout)\n" -" -r, --res=RSRC.RES Load resources from RSRC.RES\n" -" --save-temps Do not delete the generated intermediate files\n" -" --subsystem=SUBSYS Set the subsystem (one of native, windows, console)\n" -" -u, --undefined=SYMBOL Add an undefined reference to SYMBOL when linking\n" -" -v, --verbose Display the programs invoked\n" -" --version Print the version and exit\n" -" -w, --warnings Turn on warnings\n" -"\nMode options:\n" -" --dll Build a .c file from a .spec or .def file\n" -" --def Build a .def file from a .spec file\n" -" --exe Build a .c file for an executable\n" -" --relay16 Build the 16-bit relay assembly routines\n" -" --relay32 Build the 32-bit relay assembly routines\n" -" --resources Build a .o file for the resource files\n\n" -" --pedll Build a .c file for PE dll\n\n" -"The mode options are mutually exclusive; you must specify one and only one.\n\n"; - -enum long_options_values -{ - LONG_OPT_DLL = 1, - LONG_OPT_DEF, - LONG_OPT_EXE, - LONG_OPT_ASCMD, - LONG_OPT_EXTERNAL_SYMS, - LONG_OPT_FAKE_MODULE, - LONG_OPT_LARGE_ADDRESS_AWARE, - LONG_OPT_LDCMD, - LONG_OPT_NMCMD, - LONG_OPT_NXCOMPAT, - LONG_OPT_RELAY16, - LONG_OPT_RELAY32, - LONG_OPT_RESOURCES, - LONG_OPT_SAVE_TEMPS, - LONG_OPT_SUBSYSTEM, - LONG_OPT_VERSION, - LONG_OPT_PEDLL -}; - -static const char short_options[] = "C:D:E:F:H:I:K:L:M:N:b:d:e:f:hi:kl:m:o:r:u:vw"; - -static const struct option long_options[] = -{ - { "dll", 0, 0, LONG_OPT_DLL }, - { "def", 0, 0, LONG_OPT_DEF }, - { "exe", 0, 0, LONG_OPT_EXE }, - { "as-cmd", 1, 0, LONG_OPT_ASCMD }, - { "external-symbols", 0, 0, LONG_OPT_EXTERNAL_SYMS }, - { "fake-module", 0, 0, LONG_OPT_FAKE_MODULE }, - { "large-address-aware", 0, 0, LONG_OPT_LARGE_ADDRESS_AWARE }, - { "ld-cmd", 1, 0, LONG_OPT_LDCMD }, - { "nm-cmd", 1, 0, LONG_OPT_NMCMD }, - { "nxcompat", 1, 0, LONG_OPT_NXCOMPAT }, - { "relay16", 0, 0, LONG_OPT_RELAY16 }, - { "relay32", 0, 0, LONG_OPT_RELAY32 }, - { "resources", 0, 0, LONG_OPT_RESOURCES }, - { "save-temps", 0, 0, LONG_OPT_SAVE_TEMPS }, - { "subsystem", 1, 0, LONG_OPT_SUBSYSTEM }, - { "version", 0, 0, LONG_OPT_VERSION }, - { "pedll", 1, 0, LONG_OPT_PEDLL }, - /* aliases for short options */ - { "target", 1, 0, 'b' }, - { "delay-lib", 1, 0, 'd' }, - { "export", 1, 0, 'E' }, - { "entry", 1, 0, 'e' }, - { "filename", 1, 0, 'F' }, - { "help", 0, 0, 'h' }, - { "heap", 1, 0, 'H' }, - { "ignore", 1, 0, 'i' }, - { "kill-at", 0, 0, 'k' }, - { "library", 1, 0, 'l' }, - { "library-path", 1, 0, 'L' }, - { "main-module", 1, 0, 'M' }, - { "dll-name", 1, 0, 'N' }, - { "output", 1, 0, 'o' }, - { "res", 1, 0, 'r' }, - { "undefined", 1, 0, 'u' }, - { "verbose", 0, 0, 'v' }, - { "warnings", 0, 0, 'w' }, - { NULL, 0, 0, 0 } -}; - -static void usage( int exit_code ) -{ - fprintf( stderr, "%s", usage_str ); - exit( exit_code ); -} - -static void set_exec_mode( enum exec_mode_values mode ) -{ - if (exec_mode != MODE_NONE) usage(1); - exec_mode = mode; -} - -/* parse options from the argv array and remove all the recognized ones */ -static char **parse_options( int argc, char **argv, DLLSPEC *spec ) -{ - char *p; - int optc; - - while ((optc = getopt_long( argc, argv, short_options, long_options, NULL )) != -1) - { - switch(optc) - { - case 'D': - /* ignored */ - break; - case 'E': - spec_file_name = xstrdup( optarg ); - set_dll_file_name( optarg, spec ); - break; - case 'F': - spec->file_name = xstrdup( optarg ); - break; - case 'H': - if (!isdigit(optarg[0])) - fatal_error( "Expected number argument with -H option instead of '%s'\n", optarg ); - spec->heap_size = atoi(optarg); - if (spec->heap_size > 65535) - fatal_error( "Invalid heap size %d, maximum is 65535\n", spec->heap_size ); - break; - case 'I': - /* ignored */ - break; - case 'K': - /* ignored, because cc generates correct code. */ - break; - case 'L': - lib_path = xrealloc( lib_path, (nb_lib_paths+1) * sizeof(*lib_path) ); - lib_path[nb_lib_paths++] = xstrdup( optarg ); - break; - case 'm': - if (strcmp( optarg, "32" ) && strcmp( optarg, "64" )) - fatal_error( "Invalid -m option '%s', expected -m32 or -m64\n", optarg ); - if (!strcmp( optarg, "32" )) force_pointer_size = 4; - else force_pointer_size = 8; - break; - case 'M': - spec->main_module = xstrdup( optarg ); - break; - case 'N': - spec->dll_name = xstrdup( optarg ); - break; - case 'b': - set_target( optarg ); - break; - case 'd': - add_delayed_import( optarg ); - break; - case 'e': - spec->init_func = xstrdup( optarg ); - if ((p = strchr( spec->init_func, '@' ))) *p = 0; /* kill stdcall decoration */ - break; - case 'f': - if (!strcmp( optarg, "PIC") || !strcmp( optarg, "pic")) UsePIC = 1; - /* ignore all other flags */ - break; - case 'h': - usage(0); - break; - case 'i': - { - char *str = xstrdup( optarg ); - char *token = strtok( str, "," ); - while (token) - { - add_ignore_symbol( token ); - token = strtok( NULL, "," ); - } - free( str ); - } - break; - case 'k': - kill_at = 1; - break; - case 'l': - add_import_dll( optarg, NULL ); - break; - case 'o': - { - char *ext = strrchr( optarg, '.' ); - - if (unlink( optarg ) == -1 && errno != ENOENT) - fatal_error( "Unable to create output file '%s'\n", optarg ); - if (ext && !strcmp( ext, ".o" )) - { - output_file_source_name = get_temp_file_name( optarg, ".s" ); - if (!(output_file = fopen( output_file_source_name, "w" ))) - fatal_error( "Unable to create output file '%s'\n", optarg ); - } - else - { - if (!(output_file = fopen( optarg, "w" ))) - fatal_error( "Unable to create output file '%s'\n", optarg ); - } - output_file_name = xstrdup(optarg); - atexit( cleanup ); /* make sure we remove the output file on exit */ - } - break; - case 'r': - res_files = xrealloc( res_files, (nb_res_files+1) * sizeof(*res_files) ); - res_files[nb_res_files++] = xstrdup( optarg ); - break; - case 'u': - add_extra_ld_symbol( optarg ); - break; - case 'v': - verbose++; - break; - case 'w': - display_warnings = 1; - break; - case LONG_OPT_DLL: - set_exec_mode( MODE_DLL ); - break; - case LONG_OPT_DEF: - set_exec_mode( MODE_DEF ); - break; - case LONG_OPT_EXE: - set_exec_mode( MODE_EXE ); - if (!spec->subsystem) spec->subsystem = IMAGE_SUBSYSTEM_WINDOWS_GUI; - break; - case LONG_OPT_ASCMD: - as_command = xstrdup( optarg ); - break; - case LONG_OPT_FAKE_MODULE: - fake_module = 1; - break; - case LONG_OPT_EXTERNAL_SYMS: - link_ext_symbols = 1; - break; - case LONG_OPT_LARGE_ADDRESS_AWARE: - spec->characteristics |= IMAGE_FILE_LARGE_ADDRESS_AWARE; - break; - case LONG_OPT_LDCMD: - ld_command = xstrdup( optarg ); - break; - case LONG_OPT_NMCMD: - nm_command = xstrdup( optarg ); - break; - case LONG_OPT_NXCOMPAT: - if (optarg[0] == 'n' || optarg[0] == 'N') - spec->dll_characteristics &= ~IMAGE_DLLCHARACTERISTICS_NX_COMPAT; - break; - case LONG_OPT_RELAY16: - set_exec_mode( MODE_RELAY16 ); - break; - case LONG_OPT_RELAY32: - set_exec_mode( MODE_RELAY32 ); - break; - case LONG_OPT_RESOURCES: - set_exec_mode( MODE_RESOURCES ); - break; - case LONG_OPT_SAVE_TEMPS: - save_temps = 1; - break; - case LONG_OPT_SUBSYSTEM: - set_subsystem( optarg, spec ); - break; - case LONG_OPT_VERSION: - printf( "winebuild version " PACKAGE_VERSION "\n" ); - exit(0); - case LONG_OPT_PEDLL: - set_exec_mode( MODE_PEDLL ); - spec_file_name = xstrdup( optarg ); - set_dll_file_name( optarg, spec ); - break; - case '?': - usage(1); - break; - } - } - - if (spec->file_name && !strchr( spec->file_name, '.' )) - strcat( spec->file_name, exec_mode == MODE_EXE ? ".exe" : ".dll" ); - - switch (target_cpu) - { - case CPU_x86: - if (force_pointer_size == 8) target_cpu = CPU_x86_64; - break; - case CPU_x86_64: - if (force_pointer_size == 4) target_cpu = CPU_x86; - break; - default: - if (force_pointer_size == 8) - fatal_error( "Cannot build 64-bit code for this CPU\n" ); - break; - } - - return &argv[optind]; -} - - -/* load all specified resource files */ -static void load_resources( char *argv[], DLLSPEC *spec ) -{ - int i; - char **ptr, **last; - - switch (spec->type) - { - case SPEC_WIN16: - for (i = 0; i < nb_res_files; i++) load_res16_file( res_files[i], spec ); - break; - - case SPEC_WIN32: - for (i = 0; i < nb_res_files; i++) - { - if (!load_res32_file( res_files[i], spec )) - fatal_error( "%s is not a valid Win32 resource file\n", res_files[i] ); - } - - /* load any resource file found in the remaining arguments */ - for (ptr = last = argv; *ptr; ptr++) - { - if (!load_res32_file( *ptr, spec )) - *last++ = *ptr; /* not a resource file, keep it in the list */ - } - *last = NULL; - break; - } -} - -/* add input files that look like import libs to the import list */ -static void load_import_libs( char *argv[] ) -{ - char **ptr, **last; - - for (ptr = last = argv; *ptr; ptr++) - { - if (strendswith( *ptr, ".def" )) - add_import_dll( NULL, *ptr ); - else - *last++ = *ptr; /* not an import dll, keep it in the list */ - } - *last = NULL; -} - -static int parse_input_file( DLLSPEC *spec ) -{ - FILE *input_file = open_input_file( NULL, spec_file_name ); - char *extension = strrchr( spec_file_name, '.' ); - int result; - - spec->src_name = xstrdup( input_file_name ); - if (extension && !strcmp( extension, ".def" )) - result = parse_def_file( input_file, spec ); - else - result = parse_spec_file( input_file, spec ); - close_input_file( input_file ); - return result; -} - - -/******************************************************************* - * main - */ -int main(int argc, char **argv) -{ - DLLSPEC *spec = alloc_dll_spec(); - -#ifdef SIGHUP - signal( SIGHUP, exit_on_signal ); -#endif - signal( SIGTERM, exit_on_signal ); - signal( SIGINT, exit_on_signal ); - - output_file = stdout; - argv = parse_options( argc, argv, spec ); - - switch(exec_mode) - { - case MODE_DLL: - if (spec->subsystem != IMAGE_SUBSYSTEM_NATIVE) - spec->characteristics |= IMAGE_FILE_DLL; - if (!spec_file_name) fatal_error( "missing .spec file\n" ); - if (spec->type == SPEC_WIN32 && spec->main_module) /* embedded 16-bit module */ - { - spec->type = SPEC_WIN16; - load_resources( argv, spec ); - if (parse_input_file( spec )) BuildSpec16File( spec ); - break; - } - /* fall through */ - case MODE_EXE: - load_resources( argv, spec ); - load_import_libs( argv ); - if (spec_file_name && !parse_input_file( spec )) break; - if (fake_module) - { - if (spec->type == SPEC_WIN16) output_fake_module16( spec ); - else output_fake_module( spec ); - break; - } - read_undef_symbols( spec, argv ); - switch (spec->type) - { - case SPEC_WIN16: - output_spec16_file( spec ); - break; - case SPEC_WIN32: - BuildSpec32File( spec ); - break; - default: assert(0); - } - break; - case MODE_DEF: - if (argv[0]) fatal_error( "file argument '%s' not allowed in this mode\n", argv[0] ); - if (spec->type == SPEC_WIN16) fatal_error( "Cannot yet build .def file for 16-bit dlls\n" ); - if (!spec_file_name) fatal_error( "missing .spec file\n" ); - if (!parse_input_file( spec )) break; - BuildDef32File( spec ); - break; - case MODE_RELAY16: - if (argv[0]) fatal_error( "file argument '%s' not allowed in this mode\n", argv[0] ); - BuildRelays16(); - break; - case MODE_RELAY32: - if (argv[0]) fatal_error( "file argument '%s' not allowed in this mode\n", argv[0] ); - BuildRelays32(); - break; - case MODE_PEDLL: - if (argv[0]) fatal_error( "file argument '%s' not allowed in this mode\n", argv[0] ); - if (!parse_input_file( spec )) break; - BuildPedllFile( spec ); - break; - case MODE_RESOURCES: - load_resources( argv, spec ); - output_res_o_file( spec ); - break; - default: - usage(1); - break; - } - if (nb_errors) exit(1); - if (output_file_name) - { - if (fclose( output_file ) < 0) fatal_perror( "fclose" ); - if (output_file_source_name) assemble_file( output_file_source_name, output_file_name ); - output_file_name = NULL; - } - return 0; -} diff --git a/reactos/tools/winebuild/mkstemps.c b/reactos/tools/winebuild/mkstemps.c deleted file mode 100644 index 5558a6e78f0..00000000000 --- a/reactos/tools/winebuild/mkstemps.c +++ /dev/null @@ -1,139 +0,0 @@ -/* Copyright (C) 1991, 1992, 1996, 1998 Free Software Foundation, Inc. - This file is derived from mkstemp.c from the GNU C Library. - - The GNU C 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. - - The GNU C 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 the GNU C Library; if not, write to the Free - Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "config.h" - -#include -#include -#include -#include -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_SYS_TIME_H -#include -#endif -#ifdef HAVE_PROCESS_H -#include -#endif - -/* We need to provide a type for gcc_uint64_t. */ -#ifdef __GNUC__ -__extension__ typedef unsigned long long gcc_uint64_t; -#else -typedef unsigned long gcc_uint64_t; -#endif - -#ifndef TMP_MAX -#define TMP_MAX 16384 -#endif - -/* - -@deftypefn Replacement int mkstemps (char *@var{template}, int @var{suffix_len}) - -Generate a unique temporary file name from @var{template}. -@var{template} has the form: - -@example - @var{path}/ccXXXXXX@var{suffix} -@end example - -@var{suffix_len} tells us how long @var{suffix} is (it can be zero -length). The last six characters of @var{template} before @var{suffix} -must be @samp{XXXXXX}; they are replaced with a string that makes the -filename unique. Returns a file descriptor open on the file for -reading and writing. - -@end deftypefn - -*/ - -int -mkstemps ( - char *template, - int suffix_len) -{ - static const char letters[] - = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; - static gcc_uint64_t value; -#ifdef HAVE_GETTIMEOFDAY - struct timeval tv; -#endif - char *XXXXXX; - size_t len; - int count; - - len = strlen (template); - - if ((int) len < 6 + suffix_len - || strncmp (&template[len - 6 - suffix_len], "XXXXXX", 6)) - { - return -1; - } - - XXXXXX = &template[len - 6 - suffix_len]; - -#ifdef HAVE_GETTIMEOFDAY - /* Get some more or less random data. */ - gettimeofday (&tv, NULL); - value += ((gcc_uint64_t) tv.tv_usec << 16) ^ tv.tv_sec ^ getpid (); -#else - value += getpid (); -#endif - - for (count = 0; count < TMP_MAX; ++count) - { - gcc_uint64_t v = value; - int fd; - - /* Fill in the random bits. */ - XXXXXX[0] = letters[v % 62]; - v /= 62; - XXXXXX[1] = letters[v % 62]; - v /= 62; - XXXXXX[2] = letters[v % 62]; - v /= 62; - XXXXXX[3] = letters[v % 62]; - v /= 62; - XXXXXX[4] = letters[v % 62]; - v /= 62; - XXXXXX[5] = letters[v % 62]; - -#ifdef VMS - fd = open (template, O_RDWR|O_CREAT|O_EXCL, 0600, "fop=tmd"); -#else - fd = open (template, O_RDWR|O_CREAT|O_EXCL, 0600); -#endif - if (fd >= 0) - /* The file does not exist. */ - return fd; - - /* This is a random value. It is only necessary that the next - TMP_MAX values generated by adding 7777 to VALUE are different - with (module 2^32). */ - value += 7777; - } - - /* We return the null string if we can't find a unique file name. */ - template[0] = '\0'; - return -1; -} diff --git a/reactos/tools/winebuild/parser.c b/reactos/tools/winebuild/parser.c deleted file mode 100644 index ba813a4d30d..00000000000 --- a/reactos/tools/winebuild/parser.c +++ /dev/null @@ -1,1048 +0,0 @@ -/* - * Spec file parser - * - * Copyright 1993 Robert J. Amstadt - * Copyright 1995 Martin von Loewis - * Copyright 1995, 1996, 1997, 2004 Alexandre Julliard - * Copyright 1997 Eric Youngdale - * Copyright 1999 Ulrich Weigand - * - * 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 -#include -#include -#include -#include -#include - -#include "build.h" - -int current_line = 0; - -static char ParseBuffer[512]; -static char TokenBuffer[512]; -static char *ParseNext = ParseBuffer; -static FILE *input_file; - -static const char *separator_chars; -static const char *comment_chars; - -/* valid characters in ordinal names */ -static const char valid_ordname_chars[] = "/$:-_@?abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; - -static const char * const TypeNames[TYPE_NBTYPES] = -{ - "variable", /* TYPE_VARIABLE */ - "pascal", /* TYPE_PASCAL */ - "equate", /* TYPE_ABS */ - "stub", /* TYPE_STUB */ - "stdcall", /* TYPE_STDCALL */ - "cdecl", /* TYPE_CDECL */ - "varargs", /* TYPE_VARARGS */ - "fastcall", /* TYPE_FASTCALL */ - "extern" /* TYPE_EXTERN */ -}; - -static const char * const FlagNames[] = -{ - "norelay", /* FLAG_NORELAY */ - "noname", /* FLAG_NONAME */ - "ret16", /* FLAG_RET16 */ - "ret64", /* FLAG_RET64 */ - "register", /* FLAG_REGISTER */ - "private", /* FLAG_PRIVATE */ - "ordinal", /* FLAG_ORDINAL */ - NULL -}; - -static int IsNumberString(const char *s) -{ - while (*s) if (!isdigit(*s++)) return 0; - return 1; -} - -static inline int is_token_separator( char ch ) -{ - return strchr( separator_chars, ch ) != NULL; -} - -static inline int is_token_comment( char ch ) -{ - return strchr( comment_chars, ch ) != NULL; -} - -/* get the next line from the input file, or return 0 if at eof */ -static int get_next_line(void) -{ - ParseNext = ParseBuffer; - current_line++; - return (fgets(ParseBuffer, sizeof(ParseBuffer), input_file) != NULL); -} - -static const char * GetToken( int allow_eol ) -{ - char *p = ParseNext; - char *token = TokenBuffer; - - for (;;) - { - /* remove initial white space */ - p = ParseNext; - while (isspace(*p)) p++; - - if (*p == '\\' && p[1] == '\n') /* line continuation */ - { - if (!get_next_line()) - { - if (!allow_eol) error( "Unexpected end of file\n" ); - return NULL; - } - } - else break; - } - - if ((*p == '\0') || is_token_comment(*p)) - { - if (!allow_eol) error( "Declaration not terminated properly\n" ); - return NULL; - } - - /* - * Find end of token. - */ - if (is_token_separator(*p)) - { - /* a separator is always a complete token */ - *token++ = *p++; - } - else while (*p != '\0' && !is_token_separator(*p) && !isspace(*p)) - { - if (*p == '\\') p++; - if (*p) *token++ = *p++; - } - *token = '\0'; - ParseNext = p; - return TokenBuffer; -} - - -static ORDDEF *add_entry_point( DLLSPEC *spec ) -{ - ORDDEF *ret; - - if (spec->nb_entry_points == spec->alloc_entry_points) - { - spec->alloc_entry_points += 128; - spec->entry_points = xrealloc( spec->entry_points, - spec->alloc_entry_points * sizeof(*spec->entry_points) ); - } - ret = &spec->entry_points[spec->nb_entry_points++]; - memset( ret, 0, sizeof(*ret) ); - return ret; -} - -/******************************************************************* - * parse_spec_variable - * - * Parse a variable definition in a .spec file. - */ -static int parse_spec_variable( ORDDEF *odp, DLLSPEC *spec ) -{ - char *endptr; - int *value_array; - int n_values; - int value_array_size; - const char *token; - - if (spec->type == SPEC_WIN32) - { - error( "'variable' not supported in Win32, use 'extern' instead\n" ); - return 0; - } - - if (!(token = GetToken(0))) return 0; - if (*token != '(') - { - error( "Expected '(' got '%s'\n", token ); - return 0; - } - - n_values = 0; - value_array_size = 25; - value_array = xmalloc(sizeof(*value_array) * value_array_size); - - for (;;) - { - if (!(token = GetToken(0))) - { - free( value_array ); - return 0; - } - if (*token == ')') - break; - - value_array[n_values++] = strtol(token, &endptr, 0); - if (n_values == value_array_size) - { - value_array_size += 25; - value_array = xrealloc(value_array, - sizeof(*value_array) * value_array_size); - } - - if (endptr == NULL || *endptr != '\0') - { - error( "Expected number value, got '%s'\n", token ); - free( value_array ); - return 0; - } - } - - odp->u.var.n_values = n_values; - odp->u.var.values = xrealloc(value_array, sizeof(*value_array) * n_values); - return 1; -} - - -/******************************************************************* - * parse_spec_export - * - * Parse an exported function definition in a .spec file. - */ -static int parse_spec_export( ORDDEF *odp, DLLSPEC *spec ) -{ - const char *token; - unsigned int i; - - switch(spec->type) - { - case SPEC_WIN16: - if (odp->type == TYPE_STDCALL) - { - error( "'stdcall' not supported for Win16\n" ); - return 0; - } - break; - case SPEC_WIN32: - if (odp->type == TYPE_PASCAL) - { - error( "'pascal' not supported for Win32\n" ); - return 0; - } - break; - default: - break; - } - - if (!(token = GetToken(0))) return 0; - if (*token != '(') - { - error( "Expected '(' got '%s'\n", token ); - return 0; - } - - for (i = 0; i < sizeof(odp->u.func.arg_types); i++) - { - if (!(token = GetToken(0))) return 0; - if (*token == ')') - break; - - if (!strcmp(token, "word")) - odp->u.func.arg_types[i] = 'w'; - else if (!strcmp(token, "s_word")) - odp->u.func.arg_types[i] = 's'; - else if (!strcmp(token, "long") || !strcmp(token, "segptr")) - odp->u.func.arg_types[i] = 'l'; - else if (!strcmp(token, "ptr")) - odp->u.func.arg_types[i] = 'p'; - else if (!strcmp(token, "str")) - odp->u.func.arg_types[i] = 't'; - else if (!strcmp(token, "wstr")) - odp->u.func.arg_types[i] = 'W'; - else if (!strcmp(token, "segstr")) - odp->u.func.arg_types[i] = 'T'; - else if (!strcmp(token, "double")) - { - odp->u.func.arg_types[i++] = 'l'; - if (get_ptr_size() == 4 && i < sizeof(odp->u.func.arg_types)) - odp->u.func.arg_types[i] = 'l'; - } - else - { - error( "Unknown argument type '%s'\n", token ); - return 0; - } - - if (spec->type == SPEC_WIN32) - { - if (strcmp(token, "long") && - strcmp(token, "ptr") && - strcmp(token, "str") && - strcmp(token, "wstr") && - strcmp(token, "double")) - { - error( "Type '%s' not supported for Win32\n", token ); - return 0; - } - } - } - if ((*token != ')') || (i >= sizeof(odp->u.func.arg_types))) - { - error( "Too many arguments\n" ); - return 0; - } - - odp->u.func.arg_types[i] = '\0'; - if (odp->type == TYPE_VARARGS) - odp->flags |= FLAG_NORELAY; /* no relay debug possible for varags entry point */ - - if (!(token = GetToken(1))) - { - if (!strcmp( odp->name, "@" )) - { - error( "Missing handler name for anonymous function\n" ); - return 0; - } - odp->link_name = xstrdup( odp->name ); - } - else - { - odp->link_name = xstrdup( token ); - if (strchr( odp->link_name, '.' )) - { - if (spec->type == SPEC_WIN16) - { - error( "Forwarded functions not supported for Win16\n" ); - return 0; - } - odp->flags |= FLAG_FORWARD; - } - } - return 1; -} - - -/******************************************************************* - * parse_spec_equate - * - * Parse an 'equate' definition in a .spec file. - */ -static int parse_spec_equate( ORDDEF *odp, DLLSPEC *spec ) -{ - char *endptr; - int value; - const char *token; - - if (spec->type == SPEC_WIN32) - { - error( "'equate' not supported for Win32\n" ); - return 0; - } - if (!(token = GetToken(0))) return 0; - value = strtol(token, &endptr, 0); - if (endptr == NULL || *endptr != '\0') - { - error( "Expected number value, got '%s'\n", token ); - return 0; - } - if (value < -0x8000 || value > 0xffff) - { - error( "Value %d for absolute symbol doesn't fit in 16 bits\n", value ); - value = 0; - } - odp->u.abs.value = value; - return 1; -} - - -/******************************************************************* - * parse_spec_stub - * - * Parse a 'stub' definition in a .spec file - */ -static int parse_spec_stub( ORDDEF *odp, DLLSPEC *spec ) -{ - odp->u.func.arg_types[0] = '\0'; - odp->link_name = xstrdup(""); - odp->flags |= FLAG_CPU(CPU_x86) | FLAG_CPU(CPU_x86_64); /* don't bother generating stubs for Winelib */ - return 1; -} - - -/******************************************************************* - * parse_spec_extern - * - * Parse an 'extern' definition in a .spec file. - */ -static int parse_spec_extern( ORDDEF *odp, DLLSPEC *spec ) -{ - const char *token; - - if (spec->type == SPEC_WIN16) - { - error( "'extern' not supported for Win16, use 'variable' instead\n" ); - return 0; - } - if (!(token = GetToken(1))) - { - if (!strcmp( odp->name, "@" )) - { - error( "Missing handler name for anonymous extern\n" ); - return 0; - } - odp->link_name = xstrdup( odp->name ); - } - else - { - odp->link_name = xstrdup( token ); - if (strchr( odp->link_name, '.' )) odp->flags |= FLAG_FORWARD; - } - return 1; -} - - -/******************************************************************* - * parse_spec_flags - * - * Parse the optional flags for an entry point in a .spec file. - */ -static const char *parse_spec_flags( ORDDEF *odp ) -{ - unsigned int i; - const char *token; - - do - { - if (!(token = GetToken(0))) break; - if (!strncmp( token, "arch=", 5)) - { - char *args = xstrdup( token + 5 ); - char *cpu_name = strtok( args, "," ); - while (cpu_name) - { - if (!strcmp( cpu_name, "win32" )) - odp->flags |= FLAG_CPU_WIN32; - else if (!strcmp( cpu_name, "win64" )) - odp->flags |= FLAG_CPU_WIN64; - else - { - enum target_cpu cpu = get_cpu_from_name( cpu_name ); - if (cpu == -1) - { - error( "Unknown architecture '%s'\n", cpu_name ); - return NULL; - } - odp->flags |= FLAG_CPU( cpu ); - } - cpu_name = strtok( NULL, "," ); - } - free( args ); - } - else if (!strcmp( token, "i386" )) /* backwards compatibility */ - { - odp->flags |= FLAG_CPU(CPU_x86); - } - else - { - for (i = 0; FlagNames[i]; i++) - if (!strcmp( FlagNames[i], token )) break; - if (!FlagNames[i]) - { - error( "Unknown flag '%s'\n", token ); - return NULL; - } - odp->flags |= 1 << i; - } - token = GetToken(0); - } while (token && *token == '-'); - - return token; -} - - -/******************************************************************* - * parse_spec_ordinal - * - * Parse an ordinal definition in a .spec file. - */ -static int parse_spec_ordinal( int ordinal, DLLSPEC *spec ) -{ - const char *token; - size_t len; - ORDDEF *odp = add_entry_point( spec ); - - if (!(token = GetToken(0))) goto error; - - for (odp->type = 0; odp->type < TYPE_NBTYPES; odp->type++) - if (TypeNames[odp->type] && !strcmp( token, TypeNames[odp->type] )) - break; - - if (odp->type >= TYPE_NBTYPES) - { - error( "Expected type after ordinal, found '%s' instead\n", token ); - goto error; - } - - if (!(token = GetToken(0))) goto error; - if (*token == '-' && !(token = parse_spec_flags( odp ))) goto error; - - odp->name = xstrdup( token ); - odp->lineno = current_line; - odp->ordinal = ordinal; - - len = strspn( odp->name, valid_ordname_chars ); - if (len < strlen( odp->name )) - { - error( "Character '%c' is not allowed in exported name '%s'\n", odp->name[len], odp->name ); - goto error; - } - - switch(odp->type) - { - case TYPE_VARIABLE: - if (!parse_spec_variable( odp, spec )) goto error; - break; - case TYPE_PASCAL: - case TYPE_STDCALL: - case TYPE_VARARGS: - case TYPE_CDECL: - case TYPE_FASTCALL: - if (!parse_spec_export( odp, spec )) goto error; - break; - case TYPE_ABS: - if (!parse_spec_equate( odp, spec )) goto error; - break; - case TYPE_STUB: - if (!parse_spec_stub( odp, spec )) goto error; - break; - case TYPE_EXTERN: - if (!parse_spec_extern( odp, spec )) goto error; - break; - default: - assert( 0 ); - } - - if ((odp->flags & FLAG_CPU_MASK) && !(odp->flags & FLAG_CPU(target_cpu))) - { - /* ignore this entry point */ - spec->nb_entry_points--; - return 1; - } - - if (ordinal != -1) - { - if (!ordinal) - { - error( "Ordinal 0 is not valid\n" ); - goto error; - } - if (ordinal >= MAX_ORDINALS) - { - error( "Ordinal number %d too large\n", ordinal ); - goto error; - } - if (ordinal > spec->limit) spec->limit = ordinal; - if (ordinal < spec->base) spec->base = ordinal; - odp->ordinal = ordinal; - } - - if (odp->type == TYPE_STDCALL && !(odp->flags & FLAG_PRIVATE)) - { - if (!strcmp( odp->name, "DllRegisterServer" ) || - !strcmp( odp->name, "DllUnregisterServer" ) || - !strcmp( odp->name, "DllGetClassObject" ) || - !strcmp( odp->name, "DllGetVersion" ) || - !strcmp( odp->name, "DllInstall" ) || - !strcmp( odp->name, "DllCanUnloadNow" )) - { - warning( "Function %s should be marked private\n", odp->name ); - if (strcmp( odp->name, odp->link_name )) - warning( "Function %s should not use a different internal name (%s)\n", - odp->name, odp->link_name ); - } - } - - if (!strcmp( odp->name, "@" ) || odp->flags & (FLAG_NONAME | FLAG_ORDINAL)) - { - if (ordinal == -1) - { - if (!strcmp( odp->name, "@" )) - error( "Nameless function needs an explicit ordinal number\n" ); - else - error( "Function imported by ordinal needs an explicit ordinal number\n" ); - goto error; - } - if (spec->type != SPEC_WIN32) - { - error( "Nameless functions not supported for Win16\n" ); - goto error; - } - if (!strcmp( odp->name, "@" )) - { - free( odp->name ); - odp->name = NULL; - } - else if (!(odp->flags & FLAG_ORDINAL)) /* -ordinal only affects the import library */ - { - odp->export_name = odp->name; - odp->name = NULL; - } - } - return 1; - -error: - spec->nb_entry_points--; - free( odp->name ); - return 0; -} - - -static int name_compare( const void *ptr1, const void *ptr2 ) -{ - const ORDDEF *odp1 = *(const ORDDEF * const *)ptr1; - const ORDDEF *odp2 = *(const ORDDEF * const *)ptr2; - const char *name1 = odp1->name ? odp1->name : odp1->export_name; - const char *name2 = odp2->name ? odp2->name : odp2->export_name; - return strcmp( name1, name2 ); -} - -/******************************************************************* - * assign_names - * - * Build the name array and catch duplicates. - */ -static void assign_names( DLLSPEC *spec ) -{ - int i, j, nb_exp_names = 0; - ORDDEF **all_names; - - spec->nb_names = 0; - for (i = 0; i < spec->nb_entry_points; i++) - if (spec->entry_points[i].name) spec->nb_names++; - else if (spec->entry_points[i].export_name) nb_exp_names++; - - if (!spec->nb_names && !nb_exp_names) return; - - /* check for duplicates */ - - all_names = xmalloc( (spec->nb_names + nb_exp_names) * sizeof(all_names[0]) ); - for (i = j = 0; i < spec->nb_entry_points; i++) - if (spec->entry_points[i].name || spec->entry_points[i].export_name) - all_names[j++] = &spec->entry_points[i]; - - qsort( all_names, j, sizeof(all_names[0]), name_compare ); - - for (i = 0; i < j - 1; i++) - { - const char *name1 = all_names[i]->name ? all_names[i]->name : all_names[i]->export_name; - const char *name2 = all_names[i+1]->name ? all_names[i+1]->name : all_names[i+1]->export_name; - if (!strcmp( name1, name2 )) - { - current_line = max( all_names[i]->lineno, all_names[i+1]->lineno ); - error( "'%s' redefined\n%s:%d: First defined here\n", - name1, input_file_name, - min( all_names[i]->lineno, all_names[i+1]->lineno ) ); - } - } - free( all_names ); - - if (spec->nb_names) - { - spec->names = xmalloc( spec->nb_names * sizeof(spec->names[0]) ); - for (i = j = 0; i < spec->nb_entry_points; i++) - if (spec->entry_points[i].name) spec->names[j++] = &spec->entry_points[i]; - - /* sort the list of names */ - qsort( spec->names, spec->nb_names, sizeof(spec->names[0]), name_compare ); - } -} - -/******************************************************************* - * assign_ordinals - * - * Build the ordinal array. - */ -static void assign_ordinals( DLLSPEC *spec ) -{ - int i, count, ordinal; - - /* start assigning from base, or from 1 if no ordinal defined yet */ - - spec->base = MAX_ORDINALS; - spec->limit = 0; - for (i = 0; i < spec->nb_entry_points; i++) - { - ordinal = spec->entry_points[i].ordinal; - if (ordinal == -1) continue; - if (ordinal > spec->limit) spec->limit = ordinal; - if (ordinal < spec->base) spec->base = ordinal; - } - if (spec->base == MAX_ORDINALS) spec->base = 1; - if (spec->limit < spec->base) spec->limit = spec->base; - - count = max( spec->limit + 1, spec->base + spec->nb_entry_points ); - spec->ordinals = xmalloc( count * sizeof(spec->ordinals[0]) ); - memset( spec->ordinals, 0, count * sizeof(spec->ordinals[0]) ); - - /* fill in all explicitly specified ordinals */ - for (i = 0; i < spec->nb_entry_points; i++) - { - ordinal = spec->entry_points[i].ordinal; - if (ordinal == -1) continue; - if (spec->ordinals[ordinal]) - { - current_line = max( spec->entry_points[i].lineno, spec->ordinals[ordinal]->lineno ); - error( "ordinal %d redefined\n%s:%d: First defined here\n", - ordinal, input_file_name, - min( spec->entry_points[i].lineno, spec->ordinals[ordinal]->lineno ) ); - } - else spec->ordinals[ordinal] = &spec->entry_points[i]; - } - - /* now assign ordinals to the rest */ - for (i = 0, ordinal = spec->base; i < spec->nb_entry_points; i++) - { - if (spec->entry_points[i].ordinal != -1) continue; - while (spec->ordinals[ordinal]) ordinal++; - if (ordinal >= MAX_ORDINALS) - { - current_line = spec->entry_points[i].lineno; - fatal_error( "Too many functions defined (max %d)\n", MAX_ORDINALS ); - } - spec->entry_points[i].ordinal = ordinal; - spec->ordinals[ordinal] = &spec->entry_points[i]; - } - if (ordinal > spec->limit) spec->limit = ordinal; -} - - -/******************************************************************* - * add_16bit_exports - * - * Add the necessary exports to the 32-bit counterpart of a 16-bit module. - */ -void add_16bit_exports( DLLSPEC *spec32, DLLSPEC *spec16 ) -{ - ORDDEF *odp; - - /* add an export for the NE module */ - - odp = add_entry_point( spec32 ); - odp->type = TYPE_EXTERN; - odp->name = xstrdup( "__wine_spec_dos_header" ); - odp->lineno = 0; - odp->ordinal = 1; - odp->link_name = xstrdup( ".L__wine_spec_dos_header" ); - - if (spec16->main_module) - { - odp = add_entry_point( spec32 ); - odp->type = TYPE_EXTERN; - odp->name = xstrdup( "__wine_spec_main_module" ); - odp->lineno = 0; - odp->ordinal = 2; - odp->link_name = xstrdup( ".L__wine_spec_main_module" ); - } - - assign_names( spec32 ); - assign_ordinals( spec32 ); -} - - -/******************************************************************* - * parse_spec_file - * - * Parse a .spec file. - */ -int parse_spec_file( FILE *file, DLLSPEC *spec ) -{ - const char *token; - - input_file = file; - current_line = 0; - - comment_chars = "#;"; - separator_chars = "()-"; - - while (get_next_line()) - { - if (!(token = GetToken(1))) continue; - if (strcmp(token, "@") == 0) - { - if (spec->type != SPEC_WIN32) - { - error( "'@' ordinals not supported for Win16\n" ); - continue; - } - if (!parse_spec_ordinal( -1, spec )) continue; - } - else if (IsNumberString(token)) - { - if (!parse_spec_ordinal( atoi(token), spec )) continue; - } - else - { - error( "Expected ordinal declaration, got '%s'\n", token ); - continue; - } - if ((token = GetToken(1))) error( "Syntax error near '%s'\n", token ); - } - - current_line = 0; /* no longer parsing the input file */ - assign_names( spec ); - assign_ordinals( spec ); - return !nb_errors; -} - - -/******************************************************************* - * parse_def_library - * - * Parse a LIBRARY declaration in a .def file. - */ -static int parse_def_library( DLLSPEC *spec ) -{ - const char *token = GetToken(1); - - if (!token) return 1; - if (strcmp( token, "BASE" )) - { - free( spec->file_name ); - spec->file_name = xstrdup( token ); - if (!(token = GetToken(1))) return 1; - } - if (strcmp( token, "BASE" )) - { - error( "Expected library name or BASE= declaration, got '%s'\n", token ); - return 0; - } - if (!(token = GetToken(0))) return 0; - if (strcmp( token, "=" )) - { - error( "Expected '=' after BASE, got '%s'\n", token ); - return 0; - } - if (!(token = GetToken(0))) return 0; - /* FIXME: do something with base address */ - - return 1; -} - - -/******************************************************************* - * parse_def_stack_heap_size - * - * Parse a STACKSIZE or HEAPSIZE declaration in a .def file. - */ -static int parse_def_stack_heap_size( int is_stack, DLLSPEC *spec ) -{ - const char *token = GetToken(0); - char *end; - unsigned long size; - - if (!token) return 0; - size = strtoul( token, &end, 0 ); - if (*end) - { - error( "Invalid number '%s'\n", token ); - return 0; - } - if (is_stack) spec->stack_size = size / 1024; - else spec->heap_size = size / 1024; - if (!(token = GetToken(1))) return 1; - if (strcmp( token, "," )) - { - error( "Expected ',' after size, got '%s'\n", token ); - return 0; - } - if (!(token = GetToken(0))) return 0; - /* FIXME: do something with reserve size */ - return 1; -} - - -/******************************************************************* - * parse_def_export - * - * Parse an export declaration in a .def file. - */ -static int parse_def_export( char *name, DLLSPEC *spec ) -{ - int i, args; - const char *token = GetToken(1); - ORDDEF *odp = add_entry_point( spec ); - - odp->lineno = current_line; - odp->ordinal = -1; - odp->name = name; - args = remove_stdcall_decoration( odp->name ); - if (args == -1) odp->type = TYPE_CDECL; - else - { - odp->type = TYPE_STDCALL; - args /= get_ptr_size(); - if (args >= sizeof(odp->u.func.arg_types)) - { - error( "Too many arguments in stdcall function '%s'\n", odp->name ); - return 0; - } - for (i = 0; i < args; i++) odp->u.func.arg_types[i] = 'l'; - } - - /* check for optional internal name */ - - if (token && !strcmp( token, "=" )) - { - if (!(token = GetToken(0))) goto error; - odp->link_name = xstrdup( token ); - remove_stdcall_decoration( odp->link_name ); - token = GetToken(1); - } - else - { - odp->link_name = xstrdup( name ); - } - - /* check for optional ordinal */ - - if (token && token[0] == '@') - { - int ordinal; - - if (!IsNumberString( token+1 )) - { - error( "Expected number after '@', got '%s'\n", token+1 ); - goto error; - } - ordinal = atoi( token+1 ); - if (!ordinal) - { - error( "Ordinal 0 is not valid\n" ); - goto error; - } - if (ordinal >= MAX_ORDINALS) - { - error( "Ordinal number %d too large\n", ordinal ); - goto error; - } - odp->ordinal = ordinal; - token = GetToken(1); - } - - /* check for other optional keywords */ - - if (token && !strcmp( token, "NONAME" )) - { - if (odp->ordinal == -1) - { - error( "NONAME requires an ordinal\n" ); - goto error; - } - odp->export_name = odp->name; - odp->name = NULL; - odp->flags |= FLAG_NONAME; - token = GetToken(1); - } - if (token && !strcmp( token, "PRIVATE" )) - { - odp->flags |= FLAG_PRIVATE; - token = GetToken(1); - } - if (token && !strcmp( token, "DATA" )) - { - odp->type = TYPE_EXTERN; - token = GetToken(1); - } - if (token) - { - error( "Garbage text '%s' found at end of export declaration\n", token ); - goto error; - } - return 1; - -error: - spec->nb_entry_points--; - free( odp->name ); - return 0; -} - - -/******************************************************************* - * parse_def_file - * - * Parse a .def file. - */ -int parse_def_file( FILE *file, DLLSPEC *spec ) -{ - const char *token; - int in_exports = 0; - - input_file = file; - current_line = 0; - - comment_chars = ";"; - separator_chars = ",="; - - while (get_next_line()) - { - if (!(token = GetToken(1))) continue; - - if (!strcmp( token, "LIBRARY" ) || !strcmp( token, "NAME" )) - { - if (!parse_def_library( spec )) continue; - goto end_of_line; - } - else if (!strcmp( token, "STACKSIZE" )) - { - if (!parse_def_stack_heap_size( 1, spec )) continue; - goto end_of_line; - } - else if (!strcmp( token, "HEAPSIZE" )) - { - if (!parse_def_stack_heap_size( 0, spec )) continue; - goto end_of_line; - } - else if (!strcmp( token, "EXPORTS" )) - { - in_exports = 1; - if (!(token = GetToken(1))) continue; - } - else if (!strcmp( token, "IMPORTS" )) - { - in_exports = 0; - if (!(token = GetToken(1))) continue; - } - else if (!strcmp( token, "SECTIONS" )) - { - in_exports = 0; - if (!(token = GetToken(1))) continue; - } - - if (!in_exports) continue; /* ignore this line */ - if (!parse_def_export( xstrdup(token), spec )) continue; - - end_of_line: - if ((token = GetToken(1))) error( "Syntax error near '%s'\n", token ); - } - - current_line = 0; /* no longer parsing the input file */ - assign_names( spec ); - assign_ordinals( spec ); - return !nb_errors; -} diff --git a/reactos/tools/winebuild/relay.c b/reactos/tools/winebuild/relay.c deleted file mode 100644 index 3f955451562..00000000000 --- a/reactos/tools/winebuild/relay.c +++ /dev/null @@ -1,1182 +0,0 @@ -/* - * Relay calls helper routines - * - * Copyright 1993 Robert J. Amstadt - * Copyright 1995 Martin von Loewis - * Copyright 1995, 1996, 1997 Alexandre Julliard - * Copyright 1997 Eric Youngdale - * Copyright 1999 Ulrich Weigand - * - * 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 -#include - -#include "build.h" - -/* offset of the stack pointer relative to %fs:(0) */ -#define STACKOFFSET 0xc0 /* FIELD_OFFSET(TEB,WOW32Reserved) */ - -/* fix this if the ntdll_thread_regs structure is changed */ -#define GS_OFFSET 0x1d8 /* FIELD_OFFSET(TEB,SystemReserved2) + FIELD_OFFSET(ntdll_thread_data,gs) */ - -#define DPMI_VIF_OFFSET (0x1fc + 0) /* FIELD_OFFSET(TEB,GdiTebBatch) + FIELD_OFFSET(WINE_VM86_TEB_INFO,dpmi_vif) */ -#define VM86_PENDING_OFFSET (0x1fc + 4) /* FIELD_OFFSET(TEB,GdiTebBatch) + FIELD_OFFSET(WINE_VM86_TEB_INFO,vm86_pending) */ - -static void function_header( const char *name ) -{ - output( "\n\t.align %d\n", get_alignment(4) ); - output( "\t%s\n", func_declaration(name) ); - output( "%s\n", asm_globl(name) ); -} - - -/******************************************************************* - * BuildCallFrom16Core - * - * This routine builds the core routines used in 16->32 thunks: - * CallFrom16Word, CallFrom16Long, CallFrom16Register, and CallFrom16Thunk. - * - * These routines are intended to be called via a far call (with 32-bit - * operand size) from 16-bit code. The 16-bit code stub must push %bp, - * the 32-bit entry point to be called, and the argument conversion - * routine to be used (see stack layout below). - * - * The core routine completes the STACK16FRAME on the 16-bit stack and - * switches to the 32-bit stack. Then, the argument conversion routine - * is called; it gets passed the 32-bit entry point and a pointer to the - * 16-bit arguments (on the 16-bit stack) as parameters. (You can either - * use conversion routines automatically generated by BuildCallFrom16, - * or write your own for special purposes.) - * - * The conversion routine must call the 32-bit entry point, passing it - * the converted arguments, and return its return value to the core. - * After the conversion routine has returned, the core switches back - * to the 16-bit stack, converts the return value to the DX:AX format - * (CallFrom16Long), and returns to the 16-bit call stub. All parameters, - * including %bp, are popped off the stack. - * - * The 16-bit call stub now returns to the caller, popping the 16-bit - * arguments if necessary (pascal calling convention). - * - * In the case of a 'register' function, CallFrom16Register fills a - * CONTEXT86 structure with the values all registers had at the point - * the first instruction of the 16-bit call stub was about to be - * executed. A pointer to this CONTEXT86 is passed as third parameter - * to the argument conversion routine, which typically passes it on - * to the called 32-bit entry point. - * - * CallFrom16Thunk is a special variant used by the implementation of - * the Win95 16->32 thunk functions C16ThkSL and C16ThkSL01 and is - * implemented as follows: - * On entry, the EBX register is set up to contain a flat pointer to the - * 16-bit stack such that EBX+22 points to the first argument. - * Then, the entry point is called, while EBP is set up to point - * to the return address (on the 32-bit stack). - * The called function returns with CX set to the number of bytes - * to be popped of the caller's stack. - * - * Stack layout upon entry to the core routine (STACK16FRAME): - * ... ... - * (sp+24) word first 16-bit arg - * (sp+22) word cs - * (sp+20) word ip - * (sp+18) word bp - * (sp+14) long 32-bit entry point (reused for Win16 mutex recursion count) - * (sp+12) word ip of actual entry point (necessary for relay debugging) - * (sp+8) long relay (argument conversion) function entry point - * (sp+4) long cs of 16-bit entry point - * (sp) long ip of 16-bit entry point - * - * Added on the stack: - * (sp-2) word saved gs - * (sp-4) word saved fs - * (sp-6) word saved es - * (sp-8) word saved ds - * (sp-12) long saved ebp - * (sp-16) long saved ecx - * (sp-20) long saved edx - * (sp-24) long saved previous stack - */ -static void BuildCallFrom16Core( int reg_func, int thunk ) -{ - /* Function header */ - if (thunk) function_header( "__wine_call_from_16_thunk" ); - else if (reg_func) function_header( "__wine_call_from_16_regs" ); - else function_header( "__wine_call_from_16" ); - - /* Create STACK16FRAME (except STACK32FRAME link) */ - output( "\tpushw %%gs\n" ); - output( "\tpushw %%fs\n" ); - output( "\tpushw %%es\n" ); - output( "\tpushw %%ds\n" ); - output( "\tpushl %%ebp\n" ); - output( "\tpushl %%ecx\n" ); - output( "\tpushl %%edx\n" ); - - /* Save original EFlags register */ - if (reg_func) output( "\tpushfl\n" ); - - if ( UsePIC ) - { - output( "\tcall 1f\n" ); - output( "1:\tpopl %%ecx\n" ); - output( "\t.byte 0x2e\n\tmovl %s-1b(%%ecx),%%edx\n", asm_name("CallTo16_DataSelector") ); - } - else - output( "\t.byte 0x2e\n\tmovl %s,%%edx\n", asm_name("CallTo16_DataSelector") ); - - /* Load 32-bit segment registers */ - output( "\tmovw %%dx, %%ds\n" ); - output( "\tmovw %%dx, %%es\n" ); - - if ( UsePIC ) - output( "\tmovw %s-1b(%%ecx), %%fs\n", asm_name("CallTo16_TebSelector") ); - else - output( "\tmovw %s, %%fs\n", asm_name("CallTo16_TebSelector") ); - - output( "\t.byte 0x64\n\tmov (%d),%%gs\n", GS_OFFSET ); - - /* Translate STACK16FRAME base to flat offset in %edx */ - output( "\tmovw %%ss, %%dx\n" ); - output( "\tandl $0xfff8, %%edx\n" ); - output( "\tshrl $1, %%edx\n" ); - if (UsePIC) - { - output( "\taddl wine_ldt_copy_ptr-1b(%%ecx),%%edx\n" ); - output( "\tmovl (%%edx), %%edx\n" ); - } - else - output( "\tmovl %s(%%edx), %%edx\n", asm_name("wine_ldt_copy") ); - output( "\tmovzwl %%sp, %%ebp\n" ); - output( "\tleal %d(%%ebp,%%edx), %%edx\n", reg_func ? 0 : -4 ); - - /* Get saved flags into %ecx */ - if (reg_func) output( "\tpopl %%ecx\n" ); - - /* Get the 32-bit stack pointer from the TEB and complete STACK16FRAME */ - output( "\t.byte 0x64\n\tmovl (%d), %%ebp\n", STACKOFFSET ); - output( "\tpushl %%ebp\n" ); - - /* Switch stacks */ - output( "\t.byte 0x64\n\tmovw %%ss, (%d)\n", STACKOFFSET + 2 ); - output( "\t.byte 0x64\n\tmovw %%sp, (%d)\n", STACKOFFSET ); - output( "\tpushl %%ds\n" ); - output( "\tpopl %%ss\n" ); - output( "\tmovl %%ebp, %%esp\n" ); - output( "\taddl $0x20,%%ebp\n"); /* FIELD_OFFSET(STACK32FRAME,ebp) */ - - - /* At this point: - STACK16FRAME is completely set up - DS, ES, SS: flat data segment - FS: current TEB - ESP: points to last STACK32FRAME - EBP: points to ebp member of last STACK32FRAME - EDX: points to current STACK16FRAME - ECX: contains saved flags - all other registers: unchanged */ - - /* Special case: C16ThkSL stub */ - if ( thunk ) - { - /* Set up registers as expected and call thunk */ - output( "\tleal 0x1a(%%edx),%%ebx\n" ); /* sizeof(STACK16FRAME)-22 */ - output( "\tleal -4(%%esp), %%ebp\n" ); - - output( "\tcall *0x26(%%edx)\n"); /* FIELD_OFFSET(STACK16FRAME,entry_point) */ - - /* Switch stack back */ - output( "\t.byte 0x64\n\tmovw (%d), %%ss\n", STACKOFFSET+2 ); - output( "\t.byte 0x64\n\tmovzwl (%d), %%esp\n", STACKOFFSET ); - output( "\t.byte 0x64\n\tpopl (%d)\n", STACKOFFSET ); - - /* Restore registers and return directly to caller */ - output( "\taddl $8, %%esp\n" ); - output( "\tpopl %%ebp\n" ); - output( "\tpopw %%ds\n" ); - output( "\tpopw %%es\n" ); - output( "\tpopw %%fs\n" ); - output( "\tpopw %%gs\n" ); - output( "\taddl $20, %%esp\n" ); - - output( "\txorb %%ch, %%ch\n" ); - output( "\tpopl %%ebx\n" ); - output( "\taddw %%cx, %%sp\n" ); - output( "\tpush %%ebx\n" ); - - output( "\t.byte 0x66\n" ); - output( "\tlret\n" ); - - return; - } - - - /* Build register CONTEXT */ - if ( reg_func ) - { - output( "\tsubl $0x2cc,%%esp\n" ); /* sizeof(CONTEXT86) */ - - output( "\tmovl %%ecx,0xc0(%%esp)\n" ); /* EFlags */ - - output( "\tmovl %%eax,0xb0(%%esp)\n" ); /* Eax */ - output( "\tmovl %%ebx,0xa4(%%esp)\n" ); /* Ebx */ - output( "\tmovl %%esi,0xa0(%%esp)\n" ); /* Esi */ - output( "\tmovl %%edi,0x9c(%%esp)\n" ); /* Edi */ - - output( "\tmovl 0x0c(%%edx),%%eax\n"); /* FIELD_OFFSET(STACK16FRAME,ebp) */ - output( "\tmovl %%eax,0xb4(%%esp)\n" ); /* Ebp */ - output( "\tmovl 0x08(%%edx),%%eax\n"); /* FIELD_OFFSET(STACK16FRAME,ecx) */ - output( "\tmovl %%eax,0xac(%%esp)\n" ); /* Ecx */ - output( "\tmovl 0x04(%%edx),%%eax\n"); /* FIELD_OFFSET(STACK16FRAME,edx) */ - output( "\tmovl %%eax,0xa8(%%esp)\n" ); /* Edx */ - - output( "\tmovzwl 0x10(%%edx),%%eax\n"); /* FIELD_OFFSET(STACK16FRAME,ds) */ - output( "\tmovl %%eax,0x98(%%esp)\n" ); /* SegDs */ - output( "\tmovzwl 0x12(%%edx),%%eax\n"); /* FIELD_OFFSET(STACK16FRAME,es) */ - output( "\tmovl %%eax,0x94(%%esp)\n" ); /* SegEs */ - output( "\tmovzwl 0x14(%%edx),%%eax\n"); /* FIELD_OFFSET(STACK16FRAME,fs) */ - output( "\tmovl %%eax,0x90(%%esp)\n" ); /* SegFs */ - output( "\tmovzwl 0x16(%%edx),%%eax\n"); /* FIELD_OFFSET(STACK16FRAME,gs) */ - output( "\tmovl %%eax,0x8c(%%esp)\n" ); /* SegGs */ - - output( "\tmovzwl 0x2e(%%edx),%%eax\n"); /* FIELD_OFFSET(STACK16FRAME,cs) */ - output( "\tmovl %%eax,0xbc(%%esp)\n" ); /* SegCs */ - output( "\tmovzwl 0x2c(%%edx),%%eax\n"); /* FIELD_OFFSET(STACK16FRAME,ip) */ - output( "\tmovl %%eax,0xb8(%%esp)\n" ); /* Eip */ - - output( "\t.byte 0x64\n\tmovzwl (%d), %%eax\n", STACKOFFSET+2 ); - output( "\tmovl %%eax,0xc8(%%esp)\n" ); /* SegSs */ - output( "\t.byte 0x64\n\tmovzwl (%d), %%eax\n", STACKOFFSET ); - output( "\taddl $0x2c,%%eax\n"); /* FIELD_OFFSET(STACK16FRAME,ip) */ - output( "\tmovl %%eax,0xc4(%%esp)\n" ); /* Esp */ -#if 0 - output( "\tfsave 0x1c(%%esp)\n" ); /* FloatSave */ -#endif - - /* Push address of CONTEXT86 structure -- popped by the relay routine */ - output( "\tmovl %%esp,%%eax\n" ); - output( "\tandl $~15,%%esp\n" ); - output( "\tsubl $4,%%esp\n" ); - output( "\tpushl %%eax\n" ); - } - else - { - output( "\tsubl $8,%%esp\n" ); - output( "\tandl $~15,%%esp\n" ); - output( "\taddl $8,%%esp\n" ); - } - - /* Call relay routine (which will call the API entry point) */ - output( "\tleal 0x30(%%edx),%%eax\n" ); /* sizeof(STACK16FRAME) */ - output( "\tpushl %%eax\n" ); - output( "\tpushl 0x26(%%edx)\n"); /* FIELD_OFFSET(STACK16FRAME,entry_point) */ - output( "\tcall *0x20(%%edx)\n"); /* FIELD_OFFSET(STACK16FRAME,relay) */ - - if ( reg_func ) - { - output( "\tleal -748(%%ebp),%%ebx\n" ); /* sizeof(CONTEXT) + FIELD_OFFSET(STACK32FRAME,ebp) */ - - /* Switch stack back */ - output( "\t.byte 0x64\n\tmovw (%d), %%ss\n", STACKOFFSET+2 ); - output( "\t.byte 0x64\n\tmovzwl (%d), %%esp\n", STACKOFFSET ); - output( "\t.byte 0x64\n\tpopl (%d)\n", STACKOFFSET ); - - /* Get return address to CallFrom16 stub */ - output( "\taddw $0x14,%%sp\n" ); /* FIELD_OFFSET(STACK16FRAME,callfrom_ip)-4 */ - output( "\tpopl %%eax\n" ); - output( "\tpopl %%edx\n" ); - - /* Restore all registers from CONTEXT */ - output( "\tmovw 0xc8(%%ebx),%%ss\n"); /* SegSs */ - output( "\tmovl 0xc4(%%ebx),%%esp\n"); /* Esp */ - output( "\taddl $4, %%esp\n" ); /* room for final return address */ - - output( "\tpushw 0xbc(%%ebx)\n"); /* SegCs */ - output( "\tpushw 0xb8(%%ebx)\n"); /* Eip */ - output( "\tpushl %%edx\n" ); - output( "\tpushl %%eax\n" ); - output( "\tpushl 0xc0(%%ebx)\n"); /* EFlags */ - output( "\tpushl 0x98(%%ebx)\n"); /* SegDs */ - - output( "\tpushl 0x94(%%ebx)\n"); /* SegEs */ - output( "\tpopl %%es\n" ); - output( "\tpushl 0x90(%%ebx)\n"); /* SegFs */ - output( "\tpopl %%fs\n" ); - output( "\tpushl 0x8c(%%ebx)\n"); /* SegGs */ - output( "\tpopl %%gs\n" ); - - output( "\tmovl 0xb4(%%ebx),%%ebp\n"); /* Ebp */ - output( "\tmovl 0xa0(%%ebx),%%esi\n"); /* Esi */ - output( "\tmovl 0x9c(%%ebx),%%edi\n"); /* Edi */ - output( "\tmovl 0xb0(%%ebx),%%eax\n"); /* Eax */ - output( "\tmovl 0xa8(%%ebx),%%edx\n"); /* Edx */ - output( "\tmovl 0xac(%%ebx),%%ecx\n"); /* Ecx */ - output( "\tmovl 0xa4(%%ebx),%%ebx\n"); /* Ebx */ - - output( "\tpopl %%ds\n" ); - output( "\tpopfl\n" ); - output( "\tlret\n" ); - } - else - { - /* Switch stack back */ - output( "\t.byte 0x64\n\tmovw (%d), %%ss\n", STACKOFFSET+2 ); - output( "\t.byte 0x64\n\tmovzwl (%d), %%esp\n", STACKOFFSET ); - output( "\t.byte 0x64\n\tpopl (%d)\n", STACKOFFSET ); - - /* Restore registers */ - output( "\tpopl %%edx\n" ); - output( "\tpopl %%ecx\n" ); - output( "\tpopl %%ebp\n" ); - output( "\tpopw %%ds\n" ); - output( "\tpopw %%es\n" ); - output( "\tpopw %%fs\n" ); - output( "\tpopw %%gs\n" ); - - /* Return to return stub which will return to caller */ - output( "\tlret $12\n" ); - } - if (thunk) output_function_size( "__wine_call_from_16_thunk" ); - else if (reg_func) output_function_size( "__wine_call_from_16_regs" ); - else output_function_size( "__wine_call_from_16" ); -} - - -/******************************************************************* - * BuildCallTo16Core - * - * This routine builds the core routines used in 32->16 thunks: - * - * extern DWORD WINAPI wine_call_to_16( FARPROC16 target, DWORD cbArgs, PEXCEPTION_HANDLER handler ); - * extern void WINAPI wine_call_to_16_regs( CONTEXT86 *context, DWORD cbArgs, PEXCEPTION_HANDLER handler ); - * - * These routines can be called directly from 32-bit code. - * - * All routines expect that the 16-bit stack contents (arguments) and the - * return address (segptr to CallTo16_Ret) were already set up by the - * caller; nb_args must contain the number of bytes to be conserved. The - * 16-bit SS:SP will be set accordingly. - * - * All other registers are either taken from the CONTEXT86 structure - * or else set to default values. The target routine address is either - * given directly or taken from the CONTEXT86. - */ -static void BuildCallTo16Core( int reg_func ) -{ - const char *name = reg_func ? "wine_call_to_16_regs" : "wine_call_to_16"; - - /* Function header */ - function_header( name ); - - /* Function entry sequence */ - output( "\tpushl %%ebp\n" ); - output( "\tmovl %%esp, %%ebp\n" ); - - /* Save the 32-bit registers */ - output( "\tpushl %%ebx\n" ); - output( "\tpushl %%esi\n" ); - output( "\tpushl %%edi\n" ); - output( "\t.byte 0x64\n\tmov %%gs,(%d)\n", GS_OFFSET ); - - /* Setup exception frame */ - output( "\t.byte 0x64\n\tpushl (%d)\n", STACKOFFSET ); - output( "\tpushl 16(%%ebp)\n" ); /* handler */ - output( "\t.byte 0x64\n\tpushl (0)\n" ); - output( "\t.byte 0x64\n\tmovl %%esp,(0)\n" ); - - /* Call the actual CallTo16 routine (simulate a lcall) */ - output( "\tpushl %%cs\n" ); - output( "\tcall .L%s\n", name ); - - /* Remove exception frame */ - output( "\t.byte 0x64\n\tpopl (0)\n" ); - output( "\taddl $4, %%esp\n" ); - output( "\t.byte 0x64\n\tpopl (%d)\n", STACKOFFSET ); - - if ( !reg_func ) - { - /* Convert return value */ - output( "\tandl $0xffff,%%eax\n" ); - output( "\tshll $16,%%edx\n" ); - output( "\torl %%edx,%%eax\n" ); - } - else - { - /* - * Modify CONTEXT86 structure to contain new values - * - * NOTE: We restore only EAX, EBX, EDX, EDX, EBP, and ESP. - * The segment registers as well as ESI and EDI should - * not be modified by a well-behaved 16-bit routine in - * any case. [If necessary, we could restore them as well, - * at the cost of a somewhat less efficient return path.] - */ - - output( "\tmovl 0x14(%%esp),%%edi\n" ); /* FIELD_OFFSET(STACK32FRAME,target) - FIELD_OFFSET(STACK32FRAME,edi) */ - /* everything above edi has been popped already */ - - output( "\tmovl %%eax,0xb0(%%edi)\n"); /* Eax */ - output( "\tmovl %%ebx,0xa4(%%edi)\n"); /* Ebx */ - output( "\tmovl %%ecx,0xac(%%edi)\n"); /* Ecx */ - output( "\tmovl %%edx,0xa8(%%edi)\n"); /* Edx */ - output( "\tmovl %%ebp,0xb4(%%edi)\n"); /* Ebp */ - output( "\tmovl %%esi,0xc4(%%edi)\n"); /* Esp */ - /* The return glue code saved %esp into %esi */ - } - - /* Restore the 32-bit registers */ - output( "\tpopl %%edi\n" ); - output( "\tpopl %%esi\n" ); - output( "\tpopl %%ebx\n" ); - - /* Function exit sequence */ - output( "\tpopl %%ebp\n" ); - output( "\tret $12\n" ); - - - /* Start of the actual CallTo16 routine */ - - output( ".L%s:\n", name ); - - /* Switch to the 16-bit stack */ - output( "\tmovl %%esp,%%edx\n" ); - output( "\t.byte 0x64\n\tmovw (%d),%%ss\n", STACKOFFSET + 2); - output( "\t.byte 0x64\n\tmovw (%d),%%sp\n", STACKOFFSET ); - output( "\t.byte 0x64\n\tmovl %%edx,(%d)\n", STACKOFFSET ); - - /* Make %bp point to the previous stackframe (built by CallFrom16) */ - output( "\tmovzwl %%sp,%%ebp\n" ); - output( "\tleal 0x2a(%%ebp),%%ebp\n"); /* FIELD_OFFSET(STACK16FRAME,bp) */ - - /* Add the specified offset to the new sp */ - output( "\tsubw 0x2c(%%edx), %%sp\n"); /* FIELD_OFFSET(STACK32FRAME,nb_args) */ - - if (reg_func) - { - /* Push the called routine address */ - output( "\tmovl 0x28(%%edx),%%edx\n"); /* FIELD_OFFSET(STACK32FRAME,target) */ - output( "\tpushw 0xbc(%%edx)\n"); /* SegCs */ - output( "\tpushw 0xb8(%%edx)\n"); /* Eip */ - - /* Get the registers */ - output( "\tpushw 0x98(%%edx)\n"); /* SegDs */ - output( "\tpushl 0x94(%%edx)\n"); /* SegEs */ - output( "\tpopl %%es\n" ); - output( "\tpushl 0x90(%%edx)\n"); /* SegFs */ - output( "\tpopl %%fs\n" ); - output( "\tpushl 0x8c(%%edx)\n"); /* SegGs */ - output( "\tpopl %%gs\n" ); - output( "\tmovl 0xb4(%%edx),%%ebp\n"); /* Ebp */ - output( "\tmovl 0xa0(%%edx),%%esi\n"); /* Esi */ - output( "\tmovl 0x9c(%%edx),%%edi\n"); /* Edi */ - output( "\tmovl 0xb0(%%edx),%%eax\n"); /* Eax */ - output( "\tmovl 0xa4(%%edx),%%ebx\n"); /* Ebx */ - output( "\tmovl 0xac(%%edx),%%ecx\n"); /* Ecx */ - output( "\tmovl 0xa8(%%edx),%%edx\n"); /* Edx */ - - /* Get the 16-bit ds */ - output( "\tpopw %%ds\n" ); - } - else /* not a register function */ - { - /* Push the called routine address */ - output( "\tpushl 0x28(%%edx)\n"); /* FIELD_OFFSET(STACK32FRAME,target) */ - - /* Set %fs and %gs to the value saved by the last CallFrom16 */ - output( "\tpushw -22(%%ebp)\n" ); /* FIELD_OFFSET(STACK16FRAME,fs)-FIELD_OFFSET(STACK16FRAME,bp) */ - output( "\tpopw %%fs\n" ); - output( "\tpushw -20(%%ebp)\n" ); /* FIELD_OFFSET(STACK16FRAME,gs)-FIELD_OFFSET(STACK16FRAME,bp) */ - output( "\tpopw %%gs\n" ); - - /* Set %ds and %es (and %ax just in case) equal to %ss */ - output( "\tmovw %%ss,%%ax\n" ); - output( "\tmovw %%ax,%%ds\n" ); - output( "\tmovw %%ax,%%es\n" ); - } - - /* Jump to the called routine */ - output( "\t.byte 0x66\n" ); - output( "\tlret\n" ); - - /* Function footer */ - output_function_size( name ); -} - - -/******************************************************************* - * BuildRet16Func - * - * Build the return code for 16-bit callbacks - */ -static void BuildRet16Func(void) -{ - function_header( "__wine_call_to_16_ret" ); - - /* Save %esp into %esi */ - output( "\tmovl %%esp,%%esi\n" ); - - /* Restore 32-bit segment registers */ - - output( "\t.byte 0x2e\n\tmovl %s", asm_name("CallTo16_DataSelector") ); - output( "-%s,%%edi\n", asm_name("__wine_call16_start") ); - output( "\tmovw %%di,%%ds\n" ); - output( "\tmovw %%di,%%es\n" ); - - output( "\t.byte 0x2e\n\tmov %s", asm_name("CallTo16_TebSelector") ); - output( "-%s,%%fs\n", asm_name("__wine_call16_start") ); - - output( "\t.byte 0x64\n\tmov (%d),%%gs\n", GS_OFFSET ); - - /* Restore the 32-bit stack */ - - output( "\tmovw %%di,%%ss\n" ); - output( "\t.byte 0x64\n\tmovl (%d),%%esp\n", STACKOFFSET ); - - /* Return to caller */ - - output( "\tlret\n" ); - output_function_size( "__wine_call_to_16_ret" ); -} - - -/******************************************************************* - * BuildCallTo32CBClient - * - * Call a CBClient relay stub from 32-bit code (KERNEL.620). - * - * Since the relay stub is itself 32-bit, this should not be a problem; - * unfortunately, the relay stubs are expected to switch back to a - * 16-bit stack (and 16-bit code) after completion :-( - * - * This would conflict with our 16- vs. 32-bit stack handling, so - * we simply switch *back* to our 32-bit stack before returning to - * the caller ... - * - * The CBClient relay stub expects to be called with the following - * 16-bit stack layout, and with ebp and ebx pointing into the 16-bit - * stack at the designated places: - * - * ... - * (ebp+14) original arguments to the callback routine - * (ebp+10) far return address to original caller - * (ebp+6) Thunklet target address - * (ebp+2) Thunklet relay ID code - * (ebp) BP (saved by CBClientGlueSL) - * (ebp-2) SI (saved by CBClientGlueSL) - * (ebp-4) DI (saved by CBClientGlueSL) - * (ebp-6) DS (saved by CBClientGlueSL) - * - * ... buffer space used by the 16-bit side glue for temp copies - * - * (ebx+4) far return address to 16-bit side glue code - * (ebx) saved 16-bit ss:sp (pointing to ebx+4) - * - * The 32-bit side glue code accesses both the original arguments (via ebp) - * and the temporary copies prepared by the 16-bit side glue (via ebx). - * After completion, the stub will load ss:sp from the buffer at ebx - * and perform a far return to 16-bit code. - * - * To trick the relay stub into returning to us, we replace the 16-bit - * return address to the glue code by a cs:ip pair pointing to our - * return entry point (the original return address is saved first). - * Our return stub thus called will then reload the 32-bit ss:esp and - * return to 32-bit code (by using and ss:esp value that we have also - * pushed onto the 16-bit stack before and a cs:eip values found at - * that position on the 32-bit stack). The ss:esp to be restored is - * found relative to the 16-bit stack pointer at: - * - * (ebx-4) ss (flat) - * (ebx-8) sp (32-bit stack pointer) - * - * The second variant of this routine, CALL32_CBClientEx, which is used - * to implement KERNEL.621, has to cope with yet another problem: Here, - * the 32-bit side directly returns to the caller of the CBClient thunklet, - * restoring registers saved by CBClientGlueSL and cleaning up the stack. - * As we have to return to our 32-bit code first, we have to adapt the - * layout of our temporary area so as to include values for the registers - * that are to be restored, and later (in the implementation of KERNEL.621) - * we *really* restore them. The return stub restores DS, DI, SI, and BP - * from the stack, skips the next 8 bytes (CBClient relay code / target), - * and then performs a lret NN, where NN is the number of arguments to be - * removed. Thus, we prepare our temporary area as follows: - * - * (ebx+22) 16-bit cs (this segment) - * (ebx+20) 16-bit ip ('16-bit' return entry point) - * (ebx+16) 32-bit ss (flat) - * (ebx+12) 32-bit sp (32-bit stack pointer) - * (ebx+10) 16-bit bp (points to ebx+24) - * (ebx+8) 16-bit si (ignored) - * (ebx+6) 16-bit di (ignored) - * (ebx+4) 16-bit ds (we actually use the flat DS here) - * (ebx+2) 16-bit ss (16-bit stack segment) - * (ebx+0) 16-bit sp (points to ebx+4) - * - * Note that we ensure that DS is not changed and remains the flat segment, - * and the 32-bit stack pointer our own return stub needs fits just - * perfectly into the 8 bytes that are skipped by the Windows stub. - * One problem is that we have to determine the number of removed arguments, - * as these have to be really removed in KERNEL.621. Thus, the BP value - * that we place in the temporary area to be restored, contains the value - * that SP would have if no arguments were removed. By comparing the actual - * value of SP with this value in our return stub we can compute the number - * of removed arguments. This is then returned to KERNEL.621. - * - * The stack layout of this function: - * (ebp+20) nArgs pointer to variable receiving nr. of args (Ex only) - * (ebp+16) esi pointer to caller's esi value - * (ebp+12) arg ebp value to be set for relay stub - * (ebp+8) func CBClient relay stub address - * (ebp+4) ret addr - * (ebp) ebp - */ -static void BuildCallTo32CBClient( int isEx ) -{ - function_header( isEx ? "CALL32_CBClientEx" : "CALL32_CBClient" ); - - /* Entry code */ - - output( "\tpushl %%ebp\n" ); - output( "\tmovl %%esp,%%ebp\n" ); - output( "\tpushl %%edi\n" ); - output( "\tpushl %%esi\n" ); - output( "\tpushl %%ebx\n" ); - - /* Get pointer to temporary area and save the 32-bit stack pointer */ - - output( "\tmovl 16(%%ebp), %%ebx\n" ); - output( "\tleal -8(%%esp), %%eax\n" ); - - if ( !isEx ) - output( "\tmovl %%eax, -8(%%ebx)\n" ); - else - output( "\tmovl %%eax, 12(%%ebx)\n" ); - - /* Set up registers and call CBClient relay stub (simulating a far call) */ - - output( "\tmovl 20(%%ebp), %%esi\n" ); - output( "\tmovl (%%esi), %%esi\n" ); - - output( "\tmovl 8(%%ebp), %%eax\n" ); - output( "\tmovl 12(%%ebp), %%ebp\n" ); - - output( "\tpushl %%cs\n" ); - output( "\tcall *%%eax\n" ); - - /* Return new esi value to caller */ - - output( "\tmovl 32(%%esp), %%edi\n" ); - output( "\tmovl %%esi, (%%edi)\n" ); - - /* Return argument size to caller */ - if ( isEx ) - { - output( "\tmovl 36(%%esp), %%ebx\n" ); - output( "\tmovl %%ebp, (%%ebx)\n" ); - } - - /* Restore registers and return */ - - output( "\tpopl %%ebx\n" ); - output( "\tpopl %%esi\n" ); - output( "\tpopl %%edi\n" ); - output( "\tpopl %%ebp\n" ); - output( "\tret\n" ); - output_function_size( isEx ? "CALL32_CBClientEx" : "CALL32_CBClient" ); - - /* '16-bit' return stub */ - - function_header( isEx ? "CALL32_CBClientEx_Ret" : "CALL32_CBClient_Ret" ); - if ( !isEx ) - { - output( "\tmovzwl %%sp, %%ebx\n" ); - output( "\tlssl %%ss:-16(%%ebx), %%esp\n" ); - } - else - { - output( "\tmovzwl %%bp, %%ebx\n" ); - output( "\tsubw %%bp, %%sp\n" ); - output( "\tmovzwl %%sp, %%ebp\n" ); - output( "\tlssl %%ss:-12(%%ebx), %%esp\n" ); - } - output( "\tlret\n" ); - output_function_size( isEx ? "CALL32_CBClientEx_Ret" : "CALL32_CBClient_Ret" ); -} - - -/******************************************************************* - * BuildCallFrom32Regs - * - * Build a 32-bit-to-Wine call-back function for a 'register' function. - * 'args' is the number of dword arguments. - * - * Stack layout: - * ... - * (ebp+20) first arg - * (ebp+16) ret addr to user code - * (ebp+12) func to call (relative to relay code ret addr) - * (ebp+8) number of args - * (ebp+4) ret addr to relay code - * (ebp+0) saved ebp - * (ebp-128) buffer area to allow stack frame manipulation - * (ebp-332) CONTEXT86 struct - * (ebp-336) padding for stack alignment - * (ebp-336-n) CONTEXT86 *argument - * .... other arguments copied from (ebp+12) - * - * The entry point routine is called with a CONTEXT* extra argument, - * following the normal args. In this context structure, EIP_reg - * contains the return address to user code, and ESP_reg the stack - * pointer on return (with the return address and arguments already - * removed). - */ -static void BuildCallFrom32Regs(void) -{ - static const int STACK_SPACE = 128 + 0x2cc /* sizeof(CONTEXT86) */; - - /* Function header */ - - function_header( "__wine_call_from_32_regs" ); - - /* Allocate some buffer space on the stack */ - - output( "\tpushl %%ebp\n" ); - output( "\tmovl %%esp,%%ebp\n "); - output( "\tleal -%d(%%esp),%%esp\n", STACK_SPACE ); - - /* Build the context structure */ - - output( "\tmovl %%eax,0xb0(%%esp)\n" ); /* Eax */ - output( "\tpushfl\n" ); - output( "\tpopl %%eax\n" ); - output( "\tmovl %%eax,0xc0(%%esp)\n"); /* EFlags */ - output( "\tmovl 0(%%ebp),%%eax\n" ); - output( "\tmovl %%eax,0xb4(%%esp)\n"); /* Ebp */ - output( "\tmovl %%ebx,0xa4(%%esp)\n"); /* Ebx */ - output( "\tmovl %%ecx,0xac(%%esp)\n"); /* Ecx */ - output( "\tmovl %%edx,0xa8(%%esp)\n"); /* Edx */ - output( "\tmovl %%esi,0xa0(%%esp)\n"); /* Esi */ - output( "\tmovl %%edi,0x9c(%%esp)\n"); /* Edi */ - - output( "\txorl %%eax,%%eax\n" ); - output( "\tmovw %%cs,%%ax\n" ); - output( "\tmovl %%eax,0xbc(%%esp)\n"); /* SegCs */ - output( "\tmovw %%es,%%ax\n" ); - output( "\tmovl %%eax,0x94(%%esp)\n"); /* SegEs */ - output( "\tmovw %%fs,%%ax\n" ); - output( "\tmovl %%eax,0x90(%%esp)\n"); /* SegFs */ - output( "\tmovw %%gs,%%ax\n" ); - output( "\tmovl %%eax,0x8c(%%esp)\n"); /* SegGs */ - output( "\tmovw %%ss,%%ax\n" ); - output( "\tmovl %%eax,0xc8(%%esp)\n"); /* SegSs */ - output( "\tmovw %%ds,%%ax\n" ); - output( "\tmovl %%eax,0x98(%%esp)\n"); /* SegDs */ - output( "\tmovw %%ax,%%es\n" ); /* set %es equal to %ds just in case */ - - output( "\tmovl $0x10007,0(%%esp)\n"); /* ContextFlags */ - - output( "\tmovl 16(%%ebp),%%eax\n" ); /* Get %eip at time of call */ - output( "\tmovl %%eax,0xb8(%%esp)\n"); /* Eip */ - - /* Transfer the arguments */ - - output( "\tmovl 8(%%ebp),%%ecx\n" ); /* fetch number of args to copy */ - output( "\tleal 4(,%%ecx,4),%%edx\n" ); /* add 4 for context arg */ - output( "\tsubl %%edx,%%esp\n" ); - output( "\tandl $~15,%%esp\n" ); - output( "\tleal 20(%%ebp),%%esi\n" ); /* get %esp at time of call */ - output( "\tmovl %%esp,%%edi\n" ); - output( "\ttest %%ecx,%%ecx\n" ); - output( "\tjz 1f\n" ); - output( "\tcld\n" ); - output( "\trep\n\tmovsl\n" ); /* copy args */ - output( "1:\tleal %d(%%ebp),%%eax\n", -STACK_SPACE ); /* get addr of context struct */ - output( "\tmovl %%eax,(%%edi)\n" ); /* and pass it as extra arg */ - output( "\tmovl %%esi,%d(%%ebp)\n", 0xc4 /* Esp */ - STACK_SPACE ); - - /* Call the entry point */ - - output( "\tmovl 4(%%ebp),%%eax\n" ); /* get relay code addr */ - output( "\taddl 12(%%ebp),%%eax\n" ); - output( "\tcall *%%eax\n" ); - output( "\tleal -%d(%%ebp),%%ecx\n", STACK_SPACE ); - - /* Restore the context structure */ - - output( "2:\tpushl 0x94(%%ecx)\n"); /* SegEs */ - output( "\tpopl %%es\n" ); - output( "\tpushl 0x90(%%ecx)\n"); /* SegFs */ - output( "\tpopl %%fs\n" ); - output( "\tpushl 0x8c(%%ecx)\n"); /* SegGs */ - output( "\tpopl %%gs\n" ); - - output( "\tmovl 0x9c(%%ecx),%%edi\n"); /* Edi */ - output( "\tmovl 0xa0(%%ecx),%%esi\n"); /* Esi */ - output( "\tmovl 0xa8(%%ecx),%%edx\n"); /* Edx */ - output( "\tmovl 0xa4(%%ecx),%%ebx\n"); /* Ebx */ - output( "\tmovl 0xb0(%%ecx),%%eax\n"); /* Eax */ - output( "\tmovl 0xb4(%%ecx),%%ebp\n"); /* Ebp */ - - output( "\tpushl 0xc8(%%ecx)\n"); /* SegSs */ - output( "\tpopl %%ss\n" ); - output( "\tmovl 0xc4(%%ecx),%%esp\n"); /* Esp */ - - output( "\tpushl 0xc0(%%ecx)\n"); /* EFlags */ - output( "\tpushl 0xbc(%%ecx)\n"); /* SegCs */ - output( "\tpushl 0xb8(%%ecx)\n"); /* Eip */ - output( "\tpushl 0x98(%%ecx)\n"); /* SegDs */ - output( "\tmovl 0xac(%%ecx),%%ecx\n"); /* Ecx */ - - output( "\tpopl %%ds\n" ); - output( "\tiret\n" ); - output_function_size( "__wine_call_from_32_regs" ); - - function_header( "__wine_call_from_32_restore_regs" ); - output( "\tmovl 4(%%esp),%%ecx\n" ); - output( "\tjmp 2b\n" ); - output_function_size( "__wine_call_from_32_restore_regs" ); -} - - -/******************************************************************* - * BuildPendingEventCheck - * - * Build a function that checks whether there are any - * pending DPMI events. - * - * Stack layout: - * - * (sp+12) long eflags - * (sp+6) long cs - * (sp+2) long ip - * (sp) word fs - * - * On entry to function, fs register points to a valid TEB. - * On exit from function, stack will be popped. - */ -static void BuildPendingEventCheck(void) -{ - /* Function header */ - - function_header( "DPMI_PendingEventCheck" ); - - /* Check for pending events. */ - - output( "\t.byte 0x64\n\ttestl $0xffffffff,(%d)\n", VM86_PENDING_OFFSET ); - output( "\tje %s\n", asm_name("DPMI_PendingEventCheck_Cleanup") ); - output( "\t.byte 0x64\n\ttestl $0xffffffff,(%d)\n", DPMI_VIF_OFFSET ); - output( "\tje %s\n", asm_name("DPMI_PendingEventCheck_Cleanup") ); - - /* Process pending events. */ - - output( "\tsti\n" ); - - /* Start cleanup. Restore fs register. */ - - output( "%s\n", asm_globl("DPMI_PendingEventCheck_Cleanup") ); - output( "\tpopw %%fs\n" ); - - /* Return from function. */ - - output( "%s\n", asm_globl("DPMI_PendingEventCheck_Return") ); - output( "\tiret\n" ); - - output_function_size( "DPMI_PendingEventCheck" ); -} - - -/******************************************************************* - * BuildRelays16 - * - * Build all the 16-bit relay callbacks - */ -void BuildRelays16(void) -{ - if (target_cpu != CPU_x86) - { - output( "/* File not used with this architecture. Do not edit! */\n\n" ); - return; - } - - /* File header */ - - output( "/* File generated automatically. Do not edit! */\n\n" ); - output( "\t.text\n" ); - - output( "%s:\n\n", asm_name("__wine_spec_thunk_text_16") ); - - output( "%s\n", asm_globl("__wine_call16_start") ); - - /* Standard CallFrom16 routine */ - BuildCallFrom16Core( 0, 0 ); - - /* Register CallFrom16 routine */ - BuildCallFrom16Core( 1, 0 ); - - /* C16ThkSL CallFrom16 routine */ - BuildCallFrom16Core( 0, 1 ); - - /* Standard CallTo16 routine */ - BuildCallTo16Core( 0 ); - - /* Register CallTo16 routine */ - BuildCallTo16Core( 1 ); - - /* Standard CallTo16 return stub */ - BuildRet16Func(); - - /* CBClientThunkSL routine */ - BuildCallTo32CBClient( 0 ); - - /* CBClientThunkSLEx routine */ - BuildCallTo32CBClient( 1 ); - - /* Pending DPMI events check stub */ - BuildPendingEventCheck(); - - output( "%s\n", asm_globl("__wine_call16_end") ); - output_function_size( "__wine_spec_thunk_text_16" ); - - /* Declare the return address and data selector variables */ - output( "\n\t.data\n\t.align %d\n", get_alignment(4) ); - output( "%s\n\t.long 0\n", asm_globl("CallTo16_DataSelector") ); - output( "%s\n\t.long 0\n", asm_globl("CallTo16_TebSelector") ); - if (UsePIC) output( "wine_ldt_copy_ptr:\t.long %s\n", asm_name("wine_ldt_copy") ); - - output( "\t.text\n" ); - output( "%s:\n\n", asm_name("__wine_spec_thunk_text_32") ); - BuildCallFrom32Regs(); - output_function_size( "__wine_spec_thunk_text_32" ); - - output_gnu_stack_note(); -} - - -/******************************************************************* - * build_call_from_regs_x86_64 - * - * Build the register saving code for a 'register' entry point. - * - * Stack layout: - * ... - * (rsp+16) first arg - * (rsp+8) ret addr to user code - * (rsp) ret addr to relay code - * (rsp-128) buffer area to allow stack frame manipulation - * - * Parameters: - * %rcx number of args - * %rdx entry point - */ -static void build_call_from_regs_x86_64(void) -{ - static const int STACK_SPACE = 128 + 0x4d0; /* size of x86_64 context */ - int i; - - /* Function header */ - - function_header( "__wine_call_from_regs" ); - - output( "\t.cfi_startproc\n" ); - output( "\tsubq $%u,%%rsp\n", STACK_SPACE ); - output( "\t.cfi_adjust_cfa_offset %u\n", STACK_SPACE ); - - /* save registers into the context */ - - output( "\tmovq %%rax,0x78(%%rsp)\n" ); - output( "\t.cfi_rel_offset %%rax,0x78\n" ); - output( "\tmovq %u(%%rsp),%%rax\n", STACK_SPACE + 16 ); /* saved %rcx on stack */ - output( "\tmovq %%rax,0x80(%%rsp)\n" ); - output( "\t.cfi_rel_offset %%rcx,0x80\n" ); - output( "\tmovq %u(%%rsp),%%rax\n", STACK_SPACE + 24 ); /* saved %rdx on stack */ - output( "\t.cfi_rel_offset %%rdx,0x88\n" ); - output( "\tmovq %%rax,0x88(%%rsp)\n" ); - output( "\tmovq %%rbx,0x90(%%rsp)\n" ); - output( "\t.cfi_rel_offset %%rbx,0x90\n" ); - output( "\tleaq %u(%%rsp),%%rax\n", STACK_SPACE + 16 ); - output( "\tmovq %%rax,0x98(%%rsp)\n" ); - output( "\tmovq %%rbp,0xa0(%%rsp)\n" ); - output( "\t.cfi_rel_offset %%rbp,0xa0\n" ); - output( "\tmovq %%rsi,0xa8(%%rsp)\n" ); - output( "\t.cfi_rel_offset %%rsi,0xa8\n" ); - output( "\tmovq %%rdi,0xb0(%%rsp)\n" ); - output( "\t.cfi_rel_offset %%rdi,0xb0\n" ); - output( "\tmovq %%r8,0xb8(%%rsp)\n" ); - output( "\t.cfi_rel_offset %%r8,0xb8\n" ); - output( "\tmovq %%r9,0xc0(%%rsp)\n" ); - output( "\t.cfi_rel_offset %%r9,0xc0\n" ); - output( "\tmovq %%r10,0xc8(%%rsp)\n" ); - output( "\t.cfi_rel_offset %%r10,0xc8\n" ); - output( "\tmovq %%r11,0xd0(%%rsp)\n" ); - output( "\t.cfi_rel_offset %%r11,0xd0\n" ); - output( "\tmovq %%r12,0xd8(%%rsp)\n" ); - output( "\t.cfi_rel_offset %%r12,0xd8\n" ); - output( "\tmovq %%r13,0xe0(%%rsp)\n" ); - output( "\t.cfi_rel_offset %%r13,0xe0\n" ); - output( "\tmovq %%r14,0xe8(%%rsp)\n" ); - output( "\t.cfi_rel_offset %%r14,0xe8\n" ); - output( "\tmovq %%r15,0xf0(%%rsp)\n" ); - output( "\t.cfi_rel_offset %%r15,0xf0\n" ); - output( "\tmovq %u(%%rsp),%%rax\n", STACK_SPACE + 8 ); - output( "\tmovq %%rax,0xf8(%%rsp)\n" ); - - output( "\tstmxcsr 0x34(%%rsp)\n" ); - output( "\tfxsave 0x100(%%rsp)\n" ); - for (i = 0; i < 16; i++) - { - output( "\tmovdqa %%xmm%u,0x%x(%%rsp)\n", i, 0x1a0 + 16 * i ); - output( "\t.cfi_rel_offset %%xmm%u,0x%x\n", i, 0x1a0 + 16 * i ); - } - - output( "\tmovw %%cs,0x38(%%rsp)\n" ); - output( "\tmovw %%ds,0x3a(%%rsp)\n" ); - output( "\tmovw %%es,0x3c(%%rsp)\n" ); - output( "\tmovw %%fs,0x3e(%%rsp)\n" ); - output( "\tmovw %%gs,0x40(%%rsp)\n" ); - output( "\tmovw %%ss,0x42(%%rsp)\n" ); - output( "\tpushfq\n" ); - output( "\tpopq %%rax\n" ); - output( "\tmovl %%eax,0x44(%%rsp)\n" ); - - output( "\tmovl $0x%x,0x30(%%rsp)\n", 0x0010000f ); - - /* transfer the arguments */ - - output( "\tmovq %%r8,%u(%%rsp)\n", STACK_SPACE + 32 ); - output( "\tmovq %%r9,%u(%%rsp)\n", STACK_SPACE + 40 ); - output( "\tmovq $4,%%rax\n" ); - output( "\tleaq %u(%%rsp),%%rsi\n", STACK_SPACE + 16 ); - output( "\tcmpq %%rax,%%rcx\n" ); - output( "\tcmovgq %%rcx,%%rax\n" ); - output( "\tmovq %%rsp,%%rbx\n" ); - output( "\t.cfi_def_cfa_register %%rbx\n" ); - output( "\tleaq 16(,%%rax,8),%%rax\n" ); /* add 8 for context arg and 8 for rounding */ - output( "\tandq $~15,%%rax\n" ); - output( "\tsubq %%rax,%%rsp\n" ); - output( "\tmovq %%rsp,%%rdi\n" ); - output( "\tjrcxz 1f\n" ); - output( "\tcld\n" ); - output( "\trep\n\tmovsq\n" ); - output( "1:\tmovq %%rbx,0(%%rdi)\n" ); /* context arg */ - - /* call the entry point */ - - output( "\tmovq %%rdx,%%rax\n" ); - output( "\tmovq 0(%%rsp),%%rcx\n" ); - output( "\tmovq 8(%%rsp),%%rdx\n" ); - output( "\tmovq 16(%%rsp),%%r8\n" ); - output( "\tmovq 24(%%rsp),%%r9\n" ); - output( "\tcallq *%%rax\n" ); - - /* restore the context structure */ - - output( "1:\tmovq 0x80(%%rbx),%%rcx\n" ); - output( "\t.cfi_same_value %%rcx\n" ); - output( "\tmovq 0x88(%%rbx),%%rdx\n" ); - output( "\t.cfi_same_value %%rdx\n" ); - output( "\tmovq 0xa0(%%rbx),%%rbp\n" ); - output( "\t.cfi_same_value %%rbp\n" ); - output( "\tmovq 0xa8(%%rbx),%%rsi\n" ); - output( "\t.cfi_same_value %%rsi\n" ); - output( "\tmovq 0xb0(%%rbx),%%rdi\n" ); - output( "\t.cfi_same_value %%rdi\n" ); - output( "\tmovq 0xb8(%%rbx),%%r8\n" ); - output( "\t.cfi_same_value %%r8\n" ); - output( "\tmovq 0xc0(%%rbx),%%r9\n" ); - output( "\t.cfi_same_value %%r9\n" ); - output( "\tmovq 0xc8(%%rbx),%%r10\n" ); - output( "\t.cfi_same_value %%r10\n" ); - output( "\tmovq 0xd0(%%rbx),%%r11\n" ); - output( "\t.cfi_same_value %%r11\n" ); - output( "\tmovq 0xd8(%%rbx),%%r12\n" ); - output( "\t.cfi_same_value %%r12\n" ); - output( "\tmovq 0xe0(%%rbx),%%r13\n" ); - output( "\t.cfi_same_value %%r13\n" ); - output( "\tmovq 0xe8(%%rbx),%%r14\n" ); - output( "\t.cfi_same_value %%r14\n" ); - output( "\tmovq 0xf0(%%rbx),%%r15\n" ); - output( "\t.cfi_same_value %%r15\n" ); - - for (i = 0; i < 16; i++) - { - output( "\tmovdqa 0x%x(%%rbx),%%xmm%u\n", 0x1a0 + 16 * i, i ); - output( "\t.cfi_same_value %%xmm%u\n", i ); - } - output( "\tfxrstor 0x100(%%rbx)\n" ); - output( "\tldmxcsr 0x34(%%rbx)\n" ); - - output( "\tmovq 0xf8(%%rbx),%%rax\n" ); /* rip */ - output( "\tmovq %%rax,0(%%rsp)\n" ); - output( "\tmovw 0x38(%%rbx),%%ax\n" ); /* cs */ - output( "\tmovq %%rax,0x8(%%rsp)\n" ); - output( "\tmovl 0x44(%%rbx),%%eax\n" ); /* flags */ - output( "\tmovq %%rax,0x10(%%rsp)\n" ); - output( "\tmovq 0x98(%%rbx),%%rax\n" ); /* rsp */ - output( "\tmovq %%rax,0x18(%%rsp)\n" ); - output( "\tmovw 0x42(%%rbx),%%ax\n" ); /* ss */ - output( "\tmovq %%rax,0x20(%%rsp)\n" ); - output( "\tmovq 0x78(%%rbx),%%rax\n" ); - output( "\tmovq 0x90(%%rbx),%%rbx\n" ); - output( "\tiretq\n" ); - output( "\t.cfi_endproc\n" ); - - output_function_size( "__wine_call_from_regs" ); - - function_header( "__wine_restore_regs" ); - output( "\t.cfi_startproc\n" ); - output( "\tmovq %%rcx,%%rbx\n" ); - output( "\tjmp 1b\n" ); - output( "\t.cfi_endproc\n" ); - output_function_size( "__wine_restore_regs" ); -} - - -/******************************************************************* - * BuildRelays32 - * - * Build all the 32-bit relay callbacks - */ -void BuildRelays32(void) -{ - switch (target_cpu) - { - case CPU_x86: - output( "/* File generated automatically. Do not edit! */\n\n" ); - output( "\t.text\n" ); - output( "%s:\n\n", asm_name("__wine_spec_thunk_text_32") ); - - /* 32-bit register entry point */ - BuildCallFrom32Regs(); - - output_function_size( "__wine_spec_thunk_text_32" ); - output_gnu_stack_note(); - break; - - case CPU_x86_64: - output( "/* File generated automatically. Do not edit! */\n\n" ); - output( "\t.text\n" ); - build_call_from_regs_x86_64(); - output_gnu_stack_note(); - break; - - default: - output( "/* File not used with this architecture. Do not edit! */\n\n" ); - return; - } -} diff --git a/reactos/tools/winebuild/res16.c b/reactos/tools/winebuild/res16.c deleted file mode 100644 index 4a6dddd24db..00000000000 --- a/reactos/tools/winebuild/res16.c +++ /dev/null @@ -1,334 +0,0 @@ -/* - * Builtin dlls resource support - * - * 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 - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include -#include -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#include - -#include "build.h" - -/* Unicode string or integer id */ -struct string_id -{ - char *str; /* ptr to string */ - unsigned short id; /* integer id if str is NULL */ -}; - -/* descriptor for a resource */ -struct resource -{ - struct string_id type; - struct string_id name; - const void *data; - unsigned int name_offset; - unsigned int data_size; - unsigned int memopt; -}; - -/* type level of the resource tree */ -struct res_type -{ - const struct string_id *type; /* type name */ - struct resource *res; /* first resource of this type */ - unsigned int name_offset; /* name offset if string */ - unsigned int nb_names; /* total number of names */ -}; - -/* top level of the resource tree */ -struct res_tree -{ - struct res_type *types; /* types array */ - unsigned int nb_types; /* total number of types */ -}; - - -static inline struct resource *add_resource( DLLSPEC *spec ) -{ - spec->resources = xrealloc( spec->resources, (spec->nb_resources + 1) * sizeof(*spec->resources) ); - return &spec->resources[spec->nb_resources++]; -} - -static struct res_type *add_type( struct res_tree *tree, struct resource *res ) -{ - struct res_type *type; - tree->types = xrealloc( tree->types, (tree->nb_types + 1) * sizeof(*tree->types) ); - type = &tree->types[tree->nb_types++]; - type->type = &res->type; - type->res = res; - type->nb_names = 0; - return type; -} - -/* get a string from the current resource file */ -static void get_string( struct string_id *str ) -{ - unsigned char c = get_byte(); - - if (c == 0xff) - { - str->str = NULL; - str->id = get_word(); - } - else - { - str->str = (char *)input_buffer + input_buffer_pos - 1; - str->id = 0; - while (get_byte()) /* nothing */; - } -} - -/* load the next resource from the current file */ -static void load_next_resource( DLLSPEC *spec ) -{ - struct resource *res = add_resource( spec ); - - get_string( &res->type ); - get_string( &res->name ); - res->memopt = get_word(); - res->data_size = get_dword(); - res->data = input_buffer + input_buffer_pos; - input_buffer_pos += res->data_size; - if (input_buffer_pos > input_buffer_size) - fatal_error( "%s is a truncated/corrupted file\n", input_buffer_filename ); -} - -/* load a Win16 .res file */ -void load_res16_file( const char *name, DLLSPEC *spec ) -{ - init_input_buffer( name ); - while (input_buffer_pos < input_buffer_size) load_next_resource( spec ); -} - -/* compare two strings/ids */ -static int cmp_string( const struct string_id *str1, const struct string_id *str2 ) -{ - if (!str1->str) - { - if (!str2->str) return str1->id - str2->id; - return 1; /* an id compares larger than a string */ - } - if (!str2->str) return -1; - return strcasecmp( str1->str, str2->str ); -} - -/* compare two resources for sorting the resource directory */ -/* resources are stored first by type, then by name */ -static int cmp_res( const void *ptr1, const void *ptr2 ) -{ - const struct resource *res1 = ptr1; - const struct resource *res2 = ptr2; - int ret; - - if ((ret = cmp_string( &res1->type, &res2->type ))) return ret; - return cmp_string( &res1->name, &res2->name ); -} - -/* build the 2-level (type,name) resource tree */ -static struct res_tree *build_resource_tree( DLLSPEC *spec ) -{ - unsigned int i, j, offset; - struct res_tree *tree; - struct res_type *type = NULL; - struct resource *res; - - qsort( spec->resources, spec->nb_resources, sizeof(*spec->resources), cmp_res ); - - offset = 2; /* alignment */ - tree = xmalloc( sizeof(*tree) ); - tree->types = NULL; - tree->nb_types = 0; - - for (i = 0; i < spec->nb_resources; i++) - { - if (!i || cmp_string( &spec->resources[i].type, &spec->resources[i-1].type )) /* new type */ - { - type = add_type( tree, &spec->resources[i] ); - offset += 8; - } - type->nb_names++; - offset += 12; - } - offset += 2; /* terminator */ - - for (i = 0, type = tree->types; i < tree->nb_types; i++, type++) - { - if (type->type->str) - { - type->name_offset = offset; - offset += strlen(type->type->str) + 1; - } - else type->name_offset = type->type->id | 0x8000; - - for (j = 0, res = type->res; j < type->nb_names; j++, res++) - { - if (res->name.str) - { - res->name_offset = offset; - offset += strlen(res->name.str) + 1; - } - else res->name_offset = res->name.id | 0x8000; - } - } - return tree; -} - -/* free the resource tree */ -static void free_resource_tree( struct res_tree *tree ) -{ - free( tree->types ); - free( tree ); -} - -/* output a string preceded by its length */ -static void output_string( const char *str ) -{ - unsigned int i, len = strlen(str); - output( "\t.byte 0x%02x", len ); - for (i = 0; i < len; i++) output( ",0x%02x", (unsigned char)str[i] ); - output( " /* %s */\n", str ); -} - -/* output a string preceded by its length in binary format*/ -static void output_bin_string( const char *str ) -{ - put_byte( strlen(str) ); - while (*str) put_byte( *str++ ); -} - -/* output the resource data */ -void output_res16_data( DLLSPEC *spec ) -{ - const struct resource *res; - unsigned int i; - - for (i = 0, res = spec->resources; i < spec->nb_resources; i++, res++) - { - output( ".L__wine_spec_resource_%u:\n", i ); - dump_bytes( res->data, res->data_size ); - } -} - -/* output the resource definitions */ -void output_res16_directory( DLLSPEC *spec ) -{ - unsigned int i, j; - struct res_tree *tree; - const struct res_type *type; - const struct resource *res; - - tree = build_resource_tree( spec ); - - output( "\n.L__wine_spec_ne_rsrctab:\n" ); - output( "\t%s 0\n", get_asm_short_keyword() ); /* alignment */ - - /* type and name structures */ - - for (i = 0, type = tree->types; i < tree->nb_types; i++, type++) - { - output( "\t%s 0x%04x,%u,0,0\n", get_asm_short_keyword(), type->name_offset, type->nb_names ); - - for (j = 0, res = type->res; j < type->nb_names; j++, res++) - { - output( "\t%s .L__wine_spec_resource_%lu-.L__wine_spec_dos_header,%u\n", - get_asm_short_keyword(), (unsigned long)(res - spec->resources), res->data_size ); - output( "\t%s 0x%04x,0x%04x,0,0\n", get_asm_short_keyword(), res->memopt, res->name_offset ); - } - } - output( "\t%s 0\n", get_asm_short_keyword() ); /* terminator */ - - /* name strings */ - - for (i = 0, type = tree->types; i < tree->nb_types; i++, type++) - { - if (type->type->str) output_string( type->type->str ); - for (j = 0, res = type->res; j < type->nb_names; j++, res++) - if (res->name.str) output_string( res->name.str ); - } - output( "\t.byte 0\n" ); /* names terminator */ - - free_resource_tree( tree ); -} - -/* output the resource data in binary format */ -void output_bin_res16_data( DLLSPEC *spec ) -{ - const struct resource *res; - unsigned int i; - - for (i = 0, res = spec->resources; i < spec->nb_resources; i++, res++) - put_data( res->data, res->data_size ); -} - -/* output the resource definitions in binary format */ -void output_bin_res16_directory( DLLSPEC *spec, unsigned int data_offset ) -{ - unsigned int i, j; - struct res_tree *tree; - const struct res_type *type; - const struct resource *res; - - tree = build_resource_tree( spec ); - - put_word( 0 ); /* alignment */ - - /* type and name structures */ - - for (i = 0, type = tree->types; i < tree->nb_types; i++, type++) - { - put_word( type->name_offset ); - put_word( type->nb_names ); - put_word( 0 ); - put_word( 0 ); - - for (j = 0, res = type->res; j < type->nb_names; j++, res++) - { - put_word( data_offset ); - put_word( res->data_size ); - put_word( res->memopt ); - put_word( res->name_offset ); - put_word( 0 ); - put_word( 0 ); - data_offset += res->data_size; - } - } - put_word( 0 ); /* terminator */ - - /* name strings */ - - for (i = 0, type = tree->types; i < tree->nb_types; i++, type++) - { - if (type->type->str) output_bin_string( type->type->str ); - for (j = 0, res = type->res; j < type->nb_names; j++, res++) - if (res->name.str) output_bin_string( res->name.str ); - } - put_byte( 0 ); /* names terminator */ - - free_resource_tree( tree ); -} diff --git a/reactos/tools/winebuild/res32.c b/reactos/tools/winebuild/res32.c deleted file mode 100644 index ecda0b874ea..00000000000 --- a/reactos/tools/winebuild/res32.c +++ /dev/null @@ -1,666 +0,0 @@ -/* - * Builtin dlls resource support - * - * 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 - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include -#include -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#include - -#include "build.h" - -typedef unsigned short WCHAR; -typedef unsigned short WORD; -typedef unsigned int DWORD; - -/* Unicode string or integer id */ -struct string_id -{ - WCHAR *str; /* ptr to Unicode string */ - WORD id; /* integer id if str is NULL */ -}; - -/* descriptor for a resource */ -struct resource -{ - struct string_id type; - struct string_id name; - const void *data; - unsigned int data_size; - unsigned int data_offset; - unsigned short mem_options; - unsigned short lang; -}; - -/* name level of the resource tree */ -struct res_name -{ - const struct string_id *name; /* name */ - struct resource *res; /* resource */ - int nb_languages; /* number of languages */ - unsigned int dir_offset; /* offset of directory in resource dir */ - unsigned int name_offset; /* offset of name in resource dir */ -}; - -/* type level of the resource tree */ -struct res_type -{ - const struct string_id *type; /* type name */ - struct res_name *names; /* names array */ - unsigned int nb_names; /* total number of names */ - unsigned int nb_id_names; /* number of names that have a numeric id */ - unsigned int dir_offset; /* offset of directory in resource dir */ - unsigned int name_offset; /* offset of type name in resource dir */ -}; - -/* top level of the resource tree */ -struct res_tree -{ - struct res_type *types; /* types array */ - unsigned int nb_types; /* total number of types */ -}; - -/* size of a resource directory with n entries */ -#define RESOURCE_DIR_SIZE (4 * sizeof(unsigned int)) -#define RESOURCE_DIR_ENTRY_SIZE (2 * sizeof(unsigned int)) -#define RESOURCE_DATA_ENTRY_SIZE (4 * sizeof(unsigned int)) -#define RESDIR_SIZE(n) (RESOURCE_DIR_SIZE + (n) * RESOURCE_DIR_ENTRY_SIZE) - - -static inline struct resource *add_resource( DLLSPEC *spec ) -{ - spec->resources = xrealloc( spec->resources, (spec->nb_resources + 1) * sizeof(spec->resources[0]) ); - return &spec->resources[spec->nb_resources++]; -} - -static inline unsigned int strlenW( const WCHAR *str ) -{ - const WCHAR *s = str; - while (*s) s++; - return s - str; -} - -static inline int strcmpW( const WCHAR *str1, const WCHAR *str2 ) -{ - while (*str1 && (*str1 == *str2)) { str1++; str2++; } - return *str1 - *str2; -} - -static struct res_name *add_name( struct res_type *type, struct resource *res ) -{ - struct res_name *name; - type->names = xrealloc( type->names, (type->nb_names + 1) * sizeof(*type->names) ); - name = &type->names[type->nb_names++]; - name->name = &res->name; - name->res = res; - name->nb_languages = 1; - if (!name->name->str) type->nb_id_names++; - return name; -} - -static struct res_type *add_type( struct res_tree *tree, struct resource *res ) -{ - struct res_type *type; - tree->types = xrealloc( tree->types, (tree->nb_types + 1) * sizeof(*tree->types) ); - type = &tree->types[tree->nb_types++]; - type->type = &res->type; - type->names = NULL; - type->nb_names = 0; - type->nb_id_names = 0; - return type; -} - -/* get a string from the current resource file */ -static void get_string( struct string_id *str ) -{ - WCHAR wc = get_word(); - - if (wc == 0xffff) - { - str->str = NULL; - str->id = get_word(); - } - else - { - WCHAR *p = xmalloc( (strlenW( (const WCHAR *)(input_buffer + input_buffer_pos) - 1) + 1) * sizeof(WCHAR) ); - str->str = p; - str->id = 0; - if ((*p++ = wc)) while ((*p++ = get_word())); - } -} - -/* put a string into the resource file */ -static void put_string( const struct string_id *str ) -{ - if (str->str) - { - const WCHAR *p = str->str; - while (*p) put_word( *p++ ); - put_word( 0 ); - } - else - { - put_word( 0xffff ); - put_word( str->id ); - } -} - -static void dump_res_data( const struct resource *res ) -{ - unsigned int i = 0; - unsigned int size = (res->data_size + 3) & ~3; - - if (!size) return; - - input_buffer = res->data; - input_buffer_pos = 0; - input_buffer_size = size; - - output( "\t.long " ); - while (size > 4) - { - if ((i++ % 16) == 15) output( "0x%08x\n\t.long ", get_dword() ); - else output( "0x%08x,", get_dword() ); - size -= 4; - } - output( "0x%08x\n", get_dword() ); - size -= 4; - assert( input_buffer_pos == input_buffer_size ); -} - -/* check the file header */ -/* all values must be zero except header size */ -static int check_header(void) -{ - DWORD size; - - if (get_dword()) return 0; /* data size */ - size = get_dword(); /* header size */ - if (size == 0x20000000) byte_swapped = 1; - else if (size != 0x20) return 0; - if (get_word() != 0xffff || get_word()) return 0; /* type, must be id 0 */ - if (get_word() != 0xffff || get_word()) return 0; /* name, must be id 0 */ - if (get_dword()) return 0; /* data version */ - if (get_word()) return 0; /* mem options */ - if (get_word()) return 0; /* language */ - if (get_dword()) return 0; /* version */ - if (get_dword()) return 0; /* characteristics */ - return 1; -} - -/* load the next resource from the current file */ -static void load_next_resource( DLLSPEC *spec ) -{ - DWORD hdr_size; - struct resource *res = add_resource( spec ); - - res->data_size = get_dword(); - hdr_size = get_dword(); - if (hdr_size & 3) fatal_error( "%s header size not aligned\n", input_buffer_filename ); - - res->data = input_buffer + input_buffer_pos - 2*sizeof(DWORD) + hdr_size; - get_string( &res->type ); - get_string( &res->name ); - if (input_buffer_pos & 2) get_word(); /* align to dword boundary */ - get_dword(); /* skip data version */ - res->mem_options = get_word(); - res->lang = get_word(); - get_dword(); /* skip version */ - get_dword(); /* skip characteristics */ - - input_buffer_pos = ((const unsigned char *)res->data - input_buffer) + ((res->data_size + 3) & ~3); - input_buffer_pos = (input_buffer_pos + 3) & ~3; - if (input_buffer_pos > input_buffer_size) - fatal_error( "%s is a truncated file\n", input_buffer_filename ); -} - -/* load a Win32 .res file */ -int load_res32_file( const char *name, DLLSPEC *spec ) -{ - int ret; - - init_input_buffer( name ); - - if ((ret = check_header())) - { - while (input_buffer_pos < input_buffer_size) load_next_resource( spec ); - } - return ret; -} - -/* compare two unicode strings/ids */ -static int cmp_string( const struct string_id *str1, const struct string_id *str2 ) -{ - if (!str1->str) - { - if (!str2->str) return str1->id - str2->id; - return 1; /* an id compares larger than a string */ - } - if (!str2->str) return -1; - return strcmpW( str1->str, str2->str ); -} - -/* compare two resources for sorting the resource directory */ -/* resources are stored first by type, then by name, then by language */ -static int cmp_res( const void *ptr1, const void *ptr2 ) -{ - const struct resource *res1 = ptr1; - const struct resource *res2 = ptr2; - int ret; - - if ((ret = cmp_string( &res1->type, &res2->type ))) return ret; - if ((ret = cmp_string( &res1->name, &res2->name ))) return ret; - return res1->lang - res2->lang; -} - -static char *format_res_string( const struct string_id *str ) -{ - int i, len = str->str ? strlenW(str->str) + 1 : 5; - char *ret = xmalloc( len ); - - if (!str->str) sprintf( ret, "%04x", str->id ); - else for (i = 0; i < len; i++) ret[i] = str->str[i]; /* dumb W->A conversion */ - return ret; -} - -/* build the 3-level (type,name,language) resource tree */ -static struct res_tree *build_resource_tree( DLLSPEC *spec, unsigned int *dir_size ) -{ - unsigned int i, k, n, offset, data_offset; - struct res_tree *tree; - struct res_type *type = NULL; - struct res_name *name = NULL; - struct resource *res; - - qsort( spec->resources, spec->nb_resources, sizeof(*spec->resources), cmp_res ); - - tree = xmalloc( sizeof(*tree) ); - tree->types = NULL; - tree->nb_types = 0; - - for (i = 0; i < spec->nb_resources; i++) - { - if (!i || cmp_string( &spec->resources[i].type, &spec->resources[i-1].type )) /* new type */ - { - type = add_type( tree, &spec->resources[i] ); - name = add_name( type, &spec->resources[i] ); - } - else if (cmp_string( &spec->resources[i].name, &spec->resources[i-1].name )) /* new name */ - { - name = add_name( type, &spec->resources[i] ); - } - else if (spec->resources[i].lang == spec->resources[i-1].lang) - { - char *type_str = format_res_string( &spec->resources[i].type ); - char *name_str = format_res_string( &spec->resources[i].name ); - error( "winebuild: duplicate resource type %s name %s language %04x\n", - type_str, name_str, spec->resources[i].lang ); - } - else name->nb_languages++; - } - - /* compute the offsets */ - - offset = RESDIR_SIZE( tree->nb_types ); - for (i = 0, type = tree->types; i < tree->nb_types; i++, type++) - { - type->dir_offset = offset; - offset += RESDIR_SIZE( type->nb_names ); - for (n = 0, name = type->names; n < type->nb_names; n++, name++) - { - name->dir_offset = offset; - offset += RESDIR_SIZE( name->nb_languages ); - } - } - data_offset = offset; - offset += spec->nb_resources * RESOURCE_DATA_ENTRY_SIZE; - - for (i = 0, type = tree->types; i < tree->nb_types; i++, type++) - { - if (type->type->str) - { - type->name_offset = offset | 0x80000000; - offset += (strlenW(type->type->str)+1) * sizeof(WCHAR); - } - else type->name_offset = type->type->id; - - for (n = 0, name = type->names; n < type->nb_names; n++, name++) - { - if (name->name->str) - { - name->name_offset = offset | 0x80000000; - offset += (strlenW(name->name->str)+1) * sizeof(WCHAR); - } - else name->name_offset = name->name->id; - for (k = 0, res = name->res; k < name->nb_languages; k++, res++) - { - unsigned int entry_offset = (res - spec->resources) * RESOURCE_DATA_ENTRY_SIZE; - res->data_offset = data_offset + entry_offset; - } - } - } - if (dir_size) *dir_size = (offset + 3) & ~3; - return tree; -} - -/* free the resource tree */ -static void free_resource_tree( struct res_tree *tree ) -{ - unsigned int i; - - for (i = 0; i < tree->nb_types; i++) free( tree->types[i].names ); - free( tree->types ); - free( tree ); -} - -/* output a Unicode string */ -static void output_string( const WCHAR *name ) -{ - int i, len = strlenW(name); - output( "\t%s 0x%04x", get_asm_short_keyword(), len ); - for (i = 0; i < len; i++) output( ",0x%04x", name[i] ); - output( " /* " ); - for (i = 0; i < len; i++) output( "%c", isprint((char)name[i]) ? (char)name[i] : '?' ); - output( " */\n" ); -} - -/* output a resource directory */ -static inline void output_res_dir( unsigned int nb_names, unsigned int nb_ids ) -{ - output( "\t.long 0\n" ); /* Characteristics */ - output( "\t.long 0\n" ); /* TimeDateStamp */ - output( "\t%s 0,0\n", /* Major/MinorVersion */ - get_asm_short_keyword() ); - output( "\t%s %u,%u\n", /* NumberOfNamed/IdEntries */ - get_asm_short_keyword(), nb_names, nb_ids ); -} - -/* output the resource definitions */ -void output_resources( DLLSPEC *spec ) -{ - int k, nb_id_types; - unsigned int i, n; - struct res_tree *tree; - struct res_type *type; - struct res_name *name; - const struct resource *res; - - if (!spec->nb_resources) return; - - tree = build_resource_tree( spec, NULL ); - - /* output the resource directories */ - - output( "\n/* resources */\n\n" ); - output( "\t.data\n" ); - output( "\t.align %d\n", get_alignment(get_ptr_size()) ); - output( ".L__wine_spec_resources:\n" ); - - for (i = nb_id_types = 0, type = tree->types; i < tree->nb_types; i++, type++) - if (!type->type->str) nb_id_types++; - - output_res_dir( tree->nb_types - nb_id_types, nb_id_types ); - - /* dump the type directory */ - - for (i = 0, type = tree->types; i < tree->nb_types; i++, type++) - output( "\t.long 0x%08x,0x%08x\n", - type->name_offset, type->dir_offset | 0x80000000 ); - - /* dump the names and languages directories */ - - for (i = 0, type = tree->types; i < tree->nb_types; i++, type++) - { - output_res_dir( type->nb_names - type->nb_id_names, type->nb_id_names ); - for (n = 0, name = type->names; n < type->nb_names; n++, name++) - output( "\t.long 0x%08x,0x%08x\n", - name->name_offset, name->dir_offset | 0x80000000 ); - - for (n = 0, name = type->names; n < type->nb_names; n++, name++) - { - output_res_dir( 0, name->nb_languages ); - for (k = 0, res = name->res; k < name->nb_languages; k++, res++) - output( "\t.long 0x%08x,0x%08x\n", res->lang, res->data_offset ); - } - } - - /* dump the resource data entries */ - - for (i = 0, res = spec->resources; i < spec->nb_resources; i++, res++) - output( "\t.long .L__wine_spec_res_%d-.L__wine_spec_rva_base,%u,0,0\n", - i, (res->data_size + 3) & ~3 ); - - /* dump the name strings */ - - for (i = 0, type = tree->types; i < tree->nb_types; i++, type++) - { - if (type->type->str) output_string( type->type->str ); - for (n = 0, name = type->names; n < type->nb_names; n++, name++) - if (name->name->str) output_string( name->name->str ); - } - - /* resource data */ - - for (i = 0, res = spec->resources; i < spec->nb_resources; i++, res++) - { - output( "\n\t.align %d\n", get_alignment(get_ptr_size()) ); - output( ".L__wine_spec_res_%d:\n", i ); - dump_res_data( res ); - } - output( ".L__wine_spec_resources_end:\n" ); - output( "\t.byte 0\n" ); - - free_resource_tree( tree ); -} - -/* output a Unicode string in binary format */ -static void output_bin_string( const WCHAR *name ) -{ - int i, len = strlenW(name); - put_word( len ); - for (i = 0; i < len; i++) put_word( name[i] ); -} - -/* output a resource directory in binary format */ -static inline void output_bin_res_dir( unsigned int nb_names, unsigned int nb_ids ) -{ - put_dword( 0 ); /* Characteristics */ - put_dword( 0 ); /* TimeDateStamp */ - put_word( 0 ); /* MajorVersion */ - put_word( 0 ); /* MinorVersion */ - put_word( nb_names ); /* NumberOfNamedEntries */ - put_word( nb_ids ); /* NumberOfIdEntries */ -} - -/* output the resource definitions in binary format */ -void output_bin_resources( DLLSPEC *spec, unsigned int start_rva ) -{ - int k, nb_id_types; - unsigned int i, n, data_offset; - struct res_tree *tree; - struct res_type *type; - struct res_name *name; - const struct resource *res; - - if (!spec->nb_resources) return; - - tree = build_resource_tree( spec, &data_offset ); - init_output_buffer(); - - /* output the resource directories */ - - for (i = nb_id_types = 0, type = tree->types; i < tree->nb_types; i++, type++) - if (!type->type->str) nb_id_types++; - - output_bin_res_dir( tree->nb_types - nb_id_types, nb_id_types ); - - /* dump the type directory */ - - for (i = 0, type = tree->types; i < tree->nb_types; i++, type++) - { - put_dword( type->name_offset ); - put_dword( type->dir_offset | 0x80000000 ); - } - - /* dump the names and languages directories */ - - for (i = 0, type = tree->types; i < tree->nb_types; i++, type++) - { - output_bin_res_dir( type->nb_names - type->nb_id_names, type->nb_id_names ); - for (n = 0, name = type->names; n < type->nb_names; n++, name++) - { - put_dword( name->name_offset ); - put_dword( name->dir_offset | 0x80000000 ); - } - - for (n = 0, name = type->names; n < type->nb_names; n++, name++) - { - output_bin_res_dir( 0, name->nb_languages ); - for (k = 0, res = name->res; k < name->nb_languages; k++, res++) - { - put_dword( res->lang ); - put_dword( res->data_offset ); - } - } - } - - /* dump the resource data entries */ - - for (i = 0, res = spec->resources; i < spec->nb_resources; i++, res++) - { - put_dword( data_offset + start_rva ); - put_dword( (res->data_size + 3) & ~3 ); - put_dword( 0 ); - put_dword( 0 ); - data_offset += (res->data_size + 3) & ~3; - } - - /* dump the name strings */ - - for (i = 0, type = tree->types; i < tree->nb_types; i++, type++) - { - if (type->type->str) output_bin_string( type->type->str ); - for (n = 0, name = type->names; n < type->nb_names; n++, name++) - if (name->name->str) output_bin_string( name->name->str ); - } - - /* resource data */ - - align_output( 4 ); - for (i = 0, res = spec->resources; i < spec->nb_resources; i++, res++) - { - put_data( res->data, res->data_size ); - align_output( 4 ); - } - - free_resource_tree( tree ); -} - -static unsigned int get_resource_header_size( const struct resource *res ) -{ - unsigned int size = 5 * sizeof(unsigned int) + 2 * sizeof(unsigned short); - - if (!res->type.str) size += 2 * sizeof(unsigned short); - else size += (strlenW(res->type.str) + 1) * sizeof(WCHAR); - - if (!res->name.str) size += 2 * sizeof(unsigned short); - else size += (strlenW(res->name.str) + 1) * sizeof(WCHAR); - - return size; -} - -/* output the resources into a .o file */ -void output_res_o_file( DLLSPEC *spec ) -{ - unsigned int i; - char *res_file = NULL; - int fd, err; - - if (!spec->nb_resources) fatal_error( "--resources mode needs at least one resource file as input\n" ); - if (!output_file_name) fatal_error( "No output file name specified\n" ); - - byte_swapped = 0; - init_output_buffer(); - - put_dword( 0 ); /* ResSize */ - put_dword( 32 ); /* HeaderSize */ - put_word( 0xffff ); /* ResType */ - put_word( 0x0000 ); - put_word( 0xffff ); /* ResName */ - put_word( 0x0000 ); - put_dword( 0 ); /* DataVersion */ - put_word( 0 ); /* Memory options */ - put_word( 0 ); /* Language */ - put_dword( 0 ); /* Version */ - put_dword( 0 ); /* Characteristics */ - - for (i = 0; i < spec->nb_resources; i++) - { - unsigned int header_size = get_resource_header_size( &spec->resources[i] ); - - put_dword( spec->resources[i].data_size ); - put_dword( (header_size + 3) & ~3 ); - put_string( &spec->resources[i].type ); - put_string( &spec->resources[i].name ); - align_output( 4 ); - put_dword( 0 ); - put_word( spec->resources[i].mem_options ); - put_word( spec->resources[i].lang ); - put_dword( 0 ); - put_dword( 0 ); - put_data( spec->resources[i].data, spec->resources[i].data_size ); - align_output( 4 ); - } - - /* if the output file name is a .res too, don't run the results through windres */ - if (strendswith( output_file_name, ".res")) - { - flush_output_buffer(); - return; - } - - res_file = get_temp_file_name( output_file_name, ".res" ); - if ((fd = open( res_file, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0600 )) == -1) - fatal_error( "Cannot create %s\n", res_file ); - if (write( fd, output_buffer, output_buffer_pos ) != output_buffer_pos) - fatal_error( "Error writing to %s\n", res_file ); - close( fd ); - free( output_buffer ); - - if (res_file) - { - const char *prog = get_windres_command(); - char *cmd = xmalloc( strlen(prog) + strlen(res_file) + strlen(output_file_name) + 9 ); - sprintf( cmd, "%s -i %s -o %s", prog, res_file, output_file_name ); - if (verbose) fprintf( stderr, "%s\n", cmd ); - err = system( cmd ); - if (err) fatal_error( "%s failed with status %d\n", prog, err ); - free( cmd ); - } - output_file_name = NULL; /* so we don't try to assemble it */ -} diff --git a/reactos/tools/winebuild/ros_diff.patch b/reactos/tools/winebuild/ros_diff.patch deleted file mode 100644 index 7247ac10299..00000000000 --- a/reactos/tools/winebuild/ros_diff.patch +++ /dev/null @@ -1,388 +0,0 @@ -Index: build.h -=================================================================== ---- build.h (Revision 4) -+++ build.h (Arbeitskopie) -@@ -38,6 +38,8 @@ - #define min(a,b) (((a) < (b)) ? (a) : (b)) - #endif - -+#define EXEEXT ".exe" -+ - typedef enum - { - TYPE_VARIABLE, /* variable */ -@@ -47,6 +49,7 @@ - TYPE_STDCALL, /* stdcall function (Win32) */ - TYPE_CDECL, /* cdecl function (Win32) */ - TYPE_VARARGS, /* varargs function (Win32) */ -+ TYPE_FASTCALL, /* fastcall function (Win32) */ - TYPE_EXTERN, /* external symbol (Win32) */ - TYPE_NBTYPES - } ORD_TYPE; -@@ -269,6 +272,7 @@ - extern void BuildSpec16File( DLLSPEC *spec ); - extern void BuildSpec32File( DLLSPEC *spec ); - extern void BuildDef32File( DLLSPEC *spec ); -+extern void BuildPedllFile( DLLSPEC *spec ); - - extern void add_16bit_exports( DLLSPEC *spec32, DLLSPEC *spec16 ); - extern int parse_spec_file( FILE *file, DLLSPEC *spec ); -Index: main.c -=================================================================== ---- main.c (Revision 4) -+++ main.c (Arbeitskopie) -@@ -48,9 +48,9 @@ - int link_ext_symbols = 0; - int force_pointer_size = 0; - --#ifdef __i386__ -+#if defined(TARGET_i386) - enum target_cpu target_cpu = CPU_x86; --#elif defined(__x86_64__) -+#elif defined(TARGET_amd64) - enum target_cpu target_cpu = CPU_x86_64; - #elif defined(__sparc__) - enum target_cpu target_cpu = CPU_SPARC; -@@ -58,7 +58,7 @@ - enum target_cpu target_cpu = CPU_ALPHA; - #elif defined(__powerpc__) - enum target_cpu target_cpu = CPU_POWERPC; --#elif defined(__arm__) -+#elif defined(TARGET_arm) - enum target_cpu target_cpu = CPU_ARM; - #else - #error Unsupported CPU -@@ -102,7 +102,8 @@ - MODE_DEF, - MODE_RELAY16, - MODE_RELAY32, -- MODE_RESOURCES -+ MODE_RESOURCES, -+ MODE_PEDLL - }; - - static enum exec_mode_values exec_mode = MODE_NONE; -@@ -253,6 +254,7 @@ - " --relay16 Build the 16-bit relay assembly routines\n" - " --relay32 Build the 32-bit relay assembly routines\n" - " --resources Build a .o file for the resource files\n\n" -+" --pedll Build a .c file for PE dll\n\n" - "The mode options are mutually exclusive; you must specify one and only one.\n\n"; - - enum long_options_values -@@ -272,7 +274,8 @@ - LONG_OPT_RESOURCES, - LONG_OPT_SAVE_TEMPS, - LONG_OPT_SUBSYSTEM, -- LONG_OPT_VERSION -+ LONG_OPT_VERSION, -+ LONG_OPT_PEDLL - }; - - static const char short_options[] = "C:D:E:F:H:I:K:L:M:N:b:d:e:f:hi:kl:m:o:r:u:vw"; -@@ -295,6 +298,7 @@ - { "save-temps", 0, 0, LONG_OPT_SAVE_TEMPS }, - { "subsystem", 1, 0, LONG_OPT_SUBSYSTEM }, - { "version", 0, 0, LONG_OPT_VERSION }, -+ { "pedll", 1, 0, LONG_OPT_PEDLL }, - /* aliases for short options */ - { "target", 1, 0, 'b' }, - { "delay-lib", 1, 0, 'd' }, -@@ -497,6 +501,11 @@ - case LONG_OPT_VERSION: - printf( "winebuild version " PACKAGE_VERSION "\n" ); - exit(0); -+ case LONG_OPT_PEDLL: -+ set_exec_mode( MODE_PEDLL ); -+ spec_file_name = xstrdup( optarg ); -+ set_dll_file_name( optarg, spec ); -+ break; - case '?': - usage(1); - break; -@@ -652,6 +661,11 @@ - if (argv[0]) fatal_error( "file argument '%s' not allowed in this mode\n", argv[0] ); - BuildRelays32(); - break; -+ case MODE_PEDLL: -+ if (argv[0]) fatal_error( "file argument '%s' not allowed in this mode\n", argv[0] ); -+ if (!parse_input_file( spec )) break; -+ BuildPedllFile( spec ); -+ break; - case MODE_RESOURCES: - load_resources( argv, spec ); - output_res_o_file( spec ); -Index: parser.c -=================================================================== ---- parser.c (Revision 4) -+++ parser.c (Arbeitskopie) -@@ -56,6 +56,7 @@ - "stdcall", /* TYPE_STDCALL */ - "cdecl", /* TYPE_CDECL */ - "varargs", /* TYPE_VARARGS */ -+ "fastcall", /* TYPE_FASTCALL */ - "extern" /* TYPE_EXTERN */ - }; - -@@ -521,6 +522,7 @@ - case TYPE_STDCALL: - case TYPE_VARARGS: - case TYPE_CDECL: -+ case TYPE_FASTCALL: - if (!parse_spec_export( odp, spec )) goto error; - break; - case TYPE_ABS: -Index: res32.c -=================================================================== ---- res32.c (Revision 4) -+++ res32.c (Arbeitskopie) -@@ -35,12 +35,14 @@ - #include "build.h" - - typedef unsigned short WCHAR; -+typedef unsigned short WORD; -+typedef unsigned int DWORD; - - /* Unicode string or integer id */ - struct string_id - { - WCHAR *str; /* ptr to Unicode string */ -- unsigned short id; /* integer id if str is NULL */ -+ WORD id; /* integer id if str is NULL */ - }; - - /* descriptor for a resource */ -@@ -195,7 +197,7 @@ - /* all values must be zero except header size */ - static int check_header(void) - { -- unsigned int size; -+ DWORD size; - - if (get_dword()) return 0; /* data size */ - size = get_dword(); /* header size */ -@@ -214,14 +216,14 @@ - /* load the next resource from the current file */ - static void load_next_resource( DLLSPEC *spec ) - { -- unsigned int hdr_size; -+ DWORD hdr_size; - struct resource *res = add_resource( spec ); - - res->data_size = get_dword(); - hdr_size = get_dword(); - if (hdr_size & 3) fatal_error( "%s header size not aligned\n", input_buffer_filename ); - -- res->data = input_buffer + input_buffer_pos - 2*sizeof(unsigned int) + hdr_size; -+ res->data = input_buffer + input_buffer_pos - 2*sizeof(DWORD) + hdr_size; - get_string( &res->type ); - get_string( &res->name ); - if (input_buffer_pos & 2) get_word(); /* align to dword boundary */ -Index: spec32.c -=================================================================== ---- spec32.c (Revision 4) -+++ spec32.c (Arbeitskopie) -@@ -74,6 +74,28 @@ - } - - /******************************************************************* -+ * make_internal_name -+ * -+ * Generate an internal name for an entry point. Used for stubs etc. -+ */ -+static const char *make_internal_name( const ORDDEF *odp, DLLSPEC *spec, const char *prefix ) -+{ -+ static char buffer[256]; -+ if (odp->name || odp->export_name) -+ { -+ char *p; -+ sprintf( buffer, "__wine_%s_%s_%s", prefix, spec->file_name, -+ odp->name ? odp->name : odp->export_name ); -+ /* make sure name is a legal C identifier */ -+ for (p = buffer; *p; p++) if (!isalnum(*p) && *p != '_') break; -+ if (!*p) return buffer; -+ } -+ sprintf( buffer, "__wine_%s_%s_%d", prefix, make_c_identifier(spec->file_name), odp->ordinal ); -+ return buffer; -+} -+ -+ -+/******************************************************************* - * output_relay_debug - * - * Output entry points for relay debugging -@@ -341,6 +363,44 @@ - - - /******************************************************************* -+ * output_stub_funcs -+ * -+ * Output the functions for stub entry points -+ */ -+static void output_stub_funcs( DLLSPEC *spec ) -+{ -+ int i; -+ -+#if 0 -+ for (i = 0; i < spec->nb_entry_points; i++) -+ { -+ ORDDEF *odp = &spec->entry_points[i]; -+ if (odp->type != TYPE_STUB) continue; -+ fprintf( outfile, "#ifdef __GNUC__\n" ); -+ fprintf( outfile, "extern void __wine_spec_unimplemented_stub( const char *module, const char *func ) __attribute__((noreturn));\n" ); -+ fprintf( outfile, "#else\n" ); -+ fprintf( outfile, "extern void __wine_spec_unimplemented_stub( const char *module, const char *func );\n" ); -+ fprintf( outfile, "#endif\n\n" ); -+ break; -+ } -+#endif -+ -+ for (i = 0; i < spec->nb_entry_points; i++) -+ { -+ const ORDDEF *odp = &spec->entry_points[i]; -+ if (odp->type != TYPE_STUB) continue; -+ output( "void %s(void) ", make_internal_name( odp, spec, "stub" ) ); -+ if (odp->name) -+ output( "{ __wine_spec_unimplemented_stub(__wine_spec_file_name, \"%s\"); }\n", odp->name ); -+ else if (odp->export_name) -+ output( "{ __wine_spec_unimplemented_stub(__wine_spec_file_name, \"%s\"); }\n", odp->export_name ); -+ else -+ output( "{ __wine_spec_unimplemented_stub(__wine_spec_file_name, \"%d\"); }\n", odp->ordinal ); -+ } -+} -+ -+ -+/******************************************************************* - * output_asm_constructor - * - * Output code for calling a dll constructor. -@@ -795,10 +855,6 @@ - - if (!(odp->flags & FLAG_PRIVATE)) total++; - -- if (odp->type == TYPE_STUB) continue; -- -- output( " %s", name ); -- - switch(odp->type) - { - case TYPE_EXTERN: -@@ -807,12 +863,14 @@ - case TYPE_VARARGS: - case TYPE_CDECL: - /* try to reduce output */ -+ output( " %s", name ); - if(strcmp(name, odp->link_name) || (odp->flags & FLAG_FORWARD)) - output( "=%s", odp->link_name ); - break; - case TYPE_STDCALL: - { - int at_param = strlen(odp->u.func.arg_types) * get_ptr_size(); -+ output( " %s", name ); - if (!kill_at && target_cpu == CPU_x86) output( "@%d", at_param ); - if (odp->flags & FLAG_FORWARD) - { -@@ -825,6 +883,50 @@ - } - break; - } -+ case TYPE_FASTCALL: -+ { -+ int at_param = strlen(odp->u.func.arg_types) * get_ptr_size(); -+ output( " " ); -+ if (!kill_at) output( "@" ); -+ output( "%s", name ); -+ if (!kill_at) output( "@%d", at_param ); -+ if (odp->flags & FLAG_FORWARD) -+ { -+ output( "=" ); -+ output( "%s", odp->link_name ); -+ } -+ else if (strcmp(name, odp->link_name)) /* try to reduce output */ -+ { -+ output( "=" ); -+ if (!kill_at) output( "@" ); -+ output( "%s", odp->link_name ); -+ if (!kill_at) output( "@%d", at_param ); -+ } -+ break; -+ } -+ case TYPE_STUB: -+ { -+ output( " %s", name ); -+ if (!kill_at) -+ { -+ const char *check = name + strlen(name); -+ while (name != check && -+ '0' <= check[-1] && check[-1] <= '9') -+ { -+ check--; -+ } -+ if (name != check && check != name + strlen(name) && -+ '@' == check[-1]) -+ { -+ output("%s", check - 1); -+ } -+ } -+ if (odp->name || odp->export_name) -+ { -+ output("=%s", make_internal_name( odp, spec, "stub" )); -+ } -+ break; -+ } - default: - assert(0); - } -@@ -836,3 +939,52 @@ - } - if (!total) warning( "%s: Import library doesn't export anything\n", spec->file_name ); - } -+ -+ -+/******************************************************************* -+ * BuildPedllFile -+ * -+ * Build a PE DLL C file from a spec file. -+ */ -+void BuildPedllFile( DLLSPEC *spec ) -+{ -+ int i, has_stubs = 0; -+ -+ output_standard_file_header(); -+ -+ for (i = 0; i < spec->nb_entry_points; i++) -+ { -+ const ORDDEF *odp = &spec->entry_points[i]; -+ if (odp->type == TYPE_STUB) -+ { -+ has_stubs = 1; -+ break; -+ } -+ } -+ -+ if (!has_stubs) -+ { -+ output( "/* This file is intentionally left blank */\n"); -+ return; -+ } -+ -+ output( "#include \n"); -+ output( "#include \"windef.h\"\n"); -+ output( "#include \"winbase.h\"\n"); -+ output( "#include \"wine/config.h\"\n"); -+ output( "#include \"wine/exception.h\"\n\n"); -+ -+ output( "void __wine_spec_unimplemented_stub( const char *module, const char *function )\n"); -+ output( "{\n"); -+ output( " ULONG_PTR args[2];\n"); -+ output( "\n"); -+ output( " args[0] = (ULONG_PTR)module;\n"); -+ output( " args[1] = (ULONG_PTR)function;\n"); -+ output( " RaiseException( EXCEPTION_WINE_STUB, EH_NONCONTINUABLE, 2, args );\n"); -+ output( "}\n\n"); -+ -+ output( "static const char __wine_spec_file_name[] = \"%s\";\n\n", spec->file_name ); -+ -+ /* Output the stub functions */ -+ output_stub_funcs( spec ); -+} diff --git a/reactos/tools/winebuild/spec16.c b/reactos/tools/winebuild/spec16.c deleted file mode 100644 index a0a962f7251..00000000000 --- a/reactos/tools/winebuild/spec16.c +++ /dev/null @@ -1,1047 +0,0 @@ -/* - * 16-bit spec files - * - * Copyright 1993 Robert J. Amstadt - * Copyright 1995 Martin von Loewis - * Copyright 1995, 1996, 1997 Alexandre Julliard - * Copyright 1997 Eric Youngdale - * Copyright 1999 Ulrich Weigand - * - * 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 -#include - -#include "build.h" - -#define NE_FFLAGS_SINGLEDATA 0x0001 -#define NE_FFLAGS_LIBMODULE 0x8000 - -/* argument type flags for relay debugging */ -enum arg_types -{ - ARG_NONE = 0, /* indicates end of arg list */ - ARG_WORD, /* unsigned word */ - ARG_SWORD, /* signed word */ - ARG_LONG, /* long or segmented pointer */ - ARG_PTR, /* linear pointer */ - ARG_STR, /* linear pointer to null-terminated string */ - ARG_SEGSTR, /* segmented pointer to null-terminated string */ - ARG_VARARG /* start of varargs */ -}; - -/* sequences of nops to fill a certain number of words */ -static const char * const nop_sequence[4] = -{ - ".byte 0x89,0xf6", /* mov %esi,%esi */ - ".byte 0x8d,0x74,0x26,0x00", /* lea 0x00(%esi),%esi */ - ".byte 0x8d,0xb6,0x00,0x00,0x00,0x00", /* lea 0x00000000(%esi),%esi */ - ".byte 0x8d,0x74,0x26,0x00,0x8d,0x74,0x26,0x00" /* lea 0x00(%esi),%esi; lea 0x00(%esi),%esi */ -}; - -static inline int is_function( const ORDDEF *odp ) -{ - return (odp->type == TYPE_CDECL || - odp->type == TYPE_PASCAL || - odp->type == TYPE_VARARGS || - odp->type == TYPE_STUB); -} - -static void init_dll_name( DLLSPEC *spec ) -{ - if (!spec->file_name) - { - char *p; - spec->file_name = xstrdup( output_file_name ); - if ((p = strrchr( spec->file_name, '.' ))) *p = 0; - } - if (!spec->dll_name) /* set default name from file name */ - { - char *p; - spec->dll_name = xstrdup( spec->file_name ); - if ((p = strrchr( spec->dll_name, '.' ))) *p = 0; - } -} - -/******************************************************************* - * output_entries - * - * Output entries for individual symbols in the entry table. - */ -static void output_entries( DLLSPEC *spec, int first, int count ) -{ - int i; - - for (i = 0; i < count; i++) - { - ORDDEF *odp = spec->ordinals[first + i]; - output( "\t.byte 0x03\n" ); /* flags: exported & public data */ - switch (odp->type) - { - case TYPE_CDECL: - case TYPE_PASCAL: - case TYPE_VARARGS: - case TYPE_STUB: - output( "\t%s .L__wine_%s_%u-.L__wine_spec_code_segment\n", - get_asm_short_keyword(), - make_c_identifier(spec->dll_name), first + i ); - break; - case TYPE_VARIABLE: - output( "\t%s .L__wine_%s_%u-.L__wine_spec_data_segment\n", - get_asm_short_keyword(), - make_c_identifier(spec->dll_name), first + i ); - break; - case TYPE_ABS: - output( "\t%s 0x%04x /* %s */\n", - get_asm_short_keyword(), odp->u.abs.value, odp->name ); - break; - default: - assert(0); - } - } -} - - -/******************************************************************* - * output_entry_table - */ -static void output_entry_table( DLLSPEC *spec ) -{ - int i, prev = 0, prev_sel = -1, bundle_count = 0; - - for (i = 1; i <= spec->limit; i++) - { - int selector = 0; - ORDDEF *odp = spec->ordinals[i]; - if (!odp) continue; - - switch (odp->type) - { - case TYPE_CDECL: - case TYPE_PASCAL: - case TYPE_VARARGS: - case TYPE_STUB: - selector = 1; /* Code selector */ - break; - case TYPE_VARIABLE: - selector = 2; /* Data selector */ - break; - case TYPE_ABS: - selector = 0xfe; /* Constant selector */ - break; - default: - continue; - } - - if (prev + 1 != i || prev_sel != selector || bundle_count == 255) - { - /* need to start a new bundle */ - - /* flush previous bundle */ - if (bundle_count) - { - output( "\t/* %s.%d - %s.%d */\n", - spec->dll_name, prev - bundle_count + 1, spec->dll_name, prev ); - output( "\t.byte 0x%02x,0x%02x\n", bundle_count, prev_sel ); - output_entries( spec, prev - bundle_count + 1, bundle_count ); - } - - if (prev + 1 != i) - { - int skip = i - (prev + 1); - while (skip > 255) - { - output( "\t.byte 0xff,0x00\n" ); - skip -= 255; - } - output( "\t.byte 0x%02x,0x00\n", skip ); - } - - bundle_count = 0; - prev_sel = selector; - } - bundle_count++; - prev = i; - } - - /* flush last bundle */ - if (bundle_count) - { - output( "\t.byte 0x%02x,0x%02x\n", bundle_count, prev_sel ); - output_entries( spec, prev - bundle_count + 1, bundle_count ); - } - output( "\t.byte 0x00\n" ); -} - - -/******************************************************************* - * output_resident_name - */ -static void output_resident_name( const char *string, int ordinal ) -{ - unsigned int i, len = strlen(string); - - output( "\t.byte 0x%02x", len ); - for (i = 0; i < len; i++) output( ",0x%02x", (unsigned char)toupper(string[i]) ); - output( " /* %s */\n", string ); - output( "\t%s %u\n", get_asm_short_keyword(), ordinal ); -} - - -/******************************************************************* - * get_callfrom16_name - */ -static const char *get_callfrom16_name( const ORDDEF *odp ) -{ - static char buffer[80]; - - sprintf( buffer, "%s_%s_%s", - (odp->type == TYPE_PASCAL) ? "p" : - (odp->type == TYPE_VARARGS) ? "v" : "c", - (odp->flags & FLAG_REGISTER) ? "regs" : - (odp->flags & FLAG_RET16) ? "word" : "long", - odp->u.func.arg_types ); - return buffer; -} - - -/******************************************************************* - * get_relay_name - */ -static const char *get_relay_name( const ORDDEF *odp ) -{ - static char buffer[80]; - char *p; - - switch(odp->type) - { - case TYPE_PASCAL: - strcpy( buffer, "p_" ); - break; - case TYPE_VARARGS: - strcpy( buffer, "v_" ); - break; - case TYPE_CDECL: - case TYPE_STUB: - strcpy( buffer, "c_" ); - break; - default: - assert(0); - } - strcat( buffer, odp->u.func.arg_types ); - for (p = buffer + 2; *p; p++) - { - /* map string types to the corresponding plain pointer type */ - if (*p == 't') *p = 'p'; - else if (*p == 'T') *p = 'l'; - } - if (odp->flags & FLAG_REGISTER) strcat( buffer, "_regs" ); - return buffer; -} - - -/******************************************************************* - * get_function_argsize - */ -static int get_function_argsize( const ORDDEF *odp ) -{ - const char *args; - int argsize = 0; - - for (args = odp->u.func.arg_types; *args; args++) - { - switch (*args) - { - case 'w': /* word */ - case 's': /* s_word */ - argsize += 2; - break; - case 'l': /* long or segmented pointer */ - case 'T': /* segmented pointer to null-terminated string */ - case 'p': /* linear pointer */ - case 't': /* linear pointer to null-terminated string */ - argsize += 4; - break; - default: - assert(0); - } - } - return argsize; -} - - -/******************************************************************* - * output_call16_function - * - * Build a 16-bit-to-Wine callback glue function. - * - * The generated routines are intended to be used as argument conversion - * routines to be called by the CallFrom16... core. Thus, the prototypes of - * the generated routines are (see also CallFrom16): - * - * extern WORD WINAPI __wine_spec_call16_C_xxx( FARPROC func, LPBYTE args ); - * extern LONG WINAPI __wine_spec_call16_C_xxx( FARPROC func, LPBYTE args ); - * extern void WINAPI __wine_spec_call16_C_xxx_regs( FARPROC func, LPBYTE args, CONTEXT86 *context ); - * - * where 'C' is the calling convention ('p' for pascal or 'c' for cdecl), - * and each 'x' is an argument ('w'=word, 's'=signed word, 'l'=long, - * 'p'=linear pointer, 't'=linear pointer to null-terminated string, - * 'T'=segmented pointer to null-terminated string). - * - * The generated routines fetch the arguments from the 16-bit stack (pointed - * to by 'args'); the offsets of the single argument values are computed - * according to the calling convention and the argument types. Then, the - * 32-bit entry point is called with these arguments. - * - * For register functions, the arguments (if present) are converted just - * the same as for normal functions, but in addition the CONTEXT86 pointer - * filled with the current register values is passed to the 32-bit routine. - */ -static void output_call16_function( ORDDEF *odp ) -{ - char name[256]; - int i, pos, stack_words; - const char *args = odp->u.func.arg_types; - int argsize = get_function_argsize( odp ); - int needs_ldt = strchr( args, 'p' ) || strchr( args, 't' ); - - sprintf( name, ".L__wine_spec_call16_%s", get_relay_name(odp) ); - - output( "\t.align %d\n", get_alignment(4) ); - output( "\t%s\n", func_declaration(name) ); - output( "%s:\n", name ); - output( "\tpushl %%ebp\n" ); - output( "\tmovl %%esp,%%ebp\n" ); - stack_words = 2; - if (needs_ldt) - { - output( "\tpushl %%esi\n" ); - stack_words++; - if (UsePIC) - { - output( "\tcall %s\n", asm_name("__wine_spec_get_pc_thunk_eax") ); - output( "1:\tmovl wine_ldt_copy_ptr-1b(%%eax),%%esi\n" ); - } - else - output( "\tmovl $%s,%%esi\n", asm_name("wine_ldt_copy") ); - } - - /* preserve 16-byte stack alignment */ - stack_words += strlen(args); - if ((odp->flags & FLAG_REGISTER) || (odp->type == TYPE_VARARGS)) stack_words++; - if (stack_words % 4) output( "\tsubl $%d,%%esp\n", 16 - 4 * (stack_words % 4) ); - - if (args[0] || odp->type == TYPE_VARARGS) - output( "\tmovl 12(%%ebp),%%ecx\n" ); /* args */ - - if (odp->flags & FLAG_REGISTER) - { - output( "\tpushl 16(%%ebp)\n" ); /* context */ - } - else if (odp->type == TYPE_VARARGS) - { - output( "\tleal %d(%%ecx),%%eax\n", argsize ); - output( "\tpushl %%eax\n" ); /* va_list16 */ - } - - pos = (odp->type == TYPE_PASCAL) ? 0 : argsize; - for (i = strlen(args) - 1; i >= 0; i--) - { - switch (args[i]) - { - case 'w': /* word */ - if (odp->type != TYPE_PASCAL) pos -= 2; - output( "\tmovzwl %d(%%ecx),%%eax\n", pos ); - output( "\tpushl %%eax\n" ); - if (odp->type == TYPE_PASCAL) pos += 2; - break; - - case 's': /* s_word */ - if (odp->type != TYPE_PASCAL) pos -= 2; - output( "\tmovswl %d(%%ecx),%%eax\n", pos ); - output( "\tpushl %%eax\n" ); - if (odp->type == TYPE_PASCAL) pos += 2; - break; - - case 'l': /* long or segmented pointer */ - case 'T': /* segmented pointer to null-terminated string */ - if (odp->type != TYPE_PASCAL) pos -= 4; - output( "\tpushl %d(%%ecx)\n", pos ); - if (odp->type == TYPE_PASCAL) pos += 4; - break; - - case 'p': /* linear pointer */ - case 't': /* linear pointer to null-terminated string */ - if (odp->type != TYPE_PASCAL) pos -= 4; - output( "\tmovzwl %d(%%ecx),%%edx\n", pos + 2 ); /* sel */ - output( "\tshr $3,%%edx\n" ); - output( "\tmovzwl %d(%%ecx),%%eax\n", pos ); /* offset */ - output( "\taddl (%%esi,%%edx,4),%%eax\n" ); - output( "\tpushl %%eax\n" ); - if (odp->type == TYPE_PASCAL) pos += 4; - break; - - default: - assert(0); - } - } - - output( "\tcall *8(%%ebp)\n" ); - - if (needs_ldt) output( "\tmovl -4(%%ebp),%%esi\n" ); - - output( "\tleave\n" ); - output( "\tret\n" ); - output_function_size( name ); -} - - -/******************************************************************* - * callfrom16_type_compare - * - * Compare two callfrom16 sequences. - */ -static int callfrom16_type_compare( const void *e1, const void *e2 ) -{ - const ORDDEF *odp1 = *(const ORDDEF * const *)e1; - const ORDDEF *odp2 = *(const ORDDEF * const *)e2; - int retval; - int type1 = odp1->type; - int type2 = odp2->type; - - if (type1 == TYPE_STUB) type1 = TYPE_CDECL; - if (type2 == TYPE_STUB) type2 = TYPE_CDECL; - - if ((retval = type1 - type2) != 0) return retval; - - type1 = odp1->flags & (FLAG_RET16|FLAG_REGISTER); - type2 = odp2->flags & (FLAG_RET16|FLAG_REGISTER); - - if ((retval = type1 - type2) != 0) return retval; - - return strcmp( odp1->u.func.arg_types, odp2->u.func.arg_types ); -} - - -/******************************************************************* - * relay_type_compare - * - * Same as callfrom16_type_compare but ignores differences that don't affect the resulting relay function. - */ -static int relay_type_compare( const void *e1, const void *e2 ) -{ - const ORDDEF *odp1 = *(const ORDDEF * const *)e1; - const ORDDEF *odp2 = *(const ORDDEF * const *)e2; - char name1[80]; - - strcpy( name1, get_relay_name(odp1) ); - return strcmp( name1, get_relay_name(odp2) ); -} - - -/******************************************************************* - * sort_func_list - * - * Sort a list of functions, removing duplicates. - */ -static int sort_func_list( ORDDEF **list, int count, - int (*compare)(const void *, const void *) ) -{ - int i, j; - - if (!count) return 0; - qsort( list, count, sizeof(*list), compare ); - - for (i = j = 0; i < count; i++) - { - if (compare( &list[j], &list[i] )) list[++j] = list[i]; - } - return j + 1; -} - - -/******************************************************************* - * output_init_code - * - * Output the dll initialization code. - */ -static void output_init_code( const DLLSPEC *spec ) -{ - char name[80]; - - sprintf( name, ".L__wine_spec_%s_init", make_c_identifier(spec->dll_name) ); - - output( "\n/* dll initialization code */\n\n" ); - output( "\t.text\n" ); - output( "\t.align 4\n" ); - output( "\t%s\n", func_declaration(name) ); - output( "%s:\n", name ); - output( "\tsubl $4,%%esp\n" ); - if (UsePIC) - { - output( "\tcall %s\n", asm_name("__wine_spec_get_pc_thunk_eax") ); - output( "1:\tleal .L__wine_spec_file_name-1b(%%eax),%%ecx\n" ); - output( "\tpushl %%ecx\n" ); - output( "\tleal .L__wine_spec_dos_header-1b(%%eax),%%ecx\n" ); - output( "\tpushl %%ecx\n" ); - } - else - { - output( "\tpushl $.L__wine_spec_file_name\n" ); - output( "\tpushl $.L__wine_spec_dos_header\n" ); - } - output( "\tcall %s\n", asm_name("__wine_dll_register_16") ); - output( "\taddl $12,%%esp\n" ); - output( "\tret\n" ); - output_function_size( name ); - - sprintf( name, ".L__wine_spec_%s_fini", make_c_identifier(spec->dll_name) ); - - output( "\t.align 4\n" ); - output( "\t%s\n", func_declaration(name) ); - output( "%s:\n", name ); - output( "\tsubl $8,%%esp\n" ); - if (UsePIC) - { - output( "\tcall %s\n", asm_name("__wine_spec_get_pc_thunk_eax") ); - output( "1:\tleal .L__wine_spec_dos_header-1b(%%eax),%%ecx\n" ); - output( "\tpushl %%ecx\n" ); - } - else - { - output( "\tpushl $.L__wine_spec_dos_header\n" ); - } - output( "\tcall %s\n", asm_name("__wine_dll_unregister_16") ); - output( "\taddl $12,%%esp\n" ); - output( "\tret\n" ); - output_function_size( name ); - - if (target_platform == PLATFORM_APPLE) - { - output( "\t.mod_init_func\n" ); - output( "\t.align %d\n", get_alignment(4) ); - output( "\t.long .L__wine_spec_%s_init\n", make_c_identifier(spec->dll_name) ); - output( "\t.mod_term_func\n" ); - output( "\t.align %d\n", get_alignment(4) ); - output( "\t.long .L__wine_spec_%s_fini\n", make_c_identifier(spec->dll_name) ); - } - else - { - output( "\t.section \".init\",\"ax\"\n" ); - output( "\tcall .L__wine_spec_%s_init\n", make_c_identifier(spec->dll_name) ); - output( "\t.section \".fini\",\"ax\"\n" ); - output( "\tcall .L__wine_spec_%s_fini\n", make_c_identifier(spec->dll_name) ); - } -} - - -/******************************************************************* - * output_module16 - * - * Output code for a 16-bit module. - */ -static void output_module16( DLLSPEC *spec ) -{ - ORDDEF **typelist; - ORDDEF *entry_point = NULL; - int i, j, nb_funcs; - - /* store the main entry point as ordinal 0 */ - - if (!spec->ordinals) - { - assert(spec->limit == 0); - spec->ordinals = xmalloc( sizeof(spec->ordinals[0]) ); - spec->ordinals[0] = NULL; - } - if (spec->init_func && !(spec->characteristics & IMAGE_FILE_DLL)) - { - entry_point = xmalloc( sizeof(*entry_point) ); - entry_point->type = TYPE_PASCAL; - entry_point->ordinal = 0; - entry_point->lineno = 0; - entry_point->flags = FLAG_REGISTER; - entry_point->name = NULL; - entry_point->link_name = xstrdup( spec->init_func ); - entry_point->export_name = NULL; - entry_point->u.func.arg_types[0] = 0; - assert( !spec->ordinals[0] ); - spec->ordinals[0] = entry_point; - } - - /* Build sorted list of all argument types, without duplicates */ - - typelist = xmalloc( (spec->limit + 1) * sizeof(*typelist) ); - - for (i = nb_funcs = 0; i <= spec->limit; i++) - { - ORDDEF *odp = spec->ordinals[i]; - if (!odp) continue; - if (is_function( odp )) typelist[nb_funcs++] = odp; - } - - nb_funcs = sort_func_list( typelist, nb_funcs, callfrom16_type_compare ); - - /* Output the module structure */ - - output( "\n/* module data */\n\n" ); - output( "\t.data\n" ); - output( "\t.align %d\n", get_alignment(4) ); - output( ".L__wine_spec_dos_header:\n" ); - output( "\t%s 0x5a4d\n", get_asm_short_keyword() ); /* e_magic */ - output( "\t%s 0\n", get_asm_short_keyword() ); /* e_cblp */ - output( "\t%s 0\n", get_asm_short_keyword() ); /* e_cp */ - output( "\t%s 0\n", get_asm_short_keyword() ); /* e_crlc */ - output( "\t%s 0\n", get_asm_short_keyword() ); /* e_cparhdr */ - output( "\t%s 0\n", get_asm_short_keyword() ); /* e_minalloc */ - output( "\t%s 0\n", get_asm_short_keyword() ); /* e_maxalloc */ - output( "\t%s 0\n", get_asm_short_keyword() ); /* e_ss */ - output( "\t%s 0\n", get_asm_short_keyword() ); /* e_sp */ - output( "\t%s 0\n", get_asm_short_keyword() ); /* e_csum */ - output( "\t%s 0\n", get_asm_short_keyword() ); /* e_ip */ - output( "\t%s 0\n", get_asm_short_keyword() ); /* e_cs */ - output( "\t%s 0\n", get_asm_short_keyword() ); /* e_lfarlc */ - output( "\t%s 0\n", get_asm_short_keyword() ); /* e_ovno */ - output( "\t%s 0,0,0,0\n", get_asm_short_keyword() ); /* e_res */ - output( "\t%s 0\n", get_asm_short_keyword() ); /* e_oemid */ - output( "\t%s 0\n", get_asm_short_keyword() ); /* e_oeminfo */ - output( "\t%s 0,0,0,0,0,0,0,0,0,0\n", get_asm_short_keyword() ); /* e_res2 */ - output( "\t.long .L__wine_spec_ne_header-.L__wine_spec_dos_header\n" );/* e_lfanew */ - - output( ".L__wine_spec_ne_header:\n" ); - output( "\t%s 0x454e\n", get_asm_short_keyword() ); /* ne_magic */ - output( "\t.byte 0\n" ); /* ne_ver */ - output( "\t.byte 0\n" ); /* ne_rev */ - output( "\t%s .L__wine_spec_ne_enttab-.L__wine_spec_ne_header\n", /* ne_enttab */ - get_asm_short_keyword() ); - output( "\t%s .L__wine_spec_ne_enttab_end-.L__wine_spec_ne_enttab\n", /* ne_cbenttab */ - get_asm_short_keyword() ); - output( "\t.long 0\n" ); /* ne_crc */ - output( "\t%s 0x%04x\n", get_asm_short_keyword(), /* ne_flags */ - NE_FFLAGS_SINGLEDATA | - ((spec->characteristics & IMAGE_FILE_DLL) ? NE_FFLAGS_LIBMODULE : 0) ); - output( "\t%s 2\n", get_asm_short_keyword() ); /* ne_autodata */ - output( "\t%s %u\n", get_asm_short_keyword(), spec->heap_size ); /* ne_heap */ - output( "\t%s 0\n", get_asm_short_keyword() ); /* ne_stack */ - if (!entry_point) output( "\t.long 0\n" ); /* ne_csip */ - else output( "\t%s .L__wine_%s_0-.L__wine_spec_code_segment,1\n", - get_asm_short_keyword(), make_c_identifier(spec->dll_name) ); - output( "\t%s 0,2\n", get_asm_short_keyword() ); /* ne_sssp */ - output( "\t%s 2\n", get_asm_short_keyword() ); /* ne_cseg */ - output( "\t%s 0\n", get_asm_short_keyword() ); /* ne_cmod */ - output( "\t%s 0\n", get_asm_short_keyword() ); /* ne_cbnrestab */ - output( "\t%s .L__wine_spec_ne_segtab-.L__wine_spec_ne_header\n", /* ne_segtab */ - get_asm_short_keyword() ); - output( "\t%s .L__wine_spec_ne_rsrctab-.L__wine_spec_ne_header\n", /* ne_rsrctab */ - get_asm_short_keyword() ); - output( "\t%s .L__wine_spec_ne_restab-.L__wine_spec_ne_header\n", /* ne_restab */ - get_asm_short_keyword() ); - output( "\t%s .L__wine_spec_ne_modtab-.L__wine_spec_ne_header\n", /* ne_modtab */ - get_asm_short_keyword() ); - output( "\t%s .L__wine_spec_ne_imptab-.L__wine_spec_ne_header\n", /* ne_imptab */ - get_asm_short_keyword() ); - output( "\t.long 0\n" ); /* ne_nrestab */ - output( "\t%s 0\n", get_asm_short_keyword() ); /* ne_cmovent */ - output( "\t%s 0\n", get_asm_short_keyword() ); /* ne_align */ - output( "\t%s 0\n", get_asm_short_keyword() ); /* ne_cres */ - output( "\t.byte 0x02\n" ); /* ne_exetyp = NE_OSFLAGS_WINDOWS */ - output( "\t.byte 0x08\n" ); /* ne_flagsothers = NE_AFLAGS_FASTLOAD */ - output( "\t%s 0\n", get_asm_short_keyword() ); /* ne_pretthunks */ - output( "\t%s 0\n", get_asm_short_keyword() ); /* ne_psegrefbytes */ - output( "\t%s 0\n", get_asm_short_keyword() ); /* ne_swaparea */ - output( "\t%s 0\n", get_asm_short_keyword() ); /* ne_expver */ - - /* segment table */ - - output( "\n.L__wine_spec_ne_segtab:\n" ); - - /* code segment entry */ - - output( "\t%s .L__wine_spec_code_segment-.L__wine_spec_dos_header\n", /* filepos */ - get_asm_short_keyword() ); - output( "\t%s .L__wine_spec_code_segment_end-.L__wine_spec_code_segment\n", /* size */ - get_asm_short_keyword() ); - output( "\t%s 0x2000\n", get_asm_short_keyword() ); /* flags = NE_SEGFLAGS_32BIT */ - output( "\t%s .L__wine_spec_code_segment_end-.L__wine_spec_code_segment\n", /* minsize */ - get_asm_short_keyword() ); - - /* data segment entry */ - - output( "\t%s .L__wine_spec_data_segment-.L__wine_spec_dos_header\n", /* filepos */ - get_asm_short_keyword() ); - output( "\t%s .L__wine_spec_data_segment_end-.L__wine_spec_data_segment\n", /* size */ - get_asm_short_keyword() ); - output( "\t%s 0x0001\n", get_asm_short_keyword() ); /* flags = NE_SEGFLAGS_DATA */ - output( "\t%s .L__wine_spec_data_segment_end-.L__wine_spec_data_segment\n", /* minsize */ - get_asm_short_keyword() ); - - /* resource directory */ - - output_res16_directory( spec ); - - /* resident names table */ - - output( "\n\t.align %d\n", get_alignment(2) ); - output( ".L__wine_spec_ne_restab:\n" ); - output_resident_name( spec->dll_name, 0 ); - for (i = 1; i <= spec->limit; i++) - { - ORDDEF *odp = spec->ordinals[i]; - if (!odp || !odp->name[0]) continue; - output_resident_name( odp->name, i ); - } - output( "\t.byte 0\n" ); - - /* imported names table */ - - output( "\n\t.align %d\n", get_alignment(2) ); - output( ".L__wine_spec_ne_modtab:\n" ); - output( ".L__wine_spec_ne_imptab:\n" ); - output( "\t.byte 0,0\n" ); - - /* entry table */ - - output( "\n.L__wine_spec_ne_enttab:\n" ); - output_entry_table( spec ); - output( ".L__wine_spec_ne_enttab_end:\n" ); - - /* code segment */ - - output( "\n\t.align %d\n", get_alignment(2) ); - output( ".L__wine_spec_code_segment:\n" ); - - for ( i = 0; i < nb_funcs; i++ ) - { - unsigned int arg_types[2]; - int nop_words, argsize = 0; - - if ( typelist[i]->type == TYPE_PASCAL ) - argsize = get_function_argsize( typelist[i] ); - - /* build the arg types bit fields */ - arg_types[0] = arg_types[1] = 0; - for (j = 0; typelist[i]->u.func.arg_types[j]; j++) - { - int type = 0; - switch(typelist[i]->u.func.arg_types[j]) - { - case 'w': type = ARG_WORD; break; - case 's': type = ARG_SWORD; break; - case 'l': type = ARG_LONG; break; - case 'p': type = ARG_PTR; break; - case 't': type = ARG_STR; break; - case 'T': type = ARG_SEGSTR; break; - } - arg_types[j / 10] |= type << (3 * (j % 10)); - } - if (typelist[i]->type == TYPE_VARARGS) arg_types[j / 10] |= ARG_VARARG << (3 * (j % 10)); - - output( ".L__wine_spec_callfrom16_%s:\n", get_callfrom16_name(typelist[i]) ); - output( "\tpushl $.L__wine_spec_call16_%s\n", get_relay_name(typelist[i]) ); - output( "\tlcall $0,$0\n" ); - - if (typelist[i]->flags & FLAG_REGISTER) - { - nop_words = 4; - } - else if (typelist[i]->flags & FLAG_RET16) - { - output( "\torw %%ax,%%ax\n" ); - output( "\tnop\n" ); /* so that the lretw is aligned */ - nop_words = 2; - } - else - { - output( "\tshld $16,%%eax,%%edx\n" ); - output( "\torl %%eax,%%eax\n" ); - nop_words = 1; - } - - if (argsize) - { - output( "\tlretw $%u\n", argsize ); - nop_words--; - } - else output( "\tlretw\n" ); - - if (nop_words) output( "\t%s\n", nop_sequence[nop_words-1] ); - - /* the movl is here so that the code contains only valid instructions, */ - /* it's never actually executed, we only care about the arg_types[] values */ - output( "\t%s 0x86c7\n", get_asm_short_keyword() ); - output( "\t.long 0x%08x,0x%08x\n", arg_types[0], arg_types[1] ); - } - - for (i = 0; i <= spec->limit; i++) - { - ORDDEF *odp = spec->ordinals[i]; - if (!odp || !is_function( odp )) continue; - output( ".L__wine_%s_%u:\n", make_c_identifier(spec->dll_name), i ); - output( "\tpushw %%bp\n" ); - output( "\tpushl $%s\n", - asm_name( odp->type == TYPE_STUB ? get_stub_name( odp, spec ) : odp->link_name )); - output( "\tcallw .L__wine_spec_callfrom16_%s\n", get_callfrom16_name( odp ) ); - } - output( ".L__wine_spec_code_segment_end:\n" ); - - /* data segment */ - - output( "\n.L__wine_spec_data_segment:\n" ); - output( "\t.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n" ); /* instance data */ - for (i = 0; i <= spec->limit; i++) - { - ORDDEF *odp = spec->ordinals[i]; - if (!odp || odp->type != TYPE_VARIABLE) continue; - output( ".L__wine_%s_%u:\n", make_c_identifier(spec->dll_name), i ); - output( "\t.long " ); - for (j = 0; j < odp->u.var.n_values-1; j++) - output( "0x%08x,", odp->u.var.values[j] ); - output( "0x%08x\n", odp->u.var.values[j] ); - } - output( ".L__wine_spec_data_segment_end:\n" ); - - /* resource data */ - - if (spec->nb_resources) - { - output( "\n.L__wine_spec_resource_data:\n" ); - output_res16_data( spec ); - } - - output( "\t.byte 0\n" ); /* make sure the last symbol points to something */ - - /* relay functions */ - - nb_funcs = sort_func_list( typelist, nb_funcs, relay_type_compare ); - if (nb_funcs) - { - output( "\n/* relay functions */\n\n" ); - output( "\t.text\n" ); - for ( i = 0; i < nb_funcs; i++ ) output_call16_function( typelist[i] ); - output( "\t.data\n" ); - output( "wine_ldt_copy_ptr:\n" ); - output( "\t.long %s\n", asm_name("wine_ldt_copy") ); - } - - free( typelist ); -} - - -/******************************************************************* - * BuildSpec16File - * - * Build a Win16 assembly file from a spec file. - */ -void BuildSpec16File( DLLSPEC *spec ) -{ - init_dll_name( spec ); - output_standard_file_header(); - output_module16( spec ); - output_init_code( spec ); - - output( "\n\t%s\n", get_asm_string_section() ); - output( ".L__wine_spec_file_name:\n" ); - output( "\t%s \"%s\"\n", get_asm_string_keyword(), spec->file_name ); - - output_stubs( spec ); - output_get_pc_thunk(); - output_gnu_stack_note(); -} - - -/******************************************************************* - * output_spec16_file - * - * Output the complete data for a spec 16-bit file. - */ -void output_spec16_file( DLLSPEC *spec16 ) -{ - DLLSPEC *spec32 = alloc_dll_spec(); - - init_dll_name( spec16 ); - spec32->file_name = xstrdup( spec16->file_name ); - - if (spec16->characteristics & IMAGE_FILE_DLL) - { - spec32->characteristics = IMAGE_FILE_DLL; - spec32->init_func = xstrdup( "__wine_spec_dll_entry" ); - } - - resolve_imports( spec16 ); - add_16bit_exports( spec32, spec16 ); - - output_standard_file_header(); - output_module( spec32 ); - output_module16( spec16 ); - output_stubs( spec16 ); - output_exports( spec32 ); - output_imports( spec16 ); - if (spec16->main_module) - { - output( "\n\t%s\n", get_asm_string_section() ); - output( ".L__wine_spec_main_module:\n" ); - output( "\t%s \"%s\"\n", get_asm_string_keyword(), spec16->main_module ); - } - output_gnu_stack_note(); - free_dll_spec( spec32 ); -} - -/******************************************************************* - * output_fake_module16 - * - * Create a fake 16-bit binary module. - */ -void output_fake_module16( DLLSPEC *spec ) -{ - static const unsigned char code_segment[] = { 0x90, 0xc3 }; - static const unsigned char data_segment[16] = { 0 }; - static const char fakedll_signature[] = "Wine placeholder DLL"; - const unsigned int cseg = 2; - const unsigned int lfanew = (0x40 + sizeof(fakedll_signature) + 15) & ~15; - const unsigned int segtab = lfanew + 0x40; - - unsigned int i, rsrctab, restab, namelen, modtab, imptab, enttab, cbenttab, codeseg, dataseg, rsrcdata; - - init_dll_name( spec ); - init_output_buffer(); - - rsrctab = lfanew; - restab = segtab + 8 * cseg; - if (spec->nb_resources) - { - output_bin_res16_directory( spec, 0 ); - align_output( 2 ); - rsrctab = restab; - restab += output_buffer_pos; - free( output_buffer ); - init_output_buffer(); - } - - namelen = strlen( spec->dll_name ); - modtab = restab + ((namelen + 3) & ~1); - imptab = modtab; - enttab = modtab + 2; - cbenttab = 1; - codeseg = (enttab + cbenttab + 1) & ~1; - dataseg = codeseg + sizeof(code_segment); - rsrcdata = dataseg + sizeof(data_segment); - - init_output_buffer(); - - put_word( 0x5a4d ); /* e_magic */ - put_word( 0x40 ); /* e_cblp */ - put_word( 0x01 ); /* e_cp */ - put_word( 0 ); /* e_crlc */ - put_word( lfanew / 16 ); /* e_cparhdr */ - put_word( 0x0000 ); /* e_minalloc */ - put_word( 0xffff ); /* e_maxalloc */ - put_word( 0x0000 ); /* e_ss */ - put_word( 0x00b8 ); /* e_sp */ - put_word( 0 ); /* e_csum */ - put_word( 0 ); /* e_ip */ - put_word( 0 ); /* e_cs */ - put_word( lfanew ); /* e_lfarlc */ - put_word( 0 ); /* e_ovno */ - put_dword( 0 ); /* e_res */ - put_dword( 0 ); - put_word( 0 ); /* e_oemid */ - put_word( 0 ); /* e_oeminfo */ - put_dword( 0 ); /* e_res2 */ - put_dword( 0 ); - put_dword( 0 ); - put_dword( 0 ); - put_dword( 0 ); - put_dword( lfanew ); - - put_data( fakedll_signature, sizeof(fakedll_signature) ); - align_output( 16 ); - - put_word( 0x454e ); /* ne_magic */ - put_byte( 0 ); /* ne_ver */ - put_byte( 0 ); /* ne_rev */ - put_word( enttab - lfanew ); /* ne_enttab */ - put_word( cbenttab ); /* ne_cbenttab */ - put_dword( 0 ); /* ne_crc */ - put_word( NE_FFLAGS_SINGLEDATA | /* ne_flags */ - ((spec->characteristics & IMAGE_FILE_DLL) ? NE_FFLAGS_LIBMODULE : 0) ); - put_word( 2 ); /* ne_autodata */ - put_word( spec->heap_size ); /* ne_heap */ - put_word( 0 ); /* ne_stack */ - put_word( 0 ); put_word( 0 ); /* ne_csip */ - put_word( 0 ); put_word( 2 ); /* ne_sssp */ - put_word( cseg ); /* ne_cseg */ - put_word( 0 ); /* ne_cmod */ - put_word( 0 ); /* ne_cbnrestab */ - put_word( segtab - lfanew ); /* ne_segtab */ - put_word( rsrctab - lfanew ); /* ne_rsrctab */ - put_word( restab - lfanew ); /* ne_restab */ - put_word( modtab - lfanew ); /* ne_modtab */ - put_word( imptab - lfanew ); /* ne_imptab */ - put_dword( 0 ); /* ne_nrestab */ - put_word( 0 ); /* ne_cmovent */ - put_word( 0 ); /* ne_align */ - put_word( 0 ); /* ne_cres */ - put_byte( 2 /*NE_OSFLAGS_WINDOWS*/ ); /* ne_exetyp */ - put_byte( 8 /*NE_AFLAGS_FASTLOAD*/ ); /* ne_flagsothers */ - put_word( 0 ); /* ne_pretthunks */ - put_word( 0 ); /* ne_psegrefbytes */ - put_word( 0 ); /* ne_swaparea */ - put_word( 0 ); /* ne_expver */ - - /* segment table */ - put_word( codeseg ); - put_word( sizeof(code_segment) ); - put_word( 0x2000 /* NE_SEGFLAGS_32BIT */ ); - put_word( sizeof(code_segment) ); - put_word( dataseg ); - put_word( sizeof(data_segment) ); - put_word( 0x0001 /* NE_SEGFLAGS_DATA */ ); - put_word( sizeof(data_segment) ); - - /* resource directory */ - if (spec->nb_resources) - { - output_bin_res16_directory( spec, rsrcdata ); - align_output( 2 ); - } - - /* resident names table */ - put_byte( namelen ); - for (i = 0; i < namelen; i++) put_byte( toupper(spec->dll_name[i]) ); - put_byte( 0 ); - align_output( 2 ); - - /* imported names table */ - put_word( 0 ); - - /* entry table */ - put_byte( 0 ); - align_output( 2 ); - - /* code segment */ - put_data( code_segment, sizeof(code_segment) ); - - /* data segment */ - put_data( data_segment, sizeof(data_segment) ); - - /* resource data */ - output_bin_res16_data( spec ); - - flush_output_buffer(); -} diff --git a/reactos/tools/winebuild/spec32.c b/reactos/tools/winebuild/spec32.c deleted file mode 100644 index f00ad120937..00000000000 --- a/reactos/tools/winebuild/spec32.c +++ /dev/null @@ -1,989 +0,0 @@ -/* - * 32-bit spec files - * - * Copyright 1993 Robert J. Amstadt - * Copyright 1995 Martin von Loewis - * Copyright 1995, 1996, 1997 Alexandre Julliard - * Copyright 1997 Eric Youngdale - * Copyright 1999 Ulrich Weigand - * - * 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 -#include -#include -#include - -#include "build.h" - -#define IMAGE_FILE_MACHINE_UNKNOWN 0 -#define IMAGE_FILE_MACHINE_I386 0x014c -#define IMAGE_FILE_MACHINE_ALPHA 0x0184 -#define IMAGE_FILE_MACHINE_POWERPC 0x01f0 -#define IMAGE_FILE_MACHINE_AMD64 0x8664 -#define IMAGE_FILE_MACHINE_ARM 0x01C0 - -#define IMAGE_SIZEOF_NT_OPTIONAL32_HEADER 224 -#define IMAGE_SIZEOF_NT_OPTIONAL64_HEADER 240 - -#define IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x10b -#define IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b -#define IMAGE_ROM_OPTIONAL_HDR_MAGIC 0x107 - -/* check if entry point needs a relay thunk */ -static inline int needs_relay( const ORDDEF *odp ) -{ - /* skip nonexistent entry points */ - if (!odp) return 0; - /* skip non-functions */ - if ((odp->type != TYPE_STDCALL) && (odp->type != TYPE_CDECL)) return 0; - /* skip norelay and forward entry points */ - if (odp->flags & (FLAG_NORELAY|FLAG_FORWARD)) return 0; - return 1; -} - -/* check if dll will output relay thunks */ -int has_relays( DLLSPEC *spec ) -{ - int i; - - if (target_cpu != CPU_x86 && target_cpu != CPU_x86_64) return 0; - - for (i = spec->base; i <= spec->limit; i++) - { - ORDDEF *odp = spec->ordinals[i]; - if (needs_relay( odp )) return 1; - } - return 0; -} - -/******************************************************************* - * make_internal_name - * - * Generate an internal name for an entry point. Used for stubs etc. - */ -static const char *make_internal_name( const ORDDEF *odp, DLLSPEC *spec, const char *prefix ) -{ - static char buffer[256]; - if (odp->name || odp->export_name) - { - char *p; - sprintf( buffer, "__wine_%s_%s_%s", prefix, spec->file_name, - odp->name ? odp->name : odp->export_name ); - /* make sure name is a legal C identifier */ - for (p = buffer; *p; p++) if (!isalnum(*p) && *p != '_') break; - if (!*p) return buffer; - } - sprintf( buffer, "__wine_%s_%s_%d", prefix, make_c_identifier(spec->file_name), odp->ordinal ); - return buffer; -} - - -/******************************************************************* - * output_relay_debug - * - * Output entry points for relay debugging - */ -static void output_relay_debug( DLLSPEC *spec ) -{ - int i; - unsigned int j, args, flags; - - /* first the table of entry point offsets */ - - output( "\t%s\n", get_asm_rodata_section() ); - output( "\t.align %d\n", get_alignment(4) ); - output( ".L__wine_spec_relay_entry_point_offsets:\n" ); - - for (i = spec->base; i <= spec->limit; i++) - { - ORDDEF *odp = spec->ordinals[i]; - - if (needs_relay( odp )) - output( "\t.long .L__wine_spec_relay_entry_point_%d-__wine_spec_relay_entry_points\n", i ); - else - output( "\t.long 0\n" ); - } - - /* then the table of argument types */ - - output( "\t.align %d\n", get_alignment(4) ); - output( ".L__wine_spec_relay_arg_types:\n" ); - - for (i = spec->base; i <= spec->limit; i++) - { - ORDDEF *odp = spec->ordinals[i]; - unsigned int mask = 0; - - if (needs_relay( odp )) - { - for (j = 0; j < 16 && odp->u.func.arg_types[j]; j++) - { - if (odp->u.func.arg_types[j] == 't') mask |= 1<< (j*2); - if (odp->u.func.arg_types[j] == 'W') mask |= 2<< (j*2); - } - } - output( "\t.long 0x%08x\n", mask ); - } - - /* then the relay thunks */ - - output( "\t.text\n" ); - output( "__wine_spec_relay_entry_points:\n" ); - output( "\tnop\n" ); /* to avoid 0 offset */ - - for (i = spec->base; i <= spec->limit; i++) - { - ORDDEF *odp = spec->ordinals[i]; - - if (!needs_relay( odp )) continue; - - output( "\t.align %d\n", get_alignment(4) ); - output( ".L__wine_spec_relay_entry_point_%d:\n", i ); - - args = strlen(odp->u.func.arg_types); - flags = 0; - - switch (target_cpu) - { - case CPU_x86: - if (odp->flags & FLAG_REGISTER) - output( "\tpushl %%eax\n" ); - else - output( "\tpushl %%esp\n" ); - - if (odp->flags & FLAG_RET64) flags |= 1; - output( "\tpushl $%u\n", (flags << 24) | (args << 16) | (i - spec->base) ); - - if (UsePIC) - { - output( "\tcall %s\n", asm_name("__wine_spec_get_pc_thunk_eax") ); - output( "1:\tleal .L__wine_spec_relay_descr-1b(%%eax),%%eax\n" ); - } - else output( "\tmovl $.L__wine_spec_relay_descr,%%eax\n" ); - output( "\tpushl %%eax\n" ); - - if (odp->flags & FLAG_REGISTER) - { - output( "\tcall *8(%%eax)\n" ); - } - else - { - output( "\tcall *4(%%eax)\n" ); - if (odp->type == TYPE_STDCALL) - output( "\tret $%u\n", args * get_ptr_size() ); - else - output( "\tret\n" ); - } - break; - - case CPU_x86_64: - output( "\t.cfi_startproc\n" ); - output( "\tsubq $40,%%rsp\n" ); - output( "\t.cfi_adjust_cfa_offset 40\n" ); - output( "\tmovq %%rcx,48(%%rsp)\n" ); - output( "\tmovq %%rdx,56(%%rsp)\n" ); - output( "\tmovq %%r8,64(%%rsp)\n" ); - output( "\tmovq %%r9,72(%%rsp)\n" ); - output( "\tleaq 40(%%rsp),%%r8\n" ); - output( "\tmovq $%u,%%rdx\n", (flags << 24) | (args << 16) | (i - spec->base) ); - output( "\tleaq .L__wine_spec_relay_descr(%%rip),%%rcx\n" ); - output( "\tcallq *%u(%%rcx)\n", (odp->flags & FLAG_REGISTER) ? 16 : 8 ); - output( "\taddq $40,%%rsp\n" ); - output( "\t.cfi_adjust_cfa_offset -40\n" ); - output( "\tret\n" ); - output( "\t.cfi_endproc\n" ); - break; - - default: - assert(0); - } - } -} - -/******************************************************************* - * output_exports - * - * Output the export table for a Win32 module. - */ -void output_exports( DLLSPEC *spec ) -{ - int i, fwd_size = 0; - int nr_exports = spec->base <= spec->limit ? spec->limit - spec->base + 1 : 0; - - if (!nr_exports) return; - - output( "\n/* export table */\n\n" ); - output( "\t.data\n" ); - output( "\t.align %d\n", get_alignment(4) ); - output( ".L__wine_spec_exports:\n" ); - - /* export directory header */ - - output( "\t.long 0\n" ); /* Characteristics */ - output( "\t.long 0\n" ); /* TimeDateStamp */ - output( "\t.long 0\n" ); /* MajorVersion/MinorVersion */ - output( "\t.long .L__wine_spec_exp_names-.L__wine_spec_rva_base\n" ); /* Name */ - output( "\t.long %u\n", spec->base ); /* Base */ - output( "\t.long %u\n", nr_exports ); /* NumberOfFunctions */ - output( "\t.long %u\n", spec->nb_names ); /* NumberOfNames */ - output( "\t.long .L__wine_spec_exports_funcs-.L__wine_spec_rva_base\n" ); /* AddressOfFunctions */ - if (spec->nb_names) - { - output( "\t.long .L__wine_spec_exp_name_ptrs-.L__wine_spec_rva_base\n" ); /* AddressOfNames */ - output( "\t.long .L__wine_spec_exp_ordinals-.L__wine_spec_rva_base\n" ); /* AddressOfNameOrdinals */ - } - else - { - output( "\t.long 0\n" ); /* AddressOfNames */ - output( "\t.long 0\n" ); /* AddressOfNameOrdinals */ - } - - /* output the function pointers */ - - output( "\n.L__wine_spec_exports_funcs:\n" ); - for (i = spec->base; i <= spec->limit; i++) - { - ORDDEF *odp = spec->ordinals[i]; - if (!odp) output( "\t%s 0\n", get_asm_ptr_keyword() ); - else switch(odp->type) - { - case TYPE_EXTERN: - case TYPE_STDCALL: - case TYPE_VARARGS: - case TYPE_CDECL: - if (odp->flags & FLAG_FORWARD) - { - output( "\t%s .L__wine_spec_forwards+%u\n", get_asm_ptr_keyword(), fwd_size ); - fwd_size += strlen(odp->link_name) + 1; - } - else if (odp->flags & FLAG_EXT_LINK) - { - output( "\t%s %s_%s\n", - get_asm_ptr_keyword(), asm_name("__wine_spec_ext_link"), odp->link_name ); - } - else - { - output( "\t%s %s\n", get_asm_ptr_keyword(), asm_name(odp->link_name) ); - } - break; - case TYPE_STUB: - output( "\t%s %s\n", get_asm_ptr_keyword(), - asm_name( get_stub_name( odp, spec )) ); - break; - default: - assert(0); - } - } - - if (spec->nb_names) - { - /* output the function name pointers */ - - int namepos = strlen(spec->file_name) + 1; - - output( "\n.L__wine_spec_exp_name_ptrs:\n" ); - for (i = 0; i < spec->nb_names; i++) - { - output( "\t.long .L__wine_spec_exp_names+%u-.L__wine_spec_rva_base\n", namepos ); - namepos += strlen(spec->names[i]->name) + 1; - } - - /* output the function ordinals */ - - output( "\n.L__wine_spec_exp_ordinals:\n" ); - for (i = 0; i < spec->nb_names; i++) - { - output( "\t%s %d\n", - get_asm_short_keyword(), spec->names[i]->ordinal - spec->base ); - } - if (spec->nb_names % 2) - { - output( "\t%s 0\n", get_asm_short_keyword() ); - } - } - - /* output the export name strings */ - - output( "\n.L__wine_spec_exp_names:\n" ); - output( "\t%s \"%s\"\n", get_asm_string_keyword(), spec->file_name ); - for (i = 0; i < spec->nb_names; i++) - output( "\t%s \"%s\"\n", - get_asm_string_keyword(), spec->names[i]->name ); - - /* output forward strings */ - - if (fwd_size) - { - output( "\n.L__wine_spec_forwards:\n" ); - for (i = spec->base; i <= spec->limit; i++) - { - ORDDEF *odp = spec->ordinals[i]; - if (odp && (odp->flags & FLAG_FORWARD)) - output( "\t%s \"%s\"\n", get_asm_string_keyword(), odp->link_name ); - } - } - output( "\t.align %d\n", get_alignment(get_ptr_size()) ); - output( ".L__wine_spec_exports_end:\n" ); - - /* output relays */ - - if (!has_relays( spec )) - { - output( "\t%s 0\n", get_asm_ptr_keyword() ); - return; - } - - output( ".L__wine_spec_relay_descr:\n" ); - output( "\t%s 0xdeb90001\n", get_asm_ptr_keyword() ); /* magic */ - output( "\t%s 0,0\n", get_asm_ptr_keyword() ); /* relay funcs */ - output( "\t%s 0\n", get_asm_ptr_keyword() ); /* private data */ - output( "\t%s __wine_spec_relay_entry_points\n", get_asm_ptr_keyword() ); - output( "\t%s .L__wine_spec_relay_entry_point_offsets\n", get_asm_ptr_keyword() ); - output( "\t%s .L__wine_spec_relay_arg_types\n", get_asm_ptr_keyword() ); - - output_relay_debug( spec ); -} - - -/******************************************************************* - * output_stub_funcs - * - * Output the functions for stub entry points - */ -static void output_stub_funcs( DLLSPEC *spec ) -{ - int i; - -#if 0 - for (i = 0; i < spec->nb_entry_points; i++) - { - ORDDEF *odp = &spec->entry_points[i]; - if (odp->type != TYPE_STUB) continue; - fprintf( outfile, "#ifdef __GNUC__\n" ); - fprintf( outfile, "extern void __wine_spec_unimplemented_stub( const char *module, const char *func ) __attribute__((noreturn));\n" ); - fprintf( outfile, "#else\n" ); - fprintf( outfile, "extern void __wine_spec_unimplemented_stub( const char *module, const char *func );\n" ); - fprintf( outfile, "#endif\n\n" ); - break; - } -#endif - - for (i = 0; i < spec->nb_entry_points; i++) - { - const ORDDEF *odp = &spec->entry_points[i]; - if (odp->type != TYPE_STUB) continue; - output( "void %s(void) ", make_internal_name( odp, spec, "stub" ) ); - if (odp->name) - output( "{ __wine_spec_unimplemented_stub(__wine_spec_file_name, \"%s\"); }\n", odp->name ); - else if (odp->export_name) - output( "{ __wine_spec_unimplemented_stub(__wine_spec_file_name, \"%s\"); }\n", odp->export_name ); - else - output( "{ __wine_spec_unimplemented_stub(__wine_spec_file_name, \"%d\"); }\n", odp->ordinal ); - } -} - - -/******************************************************************* - * output_asm_constructor - * - * Output code for calling a dll constructor. - */ -static void output_asm_constructor( const char *constructor ) -{ - if (target_platform == PLATFORM_APPLE) - { - /* Mach-O doesn't have an init section */ - output( "\n\t.mod_init_func\n" ); - output( "\t.align %d\n", get_alignment(4) ); - output( "\t.long %s\n", asm_name(constructor) ); - } - else - { - output( "\n\t.section \".init\",\"ax\"\n" ); - switch(target_cpu) - { - case CPU_x86: - case CPU_x86_64: - output( "\tcall %s\n", asm_name(constructor) ); - break; - case CPU_SPARC: - output( "\tcall %s\n", asm_name(constructor) ); - output( "\tnop\n" ); - break; - case CPU_ALPHA: - output( "\tjsr $26,%s\n", asm_name(constructor) ); - break; - case CPU_ARM: - output( "\tblx %s\n", asm_name(constructor) ); - break; - case CPU_POWERPC: - output( "\tbl %s\n", asm_name(constructor) ); - break; - } - } -} - - -/******************************************************************* - * output_module - * - * Output the module data. - */ -void output_module( DLLSPEC *spec ) -{ - int machine = 0; - unsigned int page_size = get_page_size(); - - /* Reserve some space for the PE header */ - - switch (target_platform) - { - case PLATFORM_APPLE: - output( "\t.text\n" ); - output( "\t.align %d\n", get_alignment(page_size) ); - output( "__wine_spec_pe_header:\n" ); - output( "\t.space 65536\n" ); - break; - case PLATFORM_SOLARIS: - output( "\n\t.section \".text\",\"ax\"\n" ); - output( "__wine_spec_pe_header:\n" ); - output( "\t.skip %u\n", 65536 + page_size ); - break; - default: - output( "\n\t.section \".init\",\"ax\"\n" ); - switch(target_cpu) - { - case CPU_x86: - case CPU_x86_64: - case CPU_ALPHA: - case CPU_SPARC: - output( "\tjmp 1f\n" ); - break; - case CPU_ARM: - case CPU_POWERPC: - output( "\tb 1f\n" ); - break; - } - output( "__wine_spec_pe_header:\n" ); - output( "\t.skip %u\n", 65536 + page_size ); - output( "1:\n" ); - break; - } - - /* Output the NT header */ - - output( "\n\t.data\n" ); - output( "\t.align %d\n", get_alignment(get_ptr_size()) ); - output( "%s\n", asm_globl("__wine_spec_nt_header") ); - output( ".L__wine_spec_rva_base:\n" ); - - output( "\t.long 0x4550\n" ); /* Signature */ - switch(target_cpu) - { - case CPU_x86: machine = IMAGE_FILE_MACHINE_I386; break; - case CPU_x86_64: machine = IMAGE_FILE_MACHINE_AMD64; break; - case CPU_ARM: machine = IMAGE_FILE_MACHINE_ARM; break; - case CPU_POWERPC: machine = IMAGE_FILE_MACHINE_POWERPC; break; - case CPU_ALPHA: machine = IMAGE_FILE_MACHINE_ALPHA; break; - case CPU_SPARC: machine = IMAGE_FILE_MACHINE_UNKNOWN; break; - } - output( "\t%s 0x%04x\n", /* Machine */ - get_asm_short_keyword(), machine ); - output( "\t%s 0\n", /* NumberOfSections */ - get_asm_short_keyword() ); - output( "\t.long 0\n" ); /* TimeDateStamp */ - output( "\t.long 0\n" ); /* PointerToSymbolTable */ - output( "\t.long 0\n" ); /* NumberOfSymbols */ - output( "\t%s %d\n", /* SizeOfOptionalHeader */ - get_asm_short_keyword(), - get_ptr_size() == 8 ? IMAGE_SIZEOF_NT_OPTIONAL64_HEADER : IMAGE_SIZEOF_NT_OPTIONAL32_HEADER ); - output( "\t%s 0x%04x\n", /* Characteristics */ - get_asm_short_keyword(), spec->characteristics ); - output( "\t%s 0x%04x\n", /* Magic */ - get_asm_short_keyword(), - get_ptr_size() == 8 ? IMAGE_NT_OPTIONAL_HDR64_MAGIC : IMAGE_NT_OPTIONAL_HDR32_MAGIC ); - output( "\t.byte 0\n" ); /* MajorLinkerVersion */ - output( "\t.byte 0\n" ); /* MinorLinkerVersion */ - output( "\t.long 0\n" ); /* SizeOfCode */ - output( "\t.long 0\n" ); /* SizeOfInitializedData */ - output( "\t.long 0\n" ); /* SizeOfUninitializedData */ - /* note: we expand the AddressOfEntryPoint field on 64-bit by overwriting the BaseOfCode field */ - output( "\t%s %s\n", /* AddressOfEntryPoint */ - get_asm_ptr_keyword(), spec->init_func ? asm_name(spec->init_func) : "0" ); - if (get_ptr_size() == 4) - { - output( "\t.long 0\n" ); /* BaseOfCode */ - output( "\t.long 0\n" ); /* BaseOfData */ - } - output( "\t%s __wine_spec_pe_header\n", /* ImageBase */ - get_asm_ptr_keyword() ); - output( "\t.long %u\n", page_size ); /* SectionAlignment */ - output( "\t.long %u\n", page_size ); /* FileAlignment */ - output( "\t%s 1,0\n", /* Major/MinorOperatingSystemVersion */ - get_asm_short_keyword() ); - output( "\t%s 0,0\n", /* Major/MinorImageVersion */ - get_asm_short_keyword() ); - output( "\t%s %u,%u\n", /* Major/MinorSubsystemVersion */ - get_asm_short_keyword(), spec->subsystem_major, spec->subsystem_minor ); - output( "\t.long 0\n" ); /* Win32VersionValue */ - output( "\t.long %s-.L__wine_spec_rva_base\n", /* SizeOfImage */ - asm_name("_end") ); - output( "\t.long %u\n", page_size ); /* SizeOfHeaders */ - output( "\t.long 0\n" ); /* CheckSum */ - output( "\t%s 0x%04x\n", /* Subsystem */ - get_asm_short_keyword(), spec->subsystem ); - output( "\t%s 0x%04x\n", /* DllCharacteristics */ - get_asm_short_keyword(), spec->dll_characteristics ); - output( "\t%s %u,%u\n", /* SizeOfStackReserve/Commit */ - get_asm_ptr_keyword(), (spec->stack_size ? spec->stack_size : 1024) * 1024, page_size ); - output( "\t%s %u,%u\n", /* SizeOfHeapReserve/Commit */ - get_asm_ptr_keyword(), (spec->heap_size ? spec->heap_size : 1024) * 1024, page_size ); - output( "\t.long 0\n" ); /* LoaderFlags */ - output( "\t.long 16\n" ); /* NumberOfRvaAndSizes */ - - if (spec->base <= spec->limit) /* DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT] */ - output( "\t.long .L__wine_spec_exports-.L__wine_spec_rva_base," - ".L__wine_spec_exports_end-.L__wine_spec_exports\n" ); - else - output( "\t.long 0,0\n" ); - - if (has_imports()) /* DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT] */ - output( "\t.long .L__wine_spec_imports-.L__wine_spec_rva_base," - ".L__wine_spec_imports_end-.L__wine_spec_imports\n" ); - else - output( "\t.long 0,0\n" ); - - if (spec->nb_resources) /* DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE] */ - output( "\t.long .L__wine_spec_resources-.L__wine_spec_rva_base," - ".L__wine_spec_resources_end-.L__wine_spec_resources\n" ); - else - output( "\t.long 0,0\n" ); - - output( "\t.long 0,0\n" ); /* DataDirectory[3] */ - output( "\t.long 0,0\n" ); /* DataDirectory[4] */ - output( "\t.long 0,0\n" ); /* DataDirectory[5] */ - output( "\t.long 0,0\n" ); /* DataDirectory[6] */ - output( "\t.long 0,0\n" ); /* DataDirectory[7] */ - output( "\t.long 0,0\n" ); /* DataDirectory[8] */ - output( "\t.long 0,0\n" ); /* DataDirectory[9] */ - output( "\t.long 0,0\n" ); /* DataDirectory[10] */ - output( "\t.long 0,0\n" ); /* DataDirectory[11] */ - output( "\t.long 0,0\n" ); /* DataDirectory[12] */ - output( "\t.long 0,0\n" ); /* DataDirectory[13] */ - output( "\t.long 0,0\n" ); /* DataDirectory[14] */ - output( "\t.long 0,0\n" ); /* DataDirectory[15] */ - - output( "\n\t%s\n", get_asm_string_section() ); - output( "%s\n", asm_globl("__wine_spec_file_name") ); - output( ".L__wine_spec_file_name:\n" ); - output( "\t%s \"%s\"\n", get_asm_string_keyword(), spec->file_name ); - if (target_platform == PLATFORM_APPLE) - output( "\t.lcomm %s,4\n", asm_name("_end") ); - - output_asm_constructor( "__wine_spec_init_ctor" ); -} - - -/******************************************************************* - * BuildSpec32File - * - * Build a Win32 C file from a spec file. - */ -void BuildSpec32File( DLLSPEC *spec ) -{ - resolve_imports( spec ); - output_standard_file_header(); - output_module( spec ); - output_stubs( spec ); - output_exports( spec ); - output_imports( spec ); - output_resources( spec ); - output_gnu_stack_note(); -} - - -/******************************************************************* - * output_fake_module - * - * Build a fake binary module from a spec file. - */ -void output_fake_module( DLLSPEC *spec ) -{ - static const unsigned char dll_code_section[] = { 0x31, 0xc0, /* xor %eax,%eax */ - 0xc2, 0x0c, 0x00 }; /* ret $12 */ - - static const unsigned char exe_code_section[] = { 0xb8, 0x01, 0x00, 0x00, 0x00, /* movl $1,%eax */ - 0xc2, 0x04, 0x00 }; /* ret $4 */ - - static const char fakedll_signature[] = "Wine placeholder DLL"; - const unsigned int page_size = get_page_size(); - const unsigned int section_align = page_size; - const unsigned int file_align = 0x200; - const unsigned int reloc_size = 8; - const unsigned int lfanew = (0x40 + sizeof(fakedll_signature) + 15) & ~15; - const unsigned int nb_sections = 2 + (spec->nb_resources != 0); - const unsigned int text_size = (spec->characteristics & IMAGE_FILE_DLL) ? - sizeof(dll_code_section) : sizeof(exe_code_section); - unsigned char *resources; - unsigned int resources_size; - unsigned int image_size = 3 * section_align; - - resolve_imports( spec ); - output_bin_resources( spec, 3 * section_align ); - resources = output_buffer; - resources_size = output_buffer_pos; - if (resources_size) image_size += (resources_size + section_align - 1) & ~(section_align - 1); - - init_output_buffer(); - - put_word( 0x5a4d ); /* e_magic */ - put_word( 0x40 ); /* e_cblp */ - put_word( 0x01 ); /* e_cp */ - put_word( 0 ); /* e_crlc */ - put_word( lfanew / 16 ); /* e_cparhdr */ - put_word( 0x0000 ); /* e_minalloc */ - put_word( 0xffff ); /* e_maxalloc */ - put_word( 0x0000 ); /* e_ss */ - put_word( 0x00b8 ); /* e_sp */ - put_word( 0 ); /* e_csum */ - put_word( 0 ); /* e_ip */ - put_word( 0 ); /* e_cs */ - put_word( lfanew ); /* e_lfarlc */ - put_word( 0 ); /* e_ovno */ - put_dword( 0 ); /* e_res */ - put_dword( 0 ); - put_word( 0 ); /* e_oemid */ - put_word( 0 ); /* e_oeminfo */ - put_dword( 0 ); /* e_res2 */ - put_dword( 0 ); - put_dword( 0 ); - put_dword( 0 ); - put_dword( 0 ); - put_dword( lfanew ); - - put_data( fakedll_signature, sizeof(fakedll_signature) ); - align_output( 16 ); - - put_dword( 0x4550 ); /* Signature */ - switch(target_cpu) - { - case CPU_x86: put_word( IMAGE_FILE_MACHINE_I386 ); break; - case CPU_x86_64: put_word( IMAGE_FILE_MACHINE_AMD64 ); break; - case CPU_POWERPC: put_word( IMAGE_FILE_MACHINE_POWERPC ); break; - case CPU_ALPHA: put_word( IMAGE_FILE_MACHINE_ALPHA ); break; - case CPU_SPARC: put_word( IMAGE_FILE_MACHINE_UNKNOWN ); break; - case CPU_ARM: put_word( IMAGE_FILE_MACHINE_ARM ); break; - } - put_word( nb_sections ); /* NumberOfSections */ - put_dword( 0 ); /* TimeDateStamp */ - put_dword( 0 ); /* PointerToSymbolTable */ - put_dword( 0 ); /* NumberOfSymbols */ - put_word( get_ptr_size() == 8 ? - IMAGE_SIZEOF_NT_OPTIONAL64_HEADER : - IMAGE_SIZEOF_NT_OPTIONAL32_HEADER ); /* SizeOfOptionalHeader */ - put_word( spec->characteristics ); /* Characteristics */ - put_word( get_ptr_size() == 8 ? - IMAGE_NT_OPTIONAL_HDR64_MAGIC : - IMAGE_NT_OPTIONAL_HDR32_MAGIC ); /* Magic */ - put_byte( 0 ); /* MajorLinkerVersion */ - put_byte( 0 ); /* MinorLinkerVersion */ - put_dword( text_size ); /* SizeOfCode */ - put_dword( 0 ); /* SizeOfInitializedData */ - put_dword( 0 ); /* SizeOfUninitializedData */ - put_dword( section_align ); /* AddressOfEntryPoint */ - put_dword( section_align ); /* BaseOfCode */ - if (get_ptr_size() == 4) put_dword( 0 ); /* BaseOfData */ - put_pword( 0x10000000 ); /* ImageBase */ - put_dword( section_align ); /* SectionAlignment */ - put_dword( file_align ); /* FileAlignment */ - put_word( 1 ); /* MajorOperatingSystemVersion */ - put_word( 0 ); /* MinorOperatingSystemVersion */ - put_word( 0 ); /* MajorImageVersion */ - put_word( 0 ); /* MinorImageVersion */ - put_word( spec->subsystem_major ); /* MajorSubsystemVersion */ - put_word( spec->subsystem_minor ); /* MinorSubsystemVersion */ - put_dword( 0 ); /* Win32VersionValue */ - put_dword( image_size ); /* SizeOfImage */ - put_dword( file_align ); /* SizeOfHeaders */ - put_dword( 0 ); /* CheckSum */ - put_word( spec->subsystem ); /* Subsystem */ - put_word( spec->dll_characteristics ); /* DllCharacteristics */ - put_pword( (spec->stack_size ? spec->stack_size : 1024) * 1024 ); /* SizeOfStackReserve */ - put_pword( page_size ); /* SizeOfStackCommit */ - put_pword( (spec->heap_size ? spec->heap_size : 1024) * 1024 ); /* SizeOfHeapReserve */ - put_pword( page_size ); /* SizeOfHeapCommit */ - put_dword( 0 ); /* LoaderFlags */ - put_dword( 16 ); /* NumberOfRvaAndSizes */ - - put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT] */ - put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT] */ - if (resources_size) /* DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE] */ - { - put_dword( 3 * section_align ); - put_dword( resources_size ); - } - else - { - put_dword( 0 ); - put_dword( 0 ); - } - - put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_EXCEPTION] */ - put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_SECURITY] */ - put_dword( 2 * section_align ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC] */ - put_dword( reloc_size ); - put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_DEBUG] */ - put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_COPYRIGHT] */ - put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_GLOBALPTR] */ - put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_TLS] */ - put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG] */ - put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT] */ - put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_IAT] */ - put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT] */ - put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR] */ - put_dword( 0 ); put_dword( 0 ); /* DataDirectory[15] */ - - /* .text section */ - put_data( ".text\0\0", 8 ); /* Name */ - put_dword( section_align ); /* VirtualSize */ - put_dword( section_align ); /* VirtualAddress */ - put_dword( text_size ); /* SizeOfRawData */ - put_dword( file_align ); /* PointerToRawData */ - put_dword( 0 ); /* PointerToRelocations */ - put_dword( 0 ); /* PointerToLinenumbers */ - put_word( 0 ); /* NumberOfRelocations */ - put_word( 0 ); /* NumberOfLinenumbers */ - put_dword( 0x60000020 /* CNT_CODE|MEM_EXECUTE|MEM_READ */ ); /* Characteristics */ - - /* .reloc section */ - put_data( ".reloc\0", 8 ); /* Name */ - put_dword( section_align ); /* VirtualSize */ - put_dword( 2 * section_align );/* VirtualAddress */ - put_dword( reloc_size ); /* SizeOfRawData */ - put_dword( 2 * file_align ); /* PointerToRawData */ - put_dword( 0 ); /* PointerToRelocations */ - put_dword( 0 ); /* PointerToLinenumbers */ - put_word( 0 ); /* NumberOfRelocations */ - put_word( 0 ); /* NumberOfLinenumbers */ - put_dword( 0x42000040 /* CNT_INITIALIZED_DATA|MEM_DISCARDABLE|MEM_READ */ ); /* Characteristics */ - - /* .rsrc section */ - if (resources_size) - { - put_data( ".rsrc\0\0", 8 ); /* Name */ - put_dword( (resources_size + section_align - 1) & ~(section_align - 1) ); /* VirtualSize */ - put_dword( 3 * section_align );/* VirtualAddress */ - put_dword( resources_size ); /* SizeOfRawData */ - put_dword( 3 * file_align ); /* PointerToRawData */ - put_dword( 0 ); /* PointerToRelocations */ - put_dword( 0 ); /* PointerToLinenumbers */ - put_word( 0 ); /* NumberOfRelocations */ - put_word( 0 ); /* NumberOfLinenumbers */ - put_dword( 0x40000040 /* CNT_INITIALIZED_DATA|MEM_READ */ ); /* Characteristics */ - } - - /* .text contents */ - align_output( file_align ); - if (spec->characteristics & IMAGE_FILE_DLL) - put_data( dll_code_section, sizeof(dll_code_section) ); - else - put_data( exe_code_section, sizeof(exe_code_section) ); - - /* .reloc contents */ - align_output( file_align ); - put_dword( 0 ); /* VirtualAddress */ - put_dword( 0 ); /* SizeOfBlock */ - - /* .rsrc contents */ - if (resources_size) - { - align_output( file_align ); - put_data( resources, resources_size ); - } - flush_output_buffer(); -} - - -/******************************************************************* - * BuildDef32File - * - * Build a Win32 def file from a spec file. - */ -void BuildDef32File( DLLSPEC *spec ) -{ - const char *name; - int i, total; - - if (spec_file_name) - output( "; File generated automatically from %s; do not edit!\n\n", - spec_file_name ); - else - output( "; File generated automatically; do not edit!\n\n" ); - - output( "LIBRARY %s\n\n", spec->file_name); - output( "EXPORTS\n"); - - /* Output the exports and relay entry points */ - - for (i = total = 0; i < spec->nb_entry_points; i++) - { - const ORDDEF *odp = &spec->entry_points[i]; - int is_data = 0; - - if (!odp) continue; - - if (odp->name) name = odp->name; - else if (odp->export_name) name = odp->export_name; - else continue; - - if (!(odp->flags & FLAG_PRIVATE)) total++; - - switch(odp->type) - { - case TYPE_EXTERN: - is_data = 1; - /* fall through */ - case TYPE_VARARGS: - case TYPE_CDECL: - /* try to reduce output */ - output( " %s", name ); - if(strcmp(name, odp->link_name) || (odp->flags & FLAG_FORWARD)) - output( "=%s", odp->link_name ); - break; - case TYPE_STDCALL: - { - int at_param = strlen(odp->u.func.arg_types) * get_ptr_size(); - output( " %s", name ); - if (!kill_at && target_cpu == CPU_x86) output( "@%d", at_param ); - if (odp->flags & FLAG_FORWARD) - { - output( "=%s", odp->link_name ); - } - else if (strcmp(name, odp->link_name)) /* try to reduce output */ - { - output( "=%s", odp->link_name ); - if (!kill_at && target_cpu == CPU_x86) output( "@%d", at_param ); - } - break; - } - case TYPE_FASTCALL: - { - int at_param = strlen(odp->u.func.arg_types) * get_ptr_size(); - output( " " ); - if (!kill_at) output( "@" ); - output( "%s", name ); - if (!kill_at) output( "@%d", at_param ); - if (odp->flags & FLAG_FORWARD) - { - output( "=" ); - output( "%s", odp->link_name ); - } - else if (strcmp(name, odp->link_name)) /* try to reduce output */ - { - output( "=" ); - if (!kill_at) output( "@" ); - output( "%s", odp->link_name ); - if (!kill_at) output( "@%d", at_param ); - } - break; - } - case TYPE_STUB: - { - output( " %s", name ); - if (!kill_at) - { - const char *check = name + strlen(name); - while (name != check && - '0' <= check[-1] && check[-1] <= '9') - { - check--; - } - if (name != check && check != name + strlen(name) && - '@' == check[-1]) - { - output("%s", check - 1); - } - } - if (odp->name || odp->export_name) - { - output("=%s", make_internal_name( odp, spec, "stub" )); - } - break; - } - default: - assert(0); - } - output( " @%d", odp->ordinal ); - if (!odp->name || (odp->flags & FLAG_ORDINAL)) output( " NONAME" ); - if (is_data) output( " DATA" ); - if (odp->flags & FLAG_PRIVATE) output( " PRIVATE" ); - output( "\n" ); - } - if (!total) warning( "%s: Import library doesn't export anything\n", spec->file_name ); -} - - -/******************************************************************* - * BuildPedllFile - * - * Build a PE DLL C file from a spec file. - */ -void BuildPedllFile( DLLSPEC *spec ) -{ - int i, has_stubs = 0; - - output_standard_file_header(); - - for (i = 0; i < spec->nb_entry_points; i++) - { - const ORDDEF *odp = &spec->entry_points[i]; - if (odp->type == TYPE_STUB) - { - has_stubs = 1; - break; - } - } - - if (!has_stubs) - { - output( "/* This file is intentionally left blank */\n"); - return; - } - - output( "#include \n"); - output( "#include \"windef.h\"\n"); - output( "#include \"winbase.h\"\n"); - output( "#include \"wine/config.h\"\n"); - output( "#include \"wine/exception.h\"\n\n"); - - output( "void __wine_spec_unimplemented_stub( const char *module, const char *function )\n"); - output( "{\n"); - output( " ULONG_PTR args[2];\n"); - output( "\n"); - output( " args[0] = (ULONG_PTR)module;\n"); - output( " args[1] = (ULONG_PTR)function;\n"); - output( " RaiseException( EXCEPTION_WINE_STUB, EH_NONCONTINUABLE, 2, args );\n"); - output( "}\n\n"); - - output( "static const char __wine_spec_file_name[] = \"%s\";\n\n", spec->file_name ); - - /* Output the stub functions */ - output_stub_funcs( spec ); -} diff --git a/reactos/tools/winebuild/utils.c b/reactos/tools/winebuild/utils.c deleted file mode 100644 index c0b93710e6c..00000000000 --- a/reactos/tools/winebuild/utils.c +++ /dev/null @@ -1,995 +0,0 @@ -/* - * Small utility functions for winebuild - * - * 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 - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include -#include -#include -#ifdef HAVE_UNISTD_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef HAVE_SYS_MMAN_H -#include -#endif - -#include "build.h" - -#define MAX_TMP_FILES 8 -static const char *tmp_files[MAX_TMP_FILES]; -static unsigned int nb_tmp_files; - -static const struct -{ - const char *name; - enum target_cpu cpu; -} cpu_names[] = -{ - { "i386", CPU_x86 }, - { "i486", CPU_x86 }, - { "i586", CPU_x86 }, - { "i686", CPU_x86 }, - { "i786", CPU_x86 }, - { "x86_64", CPU_x86_64 }, - { "sparc", CPU_SPARC }, - { "alpha", CPU_ALPHA }, - { "powerpc", CPU_POWERPC }, - { "arm", CPU_ARM } -}; - -/* atexit handler to clean tmp files */ -static void cleanup_tmp_files(void) -{ - unsigned int i; - for (i = 0; i < MAX_TMP_FILES; i++) if (tmp_files[i]) unlink( tmp_files[i] ); -} - - -void *xmalloc (size_t size) -{ - void *res; - - res = malloc (size ? size : 1); - if (res == NULL) - { - fprintf (stderr, "Virtual memory exhausted.\n"); - exit (1); - } - return res; -} - -void *xrealloc (void *ptr, size_t size) -{ - void *res = realloc (ptr, size); - if (size && res == NULL) - { - fprintf (stderr, "Virtual memory exhausted.\n"); - exit (1); - } - return res; -} - -char *xstrdup( const char *str ) -{ - char *res = strdup( str ); - if (!res) - { - fprintf (stderr, "Virtual memory exhausted.\n"); - exit (1); - } - return res; -} - -char *strupper(char *s) -{ - char *p; - for (p = s; *p; p++) *p = toupper(*p); - return s; -} - -int strendswith(const char* str, const char* end) -{ - int l = strlen(str); - int m = strlen(end); - return l >= m && strcmp(str + l - m, end) == 0; -} - -void fatal_error( const char *msg, ... ) -{ - va_list valist; - va_start( valist, msg ); - if (input_file_name) - { - fprintf( stderr, "%s:", input_file_name ); - if (current_line) - fprintf( stderr, "%d:", current_line ); - fputc( ' ', stderr ); - } - else fprintf( stderr, "winebuild: " ); - vfprintf( stderr, msg, valist ); - va_end( valist ); - exit(1); -} - -void fatal_perror( const char *msg, ... ) -{ - va_list valist; - va_start( valist, msg ); - if (input_file_name) - { - fprintf( stderr, "%s:", input_file_name ); - if (current_line) - fprintf( stderr, "%d:", current_line ); - fputc( ' ', stderr ); - } - vfprintf( stderr, msg, valist ); - perror( " " ); - va_end( valist ); - exit(1); -} - -void error( const char *msg, ... ) -{ - va_list valist; - va_start( valist, msg ); - if (input_file_name) - { - fprintf( stderr, "%s:", input_file_name ); - if (current_line) - fprintf( stderr, "%d:", current_line ); - fputc( ' ', stderr ); - } - vfprintf( stderr, msg, valist ); - va_end( valist ); - nb_errors++; -} - -void warning( const char *msg, ... ) -{ - va_list valist; - - if (!display_warnings) return; - va_start( valist, msg ); - if (input_file_name) - { - fprintf( stderr, "%s:", input_file_name ); - if (current_line) - fprintf( stderr, "%d:", current_line ); - fputc( ' ', stderr ); - } - fprintf( stderr, "warning: " ); - vfprintf( stderr, msg, valist ); - va_end( valist ); -} - -int output( const char *format, ... ) -{ - int ret; - va_list valist; - - va_start( valist, format ); - ret = vfprintf( output_file, format, valist ); - va_end( valist ); - if (ret < 0) fatal_perror( "Output error" ); - return ret; -} - -/* find a build tool in the path, trying the various names */ -static char *find_tool( const char * const *names ) -{ - static char **dirs; - static unsigned int count, maxlen; - - char *p, *file; - unsigned int i, len; - struct stat st; - - if (!dirs) - { - char *path; - - /* split the path in directories */ - - if (!getenv( "PATH" )) return NULL; - path = xstrdup( getenv( "PATH" )); - for (p = path, count = 2; *p; p++) if (*p == ':') count++; - dirs = xmalloc( count * sizeof(*dirs) ); - count = 0; - dirs[count++] = p = path; - while (*p) - { - while (*p && *p != ':') p++; - if (!*p) break; - *p++ = 0; - dirs[count++] = p; - } - for (i = 0; i < count; i++) maxlen = max( maxlen, strlen(dirs[i])+2 ); - } - - while (*names) - { - len = strlen(*names) + sizeof(EXEEXT) + 1; - file = xmalloc( maxlen + len ); - - for (i = 0; i < count; i++) - { - strcpy( file, dirs[i] ); - p = file + strlen(file); - if (p == file) *p++ = '.'; - if (p[-1] != '/') *p++ = '/'; - strcpy( p, *names ); - strcat( p, EXEEXT ); - - if (!stat( file, &st ) && S_ISREG(st.st_mode) && (st.st_mode & 0111)) return file; - } - free( file ); - names++; - } - return NULL; -} - -const char *get_as_command(void) -{ - if (!as_command) - { - if (target_alias) - { - as_command = xmalloc( strlen(target_alias) + sizeof("-as") ); - strcpy( as_command, target_alias ); - strcat( as_command, "-as" ); - } - else - { - static const char * const commands[] = { "gas", "as", NULL }; - if (!(as_command = find_tool( commands ))) as_command = xstrdup("as"); - } - - if (force_pointer_size) - { - const char *args = (target_platform == PLATFORM_APPLE) ? - ((force_pointer_size == 8) ? " -arch x86_64" : " -arch i386") : - ((force_pointer_size == 8) ? " --64" : " --32"); - as_command = xrealloc( as_command, strlen(as_command) + strlen(args) + 1 ); - strcat( as_command, args ); - } - } - return as_command; -} - -const char *get_ld_command(void) -{ - if (!ld_command) - { - if (target_alias) - { - ld_command = xmalloc( strlen(target_alias) + sizeof("-ld") ); - strcpy( ld_command, target_alias ); - strcat( ld_command, "-ld" ); - } - else - { - static const char * const commands[] = { "ld", "gld", NULL }; - if (!(ld_command = find_tool( commands ))) ld_command = xstrdup("ld"); - } - - if (force_pointer_size) - { - const char *args; - - switch (target_platform) - { - case PLATFORM_APPLE: - args = (force_pointer_size == 8) ? " -arch x86_64" : " -arch i386"; - break; - case PLATFORM_FREEBSD: - args = (force_pointer_size == 8) ? " -m elf_x86_64" : " -m elf_i386_fbsd"; - break; - default: - args = (force_pointer_size == 8) ? " -m elf_x86_64" : " -m elf_i386"; - break; - } - ld_command = xrealloc( ld_command, strlen(ld_command) + strlen(args) + 1 ); - strcat( ld_command, args ); - } - } - return ld_command; -} - -const char *get_nm_command(void) -{ - if (!nm_command) - { - if (target_alias) - { - nm_command = xmalloc( strlen(target_alias) + sizeof("-nm") ); - strcpy( nm_command, target_alias ); - strcat( nm_command, "-nm" ); - } - else - { - static const char * const commands[] = { "nm", "gnm", NULL }; - if (!(nm_command = find_tool( commands ))) nm_command = xstrdup("nm"); - } - } - return nm_command; -} - -const char *get_windres_command(void) -{ - static char *windres_command; - - if (!windres_command) - { - if (target_alias) - { - windres_command = xmalloc( strlen(target_alias) + sizeof("-windres") ); - strcpy( windres_command, target_alias ); - strcat( windres_command, "-windres" ); - } - else - { - static const char * const commands[] = { "windres", NULL }; - if (!(windres_command = find_tool( commands ))) windres_command = xstrdup("windres"); - } - } - return windres_command; -} - -/* get a name for a temp file, automatically cleaned up on exit */ -char *get_temp_file_name( const char *prefix, const char *suffix ) -{ - char *name; - const char *ext; - int fd; - - assert( nb_tmp_files < MAX_TMP_FILES ); - if (!nb_tmp_files && !save_temps) atexit( cleanup_tmp_files ); - - if (!prefix || !prefix[0]) prefix = "winebuild"; - if (!suffix) suffix = ""; - if (!(ext = strchr( prefix, '.' ))) ext = prefix + strlen(prefix); - name = xmalloc( sizeof("/tmp/") + (ext - prefix) + sizeof(".XXXXXX") + strlen(suffix) ); - strcpy( name, "/tmp/" ); - memcpy( name + 5, prefix, ext - prefix ); - strcpy( name + 5 + (ext - prefix), ".XXXXXX" ); - strcat( name, suffix ); - - /* first try without the /tmp/ prefix */ - if ((fd = mkstemps( name + 5, strlen(suffix) )) != -1) - name += 5; - else if ((fd = mkstemps( name, strlen(suffix) )) == -1) - fatal_error( "could not generate a temp file\n" ); - - close( fd ); - tmp_files[nb_tmp_files++] = name; - return name; -} - -/******************************************************************* - * buffer management - * - * Function for reading from/writing to a memory buffer. - */ - -int byte_swapped = 0; -const char *input_buffer_filename; -const unsigned char *input_buffer; -size_t input_buffer_pos; -size_t input_buffer_size; -unsigned char *output_buffer; -size_t output_buffer_pos; -size_t output_buffer_size; - -static void check_output_buffer_space( size_t size ) -{ - if (output_buffer_pos + size >= output_buffer_size) - { - output_buffer_size = max( output_buffer_size * 2, output_buffer_pos + size ); - output_buffer = xrealloc( output_buffer, output_buffer_size ); - } -} - -void init_input_buffer( const char *file ) -{ - int fd; - struct stat st; - - if ((fd = open( file, O_RDONLY | O_BINARY )) == -1) fatal_perror( "Cannot open %s", file ); - if ((fstat( fd, &st ) == -1)) fatal_perror( "Cannot stat %s", file ); - if (!st.st_size) fatal_error( "%s is an empty file\n", file ); -#ifdef HAVE_MMAP - if ((input_buffer = mmap( NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0 )) == (void*)-1) -#endif - { - unsigned char *buffer = xmalloc( st.st_size ); - if (read( fd, buffer, st.st_size ) != st.st_size) fatal_error( "Cannot read %s\n", file ); - input_buffer = buffer; - } - close( fd ); - input_buffer_filename = xstrdup( file ); - input_buffer_size = st.st_size; - input_buffer_pos = 0; - byte_swapped = 0; -} - -void init_output_buffer(void) -{ - output_buffer_size = 1024; - output_buffer_pos = 0; - output_buffer = xmalloc( output_buffer_size ); -} - -void flush_output_buffer(void) -{ - if (fwrite( output_buffer, 1, output_buffer_pos, output_file ) != output_buffer_pos) - fatal_error( "Error writing to %s\n", output_file_name ); - free( output_buffer ); -} - -unsigned char get_byte(void) -{ - if (input_buffer_pos >= input_buffer_size) - fatal_error( "%s is a truncated file\n", input_buffer_filename ); - return input_buffer[input_buffer_pos++]; -} - -unsigned short get_word(void) -{ - unsigned short ret; - - if (input_buffer_pos + sizeof(ret) > input_buffer_size) - fatal_error( "%s is a truncated file\n", input_buffer_filename ); - memcpy( &ret, input_buffer + input_buffer_pos, sizeof(ret) ); - if (byte_swapped) ret = (ret << 8) | (ret >> 8); - input_buffer_pos += sizeof(ret); - return ret; -} - -unsigned int get_dword(void) -{ - unsigned int ret; - - if (input_buffer_pos + sizeof(ret) > input_buffer_size) - fatal_error( "%s is a truncated file\n", input_buffer_filename ); - memcpy( &ret, input_buffer + input_buffer_pos, sizeof(ret) ); - if (byte_swapped) - ret = ((ret << 24) | ((ret << 8) & 0x00ff0000) | ((ret >> 8) & 0x0000ff00) | (ret >> 24)); - input_buffer_pos += sizeof(ret); - return ret; -} - -void put_data( const void *data, size_t size ) -{ - check_output_buffer_space( size ); - memcpy( output_buffer + output_buffer_pos, data, size ); - output_buffer_pos += size; -} - -void put_byte( unsigned char val ) -{ - check_output_buffer_space( 1 ); - output_buffer[output_buffer_pos++] = val; -} - -void put_word( unsigned short val ) -{ - if (byte_swapped) val = (val << 8) | (val >> 8); - put_data( &val, sizeof(val) ); -} - -void put_dword( unsigned int val ) -{ - if (byte_swapped) - val = ((val << 24) | ((val << 8) & 0x00ff0000) | ((val >> 8) & 0x0000ff00) | (val >> 24)); - put_data( &val, sizeof(val) ); -} - -void put_qword( unsigned int val ) -{ - if (byte_swapped) - { - put_dword( 0 ); - put_dword( val ); - } - else - { - put_dword( val ); - put_dword( 0 ); - } -} - -/* pointer-sized word */ -void put_pword( unsigned int val ) -{ - if (get_ptr_size() == 8) put_qword( val ); - else put_dword( val ); -} - -void align_output( unsigned int align ) -{ - size_t size = align - (output_buffer_pos % align); - - if (size == align) return; - check_output_buffer_space( size ); - memset( output_buffer + output_buffer_pos, 0, size ); - output_buffer_pos += size; -} - -/* output a standard header for generated files */ -void output_standard_file_header(void) -{ - if (spec_file_name) - output( "/* File generated automatically from %s; do not edit! */\n", spec_file_name ); - else - output( "/* File generated automatically; do not edit! */\n" ); - output( "/* This file can be copied, modified and distributed without restriction. */\n\n" ); -} - -/* dump a byte stream into the assembly code */ -void dump_bytes( const void *buffer, unsigned int size ) -{ - unsigned int i; - const unsigned char *ptr = buffer; - - if (!size) return; - output( "\t.byte " ); - for (i = 0; i < size - 1; i++, ptr++) - { - if ((i % 16) == 15) output( "0x%02x\n\t.byte ", *ptr ); - else output( "0x%02x,", *ptr ); - } - output( "0x%02x\n", *ptr ); -} - - -/******************************************************************* - * open_input_file - * - * Open a file in the given srcdir and set the input_file_name global variable. - */ -FILE *open_input_file( const char *srcdir, const char *name ) -{ - char *fullname; - FILE *file = fopen( name, "r" ); - - if (!file && srcdir) - { - fullname = xmalloc( strlen(srcdir) + strlen(name) + 2 ); - strcpy( fullname, srcdir ); - strcat( fullname, "/" ); - strcat( fullname, name ); - file = fopen( fullname, "r" ); - } - else fullname = xstrdup( name ); - - if (!file) fatal_error( "Cannot open file '%s'\n", fullname ); - input_file_name = fullname; - current_line = 1; - return file; -} - - -/******************************************************************* - * close_input_file - * - * Close the current input file (must have been opened with open_input_file). - */ -void close_input_file( FILE *file ) -{ - fclose( file ); - free( input_file_name ); - input_file_name = NULL; - current_line = 0; -} - - -/******************************************************************* - * remove_stdcall_decoration - * - * Remove a possible @xx suffix from a function name. - * Return the numerical value of the suffix, or -1 if none. - */ -int remove_stdcall_decoration( char *name ) -{ - char *p, *end = strrchr( name, '@' ); - if (!end || !end[1] || end == name) return -1; - /* make sure all the rest is digits */ - for (p = end + 1; *p; p++) if (!isdigit(*p)) return -1; - *end = 0; - return atoi( end + 1 ); -} - - -/******************************************************************* - * assemble_file - * - * Run a file through the assembler. - */ -void assemble_file( const char *src_file, const char *obj_file ) -{ - const char *prog = get_as_command(); - char *cmd; - int err; - - cmd = xmalloc( strlen(prog) + strlen(obj_file) + strlen(src_file) + 6 ); - sprintf( cmd, "%s -o %s %s", prog, obj_file, src_file ); - if (verbose) fprintf( stderr, "%s\n", cmd ); - err = system( cmd ); - if (err) fatal_error( "%s failed with status %d\n", prog, err ); - free( cmd ); -} - - -/******************************************************************* - * alloc_dll_spec - * - * Create a new dll spec file descriptor - */ -DLLSPEC *alloc_dll_spec(void) -{ - DLLSPEC *spec; - - spec = xmalloc( sizeof(*spec) ); - spec->file_name = NULL; - spec->dll_name = NULL; - spec->init_func = NULL; - spec->main_module = NULL; - spec->type = SPEC_WIN32; - spec->base = MAX_ORDINALS; - spec->limit = 0; - spec->stack_size = 0; - spec->heap_size = 0; - spec->nb_entry_points = 0; - spec->alloc_entry_points = 0; - spec->nb_names = 0; - spec->nb_resources = 0; - spec->characteristics = IMAGE_FILE_EXECUTABLE_IMAGE; - if (get_ptr_size() > 4) - spec->characteristics |= IMAGE_FILE_LARGE_ADDRESS_AWARE; - else - spec->characteristics |= IMAGE_FILE_32BIT_MACHINE; - spec->dll_characteristics = IMAGE_DLLCHARACTERISTICS_NX_COMPAT; - spec->subsystem = 0; - spec->subsystem_major = 4; - spec->subsystem_minor = 0; - spec->entry_points = NULL; - spec->names = NULL; - spec->ordinals = NULL; - spec->resources = NULL; - return spec; -} - - -/******************************************************************* - * free_dll_spec - * - * Free dll spec file descriptor - */ -void free_dll_spec( DLLSPEC *spec ) -{ - int i; - - for (i = 0; i < spec->nb_entry_points; i++) - { - ORDDEF *odp = &spec->entry_points[i]; - free( odp->name ); - free( odp->export_name ); - free( odp->link_name ); - } - free( spec->file_name ); - free( spec->dll_name ); - free( spec->init_func ); - free( spec->entry_points ); - free( spec->names ); - free( spec->ordinals ); - free( spec->resources ); - free( spec ); -} - - -/******************************************************************* - * make_c_identifier - * - * Map a string to a valid C identifier. - */ -const char *make_c_identifier( const char *str ) -{ - static char buffer[256]; - char *p; - - for (p = buffer; *str && p < buffer+sizeof(buffer)-1; p++, str++) - { - if (isalnum(*str)) *p = *str; - else *p = '_'; - } - *p = 0; - return buffer; -} - - -/******************************************************************* - * get_stub_name - * - * Generate an internal name for a stub entry point. - */ -const char *get_stub_name( const ORDDEF *odp, const DLLSPEC *spec ) -{ - static char buffer[256]; - if (odp->name || odp->export_name) - { - char *p; - sprintf( buffer, "__wine_stub_%s", odp->name ? odp->name : odp->export_name ); - /* make sure name is a legal C identifier */ - for (p = buffer; *p; p++) if (!isalnum(*p) && *p != '_') break; - if (!*p) return buffer; - } - sprintf( buffer, "__wine_stub_%s_%d", make_c_identifier(spec->file_name), odp->ordinal ); - return buffer; -} - -/* parse a cpu name and return the corresponding value */ -enum target_cpu get_cpu_from_name( const char *name ) -{ - unsigned int i; - - for (i = 0; i < sizeof(cpu_names)/sizeof(cpu_names[0]); i++) - if (!strcmp( cpu_names[i].name, name )) return cpu_names[i].cpu; - return -1; -} - -/***************************************************************** - * Function: get_alignment - * - * Description: - * According to the info page for gas, the .align directive behaves - * differently on different systems. On some architectures, the - * argument of a .align directive is the number of bytes to pad to, so - * to align on an 8-byte boundary you'd say - * .align 8 - * On other systems, the argument is "the number of low-order zero bits - * that the location counter must have after advancement." So to - * align on an 8-byte boundary you'd say - * .align 3 - * - * The reason gas is written this way is that it's trying to mimick - * native assemblers for the various architectures it runs on. gas - * provides other directives that work consistently across - * architectures, but of course we want to work on all arches with or - * without gas. Hence this function. - * - * - * Parameters: - * align -- the number of bytes to align to. Must be a power of 2. - */ -unsigned int get_alignment(unsigned int align) -{ - unsigned int n; - - assert( !(align & (align - 1)) ); - - switch(target_cpu) - { - case CPU_x86: - case CPU_x86_64: - case CPU_SPARC: - case CPU_ARM: - if (target_platform != PLATFORM_APPLE) return align; - /* fall through */ - case CPU_POWERPC: - case CPU_ALPHA: - n = 0; - while ((1u << n) != align) n++; - return n; - } - /* unreached */ - assert(0); - return 0; -} - -/* return the page size for the target CPU */ -unsigned int get_page_size(void) -{ - switch(target_cpu) - { - case CPU_x86: return 4096; - case CPU_x86_64: return 4096; - case CPU_POWERPC: return 4096; - case CPU_ARM: return 4096; - case CPU_SPARC: return 8192; - case CPU_ALPHA: return 8192; - } - /* unreached */ - assert(0); - return 0; -} - -/* return the size of a pointer on the target CPU */ -unsigned int get_ptr_size(void) -{ - switch(target_cpu) - { - case CPU_x86: - case CPU_POWERPC: - case CPU_SPARC: - case CPU_ALPHA: - case CPU_ARM: - return 4; - case CPU_x86_64: - return 8; - } - /* unreached */ - assert(0); - return 0; -} - -/* return the assembly name for a C symbol */ -const char *asm_name( const char *sym ) -{ - static char buffer[256]; - - switch (target_platform) - { - case PLATFORM_APPLE: - case PLATFORM_WINDOWS: - if (sym[0] == '.' && sym[1] == 'L') return sym; - buffer[0] = '_'; - strcpy( buffer + 1, sym ); - return buffer; - default: - return sym; - } -} - -/* return an assembly function declaration for a C function name */ -const char *func_declaration( const char *func ) -{ - static char buffer[256]; - - switch (target_platform) - { - case PLATFORM_APPLE: - return ""; - case PLATFORM_WINDOWS: - sprintf( buffer, ".def _%s; .scl 2; .type 32; .endef", func ); - break; - default: - switch(target_cpu) - { - case CPU_ARM: - sprintf( buffer, ".type %s,%%function", func ); - break; - default: - sprintf( buffer, ".type %s,@function", func ); - break; - } - break; - } - return buffer; -} - -/* output a size declaration for an assembly function */ -void output_function_size( const char *name ) -{ - switch (target_platform) - { - case PLATFORM_APPLE: - case PLATFORM_WINDOWS: - break; - default: - output( "\t.size %s, .-%s\n", name, name ); - break; - } -} - -/* output the GNU note for non-exec stack */ -void output_gnu_stack_note(void) -{ - switch (target_platform) - { - case PLATFORM_WINDOWS: - case PLATFORM_APPLE: - break; - default: - switch(target_cpu) - { - case CPU_ARM: - output( "\t.section .note.GNU-stack,\"\",%%progbits\n" ); - break; - default: - output( "\t.section .note.GNU-stack,\"\",@progbits\n" ); - break; - } - break; - } -} - -/* return a global symbol declaration for an assembly symbol */ -const char *asm_globl( const char *func ) -{ - static char buffer[256]; - - switch (target_platform) - { - case PLATFORM_APPLE: - sprintf( buffer, "\t.globl _%s\n\t.private_extern _%s\n_%s:", func, func, func ); - return buffer; - case PLATFORM_WINDOWS: - sprintf( buffer, "\t.globl _%s\n_%s:", func, func ); - return buffer; - default: - sprintf( buffer, "\t.globl %s\n\t.hidden %s\n%s:", func, func, func ); - return buffer; - } -} - -const char *get_asm_ptr_keyword(void) -{ - switch(get_ptr_size()) - { - case 4: return ".long"; - case 8: return ".quad"; - } - assert(0); - return NULL; -} - -const char *get_asm_string_keyword(void) -{ - switch (target_platform) - { - case PLATFORM_APPLE: - return ".asciz"; - default: - return ".string"; - } -} - -const char *get_asm_short_keyword(void) -{ - switch (target_platform) - { - default: return ".short"; - } -} - -const char *get_asm_rodata_section(void) -{ - switch (target_platform) - { - case PLATFORM_APPLE: return ".const"; - default: return ".section .rodata"; - } -} - -const char *get_asm_string_section(void) -{ - switch (target_platform) - { - case PLATFORM_APPLE: return ".cstring"; - default: return ".section .rodata"; - } -} diff --git a/reactos/tools/winebuild/winebuild.man.in b/reactos/tools/winebuild/winebuild.man.in deleted file mode 100644 index d41fae7a8c9..00000000000 --- a/reactos/tools/winebuild/winebuild.man.in +++ /dev/null @@ -1,491 +0,0 @@ -.\" -*- nroff -*- -.TH WINEBUILD 1 "October 2005" "@PACKAGE_STRING@" "Wine Developers Manual" -.SH NAME -winebuild \- Wine dll builder -.SH SYNOPSIS -.BI winebuild\ [options]\ [input\ files] -.SH DESCRIPTION -.B winebuild -generates the assembly files that are necessary to build a Wine dll, -which is basically a Win32 dll encapsulated inside a Unix library. -.PP -.B winebuild -has different modes, depending on what kind of file it is asked to -generate. The mode is specified by one of the mode options specified -below. In addition to the mode option, various other command-line -option can be specified, as described in the \fBOPTIONS\fR section. -.SH "MODE OPTIONS" -You have to specify exactly one of the following options, depending on -what you want winebuild to generate. -.TP -.BI \--dll -Build an assembly file from a .spec file (see \fBSPEC FILE SYNTAX\fR -for details), or from a standard Windows .def file. The .spec/.def -file is specified via the -E option. The resulting file must be -assembled and linked to the other object files to build a working Wine -dll. In this mode, the -.I input files -should be the list of all object files that will be linked into the -final dll, to allow -.B winebuild -to get the list of all undefined symbols that need to be imported from -other dlls. -.TP -.BI \--exe -Build an assembly file for an executable. This is basically the same as -the --dll mode except that it doesn't require a .spec/.def file as input, -since an executable need not export functions. Some executables however -do export functions, and for those a .spec/.def file can be specified via -the -E option. The executable is named from the .spec/.def file name if -present, or explicitly through the -F option. The resulting file must be -assembled and linked to the other object files to build a working Wine -executable, and all the other object files must be listed as -.I input files. -.TP -.BI \--def -Build a .def file from a spec file. The .spec file is specified via the --E option. This is used when building dlls with a PE (Win32) compiler. -.TP -.B \--relay16 -Generate the assembly code for the 16-bit relay routines. This is for -Wine internal usage only, you should never need to use this option. -.TP -.B \--relay32 -Generate the assembly code for the 32-bit relay routines. This is for -Wine internal usage only, you should never need to use this option. -.TP -.B \--resources -Generate a .o file containing all the input resources. This is useful -when building with a PE compiler, since the PE binutils cannot handle -multiple resource files as input. For a standard Unix build, the -resource files are automatically included when building the spec file, -so there's no need for an intermediate .o file. -.SH OPTIONS -.TP -.BI \--as-cmd= as-command -Specify the command to use to compile assembly files; the default is -\fBas\fR. -.TP -.BI \-b,\ --target= cpu-manufacturer[-kernel]-os -Specify the target CPU and platform on which the generated code will -be built. The target specification is in the standard autoconf format -as returned by config.sub. -.TP -.BI \-d,\ --delay-lib= name -Set the delayed import mode for the specified library, which must be -one of the libraries imported with the \fB-l\fR option. Delayed mode -means that the library won't be loaded until a function imported from -it is actually called. -.TP -.BI \-D\ symbol -Ignored for compatibility with the C compiler. -.TP -.BI \-e,\ --entry= function -Specify the module entry point function; if not specified, the default -is -.B DllMain -for dlls, and -.B main -for executables (if the standard C -.B main -is not defined, -.B WinMain -is used instead). This is only valid for Win32 modules. -.TP -.BI \-E,\ --export= filename -Specify a .spec file (see \fBSPEC FILE SYNTAX\fR for details), -or a standard Windows .def file that defines the exports -of the DLL or executable that is being built. -.TP -.B \--external-symbols -Allow linking to external symbols directly from the spec -file. Normally symbols exported by a dll have to be defined in the dll -itself; this option makes it possible to use symbols defined in -another Unix library (for symbols defined in another dll, a -.I forward -specification must be used instead). -.TP -.BI \-f\ flags -Ignored for compatibility with the C compiler. -.TP -.B \--fake-module -Create a fake PE module for a dll or exe, instead of the normal -assembly or object file. The PE module contains the resources for the -module, but no executable code. -.TP -.BI \-F,\ --filename= filename -Set the file name of the module. The default is to use the base name -of the spec file (without any extension). -.TP -.B \-h, --help -Display a usage message and exit. -.TP -.BI \-H,\ --heap= size -Specify the size of the module local heap in bytes (only valid for -Win16 modules); default is no local heap. -.TP -.BI \-i,\ --ignore= [-]symbol[,[-]symbol] -Specify a list of symbols that should be ignored when resolving -undefined symbols against the imported libraries. This forces these -symbols to be resolved from the Unix C library (or from another Unix -library linked with the application). If a symbol is prefixed by '-' -it is removed from the list instead of being added; a stand-alone '-' -clears the whole list. -.TP -.BI \-I\ directory -Ignored for compatibility with the C compiler. -.TP -.B \-k, --kill-at -Remove the stdcall decorations from the symbol names in the -generated .def file. Only meaningful in \fB--def\fR mode. -.TP -.BI \-K\ flags -Ignored for compatibility with the C compiler. -.TP -.BI \--large-address-aware -Set a flag in the executable to notify the loader that this -application supports address spaces larger than 2 gigabytes. -.TP -.BI \--ld-cmd= ld-command -Specify the command to use to link the object files; the default is -\fBld\fR. -.TP -.BI \-L,\ --library-path= directory -Append the specified directory to the list of directories that are -searched for import libraries. -.TP -.BI \-l,\ --library= name -Import the specified library, looking for a corresponding -\fIlibname.def\fR file in the directories specified with the \fB-L\fR -option. -.TP -.B \-m32, -m64 -Generate 32-bit, respectively 64-bit code. -.TP -.BI \-M,\ --main-module= module -Specify that we are building a 16-bit dll, that will ultimately be -linked together with the 32-bit dll specified in \fImodule\fR. Only -meaningful in \fB--dll\fR mode. -.TP -.BI \-N,\ --dll-name= dllname -Set the internal name of the module. It is only used in Win16 -modules. The default is to use the base name of the spec file (without -any extension). This is used for KERNEL, since it lives in -KRNL386.EXE. It shouldn't be needed otherwise. -.TP -.BI \--nm-cmd= nm-command -Specify the command to use to get the list of undefined symbols; the -default is \fBnm\fR. -.TP -.BI --nxcompat= yes|no -Specify whether the module is compatible with no-exec support. The -default is yes. -.TP -.BI \-o,\ --output= file -Set the name of the output file (default is standard output). If the -output file name end in \fB.o\fR, the text output is sent to a -temporary file that is then assembled to produce the specified .o -file. -.TP -.BI \-r,\ --res= rsrc.res -Load resources from the specified binary resource file. The -\fIrsrc.res\fR file can be produced from a source resource file with -.BR wrc(1) -(or with a Windows resource compiler). -.br -This option is only necessary for Win16 resource files, the Win32 ones -can simply listed as -.I input files -and will automatically be handled correctly (though the -.B \-r -option will also work for Win32 files). -.TP -.B --save-temps -Do not delete the various temporary files that \fBwinebuild\fR generates. -.TP -.BI --subsystem= subsystem[:major[.minor]] -Set the subsystem of the executable, which can be one of the following: -.br -.B console -for a command line executable, -.br -.B windows -for a graphical executable, -.br -.B native -for a native-mode dll, -.br -.B win16 -for a 16-bit module. -.br -The entry point of a command line executable is a normal C \fBmain\fR -function. A \fBwmain\fR function can be used instead if you need the -argument array to use Unicode strings. A graphical executable has a -\fBWinMain\fR entry point. -.br -Optionally a major and minor subsystem version can also be specified; -the default subsystem version is 4.0. -.TP -.BI \-u,\ --undefined= symbol -Add \fIsymbol\fR to the list of undefined symbols when invoking the -linker. This makes it possible to force a specific module of a static -library to be included when resolving imports. -.TP -.B \-v, --verbose -Display the various subcommands being invoked by -.B winebuild. -.TP -.B \--version -Display the program version and exit. -.TP -.B \-w, --warnings -Turn on warnings. -.SH "SPEC FILE SYNTAX" -.SS "General syntax" -A spec file should contain a list of ordinal declarations. The general -syntax is the following: -.PP -.I ordinal functype -.RI [ flags ]\ exportname \ \fB(\fR\ [ args... ] \ \fB) \ [ handler ] -.br -.IB ordinal\ variable -.RI [ flags ]\ exportname \ \fB(\fR\ [ data... ] \ \fB) -.br -.IB ordinal\ extern -.RI [ flags ]\ exportname \ [ symbolname ] -.br -.IB ordinal\ stub -.RI [ flags ]\ exportname -.br -.IB ordinal\ equate -.RI [ flags ]\ exportname\ data -.br -.BI #\ comments -.PP -Declarations must fit on a single line, except if the end of line is -escaped using a backslash character. The -.B # -character anywhere in a line causes the rest of the line to be ignored -as a comment. -.PP -.I ordinal -specifies the ordinal number corresponding to the entry point, or '@' -for automatic ordinal allocation (Win32 only). -.PP -.I flags -is a series of optional flags, preceded by a '-' character. The -supported flags are: -.RS -.TP -.B -norelay -The entry point is not displayed in relay debugging traces (Win32 -only). -.TP -.B -noname -The entry point will be exported by ordinal instead of by name. The -name is still available for importing. -.TP -.B -ret16 -The function returns a 16-bit value (Win16 only). -.TP -.B -ret64 -The function returns a 64-bit value (Win32 only). -.TP -.B -register -The function uses CPU register to pass arguments. -.TP -.B -private -The function cannot be imported from other dlls, it can only be -accessed through GetProcAddress. -.TP -.B -ordinal -The entry point will be imported by ordinal instead of by name. The -name is still exported. -.TP -.BI -arch= cpu[,cpu] -The entry point is only available on the specified CPU architecture(s). -.SS "Function ordinals" -Syntax: -.br -.I ordinal functype -.RI [ flags ]\ exportname \ \fB(\fR\ [ args... ] \ \fB) \ [ handler ] -.br - -This declaration defines a function entry point. The prototype defined by -.IR exportname \ \fB(\fR\ [ args... ] \ \fB) -specifies the name available for dynamic linking and the format of the -arguments. '@' can be used instead of -.I exportname -for ordinal-only exports. -.PP -.I functype -should be one of: -.RS -.TP -.B stdcall -for a normal Win32 function -.TP -.B pascal -for a normal Win16 function -.TP -.B cdecl -for a Win16 or Win32 function using the C calling convention -.TP -.B varargs -for a Win16 or Win32 function using the C calling convention with a -variable number of arguments -.RE -.PP -.I args -should be one or several of: -.RS -.TP -.B word -(16-bit unsigned value) -.TP -.B s_word -(16-bit signed word) -.TP -.B long -(32-bit value) -.TP -.B double -(64-bit value) -.TP -.B ptr -(linear pointer) -.TP -.B str -(linear pointer to a null-terminated ASCII string) -.TP -.B wstr -(linear pointer to a null-terminated Unicode string) -.TP -.B segptr -(segmented pointer) -.TP -.B segstr -(segmented pointer to a null-terminated ASCII string). -.HP -.RB Only\ ptr ,\ str ,\ wstr ,\ long\ and\ double -are valid for Win32 functions. -.RE -.PP -.I handler -is the name of the actual C function that will implement that entry -point in 32-bit mode. The handler can also be specified as -.IB dllname . function -to define a forwarded function (one whose implementation is in another -dll). If -.I handler -is not specified, it is assumed to be identical to -.I exportname. -.PP -This first example defines an entry point for the 32-bit GetFocus() -call: -.IP -@ stdcall GetFocus() GetFocus -.PP -This second example defines an entry point for the 16-bit -CreateWindow() call (the ordinal 100 is just an example); it also -shows how long lines can be split using a backslash: -.IP -100 pascal CreateWindow(ptr ptr long s_word s_word s_word \\ - s_word word word word ptr) WIN_CreateWindow -.PP -To declare a function using a variable number of arguments, specify -the function as -.B varargs -and declare it in the C file with a '...' parameter for a Win32 -function, or with an extra VA_LIST16 argument for a Win16 function. -See the wsprintf* functions in user.exe.spec and user32.spec for an -example. -.SS "Variable ordinals" -Syntax: -.br -.IB ordinal\ variable -.RI [ flags ]\ exportname \ \fB(\fR\ [ data... ] \ \fB) -.PP -This declaration defines data storage as 32-bit words at the ordinal -specified. -.I exportname -will be the name available for dynamic -linking. -.I data -can be a decimal number or a hex number preceded by "0x". The -following example defines the variable VariableA at ordinal 2 and -containing 4 ints: -.IP -2 variable VariableA(-1 0xff 0 0) -.PP -This declaration only works in Win16 spec files. In Win32 you should -use -.B extern -instead (see below). -.SS "Extern ordinals" -Syntax: -.br -.IB ordinal\ extern -.RI [ flags ]\ exportname \ [ symbolname ] -.PP -This declaration defines an entry that simply maps to a C symbol -(variable or function). It only works in Win32 spec files. -.I exportname -will point to the symbol -.I symbolname -that must be defined in the C code. Alternatively, it can be of the -form -.IB dllname . symbolname -to define a forwarded symbol (one whose implementation is in another -dll). If -.I symbolname -is not specified, it is assumed to be identical to -.I exportname. -.SS "Stub ordinals" -Syntax: -.br -.IB ordinal\ stub -.RI [ flags ]\ exportname -.PP -This declaration defines a stub function. It makes the name and -ordinal available for dynamic linking, but will terminate execution -with an error message if the function is ever called. -.SS "Equate ordinals" -Syntax: -.br -.IB ordinal\ equate -.RI [ flags ]\ exportname\ data -.PP -This declaration defines an ordinal as an absolute value. -.I exportname -will be the name available for dynamic linking. -.I data -can be a decimal number or a hex number preceded by "0x". -.SH AUTHORS -.B winebuild -has been worked on by many people over the years. The main authors are -Robert J. Amstadt, Alexandre Julliard, Martin von Loewis, Ulrich -Weigand and Eric Youngdale. Many other Wine developers have -contributed, please check the file Changelog in the Wine distribution -for the complete details. -.SH BUGS -It is not yet possible to use a PE-format dll in an import -specification; only Wine dlls can be imported. -.PP -If you find a bug, please submit a bug report at -.UR http://bugs.winehq.org -.B http://bugs.winehq.org. -.UE -.SH AVAILABILITY -.B winebuild -is part of the wine distribution, which is available through WineHQ, -the -.B wine -development headquarters, at -.UR http://www.winehq.org/ -.B http://www.winehq.org/. -.UE -.SH "SEE ALSO" -.BR wine (1), -.BR winegcc (1), -.BR wrc (1). diff --git a/reactos/tools/winebuild/winebuild.rbuild b/reactos/tools/winebuild/winebuild.rbuild deleted file mode 100644 index a8862149e29..00000000000 --- a/reactos/tools/winebuild/winebuild.rbuild +++ /dev/null @@ -1,14 +0,0 @@ - - - - import.c - main.c - parser.c - relay.c - res16.c - res32.c - spec16.c - spec32.c - utils.c - mkstemps.c - diff --git a/reactos/tools/wmc/CHANGES b/reactos/tools/wmc/CHANGES deleted file mode 100644 index bec49ca4521..00000000000 --- a/reactos/tools/wmc/CHANGES +++ /dev/null @@ -1,5 +0,0 @@ ---------------------------------------------------------------------------- -Version 1.0.0 (12-Jun-2000) - -Bertho Stultiens -- Initial release diff --git a/reactos/tools/wmc/CMakeLists.txt b/reactos/tools/wmc/CMakeLists.txt deleted file mode 100644 index 565a275b71e..00000000000 --- a/reactos/tools/wmc/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ - -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/reactos/tools/wmc/lang.c b/reactos/tools/wmc/lang.c deleted file mode 100644 index b045612bb65..00000000000 --- a/reactos/tools/wmc/lang.c +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Wine Message Compiler language and codepage support - * - * 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 - */ -#include -#include -#include -#include - -#include "wmc.h" -#include "lang.h" - - -/* - * Languages supported - * - * MUST be sorting ascending on language ID - */ -static const language_t languages[] = { - - {0x0000, 437, 1252, "Neutral", NULL}, - {0x0002, 866, 1251, "Bulgarian", NULL}, - {0x0003, 850, 1252, "Catalan", NULL}, - {0x0005, 852, 1250, "Czech", NULL}, - {0x0006, 850, 1252, "Danish", NULL}, - {0x0007, 850, 1252, "German", NULL}, - {0x0008, 737, 1253, "Greek", NULL}, - {0x0009, 437, 1252, "English", NULL}, - {0x000A, 850, 1252, "Spanish - Traditional Sort", NULL}, - {0x000B, 850, 1252, "Finnish", NULL}, - {0x000C, 850, 1252, "French", NULL}, - {0x000E, 852, 1250, "Hungarian", NULL}, - {0x000F, 850, 1252, "Icelandic", NULL}, - {0x0010, 850, 1252, "Italian", NULL}, - {0x0011, 932, 932, "Japanese", NULL}, - {0x0012, 949, 949, "Korean", NULL}, - {0x0013, 850, 1252, "Dutch", NULL}, - {0x0014, 850, 1252, "Norwegian (Bokmål)", NULL}, - {0x0015, 852, 1250, "Polish", NULL}, - {0x0016, 850, 1252, "Portuguese", NULL}, - {0x0018, 852, 1250, "Romanian", NULL}, - {0x0019, 866, 1251, "Russian", NULL}, - {0x001A, 852, 1250, "Serbian", NULL}, - {0x001B, 852, 1250, "Slovak", NULL}, - {0x001C, 852, 1250, "Albanian", NULL}, - {0x001D, 850, 1252, "Swedish", NULL}, - {0x001F, 857, 1254, "Turkish", NULL}, - {0x0021, 850, 1252, "Indonesian", NULL}, - {0x0022, 866, 1251, "Ukrainian", NULL}, - {0x0023, 866, 1251, "Belarusian", NULL}, - {0x0024, 852, 1250, "Slovene", NULL}, - {0x0025, 775, 1257, "Estonian", NULL}, - {0x0026, 775, 1257, "Latvian", NULL}, - {0x0027, 775, 1257, "Lithuanian", NULL}, - {0x002A,1258, 1258, "Vietnamese", NULL}, - {0x002D, 850, 1252, "Basque", NULL}, - {0x002F, 866, 1251, "Macedonian", NULL}, - {0x0036, 850, 1252, "Afrikaans", NULL}, - {0x0038, 852, 1252, "Faroese", NULL}, - {0x003C, 437, 1252, "Irish", NULL}, - {0x003E, 850, 1252, "Malay", NULL}, - {0x0402, 866, 1251, "Bulgarian", "Bulgaria"}, - {0x0403, 850, 1252, "Catalan", "Spain"}, - {0x0405, 852, 1250, "Czech", "Czech Republic"}, - {0x0406, 850, 1252, "Danish", "Denmark"}, - {0x0407, 850, 1252, "German", "Germany"}, - {0x0408, 737, 1253, "Greek", "Greece"}, - {0x0409, 437, 1252, "English", "United States"}, - {0x040A, 850, 1252, "Spanish - Traditional Sort", "Spain"}, - {0x040B, 850, 1252, "Finnish", "Finland"}, - {0x040C, 850, 1252, "French", "France"}, - {0x040E, 852, 1250, "Hungarian", "Hungary"}, - {0x040F, 850, 1252, "Icelandic", "Iceland"}, - {0x0410, 850, 1252, "Italian", "Italy"}, - {0x0411, 932, 932, "Japanese", "Japan"}, - {0x0412, 949, 949, "Korean", "Korea (south)"}, - {0x0413, 850, 1252, "Dutch", "Netherlands"}, - {0x0414, 850, 1252, "Norwegian (Bokmål)", "Norway"}, - {0x0415, 852, 1250, "Polish", "Poland"}, - {0x0416, 850, 1252, "Portuguese", "Brazil"}, - {0x0418, 852, 1250, "Romanian", "Romania"}, - {0x0419, 866, 1251, "Russian", "Russia"}, - {0x041A, 852, 1250, "Croatian", "Croatia"}, - {0x041B, 852, 1250, "Slovak", "Slovakia"}, - {0x041C, 852, 1250, "Albanian", "Albania"}, - {0x041D, 850, 1252, "Swedish", "Sweden"}, - {0x041F, 857, 1254, "Turkish", "Turkey"}, - {0x0421, 850, 1252, "Indonesian", "Indonesia"}, - {0x0422, 866, 1251, "Ukrainian", "Ukraine"}, - {0x0423, 866, 1251, "Belarusian", "Belarus"}, - {0x0424, 852, 1250, "Slovene", "Slovenia"}, - {0x0425, 775, 1257, "Estonian", "Estonia"}, - {0x0426, 775, 1257, "Latvian", "Latvia"}, - {0x0427, 775, 1257, "Lithuanian", "Lithuania"}, - {0x042A,1258, 1258, "Vietnamese", "Vietnam"}, - {0x042D, 850, 1252, "Basque", "Spain"}, - {0x042F, 866, 1251, "Macedonian", "Former Yugoslav Republic of Macedonia"}, - {0x0436, 850, 1252, "Afrikaans", "South Africa"}, - {0x0438, 852, 1252, "Faroese", "Faroe Islands"}, - {0x043C, 437, 1252, "Irish", "Ireland"}, - {0x043E, 850, 1252, "Malay", "Malaysia"}, -/* {0x048F, ?, ?, "Esperanto", ""},*/ - {0x0804, 936, 936, "Chinese (People's republic of China)", "People's republic of China"}, - {0x0807, 850, 1252, "German", "Switzerland"}, - {0x0809, 850, 1252, "English", "United Kingdom"}, - {0x080A, 850, 1252, "Spanish", "Mexico"}, - {0x080C, 850, 1252, "French", "Belgium"}, - {0x0810, 850, 1252, "Italian", "Switzerland"}, - {0x0813, 850, 1252, "Dutch", "Belgium"}, - {0x0814, 850, 1252, "Norwegian (Nynorsk)", "Norway"}, - {0x0816, 850, 1252, "Portuguese", "Portugal"}, - {0x081A, 852, 1250, "Serbian (latin)", "Yugoslavia"}, - {0x081D, 850, 1252, "Swedish (Finland)", "Finland"}, - {0x0C07, 850, 1252, "German", "Austria"}, - {0x0C09, 850, 1252, "English", "Australia"}, - {0x0C0A, 850, 1252, "Spanish - International Sort", "Spain"}, - {0x0C0C, 850, 1252, "French", "Canada"}, - {0x0C1A, 855, 1251, "Serbian (Cyrillic)", "Serbia"}, - {0x1007, 850, 1252, "German", "Luxembourg"}, - {0x1009, 850, 1252, "English", "Canada"}, - {0x100A, 850, 1252, "Spanish", "Guatemala"}, - {0x100C, 850, 1252, "French", "Switzerland"}, - {0x1407, 850, 1252, "German", "Liechtenstein"}, - {0x1409, 850, 1252, "English", "New Zealand"}, - {0x140A, 850, 1252, "Spanish", "Costa Rica"}, - {0x140C, 850, 1252, "French", "Luxembourg"}, - {0x1809, 850, 1252, "English", "Ireland"}, - {0x180A, 850, 1252, "Spanish", "Panama"}, - {0x1C09, 437, 1252, "English", "South Africa"}, - {0x1C0A, 850, 1252, "Spanish", "Dominican Republic"}, - {0x2009, 850, 1252, "English", "Jamaica"}, - {0x200A, 850, 1252, "Spanish", "Venezuela"}, - {0x2409, 850, 1252, "English", "Caribbean"}, - {0x240A, 850, 1252, "Spanish", "Colombia"}, - {0x2809, 850, 1252, "English", "Belize"}, - {0x280A, 850, 1252, "Spanish", "Peru"}, - {0x2C09, 437, 1252, "English", "Trinidad & Tobago"}, - {0x2C0A, 850, 1252, "Spanish", "Argentina"}, - {0x300A, 850, 1252, "Spanish", "Ecuador"}, - {0x340A, 850, 1252, "Spanish", "Chile"}, - {0x380A, 850, 1252, "Spanish", "Uruguay"}, - {0x3C0A, 850, 1252, "Spanish", "Paraguay"}, - {0x400A, 850, 1252, "Spanish", "Bolivia"}, - {0x440A, 850, 1252, "Spanish", "El Salvador"}, - {0x480A, 850, 1252, "Spanish", "Honduras"}, - {0x4C0A, 850, 1252, "Spanish", "Nicaragua"}, - {0x500A, 850, 1252, "Spanish", "Puerto Rico"} -}; - -#define NLAN (sizeof(languages)/sizeof(languages[0])) - -void show_languages(void) -{ - unsigned int i; - printf(" Code | DOS-cp | WIN-cp | Language | Country\n"); - printf("-------+--------+--------+--------------+---------\n"); - for(i = 0; i < NLAN; i++) - printf("0x%04x | %5d | %5d | %-12s | %s\n", - languages[i].id, - languages[i].doscp, - languages[i].wincp, - languages[i].name, - languages[i].country ? languages[i].country : "Neutral"); -} - -static int langcmp(const void *p1, const void *p2) -{ - return *(const unsigned *)p1 - ((const language_t *)p2)->id; -} - -const language_t *find_language(unsigned id) -{ - return (const language_t *)bsearch(&id, languages, NLAN, sizeof(languages[0]), langcmp); -} - -void show_codepages(void) -{ - unsigned i; - const union cptable *cpp; - printf("Codepages:\n"); - for(i = 0; (cpp = wine_cp_enum_table(i)); i++) - { - printf("%-5d %s\n", cpp->info.codepage, cpp->info.name); - } -} - -const union cptable *find_codepage(int id) -{ - return wine_cp_get_table(id); -} diff --git a/reactos/tools/wmc/lang.h b/reactos/tools/wmc/lang.h deleted file mode 100644 index 5a11c5ba580..00000000000 --- a/reactos/tools/wmc/lang.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Wine Message Compiler language and codepage support - * - * 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_LANG_H -#define __WMC_LANG_H - -#include "wine/unicode.h" - -typedef struct language { - unsigned id; - unsigned doscp; - unsigned wincp; - const char *name; - const char *country; -} language_t; - -void show_languages(void); -const language_t *find_language(unsigned id); -void show_codepages(void); -const union cptable *find_codepage(int id); - -#endif diff --git a/reactos/tools/wmc/mcl.c b/reactos/tools/wmc/mcl.c deleted file mode 100644 index be016914c77..00000000000 --- a/reactos/tools/wmc/mcl.c +++ /dev/null @@ -1,747 +0,0 @@ -/* - * Wine Message Compiler lexical scanner - * - * 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 - */ - -#include "config.h" - -#include -#include -#include -#include -#include - -#include "utils.h" -#include "wmc.h" -#include "lang.h" - -#include "mcy.tab.h" - -/* - * Keywords are case insensitive. All normal input is treated as - * being in codepage iso-8859-1 for ascii input files (unicode - * page 0) and as equivalent unicode if unicode input is selected. - * All normal input, which is not part of a message text, is - * enforced to be unicode page 0. Otherwise an error will be - * generated. The normal file data should only be ASCII because - * that is the basic definition of the grammar. - * - * Byteorder or unicode input is determined automatically by - * reading the first 8 bytes and checking them against unicode - * page 0 byteorder (hibyte must be 0). - * -- FIXME -- - * Alternatively, the input is checked against a special byte - * sequence to identify the file. - * -- FIXME -- - * - * - * Keywords: - * Codepages - * Facility - * FacilityNames - * LanguageNames - * MessageId - * MessageIdTypedef - * Severity - * SeverityNames - * SymbolicName - * - * Default added identifiers for classes: - * SeverityNames: - * Success = 0x0 - * Informational = 0x1 - * Warning = 0x2 - * Error = 0x3 - * FacilityNames: - * System = 0x0FF - * Application = 0xFFF - * - * The 'Codepages' keyword is a wmc extension. - */ - -static const WCHAR ustr_application[] = { 'A', 'p', 'p', 'l', 'i', 'c', 'a', 't', 'i', 'o', 'n', 0 }; -static const WCHAR ustr_codepages[] = { 'C', 'o', 'd', 'e', 'p', 'a', 'g', 'e', 's', 0 }; -static const WCHAR ustr_english[] = { 'E', 'n', 'g', 'l', 'i', 's', 'h', 0 }; -static const WCHAR ustr_error[] = { 'E', 'r', 'r', 'o', 'r', 0 }; -static const WCHAR ustr_facility[] = { 'F', 'a', 'c', 'i', 'l', 'i', 't', 'y', 0 }; -static const WCHAR ustr_facilitynames[] = { 'F', 'a', 'c', 'i', 'l', 'i', 't', 'y', 'N', 'a', 'm', 'e', 's', 0 }; -static const WCHAR ustr_informational[] = { 'I', 'n', 'f', 'o', 'r', 'm', 'a', 't', 'i', 'o', 'n', 'a', 'l', 0 }; -static const WCHAR ustr_language[] = { 'L', 'a', 'n', 'g', 'u', 'a', 'g', 'e', 0}; -static const WCHAR ustr_languagenames[] = { 'L', 'a', 'n', 'g', 'u', 'a', 'g', 'e', 'N', 'a', 'm', 'e', 's', 0}; -static const WCHAR ustr_messageid[] = { 'M', 'e', 's', 's', 'a', 'g', 'e', 'I', 'd', 0 }; -static const WCHAR ustr_messageidtypedef[] = { 'M', 'e', 's', 's', 'a', 'g', 'e', 'I', 'd', 'T', 'y', 'p', 'e', 'd', 'e', 'f', 0 }; -static const WCHAR ustr_outputbase[] = { 'O', 'u', 't', 'p', 'u', 't', 'B', 'a', 's', 'e', 0 }; -static const WCHAR ustr_severity[] = { 'S', 'e', 'v', 'e', 'r', 'i', 't', 'y', 0 }; -static const WCHAR ustr_severitynames[] = { 'S', 'e', 'v', 'e', 'r', 'i', 't', 'y', 'N', 'a', 'm', 'e', 's', 0 }; -static const WCHAR ustr_success[] = { 'S', 'u', 'c', 'c', 'e', 's', 's', 0 }; -static const WCHAR ustr_symbolicname[] = { 'S', 'y', 'm', 'b', 'o', 'l', 'i', 'c', 'N', 'a', 'm', 'e', 0 }; -static const WCHAR ustr_system[] = { 'S', 'y', 's', 't', 'e', 'm', 0 }; -static const WCHAR ustr_warning[] = { 'W', 'a', 'r', 'n', 'i', 'n', 'g', 0 }; -static const WCHAR ustr_msg00001[] = { 'm', 's', 'g', '0', '0', '0', '0', '1', 0 }; -/* - * This table is to beat any form of "expression building" to check for - * correct filename characters. It is also used for ident checks. - * FIXME: use it more consistently. - */ - -#define CH_SHORTNAME 0x01 -#define CH_LONGNAME 0x02 -#define CH_IDENT 0x04 -#define CH_NUMBER 0x08 -/*#define CH_WILDCARD 0x10*/ -/*#define CH_DOT 0x20*/ -#define CH_PUNCT 0x40 -#define CH_INVALID 0x80 - -static const char char_table[256] = { - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, /* 0x00 - 0x07 */ - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, /* 0x08 - 0x0F */ - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, /* 0x10 - 0x17 */ - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, /* 0x18 - 0x1F */ - 0x80, 0x03, 0x80, 0x03, 0x03, 0x03, 0x03, 0x03, /* 0x20 - 0x27 " !"#$%&'" */ - 0x43, 0x43, 0x10, 0x80, 0x03, 0x03, 0x22, 0x80, /* 0x28 - 0x2F "()*+,-./" */ - 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, /* 0x30 - 0x37 "01234567" */ - 0x0b, 0x0b, 0xc0, 0x80, 0x80, 0x80, 0x80, 0x10, /* 0x38 - 0x3F "89:;<=>?" */ - 0x03, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, /* 0x40 - 0x47 "@ABCDEFG" */ - 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, /* 0x48 - 0x4F "HIJKLMNO" */ - 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, /* 0x50 - 0x57 "PQRSTUVW" */ - 0x07, 0x07, 0x07, 0x80, 0x80, 0x80, 0x80, 0x07, /* 0x58 - 0x5F "XYZ[\]^_" */ - 0x03, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, /* 0x60 - 0x67 "`abcdefg" */ - 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, /* 0x68 - 0x6F "hijklmno" */ - 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, /* 0x70 - 0x77 "pqrstuvw" */ - 0x07, 0x07, 0x07, 0x03, 0x80, 0x03, 0x03, 0x80, /* 0x78 - 0x7F "xyz{|}~ " */ - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* 0x80 - 0x87 */ - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* 0x88 - 0x8F */ - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* 0x90 - 0x97 */ - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* 0x98 - 0x9F */ - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* 0xA0 - 0xA7 */ - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* 0xA8 - 0xAF */ - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* 0xB0 - 0xB7 */ - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* 0xB8 - 0xBF */ - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* 0xC0 - 0xC7 */ - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* 0xC8 - 0xCF */ - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* 0xD0 - 0xD7 */ - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* 0xD8 - 0xDF */ - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* 0xE0 - 0xE7 */ - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* 0xE8 - 0xEF */ - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* 0xF0 - 0xF7 */ - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x80, /* 0xF8 - 0xFF */ -}; - -static int isisochar(int ch) -{ - return !(ch & (~0xff)); -} - -static int codepage; -static const union cptable *codepage_def; - -void set_codepage(int cp) -{ - codepage = cp; - codepage_def = find_codepage(codepage); - if(!codepage_def) - xyyerror("Codepage %d not found; cannot process\n", codepage); -} - -/* - * Input functions - */ -static int nungetstack = 0; -static int allocungetstack = 0; -static char *ungetstack = NULL; -static int ninputbuffer = 0; -static WCHAR *inputbuffer = NULL; -static char *xlatebuffer = NULL; - -#define INPUTBUFFER_SIZE 2048 /* Must be larger than 4 and approx. large enough to hold a line */ - -/* - * Fill the input buffer with *one* line of input. - * The line is '\n' terminated so that scanning - * messages with translation works as expected - * (otherwise we cannot pre-translate because the - * language is first known one line before the - * actual message). - */ -static int fill_inputbuffer(void) -{ - int n; - static const char err_fatalread[] = "Fatal: reading input failed"; - static int endian = -1; - - if(!inputbuffer) - { - inputbuffer = xmalloc(INPUTBUFFER_SIZE*sizeof(WCHAR)); - xlatebuffer = xmalloc(INPUTBUFFER_SIZE); - } - -try_again: - if(!unicodein) - { - char *cptr; - cptr = fgets(xlatebuffer, INPUTBUFFER_SIZE, yyin); - if(!cptr && ferror(yyin)) - xyyerror(err_fatalread); - else if(!cptr) - return 0; - assert(codepage_def != NULL); - n = wine_cp_mbstowcs(codepage_def, 0, xlatebuffer, strlen(xlatebuffer)+1, inputbuffer, INPUTBUFFER_SIZE); - if(n < 0) - internal_error(__FILE__, __LINE__, "Could not translate to unicode (%d)\n", n); - if(n <= 1) - goto try_again; /* Should not happen */ - n--; /* Strip added conversion '\0' from input length */ - /* - * FIXME: - * Detect UTF-8 in the first time we read some bytes by - * checking the special sequence "FE..." or something like - * that. I need to check www.unicode.org for details. - */ - } - else - { - if(endian == -1) - { - n = fread(inputbuffer, 1, 8, yyin); - if(n != 8) - { - if(!n && ferror(yyin)) - xyyerror(err_fatalread); - else - xyyerror("Fatal: file to short to determine byteorder (should never happen)\n"); - } - if(isisochar(inputbuffer[0]) && - isisochar(inputbuffer[1]) && - isisochar(inputbuffer[2]) && - isisochar(inputbuffer[3])) - { -#ifdef WORDS_BIGENDIAN - endian = WMC_BO_BIG; -#else - endian = WMC_BO_LITTLE; -#endif - } - else if(isisochar(BYTESWAP_WORD(inputbuffer[0])) && - isisochar(BYTESWAP_WORD(inputbuffer[1])) && - isisochar(BYTESWAP_WORD(inputbuffer[2])) && - isisochar(BYTESWAP_WORD(inputbuffer[3]))) - { -#ifdef WORDS_BIGENDIAN - endian = WMC_BO_LITTLE; -#else - endian = WMC_BO_BIG; -#endif - } - else - xyyerror("Fatal: cannot determine file's byteorder\n"); - /* FIXME: - * Determine the file-endian with the leader-bytes - * "FF FE..."; can't remember the exact sequence. - */ - n /= 2; -#ifdef WORDS_BIGENDIAN - if(endian == WMC_BO_LITTLE) -#else - if(endian == WMC_BO_BIG) -#endif - { - inputbuffer[0] = BYTESWAP_WORD(inputbuffer[0]); - inputbuffer[1] = BYTESWAP_WORD(inputbuffer[1]); - inputbuffer[2] = BYTESWAP_WORD(inputbuffer[2]); - inputbuffer[3] = BYTESWAP_WORD(inputbuffer[3]); - } - - } - else - { - int i; - n = 0; - for(i = 0; i < INPUTBUFFER_SIZE; i++) - { - int t; - t = fread(&inputbuffer[i], 2, 1, yyin); - if(!t && ferror(yyin)) - xyyerror(err_fatalread); - else if(!t && n) - break; - n++; -#ifdef WORDS_BIGENDIAN - if(endian == WMC_BO_LITTLE) -#else - if(endian == WMC_BO_BIG) -#endif - { - if((inputbuffer[i] = BYTESWAP_WORD(inputbuffer[i])) == '\n') - break; - } - else - { - if(inputbuffer[i] == '\n') - break; - } - } - } - - } - - if(!n) - { - mcy_warning("Re-read line (input was or converted to zilch)\n"); - goto try_again; /* Should not happen, but could be due to stdin reading and a signal */ - } - - ninputbuffer += n; - return 1; -} - -static int get_unichar(void) -{ - static WCHAR *b = NULL; - char_number++; - - if(nungetstack) - return ungetstack[--nungetstack]; - - if(!ninputbuffer) - { - if(!fill_inputbuffer()) - return EOF; - b = inputbuffer; - } - - ninputbuffer--; - return (int)(*b++ & 0xffff); -} - -static void unget_unichar(int ch) -{ - if(ch == EOF) - return; - - char_number--; - - if(nungetstack == allocungetstack) - { - allocungetstack += 32; - ungetstack = xrealloc(ungetstack, allocungetstack * sizeof(*ungetstack)); - } - - ungetstack[nungetstack++] = (WCHAR)ch; -} - - -/* - * Normal character stack. - * Used for number scanning. - */ -static int ncharstack = 0; -static int alloccharstack = 0; -static char *charstack = NULL; - -static void empty_char_stack(void) -{ - ncharstack = 0; -} - -static void push_char(int ch) -{ - if(ncharstack == alloccharstack) - { - alloccharstack += 32; - charstack = xrealloc(charstack, alloccharstack * sizeof(*charstack)); - } - charstack[ncharstack++] = (char)ch; -} - -static int tos_char_stack(void) -{ - if(!ncharstack) - return 0; - else - return (int)(charstack[ncharstack-1] & 0xff); -} - -static char *get_char_stack(void) -{ - return charstack; -} - -/* - * Unicode character stack. - * Used for general scanner. - */ -static int nunicharstack = 0; -static int allocunicharstack = 0; -static WCHAR *unicharstack = NULL; - -static void empty_unichar_stack(void) -{ - nunicharstack = 0; -} - -static void push_unichar(int ch) -{ - if(nunicharstack == allocunicharstack) - { - allocunicharstack += 128; - unicharstack = xrealloc(unicharstack, allocunicharstack * sizeof(*unicharstack)); - } - unicharstack[nunicharstack++] = (WCHAR)ch; -} - -#if 0 -static int tos_unichar_stack(void) -{ - if(!nunicharstack) - return 0; - else - return (int)(unicharstack[nunicharstack-1] & 0xffff); -} -#endif - -static WCHAR *get_unichar_stack(void) -{ - return unicharstack; -} - -/* - * Number scanner - * - * state | ch | next state - * ------+-----------------+-------------------------- - * 0 | [0] | 1 - * 0 | [1-9] | 4 - * 0 | . | error (should never occur) - * 1 | [xX] | 2 - * 1 | [0-7] | 3 - * 1 | [89a-wyzA-WYZ_] | error invalid digit - * 1 | . | return 0 - * 2 | [0-9a-fA-F] | 2 - * 2 | [g-zG-Z_] | error invalid hex digit - * 2 | . | return (hex-number) if TOS != [xX] else error - * 3 | [0-7] | 3 - * 3 | [89a-zA-Z_] | error invalid octal digit - * 3 | . | return (octal-number) - * 4 | [0-9] | 4 - * 4 | [a-zA-Z_] | error invalid decimal digit - * 4 | . | return (decimal-number) - * - * All non-identifier characters [^a-zA-Z_0-9] terminate the scan - * and return the value. This is not entirely correct, but close - * enough (should check punctuators as trailing context, but the - * char_table is not adapted to that and it is questionable whether - * it is worth the trouble). - * All non-iso-8859-1 characters are an error. - */ -static int scan_number(int ch) -{ - int state = 0; - int base = 10; - empty_char_stack(); - - while(1) - { - if(!isisochar(ch)) - xyyerror("Invalid digit\n"); - - switch(state) - { - case 0: - if(isdigit(ch)) - { - push_char(ch); - if(ch == '0') - state = 1; - else - state = 4; - } - else - internal_error(__FILE__, __LINE__, "Non-digit in first number-scanner state\n"); - break; - case 1: - if(ch == 'x' || ch == 'X') - { - push_char(ch); - state = 2; - } - else if(ch >= '0' && ch <= '7') - { - push_char(ch); - state = 3; - } - else if(isalpha(ch) || ch == '_') - xyyerror("Invalid number digit\n"); - else - { - unget_unichar(ch); - mcy_lval.num = 0; - return tNUMBER; - } - break; - case 2: - if(isxdigit(ch)) - push_char(ch); - else if(isalpha(ch) || ch == '_' || !isxdigit(tos_char_stack())) - xyyerror("Invalid hex digit\n"); - else - { - base = 16; - goto finish; - } - break; - case 3: - if(ch >= '0' && ch <= '7') - push_char(ch); - else if(isalnum(ch) || ch == '_') - xyyerror("Invalid octal digit\n"); - else - { - base = 8; - goto finish; - } - break; - case 4: - if(isdigit(ch)) - push_char(ch); - else if(isalnum(ch) || ch == '_') - xyyerror("Invalid decimal digit\n"); - else - { - base = 10; - goto finish; - } - break; - default: - internal_error(__FILE__, __LINE__, "Invalid state in number-scanner\n"); - } - ch = get_unichar(); - } -finish: - unget_unichar(ch); - push_char(0); - mcy_lval.num = strtoul(get_char_stack(), NULL, base); - return tNUMBER; -} - -static void newline(void) -{ - line_number++; - char_number = 1; -} - -static int unisort(const void *p1, const void *p2) -{ - return unistricmp(((const token_t *)p1)->name, ((const token_t *)p2)->name); -} - -static token_t *tokentable = NULL; -static int ntokentable = 0; - -token_t *lookup_token(const WCHAR *s) -{ - token_t tok; - - tok.name = s; - return (token_t *)bsearch(&tok, tokentable, ntokentable, sizeof(*tokentable), unisort); -} - -void add_token(tok_e type, const WCHAR *name, int tok, int cp, const WCHAR *alias, int fix) -{ - ntokentable++; - tokentable = xrealloc(tokentable, ntokentable * sizeof(*tokentable)); - tokentable[ntokentable-1].type = type; - tokentable[ntokentable-1].name = name; - tokentable[ntokentable-1].token = tok; - tokentable[ntokentable-1].codepage = cp; - tokentable[ntokentable-1].alias = alias; - tokentable[ntokentable-1].fixed = fix; - qsort(tokentable, ntokentable, sizeof(*tokentable), unisort); -} - -void get_tokentable(token_t **tab, int *len) -{ - assert(tab != NULL); - assert(len != NULL); - *tab = tokentable; - *len = ntokentable; -} - -/* - * The scanner - * - */ -int mcy_lex(void) -{ - static const WCHAR ustr_dot1[] = { '.', '\n', 0 }; - static const WCHAR ustr_dot2[] = { '.', '\r', '\n', 0 }; - static int isinit = 0; - int ch; - - if(!isinit) - { - isinit++; - set_codepage(WMC_DEFAULT_CODEPAGE); - add_token(tok_keyword, ustr_codepages, tCODEPAGE, 0, NULL, 0); - add_token(tok_keyword, ustr_facility, tFACILITY, 0, NULL, 1); - add_token(tok_keyword, ustr_facilitynames, tFACNAMES, 0, NULL, 1); - add_token(tok_keyword, ustr_language, tLANGUAGE, 0, NULL, 1); - add_token(tok_keyword, ustr_languagenames, tLANNAMES, 0, NULL, 1); - add_token(tok_keyword, ustr_messageid, tMSGID, 0, NULL, 1); - add_token(tok_keyword, ustr_messageidtypedef, tTYPEDEF, 0, NULL, 1); - add_token(tok_keyword, ustr_outputbase, tBASE, 0, NULL, 1); - add_token(tok_keyword, ustr_severity, tSEVERITY, 0, NULL, 1); - add_token(tok_keyword, ustr_severitynames, tSEVNAMES, 0, NULL, 1); - add_token(tok_keyword, ustr_symbolicname, tSYMNAME, 0, NULL, 1); - add_token(tok_severity, ustr_error, 0x03, 0, NULL, 0); - add_token(tok_severity, ustr_warning, 0x02, 0, NULL, 0); - add_token(tok_severity, ustr_informational, 0x01, 0, NULL, 0); - add_token(tok_severity, ustr_success, 0x00, 0, NULL, 0); - add_token(tok_facility, ustr_application, 0xFFF, 0, NULL, 0); - add_token(tok_facility, ustr_system, 0x0FF, 0, NULL, 0); - add_token(tok_language, ustr_english, 0x409, 437, ustr_msg00001, 0); - } - - empty_unichar_stack(); - - while(1) - { - if(want_line) - { - while((ch = get_unichar()) != '\n') - { - if(ch == EOF) - xyyerror("Unexpected EOF\n"); - push_unichar(ch); - } - newline(); - push_unichar(ch); - push_unichar(0); - if(!unistrcmp(ustr_dot1, get_unichar_stack()) || !unistrcmp(ustr_dot2, get_unichar_stack())) - { - want_line = 0; - /* Reset the codepage to our default after each message */ - set_codepage(WMC_DEFAULT_CODEPAGE); - return tMSGEND; - } - mcy_lval.str = xunistrdup(get_unichar_stack()); - return tLINE; - } - - ch = get_unichar(); - - if(ch == EOF) - return EOF; - - if(ch == '\n') - { - newline(); - if(want_nl) - { - want_nl = 0; - return tNL; - } - continue; - } - - if(isisochar(ch)) - { - if(want_file) - { - int n = 0; - while(n < 8 && isisochar(ch)) - { - int t = char_table[ch]; - if((t & CH_PUNCT) || !(t & CH_SHORTNAME)) - break; - - push_unichar(ch); - n++; - ch = get_unichar(); - } - unget_unichar(ch); - push_unichar(0); - want_file = 0; - mcy_lval.str = xunistrdup(get_unichar_stack()); - return tFILE; - } - - if(char_table[ch] & CH_IDENT) - { - token_t *tok; - while(isisochar(ch) && (char_table[ch] & (CH_IDENT|CH_NUMBER))) - { - push_unichar(ch); - ch = get_unichar(); - } - unget_unichar(ch); - push_unichar(0); - if(!(tok = lookup_token(get_unichar_stack()))) - { - mcy_lval.str = xunistrdup(get_unichar_stack()); - return tIDENT; - } - switch(tok->type) - { - case tok_keyword: - return tok->token; - - case tok_language: - codepage = tok->codepage; - /* Fall through */ - case tok_severity: - case tok_facility: - mcy_lval.tok = tok; - return tTOKEN; - - default: - internal_error(__FILE__, __LINE__, "Invalid token type encountered\n"); - } - } - - if(isspace(ch)) /* Ignore space */ - continue; - - if(isdigit(ch)) - return scan_number(ch); - } - - switch(ch) - { - case ':': - case '=': - case '+': - case '(': - case ')': - return ch; - case ';': - while(ch != '\n' && ch != EOF) - { - push_unichar(ch); - ch = get_unichar(); - } - newline(); - push_unichar(ch); /* Include the newline */ - push_unichar(0); - mcy_lval.str = xunistrdup(get_unichar_stack()); - return tCOMMENT; - default: - xyyerror("Invalid character '%c' (0x%04x)\n", isisochar(ch) && isprint(ch) ? ch : '.', ch); - } - } -} diff --git a/reactos/tools/wmc/mcy.tab.c b/reactos/tools/wmc/mcy.tab.c deleted file mode 100644 index 30ec1a57284..00000000000 --- a/reactos/tools/wmc/mcy.tab.c +++ /dev/null @@ -1,2435 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.1. */ - -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. - - 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, 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. */ - -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ - -/* Written by Richard Stallman by simplifying the original so called - ``semantic'' parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "2.1" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 0 - -/* Using locations. */ -#define YYLSP_NEEDED 0 - -/* Substitute the variable and function names. */ -#define yyparse mcy_parse -#define yylex mcy_lex -#define yyerror mcy_error -#define yylval mcy_lval -#define yychar mcy_char -#define yydebug mcy_debug -#define yynerrs mcy_nerrs - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - tSEVNAMES = 258, - tFACNAMES = 259, - tLANNAMES = 260, - tBASE = 261, - tCODEPAGE = 262, - tTYPEDEF = 263, - tNL = 264, - tSYMNAME = 265, - tMSGEND = 266, - tSEVERITY = 267, - tFACILITY = 268, - tLANGUAGE = 269, - tMSGID = 270, - tIDENT = 271, - tLINE = 272, - tFILE = 273, - tCOMMENT = 274, - tNUMBER = 275, - tTOKEN = 276 - }; -#endif -/* Tokens. */ -#define tSEVNAMES 258 -#define tFACNAMES 259 -#define tLANNAMES 260 -#define tBASE 261 -#define tCODEPAGE 262 -#define tTYPEDEF 263 -#define tNL 264 -#define tSYMNAME 265 -#define tMSGEND 266 -#define tSEVERITY 267 -#define tFACILITY 268 -#define tLANGUAGE 269 -#define tMSGID 270 -#define tIDENT 271 -#define tLINE 272 -#define tFILE 273 -#define tCOMMENT 274 -#define tNUMBER 275 -#define tTOKEN 276 - - - - -/* Copy the first part of user declarations. */ -#line 39 "tools/wmc/mcy.y" - - -#include "config.h" - -#include -#include -#include -#include -#include "utils.h" -#include "wmc.h" -#include "lang.h" - -static const char err_syntax[] = "Syntax error"; -static const char err_number[] = "Number expected"; -static const char err_ident[] = "Identifier expected"; -static const char err_assign[] = "'=' expected"; -static const char err_popen[] = "'(' expected"; -static const char err_pclose[] = "')' expected"; -static const char err_colon[] = "':' expected"; -static const char err_msg[] = "Message expected"; - -/* Scanner switches */ -int want_nl = 0; /* Request next newlinw */ -int want_line = 0; /* Request next complete line */ -int want_file = 0; /* Request next ident as filename */ - -node_t *nodehead = NULL; /* The list of all parsed elements */ -static node_t *nodetail = NULL; -lan_blk_t *lanblockhead; /* List of parsed elements transposed */ - -static int base = 16; /* Current printout base to use (8, 10 or 16) */ -static WCHAR *cast = NULL; /* Current typecast to use */ - -static int last_id = 0; /* The last message ID parsed */ -static int last_sev = 0; /* Last severity code parsed */ -static int last_fac = 0; /* Last facility code parsed */ -static WCHAR *last_sym = NULL;/* Last alias symbol parsed */ -static int have_sev; /* Set if severity parsed for current message */ -static int have_fac; /* Set if facility parsed for current message */ -static int have_sym; /* Set is symbol parsed for current message */ - -static cp_xlat_t *cpxlattab = NULL; /* Codepage translation table */ -static int ncpxlattab = 0; - -/* Prototypes */ -static WCHAR *merge(WCHAR *s1, WCHAR *s2); -static lanmsg_t *new_lanmsg(lan_cp_t *lcp, WCHAR *msg); -static msg_t *add_lanmsg(msg_t *msg, lanmsg_t *lanmsg); -static msg_t *complete_msg(msg_t *msg, int id); -static void add_node(node_e type, void *p); -static void do_add_token(tok_e type, token_t *tok, const char *code); -static void test_id(int id); -static int check_languages(node_t *head); -static lan_blk_t *block_messages(node_t *head); -static void add_cpxlat(int lan, int cpin, int cpout); -static cp_xlat_t *find_cpxlat(int lan); - - - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif - -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 98 "tools/wmc/mcy.y" -typedef union YYSTYPE { - WCHAR *str; - unsigned num; - token_t *tok; - lanmsg_t *lmp; - msg_t *msg; - lan_cp_t lcp; -} YYSTYPE; -/* Line 196 of yacc.c. */ -#line 203 "mcy.tab.c" -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 -#endif - - - -/* Copy the second part of user declarations. */ - - -/* Line 219 of yacc.c. */ -#line 215 "mcy.tab.c" - -#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) -# define YYSIZE_T __SIZE_TYPE__ -#endif -#if ! defined (YYSIZE_T) && defined (size_t) -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus)) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) -# define YYSIZE_T unsigned int -#endif - -#ifndef YY_ -# if YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) -# endif -# endif -# ifndef YY_ -# define YY_(msgid) msgid -# endif -#endif - -#if ! defined (yyoverflow) || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# else -# define YYSTACK_ALLOC alloca -# if defined (__STDC__) || defined (__cplusplus) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYINCLUDED_STDLIB_H -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1) -# endif -# ifdef __cplusplus -extern "C" { -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \ - && (defined (__STDC__) || defined (__cplusplus))) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \ - && (defined (__STDC__) || defined (__cplusplus))) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifdef __cplusplus -} -# endif -# endif -#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ - - -#if (! defined (yyoverflow) \ - && (! defined (__cplusplus) \ - || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - short int yyss; - YYSTYPE yyvs; - }; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined (__GNUC__) && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (0) -# endif -# endif - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (0) - -#endif - -#if defined (__STDC__) || defined (__cplusplus) - typedef signed char yysigned_char; -#else - typedef short int yysigned_char; -#endif - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 30 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 165 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 27 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 32 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 104 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 155 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 276 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const unsigned char yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 23, 24, 2, 26, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 25, 2, - 2, 22, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const unsigned short int yyprhs[] = -{ - 0, 0, 3, 5, 7, 10, 12, 14, 16, 18, - 24, 30, 34, 37, 43, 49, 53, 56, 62, 68, - 72, 75, 81, 87, 91, 94, 98, 102, 105, 109, - 113, 116, 118, 121, 123, 128, 132, 135, 137, 140, - 142, 147, 151, 154, 155, 158, 161, 163, 166, 168, - 176, 183, 188, 192, 195, 196, 199, 202, 204, 207, - 209, 215, 221, 226, 230, 233, 235, 237, 238, 243, - 247, 250, 251, 253, 256, 259, 260, 263, 266, 269, - 273, 277, 280, 284, 288, 291, 295, 299, 302, 304, - 307, 309, 314, 320, 326, 331, 334, 336, 339, 341, - 344, 346, 348, 349, 350 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yysigned_char yyrhs[] = -{ - 28, 0, -1, 29, -1, 30, -1, 29, 30, -1, - 31, -1, 43, -1, 19, -1, 1, -1, 3, 22, - 23, 32, 24, -1, 3, 22, 23, 32, 1, -1, - 3, 22, 1, -1, 3, 1, -1, 4, 22, 23, - 34, 24, -1, 4, 22, 23, 34, 1, -1, 4, - 22, 1, -1, 4, 1, -1, 5, 22, 23, 37, - 24, -1, 5, 22, 23, 37, 1, -1, 5, 22, - 1, -1, 5, 1, -1, 7, 22, 23, 40, 24, - -1, 7, 22, 23, 40, 1, -1, 7, 22, 1, - -1, 7, 1, -1, 8, 22, 16, -1, 8, 22, - 1, -1, 8, 1, -1, 6, 22, 20, -1, 6, - 22, 1, -1, 6, 1, -1, 33, -1, 32, 33, - -1, 1, -1, 55, 22, 20, 36, -1, 55, 22, - 1, -1, 55, 1, -1, 35, -1, 34, 35, -1, - 1, -1, 55, 22, 20, 36, -1, 55, 22, 1, - -1, 55, 1, -1, -1, 25, 16, -1, 25, 1, - -1, 38, -1, 37, 38, -1, 1, -1, 55, 22, - 20, 58, 25, 18, 39, -1, 55, 22, 20, 58, - 25, 1, -1, 55, 22, 20, 1, -1, 55, 22, - 1, -1, 55, 1, -1, -1, 25, 20, -1, 25, - 1, -1, 41, -1, 40, 41, -1, 1, -1, 42, - 22, 20, 25, 20, -1, 42, 22, 20, 25, 1, - -1, 42, 22, 20, 1, -1, 42, 22, 1, -1, - 42, 1, -1, 20, -1, 21, -1, -1, 45, 47, - 44, 51, -1, 15, 22, 46, -1, 15, 1, -1, - -1, 20, -1, 26, 20, -1, 26, 1, -1, -1, - 47, 49, -1, 47, 50, -1, 47, 48, -1, 10, - 22, 16, -1, 10, 22, 1, -1, 10, 1, -1, - 12, 22, 55, -1, 12, 22, 1, -1, 12, 1, - -1, 13, 22, 55, -1, 13, 22, 1, -1, 13, - 1, -1, 52, -1, 51, 52, -1, 1, -1, 53, - 57, 54, 11, -1, 14, 56, 22, 55, 9, -1, - 14, 56, 22, 55, 1, -1, 14, 56, 22, 1, - -1, 14, 1, -1, 17, -1, 54, 17, -1, 1, - -1, 54, 1, -1, 16, -1, 21, -1, -1, -1, - -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const unsigned short int yyrline[] = -{ - 0, 123, 123, 130, 131, 134, 135, 136, 137, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 171, - 172, 178, 179, 180, 183, 190, 191, 197, 198, 199, - 202, 209, 210, 213, 214, 215, 221, 222, 223, 226, - 234, 235, 236, 237, 240, 241, 242, 248, 249, 250, - 253, 263, 264, 265, 266, 269, 270, 280, 280, 283, - 288, 291, 292, 293, 294, 297, 298, 299, 300, 303, - 304, 305, 308, 316, 317, 320, 328, 329, 335, 336, - 337, 340, 348, 377, 378, 379, 382, 383, 384, 385, - 391, 392, 395, 398, 401 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "tSEVNAMES", "tFACNAMES", "tLANNAMES", - "tBASE", "tCODEPAGE", "tTYPEDEF", "tNL", "tSYMNAME", "tMSGEND", - "tSEVERITY", "tFACILITY", "tLANGUAGE", "tMSGID", "tIDENT", "tLINE", - "tFILE", "tCOMMENT", "tNUMBER", "tTOKEN", "'='", "'('", "')'", "':'", - "'+'", "$accept", "file", "items", "decl", "global", "smaps", "smap", - "fmaps", "fmap", "alias", "lmaps", "lmap", "optcp", "cmaps", "cmap", - "clan", "msg", "@1", "msgid", "id", "sevfacsym", "sym", "sev", "fac", - "bodies", "body", "lang", "lines", "token", "setnl", "setline", - "setfile", 0 -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const unsigned short int yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 61, 40, 41, 58, 43 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const unsigned char yyr1[] = -{ - 0, 27, 28, 29, 29, 30, 30, 30, 30, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 32, 32, 32, 33, 33, 33, 34, 34, 34, - 35, 35, 35, 36, 36, 36, 37, 37, 37, 38, - 38, 38, 38, 38, 39, 39, 39, 40, 40, 40, - 41, 41, 41, 41, 41, 42, 42, 44, 43, 45, - 45, 46, 46, 46, 46, 47, 47, 47, 47, 48, - 48, 48, 49, 49, 49, 50, 50, 50, 51, 51, - 51, 52, 53, 53, 53, 53, 54, 54, 54, 54, - 55, 55, 56, 57, 58 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const unsigned char yyr2[] = -{ - 0, 2, 1, 1, 2, 1, 1, 1, 1, 5, - 5, 3, 2, 5, 5, 3, 2, 5, 5, 3, - 2, 5, 5, 3, 2, 3, 3, 2, 3, 3, - 2, 1, 2, 1, 4, 3, 2, 1, 2, 1, - 4, 3, 2, 0, 2, 2, 1, 2, 1, 7, - 6, 4, 3, 2, 0, 2, 2, 1, 2, 1, - 5, 5, 4, 3, 2, 1, 1, 0, 4, 3, - 2, 0, 1, 2, 2, 0, 2, 2, 2, 3, - 3, 2, 3, 3, 2, 3, 3, 2, 1, 2, - 1, 4, 5, 5, 4, 2, 1, 2, 1, 2, - 1, 1, 0, 0, 0 -}; - -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const unsigned char yydefact[] = -{ - 0, 8, 0, 0, 0, 0, 0, 0, 0, 7, - 0, 0, 3, 5, 6, 75, 12, 0, 16, 0, - 20, 0, 30, 0, 24, 0, 27, 0, 70, 71, - 1, 4, 67, 11, 0, 15, 0, 19, 0, 29, - 28, 23, 0, 26, 25, 72, 0, 69, 0, 0, - 0, 0, 78, 76, 77, 33, 100, 101, 0, 31, - 0, 39, 0, 37, 0, 48, 0, 46, 0, 59, - 65, 66, 0, 57, 0, 74, 73, 81, 0, 84, - 0, 87, 0, 90, 0, 68, 88, 103, 10, 9, - 32, 36, 0, 14, 13, 38, 42, 0, 18, 17, - 47, 53, 0, 22, 21, 58, 64, 0, 80, 79, - 83, 82, 86, 85, 95, 0, 89, 0, 35, 43, - 41, 43, 52, 0, 63, 0, 0, 98, 96, 0, - 0, 34, 40, 51, 0, 62, 0, 94, 0, 99, - 91, 97, 45, 44, 0, 61, 60, 93, 92, 50, - 54, 0, 49, 56, 55 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const short int yydefgoto[] = -{ - -1, 10, 11, 12, 13, 58, 59, 62, 63, 131, - 66, 67, 152, 72, 73, 74, 14, 51, 15, 47, - 32, 52, 53, 54, 85, 86, 87, 129, 60, 115, - 117, 134 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -37 -static const short int yypact[] = -{ - 132, -37, 18, 44, 46, 47, 48, 49, 50, -37, - 10, 113, -37, -37, -37, -37, -37, 11, -37, 14, - -37, 19, -37, 85, -37, 20, -37, 147, -37, -13, - -37, -37, 87, -37, 66, -37, 80, -37, 82, -37, - -37, -37, 64, -37, -37, -37, 107, -37, 51, 52, - 53, 3, -37, -37, -37, -37, -37, -37, 7, -37, - 54, -37, 8, -37, 55, -37, 17, -37, 56, -37, - -37, -37, 15, -37, 57, -37, -37, -37, 148, -37, - 88, -37, 90, -37, 58, -3, -37, -37, -37, -37, - -37, -37, 109, -37, -37, -37, -37, 114, -37, -37, - -37, -37, 121, -37, -37, -37, -37, 122, -37, -37, - -37, -37, -37, -37, -37, 38, -37, 129, -37, 36, - -37, 36, -37, 0, -37, 2, 91, -37, -37, 144, - 149, -37, -37, -37, 37, -37, 123, -37, 5, -37, - -37, -37, -37, -37, 4, -37, -37, -37, -37, -37, - 39, 124, -37, -37, -37 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const yysigned_char yypgoto[] = -{ - -37, -37, -37, 77, -37, -37, 35, -37, 1, -27, - -37, 29, -37, -37, 30, -37, -37, -37, -37, -37, - -37, -37, -37, -37, -37, 41, -37, -37, -36, -37, - -37, -37 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -105 -static const short int yytable[] = -{ - 64, 133, 68, 135, 83, 149, 147, 45, 88, 93, - 30, 84, 33, 46, 148, 35, 103, 84, 98, 16, - 37, 41, 150, 56, 56, -104, 64, 136, 57, 57, - 68, 89, 94, 56, 34, 70, 71, 36, 57, 104, - 17, 99, 38, 42, 111, 18, 113, 20, 22, 24, - 26, 28, 77, 79, 81, 91, 96, 101, 106, 114, - 126, 130, 144, 95, 151, 69, 19, 55, 21, 23, - 25, 27, 29, 78, 80, 82, 92, 97, 102, 107, - -102, 61, 56, 65, 70, 71, 39, 57, 31, 110, - 138, 112, 137, 90, 132, 100, 56, 48, 56, 49, - 50, 57, 105, 57, 56, 40, 56, 56, 75, 57, - 118, 57, 57, -2, 1, 120, 2, 3, 4, 5, - 6, 7, 122, 124, 145, 153, 116, 76, 8, 119, - 127, 0, 9, 1, 121, 2, 3, 4, 5, 6, - 7, 123, 125, 146, 154, 139, 128, 8, 43, 108, - 142, 9, 0, 0, 0, 140, 0, 0, 0, 0, - 0, 141, 0, 44, 109, 143 -}; - -static const yysigned_char yycheck[] = -{ - 36, 1, 38, 1, 1, 1, 1, 20, 1, 1, - 0, 14, 1, 26, 9, 1, 1, 14, 1, 1, - 1, 1, 18, 16, 16, 25, 62, 25, 21, 21, - 66, 24, 24, 16, 23, 20, 21, 23, 21, 24, - 22, 24, 23, 23, 80, 1, 82, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 22, 25, 25, 62, 25, 1, 22, 1, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 1, 16, 1, 20, 21, 1, 21, 11, 1, - 126, 1, 1, 58, 121, 66, 16, 10, 16, 12, - 13, 21, 72, 21, 16, 20, 16, 16, 1, 21, - 1, 21, 21, 0, 1, 1, 3, 4, 5, 6, - 7, 8, 1, 1, 1, 1, 85, 20, 15, 20, - 1, -1, 19, 1, 20, 3, 4, 5, 6, 7, - 8, 20, 20, 20, 20, 1, 17, 15, 1, 1, - 1, 19, -1, -1, -1, 11, -1, -1, -1, -1, - -1, 17, -1, 16, 16, 16 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const unsigned char yystos[] = -{ - 0, 1, 3, 4, 5, 6, 7, 8, 15, 19, - 28, 29, 30, 31, 43, 45, 1, 22, 1, 22, - 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, - 0, 30, 47, 1, 23, 1, 23, 1, 23, 1, - 20, 1, 23, 1, 16, 20, 26, 46, 10, 12, - 13, 44, 48, 49, 50, 1, 16, 21, 32, 33, - 55, 1, 34, 35, 55, 1, 37, 38, 55, 1, - 20, 21, 40, 41, 42, 1, 20, 1, 22, 1, - 22, 1, 22, 1, 14, 51, 52, 53, 1, 24, - 33, 1, 22, 1, 24, 35, 1, 22, 1, 24, - 38, 1, 22, 1, 24, 41, 1, 22, 1, 16, - 1, 55, 1, 55, 1, 56, 52, 57, 1, 20, - 1, 20, 1, 20, 1, 20, 22, 1, 17, 54, - 25, 36, 36, 1, 58, 1, 25, 1, 55, 1, - 11, 17, 1, 16, 25, 1, 20, 1, 9, 1, - 18, 25, 39, 1, 20 -}; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ - -#define YYFAIL goto yyerrlab - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (0) - - -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (N) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (0) -#endif - - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -#ifndef YY_LOCATION_PRINT -# if YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) -#else -# define YYLEX yylex () -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yysymprint (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yy_stack_print (short int *bottom, short int *top) -#else -static void -yy_stack_print (bottom, top) - short int *bottom; - short int *top; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (/* Nothing. */; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yy_reduce_print (int yyrule) -#else -static void -yy_reduce_print (yyrule) - int yyrule; -#endif -{ - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ", - yyrule - 1, yylno); - /* Print the symbols being reduced, and their result. */ - for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) - YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); - YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]); -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (Rule); \ -} while (0) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined (__GLIBC__) && defined (_STRING_H) -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -# if defined (__STDC__) || defined (__cplusplus) -yystrlen (const char *yystr) -# else -yystrlen (yystr) - const char *yystr; -# endif -{ - const char *yys = yystr; - - while (*yys++ != '\0') - continue; - - return yys - yystr - 1; -} -# endif -# endif - -# ifndef yystpcpy -# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -# if defined (__STDC__) || defined (__cplusplus) -yystpcpy (char *yydest, const char *yysrc) -# else -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -# endif -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - size_t yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -#endif /* YYERROR_VERBOSE */ - - - -#if YYDEBUG -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) -#else -static void -yysymprint (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE *yyvaluep; -#endif -{ - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - switch (yytype) - { - default: - break; - } - YYFPRINTF (yyoutput, ")"); -} - -#endif /* ! YYDEBUG */ -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yymsg, yytype, yyvaluep) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; -#endif -{ - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - switch (yytype) - { - - default: - break; - } -} - - -/* Prevent warnings from -Wmissing-prototypes. */ - -#ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -int yyparse (void *YYPARSE_PARAM); -# else -int yyparse (); -# endif -#else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - - -/* The look-ahead symbol. */ -int yychar; - -/* The semantic value of the look-ahead symbol. */ -YYSTYPE yylval; - -/* Number of syntax errors so far. */ -int yynerrs; - - - -/*----------. -| yyparse. | -`----------*/ - -#ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -int yyparse (void *YYPARSE_PARAM) -# else -int yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -# endif -#else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) -int -yyparse (void) -#else -int -yyparse () - ; -#endif -#endif -{ - - int yystate; - int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Look-ahead token as an internal (translated) token number. */ - int yytoken = 0; - - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - short int yyssa[YYINITDEPTH]; - short int *yyss = yyssa; - short int *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; - - - -#define YYPOPSTACK (yyvsp--, yyssp--) - - YYSIZE_T yystacksize = YYINITDEPTH; - - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - - - /* When reducing, the number of symbols on the RHS of the reduced - rule. */ - int yylen; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - - yyssp = yyss; - yyvsp = yyvs; - - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. so pushing a state here evens the stacks. - */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - short int *yyss1 = yyss; - - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - short int *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - -/* Do appropriate processing given the current state. */ -/* Read a look-ahead token if we need one and don't already have one. */ -/* yyresume: */ - - /* First try to decide what to do without reference to look-ahead token. */ - - yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) - goto yydefault; - - /* Not known => get a look-ahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - if (yyn == YYFINAL) - YYACCEPT; - - /* Shift the look-ahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the token being shifted unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - *++yyvsp = yylval; - - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - yystate = yyn; - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: -#line 123 "tools/wmc/mcy.y" - { - if(!check_languages(nodehead)) - xyyerror("No messages defined\n"); - lanblockhead = block_messages(nodehead); - ;} - break; - - case 6: -#line 135 "tools/wmc/mcy.y" - { add_node(nd_msg, (yyvsp[0].msg)); ;} - break; - - case 7: -#line 136 "tools/wmc/mcy.y" - { add_node(nd_comment, (yyvsp[0].str)); ;} - break; - - case 8: -#line 137 "tools/wmc/mcy.y" - { xyyerror(err_syntax); /* `Catch all' error */ ;} - break; - - case 10: -#line 141 "tools/wmc/mcy.y" - { xyyerror(err_pclose); ;} - break; - - case 11: -#line 142 "tools/wmc/mcy.y" - { xyyerror(err_popen); ;} - break; - - case 12: -#line 143 "tools/wmc/mcy.y" - { xyyerror(err_assign); ;} - break; - - case 14: -#line 145 "tools/wmc/mcy.y" - { xyyerror(err_pclose); ;} - break; - - case 15: -#line 146 "tools/wmc/mcy.y" - { xyyerror(err_popen); ;} - break; - - case 16: -#line 147 "tools/wmc/mcy.y" - { xyyerror(err_assign); ;} - break; - - case 18: -#line 149 "tools/wmc/mcy.y" - { xyyerror(err_pclose); ;} - break; - - case 19: -#line 150 "tools/wmc/mcy.y" - { xyyerror(err_popen); ;} - break; - - case 20: -#line 151 "tools/wmc/mcy.y" - { xyyerror(err_assign); ;} - break; - - case 22: -#line 153 "tools/wmc/mcy.y" - { xyyerror(err_pclose); ;} - break; - - case 23: -#line 154 "tools/wmc/mcy.y" - { xyyerror(err_popen); ;} - break; - - case 24: -#line 155 "tools/wmc/mcy.y" - { xyyerror(err_assign); ;} - break; - - case 25: -#line 156 "tools/wmc/mcy.y" - { cast = (yyvsp[0].str); ;} - break; - - case 26: -#line 157 "tools/wmc/mcy.y" - { xyyerror(err_number); ;} - break; - - case 27: -#line 158 "tools/wmc/mcy.y" - { xyyerror(err_assign); ;} - break; - - case 28: -#line 159 "tools/wmc/mcy.y" - { - switch(base) - { - case 8: - case 10: - case 16: - base = (yyvsp[0].num); - break; - default: - xyyerror("Numberbase must be 8, 10 or 16\n"); - } - ;} - break; - - case 29: -#line 171 "tools/wmc/mcy.y" - { xyyerror(err_number); ;} - break; - - case 30: -#line 172 "tools/wmc/mcy.y" - { xyyerror(err_assign); ;} - break; - - case 33: -#line 180 "tools/wmc/mcy.y" - { xyyerror(err_ident); ;} - break; - - case 34: -#line 183 "tools/wmc/mcy.y" - { - (yyvsp[-3].tok)->token = (yyvsp[-1].num); - (yyvsp[-3].tok)->alias = (yyvsp[0].str); - if((yyvsp[-1].num) & (~0x3)) - xyyerror("Severity value out of range (0x%08x > 0x3)\n", (yyvsp[-1].num)); - do_add_token(tok_severity, (yyvsp[-3].tok), "severity"); - ;} - break; - - case 35: -#line 190 "tools/wmc/mcy.y" - { xyyerror(err_number); ;} - break; - - case 36: -#line 191 "tools/wmc/mcy.y" - { xyyerror(err_assign); ;} - break; - - case 39: -#line 199 "tools/wmc/mcy.y" - { xyyerror(err_ident); ;} - break; - - case 40: -#line 202 "tools/wmc/mcy.y" - { - (yyvsp[-3].tok)->token = (yyvsp[-1].num); - (yyvsp[-3].tok)->alias = (yyvsp[0].str); - if((yyvsp[-1].num) & (~0xfff)) - xyyerror("Facility value out of range (0x%08x > 0xfff)\n", (yyvsp[-1].num)); - do_add_token(tok_facility, (yyvsp[-3].tok), "facility"); - ;} - break; - - case 41: -#line 209 "tools/wmc/mcy.y" - { xyyerror(err_number); ;} - break; - - case 42: -#line 210 "tools/wmc/mcy.y" - { xyyerror(err_assign); ;} - break; - - case 43: -#line 213 "tools/wmc/mcy.y" - { (yyval.str) = NULL; ;} - break; - - case 44: -#line 214 "tools/wmc/mcy.y" - { (yyval.str) = (yyvsp[0].str); ;} - break; - - case 45: -#line 215 "tools/wmc/mcy.y" - { xyyerror(err_ident); ;} - break; - - case 48: -#line 223 "tools/wmc/mcy.y" - { xyyerror(err_ident); ;} - break; - - case 49: -#line 226 "tools/wmc/mcy.y" - { - (yyvsp[-6].tok)->token = (yyvsp[-4].num); - (yyvsp[-6].tok)->alias = (yyvsp[-1].str); - (yyvsp[-6].tok)->codepage = (yyvsp[0].num); - do_add_token(tok_language, (yyvsp[-6].tok), "language"); - if(!find_language((yyvsp[-4].num)) && !find_cpxlat((yyvsp[-4].num))) - mcy_warning("Language 0x%x not built-in, using codepage %d; use explicit codepage to override\n", (yyvsp[-4].num), WMC_DEFAULT_CODEPAGE); - ;} - break; - - case 50: -#line 234 "tools/wmc/mcy.y" - { xyyerror("Filename expected\n"); ;} - break; - - case 51: -#line 235 "tools/wmc/mcy.y" - { xyyerror(err_colon); ;} - break; - - case 52: -#line 236 "tools/wmc/mcy.y" - { xyyerror(err_number); ;} - break; - - case 53: -#line 237 "tools/wmc/mcy.y" - { xyyerror(err_assign); ;} - break; - - case 54: -#line 240 "tools/wmc/mcy.y" - { (yyval.num) = 0; ;} - break; - - case 55: -#line 241 "tools/wmc/mcy.y" - { (yyval.num) = (yyvsp[0].num); ;} - break; - - case 56: -#line 242 "tools/wmc/mcy.y" - { xyyerror("Codepage-number expected\n"); ;} - break; - - case 59: -#line 250 "tools/wmc/mcy.y" - { xyyerror(err_ident); ;} - break; - - case 60: -#line 253 "tools/wmc/mcy.y" - { - static const char err_nocp[] = "Codepage %d not builtin; cannot convert"; - if(find_cpxlat((yyvsp[-4].num))) - xyyerror("Codepage translation already defined for language 0x%x\n", (yyvsp[-4].num)); - if((yyvsp[-2].num) && !find_codepage((yyvsp[-2].num))) - xyyerror(err_nocp, (yyvsp[-2].num)); - if((yyvsp[0].num) && !find_codepage((yyvsp[0].num))) - xyyerror(err_nocp, (yyvsp[0].num)); - add_cpxlat((yyvsp[-4].num), (yyvsp[-2].num), (yyvsp[0].num)); - ;} - break; - - case 61: -#line 263 "tools/wmc/mcy.y" - { xyyerror(err_number); ;} - break; - - case 62: -#line 264 "tools/wmc/mcy.y" - { xyyerror(err_colon); ;} - break; - - case 63: -#line 265 "tools/wmc/mcy.y" - { xyyerror(err_number); ;} - break; - - case 64: -#line 266 "tools/wmc/mcy.y" - { xyyerror(err_assign); ;} - break; - - case 65: -#line 269 "tools/wmc/mcy.y" - { (yyval.num) = (yyvsp[0].num); ;} - break; - - case 66: -#line 270 "tools/wmc/mcy.y" - { - if((yyvsp[0].tok)->type != tok_language) - xyyerror("Language name or code expected\n"); - (yyval.num) = (yyvsp[0].tok)->token; - ;} - break; - - case 67: -#line 280 "tools/wmc/mcy.y" - { test_id((yyvsp[-1].num)); ;} - break; - - case 68: -#line 280 "tools/wmc/mcy.y" - { (yyval.msg) = complete_msg((yyvsp[0].msg), (yyvsp[-3].num)); ;} - break; - - case 69: -#line 283 "tools/wmc/mcy.y" - { - if((yyvsp[0].num) & (~0xffff)) - xyyerror("Message ID value out of range (0x%08x > 0xffff)\n", (yyvsp[0].num)); - (yyval.num) = (yyvsp[0].num); - ;} - break; - - case 70: -#line 288 "tools/wmc/mcy.y" - { xyyerror(err_assign); ;} - break; - - case 71: -#line 291 "tools/wmc/mcy.y" - { (yyval.num) = ++last_id; ;} - break; - - case 72: -#line 292 "tools/wmc/mcy.y" - { (yyval.num) = last_id = (yyvsp[0].num); ;} - break; - - case 73: -#line 293 "tools/wmc/mcy.y" - { (yyval.num) = last_id += (yyvsp[0].num); ;} - break; - - case 74: -#line 294 "tools/wmc/mcy.y" - { xyyerror(err_number); ;} - break; - - case 75: -#line 297 "tools/wmc/mcy.y" - { have_sev = have_fac = have_sym = 0; ;} - break; - - case 76: -#line 298 "tools/wmc/mcy.y" - { if(have_sev) xyyerror("Severity already defined\n"); have_sev = 1; ;} - break; - - case 77: -#line 299 "tools/wmc/mcy.y" - { if(have_fac) xyyerror("Facility already defined\n"); have_fac = 1; ;} - break; - - case 78: -#line 300 "tools/wmc/mcy.y" - { if(have_sym) xyyerror("Symbolname already defined\n"); have_sym = 1; ;} - break; - - case 79: -#line 303 "tools/wmc/mcy.y" - { last_sym = (yyvsp[0].str); ;} - break; - - case 80: -#line 304 "tools/wmc/mcy.y" - { xyyerror(err_ident); ;} - break; - - case 81: -#line 305 "tools/wmc/mcy.y" - { xyyerror(err_assign); ;} - break; - - case 82: -#line 308 "tools/wmc/mcy.y" - { - token_t *tok = lookup_token((yyvsp[0].tok)->name); - if(!tok) - xyyerror("Undefined severityname\n"); - if(tok->type != tok_severity) - xyyerror("Identifier is not of class 'severity'\n"); - last_sev = tok->token; - ;} - break; - - case 83: -#line 316 "tools/wmc/mcy.y" - { xyyerror(err_ident); ;} - break; - - case 84: -#line 317 "tools/wmc/mcy.y" - { xyyerror(err_assign); ;} - break; - - case 85: -#line 320 "tools/wmc/mcy.y" - { - token_t *tok = lookup_token((yyvsp[0].tok)->name); - if(!tok) - xyyerror("Undefined facilityname\n"); - if(tok->type != tok_facility) - xyyerror("Identifier is not of class 'facility'\n"); - last_fac = tok->token; - ;} - break; - - case 86: -#line 328 "tools/wmc/mcy.y" - { xyyerror(err_ident); ;} - break; - - case 87: -#line 329 "tools/wmc/mcy.y" - { xyyerror(err_assign); ;} - break; - - case 88: -#line 335 "tools/wmc/mcy.y" - { (yyval.msg) = add_lanmsg(NULL, (yyvsp[0].lmp)); ;} - break; - - case 89: -#line 336 "tools/wmc/mcy.y" - { (yyval.msg) = add_lanmsg((yyvsp[-1].msg), (yyvsp[0].lmp)); ;} - break; - - case 90: -#line 337 "tools/wmc/mcy.y" - { xyyerror("'Language=...' (start of message text-definition) expected\n"); ;} - break; - - case 91: -#line 340 "tools/wmc/mcy.y" - { (yyval.lmp) = new_lanmsg(&(yyvsp[-3].lcp), (yyvsp[-1].str)); ;} - break; - - case 92: -#line 348 "tools/wmc/mcy.y" - { - token_t *tok = lookup_token((yyvsp[-1].tok)->name); - cp_xlat_t *cpx; - if(!tok) - xyyerror("Undefined language\n"); - if(tok->type != tok_language) - xyyerror("Identifier is not of class 'language'\n"); - if((cpx = find_cpxlat(tok->token))) - { - set_codepage((yyval.lcp).codepage = cpx->cpin); - } - else if(!tok->codepage) - { - const language_t *lan = find_language(tok->token); - if(!lan) - { - /* Just set default; warning was given while parsing languagenames */ - set_codepage((yyval.lcp).codepage = WMC_DEFAULT_CODEPAGE); - } - else - { - /* The default seems to be to use the DOS codepage... */ - set_codepage((yyval.lcp).codepage = lan->doscp); - } - } - else - set_codepage((yyval.lcp).codepage = tok->codepage); - (yyval.lcp).language = tok->token; - ;} - break; - - case 93: -#line 377 "tools/wmc/mcy.y" - { xyyerror("Missing newline\n"); ;} - break; - - case 94: -#line 378 "tools/wmc/mcy.y" - { xyyerror(err_ident); ;} - break; - - case 95: -#line 379 "tools/wmc/mcy.y" - { xyyerror(err_assign); ;} - break; - - case 96: -#line 382 "tools/wmc/mcy.y" - { (yyval.str) = (yyvsp[0].str); ;} - break; - - case 97: -#line 383 "tools/wmc/mcy.y" - { (yyval.str) = merge((yyvsp[-1].str), (yyvsp[0].str)); ;} - break; - - case 98: -#line 384 "tools/wmc/mcy.y" - { xyyerror(err_msg); ;} - break; - - case 99: -#line 385 "tools/wmc/mcy.y" - { xyyerror(err_msg); ;} - break; - - case 100: -#line 391 "tools/wmc/mcy.y" - { (yyval.tok) = xmalloc(sizeof(token_t)); memset((yyval.tok),0,sizeof(*(yyval.tok))); (yyval.tok)->name = (yyvsp[0].str); ;} - break; - - case 101: -#line 392 "tools/wmc/mcy.y" - { (yyval.tok) = (yyvsp[0].tok); ;} - break; - - case 102: -#line 395 "tools/wmc/mcy.y" - { want_nl = 1; ;} - break; - - case 103: -#line 398 "tools/wmc/mcy.y" - { want_line = 1; ;} - break; - - case 104: -#line 401 "tools/wmc/mcy.y" - { want_file = 1; ;} - break; - - - default: break; - } - -/* Line 1126 of yacc.c. */ -#line 1890 "mcy.tab.c" - - yyvsp -= yylen; - yyssp -= yylen; - - - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if YYERROR_VERBOSE - yyn = yypact[yystate]; - - if (YYPACT_NINF < yyn && yyn < YYLAST) - { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - char *yymsg = 0; -# define YYERROR_VERBOSE_ARGS_MAXIMUM 5 - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -#if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -#endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= yysize1 < yysize; - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } - - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= yysize1 < yysize; - yysize = yysize1; - - if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM) - yymsg = (char *) YYSTACK_ALLOC (yysize); - if (yymsg) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yymsg; - int yyi = 0; - while ((*yyp = *yyf)) - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - yyerror (yymsg); - YYSTACK_FREE (yymsg); - } - else - { - yyerror (YY_("syntax error")); - goto yyexhaustedlab; - } - } - else -#endif /* YYERROR_VERBOSE */ - yyerror (YY_("syntax error")); - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse look-ahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", yytoken, &yylval); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse look-ahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (0) - goto yyerrorlab; - -yyvsp -= yylen; - yyssp -= yylen; - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - - yydestruct ("Error: popping", yystos[yystate], yyvsp); - YYPOPSTACK; - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - if (yyn == YYFINAL) - YYACCEPT; - - *++yyvsp = yylval; - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#ifndef yyoverflow -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEOF && yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); - YYPOPSTACK; - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif - return yyresult; -} - - -#line 404 "tools/wmc/mcy.y" - - -static WCHAR *merge(WCHAR *s1, WCHAR *s2) -{ - int l1 = unistrlen(s1); - int l2 = unistrlen(s2); - s1 = xrealloc(s1, (l1 + l2 + 1) * sizeof(*s1)); - unistrcpy(s1+l1, s2); - free(s2); - return s1; -} - -static void do_add_token(tok_e type, token_t *tok, const char *code) -{ - token_t *tp = lookup_token(tok->name); - if(tp) - { - if(tok->type != type) - mcy_warning("Type change in token\n"); - if(tp != tok) - xyyerror("Overlapping token not the same\n"); - /* else its already defined and changed */ - if(tok->fixed) - xyyerror("Redefinition of %s\n", code); - tok->fixed = 1; - } - else - { - add_token(type, tok->name, tok->token, tok->codepage, tok->alias, 1); - free(tok); - } -} - -static lanmsg_t *new_lanmsg(lan_cp_t *lcp, WCHAR *msg) -{ - lanmsg_t *lmp = xmalloc(sizeof(lanmsg_t)); - lmp->lan = lcp->language; - lmp->cp = lcp->codepage; - lmp->msg = msg; - lmp->len = unistrlen(msg) + 1; /* Include termination */ - if(lmp->len > 4096) - mcy_warning("Message exceptionally long; might be a missing termination\n"); - return lmp; -} - -static msg_t *add_lanmsg(msg_t *msg, lanmsg_t *lanmsg) -{ - int i; - if(!msg) - { - msg = xmalloc(sizeof(msg_t)); - memset( msg, 0, sizeof(*msg) ); - } - msg->msgs = xrealloc(msg->msgs, (msg->nmsgs+1) * sizeof(*(msg->msgs))); - msg->msgs[msg->nmsgs] = lanmsg; - msg->nmsgs++; - for(i = 0; i < msg->nmsgs-1; i++) - { - if(msg->msgs[i]->lan == lanmsg->lan) - xyyerror("Message for language 0x%x already defined\n", lanmsg->lan); - } - return msg; -} - -static int sort_lanmsg(const void *p1, const void *p2) -{ - return (*(const lanmsg_t * const *)p1)->lan - (*(const lanmsg_t * const*)p2)->lan; -} - -static msg_t *complete_msg(msg_t *mp, int id) -{ - assert(mp != NULL); - mp->id = id; - if(have_sym) - mp->sym = last_sym; - else - xyyerror("No symbolic name defined for message id %d\n", id); - mp->sev = last_sev; - mp->fac = last_fac; - qsort(mp->msgs, mp->nmsgs, sizeof(*(mp->msgs)), sort_lanmsg); - mp->realid = id | (last_sev << 30) | (last_fac << 16); - if(custombit) - mp->realid |= 1 << 29; - mp->base = base; - mp->cast = cast; - return mp; -} - -static void add_node(node_e type, void *p) -{ - node_t *ndp = xmalloc(sizeof(node_t)); - memset( ndp, 0, sizeof(*ndp) ); - ndp->type = type; - ndp->u.all = p; - - if(nodetail) - { - ndp->prev = nodetail; - nodetail->next = ndp; - nodetail = ndp; - } - else - { - nodehead = nodetail = ndp; - } -} - -static void test_id(int id) -{ - node_t *ndp; - for(ndp = nodehead; ndp; ndp = ndp->next) - { - if(ndp->type != nd_msg) - continue; - if(ndp->u.msg->id == id && ndp->u.msg->sev == last_sev && ndp->u.msg->fac == last_fac) - xyyerror("MessageId %d with facility 0x%x and severity 0x%x already defined\n", id, last_fac, last_sev); - } -} - -static int check_languages(node_t *head) -{ - static const char err_missing[] = "Missing definition for language 0x%x; MessageID %d, facility 0x%x, severity 0x%x"; - node_t *ndp; - int nm = 0; - msg_t *msg = NULL; - - for(ndp = head; ndp; ndp = ndp->next) - { - if(ndp->type != nd_msg) - continue; - if(!nm) - { - msg = ndp->u.msg; - } - else - { - int i; - msg_t *m1; - msg_t *m2; - if(ndp->u.msg->nmsgs > msg->nmsgs) - { - m1 = ndp->u.msg; - m2 = msg; - } - else - { - m1 = msg; - m2 = ndp->u.msg; - } - - for(i = 0; i < m1->nmsgs; i++) - { - if(i > m2->nmsgs) - error(err_missing, m1->msgs[i]->lan, m2->id, m2->fac, m2->sev); - else if(m1->msgs[i]->lan < m2->msgs[i]->lan) - error(err_missing, m1->msgs[i]->lan, m2->id, m2->fac, m2->sev); - else if(m1->msgs[i]->lan > m2->msgs[i]->lan) - error(err_missing, m2->msgs[i]->lan, m1->id, m1->fac, m1->sev); - } - } - nm++; - } - return nm; -} - -#define MSGRID(x) ((*(const msg_t * const*)(x))->realid) -static int sort_msg(const void *p1, const void *p2) -{ - return MSGRID(p1) > MSGRID(p2) ? 1 : (MSGRID(p1) == MSGRID(p2) ? 0 : -1); - /* return (*(msg_t **)p1)->realid - (*(msg_t **)p1)->realid; */ -} - -/* - * block_messages() basically transposes the messages - * from ID/language based list to a language/ID - * based list. - */ -static lan_blk_t *block_messages(node_t *head) -{ - lan_blk_t *lbp; - lan_blk_t *lblktail = NULL; - lan_blk_t *lblkhead = NULL; - msg_t **msgtab = NULL; - node_t *ndp; - int nmsg = 0; - int i; - int nl; - int factor = unicodeout ? 2 : 1; - - for(ndp = head; ndp; ndp = ndp->next) - { - if(ndp->type != nd_msg) - continue; - msgtab = xrealloc(msgtab, (nmsg+1) * sizeof(*msgtab)); - msgtab[nmsg++] = ndp->u.msg; - } - - assert(nmsg != 0); - qsort(msgtab, nmsg, sizeof(*msgtab), sort_msg); - - for(nl = 0; nl < msgtab[0]->nmsgs; nl++) /* This should be equal for all after check_languages() */ - { - lbp = xmalloc(sizeof(lan_blk_t)); - memset( lbp, 0, sizeof(*lbp) ); - if(!lblktail) - { - lblkhead = lblktail = lbp; - } - else - { - lblktail->next = lbp; - lbp->prev = lblktail; - lblktail = lbp; - } - lbp->nblk = 1; - lbp->blks = xmalloc(sizeof(*lbp->blks)); - lbp->blks[0].idlo = msgtab[0]->realid; - lbp->blks[0].idhi = msgtab[0]->realid; - /* The plus 4 is the entry header; (+3)&~3 is DWORD alignment */ - lbp->blks[0].size = ((factor * msgtab[0]->msgs[nl]->len + 3) & ~3) + 4; - lbp->blks[0].msgs = xmalloc(sizeof(*lbp->blks[0].msgs)); - lbp->blks[0].nmsg = 1; - lbp->blks[0].msgs[0] = msgtab[0]->msgs[nl]; - lbp->lan = msgtab[0]->msgs[nl]->lan; - - for(i = 1; i < nmsg; i++) - { - block_t *blk = &(lbp->blks[lbp->nblk-1]); - if(msgtab[i]->realid == blk->idhi+1) - { - blk->size += ((factor * msgtab[i]->msgs[nl]->len + 3) & ~3) + 4; - blk->idhi++; - blk->msgs = xrealloc(blk->msgs, (blk->nmsg+1) * sizeof(*blk->msgs)); - blk->msgs[blk->nmsg++] = msgtab[i]->msgs[nl]; - } - else - { - lbp->nblk++; - lbp->blks = xrealloc(lbp->blks, lbp->nblk * sizeof(*lbp->blks)); - blk = &(lbp->blks[lbp->nblk-1]); - blk->idlo = msgtab[i]->realid; - blk->idhi = msgtab[i]->realid; - blk->size = ((factor * msgtab[i]->msgs[nl]->len + 3) & ~3) + 4; - blk->msgs = xmalloc(sizeof(*blk->msgs)); - blk->nmsg = 1; - blk->msgs[0] = msgtab[i]->msgs[nl]; - } - } - } - free(msgtab); - return lblkhead; -} - -static int sc_xlat(const void *p1, const void *p2) -{ - return ((const cp_xlat_t *)p1)->lan - ((const cp_xlat_t *)p2)->lan; -} - -static void add_cpxlat(int lan, int cpin, int cpout) -{ - cpxlattab = xrealloc(cpxlattab, (ncpxlattab+1) * sizeof(*cpxlattab)); - cpxlattab[ncpxlattab].lan = lan; - cpxlattab[ncpxlattab].cpin = cpin; - cpxlattab[ncpxlattab].cpout = cpout; - ncpxlattab++; - qsort(cpxlattab, ncpxlattab, sizeof(*cpxlattab), sc_xlat); -} - -static cp_xlat_t *find_cpxlat(int lan) -{ - cp_xlat_t t; - - if(!cpxlattab) return NULL; - - t.lan = lan; - return (cp_xlat_t *)bsearch(&t, cpxlattab, ncpxlattab, sizeof(*cpxlattab), sc_xlat); -} - diff --git a/reactos/tools/wmc/mcy.tab.h b/reactos/tools/wmc/mcy.tab.h deleted file mode 100644 index 493093cb3de..00000000000 --- a/reactos/tools/wmc/mcy.tab.h +++ /dev/null @@ -1,97 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.1. */ - -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. - - 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, 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. */ - -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - tSEVNAMES = 258, - tFACNAMES = 259, - tLANNAMES = 260, - tBASE = 261, - tCODEPAGE = 262, - tTYPEDEF = 263, - tNL = 264, - tSYMNAME = 265, - tMSGEND = 266, - tSEVERITY = 267, - tFACILITY = 268, - tLANGUAGE = 269, - tMSGID = 270, - tIDENT = 271, - tLINE = 272, - tFILE = 273, - tCOMMENT = 274, - tNUMBER = 275, - tTOKEN = 276 - }; -#endif -/* Tokens. */ -#define tSEVNAMES 258 -#define tFACNAMES 259 -#define tLANNAMES 260 -#define tBASE 261 -#define tCODEPAGE 262 -#define tTYPEDEF 263 -#define tNL 264 -#define tSYMNAME 265 -#define tMSGEND 266 -#define tSEVERITY 267 -#define tFACILITY 268 -#define tLANGUAGE 269 -#define tMSGID 270 -#define tIDENT 271 -#define tLINE 272 -#define tFILE 273 -#define tCOMMENT 274 -#define tNUMBER 275 -#define tTOKEN 276 - - - - -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 98 "tools/wmc/mcy.y" -typedef union YYSTYPE { - WCHAR *str; - unsigned num; - token_t *tok; - lanmsg_t *lmp; - msg_t *msg; - lan_cp_t lcp; -} YYSTYPE; -/* Line 1447 of yacc.c. */ -#line 89 "tools/wmc/mcy.tab.h" -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 -#endif - -extern YYSTYPE mcy_lval; - - - diff --git a/reactos/tools/wmc/mcy.y b/reactos/tools/wmc/mcy.y deleted file mode 100644 index 2887df56b6d..00000000000 --- a/reactos/tools/wmc/mcy.y +++ /dev/null @@ -1,680 +0,0 @@ -/* - * Wine Message Compiler parser - * - * 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 - * - * NOTES: - * - * The basic grammar of the file is yet another example of, humpf, - * design. There is a mix of context-insensitive and -sensitive - * stuff, which makes it rather complicated. - * The header definitions are all context-insensitive because they have - * delimited arguments, whereas the message headers are (semi-) context- - * sensitive and the messages themselves are, well, RFC82[12] delimited. - * This mixture seems to originate from the time that ms and ibm were - * good friends and developing os/2 according to the "compatibility" - * switch and reading some comments here and there. - * - * I'll ignore most of the complications and concentrate on the concept - * which allows me to use yacc. Basically, everything is context- - * insensitive now, with the exception of the message-text itself and - * the preceding language declaration. - * - */ - -%{ - -#include "config.h" - -#include -#include -#include - -#include "utils.h" -#include "wmc.h" -#include "lang.h" - -static const char err_syntax[] = "Syntax error"; -static const char err_number[] = "Number expected"; -static const char err_ident[] = "Identifier expected"; -static const char err_assign[] = "'=' expected"; -static const char err_popen[] = "'(' expected"; -static const char err_pclose[] = "')' expected"; -static const char err_colon[] = "':' expected"; -static const char err_msg[] = "Message expected"; - -/* Scanner switches */ -int want_nl = 0; /* Request next newlinw */ -int want_line = 0; /* Request next complete line */ -int want_file = 0; /* Request next ident as filename */ - -node_t *nodehead = NULL; /* The list of all parsed elements */ -static node_t *nodetail = NULL; -lan_blk_t *lanblockhead; /* List of parsed elements transposed */ - -static int base = 16; /* Current printout base to use (8, 10 or 16) */ -static WCHAR *cast = NULL; /* Current typecast to use */ - -static int last_id = 0; /* The last message ID parsed */ -static int last_sev = 0; /* Last severity code parsed */ -static int last_fac = 0; /* Last facility code parsed */ -static WCHAR *last_sym = NULL;/* Last alias symbol parsed */ -static int have_sev; /* Set if severity parsed for current message */ -static int have_fac; /* Set if facility parsed for current message */ -static int have_sym; /* Set is symbol parsed for current message */ - -static cp_xlat_t *cpxlattab = NULL; /* Codepage translation table */ -static int ncpxlattab = 0; - -/* Prototypes */ -static WCHAR *merge(WCHAR *s1, WCHAR *s2); -static lanmsg_t *new_lanmsg(lan_cp_t *lcp, WCHAR *msg); -static msg_t *add_lanmsg(msg_t *msg, lanmsg_t *lanmsg); -static msg_t *complete_msg(msg_t *msg, int id); -static void add_node(node_e type, void *p); -static void do_add_token(tok_e type, token_t *tok, const char *code); -static void test_id(int id); -static int check_languages(node_t *head); -static lan_blk_t *block_messages(node_t *head); -static void add_cpxlat(int lan, int cpin, int cpout); -static cp_xlat_t *find_cpxlat(int lan); - -%} - -%union { - WCHAR *str; - unsigned num; - token_t *tok; - lanmsg_t *lmp; - msg_t *msg; - lan_cp_t lcp; -} - - -%token tSEVNAMES tFACNAMES tLANNAMES tBASE tCODEPAGE -%token tTYPEDEF tNL tSYMNAME tMSGEND -%token tSEVERITY tFACILITY tLANGUAGE tMSGID -%token tIDENT tLINE tFILE tCOMMENT -%token tNUMBER -%token tTOKEN - -%type alias lines -%type optcp id msgid clan -%type token -%type body -%type bodies msg -%type lang - -%% -file : items { - if(!check_languages(nodehead)) - xyyerror("No messages defined\n"); - lanblockhead = block_messages(nodehead); - } - ; - -items : decl - | items decl - ; - -decl : global - | msg { add_node(nd_msg, $1); } - | tCOMMENT { add_node(nd_comment, $1); } - | error { xyyerror(err_syntax); /* `Catch all' error */ } - ; - -global : tSEVNAMES '=' '(' smaps ')' - | tSEVNAMES '=' '(' smaps error { xyyerror(err_pclose); } - | tSEVNAMES '=' error { xyyerror(err_popen); } - | tSEVNAMES error { xyyerror(err_assign); } - | tFACNAMES '=' '(' fmaps ')' - | tFACNAMES '=' '(' fmaps error { xyyerror(err_pclose); } - | tFACNAMES '=' error { xyyerror(err_popen); } - | tFACNAMES error { xyyerror(err_assign); } - | tLANNAMES '=' '(' lmaps ')' - | tLANNAMES '=' '(' lmaps error { xyyerror(err_pclose); } - | tLANNAMES '=' error { xyyerror(err_popen); } - | tLANNAMES error { xyyerror(err_assign); } - | tCODEPAGE '=' '(' cmaps ')' - | tCODEPAGE '=' '(' cmaps error { xyyerror(err_pclose); } - | tCODEPAGE '=' error { xyyerror(err_popen); } - | tCODEPAGE error { xyyerror(err_assign); } - | tTYPEDEF '=' tIDENT { cast = $3; } - | tTYPEDEF '=' error { xyyerror(err_number); } - | tTYPEDEF error { xyyerror(err_assign); } - | tBASE '=' tNUMBER { - switch(base) - { - case 8: - case 10: - case 16: - base = $3; - break; - default: - xyyerror("Numberbase must be 8, 10 or 16\n"); - } - } - | tBASE '=' error { xyyerror(err_number); } - | tBASE error { xyyerror(err_assign); } - ; - -/*---------------------------------------------------------------------- - * SeverityNames mapping - */ -smaps : smap - | smaps smap - | error { xyyerror(err_ident); } - ; - -smap : token '=' tNUMBER alias { - $1->token = $3; - $1->alias = $4; - if($3 & (~0x3)) - xyyerror("Severity value out of range (0x%08x > 0x3)\n", $3); - do_add_token(tok_severity, $1, "severity"); - } - | token '=' error { xyyerror(err_number); } - | token error { xyyerror(err_assign); } - ; - -/*---------------------------------------------------------------------- - * FacilityNames mapping - */ -fmaps : fmap - | fmaps fmap - | error { xyyerror(err_ident); } - ; - -fmap : token '=' tNUMBER alias { - $1->token = $3; - $1->alias = $4; - if($3 & (~0xfff)) - xyyerror("Facility value out of range (0x%08x > 0xfff)\n", $3); - do_add_token(tok_facility, $1, "facility"); - } - | token '=' error { xyyerror(err_number); } - | token error { xyyerror(err_assign); } - ; - -alias : /* Empty */ { $$ = NULL; } - | ':' tIDENT { $$ = $2; } - | ':' error { xyyerror(err_ident); } - ; - -/*---------------------------------------------------------------------- - * LanguageNames mapping - */ -lmaps : lmap - | lmaps lmap - | error { xyyerror(err_ident); } - ; - -lmap : token '=' tNUMBER setfile ':' tFILE optcp { - $1->token = $3; - $1->alias = $6; - $1->codepage = $7; - do_add_token(tok_language, $1, "language"); - if(!find_language($3) && !find_cpxlat($3)) - mcy_warning("Language 0x%x not built-in, using codepage %d; use explicit codepage to override\n", $3, WMC_DEFAULT_CODEPAGE); - } - | token '=' tNUMBER setfile ':' error { xyyerror("Filename expected\n"); } - | token '=' tNUMBER error { xyyerror(err_colon); } - | token '=' error { xyyerror(err_number); } - | token error { xyyerror(err_assign); } - ; - -optcp : /* Empty */ { $$ = 0; } - | ':' tNUMBER { $$ = $2; } - | ':' error { xyyerror("Codepage-number expected\n"); } - ; - -/*---------------------------------------------------------------------- - * Codepages mapping - */ -cmaps : cmap - | cmaps cmap - | error { xyyerror(err_ident); } - ; - -cmap : clan '=' tNUMBER ':' tNUMBER { - static const char err_nocp[] = "Codepage %d not builtin; cannot convert"; - if(find_cpxlat($1)) - xyyerror("Codepage translation already defined for language 0x%x\n", $1); - if($3 && !find_codepage($3)) - xyyerror(err_nocp, $3); - if($5 && !find_codepage($5)) - xyyerror(err_nocp, $5); - add_cpxlat($1, $3, $5); - } - | clan '=' tNUMBER ':' error { xyyerror(err_number); } - | clan '=' tNUMBER error { xyyerror(err_colon); } - | clan '=' error { xyyerror(err_number); } - | clan error { xyyerror(err_assign); } - ; - -clan : tNUMBER { $$ = $1; } - | tTOKEN { - if($1->type != tok_language) - xyyerror("Language name or code expected\n"); - $$ = $1->token; - } - ; - -/*---------------------------------------------------------------------- - * Message-definition parsing - */ -msg : msgid sevfacsym { test_id($1); } bodies { $$ = complete_msg($4, $1); } - ; - -msgid : tMSGID '=' id { - if($3 & (~0xffff)) - xyyerror("Message ID value out of range (0x%08x > 0xffff)\n", $3); - $$ = $3; - } - | tMSGID error { xyyerror(err_assign); } - ; - -id : /* Empty */ { $$ = ++last_id; } - | tNUMBER { $$ = last_id = $1; } - | '+' tNUMBER { $$ = last_id += $2; } - | '+' error { xyyerror(err_number); } - ; - -sevfacsym: /* Empty */ { have_sev = have_fac = have_sym = 0; } - | sevfacsym sev { if(have_sev) xyyerror("Severity already defined\n"); have_sev = 1; } - | sevfacsym fac { if(have_fac) xyyerror("Facility already defined\n"); have_fac = 1; } - | sevfacsym sym { if(have_sym) xyyerror("Symbolname already defined\n"); have_sym = 1; } - ; - -sym : tSYMNAME '=' tIDENT { last_sym = $3; } - | tSYMNAME '=' error { xyyerror(err_ident); } - | tSYMNAME error { xyyerror(err_assign); } - ; - -sev : tSEVERITY '=' token { - token_t *tok = lookup_token($3->name); - if(!tok) - xyyerror("Undefined severityname\n"); - if(tok->type != tok_severity) - xyyerror("Identifier is not of class 'severity'\n"); - last_sev = tok->token; - } - | tSEVERITY '=' error { xyyerror(err_ident); } - | tSEVERITY error { xyyerror(err_assign); } - ; - -fac : tFACILITY '=' token { - token_t *tok = lookup_token($3->name); - if(!tok) - xyyerror("Undefined facilityname\n"); - if(tok->type != tok_facility) - xyyerror("Identifier is not of class 'facility'\n"); - last_fac = tok->token; - } - | tFACILITY '=' error { xyyerror(err_ident); } - | tFACILITY error { xyyerror(err_assign); } - ; - -/*---------------------------------------------------------------------- - * Message-text parsing - */ -bodies : body { $$ = add_lanmsg(NULL, $1); } - | bodies body { $$ = add_lanmsg($1, $2); } - | error { xyyerror("'Language=...' (start of message text-definition) expected\n"); } - ; - -body : lang setline lines tMSGEND { $$ = new_lanmsg(&$1, $3); } - ; - - /* - * The newline is to be able to set the codepage - * to the language based codepage for the next - * message to be parsed. - */ -lang : tLANGUAGE setnl '=' token tNL { - token_t *tok = lookup_token($4->name); - cp_xlat_t *cpx; - if(!tok) - xyyerror("Undefined language\n"); - if(tok->type != tok_language) - xyyerror("Identifier is not of class 'language'\n"); - if((cpx = find_cpxlat(tok->token))) - { - set_codepage($$.codepage = cpx->cpin); - } - else if(!tok->codepage) - { - const language_t *lan = find_language(tok->token); - if(!lan) - { - /* Just set default; warning was given while parsing languagenames */ - set_codepage($$.codepage = WMC_DEFAULT_CODEPAGE); - } - else - { - /* The default seems to be to use the DOS codepage... */ - set_codepage($$.codepage = lan->doscp); - } - } - else - set_codepage($$.codepage = tok->codepage); - $$.language = tok->token; - } - | tLANGUAGE setnl '=' token error { xyyerror("Missing newline\n"); } - | tLANGUAGE setnl '=' error { xyyerror(err_ident); } - | tLANGUAGE error { xyyerror(err_assign); } - ; - -lines : tLINE { $$ = $1; } - | lines tLINE { $$ = merge($1, $2); } - | error { xyyerror(err_msg); } - | lines error { xyyerror(err_msg); } - ; - -/*---------------------------------------------------------------------- - * Helper rules - */ -token : tIDENT { $$ = xmalloc(sizeof(token_t)); memset($$,0,sizeof(*$$)); $$->name = $1; } - | tTOKEN { $$ = $1; } - ; - -setnl : /* Empty */ { want_nl = 1; } - ; - -setline : /* Empty */ { want_line = 1; } - ; - -setfile : /* Empty */ { want_file = 1; } - ; - -%% - -static WCHAR *merge(WCHAR *s1, WCHAR *s2) -{ - int l1 = unistrlen(s1); - int l2 = unistrlen(s2); - s1 = xrealloc(s1, (l1 + l2 + 1) * sizeof(*s1)); - unistrcpy(s1+l1, s2); - free(s2); - return s1; -} - -static void do_add_token(tok_e type, token_t *tok, const char *code) -{ - token_t *tp = lookup_token(tok->name); - if(tp) - { - if(tok->type != type) - mcy_warning("Type change in token\n"); - if(tp != tok) - xyyerror("Overlapping token not the same\n"); - /* else its already defined and changed */ - if(tok->fixed) - xyyerror("Redefinition of %s\n", code); - tok->fixed = 1; - } - else - { - add_token(type, tok->name, tok->token, tok->codepage, tok->alias, 1); - free(tok); - } -} - -static lanmsg_t *new_lanmsg(lan_cp_t *lcp, WCHAR *msg) -{ - lanmsg_t *lmp = xmalloc(sizeof(lanmsg_t)); - lmp->lan = lcp->language; - lmp->cp = lcp->codepage; - lmp->msg = msg; - lmp->len = unistrlen(msg) + 1; /* Include termination */ - if(lmp->len > 4096) - mcy_warning("Message exceptionally long; might be a missing termination\n"); - return lmp; -} - -static msg_t *add_lanmsg(msg_t *msg, lanmsg_t *lanmsg) -{ - int i; - if(!msg) - { - msg = xmalloc(sizeof(msg_t)); - memset( msg, 0, sizeof(*msg) ); - } - msg->msgs = xrealloc(msg->msgs, (msg->nmsgs+1) * sizeof(*(msg->msgs))); - msg->msgs[msg->nmsgs] = lanmsg; - msg->nmsgs++; - for(i = 0; i < msg->nmsgs-1; i++) - { - if(msg->msgs[i]->lan == lanmsg->lan) - xyyerror("Message for language 0x%x already defined\n", lanmsg->lan); - } - return msg; -} - -static int sort_lanmsg(const void *p1, const void *p2) -{ - return (*(const lanmsg_t * const *)p1)->lan - (*(const lanmsg_t * const*)p2)->lan; -} - -static msg_t *complete_msg(msg_t *mp, int id) -{ - assert(mp != NULL); - mp->id = id; - if(have_sym) - mp->sym = last_sym; - else - xyyerror("No symbolic name defined for message id %d\n", id); - mp->sev = last_sev; - mp->fac = last_fac; - qsort(mp->msgs, mp->nmsgs, sizeof(*(mp->msgs)), sort_lanmsg); - mp->realid = id | (last_sev << 30) | (last_fac << 16); - if(custombit) - mp->realid |= 1 << 29; - mp->base = base; - mp->cast = cast; - return mp; -} - -static void add_node(node_e type, void *p) -{ - node_t *ndp = xmalloc(sizeof(node_t)); - memset( ndp, 0, sizeof(*ndp) ); - ndp->type = type; - ndp->u.all = p; - - if(nodetail) - { - ndp->prev = nodetail; - nodetail->next = ndp; - nodetail = ndp; - } - else - { - nodehead = nodetail = ndp; - } -} - -static void test_id(int id) -{ - node_t *ndp; - for(ndp = nodehead; ndp; ndp = ndp->next) - { - if(ndp->type != nd_msg) - continue; - if(ndp->u.msg->id == id && ndp->u.msg->sev == last_sev && ndp->u.msg->fac == last_fac) - xyyerror("MessageId %d with facility 0x%x and severity 0x%x already defined\n", id, last_fac, last_sev); - } -} - -static int check_languages(node_t *head) -{ - static const char err_missing[] = "Missing definition for language 0x%x; MessageID %d, facility 0x%x, severity 0x%x"; - node_t *ndp; - int nm = 0; - msg_t *msg = NULL; - - for(ndp = head; ndp; ndp = ndp->next) - { - if(ndp->type != nd_msg) - continue; - if(!nm) - { - msg = ndp->u.msg; - } - else - { - int i; - msg_t *m1; - msg_t *m2; - if(ndp->u.msg->nmsgs > msg->nmsgs) - { - m1 = ndp->u.msg; - m2 = msg; - } - else - { - m1 = msg; - m2 = ndp->u.msg; - } - - for(i = 0; i < m1->nmsgs; i++) - { - if(i > m2->nmsgs) - error(err_missing, m1->msgs[i]->lan, m2->id, m2->fac, m2->sev); - else if(m1->msgs[i]->lan < m2->msgs[i]->lan) - error(err_missing, m1->msgs[i]->lan, m2->id, m2->fac, m2->sev); - else if(m1->msgs[i]->lan > m2->msgs[i]->lan) - error(err_missing, m2->msgs[i]->lan, m1->id, m1->fac, m1->sev); - } - } - nm++; - } - return nm; -} - -#define MSGRID(x) ((*(const msg_t * const*)(x))->realid) -static int sort_msg(const void *p1, const void *p2) -{ - return MSGRID(p1) > MSGRID(p2) ? 1 : (MSGRID(p1) == MSGRID(p2) ? 0 : -1); - /* return (*(msg_t **)p1)->realid - (*(msg_t **)p1)->realid; */ -} - -/* - * block_messages() basically transposes the messages - * from ID/language based list to a language/ID - * based list. - */ -static lan_blk_t *block_messages(node_t *head) -{ - lan_blk_t *lbp; - lan_blk_t *lblktail = NULL; - lan_blk_t *lblkhead = NULL; - msg_t **msgtab = NULL; - node_t *ndp; - int nmsg = 0; - int i; - int nl; - int factor = unicodeout ? 2 : 1; - - for(ndp = head; ndp; ndp = ndp->next) - { - if(ndp->type != nd_msg) - continue; - msgtab = xrealloc(msgtab, (nmsg+1) * sizeof(*msgtab)); - msgtab[nmsg++] = ndp->u.msg; - } - - assert(nmsg != 0); - qsort(msgtab, nmsg, sizeof(*msgtab), sort_msg); - - for(nl = 0; nl < msgtab[0]->nmsgs; nl++) /* This should be equal for all after check_languages() */ - { - lbp = xmalloc(sizeof(lan_blk_t)); - memset( lbp, 0, sizeof(*lbp) ); - if(!lblktail) - { - lblkhead = lblktail = lbp; - } - else - { - lblktail->next = lbp; - lbp->prev = lblktail; - lblktail = lbp; - } - lbp->nblk = 1; - lbp->blks = xmalloc(sizeof(*lbp->blks)); - lbp->blks[0].idlo = msgtab[0]->realid; - lbp->blks[0].idhi = msgtab[0]->realid; - /* The plus 4 is the entry header; (+3)&~3 is DWORD alignment */ - lbp->blks[0].size = ((factor * msgtab[0]->msgs[nl]->len + 3) & ~3) + 4; - lbp->blks[0].msgs = xmalloc(sizeof(*lbp->blks[0].msgs)); - lbp->blks[0].nmsg = 1; - lbp->blks[0].msgs[0] = msgtab[0]->msgs[nl]; - lbp->lan = msgtab[0]->msgs[nl]->lan; - - for(i = 1; i < nmsg; i++) - { - block_t *blk = &(lbp->blks[lbp->nblk-1]); - if(msgtab[i]->realid == blk->idhi+1) - { - blk->size += ((factor * msgtab[i]->msgs[nl]->len + 3) & ~3) + 4; - blk->idhi++; - blk->msgs = xrealloc(blk->msgs, (blk->nmsg+1) * sizeof(*blk->msgs)); - blk->msgs[blk->nmsg++] = msgtab[i]->msgs[nl]; - } - else - { - lbp->nblk++; - lbp->blks = xrealloc(lbp->blks, lbp->nblk * sizeof(*lbp->blks)); - blk = &(lbp->blks[lbp->nblk-1]); - blk->idlo = msgtab[i]->realid; - blk->idhi = msgtab[i]->realid; - blk->size = ((factor * msgtab[i]->msgs[nl]->len + 3) & ~3) + 4; - blk->msgs = xmalloc(sizeof(*blk->msgs)); - blk->nmsg = 1; - blk->msgs[0] = msgtab[i]->msgs[nl]; - } - } - } - free(msgtab); - return lblkhead; -} - -static int sc_xlat(const void *p1, const void *p2) -{ - return ((const cp_xlat_t *)p1)->lan - ((const cp_xlat_t *)p2)->lan; -} - -static void add_cpxlat(int lan, int cpin, int cpout) -{ - cpxlattab = xrealloc(cpxlattab, (ncpxlattab+1) * sizeof(*cpxlattab)); - cpxlattab[ncpxlattab].lan = lan; - cpxlattab[ncpxlattab].cpin = cpin; - cpxlattab[ncpxlattab].cpout = cpout; - ncpxlattab++; - qsort(cpxlattab, ncpxlattab, sizeof(*cpxlattab), sc_xlat); -} - -static cp_xlat_t *find_cpxlat(int lan) -{ - cp_xlat_t t; - - if(!cpxlattab) return NULL; - - t.lan = lan; - return (cp_xlat_t *)bsearch(&t, cpxlattab, ncpxlattab, sizeof(*cpxlattab), sc_xlat); -} diff --git a/reactos/tools/wmc/utils.c b/reactos/tools/wmc/utils.c deleted file mode 100644 index 97fe3122630..00000000000 --- a/reactos/tools/wmc/utils.c +++ /dev/null @@ -1,259 +0,0 @@ -/* - * Utility routines - * - * Copyright 1998,2000 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 "wine/port.h" - -#include -#include -#include -#include -#include -#include - -#include "wmctypes.h" -#include "utils.h" -#include "wmc.h" - -#define SUPPRESS_YACC_ERROR_MESSAGE - -static void generic_msg(const char *s, const char *t, va_list ap) -{ - fprintf(stderr, "%s:%d:%d: %s: ", input_name ? input_name : "stdin", line_number, char_number, t); - vfprintf(stderr, s, ap); -} - -/* - * The yyerror routine should not exit because we use the error-token - * to determine the syntactic error in the source. However, YACC - * uses the same routine to print an error just before the error - * token is reduced. - * The extra routine 'xyyerror' is used to exit after giving a real - * message. - */ -int mcy_error(const char *s, ...) -{ -#ifndef SUPPRESS_YACC_ERROR_MESSAGE - va_list ap; - va_start(ap, s); - generic_msg(s, "Yacc error", ap); - va_end(ap); -#endif - return 1; -} - -int xyyerror(const char *s, ...) -{ - va_list ap; - va_start(ap, s); - generic_msg(s, "Error", ap); - va_end(ap); - exit(1); - return 1; -} - -int mcy_warning(const char *s, ...) -{ - va_list ap; - va_start(ap, s); - generic_msg(s, "Warning", ap); - va_end(ap); - return 0; -} - -void internal_error(const char *file, int line, const char *s, ...) -{ - va_list ap; - va_start(ap, s); - fprintf(stderr, "Internal error (please report) %s %d: ", file, line); - vfprintf(stderr, s, ap); - va_end(ap); - exit(3); -} - -void error(const char *s, ...) -{ - va_list ap; - va_start(ap, s); - fprintf(stderr, "Error: "); - vfprintf(stderr, s, ap); - va_end(ap); - exit(2); -} - -void warning(const char *s, ...) -{ - va_list ap; - va_start(ap, s); - fprintf(stderr, "Warning: "); - vfprintf(stderr, s, ap); - va_end(ap); -} - -char *dup_basename(const char *name, const char *ext) -{ - int namelen; - int extlen = strlen(ext); - char *base; - char *slash; - - if(!name) - name = "wmc.tab"; - - slash = strrchr(name, '/'); - if (slash) - name = slash + 1; - - namelen = strlen(name); - - /* +4 for later extension and +1 for '\0' */ - base = xmalloc(namelen +4 +1); - strcpy(base, name); - if(!strcasecmp(name + namelen-extlen, ext)) - { - base[namelen - extlen] = '\0'; - } - return base; -} - -void get_rcbasedir(char *basedir, const char *name) -{ - char *slash; - slash = strrchr(name, '/'); - - if (!slash) - slash = strrchr(name, '\\'); - - basedir[0] = 0; - - strncpy(basedir, name, slash - name + 1); - basedir[slash-name + 1] = '\0'; -} - -void *xmalloc(size_t size) -{ - void *res; - - assert(size > 0); - assert(size < 102400); - res = malloc(size); - if(res == NULL) - { - error("Virtual memory exhausted.\n"); - } - memset(res, 0x55, size); - return res; -} - - -void *xrealloc(void *p, size_t size) -{ - void *res; - - assert(size > 0); - assert(size < 102400); - res = realloc(p, size); - if(res == NULL) - { - error("Virtual memory exhausted.\n"); - } - return res; -} - -char *xstrdup(const char *str) -{ - char *s; - - assert(str != NULL); - s = xmalloc(strlen(str)+1); - return strcpy(s, str); -} - -int unistrlen(const WCHAR *s) -{ - int n; - for(n = 0; *s; n++, s++) - ; - return n; -} - -WCHAR *unistrcpy(WCHAR *dst, const WCHAR *src) -{ - WCHAR *t = dst; - while(*src) - *t++ = *src++; - *t = 0; - return dst; -} - -WCHAR *xunistrdup(const WCHAR * str) -{ - WCHAR *s; - - assert(str != NULL); - s = xmalloc((unistrlen(str)+1) * sizeof(WCHAR)); - return unistrcpy(s, str); -} - -int unistricmp(const WCHAR *s1, const WCHAR *s2) -{ - int i; - int once = 0; - static const char warn[] = "Don't know the uppercase equivalent of non acsii characters;" - "comparison might yield wrong results"; - while(*s1 && *s2) - { - if((*s1 & 0xffff) > 0x7f || (*s2 & 0xffff) > 0x7f) - { - if(!once) - { - once++; - mcy_warning(warn); - } - i = *s1++ - *s2++; - } - else - i = toupper(*s1++) - toupper(*s2++); - if(i) - return i; - } - - if((*s1 & 0xffff) > 0x7f || (*s2 & 0xffff) > 0x7f) - { - if(!once) - mcy_warning(warn); - return *s1 - *s2; - } - else - return toupper(*s1) - toupper(*s2); -} - -int unistrcmp(const WCHAR *s1, const WCHAR *s2) -{ - int i; - while(*s1 && *s2) - { - i = *s1++ - *s2++; - if(i) - return i; - } - - return *s1 - *s2; -} diff --git a/reactos/tools/wmc/utils.h b/reactos/tools/wmc/utils.h deleted file mode 100644 index 5670b105a20..00000000000 --- a/reactos/tools/wmc/utils.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Utility routines' prototypes etc. - * - * Copyright 1998,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_UTILS_H -#define __WMC_UTILS_H - -#include /* size_t */ - -#include "wmctypes.h" - -void *xmalloc(size_t); -void *xrealloc(void *, size_t); -char *xstrdup(const char *str); - -#ifndef __GNUC__ -#define __attribute__(X) -#endif - -int mcy_error(const char *s, ...) __attribute__((format (printf, 1, 2))); -int xyyerror(const char *s, ...) __attribute__((format (printf, 1, 2))); -int mcy_warning(const char *s, ...) __attribute__((format (printf, 1, 2))); -void internal_error(const char *file, int line, const char *s, ...) __attribute__((format (printf, 3, 4))); -void error(const char *s, ...) __attribute__((format (printf, 1, 2))); -void warning(const char *s, ...) __attribute__((format (printf, 1, 2))); - -char *dup_basename(const char *name, const char *ext); -void get_rcbasedir(char *basedir, const char *name); - -WCHAR *xunistrdup(const WCHAR * str); -WCHAR *unistrcpy(WCHAR *dst, const WCHAR *src); -int unistrlen(const WCHAR *s); -int unistricmp(const WCHAR *s1, const WCHAR *s2); -int unistrcmp(const WCHAR *s1, const WCHAR *s2); - -#endif diff --git a/reactos/tools/wmc/wmc.c b/reactos/tools/wmc/wmc.c deleted file mode 100644 index 0f077da91e9..00000000000 --- a/reactos/tools/wmc/wmc.c +++ /dev/null @@ -1,305 +0,0 @@ -/* - * Wine Message Compiler main program - * - * 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 - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include - -#include "wmc.h" -#include "utils.h" -#include "lang.h" -#include "write.h" - -static const char usage[] = - "Usage: wmc [options...] [inputfile.mc]\n" - " -B x Set output byte-order x={n[ative], l[ittle], b[ig]}\n" - " (default is n[ative] which equals " -#ifdef WORDS_BIGENDIAN - "big" -#else - "little" -#endif - "-endian)\n" - " -c Set 'custom-bit' in values\n" - " -d Use decimal values in output\n" - " -D Set debug flag\n" - " -h This message\n" - " -H file Write headerfile to file (default is inputfile.h)\n" - " -i Inline messagetable(s)\n" - " -o file Output to file (default is inputfile.rc)\n" - " -u Inputfile is in unicode\n" - " -U Output unicode messagetable(s)\n" - " -v Show supported codepages and languages\n" - " -V Print version end exit\n" - " -W Enable pedantic warnings\n" - "Input is taken from stdin if no inputfile is specified.\n" - "Byteorder of unicode input is based upon the first couple of\n" - "bytes read, which should be 0x0000..0x00ff.\n" - ; - -static const char version_string[] = - "Wine Message Compiler version " PACKAGE_VERSION "\n" - "Copyright 2000 Bertho A. Stultiens\n" - ; - -/* - * The output byte-order of resources (set with -B) - */ -int byteorder = WMC_BO_NATIVE; - -/* - * Custom bit (bit 29) in output values must be set (-c option) - */ -int custombit = 0; - -/* - * Output decimal values (-d option) - */ -int decimal = 0; - -/* - * Enable pedantic warnings; check arg references (-W option) - */ -int pedantic = 0; - -/* - * Unicode input (-u option) - */ -int unicodein = 0; - -/* - * Unicode output (-U option) - */ -int unicodeout = 0; - -/* - * Inline the messagetables (don't write *.bin files; -i option) - */ -int rcinline = 0; - -/* - * Debugging flag (-D option) - */ -int dodebug = 0; - -char *output_name = NULL; /* The name given by the -o option */ -char *input_name = NULL; /* The name given on the command-line */ -char *header_name = NULL; /* The name given by the -H option */ - -int line_number = 1; /* The current line */ -int char_number = 1; /* The current char pos within the line */ - -char *cmdline; /* The entire commandline */ -time_t now; /* The time of start of wmc */ - -int mcy_debug; - -int getopt (int argc, char *const *argv, const char *optstring); -static void segvhandler(int sig); - -static void cleanup_files(void) -{ - if (output_name) unlink( output_name ); - if (header_name) unlink( header_name ); -} - -static void exit_on_signal( int sig ) -{ - exit(1); /* this will call the atexit functions */ -} - -int main(int argc,char *argv[]) -{ - extern char* optarg; - extern int optind; - int optc; - int lose = 0; - int ret; - int i; - int cmdlen; - char rcbasedir[256]; - - atexit( cleanup_files ); - signal(SIGSEGV, segvhandler); - signal( SIGTERM, exit_on_signal ); - signal( SIGINT, exit_on_signal ); -#ifdef SIGHUP - signal( SIGHUP, exit_on_signal ); -#endif - - now = time(NULL); - - /* First rebuild the commandline to put in destination */ - /* Could be done through env[], but not all OS-es support it */ - cmdlen = 4; /* for "wmc " */ - for(i = 1; i < argc; i++) - cmdlen += strlen(argv[i]) + 1; - cmdline = (char *)xmalloc(cmdlen); - strcpy(cmdline, "wmc "); - for(i = 1; i < argc; i++) - { - strcat(cmdline, argv[i]); - if(i < argc-1) - strcat(cmdline, " "); - } - - while((optc = getopt(argc, argv, "B:cdDhH:io:p:uUvVW")) != EOF) - { - switch(optc) - { - case 'B': - switch(optarg[0]) - { - case 'n': - case 'N': - byteorder = WMC_BO_NATIVE; - break; - case 'l': - case 'L': - byteorder = WMC_BO_LITTLE; - break; - case 'b': - case 'B': - byteorder = WMC_BO_BIG; - break; - default: - fprintf(stderr, "Byteordering must be n[ative], l[ittle] or b[ig]\n"); - lose++; - } - break; - case 'c': - custombit = 1; - break; - case 'd': - decimal = 1; - break; - case 'D': - dodebug = 1; - break; - case 'h': - printf("%s", usage); - exit(0); - /* No return */ - case 'H': - header_name = xstrdup(optarg); - break; - case 'i': - rcinline = 1; - break; - case 'o': - output_name = xstrdup(optarg); - break; - case 'u': - unicodein = 1; - break; - case 'U': - unicodeout = 1; - break; - case 'v': - show_languages(); - show_codepages(); - exit(0); - /* No return */ - case 'V': - printf(version_string); - exit(0); - /* No return */ - case 'W': - pedantic = 1; - break; - default: - lose++; - break; - } - } - - if(lose) - { - fprintf(stderr, "%s", usage); - return 1; - } - - mcy_debug = dodebug; - if(dodebug) - { - setbuf(stdout, 0); - setbuf(stderr, 0); - } - - /* Check for input file on command-line */ - if(optind < argc) - { - input_name = argv[optind]; - } - - /* Generate appropriate outfile names */ - if(!output_name) - { - output_name = dup_basename(input_name, ".mc"); - strcat(output_name, ".rc"); - } - - if(!header_name) - { - header_name = dup_basename(input_name, ".mc"); - strcat(header_name, ".h"); - } - - get_rcbasedir(rcbasedir, output_name); - - if(input_name) - { - if(!(yyin = fopen(input_name, "rb"))) - error("Could not open %s for input\n", input_name); - } - else - yyin = stdin; - - ret = mcy_parse(); - - if(input_name) - fclose(yyin); - - if(ret) - { - /* Error during parse */ - exit(1); - } - - write_h_file(header_name); - write_rc_file(output_name); - if(!rcinline) - write_bin_files(rcbasedir); - output_name = NULL; - header_name = NULL; - return 0; -} - -static void segvhandler(int sig) -{ - fprintf(stderr, "\n%s:%d: Oops, segment violation\n", input_name, line_number); - fflush(stdout); - fflush(stderr); - abort(); -} diff --git a/reactos/tools/wmc/wmc.h b/reactos/tools/wmc/wmc.h deleted file mode 100644 index 86ccd6f17fb..00000000000 --- a/reactos/tools/wmc/wmc.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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_WMC_H -#define __WMC_WMC_H - -#include /* For time_t */ - -#include "wmctypes.h" - -/* - * The default codepage setting is only to - * read and convert input which is non-message - * text. It doesn't really matter that much because - * all codepages map 0x00-0x7f to 0x0000-0x007f from - * char to unicode and all non-message text should - * be plain ASCII. - * However, we do implement iso-8859-1 for 1-to-1 - * mapping for all other chars, so this is very close - * to what we really want. - */ -#define WMC_DEFAULT_CODEPAGE 28591 - -extern int pedantic; -extern int leave_case; -extern int byteorder; -extern int decimal; -extern int custombit; -extern int unicodein; -extern int unicodeout; -extern int rcinline; - -extern char *output_name; -extern char *input_name; -extern char *header_name; -extern char *cmdline; -extern time_t now; - -extern int line_number; -extern int char_number; - -int mcy_parse(void); -extern int mcy_debug; -extern int want_nl; -extern int want_line; -extern int want_file; -extern node_t *nodehead; -extern lan_blk_t *lanblockhead; - -int mcy_lex(void); -FILE *yyin; -void set_codepage(int cp); - -void add_token(tok_e type, const WCHAR *name, int tok, int cp, const WCHAR *alias, int fix); -token_t *lookup_token(const WCHAR *s); -void get_tokentable(token_t **tab, int *len); - -#endif diff --git a/reactos/tools/wmc/wmc.rbuild b/reactos/tools/wmc/wmc.rbuild deleted file mode 100644 index 9dd4eade4ec..00000000000 --- a/reactos/tools/wmc/wmc.rbuild +++ /dev/null @@ -1,11 +0,0 @@ - - - - unicode - lang.c - mcl.c - utils.c - wmc.c - write.c - mcy.tab.c - diff --git a/reactos/tools/wmc/wmctypes.h b/reactos/tools/wmc/wmctypes.h deleted file mode 100644 index 097a15ca4aa..00000000000 --- a/reactos/tools/wmc/wmctypes.h +++ /dev/null @@ -1,122 +0,0 @@ -/* - * 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/reactos/tools/wmc/write.c b/reactos/tools/wmc/write.c deleted file mode 100644 index b5d7d4f708a..00000000000 --- a/reactos/tools/wmc/write.c +++ /dev/null @@ -1,617 +0,0 @@ -/* - * Wine Message Compiler output generation - * - * 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 - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include -#include - -#include "wmc.h" -#include "utils.h" -#include "lang.h" -#include "write.h" - -/* - * The binary resource layout is as follows: - * - * +===============+ - * Header | NBlocks | - * +===============+ - * Block 0 | Low ID | - * +---------------+ - * | High ID | - * +---------------+ - * | Offset |---+ - * +===============+ | - * Block 1 | Low ID | | - * +---------------+ | - * | High ID | | - * +---------------+ | - * | Offset |------+ - * +===============+ | | - * | | | | - * ... ... | | - * | | | | - * +===============+ <-+ | - * B0 LoID | Len | Flags | | - * +---+---+---+---+ | - * | b | l | a | b | | - * +---+---+---+---+ | - * | l | a | \0| \0| | - * +===============+ | - * | | | - * ... ... | - * | | | - * +===============+ | - * B0 HiID | Len | Flags | | - * +---+---+---+---+ | - * | M | o | r | e | | - * +---+---+---+---+ | - * | b | l | a | \0| | - * +===============+ <----+ - * B1 LoID | Len | Flags | - * +---+---+---+---+ - * | J | u | n | k | - * +---+---+---+---+ - * | \0| \0| \0| \0| - * +===============+ - * | | - * ... ... - * | | - * +===============+ - * - * All Fields are aligned on their natural boundaries. The length - * field (Len) covers both the length of the string and the header - * fields (Len and Flags). Strings are '\0' terminated. Flags is 0 - * for normal character strings and 1 for unicode strings. - */ - -static const char str_header[] = - "/* This file is generated with wmc version " PACKAGE_VERSION ". Do not edit! */\n" - "/* Source : %s */\n" - "/* Cmdline: %s */\n" - // "/* Date : %s */\n" - "\n" - ; - -static char *dup_u2c(int cp, const WCHAR *uc) -{ - int len; - char *cptr; - const union cptable *cpdef = find_codepage(cp); - if(!cpdef) - internal_error(__FILE__, __LINE__, "Codepage %d not found (vanished?)\n", cp); - len = wine_cp_wcstombs(cpdef, 0, uc, unistrlen(uc)+1, NULL, 0, NULL, NULL); - cptr = xmalloc(len); - if((len = wine_cp_wcstombs(cpdef, 0, uc, unistrlen(uc)+1, cptr, len, NULL, NULL)) < 0) - internal_error(__FILE__, __LINE__, "Buffer overflow? code %d\n", len); - return cptr; -} - -static void killnl(char *s, int ddd) -{ - char *tmp; - tmp = strstr(s, "\r\n"); - if(tmp) - { - if(ddd && tmp - s > 3) - { - tmp[0] = tmp[1] = tmp[2] = '.'; - tmp[3] = '\0'; - } - else - *tmp = '\0'; - } - tmp = strchr(s, '\n'); - if(tmp) - { - if(ddd && tmp - s > 3) - { - tmp[0] = tmp[1] = tmp[2] = '.'; - tmp[3] = '\0'; - } - else - *tmp = '\0'; - } -} - -static int killcomment(char *s) -{ - char *tmp = s; - int b = 0; - while((tmp = strstr(tmp, "/*"))) - { - tmp[1] = 'x'; - b++; - } - tmp = s; - while((tmp = strstr(tmp, "*/"))) - { - tmp[0] = 'x'; - b++; - } - return b; -} - -void write_h_file(const char *fname) -{ - node_t *ndp; - char *cptr; - char *cast; - FILE *fp; - token_t *ttab; - int ntab; - int i; - int once = 0; - int idx_en = 0; - - fp = fopen(fname, "w"); - if(!fp) - { - perror(fname); - exit(1); - } - cptr = ctime(&now); - killnl(cptr, 0); - fprintf(fp, str_header, input_name ? input_name : "", cmdline/*, cptr*/); - fprintf(fp, "#ifndef __WMCGENERATED_%08lx_H\n", (long)now); - fprintf(fp, "#define __WMCGENERATED_%08lx_H\n", (long)now); - fprintf(fp, "\n"); - - /* Write severity and facility aliases */ - get_tokentable(&ttab, &ntab); - fprintf(fp, "/* Severity codes */\n"); - for(i = 0; i < ntab; i++) - { - if(ttab[i].type == tok_severity && ttab[i].alias) - { - cptr = dup_u2c(WMC_DEFAULT_CODEPAGE, ttab[i].alias); - fprintf(fp, "#define %s\t0x%x\n", cptr, ttab[i].token); - free(cptr); - } - } - fprintf(fp, "\n"); - - fprintf(fp, "/* Facility codes */\n"); - for(i = 0; i < ntab; i++) - { - if(ttab[i].type == tok_facility && ttab[i].alias) - { - cptr = dup_u2c(WMC_DEFAULT_CODEPAGE, ttab[i].alias); - fprintf(fp, "#define %s\t0x%x\n", cptr, ttab[i].token); - free(cptr); - } - } - fprintf(fp, "\n"); - - /* Write the message codes */ - fprintf(fp, "/* Message definitions */\n"); - for(ndp = nodehead; ndp; ndp = ndp->next) - { - switch(ndp->type) - { - case nd_comment: - cptr = dup_u2c(WMC_DEFAULT_CODEPAGE, ndp->u.comment+1); - killnl(cptr, 0); - killcomment(cptr); - if(*cptr) - fprintf(fp, "/* %s */\n", cptr); - else - fprintf(fp, "\n"); - free(cptr); - break; - case nd_msg: - if(!once) - { - /* - * Search for an english text. - * If not found, then use the first in the list - */ - once++; - for(i = 0; i < ndp->u.msg->nmsgs; i++) - { - if(ndp->u.msg->msgs[i]->lan == 0x409) - { - idx_en = i; - break; - } - } - fprintf(fp, "\n"); - } - fprintf(fp, "/* MessageId : 0x%08x */\n", ndp->u.msg->realid); - cptr = dup_u2c(ndp->u.msg->msgs[idx_en]->cp, ndp->u.msg->msgs[idx_en]->msg); - killnl(cptr, 0); - killcomment(cptr); - fprintf(fp, "/* Approximate msg: %s */\n", cptr); - free(cptr); - cptr = dup_u2c(WMC_DEFAULT_CODEPAGE, ndp->u.msg->sym); - if(ndp->u.msg->cast) - cast = dup_u2c(WMC_DEFAULT_CODEPAGE, ndp->u.msg->cast); - else - cast = NULL; - switch(ndp->u.msg->base) - { - case 8: - if(cast) - fprintf(fp, "#define %s\t((%s)0%oL)\n\n", cptr, cast, ndp->u.msg->realid); - else - fprintf(fp, "#define %s\t0%oL\n\n", cptr, ndp->u.msg->realid); - break; - case 10: - if(cast) - fprintf(fp, "#define %s\t((%s)%dL)\n\n", cptr, cast, ndp->u.msg->realid); - else - fprintf(fp, "#define %s\t%dL\n\n", cptr, ndp->u.msg->realid); - break; - case 16: - if(cast) - fprintf(fp, "#define %s\t((%s)0x%08xL)\n\n", cptr, cast, ndp->u.msg->realid); - else - fprintf(fp, "#define %s\t0x%08xL\n\n", cptr, ndp->u.msg->realid); - break; - default: - internal_error(__FILE__, __LINE__, "Invalid base for number print\n"); - } - free(cptr); - free(cast); - break; - default: - internal_error(__FILE__, __LINE__, "Invalid node type %d\n", ndp->type); - } - } - fprintf(fp, "\n#endif\n"); - fclose(fp); -} - -static void write_rcbin(FILE *fp) -{ - lan_blk_t *lbp; - token_t *ttab; - int ntab; - int i; - - get_tokentable(&ttab, &ntab); - - for(lbp = lanblockhead; lbp; lbp = lbp->next) - { - char *cptr = NULL; - fprintf(fp, "LANGUAGE 0x%x, 0x%x\n", lbp->lan & 0x3ff, lbp->lan >> 10); - for(i = 0; i < ntab; i++) - { - if(ttab[i].type == tok_language && ttab[i].token == lbp->lan) - { - if(ttab[i].alias) - cptr = dup_u2c(WMC_DEFAULT_CODEPAGE, ttab[i].alias); - break; - } - } - if(!cptr) - internal_error(__FILE__, __LINE__, "Filename vanished for language 0x%0x\n", lbp->lan); - fprintf(fp, "1 MESSAGETABLE \"%s.bin\"\n", cptr); - free(cptr); - } -} - -static char *make_string(WCHAR *uc, int len, int codepage) -{ - char *str = xmalloc(7*len + 1); - char *cptr = str; - int i; - int b; - - if(!codepage) - { - *cptr++ = ' '; - *cptr++ = 'L'; - *cptr++ = '"'; - for(i = b = 0; i < len; i++, uc++) - { - switch(*uc) - { - case '\a': *cptr++ = '\\'; *cptr++ = 'a'; b += 2; break; - case '\b': *cptr++ = '\\'; *cptr++ = 'b'; b += 2; break; - case '\f': *cptr++ = '\\'; *cptr++ = 'f'; b += 2; break; - case '\n': *cptr++ = '\\'; *cptr++ = 'n'; b += 2; break; - case '\r': *cptr++ = '\\'; *cptr++ = 'r'; b += 2; break; - case '\t': *cptr++ = '\\'; *cptr++ = 't'; b += 2; break; - case '\v': *cptr++ = '\\'; *cptr++ = 'v'; b += 2; break; - case '\\': *cptr++ = '\\'; *cptr++ = '\\'; b += 2; break; - case '"': *cptr++ = '\\'; *cptr++ = '"'; b += 2; break; - default: - if (*uc < 0x100 && isprint(*uc)) - { - *cptr++ = *uc; - b++; - } - else - { - int n = sprintf(cptr, "\\x%04x", *uc & 0xffff); - cptr += n; - b += n; - } - break; - } - if(i < len-1 && b >= 72) - { - *cptr++ = '"'; - *cptr++ = ','; - *cptr++ = '\n'; - *cptr++ = ' '; - *cptr++ = 'L'; - *cptr++ = '"'; - b = 0; - } - } - if (unicodeout) - len = (len + 1) & ~1; - else - len = (len + 3) & ~3; - for(; i < len; i++) - { - *cptr++ = '\\'; - *cptr++ = 'x'; - *cptr++ = '0'; - *cptr++ = '0'; - *cptr++ = '0'; - *cptr++ = '0'; - } - *cptr++ = '"'; - *cptr = '\0'; - } - else - { - char *tmp, *cc; - int mlen; - const union cptable *cpdef = find_codepage(codepage); - - assert(cpdef != NULL); - mlen = wine_cp_wcstombs(cpdef, 0, uc, unistrlen(uc)+1, NULL, 0, NULL, NULL); - cc = tmp = xmalloc(mlen); - if((i = wine_cp_wcstombs(cpdef, 0, uc, unistrlen(uc)+1, tmp, mlen, NULL, NULL)) < 0) - internal_error(__FILE__, __LINE__, "Buffer overflow? code %d\n", i); - *cptr++ = ' '; - *cptr++ = '"'; - for(i = b = 0; i < len; i++, cc++) - { - switch(*cc) - { - case '\a': *cptr++ = '\\'; *cptr++ = 'a'; b += 2; break; - case '\b': *cptr++ = '\\'; *cptr++ = 'b'; b += 2; break; - case '\f': *cptr++ = '\\'; *cptr++ = 'f'; b += 2; break; - case '\n': *cptr++ = '\\'; *cptr++ = 'n'; b += 2; break; - case '\r': *cptr++ = '\\'; *cptr++ = 'r'; b += 2; break; - case '\t': *cptr++ = '\\'; *cptr++ = 't'; b += 2; break; - case '\v': *cptr++ = '\\'; *cptr++ = 'v'; b += 2; break; - case '\\': *cptr++ = '\\'; *cptr++ = '\\'; b += 2; break; - case '"': *cptr++ = '\\'; *cptr++ = '"'; b += 2; break; - default: - if(isprint(*cc)) - { - *cptr++ = *cc; - b++; - } - else - { - int n = sprintf(cptr, "\\x%02x", *cc & 0xff); - cptr += n; - b += n; - } - break; - } - if(i < len-1 && b >= 72) - { - *cptr++ = '"'; - *cptr++ = ','; - *cptr++ = '\n'; - *cptr++ = ' '; - *cptr++ = '"'; - b = 0; - } - } - len = (len + 3) & ~3; - for(; i < len; i++) - { - *cptr++ = '\\'; - *cptr++ = 'x'; - *cptr++ = '0'; - *cptr++ = '0'; - } - *cptr++ = '"'; - *cptr = '\0'; - free(tmp); - } - return str; -} - -static void write_rcinline(FILE *fp) -{ - lan_blk_t *lbp; - int i; - int j; - - for(lbp = lanblockhead; lbp; lbp = lbp->next) - { - unsigned offs = 4 * (lbp->nblk * 3 + 1); - fprintf(fp, "\n1 MESSAGETABLE\n"); - fprintf(fp, "LANGUAGE 0x%x, 0x%x\n", lbp->lan & 0x3ff, lbp->lan >> 10); - fprintf(fp, "{\n"); - fprintf(fp, " /* NBlocks */ 0x%08xL,\n", lbp->nblk); - for(i = 0; i < lbp->nblk; i++) - { - fprintf(fp, " /* Lo,Hi,Offs */ 0x%08xL, 0x%08xL, 0x%08xL,\n", - lbp->blks[i].idlo, - lbp->blks[i].idhi, - offs); - offs += lbp->blks[i].size; - } - for(i = 0; i < lbp->nblk; i++) - { - block_t *blk = &lbp->blks[i]; - for(j = 0; j < blk->nmsg; j++) - { - char *cptr; - int l = blk->msgs[j]->len; - const char *comma = j == blk->nmsg-1 && i == lbp->nblk-1 ? "" : ","; - cptr = make_string(blk->msgs[j]->msg, l, unicodeout ? 0 : blk->msgs[j]->cp); - fprintf(fp, "\n /* Msg 0x%08x */ 0x%04x, 0x000%c,\n", - blk->idlo + j, - (unicodeout ? (l*2+3)&~3 : (l+3)&~3) + 4, - unicodeout ? '1' : '0'); - fprintf(fp, "%s%s\n", cptr, comma); - free(cptr); - } - } - fprintf(fp, "}\n"); - } -} - -void write_rc_file(const char *fname) -{ - FILE *fp; - char *cptr; - - fp = fopen(fname, "w"); - if(!fp) - { - perror(fname); - exit(1); - } - cptr = ctime(&now); - killnl(cptr, 0); - fprintf(fp, str_header, input_name ? input_name : "", cmdline/*, cptr*/); - - if(rcinline) - write_rcinline(fp); - else - write_rcbin(fp); - fclose(fp); -} - -static void write_bin_file(const char *fname, lan_blk_t *lbp) -{ - FILE *fp; - unsigned int offs; - unsigned short buf; - int i, j, k; - - fp = fopen(fname, "wb"); - - fwrite(&lbp->nblk, sizeof(int), 1, fp); - - offs = 4 * (lbp->nblk * 3 + 1); - for(i = 0; i < lbp->nblk; i++) - { - fwrite(&lbp->blks[i].idlo, sizeof(unsigned), 2, fp); - fwrite(&offs, sizeof(int), 1, fp); - - offs += lbp->blks[i].size; - } - - for(i = 0; i < lbp->nblk; i++) - { - block_t *blk = &lbp->blks[i]; - for(j = 0; j < blk->nmsg; j++) - { - char *cptr; - int len = blk->msgs[j]->len; - short aligned_size = (unicodeout ? (len*2+3)&~3 : (len+3)&~3) + 4; - - fwrite(&aligned_size, sizeof(short), 1, fp); - - buf = unicodeout ? 1 : 0; - fwrite(&buf, sizeof(buf), 1, fp); - - // no need to count these 4 bytes when calculating alignment - aligned_size -= 4; - - if (unicodeout) - { - fwrite(blk->msgs[j]->msg, sizeof(WCHAR), len, fp); - - // fill with nulls so it matches aligned_len - for (k=0; k<(aligned_size-(len*sizeof(WCHAR))); k++) - fputc(0, fp); - } - else - { - WCHAR *uc; - char *tmp; - int mlen, len; - const union cptable *cpdef = find_codepage(blk->msgs[j]->cp); - uc = blk->msgs[j]->msg; - - assert(cpdef != NULL); - mlen = wine_cp_wcstombs(cpdef, 0, uc, unistrlen(uc)+1, NULL, 0, NULL, NULL); - tmp = xmalloc(mlen); - if((i = wine_cp_wcstombs(cpdef, 0, uc, unistrlen(uc)+1, tmp, mlen, NULL, NULL)) < 0) - internal_error(__FILE__, __LINE__, "Buffer overflow? code %d\n", i); - - len = strlen(tmp); - fwrite(tmp, sizeof(char), len, fp); - - // fill with nulls so it matches aligned_len - for (k=0; k<(aligned_size-len); k++) - fputc(0, fp); - - free(tmp); - } - - free(cptr); - } - } - - fclose(fp); -} - -void write_bin_files(const char *basedir) -{ - lan_blk_t *lbp; - token_t *ttab; - char fname[256]; - int ntab; - int i; - - get_tokentable(&ttab, &ntab); - - for(lbp = lanblockhead; lbp; lbp = lbp->next) - { - char *cptr = NULL; - for(i = 0; i < ntab; i++) - { - if(ttab[i].type == tok_language && ttab[i].token == lbp->lan) - { - if(ttab[i].alias) - cptr = dup_u2c(WMC_DEFAULT_CODEPAGE, ttab[i].alias); - break; - } - } - if(!cptr) - internal_error(__FILE__, __LINE__, "Filename vanished for language 0x%0x\n", lbp->lan); - - sprintf(fname, "%s%s.bin", basedir, cptr); - write_bin_file(fname, lbp); - - free(cptr); - } -} diff --git a/reactos/tools/wmc/write.h b/reactos/tools/wmc/write.h deleted file mode 100644 index d53267e02f4..00000000000 --- a/reactos/tools/wmc/write.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Wine Message Compiler outpur generation - * - * 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_WRITE_H -#define __WMC_WRITE_H - -void write_h_file(const char *fname); -void write_rc_file(const char *fname); -void write_bin_files(const char *basedir); - -#endif diff --git a/reactos/tools/wpp/CMakeLists.txt b/reactos/tools/wpp/CMakeLists.txt deleted file mode 100644 index b8da62d8c35..00000000000 --- a/reactos/tools/wpp/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -list(APPEND SOURCE - lex.yy.c - preproc.c - wpp.c - ppy.tab.c) - -add_library(wpp ${SOURCE}) - -add_dependencies(wpp build_header) \ No newline at end of file diff --git a/reactos/tools/wpp/lex.yy.c b/reactos/tools/wpp/lex.yy.c deleted file mode 100644 index 7a93ad74415..00000000000 --- a/reactos/tools/wpp/lex.yy.c +++ /dev/null @@ -1,4587 +0,0 @@ -#line 2 "lex.yy.c" -#line 125 "ppl.l" -#include "config.h" -#include "wine/port.h" - - - -#line 9 "lex.yy.c" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define yy_create_buffer ppy__create_buffer -#define yy_delete_buffer ppy__delete_buffer -#define yy_flex_debug ppy__flex_debug -#define yy_init_buffer ppy__init_buffer -#define yy_flush_buffer ppy__flush_buffer -#define yy_load_buffer_state ppy__load_buffer_state -#define yy_switch_to_buffer ppy__switch_to_buffer -#define yyin ppy_in -#define yyleng ppy_leng -#define yylex ppy_lex -#define yylineno ppy_lineno -#define yyout ppy_out -#define yyrestart ppy_restart -#define yytext ppy_text -#define yywrap ppy_wrap -#define yyalloc ppy_alloc -#define yyrealloc ppy_realloc -#define yyfree ppy_free - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! C99 */ - -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN (yy_start) = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START (((yy_start) - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE ppy_restart(ppy_in ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else -#define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -extern int ppy_leng; - -extern FILE *ppy_in, *ppy_out; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up ppy_text. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = (yy_hold_char); \ - YY_RESTORE_YY_MORE_OFFSET \ - (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up ppy_text again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, (yytext_ptr) ) - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via ppy_restart()), so that the user can continue scanning by - * just pointing ppy_in at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* Stack of input buffers. */ -static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ -static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ - ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] - -/* yy_hold_char holds the character lost when ppy_text is formed. */ -static char yy_hold_char; -static int yy_n_chars; /* number of characters read into yy_ch_buf */ -int ppy_leng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; -static int yy_init = 0; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* Flag which is used to allow ppy_wrap()'s to do buffer switches - * instead of setting up a fresh ppy_in. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -void ppy_restart (FILE *input_file ); -void ppy__switch_to_buffer (YY_BUFFER_STATE new_buffer ); -YY_BUFFER_STATE ppy__create_buffer (FILE *file,int size ); -void ppy__delete_buffer (YY_BUFFER_STATE b ); -void ppy__flush_buffer (YY_BUFFER_STATE b ); -void ppy_push_buffer_state (YY_BUFFER_STATE new_buffer ); -void ppy_pop_buffer_state (void ); - -static void ppy_ensure_buffer_stack (void ); -static void ppy__load_buffer_state (void ); -static void ppy__init_buffer (YY_BUFFER_STATE b,FILE *file ); - -#define YY_FLUSH_BUFFER ppy__flush_buffer(YY_CURRENT_BUFFER ) - -YY_BUFFER_STATE ppy__scan_buffer (char *base,yy_size_t size ); -YY_BUFFER_STATE ppy__scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE ppy__scan_bytes (yyconst char *bytes,int len ); - -void *ppy_alloc (yy_size_t ); -void *ppy_realloc (void *,yy_size_t ); -void ppy_free (void * ); - -#define yy_new_buffer ppy__create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - ppy_ensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - ppy__create_buffer(ppy_in,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - ppy_ensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - ppy__create_buffer(ppy_in,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -typedef unsigned char YY_CHAR; - -FILE *ppy_in = (FILE *) 0, *ppy_out = (FILE *) 0; - -typedef int yy_state_type; - -extern int ppy_lineno; - -int ppy_lineno = 1; - -extern char *ppy_text; -#define yytext_ptr ppy_text - -static yy_state_type yy_get_previous_state (void ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); -static int yy_get_next_buffer (void ); -static void yy_fatal_error (yyconst char msg[] ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up ppy_text. - */ -#define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - ppy_leng = (size_t) (yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ - *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; - -#define YY_NUM_RULES 143 -#define YY_END_OF_BUFFER 144 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[416] = - { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 117, 117, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 144, 133, 134, 135, 121, 142, - 122, 133, 132, 133, 134, 1, 21, 16, 18, 16, - 21, 20, 17, 17, 17, 17, 17, 17, 17, 17, - 68, 71, 69, 70, 28, 25, 26, 24, 28, 23, - 28, 28, 123, 131, 124, 142, 125, 126, 142, 127, - 128, 117, 118, 117, 77, 75, 77, 77, 74, 77, - - 78, 82, 84, 83, 142, 79, 90, 86, 90, 85, - 88, 90, 90, 87, 90, 92, 100, 102, 95, 101, - 97, 96, 93, 97, 92, 106, 106, 104, 103, 106, - 114, 113, 110, 111, 107, 108, 109, 114, 114, 133, - 134, 138, 121, 138, 122, 133, 132, 133, 53, 50, - 47, 53, 52, 53, 51, 53, 33, 35, 53, 53, - 53, 53, 49, 53, 53, 58, 55, 56, 58, 54, - 58, 62, 59, 60, 62, 62, 22, 67, 64, 67, - 65, 67, 63, 67, 29, 30, 32, 32, 32, 29, - 1, 140, 143, 141, 139, 139, 133, 134, 133, 116, - - 120, 132, 136, 137, 134, 1, 16, 17, 17, 17, - 17, 17, 17, 17, 17, 18, 19, 20, 17, 17, - 17, 17, 17, 11, 17, 17, 17, 17, 17, 68, - 69, 70, 72, 70, 25, 27, 28, 123, 130, 129, - 130, 125, 127, 117, 117, 117, 119, 75, 73, 74, - 76, 77, 78, 79, 81, 79, 86, 85, 90, 87, - 91, 90, 92, 94, 97, 96, 96, 93, 99, 97, - 92, 106, 104, 103, 106, 105, 106, 114, 114, 112, - 115, 114, 133, 138, 138, 50, 44, 41, 33, 34, - 33, 33, 37, 35, 35, 35, 39, 45, 43, 46, - - 40, 48, 49, 132, 42, 55, 54, 57, 58, 59, - 61, 0, 22, 64, 63, 67, 66, 67, 29, 31, - 32, 29, 140, 139, 120, 120, 17, 17, 17, 17, - 17, 17, 11, 17, 17, 17, 17, 17, 17, 17, - 69, 80, 89, 98, 34, 34, 33, 33, 33, 36, - 35, 35, 35, 132, 120, 17, 12, 13, 17, 17, - 17, 17, 17, 17, 15, 17, 17, 17, 34, 34, - 34, 33, 36, 36, 35, 132, 17, 12, 13, 14, - 4, 7, 9, 17, 17, 15, 17, 8, 17, 34, - 36, 36, 36, 132, 3, 14, 4, 7, 9, 10, - - 17, 6, 8, 17, 36, 132, 3, 10, 2, 6, - 5, 38, 2, 5, 0 - } ; - -static yyconst flex_int32_t yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 5, 6, 7, 1, 1, 8, 9, 10, - 11, 12, 1, 13, 1, 14, 15, 16, 17, 17, - 17, 17, 17, 17, 17, 18, 18, 1, 1, 19, - 20, 21, 1, 1, 22, 22, 22, 22, 22, 22, - 23, 23, 23, 23, 23, 24, 23, 23, 23, 23, - 23, 23, 23, 23, 25, 23, 23, 26, 23, 23, - 1, 27, 1, 1, 28, 1, 29, 30, 31, 32, - - 33, 34, 35, 36, 37, 36, 36, 38, 39, 40, - 41, 42, 36, 43, 44, 45, 46, 36, 47, 48, - 36, 36, 1, 49, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst flex_int32_t yy_meta[50] = - { 0, - 1, 2, 3, 2, 1, 4, 5, 1, 6, 7, - 8, 9, 8, 10, 11, 12, 12, 12, 1, 1, - 13, 14, 15, 15, 15, 15, 16, 17, 14, 14, - 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 1 - } ; - -static yyconst flex_int16_t yy_base[460] = - { 0, - 0, 48, 55, 0, 102, 103, 130, 0, 177, 178, - 179, 182, 186, 187, 104, 107, 214, 0, 261, 262, - 289, 0, 338, 0, 386, 389, 414, 439, 466, 0, - 515, 0, 564, 0, 399, 403, 612, 638, 665, 0, - 428, 618, 714, 763, 1130, 0, 49, 1886, 1886, 1886, - 1886, 96, 0, 109, 118, 1886, 1886, 811, 1886, 1126, - 111, 111, 858, 1095, 154, 161, 1090, 1083, 1085, 1095, - 0, 1886, 184, 124, 1886, 196, 1886, 1886, 254, 1886, - 0, 199, 0, 1886, 1886, 269, 0, 1886, 1120, 0, - 1886, 0, 1886, 263, 1886, 208, 1886, 267, 1112, 277, - - 0, 1886, 1886, 1886, 271, 281, 1886, 393, 1886, 396, - 1886, 1107, 396, 0, 406, 0, 1886, 1886, 1113, 1886, - 400, 905, 0, 418, 954, 1886, 430, 1886, 1886, 433, - 0, 1886, 1886, 1886, 1886, 1886, 1886, 432, 435, 0, - 449, 1886, 1886, 1886, 1886, 444, 0, 1003, 1886, 456, - 1886, 1099, 1886, 1110, 1886, 449, 1037, 714, 443, 1097, - 603, 0, 623, 1083, 1066, 1886, 615, 1886, 619, 0, - 632, 1886, 644, 1886, 635, 634, 635, 1886, 655, 1886, - 1886, 646, 0, 659, 0, 1886, 1886, 725, 738, 741, - 1886, 742, 1886, 1886, 0, 735, 0, 747, 741, 1886, - - 0, 0, 1886, 1111, 755, 1886, 0, 0, 1079, 747, - 754, 1074, 1067, 1069, 1079, 1886, 1886, 1104, 1069, 717, - 1070, 1058, 1067, 777, 1063, 1052, 1062, 1056, 1041, 0, - 0, 1886, 1886, 1079, 787, 1886, 1078, 0, 1886, 1886, - 1077, 0, 0, 0, 743, 765, 1886, 791, 1886, 1069, - 1886, 1075, 0, 1886, 794, 1074, 795, 798, 1062, 0, - 1886, 1071, 0, 1886, 789, 0, 1085, 0, 801, 1070, - 0, 804, 1886, 1886, 807, 1886, 1069, 0, 804, 1886, - 1886, 1068, 806, 1886, 0, 818, 1886, 1886, 847, 843, - 874, 799, 0, 905, 903, 800, 1886, 1886, 1886, 1886, - - 1886, 1886, 1066, 1026, 1886, 823, 0, 1886, 1048, 824, - 1886, 1047, 816, 871, 0, 1886, 1886, 1027, 0, 1886, - 1006, 872, 876, 0, 1134, 0, 969, 971, 948, 943, - 906, 897, 880, 875, 871, 864, 844, 835, 833, 799, - 0, 884, 1886, 890, 907, 845, 618, 863, 873, 914, - 889, 910, 912, 799, 1183, 795, 938, 942, 796, 786, - 747, 702, 695, 614, 959, 610, 598, 428, 932, 945, - 946, 1886, 947, 952, 1886, 406, 395, 975, 984, 985, - 990, 993, 994, 385, 372, 997, 365, 998, 247, 1886, - 966, 991, 994, 241, 1023, 1024, 1029, 1032, 1033, 1036, - - 153, 1037, 1040, 74, 1886, 22, 1041, 1044, 1045, 1054, - 1055, 0, 1062, 1063, 1886, 1232, 1249, 1266, 1283, 1300, - 1317, 1334, 1351, 1368, 1385, 1402, 1419, 1436, 1449, 1451, - 1468, 1485, 1502, 1519, 1536, 1553, 1570, 1587, 1598, 1615, - 1632, 1638, 1655, 1672, 1689, 1695, 1712, 1729, 1746, 1752, - 1758, 1775, 1792, 1800, 1817, 1834, 1851, 1056, 1868 - } ; - -static yyconst flex_int16_t yy_def[460] = - { 0, - 415, 1, 415, 3, 416, 416, 415, 7, 417, 417, - 418, 418, 419, 419, 420, 420, 415, 17, 421, 421, - 415, 21, 415, 23, 422, 422, 423, 423, 415, 29, - 415, 31, 415, 33, 424, 424, 425, 425, 415, 39, - 426, 426, 427, 427, 415, 428, 415, 415, 415, 415, - 415, 429, 430, 429, 415, 415, 415, 415, 415, 58, - 415, 415, 58, 63, 63, 63, 63, 63, 63, 63, - 431, 415, 432, 415, 415, 415, 415, 415, 415, 415, - 430, 415, 433, 415, 415, 434, 435, 415, 434, 436, - 415, 437, 415, 438, 415, 415, 415, 415, 439, 415, - - 440, 415, 415, 415, 441, 415, 415, 415, 415, 415, - 415, 415, 415, 442, 415, 443, 415, 415, 415, 415, - 444, 445, 446, 415, 446, 415, 415, 415, 415, 415, - 447, 415, 415, 415, 415, 415, 415, 448, 415, 428, - 415, 415, 415, 415, 415, 429, 430, 449, 415, 415, - 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, - 415, 430, 415, 430, 415, 415, 415, 415, 415, 450, - 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, - 415, 415, 451, 452, 453, 415, 415, 415, 415, 453, - 415, 415, 415, 415, 454, 454, 428, 415, 429, 415, - - 455, 430, 415, 415, 415, 415, 58, 63, 63, 63, - 63, 63, 63, 63, 63, 415, 415, 415, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, 63, 431, - 456, 415, 415, 415, 415, 415, 415, 433, 415, 415, - 415, 435, 436, 437, 438, 438, 415, 415, 415, 439, - 415, 415, 440, 415, 415, 415, 415, 415, 415, 442, - 415, 415, 443, 415, 444, 457, 445, 446, 415, 415, - 125, 415, 415, 415, 415, 415, 415, 447, 448, 415, - 415, 415, 429, 415, 449, 415, 415, 415, 415, 415, - 415, 415, 458, 415, 415, 415, 415, 415, 415, 415, - - 415, 415, 415, 430, 415, 415, 450, 415, 415, 415, - 415, 415, 415, 415, 451, 415, 415, 415, 453, 415, - 415, 453, 415, 454, 459, 455, 63, 63, 63, 63, - 63, 63, 415, 63, 63, 63, 63, 63, 63, 63, - 456, 415, 415, 415, 415, 415, 415, 415, 415, 458, - 415, 415, 415, 430, 459, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, 415, 415, - 415, 415, 415, 415, 415, 430, 63, 415, 415, 63, - 63, 63, 63, 63, 63, 415, 63, 63, 63, 415, - 415, 415, 415, 430, 63, 415, 415, 415, 415, 63, - - 63, 63, 415, 63, 415, 430, 415, 415, 63, 415, - 63, 430, 415, 415, 0, 415, 415, 415, 415, 415, - 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, - 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, - 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, - 415, 415, 415, 415, 415, 415, 415, 415, 415 - } ; - -static yyconst flex_int16_t yy_nxt[1936] = - { 0, - 46, 47, 48, 47, 46, 49, 50, 46, 51, 46, - 46, 46, 46, 46, 52, 46, 46, 46, 46, 46, - 46, 53, 53, 53, 53, 53, 54, 53, 53, 53, - 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, - 53, 53, 53, 53, 53, 53, 53, 53, 46, 55, - 198, 55, 198, 412, 56, 57, 58, 59, 60, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 61, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 57, 62, 57, 63, 63, 63, 64, 65, 63, 63, - 63, 66, 67, 63, 63, 63, 68, 63, 63, 63, - - 69, 70, 63, 57, 72, 72, 93, 200, 411, 93, - 201, 203, 204, 217, 218, 94, 73, 73, 94, 205, - 415, 205, 200, 415, 206, 201, 233, 234, 74, 74, - 75, 76, 77, 76, 75, 78, 75, 75, 75, 75, - 75, 75, 75, 75, 79, 75, 75, 75, 80, 75, - 75, 81, 81, 81, 81, 81, 82, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, 75, 84, - 84, 84, 85, 85, 84, 409, 232, 88, 84, 84, - 88, 220, 223, 221, 224, 200, 222, 235, 201, 235, - - 225, 236, 237, 86, 86, 89, 91, 91, 89, 248, - 232, 248, 89, 89, 95, 96, 97, 96, 95, 95, - 95, 95, 95, 95, 95, 95, 95, 95, 98, 95, - 95, 95, 95, 95, 95, 99, 99, 99, 99, 99, - 100, 99, 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 95, 102, 102, 200, 103, 103, 201, 104, - 104, 240, 241, 406, 246, 105, 105, 247, 200, 251, - 252, 201, 200, 255, 256, 201, 404, 106, 106, 107, - 108, 109, 108, 107, 107, 107, 107, 107, 107, 110, - - 107, 111, 112, 113, 107, 107, 107, 107, 107, 107, - 114, 114, 114, 114, 114, 115, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 107, 116, 116, - 117, 116, 116, 118, 119, 116, 120, 116, 116, 116, - 116, 116, 121, 122, 122, 122, 116, 116, 116, 123, - 123, 123, 123, 123, 124, 125, 123, 123, 123, 123, - 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, - 123, 123, 123, 123, 123, 123, 116, 127, 128, 127, - 127, 128, 127, 402, 257, 129, 257, 258, 129, 258, - - 173, 174, 173, 401, 173, 174, 173, 200, 261, 262, - 201, 200, 130, 175, 201, 130, 132, 175, 400, 133, - 269, 270, 134, 135, 136, 176, 137, 395, 138, 176, - 186, 272, 273, 272, 187, 276, 277, 281, 282, 274, - 139, 132, 188, 280, 133, 394, 201, 134, 135, 136, - 198, 137, 198, 138, 189, 415, 275, 286, 415, 286, - 200, 297, 298, 201, 389, 139, 140, 141, 142, 141, - 140, 143, 144, 140, 145, 140, 140, 140, 140, 140, - 146, 140, 140, 140, 140, 140, 140, 147, 147, 147, - 147, 147, 148, 147, 147, 147, 147, 147, 147, 147, - - 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 147, 147, 147, 140, 149, 150, 151, 150, 152, - 153, 149, 154, 155, 149, 149, 149, 149, 149, 156, - 157, 158, 158, 159, 160, 161, 162, 162, 162, 162, - 162, 163, 162, 162, 162, 162, 164, 162, 162, 162, - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 162, 165, 166, 167, 168, 167, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 169, 166, - 166, 166, 166, 166, 166, 170, 170, 170, 170, 170, - 171, 170, 170, 170, 170, 170, 170, 170, 170, 170, - - 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, - 170, 170, 166, 76, 77, 76, 306, 78, 306, 190, - 186, 190, 300, 301, 191, 302, 303, 177, 177, 177, - 200, 388, 188, 201, 308, 309, 311, 312, 82, 76, - 77, 76, 372, 78, 189, 310, 200, 310, 387, 201, - 313, 313, 313, 177, 177, 177, 314, 200, 314, 385, - 201, 317, 318, 372, 82, 178, 179, 180, 179, 178, - 178, 178, 178, 178, 181, 181, 178, 178, 178, 182, - 178, 178, 178, 178, 178, 178, 183, 183, 183, 183, - 183, 184, 183, 183, 183, 183, 183, 183, 183, 183, - - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 183, 183, 183, 178, 50, 192, 193, 192, 50, 194, - 50, 50, 50, 50, 50, 50, 50, 384, 196, 294, - 294, 294, 50, 50, 50, 383, 200, 295, 296, 201, - 320, 321, 322, 323, 322, 323, 200, 206, 198, 325, - 198, 295, 415, 328, 415, 415, 205, 415, 205, 296, - 329, 206, 50, 50, 192, 193, 192, 50, 194, 50, - 50, 50, 50, 50, 50, 50, 246, 196, 333, 247, - 333, 50, 50, 50, 220, 223, 221, 224, 235, 222, - 235, 382, 248, 225, 248, 342, 257, 342, 257, 258, - - 415, 258, 344, 415, 344, 272, 273, 272, 334, 276, - 277, 50, 207, 274, 207, 415, 335, 415, 415, 286, - 415, 286, 349, 353, 306, 310, 306, 310, 381, 380, - 275, 313, 313, 313, 377, 376, 349, 353, 368, 208, - 208, 208, 209, 210, 208, 208, 208, 211, 212, 208, - 208, 208, 213, 208, 208, 208, 214, 215, 208, 415, - 290, 415, 289, 289, 290, 367, 345, 346, 371, 366, - 291, 292, 314, 322, 314, 322, 365, 323, 206, 323, - 345, 333, 371, 333, 291, 342, 372, 342, 346, 208, - 208, 344, 292, 344, 208, 208, 372, 347, 348, 208, - - 372, 364, 363, 208, 208, 266, 266, 362, 266, 266, - 372, 347, 266, 375, 266, 266, 266, 266, 266, 348, - 294, 294, 294, 266, 266, 266, 351, 352, 295, 296, - 369, 370, 266, 375, 375, 375, 361, 373, 374, 378, - 351, 378, 295, 379, 369, 379, 360, 375, 352, 375, - 296, 373, 370, 266, 263, 263, 390, 263, 263, 374, - 386, 263, 386, 263, 263, 263, 263, 263, 390, 390, - 391, 392, 263, 263, 263, 393, 378, 390, 378, 359, - 358, 271, 390, 390, 391, 379, 396, 379, 396, 393, - 405, 397, 392, 397, 398, 399, 398, 399, 386, 403, - - 386, 403, 263, 283, 357, 356, 285, 283, 320, 283, - 283, 405, 283, 283, 405, 283, 283, 405, 283, 283, - 283, 283, 283, 283, 407, 396, 407, 396, 405, 317, - 397, 405, 397, 398, 399, 398, 399, 408, 410, 408, - 410, 403, 407, 403, 407, 408, 413, 408, 413, 311, - 308, 283, 289, 289, 290, 410, 414, 410, 414, 354, - 291, 292, 293, 413, 414, 413, 414, 350, 302, 350, - 281, 276, 269, 261, 291, 343, 255, 251, 249, 240, - 236, 233, 292, 340, 293, 266, 266, 339, 266, 266, - 338, 337, 266, 336, 266, 266, 266, 266, 266, 332, - - 331, 330, 327, 266, 266, 266, 217, 229, 228, 227, - 226, 219, 266, 203, 305, 304, 299, 288, 287, 264, - 259, 249, 415, 229, 228, 227, 226, 219, 216, 415, - 415, 415, 415, 266, 326, 326, 415, 326, 326, 326, - 326, 326, 326, 326, 326, 326, 326, 415, 415, 415, - 415, 415, 326, 326, 326, 415, 415, 415, 415, 415, - 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, - 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, - 415, 415, 326, 326, 326, 415, 326, 326, 326, 326, - 326, 326, 326, 326, 326, 326, 415, 415, 415, 415, - - 415, 326, 326, 326, 415, 415, 415, 415, 415, 415, - 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, - 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, - 415, 326, 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 71, 71, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 90, 90, 90, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, - - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, - 92, 92, 92, 92, 92, 92, 92, 101, 101, 101, - 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, - 101, 101, 101, 101, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 131, 131, 131, 131, 131, 131, 131, 131, 131, - 131, 131, 131, 131, 131, 131, 131, 131, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - - 75, 75, 185, 185, 185, 185, 185, 185, 185, 185, - 185, 185, 185, 185, 185, 185, 185, 185, 185, 195, - 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 197, 415, 415, 415, - 415, 415, 197, 197, 197, 197, 415, 197, 197, 199, - 415, 415, 415, 199, 415, 199, 199, 199, 199, 199, - 199, 199, 202, 415, 202, 202, 415, 202, 230, 230, - 415, 230, 230, 230, 230, 230, 230, 230, 415, 230, - 230, 230, 230, 415, 230, 231, 231, 231, 231, 231, - 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, - - 231, 231, 238, 238, 415, 415, 238, 238, 238, 238, - 238, 238, 238, 238, 238, 238, 238, 415, 238, 239, - 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, - 239, 239, 239, 239, 239, 239, 242, 242, 415, 242, - 242, 415, 242, 242, 242, 242, 242, 242, 242, 242, - 242, 415, 242, 243, 243, 415, 243, 243, 243, 243, - 243, 243, 243, 243, 243, 415, 243, 243, 415, 243, - 244, 244, 415, 244, 244, 244, 244, 244, 415, 244, - 244, 244, 244, 244, 244, 244, 244, 245, 245, 415, - 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, - - 245, 245, 245, 245, 250, 415, 415, 415, 415, 250, - 415, 250, 250, 415, 250, 253, 253, 415, 415, 253, - 415, 253, 253, 253, 253, 415, 253, 253, 253, 253, - 415, 253, 254, 254, 254, 254, 254, 254, 254, 254, - 254, 254, 254, 254, 254, 254, 254, 254, 254, 260, - 415, 260, 260, 415, 260, 263, 263, 415, 415, 415, - 415, 263, 263, 263, 263, 415, 415, 263, 415, 415, - 415, 263, 265, 265, 415, 415, 415, 415, 265, 265, - 265, 265, 265, 265, 265, 265, 265, 415, 265, 267, - 267, 415, 415, 415, 415, 267, 267, 267, 267, 415, - - 267, 267, 267, 267, 415, 267, 268, 415, 268, 268, - 415, 268, 278, 278, 415, 415, 278, 415, 415, 415, - 278, 278, 415, 278, 278, 278, 278, 415, 278, 279, - 279, 415, 415, 279, 415, 415, 415, 279, 279, 279, - 279, 279, 279, 279, 415, 279, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 307, 415, 307, 307, 415, 307, 315, - 415, 315, 315, 415, 315, 316, 316, 316, 316, 316, - 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, - 316, 316, 319, 319, 415, 319, 415, 319, 319, 319, - - 319, 319, 415, 319, 319, 319, 319, 415, 319, 324, - 324, 324, 415, 324, 324, 324, 324, 326, 326, 415, - 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, - 326, 326, 326, 326, 341, 341, 415, 341, 341, 341, - 341, 341, 415, 341, 415, 341, 341, 341, 341, 415, - 341, 266, 266, 415, 415, 415, 415, 266, 266, 266, - 266, 415, 415, 266, 415, 415, 415, 266, 355, 355, - 415, 355, 355, 355, 355, 355, 355, 355, 355, 355, - 355, 355, 355, 355, 355, 45, 415, 415, 415, 415, - 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, - - 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, - 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, - 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, - 415, 415, 415, 415, 415 - } ; - -static yyconst flex_int16_t yy_chk[1936] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 47, 2, 47, 406, 2, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - - 3, 3, 3, 3, 5, 6, 15, 52, 404, 16, - 52, 54, 54, 62, 62, 15, 5, 6, 16, 55, - 54, 55, 61, 54, 55, 61, 74, 74, 5, 6, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 9, - 10, 11, 9, 10, 12, 401, 73, 11, 13, 14, - 12, 65, 66, 65, 66, 73, 65, 76, 73, 76, - - 66, 82, 82, 9, 10, 11, 13, 14, 12, 96, - 73, 96, 13, 14, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 19, 20, 79, 19, 20, 79, 19, - 20, 86, 86, 394, 94, 19, 20, 94, 98, 100, - 100, 98, 105, 106, 106, 105, 389, 19, 20, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 25, 25, 25, - 26, 26, 26, 387, 108, 25, 108, 110, 26, 110, - - 35, 35, 35, 385, 36, 36, 36, 113, 115, 115, - 113, 121, 25, 35, 121, 26, 27, 36, 384, 27, - 124, 124, 27, 27, 27, 35, 27, 377, 27, 36, - 41, 127, 127, 127, 41, 130, 130, 139, 139, 127, - 27, 28, 41, 138, 28, 376, 138, 28, 28, 28, - 141, 28, 141, 28, 41, 146, 127, 150, 146, 150, - 156, 159, 159, 156, 368, 28, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 33, 33, 33, 33, 33, 33, - 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, - - 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 33, 37, 37, 37, 167, 37, 167, 42, - 42, 42, 161, 161, 42, 163, 163, 37, 37, 37, - 169, 367, 42, 169, 171, 171, 176, 176, 37, 38, - 38, 38, 347, 38, 42, 173, 175, 173, 366, 175, - 177, 177, 177, 38, 38, 38, 179, 182, 179, 364, - 182, 184, 184, 347, 38, 39, 39, 39, 39, 39, - 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, - 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, - 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, - - 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, - 39, 39, 39, 39, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 363, 43, 158, - 158, 158, 43, 43, 43, 362, 188, 158, 158, 188, - 189, 189, 190, 192, 190, 192, 196, 190, 198, 196, - 198, 158, 199, 220, 245, 199, 205, 245, 205, 158, - 220, 205, 43, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 246, 44, 224, 246, - 224, 44, 44, 44, 210, 211, 210, 211, 235, 210, - 235, 361, 248, 211, 248, 255, 257, 255, 257, 258, - - 265, 258, 269, 265, 269, 272, 272, 272, 224, 275, - 275, 44, 58, 272, 58, 279, 224, 283, 279, 286, - 283, 286, 292, 296, 306, 310, 306, 310, 360, 359, - 272, 313, 313, 313, 356, 354, 292, 296, 340, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 58, 63, - 290, 63, 289, 289, 289, 339, 290, 290, 346, 338, - 289, 289, 314, 322, 314, 322, 337, 323, 322, 323, - 290, 333, 346, 333, 289, 342, 348, 342, 290, 63, - 63, 344, 289, 344, 63, 63, 349, 291, 291, 63, - - 348, 336, 335, 63, 63, 122, 122, 334, 122, 122, - 349, 291, 122, 351, 122, 122, 122, 122, 122, 291, - 294, 294, 294, 122, 122, 122, 295, 295, 294, 294, - 345, 345, 122, 352, 351, 353, 332, 350, 350, 357, - 295, 357, 294, 358, 345, 358, 331, 352, 295, 353, - 294, 350, 345, 122, 125, 125, 369, 125, 125, 350, - 365, 125, 365, 125, 125, 125, 125, 125, 370, 371, - 373, 373, 125, 125, 125, 374, 378, 369, 378, 330, - 329, 125, 370, 371, 373, 379, 380, 379, 380, 374, - 391, 381, 373, 381, 382, 383, 382, 383, 386, 388, - - 386, 388, 125, 148, 328, 327, 148, 148, 321, 148, - 148, 391, 148, 148, 392, 148, 148, 393, 148, 148, - 148, 148, 148, 148, 395, 396, 395, 396, 392, 318, - 397, 393, 397, 398, 399, 398, 399, 400, 402, 400, - 402, 403, 407, 403, 407, 408, 409, 408, 409, 312, - 309, 148, 157, 157, 157, 410, 411, 410, 411, 304, - 157, 157, 157, 413, 414, 413, 414, 458, 303, 458, - 282, 277, 270, 262, 157, 259, 256, 252, 250, 241, - 237, 234, 157, 229, 157, 267, 267, 228, 267, 267, - 227, 226, 267, 225, 267, 267, 267, 267, 267, 223, - - 222, 221, 219, 267, 267, 267, 218, 215, 214, 213, - 212, 209, 267, 204, 165, 164, 160, 154, 152, 119, - 112, 99, 89, 70, 69, 68, 67, 64, 60, 45, - 0, 0, 0, 267, 325, 325, 0, 325, 325, 325, - 325, 325, 325, 325, 325, 325, 325, 0, 0, 0, - 0, 0, 325, 325, 325, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 325, 355, 355, 0, 355, 355, 355, 355, - 355, 355, 355, 355, 355, 355, 0, 0, 0, 0, - - 0, 355, 355, 355, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 355, 416, 416, 416, 416, 416, 416, 416, 416, - 416, 416, 416, 416, 416, 416, 416, 416, 416, 417, - 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, - 417, 417, 417, 417, 417, 417, 418, 418, 418, 418, - 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, - 418, 418, 418, 419, 419, 419, 419, 419, 419, 419, - 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, - - 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, - 420, 420, 420, 420, 420, 420, 420, 421, 421, 421, - 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, - 421, 421, 421, 421, 422, 422, 422, 422, 422, 422, - 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, - 422, 423, 423, 423, 423, 423, 423, 423, 423, 423, - 423, 423, 423, 423, 423, 423, 423, 423, 424, 424, - 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, - 424, 424, 424, 424, 424, 425, 425, 425, 425, 425, - 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, - - 425, 425, 426, 426, 426, 426, 426, 426, 426, 426, - 426, 426, 426, 426, 426, 426, 426, 426, 426, 427, - 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, - 427, 427, 427, 427, 427, 427, 428, 0, 0, 0, - 0, 0, 428, 428, 428, 428, 0, 428, 428, 429, - 0, 0, 0, 429, 0, 429, 429, 429, 429, 429, - 429, 429, 430, 0, 430, 430, 0, 430, 431, 431, - 0, 431, 431, 431, 431, 431, 431, 431, 0, 431, - 431, 431, 431, 0, 431, 432, 432, 432, 432, 432, - 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, - - 432, 432, 433, 433, 0, 0, 433, 433, 433, 433, - 433, 433, 433, 433, 433, 433, 433, 0, 433, 434, - 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, - 434, 434, 434, 434, 434, 434, 435, 435, 0, 435, - 435, 0, 435, 435, 435, 435, 435, 435, 435, 435, - 435, 0, 435, 436, 436, 0, 436, 436, 436, 436, - 436, 436, 436, 436, 436, 0, 436, 436, 0, 436, - 437, 437, 0, 437, 437, 437, 437, 437, 0, 437, - 437, 437, 437, 437, 437, 437, 437, 438, 438, 0, - 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, - - 438, 438, 438, 438, 439, 0, 0, 0, 0, 439, - 0, 439, 439, 0, 439, 440, 440, 0, 0, 440, - 0, 440, 440, 440, 440, 0, 440, 440, 440, 440, - 0, 440, 441, 441, 441, 441, 441, 441, 441, 441, - 441, 441, 441, 441, 441, 441, 441, 441, 441, 442, - 0, 442, 442, 0, 442, 443, 443, 0, 0, 0, - 0, 443, 443, 443, 443, 0, 0, 443, 0, 0, - 0, 443, 444, 444, 0, 0, 0, 0, 444, 444, - 444, 444, 444, 444, 444, 444, 444, 0, 444, 445, - 445, 0, 0, 0, 0, 445, 445, 445, 445, 0, - - 445, 445, 445, 445, 0, 445, 446, 0, 446, 446, - 0, 446, 447, 447, 0, 0, 447, 0, 0, 0, - 447, 447, 0, 447, 447, 447, 447, 0, 447, 448, - 448, 0, 0, 448, 0, 0, 0, 448, 448, 448, - 448, 448, 448, 448, 0, 448, 449, 449, 449, 449, - 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, - 449, 449, 449, 450, 0, 450, 450, 0, 450, 451, - 0, 451, 451, 0, 451, 452, 452, 452, 452, 452, - 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, - 452, 452, 453, 453, 0, 453, 0, 453, 453, 453, - - 453, 453, 0, 453, 453, 453, 453, 0, 453, 454, - 454, 454, 0, 454, 454, 454, 454, 455, 455, 0, - 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, - 455, 455, 455, 455, 456, 456, 0, 456, 456, 456, - 456, 456, 0, 456, 0, 456, 456, 456, 456, 0, - 456, 457, 457, 0, 0, 0, 0, 457, 457, 457, - 457, 0, 0, 457, 0, 0, 0, 457, 459, 459, - 0, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 415, 415, 415, 415, 415, - 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, - - 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, - 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, - 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, - 415, 415, 415, 415, 415 - } ; - -static yy_state_type yy_last_accepting_state; -static char *yy_last_accepting_cpos; - -extern int ppy__flex_debug; -int ppy__flex_debug = 0; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -char *ppy_text; -#line 1 "ppl.l" -/* -*-C-*- - * Wrc preprocessor lexical analysis - * - * Copyright 1999-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 - * - * History: - * 24-Apr-2000 BS - Started from scratch to restructure everything - * and reintegrate the source into the wine-tree. - * 04-Jan-2000 BS - Added comments about the lexicographical - * grammar to give some insight in the complexity. - * 28-Dec-1999 BS - Eliminated backing-up of the flexer by running - * `flex -b' on the source. This results in some - * weirdo extra rules, but a much faster scanner. - * 23-Dec-1999 BS - Started this file - * - *------------------------------------------------------------------------- - * The preprocessor's lexographical grammar (approximately): - * - * pp := {ws} # {ws} if {ws} {expr} {ws} \n - * | {ws} # {ws} ifdef {ws} {id} {ws} \n - * | {ws} # {ws} ifndef {ws} {id} {ws} \n - * | {ws} # {ws} elif {ws} {expr} {ws} \n - * | {ws} # {ws} else {ws} \n - * | {ws} # {ws} endif {ws} \n - * | {ws} # {ws} include {ws} < {anytext} > \n - * | {ws} # {ws} include {ws} " {anytext} " \n - * | {ws} # {ws} define {ws} {anytext} \n - * | {ws} # {ws} define( {arglist} ) {ws} {expansion} \n - * | {ws} # {ws} pragma {ws} {anytext} \n - * | {ws} # {ws} ident {ws} {anytext} \n - * | {ws} # {ws} error {ws} {anytext} \n - * | {ws} # {ws} warning {ws} {anytext} \n - * | {ws} # {ws} line {ws} " {anytext} " {number} \n - * | {ws} # {ws} {number} " {anytext} " {number} [ {number} [{number}] ] \n - * | {ws} # {ws} \n - * - * ws := [ \t\r\f\v]* - * - * expr := {expr} [+-*%^/|&] {expr} - * | {expr} {logor|logand} {expr} - * | [!~+-] {expr} - * | {expr} ? {expr} : {expr} - * - * logor := || - * - * logand := && - * - * id := [a-zA-Z_][a-zA-Z0-9_]* - * - * anytext := [^\n]* (see note) - * - * arglist := - * | {id} - * | {arglist} , {id} - * | {arglist} , {id} ... - * - * expansion := {id} - * | # {id} - * | {anytext} - * | {anytext} ## {anytext} - * - * number := [0-9]+ - * - * Note: "anytext" is not always "[^\n]*". This is because the - * trailing context must be considered as well. - * - * The only certain assumption for the preprocessor to make is that - * directives start at the beginning of the line, followed by a '#' - * and end with a newline. - * Any directive may be suffixed with a line-continuation. Also - * classical comment / *...* / (note: no comments within comments, - * therefore spaces) is considered to be a line-continuation - * (according to gcc and egcs AFAIK, ANSI is a bit vague). - * Comments have not been added to the above grammar for simplicity - * reasons. However, it is allowed to enter comment anywhere within - * the directives as long as they do not interfere with the context. - * All comments are considered to be deletable whitespace (both - * classical form "/ *...* /" and C++ form "//...\n"). - * - * All recursive scans, except for macro-expansion, are done by the - * parser, whereas the simple state transitions of non-recursive - * directives are done in the scanner. This results in the many - * exclusive start-conditions of the scanner. - * - * Macro expansions are slightly more difficult because they have to - * prescan the arguments. Parameter substitution is literal if the - * substitution is # or ## (either side). This enables new identifiers - * to be created (see 'info cpp' node Macro|Pitfalls|Prescan for more - * information). - * - * FIXME: Variable macro parameters is recognized, but not yet - * expanded. I have to reread the ANSI standard on the subject (yes, - * ANSI defines it). - * - * The following special defines are supported: - * __FILE__ -> "thissource.c" - * __LINE__ -> 123 - * __DATE__ -> "May 1 2000" - * __TIME__ -> "23:59:59" - * These macros expand, as expected, into their ANSI defined values. - * - * The same include prevention is implemented as gcc and egcs does. - * This results in faster processing because we do not read the text - * at all. Some wine-sources attempt to include the same file 4 or 5 - * times. This strategy also saves a lot blank output-lines, which in - * its turn improves the real resource scanner/parser. - * - */ - -/* - * Special flex options and exclusive scanner start-conditions - */ -#define YY_NO_INPUT 1 - - - - - - - - - - - - - - - - - - - - - -#line 164 "ppl.l" -#include -#include -#include -#include -#include -#include -#include - -#ifndef LLONG_MAX -# define LLONG_MAX ((long long)0x7fffffff << 32 | 0xffffffff) -# define LLONG_MIN (-LLONG_MAX - 1) -#endif -#ifndef ULLONG_MAX -# define ULLONG_MAX ((long long)0xffffffff << 32 | 0xffffffff) -#endif - -#ifndef HAVE_UNISTD_H -#define YY_NO_UNISTD_H -#endif - -#include "wine/wpp.h" -#include "wpp_private.h" -#include "ppy.tab.h" - -/* - * Make sure that we are running an appropriate version of flex. - */ -#if !defined(YY_FLEX_MAJOR_VERSION) || (1000 * YY_FLEX_MAJOR_VERSION + YY_FLEX_MINOR_VERSION < 2005) -#error Must use flex version 2.5.1 or higher (yy_scan_* routines are required). -#endif - -#define YY_READ_BUF_SIZE 65536 /* So we read most of a file at once */ - -#define yy_current_state() YY_START -#define yy_pp_state(x) yy_pop_state(); yy_push_state(x) - -/* - * Always update the current character position within a line - */ -#define YY_USER_ACTION pp_status.char_number+=ppy_leng; - -/* - * Buffer management for includes and expansions - */ -#define MAXBUFFERSTACK 128 /* Nesting more than 128 includes or macro expansion textss is insane */ - -typedef struct bufferstackentry { - YY_BUFFER_STATE bufferstate; /* Buffer to switch back to */ - void *filehandle; /* Handle to be used with wpp_callbacks->read */ - pp_entry_t *define; /* Points to expanding define or NULL if handling includes */ - int line_number; /* Line that we were handling */ - int char_number; /* The current position on that line */ - const char *filename; /* Filename that we were handling */ - int if_depth; /* How many #if:s deep to check matching #endif:s */ - int ncontinuations; /* Remember the continuation state */ - int should_pop; /* Set if we must pop the start-state on EOF */ - /* Include management */ - include_state_t incl; - char *include_filename; -} bufferstackentry_t; - -#define ALLOCBLOCKSIZE (1 << 10) /* Allocate these chunks at a time for string-buffers */ - -/* - * Macro expansion nesting - * We need the stack to handle expansions while scanning - * a macro's arguments. The TOS must always be the macro - * that receives the current expansion from the scanner. - */ -#define MAXMACEXPSTACK 128 /* Nesting more than 128 macro expansions is insane */ - -typedef struct macexpstackentry { - pp_entry_t *ppp; /* This macro we are scanning */ - char **args; /* With these arguments */ - char **ppargs; /* Resulting in these preprocessed arguments */ - int *nnls; /* Number of newlines per argument */ - int nargs; /* And this many arguments scanned */ - int parentheses; /* Nesting level of () */ - int curargsize; /* Current scanning argument's size */ - int curargalloc; /* Current scanning argument's block allocated */ - char *curarg; /* Current scanning argument's content */ -} macexpstackentry_t; - -#define MACROPARENTHESES() (top_macro()->parentheses) - -/* - * Prototypes - */ -static void newline(int); -static int make_number(int radix, YYSTYPE *val, const char *str, int len); -static void put_buffer(const char *s, int len); -/* Buffer management */ -static void push_buffer(pp_entry_t *ppp, char *filename, char *incname, int pop); -static bufferstackentry_t *pop_buffer(void); -/* String functions */ -static void new_string(void); -static void add_string(const char *str, int len); -static char *get_string(void); -static void put_string(void); -static int string_start(void); -/* Macro functions */ -static void push_macro(pp_entry_t *ppp); -static macexpstackentry_t *top_macro(void); -static macexpstackentry_t *pop_macro(void); -static void free_macro(macexpstackentry_t *mep); -static void add_text_to_macro(const char *text, int len); -static void macro_add_arg(int last); -static void macro_add_expansion(void); -/* Expansion */ -static void expand_special(pp_entry_t *ppp); -static void expand_define(pp_entry_t *ppp); -static void expand_macro(macexpstackentry_t *mep); - -/* - * Local variables - */ -static int ncontinuations; - -static int strbuf_idx = 0; -static int strbuf_alloc = 0; -static char *strbuffer = NULL; -static int str_startline; - -static macexpstackentry_t *macexpstack[MAXMACEXPSTACK]; -static int macexpstackidx = 0; - -static bufferstackentry_t bufferstack[MAXBUFFERSTACK]; -static int bufferstackidx = 0; - -/* - * Global variables - */ -include_state_t pp_incl_state = -{ - -1, /* state */ - NULL, /* ppp */ - 0, /* ifdepth */ - 0 /* seen_junk */ -}; - -includelogicentry_t *pp_includelogiclist = NULL; - -#define YY_INPUT(buf,result,max_size) \ - { \ - result = wpp_callbacks->read(pp_status.file, buf, max_size); \ - } - -#define BUFFERINITIALCAPACITY 256 - -void pp_writestring(const char *format, ...) -{ - va_list valist; - int len; - static char *buffer; - static int buffercapacity; - char *new_buffer; - - if(buffercapacity == 0) - { - buffer = pp_xmalloc(BUFFERINITIALCAPACITY); - if(buffer == NULL) - return; - buffercapacity = BUFFERINITIALCAPACITY; - } - - va_start(valist, format); - len = vsnprintf(buffer, buffercapacity, - format, valist); - /* If the string is longer than buffersize, vsnprintf returns - * the string length with glibc >= 2.1, -1 with glibc < 2.1 */ - while(len > buffercapacity || len < 0) - { - do - { - buffercapacity *= 2; - } while(len > buffercapacity); - - new_buffer = pp_xrealloc(buffer, buffercapacity); - if(new_buffer == NULL) - { - va_end(valist); - return; - } - buffer = new_buffer; - len = vsnprintf(buffer, buffercapacity, - format, valist); - } - va_end(valist); - - wpp_callbacks->write(buffer, len); -} - -/* - ************************************************************************** - * The scanner starts here - ************************************************************************** - */ -#line 1400 "lex.yy.c" - -#define INITIAL 0 -#define pp_pp 1 -#define pp_eol 2 -#define pp_inc 3 -#define pp_dqs 4 -#define pp_sqs 5 -#define pp_iqs 6 -#define pp_comment 7 -#define pp_def 8 -#define pp_define 9 -#define pp_macro 10 -#define pp_mbody 11 -#define pp_macign 12 -#define pp_macscan 13 -#define pp_macexp 14 -#define pp_if 15 -#define pp_ifd 16 -#define pp_endif 17 -#define pp_line 18 -#define pp_defined 19 -#define pp_ignore 20 -#define RCINCL 21 - -#ifndef YY_NO_UNISTD_H -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -#include -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -static int yy_init_globals (void ); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int ppy_lex_destroy (void ); - -int ppy_get_debug (void ); - -void ppy_set_debug (int debug_flag ); - -YY_EXTRA_TYPE ppy_get_extra (void ); - -void ppy_set_extra (YY_EXTRA_TYPE user_defined ); - -FILE *ppy_get_in (void ); - -void ppy_set_in (FILE * in_str ); - -FILE *ppy_get_out (void ); - -void ppy_set_out (FILE * out_str ); - -int ppy_get_leng (void ); - -char *ppy_get_text (void ); - -int ppy_get_lineno (void ); - -void ppy_set_lineno (int line_number ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int ppy_wrap (void ); -#else -extern int ppy_wrap (void ); -#endif -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (void ); -#else -static int input (void ); -#endif - -#endif - - static int yy_start_stack_ptr = 0; - static int yy_start_stack_depth = 0; - static int *yy_start_stack = NULL; - - static void yy_push_state (int new_state ); - - static void yy_pop_state (void ); - - static int yy_top_state (void ); - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else -#define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO do { if (fwrite( ppy_text, ppy_leng, 1, ppy_out )) {} } while (0) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( ppy_in )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( ppy_in ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = fread(buf, 1, max_size, ppy_in))==0 && ferror(ppy_in)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(ppy_in); \ - } \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int ppy_lex (void); - -#define YY_DECL int ppy_lex (void) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after ppy_text and ppy_leng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - if ( ppy_leng > 0 ) \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ - (ppy_text[ppy_leng - 1] == '\n'); \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - -#line 364 "ppl.l" - - /* - * Catch line-continuations. - * Note: Gcc keeps the line-continuations in, for example, strings - * intact. However, I prefer to remove them all so that the next - * scanner will not need to reduce the continuation state. - * - * <*>\\\n newline(0); - */ - - /* - * Detect the leading # of a preprocessor directive. - */ -#line 1633 "lex.yy.c" - - if ( !(yy_init) ) - { - (yy_init) = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! (yy_start) ) - (yy_start) = 1; /* first start state */ - - if ( ! ppy_in ) - ppy_in = stdin; - - if ( ! ppy_out ) - ppy_out = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - ppy_ensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - ppy__create_buffer(ppy_in,YY_BUF_SIZE ); - } - - ppy__load_buffer_state( ); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = (yy_c_buf_p); - - /* Support of ppy_text. */ - *yy_cp = (yy_hold_char); - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = (yy_start); - yy_current_state += YY_AT_BOL(); -yy_match: - do - { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 416 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_current_state != 415 ); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = (yy_hold_char); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - -case 1: -YY_RULE_SETUP -#line 377 "ppl.l" -pp_incl_state.seen_junk++; yy_push_state(pp_pp); - YY_BREAK -/* - * Scan for the preprocessor directives - */ -case 2: -YY_RULE_SETUP -#line 382 "ppl.l" -if(yy_top_state() != pp_ignore) {yy_pp_state(pp_inc); return tINCLUDE;} else {yy_pp_state(pp_eol);} - YY_BREAK -case 3: -YY_RULE_SETUP -#line 383 "ppl.l" -yy_pp_state(yy_current_state() != pp_ignore ? pp_def : pp_eol); - YY_BREAK -case 4: -YY_RULE_SETUP -#line 384 "ppl.l" -yy_pp_state(pp_eol); if(yy_top_state() != pp_ignore) return tERROR; - YY_BREAK -case 5: -YY_RULE_SETUP -#line 385 "ppl.l" -yy_pp_state(pp_eol); if(yy_top_state() != pp_ignore) return tWARNING; - YY_BREAK -case 6: -YY_RULE_SETUP -#line 386 "ppl.l" -yy_pp_state(pp_eol); if(yy_top_state() != pp_ignore) return tPRAGMA; - YY_BREAK -case 7: -YY_RULE_SETUP -#line 387 "ppl.l" -yy_pp_state(pp_eol); if(yy_top_state() != pp_ignore) return tPPIDENT; - YY_BREAK -case 8: -YY_RULE_SETUP -#line 388 "ppl.l" -if(yy_top_state() != pp_ignore) {yy_pp_state(pp_ifd); return tUNDEF;} else {yy_pp_state(pp_eol);} - YY_BREAK -case 9: -YY_RULE_SETUP -#line 389 "ppl.l" -yy_pp_state(pp_ifd); return tIFDEF; - YY_BREAK -case 10: -YY_RULE_SETUP -#line 390 "ppl.l" -pp_incl_state.seen_junk--; yy_pp_state(pp_ifd); return tIFNDEF; - YY_BREAK -case 11: -YY_RULE_SETUP -#line 391 "ppl.l" -yy_pp_state(pp_if); return tIF; - YY_BREAK -case 12: -YY_RULE_SETUP -#line 392 "ppl.l" -yy_pp_state(pp_if); return tELIF; - YY_BREAK -case 13: -YY_RULE_SETUP -#line 393 "ppl.l" -yy_pp_state(pp_endif); return tELSE; - YY_BREAK -case 14: -YY_RULE_SETUP -#line 394 "ppl.l" -yy_pp_state(pp_endif); return tENDIF; - YY_BREAK -case 15: -YY_RULE_SETUP -#line 395 "ppl.l" -if(yy_top_state() != pp_ignore) {yy_pp_state(pp_line); return tLINE;} else {yy_pp_state(pp_eol);} - YY_BREAK -case 16: -YY_RULE_SETUP -#line 396 "ppl.l" -if(yy_top_state() != pp_ignore) {yy_pp_state(pp_line); return tGCCLINE;} else {yy_pp_state(pp_eol);} - YY_BREAK -case 17: -YY_RULE_SETUP -#line 397 "ppl.l" -ppy_error("Invalid preprocessor token '%s'", ppy_text); - YY_BREAK -case 18: -/* rule 18 can match eol */ -YY_RULE_SETUP -#line 398 "ppl.l" -newline(1); yy_pop_state(); return tNL; /* This could be the null-token */ - YY_BREAK -case 19: -/* rule 19 can match eol */ -YY_RULE_SETUP -#line 399 "ppl.l" -newline(0); - YY_BREAK -case 20: -YY_RULE_SETUP -#line 400 "ppl.l" -ppy_error("Preprocessor junk '%s'", ppy_text); - YY_BREAK -case 21: -YY_RULE_SETUP -#line 401 "ppl.l" -return *ppy_text; - YY_BREAK -/* - * Handle #include and #line - */ -case 22: -YY_RULE_SETUP -#line 406 "ppl.l" -return make_number(10, &ppy_lval, ppy_text, ppy_leng); - YY_BREAK -case 23: -YY_RULE_SETUP -#line 407 "ppl.l" -new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_iqs); - YY_BREAK -case 24: -YY_RULE_SETUP -#line 408 "ppl.l" -new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_dqs); - YY_BREAK -case 25: -YY_RULE_SETUP -#line 409 "ppl.l" -; - YY_BREAK -case 26: -/* rule 26 can match eol */ -YY_RULE_SETUP -#line 410 "ppl.l" -newline(1); yy_pop_state(); return tNL; - YY_BREAK -case 27: -/* rule 27 can match eol */ -YY_RULE_SETUP -#line 411 "ppl.l" -newline(0); - YY_BREAK -case 28: -YY_RULE_SETUP -#line 412 "ppl.l" -ppy_error(yy_current_state() == pp_inc ? "Trailing junk in #include" : "Trailing junk in #line"); - YY_BREAK -/* - * Ignore all input when a false clause is parsed - */ -case 29: -YY_RULE_SETUP -#line 417 "ppl.l" -; - YY_BREAK -case 30: -/* rule 30 can match eol */ -YY_RULE_SETUP -#line 418 "ppl.l" -newline(1); - YY_BREAK -case 31: -/* rule 31 can match eol */ -YY_RULE_SETUP -#line 419 "ppl.l" -newline(0); - YY_BREAK -case 32: -YY_RULE_SETUP -#line 420 "ppl.l" -; - YY_BREAK -/* - * Handle #if and #elif. - * These require conditionals to be evaluated, but we do not - * want to jam the scanner normally when we see these tokens. - * Note: tIDENT is handled below. - */ -case 33: -YY_RULE_SETUP -#line 429 "ppl.l" -return make_number(8, &ppy_lval, ppy_text, ppy_leng); - YY_BREAK -case 34: -YY_RULE_SETUP -#line 430 "ppl.l" -ppy_error("Invalid octal digit"); - YY_BREAK -case 35: -YY_RULE_SETUP -#line 431 "ppl.l" -return make_number(10, &ppy_lval, ppy_text, ppy_leng); - YY_BREAK -case 36: -YY_RULE_SETUP -#line 432 "ppl.l" -return make_number(16, &ppy_lval, ppy_text, ppy_leng); - YY_BREAK -case 37: -YY_RULE_SETUP -#line 433 "ppl.l" -ppy_error("Invalid hex number"); - YY_BREAK -case 38: -YY_RULE_SETUP -#line 434 "ppl.l" -yy_push_state(pp_defined); return tDEFINED; - YY_BREAK -case 39: -YY_RULE_SETUP -#line 435 "ppl.l" -return tLSHIFT; - YY_BREAK -case 40: -YY_RULE_SETUP -#line 436 "ppl.l" -return tRSHIFT; - YY_BREAK -case 41: -YY_RULE_SETUP -#line 437 "ppl.l" -return tLOGAND; - YY_BREAK -case 42: -YY_RULE_SETUP -#line 438 "ppl.l" -return tLOGOR; - YY_BREAK -case 43: -YY_RULE_SETUP -#line 439 "ppl.l" -return tEQ; - YY_BREAK -case 44: -YY_RULE_SETUP -#line 440 "ppl.l" -return tNE; - YY_BREAK -case 45: -YY_RULE_SETUP -#line 441 "ppl.l" -return tLTE; - YY_BREAK -case 46: -YY_RULE_SETUP -#line 442 "ppl.l" -return tGTE; - YY_BREAK -case 47: -/* rule 47 can match eol */ -YY_RULE_SETUP -#line 443 "ppl.l" -newline(1); yy_pop_state(); return tNL; - YY_BREAK -case 48: -/* rule 48 can match eol */ -YY_RULE_SETUP -#line 444 "ppl.l" -newline(0); - YY_BREAK -case 49: -YY_RULE_SETUP -#line 445 "ppl.l" -ppy_error("Junk in conditional expression"); - YY_BREAK -case 50: -YY_RULE_SETUP -#line 446 "ppl.l" -; - YY_BREAK -case 51: -YY_RULE_SETUP -#line 447 "ppl.l" -new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_sqs); - YY_BREAK -case 52: -YY_RULE_SETUP -#line 448 "ppl.l" -ppy_error("String constants not allowed in conditionals"); - YY_BREAK -case 53: -YY_RULE_SETUP -#line 449 "ppl.l" -return *ppy_text; - YY_BREAK -/* - * Handle #ifdef, #ifndef and #undef - * to get only an untranslated/unexpanded identifier - */ -case 54: -YY_RULE_SETUP -#line 455 "ppl.l" -ppy_lval.cptr = pp_xstrdup(ppy_text); return tIDENT; - YY_BREAK -case 55: -YY_RULE_SETUP -#line 456 "ppl.l" -; - YY_BREAK -case 56: -/* rule 56 can match eol */ -YY_RULE_SETUP -#line 457 "ppl.l" -newline(1); yy_pop_state(); return tNL; - YY_BREAK -case 57: -/* rule 57 can match eol */ -YY_RULE_SETUP -#line 458 "ppl.l" -newline(0); - YY_BREAK -case 58: -YY_RULE_SETUP -#line 459 "ppl.l" -ppy_error("Identifier expected"); - YY_BREAK -/* - * Handle #else and #endif. - */ -case 59: -YY_RULE_SETUP -#line 464 "ppl.l" -; - YY_BREAK -case 60: -/* rule 60 can match eol */ -YY_RULE_SETUP -#line 465 "ppl.l" -newline(1); yy_pop_state(); return tNL; - YY_BREAK -case 61: -/* rule 61 can match eol */ -YY_RULE_SETUP -#line 466 "ppl.l" -newline(0); - YY_BREAK -case 62: -YY_RULE_SETUP -#line 467 "ppl.l" -ppy_error("Garbage after #else or #endif."); - YY_BREAK -/* - * Handle the special 'defined' keyword. - * This is necessary to get the identifier prior to any - * substitutions. - */ -case 63: -YY_RULE_SETUP -#line 474 "ppl.l" -yy_pop_state(); ppy_lval.cptr = pp_xstrdup(ppy_text); return tIDENT; - YY_BREAK -case 64: -YY_RULE_SETUP -#line 475 "ppl.l" -; - YY_BREAK -case 65: -YY_RULE_SETUP -#line 476 "ppl.l" -return *ppy_text; - YY_BREAK -case 66: -/* rule 66 can match eol */ -YY_RULE_SETUP -#line 477 "ppl.l" -newline(0); - YY_BREAK -case 67: -/* rule 67 can match eol */ -YY_RULE_SETUP -#line 478 "ppl.l" -ppy_error("Identifier expected"); - YY_BREAK -/* - * Handle #error, #warning, #pragma and #ident. - * Pass everything literally to the parser, which - * will act appropriately. - * Comments are stripped from the literal text. - */ -case 68: -YY_RULE_SETUP -#line 486 "ppl.l" -if(yy_top_state() != pp_ignore) { ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; } - YY_BREAK -case 69: -YY_RULE_SETUP -#line 487 "ppl.l" -if(yy_top_state() != pp_ignore) { ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; } - YY_BREAK -case 70: -/* rule 70 can match eol */ -YY_RULE_SETUP -#line 488 "ppl.l" -if(yy_top_state() != pp_ignore) { ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; } - YY_BREAK -case 71: -/* rule 71 can match eol */ -YY_RULE_SETUP -#line 489 "ppl.l" -newline(1); yy_pop_state(); if(yy_current_state() != pp_ignore) { return tNL; } - YY_BREAK -case 72: -/* rule 72 can match eol */ -YY_RULE_SETUP -#line 490 "ppl.l" -newline(0); - YY_BREAK -/* - * Handle left side of #define - */ -case 73: -YY_RULE_SETUP -#line 495 "ppl.l" -ppy_lval.cptr = pp_xstrdup(ppy_text); if(ppy_lval.cptr) ppy_lval.cptr[ppy_leng-1] = '\0'; yy_pp_state(pp_macro); return tMACRO; - YY_BREAK -case 74: -YY_RULE_SETUP -#line 496 "ppl.l" -ppy_lval.cptr = pp_xstrdup(ppy_text); yy_pp_state(pp_define); return tDEFINE; - YY_BREAK -case 75: -YY_RULE_SETUP -#line 497 "ppl.l" -; - YY_BREAK -case 76: -/* rule 76 can match eol */ -YY_RULE_SETUP -#line 498 "ppl.l" -newline(0); - YY_BREAK -case 77: -/* rule 77 can match eol */ -YY_RULE_SETUP -#line 499 "ppl.l" -perror("Identifier expected"); - YY_BREAK -/* - * Scan the substitution of a define - */ -case 78: -YY_RULE_SETUP -#line 504 "ppl.l" -ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; - YY_BREAK -case 79: -/* rule 79 can match eol */ -YY_RULE_SETUP -#line 505 "ppl.l" -ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; - YY_BREAK -case 80: -/* rule 80 can match eol */ -YY_RULE_SETUP -#line 506 "ppl.l" -newline(0); ppy_lval.cptr = pp_xstrdup(" "); return tLITERAL; - YY_BREAK -case 81: -/* rule 81 can match eol */ -YY_RULE_SETUP -#line 507 "ppl.l" -newline(0); - YY_BREAK -case 82: -/* rule 82 can match eol */ -YY_RULE_SETUP -#line 508 "ppl.l" -newline(1); yy_pop_state(); return tNL; - YY_BREAK -case 83: -YY_RULE_SETUP -#line 509 "ppl.l" -new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_sqs); - YY_BREAK -case 84: -YY_RULE_SETUP -#line 510 "ppl.l" -new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_dqs); - YY_BREAK -/* - * Scan the definition macro arguments - */ -case 85: -YY_RULE_SETUP -#line 515 "ppl.l" -yy_pp_state(pp_mbody); return tMACROEND; - YY_BREAK -case 86: -YY_RULE_SETUP -#line 516 "ppl.l" -; - YY_BREAK -case 87: -YY_RULE_SETUP -#line 517 "ppl.l" -ppy_lval.cptr = pp_xstrdup(ppy_text); return tIDENT; - YY_BREAK -case 88: -YY_RULE_SETUP -#line 518 "ppl.l" -return ','; - YY_BREAK -case 89: -YY_RULE_SETUP -#line 519 "ppl.l" -return tELIPSIS; - YY_BREAK -case 90: -/* rule 90 can match eol */ -YY_RULE_SETUP -#line 520 "ppl.l" -ppy_error("Argument identifier expected"); - YY_BREAK -case 91: -/* rule 91 can match eol */ -YY_RULE_SETUP -#line 521 "ppl.l" -newline(0); - YY_BREAK -/* - * Scan the substitution of a macro - */ -case 92: -YY_RULE_SETUP -#line 526 "ppl.l" -ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; - YY_BREAK -case 93: -YY_RULE_SETUP -#line 527 "ppl.l" -ppy_lval.cptr = pp_xstrdup(ppy_text); return tIDENT; - YY_BREAK -case 94: -YY_RULE_SETUP -#line 528 "ppl.l" -return tCONCAT; - YY_BREAK -case 95: -YY_RULE_SETUP -#line 529 "ppl.l" -return tSTRINGIZE; - YY_BREAK -case 96: -YY_RULE_SETUP -#line 530 "ppl.l" -ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; - YY_BREAK -case 97: -YY_RULE_SETUP -#line 531 "ppl.l" -ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; - YY_BREAK -case 98: -/* rule 98 can match eol */ -YY_RULE_SETUP -#line 532 "ppl.l" -newline(0); ppy_lval.cptr = pp_xstrdup(" "); return tLITERAL; - YY_BREAK -case 99: -/* rule 99 can match eol */ -YY_RULE_SETUP -#line 533 "ppl.l" -newline(0); - YY_BREAK -case 100: -/* rule 100 can match eol */ -YY_RULE_SETUP -#line 534 "ppl.l" -newline(1); yy_pop_state(); return tNL; - YY_BREAK -case 101: -YY_RULE_SETUP -#line 535 "ppl.l" -new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_sqs); - YY_BREAK -case 102: -YY_RULE_SETUP -#line 536 "ppl.l" -new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_dqs); - YY_BREAK -/* - * Macro expansion text scanning. - * This state is active just after the identifier is scanned - * that triggers an expansion. We *must* delete the leading - * whitespace before we can start scanning for arguments. - * - * If we do not see a '(' as next trailing token, then we have - * a false alarm. We just continue with a nose-bleed... - */ -case 103: -*yy_cp = (yy_hold_char); /* undo effects of setting up ppy_text */ -(yy_c_buf_p) = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up ppy_text again */ -YY_RULE_SETUP -#line 547 "ppl.l" -yy_pp_state(pp_macscan); - YY_BREAK -case 104: -/* rule 104 can match eol */ -YY_RULE_SETUP -#line 548 "ppl.l" -{ - if(yy_top_state() != pp_macscan) - newline(0); - } - YY_BREAK -case 105: -/* rule 105 can match eol */ -YY_RULE_SETUP -#line 552 "ppl.l" -newline(0); - YY_BREAK -case 106: -YY_RULE_SETUP -#line 553 "ppl.l" -{ - macexpstackentry_t *mac = pop_macro(); - yy_pop_state(); - put_buffer(mac->ppp->ident, strlen(mac->ppp->ident)); - put_buffer(ppy_text, ppy_leng); - free_macro(mac); - } - YY_BREAK -/* - * Macro expansion argument text scanning. - * This state is active when a macro's arguments are being read for expansion. - */ -case 107: -YY_RULE_SETUP -#line 565 "ppl.l" -{ - if(++MACROPARENTHESES() > 1) - add_text_to_macro(ppy_text, ppy_leng); - } - YY_BREAK -case 108: -YY_RULE_SETUP -#line 569 "ppl.l" -{ - if(--MACROPARENTHESES() == 0) - { - yy_pop_state(); - macro_add_arg(1); - } - else - add_text_to_macro(ppy_text, ppy_leng); - } - YY_BREAK -case 109: -YY_RULE_SETUP -#line 578 "ppl.l" -{ - if(MACROPARENTHESES() > 1) - add_text_to_macro(ppy_text, ppy_leng); - else - macro_add_arg(0); - } - YY_BREAK -case 110: -YY_RULE_SETUP -#line 584 "ppl.l" -new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_dqs); - YY_BREAK -case 111: -YY_RULE_SETUP -#line 585 "ppl.l" -new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_sqs); - YY_BREAK -case 112: -YY_RULE_SETUP -#line 586 "ppl.l" -yy_push_state(pp_comment); add_text_to_macro(" ", 1); - YY_BREAK -case 113: -/* rule 113 can match eol */ -YY_RULE_SETUP -#line 587 "ppl.l" -pp_status.line_number++; pp_status.char_number = 1; add_text_to_macro(ppy_text, ppy_leng); - YY_BREAK -case 114: -YY_RULE_SETUP -#line 588 "ppl.l" -add_text_to_macro(ppy_text, ppy_leng); - YY_BREAK -case 115: -/* rule 115 can match eol */ -YY_RULE_SETUP -#line 589 "ppl.l" -newline(0); - YY_BREAK -/* - * Comment handling (almost all start-conditions) - */ -case 116: -YY_RULE_SETUP -#line 594 "ppl.l" -yy_push_state(pp_comment); - YY_BREAK -case 117: -YY_RULE_SETUP -#line 595 "ppl.l" -; - YY_BREAK -case 118: -/* rule 118 can match eol */ -YY_RULE_SETUP -#line 596 "ppl.l" -newline(0); - YY_BREAK -case 119: -YY_RULE_SETUP -#line 597 "ppl.l" -yy_pop_state(); - YY_BREAK -/* - * Remove C++ style comment (almost all start-conditions) - */ -case 120: -YY_RULE_SETUP -#line 602 "ppl.l" -{ - if(ppy_text[ppy_leng-1] == '\\') - ppy_warning("C++ style comment ends with an escaped newline (escape ignored)"); - } - YY_BREAK -/* - * Single, double and <> quoted constants - */ -case 121: -YY_RULE_SETUP -#line 610 "ppl.l" -pp_incl_state.seen_junk++; new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_dqs); - YY_BREAK -case 122: -YY_RULE_SETUP -#line 611 "ppl.l" -pp_incl_state.seen_junk++; new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_sqs); - YY_BREAK -case 123: -YY_RULE_SETUP -#line 612 "ppl.l" -add_string(ppy_text, ppy_leng); - YY_BREAK -case 124: -YY_RULE_SETUP -#line 613 "ppl.l" -{ - add_string(ppy_text, ppy_leng); - yy_pop_state(); - switch(yy_current_state()) - { - case pp_pp: - case pp_define: - case pp_mbody: - case pp_inc: - case RCINCL: - if (yy_current_state()==RCINCL) yy_pop_state(); - ppy_lval.cptr = get_string(); - return tDQSTRING; - case pp_line: - ppy_lval.cptr = get_string(); - return tDQSTRING; - default: - put_string(); - } - } - YY_BREAK -case 125: -YY_RULE_SETUP -#line 633 "ppl.l" -add_string(ppy_text, ppy_leng); - YY_BREAK -case 126: -YY_RULE_SETUP -#line 634 "ppl.l" -{ - add_string(ppy_text, ppy_leng); - yy_pop_state(); - switch(yy_current_state()) - { - case pp_if: - case pp_define: - case pp_mbody: - ppy_lval.cptr = get_string(); - return tSQSTRING; - default: - put_string(); - } - } - YY_BREAK -case 127: -YY_RULE_SETUP -#line 648 "ppl.l" -add_string(ppy_text, ppy_leng); - YY_BREAK -case 128: -YY_RULE_SETUP -#line 649 "ppl.l" -{ - add_string(ppy_text, ppy_leng); - yy_pop_state(); - ppy_lval.cptr = get_string(); - return tIQSTRING; - } - YY_BREAK -case 129: -/* rule 129 can match eol */ -YY_RULE_SETUP -#line 655 "ppl.l" -{ - /* - * This is tricky; we need to remove the line-continuation - * from preprocessor strings, but OTOH retain them in all - * other strings. This is because the resource grammar is - * even more braindead than initially analysed and line- - * continuations in strings introduce, sigh, newlines in - * the output. There goes the concept of non-breaking, non- - * spacing whitespace. - */ - switch(yy_top_state()) - { - case pp_pp: - case pp_define: - case pp_mbody: - case pp_inc: - case pp_line: - newline(0); - break; - default: - add_string(ppy_text, ppy_leng); - newline(-1); - } - } - YY_BREAK -case 130: -YY_RULE_SETUP -#line 679 "ppl.l" -add_string(ppy_text, ppy_leng); - YY_BREAK -case 131: -/* rule 131 can match eol */ -YY_RULE_SETUP -#line 680 "ppl.l" -{ - newline(1); - add_string(ppy_text, ppy_leng); - ppy_warning("Newline in string constant encounterd (started line %d)", string_start()); - } - YY_BREAK -/* - * Identifier scanning - */ -case 132: -YY_RULE_SETUP -#line 689 "ppl.l" -{ - pp_entry_t *ppp; - pp_incl_state.seen_junk++; - if(!(ppp = pplookup(ppy_text))) - { - if(yy_current_state() == pp_inc) - ppy_error("Expected include filename"); - - else if(yy_current_state() == pp_if) - { - ppy_lval.cptr = pp_xstrdup(ppy_text); - return tIDENT; - } - else { - if((yy_current_state()==INITIAL) && (strcasecmp(ppy_text,"RCINCLUDE")==0)){ - yy_push_state(RCINCL); - return tRCINCLUDE; - } - else put_buffer(ppy_text, ppy_leng); - } - } - else if(!ppp->expanding) - { - switch(ppp->type) - { - case def_special: - expand_special(ppp); - break; - case def_define: - expand_define(ppp); - break; - case def_macro: - yy_push_state(pp_macign); - push_macro(ppp); - break; - default: - pp_internal_error(__FILE__, __LINE__, "Invalid define type %d\n", ppp->type); - } - } - else put_buffer(ppy_text, ppy_leng); - } - YY_BREAK -/* - * Everything else that needs to be passed and - * newline and continuation handling - */ -case 133: -YY_RULE_SETUP -#line 735 "ppl.l" -pp_incl_state.seen_junk++; put_buffer(ppy_text, ppy_leng); - YY_BREAK -case 134: -YY_RULE_SETUP -#line 736 "ppl.l" -put_buffer(ppy_text, ppy_leng); - YY_BREAK -case 135: -/* rule 135 can match eol */ -YY_RULE_SETUP -#line 737 "ppl.l" -newline(1); - YY_BREAK -case 136: -/* rule 136 can match eol */ -YY_RULE_SETUP -#line 738 "ppl.l" -newline(0); - YY_BREAK -case 137: -YY_RULE_SETUP -#line 739 "ppl.l" -pp_incl_state.seen_junk++; put_buffer(ppy_text, ppy_leng); - YY_BREAK -/* - * Special catcher for macro argmument expansion to prevent - * newlines to propagate to the output or admin. - */ -case 138: -/* rule 138 can match eol */ -YY_RULE_SETUP -#line 745 "ppl.l" -put_buffer(ppy_text, ppy_leng); - YY_BREAK -case 139: -YY_RULE_SETUP -#line 747 "ppl.l" -{ - ppy_lval.cptr=pp_xstrdup(ppy_text); - yy_pop_state(); - return tRCINCLUDEPATH; - } - YY_BREAK -case 140: -YY_RULE_SETUP -#line 753 "ppl.l" -; - YY_BREAK -case 141: -YY_RULE_SETUP -#line 755 "ppl.l" -{ - new_string(); add_string(ppy_text,ppy_leng);yy_push_state(pp_dqs); - } - YY_BREAK -/* - * This is a 'catch-all' rule to discover errors in the scanner - * in an orderly manner. - */ -case 142: -YY_RULE_SETUP -#line 763 "ppl.l" -pp_incl_state.seen_junk++; ppy_warning("Unmatched text '%c' (0x%02x); please report\n", isprint(*ppy_text & 0xff) ? *ppy_text : ' ', *ppy_text); - YY_BREAK -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(pp_pp): -case YY_STATE_EOF(pp_eol): -case YY_STATE_EOF(pp_inc): -case YY_STATE_EOF(pp_dqs): -case YY_STATE_EOF(pp_sqs): -case YY_STATE_EOF(pp_iqs): -case YY_STATE_EOF(pp_comment): -case YY_STATE_EOF(pp_def): -case YY_STATE_EOF(pp_define): -case YY_STATE_EOF(pp_macro): -case YY_STATE_EOF(pp_mbody): -case YY_STATE_EOF(pp_macign): -case YY_STATE_EOF(pp_macscan): -case YY_STATE_EOF(pp_macexp): -case YY_STATE_EOF(pp_if): -case YY_STATE_EOF(pp_ifd): -case YY_STATE_EOF(pp_endif): -case YY_STATE_EOF(pp_line): -case YY_STATE_EOF(pp_defined): -case YY_STATE_EOF(pp_ignore): -case YY_STATE_EOF(RCINCL): -#line 765 "ppl.l" -{ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; - bufferstackentry_t *bep = pop_buffer(); - - if((!bep && pp_get_if_depth()) || (bep && pp_get_if_depth() != bep->if_depth)) - ppy_warning("Unmatched #if/#endif at end of file"); - - if(!bep) - { - if(YY_START != INITIAL) - ppy_error("Unexpected end of file during preprocessing"); - yyterminate(); - } - else if(bep->should_pop == 2) - { - macexpstackentry_t *mac; - mac = pop_macro(); - expand_macro(mac); - } - ppy__delete_buffer(b); - } - YY_BREAK -case 143: -YY_RULE_SETUP -#line 787 "ppl.l" -ECHO; - YY_BREAK -#line 2734 "lex.yy.c" - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = (yy_hold_char); - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed ppy_in at a new source and called - * ppy_lex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = ppy_in; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++(yy_c_buf_p); - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_END_OF_FILE: - { - (yy_did_buffer_switch_on_eof) = 0; - - if ( ppy_wrap( ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * ppy_text, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = - (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - (yy_c_buf_p) = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ -} /* end of ppy_lex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (void) -{ - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = (yytext_ptr); - register int number_to_move, i; - int ret_val; - - if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; - - int yy_c_buf_p_offset = - (int) ((yy_c_buf_p) - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - ppy_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), (size_t) num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - if ( (yy_n_chars) == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - ppy_restart(ppy_in ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) ppy_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - (yy_n_chars) += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; - - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (void) -{ - register yy_state_type yy_current_state; - register char *yy_cp; - - yy_current_state = (yy_start); - yy_current_state += YY_AT_BOL(); - - for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 416 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) -{ - register int yy_is_jam; - register char *yy_cp = (yy_c_buf_p); - - register YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 416 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 415); - - return yy_is_jam ? 0 : yy_current_state; -} - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (void) -#else - static int input (void) -#endif - -{ - int c; - - *(yy_c_buf_p) = (yy_hold_char); - - if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - /* This was really a NUL. */ - *(yy_c_buf_p) = '\0'; - - else - { /* need more input */ - int offset = (yy_c_buf_p) - (yytext_ptr); - ++(yy_c_buf_p); - - switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - ppy_restart(ppy_in ); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( ppy_wrap( ) ) - return EOF; - - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(); -#else - return input(); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + offset; - break; - } - } - } - - c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve ppy_text */ - (yy_hold_char) = *++(yy_c_buf_p); - - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * - * @note This function does not reset the start condition to @c INITIAL . - */ - void ppy_restart (FILE * input_file ) -{ - - if ( ! YY_CURRENT_BUFFER ){ - ppy_ensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - ppy__create_buffer(ppy_in,YY_BUF_SIZE ); - } - - ppy__init_buffer(YY_CURRENT_BUFFER,input_file ); - ppy__load_buffer_state( ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * - */ - void ppy__switch_to_buffer (YY_BUFFER_STATE new_buffer ) -{ - - /* TODO. We should be able to replace this entire function body - * with - * ppy_pop_buffer_state(); - * ppy_push_buffer_state(new_buffer); - */ - ppy_ensure_buffer_stack (); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - ppy__load_buffer_state( ); - - /* We don't actually know whether we did this switch during - * EOF (ppy_wrap()) processing, but the only time this flag - * is looked at is after ppy_wrap() is called, so it's safe - * to go ahead and always set it. - */ - (yy_did_buffer_switch_on_eof) = 1; -} - -static void ppy__load_buffer_state (void) -{ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - ppy_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - (yy_hold_char) = *(yy_c_buf_p); -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * - * @return the allocated buffer state. - */ - YY_BUFFER_STATE ppy__create_buffer (FILE * file, int size ) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) ppy_alloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in ppy__create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) ppy_alloc(b->yy_buf_size + 2 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in ppy__create_buffer()" ); - - b->yy_is_our_buffer = 1; - - ppy__init_buffer(b,file ); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with ppy__create_buffer() - * - */ - void ppy__delete_buffer (YY_BUFFER_STATE b ) -{ - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - ppy_free((void *) b->yy_ch_buf ); - - ppy_free((void *) b ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a ppy_restart() or at EOF. - */ - static void ppy__init_buffer (YY_BUFFER_STATE b, FILE * file ) - -{ - int oerrno = errno; - - ppy__flush_buffer(b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then ppy__init_buffer was _probably_ - * called from ppy_restart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * - */ - void ppy__flush_buffer (YY_BUFFER_STATE b ) -{ - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - ppy__load_buffer_state( ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * - */ -void ppy_push_buffer_state (YY_BUFFER_STATE new_buffer ) -{ - if (new_buffer == NULL) - return; - - ppy_ensure_buffer_stack(); - - /* This block is copied from ppy__switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - (yy_buffer_stack_top)++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from ppy__switch_to_buffer. */ - ppy__load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * - */ -void ppy_pop_buffer_state (void) -{ - if (!YY_CURRENT_BUFFER) - return; - - ppy__delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - ppy__load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void ppy_ensure_buffer_stack (void) -{ - int num_to_alloc; - - if (!(yy_buffer_stack)) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; - (yy_buffer_stack) = (struct yy_buffer_state**)ppy_alloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in ppy_ensure_buffer_stack()" ); - - memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - (yy_buffer_stack_max) = num_to_alloc; - (yy_buffer_stack_top) = 0; - return; - } - - if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**)ppy_realloc - ((yy_buffer_stack), - num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in ppy_ensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); - (yy_buffer_stack_max) = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE ppy__scan_buffer (char * base, yy_size_t size ) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) ppy_alloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in ppy__scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - ppy__switch_to_buffer(b ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to ppy_lex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * ppy__scan_bytes() instead. - */ -YY_BUFFER_STATE ppy__scan_string (yyconst char * yystr ) -{ - - return ppy__scan_bytes(yystr,strlen(yystr) ); -} - -/** Setup the input buffer state to scan the given bytes. The next call to ppy_lex() will - * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE ppy__scan_bytes (yyconst char * yybytes, int _yybytes_len ) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) ppy_alloc(n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in ppy__scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = ppy__scan_buffer(buf,n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in ppy__scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - - static void yy_push_state (int new_state ) -{ - if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) ) - { - yy_size_t new_size; - - (yy_start_stack_depth) += YY_START_STACK_INCR; - new_size = (yy_start_stack_depth) * sizeof( int ); - - if ( ! (yy_start_stack) ) - (yy_start_stack) = (int *) ppy_alloc(new_size ); - - else - (yy_start_stack) = (int *) ppy_realloc((void *) (yy_start_stack),new_size ); - - if ( ! (yy_start_stack) ) - YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); - } - - (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START; - - BEGIN(new_state); -} - - static void yy_pop_state (void) -{ - if ( --(yy_start_stack_ptr) < 0 ) - YY_FATAL_ERROR( "start-condition stack underflow" ); - - BEGIN((yy_start_stack)[(yy_start_stack_ptr)]); -} - - static int yy_top_state (void) -{ - return (yy_start_stack)[(yy_start_stack_ptr) - 1]; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yy_fatal_error (yyconst char* msg ) -{ - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up ppy_text. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - ppy_text[ppy_leng] = (yy_hold_char); \ - (yy_c_buf_p) = ppy_text + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - ppy_leng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the current line number. - * - */ -int ppy_get_lineno (void) -{ - - return ppy_lineno; -} - -/** Get the input stream. - * - */ -FILE *ppy_get_in (void) -{ - return ppy_in; -} - -/** Get the output stream. - * - */ -FILE *ppy_get_out (void) -{ - return ppy_out; -} - -/** Get the length of the current token. - * - */ -int ppy_get_leng (void) -{ - return ppy_leng; -} - -/** Get the current token. - * - */ - -char *ppy_get_text (void) -{ - return ppy_text; -} - -/** Set the current line number. - * @param line_number - * - */ -void ppy_set_lineno (int line_number ) -{ - - ppy_lineno = line_number; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param in_str A readable stream. - * - * @see ppy__switch_to_buffer - */ -void ppy_set_in (FILE * in_str ) -{ - ppy_in = in_str ; -} - -void ppy_set_out (FILE * out_str ) -{ - ppy_out = out_str ; -} - -int ppy_get_debug (void) -{ - return ppy__flex_debug; -} - -void ppy_set_debug (int bdebug ) -{ - ppy__flex_debug = bdebug ; -} - -static int yy_init_globals (void) -{ - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from ppy_lex_destroy(), so don't allocate here. - */ - - (yy_buffer_stack) = 0; - (yy_buffer_stack_top) = 0; - (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = (char *) 0; - (yy_init) = 0; - (yy_start) = 0; - - (yy_start_stack_ptr) = 0; - (yy_start_stack_depth) = 0; - (yy_start_stack) = NULL; - -/* Defined in main.c */ -#ifdef YY_STDINIT - ppy_in = stdin; - ppy_out = stdout; -#else - ppy_in = (FILE *) 0; - ppy_out = (FILE *) 0; -#endif - - /* For future reference: Set errno on error, since we are called by - * ppy_lex_init() - */ - return 0; -} - -/* ppy_lex_destroy is for both reentrant and non-reentrant scanners. */ -int ppy_lex_destroy (void) -{ - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - ppy__delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - ppy_pop_buffer_state(); - } - - /* Destroy the stack itself. */ - ppy_free((yy_buffer_stack) ); - (yy_buffer_stack) = NULL; - - /* Destroy the start condition stack. */ - ppy_free((yy_start_stack) ); - (yy_start_stack) = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * ppy_lex() is called, initialization will occur. */ - yy_init_globals( ); - - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) -{ - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s ) -{ - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *ppy_alloc (yy_size_t size ) -{ - return (void *) malloc( size ); -} - -void *ppy_realloc (void * ptr, yy_size_t size ) -{ - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); -} - -void ppy_free (void * ptr ) -{ - free( (char *) ptr ); /* see ppy_realloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 787 "ppl.l" - - -/* - ************************************************************************** - * Support functions - ************************************************************************** - */ - -#ifndef ppy_wrap -int ppy_wrap(void) -{ - return 1; -} -#endif - - -/* - *------------------------------------------------------------------------- - * Output newlines or set them as continuations - * - * Input: -1 - Don't count this one, but update local position (see pp_dqs) - * 0 - Line-continuation seen and cache output - * 1 - Newline seen and flush output - *------------------------------------------------------------------------- - */ -static void newline(int dowrite) -{ - pp_status.line_number++; - pp_status.char_number = 1; - - if(dowrite == -1) - return; - - ncontinuations++; - if(dowrite) - { - for(;ncontinuations; ncontinuations--) - put_buffer("\n", 1); - } -} - - -/* - *------------------------------------------------------------------------- - * Make a number out of an any-base and suffixed string - * - * Possible number extensions: - * - "" int - * - "L" long int - * - "LL" long long int - * - "U" unsigned int - * - "UL" unsigned long int - * - "ULL" unsigned long long int - * - "LU" unsigned long int - * - "LLU" unsigned long long int - * - "LUL" invalid - * - * FIXME: - * The sizes of resulting 'int' and 'long' are compiler specific. - * I depend on sizeof(int) > 2 here (although a relatively safe - * assumption). - * Long longs are not yet implemented because this is very compiler - * specific and I don't want to think too much about the problems. - * - *------------------------------------------------------------------------- - */ -static int make_number(int radix, YYSTYPE *val, const char *str, int len) -{ - int is_l = 0; - int is_ll = 0; - int is_u = 0; - char ext[4]; - long l; - - ext[3] = '\0'; - ext[2] = toupper(str[len-1]); - ext[1] = len > 1 ? toupper(str[len-2]) : ' '; - ext[0] = len > 2 ? toupper(str[len-3]) : ' '; - - if(!strcmp(ext, "LUL")) - { - ppy_error("Invalid constant suffix"); - return 0; - } - else if(!strcmp(ext, "LLU") || !strcmp(ext, "ULL")) - { - is_ll++; - is_u++; - } - else if(!strcmp(ext+1, "LU") || !strcmp(ext+1, "UL")) - { - is_l++; - is_u++; - } - else if(!strcmp(ext+1, "LL")) - { - is_ll++; - } - else if(!strcmp(ext+2, "L")) - { - is_l++; - } - else if(!strcmp(ext+2, "U")) - { - is_u++; - } - - if(is_ll) - { -/* Assume as in the declaration of wrc_ull_t and wrc_sll_t */ -#ifdef HAVE_LONG_LONG - if (is_u) - { - errno = 0; - val->ull = strtoull(str, NULL, radix); - if (val->ull == ULLONG_MAX && errno == ERANGE) - ppy_error("integer constant %s is too large\n", str); - return tULONGLONG; - } - else - { - errno = 0; - val->sll = strtoll(str, NULL, radix); - if ((val->sll == LLONG_MIN || val->sll == LLONG_MAX) && errno == ERANGE) - ppy_error("integer constant %s is too large\n", str); - return tSLONGLONG; - } -#else - pp_internal_error(__FILE__, __LINE__, "long long constants not supported on this platform"); -#endif - } - else if(is_u && is_l) - { - errno = 0; - val->ulong = strtoul(str, NULL, radix); - if (val->ulong == ULONG_MAX && errno == ERANGE) - ppy_error("integer constant %s is too large\n", str); - return tULONG; - } - else if(!is_u && is_l) - { - errno = 0; - val->slong = strtol(str, NULL, radix); - if ((val->slong == LONG_MIN || val->slong == LONG_MAX) && errno == ERANGE) - ppy_error("integer constant %s is too large\n", str); - return tSLONG; - } - else if(is_u && !is_l) - { - unsigned long ul; - errno = 0; - ul = strtoul(str, NULL, radix); - if ((ul == ULONG_MAX && errno == ERANGE) || (ul > UINT_MAX)) - ppy_error("integer constant %s is too large\n", str); - val->uint = (unsigned int)ul; - return tUINT; - } - - /* Else it must be an int... */ - errno = 0; - l = strtol(str, NULL, radix); - if (((l == LONG_MIN || l == LONG_MAX) && errno == ERANGE) || - (l > INT_MAX) || (l < INT_MIN)) - ppy_error("integer constant %s is too large\n", str); - val->sint = (int)l; - return tSINT; -} - - -/* - *------------------------------------------------------------------------- - * Macro and define expansion support - * - * FIXME: Variable macro arguments. - *------------------------------------------------------------------------- - */ -static void expand_special(pp_entry_t *ppp) -{ - static char *buf = NULL; - char *new_buf; - - assert(ppp->type == def_special); - - if(!strcmp(ppp->ident, "__LINE__")) - { - new_buf = pp_xrealloc(buf, 32); - if(!new_buf) - return; - buf = new_buf; - sprintf(buf, "%d", pp_status.line_number); - } - else if(!strcmp(ppp->ident, "__FILE__")) - { - new_buf = pp_xrealloc(buf, strlen(pp_status.input) + 3); - if(!new_buf) - return; - buf = new_buf; - sprintf(buf, "\"%s\"", pp_status.input); - } - else - pp_internal_error(__FILE__, __LINE__, "Special macro '%s' not found...\n", ppp->ident); - - if(pp_flex_debug) - fprintf(stderr, "expand_special(%d): %s:%d: '%s' -> '%s'\n", - macexpstackidx, - pp_status.input, - pp_status.line_number, - ppp->ident, - buf ? buf : ""); - - if(buf && buf[0]) - { - push_buffer(ppp, NULL, NULL, 0); - ppy__scan_string(buf); - } -} - -static void expand_define(pp_entry_t *ppp) -{ - assert(ppp->type == def_define); - - if(pp_flex_debug) - fprintf(stderr, "expand_define(%d): %s:%d: '%s' -> '%s'\n", - macexpstackidx, - pp_status.input, - pp_status.line_number, - ppp->ident, - ppp->subst.text); - if(ppp->subst.text && ppp->subst.text[0]) - { - push_buffer(ppp, NULL, NULL, 0); - ppy__scan_string(ppp->subst.text); - } -} - -static int curdef_idx = 0; -static int curdef_alloc = 0; -static char *curdef_text = NULL; - -static void add_text(const char *str, int len) -{ - int new_alloc; - char *new_text; - - if(len == 0) - return; - if(curdef_idx >= curdef_alloc || curdef_alloc - curdef_idx < len) - { - new_alloc = curdef_alloc + ((len + ALLOCBLOCKSIZE-1) & ~(ALLOCBLOCKSIZE-1)); - new_text = pp_xrealloc(curdef_text, new_alloc * sizeof(curdef_text[0])); - if(!new_text) - return; - curdef_text = new_text; - curdef_alloc = new_alloc; - if(curdef_alloc > 65536) - ppy_warning("Reallocating macro-expansion buffer larger than 64kB"); - } - memcpy(&curdef_text[curdef_idx], str, len); - curdef_idx += len; -} - -static mtext_t *add_expand_text(mtext_t *mtp, macexpstackentry_t *mep, int *nnl) -{ - char *cptr; - char *exp; - int tag; - int n; - - if(mtp == NULL) - return NULL; - - switch(mtp->type) - { - case exp_text: - if(pp_flex_debug) - fprintf(stderr, "add_expand_text: exp_text: '%s'\n", mtp->subst.text); - add_text(mtp->subst.text, strlen(mtp->subst.text)); - break; - - case exp_stringize: - if(pp_flex_debug) - fprintf(stderr, "add_expand_text: exp_stringize(%d): '%s'\n", - mtp->subst.argidx, - mep->args[mtp->subst.argidx]); - cptr = mep->args[mtp->subst.argidx]; - add_text("\"", 1); - while(*cptr) - { - if(*cptr == '"' || *cptr == '\\') - add_text("\\", 1); - add_text(cptr, 1); - cptr++; - } - add_text("\"", 1); - break; - - case exp_concat: - if(pp_flex_debug) - fprintf(stderr, "add_expand_text: exp_concat\n"); - /* Remove trailing whitespace from current expansion text */ - while(curdef_idx) - { - if(isspace(curdef_text[curdef_idx-1] & 0xff)) - curdef_idx--; - else - break; - } - /* tag current position and recursively expand the next part */ - tag = curdef_idx; - mtp = add_expand_text(mtp->next, mep, nnl); - - /* Now get rid of the leading space of the expansion */ - cptr = &curdef_text[tag]; - n = curdef_idx - tag; - while(n) - { - if(isspace(*cptr & 0xff)) - { - cptr++; - n--; - } - else - break; - } - if(cptr != &curdef_text[tag]) - { - memmove(&curdef_text[tag], cptr, n); - curdef_idx -= (curdef_idx - tag) - n; - } - break; - - case exp_subst: - if((mtp->next && mtp->next->type == exp_concat) || (mtp->prev && mtp->prev->type == exp_concat)) - exp = mep->args[mtp->subst.argidx]; - else - exp = mep->ppargs[mtp->subst.argidx]; - if(exp) - { - add_text(exp, strlen(exp)); - *nnl -= mep->nnls[mtp->subst.argidx]; - cptr = strchr(exp, '\n'); - while(cptr) - { - *cptr = ' '; - cptr = strchr(cptr+1, '\n'); - } - mep->nnls[mtp->subst.argidx] = 0; - } - if(pp_flex_debug) - fprintf(stderr, "add_expand_text: exp_subst(%d): '%s'\n", mtp->subst.argidx, exp); - break; - - default: - pp_internal_error(__FILE__, __LINE__, "Invalid expansion type (%d) in macro expansion\n", mtp->type); - } - return mtp; -} - -static void expand_macro(macexpstackentry_t *mep) -{ - mtext_t *mtp; - int n, k; - char *cptr; - int nnl = 0; - pp_entry_t *ppp = mep->ppp; - int nargs = mep->nargs; - - assert(ppp->type == def_macro); - assert(ppp->expanding == 0); - - if((ppp->nargs >= 0 && nargs != ppp->nargs) || (ppp->nargs < 0 && nargs < -ppp->nargs)) - { - ppy_error("Too %s macro arguments (%d)", nargs < abs(ppp->nargs) ? "few" : "many", nargs); - return; - } - - for(n = 0; n < nargs; n++) - nnl += mep->nnls[n]; - - if(pp_flex_debug) - fprintf(stderr, "expand_macro(%d): %s:%d: '%s'(%d,%d) -> ...\n", - macexpstackidx, - pp_status.input, - pp_status.line_number, - ppp->ident, - mep->nargs, - nnl); - - curdef_idx = 0; - - for(mtp = ppp->subst.mtext; mtp; mtp = mtp->next) - { - if(!(mtp = add_expand_text(mtp, mep, &nnl))) - break; - } - - for(n = 0; n < nnl; n++) - add_text("\n", 1); - - /* To make sure there is room and termination (see below) */ - add_text(" \0", 2); - - /* Strip trailing whitespace from expansion */ - for(k = curdef_idx, cptr = &curdef_text[curdef_idx-1]; k > 0; k--, cptr--) - { - if(!isspace(*cptr & 0xff)) - break; - } - - /* - * We must add *one* whitespace to make sure that there - * is a token-separation after the expansion. - */ - *(++cptr) = ' '; - *(++cptr) = '\0'; - k++; - - /* Strip leading whitespace from expansion */ - for(n = 0, cptr = curdef_text; n < k; n++, cptr++) - { - if(!isspace(*cptr & 0xff)) - break; - } - - if(k - n > 0) - { - if(pp_flex_debug) - fprintf(stderr, "expand_text: '%s'\n", curdef_text + n); - push_buffer(ppp, NULL, NULL, 0); - /*ppy__scan_bytes(curdef_text + n,k - n);*/ - ppy__scan_string(curdef_text + n); - } -} - -/* - *------------------------------------------------------------------------- - * String collection routines - *------------------------------------------------------------------------- - */ -static void new_string(void) -{ -#ifdef DEBUG - if(strbuf_idx) - ppy_warning("new_string: strbuf_idx != 0"); -#endif - strbuf_idx = 0; - str_startline = pp_status.line_number; -} - -static void add_string(const char *str, int len) -{ - int new_alloc; - char *new_buffer; - - if(len == 0) - return; - if(strbuf_idx >= strbuf_alloc || strbuf_alloc - strbuf_idx < len) - { - new_alloc = strbuf_alloc + ((len + ALLOCBLOCKSIZE-1) & ~(ALLOCBLOCKSIZE-1)); - new_buffer = pp_xrealloc(strbuffer, new_alloc * sizeof(strbuffer[0])); - if(!new_buffer) - return; - strbuffer = new_buffer; - strbuf_alloc = new_alloc; - if(strbuf_alloc > 65536) - ppy_warning("Reallocating string buffer larger than 64kB"); - } - memcpy(&strbuffer[strbuf_idx], str, len); - strbuf_idx += len; -} - -static char *get_string(void) -{ - char *str = pp_xmalloc(strbuf_idx + 1); - if(!str) - return NULL; - memcpy(str, strbuffer, strbuf_idx); - str[strbuf_idx] = '\0'; -#ifdef DEBUG - strbuf_idx = 0; -#endif - return str; -} - -static void put_string(void) -{ - put_buffer(strbuffer, strbuf_idx); -#ifdef DEBUG - strbuf_idx = 0; -#endif -} - -static int string_start(void) -{ - return str_startline; -} - - -/* - *------------------------------------------------------------------------- - * Buffer management - *------------------------------------------------------------------------- - */ -static void push_buffer(pp_entry_t *ppp, char *filename, char *incname, int pop) -{ - if(ppy_debug) - printf("push_buffer(%d): %p %p %p %d\n", bufferstackidx, ppp, filename, incname, pop); - if(bufferstackidx >= MAXBUFFERSTACK) - pp_internal_error(__FILE__, __LINE__, "Buffer stack overflow"); - - memset(&bufferstack[bufferstackidx], 0, sizeof(bufferstack[0])); - bufferstack[bufferstackidx].bufferstate = YY_CURRENT_BUFFER; - bufferstack[bufferstackidx].filehandle = pp_status.file; - bufferstack[bufferstackidx].define = ppp; - bufferstack[bufferstackidx].line_number = pp_status.line_number; - bufferstack[bufferstackidx].char_number = pp_status.char_number; - bufferstack[bufferstackidx].if_depth = pp_get_if_depth(); - bufferstack[bufferstackidx].should_pop = pop; - bufferstack[bufferstackidx].filename = pp_status.input; - bufferstack[bufferstackidx].ncontinuations = ncontinuations; - bufferstack[bufferstackidx].incl = pp_incl_state; - bufferstack[bufferstackidx].include_filename = incname; - - if(ppp) - ppp->expanding = 1; - else if(filename) - { - /* These will track the ppy_error to the correct file and line */ - pp_status.line_number = 1; - pp_status.char_number = 1; - pp_status.input = filename; - ncontinuations = 0; - } - else if(!pop) - pp_internal_error(__FILE__, __LINE__, "Pushing buffer without knowing where to go to"); - bufferstackidx++; -} - -static bufferstackentry_t *pop_buffer(void) -{ - if(bufferstackidx < 0) - pp_internal_error(__FILE__, __LINE__, "Bufferstack underflow?"); - - if(bufferstackidx == 0) - return NULL; - - bufferstackidx--; - - if(bufferstack[bufferstackidx].define) - bufferstack[bufferstackidx].define->expanding = 0; - else - { - if(!bufferstack[bufferstackidx].should_pop) - { - wpp_callbacks->close(pp_status.file); - pp_writestring("# %d \"%s\" 2\n", bufferstack[bufferstackidx].line_number, bufferstack[bufferstackidx].filename); - - /* We have EOF, check the include logic */ - if(pp_incl_state.state == 2 && !pp_incl_state.seen_junk && pp_incl_state.ppp) - { - pp_entry_t *ppp = pplookup(pp_incl_state.ppp); - if(ppp) - { - includelogicentry_t *iep = pp_xmalloc(sizeof(includelogicentry_t)); - if(!iep) - return NULL; - - iep->ppp = ppp; - ppp->iep = iep; - iep->filename = bufferstack[bufferstackidx].include_filename; - iep->prev = NULL; - iep->next = pp_includelogiclist; - if(iep->next) - iep->next->prev = iep; - pp_includelogiclist = iep; - if(pp_status.debug) - fprintf(stderr, "pop_buffer: %s:%d: includelogic added, include_ppp='%s', file='%s'\n", bufferstack[bufferstackidx].filename, bufferstack[bufferstackidx].line_number, pp_incl_state.ppp, iep->filename); - } - else - free(bufferstack[bufferstackidx].include_filename); - } - free(pp_incl_state.ppp); - pp_incl_state = bufferstack[bufferstackidx].incl; - - } - pp_status.line_number = bufferstack[bufferstackidx].line_number; - pp_status.char_number = bufferstack[bufferstackidx].char_number; - pp_status.input = bufferstack[bufferstackidx].filename; - ncontinuations = bufferstack[bufferstackidx].ncontinuations; - } - - if(ppy_debug) - printf("pop_buffer(%d): %p %p (%d, %d, %d) %p %d\n", - bufferstackidx, - bufferstack[bufferstackidx].bufferstate, - bufferstack[bufferstackidx].define, - bufferstack[bufferstackidx].line_number, - bufferstack[bufferstackidx].char_number, - bufferstack[bufferstackidx].if_depth, - bufferstack[bufferstackidx].filename, - bufferstack[bufferstackidx].should_pop); - - pp_status.file = bufferstack[bufferstackidx].filehandle; - ppy__switch_to_buffer(bufferstack[bufferstackidx].bufferstate); - - if(bufferstack[bufferstackidx].should_pop) - { - if(yy_current_state() == pp_macexp) - macro_add_expansion(); - else - pp_internal_error(__FILE__, __LINE__, "Pop buffer and state without macro expansion state"); - yy_pop_state(); - } - - return &bufferstack[bufferstackidx]; -} - - -/* - *------------------------------------------------------------------------- - * Macro nestng support - *------------------------------------------------------------------------- - */ -static void push_macro(pp_entry_t *ppp) -{ - if(macexpstackidx >= MAXMACEXPSTACK) - { - ppy_error("Too many nested macros"); - return; - } - - macexpstack[macexpstackidx] = pp_xmalloc(sizeof(macexpstack[0][0])); - if(!macexpstack[macexpstackidx]) - return; - memset( macexpstack[macexpstackidx], 0, sizeof(macexpstack[0][0])); - macexpstack[macexpstackidx]->ppp = ppp; - macexpstackidx++; -} - -static macexpstackentry_t *top_macro(void) -{ - return macexpstackidx > 0 ? macexpstack[macexpstackidx-1] : NULL; -} - -static macexpstackentry_t *pop_macro(void) -{ - if(macexpstackidx <= 0) - pp_internal_error(__FILE__, __LINE__, "Macro expansion stack underflow\n"); - return macexpstack[--macexpstackidx]; -} - -static void free_macro(macexpstackentry_t *mep) -{ - int i; - - for(i = 0; i < mep->nargs; i++) - free(mep->args[i]); - free(mep->args); - free(mep->nnls); - free(mep->curarg); - free(mep); -} - -static void add_text_to_macro(const char *text, int len) -{ - macexpstackentry_t *mep = top_macro(); - - assert(mep->ppp->expanding == 0); - - if(mep->curargalloc - mep->curargsize <= len+1) /* +1 for '\0' */ - { - char *new_curarg; - int new_alloc = mep->curargalloc + ((ALLOCBLOCKSIZE > len+1) ? ALLOCBLOCKSIZE : len+1); - new_curarg = pp_xrealloc(mep->curarg, new_alloc * sizeof(mep->curarg[0])); - if(!new_curarg) - return; - mep->curarg = new_curarg; - mep->curargalloc = new_alloc; - } - memcpy(mep->curarg + mep->curargsize, text, len); - mep->curargsize += len; - mep->curarg[mep->curargsize] = '\0'; -} - -static void macro_add_arg(int last) -{ - int nnl = 0; - char *cptr; - char **new_args, **new_ppargs; - int *new_nnls; - macexpstackentry_t *mep = top_macro(); - - assert(mep->ppp->expanding == 0); - - new_args = pp_xrealloc(mep->args, (mep->nargs+1) * sizeof(mep->args[0])); - if(!new_args) - return; - mep->args = new_args; - - new_ppargs = pp_xrealloc(mep->ppargs, (mep->nargs+1) * sizeof(mep->ppargs[0])); - if(!new_ppargs) - return; - mep->ppargs = new_ppargs; - - new_nnls = pp_xrealloc(mep->nnls, (mep->nargs+1) * sizeof(mep->nnls[0])); - if(!new_nnls) - return; - mep->nnls = new_nnls; - - mep->args[mep->nargs] = pp_xstrdup(mep->curarg ? mep->curarg : ""); - if(!mep->args[mep->nargs]) - return; - cptr = mep->args[mep->nargs]-1; - while((cptr = strchr(cptr+1, '\n'))) - { - nnl++; - } - mep->nnls[mep->nargs] = nnl; - mep->nargs++; - free(mep->curarg); - mep->curargalloc = mep->curargsize = 0; - mep->curarg = NULL; - - if(pp_flex_debug) - fprintf(stderr, "macro_add_arg: %s:%d: %d -> '%s'\n", - pp_status.input, - pp_status.line_number, - mep->nargs-1, - mep->args[mep->nargs-1]); - - /* Each macro argument must be expanded to cope with stingize */ - if(last || mep->args[mep->nargs-1][0]) - { - yy_push_state(pp_macexp); - push_buffer(NULL, NULL, NULL, last ? 2 : 1); - ppy__scan_string(mep->args[mep->nargs-1]); - /*mep->bufferstackidx = bufferstackidx; But not nested! */ - } -} - -static void macro_add_expansion(void) -{ - macexpstackentry_t *mep = top_macro(); - - assert(mep->ppp->expanding == 0); - - mep->ppargs[mep->nargs-1] = pp_xstrdup(mep->curarg ? mep->curarg : ""); - free(mep->curarg); - mep->curargalloc = mep->curargsize = 0; - mep->curarg = NULL; - - if(pp_flex_debug) - fprintf(stderr, "macro_add_expansion: %s:%d: %d -> '%s'\n", - pp_status.input, - pp_status.line_number, - mep->nargs-1, - mep->ppargs[mep->nargs-1] ? mep->ppargs[mep->nargs-1] : ""); -} - - -/* - *------------------------------------------------------------------------- - * Output management - *------------------------------------------------------------------------- - */ -static void put_buffer(const char *s, int len) -{ - if(top_macro()) - add_text_to_macro(s, len); - else - wpp_callbacks->write(s, len); -} - - -/* - *------------------------------------------------------------------------- - * Include management - *------------------------------------------------------------------------- - */ -void pp_do_include(char *fname, int type) -{ - char *newpath; - int n; - includelogicentry_t *iep; - void *fp; - - if(!fname) - return; - - for(iep = pp_includelogiclist; iep; iep = iep->next) - { - if(!strcmp(iep->filename, fname)) - { - /* - * We are done. The file was included before. - * If the define was deleted, then this entry would have - * been deleted too. - */ - return; - } - } - - n = strlen(fname); - - if(n <= 2) - { - ppy_error("Empty include filename"); - return; - } - - /* Undo the effect of the quotation */ - fname[n-1] = '\0'; - - if((fp = pp_open_include(fname+1, type ? pp_status.input : NULL, &newpath)) == NULL) - { - ppy_error("Unable to open include file %s", fname+1); - return; - } - - fname[n-1] = *fname; /* Redo the quotes */ - push_buffer(NULL, newpath, fname, 0); - pp_incl_state.seen_junk = 0; - pp_incl_state.state = 0; - pp_incl_state.ppp = NULL; - - if(pp_status.debug) - fprintf(stderr, "pp_do_include: %s:%d: include_state=%d, include_ppp='%s', include_ifdepth=%d\n", - pp_status.input, pp_status.line_number, pp_incl_state.state, pp_incl_state.ppp, pp_incl_state.ifdepth); - pp_status.file = fp; - ppy__switch_to_buffer(ppy__create_buffer(NULL, YY_BUF_SIZE)); - - pp_writestring("# 1 \"%s\" 1%s\n", newpath, type ? "" : " 3"); -} - -/* - *------------------------------------------------------------------------- - * Push/pop preprocessor ignore state when processing conditionals - * which are false. - *------------------------------------------------------------------------- - */ -void pp_push_ignore_state(void) -{ - yy_push_state(pp_ignore); -} - -void pp_pop_ignore_state(void) -{ - yy_pop_state(); -} - diff --git a/reactos/tools/wpp/ppl.l b/reactos/tools/wpp/ppl.l deleted file mode 100644 index 98f3e1a3b2d..00000000000 --- a/reactos/tools/wpp/ppl.l +++ /dev/null @@ -1,1634 +0,0 @@ -/* -*-C-*- - * Wrc preprocessor lexical analysis - * - * Copyright 1999-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 - * - * History: - * 24-Apr-2000 BS - Started from scratch to restructure everything - * and reintegrate the source into the wine-tree. - * 04-Jan-2000 BS - Added comments about the lexicographical - * grammar to give some insight in the complexity. - * 28-Dec-1999 BS - Eliminated backing-up of the flexer by running - * `flex -b' on the source. This results in some - * weirdo extra rules, but a much faster scanner. - * 23-Dec-1999 BS - Started this file - * - *------------------------------------------------------------------------- - * The preprocessor's lexographical grammar (approximately): - * - * pp := {ws} # {ws} if {ws} {expr} {ws} \n - * | {ws} # {ws} ifdef {ws} {id} {ws} \n - * | {ws} # {ws} ifndef {ws} {id} {ws} \n - * | {ws} # {ws} elif {ws} {expr} {ws} \n - * | {ws} # {ws} else {ws} \n - * | {ws} # {ws} endif {ws} \n - * | {ws} # {ws} include {ws} < {anytext} > \n - * | {ws} # {ws} include {ws} " {anytext} " \n - * | {ws} # {ws} define {ws} {anytext} \n - * | {ws} # {ws} define( {arglist} ) {ws} {expansion} \n - * | {ws} # {ws} pragma {ws} {anytext} \n - * | {ws} # {ws} ident {ws} {anytext} \n - * | {ws} # {ws} error {ws} {anytext} \n - * | {ws} # {ws} warning {ws} {anytext} \n - * | {ws} # {ws} line {ws} " {anytext} " {number} \n - * | {ws} # {ws} {number} " {anytext} " {number} [ {number} [{number}] ] \n - * | {ws} # {ws} \n - * - * ws := [ \t\r\f\v]* - * - * expr := {expr} [+-*%^/|&] {expr} - * | {expr} {logor|logand} {expr} - * | [!~+-] {expr} - * | {expr} ? {expr} : {expr} - * - * logor := || - * - * logand := && - * - * id := [a-zA-Z_][a-zA-Z0-9_]* - * - * anytext := [^\n]* (see note) - * - * arglist := - * | {id} - * | {arglist} , {id} - * | {arglist} , {id} ... - * - * expansion := {id} - * | # {id} - * | {anytext} - * | {anytext} ## {anytext} - * - * number := [0-9]+ - * - * Note: "anytext" is not always "[^\n]*". This is because the - * trailing context must be considered as well. - * - * The only certain assumption for the preprocessor to make is that - * directives start at the beginning of the line, followed by a '#' - * and end with a newline. - * Any directive may be suffixed with a line-continuation. Also - * classical comment / *...* / (note: no comments within comments, - * therefore spaces) is considered to be a line-continuation - * (according to gcc and egcs AFAIK, ANSI is a bit vague). - * Comments have not been added to the above grammar for simplicity - * reasons. However, it is allowed to enter comment anywhere within - * the directives as long as they do not interfere with the context. - * All comments are considered to be deletable whitespace (both - * classical form "/ *...* /" and C++ form "//...\n"). - * - * All recursive scans, except for macro-expansion, are done by the - * parser, whereas the simple state transitions of non-recursive - * directives are done in the scanner. This results in the many - * exclusive start-conditions of the scanner. - * - * Macro expansions are slightly more difficult because they have to - * prescan the arguments. Parameter substitution is literal if the - * substitution is # or ## (either side). This enables new identifiers - * to be created (see 'info cpp' node Macro|Pitfalls|Prescan for more - * information). - * - * FIXME: Variable macro parameters is recognized, but not yet - * expanded. I have to reread the ANSI standard on the subject (yes, - * ANSI defines it). - * - * The following special defines are supported: - * __FILE__ -> "thissource.c" - * __LINE__ -> 123 - * __DATE__ -> "May 1 2000" - * __TIME__ -> "23:59:59" - * These macros expand, as expected, into their ANSI defined values. - * - * The same include prevention is implemented as gcc and egcs does. - * This results in faster processing because we do not read the text - * at all. Some wine-sources attempt to include the same file 4 or 5 - * times. This strategy also saves a lot blank output-lines, which in - * its turn improves the real resource scanner/parser. - * - */ - -%top{ -#include "config.h" -#include "wine/port.h" -} - -/* - * Special flex options and exclusive scanner start-conditions - */ -%option stack -%option 8bit never-interactive -%option noinput nounput -%option prefix="ppy_" - -%x pp_pp -%x pp_eol -%x pp_inc -%x pp_dqs -%x pp_sqs -%x pp_iqs -%x pp_comment -%x pp_def -%x pp_define -%x pp_macro -%x pp_mbody -%x pp_macign -%x pp_macscan -%x pp_macexp -%x pp_if -%x pp_ifd -%x pp_endif -%x pp_line -%x pp_defined -%x pp_ignore -%x RCINCL - -ws [ \v\f\t\r] -cident [a-zA-Z_][0-9a-zA-Z_]* -ul [uUlL]|[uUlL][lL]|[lL][uU]|[lL][lL][uU]|[uU][lL][lL]|[lL][uU][lL] - -%{ -#include -#include -#include -#include -#include -#include -#include - -#ifndef LLONG_MAX -# define LLONG_MAX ((long long)0x7fffffff << 32 | 0xffffffff) -# define LLONG_MIN (-LLONG_MAX - 1) -#endif -#ifndef ULLONG_MAX -# define ULLONG_MAX ((long long)0xffffffff << 32 | 0xffffffff) -#endif - -#ifndef HAVE_UNISTD_H -#define YY_NO_UNISTD_H -#endif - -#include "wine/wpp.h" -#include "wpp_private.h" -#include "ppy.tab.h" - -/* - * Make sure that we are running an appropriate version of flex. - */ -#if !defined(YY_FLEX_MAJOR_VERSION) || (1000 * YY_FLEX_MAJOR_VERSION + YY_FLEX_MINOR_VERSION < 2005) -#error Must use flex version 2.5.1 or higher (yy_scan_* routines are required). -#endif - -#define YY_READ_BUF_SIZE 65536 /* So we read most of a file at once */ - -#define yy_current_state() YY_START -#define yy_pp_state(x) yy_pop_state(); yy_push_state(x) - -/* - * Always update the current character position within a line - */ -#define YY_USER_ACTION pp_status.char_number+=ppy_leng; - -/* - * Buffer management for includes and expansions - */ -#define MAXBUFFERSTACK 128 /* Nesting more than 128 includes or macro expansion textss is insane */ - -typedef struct bufferstackentry { - YY_BUFFER_STATE bufferstate; /* Buffer to switch back to */ - void *filehandle; /* Handle to be used with wpp_callbacks->read */ - pp_entry_t *define; /* Points to expanding define or NULL if handling includes */ - int line_number; /* Line that we were handling */ - int char_number; /* The current position on that line */ - const char *filename; /* Filename that we were handling */ - int if_depth; /* How many #if:s deep to check matching #endif:s */ - int ncontinuations; /* Remember the continuation state */ - int should_pop; /* Set if we must pop the start-state on EOF */ - /* Include management */ - include_state_t incl; - char *include_filename; -} bufferstackentry_t; - -#define ALLOCBLOCKSIZE (1 << 10) /* Allocate these chunks at a time for string-buffers */ - -/* - * Macro expansion nesting - * We need the stack to handle expansions while scanning - * a macro's arguments. The TOS must always be the macro - * that receives the current expansion from the scanner. - */ -#define MAXMACEXPSTACK 128 /* Nesting more than 128 macro expansions is insane */ - -typedef struct macexpstackentry { - pp_entry_t *ppp; /* This macro we are scanning */ - char **args; /* With these arguments */ - char **ppargs; /* Resulting in these preprocessed arguments */ - int *nnls; /* Number of newlines per argument */ - int nargs; /* And this many arguments scanned */ - int parentheses; /* Nesting level of () */ - int curargsize; /* Current scanning argument's size */ - int curargalloc; /* Current scanning argument's block allocated */ - char *curarg; /* Current scanning argument's content */ -} macexpstackentry_t; - -#define MACROPARENTHESES() (top_macro()->parentheses) - -/* - * Prototypes - */ -static void newline(int); -static int make_number(int radix, YYSTYPE *val, const char *str, int len); -static void put_buffer(const char *s, int len); -/* Buffer management */ -static void push_buffer(pp_entry_t *ppp, char *filename, char *incname, int pop); -static bufferstackentry_t *pop_buffer(void); -/* String functions */ -static void new_string(void); -static void add_string(const char *str, int len); -static char *get_string(void); -static void put_string(void); -static int string_start(void); -/* Macro functions */ -static void push_macro(pp_entry_t *ppp); -static macexpstackentry_t *top_macro(void); -static macexpstackentry_t *pop_macro(void); -static void free_macro(macexpstackentry_t *mep); -static void add_text_to_macro(const char *text, int len); -static void macro_add_arg(int last); -static void macro_add_expansion(void); -/* Expansion */ -static void expand_special(pp_entry_t *ppp); -static void expand_define(pp_entry_t *ppp); -static void expand_macro(macexpstackentry_t *mep); - -/* - * Local variables - */ -static int ncontinuations; - -static int strbuf_idx = 0; -static int strbuf_alloc = 0; -static char *strbuffer = NULL; -static int str_startline; - -static macexpstackentry_t *macexpstack[MAXMACEXPSTACK]; -static int macexpstackidx = 0; - -static bufferstackentry_t bufferstack[MAXBUFFERSTACK]; -static int bufferstackidx = 0; - -/* - * Global variables - */ -include_state_t pp_incl_state = -{ - -1, /* state */ - NULL, /* ppp */ - 0, /* ifdepth */ - 0 /* seen_junk */ -}; - -includelogicentry_t *pp_includelogiclist = NULL; - -#define YY_INPUT(buf,result,max_size) \ - { \ - result = wpp_callbacks->read(pp_status.file, buf, max_size); \ - } - -#define BUFFERINITIALCAPACITY 256 - -void pp_writestring(const char *format, ...) -{ - va_list valist; - int len; - static char *buffer; - static int buffercapacity; - char *new_buffer; - - if(buffercapacity == 0) - { - buffer = pp_xmalloc(BUFFERINITIALCAPACITY); - if(buffer == NULL) - return; - buffercapacity = BUFFERINITIALCAPACITY; - } - - va_start(valist, format); - len = vsnprintf(buffer, buffercapacity, - format, valist); - /* If the string is longer than buffersize, vsnprintf returns - * the string length with glibc >= 2.1, -1 with glibc < 2.1 */ - while(len > buffercapacity || len < 0) - { - do - { - buffercapacity *= 2; - } while(len > buffercapacity); - - new_buffer = pp_xrealloc(buffer, buffercapacity); - if(new_buffer == NULL) - { - va_end(valist); - return; - } - buffer = new_buffer; - len = vsnprintf(buffer, buffercapacity, - format, valist); - } - va_end(valist); - - wpp_callbacks->write(buffer, len); -} - -%} - -/* - ************************************************************************** - * The scanner starts here - ************************************************************************** - */ - -%% - /* - * Catch line-continuations. - * Note: Gcc keeps the line-continuations in, for example, strings - * intact. However, I prefer to remove them all so that the next - * scanner will not need to reduce the continuation state. - * - * <*>\\\n newline(0); - */ - - /* - * Detect the leading # of a preprocessor directive. - */ -^{ws}*# pp_incl_state.seen_junk++; yy_push_state(pp_pp); - - /* - * Scan for the preprocessor directives - */ -{ws}*include{ws}* if(yy_top_state() != pp_ignore) {yy_pp_state(pp_inc); return tINCLUDE;} else {yy_pp_state(pp_eol);} -{ws}*define{ws}* yy_pp_state(yy_current_state() != pp_ignore ? pp_def : pp_eol); -{ws}*error{ws}* yy_pp_state(pp_eol); if(yy_top_state() != pp_ignore) return tERROR; -{ws}*warning{ws}* yy_pp_state(pp_eol); if(yy_top_state() != pp_ignore) return tWARNING; -{ws}*pragma{ws}* yy_pp_state(pp_eol); if(yy_top_state() != pp_ignore) return tPRAGMA; -{ws}*ident{ws}* yy_pp_state(pp_eol); if(yy_top_state() != pp_ignore) return tPPIDENT; -{ws}*undef{ws}* if(yy_top_state() != pp_ignore) {yy_pp_state(pp_ifd); return tUNDEF;} else {yy_pp_state(pp_eol);} -{ws}*ifdef{ws}* yy_pp_state(pp_ifd); return tIFDEF; -{ws}*ifndef{ws}* pp_incl_state.seen_junk--; yy_pp_state(pp_ifd); return tIFNDEF; -{ws}*if{ws}* yy_pp_state(pp_if); return tIF; -{ws}*elif{ws}* yy_pp_state(pp_if); return tELIF; -{ws}*else{ws}* yy_pp_state(pp_endif); return tELSE; -{ws}*endif{ws}* yy_pp_state(pp_endif); return tENDIF; -{ws}*line{ws}* if(yy_top_state() != pp_ignore) {yy_pp_state(pp_line); return tLINE;} else {yy_pp_state(pp_eol);} -{ws}+ if(yy_top_state() != pp_ignore) {yy_pp_state(pp_line); return tGCCLINE;} else {yy_pp_state(pp_eol);} -{ws}*[a-z]+ ppy_error("Invalid preprocessor token '%s'", ppy_text); -\r?\n newline(1); yy_pop_state(); return tNL; /* This could be the null-token */ -\\\r?\n newline(0); -\\\r? ppy_error("Preprocessor junk '%s'", ppy_text); -. return *ppy_text; - - /* - * Handle #include and #line - */ -[0-9]+ return make_number(10, &ppy_lval, ppy_text, ppy_leng); -\< new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_iqs); -\" new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_dqs); -{ws}+ ; -\n newline(1); yy_pop_state(); return tNL; -\\\r?\n newline(0); -(\\\r?)|(.) ppy_error(yy_current_state() == pp_inc ? "Trailing junk in #include" : "Trailing junk in #line"); - - /* - * Ignore all input when a false clause is parsed - */ -[^#/\\\n]+ ; -\n newline(1); -\\\r?\n newline(0); -(\\\r?)|(.) ; - - /* - * Handle #if and #elif. - * These require conditionals to be evaluated, but we do not - * want to jam the scanner normally when we see these tokens. - * Note: tIDENT is handled below. - */ - -0[0-7]*{ul}? return make_number(8, &ppy_lval, ppy_text, ppy_leng); -0[0-7]*[8-9]+{ul}? ppy_error("Invalid octal digit"); -[1-9][0-9]*{ul}? return make_number(10, &ppy_lval, ppy_text, ppy_leng); -0[xX][0-9a-fA-F]+{ul}? return make_number(16, &ppy_lval, ppy_text, ppy_leng); -0[xX] ppy_error("Invalid hex number"); -defined yy_push_state(pp_defined); return tDEFINED; -"<<" return tLSHIFT; -">>" return tRSHIFT; -"&&" return tLOGAND; -"||" return tLOGOR; -"==" return tEQ; -"!=" return tNE; -"<=" return tLTE; -">=" return tGTE; -\n newline(1); yy_pop_state(); return tNL; -\\\r?\n newline(0); -\\\r? ppy_error("Junk in conditional expression"); -{ws}+ ; -\' new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_sqs); -\" ppy_error("String constants not allowed in conditionals"); -. return *ppy_text; - - /* - * Handle #ifdef, #ifndef and #undef - * to get only an untranslated/unexpanded identifier - */ -{cident} ppy_lval.cptr = pp_xstrdup(ppy_text); return tIDENT; -{ws}+ ; -\n newline(1); yy_pop_state(); return tNL; -\\\r?\n newline(0); -(\\\r?)|(.) ppy_error("Identifier expected"); - - /* - * Handle #else and #endif. - */ -{ws}+ ; -\n newline(1); yy_pop_state(); return tNL; -\\\r?\n newline(0); -. ppy_error("Garbage after #else or #endif."); - - /* - * Handle the special 'defined' keyword. - * This is necessary to get the identifier prior to any - * substitutions. - */ -{cident} yy_pop_state(); ppy_lval.cptr = pp_xstrdup(ppy_text); return tIDENT; -{ws}+ ; -(\()|(\)) return *ppy_text; -\\\r?\n newline(0); -(\\.)|(\n)|(.) ppy_error("Identifier expected"); - - /* - * Handle #error, #warning, #pragma and #ident. - * Pass everything literally to the parser, which - * will act appropriately. - * Comments are stripped from the literal text. - */ -[^/\\\n]+ if(yy_top_state() != pp_ignore) { ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; } -\/[^/\\\n*]* if(yy_top_state() != pp_ignore) { ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; } -(\\\r?)|(\/[^/*]) if(yy_top_state() != pp_ignore) { ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; } -\n newline(1); yy_pop_state(); if(yy_current_state() != pp_ignore) { return tNL; } -\\\r?\n newline(0); - - /* - * Handle left side of #define - */ -{cident}\( ppy_lval.cptr = pp_xstrdup(ppy_text); if(ppy_lval.cptr) ppy_lval.cptr[ppy_leng-1] = '\0'; yy_pp_state(pp_macro); return tMACRO; -{cident} ppy_lval.cptr = pp_xstrdup(ppy_text); yy_pp_state(pp_define); return tDEFINE; -{ws}+ ; -\\\r?\n newline(0); -(\\\r?)|(\n)|(.) perror("Identifier expected"); - - /* - * Scan the substitution of a define - */ -[^'"/\\\n]+ ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; -(\\\r?)|(\/[^/*]) ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; -\\\r?\n{ws}+ newline(0); ppy_lval.cptr = pp_xstrdup(" "); return tLITERAL; -\\\r?\n newline(0); -\n newline(1); yy_pop_state(); return tNL; -\' new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_sqs); -\" new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_dqs); - - /* - * Scan the definition macro arguments - */ -\){ws}* yy_pp_state(pp_mbody); return tMACROEND; -{ws}+ ; -{cident} ppy_lval.cptr = pp_xstrdup(ppy_text); return tIDENT; -, return ','; -"..." return tELIPSIS; -(\\\r?)|(\n)|(.)|(\.\.?) ppy_error("Argument identifier expected"); -\\\r?\n newline(0); - - /* - * Scan the substitution of a macro - */ -[^a-zA-Z0-9'"#/\\\n]+ ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; -{cident} ppy_lval.cptr = pp_xstrdup(ppy_text); return tIDENT; -\#\# return tCONCAT; -\# return tSTRINGIZE; -[0-9][a-zA-Z0-9]*[^a-zA-Z0-9'"#/\\\n]* ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; -(\\\r?)|(\/[^/*'"#\\\n]*) ppy_lval.cptr = pp_xstrdup(ppy_text); return tLITERAL; -\\\r?\n{ws}+ newline(0); ppy_lval.cptr = pp_xstrdup(" "); return tLITERAL; -\\\r?\n newline(0); -\n newline(1); yy_pop_state(); return tNL; -\' new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_sqs); -\" new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_dqs); - - /* - * Macro expansion text scanning. - * This state is active just after the identifier is scanned - * that triggers an expansion. We *must* delete the leading - * whitespace before we can start scanning for arguments. - * - * If we do not see a '(' as next trailing token, then we have - * a false alarm. We just continue with a nose-bleed... - */ -{ws}*/\( yy_pp_state(pp_macscan); -{ws}*\n { - if(yy_top_state() != pp_macscan) - newline(0); - } -{ws}*\\\r?\n newline(0); -{ws}+|{ws}*\\\r?|. { - macexpstackentry_t *mac = pop_macro(); - yy_pop_state(); - put_buffer(mac->ppp->ident, strlen(mac->ppp->ident)); - put_buffer(ppy_text, ppy_leng); - free_macro(mac); - } - - /* - * Macro expansion argument text scanning. - * This state is active when a macro's arguments are being read for expansion. - */ -\( { - if(++MACROPARENTHESES() > 1) - add_text_to_macro(ppy_text, ppy_leng); - } -\) { - if(--MACROPARENTHESES() == 0) - { - yy_pop_state(); - macro_add_arg(1); - } - else - add_text_to_macro(ppy_text, ppy_leng); - } -, { - if(MACROPARENTHESES() > 1) - add_text_to_macro(ppy_text, ppy_leng); - else - macro_add_arg(0); - } -\" new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_dqs); -\' new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_sqs); -"/*" yy_push_state(pp_comment); add_text_to_macro(" ", 1); -\n pp_status.line_number++; pp_status.char_number = 1; add_text_to_macro(ppy_text, ppy_leng); -([^/(),\\\n"']+)|(\/[^/*(),\\\n'"]*)|(\\\r?)|(.) add_text_to_macro(ppy_text, ppy_leng); -\\\r?\n newline(0); - - /* - * Comment handling (almost all start-conditions) - */ -"/*" yy_push_state(pp_comment); -[^*\n]*|"*"+[^*/\n]* ; -\n newline(0); -"*"+"/" yy_pop_state(); - - /* - * Remove C++ style comment (almost all start-conditions) - */ -"//"[^\n]* { - if(ppy_text[ppy_leng-1] == '\\') - ppy_warning("C++ style comment ends with an escaped newline (escape ignored)"); - } - - /* - * Single, double and <> quoted constants - */ -\" pp_incl_state.seen_junk++; new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_dqs); -\' pp_incl_state.seen_junk++; new_string(); add_string(ppy_text, ppy_leng); yy_push_state(pp_sqs); -[^"\\\n]+ add_string(ppy_text, ppy_leng); -\" { - add_string(ppy_text, ppy_leng); - yy_pop_state(); - switch(yy_current_state()) - { - case pp_pp: - case pp_define: - case pp_mbody: - case pp_inc: - case RCINCL: - if (yy_current_state()==RCINCL) yy_pop_state(); - ppy_lval.cptr = get_string(); - return tDQSTRING; - case pp_line: - ppy_lval.cptr = get_string(); - return tDQSTRING; - default: - put_string(); - } - } -[^'\\\n]+ add_string(ppy_text, ppy_leng); -\' { - add_string(ppy_text, ppy_leng); - yy_pop_state(); - switch(yy_current_state()) - { - case pp_if: - case pp_define: - case pp_mbody: - ppy_lval.cptr = get_string(); - return tSQSTRING; - default: - put_string(); - } - } -[^\>\\\n]+ add_string(ppy_text, ppy_leng); -\> { - add_string(ppy_text, ppy_leng); - yy_pop_state(); - ppy_lval.cptr = get_string(); - return tIQSTRING; - } -\\\r?\n { - /* - * This is tricky; we need to remove the line-continuation - * from preprocessor strings, but OTOH retain them in all - * other strings. This is because the resource grammar is - * even more braindead than initially analysed and line- - * continuations in strings introduce, sigh, newlines in - * the output. There goes the concept of non-breaking, non- - * spacing whitespace. - */ - switch(yy_top_state()) - { - case pp_pp: - case pp_define: - case pp_mbody: - case pp_inc: - case pp_line: - newline(0); - break; - default: - add_string(ppy_text, ppy_leng); - newline(-1); - } - } -\\. add_string(ppy_text, ppy_leng); -\n { - newline(1); - add_string(ppy_text, ppy_leng); - ppy_warning("Newline in string constant encountered (started line %d)", string_start()); - } - - /* - * Identifier scanning - */ -{cident} { - pp_entry_t *ppp; - pp_incl_state.seen_junk++; - if(!(ppp = pplookup(ppy_text))) - { - if(yy_current_state() == pp_inc) - ppy_error("Expected include filename"); - - else if(yy_current_state() == pp_if) - { - ppy_lval.cptr = pp_xstrdup(ppy_text); - return tIDENT; - } - else { - if((yy_current_state()==INITIAL) && (strcasecmp(ppy_text,"RCINCLUDE")==0)){ - yy_push_state(RCINCL); - return tRCINCLUDE; - } - else put_buffer(ppy_text, ppy_leng); - } - } - else if(!ppp->expanding) - { - switch(ppp->type) - { - case def_special: - expand_special(ppp); - break; - case def_define: - expand_define(ppp); - break; - case def_macro: - yy_push_state(pp_macign); - push_macro(ppp); - break; - default: - pp_internal_error(__FILE__, __LINE__, "Invalid define type %d\n", ppp->type); - } - } - else put_buffer(ppy_text, ppy_leng); - } - - /* - * Everything else that needs to be passed and - * newline and continuation handling - */ -[^a-zA-Z_#'"/\\\n \r\t\f\v]+|(\/|\\)[^a-zA-Z_/*'"\\\n \r\t\v\f]* pp_incl_state.seen_junk++; put_buffer(ppy_text, ppy_leng); -{ws}+ put_buffer(ppy_text, ppy_leng); -\n newline(1); -\\\r?\n newline(0); -\\\r? pp_incl_state.seen_junk++; put_buffer(ppy_text, ppy_leng); - - /* - * Special catcher for macro argmument expansion to prevent - * newlines to propagate to the output or admin. - */ -(\n)|(.)|(\\\r?(\n|.)) put_buffer(ppy_text, ppy_leng); - -[A-Za-z0-9_\.\\/]+ { - ppy_lval.cptr=pp_xstrdup(ppy_text); - yy_pop_state(); - return tRCINCLUDEPATH; - } - -{ws}+ ; - -\" { - new_string(); add_string(ppy_text,ppy_leng);yy_push_state(pp_dqs); - } - - /* - * This is a 'catch-all' rule to discover errors in the scanner - * in an orderly manner. - */ -<*>. pp_incl_state.seen_junk++; ppy_warning("Unmatched text '%c' (0x%02x); please report\n", isprint(*ppy_text & 0xff) ? *ppy_text : ' ', *ppy_text); - -<> { - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; - bufferstackentry_t *bep = pop_buffer(); - - if((!bep && pp_get_if_depth()) || (bep && pp_get_if_depth() != bep->if_depth)) - ppy_warning("Unmatched #if/#endif at end of file"); - - if(!bep) - { - if(YY_START != INITIAL) - ppy_error("Unexpected end of file during preprocessing"); - yyterminate(); - } - else if(bep->should_pop == 2) - { - macexpstackentry_t *mac; - mac = pop_macro(); - expand_macro(mac); - } - ppy__delete_buffer(b); - } - -%% -/* - ************************************************************************** - * Support functions - ************************************************************************** - */ - -#ifndef ppy_wrap -int ppy_wrap(void) -{ - return 1; -} -#endif - - -/* - *------------------------------------------------------------------------- - * Output newlines or set them as continuations - * - * Input: -1 - Don't count this one, but update local position (see pp_dqs) - * 0 - Line-continuation seen and cache output - * 1 - Newline seen and flush output - *------------------------------------------------------------------------- - */ -static void newline(int dowrite) -{ - pp_status.line_number++; - pp_status.char_number = 1; - - if(dowrite == -1) - return; - - ncontinuations++; - if(dowrite) - { - for(;ncontinuations; ncontinuations--) - put_buffer("\n", 1); - } -} - - -/* - *------------------------------------------------------------------------- - * Make a number out of an any-base and suffixed string - * - * Possible number extensions: - * - "" int - * - "L" long int - * - "LL" long long int - * - "U" unsigned int - * - "UL" unsigned long int - * - "ULL" unsigned long long int - * - "LU" unsigned long int - * - "LLU" unsigned long long int - * - "LUL" invalid - * - * FIXME: - * The sizes of resulting 'int' and 'long' are compiler specific. - * I depend on sizeof(int) > 2 here (although a relatively safe - * assumption). - * Long longs are not yet implemented because this is very compiler - * specific and I don't want to think too much about the problems. - * - *------------------------------------------------------------------------- - */ -static int make_number(int radix, YYSTYPE *val, const char *str, int len) -{ - int is_l = 0; - int is_ll = 0; - int is_u = 0; - char ext[4]; - long l; - - ext[3] = '\0'; - ext[2] = toupper(str[len-1]); - ext[1] = len > 1 ? toupper(str[len-2]) : ' '; - ext[0] = len > 2 ? toupper(str[len-3]) : ' '; - - if(!strcmp(ext, "LUL")) - { - ppy_error("Invalid constant suffix"); - return 0; - } - else if(!strcmp(ext, "LLU") || !strcmp(ext, "ULL")) - { - is_ll++; - is_u++; - } - else if(!strcmp(ext+1, "LU") || !strcmp(ext+1, "UL")) - { - is_l++; - is_u++; - } - else if(!strcmp(ext+1, "LL")) - { - is_ll++; - } - else if(!strcmp(ext+2, "L")) - { - is_l++; - } - else if(!strcmp(ext+2, "U")) - { - is_u++; - } - - if(is_ll) - { -/* Assume as in the declaration of wrc_ull_t and wrc_sll_t */ -#ifdef HAVE_LONG_LONG - if (is_u) - { - errno = 0; - val->ull = strtoull(str, NULL, radix); - if (val->ull == ULLONG_MAX && errno == ERANGE) - ppy_error("integer constant %s is too large\n", str); - return tULONGLONG; - } - else - { - errno = 0; - val->sll = strtoll(str, NULL, radix); - if ((val->sll == LLONG_MIN || val->sll == LLONG_MAX) && errno == ERANGE) - ppy_error("integer constant %s is too large\n", str); - return tSLONGLONG; - } -#else - pp_internal_error(__FILE__, __LINE__, "long long constants not supported on this platform"); -#endif - } - else if(is_u && is_l) - { - errno = 0; - val->ulong = strtoul(str, NULL, radix); - if (val->ulong == ULONG_MAX && errno == ERANGE) - ppy_error("integer constant %s is too large\n", str); - return tULONG; - } - else if(!is_u && is_l) - { - errno = 0; - val->slong = strtol(str, NULL, radix); - if ((val->slong == LONG_MIN || val->slong == LONG_MAX) && errno == ERANGE) - ppy_error("integer constant %s is too large\n", str); - return tSLONG; - } - else if(is_u && !is_l) - { - unsigned long ul; - errno = 0; - ul = strtoul(str, NULL, radix); - if ((ul == ULONG_MAX && errno == ERANGE) || (ul > UINT_MAX)) - ppy_error("integer constant %s is too large\n", str); - val->uint = (unsigned int)ul; - return tUINT; - } - - /* Else it must be an int... */ - errno = 0; - l = strtol(str, NULL, radix); - if (((l == LONG_MIN || l == LONG_MAX) && errno == ERANGE) || - (l > INT_MAX) || (l < INT_MIN)) - ppy_error("integer constant %s is too large\n", str); - val->sint = (int)l; - return tSINT; -} - - -/* - *------------------------------------------------------------------------- - * Macro and define expansion support - * - * FIXME: Variable macro arguments. - *------------------------------------------------------------------------- - */ -static void expand_special(pp_entry_t *ppp) -{ - static char *buf = NULL; - char *new_buf; - - assert(ppp->type == def_special); - - if(!strcmp(ppp->ident, "__LINE__")) - { - new_buf = pp_xrealloc(buf, 32); - if(!new_buf) - return; - buf = new_buf; - sprintf(buf, "%d", pp_status.line_number); - } - else if(!strcmp(ppp->ident, "__FILE__")) - { - new_buf = pp_xrealloc(buf, strlen(pp_status.input) + 3); - if(!new_buf) - return; - buf = new_buf; - sprintf(buf, "\"%s\"", pp_status.input); - } - else - pp_internal_error(__FILE__, __LINE__, "Special macro '%s' not found...\n", ppp->ident); - - if(pp_flex_debug) - fprintf(stderr, "expand_special(%d): %s:%d: '%s' -> '%s'\n", - macexpstackidx, - pp_status.input, - pp_status.line_number, - ppp->ident, - buf ? buf : ""); - - if(buf && buf[0]) - { - push_buffer(ppp, NULL, NULL, 0); - yy_scan_string(buf); - } -} - -static void expand_define(pp_entry_t *ppp) -{ - assert(ppp->type == def_define); - - if(pp_flex_debug) - fprintf(stderr, "expand_define(%d): %s:%d: '%s' -> '%s'\n", - macexpstackidx, - pp_status.input, - pp_status.line_number, - ppp->ident, - ppp->subst.text); - if(ppp->subst.text && ppp->subst.text[0]) - { - push_buffer(ppp, NULL, NULL, 0); - yy_scan_string(ppp->subst.text); - } -} - -static int curdef_idx = 0; -static int curdef_alloc = 0; -static char *curdef_text = NULL; - -static void add_text(const char *str, int len) -{ - int new_alloc; - char *new_text; - - if(len == 0) - return; - if(curdef_idx >= curdef_alloc || curdef_alloc - curdef_idx < len) - { - new_alloc = curdef_alloc + ((len + ALLOCBLOCKSIZE-1) & ~(ALLOCBLOCKSIZE-1)); - new_text = pp_xrealloc(curdef_text, new_alloc * sizeof(curdef_text[0])); - if(!new_text) - return; - curdef_text = new_text; - curdef_alloc = new_alloc; - if(curdef_alloc > 65536) - ppy_warning("Reallocating macro-expansion buffer larger than 64kB"); - } - memcpy(&curdef_text[curdef_idx], str, len); - curdef_idx += len; -} - -static mtext_t *add_expand_text(mtext_t *mtp, macexpstackentry_t *mep, int *nnl) -{ - char *cptr; - char *exp; - int tag; - int n; - - if(mtp == NULL) - return NULL; - - switch(mtp->type) - { - case exp_text: - if(pp_flex_debug) - fprintf(stderr, "add_expand_text: exp_text: '%s'\n", mtp->subst.text); - add_text(mtp->subst.text, strlen(mtp->subst.text)); - break; - - case exp_stringize: - if(pp_flex_debug) - fprintf(stderr, "add_expand_text: exp_stringize(%d): '%s'\n", - mtp->subst.argidx, - mep->args[mtp->subst.argidx]); - cptr = mep->args[mtp->subst.argidx]; - add_text("\"", 1); - while(*cptr) - { - if(*cptr == '"' || *cptr == '\\') - add_text("\\", 1); - add_text(cptr, 1); - cptr++; - } - add_text("\"", 1); - break; - - case exp_concat: - if(pp_flex_debug) - fprintf(stderr, "add_expand_text: exp_concat\n"); - /* Remove trailing whitespace from current expansion text */ - while(curdef_idx) - { - if(isspace(curdef_text[curdef_idx-1] & 0xff)) - curdef_idx--; - else - break; - } - /* tag current position and recursively expand the next part */ - tag = curdef_idx; - mtp = add_expand_text(mtp->next, mep, nnl); - - /* Now get rid of the leading space of the expansion */ - cptr = &curdef_text[tag]; - n = curdef_idx - tag; - while(n) - { - if(isspace(*cptr & 0xff)) - { - cptr++; - n--; - } - else - break; - } - if(cptr != &curdef_text[tag]) - { - memmove(&curdef_text[tag], cptr, n); - curdef_idx -= (curdef_idx - tag) - n; - } - break; - - case exp_subst: - if((mtp->next && mtp->next->type == exp_concat) || (mtp->prev && mtp->prev->type == exp_concat)) - exp = mep->args[mtp->subst.argidx]; - else - exp = mep->ppargs[mtp->subst.argidx]; - if(exp) - { - add_text(exp, strlen(exp)); - *nnl -= mep->nnls[mtp->subst.argidx]; - cptr = strchr(exp, '\n'); - while(cptr) - { - *cptr = ' '; - cptr = strchr(cptr+1, '\n'); - } - mep->nnls[mtp->subst.argidx] = 0; - } - if(pp_flex_debug) - fprintf(stderr, "add_expand_text: exp_subst(%d): '%s'\n", mtp->subst.argidx, exp); - break; - - default: - pp_internal_error(__FILE__, __LINE__, "Invalid expansion type (%d) in macro expansion\n", mtp->type); - } - return mtp; -} - -static void expand_macro(macexpstackentry_t *mep) -{ - mtext_t *mtp; - int n, k; - char *cptr; - int nnl = 0; - pp_entry_t *ppp = mep->ppp; - int nargs = mep->nargs; - - assert(ppp->type == def_macro); - assert(ppp->expanding == 0); - - if((ppp->nargs >= 0 && nargs != ppp->nargs) || (ppp->nargs < 0 && nargs < -ppp->nargs)) - { - ppy_error("Too %s macro arguments (%d)", nargs < abs(ppp->nargs) ? "few" : "many", nargs); - return; - } - - for(n = 0; n < nargs; n++) - nnl += mep->nnls[n]; - - if(pp_flex_debug) - fprintf(stderr, "expand_macro(%d): %s:%d: '%s'(%d,%d) -> ...\n", - macexpstackidx, - pp_status.input, - pp_status.line_number, - ppp->ident, - mep->nargs, - nnl); - - curdef_idx = 0; - - for(mtp = ppp->subst.mtext; mtp; mtp = mtp->next) - { - if(!(mtp = add_expand_text(mtp, mep, &nnl))) - break; - } - - for(n = 0; n < nnl; n++) - add_text("\n", 1); - - /* To make sure there is room and termination (see below) */ - add_text(" \0", 2); - - /* Strip trailing whitespace from expansion */ - for(k = curdef_idx, cptr = &curdef_text[curdef_idx-1]; k > 0; k--, cptr--) - { - if(!isspace(*cptr & 0xff)) - break; - } - - /* - * We must add *one* whitespace to make sure that there - * is a token-separation after the expansion. - */ - *(++cptr) = ' '; - *(++cptr) = '\0'; - k++; - - /* Strip leading whitespace from expansion */ - for(n = 0, cptr = curdef_text; n < k; n++, cptr++) - { - if(!isspace(*cptr & 0xff)) - break; - } - - if(k - n > 0) - { - if(pp_flex_debug) - fprintf(stderr, "expand_text: '%s'\n", curdef_text + n); - push_buffer(ppp, NULL, NULL, 0); - /*yy_scan_bytes(curdef_text + n, k - n);*/ - yy_scan_string(curdef_text + n); - } -} - -/* - *------------------------------------------------------------------------- - * String collection routines - *------------------------------------------------------------------------- - */ -static void new_string(void) -{ -#ifdef DEBUG - if(strbuf_idx) - ppy_warning("new_string: strbuf_idx != 0"); -#endif - strbuf_idx = 0; - str_startline = pp_status.line_number; -} - -static void add_string(const char *str, int len) -{ - int new_alloc; - char *new_buffer; - - if(len == 0) - return; - if(strbuf_idx >= strbuf_alloc || strbuf_alloc - strbuf_idx < len) - { - new_alloc = strbuf_alloc + ((len + ALLOCBLOCKSIZE-1) & ~(ALLOCBLOCKSIZE-1)); - new_buffer = pp_xrealloc(strbuffer, new_alloc * sizeof(strbuffer[0])); - if(!new_buffer) - return; - strbuffer = new_buffer; - strbuf_alloc = new_alloc; - if(strbuf_alloc > 65536) - ppy_warning("Reallocating string buffer larger than 64kB"); - } - memcpy(&strbuffer[strbuf_idx], str, len); - strbuf_idx += len; -} - -static char *get_string(void) -{ - char *str = pp_xmalloc(strbuf_idx + 1); - if(!str) - return NULL; - memcpy(str, strbuffer, strbuf_idx); - str[strbuf_idx] = '\0'; -#ifdef DEBUG - strbuf_idx = 0; -#endif - return str; -} - -static void put_string(void) -{ - put_buffer(strbuffer, strbuf_idx); -#ifdef DEBUG - strbuf_idx = 0; -#endif -} - -static int string_start(void) -{ - return str_startline; -} - - -/* - *------------------------------------------------------------------------- - * Buffer management - *------------------------------------------------------------------------- - */ -static void push_buffer(pp_entry_t *ppp, char *filename, char *incname, int pop) -{ - if(ppy_debug) - printf("push_buffer(%d): %p %p %p %d\n", bufferstackidx, ppp, filename, incname, pop); - if(bufferstackidx >= MAXBUFFERSTACK) - pp_internal_error(__FILE__, __LINE__, "Buffer stack overflow"); - - memset(&bufferstack[bufferstackidx], 0, sizeof(bufferstack[0])); - bufferstack[bufferstackidx].bufferstate = YY_CURRENT_BUFFER; - bufferstack[bufferstackidx].filehandle = pp_status.file; - bufferstack[bufferstackidx].define = ppp; - bufferstack[bufferstackidx].line_number = pp_status.line_number; - bufferstack[bufferstackidx].char_number = pp_status.char_number; - bufferstack[bufferstackidx].if_depth = pp_get_if_depth(); - bufferstack[bufferstackidx].should_pop = pop; - bufferstack[bufferstackidx].filename = pp_status.input; - bufferstack[bufferstackidx].ncontinuations = ncontinuations; - bufferstack[bufferstackidx].incl = pp_incl_state; - bufferstack[bufferstackidx].include_filename = incname; - - if(ppp) - ppp->expanding = 1; - else if(filename) - { - /* These will track the ppy_error to the correct file and line */ - pp_status.line_number = 1; - pp_status.char_number = 1; - pp_status.input = filename; - ncontinuations = 0; - } - else if(!pop) - pp_internal_error(__FILE__, __LINE__, "Pushing buffer without knowing where to go to"); - bufferstackidx++; -} - -static bufferstackentry_t *pop_buffer(void) -{ - if(bufferstackidx < 0) - pp_internal_error(__FILE__, __LINE__, "Bufferstack underflow?"); - - if(bufferstackidx == 0) - return NULL; - - bufferstackidx--; - - if(bufferstack[bufferstackidx].define) - bufferstack[bufferstackidx].define->expanding = 0; - else - { - if(!bufferstack[bufferstackidx].should_pop) - { - wpp_callbacks->close(pp_status.file); - pp_writestring("# %d \"%s\" 2\n", bufferstack[bufferstackidx].line_number, bufferstack[bufferstackidx].filename); - - /* We have EOF, check the include logic */ - if(pp_incl_state.state == 2 && !pp_incl_state.seen_junk && pp_incl_state.ppp) - { - pp_entry_t *ppp = pplookup(pp_incl_state.ppp); - if(ppp) - { - includelogicentry_t *iep = pp_xmalloc(sizeof(includelogicentry_t)); - if(!iep) - return NULL; - - iep->ppp = ppp; - ppp->iep = iep; - iep->filename = bufferstack[bufferstackidx].include_filename; - iep->prev = NULL; - iep->next = pp_includelogiclist; - if(iep->next) - iep->next->prev = iep; - pp_includelogiclist = iep; - if(pp_status.debug) - fprintf(stderr, "pop_buffer: %s:%d: includelogic added, include_ppp='%s', file='%s'\n", bufferstack[bufferstackidx].filename, bufferstack[bufferstackidx].line_number, pp_incl_state.ppp, iep->filename); - } - else - free(bufferstack[bufferstackidx].include_filename); - } - free(pp_incl_state.ppp); - pp_incl_state = bufferstack[bufferstackidx].incl; - - } - pp_status.line_number = bufferstack[bufferstackidx].line_number; - pp_status.char_number = bufferstack[bufferstackidx].char_number; - pp_status.input = bufferstack[bufferstackidx].filename; - ncontinuations = bufferstack[bufferstackidx].ncontinuations; - } - - if(ppy_debug) - printf("pop_buffer(%d): %p %p (%d, %d, %d) %p %d\n", - bufferstackidx, - bufferstack[bufferstackidx].bufferstate, - bufferstack[bufferstackidx].define, - bufferstack[bufferstackidx].line_number, - bufferstack[bufferstackidx].char_number, - bufferstack[bufferstackidx].if_depth, - bufferstack[bufferstackidx].filename, - bufferstack[bufferstackidx].should_pop); - - pp_status.file = bufferstack[bufferstackidx].filehandle; - ppy__switch_to_buffer(bufferstack[bufferstackidx].bufferstate); - - if(bufferstack[bufferstackidx].should_pop) - { - if(yy_current_state() == pp_macexp) - macro_add_expansion(); - else - pp_internal_error(__FILE__, __LINE__, "Pop buffer and state without macro expansion state"); - yy_pop_state(); - } - - return &bufferstack[bufferstackidx]; -} - - -/* - *------------------------------------------------------------------------- - * Macro nestng support - *------------------------------------------------------------------------- - */ -static void push_macro(pp_entry_t *ppp) -{ - if(macexpstackidx >= MAXMACEXPSTACK) - { - ppy_error("Too many nested macros"); - return; - } - - macexpstack[macexpstackidx] = pp_xmalloc(sizeof(macexpstack[0][0])); - if(!macexpstack[macexpstackidx]) - return; - memset( macexpstack[macexpstackidx], 0, sizeof(macexpstack[0][0])); - macexpstack[macexpstackidx]->ppp = ppp; - macexpstackidx++; -} - -static macexpstackentry_t *top_macro(void) -{ - return macexpstackidx > 0 ? macexpstack[macexpstackidx-1] : NULL; -} - -static macexpstackentry_t *pop_macro(void) -{ - if(macexpstackidx <= 0) - pp_internal_error(__FILE__, __LINE__, "Macro expansion stack underflow\n"); - return macexpstack[--macexpstackidx]; -} - -static void free_macro(macexpstackentry_t *mep) -{ - int i; - - for(i = 0; i < mep->nargs; i++) - free(mep->args[i]); - free(mep->args); - free(mep->nnls); - free(mep->curarg); - free(mep); -} - -static void add_text_to_macro(const char *text, int len) -{ - macexpstackentry_t *mep = top_macro(); - - assert(mep->ppp->expanding == 0); - - if(mep->curargalloc - mep->curargsize <= len+1) /* +1 for '\0' */ - { - char *new_curarg; - int new_alloc = mep->curargalloc + ((ALLOCBLOCKSIZE > len+1) ? ALLOCBLOCKSIZE : len+1); - new_curarg = pp_xrealloc(mep->curarg, new_alloc * sizeof(mep->curarg[0])); - if(!new_curarg) - return; - mep->curarg = new_curarg; - mep->curargalloc = new_alloc; - } - memcpy(mep->curarg + mep->curargsize, text, len); - mep->curargsize += len; - mep->curarg[mep->curargsize] = '\0'; -} - -static void macro_add_arg(int last) -{ - int nnl = 0; - char *cptr; - char **new_args, **new_ppargs; - int *new_nnls; - macexpstackentry_t *mep = top_macro(); - - assert(mep->ppp->expanding == 0); - - new_args = pp_xrealloc(mep->args, (mep->nargs+1) * sizeof(mep->args[0])); - if(!new_args) - return; - mep->args = new_args; - - new_ppargs = pp_xrealloc(mep->ppargs, (mep->nargs+1) * sizeof(mep->ppargs[0])); - if(!new_ppargs) - return; - mep->ppargs = new_ppargs; - - new_nnls = pp_xrealloc(mep->nnls, (mep->nargs+1) * sizeof(mep->nnls[0])); - if(!new_nnls) - return; - mep->nnls = new_nnls; - - mep->args[mep->nargs] = pp_xstrdup(mep->curarg ? mep->curarg : ""); - if(!mep->args[mep->nargs]) - return; - cptr = mep->args[mep->nargs]-1; - while((cptr = strchr(cptr+1, '\n'))) - { - nnl++; - } - mep->nnls[mep->nargs] = nnl; - mep->nargs++; - free(mep->curarg); - mep->curargalloc = mep->curargsize = 0; - mep->curarg = NULL; - - if(pp_flex_debug) - fprintf(stderr, "macro_add_arg: %s:%d: %d -> '%s'\n", - pp_status.input, - pp_status.line_number, - mep->nargs-1, - mep->args[mep->nargs-1]); - - /* Each macro argument must be expanded to cope with stingize */ - if(last || mep->args[mep->nargs-1][0]) - { - yy_push_state(pp_macexp); - push_buffer(NULL, NULL, NULL, last ? 2 : 1); - yy_scan_string(mep->args[mep->nargs-1]); - /*mep->bufferstackidx = bufferstackidx; But not nested! */ - } -} - -static void macro_add_expansion(void) -{ - macexpstackentry_t *mep = top_macro(); - - assert(mep->ppp->expanding == 0); - - mep->ppargs[mep->nargs-1] = pp_xstrdup(mep->curarg ? mep->curarg : ""); - free(mep->curarg); - mep->curargalloc = mep->curargsize = 0; - mep->curarg = NULL; - - if(pp_flex_debug) - fprintf(stderr, "macro_add_expansion: %s:%d: %d -> '%s'\n", - pp_status.input, - pp_status.line_number, - mep->nargs-1, - mep->ppargs[mep->nargs-1] ? mep->ppargs[mep->nargs-1] : ""); -} - - -/* - *------------------------------------------------------------------------- - * Output management - *------------------------------------------------------------------------- - */ -static void put_buffer(const char *s, int len) -{ - if(top_macro()) - add_text_to_macro(s, len); - else - wpp_callbacks->write(s, len); -} - - -/* - *------------------------------------------------------------------------- - * Include management - *------------------------------------------------------------------------- - */ -void pp_do_include(char *fname, int type) -{ - char *newpath; - int n; - includelogicentry_t *iep; - void *fp; - - if(!fname) - return; - - for(iep = pp_includelogiclist; iep; iep = iep->next) - { - if(!strcmp(iep->filename, fname)) - { - /* - * We are done. The file was included before. - * If the define was deleted, then this entry would have - * been deleted too. - */ - return; - } - } - - n = strlen(fname); - - if(n <= 2) - { - ppy_error("Empty include filename"); - return; - } - - /* Undo the effect of the quotation */ - fname[n-1] = '\0'; - - if((fp = pp_open_include(fname+1, type ? pp_status.input : NULL, &newpath)) == NULL) - { - ppy_error("Unable to open include file %s", fname+1); - return; - } - - fname[n-1] = *fname; /* Redo the quotes */ - push_buffer(NULL, newpath, fname, 0); - pp_incl_state.seen_junk = 0; - pp_incl_state.state = 0; - pp_incl_state.ppp = NULL; - - if(pp_status.debug) - fprintf(stderr, "pp_do_include: %s:%d: include_state=%d, include_ppp='%s', include_ifdepth=%d\n", - pp_status.input, pp_status.line_number, pp_incl_state.state, pp_incl_state.ppp, pp_incl_state.ifdepth); - pp_status.file = fp; - ppy__switch_to_buffer(ppy__create_buffer(NULL, YY_BUF_SIZE)); - - pp_writestring("# 1 \"%s\" 1%s\n", newpath, type ? "" : " 3"); -} - -/* - *------------------------------------------------------------------------- - * Push/pop preprocessor ignore state when processing conditionals - * which are false. - *------------------------------------------------------------------------- - */ -void pp_push_ignore_state(void) -{ - yy_push_state(pp_ignore); -} - -void pp_pop_ignore_state(void) -{ - yy_pop_state(); -} diff --git a/reactos/tools/wpp/ppy.tab.c b/reactos/tools/wpp/ppy.tab.c deleted file mode 100644 index 53dc231772c..00000000000 --- a/reactos/tools/wpp/ppy.tab.c +++ /dev/null @@ -1,2842 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.4.2. */ - -/* Skeleton implementation for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software - Foundation, Inc. - - 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 . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "2.4.2" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 0 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - -/* Using locations. */ -#define YYLSP_NEEDED 0 - -/* Substitute the variable and function names. */ -#define yyparse ppy_parse -#define yylex ppy_lex -#define yyerror ppy_error -#define yylval ppy_lval -#define yychar ppy_char -#define yydebug ppy_debug -#define yynerrs ppy_nerrs - - -/* Copy the first part of user declarations. */ - -/* Line 189 of yacc.c */ -#line 30 "ppy.y" - -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include -#include -#include - -#include "wpp_private.h" - - -#define UNARY_OP(r, v, OP) \ - switch(v.type) \ - { \ - case cv_sint: r.val.si = OP v.val.si; break; \ - case cv_uint: r.val.ui = OP v.val.ui; break; \ - case cv_slong: r.val.sl = OP v.val.sl; break; \ - case cv_ulong: r.val.ul = OP v.val.ul; break; \ - case cv_sll: r.val.sll = OP v.val.sll; break; \ - case cv_ull: r.val.ull = OP v.val.ull; break; \ - } - -#define cv_signed(v) ((v.type & FLAG_SIGNED) != 0) - -#define BIN_OP_INT(r, v1, v2, OP) \ - r.type = v1.type; \ - if(cv_signed(v1) && cv_signed(v2)) \ - r.val.si = v1.val.si OP v2.val.si; \ - else if(cv_signed(v1) && !cv_signed(v2)) \ - r.val.si = v1.val.si OP (signed) v2.val.ui; \ - else if(!cv_signed(v1) && cv_signed(v2)) \ - r.val.si = (signed) v1.val.ui OP v2.val.si; \ - else \ - r.val.ui = v1.val.ui OP v2.val.ui; - -#define BIN_OP_LONG(r, v1, v2, OP) \ - r.type = v1.type; \ - if(cv_signed(v1) && cv_signed(v2)) \ - r.val.sl = v1.val.sl OP v2.val.sl; \ - else if(cv_signed(v1) && !cv_signed(v2)) \ - r.val.sl = v1.val.sl OP (signed long) v2.val.ul; \ - else if(!cv_signed(v1) && cv_signed(v2)) \ - r.val.sl = (signed long) v1.val.ul OP v2.val.sl; \ - else \ - r.val.ul = v1.val.ul OP v2.val.ul; - -#define BIN_OP_LONGLONG(r, v1, v2, OP) \ - r.type = v1.type; \ - if(cv_signed(v1) && cv_signed(v2)) \ - r.val.sll = v1.val.sll OP v2.val.sll; \ - else if(cv_signed(v1) && !cv_signed(v2)) \ - r.val.sll = v1.val.sll OP (wrc_sll_t) v2.val.ull; \ - else if(!cv_signed(v1) && cv_signed(v2)) \ - r.val.sll = (wrc_sll_t) v1.val.ull OP v2.val.sll; \ - else \ - r.val.ull = v1.val.ull OP v2.val.ull; - -#define BIN_OP(r, v1, v2, OP) \ - switch(v1.type & SIZE_MASK) \ - { \ - case SIZE_INT: BIN_OP_INT(r, v1, v2, OP); break; \ - case SIZE_LONG: BIN_OP_LONG(r, v1, v2, OP); break; \ - case SIZE_LONGLONG: BIN_OP_LONGLONG(r, v1, v2, OP); break; \ - default: pp_internal_error(__FILE__, __LINE__, "Invalid type indicator (0x%04x)", v1.type); \ - } - - -/* - * Prototypes - */ -static int boolean(cval_t *v); -static void promote_equal_size(cval_t *v1, cval_t *v2); -static void cast_to_sint(cval_t *v); -static void cast_to_uint(cval_t *v); -static void cast_to_slong(cval_t *v); -static void cast_to_ulong(cval_t *v); -static void cast_to_sll(cval_t *v); -static void cast_to_ull(cval_t *v); -static marg_t *new_marg(char *str, def_arg_t type); -static marg_t *add_new_marg(char *str, def_arg_t type); -static int marg_index(char *id); -static mtext_t *new_mtext(char *str, int idx, def_exp_t type); -static mtext_t *combine_mtext(mtext_t *tail, mtext_t *mtp); -static char *merge_text(char *s1, char *s2); - -/* - * Local variables - */ -static marg_t **macro_args; /* Macro parameters array while parsing */ -static int nmacro_args; - - - -/* Line 189 of yacc.c */ -#line 177 "ppy.tab.c" - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - tRCINCLUDE = 258, - tIF = 259, - tIFDEF = 260, - tIFNDEF = 261, - tELSE = 262, - tELIF = 263, - tENDIF = 264, - tDEFINED = 265, - tNL = 266, - tINCLUDE = 267, - tLINE = 268, - tGCCLINE = 269, - tERROR = 270, - tWARNING = 271, - tPRAGMA = 272, - tPPIDENT = 273, - tUNDEF = 274, - tMACROEND = 275, - tCONCAT = 276, - tELIPSIS = 277, - tSTRINGIZE = 278, - tIDENT = 279, - tLITERAL = 280, - tMACRO = 281, - tDEFINE = 282, - tDQSTRING = 283, - tSQSTRING = 284, - tIQSTRING = 285, - tUINT = 286, - tSINT = 287, - tULONG = 288, - tSLONG = 289, - tULONGLONG = 290, - tSLONGLONG = 291, - tRCINCLUDEPATH = 292, - tLOGOR = 293, - tLOGAND = 294, - tNE = 295, - tEQ = 296, - tGTE = 297, - tLTE = 298, - tRSHIFT = 299, - tLSHIFT = 300 - }; -#endif - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -{ - -/* Line 214 of yacc.c */ -#line 126 "ppy.y" - - int sint; - unsigned int uint; - long slong; - unsigned long ulong; - wrc_sll_t sll; - wrc_ull_t ull; - int *iptr; - char *cptr; - cval_t cval; - marg_t *marg; - mtext_t *mtext; - - - -/* Line 214 of yacc.c */ -#line 274 "ppy.tab.c" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - - -/* Copy the second part of user declarations. */ - - -/* Line 264 of yacc.c */ -#line 286 "ppy.tab.c" - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; -#else -typedef short int yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) -# endif -# endif -# ifndef YY_ -# define YY_(msgid) msgid -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) -#else -# define YYUSE(e) /* empty */ -#endif - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) - int yyi; -#endif -{ - return yyi; -} -#endif - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined _STDLIB_H \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) - -#endif - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 2 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 303 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 62 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 13 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 84 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 153 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 300 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 58, 2, 2, 2, 2, 44, 2, - 60, 61, 55, 53, 59, 54, 2, 56, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 39, 2, - 47, 2, 48, 38, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 43, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 42, 2, 57, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 40, 41, 45, 46, 49, 50, 51, - 52 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint16 yyprhs[] = -{ - 0, 0, 3, 4, 7, 11, 15, 19, 23, 27, - 31, 34, 37, 41, 45, 52, 57, 62, 68, 75, - 83, 92, 95, 99, 103, 107, 111, 114, 117, 118, - 120, 122, 124, 126, 129, 132, 135, 136, 137, 139, - 141, 145, 149, 151, 152, 154, 156, 159, 161, 163, - 165, 167, 170, 172, 174, 176, 178, 180, 182, 184, - 187, 192, 194, 198, 202, 206, 210, 214, 218, 222, - 226, 230, 234, 238, 242, 246, 250, 254, 258, 262, - 265, 268, 271, 274, 278 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 63, 0, -1, -1, 63, 64, -1, 12, 28, 11, - -1, 12, 30, 11, -1, 4, 74, 11, -1, 5, - 24, 11, -1, 6, 24, 11, -1, 8, 74, 11, - -1, 7, 11, -1, 9, 11, -1, 19, 24, 11, - -1, 27, 65, 11, -1, 26, 67, 68, 20, 71, - 11, -1, 13, 32, 28, 11, -1, 14, 32, 28, - 11, -1, 14, 32, 28, 32, 11, -1, 14, 32, - 28, 32, 32, 11, -1, 14, 32, 28, 32, 32, - 32, 11, -1, 14, 32, 28, 32, 32, 32, 32, - 11, -1, 14, 11, -1, 15, 65, 11, -1, 16, - 65, 11, -1, 17, 65, 11, -1, 18, 65, 11, - -1, 3, 37, -1, 3, 28, -1, -1, 66, -1, - 25, -1, 28, -1, 29, -1, 66, 25, -1, 66, - 28, -1, 66, 29, -1, -1, -1, 69, -1, 70, - -1, 70, 59, 22, -1, 70, 59, 24, -1, 24, - -1, -1, 72, -1, 73, -1, 72, 73, -1, 25, - -1, 28, -1, 29, -1, 21, -1, 23, 24, -1, - 24, -1, 32, -1, 31, -1, 34, -1, 33, -1, - 36, -1, 35, -1, 10, 24, -1, 10, 60, 24, - 61, -1, 24, -1, 74, 40, 74, -1, 74, 41, - 74, -1, 74, 46, 74, -1, 74, 45, 74, -1, - 74, 47, 74, -1, 74, 48, 74, -1, 74, 50, - 74, -1, 74, 49, 74, -1, 74, 53, 74, -1, - 74, 54, 74, -1, 74, 43, 74, -1, 74, 44, - 74, -1, 74, 42, 74, -1, 74, 55, 74, -1, - 74, 56, 74, -1, 74, 52, 74, -1, 74, 51, - 74, -1, 53, 74, -1, 54, 74, -1, 57, 74, - -1, 58, 74, -1, 60, 74, 61, -1, 74, 38, - 74, 39, 74, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = -{ - 0, 181, 181, 182, 186, 187, 188, 189, 190, 210, - 234, 260, 277, 278, 279, 282, 283, 284, 286, 288, - 290, 292, 293, 294, 295, 296, 297, 310, 316, 317, - 320, 321, 322, 323, 324, 325, 328, 331, 332, 335, - 336, 339, 340, 344, 345, 351, 352, 355, 356, 357, - 358, 359, 366, 375, 376, 377, 378, 379, 380, 381, - 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, - 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, - 402, 403, 404, 405, 406 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "tRCINCLUDE", "tIF", "tIFDEF", "tIFNDEF", - "tELSE", "tELIF", "tENDIF", "tDEFINED", "tNL", "tINCLUDE", "tLINE", - "tGCCLINE", "tERROR", "tWARNING", "tPRAGMA", "tPPIDENT", "tUNDEF", - "tMACROEND", "tCONCAT", "tELIPSIS", "tSTRINGIZE", "tIDENT", "tLITERAL", - "tMACRO", "tDEFINE", "tDQSTRING", "tSQSTRING", "tIQSTRING", "tUINT", - "tSINT", "tULONG", "tSLONG", "tULONGLONG", "tSLONGLONG", - "tRCINCLUDEPATH", "'?'", "':'", "tLOGOR", "tLOGAND", "'|'", "'^'", "'&'", - "tNE", "tEQ", "'<'", "'>'", "tGTE", "tLTE", "tRSHIFT", "tLSHIFT", "'+'", - "'-'", "'*'", "'/'", "'~'", "'!'", "','", "'('", "')'", "$accept", - "pp_file", "preprocessor", "opt_text", "text", "res_arg", "allmargs", - "emargs", "margs", "opt_mtexts", "mtexts", "mtext", "pp_expr", 0 -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 63, 58, - 293, 294, 124, 94, 38, 295, 296, 60, 62, 297, - 298, 299, 300, 43, 45, 42, 47, 126, 33, 44, - 40, 41 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 62, 63, 63, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, 65, 65, - 66, 66, 66, 66, 66, 66, 67, 68, 68, 69, - 69, 70, 70, 71, 71, 72, 72, 73, 73, 73, - 73, 73, 73, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 0, 2, 3, 3, 3, 3, 3, 3, - 2, 2, 3, 3, 6, 4, 4, 5, 6, 7, - 8, 2, 3, 3, 3, 3, 2, 2, 0, 1, - 1, 1, 1, 2, 2, 2, 0, 0, 1, 1, - 3, 3, 1, 0, 1, 1, 2, 1, 1, 1, - 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, - 4, 1, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, - 2, 2, 2, 3, 5 -}; - -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 28, 28, 28, 28, 0, 36, 28, - 3, 27, 26, 0, 61, 54, 53, 56, 55, 58, - 57, 0, 0, 0, 0, 0, 0, 0, 0, 10, - 0, 11, 0, 0, 0, 21, 0, 30, 31, 32, - 0, 29, 0, 0, 0, 0, 37, 0, 59, 0, - 79, 80, 81, 82, 0, 6, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 7, 8, 9, 4, 5, 0, - 0, 22, 33, 34, 35, 23, 24, 25, 12, 42, - 0, 38, 39, 13, 0, 83, 0, 62, 63, 74, - 72, 73, 65, 64, 66, 67, 69, 68, 78, 77, - 70, 71, 75, 76, 15, 16, 0, 43, 0, 60, - 0, 17, 0, 50, 0, 52, 47, 48, 49, 0, - 44, 45, 40, 41, 84, 18, 0, 51, 14, 46, - 19, 0, 20 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 1, 20, 50, 51, 56, 100, 101, 102, 139, - 140, 141, 36 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -27 -static const yytype_int16 yypact[] = -{ - -27, 142, -27, -26, -3, -12, -2, 30, -3, 41, - 91, 21, 2, -19, -19, -19, -19, 32, -27, -19, - -27, -27, -27, -23, -27, -27, -27, -27, -27, -27, - -27, -3, -3, -3, -3, -3, 38, 66, 109, -27, - 85, -27, 113, 133, 115, -27, 124, -27, -27, -27, - 179, -9, 278, 280, 281, 282, 129, 283, -27, 271, - -10, -10, -27, -27, 57, -27, -3, -3, -3, -3, - -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, - -3, -3, -3, -3, -27, -27, -27, -27, -27, 285, - 3, -27, -27, -27, -27, -27, -27, -27, -27, -27, - 277, -27, 239, -27, 238, -27, 132, 167, 182, 196, - 209, 221, 231, 231, 111, 111, 111, 111, 61, 61, - -10, -10, -27, -27, -27, -27, 4, 19, 266, -27, - -3, -27, 6, -27, 276, -27, -27, -27, -27, 290, - 19, -27, -27, -27, 151, -27, 7, -27, -27, -27, - -27, 291, -27 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -27, -27, -27, -11, -27, -27, -27, -27, -27, -27, - -27, 163, -8 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -1 -static const yytype_uint8 yytable[] = -{ - 40, 58, 21, 52, 53, 54, 47, 23, 57, 48, - 49, 22, 37, 45, 125, 131, 92, 145, 150, 93, - 94, 24, 38, 60, 61, 62, 63, 64, 25, 26, - 27, 28, 29, 30, 46, 126, 132, 59, 146, 151, - 133, 39, 134, 135, 136, 82, 83, 137, 138, 65, - 31, 32, 41, 44, 33, 34, 55, 35, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 66, 84, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 66, 86, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 80, 81, 82, 83, 105, 42, - 85, 43, 144, 66, 87, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 2, 89, 88, 3, 4, 5, 6, 7, - 8, 9, 90, 99, 10, 11, 12, 13, 14, 15, - 16, 17, 78, 79, 80, 81, 82, 83, 18, 19, - 66, 130, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 66, - 91, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 142, 95, - 143, 96, 97, 98, 103, 104, 124, 127, 128, 129, - 147, 148, 152, 149 -}; - -static const yytype_uint8 yycheck[] = -{ - 8, 24, 28, 14, 15, 16, 25, 10, 19, 28, - 29, 37, 24, 11, 11, 11, 25, 11, 11, 28, - 29, 24, 24, 31, 32, 33, 34, 35, 31, 32, - 33, 34, 35, 36, 32, 32, 32, 60, 32, 32, - 21, 11, 23, 24, 25, 55, 56, 28, 29, 11, - 53, 54, 11, 32, 57, 58, 24, 60, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 38, 11, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 38, 11, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 53, 54, 55, 56, 61, 28, - 11, 30, 130, 38, 11, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 0, 28, 11, 3, 4, 5, 6, 7, - 8, 9, 28, 24, 12, 13, 14, 15, 16, 17, - 18, 19, 51, 52, 53, 54, 55, 56, 26, 27, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 38, - 11, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 22, 11, - 24, 11, 11, 11, 11, 24, 11, 20, 59, 61, - 24, 11, 11, 140 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 63, 0, 3, 4, 5, 6, 7, 8, 9, - 12, 13, 14, 15, 16, 17, 18, 19, 26, 27, - 64, 28, 37, 10, 24, 31, 32, 33, 34, 35, - 36, 53, 54, 57, 58, 60, 74, 24, 24, 11, - 74, 11, 28, 30, 32, 11, 32, 25, 28, 29, - 65, 66, 65, 65, 65, 24, 67, 65, 24, 60, - 74, 74, 74, 74, 74, 11, 38, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 11, 11, 11, 11, 11, 28, - 28, 11, 25, 28, 29, 11, 11, 11, 11, 24, - 68, 69, 70, 11, 24, 61, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 11, 11, 32, 20, 59, 61, - 39, 11, 32, 21, 23, 24, 25, 28, 29, 71, - 72, 73, 22, 24, 74, 11, 32, 24, 11, 73, - 11, 32, 11 -}; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - - -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif - - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -#ifndef YY_LOCATION_PRINT -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) -#else -# define YYLEX yylex () -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif -{ - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - switch (yytype) - { - default: - break; - } -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif -{ - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - yy_symbol_value_print (yyoutput, yytype, yyvaluep); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule) -#else -static void -yy_reduce_print (yyvsp, yyrule) - YYSTYPE *yyvsp; - int yyrule; -#endif -{ - int yynrhs = yyr2[yyrule]; - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule); \ -} while (YYID (0)) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static YYSIZE_T -yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static char * -yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into YYRESULT an error message about the unexpected token - YYCHAR while in state YYSTATE. Return the number of bytes copied, - including the terminating null byte. If YYRESULT is null, do not - copy anything; just return the number of bytes that would be - copied. As a special case, return 0 if an ordinary "syntax error" - message will do. Return YYSIZE_MAXIMUM if overflow occurs during - size calculation. */ -static YYSIZE_T -yysyntax_error (char *yyresult, int yystate, int yychar) -{ - int yyn = yypact[yystate]; - - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else - { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } - - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - - if (yysize_overflow) - return YYSIZE_MAXIMUM; - - if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } - return yysize; - } -} -#endif /* YYERROR_VERBOSE */ - - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yymsg, yytype, yyvaluep) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; -#endif -{ - YYUSE (yyvaluep); - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - switch (yytype) - { - - default: - break; - } -} - -/* Prevent warnings from -Wmissing-prototypes. */ -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - -/* The lookahead symbol. */ -int yychar; - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; - -/* Number of syntax errors so far. */ -int yynerrs; - - - -/*-------------------------. -| yyparse or yypush_parse. | -`-------------------------*/ - -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void) -#else -int -yyparse () - -#endif -#endif -{ - - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - yyssp = yyss; - yyvsp = yyvs; - - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - *++yyvsp = yylval; - - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 4: - -/* Line 1464 of yacc.c */ -#line 186 "ppy.y" - { pp_do_include((yyvsp[(2) - (3)].cptr), 1); ;} - break; - - case 5: - -/* Line 1464 of yacc.c */ -#line 187 "ppy.y" - { pp_do_include((yyvsp[(2) - (3)].cptr), 0); ;} - break; - - case 6: - -/* Line 1464 of yacc.c */ -#line 188 "ppy.y" - { pp_next_if_state(boolean(&(yyvsp[(2) - (3)].cval))); ;} - break; - - case 7: - -/* Line 1464 of yacc.c */ -#line 189 "ppy.y" - { pp_next_if_state(pplookup((yyvsp[(2) - (3)].cptr)) != NULL); free((yyvsp[(2) - (3)].cptr)); ;} - break; - - case 8: - -/* Line 1464 of yacc.c */ -#line 190 "ppy.y" - { - int t = pplookup((yyvsp[(2) - (3)].cptr)) == NULL; - if(pp_incl_state.state == 0 && t && !pp_incl_state.seen_junk) - { - pp_incl_state.state = 1; - pp_incl_state.ppp = (yyvsp[(2) - (3)].cptr); - pp_incl_state.ifdepth = pp_get_if_depth(); - } - else if(pp_incl_state.state != 1) - { - pp_incl_state.state = -1; - free((yyvsp[(2) - (3)].cptr)); - } - else - free((yyvsp[(2) - (3)].cptr)); - pp_next_if_state(t); - if(pp_status.debug) - fprintf(stderr, "tIFNDEF: %s:%d: include_state=%d, include_ppp='%s', include_ifdepth=%d\n", - pp_status.input, pp_status.line_number, pp_incl_state.state, pp_incl_state.ppp, pp_incl_state.ifdepth); - ;} - break; - - case 9: - -/* Line 1464 of yacc.c */ -#line 210 "ppy.y" - { - pp_if_state_t s = pp_pop_if(); - switch(s) - { - case if_true: - case if_elif: - pp_push_if(if_elif); - break; - case if_false: - pp_push_if(boolean(&(yyvsp[(2) - (3)].cval)) ? if_true : if_false); - break; - case if_ignore: - pp_push_if(if_ignore); - break; - case if_elsetrue: - case if_elsefalse: - ppy_error("#elif cannot follow #else"); - break; - case if_error: - break; - default: - pp_internal_error(__FILE__, __LINE__, "Invalid pp_if_state (%d) in #elif directive", s); - } - ;} - break; - - case 10: - -/* Line 1464 of yacc.c */ -#line 234 "ppy.y" - { - pp_if_state_t s = pp_pop_if(); - switch(s) - { - case if_true: - pp_push_if(if_elsefalse); - break; - case if_elif: - pp_push_if(if_elif); - break; - case if_false: - pp_push_if(if_elsetrue); - break; - case if_ignore: - pp_push_if(if_ignore); - break; - case if_elsetrue: - case if_elsefalse: - ppy_error("#else clause already defined"); - break; - case if_error: - break; - default: - pp_internal_error(__FILE__, __LINE__, "Invalid pp_if_state (%d) in #else directive", s); - } - ;} - break; - - case 11: - -/* Line 1464 of yacc.c */ -#line 260 "ppy.y" - { - if(pp_pop_if() != if_error) - { - if(pp_incl_state.ifdepth == pp_get_if_depth() && pp_incl_state.state == 1) - { - pp_incl_state.state = 2; - pp_incl_state.seen_junk = 0; - } - else if(pp_incl_state.state != 1) - { - pp_incl_state.state = -1; - } - if(pp_status.debug) - fprintf(stderr, "tENDIF: %s:%d: include_state=%d, include_ppp='%s', include_ifdepth=%d\n", - pp_status.input, pp_status.line_number, pp_incl_state.state, pp_incl_state.ppp, pp_incl_state.ifdepth); - } - ;} - break; - - case 12: - -/* Line 1464 of yacc.c */ -#line 277 "ppy.y" - { pp_del_define((yyvsp[(2) - (3)].cptr)); free((yyvsp[(2) - (3)].cptr)); ;} - break; - - case 13: - -/* Line 1464 of yacc.c */ -#line 278 "ppy.y" - { pp_add_define((yyvsp[(1) - (3)].cptr), (yyvsp[(2) - (3)].cptr)); free((yyvsp[(1) - (3)].cptr)); free((yyvsp[(2) - (3)].cptr)); ;} - break; - - case 14: - -/* Line 1464 of yacc.c */ -#line 279 "ppy.y" - { - pp_add_macro((yyvsp[(1) - (6)].cptr), macro_args, nmacro_args, (yyvsp[(5) - (6)].mtext)); - ;} - break; - - case 15: - -/* Line 1464 of yacc.c */ -#line 282 "ppy.y" - { if((yyvsp[(3) - (4)].cptr)) pp_writestring("# %d %s\n", (yyvsp[(2) - (4)].sint) , (yyvsp[(3) - (4)].cptr)); free((yyvsp[(3) - (4)].cptr)); ;} - break; - - case 16: - -/* Line 1464 of yacc.c */ -#line 283 "ppy.y" - { if((yyvsp[(3) - (4)].cptr)) pp_writestring("# %d %s\n", (yyvsp[(2) - (4)].sint) , (yyvsp[(3) - (4)].cptr)); free((yyvsp[(3) - (4)].cptr)); ;} - break; - - case 17: - -/* Line 1464 of yacc.c */ -#line 285 "ppy.y" - { if((yyvsp[(3) - (5)].cptr)) pp_writestring("# %d %s %d\n", (yyvsp[(2) - (5)].sint), (yyvsp[(3) - (5)].cptr), (yyvsp[(4) - (5)].sint)); free((yyvsp[(3) - (5)].cptr)); ;} - break; - - case 18: - -/* Line 1464 of yacc.c */ -#line 287 "ppy.y" - { if((yyvsp[(3) - (6)].cptr)) pp_writestring("# %d %s %d %d\n", (yyvsp[(2) - (6)].sint) ,(yyvsp[(3) - (6)].cptr), (yyvsp[(4) - (6)].sint), (yyvsp[(5) - (6)].sint)); free((yyvsp[(3) - (6)].cptr)); ;} - break; - - case 19: - -/* Line 1464 of yacc.c */ -#line 289 "ppy.y" - { if((yyvsp[(3) - (7)].cptr)) pp_writestring("# %d %s %d %d %d\n", (yyvsp[(2) - (7)].sint) ,(yyvsp[(3) - (7)].cptr) ,(yyvsp[(4) - (7)].sint) ,(yyvsp[(5) - (7)].sint), (yyvsp[(6) - (7)].sint)); free((yyvsp[(3) - (7)].cptr)); ;} - break; - - case 20: - -/* Line 1464 of yacc.c */ -#line 291 "ppy.y" - { if((yyvsp[(3) - (8)].cptr)) pp_writestring("# %d %s %d %d %d %d\n", (yyvsp[(2) - (8)].sint) ,(yyvsp[(3) - (8)].cptr) ,(yyvsp[(4) - (8)].sint) ,(yyvsp[(5) - (8)].sint), (yyvsp[(6) - (8)].sint), (yyvsp[(7) - (8)].sint)); free((yyvsp[(3) - (8)].cptr)); ;} - break; - - case 22: - -/* Line 1464 of yacc.c */ -#line 293 "ppy.y" - { ppy_error("#error directive: '%s'", (yyvsp[(2) - (3)].cptr)); free((yyvsp[(2) - (3)].cptr)); ;} - break; - - case 23: - -/* Line 1464 of yacc.c */ -#line 294 "ppy.y" - { ppy_warning("#warning directive: '%s'", (yyvsp[(2) - (3)].cptr)); free((yyvsp[(2) - (3)].cptr)); ;} - break; - - case 24: - -/* Line 1464 of yacc.c */ -#line 295 "ppy.y" - { pp_writestring("#pragma %s\n", (yyvsp[(2) - (3)].cptr) ? (yyvsp[(2) - (3)].cptr) : ""); free((yyvsp[(2) - (3)].cptr)); ;} - break; - - case 25: - -/* Line 1464 of yacc.c */ -#line 296 "ppy.y" - { if(pp_status.pedantic) ppy_warning("#ident ignored (arg: '%s')", (yyvsp[(2) - (3)].cptr)); free((yyvsp[(2) - (3)].cptr)); ;} - break; - - case 26: - -/* Line 1464 of yacc.c */ -#line 297 "ppy.y" - { - if((yyvsp[(2) - (2)].cptr)) - { - int nl=strlen((yyvsp[(2) - (2)].cptr)) +3; - char *fn=pp_xmalloc(nl); - if(fn) - { - sprintf(fn,"\"%s\"",(yyvsp[(2) - (2)].cptr)); - pp_do_include(fn,1); - } - free((yyvsp[(2) - (2)].cptr)); - } - ;} - break; - - case 27: - -/* Line 1464 of yacc.c */ -#line 310 "ppy.y" - { - pp_do_include((yyvsp[(2) - (2)].cptr),1); - ;} - break; - - case 28: - -/* Line 1464 of yacc.c */ -#line 316 "ppy.y" - { (yyval.cptr) = NULL; ;} - break; - - case 29: - -/* Line 1464 of yacc.c */ -#line 317 "ppy.y" - { (yyval.cptr) = (yyvsp[(1) - (1)].cptr); ;} - break; - - case 30: - -/* Line 1464 of yacc.c */ -#line 320 "ppy.y" - { (yyval.cptr) = (yyvsp[(1) - (1)].cptr); ;} - break; - - case 31: - -/* Line 1464 of yacc.c */ -#line 321 "ppy.y" - { (yyval.cptr) = (yyvsp[(1) - (1)].cptr); ;} - break; - - case 32: - -/* Line 1464 of yacc.c */ -#line 322 "ppy.y" - { (yyval.cptr) = (yyvsp[(1) - (1)].cptr); ;} - break; - - case 33: - -/* Line 1464 of yacc.c */ -#line 323 "ppy.y" - { (yyval.cptr) = merge_text((yyvsp[(1) - (2)].cptr), (yyvsp[(2) - (2)].cptr)); ;} - break; - - case 34: - -/* Line 1464 of yacc.c */ -#line 324 "ppy.y" - { (yyval.cptr) = merge_text((yyvsp[(1) - (2)].cptr), (yyvsp[(2) - (2)].cptr)); ;} - break; - - case 35: - -/* Line 1464 of yacc.c */ -#line 325 "ppy.y" - { (yyval.cptr) = merge_text((yyvsp[(1) - (2)].cptr), (yyvsp[(2) - (2)].cptr)); ;} - break; - - case 36: - -/* Line 1464 of yacc.c */ -#line 328 "ppy.y" - { macro_args = NULL; nmacro_args = 0; ;} - break; - - case 37: - -/* Line 1464 of yacc.c */ -#line 331 "ppy.y" - { (yyval.sint) = 0; macro_args = NULL; nmacro_args = 0; ;} - break; - - case 38: - -/* Line 1464 of yacc.c */ -#line 332 "ppy.y" - { (yyval.sint) = nmacro_args; ;} - break; - - case 39: - -/* Line 1464 of yacc.c */ -#line 335 "ppy.y" - { (yyval.marg) = (yyvsp[(1) - (1)].marg); ;} - break; - - case 40: - -/* Line 1464 of yacc.c */ -#line 336 "ppy.y" - { (yyval.marg) = add_new_marg(NULL, arg_list); nmacro_args *= -1; ;} - break; - - case 41: - -/* Line 1464 of yacc.c */ -#line 339 "ppy.y" - { (yyval.marg) = add_new_marg((yyvsp[(3) - (3)].cptr), arg_single); ;} - break; - - case 42: - -/* Line 1464 of yacc.c */ -#line 340 "ppy.y" - { (yyval.marg) = add_new_marg((yyvsp[(1) - (1)].cptr), arg_single); ;} - break; - - case 43: - -/* Line 1464 of yacc.c */ -#line 344 "ppy.y" - { (yyval.mtext) = NULL; ;} - break; - - case 44: - -/* Line 1464 of yacc.c */ -#line 345 "ppy.y" - { - for((yyval.mtext) = (yyvsp[(1) - (1)].mtext); (yyval.mtext) && (yyval.mtext)->prev; (yyval.mtext) = (yyval.mtext)->prev) - ; - ;} - break; - - case 45: - -/* Line 1464 of yacc.c */ -#line 351 "ppy.y" - { (yyval.mtext) = (yyvsp[(1) - (1)].mtext); ;} - break; - - case 46: - -/* Line 1464 of yacc.c */ -#line 352 "ppy.y" - { (yyval.mtext) = combine_mtext((yyvsp[(1) - (2)].mtext), (yyvsp[(2) - (2)].mtext)); ;} - break; - - case 47: - -/* Line 1464 of yacc.c */ -#line 355 "ppy.y" - { (yyval.mtext) = new_mtext((yyvsp[(1) - (1)].cptr), 0, exp_text); ;} - break; - - case 48: - -/* Line 1464 of yacc.c */ -#line 356 "ppy.y" - { (yyval.mtext) = new_mtext((yyvsp[(1) - (1)].cptr), 0, exp_text); ;} - break; - - case 49: - -/* Line 1464 of yacc.c */ -#line 357 "ppy.y" - { (yyval.mtext) = new_mtext((yyvsp[(1) - (1)].cptr), 0, exp_text); ;} - break; - - case 50: - -/* Line 1464 of yacc.c */ -#line 358 "ppy.y" - { (yyval.mtext) = new_mtext(NULL, 0, exp_concat); ;} - break; - - case 51: - -/* Line 1464 of yacc.c */ -#line 359 "ppy.y" - { - int mat = marg_index((yyvsp[(2) - (2)].cptr)); - if(mat < 0) - ppy_error("Stringification identifier must be an argument parameter"); - else - (yyval.mtext) = new_mtext(NULL, mat, exp_stringize); - ;} - break; - - case 52: - -/* Line 1464 of yacc.c */ -#line 366 "ppy.y" - { - int mat = marg_index((yyvsp[(1) - (1)].cptr)); - if(mat >= 0) - (yyval.mtext) = new_mtext(NULL, mat, exp_subst); - else if((yyvsp[(1) - (1)].cptr)) - (yyval.mtext) = new_mtext((yyvsp[(1) - (1)].cptr), 0, exp_text); - ;} - break; - - case 53: - -/* Line 1464 of yacc.c */ -#line 375 "ppy.y" - { (yyval.cval).type = cv_sint; (yyval.cval).val.si = (yyvsp[(1) - (1)].sint); ;} - break; - - case 54: - -/* Line 1464 of yacc.c */ -#line 376 "ppy.y" - { (yyval.cval).type = cv_uint; (yyval.cval).val.ui = (yyvsp[(1) - (1)].uint); ;} - break; - - case 55: - -/* Line 1464 of yacc.c */ -#line 377 "ppy.y" - { (yyval.cval).type = cv_slong; (yyval.cval).val.sl = (yyvsp[(1) - (1)].slong); ;} - break; - - case 56: - -/* Line 1464 of yacc.c */ -#line 378 "ppy.y" - { (yyval.cval).type = cv_ulong; (yyval.cval).val.ul = (yyvsp[(1) - (1)].ulong); ;} - break; - - case 57: - -/* Line 1464 of yacc.c */ -#line 379 "ppy.y" - { (yyval.cval).type = cv_sll; (yyval.cval).val.sll = (yyvsp[(1) - (1)].sll); ;} - break; - - case 58: - -/* Line 1464 of yacc.c */ -#line 380 "ppy.y" - { (yyval.cval).type = cv_ull; (yyval.cval).val.ull = (yyvsp[(1) - (1)].ull); ;} - break; - - case 59: - -/* Line 1464 of yacc.c */ -#line 381 "ppy.y" - { (yyval.cval).type = cv_sint; (yyval.cval).val.si = pplookup((yyvsp[(2) - (2)].cptr)) != NULL; ;} - break; - - case 60: - -/* Line 1464 of yacc.c */ -#line 382 "ppy.y" - { (yyval.cval).type = cv_sint; (yyval.cval).val.si = pplookup((yyvsp[(3) - (4)].cptr)) != NULL; ;} - break; - - case 61: - -/* Line 1464 of yacc.c */ -#line 383 "ppy.y" - { (yyval.cval).type = cv_sint; (yyval.cval).val.si = 0; ;} - break; - - case 62: - -/* Line 1464 of yacc.c */ -#line 384 "ppy.y" - { (yyval.cval).type = cv_sint; (yyval.cval).val.si = boolean(&(yyvsp[(1) - (3)].cval)) || boolean(&(yyvsp[(3) - (3)].cval)); ;} - break; - - case 63: - -/* Line 1464 of yacc.c */ -#line 385 "ppy.y" - { (yyval.cval).type = cv_sint; (yyval.cval).val.si = boolean(&(yyvsp[(1) - (3)].cval)) && boolean(&(yyvsp[(3) - (3)].cval)); ;} - break; - - case 64: - -/* Line 1464 of yacc.c */ -#line 386 "ppy.y" - { promote_equal_size(&(yyvsp[(1) - (3)].cval), &(yyvsp[(3) - (3)].cval)); BIN_OP((yyval.cval), (yyvsp[(1) - (3)].cval), (yyvsp[(3) - (3)].cval), ==) ;} - break; - - case 65: - -/* Line 1464 of yacc.c */ -#line 387 "ppy.y" - { promote_equal_size(&(yyvsp[(1) - (3)].cval), &(yyvsp[(3) - (3)].cval)); BIN_OP((yyval.cval), (yyvsp[(1) - (3)].cval), (yyvsp[(3) - (3)].cval), !=) ;} - break; - - case 66: - -/* Line 1464 of yacc.c */ -#line 388 "ppy.y" - { promote_equal_size(&(yyvsp[(1) - (3)].cval), &(yyvsp[(3) - (3)].cval)); BIN_OP((yyval.cval), (yyvsp[(1) - (3)].cval), (yyvsp[(3) - (3)].cval), <) ;} - break; - - case 67: - -/* Line 1464 of yacc.c */ -#line 389 "ppy.y" - { promote_equal_size(&(yyvsp[(1) - (3)].cval), &(yyvsp[(3) - (3)].cval)); BIN_OP((yyval.cval), (yyvsp[(1) - (3)].cval), (yyvsp[(3) - (3)].cval), >) ;} - break; - - case 68: - -/* Line 1464 of yacc.c */ -#line 390 "ppy.y" - { promote_equal_size(&(yyvsp[(1) - (3)].cval), &(yyvsp[(3) - (3)].cval)); BIN_OP((yyval.cval), (yyvsp[(1) - (3)].cval), (yyvsp[(3) - (3)].cval), <=) ;} - break; - - case 69: - -/* Line 1464 of yacc.c */ -#line 391 "ppy.y" - { promote_equal_size(&(yyvsp[(1) - (3)].cval), &(yyvsp[(3) - (3)].cval)); BIN_OP((yyval.cval), (yyvsp[(1) - (3)].cval), (yyvsp[(3) - (3)].cval), >=) ;} - break; - - case 70: - -/* Line 1464 of yacc.c */ -#line 392 "ppy.y" - { promote_equal_size(&(yyvsp[(1) - (3)].cval), &(yyvsp[(3) - (3)].cval)); BIN_OP((yyval.cval), (yyvsp[(1) - (3)].cval), (yyvsp[(3) - (3)].cval), +) ;} - break; - - case 71: - -/* Line 1464 of yacc.c */ -#line 393 "ppy.y" - { promote_equal_size(&(yyvsp[(1) - (3)].cval), &(yyvsp[(3) - (3)].cval)); BIN_OP((yyval.cval), (yyvsp[(1) - (3)].cval), (yyvsp[(3) - (3)].cval), -) ;} - break; - - case 72: - -/* Line 1464 of yacc.c */ -#line 394 "ppy.y" - { promote_equal_size(&(yyvsp[(1) - (3)].cval), &(yyvsp[(3) - (3)].cval)); BIN_OP((yyval.cval), (yyvsp[(1) - (3)].cval), (yyvsp[(3) - (3)].cval), ^) ;} - break; - - case 73: - -/* Line 1464 of yacc.c */ -#line 395 "ppy.y" - { promote_equal_size(&(yyvsp[(1) - (3)].cval), &(yyvsp[(3) - (3)].cval)); BIN_OP((yyval.cval), (yyvsp[(1) - (3)].cval), (yyvsp[(3) - (3)].cval), &) ;} - break; - - case 74: - -/* Line 1464 of yacc.c */ -#line 396 "ppy.y" - { promote_equal_size(&(yyvsp[(1) - (3)].cval), &(yyvsp[(3) - (3)].cval)); BIN_OP((yyval.cval), (yyvsp[(1) - (3)].cval), (yyvsp[(3) - (3)].cval), |) ;} - break; - - case 75: - -/* Line 1464 of yacc.c */ -#line 397 "ppy.y" - { promote_equal_size(&(yyvsp[(1) - (3)].cval), &(yyvsp[(3) - (3)].cval)); BIN_OP((yyval.cval), (yyvsp[(1) - (3)].cval), (yyvsp[(3) - (3)].cval), *) ;} - break; - - case 76: - -/* Line 1464 of yacc.c */ -#line 398 "ppy.y" - { promote_equal_size(&(yyvsp[(1) - (3)].cval), &(yyvsp[(3) - (3)].cval)); BIN_OP((yyval.cval), (yyvsp[(1) - (3)].cval), (yyvsp[(3) - (3)].cval), /) ;} - break; - - case 77: - -/* Line 1464 of yacc.c */ -#line 399 "ppy.y" - { promote_equal_size(&(yyvsp[(1) - (3)].cval), &(yyvsp[(3) - (3)].cval)); BIN_OP((yyval.cval), (yyvsp[(1) - (3)].cval), (yyvsp[(3) - (3)].cval), <<) ;} - break; - - case 78: - -/* Line 1464 of yacc.c */ -#line 400 "ppy.y" - { promote_equal_size(&(yyvsp[(1) - (3)].cval), &(yyvsp[(3) - (3)].cval)); BIN_OP((yyval.cval), (yyvsp[(1) - (3)].cval), (yyvsp[(3) - (3)].cval), >>) ;} - break; - - case 79: - -/* Line 1464 of yacc.c */ -#line 401 "ppy.y" - { (yyval.cval) = (yyvsp[(2) - (2)].cval); ;} - break; - - case 80: - -/* Line 1464 of yacc.c */ -#line 402 "ppy.y" - { UNARY_OP((yyval.cval), (yyvsp[(2) - (2)].cval), -) ;} - break; - - case 81: - -/* Line 1464 of yacc.c */ -#line 403 "ppy.y" - { UNARY_OP((yyval.cval), (yyvsp[(2) - (2)].cval), ~) ;} - break; - - case 82: - -/* Line 1464 of yacc.c */ -#line 404 "ppy.y" - { (yyval.cval).type = cv_sint; (yyval.cval).val.si = !boolean(&(yyvsp[(2) - (2)].cval)); ;} - break; - - case 83: - -/* Line 1464 of yacc.c */ -#line 405 "ppy.y" - { (yyval.cval) = (yyvsp[(2) - (3)].cval); ;} - break; - - case 84: - -/* Line 1464 of yacc.c */ -#line 406 "ppy.y" - { (yyval.cval) = boolean(&(yyvsp[(1) - (5)].cval)) ? (yyvsp[(3) - (5)].cval) : (yyvsp[(5) - (5)].cval); ;} - break; - - - -/* Line 1464 of yacc.c */ -#line 2333 "ppy.tab.c" - default: break; - } - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (YY_("syntax error")); -#else - { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - } - } - - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (yymsg); - } - else - { - yyerror (YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } - } -#endif - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - - yydestruct ("Error: popping", - yystos[yystate], yyvsp); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - *++yyvsp = yylval; - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined(yyoverflow) || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); -} - - - -/* Line 1684 of yacc.c */ -#line 409 "ppy.y" - - -/* - ************************************************************************** - * Support functions - ************************************************************************** - */ - -static void cast_to_sint(cval_t *v) -{ - switch(v->type) - { - case cv_sint: break; - case cv_uint: break; - case cv_slong: v->val.si = v->val.sl; break; - case cv_ulong: v->val.si = v->val.ul; break; - case cv_sll: v->val.si = v->val.sll; break; - case cv_ull: v->val.si = v->val.ull; break; - } - v->type = cv_sint; -} - -static void cast_to_uint(cval_t *v) -{ - switch(v->type) - { - case cv_sint: break; - case cv_uint: break; - case cv_slong: v->val.ui = v->val.sl; break; - case cv_ulong: v->val.ui = v->val.ul; break; - case cv_sll: v->val.ui = v->val.sll; break; - case cv_ull: v->val.ui = v->val.ull; break; - } - v->type = cv_uint; -} - -static void cast_to_slong(cval_t *v) -{ - switch(v->type) - { - case cv_sint: v->val.sl = v->val.si; break; - case cv_uint: v->val.sl = v->val.ui; break; - case cv_slong: break; - case cv_ulong: break; - case cv_sll: v->val.sl = v->val.sll; break; - case cv_ull: v->val.sl = v->val.ull; break; - } - v->type = cv_slong; -} - -static void cast_to_ulong(cval_t *v) -{ - switch(v->type) - { - case cv_sint: v->val.ul = v->val.si; break; - case cv_uint: v->val.ul = v->val.ui; break; - case cv_slong: break; - case cv_ulong: break; - case cv_sll: v->val.ul = v->val.sll; break; - case cv_ull: v->val.ul = v->val.ull; break; - } - v->type = cv_ulong; -} - -static void cast_to_sll(cval_t *v) -{ - switch(v->type) - { - case cv_sint: v->val.sll = v->val.si; break; - case cv_uint: v->val.sll = v->val.ui; break; - case cv_slong: v->val.sll = v->val.sl; break; - case cv_ulong: v->val.sll = v->val.ul; break; - case cv_sll: break; - case cv_ull: break; - } - v->type = cv_sll; -} - -static void cast_to_ull(cval_t *v) -{ - switch(v->type) - { - case cv_sint: v->val.ull = v->val.si; break; - case cv_uint: v->val.ull = v->val.ui; break; - case cv_slong: v->val.ull = v->val.sl; break; - case cv_ulong: v->val.ull = v->val.ul; break; - case cv_sll: break; - case cv_ull: break; - } - v->type = cv_ull; -} - - -static void promote_equal_size(cval_t *v1, cval_t *v2) -{ -#define cv_sizeof(v) ((int)(v->type & SIZE_MASK)) - int s1 = cv_sizeof(v1); - int s2 = cv_sizeof(v2); -#undef cv_sizeof - - if(s1 == s2) - return; - else if(s1 > s2) - { - switch(v1->type) - { - case cv_sint: cast_to_sint(v2); break; - case cv_uint: cast_to_uint(v2); break; - case cv_slong: cast_to_slong(v2); break; - case cv_ulong: cast_to_ulong(v2); break; - case cv_sll: cast_to_sll(v2); break; - case cv_ull: cast_to_ull(v2); break; - } - } - else - { - switch(v2->type) - { - case cv_sint: cast_to_sint(v1); break; - case cv_uint: cast_to_uint(v1); break; - case cv_slong: cast_to_slong(v1); break; - case cv_ulong: cast_to_ulong(v1); break; - case cv_sll: cast_to_sll(v1); break; - case cv_ull: cast_to_ull(v1); break; - } - } -} - - -static int boolean(cval_t *v) -{ - switch(v->type) - { - case cv_sint: return v->val.si != (int)0; - case cv_uint: return v->val.ui != (unsigned int)0; - case cv_slong: return v->val.sl != (long)0; - case cv_ulong: return v->val.ul != (unsigned long)0; - case cv_sll: return v->val.sll != (wrc_sll_t)0; - case cv_ull: return v->val.ull != (wrc_ull_t)0; - } - return 0; -} - -static marg_t *new_marg(char *str, def_arg_t type) -{ - marg_t *ma = pp_xmalloc(sizeof(marg_t)); - if(!ma) - return NULL; - ma->arg = str; - ma->type = type; - ma->nnl = 0; - return ma; -} - -static marg_t *add_new_marg(char *str, def_arg_t type) -{ - marg_t **new_macro_args; - marg_t *ma; - if(!str) - return NULL; - new_macro_args = pp_xrealloc(macro_args, (nmacro_args+1) * sizeof(macro_args[0])); - if(!new_macro_args) - return NULL; - macro_args = new_macro_args; - ma = new_marg(str, type); - if(!ma) - return NULL; - macro_args[nmacro_args] = ma; - nmacro_args++; - return ma; -} - -static int marg_index(char *id) -{ - int t; - if(!id) - return -1; - for(t = 0; t < nmacro_args; t++) - { - if(!strcmp(id, macro_args[t]->arg)) - break; - } - return t < nmacro_args ? t : -1; -} - -static mtext_t *new_mtext(char *str, int idx, def_exp_t type) -{ - mtext_t *mt = pp_xmalloc(sizeof(mtext_t)); - if(!mt) - return NULL; - if(str == NULL) - mt->subst.argidx = idx; - else - mt->subst.text = str; - mt->type = type; - mt->next = mt->prev = NULL; - return mt; -} - -static mtext_t *combine_mtext(mtext_t *tail, mtext_t *mtp) -{ - if(!tail) - return mtp; - - if(!mtp) - return tail; - - if(tail->type == exp_text && mtp->type == exp_text) - { - char *new_text; - new_text = pp_xrealloc(tail->subst.text, strlen(tail->subst.text)+strlen(mtp->subst.text)+1); - if(!new_text) - return mtp; - tail->subst.text = new_text; - strcat(tail->subst.text, mtp->subst.text); - free(mtp->subst.text); - free(mtp); - return tail; - } - - if(tail->type == exp_concat && mtp->type == exp_concat) - { - free(mtp); - return tail; - } - - if(tail->type == exp_concat && mtp->type == exp_text) - { - int len = strlen(mtp->subst.text); - while(len) - { -/* FIXME: should delete space from head of string */ - if(isspace(mtp->subst.text[len-1] & 0xff)) - mtp->subst.text[--len] = '\0'; - else - break; - } - - if(!len) - { - free(mtp->subst.text); - free(mtp); - return tail; - } - } - - if(tail->type == exp_text && mtp->type == exp_concat) - { - int len = strlen(tail->subst.text); - while(len) - { - if(isspace(tail->subst.text[len-1] & 0xff)) - tail->subst.text[--len] = '\0'; - else - break; - } - - if(!len) - { - mtp->prev = tail->prev; - mtp->next = tail->next; - if(tail->prev) - tail->prev->next = mtp; - free(tail->subst.text); - free(tail); - return mtp; - } - } - - tail->next = mtp; - mtp->prev = tail; - - return mtp; -} - -static char *merge_text(char *s1, char *s2) -{ - int l1; - int l2; - char *snew; - if(!s1) - return s2; - if(!s2) - return s1; - l1 = strlen(s1); - l2 = strlen(s2); - snew = pp_xrealloc(s1, l1+l2+1); - if(!snew) - { - free(s2); - return s1; - } - s1 = snew; - memcpy(s1+l1, s2, l2+1); - free(s2); - return s1; -} - diff --git a/reactos/tools/wpp/ppy.tab.h b/reactos/tools/wpp/ppy.tab.h deleted file mode 100644 index 5225bed741d..00000000000 --- a/reactos/tools/wpp/ppy.tab.h +++ /dev/null @@ -1,120 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.4.2. */ - -/* Skeleton interface for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software - Foundation, Inc. - - 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 . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - tRCINCLUDE = 258, - tIF = 259, - tIFDEF = 260, - tIFNDEF = 261, - tELSE = 262, - tELIF = 263, - tENDIF = 264, - tDEFINED = 265, - tNL = 266, - tINCLUDE = 267, - tLINE = 268, - tGCCLINE = 269, - tERROR = 270, - tWARNING = 271, - tPRAGMA = 272, - tPPIDENT = 273, - tUNDEF = 274, - tMACROEND = 275, - tCONCAT = 276, - tELIPSIS = 277, - tSTRINGIZE = 278, - tIDENT = 279, - tLITERAL = 280, - tMACRO = 281, - tDEFINE = 282, - tDQSTRING = 283, - tSQSTRING = 284, - tIQSTRING = 285, - tUINT = 286, - tSINT = 287, - tULONG = 288, - tSLONG = 289, - tULONGLONG = 290, - tSLONGLONG = 291, - tRCINCLUDEPATH = 292, - tLOGOR = 293, - tLOGAND = 294, - tNE = 295, - tEQ = 296, - tGTE = 297, - tLTE = 298, - tRSHIFT = 299, - tLSHIFT = 300 - }; -#endif - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -{ - -/* Line 1685 of yacc.c */ -#line 126 "ppy.y" - - int sint; - unsigned int uint; - long slong; - unsigned long ulong; - wrc_sll_t sll; - wrc_ull_t ull; - int *iptr; - char *cptr; - cval_t cval; - marg_t *marg; - mtext_t *mtext; - - - -/* Line 1685 of yacc.c */ -#line 112 "ppy.tab.h" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - -extern YYSTYPE ppy_lval; - - diff --git a/reactos/tools/wpp/ppy.y b/reactos/tools/wpp/ppy.y deleted file mode 100644 index f2805e1247a..00000000000 --- a/reactos/tools/wpp/ppy.y +++ /dev/null @@ -1,705 +0,0 @@ -/* - * Wrc preprocessor syntax analysis - * - * Copyright 1999-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 - * - * History: - * 24-Apr-2000 BS Restructured the lot to fit the new scanner - * and reintegrate into the wine-tree. - * 01-Jan-2000 BS FIXME: win16 preprocessor calculates with - * 16 bit ints and overflows...? - * 26-Dec-1999 BS Started this file - * - */ - -%{ -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include -#include -#include - -#include "wpp_private.h" - - -#define UNARY_OP(r, v, OP) \ - switch(v.type) \ - { \ - case cv_sint: r.val.si = OP v.val.si; break; \ - case cv_uint: r.val.ui = OP v.val.ui; break; \ - case cv_slong: r.val.sl = OP v.val.sl; break; \ - case cv_ulong: r.val.ul = OP v.val.ul; break; \ - case cv_sll: r.val.sll = OP v.val.sll; break; \ - case cv_ull: r.val.ull = OP v.val.ull; break; \ - } - -#define cv_signed(v) ((v.type & FLAG_SIGNED) != 0) - -#define BIN_OP_INT(r, v1, v2, OP) \ - r.type = v1.type; \ - if(cv_signed(v1) && cv_signed(v2)) \ - r.val.si = v1.val.si OP v2.val.si; \ - else if(cv_signed(v1) && !cv_signed(v2)) \ - r.val.si = v1.val.si OP (signed) v2.val.ui; \ - else if(!cv_signed(v1) && cv_signed(v2)) \ - r.val.si = (signed) v1.val.ui OP v2.val.si; \ - else \ - r.val.ui = v1.val.ui OP v2.val.ui; - -#define BIN_OP_LONG(r, v1, v2, OP) \ - r.type = v1.type; \ - if(cv_signed(v1) && cv_signed(v2)) \ - r.val.sl = v1.val.sl OP v2.val.sl; \ - else if(cv_signed(v1) && !cv_signed(v2)) \ - r.val.sl = v1.val.sl OP (signed long) v2.val.ul; \ - else if(!cv_signed(v1) && cv_signed(v2)) \ - r.val.sl = (signed long) v1.val.ul OP v2.val.sl; \ - else \ - r.val.ul = v1.val.ul OP v2.val.ul; - -#define BIN_OP_LONGLONG(r, v1, v2, OP) \ - r.type = v1.type; \ - if(cv_signed(v1) && cv_signed(v2)) \ - r.val.sll = v1.val.sll OP v2.val.sll; \ - else if(cv_signed(v1) && !cv_signed(v2)) \ - r.val.sll = v1.val.sll OP (wrc_sll_t) v2.val.ull; \ - else if(!cv_signed(v1) && cv_signed(v2)) \ - r.val.sll = (wrc_sll_t) v1.val.ull OP v2.val.sll; \ - else \ - r.val.ull = v1.val.ull OP v2.val.ull; - -#define BIN_OP(r, v1, v2, OP) \ - switch(v1.type & SIZE_MASK) \ - { \ - case SIZE_INT: BIN_OP_INT(r, v1, v2, OP); break; \ - case SIZE_LONG: BIN_OP_LONG(r, v1, v2, OP); break; \ - case SIZE_LONGLONG: BIN_OP_LONGLONG(r, v1, v2, OP); break; \ - default: pp_internal_error(__FILE__, __LINE__, "Invalid type indicator (0x%04x)", v1.type); \ - } - - -/* - * Prototypes - */ -static int boolean(cval_t *v); -static void promote_equal_size(cval_t *v1, cval_t *v2); -static void cast_to_sint(cval_t *v); -static void cast_to_uint(cval_t *v); -static void cast_to_slong(cval_t *v); -static void cast_to_ulong(cval_t *v); -static void cast_to_sll(cval_t *v); -static void cast_to_ull(cval_t *v); -static marg_t *new_marg(char *str, def_arg_t type); -static marg_t *add_new_marg(char *str, def_arg_t type); -static int marg_index(char *id); -static mtext_t *new_mtext(char *str, int idx, def_exp_t type); -static mtext_t *combine_mtext(mtext_t *tail, mtext_t *mtp); -static char *merge_text(char *s1, char *s2); - -/* - * Local variables - */ -static marg_t **macro_args; /* Macro parameters array while parsing */ -static int nmacro_args; - -%} - -%union{ - int sint; - unsigned int uint; - long slong; - unsigned long ulong; - wrc_sll_t sll; - wrc_ull_t ull; - int *iptr; - char *cptr; - cval_t cval; - marg_t *marg; - mtext_t *mtext; -} - -%token tRCINCLUDE -%token tIF tIFDEF tIFNDEF tELSE tELIF tENDIF tDEFINED tNL -%token tINCLUDE tLINE tGCCLINE tERROR tWARNING tPRAGMA tPPIDENT -%token tUNDEF tMACROEND tCONCAT tELIPSIS tSTRINGIZE -%token tIDENT tLITERAL tMACRO tDEFINE -%token tDQSTRING tSQSTRING tIQSTRING -%token tUINT -%token tSINT -%token tULONG -%token tSLONG -%token tULONGLONG -%token tSLONGLONG -%token tRCINCLUDEPATH - -%right '?' ':' -%left tLOGOR -%left tLOGAND -%left '|' -%left '^' -%left '&' -%left tEQ tNE -%left '<' tLTE '>' tGTE -%left tLSHIFT tRSHIFT -%left '+' '-' -%left '*' '/' -%right '~' '!' - -%type pp_expr -%type emargs margs -%type opt_mtexts mtexts mtext -%type allmargs -%type opt_text text - -/* - ************************************************************************** - * The parser starts here - ************************************************************************** - */ - -%% - -pp_file : /* Empty */ - | pp_file preprocessor - ; - -preprocessor - : tINCLUDE tDQSTRING tNL { pp_do_include($2, 1); } - | tINCLUDE tIQSTRING tNL { pp_do_include($2, 0); } - | tIF pp_expr tNL { pp_next_if_state(boolean(&$2)); } - | tIFDEF tIDENT tNL { pp_next_if_state(pplookup($2) != NULL); free($2); } - | tIFNDEF tIDENT tNL { - int t = pplookup($2) == NULL; - if(pp_incl_state.state == 0 && t && !pp_incl_state.seen_junk) - { - pp_incl_state.state = 1; - pp_incl_state.ppp = $2; - pp_incl_state.ifdepth = pp_get_if_depth(); - } - else if(pp_incl_state.state != 1) - { - pp_incl_state.state = -1; - free($2); - } - else - free($2); - pp_next_if_state(t); - if(pp_status.debug) - fprintf(stderr, "tIFNDEF: %s:%d: include_state=%d, include_ppp='%s', include_ifdepth=%d\n", - pp_status.input, pp_status.line_number, pp_incl_state.state, pp_incl_state.ppp, pp_incl_state.ifdepth); - } - | tELIF pp_expr tNL { - pp_if_state_t s = pp_pop_if(); - switch(s) - { - case if_true: - case if_elif: - pp_push_if(if_elif); - break; - case if_false: - pp_push_if(boolean(&$2) ? if_true : if_false); - break; - case if_ignore: - pp_push_if(if_ignore); - break; - case if_elsetrue: - case if_elsefalse: - ppy_error("#elif cannot follow #else"); - break; - case if_error: - break; - default: - pp_internal_error(__FILE__, __LINE__, "Invalid pp_if_state (%d) in #elif directive", s); - } - } - | tELSE tNL { - pp_if_state_t s = pp_pop_if(); - switch(s) - { - case if_true: - pp_push_if(if_elsefalse); - break; - case if_elif: - pp_push_if(if_elif); - break; - case if_false: - pp_push_if(if_elsetrue); - break; - case if_ignore: - pp_push_if(if_ignore); - break; - case if_elsetrue: - case if_elsefalse: - ppy_error("#else clause already defined"); - break; - case if_error: - break; - default: - pp_internal_error(__FILE__, __LINE__, "Invalid pp_if_state (%d) in #else directive", s); - } - } - | tENDIF tNL { - if(pp_pop_if() != if_error) - { - if(pp_incl_state.ifdepth == pp_get_if_depth() && pp_incl_state.state == 1) - { - pp_incl_state.state = 2; - pp_incl_state.seen_junk = 0; - } - else if(pp_incl_state.state != 1) - { - pp_incl_state.state = -1; - } - if(pp_status.debug) - fprintf(stderr, "tENDIF: %s:%d: include_state=%d, include_ppp='%s', include_ifdepth=%d\n", - pp_status.input, pp_status.line_number, pp_incl_state.state, pp_incl_state.ppp, pp_incl_state.ifdepth); - } - } - | tUNDEF tIDENT tNL { pp_del_define($2); free($2); } - | tDEFINE opt_text tNL { pp_add_define($1, $2); free($1); free($2); } - | tMACRO res_arg allmargs tMACROEND opt_mtexts tNL { - pp_add_macro($1, macro_args, nmacro_args, $5); - } - | tLINE tSINT tDQSTRING tNL { if($3) pp_writestring("# %d %s\n", $2 , $3); free($3); } - | tGCCLINE tSINT tDQSTRING tNL { if($3) pp_writestring("# %d %s\n", $2 , $3); free($3); } - | tGCCLINE tSINT tDQSTRING tSINT tNL - { if($3) pp_writestring("# %d %s %d\n", $2, $3, $4); free($3); } - | tGCCLINE tSINT tDQSTRING tSINT tSINT tNL - { if($3) pp_writestring("# %d %s %d %d\n", $2 ,$3, $4, $5); free($3); } - | tGCCLINE tSINT tDQSTRING tSINT tSINT tSINT tNL - { if($3) pp_writestring("# %d %s %d %d %d\n", $2 ,$3 ,$4 ,$5, $6); free($3); } - | tGCCLINE tSINT tDQSTRING tSINT tSINT tSINT tSINT tNL - { if($3) pp_writestring("# %d %s %d %d %d %d\n", $2 ,$3 ,$4 ,$5, $6, $7); free($3); } - | tGCCLINE tNL /* The null-token */ - | tERROR opt_text tNL { ppy_error("#error directive: '%s'", $2); free($2); } - | tWARNING opt_text tNL { ppy_warning("#warning directive: '%s'", $2); free($2); } - | tPRAGMA opt_text tNL { pp_writestring("#pragma %s\n", $2 ? $2 : ""); free($2); } - | tPPIDENT opt_text tNL { if(pp_status.pedantic) ppy_warning("#ident ignored (arg: '%s')", $2); free($2); } - | tRCINCLUDE tRCINCLUDEPATH { - if($2) - { - int nl=strlen($2) +3; - char *fn=pp_xmalloc(nl); - if(fn) - { - sprintf(fn,"\"%s\"",$2); - pp_do_include(fn,1); - } - free($2); - } - } - | tRCINCLUDE tDQSTRING { - pp_do_include($2,1); - } - /*| tNL*/ - ; - -opt_text: /* Empty */ { $$ = NULL; } - | text { $$ = $1; } - ; - -text : tLITERAL { $$ = $1; } - | tDQSTRING { $$ = $1; } - | tSQSTRING { $$ = $1; } - | text tLITERAL { $$ = merge_text($1, $2); } - | text tDQSTRING { $$ = merge_text($1, $2); } - | text tSQSTRING { $$ = merge_text($1, $2); } - ; - -res_arg : /* Empty */ { macro_args = NULL; nmacro_args = 0; } - ; - -allmargs: /* Empty */ { $$ = 0; macro_args = NULL; nmacro_args = 0; } - | emargs { $$ = nmacro_args; } - ; - -emargs : margs { $$ = $1; } - | margs ',' tELIPSIS { $$ = add_new_marg(NULL, arg_list); nmacro_args *= -1; } - ; - -margs : margs ',' tIDENT { $$ = add_new_marg($3, arg_single); } - | tIDENT { $$ = add_new_marg($1, arg_single); } - ; - -opt_mtexts - : /* Empty */ { $$ = NULL; } - | mtexts { - for($$ = $1; $$ && $$->prev; $$ = $$->prev) - ; - } - ; - -mtexts : mtext { $$ = $1; } - | mtexts mtext { $$ = combine_mtext($1, $2); } - ; - -mtext : tLITERAL { $$ = new_mtext($1, 0, exp_text); } - | tDQSTRING { $$ = new_mtext($1, 0, exp_text); } - | tSQSTRING { $$ = new_mtext($1, 0, exp_text); } - | tCONCAT { $$ = new_mtext(NULL, 0, exp_concat); } - | tSTRINGIZE tIDENT { - int mat = marg_index($2); - if(mat < 0) - ppy_error("Stringification identifier must be an argument parameter"); - else - $$ = new_mtext(NULL, mat, exp_stringize); - } - | tIDENT { - int mat = marg_index($1); - if(mat >= 0) - $$ = new_mtext(NULL, mat, exp_subst); - else if($1) - $$ = new_mtext($1, 0, exp_text); - } - ; - -pp_expr : tSINT { $$.type = cv_sint; $$.val.si = $1; } - | tUINT { $$.type = cv_uint; $$.val.ui = $1; } - | tSLONG { $$.type = cv_slong; $$.val.sl = $1; } - | tULONG { $$.type = cv_ulong; $$.val.ul = $1; } - | tSLONGLONG { $$.type = cv_sll; $$.val.sll = $1; } - | tULONGLONG { $$.type = cv_ull; $$.val.ull = $1; } - | tDEFINED tIDENT { $$.type = cv_sint; $$.val.si = pplookup($2) != NULL; } - | tDEFINED '(' tIDENT ')' { $$.type = cv_sint; $$.val.si = pplookup($3) != NULL; } - | tIDENT { $$.type = cv_sint; $$.val.si = 0; } - | pp_expr tLOGOR pp_expr { $$.type = cv_sint; $$.val.si = boolean(&$1) || boolean(&$3); } - | pp_expr tLOGAND pp_expr { $$.type = cv_sint; $$.val.si = boolean(&$1) && boolean(&$3); } - | pp_expr tEQ pp_expr { promote_equal_size(&$1, &$3); BIN_OP($$, $1, $3, ==) } - | pp_expr tNE pp_expr { promote_equal_size(&$1, &$3); BIN_OP($$, $1, $3, !=) } - | pp_expr '<' pp_expr { promote_equal_size(&$1, &$3); BIN_OP($$, $1, $3, <) } - | pp_expr '>' pp_expr { promote_equal_size(&$1, &$3); BIN_OP($$, $1, $3, >) } - | pp_expr tLTE pp_expr { promote_equal_size(&$1, &$3); BIN_OP($$, $1, $3, <=) } - | pp_expr tGTE pp_expr { promote_equal_size(&$1, &$3); BIN_OP($$, $1, $3, >=) } - | pp_expr '+' pp_expr { promote_equal_size(&$1, &$3); BIN_OP($$, $1, $3, +) } - | pp_expr '-' pp_expr { promote_equal_size(&$1, &$3); BIN_OP($$, $1, $3, -) } - | pp_expr '^' pp_expr { promote_equal_size(&$1, &$3); BIN_OP($$, $1, $3, ^) } - | pp_expr '&' pp_expr { promote_equal_size(&$1, &$3); BIN_OP($$, $1, $3, &) } - | pp_expr '|' pp_expr { promote_equal_size(&$1, &$3); BIN_OP($$, $1, $3, |) } - | pp_expr '*' pp_expr { promote_equal_size(&$1, &$3); BIN_OP($$, $1, $3, *) } - | pp_expr '/' pp_expr { promote_equal_size(&$1, &$3); BIN_OP($$, $1, $3, /) } - | pp_expr tLSHIFT pp_expr { promote_equal_size(&$1, &$3); BIN_OP($$, $1, $3, <<) } - | pp_expr tRSHIFT pp_expr { promote_equal_size(&$1, &$3); BIN_OP($$, $1, $3, >>) } - | '+' pp_expr { $$ = $2; } - | '-' pp_expr { UNARY_OP($$, $2, -) } - | '~' pp_expr { UNARY_OP($$, $2, ~) } - | '!' pp_expr { $$.type = cv_sint; $$.val.si = !boolean(&$2); } - | '(' pp_expr ')' { $$ = $2; } - | pp_expr '?' pp_expr ':' pp_expr { $$ = boolean(&$1) ? $3 : $5; } - ; - -%% - -/* - ************************************************************************** - * Support functions - ************************************************************************** - */ - -static void cast_to_sint(cval_t *v) -{ - switch(v->type) - { - case cv_sint: break; - case cv_uint: break; - case cv_slong: v->val.si = v->val.sl; break; - case cv_ulong: v->val.si = v->val.ul; break; - case cv_sll: v->val.si = v->val.sll; break; - case cv_ull: v->val.si = v->val.ull; break; - } - v->type = cv_sint; -} - -static void cast_to_uint(cval_t *v) -{ - switch(v->type) - { - case cv_sint: break; - case cv_uint: break; - case cv_slong: v->val.ui = v->val.sl; break; - case cv_ulong: v->val.ui = v->val.ul; break; - case cv_sll: v->val.ui = v->val.sll; break; - case cv_ull: v->val.ui = v->val.ull; break; - } - v->type = cv_uint; -} - -static void cast_to_slong(cval_t *v) -{ - switch(v->type) - { - case cv_sint: v->val.sl = v->val.si; break; - case cv_uint: v->val.sl = v->val.ui; break; - case cv_slong: break; - case cv_ulong: break; - case cv_sll: v->val.sl = v->val.sll; break; - case cv_ull: v->val.sl = v->val.ull; break; - } - v->type = cv_slong; -} - -static void cast_to_ulong(cval_t *v) -{ - switch(v->type) - { - case cv_sint: v->val.ul = v->val.si; break; - case cv_uint: v->val.ul = v->val.ui; break; - case cv_slong: break; - case cv_ulong: break; - case cv_sll: v->val.ul = v->val.sll; break; - case cv_ull: v->val.ul = v->val.ull; break; - } - v->type = cv_ulong; -} - -static void cast_to_sll(cval_t *v) -{ - switch(v->type) - { - case cv_sint: v->val.sll = v->val.si; break; - case cv_uint: v->val.sll = v->val.ui; break; - case cv_slong: v->val.sll = v->val.sl; break; - case cv_ulong: v->val.sll = v->val.ul; break; - case cv_sll: break; - case cv_ull: break; - } - v->type = cv_sll; -} - -static void cast_to_ull(cval_t *v) -{ - switch(v->type) - { - case cv_sint: v->val.ull = v->val.si; break; - case cv_uint: v->val.ull = v->val.ui; break; - case cv_slong: v->val.ull = v->val.sl; break; - case cv_ulong: v->val.ull = v->val.ul; break; - case cv_sll: break; - case cv_ull: break; - } - v->type = cv_ull; -} - - -static void promote_equal_size(cval_t *v1, cval_t *v2) -{ -#define cv_sizeof(v) ((int)(v->type & SIZE_MASK)) - int s1 = cv_sizeof(v1); - int s2 = cv_sizeof(v2); -#undef cv_sizeof - - if(s1 == s2) - return; - else if(s1 > s2) - { - switch(v1->type) - { - case cv_sint: cast_to_sint(v2); break; - case cv_uint: cast_to_uint(v2); break; - case cv_slong: cast_to_slong(v2); break; - case cv_ulong: cast_to_ulong(v2); break; - case cv_sll: cast_to_sll(v2); break; - case cv_ull: cast_to_ull(v2); break; - } - } - else - { - switch(v2->type) - { - case cv_sint: cast_to_sint(v1); break; - case cv_uint: cast_to_uint(v1); break; - case cv_slong: cast_to_slong(v1); break; - case cv_ulong: cast_to_ulong(v1); break; - case cv_sll: cast_to_sll(v1); break; - case cv_ull: cast_to_ull(v1); break; - } - } -} - - -static int boolean(cval_t *v) -{ - switch(v->type) - { - case cv_sint: return v->val.si != (int)0; - case cv_uint: return v->val.ui != (unsigned int)0; - case cv_slong: return v->val.sl != (long)0; - case cv_ulong: return v->val.ul != (unsigned long)0; - case cv_sll: return v->val.sll != (wrc_sll_t)0; - case cv_ull: return v->val.ull != (wrc_ull_t)0; - } - return 0; -} - -static marg_t *new_marg(char *str, def_arg_t type) -{ - marg_t *ma = pp_xmalloc(sizeof(marg_t)); - if(!ma) - return NULL; - ma->arg = str; - ma->type = type; - ma->nnl = 0; - return ma; -} - -static marg_t *add_new_marg(char *str, def_arg_t type) -{ - marg_t **new_macro_args; - marg_t *ma; - if(!str) - return NULL; - new_macro_args = pp_xrealloc(macro_args, (nmacro_args+1) * sizeof(macro_args[0])); - if(!new_macro_args) - return NULL; - macro_args = new_macro_args; - ma = new_marg(str, type); - if(!ma) - return NULL; - macro_args[nmacro_args] = ma; - nmacro_args++; - return ma; -} - -static int marg_index(char *id) -{ - int t; - if(!id) - return -1; - for(t = 0; t < nmacro_args; t++) - { - if(!strcmp(id, macro_args[t]->arg)) - break; - } - return t < nmacro_args ? t : -1; -} - -static mtext_t *new_mtext(char *str, int idx, def_exp_t type) -{ - mtext_t *mt = pp_xmalloc(sizeof(mtext_t)); - if(!mt) - return NULL; - if(str == NULL) - mt->subst.argidx = idx; - else - mt->subst.text = str; - mt->type = type; - mt->next = mt->prev = NULL; - return mt; -} - -static mtext_t *combine_mtext(mtext_t *tail, mtext_t *mtp) -{ - if(!tail) - return mtp; - - if(!mtp) - return tail; - - if(tail->type == exp_text && mtp->type == exp_text) - { - char *new_text; - new_text = pp_xrealloc(tail->subst.text, strlen(tail->subst.text)+strlen(mtp->subst.text)+1); - if(!new_text) - return mtp; - tail->subst.text = new_text; - strcat(tail->subst.text, mtp->subst.text); - free(mtp->subst.text); - free(mtp); - return tail; - } - - if(tail->type == exp_concat && mtp->type == exp_concat) - { - free(mtp); - return tail; - } - - if(tail->type == exp_concat && mtp->type == exp_text) - { - int len = strlen(mtp->subst.text); - while(len) - { -/* FIXME: should delete space from head of string */ - if(isspace(mtp->subst.text[len-1] & 0xff)) - mtp->subst.text[--len] = '\0'; - else - break; - } - - if(!len) - { - free(mtp->subst.text); - free(mtp); - return tail; - } - } - - if(tail->type == exp_text && mtp->type == exp_concat) - { - int len = strlen(tail->subst.text); - while(len) - { - if(isspace(tail->subst.text[len-1] & 0xff)) - tail->subst.text[--len] = '\0'; - else - break; - } - - if(!len) - { - mtp->prev = tail->prev; - mtp->next = tail->next; - if(tail->prev) - tail->prev->next = mtp; - free(tail->subst.text); - free(tail); - return mtp; - } - } - - tail->next = mtp; - mtp->prev = tail; - - return mtp; -} - -static char *merge_text(char *s1, char *s2) -{ - int l1; - int l2; - char *snew; - if(!s1) - return s2; - if(!s2) - return s1; - l1 = strlen(s1); - l2 = strlen(s2); - snew = pp_xrealloc(s1, l1+l2+1); - if(!snew) - { - free(s2); - return s1; - } - s1 = snew; - memcpy(s1+l1, s2, l2+1); - free(s2); - return s1; -} diff --git a/reactos/tools/wpp/preproc.c b/reactos/tools/wpp/preproc.c deleted file mode 100644 index 99934d69944..00000000000 --- a/reactos/tools/wpp/preproc.c +++ /dev/null @@ -1,762 +0,0 @@ -/* - * Copyright 1998 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 - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include -#include -#include -#include -#ifdef HAVE_UNISTD_H -# include -#endif -#ifdef HAVE_IO_H -# include -#endif - -#include "wine/wpp.h" -#include "wpp_private.h" - -struct pp_status pp_status; - -#define HASHKEY 2039 - -typedef struct pp_def_state -{ - struct pp_def_state *next; - pp_entry_t *defines[HASHKEY]; -} pp_def_state_t; - -static pp_def_state_t *pp_def_state; - -#define MAXIFSTACK 64 -static pp_if_state_t if_stack[MAXIFSTACK]; -static int if_stack_idx = 0; - -#if 0 -void pp_print_status(void) __attribute__((destructor)); -void pp_print_status(void) -{ - int i; - int sum; - int total = 0; - pp_entry_t *ppp; - - fprintf(stderr, "Defines statistics:\n"); - for(i = 0; i < HASHKEY; i++) - { - sum = 0; - for(ppp = pp_def_state->defines[i]; ppp; ppp = ppp->next) - sum++; - total += sum; - if (sum) fprintf(stderr, "%4d, %3d\n", i, sum); - } - fprintf(stderr, "Total defines: %d\n", total); -} -#endif - -void *pp_xmalloc(size_t size) -{ - void *res; - - assert(size > 0); - res = malloc(size); - if(res == NULL) - { - /* Set the error flag */ - pp_status.state = 1; - } - return res; -} - -void *pp_xrealloc(void *p, size_t size) -{ - void *res; - - assert(size > 0); - res = realloc(p, size); - if(res == NULL) - { - /* Set the error flag */ - pp_status.state = 1; - } - return res; -} - -char *pp_xstrdup(const char *str) -{ - char *s; - int len; - - assert(str != NULL); - len = strlen(str)+1; - s = pp_xmalloc(len); - if(!s) - return NULL; - return memcpy(s, str, len); -} - -static char *wpp_default_lookup(const char *name, const char *parent_name, - char **include_path, int include_path_count) -{ - char *cpy; - char *cptr; - char *path; - const char *ccptr; - int i, fd; - - cpy = pp_xmalloc(strlen(name)+1); - if(!cpy) - return NULL; - cptr = cpy; - - for(ccptr = name; *ccptr; ccptr++) - { - /* Convert to forward slash */ - if(*ccptr == '\\') { - /* kill double backslash */ - if(ccptr[1] == '\\') - ccptr++; - *cptr = '/'; - }else { - *cptr = *ccptr; - } - cptr++; - } - *cptr = '\0'; - - if(parent_name) - { - /* Search directory of parent include and then -I path */ - const char *p; - - if ((p = strrchr( parent_name, '/' ))) p++; - else p = parent_name; - path = pp_xmalloc( (p - parent_name) + strlen(cpy) + 1 ); - if(!path) - { - free(cpy); - return NULL; - } - memcpy( path, parent_name, p - parent_name ); - strcpy( path + (p - parent_name), cpy ); - fd = open( path, O_RDONLY ); - if (fd != -1) - { - close( fd ); - free( cpy ); - return path; - } - free( path ); - } - /* Search -I path */ - for(i = 0; i < include_path_count; i++) - { - path = pp_xmalloc(strlen(include_path[i]) + strlen(cpy) + 2); - if(!path) - { - free(cpy); - return NULL; - } - strcpy(path, include_path[i]); - strcat(path, "/"); - strcat(path, cpy); - fd = open( path, O_RDONLY ); - if (fd != -1) - { - close( fd ); - free( cpy ); - return path; - } - free( path ); - } - free( cpy ); - return NULL; -} - -static void *wpp_default_open(const char *filename, int type) { - return fopen(filename,"rt"); -} - -static void wpp_default_close(void *file) { - fclose(file); -} - -static int wpp_default_read(void *file, char *buffer, unsigned int len){ - return fread(buffer, 1, len, file); -} - -static void wpp_default_write( const char *buffer, unsigned int len ) { - fwrite(buffer, 1, len, ppy_out); -} - -/* Don't comment on the hash, its primitive but functional... */ -static int pphash(const char *str) -{ - int sum = 0; - while(*str) - sum += *str++; - return sum % HASHKEY; -} - -pp_entry_t *pplookup(const char *ident) -{ - int idx; - pp_entry_t *ppp; - - if(!ident) - return NULL; - idx = pphash(ident); - for(ppp = pp_def_state->defines[idx]; ppp; ppp = ppp->next) - { - if(!strcmp(ident, ppp->ident)) - return ppp; - } - return NULL; -} - -static void free_pp_entry( pp_entry_t *ppp, int idx ) -{ - if(ppp->iep) - { - if(ppp->iep == pp_includelogiclist) - { - pp_includelogiclist = ppp->iep->next; - if(pp_includelogiclist) - pp_includelogiclist->prev = NULL; - } - else - { - ppp->iep->prev->next = ppp->iep->next; - if(ppp->iep->next) - ppp->iep->next->prev = ppp->iep->prev; - } - free(ppp->iep->filename); - free(ppp->iep); - } - - if(pp_def_state->defines[idx] == ppp) - { - pp_def_state->defines[idx] = ppp->next; - if(pp_def_state->defines[idx]) - pp_def_state->defines[idx]->prev = NULL; - } - else - { - ppp->prev->next = ppp->next; - if(ppp->next) - ppp->next->prev = ppp->prev; - } - - free(ppp); -} - -/* push a new (empty) define state */ -int pp_push_define_state(void) -{ - pp_def_state_t *state = pp_xmalloc( sizeof(*state) ); - if(!state) - return 1; - - memset( state->defines, 0, sizeof(state->defines) ); - state->next = pp_def_state; - pp_def_state = state; - return 0; -} - -/* pop the current define state */ -void pp_pop_define_state(void) -{ - int i; - pp_entry_t *ppp; - pp_def_state_t *state; - - for (i = 0; i < HASHKEY; i++) - { - while ((ppp = pp_def_state->defines[i]) != NULL) free_pp_entry( ppp, i ); - } - state = pp_def_state; - pp_def_state = state->next; - free( state ); -} - -void pp_del_define(const char *name) -{ - pp_entry_t *ppp; - - if((ppp = pplookup(name)) == NULL) - { - if(pp_status.pedantic) - ppy_warning("%s was not defined", name); - return; - } - - free( ppp->ident ); - free( ppp->subst.text ); - free( ppp->filename ); - free_pp_entry( ppp, pphash(name) ); - - if(pp_status.debug) - printf("Deleted (%s, %d) <%s>\n", pp_status.input, pp_status.line_number, name); -} - -pp_entry_t *pp_add_define(const char *def, const char *text) -{ - int len; - char *cptr; - int idx; - pp_entry_t *ppp; - - if(!def) - return NULL; - idx = pphash(def); - if((ppp = pplookup(def)) != NULL) - { - if(pp_status.pedantic) - ppy_warning("Redefinition of %s\n\tPrevious definition: %s:%d", def, ppp->filename, ppp->linenumber); - pp_del_define(def); - } - ppp = pp_xmalloc(sizeof(pp_entry_t)); - if(!ppp) - return NULL; - memset( ppp, 0, sizeof(*ppp) ); - ppp->ident = pp_xstrdup(def); - if(!ppp->ident) - goto error; - ppp->type = def_define; - ppp->subst.text = text ? pp_xstrdup(text) : NULL; - if(text && !ppp->subst.text) - goto error; - ppp->filename = pp_xstrdup(pp_status.input ? pp_status.input : ""); - if(!ppp->filename) - goto error; - ppp->linenumber = pp_status.input ? pp_status.line_number : 0; - ppp->next = pp_def_state->defines[idx]; - pp_def_state->defines[idx] = ppp; - if(ppp->next) - ppp->next->prev = ppp; - if(ppp->subst.text) - { - /* Strip trailing white space from subst text */ - len = strlen(ppp->subst.text); - while(len && strchr(" \t\r\n", ppp->subst.text[len-1])) - { - ppp->subst.text[--len] = '\0'; - } - /* Strip leading white space from subst text */ - for(cptr = ppp->subst.text; *cptr && strchr(" \t\r", *cptr); cptr++) - ; - if(ppp->subst.text != cptr) - memmove(ppp->subst.text, cptr, strlen(cptr)+1); - } - if(pp_status.debug) - printf("Added define (%s, %d) <%s> to <%s>\n", pp_status.input, pp_status.line_number, ppp->ident, ppp->subst.text ? ppp->subst.text : "(null)"); - - return ppp; - -error: - free(ppp->ident); - free(ppp->subst.text); - free(ppp); - return NULL; -} - -pp_entry_t *pp_add_macro(char *id, marg_t *args[], int nargs, mtext_t *exp) -{ - int idx; - pp_entry_t *ppp; - - if(!id) - return NULL; - idx = pphash(id); - if((ppp = pplookup(id)) != NULL) - { - if(pp_status.pedantic) - ppy_warning("Redefinition of %s\n\tPrevious definition: %s:%d", id, ppp->filename, ppp->linenumber); - pp_del_define(id); - } - ppp = pp_xmalloc(sizeof(pp_entry_t)); - if(!ppp) - return NULL; - memset( ppp, 0, sizeof(*ppp) ); - ppp->ident = id; - ppp->type = def_macro; - ppp->margs = args; - ppp->nargs = nargs; - ppp->subst.mtext= exp; - ppp->filename = pp_xstrdup(pp_status.input ? pp_status.input : ""); - if(!ppp->filename) - { - free(ppp); - return NULL; - } - ppp->linenumber = pp_status.input ? pp_status.line_number : 0; - ppp->next = pp_def_state->defines[idx]; - pp_def_state->defines[idx] = ppp; - if(ppp->next) - ppp->next->prev = ppp; - - if(pp_status.debug) - { - fprintf(stderr, "Added macro (%s, %d) <%s(%d)> to <", pp_status.input, pp_status.line_number, ppp->ident, nargs); - for(; exp; exp = exp->next) - { - switch(exp->type) - { - case exp_text: - fprintf(stderr, " \"%s\" ", exp->subst.text); - break; - case exp_stringize: - fprintf(stderr, " #(%d) ", exp->subst.argidx); - break; - case exp_concat: - fprintf(stderr, "##"); - break; - case exp_subst: - fprintf(stderr, " <%d> ", exp->subst.argidx); - break; - } - } - fprintf(stderr, ">\n"); - } - return ppp; -} - - -/* - *------------------------------------------------------------------------- - * Include management - *------------------------------------------------------------------------- - */ -#if defined(_Windows) || defined(__MSDOS__) -#define INCLUDESEPARATOR ";" -#else -#define INCLUDESEPARATOR ":" -#endif - -static char **includepath; -static int nincludepath = 0; - -int wpp_add_include_path(const char *path) -{ - char *tok; - char *cpy = pp_xstrdup(path); - if(!cpy) - return 1; - - tok = strtok(cpy, INCLUDESEPARATOR); - while(tok) - { - if(*tok) { - char *dir; - char *cptr; - char **new_path; - - dir = pp_xstrdup(tok); - if(!dir) - { - free(cpy); - return 1; - } - for(cptr = dir; *cptr; cptr++) - { - /* Convert to forward slash */ - if(*cptr == '\\') - *cptr = '/'; - } - /* Kill eventual trailing '/' */ - if(*(cptr = dir + strlen(dir)-1) == '/') - *cptr = '\0'; - - /* Add to list */ - new_path = pp_xrealloc(includepath, (nincludepath+1) * sizeof(*includepath)); - if(!new_path) - { - free(dir); - free(cpy); - return 1; - } - includepath = new_path; - includepath[nincludepath] = dir; - nincludepath++; - } - tok = strtok(NULL, INCLUDESEPARATOR); - } - free(cpy); - return 0; -} - -char *wpp_find_include(const char *name, const char *parent_name) -{ - return wpp_default_lookup(name, parent_name, includepath, nincludepath); -} - -void *pp_open_include(const char *name, const char *parent_name, char **newpath) -{ - char *path; - void *fp; - - if (!(path = wpp_callbacks->lookup(name, parent_name, includepath, - nincludepath))) return NULL; - fp = wpp_callbacks->open(path, parent_name == NULL ? 1 : 0); - - if (fp) - { - if (pp_status.debug) - printf("Going to include <%s>\n", path); - if (newpath) *newpath = path; - else free( path ); - return fp; - } - free( path ); - return NULL; -} - -/* - *------------------------------------------------------------------------- - * #if, #ifdef, #ifndef, #else, #elif and #endif state management - * - * #if state transitions are made on basis of the current TOS and the next - * required state. The state transitions are required to housekeep because - * #if:s can be nested. The ignore case is activated to prevent output from - * within a false clause. - * Some special cases come from the fact that the #elif cases are not - * binary, but three-state. The problem is that all other elif-cases must - * be false when one true one has been found. A second problem is that the - * #else clause is a final clause. No extra #else:s may follow. - * - * The states mean: - * if_true Process input to output - * if_false Process input but no output - * if_ignore Process input but no output - * if_elif Process input but no output - * if_elsefalse Process input but no output - * if_elsettrue Process input to output - * - * The possible state-sequences are [state(stack depth)] (rest can be deduced): - * TOS #if 1 #else #endif - * if_true(n) if_true(n+1) if_elsefalse(n+1) - * if_false(n) if_ignore(n+1) if_ignore(n+1) - * if_elsetrue(n) if_true(n+1) if_elsefalse(n+1) - * if_elsefalse(n) if_ignore(n+1) if_ignore(n+1) - * if_elif(n) if_ignore(n+1) if_ignore(n+1) - * if_ignore(n) if_ignore(n+1) if_ignore(n+1) - * - * TOS #if 1 #elif 0 #else #endif - * if_true(n) if_true(n+1) if_elif(n+1) if_elif(n+1) - * if_false(n) if_ignore(n+1) if_ignore(n+1) if_ignore(n+1) - * if_elsetrue(n) if_true(n+1) if_elif(n+1) if_elif(n+1) - * if_elsefalse(n) if_ignore(n+1) if_ignore(n+1) if_ignore(n+1) - * if_elif(n) if_ignore(n+1) if_ignore(n+1) if_ignore(n+1) - * if_ignore(n) if_ignore(n+1) if_ignore(n+1) if_ignore(n+1) - * - * TOS #if 0 #elif 1 #else #endif - * if_true(n) if_false(n+1) if_true(n+1) if_elsefalse(n+1) - * if_false(n) if_ignore(n+1) if_ignore(n+1) if_ignore(n+1) - * if_elsetrue(n) if_false(n+1) if_true(n+1) if_elsefalse(n+1) - * if_elsefalse(n) if_ignore(n+1) if_ignore(n+1) if_ignore(n+1) - * if_elif(n) if_ignore(n+1) if_ignore(n+1) if_ignore(n+1) - * if_ignore(n) if_ignore(n+1) if_ignore(n+1) if_ignore(n+1) - * - *------------------------------------------------------------------------- - */ -static const char * const pp_if_state_str[] = { - "if_false", - "if_true", - "if_elif", - "if_elsefalse", - "if_elsetrue", - "if_ignore" -}; - -void pp_push_if(pp_if_state_t s) -{ - if(if_stack_idx >= MAXIFSTACK) - pp_internal_error(__FILE__, __LINE__, "#if-stack overflow; #{if,ifdef,ifndef} nested too deeply (> %d)", MAXIFSTACK); - - if(pp_flex_debug) - fprintf(stderr, "Push if %s:%d: %s(%d) -> %s(%d)\n", pp_status.input, pp_status.line_number, pp_if_state_str[pp_if_state()], if_stack_idx, pp_if_state_str[s], if_stack_idx+1); - - if_stack[if_stack_idx++] = s; - - switch(s) - { - case if_true: - case if_elsetrue: - break; - case if_false: - case if_elsefalse: - case if_elif: - case if_ignore: - pp_push_ignore_state(); - break; - default: - pp_internal_error(__FILE__, __LINE__, "Invalid pp_if_state (%d)", (int)pp_if_state()); - } -} - -pp_if_state_t pp_pop_if(void) -{ - if(if_stack_idx <= 0) - { - ppy_error("#{endif,else,elif} without #{if,ifdef,ifndef} (#if-stack underflow)"); - return if_error; - } - - switch(pp_if_state()) - { - case if_true: - case if_elsetrue: - break; - case if_false: - case if_elsefalse: - case if_elif: - case if_ignore: - pp_pop_ignore_state(); - break; - default: - pp_internal_error(__FILE__, __LINE__, "Invalid pp_if_state (%d)", (int)pp_if_state()); - } - - if(pp_flex_debug) - fprintf(stderr, "Pop if %s:%d: %s(%d) -> %s(%d)\n", - pp_status.input, - pp_status.line_number, - pp_if_state_str[pp_if_state()], - if_stack_idx, - pp_if_state_str[if_stack[if_stack_idx <= 1 ? if_true : if_stack_idx-2]], - if_stack_idx-1); - - return if_stack[--if_stack_idx]; -} - -pp_if_state_t pp_if_state(void) -{ - if(!if_stack_idx) - return if_true; - else - return if_stack[if_stack_idx-1]; -} - - -void pp_next_if_state(int i) -{ - switch(pp_if_state()) - { - case if_true: - case if_elsetrue: - pp_push_if(i ? if_true : if_false); - break; - case if_false: - case if_elsefalse: - case if_elif: - case if_ignore: - pp_push_if(if_ignore); - break; - default: - pp_internal_error(__FILE__, __LINE__, "Invalid pp_if_state (%d) in #{if,ifdef,ifndef} directive", (int)pp_if_state()); - } -} - -int pp_get_if_depth(void) -{ - return if_stack_idx; -} - -/* #define WANT_NEAR_INDICATION */ - -static void generic_msg(const char *s, const char *t, const char *n, va_list ap) -{ - fprintf(stderr, "%s:%d:%d: %s: ", pp_status.input ? pp_status.input : "stdin", - pp_status.line_number, pp_status.char_number, t); - vfprintf(stderr, s, ap); -#ifdef WANT_NEAR_INDICATION - { - char *cpy, *p; - if(n) - { - cpy = pp_xstrdup(n); - if(!cpy) - goto end; - for (p = cpy; *p; p++) if(!isprint(*p)) *p = ' '; - fprintf(stderr, " near '%s'", cpy); - free(cpy); - } - } -end: -#endif - fprintf(stderr, "\n"); -} - -static void wpp_default_error(const char *file, int line, int col, const char *near, const char *msg, va_list ap) -{ - generic_msg(msg, "Error", near, ap); - exit(1); -} - -static void wpp_default_warning(const char *file, int line, int col, const char *near, const char *msg, va_list ap) -{ - generic_msg(msg, "Warning", near, ap); -} - -static const struct wpp_callbacks default_callbacks = -{ - wpp_default_lookup, - wpp_default_open, - wpp_default_close, - wpp_default_read, - wpp_default_write, - wpp_default_error, - wpp_default_warning, -}; - -const struct wpp_callbacks *wpp_callbacks = &default_callbacks; - -int ppy_error(const char *s, ...) -{ - va_list ap; - va_start(ap, s); - wpp_callbacks->error(pp_status.input, pp_status.line_number, pp_status.char_number, ppy_text, s, ap); - va_end(ap); - pp_status.state = 1; - return 1; -} - -int ppy_warning(const char *s, ...) -{ - va_list ap; - va_start(ap, s); - wpp_callbacks->warning(pp_status.input, pp_status.line_number, pp_status.char_number, ppy_text, s, ap); - va_end(ap); - return 0; -} - -void pp_internal_error(const char *file, int line, const char *s, ...) -{ - va_list ap; - va_start(ap, s); - fprintf(stderr, "Internal error (please report) %s %d: ", file, line); - vfprintf(stderr, s, ap); - fprintf(stderr, "\n"); - va_end(ap); - exit(3); -} diff --git a/reactos/tools/wpp/wpp.c b/reactos/tools/wpp/wpp.c deleted file mode 100644 index 0c9c80852ea..00000000000 --- a/reactos/tools/wpp/wpp.c +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Exported functions of the Wine preprocessor - * - * Copyright 1998 Bertho A. Stultiens - * Copyright 2002 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 - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include - -#include "wpp_private.h" -#include "wine/wpp.h" - -int ppy_debug, pp_flex_debug; - -struct define -{ - struct define *next; - char *name; - char *value; -}; - -static struct define *cmdline_defines; - -static void add_cmdline_defines(void) -{ - struct define *def; - - for (def = cmdline_defines; def; def = def->next) - { - if (def->value) pp_add_define( def->name, def->value ); - } -} - -static void add_special_defines(void) -{ - time_t now = time(NULL); - pp_entry_t *ppp; - char buf[32]; - - strftime(buf, sizeof(buf), "\"%b %d %Y\"", localtime(&now)); - pp_add_define( "__DATE__", buf ); - - strftime(buf, sizeof(buf), "\"%H:%M:%S\"", localtime(&now)); - pp_add_define( "__TIME__", buf ); - - ppp = pp_add_define( "__FILE__", "" ); - if(ppp) - ppp->type = def_special; - - ppp = pp_add_define( "__LINE__", "" ); - if(ppp) - ppp->type = def_special; -} - - -/* add a define to the preprocessor list */ -int wpp_add_define( const char *name, const char *value ) -{ - struct define *def; - - if (!value) value = ""; - - for (def = cmdline_defines; def; def = def->next) - { - if (!strcmp( def->name, name )) - { - char *new_value = pp_xstrdup(value); - if(!new_value) - return 1; - free( def->value ); - def->value = new_value; - - return 0; - } - } - - def = pp_xmalloc( sizeof(*def) ); - if(!def) - return 1; - def->next = cmdline_defines; - def->name = pp_xstrdup(name); - if(!def->name) - { - free(def); - return 1; - } - def->value = pp_xstrdup(value); - if(!def->value) - { - free(def->name); - free(def); - return 1; - } - cmdline_defines = def; - return 0; -} - - -/* undefine a previously added definition */ -void wpp_del_define( const char *name ) -{ - struct define *def; - - for (def = cmdline_defines; def; def = def->next) - { - if (!strcmp( def->name, name )) - { - free( def->value ); - def->value = NULL; - return; - } - } -} - - -/* add a command-line define of the form NAME=VALUE */ -int wpp_add_cmdline_define( const char *value ) -{ - char *p; - char *str = pp_xstrdup(value); - if(!str) - return 1; - p = strchr( str, '=' ); - if (p) *p++ = 0; - wpp_add_define( str, p ); - free( str ); - return 0; -} - - -/* set the various debug flags */ -void wpp_set_debug( int lex_debug, int parser_debug, int msg_debug ) -{ - pp_flex_debug = lex_debug; - ppy_debug = parser_debug; - pp_status.debug = msg_debug; -} - - -/* set the pedantic mode */ -void wpp_set_pedantic( int on ) -{ - pp_status.pedantic = on; -} - - -/* the main preprocessor parsing loop */ -int wpp_parse( const char *input, FILE *output ) -{ - int ret; - - pp_status.input = NULL; - pp_status.line_number = 1; - pp_status.char_number = 1; - pp_status.state = 0; - - ret = pp_push_define_state(); - if(ret) - return ret; - add_cmdline_defines(); - add_special_defines(); - - if (!input) pp_status.file = stdin; - else if (!(pp_status.file = wpp_callbacks->open(input, 1))) - { - ppy_error("Could not open %s\n", input); - pp_pop_define_state(); - return 2; - } - - pp_status.input = input; - - ppy_out = output; - pp_writestring("# 1 \"%s\" 1\n", input ? input : ""); - - ret = ppy_parse(); - /* If there were errors during processing, return an error code */ - if (!ret && pp_status.state) ret = pp_status.state; - - if (input) wpp_callbacks->close(pp_status.file); - /* Clean if_stack, it could remain dirty on errors */ - while (pp_get_if_depth()) pp_pop_if(); - pp_pop_define_state(); - return ret; -} - - -void wpp_set_callbacks( const struct wpp_callbacks *callbacks ) -{ - wpp_callbacks = callbacks; -} diff --git a/reactos/tools/wpp/wpp.rbuild b/reactos/tools/wpp/wpp.rbuild deleted file mode 100644 index 360aae86b7b..00000000000 --- a/reactos/tools/wpp/wpp.rbuild +++ /dev/null @@ -1,8 +0,0 @@ - - - - lex.yy.c - preproc.c - wpp.c - ppy.tab.c - diff --git a/reactos/tools/wpp/wpp_private.h b/reactos/tools/wpp/wpp_private.h deleted file mode 100644 index 288d709be36..00000000000 --- a/reactos/tools/wpp/wpp_private.h +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Copyright 1998 Bertho A. Stultiens (BS) - * Copyright 2002 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_WPP_PRIVATE_H -#define __WINE_WPP_PRIVATE_H - -#ifndef __WINE_CONFIG_H -# error You must include config.h to use this header -#endif - -#include -#include - -struct pp_entry; /* forward */ -/* - * Include logic - * A stack of files which are already included and - * are protected in the #ifndef/#endif way. - */ -typedef struct includelogicentry { - struct includelogicentry *next; - struct includelogicentry *prev; - struct pp_entry *ppp; /* The define which protects the file */ - char *filename; /* The filename of the include */ -} includelogicentry_t; - -/* - * The arguments of a macrodefinition - */ -typedef enum { - arg_single, - arg_list -} def_arg_t; - -typedef struct marg { - def_arg_t type; /* Normal or ... argument */ - char *arg; /* The textual argument */ - int nnl; /* Number of newlines in the text to subst */ -} marg_t; - -/* - * The expansiontext of a macro - */ -typedef enum { - exp_text, /* Simple text substitution */ - exp_concat, /* Concat (##) operator requested */ - exp_stringize, /* Stringize (#) operator requested */ - exp_subst /* Substitute argument */ -} def_exp_t; - -typedef struct mtext { - struct mtext *next; - struct mtext *prev; - def_exp_t type; - union { - char *text; - int argidx; /* For exp_subst and exp_stringize reference */ - } subst; -} mtext_t; - -/* - * The define descriptor - */ -typedef enum { - def_none, /* Not-a-define; used as return value */ - def_define, /* Simple defines */ - def_macro, /* Macro defines */ - def_special /* Special expansions like __LINE__ and __FILE__ */ -} def_type_t; - -typedef struct pp_entry { - struct pp_entry *next; - struct pp_entry *prev; - def_type_t type; /* Define or macro */ - char *ident; /* The key */ - marg_t **margs; /* Macro arguments array or NULL if none */ - int nargs; - union { - mtext_t *mtext; /* The substitution sequence or NULL if none */ - char *text; - } subst; - int expanding; /* Set when feeding substitution into the input */ - char *filename; /* Filename where it was defined */ - int linenumber; /* Linenumber where it was defined */ - includelogicentry_t *iep; /* Points to the include it protects */ -} pp_entry_t; - - -/* - * If logic - */ -#define MAXIFSTACK 64 /* If this isn't enough you should alter the source... */ - -typedef enum { - if_false, - if_true, - if_elif, - if_elsefalse, - if_elsetrue, - if_ignore, - if_error -} pp_if_state_t; - - -/* - * Trace the include files to prevent double reading. - * This save 20..30% of processing time for most stuff - * that uses complex includes. - * States: - * -1 Don't track or seen junk - * 0 New include, waiting for "#ifndef __xxx_h" - * 1 Seen #ifndef, waiting for "#define __xxx_h ..." - * 2 Seen #endif, waiting for EOF - */ -typedef struct -{ - int state; - char *ppp; /* The define to be set from the #ifndef */ - int ifdepth; /* The level of ifs at the #ifdef */ - int seen_junk; /* Set when junk is seen */ -} include_state_t; - - -/* - * If the configure says we have long long then we can use it. Presumably - * if we have long long then we have strtoull and strtoll too. If that is - * not the case we will need to add to the configure tests. - * If we do not have long long , then we revert to a simple 'long' for now. - * This should prevent most unexpected things with other compilers than - * gcc and egcs for now. - * In the future it should be possible to use another way, like a - * structure, so that we can emulate the MS compiler. - */ -#ifdef HAVE_LONG_LONG -typedef long long wrc_sll_t; -typedef unsigned long long wrc_ull_t; -#else -typedef long wrc_sll_t; -typedef unsigned long wrc_ull_t; -#endif - -#define SIZE_CHAR 1 -#define SIZE_SHORT 2 -#define SIZE_INT 3 -#define SIZE_LONG 4 -#define SIZE_LONGLONG 5 -#define SIZE_MASK 0x00ff -#define FLAG_SIGNED 0x0100 - -typedef enum { -#if 0 - cv_schar = SIZE_CHAR + FLAG_SIGNED, - cv_uchar = SIZE_CHAR, - cv_sshort = SIZE_SHORT + FLAG_SIGNED, - cv_ushort = SIZE_SHORT, -#endif - cv_sint = SIZE_INT + FLAG_SIGNED, - cv_uint = SIZE_INT, - cv_slong = SIZE_LONG + FLAG_SIGNED, - cv_ulong = SIZE_LONG, - cv_sll = SIZE_LONGLONG + FLAG_SIGNED, - cv_ull = SIZE_LONGLONG -} ctype_t; - -typedef struct cval { - ctype_t type; - union { -#if 0 - signed char sc; /* Explicitly signed because compilers are stupid */ - unsigned char uc; - short ss; - unsigned short us; -#endif - int si; - unsigned int ui; - long sl; - unsigned long ul; - wrc_sll_t sll; - wrc_ull_t ull; - } val; -} cval_t; - - - -void *pp_xmalloc(size_t); -void *pp_xrealloc(void *, size_t); -char *pp_xstrdup(const char *str); -pp_entry_t *pplookup(const char *ident); -int pp_push_define_state(void); -void pp_pop_define_state(void); -pp_entry_t *pp_add_define(const char *def, const char *text); -pp_entry_t *pp_add_macro(char *ident, marg_t *args[], int nargs, mtext_t *exp); -void pp_del_define(const char *name); -void *pp_open_include(const char *name, const char *parent_name, char **newpath); -void pp_push_if(pp_if_state_t s); -void pp_next_if_state(int); -pp_if_state_t pp_pop_if(void); -pp_if_state_t pp_if_state(void); -int pp_get_if_depth(void); - -#ifndef __GNUC__ -#define __attribute__(x) /*nothing*/ -#endif - -extern const struct wpp_callbacks *wpp_callbacks; - -int ppy_error(const char *s, ...) __attribute__((format (printf, 1, 2))); -int ppy_warning(const char *s, ...) __attribute__((format (printf, 1, 2))); -void pp_internal_error(const char *file, int line, const char *s, ...) __attribute__((format (printf, 3, 4))); - -/* current preprocessor state */ -/* everything is in this structure to avoid polluting the global symbol space */ -struct pp_status -{ - const char *input; /* current input file name */ - void *file; /* current input file descriptor */ - int line_number; /* current line number */ - int char_number; /* current char number in line */ - int state; /* current error state */ - int pedantic; /* pedantic option */ - int debug; /* debug messages flag */ -}; - -extern struct pp_status pp_status; -extern include_state_t pp_incl_state; -extern includelogicentry_t *pp_includelogiclist; - -/* - * From ppl.l - */ -extern FILE *ppy_in; -extern FILE *ppy_out; -extern char *ppy_text; -extern int pp_flex_debug; -int ppy_lex(void); - -void pp_do_include(char *fname, int type); -void pp_push_ignore_state(void); -void pp_pop_ignore_state(void); - -void pp_writestring(const char *format, ...) __attribute__((format (printf, 1, 2))); - -/* - * From ppy.y - */ -int ppy_parse(void); -extern int ppy_debug; - -#endif /* __WINE_WPP_PRIVATE_H */ diff --git a/reactos/tools/wpp/wpp_ros.diff b/reactos/tools/wpp/wpp_ros.diff deleted file mode 100644 index 44cc0b9d513..00000000000 --- a/reactos/tools/wpp/wpp_ros.diff +++ /dev/null @@ -1,20 +0,0 @@ -Index: preproc.c -=================================================================== ---- preproc.c (revision 28293) -+++ preproc.c (revision 28294) -@@ -328,6 +328,15 @@ - char *tok; - char *cpy = pp_xstrdup(path); - -+ /* check for absolute windows paths */ -+ if (strchr(cpy, ':') != NULL) -+ { -+ nincludepath++; -+ includepath = pp_xrealloc(includepath, nincludepath * sizeof(*includepath)); -+ includepath[nincludepath-1] = cpy; -+ return; -+ } -+ - tok = strtok(cpy, INCLUDESEPARATOR); - while(tok) - { diff --git a/reactos/tools/wrc/CHANGES b/reactos/tools/wrc/CHANGES deleted file mode 100644 index 766ecdab691..00000000000 --- a/reactos/tools/wrc/CHANGES +++ /dev/null @@ -1,336 +0,0 @@ ---------------------------------------------------------------------------- -Version 1.1.9 (31-Dec-2000) - -Ulrich Weigand -- Fixed a byteorder conversion problem with message tables. -- Carefully read and write (possibly) misaligned data elements - to avoid crashes on architectures where this is not allowed. - ---------------------------------------------------------------------------- -Version 1.1.8 (24-Aug-2000) - -Bertho Stultiens -- Fixed a LALR(2) problem while scanning usertype resources which - had identifiers for both name and type. - ---------------------------------------------------------------------------- -Version 1.1.7 (24-Jul-2000) - -Bertho Stultiens -- Implemented a bug-work-arround for Berkeley yacc (byacc) which - does not generate proper default transition rules for non-terminals. - See comments in parser.y how the fix works. -- Changed the error-line/char position to make emacs happy parsing - the position of the error. -- Added comments in the documentation in which order the line-numer - and character-position of the error is written. - ---------------------------------------------------------------------------- -Version 1.1.6 (05-Jun-2000) - -Bertho Stultiens -- Bugfix: Macro expansion of strings would assert an internal error - or a segfault due to a lacking '\0' in the expansion. -- Bugfix: Prevent buffer overflow in reallocation of macro expansion - buffers. -- Bugfix: Wrc's version information was not passed as numerical to the - preprocessor due to an error in the definition of the macro. -- Relaxed the newline constraint in global LANGUAGE statements, which - was introduced in version 1.1.3, so that some fancy preprocessor - constructs can work. -- Removed the gcc-style #line handling from the resource-parser to the - resource-scanner so that it is possible to include files at any stage - of the source, independent of the parser-state. -- Bugfix: Stringtables were not correctly searched for duplicates - because the language comparison disregarded the sublanguage. -- Eliminated a repetitive warning when writing stringtables with zero - length string entries. These are perfectly valid (but make no sense:-). - Warning are now only generated during parse in pedantic mode. - ---------------------------------------------------------------------------- -Version 1.1.5 (12-Jun-2000) - -Bertho Stultiens -- Bugfix: Corrected "off by one" error in the linenumber while parsing - resource. -- Bugfix: A segfault would occur if messagetables were parsed without - memory options attached. Also added buffer-overflow safeguard while - converting between byteorders. -- Finished remapping usertype resources onto standars types by tricking - the parser into accepting a different token. The remapping can be - disabled with a new commandline option '-m'. -- Resolved some warning about chars used as index on SGI O2 machine - (the ctype isXXX() routines are macros there). - ---------------------------------------------------------------------------- -Version 1.1.4 (07-Jun-2000) - -Bertho Stultiens -- Implemented MESSAGETABLE resource type. -- Usertype resources that cause a type-clash with defined resources - are now detected and a warning is generated. Some types should be - rerouted through other code so that they will be (re-)interpreted. -- Bugfix: Line-continuation in strings in resources include a newline. - This `feature' got deleted with the builtin preprocessor, but has been - put back into place (see last changes comment from version 1.1.0). -- Bugfix: The preprocessor now correctly will see "\\\r\n" as a line- - continuation. -- Bugfix: Assemblers on some platforms do not use 16bit quantities - for `.word'. This directive is now changed into `.short'. -- All types that accept inline data definitions (a la RCDATA) now - also accept a file specification. This unifies the structure a bit. - ---------------------------------------------------------------------------- -Version 1.1.3 (21-May-2000) - -Bertho Stultiens -- Implemented animated cursors and icons resource types. -- Added partial support for font resources (user supplied fontdir is - required). -- All resources with inline data (a la RCDATA) now support language, - version and characteristics data. -- Implemented resource name duplicate checks. It is now an error if - two resources of the same type have the same name. -- Bugfix: Language propagation was not correct when .res files were - generated. -- Bugfix: VERSIONINFO now handles memory options. -- Bugfix: resource names and the resource type may be equal (e.g. MENU - MENU {...}). This support was mistakingly deleted in the upgrade to - the builtin preprocessor. - The standalone LANGUAGE setting became context sensitive as a consequence - of this. Now it *must* end with a newline *after* both expressions and - no newlines are allowed within the line (the statement must fit on one - line). This is no practical problem though. - -Patrik Stridvall -- Fixed byte order on Solaris and FreeBSD. - ---------------------------------------------------------------------------- -Version 1.1.2 (08-May-2000) - -Bertho Stultiens -- Bugfix: Corrected a SEGV in the rawdata handling. Mistakingly took the - address of a pointer instead of its value. This probably slipped in - during the merge of my tree into the winetree. - Lesson learned: always double check. -- Verified most resources so that win16 compile also generates correct - output for reversed endian. - ---------------------------------------------------------------------------- -Version 1.1.1 (07-May-2000) - -Bertho Stultiens -- Implemented byte-ordering for resources. All resources can be forced - to be little-, big- or native endian with command-line option -B. -- Reading resources from .res-files are only accepted in native byte- - ordering so that no additional semantic analysis is required. -- Resource directory is still written in native-only format, including - the strings. -- Wrc is now installed through the makefile with 'make install' and also - uninstalled with 'make uninstall'. -- Wrote a man-page for better reference. The manpage also gets installed - and uninstalled. -- Cleaned up the namespace a bit by more agressive use of static. - ---------------------------------------------------------------------------- -Version 1.1.0 (01-May-2000) - -Bertho Stultiens -- Implemented a new preprocessor that is (nearly) ANSI-C compliant. The - old parser has been stripped from the old preprocessor-code which - cleaned up both resource-scanner and -parser. -- Standard defines have been introduced (see README.wrc) -- Both preprocessor- and resource-scanner have been optimized slightly - so that no backing up is required (one char lookahead is enough). -- Filename-scanning has been cleaned up, though not perfect yet. -- User-type resources are compatible now. -- Line-continuation in strings is corrected so that it does not - introduce a newline in the output. - ---------------------------------------------------------------------------- -Version 1.0.18 (28-Dec-1999) - -Bertho Stultiens -- Bugfix: The named resources were not named correctly for indirectly - addressable resources, which resulted in an undefined variable. The - previous fix was incomplete (I was probably sleeping while I made it). - ---------------------------------------------------------------------------- -Version 1.0.17 (20-Dec-1999) - -Bertho Stultiens -- Bugfix: Named resources of different types generated the same assembly- - label twice, resulting in a compile failure. - ---------------------------------------------------------------------------- -Version 1.0.16 (6-Nov-1999) - -Juergen.Schmied@debitel.net -- Bugfix: Styles were evaluated as expressions. The NOT in combination - with style flags was not overwriting the default styles like WS_VISIBLE. - Solved by introducing own rules for parsing styles. - ---------------------------------------------------------------------------- -Version 1.0.15 (13-Aug-1999) - -Bertho Stultiens -- Bugfix: IDs were not checked which resulted in numbers > 2^16-1 being - accepted as IDs. This resulted in duplicate IDs and all other sort of - trouble. - ---------------------------------------------------------------------------- -Version 1.0.14 (08-Aug-1999) - -Bertho Stultiens -- Deeply ashamed that I thought that flex had a bug. Of course my own fault - not recognizing unmatched text in start condition yyrcd and pp_strip[ps]. - There is a catch all rule now in the flexer with a warning to mark the - condition and promptly revealed errors in the wine-headers. - ---------------------------------------------------------------------------- -Version 1.0.13 (08-Aug-1999) - -Bertho Stultiens -- Fixed uppercase conversion of titles in dialog controls which was - introduced with the icon changes. -- Fixed strings longer than 1024 bytes/shorts by autosizing the array. A - warning is issued whenever more than 64k is allocated. -- Made a workarround for a flex bug where an ECHO put '\\' and '\n' - characters on the screen. - ---------------------------------------------------------------------------- -Version 1.0.12 (18-Jul-1999) - -Bertho Stultiens -- Generalized the distinction between 2 and 4 byte integers slightly through - a new parser state. The is now a warning when a 2 byte integer is larger - than 16 bit (and is truncated). -- Fixed a couple of cosmetic things in the DLGINIT stuff so that dumping of - this type will work as expected. -- Added generalized language/version/characteristics support to the DLGINIT - resource type. - -Ulrich Czekalla -- Added support for DLGINIT resource-type. -- Added string continuation and embedded quoting. -- Added numeric IDs for icons in controls. - -Eric Pouech -- Bugfix: Distinguish between 2 and 4 byte integers in RCDATA. - ---------------------------------------------------------------------------- -Version 1.0.11 (22-Apr-1999) - -Bertho Stultiens -- Fixed a counting bug in the win32 count and sort routine. -- Fixed sort order of resources (must be name before ordinal). -- Shuffled a couple of global variables so that built-in dlls now can - load resources through the proper PE interface. - ---------------------------------------------------------------------------- -Version 1.0.10 (18-Feb-1999) - -Alexandre Julliard -- Fixed the TIME_LONG ugliness. - -David Luyer -- Added string.h include in newstruc.c for compilation on 64bit platforms. -- Added TIME_LONG to support time_t==int in printf formats on alpha - platforms. - -Bertho Stultiens -- Added some more use of TIME_LONG in implicit format used in header-file - generation. -- Removed the windows.h include and replaced it with wintypes.h in - wrctypes.h and added winuser.h in two other sources. This cuts compilation - time by a factor of 2 and final executable size with debug by a factor 2.5. - ---------------------------------------------------------------------------- -Version 1.0.9 (01-Feb-1999) - -Albert den Haan : -- Fixed wrong order of res_ico and res_bmp which must be in RT_xxx order. - ---------------------------------------------------------------------------- -Version 1.0.8 (10-Jan-1999) - -Albert den Haan : -- Added TOOLBAR support. -- Buffer overflow fix in strncpyWtoA. -- Open embedded files in resource definitions through the include path from - the commandline. -- Support named icons in dialogs with unquoted names - -Bertho Stultiens -- Fixed a major bug in the language propagation in the parser. The parser - did not copy the current language while binding it to a resource structure - causing wrong sorting if multiple global languages were in use and was a - potential segfault because the pointer might not be valid. -- Added language/version/characteristics support for toolbar. -- Moved some defines from wrc.h to wrctypes.h to support in toolbars. -- Removed function stricmp from source and replaced with native function - strcasecmp. -- Allocate cursor and icon ordinals according to the language of the item to - decrease the amount of ordinals in use. This reduces the resource - directory size by reducing the tree size. -- Versions 1.0.5 through 1.0.7 were never committed to cvs but were available - for download from an alternate site for elf-dll test generation. - ---------------------------------------------------------------------------- -Version 1.0.7 (19-Dec-1998) -- Changed a couple of labels that are used by dllglue. Also reversed a patch - that made wrc's generated code dependent on dllglue's code. - ---------------------------------------------------------------------------- -Version 1.0.6 (12-Dec-1998) -- Fixed the _PEResTab table where incorrect RVA's were put in the table. - The dllglue should now be merged into wrc for correct labels and the least - number of loadtime fixups. - ---------------------------------------------------------------------------- -Version 1.0.5 (12-Dec-1998) -- Fixed an omited .globl statement for dllglue linking. - ---------------------------------------------------------------------------- -Version 1.0.4 (10-Dec-1998) -- Added a global label for elf-dll linking and a long with the resource - size and a long with the directory size. -- Killed an annoying warning since version 1.0.0 in parser.y about a - var being used before init. - ---------------------------------------------------------------------------- -Version 1.0.3 (02-Nov-1998) -- Bugfix in write_name_str() [writeres.c] where the length byte/word was - wrongly counted in the length of the string. - Thanks to Ulrich Weigand - ---------------------------------------------------------------------------- -Version 1.0.2 (20-Jun-1998) -- Started this file -- Fixed a bug in filename scanning when they are double quoted. The code now - is compatible with MS' rc and Borland's brc. There is a compromise in the - filenames because of case-sensitivity under *nix. -- Backslashes in a filepath are now converted to forward slashes and double -- Fixed a bug in printing the filename if loading of a file should fail. - backslashes are converted to single forward slash. -- Added -L option to prevent conversion to lower case for embedded filenames - in resource statements. -- Added language posibilities to icons and cursors so that the current - language is put into the .res ans .s file. -- Added character position indication of an error. -- Fixed CLASS statement so that it accepts double quoted strings as class - argument. This seems to be the correct behaviour (see SDK). The unquoted - class-name is still supported because it seems a reasonable option. -- Fixed accelerators with CONTROL option set so that they generate correct - code instead of generating an error. -- Added testing for flex version 2.5 or better because wrc needs the - yy_scan* functions to do preprocessing. - ---------------------------------------------------------------------------- -Version 1.0.1 (08-Jun-1998) -- Added -A commandline option to generate autoregister code for the winelib - programs. - ---------------------------------------------------------------------------- -Version 1.0.0 (28-May-1998) -- Initial release diff --git a/reactos/tools/wrc/CMakeLists.txt b/reactos/tools/wrc/CMakeLists.txt deleted file mode 100644 index 1cc368dc4bd..00000000000 --- a/reactos/tools/wrc/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ - -list(APPEND SOURCE - dumpres.c - genres.c - newstruc.c - po.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/reactos/tools/wrc/dumpres.c b/reactos/tools/wrc/dumpres.c deleted file mode 100644 index f2efe30d658..00000000000 --- a/reactos/tools/wrc/dumpres.c +++ /dev/null @@ -1,924 +0,0 @@ -/* - * Copyright 1998 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 - */ - -#include "config.h" - -#include -#include -#include - -#include "wrc.h" -#include "dumpres.h" - -/* - ***************************************************************************** - * Function : get_typename - * Syntax : char *get_typename(resource_t* r) - * Input : - * r - Resource description - * Output : A pointer to a string representing the resource type - * Description : - * Remarks : - ***************************************************************************** -*/ -const char *get_typename(const resource_t* r) -{ - switch(r->type){ - case res_acc: return "ACCELERATOR"; - case res_bmp: return "BITMAP"; - case res_cur: return "CURSOR"; - case res_curg: return "GROUP_CURSOR"; - case res_dlg: return "DIALOG"; - case res_fnt: return "FONT"; - case res_ico: return "ICON"; - case res_icog: return "GROUP_ICON"; - case res_men: return "MENU"; - case res_rdt: return "RCDATA"; - case res_stt: return "STRINGTABLE"; - case res_usr: return "UserResource"; - case res_msg: return "MESSAGETABLE"; - case res_ver: return "VERSIONINFO"; - case res_dlginit: return "DLGINIT"; - case res_toolbar: return "TOOLBAR"; - case res_anicur: return "CURSOR (animated)"; - case res_aniico: return "ICON (animated)"; - default: return "Unknown"; - } -} - -/* - ***************************************************************************** - * Function : strncpyWtoA - * Syntax : char *strncpyWtoA(char *cs, short *ws, int maxlen) - * Input : - * cs - Pointer to buffer to receive result - * ws - Source wide-string - * maxlen - Max chars to copy - * Output : 'cs' - * Description : Copy a unicode string to ascii. Copying stops after the - * first occurring '\0' or when maxlen-1 chars are copied. The - * String is always nul terminated. - * Remarks : No codepage translation is done. - ***************************************************************************** -*/ -static char *strncpyWtoA(char *cs, const WCHAR *ws, int maxlen) -{ - char *cptr = cs; - const WCHAR *wsMax = ws + maxlen - 1; - while(*ws && ws < wsMax) - { - if(*ws > 255) - fprintf(stderr, "***Warning: Unicode string contains non-printable chars***\n"); - *cptr++ = (char)*ws++; - } - *cptr = '\0'; - return cs; -} - -/* - ***************************************************************************** - * Function : print_string - * Syntax : void print_string(string_t *str) - * Input : - * Output : - * Description : - * Remarks : - ***************************************************************************** -*/ -static void print_string(const string_t *str) -{ - char buffer[512]; - if(!str) - printf(""); - else if(str->type == str_char) - printf("\"%s\"", str->str.cstr); - else - { - strncpyWtoA(buffer, str->str.wstr, sizeof(buffer)); - printf("L\"%s\"", buffer); - } -} - -/* - ***************************************************************************** - * Function : get_nameid_str - * Syntax : const char *get_nameid_str(const name_id_t *n) - * Input : - * n - nameid to convert to text - * Output : A pointer to the name. - * Description : - * Remarks : Not reentrant because of static buffer - ***************************************************************************** -*/ -const char *get_nameid_str(const name_id_t *n) -{ - static char buffer[256]; - - if(!n) - return ""; - - if(n->type == name_ord) - { - sprintf(buffer, "%d", n->name.i_name); - return buffer; - } - else if(n->type == name_str) - { - if(n->name.s_name->type == str_char) - return n->name.s_name->str.cstr; - else - { - strncpyWtoA(buffer, n->name.s_name->str.wstr, sizeof(buffer)); - return buffer; - } - } - else - return "Hoooo, report this: wrong type in nameid"; -} - -/* - ***************************************************************************** - * Function : dump_memopt - * Syntax : void dump_memopt(DWORD memopt) - * Input : - * memopt - flag bits of the options set - * Output : - * Description : - * Remarks : - ***************************************************************************** -*/ -static void dump_memopt(DWORD memopt) -{ - printf("Memory/load options: "); - if(memopt & 0x0040) - printf("PRELOAD "); - else - printf("LOADONCALL "); - if(memopt & 0x0010) - printf("MOVEABLE "); - else - printf("FIXED "); - if(memopt & 0x0020) - printf("PURE "); - else - printf("IMPURE "); - if(memopt & 0x1000) - printf("DISCARDABLE"); - printf("\n"); -} - -/* - ***************************************************************************** - * Function : dump_lvc - * Syntax : void dump_lvc(const lvc_t *l) - * Input : - * l - pointer to lvc structure - * Output : - * Description : Dump language, version and characteristics - * Remarks : - ***************************************************************************** -*/ -static void dump_lvc(const lvc_t *l) -{ - if(l->language) - printf("LANGUAGE %04x, %04x\n", l->language->id, l->language->sub); - else - printf("LANGUAGE \n"); - - if(l->version) - printf("VERSION %08x\n", *(l->version)); - else - printf("VERSION \n"); - - if(l->characts) - printf("CHARACTERISTICS %08x\n", *(l->characts)); - else - printf("CHARACTERISTICS \n"); -} - -/* - ***************************************************************************** - * Function : dump_raw_data - * Syntax : void dump_raw_data(const raw_data_t *d) - * Input : - * d - Raw data descriptor - * Output : - * Description : - * Remarks : - ***************************************************************************** -*/ -static void dump_raw_data(const raw_data_t *d) -{ - unsigned int n; - int i; - int j; - - if(!d) - { - printf(""); - return; - } - printf("Rawdata size: %d\n", d->size); - if(debuglevel < 2) - return; - - for(n = 0; n < d->size; n++) - { - if((n % 16) == 0) - { - if(n) - { - printf("- "); - for(i = 0; i < 16; i++) - printf("%c", isprint(d->data[n-16+i] & 0xff) ? d->data[n-16+i] : '.'); - printf("\n%08x: ", n); - } - else - printf("%08x: ", n); - } - printf("%02x ", d->data[n] & 0xff); - } - printf("- "); - j = d->size % 16; - if(!j) - j = 16; - for(i = 0; i < j; i++) - printf("%c", isprint(d->data[n-j+i] & 0xff) ? d->data[n-j+i] : '.'); - printf("\n"); -} - -/* - ***************************************************************************** - * Function : dump_accelerator - * Syntax : void dump_accelerator(const accelerator_t *acc) - * Input : - * acc - Accelerator resource descriptor - * Output : nop - * Description : - * Remarks : - ***************************************************************************** -*/ -static void dump_accelerator(const accelerator_t *acc) -{ - event_t *ev = acc->events; - - dump_memopt(acc->memopt); - dump_lvc(&(acc->lvc)); - - printf("Events: %s\n", ev ? "" : ""); - while(ev) - { - printf("Key="); - if(isprint(ev->key)) - printf("\"%c\"", ev->key); - else if(iscntrl(ev->key)) - printf("\"^%c\"", ev->key +'@'); - else - printf("\\x%02x", ev->key & 0xff); - - printf(" Id=%d flags=%04x\n", ev->id, ev->flags); - ev = ev->next; - } -} - -/* - ***************************************************************************** - * Function : dump_cursor - * Syntax : void dump_cursor(const cursor_t *cur) - * Input : - * cur - Cursor resource descriptor - * Output : nop - * Description : - * Remarks : - ***************************************************************************** -*/ -static void dump_cursor(const cursor_t *cur) -{ - printf("Id: %d\n", cur->id); - printf("Width: %d\n", cur->width); - printf("Height: %d\n", cur->height); - printf("X Hotspot: %d\n", cur->xhot); - printf("Y Hotspot: %d\n", cur->yhot); - dump_raw_data(cur->data); -} - -/* - ***************************************************************************** - * Function : dump_cursor_group - * Syntax : void dump_cursor_group(const cursor_group_t *cur) - * Input : - * cur - Cursor group resource descriptor - * Output : nop - * Description : - * Remarks : - ***************************************************************************** -*/ -static void dump_cursor_group(const cursor_group_t *curg) -{ - dump_memopt(curg->memopt); - printf("There are %d cursors in this group\n", curg->ncursor); -} - -/* - ***************************************************************************** - * Function : dump_icon - * Syntax : void dump_icon(const icon_t *ico) - * Input : - * ico - Icon resource descriptor - * Output : nop - * Description : - * Remarks : - ***************************************************************************** -*/ -static void dump_icon(const icon_t *ico) -{ - printf("Id: %d\n", ico->id); - printf("Width: %d\n", ico->width); - printf("Height: %d\n", ico->height); - printf("NColor: %d\n", ico->nclr); - printf("NPlanes: %d\n", ico->planes); - printf("NBits: %d\n", ico->bits); - dump_raw_data(ico->data); -} - -/* - ***************************************************************************** - * Function : dump_icon_group - * Syntax : void dump_icon_group(const icon_group_t *ico) - * Input : - * ico - Icon group resource descriptor - * Output : nop - * Description : - * Remarks : - ***************************************************************************** -*/ -static void dump_icon_group(const icon_group_t *icog) -{ - dump_memopt(icog->memopt); - printf("There are %d icons in this group\n", icog->nicon); -} - -/* - ***************************************************************************** - * Function : dump_ani_curico - * Syntax : void dump_ani_curico(const ani_curico_t *ani) - * Input : - * ani - Animated object resource descriptor - * Output : nop - * Description : - * Remarks : - ***************************************************************************** -*/ -static void dump_ani_curico(const ani_curico_t *ani) -{ - dump_memopt(ani->memopt); - dump_lvc(&ani->data->lvc); - dump_raw_data(ani->data); -} - -/* - ***************************************************************************** - * Function : dump_font - * Syntax : void dump_font(const font_t *fnt) - * Input : - * fnt - Font resource descriptor - * Output : nop - * Description : - * Remarks : - ***************************************************************************** -*/ -static void dump_font(const font_t *fnt) -{ - dump_memopt(fnt->memopt); - dump_lvc(&(fnt->data->lvc)); - dump_raw_data(fnt->data); -} - -/* - ***************************************************************************** - * Function : dump_bitmap - * Syntax : void dump_bitmap(const bitmap_t *bmp) - * Input : - * bmp - Bitmap resource descriptor - * Output : nop - * Description : - * Remarks : - ***************************************************************************** -*/ -static void dump_bitmap(const bitmap_t *bmp) -{ - dump_memopt(bmp->memopt); - dump_lvc(&(bmp->data->lvc)); - dump_raw_data(bmp->data); -} - -/* - ***************************************************************************** - * Function : dump_rcdata - * Syntax : void dump_rcdata(const rcdata_t *rdt) - * Input : - * rdt - RCData resource descriptor - * Output : nop - * Description : - * Remarks : - ***************************************************************************** -*/ -static void dump_rcdata(const rcdata_t *rdt) -{ - dump_memopt(rdt->memopt); - dump_lvc(&(rdt->data->lvc)); - dump_raw_data(rdt->data); -} - -/* - ***************************************************************************** - * Function : dump_user - * Syntax : void dump_user(const user_t *usr) - * Input : - * usr - User resource descriptor - * Output : nop - * Description : - * Remarks : - ***************************************************************************** -*/ -static void dump_user(const user_t *usr) -{ - dump_memopt(usr->memopt); - dump_lvc(&(usr->data->lvc)); - printf("Class %s\n", get_nameid_str(usr->type)); - dump_raw_data(usr->data); -} - -/* - ***************************************************************************** - * Function : dump_messagetable - * Syntax : void dump_messagetable(const messagetable_t *msg) - * Input : - * msg - Messagetable resource descriptor - * Output : nop - * Description : - * Remarks : - ***************************************************************************** -*/ -static void dump_messagetable(const messagetable_t *msg) -{ - dump_memopt(msg->memopt); - dump_lvc(&(msg->data->lvc)); - dump_raw_data(msg->data); -} - -/* - ***************************************************************************** - * Function : dump_stringtable - * Syntax : void dump_stringtable(const stringtable_t *stt) - * Input : - * stt - Stringtable resource descriptor - * Output : nop - * Description : - * Remarks : - ***************************************************************************** -*/ -static void dump_stringtable(const stringtable_t *stt) -{ - int i; - for(; stt; stt = stt->next) - { - printf("{\n"); - dump_memopt(stt->memopt); - dump_lvc(&(stt->lvc)); - for(i = 0; i < stt->nentries; i++) - { - printf("Id=%-5d (%d) ", stt->idbase+i, stt->entries[i].id); - if(stt->entries[i].str) - print_string(stt->entries[i].str); - else - printf(""); - printf("\n"); - } - printf("}\n"); - } -} - -/* - ***************************************************************************** - * Function : dump_control - * Syntax : void dump_control(const control_t *ctrl) - * Input : - * ctrl - Control resource descriptor - * Output : - * Description : - * Remarks : - ***************************************************************************** -*/ -static void dump_control(const control_t *ctrl) -{ - printf("Control {\n\tClass: %s\n", get_nameid_str(ctrl->ctlclass)); - printf("\tText: "); get_nameid_str(ctrl->title); printf("\n"); - printf("\tId: %d\n", ctrl->id); - printf("\tx, y, w, h: %d, %d, %d, %d\n", ctrl->x, ctrl->y, ctrl->width, ctrl->height); - if(ctrl->gotstyle) - { - assert(ctrl->style != NULL); - assert(ctrl->style->and_mask == 0); - printf("\tStyle: %08x\n", ctrl->style->or_mask); - } - if(ctrl->gotexstyle) - { - assert(ctrl->exstyle != NULL); - assert(ctrl->exstyle->and_mask == 0); - printf("\tExStyle: %08x\n", ctrl->exstyle->or_mask); - } - if(ctrl->gothelpid) - printf("\tHelpid: %d\n", ctrl->helpid); - if(ctrl->extra) - { - printf("\t"); - dump_raw_data(ctrl->extra); - } - printf("}\n"); -} - -/* - ***************************************************************************** - * Function : dump_dialog - * Syntax : void dump_dialog(const dialog_t *dlg) - * Input : - * dlg - Dialog resource descriptor - * Output : - * Description : - * Remarks : - ***************************************************************************** -*/ -static void dump_dialog(const dialog_t *dlg) -{ - control_t *c = dlg->controls; - - dump_memopt(dlg->memopt); - dump_lvc(&(dlg->lvc)); - printf("x, y, w, h: %d, %d, %d, %d\n", dlg->x, dlg->y, dlg->width, dlg->height); - if(dlg->gotstyle) - { - assert(dlg->style != NULL); - assert(dlg->style->and_mask == 0); - printf("Style: %08x\n", dlg->style->or_mask); - - } - if(dlg->gotexstyle) - { - assert(dlg->exstyle != NULL); - assert(dlg->exstyle->and_mask == 0); - printf("ExStyle: %08x\n", dlg->exstyle->or_mask); - } - printf("Menu: %s\n", get_nameid_str(dlg->menu)); - printf("Class: %s\n", get_nameid_str(dlg->dlgclass)); - printf("Title: "); print_string(dlg->title); printf("\n"); - printf("Font: "); - if(!dlg->font) - printf("\n"); - else - { - printf("%d, ", dlg->font->size); - print_string(dlg->font->name); - printf("\n"); - } - while(c) - { - dump_control(c); - c = c->next; - } -} - -/* - ***************************************************************************** - * Function : dump_menu_item - * Syntax : void dump_menu_item(const menuex_item_t *item) - * Input : - * Output : - * Description : - * Remarks : - ***************************************************************************** -*/ -static void dump_menu_item(const menu_item_t *item) -{ - while(item) - { - if(item->popup) - { - printf("POPUP "); - print_string(item->name); - if(item->gotid) - printf(", Id=%d", item->id); - if(item->gottype) - printf(", Type=%d", item->type); - if(item->gotstate) - printf(", State=%08x", item->state); - if(item->gothelpid) - printf(", HelpId=%d", item->helpid); - printf("\n"); - dump_menu_item(item->popup); - } - else - { - printf("MENUITEM "); - if(item->name) - { - print_string(item->name); - if(item->gotid) - printf(", Id=%d", item->id); - if(item->gottype) - printf(", Type=%d", item->type); - if(item->gotstate) - printf(", State=%08x", item->state); - if(item->gothelpid) - printf(", HelpId=%d", item->helpid); - } - else - printf("SEPARATOR"); - printf("\n"); - } - item = item->next; - } -} - -/* - ***************************************************************************** - * Function : dump_menu - * Syntax : void dump_menu(const menu_t *men) - * Input : - * men - Menu resource descriptor - * Output : - * Description : - * Remarks : - ***************************************************************************** -*/ -static void dump_menu(const menu_t *men) -{ - dump_memopt(men->memopt); - dump_lvc(&(men->lvc)); - dump_menu_item(men->items); -} - -/* - ***************************************************************************** - * Function : dump_ver_value - * Syntax : void dump_ver_value(const ver_value_t *val) - * Input : - * Output : - * Description : - * Remarks : - ***************************************************************************** -*/ -static void dump_ver_block(const ver_block_t *); /* Forward ref */ - -static void dump_ver_value(const ver_value_t *val) -{ - if(val->type == val_str) - { - printf("VALUE "); - print_string(val->key); - printf(" "); - print_string(val->value.str); - printf("\n"); - } - else if(val->type == val_words) - { - int i; - printf("VALUE"); - print_string(val->key); - for(i = 0; i < val->value.words->nwords; i++) - printf(" %04x", val->value.words->words[i]); - printf("\n"); - } - else if(val->type == val_block) - { - dump_ver_block(val->value.block); - } -} - -/* - ***************************************************************************** - * Function : dump_ver_block - * Syntax : void dump_ver_block(const ver_block_t *blk) - * Input : - * Output : - * Description : - * Remarks : - ***************************************************************************** -*/ -static void dump_ver_block(const ver_block_t *blk) -{ - const ver_value_t *val = blk->values; - printf("BLOCK "); - print_string(blk->name); - printf("\n{\n"); - while(val) - { - dump_ver_value(val); - val = val->next; - } - printf("}\n"); -} - -/* - ***************************************************************************** - * Function : dump_versioninfo - * Syntax : void dump_versioninfo(const versioninfo_t *ver) - * Input : - * ver - Versioninfo resource descriptor - * Output : - * Description : - * Remarks : - ***************************************************************************** -*/ -static void dump_versioninfo(const versioninfo_t *ver) -{ - const ver_block_t *blk = ver->blocks; - - dump_lvc(&(ver->lvc)); - - if(ver->gotit.fv) - printf("FILEVERSION %04x, %04x, %04x, %04x\n", - ver->filever_maj1, - ver->filever_maj2, - ver->filever_min1, - ver->filever_min2); - if(ver->gotit.pv) - printf("PRODUCTVERSION %04x, %04x, %04x, %04x\n", - ver->prodver_maj1, - ver->prodver_maj2, - ver->prodver_min1, - ver->prodver_min2); - if(ver->gotit.fo) - printf("FILEOS %08x\n", ver->fileos); - if(ver->gotit.ff) - printf("FILEFLAGS %08x\n", ver->fileflags); - if(ver->gotit.ffm) - printf("FILEFLAGSMASK %08x\n", ver->fileflagsmask); - if(ver->gotit.ft) - printf("FILETYPE %08x\n", ver->filetype); - if(ver->gotit.fst) - printf("FILESUBTYPE %08x\n", ver->filesubtype); - while(blk) - { - dump_ver_block(blk); - blk = blk->next; - } -} - -/* - ***************************************************************************** - * Function : dump_toolbar_item - * Syntax : void dump_toolbar_item(const toolbar_item_t *item) - * Input : - * Output : - * Description : - * Remarks : - ***************************************************************************** -*/ -static void dump_toolbar_items(const toolbar_item_t *items) -{ - while(items) - { - if(items->id) - printf(" BUTTON %d", items->id ); - else - printf(" SEPARATOR"); - - printf("\n"); - - items = items->next; - } -} - -/* - ***************************************************************************** - * Function : dump_toolbar - * Syntax : void dump_toolbar(const toolbar_t *toolbar) - * Input : - * toolbar - Toolbar resource descriptor - * Output : - * Description : - * Remarks : - ***************************************************************************** -*/ -static void dump_toolbar(const toolbar_t *toolbar) -{ - dump_memopt(toolbar->memopt); - dump_lvc(&(toolbar->lvc)); - dump_toolbar_items(toolbar->items); -} - -/* - ***************************************************************************** - * Function : dump_dlginit - * Syntax : void dump_dlginit(const dlginit_t *dit) - * Input : - * dit - DlgInit resource descriptor - * Output : - * Description : - * Remarks : - ***************************************************************************** -*/ -static void dump_dlginit(const dlginit_t *dit) -{ - dump_memopt(dit->memopt); - dump_lvc(&(dit->data->lvc)); - dump_raw_data(dit->data); -} - -/* - ***************************************************************************** - * Function : dump_resources - * Syntax : void dump_resources(const resource_t *top) - * Input : - * top - Top of the resource tree - * Output : - * nop - * Description : Dump the parsed resource-tree to stdout - * Remarks : - ***************************************************************************** -*/ -void dump_resources(const resource_t *top) -{ - printf("Internal resource-tree dump:\n"); - while(top) - { - printf("Resource: %s\nId: %s\n", - get_typename(top), - get_nameid_str(top->name)); - switch(top->type) - { - case res_acc: - dump_accelerator(top->res.acc); - break; - case res_bmp: - dump_bitmap(top->res.bmp); - break; - case res_cur: - dump_cursor(top->res.cur); - break; - case res_curg: - dump_cursor_group(top->res.curg); - break; - case res_dlg: - dump_dialog(top->res.dlg); - break; - case res_fnt: - dump_font(top->res.fnt); - break; - case res_icog: - dump_icon_group(top->res.icog); - break; - case res_ico: - dump_icon(top->res.ico); - break; - case res_men: - dump_menu(top->res.men); - break; - case res_rdt: - dump_rcdata(top->res.rdt); - break; - case res_stt: - dump_stringtable(top->res.stt); - break; - case res_usr: - dump_user(top->res.usr); - break; - case res_msg: - dump_messagetable(top->res.msg); - break; - case res_ver: - dump_versioninfo(top->res.ver); - break; - case res_dlginit: - dump_dlginit(top->res.dlgi); - break; - case res_toolbar: - dump_toolbar(top->res.tbt); - break; - case res_anicur: - case res_aniico: - dump_ani_curico(top->res.ani); - break; - default: - printf("Report this: Unknown resource type parsed %08x\n", top->type); - } - printf("\n"); - top = top->next; - } -} diff --git a/reactos/tools/wrc/dumpres.h b/reactos/tools/wrc/dumpres.h deleted file mode 100644 index a6c3dac3800..00000000000 --- a/reactos/tools/wrc/dumpres.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Dump resource prototypes - * - * Copyright 1998 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 __WRC_DUMPRES_H -#define __WRC_DUMPRES_H - -#include "wrctypes.h" - -const char *get_typename(const resource_t* r); -void dump_resources(const resource_t *top); -const char *get_nameid_str(const name_id_t *n); - -#endif diff --git a/reactos/tools/wrc/genres.c b/reactos/tools/wrc/genres.c deleted file mode 100644 index 709a83e5d94..00000000000 --- a/reactos/tools/wrc/genres.c +++ /dev/null @@ -1,1888 +0,0 @@ -/* - * Generate .res format from a resource-tree - * - * 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 - * - * History: - * 05-May-2000 BS - Added code to support endian conversions. The - * extra functions also aid unaligned access, but - * this is not yet implemented. - * 25-May-1998 BS - Added simple unicode -> char conversion for resource - * names in .s and .h files. - */ - -#include "config.h" - -#include -#include -#include -#include -#include -#include -#include "wrc.h" -#include "genres.h" -#include "utils.h" - -#include "wine/unicode.h" - -#define SetResSize(res, tag) set_dword((res), (tag), (res)->size - get_dword((res), (tag))) - -res_t *new_res(void) -{ - res_t *r; - r = xmalloc(sizeof(res_t)); - r->allocsize = RES_BLOCKSIZE; - r->size = 0; - r->dataidx = 0; - r->data = xmalloc(RES_BLOCKSIZE); - return r; -} - -res_t *grow_res(res_t *r, unsigned int add) -{ - r->allocsize += add; - r->data = xrealloc(r->data, r->allocsize); - return r; -} - -/* - ***************************************************************************** - * Function : put_byte - * put_word - * put_dword - * Syntax : void put_byte(res_t *res, unsigned c) - * void put_word(res_t *res, unsigned w) - * void put_dword(res_t *res, unsigned d) - * Input : - * res - Binary resource to put the data in - * c, w, d - Data to put - * Output : nop - * Description : Put primitives that put an item in the binary resource. - * The data array grows automatically. - * Remarks : - ***************************************************************************** -*/ -void put_byte(res_t *res, unsigned c) -{ - if(res->allocsize - res->size < sizeof(char)) - grow_res(res, RES_BLOCKSIZE); - res->data[res->size] = (char)c; - res->size += sizeof(char); -} - -void put_word(res_t *res, unsigned w) -{ - if(res->allocsize - res->size < sizeof(WORD)) - grow_res(res, RES_BLOCKSIZE); - switch(byteorder) - { -#ifdef WORDS_BIGENDIAN - default: -#endif - case WRC_BO_BIG: - res->data[res->size+0] = HIBYTE(w); - res->data[res->size+1] = LOBYTE(w); - break; - -#ifndef WORDS_BIGENDIAN - default: -#endif - case WRC_BO_LITTLE: - res->data[res->size+1] = HIBYTE(w); - res->data[res->size+0] = LOBYTE(w); - break; - } - res->size += sizeof(WORD); -} - -void put_dword(res_t *res, unsigned d) -{ - if(res->allocsize - res->size < sizeof(DWORD)) - grow_res(res, RES_BLOCKSIZE); - switch(byteorder) - { -#ifdef WORDS_BIGENDIAN - default: -#endif - case WRC_BO_BIG: - res->data[res->size+0] = HIBYTE(HIWORD(d)); - res->data[res->size+1] = LOBYTE(HIWORD(d)); - res->data[res->size+2] = HIBYTE(LOWORD(d)); - res->data[res->size+3] = LOBYTE(LOWORD(d)); - break; - -#ifndef WORDS_BIGENDIAN - default: -#endif - case WRC_BO_LITTLE: - res->data[res->size+3] = HIBYTE(HIWORD(d)); - res->data[res->size+2] = LOBYTE(HIWORD(d)); - res->data[res->size+1] = HIBYTE(LOWORD(d)); - res->data[res->size+0] = LOBYTE(LOWORD(d)); - break; - } - res->size += sizeof(DWORD); -} - -static void put_pad(res_t *res) -{ - while(res->size & 0x3) - put_byte(res, 0); -} - -/* - ***************************************************************************** - * Function : set_word - * set_dword - * Syntax : void set_word(res_t *res, int ofs, unsigned w) - * void set_dword(res_t *res, int ofs, unsigned d) - * Input : - * res - Binary resource to put the data in - * ofs - Byte offset in data-array - * w, d - Data to put - * Output : nop - * Description : Set the value of a binary resource data array to a - * specific value. - * Remarks : - ***************************************************************************** -*/ -static void set_word(res_t *res, int ofs, unsigned w) -{ - switch(byteorder) - { -#ifdef WORDS_BIGENDIAN - default: -#endif - case WRC_BO_BIG: - res->data[ofs+0] = HIBYTE(w); - res->data[ofs+1] = LOBYTE(w); - break; - -#ifndef WORDS_BIGENDIAN - default: -#endif - case WRC_BO_LITTLE: - res->data[ofs+1] = HIBYTE(w); - res->data[ofs+0] = LOBYTE(w); - break; - } -} - -static void set_dword(res_t *res, int ofs, unsigned d) -{ - switch(byteorder) - { -#ifdef WORDS_BIGENDIAN - default: -#endif - case WRC_BO_BIG: - res->data[ofs+0] = HIBYTE(HIWORD(d)); - res->data[ofs+1] = LOBYTE(HIWORD(d)); - res->data[ofs+2] = HIBYTE(LOWORD(d)); - res->data[ofs+3] = LOBYTE(LOWORD(d)); - break; - -#ifndef WORDS_BIGENDIAN - default: -#endif - case WRC_BO_LITTLE: - res->data[ofs+3] = HIBYTE(HIWORD(d)); - res->data[ofs+2] = LOBYTE(HIWORD(d)); - res->data[ofs+1] = HIBYTE(LOWORD(d)); - res->data[ofs+0] = LOBYTE(LOWORD(d)); - break; - } -} - -/* - ***************************************************************************** - * Function : get_dword - * Input : - * res - Binary resource to put the data in - * ofs - Byte offset in data-array - * Output : The data in native endian - * Description : Get the value of a binary resource data array in native - * endian. - * Remarks : - ***************************************************************************** -*/ -static DWORD get_dword(res_t *res, int ofs) -{ - switch(byteorder) - { -#ifdef WORDS_BIGENDIAN - default: -#endif - case WRC_BO_BIG: - return (res->data[ofs+0] << 24) - | (res->data[ofs+1] << 16) - | (res->data[ofs+2] << 8) - | res->data[ofs+3]; - -#ifndef WORDS_BIGENDIAN - default: -#endif - case WRC_BO_LITTLE: - return (res->data[ofs+3] << 24) - | (res->data[ofs+2] << 16) - | (res->data[ofs+1] << 8) - | res->data[ofs+0]; - } -} - -/* - ***************************************************************************** - * Function : string_to_upper - * Syntax : void string_to_upper(string_t *str) - * Input : - * Output : - * Description : - * Remarks : FIXME: codepages... - ***************************************************************************** -*/ -static void string_to_upper(string_t *str) -{ - int i; - - if(str->type == str_char) - { - for (i = 0; i < str->size; i++) str->str.cstr[i] = toupper((unsigned char)str->str.cstr[i]); - } - else if(str->type == str_unicode) - { - for (i = 0; i < str->size; i++) str->str.wstr[i] = toupperW(str->str.wstr[i]); - } - else - { - internal_error(__FILE__, __LINE__, "Invalid string type %d\n", str->type); - } -} - -/* - ***************************************************************************** - * Function : put_string - * Syntax : void put_string(res_t *res, string_t *str, enum str_e type, - * int isterm, const language_t *lang) - * Input : - * res - Binary resource to put the data in - * str - String to put - * type - Data has to be written in either str_char or str_unicode - * isterm - The string is '\0' terminated (disregard the string's - * size member) - * Output : nop - * Description : - * Remarks : - ***************************************************************************** -*/ -static void put_string(res_t *res, const string_t *str, enum str_e type, int isterm, - const language_t *lang) -{ - int cnt, codepage; - string_t *newstr; - - assert(res != NULL); - assert(str != NULL); - - if (lang) codepage = get_language_codepage( lang->id, lang->sub ); - else codepage = get_language_codepage( 0, 0 ); - - assert( codepage != -1 ); - - newstr = convert_string(str, type, codepage); - if (type == str_unicode) - { - if (str->type == str_char) - { - if (!check_unicode_conversion( str, newstr, codepage )) - { - print_location( &str->loc ); - error( "String %s does not convert identically to Unicode and back in codepage %d. " - "Try using a Unicode string instead\n", str->str.cstr, codepage ); - } - if (check_valid_utf8( str, codepage )) - { - print_location( &str->loc ); - warning( "string \"%s\" seems to be UTF-8 but codepage %u is in use.\n", - str->str.cstr, codepage ); - } - } - if (!isterm) put_word(res, newstr->size); - for(cnt = 0; cnt < newstr->size; cnt++) - { - WCHAR c = newstr->str.wstr[cnt]; - if (isterm && !c) break; - put_word(res, c); - } - if (isterm) put_word(res, 0); - } - else /* str_char */ - { - if (!isterm) put_byte(res, newstr->size); - for(cnt = 0; cnt < newstr->size; cnt++) - { - char c = newstr->str.cstr[cnt]; - if (isterm && !c) break; - put_byte(res, c); - } - if (isterm) put_byte(res, 0); - } - free_string(newstr); -} - -/* - ***************************************************************************** - * Function : put_name_id - * Syntax : void put_name_id(res_t *res, name_id_t *nid, int upcase, const language_t *lang) - * Input : - * Output : - * Description : - * Remarks : - ***************************************************************************** -*/ -static void put_name_id(res_t *res, name_id_t *nid, int upcase, const language_t *lang) -{ - if(nid->type == name_ord) - { - if(win32) - put_word(res, 0xffff); - else - put_byte(res, 0xff); - put_word(res, (WORD)nid->name.i_name); - } - else if(nid->type == name_str) - { - if(upcase) - string_to_upper(nid->name.s_name); - put_string(res, nid->name.s_name, win32 ? str_unicode : str_char, TRUE, lang); - } - else - { - internal_error(__FILE__, __LINE__, "Invalid name_id type %d\n", nid->type); - } -} - -/* - ***************************************************************************** - * Function : put_lvc - * Syntax : void put_lvc(res_t *res, lvc_t *lvc) - * Input : - * Output : - * Description : - * Remarks : - ***************************************************************************** -*/ -static void put_lvc(res_t *res, lvc_t *lvc) -{ - if(lvc && lvc->language) - put_word(res, MAKELANGID(lvc->language->id, lvc->language->sub)); - else - put_word(res, 0); /* Neutral */ - if(lvc && lvc->version) - put_dword(res, *(lvc->version)); - else - put_dword(res, 0); - if(lvc && lvc->characts) - put_dword(res, *(lvc->characts)); - else - put_dword(res, 0); -} - -/* - ***************************************************************************** - * Function : put_raw_data - * Syntax : void put_raw_data(res_t *res, raw_data_t *raw, int offset) - * Input : - * Output : - * Description : - * Remarks : - ***************************************************************************** -*/ -static void put_raw_data(res_t *res, raw_data_t *raw, int offset) -{ - unsigned int wsize = raw->size - offset; - if(res->allocsize - res->size < wsize) - grow_res(res, wsize); - memcpy(&(res->data[res->size]), raw->data + offset, wsize); - res->size += wsize; -} - -/* - ***************************************************************************** - * Function : put_res_header - * Syntax : input_res_header(res_t *res, int type, name_id_t *ntype, - * name_id_t *name, DWORD memopt, lvc_t *lvc) - * - * Input : - * res - Binary resource descriptor to write to - * type - Resource identifier (if ntype == NULL) - * ntype - Name id of type - * name - Resource's name - * memopt - Resource's memory options to write - * lvc - Language, version and characteristics (win32 only) - * Output : An index to the resource size field. The resource size field - * contains the header size upon exit. - * Description : - * Remarks : - ***************************************************************************** -*/ -static int put_res_header(res_t *res, int type, name_id_t *ntype, name_id_t *name, - DWORD memopt, lvc_t *lvc) -{ - if(win32) - { - put_dword(res, 0); /* We will overwrite these later */ - put_dword(res, 0); - if(!ntype) - { - put_word(res, 0xffff); /* ResType */ - put_word(res, type); - } - else - put_name_id(res, ntype, TRUE, lvc->language); - put_name_id(res, name, TRUE, lvc->language); /* ResName */ - put_pad(res); - put_dword(res, 0); /* DataVersion */ - put_word(res, memopt); /* Memory options */ - put_lvc(res, lvc); /* Language, version and characts */ - set_dword(res, 0*sizeof(DWORD), res->size); /* Set preliminary resource */ - set_dword(res, 1*sizeof(DWORD), res->size); /* Set HeaderSize */ - res->dataidx = res->size; - return 0; - } - else /* win16 */ - { - int tag; - if(!ntype) - { - put_byte(res, 0xff); /* ResType */ - put_word(res, type); - } - else - put_name_id(res, ntype, TRUE, NULL); - put_name_id(res, name, TRUE, NULL); /* ResName */ - put_word(res, memopt); /* Memory options */ - tag = res->size; - put_dword(res, 0); /* ResSize overwritten later*/ - set_dword(res, tag, res->size); - res->dataidx = res->size; - return tag; - } -} - -/* - ***************************************************************************** - * Function : accelerator2res - * Syntax : res_t *accelerator2res(name_id_t *name, accelerator_t *acc) - * Input : - * name - Name/ordinal of the resource - * acc - The accelerator descriptor - * Output : New .res format structure - * Description : - * Remarks : - ***************************************************************************** -*/ -static res_t *accelerator2res(name_id_t *name, accelerator_t *acc) -{ - int restag; - res_t *res; - event_t *ev; - assert(name != NULL); - assert(acc != NULL); - - ev = acc->events; - res = new_res(); - if(win32) - { - restag = put_res_header(res, WRC_RT_ACCELERATOR, NULL, name, acc->memopt, &(acc->lvc)); - while(ev) - { - put_word(res, ev->flags | (ev->next ? 0 : 0x80)); - put_word(res, ev->key); - put_word(res, ev->id); - put_word(res, 0); /* Padding */ - ev = ev->next; - } - put_pad(res); - } - else /* win16 */ - { - restag = put_res_header(res, WRC_RT_ACCELERATOR, NULL, name, acc->memopt, NULL); - while(ev) - { - put_byte(res, ev->flags | (ev->next ? 0 : 0x80)); - put_word(res, ev->key); - put_word(res, ev->id); - ev = ev->next; - } - } - /* Set ResourceSize */ - SetResSize(res, restag); - return res; -} - -/* - ***************************************************************************** - * Function : dialog2res - * Syntax : res_t *dialog2res(name_id_t *name, dialog_t *dlg) - * Input : - * name - Name/ordinal of the resource - * dlg - The dialog descriptor - * Output : New .res format structure - * Description : - * Remarks : - ***************************************************************************** -*/ -static res_t *dialog2res(name_id_t *name, dialog_t *dlg) -{ - int restag; - res_t *res; - control_t *ctrl; - int tag_nctrl; - int nctrl = 0; - assert(name != NULL); - assert(dlg != NULL); - - ctrl = dlg->controls; - res = new_res(); - if(win32) - { - restag = put_res_header(res, WRC_RT_DIALOG, NULL, name, dlg->memopt, &(dlg->lvc)); - - if (dlg->is_ex) - { - /* FIXME: MS doc says that the first word must contain 0xffff - * and the second 0x0001 to signal a DLGTEMPLATEEX. Borland's - * compiler reverses the two words. - * I don't know which one to choose, but I write it as Mr. B - * writes it. - */ - put_word(res, 1); /* Signature */ - put_word(res, 0xffff); /* DlgVer */ - put_dword(res, dlg->gothelpid ? dlg->helpid : 0); - put_dword(res, dlg->gotexstyle ? dlg->exstyle->or_mask : 0); - put_dword(res, dlg->gotstyle ? dlg->style->or_mask : WS_POPUPWINDOW); - } - else - { - put_dword(res, dlg->style->or_mask); - put_dword(res, dlg->gotexstyle ? dlg->exstyle->or_mask : 0); - } - tag_nctrl = res->size; - put_word(res, 0); /* Number of controls */ - put_word(res, dlg->x); - put_word(res, dlg->y); - put_word(res, dlg->width); - put_word(res, dlg->height); - if(dlg->menu) - put_name_id(res, dlg->menu, TRUE, dlg->lvc.language); - else - put_word(res, 0); - if(dlg->dlgclass) - put_name_id(res, dlg->dlgclass, TRUE, dlg->lvc.language); - else - put_word(res, 0); - if(dlg->title) - put_string(res, dlg->title, str_unicode, TRUE, dlg->lvc.language); - else - put_word(res, 0); - if(dlg->font) - { - put_word(res, dlg->font->size); - if (dlg->is_ex) - { - put_word(res, dlg->font->weight); - /* FIXME: ? TRUE should be sufficient to say that it's - * italic, but Borland's compiler says it's 0x0101. - * I just copy it here, and hope for the best. - */ - put_word(res, dlg->font->italic ? 0x0101 : 0); - } - put_string(res, dlg->font->name, str_unicode, TRUE, dlg->lvc.language); - } - - put_pad(res); - while(ctrl) - { - if (dlg->is_ex) - { - put_dword(res, ctrl->gothelpid ? ctrl->helpid : 0); - put_dword(res, ctrl->gotexstyle ? ctrl->exstyle->or_mask : 0); - /* FIXME: what is default control style? */ - put_dword(res, ctrl->gotstyle ? ctrl->style->or_mask : WS_CHILD | WS_VISIBLE); - } - else - { - /* FIXME: what is default control style? */ - put_dword(res, ctrl->gotstyle ? ctrl->style->or_mask: WS_CHILD); - put_dword(res, ctrl->gotexstyle ? ctrl->exstyle->or_mask : 0); - } - put_word(res, ctrl->x); - put_word(res, ctrl->y); - put_word(res, ctrl->width); - put_word(res, ctrl->height); - if (dlg->is_ex) - put_dword(res, ctrl->id); - else - put_word(res, ctrl->id); - if(ctrl->ctlclass) - put_name_id(res, ctrl->ctlclass, TRUE, dlg->lvc.language); - else - internal_error(__FILE__, __LINE__, "Control has no control-class\n"); - if(ctrl->title) - put_name_id(res, ctrl->title, FALSE, dlg->lvc.language); - else - put_word(res, 0); - if(ctrl->extra) - { - put_word(res, ctrl->extra->size+2); - put_pad(res); - put_raw_data(res, ctrl->extra, 0); - } - else - put_word(res, 0); - - if(ctrl->next) - put_pad(res); - nctrl++; - ctrl = ctrl->next; - } - /* Set number of controls */ - set_word(res, tag_nctrl, (WORD)nctrl); - } - else /* win16 */ - { - restag = put_res_header(res, WRC_RT_DIALOG, NULL, name, dlg->memopt, NULL); - - put_dword(res, dlg->gotstyle ? dlg->style->or_mask : WS_POPUPWINDOW); - tag_nctrl = res->size; - put_byte(res, 0); /* Number of controls */ - put_word(res, dlg->x); - put_word(res, dlg->y); - put_word(res, dlg->width); - put_word(res, dlg->height); - if(dlg->menu) - put_name_id(res, dlg->menu, TRUE, NULL); - else - put_byte(res, 0); - if(dlg->dlgclass) - put_name_id(res, dlg->dlgclass, TRUE, NULL); - else - put_byte(res, 0); - if(dlg->title) - put_string(res, dlg->title, str_char, TRUE, NULL); - else - put_byte(res, 0); - if(dlg->font) - { - put_word(res, dlg->font->size); - put_string(res, dlg->font->name, str_char, TRUE, NULL); - } - - while(ctrl) - { - put_word(res, ctrl->x); - put_word(res, ctrl->y); - put_word(res, ctrl->width); - put_word(res, ctrl->height); - put_word(res, ctrl->id); - put_dword(res, ctrl->gotstyle ? ctrl->style->or_mask: WS_CHILD); - if(ctrl->ctlclass) - { - if(ctrl->ctlclass->type == name_ord - && ctrl->ctlclass->name.i_name >= 0x80 - && ctrl->ctlclass->name.i_name <= 0x85) - put_byte(res, ctrl->ctlclass->name.i_name); - else if(ctrl->ctlclass->type == name_str) - put_name_id(res, ctrl->ctlclass, FALSE, NULL); - else - error("Unknown control-class %04x\n", ctrl->ctlclass->name.i_name); - } - else - internal_error(__FILE__, __LINE__, "Control has no control-class\n"); - if(ctrl->title) - put_name_id(res, ctrl->title, FALSE, NULL); - else - put_byte(res, 0); - - /* FIXME: What is this extra byte doing here? */ - put_byte(res, 0); - - nctrl++; - ctrl = ctrl->next; - } - /* Set number of controls */ - ((char *)res->data)[tag_nctrl] = (char)nctrl; - } - /* Set ResourceSize */ - SetResSize(res, restag); - return res; -} - -/* - ***************************************************************************** - * Function : menuitem2res - * Syntax : void menuitem2res(res_t *res, menu_item_t *item) - * Input : - * Output : - * Description : - * Remarks : Self recursive - ***************************************************************************** -*/ -static void menuitem2res(res_t *res, menu_item_t *menitem, const language_t *lang) -{ - menu_item_t *itm = menitem; - if(win32) - { - while(itm) - { - put_word(res, itm->state | (itm->popup ? MF_POPUP : 0) | (!itm->next ? MF_END : 0)); - if(!itm->popup) - put_word(res, itm->id); - if(itm->name) - put_string(res, itm->name, str_unicode, TRUE, lang); - else - put_word(res, 0); - if(itm->popup) - menuitem2res(res, itm->popup, lang); - itm = itm->next; - } - } - else /* win16 */ - { - while(itm) - { - put_word(res, itm->state | (itm->popup ? MF_POPUP : 0) | (!itm->next ? MF_END : 0)); - if(!itm->popup) - put_word(res, itm->id); - if(itm->name) - put_string(res, itm->name, str_char, TRUE, lang); - else - put_byte(res, 0); - if(itm->popup) - menuitem2res(res, itm->popup, lang); - itm = itm->next; - } - } - -} - -/* - ***************************************************************************** - * Function : menuexitem2res - * Syntax : void menuexitem2res(res_t *res, menuex_item_t *item) - * Input : - * Output : nop - * Description : - * Remarks : Self recursive - ***************************************************************************** -*/ -static void menuexitem2res(res_t *res, menu_item_t *menitem, const language_t *lang) -{ - menu_item_t *itm = menitem; - assert(win32 != 0); - while(itm) - { - put_dword(res, itm->gottype ? itm->type : 0); - put_dword(res, itm->gotstate ? itm->state : 0); - put_dword(res, itm->gotid ? itm->id : 0); /* FIXME: Docu. says word */ - put_word(res, (itm->popup ? 0x01 : 0) | (!itm->next ? MF_END : 0)); - if(itm->name) - put_string(res, itm->name, str_unicode, TRUE, lang); - else - put_word(res, 0); - put_pad(res); - if(itm->popup) - { - put_dword(res, itm->gothelpid ? itm->helpid : 0); - menuexitem2res(res, itm->popup, lang); - } - itm = itm->next; - } - -} - -/* - ***************************************************************************** - * Function : menu2res - * Syntax : res_t *menu2res(name_id_t *name, menu_t *men) - * Input : - * name - Name/ordinal of the resource - * menex - The menuex descriptor - * Output : New .res format structure - * Description : - * Remarks : - ***************************************************************************** -*/ -static res_t *menu2res(name_id_t *name, menu_t *men) -{ - int restag; - res_t *res; - assert(name != NULL); - assert(men != NULL); - - res = new_res(); - if(win32) - { - restag = put_res_header(res, WRC_RT_MENU, NULL, name, men->memopt, &(men->lvc)); - - if (men->is_ex) - { - put_word(res, 1); /* Menuheader: Version */ - put_word(res, 4); /* Offset */ - put_dword(res, 0); /* HelpId */ - put_pad(res); - menuexitem2res(res, men->items, men->lvc.language); - } - else - { - put_dword(res, 0); /* Menuheader: Version and HeaderSize */ - menuitem2res(res, men->items, men->lvc.language); - } - /* Set ResourceSize */ - SetResSize(res, restag); - put_pad(res); - } - else /* win16 */ - { - restag = put_res_header(res, WRC_RT_MENU, NULL, name, men->memopt, NULL); - - put_dword(res, 0); /* Menuheader: Version and HeaderSize */ - menuitem2res(res, men->items, NULL); - /* Set ResourceSize */ - SetResSize(res, restag); - } - return res; -} - -/* - ***************************************************************************** - * Function : cursorgroup2res - * Syntax : res_t *cursorgroup2res(name_id_t *name, cursor_group_t *curg) - * Input : - * name - Name/ordinal of the resource - * curg - The cursor descriptor - * Output : New .res format structure - * Description : - * Remarks : - ***************************************************************************** -*/ -static res_t *cursorgroup2res(name_id_t *name, cursor_group_t *curg) -{ - int restag; - res_t *res; - cursor_t *cur; - assert(name != NULL); - assert(curg != NULL); - - res = new_res(); - restag = put_res_header(res, WRC_RT_GROUP_CURSOR, NULL, name, curg->memopt, &(curg->lvc)); - if(win32) - { - put_word(res, 0); /* Reserved */ - /* FIXME: The ResType in the NEWHEADER structure should - * contain 14 according to the MS win32 doc. This is - * not the case with the BRC compiler and I really doubt - * the latter. Putting one here is compliant to win16 spec, - * but who knows the true value? - */ - put_word(res, 2); /* ResType */ - put_word(res, curg->ncursor); -#if 0 - for(cur = curg->cursorlist; cur; cur = cur->next) -#else - cur = curg->cursorlist; - while(cur->next) - cur = cur->next; - for(; cur; cur = cur->prev) -#endif - { - put_word(res, cur->width); - /* FIXME: The height of a cursor is half the size of - * the bitmap's height. BRC puts the height from the - * BITMAPINFOHEADER here instead of the cursorfile's - * height. MS doesn't seem to care... - */ - put_word(res, cur->height); - /* FIXME: The next two are reversed in BRC and I don't - * know why. Probably a bug. But, we can safely ignore - * it because win16 does not support color cursors. - * A warning should have been generated by the parser. - */ - put_word(res, cur->planes); - put_word(res, cur->bits); - /* FIXME: The +4 is the hotspot in the cursor resource. - * However, I could not find this in the documentation. - * The hotspot bytes must either be included or MS - * doesn't care. - */ - put_dword(res, cur->data->size +4); - put_word(res, cur->id); - } - } - else /* win16 */ - { - put_word(res, 0); /* Reserved */ - put_word(res, 2); /* ResType */ - put_word(res, curg->ncursor); -#if 0 - for(cur = curg->cursorlist; cur; cur = cur->next) -#else - cur = curg->cursorlist; - while(cur->next) - cur = cur->next; - for(; cur; cur = cur->prev) -#endif - { - put_word(res, cur->width); - /* FIXME: The height of a cursor is half the size of - * the bitmap's height. BRC puts the height from the - * BITMAPINFOHEADER here instead of the cursorfile's - * height. MS doesn't seem to care... - */ - put_word(res, cur->height); - /* FIXME: The next two are reversed in BRC and I don't - * know why. Probably a bug. But, we can safely ignore - * it because win16 does not support color cursors. - * A warning should have been generated by the parser. - */ - put_word(res, cur->planes); - put_word(res, cur->bits); - /* FIXME: The +4 is the hotspot in the cursor resource. - * However, I could not find this in the documentation. - * The hotspot bytes must either be included or MS - * doesn't care. - */ - put_dword(res, cur->data->size +4); - put_word(res, cur->id); - } - } - SetResSize(res, restag); /* Set ResourceSize */ - if(win32) - put_pad(res); - - return res; -} - -/* - ***************************************************************************** - * Function : cursor2res - * Syntax : res_t *cursor2res(cursor_t *cur) - * Input : - * cur - The cursor descriptor - * Output : New .res format structure - * Description : - * Remarks : - ***************************************************************************** -*/ -static res_t *cursor2res(cursor_t *cur) -{ - int restag; - res_t *res; - name_id_t name; - - assert(cur != NULL); - - res = new_res(); - name.type = name_ord; - name.name.i_name = cur->id; - restag = put_res_header(res, WRC_RT_CURSOR, NULL, &name, WRC_MO_MOVEABLE | WRC_MO_DISCARDABLE, &(cur->lvc)); - put_word(res, cur->xhot); - put_word(res, cur->yhot); - put_raw_data(res, cur->data, 0); - - SetResSize(res, restag); /* Set ResourceSize */ - if(win32) - put_pad(res); - - return res; -} - -/* - ***************************************************************************** - * Function : icongroup2res - * Syntax : res_t *icongroup2res(name_id_t *name, icon_group_t *icog) - * Input : - * name - Name/ordinal of the resource - * icog - The icon group descriptor - * Output : New .res format structure - * Description : - * Remarks : - ***************************************************************************** -*/ -static res_t *icongroup2res(name_id_t *name, icon_group_t *icog) -{ - int restag; - res_t *res; - icon_t *ico; - assert(name != NULL); - assert(icog != NULL); - - res = new_res(); - restag = put_res_header(res, WRC_RT_GROUP_ICON, NULL, name, icog->memopt, &(icog->lvc)); - if(win32) - { - put_word(res, 0); /* Reserved */ - /* FIXME: The ResType in the NEWHEADER structure should - * contain 14 according to the MS win32 doc. This is - * not the case with the BRC compiler and I really doubt - * the latter. Putting one here is compliant to win16 spec, - * but who knows the true value? - */ - put_word(res, 1); /* ResType */ - put_word(res, icog->nicon); - for(ico = icog->iconlist; ico; ico = ico->next) - { - put_byte(res, ico->width); - put_byte(res, ico->height); - put_byte(res, ico->nclr); - put_byte(res, 0); /* Reserved */ - put_word(res, ico->planes); - put_word(res, ico->bits); - put_dword(res, ico->data->size); - put_word(res, ico->id); - } - } - else /* win16 */ - { - put_word(res, 0); /* Reserved */ - put_word(res, 1); /* ResType */ - put_word(res, icog->nicon); - for(ico = icog->iconlist; ico; ico = ico->next) - { - put_byte(res, ico->width); - put_byte(res, ico->height); - put_byte(res, ico->nclr); - put_byte(res, 0); /* Reserved */ - put_word(res, ico->planes); - put_word(res, ico->bits); - put_dword(res, ico->data->size); - put_word(res, ico->id); - } - } - SetResSize(res, restag); /* Set ResourceSize */ - if(win32) - put_pad(res); - - return res; -} - -/* - ***************************************************************************** - * Function : icon2res - * Syntax : res_t *icon2res(icon_t *ico) - * Input : - * ico - The icon descriptor - * Output : New .res format structure - * Description : - * Remarks : - ***************************************************************************** -*/ -static res_t *icon2res(icon_t *ico) -{ - int restag; - res_t *res; - name_id_t name; - - assert(ico != NULL); - - res = new_res(); - name.type = name_ord; - name.name.i_name = ico->id; - restag = put_res_header(res, WRC_RT_ICON, NULL, &name, WRC_MO_MOVEABLE | WRC_MO_DISCARDABLE, &(ico->lvc)); - put_raw_data(res, ico->data, 0); - - SetResSize(res, restag); /* Set ResourceSize */ - if(win32) - put_pad(res); - - return res; -} - -/* - ***************************************************************************** - * Function : anicurico2res - * Syntax : res_t *anicurico2res(name_id_t *name, ani_curico_t *ani) - * Input : - * name - Name/ordinal of the resource - * ani - The animated object descriptor - * Output : New .res format structure - * Description : - * Remarks : The endian of the object's structures have been converted - * by the loader. - * There are rumors that win311 could handle animated stuff. - * That is why they are generated for both win16 and win32 - * compile. - ***************************************************************************** -*/ -static res_t *anicurico2res(name_id_t *name, ani_curico_t *ani, enum res_e type) -{ - int restag; - res_t *res; - assert(name != NULL); - assert(ani != NULL); - - res = new_res(); - restag = put_res_header(res, type == res_anicur ? WRC_RT_ANICURSOR : WRC_RT_ANIICON, - NULL, name, ani->memopt, NULL); - put_raw_data(res, ani->data, 0); - /* Set ResourceSize */ - SetResSize(res, restag); - if(win32) - put_pad(res); - return res; -} - -/* - ***************************************************************************** - * Function : bitmap2res - * Syntax : res_t *bitmap2res(name_id_t *name, bitmap_t *bmp) - * Input : - * name - Name/ordinal of the resource - * bmp - The bitmap descriptor - * Output : New .res format structure - * Description : - * Remarks : The endian of the bitmap structures have been converted - * by the loader. - ***************************************************************************** -*/ -static res_t *bitmap2res(name_id_t *name, bitmap_t *bmp) -{ - int restag; - res_t *res; - assert(name != NULL); - assert(bmp != NULL); - - res = new_res(); - restag = put_res_header(res, WRC_RT_BITMAP, NULL, name, bmp->memopt, &(bmp->data->lvc)); - if(bmp->data->data[0] == 'B' - && bmp->data->data[1] == 'M' - && ((BITMAPFILEHEADER *)bmp->data->data)->bfSize == bmp->data->size - && bmp->data->size >= sizeof(BITMAPFILEHEADER)) - { - /* The File header is still attached, don't write it */ - put_raw_data(res, bmp->data, sizeof(BITMAPFILEHEADER)); - } - else - { - put_raw_data(res, bmp->data, 0); - } - /* Set ResourceSize */ - SetResSize(res, restag); - if(win32) - put_pad(res); - return res; -} - -/* - ***************************************************************************** - * Function : font2res - * Syntax : res_t *font2res(name_id_t *name, font_t *fnt) - * Input : - * name - Name/ordinal of the resource - * fnt - The font descriptor - * Output : New .res format structure - * Description : - * Remarks : The data has been prepared just after parsing. - ***************************************************************************** -*/ -static res_t *font2res(name_id_t *name, font_t *fnt) -{ - int restag; - res_t *res; - assert(name != NULL); - assert(fnt != NULL); - - res = new_res(); - restag = put_res_header(res, WRC_RT_FONT, NULL, name, fnt->memopt, &(fnt->data->lvc)); - put_raw_data(res, fnt->data, 0); - /* Set ResourceSize */ - SetResSize(res, restag); - if(win32) - put_pad(res); - return res; -} - -/* - ***************************************************************************** - * Function : fontdir2res - * Syntax : res_t *fontdir2res(name_id_t *name, fontdir_t *fnd) - * Input : - * name - Name/ordinal of the resource - * fntdir - The fontdir descriptor - * Output : New .res format structure - * Description : - * Remarks : The data has been prepared just after parsing. - ***************************************************************************** -*/ -static res_t *fontdir2res(name_id_t *name, fontdir_t *fnd) -{ - int restag; - res_t *res; - assert(name != NULL); - assert(fnd != NULL); - - res = new_res(); - restag = put_res_header(res, WRC_RT_FONTDIR, NULL, name, fnd->memopt, &(fnd->data->lvc)); - put_raw_data(res, fnd->data, 0); - /* Set ResourceSize */ - SetResSize(res, restag); - if(win32) - put_pad(res); - return res; -} - -/* - ***************************************************************************** - * Function : html2res - * Syntax : res_t *html2res(name_id_t *name, html_t *html) - * Input : - * name - Name/ordinal of the resource - * rdt - The html descriptor - * Output : New .res format structure - * Description : - * Remarks : - ***************************************************************************** -*/ -static res_t *html2res(name_id_t *name, html_t *html) -{ - int restag; - res_t *res; - assert(name != NULL); - assert(html != NULL); - - res = new_res(); - restag = put_res_header(res, WRC_RT_HTML, NULL, name, html->memopt, &(html->data->lvc)); - put_raw_data(res, html->data, 0); - /* Set ResourceSize */ - SetResSize(res, restag); - if(win32) - put_pad(res); - return res; -} - -/* - ***************************************************************************** - * Function : rcdata2res - * Syntax : res_t *rcdata2res(name_id_t *name, rcdata_t *rdt) - * Input : - * name - Name/ordinal of the resource - * rdt - The rcdata descriptor - * Output : New .res format structure - * Description : - * Remarks : - ***************************************************************************** -*/ -static res_t *rcdata2res(name_id_t *name, rcdata_t *rdt) -{ - int restag; - res_t *res; - assert(name != NULL); - assert(rdt != NULL); - - res = new_res(); - restag = put_res_header(res, WRC_RT_RCDATA, NULL, name, rdt->memopt, &(rdt->data->lvc)); - put_raw_data(res, rdt->data, 0); - /* Set ResourceSize */ - SetResSize(res, restag); - if(win32) - put_pad(res); - return res; -} - -/* - ***************************************************************************** - * Function : messagetable2res - * Syntax : res_t *messagetable2res(name_id_t *name, messagetable_t *msg) - * Input : - * name - Name/ordinal of the resource - * msg - The messagetable descriptor - * Output : New .res format structure - * Description : - * Remarks : The data has been converted to the appropriate endian - * after it was parsed. - ***************************************************************************** -*/ -static res_t *messagetable2res(name_id_t *name, messagetable_t *msg) -{ - int restag; - res_t *res; - assert(name != NULL); - assert(msg != NULL); - - res = new_res(); - restag = put_res_header(res, WRC_RT_MESSAGETABLE, NULL, name, msg->memopt, &(msg->data->lvc)); - put_raw_data(res, msg->data, 0); - /* Set ResourceSize */ - SetResSize(res, restag); - if(win32) - put_pad(res); - return res; -} - -/* - ***************************************************************************** - * Function : stringtable2res - * Syntax : res_t *stringtable2res(stringtable_t *stt) - * Input : - * stt - The stringtable descriptor - * Output : New .res format structure - * Description : - * Remarks : - ***************************************************************************** -*/ -static res_t *stringtable2res(stringtable_t *stt) -{ - res_t *res; - name_id_t name; - int i; - int restag; - DWORD lastsize = 0; - - assert(stt != NULL); - res = new_res(); - - for(; stt; stt = stt->next) - { - if(!stt->nentries) - { - warning("Empty internal stringtable\n"); - continue; - } - name.type = name_ord; - name.name.i_name = (stt->idbase >> 4) + 1; - restag = put_res_header(res, WRC_RT_STRING, NULL, &name, stt->memopt, win32 ? &(stt->lvc) : NULL); - for(i = 0; i < stt->nentries; i++) - { - if(stt->entries[i].str && stt->entries[i].str->size) - { - put_string(res, stt->entries[i].str, win32 ? str_unicode : str_char, - FALSE, win32 ? stt->lvc.language : NULL); - } - else - { - if (win32) - put_word(res, 0); - else - put_byte(res, 0); - } - } - /* Set ResourceSize */ - SetResSize(res, restag - lastsize); - if(win32) - put_pad(res); - lastsize = res->size; - } - return res; -} - -/* - ***************************************************************************** - * Function : user2res - * Syntax : res_t *user2res(name_id_t *name, user_t *usr) - * Input : - * name - Name/ordinal of the resource - * usr - The userresource descriptor - * Output : New .res format structure - * Description : - * Remarks : - ***************************************************************************** -*/ -static res_t *user2res(name_id_t *name, user_t *usr) -{ - int restag; - res_t *res; - assert(name != NULL); - assert(usr != NULL); - - res = new_res(); - restag = put_res_header(res, 0, usr->type, name, usr->memopt, &(usr->data->lvc)); - put_raw_data(res, usr->data, 0); - /* Set ResourceSize */ - SetResSize(res, restag); - if(win32) - put_pad(res); - return res; -} - -/* - ***************************************************************************** - * Function : versionblock2res - * Syntax : void versionblock2res(res_t *res, ver_block_t *blk) - * Input : - * res - Binary resource to write to - * blk - The version block to be written - * Output : - * Description : - * Remarks : Self recursive - ***************************************************************************** -*/ -static void versionblock2res(res_t *res, ver_block_t *blk, int level, const language_t *lang) -{ - ver_value_t *val; - int blksizetag; - int valblksizetag; - int valvalsizetag; - int tag; - int i; - - blksizetag = res->size; - put_word(res, 0); /* Will be overwritten later */ - put_word(res, 0); - if(win32) - put_word(res, 0); /* level ? */ - put_string(res, blk->name, win32 ? str_unicode : str_char, TRUE, lang); - put_pad(res); - for(val = blk->values; val; val = val->next) - { - if(val->type == val_str) - { - valblksizetag = res->size; - put_word(res, 0); /* Will be overwritten later */ - valvalsizetag = res->size; - put_word(res, 0); /* Will be overwritten later */ - if(win32) - { - put_word(res, level); - } - put_string(res, val->key, win32 ? str_unicode : str_char, TRUE, lang); - put_pad(res); - tag = res->size; - put_string(res, val->value.str, win32 ? str_unicode : str_char, TRUE, lang); - if(win32) - set_word(res, valvalsizetag, (WORD)((res->size - tag) >> 1)); - else - set_word(res, valvalsizetag, (WORD)(res->size - tag)); - set_word(res, valblksizetag, (WORD)(res->size - valblksizetag)); - put_pad(res); - } - else if(val->type == val_words) - { - valblksizetag = res->size; - put_word(res, 0); /* Will be overwritten later */ - valvalsizetag = res->size; - put_word(res, 0); /* Will be overwritten later */ - if(win32) - { - put_word(res, level); - } - put_string(res, val->key, win32 ? str_unicode : str_char, TRUE, lang); - put_pad(res); - tag = res->size; - for(i = 0; i < val->value.words->nwords; i++) - { - put_word(res, val->value.words->words[i]); - } - set_word(res, valvalsizetag, (WORD)(res->size - tag)); - set_word(res, valblksizetag, (WORD)(res->size - valblksizetag)); - put_pad(res); - } - else if(val->type == val_block) - { - versionblock2res(res, val->value.block, level+1, lang); - } - else - { - internal_error(__FILE__, __LINE__, "Invalid value indicator %d in VERSIONINFO\n", val->type); - } - } - - /* Set blocksize */ - set_word(res, blksizetag, (WORD)(res->size - blksizetag)); -} - -/* - ***************************************************************************** - * Function : versioninfo2res - * Syntax : res_t *versioninfo2res(name_id_t *name, versioninfo_t *ver) - * Input : - * name - Name/ordinal of the resource - * ver - The versioninfo descriptor - * Output : New .res format structure - * Description : - * Remarks : - ***************************************************************************** -*/ -static res_t *versioninfo2res(name_id_t *name, versioninfo_t *ver) -{ - int restag; - int rootblocksizetag; - int valsizetag; - int tag; - res_t *res; - string_t vsvi; - ver_block_t *blk; - - assert(name != NULL); - assert(ver != NULL); - - vsvi.type = str_char; - vsvi.str.cstr = xstrdup("VS_VERSION_INFO"); - vsvi.size = 15; /* Excl. termination */ - - res = new_res(); - restag = put_res_header(res, WRC_RT_VERSION, NULL, name, ver->memopt, &(ver->lvc)); - rootblocksizetag = res->size; - put_word(res, 0); /* BlockSize filled in later */ - valsizetag = res->size; - put_word(res, 0); /* ValueSize filled in later*/ - if(win32) - put_word(res, 0); /* Tree-level ? */ - put_string(res, &vsvi, win32 ? str_unicode : str_char, - TRUE, win32 ? ver->lvc.language : NULL); - if(win32) - put_pad(res); - tag = res->size; - put_dword(res, VS_FFI_SIGNATURE); - put_dword(res, VS_FFI_STRUCVERSION); - put_dword(res, (ver->filever_maj1 << 16) + (ver->filever_maj2 & 0xffff)); - put_dword(res, (ver->filever_min1 << 16) + (ver->filever_min2 & 0xffff)); - put_dword(res, (ver->prodver_maj1 << 16) + (ver->prodver_maj2 & 0xffff)); - put_dword(res, (ver->prodver_min1 << 16) + (ver->prodver_min2 & 0xffff)); - put_dword(res, ver->fileflagsmask); - put_dword(res, ver->fileflags); - put_dword(res, ver->fileos); - put_dword(res, ver->filetype); - put_dword(res, ver->filesubtype); - put_dword(res, 0); /* FileDateMS */ - put_dword(res, 0); /* FileDateLS */ - /* Set ValueSize */ - set_word(res, valsizetag, (WORD)(res->size - tag)); - /* Descend into the blocks */ - for(blk = ver->blocks; blk; blk = blk->next) - versionblock2res(res, blk, 0, win32 ? ver->lvc.language : NULL); - /* Set root block's size */ - set_word(res, rootblocksizetag, (WORD)(res->size - rootblocksizetag)); - - SetResSize(res, restag); - if(win32) - put_pad(res); - - free(vsvi.str.cstr); - return res; -} - -/* - ***************************************************************************** - * Function : toolbaritem2res - * Syntax : void toolbaritem2res(res_t *res, toolbar_item_t *tbitem) - * Input : - * Output : nop - * Description : - * Remarks : Self recursive - ***************************************************************************** -*/ -static void toolbaritem2res(res_t *res, toolbar_item_t *tbitem) -{ - toolbar_item_t *itm = tbitem; - assert(win32 != 0); - while(itm) - { - put_word(res, itm->id); - itm = itm->next; - } - -} - -/* - ***************************************************************************** - * Function : toolbar2res - * Syntax : res_t *toolbar2res(name_id_t *name, toolbar_t *toolbar) - * Input : - * name - Name/ordinal of the resource - * toolbar - The toolbar descriptor - * Output : New .res format structure - * Description : - * Remarks : - ***************************************************************************** -*/ -static res_t *toolbar2res(name_id_t *name, toolbar_t *toolbar) -{ - int restag; - res_t *res; - assert(name != NULL); - assert(toolbar != NULL); - - res = new_res(); - if(win32) - { - restag = put_res_header(res, WRC_RT_TOOLBAR, NULL, name, toolbar->memopt, &(toolbar->lvc)); - - put_word(res, 1); /* Menuheader: Version */ - put_word(res, toolbar->button_width); /* (in pixels?) */ - put_word(res, toolbar->button_height); /* (in pixels?) */ - put_word(res, toolbar->nitems); - put_pad(res); - toolbaritem2res(res, toolbar->items); - /* Set ResourceSize */ - SetResSize(res, restag); - put_pad(res); - } - else /* win16 */ - { - /* Do not generate anything in 16-bit mode */ - free(res->data); - free(res); - return NULL; - } - return res; -} - -/* - ***************************************************************************** - * Function : dlginit2res - * Syntax : res_t *dlginit2res(name_id_t *name, dlginit_t *dit) - * Input : - * name - Name/ordinal of the resource - * rdt - The dlginit descriptor - * Output : New .res format structure - * Description : - * Remarks : - ***************************************************************************** -*/ -static res_t *dlginit2res(name_id_t *name, dlginit_t *dit) -{ - int restag; - res_t *res; - assert(name != NULL); - assert(dit != NULL); - - res = new_res(); - restag = put_res_header(res, WRC_RT_DLGINIT, NULL, name, dit->memopt, &(dit->data->lvc)); - put_raw_data(res, dit->data, 0); - /* Set ResourceSize */ - SetResSize(res, restag); - if(win32) - put_pad(res); - return res; -} - -/* - ***************************************************************************** - * Function : prep_nid_for_label - * Syntax : char *prep_nid_for_label(const name_id_t *nid) - * Input : - * Output : - * Description : Converts a resource name into the first 32 (or less) - * characters of the name with conversions. - * Remarks : - ***************************************************************************** -*/ -#define MAXNAMELEN 32 -char *prep_nid_for_label(const name_id_t *nid) -{ - static char buf[MAXNAMELEN+1]; - - assert(nid != NULL); - - if(nid->type == name_str && nid->name.s_name->type == str_unicode) - { - WCHAR *sptr; - int i; - sptr = nid->name.s_name->str.wstr; - buf[0] = '\0'; - for(i = 0; *sptr && i < MAXNAMELEN; i++) - { - if((unsigned)*sptr < 0x80 && isprint(*sptr & 0xff)) - buf[i] = *sptr++; - else - warning("Resourcename (str_unicode) contain unprintable characters or invalid translation, ignored\n"); - } - buf[i] = '\0'; - } - else if(nid->type == name_str && nid->name.s_name->type == str_char) - { - char *cptr; - int i; - cptr = nid->name.s_name->str.cstr; - buf[0] = '\0'; - for(i = 0; *cptr && i < MAXNAMELEN; i++) - { - if((unsigned)*cptr < 0x80 && isprint(*cptr & 0xff)) - buf[i] = *cptr++; - else - warning("Resourcename (str_char) contain unprintable characters, ignored\n"); - } - buf[i] = '\0'; - } - else if(nid->type == name_ord) - { - sprintf(buf, "%u", nid->name.i_name); - } - else - { - internal_error(__FILE__, __LINE__, "Resource name_id with invalid type %d\n", nid->type); - } - return buf; -} -#undef MAXNAMELEN - -/* - ***************************************************************************** - * Function : make_c_name - * Syntax : char *make_c_name(const char *base, const name_id_t *nid, const language_t *lan) - * Input : - * Output : - * Description : Converts a resource name into a valid c-identifier in the - * form "_base_nid". - * Remarks : - ***************************************************************************** -*/ -char *make_c_name(const char *base, const name_id_t *nid, const language_t *lan) -{ - char *buf = prep_nid_for_label(nid); - return strmake( "_%s_%s_%d", base, buf, lan ? MAKELANGID(lan->id, lan->sub) : 0); -} - -/* - ***************************************************************************** - * Function : get_c_typename - * Syntax : const char *get_c_typename(enum res_e type) - * Input : - * Output : - * Description : Convert resource enum to char string to be used in c-name - * creation. - * Remarks : - ***************************************************************************** -*/ -const char *get_c_typename(enum res_e type) -{ - switch(type) - { - case res_acc: return "Acc"; - case res_anicur:return "AniCur"; - case res_aniico:return "AniIco"; - case res_bmp: return "Bmp"; - case res_cur: return "Cur"; - case res_curg: return "CurGrp"; - case res_dlg: return "Dlg"; - case res_fnt: return "Fnt"; - case res_fntdir:return "FntDir"; - case res_ico: return "Ico"; - case res_icog: return "IcoGrp"; - case res_men: return "Men"; - case res_rdt: return "RCDat"; - case res_stt: return "StrTab"; - case res_usr: return "Usr"; - case res_msg: return "MsgTab"; - case res_ver: return "VerInf"; - case res_toolbar: return "TlBr"; - case res_dlginit: return "DlgInit"; - default: return "Oops"; - } -} - -/* - ***************************************************************************** - * Function : resources2res - * Syntax : void resources2res(resource_t *top) - * Input : - * top - The resource-tree to convert - * Output : - * Description : Convert logical resource descriptors into binary data - * Remarks : - ***************************************************************************** -*/ -void resources2res(resource_t *top) -{ - while(top) - { - switch(top->type) - { - case res_acc: - if(!top->binres) - top->binres = accelerator2res(top->name, top->res.acc); - break; - case res_bmp: - if(!top->binres) - top->binres = bitmap2res(top->name, top->res.bmp); - break; - case res_cur: - if(!top->binres) - top->binres = cursor2res(top->res.cur); - break; - case res_curg: - if(!top->binres) - top->binres = cursorgroup2res(top->name, top->res.curg); - break; - case res_dlg: - if(!top->binres) - top->binres = dialog2res(top->name, top->res.dlg); - break; - case res_fnt: - if(!top->binres) - top->binres = font2res(top->name, top->res.fnt); - break; - case res_fntdir: - if(!top->binres) - top->binres = fontdir2res(top->name, top->res.fnd); - break; - case res_ico: - if(!top->binres) - top->binres = icon2res(top->res.ico); - break; - case res_icog: - if(!top->binres) - top->binres = icongroup2res(top->name, top->res.icog); - break; - case res_men: - if(!top->binres) - top->binres = menu2res(top->name, top->res.men); - break; - case res_html: - if(!top->binres) - top->binres = html2res(top->name, top->res.html); - break; - case res_rdt: - if(!top->binres) - top->binres = rcdata2res(top->name, top->res.rdt); - break; - case res_stt: - if(!top->binres) - top->binres = stringtable2res(top->res.stt); - break; - case res_usr: - if(!top->binres) - top->binres = user2res(top->name, top->res.usr); - break; - case res_msg: - if(!top->binres) - top->binres = messagetable2res(top->name, top->res.msg); - break; - case res_ver: - if(!top->binres) - top->binres = versioninfo2res(top->name, top->res.ver); - break; - case res_toolbar: - if(!top->binres) - top->binres = toolbar2res(top->name, top->res.tbt); - break; - case res_dlginit: - if(!top->binres) - top->binres = dlginit2res(top->name, top->res.dlgi); - break; - case res_anicur: - case res_aniico: - if(!top->binres) - top->binres = anicurico2res(top->name, top->res.ani, top->type); - break; - default: - internal_error(__FILE__, __LINE__, "Unknown resource type encountered %d in binary res generation\n", top->type); - } - top->c_name = make_c_name(get_c_typename(top->type), top->name, top->lan); - top = top->next; - } -} diff --git a/reactos/tools/wrc/genres.h b/reactos/tools/wrc/genres.h deleted file mode 100644 index f8007d14cd9..00000000000 --- a/reactos/tools/wrc/genres.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Generate resource prototypes - * - * Copyright 1998 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 __WRC_GENRES_H -#define __WRC_GENRES_H - -#include "wrctypes.h" - -res_t *new_res(void); -res_t *grow_res(res_t *r, unsigned int add); -void put_byte(res_t *res, unsigned c); -void put_word(res_t *res, unsigned w); -void put_dword(res_t *res, unsigned d); -void resources2res(resource_t *top); -const char *get_c_typename(enum res_e type); -char *make_c_name(const char *base, const name_id_t *nid, const language_t *lan); -char *prep_nid_for_label(const name_id_t *nid); - -#endif diff --git a/reactos/tools/wrc/lex.yy.c b/reactos/tools/wrc/lex.yy.c deleted file mode 100644 index 4f3e64d4410..00000000000 --- a/reactos/tools/wrc/lex.yy.c +++ /dev/null @@ -1,2970 +0,0 @@ -#line 2 "lex.yy.c" - -#line 4 "lex.yy.c" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define yy_create_buffer parser__create_buffer -#define yy_delete_buffer parser__delete_buffer -#define yy_flex_debug parser__flex_debug -#define yy_init_buffer parser__init_buffer -#define yy_flush_buffer parser__flush_buffer -#define yy_load_buffer_state parser__load_buffer_state -#define yy_switch_to_buffer parser__switch_to_buffer -#define yyin parser_in -#define yyleng parser_leng -#define yylex parser_lex -#define yylineno parser_lineno -#define yyout parser_out -#define yyrestart parser_restart -#define yytext parser_text -#define yywrap parser_wrap -#define yyalloc parser_alloc -#define yyrealloc parser_realloc -#define yyfree parser_free - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! C99 */ - -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN (yy_start) = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START (((yy_start) - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE parser_restart(parser_in ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else -#define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -extern int parser_leng; - -extern FILE *parser_in, *parser_out; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up parser_text. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = (yy_hold_char); \ - YY_RESTORE_YY_MORE_OFFSET \ - (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up parser_text again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, (yytext_ptr) ) - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via parser_restart()), so that the user can continue scanning by - * just pointing parser_in at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* Stack of input buffers. */ -static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ -static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ - ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] - -/* yy_hold_char holds the character lost when parser_text is formed. */ -static char yy_hold_char; -static int yy_n_chars; /* number of characters read into yy_ch_buf */ -int parser_leng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; -static int yy_init = 0; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* Flag which is used to allow parser_wrap()'s to do buffer switches - * instead of setting up a fresh parser_in. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -void parser_restart (FILE *input_file ); -void parser__switch_to_buffer (YY_BUFFER_STATE new_buffer ); -YY_BUFFER_STATE parser__create_buffer (FILE *file,int size ); -void parser__delete_buffer (YY_BUFFER_STATE b ); -void parser__flush_buffer (YY_BUFFER_STATE b ); -void parser_push_buffer_state (YY_BUFFER_STATE new_buffer ); -void parser_pop_buffer_state (void ); - -static void parser_ensure_buffer_stack (void ); -static void parser__load_buffer_state (void ); -static void parser__init_buffer (YY_BUFFER_STATE b,FILE *file ); - -#define YY_FLUSH_BUFFER parser__flush_buffer(YY_CURRENT_BUFFER ) - -YY_BUFFER_STATE parser__scan_buffer (char *base,yy_size_t size ); -YY_BUFFER_STATE parser__scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE parser__scan_bytes (yyconst char *bytes,int len ); - -void *parser_alloc (yy_size_t ); -void *parser_realloc (void *,yy_size_t ); -void parser_free (void * ); - -#define yy_new_buffer parser__create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - parser_ensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - parser__create_buffer(parser_in,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - parser_ensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - parser__create_buffer(parser_in,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -#define parser_wrap(n) 1 -#define YY_SKIP_YYWRAP - -typedef unsigned char YY_CHAR; - -FILE *parser_in = (FILE *) 0, *parser_out = (FILE *) 0; - -typedef int yy_state_type; - -extern int parser_lineno; - -int parser_lineno = 1; - -extern char *parser_text; -#define yytext_ptr parser_text - -static yy_state_type yy_get_previous_state (void ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); -static int yy_get_next_buffer (void ); -static void yy_fatal_error (yyconst char msg[] ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up parser_text. - */ -#define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - parser_leng = (size_t) (yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ - *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; - -#define YY_NUM_RULES 80 -#define YY_END_OF_BUFFER 81 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[191] = - { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 70, 70, - 0, 0, 3, 3, 5, 5, 9, 9, 81, 79, - 77, 76, 77, 78, 41, 63, 17, 18, 14, 14, - 74, 17, 18, 12, 13, 77, 77, 2, 58, 62, - 43, 79, 39, 40, 21, 79, 68, 66, 67, 64, - 68, 70, 72, 71, 11, 10, 11, 11, 2, 3, - 5, 5, 9, 9, 77, 17, 18, 69, 18, 14, - 14, 17, 17, 74, 19, 77, 2, 2, 0, 58, - 42, 59, 56, 48, 56, 56, 44, 47, 49, 50, - 51, 52, 53, 54, 55, 56, 39, 20, 36, 34, - - 26, 34, 34, 22, 25, 27, 28, 29, 30, 31, - 32, 33, 34, 66, 65, 70, 71, 71, 73, 0, - 3, 5, 5, 9, 9, 9, 9, 9, 75, 18, - 16, 15, 0, 61, 48, 57, 60, 44, 47, 46, - 38, 26, 35, 37, 22, 25, 24, 5, 9, 8, - 9, 9, 16, 15, 0, 44, 45, 22, 24, 5, - 8, 9, 9, 0, 22, 24, 5, 9, 9, 0, - 22, 23, 5, 9, 9, 7, 0, 22, 5, 9, - 7, 1, 5, 9, 4, 9, 6, 4, 6, 0 - } ; - -static yyconst flex_int32_t yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 2, 4, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 5, 6, 7, 8, 6, 6, 6, 9, 10, - 11, 12, 6, 6, 6, 13, 14, 15, 16, 16, - 16, 16, 16, 16, 16, 17, 18, 6, 19, 6, - 6, 6, 6, 6, 20, 20, 20, 20, 20, 20, - 13, 13, 13, 13, 13, 21, 13, 13, 22, 13, - 13, 13, 13, 13, 13, 13, 13, 23, 13, 13, - 6, 24, 6, 6, 25, 6, 26, 27, 28, 29, - - 30, 31, 32, 13, 13, 13, 13, 33, 34, 35, - 36, 37, 13, 38, 13, 39, 40, 41, 13, 42, - 13, 13, 43, 6, 44, 6, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst flex_int32_t yy_meta[45] = - { 0, - 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, - 1, 4, 5, 5, 6, 6, 6, 6, 1, 6, - 5, 5, 5, 7, 5, 6, 6, 6, 6, 6, - 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 1, 1 - } ; - -static yyconst flex_int16_t yy_base[224] = - { 0, - 0, 43, 43, 46, 49, 51, 74, 104, 52, 54, - 57, 134, 419, 412, 56, 58, 59, 62, 414, 629, - 83, 629, 91, 629, 629, 629, 101, 68, 135, 75, - 0, 140, 388, 629, 629, 158, 165, 124, 0, 629, - 139, 175, 0, 629, 179, 215, 629, 170, 629, 629, - 0, 0, 629, 98, 629, 629, 372, 192, 183, 0, - 0, 347, 0, 256, 203, 131, 355, 629, 296, 201, - 175, 211, 327, 0, 629, 207, 243, 247, 328, 0, - 260, 629, 629, 234, 349, 331, 260, 271, 629, 629, - 629, 629, 629, 629, 629, 0, 0, 288, 629, 629, - - 264, 322, 307, 294, 301, 629, 629, 629, 629, 629, - 629, 629, 0, 277, 629, 0, 102, 308, 629, 319, - 0, 0, 284, 0, 0, 357, 269, 255, 0, 397, - 349, 207, 265, 629, 324, 629, 629, 315, 319, 0, - 629, 344, 629, 629, 359, 363, 0, 253, 383, 0, - 239, 232, 220, 336, 227, 374, 629, 395, 0, 230, - 0, 203, 204, 170, 402, 0, 166, 158, 419, 169, - 410, 629, 154, 143, 427, 0, 367, 418, 133, 101, - 0, 391, 97, 440, 0, 444, 0, 0, 0, 629, - 455, 462, 469, 476, 483, 490, 497, 504, 507, 511, - - 518, 525, 531, 538, 544, 117, 551, 558, 565, 572, - 579, 586, 112, 93, 593, 75, 68, 600, 62, 57, - 607, 614, 621 - } ; - -static yyconst flex_int16_t yy_def[224] = - { 0, - 190, 1, 191, 191, 192, 192, 193, 193, 194, 194, - 195, 195, 196, 196, 197, 197, 198, 198, 190, 190, - 190, 190, 190, 190, 190, 190, 199, 200, 199, 29, - 201, 199, 200, 190, 190, 190, 190, 190, 202, 190, - 190, 203, 204, 190, 190, 205, 190, 190, 190, 190, - 206, 207, 190, 208, 190, 190, 190, 190, 190, 209, - 210, 210, 211, 211, 190, 199, 200, 190, 212, 29, - 199, 199, 199, 201, 190, 190, 190, 190, 190, 202, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 213, 204, 190, 190, 190, - - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 214, 190, 190, 207, 208, 208, 190, 190, - 209, 210, 210, 211, 64, 64, 211, 211, 215, 212, - 199, 73, 190, 190, 190, 190, 190, 190, 190, 216, - 190, 190, 190, 190, 190, 190, 217, 210, 211, 218, - 211, 211, 199, 199, 190, 190, 190, 190, 219, 210, - 218, 211, 211, 190, 190, 220, 210, 211, 211, 190, - 190, 190, 210, 211, 211, 221, 190, 190, 210, 211, - 221, 190, 210, 211, 222, 211, 223, 222, 223, 0, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190 - } ; - -static yyconst flex_int16_t yy_nxt[674] = - { 0, - 20, 21, 22, 21, 23, 24, 25, 24, 26, 24, - 24, 24, 27, 28, 29, 30, 30, 30, 31, 27, - 32, 27, 27, 33, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 34, 35, 36, 40, 36, 37, 40, 41, - 38, 44, 41, 44, 53, 45, 53, 45, 20, 56, - 20, 20, 172, 54, 20, 54, 42, 166, 64, 42, - 57, 64, 46, 159, 46, 48, 49, 48, 48, 68, - 157, 69, 50, 62, 65, 62, 65, 65, 51, 51, - 51, 51, 65, 51, 65, 65, 66, 66, 147, 51, - - 51, 51, 51, 51, 51, 48, 49, 48, 48, 118, - 66, 119, 50, 190, 67, 190, 66, 140, 51, 51, - 51, 51, 115, 51, 67, 78, 185, 78, 78, 51, - 51, 51, 51, 51, 51, 58, 56, 58, 58, 184, - 81, 59, 81, 81, 67, 82, 75, 57, 67, 70, - 70, 70, 70, 67, 67, 71, 72, 73, 67, 76, - 79, 76, 76, 67, 183, 77, 76, 71, 76, 76, - 72, 114, 77, 114, 114, 180, 73, 84, 85, 179, - 98, 86, 98, 98, 78, 99, 78, 78, 67, 87, - 87, 88, 88, 120, 177, 120, 120, 174, 67, 77, - - 89, 90, 173, 170, 65, 91, 65, 65, 76, 92, - 76, 76, 93, 94, 77, 95, 96, 101, 102, 79, - 169, 103, 66, 66, 67, 131, 131, 154, 168, 104, - 104, 105, 105, 67, 67, 135, 66, 135, 135, 154, - 106, 107, 66, 67, 78, 108, 78, 78, 78, 109, - 78, 78, 110, 111, 167, 112, 113, 125, 164, 125, - 125, 81, 163, 81, 81, 142, 134, 142, 142, 162, - 126, 126, 126, 126, 138, 138, 139, 139, 114, 79, - 114, 114, 160, 79, 127, 139, 139, 139, 139, 98, - 155, 98, 98, 152, 141, 128, 129, 129, 151, 129, - - 129, 129, 129, 129, 129, 129, 129, 129, 145, 145, - 146, 146, 148, 144, 129, 146, 146, 146, 146, 118, - 120, 119, 120, 120, 143, 135, 77, 135, 135, 156, - 156, 139, 139, 139, 139, 139, 139, 137, 129, 129, - 67, 132, 132, 132, 132, 142, 132, 142, 142, 67, - 67, 136, 132, 132, 132, 132, 132, 132, 149, 67, - 149, 149, 67, 131, 131, 133, 190, 150, 182, 153, - 182, 182, 67, 158, 158, 146, 146, 146, 146, 146, - 146, 153, 123, 68, 149, 124, 149, 149, 139, 139, - 139, 139, 182, 150, 182, 182, 124, 129, 129, 190, - - 129, 129, 129, 129, 129, 129, 129, 129, 129, 165, - 165, 146, 146, 190, 20, 129, 171, 171, 146, 146, - 175, 20, 175, 175, 178, 178, 146, 146, 175, 176, - 175, 175, 146, 146, 146, 146, 190, 176, 190, 129, - 129, 186, 190, 186, 186, 186, 190, 186, 186, 190, - 187, 190, 190, 190, 187, 39, 39, 39, 39, 39, - 39, 39, 43, 43, 43, 43, 43, 43, 43, 47, - 47, 47, 47, 47, 47, 47, 52, 52, 52, 52, - 52, 52, 52, 55, 55, 55, 55, 55, 55, 55, - 60, 60, 60, 60, 60, 60, 60, 61, 61, 61, - - 61, 61, 61, 61, 63, 63, 63, 63, 63, 63, - 63, 66, 66, 66, 67, 67, 67, 67, 74, 190, - 74, 74, 74, 74, 74, 80, 190, 190, 80, 80, - 80, 83, 83, 83, 83, 83, 83, 83, 97, 190, - 190, 97, 97, 97, 100, 100, 100, 100, 100, 100, - 100, 116, 190, 116, 190, 116, 116, 116, 117, 190, - 117, 117, 117, 117, 117, 121, 190, 121, 121, 121, - 121, 121, 122, 190, 122, 122, 122, 122, 122, 124, - 190, 124, 124, 124, 124, 124, 130, 190, 130, 130, - 130, 130, 130, 129, 190, 129, 129, 129, 129, 129, - - 161, 190, 161, 161, 161, 161, 161, 181, 190, 181, - 181, 181, 181, 181, 188, 190, 188, 188, 188, 188, - 188, 189, 190, 189, 189, 189, 189, 189, 19, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190 - } ; - -static yyconst flex_int16_t yy_chk[674] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 3, 2, 2, 4, 3, - 2, 5, 4, 6, 9, 5, 10, 6, 15, 11, - 16, 17, 220, 9, 18, 10, 3, 219, 17, 4, - 11, 18, 5, 217, 6, 7, 7, 7, 7, 28, - 216, 28, 7, 15, 21, 16, 21, 21, 7, 7, - 7, 7, 23, 7, 23, 23, 30, 30, 214, 7, - - 7, 7, 7, 7, 7, 8, 8, 8, 8, 54, - 30, 54, 8, 117, 27, 117, 30, 213, 8, 8, - 8, 8, 206, 8, 27, 38, 183, 38, 38, 8, - 8, 8, 8, 8, 8, 12, 12, 12, 12, 180, - 41, 12, 41, 41, 66, 41, 32, 12, 29, 29, - 29, 29, 29, 32, 66, 29, 29, 29, 29, 36, - 38, 36, 36, 32, 179, 36, 37, 29, 37, 37, - 29, 48, 37, 48, 48, 174, 29, 42, 42, 173, - 45, 42, 45, 45, 59, 45, 59, 59, 71, 42, - 42, 42, 42, 58, 170, 58, 58, 168, 71, 58, - - 42, 42, 167, 164, 65, 42, 65, 65, 76, 42, - 76, 76, 42, 42, 76, 42, 42, 46, 46, 59, - 163, 46, 70, 70, 72, 72, 72, 132, 162, 46, - 46, 46, 46, 153, 72, 84, 70, 84, 84, 132, - 46, 46, 70, 153, 77, 46, 77, 77, 78, 46, - 78, 78, 46, 46, 160, 46, 46, 64, 155, 64, - 64, 81, 152, 81, 81, 101, 81, 101, 101, 151, - 64, 64, 64, 64, 87, 87, 87, 87, 114, 77, - 114, 114, 148, 78, 64, 88, 88, 88, 88, 98, - 133, 98, 98, 128, 98, 64, 69, 69, 127, 69, - - 69, 69, 69, 69, 69, 69, 69, 69, 104, 104, - 104, 104, 123, 103, 69, 105, 105, 105, 105, 118, - 120, 118, 120, 120, 102, 135, 120, 135, 135, 138, - 138, 138, 138, 139, 139, 139, 139, 86, 69, 69, - 73, 73, 73, 73, 73, 142, 73, 142, 142, 154, - 73, 85, 73, 73, 73, 73, 73, 73, 126, 154, - 126, 126, 131, 131, 131, 79, 67, 126, 177, 131, - 177, 177, 131, 145, 145, 145, 145, 146, 146, 146, - 146, 131, 62, 57, 149, 126, 149, 149, 156, 156, - 156, 156, 182, 149, 182, 182, 126, 130, 130, 33, - - 130, 130, 130, 130, 130, 130, 130, 130, 130, 158, - 158, 158, 158, 19, 14, 130, 165, 165, 165, 165, - 169, 13, 169, 169, 171, 171, 171, 171, 175, 169, - 175, 175, 178, 178, 178, 178, 0, 175, 0, 130, - 130, 184, 0, 184, 184, 186, 0, 186, 186, 0, - 184, 0, 0, 0, 186, 191, 191, 191, 191, 191, - 191, 191, 192, 192, 192, 192, 192, 192, 192, 193, - 193, 193, 193, 193, 193, 193, 194, 194, 194, 194, - 194, 194, 194, 195, 195, 195, 195, 195, 195, 195, - 196, 196, 196, 196, 196, 196, 196, 197, 197, 197, - - 197, 197, 197, 197, 198, 198, 198, 198, 198, 198, - 198, 199, 199, 199, 200, 200, 200, 200, 201, 0, - 201, 201, 201, 201, 201, 202, 0, 0, 202, 202, - 202, 203, 203, 203, 203, 203, 203, 203, 204, 0, - 0, 204, 204, 204, 205, 205, 205, 205, 205, 205, - 205, 207, 0, 207, 0, 207, 207, 207, 208, 0, - 208, 208, 208, 208, 208, 209, 0, 209, 209, 209, - 209, 209, 210, 0, 210, 210, 210, 210, 210, 211, - 0, 211, 211, 211, 211, 211, 212, 0, 212, 212, - 212, 212, 212, 215, 0, 215, 215, 215, 215, 215, - - 218, 0, 218, 218, 218, 218, 218, 221, 0, 221, - 221, 221, 221, 221, 222, 0, 222, 222, 222, 222, - 222, 223, 0, 223, 223, 223, 223, 223, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - 190, 190, 190 - } ; - -static yy_state_type yy_last_accepting_state; -static char *yy_last_accepting_cpos; - -extern int parser__flex_debug; -int parser__flex_debug = 0; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -char *parser_text; -#line 1 "parser.l" -/* -*-C-*- - * - * Copyright 1998-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 - * - * History: - * 21-May-2000 BS - Fixed the ident requirement of resource names - * which can be keywords. - * 30-Apr-2000 BS - Reintegration into the wine-tree - * 11-Jan-2000 BS - Very drastic cleanup because we don't have a - * preprocessor in here anymore. - * 02-Jan-2000 BS - Removed the preprocessor code - * 23-Dec-1999 BS - Removed the copyright for Martin von Loewis. - * There is really nothing left of his code in - * this parser. - * 20-Jun-1998 BS - Changed the filename conversion. Filenames are - * case-sensitive inder *nix, but not under dos. - * default behaviour is to convert to lower case. - * - All backslashes are converted to forward and - * both single and double slash is recognized as - * MS/Borland does. - * - Fixed a bug in 'yywf' case that prevented - * double quoted names to be scanned propperly. - * - * 19-May-1998 BS - Started to build a preprocessor. - * - Changed keyword processing completely to - * table-lookups. - * - * 20-Apr-1998 BS - Added ';' comment stripping - * - * 17-Apr-1998 BS - Made the win32 keywords optional when compiling in - * 16bit mode - * - * 15-Apr-1998 BS - Changed string handling to include escapes - * - Added unicode string handling (no codepage - * translation though). - * - 'Borrowed' the main idea of string scanning from - * the flex manual pages. - * - Added conditional handling of scanning depending - * on the state of the parser. This was mainly required - * to distinguish a file to load or raw data that - * follows. MS's definition of filenames is rather - * complex... It can be unquoted or double quoted. If - * double quoted, then the '\\' char is not automatically - * escaped according to Borland's rc compiler, but it - * accepts both "\\path\\file.rc" and "\path\file.rc". - * This makes life very hard! I go for the escaped - * version, as this seems to be the documented way... - * - Single quoted strings are now parsed and converted - * here. - * - Added comment stripping. The implementation is - * 'borrowed' from the flex manpages. - * - Rebuild string processing so that it may contain - * escaped '\0'. - */ -/* Exclusive string handling */ - -/* Exclusive unicode string handling */ - -/* Exclusive rcdata single quoted data handling */ - -/* Exclusive comment eating... */ - -/* Set when stripping c-junk */ - -/* Set when scanning #line style directives */ - -/* Set when scanning #pragma */ - - -#define YY_NO_INPUT 1 -/* Some shortcut definitions */ -#line 96 "parser.l" - -/*#define LEX_DEBUG*/ - -#include "config.h" - -#include -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#else -#define YY_NO_UNISTD_H -#endif - -#include "wine/unicode.h" -#include "wrc.h" -#include "utils.h" -#include "parser.h" -#include "newstruc.h" - -#include "parser.tab.h" - -/* Always update the current character position within a line */ -#define YY_USER_ACTION char_number+=parser_leng; wanted_id = want_id; want_id = 0; - -#define YY_USER_INIT current_codepage = -1; - -static void addcchar(char c); -static void addwchar(WCHAR s); -static string_t *get_buffered_cstring(void); -static string_t *get_buffered_wstring(void); -static string_t *make_string(char *s); - -static char *cbuffer; /* Buffers for string collection */ -static int cbufidx; -static int cbufalloc = 0; -static WCHAR *wbuffer; -static int wbufidx; -static int wbufalloc = 0; - -static int current_codepage = -1; /* use language default */ - -/* - * This one is a bit tricky. - * We set 'want_id' in the parser to get the first - * identifier we get across in the scanner, but we - * also want it to be reset at nearly any token we - * see. Exceptions are: - * - newlines - * - comments - * - whitespace - * - * The scanner will automatically reset 'want_id' - * after *each* scanner reduction and puts is value - * into the var below. In this way we can see the - * state after the YY_RULE_SETUP (i.e. the user action; - * see above) and don't have to worry too much when - * it needs to be reset. - */ -static int wanted_id = 0; -static int save_wanted_id; /* To save across comment reductions */ - -struct keyword { - const char *keyword; - int token; - int isextension; - int needcase; - int alwayskw; -}; - -static struct keyword keywords[] = { - { "ACCELERATORS", tACCELERATORS, 0, 0, 0}, - { "ALT", tALT, 0, 0, 0}, - { "ASCII", tASCII, 0, 0, 0}, - { "AUTO3STATE", tAUTO3STATE, 1, 0, 0}, - { "AUTOCHECKBOX", tAUTOCHECKBOX, 1, 0, 0}, - { "AUTORADIOBUTTON", tAUTORADIOBUTTON, 1, 0, 0}, - { "BEGIN", tBEGIN, 0, 0, 0}, - { "BITMAP", tBITMAP, 0, 0, 0}, - { "BLOCK", tBLOCK, 0, 0, 0}, - { "BUTTON", tBUTTON, 1, 0, 0}, - { "CAPTION", tCAPTION, 0, 0, 0}, - { "CHARACTERISTICS", tCHARACTERISTICS, 1, 0, 0}, - { "CHECKBOX", tCHECKBOX, 0, 0, 0}, - { "CHECKED", tCHECKED, 0, 0, 0}, - { "CLASS", tCLASS, 0, 0, 0}, - { "COMBOBOX", tCOMBOBOX, 0, 0, 0}, - { "CONTROL", tCONTROL, 0, 0, 0}, - { "CTEXT", tCTEXT, 0, 0, 0}, - { "CURSOR", tCURSOR, 0, 0, 0}, - { "DEFPUSHBUTTON", tDEFPUSHBUTTON, 0, 0, 0}, - { "DIALOG", tDIALOG, 0, 0, 0}, - { "DIALOGEX", tDIALOGEX, 1, 0, 0}, - { "DISCARDABLE", tDISCARDABLE, 0, 0, 0}, - { "DLGINIT", tDLGINIT, 0, 0, 0}, - { "EDITTEXT", tEDITTEXT, 0, 0, 0}, - { "END", tEND, 0, 0, 0}, - { "EXSTYLE", tEXSTYLE, 0, 0, 0}, - { "FILEFLAGS", tFILEFLAGS, 0, 0, 0}, - { "FILEFLAGSMASK", tFILEFLAGSMASK, 0, 0, 0}, - { "FILEOS", tFILEOS, 0, 0, 0}, - { "FILESUBTYPE", tFILESUBTYPE, 0, 0, 0}, - { "FILETYPE", tFILETYPE, 0, 0, 0}, - { "FILEVERSION", tFILEVERSION, 0, 0, 0}, - { "FIXED", tFIXED, 0, 0, 0}, - { "FONT", tFONT, 0, 0, 0}, - { "FONTDIR", tFONTDIR, 0, 0, 0}, /* This is a Borland BRC extension */ - { "GRAYED", tGRAYED, 0, 0, 0}, - { "GROUPBOX", tGROUPBOX, 0, 0, 0}, - { "HELP", tHELP, 0, 0, 0}, - { "HTML", tHTML, 0, 0, 0}, - { "ICON", tICON, 0, 0, 0}, - { "IMPURE", tIMPURE, 0, 0, 0}, - { "INACTIVE", tINACTIVE, 0, 0, 0}, - { "LANGUAGE", tLANGUAGE, 1, 0, 1}, - { "LISTBOX", tLISTBOX, 0, 0, 0}, - { "LOADONCALL", tLOADONCALL, 0, 0, 0}, - { "LTEXT", tLTEXT, 0, 0, 0}, - { "MENU", tMENU, 0, 0, 0}, - { "MENUBARBREAK", tMENUBARBREAK, 0, 0, 0}, - { "MENUBREAK", tMENUBREAK, 0, 0, 0}, - { "MENUEX", tMENUEX, 1, 0, 0}, - { "MENUITEM", tMENUITEM, 0, 0, 0}, - { "MESSAGETABLE", tMESSAGETABLE, 1, 0, 0}, - { "MOVEABLE", tMOVEABLE, 0, 0, 0}, - { "NOINVERT", tNOINVERT, 0, 0, 0}, - { "NOT", tNOT, 0, 0, 0}, - { "POPUP", tPOPUP, 0, 0, 0}, - { "PRELOAD", tPRELOAD, 0, 0, 0}, - { "PRODUCTVERSION", tPRODUCTVERSION, 0, 0, 0}, - { "PURE", tPURE, 0, 0, 0}, - { "PUSHBUTTON", tPUSHBUTTON, 0, 0, 0}, - { "RADIOBUTTON", tRADIOBUTTON, 0, 0, 0}, - { "RCDATA", tRCDATA, 0, 0, 0}, - { "RTEXT", tRTEXT, 0, 0, 0}, - { "SCROLLBAR", tSCROLLBAR, 0, 0, 0}, - { "SEPARATOR", tSEPARATOR, 0, 0, 0}, - { "SHIFT", tSHIFT, 0, 0, 0}, - { "STATE3", tSTATE3, 1, 0, 0}, - { "STRING", tSTRING, 0, 0, 0}, - { "STRINGTABLE", tSTRINGTABLE, 0, 0, 1}, - { "STYLE", tSTYLE, 0, 0, 0}, - { "TOOLBAR", tTOOLBAR, 1, 0, 0}, - { "VALUE", tVALUE, 0, 0, 0}, - { "VERSION", tVERSION, 1, 0, 0}, - { "VERSIONINFO", tVERSIONINFO, 0, 0, 0}, - { "VIRTKEY", tVIRTKEY, 0, 0, 0} -}; - -#define NKEYWORDS (sizeof(keywords)/sizeof(keywords[0])) -#define KWP(p) ((const struct keyword *)(p)) -static int kw_cmp_func(const void *s1, const void *s2) -{ - int ret; - ret = strcasecmp(KWP(s1)->keyword, KWP(s2)->keyword); - if(!ret && (KWP(s1)->needcase || KWP(s2)->needcase)) - return strcmp(KWP(s1)->keyword, KWP(s2)->keyword); - else - return ret; -} - -#define KW_BSEARCH -#define DO_SORT -static struct keyword *iskeyword(char *kw) -{ - struct keyword *kwp; - struct keyword key; - key.keyword = kw; - key.needcase = 0; -#ifdef DO_SORT - { - /* Make sure that it is sorted for bsearsh */ - static int sorted = 0; - if(!sorted) - { - qsort(keywords, NKEYWORDS, sizeof(keywords[0]), kw_cmp_func); - sorted = 1; - } - } -#endif -#ifdef KW_BSEARCH - kwp = bsearch(&key, keywords, NKEYWORDS, sizeof(keywords[0]), kw_cmp_func); -#else - { - int i; - for(i = 0; i < NKEYWORDS; i++) - { - if(!kw_cmp_func(&key, &keywords[i])) - break; - } - if(i < NKEYWORDS) - kwp = &keywords[i]; - else - kwp = NULL; - } -#endif - - if(kwp == NULL || (kwp->isextension && !extensions)) - return NULL; - else - return kwp; -} - -/* converts an integer in string form to an unsigned long and prints an error - * on overflow */ -static unsigned long xstrtoul(const char *nptr, char **endptr, int base) -{ - unsigned long l; - - errno = 0; - l = strtoul(nptr, endptr, base); - if (l == ULONG_MAX && errno == ERANGE) - parser_error("integer constant %s is too large", nptr); - return l; -} - -/* - ************************************************************************** - * The flexer starts here - ************************************************************************** - */ -#line 1010 "lex.yy.c" - -#define INITIAL 0 -#define tkstr 1 -#define tklstr 2 -#define tkrcd 3 -#define comment 4 -#define pp_cstrip 5 -#define pp_line 6 -#define pp_pragma 7 -#define pp_code_page 8 - -#ifndef YY_NO_UNISTD_H -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -#include -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -static int yy_init_globals (void ); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int parser_lex_destroy (void ); - -int parser_get_debug (void ); - -void parser_set_debug (int debug_flag ); - -YY_EXTRA_TYPE parser_get_extra (void ); - -void parser_set_extra (YY_EXTRA_TYPE user_defined ); - -FILE *parser_get_in (void ); - -void parser_set_in (FILE * in_str ); - -FILE *parser_get_out (void ); - -void parser_set_out (FILE * out_str ); - -int parser_get_leng (void ); - -char *parser_get_text (void ); - -int parser_get_lineno (void ); - -void parser_set_lineno (int line_number ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int parser_wrap (void ); -#else -extern int parser_wrap (void ); -#endif -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (void ); -#else -static int input (void ); -#endif - -#endif - - static int yy_start_stack_ptr = 0; - static int yy_start_stack_depth = 0; - static int *yy_start_stack = NULL; - - static void yy_push_state (int new_state ); - - static void yy_pop_state (void ); - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else -#define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO do { if (fwrite( parser_text, parser_leng, 1, parser_out )) {} } while (0) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( parser_in )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( parser_in ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = fread(buf, 1, max_size, parser_in))==0 && ferror(parser_in)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(parser_in); \ - } \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int parser_lex (void); - -#define YY_DECL int parser_lex (void) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after parser_text and parser_leng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - if ( parser_leng > 0 ) \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ - (parser_text[parser_leng - 1] == '\n'); \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - -#line 324 "parser.l" - - /* - * Catch the GCC-style line statements here and parse them. - * This has the advantage that you can #include at any - * stage in the resource file. - * The preprocessor generates line directives in the format: - * # "filename" - * - * Codes can be a sequence of: - * - 1 start of new file - * - 2 returning to previous - * - 3 system header - * - 4 interpret as C-code - * - * 4 is not used and 1 mutually excludes 2 - * Anyhow, we are not really interested in these at all - * because we only want to know the linenumber and - * filename. - */ -#line 1234 "lex.yy.c" - - if ( !(yy_init) ) - { - (yy_init) = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! (yy_start) ) - (yy_start) = 1; /* first start state */ - - if ( ! parser_in ) - parser_in = stdin; - - if ( ! parser_out ) - parser_out = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - parser_ensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - parser__create_buffer(parser_in,YY_BUF_SIZE ); - } - - parser__load_buffer_state( ); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = (yy_c_buf_p); - - /* Support of parser_text. */ - *yy_cp = (yy_hold_char); - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = (yy_start); - yy_current_state += YY_AT_BOL(); -yy_match: - do - { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 191 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_current_state != 190 ); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = (yy_hold_char); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - -case 1: -YY_RULE_SETUP -#line 343 "parser.l" -yy_push_state(pp_pragma); - YY_BREAK -case 2: -YY_RULE_SETUP -#line 344 "parser.l" -yy_push_state(pp_line); - YY_BREAK -case 3: -YY_RULE_SETUP -#line 345 "parser.l" -{ - int lineno, len; - char *cptr; - char *fname; - yy_pop_state(); - lineno = (int)strtol(parser_text, &cptr, 10); - if(!lineno) - parser_error("Malformed '#...' line-directive; invalid linenumber"); - fname = strchr(cptr, '"'); - if(!fname) - parser_error("Malformed '#...' line-directive; missing filename"); - fname++; - cptr = strchr(fname, '"'); - if(!cptr) - parser_error("Malformed '#...' line-directive; missing terminating \""); - *cptr = '\0'; - line_number = lineno - 1; /* We didn't read the newline */ - input_name = xstrdup(fname); - /* ignore contents of C include files */ - len = strlen(input_name); - if (len > 1 && !strcasecmp( input_name + len - 2, ".h" )) - BEGIN(pp_cstrip); - else - BEGIN(INITIAL); - } - YY_BREAK -case 4: -YY_RULE_SETUP -#line 371 "parser.l" -yyless(9); yy_pop_state(); yy_push_state(pp_code_page); - YY_BREAK -case 5: -YY_RULE_SETUP -#line 372 "parser.l" -yy_pop_state(); if (pedantic) parser_warning("Unrecognized #pragma directive '%s'\n",parser_text); - YY_BREAK -case 6: -YY_RULE_SETUP -#line 374 "parser.l" -current_codepage = -1; yy_pop_state(); - YY_BREAK -case 7: -YY_RULE_SETUP -#line 375 "parser.l" -current_codepage = CP_UTF8; yy_pop_state(); - YY_BREAK -case 8: -YY_RULE_SETUP -#line 376 "parser.l" -{ - char *p = parser_text; - yy_pop_state(); - while (*p < '0' || *p > '9') p++; - current_codepage = strtol( p, NULL, 10 ); - if (current_codepage != CP_UTF8 && !wine_cp_get_table( current_codepage )) - { - parser_error("Codepage %d not supported", current_codepage); - current_codepage = 0; - } - } - YY_BREAK -case 9: -YY_RULE_SETUP -#line 387 "parser.l" -yy_pop_state(); parser_error("Malformed #pragma code_page directive"); - YY_BREAK -/* - * Strip everything until a ';' taking - * into account braces {} for structures, - * classes and enums. - */ -case 10: -/* rule 10 can match eol */ -YY_RULE_SETUP -#line 394 "parser.l" -line_number++; char_number = 1; - YY_BREAK -case 11: -YY_RULE_SETUP -#line 395 "parser.l" -; /* ignore */ - YY_BREAK -case 12: -YY_RULE_SETUP -#line 397 "parser.l" -return tBEGIN; - YY_BREAK -case 13: -YY_RULE_SETUP -#line 398 "parser.l" -return tEND; - YY_BREAK -case 14: -YY_RULE_SETUP -#line 400 "parser.l" -{ parser_lval.num = xstrtoul(parser_text, 0, 10); - return (parser_text[parser_leng-1] == 'L' || parser_text[parser_leng-1] == 'l') ? tLNUMBER : tNUMBER; } - YY_BREAK -case 15: -YY_RULE_SETUP -#line 402 "parser.l" -{ parser_lval.num = xstrtoul(parser_text, 0, 16); - return (parser_text[parser_leng-1] == 'L' || parser_text[parser_leng-1] == 'l') ? tLNUMBER : tNUMBER; } - YY_BREAK -case 16: -YY_RULE_SETUP -#line 404 "parser.l" -{ parser_lval.num = xstrtoul(parser_text+2, 0, 8); - return (parser_text[parser_leng-1] == 'L' || parser_text[parser_leng-1] == 'l') ? tLNUMBER : tNUMBER; } - YY_BREAK -/* - * The next two rules scan identifiers and filenames. - * This is achieved by using the priority ruling - * of the scanner where a '.' is valid in a filename - * and *only* in a filename. In this case, the second - * rule will be reduced because it is longer. - */ -case 17: -YY_RULE_SETUP -#line 414 "parser.l" -{ - struct keyword *tok = iskeyword(parser_text); - - if(tok) - { - if(wanted_id && !tok->alwayskw) - { - parser_lval.str = make_string(parser_text); - return tIDENT; - } - else - return tok->token; - } - else - { - parser_lval.str = make_string(parser_text); - return tIDENT; - } - } - YY_BREAK -case 18: -YY_RULE_SETUP -#line 433 "parser.l" -parser_lval.str = make_string(parser_text); return tFILENAME; - YY_BREAK -/* - * Wide string scanning - */ -case 19: -YY_RULE_SETUP -#line 438 "parser.l" -{ - yy_push_state(tklstr); - wbufidx = 0; - if(!win32) - parser_warning("16bit resource contains unicode strings\n"); - } - YY_BREAK -case 20: -#line 445 "parser.l" -case 21: -YY_RULE_SETUP -#line 445 "parser.l" -{ - yy_pop_state(); - parser_lval.str = get_buffered_wstring(); - return tSTRING; - } - YY_BREAK -case 22: -YY_RULE_SETUP -#line 450 "parser.l" -{ /* octal escape sequence */ - unsigned int result; - result = strtoul(parser_text+1, 0, 8); - if ( result > 0xffff ) - parser_error("Character constant out of range"); - addwchar((WCHAR)result); - } - YY_BREAK -case 23: -YY_RULE_SETUP -#line 457 "parser.l" -{ /* hex escape sequence */ - unsigned int result; - result = strtoul(parser_text+2, 0, 16); - addwchar((WCHAR)result); - } - YY_BREAK -case 24: -YY_RULE_SETUP -#line 462 "parser.l" -{ parser_error("Invalid hex escape sequence '%s'", parser_text); } - YY_BREAK -case 25: -YY_RULE_SETUP -#line 464 "parser.l" -parser_error("Bad escape sequence"); - YY_BREAK -case 26: -/* rule 26 can match eol */ -YY_RULE_SETUP -#line 465 "parser.l" -line_number++; char_number = 1; /* backslash at EOL continues string after leading whitespace on next line */ - YY_BREAK -case 27: -YY_RULE_SETUP -#line 466 "parser.l" -addwchar('\a'); - YY_BREAK -case 28: -YY_RULE_SETUP -#line 467 "parser.l" -addwchar('\b'); - YY_BREAK -case 29: -YY_RULE_SETUP -#line 468 "parser.l" -addwchar('\f'); - YY_BREAK -case 30: -YY_RULE_SETUP -#line 469 "parser.l" -addwchar('\n'); - YY_BREAK -case 31: -YY_RULE_SETUP -#line 470 "parser.l" -addwchar('\r'); - YY_BREAK -case 32: -YY_RULE_SETUP -#line 471 "parser.l" -addwchar('\t'); - YY_BREAK -case 33: -YY_RULE_SETUP -#line 472 "parser.l" -addwchar('\v'); - YY_BREAK -case 34: -YY_RULE_SETUP -#line 473 "parser.l" -{ - if (parser_text[1] & 0x80) - parser_error("Invalid char %u in wide string", (unsigned char)parser_text[1]); - addwchar(parser_text[1]); - } - YY_BREAK -case 35: -/* rule 35 can match eol */ -YY_RULE_SETUP -#line 478 "parser.l" -addwchar(parser_text[2]); line_number++; char_number = 1; - YY_BREAK -case 36: -YY_RULE_SETUP -#line 479 "parser.l" -addwchar('\"'); /* "bla""bla" -> "bla\"bla" */ - YY_BREAK -case 37: -YY_RULE_SETUP -#line 480 "parser.l" -addwchar('\"'); /* "bla\""bla" -> "bla\"bla" */ - YY_BREAK -case 38: -YY_RULE_SETUP -#line 481 "parser.l" -; /* "bla" "bla" -> "blabla" */ - YY_BREAK -case 39: -YY_RULE_SETUP -#line 482 "parser.l" -{ - char *yptr = parser_text; - while(*yptr) /* FIXME: codepage translation */ - { - if (*yptr & 0x80) - parser_error("Invalid char %u in wide string", (unsigned char)*yptr); - addwchar(*yptr++ & 0xff); - } - } - YY_BREAK -case 40: -/* rule 40 can match eol */ -YY_RULE_SETUP -#line 491 "parser.l" -parser_error("Unterminated string"); - YY_BREAK -/* - * Normal string scanning - */ -case 41: -YY_RULE_SETUP -#line 496 "parser.l" -yy_push_state(tkstr); cbufidx = 0; - YY_BREAK -case 42: -#line 498 "parser.l" -case 43: -YY_RULE_SETUP -#line 498 "parser.l" -{ - yy_pop_state(); - parser_lval.str = get_buffered_cstring(); - return tSTRING; - } - YY_BREAK -case 44: -YY_RULE_SETUP -#line 503 "parser.l" -{ /* octal escape sequence */ - int result; - result = strtol(parser_text+1, 0, 8); - if ( result > 0xff ) - parser_error("Character constant out of range"); - addcchar((char)result); - } - YY_BREAK -case 45: -YY_RULE_SETUP -#line 510 "parser.l" -{ /* hex escape sequence */ - int result; - result = strtol(parser_text+2, 0, 16); - addcchar((char)result); - } - YY_BREAK -case 46: -YY_RULE_SETUP -#line 515 "parser.l" -{ parser_error("Invalid hex escape sequence '%s'", parser_text); } - YY_BREAK -case 47: -YY_RULE_SETUP -#line 517 "parser.l" -parser_error("Bad escape sequence"); - YY_BREAK -case 48: -/* rule 48 can match eol */ -YY_RULE_SETUP -#line 518 "parser.l" -line_number++; char_number = 1; /* backslash at EOL continues string after leading whitespace on next line */ - YY_BREAK -case 49: -YY_RULE_SETUP -#line 519 "parser.l" -addcchar('\a'); - YY_BREAK -case 50: -YY_RULE_SETUP -#line 520 "parser.l" -addcchar('\b'); - YY_BREAK -case 51: -YY_RULE_SETUP -#line 521 "parser.l" -addcchar('\f'); - YY_BREAK -case 52: -YY_RULE_SETUP -#line 522 "parser.l" -addcchar('\n'); - YY_BREAK -case 53: -YY_RULE_SETUP -#line 523 "parser.l" -addcchar('\r'); - YY_BREAK -case 54: -YY_RULE_SETUP -#line 524 "parser.l" -addcchar('\t'); - YY_BREAK -case 55: -YY_RULE_SETUP -#line 525 "parser.l" -addcchar('\v'); - YY_BREAK -case 56: -YY_RULE_SETUP -#line 526 "parser.l" -addcchar(parser_text[1]); - YY_BREAK -case 57: -/* rule 57 can match eol */ -YY_RULE_SETUP -#line 527 "parser.l" -addcchar(parser_text[2]); line_number++; char_number = 1; - YY_BREAK -case 58: -YY_RULE_SETUP -#line 528 "parser.l" -{ - char *yptr = parser_text; - while(*yptr) - addcchar(*yptr++); - } - YY_BREAK -case 59: -YY_RULE_SETUP -#line 533 "parser.l" -addcchar('\"'); /* "bla""bla" -> "bla\"bla" */ - YY_BREAK -case 60: -YY_RULE_SETUP -#line 534 "parser.l" -addcchar('\"'); /* "bla\""bla" -> "bla\"bla" */ - YY_BREAK -case 61: -YY_RULE_SETUP -#line 535 "parser.l" -; /* "bla" "bla" -> "blabla" */ - YY_BREAK -case 62: -/* rule 62 can match eol */ -YY_RULE_SETUP -#line 536 "parser.l" -parser_error("Unterminated string"); - YY_BREAK -/* - * Raw data scanning - */ -case 63: -YY_RULE_SETUP -#line 541 "parser.l" -yy_push_state(tkrcd); cbufidx = 0; - YY_BREAK -case 64: -YY_RULE_SETUP -#line 542 "parser.l" -{ - yy_pop_state(); - parser_lval.raw = new_raw_data(); - parser_lval.raw->size = cbufidx; - parser_lval.raw->data = xmalloc(parser_lval.raw->size); - memcpy(parser_lval.raw->data, cbuffer, parser_lval.raw->size); - return tRAWDATA; - } - YY_BREAK -case 65: -YY_RULE_SETUP -#line 550 "parser.l" -{ - int result; - result = strtol(parser_text, 0, 16); - addcchar((char)result); - } - YY_BREAK -case 66: -YY_RULE_SETUP -#line 555 "parser.l" -; /* Ignore space */ - YY_BREAK -case 67: -/* rule 67 can match eol */ -YY_RULE_SETUP -#line 556 "parser.l" -line_number++; char_number = 1; - YY_BREAK -case 68: -YY_RULE_SETUP -#line 557 "parser.l" -parser_error("Malformed data-line"); - YY_BREAK -/* - * Comment stripping - * Should never occur after preprocessing - */ -case 69: -YY_RULE_SETUP -#line 563 "parser.l" -{ - yy_push_state(comment); - save_wanted_id = wanted_id; - if(!no_preprocess) - parser_warning("Found comments after preprocessing, please report\n"); - } - YY_BREAK -case 70: -YY_RULE_SETUP -#line 569 "parser.l" -; - YY_BREAK -case 71: -YY_RULE_SETUP -#line 570 "parser.l" -; - YY_BREAK -case 72: -/* rule 72 can match eol */ -YY_RULE_SETUP -#line 571 "parser.l" -line_number++; char_number = 1; - YY_BREAK -case 73: -YY_RULE_SETUP -#line 572 "parser.l" -yy_pop_state(); want_id = save_wanted_id; - YY_BREAK -case 74: -YY_RULE_SETUP -#line 574 "parser.l" -want_id = wanted_id; /* not really comment, but left-over c-junk */ - YY_BREAK -case 75: -YY_RULE_SETUP -#line 575 "parser.l" -want_id = wanted_id; if(!no_preprocess) parser_warning("Found comments after preprocessing, please report\n"); - YY_BREAK -case 76: -/* rule 76 can match eol */ -YY_RULE_SETUP -#line 577 "parser.l" -{ - want_id = wanted_id; - line_number++; - char_number = 1; - if(want_nl) - { - want_nl = 0; - return tNL; - } - } - YY_BREAK -case 77: -YY_RULE_SETUP -#line 587 "parser.l" -want_id = wanted_id; /* Eat whitespace */ - YY_BREAK -case 78: -YY_RULE_SETUP -#line 589 "parser.l" -return parser_text[0]; - YY_BREAK -case 79: -/* rule 79 can match eol */ -YY_RULE_SETUP -#line 591 "parser.l" -{ - /* Catch all rule to find any unmatched text */ - if(*parser_text == '\n') - { - line_number++; - char_number = 1; - } - parser_error("Unmatched text '%c' (0x%02x) YY_START=%d", - isprint((unsigned char)*parser_text) ? *parser_text : '.', *parser_text, YY_START); - } - YY_BREAK -case 80: -YY_RULE_SETUP -#line 602 "parser.l" -ECHO; - YY_BREAK -#line 1882 "lex.yy.c" -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(tkstr): -case YY_STATE_EOF(tklstr): -case YY_STATE_EOF(tkrcd): -case YY_STATE_EOF(comment): -case YY_STATE_EOF(pp_cstrip): -case YY_STATE_EOF(pp_line): -case YY_STATE_EOF(pp_pragma): -case YY_STATE_EOF(pp_code_page): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = (yy_hold_char); - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed parser_in at a new source and called - * parser_lex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = parser_in; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++(yy_c_buf_p); - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_END_OF_FILE: - { - (yy_did_buffer_switch_on_eof) = 0; - - if ( parser_wrap( ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * parser_text, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = - (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - (yy_c_buf_p) = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ -} /* end of parser_lex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (void) -{ - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = (yytext_ptr); - register int number_to_move, i; - int ret_val; - - if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; - - int yy_c_buf_p_offset = - (int) ((yy_c_buf_p) - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - parser_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), (size_t) num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - if ( (yy_n_chars) == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - parser_restart(parser_in ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) parser_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - (yy_n_chars) += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; - - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (void) -{ - register yy_state_type yy_current_state; - register char *yy_cp; - - yy_current_state = (yy_start); - yy_current_state += YY_AT_BOL(); - - for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 191 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) -{ - register int yy_is_jam; - register char *yy_cp = (yy_c_buf_p); - - register YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 191 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 190); - - return yy_is_jam ? 0 : yy_current_state; -} - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (void) -#else - static int input (void) -#endif - -{ - int c; - - *(yy_c_buf_p) = (yy_hold_char); - - if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - /* This was really a NUL. */ - *(yy_c_buf_p) = '\0'; - - else - { /* need more input */ - int offset = (yy_c_buf_p) - (yytext_ptr); - ++(yy_c_buf_p); - - switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - parser_restart(parser_in ); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( parser_wrap( ) ) - return EOF; - - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(); -#else - return input(); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + offset; - break; - } - } - } - - c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve parser_text */ - (yy_hold_char) = *++(yy_c_buf_p); - - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * - * @note This function does not reset the start condition to @c INITIAL . - */ - void parser_restart (FILE * input_file ) -{ - - if ( ! YY_CURRENT_BUFFER ){ - parser_ensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - parser__create_buffer(parser_in,YY_BUF_SIZE ); - } - - parser__init_buffer(YY_CURRENT_BUFFER,input_file ); - parser__load_buffer_state( ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * - */ - void parser__switch_to_buffer (YY_BUFFER_STATE new_buffer ) -{ - - /* TODO. We should be able to replace this entire function body - * with - * parser_pop_buffer_state(); - * parser_push_buffer_state(new_buffer); - */ - parser_ensure_buffer_stack (); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - parser__load_buffer_state( ); - - /* We don't actually know whether we did this switch during - * EOF (parser_wrap()) processing, but the only time this flag - * is looked at is after parser_wrap() is called, so it's safe - * to go ahead and always set it. - */ - (yy_did_buffer_switch_on_eof) = 1; -} - -static void parser__load_buffer_state (void) -{ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - parser_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - (yy_hold_char) = *(yy_c_buf_p); -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * - * @return the allocated buffer state. - */ - YY_BUFFER_STATE parser__create_buffer (FILE * file, int size ) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) parser_alloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in parser__create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) parser_alloc(b->yy_buf_size + 2 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in parser__create_buffer()" ); - - b->yy_is_our_buffer = 1; - - parser__init_buffer(b,file ); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with parser__create_buffer() - * - */ - void parser__delete_buffer (YY_BUFFER_STATE b ) -{ - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - parser_free((void *) b->yy_ch_buf ); - - parser_free((void *) b ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a parser_restart() or at EOF. - */ - static void parser__init_buffer (YY_BUFFER_STATE b, FILE * file ) - -{ - int oerrno = errno; - - parser__flush_buffer(b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then parser__init_buffer was _probably_ - * called from parser_restart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * - */ - void parser__flush_buffer (YY_BUFFER_STATE b ) -{ - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - parser__load_buffer_state( ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * - */ -void parser_push_buffer_state (YY_BUFFER_STATE new_buffer ) -{ - if (new_buffer == NULL) - return; - - parser_ensure_buffer_stack(); - - /* This block is copied from parser__switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - (yy_buffer_stack_top)++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from parser__switch_to_buffer. */ - parser__load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * - */ -void parser_pop_buffer_state (void) -{ - if (!YY_CURRENT_BUFFER) - return; - - parser__delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - parser__load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void parser_ensure_buffer_stack (void) -{ - int num_to_alloc; - - if (!(yy_buffer_stack)) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; - (yy_buffer_stack) = (struct yy_buffer_state**)parser_alloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in parser_ensure_buffer_stack()" ); - - memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - (yy_buffer_stack_max) = num_to_alloc; - (yy_buffer_stack_top) = 0; - return; - } - - if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**)parser_realloc - ((yy_buffer_stack), - num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in parser_ensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); - (yy_buffer_stack_max) = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE parser__scan_buffer (char * base, yy_size_t size ) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) parser_alloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in parser__scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - parser__switch_to_buffer(b ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to parser_lex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * parser__scan_bytes() instead. - */ -YY_BUFFER_STATE parser__scan_string (yyconst char * yystr ) -{ - - return parser__scan_bytes(yystr,strlen(yystr) ); -} - -/** Setup the input buffer state to scan the given bytes. The next call to parser_lex() will - * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE parser__scan_bytes (yyconst char * yybytes, int _yybytes_len ) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) parser_alloc(n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in parser__scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = parser__scan_buffer(buf,n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in parser__scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - - static void yy_push_state (int new_state ) -{ - if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) ) - { - yy_size_t new_size; - - (yy_start_stack_depth) += YY_START_STACK_INCR; - new_size = (yy_start_stack_depth) * sizeof( int ); - - if ( ! (yy_start_stack) ) - (yy_start_stack) = (int *) parser_alloc(new_size ); - - else - (yy_start_stack) = (int *) parser_realloc((void *) (yy_start_stack),new_size ); - - if ( ! (yy_start_stack) ) - YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); - } - - (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START; - - BEGIN(new_state); -} - - static void yy_pop_state (void) -{ - if ( --(yy_start_stack_ptr) < 0 ) - YY_FATAL_ERROR( "start-condition stack underflow" ); - - BEGIN((yy_start_stack)[(yy_start_stack_ptr)]); -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yy_fatal_error (yyconst char* msg ) -{ - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up parser_text. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - parser_text[parser_leng] = (yy_hold_char); \ - (yy_c_buf_p) = parser_text + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - parser_leng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the current line number. - * - */ -int parser_get_lineno (void) -{ - - return parser_lineno; -} - -/** Get the input stream. - * - */ -FILE *parser_get_in (void) -{ - return parser_in; -} - -/** Get the output stream. - * - */ -FILE *parser_get_out (void) -{ - return parser_out; -} - -/** Get the length of the current token. - * - */ -int parser_get_leng (void) -{ - return parser_leng; -} - -/** Get the current token. - * - */ - -char *parser_get_text (void) -{ - return parser_text; -} - -/** Set the current line number. - * @param line_number - * - */ -void parser_set_lineno (int line_number ) -{ - - parser_lineno = line_number; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param in_str A readable stream. - * - * @see parser__switch_to_buffer - */ -void parser_set_in (FILE * in_str ) -{ - parser_in = in_str ; -} - -void parser_set_out (FILE * out_str ) -{ - parser_out = out_str ; -} - -int parser_get_debug (void) -{ - return parser__flex_debug; -} - -void parser_set_debug (int bdebug ) -{ - parser__flex_debug = bdebug ; -} - -static int yy_init_globals (void) -{ - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from parser_lex_destroy(), so don't allocate here. - */ - - (yy_buffer_stack) = 0; - (yy_buffer_stack_top) = 0; - (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = (char *) 0; - (yy_init) = 0; - (yy_start) = 0; - - (yy_start_stack_ptr) = 0; - (yy_start_stack_depth) = 0; - (yy_start_stack) = NULL; - -/* Defined in main.c */ -#ifdef YY_STDINIT - parser_in = stdin; - parser_out = stdout; -#else - parser_in = (FILE *) 0; - parser_out = (FILE *) 0; -#endif - - /* For future reference: Set errno on error, since we are called by - * parser_lex_init() - */ - return 0; -} - -/* parser_lex_destroy is for both reentrant and non-reentrant scanners. */ -int parser_lex_destroy (void) -{ - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - parser__delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - parser_pop_buffer_state(); - } - - /* Destroy the stack itself. */ - parser_free((yy_buffer_stack) ); - (yy_buffer_stack) = NULL; - - /* Destroy the start condition stack. */ - parser_free((yy_start_stack) ); - (yy_start_stack) = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * parser_lex() is called, initialization will occur. */ - yy_init_globals( ); - - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) -{ - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s ) -{ - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *parser_alloc (yy_size_t size ) -{ - return (void *) malloc( size ); -} - -void *parser_realloc (void * ptr, yy_size_t size ) -{ - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); -} - -void parser_free (void * ptr ) -{ - free( (char *) ptr ); /* see parser_realloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 602 "parser.l" - - - -/* These dup functions copy the enclosed '\0' from - * the resource string. - */ -static void addcchar(char c) -{ - if(cbufidx >= cbufalloc) - { - cbufalloc += 1024; - cbuffer = xrealloc(cbuffer, cbufalloc * sizeof(cbuffer[0])); - if(cbufalloc > 65536) - parser_warning("Reallocating string buffer larger than 64kB\n"); - } - cbuffer[cbufidx++] = c; -} - -static void addwchar(WCHAR s) -{ - if(wbufidx >= wbufalloc) - { - wbufalloc += 1024; - wbuffer = xrealloc(wbuffer, wbufalloc * sizeof(wbuffer[0])); - if(wbufalloc > 65536) - parser_warning("Reallocating wide string buffer larger than 64kB\n"); - } - wbuffer[wbufidx++] = s; -} - -static string_t *get_buffered_cstring(void) -{ - string_t *str = new_string(); - - str->size = cbufidx; - str->type = str_char; - str->str.cstr = xmalloc(cbufidx+1); - memcpy(str->str.cstr, cbuffer, cbufidx); - str->str.cstr[cbufidx] = '\0'; - - if (!current_codepage || current_codepage == -1 || !win32) /* store as ANSI string */ - { - if (!current_codepage) parser_error("Codepage set to Unicode only, cannot use ASCII string here"); - return str; - } - else /* convert to Unicode before storing */ - { - string_t *str_w = convert_string( str, str_unicode, current_codepage ); - if (!check_unicode_conversion( str, str_w, current_codepage )) - parser_error("String %s does not convert identically to Unicode and back in codepage %d. " - "Try using a Unicode string instead", str->str.cstr, current_codepage ); - if (check_valid_utf8( str, current_codepage )) - parser_warning( "string \"%s\" seems to be UTF-8 but codepage %u is in use.\n", - str->str.cstr, current_codepage ); - free_string( str ); - return str_w; - } -} - -static string_t *get_buffered_wstring(void) -{ - string_t *str = new_string(); - str->size = wbufidx; - str->type = str_unicode; - str->str.wstr = xmalloc((wbufidx+1)*sizeof(WCHAR)); - memcpy(str->str.wstr, wbuffer, wbufidx*sizeof(WCHAR)); - str->str.wstr[wbufidx] = 0; - return str; -} - -static string_t *make_string(char *s) -{ - string_t *str = new_string(); - str->size = strlen(s); - str->type = str_char; - str->str.cstr = xmalloc(str->size+1); - memcpy(str->str.cstr, s, str->size+1); - return str; -} - diff --git a/reactos/tools/wrc/newstruc.c b/reactos/tools/wrc/newstruc.c deleted file mode 100644 index de9d4880459..00000000000 --- a/reactos/tools/wrc/newstruc.c +++ /dev/null @@ -1,1272 +0,0 @@ -/* - * 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 - -/* New instances for all types of structures */ -/* Very inefficient (in size), but very functional :-] - * Especially for type-checking. - */ - -dialog_t *new_dialog(void) -{ - dialog_t *ret = xmalloc( sizeof(*ret) ); - memset( ret, 0, sizeof(*ret) ); - return ret; -} - -name_id_t *new_name_id(void) -{ - name_id_t *ret = xmalloc( sizeof(*ret) ); - memset( ret, 0, sizeof(*ret) ); - return ret; -} - -menu_t *new_menu(void) -{ - menu_t *ret = xmalloc( sizeof(*ret) ); - memset( ret, 0, sizeof(*ret) ); - return ret; -} - -menu_item_t *new_menu_item(void) -{ - menu_item_t *ret = xmalloc( sizeof(*ret) ); - memset( ret, 0, sizeof(*ret) ); - return ret; -} - -control_t *new_control(void) -{ - control_t *ret = xmalloc( sizeof(*ret) ); - memset( ret, 0, sizeof(*ret) ); - return ret; -} - -icon_t *new_icon(void) -{ - icon_t *ret = xmalloc( sizeof(*ret) ); - memset( ret, 0, sizeof(*ret) ); - return ret; -} - -cursor_t *new_cursor(void) -{ - cursor_t *ret = xmalloc( sizeof(*ret) ); - memset( ret, 0, sizeof(*ret) ); - return ret; -} - -versioninfo_t *new_versioninfo(void) -{ - versioninfo_t *ret = xmalloc( sizeof(*ret) ); - memset( ret, 0, sizeof(*ret) ); - return ret; -} - -ver_value_t *new_ver_value(void) -{ - ver_value_t *ret = xmalloc( sizeof(*ret) ); - memset( ret, 0, sizeof(*ret) ); - return ret; -} - -ver_block_t *new_ver_block(void) -{ - ver_block_t *ret = xmalloc( sizeof(*ret) ); - memset( ret, 0, sizeof(*ret) ); - return ret; -} - -stt_entry_t *new_stt_entry(void) -{ - stt_entry_t *ret = xmalloc( sizeof(*ret) ); - memset( ret, 0, sizeof(*ret) ); - return ret; -} - -accelerator_t *new_accelerator(void) -{ - accelerator_t *ret = xmalloc( sizeof(*ret) ); - memset( ret, 0, sizeof(*ret) ); - return ret; -} - -event_t *new_event(void) -{ - event_t *ret = xmalloc( sizeof(*ret) ); - memset( ret, 0, sizeof(*ret) ); - return ret; -} - -raw_data_t *new_raw_data(void) -{ - raw_data_t *ret = xmalloc( sizeof(*ret) ); - memset( ret, 0, sizeof(*ret) ); - return ret; -} - -lvc_t *new_lvc(void) -{ - lvc_t *ret = xmalloc( sizeof(*ret) ); - memset( ret, 0, sizeof(*ret) ); - return ret; -} - -res_count_t *new_res_count(void) -{ - res_count_t *ret = xmalloc( sizeof(*ret) ); - memset( ret, 0, sizeof(*ret) ); - return ret; -} - -string_t *new_string(void) -{ - string_t *ret = xmalloc( sizeof(*ret) ); - memset( ret, 0, sizeof(*ret) ); - set_location( &ret->loc ); - return ret; -} - -toolbar_item_t *new_toolbar_item(void) -{ - toolbar_item_t *ret = xmalloc( sizeof(*ret) ); - memset( ret, 0, sizeof(*ret) ); - return ret; -} - -ani_any_t *new_ani_any(void) -{ - ani_any_t *ret = xmalloc( sizeof(*ret) ); - memset( ret, 0, sizeof(*ret) ); - return ret; -} - -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(BITMAPV5HEADER *bh, DWORD size) -{ - bh->bV5Size = BYTESWAP_DWORD(bh->bV5Size); - bh->bV5Width = BYTESWAP_DWORD(bh->bV5Width); - bh->bV5Height = BYTESWAP_DWORD(bh->bV5Height); - bh->bV5Planes = BYTESWAP_WORD(bh->bV5Planes); - bh->bV5BitCount = BYTESWAP_WORD(bh->bV5BitCount); - bh->bV5Compression = BYTESWAP_DWORD(bh->bV5Compression); - bh->bV5SizeImage = BYTESWAP_DWORD(bh->bV5SizeImage); - bh->bV5XPelsPerMeter = BYTESWAP_DWORD(bh->bV5XPelsPerMeter); - bh->bV5YPelsPerMeter = BYTESWAP_DWORD(bh->bV5YPelsPerMeter); - bh->bV5ClrUsed = BYTESWAP_DWORD(bh->bV5ClrUsed); - bh->bV5ClrImportant = BYTESWAP_DWORD(bh->bV5ClrImportant); - if (size == sizeof(BITMAPINFOHEADER)) return; - bh->bV5RedMask = BYTESWAP_DWORD(bh->bV5RedMask); - bh->bV5GreenMask = BYTESWAP_DWORD(bh->bV5GreenMask); - bh->bV5BlueMask = BYTESWAP_DWORD(bh->bV5BlueMask); - bh->bV5AlphaMask = BYTESWAP_DWORD(bh->bV5AlphaMask); - bh->bV5CSType = BYTESWAP_DWORD(bh->bV5CSType); - bh->bV5Endpoints.ciexyzRed.ciexyzX = BYTESWAP_DWORD(bh->bV5Endpoints.ciexyzRed.ciexyzX); - bh->bV5Endpoints.ciexyzRed.ciexyzY = BYTESWAP_DWORD(bh->bV5Endpoints.ciexyzRed.ciexyzY); - bh->bV5Endpoints.ciexyzRed.ciexyzZ = BYTESWAP_DWORD(bh->bV5Endpoints.ciexyzRed.ciexyzZ); - bh->bV5Endpoints.ciexyzGreen.ciexyzX = BYTESWAP_DWORD(bh->bV5Endpoints.ciexyzGreen.ciexyzX); - bh->bV5Endpoints.ciexyzGreen.ciexyzY = BYTESWAP_DWORD(bh->bV5Endpoints.ciexyzGreen.ciexyzY); - bh->bV5Endpoints.ciexyzGreen.ciexyzZ = BYTESWAP_DWORD(bh->bV5Endpoints.ciexyzGreen.ciexyzZ); - bh->bV5Endpoints.ciexyzBlue.ciexyzX = BYTESWAP_DWORD(bh->bV5Endpoints.ciexyzBlue.ciexyzX); - bh->bV5Endpoints.ciexyzBlue.ciexyzY = BYTESWAP_DWORD(bh->bV5Endpoints.ciexyzBlue.ciexyzY); - bh->bV5Endpoints.ciexyzBlue.ciexyzZ = BYTESWAP_DWORD(bh->bV5Endpoints.ciexyzBlue.ciexyzZ); - bh->bV5GammaRed = BYTESWAP_DWORD(bh->bV5GammaRed); - bh->bV5GammaGreen = BYTESWAP_DWORD(bh->bV5GammaGreen); - bh->bV5GammaBlue = BYTESWAP_DWORD(bh->bV5GammaBlue); - if (size == sizeof(BITMAPV4HEADER)) return; - bh->bV5Intent = BYTESWAP_DWORD(bh->bV5Intent); - bh->bV5ProfileData = BYTESWAP_DWORD(bh->bV5ProfileData); - bh->bV5ProfileSize = BYTESWAP_DWORD(bh->bV5ProfileSize); - bh->bV5Reserved = BYTESWAP_DWORD(bh->bV5Reserved); -} - -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 -static int convert_bitmap(char *data, int size) -{ - BITMAPV5HEADER *bih = (BITMAPV5HEADER *)data; - BITMAPOS2HEADER *boh = (BITMAPOS2HEADER *)data; - DWORD bmsize; - int type = 0; - int returnSize = 0; /* size to be returned */ - - /* - * 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); - - } - - bmsize = bih->bV5Size; - if (bmsize >> 16) /* assume swapped */ - { -#ifndef WORDS_BIGENDIAN - type |= FL_SIZEBE; -#endif - bmsize = BYTESWAP_DWORD( bmsize ); - } - else - { -#ifdef WORDS_BIGENDIAN - type |= FL_SIZEBE; -#endif - } - - switch (bmsize) - { - case sizeof(BITMAPOS2HEADER): - case sizeof(BITMAPINFOHEADER): - case sizeof(BITMAPV4HEADER): - case sizeof(BITMAPV5HEADER): - break; - default: - parser_error("Invalid bitmap format, bih->biSize = %d", bih->bV5Size); - } - - switch(type) - { - case FL_SIZEBE: - parser_warning("Bitmap signature little-endian, but size big-endian\n"); - break; - case FL_SIGBE: - parser_warning("Bitmap signature big-endian, but size little-endian\n"); - break; - } - - switch(byteorder) - { -#ifdef WORDS_BIGENDIAN - default: -#endif - case WRC_BO_BIG: - if(!(type & FL_SIZEBE)) - { - if (bmsize == sizeof(BITMAPOS2HEADER)) - convert_bitmap_swap_os2(boh); - else - convert_bitmap_swap(bih, bmsize); - } - break; -#ifndef WORDS_BIGENDIAN - default: -#endif - case WRC_BO_LITTLE: - if(type & FL_SIZEBE) - { - if (bmsize == sizeof(BITMAPOS2HEADER)) - convert_bitmap_swap_os2(boh); - else - convert_bitmap_swap(bih, bmsize); - } - 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 - -/* - * 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/reactos/tools/wrc/newstruc.h b/reactos/tools/wrc/newstruc.h deleted file mode 100644 index c7a74eb1abe..00000000000 --- a/reactos/tools/wrc/newstruc.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Create dynamic new structures of various types - * - * 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 - */ - -#ifndef __WRC_NEWSTRUC_H -#define __WRC_NEWSTRUC_H - -#include "wrctypes.h" - -dialog_t *new_dialog(void); -name_id_t *new_name_id(void); -menu_t *new_menu(void); -menu_item_t *new_menu_item(void); -control_t *new_control(void); -icon_t *new_icon(void); -cursor_t *new_cursor(void); -versioninfo_t *new_versioninfo(void); -ver_value_t *new_ver_value(void); -ver_block_t *new_ver_block(void); -stt_entry_t *new_stt_entry(void); -accelerator_t *new_accelerator(void); -event_t *new_event(void); -raw_data_t *new_raw_data(void); -lvc_t *new_lvc(void); -res_count_t *new_res_count(void); -string_t *new_string(void); -toolbar_item_t *new_toolbar_item(void); -ani_any_t *new_ani_any(void); -resource_t *new_resource(enum res_e t, void *res, int memopt, language_t *lan); -version_t *new_version(DWORD v); -characts_t *new_characts(DWORD c); -language_t *new_language(int id, int sub); -language_t *dup_language(language_t *l); -version_t *dup_version(version_t *v); -characts_t *dup_characts(characts_t *c); -html_t *new_html(raw_data_t *rd, int *memopt); -rcdata_t *new_rcdata(raw_data_t *rd, int *memopt); -font_id_t *new_font_id(int size, string_t *face, int weight, int italic); -user_t *new_user(name_id_t *type, raw_data_t *rd, int *memopt); -font_t *new_font(raw_data_t *rd, int *memopt); -fontdir_t *new_fontdir(raw_data_t *rd, int *memopt); -icon_group_t *new_icon_group(raw_data_t *rd, int *memopt); -cursor_group_t *new_cursor_group(raw_data_t *rd, int *memopt); -ani_curico_t *new_ani_curico(enum res_e type, raw_data_t *rd, int *memopt); -bitmap_t *new_bitmap(raw_data_t *rd, int *memopt); -ver_words_t *new_ver_words(int i); -ver_words_t *add_ver_words(ver_words_t *w, int i); -messagetable_t *new_messagetable(raw_data_t *rd, int *memopt); -dlginit_t *new_dlginit(raw_data_t *rd, int *memopt); -void copy_raw_data(raw_data_t *dst, raw_data_t *src, unsigned int offs, int len); -int *new_int(int i); -stringtable_t *new_stringtable(lvc_t *lvc); -toolbar_t *new_toolbar(int button_width, int button_Height, toolbar_item_t *items, int nitems); -style_pair_t *new_style_pair(style_t *style, style_t *exstyle); -style_t *new_style(DWORD or_mask, DWORD and_mask); - -#endif diff --git a/reactos/tools/wrc/parser.h b/reactos/tools/wrc/parser.h deleted file mode 100644 index e9fc8e62349..00000000000 --- a/reactos/tools/wrc/parser.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 1998 Bertho A. Stultiens (BS) - * - * Shared things between parser.l and parser.y and some others - * - * 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 __WRC_PARSER_H -#define __WRC_PARSER_H - -/* From parser.y */ -extern int parser_debug; -extern int want_nl; /* Set when getting line-numbers */ -extern int want_id; /* Set when getting the resource name */ - -int parser_parse(void); - -/* From parser.l */ -extern FILE *parser_in; -extern char *parser_text; -extern int yy_flex_debug; - -int parser_lex(void); -int parser_lex_destroy(void); - -#endif diff --git a/reactos/tools/wrc/parser.l b/reactos/tools/wrc/parser.l deleted file mode 100644 index a1ef1cf486f..00000000000 --- a/reactos/tools/wrc/parser.l +++ /dev/null @@ -1,679 +0,0 @@ -/* -*-C-*- - * - * Copyright 1998-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 - * - * History: - * 21-May-2000 BS - Fixed the ident requirement of resource names - * which can be keywords. - * 30-Apr-2000 BS - Reintegration into the wine-tree - * 11-Jan-2000 BS - Very drastic cleanup because we don't have a - * preprocessor in here anymore. - * 02-Jan-2000 BS - Removed the preprocessor code - * 23-Dec-1999 BS - Removed the copyright for Martin von Loewis. - * There is really nothing left of his code in - * this parser. - * 20-Jun-1998 BS - Changed the filename conversion. Filenames are - * case-sensitive inder *nix, but not under dos. - * default behaviour is to convert to lower case. - * - All backslashes are converted to forward and - * both single and double slash is recognized as - * MS/Borland does. - * - Fixed a bug in 'yywf' case that prevented - * double quoted names to be scanned propperly. - * - * 19-May-1998 BS - Started to build a preprocessor. - * - Changed keyword processing completely to - * table-lookups. - * - * 20-Apr-1998 BS - Added ';' comment stripping - * - * 17-Apr-1998 BS - Made the win32 keywords optional when compiling in - * 16bit mode - * - * 15-Apr-1998 BS - Changed string handling to include escapes - * - Added unicode string handling (no codepage - * translation though). - * - 'Borrowed' the main idea of string scanning from - * the flex manual pages. - * - Added conditional handling of scanning depending - * on the state of the parser. This was mainly required - * to distinguish a file to load or raw data that - * follows. MS's definition of filenames is rather - * complex... It can be unquoted or double quoted. If - * double quoted, then the '\\' char is not automatically - * escaped according to Borland's rc compiler, but it - * accepts both "\\path\\file.rc" and "\path\file.rc". - * This makes life very hard! I go for the escaped - * version, as this seems to be the documented way... - * - Single quoted strings are now parsed and converted - * here. - * - Added comment stripping. The implementation is - * 'borrowed' from the flex manpages. - * - Rebuild string processing so that it may contain - * escaped '\0'. - */ - -/* Exclusive string handling */ -%x tkstr -/* Exclusive unicode string handling */ -%x tklstr -/* Exclusive rcdata single quoted data handling */ -%x tkrcd -/* Exclusive comment eating... */ -%x comment -/* Set when stripping c-junk */ -%x pp_cstrip -/* Set when scanning #line style directives */ -%x pp_line -/* Set when scanning #pragma */ -%x pp_pragma -%x pp_code_page - -%option stack -%option noinput nounput noyy_top_state noyywrap -%option 8bit never-interactive -%option prefix="parser_" - -/* Some shortcut definitions */ -ws [ \f\t\r] -cident [a-zA-Z_][0-9a-zA-Z_]* - -%{ - -/*#define LEX_DEBUG*/ - -#include "config.h" - -#include -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#else -#define YY_NO_UNISTD_H -#endif - -#include "wine/unicode.h" -#include "wrc.h" -#include "utils.h" -#include "parser.h" -#include "newstruc.h" - -#include "parser.tab.h" - -/* Always update the current character position within a line */ -#define YY_USER_ACTION char_number+=yyleng; wanted_id = want_id; want_id = 0; - -#define YY_USER_INIT current_codepage = -1; - -static void addcchar(char c); -static void addwchar(WCHAR s); -static string_t *get_buffered_cstring(void); -static string_t *get_buffered_wstring(void); -static string_t *make_string(char *s); - -static char *cbuffer; /* Buffers for string collection */ -static int cbufidx; -static int cbufalloc = 0; -static WCHAR *wbuffer; -static int wbufidx; -static int wbufalloc = 0; - -static int current_codepage = -1; /* use language default */ - -/* - * This one is a bit tricky. - * We set 'want_id' in the parser to get the first - * identifier we get across in the scanner, but we - * also want it to be reset at nearly any token we - * see. Exceptions are: - * - newlines - * - comments - * - whitespace - * - * The scanner will automatically reset 'want_id' - * after *each* scanner reduction and puts is value - * into the var below. In this way we can see the - * state after the YY_RULE_SETUP (i.e. the user action; - * see above) and don't have to worry too much when - * it needs to be reset. - */ -static int wanted_id = 0; -static int save_wanted_id; /* To save across comment reductions */ - -struct keyword { - const char *keyword; - int token; - int isextension; - int needcase; - int alwayskw; -}; - -static struct keyword keywords[] = { - { "ACCELERATORS", tACCELERATORS, 0, 0, 0}, - { "ALT", tALT, 0, 0, 0}, - { "ASCII", tASCII, 0, 0, 0}, - { "AUTO3STATE", tAUTO3STATE, 1, 0, 0}, - { "AUTOCHECKBOX", tAUTOCHECKBOX, 1, 0, 0}, - { "AUTORADIOBUTTON", tAUTORADIOBUTTON, 1, 0, 0}, - { "BEGIN", tBEGIN, 0, 0, 0}, - { "BITMAP", tBITMAP, 0, 0, 0}, - { "BLOCK", tBLOCK, 0, 0, 0}, - { "BUTTON", tBUTTON, 1, 0, 0}, - { "CAPTION", tCAPTION, 0, 0, 0}, - { "CHARACTERISTICS", tCHARACTERISTICS, 1, 0, 0}, - { "CHECKBOX", tCHECKBOX, 0, 0, 0}, - { "CHECKED", tCHECKED, 0, 0, 0}, - { "CLASS", tCLASS, 0, 0, 0}, - { "COMBOBOX", tCOMBOBOX, 0, 0, 0}, - { "CONTROL", tCONTROL, 0, 0, 0}, - { "CTEXT", tCTEXT, 0, 0, 0}, - { "CURSOR", tCURSOR, 0, 0, 0}, - { "DEFPUSHBUTTON", tDEFPUSHBUTTON, 0, 0, 0}, - { "DIALOG", tDIALOG, 0, 0, 0}, - { "DIALOGEX", tDIALOGEX, 1, 0, 0}, - { "DISCARDABLE", tDISCARDABLE, 0, 0, 0}, - { "DLGINIT", tDLGINIT, 0, 0, 0}, - { "EDITTEXT", tEDITTEXT, 0, 0, 0}, - { "END", tEND, 0, 0, 0}, - { "EXSTYLE", tEXSTYLE, 0, 0, 0}, - { "FILEFLAGS", tFILEFLAGS, 0, 0, 0}, - { "FILEFLAGSMASK", tFILEFLAGSMASK, 0, 0, 0}, - { "FILEOS", tFILEOS, 0, 0, 0}, - { "FILESUBTYPE", tFILESUBTYPE, 0, 0, 0}, - { "FILETYPE", tFILETYPE, 0, 0, 0}, - { "FILEVERSION", tFILEVERSION, 0, 0, 0}, - { "FIXED", tFIXED, 0, 0, 0}, - { "FONT", tFONT, 0, 0, 0}, - { "FONTDIR", tFONTDIR, 0, 0, 0}, /* This is a Borland BRC extension */ - { "GRAYED", tGRAYED, 0, 0, 0}, - { "GROUPBOX", tGROUPBOX, 0, 0, 0}, - { "HELP", tHELP, 0, 0, 0}, - { "HTML", tHTML, 0, 0, 0}, - { "ICON", tICON, 0, 0, 0}, - { "IMPURE", tIMPURE, 0, 0, 0}, - { "INACTIVE", tINACTIVE, 0, 0, 0}, - { "LANGUAGE", tLANGUAGE, 1, 0, 1}, - { "LISTBOX", tLISTBOX, 0, 0, 0}, - { "LOADONCALL", tLOADONCALL, 0, 0, 0}, - { "LTEXT", tLTEXT, 0, 0, 0}, - { "MENU", tMENU, 0, 0, 0}, - { "MENUBARBREAK", tMENUBARBREAK, 0, 0, 0}, - { "MENUBREAK", tMENUBREAK, 0, 0, 0}, - { "MENUEX", tMENUEX, 1, 0, 0}, - { "MENUITEM", tMENUITEM, 0, 0, 0}, - { "MESSAGETABLE", tMESSAGETABLE, 1, 0, 0}, - { "MOVEABLE", tMOVEABLE, 0, 0, 0}, - { "NOINVERT", tNOINVERT, 0, 0, 0}, - { "NOT", tNOT, 0, 0, 0}, - { "POPUP", tPOPUP, 0, 0, 0}, - { "PRELOAD", tPRELOAD, 0, 0, 0}, - { "PRODUCTVERSION", tPRODUCTVERSION, 0, 0, 0}, - { "PURE", tPURE, 0, 0, 0}, - { "PUSHBUTTON", tPUSHBUTTON, 0, 0, 0}, - { "RADIOBUTTON", tRADIOBUTTON, 0, 0, 0}, - { "RCDATA", tRCDATA, 0, 0, 0}, - { "RTEXT", tRTEXT, 0, 0, 0}, - { "SCROLLBAR", tSCROLLBAR, 0, 0, 0}, - { "SEPARATOR", tSEPARATOR, 0, 0, 0}, - { "SHIFT", tSHIFT, 0, 0, 0}, - { "STATE3", tSTATE3, 1, 0, 0}, - { "STRING", tSTRING, 0, 0, 0}, - { "STRINGTABLE", tSTRINGTABLE, 0, 0, 1}, - { "STYLE", tSTYLE, 0, 0, 0}, - { "TOOLBAR", tTOOLBAR, 1, 0, 0}, - { "VALUE", tVALUE, 0, 0, 0}, - { "VERSION", tVERSION, 1, 0, 0}, - { "VERSIONINFO", tVERSIONINFO, 0, 0, 0}, - { "VIRTKEY", tVIRTKEY, 0, 0, 0} -}; - -#define NKEYWORDS (sizeof(keywords)/sizeof(keywords[0])) -#define KWP(p) ((const struct keyword *)(p)) -static int kw_cmp_func(const void *s1, const void *s2) -{ - int ret; - ret = strcasecmp(KWP(s1)->keyword, KWP(s2)->keyword); - if(!ret && (KWP(s1)->needcase || KWP(s2)->needcase)) - return strcmp(KWP(s1)->keyword, KWP(s2)->keyword); - else - return ret; -} - -#define KW_BSEARCH -#define DO_SORT -static struct keyword *iskeyword(char *kw) -{ - struct keyword *kwp; - struct keyword key; - key.keyword = kw; - key.needcase = 0; -#ifdef DO_SORT - { - /* Make sure that it is sorted for bsearsh */ - static int sorted = 0; - if(!sorted) - { - qsort(keywords, NKEYWORDS, sizeof(keywords[0]), kw_cmp_func); - sorted = 1; - } - } -#endif -#ifdef KW_BSEARCH - kwp = bsearch(&key, keywords, NKEYWORDS, sizeof(keywords[0]), kw_cmp_func); -#else - { - int i; - for(i = 0; i < NKEYWORDS; i++) - { - if(!kw_cmp_func(&key, &keywords[i])) - break; - } - if(i < NKEYWORDS) - kwp = &keywords[i]; - else - kwp = NULL; - } -#endif - - if(kwp == NULL || (kwp->isextension && !extensions)) - return NULL; - else - return kwp; -} - -/* converts an integer in string form to an unsigned long and prints an error - * on overflow */ -static unsigned long xstrtoul(const char *nptr, char **endptr, int base) -{ - unsigned long l; - - errno = 0; - l = strtoul(nptr, endptr, base); - if (l == ULONG_MAX && errno == ERANGE) - parser_error("integer constant %s is too large", nptr); - return l; -} - -%} - -/* - ************************************************************************** - * The flexer starts here - ************************************************************************** - */ -%% - /* - * Catch the GCC-style line statements here and parse them. - * This has the advantage that you can #include at any - * stage in the resource file. - * The preprocessor generates line directives in the format: - * # "filename" - * - * Codes can be a sequence of: - * - 1 start of new file - * - 2 returning to previous - * - 3 system header - * - 4 interpret as C-code - * - * 4 is not used and 1 mutually excludes 2 - * Anyhow, we are not really interested in these at all - * because we only want to know the linenumber and - * filename. - */ -^{ws}*\#{ws}*pragma{ws}+ yy_push_state(pp_pragma); -^{ws}*\#{ws}* yy_push_state(pp_line); -[^\n]* { - int lineno, len; - char *cptr; - char *fname; - yy_pop_state(); - lineno = (int)strtol(yytext, &cptr, 10); - if(!lineno) - parser_error("Malformed '#...' line-directive; invalid linenumber"); - fname = strchr(cptr, '"'); - if(!fname) - parser_error("Malformed '#...' line-directive; missing filename"); - fname++; - cptr = strchr(fname, '"'); - if(!cptr) - parser_error("Malformed '#...' line-directive; missing terminating \""); - *cptr = '\0'; - line_number = lineno - 1; /* We didn't read the newline */ - input_name = xstrdup(fname); - /* ignore contents of C include files */ - len = strlen(input_name); - if (len > 1 && !strcasecmp( input_name + len - 2, ".h" )) - BEGIN(pp_cstrip); - else - BEGIN(INITIAL); - } - -code_page[^\n]* yyless(9); yy_pop_state(); yy_push_state(pp_code_page); -[^\n]* yy_pop_state(); if (pedantic) parser_warning("Unrecognized #pragma directive '%s'\n",yytext); - -\({ws}*default{ws}*\)[^\n]* current_codepage = -1; yy_pop_state(); -\({ws}*utf8{ws}*\)[^\n]* current_codepage = CP_UTF8; yy_pop_state(); -\({ws}*[0-9]+{ws}*\)[^\n]* { - char *p = yytext; - yy_pop_state(); - while (*p < '0' || *p > '9') p++; - current_codepage = strtol( p, NULL, 10 ); - if (current_codepage != CP_UTF8 && !wine_cp_get_table( current_codepage )) - { - parser_error("Codepage %d not supported", current_codepage); - current_codepage = 0; - } - } -[^\n]* yy_pop_state(); parser_error("Malformed #pragma code_page directive"); - - /* - * Strip everything until a ';' taking - * into account braces {} for structures, - * classes and enums. - */ -\n line_number++; char_number = 1; -. ; /* ignore */ - -\{ return tBEGIN; -\} return tEND; - -[0-9]+[lL]? { parser_lval.num = xstrtoul(yytext, 0, 10); - return (yytext[yyleng-1] == 'L' || yytext[yyleng-1] == 'l') ? tLNUMBER : tNUMBER; } -0[xX][0-9A-Fa-f]+[lL]? { parser_lval.num = xstrtoul(yytext, 0, 16); - return (yytext[yyleng-1] == 'L' || yytext[yyleng-1] == 'l') ? tLNUMBER : tNUMBER; } -0[oO][0-7]+[lL]? { parser_lval.num = xstrtoul(yytext+2, 0, 8); - return (yytext[yyleng-1] == 'L' || yytext[yyleng-1] == 'l') ? tLNUMBER : tNUMBER; } - - /* - * The next two rules scan identifiers and filenames. - * This is achieved by using the priority ruling - * of the scanner where a '.' is valid in a filename - * and *only* in a filename. In this case, the second - * rule will be reduced because it is longer. - */ -[A-Za-z_0-9.]+ { - struct keyword *tok = iskeyword(yytext); - - if(tok) - { - if(wanted_id && !tok->alwayskw) - { - parser_lval.str = make_string(yytext); - return tIDENT; - } - else - return tok->token; - } - else - { - parser_lval.str = make_string(yytext); - return tIDENT; - } - } -[A-Za-z_0-9./\\]+ parser_lval.str = make_string(yytext); return tFILENAME; - - /* - * Wide string scanning - */ -L\" { - yy_push_state(tklstr); - wbufidx = 0; - if(!win32) - parser_warning("16bit resource contains unicode strings\n"); - } -\"{ws}+ | -\" { - yy_pop_state(); - parser_lval.str = get_buffered_wstring(); - return tSTRING; - } -\\[0-7]{1,6} { /* octal escape sequence */ - unsigned int result; - result = strtoul(yytext+1, 0, 8); - if ( result > 0xffff ) - parser_error("Character constant out of range"); - addwchar((WCHAR)result); - } -\\x[0-9a-fA-F]{4} { /* hex escape sequence */ - unsigned int result; - result = strtoul(yytext+2, 0, 16); - addwchar((WCHAR)result); - } -\\x[0-9a-fA-F]{1,3} { parser_error("Invalid hex escape sequence '%s'", yytext); } - -\\[0-9]+ parser_error("Bad escape sequence"); -\\\n{ws}* line_number++; char_number = 1; /* backslash at EOL continues string after leading whitespace on next line */ -\\a addwchar('\a'); -\\b addwchar('\b'); -\\f addwchar('\f'); -\\n addwchar('\n'); -\\r addwchar('\r'); -\\t addwchar('\t'); -\\v addwchar('\v'); -\\. { - if (yytext[1] & 0x80) - parser_error("Invalid char %u in wide string", (unsigned char)yytext[1]); - addwchar(yytext[1]); - } -\\\r\n addwchar(yytext[2]); line_number++; char_number = 1; -\"\" addwchar('\"'); /* "bla""bla" -> "bla\"bla" */ -\\\"\" addwchar('\"'); /* "bla\""bla" -> "bla\"bla" */ -\"{ws}+\" ; /* "bla" "bla" -> "blabla" */ -[^\\\n\"]+ { - char *yptr = yytext; - while(*yptr) /* FIXME: codepage translation */ - { - if (*yptr & 0x80) - parser_error("Invalid char %u in wide string", (unsigned char)*yptr); - addwchar(*yptr++ & 0xff); - } - } -\n parser_error("Unterminated string"); - - /* - * Normal string scanning - */ -\" yy_push_state(tkstr); cbufidx = 0; -\"{ws}+ | -\" { - yy_pop_state(); - parser_lval.str = get_buffered_cstring(); - return tSTRING; - } -\\[0-7]{1,3} { /* octal escape sequence */ - int result; - result = strtol(yytext+1, 0, 8); - if ( result > 0xff ) - parser_error("Character constant out of range"); - addcchar((char)result); - } -\\x[0-9a-fA-F]{2} { /* hex escape sequence */ - int result; - result = strtol(yytext+2, 0, 16); - addcchar((char)result); - } -\\x[0-9a-fA-F] { parser_error("Invalid hex escape sequence '%s'", yytext); } - -\\[0-9]+ parser_error("Bad escape sequence"); -\\\n{ws}* line_number++; char_number = 1; /* backslash at EOL continues string after leading whitespace on next line */ -\\a addcchar('\a'); -\\b addcchar('\b'); -\\f addcchar('\f'); -\\n addcchar('\n'); -\\r addcchar('\r'); -\\t addcchar('\t'); -\\v addcchar('\v'); -\\. addcchar(yytext[1]); -\\\r\n addcchar(yytext[2]); line_number++; char_number = 1; -[^\\\n\"]+ { - char *yptr = yytext; - while(*yptr) - addcchar(*yptr++); - } -\"\" addcchar('\"'); /* "bla""bla" -> "bla\"bla" */ -\\\"\" addcchar('\"'); /* "bla\""bla" -> "bla\"bla" */ -\"{ws}+\" ; /* "bla" "bla" -> "blabla" */ -\n parser_error("Unterminated string"); - - /* - * Raw data scanning - */ -\' yy_push_state(tkrcd); cbufidx = 0; -\' { - yy_pop_state(); - parser_lval.raw = new_raw_data(); - parser_lval.raw->size = cbufidx; - parser_lval.raw->data = xmalloc(parser_lval.raw->size); - memcpy(parser_lval.raw->data, cbuffer, parser_lval.raw->size); - return tRAWDATA; - } -[0-9a-fA-F]{2} { - int result; - result = strtol(yytext, 0, 16); - addcchar((char)result); - } -{ws}+ ; /* Ignore space */ -\n line_number++; char_number = 1; -. parser_error("Malformed data-line"); - - /* - * Comment stripping - * Should never occur after preprocessing - */ -"/*" { - yy_push_state(comment); - save_wanted_id = wanted_id; - if(!no_preprocess) - parser_warning("Found comments after preprocessing, please report\n"); - } -[^*\n]* ; -"*"+[^*/\n]* ; -\n line_number++; char_number = 1; -"*"+"/" yy_pop_state(); want_id = save_wanted_id; - -;[^\n]* want_id = wanted_id; /* not really comment, but left-over c-junk */ -"//"[^\n]* want_id = wanted_id; if(!no_preprocess) parser_warning("Found comments after preprocessing, please report\n"); - -\n { - want_id = wanted_id; - line_number++; - char_number = 1; - if(want_nl) - { - want_nl = 0; - return tNL; - } - } -{ws}+ want_id = wanted_id; /* Eat whitespace */ - -[ -~] return yytext[0]; - -<*>.|\n { - /* Catch all rule to find any unmatched text */ - if(*yytext == '\n') - { - line_number++; - char_number = 1; - } - parser_error("Unmatched text '%c' (0x%02x) YY_START=%d", - isprint((unsigned char)*yytext) ? *yytext : '.', *yytext, YY_START); - } - -%% - -/* These dup functions copy the enclosed '\0' from - * the resource string. - */ -static void addcchar(char c) -{ - if(cbufidx >= cbufalloc) - { - cbufalloc += 1024; - cbuffer = xrealloc(cbuffer, cbufalloc * sizeof(cbuffer[0])); - if(cbufalloc > 65536) - parser_warning("Reallocating string buffer larger than 64kB\n"); - } - cbuffer[cbufidx++] = c; -} - -static void addwchar(WCHAR s) -{ - if(wbufidx >= wbufalloc) - { - wbufalloc += 1024; - wbuffer = xrealloc(wbuffer, wbufalloc * sizeof(wbuffer[0])); - if(wbufalloc > 65536) - parser_warning("Reallocating wide string buffer larger than 64kB\n"); - } - wbuffer[wbufidx++] = s; -} - -static string_t *get_buffered_cstring(void) -{ - string_t *str = new_string(); - - str->size = cbufidx; - str->type = str_char; - str->str.cstr = xmalloc(cbufidx+1); - memcpy(str->str.cstr, cbuffer, cbufidx); - str->str.cstr[cbufidx] = '\0'; - - if (!current_codepage || current_codepage == -1 || !win32) /* store as ANSI string */ - { - if (!current_codepage) parser_error("Codepage set to Unicode only, cannot use ASCII string here"); - return str; - } - else /* convert to Unicode before storing */ - { - string_t *str_w = convert_string( str, str_unicode, current_codepage ); - if (!check_unicode_conversion( str, str_w, current_codepage )) - parser_error("String %s does not convert identically to Unicode and back in codepage %d. " - "Try using a Unicode string instead", str->str.cstr, current_codepage ); - if (check_valid_utf8( str, current_codepage )) - parser_warning( "string \"%s\" seems to be UTF-8 but codepage %u is in use.\n", - str->str.cstr, current_codepage ); - free_string( str ); - return str_w; - } -} - -static string_t *get_buffered_wstring(void) -{ - string_t *str = new_string(); - str->size = wbufidx; - str->type = str_unicode; - str->str.wstr = xmalloc((wbufidx+1)*sizeof(WCHAR)); - memcpy(str->str.wstr, wbuffer, wbufidx*sizeof(WCHAR)); - str->str.wstr[wbufidx] = 0; - return str; -} - -static string_t *make_string(char *s) -{ - string_t *str = new_string(); - str->size = strlen(s); - str->type = str_char; - str->str.cstr = xmalloc(str->size+1); - memcpy(str->str.cstr, s, str->size+1); - return str; -} diff --git a/reactos/tools/wrc/parser.tab.c b/reactos/tools/wrc/parser.tab.c deleted file mode 100644 index c0cf993003b..00000000000 --- a/reactos/tools/wrc/parser.tab.c +++ /dev/null @@ -1,6275 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.4.2. */ - -/* Skeleton implementation for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software - Foundation, Inc. - - 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 . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "2.4.2" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 0 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - -/* Using locations. */ -#define YYLSP_NEEDED 0 - -/* Substitute the variable and function names. */ -#define yyparse parser_parse -#define yylex parser_lex -#define yyerror parser_error -#define yylval parser_lval -#define yychar parser_char -#define yydebug parser_debug -#define yynerrs parser_nerrs - - -/* Copy the first part of user declarations. */ - -/* Line 189 of yacc.c */ -#line 1 "parser.y" - -/* - * Copyright 1994 Martin von Loewis - * Copyright 1998-2000 Bertho A. Stultiens (BS) - * 1999 Juergen Schmied (JS) - * - * 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 - * - * History: - * 24-Jul-2000 BS - Made a fix for broken Berkeley yacc on - * non-terminals (see cjunk rule). - * 21-May-2000 BS - Partial implementation of font resources. - * - Corrected language propagation for binary - * resources such as bitmaps, icons, cursors, - * userres and rcdata. The language is now - * correct in .res files. - * - Fixed reading the resource name as ident, - * so that it may overlap keywords. - * 20-May-2000 BS - Implemented animated cursors and icons - * resource types. - * 30-Apr-2000 BS - Reintegration into the wine-tree - * 14-Jan-2000 BS - Redid the usertype resources so that they - * are compatible. - * 02-Jan-2000 BS - Removed the preprocessor from the grammar - * except for the # command (line numbers). - * - * 06-Nov-1999 JS - see CHANGES - * - * 29-Dec-1998 AdH - Grammar and function extensions. - * grammar: TOOLBAR resources, Named ICONs in - * DIALOGS - * functions: semantic actions for the grammar - * changes, resource files can now be anywhere - * on the include path instead of just in the - * current directory - * - * 20-Jun-1998 BS - Fixed a bug in load_file() where the name was not - * printed out correctly. - * - * 17-Jun-1998 BS - Fixed a bug in CLASS statement parsing which should - * also accept a tSTRING as argument. - * - * 25-May-1998 BS - Found out that I need to support language, version - * and characteristics in inline resources (bitmap, - * cursor, etc) but they can also be specified with - * a filename. This renders my filename-scanning scheme - * worthless. Need to build newline parsing to solve - * this one. - * It will come with version 1.1.0 (sigh). - * - * 19-May-1998 BS - Started to build a builtin preprocessor - * - * 30-Apr-1998 BS - Redid the stringtable parsing/handling. My previous - * ideas had some serious flaws. - * - * 27-Apr-1998 BS - Removed a lot of dead comments and put it in a doc - * file. - * - * 21-Apr-1998 BS - Added correct behavior for cursors and icons. - * - This file is growing too big. It is time to strip - * things and put it in a support file. - * - * 19-Apr-1998 BS - Tagged the stringtable resource so that only one - * resource will be created. This because the table - * has a different layout than other resources. The - * table has to be sorted, and divided into smaller - * resource entries (see comment in source). - * - * 17-Apr-1998 BS - Almost all strings, including identifiers, are parsed - * as string_t which include unicode strings upon - * input. - * - Parser now emits a warning when compiling win32 - * extensions in win16 mode. - * - * 16-Apr-1998 BS - Raw data elements are now *optionally* separated - * by commas. Read the comments in file sq2dq.l. - * - FIXME: there are instances in the source that rely - * on the fact that int==32bit and pointers are int size. - * - Fixed the conflict in menuex by changing a rule - * back into right recursion. See note in source. - * - UserType resources cannot have an expression as its - * typeclass. See note in source. - * - * 15-Apr-1998 BS - Changed all right recursion into left recursion to - * get reduction of the parsestack. - * This also helps communication between bison and flex. - * Main advantage is that the Empty rule gets reduced - * first, which is used to allocate/link things. - * It also added a shift/reduce conflict in the menuex - * handling, due to expression/option possibility, - * although not serious. - * - * 14-Apr-1998 BS - Redone almost the entire parser. We're not talking - * about making it more efficient, but readable (for me) - * and slightly easier to expand/change. - * This is done primarily by using more reduce states - * with many (intuitive) types for the various resource - * statements. - * - Added expression handling for all resources where a - * number is accepted (not only for win32). Also added - * multiply and division (not MS compatible, but handy). - * Unary minus introduced a shift/reduce conflict, but - * it is not serious. - * - * 13-Apr-1998 BS - Reordered a lot of things - * - Made the source more readable - * - Added Win32 resource definitions - * - Corrected syntax problems with an old yacc (;) - * - Added extra comment about grammar - */ -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include -#include -#include - -#include "wrc.h" -#include "utils.h" -#include "newstruc.h" -#include "dumpres.h" -#include "wine/wpp.h" -#include "wine/unicode.h" -#include "parser.h" - -#if defined(YYBYACC) - /* Berkeley yacc (byacc) doesn't seem to know about these */ - /* Some *BSD supplied versions do define these though */ -# ifndef YYEMPTY -# define YYEMPTY (-1) /* Empty lookahead value of yychar */ -# endif -# ifndef YYLEX -# define YYLEX yylex() -# endif - -#elif defined(YYBISON) - /* Bison was used for original development */ - /* #define YYEMPTY -2 */ - /* #define YYLEX yylex() */ - -#else - /* No yacc we know yet */ -# if !defined(YYEMPTY) || !defined(YYLEX) -# error Yacc version/type unknown. This version needs to be verified for settings of YYEMPTY and YYLEX. -# elif defined(__GNUC__) /* gcc defines the #warning directive */ -# warning Yacc version/type unknown. It defines YYEMPTY and YYLEX, but is not tested - /* #else we just take a chance that it works... */ -# endif -#endif - -int want_nl = 0; /* Signal flex that we need the next newline */ -int want_id = 0; /* Signal flex that we need the next identifier */ -static stringtable_t *tagstt; /* Stringtable tag. - * It is set while parsing a stringtable to one of - * the stringtables in the sttres list or a new one - * if the language was not parsed before. - */ -static stringtable_t *sttres; /* Stringtable resources. This holds the list of - * stringtables with different lanuages - */ -static int dont_want_id = 0; /* See language parsing for details */ - -/* Set to the current options of the currently scanning stringtable */ -static int *tagstt_memopt; -static characts_t *tagstt_characts; -static version_t *tagstt_version; - -static const char riff[4] = "RIFF"; /* RIFF file magic for animated cursor/icon */ - -/* Prototypes of here defined functions */ -static event_t *get_event_head(event_t *p); -static control_t *get_control_head(control_t *p); -static ver_value_t *get_ver_value_head(ver_value_t *p); -static ver_block_t *get_ver_block_head(ver_block_t *p); -static resource_t *get_resource_head(resource_t *p); -static menu_item_t *get_item_head(menu_item_t *p); -static raw_data_t *merge_raw_data_str(raw_data_t *r1, string_t *str); -static raw_data_t *merge_raw_data_int(raw_data_t *r1, int i); -static raw_data_t *merge_raw_data_long(raw_data_t *r1, int i); -static raw_data_t *merge_raw_data(raw_data_t *r1, raw_data_t *r2); -static raw_data_t *str2raw_data(string_t *str); -static raw_data_t *int2raw_data(int i); -static raw_data_t *long2raw_data(int i); -static raw_data_t *load_file(string_t *name, language_t *lang); -static itemex_opt_t *new_itemex_opt(int id, int type, int state, int helpid); -static event_t *add_string_event(string_t *key, int id, int flags, event_t *prev); -static event_t *add_event(int key, int id, int flags, event_t *prev); -static name_id_t *convert_ctlclass(name_id_t *cls); -static control_t *ins_ctrl(int type, int special_style, control_t *ctrl, control_t *prev); -static dialog_t *dialog_version(version_t *v, dialog_t *dlg); -static dialog_t *dialog_characteristics(characts_t *c, dialog_t *dlg); -static dialog_t *dialog_language(language_t *l, dialog_t *dlg); -static dialog_t *dialog_menu(name_id_t *m, dialog_t *dlg); -static dialog_t *dialog_class(name_id_t *n, dialog_t *dlg); -static dialog_t *dialog_font(font_id_t *f, dialog_t *dlg); -static dialog_t *dialog_caption(string_t *s, dialog_t *dlg); -static dialog_t *dialog_exstyle(style_t * st, dialog_t *dlg); -static dialog_t *dialog_style(style_t * st, dialog_t *dlg); -static resource_t *build_stt_resources(stringtable_t *stthead); -static stringtable_t *find_stringtable(lvc_t *lvc); -static toolbar_item_t *ins_tlbr_button(toolbar_item_t *prev, toolbar_item_t *idrec); -static toolbar_item_t *get_tlbr_buttons_head(toolbar_item_t *p, int *nitems); -static string_t *make_filename(string_t *s); -static resource_t *build_fontdirs(resource_t *tail); -static resource_t *build_fontdir(resource_t **fnt, int nfnt); -static int rsrcid_to_token(int lookahead); - - - -/* Line 189 of yacc.c */ -#line 309 "parser.tab.c" - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - tNL = 258, - tNUMBER = 259, - tLNUMBER = 260, - tSTRING = 261, - tIDENT = 262, - tFILENAME = 263, - tRAWDATA = 264, - tACCELERATORS = 265, - tBITMAP = 266, - tCURSOR = 267, - tDIALOG = 268, - tDIALOGEX = 269, - tMENU = 270, - tMENUEX = 271, - tMESSAGETABLE = 272, - tRCDATA = 273, - tVERSIONINFO = 274, - tSTRINGTABLE = 275, - tFONT = 276, - tFONTDIR = 277, - tICON = 278, - tHTML = 279, - tAUTO3STATE = 280, - tAUTOCHECKBOX = 281, - tAUTORADIOBUTTON = 282, - tCHECKBOX = 283, - tDEFPUSHBUTTON = 284, - tPUSHBUTTON = 285, - tRADIOBUTTON = 286, - tSTATE3 = 287, - tGROUPBOX = 288, - tCOMBOBOX = 289, - tLISTBOX = 290, - tSCROLLBAR = 291, - tCONTROL = 292, - tEDITTEXT = 293, - tRTEXT = 294, - tCTEXT = 295, - tLTEXT = 296, - tBLOCK = 297, - tVALUE = 298, - tSHIFT = 299, - tALT = 300, - tASCII = 301, - tVIRTKEY = 302, - tGRAYED = 303, - tCHECKED = 304, - tINACTIVE = 305, - tNOINVERT = 306, - tPURE = 307, - tIMPURE = 308, - tDISCARDABLE = 309, - tLOADONCALL = 310, - tPRELOAD = 311, - tFIXED = 312, - tMOVEABLE = 313, - tCLASS = 314, - tCAPTION = 315, - tCHARACTERISTICS = 316, - tEXSTYLE = 317, - tSTYLE = 318, - tVERSION = 319, - tLANGUAGE = 320, - tFILEVERSION = 321, - tPRODUCTVERSION = 322, - tFILEFLAGSMASK = 323, - tFILEOS = 324, - tFILETYPE = 325, - tFILEFLAGS = 326, - tFILESUBTYPE = 327, - tMENUBARBREAK = 328, - tMENUBREAK = 329, - tMENUITEM = 330, - tPOPUP = 331, - tSEPARATOR = 332, - tHELP = 333, - tTOOLBAR = 334, - tBUTTON = 335, - tBEGIN = 336, - tEND = 337, - tDLGINIT = 338, - tNOT = 339, - pUPM = 340 - }; -#endif - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -{ - -/* Line 214 of yacc.c */ -#line 228 "parser.y" - - string_t *str; - int num; - int *iptr; - char *cptr; - resource_t *res; - accelerator_t *acc; - bitmap_t *bmp; - dialog_t *dlg; - font_t *fnt; - fontdir_t *fnd; - menu_t *men; - html_t *html; - rcdata_t *rdt; - stringtable_t *stt; - stt_entry_t *stte; - user_t *usr; - messagetable_t *msg; - versioninfo_t *veri; - control_t *ctl; - name_id_t *nid; - font_id_t *fntid; - language_t *lan; - version_t *ver; - characts_t *chars; - event_t *event; - menu_item_t *menitm; - itemex_opt_t *exopt; - raw_data_t *raw; - lvc_t *lvc; - ver_value_t *val; - ver_block_t *blk; - ver_words_t *verw; - toolbar_t *tlbar; - toolbar_item_t *tlbarItems; - dlginit_t *dginit; - style_pair_t *styles; - style_t *style; - ani_any_t *ani; - - - -/* Line 214 of yacc.c */ -#line 473 "parser.tab.c" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - - -/* Copy the second part of user declarations. */ - - -/* Line 264 of yacc.c */ -#line 485 "parser.tab.c" - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; -#else -typedef short int yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) -# endif -# endif -# ifndef YY_ -# define YY_(msgid) msgid -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) -#else -# define YYUSE(e) /* empty */ -#endif - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) - int yyi; -#endif -{ - return yyi; -} -#endif - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined _STDLIB_H \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) - -#endif - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 3 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 718 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 97 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 83 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 259 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 573 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 340 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 86, 2, - 95, 96, 89, 87, 94, 88, 2, 90, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 85, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 84, 2, 91, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 92, - 93 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint16 yyprhs[] = -{ - 0, 0, 3, 5, 6, 9, 12, 16, 20, 22, - 23, 29, 30, 32, 34, 36, 38, 40, 42, 44, - 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, - 66, 68, 70, 72, 74, 76, 78, 82, 86, 90, - 94, 98, 102, 106, 110, 114, 118, 120, 122, 129, - 130, 136, 142, 143, 146, 148, 152, 154, 156, 158, - 160, 162, 164, 178, 179, 183, 187, 191, 194, 198, - 202, 205, 208, 211, 212, 216, 220, 224, 228, 232, - 236, 240, 244, 248, 252, 256, 260, 264, 268, 272, - 276, 280, 291, 304, 315, 316, 321, 328, 337, 355, - 371, 376, 377, 380, 385, 389, 393, 395, 398, 400, - 402, 417, 418, 422, 426, 430, 433, 436, 440, 444, - 447, 450, 453, 454, 458, 462, 466, 470, 474, 478, - 482, 486, 490, 494, 498, 502, 506, 510, 514, 518, - 522, 533, 553, 570, 585, 598, 599, 601, 602, 605, - 615, 616, 619, 624, 628, 629, 636, 640, 646, 647, - 650, 653, 656, 659, 662, 665, 668, 673, 677, 678, - 683, 687, 693, 694, 697, 703, 710, 711, 714, 719, - 726, 735, 740, 744, 745, 750, 751, 753, 760, 761, - 771, 781, 785, 789, 793, 797, 801, 802, 805, 811, - 812, 815, 817, 822, 827, 829, 833, 843, 844, 848, - 851, 852, 855, 858, 860, 862, 864, 866, 868, 870, - 872, 873, 876, 879, 882, 887, 890, 893, 898, 900, - 902, 905, 907, 910, 912, 916, 920, 925, 929, 934, - 938, 940, 942, 943, 945, 947, 951, 955, 959, 963, - 967, 971, 975, 978, 981, 984, 988, 990, 993, 995 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int16 yyrhs[] = -{ - 98, 0, -1, 99, -1, -1, 99, 100, -1, 99, - 3, -1, 177, 102, 105, -1, 7, 102, 105, -1, - 153, -1, -1, 65, 101, 177, 94, 177, -1, -1, - 177, -1, 7, -1, 103, -1, 6, -1, 118, -1, - 107, -1, 108, -1, 123, -1, 134, -1, 115, -1, - 110, -1, 111, -1, 109, -1, 144, -1, 148, -1, - 112, -1, 113, -1, 114, -1, 164, -1, 116, -1, - 157, -1, 8, -1, 7, -1, 6, -1, 11, 166, - 175, -1, 12, 166, 175, -1, 23, 166, 175, -1, - 21, 166, 175, -1, 22, 166, 175, -1, 17, 166, - 175, -1, 24, 166, 175, -1, 18, 166, 175, -1, - 83, 166, 175, -1, 117, 166, 175, -1, 4, -1, - 7, -1, 10, 166, 169, 81, 119, 82, -1, -1, - 119, 6, 94, 177, 120, -1, 119, 177, 94, 177, - 120, -1, -1, 94, 121, -1, 122, -1, 121, 94, - 122, -1, 51, -1, 44, -1, 37, -1, 45, -1, - 46, -1, 47, -1, 13, 166, 177, 94, 177, 94, - 177, 94, 177, 124, 81, 125, 82, -1, -1, 124, - 63, 132, -1, 124, 62, 132, -1, 124, 60, 6, - -1, 124, 130, -1, 124, 59, 104, -1, 124, 15, - 103, -1, 124, 170, -1, 124, 171, -1, 124, 172, - -1, -1, 125, 37, 129, -1, 125, 38, 127, -1, - 125, 35, 127, -1, 125, 34, 127, -1, 125, 36, - 127, -1, 125, 28, 126, -1, 125, 29, 126, -1, - 125, 33, 126, -1, 125, 30, 126, -1, 125, 31, - 126, -1, 125, 25, 126, -1, 125, 32, 126, -1, - 125, 26, 126, -1, 125, 27, 126, -1, 125, 41, - 126, -1, 125, 40, 126, -1, 125, 39, 126, -1, - 125, 23, 104, 156, 177, 94, 177, 94, 177, 128, - -1, 104, 156, 177, 94, 177, 94, 177, 94, 177, - 94, 177, 131, -1, 177, 94, 177, 94, 177, 94, - 177, 94, 177, 131, -1, -1, 94, 177, 94, 177, - -1, 94, 177, 94, 177, 94, 132, -1, 94, 177, - 94, 177, 94, 132, 94, 132, -1, 104, 156, 177, - 94, 133, 94, 132, 94, 177, 94, 177, 94, 177, - 94, 177, 94, 132, -1, 104, 156, 177, 94, 133, - 94, 132, 94, 177, 94, 177, 94, 177, 94, 177, - -1, 21, 177, 94, 6, -1, -1, 94, 132, -1, - 94, 132, 94, 132, -1, 132, 84, 132, -1, 95, - 132, 96, -1, 179, -1, 92, 179, -1, 177, -1, - 6, -1, 14, 166, 177, 94, 177, 94, 177, 94, - 177, 141, 135, 81, 136, 82, -1, -1, 135, 63, - 132, -1, 135, 62, 132, -1, 135, 60, 6, -1, - 135, 130, -1, 135, 142, -1, 135, 59, 104, -1, - 135, 15, 103, -1, 135, 170, -1, 135, 171, -1, - 135, 172, -1, -1, 136, 37, 137, -1, 136, 38, - 139, -1, 136, 35, 139, -1, 136, 34, 139, -1, - 136, 36, 139, -1, 136, 28, 138, -1, 136, 29, - 138, -1, 136, 33, 138, -1, 136, 30, 138, -1, - 136, 31, 138, -1, 136, 25, 138, -1, 136, 32, - 138, -1, 136, 26, 138, -1, 136, 27, 138, -1, - 136, 41, 138, -1, 136, 40, 138, -1, 136, 39, - 138, -1, 136, 23, 104, 156, 177, 94, 177, 94, - 177, 128, -1, 104, 156, 177, 94, 133, 94, 132, - 94, 177, 94, 177, 94, 177, 94, 177, 94, 132, - 141, 140, -1, 104, 156, 177, 94, 133, 94, 132, - 94, 177, 94, 177, 94, 177, 94, 177, 140, -1, - 104, 156, 177, 94, 177, 94, 177, 94, 177, 94, - 177, 131, 141, 140, -1, 177, 94, 177, 94, 177, - 94, 177, 94, 177, 131, 141, 140, -1, -1, 173, - -1, -1, 94, 177, -1, 21, 177, 94, 6, 94, - 177, 94, 177, 143, -1, -1, 94, 177, -1, 15, - 166, 169, 145, -1, 81, 146, 82, -1, -1, 146, - 75, 6, 156, 177, 147, -1, 146, 75, 77, -1, - 146, 76, 6, 147, 145, -1, -1, 94, 147, -1, - 49, 147, -1, 48, 147, -1, 78, 147, -1, 50, - 147, -1, 73, 147, -1, 74, 147, -1, 16, 166, - 169, 149, -1, 81, 150, 82, -1, -1, 150, 75, - 6, 151, -1, 150, 75, 77, -1, 150, 76, 6, - 152, 149, -1, -1, 94, 177, -1, 94, 176, 94, - 176, 147, -1, 94, 176, 94, 176, 94, 177, -1, - -1, 94, 177, -1, 94, 176, 94, 177, -1, 94, - 176, 94, 176, 94, 177, -1, 94, 176, 94, 176, - 94, 176, 94, 177, -1, 154, 81, 155, 82, -1, - 20, 166, 169, -1, -1, 155, 177, 156, 6, -1, - -1, 94, -1, 19, 166, 158, 81, 159, 82, -1, - -1, 158, 66, 177, 94, 177, 94, 177, 94, 177, - -1, 158, 67, 177, 94, 177, 94, 177, 94, 177, - -1, 158, 71, 177, -1, 158, 68, 177, -1, 158, - 69, 177, -1, 158, 70, 177, -1, 158, 72, 177, - -1, -1, 159, 160, -1, 42, 6, 81, 161, 82, - -1, -1, 161, 162, -1, 160, -1, 43, 6, 94, - 6, -1, 43, 6, 94, 163, -1, 177, -1, 163, - 94, 177, -1, 79, 166, 177, 94, 177, 169, 81, - 165, 82, -1, -1, 165, 80, 177, -1, 165, 77, - -1, -1, 166, 167, -1, 166, 168, -1, 56, -1, - 58, -1, 54, -1, 52, -1, 55, -1, 57, -1, - 53, -1, -1, 169, 170, -1, 169, 171, -1, 169, - 172, -1, 65, 177, 94, 177, -1, 61, 177, -1, - 64, 177, -1, 169, 81, 174, 82, -1, 9, -1, - 4, -1, 88, 4, -1, 5, -1, 88, 5, -1, - 6, -1, 174, 156, 9, -1, 174, 156, 4, -1, - 174, 156, 88, 4, -1, 174, 156, 5, -1, 174, - 156, 88, 5, -1, 174, 156, 6, -1, 106, -1, - 173, -1, -1, 177, -1, 178, -1, 178, 87, 178, - -1, 178, 88, 178, -1, 178, 84, 178, -1, 178, - 86, 178, -1, 178, 89, 178, -1, 178, 90, 178, - -1, 178, 85, 178, -1, 91, 178, -1, 88, 178, - -1, 87, 178, -1, 95, 178, 96, -1, 179, -1, - 92, 179, -1, 4, -1, 5, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = -{ - 0, 344, 344, 390, 391, 462, 468, 480, 490, 498, - 498, 541, 547, 554, 564, 565, 574, 575, 576, 600, - 601, 607, 608, 609, 610, 634, 635, 641, 642, 643, - 644, 645, 646, 650, 651, 652, 656, 660, 676, 698, - 708, 716, 724, 728, 732, 736, 747, 752, 761, 785, - 786, 787, 796, 797, 800, 801, 804, 805, 806, 807, - 808, 809, 814, 849, 850, 851, 852, 853, 854, 855, - 856, 857, 858, 861, 862, 863, 864, 865, 866, 867, - 868, 869, 870, 872, 873, 874, 875, 876, 877, 878, - 879, 881, 891, 914, 936, 938, 943, 950, 961, 975, - 990, 995, 996, 997, 1001, 1002, 1003, 1004, 1008, 1013, - 1021, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, - 1074, 1075, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, - 1086, 1087, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, - 1098, 1108, 1133, 1149, 1175, 1198, 1199, 1202, 1203, 1207, - 1214, 1215, 1219, 1242, 1246, 1247, 1256, 1262, 1281, 1282, - 1283, 1284, 1285, 1286, 1287, 1288, 1292, 1318, 1322, 1323, - 1339, 1345, 1365, 1366, 1370, 1378, 1389, 1390, 1394, 1400, - 1408, 1428, 1466, 1476, 1477, 1510, 1512, 1517, 1533, 1534, - 1544, 1554, 1561, 1568, 1575, 1582, 1592, 1593, 1602, 1610, - 1611, 1620, 1625, 1631, 1640, 1641, 1645, 1671, 1672, 1677, - 1686, 1687, 1697, 1712, 1714, 1716, 1718, 1722, 1724, 1726, - 1731, 1732, 1740, 1748, 1766, 1773, 1777, 1781, 1796, 1797, - 1798, 1799, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, - 1811, 1812, 1819, 1820, 1824, 1827, 1828, 1829, 1830, 1831, - 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 1842, 1843 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "tNL", "tNUMBER", "tLNUMBER", "tSTRING", - "tIDENT", "tFILENAME", "tRAWDATA", "tACCELERATORS", "tBITMAP", "tCURSOR", - "tDIALOG", "tDIALOGEX", "tMENU", "tMENUEX", "tMESSAGETABLE", "tRCDATA", - "tVERSIONINFO", "tSTRINGTABLE", "tFONT", "tFONTDIR", "tICON", "tHTML", - "tAUTO3STATE", "tAUTOCHECKBOX", "tAUTORADIOBUTTON", "tCHECKBOX", - "tDEFPUSHBUTTON", "tPUSHBUTTON", "tRADIOBUTTON", "tSTATE3", "tGROUPBOX", - "tCOMBOBOX", "tLISTBOX", "tSCROLLBAR", "tCONTROL", "tEDITTEXT", "tRTEXT", - "tCTEXT", "tLTEXT", "tBLOCK", "tVALUE", "tSHIFT", "tALT", "tASCII", - "tVIRTKEY", "tGRAYED", "tCHECKED", "tINACTIVE", "tNOINVERT", "tPURE", - "tIMPURE", "tDISCARDABLE", "tLOADONCALL", "tPRELOAD", "tFIXED", - "tMOVEABLE", "tCLASS", "tCAPTION", "tCHARACTERISTICS", "tEXSTYLE", - "tSTYLE", "tVERSION", "tLANGUAGE", "tFILEVERSION", "tPRODUCTVERSION", - "tFILEFLAGSMASK", "tFILEOS", "tFILETYPE", "tFILEFLAGS", "tFILESUBTYPE", - "tMENUBARBREAK", "tMENUBREAK", "tMENUITEM", "tPOPUP", "tSEPARATOR", - "tHELP", "tTOOLBAR", "tBUTTON", "tBEGIN", "tEND", "tDLGINIT", "'|'", - "'^'", "'&'", "'+'", "'-'", "'*'", "'/'", "'~'", "tNOT", "pUPM", "','", - "'('", "')'", "$accept", "resource_file", "resources", "resource", "$@1", - "usrcvt", "nameid", "nameid_s", "resource_definition", "filename", - "bitmap", "cursor", "icon", "font", "fontdir", "messagetable", "html", - "rcdata", "dlginit", "userres", "usertype", "accelerators", "events", - "acc_opt", "accs", "acc", "dialog", "dlg_attributes", "ctrls", - "lab_ctrl", "ctrl_desc", "iconinfo", "gen_ctrl", "opt_font", - "optional_style_pair", "style", "ctlclass", "dialogex", "dlgex_attribs", - "exctrls", "gen_exctrl", "lab_exctrl", "exctrl_desc", "opt_data", - "helpid", "opt_exfont", "opt_expr", "menu", "menu_body", - "item_definitions", "item_options", "menuex", "menuex_body", - "itemex_definitions", "itemex_options", "itemex_p_options", - "stringtable", "stt_head", "strings", "opt_comma", "versioninfo", - "fix_version", "ver_blocks", "ver_block", "ver_values", "ver_value", - "ver_words", "toolbar", "toolbar_items", "loadmemopts", "lamo", "lama", - "opt_lvc", "opt_language", "opt_characts", "opt_version", "raw_data", - "raw_elements", "file_raw", "e_expr", "expr", "xpr", "any_num", 0 -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 338, 124, 94, 38, 43, 45, 42, - 47, 126, 339, 340, 44, 40, 41 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 97, 98, 99, 99, 99, 100, 100, 100, 101, - 100, 102, 103, 103, 104, 104, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 106, 106, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 117, 118, 119, - 119, 119, 120, 120, 121, 121, 122, 122, 122, 122, - 122, 122, 123, 124, 124, 124, 124, 124, 124, 124, - 124, 124, 124, 125, 125, 125, 125, 125, 125, 125, - 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, - 125, 125, 126, 127, 128, 128, 128, 128, 129, 129, - 130, 131, 131, 131, 132, 132, 132, 132, 133, 133, - 134, 135, 135, 135, 135, 135, 135, 135, 135, 135, - 135, 135, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 137, 137, 138, 139, 140, 140, 141, 141, 142, - 143, 143, 144, 145, 146, 146, 146, 146, 147, 147, - 147, 147, 147, 147, 147, 147, 148, 149, 150, 150, - 150, 150, 151, 151, 151, 151, 152, 152, 152, 152, - 152, 153, 154, 155, 155, 156, 156, 157, 158, 158, - 158, 158, 158, 158, 158, 158, 159, 159, 160, 161, - 161, 162, 162, 162, 163, 163, 164, 165, 165, 165, - 166, 166, 166, 167, 167, 167, 167, 168, 168, 168, - 169, 169, 169, 169, 170, 171, 172, 173, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 175, 175, 176, 176, 177, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, 179, 179 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 0, 2, 2, 3, 3, 1, 0, - 5, 0, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 1, 1, 6, 0, - 5, 5, 0, 2, 1, 3, 1, 1, 1, 1, - 1, 1, 13, 0, 3, 3, 3, 2, 3, 3, - 2, 2, 2, 0, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 10, 12, 10, 0, 4, 6, 8, 17, 15, - 4, 0, 2, 4, 3, 3, 1, 2, 1, 1, - 14, 0, 3, 3, 3, 2, 2, 3, 3, 2, - 2, 2, 0, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 10, 19, 16, 14, 12, 0, 1, 0, 2, 9, - 0, 2, 4, 3, 0, 6, 3, 5, 0, 2, - 2, 2, 2, 2, 2, 2, 4, 3, 0, 4, - 3, 5, 0, 2, 5, 6, 0, 2, 4, 6, - 8, 4, 3, 0, 4, 0, 1, 6, 0, 9, - 9, 3, 3, 3, 3, 3, 0, 2, 5, 0, - 2, 1, 4, 4, 1, 3, 9, 0, 3, 2, - 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, - 0, 2, 2, 2, 4, 2, 2, 4, 1, 1, - 2, 1, 2, 1, 3, 3, 4, 3, 4, 3, - 1, 1, 0, 1, 1, 3, 3, 3, 3, 3, - 3, 3, 2, 2, 2, 3, 1, 2, 1, 1 -}; - -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint16 yydefact[] = -{ - 3, 0, 2, 1, 5, 258, 259, 11, 210, 9, - 0, 0, 0, 0, 0, 4, 8, 0, 11, 244, - 256, 0, 220, 0, 254, 253, 252, 257, 0, 183, - 0, 0, 0, 0, 0, 0, 0, 0, 46, 47, - 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, - 210, 210, 210, 210, 210, 210, 7, 17, 18, 24, - 22, 23, 27, 28, 29, 21, 31, 210, 16, 19, - 20, 25, 26, 32, 30, 216, 219, 215, 217, 213, - 218, 214, 211, 212, 182, 0, 255, 0, 6, 247, - 251, 248, 245, 246, 249, 250, 220, 220, 220, 0, - 0, 220, 220, 220, 220, 188, 220, 220, 220, 220, - 0, 220, 220, 0, 0, 0, 221, 222, 223, 0, - 181, 185, 0, 35, 34, 33, 240, 0, 241, 36, - 37, 0, 0, 0, 0, 41, 43, 0, 39, 40, - 38, 42, 0, 44, 45, 225, 226, 0, 10, 186, - 0, 49, 0, 0, 0, 154, 152, 168, 166, 0, - 0, 0, 0, 0, 0, 0, 196, 0, 0, 184, - 0, 229, 231, 233, 228, 0, 185, 0, 0, 0, - 0, 0, 0, 192, 193, 194, 191, 195, 0, 220, - 224, 0, 48, 0, 230, 232, 227, 0, 0, 0, - 0, 0, 153, 0, 0, 167, 0, 0, 0, 187, - 197, 0, 0, 0, 235, 237, 239, 234, 0, 0, - 0, 185, 156, 158, 172, 170, 176, 0, 0, 0, - 207, 52, 52, 236, 238, 0, 0, 0, 158, 158, - 158, 158, 158, 158, 158, 0, 242, 169, 242, 0, - 0, 0, 199, 0, 0, 50, 51, 63, 147, 158, - 161, 160, 163, 164, 165, 162, 159, 157, 0, 173, - 0, 177, 171, 0, 0, 0, 209, 0, 206, 58, - 57, 59, 60, 61, 56, 53, 54, 0, 0, 111, - 155, 242, 242, 0, 0, 0, 198, 201, 200, 208, - 0, 0, 0, 0, 0, 0, 0, 73, 67, 70, - 71, 72, 148, 0, 158, 243, 0, 178, 189, 190, - 0, 55, 13, 69, 12, 0, 15, 14, 68, 66, - 0, 0, 65, 106, 64, 0, 0, 0, 0, 0, - 0, 0, 122, 115, 116, 119, 120, 121, 158, 174, - 242, 0, 0, 107, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 62, 118, 0, 117, 114, 113, - 112, 0, 175, 0, 179, 202, 203, 204, 100, 105, - 104, 185, 185, 84, 86, 87, 79, 80, 82, 83, - 85, 81, 77, 0, 76, 78, 185, 74, 75, 90, - 89, 88, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 110, 0, 0, 0, 0, 0, 0, 100, 185, - 185, 133, 135, 136, 128, 129, 131, 132, 134, 130, - 126, 0, 125, 127, 185, 123, 124, 139, 138, 137, - 180, 205, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 109, 0, 108, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 150, 0, 0, 0, 0, - 94, 0, 0, 0, 0, 149, 0, 0, 0, 0, - 0, 91, 0, 0, 0, 151, 94, 0, 0, 0, - 0, 0, 101, 0, 140, 0, 0, 0, 0, 0, - 0, 93, 0, 0, 101, 0, 95, 101, 102, 0, - 0, 147, 0, 0, 92, 0, 0, 101, 145, 0, - 96, 103, 0, 147, 144, 146, 0, 0, 0, 145, - 0, 97, 99, 143, 0, 0, 145, 98, 0, 142, - 147, 145, 141 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 1, 2, 15, 23, 21, 327, 392, 56, 126, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 170, 255, 285, 286, 69, 287, 335, 393, - 402, 511, 407, 308, 531, 332, 484, 70, 313, 381, - 455, 441, 450, 554, 289, 344, 505, 71, 156, 179, - 266, 72, 158, 180, 247, 249, 16, 17, 87, 150, - 73, 137, 188, 210, 275, 298, 386, 74, 253, 22, - 82, 83, 127, 116, 117, 118, 128, 176, 129, 268, - 324, 19, 20 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -520 -static const yytype_int16 yypact[] = -{ - -520, 3, 8, -520, -520, -520, -520, -520, -520, -520, - 220, 220, 220, 124, 220, -520, -520, -61, -520, 621, - -520, 366, 660, 220, -520, -520, -520, -520, 608, -520, - 366, 220, 220, 220, 220, 220, 220, 220, -520, -520, - -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, - -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, - -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, - -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, - -520, -520, -520, -520, 207, -58, -520, 111, -520, 322, - 350, 554, 66, 66, -520, -520, 660, 348, 348, 14, - 14, 660, 660, 348, 348, 660, 348, 348, 348, 348, - 14, 348, 348, 220, 220, 220, -520, -520, -520, 220, - -520, -53, 233, -520, -520, -520, -520, 432, -520, -520, - -520, -47, -34, 434, 455, -520, -520, 603, -520, -520, - -520, -520, -30, -520, -520, -520, -520, -14, -520, -520, - 78, -520, 26, 220, 220, -520, -520, -520, -520, 220, - 220, 220, 220, 220, 220, 220, -520, 220, 220, -520, - 50, -520, -520, -520, -520, 176, -57, 16, 36, 97, - 139, 42, 70, -520, -520, -520, -520, -520, -32, -520, - -520, 73, -520, 82, -520, -520, -520, 279, 220, 220, - 0, 86, -520, 1, 184, -520, 220, 220, 185, -520, - -520, 467, 220, 220, -520, -520, -520, -520, 235, 88, - 100, -53, -520, 368, 107, -520, 118, 138, 151, 171, - -520, 187, 187, -520, -520, 220, 220, 220, 368, 368, - 368, 368, 368, 368, 368, 195, 220, -520, 220, 201, - 220, 220, -520, 236, 285, -520, -520, -520, 193, 368, - -520, -520, -520, -520, -520, -520, -520, -520, 202, 209, - 210, 209, -520, 216, 223, -19, -520, 220, -520, -520, - -520, -520, -520, -520, -520, 227, -520, 278, 220, -520, - -520, 220, 220, 220, 220, 289, -520, -520, -520, -520, - 285, 182, 220, 83, 328, 54, 54, -520, -520, -520, - -520, -520, -520, 332, 379, -520, 234, 209, -520, -520, - 250, -520, -520, -520, -520, 251, -520, -520, -520, -520, - 124, 54, 268, -520, 268, 564, 182, 220, 83, 351, - 54, 54, -520, -520, -520, -520, -520, -520, 135, -520, - 220, 214, 352, -520, -39, 54, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 220, 220, 220, 83, - 220, 83, 83, 83, -520, -520, 269, -520, -520, 268, - 268, 583, -520, 275, 209, -520, 277, -520, -520, -520, - -520, -53, -53, -520, -520, -520, -520, -520, -520, -520, - -520, -520, -520, 280, -520, -520, -53, -520, -520, -520, - -520, -520, 356, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 220, 220, 220, 83, 220, 83, 83, - 83, -520, 220, 220, 220, 220, 220, 220, 292, -53, - -53, -520, -520, -520, -520, -520, -520, -520, -520, -520, - -520, 304, -520, -520, -53, -520, -520, -520, -520, -520, - -520, -520, 305, 320, 321, 325, 220, 220, 220, 220, - 220, 220, 220, 220, 232, 326, 330, 349, 353, 354, - 357, 365, 367, -520, 369, -520, 220, 220, 220, 220, - 232, 220, 220, 220, 54, 380, 388, 389, 398, 400, - 406, 407, 409, -67, 220, -520, 220, 220, 220, 54, - 220, -520, 220, 220, 220, -520, 406, 413, 415, -1, - 423, 424, 427, 428, -520, 220, 220, 220, 220, 220, - 54, -520, 220, 439, 427, 440, 441, 427, 10, 443, - 220, 193, 220, 54, -520, 54, 220, 427, 478, 447, - 59, 268, 451, 193, -520, -520, 220, 54, 220, 478, - 452, 268, 453, -520, 220, 54, 186, 268, 54, -520, - 60, 478, -520 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -520, -520, -520, -520, -520, 408, -292, -295, 342, -520, - -520, -520, -520, -520, -520, -520, -520, -520, -520, -520, - -520, -520, -520, 212, -520, 150, -520, -520, -520, 208, - -220, -56, -520, 239, -472, -302, 61, -520, -520, -520, - -520, 238, -171, -480, -519, -520, -520, -520, 308, -520, - 19, -520, 300, -520, -520, -520, -520, -520, -520, -175, - -520, -520, -520, 282, -520, -520, -520, -520, -520, 585, - -520, -520, -20, -273, -271, -261, -371, -520, 579, -243, - -2, 444, 20 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -244 -static const yytype_int16 yytable[] = -{ - 18, 197, 84, 3, 334, 270, 221, 224, 328, 323, - 208, 4, 5, 6, 309, 7, 310, 355, 5, 6, - 29, 85, 548, 208, 295, 196, 311, 514, 8, 354, - 171, 172, 173, 27, 559, 174, 119, 149, 379, 380, - 345, 149, 346, 377, 375, 355, 237, 153, 314, 316, - 209, 571, 347, 390, 5, 6, 191, 389, 5, 6, - 154, 391, 541, 296, 167, 544, 75, 76, 77, 78, - 79, 80, 81, 9, 406, 553, 122, 222, 225, 563, - 168, 133, 134, 355, 169, 121, 569, 5, 6, 326, - 322, 572, 223, 527, 355, 10, 11, 131, 132, 12, - 13, 10, 11, 14, 545, 12, 13, 383, 142, 14, - 198, 145, 146, 147, 175, 5, 6, 148, 439, 440, - 440, 440, 440, 440, 440, 440, 440, 440, 5, 6, - 199, 454, 192, 440, 440, 440, 206, 10, 11, 5, - 6, 12, 13, 355, 355, 14, 330, 404, 405, 331, - 408, 177, 178, 557, 288, 36, 37, 181, 182, 183, - 184, 185, 186, 187, 207, 189, 190, 212, 193, 211, - 10, 11, 200, 201, 12, 13, 213, 555, 14, 202, - 194, 195, 235, 238, 239, 240, 5, 6, 555, 322, - 226, 229, 503, 120, 236, 555, 219, 220, 10, 11, - 555, 246, 12, 13, 227, 228, 14, 519, 241, 242, - 231, 232, 248, 243, 203, 204, 434, 435, 5, 6, - 385, 205, 10, 11, 5, 6, 12, 13, 538, 244, - 14, 437, 250, 257, 258, 259, 5, 6, 483, 233, - 234, 550, 245, 551, 269, 251, 271, -220, 273, 274, - -220, -220, 252, 452, 453, 561, 456, 260, 261, 262, - 263, 264, 265, 567, 467, 468, 570, -220, 113, 10, - 11, 114, 115, 12, 13, 299, 155, 14, 290, 470, - 568, 254, 157, 214, 215, 216, 312, 288, 217, 315, - 317, 318, 319, 301, 113, 320, 291, 114, 115, 302, - 325, 10, 11, -243, 292, 12, 13, 10, 11, 14, - 293, 12, 13, 276, 151, 14, 277, 294, 278, 10, - 11, 300, 279, 12, 13, 333, 333, 14, 350, 280, - 281, 282, 283, 349, 329, 376, 284, 303, 304, 113, - 305, 306, 114, 115, 351, 352, 382, 336, 384, 387, - 353, 333, 355, 337, 123, 124, 125, 378, 388, 307, - 333, 333, 438, 412, 403, 403, 403, 218, 403, 432, - 38, 433, 88, 39, 436, 333, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 466, 50, 51, 52, - 53, 338, 339, 113, 340, 341, 114, 115, 469, 471, - 75, 76, 77, 78, 79, 80, 81, 32, 33, 34, - 35, 36, 37, 342, 472, 473, 238, 239, 240, 474, - 486, 451, 451, 451, 487, 451, 30, 238, 239, 240, - 460, 461, 462, 463, 464, 465, 33, 34, 35, 36, - 37, 241, 242, 488, 256, 54, 243, 489, 490, 55, - 321, 491, 241, 242, 24, 25, 26, 243, 28, 492, - 524, 493, 244, 494, 475, 476, 477, 478, 479, 480, - 481, 482, 485, 348, 504, 89, 90, 91, 92, 93, - 94, 95, 506, 507, 495, 496, 497, 498, 485, 500, - 501, 502, 508, 113, 509, 113, 114, 115, 114, 115, - 510, 512, 515, 513, 516, 517, 518, 525, 520, 526, - 521, 522, 523, 152, 333, 155, 113, 528, 529, 114, - 115, 530, 532, 533, 534, 535, 536, 537, 113, 333, - 539, 114, 115, 540, 542, 543, 157, 546, 547, -220, - 549, 556, -220, -220, 552, 558, 564, 565, 230, 272, - 333, 499, 343, 267, 560, 0, 562, 297, 0, -220, - 0, 0, 566, 333, 0, 333, 394, 395, 396, 397, - 398, 399, 400, 401, 0, 0, 0, 333, 0, 409, - 410, 411, 0, 0, 0, 333, 0, 356, 333, 357, - 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, - 368, 369, 370, 371, 372, 373, 413, 0, 414, 415, - 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, - 426, 427, 428, 429, 430, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 34, 35, 36, 37, 0, 374, 0, 0, 0, - 0, 0, 112, 442, 443, 444, 445, 446, 447, 448, - 449, 0, 0, 0, 0, 431, 457, 458, 459, 159, - 160, 161, 162, 163, 164, 165, 0, 130, 0, 0, - 0, 0, 135, 136, 166, 138, 139, 140, 141, 0, - 143, 144, 31, 32, 33, 34, 35, 36, 37, 0, - 0, 0, 0, 0, 86, 31, 32, 33, 34, 35, - 36, 37, 75, 76, 77, 78, 79, 80, 81 -}; - -static const yytype_int16 yycheck[] = -{ - 2, 176, 22, 0, 306, 248, 6, 6, 303, 301, - 42, 3, 4, 5, 287, 7, 287, 84, 4, 5, - 81, 23, 541, 42, 43, 82, 287, 94, 20, 331, - 4, 5, 6, 13, 553, 9, 94, 94, 340, 341, - 313, 94, 313, 338, 336, 84, 221, 94, 291, 292, - 82, 570, 313, 355, 4, 5, 6, 96, 4, 5, - 94, 356, 534, 82, 94, 537, 52, 53, 54, 55, - 56, 57, 58, 65, 369, 547, 96, 77, 77, 559, - 94, 101, 102, 84, 6, 87, 566, 4, 5, 6, - 7, 571, 6, 94, 84, 87, 88, 99, 100, 91, - 92, 87, 88, 95, 94, 91, 92, 350, 110, 95, - 94, 113, 114, 115, 88, 4, 5, 119, 413, 414, - 415, 416, 417, 418, 419, 420, 421, 422, 4, 5, - 94, 426, 82, 428, 429, 430, 94, 87, 88, 4, - 5, 91, 92, 84, 84, 95, 92, 367, 368, 95, - 370, 153, 154, 94, 94, 89, 90, 159, 160, 161, - 162, 163, 164, 165, 94, 167, 168, 94, 170, 189, - 87, 88, 75, 76, 91, 92, 94, 548, 95, 82, - 4, 5, 94, 48, 49, 50, 4, 5, 559, 7, - 6, 6, 494, 82, 94, 566, 198, 199, 87, 88, - 571, 94, 91, 92, 206, 207, 95, 509, 73, 74, - 212, 213, 94, 78, 75, 76, 391, 392, 4, 5, - 6, 82, 87, 88, 4, 5, 91, 92, 530, 94, - 95, 406, 94, 235, 236, 237, 4, 5, 6, 4, - 5, 543, 223, 545, 246, 94, 248, 61, 250, 251, - 64, 65, 81, 424, 425, 557, 427, 238, 239, 240, - 241, 242, 243, 565, 439, 440, 568, 81, 61, 87, - 88, 64, 65, 91, 92, 277, 81, 95, 259, 454, - 94, 94, 81, 4, 5, 6, 288, 94, 9, 291, - 292, 293, 294, 15, 61, 6, 94, 64, 65, 21, - 302, 87, 88, 94, 94, 91, 92, 87, 88, 95, - 94, 91, 92, 77, 81, 95, 80, 94, 82, 87, - 88, 94, 37, 91, 92, 305, 306, 95, 94, 44, - 45, 46, 47, 314, 6, 337, 51, 59, 60, 61, - 62, 63, 64, 65, 94, 94, 348, 15, 350, 351, - 330, 331, 84, 21, 6, 7, 8, 6, 6, 81, - 340, 341, 6, 94, 366, 367, 368, 88, 370, 94, - 4, 94, 30, 7, 94, 355, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 94, 21, 22, 23, - 24, 59, 60, 61, 62, 63, 64, 65, 94, 94, - 52, 53, 54, 55, 56, 57, 58, 85, 86, 87, - 88, 89, 90, 81, 94, 94, 48, 49, 50, 94, - 94, 423, 424, 425, 94, 427, 18, 48, 49, 50, - 432, 433, 434, 435, 436, 437, 86, 87, 88, 89, - 90, 73, 74, 94, 232, 79, 78, 94, 94, 83, - 300, 94, 73, 74, 10, 11, 12, 78, 14, 94, - 516, 94, 94, 94, 466, 467, 468, 469, 470, 471, - 472, 473, 474, 94, 94, 31, 32, 33, 34, 35, - 36, 37, 94, 94, 486, 487, 488, 489, 490, 491, - 492, 493, 94, 61, 94, 61, 64, 65, 64, 65, - 94, 94, 504, 94, 506, 507, 508, 94, 510, 94, - 512, 513, 514, 81, 494, 81, 61, 94, 94, 64, - 65, 94, 94, 525, 526, 527, 528, 529, 61, 509, - 532, 64, 65, 94, 94, 94, 81, 94, 540, 61, - 542, 94, 64, 65, 546, 94, 94, 94, 81, 249, - 530, 490, 313, 245, 556, -1, 558, 275, -1, 81, - -1, -1, 564, 543, -1, 545, 358, 359, 360, 361, - 362, 363, 364, 365, -1, -1, -1, 557, -1, 371, - 372, 373, -1, -1, -1, 565, -1, 23, 568, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 23, -1, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 87, 88, 89, 90, -1, 82, -1, -1, -1, - -1, -1, 67, 415, 416, 417, 418, 419, 420, 421, - 422, -1, -1, -1, -1, 82, 428, 429, 430, 66, - 67, 68, 69, 70, 71, 72, -1, 98, -1, -1, - -1, -1, 103, 104, 81, 106, 107, 108, 109, -1, - 111, 112, 84, 85, 86, 87, 88, 89, 90, -1, - -1, -1, -1, -1, 96, 84, 85, 86, 87, 88, - 89, 90, 52, 53, 54, 55, 56, 57, 58 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 98, 99, 0, 3, 4, 5, 7, 20, 65, - 87, 88, 91, 92, 95, 100, 153, 154, 177, 178, - 179, 102, 166, 101, 178, 178, 178, 179, 178, 81, - 102, 84, 85, 86, 87, 88, 89, 90, 4, 7, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 21, 22, 23, 24, 79, 83, 105, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 117, 118, 123, - 134, 144, 148, 157, 164, 52, 53, 54, 55, 56, - 57, 58, 167, 168, 169, 177, 96, 155, 105, 178, - 178, 178, 178, 178, 178, 178, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 61, 64, 65, 170, 171, 172, 94, - 82, 177, 169, 6, 7, 8, 106, 169, 173, 175, - 175, 177, 177, 169, 169, 175, 175, 158, 175, 175, - 175, 175, 177, 175, 175, 177, 177, 177, 177, 94, - 156, 81, 81, 94, 94, 81, 145, 81, 149, 66, - 67, 68, 69, 70, 71, 72, 81, 94, 94, 6, - 119, 4, 5, 6, 9, 88, 174, 177, 177, 146, - 150, 177, 177, 177, 177, 177, 177, 177, 159, 177, - 177, 6, 82, 177, 4, 5, 82, 156, 94, 94, - 75, 76, 82, 75, 76, 82, 94, 94, 42, 82, - 160, 169, 94, 94, 4, 5, 6, 9, 88, 177, - 177, 6, 77, 6, 6, 77, 6, 177, 177, 6, - 81, 177, 177, 4, 5, 94, 94, 156, 48, 49, - 50, 73, 74, 78, 94, 147, 94, 151, 94, 152, - 94, 94, 81, 165, 94, 120, 120, 177, 177, 177, - 147, 147, 147, 147, 147, 147, 147, 145, 176, 177, - 176, 177, 149, 177, 177, 161, 77, 80, 82, 37, - 44, 45, 46, 47, 51, 121, 122, 124, 94, 141, - 147, 94, 94, 94, 94, 43, 82, 160, 162, 177, - 94, 15, 21, 59, 60, 62, 63, 81, 130, 170, - 171, 172, 177, 135, 176, 177, 176, 177, 177, 177, - 6, 122, 7, 103, 177, 177, 6, 103, 104, 6, - 92, 95, 132, 179, 132, 125, 15, 21, 59, 60, - 62, 63, 81, 130, 142, 170, 171, 172, 94, 147, - 94, 94, 94, 179, 132, 84, 23, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 82, 103, 177, 104, 6, 132, - 132, 136, 177, 176, 177, 6, 163, 177, 6, 96, - 132, 104, 104, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 127, 177, 127, 127, 104, 129, 127, 126, - 126, 126, 94, 23, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 82, 94, 94, 156, 156, 94, 156, 6, 104, - 104, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 139, 177, 139, 139, 104, 137, 139, 138, 138, 138, - 177, 177, 177, 177, 177, 177, 94, 156, 156, 94, - 156, 94, 94, 94, 94, 177, 177, 177, 177, 177, - 177, 177, 177, 6, 133, 177, 94, 94, 94, 94, - 94, 94, 94, 94, 94, 177, 177, 177, 177, 133, - 177, 177, 177, 132, 94, 143, 94, 94, 94, 94, - 94, 128, 94, 94, 94, 177, 177, 177, 177, 132, - 177, 177, 177, 177, 128, 94, 94, 94, 94, 94, - 94, 131, 94, 177, 177, 177, 177, 177, 132, 177, - 94, 131, 94, 94, 131, 94, 94, 177, 141, 177, - 132, 132, 177, 131, 140, 173, 94, 94, 94, 141, - 177, 132, 177, 140, 94, 94, 177, 132, 94, 140, - 132, 141, 140 -}; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - - -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif - - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -#ifndef YY_LOCATION_PRINT -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) -#else -# define YYLEX yylex () -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif -{ - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - switch (yytype) - { - default: - break; - } -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif -{ - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - yy_symbol_value_print (yyoutput, yytype, yyvaluep); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule) -#else -static void -yy_reduce_print (yyvsp, yyrule) - YYSTYPE *yyvsp; - int yyrule; -#endif -{ - int yynrhs = yyr2[yyrule]; - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule); \ -} while (YYID (0)) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static YYSIZE_T -yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static char * -yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into YYRESULT an error message about the unexpected token - YYCHAR while in state YYSTATE. Return the number of bytes copied, - including the terminating null byte. If YYRESULT is null, do not - copy anything; just return the number of bytes that would be - copied. As a special case, return 0 if an ordinary "syntax error" - message will do. Return YYSIZE_MAXIMUM if overflow occurs during - size calculation. */ -static YYSIZE_T -yysyntax_error (char *yyresult, int yystate, int yychar) -{ - int yyn = yypact[yystate]; - - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else - { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } - - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - - if (yysize_overflow) - return YYSIZE_MAXIMUM; - - if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } - return yysize; - } -} -#endif /* YYERROR_VERBOSE */ - - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yymsg, yytype, yyvaluep) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; -#endif -{ - YYUSE (yyvaluep); - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - switch (yytype) - { - - default: - break; - } -} - -/* Prevent warnings from -Wmissing-prototypes. */ -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - -/* The lookahead symbol. */ -int yychar; - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; - -/* Number of syntax errors so far. */ -int yynerrs; - - - -/*-------------------------. -| yyparse or yypush_parse. | -`-------------------------*/ - -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void) -#else -int -yyparse () - -#endif -#endif -{ - - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - yyssp = yyss; - yyvsp = yyvs; - - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - *++yyvsp = yylval; - - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: - -/* Line 1464 of yacc.c */ -#line 344 "parser.y" - { - resource_t *rsc, *head; - /* First add stringtables to the resource-list */ - rsc = build_stt_resources(sttres); - /* 'build_stt_resources' returns a head and $1 is a tail */ - if((yyvsp[(1) - (1)].res)) - { - (yyvsp[(1) - (1)].res)->next = rsc; - if(rsc) - rsc->prev = (yyvsp[(1) - (1)].res); - } - else - (yyvsp[(1) - (1)].res) = rsc; - /* Find the tail again */ - while((yyvsp[(1) - (1)].res) && (yyvsp[(1) - (1)].res)->next) - (yyvsp[(1) - (1)].res) = (yyvsp[(1) - (1)].res)->next; - /* Now add any fontdirecory */ - rsc = build_fontdirs((yyvsp[(1) - (1)].res)); - /* 'build_fontdir' returns a head and $1 is a tail */ - if((yyvsp[(1) - (1)].res)) - { - (yyvsp[(1) - (1)].res)->next = rsc; - if(rsc) - rsc->prev = (yyvsp[(1) - (1)].res); - } - else - (yyvsp[(1) - (1)].res) = rsc; - - /* Final statements before we're done */ - if ((head = get_resource_head((yyvsp[(1) - (1)].res))) != NULL) - { - if (resource_top) /* append to existing resources */ - { - resource_t *tail = resource_top; - while (tail->next) tail = tail->next; - tail->next = head; - head->prev = tail; - } - else resource_top = head; - } - sttres = NULL; - ;} - break; - - case 3: - -/* Line 1464 of yacc.c */ -#line 390 "parser.y" - { (yyval.res) = NULL; want_id = 1; ;} - break; - - case 4: - -/* Line 1464 of yacc.c */ -#line 391 "parser.y" - { - if((yyvsp[(2) - (2)].res)) - { - resource_t *tail = (yyvsp[(2) - (2)].res); - resource_t *head = (yyvsp[(2) - (2)].res); - while(tail->next) - tail = tail->next; - while(head->prev) - head = head->prev; - head->prev = (yyvsp[(1) - (2)].res); - if((yyvsp[(1) - (2)].res)) - (yyvsp[(1) - (2)].res)->next = head; - (yyval.res) = tail; - /* Check for duplicate identifiers */ - while((yyvsp[(1) - (2)].res) && head) - { - resource_t *rsc = (yyvsp[(1) - (2)].res); - while(rsc) - { - if(rsc->type == head->type - && rsc->lan->id == head->lan->id - && rsc->lan->sub == head->lan->sub - && !compare_name_id(rsc->name, head->name) - && (rsc->type != res_usr || !compare_name_id(rsc->res.usr->type,head->res.usr->type))) - { - yyerror("Duplicate resource name '%s'", get_nameid_str(rsc->name)); - } - rsc = rsc->prev; - } - head = head->next; - } - } - else if((yyvsp[(1) - (2)].res)) - { - resource_t *tail = (yyvsp[(1) - (2)].res); - while(tail->next) - tail = tail->next; - (yyval.res) = tail; - } - else - (yyval.res) = NULL; - - if(!dont_want_id) /* See comments in language parsing below */ - want_id = 1; - dont_want_id = 0; - ;} - break; - - case 6: - -/* Line 1464 of yacc.c */ -#line 468 "parser.y" - { - (yyval.res) = (yyvsp[(3) - (3)].res); - if((yyval.res)) - { - if((yyvsp[(1) - (3)].num) > 65535 || (yyvsp[(1) - (3)].num) < -32768) - yyerror("Resource's ID out of range (%d)", (yyvsp[(1) - (3)].num)); - (yyval.res)->name = new_name_id(); - (yyval.res)->name->type = name_ord; - (yyval.res)->name->name.i_name = (yyvsp[(1) - (3)].num); - chat("Got %s (%d)\n", get_typename((yyvsp[(3) - (3)].res)), (yyval.res)->name->name.i_name); - } - ;} - break; - - case 7: - -/* Line 1464 of yacc.c */ -#line 480 "parser.y" - { - (yyval.res) = (yyvsp[(3) - (3)].res); - if((yyval.res)) - { - (yyval.res)->name = new_name_id(); - (yyval.res)->name->type = name_str; - (yyval.res)->name->name.s_name = (yyvsp[(1) - (3)].str); - chat("Got %s (%s)\n", get_typename((yyvsp[(3) - (3)].res)), (yyval.res)->name->name.s_name->str.cstr); - } - ;} - break; - - case 8: - -/* Line 1464 of yacc.c */ -#line 490 "parser.y" - { - /* Don't do anything, stringtables are converted to - * resource_t structures when we are finished parsing and - * the final rule of the parser is reduced (see above) - */ - (yyval.res) = NULL; - chat("Got STRINGTABLE\n"); - ;} - break; - - case 9: - -/* Line 1464 of yacc.c */ -#line 498 "parser.y" - {want_nl = 1; ;} - break; - - case 10: - -/* Line 1464 of yacc.c */ -#line 498 "parser.y" - { - /* We *NEED* the newline to delimit the expression. - * Otherwise, we would not be able to set the next - * want_id anymore because of the token-lookahead. - * - * However, we can test the lookahead-token for - * being "non-expression" type, in which case we - * continue. Fortunately, tNL is the only token that - * will break expression parsing and is implicitly - * void, so we just remove it. This scheme makes it - * possible to do some (not all) fancy preprocessor - * stuff. - * BTW, we also need to make sure that the next - * reduction of 'resources' above will *not* set - * want_id because we already have a lookahead that - * cannot be undone. - */ - if(yychar != YYEMPTY && yychar != tNL) - dont_want_id = 1; - - if(yychar == tNL) - yychar = YYEMPTY; /* Could use 'yyclearin', but we already need the*/ - /* direct access to yychar in rule 'usrcvt' below. */ - else if(yychar == tIDENT) - parser_warning("LANGUAGE statement not delimited with newline; next identifier might be wrong\n"); - - want_nl = 0; /* We don't want it anymore if we didn't get it */ - - if(!win32) - parser_warning("LANGUAGE not supported in 16-bit mode\n"); - free(currentlanguage); - if (get_language_codepage((yyvsp[(3) - (5)].num), (yyvsp[(5) - (5)].num)) == -1) - yyerror( "Language %04x is not supported", ((yyvsp[(5) - (5)].num)<<10) + (yyvsp[(3) - (5)].num)); - currentlanguage = new_language((yyvsp[(3) - (5)].num), (yyvsp[(5) - (5)].num)); - (yyval.res) = NULL; - chat("Got LANGUAGE %d,%d (0x%04x)\n", (yyvsp[(3) - (5)].num), (yyvsp[(5) - (5)].num), ((yyvsp[(5) - (5)].num)<<10) + (yyvsp[(3) - (5)].num)); - ;} - break; - - case 11: - -/* Line 1464 of yacc.c */ -#line 541 "parser.y" - { yychar = rsrcid_to_token(yychar); ;} - break; - - case 12: - -/* Line 1464 of yacc.c */ -#line 547 "parser.y" - { - if((yyvsp[(1) - (1)].num) > 65535 || (yyvsp[(1) - (1)].num) < -32768) - yyerror("Resource's ID out of range (%d)", (yyvsp[(1) - (1)].num)); - (yyval.nid) = new_name_id(); - (yyval.nid)->type = name_ord; - (yyval.nid)->name.i_name = (yyvsp[(1) - (1)].num); - ;} - break; - - case 13: - -/* Line 1464 of yacc.c */ -#line 554 "parser.y" - { - (yyval.nid) = new_name_id(); - (yyval.nid)->type = name_str; - (yyval.nid)->name.s_name = (yyvsp[(1) - (1)].str); - ;} - break; - - case 14: - -/* Line 1464 of yacc.c */ -#line 564 "parser.y" - { (yyval.nid) = (yyvsp[(1) - (1)].nid); ;} - break; - - case 15: - -/* Line 1464 of yacc.c */ -#line 565 "parser.y" - { - (yyval.nid) = new_name_id(); - (yyval.nid)->type = name_str; - (yyval.nid)->name.s_name = (yyvsp[(1) - (1)].str); - ;} - break; - - case 16: - -/* Line 1464 of yacc.c */ -#line 574 "parser.y" - { (yyval.res) = new_resource(res_acc, (yyvsp[(1) - (1)].acc), (yyvsp[(1) - (1)].acc)->memopt, (yyvsp[(1) - (1)].acc)->lvc.language); ;} - break; - - case 17: - -/* Line 1464 of yacc.c */ -#line 575 "parser.y" - { (yyval.res) = new_resource(res_bmp, (yyvsp[(1) - (1)].bmp), (yyvsp[(1) - (1)].bmp)->memopt, (yyvsp[(1) - (1)].bmp)->data->lvc.language); ;} - break; - - case 18: - -/* Line 1464 of yacc.c */ -#line 576 "parser.y" - { - resource_t *rsc; - if((yyvsp[(1) - (1)].ani)->type == res_anicur) - { - (yyval.res) = rsc = new_resource(res_anicur, (yyvsp[(1) - (1)].ani)->u.ani, (yyvsp[(1) - (1)].ani)->u.ani->memopt, (yyvsp[(1) - (1)].ani)->u.ani->data->lvc.language); - } - else if((yyvsp[(1) - (1)].ani)->type == res_curg) - { - cursor_t *cur; - (yyval.res) = rsc = new_resource(res_curg, (yyvsp[(1) - (1)].ani)->u.curg, (yyvsp[(1) - (1)].ani)->u.curg->memopt, (yyvsp[(1) - (1)].ani)->u.curg->lvc.language); - for(cur = (yyvsp[(1) - (1)].ani)->u.curg->cursorlist; cur; cur = cur->next) - { - rsc->prev = new_resource(res_cur, cur, (yyvsp[(1) - (1)].ani)->u.curg->memopt, (yyvsp[(1) - (1)].ani)->u.curg->lvc.language); - rsc->prev->next = rsc; - rsc = rsc->prev; - rsc->name = new_name_id(); - rsc->name->type = name_ord; - rsc->name->name.i_name = cur->id; - } - } - else - internal_error(__FILE__, __LINE__, "Invalid top-level type %d in cursor resource\n", (yyvsp[(1) - (1)].ani)->type); - free((yyvsp[(1) - (1)].ani)); - ;} - break; - - case 19: - -/* Line 1464 of yacc.c */ -#line 600 "parser.y" - { (yyval.res) = new_resource(res_dlg, (yyvsp[(1) - (1)].dlg), (yyvsp[(1) - (1)].dlg)->memopt, (yyvsp[(1) - (1)].dlg)->lvc.language); ;} - break; - - case 20: - -/* Line 1464 of yacc.c */ -#line 601 "parser.y" - { - if(win32) - (yyval.res) = new_resource(res_dlg, (yyvsp[(1) - (1)].dlg), (yyvsp[(1) - (1)].dlg)->memopt, (yyvsp[(1) - (1)].dlg)->lvc.language); - else - (yyval.res) = NULL; - ;} - break; - - case 21: - -/* Line 1464 of yacc.c */ -#line 607 "parser.y" - { (yyval.res) = new_resource(res_dlginit, (yyvsp[(1) - (1)].dginit), (yyvsp[(1) - (1)].dginit)->memopt, (yyvsp[(1) - (1)].dginit)->data->lvc.language); ;} - break; - - case 22: - -/* Line 1464 of yacc.c */ -#line 608 "parser.y" - { (yyval.res) = new_resource(res_fnt, (yyvsp[(1) - (1)].fnt), (yyvsp[(1) - (1)].fnt)->memopt, (yyvsp[(1) - (1)].fnt)->data->lvc.language); ;} - break; - - case 23: - -/* Line 1464 of yacc.c */ -#line 609 "parser.y" - { (yyval.res) = new_resource(res_fntdir, (yyvsp[(1) - (1)].fnd), (yyvsp[(1) - (1)].fnd)->memopt, (yyvsp[(1) - (1)].fnd)->data->lvc.language); ;} - break; - - case 24: - -/* Line 1464 of yacc.c */ -#line 610 "parser.y" - { - resource_t *rsc; - if((yyvsp[(1) - (1)].ani)->type == res_aniico) - { - (yyval.res) = rsc = new_resource(res_aniico, (yyvsp[(1) - (1)].ani)->u.ani, (yyvsp[(1) - (1)].ani)->u.ani->memopt, (yyvsp[(1) - (1)].ani)->u.ani->data->lvc.language); - } - else if((yyvsp[(1) - (1)].ani)->type == res_icog) - { - icon_t *ico; - (yyval.res) = rsc = new_resource(res_icog, (yyvsp[(1) - (1)].ani)->u.icog, (yyvsp[(1) - (1)].ani)->u.icog->memopt, (yyvsp[(1) - (1)].ani)->u.icog->lvc.language); - for(ico = (yyvsp[(1) - (1)].ani)->u.icog->iconlist; ico; ico = ico->next) - { - rsc->prev = new_resource(res_ico, ico, (yyvsp[(1) - (1)].ani)->u.icog->memopt, (yyvsp[(1) - (1)].ani)->u.icog->lvc.language); - rsc->prev->next = rsc; - rsc = rsc->prev; - rsc->name = new_name_id(); - rsc->name->type = name_ord; - rsc->name->name.i_name = ico->id; - } - } - else - internal_error(__FILE__, __LINE__, "Invalid top-level type %d in icon resource\n", (yyvsp[(1) - (1)].ani)->type); - free((yyvsp[(1) - (1)].ani)); - ;} - break; - - case 25: - -/* Line 1464 of yacc.c */ -#line 634 "parser.y" - { (yyval.res) = new_resource(res_men, (yyvsp[(1) - (1)].men), (yyvsp[(1) - (1)].men)->memopt, (yyvsp[(1) - (1)].men)->lvc.language); ;} - break; - - case 26: - -/* Line 1464 of yacc.c */ -#line 635 "parser.y" - { - if(win32) - (yyval.res) = new_resource(res_men, (yyvsp[(1) - (1)].men), (yyvsp[(1) - (1)].men)->memopt, (yyvsp[(1) - (1)].men)->lvc.language); - else - (yyval.res) = NULL; - ;} - break; - - case 27: - -/* Line 1464 of yacc.c */ -#line 641 "parser.y" - { (yyval.res) = new_resource(res_msg, (yyvsp[(1) - (1)].msg), WRC_MO_MOVEABLE | WRC_MO_DISCARDABLE, (yyvsp[(1) - (1)].msg)->data->lvc.language); ;} - break; - - case 28: - -/* Line 1464 of yacc.c */ -#line 642 "parser.y" - { (yyval.res) = new_resource(res_html, (yyvsp[(1) - (1)].html), (yyvsp[(1) - (1)].html)->memopt, (yyvsp[(1) - (1)].html)->data->lvc.language); ;} - break; - - case 29: - -/* Line 1464 of yacc.c */ -#line 643 "parser.y" - { (yyval.res) = new_resource(res_rdt, (yyvsp[(1) - (1)].rdt), (yyvsp[(1) - (1)].rdt)->memopt, (yyvsp[(1) - (1)].rdt)->data->lvc.language); ;} - break; - - case 30: - -/* Line 1464 of yacc.c */ -#line 644 "parser.y" - { (yyval.res) = new_resource(res_toolbar, (yyvsp[(1) - (1)].tlbar), (yyvsp[(1) - (1)].tlbar)->memopt, (yyvsp[(1) - (1)].tlbar)->lvc.language); ;} - break; - - case 31: - -/* Line 1464 of yacc.c */ -#line 645 "parser.y" - { (yyval.res) = new_resource(res_usr, (yyvsp[(1) - (1)].usr), (yyvsp[(1) - (1)].usr)->memopt, (yyvsp[(1) - (1)].usr)->data->lvc.language); ;} - break; - - case 32: - -/* Line 1464 of yacc.c */ -#line 646 "parser.y" - { (yyval.res) = new_resource(res_ver, (yyvsp[(1) - (1)].veri), WRC_MO_MOVEABLE | WRC_MO_DISCARDABLE, (yyvsp[(1) - (1)].veri)->lvc.language); ;} - break; - - case 33: - -/* Line 1464 of yacc.c */ -#line 650 "parser.y" - { (yyval.str) = make_filename((yyvsp[(1) - (1)].str)); ;} - break; - - case 34: - -/* Line 1464 of yacc.c */ -#line 651 "parser.y" - { (yyval.str) = make_filename((yyvsp[(1) - (1)].str)); ;} - break; - - case 35: - -/* Line 1464 of yacc.c */ -#line 652 "parser.y" - { (yyval.str) = make_filename((yyvsp[(1) - (1)].str)); ;} - break; - - case 36: - -/* Line 1464 of yacc.c */ -#line 656 "parser.y" - { (yyval.bmp) = new_bitmap((yyvsp[(3) - (3)].raw), (yyvsp[(2) - (3)].iptr)); ;} - break; - - case 37: - -/* Line 1464 of yacc.c */ -#line 660 "parser.y" - { - (yyval.ani) = new_ani_any(); - if((yyvsp[(3) - (3)].raw)->size > 4 && !memcmp((yyvsp[(3) - (3)].raw)->data, riff, sizeof(riff))) - { - (yyval.ani)->type = res_anicur; - (yyval.ani)->u.ani = new_ani_curico(res_anicur, (yyvsp[(3) - (3)].raw), (yyvsp[(2) - (3)].iptr)); - } - else - { - (yyval.ani)->type = res_curg; - (yyval.ani)->u.curg = new_cursor_group((yyvsp[(3) - (3)].raw), (yyvsp[(2) - (3)].iptr)); - } - ;} - break; - - case 38: - -/* Line 1464 of yacc.c */ -#line 676 "parser.y" - { - (yyval.ani) = new_ani_any(); - if((yyvsp[(3) - (3)].raw)->size > 4 && !memcmp((yyvsp[(3) - (3)].raw)->data, riff, sizeof(riff))) - { - (yyval.ani)->type = res_aniico; - (yyval.ani)->u.ani = new_ani_curico(res_aniico, (yyvsp[(3) - (3)].raw), (yyvsp[(2) - (3)].iptr)); - } - else - { - (yyval.ani)->type = res_icog; - (yyval.ani)->u.icog = new_icon_group((yyvsp[(3) - (3)].raw), (yyvsp[(2) - (3)].iptr)); - } - ;} - break; - - case 39: - -/* Line 1464 of yacc.c */ -#line 698 "parser.y" - { (yyval.fnt) = new_font((yyvsp[(3) - (3)].raw), (yyvsp[(2) - (3)].iptr)); ;} - break; - - case 40: - -/* Line 1464 of yacc.c */ -#line 708 "parser.y" - { (yyval.fnd) = new_fontdir((yyvsp[(3) - (3)].raw), (yyvsp[(2) - (3)].iptr)); ;} - break; - - case 41: - -/* Line 1464 of yacc.c */ -#line 716 "parser.y" - { - if(!win32) - parser_warning("MESSAGETABLE not supported in 16-bit mode\n"); - (yyval.msg) = new_messagetable((yyvsp[(3) - (3)].raw), (yyvsp[(2) - (3)].iptr)); - ;} - break; - - case 42: - -/* Line 1464 of yacc.c */ -#line 724 "parser.y" - { (yyval.html) = new_html((yyvsp[(3) - (3)].raw), (yyvsp[(2) - (3)].iptr)); ;} - break; - - case 43: - -/* Line 1464 of yacc.c */ -#line 728 "parser.y" - { (yyval.rdt) = new_rcdata((yyvsp[(3) - (3)].raw), (yyvsp[(2) - (3)].iptr)); ;} - break; - - case 44: - -/* Line 1464 of yacc.c */ -#line 732 "parser.y" - { (yyval.dginit) = new_dlginit((yyvsp[(3) - (3)].raw), (yyvsp[(2) - (3)].iptr)); ;} - break; - - case 45: - -/* Line 1464 of yacc.c */ -#line 736 "parser.y" - { -#ifdef WORDS_BIGENDIAN - if(pedantic && byteorder != WRC_BO_LITTLE) -#else - if(pedantic && byteorder == WRC_BO_BIG) -#endif - parser_warning("Byteordering is not little-endian and type cannot be interpreted\n"); - (yyval.usr) = new_user((yyvsp[(1) - (3)].nid), (yyvsp[(3) - (3)].raw), (yyvsp[(2) - (3)].iptr)); - ;} - break; - - case 46: - -/* Line 1464 of yacc.c */ -#line 747 "parser.y" - { - (yyval.nid) = new_name_id(); - (yyval.nid)->type = name_ord; - (yyval.nid)->name.i_name = (yyvsp[(1) - (1)].num); - ;} - break; - - case 47: - -/* Line 1464 of yacc.c */ -#line 752 "parser.y" - { - (yyval.nid) = new_name_id(); - (yyval.nid)->type = name_str; - (yyval.nid)->name.s_name = (yyvsp[(1) - (1)].str); - ;} - break; - - case 48: - -/* Line 1464 of yacc.c */ -#line 761 "parser.y" - { - (yyval.acc) = new_accelerator(); - if((yyvsp[(2) - (6)].iptr)) - { - (yyval.acc)->memopt = *((yyvsp[(2) - (6)].iptr)); - free((yyvsp[(2) - (6)].iptr)); - } - else - { - (yyval.acc)->memopt = WRC_MO_MOVEABLE | WRC_MO_PURE; - } - if(!(yyvsp[(5) - (6)].event)) - yyerror("Accelerator table must have at least one entry"); - (yyval.acc)->events = get_event_head((yyvsp[(5) - (6)].event)); - if((yyvsp[(3) - (6)].lvc)) - { - (yyval.acc)->lvc = *((yyvsp[(3) - (6)].lvc)); - free((yyvsp[(3) - (6)].lvc)); - } - if(!(yyval.acc)->lvc.language) - (yyval.acc)->lvc.language = dup_language(currentlanguage); - ;} - break; - - case 49: - -/* Line 1464 of yacc.c */ -#line 785 "parser.y" - { (yyval.event)=NULL; ;} - break; - - case 50: - -/* Line 1464 of yacc.c */ -#line 786 "parser.y" - { (yyval.event)=add_string_event((yyvsp[(2) - (5)].str), (yyvsp[(4) - (5)].num), (yyvsp[(5) - (5)].num), (yyvsp[(1) - (5)].event)); ;} - break; - - case 51: - -/* Line 1464 of yacc.c */ -#line 787 "parser.y" - { (yyval.event)=add_event((yyvsp[(2) - (5)].num), (yyvsp[(4) - (5)].num), (yyvsp[(5) - (5)].num), (yyvsp[(1) - (5)].event)); ;} - break; - - case 52: - -/* Line 1464 of yacc.c */ -#line 796 "parser.y" - { (yyval.num) = 0; ;} - break; - - case 53: - -/* Line 1464 of yacc.c */ -#line 797 "parser.y" - { (yyval.num) = (yyvsp[(2) - (2)].num); ;} - break; - - case 54: - -/* Line 1464 of yacc.c */ -#line 800 "parser.y" - { (yyval.num) = (yyvsp[(1) - (1)].num); ;} - break; - - case 55: - -/* Line 1464 of yacc.c */ -#line 801 "parser.y" - { (yyval.num) = (yyvsp[(1) - (3)].num) | (yyvsp[(3) - (3)].num); ;} - break; - - case 56: - -/* Line 1464 of yacc.c */ -#line 804 "parser.y" - { (yyval.num) = WRC_AF_NOINVERT; ;} - break; - - case 57: - -/* Line 1464 of yacc.c */ -#line 805 "parser.y" - { (yyval.num) = WRC_AF_SHIFT; ;} - break; - - case 58: - -/* Line 1464 of yacc.c */ -#line 806 "parser.y" - { (yyval.num) = WRC_AF_CONTROL; ;} - break; - - case 59: - -/* Line 1464 of yacc.c */ -#line 807 "parser.y" - { (yyval.num) = WRC_AF_ALT; ;} - break; - - case 60: - -/* Line 1464 of yacc.c */ -#line 808 "parser.y" - { (yyval.num) = WRC_AF_ASCII; ;} - break; - - case 61: - -/* Line 1464 of yacc.c */ -#line 809 "parser.y" - { (yyval.num) = WRC_AF_VIRTKEY; ;} - break; - - case 62: - -/* Line 1464 of yacc.c */ -#line 815 "parser.y" - { - if((yyvsp[(2) - (13)].iptr)) - { - (yyvsp[(10) - (13)].dlg)->memopt = *((yyvsp[(2) - (13)].iptr)); - free((yyvsp[(2) - (13)].iptr)); - } - else - (yyvsp[(10) - (13)].dlg)->memopt = WRC_MO_MOVEABLE | WRC_MO_PURE | WRC_MO_DISCARDABLE; - (yyvsp[(10) - (13)].dlg)->x = (yyvsp[(3) - (13)].num); - (yyvsp[(10) - (13)].dlg)->y = (yyvsp[(5) - (13)].num); - (yyvsp[(10) - (13)].dlg)->width = (yyvsp[(7) - (13)].num); - (yyvsp[(10) - (13)].dlg)->height = (yyvsp[(9) - (13)].num); - (yyvsp[(10) - (13)].dlg)->controls = get_control_head((yyvsp[(12) - (13)].ctl)); - (yyval.dlg) = (yyvsp[(10) - (13)].dlg); - if(!(yyval.dlg)->gotstyle) - { - (yyval.dlg)->style = new_style(0,0); - (yyval.dlg)->style->or_mask = WS_POPUP; - (yyval.dlg)->gotstyle = TRUE; - } - if((yyval.dlg)->title) - (yyval.dlg)->style->or_mask |= WS_CAPTION; - if((yyval.dlg)->font) - (yyval.dlg)->style->or_mask |= DS_SETFONT; - - (yyval.dlg)->style->or_mask &= ~((yyval.dlg)->style->and_mask); - (yyval.dlg)->style->and_mask = 0; - - if(!(yyval.dlg)->lvc.language) - (yyval.dlg)->lvc.language = dup_language(currentlanguage); - ;} - break; - - case 63: - -/* Line 1464 of yacc.c */ -#line 849 "parser.y" - { (yyval.dlg)=new_dialog(); ;} - break; - - case 64: - -/* Line 1464 of yacc.c */ -#line 850 "parser.y" - { (yyval.dlg)=dialog_style((yyvsp[(3) - (3)].style),(yyvsp[(1) - (3)].dlg)); ;} - break; - - case 65: - -/* Line 1464 of yacc.c */ -#line 851 "parser.y" - { (yyval.dlg)=dialog_exstyle((yyvsp[(3) - (3)].style),(yyvsp[(1) - (3)].dlg)); ;} - break; - - case 66: - -/* Line 1464 of yacc.c */ -#line 852 "parser.y" - { (yyval.dlg)=dialog_caption((yyvsp[(3) - (3)].str),(yyvsp[(1) - (3)].dlg)); ;} - break; - - case 67: - -/* Line 1464 of yacc.c */ -#line 853 "parser.y" - { (yyval.dlg)=dialog_font((yyvsp[(2) - (2)].fntid),(yyvsp[(1) - (2)].dlg)); ;} - break; - - case 68: - -/* Line 1464 of yacc.c */ -#line 854 "parser.y" - { (yyval.dlg)=dialog_class((yyvsp[(3) - (3)].nid),(yyvsp[(1) - (3)].dlg)); ;} - break; - - case 69: - -/* Line 1464 of yacc.c */ -#line 855 "parser.y" - { (yyval.dlg)=dialog_menu((yyvsp[(3) - (3)].nid),(yyvsp[(1) - (3)].dlg)); ;} - break; - - case 70: - -/* Line 1464 of yacc.c */ -#line 856 "parser.y" - { (yyval.dlg)=dialog_language((yyvsp[(2) - (2)].lan),(yyvsp[(1) - (2)].dlg)); ;} - break; - - case 71: - -/* Line 1464 of yacc.c */ -#line 857 "parser.y" - { (yyval.dlg)=dialog_characteristics((yyvsp[(2) - (2)].chars),(yyvsp[(1) - (2)].dlg)); ;} - break; - - case 72: - -/* Line 1464 of yacc.c */ -#line 858 "parser.y" - { (yyval.dlg)=dialog_version((yyvsp[(2) - (2)].ver),(yyvsp[(1) - (2)].dlg)); ;} - break; - - case 73: - -/* Line 1464 of yacc.c */ -#line 861 "parser.y" - { (yyval.ctl) = NULL; ;} - break; - - case 74: - -/* Line 1464 of yacc.c */ -#line 862 "parser.y" - { (yyval.ctl)=ins_ctrl(-1, 0, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 75: - -/* Line 1464 of yacc.c */ -#line 863 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_EDIT, 0, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 76: - -/* Line 1464 of yacc.c */ -#line 864 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_LISTBOX, 0, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 77: - -/* Line 1464 of yacc.c */ -#line 865 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_COMBOBOX, 0, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 78: - -/* Line 1464 of yacc.c */ -#line 866 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_SCROLLBAR, 0, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 79: - -/* Line 1464 of yacc.c */ -#line 867 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_BUTTON, BS_CHECKBOX, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 80: - -/* Line 1464 of yacc.c */ -#line 868 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_BUTTON, BS_DEFPUSHBUTTON, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 81: - -/* Line 1464 of yacc.c */ -#line 869 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_BUTTON, BS_GROUPBOX, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl));;} - break; - - case 82: - -/* Line 1464 of yacc.c */ -#line 870 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_BUTTON, BS_PUSHBUTTON, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 83: - -/* Line 1464 of yacc.c */ -#line 872 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_BUTTON, BS_RADIOBUTTON, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 84: - -/* Line 1464 of yacc.c */ -#line 873 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_BUTTON, BS_AUTO3STATE, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 85: - -/* Line 1464 of yacc.c */ -#line 874 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_BUTTON, BS_3STATE, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 86: - -/* Line 1464 of yacc.c */ -#line 875 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_BUTTON, BS_AUTOCHECKBOX, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 87: - -/* Line 1464 of yacc.c */ -#line 876 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_BUTTON, BS_AUTORADIOBUTTON, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 88: - -/* Line 1464 of yacc.c */ -#line 877 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_STATIC, SS_LEFT, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 89: - -/* Line 1464 of yacc.c */ -#line 878 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_STATIC, SS_CENTER, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 90: - -/* Line 1464 of yacc.c */ -#line 879 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_STATIC, SS_RIGHT, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 91: - -/* Line 1464 of yacc.c */ -#line 881 "parser.y" - { - (yyvsp[(10) - (10)].ctl)->title = (yyvsp[(3) - (10)].nid); - (yyvsp[(10) - (10)].ctl)->id = (yyvsp[(5) - (10)].num); - (yyvsp[(10) - (10)].ctl)->x = (yyvsp[(7) - (10)].num); - (yyvsp[(10) - (10)].ctl)->y = (yyvsp[(9) - (10)].num); - (yyval.ctl) = ins_ctrl(CT_STATIC, SS_ICON, (yyvsp[(10) - (10)].ctl), (yyvsp[(1) - (10)].ctl)); - ;} - break; - - case 92: - -/* Line 1464 of yacc.c */ -#line 891 "parser.y" - { - (yyval.ctl)=new_control(); - (yyval.ctl)->title = (yyvsp[(1) - (12)].nid); - (yyval.ctl)->id = (yyvsp[(3) - (12)].num); - (yyval.ctl)->x = (yyvsp[(5) - (12)].num); - (yyval.ctl)->y = (yyvsp[(7) - (12)].num); - (yyval.ctl)->width = (yyvsp[(9) - (12)].num); - (yyval.ctl)->height = (yyvsp[(11) - (12)].num); - if((yyvsp[(12) - (12)].styles)) - { - (yyval.ctl)->style = (yyvsp[(12) - (12)].styles)->style; - (yyval.ctl)->gotstyle = TRUE; - if ((yyvsp[(12) - (12)].styles)->exstyle) - { - (yyval.ctl)->exstyle = (yyvsp[(12) - (12)].styles)->exstyle; - (yyval.ctl)->gotexstyle = TRUE; - } - free((yyvsp[(12) - (12)].styles)); - } - ;} - break; - - case 93: - -/* Line 1464 of yacc.c */ -#line 914 "parser.y" - { - (yyval.ctl) = new_control(); - (yyval.ctl)->id = (yyvsp[(1) - (10)].num); - (yyval.ctl)->x = (yyvsp[(3) - (10)].num); - (yyval.ctl)->y = (yyvsp[(5) - (10)].num); - (yyval.ctl)->width = (yyvsp[(7) - (10)].num); - (yyval.ctl)->height = (yyvsp[(9) - (10)].num); - if((yyvsp[(10) - (10)].styles)) - { - (yyval.ctl)->style = (yyvsp[(10) - (10)].styles)->style; - (yyval.ctl)->gotstyle = TRUE; - if ((yyvsp[(10) - (10)].styles)->exstyle) - { - (yyval.ctl)->exstyle = (yyvsp[(10) - (10)].styles)->exstyle; - (yyval.ctl)->gotexstyle = TRUE; - } - free((yyvsp[(10) - (10)].styles)); - } - ;} - break; - - case 94: - -/* Line 1464 of yacc.c */ -#line 936 "parser.y" - { (yyval.ctl) = new_control(); ;} - break; - - case 95: - -/* Line 1464 of yacc.c */ -#line 938 "parser.y" - { - (yyval.ctl) = new_control(); - (yyval.ctl)->width = (yyvsp[(2) - (4)].num); - (yyval.ctl)->height = (yyvsp[(4) - (4)].num); - ;} - break; - - case 96: - -/* Line 1464 of yacc.c */ -#line 943 "parser.y" - { - (yyval.ctl) = new_control(); - (yyval.ctl)->width = (yyvsp[(2) - (6)].num); - (yyval.ctl)->height = (yyvsp[(4) - (6)].num); - (yyval.ctl)->style = (yyvsp[(6) - (6)].style); - (yyval.ctl)->gotstyle = TRUE; - ;} - break; - - case 97: - -/* Line 1464 of yacc.c */ -#line 950 "parser.y" - { - (yyval.ctl) = new_control(); - (yyval.ctl)->width = (yyvsp[(2) - (8)].num); - (yyval.ctl)->height = (yyvsp[(4) - (8)].num); - (yyval.ctl)->style = (yyvsp[(6) - (8)].style); - (yyval.ctl)->gotstyle = TRUE; - (yyval.ctl)->exstyle = (yyvsp[(8) - (8)].style); - (yyval.ctl)->gotexstyle = TRUE; - ;} - break; - - case 98: - -/* Line 1464 of yacc.c */ -#line 961 "parser.y" - { - (yyval.ctl)=new_control(); - (yyval.ctl)->title = (yyvsp[(1) - (17)].nid); - (yyval.ctl)->id = (yyvsp[(3) - (17)].num); - (yyval.ctl)->ctlclass = convert_ctlclass((yyvsp[(5) - (17)].nid)); - (yyval.ctl)->style = (yyvsp[(7) - (17)].style); - (yyval.ctl)->gotstyle = TRUE; - (yyval.ctl)->x = (yyvsp[(9) - (17)].num); - (yyval.ctl)->y = (yyvsp[(11) - (17)].num); - (yyval.ctl)->width = (yyvsp[(13) - (17)].num); - (yyval.ctl)->height = (yyvsp[(15) - (17)].num); - (yyval.ctl)->exstyle = (yyvsp[(17) - (17)].style); - (yyval.ctl)->gotexstyle = TRUE; - ;} - break; - - case 99: - -/* Line 1464 of yacc.c */ -#line 975 "parser.y" - { - (yyval.ctl)=new_control(); - (yyval.ctl)->title = (yyvsp[(1) - (15)].nid); - (yyval.ctl)->id = (yyvsp[(3) - (15)].num); - (yyval.ctl)->ctlclass = convert_ctlclass((yyvsp[(5) - (15)].nid)); - (yyval.ctl)->style = (yyvsp[(7) - (15)].style); - (yyval.ctl)->gotstyle = TRUE; - (yyval.ctl)->x = (yyvsp[(9) - (15)].num); - (yyval.ctl)->y = (yyvsp[(11) - (15)].num); - (yyval.ctl)->width = (yyvsp[(13) - (15)].num); - (yyval.ctl)->height = (yyvsp[(15) - (15)].num); - ;} - break; - - case 100: - -/* Line 1464 of yacc.c */ -#line 990 "parser.y" - { (yyval.fntid) = new_font_id((yyvsp[(2) - (4)].num), (yyvsp[(4) - (4)].str), 0, 0); ;} - break; - - case 101: - -/* Line 1464 of yacc.c */ -#line 995 "parser.y" - { (yyval.styles) = NULL; ;} - break; - - case 102: - -/* Line 1464 of yacc.c */ -#line 996 "parser.y" - { (yyval.styles) = new_style_pair((yyvsp[(2) - (2)].style), 0); ;} - break; - - case 103: - -/* Line 1464 of yacc.c */ -#line 997 "parser.y" - { (yyval.styles) = new_style_pair((yyvsp[(2) - (4)].style), (yyvsp[(4) - (4)].style)); ;} - break; - - case 104: - -/* Line 1464 of yacc.c */ -#line 1001 "parser.y" - { (yyval.style) = new_style((yyvsp[(1) - (3)].style)->or_mask | (yyvsp[(3) - (3)].style)->or_mask, (yyvsp[(1) - (3)].style)->and_mask | (yyvsp[(3) - (3)].style)->and_mask); free((yyvsp[(1) - (3)].style)); free((yyvsp[(3) - (3)].style));;} - break; - - case 105: - -/* Line 1464 of yacc.c */ -#line 1002 "parser.y" - { (yyval.style) = (yyvsp[(2) - (3)].style); ;} - break; - - case 106: - -/* Line 1464 of yacc.c */ -#line 1003 "parser.y" - { (yyval.style) = new_style((yyvsp[(1) - (1)].num), 0); ;} - break; - - case 107: - -/* Line 1464 of yacc.c */ -#line 1004 "parser.y" - { (yyval.style) = new_style(0, (yyvsp[(2) - (2)].num)); ;} - break; - - case 108: - -/* Line 1464 of yacc.c */ -#line 1008 "parser.y" - { - (yyval.nid) = new_name_id(); - (yyval.nid)->type = name_ord; - (yyval.nid)->name.i_name = (yyvsp[(1) - (1)].num); - ;} - break; - - case 109: - -/* Line 1464 of yacc.c */ -#line 1013 "parser.y" - { - (yyval.nid) = new_name_id(); - (yyval.nid)->type = name_str; - (yyval.nid)->name.s_name = (yyvsp[(1) - (1)].str); - ;} - break; - - case 110: - -/* Line 1464 of yacc.c */ -#line 1022 "parser.y" - { - if(!win32) - parser_warning("DIALOGEX not supported in 16-bit mode\n"); - if((yyvsp[(2) - (14)].iptr)) - { - (yyvsp[(11) - (14)].dlg)->memopt = *((yyvsp[(2) - (14)].iptr)); - free((yyvsp[(2) - (14)].iptr)); - } - else - (yyvsp[(11) - (14)].dlg)->memopt = WRC_MO_MOVEABLE | WRC_MO_PURE | WRC_MO_DISCARDABLE; - (yyvsp[(11) - (14)].dlg)->x = (yyvsp[(3) - (14)].num); - (yyvsp[(11) - (14)].dlg)->y = (yyvsp[(5) - (14)].num); - (yyvsp[(11) - (14)].dlg)->width = (yyvsp[(7) - (14)].num); - (yyvsp[(11) - (14)].dlg)->height = (yyvsp[(9) - (14)].num); - if((yyvsp[(10) - (14)].iptr)) - { - (yyvsp[(11) - (14)].dlg)->helpid = *((yyvsp[(10) - (14)].iptr)); - (yyvsp[(11) - (14)].dlg)->gothelpid = TRUE; - free((yyvsp[(10) - (14)].iptr)); - } - (yyvsp[(11) - (14)].dlg)->controls = get_control_head((yyvsp[(13) - (14)].ctl)); - (yyval.dlg) = (yyvsp[(11) - (14)].dlg); - - assert((yyval.dlg)->style != NULL); - if(!(yyval.dlg)->gotstyle) - { - (yyval.dlg)->style->or_mask = WS_POPUP; - (yyval.dlg)->gotstyle = TRUE; - } - if((yyval.dlg)->title) - (yyval.dlg)->style->or_mask |= WS_CAPTION; - if((yyval.dlg)->font) - (yyval.dlg)->style->or_mask |= DS_SETFONT; - - (yyval.dlg)->style->or_mask &= ~((yyval.dlg)->style->and_mask); - (yyval.dlg)->style->and_mask = 0; - - if(!(yyval.dlg)->lvc.language) - (yyval.dlg)->lvc.language = dup_language(currentlanguage); - ;} - break; - - case 111: - -/* Line 1464 of yacc.c */ -#line 1065 "parser.y" - { (yyval.dlg)=new_dialog(); (yyval.dlg)->is_ex = TRUE; ;} - break; - - case 112: - -/* Line 1464 of yacc.c */ -#line 1066 "parser.y" - { (yyval.dlg)=dialog_style((yyvsp[(3) - (3)].style),(yyvsp[(1) - (3)].dlg)); ;} - break; - - case 113: - -/* Line 1464 of yacc.c */ -#line 1067 "parser.y" - { (yyval.dlg)=dialog_exstyle((yyvsp[(3) - (3)].style),(yyvsp[(1) - (3)].dlg)); ;} - break; - - case 114: - -/* Line 1464 of yacc.c */ -#line 1068 "parser.y" - { (yyval.dlg)=dialog_caption((yyvsp[(3) - (3)].str),(yyvsp[(1) - (3)].dlg)); ;} - break; - - case 115: - -/* Line 1464 of yacc.c */ -#line 1069 "parser.y" - { (yyval.dlg)=dialog_font((yyvsp[(2) - (2)].fntid),(yyvsp[(1) - (2)].dlg)); ;} - break; - - case 116: - -/* Line 1464 of yacc.c */ -#line 1070 "parser.y" - { (yyval.dlg)=dialog_font((yyvsp[(2) - (2)].fntid),(yyvsp[(1) - (2)].dlg)); ;} - break; - - case 117: - -/* Line 1464 of yacc.c */ -#line 1071 "parser.y" - { (yyval.dlg)=dialog_class((yyvsp[(3) - (3)].nid),(yyvsp[(1) - (3)].dlg)); ;} - break; - - case 118: - -/* Line 1464 of yacc.c */ -#line 1072 "parser.y" - { (yyval.dlg)=dialog_menu((yyvsp[(3) - (3)].nid),(yyvsp[(1) - (3)].dlg)); ;} - break; - - case 119: - -/* Line 1464 of yacc.c */ -#line 1073 "parser.y" - { (yyval.dlg)=dialog_language((yyvsp[(2) - (2)].lan),(yyvsp[(1) - (2)].dlg)); ;} - break; - - case 120: - -/* Line 1464 of yacc.c */ -#line 1074 "parser.y" - { (yyval.dlg)=dialog_characteristics((yyvsp[(2) - (2)].chars),(yyvsp[(1) - (2)].dlg)); ;} - break; - - case 121: - -/* Line 1464 of yacc.c */ -#line 1075 "parser.y" - { (yyval.dlg)=dialog_version((yyvsp[(2) - (2)].ver),(yyvsp[(1) - (2)].dlg)); ;} - break; - - case 122: - -/* Line 1464 of yacc.c */ -#line 1078 "parser.y" - { (yyval.ctl) = NULL; ;} - break; - - case 123: - -/* Line 1464 of yacc.c */ -#line 1079 "parser.y" - { (yyval.ctl)=ins_ctrl(-1, 0, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 124: - -/* Line 1464 of yacc.c */ -#line 1080 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_EDIT, 0, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 125: - -/* Line 1464 of yacc.c */ -#line 1081 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_LISTBOX, 0, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 126: - -/* Line 1464 of yacc.c */ -#line 1082 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_COMBOBOX, 0, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 127: - -/* Line 1464 of yacc.c */ -#line 1083 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_SCROLLBAR, 0, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 128: - -/* Line 1464 of yacc.c */ -#line 1084 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_BUTTON, BS_CHECKBOX, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 129: - -/* Line 1464 of yacc.c */ -#line 1085 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_BUTTON, BS_DEFPUSHBUTTON, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 130: - -/* Line 1464 of yacc.c */ -#line 1086 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_BUTTON, BS_GROUPBOX, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl));;} - break; - - case 131: - -/* Line 1464 of yacc.c */ -#line 1087 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_BUTTON, BS_PUSHBUTTON, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 132: - -/* Line 1464 of yacc.c */ -#line 1089 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_BUTTON, BS_RADIOBUTTON, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 133: - -/* Line 1464 of yacc.c */ -#line 1090 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_BUTTON, BS_AUTO3STATE, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 134: - -/* Line 1464 of yacc.c */ -#line 1091 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_BUTTON, BS_3STATE, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 135: - -/* Line 1464 of yacc.c */ -#line 1092 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_BUTTON, BS_AUTOCHECKBOX, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 136: - -/* Line 1464 of yacc.c */ -#line 1093 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_BUTTON, BS_AUTORADIOBUTTON, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 137: - -/* Line 1464 of yacc.c */ -#line 1094 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_STATIC, SS_LEFT, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 138: - -/* Line 1464 of yacc.c */ -#line 1095 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_STATIC, SS_CENTER, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 139: - -/* Line 1464 of yacc.c */ -#line 1096 "parser.y" - { (yyval.ctl)=ins_ctrl(CT_STATIC, SS_RIGHT, (yyvsp[(3) - (3)].ctl), (yyvsp[(1) - (3)].ctl)); ;} - break; - - case 140: - -/* Line 1464 of yacc.c */ -#line 1098 "parser.y" - { - (yyvsp[(10) - (10)].ctl)->title = (yyvsp[(3) - (10)].nid); - (yyvsp[(10) - (10)].ctl)->id = (yyvsp[(5) - (10)].num); - (yyvsp[(10) - (10)].ctl)->x = (yyvsp[(7) - (10)].num); - (yyvsp[(10) - (10)].ctl)->y = (yyvsp[(9) - (10)].num); - (yyval.ctl) = ins_ctrl(CT_STATIC, SS_ICON, (yyvsp[(10) - (10)].ctl), (yyvsp[(1) - (10)].ctl)); - ;} - break; - - case 141: - -/* Line 1464 of yacc.c */ -#line 1109 "parser.y" - { - (yyval.ctl)=new_control(); - (yyval.ctl)->title = (yyvsp[(1) - (19)].nid); - (yyval.ctl)->id = (yyvsp[(3) - (19)].num); - (yyval.ctl)->ctlclass = convert_ctlclass((yyvsp[(5) - (19)].nid)); - (yyval.ctl)->style = (yyvsp[(7) - (19)].style); - (yyval.ctl)->gotstyle = TRUE; - (yyval.ctl)->x = (yyvsp[(9) - (19)].num); - (yyval.ctl)->y = (yyvsp[(11) - (19)].num); - (yyval.ctl)->width = (yyvsp[(13) - (19)].num); - (yyval.ctl)->height = (yyvsp[(15) - (19)].num); - if((yyvsp[(17) - (19)].style)) - { - (yyval.ctl)->exstyle = (yyvsp[(17) - (19)].style); - (yyval.ctl)->gotexstyle = TRUE; - } - if((yyvsp[(18) - (19)].iptr)) - { - (yyval.ctl)->helpid = *((yyvsp[(18) - (19)].iptr)); - (yyval.ctl)->gothelpid = TRUE; - free((yyvsp[(18) - (19)].iptr)); - } - (yyval.ctl)->extra = (yyvsp[(19) - (19)].raw); - ;} - break; - - case 142: - -/* Line 1464 of yacc.c */ -#line 1133 "parser.y" - { - (yyval.ctl)=new_control(); - (yyval.ctl)->title = (yyvsp[(1) - (16)].nid); - (yyval.ctl)->id = (yyvsp[(3) - (16)].num); - (yyval.ctl)->style = (yyvsp[(7) - (16)].style); - (yyval.ctl)->gotstyle = TRUE; - (yyval.ctl)->ctlclass = convert_ctlclass((yyvsp[(5) - (16)].nid)); - (yyval.ctl)->x = (yyvsp[(9) - (16)].num); - (yyval.ctl)->y = (yyvsp[(11) - (16)].num); - (yyval.ctl)->width = (yyvsp[(13) - (16)].num); - (yyval.ctl)->height = (yyvsp[(15) - (16)].num); - (yyval.ctl)->extra = (yyvsp[(16) - (16)].raw); - ;} - break; - - case 143: - -/* Line 1464 of yacc.c */ -#line 1149 "parser.y" - { - (yyval.ctl)=new_control(); - (yyval.ctl)->title = (yyvsp[(1) - (14)].nid); - (yyval.ctl)->id = (yyvsp[(3) - (14)].num); - (yyval.ctl)->x = (yyvsp[(5) - (14)].num); - (yyval.ctl)->y = (yyvsp[(7) - (14)].num); - (yyval.ctl)->width = (yyvsp[(9) - (14)].num); - (yyval.ctl)->height = (yyvsp[(11) - (14)].num); - if((yyvsp[(12) - (14)].styles)) - { - (yyval.ctl)->style = (yyvsp[(12) - (14)].styles)->style; - (yyval.ctl)->gotstyle = TRUE; - - if ((yyvsp[(12) - (14)].styles)->exstyle) - { - (yyval.ctl)->exstyle = (yyvsp[(12) - (14)].styles)->exstyle; - (yyval.ctl)->gotexstyle = TRUE; - } - free((yyvsp[(12) - (14)].styles)); - } - - (yyval.ctl)->extra = (yyvsp[(14) - (14)].raw); - ;} - break; - - case 144: - -/* Line 1464 of yacc.c */ -#line 1175 "parser.y" - { - (yyval.ctl) = new_control(); - (yyval.ctl)->id = (yyvsp[(1) - (12)].num); - (yyval.ctl)->x = (yyvsp[(3) - (12)].num); - (yyval.ctl)->y = (yyvsp[(5) - (12)].num); - (yyval.ctl)->width = (yyvsp[(7) - (12)].num); - (yyval.ctl)->height = (yyvsp[(9) - (12)].num); - if((yyvsp[(10) - (12)].styles)) - { - (yyval.ctl)->style = (yyvsp[(10) - (12)].styles)->style; - (yyval.ctl)->gotstyle = TRUE; - - if ((yyvsp[(10) - (12)].styles)->exstyle) - { - (yyval.ctl)->exstyle = (yyvsp[(10) - (12)].styles)->exstyle; - (yyval.ctl)->gotexstyle = TRUE; - } - free((yyvsp[(10) - (12)].styles)); - } - (yyval.ctl)->extra = (yyvsp[(12) - (12)].raw); - ;} - break; - - case 145: - -/* Line 1464 of yacc.c */ -#line 1198 "parser.y" - { (yyval.raw) = NULL; ;} - break; - - case 146: - -/* Line 1464 of yacc.c */ -#line 1199 "parser.y" - { (yyval.raw) = (yyvsp[(1) - (1)].raw); ;} - break; - - case 147: - -/* Line 1464 of yacc.c */ -#line 1202 "parser.y" - { (yyval.iptr) = NULL; ;} - break; - - case 148: - -/* Line 1464 of yacc.c */ -#line 1203 "parser.y" - { (yyval.iptr) = new_int((yyvsp[(2) - (2)].num)); ;} - break; - - case 149: - -/* Line 1464 of yacc.c */ -#line 1207 "parser.y" - { (yyval.fntid) = new_font_id((yyvsp[(2) - (9)].num), (yyvsp[(4) - (9)].str), (yyvsp[(6) - (9)].num), (yyvsp[(8) - (9)].num)); ;} - break; - - case 150: - -/* Line 1464 of yacc.c */ -#line 1214 "parser.y" - { (yyval.fntid) = NULL; ;} - break; - - case 151: - -/* Line 1464 of yacc.c */ -#line 1215 "parser.y" - { (yyval.fntid) = NULL; ;} - break; - - case 152: - -/* Line 1464 of yacc.c */ -#line 1219 "parser.y" - { - if(!(yyvsp[(4) - (4)].menitm)) - yyerror("Menu must contain items"); - (yyval.men) = new_menu(); - if((yyvsp[(2) - (4)].iptr)) - { - (yyval.men)->memopt = *((yyvsp[(2) - (4)].iptr)); - free((yyvsp[(2) - (4)].iptr)); - } - else - (yyval.men)->memopt = WRC_MO_MOVEABLE | WRC_MO_PURE | WRC_MO_DISCARDABLE; - (yyval.men)->items = get_item_head((yyvsp[(4) - (4)].menitm)); - if((yyvsp[(3) - (4)].lvc)) - { - (yyval.men)->lvc = *((yyvsp[(3) - (4)].lvc)); - free((yyvsp[(3) - (4)].lvc)); - } - if(!(yyval.men)->lvc.language) - (yyval.men)->lvc.language = dup_language(currentlanguage); - ;} - break; - - case 153: - -/* Line 1464 of yacc.c */ -#line 1242 "parser.y" - { (yyval.menitm) = (yyvsp[(2) - (3)].menitm); ;} - break; - - case 154: - -/* Line 1464 of yacc.c */ -#line 1246 "parser.y" - {(yyval.menitm) = NULL;;} - break; - - case 155: - -/* Line 1464 of yacc.c */ -#line 1247 "parser.y" - { - (yyval.menitm)=new_menu_item(); - (yyval.menitm)->prev = (yyvsp[(1) - (6)].menitm); - if((yyvsp[(1) - (6)].menitm)) - (yyvsp[(1) - (6)].menitm)->next = (yyval.menitm); - (yyval.menitm)->id = (yyvsp[(5) - (6)].num); - (yyval.menitm)->state = (yyvsp[(6) - (6)].num); - (yyval.menitm)->name = (yyvsp[(3) - (6)].str); - ;} - break; - - case 156: - -/* Line 1464 of yacc.c */ -#line 1256 "parser.y" - { - (yyval.menitm)=new_menu_item(); - (yyval.menitm)->prev = (yyvsp[(1) - (3)].menitm); - if((yyvsp[(1) - (3)].menitm)) - (yyvsp[(1) - (3)].menitm)->next = (yyval.menitm); - ;} - break; - - case 157: - -/* Line 1464 of yacc.c */ -#line 1262 "parser.y" - { - (yyval.menitm) = new_menu_item(); - (yyval.menitm)->prev = (yyvsp[(1) - (5)].menitm); - if((yyvsp[(1) - (5)].menitm)) - (yyvsp[(1) - (5)].menitm)->next = (yyval.menitm); - (yyval.menitm)->popup = get_item_head((yyvsp[(5) - (5)].menitm)); - (yyval.menitm)->name = (yyvsp[(3) - (5)].str); - ;} - break; - - case 158: - -/* Line 1464 of yacc.c */ -#line 1281 "parser.y" - { (yyval.num) = 0; ;} - break; - - case 159: - -/* Line 1464 of yacc.c */ -#line 1282 "parser.y" - { (yyval.num) = (yyvsp[(2) - (2)].num); ;} - break; - - case 160: - -/* Line 1464 of yacc.c */ -#line 1283 "parser.y" - { (yyval.num) = (yyvsp[(2) - (2)].num) | MF_CHECKED; ;} - break; - - case 161: - -/* Line 1464 of yacc.c */ -#line 1284 "parser.y" - { (yyval.num) = (yyvsp[(2) - (2)].num) | MF_GRAYED; ;} - break; - - case 162: - -/* Line 1464 of yacc.c */ -#line 1285 "parser.y" - { (yyval.num) = (yyvsp[(2) - (2)].num) | MF_HELP; ;} - break; - - case 163: - -/* Line 1464 of yacc.c */ -#line 1286 "parser.y" - { (yyval.num) = (yyvsp[(2) - (2)].num) | MF_DISABLED; ;} - break; - - case 164: - -/* Line 1464 of yacc.c */ -#line 1287 "parser.y" - { (yyval.num) = (yyvsp[(2) - (2)].num) | MF_MENUBARBREAK; ;} - break; - - case 165: - -/* Line 1464 of yacc.c */ -#line 1288 "parser.y" - { (yyval.num) = (yyvsp[(2) - (2)].num) | MF_MENUBREAK; ;} - break; - - case 166: - -/* Line 1464 of yacc.c */ -#line 1292 "parser.y" - { - if(!win32) - parser_warning("MENUEX not supported in 16-bit mode\n"); - if(!(yyvsp[(4) - (4)].menitm)) - yyerror("MenuEx must contain items"); - (yyval.men) = new_menu(); - (yyval.men)->is_ex = TRUE; - if((yyvsp[(2) - (4)].iptr)) - { - (yyval.men)->memopt = *((yyvsp[(2) - (4)].iptr)); - free((yyvsp[(2) - (4)].iptr)); - } - else - (yyval.men)->memopt = WRC_MO_MOVEABLE | WRC_MO_PURE | WRC_MO_DISCARDABLE; - (yyval.men)->items = get_item_head((yyvsp[(4) - (4)].menitm)); - if((yyvsp[(3) - (4)].lvc)) - { - (yyval.men)->lvc = *((yyvsp[(3) - (4)].lvc)); - free((yyvsp[(3) - (4)].lvc)); - } - if(!(yyval.men)->lvc.language) - (yyval.men)->lvc.language = dup_language(currentlanguage); - ;} - break; - - case 167: - -/* Line 1464 of yacc.c */ -#line 1318 "parser.y" - { (yyval.menitm) = (yyvsp[(2) - (3)].menitm); ;} - break; - - case 168: - -/* Line 1464 of yacc.c */ -#line 1322 "parser.y" - {(yyval.menitm) = NULL; ;} - break; - - case 169: - -/* Line 1464 of yacc.c */ -#line 1323 "parser.y" - { - (yyval.menitm) = new_menu_item(); - (yyval.menitm)->prev = (yyvsp[(1) - (4)].menitm); - if((yyvsp[(1) - (4)].menitm)) - (yyvsp[(1) - (4)].menitm)->next = (yyval.menitm); - (yyval.menitm)->name = (yyvsp[(3) - (4)].str); - (yyval.menitm)->id = (yyvsp[(4) - (4)].exopt)->id; - (yyval.menitm)->type = (yyvsp[(4) - (4)].exopt)->type; - (yyval.menitm)->state = (yyvsp[(4) - (4)].exopt)->state; - (yyval.menitm)->helpid = (yyvsp[(4) - (4)].exopt)->helpid; - (yyval.menitm)->gotid = (yyvsp[(4) - (4)].exopt)->gotid; - (yyval.menitm)->gottype = (yyvsp[(4) - (4)].exopt)->gottype; - (yyval.menitm)->gotstate = (yyvsp[(4) - (4)].exopt)->gotstate; - (yyval.menitm)->gothelpid = (yyvsp[(4) - (4)].exopt)->gothelpid; - free((yyvsp[(4) - (4)].exopt)); - ;} - break; - - case 170: - -/* Line 1464 of yacc.c */ -#line 1339 "parser.y" - { - (yyval.menitm) = new_menu_item(); - (yyval.menitm)->prev = (yyvsp[(1) - (3)].menitm); - if((yyvsp[(1) - (3)].menitm)) - (yyvsp[(1) - (3)].menitm)->next = (yyval.menitm); - ;} - break; - - case 171: - -/* Line 1464 of yacc.c */ -#line 1345 "parser.y" - { - (yyval.menitm) = new_menu_item(); - (yyval.menitm)->prev = (yyvsp[(1) - (5)].menitm); - if((yyvsp[(1) - (5)].menitm)) - (yyvsp[(1) - (5)].menitm)->next = (yyval.menitm); - (yyval.menitm)->popup = get_item_head((yyvsp[(5) - (5)].menitm)); - (yyval.menitm)->name = (yyvsp[(3) - (5)].str); - (yyval.menitm)->id = (yyvsp[(4) - (5)].exopt)->id; - (yyval.menitm)->type = (yyvsp[(4) - (5)].exopt)->type; - (yyval.menitm)->state = (yyvsp[(4) - (5)].exopt)->state; - (yyval.menitm)->helpid = (yyvsp[(4) - (5)].exopt)->helpid; - (yyval.menitm)->gotid = (yyvsp[(4) - (5)].exopt)->gotid; - (yyval.menitm)->gottype = (yyvsp[(4) - (5)].exopt)->gottype; - (yyval.menitm)->gotstate = (yyvsp[(4) - (5)].exopt)->gotstate; - (yyval.menitm)->gothelpid = (yyvsp[(4) - (5)].exopt)->gothelpid; - free((yyvsp[(4) - (5)].exopt)); - ;} - break; - - case 172: - -/* Line 1464 of yacc.c */ -#line 1365 "parser.y" - { (yyval.exopt) = new_itemex_opt(0, 0, 0, 0); ;} - break; - - case 173: - -/* Line 1464 of yacc.c */ -#line 1366 "parser.y" - { - (yyval.exopt) = new_itemex_opt((yyvsp[(2) - (2)].num), 0, 0, 0); - (yyval.exopt)->gotid = TRUE; - ;} - break; - - case 174: - -/* Line 1464 of yacc.c */ -#line 1370 "parser.y" - { - (yyval.exopt) = new_itemex_opt((yyvsp[(2) - (5)].iptr) ? *((yyvsp[(2) - (5)].iptr)) : 0, (yyvsp[(4) - (5)].iptr) ? *((yyvsp[(4) - (5)].iptr)) : 0, (yyvsp[(5) - (5)].num), 0); - (yyval.exopt)->gotid = TRUE; - (yyval.exopt)->gottype = TRUE; - (yyval.exopt)->gotstate = TRUE; - free((yyvsp[(2) - (5)].iptr)); - free((yyvsp[(4) - (5)].iptr)); - ;} - break; - - case 175: - -/* Line 1464 of yacc.c */ -#line 1378 "parser.y" - { - (yyval.exopt) = new_itemex_opt((yyvsp[(2) - (6)].iptr) ? *((yyvsp[(2) - (6)].iptr)) : 0, (yyvsp[(4) - (6)].iptr) ? *((yyvsp[(4) - (6)].iptr)) : 0, (yyvsp[(6) - (6)].num), 0); - (yyval.exopt)->gotid = TRUE; - (yyval.exopt)->gottype = TRUE; - (yyval.exopt)->gotstate = TRUE; - free((yyvsp[(2) - (6)].iptr)); - free((yyvsp[(4) - (6)].iptr)); - ;} - break; - - case 176: - -/* Line 1464 of yacc.c */ -#line 1389 "parser.y" - { (yyval.exopt) = new_itemex_opt(0, 0, 0, 0); ;} - break; - - case 177: - -/* Line 1464 of yacc.c */ -#line 1390 "parser.y" - { - (yyval.exopt) = new_itemex_opt((yyvsp[(2) - (2)].num), 0, 0, 0); - (yyval.exopt)->gotid = TRUE; - ;} - break; - - case 178: - -/* Line 1464 of yacc.c */ -#line 1394 "parser.y" - { - (yyval.exopt) = new_itemex_opt((yyvsp[(2) - (4)].iptr) ? *((yyvsp[(2) - (4)].iptr)) : 0, (yyvsp[(4) - (4)].num), 0, 0); - free((yyvsp[(2) - (4)].iptr)); - (yyval.exopt)->gotid = TRUE; - (yyval.exopt)->gottype = TRUE; - ;} - break; - - case 179: - -/* Line 1464 of yacc.c */ -#line 1400 "parser.y" - { - (yyval.exopt) = new_itemex_opt((yyvsp[(2) - (6)].iptr) ? *((yyvsp[(2) - (6)].iptr)) : 0, (yyvsp[(4) - (6)].iptr) ? *((yyvsp[(4) - (6)].iptr)) : 0, (yyvsp[(6) - (6)].num), 0); - free((yyvsp[(2) - (6)].iptr)); - free((yyvsp[(4) - (6)].iptr)); - (yyval.exopt)->gotid = TRUE; - (yyval.exopt)->gottype = TRUE; - (yyval.exopt)->gotstate = TRUE; - ;} - break; - - case 180: - -/* Line 1464 of yacc.c */ -#line 1408 "parser.y" - { - (yyval.exopt) = new_itemex_opt((yyvsp[(2) - (8)].iptr) ? *((yyvsp[(2) - (8)].iptr)) : 0, (yyvsp[(4) - (8)].iptr) ? *((yyvsp[(4) - (8)].iptr)) : 0, (yyvsp[(6) - (8)].iptr) ? *((yyvsp[(6) - (8)].iptr)) : 0, (yyvsp[(8) - (8)].num)); - free((yyvsp[(2) - (8)].iptr)); - free((yyvsp[(4) - (8)].iptr)); - free((yyvsp[(6) - (8)].iptr)); - (yyval.exopt)->gotid = TRUE; - (yyval.exopt)->gottype = TRUE; - (yyval.exopt)->gotstate = TRUE; - (yyval.exopt)->gothelpid = TRUE; - ;} - break; - - case 181: - -/* Line 1464 of yacc.c */ -#line 1428 "parser.y" - { - if(!(yyvsp[(3) - (4)].stt)) - { - yyerror("Stringtable must have at least one entry"); - } - else - { - stringtable_t *stt; - /* Check if we added to a language table or created - * a new one. - */ - for(stt = sttres; stt; stt = stt->next) - { - if(stt == tagstt) - break; - } - if(!stt) - { - /* It is a new one */ - if(sttres) - { - sttres->prev = tagstt; - tagstt->next = sttres; - sttres = tagstt; - } - else - sttres = tagstt; - } - /* Else were done */ - } - free(tagstt_memopt); - tagstt_memopt = NULL; - - (yyval.stt) = tagstt; - ;} - break; - - case 182: - -/* Line 1464 of yacc.c */ -#line 1466 "parser.y" - { - if((tagstt = find_stringtable((yyvsp[(3) - (3)].lvc))) == NULL) - tagstt = new_stringtable((yyvsp[(3) - (3)].lvc)); - tagstt_memopt = (yyvsp[(2) - (3)].iptr); - tagstt_version = (yyvsp[(3) - (3)].lvc)->version; - tagstt_characts = (yyvsp[(3) - (3)].lvc)->characts; - free((yyvsp[(3) - (3)].lvc)); - ;} - break; - - case 183: - -/* Line 1464 of yacc.c */ -#line 1476 "parser.y" - { (yyval.stt) = NULL; ;} - break; - - case 184: - -/* Line 1464 of yacc.c */ -#line 1477 "parser.y" - { - int i; - assert(tagstt != NULL); - if((yyvsp[(2) - (4)].num) > 65535 || (yyvsp[(2) - (4)].num) < -32768) - yyerror("Stringtable entry's ID out of range (%d)", (yyvsp[(2) - (4)].num)); - /* Search for the ID */ - for(i = 0; i < tagstt->nentries; i++) - { - if(tagstt->entries[i].id == (yyvsp[(2) - (4)].num)) - yyerror("Stringtable ID %d already in use", (yyvsp[(2) - (4)].num)); - } - /* If we get here, then we have a new unique entry */ - tagstt->nentries++; - tagstt->entries = xrealloc(tagstt->entries, sizeof(tagstt->entries[0]) * tagstt->nentries); - tagstt->entries[tagstt->nentries-1].id = (yyvsp[(2) - (4)].num); - tagstt->entries[tagstt->nentries-1].str = (yyvsp[(4) - (4)].str); - if(tagstt_memopt) - tagstt->entries[tagstt->nentries-1].memopt = *tagstt_memopt; - else - tagstt->entries[tagstt->nentries-1].memopt = WRC_MO_MOVEABLE | WRC_MO_DISCARDABLE | WRC_MO_PURE; - tagstt->entries[tagstt->nentries-1].version = tagstt_version; - tagstt->entries[tagstt->nentries-1].characts = tagstt_characts; - - if(pedantic && !(yyvsp[(4) - (4)].str)->size) - parser_warning("Zero length strings make no sense\n"); - if(!win32 && (yyvsp[(4) - (4)].str)->size > 254) - yyerror("Stringtable entry more than 254 characters"); - if(win32 && (yyvsp[(4) - (4)].str)->size > 65534) /* Hmm..., does this happen? */ - yyerror("Stringtable entry more than 65534 characters (probably something else that went wrong)"); - (yyval.stt) = tagstt; - ;} - break; - - case 187: - -/* Line 1464 of yacc.c */ -#line 1517 "parser.y" - { - (yyval.veri) = (yyvsp[(3) - (6)].veri); - if((yyvsp[(2) - (6)].iptr)) - { - (yyval.veri)->memopt = *((yyvsp[(2) - (6)].iptr)); - free((yyvsp[(2) - (6)].iptr)); - } - else - (yyval.veri)->memopt = WRC_MO_MOVEABLE | (win32 ? WRC_MO_PURE : 0); - (yyval.veri)->blocks = get_ver_block_head((yyvsp[(5) - (6)].blk)); - /* Set language; there is no version or characteristics */ - (yyval.veri)->lvc.language = dup_language(currentlanguage); - ;} - break; - - case 188: - -/* Line 1464 of yacc.c */ -#line 1533 "parser.y" - { (yyval.veri) = new_versioninfo(); ;} - break; - - case 189: - -/* Line 1464 of yacc.c */ -#line 1534 "parser.y" - { - if((yyvsp[(1) - (9)].veri)->gotit.fv) - yyerror("FILEVERSION already defined"); - (yyval.veri) = (yyvsp[(1) - (9)].veri); - (yyval.veri)->filever_maj1 = (yyvsp[(3) - (9)].num); - (yyval.veri)->filever_maj2 = (yyvsp[(5) - (9)].num); - (yyval.veri)->filever_min1 = (yyvsp[(7) - (9)].num); - (yyval.veri)->filever_min2 = (yyvsp[(9) - (9)].num); - (yyval.veri)->gotit.fv = 1; - ;} - break; - - case 190: - -/* Line 1464 of yacc.c */ -#line 1544 "parser.y" - { - if((yyvsp[(1) - (9)].veri)->gotit.pv) - yyerror("PRODUCTVERSION already defined"); - (yyval.veri) = (yyvsp[(1) - (9)].veri); - (yyval.veri)->prodver_maj1 = (yyvsp[(3) - (9)].num); - (yyval.veri)->prodver_maj2 = (yyvsp[(5) - (9)].num); - (yyval.veri)->prodver_min1 = (yyvsp[(7) - (9)].num); - (yyval.veri)->prodver_min2 = (yyvsp[(9) - (9)].num); - (yyval.veri)->gotit.pv = 1; - ;} - break; - - case 191: - -/* Line 1464 of yacc.c */ -#line 1554 "parser.y" - { - if((yyvsp[(1) - (3)].veri)->gotit.ff) - yyerror("FILEFLAGS already defined"); - (yyval.veri) = (yyvsp[(1) - (3)].veri); - (yyval.veri)->fileflags = (yyvsp[(3) - (3)].num); - (yyval.veri)->gotit.ff = 1; - ;} - break; - - case 192: - -/* Line 1464 of yacc.c */ -#line 1561 "parser.y" - { - if((yyvsp[(1) - (3)].veri)->gotit.ffm) - yyerror("FILEFLAGSMASK already defined"); - (yyval.veri) = (yyvsp[(1) - (3)].veri); - (yyval.veri)->fileflagsmask = (yyvsp[(3) - (3)].num); - (yyval.veri)->gotit.ffm = 1; - ;} - break; - - case 193: - -/* Line 1464 of yacc.c */ -#line 1568 "parser.y" - { - if((yyvsp[(1) - (3)].veri)->gotit.fo) - yyerror("FILEOS already defined"); - (yyval.veri) = (yyvsp[(1) - (3)].veri); - (yyval.veri)->fileos = (yyvsp[(3) - (3)].num); - (yyval.veri)->gotit.fo = 1; - ;} - break; - - case 194: - -/* Line 1464 of yacc.c */ -#line 1575 "parser.y" - { - if((yyvsp[(1) - (3)].veri)->gotit.ft) - yyerror("FILETYPE already defined"); - (yyval.veri) = (yyvsp[(1) - (3)].veri); - (yyval.veri)->filetype = (yyvsp[(3) - (3)].num); - (yyval.veri)->gotit.ft = 1; - ;} - break; - - case 195: - -/* Line 1464 of yacc.c */ -#line 1582 "parser.y" - { - if((yyvsp[(1) - (3)].veri)->gotit.fst) - yyerror("FILESUBTYPE already defined"); - (yyval.veri) = (yyvsp[(1) - (3)].veri); - (yyval.veri)->filesubtype = (yyvsp[(3) - (3)].num); - (yyval.veri)->gotit.fst = 1; - ;} - break; - - case 196: - -/* Line 1464 of yacc.c */ -#line 1592 "parser.y" - { (yyval.blk) = NULL; ;} - break; - - case 197: - -/* Line 1464 of yacc.c */ -#line 1593 "parser.y" - { - (yyval.blk) = (yyvsp[(2) - (2)].blk); - (yyval.blk)->prev = (yyvsp[(1) - (2)].blk); - if((yyvsp[(1) - (2)].blk)) - (yyvsp[(1) - (2)].blk)->next = (yyval.blk); - ;} - break; - - case 198: - -/* Line 1464 of yacc.c */ -#line 1602 "parser.y" - { - (yyval.blk) = new_ver_block(); - (yyval.blk)->name = (yyvsp[(2) - (5)].str); - (yyval.blk)->values = get_ver_value_head((yyvsp[(4) - (5)].val)); - ;} - break; - - case 199: - -/* Line 1464 of yacc.c */ -#line 1610 "parser.y" - { (yyval.val) = NULL; ;} - break; - - case 200: - -/* Line 1464 of yacc.c */ -#line 1611 "parser.y" - { - (yyval.val) = (yyvsp[(2) - (2)].val); - (yyval.val)->prev = (yyvsp[(1) - (2)].val); - if((yyvsp[(1) - (2)].val)) - (yyvsp[(1) - (2)].val)->next = (yyval.val); - ;} - break; - - case 201: - -/* Line 1464 of yacc.c */ -#line 1620 "parser.y" - { - (yyval.val) = new_ver_value(); - (yyval.val)->type = val_block; - (yyval.val)->value.block = (yyvsp[(1) - (1)].blk); - ;} - break; - - case 202: - -/* Line 1464 of yacc.c */ -#line 1625 "parser.y" - { - (yyval.val) = new_ver_value(); - (yyval.val)->type = val_str; - (yyval.val)->key = (yyvsp[(2) - (4)].str); - (yyval.val)->value.str = (yyvsp[(4) - (4)].str); - ;} - break; - - case 203: - -/* Line 1464 of yacc.c */ -#line 1631 "parser.y" - { - (yyval.val) = new_ver_value(); - (yyval.val)->type = val_words; - (yyval.val)->key = (yyvsp[(2) - (4)].str); - (yyval.val)->value.words = (yyvsp[(4) - (4)].verw); - ;} - break; - - case 204: - -/* Line 1464 of yacc.c */ -#line 1640 "parser.y" - { (yyval.verw) = new_ver_words((yyvsp[(1) - (1)].num)); ;} - break; - - case 205: - -/* Line 1464 of yacc.c */ -#line 1641 "parser.y" - { (yyval.verw) = add_ver_words((yyvsp[(1) - (3)].verw), (yyvsp[(3) - (3)].num)); ;} - break; - - case 206: - -/* Line 1464 of yacc.c */ -#line 1645 "parser.y" - { - int nitems; - toolbar_item_t *items = get_tlbr_buttons_head((yyvsp[(8) - (9)].tlbarItems), &nitems); - (yyval.tlbar) = new_toolbar((yyvsp[(3) - (9)].num), (yyvsp[(5) - (9)].num), items, nitems); - if((yyvsp[(2) - (9)].iptr)) - { - (yyval.tlbar)->memopt = *((yyvsp[(2) - (9)].iptr)); - free((yyvsp[(2) - (9)].iptr)); - } - else - { - (yyval.tlbar)->memopt = WRC_MO_MOVEABLE | WRC_MO_PURE; - } - if((yyvsp[(6) - (9)].lvc)) - { - (yyval.tlbar)->lvc = *((yyvsp[(6) - (9)].lvc)); - free((yyvsp[(6) - (9)].lvc)); - } - if(!(yyval.tlbar)->lvc.language) - { - (yyval.tlbar)->lvc.language = dup_language(currentlanguage); - } - ;} - break; - - case 207: - -/* Line 1464 of yacc.c */ -#line 1671 "parser.y" - { (yyval.tlbarItems) = NULL; ;} - break; - - case 208: - -/* Line 1464 of yacc.c */ -#line 1672 "parser.y" - { - toolbar_item_t *idrec = new_toolbar_item(); - idrec->id = (yyvsp[(3) - (3)].num); - (yyval.tlbarItems) = ins_tlbr_button((yyvsp[(1) - (3)].tlbarItems), idrec); - ;} - break; - - case 209: - -/* Line 1464 of yacc.c */ -#line 1677 "parser.y" - { - toolbar_item_t *idrec = new_toolbar_item(); - idrec->id = 0; - (yyval.tlbarItems) = ins_tlbr_button((yyvsp[(1) - (2)].tlbarItems), idrec); - ;} - break; - - case 210: - -/* Line 1464 of yacc.c */ -#line 1686 "parser.y" - { (yyval.iptr) = NULL; ;} - break; - - case 211: - -/* Line 1464 of yacc.c */ -#line 1687 "parser.y" - { - if((yyvsp[(1) - (2)].iptr)) - { - *((yyvsp[(1) - (2)].iptr)) |= *((yyvsp[(2) - (2)].iptr)); - (yyval.iptr) = (yyvsp[(1) - (2)].iptr); - free((yyvsp[(2) - (2)].iptr)); - } - else - (yyval.iptr) = (yyvsp[(2) - (2)].iptr); - ;} - break; - - case 212: - -/* Line 1464 of yacc.c */ -#line 1697 "parser.y" - { - if((yyvsp[(1) - (2)].iptr)) - { - *((yyvsp[(1) - (2)].iptr)) &= *((yyvsp[(2) - (2)].iptr)); - (yyval.iptr) = (yyvsp[(1) - (2)].iptr); - free((yyvsp[(2) - (2)].iptr)); - } - else - { - *(yyvsp[(2) - (2)].iptr) &= WRC_MO_MOVEABLE | WRC_MO_DISCARDABLE | WRC_MO_PURE; - (yyval.iptr) = (yyvsp[(2) - (2)].iptr); - } - ;} - break; - - case 213: - -/* Line 1464 of yacc.c */ -#line 1712 "parser.y" - { (yyval.iptr) = new_int(WRC_MO_PRELOAD); - if (win32 && pedantic) parser_warning("PRELOAD is ignored in 32-bit mode\n"); ;} - break; - - case 214: - -/* Line 1464 of yacc.c */ -#line 1714 "parser.y" - { (yyval.iptr) = new_int(WRC_MO_MOVEABLE); - if (win32 && pedantic) parser_warning("MOVEABLE is ignored in 32-bit mode\n"); ;} - break; - - case 215: - -/* Line 1464 of yacc.c */ -#line 1716 "parser.y" - { (yyval.iptr) = new_int(WRC_MO_DISCARDABLE); - if (win32 && pedantic) parser_warning("DISCARDABLE is ignored in 32-bit mode\n"); ;} - break; - - case 216: - -/* Line 1464 of yacc.c */ -#line 1718 "parser.y" - { (yyval.iptr) = new_int(WRC_MO_PURE); - if (win32 && pedantic) parser_warning("PURE is ignored in 32-bit mode\n"); ;} - break; - - case 217: - -/* Line 1464 of yacc.c */ -#line 1722 "parser.y" - { (yyval.iptr) = new_int(~WRC_MO_PRELOAD); - if (win32 && pedantic) parser_warning("LOADONCALL is ignored in 32-bit mode\n"); ;} - break; - - case 218: - -/* Line 1464 of yacc.c */ -#line 1724 "parser.y" - { (yyval.iptr) = new_int(~WRC_MO_MOVEABLE); - if (win32 && pedantic) parser_warning("FIXED is ignored in 32-bit mode\n"); ;} - break; - - case 219: - -/* Line 1464 of yacc.c */ -#line 1726 "parser.y" - { (yyval.iptr) = new_int(~WRC_MO_PURE); - if (win32 && pedantic) parser_warning("IMPURE is ignored in 32-bit mode\n"); ;} - break; - - case 220: - -/* Line 1464 of yacc.c */ -#line 1731 "parser.y" - { (yyval.lvc) = new_lvc(); ;} - break; - - case 221: - -/* Line 1464 of yacc.c */ -#line 1732 "parser.y" - { - if(!win32) - parser_warning("LANGUAGE not supported in 16-bit mode\n"); - if((yyvsp[(1) - (2)].lvc)->language) - yyerror("Language already defined"); - (yyval.lvc) = (yyvsp[(1) - (2)].lvc); - (yyvsp[(1) - (2)].lvc)->language = (yyvsp[(2) - (2)].lan); - ;} - break; - - case 222: - -/* Line 1464 of yacc.c */ -#line 1740 "parser.y" - { - if(!win32) - parser_warning("CHARACTERISTICS not supported in 16-bit mode\n"); - if((yyvsp[(1) - (2)].lvc)->characts) - yyerror("Characteristics already defined"); - (yyval.lvc) = (yyvsp[(1) - (2)].lvc); - (yyvsp[(1) - (2)].lvc)->characts = (yyvsp[(2) - (2)].chars); - ;} - break; - - case 223: - -/* Line 1464 of yacc.c */ -#line 1748 "parser.y" - { - if(!win32) - parser_warning("VERSION not supported in 16-bit mode\n"); - if((yyvsp[(1) - (2)].lvc)->version) - yyerror("Version already defined"); - (yyval.lvc) = (yyvsp[(1) - (2)].lvc); - (yyvsp[(1) - (2)].lvc)->version = (yyvsp[(2) - (2)].ver); - ;} - break; - - case 224: - -/* Line 1464 of yacc.c */ -#line 1766 "parser.y" - { (yyval.lan) = new_language((yyvsp[(2) - (4)].num), (yyvsp[(4) - (4)].num)); - if (get_language_codepage((yyvsp[(2) - (4)].num), (yyvsp[(4) - (4)].num)) == -1) - yyerror( "Language %04x is not supported", ((yyvsp[(4) - (4)].num)<<10) + (yyvsp[(2) - (4)].num)); - ;} - break; - - case 225: - -/* Line 1464 of yacc.c */ -#line 1773 "parser.y" - { (yyval.chars) = new_characts((yyvsp[(2) - (2)].num)); ;} - break; - - case 226: - -/* Line 1464 of yacc.c */ -#line 1777 "parser.y" - { (yyval.ver) = new_version((yyvsp[(2) - (2)].num)); ;} - break; - - case 227: - -/* Line 1464 of yacc.c */ -#line 1781 "parser.y" - { - if((yyvsp[(1) - (4)].lvc)) - { - (yyvsp[(3) - (4)].raw)->lvc = *((yyvsp[(1) - (4)].lvc)); - free((yyvsp[(1) - (4)].lvc)); - } - - if(!(yyvsp[(3) - (4)].raw)->lvc.language) - (yyvsp[(3) - (4)].raw)->lvc.language = dup_language(currentlanguage); - - (yyval.raw) = (yyvsp[(3) - (4)].raw); - ;} - break; - - case 228: - -/* Line 1464 of yacc.c */ -#line 1796 "parser.y" - { (yyval.raw) = (yyvsp[(1) - (1)].raw); ;} - break; - - case 229: - -/* Line 1464 of yacc.c */ -#line 1797 "parser.y" - { (yyval.raw) = int2raw_data((yyvsp[(1) - (1)].num)); ;} - break; - - case 230: - -/* Line 1464 of yacc.c */ -#line 1798 "parser.y" - { (yyval.raw) = int2raw_data(-((yyvsp[(2) - (2)].num))); ;} - break; - - case 231: - -/* Line 1464 of yacc.c */ -#line 1799 "parser.y" - { (yyval.raw) = long2raw_data((yyvsp[(1) - (1)].num)); ;} - break; - - case 232: - -/* Line 1464 of yacc.c */ -#line 1800 "parser.y" - { (yyval.raw) = long2raw_data(-((yyvsp[(2) - (2)].num))); ;} - break; - - case 233: - -/* Line 1464 of yacc.c */ -#line 1801 "parser.y" - { (yyval.raw) = str2raw_data((yyvsp[(1) - (1)].str)); ;} - break; - - case 234: - -/* Line 1464 of yacc.c */ -#line 1802 "parser.y" - { (yyval.raw) = merge_raw_data((yyvsp[(1) - (3)].raw), (yyvsp[(3) - (3)].raw)); free((yyvsp[(3) - (3)].raw)->data); free((yyvsp[(3) - (3)].raw)); ;} - break; - - case 235: - -/* Line 1464 of yacc.c */ -#line 1803 "parser.y" - { (yyval.raw) = merge_raw_data_int((yyvsp[(1) - (3)].raw), (yyvsp[(3) - (3)].num)); ;} - break; - - case 236: - -/* Line 1464 of yacc.c */ -#line 1804 "parser.y" - { (yyval.raw) = merge_raw_data_int((yyvsp[(1) - (4)].raw), -((yyvsp[(4) - (4)].num))); ;} - break; - - case 237: - -/* Line 1464 of yacc.c */ -#line 1805 "parser.y" - { (yyval.raw) = merge_raw_data_long((yyvsp[(1) - (3)].raw), (yyvsp[(3) - (3)].num)); ;} - break; - - case 238: - -/* Line 1464 of yacc.c */ -#line 1806 "parser.y" - { (yyval.raw) = merge_raw_data_long((yyvsp[(1) - (4)].raw), -((yyvsp[(4) - (4)].num))); ;} - break; - - case 239: - -/* Line 1464 of yacc.c */ -#line 1807 "parser.y" - { (yyval.raw) = merge_raw_data_str((yyvsp[(1) - (3)].raw), (yyvsp[(3) - (3)].str)); ;} - break; - - case 240: - -/* Line 1464 of yacc.c */ -#line 1811 "parser.y" - { (yyval.raw) = load_file((yyvsp[(1) - (1)].str),dup_language(currentlanguage)); ;} - break; - - case 241: - -/* Line 1464 of yacc.c */ -#line 1812 "parser.y" - { (yyval.raw) = (yyvsp[(1) - (1)].raw); ;} - break; - - case 242: - -/* Line 1464 of yacc.c */ -#line 1819 "parser.y" - { (yyval.iptr) = 0; ;} - break; - - case 243: - -/* Line 1464 of yacc.c */ -#line 1820 "parser.y" - { (yyval.iptr) = new_int((yyvsp[(1) - (1)].num)); ;} - break; - - case 244: - -/* Line 1464 of yacc.c */ -#line 1824 "parser.y" - { (yyval.num) = ((yyvsp[(1) - (1)].num)); ;} - break; - - case 245: - -/* Line 1464 of yacc.c */ -#line 1827 "parser.y" - { (yyval.num) = ((yyvsp[(1) - (3)].num)) + ((yyvsp[(3) - (3)].num)); ;} - break; - - case 246: - -/* Line 1464 of yacc.c */ -#line 1828 "parser.y" - { (yyval.num) = ((yyvsp[(1) - (3)].num)) - ((yyvsp[(3) - (3)].num)); ;} - break; - - case 247: - -/* Line 1464 of yacc.c */ -#line 1829 "parser.y" - { (yyval.num) = ((yyvsp[(1) - (3)].num)) | ((yyvsp[(3) - (3)].num)); ;} - break; - - case 248: - -/* Line 1464 of yacc.c */ -#line 1830 "parser.y" - { (yyval.num) = ((yyvsp[(1) - (3)].num)) & ((yyvsp[(3) - (3)].num)); ;} - break; - - case 249: - -/* Line 1464 of yacc.c */ -#line 1831 "parser.y" - { (yyval.num) = ((yyvsp[(1) - (3)].num)) * ((yyvsp[(3) - (3)].num)); ;} - break; - - case 250: - -/* Line 1464 of yacc.c */ -#line 1832 "parser.y" - { (yyval.num) = ((yyvsp[(1) - (3)].num)) / ((yyvsp[(3) - (3)].num)); ;} - break; - - case 251: - -/* Line 1464 of yacc.c */ -#line 1833 "parser.y" - { (yyval.num) = ((yyvsp[(1) - (3)].num)) ^ ((yyvsp[(3) - (3)].num)); ;} - break; - - case 252: - -/* Line 1464 of yacc.c */ -#line 1834 "parser.y" - { (yyval.num) = ~((yyvsp[(2) - (2)].num)); ;} - break; - - case 253: - -/* Line 1464 of yacc.c */ -#line 1835 "parser.y" - { (yyval.num) = -((yyvsp[(2) - (2)].num)); ;} - break; - - case 254: - -/* Line 1464 of yacc.c */ -#line 1836 "parser.y" - { (yyval.num) = (yyvsp[(2) - (2)].num); ;} - break; - - case 255: - -/* Line 1464 of yacc.c */ -#line 1837 "parser.y" - { (yyval.num) = (yyvsp[(2) - (3)].num); ;} - break; - - case 256: - -/* Line 1464 of yacc.c */ -#line 1838 "parser.y" - { (yyval.num) = (yyvsp[(1) - (1)].num); ;} - break; - - case 257: - -/* Line 1464 of yacc.c */ -#line 1839 "parser.y" - { (yyval.num) = ~((yyvsp[(2) - (2)].num)); ;} - break; - - case 258: - -/* Line 1464 of yacc.c */ -#line 1842 "parser.y" - { (yyval.num) = (yyvsp[(1) - (1)].num); ;} - break; - - case 259: - -/* Line 1464 of yacc.c */ -#line 1843 "parser.y" - { (yyval.num) = (yyvsp[(1) - (1)].num); ;} - break; - - - -/* Line 1464 of yacc.c */ -#line 4951 "parser.tab.c" - default: break; - } - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (YY_("syntax error")); -#else - { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - } - } - - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (yymsg); - } - else - { - yyerror (YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } - } -#endif - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - - yydestruct ("Error: popping", - yystos[yystate], yyvsp); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - *++yyvsp = yylval; - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined(yyoverflow) || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); -} - - - -/* Line 1684 of yacc.c */ -#line 1846 "parser.y" - -/* Dialog specific functions */ -static dialog_t *dialog_style(style_t * st, dialog_t *dlg) -{ - assert(dlg != NULL); - if(dlg->style == NULL) - { - dlg->style = new_style(0,0); - } - - if(dlg->gotstyle) - { - parser_warning("Style already defined, or-ing together\n"); - } - else - { - dlg->style->or_mask = 0; - dlg->style->and_mask = 0; - } - dlg->style->or_mask |= st->or_mask; - dlg->style->and_mask |= st->and_mask; - dlg->gotstyle = TRUE; - free(st); - return dlg; -} - -static dialog_t *dialog_exstyle(style_t *st, dialog_t *dlg) -{ - assert(dlg != NULL); - if(dlg->exstyle == NULL) - { - dlg->exstyle = new_style(0,0); - } - - if(dlg->gotexstyle) - { - parser_warning("ExStyle already defined, or-ing together\n"); - } - else - { - dlg->exstyle->or_mask = 0; - dlg->exstyle->and_mask = 0; - } - dlg->exstyle->or_mask |= st->or_mask; - dlg->exstyle->and_mask |= st->and_mask; - dlg->gotexstyle = TRUE; - free(st); - return dlg; -} - -static dialog_t *dialog_caption(string_t *s, dialog_t *dlg) -{ - assert(dlg != NULL); - if(dlg->title) - yyerror("Caption already defined"); - dlg->title = s; - return dlg; -} - -static dialog_t *dialog_font(font_id_t *f, dialog_t *dlg) -{ - assert(dlg != NULL); - if(dlg->font) - yyerror("Font already defined"); - dlg->font = f; - return dlg; -} - -static dialog_t *dialog_class(name_id_t *n, dialog_t *dlg) -{ - assert(dlg != NULL); - if(dlg->dlgclass) - yyerror("Class already defined"); - dlg->dlgclass = n; - return dlg; -} - -static dialog_t *dialog_menu(name_id_t *m, dialog_t *dlg) -{ - assert(dlg != NULL); - if(dlg->menu) - yyerror("Menu already defined"); - dlg->menu = m; - return dlg; -} - -static dialog_t *dialog_language(language_t *l, dialog_t *dlg) -{ - assert(dlg != NULL); - if(dlg->lvc.language) - yyerror("Language already defined"); - dlg->lvc.language = l; - return dlg; -} - -static dialog_t *dialog_characteristics(characts_t *c, dialog_t *dlg) -{ - assert(dlg != NULL); - if(dlg->lvc.characts) - yyerror("Characteristics already defined"); - dlg->lvc.characts = c; - return dlg; -} - -static dialog_t *dialog_version(version_t *v, dialog_t *dlg) -{ - assert(dlg != NULL); - if(dlg->lvc.version) - yyerror("Version already defined"); - dlg->lvc.version = v; - return dlg; -} - -/* Controls specific functions */ -static control_t *ins_ctrl(int type, int special_style, control_t *ctrl, control_t *prev) -{ - /* Hm... this seems to be jammed in at all time... */ - int defaultstyle = WS_CHILD | WS_VISIBLE; - - assert(ctrl != NULL); - ctrl->prev = prev; - - if(prev) - prev->next = ctrl; - - /* Check for duplicate identifiers */ - while (prev) - { - if (ctrl->id != -1 && ctrl->id == prev->id) - parser_warning("Duplicate dialog control id %d\n", ctrl->id); - prev = prev->prev; - } - - if(type != -1) - { - ctrl->ctlclass = new_name_id(); - ctrl->ctlclass->type = name_ord; - ctrl->ctlclass->name.i_name = type; - } - - switch(type) - { - case CT_BUTTON: - if(special_style != BS_GROUPBOX && special_style != BS_RADIOBUTTON) - defaultstyle |= WS_TABSTOP; - break; - case CT_EDIT: - defaultstyle |= WS_TABSTOP | WS_BORDER; - break; - case CT_LISTBOX: - defaultstyle |= LBS_NOTIFY | WS_BORDER; - break; - case CT_COMBOBOX: - if (!(ctrl->style->or_mask & (CBS_SIMPLE | CBS_DROPDOWN | CBS_DROPDOWNLIST))) - defaultstyle |= CBS_SIMPLE; - break; - case CT_STATIC: - if(special_style == SS_CENTER || special_style == SS_LEFT || special_style == SS_RIGHT) - defaultstyle |= WS_GROUP; - break; - } - - if(!ctrl->gotstyle) /* Handle default style setting */ - { - switch(type) - { - case CT_EDIT: - defaultstyle |= ES_LEFT; - break; - case CT_LISTBOX: - defaultstyle |= LBS_NOTIFY; - break; - case CT_COMBOBOX: - defaultstyle |= CBS_SIMPLE | WS_TABSTOP; - break; - case CT_SCROLLBAR: - defaultstyle |= SBS_HORZ; - break; - case CT_BUTTON: - switch(special_style) - { - case BS_CHECKBOX: - case BS_DEFPUSHBUTTON: - case BS_PUSHBUTTON: -/* case BS_PUSHBOX: */ - case BS_AUTORADIOBUTTON: - case BS_AUTO3STATE: - case BS_3STATE: - case BS_AUTOCHECKBOX: - defaultstyle |= WS_TABSTOP; - break; - default: - parser_warning("Unknown default button control-style 0x%08x\n", special_style); - case BS_GROUPBOX: - case BS_RADIOBUTTON: - break; - } - break; - - case CT_STATIC: - switch(special_style) - { - case SS_LEFT: - case SS_RIGHT: - case SS_CENTER: - defaultstyle |= WS_GROUP; - break; - case SS_ICON: /* Special case */ - break; - default: - parser_warning("Unknown default static control-style 0x%08x\n", special_style); - break; - } - break; - case -1: /* Generic control */ - goto byebye; - - default: - yyerror("Internal error (report this): Got weird control type 0x%08x", type); - } - } - - /* The SS_ICON flag is always forced in for icon controls */ - if(type == CT_STATIC && special_style == SS_ICON) - defaultstyle |= SS_ICON; - - if (!ctrl->gotstyle) - ctrl->style = new_style(0,0); - - /* combine all styles */ - ctrl->style->or_mask = ctrl->style->or_mask | defaultstyle | special_style; - ctrl->gotstyle = TRUE; -byebye: - /* combine with NOT mask */ - if (ctrl->gotstyle) - { - ctrl->style->or_mask &= ~(ctrl->style->and_mask); - ctrl->style->and_mask = 0; - } - if (ctrl->gotexstyle) - { - ctrl->exstyle->or_mask &= ~(ctrl->exstyle->and_mask); - ctrl->exstyle->and_mask = 0; - } - return ctrl; -} - -static int get_class_idW(const WCHAR *cc) -{ - static const WCHAR szBUTTON[] = {'B','U','T','T','O','N',0}; - static const WCHAR szCOMBOBOX[] = {'C','O','M','B','O','B','O','X',0}; - static const WCHAR szLISTBOX[] = {'L','I','S','T','B','O','X',0}; - static const WCHAR szEDIT[] = {'E','D','I','T',0}; - static const WCHAR szSTATIC[] = {'S','T','A','T','I','C',0}; - static const WCHAR szSCROLLBAR[] = {'S','C','R','O','L','L','B','A','R',0}; - - if(!strcmpiW(szBUTTON, cc)) - return CT_BUTTON; - if(!strcmpiW(szCOMBOBOX, cc)) - return CT_COMBOBOX; - if(!strcmpiW(szLISTBOX, cc)) - return CT_LISTBOX; - if(!strcmpiW(szEDIT, cc)) - return CT_EDIT; - if(!strcmpiW(szSTATIC, cc)) - return CT_STATIC; - if(!strcmpiW(szSCROLLBAR, cc)) - return CT_SCROLLBAR; - - return -1; -} - -static int get_class_idA(const char *cc) -{ - if(!strcasecmp("BUTTON", cc)) - return CT_BUTTON; - if(!strcasecmp("COMBOBOX", cc)) - return CT_COMBOBOX; - if(!strcasecmp("LISTBOX", cc)) - return CT_LISTBOX; - if(!strcasecmp("EDIT", cc)) - return CT_EDIT; - if(!strcasecmp("STATIC", cc)) - return CT_STATIC; - if(!strcasecmp("SCROLLBAR", cc)) - return CT_SCROLLBAR; - - return -1; -} - - -static name_id_t *convert_ctlclass(name_id_t *cls) -{ - int iclass; - - if(cls->type == name_ord) - return cls; - assert(cls->type == name_str); - if(cls->name.s_name->type == str_unicode) - iclass = get_class_idW(cls->name.s_name->str.wstr); - else - iclass = get_class_idA(cls->name.s_name->str.cstr); - - if (iclass == -1) - return cls; /* No default, return user controlclass */ - - free(cls->name.s_name->str.cstr); - free(cls->name.s_name); - cls->type = name_ord; - cls->name.i_name = iclass; - return cls; -} - -/* Accelerator specific functions */ -static event_t *add_event(int key, int id, int flags, event_t *prev) -{ - event_t *ev = new_event(); - - if((flags & (WRC_AF_VIRTKEY | WRC_AF_ASCII)) == (WRC_AF_VIRTKEY | WRC_AF_ASCII)) - yyerror("Cannot use both ASCII and VIRTKEY"); - - ev->key = key; - ev->id = id; - ev->flags = flags & ~WRC_AF_ASCII; - ev->prev = prev; - if(prev) - prev->next = ev; - return ev; -} - -static event_t *add_string_event(string_t *key, int id, int flags, event_t *prev) -{ - int keycode = 0; - event_t *ev = new_event(); - - if(key->type == str_char) - { - if((flags & WRC_AF_VIRTKEY) && - !((key->str.cstr[0] >= 'A' && key->str.cstr[0] <= 'Z') || - (key->str.cstr[0] >= '0' && key->str.cstr[0] <= '9'))) - yyerror("VIRTKEY code is not equal to ascii value"); - - if(key->str.cstr[0] == '^' && (flags & WRC_AF_CONTROL) != 0) - { - yyerror("Cannot use both '^' and CONTROL modifier"); - } - else if(key->str.cstr[0] == '^') - { - keycode = toupper((unsigned char)key->str.cstr[1]) - '@'; - if(keycode >= ' ') - yyerror("Control-code out of range"); - } - else - keycode = key->str.cstr[0]; - } - else - { - if((flags & WRC_AF_VIRTKEY) && - !((key->str.wstr[0] >= 'A' && key->str.wstr[0] <= 'Z') || - (key->str.wstr[0] >= '0' && key->str.wstr[0] <= '9'))) - yyerror("VIRTKEY code is not equal to ascii value"); - - if(key->str.wstr[0] == '^' && (flags & WRC_AF_CONTROL) != 0) - { - yyerror("Cannot use both '^' and CONTROL modifier"); - } - else if(key->str.wstr[0] == '^') - { - keycode = toupperW(key->str.wstr[1]) - '@'; - if(keycode >= ' ') - yyerror("Control-code out of range"); - } - else - keycode = key->str.wstr[0]; - } - - ev->key = keycode; - ev->id = id; - ev->flags = flags & ~WRC_AF_ASCII; - ev->prev = prev; - if(prev) - prev->next = ev; - return ev; -} - -/* MenuEx specific functions */ -static itemex_opt_t *new_itemex_opt(int id, int type, int state, int helpid) -{ - itemex_opt_t *opt = xmalloc(sizeof(itemex_opt_t)); - memset( opt, 0, sizeof(*opt) ); - opt->id = id; - opt->type = type; - opt->state = state; - opt->helpid = helpid; - return opt; -} - -/* Raw data functions */ -static raw_data_t *load_file(string_t *filename, language_t *lang) -{ - FILE *fp = NULL; - char *path; - raw_data_t *rd; - string_t *name; - int codepage = get_language_codepage(lang->id, lang->sub); - - /* FIXME: we may want to use utf-8 here */ - if (codepage <= 0 && filename->type != str_char) - yyerror("Cannot convert filename to ASCII string"); - name = convert_string( filename, str_char, codepage ); - if (!(path = wpp_find_include(name->str.cstr, input_name))) - yyerror("Cannot open file %s", name->str.cstr); - if (!(fp = fopen( path, "rb" ))) - yyerror("Cannot open file %s", name->str.cstr); - free( path ); - rd = new_raw_data(); - fseek(fp, 0, SEEK_END); - rd->size = ftell(fp); - fseek(fp, 0, SEEK_SET); - if (rd->size) - { - rd->data = xmalloc(rd->size); - fread(rd->data, rd->size, 1, fp); - } - else rd->data = NULL; - fclose(fp); - rd->lvc.language = lang; - free_string(name); - return rd; -} - -static raw_data_t *int2raw_data(int i) -{ - raw_data_t *rd; - - if( ( i >= 0 && (int)((unsigned short)i) != i) || - ( i < 0 && (int)((short)i) != i) ) - parser_warning("Integer constant out of 16bit range (%d), truncated to %d\n", i, (short)i); - - rd = new_raw_data(); - rd->size = sizeof(short); - rd->data = xmalloc(rd->size); - switch(byteorder) - { -#ifdef WORDS_BIGENDIAN - default: -#endif - case WRC_BO_BIG: - rd->data[0] = HIBYTE(i); - rd->data[1] = LOBYTE(i); - break; - -#ifndef WORDS_BIGENDIAN - default: -#endif - case WRC_BO_LITTLE: - rd->data[1] = HIBYTE(i); - rd->data[0] = LOBYTE(i); - break; - } - return rd; -} - -static raw_data_t *long2raw_data(int i) -{ - raw_data_t *rd; - rd = new_raw_data(); - rd->size = sizeof(int); - rd->data = xmalloc(rd->size); - switch(byteorder) - { -#ifdef WORDS_BIGENDIAN - default: -#endif - case WRC_BO_BIG: - rd->data[0] = HIBYTE(HIWORD(i)); - rd->data[1] = LOBYTE(HIWORD(i)); - rd->data[2] = HIBYTE(LOWORD(i)); - rd->data[3] = LOBYTE(LOWORD(i)); - break; - -#ifndef WORDS_BIGENDIAN - default: -#endif - case WRC_BO_LITTLE: - rd->data[3] = HIBYTE(HIWORD(i)); - rd->data[2] = LOBYTE(HIWORD(i)); - rd->data[1] = HIBYTE(LOWORD(i)); - rd->data[0] = LOBYTE(LOWORD(i)); - break; - } - return rd; -} - -static raw_data_t *str2raw_data(string_t *str) -{ - raw_data_t *rd; - rd = new_raw_data(); - rd->size = str->size * (str->type == str_char ? 1 : 2); - rd->data = xmalloc(rd->size); - if(str->type == str_char) - memcpy(rd->data, str->str.cstr, rd->size); - else if(str->type == str_unicode) - { - int i; - switch(byteorder) - { -#ifdef WORDS_BIGENDIAN - default: -#endif - case WRC_BO_BIG: - for(i = 0; i < str->size; i++) - { - rd->data[2*i + 0] = HIBYTE((WORD)str->str.wstr[i]); - rd->data[2*i + 1] = LOBYTE((WORD)str->str.wstr[i]); - } - break; -#ifndef WORDS_BIGENDIAN - default: -#endif - case WRC_BO_LITTLE: - for(i = 0; i < str->size; i++) - { - rd->data[2*i + 1] = HIBYTE((WORD)str->str.wstr[i]); - rd->data[2*i + 0] = LOBYTE((WORD)str->str.wstr[i]); - } - break; - } - } - else - internal_error(__FILE__, __LINE__, "Invalid stringtype\n"); - return rd; -} - -static raw_data_t *merge_raw_data(raw_data_t *r1, raw_data_t *r2) -{ - r1->data = xrealloc(r1->data, r1->size + r2->size); - memcpy(r1->data + r1->size, r2->data, r2->size); - r1->size += r2->size; - return r1; -} - -static raw_data_t *merge_raw_data_int(raw_data_t *r1, int i) -{ - raw_data_t *t = int2raw_data(i); - merge_raw_data(r1, t); - free(t->data); - free(t); - return r1; -} - -static raw_data_t *merge_raw_data_long(raw_data_t *r1, int i) -{ - raw_data_t *t = long2raw_data(i); - merge_raw_data(r1, t); - free(t->data); - free(t); - return r1; -} - -static raw_data_t *merge_raw_data_str(raw_data_t *r1, string_t *str) -{ - raw_data_t *t = str2raw_data(str); - merge_raw_data(r1, t); - free(t->data); - free(t); - return r1; -} - -/* Function the go back in a list to get the head */ -static menu_item_t *get_item_head(menu_item_t *p) -{ - if(!p) - return NULL; - while(p->prev) - p = p->prev; - return p; -} - -static resource_t *get_resource_head(resource_t *p) -{ - if(!p) - return NULL; - while(p->prev) - p = p->prev; - return p; -} - -static ver_block_t *get_ver_block_head(ver_block_t *p) -{ - if(!p) - return NULL; - while(p->prev) - p = p->prev; - return p; -} - -static ver_value_t *get_ver_value_head(ver_value_t *p) -{ - if(!p) - return NULL; - while(p->prev) - p = p->prev; - return p; -} - -static control_t *get_control_head(control_t *p) -{ - if(!p) - return NULL; - while(p->prev) - p = p->prev; - return p; -} - -static event_t *get_event_head(event_t *p) -{ - if(!p) - return NULL; - while(p->prev) - p = p->prev; - return p; -} - -/* Find a stringtable with given language */ -static stringtable_t *find_stringtable(lvc_t *lvc) -{ - stringtable_t *stt; - - assert(lvc != NULL); - - if(!lvc->language) - lvc->language = dup_language(currentlanguage); - - for(stt = sttres; stt; stt = stt->next) - { - if(stt->lvc.language->id == lvc->language->id - && stt->lvc.language->sub == lvc->language->sub) - { - /* Found a table with the same language */ - /* The version and characteristics are now handled - * in the generation of the individual stringtables. - * This enables localized analysis. - if((stt->lvc.version && lvc->version && *(stt->lvc.version) != *(lvc->version)) - || (!stt->lvc.version && lvc->version) - || (stt->lvc.version && !lvc->version)) - parser_warning("Stringtable's versions are not the same, using first definition\n"); - - if((stt->lvc.characts && lvc->characts && *(stt->lvc.characts) != *(lvc->characts)) - || (!stt->lvc.characts && lvc->characts) - || (stt->lvc.characts && !lvc->characts)) - parser_warning("Stringtable's characteristics are not the same, using first definition\n"); - */ - return stt; - } - } - return NULL; -} - -/* qsort sorting function for string table entries */ -#define STE(p) ((const stt_entry_t *)(p)) -static int sort_stt_entry(const void *e1, const void *e2) -{ - return STE(e1)->id - STE(e2)->id; -} -#undef STE - -static resource_t *build_stt_resources(stringtable_t *stthead) -{ - stringtable_t *stt; - stringtable_t *newstt; - resource_t *rsc; - resource_t *rsclist = NULL; - resource_t *rsctail = NULL; - int i; - int j; - DWORD andsum; - DWORD orsum; - characts_t *characts; - version_t *version; - - if(!stthead) - return NULL; - - /* For all languages defined */ - for(stt = stthead; stt; stt = stt->next) - { - assert(stt->nentries > 0); - - /* Sort the entries */ - if(stt->nentries > 1) - qsort(stt->entries, stt->nentries, sizeof(stt->entries[0]), sort_stt_entry); - - for(i = 0; i < stt->nentries; ) - { - newstt = new_stringtable(&stt->lvc); - newstt->entries = xmalloc(16 * sizeof(stt_entry_t)); - memset( newstt->entries, 0, 16 * sizeof(stt_entry_t) ); - newstt->nentries = 16; - newstt->idbase = stt->entries[i].id & ~0xf; - for(j = 0; j < 16 && i < stt->nentries; j++) - { - if(stt->entries[i].id - newstt->idbase == j) - { - newstt->entries[j] = stt->entries[i]; - i++; - } - } - andsum = ~0; - orsum = 0; - characts = NULL; - version = NULL; - /* Check individual memory options and get - * the first characteristics/version - */ - for(j = 0; j < 16; j++) - { - if(!newstt->entries[j].str) - continue; - andsum &= newstt->entries[j].memopt; - orsum |= newstt->entries[j].memopt; - if(!characts) - characts = newstt->entries[j].characts; - if(!version) - version = newstt->entries[j].version; - } - if(andsum != orsum) - { - warning("Stringtable's memory options are not equal (idbase: %d)\n", newstt->idbase); - } - /* Check version and characteristics */ - for(j = 0; j < 16; j++) - { - if(characts - && newstt->entries[j].characts - && *newstt->entries[j].characts != *characts) - warning("Stringtable's characteristics are not the same (idbase: %d)\n", newstt->idbase); - if(version - && newstt->entries[j].version - && *newstt->entries[j].version != *version) - warning("Stringtable's versions are not the same (idbase: %d)\n", newstt->idbase); - } - rsc = new_resource(res_stt, newstt, newstt->memopt, newstt->lvc.language); - rsc->name = new_name_id(); - rsc->name->type = name_ord; - rsc->name->name.i_name = (newstt->idbase >> 4) + 1; - rsc->memopt = andsum; /* Set to least common denominator */ - newstt->memopt = andsum; - newstt->lvc.characts = characts; - newstt->lvc.version = version; - if(!rsclist) - { - rsclist = rsc; - rsctail = rsc; - } - else - { - rsctail->next = rsc; - rsc->prev = rsctail; - rsctail = rsc; - } - } - } - return rsclist; -} - - -static toolbar_item_t *ins_tlbr_button(toolbar_item_t *prev, toolbar_item_t *idrec) -{ - idrec->prev = prev; - if(prev) - prev->next = idrec; - - return idrec; -} - -static toolbar_item_t *get_tlbr_buttons_head(toolbar_item_t *p, int *nitems) -{ - if(!p) - { - *nitems = 0; - return NULL; - } - - *nitems = 1; - - while(p->prev) - { - (*nitems)++; - p = p->prev; - } - - return p; -} - -static string_t *make_filename(string_t *str) -{ - if(str->type == str_char) - { - char *cptr; - - /* Remove escaped backslash and convert to forward */ - for(cptr = str->str.cstr; (cptr = strchr(cptr, '\\')) != NULL; cptr++) - { - if(cptr[1] == '\\') - { - memmove(cptr, cptr+1, strlen(cptr)); - str->size--; - } - *cptr = '/'; - } - } - else - { - WCHAR *wptr; - - /* Remove escaped backslash and convert to forward */ - for(wptr = str->str.wstr; (wptr = strchrW(wptr, '\\')) != NULL; wptr++) - { - if(wptr[1] == '\\') - { - memmove(wptr, wptr+1, strlenW(wptr)); - str->size--; - } - *wptr = '/'; - } - } - return str; -} - -/* - * Process all resources to extract fonts and build - * a fontdir resource. - * - * Note: MS' resource compiler (build 1472) does not - * handle font resources with different languages. - * The fontdir is generated in the last active language - * and font identifiers must be unique across the entire - * source. - * This is not logical considering the localization - * constraints of all other resource types. MS has, - * most probably, never testet localized fonts. However, - * using fontresources is rare, so it might not occur - * in normal applications. - * Wine does require better localization because a lot - * of languages are coded into the same executable. - * Therefore, I will generate fontdirs for *each* - * localized set of fonts. - */ -static resource_t *build_fontdir(resource_t **fnt, int nfnt) -{ - static int once = 0; - if(!once) - { - warning("Need to parse fonts, not yet implemented (fnt: %p, nfnt: %d)\n", fnt, nfnt); - once++; - } - return NULL; -} - -static resource_t *build_fontdirs(resource_t *tail) -{ - resource_t *rsc; - resource_t *lst = NULL; - resource_t **fnt = NULL; /* List of all fonts */ - int nfnt = 0; - resource_t **fnd = NULL; /* List of all fontdirs */ - int nfnd = 0; - resource_t **lanfnt = NULL; - int nlanfnt = 0; - int i; - name_id_t nid; - string_t str; - int fntleft; - - nid.type = name_str; - nid.name.s_name = &str; - str.type = str_char; - str.str.cstr = xstrdup("FONTDIR"); - str.size = 7; - - /* Extract all fonts and fontdirs */ - for(rsc = tail; rsc; rsc = rsc->prev) - { - if(rsc->type == res_fnt) - { - nfnt++; - fnt = xrealloc(fnt, nfnt * sizeof(*fnt)); - fnt[nfnt-1] = rsc; - } - else if(rsc->type == res_fntdir) - { - nfnd++; - fnd = xrealloc(fnd, nfnd * sizeof(*fnd)); - fnd[nfnd-1] = rsc; - } - } - - /* Verify the name of the present fontdirs */ - for(i = 0; i < nfnd; i++) - { - if(compare_name_id(&nid, fnd[i]->name)) - { - warning("User supplied FONTDIR entry has an invalid name '%s', ignored\n", - get_nameid_str(fnd[i]->name)); - fnd[i] = NULL; - } - } - - /* Sanity check */ - if(nfnt == 0) - { - if(nfnd != 0) - warning("Found %d FONTDIR entries without any fonts present\n", nfnd); - goto clean; - } - - /* Copy space */ - lanfnt = xmalloc(nfnt * sizeof(*lanfnt)); - memset( lanfnt, 0, nfnt * sizeof(*lanfnt)); - - /* Get all fonts covered by fontdirs */ - for(i = 0; i < nfnd; i++) - { - int j; - WORD cnt; - int isswapped = 0; - - if(!fnd[i]) - continue; - for(j = 0; j < nfnt; j++) - { - if(!fnt[j]) - continue; - if(fnt[j]->lan->id == fnd[i]->lan->id && fnt[j]->lan->sub == fnd[i]->lan->sub) - { - lanfnt[nlanfnt] = fnt[j]; - nlanfnt++; - fnt[j] = NULL; - } - } - - cnt = *(WORD *)fnd[i]->res.fnd->data->data; - if(nlanfnt == cnt) - isswapped = 0; - else if(nlanfnt == BYTESWAP_WORD(cnt)) - isswapped = 1; - else - error("FONTDIR for language %d,%d has wrong count (%d, expected %d)\n", - fnd[i]->lan->id, fnd[i]->lan->sub, cnt, nlanfnt); -#ifdef WORDS_BIGENDIAN - if((byteorder == WRC_BO_LITTLE && !isswapped) || (byteorder != WRC_BO_LITTLE && isswapped)) -#else - if((byteorder == WRC_BO_BIG && !isswapped) || (byteorder != WRC_BO_BIG && isswapped)) -#endif - { - internal_error(__FILE__, __LINE__, "User supplied FONTDIR needs byteswapping\n"); - } - } - - /* We now have fonts left where we need to make a fontdir resource */ - for(i = fntleft = 0; i < nfnt; i++) - { - if(fnt[i]) - fntleft++; - } - while(fntleft) - { - /* Get fonts of same language in lanfnt[] */ - for(i = nlanfnt = 0; i < nfnt; i++) - { - if(fnt[i]) - { - if(!nlanfnt) - { - addlanfnt: - lanfnt[nlanfnt] = fnt[i]; - nlanfnt++; - fnt[i] = NULL; - fntleft--; - } - else if(fnt[i]->lan->id == lanfnt[0]->lan->id && fnt[i]->lan->sub == lanfnt[0]->lan->sub) - goto addlanfnt; - } - } - /* and build a fontdir */ - rsc = build_fontdir(lanfnt, nlanfnt); - if(rsc) - { - if(lst) - { - lst->next = rsc; - rsc->prev = lst; - } - lst = rsc; - } - } - - free(lanfnt); -clean: - free(fnt); - free(fnd); - free(str.str.cstr); - return lst; -} - -/* - * This gets invoked to determine whether the next resource - * is to be of a standard-type (e.g. bitmaps etc.), or should - * be a user-type resource. This function is required because - * there is the _possibility_ of a lookahead token in the - * parser, which is generated from the "expr" state in the - * "nameid" parsing. - * - * The general resource format is: - * - * - * The can either be tIDENT or "expr". The latter - * will always generate a lookahead, which is the of the - * resource to parse. Otherwise, we need to get a new token from - * the scanner to determine the next step. - * - * The problem arrises when is numerical. This case should - * map onto default resource-types and be parsed as such instead - * of being mapped onto user-type resources. - * - * The trick lies in the fact that yacc (bison) doesn't care about - * intermediate changes of the lookahead while reducing a rule. We - * simply replace the lookahead with a token that will result in - * a shift to the appropriate rule for the specific resource-type. - */ -static int rsrcid_to_token(int lookahead) -{ - int token; - - /* Get a token if we don't have one yet */ - if(lookahead == YYEMPTY) - lookahead = YYLEX; - - /* Only numbers are possibly interesting */ - switch(lookahead) - { - case tNUMBER: - case tLNUMBER: - break; - default: - return lookahead; - } - - token = lookahead; - - switch(yylval.num) - { - case WRC_RT_CURSOR: - token = tCURSOR; - break; - case WRC_RT_ICON: - token = tICON; - break; - case WRC_RT_BITMAP: - token = tBITMAP; - break; - case WRC_RT_FONT: - token = tFONT; - break; - case WRC_RT_FONTDIR: - token = tFONTDIR; - break; - case WRC_RT_RCDATA: - token = tRCDATA; - break; - case WRC_RT_MESSAGETABLE: - token = tMESSAGETABLE; - break; - case WRC_RT_DLGINIT: - token = tDLGINIT; - break; - case WRC_RT_ACCELERATOR: - token = tACCELERATORS; - break; - case WRC_RT_MENU: - token = tMENU; - break; - case WRC_RT_DIALOG: - token = tDIALOG; - break; - case WRC_RT_VERSION: - token = tVERSIONINFO; - break; - case WRC_RT_TOOLBAR: - token = tTOOLBAR; - break; - case WRC_RT_HTML: - token = tHTML; - break; - - case WRC_RT_STRING: - break; - - case WRC_RT_ANICURSOR: - case WRC_RT_ANIICON: - case WRC_RT_GROUP_CURSOR: - case WRC_RT_GROUP_ICON: - parser_warning("Usertype uses reserved type ID %d, which is auto-generated\n", yylval.num); - return lookahead; - - case WRC_RT_DLGINCLUDE: - case WRC_RT_PLUGPLAY: - case WRC_RT_VXD: - parser_warning("Usertype uses reserved type ID %d, which is not supported by wrc yet\n", yylval.num); - default: - return lookahead; - } - - return token; -} - diff --git a/reactos/tools/wrc/parser.tab.h b/reactos/tools/wrc/parser.tab.h deleted file mode 100644 index 40536714bea..00000000000 --- a/reactos/tools/wrc/parser.tab.h +++ /dev/null @@ -1,187 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.4.2. */ - -/* Skeleton interface for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software - Foundation, Inc. - - 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 . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - tNL = 258, - tNUMBER = 259, - tLNUMBER = 260, - tSTRING = 261, - tIDENT = 262, - tFILENAME = 263, - tRAWDATA = 264, - tACCELERATORS = 265, - tBITMAP = 266, - tCURSOR = 267, - tDIALOG = 268, - tDIALOGEX = 269, - tMENU = 270, - tMENUEX = 271, - tMESSAGETABLE = 272, - tRCDATA = 273, - tVERSIONINFO = 274, - tSTRINGTABLE = 275, - tFONT = 276, - tFONTDIR = 277, - tICON = 278, - tHTML = 279, - tAUTO3STATE = 280, - tAUTOCHECKBOX = 281, - tAUTORADIOBUTTON = 282, - tCHECKBOX = 283, - tDEFPUSHBUTTON = 284, - tPUSHBUTTON = 285, - tRADIOBUTTON = 286, - tSTATE3 = 287, - tGROUPBOX = 288, - tCOMBOBOX = 289, - tLISTBOX = 290, - tSCROLLBAR = 291, - tCONTROL = 292, - tEDITTEXT = 293, - tRTEXT = 294, - tCTEXT = 295, - tLTEXT = 296, - tBLOCK = 297, - tVALUE = 298, - tSHIFT = 299, - tALT = 300, - tASCII = 301, - tVIRTKEY = 302, - tGRAYED = 303, - tCHECKED = 304, - tINACTIVE = 305, - tNOINVERT = 306, - tPURE = 307, - tIMPURE = 308, - tDISCARDABLE = 309, - tLOADONCALL = 310, - tPRELOAD = 311, - tFIXED = 312, - tMOVEABLE = 313, - tCLASS = 314, - tCAPTION = 315, - tCHARACTERISTICS = 316, - tEXSTYLE = 317, - tSTYLE = 318, - tVERSION = 319, - tLANGUAGE = 320, - tFILEVERSION = 321, - tPRODUCTVERSION = 322, - tFILEFLAGSMASK = 323, - tFILEOS = 324, - tFILETYPE = 325, - tFILEFLAGS = 326, - tFILESUBTYPE = 327, - tMENUBARBREAK = 328, - tMENUBREAK = 329, - tMENUITEM = 330, - tPOPUP = 331, - tSEPARATOR = 332, - tHELP = 333, - tTOOLBAR = 334, - tBUTTON = 335, - tBEGIN = 336, - tEND = 337, - tDLGINIT = 338, - tNOT = 339, - pUPM = 340 - }; -#endif - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -{ - -/* Line 1685 of yacc.c */ -#line 228 "parser.y" - - string_t *str; - int num; - int *iptr; - char *cptr; - resource_t *res; - accelerator_t *acc; - bitmap_t *bmp; - dialog_t *dlg; - font_t *fnt; - fontdir_t *fnd; - menu_t *men; - html_t *html; - rcdata_t *rdt; - stringtable_t *stt; - stt_entry_t *stte; - user_t *usr; - messagetable_t *msg; - versioninfo_t *veri; - control_t *ctl; - name_id_t *nid; - font_id_t *fntid; - language_t *lan; - version_t *ver; - characts_t *chars; - event_t *event; - menu_item_t *menitm; - itemex_opt_t *exopt; - raw_data_t *raw; - lvc_t *lvc; - ver_value_t *val; - ver_block_t *blk; - ver_words_t *verw; - toolbar_t *tlbar; - toolbar_item_t *tlbarItems; - dlginit_t *dginit; - style_pair_t *styles; - style_t *style; - ani_any_t *ani; - - - -/* Line 1685 of yacc.c */ -#line 179 "parser.tab.h" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - -extern YYSTYPE parser_lval; - - diff --git a/reactos/tools/wrc/parser.y b/reactos/tools/wrc/parser.y deleted file mode 100644 index e1a3c689be3..00000000000 --- a/reactos/tools/wrc/parser.y +++ /dev/null @@ -1,2961 +0,0 @@ -%{ -/* - * Copyright 1994 Martin von Loewis - * Copyright 1998-2000 Bertho A. Stultiens (BS) - * 1999 Juergen Schmied (JS) - * - * 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 - * - * History: - * 24-Jul-2000 BS - Made a fix for broken Berkeley yacc on - * non-terminals (see cjunk rule). - * 21-May-2000 BS - Partial implementation of font resources. - * - Corrected language propagation for binary - * resources such as bitmaps, icons, cursors, - * userres and rcdata. The language is now - * correct in .res files. - * - Fixed reading the resource name as ident, - * so that it may overlap keywords. - * 20-May-2000 BS - Implemented animated cursors and icons - * resource types. - * 30-Apr-2000 BS - Reintegration into the wine-tree - * 14-Jan-2000 BS - Redid the usertype resources so that they - * are compatible. - * 02-Jan-2000 BS - Removed the preprocessor from the grammar - * except for the # command (line numbers). - * - * 06-Nov-1999 JS - see CHANGES - * - * 29-Dec-1998 AdH - Grammar and function extensions. - * grammar: TOOLBAR resources, Named ICONs in - * DIALOGS - * functions: semantic actions for the grammar - * changes, resource files can now be anywhere - * on the include path instead of just in the - * current directory - * - * 20-Jun-1998 BS - Fixed a bug in load_file() where the name was not - * printed out correctly. - * - * 17-Jun-1998 BS - Fixed a bug in CLASS statement parsing which should - * also accept a tSTRING as argument. - * - * 25-May-1998 BS - Found out that I need to support language, version - * and characteristics in inline resources (bitmap, - * cursor, etc) but they can also be specified with - * a filename. This renders my filename-scanning scheme - * worthless. Need to build newline parsing to solve - * this one. - * It will come with version 1.1.0 (sigh). - * - * 19-May-1998 BS - Started to build a builtin preprocessor - * - * 30-Apr-1998 BS - Redid the stringtable parsing/handling. My previous - * ideas had some serious flaws. - * - * 27-Apr-1998 BS - Removed a lot of dead comments and put it in a doc - * file. - * - * 21-Apr-1998 BS - Added correct behavior for cursors and icons. - * - This file is growing too big. It is time to strip - * things and put it in a support file. - * - * 19-Apr-1998 BS - Tagged the stringtable resource so that only one - * resource will be created. This because the table - * has a different layout than other resources. The - * table has to be sorted, and divided into smaller - * resource entries (see comment in source). - * - * 17-Apr-1998 BS - Almost all strings, including identifiers, are parsed - * as string_t which include unicode strings upon - * input. - * - Parser now emits a warning when compiling win32 - * extensions in win16 mode. - * - * 16-Apr-1998 BS - Raw data elements are now *optionally* separated - * by commas. Read the comments in file sq2dq.l. - * - FIXME: there are instances in the source that rely - * on the fact that int==32bit and pointers are int size. - * - Fixed the conflict in menuex by changing a rule - * back into right recursion. See note in source. - * - UserType resources cannot have an expression as its - * typeclass. See note in source. - * - * 15-Apr-1998 BS - Changed all right recursion into left recursion to - * get reduction of the parsestack. - * This also helps communication between bison and flex. - * Main advantage is that the Empty rule gets reduced - * first, which is used to allocate/link things. - * It also added a shift/reduce conflict in the menuex - * handling, due to expression/option possibility, - * although not serious. - * - * 14-Apr-1998 BS - Redone almost the entire parser. We're not talking - * about making it more efficient, but readable (for me) - * and slightly easier to expand/change. - * This is done primarily by using more reduce states - * with many (intuitive) types for the various resource - * statements. - * - Added expression handling for all resources where a - * number is accepted (not only for win32). Also added - * multiply and division (not MS compatible, but handy). - * Unary minus introduced a shift/reduce conflict, but - * it is not serious. - * - * 13-Apr-1998 BS - Reordered a lot of things - * - Made the source more readable - * - Added Win32 resource definitions - * - Corrected syntax problems with an old yacc (;) - * - Added extra comment about grammar - */ -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include -#include -#include - -#include "wrc.h" -#include "utils.h" -#include "newstruc.h" -#include "dumpres.h" -#include "wine/wpp.h" -#include "wine/unicode.h" -#include "parser.h" -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" - -#if defined(YYBYACC) - /* Berkeley yacc (byacc) doesn't seem to know about these */ - /* Some *BSD supplied versions do define these though */ -# ifndef YYEMPTY -# define YYEMPTY (-1) /* Empty lookahead value of yychar */ -# endif -# ifndef YYLEX -# define YYLEX yylex() -# endif - -#elif defined(YYBISON) - /* Bison was used for original development */ - /* #define YYEMPTY -2 */ - /* #define YYLEX yylex() */ - -#else - /* No yacc we know yet */ -# if !defined(YYEMPTY) || !defined(YYLEX) -# error Yacc version/type unknown. This version needs to be verified for settings of YYEMPTY and YYLEX. -# elif defined(__GNUC__) /* gcc defines the #warning directive */ -# warning Yacc version/type unknown. It defines YYEMPTY and YYLEX, but is not tested - /* #else we just take a chance that it works... */ -# endif -#endif - -int want_nl = 0; /* Signal flex that we need the next newline */ -int want_id = 0; /* Signal flex that we need the next identifier */ -static stringtable_t *tagstt; /* Stringtable tag. - * It is set while parsing a stringtable to one of - * the stringtables in the sttres list or a new one - * if the language was not parsed before. - */ -static stringtable_t *sttres; /* Stringtable resources. This holds the list of - * stringtables with different lanuages - */ -static int dont_want_id = 0; /* See language parsing for details */ - -/* Set to the current options of the currently scanning stringtable */ -static int *tagstt_memopt; -static characts_t *tagstt_characts; -static version_t *tagstt_version; - -static const char riff[4] = "RIFF"; /* RIFF file magic for animated cursor/icon */ - -/* Prototypes of here defined functions */ -static event_t *get_event_head(event_t *p); -static control_t *get_control_head(control_t *p); -static ver_value_t *get_ver_value_head(ver_value_t *p); -static ver_block_t *get_ver_block_head(ver_block_t *p); -static resource_t *get_resource_head(resource_t *p); -static menu_item_t *get_item_head(menu_item_t *p); -static raw_data_t *merge_raw_data_str(raw_data_t *r1, string_t *str); -static raw_data_t *merge_raw_data_int(raw_data_t *r1, int i); -static raw_data_t *merge_raw_data_long(raw_data_t *r1, int i); -static raw_data_t *merge_raw_data(raw_data_t *r1, raw_data_t *r2); -static raw_data_t *str2raw_data(string_t *str); -static raw_data_t *int2raw_data(int i); -static raw_data_t *long2raw_data(int i); -static raw_data_t *load_file(string_t *name, language_t *lang); -static itemex_opt_t *new_itemex_opt(int id, int type, int state, int helpid); -static event_t *add_string_event(string_t *key, int id, int flags, event_t *prev); -static event_t *add_event(int key, int id, int flags, event_t *prev); -static name_id_t *convert_ctlclass(name_id_t *cls); -static control_t *ins_ctrl(int type, int special_style, control_t *ctrl, control_t *prev); -static dialog_t *dialog_version(version_t *v, dialog_t *dlg); -static dialog_t *dialog_characteristics(characts_t *c, dialog_t *dlg); -static dialog_t *dialog_language(language_t *l, dialog_t *dlg); -static dialog_t *dialog_menu(name_id_t *m, dialog_t *dlg); -static dialog_t *dialog_class(name_id_t *n, dialog_t *dlg); -static dialog_t *dialog_font(font_id_t *f, dialog_t *dlg); -static dialog_t *dialog_caption(string_t *s, dialog_t *dlg); -static dialog_t *dialog_exstyle(style_t * st, dialog_t *dlg); -static dialog_t *dialog_style(style_t * st, dialog_t *dlg); -static resource_t *build_stt_resources(stringtable_t *stthead); -static stringtable_t *find_stringtable(lvc_t *lvc); -static toolbar_item_t *ins_tlbr_button(toolbar_item_t *prev, toolbar_item_t *idrec); -static toolbar_item_t *get_tlbr_buttons_head(toolbar_item_t *p, int *nitems); -static string_t *make_filename(string_t *s); -static resource_t *build_fontdirs(resource_t *tail); -static resource_t *build_fontdir(resource_t **fnt, int nfnt); -static int rsrcid_to_token(int lookahead); - -%} -%union{ - string_t *str; - int num; - int *iptr; - char *cptr; - resource_t *res; - accelerator_t *acc; - bitmap_t *bmp; - dialog_t *dlg; - font_t *fnt; - fontdir_t *fnd; - menu_t *men; - html_t *html; - rcdata_t *rdt; - stringtable_t *stt; - stt_entry_t *stte; - user_t *usr; - messagetable_t *msg; - versioninfo_t *veri; - control_t *ctl; - name_id_t *nid; - font_id_t *fntid; - language_t *lan; - version_t *ver; - characts_t *chars; - event_t *event; - menu_item_t *menitm; - itemex_opt_t *exopt; - raw_data_t *raw; - lvc_t *lvc; - ver_value_t *val; - ver_block_t *blk; - ver_words_t *verw; - toolbar_t *tlbar; - toolbar_item_t *tlbarItems; - dlginit_t *dginit; - style_pair_t *styles; - style_t *style; - ani_any_t *ani; -} - -%token tNL -%token tNUMBER tLNUMBER -%token tSTRING tIDENT tFILENAME -%token tRAWDATA -%token tACCELERATORS tBITMAP tCURSOR tDIALOG tDIALOGEX tMENU tMENUEX tMESSAGETABLE -%token tRCDATA tVERSIONINFO tSTRINGTABLE tFONT tFONTDIR tICON tHTML -%token tAUTO3STATE tAUTOCHECKBOX tAUTORADIOBUTTON tCHECKBOX tDEFPUSHBUTTON -%token tPUSHBUTTON tRADIOBUTTON tSTATE3 /* PUSHBOX */ -%token tGROUPBOX tCOMBOBOX tLISTBOX tSCROLLBAR -%token tCONTROL tEDITTEXT -%token tRTEXT tCTEXT tLTEXT -%token tBLOCK tVALUE -%token tSHIFT tALT tASCII tVIRTKEY tGRAYED tCHECKED tINACTIVE tNOINVERT -%token tPURE tIMPURE tDISCARDABLE tLOADONCALL tPRELOAD tFIXED tMOVEABLE -%token tCLASS tCAPTION tCHARACTERISTICS tEXSTYLE tSTYLE tVERSION tLANGUAGE -%token tFILEVERSION tPRODUCTVERSION tFILEFLAGSMASK tFILEOS tFILETYPE tFILEFLAGS tFILESUBTYPE -%token tMENUBARBREAK tMENUBREAK tMENUITEM tPOPUP tSEPARATOR -%token tHELP -%token tTOOLBAR tBUTTON -%token tBEGIN tEND -%token tDLGINIT -%left '|' -%left '^' -%left '&' -%left '+' '-' -%left '*' '/' -%right '~' tNOT -%left pUPM - -%type resource_file resource resources resource_definition -%type stringtable strings -%type font -%type fontdir -%type accelerators -%type events -%type bitmap -%type cursor icon -%type dialog dlg_attributes dialogex dlgex_attribs -%type ctrls gen_ctrl lab_ctrl ctrl_desc iconinfo -%type helpid -%type exctrls gen_exctrl lab_exctrl exctrl_desc -%type html -%type rcdata -%type raw_data raw_elements opt_data file_raw -%type versioninfo fix_version -%type ver_words -%type ver_blocks ver_block -%type ver_values ver_value -%type menu menuex -%type item_definitions menu_body itemex_definitions menuex_body -%type itemex_p_options itemex_options -%type messagetable -%type userres -%type item_options -%type nameid nameid_s ctlclass usertype -%type acc_opt acc accs -%type loadmemopts lamo lama -%type opt_font opt_exfont opt_expr -%type opt_lvc -%type opt_language -%type opt_characts -%type opt_version -%type expr xpr -%type e_expr -%type toolbar -%type toolbar_items -%type dlginit -%type optional_style_pair -%type any_num -%type \n" - "\n" - "\n"; -const char szTableHeader[] = ""; -const char szFileFooter[] = "
FunctionStatusTests (all/passed/failed)Regressions
"; - -void -OutputUsage(LPWSTR pszName) -{ - printf("\nUsage:\n\n"); - printf("%ls.exe - Perform individual test\n", pszName); - printf("%ls.exe all - Perform all tests\n", pszName); - printf("%ls.exe tests - List the valid test names\n", pszName); - printf("%ls.exe status - Create api status file\n", pszName); - printf("%ls.exe -r ... - Perform regression testing\n", pszName); - printf("\n"); -} - -BOOL -WriteFileHeader(HANDLE hFile, LPDWORD lpdwBytesWritten, LPWSTR pszModule) -{ - char szHeader[100]; - - WriteFile(hFile, szFileHeader1, strlen(szFileHeader1), lpdwBytesWritten, NULL); - sprintf(szHeader, "%ls Test results", pszModule); - WriteFile(hFile, szHeader, strlen(szHeader), lpdwBytesWritten, NULL); - WriteFile(hFile, szFileHeader2, strlen(szFileHeader2), lpdwBytesWritten, NULL); - - sprintf(szHeader, "

Test results for %ls

", pszModule); - WriteFile(hFile, szHeader, strlen(szHeader), lpdwBytesWritten, NULL); - - WriteFile(hFile, szTableHeader, strlen(szTableHeader), lpdwBytesWritten, NULL); - - return TRUE; -} - -BOOL -WriteRow(HANDLE hFile, LPDWORD lpdwBytesWritten, LPWSTR pszFunction, PTESTINFO pti) -{ - char szLine[500]; - - sprintf(szLine, "%ls", pszFunction); - - switch(pti->nApiStatus) - { - case APISTATUS_NOT_FOUND: - strcat(szLine, "not found"); - break; - case APISTATUS_UNIMPLEMENTED: - strcat(szLine, "unimplemented"); - break; - case APISTATUS_ASSERTION_FAILED: - strcat(szLine, "assertion failed"); - break; - case APISTATUS_REGRESSION: - strcat(szLine, "Regression!"); - break; - case APISTATUS_NORMAL: - strcat(szLine, "Implemented"); - break; - } - - sprintf(szLine + strlen(szLine), "%d / %d / %d%d\n", - pti->passed+pti->failed, pti->passed, pti->failed, pti->rfailed); - - WriteFile(hFile, szLine, strlen(szLine), lpdwBytesWritten, NULL); - - return TRUE; -} - -static CHAR -GetDisplayChar(CHAR c) -{ - if (c < 32) return '.'; - return c; -} - -VOID -DumpMem(PVOID pData, ULONG cbSize, ULONG nWidth) -{ - ULONG cLines = (cbSize + nWidth - 1) / nWidth; - ULONG cbLastLine = cbSize % nWidth; - INT i,j; - - for (i = 0; i <= cLines; i++) - { - printf("%08lx: ", i*nWidth); - for (j = 0; j < (i == cLines? cbLastLine : nWidth); j++) - { - printf("%02x ", ((BYTE*)pData)[i*nWidth + j]); - } - printf(" "); - for (j = 0; j < (i == cLines? cbLastLine : nWidth); j++) - { - printf("%c", GetDisplayChar(((CHAR*)pData)[i*nWidth + j])); - } - printf("\n"); - } -} - -int -TestMain(LPWSTR pszName, LPWSTR pszModule) -{ - INT argc, i, j; - LPWSTR *argv; - TESTINFO ti; - INT opassed, ofailed, orfailed; - BOOL bAll, bStatus; - HANDLE hFile = NULL; - DWORD dwBytesWritten; - - ti.bRegress = FALSE; - bAll = FALSE; - bStatus = FALSE; - opassed = ofailed = orfailed = 0; - - argv = CommandLineToArgvW(GetCommandLineW(), &argc); - - if (argc < 2) - { - OutputUsage(pszName); - return 0; - } - - /* Get options */ - for (i = 1; i < argc; i++) - { - if (_wcsicmp(argv[i], L"-r") == 0) - { - ti.bRegress = TRUE; - } - else if (_wcsicmp(argv[i], L"all") == 0) - { - bAll = TRUE; - } - else if (_wcsicmp(argv[i], L"status") == 0) - { - bAll = TRUE; - bStatus = TRUE; - } - else if (_wcsicmp(argv[i], L"tests") == 0) - { - /* List all the tests and exit */ - printf("Valid test names:\n\n"); - - for (i = 0; i < NumTests(); i++) - printf("%ls\n", TestList[i].Test); - - return 0; - } - } - - if (bStatus) - { - WCHAR szOutputFile[MAX_PATH]; - - ti.bRegress = TRUE; - wcscpy(szOutputFile, pszName); - wcscat(szOutputFile, L".html"); - hFile = CreateFileW(szOutputFile, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - - if (hFile == INVALID_HANDLE_VALUE) - { - printf("Could not create output file.\n"); - return 0; - } - - WriteFileHeader(hFile, &dwBytesWritten, pszModule); - } - - for (i = 0; i < NumTests(); i++) - { - for (j = 1; j < argc; j++) - { - if (bAll || _wcsicmp(argv[j], TestList[i].Test) == 0) - { - ti.passed = 0; - ti.failed = 0; - ti.rfailed = 0; - if (!IsFunctionPresent(TestList[i].Test)) - { - printf("Function %ls was not found!\n", TestList[i].Test); - ti.nApiStatus = APISTATUS_NOT_FOUND; - } - else - { - printf("Executing test: %ls\n", TestList[i].Test); - ti.nApiStatus = TestList[i].Proc(&ti); - opassed += ti.passed; - ofailed += ti.failed; - orfailed += ti.rfailed; - printf(" tests: %d, passed: %d, failed: %d\n\n", ti.passed+ti.failed, ti.passed, ti.failed); - } - if (bStatus) - { - if (ti.rfailed > 0) - ti.nApiStatus = APISTATUS_REGRESSION; - WriteRow(hFile, &dwBytesWritten, TestList[i].Test, &ti); - } - break; - } - } - } - - printf("Overall:\n"); - printf(" tests: %d, passed: %d, failed: %d\n\n", opassed+ofailed, opassed, ofailed); - if (ti.bRegress) - { - printf(" regressions: %d\n", orfailed); - } - - if (bStatus) - { - WriteFile(hFile, szFileFooter, strlen(szFileFooter), &dwBytesWritten, NULL); - CloseHandle(hFile); - } - - if (ti.bRegress) - return ti.rfailed; - - return ti.failed; -} diff --git a/rostests/apitests/apitest.h b/rostests/apitests/apitest.h deleted file mode 100644 index e3e08e0609f..00000000000 --- a/rostests/apitests/apitest.h +++ /dev/null @@ -1,119 +0,0 @@ -#ifndef _APITEST_H -#define _APITEST_H - -#include -#include -#include -#include - -#define APISTATUS_NORMAL 0 -#define APISTATUS_NOT_FOUND 1 -#define APISTATUS_UNIMPLEMENTED 2 -#define APISTATUS_ASSERTION_FAILED 3 -#define APISTATUS_REGRESSION 4 - -/* type definitions */ - -typedef struct tagTESTINFO -{ - INT passed; - INT failed; - INT rfailed; - BOOL bRegress; - INT nApiStatus; -} TESTINFO, *PTESTINFO; - -typedef INT (*TESTPROC)(PTESTINFO); - -typedef struct tagTEST -{ - WCHAR* Test; - TESTPROC Proc; -} TESTENTRY, *PTESTENTRY; - - -/* macros */ - -#define TEST(x) \ - if (pti->bRegress) \ - { \ - if (x)\ - {\ - (pti->passed)++;\ - printf("%s:%d: non-rtest succeeded (%s)\n", __FILE__, __LINE__, #x);\ - } else {\ - (pti->failed)++;\ - } \ - } \ - else \ - { \ - if (x)\ - {\ - (pti->passed)++;\ - } else {\ - (pti->failed)++;\ - printf("%s:%d: test failed (%s)\n", __FILE__, __LINE__, #x);\ - } \ - } - -#define TESTX(x, format, ...) \ - if (pti->bRegress) \ - { \ - if (x)\ - {\ - (pti->passed)++;\ - printf("%s:%d: non-rtest succeeded (%s)\n", __FILE__, __LINE__, #x);\ - } else {\ - (pti->failed)++;\ - } \ - } \ - else \ - { \ - if (x)\ - {\ - (pti->passed)++;\ - } else {\ - (pti->failed)++;\ - printf("%s:%d: test failed (%s) ", __FILE__, __LINE__, #x);\ - printf(format, __VA_ARGS__); \ - } \ - } - -#define RTEST(x) \ - if (pti->bRegress) \ - { \ - if (x)\ - {\ - (pti->passed)++;\ - } else {\ - (pti->failed)++;\ - (pti->rfailed)++;\ - printf("rtest failed in %s:%d (%s)\n", __FILE__, __LINE__, #x);\ - } \ - } \ - else \ - { \ - if (x)\ - {\ - (pti->passed)++;\ - } else {\ - (pti->failed)++;\ - printf("test failed in %s:%d (%s)\n", __FILE__, __LINE__, #x);\ - } \ - } - -#undef ASSERT -#define ASSERT(x) \ - if (!(x)) \ - { \ - printf("Assertion failed in %s:%d (%s)\n", __FILE__, __LINE__, #x);\ - return APISTATUS_ASSERTION_FAILED; \ - } - -int TestMain(LPWSTR pszExe, LPWSTR pszModule); -extern TESTENTRY TestList[]; -INT NumTests(void); -BOOL IsFunctionPresent(LPWSTR lpszFunction); -VOID DumpMem(PVOID pData, ULONG cbSize, ULONG nWidth); - -#endif /* _APITEST_H */ diff --git a/rostests/apitests/dciman32/CMakeLists.txt b/rostests/apitests/dciman32/CMakeLists.txt deleted file mode 100644 index ad06347df2f..00000000000 --- a/rostests/apitests/dciman32/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ - -add_definitions(-D_DLL -D__USE_CRTIMP) - -add_executable(dciman32_apitest DCICreatePrimary.c testlist.c) -target_link_libraries(dciman32_apitest wine) -set_module_type(dciman32_apitest win32cui) -add_importlibs(dciman32_apitest msvcrt kernel32 ntdll) -add_cd_file(TARGET dciman32_apitest DESTINATION reactos/bin FOR all) diff --git a/rostests/apitests/dciman32/DCICreatePrimary.c b/rostests/apitests/dciman32/DCICreatePrimary.c deleted file mode 100644 index e6409e9794e..00000000000 --- a/rostests/apitests/dciman32/DCICreatePrimary.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for DCICreatePrimary - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -void Test_DCICreatePrimary() -{ - -} - -START_TEST(DCICreatePrimary) -{ - Test_DCICreatePrimary(); -} - diff --git a/rostests/apitests/dciman32/dciman32_apitest.rbuild b/rostests/apitests/dciman32/dciman32_apitest.rbuild deleted file mode 100644 index 950bb1b1bd7..00000000000 --- a/rostests/apitests/dciman32/dciman32_apitest.rbuild +++ /dev/null @@ -1,15 +0,0 @@ - - - - - . - wine - gdi32 - user32 - pseh - testlist.c - - DCICreatePrimary.c - - - diff --git a/rostests/apitests/dciman32/testlist.c b/rostests/apitests/dciman32/testlist.c deleted file mode 100644 index 4dba1298ec4..00000000000 --- a/rostests/apitests/dciman32/testlist.c +++ /dev/null @@ -1,16 +0,0 @@ -#define WIN32_LEAN_AND_MEAN -#define __ROS_LONG64__ -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_DCICreatePrimary(void); - -const struct test winetest_testlist[] = -{ - { "DCICreatePrimary", func_DCICreatePrimary }, - - { 0, 0 } -}; - diff --git a/rostests/apitests/directory.rbuild b/rostests/apitests/directory.rbuild deleted file mode 100644 index 72edfe440da..00000000000 --- a/rostests/apitests/directory.rbuild +++ /dev/null @@ -1,50 +0,0 @@ - - - - - . - apitest.c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rostests/apitests/gdi32/AddFontResource.c b/rostests/apitests/gdi32/AddFontResource.c deleted file mode 100644 index 236da3f351a..00000000000 --- a/rostests/apitests/gdi32/AddFontResource.c +++ /dev/null @@ -1,126 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for AddFontResource - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -#define COUNT 26 - -void Test_AddFontResourceA() -{ - CHAR szFileNameA[MAX_PATH]; - CHAR szFileNameFont1A[MAX_PATH]; - CHAR szFileNameFont2A[MAX_PATH]; - int result; - - GetCurrentDirectoryA(MAX_PATH,szFileNameA); - - memcpy(szFileNameFont1A,szFileNameA,MAX_PATH ); - strcat(szFileNameFont1A, "\\testdata\\test.ttf"); - - memcpy(szFileNameFont2A,szFileNameA,MAX_PATH ); - strcat(szFileNameFont2A, "\\testdata\\test.otf"); - - RtlZeroMemory(szFileNameA,MAX_PATH); - - /* - * Start testing Ansi version - * - */ - - /* Testing NULL pointer */ - SetLastError(ERROR_SUCCESS); - result = AddFontResourceA(NULL); - ok(result == 0, "AddFontResourceA succeeded, result=%d\n", result); - ok(GetLastError() == ERROR_SUCCESS, "GetLastError()=%ld\n", GetLastError()); - - /* Testing -1 pointer */ - SetLastError(ERROR_SUCCESS); - result = AddFontResourceA((CHAR*)-1); - ok(result == 0, "AddFontResourceA succeeded, result=%d\n", result); - ok(GetLastError() == ERROR_SUCCESS, "GetLastError()=%ld\n", GetLastError()); - - /* Testing address 1 pointer */ - SetLastError(ERROR_SUCCESS); - result = AddFontResourceA((CHAR*)1); - ok(result == 0, "AddFontResourceA succeeded, result=%d\n", result); - ok(GetLastError() == ERROR_SUCCESS, "GetLastError()=%ld\n", GetLastError()); - - /* Testing address empty string */ - SetLastError(ERROR_SUCCESS); - result = AddFontResourceA(""); - ok(result == 0, "AddFontResourceA succeeded, result=%d\n", result); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError()=%ld\n", GetLastError()); - - /* Testing one ttf font */ - SetLastError(ERROR_SUCCESS); - result = AddFontResourceA(szFileNameFont1A); - ok(result == 1, "AddFontResourceA(\"%s\") failed, result=%d\n", szFileNameFont1A, result); - ok(GetLastError() == ERROR_SUCCESS, "GetLastError()=%ld\n", GetLastError()); - - /* Testing one otf font */ - SetLastError(ERROR_SUCCESS); - result = AddFontResourceA(szFileNameFont2A); - ok(result == 1, "AddFontResourceA failed, result=%d\n", result); - ok(GetLastError() == ERROR_SUCCESS, "GetLastError()=%ld\n", GetLastError()); - - /* Testing two fonts */ - SetLastError(ERROR_SUCCESS); - sprintf(szFileNameA,"%s|%s",szFileNameFont1A, szFileNameFont2A); - result = AddFontResourceA(szFileNameA); - ok(result == 0, "AddFontResourceA succeeded, result=%d\n", result); - ok(GetLastError() == ERROR_SUCCESS, "GetLastError()=%ld\n", GetLastError()); - - SetLastError(ERROR_SUCCESS); - sprintf(szFileNameA,"%s |%s",szFileNameFont1A, szFileNameFont2A); - result = AddFontResourceA(szFileNameA); - ok(result == 0, "AddFontResourceA succeeded, result=%d\n", result); - ok(GetLastError() == ERROR_SUCCESS, "GetLastError()=%ld\n", GetLastError()); - - SetLastError(ERROR_SUCCESS); - sprintf(szFileNameA,"%s | %s",szFileNameFont1A, szFileNameFont2A); - result = AddFontResourceA(szFileNameA); - ok(result == 0, "AddFontResourceA succeeded, result=%d\n", result); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "GetLastError()=%ld\n", GetLastError()); - - - GetCurrentDirectoryA(MAX_PATH, szFileNameA); - strcpy(szFileNameFont1A, szFileNameA); - strcat(szFileNameFont1A, "\\testdata\\test.pfm"); - - strcpy(szFileNameFont2A, szFileNameA); - strcat(szFileNameFont2A, "\\testdata\\test.pfb"); - - SetLastError(ERROR_SUCCESS); - - sprintf(szFileNameA,"%s|%s", szFileNameFont1A, szFileNameFont2A); - result = AddFontResourceA(szFileNameA); - ok(result == 1, "AddFontResourceA(\"%s|%s\") failed, result=%d\n", - szFileNameFont1A, szFileNameFont2A, result); - ok(GetLastError() == ERROR_SUCCESS, "GetLastError()=%ld\n", GetLastError()); - - sprintf(szFileNameA,"%s | %s", szFileNameFont1A, szFileNameFont2A); - result = AddFontResourceA(szFileNameA); - ok(result == 0, "AddFontResourceA(\"%s | %s\") succeeded, result=%d\n", - szFileNameFont1A, szFileNameFont2A, result); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "GetLastError()=%ld\n", GetLastError()); - - sprintf(szFileNameA,"%s|%s", szFileNameFont2A, szFileNameFont1A); - result = AddFontResourceA(szFileNameA); - ok(result == 0, "AddFontResourceA(\"%s|%s\") succeeded, result=%d\n", - szFileNameFont2A, szFileNameFont1A, result); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "GetLastError()=%ld\n", GetLastError()); - - -} - -START_TEST(AddFontResource) -{ - Test_AddFontResourceA(); -} - diff --git a/rostests/apitests/gdi32/AddFontResourceEx.c b/rostests/apitests/gdi32/AddFontResourceEx.c deleted file mode 100644 index 5c374d9a5e4..00000000000 --- a/rostests/apitests/gdi32/AddFontResourceEx.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for AddFontResourceEx - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include -#include - -void Test_AddFontResourceExW() -{ - WCHAR szFileName[MAX_PATH]; - int result; - - /* Test NULL filename */ - SetLastError(ERROR_SUCCESS); - - /* Windows crashes, need SEH here */ - _SEH2_TRY - { - result = AddFontResourceExW(NULL, 0, 0); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - result = -1; - SetLastError(_SEH2_GetExceptionCode()); - } - _SEH2_END - ok(result == -1, "AddFontResourceExW should throw an exception!, result == %d\n", result); - ok(GetLastError() == 0xc0000005, "GetLastError()==%lx\n", GetLastError()); - - /* Test "" filename */ - SetLastError(ERROR_SUCCESS); - result = AddFontResourceExW(L"", 0, 0); - ok(result == 0, "AddFontResourceExW(L"", 0, 0) succeeded, result==%d\n", result); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError()==%ld\n", GetLastError()); - - GetEnvironmentVariableW(L"systemroot", szFileName, MAX_PATH); - wcscat(szFileName, L"\\Fonts\\cour.ttf"); - - /* Test flags = 0 */ - SetLastError(ERROR_SUCCESS); - result = AddFontResourceExW(szFileName, 0, 0); - ok(result == 1, "AddFontResourceExW(L"", 0, 0) failed, result==%d\n", result); - ok(GetLastError() == ERROR_SUCCESS, "GetLastError()==%ld\n", GetLastError()); - - SetLastError(ERROR_SUCCESS); - result = AddFontResourceExW(szFileName, 256, 0); - ok(result == 0, "AddFontResourceExW(L"", 0, 0) failed, result==%d\n", result); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError()==%ld\n", GetLastError()); - - /* Test invalid pointer as last parameter */ - result = AddFontResourceExW(szFileName, 0, (void*)-1); - ok(result != 0, "AddFontResourceExW(L"", 0, 0) failed, result==%d\n", result); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError()==%ld\n", GetLastError()); - -} - -START_TEST(AddFontResourceEx) -{ - Test_AddFontResourceExW(); -} - diff --git a/rostests/apitests/gdi32/BeginPath.c b/rostests/apitests/gdi32/BeginPath.c deleted file mode 100644 index aba1201b014..00000000000 --- a/rostests/apitests/gdi32/BeginPath.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for BeginPath - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -void Test_BeginPath() -{ - HDC hdc; - BOOL ret; - - SetLastError(0); - ret = BeginPath(0); - ok(ret == 0, "BeginPath(0) succeeded, ret == %d\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError() == %ld\n", GetLastError()); - - hdc = CreateCompatibleDC(NULL); - - SetLastError(0); - ret = BeginPath(hdc); - ok(ret == 1, "BeginPath(hdc) failed, ret == %d\n", ret); - ok(GetLastError() == 0, "GetLastError() == %ld\n", GetLastError()); - - DeleteDC(hdc); - -} - -START_TEST(BeginPath) -{ - Test_BeginPath(); -} - diff --git a/rostests/apitests/gdi32/CMakeLists.txt b/rostests/apitests/gdi32/CMakeLists.txt deleted file mode 100644 index adda045ff80..00000000000 --- a/rostests/apitests/gdi32/CMakeLists.txt +++ /dev/null @@ -1,57 +0,0 @@ - -add_definitions(-D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - AddFontResource.c - AddFontResourceEx.c - BeginPath.c - CombineTransform.c - CreateBitmapIndirect.c - CreateCompatibleDC.c - CreateDIBitmap.c - CreateFont.c - CreateFontIndirect.c - CreatePen.c - CreateRectRgn.c - DPtoLP.c - EngAcquireSemaphore.c - EngCreateSemaphore.c - EngDeleteSemaphore.c - EngReleaseSemaphore.c - ExtCreatePen.c - GdiConvertBitmap.c - GdiConvertBrush.c - GdiConvertDC.c - GdiConvertFont.c - GdiConvertPalette.c - GdiConvertRegion.c - GdiDeleteLocalDC.c - GdiGetCharDimensions.c - GdiGetLocalBrush.c - GdiGetLocalDC.c - GdiReleaseLocalDC.c - GdiSetAttrs.c - GetClipRgn.c - GetCurrentObject.c - GetDIBits.c - GetObject.c - GetPixel.c - GetStockObject.c - GetTextExtentExPoint.c - GetTextFace.c - MaskBlt.c - Rectangle.c - SelectObject.c - SetDCPenColor.c - SetDIBits.c - SetMapMode.c - SetSysColors.c - SetWindowExtEx.c - SetWorldTransform.c - testlist.c) - -add_executable(gdi32_apitest ${SOURCE}) -target_link_libraries(gdi32_apitest wine ${PSEH_LIB}) -set_module_type(gdi32_apitest win32cui) -add_importlibs(gdi32_apitest gdi32 user32 msvcrt kernel32 ntdll) -add_cd_file(TARGET gdi32_apitest DESTINATION reactos/bin FOR all) diff --git a/rostests/apitests/gdi32/CombineTransform.c b/rostests/apitests/gdi32/CombineTransform.c deleted file mode 100644 index 84bb5347d69..00000000000 --- a/rostests/apitests/gdi32/CombineTransform.c +++ /dev/null @@ -1,212 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for CreatePen - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include -#include -#include -#include - -#define ok_int(x, y) ok(x == y, "Wrong value for " #x ", expected " #y ", got %ld\n", (long)x); -#define ok_flt(x, y) ok(x == y, "Wrong value for " #x ", expected " #y ", got %f\n", (double)x); - -#define ok_xform(xform, m11, m12, m21, m22, dx, dy) \ - ok_flt(xform.eM11, m11); \ - ok_flt(xform.eM12, m12); \ - ok_flt(xform.eM21, m21); \ - ok_flt(xform.eM22, m22); \ - ok_flt(xform.eDx, dx); \ - ok_flt(xform.eDy, dy); - -void Test_CombineTransform() -{ - XFORM xform1, xform2, xform3; - BOOL ret; - - /* Test NULL paramters */ - SetLastError(ERROR_SUCCESS); - ret = CombineTransform(&xform3, &xform1, NULL); - ok_int(ret, 0); - ret = CombineTransform(&xform3, NULL, &xform2); - ok_int(ret, 0); - ret = CombineTransform(NULL, &xform1, &xform2); - ok_int(ret, 0); - ret = CombineTransform(&xform3, &xform1, &xform2); - ok_int(ret, 0); - ok_int(GetLastError(), ERROR_SUCCESS); - - /* 2 Identity matrices */ - xform1.eM11 = 1.0; - xform1.eM12 = 0; - xform1.eM21 = 0; - xform1.eM22 = 1.0; - xform1.eDx = 0; - xform1.eDy = 0; - xform2 = xform1; - SetLastError(ERROR_SUCCESS); - ret = CombineTransform(&xform3, &xform1, &xform2); - ok_int(ret, 1); - ok_xform(xform3, 1.0, 0., 0., 1.0, 0., 0.); - ok_int(GetLastError(), ERROR_SUCCESS); - - /* 2 Identity matrices with offsets */ - xform1.eDx = 20.0; - xform1.eDy = -100; - ret = CombineTransform(&xform3, &xform1, &xform2); - ok_int(ret, 1); - ok_xform(xform3, 1.0, 0., 0., 1.0, 20.0, -100.0); - - xform2.eDx = -60.0; - xform2.eDy = -20; - ret = CombineTransform(&xform3, &xform1, &xform2); - ok_int(ret, 1); - ok_flt(xform3.eDx, -40.0); - ok_flt(xform3.eDy, -120.0); - - /* add some stretching */ - xform2.eM11 = 2; - xform2.eM22 = 4; - ret = CombineTransform(&xform3, &xform1, &xform2); - ok_int(ret, 1); - ok_xform(xform3, 2.0, 0., 0., 4.0, -20.0, -420.0); - - /* add some more stretching */ - xform1.eM11 = -2.5; - xform1.eM22 = 0.5; - ret = CombineTransform(&xform3, &xform1, &xform2); - ok_int(ret, 1); - ok_xform(xform3, -5.0, 0., 0., 2.0, -20.0, -420.0); - - xform1.eM12 = 2.0; - xform1.eM21 = -0.5; - ret = CombineTransform(&xform3, &xform1, &xform2); - ok_int(ret, 1); - ok_xform(xform3, -5.0, 8.0, -1.0, 2.0, -20.0, -420.0); - - xform2.eM12 = 4.0; - xform2.eM21 = 6.5; - ret = CombineTransform(&xform3, &xform1, &xform2); - ok_int(ret, 1); - ok_xform(xform3, 8.0, -2.0, 2.25, 0.0, -670.0, -340.0); - - xform1.eM11 = 1.; - xform1.eM12 = 0; - xform1.eM21 = 0; - xform1.eM22 = 1.; - xform1.eDx = 0; - xform1.eDy = 0; - xform2 = xform1; - - xform1.eDx = 4294967167.999999761; - ok(xform1.eDx == 4294967040.0, "float rounding error.\n"); - ret = CombineTransform(&xform3, &xform1, &xform2); - ok(ret == 1, "expected ret = 1, got %d\n", ret); - - xform1.eDx = 4294967167.999999762; - ok(xform1.eDx == 4294967296.0, "float rounding error.\n"); - ret = CombineTransform(&xform3, &xform1, &xform2); - ok_int(ret, 0); - ok_int(GetLastError(), ERROR_SUCCESS); - - xform1.eDx = -4294967167.999999761; - ok(xform1.eDx == -4294967040.0, "float rounding error.\n"); - ret = CombineTransform(&xform3, &xform1, &xform2); - ok_int(ret, 1); - - xform1.eDx = -4294967167.999999762; - ok(xform1.eDx == -4294967296.0, "float rounding error.\n"); - ret = CombineTransform(&xform3, &xform1, &xform2); - ok_int(ret, 0); - ok_int(GetLastError(), ERROR_SUCCESS); - - xform1.eDx = 0; - xform1.eDy = 4294967167.999999761; - ok(xform1.eDy == 4294967040.0, "float rounding error.\n"); - ret = CombineTransform(&xform3, &xform1, &xform2); - ok_int(ret, 1); - - xform2.eDy = 1; - ret = CombineTransform(&xform3, &xform1, &xform2); - ok_int(ret, 1); - - xform1.eDy = 4294967167.999999762; - ok(xform1.eDy == 4294967296.0, "float rounding error.\n"); - ret = CombineTransform(&xform3, &xform1, &xform2); - ok_int(ret, 0); - ok_int(GetLastError(), ERROR_SUCCESS); - - xform1.eDy = -4294967167.999999761; - ok(xform1.eDy == -4294967040.0, "float rounding error.\n"); - ret = CombineTransform(&xform3, &xform1, &xform2); - ok_int(ret, 1); - - xform1.eDy = -4294967167.999999762; - ok(xform1.eDy == -4294967296.0, "float rounding error.\n"); - ret = CombineTransform(&xform3, &xform1, &xform2); - ok_int(ret, 0); - ok_int(GetLastError(), ERROR_SUCCESS); - - xform2.eDy = 10000; - ret = CombineTransform(&xform3, &xform1, &xform2); - ok_int(ret, 1); - - xform1.eDx = -4294967167.999999762; - xform1.eM11 = 1000.0; - xform2.eM11 = 1000.0; - ret = CombineTransform(&xform3, &xform1, &xform2); - ok_int(ret, 0); - ok_int(GetLastError(), ERROR_SUCCESS); - - xform1.eDx = 100000.0; - xform2.eM11 = 100000.0; - ret = CombineTransform(&xform3, &xform1, &xform2); - ok_int(ret, 0); - ok_int(GetLastError(), ERROR_SUCCESS); - - /* Some undefined values */ - *(DWORD*)&xform1.eM11 = 0xffc00000; // (0.0F/0.0F) - xform1.eM12 = 0; - xform1.eM21 = 0; - *(DWORD*)&xform1.eM22 = 0x7f800000; // (1.0F/0.0F) - xform1.eDx = 0; - xform1.eDy = 0; - xform2 = xform1; - SetLastError(ERROR_SUCCESS); - ret = CombineTransform(&xform3, &xform1, &xform2); - ok_int(ret, 1); - ok(*(DWORD*)&xform3.eM11 == 0xffc00000, "eM11: Expected 0xffc00000, got 0x%lx\n", *(DWORD*)&xform3.eM11); - ok(xform3.eM12 == 0, "eM12: Expected 0, got %f\n", xform3.eM12); - ok(xform3.eM21 == 0, "eM21: Expected 0, got %f\n", xform3.eM21); - ok(*(DWORD*)&xform3.eM22 == 0x7f800000, "eM22: Expected 0x7f800000, got 0x%lx\n", *(DWORD*)&xform3.eM22); - ok(xform3.eDx == 0, "eDx: Expected 0, got %f\n", xform3.eDx); - ok(xform3.eDy == 0, "eDy: Expected 0, got %f\n", xform3.eDy); - ok_int(GetLastError(), ERROR_SUCCESS); - - /* Some undefined values */ - xform2.eM11 = 1.; - xform2.eM22 = 1.; - xform2.eM12 = 1.; - xform2.eM21 = 1.; - ret = CombineTransform(&xform3, &xform1, &xform2); - ok_int(ret, 1); - - ok_int(*(DWORD*)&xform3.eM11, 0xffc00000); - ok_int(*(DWORD*)&xform3.eM12, 0xffc00000); - ok_int(*(DWORD*)&xform3.eM21, 0x7f800000); - ok_int(*(DWORD*)&xform3.eM22, 0x7f800000); - ok(xform3.eDx == 0, "eDx: Expected 0, got %f\n", xform3.eDx); - ok(xform3.eDy == 0, "eDy: Expected 0, got %f\n", xform3.eDy); - ok_int(GetLastError(), ERROR_SUCCESS); - -} - -START_TEST(CombineTransform) -{ - Test_CombineTransform(); -} - diff --git a/rostests/apitests/gdi32/CreateBitmapIndirect.c b/rostests/apitests/gdi32/CreateBitmapIndirect.c deleted file mode 100644 index 361590b3af1..00000000000 --- a/rostests/apitests/gdi32/CreateBitmapIndirect.c +++ /dev/null @@ -1,80 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for CreateBitmapIndirect - * PROGRAMMERS: Magnus Olsen - */ - -#include -#include -#include - -void Test_CreateBitmapIndirect() -{ - HBITMAP win_hBmp; - BITMAP win_bitmap; - - win_bitmap.bmBits = 0; - win_bitmap.bmBitsPixel = 1; - win_bitmap.bmHeight = 0; - win_bitmap.bmPlanes = 1; - win_bitmap.bmType = 1; - win_bitmap.bmWidth = 0; - win_bitmap.bmWidthBytes = 2; - win_hBmp = CreateBitmapIndirect(&win_bitmap); - ok(win_hBmp != 0, "CreateBitmapIndirect failed\n"); - - DeleteObject(win_hBmp); - - RtlZeroMemory(&win_bitmap,sizeof(BITMAP)); - win_bitmap.bmBits = 0; - win_bitmap.bmBitsPixel = 1; - win_bitmap.bmHeight = 0; - win_bitmap.bmPlanes = 1; - win_bitmap.bmType = 1; - win_bitmap.bmWidth = 0; - win_bitmap.bmWidthBytes = 1; - win_hBmp = CreateBitmapIndirect(&win_bitmap); - ok(win_hBmp == 0, "CreateBitmapIndirect succeeded\n"); - - RtlZeroMemory(&win_bitmap,sizeof(BITMAP)); - win_bitmap.bmBits = 0; - win_bitmap.bmBitsPixel = 1; - win_bitmap.bmHeight = 0; - win_bitmap.bmPlanes = 1; - win_bitmap.bmType = 1; - win_bitmap.bmWidth = 0; - win_bitmap.bmWidthBytes = 3; - win_hBmp = CreateBitmapIndirect(&win_bitmap); - ok(win_hBmp == 0, "CreateBitmapIndirect succeeded\n"); - - RtlZeroMemory(&win_bitmap,sizeof(BITMAP)); - win_bitmap.bmBits = 0; - win_bitmap.bmBitsPixel = 1; - win_bitmap.bmHeight = 0; - win_bitmap.bmPlanes = 1; - win_bitmap.bmType = 1; - win_bitmap.bmWidth = 0; - win_bitmap.bmWidthBytes = 4; - win_hBmp = CreateBitmapIndirect(&win_bitmap); - ok(win_hBmp != 0, "CreateBitmapIndirect failed\n"); - - RtlZeroMemory(&win_bitmap,sizeof(BITMAP)); - win_bitmap.bmBits = 0; - win_bitmap.bmBitsPixel = 8; - win_bitmap.bmHeight = 0xF000; - win_bitmap.bmPlanes = 1; - win_bitmap.bmType = 1; - win_bitmap.bmWidth = 0x8000; - win_bitmap.bmWidthBytes = win_bitmap.bmWidth; - win_hBmp = CreateBitmapIndirect(&win_bitmap); - ok(win_hBmp != 0, "CreateBitmapIndirect failed\n"); - - DeleteObject(win_hBmp); -} - -START_TEST(CreateBitmapIndirect) -{ - Test_CreateBitmapIndirect(); -} - diff --git a/rostests/apitests/gdi32/CreateCompatibleDC.c b/rostests/apitests/gdi32/CreateCompatibleDC.c deleted file mode 100644 index 59c66df6493..00000000000 --- a/rostests/apitests/gdi32/CreateCompatibleDC.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for CreateCompatibleDC - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -void Test_CreateCompatibleDC() -{ - HDC hdcScreen, hOldDC, hdc, hdc2; - HPEN hOldPen; - COLORREF color; - - /* Get screen DC */ - hdcScreen = GetDC(NULL); - - /* Test NULL DC handle */ - SetLastError(ERROR_SUCCESS); - hdc = CreateCompatibleDC(NULL); - ok(hdc != NULL, "CreateCompatibleDC(NULL) failed\n"); - ok(GetLastError() == ERROR_SUCCESS, "GetLastError() == %ld\n", GetLastError()); - if(hdc) DeleteDC(hdc); - - /* Test invalid DC handle */ - SetLastError(ERROR_SUCCESS); - hdc = CreateCompatibleDC((HDC)0x123456); - ok(hdc == NULL, "Expected NULL, got %p\n", hdc); - ok(GetLastError() == ERROR_SUCCESS, "GetLastError() == %ld\n", GetLastError()); - if(hdc) DeleteDC(hdc); - - hdc = CreateCompatibleDC(hdcScreen); - ok(hdc != NULL, "CreateCompatibleDC failed\n"); - - // Test if first selected pen is BLACK_PEN (? or same as screen DC's pen?) - hOldPen = SelectObject(hdc, GetStockObject(DC_PEN)); - ok (hOldPen == GetStockObject(BLACK_PEN), "hOldPen == %p\n", hOldPen); - hOldPen = SelectObject(hdc, GetStockObject(BLACK_PEN)); - ok (hOldPen == GetStockObject(DC_PEN), "hOldPen == %p\n", hOldPen); - - /* Test for the starting Color == RGB(0,0,0) */ - color = SetDCPenColor(hdc, RGB(1,2,3)); - ok(color == RGB(0,0,0), "color == %lx\n", color); - - /* Check for reuse counter */ - hOldDC = hdc; - DeleteDC(hdc); - hdc = CreateCompatibleDC(hdcScreen); - hdc2 = CreateCompatibleDC(hOldDC); - ok(hdc2 == NULL, "Expected NULL, got %p\n", hdc); - if (hdc2 != NULL) DeleteDC(hdc2); - - /* Check map mode */ - hdc = CreateCompatibleDC(hdcScreen); - SetMapMode(hdc, MM_ISOTROPIC); - hdc2 = CreateCompatibleDC(hdc); - ok(GetMapMode(hdc2) == MM_TEXT, "GetMapMode(hdc2)==%d\n", GetMapMode(hdc2)); - - /* cleanup */ - DeleteDC(hdc); - - ReleaseDC(NULL, hdcScreen); -} - -START_TEST(CreateCompatibleDC) -{ - Test_CreateCompatibleDC(); -} - diff --git a/rostests/apitests/gdi32/CreateDIBitmap.c b/rostests/apitests/gdi32/CreateDIBitmap.c deleted file mode 100644 index 3da8b676fd7..00000000000 --- a/rostests/apitests/gdi32/CreateDIBitmap.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for CreateDIBitmap - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -void -Test_CreateDIBitmap1(void) -{ - BITMAPINFO bmi; - HBITMAP hbmp; - BITMAP bitmap; - ULONG bits[128] = {0}; - BYTE rlebits[] = {2, 0, 0, 0, 2, 1, 0, 1}; - HDC hdc; - int ret; - - hdc = GetDC(0); - - bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bmi.bmiHeader.biWidth = 2; - bmi.bmiHeader.biHeight = 2; - bmi.bmiHeader.biPlanes = 1; - bmi.bmiHeader.biBitCount = 16; - bmi.bmiHeader.biCompression = BI_RGB; - bmi.bmiHeader.biSizeImage = 0; - bmi.bmiHeader.biXPelsPerMeter = 1; - bmi.bmiHeader.biYPelsPerMeter = 1; - bmi.bmiHeader.biClrUsed = 0; - bmi.bmiHeader.biClrImportant = 0; - - hbmp = CreateDIBitmap(hdc, &bmi.bmiHeader, CBM_INIT, bits, &bmi, DIB_RGB_COLORS); - ok(hbmp != 0, "failed\n"); - - ret = GetObject(hbmp, sizeof(bitmap), &bitmap); - ok(ret != 0, "failed\n"); - ok(bitmap.bmType == 0, "\n"); - ok(bitmap.bmWidth == 2, "\n"); - ok(bitmap.bmHeight == 2, "\n"); - ok(bitmap.bmWidthBytes == 8, "bmWidthBytes = %ld\n", bitmap.bmWidthBytes); - ok(bitmap.bmPlanes == 1, "\n"); - ok(bitmap.bmBitsPixel == GetDeviceCaps(hdc, BITSPIXEL), "\n"); - ok(bitmap.bmBits == 0, "\n"); - - SetLastError(0); - bmi.bmiHeader.biCompression = BI_RLE8; - bmi.bmiHeader.biBitCount = 8; - bmi.bmiHeader.biSizeImage = 8; - hbmp = CreateDIBitmap(hdc, &bmi.bmiHeader, CBM_INIT, rlebits, &bmi, DIB_RGB_COLORS); - ok(hbmp != 0, "failed\n"); - ok(GetLastError() == 0, "GetLastError() == %ld\n", GetLastError()); - - ret = GetObject(hbmp, sizeof(bitmap), &bitmap); - ok(ret != 0, "failed\n"); - ok(bitmap.bmType == 0, "\n"); - ok(bitmap.bmWidth == 2, "\n"); - ok(bitmap.bmHeight == 2, "\n"); - ok(bitmap.bmWidthBytes == 8, "bmWidthBytes = %ld\n", bitmap.bmWidthBytes); - ok(bitmap.bmPlanes == 1, "\n"); - ok(bitmap.bmBitsPixel == GetDeviceCaps(hdc, BITSPIXEL), "\n"); - ok(bitmap.bmBits == 0, "\n"); - - -} - - - -START_TEST(CreateDIBitmap) -{ - Test_CreateDIBitmap1(); -} - diff --git a/rostests/apitests/gdi32/CreateFont.c b/rostests/apitests/gdi32/CreateFont.c deleted file mode 100644 index 3c77eef52ba..00000000000 --- a/rostests/apitests/gdi32/CreateFont.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for CreateFont - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -#define INVALIDFONT "ThisFontDoesNotExist" - -void Test_CreateFontA() -{ - HFONT hFont; - LOGFONTA logfonta; - INT result; - - /* Test invalid font name */ - hFont = CreateFontA(15, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, - DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, - DEFAULT_QUALITY, DEFAULT_PITCH, INVALIDFONT); - ok(hFont != 0, "CreateFontA failed\n"); - - result = GetObjectA(hFont, sizeof(LOGFONTA), &logfonta); - ok(result == sizeof(LOGFONTA), "result = %d", result); - - ok(memcmp(logfonta.lfFaceName, INVALIDFONT, strlen(INVALIDFONT)) == 0, "not equal\n"); - ok(logfonta.lfWeight == FW_DONTCARE, "lfWeight=%ld\n", logfonta.lfWeight); - -} - -START_TEST(CreateFont) -{ - Test_CreateFontA(); -} - diff --git a/rostests/apitests/gdi32/CreateFontIndirect.c b/rostests/apitests/gdi32/CreateFontIndirect.c deleted file mode 100644 index cac0a933567..00000000000 --- a/rostests/apitests/gdi32/CreateFontIndirect.c +++ /dev/null @@ -1,179 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for CreateFontIndirect - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - - -void -Test_CreateFontIndirectA(void) -{ - LOGFONTA logfont; - HFONT hFont; - ULONG ret; - ENUMLOGFONTEXDVW elfedv2; - - logfont.lfHeight = 12; - logfont.lfWidth = 0; - logfont.lfEscapement = 0; - logfont.lfOrientation = 0; - logfont.lfWeight = FW_NORMAL; - logfont.lfItalic = 0; - logfont.lfUnderline = 0; - logfont.lfStrikeOut = 0; - logfont.lfCharSet = DEFAULT_CHARSET; - logfont.lfOutPrecision = OUT_DEFAULT_PRECIS; - logfont.lfClipPrecision = CLIP_DEFAULT_PRECIS; - logfont.lfQuality = PROOF_QUALITY; - logfont.lfPitchAndFamily = DEFAULT_PITCH; - memset(logfont.lfFaceName, 'A', LF_FACESIZE); - hFont = CreateFontIndirectA(&logfont); - ok(hFont != 0, "CreateFontIndirectA failed\n"); - - memset(&elfedv2, 0, sizeof(elfedv2)); - ret = GetObjectW(hFont, sizeof(elfedv2), &elfedv2); - ok(ret == sizeof(ENUMLOGFONTEXW) + 2*sizeof(DWORD), "ret = %ld\n", ret); - ok(elfedv2.elfEnumLogfontEx.elfLogFont.lfFaceName[LF_FACESIZE-1] == 0, "\n"); - ok(elfedv2.elfEnumLogfontEx.elfFullName[0] == 0, "\n"); -} - -void -Test_CreateFontIndirectW(void) -{ - LOGFONTW logfont; - HFONT hFont; - ULONG ret; - ENUMLOGFONTEXDVW elfedv2; - - logfont.lfHeight = 12; - logfont.lfWidth = 0; - logfont.lfEscapement = 0; - logfont.lfOrientation = 0; - logfont.lfWeight = FW_NORMAL; - logfont.lfItalic = 0; - logfont.lfUnderline = 0; - logfont.lfStrikeOut = 0; - logfont.lfCharSet = DEFAULT_CHARSET; - logfont.lfOutPrecision = OUT_DEFAULT_PRECIS; - logfont.lfClipPrecision = CLIP_DEFAULT_PRECIS; - logfont.lfQuality = PROOF_QUALITY; - logfont.lfPitchAndFamily = DEFAULT_PITCH; - memset(logfont.lfFaceName, 'A', LF_FACESIZE * 2); - hFont = CreateFontIndirectW(&logfont); - ok(hFont != 0, "CreateFontIndirectW failed\n"); - - memset(&elfedv2, 0, sizeof(elfedv2)); - ret = GetObjectW(hFont, sizeof(elfedv2), &elfedv2); - ok(ret == sizeof(ENUMLOGFONTEXW) + 2*sizeof(DWORD), "\n"); - ok(elfedv2.elfEnumLogfontEx.elfLogFont.lfFaceName[LF_FACESIZE-1] == ((WCHAR)'A' << 8) + 'A', "\n"); - ok(elfedv2.elfEnumLogfontEx.elfFullName[0] == 0, "\n"); - /* Theres a bunch of data in elfFullName ... */ -} - -void -Test_CreateFontIndirectExA(void) -{ - ENUMLOGFONTEXDVA elfedva, elfedva2; - ENUMLOGFONTEXDVW elfedvw; - ENUMLOGFONTEXA *penumlfa; - LOGFONTA *plogfonta; - HFONT hFont; - ULONG ret; - - memset(&elfedva, 0, sizeof(elfedva)); - penumlfa = &elfedva.elfEnumLogfontEx; - plogfonta = &elfedva.elfEnumLogfontEx.elfLogFont; - - plogfonta->lfHeight = 12; - plogfonta->lfWidth = 0; - plogfonta->lfEscapement = 0; - plogfonta->lfOrientation = 0; - plogfonta->lfWeight = FW_NORMAL; - plogfonta->lfItalic = 0; - plogfonta->lfUnderline = 0; - plogfonta->lfStrikeOut = 0; - plogfonta->lfCharSet = DEFAULT_CHARSET; - plogfonta->lfOutPrecision = OUT_DEFAULT_PRECIS; - plogfonta->lfClipPrecision = CLIP_DEFAULT_PRECIS; - plogfonta->lfQuality = PROOF_QUALITY; - plogfonta->lfPitchAndFamily = DEFAULT_PITCH; - - memset(plogfonta->lfFaceName, 'A', LF_FACESIZE * sizeof(WCHAR)); - memset(penumlfa->elfFullName, 'B', LF_FULLFACESIZE * sizeof(WCHAR)); - - hFont = CreateFontIndirectExA(&elfedva); - ok(hFont != 0, "CreateFontIndirectExA failed\n"); - - ret = GetObjectW(hFont, sizeof(elfedvw), &elfedvw); - ok(ret == sizeof(ENUMLOGFONTEXW) + 2*sizeof(DWORD), "\n"); - ok(elfedvw.elfEnumLogfontEx.elfLogFont.lfFaceName[LF_FACESIZE-1] == 0, "\n"); - ok(elfedvw.elfEnumLogfontEx.elfFullName[LF_FULLFACESIZE-1] == 0, "\n"); - - memset(&elfedva2, 0, sizeof(elfedva2)); - ret = GetObjectA(hFont, sizeof(elfedva2), &elfedva2); - ok(ret == sizeof(ENUMLOGFONTEXDVA), "ret = %ld\n", ret); - ok(elfedva2.elfEnumLogfontEx.elfLogFont.lfFaceName[LF_FACESIZE-1] == 0, "\n"); - ok(elfedva2.elfEnumLogfontEx.elfFullName[LF_FULLFACESIZE-1] == 0, "\n"); -} - -void -Test_CreateFontIndirectExW(void) -{ - ENUMLOGFONTEXDVW elfedv, elfedv2; - ENUMLOGFONTEXDVA elfedva; - ENUMLOGFONTEXW *penumlfw; - LOGFONTW *plogfontw; - HFONT hFont; - ULONG ret; - - memset(&elfedv, 0, sizeof(elfedv)); - penumlfw = &elfedv.elfEnumLogfontEx; - plogfontw = &elfedv.elfEnumLogfontEx.elfLogFont; - - plogfontw->lfHeight = 12; - plogfontw->lfWidth = 0; - plogfontw->lfEscapement = 0; - plogfontw->lfOrientation = 0; - plogfontw->lfWeight = FW_NORMAL; - plogfontw->lfItalic = 0; - plogfontw->lfUnderline = 0; - plogfontw->lfStrikeOut = 0; - plogfontw->lfCharSet = DEFAULT_CHARSET; - plogfontw->lfOutPrecision = OUT_DEFAULT_PRECIS; - plogfontw->lfClipPrecision = CLIP_DEFAULT_PRECIS; - plogfontw->lfQuality = PROOF_QUALITY; - plogfontw->lfPitchAndFamily = DEFAULT_PITCH; - - memset(plogfontw->lfFaceName, 'A', LF_FACESIZE * sizeof(WCHAR)); - memset(penumlfw->elfFullName, 'B', LF_FULLFACESIZE * sizeof(WCHAR)); - - hFont = CreateFontIndirectExW(&elfedv); - ok(hFont != 0, "CreateFontIndirectExW failed\n"); - - memset(&elfedv2, 0, sizeof(elfedv2)); - ret = GetObjectW(hFont, sizeof(elfedv2), &elfedv2); - ok(ret == sizeof(ENUMLOGFONTEXW) + 2*sizeof(DWORD), "\n"); - ok(elfedv2.elfEnumLogfontEx.elfLogFont.lfFaceName[LF_FACESIZE-1] == ((WCHAR)'A' << 8) + 'A', "\n"); - ok(elfedv2.elfEnumLogfontEx.elfFullName[LF_FULLFACESIZE-1] == ((WCHAR)'B' << 8) + 'B', "\n"); - - memset(&elfedva, 0, sizeof(elfedva)); - ret = GetObjectA(hFont, sizeof(elfedva), &elfedva); - ok(ret == sizeof(ENUMLOGFONTEXDVA), "\n"); - ok(elfedva.elfEnumLogfontEx.elfLogFont.lfFaceName[LF_FACESIZE-1] == '?', "\n"); - ok(elfedva.elfEnumLogfontEx.elfFullName[LF_FULLFACESIZE-1] == 0, "\n"); -} - - -START_TEST(CreateFontIndirect) -{ - Test_CreateFontIndirectA(); - Test_CreateFontIndirectW(); - Test_CreateFontIndirectExA(); - Test_CreateFontIndirectExW(); -} - diff --git a/rostests/apitests/gdi32/CreatePen.c b/rostests/apitests/gdi32/CreatePen.c deleted file mode 100644 index 2c791569b85..00000000000 --- a/rostests/apitests/gdi32/CreatePen.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for CreatePen - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include -#include -#include -#include - -void Test_CreatePen() -{ - HPEN hPen; - LOGPEN logpen; - - SetLastError(ERROR_SUCCESS); - hPen = CreatePen(PS_DASHDOT, 5, RGB(1,2,3)); - ok(hPen != 0, "CreatePen failed\n"); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); - - /* Test if we have a PEN */ - ok(GDI_HANDLE_GET_TYPE(hPen) == GDI_OBJECT_TYPE_PEN, "Expected GDI_OBJECT_TYPE_PEN, got %lu\n", GDI_HANDLE_GET_TYPE(hPen)); - - ok(GetObject(hPen, sizeof(logpen), &logpen), "GetObject failed\n"); - ok(logpen.lopnStyle == PS_DASHDOT, "Expected PS_DASHDOT, got %u\n", logpen.lopnStyle); - ok(logpen.lopnWidth.x == 5, "Expected 5, got %lu\n", logpen.lopnWidth.x); - ok(logpen.lopnColor == RGB(1,2,3), "Expected %x, got %x\n", (unsigned)RGB(1,2,3), (unsigned)logpen.lopnColor); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); - if(hPen) - ok(DeleteObject(hPen), "DeleteObject failed\n"); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); - - /* PS_GEOMETRIC | PS_DASHDOT = 0x00001011 will become PS_SOLID */ - SetLastError(ERROR_SUCCESS); - logpen.lopnStyle = 22; - hPen = CreatePen(PS_GEOMETRIC | PS_DASHDOT, 5, RGB(1,2,3)); - ok(hPen != 0, "CreatePen failed\n"); - ok(GetObject(hPen, sizeof(logpen), &logpen), "GetObject failed\n"); - ok(logpen.lopnStyle == PS_SOLID, "Expected PS_SOLID, got %u\n", logpen.lopnStyle); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); - if(hPen) - ok(DeleteObject(hPen), "DeleteObject failed\n"); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); - - /* PS_USERSTYLE will become PS_SOLID */ - logpen.lopnStyle = 22; - SetLastError(ERROR_SUCCESS); - hPen = CreatePen(PS_USERSTYLE, 5, RGB(1,2,3)); - ok(hPen != 0, "CreatePen failed\n"); - ok(GetObject(hPen, sizeof(logpen), &logpen), "GetObject failed\n"); - ok(logpen.lopnStyle == PS_SOLID, "Expected PS_SOLID, got %u\n", logpen.lopnStyle); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); - if(hPen) - ok(DeleteObject(hPen), "DeleteObject failed\n"); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); - - /* PS_ALTERNATE will become PS_SOLID */ - logpen.lopnStyle = 22; - SetLastError(ERROR_SUCCESS); - hPen = CreatePen(PS_ALTERNATE, 5, RGB(1,2,3)); - ok(hPen != 0, "CreatePen failed\n"); - ok(GetObject(hPen, sizeof(logpen), &logpen), "GetObject failed\n"); - ok(logpen.lopnStyle == PS_SOLID, "Expected PS_SOLID, got %u\n", logpen.lopnStyle); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); - if(hPen) - ok(DeleteObject(hPen), "DeleteObject failed\n"); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); - - /* PS_INSIDEFRAME is ok */ - logpen.lopnStyle = 22; - SetLastError(ERROR_SUCCESS); - hPen = CreatePen(PS_INSIDEFRAME, 5, RGB(1,2,3)); - ok(hPen != 0, "CreatePen failed\n"); - ok(GetObject(hPen, sizeof(logpen), &logpen), "GetObject failed\n"); - ok(logpen.lopnStyle == PS_INSIDEFRAME, "Expected PS_INSIDEFRAME, got %u\n", logpen.lopnStyle); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); - if(hPen) - ok(DeleteObject(hPen), "DeleteObject failed\n"); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); -} - -START_TEST(CreatePen) -{ - Test_CreatePen(); -} - diff --git a/rostests/apitests/gdi32/CreateRectRgn.c b/rostests/apitests/gdi32/CreateRectRgn.c deleted file mode 100644 index 3f5c70b80f1..00000000000 --- a/rostests/apitests/gdi32/CreateRectRgn.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for CreateRectRgn - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -void Test_CreateRectRgn() -{ - -} - -START_TEST(CreateRectRgn) -{ - Test_CreateRectRgn(); -} - diff --git a/rostests/apitests/gdi32/DPtoLP.c b/rostests/apitests/gdi32/DPtoLP.c deleted file mode 100644 index 5ad6427a6e2..00000000000 --- a/rostests/apitests/gdi32/DPtoLP.c +++ /dev/null @@ -1,191 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for ... - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -#define ok_int(x, y) ok(x == y, "Wrong value for " #x ", expected " #y ", got %ld\n", (long)x); - -void Test_DPtoLP_Params() -{ - BOOL ret; - HDC hdc; - POINT apt[2]; - - apt[0].x = 0; - apt[0].y = 0; - apt[1].x = -1000; - apt[1].y = 1000; - - SetLastError(ERROR_SUCCESS); - ret = DPtoLP(NULL, NULL, 0); - ok(ret == 1, "Expected ret == 1, got %d\n", ret); - ok(GetLastError() == ERROR_SUCCESS, "Exected ERROR_SUCCESS, got %ld\n", GetLastError()); - - ret = DPtoLP(NULL, NULL, -1); - ok(ret == 1, "Expected ret == 1, got %d\n", ret); - ok(GetLastError() == ERROR_SUCCESS, "Exected ERROR_SUCCESS, got %ld\n", GetLastError()); - - ret = DPtoLP(NULL, (PVOID)0x80000000, -1); - ok(ret == 1, "Expected ret == 1, got %d\n", ret); - ok(GetLastError() == ERROR_SUCCESS, "Exected ERROR_SUCCESS, got %ld\n", GetLastError()); - - ret = DPtoLP(NULL, NULL, 2); - ok(ret == 0, "Expected ret == 0, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Exected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); - - SetLastError(ERROR_SUCCESS); - ret = DPtoLP(NULL, apt, 2); - ok(ret == 0, "Expected ret == 0, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Exected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); - - SetLastError(ERROR_SUCCESS); - ret = DPtoLP(NULL, apt, 0); - ok(ret == 1, "Expected ret == 1, got %d\n", ret); - ok(GetLastError() == ERROR_SUCCESS, "Exected ERROR_SUCCESS, got %ld\n", GetLastError()); - - SetLastError(ERROR_SUCCESS); - ret = DPtoLP(NULL, apt, -2); - ok(ret == 1, "Expected ret == 1, got %d\n", ret); - ok(GetLastError() == ERROR_SUCCESS, "Exected ERROR_SUCCESS, got %ld\n", GetLastError()); - - SetLastError(ERROR_SUCCESS); - ret = DPtoLP((HDC)-4, apt, -2); - ok(ret == 1, "Expected ret == 1, got %d\n", ret); - ok(GetLastError() == ERROR_SUCCESS, "Exected ERROR_SUCCESS, got %ld\n", GetLastError()); - - hdc = GetDC(0); - SetLastError(ERROR_SUCCESS); - ret = DPtoLP(hdc, NULL, 2); - ok(ret == 1, "Expected ret == 1, got %d\n", ret); - ok(GetLastError() == ERROR_SUCCESS, "Exected ERROR_SUCCESS, got %ld\n", GetLastError()); - - hdc = GetDC(0); - SetLastError(ERROR_SUCCESS); - ret = DPtoLP(hdc, (PVOID)0x80000000, 2); - ok(ret == 1, "Expected ret == 1, got %d\n", ret); - ok(GetLastError() == ERROR_SUCCESS, "Exected ERROR_SUCCESS, got %ld\n", GetLastError()); - - - ReleaseDC(0, hdc); -} - -void Test_DPtoLP() -{ - BOOL ret; - HDC hdc; - POINT apt[2]; - XFORM xform; - - apt[0].x = 1; - apt[0].y = 1; - apt[1].x = -1000; - apt[1].y = 1000; - - hdc = GetDC(0); - - SetMapMode(hdc, MM_TEXT); - ret = DPtoLP(hdc, apt, 2); - ok(ret == 1, "Expected ret == 1, got %d\n", ret); - ok_int(apt[0].x, 1); - ok_int(apt[0].y, 1); - ok_int(apt[1].x, -1000); - ok_int(apt[1].y, 1000); - - SetMapMode(hdc, MM_LOMETRIC); - ret = DPtoLP(hdc, apt, 2); - ok(ret == 1, "Expected ret == 1, got %d\n", ret); - ok_int(apt[0].x, 4); - ok_int(apt[0].y, -4); - ok_int(apt[1].x, -3527); - ok_int(apt[1].y, -3527); - - SetGraphicsMode(hdc, GM_ADVANCED); - SetMapMode(hdc, MM_ANISOTROPIC); - - xform.eM11 = 1.; - xform.eM12 = 0.; - xform.eM21 = 0.; - xform.eM22 = 1.; - xform.eDx = 4294967167.999999761; - xform.eDy = 1.; - ret = SetWorldTransform(hdc, &xform); - ok(ret == 1, "ret\n"); - - ret = DPtoLP(hdc, apt, 2); - ok(ret == 1, "Expected ret == 0, got %d\n", ret); - ok_int(apt[0].x, 526); - ok_int(apt[0].y, 13); - ok_int(apt[1].x, -11929); - ok_int(apt[1].y, 12440); - - xform.eM11 = 10000000.; - ret = SetWorldTransform(hdc, &xform); - ret = DPtoLP(hdc, apt, 2); - ok(ret == 1, "Expected ret == 0, got %d\n", ret); - ok_int(apt[0].x, -429); - ok_int(apt[0].y, -47); - ok_int(apt[1].x, -429); - ok_int(apt[1].y, -43881); - - xform.eM11 = 1.; - xform.eDx = 4294967167.999999762; // this is too big - ret = SetWorldTransform(hdc, &xform); - ok(ret == 1, "ret\n"); - ret = DPtoLP(hdc, apt, 2); - ok(ret == 0, "Expected ret == 0, got %d\n", ret); - ok_int(apt[0].x, -429); - ok_int(apt[0].y, -47); - ok_int(apt[1].x, -429); - ok_int(apt[1].y, -43881); - - xform.eM11 = 2.; - xform.eDx = 4294967167.999999762; - ret = SetWorldTransform(hdc, &xform); - ok(ret == 1, "ret\n"); - ret = DPtoLP(hdc, apt, 2); - ok(ret == 1, "Expected ret == 1, got %d\n", ret); - ok_int(apt[0].x, 2147482891); - ok_int(apt[0].y, 165); - ok_int(apt[1].x, 2147482891); - ok_int(apt[1].y, 154782); - - apt[0].x = 1; - apt[0].y = 1; - apt[1].x = -1000; - apt[1].y = 1000; - - xform.eM11 = 10000000.; - ret = SetWorldTransform(hdc, &xform); - ok(ret == 1, "ret\n"); - ret = DPtoLP(hdc, apt, 2); - ok(ret == 1, "Expected ret == 1, got %d\n", ret); - ok_int(apt[0].x, -429); - ok_int(apt[0].y, -5); - ok_int(apt[1].x, -429); - ok_int(apt[1].y, -3528); - - xform.eM11 = 1000000.; - ret = SetWorldTransform(hdc, &xform); - ok(ret == 1, "ret\n"); - ret = DPtoLP(hdc, apt, 2); - ok(ret == 1, "Expected ret == 1, got %d\n", ret); - ok_int(apt[0].x, -4295); - ok_int(apt[0].y, 17); - ok_int(apt[1].x, -4295); - ok_int(apt[1].y, 12443); - - ReleaseDC(0, hdc); -} - -START_TEST(DPtoLP) -{ - Test_DPtoLP_Params(); - Test_DPtoLP(); -} - diff --git a/rostests/apitests/gdi32/EngAcquireSemaphore.c b/rostests/apitests/gdi32/EngAcquireSemaphore.c deleted file mode 100644 index 9dea204121a..00000000000 --- a/rostests/apitests/gdi32/EngAcquireSemaphore.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for EngAcquireSemaphore - * PROGRAMMERS: Magnus Olsen - */ - -#include -#include -#include -#include - -void Test_EngAcquireSemaphore() -{ - HSEMAPHORE hsem; - PRTL_CRITICAL_SECTION lpcrit; - - hsem = EngCreateSemaphore(); - ok(hsem != NULL, "EngCreateSemaphore failed\n"); - if (!hsem) return; - lpcrit = (PRTL_CRITICAL_SECTION)hsem; - - /* real data test */ - EngAcquireSemaphore(hsem); -// ok(lpcrit->LockCount == -2); doesn't work on XP - ok(lpcrit->RecursionCount == 1, "lpcrit->RecursionCount=%ld\n", lpcrit->RecursionCount); - ok(lpcrit->OwningThread != 0, "lpcrit->OwningThread=%p\n", lpcrit->OwningThread); - ok(lpcrit->LockSemaphore == 0, "lpcrit->LockSemaphore=%p\n", lpcrit->LockSemaphore); - ok(lpcrit->SpinCount == 0, "lpcrit->SpinCount=%ld\n", lpcrit->SpinCount); - - ok(lpcrit->DebugInfo != NULL, "no DebugInfo\n"); - if (lpcrit->DebugInfo) - { - ok(lpcrit->DebugInfo->Type == 0, "DebugInfo->Type=%d\n", lpcrit->DebugInfo->Type); - ok(lpcrit->DebugInfo->CreatorBackTraceIndex == 0, "DebugInfo->CreatorBackTraceIndex=%d\n", lpcrit->DebugInfo->CreatorBackTraceIndex); - ok(lpcrit->DebugInfo->EntryCount == 0, "DebugInfo->EntryCount=%ld\n", lpcrit->DebugInfo->EntryCount); - ok(lpcrit->DebugInfo->ContentionCount == 0, "DebugInfo->ContentionCount=%ld\n", lpcrit->DebugInfo->ContentionCount); - } - - EngReleaseSemaphore(hsem); - EngDeleteSemaphore(hsem); - - /* NULL pointer test */ - // Note NULL pointer test crash in Vista */ - // EngAcquireSemaphore(NULL); - - /* negtive pointer test */ - // Note negtive pointer test crash in Vista */ - // EngAcquireSemaphore((HSEMAPHORE)-1); - - /* try with deleted Semaphore */ - // Note deleted Semaphore pointer test does freze the whole program in Vista */ - // EngAcquireSemaphore(hsem); -} - -START_TEST(EngAcquireSemaphore) -{ - Test_EngAcquireSemaphore(); -} - diff --git a/rostests/apitests/gdi32/EngCreateSemaphore.c b/rostests/apitests/gdi32/EngCreateSemaphore.c deleted file mode 100644 index 478ed9161fe..00000000000 --- a/rostests/apitests/gdi32/EngCreateSemaphore.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for EngCreateSemaphore - * PROGRAMMERS: Magnus Olsen - */ - -#include -#include -#include -#include - -void Test_EngCreateSemaphore() -{ - HSEMAPHORE hsem; - PRTL_CRITICAL_SECTION lpcrit; - - hsem = EngCreateSemaphore(); - ok(hsem != NULL, "EngCreateSemaphore failed\n"); - if (!hsem) return; - lpcrit = (PRTL_CRITICAL_SECTION)hsem; - - ok(lpcrit->LockCount == -1, "lpcrit->LockCount=%ld\n", lpcrit->LockCount); - ok(lpcrit->RecursionCount == 0, "lpcrit->RecursionCount=%ld\n", lpcrit->RecursionCount); - ok(lpcrit->OwningThread == 0, "lpcrit->OwningThread=%p\n", lpcrit->OwningThread); - ok(lpcrit->LockSemaphore == 0, "lpcrit->LockSemaphore=%p\n", lpcrit->LockSemaphore); - ok(lpcrit->SpinCount == 0, "lpcrit->SpinCount=%ld\n", lpcrit->SpinCount); - - ok(lpcrit->DebugInfo != NULL, "no DebugInfo\n"); - if (lpcrit->DebugInfo) - { - ok(lpcrit->DebugInfo->Type == 0, "DebugInfo->Type=%d\n", lpcrit->DebugInfo->Type); - ok(lpcrit->DebugInfo->CreatorBackTraceIndex == 0, "DebugInfo->CreatorBackTraceIndex=%d\n", lpcrit->DebugInfo->CreatorBackTraceIndex); - ok(lpcrit->DebugInfo->EntryCount == 0, "DebugInfo->EntryCount=%ld\n", lpcrit->DebugInfo->EntryCount); - ok(lpcrit->DebugInfo->ContentionCount == 0, "DebugInfo->ContentionCount=%ld\n", lpcrit->DebugInfo->ContentionCount); - } - - EngDeleteSemaphore(hsem); -} - -START_TEST(EngCreateSemaphore) -{ - Test_EngCreateSemaphore(); -} - diff --git a/rostests/apitests/gdi32/EngDeleteSemaphore.c b/rostests/apitests/gdi32/EngDeleteSemaphore.c deleted file mode 100644 index e2cb40911d8..00000000000 --- a/rostests/apitests/gdi32/EngDeleteSemaphore.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for EngDeleteSemaphore - * PROGRAMMERS: Magnus Olsen - */ - -#include -#include -#include -#include - -void Test_EngDeleteSemaphore() -{ - HSEMAPHORE hsem; - PRTL_CRITICAL_SECTION lpcrit; - - /* test Create then delete */ - hsem = EngCreateSemaphore(); - ok(hsem != NULL, "EngCreateSemaphore failed\n"); - if (!hsem) return; - lpcrit = (PRTL_CRITICAL_SECTION)hsem; - EngDeleteSemaphore(hsem); - -// ok(lpcrit->LockCount > 0); doesn't work on XP - ok(lpcrit->RecursionCount == 0, "lpcrit->RecursionCount=%ld\n", lpcrit->RecursionCount); - ok(lpcrit->OwningThread == 0, "lpcrit->OwningThread=%p\n", lpcrit->OwningThread); - ok(lpcrit->LockSemaphore == 0, "lpcrit->LockSemaphore=%p\n", lpcrit->LockSemaphore); - ok(lpcrit->SpinCount == 0, "lpcrit->SpinCount=%ld\n", lpcrit->SpinCount); - - //ok(lpcrit->DebugInfo != NULL, "no DebugInfo\n"); - if (lpcrit->DebugInfo) - { - ok(lpcrit->DebugInfo->Type != 0, "DebugInfo->Type=%d\n", lpcrit->DebugInfo->Type); - ok(lpcrit->DebugInfo->CreatorBackTraceIndex != 0, "DebugInfo->CreatorBackTraceIndex=%d\n", lpcrit->DebugInfo->CreatorBackTraceIndex); - ok(lpcrit->DebugInfo->EntryCount != 0, "DebugInfo->EntryCount=%ld\n", lpcrit->DebugInfo->EntryCount); - ok(lpcrit->DebugInfo->ContentionCount != 0, "DebugInfo->ContentionCount=%ld\n", lpcrit->DebugInfo->ContentionCount); - } - - /* test EngAcquireSemaphore and release it, then delete it */ - hsem = EngCreateSemaphore(); - ok(hsem != NULL, "EngCreateSemaphore failed\n"); - if (!hsem) return; - lpcrit = (PRTL_CRITICAL_SECTION)hsem; - - EngAcquireSemaphore(hsem); - EngReleaseSemaphore(hsem); - EngDeleteSemaphore(hsem); - - //ok(lpcrit->LockCount > 0, "lpcrit->LockCount=%ld\n", lpcrit->LockCount); - ok(lpcrit->RecursionCount == 0, "lpcrit->RecursionCount=%ld\n", lpcrit->RecursionCount); - ok(lpcrit->OwningThread == 0, "lpcrit->OwningThread=%p\n", lpcrit->OwningThread); - ok(lpcrit->LockSemaphore == 0, "lpcrit->LockSemaphore=%p\n", lpcrit->LockSemaphore); - ok(lpcrit->SpinCount == 0, "lpcrit->SpinCount=%ld\n", lpcrit->SpinCount); - - //ok(lpcrit->DebugInfo != NULL, "no DebugInfo\n"); - if (lpcrit->DebugInfo) - { - ok(lpcrit->DebugInfo->Type != 0, "DebugInfo->Type=%d\n", lpcrit->DebugInfo->Type); - ok(lpcrit->DebugInfo->CreatorBackTraceIndex != 0, "DebugInfo->CreatorBackTraceIndex=%d\n", lpcrit->DebugInfo->CreatorBackTraceIndex); - ok(lpcrit->DebugInfo->EntryCount != 0, "DebugInfo->EntryCount=%ld\n", lpcrit->DebugInfo->EntryCount); - ok(lpcrit->DebugInfo->ContentionCount != 0, "DebugInfo->ContentionCount=%ld\n", lpcrit->DebugInfo->ContentionCount); - } -} - -START_TEST(EngDeleteSemaphore) -{ - Test_EngDeleteSemaphore(); -} - diff --git a/rostests/apitests/gdi32/EngReleaseSemaphore.c b/rostests/apitests/gdi32/EngReleaseSemaphore.c deleted file mode 100644 index 9efdc60816a..00000000000 --- a/rostests/apitests/gdi32/EngReleaseSemaphore.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for EngReleaseSemaphore - * PROGRAMMERS: Magnus Olsen - */ - -#include -#include -#include -#include - -void Test_EngReleaseSemaphore() -{ - HSEMAPHORE hsem; - PRTL_CRITICAL_SECTION lpcrit; - - hsem = EngCreateSemaphore(); - ok(hsem != NULL, "EngCreateSemaphore failed\n"); - if (!hsem) return; - lpcrit = (PRTL_CRITICAL_SECTION)hsem; - - EngAcquireSemaphore(hsem); - EngReleaseSemaphore(hsem); - - ok(lpcrit->LockCount != 0, "lpcrit->LockCount=%ld\n", lpcrit->LockCount); - ok(lpcrit->RecursionCount == 0, "lpcrit->RecursionCount=%ld\n", lpcrit->RecursionCount); - ok(lpcrit->OwningThread == 0, "lpcrit->OwningThread=%p\n", lpcrit->OwningThread); - ok(lpcrit->LockSemaphore == 0, "lpcrit->LockSemaphore=%p\n", lpcrit->LockSemaphore); - ok(lpcrit->SpinCount == 0, "lpcrit->SpinCount=%ld\n", lpcrit->SpinCount); - - ok(lpcrit->DebugInfo != NULL, "no DebugInfo\n"); - if (lpcrit->DebugInfo) - { - ok(lpcrit->DebugInfo->Type == 0, "DebugInfo->Type=%d\n", lpcrit->DebugInfo->Type); - ok(lpcrit->DebugInfo->CreatorBackTraceIndex == 0, "DebugInfo->CreatorBackTraceIndex=%d\n", lpcrit->DebugInfo->CreatorBackTraceIndex); - ok(lpcrit->DebugInfo->EntryCount == 0, "DebugInfo->EntryCount=%ld\n", lpcrit->DebugInfo->EntryCount); - ok(lpcrit->DebugInfo->ContentionCount == 0, "DebugInfo->ContentionCount=%ld\n", lpcrit->DebugInfo->ContentionCount); - } - - EngDeleteSemaphore(hsem); -} - -START_TEST(EngReleaseSemaphore) -{ - Test_EngReleaseSemaphore(); -} - diff --git a/rostests/apitests/gdi32/ExtCreatePen.c b/rostests/apitests/gdi32/ExtCreatePen.c deleted file mode 100644 index bb4be4962fe..00000000000 --- a/rostests/apitests/gdi32/ExtCreatePen.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for ExtCreatePen - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include -#include -#include -#include - -void Test_ExtCreatePen() -{ - HPEN hPen; - LOGBRUSH logbrush; - DWORD dwStyles[17] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17}; - - logbrush.lbStyle = BS_SOLID; - logbrush.lbColor = RGB(1,2,3); - logbrush.lbHatch = 0; - hPen = ExtCreatePen(PS_COSMETIC, 1,&logbrush, 0, 0); - ok(hPen != 0, "ExtCreatePen failed\n"); - if (!hPen) return; - - /* Test if we have an EXTPEN */ - ok(GDI_HANDLE_GET_TYPE(hPen) == GDI_OBJECT_TYPE_EXTPEN, "hPen=%p\n", hPen); - DeleteObject(hPen); - - /* test userstyles */ - hPen = ExtCreatePen(PS_GEOMETRIC | PS_USERSTYLE, 5, &logbrush, 17, (CONST DWORD*)&dwStyles); - ok(hPen == 0, "\n"); - hPen = ExtCreatePen(PS_GEOMETRIC | PS_USERSTYLE, 5, &logbrush, 16, (CONST DWORD*)&dwStyles); - ok(hPen != 0, "\n"); - - DeleteObject(hPen); -} - -START_TEST(ExtCreatePen) -{ - Test_ExtCreatePen(); -} - diff --git a/rostests/apitests/gdi32/GdiConvertBitmap.c b/rostests/apitests/gdi32/GdiConvertBitmap.c deleted file mode 100644 index 7799485b943..00000000000 --- a/rostests/apitests/gdi32/GdiConvertBitmap.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for GdiConvertBitmap - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -HBITMAP WINAPI GdiConvertBitmap(HBITMAP hbm); - -void Test_GdiConvertBitmap() -{ - ok(GdiConvertBitmap((HBITMAP)-1) == (HBITMAP)-1, "\n"); - ok(GdiConvertBitmap((HBITMAP)0) == (HBITMAP)0, "\n"); - ok(GdiConvertBitmap((HBITMAP)1) == (HBITMAP)1, "\n"); - ok(GdiConvertBitmap((HBITMAP)2) == (HBITMAP)2, "\n"); -} - -START_TEST(GdiConvertBitmap) -{ - Test_GdiConvertBitmap(); -} - diff --git a/rostests/apitests/gdi32/GdiConvertBrush.c b/rostests/apitests/gdi32/GdiConvertBrush.c deleted file mode 100644 index 259fe93d9eb..00000000000 --- a/rostests/apitests/gdi32/GdiConvertBrush.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for GdiConvertBrush - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -HBRUSH WINAPI GdiConvertBrush(HBRUSH hbr); - -void Test_GdiConvertBrush() -{ - ok(GdiConvertBrush((HBRUSH)-1) == (HBRUSH)-1, "\n"); - ok(GdiConvertBrush((HBRUSH)0) == (HBRUSH)0, "\n"); - ok(GdiConvertBrush((HBRUSH)1) == (HBRUSH)1, "\n"); - ok(GdiConvertBrush((HBRUSH)2) == (HBRUSH)2, "\n"); -} - -START_TEST(GdiConvertBrush) -{ - Test_GdiConvertBrush(); -} - diff --git a/rostests/apitests/gdi32/GdiConvertDC.c b/rostests/apitests/gdi32/GdiConvertDC.c deleted file mode 100644 index e6b2d545492..00000000000 --- a/rostests/apitests/gdi32/GdiConvertDC.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for GdiConvertDC - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -HDC WINAPI GdiConvertDC(HDC hdc); - -void Test_GdiConvertDC() -{ - ok(GdiConvertDC((HDC)-1) == (HDC)-1, "\n"); - ok(GdiConvertDC((HDC)0) == (HDC)0, "\n"); - ok(GdiConvertDC((HDC)1) == (HDC)1, "\n"); - ok(GdiConvertDC((HDC)2) == (HDC)2, "\n"); -} - -START_TEST(GdiConvertDC) -{ - Test_GdiConvertDC(); -} - diff --git a/rostests/apitests/gdi32/GdiConvertFont.c b/rostests/apitests/gdi32/GdiConvertFont.c deleted file mode 100644 index 0e20dd345f0..00000000000 --- a/rostests/apitests/gdi32/GdiConvertFont.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for GdiConvertFont - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -HFONT WINAPI GdiConvertFont(HFONT); - -void Test_GdiConvertFont() -{ - ok(GdiConvertFont((HFONT)-1) == (HFONT)-1, "\n"); - ok(GdiConvertFont((HFONT)0) == (HFONT)0, "\n"); - ok(GdiConvertFont((HFONT)1) == (HFONT)1, "\n"); - ok(GdiConvertFont((HFONT)2) == (HFONT)2, "\n"); -} - -START_TEST(GdiConvertFont) -{ - Test_GdiConvertFont(); -} - diff --git a/rostests/apitests/gdi32/GdiConvertPalette.c b/rostests/apitests/gdi32/GdiConvertPalette.c deleted file mode 100644 index b98eff89bd9..00000000000 --- a/rostests/apitests/gdi32/GdiConvertPalette.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for GdiConvertPalette - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -HPALETTE WINAPI GdiConvertPalette(HPALETTE); - -void Test_GdiConvertPalette() -{ - ok(GdiConvertPalette((HPALETTE)-1) == (HPALETTE)-1, "\n"); - ok(GdiConvertPalette((HPALETTE)0) == (HPALETTE)0, "\n"); - ok(GdiConvertPalette((HPALETTE)1) == (HPALETTE)1, "\n"); - ok(GdiConvertPalette((HPALETTE)2) == (HPALETTE)2, "\n"); -} - -START_TEST(GdiConvertPalette) -{ - Test_GdiConvertPalette(); -} - diff --git a/rostests/apitests/gdi32/GdiConvertRegion.c b/rostests/apitests/gdi32/GdiConvertRegion.c deleted file mode 100644 index 1db7e16d6cc..00000000000 --- a/rostests/apitests/gdi32/GdiConvertRegion.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for GdiConvertRegion - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -HRGN WINAPI GdiConvertRegion(HRGN); - -void Test_GdiConvertRegion() -{ - ok(GdiConvertRegion((HRGN)-1) == (HRGN)-1, "\n"); - ok(GdiConvertRegion((HRGN)0) == (HRGN)0, "\n"); - ok(GdiConvertRegion((HRGN)1) == (HRGN)1, "\n"); - ok(GdiConvertRegion((HRGN)2) == (HRGN)2, "\n"); -} - -START_TEST(GdiConvertRegion) -{ - Test_GdiConvertRegion(); -} - diff --git a/rostests/apitests/gdi32/GdiDeleteLocalDC.c b/rostests/apitests/gdi32/GdiDeleteLocalDC.c deleted file mode 100644 index 5eec2d1e62e..00000000000 --- a/rostests/apitests/gdi32/GdiDeleteLocalDC.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for GdiDeleteLocalDC - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -BOOL WINAPI GdiDeleteLocalDC(HDC); - -void Test_GdiDeleteLocalDC() -{ - ok(GdiDeleteLocalDC((HDC)-1) == TRUE, "\n"); - ok(GdiDeleteLocalDC((HDC)0) == TRUE, "\n"); - ok(GdiDeleteLocalDC((HDC)1) == TRUE, "\n"); - ok(GdiDeleteLocalDC((HDC)2) == TRUE, "\n"); -} - -START_TEST(GdiDeleteLocalDC) -{ - Test_GdiDeleteLocalDC(); -} - diff --git a/rostests/apitests/gdi32/GdiGetCharDimensions.c b/rostests/apitests/gdi32/GdiGetCharDimensions.c deleted file mode 100644 index 600ee7d7848..00000000000 --- a/rostests/apitests/gdi32/GdiGetCharDimensions.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for GdiGetCharDimensions - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -void Test_GdiGetCharDimensions() -{ - LOGFONT logfont = {-11, 0, 0, 0, 400, - 0, 0, 0, 0, 0, 0, 0, 0, - "MS Shell Dlg 2"}; - HFONT hFont, hOldFont; - HDC hdc; - LONG x, y, x2; - TEXTMETRICW tm; - SIZE size; - static const WCHAR alphabet[] = { - 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q', - 'r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H', - 'I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',0}; - - hFont = CreateFontIndirect(&logfont); - hdc = CreateCompatibleDC(NULL); - hOldFont = SelectObject(hdc, hFont); - - x = GdiGetCharDimensions(hdc, &tm, &y); - GetTextExtentPointW(hdc, alphabet, 52, &size); - x2 = (size.cx / 26 + 1) / 2; - - ok(x == x2, "x=%ld, x2=%ld\n", x, x2); - ok(y == tm.tmHeight, "y = %ld, tm.tmHeight = %ld\n", y, tm.tmHeight); - - SelectObject(hdc, hOldFont); - DeleteObject(hFont); - DeleteDC(hdc); -} - -START_TEST(GdiGetCharDimensions) -{ - Test_GdiGetCharDimensions(); -} - diff --git a/rostests/apitests/gdi32/GdiGetLocalBrush.c b/rostests/apitests/gdi32/GdiGetLocalBrush.c deleted file mode 100644 index 7a8f182cf04..00000000000 --- a/rostests/apitests/gdi32/GdiGetLocalBrush.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for GdiGetLocalBrush - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -HBRUSH WINAPI GdiGetLocalBrush(HBRUSH hbr); - -void Test_GdiGetLocalBrush() -{ - ok(GdiGetLocalBrush((HBRUSH)-1) == (HBRUSH)-1, "\n"); - ok(GdiGetLocalBrush((HBRUSH)0) == (HBRUSH)0, "\n"); - ok(GdiGetLocalBrush((HBRUSH)1) == (HBRUSH)1, "\n"); - ok(GdiGetLocalBrush((HBRUSH)2) == (HBRUSH)2, "\n"); -} - -START_TEST(GdiGetLocalBrush) -{ - Test_GdiGetLocalBrush(); -} - diff --git a/rostests/apitests/gdi32/GdiGetLocalDC.c b/rostests/apitests/gdi32/GdiGetLocalDC.c deleted file mode 100644 index e8de9c0d032..00000000000 --- a/rostests/apitests/gdi32/GdiGetLocalDC.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for GdiGetLocalDC - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -HDC WINAPI GdiGetLocalDC(HDC); - -void Test_GdiGetLocalDC() -{ - ok(GdiGetLocalDC((HDC)-1) == (HDC)-1, "\n"); - ok(GdiGetLocalDC((HDC)0) == (HDC)0, "\n"); - ok(GdiGetLocalDC((HDC)1) == (HDC)1, "\n"); - ok(GdiGetLocalDC((HDC)2) == (HDC)2, "\n"); -} - -START_TEST(GdiGetLocalDC) -{ - Test_GdiGetLocalDC(); -} - diff --git a/rostests/apitests/gdi32/GdiReleaseLocalDC.c b/rostests/apitests/gdi32/GdiReleaseLocalDC.c deleted file mode 100644 index 8eea7d76b64..00000000000 --- a/rostests/apitests/gdi32/GdiReleaseLocalDC.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for GdiReleaseLocalDC - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -BOOL WINAPI GdiReleaseLocalDC(HDC); - -void Test_GdiReleaseLocalDC() -{ - ok(GdiReleaseLocalDC((HDC)-1) == TRUE, "\n"); - ok(GdiReleaseLocalDC((HDC)0) == TRUE, "\n"); - ok(GdiReleaseLocalDC((HDC)1) == TRUE, "\n"); - ok(GdiReleaseLocalDC((HDC)2) == TRUE, "\n"); -} - -START_TEST(GdiReleaseLocalDC) -{ - Test_GdiReleaseLocalDC(); -} - diff --git a/rostests/apitests/gdi32/GdiSetAttrs.c b/rostests/apitests/gdi32/GdiSetAttrs.c deleted file mode 100644 index b0bd6b249e0..00000000000 --- a/rostests/apitests/gdi32/GdiSetAttrs.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for GdiSetAttrs - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -BOOL WINAPI GdiSetAttrs(HDC); - -void Test_GdiSetAttrs() -{ - ok(GdiSetAttrs((HDC)-1) == TRUE, "\n"); - ok(GdiSetAttrs((HDC)0) == TRUE, "\n"); - ok(GdiSetAttrs((HDC)1) == TRUE, "\n"); - ok(GdiSetAttrs((HDC)2) == TRUE, "\n"); -} - -START_TEST(GdiSetAttrs) -{ - Test_GdiSetAttrs(); -} - diff --git a/rostests/apitests/gdi32/GetClipRgn.c b/rostests/apitests/gdi32/GetClipRgn.c deleted file mode 100644 index 35221489f78..00000000000 --- a/rostests/apitests/gdi32/GetClipRgn.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for GetClipRgn - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -void Test_GetClipRgn() -{ - HWND hWnd; - HDC hDC; - HRGN hrgn;//, hrgn2; - int ret; - - /* Create a window */ - hWnd = CreateWindowW(L"BUTTON", L"TestWindow", WS_OVERLAPPEDWINDOW | WS_VISIBLE, - CW_USEDEFAULT, CW_USEDEFAULT, 100, 100, - NULL, NULL, 0, 0); - - hDC = GetDC(hWnd); - hrgn = CreateRectRgn(0,0,0,0); - - /* Test invalid DC */ - SetLastError(ERROR_SUCCESS); - ret = GetClipRgn((HDC)0x12345, hrgn); - ok(ret == -1, "Expected -1, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); - - /* Test invalid hrgn */ - SetLastError(ERROR_SUCCESS); - ret = GetClipRgn(hDC, (HRGN)0x12345); - ok(ret == 0, "Expected 0, got %d\n", ret); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError()); - - ReleaseDC(hWnd, hDC); - DestroyWindow(hWnd); -} - -START_TEST(GetClipRgn) -{ - Test_GetClipRgn(); -} - diff --git a/rostests/apitests/gdi32/GetCurrentObject.c b/rostests/apitests/gdi32/GetCurrentObject.c deleted file mode 100644 index d56eb2e6c5e..00000000000 --- a/rostests/apitests/gdi32/GetCurrentObject.c +++ /dev/null @@ -1,181 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for GetCurrentObject - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include -#include -#include -#include - -void Test_GetCurrentObject() -{ - HWND hWnd; - HDC hDC; - HBITMAP hBmp; - HGDIOBJ hObj; - - /* Create a window */ - hWnd = CreateWindowW(L"BUTTON", L"TestWindow", WS_OVERLAPPEDWINDOW | WS_VISIBLE, - CW_USEDEFAULT, CW_USEDEFAULT, 100, 100, - NULL, NULL, 0, 0); - /* Get the DC */ - hDC = GetDC(hWnd); - - /* Test NULL DC */ - SetLastError(ERROR_SUCCESS); - hObj = GetCurrentObject(NULL, 0); - ok(hObj == 0, "Expected 0, got %p\n", hObj); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); - - SetLastError(ERROR_SUCCESS); - hObj = GetCurrentObject(NULL, OBJ_BITMAP); - ok(hObj == 0, "Expected 0, got %p\n", hObj); - hObj = GetCurrentObject(NULL, OBJ_BRUSH); - ok(hObj == 0, "Expected 0, got %p\n", hObj); - hObj = GetCurrentObject(NULL, OBJ_COLORSPACE); - ok(hObj == 0, "Expected 0, got %p\n", hObj); - hObj = GetCurrentObject(NULL, OBJ_FONT); - ok(hObj == 0, "Expected 0, got %p\n", hObj); - hObj = GetCurrentObject(NULL, OBJ_PAL); - ok(hObj == 0, "Expected 0, got %p\n", hObj); - hObj = GetCurrentObject(NULL, OBJ_PEN); - ok(hObj == 0, "Expected 0, got %p\n", hObj); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); - - /* Test invalid DC handle */ - SetLastError(ERROR_SUCCESS); - hObj = GetCurrentObject((HDC)-123, 0); - ok(hObj == 0, "Expected 0, got %p\n", hObj); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError()); - - SetLastError(ERROR_SUCCESS); - hObj = GetCurrentObject((HDC)-123, OBJ_BITMAP); - ok(hObj == 0, "Expected 0, got %p\n", hObj); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); - - /* Test invalid types */ - SetLastError(ERROR_SUCCESS); - hObj = GetCurrentObject(hDC, 0); - ok(hObj == 0, "Expected 0, got %p\n", hObj); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError()); - - SetLastError(ERROR_SUCCESS); - hObj = GetCurrentObject(hDC, 3); - ok(hObj == 0, "Expected 0, got %p\n", hObj); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError()); - - SetLastError(ERROR_SUCCESS); - hObj = GetCurrentObject(hDC, 4); - ok(hObj == 0, "Expected 0, got %p\n", hObj); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError()); - - SetLastError(ERROR_SUCCESS); - hObj = GetCurrentObject(hDC, 8); - ok(hObj == 0, "Expected 0, got %p\n", hObj); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError()); - - SetLastError(ERROR_SUCCESS); - hObj = GetCurrentObject(hDC, 9); - ok(hObj == 0, "Expected 0, got %p\n", hObj); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError()); - - SetLastError(ERROR_SUCCESS); - hObj = GetCurrentObject(hDC, 10); - ok(hObj == 0, "Expected 0, got %p\n", hObj); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError()); - - SetLastError(ERROR_SUCCESS); - hObj = GetCurrentObject(hDC, 12); - ok(hObj == 0, "Expected 0, got %p\n", hObj); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError()); - - SetLastError(ERROR_SUCCESS); - hObj = GetCurrentObject(hDC, 13); - ok(hObj == 0, "Expected 0, got %p\n", hObj); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError()); - - /* Default bitmap */ - SetLastError(ERROR_SUCCESS); - hBmp = GetCurrentObject(hDC, OBJ_BITMAP); - ok(GDI_HANDLE_GET_TYPE(hBmp) == GDI_OBJECT_TYPE_BITMAP, "Expected GDI_OBJECT_TYPE_BITMAP, got %lu\n", GDI_HANDLE_GET_TYPE(hBmp)); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); - - /* Other bitmap */ - SetLastError(ERROR_SUCCESS); - SelectObject(hDC, GetStockObject(21)); - ok(hBmp == GetCurrentObject(hDC, OBJ_BITMAP), "\n"); - ok(GDI_HANDLE_GET_TYPE(hBmp) == GDI_OBJECT_TYPE_BITMAP, "Expected GDI_OBJECT_TYPE_BITMAP, got %lu\n", GDI_HANDLE_GET_TYPE(hBmp)); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); - - /* Default brush */ - SetLastError(ERROR_SUCCESS); - hObj = GetCurrentObject(hDC, OBJ_BRUSH); - ok(hObj == GetStockObject(WHITE_BRUSH), "Expected %p, got %p\n", GetStockObject(WHITE_BRUSH), hObj); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); - - /* Other brush */ - SetLastError(ERROR_SUCCESS); - SelectObject(hDC, GetStockObject(BLACK_BRUSH)); - hObj = GetCurrentObject(hDC, OBJ_BRUSH); - ok(hObj == GetStockObject(BLACK_BRUSH), "Expected %p, got %p\n", GetStockObject(BLACK_BRUSH), hObj); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); - - /* Default colorspace */ - SetLastError(ERROR_SUCCESS); - hObj = GetCurrentObject(hDC, OBJ_COLORSPACE); - ok(hObj == GetStockObject(20), "Expected %p, got %p\n", GetStockObject(20), hObj); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); - - /* Default font */ - SetLastError(ERROR_SUCCESS); - hObj = GetCurrentObject(hDC, OBJ_FONT); - ok(hObj == GetStockObject(SYSTEM_FONT), "Expected %p, got %p\n", GetStockObject(SYSTEM_FONT), hObj); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); - - /* Other font */ - SetLastError(ERROR_SUCCESS); - SelectObject(hDC, GetStockObject(DEFAULT_GUI_FONT)); - hObj = GetCurrentObject(hDC, OBJ_FONT); - ok(hObj == GetStockObject(DEFAULT_GUI_FONT), "Expected %p, got %p\n", GetStockObject(DEFAULT_GUI_FONT), hObj); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); - - /* Default palette */ - SetLastError(ERROR_SUCCESS); - hObj = GetCurrentObject(hDC, OBJ_PAL); - ok(hObj == GetStockObject(DEFAULT_PALETTE), "Expected %p, got %p\n", GetStockObject(DEFAULT_PALETTE), hObj); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); - - /* Default pen */ - SetLastError(ERROR_SUCCESS); - hObj = GetCurrentObject(hDC, OBJ_PEN); - ok(hObj == GetStockObject(BLACK_PEN), "Expected %p, got %p\n", GetStockObject(BLACK_PEN), hObj); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); - - /* Other pen */ - SetLastError(ERROR_SUCCESS); - SelectObject(hDC, GetStockObject(WHITE_PEN)); - hObj = GetCurrentObject(hDC, OBJ_PEN); - ok(hObj == GetStockObject(WHITE_PEN), "Expected %p, got %p\n", GetStockObject(WHITE_PEN), hObj); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); - - /* DC pen */ - SetLastError(ERROR_SUCCESS); - SelectObject(hDC, GetStockObject(DC_PEN)); - hObj = GetCurrentObject(hDC, OBJ_PEN); - ok(hObj == GetStockObject(DC_PEN), "Expected %p, got %p\n", GetStockObject(DC_PEN), hObj); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", GetLastError()); - - ReleaseDC(hWnd, hDC); - DestroyWindow(hWnd); -} - -START_TEST(GetCurrentObject) -{ - Test_GetCurrentObject(); -} - diff --git a/rostests/apitests/gdi32/GetDIBits.c b/rostests/apitests/gdi32/GetDIBits.c deleted file mode 100644 index 887581ddbcb..00000000000 --- a/rostests/apitests/gdi32/GetDIBits.c +++ /dev/null @@ -1,173 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for GetDIBits - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -#define ok_err(dwErr) ok(GetLastError() == dwErr, "LastError is wrong, expected %d, got %ld\n", dwErr, GetLastError()) - -void Test_GetDIBits() -{ - HDC hdcScreen, hdcMem; - HBITMAP hbmp; - PBITMAPINFO pbi; - INT ret, ScreenBpp; - DWORD ajBits[10] = {0xff, 0x00, 0xcc, 0xf0, 0x0f}; - - pbi = malloc(sizeof(BITMAPV5HEADER) + 256 * sizeof(DWORD)); - - hdcScreen = GetDC(NULL); - ok(hdcScreen != 0, "GetDC failed, skipping tests\n"); - if (hdcScreen == NULL) return; - - hdcMem = CreateCompatibleDC(0); - ok(hdcMem != 0, "CreateCompatibleDC failed, skipping tests\n"); - if (hdcMem == NULL) return; - - hbmp = CreateCompatibleBitmap(hdcScreen, 16, 16); - ok(hbmp != NULL, "CreateCompatibleBitmap failed\n"); - - /* misc */ - SetLastError(ERROR_SUCCESS); - ok(GetDIBits(0, 0, 0, 0, NULL, NULL, 0) == 0, "\n"); - ok_err(ERROR_INVALID_PARAMETER); - - SetLastError(ERROR_SUCCESS); - ok(GetDIBits((HDC)2345, 0, 0, 0, NULL, NULL, 0) == 0, "\n"); - ok_err(ERROR_INVALID_PARAMETER); - - SetLastError(ERROR_SUCCESS); - ok(GetDIBits((HDC)2345, hbmp, 0, 0, NULL, NULL, 0) == 0, "\n"); - ok_err(ERROR_INVALID_PARAMETER); - - SetLastError(ERROR_SUCCESS); - ok(GetDIBits((HDC)2345, hbmp, 0, 15, NULL, pbi, 0) == 0, "\n"); - ok_err(ERROR_INVALID_PARAMETER); - - - - /* null hdc */ - SetLastError(ERROR_SUCCESS); - ZeroMemory(pbi, sizeof(BITMAPINFO)); - pbi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - ok(GetDIBits(NULL, hbmp, 0, 15, NULL, pbi, DIB_RGB_COLORS) == 0, "\n"); - ok_err(ERROR_INVALID_PARAMETER); - - /* null bitmap */ - SetLastError(ERROR_SUCCESS); - ZeroMemory(pbi, sizeof(BITMAPINFO)); - pbi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - ok(GetDIBits(hdcScreen, NULL, 0, 15, NULL, pbi, DIB_RGB_COLORS) == 0, "\n"); - ok_err(ERROR_SUCCESS); - - /* 0 scan lines */ - SetLastError(ERROR_SUCCESS); - ZeroMemory(pbi, sizeof(BITMAPINFO)); - pbi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - ok(GetDIBits(hdcScreen, hbmp, 0, 0, NULL, pbi, DIB_RGB_COLORS) > 0, "\n"); - ok_err(ERROR_SUCCESS); - - /* null bitmap info - crashes XP*/ - //SetLastError(ERROR_SUCCESS); - //ok(GetDIBits(hdcScreen, NULL, 0, 15, NULL, NULL, DIB_RGB_COLORS) == 0); - //ok(GetLastError() == ERROR_INVALID_PARAMETER); - - /* bad bmi colours (uUsage) */ - SetLastError(ERROR_SUCCESS); - ZeroMemory(pbi, sizeof(BITMAPINFO)); - pbi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - ok(GetDIBits(hdcScreen, hbmp, 0, 15, NULL, pbi, 100) == 0, "\n"); - ok_err(ERROR_SUCCESS); - ok(pbi->bmiHeader.biWidth == 0, "\n"); - ok(pbi->bmiHeader.biHeight == 0, "\n"); - ok(pbi->bmiHeader.biBitCount == 0, "\n"); - ok(pbi->bmiHeader.biSizeImage == 0, "\n"); - - /* basic call */ - SetLastError(ERROR_SUCCESS); - ZeroMemory(pbi, sizeof(BITMAPINFO)); - pbi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - ok(GetDIBits(hdcScreen, hbmp, 0, 15, NULL, pbi, DIB_RGB_COLORS) > 0, "\n"); - ok_err(ERROR_SUCCESS); - ScreenBpp = GetDeviceCaps(hdcScreen, BITSPIXEL); - ok(pbi->bmiHeader.biWidth == 16, "\n"); - ok(pbi->bmiHeader.biHeight == 16, "\n"); - ok(pbi->bmiHeader.biBitCount == ScreenBpp, "\n"); - ok(pbi->bmiHeader.biSizeImage == (16 * 16) * (ScreenBpp / 8), "\n"); - - /* Test if COREHEADER is supported */ - pbi->bmiHeader.biSize = sizeof(BITMAPCOREHEADER); - ok(GetDIBits(hdcScreen, hbmp, 0, 15, NULL, pbi, DIB_RGB_COLORS) > 0, "\n"); - ok(pbi->bmiHeader.biSize == sizeof(BITMAPCOREHEADER), "\n"); - - /* Test different header sizes */ - pbi->bmiHeader.biSize = sizeof(BITMAPCOREHEADER) + 4; - ok(GetDIBits(hdcScreen, hbmp, 0, 15, NULL, pbi, DIB_RGB_COLORS) == 0, "should fail.\n"); - pbi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER) + 4; - ok(GetDIBits(hdcScreen, hbmp, 0, 15, NULL, pbi, DIB_RGB_COLORS) == 0, "should fail.\n"); - pbi->bmiHeader.biSize = sizeof(BITMAPV5HEADER); - ok(GetDIBits(hdcScreen, hbmp, 0, 15, NULL, pbi, DIB_RGB_COLORS) > 0, "should not fail.\n"); - pbi->bmiHeader.biSize = sizeof(BITMAPV5HEADER) + 4; - ok(GetDIBits(hdcScreen, hbmp, 0, 15, NULL, pbi, DIB_RGB_COLORS) > 0, "should not fail.\n"); - - - DeleteObject(hbmp); - - /* Test a mono bitmap */ - hbmp = CreateBitmap(13, 7, 1, 1, ajBits); - ok(hbmp != 0, "failed to create bitmap\n"); - ZeroMemory(pbi, sizeof(BITMAPINFO)); - pbi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - ret = GetDIBits(hdcScreen, hbmp, 0, 0, NULL, pbi, DIB_RGB_COLORS); - ok(ret == 1, "%d\n", ret); - ok(pbi->bmiHeader.biWidth == 13, "pbi->bmiHeader.biWidth = %ld\n", pbi->bmiHeader.biWidth); - ok(pbi->bmiHeader.biHeight == 7, "pbi->bmiHeader.biHeight = %ld\n", pbi->bmiHeader.biHeight); - ok(pbi->bmiHeader.biBitCount == 1, "pbi->bmiHeader.biBitCount = %d\n", pbi->bmiHeader.biBitCount); - ok(pbi->bmiHeader.biSizeImage == 28, "pbi->bmiHeader.biSizeImage = %ld\n", pbi->bmiHeader.biSizeImage); - - /* Test a mono bitmap with values set */ - ZeroMemory(pbi, sizeof(BITMAPINFO)); - pbi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - pbi->bmiHeader.biWidth = 12; - pbi->bmiHeader.biHeight = 9; - pbi->bmiHeader.biPlanes = 1; - pbi->bmiHeader.biBitCount = 32; - pbi->bmiHeader.biCompression = BI_RGB; - pbi->bmiHeader.biSizeImage = 123; - ret = GetDIBits(hdcScreen, hbmp, 0, 5, NULL, pbi, DIB_RGB_COLORS); - ok(ret == 1, "%d\n", ret); - ok(pbi->bmiHeader.biWidth == 12, "pbi->bmiHeader.biWidth = %ld\n", pbi->bmiHeader.biWidth); - ok(pbi->bmiHeader.biHeight == 9, "pbi->bmiHeader.biHeight = %ld\n", pbi->bmiHeader.biHeight); - ok(pbi->bmiHeader.biBitCount == 32, "pbi->bmiHeader.biBitCount = %d\n", pbi->bmiHeader.biBitCount); - ok(pbi->bmiHeader.biSizeImage == 432, "pbi->bmiHeader.biSizeImage = %ld\n", pbi->bmiHeader.biSizeImage); - - /* Set individual values */ - ZeroMemory(pbi, sizeof(BITMAPINFO)); - pbi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - pbi->bmiHeader.biWidth = 12; - ret = GetDIBits(hdcScreen, hbmp, 0, 5, NULL, pbi, DIB_RGB_COLORS); - ok(ret == 1, "%d\n", ret); - pbi->bmiHeader.biWidth = 0; - pbi->bmiHeader.biSizeImage = 123; - ret = GetDIBits(hdcScreen, hbmp, 0, 5, NULL, pbi, DIB_RGB_COLORS); - ok(ret == 0, "%d\n", ret); - pbi->bmiHeader.biSizeImage = 0; - pbi->bmiHeader.biCompression = BI_RGB; - ret = GetDIBits(hdcScreen, hbmp, 0, 5, NULL, pbi, DIB_RGB_COLORS); - ok(ret == 0, "%d\n", ret); - - DeleteObject(hbmp); - DeleteDC(hdcMem); - ReleaseDC(NULL, hdcScreen); -} - -START_TEST(GetDIBits) -{ - Test_GetDIBits(); -} - diff --git a/rostests/apitests/gdi32/GetObject.c b/rostests/apitests/gdi32/GetObject.c deleted file mode 100644 index 8f47010ac33..00000000000 --- a/rostests/apitests/gdi32/GetObject.c +++ /dev/null @@ -1,462 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for GetObject - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include -#include -#include -#include - -void -Test_General(void) -{ - struct - { - LOGBRUSH logbrush; - BYTE additional[5]; - } TestStruct; - PLOGBRUSH plogbrush; - HBRUSH hBrush; - - /* Test null pointer and invalid handles */ - SetLastError(ERROR_SUCCESS); - ok(GetObjectA(0, 0, NULL) == 0, "\n"); - ok(GetObjectA((HANDLE)-1, 0, NULL) == 0, "\n"); - ok(GetObjectA((HANDLE)0x00380000, 0, NULL) == 0, "\n"); - ok(GetLastError() == ERROR_SUCCESS, "\n"); - - SetLastError(ERROR_SUCCESS); - ok(GetObjectA((HANDLE)GDI_OBJECT_TYPE_DC, 0, NULL) == 0, "\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "\n"); - SetLastError(ERROR_SUCCESS); - ok(GetObjectW((HANDLE)GDI_OBJECT_TYPE_DC, 0, NULL) == 0, "\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "\n"); - SetLastError(ERROR_SUCCESS); - ok(GetObjectA((HANDLE)GDI_OBJECT_TYPE_REGION, 0, NULL) == 0, "\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "\n"); - SetLastError(ERROR_SUCCESS); - ok(GetObjectW((HANDLE)GDI_OBJECT_TYPE_REGION, 0, NULL) == 0, "\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "\n"); - SetLastError(ERROR_SUCCESS); - ok(GetObjectA((HANDLE)GDI_OBJECT_TYPE_EMF, 0, NULL) == 0, "\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "\n"); - SetLastError(ERROR_SUCCESS); - ok(GetObjectW((HANDLE)GDI_OBJECT_TYPE_EMF, 0, NULL) == 0, "\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "\n"); - SetLastError(ERROR_SUCCESS); - ok(GetObjectA((HANDLE)GDI_OBJECT_TYPE_METAFILE, 0, NULL) == 0, "\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "\n"); - SetLastError(ERROR_SUCCESS); - ok(GetObjectW((HANDLE)GDI_OBJECT_TYPE_METAFILE, 0, NULL) == 0, "\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "\n"); - SetLastError(ERROR_SUCCESS); - ok(GetObjectA((HANDLE)GDI_OBJECT_TYPE_ENHMETAFILE, 0, NULL) == 0, "\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "\n"); - SetLastError(ERROR_SUCCESS); - ok(GetObjectW((HANDLE)GDI_OBJECT_TYPE_ENHMETAFILE, 0, NULL) == 0, "\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "\n"); - - /* Test need of alignment */ - hBrush = GetStockObject(WHITE_BRUSH); - plogbrush = (PVOID)((ULONG_PTR)&TestStruct.logbrush); - ok(GetObject(hBrush, sizeof(LOGBRUSH), plogbrush) == sizeof(LOGBRUSH), "\n"); - plogbrush = (PVOID)((ULONG_PTR)&TestStruct.logbrush + 2); - ok(GetObject(hBrush, sizeof(LOGBRUSH), plogbrush) == sizeof(LOGBRUSH), "\n"); - plogbrush = (PVOID)((ULONG_PTR)&TestStruct.logbrush + 1); - ok(GetObject(hBrush, sizeof(LOGBRUSH), plogbrush) == 0, "\n"); -} - -void -Test_Bitmap(void) -{ - HBITMAP hBitmap; - BITMAP bitmap; - DIBSECTION dibsection; - BYTE bData[100] = {0}; - BYTE Buffer[100] = {48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,0}; - - FillMemory(&bitmap, sizeof(BITMAP), 0x77); - hBitmap = CreateBitmap(10,10,1,8,bData); - ok(hBitmap != 0, "CreateBitmap failed, skipping tests.\n"); - if (!hBitmap) return; - - SetLastError(ERROR_SUCCESS); - ok(GetObjectA((HANDLE)GDI_OBJECT_TYPE_BITMAP, 0, NULL) == sizeof(BITMAP), "\n"); - ok(GetObjectW((HANDLE)GDI_OBJECT_TYPE_BITMAP, 0, NULL) == sizeof(BITMAP), "\n"); - ok(GetObjectA((HANDLE)GDI_OBJECT_TYPE_BITMAP, sizeof(BITMAP), NULL) == sizeof(BITMAP), "\n"); - ok(GetObjectA(hBitmap, sizeof(DIBSECTION), NULL) == sizeof(BITMAP), "\n"); - ok(GetObjectA(hBitmap, 0, NULL) == sizeof(BITMAP), "\n"); - ok(GetObjectA((HANDLE)((UINT_PTR)hBitmap & 0x0000ffff), 0, NULL) == sizeof(BITMAP), "\n"); - ok(GetObjectA(hBitmap, 5, NULL) == sizeof(BITMAP), "\n"); - ok(GetObjectA(hBitmap, -5, NULL) == sizeof(BITMAP), "\n"); - ok(GetObjectA(hBitmap, 0, Buffer) == 0, "\n"); - ok(GetObjectA(hBitmap, 5, Buffer) == 0, "\n"); - ok(GetObjectA(hBitmap, sizeof(BITMAP), &bitmap) == sizeof(BITMAP), "\n"); - ok(GetObjectA(hBitmap, sizeof(BITMAP)+2, &bitmap) == sizeof(BITMAP), "\n"); - ok(GetObjectA(hBitmap, sizeof(DIBSECTION), &dibsection) == sizeof(BITMAP), "\n"); - ok(GetObjectA(hBitmap, -5, &bitmap) == sizeof(BITMAP), "\n"); - ok(GetLastError() == ERROR_SUCCESS, "\n"); - - // todo: test invalid handle + buffer - - DeleteObject(hBitmap); -} - -void -Test_Dibsection(void) -{ - BITMAPINFO bmi = {{sizeof(BITMAPINFOHEADER), 10, 9, 1, 8, BI_RGB, 0, 10, 10, 0,0}}; - HBITMAP hBitmap; - BITMAP bitmap; - DIBSECTION dibsection; - PVOID pData; - HDC hDC; - - FillMemory(&dibsection, sizeof(DIBSECTION), 0x77); - hDC = GetDC(0); - hBitmap = CreateDIBSection(hDC, &bmi, DIB_RGB_COLORS, &pData, NULL, 0); - ok(hBitmap != 0, "CreateDIBSection failed, skipping tests.\n"); - if (!hBitmap) return; - - SetLastError(ERROR_SUCCESS); - ok(GetObject(hBitmap, sizeof(DIBSECTION), NULL) == sizeof(BITMAP), "\n"); - ok(GetObject(hBitmap, 0, NULL) == sizeof(BITMAP), "\n"); - ok(GetObject(hBitmap, 5, NULL) == sizeof(BITMAP), "\n"); - ok(GetObject(hBitmap, -5, NULL) == sizeof(BITMAP), "\n"); - ok(GetObject(hBitmap, 0, &dibsection) == 0, "\n"); - ok(GetObject(hBitmap, 5, &dibsection) == 0, "\n"); - ok(GetObject(hBitmap, sizeof(BITMAP), &bitmap) == sizeof(BITMAP), "\n"); - ok(GetObject(hBitmap, sizeof(BITMAP)+2, &bitmap) == sizeof(BITMAP), "\n"); - ok(bitmap.bmType == 0, "\n"); - ok(bitmap.bmWidth == 10, "\n"); - ok(bitmap.bmHeight == 9, "\n"); - ok(bitmap.bmWidthBytes == 12, "\n"); - ok(bitmap.bmPlanes == 1, "\n"); - ok(bitmap.bmBitsPixel == 8, "\n"); - ok(bitmap.bmBits == pData, "\n"); - ok(GetObject(hBitmap, sizeof(DIBSECTION), &dibsection) == sizeof(DIBSECTION), "\n"); - ok(GetObject(hBitmap, sizeof(DIBSECTION)+2, &dibsection) == sizeof(DIBSECTION), "\n"); - ok(GetObject(hBitmap, -5, &dibsection) == sizeof(DIBSECTION), "\n"); - ok(GetLastError() == ERROR_SUCCESS, "\n"); - DeleteObject(hBitmap); - ReleaseDC(0, hDC); -} - -void -Test_Palette(void) -{ - LOGPALETTE logpal; - HPALETTE hPalette; - WORD wPalette; - - FillMemory(&wPalette, sizeof(WORD), 0x77); - logpal.palVersion = 0x0300; - logpal.palNumEntries = 1; - logpal.palPalEntry[0].peRed = 0; - logpal.palPalEntry[0].peGreen = 0; - logpal.palPalEntry[0].peBlue = 0; - logpal.palPalEntry[0].peFlags = PC_EXPLICIT; - hPalette = CreatePalette(&logpal); - ok(hPalette != 0, "CreatePalette failed, skipping tests.\n"); - if (!hPalette) return; - - SetLastError(ERROR_SUCCESS); - ok(GetObjectA((HANDLE)GDI_OBJECT_TYPE_PALETTE, 0, NULL) == sizeof(WORD), "\n"); - ok(GetObjectW((HANDLE)GDI_OBJECT_TYPE_PALETTE, 0, NULL) == sizeof(WORD), "\n"); - ok(GetObject(hPalette, sizeof(WORD), NULL) == sizeof(WORD), "\n"); - ok(GetObject(hPalette, 0, NULL) == sizeof(WORD), "\n"); - ok(GetObject(hPalette, 5, NULL) == sizeof(WORD), "\n"); - ok(GetObject(hPalette, -5, NULL) == sizeof(WORD), "\n"); - ok(GetObject(hPalette, sizeof(WORD), &wPalette) == sizeof(WORD), "\n"); - ok(GetObject(hPalette, sizeof(WORD)+2, &wPalette) == sizeof(WORD), "\n"); - ok(GetObject(hPalette, 0, &wPalette) == 0, "\n"); - ok(GetObject(hPalette, 1, &wPalette) == 0, "\n"); - ok(GetObject(hPalette, -1, &wPalette) == sizeof(WORD), "\n"); - ok(GetLastError() == ERROR_SUCCESS, "\n"); - DeleteObject(hPalette); -} - -void -Test_Brush(void) -{ - LOGBRUSH logbrush; - HBRUSH hBrush; - - FillMemory(&logbrush, sizeof(LOGBRUSH), 0x77); - hBrush = CreateSolidBrush(RGB(1,2,3)); - ok(hBrush != 0, "CreateSolidBrush failed, skipping tests.\n"); - if (!hBrush) return; - - SetLastError(ERROR_SUCCESS); - ok(GetObjectA((HANDLE)GDI_OBJECT_TYPE_BRUSH, 0, NULL) == sizeof(LOGBRUSH), "\n"); - ok(GetObjectW((HANDLE)GDI_OBJECT_TYPE_BRUSH, 0, NULL) == sizeof(LOGBRUSH), "\n"); - ok(GetObject(hBrush, sizeof(WORD), NULL) == sizeof(LOGBRUSH), "\n"); - ok(GetObject(hBrush, 0, NULL) == sizeof(LOGBRUSH), "\n"); - ok(GetObject(hBrush, 5, NULL) == sizeof(LOGBRUSH), "\n"); - ok(GetObject(hBrush, -5, NULL) == sizeof(LOGBRUSH), "\n"); - - ok(GetObject(hBrush, 0, &logbrush) == 0, "\n"); - ok(logbrush.lbStyle == 0x77777777, "\n"); - ok(GetObject(hBrush, 5, &logbrush) == sizeof(LOGBRUSH), "\n"); - ok(logbrush.lbStyle == 0, "\n"); - ok(logbrush.lbColor == 0x77777701, "\n"); - - ok(GetObject(hBrush, sizeof(LOGBRUSH), &logbrush) == sizeof(LOGBRUSH), "\n"); - ok(GetObject(hBrush, sizeof(LOGBRUSH)+2, &logbrush) == sizeof(LOGBRUSH), "\n"); - ok(GetObject(hBrush, -1, &logbrush) == sizeof(LOGBRUSH), "\n"); - // TODO: test all members - - ok(GetLastError() == ERROR_SUCCESS, "\n"); - DeleteObject(hBrush); -} - -void -Test_Pen(void) -{ - LOGPEN logpen; - HPEN hPen; - - FillMemory(&logpen, sizeof(LOGPEN), 0x77); - hPen = CreatePen(PS_SOLID, 3, RGB(4,5,6)); - ok(hPen != 0, "CreatePen failed, skipping tests.\n"); - if (!hPen) return; - SetLastError(ERROR_SUCCESS); - ok(GetObjectA((HANDLE)GDI_OBJECT_TYPE_PEN, 0, NULL) == sizeof(LOGPEN), "\n"); - ok(GetObjectW((HANDLE)GDI_OBJECT_TYPE_PEN, 0, NULL) == sizeof(LOGPEN), "\n"); - ok(GetObject(hPen, sizeof(BITMAP), NULL) == sizeof(LOGPEN), "\n"); - ok(GetObject(hPen, 0, NULL) == sizeof(LOGPEN), "\n"); - ok(GetObject(hPen, 5, NULL) == sizeof(LOGPEN), "\n"); - ok(GetObject(hPen, -5, NULL) == sizeof(LOGPEN), "\n"); - ok(GetObject(hPen, sizeof(LOGPEN), &logpen) == sizeof(LOGPEN), "\n"); - ok(GetObject(hPen, sizeof(LOGPEN)-1, &logpen) == 0, "\n"); - ok(GetObject(hPen, sizeof(LOGPEN)+2, &logpen) == sizeof(LOGPEN), "\n"); - ok(GetObject(hPen, 0, &logpen) == 0, "\n"); - ok(GetObject(hPen, -5, &logpen) == sizeof(LOGPEN), "\n"); - ok(GetLastError() == ERROR_SUCCESS, "\n"); - - /* test if the fields are filled correctly */ - ok(logpen.lopnStyle == PS_SOLID, "\n"); - - - DeleteObject(hPen); -} - -void -Test_ExtPen(void) -{ - HPEN hPen; - EXTLOGPEN extlogpen; - LOGBRUSH logbrush; - DWORD dwStyles[17] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}; - struct - { - EXTLOGPEN extlogpen; - DWORD dwStyles[50]; - } elpUserStyle; - - SetLastError(ERROR_SUCCESS); - ok(GetObjectA((HANDLE)GDI_OBJECT_TYPE_EXTPEN, 0, NULL) == 0, "\n"); - ok(GetObjectW((HANDLE)GDI_OBJECT_TYPE_EXTPEN, 0, NULL) == 0, "\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "\n"); - - FillMemory(&extlogpen, sizeof(EXTLOGPEN), 0x77); - logbrush.lbStyle = BS_SOLID; - logbrush.lbColor = RGB(1,2,3); - logbrush.lbHatch = 22; - hPen = ExtCreatePen(PS_GEOMETRIC | PS_DASH, 5, &logbrush, 0, NULL); - - ok(GDI_HANDLE_GET_TYPE(hPen) == GDI_OBJECT_TYPE_EXTPEN, "\n"); - ok(GetObject((HANDLE)GDI_OBJECT_TYPE_EXTPEN, 0, NULL) == 0, "\n"); - ok(GetObject(hPen, sizeof(EXTLOGPEN), NULL) == sizeof(EXTLOGPEN)-sizeof(DWORD), "\n"); - ok(GetObject(hPen, 0, NULL) == sizeof(EXTLOGPEN)-sizeof(DWORD), "\n"); - ok(GetObject((HANDLE)GDI_HANDLE_GET_INDEX(hPen), 0, NULL) == sizeof(EXTLOGPEN)-sizeof(DWORD), "\n"); - ok(GetObject(hPen, 5, NULL) == sizeof(EXTLOGPEN)-sizeof(DWORD), "\n"); - ok(GetObject(hPen, -5, NULL) == sizeof(EXTLOGPEN)-sizeof(DWORD), "\n"); - ok(GetObject(hPen, 0, &extlogpen) == 0, "\n"); - ok(GetObject(hPen, 4, &extlogpen) == 0, "\n"); - - /* Nothing should be filled */ - ok(extlogpen.elpPenStyle == 0x77777777, "\n"); - ok(extlogpen.elpWidth == 0x77777777, "\n"); - - ok(GetObject(hPen, sizeof(EXTLOGPEN), &extlogpen) == sizeof(EXTLOGPEN)-sizeof(DWORD), "\n"); - ok(GetObject(hPen, sizeof(EXTLOGPEN)-sizeof(DWORD), &extlogpen) == sizeof(EXTLOGPEN)-sizeof(DWORD), "\n"); - ok(GetObject(hPen, sizeof(EXTLOGPEN)-sizeof(DWORD)-1, &extlogpen) == 0, "\n"); - ok(GetObject(hPen, sizeof(EXTLOGPEN)+2, &extlogpen) == sizeof(EXTLOGPEN)-sizeof(DWORD), "\n"); - ok(GetObject(hPen, -5, &extlogpen) == sizeof(EXTLOGPEN)-sizeof(DWORD), "\n"); - - /* test if the fields are filled correctly */ - ok(extlogpen.elpPenStyle == (PS_GEOMETRIC | PS_DASH), "\n"); - ok(extlogpen.elpWidth == 5, "\n"); - ok(extlogpen.elpBrushStyle == 0, "\n"); - ok(extlogpen.elpColor == RGB(1,2,3), "\n"); - ok(extlogpen.elpHatch == 22, "\n"); - ok(extlogpen.elpNumEntries == 0, "\n"); - DeleteObject(hPen); - - /* A maximum of 16 Styles is allowed */ - hPen = ExtCreatePen(PS_GEOMETRIC | PS_USERSTYLE, 5, &logbrush, 16, (CONST DWORD*)&dwStyles); - ok(GetObject(hPen, 0, NULL) == sizeof(EXTLOGPEN) + 15*sizeof(DWORD), "\n"); - ok(GetObject(hPen, sizeof(EXTLOGPEN) + 15*sizeof(DWORD), &elpUserStyle) == sizeof(EXTLOGPEN) + 15*sizeof(DWORD), "\n"); - ok(((EXTLOGPEN*)&elpUserStyle)->elpStyleEntry[0] == 0, "\n"); - ok(((EXTLOGPEN*)&elpUserStyle)->elpStyleEntry[1] == 1, "\n"); - ok(((EXTLOGPEN*)&elpUserStyle)->elpStyleEntry[15] == 15, "\n"); - DeleteObject(hPen); -} - -void -Test_Font(void) -{ - HFONT hFont; - LOGFONTA logfonta; - LOGFONTW logfontw; - EXTLOGFONTA extlogfonta; - EXTLOGFONTW extlogfontw; - ENUMLOGFONTEXA enumlogfontexa; - ENUMLOGFONTEXW enumlogfontexw; - ENUMLOGFONTEXDVA enumlogfontexdva; - ENUMLOGFONTEXDVW enumlogfontexdvw; - ENUMLOGFONTA enumlogfonta; - ENUMLOGFONTW enumlogfontw; - BYTE bData[270]; - - FillMemory(&logfonta, sizeof(LOGFONTA), 0x77); - hFont = CreateFontA(8, 8, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, - ANSI_CHARSET, OUT_CHARACTER_PRECIS, CLIP_CHARACTER_PRECIS, - ANTIALIASED_QUALITY, DEFAULT_PITCH, "testfont"); - ok(hFont != 0, "\n"); - - SetLastError(ERROR_SUCCESS); - ok(GetObjectA((HANDLE)GDI_OBJECT_TYPE_FONT, 0, NULL) == sizeof(LOGFONTA), "\n"); - ok(GetObjectW((HANDLE)GDI_OBJECT_TYPE_FONT, 0, NULL) == sizeof(LOGFONTW), "\n"); - ok(GetObjectA((HANDLE)GDI_OBJECT_TYPE_FONT, sizeof(LOGFONTA), NULL) == sizeof(LOGFONTA), "\n"); // 60 - ok(GetObjectA((HANDLE)GDI_OBJECT_TYPE_FONT, sizeof(ENUMLOGFONTA), NULL) == sizeof(LOGFONTA), "\n"); // 156 - ok(GetObjectA((HANDLE)GDI_OBJECT_TYPE_FONT, sizeof(ENUMLOGFONTEXA), NULL) == sizeof(LOGFONTA), "\n"); // 188 - ok(GetObjectA((HANDLE)GDI_OBJECT_TYPE_FONT, sizeof(EXTLOGFONTA), NULL) == sizeof(LOGFONTA), "\n"); // 192 - ok(GetObjectA((HANDLE)GDI_OBJECT_TYPE_FONT, sizeof(ENUMLOGFONTEXDVA), NULL) == sizeof(LOGFONTA), "\n"); // 260 - ok(GetObjectA((HANDLE)GDI_OBJECT_TYPE_FONT, sizeof(ENUMLOGFONTEXDVA)+1, NULL) == sizeof(LOGFONTA), "\n"); // 260 - ok(GetObjectW((HANDLE)GDI_OBJECT_TYPE_FONT, sizeof(LOGFONTW), NULL) == sizeof(LOGFONTW), "\n"); // 92 - ok(GetObjectW((HANDLE)GDI_OBJECT_TYPE_FONT, sizeof(ENUMLOGFONTW), NULL) == sizeof(LOGFONTW), "\n"); // 284 - ok(GetObjectW((HANDLE)GDI_OBJECT_TYPE_FONT, sizeof(EXTLOGFONTW), NULL) == sizeof(LOGFONTW), "\n"); // 320 - ok(GetObjectW((HANDLE)GDI_OBJECT_TYPE_FONT, sizeof(ENUMLOGFONTEXW), NULL) == sizeof(LOGFONTW), "\n"); // 348 - ok(GetObjectW((HANDLE)GDI_OBJECT_TYPE_FONT, sizeof(ENUMLOGFONTEXDVW), NULL) == sizeof(LOGFONTW), "\n"); // 420 - ok(GetObjectW((HANDLE)GDI_OBJECT_TYPE_FONT, sizeof(ENUMLOGFONTEXDVW)+1, NULL) == sizeof(LOGFONTW), "\n"); // 356! - - ok(GetObjectA(hFont, sizeof(LOGFONTA), NULL) == sizeof(LOGFONTA), "\n"); - ok(GetObjectA(hFont, 0, NULL) == sizeof(LOGFONTA), "\n"); - ok(GetObjectA(hFont, 5, NULL) == sizeof(LOGFONTA), "\n"); - ok(GetObjectA(hFont, -5, NULL) == sizeof(LOGFONTA), "\n"); - ok(GetObjectA(hFont, 0, &logfonta) == 0, "\n"); - ok(logfonta.lfHeight == 0x77777777, "\n"); - - ok(GetObjectA(hFont, 5, &logfonta) == 5, "\n"); - ok(logfonta.lfHeight == 8, "\n"); - ok(logfonta.lfWidth == 0x77777708, "\n"); - - ok(GetObjectA(hFont, sizeof(LOGFONTA), &logfonta) == sizeof(LOGFONTA), "\n"); // 60 - ok(GetObjectA(hFont, sizeof(LOGFONTW), &logfontw) == sizeof(LOGFONTA), "\n"); // 92 - ok(GetObjectA(hFont, sizeof(EXTLOGFONTA), &extlogfonta) == sizeof(EXTLOGFONTA), "\n"); // 192 - ok(GetObjectA(hFont, sizeof(EXTLOGFONTA)+1, &extlogfonta) == sizeof(EXTLOGFONTA)+1, "\n"); // 192 - ok(GetObjectA(hFont, sizeof(EXTLOGFONTW), &extlogfontw) == sizeof(ENUMLOGFONTEXDVA), "\n"); // 320 - - ok(GetObjectA(hFont, 261, &bData) == 260, "\n"); // no - - /* LOGFONT / GetObjectW */ - FillMemory(&logfontw, sizeof(LOGFONTW), 0x77); - - ok(GetObjectW(hFont, sizeof(LOGFONTW), NULL) == sizeof(LOGFONTW), "\n"); - ok(GetObjectW(hFont, 0, NULL) == sizeof(LOGFONTW), "\n"); - ok(GetObjectW(hFont, 5, NULL) == sizeof(LOGFONTW), "\n"); - ok(GetObjectW(hFont, -5, NULL) == sizeof(LOGFONTW), "\n"); - ok(GetObjectW(hFont, 0, &logfontw) == 0, "\n"); - ok(logfontw.lfHeight == 0x77777777, "\n"); - - ok(GetObjectW(hFont, 5, &logfontw) == 5, "\n"); - ok(logfontw.lfHeight == 8, "\n"); - ok(logfontw.lfWidth == 0x77777708, "\n"); - - ok(GetObjectA(hFont, sizeof(LOGFONTA), &logfonta) == sizeof(LOGFONTA), "\n"); // 60 - ok(logfonta.lfHeight == 8, "\n"); - ok(GetObjectA(hFont, sizeof(ENUMLOGFONTA), &enumlogfonta) == sizeof(ENUMLOGFONTA), "\n"); // 156 - ok(GetObjectA(hFont, sizeof(ENUMLOGFONTEXA), &enumlogfontexa) == sizeof(ENUMLOGFONTEXA), "\n"); // 188 - ok(GetObjectA(hFont, sizeof(EXTLOGFONTA), &extlogfonta) == sizeof(EXTLOGFONTA), "\n"); // 192 - ok(GetObjectA(hFont, sizeof(ENUMLOGFONTEXDVA), &enumlogfontexdva) == sizeof(ENUMLOGFONTEXDVA), "\n"); // 260 - ok(GetObjectA(hFont, sizeof(ENUMLOGFONTEXDVA)+1, &enumlogfontexdva) == sizeof(ENUMLOGFONTEXDVA), "\n"); // 260 - - ok(GetObjectW(hFont, sizeof(LOGFONTW), &logfontw) == sizeof(LOGFONTW), "\n"); // 92 - ok(GetObjectW(hFont, sizeof(ENUMLOGFONTW), &enumlogfontw) == sizeof(ENUMLOGFONTW), "\n"); // 284 - ok(GetObjectW(hFont, sizeof(EXTLOGFONTW), &extlogfontw) == sizeof(EXTLOGFONTW), "\n"); // 320 - ok(GetObjectW(hFont, sizeof(ENUMLOGFONTEXW), &enumlogfontexw) == sizeof(ENUMLOGFONTEXW), "\n"); // 348 - ok(GetObjectW(hFont, sizeof(ENUMLOGFONTEXDVW), &enumlogfontexdvw) == sizeof(ENUMLOGFONTEXW) + 2*sizeof(DWORD), "\n"); // 420 - ok(GetObjectW(hFont, sizeof(ENUMLOGFONTEXDVW)+1, &enumlogfontexdvw) == sizeof(ENUMLOGFONTEXW) + 2*sizeof(DWORD), "\n"); // 356! - - ok(GetObjectW(hFont, 356, &bData) == 356, "\n"); - ok(GetLastError() == ERROR_SUCCESS, "\n"); - - DeleteObject(hFont); -} - -void -Test_Colorspace(void) -{ - SetLastError(ERROR_SUCCESS); - ok(GetObjectA((HANDLE)GDI_OBJECT_TYPE_COLORSPACE, 0, NULL) == 60, "\n");// FIXME: what structure? - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "\n"); - SetLastError(ERROR_SUCCESS); - ok(GetObjectW((HANDLE)GDI_OBJECT_TYPE_COLORSPACE, 0, NULL) == 0, "\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "\n"); -} - -void -Test_MetaDC(void) -{ - /* Windows does not SetLastError() on a metadc, but it doesn't seem to do anything with it */ - HDC hMetaDC; - BYTE buffer[100]; - - hMetaDC = CreateMetaFile(NULL); - ok(hMetaDC != 0, "CreateMetaFile failed, skipping tests.\n"); - if(!hMetaDC) return; - - ok(((UINT_PTR)hMetaDC & GDI_HANDLE_TYPE_MASK) == GDI_OBJECT_TYPE_METADC, "\n"); - - SetLastError(ERROR_SUCCESS); - ok(GetObjectA((HANDLE)GDI_OBJECT_TYPE_METADC, 0, NULL) == 0, "\n"); - ok(GetObjectA((HANDLE)GDI_OBJECT_TYPE_METADC, 100, &buffer) == 0, "\n"); - ok(GetObjectA(hMetaDC, 0, NULL) == 0, "\n"); - ok(GetObjectA(hMetaDC, 100, &buffer) == 0, "\n"); - ok(GetLastError() == ERROR_SUCCESS, "\n"); -} - -void -Test_Region(void) -{ - HRGN hRgn; - hRgn = CreateRectRgn(0,0,5,5); - SetLastError(ERROR_SUCCESS); - ok(GetObjectW(hRgn, 0, NULL) == 0, "\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "\n"); - DeleteObject(hRgn); -} - -START_TEST(GetObject) -{ - - Test_Font(); - Test_Colorspace(); - Test_General(); - Test_Bitmap(); - Test_Dibsection(); - Test_Palette(); - Test_Brush(); - Test_Pen(); - Test_ExtPen(); // not implemented yet in ROS - Test_MetaDC(); - Test_Region(); -} - diff --git a/rostests/apitests/gdi32/GetPixel.c b/rostests/apitests/gdi32/GetPixel.c deleted file mode 100644 index 27dcd431af5..00000000000 --- a/rostests/apitests/gdi32/GetPixel.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for GetPixel - * PROGRAMMERS: Jérôme Gardou - */ - -#include -#include -#include - - -void Test_GetPixel_1bpp() -{ - HDC hdc; - HBITMAP hbmp; - char buffer[] = {0x80, 0x0}; - COLORREF color; - - hbmp = CreateBitmap(2,1,1,1,buffer); - ok(hbmp != NULL, "Failed to create a monochrom bitmap...\n"); - hdc = CreateCompatibleDC(0); - hbmp = SelectObject(hdc, hbmp); - ok(hbmp != NULL, "Could not select the bitmap into the DC.\n"); - - color = GetPixel(hdc, 0, 0); - ok(color == 0xFFFFFF, "Wrong color at 0,0 : 0x%08x\n", (UINT)color); - color = GetPixel(hdc, 1, 0); - ok(color == 0, "Wrong color at 1,0 : 0x%08x\n", (UINT)color); - - SetBkColor(hdc, 0x12345678); - SetTextColor(hdc, 0x87654321); - color = GetPixel(hdc, 0, 0); - ok(color == 0xFFFFFF, "Wrong color at 0,0 : 0x%08x\n", (UINT)color); - color = GetPixel(hdc, 1, 0); - ok(color == 0, "Wrong color at 1,0 : 0x%08x\n", (UINT)color); - - hbmp = SelectObject(hdc, hbmp); - DeleteObject(hbmp); - DeleteDC(hdc); -} - -START_TEST(GetPixel) -{ - Test_GetPixel_1bpp(); -} diff --git a/rostests/apitests/gdi32/GetStockObject.c b/rostests/apitests/gdi32/GetStockObject.c deleted file mode 100644 index 462d4f197f1..00000000000 --- a/rostests/apitests/gdi32/GetStockObject.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for GetStockObject - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include -#include -#include -#include - -#define TEST(x) ok(x, #x"\n") -#define RTEST(x) ok(x, #x"\n") - -void Test_GetStockObject() -{ - /* Test limits and error */ - SetLastError(ERROR_SUCCESS); - RTEST(GetStockObject(0) != NULL); - TEST(GetStockObject(20) != NULL); - RTEST(GetStockObject(21) != NULL); - RTEST(GetStockObject(-1) == NULL); - RTEST(GetStockObject(9) == NULL); - RTEST(GetStockObject(22) == NULL); - RTEST(GetLastError() == ERROR_SUCCESS); - - /* Test for the stock bit */ - RTEST((UINT_PTR)GetStockObject(WHITE_BRUSH) && GDI_HANDLE_STOCK_MASK); - - /* Test for correct types */ - RTEST(GDI_HANDLE_GET_TYPE(GetStockObject(WHITE_BRUSH)) == GDI_OBJECT_TYPE_BRUSH); /* 0 */ - RTEST(GDI_HANDLE_GET_TYPE(GetStockObject(LTGRAY_BRUSH)) == GDI_OBJECT_TYPE_BRUSH); /* 1 */ - RTEST(GDI_HANDLE_GET_TYPE(GetStockObject(GRAY_BRUSH)) == GDI_OBJECT_TYPE_BRUSH); /* 1 */ - RTEST(GDI_HANDLE_GET_TYPE(GetStockObject(DKGRAY_BRUSH)) == GDI_OBJECT_TYPE_BRUSH); /* 1 */ - RTEST(GDI_HANDLE_GET_TYPE(GetStockObject(BLACK_BRUSH)) == GDI_OBJECT_TYPE_BRUSH); /* 1 */ - RTEST(GDI_HANDLE_GET_TYPE(GetStockObject(NULL_BRUSH)) == GDI_OBJECT_TYPE_BRUSH); /* 1 */ - RTEST(GDI_HANDLE_GET_TYPE(GetStockObject(WHITE_PEN)) == GDI_OBJECT_TYPE_PEN); /* 6 */ - RTEST(GDI_HANDLE_GET_TYPE(GetStockObject(BLACK_PEN)) == GDI_OBJECT_TYPE_PEN); /* 7 */ - RTEST(GDI_HANDLE_GET_TYPE(GetStockObject(NULL_PEN)) == GDI_OBJECT_TYPE_PEN); /* 8 */ - RTEST(GDI_HANDLE_GET_TYPE(GetStockObject(OEM_FIXED_FONT)) == GDI_OBJECT_TYPE_FONT); /* 10 */ - RTEST(GDI_HANDLE_GET_TYPE(GetStockObject(ANSI_FIXED_FONT)) == GDI_OBJECT_TYPE_FONT); /* 11 */ - TEST(GDI_HANDLE_GET_TYPE(GetStockObject(ANSI_VAR_FONT)) == GDI_OBJECT_TYPE_FONT); /* 12 */ - RTEST(GDI_HANDLE_GET_TYPE(GetStockObject(SYSTEM_FONT)) == GDI_OBJECT_TYPE_FONT); /* 13 */ - RTEST(GDI_HANDLE_GET_TYPE(GetStockObject(DEVICE_DEFAULT_FONT)) == GDI_OBJECT_TYPE_FONT); /* 14 */ - RTEST(GDI_HANDLE_GET_TYPE(GetStockObject(DEFAULT_PALETTE)) == GDI_OBJECT_TYPE_PALETTE); /* 15 */ - RTEST(GDI_HANDLE_GET_TYPE(GetStockObject(SYSTEM_FIXED_FONT)) == GDI_OBJECT_TYPE_FONT); /* 16 */ - RTEST(GDI_HANDLE_GET_TYPE(GetStockObject(DEFAULT_GUI_FONT)) == GDI_OBJECT_TYPE_FONT); /* 17 */ - RTEST(GDI_HANDLE_GET_TYPE(GetStockObject(DC_BRUSH)) == GDI_OBJECT_TYPE_BRUSH); /* 18 */ - RTEST(GDI_HANDLE_GET_TYPE(GetStockObject(DC_PEN)) == GDI_OBJECT_TYPE_PEN); /* 19 */ - TEST(GDI_HANDLE_GET_TYPE(GetStockObject(20)) == GDI_OBJECT_TYPE_COLORSPACE); /* 20 */ - RTEST(GDI_HANDLE_GET_TYPE(GetStockObject(21)) == GDI_OBJECT_TYPE_BITMAP); /* 21 */ -} - -START_TEST(GetStockObject) -{ - Test_GetStockObject(); -} - diff --git a/rostests/apitests/gdi32/GetTextExtentExPoint.c b/rostests/apitests/gdi32/GetTextExtentExPoint.c deleted file mode 100644 index b0368363c65..00000000000 --- a/rostests/apitests/gdi32/GetTextExtentExPoint.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for GetTextExtentExPoint - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -#define TEST(x) ok(x, #x"\n") -#define RTEST(x) ok(x, #x"\n") - -void Test_GetTextExtentExPoint() -{ - INT nFit; - SIZE size; - BOOL result; - - SetLastError(0); - - result = GetTextExtentExPointA(GetDC(0), "test", 4, 1000, &nFit, NULL, &size); - TEST(result == 1); - TEST(nFit == 4); - TEST(GetLastError() == 0); - printf("nFit = %d\n", nFit); - - result = GetTextExtentExPointA(GetDC(0), "test", 4, 1, &nFit, NULL, &size); - TEST(result == 1); - TEST(nFit == 0); - TEST(GetLastError() == 0); - printf("nFit = %d\n", nFit); - - result = GetTextExtentExPointA(GetDC(0), "test", 4, 0, &nFit, NULL, &size); - TEST(result == 1); - TEST(nFit == 0); - TEST(GetLastError() == 0); - - result = GetTextExtentExPointA(GetDC(0), "test", 4, -1, &nFit, NULL, &size); - TEST(result == 1); - TEST(nFit == 4); - TEST(GetLastError() == 0); - - result = GetTextExtentExPointA(GetDC(0), "test", 4, -2, &nFit, NULL, &size); - TEST(result == 0); - TEST(GetLastError() == 87); - - result = GetTextExtentExPointW(GetDC(0), L"test", 4, -10, &nFit, NULL, &size); - TEST(result == 1); - - result = GetTextExtentExPointA(GetDC(0), "test", 4, -10, &nFit, NULL, &size); - TEST(result == 0); -} - -START_TEST(GetTextExtentExPoint) -{ - Test_GetTextExtentExPoint(); -} - diff --git a/rostests/apitests/gdi32/GetTextFace.c b/rostests/apitests/gdi32/GetTextFace.c deleted file mode 100644 index 7e6c7f97487..00000000000 --- a/rostests/apitests/gdi32/GetTextFace.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for GetTextFace - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -#define TEST(x) ok(x, #x"\n") -#define RTEST(x) ok(x, #x"\n") - -void Test_GetTextFace() -{ - HDC hDC; - INT ret; - INT ret2; - WCHAR Buffer[20]; - - hDC = CreateCompatibleDC(NULL); - ok(hDC != 0, "CreateCompatibleDC failed, skipping tests.\n"); - if (!hDC) return; - - /* Whether asking for the string size (NULL buffer) ignores the size argument */ - SetLastError(0xE000BEEF); - ret = GetTextFaceW(hDC, 0, NULL); - TEST(ret != 0); - ok(GetLastError() == 0xE000BEEF, "GetLastError() == %ld\n", GetLastError()); - ret2 = ret; - - SetLastError(0xE000BEEF); - ret = GetTextFaceW(hDC, -1, NULL); - TEST(ret != 0); - TEST(ret == ret2); - ok(GetLastError() == 0xE000BEEF, "GetLastError() == %ld\n", GetLastError()); - ret2 = ret; - - SetLastError(0xE000BEEF); - ret = GetTextFaceW(hDC, 10000, NULL); - TEST(ret != 0); - TEST(ret == ret2); - ok(GetLastError() == 0xE000BEEF, "GetLastError() == %ld\n", GetLastError()); - ret2 = ret; - - /* Whether the buffer is correctly filled */ - SetLastError(0xE000BEEF); - ret = GetTextFaceW(hDC, 20, Buffer); - TEST(ret != 0); - TEST(ret <= 20); - TEST(Buffer[ret - 1] == 0); - ok(GetLastError() == 0xE000BEEF, "GetLastError() == %ld\n", GetLastError()); - - SetLastError(0xE000BEEF); - ret = GetTextFaceW(hDC, 1, Buffer); - TEST(ret == 1); - TEST(Buffer[ret - 1] == 0); - ok(GetLastError() == 0xE000BEEF, "GetLastError() == %ld\n", GetLastError()); - - SetLastError(0xE000BEEF); - ret = GetTextFaceW(hDC, 2, Buffer); - TEST(ret == 2); - TEST(Buffer[ret - 1] == 0); - ok(GetLastError() == 0xE000BEEF, "GetLastError() == %ld\n", GetLastError()); - - /* Whether invalid buffer sizes are correctly ignored */ - SetLastError(0xE000BEEF); - ret = GetTextFaceW(hDC, 0, Buffer); - TEST(ret == 0); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError() == %ld\n", GetLastError()); - - SetLastError(0xE000BEEF); - ret = GetTextFaceW(hDC, -1, Buffer); - TEST(ret == 0); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError() == %ld\n", GetLastError()); - - DeleteDC(hDC); -} - -START_TEST(GetTextFace) -{ - Test_GetTextFace(); -} - diff --git a/rostests/apitests/gdi32/MaskBlt.c b/rostests/apitests/gdi32/MaskBlt.c deleted file mode 100644 index 3226664ff53..00000000000 --- a/rostests/apitests/gdi32/MaskBlt.c +++ /dev/null @@ -1,148 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for GdiReleaseLocalDC - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -void Test_MaskBlt_1bpp() -{ - HDC hdcDst, hdcSrc; - BITMAPINFO bmi = {{sizeof(BITMAPINFOHEADER), 8, 1, 1, 1, BI_RGB, 0, 10, 10, 0,0}}; - HBITMAP hbmDst, hbmSrc, hbmMsk; - PUCHAR pjBitsDst, pjBitsSrc, pjBitsMsk; - BOOL ret; - - /* Create a dest dc and bitmap */ - hdcDst = CreateCompatibleDC(NULL); - hbmDst = CreateDIBSection(hdcDst, &bmi, DIB_RGB_COLORS, (PVOID*)&pjBitsDst, NULL, 0); - SelectObject(hdcDst, hbmDst); - - /* Create a source dc and bitmap */ - hdcSrc = CreateCompatibleDC(NULL); - hbmSrc = CreateDIBSection(hdcSrc, &bmi, DIB_RGB_COLORS, (PVOID*)&pjBitsSrc, NULL, 0); - SelectObject(hdcSrc, hbmSrc); - - /* Create a 1 bpp mask bitmap */ - hbmMsk = CreateDIBSection(hdcDst, &bmi, DIB_RGB_COLORS, (PVOID*)&pjBitsMsk, NULL, 0); - - /* Do the masking */ - pjBitsDst[0] = 0xAA; - pjBitsSrc[0] = 0xCC; - pjBitsMsk[0] = 0xF0; - ret = MaskBlt(hdcDst, 0, 0, 8, 1, hdcSrc, 0, 0, hbmMsk, 0, 0, MAKEROP4(SRCCOPY, 0xAA0000)); - ok(ret == 1, "MaskBlt failed (%d)\n", ret); - ok (pjBitsDst[0] == 0xCA, "pjBitsDst[0] == 0x%x\n", pjBitsDst[0]); - - pjBitsDst[0] = 0x00; - pjBitsSrc[0] = 0xFF; - pjBitsMsk[0] = 0xF0; - ret = MaskBlt(hdcDst, 0, 0, 8, 1, hdcSrc, 0, 0, hbmMsk, 0, 0, MAKEROP4(SRCCOPY, 0xAA0000)); - ok(ret == 1, "MaskBlt failed (%d)\n", ret); - ok (pjBitsDst[0] == 0xF0, "pjBitsDst[0] == 0x%x\n", pjBitsDst[0]); - -} - -void Test_MaskBlt_16bpp() -{ - HDC hdcDst, hdcSrc; - BITMAPINFO bmi1 = {{sizeof(BITMAPINFOHEADER), 8, 1, 1, 1, BI_RGB, 0, 10, 10, 0,0}}; - BITMAPINFO bmi32 = {{sizeof(BITMAPINFOHEADER), 8, 1, 1, 16, BI_RGB, 0, 10, 10, 0,0}}; - HBITMAP hbmDst, hbmSrc, hbmMsk; - PUCHAR pjBitsMsk; - PUSHORT pusBitsDst, pusBitsSrc; - BOOL ret; - - /* Create a dest dc and bitmap */ - hdcDst = CreateCompatibleDC(NULL); - hbmDst = CreateDIBSection(hdcDst, &bmi32, DIB_RGB_COLORS, (PVOID*)&pusBitsDst, NULL, 0); - SelectObject(hdcDst, hbmDst); - - /* Create a source dc and bitmap */ - hdcSrc = CreateCompatibleDC(NULL); - hbmSrc = CreateDIBSection(hdcSrc, &bmi32, DIB_RGB_COLORS, (PVOID*)&pusBitsSrc, NULL, 0); - SelectObject(hdcSrc, hbmSrc); - ok(hdcSrc && hbmSrc, "\n"); - - /* Create a 1 bpp mask bitmap */ - hbmMsk = CreateDIBSection(hdcDst, &bmi1, DIB_RGB_COLORS, (PVOID*)&pjBitsMsk, NULL, 0); - ok(hbmMsk != 0, "CreateDIBSection failed\n"); - - /* Do the masking */ - pusBitsDst[0] = 0x1234; - pusBitsDst[1] = 0x5678; - pusBitsSrc[0] = 0x4321; - pusBitsSrc[1] = 0x8765; - pjBitsMsk[0] = 0x80; - ret = MaskBlt(hdcDst, 0, 0, 8, 1, hdcSrc, 0, 0, hbmMsk, 0, 0, MAKEROP4(SRCCOPY, 0xAA0000)); - ok(ret == 1, "MaskBlt failed (%d)\n", ret); - ok (pusBitsDst[0] == 0x4321, "pusBitsDst[0] == 0x%x\n", pusBitsDst[0]); - ok (pusBitsDst[1] == 0x5678, "pusBitsDst[0] == 0x%x\n", pusBitsDst[1]); - - pusBitsDst[0] = 0x1234; - pusBitsDst[1] = 0x5678; - ret = MaskBlt(hdcDst, 0, 0, 8, 1, hdcSrc, 0, 0, hbmMsk, 0, 0, MAKEROP4(SRCPAINT, MERGEPAINT)); - ok(ret == 1, "MaskBlt failed (%d)\n", ret); - ok (pusBitsDst[0] == 0x5335, "pusBitsDst[0] == 0x%x\n", pusBitsDst[0]); - ok (pusBitsDst[1] == 0x7efa, "pusBitsDst[0] == 0x%x\n", pusBitsDst[1]); -} - -void Test_MaskBlt_32bpp() -{ - HDC hdcDst, hdcSrc; - BITMAPINFO bmi1 = {{sizeof(BITMAPINFOHEADER), 8, 1, 1, 1, BI_RGB, 0, 10, 10, 0,0}}; - BITMAPINFO bmi32 = {{sizeof(BITMAPINFOHEADER), 8, 1, 1, 32, BI_RGB, 0, 10, 10, 0,0}}; - HBITMAP hbmDst, hbmSrc, hbmMsk; - PUCHAR pjBitsMsk; - PULONG pulBitsDst, pulBitsSrc; - BOOL ret; - - /* Create a dest dc and bitmap */ - hdcDst = CreateCompatibleDC(NULL); - hbmDst = CreateDIBSection(hdcDst, &bmi32, DIB_RGB_COLORS, (PVOID*)&pulBitsDst, NULL, 0); - SelectObject(hdcDst, hbmDst); - - /* Create a source dc and bitmap */ - hdcSrc = CreateCompatibleDC(NULL); - hbmSrc = CreateDIBSection(hdcSrc, &bmi32, DIB_RGB_COLORS, (PVOID*)&pulBitsSrc, NULL, 0); - SelectObject(hdcSrc, hbmSrc); - ok(hdcSrc && hbmSrc, "\n"); - - /* Create a 1 bpp mask bitmap */ - hbmMsk = CreateDIBSection(hdcDst, &bmi1, DIB_RGB_COLORS, (PVOID*)&pjBitsMsk, NULL, 0); - ok(hbmMsk != 0, "CreateDIBSection failed\n"); - - /* Do the masking */ - pulBitsDst[0] = 0x12345678; - pulBitsDst[1] = 0x9abcdef0; - pulBitsSrc[0] = 0x87684321; - pulBitsSrc[1] = 0x0fedcba9; - pjBitsMsk[0] = 0x80; - ret = MaskBlt(hdcDst, 0, 0, 8, 1, hdcSrc, 0, 0, hbmMsk, 0, 0, MAKEROP4(SRCCOPY, 0xAA0000)); - ok(ret == 1, "MaskBlt failed (%d)\n", ret); - ok (pulBitsDst[0] == 0x87684321, "pulBitsDst[0] == 0x%lx\n", pulBitsDst[0]); - ok (pulBitsDst[1] == 0x9abcdef0, "pulBitsDst[0] == 0x%lx\n", pulBitsDst[1]); - - pulBitsDst[0] = 0x12345678; - pulBitsDst[1] = 0x9abcdef0; - ret = MaskBlt(hdcDst, 0, 0, 8, 1, hdcSrc, 0, 0, hbmMsk, 0, 0, MAKEROP4(SRCPAINT, MERGEPAINT)); - ok(ret == 1, "MaskBlt failed (%d)\n", ret); - ok (pulBitsDst[0] == 0x977c5779, "pulBitsDst[0] == 0x%lx\n", pulBitsDst[0]); - ok (pulBitsDst[1] == 0xfabefef6, "pulBitsDst[0] == 0x%lx\n", pulBitsDst[1]); -} - -START_TEST(MaskBlt) -{ - Test_MaskBlt_1bpp(); - switch (GetDeviceCaps(GetDC(NULL), BITSPIXEL)) - { - case 16: Test_MaskBlt_16bpp(); break; - case 32: Test_MaskBlt_32bpp(); break; - } - -} - diff --git a/rostests/apitests/gdi32/Rectangle.c b/rostests/apitests/gdi32/Rectangle.c deleted file mode 100644 index 44030a9a048..00000000000 --- a/rostests/apitests/gdi32/Rectangle.c +++ /dev/null @@ -1,138 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for Rectangle - * PROGRAMMERS: Jérôme Gardou - */ - -#include -#include -#include - -void Test_Rectangle(void) -{ - HDC hdc; - HBITMAP hBmp; - BOOL ret; - HBRUSH hBrush; - HPEN hPen; - COLORREF color; - - hdc = CreateCompatibleDC(NULL); - ok(hdc != NULL, "Failed to create the DC!\n"); - hBmp = CreateCompatibleBitmap(hdc, 4, 4); - ok(hBmp != NULL, "Failed to create the Bitmap!\n"); - hBmp = SelectObject(hdc, hBmp); - ok(hBmp != NULL, "Failed to select the Bitmap!\n"); - - hBrush = CreateSolidBrush(RGB(0, 0, 0)); - ok(hBrush != NULL, "Failed to create a solid brush!\n"); - hBrush = SelectObject(hdc, hBrush); - ok(hBrush != NULL, "Failed to select the brush!\n"); - - /* Blank the bitmap */ - ret = BitBlt(hdc, 0, 0, 4, 4, NULL, 0, 0, WHITENESS); - ok(ret, "BitBlt failed to blank the bitmap!\n"); - - /* Try inverted rectangle coordinates */ - ret = Rectangle(hdc, 0, 2, 2, 0); - ok(ret, "Rectangle failed!"); - color = GetPixel(hdc, 0, 0); - ok( color == RGB(0, 0, 0), "Expected 0, got 0x%08x\n", (UINT)color); - color = GetPixel(hdc, 2, 2); - ok( color == RGB(255, 255, 255), "Expected 0x00FFFFFF, got 0x%08x\n", (UINT)color); - color = GetPixel(hdc, 0, 2); - ok( color == RGB(255, 255, 255), "Expected 0x00FFFFFF, got 0x%08x\n", (UINT)color); - color = GetPixel(hdc, 2, 0); - ok( color == RGB(255, 255, 255), "Expected 0x00FFFFFF, got 0x%08x\n", (UINT)color); - color = GetPixel(hdc, 1, 1); - ok( color == RGB(0, 0, 0), "Expected 0, got 0x%08x\n", (UINT)color); - - ret = BitBlt(hdc, 0, 0, 4, 4, NULL, 0, 0, WHITENESS); - ok(ret, "BitBlt failed to blank the bitmap!\n"); - /* Try well ordered rectangle coordinates */ - ret = Rectangle(hdc, 0, 0, 2, 2); - ok(ret, "Rectangle failed!"); - color = GetPixel(hdc, 0, 0); - ok( color == RGB(0, 0, 0), "Expected 0, got 0x%08x\n", (UINT)color); - color = GetPixel(hdc, 2, 2); - ok( color == RGB(255, 255, 255), "Expected 0x00FFFFFF, got 0x%08x\n", (UINT)color); - color = GetPixel(hdc, 0, 2); - ok( color == RGB(255, 255, 255), "Expected 0x00FFFFFF, got 0x%08x\n", (UINT)color); - color = GetPixel(hdc, 2, 0); - ok( color == RGB(255, 255, 255), "Expected 0x00FFFFFF, got 0x%08x\n", (UINT)color); - color = GetPixel(hdc, 1, 1); - ok( color == RGB(0, 0, 0), "Expected 0, got 0x%08x\n", (UINT)color); - - /* tests with NULL pen */ - hPen = SelectObject(hdc, GetStockObject(NULL_PEN)); - - /* Blank the bitmap */ - ret = BitBlt(hdc, 0, 0, 4, 4, NULL, 0, 0, WHITENESS); - ok(ret, "BitBlt failed to blank the bitmap!\n"); - - ret = Rectangle(hdc, 0, 0, 3, 3); - ok(ret, "Rectangle failed!"); - color = GetPixel(hdc, 0, 0); - ok( color == RGB(0, 0, 0), "Expected 0, got 0x%08x\n", (UINT)color); - color = GetPixel(hdc, 2, 2); - ok( color == RGB(255, 255, 255), "Expected 0x00FFFFFF, got 0x%08x\n", (UINT)color); - color = GetPixel(hdc, 0, 2); - ok( color == RGB(255, 255, 255), "Expected 0x00FFFFFF, got 0x%08x\n", (UINT)color); - color = GetPixel(hdc, 2, 0); - ok( color == RGB(255, 255, 255), "Expected 0x00FFFFFF, got 0x%08x\n", (UINT)color); - color = GetPixel(hdc, 1, 1); - ok( color == RGB(0, 0, 0), "Expected 0, got 0x%08x\n", (UINT)color); - - SelectObject(hdc, hPen); - - /* Same tests with GM_ADVANCED */ - ok(SetGraphicsMode(hdc, GM_ADVANCED) == GM_COMPATIBLE, "Default mode for the DC is not GM_COMPATIBLE.\n"); - - /* Blank the bitmap */ - ret = BitBlt(hdc, 0, 0, 4, 4, NULL, 0, 0, WHITENESS); - ok(ret, "BitBlt failed to blank the bitmap!\n"); - - /* Try inverted rectangle coordinates */ - ret = Rectangle(hdc, 0, 2, 2, 0); - ok(ret, "Rectangle failed!"); - color = GetPixel(hdc, 0, 0); - ok( color == RGB(0, 0, 0), "Expected 0, got 0x%08x\n", (UINT)color); - color = GetPixel(hdc, 2, 2); - ok( color == RGB(0, 0, 0), "Expected 0, got 0x%08x\n", (UINT)color); - color = GetPixel(hdc, 0, 2); - ok( color == RGB(0, 0, 0), "Expected 0, got 0x%08x\n", (UINT)color); - color = GetPixel(hdc, 2, 0); - ok( color == RGB(0, 0, 0), "Expected 0, got 0x%08x\n", (UINT)color); - color = GetPixel(hdc, 1, 1); - ok( color == RGB(0, 0, 0), "Expected 0, got 0x%08x\n", (UINT)color); - - ret = BitBlt(hdc, 0, 0, 4, 4, NULL, 0, 0, WHITENESS); - ok(ret, "BitBlt failed to blank the bitmap!\n"); - /* Try well ordered rectangle coordinates */ - ret = Rectangle(hdc, 0, 0, 2, 2); - ok(ret, "Rectangle failed!"); - color = GetPixel(hdc, 0, 0); - ok( color == RGB(0, 0, 0), "Expected 0, got 0x%08x\n", (UINT)color); - color = GetPixel(hdc, 2, 2); - ok( color == RGB(0, 0, 0), "Expected 0, got 0x%08x\n", (UINT)color); - color = GetPixel(hdc, 0, 2); - ok( color == RGB(0, 0, 0), "Expected 0, got 0x%08x\n", (UINT)color); - color = GetPixel(hdc, 2, 0); - ok( color == RGB(0, 0, 0), "Expected 0, got 0x%08x\n", (UINT)color); - color = GetPixel(hdc, 1, 1); - ok( color == RGB(0, 0, 0), "Expected 0, got 0x%08x\n", (UINT)color); - - - hBmp = SelectObject(hdc, hBmp); - hBrush = SelectObject(hdc, hBrush); - DeleteObject(hBmp); - DeleteObject(hBrush); - DeleteDC(hdc); -} - - -START_TEST(Rectangle) -{ - Test_Rectangle(); -} diff --git a/rostests/apitests/gdi32/SelectObject.c b/rostests/apitests/gdi32/SelectObject.c deleted file mode 100644 index 582176c7723..00000000000 --- a/rostests/apitests/gdi32/SelectObject.c +++ /dev/null @@ -1,230 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for SelectObject - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include -#include -#include -#include - -#define TEST(x) ok(x, #x"\n") -#define RTEST(x) ok(x, #x"\n") - -#define ok_err(dwErr) ok(GetLastError() == dwErr, "Wrong LastError, expected %d, got %ld\n", dwErr, GetLastError()) - -HDC hdc1, hdc2; - -static void -Test_SelectObject() -{ - HGDIOBJ hOldObj, hNewObj; -// PGDI_TABLE_ENTRY pEntry; -// PDC_ATTR pDc_Attr; -// HANDLE hcmXform; - - /* Get the Dc_Attr for later testing */ -// pEntry = &GdiHandleTable[GDI_HANDLE_GET_INDEX(hdc1)]; -// pDc_Attr = pEntry->UserData; -// ok(pDc_Attr != NULL, "Skipping tests.\n"); -// if (pDc_Attr == NULL) return; - - /* Test incomplete dc handle doesn't work */ - SetLastError(ERROR_SUCCESS); - hNewObj = GetStockObject(GRAY_BRUSH); - hOldObj = SelectObject((HDC)GDI_HANDLE_GET_INDEX(hdc1), hNewObj); - ok_err(ERROR_INVALID_HANDLE); - ok(hOldObj == NULL, "\n"); -// ok(pDc_Attr->hbrush == GetStockObject(WHITE_BRUSH), "\n"); - SelectObject(hdc1, hOldObj); - - /* Test incomplete hobj handle works */ - hNewObj = GetStockObject(GRAY_BRUSH); - hOldObj = SelectObject(hdc1, (HGDIOBJ)GDI_HANDLE_GET_INDEX(hNewObj)); - ok(hOldObj == GetStockObject(WHITE_BRUSH), "\n"); -// ok(pDc_Attr->hbrush == hNewObj, "\n"); - SelectObject(hdc1, hOldObj); - - /* Test wrong hDC handle type */ - SetLastError(ERROR_SUCCESS); - hNewObj = GetStockObject(GRAY_BRUSH); - hdc2 = (HDC)((UINT_PTR)hdc1 & ~GDI_HANDLE_TYPE_MASK); - hdc2 = (HDC)((UINT_PTR)hdc2 | GDI_OBJECT_TYPE_PEN); - hOldObj = SelectObject(hdc2, hNewObj); - ok_err(ERROR_INVALID_HANDLE); - ok(hOldObj == NULL, "\n"); -// RTEST(pDc_Attr->hbrush == GetStockObject(WHITE_BRUSH)); - - /* Test wrong hobj handle type */ - SetLastError(ERROR_SUCCESS); - hNewObj = GetStockObject(GRAY_BRUSH); - hNewObj = (HGDIOBJ)((UINT_PTR)hNewObj & ~GDI_HANDLE_TYPE_MASK); - hNewObj = (HGDIOBJ)((UINT_PTR)hNewObj | GDI_OBJECT_TYPE_PEN); - hOldObj = SelectObject(hdc1, hNewObj); - ok_err(ERROR_SUCCESS); - ok(hOldObj == NULL, "\n"); -// RTEST(pDc_Attr->hbrush == GetStockObject(WHITE_BRUSH)); - - SetLastError(ERROR_SUCCESS); - hNewObj = (HGDIOBJ)0x00761234; - hOldObj = SelectObject(hdc1, hNewObj); - ok(hOldObj == NULL, "\n"); - ok_err(ERROR_SUCCESS); - SelectObject(hdc1, hOldObj); - - /* Test DC */ - SetLastError(ERROR_SUCCESS); - hOldObj = SelectObject(hdc1, GetDC(NULL)); - ok(hOldObj == NULL, "\n"); - ok_err(ERROR_SUCCESS); - - - /* Test CLIOBJ */ - - /* Test PATH */ - - /* Test PALETTE */ - SetLastError(ERROR_SUCCESS); - hNewObj = GetStockObject(DEFAULT_PALETTE); - hOldObj = SelectObject(hdc1, hNewObj); - RTEST(hOldObj == NULL); - ok_err(ERROR_INVALID_FUNCTION); - - /* Test COLORSPACE */ - - /* Test FONT */ - - /* Test PFE */ - - /* Test BRUSH */ - hNewObj = GetStockObject(GRAY_BRUSH); - hOldObj = SelectObject(hdc1, hNewObj); - RTEST(hOldObj == GetStockObject(WHITE_BRUSH)); -// RTEST(pDc_Attr->hbrush == hNewObj); - RTEST(GDI_HANDLE_GET_TYPE(hOldObj) == GDI_OBJECT_TYPE_BRUSH); - SelectObject(hdc1, hOldObj); - - /* Test DC_BRUSH */ - hNewObj = GetStockObject(DC_BRUSH); - hOldObj = SelectObject(hdc1, hNewObj); -// RTEST(pDc_Attr->hbrush == hNewObj); - SelectObject(hdc1, hOldObj); - - /* Test BRUSH color xform */ -// hcmXform = (HANDLE)pDc_Attr->hcmXform; - - - /* Test EMF */ - - /* test METAFILE */ - - /* Test ENHMETAFILE */ - - /* Test EXTPEN */ - - /* Test METADC */ -} - -static void -Test_Bitmap() -{ - HBITMAP hbmp, hbmpInvalid, hbmpOld; - BYTE bmBits[4] = {0}; - HDC hdcTmp; - - hbmp = CreateBitmap(2, 2, 1, 1, &bmBits); - hbmpInvalid = CreateBitmap(2, 2, 1, 4, &bmBits); - if (!hbmp || !hbmpInvalid) - { - printf("couldn't create bitmaps, skipping\n"); - return; - } - - hbmpOld = SelectObject(hdc1, hbmp); - ok(GDI_HANDLE_GET_TYPE(hbmpOld) == GDI_OBJECT_TYPE_BITMAP, "wrong type\n"); - - /* Test invalid BITMAP */ - ok(SelectObject(hdc1, hbmpInvalid) == NULL, "should fail\n"); - - /* Test if we get the right bitmap back */ - hbmpOld = SelectObject(hdc1, hbmpOld); - ok(hbmpOld == hbmp, "didn't get the right bitmap back.\n"); - - /* Test selecting bitmap into 2 DCs */ - hbmpOld = SelectObject(hdc1, hbmp); - ok(SelectObject(hdc2, hbmp) == NULL, "Should fail.\n"); - - /* Test selecting same bitmap twice */ - hbmpOld = SelectObject(hdc1, hbmp); - ok(hbmpOld == hbmp, "didn't get the right bitmap back.\n"); - SelectObject(hdc1, GetStockObject(DEFAULT_BITMAP)); - - /* Test selecting and then deleting the DC */ - hdcTmp = CreateCompatibleDC(NULL); - hbmpOld = SelectObject(hdcTmp, hbmp); - ok(hbmpOld == GetStockObject(DEFAULT_BITMAP), "didn't get the right bitmap back.\n"); - DeleteDC(hdcTmp); - hbmpOld = SelectObject(hdc1, hbmp); - ok(hbmpOld == GetStockObject(DEFAULT_BITMAP), "didn't get the right bitmap back.\n"); - - DeleteObject(hbmp); - DeleteObject(hbmpInvalid); -} - -static void -Test_Pen() -{ - HPEN hpen, hpenOld; - - /* Test PEN */ - hpen = GetStockObject(GRAY_BRUSH); - hpenOld = SelectObject(hdc1, hpen); - ok(hpenOld == GetStockObject(WHITE_BRUSH), "Got wrong pen.\n"); -// RTEST(pDc_Attr->hbrush == hpen); - ok(GDI_HANDLE_GET_TYPE(hpenOld) == GDI_OBJECT_TYPE_BRUSH, "wrong type.\n"); - SelectObject(hdc1, hpenOld); -} - -static void -Test_Region() -{ - HRGN hrgn, hrgnOld; - - /* Test REGION */ - SetLastError(ERROR_SUCCESS); - hrgn = CreateRectRgn(0,0,0,0); - hrgnOld = SelectObject(hdc1, hrgn); - ok((UINT_PTR)hrgnOld == NULLREGION, "\n"); - DeleteObject(hrgn); - - hrgn = CreateRectRgn(0,0,10,10); - ok((UINT_PTR)SelectObject(hdc1, hrgn) == SIMPLEREGION, "\n"); - hrgnOld = CreateRectRgn(5,5,20,20); - ok(CombineRgn(hrgn, hrgn, hrgnOld, RGN_OR) == COMPLEXREGION, "\n"); - DeleteObject(hrgnOld); - ok((UINT_PTR)SelectObject(hdc1, hrgn) == SIMPLEREGION, "\n"); // ??? Why this? - DeleteObject(hrgn); -// ok(IsHandleValid(hrgn) == TRUE, "\n"); - ok_err(ERROR_SUCCESS); -} - -START_TEST(SelectObject) -{ - hdc1 = CreateCompatibleDC(NULL); - hdc2 = CreateCompatibleDC(NULL); - if (!hdc1 || !hdc2) - { - printf("couldn't create DCs, skipping all tests\n"); - return; - } - - Test_SelectObject(); - Test_Bitmap(); - Test_Pen(); - Test_Region(); -} - diff --git a/rostests/apitests/gdi32/SetDCPenColor.c b/rostests/apitests/gdi32/SetDCPenColor.c deleted file mode 100644 index 5c2f5c46a1a..00000000000 --- a/rostests/apitests/gdi32/SetDCPenColor.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for SetDCPenColor - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -void Test_SetDCPenColor() -{ - HDC hScreenDC, hDC; - HBITMAP hbmp; - - // Test an incorrect DC - SetLastError(ERROR_SUCCESS); - ok(SetDCPenColor(0, RGB(0,0,0)) == CLR_INVALID, "\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "\n"); - - // Get the Screen DC - hScreenDC = GetDC(NULL); - ok(hScreenDC != 0, "GetDC failed, skipping tests\n"); - if (hScreenDC == NULL) return; - - // Test the screen DC - SetDCPenColor(hScreenDC, RGB(1,2,3)); - ok(SetDCPenColor(hScreenDC, RGB(4,5,6)) == RGB(1,2,3), "\n"); - - // Create a new DC - hDC = CreateCompatibleDC(hScreenDC); - ReleaseDC(0, hScreenDC); - ok(hDC != 0, "CreateCompatibleDC failed, skipping tests\n"); - if (!hDC) return; - - // Select the DC_PEN and check if the pen returned by a new call is DC_PEN - SelectObject(hDC, GetStockObject(DC_PEN)); - ok(SelectObject(hDC, GetStockObject(BLACK_PEN)) == GetStockObject(DC_PEN), "\n"); - - // Test an incorrect color, yes windows sets the color! - SetDCPenColor(hDC, 0x21123456); - ok(SetDCPenColor(hDC, RGB(0,0,0)) == 0x21123456, "\n"); - - // Test CLR_INVALID, it sets CLR_INVALID! - SetDCPenColor(hDC, CLR_INVALID); - ok(SetDCPenColor(hDC, RGB(0,0,0)) == CLR_INVALID, "\n"); - - hbmp = CreateBitmap(10, 10, 1, 32, NULL); - ok(hbmp != 0, "CreateBitmap failed, skipping tests\n"); - if (!hbmp) return; - - SelectObject(hDC, hbmp); - SelectObject(hDC, GetStockObject(DC_PEN)); - SetDCPenColor(hDC, 0x123456); - MoveToEx(hDC, 0, 0, NULL); - LineTo(hDC, 10, 0); - ok(GetPixel(hDC, 5, 0) == 0x123456, "\n"); - - // Delete the DC - DeleteDC(hDC); -} - -START_TEST(SetDCPenColor) -{ - Test_SetDCPenColor(); -} - diff --git a/rostests/apitests/gdi32/SetDIBits.c b/rostests/apitests/gdi32/SetDIBits.c deleted file mode 100644 index 50fcc52374a..00000000000 --- a/rostests/apitests/gdi32/SetDIBits.c +++ /dev/null @@ -1,143 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for SetDIBits - * PROGRAMMERS: Jérôme Gardou - */ - -#include -#include -#include - - -void Test_SetDIBits() -{ - char buffer[sizeof(BITMAPINFOHEADER)+2*sizeof(RGBQUAD)]; - ULONG* dibBuffer; - BITMAPINFO* pBMI = (BITMAPINFO*)buffer; - char bits1bpp[] = {0x80, 0, 0, 0}; - HBITMAP hbmp; - int ret; - - ZeroMemory(buffer, sizeof(buffer)); - - pBMI->bmiHeader.biSize=sizeof(BITMAPINFOHEADER); - pBMI->bmiHeader.biWidth=2; - pBMI->bmiHeader.biHeight=1; - pBMI->bmiHeader.biPlanes=1; - pBMI->bmiHeader.biBitCount=32; - pBMI->bmiHeader.biCompression=BI_RGB; - pBMI->bmiHeader.biSizeImage=0; - pBMI->bmiHeader.biXPelsPerMeter=0; - pBMI->bmiHeader.biYPelsPerMeter=0; - pBMI->bmiHeader.biClrUsed=0; - pBMI->bmiHeader.biClrImportant=0; - - hbmp = CreateDIBSection(NULL, pBMI, DIB_RGB_COLORS, (PVOID*)&dibBuffer, NULL, 0); - ok(hbmp!=NULL, "Failed to create a DIB section\n"); - - pBMI->bmiHeader.biBitCount = 1; - pBMI->bmiColors[0].rgbBlue = 0xFF; - pBMI->bmiColors[0].rgbGreen = 0; - pBMI->bmiColors[0].rgbRed = 0xFF; - - ret = SetDIBits(NULL, hbmp, 0, 1, bits1bpp, pBMI, DIB_RGB_COLORS); - ok(ret == 1, "Copied %i scanlines\n", ret); - - ok(dibBuffer[0] == 0, "Wrong color 0x%08x after SetDIBits\n", (unsigned int)dibBuffer[0]); - ok(dibBuffer[1] == 0xFF00FF, "Wrong color 0x%08x after SetDIBits\n", (unsigned int)dibBuffer[1]); - - DeleteObject(hbmp); -} - -void Test_SetDIBits_1bpp() -{ - char buffer[sizeof(BITMAPINFOHEADER)+2*sizeof(RGBQUAD)]; - HDC hdc; - BITMAPINFO* pBMI = (BITMAPINFO*)buffer; - char bits1bpp[] = {0x80, 0, 0, 0}; - HBITMAP hbmp; - int ret; - COLORREF color; - - hdc = CreateCompatibleDC(0); - if(!hdc) - { - trace("No device contexr !?\n"); - return; - } - - ZeroMemory(buffer, sizeof(buffer)); - - pBMI->bmiHeader.biSize=sizeof(BITMAPINFOHEADER); - pBMI->bmiHeader.biWidth=2; - pBMI->bmiHeader.biHeight=1; - pBMI->bmiHeader.biPlanes=1; - pBMI->bmiHeader.biBitCount=1; - pBMI->bmiHeader.biCompression=BI_RGB; - pBMI->bmiHeader.biSizeImage=0; - pBMI->bmiHeader.biXPelsPerMeter=0; - pBMI->bmiHeader.biYPelsPerMeter=0; - pBMI->bmiHeader.biClrUsed=2; - pBMI->bmiHeader.biClrImportant=0; - pBMI->bmiColors[0].rgbBlue = 0xFF; - pBMI->bmiColors[0].rgbGreen = 0xFF; - pBMI->bmiColors[0].rgbRed = 0xFF; - - hbmp = CreateBitmap(2, 1, 1, 1, NULL); - ok(hbmp!=NULL, "Failed to create a monochrome bitmap\n"); - - ret = SetDIBits(NULL, hbmp, 0, 1, bits1bpp, pBMI, DIB_RGB_COLORS); - ok(ret == 1, "Copied %i scanlines\n", ret); - - hbmp = SelectObject(hdc, hbmp); - ok(hbmp != NULL, "Could not select the bitmap into the context.\n"); - color = GetPixel(hdc, 0,0); - ok(color == 0, "Wrong color at 0,0 : 0x%08x\n", (UINT)color); - color = GetPixel(hdc, 1,0); - ok(color == 0xFFFFFF, "Wrong color at 1,0 : 0x%08x\n", (UINT)color); - - hbmp = SelectObject(hdc, hbmp); - - /* Try something else than 0xFFFFFF */ - pBMI->bmiColors[0].rgbBlue = 0xFF; - pBMI->bmiColors[0].rgbGreen = 0; - pBMI->bmiColors[0].rgbRed = 0; - - ret = SetDIBits(NULL, hbmp, 0, 1, bits1bpp, pBMI, DIB_RGB_COLORS); - ok(ret == 1, "Copied %i scanlines\n", ret); - - hbmp = SelectObject(hdc, hbmp); - ok(hbmp != NULL, "Could not select the bitmap into the context.\n"); - color = GetPixel(hdc, 0,0); - ok(color == 0, "Wrong color at 0,0 : 0x%08x\n", (UINT)color); - color = GetPixel(hdc, 1,0); - ok(color == 0xFFFFFF, "Wrong color at 1,0 : 0x%08x\n", (UINT)color); - - hbmp = SelectObject(hdc, hbmp); - - /* Special : try 0 */ - pBMI->bmiColors[0].rgbBlue = 0; - pBMI->bmiColors[0].rgbGreen = 0; - pBMI->bmiColors[0].rgbRed = 0; - - ret = SetDIBits(NULL, hbmp, 0, 1, bits1bpp, pBMI, DIB_RGB_COLORS); - ok(ret == 1, "Copied %i scanlines\n", ret); - - hbmp = SelectObject(hdc, hbmp); - ok(hbmp != NULL, "Could not select the bitmap into the context.\n"); - color = GetPixel(hdc, 0,0); - ok(color == 0, "Wrong color at 0,0 : 0x%08x\n", (UINT)color); - color = GetPixel(hdc, 1,0); - ok(color == 0xFFFFFF, "Wrong color at 1,0 : 0x%08x\n", (UINT)color); - - hbmp = SelectObject(hdc, hbmp); - DeleteObject(hbmp); - DeleteDC(hdc); -} - -START_TEST(SetDIBits) -{ - Test_SetDIBits(); - Test_SetDIBits_1bpp(); -} diff --git a/rostests/apitests/gdi32/SetMapMode.c b/rostests/apitests/gdi32/SetMapMode.c deleted file mode 100644 index b0bdd3e5136..00000000000 --- a/rostests/apitests/gdi32/SetMapMode.c +++ /dev/null @@ -1,196 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for SetMapMode - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -#define TEST(x) ok(x, #x"\n") -#define RTEST(x) ok(x, #x"\n") - -void Test_SetMapMode() -{ - HDC hDC; - SIZE WindowExt, ViewportExt; - ULONG ulMapMode; - - hDC = CreateCompatibleDC(NULL); - ok(hDC != 0, "CreateCompatibleDC failed, skipping tests.\n"); - if (!hDC) return; - - GetWindowExtEx(hDC, &WindowExt); - GetViewportExtEx(hDC, &ViewportExt); - - ulMapMode = SetMapMode(hDC, MM_ISOTROPIC); - TEST(ulMapMode == MM_TEXT); - TEST(WindowExt.cx == 1); - TEST(WindowExt.cy == 1); - TEST(ViewportExt.cx == 1); - TEST(ViewportExt.cy == 1); - - SetLastError(0); - ulMapMode = SetMapMode(hDC, 0); - TEST(GetLastError() == 0); - TEST(ulMapMode == 0); - - /* Go through all valid values */ - ulMapMode = SetMapMode(hDC, 1); - TEST(ulMapMode == MM_ISOTROPIC); - ulMapMode = SetMapMode(hDC, 2); - TEST(ulMapMode == 1); - ulMapMode = SetMapMode(hDC, 3); - TEST(ulMapMode == 2); - ulMapMode = SetMapMode(hDC, 4); - TEST(ulMapMode == 3); - ulMapMode = SetMapMode(hDC, 5); - TEST(ulMapMode == 4); - ulMapMode = SetMapMode(hDC, 6); - TEST(ulMapMode == 5); - ulMapMode = SetMapMode(hDC, 7); - TEST(ulMapMode == 6); - ulMapMode = SetMapMode(hDC, 8); - TEST(ulMapMode == 7); - - /* Test invalid value */ - ulMapMode = SetMapMode(hDC, 9); - TEST(ulMapMode == 0); - ulMapMode = SetMapMode(hDC, 10); - TEST(ulMapMode == 0); - - TEST(GetLastError() == 0); - - /* Test NULL DC */ - ulMapMode = SetMapMode((HDC)0, 2); - TEST(ulMapMode == 0); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - /* Test NULL DC and invalid mode */ - ulMapMode = SetMapMode((HDC)0, 10); - TEST(ulMapMode == 0); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - /* Test invalid DC */ - ulMapMode = SetMapMode((HDC)0x12345, 2); - TEST(ulMapMode == 0); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - /* Test invalid DC and invalid mode */ - ulMapMode = SetMapMode((HDC)0x12345, 10); - TEST(ulMapMode == 0); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - DeleteDC(hDC); - - /* Test a deleted DC */ - ulMapMode = SetMapMode(hDC, 2); - TEST(ulMapMode == 0); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - /* Test MM_TEXT */ - hDC = CreateCompatibleDC(NULL); - SetMapMode(hDC, MM_TEXT); - GetWindowExtEx(hDC, &WindowExt); - GetViewportExtEx(hDC, &ViewportExt); - TEST(WindowExt.cx == 1); - TEST(WindowExt.cy == 1); - TEST(ViewportExt.cx == 1); - TEST(ViewportExt.cy == 1); - DeleteDC(hDC); - - /* Test MM_ISOTROPIC */ - hDC = CreateCompatibleDC(NULL); - SetMapMode(hDC, MM_ISOTROPIC); - GetWindowExtEx(hDC, &WindowExt); - GetViewportExtEx(hDC, &ViewportExt); - //TEST(WindowExt.cx == 3600); - //TEST(WindowExt.cy == 2700); - TEST(ViewportExt.cx == GetDeviceCaps(GetDC(0), HORZRES)); - TEST(ViewportExt.cy == -GetDeviceCaps(GetDC(0), VERTRES)); - DeleteDC(hDC); - - /* Test MM_ANISOTROPIC */ - hDC = CreateCompatibleDC(NULL); - SetMapMode(hDC, MM_ANISOTROPIC); - GetWindowExtEx(hDC, &WindowExt); - GetViewportExtEx(hDC, &ViewportExt); - TEST(WindowExt.cx == 1); - TEST(WindowExt.cy == 1); - TEST(ViewportExt.cx == 1); - TEST(ViewportExt.cy == 1); - - /* set MM_ISOTROPIC first, the values will be kept */ - SetMapMode(hDC, MM_ISOTROPIC); - SetMapMode(hDC, MM_ANISOTROPIC); - GetWindowExtEx(hDC, &WindowExt); - GetViewportExtEx(hDC, &ViewportExt); - //TEST(WindowExt.cx == 3600); - //TEST(WindowExt.cy == 2700); - TEST(ViewportExt.cx == GetDeviceCaps(GetDC(0), HORZRES)); - TEST(ViewportExt.cy == -GetDeviceCaps(GetDC(0), VERTRES)); - DeleteDC(hDC); - - /* Test MM_LOMETRIC */ - hDC = CreateCompatibleDC(NULL); - SetMapMode(hDC, MM_LOMETRIC); - GetWindowExtEx(hDC, &WindowExt); - GetViewportExtEx(hDC, &ViewportExt); - //TEST(WindowExt.cx == 3600); - //TEST(WindowExt.cy == 2700); - TEST(ViewportExt.cx == GetDeviceCaps(GetDC(0), HORZRES)); - TEST(ViewportExt.cy == -GetDeviceCaps(GetDC(0), VERTRES)); - DeleteDC(hDC); - - /* Test MM_HIMETRIC */ - hDC = CreateCompatibleDC(NULL); - SetMapMode(hDC, MM_HIMETRIC); - GetWindowExtEx(hDC, &WindowExt); - GetViewportExtEx(hDC, &ViewportExt); - //TEST(WindowExt.cx == 36000); - //TEST(WindowExt.cy == 27000); - TEST(ViewportExt.cx == GetDeviceCaps(GetDC(0), HORZRES)); - TEST(ViewportExt.cy == -GetDeviceCaps(GetDC(0), VERTRES)); - DeleteDC(hDC); - - /* Test MM_LOENGLISH */ - hDC = CreateCompatibleDC(NULL); - SetMapMode(hDC, MM_LOENGLISH); - GetWindowExtEx(hDC, &WindowExt); - GetViewportExtEx(hDC, &ViewportExt); - //TEST(WindowExt.cx == 1417); - //TEST(WindowExt.cy == 1063); - TEST(ViewportExt.cx == GetDeviceCaps(GetDC(0), HORZRES)); - TEST(ViewportExt.cy == -GetDeviceCaps(GetDC(0), VERTRES)); - DeleteDC(hDC); - - /* Test MM_HIENGLISH */ - hDC = CreateCompatibleDC(NULL); - SetMapMode(hDC, MM_HIENGLISH); - GetWindowExtEx(hDC, &WindowExt); - GetViewportExtEx(hDC, &ViewportExt); - //TEST(WindowExt.cx == 14173); - //TEST(WindowExt.cy == 10630); - TEST(ViewportExt.cx == GetDeviceCaps(GetDC(0), HORZRES)); - TEST(ViewportExt.cy == -GetDeviceCaps(GetDC(0), VERTRES)); - DeleteDC(hDC); - - /* Test MM_TWIPS */ - hDC = CreateCompatibleDC(NULL); - SetMapMode(hDC, MM_TWIPS); - GetWindowExtEx(hDC, &WindowExt); - GetViewportExtEx(hDC, &ViewportExt); - //TEST(WindowExt.cx == 20409); - //TEST(WindowExt.cy == 15307); - TEST(ViewportExt.cx == GetDeviceCaps(GetDC(0), HORZRES)); - TEST(ViewportExt.cy == -GetDeviceCaps(GetDC(0), VERTRES)); - DeleteDC(hDC); -} - -START_TEST(SetMapMode) -{ - Test_SetMapMode(); -} - diff --git a/rostests/apitests/gdi32/SetSysColors.c b/rostests/apitests/gdi32/SetSysColors.c deleted file mode 100644 index 6be405cc233..00000000000 --- a/rostests/apitests/gdi32/SetSysColors.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for SetSysColors - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -#define TEST(x) ok(x, #x"\n") - -#define NUM_SYSCOLORS 31 - -void Test_SetSysColors() -{ - INT i; - INT nElements[NUM_SYSCOLORS+1]; - COLORREF crOldColors[NUM_SYSCOLORS]; - COLORREF crColors[NUM_SYSCOLORS+1]; - - /* First save the Old colors */ - for (i = 0; i < NUM_SYSCOLORS; i++) - { - nElements[i] = i; - crOldColors[i] = GetSysColor(i); - } - - for (i = 0; i < NUM_SYSCOLORS+1; i++) - crColors[i] = RGB(i, 255-i, i*3); - nElements[NUM_SYSCOLORS] = nElements[0]; - - SetLastError(0xdeadbeef); - ok(SetSysColors(-1, nElements, crColors) == FALSE, "Expected FALSE, got TRUE\n"); - ok(GetLastError() == ERROR_NOACCESS, "Expected ERROR_NOACCESS, got %ld\n", GetLastError()); - ok(SetSysColors(0, nElements, crColors) == TRUE, "Expected TRUE, got FALSE\n"); - ok(SetSysColors(0, NULL, crColors) == TRUE, "Expected TRUE, got FALSE\n"); - ok(SetSysColors(0, nElements, NULL) == TRUE, "Expected TRUE, got FALSE\n"); - ok(SetSysColors(1, NULL, crColors) == FALSE, "Expected FALSE, got TRUE\n"); - ok(GetLastError() == ERROR_NOACCESS, "Expected ERROR_NOACCESS, got %ld\n", GetLastError()); - ok(SetSysColors(1, nElements, NULL) == FALSE, "Expected FALSE, got TRUE\n"); - ok(GetLastError() == ERROR_NOACCESS, "Expected ERROR_NOACCESS, got %ld\n", GetLastError()); - ok(SetSysColors(1, nElements, crColors) == TRUE, "Expected TRUE, got FALSE\n"); - ok(SetSysColors(NUM_SYSCOLORS, nElements, crColors) == TRUE, "Expected TRUE, got FALSE\n"); - for (i = 0; i < NUM_SYSCOLORS; i++) - ok(GetSysColor(nElements[i]) == crColors[i], "Expected %06lx, got %06lx\n", crColors[i], GetSysColor(nElements[i])); - - /* try more than NUM_SYSCOLORS */ - ok(SetSysColors(NUM_SYSCOLORS+1, nElements, crColors) == TRUE, "Expected TRUE, got FALSE\n"); - nElements[NUM_SYSCOLORS] = 10000; - ok(SetSysColors(NUM_SYSCOLORS+1, nElements, crColors) == TRUE, "Expected TRUE, got FALSE\n"); - - /* restore old SysColors */ - SetSysColors(NUM_SYSCOLORS, nElements, crOldColors); -} - -START_TEST(SetSysColors) -{ - Test_SetSysColors(); -} - diff --git a/rostests/apitests/gdi32/SetWindowExtEx.c b/rostests/apitests/gdi32/SetWindowExtEx.c deleted file mode 100644 index 99879b9755a..00000000000 --- a/rostests/apitests/gdi32/SetWindowExtEx.c +++ /dev/null @@ -1,289 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for SetWindowExtEx - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -#define TEST(x) ok(x, #x"\n") -#define RTEST(x) ok(x, #x"\n") - -void Test_SetWindowExtEx() -{ - HDC hDC; - BOOL ret; - SIZE WindowExt, ViewportExt; - //PGDI_TABLE_ENTRY pEntry; - //DC_ATTR* pDC_Attr; - - hDC = CreateCompatibleDC(0); - ok(hDC != NULL, "CreateCompatibleDC failed. Skipping tests.\n"); - if (hDC == NULL) return; - - SetLastError(0); - ret = SetWindowExtEx(0, 0, 0, NULL); - TEST(GetLastError() == ERROR_INVALID_HANDLE); - TEST(ret == 0); - - SetLastError(0); - ret = SetWindowExtEx((HDC)0x1234, 0, 0, NULL); - TEST(GetLastError() == ERROR_INVALID_HANDLE); - TEST(ret == 0); - - SetLastError(0); - ret = SetWindowExtEx(hDC, 0, 0, NULL); - TEST(GetLastError() == 0); - TEST(ret == 1); - - WindowExt.cx = 1234; - WindowExt.cy = 6789; - SetLastError(0); - ret = SetWindowExtEx(0, 0, 0, &WindowExt); - TEST(GetLastError() == ERROR_INVALID_HANDLE); - TEST(ret == 0); - TEST(WindowExt.cx == 1234); - TEST(WindowExt.cy == 6789); - - DeleteDC(hDC); - - /* Test with a deleted DC */ - SetLastError(0); - ret = SetWindowExtEx(hDC, 0, 0, NULL); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - TEST(ret == 0); - - hDC = CreateCompatibleDC(0); - ok(hDC != NULL, "CreateCompatibleDC failed. Skipping tests.\n"); - if (hDC == NULL) return; - - //pEntry = GdiHandleTable + GDI_HANDLE_GET_INDEX(hDC); - //pDC_Attr = pEntry->UserData; - //ASSERT(pDC_Attr); - - /* Test setting it without changing the map mode (MM_TEXT) */ - ret = SetWindowExtEx(hDC, 10, 20, &WindowExt); - TEST(ret == 1); - TEST(WindowExt.cx == 1); - TEST(WindowExt.cy == 1); - - /* Values should not be changed */ - WindowExt.cx = WindowExt.cy = 0; - ret = SetWindowExtEx(hDC, 40, 30, &WindowExt); - TEST(ret == 1); - TEST(WindowExt.cx == 1); - TEST(WindowExt.cy == 1); - - /* Check the viewport */ - GetViewportExtEx(hDC, &ViewportExt); - TEST(ViewportExt.cx == 1); - TEST(ViewportExt.cy == 1); - - /* Test setting in isotropic mode with 0 extents */ - SetMapMode(hDC, MM_ISOTROPIC); - WindowExt.cx = WindowExt.cy = 0; - ret = SetWindowExtEx(hDC, 0, 0, &WindowExt); - TEST(ret == 0); - //TEST(WindowExt.cx == 3600); - //TEST(WindowExt.cy == 2700); - ret = SetWindowExtEx(hDC, 100, 0, &WindowExt); - TEST(ret == 0); - ret = SetWindowExtEx(hDC, 0, 100, &WindowExt); - TEST(ret == 0); - - /* Test setting in isotropic mode */ - ret = SetWindowExtEx(hDC, 21224, 35114, &WindowExt); - TEST(ret == 1); - //TEST(WindowExt.cx == 3600); - //TEST(WindowExt.cy == 2700); - - /* Values should be changed */ - ret = SetWindowExtEx(hDC, - 4 * GetDeviceCaps(GetDC(0), HORZRES), - -4 * GetDeviceCaps(GetDC(0), VERTRES), - &WindowExt); - TEST(ret == 1); - TEST(WindowExt.cx == 21224); - TEST(WindowExt.cy == 35114); - - /* Check the viewport, should be the same */ - GetViewportExtEx(hDC, &ViewportExt); - TEST(ViewportExt.cx == GetDeviceCaps(GetDC(0), HORZRES)); - TEST(ViewportExt.cy == -GetDeviceCaps(GetDC(0), VERTRES)); - - /* again isotropic mode with 1:1 res */ - ret = SetWindowExtEx(hDC, 123, 123, &WindowExt); - TEST(ret == 1); - TEST(WindowExt.cx == 4 * GetDeviceCaps(GetDC(0), HORZRES)); - TEST(WindowExt.cy == -4 * GetDeviceCaps(GetDC(0), VERTRES)); - - /* Test flXform */ - //TEST(pDC_Attr->flXform & PAGE_EXTENTS_CHANGED); - - /* Check the viewport from the dcattr, without going through gdi */ - //TEST(pDC_Attr->szlViewportExt.cx == GetDeviceCaps(GetDC(0), HORZRES)); - //TEST(pDC_Attr->szlViewportExt.cy == -GetDeviceCaps(GetDC(0), VERTRES)); - - /* Check the viewport with gdi, should not be the same */ - GetViewportExtEx(hDC, &ViewportExt); - TEST(ViewportExt.cx == GetDeviceCaps(GetDC(0), VERTRES)); - TEST(ViewportExt.cy == -GetDeviceCaps(GetDC(0), VERTRES)); - - /* Test flXform */ - //TEST(pDC_Attr->flXform & PAGE_EXTENTS_CHANGED); - - /* again isotropic mode with 3:1 res */ - ret = SetWindowExtEx(hDC, 300, 100, &WindowExt); - TEST(ret == 1); - TEST(WindowExt.cx == 123); - TEST(WindowExt.cy == 123); - - /* Check the viewport now, should not be the same */ - GetViewportExtEx(hDC, &ViewportExt); - TEST(ViewportExt.cx == GetDeviceCaps(GetDC(0), VERTRES)); - TEST(ViewportExt.cy == -GetDeviceCaps(GetDC(0), VERTRES) / 3); - - /* again isotropic mode with 1:3 res */ - SetViewportExtEx(hDC, 6000, 3000, 0); - ret = SetWindowExtEx(hDC, 200, 600, &WindowExt); - TEST(ret == 1); - TEST(WindowExt.cx == 300); - TEST(WindowExt.cy == 100); - - /* Check the viewport now, should not be the same */ - GetViewportExtEx(hDC, &ViewportExt); - TEST(ViewportExt.cx == 1000); - TEST(ViewportExt.cy == 3000); - - /* Test setting in anisotropic mode */ - SetMapMode(hDC, MM_ANISOTROPIC); - ret = SetWindowExtEx(hDC, 80, 60, &WindowExt); - TEST(ret == 1); - TEST(WindowExt.cx == 200); - TEST(WindowExt.cy == 600); - - /* Values should be changed */ - ret = SetWindowExtEx(hDC, 500, 500, &WindowExt); - TEST(ret == 1); - TEST(WindowExt.cx == 80); - TEST(WindowExt.cy == 60); - - /* Check the viewport */ - GetViewportExtEx(hDC, &ViewportExt); - TEST(ViewportExt.cx == 1000); - TEST(ViewportExt.cy == 3000); - - /* Test setting in low metric mode */ - SetMapMode(hDC, MM_LOMETRIC); - ret = SetWindowExtEx(hDC, 120, 90, &WindowExt); - TEST(ret == 1); - //TEST(WindowExt.cx == 3600); - //TEST(WindowExt.cy == 2700); - - /* Values should not be changed */ - WindowExt.cx = WindowExt.cy = 0; - ret = SetWindowExtEx(hDC, 900, 700, &WindowExt); - TEST(ret == 1); - //TEST(WindowExt.cx == 3600); - //TEST(WindowExt.cy == 2700); - - /* Check the viewport */ - GetViewportExtEx(hDC, &ViewportExt); - TEST(ViewportExt.cx == GetDeviceCaps(GetDC(0), HORZRES)); - TEST(ViewportExt.cy == -GetDeviceCaps(GetDC(0), VERTRES)); - - /* Test setting in high metric mode */ - SetMapMode(hDC, MM_HIMETRIC); - ret = SetWindowExtEx(hDC, 120, 90, &WindowExt); - TEST(ret == 1); - //TEST(WindowExt.cx == 36000); - //TEST(WindowExt.cy == 27000); - - /* Values should not be changed */ - WindowExt.cx = WindowExt.cy = 0; - ret = SetWindowExtEx(hDC, 500, 300, &WindowExt); - TEST(ret == 1); - //TEST(WindowExt.cx == 36000); - //TEST(WindowExt.cy == 27000); - - /* Check the viewport */ - GetViewportExtEx(hDC, &ViewportExt); - TEST(ViewportExt.cx == GetDeviceCaps(GetDC(0), HORZRES)); - TEST(ViewportExt.cy == -GetDeviceCaps(GetDC(0), VERTRES)); - - /* Test setting in low english mode */ - SetMapMode(hDC, MM_LOENGLISH); - ret = SetWindowExtEx(hDC, 320, 290, &WindowExt); - TEST(ret == 1); - //TEST(WindowExt.cx == 1417); - //TEST(WindowExt.cy == 1063); - - /* Values should not be changed */ - WindowExt.cx = WindowExt.cy = 0; - ret = SetWindowExtEx(hDC, 560, 140, &WindowExt); - TEST(ret == 1); - //TEST(WindowExt.cx == 1417); - //TEST(WindowExt.cy == 1063); - - /* Check the viewport */ - GetViewportExtEx(hDC, &ViewportExt); - TEST(ViewportExt.cx == GetDeviceCaps(GetDC(0), HORZRES)); - TEST(ViewportExt.cy == -GetDeviceCaps(GetDC(0), VERTRES)); - - /* Test setting in high english mode */ - SetMapMode(hDC, MM_HIENGLISH); - ret = SetWindowExtEx(hDC, 320, 290, &WindowExt); - TEST(ret == 1); - //TEST(WindowExt.cx == 14173); - //TEST(WindowExt.cy == 10630); - - /* Values should not be changed */ - WindowExt.cx = WindowExt.cy = 0; - ret = SetWindowExtEx(hDC, 1560, 1140, &WindowExt); - TEST(ret == 1); - //TEST(WindowExt.cx == 14173); - //TEST(WindowExt.cy == 10630); - - /* Check the viewport */ - GetViewportExtEx(hDC, &ViewportExt); - TEST(ViewportExt.cx == GetDeviceCaps(GetDC(0), HORZRES)); - TEST(ViewportExt.cy == -GetDeviceCaps(GetDC(0), VERTRES)); - - /* Test setting in twips mode */ - SetMapMode(hDC, MM_TWIPS); - ret = SetWindowExtEx(hDC, 3320, 3290, &WindowExt); - TEST(ret == 1); - //TEST(WindowExt.cx == 20409); - //TEST(WindowExt.cy == 15307); - - /* Values should not be changed */ - WindowExt.cx = WindowExt.cy = 0; - ret = SetWindowExtEx(hDC, 4560, 4140, &WindowExt); - TEST(ret == 1); - //TEST(WindowExt.cx == 20409); - //TEST(WindowExt.cy == 15307); - - /* Check the viewport */ - GetViewportExtEx(hDC, &ViewportExt); - TEST(ViewportExt.cx == GetDeviceCaps(GetDC(0), HORZRES)); - TEST(ViewportExt.cy == -GetDeviceCaps(GetDC(0), VERTRES)); - - /* test manually modifying the dcattr, should go to tests for GetViewportExtEx */ - SetMapMode(hDC, MM_ISOTROPIC); - ret = SetWindowExtEx(hDC, 420, 4140, &WindowExt); - //pDC_Attr->szlWindowExt.cx = 0; - GetViewportExtEx(hDC, &ViewportExt); - //TEST(pDC_Attr->szlWindowExt.cx == 0); - //TEST(ViewportExt.cx == 0); - - DeleteDC(hDC); -} - -START_TEST(SetWindowExtEx) -{ - Test_SetWindowExtEx(); -} - diff --git a/rostests/apitests/gdi32/SetWorldTransform.c b/rostests/apitests/gdi32/SetWorldTransform.c deleted file mode 100644 index f9aa0f3f6f0..00000000000 --- a/rostests/apitests/gdi32/SetWorldTransform.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for SetWorldTransform - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -void Test_SetWorldTransform() -{ - HDC hdcScreen, hdc; - XFORM xform; - BOOL result; - //PGDI_TABLE_ENTRY pEntry; - //DC_ATTR* pdcattr; - - /* Create a DC */ - hdcScreen = GetDC(NULL); - hdc = CreateCompatibleDC(hdcScreen); - ReleaseDC(NULL, hdcScreen); - SetGraphicsMode(hdc, GM_ADVANCED); - - /* Set identity transform */ - xform.eM11 = 1; - xform.eM12 = 0; - xform.eM21 = 0; - xform.eM22 = 1; - xform.eDx = 0; - xform.eDy = 0; - result = SetWorldTransform(hdc, &xform); - ok(result == 1, "\n"); - - /* Something invalid */ - xform.eM22 = 0; - result = SetWorldTransform(hdc, &xform); - ok(result == 0, "\n"); - - //pEntry = GdiHandleTable + GDI_HANDLE_GET_INDEX(hdc); - //pdcattr = pEntry->UserData; - - DeleteDC(hdc); -} - -START_TEST(SetWorldTransform) -{ - Test_SetWorldTransform(); -} - diff --git a/rostests/apitests/gdi32/gdi32_apitest.rbuild b/rostests/apitests/gdi32/gdi32_apitest.rbuild deleted file mode 100644 index ecfcdcc9507..00000000000 --- a/rostests/apitests/gdi32/gdi32_apitest.rbuild +++ /dev/null @@ -1,59 +0,0 @@ - - - - - . - wine - gdi32 - user32 - pseh - testlist.c - - AddFontResource.c - AddFontResourceEx.c - BeginPath.c - CombineTransform.c - CreateBitmapIndirect.c - CreateCompatibleDC.c - CreateDIBitmap.c - CreateFont.c - CreateFontIndirect.c - CreatePen.c - CreateRectRgn.c - DPtoLP.c - EngAcquireSemaphore.c - EngCreateSemaphore.c - EngDeleteSemaphore.c - EngReleaseSemaphore.c - ExtCreatePen.c - GdiConvertBitmap.c - GdiConvertBrush.c - GdiConvertDC.c - GdiConvertFont.c - GdiConvertPalette.c - GdiConvertRegion.c - GdiDeleteLocalDC.c - GdiGetCharDimensions.c - GdiGetLocalBrush.c - GdiGetLocalDC.c - GdiReleaseLocalDC.c - GdiSetAttrs.c - GetClipRgn.c - GetCurrentObject.c - GetDIBits.c - GetObject.c - GetPixel.c - GetStockObject.c - GetTextExtentExPoint.c - GetTextFace.c - MaskBlt.c - Rectangle.c - SelectObject.c - SetDCPenColor.c - SetDIBits.c - SetMapMode.c - SetSysColors.c - SetWindowExtEx.c - SetWorldTransform.c - - diff --git a/rostests/apitests/gdi32/testlist.c b/rostests/apitests/gdi32/testlist.c deleted file mode 100644 index ec08618639b..00000000000 --- a/rostests/apitests/gdi32/testlist.c +++ /dev/null @@ -1,106 +0,0 @@ -#define WIN32_LEAN_AND_MEAN -#define __ROS_LONG64__ -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_AddFontResource(void); -extern void func_AddFontResourceEx(void); -extern void func_BeginPath(void); -extern void func_CombineTransform(void); -extern void func_CreateBitmapIndirect(void); -extern void func_CreateCompatibleDC(void); -extern void func_CreateDIBitmap(void); -extern void func_CreateFont(void); -extern void func_CreateFontIndirect(void); -extern void func_CreatePen(void); -extern void func_CreateRectRgn(void); -extern void func_DPtoLP(void); -extern void func_EngAcquireSemaphore(void); -extern void func_EngCreateSemaphore(void); -extern void func_EngDeleteSemaphore(void); -extern void func_EngReleaseSemaphore(void); -extern void func_ExtCreatePen(void); -extern void func_GdiConvertBitmap(void); -extern void func_GdiConvertBrush(void); -extern void func_GdiConvertDC(void); -extern void func_GdiConvertFont(void); -extern void func_GdiConvertPalette(void); -extern void func_GdiConvertRegion(void); -extern void func_GdiDeleteLocalDC(void); -extern void func_GdiGetCharDimensions(void); -extern void func_GdiGetLocalBrush(void); -extern void func_GdiGetLocalDC(void); -extern void func_GdiReleaseLocalDC(void); -extern void func_GdiSetAttrs(void); -extern void func_GetClipRgn(void); -extern void func_GetCurrentObject(void); -extern void func_GetDIBits(void); -extern void func_GetPixel(void); -extern void func_GetObject(void); -extern void func_GetStockObject(void); -extern void func_GetTextExtentExPoint(void); -extern void func_GetTextFace(void); -extern void func_MaskBlt(void); -extern void func_Rectangle(void); -extern void func_SelectObject(void); -extern void func_SetDCPenColor(void); -extern void func_SetDIBits(void); -extern void func_SetMapMode(void); -extern void func_SetSysColors(void); -extern void func_SetWindowExtEx(void); -extern void func_SetWorldTransform(void); - -const struct test winetest_testlist[] = -{ - { "AddFontResource", func_AddFontResource }, - { "AddFontResourceEx", func_AddFontResourceEx }, - { "BeginPath", func_BeginPath }, - { "CombineTransform", func_CombineTransform }, - { "CreateBitmapIndirect", func_CreateBitmapIndirect }, - { "CreateCompatibleDC", func_CreateCompatibleDC }, - { "CreateDIBitmap", func_CreateDIBitmap }, - { "CreateFont", func_CreateFont }, - { "CreateFontIndirect", func_CreateFontIndirect }, - { "CreatePen", func_CreatePen }, - { "CreateRectRgn", func_CreateRectRgn }, - { "DPtoLP", func_DPtoLP }, - { "EngAcquireSemaphore", func_EngAcquireSemaphore }, - { "EngCreateSemaphore", func_EngCreateSemaphore }, - { "EngDeleteSemaphore", func_EngDeleteSemaphore }, - { "EngReleaseSemaphore", func_EngReleaseSemaphore }, - { "ExtCreatePen", func_ExtCreatePen }, - { "GdiConvertBitmap", func_GdiConvertBitmap }, - { "GdiConvertBrush", func_GdiConvertBrush }, - { "GdiConvertDC", func_GdiConvertDC }, - { "GdiConvertFont", func_GdiConvertFont }, - { "GdiConvertPalette", func_GdiConvertPalette }, - { "GdiConvertRegion", func_GdiConvertRegion }, - { "GdiDeleteLocalDC", func_GdiDeleteLocalDC }, - { "GdiGetCharDimensions", func_GdiGetCharDimensions }, - { "GdiGetLocalBrush", func_GdiGetLocalBrush }, - { "GdiGetLocalDC", func_GdiGetLocalDC }, - { "GdiReleaseLocalDC", func_GdiReleaseLocalDC }, - { "GdiSetAttrs", func_GdiSetAttrs }, - { "GetClipRgn", func_GetClipRgn }, - { "GetCurrentObject", func_GetCurrentObject }, - { "GetDIBits", func_GetDIBits }, - { "GetPixel", func_GetPixel }, - { "GetObject", func_GetObject }, - { "GetStockObject", func_GetStockObject }, - { "GetTextExtentExPoint", func_GetTextExtentExPoint }, - { "GetTextFace", func_GetTextFace }, - { "MaskBlt", func_MaskBlt }, - { "Rectangle", func_Rectangle }, - { "SelectObject", func_SelectObject }, - { "SetDCPenColor", func_SetDCPenColor }, - { "SetDIBits", func_SetDIBits }, - { "SetMapMode", func_SetMapMode }, - { "SetSysColors", func_SetSysColors }, - { "SetWindowExtEx", func_SetWindowExtEx }, - { "SetWorldTransform", func_SetWorldTransform }, - - { 0, 0 } -}; - diff --git a/rostests/apitests/kernel32/CMakeLists.txt b/rostests/apitests/kernel32/CMakeLists.txt deleted file mode 100644 index bd2478d4e52..00000000000 --- a/rostests/apitests/kernel32/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ - -add_definitions(-D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - GetDriveType.c - testlist.c) - -add_executable(kernel32_apitest ${SOURCE}) -target_link_libraries(kernel32_apitest wine ${PSEH_LIB}) -set_module_type(kernel32_apitest win32cui) -add_importlibs(kernel32_apitest gdi32 user32 msvcrt kernel32 ntdll) -add_cd_file(TARGET kernel32_apitest DESTINATION reactos/bin FOR all) diff --git a/rostests/apitests/kernel32/GetDriveType.c b/rostests/apitests/kernel32/GetDriveType.c deleted file mode 100644 index 010eb362de7..00000000000 --- a/rostests/apitests/kernel32/GetDriveType.c +++ /dev/null @@ -1,71 +0,0 @@ -#include -#include -#include - -#define IS_DRIVE_TYPE_VALID(type) ((type) != DRIVE_UNKNOWN && (type) != DRIVE_NO_ROOT_DIR) - -START_TEST(GetDriveType) -{ - UINT Type, Type2, i; - WCHAR Path[MAX_PATH]; - - /* Note: Successful calls can set last error to at least ERROR_NOT_A_REPARSE_POINT, we don't test it here */ - SetLastError(0xdeadbeaf); - - Type = GetDriveTypeW(L""); - ok(Type == DRIVE_NO_ROOT_DIR, "Expected DRIVE_NO_ROOT_DIR, got %u\n", Type); - - Type = GetDriveTypeW(L"\nC:\\"); - ok(Type == DRIVE_NO_ROOT_DIR, "Expected DRIVE_NO_ROOT_DIR, got %u\n", Type); - - Type = GetDriveTypeW(L"Z:\\"); - ok(Type == DRIVE_NO_ROOT_DIR, "Expected DRIVE_NO_ROOT_DIR, got %u\n", Type); - - ok(GetLastError() == 0xdeadbeaf, "Expected no errors, got %lu\n", GetLastError()); - - /* Drive root is accepted without ending slash */ - Type = GetDriveTypeW(L"C:"); - ok(IS_DRIVE_TYPE_VALID(Type), "Expected valid drive type, got %u\n", Type); - - Type = GetDriveTypeW(L"C:\\"); - ok(IS_DRIVE_TYPE_VALID(Type), "Expected valid drive type, got %u\n", Type); - - Type = GetDriveTypeW(NULL); - ok(IS_DRIVE_TYPE_VALID(Type), "Expected valid drive type, got %u\n", Type); - - i = GetCurrentDirectoryW(sizeof(Path)/sizeof(Path[0]), Path); - if (i) - { - /* Note: there is no backslash at the end of Path */ - SetLastError(0xdeadbeaf); - Type2 = GetDriveTypeW(Path); - ok(Type2 == DRIVE_NO_ROOT_DIR, "Expected DRIVE_NO_ROOT_DIR, got %u\n", Type2); - ok(GetLastError() == 0xdeadbeaf, "Expected ERROR_NOT_A_REPARSE_POINT, got %lu\n", GetLastError()); - - wcscpy(Path+i, L"\\"); - Type2 = GetDriveTypeW(Path); - ok(Type == Type2, "Types are not equal: %u != %u\n", Type, Type2); - } - - i = GetSystemDirectoryW(Path, sizeof(Path)/sizeof(Path[0])); - if (i) - { - /* Note: there is no backslash at the end of Path */ - SetLastError(0xdeadbeaf); - Type = GetDriveTypeW(Path); - ok(Type == DRIVE_NO_ROOT_DIR, "Expected DRIVE_NO_ROOT_DIR, got %u\n", Type); - ok(GetLastError() == 0xdeadbeaf, "Expected no errors, got %lu\n", GetLastError()); - - wcscpy(Path+i, L"\\"); - Type = GetDriveTypeW(Path); - ok(IS_DRIVE_TYPE_VALID(Type), "Expected valid drive type, got %u\n", Type); - - wcscpy(Path+i, L"/"); - Type = GetDriveTypeW(Path); - ok(IS_DRIVE_TYPE_VALID(Type), "Expected valid drive type, got %u\n", Type); - - wcscpy(Path+i, L"\\\\"); - Type = GetDriveTypeW(Path); - ok(IS_DRIVE_TYPE_VALID(Type), "Expected valid drive type, got %u\n", Type); - } -} diff --git a/rostests/apitests/kernel32/kernel32_apitest.rbuild b/rostests/apitests/kernel32/kernel32_apitest.rbuild deleted file mode 100644 index 81766be6722..00000000000 --- a/rostests/apitests/kernel32/kernel32_apitest.rbuild +++ /dev/null @@ -1,13 +0,0 @@ - - - - - . - wine - ntdll - pseh - testlist.c - - GetDriveType.c - - diff --git a/rostests/apitests/kernel32/testlist.c b/rostests/apitests/kernel32/testlist.c deleted file mode 100644 index 123e1ce2ea5..00000000000 --- a/rostests/apitests/kernel32/testlist.c +++ /dev/null @@ -1,16 +0,0 @@ -#define WIN32_LEAN_AND_MEAN -#define __ROS_LONG64__ -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_GetDriveType(void); - -const struct test winetest_testlist[] = -{ - { "GetDriveType", func_GetDriveType }, - - { 0, 0 } -}; - diff --git a/rostests/apitests/msvcrt/CMakeLists.txt b/rostests/apitests/msvcrt/CMakeLists.txt deleted file mode 100644 index 59c6772b378..00000000000 --- a/rostests/apitests/msvcrt/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ - -add_definitions(-D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - ieee.c - splitpath.c - testlist.c) - -add_executable(msvcrt_apitest ${SOURCE}) -target_link_libraries(msvcrt_apitest wine) -set_module_type(msvcrt_apitest win32cui) -add_importlibs(msvcrt_apitest msvcrt kernel32) -add_cd_file(TARGET msvcrt_apitest DESTINATION reactos/bin FOR all) diff --git a/rostests/apitests/msvcrt/ieee.c b/rostests/apitests/msvcrt/ieee.c deleted file mode 100644 index 814b1c320ed..00000000000 --- a/rostests/apitests/msvcrt/ieee.c +++ /dev/null @@ -1,944 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Tests for IEEE floatting-point functions - * PROGRAMMER: Pierre Schweitzer (pierre@reactos.org) - * REFERENCES: http://msdn.microsoft.com/en-US/library/h7zkk1bz%28v=VS.80%29.aspx - */ - -#include -#include -#include - -typedef union -{ - double d; - long long l; -} ieee_double; - -void test_finite(void) -{ - ieee_double tested; - - tested.l = 0xFFFFFFFFFFFFFFFFLL; - ok(_finite(tested.d) == FALSE, "_finite = TRUE\n"); - tested.l = 0xFFF8000000000001LL; - ok(_finite(tested.d) == FALSE, "_finite = TRUE\n"); - tested.l = 0xFFF8000000000000LL; - ok(_finite(tested.d) == FALSE, "_finite = TRUE\n"); - tested.l = 0xFFF7FFFFFFFFFFFFLL; - ok(_finite(tested.d) == FALSE, "_finite = TRUE\n"); - tested.l = 0xFFF0000000000001LL; - ok(_finite(tested.d) == FALSE, "_finite = TRUE\n"); - tested.l = 0xFFF0000000000000LL; - ok(_finite(tested.d) == FALSE, "_finite = TRUE\n"); - tested.l = 0xFFEFFFFFFFFFFFFFLL; - ok(_finite(tested.d) == TRUE, "_finite = FALSE\n"); - tested.l = 0x8010000000000000LL; - ok(_finite(tested.d) == TRUE, "_finite = FALSE\n"); - tested.l = 0x800FFFFFFFFFFFFFLL; - ok(_finite(tested.d) == TRUE, "_finite = FALSE\n"); - tested.l = 0x8000000000000001LL; - ok(_finite(tested.d) == TRUE, "_finite = FALSE\n"); - tested.l = 0x8000000000000000LL; - ok(_finite(tested.d) == TRUE, "_finite = FALSE\n"); - tested.l = 0x0000000000000000LL; - ok(_finite(tested.d) == TRUE, "_finite = FALSE\n"); - tested.l = 0x0000000000000001LL; - ok(_finite(tested.d) == TRUE, "_finite = FALSE\n"); - tested.l = 0x000FFFFFFFFFFFFFLL; - ok(_finite(tested.d) == TRUE, "_finite = FALSE\n"); - tested.l = 0x0010000000000000LL; - ok(_finite(tested.d) == TRUE, "_finite = FALSE\n"); - tested.l = 0x7FEFFFFFFFFFFFFFLL; - ok(_finite(tested.d) == TRUE, "_finite = FALSE\n"); - tested.l = 0x7FF0000000000000LL; - ok(_finite(tested.d) == FALSE, "_finite = TRUE\n"); - tested.l = 0x7FF0000000000001LL; - ok(_finite(tested.d) == FALSE, "_finite = TRUE\n"); - tested.l = 0x7FF7FFFFFFFFFFFFLL; - ok(_finite(tested.d) == FALSE, "_finite = TRUE\n"); - tested.l = 0x7FF8000000000000LL; - ok(_finite(tested.d) == FALSE, "_finite = TRUE\n"); - tested.l = 0x7FFFFFFFFFFFFFFFLL; - ok(_finite(tested.d) == FALSE, "_finite = TRUE\n"); - - /* MSDN example */ - ok(_finite(2.387000) == TRUE, "_finite = FALSE\n"); -} - -void test_fpclass(void) -{ - int class; - ieee_double tested; - - tested.l = 0xFFFFFFFFFFFFFFFFLL; - class = _fpclass(tested.d); - ok(class == _FPCLASS_QNAN, "class = %d\n", class); - tested.l = 0xFFF8000000000001LL; - class = _fpclass(tested.d); - ok(class == _FPCLASS_QNAN, "class = %d\n", class); - tested.l = 0xFFF8000000000000LL; - class = _fpclass(tested.d); - /* Normally it has no class, but w2k3 defines it - * like that - */ - ok(class == _FPCLASS_QNAN, "class = %d\n", class); - tested.l = 0xFFF7FFFFFFFFFFFFLL; - class = _fpclass(tested.d); - /* According to IEEE, it should be Signaling NaN, but - * on w2k3, it's Quiet NAN - * ok(class == _FPCLASS_SNAN, "class = %d\n", class); - */ - ok(class == _FPCLASS_QNAN, "class = %d\n", class); - tested.l = 0xFFF0000000000001LL; - class = _fpclass(tested.d); - /* According to IEEE, it should be Signaling NaN, but - * on w2k3, it's Quiet NAN - * ok(class == _FPCLASS_SNAN, "class = %d\n", class); - */ - ok(class == _FPCLASS_QNAN, "class = %d\n", class); - tested.l = 0xFFF0000000000000LL; - class = _fpclass(tested.d); - ok(class == _FPCLASS_NINF, "class = %d\n", class); - tested.l = 0xFFEFFFFFFFFFFFFFLL; - class = _fpclass(tested.d); - ok(class == _FPCLASS_NN, "class = %d\n", class); - tested.l = 0x8010000000000000LL; - class = _fpclass(tested.d); - ok(class == _FPCLASS_NN, "class = %d\n", class); - tested.l = 0x800FFFFFFFFFFFFFLL; - class = _fpclass(tested.d); - ok(class == _FPCLASS_ND, "class = %d\n", class); - tested.l = 0x8000000000000001LL; - class = _fpclass(tested.d); - ok(class == _FPCLASS_ND, "class = %d\n", class); - tested.l = 0x8000000000000000LL; - class = _fpclass(tested.d); - ok(class == _FPCLASS_NZ, "class = %d\n", class); - tested.l = 0x0000000000000000LL; - class = _fpclass(tested.d); - ok(class == _FPCLASS_PZ, "class = %d\n", class); - tested.l = 0x0000000000000001LL; - class = _fpclass(tested.d); - ok(class == _FPCLASS_PD, "class = %d\n", class); - tested.l = 0x000FFFFFFFFFFFFFLL; - class = _fpclass(tested.d); - ok(class == _FPCLASS_PD, "class = %d\n", class); - tested.l = 0x0010000000000000LL; - class = _fpclass(tested.d); - ok(class == _FPCLASS_PN, "class = %d\n", class); - tested.l = 0x7FEFFFFFFFFFFFFFLL; - class = _fpclass(tested.d); - ok(class == _FPCLASS_PN, "class = %d\n", class); - tested.l = 0x7FF0000000000000LL; - class = _fpclass(tested.d); - ok(class == _FPCLASS_PINF, "class = %d\n", class); - tested.l = 0x7FF0000000000001LL; - class = _fpclass(tested.d); - /* According to IEEE, it should be Signaling NaN, but - * on w2k3, it's Quiet NAN - * ok(class == _FPCLASS_SNAN, "class = %d\n", class); - */ - ok(class == _FPCLASS_QNAN, "class = %d\n", class); - tested.l = 0x7FF7FFFFFFFFFFFFLL; - class = _fpclass(tested.d); - /* According to IEEE, it should be Signaling NaN, but - * on w2k3, it's Quiet NAN - * ok(class == _FPCLASS_SNAN, "class = %d\n", class); - */ - ok(class == _FPCLASS_QNAN, "class = %d\n", class); - tested.l = 0x7FF8000000000000LL; - class = _fpclass(tested.d); - ok(class == _FPCLASS_QNAN, "class = %d\n", class); - tested.l = 0x7FFFFFFFFFFFFFFFLL; - class = _fpclass(tested.d); - ok(class == _FPCLASS_QNAN, "class = %d\n", class); - - /* MSDN example */ - class = _fpclass(2.387000); - ok(class == _FPCLASS_PN, "class = %d\n", class); -} - -void test_isnan(void) -{ - ieee_double tested; - - tested.l = 0xFFFFFFFFFFFFFFFFLL; - ok(_isnan(tested.d) == TRUE, "_isnan = FALSE\n"); - tested.l = 0xFFF8000000000001LL; - ok(_isnan(tested.d) == TRUE, "_isnan = FALSE\n"); - tested.l = 0xFFF8000000000000LL; - ok(_isnan(tested.d) == TRUE, "_isnan = FALSE\n"); - tested.l = 0xFFF7FFFFFFFFFFFFLL; - ok(_isnan(tested.d) == TRUE, "_isnan = FALSE\n"); - tested.l = 0xFFF0000000000001LL; - ok(_isnan(tested.d) == TRUE, "_isnan = FALSE\n"); - tested.l = 0xFFF0000000000000LL; - ok(_isnan(tested.d) == FALSE, "_isnan = TRUE\n"); - tested.l = 0xFFEFFFFFFFFFFFFFLL; - ok(_isnan(tested.d) == FALSE, "_isnan = TRUE\n"); - tested.l = 0x8010000000000000LL; - ok(_isnan(tested.d) == FALSE, "_isnan = TRUE\n"); - tested.l = 0x800FFFFFFFFFFFFFLL; - ok(_isnan(tested.d) == FALSE, "_isnan = TRUE\n"); - tested.l = 0x8000000000000001LL; - ok(_isnan(tested.d) == FALSE, "_isnan = TRUE\n"); - tested.l = 0x8000000000000000LL; - ok(_isnan(tested.d) == FALSE, "_isnan = TRUE\n"); - tested.l = 0x0000000000000000LL; - ok(_isnan(tested.d) == FALSE, "_isnan = TRUE\n"); - tested.l = 0x0000000000000001LL; - ok(_isnan(tested.d) == FALSE, "_isnan = TRUE\n"); - tested.l = 0x000FFFFFFFFFFFFFLL; - ok(_isnan(tested.d) == FALSE, "_isnan = TRUE\n"); - tested.l = 0x0010000000000000LL; - ok(_isnan(tested.d) == FALSE, "_isnan = TRUE\n"); - tested.l = 0x7FEFFFFFFFFFFFFFLL; - ok(_isnan(tested.d) == FALSE, "_isnan = TRUE\n"); - tested.l = 0x7FF0000000000000LL; - ok(_isnan(tested.d) == FALSE, "_isnan = TRUE\n"); - tested.l = 0x7FF0000000000001LL; - ok(_isnan(tested.d) == TRUE, "_isnan = FALSE\n"); - tested.l = 0x7FF7FFFFFFFFFFFFLL; - ok(_isnan(tested.d) == TRUE, "_isnan = FALSE\n"); - tested.l = 0x7FF8000000000000LL; - ok(_isnan(tested.d) == TRUE, "_isnan = FALSE\n"); - tested.l = 0x7FFFFFFFFFFFFFFFLL; - ok(_isnan(tested.d) == TRUE, "_isnan = FALSE\n"); - - /* MSDN example */ - ok(_isnan(2.387000) == FALSE, "_isnan = TRUE\n"); -} - -void test_j0(void) -{ - ieee_double tested; - ieee_double expected; - ieee_double result; - - expected.l = 0; - - errno = 0xDEADBEEF; - tested.l = 0xFFFFFFFFFFFFFFFFLL; - expected.l = 0xFFFFFFFFFFFFFFFFLL; - result.d = _j0(tested.d); - ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFF8000000000001LL; - expected.l = 0xFFF8000000000001LL; - result.d = _j0(tested.d); - ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFF8000000000000LL; - expected.l = 0xFFF8000000000000LL; - result.d = _j0(tested.d); - ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFF7FFFFFFFFFFFFLL; - expected.l = 0xFFFFFFFFFFFFFFFFLL; - result.d = _j0(tested.d); - ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFF0000000000001LL; - expected.l = 0xFFF8000000000001LL; - result.d = _j0(tested.d); - ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFF0000000000000LL; - expected.l = 0xFFF8000000000000LL; - result.d = _j0(tested.d); - ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFEFFFFFFFFFFFFFLL; - expected.l = 0x1FE7206E1D6FDCFALL; - result.d = _j0(tested.d); - ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x8010000000000000LL; - expected.l = 0x3FF0000000000000LL; - result.d = _j0(tested.d); - ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x800FFFFFFFFFFFFFLL; - expected.l = 0x3FF0000000000000LL; - result.d = _j0(tested.d); - ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x8000000000000001LL; - expected.l = 0x3FF0000000000000LL; - result.d = _j0(tested.d); - ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x8000000000000000LL; - expected.l = 0x3FF0000000000000LL; - result.d = _j0(tested.d); - ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x0000000000000000LL; - expected.l = 0x3FF0000000000000LL; - result.d = _j0(tested.d); - ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x0000000000000001LL; - expected.l = 0x3FF0000000000000LL; - result.d = _j0(tested.d); - ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x000FFFFFFFFFFFFFLL; - expected.l = 0x3FF0000000000000LL; - result.d = _j0(tested.d); - ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x0010000000000000LL; - expected.l = 0x3FF0000000000000LL; - result.d = _j0(tested.d); - ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FEFFFFFFFFFFFFFLL; - expected.l = 0x1FE7206E1D6FDCFALL; - result.d = _j0(tested.d); - ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FF0000000000000LL; - expected.l = 0xFFF8000000000000LL; - result.d = _j0(tested.d); - ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FF0000000000001LL; - expected.l = 0x7FF8000000000001LL; - result.d = _j0(tested.d); - ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FF7FFFFFFFFFFFFLL; - expected.l = 0x7FFFFFFFFFFFFFFFLL; - result.d = _j0(tested.d); - ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FF8000000000000LL; - expected.l = 0x7FF8000000000000LL; - result.d = _j0(tested.d); - ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FFFFFFFFFFFFFFFLL; - expected.l = 0x7FFFFFFFFFFFFFFFLL; - result.d = _j0(tested.d); - ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - - /* MSDN example */ - errno = 0xDEADBEEF; - tested.d = 2.387000; - expected.l = 0x3F83059F9F6F30CALL; - result.d = _j0(tested.d); - ok(result.l == expected.l, "_j0 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); -} - -void test_j1(void) -{ - ieee_double tested; - ieee_double expected; - ieee_double result; - - expected.l = 0; - - errno = 0xDEADBEEF; - tested.l = 0xFFFFFFFFFFFFFFFFLL; - expected.l = 0xFFFFFFFFFFFFFFFFLL; - result.d = _j1(tested.d); - ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFF8000000000001LL; - expected.l = 0xFFF8000000000001LL; - result.d = _j1(tested.d); - ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFF8000000000000LL; - expected.l = 0xFFF8000000000000LL; - result.d = _j1(tested.d); - ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFF7FFFFFFFFFFFFLL; - expected.l = 0xFFFFFFFFFFFFFFFFLL; - result.d = _j1(tested.d); - ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFF0000000000001LL; - expected.l = 0xFFF8000000000001LL; - result.d = _j1(tested.d); - ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFF0000000000000LL; - expected.l = 0xFFF8000000000000LL; - result.d = _j1(tested.d); - ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFEFFFFFFFFFFFFFLL; - expected.l = 0x9FE7206E1D6FDCFALL; - result.d = _j1(tested.d); - ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x8010000000000000LL; - expected.l = 0x8008000000000000LL; - result.d = _j1(tested.d); - ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x800FFFFFFFFFFFFFLL; - expected.l = 0x8008000000000000LL; - result.d = _j1(tested.d); - ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x8000000000000001LL; - expected.l = 0x8000000000000000LL; - result.d = _j1(tested.d); - ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x8000000000000000LL; - expected.l = 0x8000000000000000LL; - result.d = _j1(tested.d); - ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x0000000000000000LL; - expected.l = 0x0000000000000000LL; - result.d = _j1(tested.d); - ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x0000000000000001LL; - expected.l = 0x0000000000000000LL; - result.d = _j1(tested.d); - ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x000FFFFFFFFFFFFFLL; - expected.l = 0x0008000000000000LL; - result.d = _j1(tested.d); - ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x0010000000000000LL; - expected.l = 0x0008000000000000LL; - result.d = _j1(tested.d); - ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FEFFFFFFFFFFFFFLL; - expected.l = 0x1FE7206E1D6FDCFALL; - result.d = _j1(tested.d); - ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FF0000000000000LL; - expected.l = 0xFFF8000000000000LL; - result.d = _j1(tested.d); - ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FF0000000000001LL; - expected.l = 0x7FF8000000000001LL; - result.d = _j1(tested.d); - ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FF7FFFFFFFFFFFFLL; - expected.l = 0x7FFFFFFFFFFFFFFFLL; - result.d = _j1(tested.d); - ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FF8000000000000LL; - expected.l = 0x7FF8000000000000LL; - result.d = _j1(tested.d); - ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FFFFFFFFFFFFFFFLL; - expected.l = 0x7FFFFFFFFFFFFFFFLL; - result.d = _j1(tested.d); - ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - - /* MSDN example */ - errno = 0xDEADBEEF; - tested.d = 2.387000; - expected.l = 0x3FE0BBEFC62ABAB1LL; - result.d = _j1(tested.d); - ok(result.l == expected.l, "_j1 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); -} - -void test_scalb(void) -{ - ieee_double tested; - ieee_double expected; - ieee_double result; - - expected.l = 0; - - errno = 0xDEADBEEF; - tested.l = 0xFFFFFFFFFFFFFFFFLL; - expected.l = 0xFFFFFFFFFFFFFFFFLL; - result.d = _scalb(tested.d, 3); - ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFF8000000000001LL; - expected.l = 0xFFF8000000000001LL; - result.d = _scalb(tested.d, 3); - ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFF8000000000000LL; - expected.l = 0xFFF8000000000000LL; - result.d = _scalb(tested.d, 3); - ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFF7FFFFFFFFFFFFLL; - expected.l = 0xFFFFFFFFFFFFFFFFLL; - result.d = _scalb(tested.d, 3); - ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFF0000000000001LL; - expected.l = 0xFFF8000000000001LL; - result.d = _scalb(tested.d, 3); - ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFF0000000000000LL; - expected.l = 0xFFF0000000000000LL; - result.d = _scalb(tested.d, 3); - ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFEFFFFFFFFFFFFFLL; - expected.l = 0xFFF0000000000000LL; - result.d = _scalb(tested.d, 3); - ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); - ok(errno == ERANGE, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x8010000000000000LL; - expected.l = 0x8040000000000000LL; - result.d = _scalb(tested.d, 3); - ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x800FFFFFFFFFFFFFLL; - expected.l = 0x803FFFFFFFFFFFFELL; - result.d = _scalb(tested.d, 3); - ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x8000000000000001LL; - expected.l = 0x8000000000000008LL; - result.d = _scalb(tested.d, 3); - ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x8000000000000000LL; - expected.l = 0x8000000000000000LL; - result.d = _scalb(tested.d, 3); - ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x0000000000000000LL; - expected.l = 0x0000000000000000LL; - result.d = _scalb(tested.d, 3); - ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x0000000000000001LL; - expected.l = 0x0000000000000008LL; - result.d = _scalb(tested.d, 3); - ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x000FFFFFFFFFFFFFLL; - expected.l = 0x003FFFFFFFFFFFFELL; - result.d = _scalb(tested.d, 3); - ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x0010000000000000LL; - expected.l = 0x0040000000000000LL; - result.d = _scalb(tested.d, 3); - ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FEFFFFFFFFFFFFFLL; - expected.l = 0x7FF0000000000000LL; - result.d = _scalb(tested.d, 3); - ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); - ok(errno == ERANGE, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FF0000000000000LL; - expected.l = 0x7FF0000000000000LL; - result.d = _scalb(tested.d, 3); - ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FF0000000000001LL; - expected.l = 0x7FF8000000000001LL; - result.d = _scalb(tested.d, 3); - ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FF7FFFFFFFFFFFFLL; - expected.l = 0x7FFFFFFFFFFFFFFFLL; - result.d = _scalb(tested.d, 3); - ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FF8000000000000LL; - expected.l = 0x7FF8000000000000LL; - result.d = _scalb(tested.d, 3); - ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FFFFFFFFFFFFFFFLL; - expected.l = 0x7FFFFFFFFFFFFFFFLL; - result.d = _scalb(tested.d, 3); - ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - - /* MSDN example */ - errno = 0xDEADBEEF; - tested.d = 2.387000; - expected.l = 0x4033189374BC6A7FLL; - result.d = _scalb(tested.d, 3); - ok(result.l == expected.l, "_scalb returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); -} - -void test_y0(void) -{ - ieee_double tested; - ieee_double expected; - ieee_double result; - - expected.l = 0; - - errno = 0xDEADBEEF; - tested.l = 0xFFFFFFFFFFFFFFFFLL; - expected.l = 0xFFFFFFFFFFFFFFFFLL; - result.d = _y0(tested.d); - ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFF8000000000001LL; - expected.l = 0xFFF8000000000001LL; - result.d = _y0(tested.d); - ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFF8000000000000LL; - expected.l = 0xFFF8000000000000LL; - result.d = _y0(tested.d); - ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFF7FFFFFFFFFFFFLL; - expected.l = 0xFFFFFFFFFFFFFFFFLL; - result.d = _y0(tested.d); - ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFF0000000000001LL; - expected.l = 0xFFF8000000000001LL; - result.d = _y0(tested.d); - ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFF0000000000000LL; - expected.l = 0xFFF8000000000000LL; - result.d = _y0(tested.d); - ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFEFFFFFFFFFFFFFLL; - expected.l = 0xFFF8000000000000LL; - result.d = _y0(tested.d); - ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x8010000000000000LL; - expected.l = 0xFFF8000000000000LL; - result.d = _y0(tested.d); - ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x800FFFFFFFFFFFFFLL; - expected.l = 0xFFF8000000000000LL; - result.d = _y0(tested.d); - ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x8000000000000001LL; - expected.l = 0xFFF8000000000000LL; - result.d = _y0(tested.d); - ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x8000000000000000LL; - expected.l = 0xFFF0000000000000LL; - result.d = _y0(tested.d); - ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); - ok(errno == ERANGE, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x0000000000000000LL; - expected.l = 0xFFF0000000000000LL; - result.d = _y0(tested.d); - ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); - ok(errno == ERANGE, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x0000000000000001LL; - expected.l = 0xC07D9FFC3469E1B3LL; - result.d = _y0(tested.d); - ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x000FFFFFFFFFFFFFLL; - expected.l = 0xC07C30D8F820740ELL; - result.d = _y0(tested.d); - ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x0010000000000000LL; - expected.l = 0xC07C30D8F820740ELL; - result.d = _y0(tested.d); - ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FEFFFFFFFFFFFFFLL; - expected.l = 0x9FD5A36F8428F58BLL; - result.d = _y0(tested.d); - ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FF0000000000000LL; - expected.l = 0xFFF8000000000000LL; - result.d = _y0(tested.d); - ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FF0000000000001LL; - expected.l = 0x7FF8000000000001LL; - result.d = _y0(tested.d); - ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FF7FFFFFFFFFFFFLL; - expected.l = 0x7FFFFFFFFFFFFFFFLL; - result.d = _y0(tested.d); - ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FF8000000000000LL; - expected.l = 0x7FF8000000000000LL; - result.d = _y0(tested.d); - ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FFFFFFFFFFFFFFFLL; - expected.l = 0x7FFFFFFFFFFFFFFFLL; - result.d = _y0(tested.d); - ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - - /* MSDN example */ - errno = 0xDEADBEEF; - tested.d = 2.387000; - expected.l = 0x3FE05FB1B1E49E66LL; - result.d = _y0(tested.d); - ok(result.l == expected.l, "_y0 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); -} - -void test_y1(void) -{ - ieee_double tested; - ieee_double expected; - ieee_double result; - - expected.l = 0; - - errno = 0xDEADBEEF; - tested.l = 0xFFFFFFFFFFFFFFFFLL; - expected.l = 0xFFFFFFFFFFFFFFFFLL; - result.d = _y1(tested.d); - ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFF8000000000001LL; - expected.l = 0xFFF8000000000001LL; - result.d = _y1(tested.d); - ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFF8000000000000LL; - expected.l = 0xFFF8000000000000LL; - result.d = _y1(tested.d); - ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFF7FFFFFFFFFFFFLL; - expected.l = 0xFFFFFFFFFFFFFFFFLL; - result.d = _y1(tested.d); - ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFF0000000000001LL; - expected.l = 0xFFF8000000000001LL; - result.d = _y1(tested.d); - ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFF0000000000000LL; - expected.l = 0xFFF8000000000000LL; - result.d = _y1(tested.d); - ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0xFFEFFFFFFFFFFFFFLL; - expected.l = 0xFFF8000000000000LL; - result.d = _y1(tested.d); - ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x8010000000000000LL; - expected.l = 0xFFF8000000000000LL; - result.d = _y1(tested.d); - ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x800FFFFFFFFFFFFFLL; - expected.l = 0xFFF8000000000000LL; - result.d = _y1(tested.d); - ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x8000000000000001LL; - expected.l = 0xFFF8000000000000LL; - result.d = _y1(tested.d); - ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x8000000000000000LL; - expected.l = 0xFFF8000000000000LL; - result.d = _y1(tested.d); - ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); - ok(errno == ERANGE, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x0000000000000000LL; - expected.l = 0xFFF8000000000000LL; - result.d = _y1(tested.d); - ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); - ok(errno == ERANGE, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x0000000000000001LL; - expected.l = 0xFFF0000000000000LL; - result.d = _y1(tested.d); - ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x000FFFFFFFFFFFFFLL; - expected.l = 0xFFC45F306DC9C884LL; - result.d = _y1(tested.d); - ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x0010000000000000LL; - expected.l = 0xFFC45F306DC9C883LL; - result.d = _y1(tested.d); - ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FEFFFFFFFFFFFFFLL; - expected.l = 0x9FD5A36F8428F58BLL; - result.d = _y1(tested.d); - ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FF0000000000000LL; - expected.l = 0xFFF8000000000000LL; - result.d = _y1(tested.d); - ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FF0000000000001LL; - expected.l = 0x7FF8000000000001LL; - result.d = _y1(tested.d); - ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FF7FFFFFFFFFFFFLL; - expected.l = 0x7FFFFFFFFFFFFFFFLL; - result.d = _y1(tested.d); - ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FF8000000000000LL; - expected.l = 0x7FF8000000000000LL; - result.d = _y1(tested.d); - ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - errno = 0xDEADBEEF; - tested.l = 0x7FFFFFFFFFFFFFFFLL; - expected.l = 0x7FFFFFFFFFFFFFFFLL; - result.d = _y1(tested.d); - ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); - ok(errno == EDOM, "errno: %d\n", errno); - - /* MSDN example */ - errno = 0xDEADBEEF; - tested.d = 2.387000; - expected.l = 0x3FB828EC13723EE6LL; - result.d = _y1(tested.d); - ok(result.l == expected.l, "_y1 returned: %I64x\n", result.l); - ok(errno == 0xDEADBEEF, "errno: %d\n", errno); -} - -START_TEST(ieee) -{ - test_finite(); - test_fpclass(); - test_isnan(); - test_j0(); - test_j1(); - test_scalb(); - test_y0(); - test_y1(); -} diff --git a/rostests/apitests/msvcrt/msvcrt_apitest.rbuild b/rostests/apitests/msvcrt/msvcrt_apitest.rbuild deleted file mode 100644 index 391ad4bb685..00000000000 --- a/rostests/apitests/msvcrt/msvcrt_apitest.rbuild +++ /dev/null @@ -1,15 +0,0 @@ - - - - - . - wine - pseh - msvcrt - testlist.c - - ieee.c - splitpath.c - - - diff --git a/rostests/apitests/msvcrt/splitpath.c b/rostests/apitests/msvcrt/splitpath.c deleted file mode 100644 index 687a38c9ea9..00000000000 --- a/rostests/apitests/msvcrt/splitpath.c +++ /dev/null @@ -1,120 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for _splitpath - * PROGRAMMER: Timo Kreuzer - */ - -#include -#include -#include -#include -#include - -#define ok_str(x, y) \ - ok(strcmp(x, y) == 0, "got '%s', expected '%s'\n", x, y); - -#define ok_int(x, y) \ - ok(x == y, "got %d, expected %d\n", x, y); - -START_TEST(splitpath) -{ - char drive[5]; - char dir[64]; - char fname[32]; - char ext[10]; - DWORD Major; - - Major = (DWORD)(LOBYTE(LOWORD(GetVersion()))); - - _splitpath("c:\\dir1\\dir2\\file.ext", drive, dir, fname, ext); - ok_str(drive, "c:"); - ok_str(dir, "\\dir1\\dir2\\"); - ok_str(fname, "file"); - ok_str(ext, ".ext"); - - *_errno() = 0; - _splitpath("c:\\dir1\\dir2\\file.ext", 0, 0, 0, 0); - ok_int(*_errno(), 0); - - if (Major >= 6) - { - *_errno() = 0; - _splitpath(0, drive, dir, fname, ext); - ok_int(*_errno(), EINVAL); - ok_str(drive, ""); - ok_str(dir, ""); - ok_str(fname, ""); - ok_str(ext, ""); - } - else - { - win_skip("This test only succeed on NT6+\n"); - } - - _splitpath("\\\\?\\c:\\dir1\\dir2\\file.ext", drive, dir, fname, ext); - if (Major >= 6) - { - ok_str(drive, "c:"); - ok_str(dir, "\\dir1\\dir2\\"); - } - else - { - ok_str(drive, ""); - ok_str(dir, "\\\\?\\c:\\dir1\\dir2\\"); - } - ok_str(fname, "file"); - ok_str(ext, ".ext"); - - _splitpath("ab:\\dir1\\..\\file", drive, dir, fname, ext); - ok_str(drive, ""); - ok_str(dir, "ab:\\dir1\\..\\"); - ok_str(fname, "file"); - ok_str(ext, ""); - - _splitpath("//?/c:/dir1/dir2/file.ext", drive, dir, fname, ext); - ok_str(drive, ""); - ok_str(dir, "//?/c:/dir1/dir2/"); - ok_str(fname, "file"); - ok_str(ext, ".ext"); - - _splitpath("\\\\?\\0:/dir1\\dir2/file.", drive, dir, fname, ext); - if (Major >= 6) - { - ok_str(drive, "0:"); - ok_str(dir, "/dir1\\dir2/"); - } - else - { - ok_str(drive, ""); - ok_str(dir, "\\\\?\\0:/dir1\\dir2/"); - } - ok_str(fname, "file"); - ok_str(ext, "."); - - _splitpath("\\\\.\\c:\\dir1\\dir2\\.ext.ext2", drive, dir, fname, ext); - ok_str(drive, ""); - ok_str(dir, "\\\\.\\c:\\dir1\\dir2\\"); - ok_str(fname, ".ext"); - ok_str(ext, ".ext2"); - - _splitpath("\\??\\c:\\dir1\\dir2\\file. ~ ", drive, dir, fname, ext); - ok_str(drive, ""); - ok_str(dir, "\\??\\c:\\dir1\\dir2\\"); - ok_str(fname, "file"); - ok_str(ext, ". ~ "); - - _splitpath("x: dir1\\/dir2 \\.blub", drive, dir, fname, ext); - ok_str(drive, "x:"); - ok_str(dir, " dir1\\/dir2 \\"); - ok_str(fname, ""); - ok_str(ext, ".blub"); - - _splitpath("/:\\dir1\\dir2\\file.ext", drive, dir, fname, ext); - ok_str(drive, "/:"); - ok_str(dir, "\\dir1\\dir2\\"); - ok_str(fname, "file"); - ok_str(ext, ".ext"); - -} - diff --git a/rostests/apitests/msvcrt/testlist.c b/rostests/apitests/msvcrt/testlist.c deleted file mode 100644 index 0e57890b48f..00000000000 --- a/rostests/apitests/msvcrt/testlist.c +++ /dev/null @@ -1,18 +0,0 @@ -#define WIN32_LEAN_AND_MEAN -#define __ROS_LONG64__ -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_ieee(void); -extern void func_splitpath(void); - -const struct test winetest_testlist[] = -{ - { "ieee", func_ieee }, - { "splitpath", func_splitpath }, - - { 0, 0 } -}; - diff --git a/rostests/apitests/ntdll/CMakeLists.txt b/rostests/apitests/ntdll/CMakeLists.txt deleted file mode 100644 index 1a8b0555587..00000000000 --- a/rostests/apitests/ntdll/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ - -list(APPEND SOURCE - NtAllocateVirtualMemory.c - NtFreeVirtualMemory.c - RtlInitializeBitMap.c - SystemInfo.c - ZwContinue.c - testlist.c) - -if(ARCH MATCHES i386) - list(APPEND SOURCE i386/ZwContinue.S) -endif() - -add_executable(ntdll_apitest ${SOURCE}) -target_link_libraries(ntdll_apitest wine) -set_module_type(ntdll_apitest win32cui) -add_importlibs(ntdll_apitest msvcrt advapi32 kernel32 ntdll) -add_cd_file(TARGET ntdll_apitest DESTINATION reactos/bin FOR all) diff --git a/rostests/apitests/ntdll/NtAllocateVirtualMemory.c b/rostests/apitests/ntdll/NtAllocateVirtualMemory.c deleted file mode 100644 index 472190ba295..00000000000 --- a/rostests/apitests/ntdll/NtAllocateVirtualMemory.c +++ /dev/null @@ -1,247 +0,0 @@ -/* - * PROJECT: ReactOS API Tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Stress Test for virtual memory allocation - * PROGRAMMER: Thomas Faber - */ - -#define WIN32_NO_STATUS -#include -#include -#include -#include - -static PVOID Allocations[4096] = { NULL }; -static ULONG CurrentAllocation = 0; - -static -VOID -ValidateAllocations(VOID) -{ - ULONG i; - - ASSERT(CurrentAllocation < sizeof(Allocations) / sizeof(Allocations[0])); - for (i = 0; i < CurrentAllocation; ++i) - { - PUCHAR UserBuffer = Allocations[i]; - SIZE_T AllocationSize; - SIZE_T DataSize; - - if (UserBuffer == NULL) - continue; - - AllocationSize = ((PSIZE_T)UserBuffer)[-2]; - DataSize = ((PSIZE_T)UserBuffer)[-1]; - ASSERT(DataSize != 0); - ASSERT(((SIZE_T)UserBuffer + DataSize) % PAGE_SIZE == 0); - } -} - -static -PVOID -Allocate( - SIZE_T DataSize) -{ - NTSTATUS Status; - PVOID AllocationStart = NULL; - SIZE_T AllocationSize = PAGE_ROUND_UP(DataSize + PAGE_SIZE + 2 * sizeof(SIZE_T)); - PVOID FirstPageStart; - SIZE_T NumberOfPages = AllocationSize / PAGE_SIZE; - SIZE_T Size; - PUCHAR UserBuffer; - - Status = NtAllocateVirtualMemory(NtCurrentProcess(), &AllocationStart, 0, &AllocationSize, MEM_RESERVE, PAGE_NOACCESS); - - if (!NT_SUCCESS(Status)) - return NULL; - - FirstPageStart = (PUCHAR)AllocationStart + AllocationSize - PAGE_SIZE * NumberOfPages; - Size = (NumberOfPages - 1) * PAGE_SIZE; - Status = NtAllocateVirtualMemory(NtCurrentProcess(), &FirstPageStart, 0, &Size, MEM_COMMIT, PAGE_READWRITE); - if (!NT_SUCCESS(Status)) - { - AllocationSize = 0; - Status = NtFreeVirtualMemory(NtCurrentProcess(), &AllocationStart, &AllocationSize, MEM_RELEASE); - ASSERT(Status == STATUS_SUCCESS); - return NULL; - } - ASSERT(Size % sizeof(ULONG) == 0); - ASSERT(RtlCompareMemoryUlong(FirstPageStart, Size, 0) == Size); - - UserBuffer = AllocationStart; - UserBuffer += AllocationSize - PAGE_SIZE - DataSize; - RtlFillMemory(FirstPageStart, UserBuffer - (PUCHAR)FirstPageStart, 0xae); - RtlZeroMemory(UserBuffer, DataSize); - ((PSIZE_T)UserBuffer)[-2] = AllocationSize; - ((PSIZE_T)UserBuffer)[-1] = DataSize; - - Allocations[CurrentAllocation++] = UserBuffer; - ValidateAllocations(); - return UserBuffer; -} - -static -VOID -Free( - PVOID UserBuffer) -{ - NTSTATUS Status; - PVOID AllocationStart; - SIZE_T Zero = 0; - SIZE_T AllocationSize; - SIZE_T DataSize; - ULONG i; - - AllocationSize = ((PSIZE_T)UserBuffer)[-2]; - DataSize = ((PSIZE_T)UserBuffer)[-1]; - ASSERT(DataSize != 0); - - AllocationStart = (PUCHAR)UserBuffer + DataSize + PAGE_SIZE - AllocationSize; - ASSERT((SIZE_T)AllocationStart % PAGE_SIZE == 0); - - RtlFillMemory(UserBuffer, DataSize, 0xbe); - ((PSIZE_T)UserBuffer)[-1] = 0; - ((PSIZE_T)UserBuffer)[-2] = 0xFAFBFCFD; - - for (i = 0; i < CurrentAllocation; ++i) - if (Allocations[i] == UserBuffer) - { - Allocations[i] = NULL; - break; - } - ValidateAllocations(); - - Status = NtFreeVirtualMemory(NtCurrentProcess(), &AllocationStart, &Zero, MEM_RELEASE); - ASSERT(Status == STATUS_SUCCESS); -} - -static -PVOID -ReAllocate( - PVOID OldUserBuffer, - SIZE_T NewDataSize) -{ - PVOID NewUserBuffer; - SIZE_T OldDataSize; - - OldDataSize = ((PSIZE_T)OldUserBuffer)[-1]; - ASSERT(OldDataSize != 0); - - NewUserBuffer = Allocate(NewDataSize); - ASSERT(((PSIZE_T)OldUserBuffer)[-1] == OldDataSize); - RtlCopyMemory(NewUserBuffer, OldUserBuffer, min(OldDataSize, NewDataSize)); - ASSERT(((PSIZE_T)OldUserBuffer)[-1] == OldDataSize); - Free(OldUserBuffer); - return NewUserBuffer; -} - -static -VOID -AccessMemory1( - PVOID UserBuffer, - SIZE_T DataSize) -{ - PBYTE Buffer = UserBuffer; - SIZE_T i; - - for (i = 0; i < DataSize; ++i) - Buffer[i] = LOBYTE(i); -} - -static -BOOLEAN -CheckMemory1( - PVOID UserBuffer, - SIZE_T DataSize) -{ - PBYTE Buffer = UserBuffer; - SIZE_T i; - - for (i = 0; i < DataSize; ++i) - if (Buffer[i] != LOBYTE(i)) - { - trace("Mismatch in region %p at index %lu. Value=%02x\n", UserBuffer, (ULONG)i, Buffer[i]); - ASSERT(FALSE); - return FALSE; - } - return TRUE; -} - -static -VOID -AccessMemory2( - PVOID UserBuffer, - SIZE_T DataSize) -{ - PBYTE Buffer = UserBuffer; - SIZE_T i; - - for (i = 0; i < DataSize; ++i) - Buffer[i] = UCHAR_MAX - LOBYTE(i); -} - -static -BOOLEAN -CheckMemory2( - PVOID UserBuffer, - SIZE_T DataSize) -{ - PBYTE Buffer = UserBuffer; - SIZE_T i; - - for (i = 0; i < DataSize; ++i) - if (Buffer[i] != UCHAR_MAX - LOBYTE(i)) - { - trace("Mismatch in region %p at index %lu. Value=%02x\n", UserBuffer, (ULONG)i, Buffer[i]); - ASSERT(FALSE); - return FALSE; - } - return TRUE; -} - -#define RUNS 32 - -START_TEST(NtAllocateVirtualMemory) -{ - PVOID Mem1, Mem2; - SIZE_T Size1, Size2; - ULONG i; - - Size1 = 32; - Mem1 = Allocate(Size1); - AccessMemory1(Mem1, Size1); - Size2 = 128; - Mem2 = Allocate(Size2); - AccessMemory2(Mem2, Size2); - for (i = 0; i < RUNS; ++i) - { - PVOID New; - ok(CheckMemory1(Mem1, Size1) == TRUE, "CheckMemory1 failure\n"); - New = ReAllocate(Mem1, Size1 * 3 / 2); - if (New == NULL) - { - skip("Realloc failure\n"); - break; - } - Mem1 = New; - ok(CheckMemory1(Mem1, Size1) == TRUE, "CheckMemory1 failure\n"); - Size1 = Size1 * 3 / 2; - AccessMemory1(Mem1, Size1); - - ok(CheckMemory2(Mem2, Size2) == TRUE, "CheckMemory2 failure\n"); - New = ReAllocate(Mem2, Size2 + 128); - if (New == NULL) - { - skip("Realloc failure\n"); - break; - } - Mem2 = New; - ok(CheckMemory2(Mem2, Size2) == TRUE, "CheckMemory2 failure\n"); - Size2 += 128; - AccessMemory2(Mem2, Size2); - } - ok(CheckMemory2(Mem2, Size2) == TRUE, "CheckMemory2 failure\n"); - Free(Mem2); - ok(CheckMemory1(Mem1, Size1) == TRUE, "CheckMemory1 failure\n"); - Free(Mem1); -} diff --git a/rostests/apitests/ntdll/NtFreeVirtualMemory.c b/rostests/apitests/ntdll/NtFreeVirtualMemory.c deleted file mode 100644 index 075b4f41b00..00000000000 --- a/rostests/apitests/ntdll/NtFreeVirtualMemory.c +++ /dev/null @@ -1,172 +0,0 @@ -#define WIN32_NO_STATUS -#include -#include -#include - -static void Test_NtFreeVirtualMemory(void) -{ - PVOID Buffer = NULL, Buffer2; - SIZE_T Length = PAGE_SIZE; - NTSTATUS Status; - - Status = NtAllocateVirtualMemory(NtCurrentProcess(), - &Buffer, - 0, - &Length, - MEM_RESERVE, - PAGE_READWRITE); - ok(NT_SUCCESS(Status), "NtAllocateVirtualMemory failed : 0x%08lx\n", Status); - ok(Length == PAGE_SIZE, "Length mismatch : 0x%08lx\n", (ULONG)Length); - ok(((ULONG_PTR)Buffer % PAGE_SIZE) == 0, "The buffer is not aligned to PAGE_SIZE.\n"); - - Status = NtFreeVirtualMemory(NtCurrentProcess(), - &Buffer, - &Length, - MEM_DECOMMIT); - ok(Status == STATUS_SUCCESS, "NtFreeVirtualMemory failed : 0x%08lx\n", Status); - - /* Now try to free more than we got */ - Length++; - Status = NtFreeVirtualMemory(NtCurrentProcess(), - &Buffer, - &Length, - MEM_DECOMMIT); - ok(Status == STATUS_UNABLE_TO_FREE_VM, "NtFreeVirtualMemory returned status : 0x%08lx\n", Status); - - Status = NtFreeVirtualMemory(NtCurrentProcess(), - &Buffer, - &Length, - MEM_RELEASE); - ok(Status == STATUS_UNABLE_TO_FREE_VM, "NtFreeVirtualMemory returned status : 0x%08lx\n", Status); - - /* Free out of bounds from the wrong origin */ - Length = PAGE_SIZE; - Buffer2 = (PVOID)((ULONG_PTR)Buffer+1); - - Status = NtFreeVirtualMemory(NtCurrentProcess(), - &Buffer2, - &Length, - MEM_DECOMMIT); - ok(Status == STATUS_UNABLE_TO_FREE_VM, "NtFreeVirtualMemory returned status : 0x%08lx\n", Status); - - Buffer2 = (PVOID)((ULONG_PTR)Buffer+1); - Length = PAGE_SIZE; - Status = NtFreeVirtualMemory(NtCurrentProcess(), - &Buffer2, - &Length, - MEM_RELEASE); - ok(Status == STATUS_UNABLE_TO_FREE_VM, "NtFreeVirtualMemory returned status : 0x%08lx\n", Status); - - /* Same but in bounds */ - Length = PAGE_SIZE - 1; - Buffer2 = (PVOID)((ULONG_PTR)Buffer+1); - - Status = NtFreeVirtualMemory(NtCurrentProcess(), - &Buffer2, - &Length, - MEM_DECOMMIT); - ok(Status == STATUS_SUCCESS, "NtFreeVirtualMemory returned status : 0x%08lx\n", Status); - ok(Buffer2 == Buffer, "NtFreeVirtualMemory set wrong buffer.\n"); - ok(Length == PAGE_SIZE, "NtFreeVirtualMemory did not round Length to PAGE_SIZE.\n"); - - Buffer2 = (PVOID)((ULONG_PTR)Buffer+1); - Length = PAGE_SIZE-1; - Status = NtFreeVirtualMemory(NtCurrentProcess(), - &Buffer2, - &Length, - MEM_RELEASE); - ok(Status == STATUS_SUCCESS, "NtFreeVirtualMemory returned status : 0x%08lx\n", Status); - ok(Buffer2 == Buffer, "NtFreeVirtualMemory set wrong buffer.\n"); - ok(Length == PAGE_SIZE, "NtFreeVirtualMemory did not round Length to PAGE_SIZE.\n"); - - /* Now allocate two pages and try to free them one after the other */ - Length = 2*PAGE_SIZE; - Status = NtAllocateVirtualMemory(NtCurrentProcess(), - &Buffer, - 0, - &Length, - MEM_RESERVE, - PAGE_READWRITE); - ok(NT_SUCCESS(Status), "NtAllocateVirtualMemory failed : 0x%08lx\n", Status); - ok(Length == 2*PAGE_SIZE, "Length mismatch : 0x%08lx\n", (ULONG)Length); - ok(((ULONG_PTR)Buffer % PAGE_SIZE) == 0, "The buffer is not aligned to PAGE_SIZE.\n"); - - Buffer2 = Buffer; - Length = PAGE_SIZE; - Status = NtFreeVirtualMemory(NtCurrentProcess(), - &Buffer2, - &Length, - MEM_RELEASE); - ok(NT_SUCCESS(Status), "NtFreeVirtualMemory failed : 0x%08lx\n", Status); - ok(Length == PAGE_SIZE, "Length mismatch : 0x%08lx\n", (ULONG)Length); - ok(Buffer2 == Buffer, "The buffer is not aligned to PAGE_SIZE.\n"); - - Buffer2 = (PVOID)((ULONG_PTR)Buffer+PAGE_SIZE); - Length = PAGE_SIZE; - Status = NtFreeVirtualMemory(NtCurrentProcess(), - &Buffer2, - &Length, - MEM_RELEASE); - ok(NT_SUCCESS(Status), "NtFreeVirtualMemory failed : 0x%08lx\n", Status); - ok(Length == PAGE_SIZE, "Length mismatch : 0x%08lx\n", (ULONG)Length); - ok(Buffer2 == (PVOID)((ULONG_PTR)Buffer+PAGE_SIZE), "The buffer is not aligned to PAGE_SIZE.\n"); - - /* Same, but try to free the second page before the first one */ - Length = 2*PAGE_SIZE; - Status = NtAllocateVirtualMemory(NtCurrentProcess(), - &Buffer, - 0, - &Length, - MEM_RESERVE, - PAGE_READWRITE); - ok(NT_SUCCESS(Status), "NtAllocateVirtualMemory failed : 0x%08lx\n", Status); - ok(Length == 2*PAGE_SIZE, "Length mismatch : 0x%08lx\n", (ULONG)Length); - ok(((ULONG_PTR)Buffer % PAGE_SIZE) == 0, "The buffer is not aligned to PAGE_SIZE.\n"); - - Buffer2 = (PVOID)((ULONG_PTR)Buffer+PAGE_SIZE); - Length = PAGE_SIZE; - Status = NtFreeVirtualMemory(NtCurrentProcess(), - &Buffer2, - &Length, - MEM_RELEASE); - ok(NT_SUCCESS(Status), "NtFreeVirtualMemory failed : 0x%08lx\n", Status); - ok(Length == PAGE_SIZE, "Length mismatch : 0x%08lx\n", (ULONG)Length); - ok(Buffer2 == (PVOID)((ULONG_PTR)Buffer+PAGE_SIZE), "The buffer is not aligned to PAGE_SIZE.\n"); - - Buffer2 = Buffer; - Length = PAGE_SIZE; - Status = NtFreeVirtualMemory(NtCurrentProcess(), - &Buffer2, - &Length, - MEM_RELEASE); - ok(NT_SUCCESS(Status), "NtFreeVirtualMemory failed : 0x%08lx\n", Status); - ok(Length == PAGE_SIZE, "Length mismatch : 0x%08lx\n", (ULONG)Length); - ok(Buffer2 == Buffer, "The buffer is not aligned to PAGE_SIZE.\n"); - - /* Now allocate two pages and try to free them in the middle */ - Length = 2*PAGE_SIZE; - Status = NtAllocateVirtualMemory(NtCurrentProcess(), - &Buffer, - 0, - &Length, - MEM_RESERVE, - PAGE_READWRITE); - ok(NT_SUCCESS(Status), "NtAllocateVirtualMemory failed : 0x%08lx\n", Status); - ok(Length == 2*PAGE_SIZE, "Length mismatch : 0x%08lx\n", (ULONG)Length); - ok(((ULONG_PTR)Buffer % PAGE_SIZE) == 0, "The buffer is not aligned to PAGE_SIZE.\n"); - - Buffer2 = (PVOID)((ULONG_PTR)Buffer+1); - Length = PAGE_SIZE; - Status = NtFreeVirtualMemory(NtCurrentProcess(), - &Buffer2, - &Length, - MEM_RELEASE); - ok(NT_SUCCESS(Status), "NtFreeVirtualMemory failed : 0x%08lx\n", Status); - ok(Length == 2*PAGE_SIZE, "Length mismatch : 0x%08lx\n", (ULONG)Length); - ok(Buffer2 == Buffer, "The buffer is not aligned to PAGE_SIZE.\n"); -} - -START_TEST(NtFreeVirtualMemory) -{ - Test_NtFreeVirtualMemory(); -} \ No newline at end of file diff --git a/rostests/apitests/ntdll/RtlInitializeBitMap.c b/rostests/apitests/ntdll/RtlInitializeBitMap.c deleted file mode 100644 index 21a8c7395c6..00000000000 --- a/rostests/apitests/ntdll/RtlInitializeBitMap.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for RtlInitializeBitmap - * PROGRAMMERS: Timo Kreuzer - */ - -#define WIN32_NO_STATUS -#include -#include -#include - -void Test_RtlInitializeBitmap() -{ - RTL_BITMAP Bitmap; - ULONG Buffer[5]; - - Buffer[0] = 0x12345; - Buffer[1] = 0x23456; - Buffer[2] = 0x34567; - Buffer[3] = 0x45678; - Buffer[4] = 0x56789; - - RtlInitializeBitMap(&Bitmap, Buffer, 19); - ok(Bitmap.Buffer == Buffer, "Buffer=%p\n", Bitmap.Buffer); - ok(Bitmap.SizeOfBitMap == 19, "SizeOfBitMap=%ld\n", Bitmap.SizeOfBitMap); - - ok(Buffer[0] == 0x12345, "Buffer[0] == 0x%lx\n", Buffer[0]); - ok(Buffer[1] == 0x23456, "Buffer[1] == 0x%lx\n", Buffer[1]); - ok(Buffer[2] == 0x34567, "Buffer[2] == 0x%lx\n", Buffer[2]); - ok(Buffer[3] == 0x45678, "Buffer[3] == 0x%lx\n", Buffer[3]); - ok(Buffer[4] == 0x56789, "Buffer[4] == 0x%lx\n", Buffer[4]); - - RtlInitializeBitMap(&Bitmap, 0, -100); - ok(Bitmap.Buffer == 0, "Buffer=%p\n", Bitmap.Buffer); - ok(Bitmap.SizeOfBitMap == -100, "SizeOfBitMap=%ld\n", Bitmap.SizeOfBitMap); - -} - -START_TEST(RtlInitializeBitMap) -{ - Test_RtlInitializeBitmap(); -} - diff --git a/rostests/apitests/ntdll/SystemInfo.c b/rostests/apitests/ntdll/SystemInfo.c deleted file mode 100644 index 2d3ac5687c6..00000000000 --- a/rostests/apitests/ntdll/SystemInfo.c +++ /dev/null @@ -1,126 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for NtQuery/SetSystemInformation - * PROGRAMMERS: Timo Kreuzer - */ - -#define WIN32_NO_STATUS -#include -#include -#include - -#define ok_long(x, y) \ - ok(x == y, "got %ld, expected %ld\n", (long)x, (long)y); - -#define ok_ntstatus(status, expected) \ - ok(status == expected, "got 0x%lx, expected 0x%lx\n", status, expected); -// ok(status == expected, "expected: " ##expected## ", got 0x%lx\n", status) - -void -GetPrivilege() -{ - HANDLE hToken; - TOKEN_PRIVILEGES tkp; - - OpenProcessToken(GetCurrentProcess(), - TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, - &hToken); - - LookupPrivilegeValue(NULL, SE_SYSTEMTIME_NAME, &tkp.Privileges[0].Luid); - - tkp.PrivilegeCount = 1; - tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; - - AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, NULL, 0); -} - - -void -Test_TimeAdjustment(void) -{ - SYSTEM_QUERY_TIME_ADJUST_INFORMATION TimeInfoOrg, GetTimeInfo; - SYSTEM_SET_TIME_ADJUST_INFORMATION SetTimeInfo; - NTSTATUS Status; - ULONG ReturnLength; - - GetPrivilege(); - - SetTimeInfo.TimeAdjustment = 0; - SetTimeInfo.Enable = 0; - - /* Query original values */ - Status = NtQuerySystemInformation(SystemTimeAdjustmentInformation, - &TimeInfoOrg, - sizeof(TimeInfoOrg), - &ReturnLength); - - /* Test without privilege */ - Status = NtSetSystemInformation(SystemTimeAdjustmentInformation, - &SetTimeInfo, - sizeof(SetTimeInfo)); - ok_ntstatus(Status, STATUS_PRIVILEGE_NOT_HELD); - - /* Get the required privilege */ - GetPrivilege(); - - /* Test wrong length */ - Status = NtSetSystemInformation(SystemTimeAdjustmentInformation, - &SetTimeInfo, - sizeof(SetTimeInfo) + 1); - ok_ntstatus(Status, STATUS_INFO_LENGTH_MISMATCH); - - /* Test both members 0 */ - Status = NtSetSystemInformation(SystemTimeAdjustmentInformation, - &SetTimeInfo, - sizeof(SetTimeInfo)); - ok_ntstatus(Status, STATUS_INVALID_PARAMETER_2); - - /* Set huge value */ - SetTimeInfo.TimeAdjustment = -1; - SetTimeInfo.Enable = 0; - Status = NtSetSystemInformation(SystemTimeAdjustmentInformation, - &SetTimeInfo, - sizeof(SetTimeInfo)); - ok_ntstatus(Status, STATUS_SUCCESS); - - /* Query the result */ - Status = NtQuerySystemInformation(SystemTimeAdjustmentInformation, - &GetTimeInfo, - sizeof(GetTimeInfo), - &ReturnLength); - ok_ntstatus(Status, STATUS_SUCCESS); - ok_long(GetTimeInfo.TimeAdjustment, -1); - ok_long(GetTimeInfo.Enable, 0); - - /* set Enable to 1 */ - SetTimeInfo.TimeAdjustment = -1; - SetTimeInfo.Enable = 1; - Status = NtSetSystemInformation(SystemTimeAdjustmentInformation, - &SetTimeInfo, - sizeof(SetTimeInfo)); - ok_ntstatus(Status, STATUS_SUCCESS); - - /* Query the result */ - Status = NtQuerySystemInformation(SystemTimeAdjustmentInformation, - &GetTimeInfo, - sizeof(GetTimeInfo), - &ReturnLength); - ok_ntstatus(Status, STATUS_SUCCESS); - ok_long(GetTimeInfo.TimeAdjustment, GetTimeInfo.TimeIncrement); - ok_long(GetTimeInfo.Enable, 1); - - /* Restore original values */ - SetTimeInfo.TimeAdjustment = TimeInfoOrg.TimeAdjustment; - SetTimeInfo.Enable = TimeInfoOrg.Enable;; - Status = NtSetSystemInformation(SystemTimeAdjustmentInformation, - &SetTimeInfo, - sizeof(SetTimeInfo)); - ok_ntstatus(Status, STATUS_SUCCESS); - -} - -START_TEST(NtSystemInformation) -{ - Test_TimeAdjustment(); -} diff --git a/rostests/apitests/ntdll/ZwContinue.c b/rostests/apitests/ntdll/ZwContinue.c deleted file mode 100644 index 0b181e31be1..00000000000 --- a/rostests/apitests/ntdll/ZwContinue.c +++ /dev/null @@ -1,173 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for ZwContinue - * PROGRAMMER: - */ - -#include -#include -#include -#include - -#ifdef _M_IX86 -#define ZWC_SEGMENT_BITS (0xFFFF) -#define ZWC_EFLAGS_BITS (0x3C0CD5) -#endif - -void continuePoint(void); -LONG NTAPI ZwContinue(IN CONTEXT *, IN BOOLEAN); - -static jmp_buf jmpbuf; -static CONTEXT continueContext; -static unsigned int nRandBytes; - -static int initrand(void) -{ - unsigned int nRandMax; - unsigned int nRandMaxBits; - time_t tLoc; - - nRandMax = RAND_MAX; - for(nRandMaxBits = 0; nRandMax != 0; nRandMax >>= 1, ++ nRandMaxBits); - nRandBytes = nRandMaxBits / CHAR_BIT; - //assert(nRandBytes != 0); - srand((unsigned)(time(&tLoc) & UINT_MAX)); - return 1; -} - -static void randbytes(void * p, size_t n) -{ - unsigned char * b; - size_t i; - int r = rand(); - - b = (unsigned char *)p; - for(i = 0; i < n; ++ i) - { - if(i % nRandBytes == 0) - r = rand(); - b[i] = (unsigned char)(r & UCHAR_MAX); - r >>= CHAR_BIT; - } -} - -static ULONG randULONG(void) -{ - ULONG n; - randbytes(&n, sizeof(n)); - return n; -} - -void check(CONTEXT * pContext) -{ -#ifdef _M_IX86 - ok(pContext->ContextFlags == CONTEXT_FULL, - "ContextFlags=0x%lx\n", pContext->ContextFlags); - - /* Random data segments */ - ok((pContext->SegGs & ZWC_SEGMENT_BITS) == - (continueContext.SegGs & ZWC_SEGMENT_BITS), - "SegGs=0x%lx / 0x%lx\n", pContext->SegGs, continueContext.SegGs); - - ok((pContext->SegFs & ZWC_SEGMENT_BITS) == - (continueContext.SegFs & ZWC_SEGMENT_BITS), - "SegFs=0x%lx / 0x%lx\n", pContext->SegFs, continueContext.SegFs); - - ok((pContext->SegEs & ZWC_SEGMENT_BITS) == - (continueContext.SegEs & ZWC_SEGMENT_BITS), - "SegEs=0x%lx / 0x%lx\n", pContext->SegEs, continueContext.SegEs); - - ok((pContext->SegDs & ZWC_SEGMENT_BITS) == - (continueContext.SegDs & ZWC_SEGMENT_BITS), - "SegDs=0x%lx / 0x%lx\n", pContext->SegDs, continueContext.SegDs); - - /* Integer registers */ - ok(pContext->Edi == continueContext.Edi, - "Edi: 0x%lx != 0x%lx\n", pContext->Edi, continueContext.Edi); - ok(pContext->Esi == continueContext.Esi, - "Esi: 0x%lx != 0x%lx\n", pContext->Esi, continueContext.Esi); - ok(pContext->Ebx == continueContext.Ebx, - "Ebx: 0x%lx != 0x%lx\n", pContext->Ebx, continueContext.Ebx); - ok(pContext->Edx == continueContext.Edx, - "Edx: 0x%lx != 0x%lx\n", pContext->Edx, continueContext.Edx); - ok(pContext->Ecx == continueContext.Ecx, - "Ecx: 0x%lx != 0x%lx\n", pContext->Ecx, continueContext.Ecx); - ok(pContext->Eax == continueContext.Eax, - "Eax: 0x%lx != 0x%lx\n", pContext->Eax, continueContext.Eax); - - /* Control registers and segments */ - ok(pContext->Ebp == continueContext.Ebp, - "Ebp: 0x%lx != 0x%lx\n", pContext->Ebp, continueContext.Ebp); - ok(pContext->Eip == continueContext.Eip, - "Eip: 0x%lx != 0x%lx\n", pContext->Eip, continueContext.Eip); - ok(pContext->Esp == continueContext.Esp, - "Esp: 0x%lx != 0x%lx\n", pContext->Esp, continueContext.Esp); - - ok((pContext->SegCs & ZWC_SEGMENT_BITS) == - (continueContext.SegCs & ZWC_SEGMENT_BITS), - "SegCs: 0x%lx != 0x%lx\n", pContext->SegCs, continueContext.SegCs); - - ok((pContext->EFlags & ZWC_EFLAGS_BITS) == - (continueContext.EFlags & ZWC_EFLAGS_BITS), - "EFlags: 0x%lx != 0x%lx\n", pContext->EFlags, continueContext.EFlags); - - ok((pContext->SegSs & ZWC_SEGMENT_BITS) == - (continueContext.SegSs & ZWC_SEGMENT_BITS), - "SegSs: 0x%lx != 0x%lx\n", pContext->SegSs, continueContext.SegSs); -#endif - - /* Return where we came from */ - longjmp(jmpbuf, 1); -} - -void Test_ZwContinue() -{ - initrand(); - - /* First time */ - if(setjmp(jmpbuf) == 0) - { - CONTEXT bogus; - - continueContext.ContextFlags = CONTEXT_FULL; - GetThreadContext(GetCurrentThread(), &continueContext); - -#ifdef _M_IX86 - continueContext.ContextFlags = CONTEXT_FULL; - - /* Fill the integer registers with random values */ - continueContext.Edi = randULONG(); - continueContext.Esi = randULONG(); - continueContext.Ebx = randULONG(); - continueContext.Edx = randULONG(); - continueContext.Ecx = randULONG(); - continueContext.Eax = randULONG(); - continueContext.Ebp = randULONG(); - - /* Randomize all the allowed flags (determined experimentally with WinDbg) */ - continueContext.EFlags = randULONG() & 0x3C0CD5; - - /* Randomize the stack pointer as much as possible */ - continueContext.Esp = (ULONG)(((ULONG_PTR)&bogus) & 0xFFFFFFFF) + - sizeof(bogus) - (randULONG() & 0xF) * 4; - - /* continuePoint() is implemented in assembler */ - continueContext.Eip = (ULONG)((ULONG_PTR)continuePoint & 0xFFFFFFF); - - /* Can't do a lot about segments */ -#endif - - ZwContinue(&continueContext, FALSE); - ok(0, "should never get here\n"); - } - - /* Second time */ - return; -} - -START_TEST(ZwContinue) -{ - Test_ZwContinue(); -} - diff --git a/rostests/apitests/ntdll/i386/ZwContinue.S b/rostests/apitests/ntdll/i386/ZwContinue.S deleted file mode 100644 index c955b0f2b21..00000000000 --- a/rostests/apitests/ntdll/i386/ZwContinue.S +++ /dev/null @@ -1,54 +0,0 @@ - -#include -#include - - -// cpu 486 -.code - -EXTERN _check:PROC - -PUBLIC _continuePoint -_continuePoint: - push ss - push 0 - pushfd - push cs - push offset _continuePoint - push ebp - - push eax - push ecx - push edx - push ebx - push esi - push edi - - push ds - push es - push fs - push gs - - // TODO: floating point state - sub esp, 112 - - // Debug registers - sub esp, 24 - - push HEX(00010007) - - // Fill the Esp field - lea eax, [esp + HEX(0CC)] - lea ecx, [esp + HEX(0C4)] - mov [ecx], eax - - // Call the function that will compare the current context with the expected one - cld - push esp - call _check - - // check() must not return - int 3 - -// EOF -END diff --git a/rostests/apitests/ntdll/ntdll_apitest.rbuild b/rostests/apitests/ntdll/ntdll_apitest.rbuild deleted file mode 100644 index c23b4dca84a..00000000000 --- a/rostests/apitests/ntdll/ntdll_apitest.rbuild +++ /dev/null @@ -1,24 +0,0 @@ - - - - - . - wine - advapi32 - ntdll - pseh - testlist.c - - NtAllocateVirtualMemory.c - NtFreeVirtualMemory.c - RtlInitializeBitMap.c - ZwContinue.c - SystemInfo.c - - - ZwContinue.S - - - - diff --git a/rostests/apitests/ntdll/sprintf.c b/rostests/apitests/ntdll/sprintf.c deleted file mode 100644 index 470713adfac..00000000000 --- a/rostests/apitests/ntdll/sprintf.c +++ /dev/null @@ -1,524 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for sprintf - * PROGRAMMER: Timo Kreuzer - */ - -#include -#include -#include -#include -#include -#include -#include - - -#define ok_str(x, y) \ - ok(strcmp(x, y) == 0, "got '%s', expected '%s'\n", x, y); - -#define ok_int(x, y) \ - ok(x == y, "got %d, expected %d\n", x, y); - -int (*p_vsprintf)(char *buf, const char *fmt, va_list argptr); - - -int -my_sprintf(char *buf, const char *format, ...) -{ - const TCHAR * fmt = format; - va_list argptr; - - va_start(argptr, format); - return p_vsprintf(buf, fmt, argptr); -} - -int -my_swprintf(wchar_t *buf, const wchar_t *format, ...) -{ - const wchar_t * fmt = format; - va_list argptr; - - va_start(argptr, format); - return _vsnwprintf(buf, MAXLONG, fmt, argptr); -} - -#define sprintf(buf, format, ...) my_sprintf(buf, format, __VA_ARGS__); -#define swprintf(buf, format, ...) my_swprintf((wchar_t*)buf, format, __VA_ARGS__); - -void -test_c() -{ - char buffer[64]; - - sprintf(buffer, "%c", 0x3031); - ok_str(buffer, "1"); - - sprintf(buffer, "%hc", 0x3031); - ok_str(buffer, "1"); - - sprintf(buffer, "%wc", 0x3031); - ok_str(buffer, "?"); - - sprintf(buffer, "%lc", 0x3031); - ok_str(buffer, "?"); - - sprintf(buffer, "%Lc", 0x3031); - ok_str(buffer, "1"); - - sprintf(buffer, "%Ic", 0x3031); - ok_str(buffer, "Ic"); - - sprintf(buffer, "%Iwc", 0x3031); - ok_str(buffer, "Iwc"); - - sprintf(buffer, "%I32c", 0x3031); - ok_str(buffer, "1"); - - sprintf(buffer, "%I64c", 0x3031); - ok_str(buffer, "1"); - - sprintf(buffer, "%4c", 0x3031); - ok_str(buffer, " 1"); - - sprintf(buffer, "%04c", 0x3031); - ok_str(buffer, "0001"); - - sprintf(buffer, "%+4c", 0x3031); - ok_str(buffer, " 1"); - -} - -void -test_d() -{ - char buffer[5000]; - int result; - - sprintf(buffer, "%d", 1234567); - ok_str(buffer, "1234567"); - - sprintf(buffer, "%d", -1234567); - ok_str(buffer, "-1234567"); - - sprintf(buffer, "%hd", 1234567); - ok_str(buffer, "-10617"); - - sprintf(buffer, "%08d", 1234); - ok_str(buffer, "00001234"); - - sprintf(buffer, "%-08d", 1234); - ok_str(buffer, "1234 "); - - sprintf(buffer, "%+08d", 1234); - ok_str(buffer, "+0001234"); - - sprintf(buffer, "%+3d", 1234); - ok_str(buffer, "+1234"); - - sprintf(buffer, "%3.3d", 1234); - ok_str(buffer, "1234"); - - sprintf(buffer, "%3.6d", 1234); - ok_str(buffer, "001234"); - - sprintf(buffer, "%8d", -1234); - ok_str(buffer, " -1234"); - - sprintf(buffer, "%08d", -1234); - ok_str(buffer, "-0001234"); - - sprintf(buffer, "%ld", -1234); - ok_str(buffer, "-1234"); - - sprintf(buffer, "%wd", -1234); - ok_str(buffer, "-1234"); - - sprintf(buffer, "%ld", -5149074030855LL); - ok_str(buffer, "591757049"); - - sprintf(buffer, "%lld", -5149074030855LL); - ok_str(buffer, "591757049"); - - sprintf(buffer, "%I64d", -5149074030855LL); - ok_str(buffer, "-5149074030855"); - - sprintf(buffer, "%Ld", -5149074030855LL); - ok_str(buffer, "591757049"); - - sprintf(buffer, "%lhwI64d", -5149074030855LL); - ok_str(buffer, "-5149074030855"); - - sprintf(buffer, "%I64hlwd", -5149074030855LL); - ok_str(buffer, "-5149074030855"); - - sprintf(buffer, "%hlwd", -5149074030855LL); - ok_str(buffer, "32505"); - - sprintf(buffer, "%Ild", -5149074030855LL); - ok_str(buffer, "Ild"); - - sprintf(buffer, "%hd", -5149074030855LL); - ok_str(buffer, "32505"); - - sprintf(buffer, "%hhd", -5149074030855LL); - ok_str(buffer, "32505"); - - sprintf(buffer, "%hI32hd", -5149074030855LL); - ok_str(buffer, "32505"); - - sprintf(buffer, "%wd", -5149074030855LL); - ok_str(buffer, "591757049"); - - result = sprintf(buffer, " %d.%d", 3, 0); - ok_int(result, 4); - -} - -void -test_u() -{ - char buffer[64]; - - sprintf(buffer, "%u", 1234); - ok_str(buffer, "1234"); - - sprintf(buffer, "%u", -1234); - ok_str(buffer, "4294966062"); - - sprintf(buffer, "%lu", -1234); - ok_str(buffer, "4294966062"); - - sprintf(buffer, "%llu", -1234); - ok_str(buffer, "4294966062"); - - sprintf(buffer, "%+u", 1234); - ok_str(buffer, "1234"); - - sprintf(buffer, "% u", 1234); - ok_str(buffer, "1234"); - -} - -void -test_x() -{ - char buffer[64]; - - sprintf(buffer, "%x", 0x1234abcd); - ok_str(buffer, "1234abcd"); - - sprintf(buffer, "%X", 0x1234abcd); - ok_str(buffer, "1234ABCD"); - - sprintf(buffer, "%#x", 0x1234abcd); - ok_str(buffer, "0x1234abcd"); - - sprintf(buffer, "%#X", 0x1234abcd); - ok_str(buffer, "0X1234ABCD"); - - /* "0x" is contained in the field length */ - sprintf(buffer, "%#012X", 0x1234abcd); - ok_str(buffer, "0X001234ABCD"); - - sprintf(buffer, "%llx", 0x1234abcd5678ULL); - ok_str(buffer, "abcd5678"); - - sprintf(buffer, "%I64x", 0x1234abcd5678ULL); - ok_str(buffer, "1234abcd5678"); - -} - -void -test_p() -{ - char buffer[64]; - - sprintf(buffer, "%p", (void*)(ptrdiff_t)0x123abc); - ok_str(buffer, "00123ABC"); - - sprintf(buffer, "%#p", (void*)(ptrdiff_t)0x123abc); - ok_str(buffer, "0X00123ABC"); - - sprintf(buffer, "%#012p", (void*)(ptrdiff_t)0x123abc); - ok_str(buffer, " 0X00123ABC"); - - sprintf(buffer, "%9p", (void*)(ptrdiff_t)0x123abc); - ok_str(buffer, " 00123ABC"); - - sprintf(buffer, "%09p", (void*)(ptrdiff_t)0x123abc); - ok_str(buffer, " 00123ABC"); - - sprintf(buffer, "% 9p", (void*)(ptrdiff_t)0x123abc); - ok_str(buffer, " 00123ABC"); - - sprintf(buffer, "%-9p", (void*)(ptrdiff_t)0x123abc); - ok_str(buffer, "00123ABC "); - - sprintf(buffer, "%4p", (void*)(ptrdiff_t)0x123abc); - ok_str(buffer, "00123ABC"); - - sprintf(buffer, "%9.4p", (void*)(ptrdiff_t)0x123abc); - ok_str(buffer, " 00123ABC"); - - sprintf(buffer, "%I64p", 0x123abc456789ULL); - ok_str(buffer, "123ABC456789"); - - sprintf(buffer, "%hp", 0x123abc); - ok_str(buffer, "00003ABC"); - -} - -void -test_o() -{ - TCHAR buffer[64]; - - sprintf(buffer, "%o", 1234); - ok_str(buffer, "2322"); - - sprintf(buffer, "%o", -1234); - ok_str(buffer, "37777775456"); - -} - -void -test_s() -{ - char buffer[64]; - - sprintf(buffer, "%s", "test"); - ok_str(buffer, "test"); - - sprintf(buffer, "%S", L"test"); - ok_str(buffer, "test"); - - sprintf(buffer, "%ls", L"test"); - ok_str(buffer, "test"); - - sprintf(buffer, "%ws", L"test"); - ok_str(buffer, "test"); - - sprintf(buffer, "%hs", "test"); - ok_str(buffer, "test"); - - sprintf(buffer, "%hS", "test"); - ok_str(buffer, "test"); - - sprintf(buffer, "%7s", "test"); - ok_str(buffer, " test"); - - sprintf(buffer, "%07s", "test"); - ok_str(buffer, "000test"); - - sprintf(buffer, "%.3s", "test"); - ok_str(buffer, "tes"); - - sprintf(buffer, "%+7.3s", "test"); - ok_str(buffer, " tes"); - - sprintf(buffer, "%+4.0s", "test"); - ok_str(buffer, " "); - - -} - -void -test_n() -{ - int len = 123; - __int64 len64; - char buffer[64]; - - sprintf(buffer, "%07s%n", "test", &len); - ok_int(len, 7); - - len = 0x12345678; - sprintf(buffer, "%s%hn", "test", &len); - ok_int(len, 0x12340004); - - len = 0x12345678; - sprintf(buffer, "%s%hhn", "test", &len); - ok_int(len, 0x12340004); - - len64 = 0x0123456781234567ULL; - sprintf(buffer, "%s%lln", "test", &len64); - ok(len64 == 0x123456700000004ULL, " "); - -} - -void -test_f() -{ - char buffer[128]; - long double fpval; - - fpval = 1. / 3.; - sprintf(buffer, "%f", fpval); - ok_str(buffer, "-0.000000"); - - sprintf(buffer, "%lf", fpval); - ok_str(buffer, "-0.000000"); - - sprintf(buffer, "%llf", fpval); - ok_str(buffer, "-0.000000"); - - sprintf(buffer, "%Lf", fpval); - ok_str(buffer, "-0.000000"); - - sprintf(buffer, "%f", (double)fpval); - ok_str(buffer, "0.333333"); - - sprintf(buffer, "%f", (double)0.125); - ok_str(buffer, "0.125000"); - - sprintf(buffer, "%3.7f", (double)fpval); - ok_str(buffer, "0.3333333"); - - sprintf(buffer, "%3.30f", (double)fpval); - ok_str(buffer, "0.333333333333333310000000000000"); - - sprintf(buffer, "%3.60f", (double)fpval); - ok_str(buffer, "0.333333333333333310000000000000000000000000000000000000000000"); - - sprintf(buffer, "%3.80f", (double)fpval); - ok_str(buffer, "0.33333333333333331000000000000000000000000000000000000000000000000000000000000000"); - - fpval = 1. / 0.; - sprintf(buffer, "%f", fpval); - ok_str(buffer, "0.000000"); - - sprintf(buffer, "%f", 0x7ff8000000000000ULL); // NAN - ok_str(buffer, "1.#QNAN0"); - - sprintf(buffer, "%.9f", 0x7ff8000000000000ULL); - ok_str(buffer, "1.#QNAN0000"); - - sprintf(buffer, "%f", 0x7ff0000000000000ULL ); // INFINITY - ok_str(buffer, "1.#INF00"); - - sprintf(buffer, "%f", 0xfff0000000000000ULL ); // -INFINITY - ok_str(buffer, "-1.#INF00"); - - sprintf(buffer, "%f", 0xfff8000000000000ULL); // broken - ok_str(buffer, "-1.#IND00"); - -} - -void -test_e() -{ - char buffer[128]; - long double fpval; - - fpval = 1. / 3.; - sprintf(buffer, "%e", fpval); - ok_str(buffer, "-3.720662e-103"); - - fpval = 1. / 3.; - sprintf(buffer, "%e", (double)fpval); - ok_str(buffer, "3.333333e-001"); - - sprintf(buffer, "%e", 33.54223); - ok_str(buffer, "3.354223e+001"); - - sprintf(buffer, "%e", NAN); - ok_str(buffer, "1.#QNAN0e+000"); - - sprintf(buffer, "%.9e", NAN); - ok_str(buffer, "1.#QNAN0000e+000"); - - sprintf(buffer, "%e", INFINITY ); - ok_str(buffer, "1.#INF00e+000"); - - sprintf(buffer, "%e", -INFINITY ); - ok_str(buffer, "-1.#INF00e+000"); - - -} - -typedef struct _STRING -{ - unsigned short Length; - unsigned short MaximumLength; - void *Buffer; -} STRING; - -void -test_Z() -{ - char buffer[128]; - STRING string; - int result; - - string.Buffer = "Test\0Hallo"; - string.Length = 4; - string.MaximumLength = 5; - - sprintf(buffer, "%Z", &string); - ok_str(buffer, "Test"); - - string.Length = 8; - sprintf(buffer, "%Z", &string); - ok_str(buffer, "Test"); - - string.Length = 3; - sprintf(buffer, "%Z", &string); - ok_str(buffer, "Tes"); - - string.Buffer = 0; - sprintf(buffer, "%Z", &string); - ok_str(buffer, "(null)"); - - sprintf(buffer, "%Z", 0); - ok_str(buffer, "(null)"); - - string.Buffer = (char*)L"Test\0Hallo"; - string.Length = 8; - string.MaximumLength = 10; - - - string.Buffer = (char*)L"test"; - string.Length = 12; - string.MaximumLength = 15; - result = _snprintf(buffer, 127, "%Z %u%c", &string, 1, 0); - ok_int(result, 15); - -} - -void -test_other() -{ - char buffer[128]; - - sprintf(buffer, "%lI64wQ", "test"); - ok_str(buffer, "Q"); - -} - -START_TEST(sprintf) -{ - HANDLE hModule; - - hModule = GetModuleHandleA("msvcrt.dll"); - if (!hModule) return; - p_vsprintf = (PVOID)GetProcAddress(hModule, "vsprintf"); - if (!p_vsprintf) return; - - test_c(); - test_d(); - test_u(); - test_x(); - test_p(); - test_o(); - - test_s(); - - test_f(); - test_e(); - test_Z(); - - test_n(); - test_other(); -} - diff --git a/rostests/apitests/ntdll/testlist.c b/rostests/apitests/ntdll/testlist.c deleted file mode 100644 index 94ed0fd3ddd..00000000000 --- a/rostests/apitests/ntdll/testlist.c +++ /dev/null @@ -1,24 +0,0 @@ -#define WIN32_LEAN_AND_MEAN -#define __ROS_LONG64__ -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_NtAllocateVirtualMemory(void); -extern void func_NtFreeVirtualMemory(void); -extern void func_NtSystemInformation(void); -extern void func_RtlInitializeBitMap(void); -extern void func_ZwContinue(void); - -const struct test winetest_testlist[] = -{ - { "NtAllocateVirtualMemory", func_NtAllocateVirtualMemory }, - { "NtFreeVirtualMemory", func_NtFreeVirtualMemory }, - { "NtSystemInformation", func_NtSystemInformation }, - { "RtlInitializeBitMap", func_RtlInitializeBitMap }, - { "ZwContinue", func_ZwContinue }, - - { 0, 0 } -}; - diff --git a/rostests/apitests/testdata/ReadMe.txt b/rostests/apitests/testdata/ReadMe.txt deleted file mode 100644 index 2c6129599f2..00000000000 --- a/rostests/apitests/testdata/ReadMe.txt +++ /dev/null @@ -1,21 +0,0 @@ -We can not test follow format yet. - - -Follow format need be genreted to complete all test -*.fon : Font resource file. -*.fnt : Raw bitmap font file. -*.ttc : East Asian Windows: TrueType font collection. -*.fot : TrueType resource file. -*.mmm : multiple master Type1 font resource file. It must be used with .pfm and .pfb files. - -Follow format have been genrate from test.std with fontforge in cygwin -test.otf -test.pfb -test.pfm -test.ttf - - -How to setup test data -Copy this folder to same folder as gdi32api.exe - - diff --git a/rostests/apitests/testdata/test.otf b/rostests/apitests/testdata/test.otf deleted file mode 100644 index 4dbc7d634ce..00000000000 Binary files a/rostests/apitests/testdata/test.otf and /dev/null differ diff --git a/rostests/apitests/testdata/test.sfd b/rostests/apitests/testdata/test.sfd deleted file mode 100644 index 67355df2cb4..00000000000 --- a/rostests/apitests/testdata/test.sfd +++ /dev/null @@ -1,6612 +0,0 @@ -SplineFontDB: 2.0 -FontName: Test -FullName: Test -FamilyName: Test -Weight: Medium -Copyright: Created by Magnus Olsen 2007 with FontForge 2.0 (http://fontforge.sf.net).\nThis font is only for ReactOS Testing kit \nand is complete free -Comments: 2007-9-30: Created. -Version: 001.000 -ItalicAngle: 0 -UnderlinePosition: -409.6 -UnderlineWidth: 204.8 -Ascent: 3277 -Descent: 819 -XUID: [1021 430 2056157642 9136070] -FSType: 0 -OS2Version: 0 -OS2_WeightWidthSlopeOnly: 0 -OS2_UseTypoMetrics: 1 -CreationTime: 1191142788 -ModificationTime: 1191145913 -PfmFamily: 17 -TTFWeight: 500 -TTFWidth: 5 -LineGap: 369 -VLineGap: 369 -OS2TypoAscent: 0 -OS2TypoAOffset: 1 -OS2TypoDescent: 0 -OS2TypoDOffset: 1 -OS2TypoLinegap: 369 -OS2WinAscent: 0 -OS2WinAOffset: 1 -OS2WinDescent: 0 -OS2WinDOffset: 1 -HheadAscent: 0 -HheadAOffset: 1 -HheadDescent: 0 -HheadDOffset: 1 -OS2Vendor: 'PfEd' -TtfTable: cvt 8 -!$MDh!/Lt+ -EndTtf -LangName: 1033 -Encoding: ISO8859-1 -UnicodeInterp: none -NameList: Adobe Glyph List -DisplaySize: -24 -AntiAlias: 1 -FitToEm: 1 -WinInfo: 0 56 20 -BeginChars: 256 177 -StartChar: A -Encoding: 65 65 0 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Back -Image: 403 117 2 1209 0 ffffffff 4003.26 11345.9 56.5031 54.5608 0 -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,dmHsK8o)Jais8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s15eQVl-H=cd2Xks8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,Fcd./nJV/T- -_o'Cls8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -OcbcLG'9XUU]:Aos8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8U!S_fU!BP*2!nlK\ELs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s7#OI`PogEdaJ0qs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W+aQ'H9+Dm-@Js8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8TmM^l"#,WMulss8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s3oHGF)uDJH$S6%h>dNTs8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,)ZEe[uGGqI=s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8S+>NaZ@)R@0KCs8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!Y-+pNG':$kY5eP%s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!`5KT1Ci!p(Ct[Lps8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s.Q-[E,]d$Z*F?/s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8VKRm;[,cB4kkUW2Tars8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s7#OIp\4F^s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8S[^Sn`"T -X/i<$s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W+]Oc`aJ=Fl$S -qYL'gs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W,Pg"F<^`9-4Es8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W+^P*0?dA?`;Bs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s4,ZM -?=$rH@:@:"aoDD@s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s7Q'XZ*CR4W2Sb:j8]/Zs8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s7#OIG'8%>A7XLV'Ms8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,<`PmObKr:iHs8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W+rVP[$\9Q>&ls8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s*fEG;c?VWOcf\Ds8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!Yct?ZI!iE4\,ZL. -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!S=H*@8P+8UHiO-Gs8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,6^Vs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s.5gR -8kM][>?g"BhuE`Vs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8UHmd'U0eUnjfKOcbBQL3\&iE,]c/B4kacA8>sr -EcQ2CF`hhLF`hhLFEDVFEcQAJGCP*lPEV3?\@Cbdkl:\_s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8U!S_dd1dKnY6\s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s,W5%5!D/JDJoLSs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W,np\/93Ajo-WPa%F4s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8V$8i3KYoOH>Q=C2-^I<(]bT84Z9B84Z@8'?g;c?V%?XIYeD0^DP -NfK-jSXlpdY-bRC[^NWS\@B/_]=u"n^:q=q^:qCu^r+(-_o'C0_o'."]Y;+obfn;ag"GlanGiOg -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!KnY4j@q30a]`8$3 -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W+:DJhX%5(\B^RVs8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8UX"eVAp8H[C*tMi3FKM2I1J -O,o@5]"7qAs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W,lp%<$ -9MA.Sp\4^fs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s4Q)Y91qoO9ME@A_uKc:s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W+tW2P#gHCC:k -kih6(TqRX4P.\H?rVc]ps8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!jlPTp&G'ls8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s4,ZMAnGXtF`m`as8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!TV.r>4$-YN>Q=a's8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8Vlhq#CBos8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!r;?Ih:f'PJ7'Eet -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s.Z6^JqATWY-+:bS;E)Zbfn<2s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!qYL'RlK[Bgio8tWg=k9(bKIQ2]Y(ni\@B&\]=ZkRh#IES -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8UQsdpccqF`hj,s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s.H$X3B9*'>$Ct+s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!q"XXGjlP(Ef#u7[_83t"]=YYc]"5Ja -\$riR['[*CZ*CR=XK8M(X/i_=\(9-]p\4F^s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s+uSh -5!D/ahu$6 -X/i;,ZEiTRjo>A\s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,Je'hc8@Wcg9s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8S^`T.r&T=BJ]*s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s7>jRi8EPgSXl=>R@0A,QC4//VP^63aN4;Wr;Zfss8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8QV?A3E(=S"#oIs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8SX\SPrHc?XI0bc-?:gs8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8VrlqW$Vre'ldlcd0hZbgY%ih;-oHio9:ilhC/J -s8W-!s8W-!s3K$;Unjft]"7h;r;Zfss8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!q"XXZq"XXZq"XXZp\4FVp\4FVp](9ns8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!e'lcT@UaJ&FoVLA -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W+9D/Cs\0PG-5s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s7lBa -q"XXYp\4@Rp%.eHoCMSFoCMSFoCDJCo()ABo()ABo'>W-c-=M@[C)X!T9#%oNfK-fR@1e'^?t=T -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!Y-+or77C0T<:0)?s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!rVc\cSXj1t@;0FiY-+r+rVccrs8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,qqYKUHmHEctoCMSHp%A@bs8W-! -s8W-!s8W-!s8W-!s8W-!s8VrlqQ$ZtVP^6Vlg+TNs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -r;?Kcp%@Y:leL:NaiVZ;]Y(VY[&Bq%T:_aGS=H(KmHsrRs8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s3oHG -@U`eiG'E5X7SbJ:R\"s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s2DsrKnY5UUSF3DR%U+F -o()AOs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,trVccrs8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8TaE]U+tOc-=N5s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -qYL'VmdA]Yf>GMD\@B&PYHOt+Wi2kpVP^5iWMuYfUS"0NS=H+>S=H"8R?j/)Ocbc[KnXr'I=-Ei -N/W_>bfp+es8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8UQsdpccqG'8'/s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8VNTmQa$& -6:+#jf@U'&s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W#pr79HMR@0IgH$OmhJ%3"us8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,Fcd,'M7SHKLio8tts8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,_kieS.SW8_j -bKJ)0X/hYVRGZoZs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,@aiT[-Of,+Ts8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -rVc]YkigXMf?DI__83t"]=Y\e]>24t^qdb-aiW#\e)0'?lK[[-p%A+Tq"XXZq"XXYp\4FVp\4FV -io8t3^:oepPBM+mH$O\E\$uD;s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W,Je'hc8@Wcg9s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W,Mf%)Z71e'r(s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!ZEgccIt)T`Fh"rks8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!G'8$m5!Ek%DZBb:s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -^:q=;Lkqq*VZ6\rYHP-rQ^?=UfDkmNs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!o()@9Pa%8kOR;H& -s8W-!s8W-!s8W-!s8W-!s8W-!s7Q'Xp%A"Np%@qJoDejjs8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W,oq"X"6k0qf.`Pog7`5KaAdX*&Q-I!g=^a2e5[s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!e'lcS@:=;$FoVLAs8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!I!g;m/1ae$R@0KCs8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s3f?D?XI/\EcV3[s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s%uWj/1`?$IX_=ss8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!WMuk7DJjcHHKF8M -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W+_PES!e3F#fo -lK[[7s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8T'tWK`X3hr!>ks8U$U`/ft?['[4?s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s.5gRKnY69gt_r0s8W-!g=k8]X/g\uIW07FG'8%XIXZ`pIX6q"XXas8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W,dmHo[aLP:G9g=k9\s8T^C]7Y`gH[C*rM2A74Wp&[1p%A"Np%A"NouG+n -SXl=FTqTQKaRf#ps8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!c-=LrP*1QSL4t>8JqAT*JUrc=N0p!"U8"C*bKKDEnGiOgs8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!r;?K[mHs<.mJm4ds8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!H[C*@='),jUAt8n -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,Gd*Q'(?#ak( -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W*\4$,;W29jCjs8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s5iA(J:N/fDJm%s])Vg1s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s2iC) -]=Y\e]=Xc1TlG'l=]nm(:f'k\9hJ#M:f'uLO,s>@s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8SX\SN8em9he@LmHsrRs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!WMuk\PEY4okl:\_q"XWUSt;F@S+udR -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!^:q=,H$PO7Oh/-8S"#miF`hqRGb1Luj5]2"s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W,?aN0'hKi_>W7Rfj<84Z0<76s4*5X7S#5s[q.779O377BXE<)eX.L[+0i -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!rVc]ps8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8TO9[TZj< -AnGZ1gt_r0s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -d*U-F?!VGiEW?(=s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s5iA(3B9)X2E'^[k5YJ] -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s0Ar9AS#G2Mi7W8s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s4>lS -JqASY>?a]l8k)9>6psF.5X7Iq4[VS(9MA,S9he2N8OZ':FEDWaio:"L5(G:KnY,1Jq8K(H[C*^F`hS>DH'S7 -5!D.j3B;J7I/j6Hs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -mdBLcF`gtq?'q"Hs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W+TLko&2$Ct+s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s.Q-[='&IGF`m9Go)Jais8W-!s8W-!s8W-!s8W-!s8W-!s5iA(@q0!o,U=W\,We(L -@q0"uIt*!!J:W9&J:N0!IXZ!FBeM+m3]]2`F2q7^'#!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8SX\SS)SJQ^='=s8W-!s8W-! -s8W-!s8W-!s)W7&5X7S!5N]9!X:JXdds8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W,np\1YdWJldpc-=Mqk2qS[MjKcsoCMSRs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-![C*DL?XHW+:l'p` -bfn<2s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s*8m87RfjG;cC*3[K$:,s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8T:+Yo&eYfi -',)#n'GM5q'GV>t'bqH!()@l0*$QRN.Olo+2E"B.:p@1.s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!jlPS`3&iiU2s'/_s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s4Z2\D/F,f;Gp@h;,C(c:JXb]:/3c.3%?C- -/1`>74?Pnq5uLTY@U`e]C2.KuC1h0lA7T4W?=$H):d70/.Olni+!3*f/p2;Zs8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,Th;)dZBmb;U -o()AOs8W-!s8W-!lK[YUF)sc=77Tjg7U9;*daHSDs8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!TqS/V:f'JF6@OB4s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!H?sm@>$?5uHMm^=s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W&rrQrp<[C*E)Oca?lBi@r/<)cgq;c?Rl;H$Lm1,:Tq%hB0]%j<)>+X&!P+X%sN+<_mO -+X&!O+ks8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s5iA(3&ilV2`Kj[jo>A\s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W+rVP[m7A5Z<'@:rVuots8W-!s8W-!s8W-!s8W-!s8W-!s5rJ+<`W6G,9nBV,$S8U -nF5rIs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W+DG^+%@CsC5Ls8W-!s8W-!s)`@)5!D/6>$A29Z2ak(s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!8P)K;5!ITMfDkmN -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!q"XWXTqR9uLkgb@O,o@Kd*Vgms8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -q"XX1cd,Zo=&2Uf[C*FBs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s0&W0:JXb\9hh^jXT/># -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,Fcd-TNECi_n6psF]Df=1Vec5[Ls8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8TjK^KOfEAS#H,g=lT,s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s1Z4]6UO4::J\I/\$riU -[^NWO['[Q]^=(HXg"G'?cf8L&ClHs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,dmHn4d?;=6j -MMd;ks8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8VZ\nt`(W@:$>*):/7=LSH&Wh -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8VENlZ.#dAS#Gb]=\+Cs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -R@0I;9hfMCDYNo"s8W-!s8W-!s8W-!s8W-!s8W-!s45cPS"#maD/E9Q$>*?A7Wp.bl@_C -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W,Je'hT.?#Xb%s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!jlPS_2`EZS2s'/_ -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -PEV2)9hfSGE<#tt0"&*ps8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8Rb*KOA1q_83tfs8TL7[7!DN9he@Bj5^1>s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s.lHdEH,u#=BJL#;d*@.?XI/WD/GQ'Q2:@Rs8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s*oNJ1c.$k=BPV's8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8TaE]Q8.8 -?=$s0St>fTqZ$Tqs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,emd>(7EHQDHmHs<@s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s(Q1]8kM^VX/l:#s8W-!s8W-!s8W-!s7c9^]Y(n*I=5I0?W^E4>?bA\s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s+Q/\[0NZ5^n02 -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!r;?J/Chu*l3AE6C1G^gB1,:U?1,:U?1,:UD2`F,m6ud3d_83tfs8W-!s8W-! -s8W-!s8W-!s8W-!s8W,_kib;u5rq%fSt;PRs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -q"XWUSt;12Pa%DsKnY5i\$uD;s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8Vlhpu:;m_o'BtZEgdAZELI8MMd:=I!g9fH\6s' -R@0J2R@1_#]_D0ps8W-!s8W-!s8W-!s8W-!s8W-!s8W-!aiVY:AnHUFJcGcMs8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W,Yio3j6;H$Lmc-=N5s8W-!s8W-!k2tg#U7us[H=LGp>?bPEV)iOF;P*>$>)u77Bd>8R>_0 -J:N1AoCN"^s8W-!s8W-!s8W-!s8W-!MMd9K2)SH:=9&=#s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s6f=CS"#n(M2A[L[Z?K1P*2!chr"J6s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!bfn:uR$`8KHuX.G?XI/591q3&2_H^8 -0JG1:1G^pI2F9_s?XI09Unm&2j8]/Zs8W-!s8W-!s8W-!s8W-!s8W-!s.#UL@U`f;SXof\s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!PEV2)9hfkWGk:Ouio8t/]"42nQ?mk'B4kjlC2/3HI\s!> -gt^]bs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s)iI,<)chLK7j4(s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8UQsdp66bE,]drs8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W,\jlJ?W2)R6KjlPV(s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W+/@q/SA=45OFs8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s#)bn -,U=XtOcf\Ds8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8Up2h/I=P -GB\8slg'IeMa'EjH[C,>s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!kih5EBk]Od3'BDf['[4?s8W-!s8W-!s8W-!s8W-!s7Q'X -\@B&5Pa#Tb@:?b<-:JXMP84lKHAS#H$daJ0qs8W-!s8W-!s8W-!s8W-!s8W-!s8Rb*KP+q1 -bfn<2s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s'B#<1,:Up@q1(@JTZ*XD/F-(Bk_[2FGYj2 -^V@P`s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W,%Y-(l/=CGWHe'leGs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,IdaD?(>AnFus8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!jlPS\1c.'I2%H(LV!mdBNCs8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W+rVP[U'>Zk34 -IXZa$LPM:cRC0H1cd0qnh;-f=g=k97bKJ)#St9G%@o,uuK7egAlK\ELs8W-!s8W-!s8W-!s8W-! -s8W+FH?s7A\s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8SX\SQ/ZiJUrCPs8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W*q:f&l$0q"Gts8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!St;NW>$@2VQ%+:577BXN?!Zd^li7"bs8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8Q8+=u8&mM2@)hs8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8T:+YBbD=I!g=M[^Q59s8W-!EcQ1U1,[2,_D:$YV -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -p%A!i]=YJY[EHb:oCMSRs8W-!s8W-!s8W-!s8W-!s8W-!s8W,/\@>pS?u9at^qdb^qYL6ls8W-! -s8W-!s8W-!s8W-!E,]c4Ci&+jirB&Ys8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s52_kO,o>X1G_*S435La -oCMSFoCN"^s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s6]4@f@SX'e'lq#f@ns4i8EP_nF5l6mUTj=@:?b[Us8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8V3BjYf"T2E!JTjlQOBs8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W+ZNfI4D=Il"R -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!:JXbC1c286X8i5"s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s*]$>*eMMb2*:J+5O\$rjHs8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!aiVXd4$,Sg4jVI# -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8TmM^kdf&R[T\ld*Vgms&W9' -2)R7oY-.g)s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8VZ\o"MiP -DJj>k<)es@OT5@\s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!WMukGIXZj!J[)Jb -j5]2"s8W-!s8W-!s8W-!s8UX"eS&W0G'8'/s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8TpO_2=,- -6UO4=;Gu<*h#IESs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W,Yio7kn_nNk!`5KU9aiVfPc.1@plK[Zjh;)@B?"[e_s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8UNqdT]p[Df9Ros8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,\jlJ?W2)R6K -jlPV(s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -LPLXe=BMGtVZ6\rs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s$fII2E!J+]Y+:Es8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,lp%<*9CM%0j6s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8Vlhpf1jRaN2H;^VAU\h=0q'o()ACoCMSFoD8=[g"G%_>?biWCB+>6 -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W,Gd*Q!$>AnFus8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -jlPS]2)R6K25s.7le^`4Ms8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!f@SVZ>[0op90ba-7n6(kaiXS_s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W+lTV+P85Y=X@k2th+s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8V]^oBkr4It)r.3B:GR?iU0+s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W#pr,m.):JXc7I=8]<])Vg1s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W,Zj5YiIKp7gdbKJ)<\$tAVirB&Ys8W-!s8W-!s8W-!PEV2:?='>!U&Y/ms8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!jlPUKc-99i<_lLegt^]bs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!K7eeuFEG@8_>jQ8 -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8Ug,g:tD;f%/FPs8W-!s8W-!s8W-!s8W-!s4Q)Y ->$>*DBkdVIs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!daHQJ>?bu_DZBb:s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s5iA(2E!HL1Ge.Sjo>A\s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8Rk0LKIY\VP^6js8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!e^`234$,_o621-J -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s1H"W='&HZ1G_0W4aha, -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!A7T454?SR]N;rqXs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s'fGH2)R7HLPPp0s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8TU=\8?)"?=$s&Pa'##_>jQ8s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!aiVYTJ:ODiUV+7P]=Y]EnF6JXs8W-!s8W-!s8W-!s+uSh@q0#a^qg!Ms8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!p%@u^>?am!:Yaa\s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,dmHnCn@m)t< -[1N@?XNj5s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s$T7C0/"uf\$uD;s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W+UM2>A<=f/'ns8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s,iG+ -1c.$h$>*-;Gu6&gAh3Qs8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -GB\6k3B9Dm6Cj[%q\bs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8VAB`9As8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8VKRm9X+*9he@'aN4D]s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8U-[a$;mT5!D0'TV2>bs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8U$>WSC&e55s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8RLqI8a'C -St;PRs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W+YNK#>7-q-Qns8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s+cAb=BJ\&VPaCns8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W+!lE<#t$>*EC23eKs8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W+oUSCdf<.]^Rs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!aN2FQ.k(_H[^:q>]s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8T:+YBtVCKS5$?jlP+Gf<;B] -d*U/>s8W-!s8W-!s8W-!s8W-!s*fEG@U`fjbfp+es8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W,3]Y%$9:NU]#s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s/Dus84Z9A7n:YAaT);?s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8;fm`5KU1_86!EqZ$Tqs8W-!s8W-!s8W-!s8W-!s8Ud*fiqZbC2.M`s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-![^NVE`b&/s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s$8q:0ekD`X/l:#s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W+'>?_m[(Gdj'lg*m:s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,&YHKrH3DraQ -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -Pa%Cg1G`A@nf -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s2;jo<`W7;Ci'.Os8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8V->j"N/@1c.&Lj5^1>s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!a2c5-?XIu"G5qUBs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,Le^ZQ92Ea2dgt^]bs8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s/`<'.Olnb(`7(*D#aP8s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -G^+Hf0em?TB`J,4s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s%cEd1,:V;K7j4(s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s7#OIP*1u.j+Du: -H$O\8WiH+!s7Q'X[^NWMZEiKLirB&Ys8W-!s8W-!s8W-!s8W+@FECnu@+EfXs8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s7>jR?!U`-8P-1lZ2ak(s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s0fAE?biWCB+>6s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8UNqdTBURBP;)Zs8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W,Zj5VmM1,(C9j5]2"s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s5W/"@U`eV@q5B3qZ$Tqs8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!PEV1d1G`*6=9&=# -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8R:eG8D&3,pak'QBqRNs8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s&2ip1c.%IMi7W8s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W,Gd*O[/2E3ZU\@B'Ks8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s5iA(N/W]m;,L7j;l?Ok -p%A"Xs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -i8EOHKS45\DPW-`PogmqYL6ls8W-!s8W-!s8W-!s4>lSB4kjoD/Je3nGiOg -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s,;nq91qp*I!ktos8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W+_PESX491)'6FEDX)s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!r;?K%\$s)c^ARp,s8W-!s8W-!s8W-! -s8W-!s8W-!s4Q)Y>?bAmdBN2mdBN;p\4+Dmf3=es8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W,trVa+1["aSpZ'UfDUSFU7e^a^"s8W-!s8W-!s8W-!s8W-! -s8W+_PESmB;Nd3+s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,Dc-9JUpQk:.e,N -N/W_qs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8UA7ecs8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s3f?D -<`W75AnM)Cs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!g=k9=i8FY8s8W-!s8W-!s8W-!s8W-!s8W-!s8V->j"`AF1,:WFj5^1>s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,Fcd-$.@:H&@K:PEV2qQ'IJoOcYZd -OH>QdOcbusQ]R;jI!g$+m/C2.LGOcd,^\$WNLT:_a>PEVl@VVKt^s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!MMd9j<)ffpW;lnts8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -jlPT4@:<)5;q9FKs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s*oNJ -5s[e8;cB<\TE"rks8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W,2]=Y#?W8lpus8W-!s8W-!s8W-!s8W-!s8W-!s8W-!g"G%_>?biWCB+>6s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8UNqdT9LOAnGZTs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8T!pVfm6,Vl-Hms8W-!s8W-!s8W-!s8W-!s8W-!s8W,Zj5VpO1G^gC -j5]2"s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W+JIXY6q<2caos8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s*]$>)^/hVR#IK0?I -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s7Q'X\@B&5Pa$WGIX$*^GB\7ZI=6NlI=Qiu -FEDVHFEDMBEH,ugt_r0s8W-!s8W,Je'hN*>?kE@V/QnF5rFr;?Tps8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s/2cm8P)KjD/K=Qs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s1uOf;GpC[6UQZcM#[MTs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s0&W0UnjgWo()h\s8W-!s8W-!s8W-!s8W-!s8W-!s8U9cb?7tN -DJj@ls8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W,#XK4iZ7:0D/e'leGs8W-!s8W-!mdBLTAnFh7:Vjl`s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!?=$r39ME^Uc2[hDs8W-!s8W-!s8W-! -s8W-!s8W-!s5W/"1,:U>0eq_Kj8]/Zs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,io($C)Ak>Qc@:FBP;)Wr;?Tps8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8T+!Wh?#XnF5rIs8W-!s8W-!s8W-!s8W-!s8W-! -s8W,Cbfj9q>@:iHs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!?!U_g/hU[FAH2]0s8W-!s8W-!s8W-!KS5"N8kP5.OoPI]s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8T^C]1l!o=BJ\ro()h\s8W-! -s8W-!s8W-!s8W-!s8W-!s8V->j"W8C0JG3@j5^1>s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8V->j+`;C6UO3j.Om831hgZ< -R@0JHYHPm_`9ZaTs8W-!s8W-!s8W-!s8W-!s8W-!s/N*!:f'u&Bkd)+nGiOgs8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8RRuIm?7a:JXd>g"HE*s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!XK8K:',)N4+n"dds8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s&N0$3]]=/[']l5s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!>?b;\.4Hi#/UD_h_o'Cls8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s-K(=;,L2-D/IPBc1gu, -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,Fcd,Qi<)cgrs8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s.5gR:f'tP5!Ee!D"[Jos8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,(Z*BghSE&Yis8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!p\4E"DJiHS4?PaA^qg!Ms8W-!s8W-!s8W-!s.>pU9MA-1J:R\"s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W+[O,l^u7A6V -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W+eR@-T:85)]NIt)tEqYL6ls8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!_83sSQ^>\1`W,u< -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!L5(F];cBKfV#UJps8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -rVc\uYHPRM]C,+Ts8W-!s8W-!s8W-!p%@uZ='%:<2Jd2Gs8W-!s8W-!s8W-!s8W-!s8T'tWD-)] -F`hj,s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -Ci!o[8kPP@RfEEfs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!j5]/T1,:XA1Zd`[s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W+tW2N0T7Ofl; -.Olo45K;( -G'8'/s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W+&>$?b=slK\ELs8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8VNTmeHSPs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -LkpjY8P+bqM?!VUs8W-!s8W-!s8W-!s8W-!s8W-!s,E"t84Z9>6pu`_L&_2Qs8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s4lDb -Q^=&DZ*F?/s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s.,^O;,L28G^08gs8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s08i6I=6O:TV28^rVuots8W-!s8Ud*fj%ce3]];p92!jef)PdMs8W-!s8W-!s8W-! -s8W,,[C&b):2F`_s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8V!6hc3ZV<`W8Oe^a^"s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s5W/"1G^gD1c4=Ujo>A\ -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,sr;:PSECrhq -/hSb+.Om>72JQuAg=k9\s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8TpO_.7(e9he>j@:>^tSbMmQs8W-!s8W-!s8W-!s8W-!s8W-!s4Z2\]Y(n,It(X*>"D1T -5s[e)6ptEj@'?c;s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! ->?b;D&J696,fdsGs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!H?sls3&l#%FT;C@s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s+Q/\)]K_,%hCTX2oWbTs8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s/W3$8kM]]?![L1s8W-!s8W-!s8W-!s8W-!s8W+NJq?6Q5Xe+1Mi3Mns8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8VTXn>)kUTV.t?k2u^Ds8W-!s8W-!s8W-!s8W-!s8W-!s8U3_a]VbL@q0$9mHsrRs8W-! -s8W-!s8W-!s8W-!s8W,Mf%+JHB5DC#aN2I&s8W-!s8W-!`Poerj"iJI -1G^iIj5^1>s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s.Z6^ -6psEj-RU8h-T3k@?smBqg"HE*s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8UNqdW'8H<)cgsR -77BX:8P*,j>D7cb`Pogrs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8V*Mb8P)Ld]Y+:Es8W-!s8W-!s8UHmctmN77n6'B91t2$MuWhW -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8TR;[uZT2YctA3s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8R1_FAPe1 -Vl-Hms8W-!s8W-!s8W-!s8W-!s8W-!KS5"W;cAI,L]@DSs8W-!s8T:+Y=hM]4Ztr5>[5t8g&M*P -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!?!U`09ME+3]`8$3s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8;fm@:&6=bKJ*/s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W+bQBj9]1+Ok*5!D/aKn\aSkl:\_s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s/rN-Df9Pt>$=g%;GBk[91qoO9MA,R9MJ5U -:JXbg=BKHYDMO"&ZEge9s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W+QKnU?\(`XM8\@B'Ks8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s']>E -4$,NLH$TGis8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!f%/D"-RT90$SsRp -kih71s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8RRuImZRjH?so;s8W-!s8W-!S"#m?91qN85ZLfa -USFUas8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,]k2q_cO-c3"kih71s8W-!s8W-!s8W-!s8W-!s8W-! -s8W+kT:\kR:4%>7s8W-!s8W-!s8W-!s8W-!s8S=JPZV$iBP;)=io:"5aiU]gY+_P_ -T:_aDR@05$P-D0pp\4F^s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!>?b;Q*ZdR35l^las8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8TmM^d:@S91qqQq"Xmhs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s(>tW -%hB0_&J9&(ErZ1>s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,Cbfj!a;b]t\KnY5h[^L!gCe@;l -5X7STEcTsjh#IESs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W+nU8!9mK;trOs8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!mHs:K?sm5E>g:O?b=D]=\+Cs8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W,oq"S9+@6?Y7KnY6\s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8O)[*=3#Y0ekEZqYL6ls8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W+cQ^:KD:In#I -5X7S$6:+RJ;M9^Vp\4F^s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!g"G&@Ocb?OKttL> -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!MMd9l<`XZuIfKHJs8W-!s8U[$em;Zh9he?:L5,a.s3T-> -?XI/,6:+C@9q.WAs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W+lTV,"R9m_56 -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s.H$X8kM]W=',7pqZ$Tq -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s.c?a/1`>G9MGKds8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8SLTR6X#&0/"tD5X:KqP5kR^s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s45cPs8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W+mTqO\85=%S$g=k9\s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!6psEM$47=U&=oA_s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W,"X/gAcF]qsPF`hiMbKKqcs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -]"5J(JUrT3LVq$Is8W-!s8W-!s8W-!s8W-!s8W-!s4lDb?!U`;=')T/YQ+Y&p\4DuChuX589Arq -p\4EZVP[Er=$T#9;c?W#ZEjN1s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -_83ra:f(Y3A,lT/s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,oq"S3'?V*g\ -R$a9@s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8TU=\1K9a6:+$=s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!F`hg\0JG%//58i5^:q>]s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!p%@uiAnEqZ2KNq\s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8T+!WYcQi$k*P15sbPNs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8VENli7"bs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8Dop[C*DpK7eo5L=";os8W-!s8W-!s8W-!s8W-!s8W-!s.>pU>$>*8?!XhE["O*c -:JXbp@:?[U\9)h777BX-4?RM!DW'I2s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!>$>*+:f,Kaci=%Fs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -MMd9\7Rgfp@JKWms8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,BbKDLj/j2?\ -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W,>a2_+W;_0IN/hSbrEH2$Ys8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-![C*D277B[87]*&[ -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!`Poeb77A4;*B,o9s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!ZEgcdJ:NN7MSR$Cs8W-!s8W-!s8W-!s8W-!s8W-!s+Q/\ -9MA,81,:(!,:kAs<)cgr<)c:T78?TQJUrCMr;?Tps8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s(Z:`9he?h[']l5s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8T=-YY%M[;,L2nY-.g)s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -bfn9f1c-[3.\<6's8W-!s8W-!s8W-!s8W-!s8Vlhpk4l@q30a]`8$3s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8R@iGtUe'TV.tXs8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!p%@ub?XH/f6]-bYs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!BP;'3/hSn7107OYNK&q#Y-,RU^t72iP*1tq6UNCU/1iG*8kM^[Yd"0-s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!EcQ1a5!D;"6=shAKnY5JR$a8.R!sL5>$>)n5!D7u6"ahCi8EPns8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!^V@ODNfJI5H[gNp -R$a8HZEgpI[]6@-J:N/Q=]nBj92/,TB4kkHS"#V*PJP)Os8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W+mTqP+P96to1s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s*K*>6UO4H?![L1s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!BP;'81G^F--nHo#2)R6M2`EWQ2DR$C2E!Hc8kOASH0+/L -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!G^+I!5s[Fg2`EZS4$,Mc4$,Mc4$>_i;,L2QOcf\Ds8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -lg*l6VP\ZcH>ID6Bk_9mAS#7W?sR&DAS#G/LksF)d/X.Gs8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!hr!Yaq>UPEV2qQ'J&:U#"P\s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -H[C*7:/6k2O8o7[s8W-!s8W-!s8W-!s8W-!s8W-!s52_k>$>)t6puQUJH,ZLs8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -mHs<@s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s15eQ:/4Pg>?gmtq#CBos8W-!s8W-!s8W-!s8W,\jlL,fB0\^IB4kl;j5^1>s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8VrlqJ9ta9MA-@O,s>@s8W-!s8W-!s8W-!s8;fmF)uCk77C9Z=2D_h -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8TjK^K"96:JXd-aN4D]s8W-!s8W,emd=b%BL>-S -=BJ\:]"7qAs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8RV"J4W=(DJj@ZmHsrRs0Ar9 -@:?:ICR ->$>*2='%p`845j6?XI0U^qg!Ms8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W,(Z*A%YC0OnH=BJ[;AnHdPL>UnGs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8V$8i6p'%mdBNCs8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-! -s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!s8W-!rr<$! -EndImage -Fore -885 8945 m 0x80c001e4cc301820 - 886 8976 899 9000 922 9019 c 0 - 946 9039 972 9046 1002 9041 c 2 - 1018 9039 l 2 - 1062 9032 1094 9003 1103 8959 c 0 - 1107 8939 1112 8913 1119 8877 c 2 - 1129 8821 l 2 - 1131 8812 1131 8804 1131 8794 c 2 - 1112 8567 l 2 - 1107 8513 1067 8475 1013 8473 c 0 - 958 8471 916 8507 908 8561 c 2 - 880 8757 l 2 - 876 8779 880 8800 890 8819 c 1 - 887 8868 l 2 - 885 8900 885 8919 885 8932 c 0 - 885 8934 885 8942 885 8945 c 0x80c001e4cc301820 -3277 7293 m 2 - 3276 7273 3270 7257 3258 7241 c 0 - 3253 7234 3235 7215 3229 7209 c 0 - 3186 7172 3189 7183 3153 7153 c 0 - 3142 7144 3132 7138 3119 7134 c 2 - 2946 7080 l 2 - 2897 7064 2850 7083 2825 7127 c 0 - 2800 7172 2809 7222 2848 7255 c 2 - 2868 7272 l 1 - 2871 7277 l 2 - 2939 7386 3017 7428 3134 7492 c 0 - 3169 7510 3206 7509 3239 7487 c 0 - 3272 7466 3288 7433 3285 7394 c 2 - 3277 7293 l 2 -12915 9150 m 0 - 12888 9196 12898 9249 12940 9282 c 0 - 12948 9288 12962 9297 12980 9309 c 2 - 12983 9311 l 1 - 12980 9323 12978 9334 12978 9347 c 2 - 12990 9692 l 2 - 12991 9727 13008 9757 13036 9774 c 1 - 13036 9868 l 2x80c001e4cc311820 - 13036 9877 13037 9884 13039 9893 c 0 - 13050 9935 13073 10047 13075 10190 c 2 - 13075 10196 l 2x80c001e4cc309820 - 13075 10273 13060 10325 13045 10350 c 0 - 13039 10361 13033 10368 13028 10373 c 0 - 13019 10383 13013 10387 13011 10388 c 0 - 13004 10392 12998 10399 12993 10404 c 0 - 12990 10407 12988 10408 12987 10408 c 0 - 12980 10413 12977 10414 12975 10414 c 0 - 12973 10415 12957 10419 12944 10422 c 2 - 12942 10422 l 1 - 12938 10422 12936 10422 12934 10422 c 0 - 12924 10421 12924 10420 12908 10415 c 2 - 12881 10405 l 1 - 12882 10358 l 1 - 12882 10350 l 2 - 12882 10235 12856 10139 12823 10002 c 0 - 12820 9991 12816 9981 12811 9972 c 1 - 12810 9955 l 2 - 12810 9949 12809 9943 12808 9937 c 2 - 12799 9901 l 1 - 12804 9888 12806 9874 12805 9859 c 2 - 12674 7456 l 1 - 12690 7439 12699 7416 12699 7389 c 2 - 12717 6411 l 1 - 12738 6394 12752 6369 12755 6338 c 0 - 12761 6284 12772 6251 12780 6234 c 0 - 12781 6232 12784 6227 12784 6225 c 0 - 12788 6218 12791 6214 12793 6211 c 0 - 12796 6207 12799 6204 12801 6200 c 0 - 12805 6196 12809 6192 12813 6187 c 2 - 12821 6177 l 1 - 12837 6177 12854 6172 12870 6163 c 2 - 12989 6095 l 1 - 13004 6098 l 2 - 13134 6121 13326 6109 13430 6167 c 0 - 13447 6176 13458 6186 13467 6194 c 0 - 13494 6220 13528 6229 13562 6220 c 1 - 13565 6225 l 1 - 13621 6309 l 2 - 13621 6309 13621 6309 13622 6309 c 0 - 13625 6315 l 0 - 13637 6331 13645 6340 13650 6347 c 0 - 13691 6396 13725 6410 13734 6415 c 0 - 14287 6703 14030 6502 14552 6917 c 2 - 14564 6927 l 2 - 14584 6942 14604 6949 14628 6949 c 2 - 14737 6949 l 2 - 14757 6949 14774 6944 14791 6933 c 2 - 14801 6927 l 1 - 14808 6939 14815 6953 14821 6968 c 0 - 14834 7002 14833 7023 14834 7042 c 0 - 14834 7045 14833 7053 14833 7056 c 0 - 14832 7059 14831 7071 14830 7074 c 0 - 14829 7078 14826 7089 14825 7092 c 0 - 14814 7130 14802 7146 14779 7179 c 2 - 14768 7193 l 1 - 14749 7193 l 2 - 14742 7193 14736 7193 14729 7194 c 2 - 14723 7193 14716 7193 14709 7193 c 2 - 14702 7193 l 1 - 14687 7157 14652 7133 14609 7133 c 2 - 14526 7133 l 2 - 14510 7133 14496 7136 14484 7141 c 1 - 14474 7137 14465 7135 14455 7134 c 1 - 14446 7122 14435 7111 14422 7103 c 2 - 14280 7018 l 1 - 14232 6971 l 2 - 14227 6965 14222 6961 14215 6957 c 2 - 13928 6776 l 2 - 13910 6764 13892 6759 13873 6759 c 1 - 13853 6738 l 1 - 13833 6718 l 2 - 13829 6715 13826 6712 13822 6709 c 0 - 13819 6705 13816 6702 13813 6698 c 2 - 13798 6684 l 2 - 13644 6551 13532 6559 13381 6414 c 0 - 13359 6393 13335 6384 13305 6385 c 2 - 13082 6395 l 2 - 13032 6398 12995 6430 12986 6479 c 2 - 12942 6723 l 2 - 12938 6743 12940 6762 12948 6780 c 1x80c001e4cc341820 - 12894 8220 l 2 - 12893 8230 12894 8239 12896 8248 c 1 - 12890 8315 l 1 - 12888 8383 l 1x80c001e4cc381820 - 12885 8392 12882 8401 12881 8411 c 2 - 12849 8764 l 2 - 12846 8803 12861 8836 12893 8858 c 2 - 12909 8869 l 2 - 12921 8877 12929 8884 12937 8891 c 0 - 12972 8921 12977 8941 12983 8955 c 0 - 12986 8961 12985 8961 12986 8963 c 0 - 12987 8967 12987 8968 12988 8970 c 0x80c001e4cc321820 - 12988 8973 12988 8974 12989 8977 c 0 - 12989 8981 12990 8991 12990 8995 c 2 - 12990 9057 12932 9120 12915 9150 c 0 -13195 8995 m 2x80c001e4cc321820 - 13195 8994 l 2x80c001e4cc321820 - 13194 8986 13193 8961 13192 8952 c 0 - 13192 8948 13189 8933 13188 8928 c 0 - 13187 8923 13183 8908 13182 8903 c 0 - 13180 8897 13175 8882 13172 8876 c 0 - 13163 8854 13142 8799 13074 8738 c 2 - 13059 8725 l 1 - 13082 8464 l 1 - 13087 8452 13090 8439 13091 8424 c 2x80c001e4cc381820 - 13095 8329 l 1 - 13103 8233 l 2 - 13105 8219 13103 8205 13100 8193 c 1 - 13154 6745 l 2x80c001e4cc341820 - 13154 6735 13153 6725 13151 6716 c 1 - 13173 6596 l 1 - 13272 6592 l 1 - 13438 6741 13519 6720 13644 6821 c 1 - 13652 6837 13665 6851 13682 6862 c 2 - 13696 6871 l 1 - 13708 6883 l 1 - 13780 6955 l 2 - 13807 6983 13842 6992 13875 6984 c 1 - 14096 7124 l 1 - 14144 7172 l 2 - 14150 7178 14156 7183 14164 7187 c 2 - 14267 7249 l 1 - 14274 7301 14314 7338 14369 7338 c 2 - 14415 7338 l 1 - 14451 7360 l 2 - 14479 7377 14510 7380 14537 7370 c 1 - 14555 7387 14580 7397 14609 7397 c 2 - 14668 7397 l 1 - 14705 7426 14753 7397 14790 7397 c 2 - 14818 7397 l 2 - 14851 7397 14878 7384 14898 7358 c 2 - 14942 7302 l 2 - 14982 7246 15003 7213 15022 7151 c 0 - 15024 7144 15029 7122 15031 7115 c 0 - 15032 7107 15036 7084 15036 7077 c 0 - 15037 7070 15039 7049 15039 7042 c 0 - 15039 7040 15038 7032 15038 7029 c 0 - 15037 7000 15037 6959 15013 6896 c 0 - 15002 6866 14988 6840 14974 6818 c 2 - 14920 6732 l 2 - 14889 6681 14829 6668 14779 6699 c 2 - 14707 6744 l 1 - 14664 6744 l 1 - 14141 6328 14397 6529 13829 6233 c 0 - 13821 6229 13817 6228 13806 6215 c 2 - 13805 6213 l 1 - 13800 6202 13792 6192 13783 6183 c 1 - 13734 6110 l 1 - 13676 6025 l 2 - 13644 5978 13588 5966 13540 5994 c 1 - 13529 5988 l 2 - 13365 5896 13162 5918 13041 5896 c 2 - 12990 5887 l 2 - 12965 5882 12942 5886 12920 5898 c 2 - 12829 5951 l 1 - 12816 5946 12802 5944 12787 5945 c 0 - 12756 5947 12731 5960 12712 5984 c 2 - 12664 6045 l 1 - 12657 6049 l 2 - 12626 6067 12607 6096 12605 6127 c 1 - 12604 6128 l 2 - 12602 6132 12596 6144 12594 6148 c 0 - 12583 6172 12573 6201 12564 6238 c 1 - 12534 6255 12514 6287 12513 6326 c 2 - 12496 7314 l 1 - 12476 7334 12464 7362 12466 7394 c 2 - 12598 9814 l 1 - 12584 9836 12580 9863 12587 9891 c 2 - 12606 9975 l 1 - 12609 10032 l 2 - 12611 10058 12620 10080 12635 10097 c 1 - 12662 10209 12677 10278 12677 10349 c 2 - 12677 10356 l 1 - 12676 10448 l 1 - 12662 10499 12687 10548 12738 10569 c 2 - 12833 10606 l 2 - 12883 10620 12883 10623 12917 10626 c 0 - 12922 10626 12937 10627 12942 10627 c 2 - 12955 10627 l 2 - 12965 10627 12972 10626 12981 10624 c 2 - 12992 10621 l 2 - 13004 10618 13023 10615 13031 10612 c 0 - 13076 10593 13078 10595 13105 10576 c 0 - 13108 10573 13118 10566 13122 10563 c 0 - 13124 10561 13128 10556 13133 10552 c 0 - 13152 10537 13161 10531 13178 10513 c 0 - 13193 10496 13209 10476 13222 10452 c 0 - 13235 10431 13280 10349 13280 10196 c 2 - 13280 10188 l 2x80c001e4cc30b820 - 13278 10036 13255 9916 13241 9856 c 1 - 13241 9642 l 2x80c001e4cc311820 - 13241 9603 13223 9571 13190 9553 c 1 - 13184 9371 l 1 - 13209 9330 l 2 - 13240 9280 13226 9220 13176 9189 c 2 - 13163 9182 l 1 - 13159 9175 13154 9169 13149 9164 c 1 - 13173 9120 13195 9063 13195 8995 c 2x80c001e4cc321820 -3188 9045 m 0 - 3189 9044 3189 9043 3190 9041 c 2 - 3203 9000 l 1 - 3221 8947 l 2 - 3223 8941 3225 8934 3226 8927 c 1 - 3232 8925 3239 8922 3245 8918 c 0 - 3247 8917 3250 8915 3252 8914 c 0 - 3281 8901 3326 8899 3334 8899 c 2 - 3335 8899 l 2 - 3354 8899 3366 8909 3376 8920 c 0 - 3400 8946 3403 8961 3431 8997 c 0 - 3436 9002 3451 9019 3456 9024 c 0 - 3482 9047 3494 9053 3538 9064 c 0 - 3569 9072 3596 9071 3614 9071 c 2 - 3619 9071 l 1 - 3646 9075 3672 9068 3694 9051 c 0 - 3703 9044 3709 9041 3713 9040 c 0 - 3722 9035 3725 9034 3738 9031 c 0 - 3753 9028 3761 9028 3777 9028 c 2 - 3780 9028 l 2 - 3793 9031 l 2 - 3796 9032 3807 9035 3810 9035 c 0 - 3836 9041 3860 9038 3881 9027 c 1 - 3881 9027 l 2 - 3928 9014 3957 8976 3957 8928 c 2 - 3957 8612 l 2 - 3957 8590 3951 8572 3939 8554 c 0 - 3937 8552 3932 8544 3931 8542 c 0 - 3894 8480 3870 8357 3852 8312 c 2 - 3852 8312 l 1 - 3851 8311 l 1 - 3851 8310 l 2 - 3850 8308 3848 8303 3847 8301 c 1 - 3847 8301 l 0 - 3840 8287 3809 8247 3796 8239 c 1 - 3796 8239 3793 8241 3786 8230 c 0 - 3775 8212 3778 8207 3776 8172 c 0 - 3776 8171 3776 8167 3776 8165 c 0 - 3776 8164 3776 8159 3776 8157 c 0 - 3777 8132 3771 8111 3756 8090 c 0 - 3739 8068 3734 8041 3734 8019 c 0 - 3734 8006 3737 7986 3745 7954 c 0 - 3753 7919 3745 7888 3722 7862 c 0 - 3716 7855 3709 7849 3702 7844 c 1 - 3633 7291 l 2 - 3630 7271 3623 7253 3612 7238 c 1 - 3568 6823 l 1 - 3611 6802 l 2 - 3623 6796 3635 6790 3652 6785 c 0 - 3655 6784 3666 6781 3669 6780 c 0 - 3686 6776 3687 6776 3713 6776 c 0 - 3714 6776 3716 6776 3716 6776 c 0 - 3734 6776 3748 6780 3760 6784 c 0 - 3761 6785 3773 6790 3776 6792 c 0 - 3793 6802 3790 6800 3793 6803 c 0 - 3798 6808 3810 6821 3815 6826 c 2 - 3819 6831 l 2 - 3834 6847 3852 6858 3871 6863 c 1 - 4057 8141 l 1 - 4087 8323 l 2 - 4091 8343 4098 8359 4112 8374 c 2 - 4123 8387 l 2 - 4139 8405 4156 8415 4180 8420 c 0 - 4189 8422 4198 8425 4208 8432 c 0 - 4213 8435 4226 8446 4229 8450 c 0 - 4265 8485 4288 8503 4304 8514 c 0 - 4331 8533 4354 8543 4376 8551 c 0 - 4438 8573 4410 8555 4531 8601 c 0 - 4554 8610 4576 8612 4599 8605 c 0 - 4674 8583 4776 8586 4796 8585 c 2 - 4826 8585 l 2 - 4854 8585 4877 8576 4895 8558 c 0 - 4909 8548 4916 8546 4937 8544 c 0 - 4938 8544 4940 8544 4941 8544 c 0 - 4946 8544 4946 8544 4948 8544 c 0 - 4958 8545 4965 8549 4972 8552 c 2 - 5018 8571 l 1 - 5007 8579 l 2 - 4976 8601 4961 8634 4965 8672 c 2 - 4974 8766 l 2 - 4975 8771 4975 8776 4977 8781 c 2 - 4985 8813 l 1 - 4905 8833 l 1 - 4394 8814 l 1 - 4354 8796 l 2 - 4321 8782 4289 8784 4259 8802 c 0 - 4229 8820 4212 8848 4210 8883 c 2 - 4204 8969 l 1 - 4201 8975 l 2 - 4191 8994 4164 9096 4107 9172 c 0 - 4099 9182 4105 9175 4094 9188 c 0 - 4085 9198 4077 9206 4072 9210 c 0 - 4068 9213 4067 9214 4065 9215 c 0 - 4058 9220 4053 9223 4048 9226 c 0 - 4031 9236 4023 9238 3998 9239 c 0 - 3937 9239 3890 9239 3852 9239 c 0 - 3851 9239 3848 9239 3846 9239 c 2 - 3772 9239 l 2 - 3727 9239 3716 9238 3707 9237 c 0 - 3697 9236 3686 9234 3674 9228 c 0 - 3669 9226 3655 9219 3650 9217 c 0 - 3646 9215 3636 9211 3632 9210 c 0 - 3623 9207 3594 9203 3585 9203 c 0 - 3583 9203 l 0 - 3537 9203 3474 9220 3426 9220 c 0 - 3407 9220 3377 9220 3377 9220 c 0 - 3373 9220 3350 9220 3343 9219 c 0 - 3316 9216 3292 9203 3278 9171 c 0 - 3264 9139 3271 9149 3258 9118 c 0 - 3245 9087 3221 9066 3192 9058 c 1 - 3192 9053 3191 9048 3189 9042 c 0 -3112 9294 m 1 - 3145 9345 3209 9411 3322 9423 c 0 - 3334 9424 3363 9425 3377 9425 c 0 - 3392 9425 3407 9425 3426 9425 c 0 - 3484 9425 3554 9411 3577 9408 c 1 - 3582 9411 3588 9414 3591 9415 c 0 - 3617 9427 3645 9436 3682 9440 c 0 - 3704 9443 3724 9444 3772 9444 c 2 - 3846 9444 l 2 - 3847 9444 3851 9444 3852 9444 c 0 - 3890 9444 3939 9444 4000 9443 c 0 - 4064 9443 4106 9429 4152 9402 c 0 - 4173 9390 4179 9385 4186 9381 c 0 - 4190 9378 4201 9369 4205 9366 c 0 - 4219 9354 4232 9341 4248 9323 c 0 - 4267 9301 4262 9307 4270 9295 c 0 - 4359 9177 4383 9068 4383 9068 c 2 - 4397 9042 l 2 - 4400 9034 4403 9027 4405 9020 c 1 - 4912 9038 l 2 - 4922 9039 4931 9038 4941 9035 c 2 - 5134 8987 l 2 - 5191 8973 5223 8920 5208 8863 c 2 - 5177 8738 l 1 - 5174 8711 l 1 - 5452 8512 l 2 - 5493 8482 5507 8434 5486 8387 c 0 - 5466 8341 5422 8318 5372 8328 c 2 - 5100 8383 l 1 - 5053 8363 l 2 - 5015 8350 5007 8345 4975 8341 c 0 - 4968 8340 4948 8339 4941 8339 c 0 - 4937 8339 4924 8339 4920 8340 c 0 - 4867 8344 4829 8357 4792 8380 c 1 - 4747 8381 4660 8381 4576 8400 c 1 - 4481 8365 4476 8370 4444 8358 c 0 - 4436 8355 4429 8352 4422 8346 c 0 - 4412 8339 4396 8326 4373 8304 c 0 - 4369 8299 4344 8276 4322 8262 c 0 - 4309 8253 4295 8245 4281 8239 c 1 - 4259 8109 l 1 - 4060 6739 l 2 - 4052 6680 4003 6643 3944 6652 c 2 - 3933 6654 l 1 - 3914 6635 3900 6627 3875 6613 c 0 - 3863 6606 3841 6596 3832 6593 c 0 - 3789 6576 3751 6571 3716 6571 c 0 - 3714 6571 3708 6571 3706 6571 c 0 - 3698 6571 3673 6570 3625 6580 c 0 - 3618 6582 3598 6587 3591 6589 c 0 - 3569 6596 3546 6605 3519 6619 c 2 - 3460 6648 l 1x82d009e4cc301820 - 3447 6650 l 2x84c001e4cc301820 - 3388 6656 3349 6703 3356 6762 c 2 - 3414 7316 l 2 - 3416 7338 3424 7357 3437 7372 c 1 - 3495 7841 l 1 - 3495 7842 l 2 - 3473 7884 3480 7929 3511 7960 c 1 - 3515 7975 3521 7989 3530 8000 c 1 - 3530 8007 3529 8013 3529 8019 c 0 - 3529 8088 3550 8143 3571 8181 c 1 - 3571 8184 l 0 - 3574 8228 3575 8279 3614 8340 c 0 - 3618 8347 3637 8372 3661 8393 c 1 - 3663 8397 3665 8401 3668 8405 c 0 - 3686 8459 3704 8559 3752 8642 c 1 - 3752 8824 l 1 - 3721 8825 3708 8828 3696 8831 c 0 - 3666 8838 3650 8842 3623 8856 c 0 - 3616 8859 3610 8862 3603 8866 c 1 - 3596 8866 3592 8866 3589 8865 c 1 - 3577 8849 3555 8812 3529 8783 c 0 - 3477 8725 3412 8694 3334 8694 c 2 - 3331 8694 l 2 - 3316 8694 3246 8696 3182 8721 c 1 - 3027 8675 l 2 - 2981 8661 2937 8678 2911 8718 c 0 - 2886 8759 2889 8806 2921 8841 c 2 - 3008 8938 l 1 - 3004 8951 l 1 - 2990 8968 2983 8989 2984 9011 c 1 - 2977 9033 l 2 - 2974 9041 2972 9049 2971 9057 c 1 - 2861 9197 l 2 - 2830 9236 2830 9285 2861 9324 c 0 - 2891 9363 2939 9374 2984 9353 c 2 - 3112 9294 l 1 -3795 8293 m 0 - 3827 8335 3879 8346 3925 8320 c 2 - 3932 8316 l 2 - 3972 8295 3991 8256 3984 8212 c 2 - 3979 8176 l 2 - 3978 8168 3977 8162 3974 8155 c 1 - 3990 8146 3996 8126 3987 8111 c 0 - 3978 8095 3958 8089 3942 8098 c 1 - 3923 8081 l 2 - 3881 8044 3825 8045 3785 8083 c 0 - 3781 8086 3771 8096 3767 8099 c 0 - 3745 8120 3735 8145 3735 8175 c 2 - 3735 8177 l 2 - 3735 8184 3736 8204 3737 8210 c 0 - 3741 8239 3756 8262 3780 8279 c 0 - 3785 8283 3786 8283 3790 8288 c 0 - 3791 8289 3792 8289 3795 8293 c 0 -16159 6864 m 1 - 16071 6846 l 2 - 16060 6844 16050 6843 16039 6845 c 2 - 15704 6885 l 2 - 15681 6888 15662 6896 15647 6909 c 1 - 15602 6916 l 2 - 15590 6918 15552 6920 15494 6955 c 0 - 15365 7034 15284 7198 15269 7364 c 0 - 15268 7370 15268 7375 15269 7381 c 2 - 15318 8043 l 2 - 15320 8059 15324 8072 15332 8086 c 2 - 15385 8179 l 2 - 15400 8206 15423 8222 15454 8229 c 2 - 15719 8281 l 2 - 15738 8285 15756 8284 15772 8279 c 1 - 15796 8293 15825 8296 15854 8287 c 0 - 15861 8285 15882 8276 15888 8272 c 0 - 15970 8228 15994 8174 16076 8129 c 0 - 16079 8128 16087 8123 16091 8121 c 0 - 16094 8121 16095 8118 16112 8114 c 0 - 16115 8113 16123 8112 16128 8110 c 0 - 16133 8109 16138 8108 16146 8106 c 2 - 16207 8106 l 2 - 16213 8106 16218 8106 16223 8105 c 0 - 16228 8106 16233 8106 16238 8106 c 2 - 16253 8106 l 1 - 16256 8111 16259 8116 16263 8121 c 1 - 16252 8144 l 2 - 16244 8159 16241 8173 16241 8190 c 2 - 16241 8247 l 2 - 16241 8299 16274 8338 16325 8348 c 2 - 16330 8349 l 1 - 16334 8362 16342 8373 16354 8382 c 0 - 16385 8407 16431 8402 16456 8371 c 1 - 16457 8371 16460 8370 16461 8370 c 0 - 16468 8369 16473 8368 16479 8366 c 2 - 16524 8353 l 2 - 16532 8351 16539 8348 16546 8344 c 2 - 16595 8315 l 2 - 16602 8311 16608 8307 16613 8302 c 0 - 16622 8296 16630 8288 16636 8280 c 2 - 16759 8160 l 2 - 16780 8140 16790 8116 16790 8086 c 0 - 16789 8058 16789 8058 16789 8039 c 0 - 16789 7889 16800 7738 16808 7663 c 2 - 16811 7640 l 2 - 16812 7632 16812 7626 16811 7618 c 2 - 16760 7123 l 2 - 16757 7100 16750 7081 16734 7065 c 0 - 16704 7036 16708 7040 16688 7026 c 0 - 16593 6962 16505 6955 16348 6873 c 0 - 16336 6867 16296 6852 16259 6841 c 0 - 16230 6832 16203 6835 16177 6851 c 0 - 16170 6855 16164 6859 16159 6864 c 1 -15687 8066 m 1 - 15539 8037 l 1 - 15521 8005 l 1 - 15474 7375 l 1 - 15488 7246 15551 7160 15600 7131 c 0 - 15612 7123 15617 7122 15632 7118 c 2 - 15733 7103 l 2 - 15753 7100 15770 7093 15784 7082 c 1 - 16047 7050 l 1 - 16201 7081 l 2 - 16230 7087 16256 7081 16278 7067 c 1 - 16409 7133 16504 7156 16560 7188 c 1 - 16606 7629 l 1 - 16605 7642 l 2 - 16593 7750 16584 7904 16584 8039 c 2 - 16584 8045 l 1 - 16510 8117 l 1 - 16504 8118 16498 8119 16492 8121 c 1 - 16512 8071 16494 8018 16445 7993 c 1 - 16440 7939 16399 7901 16343 7901 c 2 - 16262 7901 l 1 - 16259 7900 l 2 - 16226 7883 16190 7884 16162 7901 c 1 - 16139 7901 l 2 - 16134 7901 16130 7901 16126 7902 c 2 - 16116 7903 l 2 - 16112 7904 16109 7904 16106 7905 c 0 - 16096 7908 16087 7910 16083 7911 c 0 - 16078 7912 16069 7914 16066 7915 c 0 - 16042 7920 16042 7921 16007 7935 c 0 - 16001 7937 15983 7946 15977 7950 c 0 - 15910 7986 15868 8027 15835 8057 c 1 - 15811 8035 15783 8026 15750 8031 c 0 - 15724 8035 15703 8047 15687 8066 c 1 -16387 8803 m 2 - 16419 8852 16479 8865 16528 8833 c 2 - 17039 8501 l 2 - 17066 8484 17081 8459 17085 8428 c 2 - 17087 8407 l 1 - 17093 8399 17100 8387 17106 8376 c 1 - 17149 8354 l 1 - 17162 8353 l 2 - 17220 8347 17259 8299 17252 8240 c 2 - 17204 7807 l 1 - 17143 7226 l 1 - 17186 7194 17196 7139 17167 7092 c 2 - 17121 7016 l 1 - 17120 7006 l 2 - 17116 6968 17094 6938 17064 6924 c 1 - 16957 6750 l 2 - 16953 6743 16949 6738 16943 6732 c 2 - 16803 6592 l 1 - 16806 6541 16773 6498 16720 6488 c 2 - 16686 6481 l 1 - 16667 6471 16646 6467 16626 6469 c 1 - 16619 6468 l 2 - 16508 6446 16405 6445 16317 6445 c 1 - 16312 6443 l 1 - 16300 6400 16262 6371 16214 6371 c 2 - 16170 6371 l 1 - 16130 6351 l 2 - 16086 6330 16039 6339 16009 6373 c 1 - 15657 6400 l 1 - 15637 6389 15612 6386 15587 6392 c 2 - 15494 6412 l 1 - 15438 6417 l 2 - 15400 6420 15371 6439 15355 6468 c 2 - 15157 6580 15137 6757 15088 6838 c 1 - 15062 6854 l 2 - 15043 6865 15030 6879 15021 6899 c 2 - 14795 7402 l 2 - 14773 7451 14789 7503 14832 7530 c 1x84c411e4cc303820 - 14828 7629 14815 7731 14815 7861 c 0 - 14815 7986 14830 8131 14895 8275 c 1 - 14859 8315 14859 8372 14896 8413 c 2 - 14948 8470 l 1 - 14948 8530 l 2 - 14948 8589 14992 8632 15051 8632 c 2 - 15114 8632 l 1 - 15118 8634 l 1 - 15238 8694 l 1 - 15237 8736 15260 8772 15298 8788 c 1 - 15328 8844 l 2 - 15350 8886 15391 8905 15437 8897 c 0 - 15481 8889 15512 8859 15520 8815 c 1 - 15525 8814 l 2 - 15530 8814 15547 8811 15553 8810 c 0 - 15559 8809 15578 8804 15585 8801 c 0 - 15589 8800 15595 8796 15603 8794 c 0 - 15647 8786 15643 8788 15655 8785 c 0 - 15678 8779 15697 8771 15715 8763 c 1 - 15948 8768 l 1 - 15960 8777 15975 8784 15991 8787 c 0 - 16021 8794 16050 8788 16072 8771 c 1 - 16371 8778 l 1x84c411e4cc305820 - 16387 8803 l 2 -17039 8181 m 1 - 16982 8209 l 2 - 16958 8221 16941 8240 16932 8266 c 0 - 16932 8267 16930 8270 16930 8271 c 0 - 16929 8273 16922 8286 16920 8289 c 0 - 16918 8291 16914 8298 16912 8300 c 0 - 16898 8316 16890 8334 16887 8355 c 1 - 16501 8606 l 1 - 16483 8586 16459 8575 16430 8575 c 2 - 16028 8565 l 1 - 16020 8565 l 2 - 16011 8565 l 2 - 15691 8557 l 2 - 15670 8557 15652 8562 15634 8573 c 0 - 15619 8583 15612 8584 15606 8586 c 0 - 15597 8588 15592 8589 15558 8594 c 0 - 15546 8596 15537 8599 15526 8605 c 0 - 15513 8611 15521 8607 15520 8607 c 0 - 15513 8609 15514 8609 15512 8609 c 0 - 15506 8610 15505 8610 15502 8611 c 0 - 15496 8611 15481 8612 15471 8613 c 0 - 15469 8613 15462 8612 15459 8611 c 2 - 15449 8609 l 2 - 15444 8608 15439 8608 15435 8608 c 1 - 15419 8577 l 2 - 15408 8557 15394 8544 15374 8534 c 2 - 15249 8471 l 1 - 15247 8468 15245 8465 15242 8462 c 0 - 15222 8439 15196 8428 15165 8428 c 2 - 15153 8428 l 1 - 15153 8402 15144 8380 15126 8361 c 2 - 15113 8346 l 1 - 15129 8315 15129 8279 15110 8247 c 0 - 15038 8122 15020 7990 15020 7861 c 0x84c401e4cc305820 - 15020 7727 15039 7597 15039 7472 c 2 - 15039 7465 l 2 - 15039 7442 15032 7421 15019 7404 c 1 - 15195 7013 l 1 - 15206 7006 l 2 - 15232 6990 15248 6968 15258 6953 c 0 - 15332 6838 15324 6703 15488 6631 c 0 - 15497 6627 15505 6622 15512 6616 c 1 - 15517 6616 l 2 - 15522 6616 15527 6615 15532 6614 c 2 - 15578 6604 l 1 - 15591 6608 15605 6609 15620 6608 c 2 - 16037 6576 l 1 - 16069 6576 l 2 - 16083 6576 16096 6574 16108 6569 c 1 - 16117 6573 16127 6575 16137 6576 c 1 - 16145 6585 16156 6593 16168 6600 c 2 - 16247 6639 l 2 - 16262 6647 16276 6650 16293 6650 c 2 - 16300 6650 l 2 - 16392 6650 16485 6651 16580 6669 c 2 - 16601 6673 l 1 - 16606 6682 16612 6691 16620 6699 c 2 - 16789 6868 l 1 - 16915 7072 l 2 - 16918 7077 16922 7082 16926 7087 c 2 - 16928 7092 16931 7098 16934 7103 c 2 - 16945 7121 l 1 - 16934 7140 16930 7161 16932 7184 c 2 - 17000 7829 l 1 - 17039 8181 l 1 -10755 10087 m 0 - 10753 10087 10745 10087 10742 10086 c 0 - 10729 10085 10717 10086 10705 10089 c 1 - 10697 10079 10687 10069 10675 10062 c 0 - 10672 10060 10664 10054 10661 10052 c 0 - 10648 10043 10637 10033 10623 10018 c 0 - 10612 10007 10600 9999 10588 9994 c 1 - 10565 9958 l 1 - 10561 9952 l 1 - 10559 9948 l 2 - 10556 9942 l 0 - 10464 9758 10465 9164 10465 8841 c 0 - 10465 8795 10465 8752 10465 8712 c 2 - 10465 8679 l 2 - 10465 8631 10437 8593 10391 8580 c 2 - 10387 8579 l 2 - 10377 8576 10369 8575 10359 8575 c 0 - 10315 8575 10226 8575 10189 8577 c 0 - 10171 8578 10157 8582 10141 8591 c 0 - 10113 8609 10080 8625 9970 8657 c 0 - 9962 8659 9955 8662 9949 8666 c 1 - 9943 8666 9938 8667 9932 8668 c 1 - 9925 8644 9911 8627 9890 8614 c 0 - 9830 8575 9786 8533 9770 8499 c 0 - 9761 8481 9760 8473 9760 8455 c 0 - 9760 8453 l 0 - 9760 8449 9760 8448 9760 8446 c 0 - 9761 8437 9761 8437 9765 8424 c 0 - 9769 8412 9771 8410 9773 8407 c 0 - 9777 8402 9789 8386 9793 8381 c 0 - 9796 8377 9798 8377 9800 8375 c 0 - 9875 8307 9999 8288 10154 8223 c 0 - 10165 8219 10196 8205 10207 8201 c 0 - 10209 8201 10214 8199 10216 8199 c 0 - 10219 8198 10239 8195 10245 8195 c 2 - 10246 8195 l 2 - 10271 8195 10285 8205 10294 8212 c 0 - 10326 8240 10366 8245 10404 8227 c 0 - 10442 8210 10464 8175 10463 8133 c 0 - 10460 7958 10454 7852 10446 7783 c 1 - 10494 7774 10527 7736 10529 7686 c 2 - 10551 7136 l 2 - 10552 7104 10541 7077 10517 7056 c 0 - 10493 7034 10466 7026 10434 7030 c 2 - 10428 7031 l 2 - 10382 7038 10349 7070 10342 7115 c 1 - 10215 7115 l 1 - 10204 7106 10191 7100 10176 7096 c 1 - 10128 7051 l 2 - 10107 7031 10082 7022 10052 7023 c 2 - 10013 7026 l 1 - 10013 7025 l 2 - 10012 7004 10007 6981 9995 6956 c 0 - 9992 6948 9986 6939 9984 6936 c 0 - 9981 6930 9975 6921 9972 6918 c 0 - 9969 6913 9963 6905 9960 6902 c 0 - 9941 6878 9945 6888 9891 6826 c 0 - 9866 6797 9833 6785 9795 6791 c 0 - 9758 6798 9730 6820 9717 6856 c 0 - 9716 6858 9719 6856 9716 6860 c 2 - 9703 6879 l 2 - 9697 6887 9693 6896 9690 6904 c 1 - 9677 6903 9664 6904 9651 6907 c 0 - 9633 6912 9614 6914 9590 6915 c 0 - 9577 6915 9565 6918 9554 6922 c 1 - 9552 6921 9550 6921 9547 6920 c 1 - 9527 6910 9506 6907 9483 6912 c 1 - 9451 6837 l 2 - 9447 6828 9442 6820 9436 6812 c 2 - 9426 6801 l 2 - 9415 6788 9404 6779 9388 6773 c 0 - 9360 6760 9245 6712 9245 6712 c 1 - 9196 6692 l 2 - 9141 6670 9085 6693 9063 6748 c 0 - 9040 6802 9017 6861 8985 6921 c 0 - 8977 6938 8973 6953 8974 6972 c 2x80c401e4edb01820 - 9009 7929 l 2 - 9010 7947 9014 7961 9023 7977 c 2 - 9047 8019 l 2 - 9114 8134 9191 8207 9335 8342 c 2 - 9342 8348 l 1 - 9431 8597 l 2 - 9439 8620 9452 8637 9469 8649 c 1 - 9483 8689 l 2 - 9483 8690 9486 8701 9486 8705 c 0 - 9486 8706 9485 8711 9485 8712 c 0 - 9484 8714 9484 8716 9484 8717 c 0 - 9481 8726 l 0 - 9462 8786 9397 8873 9303 8951 c 0 - 9284 8966 9273 8984 9268 9006 c 1 - 9266 9006 l 2 - 9237 9008 9213 9021 9195 9044 c 1 - 9173 9034 9149 9033 9125 9040 c 0 - 9116 9043 9103 9046 9082 9051 c 0 - 9076 9052 9081 9050 9081 9050 c 0 - 9051 9050 9041 9038 8980 9038 c 0x80c409e4dc301820 - 8934 9038 8855 9045 8718 9072 c 0 - 8670 9081 8619 9082 8594 9082 c 0 - 8376 9082 8155 9020 8128 9017 c 0 - 7892 8986 7722 8972 7627 8807 c 0 - 7618 8792 7607 8780 7594 8771 c 1x80c405e4dc301820 - 7594 8767 l 2 - 7594 8762 7594 8757 7593 8752 c 0 - 7594 8747 7594 8742 7594 8737 c 2 - 7594 8696 l 1 - 7617 8684 l 2 - 7659 8662 7705 8654 7749 8654 c 0x80c801e4dc301820 - 7879 8654 7949 8698 7997 8716 c 1 - 7997 8717 l 1 - 8154 8768 8230 8778 8290 8778 c 0 - 8325 8778 8412 8770 8465 8770 c 2 - 8471 8770 l 2 - 8531 8770 8519 8771 8525 8771 c 0 - 8542 8773 8555 8779 8565 8786 c 0 - 8573 8792 8580 8795 8589 8799 c 0 - 8641 8819 8706 8844 8767 8844 c 0 - 8770 8844 8778 8844 8781 8843 c 0 - 8926 8832 8952 8837 9043 8813 c 0 - 9095 8799 9125 8753 9118 8700 c 0 - 9110 8644 9105 8625 9099 8607 c 0 - 9093 8589 9084 8575 9070 8562 c 0 - 8993 8494 8952 8457 8778 8144 c 2 - 8777 8142 l 1 - 8738 8032 l 2 - 8726 7998 8700 7975 8665 7967 c 2 - 8585 7948 l 2 - 8573 7946 8563 7945 8550 7946 c 2 - 8537 7948 l 1 - 8525 7938 8510 7931 8493 7927 c 2 - 8379 7900 l 2 - 8350 7893 8323 7898 8298 7915 c 2 - 8295 7917 l 1 - 8283 7902 l 2 - 8282 7900 l 1 - 8237 7840 l 2 - 8222 7821 8203 7808 8183 7803 c 1 - 8087 7623 l 1 - 7985 6992 l 1 - 7999 6977 8008 6959 8012 6937 c 0 - 8042 6777 8126 6569 8130 6563 c 0 - 8130 6562 8131 6561 8131 6561 c 0 - 8202 6451 8501 6078 8958 6060 c 2 - 8962 6060 l 1 - 9142 6060 l 1xc0c411e4dc301820 - 9231 6143 l 2 - 9251 6161 9273 6170 9300 6171 c 0 - 9443 6172 9516 6263 9574 6263 c 2 - 9595 6263 l 1 - 9683 6345 l 2 - 9690 6352 9698 6357 9707 6362 c 2 - 9710 6364 l 1 - 9730 6397 9768 6416 9811 6410 c 2 - 9826 6408 l 1 - 9972 6527 l 2 - 9983 6537 9994 6543 10009 6547 c 2 - 10061 6562 l 1 - 10063 6588 10076 6613 10098 6632 c 2 - 10160 6682 l 2 - 10211 6730 10214 6737 10221 6739 c 1 - 10350 6864 l 1 - 10388 6902 l 2 - 10419 6932 10458 6940 10498 6925 c 0 - 10538 6909 10561 6876 10563 6834 c 2 - 10580 6414 l 2 - 10587 6369 10681 6221 10695 6199 c 0 - 10718 6161 10715 6116 10690 6084 c 1 - 10822 5877 l 1 - 10823 5874 l 2 - 10856 5823 10942 5733 11163 5728 c 0 - 11215 5727 11262 5726 11306 5726 c 0 - 11380 5726 11476 5731 11551 5786 c 0 - 11562 5794 11573 5800 11585 5803 c 1 - 11588 5809 l 2 - 11594 5820 11600 5829 11609 5837 c 2 - 11615 5843 l 1 - 11616 5857 11620 5871 11627 5885 c 2 - 11671 5973 l 2 - 11677 5985 11684 5993 11693 6002 c 0 - 11948 6237 12095 6621 12148 6786 c 0 - 12153 6800 12160 6813 12169 6823 c 1 - 12169 6833 l 2 - 12169 6847 12171 6857 12175 6870 c 2 - 12177 6875 l 1 - 12172 6888 12169 6902 12169 6918 c 2 - 12169 7177 l 1 - 12140 7187 12118 7210 12109 7240 c 1 - 12097 7234 12084 7230 12069 7229 c 0 - 11992 7224 11983 7171 11983 7162 c 0 - 11983 7159 11983 7151 11983 7149 c 0 - 11984 7139 11983 7130 11981 7121 c 1 - 11999 7103 12010 7078 12010 7048 c 2 - 12010 6823 l 2 - 12010 6808 12007 6794 12000 6780 c 0 - 11891 6547 11585 6427 11473 6185 c 0 - 11464 6163 11449 6148 11428 6137 c 2 - 11295 6067 l 1 - 11290 6051 11281 6038 11268 6025 c 2 - 11224 5985 l 2 - 11199 5962 11169 5953 11136 5959 c 0 - 11103 5966 11078 5984 11063 6015 c 2 - 10913 6321 l 2 - 10910 6328 10908 6334 10906 6341 c 2 - 10829 6645 l 2 - 10827 6653 10826 6661 10826 6669 c 2 - 10817 8173 l 2 - 10817 8206 10829 8232 10854 8253 c 0 - 10879 8273 10907 8281 10939 8274 c 0 - 10970 8268 11003 8263 11019 8263 c 0 - 11028 8263 11046 8264 11065 8269 c 0 - 11074 8271 11082 8272 11091 8272 c 2 - 11281 8272 l 2 - 11296 8272 11310 8269 11322 8264 c 1 - 11373 8271 l 2 - 11377 8272 11381 8272 11386 8272 c 2 - 11465 8272 l 1 - 11475 8274 11485 8275 11495 8274 c 0 - 11556 8271 11612 8265 11679 8265 c 0 - 11697 8265 11725 8266 11753 8269 c 0 - 11918 8289 11948 8368 11956 8426 c 0 - 11958 8439 11961 8450 11966 8460 c 1 - 11963 8471 l 2 - 11960 8480 11958 8487 11958 8496 c 2 - 11956 8524 l 2 - 11956 8531 11956 8537 11957 8544 c 1 - 11941 8556 11930 8572 11923 8592 c 2 - 11898 8671 l 1 - 11897 8671 l 2 - 11865 8658 11833 8661 11804 8680 c 0 - 11796 8685 11786 8688 11766 8699 c 1 - 11756 8701 11737 8704 11731 8704 c 2 - 11728 8704 l 2x90c081e4dc701820 - 11640 8704 11495 8630 11437 8630 c 0x80c201e4dc701820 - 11421 8630 11314 8630 11284 8634 c 0 - 11273 8636 11265 8638 11256 8642 c 0 - 11184 8676 11121 8691 11066 8691 c 0 - 11017 8691 10979 8681 10943 8671 c 0 - 10911 8662 10880 8668 10854 8688 c 0 - 10827 8708 10813 8736 10813 8769 c 2 - 10806 9885 l 2 - 10806 9905 10811 9923 10821 9939 c 1 - 10811 9955 10806 9972 10806 9993 c 2 - 10805 10082 l 1x80c101e4ccb01820 - 10769 10086 l 2 - 10764 10086 10758 10087 10755 10087 c 0 -10780 10290 m 2 - 10784 10290 10787 10290 10791 10290 c 2 - 10918 10276 l 2 - 10972 10270 11009 10229 11009 10174 c 2 - 11010 10037 l 1 - 11103 9946 l 2 - 11135 9914 11143 9871 11124 9830 c 0 - 11105 9788 11067 9767 11021 9771 c 2 - 11012 9772 l 1 - 11017 8894 l 1 - 11033 8895 11049 8896 11066 8896 c 0x80c105e4ccb01820 - 11153 8896 11239 8874 11325 8836 c 1 - 11352 8835 11416 8835 11437 8835 c 0x80c201e4ccb01820 - 11466 8835 11571 8909 11729 8909 c 2 - 11733 8909 l 2 - 11764 8908 11817 8898 11837 8891 c 0 - 11844 8889 11849 8887 11855 8883 c 0 - 11858 8882 11861 8880 11865 8878 c 1 - 11924 8902 l 2 - 11951 8912 11978 8912 12005 8899 c 0 - 12032 8886 12050 8866 12059 8838 c 2 - 12103 8701 l 1 - 12194 8664 l 2 - 12235 8647 12258 8612 12258 8568 c 0 - 12258 8524 12234 8490 12193 8473 c 2 - 12179 8468 l 1 - 12184 8451 l 2 - 12194 8423 12191 8396 12177 8370 c 0 - 12168 8355 12158 8343 12145 8335 c 1 - 12106 8207 11999 8092 11776 8066 c 0 - 11737 8061 11702 8061 11679 8061 c 0 - 11612 8061 11559 8065 11508 8068 c 0 - 11503 8068 11497 8067 11490 8067 c 2 - 11393 8067 l 1 - 11298 8054 l 2 - 11272 8050 11249 8055 11229 8067 c 1 - 11103 8067 l 1 - 11068 8060 11039 8058 11022 8058 c 1 - 11031 6683 l 1 - 11102 6402 l 1 - 11182 6238 l 1 - 11303 6303 l 1 - 11441 6564 11715 6691 11805 6848 c 1 - 11805 6948 l 1 - 11733 6949 l 2 - 11686 6950 11649 6978 11636 7024 c 0 - 11623 7069 11640 7112 11680 7138 c 2 - 11783 7204 l 1 - 11799 7290 11865 7394 11999 7425 c 1 - 12120 7624 l 2 - 12145 7665 12188 7683 12235 7670 c 0 - 12281 7657 12310 7619 12310 7571 c 2 - 12310 7368 l 1 - 12348 7354 12374 7318 12374 7272 c 2 - 12374 6982 l 1 - 12381 6974 12387 6966 12392 6956 c 0 - 12405 6929 12407 6902 12396 6873 c 2 - 12374 6815 l 1 - 12374 6754 l 2 - 12374 6715 12354 6682 12323 6665 c 1 - 12262 6489 12109 6116 11846 5865 c 1 - 11839 5850 l 1 - 11841 5842 11842 5833 11843 5824 c 0 - 11844 5793 11833 5767 11811 5746 c 2 - 11763 5701 l 1 - 11735 5645 l 2 - 11713 5602 11670 5581 11625 5590 c 1 - 11566 5555 11474 5522 11306 5522 c 0 - 11259 5522 11212 5522 11159 5524 c 0 - 10862 5530 10715 5663 10650 5765 c 2 - 10648 5768 l 1 - 10465 6055 l 2 - 10440 6095 10443 6141 10471 6174 c 1 - 10408 6280 10386 6332 10378 6382 c 2 - 10377 6388 l 2 - 10376 6392 10376 6396 10376 6400 c 2 - 10374 6439 l 1 - 10369 6437 10364 6435 10358 6434 c 2 - 10085 6356 l 1 - 9922 6222 l 2 - 9899 6203 9873 6195 9843 6199 c 2 - 9836 6200 l 1 - 9831 6197 9822 6192 9813 6187 c 1 - 9707 6087 l 2 - 9687 6069 9665 6060 9639 6059 c 2 - 9576 6058 l 1 - 9576 6058 9602 5977 9343 5967 c 1x90c081e4cc701820 - 9253 5883 l 2 - 9233 5864 9210 5855 9183 5855 c 2 - 8955 5855 l 2 - 8381 5878 8023 6350 7959 6450 c 0 - 7958 6452 7954 6457 7953 6459 c 0 - 7921 6513 7859 6701 7826 6831 c 1 - 7785 6850 7761 6892 7769 6941 c 2 - 7887 7673 l 2 - 7889 7684 7893 7694 7898 7704 c 2 - 8037 7964 l 2 - 8053 7995 8081 8014 8112 8018 c 1 - 8117 8027 8124 8035 8132 8041 c 1 - 8190 8118 l 2 - 8225 8163 8282 8172 8329 8141 c 2 - 8375 8110 l 1 - 8386 8112 l 1 - 8405 8146 8443 8165 8486 8160 c 2 - 8556 8152 l 1 - 8564 8154 l 1 - 8587 8218 l 2 - 8588 8224 8590 8228 8593 8233 c 2 - 8598 8243 l 2 - 8726 8472 8794 8571 8849 8633 c 1 - 8827 8635 8800 8637 8765 8639 c 0 - 8746 8638 8710 8626 8674 8612 c 1 - 8632 8585 8588 8573 8550 8568 c 0 - 8536 8566 8538 8565 8472 8565 c 2 - 8465 8565 l 2 - 8395 8565 8325 8574 8290 8574 c 0 - 8255 8574 8210 8571 8060 8522 c 0 - 8049 8519 8040 8517 8029 8517 c 0 - 8001 8517 8045 8449 7749 8449 c 0 - 7683 8449 7601 8460 7520 8504 c 2 - 7443 8545 l 2 - 7408 8564 7389 8596 7389 8635 c 2 - 7389 8691 l 1 - 7372 8719 7371 8755 7388 8789 c 2 - 7389 8791 l 1 - 7389 8858 l 2 - 7389 8914 7428 8955 7482 8960 c 1 - 7649 9188 7935 9198 8101 9220 c 0 - 8101 9220 8345 9287 8594 9287 c 0xc0c905e4cc701820 - 8627 9287 8694 9285 8758 9272 c 0 - 8886 9247 8955 9242 8980 9242 c 0x80c009e4cc701820 - 9000 9242 9031 9255 9081 9255 c 0 - 9091 9255 9120 9252 9130 9250 c 2 - 9134 9249 l 1 - 9157 9265 l 2 - 9199 9294 9250 9291 9285 9257 c 1 - 9299 9269 l 2 - 9330 9298 9370 9305 9409 9287 c 0x80c005e4cc701820 - 9448 9270 9470 9236 9470 9194 c 2 - 9470 9077 l 1 - 9530 9022 9614 8933 9659 8832 c 1 - 9692 8806 9706 8764 9692 8720 c 1 - 9712 8738 9731 8753 9748 8765 c 1 - 9766 8824 l 2 - 9784 8879 9836 8908 9892 8892 c 2 - 9941 8878 l 1 - 9987 8898 10036 8884 10064 8843 c 1 - 10149 8817 10192 8798 10223 8780 c 1 - 10234 8780 10246 8780 10260 8780 c 1 - 10260 8800 10260 8820 10260 8841 c 0 - 10260 9359 10271 9785 10357 9998 c 2 - 10359 10020 10368 10041 10384 10059 c 2 - 10392 10068 l 1 - 10448 10155 l 2 - 10466 10181 10491 10197 10518 10201 c 1 - 10517 10313 l 2 - 10517 10358 10541 10393 10583 10409 c 0 - 10624 10425 10666 10415 10696 10382 c 2 - 10778 10290 l 1 - 10780 10290 l 2 -10327 7590 m 1 - 10322 7590 l 2 - 10262 7596 10224 7645 10231 7704 c 2 - 10243 7806 l 2 - 10248 7851 10252 7914 10255 7990 c 1 - 10246 7990 l 2 - 10243 7990 l 2 - 10219 7990 10179 7997 10163 8001 c 0 - 10160 8002 10148 8005 10145 8006 c 0 - 10116 8015 10117 8017 10075 8034 c 0 - 9927 8096 9772 8123 9661 8225 c 0 - 9655 8230 9637 8248 9632 8255 c 0 - 9626 8262 9611 8282 9606 8289 c 0 - 9593 8307 9582 8324 9573 8353 c 2 - 9567 8371 l 1 - 9527 8256 l 2 - 9521 8240 9513 8228 9500 8216 c 2 - 9475 8192 l 2 - 9329 8055 9274 8001 9224 7916 c 2 - 9213 7896 l 1x80c001e4dc301820 - 9179 6991 l 1x80c001e4ec301820 - 9192 6967 9202 6943 9212 6920 c 1 - 9275 6947 l 1 - 9331 7078 l 2 - 9350 7121 9389 7145 9433 7140 c 1 - 9443 7154 9457 7166 9474 7174 c 0 - 9512 7192 9552 7186 9584 7159 c 2 - 9634 7117 l 1 - 9644 7116 9655 7115 9667 7113 c 1 - 9716 7134 l 2 - 9733 7141 9750 7144 9767 7142 c 1 - 9819 7164 l 1 - 9832 7209 9873 7239 9924 7236 c 2 - 10020 7230 l 1 - 10036 7245 l 1 - 10042 7262 10054 7277 10071 7290 c 2 - 10085 7300 l 2 - 10107 7316 10131 7322 10156 7320 c 2 - 10159 7320 l 1 - 10338 7320 l 1 - 10327 7590 l 1 -18088 8116 m 2 - 18139 8112 l 2 - 18152 8111 18163 8108 18175 8102 c 2 - 18201 8089 l 2 - 18256 8063 18276 8002 18247 7948 c 0 - 18217 7893 18190 7823 18190 7739 c 0 - 18190 7736 18190 7725 18191 7721 c 2 - 18194 7643 l 2 - 18195 7623 18191 7607 18182 7589 c 2 - 17980 7219 l 2 - 17976 7212 17972 7206 17967 7200 c 0 - 17962 7195 17958 7189 17954 7182 c 0 - 17935 7146 17936 7098 17935 7076 c 0 - 17935 7074 17935 7068 17935 7065 c 0 - 17935 7033 17937 7018 17937 6986 c 0 - 17938 6945 17918 6912 17882 6894 c 0 - 17869 6888 17857 6884 17844 6883 c 1 - 17676 6651 l 1 - 17668 6605 17634 6573 17587 6567 c 0 - 17585 6567 17581 6567 17580 6567 c 0 - 17575 6566 17559 6565 17554 6565 c 0 - 17549 6565 17536 6566 17531 6566 c 0 - 17528 6566 17518 6566 17514 6566 c 0 - 17480 6567 17452 6582 17433 6611 c 0 - 17414 6639 17410 6671 17421 6703 c 2 - 17697 7465 l 1 - 17697 7619 17852 7788 17910 7891 c 0 - 17925 7919 17948 7936 17977 7942 c 1 - 17977 7946 l 2 - 17977 8012 l 0x80c001e4cc301b20 - 17976 8042 17987 8068 18009 8089 c 0 - 18031 8110 18057 8119 18088 8116 c 2 -2196 9536 m 0 - 2197 9554 2203 9572 2215 9588 c 2 - 2225 9604 l 2 - 2229 9609 2233 9614 2238 9619 c 2 - 2246 9627 l 2 - 2288 9669 2349 9669 2391 9627 c 2 - 2402 9617 l 1 - 2421 9611 2438 9599 2450 9583 c 1 - 2475 9561 2487 9529 2483 9493 c 0 - 2476 9442 2438 9407 2386 9404 c 2 - 2377 9404 l 1 - 2355 9395 2333 9394 2311 9401 c 2 - 2284 9401 2260 9411 2240 9431 c 2 - 2224 9447 l 2 - 2200 9472 2190 9504 2196 9536 c 0 -2339 9585 m 1 - 2339 9595 l 1 - 2339 9607 l 2 - 2341 9654 2369 9689 2414 9702 c 0 - 2454 9713 2492 9702 2518 9672 c 1 - 2529 9664 2538 9654 2546 9641 c 2 - 2550 9634 l 2 - 2555 9625 2559 9617 2561 9608 c 1 - 2566 9601 l 2 - 2570 9595 2574 9588 2576 9582 c 0 - 2602 9544 2600 9499 2572 9462 c 2 - 2568 9458 l 2 - 2568 9458 2568 9458 2568 9457 c 0 - 2567 9457 2567 9456 2566 9455 c 0 - 2560 9448 l 2 - 2541 9424 2516 9411 2485 9409 c 2x80c001eccc301820 - 2446 9407 l 2 - 2440 9407 l 0 - 2437 9407 2435 9407 2433 9406 c 2 - 2428 9406 l 2 - 2387 9404 2353 9423 2333 9460 c 2 - 2327 9470 l 2 - 2309 9503 2310 9539 2329 9571 c 0 - 2332 9576 2335 9581 2339 9585 c 1 -2342 9476 m 2 - 2298 9476 2264 9499 2247 9539 c 0 - 2230 9579 2239 9620 2269 9650 c 2 - 2310 9691 l 2 - 2341 9722 2381 9730 2422 9713 c 0 - 2462 9697 2485 9662 2485 9619 c 2 - 2485 9578 l 2 - 2485 9519 2442 9476 2382 9476 c 2 - 2342 9476 l 2 -2312 9425 m 2 - 2265 9444 2241 9489 2251 9539 c 0 - 2261 9589 2300 9622 2351 9622 c 2 - 2354 9622 l 2 - 2383 9622 2407 9612 2427 9592 c 2 - 2429 9589 l 2 - 2465 9553 2470 9502 2442 9460 c 0 - 2413 9417 2365 9403 2318 9422 c 2 - 2312 9425 l 2 -2404 9419 m 2 - 2388 9409 2372 9403 2353 9402 c 2 - 2339 9402 l 2 - 2314 9400 2292 9407 2272 9423 c 2 - 2252 9438 l 2 - 2216 9466 2203 9508 2217 9552 c 0 - 2232 9596 2268 9622 2314 9622 c 2 - 2351 9622 l 2 - 2365 9622 2377 9619 2390 9614 c 2 - 2396 9611 l 2 - 2409 9606 2419 9599 2429 9589 c 2 - 2433 9586 l 2 - 2456 9563 2465 9535 2462 9503 c 0 - 2459 9471 2444 9446 2417 9428 c 2 - 2404 9419 l 2 -2492 9488 m 1 - 2463 9483 2434 9491 2409 9513 c 0 - 2408 9514 2404 9517 2402 9518 c 0 - 2374 9539 2360 9569 2361 9601 c 1 - 2346 9618 2339 9639 2339 9662 c 1 - 2337 9662 l 1 - 2217 9662 l 2 - 2193 9662 2171 9670 2154 9683 c 1 - 2141 9665 2123 9652 2099 9645 c 0 - 2083 9640 2076 9637 2073 9636 c 0 - 2058 9629 2044 9625 2027 9625 c 2 - 2002 9626 l 1 - 1985 9615 1967 9612 1953 9622 c 1 - 1939 9620 1925 9621 1913 9625 c 2 - 1883 9624 1854 9658 1829 9667 c 0 - 1820 9670 1813 9673 1806 9678 c 1 - 1798 9678 1790 9679 1782 9681 c 0 - 1750 9689 1709 9696 1638 9699 c 0 - 1632 9699 1608 9698 1605 9697 c 0 - 1603 9697 1588 9694 1584 9692 c 0 - 1570 9687 1572 9688 1554 9668 c 0 - 1547 9660 1540 9655 1530 9649 c 0 - 1523 9645 1515 9640 1504 9636 c 0 - 1488 9629 1471 9624 1421 9610 c 0 - 1414 9608 1408 9607 1400 9606 c 2 - 1177 9587 l 1 - 1171 9578 1165 9569 1156 9561 c 1 - 1160 9539 1157 9520 1147 9499 c 2 - 1142 9489 l 2 - 1137 9480 1132 9471 1125 9464 c 1 - 1125 9454 1123 9445 1119 9435 c 0 - 1118 9431 1114 9421 1113 9417 c 0 - 1106 9392 1092 9374 1070 9360 c 2 - 927 9269 l 2 - 909 9258 890 9253 868 9253 c 2 - 842 9254 l 1 - 836 9084 823 9058 811 9011 c 0 - 807 9000 806 8993 806 8988 c 0 - 803 8967 803 8955 803 8931 c 2 - 803 8914 l 2 - 803 8890 796 8868 783 8851 c 1 - 879 8196 l 1 - 914 7951 l 2 - 915 7947 915 7944 915 7941 c 0 - 916 7937 917 7934 917 7930 c 2 - 921 7902 l 1 - 928 7896 934 7888 939 7880 c 2 - 1031 7731 l 2 - 1040 7717 1045 7703 1046 7686 c 2 - 1049 7652 l 1 - 1074 7646 1094 7630 1108 7607 c 2 - 1201 7457 l 1 - 1661 7034 l 2 - 1672 7024 1680 7013 1686 7000 c 1 - 1803 7000 l 2x81c005f4cc301820 - 1813 7000 1822 6999 1831 6996 c 0 - 2135 6908 2090 6853 2523 6853 c 0 - 2562 6853 2585 6851 2601 6851 c 2 - 2603 6851 l 1 - 2610 6851 l 2 - 2612 6851 2618 6851 2621 6851 c 0 - 2629 6852 2629 6852 2631 6852 c 2 - 2633 6853 l 2 - 2638 6854 2672 6873 2681 6878 c 0 - 2683 6879 2681 6879 2730 6919 c 0 - 2741 6927 2750 6932 2763 6936 c 2 - 2961 6999 l 2 - 2975 7003 2989 7005 3002 7003 c 1 - 3154 7041 l 1 - 3162 7051 l 2 - 3238 7136 3309 7132 3354 7247 c 2 - 3356 7253 l 1 - 3412 7960 l 1 - 3399 7964 3386 7970 3374 7980 c 0 - 3349 7999 3336 8024 3335 8055 c 1 - 3211 8143 l 2 - 3206 8147 3200 8151 3196 8156 c 2 - 3190 8159 3184 8162 3179 8166 c 2 - 3140 8194 l 1 - 3123 8177 3099 8166 3072 8165 c 0 - 2984 8160 2957 8119 2781 8111 c 0 - 2748 8110 2721 8121 2700 8146 c 1 - 2466 8061 l 2 - 2455 8057 2444 8055 2432 8055 c 2 - 2409 8055 l 1 - 2409 7878 l 1 - 2424 7872 2437 7862 2449 7849 c 0 - 2454 7842 2457 7840 2474 7821 c 0 - 2478 7817 2484 7815 2488 7814 c 0 - 2504 7807 2518 7798 2529 7786 c 1 - 2534 7788 l 2 - 2536 7789 2539 7791 2542 7792 c 0 - 2545 7793 2547 7794 2550 7796 c 2 - 2643 7839 l 2 - 2651 7842 2657 7844 2664 7846 c 2 - 2738 7862 l 1 - 2750 7870 2765 7877 2782 7880 c 0 - 2790 7881 2807 7885 2823 7890 c 0 - 2842 7896 2859 7897 2878 7892 c 2 - 3093 7842 l 2 - 3142 7830 3173 7791 3172 7740 c 0 - 3171 7702 3168 7670 3163 7643 c 0 - 3157 7611 3139 7587 3110 7572 c 0 - 3007 7518 2898 7464 2813 7337 c 0 - 2807 7329 2802 7323 2794 7317 c 2 - 2698 7234 l 2 - 2677 7216 2653 7208 2625 7210 c 0 - 2606 7211 2579 7211 2533 7211 c 2 - 2486 7211 l 2 - 2483 7211 2459 7210 2453 7208 c 0 - 2451 7208 2442 7206 2436 7203 c 0 - 2417 7195 2400 7192 2379 7195 c 2 - 1846 7264 l 2 - 1836 7265 1828 7267 1819 7271 c 0 - 1740 7305 1697 7350 1632 7404 c 0 - 1621 7414 1613 7423 1606 7437 c 2 - 1584 7481 l 2 - 1579 7493 1571 7510 1565 7520 c 2 - 1556 7537 l 1 - 1541 7552 l 0 - 1512 7589 1463 7633 1434 7673 c 0 - 1409 7708 1404 7730 1401 7737 c 2 - 1398 7745 l 1 - 1322 7821 l 2 - 1310 7833 1303 7844 1298 7859 c 2 - 1188 8171 l 2 - 1184 8183 1182 8193 1182 8205 c 2 - 1182 8422 l 1 - 1215 8817 l 2 - 1215 8817 1215 8818 1215 8819 c 2 - 1215 8820 l 1 - 1215 8822 1215 8824 1216 8826 c 2 - 1220 8884 l 1 - 1205 8897 1195 8916 1190 8939 c 0 - 1180 8991 1172 9022 1165 9042 c 0 - 1154 9075 1159 9107 1180 9135 c 2 - 1207 9172 l 2 - 1214 9182 1222 9189 1232 9196 c 0 - 1262 9216 1287 9236 1309 9262 c 2 - 1312 9266 l 2 - 1332 9291 1359 9304 1391 9304 c 2 - 1930 9304 l 2 - 1940 9304 1949 9303 1958 9301 c 1 - 2027 9304 l 1 - 2095 9304 l 1x82c003f4cc301820 - 2104 9307 2113 9308 2123 9309 c 2 - 2301 9318 l 2 - 2334 9319 2362 9308 2382 9287 c 1x80c005f4cc301820 - 2395 9294 2410 9298 2427 9299 c 2 - 2430 9299 2449 9302 2455 9303 c 0 - 2456 9304 2461 9305 2462 9306 c 0 - 2472 9309 2481 9311 2490 9312 c 1 - 2490 9316 l 2 - 2490 9352 2506 9382 2531 9400 c 1 - 2526 9413 2523 9426 2523 9441 c 2 - 2523 9473 l 1 - 2513 9476 2503 9481 2494 9487 c 2 - 2492 9488 l 1 -3168 8387 m 2 - 3169 8387 l 1 - 3168 8387 3168 8387 3168 8387 c 2 -2544 9719 m 1 - 2551 9714 2562 9706 2576 9693 c 0 - 2576 9693 2577 9692 2577 9691 c 0 - 2578 9691 2578 9691 2578 9690 c 0 - 2580 9689 2581 9688 2583 9686 c 0 - 2584 9685 l 0 - 2587 9683 2589 9681 2591 9678 c 2 - 2601 9666 l 1 - 2669 9692 l 2 - 2713 9709 2757 9697 2786 9660 c 0 - 2816 9623 2817 9577 2790 9538 c 2 - 2736 9459 l 1 - 2755 9432 l 2 - 2788 9382 2776 9322 2726 9290 c 2 - 2725 9288 l 1 - 2720 9269 2709 9252 2695 9239 c 1 - 2695 9235 2694 9231 2694 9227 c 1 - 2709 9154 l 2 - 2718 9112 2702 9073 2666 9048 c 0 - 2629 9024 2587 9024 2551 9049 c 2 - 2484 9094 l 1 - 2391 8958 l 2 - 2364 8919 2321 8904 2276 8918 c 0 - 2231 8932 2204 8969 2204 9016 c 2 - 2204 9108 l 1 - 2167 9106 l 1 - 2155 9102 2142 9099 2128 9099 c 2 - 2032 9099 l 1 - 2026 9099 l 1 - 2004 9057 1961 9037 1914 9048 c 0 - 1882 9055 1858 9074 1845 9099 c 1 - 1437 9099 l 1 - 1417 9079 1396 9062 1377 9047 c 1 - 1413 9030 1435 8992 1431 8947 c 2 - 1421 8822 l 1 - 1423 8805 1422 8789 1417 8774 c 1 - 1386 8413 l 1 - 1387 8223 l 1 - 1483 7950 l 1 - 1559 7874 l 2 - 1570 7862 1578 7850 1583 7835 c 2 - 1594 7804 l 2 - 1599 7793 1599 7794 1601 7792 c 0 - 1614 7774 1642 7747 1671 7716 c 1 - 1691 7706 1709 7690 1720 7666 c 2 - 1745 7618 l 2 - 1755 7600 1762 7587 1770 7566 c 2 - 1780 7547 l 1 - 1844 7494 1861 7478 1888 7465 c 1 - 2380 7401 l 1 - 2391 7404 2402 7407 2414 7410 c 0 - 2428 7412 2465 7416 2486 7416 c 2 - 2533 7416 l 2 - 2559 7416 2578 7416 2595 7416 c 1 - 2651 7463 l 1 - 2722 7565 2807 7632 2884 7681 c 1 - 2861 7686 l 1 - 2850 7679 2838 7674 2824 7671 c 2 - 2719 7648 l 1 - 2685 7632 l 1 - 2675 7611 2657 7594 2632 7584 c 0 - 2610 7575 2588 7573 2568 7578 c 1 - 2397 7500 l 2 - 2352 7479 2305 7491 2274 7530 c 0 - 2243 7569 2243 7618 2274 7657 c 2 - 2293 7681 l 1 - 2241 7686 2204 7728 2204 7782 c 2 - 2204 8157 l 2 - 2204 8216 2247 8260 2306 8260 c 2 - 2413 8260 l 1 - 2758 8385 l 2 - 2795 8398 2832 8392 2861 8366 c 0 - 2872 8356 2881 8345 2887 8332 c 1 - 2915 8340 2940 8348 2967 8355 c 1 - 2972 8377 2985 8396 3006 8411 c 0 - 3033 8431 3064 8436 3097 8426 c 2 - 3231 8383 l 2 - 3236 8381 3245 8374 3254 8364 c 1 - 3271 8352 l 1 - 3318 8352 3356 8324 3368 8282 c 1 - 3498 8190 l 2 - 3511 8180 3522 8169 3529 8156 c 1 - 3530 8156 l 2 - 3589 8151 3629 8104 3624 8045 c 2 - 3559 7222 l 2 - 3558 7211 3556 7203 3553 7193 c 2 - 3545 7173 l 2 - 3475 6993 3362 6967 3316 6916 c 2 - 3287 6882 l 2 - 3272 6866 3256 6856 3235 6850 c 2 - 3018 6796 l 2 - 3008 6794 2999 6793 2989 6793 c 1 - 2843 6747 l 1 - 2818 6726 2798 6708 2776 6696 c 0 - 2717 6665 2708 6661 2690 6656 c 0 - 2685 6655 2669 6651 2664 6650 c 0x85c003f4cc301820 - 2660 6650 2648 6648 2640 6647 c 0 - 2634 6647 2616 6646 2610 6646 c 2 - 2604 6646 l 1 - 2601 6646 l 2 - 2586 6646 2554 6648 2523 6648 c 0x82c001f4cc301820 - 2062 6648 2064 6713 1788 6795 c 1 - 1723 6795 l 1 - 1692 6776 1654 6776 1621 6795 c 1 - 1591 6795 l 2 - 1532 6795 1489 6838 1489 6898 c 2 - 1489 6914 l 1 - 1052 7316 l 2 - 1045 7323 1040 7329 1034 7337 c 2 - 1034 7338 l 1 - 1012 7320 984 7312 952 7316 c 0 - 903 7323 870 7359 865 7409 c 2 - 844 7644 l 1 - 794 7725 l 1 - 759 7737 734 7767 728 7808 c 2 - 716 7892 l 2 - 712 7903 710 7913 710 7924 c 2 - 710 7929 l 1 - 676 8167 l 1 - 569 8894 l 2 - 564 8931 576 8963 599 8985 c 1 - 600 8995 601 9005 603 9018 c 0 - 605 9032 608 9047 613 9066 c 0 - 623 9103 632 9104 637 9262 c 2 - 641 9364 l 2 - 643 9423 688 9465 747 9463 c 2 - 844 9459 l 1 - 917 9505 l 1 - 915 9520 l 2 - 915 9521 915 9522 915 9522 c 0 - 912 9553 921 9581 939 9602 c 1 - 938 9607 l 2 - 929 9653 948 9694 984 9715 c 2 - 996 9753 1030 9781 1074 9784 c 2 - 1373 9809 l 1 - 1390 9814 1408 9819 1419 9823 c 1 - 1446 9850 1469 9867 1509 9883 c 0 - 1528 9890 1562 9898 1575 9900 c 0 - 1588 9902 1619 9904 1638 9904 c 2 - 1642 9904 l 2 - 1707 9901 1760 9894 1802 9886 c 1 - 1867 9906 l 2 - 1912 9919 1955 9904 1981 9866 c 0 - 1988 9855 1993 9844 1996 9834 c 1 - 2118 10132 l 2 - 2137 10180 2182 10204 2232 10194 c 0 - 2282 10185 2315 10146 2315 10095 c 2 - 2318 9868 l 1 - 2333 9871 2348 9871 2362 9867 c 1 - 2441 9867 l 2 - 2501 9867 2544 9824 2544 9765 c 2 - 2544 9719 l 1 -2507 9673 m 0 - 2520 9665 2531 9654 2540 9640 c 2 - 2544 9635 l 2 - 2549 9627 2553 9618 2556 9610 c 1 - 2561 9603 l 2 - 2597 9554 2586 9491 2535 9457 c 2 - 2498 9433 l 2 - 2465 9411 2428 9409 2393 9428 c 0 - 2358 9446 2339 9478 2339 9518 c 2 - 2339 9593 l 2 - 2339 9640 2365 9676 2410 9691 c 0 - 2445 9702 2480 9696 2507 9673 c 0 -1974 9626 m 0 - 2020 9629 2059 9663 2068 9710 c 0 - 2077 9764 2044 9815 1992 9828 c 0 - 1991 9828 1991 9828 1991 9828 c 1 - 1988 9829 1986 9829 1984 9829 c 0 - 1979 9830 1973 9831 1967 9831 c 0 - 1911 9834 1862 9791 1859 9735 c 0 - 1855 9679 1898 9630 1954 9627 c 2 - 1955 9627 l 2 - 1961 9626 1968 9626 1974 9626 c 0 -1782 9591 m 1 - 1837 9582 1874 9530 1865 9475 c 0 - 1856 9420 1804 9382 1749 9391 c 1 - 1727 9399 1707 9405 1686 9408 c 1 - 1676 9402 l 1 - 1671 9399 l 1 - 1618 9385 1564 9417 1550 9470 c 0 - 1536 9523 1568 9577 1620 9591 c 1 - 1782 9591 l 1 -1620 9386 m 2 - 1572 9386 1534 9415 1521 9462 c 0 - 1509 9509 1528 9553 1570 9577 c 2 - 1574 9580 l 2 - 1579 9583 1588 9588 1597 9595 c 0 - 1617 9611 1639 9618 1666 9617 c 0 - 1724 9613 1774 9599 1815 9585 c 0 - 1865 9569 1892 9524 1883 9472 c 0 - 1875 9420 1835 9386 1782 9386 c 2 - 1620 9386 l 2 -3475 7964 m 2 - 3423 7950 3375 7972 3353 8021 c 2 - 3352 8023 l 2 - 3337 8056 3339 8089 3358 8119 c 0 - 3377 8149 3405 8166 3441 8168 c 2 - 3452 8168 l 2 - 3507 8170 3549 8136 3558 8082 c 0 - 3567 8029 3537 7982 3485 7967 c 2 - 3475 7964 l 2 -3461 7964 m 2 - 3407 7961 3364 7996 3356 8049 c 0 - 3347 8103 3376 8149 3429 8164 c 2 - 3448 8170 l 2 - 3478 8178 3506 8174 3533 8157 c 0 - 3559 8139 3574 8115 3578 8084 c 0 - 3578 8081 l 0 - 3582 8051 3575 8025 3555 8001 c 0 - 3536 7978 3511 7966 3481 7964 c 2 - 3461 7964 l 2 -2607 8081 m 1 - 2607 8081 l 1 -2605 8083 m 0 - 2566 8126 2568 8187 2612 8227 c 0 - 2656 8267 2717 8264 2757 8221 c 2 - 2758 8220 l 2 - 2796 8178 2793 8113 2751 8075 c 0 - 2710 8037 2645 8040 2607 8081 c 1 - 2605 8083 l 0 -3095 8165 m 0 - 3107 8165 3145 8158 3157 8153 c 0 - 3161 8151 3175 8152 3196 8144 c 0 - 3209 8142 3220 8136 3232 8128 c 2 - 3275 8097 l 2 - 3309 8073 3324 8035 3316 7993 c 0 - 3310 7965 3295 7943 3273 7928 c 1 - 3248 7905 3216 7897 3181 7905 c 2 - 2989 7950 l 2 - 2942 7962 2911 7998 2910 8047 c 0 - 2908 8095 2936 8134 2982 8148 c 0 - 3014 8158 3050 8165 3095 8165 c 0 -1094 9121 m 1 - 1062 9098 1025 9096 990 9114 c 2 - 979 9119 l 2 - 945 9136 925 9167 923 9205 c 0 - 921 9244 938 9276 970 9297 c 2 - 1104 9382 l 1 - 1098 9410 1103 9437 1119 9462 c 0 - 1137 9489 1163 9504 1196 9507 c 2 - 1254 9511 l 2 - 1289 9514 1319 9501 1342 9474 c 0 - 1364 9446 1370 9413 1360 9379 c 2 - 1344 9327 l 2 - 1335 9299 1323 9279 1309 9263 c 0 - 1304 9257 1291 9239 1257 9214 c 0 - 1250 9209 1243 9204 1240 9202 c 0 - 1210 9183 1175 9166 1149 9144 c 0 - 1133 9130 1115 9123 1094 9121 c 1 -2544 9501 m 1 - 2339 9501 l 1 - 2339 9509 l 1 - 2544 9509 l 1 - 2544 9501 l 1 -2297 9622 m 2 - 2325 9622 2349 9612 2369 9592 c 2 - 2385 9575 l 2 - 2415 9545 2424 9506 2408 9466 c 0 - 2393 9426 2360 9403 2318 9401 c 2 - 2317 9401 l 2 - 2286 9399 2261 9409 2239 9431 c 2 - 2223 9447 l 2 - 2193 9478 2185 9519 2202 9559 c 0 - 2218 9599 2253 9622 2296 9622 c 2 - 2297 9622 l 2 -2498 9407 m 2 - 2465 9395 2433 9399 2404 9419 c 0 - 2375 9439 2359 9468 2359 9503 c 2 - 2359 9507 l 2 - 2359 9552 2385 9588 2428 9604 c 0 - 2471 9619 2513 9607 2542 9571 c 2 - 2544 9568 l 2 - 2566 9541 2572 9510 2563 9477 c 0 - 2554 9444 2533 9421 2501 9408 c 2 - 2498 9407 l 2 -5972 7058 m 1 - 5940 7070 5916 7097 5908 7135 c 2 - 5825 7553 l 2 - 5823 7559 5823 7563 5823 7569 c 2 - 5823 7572 l 1 - 5823 7775 l 2 - 5823 7836 5868 7879 5928 7877 c 0 - 5935 7877 5954 7877 5961 7877 c 0 - 6043 7877 6143 7890 6297 7942 c 0 - 6301 7944 6313 7947 6318 7947 c 0 - 6352 7952 6460 7976 6632 8108 c 0 - 6637 8112 6641 8115 6646 8118 c 2 - 6914 8270 l 1 - 6917 8289 6926 8307 6940 8322 c 0 - 6950 8332 6966 8352 6966 8392 c 0 - 6966 8403 6966 8411 6964 8419 c 0 - 6958 8458 6972 8493 7000 8515 c 1 - 6990 8527 6983 8542 6980 8559 c 2 - 6962 8651 l 1 - 6942 8653 6924 8660 6908 8674 c 0 - 6906 8675 6901 8679 6899 8681 c 0 - 6879 8695 6853 8708 6834 8719 c 2 - 6816 8729 l 1 - 6809 8726 6802 8724 6795 8722 c 2 - 6772 8708 6746 8704 6718 8710 c 2 - 6436 8778 l 1 - 6280 8778 l 2 - 6273 8778 6266 8778 6259 8780 c 2 - 6251 8782 l 1 - 6244 8776 6237 8770 6228 8766 c 0 - 6221 8762 6214 8758 6207 8756 c 1 - 6166 8711 l 2 - 6162 8706 6157 8702 6152 8698 c 2 - 5933 8534 l 1 - 5800 8317 5702 8192 5607 8118 c 0 - 5605 8116 5604 8115 5602 8113 c 2 - 5598 8110 l 2 - 5577 8094 5584 8098 5585 8098 c 1 - 5576 8075 5561 8058 5539 8046 c 0 - 5537 8045 5531 8041 5529 8039 c 0 - 5515 8030 5518 8032 5502 8007 c 0 - 5492 7992 5501 8006 5501 8006 c 0 - 5499 8003 5500 8004 5499 8002 c 0 - 5498 8000 5498 7999 5497 7996 c 0 - 5496 7992 5493 7979 5493 7975 c 0 - 5490 7962 5489 7954 5488 7902 c 0 - 5487 7883 5482 7865 5473 7851 c 1 - 5477 7844 l 2 - 5480 7838 5482 7832 5484 7825 c 2 - 5487 7815 l 2 - 5487 7813 5489 7808 5489 7806 c 0 - 5489 7803 5491 7797 5492 7794 c 0 - 5500 7761 5513 7747 5515 7742 c 0 - 5516 7741 5517 7740 5518 7740 c 0 - 5519 7738 5523 7734 5524 7733 c 0 - 5534 7724 5541 7715 5547 7703 c 2 - 5568 7661 l 2 - 5575 7646 5579 7633 5579 7616 c 2 - 5579 7612 l 2x80c011e6cc301820 - 5580 7445 5599 7422 5648 7333 c 0 - 5653 7325 5656 7317 5658 7308 c 2 - 5717 7073 l 2 - 5718 7070 5719 7066 5719 7063 c 0 - 5720 7060 5721 7057 5722 7053 c 2 - 5722 7052 l 2x80c011e5cc301820 - 5725 7043 5726 7035 5725 7025 c 0 - 5725 7017 5724 7001 5724 6985 c 2 - 5724 6983 l 2 - 5724 6979 5724 6967 5725 6964 c 0 - 5725 6954 5727 6944 5731 6932 c 0 - 5734 6921 5740 6909 5750 6898 c 0 - 5764 6884 5772 6870 5777 6851 c 2 - 5865 6479 l 2 - 5865 6478 5866 6476 5866 6475 c 1 - 5881 6469 l 2 - 5937 6446 5985 6440 6022 6416 c 2 - 6030 6411 l 1 - 6243 6392 l 1 - 6243 6395 l 2 - 6245 6421 6256 6443 6276 6461 c 0 - 6334 6514 6406 6565 6505 6599 c 1 - 6595 6689 l 2 - 6620 6714 6652 6724 6683 6719 c 1 - 6687 6725 l 2 - 6729 6793 6745 6796 6854 6908 c 0 - 6860 6915 6866 6919 6873 6924 c 2 - 7117 7076 l 1 - 7109 7106 7115 7140 7136 7167 c 0 - 7146 7179 7170 7216 7188 7258 c 0 - 7194 7271 7201 7282 7212 7292 c 2 - 7464 7528 l 1 - 7464 7540 l 0 - 7465 7571 7478 7596 7502 7616 c 2 - 7623 7713 l 1 - 7501 7847 l 1 - 7468 7829 7431 7830 7399 7850 c 1 - 7192 7654 l 1 - 7211 7617 7204 7573 7173 7540 c 2 - 6900 7253 l 2 - 6895 7247 6890 7243 6884 7239 c 0 - 6836 7206 6721 7088 6687 7055 c 0 - 6654 7023 6609 7017 6571 7037 c 1 - 6568 7033 l 2 - 6471 6936 6443 6914 6414 6870 c 0 - 6404 6856 6394 6846 6379 6838 c 2 - 6175 6723 l 2 - 6128 6696 6074 6708 6042 6753 c 2 - 6024 6778 l 2 - 6014 6792 6008 6806 6006 6823 c 2 - 5972 7058 l 1 -5585 8098 m 1 - 5585 8098 l 1 -7170 8361 m 1 - 7166 8309 7151 8266 7135 8236 c 1 - 7142 8195 7124 8155 7084 8132 c 2 - 6754 7943 l 2 - 6677 7884 6525 7777 6364 7749 c 2 - 6229 7703 6120 7681 6027 7674 c 1 - 6027 7584 l 1 - 6092 7261 l 1 - 6129 7250 6156 7220 6162 7177 c 2 - 6192 6967 l 1 - 6258 7005 l 1 - 6301 7064 6342 7097 6422 7177 c 2 - 6494 7250 l 2 - 6527 7283 6573 7290 6612 7271 c 1 - 6655 7314 6710 7366 6759 7401 c 1 - 6959 7612 l 1 - 6936 7652 6943 7700 6979 7734 c 2 - 7327 8063 l 2 - 7365 8099 7417 8102 7457 8072 c 1 - 7500 8101 7552 8094 7588 8055 c 2 - 7848 7771 l 2 - 7868 7749 7877 7724 7875 7694 c 0 - 7873 7664 7860 7640 7837 7622 c 2 - 7696 7509 l 1 - 7696 7480 7685 7455 7664 7435 c 2 - 7367 7157 l 1 - 7355 7132 7342 7108 7329 7087 c 1 - 7329 6994 l 2 - 7329 6935 7286 6892 7227 6892 c 2 - 7209 6892 l 1 - 6992 6757 l 1 - 6875 6637 6887 6659 6862 6618 c 2 - 6808 6531 l 2 - 6781 6485 6730 6469 6684 6488 c 1 - 6632 6437 l 2 - 6621 6425 6609 6418 6593 6412 c 2 - 6570 6405 l 2 - 6556 6400 6508 6386 6443 6335 c 1 - 6438 6271 l 2 - 6432 6213 6385 6173 6326 6179 c 2 - 6259 6185 l 1 - 6245 6183 6231 6184 6218 6189 c 1 - 5988 6210 l 2 - 5971 6211 5957 6216 5943 6225 c 2 - 5914 6243 l 2 - 5904 6249 5868 6253 5804 6279 c 2 - 5778 6289 l 1 - 5751 6289 5727 6299 5709 6317 c 1 - 5655 6339 5631 6395 5653 6450 c 2 - 5658 6464 l 1 - 5583 6779 l 1 - 5564 6803 5548 6833 5536 6869 c 0 - 5529 6891 5523 6915 5520 6947 c 0 - 5520 6954 5519 6974 5519 6981 c 2 - 5519 6985 l 1 - 5519 6986 l 1x88c011e5cc301820 - 5507 7007 5504 7032 5510 7056 c 1 - 5463 7245 l 1 - 5408 7342 5378 7404 5374 7591 c 1 - 5371 7597 l 2 - 5367 7601 5363 7606 5361 7608 c 0 - 5355 7615 5339 7637 5335 7645 c 0 - 5330 7655 5309 7682 5293 7744 c 0 - 5292 7747 5290 7756 5289 7760 c 2 - 5289 7761 l 1 - 5229 7882 l 2 - 5209 7922 5215 7964 5244 7996 c 0 - 5259 8013 5276 8023 5295 8028 c 1 - 5297 8038 5299 8048 5300 8053 c 0 - 5302 8057 5306 8070 5308 8075 c 0 - 5310 8079 5315 8093 5318 8097 c 0 - 5320 8102 5327 8115 5330 8119 c 0 - 5355 8158 5372 8179 5409 8206 c 0 - 5409 8206 5411 8207 5412 8208 c 1 - 5422 8224 5434 8238 5447 8250 c 1 - 5460 8274 5480 8291 5504 8299 c 1 - 5570 8359 5653 8469 5759 8641 c 2 - 5769 8658 l 2 - 5776 8669 5784 8678 5795 8686 c 2 - 6021 8856 l 1 - 6084 8926 l 1 - 6090 8950 6103 8969 6124 8984 c 0 - 6149 9002 6176 9008 6206 9001 c 2 - 6291 8983 l 1 - 6448 8983 l 2 - 6456 8983 6463 8982 6471 8980 c 2 - 6670 8932 l 1 - 6673 8935 6677 8937 6680 8939 c 0 - 6701 8952 6724 8957 6747 8954 c 1 - 6774 8967 6807 8966 6838 8950 c 2 - 6934 8898 l 2 - 6948 8890 6976 8875 7004 8857 c 1 - 7041 8858 l 2 - 7094 8861 7135 8828 7145 8776 c 2 - 7173 8638 l 1 - 7280 8558 l 2 - 7316 8531 7330 8489 7316 8446 c 0 - 7303 8402 7268 8375 7223 8374 c 2 - 7183 8372 l 1 - 7179 8368 7175 8364 7170 8361 c 1 -7328 7590 m 2 - 7333 7623 7349 7648 7378 7665 c 0 - 7406 7682 7436 7685 7467 7673 c 2 - 7491 7664 l 2 - 7543 7643 7568 7592 7552 7539 c 2 - 7537 7489 l 2 - 7523 7441 7482 7413 7432 7416 c 0 - 7428 7416 7416 7417 7412 7417 c 0 - 7352 7423 7313 7472 7321 7532 c 2 - 7328 7590 l 2 -3786 8082 m 2 - 3762 8104 3751 8131 3753 8164 c 0 - 3755 8196 3769 8221 3795 8240 c 0 - 3799 8243 3808 8249 3811 8252 c 0 - 3846 8279 3888 8282 3926 8260 c 0 - 3964 8238 3983 8200 3976 8157 c 2 - 3976 8153 l 1 - 3971 8126 l 2 - 3965 8087 3941 8059 3903 8046 c 0 - 3866 8033 3830 8041 3801 8068 c 2 - 3786 8082 l 2 -3836 8193 m 1 -10285 7100 m 1 - 10282 7085 10276 7071 10266 7057 c 0 - 10245 7028 10214 7014 10178 7016 c 2 - 10176 7016 l 2 - 10133 7019 10101 7043 10086 7083 c 2 - 10069 7129 l 2 - 10052 7175 10066 7220 10106 7248 c 2 - 10122 7259 l 2 - 10157 7284 10199 7285 10236 7262 c 2 - 10258 7248 l 2 - 10286 7230 10302 7205 10305 7172 c 0 - 10308 7145 10301 7120 10285 7100 c 1 -10209 7259 m 0 - 10213 7259 10217 7259 10220 7258 c 0 - 10221 7258 l 1 - 10229 7257 10237 7255 10244 7253 c 0 - 10282 7240 10307 7209 10311 7169 c 0 - 10311 7160 l 0 - 10312 7155 10311 7150 10311 7145 c 0 - 10310 7137 10308 7130 10306 7123 c 0 - 10294 7084 10262 7059 10221 7055 c 0 - 10218 7054 10216 7054 10213 7054 c 0 - 10208 7054 10202 7054 10197 7055 c 2 - 10196 7055 l 2 - 10141 7061 10105 7104 10106 7157 c 0 - 10106 7161 10106 7165 10107 7169 c 0 - 10113 7223 10155 7260 10209 7259 c 0 -9087 6690 m 0 - 9072 6723 9075 6757 9095 6787 c 0 - 9114 6818 9144 6834 9181 6834 c 2 - 9235 6834 l 2 - 9277 6834 9310 6813 9328 6775 c 0 - 9345 6737 9340 6698 9313 6666 c 2 - 9279 6625 l 2 - 9256 6598 9225 6585 9190 6589 c 0 - 9155 6593 9127 6611 9110 6642 c 0 - 9101 6659 9093 6676 9087 6690 c 0 -9115 6634 m 0 - 9099 6663 9097 6692 9109 6722 c 0 - 9120 6752 9142 6772 9172 6782 c 2 - 9218 6797 l 2 - 9259 6810 9300 6798 9328 6765 c 0 - 9356 6731 9360 6690 9339 6651 c 0 - 9333 6639 9322 6618 9313 6602 c 0 - 9294 6571 9266 6553 9230 6551 c 0 - 9194 6549 9164 6563 9142 6592 c 0 - 9133 6604 9124 6617 9115 6634 c 0 -8536 6768 m 0 - 8549 6731 8557 6711 8564 6698 c 0 - 8574 6679 8580 6671 8602 6659 c 0 - 8611 6653 8619 6649 8627 6645 c 1 - 8566 6889 8531 7140 8516 7389 c 1 - 8485 7330 8464 7252 8464 7147 c 0 - 8464 6996 8511 6840 8536 6768 c 0 -8259 7147 m 0 - 8259 7361 8328 7575 8556 7712 c 0 - 8589 7732 8625 7733 8658 7714 c 0 - 8692 7696 8710 7665 8711 7627 c 0 - 8718 7240 8768 6845 8886 6482 c 0 - 8900 6440 8888 6400 8855 6372 c 0 - 8821 6344 8779 6340 8740 6360 c 0 - 8597 6437 8545 6455 8499 6482 c 0 - 8440 6516 8409 6551 8382 6603 c 0 - 8367 6632 8355 6664 8342 6702 c 0 - 8298 6831 8259 6989 8259 7147 c 0 -20240 8223 m 2 - 20167 8259 l 1 - 20154 8265 l 2 - 20137 8274 20136 8273 20124 8277 c 0 - 20123 8277 20122 8277 20122 8277 c 0 - 20120 8277 20116 8278 20115 8279 c 0 - 20113 8279 20109 8280 20108 8280 c 0 - 20099 8281 20089 8281 20070 8281 c 0 - 20060 8281 20035 8281 20019 8281 c 0 - 20019 8281 20018 8281 20014 8280 c 0 - 19976 8266 19735 8104 19654 8049 c 0 - 19644 8040 19634 8033 19623 8028 c 1 - 19588 7985 l 2 - 19585 7982 19583 7980 19580 7977 c 2 - 19569 7966 l 1 - 19567 7961 19565 7955 19563 7949 c 0 - 19539 7894 19474 7657 19474 7657 c 2 - 19473 7656 l 2 - 19471 7654 19465 7646 19464 7645 c 0 - 19446 7614 19414 7521 19383 7466 c 0 - 19372 7445 19356 7431 19335 7422 c 1 - 19320 7240 l 2 - 19318 7216 19309 7195 19294 7179 c 1 - 19373 6523 l 1 - 19395 6514 l 2 - 19453 6492 19468 6437 19472 6426 c 0 - 19482 6401 19496 6348 19505 6321 c 0 - 19517 6286 19528 6267 19537 6255 c 0 - 19557 6228 19579 6222 19585 6220 c 0 - 19604 6213 19619 6202 19631 6187 c 1 - 19668 6165 l 2 - 19677 6161 19683 6156 19689 6150 c 2 - 19701 6138 l 1 - 19713 6137 19726 6134 19738 6128 c 0 - 19829 6085 19897 6077 19937 6077 c 0xa0e001e4cc301820 - 19955 6077 19973 6078 19982 6078 c 0 - 20162 6078 20241 6215 20277 6260 c 0 - 20312 6303 20309 6283 20359 6313 c 1 - 20365 6315 l 2 - 20370 6315 20374 6316 20379 6316 c 1 - 20384 6325 20390 6334 20398 6342 c 2 - 20399 6343 l 2 - 20464 6406 20487 6450 20560 6501 c 2 - 20569 6507 l 1 - 20757 6912 l 1 - 20815 7024 l 1 - 20794 7049 20787 7081 20796 7115 c 2 - 20957 7714 l 1 - 20958 7715 20958 7717 20959 7718 c 2 - 20965 7741 l 2 - 20970 7760 20979 7776 20992 7788 c 0 - 20996 7793 21001 7798 21007 7803 c 2 - 21010 7806 l 2 - 21013 7807 21015 7809 21017 7811 c 2 - 21063 7857 l 2 - 21202 7996 21184 8166 21291 8371 c 0 - 21470 8714 21689 9351 21859 9573 c 0 - 22153 9956 22032 9826 22301 10310 c 0 - 22302 10313 22303 10315 22305 10317 c 2 - 22305 10319 l 1 - 22352 10425 l 2 - 22354 10430 22357 10435 22360 10440 c 0 - 22360 10441 22360 10442 22361 10443 c 1 - 22330 10456 l 2 - 22314 10463 22303 10471 22292 10484 c 0 - 22291 10485 22290 10487 22289 10487 c 0 - 22284 10493 22280 10497 22275 10504 c 1 - 22265 10503 22255 10503 22246 10506 c 1 - 22236 10503 22231 10502 22219 10498 c 2 - 22107 10461 l 1 - 22112 10438 22108 10415 22096 10394 c 2 - 21770 9810 l 1 - 21770 9809 l 2 - 21767 9803 21759 9782 21755 9776 c 0 - 21727 9731 21718 9731 21623 9539 c 0 - 21133 8561 21392 9044 21161 8547 c 0 - 21141 8502 21156 8537 21149 8527 c 0 - 21100 8458 20886 8026 20885 8025 c 2 - 20870 7994 l 2 - 20855 7965 20832 7946 20800 7939 c 0 - 20768 7932 20740 7939 20714 7959 c 0 - 20596 8053 20588 8105 20514 8153 c 0 - 20503 8160 20490 8167 20477 8172 c 0 - 20438 8187 20415 8187 20368 8191 c 0 - 20362 8192 20345 8192 20340 8192 c 2 - 20329 8192 l 2 - 20312 8192 20298 8195 20282 8203 c 0 - 20274 8207 20260 8214 20240 8223 c 2 -19561 8234 m 1 - 19647 8292 19882 8449 19942 8471 c 0 - 19956 8477 19993 8486 20019 8486 c 0 - 20043 8486 20054 8486 20070 8486 c 0 - 20108 8486 20127 8484 20133 8483 c 0 - 20137 8482 20147 8481 20151 8480 c 0 - 20155 8480 20165 8477 20169 8476 c 0 - 20174 8475 20187 8472 20192 8470 c 0 - 20235 8455 20225 8459 20246 8448 c 2 - 20258 8442 l 1 - 20328 8408 l 1 - 20353 8396 l 1 - 20364 8396 20378 8396 20384 8395 c 0 - 20451 8390 20489 8387 20551 8363 c 0 - 20578 8352 20603 8339 20625 8325 c 0 - 20682 8288 20714 8250 20749 8211 c 1 - 20813 8339 20922 8552 20976 8634 c 1 - 21193 9103 20950 8653 21439 9631 c 0 - 21543 9838 21564 9856 21579 9881 c 0 - 21580 9881 21578 9881 21578 9881 c 1 - 21580 9887 l 2 - 21582 9893 21584 9897 21587 9902 c 2 - 21895 10454 l 1 - 21894 10455 l 1 - 21881 10493 l 2 - 21862 10549 21889 10604 21946 10623 c 2 - 22161 10694 l 2 - 22172 10697 22177 10699 22182 10701 c 0 - 22199 10711 22220 10715 22242 10712 c 1 - 22254 10720 l 2 - 22303 10753 22363 10741 22396 10692 c 2 - 22434 10634 l 1 - 22498 10607 l 1 - 22498 10604 22503 10605 22535 10592 c 0 - 22590 10568 22613 10511 22589 10456 c 2 - 22572 10416 l 1 - 22579 10377 22563 10339 22527 10314 c 1 - 22498 10249 l 1 - 22496 10221 22484 10197 22462 10180 c 1 - 22230 9756 22313 9829 22022 9449 c 0 - 21878 9261 21644 8604 21473 8276 c 0 - 21379 8097 21390 7895 21208 7713 c 2 - 21155 7659 l 1 - 21015 7141 l 1 - 21053 7111 21064 7061 21040 7016 c 2 - 20941 6822 l 1 - 20743 6395 l 2 - 20735 6378 20724 6365 20708 6354 c 2 - 20677 6332 l 2 - 20637 6305 20620 6278 20579 6234 c 1 - 20582 6182 20548 6138 20494 6129 c 2 - 20469 6125 l 1 - 20451 6108 20431 6098 20409 6096 c 1 - 20349 6016 20224 5874 19982 5874 c 0 - 19960 5874 19973 5872 19937 5872 c 0 - 19875 5872 19797 5884 19706 5919 c 1 - 19672 5908 19634 5917 19605 5945 c 2 - 19556 5994 l 1 - 19495 6029 l 2 - 19484 6035 19475 6042 19468 6050 c 2 - 19430 6070 19401 6094 19372 6133 c 0 - 19347 6167 19328 6207 19311 6255 c 0 - 19302 6282 19294 6310 19288 6331 c 1 - 19246 6328 19210 6347 19192 6381 c 1 - 19161 6409 19151 6452 19168 6494 c 2 - 19170 6497 l 1 - 19081 7233 l 2 - 19077 7273 19093 7308 19122 7328 c 1 - 19137 7502 l 2 - 19140 7542 19163 7573 19200 7588 c 2 - 19219 7595 l 1 - 19240 7644 19272 7721 19289 7749 c 0 - 19293 7757 19306 7776 19315 7786 c 0 - 19321 7792 l 1 - 19299 7787 19296 7840 19356 7986 c 1 - 19351 8017 19361 8049 19387 8075 c 2 - 19433 8119 l 1 - 19496 8197 l 2 - 19513 8218 19535 8230 19561 8234 c 1 -19575 8075 m 2 - 19606 8045 19614 8005 19598 7965 c 0 - 19591 7946 19584 7927 19581 7918 c 0 - 19571 7887 19551 7865 19521 7854 c 0 - 19490 7842 19461 7844 19432 7861 c 2 - 19427 7864 l 2 - 19402 7878 19386 7899 19379 7926 c 2 - 19367 7972 l 2 - 19361 7996 19362 8017 19372 8039 c 0 - 19373 8041 19370 8039 19372 8049 c 0 - 19378 8089 19403 8118 19441 8130 c 0 - 19480 8143 19517 8134 19545 8105 c 2 - 19575 8075 l 2 -19403 7456 m 0 - 19391 7440 19378 7430 19360 7422 c 2 - 19350 7418 l 2 - 19314 7403 19278 7409 19247 7433 c 0 - 19217 7458 19204 7492 19210 7531 c 2 - 19215 7559 l 2 - 19222 7599 19247 7627 19286 7639 c 0 - 19324 7651 19361 7642 19389 7613 c 2 - 19402 7601 l 2 - 19436 7566 19442 7519 19417 7477 c 0 - 19414 7472 19406 7460 19403 7456 c 0 -21119 7767 m 2 - 21116 7712 21077 7673 21023 7670 c 2 - 21022 7670 l 1 - 20985 7641 20931 7649 20902 7687 c 0 - 20874 7724 20881 7778 20919 7807 c 1 - 20923 7819 20951 7852 20961 7859 c 0 - 20995 7880 21033 7881 21068 7861 c 0 - 21103 7841 21121 7807 21119 7767 c 2 -21084 7723 m 1 - 21082 7710 21079 7698 21072 7687 c 1 - 21076 7692 21112 7737 21112 7737 c 1 - 21103 7730 21093 7726 21084 7723 c 1 -21123 7838 m 2 - 21156 7806 21164 7763 21144 7722 c 0 - 21125 7680 21087 7658 21041 7663 c 2 - 21008 7666 l 2 - 20967 7671 20937 7694 20922 7733 c 2 - 20921 7737 l 2 - 20903 7784 20919 7831 20961 7859 c 0 - 20962 7859 20964 7861 20965 7861 c 0 - 20991 7881 21021 7887 21052 7878 c 2 - 21067 7874 l 2 - 21085 7869 21099 7862 21112 7849 c 2 - 21123 7838 l 2 -21123 7859 m 2 - 21177 7845 21208 7797 21198 7742 c 0 - 21188 7687 21142 7653 21087 7658 c 2 - 21064 7661 l 2 - 21023 7665 20992 7689 20978 7728 c 0 - 20964 7766 20972 7804 21001 7834 c 2 - 21004 7837 l 2 - 21031 7865 21066 7875 21104 7865 c 2 - 21123 7859 l 2 -19934 6435 m 0 - 19915 6433 19899 6435 19882 6444 c 0 - 19874 6447 19866 6450 19846 6464 c 0 - 19841 6467 19836 6470 19834 6472 c 0 - 19803 6494 19760 6531 19693 6596 c 0 - 19686 6603 19681 6609 19676 6617 c 2 - 19601 6743 l 2 - 19588 6764 19584 6784 19587 6807 c 0 - 19595 6887 19601 6980 19601 7074 c 0x84c001e4cc301860 - 19601 7261 19581 7375 19564 7447 c 0 - 19562 7452 19562 7457 19561 7462 c 0 - 19560 7471 19559 7496 19559 7505 c 0 - 19559 7697 19686 7815 19771 7896 c 2 - 19934 8043 l 2 - 19954 8061 19976 8069 20003 8069 c 2 - 20036 8069 l 2 - 20241 8056 20338 7943 20371 7887 c 2 - 20379 7873 l 1 - 20641 7786 l 2 - 20696 7768 20724 7715 20707 7659 c 0 - 20699 7635 20688 7602 20683 7539 c 2 - 20683 7450 l 2 - 20683 7435 20680 7422 20673 7408 c 2 - 20269 6533 l 2 - 20251 6495 20217 6473 20175 6474 c 2 - 20171 6474 l 2 - 20170 6474 20168 6474 20168 6474 c 0 - 20155 6473 20149 6473 20136 6464 c 0 - 20122 6454 20109 6448 20092 6445 c 0x84c001e4cc3018a0 - 20057 6439 19984 6437 19946 6437 c 0 - 19944 6437 19937 6435 19934 6435 c 0 -20041 7864 m 1 - 19910 7745 l 2 - 19822 7662 19764 7598 19764 7505 c 0x80c001e4cc3018a0 - 19764 7502 19763 7494 19765 7488 c 0 - 19802 7327 19806 7157 19806 7074 c 0 - 19806 6985 19801 6899 19794 6820 c 1 - 19845 6734 l 1 - 19896 6685 19930 6656 19949 6642 c 1 - 19986 6642 20020 6644 20041 6646 c 1 - 20064 6659 20087 6667 20107 6672 c 1 - 20478 7473 l 1 - 20478 7548 l 2 - 20480 7570 20483 7597 20487 7621 c 1 - 20278 7691 l 2 - 20253 7700 20235 7714 20222 7737 c 2 - 20194 7783 l 2 - 20165 7834 20106 7857 20041 7864 c 1 -10737 7609 m 2 - 10738 7552 10693 7506 10637 7504 c 0 - 10580 7503 10533 7548 10532 7604 c 2x80c001e4cd301820 - 10531 7791 l 2x80c001e4ce301820 - 10533 7847 10581 7891 10638 7888 c 0 - 10694 7886 10738 7838 10735 7782 c 0 - 10735 7776 10733 7758 10732 7752 c 2 - 10731 7742 l 1 - 10737 7609 l 2 -10526 7742 m 2 - 10526 7747 10526 7752 10527 7757 c 2 - 10529 7774 l 2 - 10529 7779 10531 7795 10531 7801 c 0x80c001e4ce301820 - 10537 7858 10581 7896 10638 7893 c 0 - 10695 7891 10735 7849 10736 7792 c 2 - 10737 7605 l 2 - 10737 7547 10695 7504 10637 7502 c 0 - 10578 7501 10534 7542 10532 7601 c 2 - 10526 7742 l 2 -11079 8608 m 0 - 11082 8608 11091 8607 11094 8607 c 0 - 11097 8607 11106 8605 11110 8604 c 0 - 11143 8597 11168 8586 11192 8575 c 0 - 11208 8568 11224 8561 11247 8556 c 0 - 11300 8545 11333 8500 11328 8446 c 0 - 11322 8391 11281 8354 11226 8354 c 2 - 11035 8354 l 1 - 11017 8347 10999 8346 10980 8350 c 0 - 10955 8354 10931 8360 10899 8366 c 0 - 10848 8376 10815 8415 10815 8467 c 0 - 10815 8469 10815 8473 10815 8474 c 0 - 10815 8526 10848 8566 10899 8575 c 0x80c401e4cc301820 - 10957 8586 11012 8609 11067 8609 c 0 - 11069 8609 11077 8608 11079 8608 c 0 -11833 8488 m 2 - 11835 8482 11836 8477 11837 8471 c 0 - 11841 8453 11839 8434 11832 8415 c 0 - 11820 8387 11800 8368 11772 8357 c 0 - 11755 8351 11763 8350 11682 8347 c 0 - 11678 8347 11667 8347 11664 8347 c 0 - 11612 8347 11581 8351 11518 8355 c 0 - 11465 8358 11426 8396 11422 8449 c 0x80c801e4cc301820 - 11417 8502 11449 8545 11500 8557 c 0 - 11553 8570 11625 8599 11662 8610 c 0 - 11695 8620 11727 8614 11755 8593 c 0 - 11758 8590 11761 8587 11769 8583 c 0 - 11795 8571 11813 8551 11822 8523 c 2 - 11833 8488 l 2 -11737 8453 m 1 -16404 9215 m 1 - 16397 9200 16386 9187 16372 9176 c 2 - 16289 9114 l 1 - 16373 9127 l 2 - 16425 9135 16469 9108 16486 9058 c 0 - 16486 9057 16487 9054 16487 9053 c 0 - 16488 9051 16491 9045 16492 9043 c 0 - 16493 9041 16496 9035 16498 9033 c 0 - 16498 9032 16503 9025 16505 9023 c 0 - 16559 8962 16634 8941 16719 8941 c 0x80c041e4cc301a20 - 16792 8941 16872 8953 16922 8957 c 0 - 16932 8957 16942 8957 16951 8955 c 2 - 17023 8954 l 2 - 17028 8954 17032 8954 17037 8953 c 2 - 17076 8947 l 1 - 17088 8951 17101 8954 17115 8954 c 0 - 17144 8954 17153 8954 17163 8954 c 0 - 17260 8954 17352 8951 17442 8920 c 2 - 17485 8901 l 2 - 17486 8900 17488 8900 17489 8899 c 0 - 17490 8899 17492 8898 17493 8897 c 2 - 17531 8881 l 2 - 17538 8877 17544 8874 17551 8869 c 2 - 17599 8833 l 2 - 17845 8648 17896 8262 17896 7946 c 2 - 17896 7896 l 2 - 17896 7875 17890 7858 17879 7840 c 0 - 17806 7726 17704 7607 17697 7479 c 0 - 17697 7468 17695 7460 17691 7450 c 2 - 17413 6679 l 2 - 17409 6670 17406 6663 17400 6655 c 2 - 17323 6547 l 1 - 17390 6499 17448 6484 17531 6484 c 0 - 17539 6484 17561 6484 17568 6484 c 0 - 17667 6484 17731 6545 17750 6606 c 0 - 17754 6616 17758 6625 17765 6634 c 2 - 17917 6843 l 1x88c021e4cc301c20 - 17916 6857 17918 6872 17924 6886 c 0 - 17937 6922 17937 6964 17937 6983 c 0 - 17937 7013 17935 7048 17935 7071 c 0 - 17935 7072 17935 7078 17935 7079 c 0 - 17937 7161 17945 7164 17954 7182 c 0 - 17959 7192 17965 7200 17974 7207 c 1 - 18195 7612 l 1 - 18209 7657 l 2 - 18220 7689 18243 7712 18273 7721 c 1 - 18272 7725 l 2 - 18272 7728 18272 7736 18272 7739 c 0 - 18272 7769 18273 7759 18273 7764 c 0 - 18289 7940 18465 8091 18554 8223 c 0 - 18558 8230 18562 8236 18568 8241 c 2 - 18699 8373 l 2 - 18731 8404 18773 8412 18814 8394 c 2 - 18814 8394 18815 8393 18817 8393 c 0 - 18821 8391 18820 8392 18822 8391 c 0 - 18826 8390 18827 8390 18831 8389 c 0 - 18847 8387 18859 8386 18871 8387 c 0 - 18905 8390 18963 8397 19012 8458 c 0 - 19025 8474 19040 8484 19059 8491 c 2 - 19389 8600 l 1 - 19399 8616 19413 8629 19432 8638 c 1 - 19409 8707 l 1 - 19337 8761 l 1 - 19333 8764 l 1 - 19329 8766 l 1 - 19309 8782 l 1 - 19288 8776 19266 8777 19244 8786 c 2 - 19232 8790 l 2 - 19230 8791 19218 8795 19215 8795 c 0 - 19212 8795 19191 8796 19185 8796 c 2 - 19153 8796 l 2 - 19152 8796 19149 8796 19148 8795 c 0 - 19072 8778 18958 8713 18799 8702 c 0 - 18799 8702 18795 8702 18794 8702 c 0 - 18790 8702 18776 8703 18772 8704 c 0x88c081e4cc301a20 - 18747 8707 18686 8734 18601 8734 c 0 - 18462 8734 18383 8651 18368 8636 c 2 - 18363 8631 l 1 - 18345 8594 l 2 - 18326 8554 18289 8533 18245 8537 c 0 - 18201 8540 18168 8567 18155 8610 c 0 - 18141 8657 18099 8767 17988 8928 c 2 - 17984 8932 l 1 - 17796 9069 l 2 - 17786 9076 17777 9085 17771 9094 c 1 - 17769 9095 17768 9095 17766 9096 c 1 - 17764 9095 17761 9094 17758 9093 c 2 - 17752 9091 l 2 - 17749 9090 17741 9088 17738 9088 c 0 - 17718 9084 17719 9081 17709 9070 c 0 - 17675 9034 17627 9026 17583 9051 c 0 - 17388 9160 17230 9298 17055 9312 c 2 - 17050 9313 l 1 - 16580 9241 l 2 - 16546 9236 16516 9246 16494 9268 c 1 - 16448 9234 l 2 - 16434 9223 16420 9217 16404 9215 c 1 -17167 8749 m 1 - 17148 8738 17124 8733 17098 8737 c 2 - 17013 8749 l 1 - 16928 8750 l 2 - 16924 8750 16921 8751 16918 8751 c 1x88c025e4cc301c20 - 16859 8746 16798 8736 16719 8736 c 0 - 16573 8736 16447 8780 16352 8887 c 0 - 16346 8894 16337 8905 16331 8914 c 1 - 15917 8851 l 2 - 15869 8843 15826 8867 15807 8912 c 0 - 15788 8958 15801 9004 15840 9034 c 2 - 16189 9296 l 1 - 16188 9315 16193 9333 16203 9351 c 0 - 16219 9380 16244 9397 16277 9402 c 2 - 16346 9413 l 1 - 16452 9492 l 2 - 16499 9528 16560 9519 16595 9472 c 2 - 16609 9453 l 1 - 17032 9517 l 2 - 17040 9518 17047 9518 17055 9518 c 2 - 17072 9516 l 2 - 17282 9499 17461 9364 17625 9264 c 1 - 17638 9270 17651 9276 17666 9280 c 1 - 17671 9287 l 2 - 17706 9334 17766 9344 17814 9309 c 2 - 17834 9295 l 1 - 17858 9295 l 2 - 17913 9294 17953 9256 17958 9204 c 1 - 18118 9088 l 2 - 18127 9081 18134 9075 18141 9065 c 2 - 18155 9046 l 2 - 18211 8965 18252 8894 18283 8834 c 1 - 18346 8881 18454 8939 18601 8939 c 0 - 18737 8939 18789 8914 18799 8908 c 1 - 18907 8918 19043 8981 19102 8995 c 0 - 19112 8997 19143 9001 19153 9001 c 2 - 19185 9001 l 2 - 19202 9001 19231 9000 19243 8998 c 0 - 19244 8998 19245 8998 19246 8997 c 1 - 19281 9023 19328 9023 19366 8995 c 2 - 19439 8940 l 1 - 19457 8933 19471 8922 19482 8908 c 1 - 19557 8851 l 2 - 19575 8838 19586 8823 19593 8802 c 2 - 19658 8607 l 2 - 19677 8551 19650 8496 19593 8477 c 2 - 19574 8471 l 1 - 19562 8451 19543 8436 19518 8427 c 2 - 19150 8305 l 1 - 19045 8195 18924 8189 18895 8183 c 0 - 18889 8182 18883 8182 18877 8182 c 0 - 18847 8183 18831 8182 18803 8187 c 1 - 18719 8103 l 1 - 18616 7954 18485 7838 18477 7746 c 0 - 18477 7746 18477 7856 18477 7739 c 0 - 18477 7739 18477 7736 18477 7735 c 2 - 18482 7633 l 2 - 18485 7574 18444 7528 18385 7525 c 2 - 18380 7525 l 1 - 18379 7522 l 1 - 18145 7094 l 2 - 18143 7090 18141 7087 18138 7083 c 1 - 18139 7082 18140 7080 18140 7077 c 0 - 18140 7075 18140 7071 18140 7070 c 0 - 18140 7052 18142 7018 18142 6983 c 0 - 18142 6941 18138 6907 18133 6879 c 1 - 18149 6847 18145 6809 18122 6777 c 2 - 17939 6526 l 1 - 17887 6390 17749 6279 17568 6279 c 0 - 17561 6279 17539 6279 17531 6279 c 0x88c045e4cc301c20 - 17401 6279 17310 6305 17204 6380 c 2 - 17121 6440 l 2 - 17072 6474 17062 6534 17097 6582 c 2 - 17225 6762 l 1 - 17494 7506 l 1 - 17508 7675 17604 7796 17691 7926 c 1 - 17691 7946 l 2 - 17691 8410 17573 8596 17476 8669 c 2 - 17439 8696 l 1 - 17410 8696 17383 8708 17362 8731 c 1 - 17325 8743 17284 8749 17167 8749 c 1 -18748 8499 m 2 - 18789 8511 18829 8499 18856 8466 c 0 - 18884 8432 18888 8391 18867 8352 c 2 - 18863 8344 l 2 - 18844 8310 18813 8291 18775 8290 c 0 - 18736 8289 18704 8307 18684 8340 c 2 - 18681 8346 l 2 - 18664 8375 18661 8405 18673 8436 c 0 - 18685 8467 18708 8487 18740 8497 c 2 - 18748 8499 l 2 -18943 8602 m 2 - 18999 8592 19033 8545 19025 8489 c 2 - 19025 8488 l 2 - 19021 8455 19005 8430 18977 8413 c 0 - 18949 8396 18919 8394 18888 8405 c 2 - 18885 8406 l 2 - 18832 8426 18806 8476 18821 8530 c 0 - 18836 8584 18884 8613 18939 8603 c 2 - 18943 8602 l 2 -18829 8535 m 2 - 18847 8585 18893 8612 18945 8602 c 2 - 18981 8595 l 2 - 19019 8588 19046 8564 19059 8528 c 0 - 19071 8492 19065 8457 19040 8428 c 0 - 19038 8426 19033 8420 19031 8418 c 0 - 19002 8387 18962 8378 18922 8393 c 2 - 18890 8404 l 2 - 18835 8425 18809 8479 18829 8534 c 2 - 18829 8535 l 2 -18897 8303 m 2 - 18850 8292 18808 8312 18785 8353 c 0 - 18762 8395 18768 8441 18802 8475 c 2 - 18810 8483 l 2 - 18838 8511 18873 8520 18911 8509 c 0 - 18948 8499 18974 8472 18982 8434 c 2 - 18984 8428 l 2 - 18997 8370 18964 8318 18906 8305 c 2 - 18897 8303 l 2 -18601 8652 m 0 - 18605 8652 18617 8652 18621 8652 c 0 - 18680 8648 18721 8602 18717 8543 c 2 - 18717 8542 l 2 - 18715 8516 18706 8495 18687 8476 c 2 - 18520 8309 l 2 - 18483 8272 18431 8268 18388 8298 c 0 - 18346 8328 18332 8379 18355 8426 c 2 - 18423 8566 l 2 - 18430 8580 18438 8591 18450 8601 c 0 - 18462 8610 18510 8652 18601 8652 c 0 -19027 8503 m 2 - 19024 8477 19012 8456 18992 8438 c 0 - 18988 8435 18975 8424 18970 8421 c 2 - 18969 8420 l 1 - 18967 8419 l 2 - 18959 8414 18934 8400 18925 8397 c 0 - 18890 8383 18856 8389 18825 8411 c 0 - 18817 8417 18816 8416 18815 8416 c 0 - 18813 8417 18812 8418 18807 8419 c 0 - 18773 8429 18750 8451 18738 8484 c 0 - 18727 8517 18732 8549 18753 8578 c 2 - 18754 8580 l 2 - 18773 8605 18798 8619 18829 8622 c 0 - 18855 8624 18881 8628 18907 8633 c 0 - 18941 8640 18972 8632 18997 8608 c 0 - 19023 8584 19034 8554 19029 8520 c 2 - 19027 8503 l 2 -2621 9599 m 1 - 2617 9557 2594 9525 2555 9510 c 0 - 2516 9496 2477 9504 2447 9533 c 2 - 2435 9544 l 2 - 2407 9571 2397 9606 2407 9644 c 0x80c001eccc301820 - 2417 9681 2443 9707 2480 9717 c 2 - 2493 9720 l 2 - 2500 9721 2506 9721 2511 9721 c 1 - 2515 9723 2518 9724 2520 9724 c 0 - 2574 9724 2614 9688 2621 9635 c 0 - 2623 9622 2622 9610 2620 9598 c 1 - 2621 9599 l 1 -2351 9519 m 1 -3426 8167 m 2 - 3484 8169 3529 8129 3532 8070 c 2 - 3533 8066 l 2 - 3534 8035 3524 8009 3502 7987 c 0 - 3480 7966 3453 7956 3422 7959 c 2 - 3389 7961 l 2 - 3333 7966 3294 8008 3295 8065 c 0 - 3296 8122 3336 8163 3393 8166 c 2 - 3426 8167 l 2 -6116 8165 m 1 - 6070 8136 6009 8149 5980 8195 c 0 - 5951 8241 5964 8301 6010 8331 c 1 - 6139 8369 6277 8416 6324 8459 c 1 - 6373 8477 6427 8451 6445 8402 c 0 - 6463 8353 6438 8298 6389 8280 c 1 - 6223 8286 l 1 - 6116 8165 l 1 -6101 8458 m 2 - 6123 8482 6150 8494 6182 8493 c 2 - 6396 8485 l 2 - 6440 8483 6474 8459 6489 8418 c 0 - 6504 8377 6494 8336 6461 8307 c 0 - 6369 8224 6193 8172 6068 8135 c 0 - 6022 8121 5979 8137 5953 8177 c 0 - 5927 8218 5931 8264 5962 8300 c 2 - 6101 8458 l 2 -7447 7372 m 2 - 7411 7392 7392 7427 7394 7469 c 0 - 7397 7510 7421 7542 7459 7558 c 2 - 7473 7563 l 2 - 7518 7580 7563 7567 7592 7529 c 0 - 7621 7491 7621 7444 7592 7406 c 0 - 7590 7403 7585 7397 7583 7394 c 0 - 7551 7354 7500 7343 7454 7369 c 2 - 7447 7372 l 2 -20683 7539 m 2 - 20687 7589 20694 7650 20754 7790 c 0 - 20771 7830 20805 7852 20848 7852 c 2 - 20851 7852 l 2 - 20884 7852 20912 7839 20932 7812 c 0 - 20952 7786 20958 7756 20950 7724 c 2 - 20884 7474 l 2 - 20870 7422 20826 7392 20772 7399 c 0 - 20719 7406 20683 7446 20683 7500 c 2 - 20683 7539 l 2 -20634 7323 m 2 - 20658 7374 20710 7395 20762 7377 c 0 - 20814 7358 20840 7308 20826 7254 c 2 - 20807 7181 l 2 - 20799 7150 20780 7127 20750 7114 c 0 - 20721 7101 20691 7101 20662 7116 c 2 - 20650 7122 l 2 - 20599 7148 20579 7204 20603 7256 c 2 - 20634 7323 l 2 -10579 6447 m 2 - 10577 6502 10613 6545 10668 6553 c 0 - 10723 6560 10769 6527 10781 6473 c 2 - 10790 6435 l 2 - 10801 6383 10775 6336 10725 6317 c 0 - 10675 6298 10625 6317 10599 6365 c 0 - 10597 6369 10589 6385 10587 6390 c 0 - 10582 6401 10580 6411 10580 6424 c 2 - 10579 6447 l 2 -18678 8204 m 2 - 18644 8217 18622 8243 18614 8278 c 0 - 18606 8314 18616 8347 18641 8373 c 2 - 18660 8392 l 2 - 18698 8429 18751 8433 18794 8401 c 0 - 18837 8370 18848 8318 18823 8271 c 2 - 18811 8249 l 2 - 18786 8202 18736 8183 18685 8201 c 2 - 18678 8204 l 2 -EndSplineSet -EndChar -StartChar: B -Encoding: 66 66 1 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: C -Encoding: 67 67 2 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: D -Encoding: 68 68 3 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: E -Encoding: 69 69 4 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: F -Encoding: 70 70 5 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: G -Encoding: 71 71 6 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: H -Encoding: 72 72 7 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: I -Encoding: 73 73 8 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: J -Encoding: 74 74 9 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: K -Encoding: 75 75 10 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: L -Encoding: 76 76 11 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: a -Encoding: 97 97 12 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: b -Encoding: 98 98 13 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: c -Encoding: 99 99 14 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: d -Encoding: 100 100 15 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: e -Encoding: 101 101 16 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: f -Encoding: 102 102 17 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: g -Encoding: 103 103 18 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: h -Encoding: 104 104 19 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: i -Encoding: 105 105 20 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: j -Encoding: 106 106 21 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: k -Encoding: 107 107 22 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: l -Encoding: 108 108 23 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: m -Encoding: 109 109 24 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: n -Encoding: 110 110 25 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: o -Encoding: 111 111 26 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: p -Encoding: 112 112 27 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: q -Encoding: 113 113 28 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: r -Encoding: 114 114 29 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: s -Encoding: 115 115 30 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: t -Encoding: 116 116 31 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: u -Encoding: 117 117 32 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: v -Encoding: 118 118 33 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: w -Encoding: 119 119 34 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: x -Encoding: 120 120 35 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: y -Encoding: 121 121 36 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: z -Encoding: 122 122 37 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: M -Encoding: 77 77 38 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: N -Encoding: 78 78 39 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: O -Encoding: 79 79 40 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: P -Encoding: 80 80 41 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Q -Encoding: 81 81 42 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: R -Encoding: 82 82 43 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: S -Encoding: 83 83 44 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: T -Encoding: 84 84 45 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: U -Encoding: 85 85 46 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: V -Encoding: 86 86 47 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: W -Encoding: 87 87 48 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: X -Encoding: 88 88 49 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Y -Encoding: 89 89 50 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Z -Encoding: 90 90 51 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: zero -Encoding: 48 48 52 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: one -Encoding: 49 49 53 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: two -Encoding: 50 50 54 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: three -Encoding: 51 51 55 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: four -Encoding: 52 52 56 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: five -Encoding: 53 53 57 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: six -Encoding: 54 54 58 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: seven -Encoding: 55 55 59 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: eight -Encoding: 56 56 60 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: nine -Encoding: 57 57 61 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: braceleft -Encoding: 123 123 62 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: bar -Encoding: 124 124 63 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: braceright -Encoding: 125 125 64 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: asciitilde -Encoding: 126 126 65 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: dieresis -Encoding: 168 168 66 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: copyright -Encoding: 169 169 67 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: ordfeminine -Encoding: 170 170 68 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: guillemotleft -Encoding: 171 171 69 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: logicalnot -Encoding: 172 172 70 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: uni00AD -Encoding: 173 173 71 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: registered -Encoding: 174 174 72 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: macron -Encoding: 175 175 73 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: degree -Encoding: 176 176 74 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: plusminus -Encoding: 177 177 75 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: uni00B2 -Encoding: 178 178 76 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: uni00B3 -Encoding: 179 179 77 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: acute -Encoding: 180 180 78 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: uni00B5 -Encoding: 181 181 79 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: paragraph -Encoding: 182 182 80 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: periodcentered -Encoding: 183 183 81 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: cedilla -Encoding: 184 184 82 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: uni00B9 -Encoding: 185 185 83 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: ordmasculine -Encoding: 186 186 84 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: guillemotright -Encoding: 187 187 85 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: onequarter -Encoding: 188 188 86 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: onehalf -Encoding: 189 189 87 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: threequarters -Encoding: 190 190 88 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: questiondown -Encoding: 191 191 89 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Agrave -Encoding: 192 192 90 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Aacute -Encoding: 193 193 91 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Acircumflex -Encoding: 194 194 92 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Atilde -Encoding: 195 195 93 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Adieresis -Encoding: 196 196 94 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Aring -Encoding: 197 197 95 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: AE -Encoding: 198 198 96 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Ccedilla -Encoding: 199 199 97 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Egrave -Encoding: 200 200 98 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Eacute -Encoding: 201 201 99 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Ecircumflex -Encoding: 202 202 100 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Edieresis -Encoding: 203 203 101 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Igrave -Encoding: 204 204 102 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Iacute -Encoding: 205 205 103 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Icircumflex -Encoding: 206 206 104 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Idieresis -Encoding: 207 207 105 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Eth -Encoding: 208 208 106 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Ntilde -Encoding: 209 209 107 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Ograve -Encoding: 210 210 108 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Oacute -Encoding: 211 211 109 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Ocircumflex -Encoding: 212 212 110 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Otilde -Encoding: 213 213 111 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Odieresis -Encoding: 214 214 112 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: multiply -Encoding: 215 215 113 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Oslash -Encoding: 216 216 114 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Ugrave -Encoding: 217 217 115 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Uacute -Encoding: 218 218 116 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Ucircumflex -Encoding: 219 219 117 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Udieresis -Encoding: 220 220 118 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Yacute -Encoding: 221 221 119 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: Thorn -Encoding: 222 222 120 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: germandbls -Encoding: 223 223 121 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: agrave -Encoding: 224 224 122 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: aacute -Encoding: 225 225 123 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: acircumflex -Encoding: 226 226 124 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: atilde -Encoding: 227 227 125 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: adieresis -Encoding: 228 228 126 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: aring -Encoding: 229 229 127 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: ae -Encoding: 230 230 128 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: ccedilla -Encoding: 231 231 129 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: egrave -Encoding: 232 232 130 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: eacute -Encoding: 233 233 131 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: ecircumflex -Encoding: 234 234 132 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: edieresis -Encoding: 235 235 133 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: igrave -Encoding: 236 236 134 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: iacute -Encoding: 237 237 135 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: icircumflex -Encoding: 238 238 136 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: idieresis -Encoding: 239 239 137 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: eth -Encoding: 240 240 138 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: ntilde -Encoding: 241 241 139 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: ograve -Encoding: 242 242 140 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: oacute -Encoding: 243 243 141 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: ocircumflex -Encoding: 244 244 142 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: otilde -Encoding: 245 245 143 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: odieresis -Encoding: 246 246 144 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: divide -Encoding: 247 247 145 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: oslash -Encoding: 248 248 146 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: ugrave -Encoding: 249 249 147 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: uacute -Encoding: 250 250 148 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: ucircumflex -Encoding: 251 251 149 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: udieresis -Encoding: 252 252 150 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: yacute -Encoding: 253 253 151 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: thorn -Encoding: 254 254 152 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: ydieresis -Encoding: 255 255 153 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: exclamdown -Encoding: 161 161 154 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: cent -Encoding: 162 162 155 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: sterling -Encoding: 163 163 156 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: currency -Encoding: 164 164 157 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: yen -Encoding: 165 165 158 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: brokenbar -Encoding: 166 166 159 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: section -Encoding: 167 167 160 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: exclam -Encoding: 33 33 161 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: quotedbl -Encoding: 34 34 162 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: numbersign -Encoding: 35 35 163 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: dollar -Encoding: 36 36 164 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: percent -Encoding: 37 37 165 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: ampersand -Encoding: 38 38 166 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: quotesingle -Encoding: 39 39 167 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: parenleft -Encoding: 40 40 168 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: parenright -Encoding: 41 41 169 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: asterisk -Encoding: 42 42 170 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: plus -Encoding: 43 43 171 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: comma -Encoding: 44 44 172 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: hyphen -Encoding: 45 45 173 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: period -Encoding: 46 46 174 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: slash -Encoding: 47 47 175 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -StartChar: uni0000 -Encoding: 0 0 176 -Width: 23166 -VWidth: 0 -Flags: W -HStem: 5524 204<10875.6 11159 11159 11440.1> 5855 205<8611.46 8955 8955 9142> 5872 205<19847.1 20196.2> 5967 204<9343 9556.62> 6279 205<17427.3 17730.8> 6445 205<16317 16535.6 19949 20040> 6648 205<1997.88 2631> 6795 205<1686 1830.58 2961.66 3017.53> 7211 205<2436.28 2595> 8058 214<2409 2413 11022 11064.1 11065.4 11321.4 11322 11751.7> 8277 209<20014.2 20132.7 20133.2 20153.2> 8339 681<4405 4941> 8449 205<7648.98 8011.24> 8575 196<8197.19 8471 10223 10259.3 16072 16371> 8630 205<11325 11472.6> 8691 205<11017.4 11167.2> 8704 205<11439.8 11765.5> 8736 205<16682.5 16884.8 18379.9 18720.9> 8751 206<16798.7 17036.8 17163 17340.3> 8778 205<6259.33 6470.63> 9038 204<8861.17 9058.92> 9082 205<8115.29 8729.36> 9099 205<1437 1845 2026 2045.56 2045.56 2122.53> 9501 8<2339 2483> 9699 205<1584.2 1755.98> -VStem: 637 205<9067.71 9254> 1182 204<8223 8556.1> 2204 205<7878 8055> 2407 78<9604.43 9611 9617 9668.32> 3529 4<8012.31 8070> 5374 205<7337.12 7591 7591 7597> 5519 203<6932.56 7054.87> 5823 204<7569 7674> 8259 205<6745.88 7328.77> 8974 205<6972 7307.99> 9009 204<7593.01 7916> 10260 205<7833.93 7990 8780 9457.91> 10526 3<7604 7686 7742 7756.77> 10531 204.145<7547 7604 7604 7609 7686 7817 7817 7849> 10532 19<7136 7601 7601 7604> 10805 205<8894 9772 10037 10082> 10826 196<6648.38 6669 6669 8058> 12169 205<6966.1 7177> 12676 205<10230.8 10405> 12888 203<7892.32 8232.34 8233 8247.58 8248 8410.53> 12948 206<6720.18 7091.09> 12988 207<8963.19 9080.48 9371 9553> 13036 205<9774 9892.58> 13075 205<10023.4 10304.1> 14815 205<7620.78 8026.91> 14832 207<7530 7699.73> 16584 205<7737.41 8039 8039 8045> 17691 205<7926 8494.48> 17917 225<6843 6983> 17935 2<6986 7065 7065 7071> 17977 213<7739 8012> 19559 205<7475.36 7687.1> 19601 205<6825.98 7303.62> 20478 205<7473 7539 7548 7618.88> -Refer: 0 65 N 1 0 0 1 0 0 2 -EndChar -EndChars -EndSplineFont diff --git a/rostests/apitests/testdata/test.ttf b/rostests/apitests/testdata/test.ttf deleted file mode 100644 index 6d5cb677a9b..00000000000 Binary files a/rostests/apitests/testdata/test.ttf and /dev/null differ diff --git a/rostests/apitests/user32/CMakeLists.txt b/rostests/apitests/user32/CMakeLists.txt deleted file mode 100644 index 582902e6895..00000000000 --- a/rostests/apitests/user32/CMakeLists.txt +++ /dev/null @@ -1,29 +0,0 @@ - -add_definitions(-D_DLL -D__USE_CRTIMP) - -set_rc_compiler() - -list(APPEND SOURCE - helper.c - DeferWindowPos.c - GetIconInfo.c - GetKeyState.c - GetPeekMessage.c - GetSystemMetrics.c - InitializeLpkHooks.c - RealGetWindowClass.c - ScrollDC.c - ScrollWindowEx.c - SetCursorPos.c - SetActiveWindow.c - SystemParametersInfo.c - TrackMouseEvent.c - WndProc.c - testlist.c - user32_apitest.rc) - -add_executable(user32_apitest ${SOURCE}) -target_link_libraries(user32_apitest wine) -set_module_type(user32_apitest win32cui) -add_importlibs(user32_apitest gdi32 user32 msvcrt kernel32 ntdll) -add_cd_file(TARGET user32_apitest DESTINATION reactos/bin FOR all) diff --git a/rostests/apitests/user32/DeferWindowPos.c b/rostests/apitests/user32/DeferWindowPos.c deleted file mode 100644 index b8468ff0674..00000000000 --- a/rostests/apitests/user32/DeferWindowPos.c +++ /dev/null @@ -1,530 +0,0 @@ -/* - * PROJECT: ReactOS API tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for DeferWindowPos function family - * PROGRAMMERS: Thomas Faber - */ - -#include -#include -#include -#include "helper.h" -#include - -HWND hWnd1, hWnd2, hWnd3, hWnd4; - -/* FIXME: test for HWND_TOP, etc...*/ -static int get_iwnd(HWND hWnd) -{ - if(hWnd == hWnd1) return 1; - else if(hWnd == hWnd2) return 2; - else if(hWnd == hWnd3) return 3; - else if(hWnd == hWnd4) return 4; - else return 0; -} - -LRESULT CALLBACK DWPTestProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - int iwnd = get_iwnd(hWnd); - - if(message > WM_USER || !iwnd || IsDWmMsg(message) || IseKeyMsg(message)) - return DefWindowProc(hWnd, message, wParam, lParam); - - switch(message) - { - case WM_IME_SETCONTEXT: - case WM_IME_NOTIFY : - case WM_GETICON : - case WM_GETTEXT: - break; - case WM_WINDOWPOSCHANGING: - case WM_WINDOWPOSCHANGED: - { - WINDOWPOS* pwp = (WINDOWPOS*)lParam; - ok(wParam==0,"expected wParam=0\n"); - record_message(iwnd, message, SENT, get_iwnd(pwp->hwndInsertAfter), pwp->flags); - break; - } - default: - record_message(iwnd, message, SENT, 0,0); - } - return DefWindowProc(hWnd, message, wParam, lParam); -} - -static void FlushMessages() -{ - MSG msg; - - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) - { - int iwnd = get_iwnd(msg.hwnd); - if(!(msg.message > WM_USER || !iwnd || IsDWmMsg(msg.message) || IseKeyMsg(msg.message))) - record_message(iwnd, msg.message, POST,0,0); - DispatchMessageA( &msg ); - } -} - -/* unfortunately sometimes MSCTF windows get between the expected chain of windows - so just checking the next window does not work*/ -static BOOL IsNext(HWND hWnd1, HWND hWnd2) -{ - HWND hWndNext; - - hWndNext=hWnd1; - while((hWndNext = GetWindow(hWndNext,GW_HWNDNEXT))) - { - if(hWndNext == hWnd2) - { - return TRUE; - } - } - return FALSE; -} - -#define EXPECT_NEXT(hWnd1, hWnd2) \ - ok(IsNext(hWnd1, hWnd2), \ - "After hwnd%d, expected hwnd%d not hwnd%d\n", \ - get_iwnd(hWnd1), get_iwnd(hWnd2),get_iwnd(GetWindow(hWnd1,GW_HWNDNEXT)) ) - -#define EXPECT_CHAIN(A,B,C,D) \ - EXPECT_NEXT(hWnd##A, hWnd##B); \ - EXPECT_NEXT(hWnd##B, hWnd##C); \ - EXPECT_NEXT(hWnd##C, hWnd##D); - -#define ok_windowpos(hwnd, x, y, w, h, wnd) do { RECT rt; GetWindowRect(hwnd, &rt); \ - ok(rt.left == (x) && rt.top == (y) && rt.right == (x)+(w) && rt.bottom == (y)+(h), \ - "Unexpected %s position: (%ld, %ld) - (%ld, %ld)\n", wnd, rt.left, rt.top, rt.right, rt.bottom); } while (0) - -#define ok_lasterr(err, s) ok(GetLastError() == (err), "%s error = %lu\n", s, GetLastError()) - -static void set_default_pos() -{ - SetWindowPos(hWnd1, 0, 10,20,200,210, SWP_NOOWNERZORDER|SWP_SHOWWINDOW|SWP_NOACTIVATE); - SetWindowPos(hWnd2, 0, 30,40,220,230, SWP_NOOWNERZORDER|SWP_SHOWWINDOW|SWP_NOACTIVATE); - SetWindowPos(hWnd3, 0, 20,350,300,300, SWP_NOOWNERZORDER|SWP_SHOWWINDOW|SWP_NOACTIVATE); - SetWindowPos(hWnd4, 0, 250,250,200,200, SWP_NOOWNERZORDER|SWP_SHOWWINDOW|SWP_NOACTIVATE); - SetActiveWindow(hWnd4); - FlushMessages(); - empty_message_cache(); -} - -static void Test_DWP_Error(HWND hWnd, HWND hWnd2) -{ - HDWP hDwp; - BOOL ret; - - ok_windowpos(hWnd1, 10, 20, 200, 210, "Window 1"); - ok_windowpos(hWnd2, 30, 40, 220, 230, "Window 2"); - - /* close invalid handles */ - SetLastError(DNS_ERROR_RCODE_NXRRSET); - ret = EndDeferWindowPos(NULL); - ok(ret == 0, "EndDeferWindowPos succeeded with invalid handle\n"); - ok_lasterr(ERROR_INVALID_DWP_HANDLE, "EndDeferWindowPos"); - - SetLastError(DNS_ERROR_RCODE_NXRRSET); - ret = EndDeferWindowPos((HDWP)-1); - ok(ret == 0, "EndDeferWindowPos succeeded with invalid handle\n"); - ok_lasterr(ERROR_INVALID_DWP_HANDLE, "EndDeferWindowPos"); - - /* negative window count */ - SetLastError(DNS_ERROR_RCODE_NXRRSET); - hDwp = BeginDeferWindowPos(-1); - ok(hDwp == NULL, "BeginDeferWindowPos failed\n"); - ok_lasterr(ERROR_INVALID_PARAMETER, "BeginDeferWindowPos"); - - /* zero windows */ - SetLastError(DNS_ERROR_RCODE_NXRRSET); - hDwp = BeginDeferWindowPos(0); - ok(hDwp != NULL, "BeginDeferWindowPos failed\n"); - ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "BeginDeferWindowPos"); - ret = EndDeferWindowPos(hDwp); - ok(ret != 0, "EndDeferWindowPos failed\n"); - ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "EndDeferWindowPos"); - - /* more windows than expected */ - SetLastError(DNS_ERROR_RCODE_NXRRSET); - hDwp = BeginDeferWindowPos(0); - ok(hDwp != NULL, "BeginDeferWindowPos failed\n"); - ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "BeginDeferWindowPos"); - hDwp = DeferWindowPos(hDwp, hWnd, NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER); - ok(hDwp != NULL, "DeferWindowPos failed\n"); - ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "DeferWindowPos"); - ret = EndDeferWindowPos(hDwp); - ok(ret != 0, "EndDeferWindowPos failed\n"); - ok(GetLastError() == ERROR_SUCCESS /* win7 sp1/x64 */ - || GetLastError() == ERROR_INVALID_WINDOW_HANDLE /* 2k3 sp1/x86 */, - "EndDeferWindowPos error = %lu\n", GetLastError()); - ok_windowpos(hWnd, 10, 20, 200, 210, "Window 1"); - - /* more windows than expected 2 */ - SetLastError(DNS_ERROR_RCODE_NXRRSET); - hDwp = BeginDeferWindowPos(1); - ok(hDwp != NULL, "BeginDeferWindowPos failed\n"); - ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "BeginDeferWindowPos"); - hDwp = DeferWindowPos(hDwp, hWnd, NULL, 30, 20, 190, 195, SWP_NOZORDER); - ok(hDwp != NULL, "DeferWindowPos failed\n"); - ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "DeferWindowPos"); - hDwp = DeferWindowPos(hDwp, hWnd2, NULL, 20, 30, 195, 190, SWP_NOZORDER); - ok(hDwp != NULL, "DeferWindowPos failed\n"); - ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "DeferWindowPos"); - ret = EndDeferWindowPos(hDwp); - ok(ret != 0, "EndDeferWindowPos failed\n"); - ok_lasterr(ERROR_SUCCESS, "EndDeferWindowPos"); - ok_windowpos(hWnd, 30, 20, 190, 195, "Window 1"); - ok_windowpos(hWnd2, 20, 30, 195, 190, "Window 2"); - - /* fewer windows than expected */ - MoveWindow(hWnd, 10, 20, 200, 210, FALSE); - SetLastError(DNS_ERROR_RCODE_NXRRSET); - hDwp = BeginDeferWindowPos(2); - ok(hDwp != NULL, "BeginDeferWindowPos failed\n"); - ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "BeginDeferWindowPos"); - hDwp = DeferWindowPos(hDwp, hWnd, NULL, 20, 10, 210, 200, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER); - ok(hDwp != NULL, "DeferWindowPos failed\n"); - ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "DeferWindowPos"); - ret = EndDeferWindowPos(hDwp); - ok(ret != 0, "EndDeferWindowPos failed\n"); - ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "EndDeferWindowPos"); - ok_windowpos(hWnd, 10, 20, 200, 210, "Window 1"); - - /* no operation, 1 window */ - SetLastError(DNS_ERROR_RCODE_NXRRSET); - hDwp = BeginDeferWindowPos(1); - ok(hDwp != NULL, "BeginDeferWindowPos failed\n"); - ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "BeginDeferWindowPos"); - hDwp = DeferWindowPos(hDwp, hWnd, NULL, 20, 10, 210, 200, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER); - ok(hDwp != NULL, "DeferWindowPos failed\n"); - ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "DeferWindowPos"); - ret = EndDeferWindowPos(hDwp); - ok(ret != 0, "EndDeferWindowPos failed\n"); - ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "EndDeferWindowPos"); - ok_windowpos(hWnd, 10, 20, 200, 210, "Window 1"); - - /* same window twice */ - SetLastError(DNS_ERROR_RCODE_NXRRSET); - hDwp = BeginDeferWindowPos(2); - ok(hDwp != NULL, "BeginDeferWindowPos failed\n"); - ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "BeginDeferWindowPos"); - hDwp = DeferWindowPos(hDwp, hWnd, NULL, 80, 90, 220, 210, SWP_NOZORDER); - ok(hDwp != NULL, "DeferWindowPos failed\n"); - ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "DeferWindowPos"); - hDwp = DeferWindowPos(hDwp, hWnd, NULL, 100, 110, 230, 250, SWP_NOZORDER); - ok(hDwp != NULL, "DeferWindowPos failed\n"); - ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "DeferWindowPos"); - ret = EndDeferWindowPos(hDwp); - ok(ret != 0, "EndDeferWindowPos failed\n"); - ok_lasterr(ERROR_SUCCESS, "EndDeferWindowPos"); - ok_windowpos(hWnd, 100, 110, 230, 250, "Window 1"); - - /* move & resize operation, 1 window */ - SetLastError(DNS_ERROR_RCODE_NXRRSET); - hDwp = BeginDeferWindowPos(1); - ok(hDwp != NULL, "BeginDeferWindowPos failed\n"); - ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "BeginDeferWindowPos"); - hDwp = DeferWindowPos(hDwp, hWnd, NULL, 20, 10, 210, 200, SWP_NOZORDER); - ok(hDwp != NULL, "DeferWindowPos failed\n"); - ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "DeferWindowPos"); - ret = EndDeferWindowPos(hDwp); - ok(ret != 0, "EndDeferWindowPos failed\n"); - ok_lasterr(ERROR_SUCCESS, "EndDeferWindowPos"); - ok_windowpos(hWnd, 20, 10, 210, 200, "Window 1"); - - /* move & resize operation, 2 windows */ - SetLastError(DNS_ERROR_RCODE_NXRRSET); - hDwp = BeginDeferWindowPos(2); - ok(hDwp != NULL, "BeginDeferWindowPos failed\n"); - ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "BeginDeferWindowPos"); - hDwp = DeferWindowPos(hDwp, hWnd, NULL, 50, 60, 230, 240, SWP_NOZORDER); - ok(hDwp != NULL, "DeferWindowPos failed\n"); - ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "DeferWindowPos"); - hDwp = DeferWindowPos(hDwp, hWnd2, NULL, 70, 80, 250, 260, SWP_NOZORDER); - ok(hDwp != NULL, "DeferWindowPos failed\n"); - ok_lasterr(DNS_ERROR_RCODE_NXRRSET, "DeferWindowPos"); - ret = EndDeferWindowPos(hDwp); - ok(ret != 0, "EndDeferWindowPos failed\n"); - ok_lasterr(ERROR_SUCCESS, "EndDeferWindowPos"); - ok_windowpos(hWnd, 50, 60, 230, 240, "Window 1"); - ok_windowpos(hWnd2, 70, 80, 250, 260, "Window 2"); - - FlushMessages(); - empty_message_cache(); -} - -MSG_ENTRY move1_chain[]={ - {1,WM_WINDOWPOSCHANGING, SENT, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER}, - {1,WM_GETMINMAXINFO}, - {1,WM_WINDOWPOSCHANGED, SENT, 0, SWP_NOSIZE | SWP_NOACTIVATE|SWP_NOOWNERZORDER | SWP_NOCLIENTSIZE}, - {1,WM_MOVE}, - {0,0}}; - -MSG_ENTRY resize1_chain[]={ - {1,WM_WINDOWPOSCHANGING, SENT, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER}, - {1,WM_GETMINMAXINFO}, - {1,WM_NCCALCSIZE}, - {1,WM_WINDOWPOSCHANGED, SENT, 0, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE|SWP_NOOWNERZORDER | SWP_NOCLIENTMOVE}, - {1,WM_SIZE}, - {1,WM_NCCALCSIZE}, - {0,0}}; - -MSG_ENTRY move1_2_chain[]={ - {1,WM_WINDOWPOSCHANGING, SENT, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER}, - {1,WM_GETMINMAXINFO}, - {2,WM_WINDOWPOSCHANGING, SENT, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER}, - {2,WM_GETMINMAXINFO}, - {1,WM_WINDOWPOSCHANGED, SENT, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE|SWP_NOOWNERZORDER | SWP_NOCLIENTSIZE}, - {1,WM_MOVE}, - {2,WM_WINDOWPOSCHANGED, SENT, 0, SWP_NOSIZE | SWP_NOACTIVATE|SWP_NOOWNERZORDER | SWP_NOCLIENTSIZE}, - {2,WM_MOVE}, - {0,0}}; - - -MSG_ENTRY ZOrder1_chain[]={ - {1,WM_WINDOWPOSCHANGING, SENT, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOMOVE|SWP_NOSIZE}, - {1,WM_WINDOWPOSCHANGED, SENT, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOMOVE|SWP_NOSIZE | SWP_NOCLIENTMOVE|SWP_NOCLIENTSIZE}, - {0,0}}; - -MSG_ENTRY ZOrder1and2_chain[]={ - {1,WM_WINDOWPOSCHANGING, SENT, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOMOVE|SWP_NOSIZE}, - {2,WM_WINDOWPOSCHANGING, SENT, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOMOVE|SWP_NOSIZE}, - {1,WM_WINDOWPOSCHANGED, SENT, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOMOVE|SWP_NOSIZE | SWP_NOCLIENTMOVE|SWP_NOCLIENTSIZE}, - {2,WM_WINDOWPOSCHANGED, SENT, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOMOVE|SWP_NOSIZE | SWP_NOCLIENTMOVE|SWP_NOCLIENTSIZE}, - {0,0}}; - -static void Test_DWP_SimpleMsg(HWND hWnd1, HWND hWnd2) -{ - HDWP hdwp; - BOOL ret; - - SetWindowPos(hWnd1, 0, 10,20,100,100,0); - SetWindowPos(hWnd2, 0, 10,20,100,100,0); - FlushMessages(); - empty_message_cache(); - - /* move hWnd1 */ - hdwp = BeginDeferWindowPos(1); - ok(hdwp != NULL, "BeginDeferWindowPos failed\n"); - hdwp = DeferWindowPos(hdwp, hWnd1, HWND_TOP, 20, 30, 100, 100, SWP_NOACTIVATE|SWP_NOOWNERZORDER); - ok(hdwp != NULL, "DeferWindowPos failed\n"); - FlushMessages(); - COMPARE_CACHE(empty_chain); - ret = EndDeferWindowPos(hdwp); - ok(ret != 0, "EndDeferWindowPos failed\n"); - FlushMessages(); - COMPARE_CACHE(move1_chain); - - /* resize hWnd1 */ - hdwp = BeginDeferWindowPos(1); - ok(hdwp != NULL, "BeginDeferWindowPos failed\n"); - hdwp = DeferWindowPos(hdwp, hWnd1, HWND_TOP, 20, 30, 110, 110, SWP_NOACTIVATE|SWP_NOOWNERZORDER); - ok(hdwp != NULL, "DeferWindowPos failed\n"); - FlushMessages(); - COMPARE_CACHE(empty_chain); - ret = EndDeferWindowPos(hdwp); - ok(ret != 0, "EndDeferWindowPos failed\n"); - FlushMessages(); - COMPARE_CACHE(resize1_chain); - - /* move both windows */ - hdwp = BeginDeferWindowPos(1); - ok(hdwp != NULL, "BeginDeferWindowPos failed\n"); - hdwp = DeferWindowPos(hdwp, hWnd1, HWND_TOP, 30, 40, 110, 110, SWP_NOACTIVATE|SWP_NOOWNERZORDER); - ok(hdwp != NULL, "DeferWindowPos failed\n"); - hdwp = DeferWindowPos(hdwp, hWnd2, HWND_TOP, 30, 40, 100, 100, SWP_NOACTIVATE|SWP_NOOWNERZORDER); - ok(hdwp != NULL, "DeferWindowPos failed\n"); - FlushMessages(); - COMPARE_CACHE(empty_chain); - ret = EndDeferWindowPos(hdwp); - ok(ret != 0, "EndDeferWindowPos failed\n"); - FlushMessages(); - COMPARE_CACHE(move1_2_chain); - - /* change the z-order of the first window */ - hdwp = BeginDeferWindowPos(1); - ok(hdwp != NULL, "BeginDeferWindowPos failed\n"); - hdwp = DeferWindowPos(hdwp, hWnd1, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOMOVE|SWP_NOSIZE); - ok(hdwp != NULL, "DeferWindowPos failed\n"); - FlushMessages(); - COMPARE_CACHE(empty_chain); - ret = EndDeferWindowPos(hdwp); - ok(ret != 0, "EndDeferWindowPos failed\n"); - FlushMessages(); - COMPARE_CACHE(ZOrder1_chain); - - /* change the z-order of both windows */ - hdwp = BeginDeferWindowPos(2); - ok(hdwp != NULL, "BeginDeferWindowPos failed\n"); - hdwp = DeferWindowPos(hdwp, hWnd1, HWND_TOP, 0, 0, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOMOVE|SWP_NOSIZE); - ok(hdwp != NULL, "DeferWindowPos failed\n"); - hdwp = DeferWindowPos(hdwp, hWnd2, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOMOVE|SWP_NOSIZE); - ok(hdwp != NULL, "DeferWindowPos failed\n"); - FlushMessages(); - COMPARE_CACHE(empty_chain); - ret = EndDeferWindowPos(hdwp); - ok(ret != 0, "EndDeferWindowPos failed\n"); - FlushMessages(); - COMPARE_CACHE(ZOrder1and2_chain); - -} - -#define OwnerZOrderAParams SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOSIZE - -MSG_ENTRY OwnerZOrder1A_chain[]={ - {4,WM_WINDOWPOSCHANGING, SENT,0, OwnerZOrderAParams}, - {3,WM_WINDOWPOSCHANGING, SENT,4, OwnerZOrderAParams}, - {1,WM_WINDOWPOSCHANGING, SENT,3, OwnerZOrderAParams}, - {0,0}}; - -MSG_ENTRY OwnerZOrder2A_chain[]={ - {2,WM_WINDOWPOSCHANGING, SENT, 0, OwnerZOrderAParams}, - {2,WM_WINDOWPOSCHANGED , SENT, 0, OwnerZOrderAParams | SWP_NOCLIENTMOVE|SWP_NOCLIENTSIZE}, - {0,0}}; - -MSG_ENTRY OwnerZOrder3A_chain[]={ - {3,WM_WINDOWPOSCHANGING, SENT, 0, OwnerZOrderAParams}, - {4,WM_WINDOWPOSCHANGING, SENT, 0, OwnerZOrderAParams}, - {1,WM_WINDOWPOSCHANGING, SENT, 4, OwnerZOrderAParams}, - {3,WM_WINDOWPOSCHANGED, SENT, 0, OwnerZOrderAParams |SWP_NOCLIENTMOVE|SWP_NOCLIENTSIZE}, - {4,WM_WINDOWPOSCHANGED, SENT, 0, OwnerZOrderAParams |SWP_NOCLIENTMOVE|SWP_NOCLIENTSIZE}, - {1,WM_WINDOWPOSCHANGED, SENT, 4, OwnerZOrderAParams |SWP_NOCLIENTMOVE|SWP_NOCLIENTSIZE}, - {0,0}}; - -MSG_ENTRY OwnerZOrder4A_chain[]={ - {3,WM_WINDOWPOSCHANGING, SENT, 0 ,OwnerZOrderAParams}, - {4,WM_WINDOWPOSCHANGING, SENT, 0, OwnerZOrderAParams} , - {1,WM_WINDOWPOSCHANGING, SENT, 4, OwnerZOrderAParams}, - {0,0}}; - -MSG_ENTRY OwnerZOrder5A_chain[]={ - {4,WM_WINDOWPOSCHANGING, SENT, 0, OwnerZOrderAParams}, - {3,WM_WINDOWPOSCHANGING, SENT, 4, OwnerZOrderAParams}, - {1,WM_WINDOWPOSCHANGING, SENT, 3, OwnerZOrderAParams}, - {4,WM_WINDOWPOSCHANGED, SENT, 0, OwnerZOrderAParams|SWP_NOCLIENTMOVE|SWP_NOCLIENTSIZE}, - {0,0}}; - -#define OwnerZOrderBParams SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOOWNERZORDER - -MSG_ENTRY OwnerZOrder1B_chain[]={ - {1,WM_WINDOWPOSCHANGING, SENT, 0, OwnerZOrderBParams}, - {1,WM_WINDOWPOSCHANGED, SENT, 0, OwnerZOrderBParams | SWP_NOCLIENTMOVE|SWP_NOCLIENTSIZE}, - {0,0}}; - -MSG_ENTRY OwnerZOrder2B_chain[]={ - {2,WM_WINDOWPOSCHANGING, SENT, 0, OwnerZOrderBParams}, - {2,WM_WINDOWPOSCHANGED, SENT, 0, OwnerZOrderBParams | SWP_NOCLIENTMOVE|SWP_NOCLIENTSIZE}, - {0,0}}; - -MSG_ENTRY OwnerZOrder3B_chain[]={ - {3,WM_WINDOWPOSCHANGING, SENT, 0, OwnerZOrderBParams}, - {3,WM_WINDOWPOSCHANGED, SENT, 0, OwnerZOrderBParams | SWP_NOCLIENTMOVE|SWP_NOCLIENTSIZE}, - {0,0}}; - -MSG_ENTRY OwnerZOrder4B_chain[]={ - {1,WM_WINDOWPOSCHANGING, SENT, 0, OwnerZOrderBParams}, - {1,WM_WINDOWPOSCHANGED, SENT, 0, OwnerZOrderBParams | SWP_NOCLIENTMOVE|SWP_NOCLIENTSIZE}, - {0,0}}; - -MSG_ENTRY OwnerZOrder5B_chain[]={ - {4,WM_WINDOWPOSCHANGING, SENT, 0, OwnerZOrderBParams}, - {4,WM_WINDOWPOSCHANGED, SENT, 0, OwnerZOrderBParams | SWP_NOCLIENTMOVE|SWP_NOCLIENTSIZE}, - {0,0}}; - -static void Test_DWP_OwnerZOrder() -{ - EXPECT_CHAIN(4,3,1,2); - - /* test how SetWindowPos can change the z order of owner windows */ - /* note that SWP_NOACTIVATE must be used because otherwise - SetWindowPos will call SetWindowPos again with different parameters */ - SetWindowPos(hWnd1, 0, 0,0,0,0, OwnerZOrderAParams); - FlushMessages(); - COMPARE_CACHE(OwnerZOrder1A_chain); - EXPECT_CHAIN(4,3,1,2); - - SetWindowPos(hWnd2, 0, 0,0,0,0, OwnerZOrderAParams); - FlushMessages(); - COMPARE_CACHE(OwnerZOrder2A_chain); - EXPECT_CHAIN(2,4,3,1); - - SetWindowPos(hWnd3, 0, 0,0,0,0, OwnerZOrderAParams); - FlushMessages(); - COMPARE_CACHE(OwnerZOrder3A_chain); - EXPECT_CHAIN(3,4,1,2); - - SetWindowPos(hWnd1, 0, 0,0,0,0, OwnerZOrderAParams); - FlushMessages(); - COMPARE_CACHE(OwnerZOrder4A_chain); - EXPECT_CHAIN(3,4,1,2); - - SetWindowPos(hWnd4, 0, 0,0,0,0, OwnerZOrderAParams); - FlushMessages(); - COMPARE_CACHE(OwnerZOrder5A_chain); - EXPECT_CHAIN(4,3,1,2); - - /* now do the same thing one more time with SWP_NOOWNERZORDER */ - /* SWP_NOACTIVATE is needed because without it SetActiveWindow - will be calledit and it will call SetWindowPos again - WITHOUT SWP_NOOWNERZORDER. that means that - in order for SWP_NOOWNERZORDER to have effect we have to use - SWP_NOACTIVATE as well */ - set_default_pos(); - EXPECT_CHAIN(4,3,2,1); - - SetWindowPos(hWnd1, 0, 0,0,0,0, OwnerZOrderBParams); - FlushMessages(); - COMPARE_CACHE(OwnerZOrder1B_chain); - EXPECT_CHAIN(1,4,3,2); - - SetWindowPos(hWnd2, 0, 0,0,0,0, OwnerZOrderBParams); - FlushMessages(); - COMPARE_CACHE(OwnerZOrder2B_chain); - EXPECT_CHAIN(2,1,4,3); - - SetWindowPos(hWnd3, 0, 0,0,0,0, OwnerZOrderBParams); - FlushMessages(); - COMPARE_CACHE(OwnerZOrder3B_chain); - EXPECT_CHAIN(3,2,1,4); - - SetWindowPos(hWnd1, 0, 0,0,0,0, OwnerZOrderBParams); - FlushMessages(); - COMPARE_CACHE(OwnerZOrder4B_chain); - EXPECT_CHAIN(1,3,2,4); - - SetWindowPos(hWnd4, 0, 0,0,0,0, OwnerZOrderBParams); - FlushMessages(); - COMPARE_CACHE(OwnerZOrder5B_chain); - EXPECT_CHAIN(4,1,3,2); - -} - -START_TEST(DeferWindowPos) -{ - RegisterSimpleClass(DWPTestProc, L"ownertest"); - hWnd1 = CreateWindowExW(0, L"ownertest", L"abc", 0, 10, 20, - 200, 210, NULL, NULL, 0, NULL); - hWnd2 = CreateWindowExW(0, L"ownertest", L"def", 0, 30, 40, - 220, 230, NULL, NULL, 0, NULL); - hWnd3 = CreateWindowW(L"ownertest", L"ownertest", WS_OVERLAPPEDWINDOW, - 20, 350, 300, 300, hWnd1, NULL, 0, NULL); - hWnd4 = CreateWindowW(L"ownertest", L"ownertest", WS_OVERLAPPEDWINDOW, - 250, 250, 200, 200, hWnd1, NULL, 0, NULL); - - ok(hWnd1 != NULL, "CreateWindow failed\n"); - ok(hWnd2 != NULL, "CreateWindow failed\n"); - ok(hWnd3 != NULL, "CreateWindow failed\n"); - ok(hWnd4 != NULL, "CreateWindow failed\n"); - - set_default_pos(); - Test_DWP_Error(hWnd1, hWnd2); - - set_default_pos(); - Test_DWP_SimpleMsg(hWnd1, hWnd2); - - set_default_pos(); - Test_DWP_OwnerZOrder(); - - DestroyWindow(hWnd4); - DestroyWindow(hWnd3); - DestroyWindow(hWnd2); - DestroyWindow(hWnd1); - } diff --git a/rostests/apitests/user32/GetIconInfo.c b/rostests/apitests/user32/GetIconInfo.c deleted file mode 100644 index eb0568a21af..00000000000 --- a/rostests/apitests/user32/GetIconInfo.c +++ /dev/null @@ -1,203 +0,0 @@ - -#include -#include -#include -#include "resource.h" - -// FIXME user32 - -void -Test_GetIconInfo(BOOL fIcon) -{ - HICON hicon; - ICONINFO iconinfo, iconinfo2; - BITMAP bitmap; - - iconinfo.fIcon = fIcon; - iconinfo.xHotspot = 0; - iconinfo.yHotspot = 0; - iconinfo.hbmMask = NULL; - iconinfo.hbmColor = NULL; - - hicon = CreateIconIndirect(&iconinfo); - ok(hicon == 0, "should fail\n"); - - iconinfo.hbmMask = CreateBitmap(8, 16, 1, 1, NULL); - hicon = CreateIconIndirect(&iconinfo); - ok(hicon != 0, "should not fail\n"); - - ok(GetIconInfo(hicon, &iconinfo2), "\n"); - ok(iconinfo2.fIcon == iconinfo.fIcon, "\n"); - if (fIcon) - { - ok(iconinfo2.xHotspot == 4, "%ld\n", iconinfo2.xHotspot); - ok(iconinfo2.yHotspot == 4, "%ld\n", iconinfo2.yHotspot); - } - else - { - ok(iconinfo2.xHotspot == 0, "%ld\n", iconinfo2.xHotspot); - ok(iconinfo2.yHotspot == 0, "%ld\n", iconinfo2.yHotspot); - } - ok(iconinfo2.hbmMask != NULL, "\n"); - ok(iconinfo2.hbmMask != iconinfo.hbmMask, "\n"); - ok(iconinfo2.hbmColor == NULL, "\n"); - - ok(GetIconInfo(hicon, &iconinfo2), "\n"); - ok(iconinfo2.fIcon == iconinfo.fIcon, "\n"); - if (fIcon) - { - ok(iconinfo2.xHotspot == 4, "%ld\n", iconinfo2.xHotspot); - ok(iconinfo2.yHotspot == 4, "%ld\n", iconinfo2.yHotspot); - } - else - { - ok(iconinfo2.xHotspot == 0, "%ld\n", iconinfo2.xHotspot); - ok(iconinfo2.yHotspot == 0, "%ld\n", iconinfo2.yHotspot); - } - ok(iconinfo2.hbmMask != NULL, "\n"); - ok(iconinfo2.hbmMask != iconinfo.hbmMask, "\n"); - ok(iconinfo2.hbmColor == NULL, "\n"); - - iconinfo.hbmColor = CreateBitmap(2, 2, 1, 1, NULL); - hicon = CreateIconIndirect(&iconinfo); - ok(hicon != 0, "should not fail\n"); - - ok(GetIconInfo(hicon, &iconinfo2), "\n"); - ok(iconinfo2.fIcon == iconinfo.fIcon, "\n"); - if (fIcon) - { - ok(iconinfo2.xHotspot == 4, "%ld\n", iconinfo2.xHotspot); - ok(iconinfo2.yHotspot == 8, "%ld\n", iconinfo2.yHotspot); - } - else - { - ok(iconinfo2.xHotspot == 0, "%ld\n", iconinfo2.xHotspot); - ok(iconinfo2.yHotspot == 0, "%ld\n", iconinfo2.yHotspot); - } - ok(iconinfo2.hbmMask != NULL, "\n"); - ok(iconinfo2.hbmMask != iconinfo.hbmMask, "\n"); - ok(iconinfo2.hbmColor != NULL, "\n"); - ok(iconinfo2.hbmMask != iconinfo.hbmColor, "\n"); - - ok(GetObject(iconinfo2.hbmMask, sizeof(bitmap), &bitmap), "GetObject failed\n"); - ok(bitmap.bmType == 0, "\n"); - ok(bitmap.bmWidth == 8, "\n"); - ok(bitmap.bmHeight == 16, "\n"); - ok(bitmap.bmWidthBytes == 2, "\n"); - ok(bitmap.bmPlanes == 1, "\n"); - ok(bitmap.bmBitsPixel == 1, "\n"); - ok(bitmap.bmBits == NULL, "\n"); - - ok(GetObject(iconinfo2.hbmColor, sizeof(bitmap), &bitmap), "GetObject failed\n"); - ok(bitmap.bmType == 0, "\n"); - ok(bitmap.bmWidth == 8, "\n"); - ok(bitmap.bmHeight == 16, "\n"); - ok(bitmap.bmWidthBytes == 8 * bitmap.bmBitsPixel / 8, "\n"); - ok(bitmap.bmPlanes == 1, "\n"); - ok(bitmap.bmBitsPixel == 32, "\n"); - ok(bitmap.bmBits == NULL, "\n"); - - DeleteObject(iconinfo.hbmMask); - iconinfo.hbmMask = NULL; - hicon = CreateIconIndirect(&iconinfo); - ok(hicon == 0, "should fail\n"); - - DeleteObject(iconinfo.hbmColor); - iconinfo.hbmColor = CreateCompatibleBitmap(GetDC(0), 16, 16); - hicon = CreateIconIndirect(&iconinfo); - ok(hicon == 0, "should fail\n"); - - iconinfo.hbmMask = CreateCompatibleBitmap(GetDC(0), 8, 16); - hicon = CreateIconIndirect(&iconinfo); - ok(hicon != 0, "should not fail\n"); - - ok(GetIconInfo(hicon, &iconinfo2), "\n"); - - ok(GetObject(iconinfo2.hbmMask, sizeof(bitmap), &bitmap), "GetObject failed\n"); - ok(bitmap.bmType == 0, "\n"); - ok(bitmap.bmWidth == 8, "%ld\n", bitmap.bmWidth); - ok(bitmap.bmHeight == 16, "%ld\n", bitmap.bmHeight); - ok(bitmap.bmWidthBytes == 2, "%ld\n", bitmap.bmWidthBytes); - ok(bitmap.bmPlanes == 1, "%d\n", bitmap.bmPlanes); - ok(bitmap.bmBitsPixel == 1, "%d\n", bitmap.bmBitsPixel); - ok(bitmap.bmBits == NULL, "\n"); - - ok(GetObject(iconinfo2.hbmColor, sizeof(bitmap), &bitmap), "GetObject failed\n"); - ok(bitmap.bmType == 0, "\n"); - ok(bitmap.bmWidth == 8, "%ld\n", bitmap.bmWidth); - ok(bitmap.bmHeight == 16, "%ld\n", bitmap.bmHeight); - ok(bitmap.bmWidthBytes == 32, "%ld\n", bitmap.bmWidthBytes); - ok(bitmap.bmPlanes == 1, "%d\n", bitmap.bmPlanes); - ok(bitmap.bmBitsPixel == 32, "%d\n", bitmap.bmBitsPixel); - ok(bitmap.bmBits == NULL, "\n"); - -} - - -START_TEST(GetIconInfo) -{ - HCURSOR hcursor; - ICONINFO iconinfo2; - BITMAP bitmap; - DWORD data[] = {0, 0, 0, 0, 0, 0}; - - Test_GetIconInfo(0); - Test_GetIconInfo(1); - - hcursor = LoadCursor(GetModuleHandle(NULL), "TESTCURSOR"); - ok(hcursor != 0, "should not fail, error %ld\n", GetLastError()); - ok(GetIconInfo(hcursor, &iconinfo2), "\n"); - ok(iconinfo2.fIcon == 0, "\n"); - ok(iconinfo2.xHotspot == 8, "%ld\n", iconinfo2.xHotspot); - ok(iconinfo2.yHotspot == 29, "%ld\n", iconinfo2.yHotspot); - ok(iconinfo2.hbmMask != NULL, "\n"); - ok(iconinfo2.hbmColor != NULL, "\n"); - - hcursor = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_TEST)); - ok(hcursor != 0, "should not fail\n"); - ok(GetIconInfo(hcursor, &iconinfo2), "\n"); - ok(iconinfo2.fIcon == 1, "\n"); - ok(iconinfo2.xHotspot == 16, "%ld\n", iconinfo2.xHotspot); - ok(iconinfo2.yHotspot == 16, "%ld\n", iconinfo2.yHotspot); - ok(iconinfo2.hbmMask != NULL, "\n"); - ok(iconinfo2.hbmColor != NULL, "\n"); - - ok(GetObject(iconinfo2.hbmMask, sizeof(bitmap), &bitmap), "GetObject failed\n"); - ok(bitmap.bmType == 0, "\n"); - ok(bitmap.bmWidth == 32, "%ld\n", bitmap.bmWidth); - ok(bitmap.bmHeight == 32, "\n"); - ok(bitmap.bmWidthBytes == 4, "\n"); - ok(bitmap.bmPlanes == 1, "\n"); - ok(bitmap.bmBitsPixel == 1, "\n"); - ok(bitmap.bmBits == NULL, "\n"); - - ok(GetObject(iconinfo2.hbmColor, sizeof(bitmap), &bitmap), "GetObject failed\n"); - ok(bitmap.bmType == 0, "\n"); - ok(bitmap.bmWidth == 32, "\n"); - ok(bitmap.bmHeight == 32, "\n"); - ok(bitmap.bmWidthBytes == 32 * bitmap.bmBitsPixel / 8, "\n"); - ok(bitmap.bmPlanes == 1, "\n"); - ok(bitmap.bmBitsPixel == 32, "\n"); - ok(bitmap.bmBits == NULL, "\n"); - - hcursor = CreateCursor(NULL, 1, 2, 4, 4, data, data); - ok(hcursor != 0, "should not fail\n"); - ok(GetIconInfo(hcursor, &iconinfo2), "\n"); - ok(iconinfo2.fIcon == 0, "\n"); - ok(iconinfo2.xHotspot == 1, "%ld\n", iconinfo2.xHotspot); - ok(iconinfo2.yHotspot == 2, "%ld\n", iconinfo2.yHotspot); - ok(iconinfo2.hbmMask != NULL, "\n"); - ok(iconinfo2.hbmColor == NULL, "\n"); - - ok(GetObject(iconinfo2.hbmMask, sizeof(bitmap), &bitmap), "GetObject failed\n"); - ok(bitmap.bmType == 0, "\n"); - ok(bitmap.bmWidth == 4, "%ld\n", bitmap.bmWidth); - ok(bitmap.bmHeight == 8, "%ld\n", bitmap.bmHeight); - ok(bitmap.bmWidthBytes == 2, "%ld\n", bitmap.bmWidthBytes); - ok(bitmap.bmPlanes == 1, "\n"); - ok(bitmap.bmBitsPixel == 1, "\n"); - ok(bitmap.bmBits == NULL, "\n"); - -} - - diff --git a/rostests/apitests/user32/GetKeyState.c b/rostests/apitests/user32/GetKeyState.c deleted file mode 100644 index 759457675d5..00000000000 --- a/rostests/apitests/user32/GetKeyState.c +++ /dev/null @@ -1,137 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for GetKeyState - * PROGRAMMERS: Giannis Adamopoulos - */ - -#include -#include -#include -#include - -HHOOK hKbdHook, hKbdLLHook; - - -LRESULT CALLBACK KeyboardProc(int code, WPARAM wParam, LPARAM lParam) -{ - BOOL pressed = !(lParam & (1<<31)); - BOOL altPressed = lParam & (1<<29); - - if(pressed) - { - ok(altPressed,"\n"); - ok((GetKeyState(VK_MENU) & 0x8000), "Alt should not be pressed\n");\ - ok((GetKeyState(VK_LMENU) & 0x8000), "Left alt should not be pressed\n");\ - } - else - { - ok(!altPressed,"\n"); - ok(!(GetKeyState(VK_MENU) & 0x8000), "Alt should be pressed\n"); - ok(!(GetKeyState(VK_LMENU) & 0x8000), "Left alt should be pressed\n"); - } - - return CallNextHookEx(hKbdHook, code, wParam, lParam); -} - -LRESULT CALLBACK LowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam) -{ - PKBDLLHOOKSTRUCT pLLHook = (PKBDLLHOOKSTRUCT)lParam; - - if(wParam == WM_SYSKEYDOWN) - { - ok(pLLHook->flags & LLKHF_ALTDOWN,"Didn't get LLKHF_ALTDOWN flag\n"); - ok((GetAsyncKeyState (VK_MENU) & 0x8000), "Alt should not be pressed in global kbd status\n"); - ok(!(GetKeyState(VK_MENU) & 0x8000), "Alt should not be pressed in queue state\n"); - ok(!(GetAsyncKeyState (VK_LMENU) & 0x8000), "Left alt should not be pressed in global kbd status\n"); - ok(!(GetKeyState(VK_LMENU) & 0x8000), "Left alt should not be pressed in queue state\n"); - } - else if(wParam == WM_SYSKEYUP) - { - ok(!(pLLHook->flags & LLKHF_ALTDOWN),"got LLKHF_ALTDOWN flag\n"); - ok(!(GetAsyncKeyState (VK_MENU) & 0x8000), "Alt should not be pressed in global kbd status\n"); - ok((GetKeyState(VK_MENU) & 0x8000), "Alt should be pressed in queue state\n"); - ok(!(GetAsyncKeyState (VK_LMENU) & 0x8000), "Left alt should not be pressed in global kbd status\n"); - ok((GetKeyState(VK_LMENU) & 0x8000), "Left alt should be pressed in queue state\n"); - } - - return CallNextHookEx(hKbdLLHook, nCode, wParam, lParam); -} - -static LRESULT CALLBACK WndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ) -{ - if(msg == WM_SYSKEYDOWN) - { - ok(wParam == VK_MENU, "Got wrong wParam in WM_SYSKEYDOWN (%d instead of %d)\n", wParam, VK_MENU ); - } - return DefWindowProcA( hWnd, msg, wParam, lParam ); -} - -static HWND CreateTestWindow() -{ - MSG msg; - WNDCLASSA wclass; - HANDLE hInstance = GetModuleHandleA( NULL ); - HWND hWndTest; - - wclass.lpszClassName = "InputSysKeyTestClass"; - wclass.style = CS_HREDRAW | CS_VREDRAW; - wclass.lpfnWndProc = WndProc; - wclass.hInstance = hInstance; - wclass.hIcon = LoadIconA( 0, IDI_APPLICATION ); - wclass.hCursor = LoadCursorA( NULL, IDC_ARROW ); - wclass.hbrBackground = (HBRUSH)( COLOR_WINDOW + 1 ); - wclass.lpszMenuName = 0; - wclass.cbClsExtra = 0; - wclass.cbWndExtra = 0; - RegisterClassA( &wclass ); - /* create the test window that will receive the keystrokes */ - hWndTest = CreateWindowA( wclass.lpszClassName, "InputSysKeyTest", - WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, 100, 100, - NULL, NULL, hInstance, NULL); - assert( hWndTest ); - ShowWindow( hWndTest, SW_SHOW); - SetWindowPos( hWndTest, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE ); - SetForegroundWindow( hWndTest ); - UpdateWindow( hWndTest); - - /* flush pending messages */ - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg ); - - return hWndTest; -} - -void Test_GetKeyState() -{ - HWND hwnd; - MSG msg; - - hwnd = CreateTestWindow(); - - hKbdHook = SetWindowsHookEx(WH_KEYBOARD, KeyboardProc, GetModuleHandleA( NULL ), 0); - hKbdLLHook = SetWindowsHookEx(WH_KEYBOARD_LL, LowLevelKeyboardProc, GetModuleHandleA( NULL ), 0); - - ok(hKbdHook!=NULL," \n"); - ok(hKbdLLHook!=NULL," \n"); - - keybd_event(VK_LMENU, 0, 0,0); - - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg ); - - keybd_event(VK_LMENU, 0, KEYEVENTF_KEYUP,0); - - //fixme this hangs the test - //while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE|PM_NOYIELD )) DispatchMessageA( &msg ); - - DestroyWindow(hwnd); - - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg ); - - UnhookWindowsHookEx (hKbdHook); - UnhookWindowsHookEx (hKbdLLHook); -} - -START_TEST(GetKeyState) -{ - Test_GetKeyState(); -} \ No newline at end of file diff --git a/rostests/apitests/user32/GetPeekMessage.c b/rostests/apitests/user32/GetPeekMessage.c deleted file mode 100644 index 2cf24d2c71a..00000000000 --- a/rostests/apitests/user32/GetPeekMessage.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for GetMessage/PeekMessage - * PROGRAMMERS: Thomas Faber - */ - -#include -#include -#include - -void Test_GetMessage(HWND hWnd) -{ - MSG msg; - - SetLastError(DNS_ERROR_RCODE_NXRRSET); - - ok(GetMessage(&msg, hWnd, 0, 0) == -1, "\n"); - ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "GetLastError() = %lu\n", GetLastError()); -} - -void Test_PeekMessage(HWND hWnd) -{ - MSG msg; - - SetLastError(DNS_ERROR_RCODE_NXRRSET); - - ok(PeekMessage(&msg, hWnd, 0, 0, PM_NOREMOVE) == 0, "\n"); - ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "GetLastError() = %lu\n", GetLastError()); -} - -START_TEST(GetPeekMessage) -{ - HWND hWnd = CreateWindowExW(0, L"EDIT", L"miau", 0, CW_USEDEFAULT, CW_USEDEFAULT, - CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, GetModuleHandle(NULL), NULL); - ok(hWnd != INVALID_HANDLE_VALUE, "\n"); - /* make sure we pass an invalid handle to GetMessage/PeekMessage */ - ok(DestroyWindow(hWnd), "\n"); - - Test_GetMessage(hWnd); - Test_PeekMessage(hWnd); -} diff --git a/rostests/apitests/user32/GetSystemMetrics.c b/rostests/apitests/user32/GetSystemMetrics.c deleted file mode 100644 index 328b8280632..00000000000 --- a/rostests/apitests/user32/GetSystemMetrics.c +++ /dev/null @@ -1,410 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for GetSystemMetrics - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -void Test_GetSystemMetrics() -{ - INT ret; - HDC hDC; - BOOL BoolVal; - UINT UintVal; - RECT rect; - - SetLastError(0); - hDC = GetDC(0); - - ret = GetSystemMetrics(0); - ok(ret > 0, "ret = %d\n", ret); - - ret = GetSystemMetrics(64); - ok(ret == 0, "ret = %d\n", ret); - ret = GetSystemMetrics(65); - ok(ret == 0, "ret = %d\n", ret); - ret = GetSystemMetrics(66); - ok(ret == 0, "ret = %d\n", ret); - - - ret = GetSystemMetrics(SM_CXSCREEN); - ok(ret == GetDeviceCaps(hDC, HORZRES), "ret = %d\n", ret); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYSCREEN); - ok(ret == GetDeviceCaps(hDC, VERTRES), "ret = %d\n", ret); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CXVSCROLL); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYHSCROLL); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYCAPTION); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CXBORDER); - SystemParametersInfoW(SPI_GETFOCUSBORDERWIDTH, 0, &UintVal, 0); - ok(ret == UintVal, "ret = %d\n", ret); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYBORDER); - SystemParametersInfoW(SPI_GETFOCUSBORDERHEIGHT, 0, &UintVal, 0); - ok(ret == UintVal, "ret = %d\n", ret); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CXDLGFRAME); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYDLGFRAME); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYVTHUMB); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CXHTHUMB); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CXICON); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYICON); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CXCURSOR); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYCURSOR); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYMENU); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - SystemParametersInfoW(SPI_GETWORKAREA, 0, &rect, 0); - ret = GetSystemMetrics(SM_CXFULLSCREEN); - ok(ret == rect.right, "ret = %d\n", ret); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYFULLSCREEN); - ok(ret == rect.bottom - rect.top - GetSystemMetrics(SM_CYCAPTION), "ret = %d\n", ret); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYKANJIWINDOW); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_MOUSEPRESENT); - ok(ret == 1, "ret = %d", ret); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYVSCROLL); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CXHSCROLL); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_DEBUG); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_SWAPBUTTON); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_RESERVED1); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_RESERVED2); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_RESERVED3); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_RESERVED4); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CXMIN); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYMIN); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CXSIZE); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYSIZE); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CXFRAME); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYFRAME); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CXMINTRACK); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYMINTRACK); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CXDOUBLECLK); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYDOUBLECLK); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CXICONSPACING); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYICONSPACING); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_MENUDROPALIGNMENT); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_PENWINDOWS); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_DBCSENABLED); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CMOUSEBUTTONS); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - -#if(WINVER >= 0x0400) - ret = GetSystemMetrics(SM_SECURE); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CXEDGE); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYEDGE); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CXMINSPACING); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYMINSPACING); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CXSMICON); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYSMICON); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYSMCAPTION); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CXSMSIZE); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYSMSIZE); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CXMENUSIZE); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYMENUSIZE); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_ARRANGE); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CXMINIMIZED); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYMINIMIZED); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CXMAXTRACK); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYMAXTRACK); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CXMAXIMIZED); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYMAXIMIZED); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_NETWORK); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CLEANBOOT); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CXDRAG); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYDRAG); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_SHOWSOUNDS); - SystemParametersInfoW(SPI_GETSHOWSOUNDS, 0, &BoolVal, 0); - ok(ret == BoolVal, "ret = %d\n", ret); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CXMENUCHECK); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYMENUCHECK); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_SLOWMACHINE); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_MIDEASTENABLED); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); -#endif - -#if (WINVER >= 0x0500) || (_WIN32_WINNT >= 0x0400) - ret = GetSystemMetrics(SM_MOUSEWHEELPRESENT); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); -#endif - -#if(WINVER >= 0x0500) - ret = GetSystemMetrics(SM_XVIRTUALSCREEN); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_YVIRTUALSCREEN); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CXVIRTUALSCREEN); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYVIRTUALSCREEN); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CMONITORS); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_SAMEDISPLAYFORMAT); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); -#endif - -#if(_WIN32_WINNT >= 0x0500) - ret = GetSystemMetrics(SM_IMMENABLED); - ok(ret == 0 || ret == 1, "ret = %d\n", ret); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); -#endif - -#if(_WIN32_WINNT >= 0x0501) - ret = GetSystemMetrics(SM_CXFOCUSBORDER); - SystemParametersInfoW(SPI_GETFOCUSBORDERWIDTH, 0, &UintVal, 0); - ok(ret == UintVal, "ret = %d\n", ret); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CYFOCUSBORDER); - SystemParametersInfoW(SPI_GETFOCUSBORDERHEIGHT, 0, &UintVal, 0); - ok(ret == UintVal, "ret = %d\n", ret); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_TABLETPC); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_MEDIACENTER); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_STARTER); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_SERVERR2); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); -#endif - -#if(_WIN32_WINNT >= 0x0600) - ret = GetSystemMetrics(SM_MOUSEHORIZONTALWHEELPRESENT); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); - - ret = GetSystemMetrics(SM_CXPADDEDBORDER); -// TEST(ret == 0); - ok(GetLastError() == 0, "GetLastError() = %ld\n", GetLastError()); -#endif - -} - -START_TEST(GetSystemMetrics) -{ - Test_GetSystemMetrics(); -} - diff --git a/rostests/apitests/user32/InitializeLpkHooks.c b/rostests/apitests/user32/InitializeLpkHooks.c deleted file mode 100644 index 462b65c4c83..00000000000 --- a/rostests/apitests/user32/InitializeLpkHooks.c +++ /dev/null @@ -1,110 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for InitializeLpkHooks - * PROGRAMMERS: Magnus Olsen - */ - -#include -#include -#include - - -typedef struct _LPK_LPEDITCONTROL_LIST -{ - PVOID EditCreate; - PVOID EditIchToXY; - PVOID EditMouseToIch; - PVOID EditCchInWidth; - PVOID EditGetLineWidth; - PVOID EditDrawText; - PVOID EditHScroll; - PVOID EditMoveSelection; - PVOID EditVerifyText; - PVOID EditNextWord; - PVOID EditSetMenu; - PVOID EditProcessMenu; - PVOID EditCreateCaret; - PVOID EditAdjustCaret; -} LPK_LPEDITCONTROL_LIST, *PLPK_LPEDITCONTROL_LIST; - - -DWORD (APIENTRY *fpLpkTabbedTextOut) (LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID); -DWORD (APIENTRY *fpLpkPSMTextOut) (LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID); -DWORD (APIENTRY *fpLpkDrawTextEx) (LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID); -PLPK_LPEDITCONTROL_LIST (APIENTRY *fpLpkEditControl) (); - -int Count_myLpkTabbedTextOut = 0; -int Count_myLpkPSMTextOut = 0; -int Count_myLpkDrawTextEx = 0; - -DWORD WINAPI myLpkTabbedTextOut (LPVOID x1,LPVOID x2,LPVOID x3, LPVOID x4, LPVOID x5, LPVOID x6, LPVOID x7, LPVOID x8, - LPVOID x9, LPVOID x10, LPVOID x11, LPVOID x12) -{ - Count_myLpkTabbedTextOut++; - return fpLpkTabbedTextOut(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12); -} - -DWORD myLpkPSMTextOut (LPVOID x1,LPVOID x2,LPVOID x3,LPVOID x4,LPVOID x5,LPVOID x6) -{ - Count_myLpkPSMTextOut++; - return fpLpkPSMTextOut ( x1, x2, x3, x4, x5, x6); -} - -DWORD myLpkDrawTextEx(LPVOID x1,LPVOID x2,LPVOID x3,LPVOID x4,LPVOID x5, LPVOID x6, LPVOID x7, LPVOID x8, LPVOID x9,LPVOID x10) -{ - Count_myLpkDrawTextEx++; - return fpLpkDrawTextEx(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10); -} - - -typedef struct _USER32_INTERN_INITALIZEHOOKS -{ - PVOID fpLpkTabbedTextOut; - PVOID fpLpkPSMTextOut; - PVOID fpLpkDrawTextEx; - PLPK_LPEDITCONTROL_LIST fpListLpkEditControl; -} USER32_INTERN_INITALIZEHOOKS, *PUSER32_INTERN_INITALIZEHOOKS; - -VOID WINAPI InitializeLpkHooks (PUSER32_INTERN_INITALIZEHOOKS); - -void Test_InitializeLpkHooks() -{ - USER32_INTERN_INITALIZEHOOKS setup; - HMODULE lib = LoadLibrary("LPK.DLL"); - - ok(lib != NULL, "lib = 0\n"); - if (lib != NULL) - { - fpLpkTabbedTextOut = (DWORD (APIENTRY *) (LPVOID,LPVOID,LPVOID,LPVOID,LPVOID, LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID)) GetProcAddress(lib, "LpkTabbedTextOut"); - fpLpkPSMTextOut = (DWORD (APIENTRY *) (LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID)) GetProcAddress(lib, "fpLpkPSMTextOut"); - fpLpkDrawTextEx = (DWORD (APIENTRY *) (LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID)) GetProcAddress(lib, "LpkDrawTextEx"); - fpLpkEditControl = (PLPK_LPEDITCONTROL_LIST (APIENTRY *) (VOID)) GetProcAddress(lib, "LpkEditControl"); - - setup.fpLpkTabbedTextOut = myLpkTabbedTextOut; - setup.fpLpkPSMTextOut = myLpkPSMTextOut; - setup.fpLpkDrawTextEx = myLpkDrawTextEx; - - /* we have not add any test to this api */ - setup.fpListLpkEditControl = (PLPK_LPEDITCONTROL_LIST)fpLpkEditControl; - - /* use our own api that we just made */ - InitializeLpkHooks(&setup); - - /* FIXME add test now */ - - /* restore */ - setup.fpLpkTabbedTextOut = fpLpkTabbedTextOut; - setup.fpLpkPSMTextOut = fpLpkPSMTextOut; - setup.fpLpkDrawTextEx = fpLpkDrawTextEx; - setup.fpListLpkEditControl = (PLPK_LPEDITCONTROL_LIST)fpLpkEditControl; - InitializeLpkHooks(&setup); - } - -} - -START_TEST(InitializeLpkHooks) -{ - Test_InitializeLpkHooks(); -} - diff --git a/rostests/apitests/user32/RealGetWindowClass.c b/rostests/apitests/user32/RealGetWindowClass.c deleted file mode 100644 index a8fe9db85b2..00000000000 --- a/rostests/apitests/user32/RealGetWindowClass.c +++ /dev/null @@ -1,134 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for RealGetWindowClass - * PROGRAMMERS: Gregor Gullwi - */ - -#include -#include -#include - -#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) - -typedef struct _TestData -{ - BOOL OverrideWndProc; /* TRUE if lpfnWndProc should be overridden */ - LPCSTR ClassName; /* Name of the new class to register */ - DWORD WndExtra; /* Remove these WNDCLASS::cbWndExtra flags */ - BOOL ExpectsHwnd; /* TRUE if a HWND should be created to run tests on */ - LPCSTR ExpectedClassNameBefore; /* Expected class name before any dialog function is called */ - LPCSTR ExpectedClassNameAfter; /* Expected class name after any dialog function is called */ -} TestData; - -static TestData RealClassTestData[] = -{ - { - TRUE, - "OverrideWndProc_with_DLGWINDOWEXTRA_TRUE", - 0, - TRUE, - "OverrideWndProc_with_DLGWINDOWEXTRA_TRUE", - "#32770", - }, - { - TRUE, - "OverrideWndProc_without_DLGWINDOWEXTRA_TRUE", - DLGWINDOWEXTRA, - TRUE, - "OverrideWndProc_without_DLGWINDOWEXTRA_TRUE", - "OverrideWndProc_without_DLGWINDOWEXTRA_TRUE", - }, - { - FALSE, - "DefaultWndProc_with_DLGWINDOWEXTRA_FALSE", - 0, - TRUE, - "#32770", - "#32770", - }, - { - FALSE, - "DefaultWndProc_without_DLGWINDOWEXTRA_FALSE", - DLGWINDOWEXTRA, - FALSE, - "N/A", - "N/A", - }, -}; - -void Test_RealGetWindowClass() -{ - int testNo; - UINT Result; - CHAR Buffer[1024]; - - Result = RealGetWindowClass( NULL, Buffer, ARRAY_SIZE(Buffer) ); - ok(Result == 0, "Result = %d\n", Result); - ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "GetLastError() = %ld\n", GetLastError()); - - for (testNo = 0; testNo < ARRAY_SIZE(RealClassTestData); testNo++) - { - ATOM atom; - WNDCLASSA cls; - HWND hWnd; - - /* Register classes, "derived" from built-in dialog, with and without the DLGWINDOWEXTRA flag set */ - GetClassInfoA(0, "#32770", &cls); - if (RealClassTestData[testNo].OverrideWndProc) - cls.lpfnWndProc = DefWindowProcA; - cls.lpszClassName = RealClassTestData[testNo].ClassName; - cls.cbWndExtra &= ~RealClassTestData[testNo].WndExtra; - atom = RegisterClassA (&cls); - if (atom == 0) return; - - /* Create a window */ - hWnd = CreateWindowEx( WS_EX_LEFT | WS_EX_LTRREADING | WS_EX_RIGHTSCROLLBAR | - WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE | WS_EX_CONTROLPARENT | WS_EX_APPWINDOW, - RealClassTestData[testNo].ClassName, - RealClassTestData[testNo].ClassName, - WS_POPUPWINDOW | WS_CLIPSIBLINGS | WS_DLGFRAME | WS_OVERLAPPED | - WS_MINIMIZEBOX | WS_MAXIMIZEBOX | DS_3DLOOK | DS_SETFONT | DS_MODALFRAME, - CW_USEDEFAULT, CW_USEDEFAULT, 100, 100, - NULL, NULL, 0, 0); - - /* Do we expect a HWND at all? */ - if (RealClassTestData[testNo].ExpectsHwnd) - { - ok(hWnd != NULL, "\n"); - - if (hWnd != NULL) - { - /* Get the "real" class name */ - Result = RealGetWindowClass( hWnd, Buffer, ARRAY_SIZE(Buffer) ); - printf("Buffer: %s\nExpectedClassNameBefore(%d): %s\n", Buffer, testNo, RealClassTestData[testNo].ExpectedClassNameBefore); - ok( Result != 0, "\n" ); - ok( strcmp( Buffer, RealClassTestData[testNo].ExpectedClassNameBefore ) == 0, "\n" ); - - /* Call a function that requires a dialog window */ - DefDlgProcA( hWnd, DM_SETDEFID, IDCANCEL, 0 ); - - /* Get the "real" class name again */ - Result = RealGetWindowClass( hWnd, Buffer, ARRAY_SIZE(Buffer) ); - printf("Buffer: %s\nExpectedClassNameAfter(%d): %s\n", Buffer, testNo, RealClassTestData[testNo].ExpectedClassNameAfter); - ok( Result != 0, "\n" ); - ok( strcmp( Buffer, RealClassTestData[testNo].ExpectedClassNameAfter ) == 0, "\n" ); - } - } - else - { - ok(hWnd == NULL, "\n"); - } - - /* Cleanup */ - DestroyWindow(hWnd); - UnregisterClass(RealClassTestData[testNo].ClassName, 0); - } - -} - -START_TEST(RealGetWindowClass) -{ - Test_RealGetWindowClass(); -} - diff --git a/rostests/apitests/user32/ScrollDC.c b/rostests/apitests/user32/ScrollDC.c deleted file mode 100644 index 2bc1172207d..00000000000 --- a/rostests/apitests/user32/ScrollDC.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for ScrollDC - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -void Test_ScrollDC() -{ - HWND hWnd, hWnd2; - HDC hDC; - HRGN hrgn; - RECT rcClip; - int iResult; - - /* Create a window */ - hWnd = CreateWindowW(L"BUTTON", L"TestWindow", WS_OVERLAPPEDWINDOW | WS_VISIBLE, - 100, 100, 100, 100, - NULL, NULL, 0, 0); - UpdateWindow(hWnd); - hDC = GetDC(hWnd); - - /* Test that no update region is there */ - hrgn = CreateRectRgn(0,0,0,0); - iResult = GetUpdateRgn(hWnd, hrgn, FALSE); - ok (iResult == NULLREGION, "Expected NULLREGION, got %d\n", iResult); - - /* Test normal scrolling */ - ok(ScrollDC(hDC, 0, 0, NULL, NULL, hrgn, NULL) == TRUE, "ScrollDC failed\n"); - - /* Scroll with invalid update region */ - DeleteObject(hrgn); - ok(ScrollDC(hDC, 50, 0, NULL, NULL, (HRGN)0x12345678, NULL) == FALSE, "ScrollDC successed\n"); - ok(ScrollDC(hDC, 50, 0, NULL, NULL, hrgn, NULL) == FALSE, "ScrollDC successed\n"); - hrgn = CreateRectRgn(0,0,0,0); - iResult = GetUpdateRgn(hWnd, hrgn, FALSE); - ok(iResult == NULLREGION, "Expected NULLREGION, got %d\n", iResult); - - /* Scroll with invalid update rect pointer */ - ok(ScrollDC(hDC, 50, 0, NULL, NULL, NULL, (PRECT)1) == FALSE, "ScrollDC failed\n"); - iResult = GetUpdateRgn(hWnd, hrgn, FALSE); - ok(iResult == NULLREGION, "Expected NULLREGION, got %d\n", iResult); - - /* Scroll with a clip rect */ - rcClip.left = 50; rcClip.top = 0; rcClip.right = 100; rcClip.bottom = 100; - ok(ScrollDC(hDC, 50, 0, NULL, &rcClip, hrgn, NULL) == TRUE, "ScrollDC failed\n"); - iResult = GetUpdateRgn(hWnd, hrgn, FALSE); - ok(iResult == NULLREGION, "Expected NULLREGION, got %d\n", iResult); - - /* Scroll with a clip rect */ - rcClip.left = 50; rcClip.top = 0; rcClip.right = 100; rcClip.bottom = 100; - ok(ScrollDC(hDC, 50, 50, NULL, &rcClip, hrgn, NULL) == TRUE, "ScrollDC failed\n"); - iResult = GetUpdateRgn(hWnd, hrgn, FALSE); - ok(iResult == NULLREGION, "Expected NULLREGION, got %d\n", iResult); - - /* Overlap with another window */ - hWnd2 = CreateWindowW(L"BUTTON", L"TestWindow", WS_OVERLAPPEDWINDOW | WS_VISIBLE, - 30, 160, 100, 100, - NULL, NULL, 0, 0); - UpdateWindow(hWnd2); - - /* Cleanup */ - ReleaseDC(hWnd, hDC); - DestroyWindow(hWnd); - DestroyWindow(hWnd2); - -} - -START_TEST(ScrollDC) -{ - Test_ScrollDC(); -} - diff --git a/rostests/apitests/user32/ScrollWindowEx.c b/rostests/apitests/user32/ScrollWindowEx.c deleted file mode 100644 index 2fd3a9dc35e..00000000000 --- a/rostests/apitests/user32/ScrollWindowEx.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for ScrollWindowEx - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -void Test_ScrollWindowEx() -{ - HWND hWnd; - HRGN hrgn; - int Result; - - /* Create a window */ - hWnd = CreateWindowW(L"BUTTON", L"TestWindow", WS_OVERLAPPEDWINDOW | WS_VISIBLE, - CW_USEDEFAULT, CW_USEDEFAULT, 100, 100, - NULL, NULL, 0, 0); - UpdateWindow(hWnd); - - /* Assert that no update region is there */ - hrgn = CreateRectRgn(0,0,0,0); - Result = GetUpdateRgn(hWnd, hrgn, FALSE); - ok(Result == NULLREGION, "Result = %d\n", Result); - - Result = ScrollWindowEx(hWnd, 20, 0, NULL, NULL, NULL, NULL, 0); - ok(Result == SIMPLEREGION, "Result = %d\n", Result); - Result = GetUpdateRgn(hWnd, hrgn, FALSE); - ok(Result == NULLREGION, "Result = %d\n", Result); - - Result = ScrollWindowEx(hWnd, 20, 0, NULL, NULL, NULL, NULL, SW_INVALIDATE); - ok(Result == SIMPLEREGION, "Result = %d\n", Result); - Result = GetUpdateRgn(hWnd, hrgn, FALSE); - ok(Result == SIMPLEREGION, "Result = %d\n", Result); - UpdateWindow(hWnd); - - // test invalid update region - DeleteObject(hrgn); - Result = ScrollWindowEx(hWnd, 20, 0, NULL, NULL, hrgn, NULL, SW_INVALIDATE); - ok(Result == ERROR, "Result = %d\n", Result); - hrgn = CreateRectRgn(0,0,0,0); - UpdateWindow(hWnd); - - // Test invalid updaterect pointer - Result = ScrollWindowEx(hWnd, 20, 0, NULL, NULL, NULL, (LPRECT)1, SW_INVALIDATE); - ok(Result == ERROR, "Result = %d\n", Result); - Result = GetUpdateRgn(hWnd, hrgn, FALSE); - ok(Result == SIMPLEREGION, "Result = %d\n", Result); - -// test for alignment of rects - - DeleteObject(hrgn); - DestroyWindow(hWnd); -} - -START_TEST(ScrollWindowEx) -{ - Test_ScrollWindowEx(); -} - diff --git a/rostests/apitests/user32/SetActiveWindow.c b/rostests/apitests/user32/SetActiveWindow.c deleted file mode 100644 index cfb7a38df31..00000000000 --- a/rostests/apitests/user32/SetActiveWindow.c +++ /dev/null @@ -1,142 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for SetActiveWindow - * PROGRAMMERS: Giannis Adamopoulos - */ - -#include -#include -#include -#include "helper.h" -#include - -HWND hWnd1, hWnd2; - -/* FIXME: test for HWND_TOP, etc...*/ -static int get_iwnd(HWND hWnd) -{ - if(hWnd == hWnd1) return 1; - else if(hWnd == hWnd2) return 2; - else return 0; -} - -LRESULT CALLBACK OwnerTestProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - int iwnd = get_iwnd(hWnd); - - if(message > WM_USER || !iwnd || IsDWmMsg(message) || IseKeyMsg(message)) - return DefWindowProc(hWnd, message, wParam, lParam); - - switch(message) - { - case WM_QUERYNEWPALETTE: - { - HDC hdc = GetDC(0); - int bits = GetDeviceCaps(hdc,BITSPIXEL); - ok( bits == 8 , "expected WM_QUERYNEWPALETTE only on 8bpp\n"); - ReleaseDC(0, hdc); - return FALSE; - } - case WM_IME_SETCONTEXT: - case WM_IME_NOTIFY : - case WM_GETICON : - case WM_GETTEXT: - break; - case WM_WINDOWPOSCHANGING: - case WM_WINDOWPOSCHANGED: - { - WINDOWPOS* pwp = (WINDOWPOS*)lParam; - ok(wParam==0,"expected wParam=0\n"); - record_message(iwnd, message, SENT, get_iwnd(pwp->hwndInsertAfter), pwp->flags); - break; - } - default: - record_message(iwnd, message, SENT, 0,0); - } - return DefWindowProc(hWnd, message, wParam, lParam); -} - -static void FlushMessages() -{ - MSG msg; - - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) - { - int iwnd = get_iwnd(msg.hwnd); - if(!(msg.message > WM_USER || !iwnd || IsDWmMsg(msg.message) || IseKeyMsg(msg.message))) - record_message(iwnd, msg.message, POST,0,0); - DispatchMessageA( &msg ); - } -} - -static void create_test_windows() -{ - RegisterSimpleClass(OwnerTestProc, L"ownertest"); - hWnd1 = CreateWindowW(L"ownertest", L"ownertest", WS_OVERLAPPEDWINDOW, - 20, 20, 300, 300, NULL, NULL, 0, NULL); - - hWnd2 = CreateWindowW(L"ownertest", L"ownertest", WS_OVERLAPPEDWINDOW, - 200, 200, 300, 300, NULL, NULL, 0, NULL); -} - -static void set_default_zorder() -{ - SetWindowPos(hWnd1, 0, 0,0,0,0, SWP_NOMOVE|SWP_NOREPOSITION|SWP_NOSIZE|SWP_SHOWWINDOW); - SetWindowPos(hWnd2, 0, 0,0,0,0, SWP_NOMOVE|SWP_NOREPOSITION|SWP_NOSIZE|SWP_SHOWWINDOW); - - FlushMessages(); - empty_message_cache(); -} - -static void destroy_test_window() -{ - DestroyWindow(hWnd1); - DestroyWindow(hWnd2); - UnregisterClassW(L"testClass", 0); -} - -MSG_ENTRY activate2to1_chain[]={ - {2,WM_NCACTIVATE}, - {2,WM_ACTIVATE}, - {1,WM_WINDOWPOSCHANGING, SENT,0, SWP_NOSIZE|SWP_NOMOVE}, - {1,WM_WINDOWPOSCHANGED, SENT,0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTMOVE|SWP_NOCLIENTSIZE}, - {1,WM_NCACTIVATE}, - {1,WM_ACTIVATE}, - {2,WM_KILLFOCUS}, - {1,WM_SETFOCUS}, - {0,0}}; - -MSG_ENTRY activate1to2_chain[]={ - {1,WM_NCACTIVATE}, - {1,WM_ACTIVATE}, - {2,WM_WINDOWPOSCHANGING, SENT,0, SWP_NOSIZE|SWP_NOMOVE}, - {2,WM_WINDOWPOSCHANGED, SENT,0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTMOVE|SWP_NOCLIENTSIZE}, - {2,WM_NCACTIVATE}, - {2,WM_ACTIVATE}, - {1,WM_KILLFOCUS}, - {2,WM_SETFOCUS}, - {0,0}}; - -void Test_msg_simple() -{ - SetCursorPos(0,0); - - create_test_windows(); - set_default_zorder(); - - SetActiveWindow(hWnd1); - FlushMessages(); - COMPARE_CACHE(activate2to1_chain); - - SetActiveWindow(hWnd2); - FlushMessages(); - COMPARE_CACHE(activate1to2_chain); - - destroy_test_window(); -} - -START_TEST(SetActiveWindow) -{ - Test_msg_simple(); -} diff --git a/rostests/apitests/user32/SetCursorPos.c b/rostests/apitests/user32/SetCursorPos.c deleted file mode 100644 index c084f7721bb..00000000000 --- a/rostests/apitests/user32/SetCursorPos.c +++ /dev/null @@ -1,165 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for SetCursorPos - * PROGRAMMERS: Giannis Adamopoulos - */ - -#include -#include -#include -#include - -HHOOK hMouseHookLL, hMouseHook; - -struct _test_info -{ - int ll_hook_called; - int hook_called; - int mouse_move_called; -}; - -struct _test_info info[] = { {0,0,0}, /* SetCursorPos without a window */ - {1,1,0}, /* mouse_event without a window */ - {0,1,1}, /* SetCursorPos with a window */ - {1,1,1}, /* mouse_event with a window */ - {0,1,1}, /* multiple SetCursorPos with a window with coalescing */ - {0,2,2}, /* multiple SetCursorPos with a window without coalescing */ - {2,1,1}, /* multiple mouse_event with a window with coalescing */ - {2,2,2}, /* multiple mouse_event with a window without coalescing */ - }; - -struct _test_info results[8]; -int test_no = 0; - - -LRESULT CALLBACK MouseLLHookProc(int nCode, WPARAM wParam, LPARAM lParam) -{ - results[test_no].ll_hook_called++; - return CallNextHookEx(hMouseHookLL, nCode, wParam, lParam); -} - -LRESULT CALLBACK MouseHookProc(int nCode, WPARAM wParam, LPARAM lParam) -{ - results[test_no].hook_called++; - return CallNextHookEx(hMouseHook, nCode, wParam, lParam); -} - -static LRESULT CALLBACK WndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ) -{ - if(msg == WM_MOUSEMOVE) - results[test_no].mouse_move_called++; - - return DefWindowProcA( hWnd, msg, wParam, lParam ); -} - -static HWND CreateTestWindow() -{ - MSG msg; - WNDCLASSA wclass; - HANDLE hInstance = GetModuleHandleA( NULL ); - HWND hWndTest; - - wclass.lpszClassName = "MouseInputTestClass"; - wclass.style = CS_HREDRAW | CS_VREDRAW; - wclass.lpfnWndProc = WndProc; - wclass.hInstance = hInstance; - wclass.hIcon = LoadIconA( 0, IDI_APPLICATION ); - wclass.hCursor = LoadCursorA( NULL, IDC_ARROW ); - wclass.hbrBackground = (HBRUSH)( COLOR_WINDOW + 1 ); - wclass.lpszMenuName = 0; - wclass.cbClsExtra = 0; - wclass.cbWndExtra = 0; - RegisterClassA( &wclass ); - /* create the test window that will receive the keystrokes */ - hWndTest = CreateWindowA( wclass.lpszClassName, "MouseInputTestTest", - WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, 100, 100, - NULL, NULL, hInstance, NULL); - assert( hWndTest ); - ShowWindow( hWndTest, SW_SHOWMAXIMIZED); - SetWindowPos( hWndTest, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE ); - SetForegroundWindow( hWndTest ); - UpdateWindow( hWndTest); - SetFocus(hWndTest); - - /* flush pending messages */ - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg ); - - return hWndTest; -} - -void Test_SetCursorPos() -{ - HWND hwnd; - MSG msg; - int i; - - memset(results, sizeof(results), 0); - - hMouseHookLL = SetWindowsHookEx(WH_MOUSE_LL, MouseLLHookProc, GetModuleHandleA( NULL ), 0); - hMouseHook = SetWindowsHookExW(WH_MOUSE, MouseHookProc, GetModuleHandleW( NULL ), GetCurrentThreadId()); - ok(hMouseHook!=NULL,"failed to set hook\n"); - ok(hMouseHookLL!=NULL,"failed to set hook\n"); - - test_no = 0; - SetCursorPos(1,1); - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg ); - - test_no = 1; - mouse_event(MOUSEEVENTF_MOVE, 2,2, 0,0); - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg ); - - hwnd = CreateTestWindow(); - SetCapture(hwnd); - - test_no = 2; - SetCursorPos(50,50); - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg ); - - test_no = 3; - mouse_event(MOUSEEVENTF_MOVE, 100,100, 0,0); - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg ); - - test_no = 4; - SetCursorPos(50,50); - SetCursorPos(60,60); - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg ); - - test_no = 5; - SetCursorPos(50,50); - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg ); - SetCursorPos(60,60); - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg ); - - test_no = 6; - mouse_event(MOUSEEVENTF_MOVE, 50,50, 0,0); - mouse_event(MOUSEEVENTF_MOVE, 60,60, 0,0); - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg ); - - test_no = 7; - mouse_event(MOUSEEVENTF_MOVE, 50,50, 0,0); - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg ); - mouse_event(MOUSEEVENTF_MOVE, 60,60, 0,0); - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg ); - - for(i = 0; i< 8; i++) - { -#define TEST(s,x,y) ok(y == x, "%d: %s called %d times instead of %d\n",i,s, y,x); - TEST("WH_MOUSE_LL", info[i].ll_hook_called, results[i].ll_hook_called); - /* WH_MOUSE results vary greatly among windows versions */ - //TEST("WH_MOUSE", info[i].hook_called, results[i].hook_called); - TEST("WM_MOUSEMOVE", info[i].mouse_move_called, results[i].mouse_move_called); - } - - SetCapture(NULL); - DestroyWindow(hwnd); - - UnhookWindowsHookEx (hMouseHook); - UnhookWindowsHookEx (hMouseHookLL); - -} - -START_TEST(SetCursorPos) -{ - Test_SetCursorPos(); -} \ No newline at end of file diff --git a/rostests/apitests/user32/SystemParametersInfo.c b/rostests/apitests/user32/SystemParametersInfo.c deleted file mode 100644 index 4e52cf9e2b8..00000000000 --- a/rostests/apitests/user32/SystemParametersInfo.c +++ /dev/null @@ -1,151 +0,0 @@ -/* - * PROJECT: ReactOS API tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for SystemParametersInfo function family - * PROGRAMMERS: Giannis Adamopoulos - */ - -#include -#include -#include -#include "helper.h" -#include - -HWND hWnd1, hWnd2; - -/* FIXME: test for HWND_TOP, etc...*/ -static int get_iwnd(HWND hWnd) -{ - if(hWnd == hWnd1) return 1; - else if(hWnd == hWnd2) return 2; - else return 0; -} - -LRESULT CALLBACK SysParamsTestProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - int iwnd = get_iwnd(hWnd); - - if(message > WM_USER || !iwnd || IsDWmMsg(message) || IseKeyMsg(message)) - return DefWindowProc(hWnd, message, wParam, lParam); - - switch(message) - { - case WM_GETICON : - case WM_SETICON: - break; - case WM_WINDOWPOSCHANGING: - case WM_WINDOWPOSCHANGED: - { - WINDOWPOS* pwp = (WINDOWPOS*)lParam; - ok(wParam==0,"expected wParam=0\n"); - record_message(iwnd, message, SENT, get_iwnd(pwp->hwndInsertAfter), pwp->flags); - break; - } - default: - record_message(iwnd, message, SENT, 0,0); - } - return DefWindowProc(hWnd, message, wParam, lParam); -} - -static void FlushMessages() -{ - MSG msg; - - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) - { - int iwnd = get_iwnd(msg.hwnd); - if(!(msg.message > WM_USER || !iwnd || IsDWmMsg(msg.message) || IseKeyMsg(msg.message))) - record_message(iwnd, msg.message, POST,0,0); - DispatchMessageA( &msg ); - } -} - -MSG_ENTRY NcMetricsChange_chain[]={ - {2,WM_WINDOWPOSCHANGING, SENT, 0, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW}, - {2,WM_GETMINMAXINFO}, - {2,WM_NCCALCSIZE}, - {2,WM_WINDOWPOSCHANGED, SENT, 0, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE | SWP_NOSIZE}, - {1,WM_WINDOWPOSCHANGING, SENT, 0, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW}, - {1,WM_GETMINMAXINFO}, - {1,WM_NCCALCSIZE}, - {1,WM_WINDOWPOSCHANGED, SENT, 0, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE | SWP_NOSIZE}, - {0,0}}; - -MSG_ENTRY NcMetricsChange1_chain[]={ - {2,WM_WINDOWPOSCHANGING, SENT, 0, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW}, - {2,WM_GETMINMAXINFO}, - {2,WM_NCCALCSIZE}, - {2,WM_WINDOWPOSCHANGED, SENT, 0, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE | SWP_NOSIZE}, - {1,WM_WINDOWPOSCHANGING, SENT, 0, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW}, - {1,WM_GETMINMAXINFO}, - {1,WM_NCCALCSIZE}, - {1,WM_WINDOWPOSCHANGED, SENT, 0, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE | SWP_NOSIZE}, - {2,WM_SETTINGCHANGE}, - {1,WM_SETTINGCHANGE}, - {0,0}}; - -MSG_ENTRY CaptionHeight_chain[]={ - {2,WM_WINDOWPOSCHANGING, SENT, 0, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW}, - {2,WM_GETMINMAXINFO}, - {2,WM_NCCALCSIZE}, - {2,WM_WINDOWPOSCHANGED, SENT, 0, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW | SWP_NOCLIENTSIZE}, - {2,WM_MOVE}, - {1,WM_WINDOWPOSCHANGING, SENT, 0, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW}, - {1,WM_GETMINMAXINFO}, - {1,WM_NCCALCSIZE}, - {1,WM_WINDOWPOSCHANGED, SENT, 0, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW | SWP_NOCLIENTSIZE}, - {1,WM_MOVE}, - {0,0}}; - -static void Test_NonClientMetrics() -{ - NONCLIENTMETRICS NonClientMetrics; - - /* WARNING: this test requires themes and dwm to be disabled */ - - SetCursorPos(0,0); - - /* Retrieve th non client metrics */ - NonClientMetrics.cbSize = sizeof(NONCLIENTMETRICS); - SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &NonClientMetrics, 0); - FlushMessages(); - COMPARE_CACHE(empty_chain); - - /* Set the non client metric without making any change */ - SystemParametersInfo(SPI_SETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &NonClientMetrics, 0); - FlushMessages(); - COMPARE_CACHE(NcMetricsChange_chain); - - /* Set the same metrics again with the SPIF_SENDCHANGE param */ - SystemParametersInfo(SPI_SETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &NonClientMetrics, SPIF_SENDCHANGE|SPIF_UPDATEINIFILE ); - FlushMessages(); - COMPARE_CACHE(NcMetricsChange1_chain); - - /* Slightly change the caption height */ - NonClientMetrics.iCaptionHeight += 1; - SystemParametersInfo(SPI_SETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &NonClientMetrics, 0); - FlushMessages(); - COMPARE_CACHE(CaptionHeight_chain); - - /* Restore the original caption height */ - NonClientMetrics.iCaptionHeight -= 1; - SystemParametersInfo(SPI_SETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &NonClientMetrics, 0); - FlushMessages(); - COMPARE_CACHE(CaptionHeight_chain); -} - -START_TEST(SystemParametersInfo) -{ - RegisterSimpleClass(SysParamsTestProc, L"sysparamstest"); - hWnd1 = CreateWindowW(L"sysparamstest", L"sysparamstest", WS_OVERLAPPEDWINDOW, - 20, 20, 300, 300, NULL, NULL, 0, NULL); - - hWnd2 = CreateWindowW(L"sysparamstest", L"sysparamstest", WS_OVERLAPPEDWINDOW, - 200, 200, 300, 300, NULL, NULL, 0, NULL); - - Test_NonClientMetrics(); - - DestroyWindow(hWnd1); - DestroyWindow(hWnd2); - UnregisterClassW(L"sysparamstest", 0); -} \ No newline at end of file diff --git a/rostests/apitests/user32/TrackMouseEvent.c b/rostests/apitests/user32/TrackMouseEvent.c deleted file mode 100644 index 03a31cdcc67..00000000000 --- a/rostests/apitests/user32/TrackMouseEvent.c +++ /dev/null @@ -1,440 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for TrackMouseEvent - * PROGRAMMERS: Giannis Adamopoulos - */ - -#include -#include -#include -#include "helper.h" -#include - -HWND hWnd1, hWnd2, hWnd3; -HHOOK hMouseHookLL, hMouseHook; -int ignore_timer = 0, ignore_mouse = 0, ignore_mousell = 0; - -static int get_iwnd(HWND hWnd) -{ - if(hWnd == hWnd1) return 1; - else if(hWnd == hWnd2) return 2; - else if(hWnd == hWnd3) return 3; - else return 0; -} - -LRESULT CALLBACK TmeTestProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - int iwnd = get_iwnd(hWnd); - - if(message == WM_PAINT) - { - PAINTSTRUCT ps; - BeginPaint(hWnd, &ps); - Rectangle(ps.hdc, ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.right, ps.rcPaint.bottom); - EndPaint(hWnd, &ps); - } - - if(message > WM_USER || !iwnd || IsDWmMsg(message) || IseKeyMsg(message)) - return DefWindowProc(hWnd, message, wParam, lParam); - - switch(message) - { - case WM_IME_SETCONTEXT: - case WM_IME_NOTIFY : - case WM_GETICON : - case WM_GETTEXT: - break; - case WM_SYSTIMER: - ok(0, "Got unexpected WM_SYSTIMER in the winproc. wParam=%d\n", wParam); - break; - default: - record_message(iwnd, message, SENT, 0,0); - } - return DefWindowProc(hWnd, message, wParam, lParam); -} - -static LRESULT CALLBACK MouseLLHookProc(int nCode, WPARAM wParam, LPARAM lParam) -{ - LRESULT ret; - record_message(0, WH_MOUSE_LL, HOOK, wParam, 0); - ret = CallNextHookEx(hMouseHookLL, nCode, wParam, lParam); - if(ignore_mousell) - return TRUE; - return ret; -} - -static LRESULT CALLBACK MouseHookProc(int nCode, WPARAM wParam, LPARAM lParam) -{ - MOUSEHOOKSTRUCT *hs = (MOUSEHOOKSTRUCT*) lParam; - LRESULT ret; - record_message(get_iwnd(hs->hwnd), WH_MOUSE, HOOK, wParam, hs->wHitTestCode); - ret = CallNextHookEx(hMouseHook, nCode, wParam, lParam); - if(ignore_mouse) - return TRUE; - return ret; -} - -static void FlushMessages() -{ - MSG msg; - - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) - { - int iwnd = get_iwnd(msg.hwnd); - if(iwnd) - { - if(msg.message == WM_SYSTIMER) - { - record_message(iwnd, msg.message, POST,msg.wParam,0); - if(ignore_timer) - continue; - } - else if(!(msg.message > WM_USER || !iwnd || IsDWmMsg(msg.message) || IseKeyMsg(msg.message))) - record_message(iwnd, msg.message, POST,0,0); - } - DispatchMessageA( &msg ); - } -} - -#define FLUSH_MESSAGES(expected, notexpected) \ - { EXPECT_QUEUE_STATUS(expected, notexpected);\ - FlushMessages();\ - } - -static void create_test_windows() -{ - hMouseHookLL = SetWindowsHookExW(WH_MOUSE_LL, MouseLLHookProc, GetModuleHandleW( NULL ), 0); - hMouseHook = SetWindowsHookExW(WH_MOUSE, MouseHookProc, GetModuleHandleW( NULL ), GetCurrentThreadId()); - ok(hMouseHook!=NULL,"failed to set hook\n"); - ok(hMouseHookLL!=NULL,"failed to set hook\n"); - - RegisterSimpleClass(TmeTestProc, L"testClass"); - - hWnd1 = CreateWindowW(L"testClass", L"test", WS_OVERLAPPEDWINDOW, - 100, 100, 500, 500, NULL, NULL, 0, NULL); - hWnd2 = CreateWindowW(L"testClass", L"test", WS_CHILD, - 50, 50, 200, 200, hWnd1, NULL, 0, NULL); - hWnd3 = CreateWindowW(L"testClass", L"test", WS_CHILD, - 150, 150, 200, 200, hWnd1, NULL, 0, NULL); - - ShowWindow(hWnd1, SW_SHOW); - UpdateWindow(hWnd1); - ShowWindow(hWnd2, SW_SHOW); - UpdateWindow(hWnd2); - ShowWindow(hWnd3, SW_SHOWNORMAL); - UpdateWindow(hWnd3); - //SetWindowPos (hWnd3, HWND_TOP, 0,0,0,0, SWP_NOMOVE|SWP_NOREDRAW); -} - -static void destroy_test_window() -{ - DestroyWindow(hWnd1); - UnregisterClassW(L"testClass", 0); - UnhookWindowsHookEx(hMouseHookLL); - UnhookWindowsHookEx(hMouseHook); -} - -static void TmeStartTracking(HWND hwnd, DWORD Flags) -{ - TRACKMOUSEEVENT tme; - tme.cbSize = sizeof(tme); - tme.dwFlags = Flags; - tme.hwndTrack = hwnd; - tme.dwHoverTime = 1; - if(!TrackMouseEvent(&tme)) - { - trace("failed!\n"); - } -} - -DWORD TmeQuery(HWND hwnd) -{ - TRACKMOUSEEVENT tme; - tme.cbSize = sizeof(tme); - tme.dwFlags = TME_QUERY|TME_HOVER|TME_LEAVE; - tme.hwndTrack = hwnd; - TrackMouseEvent(&tme); - return tme.dwFlags; -} - -#define EXPECT_TME_FLAGS(hWnd, expected) \ - { DWORD flags = TmeQuery(hWnd); \ - ok(flags == (expected),"wrong tme flags. expected %li, and got %li\n", (DWORD)(expected), flags); \ - } - -#define MOVE_CURSOR(x,y) mouse_event(MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE , \ - x*(65535/GetSystemMetrics(SM_CXVIRTUALSCREEN)), \ - y*(65535/GetSystemMetrics(SM_CYVIRTUALSCREEN)) , 0,0); - -/* the mouse moves over hwnd2 */ -MSG_ENTRY mousemove2_chain[]={{0, WH_MOUSE_LL, HOOK, WM_MOUSEMOVE}, - {2, WM_NCHITTEST}, - {2, WH_MOUSE,HOOK, WM_MOUSEMOVE, HTCLIENT}, - {2, WM_SETCURSOR}, - {1, WM_SETCURSOR}, - {2, WM_MOUSEMOVE, POST}, - {0,0}}; - -/* the mouse hovers hwnd2 */ -MSG_ENTRY mousehover2_chain[]={{0, WH_MOUSE_LL, HOOK, WM_MOUSEMOVE}, - {2, WM_NCHITTEST}, - {2, WH_MOUSE,HOOK, WM_MOUSEMOVE, HTCLIENT}, - {2, WM_SETCURSOR}, - {1, WM_SETCURSOR}, - {2, WM_MOUSEMOVE, POST}, - {2, WM_SYSTIMER, POST, ID_TME_TIMER}, - {2, WM_MOUSEHOVER, POST}, - {0,0}}; - -/* the mouse leaves hwnd2 and moves to hwnd1 */ -MSG_ENTRY mouseleave2to1_chain[]={{0, WH_MOUSE_LL, HOOK, WM_MOUSEMOVE}, - {1, WM_NCHITTEST}, - {1, WH_MOUSE,HOOK, WM_MOUSEMOVE, HTCLIENT}, - {1, WM_SETCURSOR}, - {1, WM_MOUSEMOVE, POST}, - {2, WM_MOUSELEAVE, POST}, - {0,0}}; - -/* the mouse leaves hwnd2 and moves to hwnd3 */ -MSG_ENTRY mouseleave2to3_chain[]={{0, WH_MOUSE_LL, HOOK, WM_MOUSEMOVE}, - {3, WM_NCHITTEST}, - {3, WH_MOUSE,HOOK, WM_MOUSEMOVE, HTCLIENT}, - {3, WM_SETCURSOR}, - {1, WM_SETCURSOR}, - {3, WM_MOUSEMOVE, POST}, - {2, WM_MOUSELEAVE, POST}, - {0,0}}; - -/* the mouse hovers hwnd3 */ -MSG_ENTRY mousehover3_chain[]={{0, WH_MOUSE_LL, HOOK, WM_MOUSEMOVE}, - {3, WM_NCHITTEST}, - {3, WH_MOUSE,HOOK, WM_MOUSEMOVE, HTCLIENT}, - {3, WM_SETCURSOR}, - {1, WM_SETCURSOR}, - {3, WM_MOUSEMOVE, POST}, - {3, WM_SYSTIMER, POST, ID_TME_TIMER}, - {3, WM_MOUSEHOVER, POST}, - {0,0}}; - -/* the mouse hovers hwnd3 without moving */ -MSG_ENTRY mousehover3_nomove_chain[]={{3, WM_SYSTIMER, POST, ID_TME_TIMER}, - {3, WM_MOUSEHOVER, POST}, - {0,0}}; - -/* the mouse hovers hwnd3 and the timer is not dispatched */ -MSG_ENTRY mousehover3_droptimer_chain[]={{0, WH_MOUSE_LL, HOOK, WM_MOUSEMOVE}, - {3, WM_NCHITTEST}, - {3, WH_MOUSE,HOOK, WM_MOUSEMOVE, HTCLIENT}, - {3, WM_SETCURSOR}, - {1, WM_SETCURSOR}, - {3, WM_MOUSEMOVE, POST}, - {3, WM_SYSTIMER, POST, ID_TME_TIMER}, - {0,0}}; - -/* the mouse hovers hwnd3 and mouse message is dropped by WH_MOUSE */ -MSG_ENTRY mousehover3_dropmouse_chain[]={{0, WH_MOUSE_LL, HOOK, WM_MOUSEMOVE}, - {3, WM_NCHITTEST}, - {3, WH_MOUSE,HOOK, WM_MOUSEMOVE, HTCLIENT}, - {3, WM_SYSTIMER, POST, ID_TME_TIMER}, - {3, WM_MOUSEHOVER, POST}, - {0,0}}; - -/* the mouse hovers hwnd3 and mouse message is dropped by WH_MOUSE_LL */ -MSG_ENTRY mousehover3_dropmousell_chain[]={{0, WH_MOUSE_LL, HOOK, WM_MOUSEMOVE}, - {3, WM_SYSTIMER, POST, ID_TME_TIMER}, - {3, WM_MOUSEHOVER, POST}, - {0,0}}; - -/* the mouse leaves hwnd3 and moves to hwnd2 and mouse message is dropped by WH_MOUSE */ -MSG_ENTRY mouseleave3to2_dropmouse_chain[]={{0, WH_MOUSE_LL, HOOK, WM_MOUSEMOVE}, - {2, WM_NCHITTEST}, - {2, WH_MOUSE,HOOK, WM_MOUSEMOVE, HTCLIENT}, - {0,0}}; - -/* the mouse leaves hwnd3 and moves to hwnd2 and mouse message is dropped by WH_MOUSE_LL */ -MSG_ENTRY mouseleave3to2_dropmousell_chain[]={{0, WH_MOUSE_LL, HOOK, WM_MOUSEMOVE}, - {0,0}}; - -/* after WH_MOUSE drops WM_MOUSEMOVE, WM_MOUSELEAVE is still in the queue */ -MSG_ENTRY mouseleave3_remainging_chain[]={{3, WM_MOUSELEAVE, POST}, - {0,0}}; - -void Test_TrackMouseEvent() -{ - MOVE_CURSOR(0,0); - create_test_windows(); - FlushMessages(); - empty_message_cache(); - - /* the mouse moves over hwnd2 */ - MOVE_CURSOR(220,220); - FlushMessages(); - COMPARE_CACHE(mousemove2_chain); - EXPECT_TME_FLAGS(hWnd2, 0); - - /* Begin tracking mouse events for hWnd2 */ - TmeStartTracking(hWnd2, TME_HOVER|TME_LEAVE); - EXPECT_TME_FLAGS(hWnd2, TME_HOVER|TME_LEAVE); - FlushMessages(); - COMPARE_CACHE(empty_chain); - - /* the mouse hovers hwnd2 */ - MOVE_CURSOR(221, 221); - Sleep(100); - EXPECT_TME_FLAGS(hWnd2, TME_HOVER|TME_LEAVE); - FLUSH_MESSAGES(QS_TIMER|QS_MOUSEMOVE, 0); - EXPECT_TME_FLAGS(hWnd2, TME_LEAVE); - COMPARE_CACHE(mousehover2_chain); - - /* the mouse leaves hwnd2 and moves to hwnd1 */ - MOVE_CURSOR(150, 150); - EXPECT_TME_FLAGS(hWnd2, TME_LEAVE); - FLUSH_MESSAGES(QS_MOUSEMOVE,QS_TIMER ); - EXPECT_TME_FLAGS(hWnd2, 0); - COMPARE_CACHE(mouseleave2to1_chain); - - FlushMessages(); - COMPARE_CACHE(empty_chain); - - /* the mouse moves over hwnd2 */ - MOVE_CURSOR(220,220); - FLUSH_MESSAGES(QS_MOUSEMOVE, QS_TIMER); - COMPARE_CACHE(mousemove2_chain); - EXPECT_TME_FLAGS(hWnd2, 0); - - FlushMessages(); - COMPARE_CACHE(empty_chain); - - /* Begin tracking mouse events for hWnd2 */ - TmeStartTracking(hWnd2, TME_HOVER|TME_LEAVE); - TmeStartTracking(hWnd2, TME_HOVER|TME_LEAVE); - TmeStartTracking(hWnd2, TME_HOVER|TME_LEAVE); - TmeStartTracking(hWnd2, TME_HOVER|TME_LEAVE); - FLUSH_MESSAGES(0, QS_TIMER|QS_MOUSEMOVE); - COMPARE_CACHE(empty_chain); - EXPECT_TME_FLAGS(hWnd2, TME_HOVER|TME_LEAVE); - - /* the mouse moves from hwnd2 to the intersection of hwnd2 and hwnd3 */ - MOVE_CURSOR(300,300); - FLUSH_MESSAGES(QS_MOUSEMOVE, QS_TIMER); - EXPECT_TME_FLAGS(hWnd2, TME_HOVER|TME_LEAVE); - COMPARE_CACHE(mousemove2_chain); - - FlushMessages(); - COMPARE_CACHE(empty_chain); - - /* the mouse moves from hwnd2 to hwnd3 */ - MOVE_CURSOR(400,400); - FLUSH_MESSAGES(QS_MOUSEMOVE, QS_TIMER); - EXPECT_TME_FLAGS(hWnd2, 0); - COMPARE_CACHE(mouseleave2to3_chain); - - FlushMessages(); - COMPARE_CACHE(empty_chain); - - /* Begin tracking mouse events for hWnd3 */ - TmeStartTracking(hWnd3, TME_HOVER|TME_LEAVE); - FLUSH_MESSAGES(0, QS_TIMER|QS_MOUSEMOVE); - COMPARE_CACHE(empty_chain); - EXPECT_TME_FLAGS(hWnd2, TME_HOVER|TME_LEAVE); - - /* the mouse hovers hwnd3 */ - MOVE_CURSOR(401,401); - Sleep(100); - EXPECT_TME_FLAGS(hWnd3, TME_HOVER|TME_LEAVE); - FLUSH_MESSAGES(QS_TIMER|QS_MOUSEMOVE, 0); - EXPECT_TME_FLAGS(hWnd3, TME_LEAVE); - COMPARE_CACHE(mousehover3_chain); - - FlushMessages(); - COMPARE_CACHE(empty_chain); - - /* Begin tracking mouse events for hWnd3 */ - TmeStartTracking(hWnd3, TME_HOVER ); - FLUSH_MESSAGES(0, QS_TIMER|QS_MOUSEMOVE); - COMPARE_CACHE(empty_chain); - EXPECT_TME_FLAGS(hWnd3, TME_HOVER|TME_LEAVE); - - /* make sure that the timer will fire before the mouse moves */ - Sleep(100); - FlushMessages(); - COMPARE_CACHE(mousehover3_nomove_chain); - EXPECT_TME_FLAGS(hWnd3, TME_LEAVE); - - Sleep(100); - FlushMessages(); - COMPARE_CACHE(empty_chain); - - /* the mouse hovers hwnd3 and the timer is not dispatched*/ - TmeStartTracking(hWnd3, TME_HOVER ); - ignore_timer = TRUE; - MOVE_CURSOR(400,400); - Sleep(100); - EXPECT_TME_FLAGS(hWnd3, TME_HOVER|TME_LEAVE); - FLUSH_MESSAGES(QS_TIMER|QS_MOUSEMOVE, 0); /* the loop drops WM_SYSTIMER */ - EXPECT_TME_FLAGS(hWnd3, TME_HOVER|TME_LEAVE); /* TME_HOVER is still active */ - COMPARE_CACHE(mousehover3_droptimer_chain); /* we get no WM_MOUSEHOVER */ - ignore_timer = FALSE; - - /* the mouse hovers hwnd3 and mouse message is dropped by WH_MOUSE_LL */ - ignore_mousell = TRUE; - MOVE_CURSOR(402,402); - Sleep(100); - EXPECT_TME_FLAGS(hWnd3, TME_HOVER|TME_LEAVE); - FLUSH_MESSAGES(QS_TIMER, QS_MOUSEMOVE); /* WH_MOUSE_LL drops WM_MOUSEMOVE */ - EXPECT_TME_FLAGS(hWnd3, TME_LEAVE); - COMPARE_CACHE(mousehover3_dropmousell_chain); /* we get WM_MOUSEHOVER normaly */ - ignore_mousell = FALSE; - - FlushMessages(); - COMPARE_CACHE(empty_chain); - - /* the mouse hovers hwnd3 and mouse message is dropped by WH_MOUSE */ - ignore_mouse = TRUE; - TmeStartTracking(hWnd3, TME_HOVER ); - MOVE_CURSOR(401,401); - Sleep(100); - EXPECT_TME_FLAGS(hWnd3, TME_HOVER|TME_LEAVE); - FLUSH_MESSAGES(QS_TIMER|QS_MOUSEMOVE, 0); /* WH_MOUSE drops WM_MOUSEMOVE */ - EXPECT_TME_FLAGS(hWnd3, TME_LEAVE); - COMPARE_CACHE(mousehover3_dropmouse_chain); /* we get WM_MOUSEHOVER normaly */ - ignore_mouse = FALSE; - - FlushMessages(); - COMPARE_CACHE(empty_chain); - - /* the mouse leaves hwnd3 and moves to hwnd2 and mouse message is dropped by WH_MOUSE_LL */ - ignore_mousell = TRUE; - TmeStartTracking(hWnd3, TME_LEAVE ); - MOVE_CURSOR(220,220); - FLUSH_MESSAGES(0, QS_MOUSEMOVE|QS_TIMER); /* WH_MOUSE drops WM_MOUSEMOVE */ - EXPECT_TME_FLAGS(hWnd3, TME_LEAVE); /* all flags are removed */ - COMPARE_CACHE(mouseleave3to2_dropmousell_chain); /* we get no WM_MOUSELEAVE */ - ignore_mousell = FALSE; - - FlushMessages(); - COMPARE_CACHE(empty_chain); - - /* the mouse leaves hwnd3 and moves to hwnd2 and mouse message is dropped by WH_MOUSE */ - ignore_mouse = TRUE; - MOVE_CURSOR(220,220); - FLUSH_MESSAGES(QS_MOUSEMOVE, QS_TIMER); /* WH_MOUSE drops WM_MOUSEMOVE */ - EXPECT_TME_FLAGS(hWnd3, 0); /* all flags are removed */ - COMPARE_CACHE(mouseleave3to2_dropmouse_chain); /* we get no WM_MOUSELEAVE */ - ignore_mouse = FALSE; - - /* after WH_MOUSE drops WM_MOUSEMOVE, WM_MOUSELEAVE is still in the queue */ - FLUSH_MESSAGES(QS_POSTMESSAGE, QS_TIMER|QS_MOUSEMOVE); - COMPARE_CACHE(mouseleave3_remainging_chain); - - FlushMessages(); - COMPARE_CACHE(empty_chain); - - destroy_test_window(); -} - -START_TEST(TrackMouseEvent) -{ - Test_TrackMouseEvent(); -} diff --git a/rostests/apitests/user32/WndProc.c b/rostests/apitests/user32/WndProc.c deleted file mode 100644 index e9c70f1210a..00000000000 --- a/rostests/apitests/user32/WndProc.c +++ /dev/null @@ -1,102 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for mismatch with function prototype in window procedure callback. - * PROGRAMMERS: - */ - -#include -#include -#include - -/* Used wine Redraw test for proof in principle. */ - -/* Global variables to trigger exit from loop */ -static int redrawComplete, WMPAINT_count; - -/* - Force stack corruption when calling from assumed window procedure callback. - Adding (6 and) more will force exception faults and terminate the test program. - The test is with five and this is safe for windows. - - But,,,, ReactOS compiled with GCC can handle this,,,,,, - */ -static LRESULT WINAPI redraw_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, DWORD ExtraData,DWORD ExtraData1,DWORD ExtraData2,DWORD ExtraData3) -{ - switch (msg) - { - case WM_PAINT: - trace("doing WM_PAINT %d\n", WMPAINT_count); - WMPAINT_count++; - if (WMPAINT_count > 10 && redrawComplete == 0) - { - PAINTSTRUCT ps; - BeginPaint(hwnd, &ps); - EndPaint(hwnd, &ps); - return 1; - } - /* - This will force one stack corruption "ret" fault with normal window - procedure callback. - */ -#ifdef __MINGW32__ - asm ("movl $0, %eax\n\t" - "leave\n\t" - "ret"); -#elif defined(_M_IX86) -//#ifdef _MSC_VER - __asm - { - mov eax, 0 - leave - ret - } -#else - trace("unimplemented\n"); -#endif - } - return DefWindowProc(hwnd, msg, wparam, lparam); -} - -static void test_wndproc(void) -{ - WNDCLASSA cls; - HWND hwndMain; - - cls.style = CS_DBLCLKS; - cls.lpfnWndProc = (WNDPROC)redraw_window_procA; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(0); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "RedrawWindowClass"; - - if (!RegisterClassA(&cls)) - { - trace("Register failed %d\n", (int)GetLastError()); - return; - } - - hwndMain = CreateWindowA("RedrawWindowClass", "Main Window", WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, 0, 100, 100, NULL, NULL, 0, NULL); - - ok( WMPAINT_count == 0, "Multiple unexpected WM_PAINT calls %d\n", WMPAINT_count); - ShowWindow(hwndMain, SW_SHOW); - ok( WMPAINT_count == 0, "Multiple unexpected WM_PAINT calls %d\n", WMPAINT_count); - RedrawWindow(hwndMain, NULL,NULL,RDW_UPDATENOW | RDW_ALLCHILDREN); - ok( WMPAINT_count == 1 || broken(WMPAINT_count == 0), /* sometimes on win9x */ - "Multiple unexpected WM_PAINT calls %d\n", WMPAINT_count); - redrawComplete = TRUE; - ok( WMPAINT_count < 10, "RedrawWindow (RDW_UPDATENOW) never completed (%d)\n", WMPAINT_count); - - /* clean up */ - DestroyWindow( hwndMain); -} - -START_TEST(WndProc) -{ - test_wndproc(); -} diff --git a/rostests/apitests/user32/helper.c b/rostests/apitests/user32/helper.c deleted file mode 100644 index 7899913e490..00000000000 --- a/rostests/apitests/user32/helper.c +++ /dev/null @@ -1,210 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: helper functions - * PROGRAMMERS: Giannis Adamopoulos - */ - -#include -#include -#include -#include "helper.h" -#include - -MSG_ENTRY last_post_message; -MSG_ENTRY message_cache[100]; -static int message_cache_size = 0; - -MSG_ENTRY empty_chain[]= {{0,0}}; - -static char* get_msg_name(UINT msg) -{ - switch(msg) - { - case WM_NCACTIVATE: return "WM_NCACTIVATE"; - case WM_ACTIVATE: return "WM_ACTIVATE"; - case WM_ACTIVATEAPP: return "WM_ACTIVATEAPP"; - case WM_WINDOWPOSCHANGING: return "WM_WINDOWPOSCHANGING"; - case WM_WINDOWPOSCHANGED: return "WM_WINDOWPOSCHANGED"; - case WM_SETFOCUS: return "WM_SETFOCUS"; - case WM_KILLFOCUS: return "WM_KILLFOCUS"; - case WM_NCPAINT: return "WM_NCPAINT"; - case WM_PAINT: return "WM_PAINT"; - case WM_ERASEBKGND: return "WM_ERASEBKGND"; - case WM_SIZE: return "WM_SIZE"; - case WM_MOVE: return "WM_MOVE"; - case WM_SHOWWINDOW: return "WM_SHOWWINDOW"; - case WM_QUERYNEWPALETTE: return "WM_QUERYNEWPALETTE"; - case WM_MOUSELEAVE: return "WM_MOUSELEAVE"; - case WM_MOUSEHOVER: return "WM_MOUSEHOVER"; - case WM_NCMOUSELEAVE: return "WM_NCMOUSELEAVE"; - case WM_NCMOUSEHOVER: return "WM_NCMOUSEHOVER"; - case WM_NCHITTEST: return "WM_NCHITTEST"; - case WM_SETCURSOR: return "WM_SETCURSOR"; - case WM_MOUSEMOVE: return "WM_MOUSEMOVE"; - case WM_SYSTIMER: return "WM_SYSTIMER"; - case WM_GETMINMAXINFO: return "WM_GETMINMAXINFO"; - case WM_NCCALCSIZE: return "WM_NCCALCSIZE"; - case WM_SETTINGCHANGE: return "WM_SETTINGCHANGE"; - case WM_GETICON: return "WM_GETICON"; - case WM_SETICON: return "WM_SETICON"; - default: return NULL; - } -} - -static char* get_hook_name(UINT id) -{ - switch (id) - { - case WH_KEYBOARD: return "WH_KEYBOARD"; - case WH_KEYBOARD_LL: return "WH_KEYBOARD_LL"; - case WH_MOUSE: return "WH_MOUSE"; - case WH_MOUSE_LL: return "WH_MOUSE_LL"; - default: return NULL; - } -} - -void empty_message_cache() -{ - memset(&last_post_message, 0, sizeof(last_post_message)); - memset(message_cache, 0, sizeof(message_cache)); - message_cache_size = 0; -} - -void sprintf_msg_entry(char* buffer, MSG_ENTRY* msg) -{ - if(!msg->iwnd && !msg->msg) - { - sprintf(buffer, "nothing"); - } - else - { - char* msgName; - char* msgType; - - switch (msg->type) - { - case POST: - msgName = get_msg_name(msg->msg); - msgType = "post msg"; - break; - case SENT: - msgName = get_msg_name(msg->msg); - msgType = "sent msg"; - break; - case HOOK: - msgName = get_hook_name(msg->msg); - msgType = "hook"; - break; - case EVENT: - msgName = NULL; - msgType = "event"; - break; - default: - return; - } - - if(msgName) - sprintf(buffer, "hwnd%d %s %s %d %d", msg->iwnd, msgType, msgName, msg->param1, msg->param2); - else - sprintf(buffer, "hwnd%d %s %d %d %d", msg->iwnd, msgType, msg->msg, msg->param1, msg->param2); - } -} - -void trace_cache(const char* file, int line) -{ - int i; - char buff[100]; - - for (i=0; i < message_cache_size; i++) - { - sprintf_msg_entry(buff, &message_cache[i]); - trace_(file,line)("%d: %s\n", i, buff); - } - trace_(file,line)("\n"); -} - -void compare_cache(const char* file, int line, MSG_ENTRY *msg_chain) -{ - int i = 0; - char buffGot[100], buffExp[100]; - BOOL got_error = FALSE; - - while(1) - { - BOOL same = !memcmp(&message_cache[i],msg_chain, sizeof(MSG_ENTRY)); - - sprintf_msg_entry(buffGot, &message_cache[i]); - sprintf_msg_entry(buffExp, msg_chain); - ok_(file,line)(same,"%d: got %s, expected %s\n",i, buffGot, buffExp); - - if(!got_error && !same) - got_error = TRUE; - - if(msg_chain->msg !=0 || msg_chain->iwnd != 0) - msg_chain++; - else - { - if(i>message_cache_size) - break; - } - i++; - } - - if(got_error ) - { - trace_(file,line)("The complete list of messages got is:\n"); - trace_cache(file,line); - } - - empty_message_cache(); -} - -void record_message(int iwnd, UINT message, MSG_TYPE type, int param1,int param2) -{ - if(message_cache_size>=100) - { - return; - } - - /* do not report a post message a second time */ - if(type == SENT && - last_post_message.iwnd == iwnd && - last_post_message.msg == message && - last_post_message.param1 == param1 && - last_post_message.param2 == param2) - { - memset(&last_post_message, 0, sizeof(last_post_message)); - return; - } - - message_cache[message_cache_size].iwnd = iwnd; - message_cache[message_cache_size].msg = message; - message_cache[message_cache_size].type = type; - message_cache[message_cache_size].param1 = param1; - message_cache[message_cache_size].param2 = param2; - - if(message_cache[message_cache_size].type == POST) - { - last_post_message = message_cache[message_cache_size]; - } - else - { - memset(&last_post_message, 0, sizeof(last_post_message)); - } - - message_cache_size++; -} - -ATOM RegisterSimpleClass(WNDPROC lpfnWndProc, LPCWSTR lpszClassName) -{ - WNDCLASSEXW wcex; - - memset(&wcex, 0, sizeof(wcex)); - wcex.cbSize = sizeof(WNDCLASSEX); - wcex.lpfnWndProc = lpfnWndProc; - wcex.hCursor = LoadCursor(NULL, IDC_ARROW); - wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); - wcex.lpszClassName = lpszClassName; - return RegisterClassExW(&wcex); -} diff --git a/rostests/apitests/user32/helper.h b/rostests/apitests/user32/helper.h deleted file mode 100644 index 246c1c914d1..00000000000 --- a/rostests/apitests/user32/helper.h +++ /dev/null @@ -1,58 +0,0 @@ - -typedef enum _MSG_TYPE -{ - SENT, - POST, - HOOK, - EVENT -} MSG_TYPE; - -typedef struct _MSG_ENTRY -{ - int iwnd; - UINT msg; - MSG_TYPE type; - int param1; - int param2; -} MSG_ENTRY; - - -extern MSG_ENTRY empty_chain[]; - -void record_message(int iwnd, UINT message, MSG_TYPE type, int param1,int param2); -void compare_cache(const char* file, int line, MSG_ENTRY *msg_chain); -void trace_cache(const char* file, int line); -void empty_message_cache(); -ATOM RegisterSimpleClass(WNDPROC lpfnWndProc, LPCWSTR lpszClassName); - -/* filter messages that are affected by dwm */ -static inline BOOL IsDWmMsg(UINT msg) -{ - switch(msg) - { - case WM_NCPAINT: - case WM_ERASEBKGND: - case WM_PAINT: - case 0x031f: /*WM_DWMNCRENDERINGCHANGED*/ - return TRUE; - } - return FALSE; -} - -static inline BOOL IseKeyMsg(UINT msg) -{ - return (msg == WM_KEYUP || msg == WM_KEYDOWN); -} - -#define COMPARE_CACHE(...) compare_cache(__FILE__, __LINE__, ##__VA_ARGS__) -#define TRACE_CACHE() trace_cache(__FILE__, __LINE__) - -#define EXPECT_ACTIVE(hwnd) ok(GetActiveWindow() == hwnd, "Expected %p to be the active window, not %p\n",hwnd,GetActiveWindow()) - -#define EXPECT_QUEUE_STATUS(expected, notexpected) \ - { \ - DWORD status = HIWORD(GetQueueStatus(QS_ALLEVENTS)); \ - ok(((status) & (expected))== (expected),"wrong queue status. expected %li, and got %li\n", (DWORD)(expected), status); \ - if(notexpected) \ - ok((status & (notexpected))!=(notexpected), "wrong queue status. got non expected %li\n", (DWORD)(notexpected)); \ - } diff --git a/rostests/apitests/user32/resource.h b/rostests/apitests/user32/resource.h deleted file mode 100644 index 1fbdfca579c..00000000000 --- a/rostests/apitests/user32/resource.h +++ /dev/null @@ -1,3 +0,0 @@ - - -#define IDI_TEST 1000 diff --git a/rostests/apitests/user32/test.cur b/rostests/apitests/user32/test.cur deleted file mode 100644 index 1a70b67c9c1..00000000000 Binary files a/rostests/apitests/user32/test.cur and /dev/null differ diff --git a/rostests/apitests/user32/test.ico b/rostests/apitests/user32/test.ico deleted file mode 100644 index 6630ca1b5ce..00000000000 Binary files a/rostests/apitests/user32/test.ico and /dev/null differ diff --git a/rostests/apitests/user32/testlist.c b/rostests/apitests/user32/testlist.c deleted file mode 100644 index 3ee4c9bb6cb..00000000000 --- a/rostests/apitests/user32/testlist.c +++ /dev/null @@ -1,41 +0,0 @@ -#define WIN32_LEAN_AND_MEAN -#define __ROS_LONG64__ -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_InitializeLpkHooks(void); -extern void func_RealGetWindowClass(void); -extern void func_ScrollDC(void); -extern void func_ScrollWindowEx(void); -extern void func_GetSystemMetrics(void); -extern void func_GetIconInfo(void); -extern void func_GetPeekMessage(void); -extern void func_DeferWindowPos(void); -extern void func_GetKeyState(void); -extern void func_SetCursorPos(void); -extern void func_SetActiveWindow(void); -extern void func_SystemParametersInfo(void); -extern void func_TrackMouseEvent(void); -extern void func_WndProc(void); - -const struct test winetest_testlist[] = -{ - { "InitializeLpkHooks", func_InitializeLpkHooks }, - { "RealGetWindowClass", func_RealGetWindowClass }, - { "ScrollDC", func_ScrollDC }, - { "ScrollWindowEx", func_ScrollWindowEx }, - { "GetSystemMetrics", func_GetSystemMetrics }, - { "GetIconInfo", func_GetIconInfo }, - { "GetPeekMessage", func_GetPeekMessage }, - { "DeferWindowPos", func_DeferWindowPos }, - { "GetKeyState", func_GetKeyState }, - { "SetCursorPos", func_SetCursorPos }, - { "SetActiveWindow", func_SetActiveWindow }, - { "SystemParametersInfo", func_SystemParametersInfo }, - { "TrackMouseEvent", func_TrackMouseEvent }, - { "WndProc", func_WndProc }, - { 0, 0 } -}; - diff --git a/rostests/apitests/user32/user32_apitest.rbuild b/rostests/apitests/user32/user32_apitest.rbuild deleted file mode 100644 index e75da8627e0..00000000000 --- a/rostests/apitests/user32/user32_apitest.rbuild +++ /dev/null @@ -1,30 +0,0 @@ - - - - - . - wine - gdi32 - user32 - pseh - testlist.c - user32_apitest.rc - - helper.c - GetKeyState.c - InitializeLpkHooks.c - RealGetWindowClass.c - ScrollDC.c - ScrollWindowEx.c - GetSystemMetrics.c - GetIconInfo.c - GetPeekMessage.c - DeferWindowPos.c - SetActiveWindow.c - SetCursorPos.c - SystemParametersInfo.c - TrackMouseEvent.c - WndProc.c - - - diff --git a/rostests/apitests/user32/user32_apitest.rc b/rostests/apitests/user32/user32_apitest.rc deleted file mode 100644 index 8c40b58552d..00000000000 --- a/rostests/apitests/user32/user32_apitest.rc +++ /dev/null @@ -1,7 +0,0 @@ -#include -#include "resource.h" - -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL - -IDI_TEST ICON "test.ico" -TESTCURSOR CURSOR "test.cur" diff --git a/rostests/apitests/w32kdll/CMakeLists.txt b/rostests/apitests/w32kdll/CMakeLists.txt deleted file mode 100644 index a2c1b14f249..00000000000 --- a/rostests/apitests/w32kdll/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ - -add_subdirectory(w32kdll_ros) -add_subdirectory(w32kdll_xpsp2) -add_subdirectory(w32kdll_2ksp4) -add_subdirectory(w32kdll_2k3sp2) -add_subdirectory(w32kdll_vista) diff --git a/rostests/apitests/w32kdll/directory.rbuild b/rostests/apitests/w32kdll/directory.rbuild deleted file mode 100644 index 5b9662bbf2d..00000000000 --- a/rostests/apitests/w32kdll/directory.rbuild +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rostests/apitests/w32kdll/w32kdll_2k3sp2/CMakeLists.txt b/rostests/apitests/w32kdll/w32kdll_2k3sp2/CMakeLists.txt deleted file mode 100644 index 57da80875a3..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_2k3sp2/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ - -add_library(w32kdll_2k3sp2 SHARED main.c w32kdll_2k3sp2.S) -set_entrypoint(w32kdll_2k3sp2 0) -target_link_libraries(w32kdll_2k3sp2 ${CMAKE_CURRENT_SOURCE_DIR}/w32kdll_2k3sp2.def) -add_dependencies(w32kdll_2k3sp2 psdk ) -add_importlib_target(w32kdll_2k3sp2.def) diff --git a/rostests/apitests/w32kdll/w32kdll_2k3sp2/main.c b/rostests/apitests/w32kdll/w32kdll_2k3sp2/main.c deleted file mode 100644 index ea545d282a5..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_2k3sp2/main.c +++ /dev/null @@ -1,31 +0,0 @@ -#include - -#ifdef BUILD_DLL - #define DLL_EXPORT __declspec(dllexport) -#else - #define DLL_EXPORT -#endif - -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - // attach to process - // return FALSE to fail DLL load - break; - - case DLL_PROCESS_DETACH: - // detach from process - break; - - case DLL_THREAD_ATTACH: - // attach to thread - break; - - case DLL_THREAD_DETACH: - // detach from thread - break; - } - return TRUE; // succesful -} diff --git a/rostests/apitests/w32kdll/w32kdll_2k3sp2/w32k_2k3sp2-x86.db b/rostests/apitests/w32kdll/w32kdll_2k3sp2/w32k_2k3sp2-x86.db deleted file mode 100644 index 8808dec397f..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_2k3sp2/w32k_2k3sp2-x86.db +++ /dev/null @@ -1,668 +0,0 @@ -# -# win32k systemcalls taken from Windows 2003 SP2 x86 -# -NtGdiAbortDoc 1 -NtGdiAbortPath 1 -NtGdiAddFontResourceW 6 -NtGdiAddRemoteFontToDC 4 -NtGdiAddFontMemResourceEx 5 -NtGdiRemoveMergeFont 2 -NtGdiAddRemoteMMInstanceToDC 3 -NtGdiAlphaBlend 12 -NtGdiAngleArc 6 -NtGdiAnyLinkedFonts 0 -NtGdiFontIsLinked 1 -NtGdiArcInternal 10 -NtGdiBeginPath 1 -NtGdiBitBlt 11 -NtGdiCancelDC 1 -NtGdiCheckBitmapBits 8 -NtGdiCloseFigure 1 -NtGdiClearBitmapAttributes 2 -NtGdiClearBrushAttributes 2 -NtGdiColorCorrectPalette 6 -NtGdiCombineRgn 4 -NtGdiCombineTransform 3 -NtGdiComputeXformCoefficients 1 -NtGdiConsoleTextOut 4 -NtGdiConvertMetafileRect 2 -NtGdiCreateBitmap 5 -NtGdiCreateClientObj 1 -NtGdiCreateColorSpace 1 -NtGdiCreateColorTransform 8 -NtGdiCreateCompatibleBitmap 3 -NtGdiCreateCompatibleDC 1 -NtGdiCreateDIBBrush 6 -NtGdiCreateDIBitmapInternal 11 -NtGdiCreateDIBSection 9 -NtGdiCreateEllipticRgn 4 -NtGdiCreateHalftonePalette 1 -NtGdiCreateHatchBrushInternal 3 -NtGdiCreateMetafileDC 1 -NtGdiCreatePaletteInternal 2 -NtGdiCreatePatternBrushInternal 3 -NtGdiCreatePen 4 -NtGdiCreateRectRgn 4 -NtGdiCreateRoundRectRgn 6 -NtGdiCreateServerMetaFile 6 -NtGdiCreateSolidBrush 2 -NtGdiD3dContextCreate 4 -NtGdiD3dContextDestroy 1 -NtGdiD3dContextDestroyAll 1 -NtGdiD3dValidateTextureStageState 1 -NtGdiD3dDrawPrimitives2 7 -NtGdiDdGetDriverState 1 -NtGdiDdAddAttachedSurface 3 -NtGdiDdAlphaBlt 3 -NtGdiDdAttachSurface 2 -NtGdiDdBeginMoCompFrame 2 -NtGdiDdBlt 3 -NtGdiDdCanCreateSurface 2 -NtGdiDdCanCreateD3DBuffer 2 -NtGdiDdColorControl 2 -NtGdiDdCreateDirectDrawObject 1 -NtGdiDdCreateSurface 8 -NtGdiDdCreateD3DBuffer 8 -NtGdiDdCreateMoComp 2 -NtGdiDdCreateSurfaceObject 6 -NtGdiDdDeleteDirectDrawObject 1 -NtGdiDdDeleteSurfaceObject 1 -NtGdiDdDestroyMoComp 2 -NtGdiDdDestroySurface 2 -NtGdiDdDestroyD3DBuffer 1 -NtGdiDdEndMoCompFrame 2 -NtGdiDdFlip 5 -NtGdiDdFlipToGDISurface 2 -NtGdiDdGetAvailDriverMemory 2 -NtGdiDdGetBltStatus 2 -NtGdiDdGetDC 2 -NtGdiDdGetDriverInfo 2 -NtGdiDdGetDxHandle 3 -NtGdiDdGetFlipStatus 2 -NtGdiDdGetInternalMoCompInfo 2 -NtGdiDdGetMoCompBuffInfo 2 -NtGdiDdGetMoCompGuids 2 -NtGdiDdGetMoCompFormats 2 -NtGdiDdGetScanLine 2 -NtGdiDdLock 3 -NtGdiDdLockD3D 2 -NtGdiDdQueryDirectDrawObject 11 -NtGdiDdQueryMoCompStatus 2 -NtGdiDdReenableDirectDrawObject 2 -NtGdiDdReleaseDC 1 -NtGdiDdRenderMoComp 2 -NtGdiDdResetVisrgn 2 -NtGdiDdSetColorKey 2 -NtGdiDdSetExclusiveMode 2 -NtGdiDdSetGammaRamp 3 -NtGdiDdCreateSurfaceEx 3 -NtGdiDdSetOverlayPosition 3 -NtGdiDdUnattachSurface 2 -NtGdiDdUnlock 2 -NtGdiDdUnlockD3D 2 -NtGdiDdUpdateOverlay 3 -NtGdiDdWaitForVerticalBlank 2 -NtGdiDvpCanCreateVideoPort 2 -NtGdiDvpColorControl 2 -NtGdiDvpCreateVideoPort 2 -NtGdiDvpDestroyVideoPort 2 -NtGdiDvpFlipVideoPort 4 -NtGdiDvpGetVideoPortBandwidth 2 -NtGdiDvpGetVideoPortField 2 -NtGdiDvpGetVideoPortFlipStatus 2 -NtGdiDvpGetVideoPortInputFormats 2 -NtGdiDvpGetVideoPortLine 2 -NtGdiDvpGetVideoPortOutputFormats 2 -NtGdiDvpGetVideoPortConnectInfo 2 -NtGdiDvpGetVideoSignalStatus 2 -NtGdiDvpUpdateVideoPort 4 -NtGdiDvpWaitForVideoPortSync 2 -NtGdiDvpAcquireNotification 3 -NtGdiDvpReleaseNotification 2 -NtGdiDxgGenericThunk 6 -NtGdiDeleteClientObj 1 -NtGdiDeleteColorSpace 1 -NtGdiDeleteColorTransform 2 -NtGdiDeleteObjectApp 1 -NtGdiDescribePixelFormat 4 -NtGdiGetPerBandInfo 2 -NtGdiDoBanding 4 -NtGdiDoPalette 6 -NtGdiDrawEscape 4 -NtGdiEllipse 5 -NtGdiEnableEudc 1 -NtGdiEndDoc 1 -NtGdiEndPage 1 -NtGdiEndPath 1 -NtGdiEnumFontChunk 5 -NtGdiEnumFontClose 1 -NtGdiEnumFontOpen 7 -NtGdiEnumObjects 4 -NtGdiEqualRgn 2 -NtGdiEudcLoadUnloadLink 7 -NtGdiExcludeClipRect 5 -NtGdiExtCreatePen 11 -NtGdiExtCreateRegion 3 -NtGdiExtEscape 8 -NtGdiExtFloodFill 5 -NtGdiExtGetObjectW 3 -NtGdiExtSelectClipRgn 3 -NtGdiExtTextOutW 9 -NtGdiFillPath 1 -NtGdiFillRgn 3 -NtGdiFlattenPath 1 -NtGdiFlush 0 -NtGdiForceUFIMapping 2 -NtGdiFrameRgn 5 -NtGdiFullscreenControl 5 -NtGdiGetAndSetDCDword 4 -NtGdiGetAppClipBox 2 -NtGdiGetBitmapBits 3 -NtGdiGetBitmapDimension 2 -NtGdiGetBoundsRect 3 -NtGdiGetCharABCWidthsW 6 -NtGdiGetCharacterPlacementW 6 -NtGdiGetCharSet 1 -NtGdiGetCharWidthW 6 -NtGdiGetCharWidthInfo 2 -NtGdiGetColorAdjustment 2 -NtGdiGetColorSpaceforBitmap 1 -NtGdiGetDCDword 3 -NtGdiGetDCforBitmap 1 -NtGdiGetDCObject 2 -NtGdiGetDCPoint 3 -NtGdiGetDeviceCaps 2 -NtGdiGetDeviceGammaRamp 2 -NtGdiGetDeviceCapsAll 2 -NtGdiGetDIBitsInternal 9 -NtGdiGetETM 2 -NtGdiGetEudcTimeStampEx 3 -NtGdiGetFontData 5 -NtGdiGetFontResourceInfoInternalW 7 -NtGdiGetGlyphIndicesW 5 -NtGdiGetGlyphIndicesWInternal 6 -NtGdiGetGlyphOutline 8 -NtGdiGetKerningPairs 3 -NtGdiGetLinkedUFIs 3 -NtGdiGetMiterLimit 2 -NtGdiGetMonitorID 3 -NtGdiGetNearestColor 2 -NtGdiGetNearestPaletteIndex 2 -NtGdiGetObjectBitmapHandle 2 -NtGdiGetOutlineTextMetricsInternalW 4 -NtGdiGetPath 4 -NtGdiGetPixel 3 -NtGdiGetRandomRgn 3 -NtGdiGetRasterizerCaps 2 -NtGdiGetRealizationInfo 3 -NtGdiGetRegionData 3 -NtGdiGetRgnBox 2 -NtGdiGetServerMetaFileBits 7 -NtGdiGetSpoolMessage 4 -NtGdiGetStats 5 -NtGdiGetStockObject 1 -NtGdiGetStringBitmapW 5 -NtGdiGetSystemPaletteUse 1 -NtGdiGetTextCharsetInfo 3 -NtGdiGetTextExtent 5 -NtGdiGetTextExtentExW 8 -NtGdiGetTextFaceW 4 -NtGdiGetTextMetricsW 3 -NtGdiGetTransform 3 -NtGdiGetUFI 6 -NtGdiGetEmbUFI 7 -NtGdiGetUFIPathname 10 -NtGdiGetEmbedFonts 0 -NtGdiChangeGhostFont 2 -NtGdiAddEmbFontToDC 2 -NtGdiGetFontUnicodeRanges 2 -NtGdiGetWidthTable 7 -NtGdiGradientFill 6 -NtGdiHfontCreate 5 -NtGdiIcmBrushInfo 8 -NtGdiInit 0 -NtGdiInitSpool 0 -NtGdiIntersectClipRect 5 -NtGdiInvertRgn 2 -NtGdiLineTo 3 -NtGdiMakeFontDir 5 -NtGdiMakeInfoDC 2 -NtGdiMaskBlt 13 -NtGdiModifyWorldTransform 3 -NtGdiMonoBitmap 1 -NtGdiMoveTo 4 -NtGdiOffsetClipRgn 3 -NtGdiOffsetRgn 3 -NtGdiOpenDCW 7 -NtGdiPatBlt 6 -NtGdiPolyPatBlt 5 -NtGdiPathToRegion 1 -NtGdiPlgBlt 11 -NtGdiPolyDraw 4 -NtGdiPolyPolyDraw 5 -NtGdiPolyTextOutW 4 -NtGdiPtInRegion 3 -NtGdiPtVisible 3 -NtGdiQueryFonts 3 -NtGdiQueryFontAssocInfo 1 -NtGdiRectangle 5 -NtGdiRectInRegion 2 -NtGdiRectVisible 2 -NtGdiRemoveFontResourceW 6 -NtGdiRemoveFontMemResourceEx 1 -NtGdiResetDC 5 -NtGdiResizePalette 2 -NtGdiRestoreDC 2 -NtGdiRoundRect 7 -NtGdiSaveDC 1 -NtGdiScaleViewportExtEx 6 -NtGdiScaleWindowExtEx 6 -GreSelectBitmap 2 -NtGdiSelectBrush 2 -NtGdiSelectClipPath 2 -NtGdiSelectFont 2 -NtGdiSelectPen 2 -NtGdiSetBitmapAttributes 2 -NtGdiSetBitmapBits 3 -NtGdiSetBitmapDimension 4 -NtGdiSetBoundsRect 3 -NtGdiSetBrushAttributes 2 -NtGdiSetBrushOrg 4 -NtGdiSetColorAdjustment 2 -NtGdiSetColorSpace 2 -NtGdiSetDeviceGammaRamp 2 -NtGdiSetDIBitsToDeviceInternal 16 -NtGdiSetFontEnumeration 1 -NtGdiSetFontXform 3 -NtGdiSetIcmMode 3 -NtGdiSetLinkedUFIs 3 -NtGdiSetMagicColors 3 -NtGdiSetMetaRgn 1 -NtGdiSetMiterLimit 3 -NtGdiGetDeviceWidth 1 -NtGdiMirrorWindowOrg 1 -NtGdiSetLayout 3 -NtGdiSetPixel 4 -NtGdiSetPixelFormat 2 -NtGdiSetRectRgn 5 -NtGdiSetSystemPaletteUse 2 -NtGdiSetTextJustification 3 -NtGdiSetupPublicCFONT 3 -NtGdiSetVirtualResolution 5 -NtGdiSetSizeDevice 3 -NtGdiStartDoc 4 -NtGdiStartPage 1 -NtGdiStretchBlt 12 -NtGdiStretchDIBitsInternal 16 -NtGdiStrokeAndFillPath 1 -NtGdiStrokePath 1 -NtGdiSwapBuffers 1 -NtGdiTransformPoints 5 -NtGdiTransparentBlt 11 -NtGdiUnloadPrinterDriver 2 -NtGdiUnmapMemFont 1 -NtGdiUnrealizeObject 1 -NtGdiUpdateColors 1 -NtGdiWidenPath 1 -NtUserActivateKeyboardLayout 2 -NtUserAlterWindowStyle 3 -NtUserAssociateInputContext 3 -NtUserAttachThreadInput 3 -NtUserBeginPaint 2 -NtUserBitBltSysBmp 8 -NtUserBlockInput 1 -NtUserBuildHimcList 4 -NtUserBuildHwndList 7 -NtUserBuildNameList 4 -NtUserBuildPropList 4 -NtUserCallHwnd 2 -NtUserCallHwndLock 2 -NtUserCallHwndOpt 2 -NtUserCallHwndParam 3 -NtUserCallHwndParamLock 3 -NtUserCallMsgFilter 2 -NtUserCallNextHookEx 4 -NtUserCallNoParam 1 -NtUserCallOneParam 2 -NtUserCallTwoParam 3 -NtUserChangeClipboardChain 2 -NtUserChangeDisplaySettings 4 -NtUserCheckImeHotKey 2 -NtUserCheckMenuItem 3 -NtUserChildWindowFromPointEx 4 -NtUserClipCursor 1 -NtUserCloseClipboard 0 -NtUserCloseDesktop 1 -NtUserCloseWindowStation 1 -NtUserConsoleControl 3 -NtUserConvertMemHandle 2 -NtUserCopyAcceleratorTable 3 -NtUserCountClipboardFormats 0 -NtUserCreateAcceleratorTable 2 -NtUserCreateCaret 4 -NtUserCreateDesktop 5 -NtUserCreateInputContext 1 -NtUserCreateLocalMemHandle 4 -NtUserCreateWindowEx 15 -NtUserCreateWindowStation 7 -NtUserDdeGetQualityOfService 3 -NtUserDdeInitialize 5 -NtUserDdeSetQualityOfService 3 -NtUserDeferWindowPos 8 -NtUserDefSetText 2 -NtUserDeleteMenu 3 -NtUserDestroyAcceleratorTable 1 -NtUserDestroyCursor 2 -NtUserDestroyInputContext 1 -NtUserDestroyMenu 1 -NtUserDestroyWindow 1 -NtUserDisableThreadIme 1 -NtUserDispatchMessage 1 -NtUserDragDetect 3 -NtUserDragObject 5 -NtUserDrawAnimatedRects 4 -NtUserDrawCaption 4 -NtUserDrawCaptionTemp 7 -NtUserDrawIconEx 11 -NtUserDrawMenuBarTemp 5 -NtUserEmptyClipboard 0 -NtUserEnableMenuItem 3 -NtUserEnableScrollBar 3 -NtUserEndDeferWindowPosEx 2 -NtUserEndMenu 0 -NtUserEndPaint 2 -NtUserEnumDisplayDevices 4 -NtUserEnumDisplayMonitors 4 -NtUserEnumDisplaySettings 4 -NtUserEvent 1 -NtUserExcludeUpdateRgn 2 -NtUserFillWindow 4 -NtUserFindExistingCursorIcon 3 -NtUserFindWindowEx 5 -NtUserFlashWindowEx 1 -NtUserGetAltTabInfo 6 -NtUserGetAncestor 2 -NtUserGetAppImeLevel 1 -NtUserGetAsyncKeyState 1 -NtUserGetAtomName 2 -NtUserGetCaretBlinkTime 0 -NtUserGetCaretPos 1 -NtUserGetClassInfoEx 5 -NtUserGetClassName 3 -NtUserGetClipboardData 2 -NtUserGetClipboardFormatName 3 -NtUserGetClipboardOwner 0 -NtUserGetClipboardSequenceNumber 0 -NtUserGetClipboardViewer 0 -NtUserGetClipCursor 1 -NtUserGetComboBoxInfo 2 -NtUserGetControlBrush 3 -NtUserGetControlColor 4 -NtUserGetCPD 3 -NtUserGetCursorFrameInfo 4 -NtUserGetCursorInfo 1 -NtUserGetDC 1 -NtUserGetDCEx 3 -NtUserGetDoubleClickTime 0 -NtUserGetForegroundWindow 0 -NtUserGetGuiResources 2 -NtUserGetGUIThreadInfo 2 -NtUserGetIconInfo 6 -NtUserGetIconSize 4 -NtUserGetImeHotKey 4 -NtUserGetImeInfoEx 2 -NtUserGetInternalWindowPos 3 -NtUserGetKeyboardLayoutList 2 -NtUserGetKeyboardLayoutName 1 -NtUserGetKeyboardState 1 -NtUserGetKeyNameText 3 -NtUserGetKeyState 1 -NtUserGetListBoxInfo 1 -NtUserGetMenuBarInfo 4 -NtUserGetMenuIndex 2 -NtUserGetMenuItemRect 4 -NtUserGetMessage 4 -NtUserGetMouseMovePointsEx 5 -NtUserGetObjectInformation 5 -NtUserGetOpenClipboardWindow 0 -NtUserGetPriorityClipboardFormat 2 -NtUserGetProcessWindowStation 0 -NtUserGetRawInputBuffer 3 -NtUserGetRawInputData 5 -NtUserGetRawInputDeviceInfo 4 -NtUserGetRawInputDeviceList 3 -NtUserGetRegisteredRawInputDevices 3 -NtUserGetScrollBarInfo 3 -NtUserGetSystemMenu 2 -NtUserGetThreadDesktop 2 -NtUserGetThreadState 1 -NtUserGetTitleBarInfo 2 -NtUserGetUpdateRect 3 -NtUserGetUpdateRgn 3 -NtUserGetWindowDC 1 -NtUserGetWindowPlacement 2 -NtUserGetWOWClass 2 -NtUserHardErrorControl 3 -NtUserHideCaret 1 -NtUserHiliteMenuItem 4 -NtUserImpersonateDdeClientWindow 2 -NtUserInitialize 3 -NtUserInitializeClientPfnArrays 4 -NtUserInitTask 12 -NtUserInternalGetWindowText 3 -NtUserInvalidateRect 3 -NtUserInvalidateRgn 3 -NtUserIsClipboardFormatAvailable 1 -NtUserKillTimer 2 -NtUserLoadKeyboardLayoutEx 7 -NtUserLockWindowStation 1 -NtUserLockWindowUpdate 1 -NtUserLockWorkStation 0 -NtUserMapVirtualKeyEx 4 -NtUserMenuItemFromPoint 4 -NtUserMessageCall 7 -NtUserMinMaximize 3 -NtUserMNDragLeave 0 -NtUserMNDragOver 2 -NtUserModifyUserStartupInfoFlags 2 -NtUserMoveWindow 6 -NtUserNotifyIMEStatus 3 -NtUserNotifyProcessCreate 4 -NtUserNotifyWinEvent 4 -NtUserOpenClipboard 2 -NtUserOpenDesktop 3 -NtUserOpenInputDesktop 3 -NtUserOpenWindowStation 2 -NtUserPaintDesktop 1 -NtUserPeekMessage 5 -NtUserPostMessage 4 -NtUserPostThreadMessage 4 -NtUserPrintWindow 3 -NtUserProcessConnect 3 -NtUserQueryInformationThread 4 -NtUserQueryInputContext 2 -NtUserQuerySendMessage 1 -NtUserQueryWindow 2 -NtUserRealChildWindowFromPoint 3 -NtUserRealInternalGetMessage 6 -NtUserRealWaitMessageEx 2 -NtUserRedrawWindow 4 -NtUserRegisterClassExWOW 7 -NtUserRegisterUserApiHook 4 -NtUserRegisterHotKey 4 -NtUserRegisterRawInputDevices 3 -NtUserRegisterTasklist 1 -NtUserRegisterWindowMessage 1 -NtUserRemoveMenu 3 -NtUserRemoveProp 2 -NtUserResolveDesktop 4 -NtUserResolveDesktopForWOW 1 -NtUserSBGetParms 4 -NtUserScrollDC 7 -NtUserScrollWindowEx 8 -NtUserSelectPalette 3 -NtUserSendInput 3 -NtUserSetActiveWindow 1 -NtUserSetAppImeLevel 2 -NtUserSetCapture 1 -NtUserSetClassLong 4 -NtUserSetClassWord 3 -NtUserSetClipboardData 3 -NtUserSetClipboardViewer 1 -NtUserSetConsoleReserveKeys 2 -NtUserSetCursor 1 -NtUserSetCursorContents 2 -NtUserSetCursorIconData 4 -NtUserSetFocus 1 -NtUserSetImeHotKey 5 -NtUserSetImeInfoEx 1 -NtUserSetImeOwnerWindow 2 -NtUserSetInformationProcess 4 -NtUserSetInformationThread 4 -NtUserSetInternalWindowPos 4 -NtUserSetKeyboardState 1 -NtUserSetLogonNotifyWindow 1 -NtUserSetMenu 3 -NtUserSetMenuContextHelpId 2 -NtUserSetMenuDefaultItem 3 -NtUserSetMenuFlagRtoL 1 -NtUserSetObjectInformation 4 -NtUserSetParent 2 -NtUserSetProcessWindowStation 1 -NtUserSetProp 3 -NtUserSetScrollInfo 4 -NtUserSetShellWindowEx 2 -NtUserSetSysColors 4 -NtUserSetSystemCursor 2 -NtUserSetSystemMenu 2 -NtUserSetSystemTimer 4 -NtUserSetThreadDesktop 1 -NtUserSetThreadLayoutHandles 2 -NtUserSetThreadState 2 -NtUserSetTimer 4 -NtUserSetWindowFNID 2 -NtUserSetWindowLong 4 -NtUserSetWindowPlacement 2 -NtUserSetWindowPos 7 -NtUserSetWindowRgn 3 -NtUserSetWindowsHookAW 3 -NtUserSetWindowsHookEx 6 -NtUserSetWindowStationUser 4 -NtUserSetWindowWord 3 -NtUserSetWinEventHook 8 -NtUserShowCaret 1 -NtUserShowScrollBar 3 -NtUserShowWindow 2 -NtUserShowWindowAsync 2 -NtUserSoundSentry 0 -NtUserSwitchDesktop 1 -NtUserSystemParametersInfo 4 -NtUserTestForInteractiveUser 1 -NtUserThunkedMenuInfo 2 -NtUserThunkedMenuItemInfo 6 -NtUserToUnicodeEx 7 -NtUserTrackMouseEvent 1 -NtUserTrackPopupMenuEx 6 -NtUserCalcMenuBar 5 -NtUserPaintMenuBar 6 -NtUserTranslateAccelerator 3 -NtUserTranslateMessage 2 -NtUserUnhookWindowsHookEx 1 -NtUserUnhookWinEvent 1 -NtUserUnloadKeyboardLayout 1 -NtUserUnlockWindowStation 1 -NtUserUnregisterClass 3 -NtUserUnregisterUserApiHook 0 -NtUserUnregisterHotKey 2 -NtUserUpdateInputContext 3 -NtUserUpdateInstance 3 -NtUserUpdateLayeredWindow 10 -NtUserGetLayeredWindowAttributes 4 -NtUserSetLayeredWindowAttributes 4 -NtUserUpdatePerUserSystemParameters 2 -NtUserUserHandleGrantAccess 3 -NtUserValidateHandleSecure 1 -NtUserValidateRect 2 -NtUserValidateTimerCallback 1 -NtUserVkKeyScanEx 3 -NtUserWaitForInputIdle 3 -NtUserWaitForMsgAndEvent 1 -NtUserWaitMessage 0 -NtUserWin32PoolAllocationStats 6 -NtUserWindowFromPoint 2 -NtUserYieldTask 0 -NtUserRemoteConnect 3 -NtUserRemoteRedrawRectangle 4 -NtUserRemoteRedrawScreen 0 -NtUserRemoteStopScreenUpdates 0 -NtUserCtxDisplayIOCtl 3 -NtGdiEngAssociateSurface 3 -NtGdiEngCreateBitmap 6 -NtGdiEngCreateDeviceSurface 4 -NtGdiEngCreateDeviceBitmap 4 -NtGdiEngCreatePalette 6 -NtGdiEngComputeGlyphSet 3 -NtGdiEngCopyBits 6 -NtGdiEngDeletePalette 1 -NtGdiEngDeleteSurface 1 -NtGdiEngEraseSurface 3 -NtGdiEngUnlockSurface 1 -NtGdiEngLockSurface 1 -NtGdiEngBitBlt 11 -NtGdiEngStretchBlt 11 -NtGdiEngPlgBlt 11 -NtGdiEngMarkBandingSurface 1 -NtGdiEngStrokePath 8 -NtGdiEngFillPath 7 -NtGdiEngStrokeAndFillPath 10 -NtGdiEngPaint 5 -NtGdiEngLineTo 9 -NtGdiEngAlphaBlend 7 -NtGdiEngGradientFill 10 -NtGdiEngTransparentBlt 8 -NtGdiEngTextOut 10 -NtGdiEngStretchBltROP 13 -NtGdiXLATEOBJ_cGetPalette 4 -NtGdiXLATEOBJ_iXlate 2 -NtGdiXLATEOBJ_hGetColorTransform 1 -NtGdiCLIPOBJ_bEnum 3 -NtGdiCLIPOBJ_cEnumStart 5 -NtGdiCLIPOBJ_ppoGetPath 1 -NtGdiEngDeletePath 1 -NtGdiEngCreateClip 0 -NtGdiEngDeleteClip 1 -NtGdiBRUSHOBJ_ulGetBrushColor 1 -NtGdiBRUSHOBJ_pvAllocRbrush 2 -NtGdiBRUSHOBJ_pvGetRbrush 1 -NtGdiBRUSHOBJ_hGetColorTransform 1 -NtGdiXFORMOBJ_bApplyXform 5 -NtGdiXFORMOBJ_iGetXform 2 -NtGdiFONTOBJ_vGetInfo 3 -NtGdiFONTOBJ_pxoGetXform 1 -NtGdiFONTOBJ_cGetGlyphs 5 -NtGdiFONTOBJ_pifi 1 -NtGdiFONTOBJ_pfdg 1 -NtGdiFONTOBJ_pQueryGlyphAttrs 2 -NtGdiFONTOBJ_pvTrueTypeFontFile 2 -NtGdiFONTOBJ_cGetAllGlyphHandles 2 -NtGdiSTROBJ_bEnum 3 -NtGdiSTROBJ_bEnumPositionsOnly 3 -NtGdiSTROBJ_bGetAdvanceWidths 4 -NtGdiSTROBJ_vEnumStart 1 -NtGdiSTROBJ_dwGetCodePage 1 -NtGdiPATHOBJ_vGetBounds 2 -NtGdiPATHOBJ_bEnum 2 -NtGdiPATHOBJ_vEnumStart 1 -NtGdiPATHOBJ_vEnumStartClipLines 4 -NtGdiPATHOBJ_bEnumClipLines 3 -NtGdiGetDhpdev 1 -NtGdiEngCheckAbort 1 -NtGdiHT_Get8BPPFormatPalette 4 -NtGdiHT_Get8BPPMaskPalette 6 -NtGdiUpdateTransform 1 -NtGdiSetPUMPDOBJ 4 -NtGdiBRUSHOBJ_DeleteRbrush 2 -NtGdiUnmapMemFont 1 -NtGdiDrawStream 3 -NtGdiMakeObjectXferable 2 -NtGdiMakeObjectUnXferable 1 diff --git a/rostests/apitests/w32kdll/w32kdll_2k3sp2/w32kdll_2k3sp2.S b/rostests/apitests/w32kdll/w32kdll_2k3sp2/w32kdll_2k3sp2.S deleted file mode 100644 index 0206219b29c..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_2k3sp2/w32kdll_2k3sp2.S +++ /dev/null @@ -1,4665 +0,0 @@ -/* FILE: System Call Stubs for Native API - * COPYRIGHT: See COPYING in the top level directory - * PURPOSE: obj-i386\lib\win32ksys\win32k.S - * PROGRAMMER: Computer Generated File. See tools/nci/ncitool.c - * REMARK: DO NOT EDIT OR COMMIT MODIFICATIONS TO THIS FILE - */ - - -#include - -.global _NtGdiAbortDoc@4 -_NtGdiAbortDoc@4: - movl $0x1000, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiAbortPath@4 -_NtGdiAbortPath@4: - movl $0x1001, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiAddFontResourceW@24 -_NtGdiAddFontResourceW@24: - movl $0x1002, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiAddRemoteFontToDC@16 -_NtGdiAddRemoteFontToDC@16: - movl $0x1003, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiAddFontMemResourceEx@20 -_NtGdiAddFontMemResourceEx@20: - movl $0x1004, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiRemoveMergeFont@8 -_NtGdiRemoveMergeFont@8: - movl $0x1005, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiAddRemoteMMInstanceToDC@12 -_NtGdiAddRemoteMMInstanceToDC@12: - movl $0x1006, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiAlphaBlend@48 -_NtGdiAlphaBlend@48: - movl $0x1007, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x30 - -.global _NtGdiAngleArc@24 -_NtGdiAngleArc@24: - movl $0x1008, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiAnyLinkedFonts@0 -_NtGdiAnyLinkedFonts@0: - movl $0x1009, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtGdiFontIsLinked@4 -_NtGdiFontIsLinked@4: - movl $0x100a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiArcInternal@40 -_NtGdiArcInternal@40: - movl $0x100b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x28 - -.global _NtGdiBeginPath@4 -_NtGdiBeginPath@4: - movl $0x100c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiBitBlt@44 -_NtGdiBitBlt@44: - movl $0x100d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiCancelDC@4 -_NtGdiCancelDC@4: - movl $0x100e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiCheckBitmapBits@32 -_NtGdiCheckBitmapBits@32: - movl $0x100f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiCloseFigure@4 -_NtGdiCloseFigure@4: - movl $0x1010, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiClearBitmapAttributes@8 -_NtGdiClearBitmapAttributes@8: - movl $0x1011, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiClearBrushAttributes@8 -_NtGdiClearBrushAttributes@8: - movl $0x1012, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiColorCorrectPalette@24 -_NtGdiColorCorrectPalette@24: - movl $0x1013, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiCombineRgn@16 -_NtGdiCombineRgn@16: - movl $0x1014, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiCombineTransform@12 -_NtGdiCombineTransform@12: - movl $0x1015, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiComputeXformCoefficients@4 -_NtGdiComputeXformCoefficients@4: - movl $0x1016, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiConsoleTextOut@16 -_NtGdiConsoleTextOut@16: - movl $0x1017, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiConvertMetafileRect@8 -_NtGdiConvertMetafileRect@8: - movl $0x1018, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiCreateBitmap@20 -_NtGdiCreateBitmap@20: - movl $0x1019, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiCreateClientObj@4 -_NtGdiCreateClientObj@4: - movl $0x101a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiCreateColorSpace@4 -_NtGdiCreateColorSpace@4: - movl $0x101b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiCreateColorTransform@32 -_NtGdiCreateColorTransform@32: - movl $0x101c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiCreateCompatibleBitmap@12 -_NtGdiCreateCompatibleBitmap@12: - movl $0x101d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiCreateCompatibleDC@4 -_NtGdiCreateCompatibleDC@4: - movl $0x101e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiCreateDIBBrush@24 -_NtGdiCreateDIBBrush@24: - movl $0x101f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiCreateDIBitmapInternal@44 -_NtGdiCreateDIBitmapInternal@44: - movl $0x1020, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiCreateDIBSection@36 -_NtGdiCreateDIBSection@36: - movl $0x1021, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x24 - -.global _NtGdiCreateEllipticRgn@16 -_NtGdiCreateEllipticRgn@16: - movl $0x1022, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiCreateHalftonePalette@4 -_NtGdiCreateHalftonePalette@4: - movl $0x1023, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiCreateHatchBrushInternal@12 -_NtGdiCreateHatchBrushInternal@12: - movl $0x1024, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiCreateMetafileDC@4 -_NtGdiCreateMetafileDC@4: - movl $0x1025, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiCreatePaletteInternal@8 -_NtGdiCreatePaletteInternal@8: - movl $0x1026, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiCreatePatternBrushInternal@12 -_NtGdiCreatePatternBrushInternal@12: - movl $0x1027, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiCreatePen@16 -_NtGdiCreatePen@16: - movl $0x1028, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiCreateRectRgn@16 -_NtGdiCreateRectRgn@16: - movl $0x1029, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiCreateRoundRectRgn@24 -_NtGdiCreateRoundRectRgn@24: - movl $0x102a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiCreateServerMetaFile@24 -_NtGdiCreateServerMetaFile@24: - movl $0x102b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiCreateSolidBrush@8 -_NtGdiCreateSolidBrush@8: - movl $0x102c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiD3dContextCreate@16 -_NtGdiD3dContextCreate@16: - movl $0x102d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiD3dContextDestroy@4 -_NtGdiD3dContextDestroy@4: - movl $0x102e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiD3dContextDestroyAll@4 -_NtGdiD3dContextDestroyAll@4: - movl $0x102f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiD3dValidateTextureStageState@4 -_NtGdiD3dValidateTextureStageState@4: - movl $0x1030, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiD3dDrawPrimitives2@28 -_NtGdiD3dDrawPrimitives2@28: - movl $0x1031, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiDdGetDriverState@4 -_NtGdiDdGetDriverState@4: - movl $0x1032, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdAddAttachedSurface@12 -_NtGdiDdAddAttachedSurface@12: - movl $0x1033, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdAlphaBlt@12 -_NtGdiDdAlphaBlt@12: - movl $0x1034, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdAttachSurface@8 -_NtGdiDdAttachSurface@8: - movl $0x1035, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdBeginMoCompFrame@8 -_NtGdiDdBeginMoCompFrame@8: - movl $0x1036, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdBlt@12 -_NtGdiDdBlt@12: - movl $0x1037, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdCanCreateSurface@8 -_NtGdiDdCanCreateSurface@8: - movl $0x1038, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdCanCreateD3DBuffer@8 -_NtGdiDdCanCreateD3DBuffer@8: - movl $0x1039, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdColorControl@8 -_NtGdiDdColorControl@8: - movl $0x103a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdCreateDirectDrawObject@4 -_NtGdiDdCreateDirectDrawObject@4: - movl $0x103b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdCreateSurface@32 -_NtGdiDdCreateSurface@32: - movl $0x103c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiDdCreateD3DBuffer@32 -_NtGdiDdCreateD3DBuffer@32: - movl $0x103d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiDdCreateMoComp@8 -_NtGdiDdCreateMoComp@8: - movl $0x103e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdCreateSurfaceObject@24 -_NtGdiDdCreateSurfaceObject@24: - movl $0x103f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiDdDeleteDirectDrawObject@4 -_NtGdiDdDeleteDirectDrawObject@4: - movl $0x1040, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDeleteSurfaceObject@4 -_NtGdiDdDeleteSurfaceObject@4: - movl $0x1041, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDestroyMoComp@8 -_NtGdiDdDestroyMoComp@8: - movl $0x1042, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdDestroySurface@8 -_NtGdiDdDestroySurface@8: - movl $0x1043, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdDestroyD3DBuffer@4 -_NtGdiDdDestroyD3DBuffer@4: - movl $0x1044, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdEndMoCompFrame@8 -_NtGdiDdEndMoCompFrame@8: - movl $0x1045, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdFlip@20 -_NtGdiDdFlip@20: - movl $0x1046, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiDdFlipToGDISurface@8 -_NtGdiDdFlipToGDISurface@8: - movl $0x1047, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetAvailDriverMemory@8 -_NtGdiDdGetAvailDriverMemory@8: - movl $0x1048, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetBltStatus@8 -_NtGdiDdGetBltStatus@8: - movl $0x1049, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetDC@8 -_NtGdiDdGetDC@8: - movl $0x104a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetDriverInfo@8 -_NtGdiDdGetDriverInfo@8: - movl $0x104b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetDxHandle@12 -_NtGdiDdGetDxHandle@12: - movl $0x104c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdGetFlipStatus@8 -_NtGdiDdGetFlipStatus@8: - movl $0x104d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetInternalMoCompInfo@8 -_NtGdiDdGetInternalMoCompInfo@8: - movl $0x104e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetMoCompBuffInfo@8 -_NtGdiDdGetMoCompBuffInfo@8: - movl $0x104f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetMoCompGuids@8 -_NtGdiDdGetMoCompGuids@8: - movl $0x1050, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetMoCompFormats@8 -_NtGdiDdGetMoCompFormats@8: - movl $0x1051, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetScanLine@8 -_NtGdiDdGetScanLine@8: - movl $0x1052, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdLock@12 -_NtGdiDdLock@12: - movl $0x1053, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdLockD3D@8 -_NtGdiDdLockD3D@8: - movl $0x1054, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdQueryDirectDrawObject@44 -_NtGdiDdQueryDirectDrawObject@44: - movl $0x1055, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiDdQueryMoCompStatus@8 -_NtGdiDdQueryMoCompStatus@8: - movl $0x1056, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdReenableDirectDrawObject@8 -_NtGdiDdReenableDirectDrawObject@8: - movl $0x1057, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdReleaseDC@4 -_NtGdiDdReleaseDC@4: - movl $0x1058, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdRenderMoComp@8 -_NtGdiDdRenderMoComp@8: - movl $0x1059, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdResetVisrgn@8 -_NtGdiDdResetVisrgn@8: - movl $0x105a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdSetColorKey@8 -_NtGdiDdSetColorKey@8: - movl $0x105b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdSetExclusiveMode@8 -_NtGdiDdSetExclusiveMode@8: - movl $0x105c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdSetGammaRamp@12 -_NtGdiDdSetGammaRamp@12: - movl $0x105d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdCreateSurfaceEx@12 -_NtGdiDdCreateSurfaceEx@12: - movl $0x105e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdSetOverlayPosition@12 -_NtGdiDdSetOverlayPosition@12: - movl $0x105f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdUnattachSurface@8 -_NtGdiDdUnattachSurface@8: - movl $0x1060, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdUnlock@8 -_NtGdiDdUnlock@8: - movl $0x1061, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdUnlockD3D@8 -_NtGdiDdUnlockD3D@8: - movl $0x1062, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdUpdateOverlay@12 -_NtGdiDdUpdateOverlay@12: - movl $0x1063, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdWaitForVerticalBlank@8 -_NtGdiDdWaitForVerticalBlank@8: - movl $0x1064, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpCanCreateVideoPort@8 -_NtGdiDvpCanCreateVideoPort@8: - movl $0x1065, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpColorControl@8 -_NtGdiDvpColorControl@8: - movl $0x1066, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpCreateVideoPort@8 -_NtGdiDvpCreateVideoPort@8: - movl $0x1067, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpDestroyVideoPort@8 -_NtGdiDvpDestroyVideoPort@8: - movl $0x1068, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpFlipVideoPort@16 -_NtGdiDvpFlipVideoPort@16: - movl $0x1069, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiDvpGetVideoPortBandwidth@8 -_NtGdiDvpGetVideoPortBandwidth@8: - movl $0x106a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpGetVideoPortField@8 -_NtGdiDvpGetVideoPortField@8: - movl $0x106b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpGetVideoPortFlipStatus@8 -_NtGdiDvpGetVideoPortFlipStatus@8: - movl $0x106c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpGetVideoPortInputFormats@8 -_NtGdiDvpGetVideoPortInputFormats@8: - movl $0x106d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpGetVideoPortLine@8 -_NtGdiDvpGetVideoPortLine@8: - movl $0x106e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpGetVideoPortOutputFormats@8 -_NtGdiDvpGetVideoPortOutputFormats@8: - movl $0x106f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpGetVideoPortConnectInfo@8 -_NtGdiDvpGetVideoPortConnectInfo@8: - movl $0x1070, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpGetVideoSignalStatus@8 -_NtGdiDvpGetVideoSignalStatus@8: - movl $0x1071, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpUpdateVideoPort@16 -_NtGdiDvpUpdateVideoPort@16: - movl $0x1072, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiDvpWaitForVideoPortSync@8 -_NtGdiDvpWaitForVideoPortSync@8: - movl $0x1073, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpAcquireNotification@12 -_NtGdiDvpAcquireNotification@12: - movl $0x1074, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDvpReleaseNotification@8 -_NtGdiDvpReleaseNotification@8: - movl $0x1075, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDxgGenericThunk@24 -_NtGdiDxgGenericThunk@24: - movl $0x1076, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiDeleteClientObj@4 -_NtGdiDeleteClientObj@4: - movl $0x1077, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDeleteColorSpace@4 -_NtGdiDeleteColorSpace@4: - movl $0x1078, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDeleteColorTransform@8 -_NtGdiDeleteColorTransform@8: - movl $0x1079, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDeleteObjectApp@4 -_NtGdiDeleteObjectApp@4: - movl $0x107a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDescribePixelFormat@16 -_NtGdiDescribePixelFormat@16: - movl $0x107b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiGetPerBandInfo@8 -_NtGdiGetPerBandInfo@8: - movl $0x107c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDoBanding@16 -_NtGdiDoBanding@16: - movl $0x107d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiDoPalette@24 -_NtGdiDoPalette@24: - movl $0x107e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiDrawEscape@16 -_NtGdiDrawEscape@16: - movl $0x107f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiEllipse@20 -_NtGdiEllipse@20: - movl $0x1080, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiEnableEudc@4 -_NtGdiEnableEudc@4: - movl $0x1081, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEndDoc@4 -_NtGdiEndDoc@4: - movl $0x1082, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEndPage@4 -_NtGdiEndPage@4: - movl $0x1083, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEndPath@4 -_NtGdiEndPath@4: - movl $0x1084, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEnumFontChunk@20 -_NtGdiEnumFontChunk@20: - movl $0x1085, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiEnumFontClose@4 -_NtGdiEnumFontClose@4: - movl $0x1086, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEnumFontOpen@28 -_NtGdiEnumFontOpen@28: - movl $0x1087, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiEnumObjects@16 -_NtGdiEnumObjects@16: - movl $0x1088, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiEqualRgn@8 -_NtGdiEqualRgn@8: - movl $0x1089, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiEudcLoadUnloadLink@28 -_NtGdiEudcLoadUnloadLink@28: - movl $0x108a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiExcludeClipRect@20 -_NtGdiExcludeClipRect@20: - movl $0x108b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiExtCreatePen@44 -_NtGdiExtCreatePen@44: - movl $0x108c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiExtCreateRegion@12 -_NtGdiExtCreateRegion@12: - movl $0x108d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiExtEscape@32 -_NtGdiExtEscape@32: - movl $0x108e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiExtFloodFill@20 -_NtGdiExtFloodFill@20: - movl $0x108f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiExtGetObjectW@12 -_NtGdiExtGetObjectW@12: - movl $0x1090, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiExtSelectClipRgn@12 -_NtGdiExtSelectClipRgn@12: - movl $0x1091, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiExtTextOutW@36 -_NtGdiExtTextOutW@36: - movl $0x1092, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x24 - -.global _NtGdiFillPath@4 -_NtGdiFillPath@4: - movl $0x1093, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiFillRgn@12 -_NtGdiFillRgn@12: - movl $0x1094, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiFlattenPath@4 -_NtGdiFlattenPath@4: - movl $0x1095, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiFlush@0 -_NtGdiFlush@0: - movl $0x1096, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtGdiForceUFIMapping@8 -_NtGdiForceUFIMapping@8: - movl $0x1097, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiFrameRgn@20 -_NtGdiFrameRgn@20: - movl $0x1098, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiFullscreenControl@20 -_NtGdiFullscreenControl@20: - movl $0x1099, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiGetAndSetDCDword@16 -_NtGdiGetAndSetDCDword@16: - movl $0x109a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiGetAppClipBox@8 -_NtGdiGetAppClipBox@8: - movl $0x109b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetBitmapBits@12 -_NtGdiGetBitmapBits@12: - movl $0x109c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetBitmapDimension@8 -_NtGdiGetBitmapDimension@8: - movl $0x109d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetBoundsRect@12 -_NtGdiGetBoundsRect@12: - movl $0x109e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetCharABCWidthsW@24 -_NtGdiGetCharABCWidthsW@24: - movl $0x109f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiGetCharacterPlacementW@24 -_NtGdiGetCharacterPlacementW@24: - movl $0x10a0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiGetCharSet@4 -_NtGdiGetCharSet@4: - movl $0x10a1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiGetCharWidthW@24 -_NtGdiGetCharWidthW@24: - movl $0x10a2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiGetCharWidthInfo@8 -_NtGdiGetCharWidthInfo@8: - movl $0x10a3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetColorAdjustment@8 -_NtGdiGetColorAdjustment@8: - movl $0x10a4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetColorSpaceforBitmap@4 -_NtGdiGetColorSpaceforBitmap@4: - movl $0x10a5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiGetDCDword@12 -_NtGdiGetDCDword@12: - movl $0x10a6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetDCforBitmap@4 -_NtGdiGetDCforBitmap@4: - movl $0x10a7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiGetDCObject@8 -_NtGdiGetDCObject@8: - movl $0x10a8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetDCPoint@12 -_NtGdiGetDCPoint@12: - movl $0x10a9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetDeviceCaps@8 -_NtGdiGetDeviceCaps@8: - movl $0x10aa, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetDeviceGammaRamp@8 -_NtGdiGetDeviceGammaRamp@8: - movl $0x10ab, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetDeviceCapsAll@8 -_NtGdiGetDeviceCapsAll@8: - movl $0x10ac, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetDIBitsInternal@36 -_NtGdiGetDIBitsInternal@36: - movl $0x10ad, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x24 - -.global _NtGdiGetETM@8 -_NtGdiGetETM@8: - movl $0x10ae, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetEudcTimeStampEx@12 -_NtGdiGetEudcTimeStampEx@12: - movl $0x10af, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetFontData@20 -_NtGdiGetFontData@20: - movl $0x10b0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiGetFontResourceInfoInternalW@28 -_NtGdiGetFontResourceInfoInternalW@28: - movl $0x10b1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiGetGlyphIndicesW@20 -_NtGdiGetGlyphIndicesW@20: - movl $0x10b2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiGetGlyphIndicesWInternal@24 -_NtGdiGetGlyphIndicesWInternal@24: - movl $0x10b3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiGetGlyphOutline@32 -_NtGdiGetGlyphOutline@32: - movl $0x10b4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiGetKerningPairs@12 -_NtGdiGetKerningPairs@12: - movl $0x10b5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetLinkedUFIs@12 -_NtGdiGetLinkedUFIs@12: - movl $0x10b6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetMiterLimit@8 -_NtGdiGetMiterLimit@8: - movl $0x10b7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetMonitorID@12 -_NtGdiGetMonitorID@12: - movl $0x10b8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetNearestColor@8 -_NtGdiGetNearestColor@8: - movl $0x10b9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetNearestPaletteIndex@8 -_NtGdiGetNearestPaletteIndex@8: - movl $0x10ba, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetObjectBitmapHandle@8 -_NtGdiGetObjectBitmapHandle@8: - movl $0x10bb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetOutlineTextMetricsInternalW@16 -_NtGdiGetOutlineTextMetricsInternalW@16: - movl $0x10bc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiGetPath@16 -_NtGdiGetPath@16: - movl $0x10bd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiGetPixel@12 -_NtGdiGetPixel@12: - movl $0x10be, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetRandomRgn@12 -_NtGdiGetRandomRgn@12: - movl $0x10bf, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetRasterizerCaps@8 -_NtGdiGetRasterizerCaps@8: - movl $0x10c0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetRealizationInfo@12 -_NtGdiGetRealizationInfo@12: - movl $0x10c1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetRegionData@12 -_NtGdiGetRegionData@12: - movl $0x10c2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetRgnBox@8 -_NtGdiGetRgnBox@8: - movl $0x10c3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetServerMetaFileBits@28 -_NtGdiGetServerMetaFileBits@28: - movl $0x10c4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiGetSpoolMessage@16 -_NtGdiGetSpoolMessage@16: - movl $0x10c5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiGetStats@20 -_NtGdiGetStats@20: - movl $0x10c6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiGetStockObject@4 -_NtGdiGetStockObject@4: - movl $0x10c7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiGetStringBitmapW@20 -_NtGdiGetStringBitmapW@20: - movl $0x10c8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiGetSystemPaletteUse@4 -_NtGdiGetSystemPaletteUse@4: - movl $0x10c9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiGetTextCharsetInfo@12 -_NtGdiGetTextCharsetInfo@12: - movl $0x10ca, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetTextExtent@20 -_NtGdiGetTextExtent@20: - movl $0x10cb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiGetTextExtentExW@32 -_NtGdiGetTextExtentExW@32: - movl $0x10cc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiGetTextFaceW@16 -_NtGdiGetTextFaceW@16: - movl $0x10cd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiGetTextMetricsW@12 -_NtGdiGetTextMetricsW@12: - movl $0x10ce, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetTransform@12 -_NtGdiGetTransform@12: - movl $0x10cf, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetUFI@24 -_NtGdiGetUFI@24: - movl $0x10d0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiGetEmbUFI@28 -_NtGdiGetEmbUFI@28: - movl $0x10d1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiGetUFIPathname@40 -_NtGdiGetUFIPathname@40: - movl $0x10d2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x28 - -.global _NtGdiGetEmbedFonts@0 -_NtGdiGetEmbedFonts@0: - movl $0x10d3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtGdiChangeGhostFont@8 -_NtGdiChangeGhostFont@8: - movl $0x10d4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiAddEmbFontToDC@8 -_NtGdiAddEmbFontToDC@8: - movl $0x10d5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetFontUnicodeRanges@8 -_NtGdiGetFontUnicodeRanges@8: - movl $0x10d6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetWidthTable@28 -_NtGdiGetWidthTable@28: - movl $0x10d7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiGradientFill@24 -_NtGdiGradientFill@24: - movl $0x10d8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiHfontCreate@20 -_NtGdiHfontCreate@20: - movl $0x10d9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiIcmBrushInfo@32 -_NtGdiIcmBrushInfo@32: - movl $0x10da, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiInit@0 -_NtGdiInit@0: - movl $0x10db, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtGdiInitSpool@0 -_NtGdiInitSpool@0: - movl $0x10dc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtGdiIntersectClipRect@20 -_NtGdiIntersectClipRect@20: - movl $0x10dd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiInvertRgn@8 -_NtGdiInvertRgn@8: - movl $0x10de, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiLineTo@12 -_NtGdiLineTo@12: - movl $0x10df, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiMakeFontDir@20 -_NtGdiMakeFontDir@20: - movl $0x10e0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiMakeInfoDC@8 -_NtGdiMakeInfoDC@8: - movl $0x10e1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiMaskBlt@52 -_NtGdiMaskBlt@52: - movl $0x10e2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x34 - -.global _NtGdiModifyWorldTransform@12 -_NtGdiModifyWorldTransform@12: - movl $0x10e3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiMonoBitmap@4 -_NtGdiMonoBitmap@4: - movl $0x10e4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiMoveTo@16 -_NtGdiMoveTo@16: - movl $0x10e5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiOffsetClipRgn@12 -_NtGdiOffsetClipRgn@12: - movl $0x10e6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiOffsetRgn@12 -_NtGdiOffsetRgn@12: - movl $0x10e7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiOpenDCW@28 -_NtGdiOpenDCW@28: - movl $0x10e8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiPatBlt@24 -_NtGdiPatBlt@24: - movl $0x10e9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiPolyPatBlt@20 -_NtGdiPolyPatBlt@20: - movl $0x10ea, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiPathToRegion@4 -_NtGdiPathToRegion@4: - movl $0x10eb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiPlgBlt@44 -_NtGdiPlgBlt@44: - movl $0x10ec, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiPolyDraw@16 -_NtGdiPolyDraw@16: - movl $0x10ed, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiPolyPolyDraw@20 -_NtGdiPolyPolyDraw@20: - movl $0x10ee, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiPolyTextOutW@16 -_NtGdiPolyTextOutW@16: - movl $0x10ef, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiPtInRegion@12 -_NtGdiPtInRegion@12: - movl $0x10f0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiPtVisible@12 -_NtGdiPtVisible@12: - movl $0x10f1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiQueryFonts@12 -_NtGdiQueryFonts@12: - movl $0x10f2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiQueryFontAssocInfo@4 -_NtGdiQueryFontAssocInfo@4: - movl $0x10f3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiRectangle@20 -_NtGdiRectangle@20: - movl $0x10f4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiRectInRegion@8 -_NtGdiRectInRegion@8: - movl $0x10f5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiRectVisible@8 -_NtGdiRectVisible@8: - movl $0x10f6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiRemoveFontResourceW@24 -_NtGdiRemoveFontResourceW@24: - movl $0x10f7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiRemoveFontMemResourceEx@4 -_NtGdiRemoveFontMemResourceEx@4: - movl $0x10f8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiResetDC@20 -_NtGdiResetDC@20: - movl $0x10f9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiResizePalette@8 -_NtGdiResizePalette@8: - movl $0x10fa, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiRestoreDC@8 -_NtGdiRestoreDC@8: - movl $0x10fb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiRoundRect@28 -_NtGdiRoundRect@28: - movl $0x10fc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiSaveDC@4 -_NtGdiSaveDC@4: - movl $0x10fd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiScaleViewportExtEx@24 -_NtGdiScaleViewportExtEx@24: - movl $0x10fe, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiScaleWindowExtEx@24 -_NtGdiScaleWindowExtEx@24: - movl $0x10ff, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiSelectBitmap@8 -_NtGdiSelectBitmap@8: - movl $0x1100, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSelectBrush@8 -_NtGdiSelectBrush@8: - movl $0x1101, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSelectClipPath@8 -_NtGdiSelectClipPath@8: - movl $0x1102, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSelectFont@8 -_NtGdiSelectFont@8: - movl $0x1103, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSelectPen@8 -_NtGdiSelectPen@8: - movl $0x1104, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSetBitmapAttributes@8 -_NtGdiSetBitmapAttributes@8: - movl $0x1105, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSetBitmapBits@12 -_NtGdiSetBitmapBits@12: - movl $0x1106, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetBitmapDimension@16 -_NtGdiSetBitmapDimension@16: - movl $0x1107, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiSetBoundsRect@12 -_NtGdiSetBoundsRect@12: - movl $0x1108, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetBrushAttributes@8 -_NtGdiSetBrushAttributes@8: - movl $0x1109, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSetBrushOrg@16 -_NtGdiSetBrushOrg@16: - movl $0x110a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiSetColorAdjustment@8 -_NtGdiSetColorAdjustment@8: - movl $0x110b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSetColorSpace@8 -_NtGdiSetColorSpace@8: - movl $0x110c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSetDeviceGammaRamp@8 -_NtGdiSetDeviceGammaRamp@8: - movl $0x110d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSetDIBitsToDeviceInternal@64 -_NtGdiSetDIBitsToDeviceInternal@64: - movl $0x110e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x40 - -.global _NtGdiSetFontEnumeration@4 -_NtGdiSetFontEnumeration@4: - movl $0x110f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiSetFontXform@12 -_NtGdiSetFontXform@12: - movl $0x1110, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetIcmMode@12 -_NtGdiSetIcmMode@12: - movl $0x1111, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetLinkedUFIs@12 -_NtGdiSetLinkedUFIs@12: - movl $0x1112, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetMagicColors@12 -_NtGdiSetMagicColors@12: - movl $0x1113, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetMetaRgn@4 -_NtGdiSetMetaRgn@4: - movl $0x1114, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiSetMiterLimit@12 -_NtGdiSetMiterLimit@12: - movl $0x1115, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetDeviceWidth@4 -_NtGdiGetDeviceWidth@4: - movl $0x1116, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiMirrorWindowOrg@4 -_NtGdiMirrorWindowOrg@4: - movl $0x1117, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiSetLayout@12 -_NtGdiSetLayout@12: - movl $0x1118, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetPixel@16 -_NtGdiSetPixel@16: - movl $0x1119, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiSetPixelFormat@8 -_NtGdiSetPixelFormat@8: - movl $0x111a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSetRectRgn@20 -_NtGdiSetRectRgn@20: - movl $0x111b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiSetSystemPaletteUse@8 -_NtGdiSetSystemPaletteUse@8: - movl $0x111c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSetTextJustification@12 -_NtGdiSetTextJustification@12: - movl $0x111d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetupPublicCFONT@12 -_NtGdiSetupPublicCFONT@12: - movl $0x111e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetVirtualResolution@20 -_NtGdiSetVirtualResolution@20: - movl $0x111f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiSetSizeDevice@12 -_NtGdiSetSizeDevice@12: - movl $0x1120, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiStartDoc@16 -_NtGdiStartDoc@16: - movl $0x1121, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiStartPage@4 -_NtGdiStartPage@4: - movl $0x1122, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiStretchBlt@48 -_NtGdiStretchBlt@48: - movl $0x1123, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x30 - -.global _NtGdiStretchDIBitsInternal@64 -_NtGdiStretchDIBitsInternal@64: - movl $0x1124, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x40 - -.global _NtGdiStrokeAndFillPath@4 -_NtGdiStrokeAndFillPath@4: - movl $0x1125, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiStrokePath@4 -_NtGdiStrokePath@4: - movl $0x1126, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiSwapBuffers@4 -_NtGdiSwapBuffers@4: - movl $0x1127, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiTransformPoints@20 -_NtGdiTransformPoints@20: - movl $0x1128, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiTransparentBlt@44 -_NtGdiTransparentBlt@44: - movl $0x1129, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiUnloadPrinterDriver@8 -_NtGdiUnloadPrinterDriver@8: - movl $0x112a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiUnmapMemFont@4 -_NtGdiUnmapMemFont@4: - movl $0x112b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiUnrealizeObject@4 -_NtGdiUnrealizeObject@4: - movl $0x112c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiUpdateColors@4 -_NtGdiUpdateColors@4: - movl $0x112d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiWidenPath@4 -_NtGdiWidenPath@4: - movl $0x112e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserActivateKeyboardLayout@8 -_NtUserActivateKeyboardLayout@8: - movl $0x112f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserAlterWindowStyle@12 -_NtUserAlterWindowStyle@12: - movl $0x1130, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserAssociateInputContext@12 -_NtUserAssociateInputContext@12: - movl $0x1131, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserAttachThreadInput@12 -_NtUserAttachThreadInput@12: - movl $0x1132, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserBeginPaint@8 -_NtUserBeginPaint@8: - movl $0x1133, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserBitBltSysBmp@32 -_NtUserBitBltSysBmp@32: - movl $0x1134, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtUserBlockInput@4 -_NtUserBlockInput@4: - movl $0x1135, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserBuildHimcList@16 -_NtUserBuildHimcList@16: - movl $0x1136, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserBuildHwndList@28 -_NtUserBuildHwndList@28: - movl $0x1137, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserBuildNameList@16 -_NtUserBuildNameList@16: - movl $0x1138, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserBuildPropList@16 -_NtUserBuildPropList@16: - movl $0x1139, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserCallHwnd@8 -_NtUserCallHwnd@8: - movl $0x113a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserCallHwndLock@8 -_NtUserCallHwndLock@8: - movl $0x113b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserCallHwndOpt@8 -_NtUserCallHwndOpt@8: - movl $0x113c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserCallHwndParam@12 -_NtUserCallHwndParam@12: - movl $0x113d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserCallHwndParamLock@12 -_NtUserCallHwndParamLock@12: - movl $0x113e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserCallMsgFilter@8 -_NtUserCallMsgFilter@8: - movl $0x113f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserCallNextHookEx@16 -_NtUserCallNextHookEx@16: - movl $0x1140, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserCallNoParam@4 -_NtUserCallNoParam@4: - movl $0x1141, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserCallOneParam@8 -_NtUserCallOneParam@8: - movl $0x1142, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserCallTwoParam@12 -_NtUserCallTwoParam@12: - movl $0x1143, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserChangeClipboardChain@8 -_NtUserChangeClipboardChain@8: - movl $0x1144, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserChangeDisplaySettings@16 -_NtUserChangeDisplaySettings@16: - movl $0x1145, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserCheckImeHotKey@8 -_NtUserCheckImeHotKey@8: - movl $0x1146, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserCheckMenuItem@12 -_NtUserCheckMenuItem@12: - movl $0x1147, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserChildWindowFromPointEx@16 -_NtUserChildWindowFromPointEx@16: - movl $0x1148, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserClipCursor@4 -_NtUserClipCursor@4: - movl $0x1149, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserCloseClipboard@0 -_NtUserCloseClipboard@0: - movl $0x114a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserCloseDesktop@4 -_NtUserCloseDesktop@4: - movl $0x114b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserCloseWindowStation@4 -_NtUserCloseWindowStation@4: - movl $0x114c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserConsoleControl@12 -_NtUserConsoleControl@12: - movl $0x114d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserConvertMemHandle@8 -_NtUserConvertMemHandle@8: - movl $0x114e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserCopyAcceleratorTable@12 -_NtUserCopyAcceleratorTable@12: - movl $0x114f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserCountClipboardFormats@0 -_NtUserCountClipboardFormats@0: - movl $0x1150, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserCreateAcceleratorTable@8 -_NtUserCreateAcceleratorTable@8: - movl $0x1151, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserCreateCaret@16 -_NtUserCreateCaret@16: - movl $0x1152, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserCreateDesktop@20 -_NtUserCreateDesktop@20: - movl $0x1153, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserCreateInputContext@4 -_NtUserCreateInputContext@4: - movl $0x1154, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserCreateLocalMemHandle@16 -_NtUserCreateLocalMemHandle@16: - movl $0x1155, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserCreateWindowEx@60 -_NtUserCreateWindowEx@60: - movl $0x1156, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x3c - -.global _NtUserCreateWindowStation@28 -_NtUserCreateWindowStation@28: - movl $0x1157, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserDdeGetQualityOfService@12 -_NtUserDdeGetQualityOfService@12: - movl $0x1158, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserDdeInitialize@20 -_NtUserDdeInitialize@20: - movl $0x1159, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserDdeSetQualityOfService@12 -_NtUserDdeSetQualityOfService@12: - movl $0x115a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserDeferWindowPos@32 -_NtUserDeferWindowPos@32: - movl $0x115b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtUserDefSetText@8 -_NtUserDefSetText@8: - movl $0x115c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserDeleteMenu@12 -_NtUserDeleteMenu@12: - movl $0x115d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserDestroyAcceleratorTable@4 -_NtUserDestroyAcceleratorTable@4: - movl $0x115e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserDestroyCursor@8 -_NtUserDestroyCursor@8: - movl $0x115f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserDestroyInputContext@4 -_NtUserDestroyInputContext@4: - movl $0x1160, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserDestroyMenu@4 -_NtUserDestroyMenu@4: - movl $0x1161, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserDestroyWindow@4 -_NtUserDestroyWindow@4: - movl $0x1162, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserDisableThreadIme@4 -_NtUserDisableThreadIme@4: - movl $0x1163, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserDispatchMessage@4 -_NtUserDispatchMessage@4: - movl $0x1164, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserDragDetect@12 -_NtUserDragDetect@12: - movl $0x1165, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserDragObject@20 -_NtUserDragObject@20: - movl $0x1166, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserDrawAnimatedRects@16 -_NtUserDrawAnimatedRects@16: - movl $0x1167, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserDrawCaption@16 -_NtUserDrawCaption@16: - movl $0x1168, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserDrawCaptionTemp@28 -_NtUserDrawCaptionTemp@28: - movl $0x1169, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserDrawIconEx@44 -_NtUserDrawIconEx@44: - movl $0x116a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtUserDrawMenuBarTemp@20 -_NtUserDrawMenuBarTemp@20: - movl $0x116b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserEmptyClipboard@0 -_NtUserEmptyClipboard@0: - movl $0x116c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserEnableMenuItem@12 -_NtUserEnableMenuItem@12: - movl $0x116d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserEnableScrollBar@12 -_NtUserEnableScrollBar@12: - movl $0x116e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserEndDeferWindowPosEx@8 -_NtUserEndDeferWindowPosEx@8: - movl $0x116f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserEndMenu@0 -_NtUserEndMenu@0: - movl $0x1170, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserEndPaint@8 -_NtUserEndPaint@8: - movl $0x1171, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserEnumDisplayDevices@16 -_NtUserEnumDisplayDevices@16: - movl $0x1172, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserEnumDisplayMonitors@16 -_NtUserEnumDisplayMonitors@16: - movl $0x1173, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserEnumDisplaySettings@16 -_NtUserEnumDisplaySettings@16: - movl $0x1174, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserEvent@4 -_NtUserEvent@4: - movl $0x1175, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserExcludeUpdateRgn@8 -_NtUserExcludeUpdateRgn@8: - movl $0x1176, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserFillWindow@16 -_NtUserFillWindow@16: - movl $0x1177, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserFindExistingCursorIcon@12 -_NtUserFindExistingCursorIcon@12: - movl $0x1178, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserFindWindowEx@20 -_NtUserFindWindowEx@20: - movl $0x1179, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserFlashWindowEx@4 -_NtUserFlashWindowEx@4: - movl $0x117a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetAltTabInfo@24 -_NtUserGetAltTabInfo@24: - movl $0x117b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserGetAncestor@8 -_NtUserGetAncestor@8: - movl $0x117c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetAppImeLevel@4 -_NtUserGetAppImeLevel@4: - movl $0x117d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetAsyncKeyState@4 -_NtUserGetAsyncKeyState@4: - movl $0x117e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetAtomName@8 -_NtUserGetAtomName@8: - movl $0x117f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetCaretBlinkTime@0 -_NtUserGetCaretBlinkTime@0: - movl $0x1180, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserGetCaretPos@4 -_NtUserGetCaretPos@4: - movl $0x1181, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetClassInfoEx@20 -_NtUserGetClassInfoEx@20: - movl $0x1182, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserGetClassName@12 -_NtUserGetClassName@12: - movl $0x1183, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetClipboardData@8 -_NtUserGetClipboardData@8: - movl $0x1184, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetClipboardFormatName@12 -_NtUserGetClipboardFormatName@12: - movl $0x1185, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetClipboardOwner@0 -_NtUserGetClipboardOwner@0: - movl $0x1186, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserGetClipboardSequenceNumber@0 -_NtUserGetClipboardSequenceNumber@0: - movl $0x1187, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserGetClipboardViewer@0 -_NtUserGetClipboardViewer@0: - movl $0x1188, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserGetClipCursor@4 -_NtUserGetClipCursor@4: - movl $0x1189, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetComboBoxInfo@8 -_NtUserGetComboBoxInfo@8: - movl $0x118a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetControlBrush@12 -_NtUserGetControlBrush@12: - movl $0x118b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetControlColor@16 -_NtUserGetControlColor@16: - movl $0x118c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserGetCPD@12 -_NtUserGetCPD@12: - movl $0x118d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetCursorFrameInfo@16 -_NtUserGetCursorFrameInfo@16: - movl $0x118e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserGetCursorInfo@4 -_NtUserGetCursorInfo@4: - movl $0x118f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetDC@4 -_NtUserGetDC@4: - movl $0x1190, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetDCEx@12 -_NtUserGetDCEx@12: - movl $0x1191, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetDoubleClickTime@0 -_NtUserGetDoubleClickTime@0: - movl $0x1192, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserGetForegroundWindow@0 -_NtUserGetForegroundWindow@0: - movl $0x1193, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserGetGuiResources@8 -_NtUserGetGuiResources@8: - movl $0x1194, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetGUIThreadInfo@8 -_NtUserGetGUIThreadInfo@8: - movl $0x1195, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetIconInfo@24 -_NtUserGetIconInfo@24: - movl $0x1196, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserGetIconSize@16 -_NtUserGetIconSize@16: - movl $0x1197, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserGetImeHotKey@16 -_NtUserGetImeHotKey@16: - movl $0x1198, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserGetImeInfoEx@8 -_NtUserGetImeInfoEx@8: - movl $0x1199, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetInternalWindowPos@12 -_NtUserGetInternalWindowPos@12: - movl $0x119a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetKeyboardLayoutList@8 -_NtUserGetKeyboardLayoutList@8: - movl $0x119b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetKeyboardLayoutName@4 -_NtUserGetKeyboardLayoutName@4: - movl $0x119c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetKeyboardState@4 -_NtUserGetKeyboardState@4: - movl $0x119d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetKeyNameText@12 -_NtUserGetKeyNameText@12: - movl $0x119e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetKeyState@4 -_NtUserGetKeyState@4: - movl $0x119f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetListBoxInfo@4 -_NtUserGetListBoxInfo@4: - movl $0x11a0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetMenuBarInfo@16 -_NtUserGetMenuBarInfo@16: - movl $0x11a1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserGetMenuIndex@8 -_NtUserGetMenuIndex@8: - movl $0x11a2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetMenuItemRect@16 -_NtUserGetMenuItemRect@16: - movl $0x11a3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserGetMessage@16 -_NtUserGetMessage@16: - movl $0x11a4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserGetMouseMovePointsEx@20 -_NtUserGetMouseMovePointsEx@20: - movl $0x11a5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserGetObjectInformation@20 -_NtUserGetObjectInformation@20: - movl $0x11a6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserGetOpenClipboardWindow@0 -_NtUserGetOpenClipboardWindow@0: - movl $0x11a7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserGetPriorityClipboardFormat@8 -_NtUserGetPriorityClipboardFormat@8: - movl $0x11a8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetProcessWindowStation@0 -_NtUserGetProcessWindowStation@0: - movl $0x11a9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserGetRawInputBuffer@12 -_NtUserGetRawInputBuffer@12: - movl $0x11aa, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetRawInputData@20 -_NtUserGetRawInputData@20: - movl $0x11ab, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserGetRawInputDeviceInfo@16 -_NtUserGetRawInputDeviceInfo@16: - movl $0x11ac, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserGetRawInputDeviceList@12 -_NtUserGetRawInputDeviceList@12: - movl $0x11ad, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetRegisteredRawInputDevices@12 -_NtUserGetRegisteredRawInputDevices@12: - movl $0x11ae, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetScrollBarInfo@12 -_NtUserGetScrollBarInfo@12: - movl $0x11af, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetSystemMenu@8 -_NtUserGetSystemMenu@8: - movl $0x11b0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetThreadDesktop@8 -_NtUserGetThreadDesktop@8: - movl $0x11b1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetThreadState@4 -_NtUserGetThreadState@4: - movl $0x11b2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetTitleBarInfo@8 -_NtUserGetTitleBarInfo@8: - movl $0x11b3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetUpdateRect@12 -_NtUserGetUpdateRect@12: - movl $0x11b4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetUpdateRgn@12 -_NtUserGetUpdateRgn@12: - movl $0x11b5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetWindowDC@4 -_NtUserGetWindowDC@4: - movl $0x11b6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetWindowPlacement@8 -_NtUserGetWindowPlacement@8: - movl $0x11b7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetWOWClass@8 -_NtUserGetWOWClass@8: - movl $0x11b8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserHardErrorControl@12 -_NtUserHardErrorControl@12: - movl $0x11b9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserHideCaret@4 -_NtUserHideCaret@4: - movl $0x11ba, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserHiliteMenuItem@16 -_NtUserHiliteMenuItem@16: - movl $0x11bb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserImpersonateDdeClientWindow@8 -_NtUserImpersonateDdeClientWindow@8: - movl $0x11bc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserInitialize@12 -_NtUserInitialize@12: - movl $0x11bd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserInitializeClientPfnArrays@16 -_NtUserInitializeClientPfnArrays@16: - movl $0x11be, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserInitTask@48 -_NtUserInitTask@48: - movl $0x11bf, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x30 - -.global _NtUserInternalGetWindowText@12 -_NtUserInternalGetWindowText@12: - movl $0x11c0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserInvalidateRect@12 -_NtUserInvalidateRect@12: - movl $0x11c1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserInvalidateRgn@12 -_NtUserInvalidateRgn@12: - movl $0x11c2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserIsClipboardFormatAvailable@4 -_NtUserIsClipboardFormatAvailable@4: - movl $0x11c3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserKillTimer@8 -_NtUserKillTimer@8: - movl $0x11c4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserLoadKeyboardLayoutEx@28 -_NtUserLoadKeyboardLayoutEx@28: - movl $0x11c5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserLockWindowStation@4 -_NtUserLockWindowStation@4: - movl $0x11c6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserLockWindowUpdate@4 -_NtUserLockWindowUpdate@4: - movl $0x11c7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserLockWorkStation@0 -_NtUserLockWorkStation@0: - movl $0x11c8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserMapVirtualKeyEx@16 -_NtUserMapVirtualKeyEx@16: - movl $0x11c9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserMenuItemFromPoint@16 -_NtUserMenuItemFromPoint@16: - movl $0x11ca, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserMessageCall@28 -_NtUserMessageCall@28: - movl $0x11cb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserMinMaximize@12 -_NtUserMinMaximize@12: - movl $0x11cc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserMNDragLeave@0 -_NtUserMNDragLeave@0: - movl $0x11cd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserMNDragOver@8 -_NtUserMNDragOver@8: - movl $0x11ce, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserModifyUserStartupInfoFlags@8 -_NtUserModifyUserStartupInfoFlags@8: - movl $0x11cf, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserMoveWindow@24 -_NtUserMoveWindow@24: - movl $0x11d0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserNotifyIMEStatus@12 -_NtUserNotifyIMEStatus@12: - movl $0x11d1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserNotifyProcessCreate@16 -_NtUserNotifyProcessCreate@16: - movl $0x11d2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserNotifyWinEvent@16 -_NtUserNotifyWinEvent@16: - movl $0x11d3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserOpenClipboard@8 -_NtUserOpenClipboard@8: - movl $0x11d4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserOpenDesktop@12 -_NtUserOpenDesktop@12: - movl $0x11d5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserOpenInputDesktop@12 -_NtUserOpenInputDesktop@12: - movl $0x11d6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserOpenWindowStation@8 -_NtUserOpenWindowStation@8: - movl $0x11d7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserPaintDesktop@4 -_NtUserPaintDesktop@4: - movl $0x11d8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserPeekMessage@20 -_NtUserPeekMessage@20: - movl $0x11d9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserPostMessage@16 -_NtUserPostMessage@16: - movl $0x11da, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserPostThreadMessage@16 -_NtUserPostThreadMessage@16: - movl $0x11db, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserPrintWindow@12 -_NtUserPrintWindow@12: - movl $0x11dc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserProcessConnect@12 -_NtUserProcessConnect@12: - movl $0x11dd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserQueryInformationThread@16 -_NtUserQueryInformationThread@16: - movl $0x11de, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserQueryInputContext@8 -_NtUserQueryInputContext@8: - movl $0x11df, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserQuerySendMessage@4 -_NtUserQuerySendMessage@4: - movl $0x11e0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserQueryWindow@8 -_NtUserQueryWindow@8: - movl $0x11e1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserRealChildWindowFromPoint@12 -_NtUserRealChildWindowFromPoint@12: - movl $0x11e2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserRealInternalGetMessage@24 -_NtUserRealInternalGetMessage@24: - movl $0x11e3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserRealWaitMessageEx@8 -_NtUserRealWaitMessageEx@8: - movl $0x11e4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserRedrawWindow@16 -_NtUserRedrawWindow@16: - movl $0x11e5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserRegisterClassExWOW@28 -_NtUserRegisterClassExWOW@28: - movl $0x11e6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserRegisterUserApiHook@16 -_NtUserRegisterUserApiHook@16: - movl $0x11e7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserRegisterHotKey@16 -_NtUserRegisterHotKey@16: - movl $0x11e8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserRegisterRawInputDevices@12 -_NtUserRegisterRawInputDevices@12: - movl $0x11e9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserRegisterTasklist@4 -_NtUserRegisterTasklist@4: - movl $0x11ea, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserRegisterWindowMessage@4 -_NtUserRegisterWindowMessage@4: - movl $0x11eb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserRemoveMenu@12 -_NtUserRemoveMenu@12: - movl $0x11ec, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserRemoveProp@8 -_NtUserRemoveProp@8: - movl $0x11ed, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserResolveDesktop@16 -_NtUserResolveDesktop@16: - movl $0x11ee, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserResolveDesktopForWOW@4 -_NtUserResolveDesktopForWOW@4: - movl $0x11ef, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSBGetParms@16 -_NtUserSBGetParms@16: - movl $0x11f0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserScrollDC@28 -_NtUserScrollDC@28: - movl $0x11f1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserScrollWindowEx@32 -_NtUserScrollWindowEx@32: - movl $0x11f2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtUserSelectPalette@12 -_NtUserSelectPalette@12: - movl $0x11f3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSendInput@12 -_NtUserSendInput@12: - movl $0x11f4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetActiveWindow@4 -_NtUserSetActiveWindow@4: - movl $0x11f5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetAppImeLevel@8 -_NtUserSetAppImeLevel@8: - movl $0x11f6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetCapture@4 -_NtUserSetCapture@4: - movl $0x11f7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetClassLong@16 -_NtUserSetClassLong@16: - movl $0x11f8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetClassWord@12 -_NtUserSetClassWord@12: - movl $0x11f9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetClipboardData@12 -_NtUserSetClipboardData@12: - movl $0x11fa, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetClipboardViewer@4 -_NtUserSetClipboardViewer@4: - movl $0x11fb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetConsoleReserveKeys@8 -_NtUserSetConsoleReserveKeys@8: - movl $0x11fc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetCursor@4 -_NtUserSetCursor@4: - movl $0x11fd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetCursorContents@8 -_NtUserSetCursorContents@8: - movl $0x11fe, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetCursorIconData@16 -_NtUserSetCursorIconData@16: - movl $0x11ff, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetFocus@4 -_NtUserSetFocus@4: - movl $0x1200, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetImeHotKey@20 -_NtUserSetImeHotKey@20: - movl $0x1201, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserSetImeInfoEx@4 -_NtUserSetImeInfoEx@4: - movl $0x1202, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetImeOwnerWindow@8 -_NtUserSetImeOwnerWindow@8: - movl $0x1203, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetInformationProcess@16 -_NtUserSetInformationProcess@16: - movl $0x1204, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetInformationThread@16 -_NtUserSetInformationThread@16: - movl $0x1205, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetInternalWindowPos@16 -_NtUserSetInternalWindowPos@16: - movl $0x1206, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetKeyboardState@4 -_NtUserSetKeyboardState@4: - movl $0x1207, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetLogonNotifyWindow@4 -_NtUserSetLogonNotifyWindow@4: - movl $0x1208, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetMenu@12 -_NtUserSetMenu@12: - movl $0x1209, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetMenuContextHelpId@8 -_NtUserSetMenuContextHelpId@8: - movl $0x120a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetMenuDefaultItem@12 -_NtUserSetMenuDefaultItem@12: - movl $0x120b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetMenuFlagRtoL@4 -_NtUserSetMenuFlagRtoL@4: - movl $0x120c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetObjectInformation@16 -_NtUserSetObjectInformation@16: - movl $0x120d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetParent@8 -_NtUserSetParent@8: - movl $0x120e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetProcessWindowStation@4 -_NtUserSetProcessWindowStation@4: - movl $0x120f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetProp@12 -_NtUserSetProp@12: - movl $0x1210, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetScrollInfo@16 -_NtUserSetScrollInfo@16: - movl $0x1211, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetShellWindowEx@8 -_NtUserSetShellWindowEx@8: - movl $0x1212, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetSysColors@16 -_NtUserSetSysColors@16: - movl $0x1213, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetSystemCursor@8 -_NtUserSetSystemCursor@8: - movl $0x1214, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetSystemMenu@8 -_NtUserSetSystemMenu@8: - movl $0x1215, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetSystemTimer@16 -_NtUserSetSystemTimer@16: - movl $0x1216, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetThreadDesktop@4 -_NtUserSetThreadDesktop@4: - movl $0x1217, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetThreadLayoutHandles@8 -_NtUserSetThreadLayoutHandles@8: - movl $0x1218, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetThreadState@8 -_NtUserSetThreadState@8: - movl $0x1219, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetTimer@16 -_NtUserSetTimer@16: - movl $0x121a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetWindowFNID@8 -_NtUserSetWindowFNID@8: - movl $0x121b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetWindowLong@16 -_NtUserSetWindowLong@16: - movl $0x121c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetWindowPlacement@8 -_NtUserSetWindowPlacement@8: - movl $0x121d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetWindowPos@28 -_NtUserSetWindowPos@28: - movl $0x121e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserSetWindowRgn@12 -_NtUserSetWindowRgn@12: - movl $0x121f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetWindowsHookAW@12 -_NtUserSetWindowsHookAW@12: - movl $0x1220, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetWindowsHookEx@24 -_NtUserSetWindowsHookEx@24: - movl $0x1221, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserSetWindowStationUser@16 -_NtUserSetWindowStationUser@16: - movl $0x1222, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetWindowWord@12 -_NtUserSetWindowWord@12: - movl $0x1223, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetWinEventHook@32 -_NtUserSetWinEventHook@32: - movl $0x1224, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtUserShowCaret@4 -_NtUserShowCaret@4: - movl $0x1225, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserShowScrollBar@12 -_NtUserShowScrollBar@12: - movl $0x1226, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserShowWindow@8 -_NtUserShowWindow@8: - movl $0x1227, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserShowWindowAsync@8 -_NtUserShowWindowAsync@8: - movl $0x1228, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSoundSentry@0 -_NtUserSoundSentry@0: - movl $0x1229, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserSwitchDesktop@4 -_NtUserSwitchDesktop@4: - movl $0x122a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSystemParametersInfo@16 -_NtUserSystemParametersInfo@16: - movl $0x122b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserTestForInteractiveUser@4 -_NtUserTestForInteractiveUser@4: - movl $0x122c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserThunkedMenuInfo@8 -_NtUserThunkedMenuInfo@8: - movl $0x122d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserThunkedMenuItemInfo@24 -_NtUserThunkedMenuItemInfo@24: - movl $0x122e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserToUnicodeEx@28 -_NtUserToUnicodeEx@28: - movl $0x122f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserTrackMouseEvent@4 -_NtUserTrackMouseEvent@4: - movl $0x1230, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserTrackPopupMenuEx@24 -_NtUserTrackPopupMenuEx@24: - movl $0x1231, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserCalcMenuBar@20 -_NtUserCalcMenuBar@20: - movl $0x1232, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserPaintMenuBar@24 -_NtUserPaintMenuBar@24: - movl $0x1233, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserTranslateAccelerator@12 -_NtUserTranslateAccelerator@12: - movl $0x1234, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserTranslateMessage@8 -_NtUserTranslateMessage@8: - movl $0x1235, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserUnhookWindowsHookEx@4 -_NtUserUnhookWindowsHookEx@4: - movl $0x1236, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserUnhookWinEvent@4 -_NtUserUnhookWinEvent@4: - movl $0x1237, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserUnloadKeyboardLayout@4 -_NtUserUnloadKeyboardLayout@4: - movl $0x1238, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserUnlockWindowStation@4 -_NtUserUnlockWindowStation@4: - movl $0x1239, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserUnregisterClass@12 -_NtUserUnregisterClass@12: - movl $0x123a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserUnregisterUserApiHook@0 -_NtUserUnregisterUserApiHook@0: - movl $0x123b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserUnregisterHotKey@8 -_NtUserUnregisterHotKey@8: - movl $0x123c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserUpdateInputContext@12 -_NtUserUpdateInputContext@12: - movl $0x123d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserUpdateInstance@12 -_NtUserUpdateInstance@12: - movl $0x123e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserUpdateLayeredWindow@40 -_NtUserUpdateLayeredWindow@40: - movl $0x123f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x28 - -.global _NtUserGetLayeredWindowAttributes@16 -_NtUserGetLayeredWindowAttributes@16: - movl $0x1240, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetLayeredWindowAttributes@16 -_NtUserSetLayeredWindowAttributes@16: - movl $0x1241, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserUpdatePerUserSystemParameters@8 -_NtUserUpdatePerUserSystemParameters@8: - movl $0x1242, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserUserHandleGrantAccess@12 -_NtUserUserHandleGrantAccess@12: - movl $0x1243, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserValidateHandleSecure@4 -_NtUserValidateHandleSecure@4: - movl $0x1244, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserValidateRect@8 -_NtUserValidateRect@8: - movl $0x1245, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserValidateTimerCallback@4 -_NtUserValidateTimerCallback@4: - movl $0x1246, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserVkKeyScanEx@12 -_NtUserVkKeyScanEx@12: - movl $0x1247, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserWaitForInputIdle@12 -_NtUserWaitForInputIdle@12: - movl $0x1248, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserWaitForMsgAndEvent@4 -_NtUserWaitForMsgAndEvent@4: - movl $0x1249, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserWaitMessage@0 -_NtUserWaitMessage@0: - movl $0x124a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserWin32PoolAllocationStats@24 -_NtUserWin32PoolAllocationStats@24: - movl $0x124b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserWindowFromPoint@8 -_NtUserWindowFromPoint@8: - movl $0x124c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserYieldTask@0 -_NtUserYieldTask@0: - movl $0x124d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserRemoteConnect@12 -_NtUserRemoteConnect@12: - movl $0x124e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserRemoteRedrawRectangle@16 -_NtUserRemoteRedrawRectangle@16: - movl $0x124f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserRemoteRedrawScreen@0 -_NtUserRemoteRedrawScreen@0: - movl $0x1250, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserRemoteStopScreenUpdates@0 -_NtUserRemoteStopScreenUpdates@0: - movl $0x1251, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserCtxDisplayIOCtl@12 -_NtUserCtxDisplayIOCtl@12: - movl $0x1252, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiEngAssociateSurface@12 -_NtGdiEngAssociateSurface@12: - movl $0x1253, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiEngCreateBitmap@24 -_NtGdiEngCreateBitmap@24: - movl $0x1254, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiEngCreateDeviceSurface@16 -_NtGdiEngCreateDeviceSurface@16: - movl $0x1255, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiEngCreateDeviceBitmap@16 -_NtGdiEngCreateDeviceBitmap@16: - movl $0x1256, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiEngCreatePalette@24 -_NtGdiEngCreatePalette@24: - movl $0x1257, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiEngComputeGlyphSet@12 -_NtGdiEngComputeGlyphSet@12: - movl $0x1258, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiEngCopyBits@24 -_NtGdiEngCopyBits@24: - movl $0x1259, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiEngDeletePalette@4 -_NtGdiEngDeletePalette@4: - movl $0x125a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEngDeleteSurface@4 -_NtGdiEngDeleteSurface@4: - movl $0x125b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEngEraseSurface@12 -_NtGdiEngEraseSurface@12: - movl $0x125c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiEngUnlockSurface@4 -_NtGdiEngUnlockSurface@4: - movl $0x125d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEngLockSurface@4 -_NtGdiEngLockSurface@4: - movl $0x125e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEngBitBlt@44 -_NtGdiEngBitBlt@44: - movl $0x125f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiEngStretchBlt@44 -_NtGdiEngStretchBlt@44: - movl $0x1260, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiEngPlgBlt@44 -_NtGdiEngPlgBlt@44: - movl $0x1261, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiEngMarkBandingSurface@4 -_NtGdiEngMarkBandingSurface@4: - movl $0x1262, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEngStrokePath@32 -_NtGdiEngStrokePath@32: - movl $0x1263, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiEngFillPath@28 -_NtGdiEngFillPath@28: - movl $0x1264, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiEngStrokeAndFillPath@40 -_NtGdiEngStrokeAndFillPath@40: - movl $0x1265, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x28 - -.global _NtGdiEngPaint@20 -_NtGdiEngPaint@20: - movl $0x1266, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiEngLineTo@36 -_NtGdiEngLineTo@36: - movl $0x1267, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x24 - -.global _NtGdiEngAlphaBlend@28 -_NtGdiEngAlphaBlend@28: - movl $0x1268, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiEngGradientFill@40 -_NtGdiEngGradientFill@40: - movl $0x1269, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x28 - -.global _NtGdiEngTransparentBlt@32 -_NtGdiEngTransparentBlt@32: - movl $0x126a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiEngTextOut@40 -_NtGdiEngTextOut@40: - movl $0x126b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x28 - -.global _NtGdiEngStretchBltROP@52 -_NtGdiEngStretchBltROP@52: - movl $0x126c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x34 - -.global _NtGdiXLATEOBJ_cGetPalette@16 -_NtGdiXLATEOBJ_cGetPalette@16: - movl $0x126d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiXLATEOBJ_iXlate@8 -_NtGdiXLATEOBJ_iXlate@8: - movl $0x126e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiXLATEOBJ_hGetColorTransform@4 -_NtGdiXLATEOBJ_hGetColorTransform@4: - movl $0x126f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiCLIPOBJ_bEnum@12 -_NtGdiCLIPOBJ_bEnum@12: - movl $0x1270, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiCLIPOBJ_cEnumStart@20 -_NtGdiCLIPOBJ_cEnumStart@20: - movl $0x1271, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiCLIPOBJ_ppoGetPath@4 -_NtGdiCLIPOBJ_ppoGetPath@4: - movl $0x1272, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEngDeletePath@4 -_NtGdiEngDeletePath@4: - movl $0x1273, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEngCreateClip@0 -_NtGdiEngCreateClip@0: - movl $0x1274, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtGdiEngDeleteClip@4 -_NtGdiEngDeleteClip@4: - movl $0x1275, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiBRUSHOBJ_ulGetBrushColor@4 -_NtGdiBRUSHOBJ_ulGetBrushColor@4: - movl $0x1276, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiBRUSHOBJ_pvAllocRbrush@8 -_NtGdiBRUSHOBJ_pvAllocRbrush@8: - movl $0x1277, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiBRUSHOBJ_pvGetRbrush@4 -_NtGdiBRUSHOBJ_pvGetRbrush@4: - movl $0x1278, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiBRUSHOBJ_hGetColorTransform@4 -_NtGdiBRUSHOBJ_hGetColorTransform@4: - movl $0x1279, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiXFORMOBJ_bApplyXform@20 -_NtGdiXFORMOBJ_bApplyXform@20: - movl $0x127a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiXFORMOBJ_iGetXform@8 -_NtGdiXFORMOBJ_iGetXform@8: - movl $0x127b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiFONTOBJ_vGetInfo@12 -_NtGdiFONTOBJ_vGetInfo@12: - movl $0x127c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiFONTOBJ_pxoGetXform@4 -_NtGdiFONTOBJ_pxoGetXform@4: - movl $0x127d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiFONTOBJ_cGetGlyphs@20 -_NtGdiFONTOBJ_cGetGlyphs@20: - movl $0x127e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiFONTOBJ_pifi@4 -_NtGdiFONTOBJ_pifi@4: - movl $0x127f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiFONTOBJ_pfdg@4 -_NtGdiFONTOBJ_pfdg@4: - movl $0x1280, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiFONTOBJ_pQueryGlyphAttrs@8 -_NtGdiFONTOBJ_pQueryGlyphAttrs@8: - movl $0x1281, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiFONTOBJ_pvTrueTypeFontFile@8 -_NtGdiFONTOBJ_pvTrueTypeFontFile@8: - movl $0x1282, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiFONTOBJ_cGetAllGlyphHandles@8 -_NtGdiFONTOBJ_cGetAllGlyphHandles@8: - movl $0x1283, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSTROBJ_bEnum@12 -_NtGdiSTROBJ_bEnum@12: - movl $0x1284, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSTROBJ_bEnumPositionsOnly@12 -_NtGdiSTROBJ_bEnumPositionsOnly@12: - movl $0x1285, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSTROBJ_bGetAdvanceWidths@16 -_NtGdiSTROBJ_bGetAdvanceWidths@16: - movl $0x1286, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiSTROBJ_vEnumStart@4 -_NtGdiSTROBJ_vEnumStart@4: - movl $0x1287, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiSTROBJ_dwGetCodePage@4 -_NtGdiSTROBJ_dwGetCodePage@4: - movl $0x1288, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiPATHOBJ_vGetBounds@8 -_NtGdiPATHOBJ_vGetBounds@8: - movl $0x1289, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiPATHOBJ_bEnum@8 -_NtGdiPATHOBJ_bEnum@8: - movl $0x128a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiPATHOBJ_vEnumStart@4 -_NtGdiPATHOBJ_vEnumStart@4: - movl $0x128b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiPATHOBJ_vEnumStartClipLines@16 -_NtGdiPATHOBJ_vEnumStartClipLines@16: - movl $0x128c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiPATHOBJ_bEnumClipLines@12 -_NtGdiPATHOBJ_bEnumClipLines@12: - movl $0x128d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetDhpdev@4 -_NtGdiGetDhpdev@4: - movl $0x128e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEngCheckAbort@4 -_NtGdiEngCheckAbort@4: - movl $0x128f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiHT_Get8BPPFormatPalette@16 -_NtGdiHT_Get8BPPFormatPalette@16: - movl $0x1290, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiHT_Get8BPPMaskPalette@24 -_NtGdiHT_Get8BPPMaskPalette@24: - movl $0x1291, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiUpdateTransform@4 -_NtGdiUpdateTransform@4: - movl $0x1292, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiSetPUMPDOBJ@16 -_NtGdiSetPUMPDOBJ@16: - movl $0x1293, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiBRUSHOBJ_DeleteRbrush@8 -_NtGdiBRUSHOBJ_DeleteRbrush@8: - movl $0x1294, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiUMPDEngFreeUserMem@4 -_NtGdiUMPDEngFreeUserMem@4: - movl $0x1295, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDrawStream@12 -_NtGdiDrawStream@12: - movl $0x1296, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiMakeObjectXferable@8 -_NtGdiMakeObjectXferable@8: - movl $0x1297, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiMakeObjectUnXferable@4 -_NtGdiMakeObjectUnXferable@4: - movl $0x1298, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - diff --git a/rostests/apitests/w32kdll/w32kdll_2k3sp2/w32kdll_2k3sp2.def b/rostests/apitests/w32kdll/w32kdll_2k3sp2/w32kdll_2k3sp2.def deleted file mode 100644 index b590c508295..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_2k3sp2/w32kdll_2k3sp2.def +++ /dev/null @@ -1,674 +0,0 @@ -; $Id: w32kdll.def 27344 2007-08-01 14:12:10Z tkreuzer $ -; -; ReactOS Operating System -; -; This file contains all win32k native api functions from win 2k3 sp 2 -; -LIBRARY w32kdll.dll - -EXPORTS -NtGdiAbortDoc@4 -NtGdiAbortPath@4 -NtGdiAddFontResourceW@24 -NtGdiAddRemoteFontToDC@16 -NtGdiAddFontMemResourceEx@20 -NtGdiRemoveMergeFont@8 -NtGdiAddRemoteMMInstanceToDC@12 -NtGdiAlphaBlend@48 -NtGdiAngleArc@24 -NtGdiAnyLinkedFonts@0 -NtGdiFontIsLinked@4 -NtGdiArcInternal@40 -NtGdiBeginPath@4 -NtGdiBitBlt@44 -NtGdiCancelDC@4 -NtGdiCheckBitmapBits@32 -NtGdiCloseFigure@4 -NtGdiClearBitmapAttributes@8 -NtGdiClearBrushAttributes@8 -NtGdiColorCorrectPalette@24 -NtGdiCombineRgn@16 -NtGdiCombineTransform@12 -NtGdiComputeXformCoefficients@4 -NtGdiConsoleTextOut@16 -NtGdiConvertMetafileRect@8 -NtGdiCreateBitmap@20 -NtGdiCreateClientObj@4 -NtGdiCreateColorSpace@4 -NtGdiCreateColorTransform@32 -NtGdiCreateCompatibleBitmap@12 -NtGdiCreateCompatibleDC@4 -NtGdiCreateDIBBrush@24 -NtGdiCreateDIBitmapInternal@44 -NtGdiCreateDIBSection@36 -NtGdiCreateEllipticRgn@16 -NtGdiCreateHalftonePalette@4 -NtGdiCreateHatchBrushInternal@12 -NtGdiCreateMetafileDC@4 -NtGdiCreatePaletteInternal@8 -NtGdiCreatePatternBrushInternal@12 -NtGdiCreatePen@16 -NtGdiCreateRectRgn@16 -NtGdiCreateRoundRectRgn@24 -NtGdiCreateServerMetaFile@24 -NtGdiCreateSolidBrush@8 -NtGdiD3dContextCreate@16 -NtGdiD3dContextDestroy@4 -NtGdiD3dContextDestroyAll@4 -NtGdiD3dValidateTextureStageState@4 -NtGdiD3dDrawPrimitives2@28 -NtGdiDdGetDriverState@4 -NtGdiDdAddAttachedSurface@12 -NtGdiDdAlphaBlt@12 -NtGdiDdAttachSurface@8 -NtGdiDdBeginMoCompFrame@8 -NtGdiDdBlt@12 -NtGdiDdCanCreateSurface@8 -NtGdiDdCanCreateD3DBuffer@8 -NtGdiDdColorControl@8 -NtGdiDdCreateDirectDrawObject@4 -NtGdiDdCreateSurface@32 -NtGdiDdCreateD3DBuffer@32 -NtGdiDdCreateMoComp@8 -NtGdiDdCreateSurfaceObject@24 -NtGdiDdDeleteDirectDrawObject@4 -NtGdiDdDeleteSurfaceObject@4 -NtGdiDdDestroyMoComp@8 -NtGdiDdDestroySurface@8 -NtGdiDdDestroyD3DBuffer@4 -NtGdiDdEndMoCompFrame@8 -NtGdiDdFlip@20 -NtGdiDdFlipToGDISurface@8 -NtGdiDdGetAvailDriverMemory@8 -NtGdiDdGetBltStatus@8 -NtGdiDdGetDC@8 -NtGdiDdGetDriverInfo@8 -NtGdiDdGetDxHandle@12 -NtGdiDdGetFlipStatus@8 -NtGdiDdGetInternalMoCompInfo@8 -NtGdiDdGetMoCompBuffInfo@8 -NtGdiDdGetMoCompGuids@8 -NtGdiDdGetMoCompFormats@8 -NtGdiDdGetScanLine@8 -NtGdiDdLock@12 -NtGdiDdLockD3D@8 -NtGdiDdQueryDirectDrawObject@44 -NtGdiDdQueryMoCompStatus@8 -NtGdiDdReenableDirectDrawObject@8 -NtGdiDdReleaseDC@4 -NtGdiDdRenderMoComp@8 -NtGdiDdResetVisrgn@8 -NtGdiDdSetColorKey@8 -NtGdiDdSetExclusiveMode@8 -NtGdiDdSetGammaRamp@12 -NtGdiDdCreateSurfaceEx@12 -NtGdiDdSetOverlayPosition@12 -NtGdiDdUnattachSurface@8 -NtGdiDdUnlock@8 -NtGdiDdUnlockD3D@8 -NtGdiDdUpdateOverlay@12 -NtGdiDdWaitForVerticalBlank@8 -NtGdiDvpCanCreateVideoPort@8 -NtGdiDvpColorControl@8 -NtGdiDvpCreateVideoPort@8 -NtGdiDvpDestroyVideoPort@8 -NtGdiDvpFlipVideoPort@16 -NtGdiDvpGetVideoPortBandwidth@8 -NtGdiDvpGetVideoPortField@8 -NtGdiDvpGetVideoPortFlipStatus@8 -NtGdiDvpGetVideoPortInputFormats@8 -NtGdiDvpGetVideoPortLine@8 -NtGdiDvpGetVideoPortOutputFormats@8 -NtGdiDvpGetVideoPortConnectInfo@8 -NtGdiDvpGetVideoSignalStatus@8 -NtGdiDvpUpdateVideoPort@16 -NtGdiDvpWaitForVideoPortSync@8 -NtGdiDvpAcquireNotification@12 -NtGdiDvpReleaseNotification@8 -NtGdiDxgGenericThunk@24 -NtGdiDeleteClientObj@4 -NtGdiDeleteColorSpace@4 -NtGdiDeleteColorTransform@8 -NtGdiDeleteObjectApp@4 -NtGdiDescribePixelFormat@16 -NtGdiGetPerBandInfo@8 -NtGdiDoBanding@16 -NtGdiDoPalette@24 -NtGdiDrawEscape@16 -NtGdiEllipse@20 -NtGdiEnableEudc@4 -NtGdiEndDoc@4 -NtGdiEndPage@4 -NtGdiEndPath@4 -NtGdiEnumFontChunk@20 -NtGdiEnumFontClose@4 -NtGdiEnumFontOpen@28 -NtGdiEnumObjects@16 -NtGdiEqualRgn@8 -NtGdiEudcLoadUnloadLink@28 -NtGdiExcludeClipRect@20 -NtGdiExtCreatePen@44 -NtGdiExtCreateRegion@12 -NtGdiExtEscape@32 -NtGdiExtFloodFill@20 -NtGdiExtGetObjectW@12 -NtGdiExtSelectClipRgn@12 -NtGdiExtTextOutW@36 -NtGdiFillPath@4 -NtGdiFillRgn@12 -NtGdiFlattenPath@4 -NtGdiFlush@0 -NtGdiForceUFIMapping@8 -NtGdiFrameRgn@20 -NtGdiFullscreenControl@20 -NtGdiGetAndSetDCDword@16 -NtGdiGetAppClipBox@8 -NtGdiGetBitmapBits@12 -NtGdiGetBitmapDimension@8 -NtGdiGetBoundsRect@12 -NtGdiGetCharABCWidthsW@24 -NtGdiGetCharacterPlacementW@24 -NtGdiGetCharSet@4 -NtGdiGetCharWidthW@24 -NtGdiGetCharWidthInfo@8 -NtGdiGetColorAdjustment@8 -NtGdiGetColorSpaceforBitmap@4 -NtGdiGetDCDword@12 -NtGdiGetDCforBitmap@4 -NtGdiGetDCObject@8 -NtGdiGetDCPoint@12 -NtGdiGetDeviceCaps@8 -NtGdiGetDeviceGammaRamp@8 -NtGdiGetDeviceCapsAll@8 -NtGdiGetDIBitsInternal@36 -NtGdiGetETM@8 -NtGdiGetEudcTimeStampEx@12 -NtGdiGetFontData@20 -NtGdiGetFontResourceInfoInternalW@28 -NtGdiGetGlyphIndicesW@20 -NtGdiGetGlyphIndicesWInternal@24 -NtGdiGetGlyphOutline@32 -NtGdiGetKerningPairs@12 -NtGdiGetLinkedUFIs@12 -NtGdiGetMiterLimit@8 -NtGdiGetMonitorID@12 -NtGdiGetNearestColor@8 -NtGdiGetNearestPaletteIndex@8 -NtGdiGetObjectBitmapHandle@8 -NtGdiGetOutlineTextMetricsInternalW@16 -NtGdiGetPath@16 -NtGdiGetPixel@12 -NtGdiGetRandomRgn@12 -NtGdiGetRasterizerCaps@8 -NtGdiGetRealizationInfo@12 -NtGdiGetRegionData@12 -NtGdiGetRgnBox@8 -NtGdiGetServerMetaFileBits@28 -NtGdiGetSpoolMessage@16 -NtGdiGetStats@20 -NtGdiGetStockObject@4 -NtGdiGetStringBitmapW@20 -NtGdiGetSystemPaletteUse@4 -NtGdiGetTextCharsetInfo@12 -NtGdiGetTextExtent@20 -NtGdiGetTextExtentExW@32 -NtGdiGetTextFaceW@16 -NtGdiGetTextMetricsW@12 -NtGdiGetTransform@12 -NtGdiGetUFI@24 -NtGdiGetEmbUFI@28 -NtGdiGetUFIPathname@40 -NtGdiGetEmbedFonts@0 -NtGdiChangeGhostFont@8 -NtGdiAddEmbFontToDC@8 -NtGdiGetFontUnicodeRanges@8 -NtGdiGetWidthTable@28 -NtGdiGradientFill@24 -NtGdiHfontCreate@20 -NtGdiIcmBrushInfo@32 -NtGdiInit@0 -NtGdiInitSpool@0 -NtGdiIntersectClipRect@20 -NtGdiInvertRgn@8 -NtGdiLineTo@12 -NtGdiMakeFontDir@20 -NtGdiMakeInfoDC@8 -NtGdiMaskBlt@52 -NtGdiModifyWorldTransform@12 -NtGdiMonoBitmap@4 -NtGdiMoveTo@16 -NtGdiOffsetClipRgn@12 -NtGdiOffsetRgn@12 -NtGdiOpenDCW@28 -NtGdiPatBlt@24 -NtGdiPolyPatBlt@20 -NtGdiPathToRegion@4 -NtGdiPlgBlt@44 -NtGdiPolyDraw@16 -NtGdiPolyPolyDraw@20 -NtGdiPolyTextOutW@16 -NtGdiPtInRegion@12 -NtGdiPtVisible@12 -NtGdiQueryFonts@12 -NtGdiQueryFontAssocInfo@4 -NtGdiRectangle@20 -NtGdiRectInRegion@8 -NtGdiRectVisible@8 -NtGdiRemoveFontResourceW@24 -NtGdiRemoveFontMemResourceEx@4 -NtGdiResetDC@20 -NtGdiResizePalette@8 -NtGdiRestoreDC@8 -NtGdiRoundRect@28 -NtGdiSaveDC@4 -NtGdiScaleViewportExtEx@24 -NtGdiScaleWindowExtEx@24 -NtGdiSelectBitmap@8 -NtGdiSelectBrush@8 -NtGdiSelectClipPath@8 -NtGdiSelectFont@8 -NtGdiSelectPen@8 -NtGdiSetBitmapAttributes@8 -NtGdiSetBitmapBits@12 -NtGdiSetBitmapDimension@16 -NtGdiSetBoundsRect@12 -NtGdiSetBrushAttributes@8 -NtGdiSetBrushOrg@16 -NtGdiSetColorAdjustment@8 -NtGdiSetColorSpace@8 -NtGdiSetDeviceGammaRamp@8 -NtGdiSetDIBitsToDeviceInternal@64 -NtGdiSetFontEnumeration@4 -NtGdiSetFontXform@12 -NtGdiSetIcmMode@12 -NtGdiSetLinkedUFIs@12 -NtGdiSetMagicColors@12 -NtGdiSetMetaRgn@4 -NtGdiSetMiterLimit@12 -NtGdiGetDeviceWidth@4 -NtGdiMirrorWindowOrg@4 -NtGdiSetLayout@12 -NtGdiSetPixel@16 -NtGdiSetPixelFormat@8 -NtGdiSetRectRgn@20 -NtGdiSetSystemPaletteUse@8 -NtGdiSetTextJustification@12 -NtGdiSetupPublicCFONT@12 -NtGdiSetVirtualResolution@20 -NtGdiSetSizeDevice@12 -NtGdiStartDoc@16 -NtGdiStartPage@4 -NtGdiStretchBlt@48 -NtGdiStretchDIBitsInternal@64 -NtGdiStrokeAndFillPath@4 -NtGdiStrokePath@4 -NtGdiSwapBuffers@4 -NtGdiTransformPoints@20 -NtGdiTransparentBlt@44 -NtGdiUnloadPrinterDriver@8 -NtGdiUnmapMemFont@4 -NtGdiUnrealizeObject@4 -NtGdiUpdateColors@4 -NtGdiWidenPath@4 -NtUserActivateKeyboardLayout@8 -NtUserAlterWindowStyle@12 -NtUserAssociateInputContext@12 -NtUserAttachThreadInput@12 -NtUserBeginPaint@8 -NtUserBitBltSysBmp@32 -NtUserBlockInput@4 -NtUserBuildHimcList@16 -NtUserBuildHwndList@28 -NtUserBuildNameList@16 -NtUserBuildPropList@16 -NtUserCallHwnd@8 -NtUserCallHwndLock@8 -NtUserCallHwndOpt@8 -NtUserCallHwndParam@12 -NtUserCallHwndParamLock@12 -NtUserCallMsgFilter@8 -NtUserCallNextHookEx@16 -NtUserCallNoParam@4 -NtUserCallOneParam@8 -NtUserCallTwoParam@12 -NtUserChangeClipboardChain@8 -NtUserChangeDisplaySettings@16 -NtUserCheckImeHotKey@8 -NtUserCheckMenuItem@12 -NtUserChildWindowFromPointEx@16 -NtUserClipCursor@4 -NtUserCloseClipboard@0 -NtUserCloseDesktop@4 -NtUserCloseWindowStation@4 -NtUserConsoleControl@12 -NtUserConvertMemHandle@8 -NtUserCopyAcceleratorTable@12 -NtUserCountClipboardFormats@0 -NtUserCreateAcceleratorTable@8 -NtUserCreateCaret@16 -NtUserCreateDesktop@20 -NtUserCreateInputContext@4 -NtUserCreateLocalMemHandle@16 -NtUserCreateWindowEx@60 -NtUserCreateWindowStation@28 -NtUserDdeGetQualityOfService@12 -NtUserDdeInitialize@20 -NtUserDdeSetQualityOfService@12 -NtUserDeferWindowPos@32 -NtUserDefSetText@8 -NtUserDeleteMenu@12 -NtUserDestroyAcceleratorTable@4 -NtUserDestroyCursor@8 -NtUserDestroyInputContext@4 -NtUserDestroyMenu@4 -NtUserDestroyWindow@4 -NtUserDisableThreadIme@4 -NtUserDispatchMessage@4 -NtUserDragDetect@12 -NtUserDragObject@20 -NtUserDrawAnimatedRects@16 -NtUserDrawCaption@16 -NtUserDrawCaptionTemp@28 -NtUserDrawIconEx@44 -NtUserDrawMenuBarTemp@20 -NtUserEmptyClipboard@0 -NtUserEnableMenuItem@12 -NtUserEnableScrollBar@12 -NtUserEndDeferWindowPosEx@8 -NtUserEndMenu@0 -NtUserEndPaint@8 -NtUserEnumDisplayDevices@16 -NtUserEnumDisplayMonitors@16 -NtUserEnumDisplaySettings@16 -NtUserEvent@4 -NtUserExcludeUpdateRgn@8 -NtUserFillWindow@16 -NtUserFindExistingCursorIcon@12 -NtUserFindWindowEx@20 -NtUserFlashWindowEx@4 -NtUserGetAltTabInfo@24 -NtUserGetAncestor@8 -NtUserGetAppImeLevel@4 -NtUserGetAsyncKeyState@4 -NtUserGetAtomName@8 -NtUserGetCaretBlinkTime@0 -NtUserGetCaretPos@4 -NtUserGetClassInfoEx@20 -NtUserGetClassName@12 -NtUserGetClipboardData@8 -NtUserGetClipboardFormatName@12 -NtUserGetClipboardOwner@0 -NtUserGetClipboardSequenceNumber@0 -NtUserGetClipboardViewer@0 -NtUserGetClipCursor@4 -NtUserGetComboBoxInfo@8 -NtUserGetControlBrush@12 -NtUserGetControlColor@16 -NtUserGetCPD@12 -NtUserGetCursorFrameInfo@16 -NtUserGetCursorInfo@4 -NtUserGetDC@4 -NtUserGetDCEx@12 -NtUserGetDoubleClickTime@0 -NtUserGetForegroundWindow@0 -NtUserGetGuiResources@8 -NtUserGetGUIThreadInfo@8 -NtUserGetIconInfo@24 -NtUserGetIconSize@16 -NtUserGetImeHotKey@16 -NtUserGetImeInfoEx@8 -NtUserGetInternalWindowPos@12 -NtUserGetKeyboardLayoutList@8 -NtUserGetKeyboardLayoutName@4 -NtUserGetKeyboardState@4 -NtUserGetKeyNameText@12 -NtUserGetKeyState@4 -NtUserGetListBoxInfo@4 -NtUserGetMenuBarInfo@16 -NtUserGetMenuIndex@8 -NtUserGetMenuItemRect@16 -NtUserGetMessage@16 -NtUserGetMouseMovePointsEx@20 -NtUserGetObjectInformation@20 -NtUserGetOpenClipboardWindow@0 -NtUserGetPriorityClipboardFormat@8 -NtUserGetProcessWindowStation@0 -NtUserGetRawInputBuffer@12 -NtUserGetRawInputData@20 -NtUserGetRawInputDeviceInfo@16 -NtUserGetRawInputDeviceList@12 -NtUserGetRegisteredRawInputDevices@12 -NtUserGetScrollBarInfo@12 -NtUserGetSystemMenu@8 -NtUserGetThreadDesktop@8 -NtUserGetThreadState@4 -NtUserGetTitleBarInfo@8 -NtUserGetUpdateRect@12 -NtUserGetUpdateRgn@12 -NtUserGetWindowDC@4 -NtUserGetWindowPlacement@8 -NtUserGetWOWClass@8 -NtUserHardErrorControl@12 -NtUserHideCaret@4 -NtUserHiliteMenuItem@16 -NtUserImpersonateDdeClientWindow@8 -NtUserInitialize@12 -NtUserInitializeClientPfnArrays@16 -NtUserInitTask@48 -NtUserInternalGetWindowText@12 -NtUserInvalidateRect@12 -NtUserInvalidateRgn@12 -NtUserIsClipboardFormatAvailable@4 -NtUserKillTimer@8 -NtUserLoadKeyboardLayoutEx@28 -NtUserLockWindowStation@4 -NtUserLockWindowUpdate@4 -NtUserLockWorkStation@0 -NtUserMapVirtualKeyEx@16 -NtUserMenuItemFromPoint@16 -NtUserMessageCall@28 -NtUserMinMaximize@12 -NtUserMNDragLeave@0 -NtUserMNDragOver@8 -NtUserModifyUserStartupInfoFlags@8 -NtUserMoveWindow@24 -NtUserNotifyIMEStatus@12 -NtUserNotifyProcessCreate@16 -NtUserNotifyWinEvent@16 -NtUserOpenClipboard@8 -NtUserOpenDesktop@12 -NtUserOpenInputDesktop@12 -NtUserOpenWindowStation@8 -NtUserPaintDesktop@4 -NtUserPeekMessage@20 -NtUserPostMessage@16 -NtUserPostThreadMessage@16 -NtUserPrintWindow@12 -NtUserProcessConnect@12 -NtUserQueryInformationThread@16 -NtUserQueryInputContext@8 -NtUserQuerySendMessage@4 -NtUserQueryWindow@8 -NtUserRealChildWindowFromPoint@12 -NtUserRealInternalGetMessage@24 -NtUserRealWaitMessageEx@8 -NtUserRedrawWindow@16 -NtUserRegisterClassExWOW@28 -NtUserRegisterUserApiHook@16 -NtUserRegisterHotKey@16 -NtUserRegisterRawInputDevices@12 -NtUserRegisterTasklist@4 -NtUserRegisterWindowMessage@4 -NtUserRemoveMenu@12 -NtUserRemoveProp@8 -NtUserResolveDesktop@16 -NtUserResolveDesktopForWOW@4 -NtUserSBGetParms@16 -NtUserScrollDC@28 -NtUserScrollWindowEx@32 -NtUserSelectPalette@12 -NtUserSendInput@12 -NtUserSetActiveWindow@4 -NtUserSetAppImeLevel@8 -NtUserSetCapture@4 -NtUserSetClassLong@16 -NtUserSetClassWord@12 -NtUserSetClipboardData@12 -NtUserSetClipboardViewer@4 -NtUserSetConsoleReserveKeys@8 -NtUserSetCursor@4 -NtUserSetCursorContents@8 -NtUserSetCursorIconData@16 -NtUserSetFocus@4 -NtUserSetImeHotKey@20 -NtUserSetImeInfoEx@4 -NtUserSetImeOwnerWindow@8 -NtUserSetInformationProcess@16 -NtUserSetInformationThread@16 -NtUserSetInternalWindowPos@16 -NtUserSetKeyboardState@4 -NtUserSetLogonNotifyWindow@4 -NtUserSetMenu@12 -NtUserSetMenuContextHelpId@8 -NtUserSetMenuDefaultItem@12 -NtUserSetMenuFlagRtoL@4 -NtUserSetObjectInformation@16 -NtUserSetParent@8 -NtUserSetProcessWindowStation@4 -NtUserSetProp@12 -NtUserSetScrollInfo@16 -NtUserSetShellWindowEx@8 -NtUserSetSysColors@16 -NtUserSetSystemCursor@8 -NtUserSetSystemMenu@8 -NtUserSetSystemTimer@16 -NtUserSetThreadDesktop@4 -NtUserSetThreadLayoutHandles@8 -NtUserSetThreadState@8 -NtUserSetTimer@16 -NtUserSetWindowFNID@8 -NtUserSetWindowLong@16 -NtUserSetWindowPlacement@8 -NtUserSetWindowPos@28 -NtUserSetWindowRgn@12 -NtUserSetWindowsHookAW@12 -NtUserSetWindowsHookEx@24 -NtUserSetWindowStationUser@16 -NtUserSetWindowWord@12 -NtUserSetWinEventHook@32 -NtUserShowCaret@4 -NtUserShowScrollBar@12 -NtUserShowWindow@8 -NtUserShowWindowAsync@8 -NtUserSoundSentry@0 -NtUserSwitchDesktop@4 -NtUserSystemParametersInfo@16 -NtUserTestForInteractiveUser@4 -NtUserThunkedMenuInfo@8 -NtUserThunkedMenuItemInfo@24 -NtUserToUnicodeEx@28 -NtUserTrackMouseEvent@4 -NtUserTrackPopupMenuEx@24 -NtUserCalcMenuBar@20 -NtUserPaintMenuBar@24 -NtUserTranslateAccelerator@12 -NtUserTranslateMessage@8 -NtUserUnhookWindowsHookEx@4 -NtUserUnhookWinEvent@4 -NtUserUnloadKeyboardLayout@4 -NtUserUnlockWindowStation@4 -NtUserUnregisterClass@12 -NtUserUnregisterUserApiHook@0 -NtUserUnregisterHotKey@8 -NtUserUpdateInputContext@12 -NtUserUpdateInstance@12 -NtUserUpdateLayeredWindow@40 -NtUserGetLayeredWindowAttributes@16 -NtUserSetLayeredWindowAttributes@16 -NtUserUpdatePerUserSystemParameters@8 -NtUserUserHandleGrantAccess@12 -NtUserValidateHandleSecure@4 -NtUserValidateRect@8 -NtUserValidateTimerCallback@4 -NtUserVkKeyScanEx@12 -NtUserWaitForInputIdle@12 -NtUserWaitForMsgAndEvent@4 -NtUserWaitMessage@0 -NtUserWin32PoolAllocationStats@24 -NtUserWindowFromPoint@8 -NtUserYieldTask@0 -NtUserRemoteConnect@12 -NtUserRemoteRedrawRectangle@16 -NtUserRemoteRedrawScreen@0 -NtUserRemoteStopScreenUpdates@0 -NtUserCtxDisplayIOCtl@12 -NtGdiEngAssociateSurface@12 -NtGdiEngCreateBitmap@24 -NtGdiEngCreateDeviceSurface@16 -NtGdiEngCreateDeviceBitmap@16 -NtGdiEngCreatePalette@24 -NtGdiEngComputeGlyphSet@12 -NtGdiEngCopyBits@24 -NtGdiEngDeletePalette@4 -NtGdiEngDeleteSurface@4 -NtGdiEngEraseSurface@12 -NtGdiEngUnlockSurface@4 -NtGdiEngLockSurface@4 -NtGdiEngBitBlt@44 -NtGdiEngStretchBlt@44 -NtGdiEngPlgBlt@44 -NtGdiEngMarkBandingSurface@4 -NtGdiEngStrokePath@32 -NtGdiEngFillPath@28 -NtGdiEngStrokeAndFillPath@40 -NtGdiEngPaint@20 -NtGdiEngLineTo@36 -NtGdiEngAlphaBlend@28 -NtGdiEngGradientFill@40 -NtGdiEngTransparentBlt@32 -NtGdiEngTextOut@40 -NtGdiEngStretchBltROP@52 -NtGdiXLATEOBJ_cGetPalette@16 -NtGdiXLATEOBJ_iXlate@8 -NtGdiXLATEOBJ_hGetColorTransform@4 -NtGdiCLIPOBJ_bEnum@12 -NtGdiCLIPOBJ_cEnumStart@20 -NtGdiCLIPOBJ_ppoGetPath@4 -NtGdiEngDeletePath@4 -NtGdiEngCreateClip@0 -NtGdiEngDeleteClip@4 -NtGdiBRUSHOBJ_ulGetBrushColor@4 -NtGdiBRUSHOBJ_pvAllocRbrush@8 -NtGdiBRUSHOBJ_pvGetRbrush@4 -NtGdiBRUSHOBJ_hGetColorTransform@4 -NtGdiXFORMOBJ_bApplyXform@20 -NtGdiXFORMOBJ_iGetXform@8 -NtGdiFONTOBJ_vGetInfo@12 -NtGdiFONTOBJ_pxoGetXform@4 -NtGdiFONTOBJ_cGetGlyphs@20 -NtGdiFONTOBJ_pifi@4 -NtGdiFONTOBJ_pfdg@4 -NtGdiFONTOBJ_pQueryGlyphAttrs@8 -NtGdiFONTOBJ_pvTrueTypeFontFile@8 -NtGdiFONTOBJ_cGetAllGlyphHandles@8 -NtGdiSTROBJ_bEnum@12 -NtGdiSTROBJ_bEnumPositionsOnly@12 -NtGdiSTROBJ_bGetAdvanceWidths@16 -NtGdiSTROBJ_vEnumStart@4 -NtGdiSTROBJ_dwGetCodePage@4 -NtGdiPATHOBJ_vGetBounds@8 -NtGdiPATHOBJ_bEnum@8 -NtGdiPATHOBJ_vEnumStart@4 -NtGdiPATHOBJ_vEnumStartClipLines@16 -NtGdiPATHOBJ_bEnumClipLines@12 -NtGdiGetDhpdev@4 -NtGdiEngCheckAbort@4 -NtGdiHT_Get8BPPFormatPalette@16 -NtGdiHT_Get8BPPMaskPalette@24 -NtGdiUpdateTransform@4 -NtGdiSetPUMPDOBJ@16 -NtGdiBRUSHOBJ_DeleteRbrush@8 -NtGdiUMPDEngFreeUserMem@4 -NtGdiDrawStream@12 -NtGdiMakeObjectXferable@8 -NtGdiMakeObjectUnXferable@4 diff --git a/rostests/apitests/w32kdll/w32kdll_2k3sp2/w32kdll_2k3sp2.rbuild b/rostests/apitests/w32kdll/w32kdll_2k3sp2/w32kdll_2k3sp2.rbuild deleted file mode 100644 index 5876d07b0e4..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_2k3sp2/w32kdll_2k3sp2.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - - w32kdll_2k3sp2.S - main.c - diff --git a/rostests/apitests/w32kdll/w32kdll_2ksp4/CMakeLists.txt b/rostests/apitests/w32kdll/w32kdll_2ksp4/CMakeLists.txt deleted file mode 100644 index 66768eeef4d..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_2ksp4/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ - -add_library(w32kdll_2ksp4 SHARED main.c w32kdll_2ksp4.S) -set_entrypoint(w32kdll_2ksp4 0) -target_link_libraries(w32kdll_2ksp4 ${CMAKE_CURRENT_SOURCE_DIR}/w32kdll_2ksp4.def) -add_dependencies(w32kdll_2ksp4 psdk ) -add_importlib_target(w32kdll_2ksp4.def) diff --git a/rostests/apitests/w32kdll/w32kdll_2ksp4/main.c b/rostests/apitests/w32kdll/w32kdll_2ksp4/main.c deleted file mode 100644 index 13a149cc27e..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_2ksp4/main.c +++ /dev/null @@ -1,31 +0,0 @@ -#include - -#ifdef BUILD_DLL - #define DLL_EXPORT __declspec(dllexport) -#else - #define DLL_EXPORT -#endif - -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - // attach to process - // return FALSE to fail DLL load - break; - - case DLL_PROCESS_DETACH: - // detach from process - break; - - case DLL_THREAD_ATTACH: - // attach to thread - break; - - case DLL_THREAD_DETACH: - // detach from thread - break; - } - return TRUE; // succesful -} diff --git a/rostests/apitests/w32kdll/w32kdll_2ksp4/w32k_2ksp4-x86.db b/rostests/apitests/w32kdll/w32kdll_2ksp4/w32k_2ksp4-x86.db deleted file mode 100644 index b8fda7a4f0d..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_2ksp4/w32k_2ksp4-x86.db +++ /dev/null @@ -1,643 +0,0 @@ -# -# win32k systemcalls taken from Windows 2000 SP4 x86 -# -NtGdiAbortDoc 1 -NtGdiAbortPath 1 -NtGdiAddFontResourceW 6 -NtGdiAddRemoteFontToDC 4 -NtGdiAddFontMemResourceEx 5 -NtGdiRemoveMergeFont 2 -NtGdiAddRemoteMMInstanceToDC 3 -NtGdiAlphaBlend 12 -NtGdiAngleArc 6 -NtGdiAnyLinkedFonts 0 -NtGdiFontIsLinked 1 -NtGdiArcInternal 10 -NtGdiBeginPath 1 -NtGdiBitBlt 11 -NtGdiCancelDC 1 -NtGdiCheckBitmapBits 8 -NtGdiCloseFigure 1 -NtGdiColorCorrectPalette 6 -NtGdiCombineRgn 4 -NtGdiCombineTransform 3 -NtGdiComputeXformCoefficients 1 -NtGdiConsoleTextOut 4 -NtGdiConvertMetafileRect 2 -NtGdiCreateBitmap 5 -NtGdiCreateClientObj 1 -NtGdiCreateColorSpace 1 -NtGdiCreateColorTransform 8 -NtGdiCreateCompatibleBitmap 3 -NtGdiCreateCompatibleDC 1 -NtGdiCreateDIBBrush 6 -NtGdiCreateDIBitmapInternal 11 -NtGdiCreateDIBSection 9 -NtGdiCreateEllipticRgn 4 -NtGdiCreateHalftonePalette 1 -NtGdiCreateHatchBrushInternal 3 -NtGdiCreateMetafileDC 1 -NtGdiCreatePaletteInternal 2 -NtGdiCreatePatternBrushInternal 3 -NtGdiCreatePen 4 -NtGdiCreateRectRgn 4 -NtGdiCreateRoundRectRgn 6 -NtGdiCreateServerMetaFile 6 -NtGdiCreateSolidBrush 2 -NtGdiD3dContextCreate 4 -NtGdiD3dContextDestroy 1 -NtGdiD3dContextDestroyAll 1 -NtGdiD3dValidateTextureStageState 1 -NtGdiD3dDrawPrimitives2 7 -NtGdiDdGetDriverState 1 -NtGdiDdAddAttachedSurface 3 -NtGdiDdAlphaBlt 3 -NtGdiDdAttachSurface 2 -NtGdiDdBeginMoCompFrame 2 -NtGdiDdBlt 3 -NtGdiDdCanCreateSurface 2 -NtGdiDdCanCreateD3DBuffer 2 -NtGdiDdColorControl 2 -NtGdiDdCreateDirectDrawObject 1 -NtGdiDdCreateSurface 8 -NtGdiDdCreateD3DBuffer 8 -NtGdiDdCreateMoComp 2 -NtGdiDdCreateSurfaceObject 6 -NtGdiDdDeleteDirectDrawObject 1 -NtGdiDdDeleteSurfaceObject 1 -NtGdiDdDestroyMoComp 2 -NtGdiDdDestroySurface 2 -NtGdiDdDestroyD3DBuffer 1 -NtGdiDdEndMoCompFrame 2 -NtGdiDdFlip 5 -NtGdiDdFlipToGDISurface 2 -NtGdiDdGetAvailDriverMemory 2 -NtGdiDdGetBltStatus 2 -NtGdiDdGetDC 2 -NtGdiDdGetDriverInfo 2 -NtGdiDdGetDxHandle 3 -NtGdiDdGetFlipStatus 2 -NtGdiDdGetInternalMoCompInfo 2 -NtGdiDdGetMoCompBuffInfo 2 -NtGdiDdGetMoCompGuids 2 -NtGdiDdGetMoCompFormats 2 -NtGdiDdGetScanLine 2 -NtGdiDdLock 3 -NtGdiDdLockD3D 2 -NtGdiDdQueryDirectDrawObject 11 -NtGdiDdQueryMoCompStatus 2 -NtGdiDdReenableDirectDrawObject 2 -NtGdiDdReleaseDC 1 -NtGdiDdRenderMoComp 2 -NtGdiDdResetVisrgn 2 -NtGdiDdSetColorKey 2 -NtGdiDdSetExclusiveMode 2 -NtGdiDdSetGammaRamp 3 -NtGdiDdCreateSurfaceEx 3 -NtGdiDdSetOverlayPosition 3 -NtGdiDdUnattachSurface 2 -NtGdiDdUnlock 2 -NtGdiDdUnlockD3D 2 -NtGdiDdUpdateOverlay 3 -NtGdiDdWaitForVerticalBlank 2 -NtGdiDvpCanCreateVideoPort 2 -NtGdiDvpColorControl 2 -NtGdiDvpCreateVideoPort 2 -NtGdiDvpDestroyVideoPort 2 -NtGdiDvpFlipVideoPort 4 -NtGdiDvpGetVideoPortBandwidth 2 -NtGdiDvpGetVideoPortField 2 -NtGdiDvpGetVideoPortFlipStatus 2 -NtGdiDvpGetVideoPortInputFormats 2 -NtGdiDvpGetVideoPortLine 2 -NtGdiDvpGetVideoPortOutputFormats 2 -NtGdiDvpGetVideoPortConnectInfo 2 -NtGdiDvpGetVideoSignalStatus 2 -NtGdiDvpUpdateVideoPort 4 -NtGdiDvpWaitForVideoPortSync 2 -NtGdiDeleteClientObj 1 -NtGdiDeleteColorSpace 1 -NtGdiDeleteColorTransform 2 -NtGdiDeleteObjectApp 1 -NtGdiDescribePixelFormat 4 -NtGdiGetPerBandInfo 2 -NtGdiDoBanding 4 -NtGdiDoPalette 6 -NtGdiDrawEscape 4 -NtGdiEllipse 5 -NtGdiEnableEudc 1 -NtGdiEndDoc 1 -NtGdiEndPage 1 -NtGdiEndPath 1 -NtGdiEnumFontChunk 5 -NtGdiEnumFontClose 1 -NtGdiEnumFontOpen 7 -NtGdiEnumObjects 4 -NtGdiEqualRgn 2 -NtGdiEudcEnumFaceNameLinkW 4 -NtGdiEudcLoadUnloadLink 7 -NtGdiExcludeClipRect 5 -NtGdiExtCreatePen 11 -NtGdiExtCreateRegion 3 -NtGdiExtEscape 8 -NtGdiExtFloodFill 5 -NtGdiExtGetObjectW 3 -NtGdiExtSelectClipRgn 3 -NtGdiExtTextOutW 9 -NtGdiFillPath 1 -NtGdiFillRgn 3 -NtGdiFlattenPath 1 -NtGdiFlushUserBatch 0 -NtGdiFlush 0 -NtGdiForceUFIMapping 2 -NtGdiFrameRgn 5 -NtGdiFullscreenControl 5 -NtGdiGetAndSetDCDword 4 -NtGdiGetAppClipBox 2 -NtGdiGetBitmapBits 3 -NtGdiGetBitmapDimension 2 -NtGdiGetBoundsRect 3 -NtGdiGetCharABCWidthsW 6 -NtGdiGetCharacterPlacementW 6 -NtGdiGetCharSet 1 -NtGdiGetCharWidthW 6 -NtGdiGetCharWidthInfo 2 -NtGdiGetColorAdjustment 2 -NtGdiGetColorSpaceforBitmap 1 -NtGdiGetDCDword 3 -NtGdiGetDCforBitmap 1 -NtGdiGetDCObject 2 -NtGdiGetDCPoint 3 -NtGdiGetDeviceCaps 2 -NtGdiGetDeviceGammaRamp 2 -NtGdiGetDeviceCapsAll 2 -NtGdiGetDIBitsInternal 9 -NtGdiGetETM 2 -NtGdiGetEudcTimeStampEx 3 -NtGdiGetFontData 5 -NtGdiGetFontResourceInfoInternalW 7 -NtGdiGetGlyphIndicesW 5 -NtGdiGetGlyphIndicesWInternal 6 -NtGdiGetGlyphOutline 8 -NtGdiGetKerningPairs 3 -NtGdiGetLinkedUFIs 3 -NtGdiGetMiterLimit 2 -NtGdiGetMonitorID 3 -NtGdiGetNearestColor 2 -NtGdiGetNearestPaletteIndex 2 -NtGdiGetObjectBitmapHandle 2 -NtGdiGetOutlineTextMetricsInternalW 4 -NtGdiGetPath 4 -NtGdiGetPixel 3 -NtGdiGetRandomRgn 3 -NtGdiGetRasterizerCaps 2 -NtGdiGetRealizationInfo 2 -NtGdiGetRegionData 3 -NtGdiGetRgnBox 2 -NtGdiGetServerMetaFileBits 7 -NtGdiGetSpoolMessage 4 -NtGdiGetStats 5 -NtGdiGetStockObject 1 -NtGdiGetStringBitmapW 5 -NtGdiGetSystemPaletteUse 1 -NtGdiGetTextCharsetInfo 3 -NtGdiGetTextExtent 5 -NtGdiGetTextExtentExW 8 -NtGdiGetTextFaceW 4 -NtGdiGetTextMetricsW 3 -NtGdiGetTransform 3 -NtGdiGetUFI 6 -NtGdiGetUFIPathname 10 -NtGdiGetFontUnicodeRanges 2 -NtGdiGetWidthTable 7 -NtGdiGradientFill 6 -NtGdiHfontCreate 5 -NtGdiIcmBrushInfo 8 -NtGdiInit 0 -NtGdiInitSpool 0 -NtGdiIntersectClipRect 5 -NtGdiInvertRgn 2 -NtGdiLineTo 3 -NtGdiMakeFontDir 5 -NtGdiMakeInfoDC 2 -NtGdiMaskBlt 13 -NtGdiModifyWorldTransform 3 -NtGdiMonoBitmap 1 -NtGdiMoveTo 4 -NtGdiOffsetClipRgn 3 -NtGdiOffsetRgn 3 -NtGdiOpenDCW 7 -NtGdiPatBlt 6 -NtGdiPolyPatBlt 5 -NtGdiPathToRegion 1 -NtGdiPlgBlt 11 -NtGdiPolyDraw 4 -NtGdiPolyPolyDraw 5 -NtGdiPolyTextOutW 4 -NtGdiPtInRegion 3 -NtGdiPtVisible 3 -NtGdiQueryFonts 3 -NtGdiQueryFontAssocInfo 1 -NtGdiRectangle 5 -NtGdiRectInRegion 2 -NtGdiRectVisible 2 -NtGdiRemoveFontResourceW 6 -NtGdiRemoveFontMemResourceEx 1 -NtGdiResetDC 5 -NtGdiResizePalette 2 -NtGdiRestoreDC 2 -NtGdiRoundRect 7 -NtGdiSaveDC 1 -NtGdiScaleViewportExtEx 6 -NtGdiScaleWindowExtEx 6 -NtGdiSelectBitmap 2 -NtGdiSelectBrush 2 -NtGdiSelectClipPath 2 -NtGdiSelectFont 2 -NtGdiSelectPen 2 -NtGdiSetBitmapBits 3 -NtGdiSetBitmapDimension 4 -NtGdiSetBoundsRect 3 -NtGdiSetBrushOrg 4 -NtGdiSetColorAdjustment 2 -NtGdiSetColorSpace 2 -NtGdiSetDeviceGammaRamp 2 -NtGdiSetDIBitsToDeviceInternal 16 -NtGdiSetFontEnumeration 1 -NtGdiSetFontXform 3 -NtGdiSetIcmMode 3 -NtGdiSetLinkedUFIs 3 -NtGdiSetMagicColors 3 -NtGdiSetMetaRgn 1 -NtGdiSetMiterLimit 3 -NtGdiGetDeviceWidth 1 -NtGdiMirrorWindowOrg 1 -NtGdiSetLayout 3 -NtGdiSetPixel 4 -NtGdiSetPixelFormat 2 -NtGdiSetRectRgn 5 -NtGdiSetSystemPaletteUse 2 -NtGdiSetTextJustification 3 -NtGdiSetupPublicCFONT 3 -NtGdiSetVirtualResolution 5 -NtGdiSetSizeDevice 3 -NtGdiStartDoc 4 -NtGdiStartPage 1 -NtGdiStretchBlt 12 -NtGdiStretchDIBitsInternal 16 -NtGdiStrokeAndFillPath 1 -NtGdiStrokePath 1 -NtGdiSwapBuffers 1 -NtGdiTransformPoints 5 -NtGdiTransparentBlt 11 -NtGdiUnloadPrinterDriver 2 -NtGdiUnmapMemFont 1 -NtGdiUnrealizeObject 1 -NtGdiUpdateColors 1 -NtGdiWidenPath 1 -NtUserActivateKeyboardLayout 2 -NtUserAlterWindowStyle 3 -NtUserAssociateInputContext 3 -NtUserAttachThreadInput 3 -NtUserBeginPaint 2 -NtUserBitBltSysBmp 8 -NtUserBlockInput 1 -NtUserBuildHimcList 4 -NtUserBuildHwndList 7 -NtUserBuildNameList 4 -NtUserBuildPropList 4 -NtUserCallHwnd 2 -NtUserCallHwndLock 2 -NtUserCallHwndOpt 2 -NtUserCallHwndParam 3 -NtUserCallHwndParamLock 3 -NtUserCallMsgFilter 2 -NtUserCallNextHookEx 4 -NtUserCallNoParam 1 -NtUserCallOneParam 1 -NtUserCallTwoParam 3 -NtUserChangeClipboardChain 2 -NtUserChangeDisplaySettings 5 -NtUserCheckImeHotKey 3 -NtUserCheckMenuItem 3 -NtUserChildWindowFromPointEx 4 -NtUserClipCursor 1 -NtUserCloseClipboard 0 -NtUserCloseDesktop 1 -NtUserCloseWindowStation 1 -NtUserConsoleControl 3 -NtUserConvertMemHandle 2 -NtUserCopyAcceleratorTable 3 -NtUserCountClipboardFormats 1 -NtUserCreateAcceleratorTable 2 -NtUserCreateCaret 4 -NtUserCreateDesktop 5 -NtUserCreateInputContext 1 -NtUserCreateLocalMemHandle 4 -NtUserCreateWindowEx 13 -NtUserCreateWindowStation 6 -NtUserDdeGetQualityOfService 3 -NtUserDdeInitialize 5 -NtUserDdeSetQualityOfService 3 -NtUserDeferWindowPos 8 -NtUserDefSetText 2 -NtUserDeleteMenu 3 -NtUserDestroyAcceleratorTable 1 -NtUserDestroyCursor 2 -NtUserDestroyInputContext 1 -NtUserDestroyMenu 1 -NtUserDestroyWindow 1 -NtUserDisableThreadIme 1 -NtUserDispatchMessage 1 -NtUserDragDetect 3 -NtUserDragObject 5 -NtUserDrawAnimatedRects 4 -NtUserDrawCaption 4 -NtUserDrawCaptionTemp 7 -NtUserDrawIconEx 11 -NtUserDrawMenuBarTemp 5 -NtUserEmptyClipboard 0 -NtUserEnableMenuItem 3 -NtUserEnableScrollBar 3 -NtUserEndDeferWindowPosEx 2 -NtUserEndMenu 0 -NtUserEndPaint 2 -NtUserEnumDisplayDevices 4 -NtUserEnumDisplayMonitors 4 -NtUserEnumDisplaySettings 4 -NtUserEvent 1 -NtUserExcludeUpdateRgn 2 -NtUserFillWindow 4 -NtUserFindExistingCursorIcon 3 -NtUserFindWindowEx 5 -NtUserFlashWindowEx 1 -NtUserGetAltTabInfo 6 -NtUserGetAncestor 2 -NtUserGetAppImeLevel 1 -NtUserGetAsyncKeyState 1 -NtUserGetCaretBlinkTime 0 -NtUserGetCaretPos 1 -NtUserGetClassInfo 5 -NtUserGetClassName 3 -NtUserGetClipboardData 2 -NtUserGetClipboardFormatName 3 -NtUserGetClipboardOwner 0 -NtUserGetClipboardSequenceNumber 0 -NtUserGetClipboardViewer 0 -NtUserGetClipCursor 1 -NtUserGetComboBoxInfo 2 -NtUserGetControlBrush 3 -NtUserGetControlColor 4 -NtUserGetCPD 3 -NtUserGetCursorFrameInfo 4 -NtUserGetCursorInfo 1 -NtUserGetDC 1 -NtUserGetDCEx 3 -NtUserGetDoubleClickTime 0 -NtUserGetForegroundWindow 0 -NtUserGetGuiResources 2 -NtUserGetGUIThreadInfo 2 -NtUserGetIconInfo 6 -NtUserGetIconSize 4 -NtUserGetImeHotKey 4 -NtUserGetImeInfoEx 2 -NtUserGetInternalWindowPos 3 -NtUserGetKeyboardLayoutList 2 -NtUserGetKeyboardLayoutName 1 -NtUserGetKeyboardState 1 -NtUserGetKeyNameText 3 -NtUserGetKeyState 1 -NtUserGetListBoxInfo 1 -NtUserGetMenuBarInfo 4 -NtUserGetMenuIndex 2 -NtUserGetMenuItemRect 4 -NtUserGetMessage 4 -NtUserGetMouseMovePointsEx 5 -NtUserGetObjectInformation 5 -NtUserGetOpenClipboardWindow 0 -NtUserGetPriorityClipboardFormat 2 -NtUserGetProcessWindowStation 0 -NtUserGetScrollBarInfo 3 -NtUserGetSystemMenu 2 -NtUserGetThreadDesktop 2 -NtUserGetThreadState 1 -NtUserGetTitleBarInfo 2 -NtUserGetUpdateRect 3 -NtUserGetUpdateRgn 3 -NtUserGetWindowDC 1 -NtUserGetWindowPlacement 2 -NtUserGetWOWClass 2 -NtUserHardErrorControl 3 -NtUserHideCaret 1 -NtUserHiliteMenuItem 4 -NtUserImpersonateDdeClientWindow 2 -NtUserInitialize 3 -NtUserInitializeClientPfnArrays 4 -NtUserInitTask 11 -NtUserInternalGetWindowText 3 -NtUserInvalidateRect 3 -NtUserInvalidateRgn 3 -NtUserIsClipboardFormatAvailable 1 -NtUserKillTimer 2 -NtUserLoadKeyboardLayoutEx 6 -NtUserLockWindowStation 1 -NtUserLockWindowUpdate 1 -NtUserLockWorkStation 0 -NtUserMapVirtualKeyEx 4 -NtUserMenuItemFromPoint 4 -NtUserMessageCall 7 -NtUserMinMaximize 3 -NtUserMNDragLeave 1 -NtUserMNDragOver 2 -NtUserModifyUserStartupInfoFlags 2 -NtUserMoveWindow 6 -NtUserNotifyIMEStatus 3 -NtUserNotifyProcessCreate 4 -NtUserNotifyWinEvent 4 -NtUserOpenClipboard 2 -NtUserOpenDesktop 3 -NtUserOpenInputDesktop 3 -NtUserOpenWindowStation 2 -NtUserPaintDesktop 1 -NtUserPeekMessage 5 -NtUserPostMessage 4 -NtUserPostThreadMessage 4 -NtUserProcessConnect 3 -NtUserQueryInformationThread 5 -NtUserQueryInputContext 2 -NtUserQuerySendMessage 1 -NtUserQueryUserCounters 5 -NtUserQueryWindow 2 -NtUserRealChildWindowFromPoint 3 -NtUserRedrawWindow 4 -NtUserRegisterClassExWOW 6 -NtUserRegisterHotKey 4 -NtUserRegisterTasklist 1 -NtUserRegisterWindowMessage 1 -NtUserRemoveMenu 3 -NtUserRemoveProp 2 -NtUserResolveDesktop 4 -NtUserResolveDesktopForWOW 1 -NtUserSBGetParms 4 -NtUserScrollDC 7 -NtUserScrollWindowEx 8 -NtUserSelectPalette 3 -NtUserSendInput 3 -NtUserSendMessageCallback 6 -NtUserSendNotifyMessage 4 -NtUserSetActiveWindow 1 -NtUserSetAppImeLevel 2 -NtUserSetCapture 1 -NtUserSetClassLong 4 -NtUserSetClassWord 3 -NtUserSetClipboardData 3 -NtUserSetClipboardViewer 1 -NtUserSetConsoleReserveKeys 2 -NtUserSetCursor 1 -NtUserSetCursorContents 2 -NtUserSetCursorIconData 4 -NtUserSetDbgTag 2 -NtUserSetFocus 1 -NtUserSetImeHotKey 5 -NtUserSetImeInfoEx 1 -NtUserSetImeOwnerWindow 2 -NtUserSetInformationProcess 4 -NtUserSetInformationThread 5 -NtUserSetInternalWindowPos 4 -NtUserSetKeyboardState 1 -NtUserSetLogonNotifyWindow 1 -NtUserSetMenu 3 -NtUserSetMenuContextHelpId 2 -NtUserSetMenuDefaultItem 3 -NtUserSetMenuFlagRtoL 1 -NtUserSetObjectInformation 4 -NtUserSetParent 2 -NtUserSetProcessWindowStation 1 -NtUserSetProp 3 -NtUserSetRipFlags 2 -NtUserSetScrollInfo 4 -NtUserSetShellWindowEx 2 -NtUserSetSysColors 4 -NtUserSetSystemCursor 2 -NtUserSetSystemMenu 2 -NtUserSetSystemTimer 4 -NtUserSetThreadDesktop 1 -NtUserSetThreadLayoutHandles 2 -NtUserSetThreadState 2 -NtUserSetTimer 4 -NtUserSetWindowFNID 2 -NtUserSetWindowLong 4 -NtUserSetWindowPlacement 2 -NtUserSetWindowPos 7 -NtUserSetWindowRgn 3 -NtUserSetWindowsHookAW 3 -NtUserSetWindowsHookEx 6 -NtUserSetWindowStationUser 4 -NtUserSetWindowWord 3 -NtUserSetWinEventHook 8 -NtUserShowCaret 1 -NtUserShowScrollBar 3 -NtUserShowWindow 2 -NtUserShowWindowAsync 2 -NtUserSoundSentry 0 -NtUserSwitchDesktop 1 -NtUserSystemParametersInfo 4 -NtUserTestForInteractiveUser 1 -NtUserThunkedMenuInfo 2 -NtUserThunkedMenuItemInfo 6 -NtUserToUnicodeEx 7 -NtUserTrackMouseEvent 1 -NtUserTrackPopupMenuEx 6 -NtUserTranslateAccelerator 3 -NtUserTranslateMessage 2 -NtUserUnhookWindowsHookEx 1 -NtUserUnhookWinEvent 1 -NtUserUnloadKeyboardLayout 1 -NtUserUnlockWindowStation 1 -NtUserUnregisterClass 3 -NtUserUnregisterHotKey 2 -NtUserUpdateInputContext 3 -NtUserUpdateInstance 3 -NtUserUpdateLayeredWindow 9 -NtUserSetLayeredWindowAttributes 4 -NtUserUpdatePerUserSystemParameters 2 -NtUserUserHandleGrantAccess 3 -NtUserValidateHandleSecure 1 -NtUserValidateRect 2 -NtUserVkKeyScanEx 3 -NtUserWaitForInputIdle 3 -NtUserWaitForMsgAndEvent 1 -NtUserWaitMessage 0 -NtUserWin32PoolAllocationStats 6 -NtUserWindowFromPoint 2 -NtUserYieldTask 0 -NtUserRemoteConnect 3 -NtUserRemoteRedrawRectangle 4 -NtUserRemoteRedrawScreen 0 -NtUserRemoteStopScreenUpdates 0 -NtUserCtxDisplayIOCtl 3 -NtGdiEngAssociateSurface 3 -NtGdiEngCreateBitmap 6 -NtGdiEngCreateDeviceSurface 4 -NtGdiEngCreateDeviceBitmap 4 -NtGdiEngCreatePalette 6 -NtGdiEngComputeGlyphSet 3 -NtGdiEngCopyBits 6 -NtGdiEngDeletePalette 1 -NtGdiEngDeleteSurface 1 -NtGdiEngEraseSurface 3 -NtGdiEngUnlockSurface 1 -NtGdiEngLockSurface 1 -NtGdiEngBitBlt 11 -NtGdiEngStretchBlt 11 -NtGdiEngPlgBlt 11 -NtGdiEngMarkBandingSurface 1 -NtGdiEngStrokePath 8 -NtGdiEngFillPath 7 -NtGdiEngStrokeAndFillPath 10 -NtGdiEngPaint 5 -NtGdiEngLineTo 9 -NtGdiEngAlphaBlend 7 -NtGdiEngGradientFill 10 -NtGdiEngTransparentBlt 8 -NtGdiEngTextOut 10 -NtGdiEngStretchBltROP 13 -NtGdiXLATEOBJ_cGetPalette 4 -NtGdiXLATEOBJ_iXlate 2 -NtGdiXLATEOBJ_hGetColorTransform 1 -NtGdiCLIPOBJ_bEnum 3 -NtGdiCLIPOBJ_cEnumStart 5 -NtGdiCLIPOBJ_ppoGetPath 1 -NtGdiEngDeletePath 1 -NtGdiEngCreateClip 0 -NtGdiEngDeleteClip 1 -NtGdiBRUSHOBJ_ulGetBrushColor 1 -NtGdiBRUSHOBJ_pvAllocRbrush 2 -NtGdiBRUSHOBJ_pvGetRbrush 1 -NtGdiBRUSHOBJ_hGetColorTransform 1 -NtGdiXFORMOBJ_bApplyXform 5 -NtGdiXFORMOBJ_iGetXform 2 -NtGdiFONTOBJ_vGetInfo 3 -NtGdiFONTOBJ_pxoGetXform 1 -NtGdiFONTOBJ_cGetGlyphs 5 -NtGdiFONTOBJ_pifi 1 -NtGdiFONTOBJ_pfdg 1 -NtGdiFONTOBJ_pQueryGlyphAttrs 2 -NtGdiFONTOBJ_pvTrueTypeFontFile 2 -NtGdiFONTOBJ_cGetAllGlyphHandles 2 -NtGdiSTROBJ_bEnum 3 -NtGdiSTROBJ_bEnumPositionsOnly 3 -NtGdiSTROBJ_bGetAdvanceWidths 4 -NtGdiSTROBJ_vEnumStart 1 -NtGdiSTROBJ_dwGetCodePage 1 -NtGdiPATHOBJ_vGetBounds 2 -NtGdiPATHOBJ_bEnum 2 -NtGdiPATHOBJ_vEnumStart 1 -NtGdiPATHOBJ_vEnumStartClipLines 4 -NtGdiPATHOBJ_bEnumClipLines 3 -NtGdiGetDhpdev 1 -NtGdiEngCheckAbort 1 -NtGdiHT_Get8BPPFormatPalette 4 -NtGdiHT_Get8BPPMaskPalette 6 -NtGdiUpdateTransform 1 -NtUserValidateTimerCallback 3 diff --git a/rostests/apitests/w32kdll/w32kdll_2ksp4/w32kdll_2ksp4.S b/rostests/apitests/w32kdll/w32kdll_2ksp4/w32kdll_2ksp4.S deleted file mode 100644 index 974ff626e5b..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_2ksp4/w32kdll_2ksp4.S +++ /dev/null @@ -1,4483 +0,0 @@ -/* FILE: System Call Stubs for Native API for Win 2000 SP4 - * COPYRIGHT: See COPYING in the top level directory - */ - -.global _NtGdiAbortDoc@4 -_NtGdiAbortDoc@4: - movl $0x1000, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiAbortPath@4 -_NtGdiAbortPath@4: - movl $0x1001, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiAddFontResourceW@24 -_NtGdiAddFontResourceW@24: - movl $0x1002, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtGdiAddRemoteFontToDC@16 -_NtGdiAddRemoteFontToDC@16: - movl $0x1003, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiAddFontMemResourceEx@20 -_NtGdiAddFontMemResourceEx@20: - movl $0x1004, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiRemoveMergeFont@8 -_NtGdiRemoveMergeFont@8: - movl $0x1005, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiAddRemoteMMInstanceToDC@12 -_NtGdiAddRemoteMMInstanceToDC@12: - movl $0x1006, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiAlphaBlend@48 -_NtGdiAlphaBlend@48: - movl $0x1007, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x30 - -.global _NtGdiAngleArc@24 -_NtGdiAngleArc@24: - movl $0x1008, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtGdiAnyLinkedFonts@0 -_NtGdiAnyLinkedFonts@0: - movl $0x1009, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x0 - -.global _NtGdiFontIsLinked@4 -_NtGdiFontIsLinked@4: - movl $0x100a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiArcInternal@40 -_NtGdiArcInternal@40: - movl $0x100b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x28 - -.global _NtGdiBeginPath@4 -_NtGdiBeginPath@4: - movl $0x100c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiBitBlt@44 -_NtGdiBitBlt@44: - movl $0x100d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x2c - -.global _NtGdiCancelDC@4 -_NtGdiCancelDC@4: - movl $0x100e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiCheckBitmapBits@32 -_NtGdiCheckBitmapBits@32: - movl $0x100f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x20 - -.global _NtGdiCloseFigure@4 -_NtGdiCloseFigure@4: - movl $0x1010, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiColorCorrectPalette@24 -_NtGdiColorCorrectPalette@24: - movl $0x1011, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtGdiCombineRgn@16 -_NtGdiCombineRgn@16: - movl $0x1012, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiCombineTransform@12 -_NtGdiCombineTransform@12: - movl $0x1013, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiComputeXformCoefficients@4 -_NtGdiComputeXformCoefficients@4: - movl $0x1014, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiConsoleTextOut@16 -_NtGdiConsoleTextOut@16: - movl $0x1015, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiConvertMetafileRect@8 -_NtGdiConvertMetafileRect@8: - movl $0x1016, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiCreateBitmap@20 -_NtGdiCreateBitmap@20: - movl $0x1017, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiCreateClientObj@4 -_NtGdiCreateClientObj@4: - movl $0x1018, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiCreateColorSpace@4 -_NtGdiCreateColorSpace@4: - movl $0x1019, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiCreateColorTransform@32 -_NtGdiCreateColorTransform@32: - movl $0x101a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x20 - -.global _NtGdiCreateCompatibleBitmap@12 -_NtGdiCreateCompatibleBitmap@12: - movl $0x101b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiCreateCompatibleDC@4 -_NtGdiCreateCompatibleDC@4: - movl $0x101c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiCreateDIBBrush@24 -_NtGdiCreateDIBBrush@24: - movl $0x101d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtGdiCreateDIBitmapInternal@44 -_NtGdiCreateDIBitmapInternal@44: - movl $0x101e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x2c - -.global _NtGdiCreateDIBSection@36 -_NtGdiCreateDIBSection@36: - movl $0x101f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x24 - -.global _NtGdiCreateEllipticRgn@16 -_NtGdiCreateEllipticRgn@16: - movl $0x1020, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiCreateHalftonePalette@4 -_NtGdiCreateHalftonePalette@4: - movl $0x1021, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiCreateHatchBrushInternal@12 -_NtGdiCreateHatchBrushInternal@12: - movl $0x1022, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiCreateMetafileDC@4 -_NtGdiCreateMetafileDC@4: - movl $0x1023, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiCreatePaletteInternal@8 -_NtGdiCreatePaletteInternal@8: - movl $0x1024, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiCreatePatternBrushInternal@12 -_NtGdiCreatePatternBrushInternal@12: - movl $0x1025, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiCreatePen@16 -_NtGdiCreatePen@16: - movl $0x1026, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiCreateRectRgn@16 -_NtGdiCreateRectRgn@16: - movl $0x1027, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiCreateRoundRectRgn@24 -_NtGdiCreateRoundRectRgn@24: - movl $0x1028, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtGdiCreateServerMetaFile@24 -_NtGdiCreateServerMetaFile@24: - movl $0x1029, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtGdiCreateSolidBrush@8 -_NtGdiCreateSolidBrush@8: - movl $0x102a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiD3dContextCreate@16 -_NtGdiD3dContextCreate@16: - movl $0x102b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiD3dContextDestroy@4 -_NtGdiD3dContextDestroy@4: - movl $0x102c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiD3dContextDestroyAll@4 -_NtGdiD3dContextDestroyAll@4: - movl $0x102d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiD3dValidateTextureStageState@4 -_NtGdiD3dValidateTextureStageState@4: - movl $0x102e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiD3dDrawPrimitives2@28 -_NtGdiD3dDrawPrimitives2@28: - movl $0x102f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x1c - -.global _NtGdiDdGetDriverState@4 -_NtGdiDdGetDriverState@4: - movl $0x1030, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiDdAddAttachedSurface@12 -_NtGdiDdAddAttachedSurface@12: - movl $0x1031, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiDdAlphaBlt@12 -_NtGdiDdAlphaBlt@12: - movl $0x1032, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiDdAttachSurface@8 -_NtGdiDdAttachSurface@8: - movl $0x1033, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdBeginMoCompFrame@8 -_NtGdiDdBeginMoCompFrame@8: - movl $0x1034, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdBlt@12 -_NtGdiDdBlt@12: - movl $0x1035, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiDdCanCreateSurface@8 -_NtGdiDdCanCreateSurface@8: - movl $0x1036, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdCanCreateD3DBuffer@8 -_NtGdiDdCanCreateD3DBuffer@8: - movl $0x1037, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdColorControl@8 -_NtGdiDdColorControl@8: - movl $0x1038, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdCreateDirectDrawObject@4 -_NtGdiDdCreateDirectDrawObject@4: - movl $0x1039, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiDdCreateSurface@32 -_NtGdiDdCreateSurface@32: - movl $0x103a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x20 - -.global _NtGdiDdCreateD3DBuffer@32 -_NtGdiDdCreateD3DBuffer@32: - movl $0x103b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x20 - -.global _NtGdiDdCreateMoComp@8 -_NtGdiDdCreateMoComp@8: - movl $0x103c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdCreateSurfaceObject@24 -_NtGdiDdCreateSurfaceObject@24: - movl $0x103d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtGdiDdDeleteDirectDrawObject@4 -_NtGdiDdDeleteDirectDrawObject@4: - movl $0x103e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiDdDeleteSurfaceObject@4 -_NtGdiDdDeleteSurfaceObject@4: - movl $0x103f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiDdDestroyMoComp@8 -_NtGdiDdDestroyMoComp@8: - movl $0x1040, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdDestroySurface@8 -_NtGdiDdDestroySurface@8: - movl $0x1041, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdDestroyD3DBuffer@4 -_NtGdiDdDestroyD3DBuffer@4: - movl $0x1042, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiDdEndMoCompFrame@8 -_NtGdiDdEndMoCompFrame@8: - movl $0x1043, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdFlip@20 -_NtGdiDdFlip@20: - movl $0x1044, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiDdFlipToGDISurface@8 -_NtGdiDdFlipToGDISurface@8: - movl $0x1045, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdGetAvailDriverMemory@8 -_NtGdiDdGetAvailDriverMemory@8: - movl $0x1046, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdGetBltStatus@8 -_NtGdiDdGetBltStatus@8: - movl $0x1047, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdGetDC@8 -_NtGdiDdGetDC@8: - movl $0x1048, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdGetDriverInfo@8 -_NtGdiDdGetDriverInfo@8: - movl $0x1049, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdGetDxHandle@12 -_NtGdiDdGetDxHandle@12: - movl $0x104a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiDdGetFlipStatus@8 -_NtGdiDdGetFlipStatus@8: - movl $0x104b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdGetInternalMoCompInfo@8 -_NtGdiDdGetInternalMoCompInfo@8: - movl $0x104c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdGetMoCompBuffInfo@8 -_NtGdiDdGetMoCompBuffInfo@8: - movl $0x104d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdGetMoCompGuids@8 -_NtGdiDdGetMoCompGuids@8: - movl $0x104e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdGetMoCompFormats@8 -_NtGdiDdGetMoCompFormats@8: - movl $0x104f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdGetScanLine@8 -_NtGdiDdGetScanLine@8: - movl $0x1050, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdLock@12 -_NtGdiDdLock@12: - movl $0x1051, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiDdLockD3D@8 -_NtGdiDdLockD3D@8: - movl $0x1052, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdQueryDirectDrawObject@44 -_NtGdiDdQueryDirectDrawObject@44: - movl $0x1053, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x2c - -.global _NtGdiDdQueryMoCompStatus@8 -_NtGdiDdQueryMoCompStatus@8: - movl $0x1054, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdReenableDirectDrawObject@8 -_NtGdiDdReenableDirectDrawObject@8: - movl $0x1055, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdReleaseDC@4 -_NtGdiDdReleaseDC@4: - movl $0x1056, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiDdRenderMoComp@8 -_NtGdiDdRenderMoComp@8: - movl $0x1057, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdResetVisrgn@8 -_NtGdiDdResetVisrgn@8: - movl $0x1058, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdSetColorKey@8 -_NtGdiDdSetColorKey@8: - movl $0x1059, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdSetExclusiveMode@8 -_NtGdiDdSetExclusiveMode@8: - movl $0x105a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdSetGammaRamp@12 -_NtGdiDdSetGammaRamp@12: - movl $0x105b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiDdCreateSurfaceEx@12 -_NtGdiDdCreateSurfaceEx@12: - movl $0x105c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiDdSetOverlayPosition@12 -_NtGdiDdSetOverlayPosition@12: - movl $0x105d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiDdUnattachSurface@8 -_NtGdiDdUnattachSurface@8: - movl $0x105e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdUnlock@8 -_NtGdiDdUnlock@8: - movl $0x105f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdUnlockD3D@8 -_NtGdiDdUnlockD3D@8: - movl $0x1060, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDdUpdateOverlay@12 -_NtGdiDdUpdateOverlay@12: - movl $0x1061, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiDdWaitForVerticalBlank@8 -_NtGdiDdWaitForVerticalBlank@8: - movl $0x1062, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDvpCanCreateVideoPort@8 -_NtGdiDvpCanCreateVideoPort@8: - movl $0x1063, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDvpColorControl@8 -_NtGdiDvpColorControl@8: - movl $0x1064, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDvpCreateVideoPort@8 -_NtGdiDvpCreateVideoPort@8: - movl $0x1065, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDvpDestroyVideoPort@8 -_NtGdiDvpDestroyVideoPort@8: - movl $0x1066, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDvpFlipVideoPort@16 -_NtGdiDvpFlipVideoPort@16: - movl $0x1067, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiDvpGetVideoPortBandwidth@8 -_NtGdiDvpGetVideoPortBandwidth@8: - movl $0x1068, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDvpGetVideoPortField@8 -_NtGdiDvpGetVideoPortField@8: - movl $0x1069, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDvpGetVideoPortFlipStatus@8 -_NtGdiDvpGetVideoPortFlipStatus@8: - movl $0x106a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDvpGetVideoPortInputFormats@8 -_NtGdiDvpGetVideoPortInputFormats@8: - movl $0x106b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDvpGetVideoPortLine@8 -_NtGdiDvpGetVideoPortLine@8: - movl $0x106c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDvpGetVideoPortOutputFormats@8 -_NtGdiDvpGetVideoPortOutputFormats@8: - movl $0x106d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDvpGetVideoPortConnectInfo@8 -_NtGdiDvpGetVideoPortConnectInfo@8: - movl $0x106e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDvpGetVideoSignalStatus@8 -_NtGdiDvpGetVideoSignalStatus@8: - movl $0x106f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDvpUpdateVideoPort@16 -_NtGdiDvpUpdateVideoPort@16: - movl $0x1070, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiDvpWaitForVideoPortSync@8 -_NtGdiDvpWaitForVideoPortSync@8: - movl $0x1071, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDeleteClientObj@4 -_NtGdiDeleteClientObj@4: - movl $0x1072, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiDeleteColorSpace@4 -_NtGdiDeleteColorSpace@4: - movl $0x1073, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiDeleteColorTransform@8 -_NtGdiDeleteColorTransform@8: - movl $0x1074, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDeleteObjectApp@4 -_NtGdiDeleteObjectApp@4: - movl $0x1075, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiDescribePixelFormat@16 -_NtGdiDescribePixelFormat@16: - movl $0x1076, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiGetPerBandInfo@8 -_NtGdiGetPerBandInfo@8: - movl $0x1077, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiDoBanding@16 -_NtGdiDoBanding@16: - movl $0x1078, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiDoPalette@24 -_NtGdiDoPalette@24: - movl $0x1079, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtGdiDrawEscape@16 -_NtGdiDrawEscape@16: - movl $0x107a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiEllipse@20 -_NtGdiEllipse@20: - movl $0x107b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiEnableEudc@4 -_NtGdiEnableEudc@4: - movl $0x107c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiEndDoc@4 -_NtGdiEndDoc@4: - movl $0x107d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiEndPage@4 -_NtGdiEndPage@4: - movl $0x107e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiEndPath@4 -_NtGdiEndPath@4: - movl $0x107f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiEnumFontChunk@20 -_NtGdiEnumFontChunk@20: - movl $0x1080, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiEnumFontClose@4 -_NtGdiEnumFontClose@4: - movl $0x1081, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiEnumFontOpen@28 -_NtGdiEnumFontOpen@28: - movl $0x1082, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x1c - -.global _NtGdiEnumObjects@16 -_NtGdiEnumObjects@16: - movl $0x1083, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiEqualRgn@8 -_NtGdiEqualRgn@8: - movl $0x1084, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiEudcEnumFaceNameLinkW@16 -_NtGdiEudcEnumFaceNameLinkW@16: - movl $0x1085, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiEudcLoadUnloadLink@28 -_NtGdiEudcLoadUnloadLink@28: - movl $0x1086, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x1c - -.global _NtGdiExcludeClipRect@20 -_NtGdiExcludeClipRect@20: - movl $0x1087, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiExtCreatePen@44 -_NtGdiExtCreatePen@44: - movl $0x1088, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x2c - -.global _NtGdiExtCreateRegion@12 -_NtGdiExtCreateRegion@12: - movl $0x1089, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiExtEscape@32 -_NtGdiExtEscape@32: - movl $0x108a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x20 - -.global _NtGdiExtFloodFill@20 -_NtGdiExtFloodFill@20: - movl $0x108b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiExtGetObjectW@12 -_NtGdiExtGetObjectW@12: - movl $0x108c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiExtSelectClipRgn@12 -_NtGdiExtSelectClipRgn@12: - movl $0x108d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiExtTextOutW@36 -_NtGdiExtTextOutW@36: - movl $0x108e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x24 - -.global _NtGdiFillPath@4 -_NtGdiFillPath@4: - movl $0x108f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiFillRgn@12 -_NtGdiFillRgn@12: - movl $0x1090, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiFlattenPath@4 -_NtGdiFlattenPath@4: - movl $0x1091, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiFlushUserBatch@0 -_NtGdiFlushUserBatch@0: - movl $0x1092, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x0 - -.global _NtGdiFlush@0 -_NtGdiFlush@0: - movl $0x1093, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x0 - -.global _NtGdiForceUFIMapping@8 -_NtGdiForceUFIMapping@8: - movl $0x1094, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiFrameRgn@20 -_NtGdiFrameRgn@20: - movl $0x1095, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiFullscreenControl@20 -_NtGdiFullscreenControl@20: - movl $0x1096, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiGetAndSetDCDword@16 -_NtGdiGetAndSetDCDword@16: - movl $0x1097, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiGetAppClipBox@8 -_NtGdiGetAppClipBox@8: - movl $0x1098, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiGetBitmapBits@12 -_NtGdiGetBitmapBits@12: - movl $0x1099, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiGetBitmapDimension@8 -_NtGdiGetBitmapDimension@8: - movl $0x109a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiGetBoundsRect@12 -_NtGdiGetBoundsRect@12: - movl $0x109b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiGetCharABCWidthsW@24 -_NtGdiGetCharABCWidthsW@24: - movl $0x109c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtGdiGetCharacterPlacementW@24 -_NtGdiGetCharacterPlacementW@24: - movl $0x109d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtGdiGetCharSet@4 -_NtGdiGetCharSet@4: - movl $0x109e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiGetCharWidthW@24 -_NtGdiGetCharWidthW@24: - movl $0x109f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtGdiGetCharWidthInfo@8 -_NtGdiGetCharWidthInfo@8: - movl $0x10a0, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiGetColorAdjustment@8 -_NtGdiGetColorAdjustment@8: - movl $0x10a1, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiGetColorSpaceforBitmap@4 -_NtGdiGetColorSpaceforBitmap@4: - movl $0x10a2, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiGetDCDword@12 -_NtGdiGetDCDword@12: - movl $0x10a3, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiGetDCforBitmap@4 -_NtGdiGetDCforBitmap@4: - movl $0x10a4, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiGetDCObject@8 -_NtGdiGetDCObject@8: - movl $0x10a5, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiGetDCPoint@12 -_NtGdiGetDCPoint@12: - movl $0x10a6, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiGetDeviceCaps@8 -_NtGdiGetDeviceCaps@8: - movl $0x10a7, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiGetDeviceGammaRamp@8 -_NtGdiGetDeviceGammaRamp@8: - movl $0x10a8, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiGetDeviceCapsAll@8 -_NtGdiGetDeviceCapsAll@8: - movl $0x10a9, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiGetDIBitsInternal@36 -_NtGdiGetDIBitsInternal@36: - movl $0x10aa, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x24 - -.global _NtGdiGetETM@8 -_NtGdiGetETM@8: - movl $0x10ab, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiGetEudcTimeStampEx@12 -_NtGdiGetEudcTimeStampEx@12: - movl $0x10ac, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiGetFontData@20 -_NtGdiGetFontData@20: - movl $0x10ad, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiGetFontResourceInfoInternalW@28 -_NtGdiGetFontResourceInfoInternalW@28: - movl $0x10ae, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x1c - -.global _NtGdiGetGlyphIndicesW@20 -_NtGdiGetGlyphIndicesW@20: - movl $0x10af, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiGetGlyphIndicesWInternal@24 -_NtGdiGetGlyphIndicesWInternal@24: - movl $0x10b0, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtGdiGetGlyphOutline@32 -_NtGdiGetGlyphOutline@32: - movl $0x10b1, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x20 - -.global _NtGdiGetKerningPairs@12 -_NtGdiGetKerningPairs@12: - movl $0x10b2, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiGetLinkedUFIs@12 -_NtGdiGetLinkedUFIs@12: - movl $0x10b3, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiGetMiterLimit@8 -_NtGdiGetMiterLimit@8: - movl $0x10b4, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiGetMonitorID@12 -_NtGdiGetMonitorID@12: - movl $0x10b5, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiGetNearestColor@8 -_NtGdiGetNearestColor@8: - movl $0x10b6, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiGetNearestPaletteIndex@8 -_NtGdiGetNearestPaletteIndex@8: - movl $0x10b7, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiGetObjectBitmapHandle@8 -_NtGdiGetObjectBitmapHandle@8: - movl $0x10b8, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiGetOutlineTextMetricsInternalW@16 -_NtGdiGetOutlineTextMetricsInternalW@16: - movl $0x10b9, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiGetPath@16 -_NtGdiGetPath@16: - movl $0x10ba, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiGetPixel@12 -_NtGdiGetPixel@12: - movl $0x10bb, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiGetRandomRgn@12 -_NtGdiGetRandomRgn@12: - movl $0x10bc, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiGetRasterizerCaps@8 -_NtGdiGetRasterizerCaps@8: - movl $0x10bd, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiGetRealizationInfo@8 -_NtGdiGetRealizationInfo@8: - movl $0x10be, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiGetRegionData@12 -_NtGdiGetRegionData@12: - movl $0x10bf, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiGetRgnBox@8 -_NtGdiGetRgnBox@8: - movl $0x10c0, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiGetServerMetaFileBits@28 -_NtGdiGetServerMetaFileBits@28: - movl $0x10c1, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x1c - -.global _NtGdiGetSpoolMessage@16 -_NtGdiGetSpoolMessage@16: - movl $0x10c2, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiGetStats@20 -_NtGdiGetStats@20: - movl $0x10c3, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiGetStockObject@4 -_NtGdiGetStockObject@4: - movl $0x10c4, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiGetStringBitmapW@20 -_NtGdiGetStringBitmapW@20: - movl $0x10c5, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiGetSystemPaletteUse@4 -_NtGdiGetSystemPaletteUse@4: - movl $0x10c6, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiGetTextCharsetInfo@12 -_NtGdiGetTextCharsetInfo@12: - movl $0x10c7, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiGetTextExtent@20 -_NtGdiGetTextExtent@20: - movl $0x10c8, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiGetTextExtentExW@32 -_NtGdiGetTextExtentExW@32: - movl $0x10c9, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x20 - -.global _NtGdiGetTextFaceW@16 -_NtGdiGetTextFaceW@16: - movl $0x10ca, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiGetTextMetricsW@12 -_NtGdiGetTextMetricsW@12: - movl $0x10cb, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiGetTransform@12 -_NtGdiGetTransform@12: - movl $0x10cc, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiGetUFI@24 -_NtGdiGetUFI@24: - movl $0x10cd, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtGdiGetUFIPathname@40 -_NtGdiGetUFIPathname@40: - movl $0x10ce, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x28 - -.global _NtGdiGetFontUnicodeRanges@8 -_NtGdiGetFontUnicodeRanges@8: - movl $0x10cf, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiGetWidthTable@28 -_NtGdiGetWidthTable@28: - movl $0x10d0, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x1c - -.global _NtGdiGradientFill@24 -_NtGdiGradientFill@24: - movl $0x10d1, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtGdiHfontCreate@20 -_NtGdiHfontCreate@20: - movl $0x10d2, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiIcmBrushInfo@32 -_NtGdiIcmBrushInfo@32: - movl $0x10d3, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x20 - -.global _NtGdiInit@0 -_NtGdiInit@0: - movl $0x10d4, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x0 - -.global _NtGdiInitSpool@0 -_NtGdiInitSpool@0: - movl $0x10d5, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x0 - -.global _NtGdiIntersectClipRect@20 -_NtGdiIntersectClipRect@20: - movl $0x10d6, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiInvertRgn@8 -_NtGdiInvertRgn@8: - movl $0x10d7, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiLineTo@12 -_NtGdiLineTo@12: - movl $0x10d8, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiMakeFontDir@20 -_NtGdiMakeFontDir@20: - movl $0x10d9, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiMakeInfoDC@8 -_NtGdiMakeInfoDC@8: - movl $0x10da, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiMaskBlt@52 -_NtGdiMaskBlt@52: - movl $0x10db, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x34 - -.global _NtGdiModifyWorldTransform@12 -_NtGdiModifyWorldTransform@12: - movl $0x10dc, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiMonoBitmap@4 -_NtGdiMonoBitmap@4: - movl $0x10dd, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiMoveTo@16 -_NtGdiMoveTo@16: - movl $0x10de, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiOffsetClipRgn@12 -_NtGdiOffsetClipRgn@12: - movl $0x10df, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiOffsetRgn@12 -_NtGdiOffsetRgn@12: - movl $0x10e0, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiOpenDCW@28 -_NtGdiOpenDCW@28: - movl $0x10e1, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x1c - -.global _NtGdiPatBlt@24 -_NtGdiPatBlt@24: - movl $0x10e2, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtGdiPolyPatBlt@20 -_NtGdiPolyPatBlt@20: - movl $0x10e3, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiPathToRegion@4 -_NtGdiPathToRegion@4: - movl $0x10e4, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiPlgBlt@44 -_NtGdiPlgBlt@44: - movl $0x10e5, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x2c - -.global _NtGdiPolyDraw@16 -_NtGdiPolyDraw@16: - movl $0x10e6, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiPolyPolyDraw@20 -_NtGdiPolyPolyDraw@20: - movl $0x10e7, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiPolyTextOutW@16 -_NtGdiPolyTextOutW@16: - movl $0x10e8, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiPtInRegion@12 -_NtGdiPtInRegion@12: - movl $0x10e9, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiPtVisible@12 -_NtGdiPtVisible@12: - movl $0x10ea, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiQueryFonts@12 -_NtGdiQueryFonts@12: - movl $0x10eb, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiQueryFontAssocInfo@4 -_NtGdiQueryFontAssocInfo@4: - movl $0x10ec, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiRectangle@20 -_NtGdiRectangle@20: - movl $0x10ed, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiRectInRegion@8 -_NtGdiRectInRegion@8: - movl $0x10ee, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiRectVisible@8 -_NtGdiRectVisible@8: - movl $0x10ef, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiRemoveFontResourceW@24 -_NtGdiRemoveFontResourceW@24: - movl $0x10f0, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtGdiRemoveFontMemResourceEx@4 -_NtGdiRemoveFontMemResourceEx@4: - movl $0x10f1, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiResetDC@20 -_NtGdiResetDC@20: - movl $0x10f2, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiResizePalette@8 -_NtGdiResizePalette@8: - movl $0x10f3, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiRestoreDC@8 -_NtGdiRestoreDC@8: - movl $0x10f4, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiRoundRect@28 -_NtGdiRoundRect@28: - movl $0x10f5, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x1c - -.global _NtGdiSaveDC@4 -_NtGdiSaveDC@4: - movl $0x10f6, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiScaleViewportExtEx@24 -_NtGdiScaleViewportExtEx@24: - movl $0x10f7, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtGdiScaleWindowExtEx@24 -_NtGdiScaleWindowExtEx@24: - movl $0x10f8, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtGdiSelectBitmap@8 -_NtGdiSelectBitmap@8: - movl $0x10f9, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiSelectBrush@8 -_NtGdiSelectBrush@8: - movl $0x10fa, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiSelectClipPath@8 -_NtGdiSelectClipPath@8: - movl $0x10fb, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiSelectFont@8 -_NtGdiSelectFont@8: - movl $0x10fc, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiSelectPen@8 -_NtGdiSelectPen@8: - movl $0x10fd, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiSetBitmapBits@12 -_NtGdiSetBitmapBits@12: - movl $0x10fe, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiSetBitmapDimension@16 -_NtGdiSetBitmapDimension@16: - movl $0x10ff, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiSetBoundsRect@12 -_NtGdiSetBoundsRect@12: - movl $0x1100, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiSetBrushOrg@16 -_NtGdiSetBrushOrg@16: - movl $0x1101, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiSetColorAdjustment@8 -_NtGdiSetColorAdjustment@8: - movl $0x1102, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiSetColorSpace@8 -_NtGdiSetColorSpace@8: - movl $0x1103, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiSetDeviceGammaRamp@8 -_NtGdiSetDeviceGammaRamp@8: - movl $0x1104, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiSetDIBitsToDeviceInternal@64 -_NtGdiSetDIBitsToDeviceInternal@64: - movl $0x1105, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x40 - -.global _NtGdiSetFontEnumeration@4 -_NtGdiSetFontEnumeration@4: - movl $0x1106, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiSetFontXform@12 -_NtGdiSetFontXform@12: - movl $0x1107, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiSetIcmMode@12 -_NtGdiSetIcmMode@12: - movl $0x1108, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiSetLinkedUFIs@12 -_NtGdiSetLinkedUFIs@12: - movl $0x1109, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiSetMagicColors@12 -_NtGdiSetMagicColors@12: - movl $0x110a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiSetMetaRgn@4 -_NtGdiSetMetaRgn@4: - movl $0x110b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiSetMiterLimit@12 -_NtGdiSetMiterLimit@12: - movl $0x110c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiGetDeviceWidth@4 -_NtGdiGetDeviceWidth@4: - movl $0x110d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiMirrorWindowOrg@4 -_NtGdiMirrorWindowOrg@4: - movl $0x110e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiSetLayout@12 -_NtGdiSetLayout@12: - movl $0x110f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiSetPixel@16 -_NtGdiSetPixel@16: - movl $0x1110, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiSetPixelFormat@8 -_NtGdiSetPixelFormat@8: - movl $0x1111, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiSetRectRgn@20 -_NtGdiSetRectRgn@20: - movl $0x1112, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiSetSystemPaletteUse@8 -_NtGdiSetSystemPaletteUse@8: - movl $0x1113, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiSetTextJustification@12 -_NtGdiSetTextJustification@12: - movl $0x1114, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiSetupPublicCFONT@12 -_NtGdiSetupPublicCFONT@12: - movl $0x1115, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiSetVirtualResolution@20 -_NtGdiSetVirtualResolution@20: - movl $0x1116, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiSetSizeDevice@12 -_NtGdiSetSizeDevice@12: - movl $0x1117, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiStartDoc@16 -_NtGdiStartDoc@16: - movl $0x1118, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiStartPage@4 -_NtGdiStartPage@4: - movl $0x1119, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiStretchBlt@48 -_NtGdiStretchBlt@48: - movl $0x111a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x30 - -.global _NtGdiStretchDIBitsInternal@64 -_NtGdiStretchDIBitsInternal@64: - movl $0x111b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x40 - -.global _NtGdiStrokeAndFillPath@4 -_NtGdiStrokeAndFillPath@4: - movl $0x111c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiStrokePath@4 -_NtGdiStrokePath@4: - movl $0x111d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiSwapBuffers@4 -_NtGdiSwapBuffers@4: - movl $0x111e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiTransformPoints@20 -_NtGdiTransformPoints@20: - movl $0x111f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiTransparentBlt@44 -_NtGdiTransparentBlt@44: - movl $0x1120, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x2c - -.global _NtGdiUnloadPrinterDriver@8 -_NtGdiUnloadPrinterDriver@8: - movl $0x1121, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiUnmapMemFont@4 -_NtGdiUnmapMemFont@4: - movl $0x1122, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiUnrealizeObject@4 -_NtGdiUnrealizeObject@4: - movl $0x1123, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiUpdateColors@4 -_NtGdiUpdateColors@4: - movl $0x1124, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiWidenPath@4 -_NtGdiWidenPath@4: - movl $0x1125, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserActivateKeyboardLayout@8 -_NtUserActivateKeyboardLayout@8: - movl $0x1126, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserAlterWindowStyle@12 -_NtUserAlterWindowStyle@12: - movl $0x1127, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserAssociateInputContext@12 -_NtUserAssociateInputContext@12: - movl $0x1128, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserAttachThreadInput@12 -_NtUserAttachThreadInput@12: - movl $0x1129, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserBeginPaint@8 -_NtUserBeginPaint@8: - movl $0x112a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserBitBltSysBmp@32 -_NtUserBitBltSysBmp@32: - movl $0x112b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x20 - -.global _NtUserBlockInput@4 -_NtUserBlockInput@4: - movl $0x112c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserBuildHimcList@16 -_NtUserBuildHimcList@16: - movl $0x112d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserBuildHwndList@28 -_NtUserBuildHwndList@28: - movl $0x112e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x1c - -.global _NtUserBuildNameList@16 -_NtUserBuildNameList@16: - movl $0x112f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserBuildPropList@16 -_NtUserBuildPropList@16: - movl $0x1130, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserCallHwnd@8 -_NtUserCallHwnd@8: - movl $0x1131, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserCallHwndLock@8 -_NtUserCallHwndLock@8: - movl $0x1132, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserCallHwndOpt@8 -_NtUserCallHwndOpt@8: - movl $0x1133, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserCallHwndParam@12 -_NtUserCallHwndParam@12: - movl $0x1134, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserCallHwndParamLock@12 -_NtUserCallHwndParamLock@12: - movl $0x1135, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserCallMsgFilter@8 -_NtUserCallMsgFilter@8: - movl $0x1136, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserCallNextHookEx@16 -_NtUserCallNextHookEx@16: - movl $0x1137, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserCallNoParam@4 -_NtUserCallNoParam@4: - movl $0x1138, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserCallOneParam@4 -_NtUserCallOneParam@4: - movl $0x1139, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserCallTwoParam@12 -_NtUserCallTwoParam@12: - movl $0x113a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserChangeClipboardChain@8 -_NtUserChangeClipboardChain@8: - movl $0x113b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserChangeDisplaySettings@20 -_NtUserChangeDisplaySettings@20: - movl $0x113c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtUserCheckImeHotKey@12 -_NtUserCheckImeHotKey@12: - movl $0x113d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserCheckMenuItem@12 -_NtUserCheckMenuItem@12: - movl $0x113e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserChildWindowFromPointEx@16 -_NtUserChildWindowFromPointEx@16: - movl $0x113f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserClipCursor@4 -_NtUserClipCursor@4: - movl $0x1140, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserCloseClipboard@0 -_NtUserCloseClipboard@0: - movl $0x1141, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x0 - -.global _NtUserCloseDesktop@4 -_NtUserCloseDesktop@4: - movl $0x1142, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserCloseWindowStation@4 -_NtUserCloseWindowStation@4: - movl $0x1143, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserConsoleControl@12 -_NtUserConsoleControl@12: - movl $0x1144, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserConvertMemHandle@8 -_NtUserConvertMemHandle@8: - movl $0x1145, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserCopyAcceleratorTable@12 -_NtUserCopyAcceleratorTable@12: - movl $0x1146, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserCountClipboardFormats@4 -_NtUserCountClipboardFormats@4: - movl $0x1147, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserCreateAcceleratorTable@8 -_NtUserCreateAcceleratorTable@8: - movl $0x1148, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserCreateCaret@16 -_NtUserCreateCaret@16: - movl $0x1149, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserCreateDesktop@20 -_NtUserCreateDesktop@20: - movl $0x114a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtUserCreateInputContext@4 -_NtUserCreateInputContext@4: - movl $0x114b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserCreateLocalMemHandle@16 -_NtUserCreateLocalMemHandle@16: - movl $0x114c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserCreateWindowEx@52 -_NtUserCreateWindowEx@52: - movl $0x114d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x34 - -.global _NtUserCreateWindowStation@24 -_NtUserCreateWindowStation@24: - movl $0x114e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtUserDdeGetQualityOfService@12 -_NtUserDdeGetQualityOfService@12: - movl $0x114f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserDdeInitialize@20 -_NtUserDdeInitialize@20: - movl $0x1150, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtUserDdeSetQualityOfService@12 -_NtUserDdeSetQualityOfService@12: - movl $0x1151, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserDeferWindowPos@32 -_NtUserDeferWindowPos@32: - movl $0x1152, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x20 - -.global _NtUserDefSetText@8 -_NtUserDefSetText@8: - movl $0x1153, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserDeleteMenu@12 -_NtUserDeleteMenu@12: - movl $0x1154, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserDestroyAcceleratorTable@4 -_NtUserDestroyAcceleratorTable@4: - movl $0x1155, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserDestroyCursor@8 -_NtUserDestroyCursor@8: - movl $0x1156, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserDestroyInputContext@4 -_NtUserDestroyInputContext@4: - movl $0x1157, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserDestroyMenu@4 -_NtUserDestroyMenu@4: - movl $0x1158, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserDestroyWindow@4 -_NtUserDestroyWindow@4: - movl $0x1159, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserDisableThreadIme@4 -_NtUserDisableThreadIme@4: - movl $0x115a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserDispatchMessage@4 -_NtUserDispatchMessage@4: - movl $0x115b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserDragDetect@12 -_NtUserDragDetect@12: - movl $0x115c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserDragObject@20 -_NtUserDragObject@20: - movl $0x115d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtUserDrawAnimatedRects@16 -_NtUserDrawAnimatedRects@16: - movl $0x115e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserDrawCaption@16 -_NtUserDrawCaption@16: - movl $0x115f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserDrawCaptionTemp@28 -_NtUserDrawCaptionTemp@28: - movl $0x1160, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x1c - -.global _NtUserDrawIconEx@44 -_NtUserDrawIconEx@44: - movl $0x1161, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x2c - -.global _NtUserDrawMenuBarTemp@20 -_NtUserDrawMenuBarTemp@20: - movl $0x1162, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtUserEmptyClipboard@0 -_NtUserEmptyClipboard@0: - movl $0x1163, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x0 - -.global _NtUserEnableMenuItem@12 -_NtUserEnableMenuItem@12: - movl $0x1164, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserEnableScrollBar@12 -_NtUserEnableScrollBar@12: - movl $0x1165, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserEndDeferWindowPosEx@8 -_NtUserEndDeferWindowPosEx@8: - movl $0x1166, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserEndMenu@0 -_NtUserEndMenu@0: - movl $0x1167, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x0 - -.global _NtUserEndPaint@8 -_NtUserEndPaint@8: - movl $0x1168, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserEnumDisplayDevices@16 -_NtUserEnumDisplayDevices@16: - movl $0x1169, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserEnumDisplayMonitors@16 -_NtUserEnumDisplayMonitors@16: - movl $0x116a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserEnumDisplaySettings@16 -_NtUserEnumDisplaySettings@16: - movl $0x116b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserEvent@4 -_NtUserEvent@4: - movl $0x116c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserExcludeUpdateRgn@8 -_NtUserExcludeUpdateRgn@8: - movl $0x116d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserFillWindow@16 -_NtUserFillWindow@16: - movl $0x116e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserFindExistingCursorIcon@12 -_NtUserFindExistingCursorIcon@12: - movl $0x116f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserFindWindowEx@20 -_NtUserFindWindowEx@20: - movl $0x1170, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtUserFlashWindowEx@4 -_NtUserFlashWindowEx@4: - movl $0x1171, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserGetAltTabInfo@24 -_NtUserGetAltTabInfo@24: - movl $0x1172, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtUserGetAncestor@8 -_NtUserGetAncestor@8: - movl $0x1173, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserGetAppImeLevel@4 -_NtUserGetAppImeLevel@4: - movl $0x1174, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserGetAsyncKeyState@4 -_NtUserGetAsyncKeyState@4: - movl $0x1175, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserGetCaretBlinkTime@0 -_NtUserGetCaretBlinkTime@0: - movl $0x1176, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x0 - -.global _NtUserGetCaretPos@4 -_NtUserGetCaretPos@4: - movl $0x1177, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserGetClassInfo@20 -_NtUserGetClassInfo@20: - movl $0x1178, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtUserGetClassName@12 -_NtUserGetClassName@12: - movl $0x1179, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserGetClipboardData@8 -_NtUserGetClipboardData@8: - movl $0x117a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserGetClipboardFormatName@12 -_NtUserGetClipboardFormatName@12: - movl $0x117b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserGetClipboardOwner@0 -_NtUserGetClipboardOwner@0: - movl $0x117c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x0 - -.global _NtUserGetClipboardSequenceNumber@0 -_NtUserGetClipboardSequenceNumber@0: - movl $0x117d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x0 - -.global _NtUserGetClipboardViewer@0 -_NtUserGetClipboardViewer@0: - movl $0x117e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x0 - -.global _NtUserGetClipCursor@4 -_NtUserGetClipCursor@4: - movl $0x117f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserGetComboBoxInfo@8 -_NtUserGetComboBoxInfo@8: - movl $0x1180, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserGetControlBrush@12 -_NtUserGetControlBrush@12: - movl $0x1181, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserGetControlColor@16 -_NtUserGetControlColor@16: - movl $0x1182, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserGetCPD@12 -_NtUserGetCPD@12: - movl $0x1183, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserGetCursorFrameInfo@16 -_NtUserGetCursorFrameInfo@16: - movl $0x1184, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserGetCursorInfo@4 -_NtUserGetCursorInfo@4: - movl $0x1185, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserGetDC@4 -_NtUserGetDC@4: - movl $0x1186, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserGetDCEx@12 -_NtUserGetDCEx@12: - movl $0x1187, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserGetDoubleClickTime@0 -_NtUserGetDoubleClickTime@0: - movl $0x1188, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x0 - -.global _NtUserGetForegroundWindow@0 -_NtUserGetForegroundWindow@0: - movl $0x1189, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x0 - -.global _NtUserGetGuiResources@8 -_NtUserGetGuiResources@8: - movl $0x118a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserGetGUIThreadInfo@8 -_NtUserGetGUIThreadInfo@8: - movl $0x118b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserGetIconInfo@24 -_NtUserGetIconInfo@24: - movl $0x118c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtUserGetIconSize@16 -_NtUserGetIconSize@16: - movl $0x118d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserGetImeHotKey@16 -_NtUserGetImeHotKey@16: - movl $0x118e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserGetImeInfoEx@8 -_NtUserGetImeInfoEx@8: - movl $0x118f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserGetInternalWindowPos@12 -_NtUserGetInternalWindowPos@12: - movl $0x1190, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserGetKeyboardLayoutList@8 -_NtUserGetKeyboardLayoutList@8: - movl $0x1191, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserGetKeyboardLayoutName@4 -_NtUserGetKeyboardLayoutName@4: - movl $0x1192, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserGetKeyboardState@4 -_NtUserGetKeyboardState@4: - movl $0x1193, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserGetKeyNameText@12 -_NtUserGetKeyNameText@12: - movl $0x1194, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserGetKeyState@4 -_NtUserGetKeyState@4: - movl $0x1195, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserGetListBoxInfo@4 -_NtUserGetListBoxInfo@4: - movl $0x1196, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserGetMenuBarInfo@16 -_NtUserGetMenuBarInfo@16: - movl $0x1197, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserGetMenuIndex@8 -_NtUserGetMenuIndex@8: - movl $0x1198, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserGetMenuItemRect@16 -_NtUserGetMenuItemRect@16: - movl $0x1199, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserGetMessage@16 -_NtUserGetMessage@16: - movl $0x119a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserGetMouseMovePointsEx@20 -_NtUserGetMouseMovePointsEx@20: - movl $0x119b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtUserGetObjectInformation@20 -_NtUserGetObjectInformation@20: - movl $0x119c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtUserGetOpenClipboardWindow@0 -_NtUserGetOpenClipboardWindow@0: - movl $0x119d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x0 - -.global _NtUserGetPriorityClipboardFormat@8 -_NtUserGetPriorityClipboardFormat@8: - movl $0x119e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserGetProcessWindowStation@0 -_NtUserGetProcessWindowStation@0: - movl $0x119f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x0 - -.global _NtUserGetScrollBarInfo@12 -_NtUserGetScrollBarInfo@12: - movl $0x11a0, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserGetSystemMenu@8 -_NtUserGetSystemMenu@8: - movl $0x11a1, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserGetThreadDesktop@8 -_NtUserGetThreadDesktop@8: - movl $0x11a2, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserGetThreadState@4 -_NtUserGetThreadState@4: - movl $0x11a3, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserGetTitleBarInfo@8 -_NtUserGetTitleBarInfo@8: - movl $0x11a4, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserGetUpdateRect@12 -_NtUserGetUpdateRect@12: - movl $0x11a5, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserGetUpdateRgn@12 -_NtUserGetUpdateRgn@12: - movl $0x11a6, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserGetWindowDC@4 -_NtUserGetWindowDC@4: - movl $0x11a7, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserGetWindowPlacement@8 -_NtUserGetWindowPlacement@8: - movl $0x11a8, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserGetWOWClass@8 -_NtUserGetWOWClass@8: - movl $0x11a9, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserHardErrorControl@12 -_NtUserHardErrorControl@12: - movl $0x11aa, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserHideCaret@4 -_NtUserHideCaret@4: - movl $0x11ab, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserHiliteMenuItem@16 -_NtUserHiliteMenuItem@16: - movl $0x11ac, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserImpersonateDdeClientWindow@8 -_NtUserImpersonateDdeClientWindow@8: - movl $0x11ad, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserInitialize@12 -_NtUserInitialize@12: - movl $0x11ae, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserInitializeClientPfnArrays@16 -_NtUserInitializeClientPfnArrays@16: - movl $0x11af, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserInitTask@44 -_NtUserInitTask@44: - movl $0x11b0, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x2c - -.global _NtUserInternalGetWindowText@12 -_NtUserInternalGetWindowText@12: - movl $0x11b1, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserInvalidateRect@12 -_NtUserInvalidateRect@12: - movl $0x11b2, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserInvalidateRgn@12 -_NtUserInvalidateRgn@12: - movl $0x11b3, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserIsClipboardFormatAvailable@4 -_NtUserIsClipboardFormatAvailable@4: - movl $0x11b4, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserKillTimer@8 -_NtUserKillTimer@8: - movl $0x11b5, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserLoadKeyboardLayoutEx@24 -_NtUserLoadKeyboardLayoutEx@24: - movl $0x11b6, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtUserLockWindowStation@4 -_NtUserLockWindowStation@4: - movl $0x11b7, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserLockWindowUpdate@4 -_NtUserLockWindowUpdate@4: - movl $0x11b8, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserLockWorkStation@0 -_NtUserLockWorkStation@0: - movl $0x11b9, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x0 - -.global _NtUserMapVirtualKeyEx@16 -_NtUserMapVirtualKeyEx@16: - movl $0x11ba, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserMenuItemFromPoint@16 -_NtUserMenuItemFromPoint@16: - movl $0x11bb, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserMessageCall@28 -_NtUserMessageCall@28: - movl $0x11bc, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x1c - -.global _NtUserMinMaximize@12 -_NtUserMinMaximize@12: - movl $0x11bd, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserMNDragLeave@4 -_NtUserMNDragLeave@4: - movl $0x11be, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserMNDragOver@8 -_NtUserMNDragOver@8: - movl $0x11bf, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserModifyUserStartupInfoFlags@8 -_NtUserModifyUserStartupInfoFlags@8: - movl $0x11c0, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserMoveWindow@24 -_NtUserMoveWindow@24: - movl $0x11c1, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtUserNotifyIMEStatus@12 -_NtUserNotifyIMEStatus@12: - movl $0x11c2, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserNotifyProcessCreate@16 -_NtUserNotifyProcessCreate@16: - movl $0x11c3, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserNotifyWinEvent@16 -_NtUserNotifyWinEvent@16: - movl $0x11c4, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserOpenClipboard@8 -_NtUserOpenClipboard@8: - movl $0x11c5, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserOpenDesktop@12 -_NtUserOpenDesktop@12: - movl $0x11c6, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserOpenInputDesktop@12 -_NtUserOpenInputDesktop@12: - movl $0x11c7, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserOpenWindowStation@8 -_NtUserOpenWindowStation@8: - movl $0x11c8, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserPaintDesktop@4 -_NtUserPaintDesktop@4: - movl $0x11c9, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserPeekMessage@20 -_NtUserPeekMessage@20: - movl $0x11ca, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtUserPostMessage@16 -_NtUserPostMessage@16: - movl $0x11cb, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserPostThreadMessage@16 -_NtUserPostThreadMessage@16: - movl $0x11cc, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserProcessConnect@12 -_NtUserProcessConnect@12: - movl $0x11cd, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserQueryInformationThread@20 -_NtUserQueryInformationThread@20: - movl $0x11ce, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtUserQueryInputContext@8 -_NtUserQueryInputContext@8: - movl $0x11cf, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserQuerySendMessage@4 -_NtUserQuerySendMessage@4: - movl $0x11d0, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserQueryUserCounters@20 -_NtUserQueryUserCounters@20: - movl $0x11d1, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtUserQueryWindow@8 -_NtUserQueryWindow@8: - movl $0x11d2, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserRealChildWindowFromPoint@12 -_NtUserRealChildWindowFromPoint@12: - movl $0x11d3, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserRedrawWindow@16 -_NtUserRedrawWindow@16: - movl $0x11d4, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserRegisterClassExWOW@24 -_NtUserRegisterClassExWOW@24: - movl $0x11d5, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtUserRegisterHotKey@16 -_NtUserRegisterHotKey@16: - movl $0x11d6, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserRegisterTasklist@4 -_NtUserRegisterTasklist@4: - movl $0x11d7, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserRegisterWindowMessage@4 -_NtUserRegisterWindowMessage@4: - movl $0x11d8, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserRemoveMenu@12 -_NtUserRemoveMenu@12: - movl $0x11d9, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserRemoveProp@8 -_NtUserRemoveProp@8: - movl $0x11da, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserResolveDesktop@16 -_NtUserResolveDesktop@16: - movl $0x11db, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserResolveDesktopForWOW@4 -_NtUserResolveDesktopForWOW@4: - movl $0x11dc, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserSBGetParms@16 -_NtUserSBGetParms@16: - movl $0x11dd, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserScrollDC@28 -_NtUserScrollDC@28: - movl $0x11de, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x1c - -.global _NtUserScrollWindowEx@32 -_NtUserScrollWindowEx@32: - movl $0x11df, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x20 - -.global _NtUserSelectPalette@12 -_NtUserSelectPalette@12: - movl $0x11e0, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserSendInput@12 -_NtUserSendInput@12: - movl $0x11e1, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserSendMessageCallback@24 -_NtUserSendMessageCallback@24: - movl $0x11e2, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtUserSendNotifyMessage@16 -_NtUserSendNotifyMessage@16: - movl $0x11e3, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserSetActiveWindow@4 -_NtUserSetActiveWindow@4: - movl $0x11e4, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserSetAppImeLevel@8 -_NtUserSetAppImeLevel@8: - movl $0x11e5, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserSetCapture@4 -_NtUserSetCapture@4: - movl $0x11e6, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserSetClassLong@16 -_NtUserSetClassLong@16: - movl $0x11e7, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserSetClassWord@12 -_NtUserSetClassWord@12: - movl $0x11e8, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserSetClipboardData@12 -_NtUserSetClipboardData@12: - movl $0x11e9, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserSetClipboardViewer@4 -_NtUserSetClipboardViewer@4: - movl $0x11ea, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserSetConsoleReserveKeys@8 -_NtUserSetConsoleReserveKeys@8: - movl $0x11eb, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserSetCursor@4 -_NtUserSetCursor@4: - movl $0x11ec, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserSetCursorContents@8 -_NtUserSetCursorContents@8: - movl $0x11ed, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserSetCursorIconData@16 -_NtUserSetCursorIconData@16: - movl $0x11ee, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserSetDbgTag@8 -_NtUserSetDbgTag@8: - movl $0x11ef, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserSetFocus@4 -_NtUserSetFocus@4: - movl $0x11f0, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserSetImeHotKey@20 -_NtUserSetImeHotKey@20: - movl $0x11f1, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtUserSetImeInfoEx@4 -_NtUserSetImeInfoEx@4: - movl $0x11f2, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserSetImeOwnerWindow@8 -_NtUserSetImeOwnerWindow@8: - movl $0x11f3, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserSetInformationProcess@16 -_NtUserSetInformationProcess@16: - movl $0x11f4, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserSetInformationThread@20 -_NtUserSetInformationThread@20: - movl $0x11f5, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtUserSetInternalWindowPos@16 -_NtUserSetInternalWindowPos@16: - movl $0x11f6, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserSetKeyboardState@4 -_NtUserSetKeyboardState@4: - movl $0x11f7, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserSetLogonNotifyWindow@4 -_NtUserSetLogonNotifyWindow@4: - movl $0x11f8, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserSetMenu@12 -_NtUserSetMenu@12: - movl $0x11f9, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserSetMenuContextHelpId@8 -_NtUserSetMenuContextHelpId@8: - movl $0x11fa, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserSetMenuDefaultItem@12 -_NtUserSetMenuDefaultItem@12: - movl $0x11fb, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserSetMenuFlagRtoL@4 -_NtUserSetMenuFlagRtoL@4: - movl $0x11fc, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserSetObjectInformation@16 -_NtUserSetObjectInformation@16: - movl $0x11fd, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserSetParent@8 -_NtUserSetParent@8: - movl $0x11fe, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserSetProcessWindowStation@4 -_NtUserSetProcessWindowStation@4: - movl $0x11ff, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserSetProp@12 -_NtUserSetProp@12: - movl $0x1200, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserSetRipFlags@8 -_NtUserSetRipFlags@8: - movl $0x1201, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserSetScrollInfo@16 -_NtUserSetScrollInfo@16: - movl $0x1202, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserSetShellWindowEx@8 -_NtUserSetShellWindowEx@8: - movl $0x1203, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserSetSysColors@16 -_NtUserSetSysColors@16: - movl $0x1204, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserSetSystemCursor@8 -_NtUserSetSystemCursor@8: - movl $0x1205, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserSetSystemMenu@8 -_NtUserSetSystemMenu@8: - movl $0x1206, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserSetSystemTimer@16 -_NtUserSetSystemTimer@16: - movl $0x1207, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserSetThreadDesktop@4 -_NtUserSetThreadDesktop@4: - movl $0x1208, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserSetThreadLayoutHandles@8 -_NtUserSetThreadLayoutHandles@8: - movl $0x1209, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserSetThreadState@8 -_NtUserSetThreadState@8: - movl $0x120a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserSetTimer@16 -_NtUserSetTimer@16: - movl $0x120b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserSetWindowFNID@8 -_NtUserSetWindowFNID@8: - movl $0x120c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserSetWindowLong@16 -_NtUserSetWindowLong@16: - movl $0x120d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserSetWindowPlacement@8 -_NtUserSetWindowPlacement@8: - movl $0x120e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserSetWindowPos@28 -_NtUserSetWindowPos@28: - movl $0x120f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x1c - -.global _NtUserSetWindowRgn@12 -_NtUserSetWindowRgn@12: - movl $0x1210, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserSetWindowsHookAW@12 -_NtUserSetWindowsHookAW@12: - movl $0x1211, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserSetWindowsHookEx@24 -_NtUserSetWindowsHookEx@24: - movl $0x1212, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtUserSetWindowStationUser@16 -_NtUserSetWindowStationUser@16: - movl $0x1213, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserSetWindowWord@12 -_NtUserSetWindowWord@12: - movl $0x1214, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserSetWinEventHook@32 -_NtUserSetWinEventHook@32: - movl $0x1215, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x20 - -.global _NtUserShowCaret@4 -_NtUserShowCaret@4: - movl $0x1216, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserShowScrollBar@12 -_NtUserShowScrollBar@12: - movl $0x1217, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserShowWindow@8 -_NtUserShowWindow@8: - movl $0x1218, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserShowWindowAsync@8 -_NtUserShowWindowAsync@8: - movl $0x1219, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserSoundSentry@0 -_NtUserSoundSentry@0: - movl $0x121a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x0 - -.global _NtUserSwitchDesktop@4 -_NtUserSwitchDesktop@4: - movl $0x121b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserSystemParametersInfo@16 -_NtUserSystemParametersInfo@16: - movl $0x121c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserTestForInteractiveUser@4 -_NtUserTestForInteractiveUser@4: - movl $0x121d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserThunkedMenuInfo@8 -_NtUserThunkedMenuInfo@8: - movl $0x121e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserThunkedMenuItemInfo@24 -_NtUserThunkedMenuItemInfo@24: - movl $0x121f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtUserToUnicodeEx@28 -_NtUserToUnicodeEx@28: - movl $0x1220, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x1c - -.global _NtUserTrackMouseEvent@4 -_NtUserTrackMouseEvent@4: - movl $0x1221, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserTrackPopupMenuEx@24 -_NtUserTrackPopupMenuEx@24: - movl $0x1222, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtUserTranslateAccelerator@12 -_NtUserTranslateAccelerator@12: - movl $0x1223, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserTranslateMessage@8 -_NtUserTranslateMessage@8: - movl $0x1224, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserUnhookWindowsHookEx@4 -_NtUserUnhookWindowsHookEx@4: - movl $0x1225, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserUnhookWinEvent@4 -_NtUserUnhookWinEvent@4: - movl $0x1226, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserUnloadKeyboardLayout@4 -_NtUserUnloadKeyboardLayout@4: - movl $0x1227, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserUnlockWindowStation@4 -_NtUserUnlockWindowStation@4: - movl $0x1228, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserUnregisterClass@12 -_NtUserUnregisterClass@12: - movl $0x1229, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserUnregisterHotKey@8 -_NtUserUnregisterHotKey@8: - movl $0x122a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserUpdateInputContext@12 -_NtUserUpdateInputContext@12: - movl $0x122b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserUpdateInstance@12 -_NtUserUpdateInstance@12: - movl $0x122c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserUpdateLayeredWindow@36 -_NtUserUpdateLayeredWindow@36: - movl $0x122d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x24 - -.global _NtUserSetLayeredWindowAttributes@16 -_NtUserSetLayeredWindowAttributes@16: - movl $0x122e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserUpdatePerUserSystemParameters@8 -_NtUserUpdatePerUserSystemParameters@8: - movl $0x122f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserUserHandleGrantAccess@12 -_NtUserUserHandleGrantAccess@12: - movl $0x1230, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserValidateHandleSecure@4 -_NtUserValidateHandleSecure@4: - movl $0x1231, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserValidateRect@8 -_NtUserValidateRect@8: - movl $0x1232, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserVkKeyScanEx@12 -_NtUserVkKeyScanEx@12: - movl $0x1233, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserWaitForInputIdle@12 -_NtUserWaitForInputIdle@12: - movl $0x1234, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserWaitForMsgAndEvent@4 -_NtUserWaitForMsgAndEvent@4: - movl $0x1235, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserWaitMessage@0 -_NtUserWaitMessage@0: - movl $0x1236, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x0 - -.global _NtUserWin32PoolAllocationStats@24 -_NtUserWin32PoolAllocationStats@24: - movl $0x1237, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtUserWindowFromPoint@8 -_NtUserWindowFromPoint@8: - movl $0x1238, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtUserYieldTask@0 -_NtUserYieldTask@0: - movl $0x1239, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x0 - -.global _NtUserRemoteConnect@12 -_NtUserRemoteConnect@12: - movl $0x123a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtUserRemoteRedrawRectangle@16 -_NtUserRemoteRedrawRectangle@16: - movl $0x123b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtUserRemoteRedrawScreen@0 -_NtUserRemoteRedrawScreen@0: - movl $0x123c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x0 - -.global _NtUserRemoteStopScreenUpdates@0 -_NtUserRemoteStopScreenUpdates@0: - movl $0x123d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x0 - -.global _NtUserCtxDisplayIOCtl@12 -_NtUserCtxDisplayIOCtl@12: - movl $0x123e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiEngAssociateSurface@12 -_NtGdiEngAssociateSurface@12: - movl $0x123f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiEngCreateBitmap@24 -_NtGdiEngCreateBitmap@24: - movl $0x1240, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtGdiEngCreateDeviceSurface@16 -_NtGdiEngCreateDeviceSurface@16: - movl $0x1241, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiEngCreateDeviceBitmap@16 -_NtGdiEngCreateDeviceBitmap@16: - movl $0x1242, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiEngCreatePalette@24 -_NtGdiEngCreatePalette@24: - movl $0x1243, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtGdiEngComputeGlyphSet@12 -_NtGdiEngComputeGlyphSet@12: - movl $0x1244, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiEngCopyBits@24 -_NtGdiEngCopyBits@24: - movl $0x1245, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtGdiEngDeletePalette@4 -_NtGdiEngDeletePalette@4: - movl $0x1246, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiEngDeleteSurface@4 -_NtGdiEngDeleteSurface@4: - movl $0x1247, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiEngEraseSurface@12 -_NtGdiEngEraseSurface@12: - movl $0x1248, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiEngUnlockSurface@4 -_NtGdiEngUnlockSurface@4: - movl $0x1249, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiEngLockSurface@4 -_NtGdiEngLockSurface@4: - movl $0x124a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiEngBitBlt@44 -_NtGdiEngBitBlt@44: - movl $0x124b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x2c - -.global _NtGdiEngStretchBlt@44 -_NtGdiEngStretchBlt@44: - movl $0x124c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x2c - -.global _NtGdiEngPlgBlt@44 -_NtGdiEngPlgBlt@44: - movl $0x124d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x2c - -.global _NtGdiEngMarkBandingSurface@4 -_NtGdiEngMarkBandingSurface@4: - movl $0x124e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiEngStrokePath@32 -_NtGdiEngStrokePath@32: - movl $0x124f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x20 - -.global _NtGdiEngFillPath@28 -_NtGdiEngFillPath@28: - movl $0x1250, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x1c - -.global _NtGdiEngStrokeAndFillPath@40 -_NtGdiEngStrokeAndFillPath@40: - movl $0x1251, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x28 - -.global _NtGdiEngPaint@20 -_NtGdiEngPaint@20: - movl $0x1252, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiEngLineTo@36 -_NtGdiEngLineTo@36: - movl $0x1253, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x24 - -.global _NtGdiEngAlphaBlend@28 -_NtGdiEngAlphaBlend@28: - movl $0x1254, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x1c - -.global _NtGdiEngGradientFill@40 -_NtGdiEngGradientFill@40: - movl $0x1255, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x28 - -.global _NtGdiEngTransparentBlt@32 -_NtGdiEngTransparentBlt@32: - movl $0x1256, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x20 - -.global _NtGdiEngTextOut@40 -_NtGdiEngTextOut@40: - movl $0x1257, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x28 - -.global _NtGdiEngStretchBltROP@52 -_NtGdiEngStretchBltROP@52: - movl $0x1258, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x34 - -.global _NtGdiXLATEOBJ_cGetPalette@16 -_NtGdiXLATEOBJ_cGetPalette@16: - movl $0x1259, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiXLATEOBJ_iXlate@8 -_NtGdiXLATEOBJ_iXlate@8: - movl $0x125a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiXLATEOBJ_hGetColorTransform@4 -_NtGdiXLATEOBJ_hGetColorTransform@4: - movl $0x125b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiCLIPOBJ_bEnum@12 -_NtGdiCLIPOBJ_bEnum@12: - movl $0x125c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiCLIPOBJ_cEnumStart@20 -_NtGdiCLIPOBJ_cEnumStart@20: - movl $0x125d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiCLIPOBJ_ppoGetPath@4 -_NtGdiCLIPOBJ_ppoGetPath@4: - movl $0x125e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiEngDeletePath@4 -_NtGdiEngDeletePath@4: - movl $0x125f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiEngCreateClip@0 -_NtGdiEngCreateClip@0: - movl $0x1260, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x0 - -.global _NtGdiEngDeleteClip@4 -_NtGdiEngDeleteClip@4: - movl $0x1261, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiBRUSHOBJ_ulGetBrushColor@4 -_NtGdiBRUSHOBJ_ulGetBrushColor@4: - movl $0x1262, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiBRUSHOBJ_pvAllocRbrush@8 -_NtGdiBRUSHOBJ_pvAllocRbrush@8: - movl $0x1263, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiBRUSHOBJ_pvGetRbrush@4 -_NtGdiBRUSHOBJ_pvGetRbrush@4: - movl $0x1264, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiBRUSHOBJ_hGetColorTransform@4 -_NtGdiBRUSHOBJ_hGetColorTransform@4: - movl $0x1265, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiXFORMOBJ_bApplyXform@20 -_NtGdiXFORMOBJ_bApplyXform@20: - movl $0x1266, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiXFORMOBJ_iGetXform@8 -_NtGdiXFORMOBJ_iGetXform@8: - movl $0x1267, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiFONTOBJ_vGetInfo@12 -_NtGdiFONTOBJ_vGetInfo@12: - movl $0x1268, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiFONTOBJ_pxoGetXform@4 -_NtGdiFONTOBJ_pxoGetXform@4: - movl $0x1269, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiFONTOBJ_cGetGlyphs@20 -_NtGdiFONTOBJ_cGetGlyphs@20: - movl $0x126a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x14 - -.global _NtGdiFONTOBJ_pifi@4 -_NtGdiFONTOBJ_pifi@4: - movl $0x126b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiFONTOBJ_pfdg@4 -_NtGdiFONTOBJ_pfdg@4: - movl $0x126c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiFONTOBJ_pQueryGlyphAttrs@8 -_NtGdiFONTOBJ_pQueryGlyphAttrs@8: - movl $0x126d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiFONTOBJ_pvTrueTypeFontFile@8 -_NtGdiFONTOBJ_pvTrueTypeFontFile@8: - movl $0x126e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiFONTOBJ_cGetAllGlyphHandles@8 -_NtGdiFONTOBJ_cGetAllGlyphHandles@8: - movl $0x126f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiSTROBJ_bEnum@12 -_NtGdiSTROBJ_bEnum@12: - movl $0x1270, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiSTROBJ_bEnumPositionsOnly@12 -_NtGdiSTROBJ_bEnumPositionsOnly@12: - movl $0x1271, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiSTROBJ_bGetAdvanceWidths@16 -_NtGdiSTROBJ_bGetAdvanceWidths@16: - movl $0x1272, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiSTROBJ_vEnumStart@4 -_NtGdiSTROBJ_vEnumStart@4: - movl $0x1273, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiSTROBJ_dwGetCodePage@4 -_NtGdiSTROBJ_dwGetCodePage@4: - movl $0x1274, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiPATHOBJ_vGetBounds@8 -_NtGdiPATHOBJ_vGetBounds@8: - movl $0x1275, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiPATHOBJ_bEnum@8 -_NtGdiPATHOBJ_bEnum@8: - movl $0x1276, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x8 - -.global _NtGdiPATHOBJ_vEnumStart@4 -_NtGdiPATHOBJ_vEnumStart@4: - movl $0x1277, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiPATHOBJ_vEnumStartClipLines@16 -_NtGdiPATHOBJ_vEnumStartClipLines@16: - movl $0x1278, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiPATHOBJ_bEnumClipLines@12 -_NtGdiPATHOBJ_bEnumClipLines@12: - movl $0x1279, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc - -.global _NtGdiGetDhpdev@4 -_NtGdiGetDhpdev@4: - movl $0x127a, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiEngCheckAbort@4 -_NtGdiEngCheckAbort@4: - movl $0x127b, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtGdiHT_Get8BPPFormatPalette@16 -_NtGdiHT_Get8BPPFormatPalette@16: - movl $0x127c, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x10 - -.global _NtGdiHT_Get8BPPMaskPalette@24 -_NtGdiHT_Get8BPPMaskPalette@24: - movl $0x127d, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x18 - -.global _NtGdiUpdateTransform@4 -_NtGdiUpdateTransform@4: - movl $0x127e, %eax - leal 4(%esp),%edx - int $0x2e - ret $0x4 - -.global _NtUserValidateTimerCallback@12 -_NtUserValidateTimerCallback@12: - movl $0x127f, %eax - leal 4(%esp),%edx - int $0x2e - ret $0xc diff --git a/rostests/apitests/w32kdll/w32kdll_2ksp4/w32kdll_2ksp4.def b/rostests/apitests/w32kdll/w32kdll_2ksp4/w32kdll_2ksp4.def deleted file mode 100644 index ab461784fd4..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_2ksp4/w32kdll_2ksp4.def +++ /dev/null @@ -1,649 +0,0 @@ -; $Id: w32kdll.def 27344 2007-08-01 14:12:10Z tkreuzer $ -; -; ReactOS Operating System -; -; This file contains all win32k native api functions from win 2000 sp4 -; -LIBRARY w32kdll.dll - -EXPORTS -NtGdiAbortDoc@4 -NtGdiAbortPath@4 -NtGdiAddFontResourceW@24 -NtGdiAddRemoteFontToDC@16 -NtGdiAddFontMemResourceEx@20 -NtGdiRemoveMergeFont@8 -NtGdiAddRemoteMMInstanceToDC@12 -NtGdiAlphaBlend@48 -NtGdiAngleArc@24 -NtGdiAnyLinkedFonts@0 -NtGdiFontIsLinked@4 -NtGdiArcInternal@40 -NtGdiBeginPath@4 -NtGdiBitBlt@44 -NtGdiCancelDC@4 -NtGdiCheckBitmapBits@32 -NtGdiCloseFigure@4 -NtGdiColorCorrectPalette@24 -NtGdiCombineRgn@16 -NtGdiCombineTransform@12 -NtGdiComputeXformCoefficients@4 -NtGdiConsoleTextOut@16 -NtGdiConvertMetafileRect@8 -NtGdiCreateBitmap@20 -NtGdiCreateClientObj@4 -NtGdiCreateColorSpace@4 -NtGdiCreateColorTransform@32 -NtGdiCreateCompatibleBitmap@12 -NtGdiCreateCompatibleDC@4 -NtGdiCreateDIBBrush@24 -NtGdiCreateDIBitmapInternal@44 -NtGdiCreateDIBSection@36 -NtGdiCreateEllipticRgn@16 -NtGdiCreateHalftonePalette@4 -NtGdiCreateHatchBrushInternal@12 -NtGdiCreateMetafileDC@4 -NtGdiCreatePaletteInternal@8 -NtGdiCreatePatternBrushInternal@12 -NtGdiCreatePen@16 -NtGdiCreateRectRgn@16 -NtGdiCreateRoundRectRgn@24 -NtGdiCreateServerMetaFile@24 -NtGdiCreateSolidBrush@8 -NtGdiD3dContextCreate@16 -NtGdiD3dContextDestroy@4 -NtGdiD3dContextDestroyAll@4 -NtGdiD3dValidateTextureStageState@4 -NtGdiD3dDrawPrimitives2@28 -NtGdiDdGetDriverState@4 -NtGdiDdAddAttachedSurface@12 -NtGdiDdAlphaBlt@12 -NtGdiDdAttachSurface@8 -NtGdiDdBeginMoCompFrame@8 -NtGdiDdBlt@12 -NtGdiDdCanCreateSurface@8 -NtGdiDdCanCreateD3DBuffer@8 -NtGdiDdColorControl@8 -NtGdiDdCreateDirectDrawObject@4 -NtGdiDdCreateSurface@32 -NtGdiDdCreateD3DBuffer@32 -NtGdiDdCreateMoComp@8 -NtGdiDdCreateSurfaceObject@24 -NtGdiDdDeleteDirectDrawObject@4 -NtGdiDdDeleteSurfaceObject@4 -NtGdiDdDestroyMoComp@8 -NtGdiDdDestroySurface@8 -NtGdiDdDestroyD3DBuffer@4 -NtGdiDdEndMoCompFrame@8 -NtGdiDdFlip@20 -NtGdiDdFlipToGDISurface@8 -NtGdiDdGetAvailDriverMemory@8 -NtGdiDdGetBltStatus@8 -NtGdiDdGetDC@8 -NtGdiDdGetDriverInfo@8 -NtGdiDdGetDxHandle@12 -NtGdiDdGetFlipStatus@8 -NtGdiDdGetInternalMoCompInfo@8 -NtGdiDdGetMoCompBuffInfo@8 -NtGdiDdGetMoCompGuids@8 -NtGdiDdGetMoCompFormats@8 -NtGdiDdGetScanLine@8 -NtGdiDdLock@12 -NtGdiDdLockD3D@8 -NtGdiDdQueryDirectDrawObject@44 -NtGdiDdQueryMoCompStatus@8 -NtGdiDdReenableDirectDrawObject@8 -NtGdiDdReleaseDC@4 -NtGdiDdRenderMoComp@8 -NtGdiDdResetVisrgn@8 -NtGdiDdSetColorKey@8 -NtGdiDdSetExclusiveMode@8 -NtGdiDdSetGammaRamp@12 -NtGdiDdCreateSurfaceEx@12 -NtGdiDdSetOverlayPosition@12 -NtGdiDdUnattachSurface@8 -NtGdiDdUnlock@8 -NtGdiDdUnlockD3D@8 -NtGdiDdUpdateOverlay@12 -NtGdiDdWaitForVerticalBlank@8 -NtGdiDvpCanCreateVideoPort@8 -NtGdiDvpColorControl@8 -NtGdiDvpCreateVideoPort@8 -NtGdiDvpDestroyVideoPort@8 -NtGdiDvpFlipVideoPort@16 -NtGdiDvpGetVideoPortBandwidth@8 -NtGdiDvpGetVideoPortField@8 -NtGdiDvpGetVideoPortFlipStatus@8 -NtGdiDvpGetVideoPortInputFormats@8 -NtGdiDvpGetVideoPortLine@8 -NtGdiDvpGetVideoPortOutputFormats@8 -NtGdiDvpGetVideoPortConnectInfo@8 -NtGdiDvpGetVideoSignalStatus@8 -NtGdiDvpUpdateVideoPort@16 -NtGdiDvpWaitForVideoPortSync@8 -NtGdiDeleteClientObj@4 -NtGdiDeleteColorSpace@4 -NtGdiDeleteColorTransform@8 -NtGdiDeleteObjectApp@4 -NtGdiDescribePixelFormat@16 -NtGdiGetPerBandInfo@8 -NtGdiDoBanding@16 -NtGdiDoPalette@24 -NtGdiDrawEscape@16 -NtGdiEllipse@20 -NtGdiEnableEudc@4 -NtGdiEndDoc@4 -NtGdiEndPage@4 -NtGdiEndPath@4 -NtGdiEnumFontChunk@20 -NtGdiEnumFontClose@4 -NtGdiEnumFontOpen@28 -NtGdiEnumObjects@16 -NtGdiEqualRgn@8 -NtGdiEudcEnumFaceNameLinkW@16 -NtGdiEudcLoadUnloadLink@28 -NtGdiExcludeClipRect@20 -NtGdiExtCreatePen@44 -NtGdiExtCreateRegion@12 -NtGdiExtEscape@32 -NtGdiExtFloodFill@20 -NtGdiExtGetObjectW@12 -NtGdiExtSelectClipRgn@12 -NtGdiExtTextOutW@36 -NtGdiFillPath@4 -NtGdiFillRgn@12 -NtGdiFlattenPath@4 -NtGdiFlushUserBatch@0 -NtGdiFlush@0 -NtGdiForceUFIMapping@8 -NtGdiFrameRgn@20 -NtGdiFullscreenControl@20 -NtGdiGetAndSetDCDword@16 -NtGdiGetAppClipBox@8 -NtGdiGetBitmapBits@12 -NtGdiGetBitmapDimension@8 -NtGdiGetBoundsRect@12 -NtGdiGetCharABCWidthsW@24 -NtGdiGetCharacterPlacementW@24 -NtGdiGetCharSet@4 -NtGdiGetCharWidthW@24 -NtGdiGetCharWidthInfo@8 -NtGdiGetColorAdjustment@8 -NtGdiGetColorSpaceforBitmap@4 -NtGdiGetDCDword@12 -NtGdiGetDCforBitmap@4 -NtGdiGetDCObject@8 -NtGdiGetDCPoint@12 -NtGdiGetDeviceCaps@8 -NtGdiGetDeviceGammaRamp@8 -NtGdiGetDeviceCapsAll@8 -NtGdiGetDIBitsInternal@36 -NtGdiGetETM@8 -NtGdiGetEudcTimeStampEx@12 -NtGdiGetFontData@20 -NtGdiGetFontResourceInfoInternalW@28 -NtGdiGetGlyphIndicesW@20 -NtGdiGetGlyphIndicesWInternal@24 -NtGdiGetGlyphOutline@32 -NtGdiGetKerningPairs@12 -NtGdiGetLinkedUFIs@12 -NtGdiGetMiterLimit@8 -NtGdiGetMonitorID@12 -NtGdiGetNearestColor@8 -NtGdiGetNearestPaletteIndex@8 -NtGdiGetObjectBitmapHandle@8 -NtGdiGetOutlineTextMetricsInternalW@16 -NtGdiGetPath@16 -NtGdiGetPixel@12 -NtGdiGetRandomRgn@12 -NtGdiGetRasterizerCaps@8 -NtGdiGetRealizationInfo@8 -NtGdiGetRegionData@12 -NtGdiGetRgnBox@8 -NtGdiGetServerMetaFileBits@28 -NtGdiGetSpoolMessage@16 -NtGdiGetStats@20 -NtGdiGetStockObject@4 -NtGdiGetStringBitmapW@20 -NtGdiGetSystemPaletteUse@4 -NtGdiGetTextCharsetInfo@12 -NtGdiGetTextExtent@20 -NtGdiGetTextExtentExW@32 -NtGdiGetTextFaceW@16 -NtGdiGetTextMetricsW@12 -NtGdiGetTransform@12 -NtGdiGetUFI@24 -NtGdiGetUFIPathname@40 -NtGdiGetFontUnicodeRanges@8 -NtGdiGetWidthTable@28 -NtGdiGradientFill@24 -NtGdiHfontCreate@20 -NtGdiIcmBrushInfo@32 -NtGdiInit@0 -NtGdiInitSpool@0 -NtGdiIntersectClipRect@20 -NtGdiInvertRgn@8 -NtGdiLineTo@12 -NtGdiMakeFontDir@20 -NtGdiMakeInfoDC@8 -NtGdiMaskBlt@52 -NtGdiModifyWorldTransform@12 -NtGdiMonoBitmap@4 -NtGdiMoveTo@16 -NtGdiOffsetClipRgn@12 -NtGdiOffsetRgn@12 -NtGdiOpenDCW@28 -NtGdiPatBlt@24 -NtGdiPolyPatBlt@20 -NtGdiPathToRegion@4 -NtGdiPlgBlt@44 -NtGdiPolyDraw@16 -NtGdiPolyPolyDraw@20 -NtGdiPolyTextOutW@16 -NtGdiPtInRegion@12 -NtGdiPtVisible@12 -NtGdiQueryFonts@12 -NtGdiQueryFontAssocInfo@4 -NtGdiRectangle@20 -NtGdiRectInRegion@8 -NtGdiRectVisible@8 -NtGdiRemoveFontResourceW@24 -NtGdiRemoveFontMemResourceEx@4 -NtGdiResetDC@20 -NtGdiResizePalette@8 -NtGdiRestoreDC@8 -NtGdiRoundRect@28 -NtGdiSaveDC@4 -NtGdiScaleViewportExtEx@24 -NtGdiScaleWindowExtEx@24 -NtGdiSelectBitmap@8 -NtGdiSelectBrush@8 -NtGdiSelectClipPath@8 -NtGdiSelectFont@8 -NtGdiSelectPen@8 -NtGdiSetBitmapBits@12 -NtGdiSetBitmapDimension@16 -NtGdiSetBoundsRect@12 -NtGdiSetBrushOrg@16 -NtGdiSetColorAdjustment@8 -NtGdiSetColorSpace@8 -NtGdiSetDeviceGammaRamp@8 -NtGdiSetDIBitsToDeviceInternal@64 -NtGdiSetFontEnumeration@4 -NtGdiSetFontXform@12 -NtGdiSetIcmMode@12 -NtGdiSetLinkedUFIs@12 -NtGdiSetMagicColors@12 -NtGdiSetMetaRgn@4 -NtGdiSetMiterLimit@12 -NtGdiGetDeviceWidth@4 -NtGdiMirrorWindowOrg@4 -NtGdiSetLayout@12 -NtGdiSetPixel@16 -NtGdiSetPixelFormat@8 -NtGdiSetRectRgn@20 -NtGdiSetSystemPaletteUse@8 -NtGdiSetTextJustification@12 -NtGdiSetupPublicCFONT@12 -NtGdiSetVirtualResolution@20 -NtGdiSetSizeDevice@12 -NtGdiStartDoc@16 -NtGdiStartPage@4 -NtGdiStretchBlt@48 -NtGdiStretchDIBitsInternal@64 -NtGdiStrokeAndFillPath@4 -NtGdiStrokePath@4 -NtGdiSwapBuffers@4 -NtGdiTransformPoints@20 -NtGdiTransparentBlt@44 -NtGdiUnloadPrinterDriver@8 -NtGdiUnmapMemFont@4 -NtGdiUnrealizeObject@4 -NtGdiUpdateColors@4 -NtGdiWidenPath@4 -NtUserActivateKeyboardLayout@8 -NtUserAlterWindowStyle@12 -NtUserAssociateInputContext@12 -NtUserAttachThreadInput@12 -NtUserBeginPaint@8 -NtUserBitBltSysBmp@32 -NtUserBlockInput@4 -NtUserBuildHimcList@16 -NtUserBuildHwndList@28 -NtUserBuildNameList@16 -NtUserBuildPropList@16 -NtUserCallHwnd@8 -NtUserCallHwndLock@8 -NtUserCallHwndOpt@8 -NtUserCallHwndParam@12 -NtUserCallHwndParamLock@12 -NtUserCallMsgFilter@8 -NtUserCallNextHookEx@16 -NtUserCallNoParam@4 -NtUserCallOneParam@4 -NtUserCallTwoParam@12 -NtUserChangeClipboardChain@8 -NtUserChangeDisplaySettings@20 -NtUserCheckImeHotKey@12 -NtUserCheckMenuItem@12 -NtUserChildWindowFromPointEx@16 -NtUserClipCursor@4 -NtUserCloseClipboard@0 -NtUserCloseDesktop@4 -NtUserCloseWindowStation@4 -NtUserConsoleControl@12 -NtUserConvertMemHandle@8 -NtUserCopyAcceleratorTable@12 -NtUserCountClipboardFormats@4 -NtUserCreateAcceleratorTable@8 -NtUserCreateCaret@16 -NtUserCreateDesktop@20 -NtUserCreateInputContext@4 -NtUserCreateLocalMemHandle@16 -NtUserCreateWindowEx@52 -NtUserCreateWindowStation@24 -NtUserDdeGetQualityOfService@12 -NtUserDdeInitialize@20 -NtUserDdeSetQualityOfService@12 -NtUserDeferWindowPos@32 -NtUserDefSetText@8 -NtUserDeleteMenu@12 -NtUserDestroyAcceleratorTable@4 -NtUserDestroyCursor@8 -NtUserDestroyInputContext@4 -NtUserDestroyMenu@4 -NtUserDestroyWindow@4 -NtUserDisableThreadIme@4 -NtUserDispatchMessage@4 -NtUserDragDetect@12 -NtUserDragObject@20 -NtUserDrawAnimatedRects@16 -NtUserDrawCaption@16 -NtUserDrawCaptionTemp@28 -NtUserDrawIconEx@44 -NtUserDrawMenuBarTemp@20 -NtUserEmptyClipboard@0 -NtUserEnableMenuItem@12 -NtUserEnableScrollBar@12 -NtUserEndDeferWindowPosEx@8 -NtUserEndMenu@0 -NtUserEndPaint@8 -NtUserEnumDisplayDevices@16 -NtUserEnumDisplayMonitors@16 -NtUserEnumDisplaySettings@16 -NtUserEvent@4 -NtUserExcludeUpdateRgn@8 -NtUserFillWindow@16 -NtUserFindExistingCursorIcon@12 -NtUserFindWindowEx@20 -NtUserFlashWindowEx@4 -NtUserGetAltTabInfo@24 -NtUserGetAncestor@8 -NtUserGetAppImeLevel@4 -NtUserGetAsyncKeyState@4 -NtUserGetCaretBlinkTime@0 -NtUserGetCaretPos@4 -NtUserGetClassInfo@20 -NtUserGetClassName@12 -NtUserGetClipboardData@8 -NtUserGetClipboardFormatName@12 -NtUserGetClipboardOwner@0 -NtUserGetClipboardSequenceNumber@0 -NtUserGetClipboardViewer@0 -NtUserGetClipCursor@4 -NtUserGetComboBoxInfo@8 -NtUserGetControlBrush@12 -NtUserGetControlColor@16 -NtUserGetCPD@12 -NtUserGetCursorFrameInfo@16 -NtUserGetCursorInfo@4 -NtUserGetDC@4 -NtUserGetDCEx@12 -NtUserGetDoubleClickTime@0 -NtUserGetForegroundWindow@0 -NtUserGetGuiResources@8 -NtUserGetGUIThreadInfo@8 -NtUserGetIconInfo@24 -NtUserGetIconSize@16 -NtUserGetImeHotKey@16 -NtUserGetImeInfoEx@8 -NtUserGetInternalWindowPos@12 -NtUserGetKeyboardLayoutList@8 -NtUserGetKeyboardLayoutName@4 -NtUserGetKeyboardState@4 -NtUserGetKeyNameText@12 -NtUserGetKeyState@4 -NtUserGetListBoxInfo@4 -NtUserGetMenuBarInfo@16 -NtUserGetMenuIndex@8 -NtUserGetMenuItemRect@16 -NtUserGetMessage@16 -NtUserGetMouseMovePointsEx@20 -NtUserGetObjectInformation@20 -NtUserGetOpenClipboardWindow@0 -NtUserGetPriorityClipboardFormat@8 -NtUserGetProcessWindowStation@0 -NtUserGetScrollBarInfo@12 -NtUserGetSystemMenu@8 -NtUserGetThreadDesktop@8 -NtUserGetThreadState@4 -NtUserGetTitleBarInfo@8 -NtUserGetUpdateRect@12 -NtUserGetUpdateRgn@12 -NtUserGetWindowDC@4 -NtUserGetWindowPlacement@8 -NtUserGetWOWClass@8 -NtUserHardErrorControl@12 -NtUserHideCaret@4 -NtUserHiliteMenuItem@16 -NtUserImpersonateDdeClientWindow@8 -NtUserInitialize@12 -NtUserInitializeClientPfnArrays@16 -NtUserInitTask@44 -NtUserInternalGetWindowText@12 -NtUserInvalidateRect@12 -NtUserInvalidateRgn@12 -NtUserIsClipboardFormatAvailable@4 -NtUserKillTimer@8 -NtUserLoadKeyboardLayoutEx@24 -NtUserLockWindowStation@4 -NtUserLockWindowUpdate@4 -NtUserLockWorkStation@0 -NtUserMapVirtualKeyEx@16 -NtUserMenuItemFromPoint@16 -NtUserMessageCall@28 -NtUserMinMaximize@12 -NtUserMNDragLeave@4 -NtUserMNDragOver@8 -NtUserModifyUserStartupInfoFlags@8 -NtUserMoveWindow@24 -NtUserNotifyIMEStatus@12 -NtUserNotifyProcessCreate@16 -NtUserNotifyWinEvent@16 -NtUserOpenClipboard@8 -NtUserOpenDesktop@12 -NtUserOpenInputDesktop@12 -NtUserOpenWindowStation@8 -NtUserPaintDesktop@4 -NtUserPeekMessage@20 -NtUserPostMessage@16 -NtUserPostThreadMessage@16 -NtUserProcessConnect@12 -NtUserQueryInformationThread@20 -NtUserQueryInputContext@8 -NtUserQuerySendMessage@4 -NtUserQueryUserCounters@20 -NtUserQueryWindow@8 -NtUserRealChildWindowFromPoint@12 -NtUserRedrawWindow@16 -NtUserRegisterClassExWOW@24 -NtUserRegisterHotKey@16 -NtUserRegisterTasklist@4 -NtUserRegisterWindowMessage@4 -NtUserRemoveMenu@12 -NtUserRemoveProp@8 -NtUserResolveDesktop@16 -NtUserResolveDesktopForWOW@4 -NtUserSBGetParms@16 -NtUserScrollDC@28 -NtUserScrollWindowEx@32 -NtUserSelectPalette@12 -NtUserSendInput@12 -NtUserSendMessageCallback@24 -NtUserSendNotifyMessage@16 -NtUserSetActiveWindow@4 -NtUserSetAppImeLevel@8 -NtUserSetCapture@4 -NtUserSetClassLong@16 -NtUserSetClassWord@12 -NtUserSetClipboardData@12 -NtUserSetClipboardViewer@4 -NtUserSetConsoleReserveKeys@8 -NtUserSetCursor@4 -NtUserSetCursorContents@8 -NtUserSetCursorIconData@16 -NtUserSetDbgTag@8 -NtUserSetFocus@4 -NtUserSetImeHotKey@20 -NtUserSetImeInfoEx@4 -NtUserSetImeOwnerWindow@8 -NtUserSetInformationProcess@16 -NtUserSetInformationThread@20 -NtUserSetInternalWindowPos@16 -NtUserSetKeyboardState@4 -NtUserSetLogonNotifyWindow@4 -NtUserSetMenu@12 -NtUserSetMenuContextHelpId@8 -NtUserSetMenuDefaultItem@12 -NtUserSetMenuFlagRtoL@4 -NtUserSetObjectInformation@16 -NtUserSetParent@8 -NtUserSetProcessWindowStation@4 -NtUserSetProp@12 -NtUserSetRipFlags@8 -NtUserSetScrollInfo@16 -NtUserSetShellWindowEx@8 -NtUserSetSysColors@16 -NtUserSetSystemCursor@8 -NtUserSetSystemMenu@8 -NtUserSetSystemTimer@16 -NtUserSetThreadDesktop@4 -NtUserSetThreadLayoutHandles@8 -NtUserSetThreadState@8 -NtUserSetTimer@16 -NtUserSetWindowFNID@8 -NtUserSetWindowLong@16 -NtUserSetWindowPlacement@8 -NtUserSetWindowPos@28 -NtUserSetWindowRgn@12 -NtUserSetWindowsHookAW@12 -NtUserSetWindowsHookEx@24 -NtUserSetWindowStationUser@16 -NtUserSetWindowWord@12 -NtUserSetWinEventHook@32 -NtUserShowCaret@4 -NtUserShowScrollBar@12 -NtUserShowWindow@8 -NtUserShowWindowAsync@8 -NtUserSoundSentry@0 -NtUserSwitchDesktop@4 -NtUserSystemParametersInfo@16 -NtUserTestForInteractiveUser@4 -NtUserThunkedMenuInfo@8 -NtUserThunkedMenuItemInfo@24 -NtUserToUnicodeEx@28 -NtUserTrackMouseEvent@4 -NtUserTrackPopupMenuEx@24 -NtUserTranslateAccelerator@12 -NtUserTranslateMessage@8 -NtUserUnhookWindowsHookEx@4 -NtUserUnhookWinEvent@4 -NtUserUnloadKeyboardLayout@4 -NtUserUnlockWindowStation@4 -NtUserUnregisterClass@12 -NtUserUnregisterHotKey@8 -NtUserUpdateInputContext@12 -NtUserUpdateInstance@12 -NtUserUpdateLayeredWindow@36 -NtUserSetLayeredWindowAttributes@16 -NtUserUpdatePerUserSystemParameters@8 -NtUserUserHandleGrantAccess@12 -NtUserValidateHandleSecure@4 -NtUserValidateRect@8 -NtUserVkKeyScanEx@12 -NtUserWaitForInputIdle@12 -NtUserWaitForMsgAndEvent@4 -NtUserWaitMessage@0 -NtUserWin32PoolAllocationStats@24 -NtUserWindowFromPoint@8 -NtUserYieldTask@0 -NtUserRemoteConnect@12 -NtUserRemoteRedrawRectangle@16 -NtUserRemoteRedrawScreen@0 -NtUserRemoteStopScreenUpdates@0 -NtUserCtxDisplayIOCtl@12 -NtGdiEngAssociateSurface@12 -NtGdiEngCreateBitmap@24 -NtGdiEngCreateDeviceSurface@16 -NtGdiEngCreateDeviceBitmap@16 -NtGdiEngCreatePalette@24 -NtGdiEngComputeGlyphSet@12 -NtGdiEngCopyBits@24 -NtGdiEngDeletePalette@4 -NtGdiEngDeleteSurface@4 -NtGdiEngEraseSurface@12 -NtGdiEngUnlockSurface@4 -NtGdiEngLockSurface@4 -NtGdiEngBitBlt@44 -NtGdiEngStretchBlt@44 -NtGdiEngPlgBlt@44 -NtGdiEngMarkBandingSurface@4 -NtGdiEngStrokePath@32 -NtGdiEngFillPath@28 -NtGdiEngStrokeAndFillPath@40 -NtGdiEngPaint@20 -NtGdiEngLineTo@36 -NtGdiEngAlphaBlend@28 -NtGdiEngGradientFill@40 -NtGdiEngTransparentBlt@32 -NtGdiEngTextOut@40 -NtGdiEngStretchBltROP@52 -NtGdiXLATEOBJ_cGetPalette@16 -NtGdiXLATEOBJ_iXlate@8 -NtGdiXLATEOBJ_hGetColorTransform@4 -NtGdiCLIPOBJ_bEnum@12 -NtGdiCLIPOBJ_cEnumStart@20 -NtGdiCLIPOBJ_ppoGetPath@4 -NtGdiEngDeletePath@4 -NtGdiEngCreateClip@0 -NtGdiEngDeleteClip@4 -NtGdiBRUSHOBJ_ulGetBrushColor@4 -NtGdiBRUSHOBJ_pvAllocRbrush@8 -NtGdiBRUSHOBJ_pvGetRbrush@4 -NtGdiBRUSHOBJ_hGetColorTransform@4 -NtGdiXFORMOBJ_bApplyXform@20 -NtGdiXFORMOBJ_iGetXform@8 -NtGdiFONTOBJ_vGetInfo@12 -NtGdiFONTOBJ_pxoGetXform@4 -NtGdiFONTOBJ_cGetGlyphs@20 -NtGdiFONTOBJ_pifi@4 -NtGdiFONTOBJ_pfdg@4 -NtGdiFONTOBJ_pQueryGlyphAttrs@8 -NtGdiFONTOBJ_pvTrueTypeFontFile@8 -NtGdiFONTOBJ_cGetAllGlyphHandles@8 -NtGdiSTROBJ_bEnum@12 -NtGdiSTROBJ_bEnumPositionsOnly@12 -NtGdiSTROBJ_bGetAdvanceWidths@16 -NtGdiSTROBJ_vEnumStart@4 -NtGdiSTROBJ_dwGetCodePage@4 -NtGdiPATHOBJ_vGetBounds@8 -NtGdiPATHOBJ_bEnum@8 -NtGdiPATHOBJ_vEnumStart@4 -NtGdiPATHOBJ_vEnumStartClipLines@16 -NtGdiPATHOBJ_bEnumClipLines@12 -NtGdiGetDhpdev@4 -NtGdiEngCheckAbort@4 -NtGdiHT_Get8BPPFormatPalette@16 -NtGdiHT_Get8BPPMaskPalette@24 -NtGdiUpdateTransform@4 -NtUserValidateTimerCallback@12 diff --git a/rostests/apitests/w32kdll/w32kdll_2ksp4/w32kdll_2ksp4.rbuild b/rostests/apitests/w32kdll/w32kdll_2ksp4/w32kdll_2ksp4.rbuild deleted file mode 100644 index 2083f95151b..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_2ksp4/w32kdll_2ksp4.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - - w32kdll_2ksp4.S - main.c - diff --git a/rostests/apitests/w32kdll/w32kdll_ros/CMakeLists.txt b/rostests/apitests/w32kdll/w32kdll_ros/CMakeLists.txt deleted file mode 100644 index c96fff8d796..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_ros/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ - -add_library(w32kdll SHARED main.c) - -set_entrypoint(w32kdll 0) - -target_link_libraries(w32kdll - ${CMAKE_CURRENT_SOURCE_DIR}/w32kdll_ros.def - win32ksys) - -add_dependencies(w32kdll psdk ) -add_importlib_target(w32kdll_ros.def) diff --git a/rostests/apitests/w32kdll/w32kdll_ros/main.c b/rostests/apitests/w32kdll/w32kdll_ros/main.c deleted file mode 100644 index 13a149cc27e..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_ros/main.c +++ /dev/null @@ -1,31 +0,0 @@ -#include - -#ifdef BUILD_DLL - #define DLL_EXPORT __declspec(dllexport) -#else - #define DLL_EXPORT -#endif - -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - // attach to process - // return FALSE to fail DLL load - break; - - case DLL_PROCESS_DETACH: - // detach from process - break; - - case DLL_THREAD_ATTACH: - // attach to thread - break; - - case DLL_THREAD_DETACH: - // detach from thread - break; - } - return TRUE; // succesful -} diff --git a/rostests/apitests/w32kdll/w32kdll_ros/w32kdll_ros.def b/rostests/apitests/w32kdll/w32kdll_ros/w32kdll_ros.def deleted file mode 100644 index 490e9d3588b..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_ros/w32kdll_ros.def +++ /dev/null @@ -1,679 +0,0 @@ -; $Id: w32kdll.def 27344 2007-08-01 14:12:10Z tkreuzer $ -; -; ReactOS Operating System -; -; This file contains all win32k native api functions from win xp -; unsupported functions are commented out. -; -LIBRARY w32kdll.dll - -EXPORTS -NtGdiAbortDoc@4 -NtGdiAbortPath@4 -NtGdiAddFontResourceW@24 -NtGdiAddRemoteFontToDC@16 -NtGdiAddFontMemResourceEx@20 -NtGdiRemoveMergeFont@8 -NtGdiAddRemoteMMInstanceToDC@12 -NtGdiAlphaBlend@48 -NtGdiAngleArc@24 -NtGdiAnyLinkedFonts@0 -NtGdiFontIsLinked@4 -NtGdiArcInternal@40 -NtGdiBeginPath@4 -NtGdiBitBlt@44 -NtGdiCancelDC@4 -NtGdiCheckBitmapBits@32 -NtGdiCloseFigure@4 -NtGdiClearBitmapAttributes@8 -NtGdiClearBrushAttributes@8 -NtGdiColorCorrectPalette@24 -NtGdiCombineRgn@16 -NtGdiCombineTransform@12 -NtGdiComputeXformCoefficients@4 -NtGdiConsoleTextOut@16 -NtGdiConvertMetafileRect@8 -NtGdiCreateBitmap@20 -NtGdiCreateClientObj@4 -NtGdiCreateColorSpace@4 -NtGdiCreateColorTransform@32 -NtGdiCreateCompatibleBitmap@12 -NtGdiCreateCompatibleDC@4 -NtGdiCreateDIBBrush@24 -NtGdiCreateDIBitmapInternal@44 -NtGdiCreateDIBSection@36 -NtGdiCreateEllipticRgn@16 -NtGdiCreateHalftonePalette@4 -NtGdiCreateHatchBrushInternal@12 -NtGdiCreateMetafileDC@4 -NtGdiCreatePaletteInternal@8 -NtGdiCreatePatternBrushInternal@12 -NtGdiCreatePen@16 -NtGdiCreateRectRgn@16 -NtGdiCreateRoundRectRgn@24 -NtGdiCreateServerMetaFile@24 -NtGdiCreateSolidBrush@8 -NtGdiD3dContextCreate@16 -NtGdiD3dContextDestroy@4 -NtGdiD3dContextDestroyAll@4 -NtGdiD3dValidateTextureStageState@4 -NtGdiD3dDrawPrimitives2@28 -NtGdiDdGetDriverState@4 -NtGdiDdAddAttachedSurface@12 -NtGdiDdAlphaBlt@12 -NtGdiDdAttachSurface@8 -NtGdiDdBeginMoCompFrame@8 -NtGdiDdBlt@12 -NtGdiDdCanCreateSurface@8 -NtGdiDdCanCreateD3DBuffer@8 -NtGdiDdColorControl@8 -NtGdiDdCreateDirectDrawObject@4 -NtGdiDdCreateSurface@32 -NtGdiDdCreateD3DBuffer@32 -NtGdiDdCreateMoComp@8 -NtGdiDdCreateSurfaceObject@24 -NtGdiDdDeleteDirectDrawObject@4 -NtGdiDdDeleteSurfaceObject@4 -NtGdiDdDestroyMoComp@8 -NtGdiDdDestroySurface@8 -NtGdiDdDestroyD3DBuffer@4 -NtGdiDdEndMoCompFrame@8 -NtGdiDdFlip@20 -NtGdiDdFlipToGDISurface@8 -NtGdiDdGetAvailDriverMemory@8 -NtGdiDdGetBltStatus@8 -NtGdiDdGetDC@8 -NtGdiDdGetDriverInfo@8 -NtGdiDdGetDxHandle@12 -NtGdiDdGetFlipStatus@8 -NtGdiDdGetInternalMoCompInfo@8 -NtGdiDdGetMoCompBuffInfo@8 -NtGdiDdGetMoCompGuids@8 -NtGdiDdGetMoCompFormats@8 -NtGdiDdGetScanLine@8 -NtGdiDdLock@12 -NtGdiDdLockD3D@8 -NtGdiDdQueryDirectDrawObject@44 -NtGdiDdQueryMoCompStatus@8 -NtGdiDdReenableDirectDrawObject@8 -NtGdiDdReleaseDC@4 -NtGdiDdRenderMoComp@8 -NtGdiDdResetVisrgn@8 -NtGdiDdSetColorKey@8 -NtGdiDdSetExclusiveMode@8 -NtGdiDdSetGammaRamp@12 -NtGdiDdCreateSurfaceEx@12 -NtGdiDdSetOverlayPosition@12 -NtGdiDdUnattachSurface@8 -NtGdiDdUnlock@8 -NtGdiDdUnlockD3D@8 -NtGdiDdUpdateOverlay@12 -NtGdiDdWaitForVerticalBlank@8 -NtGdiDvpCanCreateVideoPort@8 -NtGdiDvpColorControl@8 -NtGdiDvpCreateVideoPort@8 -NtGdiDvpDestroyVideoPort@8 -NtGdiDvpFlipVideoPort@16 -NtGdiDvpGetVideoPortBandwidth@8 -NtGdiDvpGetVideoPortField@8 -NtGdiDvpGetVideoPortFlipStatus@8 -NtGdiDvpGetVideoPortInputFormats@8 -NtGdiDvpGetVideoPortLine@8 -NtGdiDvpGetVideoPortOutputFormats@8 -NtGdiDvpGetVideoPortConnectInfo@8 -NtGdiDvpGetVideoSignalStatus@8 -NtGdiDvpUpdateVideoPort@16 -NtGdiDvpWaitForVideoPortSync@8 -NtGdiDvpAcquireNotification@12 -NtGdiDvpReleaseNotification@8 -NtGdiDxgGenericThunk@24 -NtGdiDeleteClientObj@4 -NtGdiDeleteColorSpace@4 -NtGdiDeleteColorTransform@8 -NtGdiDeleteObjectApp@4 -NtGdiDescribePixelFormat@16 -NtGdiGetPerBandInfo@8 -NtGdiDoBanding@16 -NtGdiDoPalette@24 -NtGdiDrawEscape@16 -NtGdiEllipse@20 -NtGdiEnableEudc@4 -NtGdiEndDoc@4 -NtGdiEndPage@4 -NtGdiEndPath@4 -NtGdiEnumFontChunk@20 -NtGdiEnumFontClose@4 -NtGdiEnumFontOpen@28 -NtGdiEnumObjects@16 -NtGdiEqualRgn@8 -NtGdiEudcLoadUnloadLink@28 -NtGdiExcludeClipRect@20 -NtGdiExtCreatePen@44 -NtGdiExtCreateRegion@12 -NtGdiExtEscape@32 -NtGdiExtFloodFill@20 -NtGdiExtGetObjectW@12 -NtGdiExtSelectClipRgn@12 -NtGdiExtTextOutW@36 -NtGdiFillPath@4 -NtGdiFillRgn@12 -NtGdiFlattenPath@4 -NtGdiFlushUserBatch@0 -NtGdiFlush@0 -NtGdiForceUFIMapping@8 -NtGdiFrameRgn@20 -NtGdiFullscreenControl@20 -NtGdiGetAndSetDCDword@16 -NtGdiGetAppClipBox@8 -NtGdiGetBitmapBits@12 -NtGdiGetBitmapDimension@8 -NtGdiGetBoundsRect@12 -NtGdiGetCharABCWidthsW@24 -NtGdiGetCharacterPlacementW@24 -NtGdiGetCharSet@4 -NtGdiGetCharWidthW@24 -NtGdiGetCharWidthInfo@8 -NtGdiGetColorAdjustment@8 -NtGdiGetColorSpaceforBitmap@4 -NtGdiGetDCDword@12 -NtGdiGetDCforBitmap@4 -NtGdiGetDCObject@8 -NtGdiGetDCPoint@12 -NtGdiGetDeviceCaps@8 -NtGdiGetDeviceGammaRamp@8 -NtGdiGetDeviceCapsAll@8 -NtGdiGetDIBitsInternal@36 -NtGdiGetETM@8 -NtGdiGetEudcTimeStampEx@12 -NtGdiGetFontData@20 -NtGdiGetFontResourceInfoInternalW@28 -NtGdiGetGlyphIndicesW@20 -NtGdiGetGlyphIndicesWInternal@24 -NtGdiGetGlyphOutline@32 -NtGdiGetKerningPairs@12 -NtGdiGetLinkedUFIs@12 -NtGdiGetMiterLimit@8 -NtGdiGetMonitorID@12 -NtGdiGetNearestColor@8 -NtGdiGetNearestPaletteIndex@8 -NtGdiGetObjectBitmapHandle@8 -NtGdiGetOutlineTextMetricsInternalW@16 -NtGdiGetPath@16 -NtGdiGetPixel@12 -NtGdiGetRandomRgn@12 -NtGdiGetRasterizerCaps@8 -NtGdiGetRealizationInfo@12 -NtGdiGetRegionData@12 -NtGdiGetRgnBox@8 -NtGdiGetServerMetaFileBits@28 -NtGdiGetSpoolMessage@16 -NtGdiGetStats@20 -NtGdiGetStockObject@4 -NtGdiGetStringBitmapW@20 -NtGdiGetSystemPaletteUse@4 -NtGdiGetTextCharsetInfo@12 -NtGdiGetTextExtent@20 -NtGdiGetTextExtentExW@32 -NtGdiGetTextFaceW@16 -NtGdiGetTextMetricsW@12 -NtGdiGetTransform@12 -NtGdiGetUFI@24 -NtGdiGetEmbUFI@28 -NtGdiGetUFIPathname@40 -NtGdiGetEmbedFonts@0 -NtGdiChangeGhostFont@8 -NtGdiAddEmbFontToDC@8 -NtGdiGetFontUnicodeRanges@8 -NtGdiGetWidthTable@28 -NtGdiGradientFill@24 -NtGdiHfontCreate@20 -NtGdiIcmBrushInfo@32 -NtGdiInit@0 -NtGdiInitSpool@0 -NtGdiIntersectClipRect@20 -NtGdiInvertRgn@8 -NtGdiLineTo@12 -NtGdiMakeFontDir@20 -NtGdiMakeInfoDC@8 -NtGdiMaskBlt@52 -NtGdiModifyWorldTransform@12 -NtGdiMonoBitmap@4 -NtGdiMoveTo@16 -NtGdiOffsetClipRgn@12 -NtGdiOffsetRgn@12 -NtGdiOpenDCW@32 -NtGdiPatBlt@24 -NtGdiPolyPatBlt@20 -NtGdiPathToRegion@4 -NtGdiPlgBlt@44 -NtGdiPolyDraw@16 -NtGdiPolyPolyDraw@20 -NtGdiPolyTextOutW@16 -NtGdiPtInRegion@12 -NtGdiPtVisible@12 -NtGdiQueryFonts@12 -NtGdiQueryFontAssocInfo@4 -NtGdiRectangle@20 -NtGdiRectInRegion@8 -NtGdiRectVisible@8 -NtGdiRemoveFontResourceW@24 -NtGdiRemoveFontMemResourceEx@4 -NtGdiResetDC@20 -NtGdiResizePalette@8 -NtGdiRestoreDC@8 -NtGdiRoundRect@28 -NtGdiSaveDC@4 -NtGdiScaleViewportExtEx@24 -NtGdiScaleWindowExtEx@24 -NtGdiSelectBitmap@8 -NtGdiSelectBrush@8 -NtGdiSelectClipPath@8 -NtGdiSelectFont@8 -NtGdiSelectPen@8 -NtGdiSetBitmapAttributes@8 -NtGdiSetBitmapBits@12 -NtGdiSetBitmapDimension@16 -NtGdiSetBoundsRect@12 -NtGdiSetBrushAttributes@8 -NtGdiSetBrushOrg@16 -NtGdiSetColorAdjustment@8 -NtGdiSetColorSpace@8 -NtGdiSetDeviceGammaRamp@8 -NtGdiSetDIBitsToDeviceInternal@64 -NtGdiSetFontEnumeration@4 -NtGdiSetFontXform@12 -NtGdiSetIcmMode@12 -NtGdiSetLinkedUFIs@12 -NtGdiSetMagicColors@12 -NtGdiSetMetaRgn@4 -NtGdiSetMiterLimit@12 -NtGdiGetDeviceWidth@4 -NtGdiMirrorWindowOrg@4 -NtGdiSetLayout@12 -NtGdiSetPixel@16 -NtGdiSetPixelFormat@8 -NtGdiSetRectRgn@20 -NtGdiSetSystemPaletteUse@8 -NtGdiSetTextJustification@12 -NtGdiSetupPublicCFONT@12 -NtGdiSetVirtualResolution@20 -NtGdiSetSizeDevice@12 -NtGdiStartDoc@16 -NtGdiStartPage@4 -NtGdiStretchBlt@48 -NtGdiStretchDIBitsInternal@64 -NtGdiStrokeAndFillPath@4 -NtGdiStrokePath@4 -NtGdiSwapBuffers@4 -NtGdiTransformPoints@20 -NtGdiTransparentBlt@44 -NtGdiUnloadPrinterDriver@8 -NtGdiUnmapMemFont@4 -NtGdiUnrealizeObject@4 -NtGdiUpdateColors@4 -NtGdiWidenPath@4 -NtUserActivateKeyboardLayout@8 -NtUserAlterWindowStyle@12 -NtUserAssociateInputContext@12 -NtUserAttachThreadInput@12 -NtUserBeginPaint@8 -NtUserBitBltSysBmp@32 -NtUserBlockInput@4 -NtUserBuildHimcList@16 -NtUserBuildHwndList@28 -NtUserBuildNameList@16 -NtUserBuildPropList@16 -NtUserCallHwnd@8 -NtUserCallHwndLock@8 -NtUserCallHwndOpt@8 -NtUserCallHwndParam@12 -NtUserCallHwndParamLock@12 -NtUserCallMsgFilter@8 -NtUserCallNextHookEx@16 -NtUserCallNoParam@4 -NtUserCallOneParam@8 -NtUserCallTwoParam@12 -NtUserChangeClipboardChain@8 -NtUserChangeDisplaySettings@20 -NtUserCheckImeHotKey@8 -NtUserCheckMenuItem@12 -NtUserChildWindowFromPointEx@16 -NtUserClipCursor@4 -NtUserCloseClipboard@0 -NtUserCloseDesktop@4 -NtUserCloseWindowStation@4 -NtUserConsoleControl@12 -NtUserConvertMemHandle@8 -NtUserCopyAcceleratorTable@12 -NtUserCountClipboardFormats@0 -NtUserCreateAcceleratorTable@8 -NtUserCreateCaret@16 -NtUserCreateDesktop@20 -NtUserCreateInputContext@4 -NtUserCreateLocalMemHandle@16 -NtUserCreateWindowEx@60 -NtUserCreateWindowStation@28 -NtUserDdeGetQualityOfService@12 -NtUserDdeInitialize@20 -NtUserDdeSetQualityOfService@12 -NtUserDeferWindowPos@32 -NtUserDefSetText@8 -NtUserDeleteMenu@12 -NtUserDestroyAcceleratorTable@4 -NtUserDestroyCursor@8 -NtUserDestroyInputContext@4 -NtUserDestroyMenu@4 -NtUserDestroyWindow@4 -NtUserDisableThreadIme@4 -NtUserDispatchMessage@4 -NtUserDragDetect@12 -NtUserDragObject@20 -NtUserDrawAnimatedRects@16 -NtUserDrawCaption@16 -NtUserDrawCaptionTemp@28 -NtUserDrawIconEx@44 -NtUserDrawMenuBarTemp@20 -NtUserEmptyClipboard@0 -NtUserEnableMenuItem@12 -NtUserEnableScrollBar@12 -NtUserEndDeferWindowPosEx@8 -NtUserEndMenu@0 -NtUserEndPaint@8 -NtUserEnumDisplayDevices@16 -;NtUserEnumDisplayMonitors@16 -NtUserEnumDisplaySettings@16 -NtUserEvent@4 -NtUserExcludeUpdateRgn@8 -NtUserFillWindow@16 -;NtUserFindExistingCursorIcon@12 -NtUserFindWindowEx@20 -NtUserFlashWindowEx@4 -NtUserGetAltTabInfo@24 -NtUserGetAncestor@8 -;NtUserGetAppImeLevel@4 -NtUserGetAsyncKeyState@4 -NtUserGetAtomName@8 -NtUserGetCaretBlinkTime@0 -NtUserGetCaretPos@4 -;NtUserGetClassInfo@20 -NtUserGetClassName@12 -NtUserGetClipboardData@8 -NtUserGetClipboardFormatName@12 -NtUserGetClipboardOwner@0 -NtUserGetClipboardSequenceNumber@0 -NtUserGetClipboardViewer@0 -NtUserGetClipCursor@4 -NtUserGetComboBoxInfo@8 -NtUserGetControlBrush@12 -NtUserGetControlColor@16 -NtUserGetCPD@12 -NtUserGetCursorFrameInfo@16 -NtUserGetCursorInfo@4 -NtUserGetDC@4 -NtUserGetDCEx@12 -NtUserGetDoubleClickTime@0 -NtUserGetForegroundWindow@0 -NtUserGetGuiResources@8 -NtUserGetGUIThreadInfo@8 -NtUserGetIconInfo@24 -NtUserGetIconSize@16 -NtUserGetImeHotKey@16 -NtUserGetImeInfoEx@8 -NtUserGetInternalWindowPos@12 -NtUserGetKeyboardLayoutList@8 -NtUserGetKeyboardLayoutName@4 -NtUserGetKeyboardState@4 -NtUserGetKeyNameText@12 -NtUserGetKeyState@4 -NtUserGetListBoxInfo@4 -NtUserGetMenuBarInfo@16 -NtUserGetMenuIndex@8 -NtUserGetMenuItemRect@16 -NtUserGetMessage@16 -NtUserGetMouseMovePointsEx@20 -NtUserGetObjectInformation@20 -NtUserGetOpenClipboardWindow@0 -NtUserGetPriorityClipboardFormat@8 -NtUserGetProcessWindowStation@0 -NtUserGetRawInputBuffer@12 -NtUserGetRawInputData@20 -NtUserGetRawInputDeviceInfo@16 -NtUserGetRawInputDeviceList@12 -NtUserGetRegisteredRawInputDevices@12 -NtUserGetScrollBarInfo@12 -NtUserGetSystemMenu@8 -NtUserGetThreadDesktop@8 -NtUserGetThreadState@4 -NtUserGetTitleBarInfo@8 -NtUserGetUpdateRect@12 -NtUserGetUpdateRgn@12 -NtUserGetWindowDC@4 -NtUserGetWindowPlacement@8 -NtUserGetWOWClass@8 -NtUserHardErrorControl@12 -NtUserHideCaret@4 -NtUserHiliteMenuItem@16 -NtUserImpersonateDdeClientWindow@8 -NtUserInitialize@12 -NtUserInitializeClientPfnArrays@16 -;NtUserInitTask@48 -NtUserInternalGetWindowText@12 -NtUserInvalidateRect@12 -NtUserInvalidateRgn@12 -NtUserIsClipboardFormatAvailable@4 -NtUserKillTimer@8 -NtUserLoadKeyboardLayoutEx@28 -NtUserLockWindowStation@4 -NtUserLockWindowUpdate@4 -NtUserLockWorkStation@0 -NtUserMapVirtualKeyEx@16 -NtUserMenuItemFromPoint@16 -NtUserMessageCall@28 -NtUserMinMaximize@12 -NtUserMNDragLeave@0 -NtUserMNDragOver@8 -NtUserModifyUserStartupInfoFlags@8 -NtUserMoveWindow@24 -NtUserNotifyIMEStatus@12 -NtUserNotifyProcessCreate@16 -NtUserNotifyWinEvent@16 -NtUserOpenClipboard@8 -NtUserOpenDesktop@12 -NtUserOpenInputDesktop@12 -NtUserOpenWindowStation@8 -NtUserPaintDesktop@4 -NtUserPeekMessage@20 -NtUserPostMessage@16 -NtUserPostThreadMessage@16 -NtUserPrintWindow@12 -NtUserProcessConnect@12 -NtUserQueryInformationThread@20 -NtUserQueryInputContext@8 -NtUserQuerySendMessage@4 -NtUserQueryUserCounters@20 -NtUserQueryWindow@8 -NtUserRealChildWindowFromPoint@12 -NtUserRealInternalGetMessage@24 -NtUserRealWaitMessageEx@8 -NtUserRedrawWindow@16 -NtUserRegisterClassExWOW@28 -NtUserRegisterUserApiHook@16 -NtUserRegisterHotKey@16 -NtUserRegisterRawInputDevices@12 -NtUserRegisterTasklist@4 -NtUserRegisterWindowMessage@4 -NtUserRemoveMenu@12 -NtUserRemoveProp@8 -NtUserResolveDesktop@16 -NtUserResolveDesktopForWOW@4 -NtUserSBGetParms@16 -NtUserScrollDC@28 -NtUserScrollWindowEx@32 -NtUserSelectPalette@12 -NtUserSendInput@12 -NtUserSetActiveWindow@4 -NtUserSetAppImeLevel@8 -NtUserSetCapture@4 -NtUserSetClassLong@16 -NtUserSetClassWord@12 -NtUserSetClipboardData@12 -NtUserSetClipboardViewer@4 -NtUserSetConsoleReserveKeys@8 -NtUserSetCursor@4 -NtUserSetCursorContents@8 -;NtUserSetCursorIconData@16 -NtUserSetDbgTag@8 -NtUserSetFocus@4 -NtUserSetImeHotKey@20 -NtUserSetImeInfoEx@4 -NtUserSetImeOwnerWindow@8 -NtUserSetInformationProcess@16 -NtUserSetInformationThread@16 -NtUserSetInternalWindowPos@16 -NtUserSetKeyboardState@4 -NtUserSetLogonNotifyWindow@4 -NtUserSetMenu@12 -NtUserSetMenuContextHelpId@8 -NtUserSetMenuDefaultItem@12 -NtUserSetMenuFlagRtoL@4 -NtUserSetObjectInformation@16 -NtUserSetParent@8 -NtUserSetProcessWindowStation@4 -NtUserSetProp@12 -NtUserSetRipFlags@8 -NtUserSetScrollInfo@16 -NtUserSetShellWindowEx@8 -NtUserSetSysColors@16 -NtUserSetSystemCursor@8 -NtUserSetSystemMenu@8 -NtUserSetSystemTimer@16 -NtUserSetThreadDesktop@4 -NtUserSetThreadLayoutHandles@8 -NtUserSetThreadState@8 -NtUserSetTimer@16 -NtUserSetWindowFNID@8 -NtUserSetWindowLong@16 -NtUserSetWindowPlacement@8 -NtUserSetWindowPos@28 -NtUserSetWindowRgn@12 -NtUserSetWindowsHookAW@12 -NtUserSetWindowsHookEx@24 -NtUserSetWindowStationUser@16 -NtUserSetWindowWord@12 -NtUserSetWinEventHook@32 -NtUserShowCaret@4 -NtUserShowScrollBar@12 -NtUserShowWindow@8 -NtUserShowWindowAsync@8 -NtUserSoundSentry@0 -NtUserSwitchDesktop@4 -NtUserSystemParametersInfo@16 -NtUserTestForInteractiveUser@4 -NtUserThunkedMenuInfo@8 -NtUserThunkedMenuItemInfo@24 -NtUserToUnicodeEx@28 -NtUserTrackMouseEvent@4 -NtUserTrackPopupMenuEx@24 -NtUserCalcMenuBar@20 -NtUserPaintMenuBar@24 -NtUserTranslateAccelerator@12 -NtUserTranslateMessage@8 -NtUserUnhookWindowsHookEx@4 -NtUserUnhookWinEvent@4 -NtUserUnloadKeyboardLayout@4 -NtUserUnlockWindowStation@4 -;NtUserUnregisterClass@12 -NtUserUnregisterUserApiHook@0 -NtUserUnregisterHotKey@8 -NtUserUpdateInputContext@12 -NtUserUpdateInstance@12 -NtUserUpdateLayeredWindow@40 -NtUserGetLayeredWindowAttributes@16 -NtUserSetLayeredWindowAttributes@16 -NtUserUpdatePerUserSystemParameters@8 -NtUserUserHandleGrantAccess@12 -NtUserValidateHandleSecure@8 -NtUserValidateRect@8 -NtUserValidateTimerCallback@12 -NtUserVkKeyScanEx@12 -NtUserWaitForInputIdle@12 -NtUserWaitForMsgAndEvent@4 -NtUserWaitMessage@0 -NtUserWin32PoolAllocationStats@24 -NtUserWindowFromPoint@8 -NtUserYieldTask@0 -NtUserRemoteConnect@12 -NtUserRemoteRedrawRectangle@16 -NtUserRemoteRedrawScreen@0 -NtUserRemoteStopScreenUpdates@0 -NtUserCtxDisplayIOCtl@12 -NtGdiEngAssociateSurface@12 -NtGdiEngCreateBitmap@24 -NtGdiEngCreateDeviceSurface@16 -NtGdiEngCreateDeviceBitmap@16 -NtGdiEngCreatePalette@24 -NtGdiEngComputeGlyphSet@12 -NtGdiEngCopyBits@24 -NtGdiEngDeletePalette@4 -NtGdiEngDeleteSurface@4 -NtGdiEngEraseSurface@12 -NtGdiEngUnlockSurface@4 -NtGdiEngLockSurface@4 -NtGdiEngBitBlt@44 -NtGdiEngStretchBlt@44 -NtGdiEngPlgBlt@44 -NtGdiEngMarkBandingSurface@4 -NtGdiEngStrokePath@32 -NtGdiEngFillPath@28 -NtGdiEngStrokeAndFillPath@40 -NtGdiEngPaint@20 -NtGdiEngLineTo@36 -NtGdiEngAlphaBlend@28 -NtGdiEngGradientFill@40 -NtGdiEngTransparentBlt@32 -NtGdiEngTextOut@40 -NtGdiEngStretchBltROP@52 -NtGdiXLATEOBJ_cGetPalette@16 -NtGdiXLATEOBJ_iXlate@8 -NtGdiXLATEOBJ_hGetColorTransform@4 -NtGdiCLIPOBJ_bEnum@12 -NtGdiCLIPOBJ_cEnumStart@20 -NtGdiCLIPOBJ_ppoGetPath@4 -NtGdiEngDeletePath@4 -NtGdiEngCreateClip@0 -NtGdiEngDeleteClip@4 -NtGdiBRUSHOBJ_ulGetBrushColor@4 -NtGdiBRUSHOBJ_pvAllocRbrush@8 -NtGdiBRUSHOBJ_pvGetRbrush@4 -NtGdiBRUSHOBJ_hGetColorTransform@4 -NtGdiXFORMOBJ_bApplyXform@20 -NtGdiXFORMOBJ_iGetXform@8 -NtGdiFONTOBJ_vGetInfo@12 -NtGdiFONTOBJ_pxoGetXform@4 -NtGdiFONTOBJ_cGetGlyphs@20 -NtGdiFONTOBJ_pifi@4 -NtGdiFONTOBJ_pfdg@4 -NtGdiFONTOBJ_pQueryGlyphAttrs@8 -NtGdiFONTOBJ_pvTrueTypeFontFile@8 -NtGdiFONTOBJ_cGetAllGlyphHandles@8 -NtGdiSTROBJ_bEnum@12 -NtGdiSTROBJ_bEnumPositionsOnly@12 -NtGdiSTROBJ_bGetAdvanceWidths@16 -NtGdiSTROBJ_vEnumStart@4 -NtGdiSTROBJ_dwGetCodePage@4 -NtGdiPATHOBJ_vGetBounds@8 -NtGdiPATHOBJ_bEnum@8 -NtGdiPATHOBJ_vEnumStart@4 -NtGdiPATHOBJ_vEnumStartClipLines@16 -NtGdiPATHOBJ_bEnumClipLines@12 -NtGdiGetDhpdev@4 -NtGdiEngCheckAbort@4 -NtGdiHT_Get8BPPFormatPalette@16 -NtGdiHT_Get8BPPMaskPalette@24 -NtGdiUpdateTransform@4 -NtGdiSetPUMPDOBJ@16 -NtGdiBRUSHOBJ_DeleteRbrush@8 -NtGdiUMPDEngFreeUserMem@4 -NtGdiUnmapMemFont@4 -NtGdiDrawStream@12 - diff --git a/rostests/apitests/w32kdll/w32kdll_ros/w32kdll_ros.rbuild b/rostests/apitests/w32kdll/w32kdll_ros/w32kdll_ros.rbuild deleted file mode 100644 index b81ecad236c..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_ros/w32kdll_ros.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - - win32ksys - main.c - diff --git a/rostests/apitests/w32kdll/w32kdll_vista/CMakeLists.txt b/rostests/apitests/w32kdll/w32kdll_vista/CMakeLists.txt deleted file mode 100644 index a70bec57cf7..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_vista/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ - -add_library(w32kdll_vista SHARED main.c w32kdll_vista.S) -set_entrypoint(w32kdll_vista 0) -target_link_libraries(w32kdll_vista ${CMAKE_CURRENT_SOURCE_DIR}/w32kdll_vista.def) -add_dependencies(w32kdll_vista psdk ) -add_importlib_target(w32kdll_vista.def) diff --git a/rostests/apitests/w32kdll/w32kdll_vista/main.c b/rostests/apitests/w32kdll/w32kdll_vista/main.c deleted file mode 100644 index ea545d282a5..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_vista/main.c +++ /dev/null @@ -1,31 +0,0 @@ -#include - -#ifdef BUILD_DLL - #define DLL_EXPORT __declspec(dllexport) -#else - #define DLL_EXPORT -#endif - -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - // attach to process - // return FALSE to fail DLL load - break; - - case DLL_PROCESS_DETACH: - // detach from process - break; - - case DLL_THREAD_ATTACH: - // attach to thread - break; - - case DLL_THREAD_DETACH: - // detach from thread - break; - } - return TRUE; // succesful -} diff --git a/rostests/apitests/w32kdll/w32kdll_vista/w32kdll_vista-x86.db b/rostests/apitests/w32kdll/w32kdll_vista/w32kdll_vista-x86.db deleted file mode 100644 index 1ab85e69981..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_vista/w32kdll_vista-x86.db +++ /dev/null @@ -1,775 +0,0 @@ -# -# win32k systemcalls taken from Windows Vista SP0 x86 -# -NtGdiAbortDoc 1 -NtGdiAbortPath 1 -NtGdiAddFontResourceW 6 -NtGdiAddRemoteFontToDC 4 -NtGdiAddFontMemResourceEx 5 -NtGdiRemoveMergeFont 2 -NtGdiAddRemoteMMInstanceToDC 3 -NtGdiAlphaBlend 12 -NtGdiAngleArc 6 -NtGdiAnyLinkedFonts 0 -NtGdiFontIsLinked 1 -NtGdiArcInternal 10 -NtGdiBeginPath 1 -NtGdiBitBlt 11 -NtGdiCancelDC 1 -NtGdiCheckBitmapBits 8 -NtGdiCloseFigure 1 -NtGdiClearBitmapAttributes 2 -NtGdiClearBrushAttributes 2 -NtGdiColorCorrectPalette 6 -NtGdiCombineRgn 4 -NtGdiCombineTransform 3 -NtGdiComputeXformCoefficients 1 -NtGdiConfigureOPMProtectedOutput 4 -NtGdiConsoleTextOut 4 -NtGdiConvertMetafileRect 2 -NtGdiCreateBitmap 5 -NtGdiCreateClientObj 1 -NtGdiCreateColorSpace 1 -NtGdiCreateColorTransform 8 -NtGdiCreateCompatibleBitmap 3 -NtGdiCreateCompatibleDC 1 -NtGdiCreateDIBBrush 6 -NtGdiCreateDIBitmapInternal 11 -NtGdiCreateDIBSection 9 -NtGdiCreateEllipticRgn 4 -NtGdiCreateHalftonePalette 1 -NtGdiCreateHatchBrushInternal 3 -NtGdiCreateMetafileDC 1 -NtGdiCreateOPMProtectedOutputs 5 -NtGdiCreatePaletteInternal 2 -NtGdiCreatePatternBrushInternal 3 -NtGdiCreatePen 4 -NtGdiCreateRectRgn 4 -NtGdiCreateRoundRectRgn 6 -NtGdiCreateServerMetaFile 6 -NtGdiCreateSolidBrush 2 -NtGdiD3dContextCreate 4 -NtGdiD3dContextDestroy 1 -NtGdiD3dContextDestroyAll 1 -NtGdiD3dValidateTextureStageState 1 -NtGdiD3dDrawPrimitives2 7 -NtGdiDdGetDriverState 1 -NtGdiDdAddAttachedSurface 3 -NtGdiDdAlphaBlt 3 -NtGdiDdAttachSurface 2 -NtGdiDdBeginMoCompFrame 2 -NtGdiDdBlt 3 -NtGdiDdCanCreateSurface 2 -NtGdiDdCanCreateD3DBuffer 2 -NtGdiDdColorControl 2 -NtGdiDdCreateDirectDrawObject 1 -NtGdiDdCreateSurface 8 -NtGdiDdCreateD3DBuffer 8 -NtGdiDdCreateMoComp 2 -NtGdiDdCreateSurfaceObject 6 -NtGdiDdDeleteDirectDrawObject 1 -NtGdiDdDeleteSurfaceObject 1 -NtGdiDdDestroyMoComp 2 -NtGdiDdDestroySurface 2 -NtGdiDdDestroyD3DBuffer 1 -NtGdiDdEndMoCompFrame 2 -NtGdiDdFlip 5 -NtGdiDdFlipToGDISurface 2 -NtGdiDdGetAvailDriverMemory 2 -NtGdiDdGetBltStatus 2 -NtGdiDdGetDC 2 -NtGdiDdGetDriverInfo 2 -NtGdiDdGetDxHandle 3 -NtGdiDdGetFlipStatus 2 -NtGdiDdGetInternalMoCompInfo 2 -NtGdiDdGetMoCompBuffInfo 2 -NtGdiDdGetMoCompGuids 2 -NtGdiDdGetMoCompFormats 2 -NtGdiDdGetScanLine 2 -NtGdiDdLock 3 -NtGdiDdLockD3D 2 -NtGdiDdQueryDirectDrawObject 11 -NtGdiDdQueryMoCompStatus 2 -NtGdiDdReenableDirectDrawObject 2 -NtGdiDdReleaseDC 1 -NtGdiDdRenderMoComp 2 -NtGdiDdResetVisrgn 2 -NtGdiDdSetColorKey 2 -NtGdiDdSetExclusiveMode 2 -NtGdiDdSetGammaRamp 3 -NtGdiDdCreateSurfaceEx 3 -NtGdiDdSetOverlayPosition 3 -NtGdiDdUnattachSurface 2 -NtGdiDdUnlock 2 -NtGdiDdUnlockD3D 2 -NtGdiDdUpdateOverlay 3 -NtGdiDdWaitForVerticalBlank 2 -NtGdiDvpCanCreateVideoPort 2 -NtGdiDvpColorControl 2 -NtGdiDvpCreateVideoPort 2 -NtGdiDvpDestroyVideoPort 2 -NtGdiDvpFlipVideoPort 4 -NtGdiDvpGetVideoPortBandwidth 2 -NtGdiDvpGetVideoPortField 2 -NtGdiDvpGetVideoPortFlipStatus 2 -NtGdiDvpGetVideoPortInputFormats 2 -NtGdiDvpGetVideoPortLine 2 -NtGdiDvpGetVideoPortOutputFormats 2 -NtGdiDvpGetVideoPortConnectInfo 2 -NtGdiDvpGetVideoSignalStatus 2 -NtGdiDvpUpdateVideoPort 4 -NtGdiDvpWaitForVideoPortSync 2 -NtGdiDvpAcquireNotification 3 -NtGdiDvpReleaseNotification 2 -NtGdiDxgGenericThunk 6 -NtGdiDeleteClientObj 1 -NtGdiDeleteColorSpace 1 -NtGdiDeleteColorTransform 2 -NtGdiDeleteObjectApp 1 -NtGdiDescribePixelFormat 4 -NtGdiDestroyOPMProtectedOutput 1 -NtGdiGetPerBandInfo 2 -NtGdiDoBanding 4 -NtGdiDoPalette 6 -NtGdiDrawEscape 4 -NtGdiEllipse 5 -NtGdiEnableEudc 1 -NtGdiEndDoc 1 -NtGdiEndPage 1 -NtGdiEndPath 1 -NtGdiEnumFontChunk 5 -NtGdiEnumFontClose 1 -NtGdiEnumFontOpen 7 -NtGdiEnumObjects 4 -NtGdiEqualRgn 2 -NtGdiEudcLoadUnloadLink 7 -NtGdiExcludeClipRect 5 -NtGdiExtCreatePen 11 -NtGdiExtCreateRegion 3 -NtGdiExtEscape 8 -NtGdiExtFloodFill 5 -NtGdiExtGetObjectW 3 -NtGdiExtSelectClipRgn 3 -NtGdiExtTextOutW 9 -NtGdiFillPath 1 -NtGdiFillRgn 3 -NtGdiFlattenPath 1 -NtGdiFlush 0 -NtGdiForceUFIMapping 2 -NtGdiFrameRgn 5 -NtGdiFullscreenControl 5 -NtGdiGetAndSetDCDword 4 -NtGdiGetAppClipBox 2 -NtGdiGetBitmapBits 3 -NtGdiGetBitmapDimension 2 -NtGdiGetBoundsRect 3 -NtGdiGetCertificate 4 -NtGdiGetCertificateSize 3 -NtGdiGetCharABCWidthsW 6 -NtGdiGetCharacterPlacementW 6 -NtGdiGetCharSet 1 -NtGdiGetCharWidthW 6 -NtGdiGetCharWidthInfo 2 -NtGdiGetColorAdjustment 2 -NtGdiGetColorSpaceforBitmap 1 -NtGdiGetCOPPCompatibleOPMInformation 3 -NtGdiGetDCDword 3 -NtGdiGetDCforBitmap 1 -NtGdiGetDCObject 2 -NtGdiGetDCPoint 3 -NtGdiGetDeviceCaps 2 -NtGdiGetDeviceGammaRamp 2 -NtGdiGetDeviceCapsAll 2 -NtGdiGetDIBitsInternal 9 -NtGdiGetETM 2 -NtGdiGetEudcTimeStampEx 3 -NtGdiGetFontData 5 -NtGdiGetFontResourceInfoInternalW 7 -NtGdiGetGlyphIndicesW 5 -NtGdiGetGlyphIndicesWInternal 6 -NtGdiGetGlyphOutline 8 -NtGdiGetOPMInformation 3 -NtGdiGetKerningPairs 3 -NtGdiGetLinkedUFIs 3 -NtGdiGetMiterLimit 2 -NtGdiGetMonitorID 3 -NtGdiGetNearestColor 2 -NtGdiGetNearestPaletteIndex 2 -NtGdiGetObjectBitmapHandle 2 -NtGdiGetOPMRandomNumber 2 -NtGdiGetOutlineTextMetricsInternalW 4 -NtGdiGetPath 4 -NtGdiGetPixel 3 -NtGdiGetRandomRgn 3 -NtGdiGetRasterizerCaps 2 -NtGdiGetRealizationInfo 3 -NtGdiGetRegionData 3 -NtGdiGetRgnBox 2 -NtGdiGetServerMetaFileBits 7 -NtGdiGetSpoolMessage 4 -NtGdiGetStats 5 -NtGdiGetStockObject 1 -NtGdiGetStringBitmapW 5 -NtGdiGetSuggestedOPMProtectedOutputArraySize 2 -NtGdiGetSystemPaletteUse 1 -NtGdiGetTextCharsetInfo 3 -NtGdiGetTextExtent 5 -NtGdiGetTextExtentExW 8 -NtGdiGetTextFaceW 4 -NtGdiGetTextMetricsW 3 -NtGdiGetTransform 3 -NtGdiGetUFI 6 -NtGdiGetEmbUFI 7 -NtGdiGetUFIPathname 10 -NtGdiGetEmbedFonts 0 -NtGdiChangeGhostFont 2 -NtGdiAddEmbFontToDC 2 -NtGdiGetFontUnicodeRanges 2 -NtGdiGetWidthTable 7 -NtGdiGradientFill 6 -NtGdiHfontCreate 5 -NtGdiIcmBrushInfo 8 -NtGdiInit 0 -NtGdiInitSpool 0 -NtGdiIntersectClipRect 5 -NtGdiInvertRgn 2 -NtGdiLineTo 3 -NtGdiMakeFontDir 5 -NtGdiMakeInfoDC 2 -NtGdiMaskBlt 13 -NtGdiModifyWorldTransform 3 -NtGdiMonoBitmap 1 -NtGdiMoveTo 4 -NtGdiOffsetClipRgn 3 -NtGdiOffsetRgn 3 -NtGdiOpenDCW 8 -NtGdiPatBlt 6 -NtGdiPolyPatBlt 5 -NtGdiPathToRegion 1 -NtGdiPlgBlt 11 -NtGdiPolyDraw 4 -NtGdiPolyPolyDraw 5 -NtGdiPolyTextOutW 4 -NtGdiPtInRegion 3 -NtGdiPtVisible 3 -NtGdiQueryFonts 3 -NtGdiQueryFontAssocInfo 1 -NtGdiRectangle 5 -NtGdiRectInRegion 2 -NtGdiRectVisible 2 -NtGdiRemoveFontResourceW 6 -NtGdiRemoveFontMemResourceEx 1 -NtGdiResetDC 5 -NtGdiResizePalette 2 -NtGdiRestoreDC 2 -NtGdiRoundRect 7 -NtGdiSaveDC 1 -NtGdiScaleViewportExtEx 6 -NtGdiScaleWindowExtEx 6 -NtGdiSelectBitmap 2 -NtGdiSelectBrush 2 -NtGdiSelectClipPath 2 -NtGdiSelectFont 2 -NtGdiSelectPen 2 -NtGdiSetBitmapAttributes 2 -NtGdiSetBitmapBits 3 -NtGdiSetBitmapDimension 4 -NtGdiSetBoundsRect 3 -NtGdiSetBrushAttributes 2 -NtGdiSetBrushOrg 4 -NtGdiSetColorAdjustment 2 -NtGdiSetColorSpace 2 -NtGdiSetDeviceGammaRamp 2 -NtGdiSetDIBitsToDeviceInternal 16 -NtGdiSetFontEnumeration 1 -NtGdiSetFontXform 3 -NtGdiSetIcmMode 3 -NtGdiSetLinkedUFIs 3 -NtGdiSetMagicColors 3 -NtGdiSetMetaRgn 1 -NtGdiSetMiterLimit 3 -NtGdiGetDeviceWidth 1 -NtGdiMirrorWindowOrg 1 -NtGdiSetLayout 3 -NtGdiSetOPMSigningKeyAndSequenceNumbers 2 -NtGdiSetPixel 4 -NtGdiSetPixelFormat 2 -NtGdiSetRectRgn 5 -NtGdiSetSystemPaletteUse 2 -NtGdiSetTextJustification 3 -NtGdiSetupPublicCFONT 3 -NtGdiSetVirtualResolution 5 -NtGdiSetSizeDevice 3 -NtGdiStartDoc 4 -NtGdiStartPage 1 -NtGdiStretchBlt 12 -NtGdiStretchDIBitsInternal 16 -NtGdiStrokeAndFillPath 1 -NtGdiStrokePath 1 -NtGdiSwapBuffers 1 -NtGdiTransformPoints 5 -NtGdiTransparentBlt 11 -NtGdiUnloadPrinterDriver 2 -NtGdiUnmapMemFont 1 -NtGdiUnrealizeObject 1 -NtGdiUpdateColors 1 -NtGdiWidenPath 1 -NtUserActivateKeyboardLayout 2 -NtUserAddClipboardFormatListener 1 -NtUserAlterWindowStyle 3 -NtUserAssociateInputContext 3 -NtUserAttachThreadInput 3 -NtUserBeginPaint 2 -NtUserBitBltSysBmp 8 -NtUserBlockInput 1 -NtUserBuildHimcList 4 -NtUserBuildHwndList 7 -NtUserBuildNameList 4 -NtUserBuildPropList 4 -NtUserCallHwnd 2 -NtUserCallHwndLock 2 -NtUserCallHwndOpt 2 -NtUserCallHwndParam 3 -NtUserCallHwndParamLock 3 -NtUserCallMsgFilter 2 -NtUserCallNextHookEx 4 -NtUserCallNoParam 1 -NtUserCallOneParam 2 -NtUserCallTwoParam 3 -NtUserChangeClipboardChain 2 -NtUserChangeDisplaySettings 4 -NtUserCheckAccessForIntegrityLevel 3 -NtUserCheckDesktopByThreadId 1 -NtUserCheckWindowThreadDesktop 3 -NtUserCheckImeHotKey 2 -NtUserCheckMenuItem 3 -NtUserChildWindowFromPointEx 4 -NtUserClipCursor 1 -NtUserCloseClipboard 0 -NtUserCloseDesktop 1 -NtUserCloseWindowStation 1 -NtUserConsoleControl 3 -NtUserConvertMemHandle 2 -NtUserCopyAcceleratorTable 3 -NtUserCountClipboardFormats 0 -NtUserCreateAcceleratorTable 2 -NtUserCreateCaret 4 -NtUserCreateDesktopEx 6 -NtUserCreateInputContext 1 -NtUserCreateLocalMemHandle 4 -NtUserCreateWindowEx 15 -NtUserCreateWindowStation 7 -NtUserDdeInitialize 5 -NtUserDeferWindowPos 8 -NtUserDefSetText 2 -NtUserDeleteMenu 3 -NtUserDestroyAcceleratorTable 1 -NtUserDestroyCursor 2 -NtUserDestroyInputContext 1 -NtUserDestroyMenu 1 -NtUserDestroyWindow 1 -NtUserDisableThreadIme 1 -NtUserDispatchMessage 1 -NtUserDoSoundConnect 0 -NtUserDoSoundDisconnect 0 -NtUserDragDetect 3 -NtUserDragObject 5 -NtUserDrawAnimatedRects 4 -NtUserDrawCaption 4 -NtUserDrawCaptionTemp 7 -NtUserDrawIconEx 11 -NtUserDrawMenuBarTemp 5 -NtUserEmptyClipboard 0 -NtUserEnableMenuItem 3 -NtUserEnableScrollBar 3 -NtUserEndDeferWindowPosEx 2 -NtUserEndMenu 0 -NtUserEndPaint 2 -NtUserEnumDisplayDevices 4 -NtUserEnumDisplayMonitors 4 -NtUserEnumDisplaySettings 4 -NtUserEvent 1 -NtUserExcludeUpdateRgn 2 -NtUserFillWindow 4 -NtUserFindExistingCursorIcon 3 -NtUserFindWindowEx 5 -NtUserFlashWindowEx 1 -NtUserFrostCrashedWindow 2 -NtUserGetAltTabInfo 6 -NtUserGetAncestor 2 -NtUserGetAppImeLevel 1 -NtUserGetAsyncKeyState 1 -NtUserGetAtomName 2 -NtUserGetCaretBlinkTime 0 -NtUserGetCaretPos 1 -NtUserGetClassInfoEx 5 -NtUserGetClassName 3 -NtUserGetClipboardData 2 -NtUserGetClipboardFormatName 3 -NtUserGetClipboardOwner 0 -NtUserGetClipboardSequenceNumber 0 -NtUserGetClipboardViewer 0 -NtUserGetClipCursor 1 -NtUserGetComboBoxInfo 2 -NtUserGetControlBrush 3 -NtUserGetControlColor 4 -NtUserGetCPD 3 -NtUserGetCursorFrameInfo 4 -NtUserGetCursorInfo 1 -NtUserGetDC 1 -NtUserGetDCEx 3 -NtUserGetDoubleClickTime 0 -NtUserGetForegroundWindow 0 -NtUserGetGuiResources 2 -NtUserGetGUIThreadInfo 2 -NtUserGetIconInfo 6 -NtUserGetIconSize 4 -NtUserGetImeHotKey 4 -NtUserGetImeInfoEx 2 -NtUserGetInternalWindowPos 3 -NtUserGetKeyboardLayoutList 2 -NtUserGetKeyboardLayoutName 1 -NtUserGetKeyboardState 1 -NtUserGetKeyNameText 3 -NtUserGetKeyState 1 -NtUserGetListBoxInfo 1 -NtUserGetMenuBarInfo 4 -NtUserGetMenuIndex 2 -NtUserGetMenuItemRect 4 -NtUserGetMessage 4 -NtUserGetMouseMovePointsEx 5 -NtUserGetObjectInformation 5 -NtUserGetOpenClipboardWindow 0 -NtUserGetPriorityClipboardFormat 2 -NtUserGetProcessWindowStation 0 -NtUserGetRawInputBuffer 3 -NtUserGetRawInputData 5 -NtUserGetRawInputDeviceInfo 4 -NtUserGetRawInputDeviceList 3 -NtUserGetRegisteredRawInputDevices 3 -NtUserGetScrollBarInfo 3 -NtUserGetSystemMenu 2 -NtUserGetThreadDesktop 2 -NtUserGetThreadState 1 -NtUserGetTitleBarInfo 2 -NtUserGetUpdatedClipboardFormats 3 -NtUserGetUpdateRect 3 -NtUserGetUpdateRgn 3 -NtUserGetWindowDC 1 -NtUserGetWindowPlacement 2 -NtUserGetWOWClass 2 -NtUserGhostWindowFromHungWindow 1 -NtUserHardErrorControl 3 -NtUserHideCaret 1 -NtUserHiliteMenuItem 4 -NtUserHungWindowFromGhostWindow 1 -NtUserImpersonateDdeClientWindow 2 -NtUserInitialize 2 -NtUserInitializeClientPfnArrays 4 -NtUserInitTask 12 -NtUserInternalGetWindowText 3 -NtUserInternalGetWindowIcon 2 -NtUserInvalidateRect 3 -NtUserInvalidateRgn 3 -NtUserIsClipboardFormatAvailable 1 -NtUserKillTimer 2 -NtUserLoadKeyboardLayoutEx 7 -NtUserLockWindowStation 1 -NtUserLockWindowUpdate 1 -NtUserLockWorkStation 0 -NtUserLogicalToPhysicalPoint 2 -NtUserMapVirtualKeyEx 4 -NtUserMenuItemFromPoint 4 -NtUserMessageCall 7 -NtUserMinMaximize 3 -NtUserMNDragLeave 0 -NtUserMNDragOver 2 -NtUserModifyUserStartupInfoFlags 2 -NtUserMoveWindow 6 -NtUserNotifyIMEStatus 3 -NtUserNotifyProcessCreate 4 -NtUserNotifyWinEvent 4 -NtUserOpenClipboard 2 -NtUserOpenDesktop 3 -NtUserOpenInputDesktop 3 -NtUserOpenThreadDesktop 5 -NtUserOpenWindowStation 2 -NtUserPaintDesktop 1 -NtUserPaintMonitor 3 -NtUserPeekMessage 5 -NtUserPhysicalToLogicalPoint 2 -NtUserPostMessage 4 -NtUserPostThreadMessage 4 -NtUserPrintWindow 3 -NtUserProcessConnect 2 -NtUserQueryInformationThread 4 -NtUserQueryInputContext 2 -NtUserQuerySendMessage 1 -NtUserQueryWindow 2 -NtUserRealChildWindowFromPoint 3 -NtUserRealInternalGetMessage 6 -NtUserRealWaitMessageEx 2 -NtUserRedrawWindow 4 -NtUserRegisterClassExWOW 7 -NtUserRegisterErrorReportingDialog 2 -NtUserRegisterUserApiHook 4 -NtUserRegisterHotKey 4 -NtUserRegisterRawInputDevices 3 -NtUserRegisterTasklist 1 -NtUserRegisterWindowMessage 1 -NtUserRemoveClipboardFormatListener 1 -NtUserRemoveMenu 3 -NtUserRemoveProp 2 -NtUserResolveDesktop 4 -NtUserResolveDesktopForWOW 1 -NtUserSBGetParms 4 -NtUserScrollDC 7 -NtUserScrollWindowEx 8 -NtUserSelectPalette 3 -NtUserSendInput 3 -NtUserSetActiveWindow 1 -NtUserSetAppImeLevel 2 -NtUserSetCapture 1 -NtUserSetClassLong 4 -NtUserSetClassWord 3 -NtUserSetClipboardData 3 -NtUserSetClipboardViewer 1 -NtUserSetConsoleReserveKeys 2 -NtUserSetCursor 1 -NtUserSetCursorContents 2 -NtUserSetCursorIconData 4 -NtUserSetFocus 1 -NtUserSetImeHotKey 5 -NtUserSetImeInfoEx 1 -NtUserSetImeOwnerWindow 2 -NtUserSetInformationProcess 4 -NtUserSetInformationThread 4 -NtUserSetInternalWindowPos 4 -NtUserSetKeyboardState 1 -NtUserSetMenu 3 -NtUserSetMenuContextHelpId 2 -NtUserSetMenuDefaultItem 3 -NtUserSetMenuFlagRtoL 1 -NtUserSetObjectInformation 4 -NtUserSetParent 2 -NtUserSetProcessWindowStation 1 -NtUserGetProp 2 -NtUserSetProp 3 -NtUserSetScrollInfo 4 -NtUserSetShellWindowEx 2 -NtUserSetSysColors 4 -NtUserSetSystemCursor 2 -NtUserSetSystemMenu 2 -NtUserSetSystemTimer 3 -NtUserSetThreadDesktop 1 -NtUserSetThreadLayoutHandles 2 -NtUserSetThreadState 2 -NtUserSetTimer 4 -NtUserSetProcessDPIAware 0 -NtUserSetWindowFNID 2 -NtUserSetWindowLong 4 -NtUserSetWindowPlacement 2 -NtUserSetWindowPos 7 -NtUserSetWindowRgn 3 -NtUserGetWindowRgnEx 3 -NtUserSetWindowRgnEx 3 -NtUserSetWindowsHookAW 3 -NtUserSetWindowsHookEx 6 -NtUserSetWindowStationUser 4 -NtUserSetWindowWord 3 -NtUserSetWinEventHook 8 -NtUserShowCaret 1 -NtUserShowScrollBar 3 -NtUserShowWindow 2 -NtUserShowWindowAsync 2 -NtUserSoundSentry 0 -NtUserSwitchDesktop 2 -NtUserSystemParametersInfo 4 -NtUserTestForInteractiveUser 1 -NtUserThunkedMenuInfo 2 -NtUserThunkedMenuItemInfo 6 -NtUserToUnicodeEx 7 -NtUserTrackMouseEvent 1 -NtUserTrackPopupMenuEx 6 -NtUserCalcMenuBar 5 -NtUserPaintMenuBar 6 -NtUserTranslateAccelerator 3 -NtUserTranslateMessage 2 -NtUserUnhookWindowsHookEx 1 -NtUserUnhookWinEvent 1 -NtUserUnloadKeyboardLayout 1 -NtUserUnlockWindowStation 1 -NtUserUnregisterClass 3 -NtUserUnregisterUserApiHook 0 -NtUserUnregisterHotKey 2 -NtUserUpdateInputContext 3 -NtUserUpdateInstance 3 -NtUserUpdateLayeredWindow 10 -NtUserGetLayeredWindowAttributes 4 -NtUserSetLayeredWindowAttributes 4 -NtUserUpdatePerUserSystemParameters 1 -NtUserUserHandleGrantAccess 3 -NtUserValidateHandleSecure 1 -NtUserValidateRect 2 -NtUserValidateTimerCallback 1 -NtUserVkKeyScanEx 3 -NtUserWaitForInputIdle 3 -NtUserWaitForMsgAndEvent 1 -NtUserWaitMessage 0 -NtUserWin32PoolAllocationStats 6 -NtUserWindowFromPhysicalPoint 2 -NtUserWindowFromPoint 2 -NtUserYieldTask 0 -NtUserRemoteConnect 3 -NtUserRemoteRedrawRectangle 4 -NtUserRemoteRedrawScreen 0 -NtUserRemoteStopScreenUpdates 0 -NtUserCtxDisplayIOCtl 3 -NtUserRegisterSessionPort 1 -NtUserUnregisterSessionPort 0 -NtUserUpdateWindowTransform 3 -NtUserDwmStartRedirection 1 -NtUserDwmStopRedirection 0 -NtUserDwmHintDxUpdate 2 -NtUserDwmGetDxRgn 3 -NtUserGetWindowMinimizeRect 2 -NtGdiEngAssociateSurface 3 -NtGdiEngCreateBitmap 6 -NtGdiEngCreateDeviceSurface 4 -NtGdiEngCreateDeviceBitmap 4 -NtGdiEngCreatePalette 6 -NtGdiEngComputeGlyphSet 3 -NtGdiEngCopyBits 6 -NtGdiEngDeletePalette 1 -NtGdiEngDeleteSurface 1 -NtGdiEngEraseSurface 3 -NtGdiEngUnlockSurface 1 -NtGdiEngLockSurface 1 -NtGdiEngBitBlt 11 -NtGdiEngStretchBlt 11 -NtGdiEngPlgBlt 11 -NtGdiEngMarkBandingSurface 1 -NtGdiEngStrokePath 8 -NtGdiEngFillPath 7 -NtGdiEngStrokeAndFillPath 10 -NtGdiEngPaint 5 -NtGdiEngLineTo 9 -NtGdiEngAlphaBlend 7 -NtGdiEngGradientFill 10 -NtGdiEngTransparentBlt 8 -NtGdiEngTextOut 10 -NtGdiEngStretchBltROP 13 -NtGdiXLATEOBJ_cGetPalette 4 -NtGdiXLATEOBJ_iXlate 2 -NtGdiXLATEOBJ_hGetColorTransform 1 -NtGdiCLIPOBJ_bEnum 3 -NtGdiCLIPOBJ_cEnumStart 5 -NtGdiCLIPOBJ_ppoGetPath 1 -NtGdiEngDeletePath 1 -NtGdiEngCreateClip 0 -NtGdiEngDeleteClip 1 -NtGdiBRUSHOBJ_ulGetBrushColor 1 -NtGdiBRUSHOBJ_pvAllocRbrush 2 -NtGdiBRUSHOBJ_pvGetRbrush 1 -NtGdiBRUSHOBJ_hGetColorTransform 1 -NtGdiXFORMOBJ_bApplyXform 5 -NtGdiXFORMOBJ_iGetXform 2 -NtGdiFONTOBJ_vGetInfo 3 -NtGdiFONTOBJ_pxoGetXform 1 -NtGdiFONTOBJ_cGetGlyphs 5 -NtGdiFONTOBJ_pifi 1 -NtGdiFONTOBJ_pfdg 1 -NtGdiFONTOBJ_pQueryGlyphAttrs 2 -NtGdiFONTOBJ_pvTrueTypeFontFile 2 -NtGdiFONTOBJ_cGetAllGlyphHandles 2 -NtGdiSTROBJ_bEnum 3 -NtGdiSTROBJ_bEnumPositionsOnly 3 -NtGdiSTROBJ_bGetAdvanceWidths 4 -NtGdiSTROBJ_vEnumStart 1 -NtGdiSTROBJ_dwGetCodePage 1 -NtGdiPATHOBJ_vGetBounds 2 -NtGdiPATHOBJ_bEnum 2 -NtGdiPATHOBJ_vEnumStart 1 -NtGdiPATHOBJ_vEnumStartClipLines 4 -NtGdiPATHOBJ_bEnumClipLines 3 -NtGdiGetDhpdev 1 -NtGdiEngCheckAbort 1 -NtGdiHT_Get8BPPFormatPalette 4 -NtGdiHT_Get8BPPMaskPalette 6 -NtGdiUpdateTransform 1 -NtGdiSetPUMPDOBJ 4 -NtGdiBRUSHOBJ_DeleteRbrush 2 -NtGdiUMPDEngFreeUserMem 1 -NtGdiDrawStream 3 -NtGdiDwmGetDirtyRgn 5 -NtGdiDwmGetSurfaceData 2 -NtGdiDdDDICreateAllocation 1 -NtGdiDdDDIQueryResourceInfo 1 -NtGdiDdDDIOpenResource 1 -NtGdiDdDDIDestroyAllocation 1 -NtGdiDdDDISetAllocationPriority 1 -NtGdiDdDDIQueryAllocationResidency 1 -NtGdiDdDDICreateDevice 1 -NtGdiDdDDIDestroyDevice 1 -NtGdiDdDDICreateContext 1 -NtGdiDdDDIDestroyContext 1 -NtGdiDdDDICreateSynchronizationObject 1 -NtGdiDdDDIDestroySynchronizationObject 1 -NtGdiDdDDIWaitForSynchronizationObject 1 -NtGdiDdDDISignalSynchronizationObject 1 -NtGdiDdDDIGetRuntimeData 1 -NtGdiDdDDIQueryAdapterInfo 1 -NtGdiDdDDILock 1 -NtGdiDdDDIUnlock 1 -NtGdiDdDDIGetDisplayModeList 1 -NtGdiDdDDISetDisplayMode 1 -NtGdiDdDDIGetMultisampleMethodList 1 -NtGdiDdDDIPresent 1 -NtGdiDdDDIRender 1 -NtGdiDdDDIOpenAdapterFromDeviceName 1 -NtGdiDdDDIOpenAdapterFromHdc 1 -NtGdiDdDDICloseAdapter 1 -NtGdiDdDDIGetSharedPrimaryHandle 1 -NtGdiDdDDIEscape 1 -NtGdiDdDDIQueryStatistics 1 -NtGdiDdDDISetVidPnSourceOwner 1 -NtGdiDdDDIGetPresentHistory 1 -NtGdiDdDDICreateOverlay 1 -NtGdiDdDDIUpdateOverlay 1 -NtGdiDdDDIFlipOverlay 1 -NtGdiDdDDIDestroyOverlay 1 -NtGdiDdDDIWaitForVerticalBlankEvent 1 -NtGdiDdDDISetGammaRamp 1 -NtGdiDdDDIGetDeviceState 1 -NtGdiDdDDICreateDCFromMemory 1 -NtGdiDdDDIDestroyDCFromMemory 1 -NtGdiDdDDISetContextSchedulingPriority 1 -NtGdiDdDDIGetContextSchedulingPriority 1 -NtGdiDdDDISetProcessSchedulingPriorityClass 2 -NtGdiDdDDIGetProcessSchedulingPriorityClass 2 -NtGdiDdDDIReleaseProcessVidPnSourceOwners 1 -NtGdiDdDDIGetScanLine 1 -NtGdiDdDDISetQueuedLimit 1 -NtGdiDdDDIPollDisplayChildren 1 -NtGdiDdDDIInvalidateActiveVidPn 1 -NtGdiDdDDICheckOcclusion 1 -NtGdiDdDDIWaitForIdle 1 -NtGdiDdDDICheckMonitorPowerState 1 -NtGdiDdDDICheckExclusiveOwnership 0 -NtGdiDdDDISetDisplayPrivateDriverFormat 1 -NtGdiDdDDISharedPrimaryLockNotification 1 -NtGdiDdDDISharedPrimaryUnLockNotification 1 -NtGdiMakeObjectXferable 2 -NtGdiMakeObjectUnXferable 1 -NtGdiGetNumberOfPhysicalMonitors 2 -NtGdiGetPhysicalMonitors 4 -NtGdiGetPhysicalMonitorDescription 3 -NtGdiDestroyPhysicalMonitor 1 -NtGdiDDCCIGetVCPFeature 5 -NtGdiDDCCISetVCPFeature 3 -NtGdiDDCCISaveCurrentSettings 1 -NtGdiDDCCIGetCapabilitiesStringLength 2 -NtGdiDDCCIGetCapabilitiesString 3 -NtGdiDDCCIGetTimingReport 2 -NtUserSetMirrorRendering 2 -NtUserShowSystemCursor 1 diff --git a/rostests/apitests/w32kdll/w32kdll_vista/w32kdll_vista.S b/rostests/apitests/w32kdll/w32kdll_vista/w32kdll_vista.S deleted file mode 100644 index 728252b3ad8..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_vista/w32kdll_vista.S +++ /dev/null @@ -1,5414 +0,0 @@ -/* FILE: System Call Stubs for Native API - * COPYRIGHT: See COPYING in the top level directory - * PURPOSE: obj-i386\lib\win32ksys\win32k.S - * PROGRAMMER: Computer Generated File. See tools/nci/ncitool.c - * REMARK: DO NOT EDIT OR COMMIT MODIFICATIONS TO THIS FILE - */ - - -#include - -.global _NtGdiAbortDoc@4 -_NtGdiAbortDoc@4: - movl $0x1000, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiAbortPath@4 -_NtGdiAbortPath@4: - movl $0x1001, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiAddFontResourceW@24 -_NtGdiAddFontResourceW@24: - movl $0x1002, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiAddRemoteFontToDC@16 -_NtGdiAddRemoteFontToDC@16: - movl $0x1003, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiAddFontMemResourceEx@20 -_NtGdiAddFontMemResourceEx@20: - movl $0x1004, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiRemoveMergeFont@8 -_NtGdiRemoveMergeFont@8: - movl $0x1005, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiAddRemoteMMInstanceToDC@12 -_NtGdiAddRemoteMMInstanceToDC@12: - movl $0x1006, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiAlphaBlend@48 -_NtGdiAlphaBlend@48: - movl $0x1007, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x30 - -.global _NtGdiAngleArc@24 -_NtGdiAngleArc@24: - movl $0x1008, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiAnyLinkedFonts@0 -_NtGdiAnyLinkedFonts@0: - movl $0x1009, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtGdiFontIsLinked@4 -_NtGdiFontIsLinked@4: - movl $0x100a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiArcInternal@40 -_NtGdiArcInternal@40: - movl $0x100b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x28 - -.global _NtGdiBeginPath@4 -_NtGdiBeginPath@4: - movl $0x100c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiBitBlt@44 -_NtGdiBitBlt@44: - movl $0x100d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiCancelDC@4 -_NtGdiCancelDC@4: - movl $0x100e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiCheckBitmapBits@32 -_NtGdiCheckBitmapBits@32: - movl $0x100f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiCloseFigure@4 -_NtGdiCloseFigure@4: - movl $0x1010, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiClearBitmapAttributes@8 -_NtGdiClearBitmapAttributes@8: - movl $0x1011, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiClearBrushAttributes@8 -_NtGdiClearBrushAttributes@8: - movl $0x1012, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiColorCorrectPalette@24 -_NtGdiColorCorrectPalette@24: - movl $0x1013, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiCombineRgn@16 -_NtGdiCombineRgn@16: - movl $0x1014, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiCombineTransform@12 -_NtGdiCombineTransform@12: - movl $0x1015, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiComputeXformCoefficients@4 -_NtGdiComputeXformCoefficients@4: - movl $0x1016, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiConfigureOPMProtectedOutput@16 -_NtGdiConfigureOPMProtectedOutput@16: - movl $0x1017, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiConsoleTextOut@16 -_NtGdiConsoleTextOut@16: - movl $0x1018, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiConvertMetafileRect@8 -_NtGdiConvertMetafileRect@8: - movl $0x1019, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiCreateBitmap@20 -_NtGdiCreateBitmap@20: - movl $0x101a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiCreateClientObj@4 -_NtGdiCreateClientObj@4: - movl $0x101b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiCreateColorSpace@4 -_NtGdiCreateColorSpace@4: - movl $0x101c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiCreateColorTransform@32 -_NtGdiCreateColorTransform@32: - movl $0x101d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiCreateCompatibleBitmap@12 -_NtGdiCreateCompatibleBitmap@12: - movl $0x101e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiCreateCompatibleDC@4 -_NtGdiCreateCompatibleDC@4: - movl $0x101f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiCreateDIBBrush@24 -_NtGdiCreateDIBBrush@24: - movl $0x1020, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiCreateDIBitmapInternal@44 -_NtGdiCreateDIBitmapInternal@44: - movl $0x1021, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiCreateDIBSection@36 -_NtGdiCreateDIBSection@36: - movl $0x1022, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x24 - -.global _NtGdiCreateEllipticRgn@16 -_NtGdiCreateEllipticRgn@16: - movl $0x1023, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiCreateHalftonePalette@4 -_NtGdiCreateHalftonePalette@4: - movl $0x1024, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiCreateHatchBrushInternal@12 -_NtGdiCreateHatchBrushInternal@12: - movl $0x1025, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiCreateMetafileDC@4 -_NtGdiCreateMetafileDC@4: - movl $0x1026, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiCreateOPMProtectedOutputs@20 -_NtGdiCreateOPMProtectedOutputs@20: - movl $0x1027, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiCreatePaletteInternal@8 -_NtGdiCreatePaletteInternal@8: - movl $0x1028, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiCreatePatternBrushInternal@12 -_NtGdiCreatePatternBrushInternal@12: - movl $0x1029, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiCreatePen@16 -_NtGdiCreatePen@16: - movl $0x102a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiCreateRectRgn@16 -_NtGdiCreateRectRgn@16: - movl $0x102b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiCreateRoundRectRgn@24 -_NtGdiCreateRoundRectRgn@24: - movl $0x102c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiCreateServerMetaFile@24 -_NtGdiCreateServerMetaFile@24: - movl $0x102d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiCreateSolidBrush@8 -_NtGdiCreateSolidBrush@8: - movl $0x102e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiD3dContextCreate@16 -_NtGdiD3dContextCreate@16: - movl $0x102f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiD3dContextDestroy@4 -_NtGdiD3dContextDestroy@4: - movl $0x1030, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiD3dContextDestroyAll@4 -_NtGdiD3dContextDestroyAll@4: - movl $0x1031, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiD3dValidateTextureStageState@4 -_NtGdiD3dValidateTextureStageState@4: - movl $0x1032, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiD3dDrawPrimitives2@28 -_NtGdiD3dDrawPrimitives2@28: - movl $0x1033, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiDdGetDriverState@4 -_NtGdiDdGetDriverState@4: - movl $0x1034, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdAddAttachedSurface@12 -_NtGdiDdAddAttachedSurface@12: - movl $0x1035, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdAlphaBlt@12 -_NtGdiDdAlphaBlt@12: - movl $0x1036, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdAttachSurface@8 -_NtGdiDdAttachSurface@8: - movl $0x1037, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdBeginMoCompFrame@8 -_NtGdiDdBeginMoCompFrame@8: - movl $0x1038, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdBlt@12 -_NtGdiDdBlt@12: - movl $0x1039, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdCanCreateSurface@8 -_NtGdiDdCanCreateSurface@8: - movl $0x103a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdCanCreateD3DBuffer@8 -_NtGdiDdCanCreateD3DBuffer@8: - movl $0x103b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdColorControl@8 -_NtGdiDdColorControl@8: - movl $0x103c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdCreateDirectDrawObject@4 -_NtGdiDdCreateDirectDrawObject@4: - movl $0x103d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdCreateSurface@32 -_NtGdiDdCreateSurface@32: - movl $0x103e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiDdCreateD3DBuffer@32 -_NtGdiDdCreateD3DBuffer@32: - movl $0x103f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiDdCreateMoComp@8 -_NtGdiDdCreateMoComp@8: - movl $0x1040, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdCreateSurfaceObject@24 -_NtGdiDdCreateSurfaceObject@24: - movl $0x1041, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiDdDeleteDirectDrawObject@4 -_NtGdiDdDeleteDirectDrawObject@4: - movl $0x1042, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDeleteSurfaceObject@4 -_NtGdiDdDeleteSurfaceObject@4: - movl $0x1043, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDestroyMoComp@8 -_NtGdiDdDestroyMoComp@8: - movl $0x1044, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdDestroySurface@8 -_NtGdiDdDestroySurface@8: - movl $0x1045, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdDestroyD3DBuffer@4 -_NtGdiDdDestroyD3DBuffer@4: - movl $0x1046, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdEndMoCompFrame@8 -_NtGdiDdEndMoCompFrame@8: - movl $0x1047, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdFlip@20 -_NtGdiDdFlip@20: - movl $0x1048, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiDdFlipToGDISurface@8 -_NtGdiDdFlipToGDISurface@8: - movl $0x1049, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetAvailDriverMemory@8 -_NtGdiDdGetAvailDriverMemory@8: - movl $0x104a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetBltStatus@8 -_NtGdiDdGetBltStatus@8: - movl $0x104b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetDC@8 -_NtGdiDdGetDC@8: - movl $0x104c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetDriverInfo@8 -_NtGdiDdGetDriverInfo@8: - movl $0x104d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetDxHandle@12 -_NtGdiDdGetDxHandle@12: - movl $0x104e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdGetFlipStatus@8 -_NtGdiDdGetFlipStatus@8: - movl $0x104f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetInternalMoCompInfo@8 -_NtGdiDdGetInternalMoCompInfo@8: - movl $0x1050, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetMoCompBuffInfo@8 -_NtGdiDdGetMoCompBuffInfo@8: - movl $0x1051, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetMoCompGuids@8 -_NtGdiDdGetMoCompGuids@8: - movl $0x1052, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetMoCompFormats@8 -_NtGdiDdGetMoCompFormats@8: - movl $0x1053, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetScanLine@8 -_NtGdiDdGetScanLine@8: - movl $0x1054, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdLock@12 -_NtGdiDdLock@12: - movl $0x1055, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdLockD3D@8 -_NtGdiDdLockD3D@8: - movl $0x1056, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdQueryDirectDrawObject@44 -_NtGdiDdQueryDirectDrawObject@44: - movl $0x1057, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiDdQueryMoCompStatus@8 -_NtGdiDdQueryMoCompStatus@8: - movl $0x1058, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdReenableDirectDrawObject@8 -_NtGdiDdReenableDirectDrawObject@8: - movl $0x1059, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdReleaseDC@4 -_NtGdiDdReleaseDC@4: - movl $0x105a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdRenderMoComp@8 -_NtGdiDdRenderMoComp@8: - movl $0x105b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdResetVisrgn@8 -_NtGdiDdResetVisrgn@8: - movl $0x105c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdSetColorKey@8 -_NtGdiDdSetColorKey@8: - movl $0x105d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdSetExclusiveMode@8 -_NtGdiDdSetExclusiveMode@8: - movl $0x105e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdSetGammaRamp@12 -_NtGdiDdSetGammaRamp@12: - movl $0x105f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdCreateSurfaceEx@12 -_NtGdiDdCreateSurfaceEx@12: - movl $0x1060, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdSetOverlayPosition@12 -_NtGdiDdSetOverlayPosition@12: - movl $0x1061, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdUnattachSurface@8 -_NtGdiDdUnattachSurface@8: - movl $0x1062, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdUnlock@8 -_NtGdiDdUnlock@8: - movl $0x1063, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdUnlockD3D@8 -_NtGdiDdUnlockD3D@8: - movl $0x1064, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdUpdateOverlay@12 -_NtGdiDdUpdateOverlay@12: - movl $0x1065, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdWaitForVerticalBlank@8 -_NtGdiDdWaitForVerticalBlank@8: - movl $0x1066, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpCanCreateVideoPort@8 -_NtGdiDvpCanCreateVideoPort@8: - movl $0x1067, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpColorControl@8 -_NtGdiDvpColorControl@8: - movl $0x1068, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpCreateVideoPort@8 -_NtGdiDvpCreateVideoPort@8: - movl $0x1069, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpDestroyVideoPort@8 -_NtGdiDvpDestroyVideoPort@8: - movl $0x106a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpFlipVideoPort@16 -_NtGdiDvpFlipVideoPort@16: - movl $0x106b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiDvpGetVideoPortBandwidth@8 -_NtGdiDvpGetVideoPortBandwidth@8: - movl $0x106c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpGetVideoPortField@8 -_NtGdiDvpGetVideoPortField@8: - movl $0x106d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpGetVideoPortFlipStatus@8 -_NtGdiDvpGetVideoPortFlipStatus@8: - movl $0x106e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpGetVideoPortInputFormats@8 -_NtGdiDvpGetVideoPortInputFormats@8: - movl $0x106f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpGetVideoPortLine@8 -_NtGdiDvpGetVideoPortLine@8: - movl $0x1070, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpGetVideoPortOutputFormats@8 -_NtGdiDvpGetVideoPortOutputFormats@8: - movl $0x1071, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpGetVideoPortConnectInfo@8 -_NtGdiDvpGetVideoPortConnectInfo@8: - movl $0x1072, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpGetVideoSignalStatus@8 -_NtGdiDvpGetVideoSignalStatus@8: - movl $0x1073, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpUpdateVideoPort@16 -_NtGdiDvpUpdateVideoPort@16: - movl $0x1074, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiDvpWaitForVideoPortSync@8 -_NtGdiDvpWaitForVideoPortSync@8: - movl $0x1075, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpAcquireNotification@12 -_NtGdiDvpAcquireNotification@12: - movl $0x1076, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDvpReleaseNotification@8 -_NtGdiDvpReleaseNotification@8: - movl $0x1077, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDxgGenericThunk@24 -_NtGdiDxgGenericThunk@24: - movl $0x1078, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiDeleteClientObj@4 -_NtGdiDeleteClientObj@4: - movl $0x1079, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDeleteColorSpace@4 -_NtGdiDeleteColorSpace@4: - movl $0x107a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDeleteColorTransform@8 -_NtGdiDeleteColorTransform@8: - movl $0x107b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDeleteObjectApp@4 -_NtGdiDeleteObjectApp@4: - movl $0x107c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDescribePixelFormat@16 -_NtGdiDescribePixelFormat@16: - movl $0x107d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiDestroyOPMProtectedOutput@4 -_NtGdiDestroyOPMProtectedOutput@4: - movl $0x107e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiGetPerBandInfo@8 -_NtGdiGetPerBandInfo@8: - movl $0x107f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDoBanding@16 -_NtGdiDoBanding@16: - movl $0x1080, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiDoPalette@24 -_NtGdiDoPalette@24: - movl $0x1081, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiDrawEscape@16 -_NtGdiDrawEscape@16: - movl $0x1082, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiEllipse@20 -_NtGdiEllipse@20: - movl $0x1083, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiEnableEudc@4 -_NtGdiEnableEudc@4: - movl $0x1084, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEndDoc@4 -_NtGdiEndDoc@4: - movl $0x1085, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEndPage@4 -_NtGdiEndPage@4: - movl $0x1086, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEndPath@4 -_NtGdiEndPath@4: - movl $0x1087, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEnumFontChunk@20 -_NtGdiEnumFontChunk@20: - movl $0x1088, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiEnumFontClose@4 -_NtGdiEnumFontClose@4: - movl $0x1089, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEnumFontOpen@28 -_NtGdiEnumFontOpen@28: - movl $0x108a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiEnumObjects@16 -_NtGdiEnumObjects@16: - movl $0x108b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiEqualRgn@8 -_NtGdiEqualRgn@8: - movl $0x108c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiEudcLoadUnloadLink@28 -_NtGdiEudcLoadUnloadLink@28: - movl $0x108d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiExcludeClipRect@20 -_NtGdiExcludeClipRect@20: - movl $0x108e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiExtCreatePen@44 -_NtGdiExtCreatePen@44: - movl $0x108f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiExtCreateRegion@12 -_NtGdiExtCreateRegion@12: - movl $0x1090, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiExtEscape@32 -_NtGdiExtEscape@32: - movl $0x1091, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiExtFloodFill@20 -_NtGdiExtFloodFill@20: - movl $0x1092, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiExtGetObjectW@12 -_NtGdiExtGetObjectW@12: - movl $0x1093, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiExtSelectClipRgn@12 -_NtGdiExtSelectClipRgn@12: - movl $0x1094, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiExtTextOutW@36 -_NtGdiExtTextOutW@36: - movl $0x1095, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x24 - -.global _NtGdiFillPath@4 -_NtGdiFillPath@4: - movl $0x1096, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiFillRgn@12 -_NtGdiFillRgn@12: - movl $0x1097, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiFlattenPath@4 -_NtGdiFlattenPath@4: - movl $0x1098, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiFlush@0 -_NtGdiFlush@0: - movl $0x1099, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtGdiForceUFIMapping@8 -_NtGdiForceUFIMapping@8: - movl $0x109a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiFrameRgn@20 -_NtGdiFrameRgn@20: - movl $0x109b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiFullscreenControl@20 -_NtGdiFullscreenControl@20: - movl $0x109c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiGetAndSetDCDword@16 -_NtGdiGetAndSetDCDword@16: - movl $0x109d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiGetAppClipBox@8 -_NtGdiGetAppClipBox@8: - movl $0x109e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetBitmapBits@12 -_NtGdiGetBitmapBits@12: - movl $0x109f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetBitmapDimension@8 -_NtGdiGetBitmapDimension@8: - movl $0x10a0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetBoundsRect@12 -_NtGdiGetBoundsRect@12: - movl $0x10a1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetCertificate@16 -_NtGdiGetCertificate@16: - movl $0x10a2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiGetCertificateSize@12 -_NtGdiGetCertificateSize@12: - movl $0x10a3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetCharABCWidthsW@24 -_NtGdiGetCharABCWidthsW@24: - movl $0x10a4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiGetCharacterPlacementW@24 -_NtGdiGetCharacterPlacementW@24: - movl $0x10a5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiGetCharSet@4 -_NtGdiGetCharSet@4: - movl $0x10a6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiGetCharWidthW@24 -_NtGdiGetCharWidthW@24: - movl $0x10a7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiGetCharWidthInfo@8 -_NtGdiGetCharWidthInfo@8: - movl $0x10a8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetColorAdjustment@8 -_NtGdiGetColorAdjustment@8: - movl $0x10a9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetColorSpaceforBitmap@4 -_NtGdiGetColorSpaceforBitmap@4: - movl $0x10aa, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiGetCOPPCompatibleOPMInformation@12 -_NtGdiGetCOPPCompatibleOPMInformation@12: - movl $0x10ab, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetDCDword@12 -_NtGdiGetDCDword@12: - movl $0x10ac, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetDCforBitmap@4 -_NtGdiGetDCforBitmap@4: - movl $0x10ad, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiGetDCObject@8 -_NtGdiGetDCObject@8: - movl $0x10ae, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetDCPoint@12 -_NtGdiGetDCPoint@12: - movl $0x10af, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetDeviceCaps@8 -_NtGdiGetDeviceCaps@8: - movl $0x10b0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetDeviceGammaRamp@8 -_NtGdiGetDeviceGammaRamp@8: - movl $0x10b1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetDeviceCapsAll@8 -_NtGdiGetDeviceCapsAll@8: - movl $0x10b2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetDIBitsInternal@36 -_NtGdiGetDIBitsInternal@36: - movl $0x10b3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x24 - -.global _NtGdiGetETM@8 -_NtGdiGetETM@8: - movl $0x10b4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetEudcTimeStampEx@12 -_NtGdiGetEudcTimeStampEx@12: - movl $0x10b5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetFontData@20 -_NtGdiGetFontData@20: - movl $0x10b6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiGetFontResourceInfoInternalW@28 -_NtGdiGetFontResourceInfoInternalW@28: - movl $0x10b7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiGetGlyphIndicesW@20 -_NtGdiGetGlyphIndicesW@20: - movl $0x10b8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiGetGlyphIndicesWInternal@24 -_NtGdiGetGlyphIndicesWInternal@24: - movl $0x10b9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiGetGlyphOutline@32 -_NtGdiGetGlyphOutline@32: - movl $0x10ba, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiGetOPMInformation@12 -_NtGdiGetOPMInformation@12: - movl $0x10bb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetKerningPairs@12 -_NtGdiGetKerningPairs@12: - movl $0x10bc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetLinkedUFIs@12 -_NtGdiGetLinkedUFIs@12: - movl $0x10bd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetMiterLimit@8 -_NtGdiGetMiterLimit@8: - movl $0x10be, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetMonitorID@12 -_NtGdiGetMonitorID@12: - movl $0x10bf, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetNearestColor@8 -_NtGdiGetNearestColor@8: - movl $0x10c0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetNearestPaletteIndex@8 -_NtGdiGetNearestPaletteIndex@8: - movl $0x10c1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetObjectBitmapHandle@8 -_NtGdiGetObjectBitmapHandle@8: - movl $0x10c2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetOPMRandomNumber@8 -_NtGdiGetOPMRandomNumber@8: - movl $0x10c3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetOutlineTextMetricsInternalW@16 -_NtGdiGetOutlineTextMetricsInternalW@16: - movl $0x10c4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiGetPath@16 -_NtGdiGetPath@16: - movl $0x10c5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiGetPixel@12 -_NtGdiGetPixel@12: - movl $0x10c6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetRandomRgn@12 -_NtGdiGetRandomRgn@12: - movl $0x10c7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetRasterizerCaps@8 -_NtGdiGetRasterizerCaps@8: - movl $0x10c8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetRealizationInfo@12 -_NtGdiGetRealizationInfo@12: - movl $0x10c9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetRegionData@12 -_NtGdiGetRegionData@12: - movl $0x10ca, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetRgnBox@8 -_NtGdiGetRgnBox@8: - movl $0x10cb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetServerMetaFileBits@28 -_NtGdiGetServerMetaFileBits@28: - movl $0x10cc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiGetSpoolMessage@16 -_NtGdiGetSpoolMessage@16: - movl $0x10cd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiGetStats@20 -_NtGdiGetStats@20: - movl $0x10ce, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiGetStockObject@4 -_NtGdiGetStockObject@4: - movl $0x10cf, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiGetStringBitmapW@20 -_NtGdiGetStringBitmapW@20: - movl $0x10d0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiGetSuggestedOPMProtectedOutputArraySize@8 -_NtGdiGetSuggestedOPMProtectedOutputArraySize@8: - movl $0x10d1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetSystemPaletteUse@4 -_NtGdiGetSystemPaletteUse@4: - movl $0x10d2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiGetTextCharsetInfo@12 -_NtGdiGetTextCharsetInfo@12: - movl $0x10d3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetTextExtent@20 -_NtGdiGetTextExtent@20: - movl $0x10d4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiGetTextExtentExW@32 -_NtGdiGetTextExtentExW@32: - movl $0x10d5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiGetTextFaceW@16 -_NtGdiGetTextFaceW@16: - movl $0x10d6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiGetTextMetricsW@12 -_NtGdiGetTextMetricsW@12: - movl $0x10d7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetTransform@12 -_NtGdiGetTransform@12: - movl $0x10d8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetUFI@24 -_NtGdiGetUFI@24: - movl $0x10d9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiGetEmbUFI@28 -_NtGdiGetEmbUFI@28: - movl $0x10da, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiGetUFIPathname@40 -_NtGdiGetUFIPathname@40: - movl $0x10db, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x28 - -.global _NtGdiGetEmbedFonts@0 -_NtGdiGetEmbedFonts@0: - movl $0x10dc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtGdiChangeGhostFont@8 -_NtGdiChangeGhostFont@8: - movl $0x10dd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiAddEmbFontToDC@8 -_NtGdiAddEmbFontToDC@8: - movl $0x10de, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetFontUnicodeRanges@8 -_NtGdiGetFontUnicodeRanges@8: - movl $0x10df, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetWidthTable@28 -_NtGdiGetWidthTable@28: - movl $0x10e0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiGradientFill@24 -_NtGdiGradientFill@24: - movl $0x10e1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiHfontCreate@20 -_NtGdiHfontCreate@20: - movl $0x10e2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiIcmBrushInfo@32 -_NtGdiIcmBrushInfo@32: - movl $0x10e3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiInit@0 -_NtGdiInit@0: - movl $0x10e4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtGdiInitSpool@0 -_NtGdiInitSpool@0: - movl $0x10e5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtGdiIntersectClipRect@20 -_NtGdiIntersectClipRect@20: - movl $0x10e6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiInvertRgn@8 -_NtGdiInvertRgn@8: - movl $0x10e7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiLineTo@12 -_NtGdiLineTo@12: - movl $0x10e8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiMakeFontDir@20 -_NtGdiMakeFontDir@20: - movl $0x10e9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiMakeInfoDC@8 -_NtGdiMakeInfoDC@8: - movl $0x10ea, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiMaskBlt@52 -_NtGdiMaskBlt@52: - movl $0x10eb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x34 - -.global _NtGdiModifyWorldTransform@12 -_NtGdiModifyWorldTransform@12: - movl $0x10ec, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiMonoBitmap@4 -_NtGdiMonoBitmap@4: - movl $0x10ed, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiMoveTo@16 -_NtGdiMoveTo@16: - movl $0x10ee, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiOffsetClipRgn@12 -_NtGdiOffsetClipRgn@12: - movl $0x10ef, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiOffsetRgn@12 -_NtGdiOffsetRgn@12: - movl $0x10f0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiOpenDCW@32 -_NtGdiOpenDCW@32: - movl $0x10f1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiPatBlt@24 -_NtGdiPatBlt@24: - movl $0x10f2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiPolyPatBlt@20 -_NtGdiPolyPatBlt@20: - movl $0x10f3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiPathToRegion@4 -_NtGdiPathToRegion@4: - movl $0x10f4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiPlgBlt@44 -_NtGdiPlgBlt@44: - movl $0x10f5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiPolyDraw@16 -_NtGdiPolyDraw@16: - movl $0x10f6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiPolyPolyDraw@20 -_NtGdiPolyPolyDraw@20: - movl $0x10f7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiPolyTextOutW@16 -_NtGdiPolyTextOutW@16: - movl $0x10f8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiPtInRegion@12 -_NtGdiPtInRegion@12: - movl $0x10f9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiPtVisible@12 -_NtGdiPtVisible@12: - movl $0x10fa, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiQueryFonts@12 -_NtGdiQueryFonts@12: - movl $0x10fb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiQueryFontAssocInfo@4 -_NtGdiQueryFontAssocInfo@4: - movl $0x10fc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiRectangle@20 -_NtGdiRectangle@20: - movl $0x10fd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiRectInRegion@8 -_NtGdiRectInRegion@8: - movl $0x10fe, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiRectVisible@8 -_NtGdiRectVisible@8: - movl $0x10ff, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiRemoveFontResourceW@24 -_NtGdiRemoveFontResourceW@24: - movl $0x1100, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiRemoveFontMemResourceEx@4 -_NtGdiRemoveFontMemResourceEx@4: - movl $0x1101, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiResetDC@20 -_NtGdiResetDC@20: - movl $0x1102, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiResizePalette@8 -_NtGdiResizePalette@8: - movl $0x1103, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiRestoreDC@8 -_NtGdiRestoreDC@8: - movl $0x1104, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiRoundRect@28 -_NtGdiRoundRect@28: - movl $0x1105, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiSaveDC@4 -_NtGdiSaveDC@4: - movl $0x1106, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiScaleViewportExtEx@24 -_NtGdiScaleViewportExtEx@24: - movl $0x1107, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiScaleWindowExtEx@24 -_NtGdiScaleWindowExtEx@24: - movl $0x1108, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiSelectBitmap@8 -_NtGdiSelectBitmap@8: - movl $0x1109, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSelectBrush@8 -_NtGdiSelectBrush@8: - movl $0x110a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSelectClipPath@8 -_NtGdiSelectClipPath@8: - movl $0x110b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSelectFont@8 -_NtGdiSelectFont@8: - movl $0x110c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSelectPen@8 -_NtGdiSelectPen@8: - movl $0x110d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSetBitmapAttributes@8 -_NtGdiSetBitmapAttributes@8: - movl $0x110e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSetBitmapBits@12 -_NtGdiSetBitmapBits@12: - movl $0x110f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetBitmapDimension@16 -_NtGdiSetBitmapDimension@16: - movl $0x1110, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiSetBoundsRect@12 -_NtGdiSetBoundsRect@12: - movl $0x1111, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetBrushAttributes@8 -_NtGdiSetBrushAttributes@8: - movl $0x1112, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSetBrushOrg@16 -_NtGdiSetBrushOrg@16: - movl $0x1113, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiSetColorAdjustment@8 -_NtGdiSetColorAdjustment@8: - movl $0x1114, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSetColorSpace@8 -_NtGdiSetColorSpace@8: - movl $0x1115, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSetDeviceGammaRamp@8 -_NtGdiSetDeviceGammaRamp@8: - movl $0x1116, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSetDIBitsToDeviceInternal@64 -_NtGdiSetDIBitsToDeviceInternal@64: - movl $0x1117, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x40 - -.global _NtGdiSetFontEnumeration@4 -_NtGdiSetFontEnumeration@4: - movl $0x1118, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiSetFontXform@12 -_NtGdiSetFontXform@12: - movl $0x1119, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetIcmMode@12 -_NtGdiSetIcmMode@12: - movl $0x111a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetLinkedUFIs@12 -_NtGdiSetLinkedUFIs@12: - movl $0x111b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetMagicColors@12 -_NtGdiSetMagicColors@12: - movl $0x111c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetMetaRgn@4 -_NtGdiSetMetaRgn@4: - movl $0x111d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiSetMiterLimit@12 -_NtGdiSetMiterLimit@12: - movl $0x111e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetDeviceWidth@4 -_NtGdiGetDeviceWidth@4: - movl $0x111f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiMirrorWindowOrg@4 -_NtGdiMirrorWindowOrg@4: - movl $0x1120, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiSetLayout@12 -_NtGdiSetLayout@12: - movl $0x1121, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetOPMSigningKeyAndSequenceNumbers@8 -_NtGdiSetOPMSigningKeyAndSequenceNumbers@8: - movl $0x1122, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSetPixel@16 -_NtGdiSetPixel@16: - movl $0x1123, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiSetPixelFormat@8 -_NtGdiSetPixelFormat@8: - movl $0x1124, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSetRectRgn@20 -_NtGdiSetRectRgn@20: - movl $0x1125, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiSetSystemPaletteUse@8 -_NtGdiSetSystemPaletteUse@8: - movl $0x1126, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSetTextJustification@12 -_NtGdiSetTextJustification@12: - movl $0x1127, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetupPublicCFONT@12 -_NtGdiSetupPublicCFONT@12: - movl $0x1128, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetVirtualResolution@20 -_NtGdiSetVirtualResolution@20: - movl $0x1129, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiSetSizeDevice@12 -_NtGdiSetSizeDevice@12: - movl $0x112a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiStartDoc@16 -_NtGdiStartDoc@16: - movl $0x112b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiStartPage@4 -_NtGdiStartPage@4: - movl $0x112c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiStretchBlt@48 -_NtGdiStretchBlt@48: - movl $0x112d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x30 - -.global _NtGdiStretchDIBitsInternal@64 -_NtGdiStretchDIBitsInternal@64: - movl $0x112e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x40 - -.global _NtGdiStrokeAndFillPath@4 -_NtGdiStrokeAndFillPath@4: - movl $0x112f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiStrokePath@4 -_NtGdiStrokePath@4: - movl $0x1130, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiSwapBuffers@4 -_NtGdiSwapBuffers@4: - movl $0x1131, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiTransformPoints@20 -_NtGdiTransformPoints@20: - movl $0x1132, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiTransparentBlt@44 -_NtGdiTransparentBlt@44: - movl $0x1133, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiUnloadPrinterDriver@8 -_NtGdiUnloadPrinterDriver@8: - movl $0x1134, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiUnmapMemFont@4 -_NtGdiUnmapMemFont@4: - movl $0x1135, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiUnrealizeObject@4 -_NtGdiUnrealizeObject@4: - movl $0x1136, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiUpdateColors@4 -_NtGdiUpdateColors@4: - movl $0x1137, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiWidenPath@4 -_NtGdiWidenPath@4: - movl $0x1138, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserActivateKeyboardLayout@8 -_NtUserActivateKeyboardLayout@8: - movl $0x1139, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserAddClipboardFormatListener@4 -_NtUserAddClipboardFormatListener@4: - movl $0x113a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserAlterWindowStyle@12 -_NtUserAlterWindowStyle@12: - movl $0x113b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserAssociateInputContext@12 -_NtUserAssociateInputContext@12: - movl $0x113c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserAttachThreadInput@12 -_NtUserAttachThreadInput@12: - movl $0x113d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserBeginPaint@8 -_NtUserBeginPaint@8: - movl $0x113e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserBitBltSysBmp@32 -_NtUserBitBltSysBmp@32: - movl $0x113f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtUserBlockInput@4 -_NtUserBlockInput@4: - movl $0x1140, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserBuildHimcList@16 -_NtUserBuildHimcList@16: - movl $0x1141, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserBuildHwndList@28 -_NtUserBuildHwndList@28: - movl $0x1142, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserBuildNameList@16 -_NtUserBuildNameList@16: - movl $0x1143, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserBuildPropList@16 -_NtUserBuildPropList@16: - movl $0x1144, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserCallHwnd@8 -_NtUserCallHwnd@8: - movl $0x1145, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserCallHwndLock@8 -_NtUserCallHwndLock@8: - movl $0x1146, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserCallHwndOpt@8 -_NtUserCallHwndOpt@8: - movl $0x1147, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserCallHwndParam@12 -_NtUserCallHwndParam@12: - movl $0x1148, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserCallHwndParamLock@12 -_NtUserCallHwndParamLock@12: - movl $0x1149, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserCallMsgFilter@8 -_NtUserCallMsgFilter@8: - movl $0x114a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserCallNextHookEx@16 -_NtUserCallNextHookEx@16: - movl $0x114b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserCallNoParam@4 -_NtUserCallNoParam@4: - movl $0x114c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserCallOneParam@8 -_NtUserCallOneParam@8: - movl $0x114d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserCallTwoParam@12 -_NtUserCallTwoParam@12: - movl $0x114e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserChangeClipboardChain@8 -_NtUserChangeClipboardChain@8: - movl $0x114f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserChangeDisplaySettings@16 -_NtUserChangeDisplaySettings@16: - movl $0x1150, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserCheckAccessForIntegrityLevel@12 -_NtUserCheckAccessForIntegrityLevel@12: - movl $0x1151, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserCheckDesktopByThreadId@4 -_NtUserCheckDesktopByThreadId@4: - movl $0x1152, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserCheckWindowThreadDesktop@12 -_NtUserCheckWindowThreadDesktop@12: - movl $0x1153, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserCheckImeHotKey@8 -_NtUserCheckImeHotKey@8: - movl $0x1154, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserCheckMenuItem@12 -_NtUserCheckMenuItem@12: - movl $0x1155, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserChildWindowFromPointEx@16 -_NtUserChildWindowFromPointEx@16: - movl $0x1156, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserClipCursor@4 -_NtUserClipCursor@4: - movl $0x1157, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserCloseClipboard@0 -_NtUserCloseClipboard@0: - movl $0x1158, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserCloseDesktop@4 -_NtUserCloseDesktop@4: - movl $0x1159, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserCloseWindowStation@4 -_NtUserCloseWindowStation@4: - movl $0x115a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserConsoleControl@12 -_NtUserConsoleControl@12: - movl $0x115b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserConvertMemHandle@8 -_NtUserConvertMemHandle@8: - movl $0x115c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserCopyAcceleratorTable@12 -_NtUserCopyAcceleratorTable@12: - movl $0x115d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserCountClipboardFormats@0 -_NtUserCountClipboardFormats@0: - movl $0x115e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserCreateAcceleratorTable@8 -_NtUserCreateAcceleratorTable@8: - movl $0x115f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserCreateCaret@16 -_NtUserCreateCaret@16: - movl $0x1160, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserCreateDesktopEx@24 -_NtUserCreateDesktopEx@24: - movl $0x1161, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserCreateInputContext@4 -_NtUserCreateInputContext@4: - movl $0x1162, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserCreateLocalMemHandle@16 -_NtUserCreateLocalMemHandle@16: - movl $0x1163, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserCreateWindowEx@60 -_NtUserCreateWindowEx@60: - movl $0x1164, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x3c - -.global _NtUserCreateWindowStation@28 -_NtUserCreateWindowStation@28: - movl $0x1165, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserDdeInitialize@20 -_NtUserDdeInitialize@20: - movl $0x1166, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserDeferWindowPos@32 -_NtUserDeferWindowPos@32: - movl $0x1167, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtUserDefSetText@8 -_NtUserDefSetText@8: - movl $0x1168, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserDeleteMenu@12 -_NtUserDeleteMenu@12: - movl $0x1169, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserDestroyAcceleratorTable@4 -_NtUserDestroyAcceleratorTable@4: - movl $0x116a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserDestroyCursor@8 -_NtUserDestroyCursor@8: - movl $0x116b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserDestroyInputContext@4 -_NtUserDestroyInputContext@4: - movl $0x116c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserDestroyMenu@4 -_NtUserDestroyMenu@4: - movl $0x116d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserDestroyWindow@4 -_NtUserDestroyWindow@4: - movl $0x116e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserDisableThreadIme@4 -_NtUserDisableThreadIme@4: - movl $0x116f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserDispatchMessage@4 -_NtUserDispatchMessage@4: - movl $0x1170, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserDoSoundConnect@0 -_NtUserDoSoundConnect@0: - movl $0x1171, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserDoSoundDisconnect@0 -_NtUserDoSoundDisconnect@0: - movl $0x1172, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserDragDetect@12 -_NtUserDragDetect@12: - movl $0x1173, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserDragObject@20 -_NtUserDragObject@20: - movl $0x1174, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserDrawAnimatedRects@16 -_NtUserDrawAnimatedRects@16: - movl $0x1175, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserDrawCaption@16 -_NtUserDrawCaption@16: - movl $0x1176, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserDrawCaptionTemp@28 -_NtUserDrawCaptionTemp@28: - movl $0x1177, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserDrawIconEx@44 -_NtUserDrawIconEx@44: - movl $0x1178, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtUserDrawMenuBarTemp@20 -_NtUserDrawMenuBarTemp@20: - movl $0x1179, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserEmptyClipboard@0 -_NtUserEmptyClipboard@0: - movl $0x117a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserEnableMenuItem@12 -_NtUserEnableMenuItem@12: - movl $0x117b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserEnableScrollBar@12 -_NtUserEnableScrollBar@12: - movl $0x117c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserEndDeferWindowPosEx@8 -_NtUserEndDeferWindowPosEx@8: - movl $0x117d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserEndMenu@0 -_NtUserEndMenu@0: - movl $0x117e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserEndPaint@8 -_NtUserEndPaint@8: - movl $0x117f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserEnumDisplayDevices@16 -_NtUserEnumDisplayDevices@16: - movl $0x1180, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserEnumDisplayMonitors@16 -_NtUserEnumDisplayMonitors@16: - movl $0x1181, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserEnumDisplaySettings@16 -_NtUserEnumDisplaySettings@16: - movl $0x1182, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserEvent@4 -_NtUserEvent@4: - movl $0x1183, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserExcludeUpdateRgn@8 -_NtUserExcludeUpdateRgn@8: - movl $0x1184, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserFillWindow@16 -_NtUserFillWindow@16: - movl $0x1185, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserFindExistingCursorIcon@12 -_NtUserFindExistingCursorIcon@12: - movl $0x1186, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserFindWindowEx@20 -_NtUserFindWindowEx@20: - movl $0x1187, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserFlashWindowEx@4 -_NtUserFlashWindowEx@4: - movl $0x1188, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserFrostCrashedWindow@8 -_NtUserFrostCrashedWindow@8: - movl $0x1189, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetAltTabInfo@24 -_NtUserGetAltTabInfo@24: - movl $0x118a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserGetAncestor@8 -_NtUserGetAncestor@8: - movl $0x118b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetAppImeLevel@4 -_NtUserGetAppImeLevel@4: - movl $0x118c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetAsyncKeyState@4 -_NtUserGetAsyncKeyState@4: - movl $0x118d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetAtomName@8 -_NtUserGetAtomName@8: - movl $0x118e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetCaretBlinkTime@0 -_NtUserGetCaretBlinkTime@0: - movl $0x118f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserGetCaretPos@4 -_NtUserGetCaretPos@4: - movl $0x1190, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetClassInfoEx@20 -_NtUserGetClassInfoEx@20: - movl $0x1191, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserGetClassName@12 -_NtUserGetClassName@12: - movl $0x1192, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetClipboardData@8 -_NtUserGetClipboardData@8: - movl $0x1193, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetClipboardFormatName@12 -_NtUserGetClipboardFormatName@12: - movl $0x1194, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetClipboardOwner@0 -_NtUserGetClipboardOwner@0: - movl $0x1195, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserGetClipboardSequenceNumber@0 -_NtUserGetClipboardSequenceNumber@0: - movl $0x1196, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserGetClipboardViewer@0 -_NtUserGetClipboardViewer@0: - movl $0x1197, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserGetClipCursor@4 -_NtUserGetClipCursor@4: - movl $0x1198, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetComboBoxInfo@8 -_NtUserGetComboBoxInfo@8: - movl $0x1199, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetControlBrush@12 -_NtUserGetControlBrush@12: - movl $0x119a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetControlColor@16 -_NtUserGetControlColor@16: - movl $0x119b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserGetCPD@12 -_NtUserGetCPD@12: - movl $0x119c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetCursorFrameInfo@16 -_NtUserGetCursorFrameInfo@16: - movl $0x119d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserGetCursorInfo@4 -_NtUserGetCursorInfo@4: - movl $0x119e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetDC@4 -_NtUserGetDC@4: - movl $0x119f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetDCEx@12 -_NtUserGetDCEx@12: - movl $0x11a0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetDoubleClickTime@0 -_NtUserGetDoubleClickTime@0: - movl $0x11a1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserGetForegroundWindow@0 -_NtUserGetForegroundWindow@0: - movl $0x11a2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserGetGuiResources@8 -_NtUserGetGuiResources@8: - movl $0x11a3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetGUIThreadInfo@8 -_NtUserGetGUIThreadInfo@8: - movl $0x11a4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetIconInfo@24 -_NtUserGetIconInfo@24: - movl $0x11a5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserGetIconSize@16 -_NtUserGetIconSize@16: - movl $0x11a6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserGetImeHotKey@16 -_NtUserGetImeHotKey@16: - movl $0x11a7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserGetImeInfoEx@8 -_NtUserGetImeInfoEx@8: - movl $0x11a8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetInternalWindowPos@12 -_NtUserGetInternalWindowPos@12: - movl $0x11a9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetKeyboardLayoutList@8 -_NtUserGetKeyboardLayoutList@8: - movl $0x11aa, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetKeyboardLayoutName@4 -_NtUserGetKeyboardLayoutName@4: - movl $0x11ab, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetKeyboardState@4 -_NtUserGetKeyboardState@4: - movl $0x11ac, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetKeyNameText@12 -_NtUserGetKeyNameText@12: - movl $0x11ad, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetKeyState@4 -_NtUserGetKeyState@4: - movl $0x11ae, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetListBoxInfo@4 -_NtUserGetListBoxInfo@4: - movl $0x11af, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetMenuBarInfo@16 -_NtUserGetMenuBarInfo@16: - movl $0x11b0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserGetMenuIndex@8 -_NtUserGetMenuIndex@8: - movl $0x11b1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetMenuItemRect@16 -_NtUserGetMenuItemRect@16: - movl $0x11b2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserGetMessage@16 -_NtUserGetMessage@16: - movl $0x11b3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserGetMouseMovePointsEx@20 -_NtUserGetMouseMovePointsEx@20: - movl $0x11b4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserGetObjectInformation@20 -_NtUserGetObjectInformation@20: - movl $0x11b5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserGetOpenClipboardWindow@0 -_NtUserGetOpenClipboardWindow@0: - movl $0x11b6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserGetPriorityClipboardFormat@8 -_NtUserGetPriorityClipboardFormat@8: - movl $0x11b7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetProcessWindowStation@0 -_NtUserGetProcessWindowStation@0: - movl $0x11b8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserGetRawInputBuffer@12 -_NtUserGetRawInputBuffer@12: - movl $0x11b9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetRawInputData@20 -_NtUserGetRawInputData@20: - movl $0x11ba, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserGetRawInputDeviceInfo@16 -_NtUserGetRawInputDeviceInfo@16: - movl $0x11bb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserGetRawInputDeviceList@12 -_NtUserGetRawInputDeviceList@12: - movl $0x11bc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetRegisteredRawInputDevices@12 -_NtUserGetRegisteredRawInputDevices@12: - movl $0x11bd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetScrollBarInfo@12 -_NtUserGetScrollBarInfo@12: - movl $0x11be, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetSystemMenu@8 -_NtUserGetSystemMenu@8: - movl $0x11bf, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetThreadDesktop@8 -_NtUserGetThreadDesktop@8: - movl $0x11c0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetThreadState@4 -_NtUserGetThreadState@4: - movl $0x11c1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetTitleBarInfo@8 -_NtUserGetTitleBarInfo@8: - movl $0x11c2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetUpdatedClipboardFormats@12 -_NtUserGetUpdatedClipboardFormats@12: - movl $0x11c3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetUpdateRect@12 -_NtUserGetUpdateRect@12: - movl $0x11c4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetUpdateRgn@12 -_NtUserGetUpdateRgn@12: - movl $0x11c5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetWindowDC@4 -_NtUserGetWindowDC@4: - movl $0x11c6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetWindowPlacement@8 -_NtUserGetWindowPlacement@8: - movl $0x11c7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetWOWClass@8 -_NtUserGetWOWClass@8: - movl $0x11c8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGhostWindowFromHungWindow@4 -_NtUserGhostWindowFromHungWindow@4: - movl $0x11c9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserHardErrorControl@12 -_NtUserHardErrorControl@12: - movl $0x11ca, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserHideCaret@4 -_NtUserHideCaret@4: - movl $0x11cb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserHiliteMenuItem@16 -_NtUserHiliteMenuItem@16: - movl $0x11cc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserHungWindowFromGhostWindow@4 -_NtUserHungWindowFromGhostWindow@4: - movl $0x11cd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserImpersonateDdeClientWindow@8 -_NtUserImpersonateDdeClientWindow@8: - movl $0x11ce, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserInitialize@8 -_NtUserInitialize@8: - movl $0x11cf, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserInitializeClientPfnArrays@16 -_NtUserInitializeClientPfnArrays@16: - movl $0x11d0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserInitTask@48 -_NtUserInitTask@48: - movl $0x11d1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x30 - -.global _NtUserInternalGetWindowText@12 -_NtUserInternalGetWindowText@12: - movl $0x11d2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserInternalGetWindowIcon@8 -_NtUserInternalGetWindowIcon@8: - movl $0x11d3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserInvalidateRect@12 -_NtUserInvalidateRect@12: - movl $0x11d4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserInvalidateRgn@12 -_NtUserInvalidateRgn@12: - movl $0x11d5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserIsClipboardFormatAvailable@4 -_NtUserIsClipboardFormatAvailable@4: - movl $0x11d6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserKillTimer@8 -_NtUserKillTimer@8: - movl $0x11d7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserLoadKeyboardLayoutEx@28 -_NtUserLoadKeyboardLayoutEx@28: - movl $0x11d8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserLockWindowStation@4 -_NtUserLockWindowStation@4: - movl $0x11d9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserLockWindowUpdate@4 -_NtUserLockWindowUpdate@4: - movl $0x11da, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserLockWorkStation@0 -_NtUserLockWorkStation@0: - movl $0x11db, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserLogicalToPhysicalPoint@8 -_NtUserLogicalToPhysicalPoint@8: - movl $0x11dc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserMapVirtualKeyEx@16 -_NtUserMapVirtualKeyEx@16: - movl $0x11dd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserMenuItemFromPoint@16 -_NtUserMenuItemFromPoint@16: - movl $0x11de, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserMessageCall@28 -_NtUserMessageCall@28: - movl $0x11df, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserMinMaximize@12 -_NtUserMinMaximize@12: - movl $0x11e0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserMNDragLeave@0 -_NtUserMNDragLeave@0: - movl $0x11e1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserMNDragOver@8 -_NtUserMNDragOver@8: - movl $0x11e2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserModifyUserStartupInfoFlags@8 -_NtUserModifyUserStartupInfoFlags@8: - movl $0x11e3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserMoveWindow@24 -_NtUserMoveWindow@24: - movl $0x11e4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserNotifyIMEStatus@12 -_NtUserNotifyIMEStatus@12: - movl $0x11e5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserNotifyProcessCreate@16 -_NtUserNotifyProcessCreate@16: - movl $0x11e6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserNotifyWinEvent@16 -_NtUserNotifyWinEvent@16: - movl $0x11e7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserOpenClipboard@8 -_NtUserOpenClipboard@8: - movl $0x11e8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserOpenDesktop@12 -_NtUserOpenDesktop@12: - movl $0x11e9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserOpenInputDesktop@12 -_NtUserOpenInputDesktop@12: - movl $0x11ea, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserOpenThreadDesktop@20 -_NtUserOpenThreadDesktop@20: - movl $0x11eb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserOpenWindowStation@8 -_NtUserOpenWindowStation@8: - movl $0x11ec, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserPaintDesktop@4 -_NtUserPaintDesktop@4: - movl $0x11ed, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserPaintMonitor@12 -_NtUserPaintMonitor@12: - movl $0x11ee, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserPeekMessage@20 -_NtUserPeekMessage@20: - movl $0x11ef, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserPhysicalToLogicalPoint@8 -_NtUserPhysicalToLogicalPoint@8: - movl $0x11f0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserPostMessage@16 -_NtUserPostMessage@16: - movl $0x11f1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserPostThreadMessage@16 -_NtUserPostThreadMessage@16: - movl $0x11f2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserPrintWindow@12 -_NtUserPrintWindow@12: - movl $0x11f3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserProcessConnect@8 -_NtUserProcessConnect@8: - movl $0x11f4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserQueryInformationThread@16 -_NtUserQueryInformationThread@16: - movl $0x11f5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserQueryInputContext@8 -_NtUserQueryInputContext@8: - movl $0x11f6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserQuerySendMessage@4 -_NtUserQuerySendMessage@4: - movl $0x11f7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserQueryWindow@8 -_NtUserQueryWindow@8: - movl $0x11f8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserRealChildWindowFromPoint@12 -_NtUserRealChildWindowFromPoint@12: - movl $0x11f9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserRealInternalGetMessage@24 -_NtUserRealInternalGetMessage@24: - movl $0x11fa, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserRealWaitMessageEx@8 -_NtUserRealWaitMessageEx@8: - movl $0x11fb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserRedrawWindow@16 -_NtUserRedrawWindow@16: - movl $0x11fc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserRegisterClassExWOW@28 -_NtUserRegisterClassExWOW@28: - movl $0x11fd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserRegisterErrorReportingDialog@8 -_NtUserRegisterErrorReportingDialog@8: - movl $0x11fe, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserRegisterUserApiHook@16 -_NtUserRegisterUserApiHook@16: - movl $0x11ff, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserRegisterHotKey@16 -_NtUserRegisterHotKey@16: - movl $0x1200, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserRegisterRawInputDevices@12 -_NtUserRegisterRawInputDevices@12: - movl $0x1201, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserRegisterTasklist@4 -_NtUserRegisterTasklist@4: - movl $0x1202, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserRegisterWindowMessage@4 -_NtUserRegisterWindowMessage@4: - movl $0x1203, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserRemoveClipboardFormatListener@4 -_NtUserRemoveClipboardFormatListener@4: - movl $0x1204, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserRemoveMenu@12 -_NtUserRemoveMenu@12: - movl $0x1205, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserRemoveProp@8 -_NtUserRemoveProp@8: - movl $0x1206, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserResolveDesktop@16 -_NtUserResolveDesktop@16: - movl $0x1207, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserResolveDesktopForWOW@4 -_NtUserResolveDesktopForWOW@4: - movl $0x1208, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSBGetParms@16 -_NtUserSBGetParms@16: - movl $0x1209, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserScrollDC@28 -_NtUserScrollDC@28: - movl $0x120a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserScrollWindowEx@32 -_NtUserScrollWindowEx@32: - movl $0x120b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtUserSelectPalette@12 -_NtUserSelectPalette@12: - movl $0x120c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSendInput@12 -_NtUserSendInput@12: - movl $0x120d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetActiveWindow@4 -_NtUserSetActiveWindow@4: - movl $0x120e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetAppImeLevel@8 -_NtUserSetAppImeLevel@8: - movl $0x120f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetCapture@4 -_NtUserSetCapture@4: - movl $0x1210, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetClassLong@16 -_NtUserSetClassLong@16: - movl $0x1211, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetClassWord@12 -_NtUserSetClassWord@12: - movl $0x1212, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetClipboardData@12 -_NtUserSetClipboardData@12: - movl $0x1213, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetClipboardViewer@4 -_NtUserSetClipboardViewer@4: - movl $0x1214, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetConsoleReserveKeys@8 -_NtUserSetConsoleReserveKeys@8: - movl $0x1215, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetCursor@4 -_NtUserSetCursor@4: - movl $0x1216, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetCursorContents@8 -_NtUserSetCursorContents@8: - movl $0x1217, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetCursorIconData@16 -_NtUserSetCursorIconData@16: - movl $0x1218, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetFocus@4 -_NtUserSetFocus@4: - movl $0x1219, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetImeHotKey@20 -_NtUserSetImeHotKey@20: - movl $0x121a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserSetImeInfoEx@4 -_NtUserSetImeInfoEx@4: - movl $0x121b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetImeOwnerWindow@8 -_NtUserSetImeOwnerWindow@8: - movl $0x121c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetInformationProcess@16 -_NtUserSetInformationProcess@16: - movl $0x121d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetInformationThread@16 -_NtUserSetInformationThread@16: - movl $0x121e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetInternalWindowPos@16 -_NtUserSetInternalWindowPos@16: - movl $0x121f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetKeyboardState@4 -_NtUserSetKeyboardState@4: - movl $0x1220, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetMenu@12 -_NtUserSetMenu@12: - movl $0x1221, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetMenuContextHelpId@8 -_NtUserSetMenuContextHelpId@8: - movl $0x1222, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetMenuDefaultItem@12 -_NtUserSetMenuDefaultItem@12: - movl $0x1223, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetMenuFlagRtoL@4 -_NtUserSetMenuFlagRtoL@4: - movl $0x1224, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetObjectInformation@16 -_NtUserSetObjectInformation@16: - movl $0x1225, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetParent@8 -_NtUserSetParent@8: - movl $0x1226, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetProcessWindowStation@4 -_NtUserSetProcessWindowStation@4: - movl $0x1227, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetProp@8 -_NtUserGetProp@8: - movl $0x1228, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetProp@12 -_NtUserSetProp@12: - movl $0x1229, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetScrollInfo@16 -_NtUserSetScrollInfo@16: - movl $0x122a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetShellWindowEx@8 -_NtUserSetShellWindowEx@8: - movl $0x122b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetSysColors@16 -_NtUserSetSysColors@16: - movl $0x122c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetSystemCursor@8 -_NtUserSetSystemCursor@8: - movl $0x122d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetSystemMenu@8 -_NtUserSetSystemMenu@8: - movl $0x122e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetSystemTimer@12 -_NtUserSetSystemTimer@12: - movl $0x122f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetThreadDesktop@4 -_NtUserSetThreadDesktop@4: - movl $0x1230, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetThreadLayoutHandles@8 -_NtUserSetThreadLayoutHandles@8: - movl $0x1231, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetThreadState@8 -_NtUserSetThreadState@8: - movl $0x1232, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetTimer@16 -_NtUserSetTimer@16: - movl $0x1233, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetProcessDPIAware@0 -_NtUserSetProcessDPIAware@0: - movl $0x1234, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserSetWindowFNID@8 -_NtUserSetWindowFNID@8: - movl $0x1235, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetWindowLong@16 -_NtUserSetWindowLong@16: - movl $0x1236, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetWindowPlacement@8 -_NtUserSetWindowPlacement@8: - movl $0x1237, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetWindowPos@28 -_NtUserSetWindowPos@28: - movl $0x1238, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserSetWindowRgn@12 -_NtUserSetWindowRgn@12: - movl $0x1239, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetWindowRgnEx@12 -_NtUserGetWindowRgnEx@12: - movl $0x123a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetWindowRgnEx@12 -_NtUserSetWindowRgnEx@12: - movl $0x123b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetWindowsHookAW@12 -_NtUserSetWindowsHookAW@12: - movl $0x123c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetWindowsHookEx@24 -_NtUserSetWindowsHookEx@24: - movl $0x123d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserSetWindowStationUser@16 -_NtUserSetWindowStationUser@16: - movl $0x123e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetWindowWord@12 -_NtUserSetWindowWord@12: - movl $0x123f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetWinEventHook@32 -_NtUserSetWinEventHook@32: - movl $0x1240, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtUserShowCaret@4 -_NtUserShowCaret@4: - movl $0x1241, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserShowScrollBar@12 -_NtUserShowScrollBar@12: - movl $0x1242, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserShowWindow@8 -_NtUserShowWindow@8: - movl $0x1243, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserShowWindowAsync@8 -_NtUserShowWindowAsync@8: - movl $0x1244, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSoundSentry@0 -_NtUserSoundSentry@0: - movl $0x1245, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserSwitchDesktop@8 -_NtUserSwitchDesktop@8: - movl $0x1246, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSystemParametersInfo@16 -_NtUserSystemParametersInfo@16: - movl $0x1247, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserTestForInteractiveUser@4 -_NtUserTestForInteractiveUser@4: - movl $0x1248, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserThunkedMenuInfo@8 -_NtUserThunkedMenuInfo@8: - movl $0x1249, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserThunkedMenuItemInfo@24 -_NtUserThunkedMenuItemInfo@24: - movl $0x124a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserToUnicodeEx@28 -_NtUserToUnicodeEx@28: - movl $0x124b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserTrackMouseEvent@4 -_NtUserTrackMouseEvent@4: - movl $0x124c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserTrackPopupMenuEx@24 -_NtUserTrackPopupMenuEx@24: - movl $0x124d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserCalcMenuBar@20 -_NtUserCalcMenuBar@20: - movl $0x124e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserPaintMenuBar@24 -_NtUserPaintMenuBar@24: - movl $0x124f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserTranslateAccelerator@12 -_NtUserTranslateAccelerator@12: - movl $0x1250, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserTranslateMessage@8 -_NtUserTranslateMessage@8: - movl $0x1251, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserUnhookWindowsHookEx@4 -_NtUserUnhookWindowsHookEx@4: - movl $0x1252, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserUnhookWinEvent@4 -_NtUserUnhookWinEvent@4: - movl $0x1253, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserUnloadKeyboardLayout@4 -_NtUserUnloadKeyboardLayout@4: - movl $0x1254, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserUnlockWindowStation@4 -_NtUserUnlockWindowStation@4: - movl $0x1255, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserUnregisterClass@12 -_NtUserUnregisterClass@12: - movl $0x1256, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserUnregisterUserApiHook@0 -_NtUserUnregisterUserApiHook@0: - movl $0x1257, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserUnregisterHotKey@8 -_NtUserUnregisterHotKey@8: - movl $0x1258, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserUpdateInputContext@12 -_NtUserUpdateInputContext@12: - movl $0x1259, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserUpdateInstance@12 -_NtUserUpdateInstance@12: - movl $0x125a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserUpdateLayeredWindow@40 -_NtUserUpdateLayeredWindow@40: - movl $0x125b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x28 - -.global _NtUserGetLayeredWindowAttributes@16 -_NtUserGetLayeredWindowAttributes@16: - movl $0x125c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetLayeredWindowAttributes@16 -_NtUserSetLayeredWindowAttributes@16: - movl $0x125d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserUpdatePerUserSystemParameters@4 -_NtUserUpdatePerUserSystemParameters@4: - movl $0x125e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserUserHandleGrantAccess@12 -_NtUserUserHandleGrantAccess@12: - movl $0x125f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserValidateHandleSecure@4 -_NtUserValidateHandleSecure@4: - movl $0x1260, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserValidateRect@8 -_NtUserValidateRect@8: - movl $0x1261, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserValidateTimerCallback@4 -_NtUserValidateTimerCallback@4: - movl $0x1262, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserVkKeyScanEx@12 -_NtUserVkKeyScanEx@12: - movl $0x1263, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserWaitForInputIdle@12 -_NtUserWaitForInputIdle@12: - movl $0x1264, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserWaitForMsgAndEvent@4 -_NtUserWaitForMsgAndEvent@4: - movl $0x1265, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserWaitMessage@0 -_NtUserWaitMessage@0: - movl $0x1266, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserWin32PoolAllocationStats@24 -_NtUserWin32PoolAllocationStats@24: - movl $0x1267, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserWindowFromPhysicalPoint@8 -_NtUserWindowFromPhysicalPoint@8: - movl $0x1268, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserWindowFromPoint@8 -_NtUserWindowFromPoint@8: - movl $0x1269, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserYieldTask@0 -_NtUserYieldTask@0: - movl $0x126a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserRemoteConnect@12 -_NtUserRemoteConnect@12: - movl $0x126b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserRemoteRedrawRectangle@16 -_NtUserRemoteRedrawRectangle@16: - movl $0x126c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserRemoteRedrawScreen@0 -_NtUserRemoteRedrawScreen@0: - movl $0x126d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserRemoteStopScreenUpdates@0 -_NtUserRemoteStopScreenUpdates@0: - movl $0x126e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserCtxDisplayIOCtl@12 -_NtUserCtxDisplayIOCtl@12: - movl $0x126f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserRegisterSessionPort@4 -_NtUserRegisterSessionPort@4: - movl $0x1270, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserUnregisterSessionPort@0 -_NtUserUnregisterSessionPort@0: - movl $0x1271, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserUpdateWindowTransform@12 -_NtUserUpdateWindowTransform@12: - movl $0x1272, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserDwmStartRedirection@4 -_NtUserDwmStartRedirection@4: - movl $0x1273, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserDwmStopRedirection@0 -_NtUserDwmStopRedirection@0: - movl $0x1274, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserDwmHintDxUpdate@8 -_NtUserDwmHintDxUpdate@8: - movl $0x1275, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserDwmGetDxRgn@12 -_NtUserDwmGetDxRgn@12: - movl $0x1276, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetWindowMinimizeRect@8 -_NtUserGetWindowMinimizeRect@8: - movl $0x1277, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiEngAssociateSurface@12 -_NtGdiEngAssociateSurface@12: - movl $0x1278, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiEngCreateBitmap@24 -_NtGdiEngCreateBitmap@24: - movl $0x1279, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiEngCreateDeviceSurface@16 -_NtGdiEngCreateDeviceSurface@16: - movl $0x127a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiEngCreateDeviceBitmap@16 -_NtGdiEngCreateDeviceBitmap@16: - movl $0x127b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiEngCreatePalette@24 -_NtGdiEngCreatePalette@24: - movl $0x127c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiEngComputeGlyphSet@12 -_NtGdiEngComputeGlyphSet@12: - movl $0x127d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiEngCopyBits@24 -_NtGdiEngCopyBits@24: - movl $0x127e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiEngDeletePalette@4 -_NtGdiEngDeletePalette@4: - movl $0x127f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEngDeleteSurface@4 -_NtGdiEngDeleteSurface@4: - movl $0x1280, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEngEraseSurface@12 -_NtGdiEngEraseSurface@12: - movl $0x1281, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiEngUnlockSurface@4 -_NtGdiEngUnlockSurface@4: - movl $0x1282, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEngLockSurface@4 -_NtGdiEngLockSurface@4: - movl $0x1283, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEngBitBlt@44 -_NtGdiEngBitBlt@44: - movl $0x1284, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiEngStretchBlt@44 -_NtGdiEngStretchBlt@44: - movl $0x1285, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiEngPlgBlt@44 -_NtGdiEngPlgBlt@44: - movl $0x1286, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiEngMarkBandingSurface@4 -_NtGdiEngMarkBandingSurface@4: - movl $0x1287, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEngStrokePath@32 -_NtGdiEngStrokePath@32: - movl $0x1288, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiEngFillPath@28 -_NtGdiEngFillPath@28: - movl $0x1289, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiEngStrokeAndFillPath@40 -_NtGdiEngStrokeAndFillPath@40: - movl $0x128a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x28 - -.global _NtGdiEngPaint@20 -_NtGdiEngPaint@20: - movl $0x128b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiEngLineTo@36 -_NtGdiEngLineTo@36: - movl $0x128c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x24 - -.global _NtGdiEngAlphaBlend@28 -_NtGdiEngAlphaBlend@28: - movl $0x128d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiEngGradientFill@40 -_NtGdiEngGradientFill@40: - movl $0x128e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x28 - -.global _NtGdiEngTransparentBlt@32 -_NtGdiEngTransparentBlt@32: - movl $0x128f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiEngTextOut@40 -_NtGdiEngTextOut@40: - movl $0x1290, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x28 - -.global _NtGdiEngStretchBltROP@52 -_NtGdiEngStretchBltROP@52: - movl $0x1291, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x34 - -.global _NtGdiXLATEOBJ_cGetPalette@16 -_NtGdiXLATEOBJ_cGetPalette@16: - movl $0x1292, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiXLATEOBJ_iXlate@8 -_NtGdiXLATEOBJ_iXlate@8: - movl $0x1293, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiXLATEOBJ_hGetColorTransform@4 -_NtGdiXLATEOBJ_hGetColorTransform@4: - movl $0x1294, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiCLIPOBJ_bEnum@12 -_NtGdiCLIPOBJ_bEnum@12: - movl $0x1295, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiCLIPOBJ_cEnumStart@20 -_NtGdiCLIPOBJ_cEnumStart@20: - movl $0x1296, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiCLIPOBJ_ppoGetPath@4 -_NtGdiCLIPOBJ_ppoGetPath@4: - movl $0x1297, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEngDeletePath@4 -_NtGdiEngDeletePath@4: - movl $0x1298, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEngCreateClip@0 -_NtGdiEngCreateClip@0: - movl $0x1299, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtGdiEngDeleteClip@4 -_NtGdiEngDeleteClip@4: - movl $0x129a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiBRUSHOBJ_ulGetBrushColor@4 -_NtGdiBRUSHOBJ_ulGetBrushColor@4: - movl $0x129b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiBRUSHOBJ_pvAllocRbrush@8 -_NtGdiBRUSHOBJ_pvAllocRbrush@8: - movl $0x129c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiBRUSHOBJ_pvGetRbrush@4 -_NtGdiBRUSHOBJ_pvGetRbrush@4: - movl $0x129d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiBRUSHOBJ_hGetColorTransform@4 -_NtGdiBRUSHOBJ_hGetColorTransform@4: - movl $0x129e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiXFORMOBJ_bApplyXform@20 -_NtGdiXFORMOBJ_bApplyXform@20: - movl $0x129f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiXFORMOBJ_iGetXform@8 -_NtGdiXFORMOBJ_iGetXform@8: - movl $0x12a0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiFONTOBJ_vGetInfo@12 -_NtGdiFONTOBJ_vGetInfo@12: - movl $0x12a1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiFONTOBJ_pxoGetXform@4 -_NtGdiFONTOBJ_pxoGetXform@4: - movl $0x12a2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiFONTOBJ_cGetGlyphs@20 -_NtGdiFONTOBJ_cGetGlyphs@20: - movl $0x12a3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiFONTOBJ_pifi@4 -_NtGdiFONTOBJ_pifi@4: - movl $0x12a4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiFONTOBJ_pfdg@4 -_NtGdiFONTOBJ_pfdg@4: - movl $0x12a5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiFONTOBJ_pQueryGlyphAttrs@8 -_NtGdiFONTOBJ_pQueryGlyphAttrs@8: - movl $0x12a6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiFONTOBJ_pvTrueTypeFontFile@8 -_NtGdiFONTOBJ_pvTrueTypeFontFile@8: - movl $0x12a7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiFONTOBJ_cGetAllGlyphHandles@8 -_NtGdiFONTOBJ_cGetAllGlyphHandles@8: - movl $0x12a8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSTROBJ_bEnum@12 -_NtGdiSTROBJ_bEnum@12: - movl $0x12a9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSTROBJ_bEnumPositionsOnly@12 -_NtGdiSTROBJ_bEnumPositionsOnly@12: - movl $0x12aa, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSTROBJ_bGetAdvanceWidths@16 -_NtGdiSTROBJ_bGetAdvanceWidths@16: - movl $0x12ab, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiSTROBJ_vEnumStart@4 -_NtGdiSTROBJ_vEnumStart@4: - movl $0x12ac, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiSTROBJ_dwGetCodePage@4 -_NtGdiSTROBJ_dwGetCodePage@4: - movl $0x12ad, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiPATHOBJ_vGetBounds@8 -_NtGdiPATHOBJ_vGetBounds@8: - movl $0x12ae, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiPATHOBJ_bEnum@8 -_NtGdiPATHOBJ_bEnum@8: - movl $0x12af, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiPATHOBJ_vEnumStart@4 -_NtGdiPATHOBJ_vEnumStart@4: - movl $0x12b0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiPATHOBJ_vEnumStartClipLines@16 -_NtGdiPATHOBJ_vEnumStartClipLines@16: - movl $0x12b1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiPATHOBJ_bEnumClipLines@12 -_NtGdiPATHOBJ_bEnumClipLines@12: - movl $0x12b2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetDhpdev@4 -_NtGdiGetDhpdev@4: - movl $0x12b3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEngCheckAbort@4 -_NtGdiEngCheckAbort@4: - movl $0x12b4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiHT_Get8BPPFormatPalette@16 -_NtGdiHT_Get8BPPFormatPalette@16: - movl $0x12b5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiHT_Get8BPPMaskPalette@24 -_NtGdiHT_Get8BPPMaskPalette@24: - movl $0x12b6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiUpdateTransform@4 -_NtGdiUpdateTransform@4: - movl $0x12b7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiSetPUMPDOBJ@16 -_NtGdiSetPUMPDOBJ@16: - movl $0x12b8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiBRUSHOBJ_DeleteRbrush@8 -_NtGdiBRUSHOBJ_DeleteRbrush@8: - movl $0x12b9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiUMPDEngFreeUserMem@4 -_NtGdiUMPDEngFreeUserMem@4: - movl $0x12ba, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDrawStream@12 -_NtGdiDrawStream@12: - movl $0x12bb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDwmGetDirtyRgn@20 -_NtGdiDwmGetDirtyRgn@20: - movl $0x12bc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiDwmGetSurfaceData@8 -_NtGdiDwmGetSurfaceData@8: - movl $0x12bd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdDDICreateAllocation@4 -_NtGdiDdDDICreateAllocation@4: - movl $0x12be, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIQueryResourceInfo@4 -_NtGdiDdDDIQueryResourceInfo@4: - movl $0x12bf, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIOpenResource@4 -_NtGdiDdDDIOpenResource@4: - movl $0x12c0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIDestroyAllocation@4 -_NtGdiDdDDIDestroyAllocation@4: - movl $0x12c1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDISetAllocationPriority@4 -_NtGdiDdDDISetAllocationPriority@4: - movl $0x12c2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIQueryAllocationResidency@4 -_NtGdiDdDDIQueryAllocationResidency@4: - movl $0x12c3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDICreateDevice@4 -_NtGdiDdDDICreateDevice@4: - movl $0x12c4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIDestroyDevice@4 -_NtGdiDdDDIDestroyDevice@4: - movl $0x12c5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDICreateContext@4 -_NtGdiDdDDICreateContext@4: - movl $0x12c6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIDestroyContext@4 -_NtGdiDdDDIDestroyContext@4: - movl $0x12c7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDICreateSynchronizationObject@4 -_NtGdiDdDDICreateSynchronizationObject@4: - movl $0x12c8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIDestroySynchronizationObject@4 -_NtGdiDdDDIDestroySynchronizationObject@4: - movl $0x12c9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIWaitForSynchronizationObject@4 -_NtGdiDdDDIWaitForSynchronizationObject@4: - movl $0x12ca, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDISignalSynchronizationObject@4 -_NtGdiDdDDISignalSynchronizationObject@4: - movl $0x12cb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIGetRuntimeData@4 -_NtGdiDdDDIGetRuntimeData@4: - movl $0x12cc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIQueryAdapterInfo@4 -_NtGdiDdDDIQueryAdapterInfo@4: - movl $0x12cd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDILock@4 -_NtGdiDdDDILock@4: - movl $0x12ce, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIUnlock@4 -_NtGdiDdDDIUnlock@4: - movl $0x12cf, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIGetDisplayModeList@4 -_NtGdiDdDDIGetDisplayModeList@4: - movl $0x12d0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDISetDisplayMode@4 -_NtGdiDdDDISetDisplayMode@4: - movl $0x12d1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIGetMultisampleMethodList@4 -_NtGdiDdDDIGetMultisampleMethodList@4: - movl $0x12d2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIPresent@4 -_NtGdiDdDDIPresent@4: - movl $0x12d3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIRender@4 -_NtGdiDdDDIRender@4: - movl $0x12d4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIOpenAdapterFromDeviceName@4 -_NtGdiDdDDIOpenAdapterFromDeviceName@4: - movl $0x12d5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIOpenAdapterFromHdc@4 -_NtGdiDdDDIOpenAdapterFromHdc@4: - movl $0x12d6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDICloseAdapter@4 -_NtGdiDdDDICloseAdapter@4: - movl $0x12d7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIGetSharedPrimaryHandle@4 -_NtGdiDdDDIGetSharedPrimaryHandle@4: - movl $0x12d8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIEscape@4 -_NtGdiDdDDIEscape@4: - movl $0x12d9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIQueryStatistics@4 -_NtGdiDdDDIQueryStatistics@4: - movl $0x12da, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDISetVidPnSourceOwner@4 -_NtGdiDdDDISetVidPnSourceOwner@4: - movl $0x12db, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIGetPresentHistory@4 -_NtGdiDdDDIGetPresentHistory@4: - movl $0x12dc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDICreateOverlay@4 -_NtGdiDdDDICreateOverlay@4: - movl $0x12dd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIUpdateOverlay@4 -_NtGdiDdDDIUpdateOverlay@4: - movl $0x12de, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIFlipOverlay@4 -_NtGdiDdDDIFlipOverlay@4: - movl $0x12df, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIDestroyOverlay@4 -_NtGdiDdDDIDestroyOverlay@4: - movl $0x12e0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIWaitForVerticalBlankEvent@4 -_NtGdiDdDDIWaitForVerticalBlankEvent@4: - movl $0x12e1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDISetGammaRamp@4 -_NtGdiDdDDISetGammaRamp@4: - movl $0x12e2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIGetDeviceState@4 -_NtGdiDdDDIGetDeviceState@4: - movl $0x12e3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDICreateDCFromMemory@4 -_NtGdiDdDDICreateDCFromMemory@4: - movl $0x12e4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIDestroyDCFromMemory@4 -_NtGdiDdDDIDestroyDCFromMemory@4: - movl $0x12e5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDISetContextSchedulingPriority@4 -_NtGdiDdDDISetContextSchedulingPriority@4: - movl $0x12e6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIGetContextSchedulingPriority@4 -_NtGdiDdDDIGetContextSchedulingPriority@4: - movl $0x12e7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDISetProcessSchedulingPriorityClass@8 -_NtGdiDdDDISetProcessSchedulingPriorityClass@8: - movl $0x12e8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdDDIGetProcessSchedulingPriorityClass@8 -_NtGdiDdDDIGetProcessSchedulingPriorityClass@8: - movl $0x12e9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdDDIReleaseProcessVidPnSourceOwners@4 -_NtGdiDdDDIReleaseProcessVidPnSourceOwners@4: - movl $0x12ea, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIGetScanLine@4 -_NtGdiDdDDIGetScanLine@4: - movl $0x12eb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDISetQueuedLimit@4 -_NtGdiDdDDISetQueuedLimit@4: - movl $0x12ec, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIPollDisplayChildren@4 -_NtGdiDdDDIPollDisplayChildren@4: - movl $0x12ed, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIInvalidateActiveVidPn@4 -_NtGdiDdDDIInvalidateActiveVidPn@4: - movl $0x12ee, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDICheckOcclusion@4 -_NtGdiDdDDICheckOcclusion@4: - movl $0x12ef, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDIWaitForIdle@4 -_NtGdiDdDDIWaitForIdle@4: - movl $0x12f0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDICheckMonitorPowerState@4 -_NtGdiDdDDICheckMonitorPowerState@4: - movl $0x12f1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDICheckExclusiveOwnership@0 -_NtGdiDdDDICheckExclusiveOwnership@0: - movl $0x12f2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtGdiDdDDISetDisplayPrivateDriverFormat@4 -_NtGdiDdDDISetDisplayPrivateDriverFormat@4: - movl $0x12f3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDISharedPrimaryLockNotification@4 -_NtGdiDdDDISharedPrimaryLockNotification@4: - movl $0x12f4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDDISharedPrimaryUnLockNotification@4 -_NtGdiDdDDISharedPrimaryUnLockNotification@4: - movl $0x12f5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiMakeObjectXferable@8 -_NtGdiMakeObjectXferable@8: - movl $0x12f6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiMakeObjectUnXferable@4 -_NtGdiMakeObjectUnXferable@4: - movl $0x12f7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiGetNumberOfPhysicalMonitors@8 -_NtGdiGetNumberOfPhysicalMonitors@8: - movl $0x12f8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetPhysicalMonitors@16 -_NtGdiGetPhysicalMonitors@16: - movl $0x12f9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiGetPhysicalMonitorDescription@12 -_NtGdiGetPhysicalMonitorDescription@12: - movl $0x12fa, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDestroyPhysicalMonitor@4 -_NtGdiDestroyPhysicalMonitor@4: - movl $0x12fb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDDCCIGetVCPFeature@20 -_NtGdiDDCCIGetVCPFeature@20: - movl $0x12fc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiDDCCISetVCPFeature@12 -_NtGdiDDCCISetVCPFeature@12: - movl $0x12fd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDDCCISaveCurrentSettings@4 -_NtGdiDDCCISaveCurrentSettings@4: - movl $0x12fe, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDDCCIGetCapabilitiesStringLength@8 -_NtGdiDDCCIGetCapabilitiesStringLength@8: - movl $0x12ff, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDDCCIGetCapabilitiesString@12 -_NtGdiDDCCIGetCapabilitiesString@12: - movl $0x1300, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDDCCIGetTimingReport@8 -_NtGdiDDCCIGetTimingReport@8: - movl $0x1301, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetMirrorRendering@8 -_NtUserSetMirrorRendering@8: - movl $0x1302, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserShowSystemCursor@4 -_NtUserShowSystemCursor@4: - movl $0x1303, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - diff --git a/rostests/apitests/w32kdll/w32kdll_vista/w32kdll_vista.def b/rostests/apitests/w32kdll/w32kdll_vista/w32kdll_vista.def deleted file mode 100644 index ccf98a7ed26..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_vista/w32kdll_vista.def +++ /dev/null @@ -1,781 +0,0 @@ -; $Id: w32kdll.def 27344 2007-08-01 14:12:10Z tkreuzer $ -; -; ReactOS Operating System -; -; This file contains all win32k native api functions from win 2k3 sp 2 -; -LIBRARY w32kdll.dll - -EXPORTS -NtGdiAbortDoc@4 -NtGdiAbortPath@4 -NtGdiAddFontResourceW@24 -NtGdiAddRemoteFontToDC@16 -NtGdiAddFontMemResourceEx@20 -NtGdiRemoveMergeFont@8 -NtGdiAddRemoteMMInstanceToDC@12 -NtGdiAlphaBlend@48 -NtGdiAngleArc@24 -NtGdiAnyLinkedFonts@0 -NtGdiFontIsLinked@4 -NtGdiArcInternal@40 -NtGdiBeginPath@4 -NtGdiBitBlt@44 -NtGdiCancelDC@4 -NtGdiCheckBitmapBits@32 -NtGdiCloseFigure@4 -NtGdiClearBitmapAttributes@8 -NtGdiClearBrushAttributes@8 -NtGdiColorCorrectPalette@24 -NtGdiCombineRgn@16 -NtGdiCombineTransform@12 -NtGdiComputeXformCoefficients@4 -NtGdiConfigureOPMProtectedOutput@16 -NtGdiConsoleTextOut@16 -NtGdiConvertMetafileRect@8 -NtGdiCreateBitmap@20 -NtGdiCreateClientObj@4 -NtGdiCreateColorSpace@4 -NtGdiCreateColorTransform@32 -NtGdiCreateCompatibleBitmap@12 -NtGdiCreateCompatibleDC@4 -NtGdiCreateDIBBrush@24 -NtGdiCreateDIBitmapInternal@44 -NtGdiCreateDIBSection@36 -NtGdiCreateEllipticRgn@16 -NtGdiCreateHalftonePalette@4 -NtGdiCreateHatchBrushInternal@12 -NtGdiCreateMetafileDC@4 -NtGdiCreateOPMProtectedOutputs@20 -NtGdiCreatePaletteInternal@8 -NtGdiCreatePatternBrushInternal@12 -NtGdiCreatePen@16 -NtGdiCreateRectRgn@16 -NtGdiCreateRoundRectRgn@24 -NtGdiCreateServerMetaFile@24 -NtGdiCreateSolidBrush@8 -NtGdiD3dContextCreate@16 -NtGdiD3dContextDestroy@4 -NtGdiD3dContextDestroyAll@4 -NtGdiD3dValidateTextureStageState@4 -NtGdiD3dDrawPrimitives2@28 -NtGdiDdGetDriverState@4 -NtGdiDdAddAttachedSurface@12 -NtGdiDdAlphaBlt@12 -NtGdiDdAttachSurface@8 -NtGdiDdBeginMoCompFrame@8 -NtGdiDdBlt@12 -NtGdiDdCanCreateSurface@8 -NtGdiDdCanCreateD3DBuffer@8 -NtGdiDdColorControl@8 -NtGdiDdCreateDirectDrawObject@4 -NtGdiDdCreateSurface@32 -NtGdiDdCreateD3DBuffer@32 -NtGdiDdCreateMoComp@8 -NtGdiDdCreateSurfaceObject@24 -NtGdiDdDeleteDirectDrawObject@4 -NtGdiDdDeleteSurfaceObject@4 -NtGdiDdDestroyMoComp@8 -NtGdiDdDestroySurface@8 -NtGdiDdDestroyD3DBuffer@4 -NtGdiDdEndMoCompFrame@8 -NtGdiDdFlip@20 -NtGdiDdFlipToGDISurface@8 -NtGdiDdGetAvailDriverMemory@8 -NtGdiDdGetBltStatus@8 -NtGdiDdGetDC@8 -NtGdiDdGetDriverInfo@8 -NtGdiDdGetDxHandle@12 -NtGdiDdGetFlipStatus@8 -NtGdiDdGetInternalMoCompInfo@8 -NtGdiDdGetMoCompBuffInfo@8 -NtGdiDdGetMoCompGuids@8 -NtGdiDdGetMoCompFormats@8 -NtGdiDdGetScanLine@8 -NtGdiDdLock@12 -NtGdiDdLockD3D@8 -NtGdiDdQueryDirectDrawObject@44 -NtGdiDdQueryMoCompStatus@8 -NtGdiDdReenableDirectDrawObject@8 -NtGdiDdReleaseDC@4 -NtGdiDdRenderMoComp@8 -NtGdiDdResetVisrgn@8 -NtGdiDdSetColorKey@8 -NtGdiDdSetExclusiveMode@8 -NtGdiDdSetGammaRamp@12 -NtGdiDdCreateSurfaceEx@12 -NtGdiDdSetOverlayPosition@12 -NtGdiDdUnattachSurface@8 -NtGdiDdUnlock@8 -NtGdiDdUnlockD3D@8 -NtGdiDdUpdateOverlay@12 -NtGdiDdWaitForVerticalBlank@8 -NtGdiDvpCanCreateVideoPort@8 -NtGdiDvpColorControl@8 -NtGdiDvpCreateVideoPort@8 -NtGdiDvpDestroyVideoPort@8 -NtGdiDvpFlipVideoPort@16 -NtGdiDvpGetVideoPortBandwidth@8 -NtGdiDvpGetVideoPortField@8 -NtGdiDvpGetVideoPortFlipStatus@8 -NtGdiDvpGetVideoPortInputFormats@8 -NtGdiDvpGetVideoPortLine@8 -NtGdiDvpGetVideoPortOutputFormats@8 -NtGdiDvpGetVideoPortConnectInfo@8 -NtGdiDvpGetVideoSignalStatus@8 -NtGdiDvpUpdateVideoPort@16 -NtGdiDvpWaitForVideoPortSync@8 -NtGdiDvpAcquireNotification@12 -NtGdiDvpReleaseNotification@8 -NtGdiDxgGenericThunk@24 -NtGdiDeleteClientObj@4 -NtGdiDeleteColorSpace@4 -NtGdiDeleteColorTransform@8 -NtGdiDeleteObjectApp@4 -NtGdiDescribePixelFormat@16 -NtGdiDestroyOPMProtectedOutput@4 -NtGdiGetPerBandInfo@8 -NtGdiDoBanding@16 -NtGdiDoPalette@24 -NtGdiDrawEscape@16 -NtGdiEllipse@20 -NtGdiEnableEudc@4 -NtGdiEndDoc@4 -NtGdiEndPage@4 -NtGdiEndPath@4 -NtGdiEnumFontChunk@20 -NtGdiEnumFontClose@4 -NtGdiEnumFontOpen@28 -NtGdiEnumObjects@16 -NtGdiEqualRgn@8 -NtGdiEudcLoadUnloadLink@28 -NtGdiExcludeClipRect@20 -NtGdiExtCreatePen@44 -NtGdiExtCreateRegion@12 -NtGdiExtEscape@32 -NtGdiExtFloodFill@20 -NtGdiExtGetObjectW@12 -NtGdiExtSelectClipRgn@12 -NtGdiExtTextOutW@36 -NtGdiFillPath@4 -NtGdiFillRgn@12 -NtGdiFlattenPath@4 -NtGdiFlush@0 -NtGdiForceUFIMapping@8 -NtGdiFrameRgn@20 -NtGdiFullscreenControl@20 -NtGdiGetAndSetDCDword@16 -NtGdiGetAppClipBox@8 -NtGdiGetBitmapBits@12 -NtGdiGetBitmapDimension@8 -NtGdiGetBoundsRect@12 -NtGdiGetCertificate@16 -NtGdiGetCertificateSize@12 -NtGdiGetCharABCWidthsW@24 -NtGdiGetCharacterPlacementW@24 -NtGdiGetCharSet@4 -NtGdiGetCharWidthW@24 -NtGdiGetCharWidthInfo@8 -NtGdiGetColorAdjustment@8 -NtGdiGetColorSpaceforBitmap@4 -NtGdiGetCOPPCompatibleOPMInformation@12 -NtGdiGetDCDword@12 -NtGdiGetDCforBitmap@4 -NtGdiGetDCObject@8 -NtGdiGetDCPoint@12 -NtGdiGetDeviceCaps@8 -NtGdiGetDeviceGammaRamp@8 -NtGdiGetDeviceCapsAll@8 -NtGdiGetDIBitsInternal@36 -NtGdiGetETM@8 -NtGdiGetEudcTimeStampEx@12 -NtGdiGetFontData@20 -NtGdiGetFontResourceInfoInternalW@28 -NtGdiGetGlyphIndicesW@20 -NtGdiGetGlyphIndicesWInternal@24 -NtGdiGetGlyphOutline@32 -NtGdiGetOPMInformation@12 -NtGdiGetKerningPairs@12 -NtGdiGetLinkedUFIs@12 -NtGdiGetMiterLimit@8 -NtGdiGetMonitorID@12 -NtGdiGetNearestColor@8 -NtGdiGetNearestPaletteIndex@8 -NtGdiGetObjectBitmapHandle@8 -NtGdiGetOPMRandomNumber@8 -NtGdiGetOutlineTextMetricsInternalW@16 -NtGdiGetPath@16 -NtGdiGetPixel@12 -NtGdiGetRandomRgn@12 -NtGdiGetRasterizerCaps@8 -NtGdiGetRealizationInfo@12 -NtGdiGetRegionData@12 -NtGdiGetRgnBox@8 -NtGdiGetServerMetaFileBits@28 -NtGdiGetSpoolMessage@16 -NtGdiGetStats@20 -NtGdiGetStockObject@4 -NtGdiGetStringBitmapW@20 -NtGdiGetSuggestedOPMProtectedOutputArraySize@8 -NtGdiGetSystemPaletteUse@4 -NtGdiGetTextCharsetInfo@12 -NtGdiGetTextExtent@20 -NtGdiGetTextExtentExW@32 -NtGdiGetTextFaceW@16 -NtGdiGetTextMetricsW@12 -NtGdiGetTransform@12 -NtGdiGetUFI@24 -NtGdiGetEmbUFI@28 -NtGdiGetUFIPathname@40 -NtGdiGetEmbedFonts@0 -NtGdiChangeGhostFont@8 -NtGdiAddEmbFontToDC@8 -NtGdiGetFontUnicodeRanges@8 -NtGdiGetWidthTable@28 -NtGdiGradientFill@24 -NtGdiHfontCreate@20 -NtGdiIcmBrushInfo@32 -NtGdiInit@0 -NtGdiInitSpool@0 -NtGdiIntersectClipRect@20 -NtGdiInvertRgn@8 -NtGdiLineTo@12 -NtGdiMakeFontDir@20 -NtGdiMakeInfoDC@8 -NtGdiMaskBlt@52 -NtGdiModifyWorldTransform@12 -NtGdiMonoBitmap@4 -NtGdiMoveTo@16 -NtGdiOffsetClipRgn@12 -NtGdiOffsetRgn@12 -NtGdiOpenDCW@32 -NtGdiPatBlt@24 -NtGdiPolyPatBlt@20 -NtGdiPathToRegion@4 -NtGdiPlgBlt@44 -NtGdiPolyDraw@16 -NtGdiPolyPolyDraw@20 -NtGdiPolyTextOutW@16 -NtGdiPtInRegion@12 -NtGdiPtVisible@12 -NtGdiQueryFonts@12 -NtGdiQueryFontAssocInfo@4 -NtGdiRectangle@20 -NtGdiRectInRegion@8 -NtGdiRectVisible@8 -NtGdiRemoveFontResourceW@24 -NtGdiRemoveFontMemResourceEx@4 -NtGdiResetDC@20 -NtGdiResizePalette@8 -NtGdiRestoreDC@8 -NtGdiRoundRect@28 -NtGdiSaveDC@4 -NtGdiScaleViewportExtEx@24 -NtGdiScaleWindowExtEx@24 -NtGdiSelectBitmap@8 -NtGdiSelectBrush@8 -NtGdiSelectClipPath@8 -NtGdiSelectFont@8 -NtGdiSelectPen@8 -NtGdiSetBitmapAttributes@8 -NtGdiSetBitmapBits@12 -NtGdiSetBitmapDimension@16 -NtGdiSetBoundsRect@12 -NtGdiSetBrushAttributes@8 -NtGdiSetBrushOrg@16 -NtGdiSetColorAdjustment@8 -NtGdiSetColorSpace@8 -NtGdiSetDeviceGammaRamp@8 -NtGdiSetDIBitsToDeviceInternal@64 -NtGdiSetFontEnumeration@4 -NtGdiSetFontXform@12 -NtGdiSetIcmMode@12 -NtGdiSetLinkedUFIs@12 -NtGdiSetMagicColors@12 -NtGdiSetMetaRgn@4 -NtGdiSetMiterLimit@12 -NtGdiGetDeviceWidth@4 -NtGdiMirrorWindowOrg@4 -NtGdiSetLayout@12 -NtGdiSetOPMSigningKeyAndSequenceNumbers@8 -NtGdiSetPixel@16 -NtGdiSetPixelFormat@8 -NtGdiSetRectRgn@20 -NtGdiSetSystemPaletteUse@8 -NtGdiSetTextJustification@12 -NtGdiSetupPublicCFONT@12 -NtGdiSetVirtualResolution@20 -NtGdiSetSizeDevice@12 -NtGdiStartDoc@16 -NtGdiStartPage@4 -NtGdiStretchBlt@48 -NtGdiStretchDIBitsInternal@64 -NtGdiStrokeAndFillPath@4 -NtGdiStrokePath@4 -NtGdiSwapBuffers@4 -NtGdiTransformPoints@20 -NtGdiTransparentBlt@44 -NtGdiUnloadPrinterDriver@8 -NtGdiUnmapMemFont@4 -NtGdiUnrealizeObject@4 -NtGdiUpdateColors@4 -NtGdiWidenPath@4 -NtUserActivateKeyboardLayout@8 -NtUserAddClipboardFormatListener@4 -NtUserAlterWindowStyle@12 -NtUserAssociateInputContext@12 -NtUserAttachThreadInput@12 -NtUserBeginPaint@8 -NtUserBitBltSysBmp@32 -NtUserBlockInput@4 -NtUserBuildHimcList@16 -NtUserBuildHwndList@28 -NtUserBuildNameList@16 -NtUserBuildPropList@16 -NtUserCallHwnd@8 -NtUserCallHwndLock@8 -NtUserCallHwndOpt@8 -NtUserCallHwndParam@12 -NtUserCallHwndParamLock@12 -NtUserCallMsgFilter@8 -NtUserCallNextHookEx@16 -NtUserCallNoParam@4 -NtUserCallOneParam@8 -NtUserCallTwoParam@12 -NtUserChangeClipboardChain@8 -NtUserChangeDisplaySettings@16 -NtUserCheckAccessForIntegrityLevel@12 -NtUserCheckDesktopByThreadId@4 -NtUserCheckWindowThreadDesktop@12 -NtUserCheckImeHotKey@8 -NtUserCheckMenuItem@12 -NtUserChildWindowFromPointEx@16 -NtUserClipCursor@4 -NtUserCloseClipboard@0 -NtUserCloseDesktop@4 -NtUserCloseWindowStation@4 -NtUserConsoleControl@12 -NtUserConvertMemHandle@8 -NtUserCopyAcceleratorTable@12 -NtUserCountClipboardFormats@0 -NtUserCreateAcceleratorTable@8 -NtUserCreateCaret@16 -NtUserCreateDesktopEx@24 -NtUserCreateInputContext@4 -NtUserCreateLocalMemHandle@16 -NtUserCreateWindowEx@60 -NtUserCreateWindowStation@28 -NtUserDdeInitialize@20 -NtUserDeferWindowPos@32 -NtUserDefSetText@8 -NtUserDeleteMenu@12 -NtUserDestroyAcceleratorTable@4 -NtUserDestroyCursor@8 -NtUserDestroyInputContext@4 -NtUserDestroyMenu@4 -NtUserDestroyWindow@4 -NtUserDisableThreadIme@4 -NtUserDispatchMessage@4 -NtUserDoSoundConnect@0 -NtUserDoSoundDisconnect@0 -NtUserDragDetect@12 -NtUserDragObject@20 -NtUserDrawAnimatedRects@16 -NtUserDrawCaption@16 -NtUserDrawCaptionTemp@28 -NtUserDrawIconEx@44 -NtUserDrawMenuBarTemp@20 -NtUserEmptyClipboard@0 -NtUserEnableMenuItem@12 -NtUserEnableScrollBar@12 -NtUserEndDeferWindowPosEx@8 -NtUserEndMenu@0 -NtUserEndPaint@8 -NtUserEnumDisplayDevices@16 -NtUserEnumDisplayMonitors@16 -NtUserEnumDisplaySettings@16 -NtUserEvent@4 -NtUserExcludeUpdateRgn@8 -NtUserFillWindow@16 -NtUserFindExistingCursorIcon@12 -NtUserFindWindowEx@20 -NtUserFlashWindowEx@4 -NtUserFrostCrashedWindow@8 -NtUserGetAltTabInfo@24 -NtUserGetAncestor@8 -NtUserGetAppImeLevel@4 -NtUserGetAsyncKeyState@4 -NtUserGetAtomName@8 -NtUserGetCaretBlinkTime@0 -NtUserGetCaretPos@4 -NtUserGetClassInfoEx@20 -NtUserGetClassName@12 -NtUserGetClipboardData@8 -NtUserGetClipboardFormatName@12 -NtUserGetClipboardOwner@0 -NtUserGetClipboardSequenceNumber@0 -NtUserGetClipboardViewer@0 -NtUserGetClipCursor@4 -NtUserGetComboBoxInfo@8 -NtUserGetControlBrush@12 -NtUserGetControlColor@16 -NtUserGetCPD@12 -NtUserGetCursorFrameInfo@16 -NtUserGetCursorInfo@4 -NtUserGetDC@4 -NtUserGetDCEx@12 -NtUserGetDoubleClickTime@0 -NtUserGetForegroundWindow@0 -NtUserGetGuiResources@8 -NtUserGetGUIThreadInfo@8 -NtUserGetIconInfo@24 -NtUserGetIconSize@16 -NtUserGetImeHotKey@16 -NtUserGetImeInfoEx@8 -NtUserGetInternalWindowPos@12 -NtUserGetKeyboardLayoutList@8 -NtUserGetKeyboardLayoutName@4 -NtUserGetKeyboardState@4 -NtUserGetKeyNameText@12 -NtUserGetKeyState@4 -NtUserGetListBoxInfo@4 -NtUserGetMenuBarInfo@16 -NtUserGetMenuIndex@8 -NtUserGetMenuItemRect@16 -NtUserGetMessage@16 -NtUserGetMouseMovePointsEx@20 -NtUserGetObjectInformation@20 -NtUserGetOpenClipboardWindow@0 -NtUserGetPriorityClipboardFormat@8 -NtUserGetProcessWindowStation@0 -NtUserGetRawInputBuffer@12 -NtUserGetRawInputData@20 -NtUserGetRawInputDeviceInfo@16 -NtUserGetRawInputDeviceList@12 -NtUserGetRegisteredRawInputDevices@12 -NtUserGetScrollBarInfo@12 -NtUserGetSystemMenu@8 -NtUserGetThreadDesktop@8 -NtUserGetThreadState@4 -NtUserGetTitleBarInfo@8 -NtUserGetUpdatedClipboardFormats@12 -NtUserGetUpdateRect@12 -NtUserGetUpdateRgn@12 -NtUserGetWindowDC@4 -NtUserGetWindowPlacement@8 -NtUserGetWOWClass@8 -NtUserGhostWindowFromHungWindow@4 -NtUserHardErrorControl@12 -NtUserHideCaret@4 -NtUserHiliteMenuItem@16 -NtUserHungWindowFromGhostWindow@4 -NtUserImpersonateDdeClientWindow@8 -NtUserInitialize@8 -NtUserInitializeClientPfnArrays@16 -NtUserInitTask@48 -NtUserInternalGetWindowText@12 -NtUserInternalGetWindowIcon@8 -NtUserInvalidateRect@12 -NtUserInvalidateRgn@12 -NtUserIsClipboardFormatAvailable@4 -NtUserKillTimer@8 -NtUserLoadKeyboardLayoutEx@28 -NtUserLockWindowStation@4 -NtUserLockWindowUpdate@4 -NtUserLockWorkStation@0 -NtUserLogicalToPhysicalPoint@8 -NtUserMapVirtualKeyEx@16 -NtUserMenuItemFromPoint@16 -NtUserMessageCall@28 -NtUserMinMaximize@12 -NtUserMNDragLeave@0 -NtUserMNDragOver@8 -NtUserModifyUserStartupInfoFlags@8 -NtUserMoveWindow@24 -NtUserNotifyIMEStatus@12 -NtUserNotifyProcessCreate@16 -NtUserNotifyWinEvent@16 -NtUserOpenClipboard@8 -NtUserOpenDesktop@12 -NtUserOpenInputDesktop@12 -NtUserOpenThreadDesktop@20 -NtUserOpenWindowStation@8 -NtUserPaintDesktop@4 -NtUserPaintMonitor@12 -NtUserPeekMessage@20 -NtUserPhysicalToLogicalPoint@8 -NtUserPostMessage@16 -NtUserPostThreadMessage@16 -NtUserPrintWindow@12 -NtUserProcessConnect@8 -NtUserQueryInformationThread@16 -NtUserQueryInputContext@8 -NtUserQuerySendMessage@4 -NtUserQueryWindow@8 -NtUserRealChildWindowFromPoint@12 -NtUserRealInternalGetMessage@24 -NtUserRealWaitMessageEx@8 -NtUserRedrawWindow@16 -NtUserRegisterClassExWOW@28 -NtUserRegisterErrorReportingDialog@8 -NtUserRegisterUserApiHook@16 -NtUserRegisterHotKey@16 -NtUserRegisterRawInputDevices@12 -NtUserRegisterTasklist@4 -NtUserRegisterWindowMessage@4 -NtUserRemoveClipboardFormatListener@4 -NtUserRemoveMenu@12 -NtUserRemoveProp@8 -NtUserResolveDesktop@16 -NtUserResolveDesktopForWOW@4 -NtUserSBGetParms@16 -NtUserScrollDC@28 -NtUserScrollWindowEx@32 -NtUserSelectPalette@12 -NtUserSendInput@12 -NtUserSetActiveWindow@4 -NtUserSetAppImeLevel@8 -NtUserSetCapture@4 -NtUserSetClassLong@16 -NtUserSetClassWord@12 -NtUserSetClipboardData@12 -NtUserSetClipboardViewer@4 -NtUserSetConsoleReserveKeys@8 -NtUserSetCursor@4 -NtUserSetCursorContents@8 -NtUserSetCursorIconData@16 -NtUserSetFocus@4 -NtUserSetImeHotKey@20 -NtUserSetImeInfoEx@4 -NtUserSetImeOwnerWindow@8 -NtUserSetInformationProcess@16 -NtUserSetInformationThread@16 -NtUserSetInternalWindowPos@16 -NtUserSetKeyboardState@4 -NtUserSetMenu@12 -NtUserSetMenuContextHelpId@8 -NtUserSetMenuDefaultItem@12 -NtUserSetMenuFlagRtoL@4 -NtUserSetObjectInformation@16 -NtUserSetParent@8 -NtUserSetProcessWindowStation@4 -NtUserGetProp@8 -NtUserSetProp@12 -NtUserSetScrollInfo@16 -NtUserSetShellWindowEx@8 -NtUserSetSysColors@16 -NtUserSetSystemCursor@8 -NtUserSetSystemMenu@8 -NtUserSetSystemTimer@12 -NtUserSetThreadDesktop@4 -NtUserSetThreadLayoutHandles@8 -NtUserSetThreadState@8 -NtUserSetTimer@16 -NtUserSetProcessDPIAware@0 -NtUserSetWindowFNID@8 -NtUserSetWindowLong@16 -NtUserSetWindowPlacement@8 -NtUserSetWindowPos@28 -NtUserSetWindowRgn@12 -NtUserGetWindowRgnEx@12 -NtUserSetWindowRgnEx@12 -NtUserSetWindowsHookAW@12 -NtUserSetWindowsHookEx@24 -NtUserSetWindowStationUser@16 -NtUserSetWindowWord@12 -NtUserSetWinEventHook@32 -NtUserShowCaret@4 -NtUserShowScrollBar@12 -NtUserShowWindow@8 -NtUserShowWindowAsync@8 -NtUserSoundSentry@0 -NtUserSwitchDesktop@8 -NtUserSystemParametersInfo@16 -NtUserTestForInteractiveUser@4 -NtUserThunkedMenuInfo@8 -NtUserThunkedMenuItemInfo@24 -NtUserToUnicodeEx@28 -NtUserTrackMouseEvent@4 -NtUserTrackPopupMenuEx@24 -NtUserCalcMenuBar@20 -NtUserPaintMenuBar@24 -NtUserTranslateAccelerator@12 -NtUserTranslateMessage@8 -NtUserUnhookWindowsHookEx@4 -NtUserUnhookWinEvent@4 -NtUserUnloadKeyboardLayout@4 -NtUserUnlockWindowStation@4 -NtUserUnregisterClass@12 -NtUserUnregisterUserApiHook@0 -NtUserUnregisterHotKey@8 -NtUserUpdateInputContext@12 -NtUserUpdateInstance@12 -NtUserUpdateLayeredWindow@40 -NtUserGetLayeredWindowAttributes@16 -NtUserSetLayeredWindowAttributes@16 -NtUserUpdatePerUserSystemParameters@4 -NtUserUserHandleGrantAccess@12 -NtUserValidateHandleSecure@4 -NtUserValidateRect@8 -NtUserValidateTimerCallback@4 -NtUserVkKeyScanEx@12 -NtUserWaitForInputIdle@12 -NtUserWaitForMsgAndEvent@4 -NtUserWaitMessage@0 -NtUserWin32PoolAllocationStats@24 -NtUserWindowFromPhysicalPoint@8 -NtUserWindowFromPoint@8 -NtUserYieldTask@0 -NtUserRemoteConnect@12 -NtUserRemoteRedrawRectangle@16 -NtUserRemoteRedrawScreen@0 -NtUserRemoteStopScreenUpdates@0 -NtUserCtxDisplayIOCtl@12 -NtUserRegisterSessionPort@4 -NtUserUnregisterSessionPort@0 -NtUserUpdateWindowTransform@12 -NtUserDwmStartRedirection@4 -NtUserDwmStopRedirection@0 -NtUserDwmHintDxUpdate@8 -NtUserDwmGetDxRgn@12 -NtUserGetWindowMinimizeRect@8 -NtGdiEngAssociateSurface@12 -NtGdiEngCreateBitmap@24 -NtGdiEngCreateDeviceSurface@16 -NtGdiEngCreateDeviceBitmap@16 -NtGdiEngCreatePalette@24 -NtGdiEngComputeGlyphSet@12 -NtGdiEngCopyBits@24 -NtGdiEngDeletePalette@4 -NtGdiEngDeleteSurface@4 -NtGdiEngEraseSurface@12 -NtGdiEngUnlockSurface@4 -NtGdiEngLockSurface@4 -NtGdiEngBitBlt@44 -NtGdiEngStretchBlt@44 -NtGdiEngPlgBlt@44 -NtGdiEngMarkBandingSurface@4 -NtGdiEngStrokePath@32 -NtGdiEngFillPath@28 -NtGdiEngStrokeAndFillPath@40 -NtGdiEngPaint@20 -NtGdiEngLineTo@36 -NtGdiEngAlphaBlend@28 -NtGdiEngGradientFill@40 -NtGdiEngTransparentBlt@32 -NtGdiEngTextOut@40 -NtGdiEngStretchBltROP@52 -NtGdiXLATEOBJ_cGetPalette@16 -NtGdiXLATEOBJ_iXlate@8 -NtGdiXLATEOBJ_hGetColorTransform@4 -NtGdiCLIPOBJ_bEnum@12 -NtGdiCLIPOBJ_cEnumStart@20 -NtGdiCLIPOBJ_ppoGetPath@4 -NtGdiEngDeletePath@4 -NtGdiEngCreateClip@0 -NtGdiEngDeleteClip@4 -NtGdiBRUSHOBJ_ulGetBrushColor@4 -NtGdiBRUSHOBJ_pvAllocRbrush@8 -NtGdiBRUSHOBJ_pvGetRbrush@4 -NtGdiBRUSHOBJ_hGetColorTransform@4 -NtGdiXFORMOBJ_bApplyXform@20 -NtGdiXFORMOBJ_iGetXform@8 -NtGdiFONTOBJ_vGetInfo@12 -NtGdiFONTOBJ_pxoGetXform@4 -NtGdiFONTOBJ_cGetGlyphs@20 -NtGdiFONTOBJ_pifi@4 -NtGdiFONTOBJ_pfdg@4 -NtGdiFONTOBJ_pQueryGlyphAttrs@8 -NtGdiFONTOBJ_pvTrueTypeFontFile@8 -NtGdiFONTOBJ_cGetAllGlyphHandles@8 -NtGdiSTROBJ_bEnum@12 -NtGdiSTROBJ_bEnumPositionsOnly@12 -NtGdiSTROBJ_bGetAdvanceWidths@16 -NtGdiSTROBJ_vEnumStart@4 -NtGdiSTROBJ_dwGetCodePage@4 -NtGdiPATHOBJ_vGetBounds@8 -NtGdiPATHOBJ_bEnum@8 -NtGdiPATHOBJ_vEnumStart@4 -NtGdiPATHOBJ_vEnumStartClipLines@16 -NtGdiPATHOBJ_bEnumClipLines@12 -NtGdiGetDhpdev@4 -NtGdiEngCheckAbort@4 -NtGdiHT_Get8BPPFormatPalette@16 -NtGdiHT_Get8BPPMaskPalette@24 -NtGdiUpdateTransform@4 -NtGdiSetPUMPDOBJ@16 -NtGdiBRUSHOBJ_DeleteRbrush@8 -NtGdiUMPDEngFreeUserMem@4 -NtGdiDrawStream@12 -NtGdiDwmGetDirtyRgn@20 -NtGdiDwmGetSurfaceData@8 -NtGdiDdDDICreateAllocation@4 -NtGdiDdDDIQueryResourceInfo@4 -NtGdiDdDDIOpenResource@4 -NtGdiDdDDIDestroyAllocation@4 -NtGdiDdDDISetAllocationPriority@4 -NtGdiDdDDIQueryAllocationResidency@4 -NtGdiDdDDICreateDevice@4 -NtGdiDdDDIDestroyDevice@4 -NtGdiDdDDICreateContext@4 -NtGdiDdDDIDestroyContext@4 -NtGdiDdDDICreateSynchronizationObject@4 -NtGdiDdDDIDestroySynchronizationObject@4 -NtGdiDdDDIWaitForSynchronizationObject@4 -NtGdiDdDDISignalSynchronizationObject@4 -NtGdiDdDDIGetRuntimeData@4 -NtGdiDdDDIQueryAdapterInfo@4 -NtGdiDdDDILock@4 -NtGdiDdDDIUnlock@4 -NtGdiDdDDIGetDisplayModeList@4 -NtGdiDdDDISetDisplayMode@4 -NtGdiDdDDIGetMultisampleMethodList@4 -NtGdiDdDDIPresent@4 -NtGdiDdDDIRender@4 -NtGdiDdDDIOpenAdapterFromDeviceName@4 -NtGdiDdDDIOpenAdapterFromHdc@4 -NtGdiDdDDICloseAdapter@4 -NtGdiDdDDIGetSharedPrimaryHandle@4 -NtGdiDdDDIEscape@4 -NtGdiDdDDIQueryStatistics@4 -NtGdiDdDDISetVidPnSourceOwner@4 -NtGdiDdDDIGetPresentHistory@4 -NtGdiDdDDICreateOverlay@4 -NtGdiDdDDIUpdateOverlay@4 -NtGdiDdDDIFlipOverlay@4 -NtGdiDdDDIDestroyOverlay@4 -NtGdiDdDDIWaitForVerticalBlankEvent@4 -NtGdiDdDDISetGammaRamp@4 -NtGdiDdDDIGetDeviceState@4 -NtGdiDdDDICreateDCFromMemory@4 -NtGdiDdDDIDestroyDCFromMemory@4 -NtGdiDdDDISetContextSchedulingPriority@4 -NtGdiDdDDIGetContextSchedulingPriority@4 -NtGdiDdDDISetProcessSchedulingPriorityClass@8 -NtGdiDdDDIGetProcessSchedulingPriorityClass@8 -NtGdiDdDDIReleaseProcessVidPnSourceOwners@4 -NtGdiDdDDIGetScanLine@4 -NtGdiDdDDISetQueuedLimit@4 -NtGdiDdDDIPollDisplayChildren@4 -NtGdiDdDDIInvalidateActiveVidPn@4 -NtGdiDdDDICheckOcclusion@4 -NtGdiDdDDIWaitForIdle@4 -NtGdiDdDDICheckMonitorPowerState@4 -NtGdiDdDDICheckExclusiveOwnership@0 -NtGdiDdDDISetDisplayPrivateDriverFormat@4 -NtGdiDdDDISharedPrimaryLockNotification@4 -NtGdiDdDDISharedPrimaryUnLockNotification@4 -NtGdiMakeObjectXferable@8 -NtGdiMakeObjectUnXferable@4 -NtGdiGetNumberOfPhysicalMonitors@8 -NtGdiGetPhysicalMonitors@16 -NtGdiGetPhysicalMonitorDescription@12 -NtGdiDestroyPhysicalMonitor@4 -NtGdiDDCCIGetVCPFeature@20 -NtGdiDDCCISetVCPFeature@12 -NtGdiDDCCISaveCurrentSettings@4 -NtGdiDDCCIGetCapabilitiesStringLength@8 -NtGdiDDCCIGetCapabilitiesString@12 -NtGdiDDCCIGetTimingReport@8 -NtUserSetMirrorRendering@8 -NtUserShowSystemCursor@4 diff --git a/rostests/apitests/w32kdll/w32kdll_vista/w32kdll_vista.rbuild b/rostests/apitests/w32kdll/w32kdll_vista/w32kdll_vista.rbuild deleted file mode 100644 index 68c9b18d23b..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_vista/w32kdll_vista.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - - w32kdll_vista.S - main.c - diff --git a/rostests/apitests/w32kdll/w32kdll_xpsp2/CMakeLists.txt b/rostests/apitests/w32kdll/w32kdll_xpsp2/CMakeLists.txt deleted file mode 100644 index e3579261dd4..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_xpsp2/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ - -add_library(w32kdll_xpsp2 SHARED main.c w32kdll_xpsp2.S) -set_entrypoint(w32kdll_xpsp2 0) -target_link_libraries(w32kdll_xpsp2 ${CMAKE_CURRENT_SOURCE_DIR}/w32kdll_xpsp2.def) -add_dependencies(w32kdll_xpsp2 psdk ) -add_importlib_target(w32kdll_xpsp2.def) diff --git a/rostests/apitests/w32kdll/w32kdll_xpsp2/main.c b/rostests/apitests/w32kdll/w32kdll_xpsp2/main.c deleted file mode 100644 index 13a149cc27e..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_xpsp2/main.c +++ /dev/null @@ -1,31 +0,0 @@ -#include - -#ifdef BUILD_DLL - #define DLL_EXPORT __declspec(dllexport) -#else - #define DLL_EXPORT -#endif - -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - // attach to process - // return FALSE to fail DLL load - break; - - case DLL_PROCESS_DETACH: - // detach from process - break; - - case DLL_THREAD_ATTACH: - // attach to thread - break; - - case DLL_THREAD_DETACH: - // detach from thread - break; - } - return TRUE; // succesful -} diff --git a/rostests/apitests/w32kdll/w32kdll_xpsp2/w32k_xpsp2-x86.db b/rostests/apitests/w32kdll/w32kdll_xpsp2/w32k_xpsp2-x86.db deleted file mode 100644 index 7db341886d9..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_xpsp2/w32k_xpsp2-x86.db +++ /dev/null @@ -1,670 +0,0 @@ -# -# win32k systemcalls taken from Windows XP SP2 x86 -# -NtGdiAbortDoc 1 -NtGdiAbortPath 1 -NtGdiAddFontResourceW 6 -NtGdiAddRemoteFontToDC 4 -NtGdiAddFontMemResourceEx 5 -NtGdiRemoveMergeFont 2 -NtGdiAddRemoteMMInstanceToDC 3 -NtGdiAlphaBlend 12 -NtGdiAngleArc 6 -NtGdiAnyLinkedFonts 0 -NtGdiFontIsLinked 1 -NtGdiArcInternal 10 -NtGdiBeginPath 1 -NtGdiBitBlt 11 -NtGdiCancelDC 1 -NtGdiCheckBitmapBits 8 -NtGdiCloseFigure 1 -NtGdiClearBitmapAttributes 2 -NtGdiClearBrushAttributes 2 -NtGdiColorCorrectPalette 6 -NtGdiCombineRgn 4 -NtGdiCombineTransform 3 -NtGdiComputeXformCoefficients 1 -NtGdiConsoleTextOut 4 -NtGdiConvertMetafileRect 2 -NtGdiCreateBitmap 5 -NtGdiCreateClientObj 1 -NtGdiCreateColorSpace 1 -NtGdiCreateColorTransform 8 -NtGdiCreateCompatibleBitmap 3 -NtGdiCreateCompatibleDC 1 -NtGdiCreateDIBBrush 6 -NtGdiCreateDIBitmapInternal 11 -NtGdiCreateDIBSection 9 -NtGdiCreateEllipticRgn 4 -NtGdiCreateHalftonePalette 1 -NtGdiCreateHatchBrushInternal 3 -NtGdiCreateMetafileDC 1 -NtGdiCreatePaletteInternal 2 -NtGdiCreatePatternBrushInternal 3 -NtGdiCreatePen 4 -NtGdiCreateRectRgn 4 -NtGdiCreateRoundRectRgn 6 -NtGdiCreateServerMetaFile 6 -NtGdiCreateSolidBrush 2 -NtGdiD3dContextCreate 4 -NtGdiD3dContextDestroy 1 -NtGdiD3dContextDestroyAll 1 -NtGdiD3dValidateTextureStageState 1 -NtGdiD3dDrawPrimitives2 7 -NtGdiDdGetDriverState 1 -NtGdiDdAddAttachedSurface 3 -NtGdiDdAlphaBlt 3 -NtGdiDdAttachSurface 2 -NtGdiDdBeginMoCompFrame 2 -NtGdiDdBlt 3 -NtGdiDdCanCreateSurface 2 -NtGdiDdCanCreateD3DBuffer 2 -NtGdiDdColorControl 2 -NtGdiDdCreateDirectDrawObject 1 -NtGdiDdCreateSurface 8 -NtGdiDdCreateD3DBuffer 8 -NtGdiDdCreateMoComp 2 -NtGdiDdCreateSurfaceObject 6 -NtGdiDdDeleteDirectDrawObject 1 -NtGdiDdDeleteSurfaceObject 1 -NtGdiDdDestroyMoComp 2 -NtGdiDdDestroySurface 2 -NtGdiDdDestroyD3DBuffer 1 -NtGdiDdEndMoCompFrame 2 -NtGdiDdFlip 5 -NtGdiDdFlipToGDISurface 2 -NtGdiDdGetAvailDriverMemory 2 -NtGdiDdGetBltStatus 2 -NtGdiDdGetDC 2 -NtGdiDdGetDriverInfo 2 -NtGdiDdGetDxHandle 3 -NtGdiDdGetFlipStatus 2 -NtGdiDdGetInternalMoCompInfo 2 -NtGdiDdGetMoCompBuffInfo 2 -NtGdiDdGetMoCompGuids 2 -NtGdiDdGetMoCompFormats 2 -NtGdiDdGetScanLine 2 -NtGdiDdLock 3 -NtGdiDdLockD3D 2 -NtGdiDdQueryDirectDrawObject 11 -NtGdiDdQueryMoCompStatus 2 -NtGdiDdReenableDirectDrawObject 2 -NtGdiDdReleaseDC 1 -NtGdiDdRenderMoComp 2 -NtGdiDdResetVisrgn 2 -NtGdiDdSetColorKey 2 -NtGdiDdSetExclusiveMode 2 -NtGdiDdSetGammaRamp 3 -NtGdiDdCreateSurfaceEx 3 -NtGdiDdSetOverlayPosition 3 -NtGdiDdUnattachSurface 2 -NtGdiDdUnlock 2 -NtGdiDdUnlockD3D 2 -NtGdiDdUpdateOverlay 3 -NtGdiDdWaitForVerticalBlank 2 -NtGdiDvpCanCreateVideoPort 2 -NtGdiDvpColorControl 2 -NtGdiDvpCreateVideoPort 2 -NtGdiDvpDestroyVideoPort 2 -NtGdiDvpFlipVideoPort 4 -NtGdiDvpGetVideoPortBandwidth 2 -NtGdiDvpGetVideoPortField 2 -NtGdiDvpGetVideoPortFlipStatus 2 -NtGdiDvpGetVideoPortInputFormats 2 -NtGdiDvpGetVideoPortLine 2 -NtGdiDvpGetVideoPortOutputFormats 2 -NtGdiDvpGetVideoPortConnectInfo 2 -NtGdiDvpGetVideoSignalStatus 2 -NtGdiDvpUpdateVideoPort 4 -NtGdiDvpWaitForVideoPortSync 2 -NtGdiDvpAcquireNotification 3 -NtGdiDvpReleaseNotification 2 -NtGdiDxgGenericThunk 6 -NtGdiDeleteClientObj 1 -NtGdiDeleteColorSpace 1 -NtGdiDeleteColorTransform 2 -NtGdiDeleteObjectApp 1 -NtGdiDescribePixelFormat 4 -NtGdiGetPerBandInfo 2 -NtGdiDoBanding 4 -NtGdiDoPalette 6 -NtGdiDrawEscape 4 -NtGdiEllipse 5 -NtGdiEnableEUDC 1 -NtGdiEndDoc 1 -NtGdiEndPage 1 -NtGdiEndPath 1 -NtGdiEnumFontChunk 5 -NtGdiEnumFontClose 1 -NtGdiEnumFontOpen 7 -NtGdiEnumObjects 4 -NtGdiEqualRgn 2 -NtGdiEudcLoadUnloadLink 7 -NtGdiExcludeClipRect 5 -NtGdiExtCreatePen 11 -NtGdiExtCreateRegion 3 -NtGdiExtEscape 8 -NtGdiExtFloodFill 5 -NtGdiExtGetObjectW 3 -NtGdiExtSelectClipRgn 3 -NtGdiExtTextOutW 9 -NtGdiFillPath 1 -NtGdiFillRgn 3 -NtGdiFlattenPath 1 -NtGdiFlushUserBatch 0 -NtGdiFlush 0 -NtGdiForceUFIMapping 2 -NtGdiFrameRgn 5 -NtGdiFullscreenControl 5 -NtGdiGetAndSetDCDword 4 -NtGdiGetAppClipBox 2 -NtGdiGetBitmapBits 3 -NtGdiGetBitmapDimension 2 -NtGdiGetBoundsRect 3 -NtGdiGetCharABCWidthsW 6 -NtGdiGetCharacterPlacementW 6 -NtGdiGetCharSet 1 -NtGdiGetCharWidthW 6 -NtGdiGetCharWidthInfo 2 -NtGdiGetColorAdjustment 2 -NtGdiGetColorSpaceforBitmap 1 -NtGdiGetDCDword 3 -NtGdiGetDCforBitmap 1 -NtGdiGetDCObject 2 -NtGdiGetDCPoint 3 -NtGdiGetDeviceCaps 2 -NtGdiGetDeviceGammaRamp 2 -NtGdiGetDeviceCapsAll 2 -NtGdiGetDIBitsInternal 9 -NtGdiGetETM 2 -NtGdiGetEudcTimeStampEx 3 -NtGdiGetFontData 5 -NtGdiGetFontResourceInfoInternalW 7 -NtGdiGetGlyphIndicesW 5 -NtGdiGetGlyphIndicesWInternal 6 -NtGdiGetGlyphOutline 8 -NtGdiGetKerningPairs 3 -NtGdiGetLinkedUFIs 3 -NtGdiGetMiterLimit 2 -NtGdiGetMonitorID 3 -NtGdiGetNearestColor 2 -NtGdiGetNearestPaletteIndex 2 -NtGdiGetObjectBitmapHandle 2 -NtGdiGetOutlineTextMetricsInternalW 4 -NtGdiGetPath 4 -NtGdiGetPixel 3 -NtGdiGetRandomRgn 3 -NtGdiGetRasterizerCaps 2 -NtGdiGetRealizationInfo 3 -NtGdiGetRegionData 3 -NtGdiGetRgnBox 2 -NtGdiGetServerMetaFileBits 7 -NtGdiGetSpoolMessage 4 -NtGdiGetStats 5 -NtGdiGetStockObject 1 -NtGdiGetStringBitmapW 5 -NtGdiGetSystemPaletteUse 1 -NtGdiGetTextCharsetInfo 3 -NtGdiGetTextExtent 5 -NtGdiGetTextExtentExW 8 -NtGdiGetTextFaceW 4 -NtGdiGetTextMetricsW 3 -NtGdiGetTransform 3 -NtGdiGetUFI 6 -NtGdiGetEmbUFI 7 -NtGdiGetUFIPathname 10 -NtGdiGetEmbedFonts 0 -NtGdiChangeGhostFont 2 -NtGdiAddEmbFontToDC 2 -NtGdiGetFontUnicodeRanges 2 -NtGdiGetWidthTable 7 -NtGdiGradientFill 6 -NtGdiHfontCreate 5 -NtGdiIcmBrushInfo 8 -NtGdiInit 0 -NtGdiInitSpool 0 -NtGdiIntersectClipRect 5 -NtGdiInvertRgn 2 -NtGdiLineTo 3 -NtGdiMakeFontDir 5 -NtGdiMakeInfoDC 2 -NtGdiMaskBlt 13 -NtGdiModifyWorldTransform 3 -NtGdiMonoBitmap 1 -NtGdiMoveTo 4 -NtGdiOffsetClipRgn 3 -NtGdiOffsetRgn 3 -NtGdiOpenDCW 7 -NtGdiPatBlt 6 -NtGdiPolyPatBlt 5 -NtGdiPathToRegion 1 -NtGdiPlgBlt 11 -NtGdiPolyDraw 4 -NtGdiPolyPolyDraw 5 -NtGdiPolyTextOutW 4 -NtGdiPtInRegion 3 -NtGdiPtVisible 3 -NtGdiQueryFonts 3 -NtGdiQueryFontAssocInfo 1 -NtGdiRectangle 5 -NtGdiRectInRegion 2 -NtGdiRectVisible 2 -NtGdiRemoveFontResourceW 6 -NtGdiRemoveFontMemResourceEx 1 -NtGdiResetDC 5 -NtGdiResizePalette 2 -NtGdiRestoreDC 2 -NtGdiRoundRect 7 -NtGdiSaveDC 1 -NtGdiScaleViewportExtEx 6 -NtGdiScaleWindowExtEx 6 -NtGdiSelectBitmap 2 -NtGdiSelectBrush 2 -NtGdiSelectClipPath 2 -NtGdiSelectFont 2 -NtGdiSelectPen 2 -NtGdiSetBitmapAttributes 2 -NtGdiSetBitmapBits 3 -NtGdiSetBitmapDimension 4 -NtGdiSetBoundsRect 3 -NtGdiSetBrushAttributes 2 -NtGdiSetBrushOrg 4 -NtGdiSetColorAdjustment 2 -NtGdiSetColorSpace 2 -NtGdiSetDeviceGammaRamp 2 -NtGdiSetDIBitsToDeviceInternal 16 -NtGdiSetFontEnumeration 1 -NtGdiSetFontXform 3 -NtGdiSetIcmMode 3 -NtGdiSetLinkedUFIs 3 -NtGdiSetMagicColors 3 -NtGdiSetMetaRgn 1 -NtGdiSetMiterLimit 3 -NtGdiGetDeviceWidth 1 -NtGdiMirrorWindowOrg 1 -NtGdiSetLayout 3 -NtGdiSetPixel 4 -NtGdiSetPixelFormat 2 -NtGdiSetRectRgn 5 -NtGdiSetSystemPaletteUse 2 -NtGdiSetTextJustification 3 -NtGdiSetupPublicCFONT 3 -NtGdiSetVirtualResolution 5 -NtGdiSetSizeDevice 3 -NtGdiStartDoc 4 -NtGdiStartPage 1 -NtGdiStretchBlt 12 -NtGdiStretchDIBitsInternal 16 -NtGdiStrokeAndFillPath 1 -NtGdiStrokePath 1 -NtGdiSwapBuffers 1 -NtGdiTransformPoints 5 -NtGdiTransparentBlt 11 -NtGdiUnloadPrinterDriver 2 -NtGdiUnmapMemFont 1 -NtGdiUnrealizeObject 1 -NtGdiUpdateColors 1 -NtGdiWidenPath 1 -NtUserActivateKeyboardLayout 2 -NtUserAlterWindowStyle 3 -NtUserAssociateInputContext 3 -NtUserAttachThreadInput 3 -NtUserBeginPaint 2 -NtUserBitBltSysBmp 8 -NtUserBlockInput 1 -NtUserBuildHimcList 4 -NtUserBuildHwndList 7 -NtUserBuildNameList 4 -NtUserBuildPropList 4 -NtUserCallHwnd 2 -NtUserCallHwndLock 2 -NtUserCallHwndOpt 2 -NtUserCallHwndParam 3 -NtUserCallHwndParamLock 3 -NtUserCallMsgFilter 2 -NtUserCallNextHookEx 4 -NtUserCallNoParam 1 -NtUserCallOneParam 2 -NtUserCallTwoParam 3 -NtUserChangeClipboardChain 2 -NtUserChangeDisplaySettings 5 -NtUserCheckImeHotKey 2 -NtUserCheckMenuItem 3 -NtUserChildWindowFromPointEx 4 -NtUserClipCursor 1 -NtUserCloseClipboard 0 -NtUserCloseDesktop 1 -NtUserCloseWindowStation 1 -NtUserConsoleControl 3 -NtUserConvertMemHandle 2 -NtUserCopyAcceleratorTable 3 -NtUserCountClipboardFormats 0 -NtUserCreateAcceleratorTable 2 -NtUserCreateCaret 4 -NtUserCreateDesktop 5 -NtUserCreateInputContext 1 -NtUserCreateLocalMemHandle 4 -NtUserCreateWindowEx 15 -NtUserCreateWindowStation 7 -NtUserDdeGetQualityOfService 3 -NtUserDdeInitialize 5 -NtUserDdeSetQualityOfService 3 -NtUserDeferWindowPos 8 -NtUserDefSetText 2 -NtUserDeleteMenu 3 -NtUserDestroyAcceleratorTable 1 -NtUserDestroyCursor 2 -NtUserDestroyInputContext 1 -NtUserDestroyMenu 1 -NtUserDestroyWindow 1 -NtUserDisableThreadIme 1 -NtUserDispatchMessage 1 -NtUserDragDetect 3 -NtUserDragObject 5 -NtUserDrawAnimatedRects 4 -NtUserDrawCaption 4 -NtUserDrawCaptionTemp 7 -NtUserDrawIconEx 11 -NtUserDrawMenuBarTemp 5 -NtUserEmptyClipboard 0 -NtUserEnableMenuItem 3 -NtUserEnableScrollBar 3 -NtUserEndDeferWindowPosEx 2 -NtUserEndMenu 0 -NtUserEndPaint 2 -NtUserEnumDisplayDevices 4 -NtUserEnumDisplayMonitors 4 -NtUserEnumDisplaySettings 4 -NtUserEvent 1 -NtUserExcludeUpdateRgn 2 -NtUserFillWindow 4 -NtUserFindExistingCursorIcon 3 -NtUserFindWindowEx 5 -NtUserFlashWindowEx 1 -NtUserGetAltTabInfo 6 -NtUserGetAncestor 2 -NtUserGetAppImeLevel 1 -NtUserGetAsyncKeyState 1 -NtUserGetAtomName 2 -NtUserGetCaretBlinkTime 0 -NtUserGetCaretPos 1 -NtUserGetClassInfo 5 -NtUserGetClassName 3 -NtUserGetClipboardData 2 -NtUserGetClipboardFormatName 3 -NtUserGetClipboardOwner 0 -NtUserGetClipboardSequenceNumber 0 -NtUserGetClipboardViewer 0 -NtUserGetClipCursor 1 -NtUserGetComboBoxInfo 2 -NtUserGetControlBrush 3 -NtUserGetControlColor 4 -NtUserGetCPD 3 -NtUserGetCursorFrameInfo 4 -NtUserGetCursorInfo 1 -NtUserGetDC 1 -NtUserGetDCEx 3 -NtUserGetDoubleClickTime 0 -NtUserGetForegroundWindow 0 -NtUserGetGuiResources 2 -NtUserGetGUIThreadInfo 2 -NtUserGetIconInfo 6 -NtUserGetIconSize 4 -NtUserGetImeHotKey 4 -NtUserGetImeInfoEx 2 -NtUserGetInternalWindowPos 3 -NtUserGetKeyboardLayoutList 2 -NtUserGetKeyboardLayoutName 1 -NtUserGetKeyboardState 1 -NtUserGetKeyNameText 3 -NtUserGetKeyState 1 -NtUserGetListBoxInfo 1 -NtUserGetMenuBarInfo 4 -NtUserGetMenuIndex 2 -NtUserGetMenuItemRect 4 -NtUserGetMessage 4 -NtUserGetMouseMovePointsEx 5 -NtUserGetObjectInformation 5 -NtUserGetOpenClipboardWindow 0 -NtUserGetPriorityClipboardFormat 2 -NtUserGetProcessWindowStation 0 -NtUserGetRawInputBuffer 3 -NtUserGetRawInputData 5 -NtUserGetRawInputDeviceInfo 4 -NtUserGetRawInputDeviceList 3 -NtUserGetRegisteredRawInputDevices 3 -NtUserGetScrollBarInfo 3 -NtUserGetSystemMenu 2 -NtUserGetThreadDesktop 2 -NtUserGetThreadState 1 -NtUserGetTitleBarInfo 2 -NtUserGetUpdateRect 3 -NtUserGetUpdateRgn 3 -NtUserGetWindowDC 1 -NtUserGetWindowPlacement 2 -NtUserGetWOWClass 2 -NtUserHardErrorControl 3 -NtUserHideCaret 1 -NtUserHiliteMenuItem 4 -NtUserImpersonateDdeClientWindow 2 -NtUserInitialize 3 -NtUserInitializeClientPfnArrays 4 -NtUserInitTask 12 -NtUserInternalGetWindowText 3 -NtUserInvalidateRect 3 -NtUserInvalidateRgn 3 -NtUserIsClipboardFormatAvailable 1 -NtUserKillTimer 2 -NtUserLoadKeyboardLayoutEx 7 -NtUserLockWindowStation 1 -NtUserLockWindowUpdate 1 -NtUserLockWorkStation 0 -NtUserMapVirtualKeyEx 4 -NtUserMenuItemFromPoint 4 -NtUserMessageCall 7 -NtUserMinMaximize 3 -NtUserMNDragLeave 0 -NtUserMNDragOver 2 -NtUserModifyUserStartupInfoFlags 2 -NtUserMoveWindow 6 -NtUserNotifyIMEStatus 3 -NtUserNotifyProcessCreate 4 -NtUserNotifyWinEvent 4 -NtUserOpenClipboard 2 -NtUserOpenDesktop 3 -NtUserOpenInputDesktop 3 -NtUserOpenWindowStation 2 -NtUserPaintDesktop 1 -NtUserPeekMessage 5 -NtUserPostMessage 4 -NtUserPostThreadMessage 4 -NtUserPrintWindow 3 -NtUserProcessConnect 3 -NtUserQueryInformationThread 5 -NtUserQueryInputContext 2 -NtUserQuerySendMessage 1 -NtUserQueryUserCounters 5 -NtUserQueryWindow 2 -NtUserRealChildWindowFromPoint 3 -NtUserRealInternalGetMessage 6 -NtUserRealWaitMessageEx 2 -NtUserRedrawWindow 4 -NtUserRegisterClassExWOW 7 -NtUserRegisterUserApiHook 2 -NtUserRegisterHotKey 4 -NtUserRegisterRawInputDevices 3 -NtUserRegisterTasklist 1 -NtUserRegisterWindowMessage 1 -NtUserRemoveMenu 3 -NtUserRemoveProp 2 -NtUserResolveDesktop 4 -NtUserResolveDesktopForWOW 1 -NtUserSBGetParms 4 -NtUserScrollDC 7 -NtUserScrollWindowEx 8 -NtUserSelectPalette 3 -NtUserSendInput 3 -NtUserSetActiveWindow 1 -NtUserSetAppImeLevel 2 -NtUserSetCapture 1 -NtUserSetClassLong 4 -NtUserSetClassWord 3 -NtUserSetClipboardData 3 -NtUserSetClipboardViewer 1 -NtUserSetConsoleReserveKeys 2 -NtUserSetCursor 1 -NtUserSetCursorContents 2 -NtUserSetCursorIconData 4 -NtUserSetDbgTag 2 -NtUserSetFocus 1 -NtUserSetImeHotKey 5 -NtUserSetImeInfoEx 1 -NtUserSetImeOwnerWindow 2 -NtUserSetInformationProcess 4 -NtUserSetInformationThread 4 -NtUserSetInternalWindowPos 4 -NtUserSetKeyboardState 1 -NtUserSetLogonNotifyWindow 1 -NtUserSetMenu 3 -NtUserSetMenuContextHelpId 2 -NtUserSetMenuDefaultItem 3 -NtUserSetMenuFlagRtoL 1 -NtUserSetObjectInformation 4 -NtUserSetParent 2 -NtUserSetProcessWindowStation 1 -NtUserSetProp 3 -NtUserSetRipFlags 2 -NtUserSetScrollInfo 4 -NtUserSetShellWindowEx 2 -NtUserSetSysColors 4 -NtUserSetSystemCursor 2 -NtUserSetSystemMenu 2 -NtUserSetSystemTimer 4 -NtUserSetThreadDesktop 1 -NtUserSetThreadLayoutHandles 2 -NtUserSetThreadState 2 -NtUserSetTimer 4 -NtUserSetWindowFNID 2 -NtUserSetWindowLong 4 -NtUserSetWindowPlacement 2 -NtUserSetWindowPos 7 -NtUserSetWindowRgn 3 -NtUserSetWindowsHookAW 3 -NtUserSetWindowsHookEx 6 -NtUserSetWindowStationUser 4 -NtUserSetWindowWord 3 -NtUserSetWinEventHook 8 -NtUserShowCaret 1 -NtUserShowScrollBar 3 -NtUserShowWindow 2 -NtUserShowWindowAsync 2 -NtUserSoundSentry 0 -NtUserSwitchDesktop 1 -NtUserSystemParametersInfo 4 -NtUserTestForInteractiveUser 1 -NtUserThunkedMenuInfo 2 -NtUserThunkedMenuItemInfo 6 -NtUserToUnicodeEx 7 -NtUserTrackMouseEvent 1 -NtUserTrackPopupMenuEx 6 -NtUserCalcMenuBar 5 -NtUserPaintMenuBar 6 -NtUserTranslateAccelerator 3 -NtUserTranslateMessage 2 -NtUserUnhookWindowsHookEx 1 -NtUserUnhookWinEvent 1 -NtUserUnloadKeyboardLayout 1 -NtUserUnlockWindowStation 1 -NtUserUnregisterClass 3 -NtUserUnregisterUserApiHook 0 -NtUserUnregisterHotKey 2 -NtUserUpdateInputContext 3 -NtUserUpdateInstance 3 -NtUserUpdateLayeredWindow 9 -NtUserGetLayeredWindowAttributes 4 -NtUserSetLayeredWindowAttributes 4 -NtUserUpdatePerUserSystemParameters 2 -NtUserUserHandleGrantAccess 3 -NtUserValidateHandleSecure 1 -NtUserValidateRect 2 -NtUserValidateTimerCallback 3 -NtUserVkKeyScanEx 3 -NtUserWaitForInputIdle 3 -NtUserWaitForMsgAndEvent 1 -NtUserWaitMessage 0 -NtUserWin32PoolAllocationStats 6 -NtUserWindowFromPoint 2 -NtUserYieldTask 0 -NtUserRemoteConnect 3 -NtUserRemoteRedrawRectangle 4 -NtUserRemoteRedrawScreen 0 -NtUserRemoteStopScreenUpdates 0 -NtUserCtxDisplayIOCtl 3 -NtGdiEngAssociateSurface 3 -NtGdiEngCreateBitmap 6 -NtGdiEngCreateDeviceSurface 4 -NtGdiEngCreateDeviceBitmap 4 -NtGdiEngCreatePalette 6 -NtGdiEngComputeGlyphSet 3 -NtGdiEngCopyBits 6 -NtGdiEngDeletePalette 1 -NtGdiEngDeleteSurface 1 -NtGdiEngEraseSurface 3 -NtGdiEngUnlockSurface 1 -NtGdiEngLockSurface 1 -NtGdiEngBitBlt 11 -NtGdiEngStretchBlt 11 -NtGdiEngPlgBlt 11 -NtGdiEngMarkBandingSurface 1 -NtGdiEngStrokePath 8 -NtGdiEngFillPath 7 -NtGdiEngStrokeAndFillPath 10 -NtGdiEngPaint 5 -NtGdiEngLineTo 9 -NtGdiEngAlphaBlend 7 -NtGdiEngGradientFill 10 -NtGdiEngTransparentBlt 8 -NtGdiEngTextOut 10 -NtGdiEngStretchBltROP 13 -NtGdiXLATEOBJ_cGetPalette 4 -NtGdiXLATEOBJ_iXlate 2 -NtGdiXLATEOBJ_hGetColorTransform 1 -NtGdiCLIPOBJ_bEnum 3 -NtGdiCLIPOBJ_cEnumStart 5 -NtGdiCLIPOBJ_ppoGetPath 1 -NtGdiEngDeletePath 1 -NtGdiEngCreateClip 0 -NtGdiEngDeleteClip 1 -NtGdiBRUSHOBJ_ulGetBrushColor 1 -NtGdiBRUSHOBJ_pvAllocRbrush 2 -NtGdiBRUSHOBJ_pvGetRbrush 1 -NtGdiBRUSHOBJ_hGetColorTransform 1 -NtGdiXFORMOBJ_bApplyXform 5 -NtGdiXFORMOBJ_iGetXform 2 -NtGdiFONTOBJ_vGetInfo 3 -NtGdiFONTOBJ_pxoGetXform 1 -NtGdiFONTOBJ_cGetGlyphs 5 -NtGdiFONTOBJ_pifi 1 -NtGdiFONTOBJ_pfdg 1 -NtGdiFONTOBJ_pQueryGlyphAttrs 2 -NtGdiFONTOBJ_pvTrueTypeFontFile 2 -NtGdiFONTOBJ_cGetAllGlyphHandles 2 -NtGdiSTROBJ_bEnum 3 -NtGdiSTROBJ_bEnumPositionsOnly 3 -NtGdiSTROBJ_bGetAdvanceWidths 4 -NtGdiSTROBJ_vEnumStart 1 -NtGdiSTROBJ_dwGetCodePage 1 -NtGdiPATHOBJ_vGetBounds 2 -NtGdiPATHOBJ_bEnum 2 -NtGdiPATHOBJ_vEnumStart 1 -NtGdiPATHOBJ_vEnumStartClipLines 4 -NtGdiPATHOBJ_bEnumClipLines 3 -NtGdiGetDhpdev 1 -NtGdiEngCheckAbort 1 -NtGdiHT_Get8BPPFormatPalette 4 -NtGdiHT_Get8BPPMaskPalette 6 -NtGdiUpdateTransform 1 -NtGdiSetPUMPDOBJ 4 -NtGdiBRUSHOBJ_DeleteRbrush 2 -NtGdiUMPDEngFreeUserMem 1 -NtGdiDrawStream 3 diff --git a/rostests/apitests/w32kdll/w32kdll_xpsp2/w32kdll_xpsp2.S b/rostests/apitests/w32kdll/w32kdll_xpsp2/w32kdll_xpsp2.S deleted file mode 100644 index 8657456a0d8..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_xpsp2/w32kdll_xpsp2.S +++ /dev/null @@ -1,4675 +0,0 @@ -/* FILE: System Call Stubs for Windows XP SP2 Build 2600 32Bit Native API - * COPYRIGHT: See COPYING in the top level directory - */ - -#define KUSER_SHARED_SYSCALL 0x7FFE0300 - -.global _NtGdiAbortDoc@4 -_NtGdiAbortDoc@4: - movl $0x1000, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiAbortPath@4 -_NtGdiAbortPath@4: - movl $0x1001, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiAddFontResourceW@24 -_NtGdiAddFontResourceW@24: - movl $0x1002, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiAddRemoteFontToDC@16 -_NtGdiAddRemoteFontToDC@16: - movl $0x1003, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiAddFontMemResourceEx@20 -_NtGdiAddFontMemResourceEx@20: - movl $0x1004, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiRemoveMergeFont@8 -_NtGdiRemoveMergeFont@8: - movl $0x1005, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiAddRemoteMMInstanceToDC@12 -_NtGdiAddRemoteMMInstanceToDC@12: - movl $0x1006, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiAlphaBlend@48 -_NtGdiAlphaBlend@48: - movl $0x1007, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x30 - -.global _NtGdiAngleArc@24 -_NtGdiAngleArc@24: - movl $0x1008, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiAnyLinkedFonts@0 -_NtGdiAnyLinkedFonts@0: - movl $0x1009, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtGdiFontIsLinked@4 -_NtGdiFontIsLinked@4: - movl $0x100a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiArcInternal@40 -_NtGdiArcInternal@40: - movl $0x100b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x28 - -.global _NtGdiBeginPath@4 -_NtGdiBeginPath@4: - movl $0x100c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiBitBlt@44 -_NtGdiBitBlt@44: - movl $0x100d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiCancelDC@4 -_NtGdiCancelDC@4: - movl $0x100e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiCheckBitmapBits@32 -_NtGdiCheckBitmapBits@32: - movl $0x100f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiCloseFigure@4 -_NtGdiCloseFigure@4: - movl $0x1010, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiClearBitmapAttributes@8 -_NtGdiClearBitmapAttributes@8: - movl $0x1011, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiClearBrushAttributes@8 -_NtGdiClearBrushAttributes@8: - movl $0x1012, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiColorCorrectPalette@24 -_NtGdiColorCorrectPalette@24: - movl $0x1013, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiCombineRgn@16 -_NtGdiCombineRgn@16: - movl $0x1014, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiCombineTransform@12 -_NtGdiCombineTransform@12: - movl $0x1015, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiComputeXformCoefficients@4 -_NtGdiComputeXformCoefficients@4: - movl $0x1016, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiConsoleTextOut@16 -_NtGdiConsoleTextOut@16: - movl $0x1017, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiConvertMetafileRect@8 -_NtGdiConvertMetafileRect@8: - movl $0x1018, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiCreateBitmap@20 -_NtGdiCreateBitmap@20: - movl $0x1019, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiCreateClientObj@4 -_NtGdiCreateClientObj@4: - movl $0x101a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiCreateColorSpace@4 -_NtGdiCreateColorSpace@4: - movl $0x101b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiCreateColorTransform@32 -_NtGdiCreateColorTransform@32: - movl $0x101c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiCreateCompatibleBitmap@12 -_NtGdiCreateCompatibleBitmap@12: - movl $0x101d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiCreateCompatibleDC@4 -_NtGdiCreateCompatibleDC@4: - movl $0x101e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiCreateDIBBrush@24 -_NtGdiCreateDIBBrush@24: - movl $0x101f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiCreateDIBitmapInternal@44 -_NtGdiCreateDIBitmapInternal@44: - movl $0x1020, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiCreateDIBSection@36 -_NtGdiCreateDIBSection@36: - movl $0x1021, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x24 - -.global _NtGdiCreateEllipticRgn@16 -_NtGdiCreateEllipticRgn@16: - movl $0x1022, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiCreateHalftonePalette@4 -_NtGdiCreateHalftonePalette@4: - movl $0x1023, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiCreateHatchBrushInternal@12 -_NtGdiCreateHatchBrushInternal@12: - movl $0x1024, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiCreateMetafileDC@4 -_NtGdiCreateMetafileDC@4: - movl $0x1025, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiCreatePaletteInternal@8 -_NtGdiCreatePaletteInternal@8: - movl $0x1026, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiCreatePatternBrushInternal@12 -_NtGdiCreatePatternBrushInternal@12: - movl $0x1027, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiCreatePen@16 -_NtGdiCreatePen@16: - movl $0x1028, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiCreateRectRgn@16 -_NtGdiCreateRectRgn@16: - movl $0x1029, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiCreateRoundRectRgn@24 -_NtGdiCreateRoundRectRgn@24: - movl $0x102a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiCreateServerMetaFile@24 -_NtGdiCreateServerMetaFile@24: - movl $0x102b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiCreateSolidBrush@8 -_NtGdiCreateSolidBrush@8: - movl $0x102c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiD3dContextCreate@16 -_NtGdiD3dContextCreate@16: - movl $0x102d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiD3dContextDestroy@4 -_NtGdiD3dContextDestroy@4: - movl $0x102e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiD3dContextDestroyAll@4 -_NtGdiD3dContextDestroyAll@4: - movl $0x102f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiD3dValidateTextureStageState@4 -_NtGdiD3dValidateTextureStageState@4: - movl $0x1030, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiD3dDrawPrimitives2@28 -_NtGdiD3dDrawPrimitives2@28: - movl $0x1031, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiDdGetDriverState@4 -_NtGdiDdGetDriverState@4: - movl $0x1032, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdAddAttachedSurface@12 -_NtGdiDdAddAttachedSurface@12: - movl $0x1033, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdAlphaBlt@12 -_NtGdiDdAlphaBlt@12: - movl $0x1034, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdAttachSurface@8 -_NtGdiDdAttachSurface@8: - movl $0x1035, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdBeginMoCompFrame@8 -_NtGdiDdBeginMoCompFrame@8: - movl $0x1036, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdBlt@12 -_NtGdiDdBlt@12: - movl $0x1037, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdCanCreateSurface@8 -_NtGdiDdCanCreateSurface@8: - movl $0x1038, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdCanCreateD3DBuffer@8 -_NtGdiDdCanCreateD3DBuffer@8: - movl $0x1039, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdColorControl@8 -_NtGdiDdColorControl@8: - movl $0x103a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdCreateDirectDrawObject@4 -_NtGdiDdCreateDirectDrawObject@4: - movl $0x103b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdCreateSurface@32 -_NtGdiDdCreateSurface@32: - movl $0x103c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiDdCreateD3DBuffer@32 -_NtGdiDdCreateD3DBuffer@32: - movl $0x103d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiDdCreateMoComp@8 -_NtGdiDdCreateMoComp@8: - movl $0x103e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdCreateSurfaceObject@24 -_NtGdiDdCreateSurfaceObject@24: - movl $0x103f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiDdDeleteDirectDrawObject@4 -_NtGdiDdDeleteDirectDrawObject@4: - movl $0x1040, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDeleteSurfaceObject@4 -_NtGdiDdDeleteSurfaceObject@4: - movl $0x1041, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdDestroyMoComp@8 -_NtGdiDdDestroyMoComp@8: - movl $0x1042, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdDestroySurface@8 -_NtGdiDdDestroySurface@8: - movl $0x1043, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdDestroyD3DBuffer@4 -_NtGdiDdDestroyD3DBuffer@4: - movl $0x1044, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdEndMoCompFrame@8 -_NtGdiDdEndMoCompFrame@8: - movl $0x1045, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdFlip@20 -_NtGdiDdFlip@20: - movl $0x1046, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiDdFlipToGDISurface@8 -_NtGdiDdFlipToGDISurface@8: - movl $0x1047, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetAvailDriverMemory@8 -_NtGdiDdGetAvailDriverMemory@8: - movl $0x1048, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetBltStatus@8 -_NtGdiDdGetBltStatus@8: - movl $0x1049, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetDC@8 -_NtGdiDdGetDC@8: - movl $0x104a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetDriverInfo@8 -_NtGdiDdGetDriverInfo@8: - movl $0x104b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetDxHandle@12 -_NtGdiDdGetDxHandle@12: - movl $0x104c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdGetFlipStatus@8 -_NtGdiDdGetFlipStatus@8: - movl $0x104d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetInternalMoCompInfo@8 -_NtGdiDdGetInternalMoCompInfo@8: - movl $0x104e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetMoCompBuffInfo@8 -_NtGdiDdGetMoCompBuffInfo@8: - movl $0x104f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetMoCompGuids@8 -_NtGdiDdGetMoCompGuids@8: - movl $0x1050, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetMoCompFormats@8 -_NtGdiDdGetMoCompFormats@8: - movl $0x1051, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdGetScanLine@8 -_NtGdiDdGetScanLine@8: - movl $0x1052, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdLock@12 -_NtGdiDdLock@12: - movl $0x1053, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdLockD3D@8 -_NtGdiDdLockD3D@8: - movl $0x1054, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdQueryDirectDrawObject@44 -_NtGdiDdQueryDirectDrawObject@44: - movl $0x1055, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiDdQueryMoCompStatus@8 -_NtGdiDdQueryMoCompStatus@8: - movl $0x1056, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdReenableDirectDrawObject@8 -_NtGdiDdReenableDirectDrawObject@8: - movl $0x1057, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdReleaseDC@4 -_NtGdiDdReleaseDC@4: - movl $0x1058, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDdRenderMoComp@8 -_NtGdiDdRenderMoComp@8: - movl $0x1059, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdResetVisrgn@8 -_NtGdiDdResetVisrgn@8: - movl $0x105a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdSetColorKey@8 -_NtGdiDdSetColorKey@8: - movl $0x105b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdSetExclusiveMode@8 -_NtGdiDdSetExclusiveMode@8: - movl $0x105c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdSetGammaRamp@12 -_NtGdiDdSetGammaRamp@12: - movl $0x105d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdCreateSurfaceEx@12 -_NtGdiDdCreateSurfaceEx@12: - movl $0x105e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdSetOverlayPosition@12 -_NtGdiDdSetOverlayPosition@12: - movl $0x105f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdUnattachSurface@8 -_NtGdiDdUnattachSurface@8: - movl $0x1060, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdUnlock@8 -_NtGdiDdUnlock@8: - movl $0x1061, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdUnlockD3D@8 -_NtGdiDdUnlockD3D@8: - movl $0x1062, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDdUpdateOverlay@12 -_NtGdiDdUpdateOverlay@12: - movl $0x1063, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDdWaitForVerticalBlank@8 -_NtGdiDdWaitForVerticalBlank@8: - movl $0x1064, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpCanCreateVideoPort@8 -_NtGdiDvpCanCreateVideoPort@8: - movl $0x1065, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpColorControl@8 -_NtGdiDvpColorControl@8: - movl $0x1066, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpCreateVideoPort@8 -_NtGdiDvpCreateVideoPort@8: - movl $0x1067, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpDestroyVideoPort@8 -_NtGdiDvpDestroyVideoPort@8: - movl $0x1068, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpFlipVideoPort@16 -_NtGdiDvpFlipVideoPort@16: - movl $0x1069, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiDvpGetVideoPortBandwidth@8 -_NtGdiDvpGetVideoPortBandwidth@8: - movl $0x106a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpGetVideoPortField@8 -_NtGdiDvpGetVideoPortField@8: - movl $0x106b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpGetVideoPortFlipStatus@8 -_NtGdiDvpGetVideoPortFlipStatus@8: - movl $0x106c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpGetVideoPortInputFormats@8 -_NtGdiDvpGetVideoPortInputFormats@8: - movl $0x106d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpGetVideoPortLine@8 -_NtGdiDvpGetVideoPortLine@8: - movl $0x106e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpGetVideoPortOutputFormats@8 -_NtGdiDvpGetVideoPortOutputFormats@8: - movl $0x106f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpGetVideoPortConnectInfo@8 -_NtGdiDvpGetVideoPortConnectInfo@8: - movl $0x1070, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpGetVideoSignalStatus@8 -_NtGdiDvpGetVideoSignalStatus@8: - movl $0x1071, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpUpdateVideoPort@16 -_NtGdiDvpUpdateVideoPort@16: - movl $0x1072, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiDvpWaitForVideoPortSync@8 -_NtGdiDvpWaitForVideoPortSync@8: - movl $0x1073, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDvpAcquireNotification@12 -_NtGdiDvpAcquireNotification@12: - movl $0x1074, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiDvpReleaseNotification@8 -_NtGdiDvpReleaseNotification@8: - movl $0x1075, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDxgGenericThunk@24 -_NtGdiDxgGenericThunk@24: - movl $0x1076, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiDeleteClientObj@4 -_NtGdiDeleteClientObj@4: - movl $0x1077, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDeleteColorSpace@4 -_NtGdiDeleteColorSpace@4: - movl $0x1078, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDeleteColorTransform@8 -_NtGdiDeleteColorTransform@8: - movl $0x1079, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDeleteObjectApp@4 -_NtGdiDeleteObjectApp@4: - movl $0x107a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDescribePixelFormat@16 -_NtGdiDescribePixelFormat@16: - movl $0x107b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiGetPerBandInfo@8 -_NtGdiGetPerBandInfo@8: - movl $0x107c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiDoBanding@16 -_NtGdiDoBanding@16: - movl $0x107d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiDoPalette@24 -_NtGdiDoPalette@24: - movl $0x107e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiDrawEscape@16 -_NtGdiDrawEscape@16: - movl $0x107f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiEllipse@20 -_NtGdiEllipse@20: - movl $0x1080, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiEnableEUDC@4 -_NtGdiEnableEUDC@4: - movl $0x1081, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEndDoc@4 -_NtGdiEndDoc@4: - movl $0x1082, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEndPage@4 -_NtGdiEndPage@4: - movl $0x1083, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEndPath@4 -_NtGdiEndPath@4: - movl $0x1084, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEnumFontChunk@20 -_NtGdiEnumFontChunk@20: - movl $0x1085, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiEnumFontClose@4 -_NtGdiEnumFontClose@4: - movl $0x1086, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEnumFontOpen@28 -_NtGdiEnumFontOpen@28: - movl $0x1087, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiEnumObjects@16 -_NtGdiEnumObjects@16: - movl $0x1088, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiEqualRgn@8 -_NtGdiEqualRgn@8: - movl $0x1089, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiEudcLoadUnloadLink@28 -_NtGdiEudcLoadUnloadLink@28: - movl $0x108a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiExcludeClipRect@20 -_NtGdiExcludeClipRect@20: - movl $0x108b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiExtCreatePen@44 -_NtGdiExtCreatePen@44: - movl $0x108c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiExtCreateRegion@12 -_NtGdiExtCreateRegion@12: - movl $0x108d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiExtEscape@32 -_NtGdiExtEscape@32: - movl $0x108e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiExtFloodFill@20 -_NtGdiExtFloodFill@20: - movl $0x108f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiExtGetObjectW@12 -_NtGdiExtGetObjectW@12: - movl $0x1090, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiExtSelectClipRgn@12 -_NtGdiExtSelectClipRgn@12: - movl $0x1091, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiExtTextOutW@36 -_NtGdiExtTextOutW@36: - movl $0x1092, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x24 - -.global _NtGdiFillPath@4 -_NtGdiFillPath@4: - movl $0x1093, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiFillRgn@12 -_NtGdiFillRgn@12: - movl $0x1094, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiFlattenPath@4 -_NtGdiFlattenPath@4: - movl $0x1095, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiFlushUserBatch@0 -_NtGdiFlushUserBatch@0: - movl $0x1096, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtGdiFlush@0 -_NtGdiFlush@0: - movl $0x1097, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtGdiForceUFIMapping@8 -_NtGdiForceUFIMapping@8: - movl $0x1098, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiFrameRgn@20 -_NtGdiFrameRgn@20: - movl $0x1099, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiFullscreenControl@20 -_NtGdiFullscreenControl@20: - movl $0x109a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiGetAndSetDCDword@16 -_NtGdiGetAndSetDCDword@16: - movl $0x109b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiGetAppClipBox@8 -_NtGdiGetAppClipBox@8: - movl $0x109c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetBitmapBits@12 -_NtGdiGetBitmapBits@12: - movl $0x109d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetBitmapDimension@8 -_NtGdiGetBitmapDimension@8: - movl $0x109e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetBoundsRect@12 -_NtGdiGetBoundsRect@12: - movl $0x109f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetCharABCWidthsW@24 -_NtGdiGetCharABCWidthsW@24: - movl $0x10a0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiGetCharacterPlacementW@24 -_NtGdiGetCharacterPlacementW@24: - movl $0x10a1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiGetCharSet@4 -_NtGdiGetCharSet@4: - movl $0x10a2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiGetCharWidthW@24 -_NtGdiGetCharWidthW@24: - movl $0x10a3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiGetCharWidthInfo@8 -_NtGdiGetCharWidthInfo@8: - movl $0x10a4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetColorAdjustment@8 -_NtGdiGetColorAdjustment@8: - movl $0x10a5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetColorSpaceforBitmap@4 -_NtGdiGetColorSpaceforBitmap@4: - movl $0x10a6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiGetDCDword@12 -_NtGdiGetDCDword@12: - movl $0x10a7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetDCforBitmap@4 -_NtGdiGetDCforBitmap@4: - movl $0x10a8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiGetDCObject@8 -_NtGdiGetDCObject@8: - movl $0x10a9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetDCPoint@12 -_NtGdiGetDCPoint@12: - movl $0x10aa, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetDeviceCaps@8 -_NtGdiGetDeviceCaps@8: - movl $0x10ab, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetDeviceGammaRamp@8 -_NtGdiGetDeviceGammaRamp@8: - movl $0x10ac, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetDeviceCapsAll@8 -_NtGdiGetDeviceCapsAll@8: - movl $0x10ad, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetDIBitsInternal@36 -_NtGdiGetDIBitsInternal@36: - movl $0x10ae, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x24 - -.global _NtGdiGetETM@8 -_NtGdiGetETM@8: - movl $0x10af, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetEudcTimeStampEx@12 -_NtGdiGetEudcTimeStampEx@12: - movl $0x10b0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetFontData@20 -_NtGdiGetFontData@20: - movl $0x10b1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiGetFontResourceInfoInternalW@28 -_NtGdiGetFontResourceInfoInternalW@28: - movl $0x10b2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiGetGlyphIndicesW@20 -_NtGdiGetGlyphIndicesW@20: - movl $0x10b3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiGetGlyphIndicesWInternal@24 -_NtGdiGetGlyphIndicesWInternal@24: - movl $0x10b4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiGetGlyphOutline@32 -_NtGdiGetGlyphOutline@32: - movl $0x10b5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiGetKerningPairs@12 -_NtGdiGetKerningPairs@12: - movl $0x10b6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetLinkedUFIs@12 -_NtGdiGetLinkedUFIs@12: - movl $0x10b7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetMiterLimit@8 -_NtGdiGetMiterLimit@8: - movl $0x10b8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetMonitorID@12 -_NtGdiGetMonitorID@12: - movl $0x10b9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetNearestColor@8 -_NtGdiGetNearestColor@8: - movl $0x10ba, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetNearestPaletteIndex@8 -_NtGdiGetNearestPaletteIndex@8: - movl $0x10bb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetObjectBitmapHandle@8 -_NtGdiGetObjectBitmapHandle@8: - movl $0x10bc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetOutlineTextMetricsInternalW@16 -_NtGdiGetOutlineTextMetricsInternalW@16: - movl $0x10bd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiGetPath@16 -_NtGdiGetPath@16: - movl $0x10be, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiGetPixel@12 -_NtGdiGetPixel@12: - movl $0x10bf, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetRandomRgn@12 -_NtGdiGetRandomRgn@12: - movl $0x10c0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetRasterizerCaps@8 -_NtGdiGetRasterizerCaps@8: - movl $0x10c1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetRealizationInfo@12 -_NtGdiGetRealizationInfo@12: - movl $0x10c2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetRegionData@12 -_NtGdiGetRegionData@12: - movl $0x10c3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetRgnBox@8 -_NtGdiGetRgnBox@8: - movl $0x10c4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetServerMetaFileBits@28 -_NtGdiGetServerMetaFileBits@28: - movl $0x10c5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiGetSpoolMessage@16 -_NtGdiGetSpoolMessage@16: - movl $0x10c6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiGetStats@20 -_NtGdiGetStats@20: - movl $0x10c7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiGetStockObject@4 -_NtGdiGetStockObject@4: - movl $0x10c8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiGetStringBitmapW@20 -_NtGdiGetStringBitmapW@20: - movl $0x10c9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiGetSystemPaletteUse@4 -_NtGdiGetSystemPaletteUse@4: - movl $0x10ca, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiGetTextCharsetInfo@12 -_NtGdiGetTextCharsetInfo@12: - movl $0x10cb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetTextExtent@20 -_NtGdiGetTextExtent@20: - movl $0x10cc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiGetTextExtentExW@32 -_NtGdiGetTextExtentExW@32: - movl $0x10cd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiGetTextFaceW@16 -_NtGdiGetTextFaceW@16: - movl $0x10ce, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiGetTextMetricsW@12 -_NtGdiGetTextMetricsW@12: - movl $0x10cf, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetTransform@12 -_NtGdiGetTransform@12: - movl $0x10d0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetUFI@24 -_NtGdiGetUFI@24: - movl $0x10d1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiGetEmbUFI@28 -_NtGdiGetEmbUFI@28: - movl $0x10d2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiGetUFIPathname@40 -_NtGdiGetUFIPathname@40: - movl $0x10d3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x28 - -.global _NtGdiGetEmbedFonts@0 -_NtGdiGetEmbedFonts@0: - movl $0x10d4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtGdiChangeGhostFont@8 -_NtGdiChangeGhostFont@8: - movl $0x10d5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiAddEmbFontToDC@8 -_NtGdiAddEmbFontToDC@8: - movl $0x10d6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetFontUnicodeRanges@8 -_NtGdiGetFontUnicodeRanges@8: - movl $0x10d7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiGetWidthTable@28 -_NtGdiGetWidthTable@28: - movl $0x10d8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiGradientFill@24 -_NtGdiGradientFill@24: - movl $0x10d9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiHfontCreate@20 -_NtGdiHfontCreate@20: - movl $0x10da, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiIcmBrushInfo@32 -_NtGdiIcmBrushInfo@32: - movl $0x10db, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiInit@0 -_NtGdiInit@0: - movl $0x10dc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtGdiInitSpool@0 -_NtGdiInitSpool@0: - movl $0x10dd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtGdiIntersectClipRect@20 -_NtGdiIntersectClipRect@20: - movl $0x10de, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiInvertRgn@8 -_NtGdiInvertRgn@8: - movl $0x10df, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiLineTo@12 -_NtGdiLineTo@12: - movl $0x10e0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiMakeFontDir@20 -_NtGdiMakeFontDir@20: - movl $0x10e1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiMakeInfoDC@8 -_NtGdiMakeInfoDC@8: - movl $0x10e2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiMaskBlt@52 -_NtGdiMaskBlt@52: - movl $0x10e3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x34 - -.global _NtGdiModifyWorldTransform@12 -_NtGdiModifyWorldTransform@12: - movl $0x10e4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiMonoBitmap@4 -_NtGdiMonoBitmap@4: - movl $0x10e5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiMoveTo@16 -_NtGdiMoveTo@16: - movl $0x10e6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiOffsetClipRgn@12 -_NtGdiOffsetClipRgn@12: - movl $0x10e7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiOffsetRgn@12 -_NtGdiOffsetRgn@12: - movl $0x10e8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiOpenDCW@28 -_NtGdiOpenDCW@28: - movl $0x10e9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiPatBlt@24 -_NtGdiPatBlt@24: - movl $0x10ea, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiPolyPatBlt@20 -_NtGdiPolyPatBlt@20: - movl $0x10eb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiPathToRegion@4 -_NtGdiPathToRegion@4: - movl $0x10ec, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiPlgBlt@44 -_NtGdiPlgBlt@44: - movl $0x10ed, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiPolyDraw@16 -_NtGdiPolyDraw@16: - movl $0x10ee, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiPolyPolyDraw@20 -_NtGdiPolyPolyDraw@20: - movl $0x10ef, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiPolyTextOutW@16 -_NtGdiPolyTextOutW@16: - movl $0x10f0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiPtInRegion@12 -_NtGdiPtInRegion@12: - movl $0x10f1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiPtVisible@12 -_NtGdiPtVisible@12: - movl $0x10f2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiQueryFonts@12 -_NtGdiQueryFonts@12: - movl $0x10f3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiQueryFontAssocInfo@4 -_NtGdiQueryFontAssocInfo@4: - movl $0x10f4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiRectangle@20 -_NtGdiRectangle@20: - movl $0x10f5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiRectInRegion@8 -_NtGdiRectInRegion@8: - movl $0x10f6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiRectVisible@8 -_NtGdiRectVisible@8: - movl $0x10f7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiRemoveFontResourceW@24 -_NtGdiRemoveFontResourceW@24: - movl $0x10f8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiRemoveFontMemResourceEx@4 -_NtGdiRemoveFontMemResourceEx@4: - movl $0x10f9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiResetDC@20 -_NtGdiResetDC@20: - movl $0x10fa, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiResizePalette@8 -_NtGdiResizePalette@8: - movl $0x10fb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiRestoreDC@8 -_NtGdiRestoreDC@8: - movl $0x10fc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiRoundRect@28 -_NtGdiRoundRect@28: - movl $0x10fd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiSaveDC@4 -_NtGdiSaveDC@4: - movl $0x10fe, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiScaleViewportExtEx@24 -_NtGdiScaleViewportExtEx@24: - movl $0x10ff, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiScaleWindowExtEx@24 -_NtGdiScaleWindowExtEx@24: - movl $0x1100, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiSelectBitmap@8 -_NtGdiSelectBitmap@8: - movl $0x1101, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSelectBrush@8 -_NtGdiSelectBrush@8: - movl $0x1102, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSelectClipPath@8 -_NtGdiSelectClipPath@8: - movl $0x1103, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSelectFont@8 -_NtGdiSelectFont@8: - movl $0x1104, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSelectPen@8 -_NtGdiSelectPen@8: - movl $0x1105, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSetBitmapAttributes@8 -_NtGdiSetBitmapAttributes@8: - movl $0x1106, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSetBitmapBits@12 -_NtGdiSetBitmapBits@12: - movl $0x1107, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetBitmapDimension@16 -_NtGdiSetBitmapDimension@16: - movl $0x1108, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiSetBoundsRect@12 -_NtGdiSetBoundsRect@12: - movl $0x1109, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetBrushAttributes@8 -_NtGdiSetBrushAttributes@8: - movl $0x110a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSetBrushOrg@16 -_NtGdiSetBrushOrg@16: - movl $0x110b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiSetColorAdjustment@8 -_NtGdiSetColorAdjustment@8: - movl $0x110c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSetColorSpace@8 -_NtGdiSetColorSpace@8: - movl $0x110d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSetDeviceGammaRamp@8 -_NtGdiSetDeviceGammaRamp@8: - movl $0x110e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSetDIBitsToDeviceInternal@64 -_NtGdiSetDIBitsToDeviceInternal@64: - movl $0x110f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x40 - -.global _NtGdiSetFontEnumeration@4 -_NtGdiSetFontEnumeration@4: - movl $0x1110, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiSetFontXform@12 -_NtGdiSetFontXform@12: - movl $0x1111, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetIcmMode@12 -_NtGdiSetIcmMode@12: - movl $0x1112, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetLinkedUFIs@12 -_NtGdiSetLinkedUFIs@12: - movl $0x1113, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetMagicColors@12 -_NtGdiSetMagicColors@12: - movl $0x1114, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetMetaRgn@4 -_NtGdiSetMetaRgn@4: - movl $0x1115, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiSetMiterLimit@12 -_NtGdiSetMiterLimit@12: - movl $0x1116, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetDeviceWidth@4 -_NtGdiGetDeviceWidth@4: - movl $0x1117, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiMirrorWindowOrg@4 -_NtGdiMirrorWindowOrg@4: - movl $0x1118, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiSetLayout@12 -_NtGdiSetLayout@12: - movl $0x1119, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetPixel@16 -_NtGdiSetPixel@16: - movl $0x111a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiSetPixelFormat@8 -_NtGdiSetPixelFormat@8: - movl $0x111b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSetRectRgn@20 -_NtGdiSetRectRgn@20: - movl $0x111c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiSetSystemPaletteUse@8 -_NtGdiSetSystemPaletteUse@8: - movl $0x111d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSetTextJustification@12 -_NtGdiSetTextJustification@12: - movl $0x111e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetupPublicCFONT@12 -_NtGdiSetupPublicCFONT@12: - movl $0x111f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSetVirtualResolution@20 -_NtGdiSetVirtualResolution@20: - movl $0x1120, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiSetSizeDevice@12 -_NtGdiSetSizeDevice@12: - movl $0x1121, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiStartDoc@16 -_NtGdiStartDoc@16: - movl $0x1122, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiStartPage@4 -_NtGdiStartPage@4: - movl $0x1123, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiStretchBlt@48 -_NtGdiStretchBlt@48: - movl $0x1124, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x30 - -.global _NtGdiStretchDIBitsInternal@64 -_NtGdiStretchDIBitsInternal@64: - movl $0x1125, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x40 - -.global _NtGdiStrokeAndFillPath@4 -_NtGdiStrokeAndFillPath@4: - movl $0x1126, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiStrokePath@4 -_NtGdiStrokePath@4: - movl $0x1127, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiSwapBuffers@4 -_NtGdiSwapBuffers@4: - movl $0x1128, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiTransformPoints@20 -_NtGdiTransformPoints@20: - movl $0x1129, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiTransparentBlt@44 -_NtGdiTransparentBlt@44: - movl $0x112a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiUnloadPrinterDriver@8 -_NtGdiUnloadPrinterDriver@8: - movl $0x112b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiUnmapMemFont@4 -_NtGdiUnmapMemFont@4: - movl $0x112c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiUnrealizeObject@4 -_NtGdiUnrealizeObject@4: - movl $0x112d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiUpdateColors@4 -_NtGdiUpdateColors@4: - movl $0x112e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiWidenPath@4 -_NtGdiWidenPath@4: - movl $0x112f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserActivateKeyboardLayout@8 -_NtUserActivateKeyboardLayout@8: - movl $0x1130, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserAlterWindowStyle@12 -_NtUserAlterWindowStyle@12: - movl $0x1131, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserAssociateInputContext@12 -_NtUserAssociateInputContext@12: - movl $0x1132, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserAttachThreadInput@12 -_NtUserAttachThreadInput@12: - movl $0x1133, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserBeginPaint@8 -_NtUserBeginPaint@8: - movl $0x1134, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserBitBltSysBmp@32 -_NtUserBitBltSysBmp@32: - movl $0x1135, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtUserBlockInput@4 -_NtUserBlockInput@4: - movl $0x1136, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserBuildHimcList@16 -_NtUserBuildHimcList@16: - movl $0x1137, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserBuildHwndList@28 -_NtUserBuildHwndList@28: - movl $0x1138, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserBuildNameList@16 -_NtUserBuildNameList@16: - movl $0x1139, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserBuildPropList@16 -_NtUserBuildPropList@16: - movl $0x113a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserCallHwnd@8 -_NtUserCallHwnd@8: - movl $0x113b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserCallHwndLock@8 -_NtUserCallHwndLock@8: - movl $0x113c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserCallHwndOpt@8 -_NtUserCallHwndOpt@8: - movl $0x113d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserCallHwndParam@12 -_NtUserCallHwndParam@12: - movl $0x113e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserCallHwndParamLock@12 -_NtUserCallHwndParamLock@12: - movl $0x113f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserCallMsgFilter@8 -_NtUserCallMsgFilter@8: - movl $0x1140, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserCallNextHookEx@16 -_NtUserCallNextHookEx@16: - movl $0x1141, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserCallNoParam@4 -_NtUserCallNoParam@4: - movl $0x1142, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserCallOneParam@8 -_NtUserCallOneParam@8: - movl $0x1143, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserCallTwoParam@12 -_NtUserCallTwoParam@12: - movl $0x1144, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserChangeClipboardChain@8 -_NtUserChangeClipboardChain@8: - movl $0x1145, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserChangeDisplaySettings@20 -_NtUserChangeDisplaySettings@20: - movl $0x1146, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserCheckImeHotKey@8 -_NtUserCheckImeHotKey@8: - movl $0x1147, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserCheckMenuItem@12 -_NtUserCheckMenuItem@12: - movl $0x1148, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserChildWindowFromPointEx@16 -_NtUserChildWindowFromPointEx@16: - movl $0x1149, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserClipCursor@4 -_NtUserClipCursor@4: - movl $0x114a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserCloseClipboard@0 -_NtUserCloseClipboard@0: - movl $0x114b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserCloseDesktop@4 -_NtUserCloseDesktop@4: - movl $0x114c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserCloseWindowStation@4 -_NtUserCloseWindowStation@4: - movl $0x114d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserConsoleControl@12 -_NtUserConsoleControl@12: - movl $0x114e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserConvertMemHandle@8 -_NtUserConvertMemHandle@8: - movl $0x114f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserCopyAcceleratorTable@12 -_NtUserCopyAcceleratorTable@12: - movl $0x1150, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserCountClipboardFormats@0 -_NtUserCountClipboardFormats@0: - movl $0x1151, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserCreateAcceleratorTable@8 -_NtUserCreateAcceleratorTable@8: - movl $0x1152, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserCreateCaret@16 -_NtUserCreateCaret@16: - movl $0x1153, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserCreateDesktop@20 -_NtUserCreateDesktop@20: - movl $0x1154, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserCreateInputContext@4 -_NtUserCreateInputContext@4: - movl $0x1155, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserCreateLocalMemHandle@16 -_NtUserCreateLocalMemHandle@16: - movl $0x1156, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserCreateWindowEx@60 -_NtUserCreateWindowEx@60: - movl $0x1157, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x3c - -.global _NtUserCreateWindowStation@28 -_NtUserCreateWindowStation@28: - movl $0x1158, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserDdeGetQualityOfService@12 -_NtUserDdeGetQualityOfService@12: - movl $0x1159, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserDdeInitialize@20 -_NtUserDdeInitialize@20: - movl $0x115a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserDdeSetQualityOfService@12 -_NtUserDdeSetQualityOfService@12: - movl $0x115b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserDeferWindowPos@32 -_NtUserDeferWindowPos@32: - movl $0x115c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtUserDefSetText@8 -_NtUserDefSetText@8: - movl $0x115d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserDeleteMenu@12 -_NtUserDeleteMenu@12: - movl $0x115e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserDestroyAcceleratorTable@4 -_NtUserDestroyAcceleratorTable@4: - movl $0x115f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserDestroyCursor@8 -_NtUserDestroyCursor@8: - movl $0x1160, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserDestroyInputContext@4 -_NtUserDestroyInputContext@4: - movl $0x1161, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserDestroyMenu@4 -_NtUserDestroyMenu@4: - movl $0x1162, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserDestroyWindow@4 -_NtUserDestroyWindow@4: - movl $0x1163, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserDisableThreadIme@4 -_NtUserDisableThreadIme@4: - movl $0x1164, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserDispatchMessage@4 -_NtUserDispatchMessage@4: - movl $0x1165, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserDragDetect@12 -_NtUserDragDetect@12: - movl $0x1166, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserDragObject@20 -_NtUserDragObject@20: - movl $0x1167, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserDrawAnimatedRects@16 -_NtUserDrawAnimatedRects@16: - movl $0x1168, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserDrawCaption@16 -_NtUserDrawCaption@16: - movl $0x1169, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserDrawCaptionTemp@28 -_NtUserDrawCaptionTemp@28: - movl $0x116a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserDrawIconEx@44 -_NtUserDrawIconEx@44: - movl $0x116b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtUserDrawMenuBarTemp@20 -_NtUserDrawMenuBarTemp@20: - movl $0x116c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserEmptyClipboard@0 -_NtUserEmptyClipboard@0: - movl $0x116d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserEnableMenuItem@12 -_NtUserEnableMenuItem@12: - movl $0x116e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserEnableScrollBar@12 -_NtUserEnableScrollBar@12: - movl $0x116f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserEndDeferWindowPosEx@8 -_NtUserEndDeferWindowPosEx@8: - movl $0x1170, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserEndMenu@0 -_NtUserEndMenu@0: - movl $0x1171, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserEndPaint@8 -_NtUserEndPaint@8: - movl $0x1172, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserEnumDisplayDevices@16 -_NtUserEnumDisplayDevices@16: - movl $0x1173, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserEnumDisplayMonitors@16 -_NtUserEnumDisplayMonitors@16: - movl $0x1174, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserEnumDisplaySettings@16 -_NtUserEnumDisplaySettings@16: - movl $0x1175, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserEvent@4 -_NtUserEvent@4: - movl $0x1176, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserExcludeUpdateRgn@8 -_NtUserExcludeUpdateRgn@8: - movl $0x1177, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserFillWindow@16 -_NtUserFillWindow@16: - movl $0x1178, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserFindExistingCursorIcon@12 -_NtUserFindExistingCursorIcon@12: - movl $0x1179, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserFindWindowEx@20 -_NtUserFindWindowEx@20: - movl $0x117a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserFlashWindowEx@4 -_NtUserFlashWindowEx@4: - movl $0x117b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetAltTabInfo@24 -_NtUserGetAltTabInfo@24: - movl $0x117c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserGetAncestor@8 -_NtUserGetAncestor@8: - movl $0x117d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetAppImeLevel@4 -_NtUserGetAppImeLevel@4: - movl $0x117e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetAsyncKeyState@4 -_NtUserGetAsyncKeyState@4: - movl $0x117f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetAtomName@8 -_NtUserGetAtomName@8: - movl $0x1180, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetCaretBlinkTime@0 -_NtUserGetCaretBlinkTime@0: - movl $0x1181, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserGetCaretPos@4 -_NtUserGetCaretPos@4: - movl $0x1182, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetClassInfo@20 -_NtUserGetClassInfo@20: - movl $0x1183, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserGetClassName@12 -_NtUserGetClassName@12: - movl $0x1184, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetClipboardData@8 -_NtUserGetClipboardData@8: - movl $0x1185, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetClipboardFormatName@12 -_NtUserGetClipboardFormatName@12: - movl $0x1186, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetClipboardOwner@0 -_NtUserGetClipboardOwner@0: - movl $0x1187, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserGetClipboardSequenceNumber@0 -_NtUserGetClipboardSequenceNumber@0: - movl $0x1188, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserGetClipboardViewer@0 -_NtUserGetClipboardViewer@0: - movl $0x1189, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserGetClipCursor@4 -_NtUserGetClipCursor@4: - movl $0x118a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetComboBoxInfo@8 -_NtUserGetComboBoxInfo@8: - movl $0x118b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetControlBrush@12 -_NtUserGetControlBrush@12: - movl $0x118c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetControlColor@16 -_NtUserGetControlColor@16: - movl $0x118d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserGetCPD@12 -_NtUserGetCPD@12: - movl $0x118e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetCursorFrameInfo@16 -_NtUserGetCursorFrameInfo@16: - movl $0x118f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserGetCursorInfo@4 -_NtUserGetCursorInfo@4: - movl $0x1190, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetDC@4 -_NtUserGetDC@4: - movl $0x1191, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetDCEx@12 -_NtUserGetDCEx@12: - movl $0x1192, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetDoubleClickTime@0 -_NtUserGetDoubleClickTime@0: - movl $0x1193, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserGetForegroundWindow@0 -_NtUserGetForegroundWindow@0: - movl $0x1194, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserGetGuiResources@8 -_NtUserGetGuiResources@8: - movl $0x1195, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetGUIThreadInfo@8 -_NtUserGetGUIThreadInfo@8: - movl $0x1196, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetIconInfo@24 -_NtUserGetIconInfo@24: - movl $0x1197, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserGetIconSize@16 -_NtUserGetIconSize@16: - movl $0x1198, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserGetImeHotKey@16 -_NtUserGetImeHotKey@16: - movl $0x1199, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserGetImeInfoEx@8 -_NtUserGetImeInfoEx@8: - movl $0x119a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetInternalWindowPos@12 -_NtUserGetInternalWindowPos@12: - movl $0x119b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetKeyboardLayoutList@8 -_NtUserGetKeyboardLayoutList@8: - movl $0x119c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetKeyboardLayoutName@4 -_NtUserGetKeyboardLayoutName@4: - movl $0x119d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetKeyboardState@4 -_NtUserGetKeyboardState@4: - movl $0x119e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetKeyNameText@12 -_NtUserGetKeyNameText@12: - movl $0x119f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetKeyState@4 -_NtUserGetKeyState@4: - movl $0x11a0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetListBoxInfo@4 -_NtUserGetListBoxInfo@4: - movl $0x11a1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetMenuBarInfo@16 -_NtUserGetMenuBarInfo@16: - movl $0x11a2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserGetMenuIndex@8 -_NtUserGetMenuIndex@8: - movl $0x11a3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetMenuItemRect@16 -_NtUserGetMenuItemRect@16: - movl $0x11a4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserGetMessage@16 -_NtUserGetMessage@16: - movl $0x11a5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserGetMouseMovePointsEx@20 -_NtUserGetMouseMovePointsEx@20: - movl $0x11a6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserGetObjectInformation@20 -_NtUserGetObjectInformation@20: - movl $0x11a7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserGetOpenClipboardWindow@0 -_NtUserGetOpenClipboardWindow@0: - movl $0x11a8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserGetPriorityClipboardFormat@8 -_NtUserGetPriorityClipboardFormat@8: - movl $0x11a9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetProcessWindowStation@0 -_NtUserGetProcessWindowStation@0: - movl $0x11aa, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserGetRawInputBuffer@12 -_NtUserGetRawInputBuffer@12: - movl $0x11ab, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetRawInputData@20 -_NtUserGetRawInputData@20: - movl $0x11ac, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserGetRawInputDeviceInfo@16 -_NtUserGetRawInputDeviceInfo@16: - movl $0x11ad, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserGetRawInputDeviceList@12 -_NtUserGetRawInputDeviceList@12: - movl $0x11ae, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetRegisteredRawInputDevices@12 -_NtUserGetRegisteredRawInputDevices@12: - movl $0x11af, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetScrollBarInfo@12 -_NtUserGetScrollBarInfo@12: - movl $0x11b0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetSystemMenu@8 -_NtUserGetSystemMenu@8: - movl $0x11b1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetThreadDesktop@8 -_NtUserGetThreadDesktop@8: - movl $0x11b2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetThreadState@4 -_NtUserGetThreadState@4: - movl $0x11b3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetTitleBarInfo@8 -_NtUserGetTitleBarInfo@8: - movl $0x11b4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetUpdateRect@12 -_NtUserGetUpdateRect@12: - movl $0x11b5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetUpdateRgn@12 -_NtUserGetUpdateRgn@12: - movl $0x11b6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserGetWindowDC@4 -_NtUserGetWindowDC@4: - movl $0x11b7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserGetWindowPlacement@8 -_NtUserGetWindowPlacement@8: - movl $0x11b8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserGetWOWClass@8 -_NtUserGetWOWClass@8: - movl $0x11b9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserHardErrorControl@12 -_NtUserHardErrorControl@12: - movl $0x11ba, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserHideCaret@4 -_NtUserHideCaret@4: - movl $0x11bb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserHiliteMenuItem@16 -_NtUserHiliteMenuItem@16: - movl $0x11bc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserImpersonateDdeClientWindow@8 -_NtUserImpersonateDdeClientWindow@8: - movl $0x11bd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserInitialize@12 -_NtUserInitialize@12: - movl $0x11be, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserInitializeClientPfnArrays@16 -_NtUserInitializeClientPfnArrays@16: - movl $0x11bf, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserInitTask@48 -_NtUserInitTask@48: - movl $0x11c0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x30 - -.global _NtUserInternalGetWindowText@12 -_NtUserInternalGetWindowText@12: - movl $0x11c1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserInvalidateRect@12 -_NtUserInvalidateRect@12: - movl $0x11c2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserInvalidateRgn@12 -_NtUserInvalidateRgn@12: - movl $0x11c3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserIsClipboardFormatAvailable@4 -_NtUserIsClipboardFormatAvailable@4: - movl $0x11c4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserKillTimer@8 -_NtUserKillTimer@8: - movl $0x11c5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserLoadKeyboardLayoutEx@28 -_NtUserLoadKeyboardLayoutEx@28: - movl $0x11c6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserLockWindowStation@4 -_NtUserLockWindowStation@4: - movl $0x11c7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserLockWindowUpdate@4 -_NtUserLockWindowUpdate@4: - movl $0x11c8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserLockWorkStation@0 -_NtUserLockWorkStation@0: - movl $0x11c9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserMapVirtualKeyEx@16 -_NtUserMapVirtualKeyEx@16: - movl $0x11ca, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserMenuItemFromPoint@16 -_NtUserMenuItemFromPoint@16: - movl $0x11cb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserMessageCall@28 -_NtUserMessageCall@28: - movl $0x11cc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserMinMaximize@12 -_NtUserMinMaximize@12: - movl $0x11cd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserMNDragLeave@0 -_NtUserMNDragLeave@0: - movl $0x11ce, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserMNDragOver@8 -_NtUserMNDragOver@8: - movl $0x11cf, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserModifyUserStartupInfoFlags@8 -_NtUserModifyUserStartupInfoFlags@8: - movl $0x11d0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserMoveWindow@24 -_NtUserMoveWindow@24: - movl $0x11d1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserNotifyIMEStatus@12 -_NtUserNotifyIMEStatus@12: - movl $0x11d2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserNotifyProcessCreate@16 -_NtUserNotifyProcessCreate@16: - movl $0x11d3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserNotifyWinEvent@16 -_NtUserNotifyWinEvent@16: - movl $0x11d4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserOpenClipboard@8 -_NtUserOpenClipboard@8: - movl $0x11d5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserOpenDesktop@12 -_NtUserOpenDesktop@12: - movl $0x11d6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserOpenInputDesktop@12 -_NtUserOpenInputDesktop@12: - movl $0x11d7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserOpenWindowStation@8 -_NtUserOpenWindowStation@8: - movl $0x11d8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserPaintDesktop@4 -_NtUserPaintDesktop@4: - movl $0x11d9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserPeekMessage@20 -_NtUserPeekMessage@20: - movl $0x11da, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserPostMessage@16 -_NtUserPostMessage@16: - movl $0x11db, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserPostThreadMessage@16 -_NtUserPostThreadMessage@16: - movl $0x11dc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserPrintWindow@12 -_NtUserPrintWindow@12: - movl $0x11dd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserProcessConnect@12 -_NtUserProcessConnect@12: - movl $0x11de, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserQueryInformationThread@20 -_NtUserQueryInformationThread@20: - movl $0x11df, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserQueryInputContext@8 -_NtUserQueryInputContext@8: - movl $0x11e0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserQuerySendMessage@4 -_NtUserQuerySendMessage@4: - movl $0x11e1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserQueryUserCounters@20 -_NtUserQueryUserCounters@20: - movl $0x11e2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserQueryWindow@8 -_NtUserQueryWindow@8: - movl $0x11e3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserRealChildWindowFromPoint@12 -_NtUserRealChildWindowFromPoint@12: - movl $0x11e4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserRealInternalGetMessage@24 -_NtUserRealInternalGetMessage@24: - movl $0x11e5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserRealWaitMessageEx@8 -_NtUserRealWaitMessageEx@8: - movl $0x11e6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserRedrawWindow@16 -_NtUserRedrawWindow@16: - movl $0x11e7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserRegisterClassExWOW@28 -_NtUserRegisterClassExWOW@28: - movl $0x11e8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserRegisterUserApiHook@8 -_NtUserRegisterUserApiHook@8: - movl $0x11e9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserRegisterHotKey@16 -_NtUserRegisterHotKey@16: - movl $0x11ea, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserRegisterRawInputDevices@12 -_NtUserRegisterRawInputDevices@12: - movl $0x11eb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserRegisterTasklist@4 -_NtUserRegisterTasklist@4: - movl $0x11ec, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserRegisterWindowMessage@4 -_NtUserRegisterWindowMessage@4: - movl $0x11ed, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserRemoveMenu@12 -_NtUserRemoveMenu@12: - movl $0x11ee, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserRemoveProp@8 -_NtUserRemoveProp@8: - movl $0x11ef, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserResolveDesktop@16 -_NtUserResolveDesktop@16: - movl $0x11f0, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserResolveDesktopForWOW@4 -_NtUserResolveDesktopForWOW@4: - movl $0x11f1, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSBGetParms@16 -_NtUserSBGetParms@16: - movl $0x11f2, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserScrollDC@28 -_NtUserScrollDC@28: - movl $0x11f3, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserScrollWindowEx@32 -_NtUserScrollWindowEx@32: - movl $0x11f4, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtUserSelectPalette@12 -_NtUserSelectPalette@12: - movl $0x11f5, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSendInput@12 -_NtUserSendInput@12: - movl $0x11f6, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetActiveWindow@4 -_NtUserSetActiveWindow@4: - movl $0x11f7, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetAppImeLevel@8 -_NtUserSetAppImeLevel@8: - movl $0x11f8, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetCapture@4 -_NtUserSetCapture@4: - movl $0x11f9, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetClassLong@16 -_NtUserSetClassLong@16: - movl $0x11fa, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetClassWord@12 -_NtUserSetClassWord@12: - movl $0x11fb, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetClipboardData@12 -_NtUserSetClipboardData@12: - movl $0x11fc, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetClipboardViewer@4 -_NtUserSetClipboardViewer@4: - movl $0x11fd, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetConsoleReserveKeys@8 -_NtUserSetConsoleReserveKeys@8: - movl $0x11fe, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetCursor@4 -_NtUserSetCursor@4: - movl $0x11ff, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetCursorContents@8 -_NtUserSetCursorContents@8: - movl $0x1200, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetCursorIconData@16 -_NtUserSetCursorIconData@16: - movl $0x1201, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetDbgTag@8 -_NtUserSetDbgTag@8: - movl $0x1202, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetFocus@4 -_NtUserSetFocus@4: - movl $0x1203, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetImeHotKey@20 -_NtUserSetImeHotKey@20: - movl $0x1204, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserSetImeInfoEx@4 -_NtUserSetImeInfoEx@4: - movl $0x1205, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetImeOwnerWindow@8 -_NtUserSetImeOwnerWindow@8: - movl $0x1206, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetInformationProcess@16 -_NtUserSetInformationProcess@16: - movl $0x1207, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetInformationThread@16 -_NtUserSetInformationThread@16: - movl $0x1208, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetInternalWindowPos@16 -_NtUserSetInternalWindowPos@16: - movl $0x1209, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetKeyboardState@4 -_NtUserSetKeyboardState@4: - movl $0x120a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetLogonNotifyWindow@4 -_NtUserSetLogonNotifyWindow@4: - movl $0x120b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetMenu@12 -_NtUserSetMenu@12: - movl $0x120c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetMenuContextHelpId@8 -_NtUserSetMenuContextHelpId@8: - movl $0x120d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetMenuDefaultItem@12 -_NtUserSetMenuDefaultItem@12: - movl $0x120e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetMenuFlagRtoL@4 -_NtUserSetMenuFlagRtoL@4: - movl $0x120f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetObjectInformation@16 -_NtUserSetObjectInformation@16: - movl $0x1210, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetParent@8 -_NtUserSetParent@8: - movl $0x1211, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetProcessWindowStation@4 -_NtUserSetProcessWindowStation@4: - movl $0x1212, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetProp@12 -_NtUserSetProp@12: - movl $0x1213, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetRipFlags@8 -_NtUserSetRipFlags@8: - movl $0x1214, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetScrollInfo@16 -_NtUserSetScrollInfo@16: - movl $0x1215, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetShellWindowEx@8 -_NtUserSetShellWindowEx@8: - movl $0x1216, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetSysColors@16 -_NtUserSetSysColors@16: - movl $0x1217, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetSystemCursor@8 -_NtUserSetSystemCursor@8: - movl $0x1218, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetSystemMenu@8 -_NtUserSetSystemMenu@8: - movl $0x1219, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetSystemTimer@16 -_NtUserSetSystemTimer@16: - movl $0x121a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetThreadDesktop@4 -_NtUserSetThreadDesktop@4: - movl $0x121b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSetThreadLayoutHandles@8 -_NtUserSetThreadLayoutHandles@8: - movl $0x121c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetThreadState@8 -_NtUserSetThreadState@8: - movl $0x121d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetTimer@16 -_NtUserSetTimer@16: - movl $0x121e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetWindowFNID@8 -_NtUserSetWindowFNID@8: - movl $0x121f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetWindowLong@16 -_NtUserSetWindowLong@16: - movl $0x1220, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetWindowPlacement@8 -_NtUserSetWindowPlacement@8: - movl $0x1221, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSetWindowPos@28 -_NtUserSetWindowPos@28: - movl $0x1222, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserSetWindowRgn@12 -_NtUserSetWindowRgn@12: - movl $0x1223, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetWindowsHookAW@12 -_NtUserSetWindowsHookAW@12: - movl $0x1224, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetWindowsHookEx@24 -_NtUserSetWindowsHookEx@24: - movl $0x1225, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserSetWindowStationUser@16 -_NtUserSetWindowStationUser@16: - movl $0x1226, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetWindowWord@12 -_NtUserSetWindowWord@12: - movl $0x1227, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserSetWinEventHook@32 -_NtUserSetWinEventHook@32: - movl $0x1228, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtUserShowCaret@4 -_NtUserShowCaret@4: - movl $0x1229, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserShowScrollBar@12 -_NtUserShowScrollBar@12: - movl $0x122a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserShowWindow@8 -_NtUserShowWindow@8: - movl $0x122b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserShowWindowAsync@8 -_NtUserShowWindowAsync@8: - movl $0x122c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserSoundSentry@0 -_NtUserSoundSentry@0: - movl $0x122d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserSwitchDesktop@4 -_NtUserSwitchDesktop@4: - movl $0x122e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserSystemParametersInfo@16 -_NtUserSystemParametersInfo@16: - movl $0x122f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserTestForInteractiveUser@4 -_NtUserTestForInteractiveUser@4: - movl $0x1230, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserThunkedMenuInfo@8 -_NtUserThunkedMenuInfo@8: - movl $0x1231, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserThunkedMenuItemInfo@24 -_NtUserThunkedMenuItemInfo@24: - movl $0x1232, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserToUnicodeEx@28 -_NtUserToUnicodeEx@28: - movl $0x1233, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtUserTrackMouseEvent@4 -_NtUserTrackMouseEvent@4: - movl $0x1234, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserTrackPopupMenuEx@24 -_NtUserTrackPopupMenuEx@24: - movl $0x1235, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserCalcMenuBar@20 -_NtUserCalcMenuBar@20: - movl $0x1236, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtUserPaintMenuBar@24 -_NtUserPaintMenuBar@24: - movl $0x1237, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserTranslateAccelerator@12 -_NtUserTranslateAccelerator@12: - movl $0x1238, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserTranslateMessage@8 -_NtUserTranslateMessage@8: - movl $0x1239, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserUnhookWindowsHookEx@4 -_NtUserUnhookWindowsHookEx@4: - movl $0x123a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserUnhookWinEvent@4 -_NtUserUnhookWinEvent@4: - movl $0x123b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserUnloadKeyboardLayout@4 -_NtUserUnloadKeyboardLayout@4: - movl $0x123c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserUnlockWindowStation@4 -_NtUserUnlockWindowStation@4: - movl $0x123d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserUnregisterClass@12 -_NtUserUnregisterClass@12: - movl $0x123e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserUnregisterUserApiHook@0 -_NtUserUnregisterUserApiHook@0: - movl $0x123f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserUnregisterHotKey@8 -_NtUserUnregisterHotKey@8: - movl $0x1240, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserUpdateInputContext@12 -_NtUserUpdateInputContext@12: - movl $0x1241, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserUpdateInstance@12 -_NtUserUpdateInstance@12: - movl $0x1242, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserUpdateLayeredWindow@36 -_NtUserUpdateLayeredWindow@36: - movl $0x1243, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x24 - -.global _NtUserGetLayeredWindowAttributes@16 -_NtUserGetLayeredWindowAttributes@16: - movl $0x1244, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserSetLayeredWindowAttributes@16 -_NtUserSetLayeredWindowAttributes@16: - movl $0x1245, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserUpdatePerUserSystemParameters@8 -_NtUserUpdatePerUserSystemParameters@8: - movl $0x1246, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserUserHandleGrantAccess@12 -_NtUserUserHandleGrantAccess@12: - movl $0x1247, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserValidateHandleSecure@8 -_NtUserValidateHandleSecure@8: - movl $0x1248, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserValidateRect@8 -_NtUserValidateRect@8: - movl $0x1249, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserValidateTimerCallback@12 -_NtUserValidateTimerCallback@12: - movl $0x124a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserVkKeyScanEx@12 -_NtUserVkKeyScanEx@12: - movl $0x124b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserWaitForInputIdle@12 -_NtUserWaitForInputIdle@12: - movl $0x124c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserWaitForMsgAndEvent@4 -_NtUserWaitForMsgAndEvent@4: - movl $0x124d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtUserWaitMessage@0 -_NtUserWaitMessage@0: - movl $0x124e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserWin32PoolAllocationStats@24 -_NtUserWin32PoolAllocationStats@24: - movl $0x124f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtUserWindowFromPoint@8 -_NtUserWindowFromPoint@8: - movl $0x1250, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtUserYieldTask@0 -_NtUserYieldTask@0: - movl $0x1251, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserRemoteConnect@12 -_NtUserRemoteConnect@12: - movl $0x1252, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtUserRemoteRedrawRectangle@16 -_NtUserRemoteRedrawRectangle@16: - movl $0x1253, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtUserRemoteRedrawScreen@0 -_NtUserRemoteRedrawScreen@0: - movl $0x1254, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserRemoteStopScreenUpdates@0 -_NtUserRemoteStopScreenUpdates@0: - movl $0x1255, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtUserCtxDisplayIOCtl@12 -_NtUserCtxDisplayIOCtl@12: - movl $0x1256, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiEngAssociateSurface@12 -_NtGdiEngAssociateSurface@12: - movl $0x1257, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiEngCreateBitmap@24 -_NtGdiEngCreateBitmap@24: - movl $0x1258, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiEngCreateDeviceSurface@16 -_NtGdiEngCreateDeviceSurface@16: - movl $0x1259, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiEngCreateDeviceBitmap@16 -_NtGdiEngCreateDeviceBitmap@16: - movl $0x125a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiEngCreatePalette@24 -_NtGdiEngCreatePalette@24: - movl $0x125b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiEngComputeGlyphSet@12 -_NtGdiEngComputeGlyphSet@12: - movl $0x125c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiEngCopyBits@24 -_NtGdiEngCopyBits@24: - movl $0x125d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiEngDeletePalette@4 -_NtGdiEngDeletePalette@4: - movl $0x125e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEngDeleteSurface@4 -_NtGdiEngDeleteSurface@4: - movl $0x125f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEngEraseSurface@12 -_NtGdiEngEraseSurface@12: - movl $0x1260, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiEngUnlockSurface@4 -_NtGdiEngUnlockSurface@4: - movl $0x1261, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEngLockSurface@4 -_NtGdiEngLockSurface@4: - movl $0x1262, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEngBitBlt@44 -_NtGdiEngBitBlt@44: - movl $0x1263, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiEngStretchBlt@44 -_NtGdiEngStretchBlt@44: - movl $0x1264, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiEngPlgBlt@44 -_NtGdiEngPlgBlt@44: - movl $0x1265, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x2c - -.global _NtGdiEngMarkBandingSurface@4 -_NtGdiEngMarkBandingSurface@4: - movl $0x1266, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEngStrokePath@32 -_NtGdiEngStrokePath@32: - movl $0x1267, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiEngFillPath@28 -_NtGdiEngFillPath@28: - movl $0x1268, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiEngStrokeAndFillPath@40 -_NtGdiEngStrokeAndFillPath@40: - movl $0x1269, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x28 - -.global _NtGdiEngPaint@20 -_NtGdiEngPaint@20: - movl $0x126a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiEngLineTo@36 -_NtGdiEngLineTo@36: - movl $0x126b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x24 - -.global _NtGdiEngAlphaBlend@28 -_NtGdiEngAlphaBlend@28: - movl $0x126c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x1c - -.global _NtGdiEngGradientFill@40 -_NtGdiEngGradientFill@40: - movl $0x126d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x28 - -.global _NtGdiEngTransparentBlt@32 -_NtGdiEngTransparentBlt@32: - movl $0x126e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x20 - -.global _NtGdiEngTextOut@40 -_NtGdiEngTextOut@40: - movl $0x126f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x28 - -.global _NtGdiEngStretchBltROP@52 -_NtGdiEngStretchBltROP@52: - movl $0x1270, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x34 - -.global _NtGdiXLATEOBJ_cGetPalette@16 -_NtGdiXLATEOBJ_cGetPalette@16: - movl $0x1271, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiXLATEOBJ_iXlate@8 -_NtGdiXLATEOBJ_iXlate@8: - movl $0x1272, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiXLATEOBJ_hGetColorTransform@4 -_NtGdiXLATEOBJ_hGetColorTransform@4: - movl $0x1273, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiCLIPOBJ_bEnum@12 -_NtGdiCLIPOBJ_bEnum@12: - movl $0x1274, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiCLIPOBJ_cEnumStart@20 -_NtGdiCLIPOBJ_cEnumStart@20: - movl $0x1275, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiCLIPOBJ_ppoGetPath@4 -_NtGdiCLIPOBJ_ppoGetPath@4: - movl $0x1276, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEngDeletePath@4 -_NtGdiEngDeletePath@4: - movl $0x1277, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEngCreateClip@0 -_NtGdiEngCreateClip@0: - movl $0x1278, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x0 - -.global _NtGdiEngDeleteClip@4 -_NtGdiEngDeleteClip@4: - movl $0x1279, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiBRUSHOBJ_ulGetBrushColor@4 -_NtGdiBRUSHOBJ_ulGetBrushColor@4: - movl $0x127a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiBRUSHOBJ_pvAllocRbrush@8 -_NtGdiBRUSHOBJ_pvAllocRbrush@8: - movl $0x127b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiBRUSHOBJ_pvGetRbrush@4 -_NtGdiBRUSHOBJ_pvGetRbrush@4: - movl $0x127c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiBRUSHOBJ_hGetColorTransform@4 -_NtGdiBRUSHOBJ_hGetColorTransform@4: - movl $0x127d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiXFORMOBJ_bApplyXform@20 -_NtGdiXFORMOBJ_bApplyXform@20: - movl $0x127e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiXFORMOBJ_iGetXform@8 -_NtGdiXFORMOBJ_iGetXform@8: - movl $0x127f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiFONTOBJ_vGetInfo@12 -_NtGdiFONTOBJ_vGetInfo@12: - movl $0x1280, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiFONTOBJ_pxoGetXform@4 -_NtGdiFONTOBJ_pxoGetXform@4: - movl $0x1281, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiFONTOBJ_cGetGlyphs@20 -_NtGdiFONTOBJ_cGetGlyphs@20: - movl $0x1282, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x14 - -.global _NtGdiFONTOBJ_pifi@4 -_NtGdiFONTOBJ_pifi@4: - movl $0x1283, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiFONTOBJ_pfdg@4 -_NtGdiFONTOBJ_pfdg@4: - movl $0x1284, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiFONTOBJ_pQueryGlyphAttrs@8 -_NtGdiFONTOBJ_pQueryGlyphAttrs@8: - movl $0x1285, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiFONTOBJ_pvTrueTypeFontFile@8 -_NtGdiFONTOBJ_pvTrueTypeFontFile@8: - movl $0x1286, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiFONTOBJ_cGetAllGlyphHandles@8 -_NtGdiFONTOBJ_cGetAllGlyphHandles@8: - movl $0x1287, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiSTROBJ_bEnum@12 -_NtGdiSTROBJ_bEnum@12: - movl $0x1288, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSTROBJ_bEnumPositionsOnly@12 -_NtGdiSTROBJ_bEnumPositionsOnly@12: - movl $0x1289, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiSTROBJ_bGetAdvanceWidths@16 -_NtGdiSTROBJ_bGetAdvanceWidths@16: - movl $0x128a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiSTROBJ_vEnumStart@4 -_NtGdiSTROBJ_vEnumStart@4: - movl $0x128b, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiSTROBJ_dwGetCodePage@4 -_NtGdiSTROBJ_dwGetCodePage@4: - movl $0x128c, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiPATHOBJ_vGetBounds@8 -_NtGdiPATHOBJ_vGetBounds@8: - movl $0x128d, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiPATHOBJ_bEnum@8 -_NtGdiPATHOBJ_bEnum@8: - movl $0x128e, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiPATHOBJ_vEnumStart@4 -_NtGdiPATHOBJ_vEnumStart@4: - movl $0x128f, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiPATHOBJ_vEnumStartClipLines@16 -_NtGdiPATHOBJ_vEnumStartClipLines@16: - movl $0x1290, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiPATHOBJ_bEnumClipLines@12 -_NtGdiPATHOBJ_bEnumClipLines@12: - movl $0x1291, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - -.global _NtGdiGetDhpdev@4 -_NtGdiGetDhpdev@4: - movl $0x1292, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiEngCheckAbort@4 -_NtGdiEngCheckAbort@4: - movl $0x1293, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiHT_Get8BPPFormatPalette@16 -_NtGdiHT_Get8BPPFormatPalette@16: - movl $0x1294, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiHT_Get8BPPMaskPalette@24 -_NtGdiHT_Get8BPPMaskPalette@24: - movl $0x1295, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x18 - -.global _NtGdiUpdateTransform@4 -_NtGdiUpdateTransform@4: - movl $0x1296, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiSetPUMPDOBJ@16 -_NtGdiSetPUMPDOBJ@16: - movl $0x1297, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x10 - -.global _NtGdiBRUSHOBJ_DeleteRbrush@8 -_NtGdiBRUSHOBJ_DeleteRbrush@8: - movl $0x1298, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x8 - -.global _NtGdiUMPDEngFreeUserMem@4 -_NtGdiUMPDEngFreeUserMem@4: - movl $0x1299, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0x4 - -.global _NtGdiDrawStream@12 -_NtGdiDrawStream@12: - movl $0x129a, %eax - movl $KUSER_SHARED_SYSCALL, %ecx - call *(%ecx) - ret $0xc - diff --git a/rostests/apitests/w32kdll/w32kdll_xpsp2/w32kdll_xpsp2.def b/rostests/apitests/w32kdll/w32kdll_xpsp2/w32kdll_xpsp2.def deleted file mode 100644 index 2dfd2ebce1f..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_xpsp2/w32kdll_xpsp2.def +++ /dev/null @@ -1,678 +0,0 @@ -; $Id: w32kdll.def 27344 2007-08-01 14:12:10Z tkreuzer $ -; -; ReactOS Operating System -; -; This file contains all win32k native api functions from win xp -; -LIBRARY w32kdll.dll - -EXPORTS -NtGdiAbortDoc@4 -NtGdiAbortPath@4 -NtGdiAddFontResourceW@24 -NtGdiAddRemoteFontToDC@16 -NtGdiAddFontMemResourceEx@20 -NtGdiRemoveMergeFont@8 -NtGdiAddRemoteMMInstanceToDC@12 -NtGdiAlphaBlend@48 -NtGdiAngleArc@24 -NtGdiAnyLinkedFonts@0 -NtGdiFontIsLinked@4 -NtGdiArcInternal@40 -NtGdiBeginPath@4 -NtGdiBitBlt@44 -NtGdiCancelDC@4 -NtGdiCheckBitmapBits@32 -NtGdiCloseFigure@4 -NtGdiClearBitmapAttributes@8 -NtGdiClearBrushAttributes@8 -NtGdiColorCorrectPalette@24 -NtGdiCombineRgn@16 -NtGdiCombineTransform@12 -NtGdiComputeXformCoefficients@4 -NtGdiConsoleTextOut@16 -NtGdiConvertMetafileRect@8 -NtGdiCreateBitmap@20 -NtGdiCreateClientObj@4 -NtGdiCreateColorSpace@4 -NtGdiCreateColorTransform@32 -NtGdiCreateCompatibleBitmap@12 -NtGdiCreateCompatibleDC@4 -NtGdiCreateDIBBrush@24 -NtGdiCreateDIBitmapInternal@44 -NtGdiCreateDIBSection@36 -NtGdiCreateEllipticRgn@16 -NtGdiCreateHalftonePalette@4 -NtGdiCreateHatchBrushInternal@12 -NtGdiCreateMetafileDC@4 -NtGdiCreatePaletteInternal@8 -NtGdiCreatePatternBrushInternal@12 -NtGdiCreatePen@16 -NtGdiCreateRectRgn@16 -NtGdiCreateRoundRectRgn@24 -NtGdiCreateServerMetaFile@24 -NtGdiCreateSolidBrush@8 -NtGdiD3dContextCreate@16 -NtGdiD3dContextDestroy@4 -NtGdiD3dContextDestroyAll@4 -NtGdiD3dValidateTextureStageState@4 -NtGdiD3dDrawPrimitives2@28 -NtGdiDdGetDriverState@4 -NtGdiDdAddAttachedSurface@12 -NtGdiDdAlphaBlt@12 -NtGdiDdAttachSurface@8 -NtGdiDdBeginMoCompFrame@8 -NtGdiDdBlt@12 -NtGdiDdCanCreateSurface@8 -NtGdiDdCanCreateD3DBuffer@8 -NtGdiDdColorControl@8 -NtGdiDdCreateDirectDrawObject@4 -NtGdiDdCreateSurface@32 -NtGdiDdCreateD3DBuffer@32 -NtGdiDdCreateMoComp@8 -NtGdiDdCreateSurfaceObject@24 -NtGdiDdDeleteDirectDrawObject@4 -NtGdiDdDeleteSurfaceObject@4 -NtGdiDdDestroyMoComp@8 -NtGdiDdDestroySurface@8 -NtGdiDdDestroyD3DBuffer@4 -NtGdiDdEndMoCompFrame@8 -NtGdiDdFlip@20 -NtGdiDdFlipToGDISurface@8 -NtGdiDdGetAvailDriverMemory@8 -NtGdiDdGetBltStatus@8 -NtGdiDdGetDC@8 -NtGdiDdGetDriverInfo@8 -NtGdiDdGetDxHandle@12 -NtGdiDdGetFlipStatus@8 -NtGdiDdGetInternalMoCompInfo@8 -NtGdiDdGetMoCompBuffInfo@8 -NtGdiDdGetMoCompGuids@8 -NtGdiDdGetMoCompFormats@8 -NtGdiDdGetScanLine@8 -NtGdiDdLock@12 -NtGdiDdLockD3D@8 -NtGdiDdQueryDirectDrawObject@44 -NtGdiDdQueryMoCompStatus@8 -NtGdiDdReenableDirectDrawObject@8 -NtGdiDdReleaseDC@4 -NtGdiDdRenderMoComp@8 -NtGdiDdResetVisrgn@8 -NtGdiDdSetColorKey@8 -NtGdiDdSetExclusiveMode@8 -NtGdiDdSetGammaRamp@12 -NtGdiDdCreateSurfaceEx@12 -NtGdiDdSetOverlayPosition@12 -NtGdiDdUnattachSurface@8 -NtGdiDdUnlock@8 -NtGdiDdUnlockD3D@8 -NtGdiDdUpdateOverlay@12 -NtGdiDdWaitForVerticalBlank@8 -NtGdiDvpCanCreateVideoPort@8 -NtGdiDvpColorControl@8 -NtGdiDvpCreateVideoPort@8 -NtGdiDvpDestroyVideoPort@8 -NtGdiDvpFlipVideoPort@16 -NtGdiDvpGetVideoPortBandwidth@8 -NtGdiDvpGetVideoPortField@8 -NtGdiDvpGetVideoPortFlipStatus@8 -NtGdiDvpGetVideoPortInputFormats@8 -NtGdiDvpGetVideoPortLine@8 -NtGdiDvpGetVideoPortOutputFormats@8 -NtGdiDvpGetVideoPortConnectInfo@8 -NtGdiDvpGetVideoSignalStatus@8 -NtGdiDvpUpdateVideoPort@16 -NtGdiDvpWaitForVideoPortSync@8 -NtGdiDvpAcquireNotification@12 -NtGdiDvpReleaseNotification@8 -NtGdiDxgGenericThunk@24 -NtGdiDeleteClientObj@4 -NtGdiDeleteColorSpace@4 -NtGdiDeleteColorTransform@8 -NtGdiDeleteObjectApp@4 -NtGdiDescribePixelFormat@16 -NtGdiGetPerBandInfo@8 -NtGdiDoBanding@16 -NtGdiDoPalette@24 -NtGdiDrawEscape@16 -NtGdiEllipse@20 -NtGdiEnableEUDC@4 -NtGdiEndDoc@4 -NtGdiEndPage@4 -NtGdiEndPath@4 -NtGdiEnumFontChunk@20 -NtGdiEnumFontClose@4 -NtGdiEnumFontOpen@28 -NtGdiEnumObjects@16 -NtGdiEqualRgn@8 -NtGdiEudcLoadUnloadLink@28 -NtGdiExcludeClipRect@20 -NtGdiExtCreatePen@44 -NtGdiExtCreateRegion@12 -NtGdiExtEscape@32 -NtGdiExtFloodFill@20 -NtGdiExtGetObjectW@12 -NtGdiExtSelectClipRgn@12 -NtGdiExtTextOutW@36 -NtGdiFillPath@4 -NtGdiFillRgn@12 -NtGdiFlattenPath@4 -NtGdiFlushUserBatch@0 -NtGdiFlush@0 -NtGdiForceUFIMapping@8 -NtGdiFrameRgn@20 -NtGdiFullscreenControl@20 -NtGdiGetAndSetDCDword@16 -NtGdiGetAppClipBox@8 -NtGdiGetBitmapBits@12 -NtGdiGetBitmapDimension@8 -NtGdiGetBoundsRect@12 -NtGdiGetCharABCWidthsW@24 -NtGdiGetCharacterPlacementW@24 -NtGdiGetCharSet@4 -NtGdiGetCharWidthW@24 -NtGdiGetCharWidthInfo@8 -NtGdiGetColorAdjustment@8 -NtGdiGetColorSpaceforBitmap@4 -NtGdiGetDCDword@12 -NtGdiGetDCforBitmap@4 -NtGdiGetDCObject@8 -NtGdiGetDCPoint@12 -NtGdiGetDeviceCaps@8 -NtGdiGetDeviceGammaRamp@8 -NtGdiGetDeviceCapsAll@8 -NtGdiGetDIBitsInternal@36 -NtGdiGetETM@8 -NtGdiGetEudcTimeStampEx@12 -NtGdiGetFontData@20 -NtGdiGetFontResourceInfoInternalW@28 -NtGdiGetGlyphIndicesW@20 -NtGdiGetGlyphIndicesWInternal@24 -NtGdiGetGlyphOutline@32 -NtGdiGetKerningPairs@12 -NtGdiGetLinkedUFIs@12 -NtGdiGetMiterLimit@8 -NtGdiGetMonitorID@12 -NtGdiGetNearestColor@8 -NtGdiGetNearestPaletteIndex@8 -NtGdiGetObjectBitmapHandle@8 -NtGdiGetOutlineTextMetricsInternalW@16 -NtGdiGetPath@16 -NtGdiGetPixel@12 -NtGdiGetRandomRgn@12 -NtGdiGetRasterizerCaps@8 -NtGdiGetRealizationInfo@12 -NtGdiGetRegionData@12 -NtGdiGetRgnBox@8 -NtGdiGetServerMetaFileBits@28 -NtGdiGetSpoolMessage@16 -NtGdiGetStats@20 -NtGdiGetStockObject@4 -NtGdiGetStringBitmapW@20 -NtGdiGetSystemPaletteUse@4 -NtGdiGetTextCharsetInfo@12 -NtGdiGetTextExtent@20 -NtGdiGetTextExtentExW@32 -NtGdiGetTextFaceW@16 -NtGdiGetTextMetricsW@12 -NtGdiGetTransform@12 -NtGdiGetUFI@24 -NtGdiGetEmbUFI@28 -NtGdiGetUFIPathname@40 -NtGdiGetEmbedFonts@0 -NtGdiChangeGhostFont@8 -NtGdiAddEmbFontToDC@8 -NtGdiGetFontUnicodeRanges@8 -NtGdiGetWidthTable@28 -NtGdiGradientFill@24 -NtGdiHfontCreate@20 -NtGdiIcmBrushInfo@32 -NtGdiInit@0 -NtGdiInitSpool@0 -NtGdiIntersectClipRect@20 -NtGdiInvertRgn@8 -NtGdiLineTo@12 -NtGdiMakeFontDir@20 -NtGdiMakeInfoDC@8 -NtGdiMaskBlt@52 -NtGdiModifyWorldTransform@12 -NtGdiMonoBitmap@4 -NtGdiMoveTo@16 -NtGdiOffsetClipRgn@12 -NtGdiOffsetRgn@12 -NtGdiOpenDCW@28 -NtGdiPatBlt@24 -NtGdiPolyPatBlt@20 -NtGdiPathToRegion@4 -NtGdiPlgBlt@44 -NtGdiPolyDraw@16 -NtGdiPolyPolyDraw@20 -NtGdiPolyTextOutW@16 -NtGdiPtInRegion@12 -NtGdiPtVisible@12 -NtGdiQueryFonts@12 -NtGdiQueryFontAssocInfo@4 -NtGdiRectangle@20 -NtGdiRectInRegion@8 -NtGdiRectVisible@8 -NtGdiRemoveFontResourceW@24 -NtGdiRemoveFontMemResourceEx@4 -NtGdiResetDC@20 -NtGdiResizePalette@8 -NtGdiRestoreDC@8 -NtGdiRoundRect@28 -NtGdiSaveDC@4 -NtGdiScaleViewportExtEx@24 -NtGdiScaleWindowExtEx@24 -NtGdiSelectBitmap@8 -NtGdiSelectBrush@8 -NtGdiSelectClipPath@8 -NtGdiSelectFont@8 -NtGdiSelectPen@8 -NtGdiSetBitmapAttributes@8 -NtGdiSetBitmapBits@12 -NtGdiSetBitmapDimension@16 -NtGdiSetBoundsRect@12 -NtGdiSetBrushAttributes@8 -NtGdiSetBrushOrg@16 -NtGdiSetColorAdjustment@8 -NtGdiSetColorSpace@8 -NtGdiSetDeviceGammaRamp@8 -NtGdiSetDIBitsToDeviceInternal@64 -NtGdiSetFontEnumeration@4 -NtGdiSetFontXform@12 -NtGdiSetIcmMode@12 -NtGdiSetLinkedUFIs@12 -NtGdiSetMagicColors@12 -NtGdiSetMetaRgn@4 -NtGdiSetMiterLimit@12 -NtGdiGetDeviceWidth@4 -NtGdiMirrorWindowOrg@4 -NtGdiSetLayout@12 -NtGdiSetPixel@16 -NtGdiSetPixelFormat@8 -NtGdiSetRectRgn@20 -NtGdiSetSystemPaletteUse@8 -NtGdiSetTextJustification@12 -NtGdiSetupPublicCFONT@12 -NtGdiSetVirtualResolution@20 -NtGdiSetSizeDevice@12 -NtGdiStartDoc@16 -NtGdiStartPage@4 -NtGdiStretchBlt@48 -NtGdiStretchDIBitsInternal@64 -NtGdiStrokeAndFillPath@4 -NtGdiStrokePath@4 -NtGdiSwapBuffers@4 -NtGdiTransformPoints@20 -NtGdiTransparentBlt@44 -NtGdiUnloadPrinterDriver@8 -NtGdiUnmapMemFont@4 -NtGdiUnrealizeObject@4 -NtGdiUpdateColors@4 -NtGdiWidenPath@4 -NtUserActivateKeyboardLayout@8 -NtUserAlterWindowStyle@12 -NtUserAssociateInputContext@12 -NtUserAttachThreadInput@12 -NtUserBeginPaint@8 -NtUserBitBltSysBmp@32 -NtUserBlockInput@4 -NtUserBuildHimcList@16 -NtUserBuildHwndList@28 -NtUserBuildNameList@16 -NtUserBuildPropList@16 -NtUserCallHwnd@8 -NtUserCallHwndLock@8 -NtUserCallHwndOpt@8 -NtUserCallHwndParam@12 -NtUserCallHwndParamLock@12 -NtUserCallMsgFilter@8 -NtUserCallNextHookEx@16 -NtUserCallNoParam@4 -NtUserCallOneParam@8 -NtUserCallTwoParam@12 -NtUserChangeClipboardChain@8 -NtUserChangeDisplaySettings@20 -NtUserCheckImeHotKey@8 -NtUserCheckMenuItem@12 -NtUserChildWindowFromPointEx@16 -NtUserClipCursor@4 -NtUserCloseClipboard@0 -NtUserCloseDesktop@4 -NtUserCloseWindowStation@4 -NtUserConsoleControl@12 -NtUserConvertMemHandle@8 -NtUserCopyAcceleratorTable@12 -NtUserCountClipboardFormats@0 -NtUserCreateAcceleratorTable@8 -NtUserCreateCaret@16 -NtUserCreateDesktop@20 -NtUserCreateInputContext@4 -NtUserCreateLocalMemHandle@16 -NtUserCreateWindowEx@60 -NtUserCreateWindowStation@28 -NtUserDdeGetQualityOfService@12 -NtUserDdeInitialize@20 -NtUserDdeSetQualityOfService@12 -NtUserDeferWindowPos@32 -NtUserDefSetText@8 -NtUserDeleteMenu@12 -NtUserDestroyAcceleratorTable@4 -NtUserDestroyCursor@8 -NtUserDestroyInputContext@4 -NtUserDestroyMenu@4 -NtUserDestroyWindow@4 -NtUserDisableThreadIme@4 -NtUserDispatchMessage@4 -NtUserDragDetect@12 -NtUserDragObject@20 -NtUserDrawAnimatedRects@16 -NtUserDrawCaption@16 -NtUserDrawCaptionTemp@28 -NtUserDrawIconEx@44 -NtUserDrawMenuBarTemp@20 -NtUserEmptyClipboard@0 -NtUserEnableMenuItem@12 -NtUserEnableScrollBar@12 -NtUserEndDeferWindowPosEx@8 -NtUserEndMenu@0 -NtUserEndPaint@8 -NtUserEnumDisplayDevices@16 -NtUserEnumDisplayMonitors@16 -NtUserEnumDisplaySettings@16 -NtUserEvent@4 -NtUserExcludeUpdateRgn@8 -NtUserFillWindow@16 -NtUserFindExistingCursorIcon@12 -NtUserFindWindowEx@20 -NtUserFlashWindowEx@4 -NtUserGetAltTabInfo@24 -NtUserGetAncestor@8 -NtUserGetAppImeLevel@4 -NtUserGetAsyncKeyState@4 -NtUserGetAtomName@8 -NtUserGetCaretBlinkTime@0 -NtUserGetCaretPos@4 -NtUserGetClassInfo@20 -NtUserGetClassName@12 -NtUserGetClipboardData@8 -NtUserGetClipboardFormatName@12 -NtUserGetClipboardOwner@0 -NtUserGetClipboardSequenceNumber@0 -NtUserGetClipboardViewer@0 -NtUserGetClipCursor@4 -NtUserGetComboBoxInfo@8 -NtUserGetControlBrush@12 -NtUserGetControlColor@16 -NtUserGetCPD@12 -NtUserGetCursorFrameInfo@16 -NtUserGetCursorInfo@4 -NtUserGetDC@4 -NtUserGetDCEx@12 -NtUserGetDoubleClickTime@0 -NtUserGetForegroundWindow@0 -NtUserGetGuiResources@8 -NtUserGetGUIThreadInfo@8 -NtUserGetIconInfo@24 -NtUserGetIconSize@16 -NtUserGetImeHotKey@16 -NtUserGetImeInfoEx@8 -NtUserGetInternalWindowPos@12 -NtUserGetKeyboardLayoutList@8 -NtUserGetKeyboardLayoutName@4 -NtUserGetKeyboardState@4 -NtUserGetKeyNameText@12 -NtUserGetKeyState@4 -NtUserGetListBoxInfo@4 -NtUserGetMenuBarInfo@16 -NtUserGetMenuIndex@8 -NtUserGetMenuItemRect@16 -NtUserGetMessage@16 -NtUserGetMouseMovePointsEx@20 -NtUserGetObjectInformation@20 -NtUserGetOpenClipboardWindow@0 -NtUserGetPriorityClipboardFormat@8 -NtUserGetProcessWindowStation@0 -NtUserGetRawInputBuffer@12 -NtUserGetRawInputData@20 -NtUserGetRawInputDeviceInfo@16 -NtUserGetRawInputDeviceList@12 -NtUserGetRegisteredRawInputDevices@12 -NtUserGetScrollBarInfo@12 -NtUserGetSystemMenu@8 -NtUserGetThreadDesktop@8 -NtUserGetThreadState@4 -NtUserGetTitleBarInfo@8 -NtUserGetUpdateRect@12 -NtUserGetUpdateRgn@12 -NtUserGetWindowDC@4 -NtUserGetWindowPlacement@8 -NtUserGetWOWClass@8 -NtUserHardErrorControl@12 -NtUserHideCaret@4 -NtUserHiliteMenuItem@16 -NtUserImpersonateDdeClientWindow@8 -NtUserInitialize@12 -NtUserInitializeClientPfnArrays@16 -NtUserInitTask@48 -NtUserInternalGetWindowText@12 -NtUserInvalidateRect@12 -NtUserInvalidateRgn@12 -NtUserIsClipboardFormatAvailable@4 -NtUserKillTimer@8 -NtUserLoadKeyboardLayoutEx@28 -NtUserLockWindowStation@4 -NtUserLockWindowUpdate@4 -NtUserLockWorkStation@0 -NtUserMapVirtualKeyEx@16 -NtUserMenuItemFromPoint@16 -NtUserMessageCall@28 -NtUserMinMaximize@12 -NtUserMNDragLeave@0 -NtUserMNDragOver@8 -NtUserModifyUserStartupInfoFlags@8 -NtUserMoveWindow@24 -NtUserNotifyIMEStatus@12 -NtUserNotifyProcessCreate@16 -NtUserNotifyWinEvent@16 -NtUserOpenClipboard@8 -NtUserOpenDesktop@12 -NtUserOpenInputDesktop@12 -NtUserOpenWindowStation@8 -NtUserPaintDesktop@4 -NtUserPeekMessage@20 -NtUserPostMessage@16 -NtUserPostThreadMessage@16 -NtUserPrintWindow@12 -NtUserProcessConnect@12 -NtUserQueryInformationThread@20 -NtUserQueryInputContext@8 -NtUserQuerySendMessage@4 -NtUserQueryUserCounters@20 -NtUserQueryWindow@8 -NtUserRealChildWindowFromPoint@12 -NtUserRealInternalGetMessage@24 -NtUserRealWaitMessageEx@8 -NtUserRedrawWindow@16 -NtUserRegisterClassExWOW@28 -NtUserRegisterUserApiHook@8 -NtUserRegisterHotKey@16 -NtUserRegisterRawInputDevices@12 -NtUserRegisterTasklist@4 -NtUserRegisterWindowMessage@4 -NtUserRemoveMenu@12 -NtUserRemoveProp@8 -NtUserResolveDesktop@16 -NtUserResolveDesktopForWOW@4 -NtUserSBGetParms@16 -NtUserScrollDC@28 -NtUserScrollWindowEx@32 -NtUserSelectPalette@12 -NtUserSendInput@12 -NtUserSetActiveWindow@4 -NtUserSetAppImeLevel@8 -NtUserSetCapture@4 -NtUserSetClassLong@16 -NtUserSetClassWord@12 -NtUserSetClipboardData@12 -NtUserSetClipboardViewer@4 -NtUserSetConsoleReserveKeys@8 -NtUserSetCursor@4 -NtUserSetCursorContents@8 -NtUserSetCursorIconData@16 -NtUserSetDbgTag@8 -NtUserSetFocus@4 -NtUserSetImeHotKey@20 -NtUserSetImeInfoEx@4 -NtUserSetImeOwnerWindow@8 -NtUserSetInformationProcess@16 -NtUserSetInformationThread@16 -NtUserSetInternalWindowPos@16 -NtUserSetKeyboardState@4 -NtUserSetLogonNotifyWindow@4 -NtUserSetMenu@12 -NtUserSetMenuContextHelpId@8 -NtUserSetMenuDefaultItem@12 -NtUserSetMenuFlagRtoL@4 -NtUserSetObjectInformation@16 -NtUserSetParent@8 -NtUserSetProcessWindowStation@4 -NtUserSetProp@12 -NtUserSetRipFlags@8 -NtUserSetScrollInfo@16 -NtUserSetShellWindowEx@8 -NtUserSetSysColors@16 -NtUserSetSystemCursor@8 -NtUserSetSystemMenu@8 -NtUserSetSystemTimer@16 -NtUserSetThreadDesktop@4 -NtUserSetThreadLayoutHandles@8 -NtUserSetThreadState@8 -NtUserSetTimer@16 -NtUserSetWindowFNID@8 -NtUserSetWindowLong@16 -NtUserSetWindowPlacement@8 -NtUserSetWindowPos@28 -NtUserSetWindowRgn@12 -NtUserSetWindowsHookAW@12 -NtUserSetWindowsHookEx@24 -NtUserSetWindowStationUser@16 -NtUserSetWindowWord@12 -NtUserSetWinEventHook@32 -NtUserShowCaret@4 -NtUserShowScrollBar@12 -NtUserShowWindow@8 -NtUserShowWindowAsync@8 -NtUserSoundSentry@0 -NtUserSwitchDesktop@4 -NtUserSystemParametersInfo@16 -NtUserTestForInteractiveUser@4 -NtUserThunkedMenuInfo@8 -NtUserThunkedMenuItemInfo@24 -NtUserToUnicodeEx@28 -NtUserTrackMouseEvent@4 -NtUserTrackPopupMenuEx@24 -NtUserCalcMenuBar@20 -NtUserPaintMenuBar@24 -NtUserTranslateAccelerator@12 -NtUserTranslateMessage@8 -NtUserUnhookWindowsHookEx@4 -NtUserUnhookWinEvent@4 -NtUserUnloadKeyboardLayout@4 -NtUserUnlockWindowStation@4 -NtUserUnregisterClass@12 -NtUserUnregisterUserApiHook@0 -NtUserUnregisterHotKey@8 -NtUserUpdateInputContext@12 -NtUserUpdateInstance@12 -NtUserUpdateLayeredWindow@36 -NtUserGetLayeredWindowAttributes@16 -NtUserSetLayeredWindowAttributes@16 -NtUserUpdatePerUserSystemParameters@8 -NtUserUserHandleGrantAccess@12 -NtUserValidateHandleSecure@8 -NtUserValidateRect@8 -NtUserValidateTimerCallback@12 -NtUserVkKeyScanEx@12 -NtUserWaitForInputIdle@12 -NtUserWaitForMsgAndEvent@4 -NtUserWaitMessage@0 -NtUserWin32PoolAllocationStats@24 -NtUserWindowFromPoint@8 -NtUserYieldTask@0 -NtUserRemoteConnect@12 -NtUserRemoteRedrawRectangle@16 -NtUserRemoteRedrawScreen@0 -NtUserRemoteStopScreenUpdates@0 -NtUserCtxDisplayIOCtl@12 -NtGdiEngAssociateSurface@12 -NtGdiEngCreateBitmap@24 -NtGdiEngCreateDeviceSurface@16 -NtGdiEngCreateDeviceBitmap@16 -NtGdiEngCreatePalette@24 -NtGdiEngComputeGlyphSet@12 -NtGdiEngCopyBits@24 -NtGdiEngDeletePalette@4 -NtGdiEngDeleteSurface@4 -NtGdiEngEraseSurface@12 -NtGdiEngUnlockSurface@4 -NtGdiEngLockSurface@4 -NtGdiEngBitBlt@44 -NtGdiEngStretchBlt@44 -NtGdiEngPlgBlt@44 -NtGdiEngMarkBandingSurface@4 -NtGdiEngStrokePath@32 -NtGdiEngFillPath@28 -NtGdiEngStrokeAndFillPath@40 -NtGdiEngPaint@20 -NtGdiEngLineTo@36 -NtGdiEngAlphaBlend@28 -NtGdiEngGradientFill@40 -NtGdiEngTransparentBlt@32 -NtGdiEngTextOut@40 -NtGdiEngStretchBltROP@52 -NtGdiXLATEOBJ_cGetPalette@16 -NtGdiXLATEOBJ_iXlate@8 -NtGdiXLATEOBJ_hGetColorTransform@4 -NtGdiCLIPOBJ_bEnum@12 -NtGdiCLIPOBJ_cEnumStart@20 -NtGdiCLIPOBJ_ppoGetPath@4 -NtGdiEngDeletePath@4 -NtGdiEngCreateClip@0 -NtGdiEngDeleteClip@4 -NtGdiBRUSHOBJ_ulGetBrushColor@4 -NtGdiBRUSHOBJ_pvAllocRbrush@8 -NtGdiBRUSHOBJ_pvGetRbrush@4 -NtGdiBRUSHOBJ_hGetColorTransform@4 -NtGdiXFORMOBJ_bApplyXform@20 -NtGdiXFORMOBJ_iGetXform@8 -NtGdiFONTOBJ_vGetInfo@12 -NtGdiFONTOBJ_pxoGetXform@4 -NtGdiFONTOBJ_cGetGlyphs@20 -NtGdiFONTOBJ_pifi@4 -NtGdiFONTOBJ_pfdg@4 -NtGdiFONTOBJ_pQueryGlyphAttrs@8 -NtGdiFONTOBJ_pvTrueTypeFontFile@8 -NtGdiFONTOBJ_cGetAllGlyphHandles@8 -NtGdiSTROBJ_bEnum@12 -NtGdiSTROBJ_bEnumPositionsOnly@12 -NtGdiSTROBJ_bGetAdvanceWidths@16 -NtGdiSTROBJ_vEnumStart@4 -NtGdiSTROBJ_dwGetCodePage@4 -NtGdiPATHOBJ_vGetBounds@8 -NtGdiPATHOBJ_bEnum@8 -NtGdiPATHOBJ_vEnumStart@4 -NtGdiPATHOBJ_vEnumStartClipLines@16 -NtGdiPATHOBJ_bEnumClipLines@12 -NtGdiGetDhpdev@4 -NtGdiEngCheckAbort@4 -NtGdiHT_Get8BPPFormatPalette@16 -NtGdiHT_Get8BPPMaskPalette@24 -NtGdiUpdateTransform@4 -NtGdiSetPUMPDOBJ@16 -NtGdiBRUSHOBJ_DeleteRbrush@8 -NtGdiUMPDEngFreeUserMem@4 -NtGdiUnmapMemFont@4 -NtGdiDrawStream@12 - diff --git a/rostests/apitests/w32kdll/w32kdll_xpsp2/w32kdll_xpsp2.rbuild b/rostests/apitests/w32kdll/w32kdll_xpsp2/w32kdll_xpsp2.rbuild deleted file mode 100644 index d3467c48582..00000000000 --- a/rostests/apitests/w32kdll/w32kdll_xpsp2/w32kdll_xpsp2.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - - w32kdll_xpsp2.S - main.c - diff --git a/rostests/apitests/w32knapi/CMakeLists.txt b/rostests/apitests/w32knapi/CMakeLists.txt deleted file mode 100644 index 77dd4528800..00000000000 --- a/rostests/apitests/w32knapi/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ - -add_definitions(-D_DLL -D__USE_CRTIMP) - -set_rc_compiler() - -list(APPEND SOURCE - osver.c - testlist.c - w32knapi.c - w32knapi.rc) - -add_executable(w32knapi ${SOURCE}) -target_link_libraries(w32knapi apitest) -set_module_type(w32knapi win32cui) -add_importlibs(w32knapi w32kdll_ros gdi32 user32 shell32 advapi32 msvcrt kernel32 ntdll) diff --git a/rostests/apitests/w32knapi/ntdd/NtGdiDdCreateDirectDrawObject.c b/rostests/apitests/w32knapi/ntdd/NtGdiDdCreateDirectDrawObject.c deleted file mode 100644 index 311dc0601d4..00000000000 --- a/rostests/apitests/w32knapi/ntdd/NtGdiDdCreateDirectDrawObject.c +++ /dev/null @@ -1,18 +0,0 @@ - -INT -Test_NtGdiDdCreateDirectDrawObject(PTESTINFO pti) -{ - HANDLE hDirectDraw; - HDC hdc = CreateDCW(L"DISPLAY",NULL,NULL,NULL); - ASSERT(hdc != NULL); - - /* Test ReactX */ - RTEST(NtGdiDdCreateDirectDrawObject(NULL) == NULL); - RTEST((hDirectDraw=NtGdiDdCreateDirectDrawObject(hdc)) != NULL); - - /* Cleanup ReactX setup */ - DeleteDC(hdc); - NtGdiDdDeleteDirectDrawObject(hDirectDraw); - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntdd/NtGdiDdDeleteDirectDrawObject.c b/rostests/apitests/w32knapi/ntdd/NtGdiDdDeleteDirectDrawObject.c deleted file mode 100644 index 8db518d29cc..00000000000 --- a/rostests/apitests/w32knapi/ntdd/NtGdiDdDeleteDirectDrawObject.c +++ /dev/null @@ -1,20 +0,0 @@ - -INT -Test_NtGdiDdDeleteDirectDrawObject(PTESTINFO pti) -{ - HANDLE hDirectDraw; - HDC hdc = CreateDCW(L"DISPLAY",NULL,NULL,NULL); - ASSERT(hdc != NULL); - - /* Test ReactX */ - RTEST(NtGdiDdDeleteDirectDrawObject(NULL) == FALSE); - RTEST((hDirectDraw=NtGdiDdCreateDirectDrawObject(hdc)) != NULL); - ASSERT(hDirectDraw != NULL); - RTEST(NtGdiDdDeleteDirectDrawObject(hDirectDraw) == TRUE); - - /* Cleanup ReactX setup */ - DeleteDC(hdc); - Syscall(L"NtGdiDdDeleteDirectDrawObject", 1, &hDirectDraw); - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntdd/NtGdiDdQueryDirectDrawObject.c b/rostests/apitests/w32knapi/ntdd/NtGdiDdQueryDirectDrawObject.c deleted file mode 100644 index 77476a6d19a..00000000000 --- a/rostests/apitests/w32knapi/ntdd/NtGdiDdQueryDirectDrawObject.c +++ /dev/null @@ -1,791 +0,0 @@ - -/* Note : OsThunkDdQueryDirectDrawObject is the usermode name of NtGdiDdQueryDirectDrawObject - * it lives in d3d8thk.dll and in windows 2000 it doing syscall direcly to win32k.sus - * in windows xp and higher it call to gdi32.dll to DdEntry41 and it doing the syscall - */ -INT -Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti) -{ - HANDLE hDirectDraw = NULL; - DD_HALINFO *pHalInfo = NULL; - DWORD *pCallBackFlags = NULL; - LPD3DNTHAL_CALLBACKS puD3dCallbacks = NULL; - LPD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData = NULL; - PDD_D3DBUFCALLBACKS puD3dBufferCallbacks = NULL; - LPDDSURFACEDESC puD3dTextureFormats = NULL; - DWORD *puNumHeaps = NULL; - VIDEOMEMORY *puvmList = NULL; - DWORD *puNumFourCC = NULL; - DWORD *puFourCC = NULL; - - DD_HALINFO HalInfo; - DD_HALINFO oldHalInfo; - DWORD CallBackFlags[4]; - - D3DNTHAL_CALLBACKS D3dCallbacks; - D3DNTHAL_CALLBACKS oldD3dCallbacks; - - D3DNTHAL_GLOBALDRIVERDATA D3dDriverData; - D3DNTHAL_GLOBALDRIVERDATA oldD3dDriverData; - - DD_D3DBUFCALLBACKS D3dBufferCallbacks; - DD_D3DBUFCALLBACKS oldD3dBufferCallbacks; - - DDSURFACEDESC2 D3dTextureFormats[100]; - DWORD NumHeaps = 0; - VIDEOMEMORY vmList; - //DWORD NumFourCC = 0; - //DWORD FourCC = 0; - DEVMODE devmode; - HDC hdc; - - DWORD dwTextureCounter = 0; - DDSURFACEDESC *myDesc = NULL; - - /* clear data */ - memset(&vmList,0,sizeof(VIDEOMEMORY)); - memset(&D3dTextureFormats,0,sizeof(DDSURFACEDESC)); - memset(&D3dBufferCallbacks,0,sizeof(DD_D3DBUFCALLBACKS)); - memset(&D3dDriverData,0,sizeof(D3DNTHAL_GLOBALDRIVERDATA)); - memset(&D3dCallbacks,0,sizeof(D3DNTHAL_CALLBACKS)); - memset(&HalInfo,0,sizeof(DD_HALINFO)); - memset(CallBackFlags,0,sizeof(DWORD)*3); - - /* Get currenet display mode */ - EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &devmode); - - /* Create hdc that we can use */ - hdc = CreateDCW(L"DISPLAY",NULL,NULL,NULL); - ASSERT(hdc != NULL); - - - /* Create ReactX handle */ - hDirectDraw = (HANDLE) NtGdiDdCreateDirectDrawObject(hdc); - ASSERT(hDirectDraw != NULL); - - /* Start Test ReactX NtGdiDdQueryDirectDrawObject function */ - - /* testing OsThunkDdQueryDirectDrawObject( NULL, .... */ - RTEST(NtGdiDdQueryDirectDrawObject( NULL, pHalInfo, - pCallBackFlags, puD3dCallbacks, - puD3dDriverData, puD3dBufferCallbacks, - puD3dTextureFormats, puNumHeaps, - puvmList, puNumFourCC, - puFourCC) == FALSE); - - RTEST(pHalInfo == NULL); - RTEST(pCallBackFlags == NULL); - RTEST(puD3dCallbacks == NULL); - RTEST(puD3dDriverData == NULL); - RTEST(puD3dBufferCallbacks == NULL); - RTEST(puD3dTextureFormats == NULL); - RTEST(puNumFourCC == NULL); - RTEST(puFourCC == NULL); - RTEST(puNumHeaps == NULL); - RTEST(puvmList == NULL); - - /* testing NtGdiDdQueryDirectDrawObject( hDirectDrawLocal, NULL, .... */ - RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo, - pCallBackFlags, puD3dCallbacks, - puD3dDriverData, puD3dBufferCallbacks, - puD3dTextureFormats, puNumHeaps, - puvmList, puNumFourCC, - puFourCC) == FALSE); - - RTEST(pHalInfo == NULL); - RTEST(pCallBackFlags == NULL); - RTEST(puD3dCallbacks == NULL); - RTEST(puD3dDriverData == NULL); - RTEST(puD3dBufferCallbacks == NULL); - RTEST(puD3dTextureFormats == NULL); - RTEST(puNumFourCC == NULL); - RTEST(puFourCC == NULL); - RTEST(puNumHeaps == NULL); - RTEST(puvmList == NULL); - - /* testing NtGdiDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo, NULL, .... */ - pHalInfo = &HalInfo; - RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo, - pCallBackFlags, puD3dCallbacks, - puD3dDriverData, puD3dBufferCallbacks, - puD3dTextureFormats, puNumHeaps, - puvmList, puNumFourCC, - puFourCC)== FALSE); - - RTEST(pHalInfo != NULL); - ASSERT(pHalInfo != NULL); - - RTEST(pCallBackFlags == NULL); - RTEST(puD3dCallbacks == NULL); - RTEST(puD3dDriverData == NULL); - RTEST(puD3dBufferCallbacks == NULL); - RTEST(puD3dTextureFormats == NULL); - RTEST(puNumFourCC == NULL); - RTEST(puFourCC == NULL); - RTEST(puNumHeaps == NULL); - RTEST(puvmList == NULL); - - if ((pHalInfo->dwSize != sizeof(DD_HALINFO)) && - (pHalInfo->dwSize != sizeof(DD_HALINFO_V4))) - { - RTEST(pHalInfo->dwSize != sizeof(DD_HALINFO)); - ASSERT(pHalInfo->dwSize != sizeof(DD_HALINFO)); - } - - if (pHalInfo->dwSize == sizeof(DD_HALINFO)) - { - /*the offset, in bytes, to primary surface in the display memory */ - /* some graphic card like sis 760 GX, Nvida GF7900GS does not set any offset at all */ - // RTEST(pHalInfo->vmiData.fpPrimary != 0 ); - - /* unsuse always 0 */ - RTEST(pHalInfo->vmiData.dwFlags == 0 ); - - /* Check the res */ - RTEST(pHalInfo->vmiData.dwDisplayWidth == devmode.dmPelsWidth ); - RTEST(pHalInfo->vmiData.dwDisplayHeight == devmode.dmPelsHeight ); - - /* This can never be test for it is who big the line is after it been align displayPitch */ - RTEST(pHalInfo->vmiData.lDisplayPitch != 0); - - RTEST(pHalInfo->vmiData.ddpfDisplay.dwSize == sizeof(DDPIXELFORMAT) ); - ASSERT(pHalInfo->vmiData.ddpfDisplay.dwSize == sizeof(DDPIXELFORMAT)); - - /* We can not check if it DDPF_RGB flags been set for primary surface - * for it can be DDPF_PALETTEINDEXED1,DDPF_PALETTEINDEXED2,DDPF_PALETTEINDEXED4,DDPF_PALETTEINDEXED8, DDPF_PALETTEINDEXEDTO8, DDPF_RGB, DDPF_YUV - */ - RTEST( (pHalInfo->vmiData.ddpfDisplay.dwFlags & (DDPF_PALETTEINDEXED1 | DDPF_PALETTEINDEXED2 | DDPF_PALETTEINDEXED4 | - DDPF_PALETTEINDEXED8 | DDPF_PALETTEINDEXEDTO8 | DDPF_RGB | DDPF_YUV)) != 0); - - - /* No fourcc are use on primary screen */ - RTEST(pHalInfo->vmiData.ddpfDisplay.dwFourCC == 0 ); - - /* Count RGB Bits 8/16/24/32 */ - RTEST(pHalInfo->vmiData.ddpfDisplay.dwRGBBitCount == devmode.dmBitsPerPel ); - - /* The rgb mask can not be detected in user mode, for it can be 15Bpp convert to 16Bpp mode, so we have no way detect correct mask - * But the mask can never be Zero - */ - RTEST(pHalInfo->vmiData.ddpfDisplay.dwRBitMask != 0 ); - RTEST(pHalInfo->vmiData.ddpfDisplay.dwGBitMask != 0 ); - RTEST(pHalInfo->vmiData.ddpfDisplay.dwBBitMask != 0 ); - - /* primary never set the alpha blend mask */ - RTEST(pHalInfo->vmiData.ddpfDisplay.dwRGBAlphaBitMask == 0 ); - - /* This can not be test at usermode it is each hardware drv that fill in it, - * only way to found them is to use this call */ - // pHalInfo->vmiData->dwOffscreenAlign - // pHalInfo->vmiData->dwOverlayAlign - // pHalInfo->vmiData->dwTextureAlign - // pHalInfo->vmiData->dwZBufferAlign - // pHalInfo->vmiData->dwAlphaAlign - - /* the primary display address */ - RTEST( ( (DWORD)pHalInfo->vmiData.pvPrimary & (~0x80000000)) != 0 ); - - /* test see if we got back the pvmList here - * acording msdn vmiData.dwNumHeaps and vmiData.pvmList - * exists for _VIDEOMEMORYINFO but they do not, it reviews - * in ddk and wdk and own testcase - */ - // RTEST(pHalInfo->vmiData.dwNumHeaps != 0 ); - // RTEST(pHalInfo->vmiData.pvmList != 0 ); - - /* Test see if we got any hardware acclartions for 2d or 3d, this always fill in - * that mean we found a bugi drv and dx does not work on this drv - */ - - /* the SIS 760 GX will never fill it in, it is a bugi drv */ - RTEST(pHalInfo->ddCaps.dwSize == sizeof(DDCORECAPS)); - - /* Testing see if we got any hw support for - * This test can fail on video card that does not support 2d/overlay/3d - */ - RTEST( pHalInfo->ddCaps.dwCaps != 0); - RTEST( pHalInfo->ddCaps.ddsCaps.dwCaps != 0); - - /* This flags is obsolete and should not be used by the driver */ - RTEST( pHalInfo->ddCaps.dwFXAlphaCaps == 0); - - - /* basic dx 2 is found if this flags not set - * if this fail we do not have a dx driver install acodring ms, some version of windows it - * is okay this fail and drv does then only support basic dx - * - */ - if (pHalInfo->dwFlags != 0) - { - RTEST( (pHalInfo->dwFlags & (DDHALINFO_GETDRIVERINFOSET | DDHALINFO_GETDRIVERINFO2)) != 0 ); - RTEST( ( (DWORD)pHalInfo->GetDriverInfo & 0x80000000) != 0 ); - ASSERT( ((DWORD)pHalInfo->GetDriverInfo & 0x80000000) != 0 ); - } - - /* point to kmode direcly to the graphic drv, the drv is kmode and it is kmode address we getting back*/ - - - /* the pHalInfo->ddCaps.ddsCaps.dwCaps & DDSCAPS_3DDEVICE will be ignore, only way detect it proper follow code, - * this will be fill in of all drv, it is not only for 3d stuff, this always fill by win32k.sys or dxg.sys depns - * if it windows 2000 or windows xp/2003 - * - * point to kmode direcly to the win32k.sys, win32k.sys is kmode and it is kmode address we getting back - */ - RTEST( ( (DWORD)pHalInfo->lpD3DGlobalDriverData & (~0x80000000)) != 0 ); - RTEST( ( (DWORD)pHalInfo->lpD3DHALCallbacks & (~0x80000000)) != 0 ); - RTEST( ( (DWORD)pHalInfo->lpD3DHALCallbacks & (~0x80000000)) != 0 ); - } - - /* Backup DD_HALINFO so we do not need resting it */ - RtlCopyMemory(&oldHalInfo, &HalInfo, sizeof(DD_HALINFO)); - - /* testing NtGdiDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo, pCallBackFlags, NULL, .... */ - pHalInfo = &HalInfo; - pCallBackFlags = CallBackFlags; - RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO)); - - RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo, - pCallBackFlags, puD3dCallbacks, - puD3dDriverData, puD3dBufferCallbacks, - puD3dTextureFormats, puNumHeaps, - puvmList, puNumFourCC, - puFourCC)== FALSE); - RTEST(pHalInfo != NULL); - ASSERT(pHalInfo != NULL); - - RTEST(pCallBackFlags != NULL); - ASSERT(pCallBackFlags != NULL); - - RTEST(puD3dCallbacks == NULL); - RTEST(puD3dDriverData == NULL); - RTEST(puD3dBufferCallbacks == NULL); - RTEST(puD3dTextureFormats == NULL); - RTEST(puNumFourCC == NULL); - RTEST(puFourCC == NULL); - RTEST(puNumHeaps == NULL); - RTEST(puvmList == NULL); - - /* We do not retesting DD_HALINFO, instead we compare it */ - RTEST(memcmp(&oldHalInfo, pHalInfo, sizeof(DD_HALINFO)) == 0); - - /* Rember on some nivida drv the pCallBackFlags will not be set even they api exists in the drv - * known workaround is to check if the drv really return a kmode pointer for the drv functions - * we want to use. - */ - RTEST(pCallBackFlags[0] != 0); - RTEST(pCallBackFlags[1] != 0); - RTEST(pCallBackFlags[2] == 0); - - /* testing NtGdiDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo, pCallBackFlags, D3dCallbacks, NULL, .... */ - pHalInfo = &HalInfo; - pCallBackFlags = CallBackFlags; - puD3dCallbacks = &D3dCallbacks; - - RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO)); - RtlZeroMemory(pCallBackFlags,sizeof(DWORD)*3); - - RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo, - pCallBackFlags, puD3dCallbacks, - puD3dDriverData, puD3dBufferCallbacks, - puD3dTextureFormats, puNumHeaps, - puvmList, puNumFourCC, - puFourCC)== FALSE); - RTEST(pHalInfo != NULL); - ASSERT(pHalInfo != NULL); - - RTEST(pCallBackFlags != NULL); - ASSERT(pCallBackFlags != NULL); - - /* rember puD3dCallbacks shall never return NULL */ - RTEST(puD3dCallbacks != NULL); - ASSERT(puD3dCallbacks != NULL); - - /* the pHalInfo->ddCaps.ddsCaps.dwCaps & DDSCAPS_3DDEVICE will be ignore, only way detect it proper follow code, - * this will be fill in of all drv, it is not only for 3d stuff, this always fill by win32k.sys or dxg.sys depns - * if it windows 2000 or windows xp/2003 - */ - RTEST(puD3dCallbacks->dwSize == sizeof(D3DNTHAL_CALLBACKS)); - - /* Nivda like GF7900GS will not follow ms design rule here, - * ContextDestroyAll must alwyas be NULL for it is not longer inuse in windows 2000 and higher - */ - RTEST(puD3dCallbacks->ContextDestroyAll == NULL); - - /* Nivda like GF7900GS will not follow ms design rule here, - * SceneCapture must alwyas be NULL for it is not longer inuse in windows 2000 and higher - */ - RTEST(puD3dCallbacks->SceneCapture == NULL); - RTEST(puD3dCallbacks->dwReserved10 == 0); - RTEST(puD3dCallbacks->dwReserved11 == 0); - RTEST(puD3dCallbacks->dwReserved22 == 0); - RTEST(puD3dCallbacks->dwReserved23 == 0); - RTEST(puD3dCallbacks->dwReserved == 0); - RTEST(puD3dCallbacks->TextureCreate == NULL); - RTEST(puD3dCallbacks->TextureDestroy == NULL); - RTEST(puD3dCallbacks->TextureSwap == NULL); - RTEST(puD3dCallbacks->TextureGetSurf == NULL); - RTEST(puD3dCallbacks->dwReserved12 == 0); - RTEST(puD3dCallbacks->dwReserved13 == 0); - RTEST(puD3dCallbacks->dwReserved14 == 0); - RTEST(puD3dCallbacks->dwReserved15 == 0); - RTEST(puD3dCallbacks->dwReserved16 == 0); - RTEST(puD3dCallbacks->dwReserved17 == 0); - RTEST(puD3dCallbacks->dwReserved18 == 0); - RTEST(puD3dCallbacks->dwReserved19 == 0); - RTEST(puD3dCallbacks->dwReserved20 == 0); - RTEST(puD3dCallbacks->dwReserved21 == 0); - RTEST(puD3dCallbacks->dwReserved24 == 0); - RTEST(puD3dCallbacks->dwReserved0 == 0); - RTEST(puD3dCallbacks->dwReserved1 == 0); - RTEST(puD3dCallbacks->dwReserved2 == 0); - RTEST(puD3dCallbacks->dwReserved3 == 0); - RTEST(puD3dCallbacks->dwReserved4 == 0); - RTEST(puD3dCallbacks->dwReserved5 == 0); - RTEST(puD3dCallbacks->dwReserved6 == 0); - RTEST(puD3dCallbacks->dwReserved7 == 0); - RTEST(puD3dCallbacks->dwReserved8 == 0); - RTEST(puD3dCallbacks->dwReserved9 == 0); - - /* how detect puD3dCallbacks->ContextCreate and puD3dCallbacks->ContextDestroy shall be set for bugi drv like nivda ? */ - /* pointer direcly to the graphic drv, it is kmode pointer */ - // RTEST( ( (DWORD)puD3dCallbacks->ContextCreate & (~0x80000000)) != 0 ); - // RTEST( ( (DWORD)puD3dCallbacks->ContextDestroy & (~0x80000000)) != 0 ); - - RTEST(puD3dDriverData == NULL); - RTEST(puD3dBufferCallbacks == NULL); - RTEST(puD3dTextureFormats == NULL); - RTEST(puNumFourCC == NULL); - RTEST(puFourCC == NULL); - RTEST(puNumHeaps == NULL); - RTEST(puvmList == NULL); - - /* We do not retesting DD_HALINFO, instead we compare it */ - RTEST(memcmp(&oldHalInfo, pHalInfo, sizeof(DD_HALINFO)) == 0); - RTEST(pCallBackFlags[0] != 0); - RTEST(pCallBackFlags[1] != 0); - RTEST(pCallBackFlags[2] == 0); - - /* Backup D3DNTHAL_CALLBACKS so we do not need resting it */ - RtlCopyMemory(&oldD3dCallbacks, &D3dCallbacks, sizeof(D3DNTHAL_CALLBACKS)); - - -/* testing NtGdiDdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, NULL, */ - pHalInfo = &HalInfo; - pCallBackFlags = CallBackFlags; - puD3dCallbacks = &D3dCallbacks; - puD3dDriverData = &D3dDriverData; - - RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO)); - RtlZeroMemory(pCallBackFlags,sizeof(DWORD)*3); - RtlZeroMemory(puD3dCallbacks,sizeof(D3DNTHAL_CALLBACKS)); - - RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo, - pCallBackFlags, puD3dCallbacks, - puD3dDriverData, puD3dBufferCallbacks, - puD3dTextureFormats, puNumHeaps, - puvmList, puNumFourCC, - puFourCC)== FALSE); - RTEST(pHalInfo != NULL); - ASSERT(pHalInfo != NULL); - - RTEST(pCallBackFlags != NULL); - ASSERT(pCallBackFlags != NULL); - - RTEST(puD3dCallbacks != NULL); - ASSERT(puD3dCallbacks != NULL); - - RTEST(puD3dDriverData != NULL); - ASSERT(puD3dDriverData != NULL); - - RTEST(puD3dBufferCallbacks == NULL); - RTEST(puD3dTextureFormats == NULL); - RTEST(puNumFourCC == NULL); - RTEST(puFourCC == NULL); - RTEST(puNumHeaps == NULL); - RTEST(puvmList == NULL); - - /* We retesting pCallBackFlags */ - RTEST(pCallBackFlags[0] != 0); - RTEST(pCallBackFlags[1] != 0); - RTEST(pCallBackFlags[2] == 0); - - /* We do not retesting instead we compare it */ - RTEST(memcmp(&oldHalInfo, pHalInfo, sizeof(DD_HALINFO)) == 0); - RTEST(memcmp(&oldD3dCallbacks, puD3dCallbacks, sizeof(D3DNTHAL_CALLBACKS)) == 0); - - /* start test of puD3dDriverData */ - - RTEST(puD3dDriverData->dwSize == sizeof(D3DNTHAL_GLOBALDRIVERDATA)); - RTEST(puD3dDriverData->hwCaps.dwSize == sizeof(D3DNTHALDEVICEDESC_V1)); - RTEST(puD3dDriverData->hwCaps.dtcTransformCaps.dwSize == sizeof(D3DTRANSFORMCAPS)); - RTEST(puD3dDriverData->hwCaps.dlcLightingCaps.dwSize == sizeof(D3DLIGHTINGCAPS)); - RTEST(puD3dDriverData->hwCaps.dpcLineCaps.dwSize == sizeof(D3DPRIMCAPS)); - RTEST(puD3dDriverData->hwCaps.dpcTriCaps.dwSize == sizeof(D3DPRIMCAPS)); - RTEST(puD3dDriverData->hwCaps.dwMaxBufferSize == 0); - RTEST(puD3dDriverData->hwCaps.dwMaxVertexCount == 0); - - /* Backup D3DHAL_GLOBALDRIVERDATA so we do not need resting it */ - RtlCopyMemory(&oldD3dDriverData, &D3dDriverData, sizeof(D3DNTHAL_GLOBALDRIVERDATA)); - -/* testing NtGdiDdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL, */ - pHalInfo = &HalInfo; - pCallBackFlags = CallBackFlags; - puD3dCallbacks = &D3dCallbacks; - puD3dDriverData = &D3dDriverData; - puD3dBufferCallbacks = &D3dBufferCallbacks; - - RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO)); - RtlZeroMemory(pCallBackFlags,sizeof(DWORD)*3); - RtlZeroMemory(puD3dCallbacks,sizeof(D3DNTHAL_CALLBACKS)); - RtlZeroMemory(puD3dDriverData,sizeof(D3DNTHAL_CALLBACKS)); - - RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo, - pCallBackFlags, puD3dCallbacks, - puD3dDriverData, puD3dBufferCallbacks, - puD3dTextureFormats, puNumHeaps, - puvmList, puNumFourCC, - puFourCC)== FALSE); - RTEST(pHalInfo != NULL); - RTEST(pCallBackFlags != NULL); - - if (pHalInfo->ddCaps.ddsCaps.dwCaps & DDSCAPS_3DDEVICE ) - { - RTEST(puD3dCallbacks != NULL); - RTEST(puD3dDriverData != NULL); - RTEST(puD3dBufferCallbacks != NULL); - } - - RTEST(pHalInfo != NULL); - ASSERT(pHalInfo != NULL); - - RTEST(pCallBackFlags != NULL); - ASSERT(pCallBackFlags != NULL); - - RTEST(puD3dCallbacks != NULL); - ASSERT(puD3dCallbacks != NULL); - - RTEST(puD3dDriverData != NULL); - ASSERT(puD3dDriverData != NULL); - - RTEST(puD3dBufferCallbacks != NULL); - ASSERT(puD3dDriverData != NULL); - - RTEST(puD3dTextureFormats == NULL); - RTEST(puNumFourCC == NULL); - RTEST(puFourCC == NULL); - RTEST(puNumHeaps == NULL); - RTEST(puvmList == NULL); - - /* We retesting the flags */ - RTEST(pCallBackFlags[0] != 0); - RTEST(pCallBackFlags[1] != 0); - RTEST(pCallBackFlags[2] == 0); - - /* We do not retesting instead we compare it */ - RTEST(memcmp(&oldHalInfo, pHalInfo, sizeof(DD_HALINFO)) == 0); - RTEST(memcmp(&oldD3dCallbacks, puD3dCallbacks, sizeof(D3DNTHAL_CALLBACKS)) == 0); - RTEST(memcmp(&oldD3dDriverData, puD3dDriverData, sizeof(D3DNTHAL_GLOBALDRIVERDATA)) == 0); - - /* start test of puD3dBufferCallbacks */ - RTEST(puD3dBufferCallbacks->dwSize == sizeof(DD_D3DBUFCALLBACKS)); - if (puD3dBufferCallbacks->dwFlags & DDHAL_D3DBUFCB32_CANCREATED3DBUF) - { - /* point to kmode direcly to the graphic drv, the drv is kmode and it is kmode address we getting back*/ - RTEST( ( (DWORD)puD3dBufferCallbacks->CanCreateD3DBuffer & (~0x80000000)) != 0 ); - } - else - { - RTEST( puD3dBufferCallbacks->CanCreateD3DBuffer == NULL); - } - - if (puD3dBufferCallbacks->dwFlags & DDHAL_D3DBUFCB32_CREATED3DBUF) - { - /* point to kmode direcly to the graphic drv, the drv is kmode and it is kmode address we getting back*/ - RTEST( ( (DWORD)puD3dBufferCallbacks->CreateD3DBuffer & (~0x80000000)) != 0 ); - } - else - { - RTEST( puD3dBufferCallbacks->CreateD3DBuffer == NULL); - } - - if (puD3dBufferCallbacks->dwFlags & DDHAL_D3DBUFCB32_DESTROYD3DBUF) - { - /* point to kmode direcly to the graphic drv, the drv is kmode and it is kmode address we getting back*/ - RTEST( ( (DWORD)puD3dBufferCallbacks->DestroyD3DBuffer & (~0x80000000)) != 0 ); - } - else - { - RTEST( puD3dBufferCallbacks->DestroyD3DBuffer == NULL); - } - - if (puD3dBufferCallbacks->dwFlags & DDHAL_D3DBUFCB32_LOCKD3DBUF) - { - /* point to kmode direcly to the graphic drv, the drv is kmode and it is kmode address we getting back*/ - RTEST( ( (DWORD)puD3dBufferCallbacks->LockD3DBuffer & (~0x80000000)) != 0 ); - } - else - { - RTEST( puD3dBufferCallbacks->LockD3DBuffer == NULL); - } - - if (puD3dBufferCallbacks->dwFlags & DDHAL_D3DBUFCB32_UNLOCKD3DBUF) - { - /* point to kmode direcly to the graphic drv, the drv is kmode and it is kmode address we getting back*/ - RTEST( ( (DWORD)puD3dBufferCallbacks->UnlockD3DBuffer & (~0x80000000)) != 0 ); - } - else - { - RTEST( puD3dBufferCallbacks->UnlockD3DBuffer == NULL); - } - - /* Backup DD_D3DBUFCALLBACKS so we do not need resting it */ - RtlCopyMemory(&oldD3dBufferCallbacks, &D3dBufferCallbacks, sizeof(DD_D3DBUFCALLBACKS)); - - -/* testing NtGdiDdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, */ - pHalInfo = &HalInfo; - pCallBackFlags = CallBackFlags; - puD3dCallbacks = &D3dCallbacks; - puD3dDriverData = &D3dDriverData; - puD3dBufferCallbacks = &D3dBufferCallbacks; - - /* It is forbein to return a DDSURFACEDESC2 it should always be DDSURFACEDESC - This is only for detected bad drivers that does not follow the rules, if they - does not follow tthe rules, not everthing being copy then in gdi32.dll - gdi32.dll always assume it is DDSURFACEDESC size - */ - if (puD3dDriverData->dwNumTextureFormats != 0) - { - puD3dTextureFormats = malloc (puD3dDriverData->dwNumTextureFormats * sizeof(DDSURFACEDESC2)); - } - - RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO)); - RtlZeroMemory(pCallBackFlags,sizeof(DWORD)*3); - RtlZeroMemory(puD3dCallbacks,sizeof(D3DNTHAL_CALLBACKS)); - RtlZeroMemory(puD3dDriverData,sizeof(D3DNTHAL_GLOBALDRIVERDATA)); - RtlZeroMemory(&D3dBufferCallbacks,sizeof(DD_D3DBUFCALLBACKS)); - - RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo, - pCallBackFlags, puD3dCallbacks, - puD3dDriverData, puD3dBufferCallbacks, - puD3dTextureFormats, puNumHeaps, - puvmList, puNumFourCC, - puFourCC)== FALSE); - - RTEST(pHalInfo != NULL); - ASSERT(pHalInfo != NULL); - - RTEST(pCallBackFlags != NULL); - ASSERT(pCallBackFlags != NULL); - - RTEST(puD3dCallbacks != NULL); - ASSERT(puD3dCallbacks != NULL); - - RTEST(puD3dDriverData != NULL); - ASSERT(puD3dDriverData != NULL); - - RTEST(puD3dBufferCallbacks != NULL); - ASSERT(puD3dDriverData != NULL); - - RTEST(puD3dTextureFormats != NULL); - ASSERT(puD3dTextureFormats != NULL); - - RTEST(puNumFourCC == NULL); - RTEST(puFourCC == NULL); - RTEST(puNumHeaps == NULL); - RTEST(puvmList == NULL); - - /* We retesting the flags */ - RTEST(pCallBackFlags[0] != 0); - RTEST(pCallBackFlags[1] != 0); - RTEST(pCallBackFlags[2] == 0); - - /* We do not retesting instead we compare it */ - RTEST(memcmp(&oldHalInfo, pHalInfo, sizeof(DD_HALINFO)) == 0); - RTEST(memcmp(&oldD3dCallbacks, puD3dCallbacks, sizeof(D3DNTHAL_CALLBACKS)) == 0); - RTEST(memcmp(&oldD3dDriverData, puD3dDriverData, sizeof(D3DNTHAL_GLOBALDRIVERDATA)) == 0); - RTEST(memcmp(&oldD3dBufferCallbacks, puD3dBufferCallbacks, sizeof(DD_D3DBUFCALLBACKS)) == 0); - - /* start test of dwNumTextureFormats */ - if (puD3dDriverData->dwNumTextureFormats != 0) - { - myDesc = puD3dTextureFormats; - for (dwTextureCounter=0;dwTextureCounterdwNumTextureFormats;dwTextureCounter++) - { - RTEST(myDesc->dwSize == sizeof(DDSURFACEDESC)) - ASSERT(myDesc->dwSize == sizeof(DDSURFACEDESC)); - - RTEST( (myDesc->dwFlags & (~(DDSD_CAPS|DDSD_PIXELFORMAT))) == 0); - RTEST(myDesc->dwHeight == 0); - RTEST(myDesc->dwWidth == 0); - RTEST(myDesc->dwLinearSize == 0); - RTEST(myDesc->dwBackBufferCount == 0); - RTEST(myDesc->dwZBufferBitDepth == 0); - RTEST(myDesc->dwAlphaBitDepth == 0); - RTEST(myDesc->dwReserved == 0); - RTEST(myDesc->lpSurface == 0); - RTEST(myDesc->ddckCKDestOverlay.dwColorSpaceLowValue == 0); - RTEST(myDesc->ddckCKDestOverlay.dwColorSpaceHighValue == 0); - RTEST(myDesc->ddckCKDestBlt.dwColorSpaceLowValue == 0); - RTEST(myDesc->ddckCKDestBlt.dwColorSpaceHighValue == 0); - RTEST(myDesc->ddckCKSrcOverlay.dwColorSpaceLowValue == 0); - RTEST(myDesc->ddckCKSrcOverlay.dwColorSpaceHighValue == 0); - RTEST(myDesc->ddckCKSrcBlt.dwColorSpaceLowValue == 0); - RTEST(myDesc->ddckCKSrcBlt.dwColorSpaceHighValue == 0); - RTEST(myDesc->ddpfPixelFormat.dwSize == sizeof(DDPIXELFORMAT)); - RTEST(myDesc->ddpfPixelFormat.dwFlags != 0); - if (myDesc->ddpfPixelFormat.dwFlags & DDPF_FOURCC) - { - RTEST(myDesc->ddpfPixelFormat.dwFourCC != 0); - } - RTEST(myDesc->ddsCaps.dwCaps == DDSCAPS_TEXTURE); - - myDesc = (DDSURFACEDESC *) (((DWORD) myDesc) + sizeof(DDSURFACEDESC)); - } - } - - - /* testing NtGdiDdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, puNumHeaps, NULL, */ - pHalInfo = &HalInfo; - pCallBackFlags = CallBackFlags; - puD3dCallbacks = &D3dCallbacks; - puD3dDriverData = &D3dDriverData; - puD3dBufferCallbacks = &D3dBufferCallbacks; - puNumHeaps = &NumHeaps; - - if (puD3dDriverData->dwNumTextureFormats != 0) - { - RtlZeroMemory(puD3dTextureFormats, puD3dDriverData->dwNumTextureFormats * sizeof(DDSURFACEDESC2)); - } - RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO)); - RtlZeroMemory(pCallBackFlags,sizeof(DWORD)*3); - RtlZeroMemory(puD3dCallbacks,sizeof(D3DNTHAL_CALLBACKS)); - RtlZeroMemory(puD3dDriverData,sizeof(D3DNTHAL_GLOBALDRIVERDATA)); - RtlZeroMemory(&D3dBufferCallbacks,sizeof(DD_D3DBUFCALLBACKS)); - - RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo, - pCallBackFlags, puD3dCallbacks, - puD3dDriverData, puD3dBufferCallbacks, - puD3dTextureFormats, puNumHeaps, - puvmList, puNumFourCC, - puFourCC)== FALSE); - - RTEST(pHalInfo != NULL); - ASSERT(pHalInfo != NULL); - - RTEST(pCallBackFlags != NULL); - ASSERT(pCallBackFlags != NULL); - - RTEST(puD3dCallbacks != NULL); - ASSERT(puD3dCallbacks != NULL); - - RTEST(puD3dDriverData != NULL); - ASSERT(puD3dDriverData != NULL); - - RTEST(puD3dBufferCallbacks != NULL); - ASSERT(puD3dDriverData != NULL); - - RTEST(puD3dTextureFormats != NULL); - ASSERT(puD3dTextureFormats != NULL); - - RTEST(puNumHeaps != NULL); - ASSERT(puNumHeaps != NULL); - RTEST(NumHeaps == 0); - - RTEST(puNumFourCC == NULL); - RTEST(puFourCC == NULL); - - RTEST(puvmList == NULL); - - /* We retesting the flags */ - RTEST(pCallBackFlags[0] != 0); - RTEST(pCallBackFlags[1] != 0); - RTEST(pCallBackFlags[2] == 0); - - /* We do not retesting instead we compare it */ - RTEST(memcmp(&oldHalInfo, pHalInfo, sizeof(DD_HALINFO)) == 0); - RTEST(memcmp(&oldD3dCallbacks, puD3dCallbacks, sizeof(D3DNTHAL_CALLBACKS)) == 0); - RTEST(memcmp(&oldD3dDriverData, puD3dDriverData, sizeof(D3DNTHAL_GLOBALDRIVERDATA)) == 0); - RTEST(memcmp(&oldD3dBufferCallbacks, puD3dBufferCallbacks, sizeof(DD_D3DBUFCALLBACKS)) == 0); - /* we skip resting texture */ - - - /* testing NtGdiDdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, puNumHeaps, puvmList, NULL, */ - pHalInfo = &HalInfo; - pCallBackFlags = CallBackFlags; - puD3dCallbacks = &D3dCallbacks; - puD3dDriverData = &D3dDriverData; - puD3dBufferCallbacks = &D3dBufferCallbacks; - puNumHeaps = &NumHeaps; - puvmList = &vmList; - - if (puD3dDriverData->dwNumTextureFormats != 0) - { - RtlZeroMemory(puD3dTextureFormats, puD3dDriverData->dwNumTextureFormats * sizeof(DDSURFACEDESC2)); - } - RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO)); - RtlZeroMemory(pCallBackFlags,sizeof(DWORD)*3); - RtlZeroMemory(puD3dCallbacks,sizeof(D3DNTHAL_CALLBACKS)); - RtlZeroMemory(puD3dDriverData,sizeof(D3DNTHAL_GLOBALDRIVERDATA)); - RtlZeroMemory(&D3dBufferCallbacks,sizeof(DD_D3DBUFCALLBACKS)); - - RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo, - pCallBackFlags, puD3dCallbacks, - puD3dDriverData, puD3dBufferCallbacks, - puD3dTextureFormats, puNumHeaps, - puvmList, puNumFourCC, - puFourCC)== FALSE); - - RTEST(pHalInfo != NULL); - ASSERT(pHalInfo != NULL); - - RTEST(pCallBackFlags != NULL); - ASSERT(pCallBackFlags != NULL); - - RTEST(puD3dCallbacks != NULL); - ASSERT(puD3dCallbacks != NULL); - - RTEST(puD3dDriverData != NULL); - ASSERT(puD3dDriverData != NULL); - - RTEST(puD3dBufferCallbacks != NULL); - ASSERT(puD3dDriverData != NULL); - - RTEST(puD3dTextureFormats != NULL); - ASSERT(puD3dTextureFormats != NULL); - - RTEST(puNumHeaps != NULL); - ASSERT(puNumHeaps != NULL); - RTEST(NumHeaps == 0); - - RTEST(puvmList != NULL); - - RTEST(puNumFourCC == NULL); - RTEST(puFourCC == NULL); - - - - /* We retesting the flags */ - RTEST(pCallBackFlags[0] != 0); - RTEST(pCallBackFlags[1] != 0); - RTEST(pCallBackFlags[2] == 0); - - /* We do not retesting instead we compare it */ - RTEST(memcmp(&oldHalInfo, pHalInfo, sizeof(DD_HALINFO)) == 0); - RTEST(memcmp(&oldD3dCallbacks, puD3dCallbacks, sizeof(D3DNTHAL_CALLBACKS)) == 0); - RTEST(memcmp(&oldD3dDriverData, puD3dDriverData, sizeof(D3DNTHAL_GLOBALDRIVERDATA)) == 0); - RTEST(memcmp(&oldD3dBufferCallbacks, puD3dBufferCallbacks, sizeof(DD_D3DBUFCALLBACKS)) == 0); - /* we skip resting texture */ - - /* Todo - * adding test for - * puNumFourCC - * puFourCC - */ - - /* Cleanup ReactX setup */ - DeleteDC(hdc); - Syscall(L"NtGdiDdDeleteDirectDrawObject", 1, &hDirectDraw); - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiArcInternal.c b/rostests/apitests/w32knapi/ntgdi/NtGdiArcInternal.c deleted file mode 100644 index 81c0bde21aa..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiArcInternal.c +++ /dev/null @@ -1,36 +0,0 @@ -INT -Test_NtGdiArcInternal(PTESTINFO pti) -{ - HDC hDC = CreateDCW(L"Display",NULL,NULL,NULL); - - SetLastError(ERROR_SUCCESS); - TEST(NtGdiArcInternal(0, 0, 0, 0, 0, 0, 0, 0, 0, 0) == FALSE); - TEST(GetLastError() == ERROR_INVALID_HANDLE); - - SetLastError(ERROR_SUCCESS); - TEST(NtGdiArcInternal(0, hDC, 0, 0, 0, 0, 0, 0, 0, 0) == TRUE); - TEST(NtGdiArcInternal(1, hDC, 0, 0, 0, 0, 0, 0, 0, 0) == TRUE); - TEST(NtGdiArcInternal(2, hDC, 0, 0, 0, 0, 0, 0, 0, 0) == TRUE); - TEST(NtGdiArcInternal(3, hDC, 0, 0, 0, 0, 0, 0, 0, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - - SetLastError(ERROR_SUCCESS); - TEST(NtGdiArcInternal(4, hDC, 0, 0, 0, 0, 0, 0, 0, 0) == FALSE); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - SetLastError(ERROR_SUCCESS); - TEST(NtGdiArcInternal(4, (HDC)10, 0, 0, 0, 0, 0, 0, 0, 0) == FALSE); - TEST(GetLastError() == ERROR_INVALID_HANDLE); - - SetLastError(ERROR_SUCCESS); - TEST(NtGdiArcInternal(0, hDC, 10, 10, 0, 0, 0, 0, 0, 0) == TRUE); - TEST(NtGdiArcInternal(0, hDC, 10, 10, -10, -10, 0, 0, 0, 0) == TRUE); - TEST(NtGdiArcInternal(0, hDC, 0, 0, 0, 0, 10, 0, -10, 0) == TRUE); - -// was passiert, wenn left > right ? einfach tauschen? - - - DeleteDC(hDC); - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiBitBlt.c b/rostests/apitests/w32knapi/ntgdi/NtGdiBitBlt.c deleted file mode 100644 index 81bede314a5..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiBitBlt.c +++ /dev/null @@ -1,109 +0,0 @@ - -INT -Test_NtGdiBitBlt(PTESTINFO pti) -{ - BOOL bRet; - HDC hdc1, hdc2; - HBITMAP hbmp1, hOldBmp1, hbmp2, hOldBmp2; - DWORD bytes1[4] = {0x00ff0000, 0x0000ff00, 0x000000ff, 0x00ffffff}; - DWORD bytes2[4] = {0x00000000, 0x0000000, 0x0000000, 0x00000000}; - - /* Test NULL dc */ - SetLastError(ERROR_SUCCESS); - bRet = NtGdiBitBlt((HDC)0, 0, 0, 10, 10, (HDC)0, 10, 10, SRCCOPY, 0, 0); - TEST(bRet == FALSE); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test invalid dc */ - SetLastError(ERROR_SUCCESS); - bRet = NtGdiBitBlt((HDC)0x123456, 0, 0, 10, 10, (HDC)0x123456, 10, 10, SRCCOPY, 0, 0); - TEST(bRet == FALSE); - TEST(GetLastError() == ERROR_SUCCESS); - - hdc1 = NtGdiCreateCompatibleDC(0); - TEST(hdc1 != NULL); - - hdc2 = NtGdiCreateCompatibleDC(0); - TEST(hdc2 != NULL); - - hbmp1 = NtGdiCreateBitmap(2, 2, 1, 32, (LPBYTE)bytes1 ); - TEST(hbmp1 != NULL); - hOldBmp1 = SelectObject(hdc1, hbmp1); - - TESTX(NtGdiGetPixel(hdc1, 0, 0) == 0x000000ff, "Pixel[0][0] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 0, 0)); - TESTX(NtGdiGetPixel(hdc1, 0, 1) == 0x00ff0000, "Pixel[0][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 0, 1)); - TESTX(NtGdiGetPixel(hdc1, 1, 0) == 0x0000ff00, "Pixel[1][0] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 0)); - TESTX(NtGdiGetPixel(hdc1, 1, 1) == 0x00ffffff, "Pixel[1][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 1)); - - hbmp2 = NtGdiCreateBitmap(2, 2, 1, 32, (LPBYTE)bytes2 ); - TEST(hbmp2 != NULL); - hOldBmp2 = SelectObject(hdc2, hbmp2); - - bRet = NtGdiBitBlt(hdc2, 1, 1, -2, -2, hdc1, 0, 0, SRCCOPY, 0, 0); - TEST(bRet == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TESTX(NtGdiGetPixel(hdc2, 0, 0) == 0x00000000, "Pixel[0][0] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 0, 0)); - TESTX(NtGdiGetPixel(hdc2, 0, 1) == 0x00000000, "Pixel[0][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 0, 1)); - TESTX(NtGdiGetPixel(hdc2, 1, 0) == 0x00000000, "Pixel[1][0] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 0)); - TESTX(NtGdiGetPixel(hdc2, 1, 1) == 0x00000000, "Pixel[1][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 1)); - - bRet = NtGdiBitBlt(hdc2, 1, 1, -2, -2, hdc1, 1, 1, SRCCOPY, 0, 0); - TEST(bRet == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TESTX(NtGdiGetPixel(hdc2, 0, 0) == 0x000000ff, "Pixel[0][0] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 0, 0)); - TESTX(NtGdiGetPixel(hdc2, 0, 1) == 0x00000000, "Pixel[0][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 0, 1)); - TESTX(NtGdiGetPixel(hdc2, 1, 0) == 0x00000000, "Pixel[1][0] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 0)); - TESTX(NtGdiGetPixel(hdc2, 1, 1) == 0x00000000, "Pixel[1][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 1)); - - NtGdiSetPixel(hdc2, 0, 0, 0x00000000); - - bRet = NtGdiBitBlt(hdc2, 1, 1, -2, -2, hdc1, 0, 0, SRCCOPY, 0, 0); - TEST(bRet == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TESTX(NtGdiGetPixel(hdc2, 0, 0) == 0x00000000, "Pixel[0][0] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 0, 0)); - TESTX(NtGdiGetPixel(hdc2, 0, 1) == 0x00000000, "Pixel[0][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 0, 1)); - TESTX(NtGdiGetPixel(hdc2, 1, 0) == 0x00000000, "Pixel[1][0] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 0)); - TESTX(NtGdiGetPixel(hdc2, 1, 1) == 0x00000000, "Pixel[1][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 1)); - - bRet = NtGdiBitBlt(hdc2, 1, 1, -2, -2, hdc1, 2, 2, SRCCOPY, 0, 0); - TEST(bRet == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TESTX(NtGdiGetPixel(hdc2, 0, 0) == 0x00ffffff, "Pixel[0][0] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 0, 0)); - TESTX(NtGdiGetPixel(hdc2, 0, 1) == 0x00000000, "Pixel[0][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 0, 1)); - TESTX(NtGdiGetPixel(hdc2, 1, 0) == 0x00000000, "Pixel[1][0] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 0)); - TESTX(NtGdiGetPixel(hdc2, 1, 1) == 0x00000000, "Pixel[1][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 1)); - - NtGdiSetPixel(hdc2, 0, 0, 0x00000000); - - bRet = NtGdiBitBlt(hdc2, 2, 2, -2, -2, hdc1, 2, 2, SRCCOPY, 0, 0); - TEST(bRet == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TESTX(NtGdiGetPixel(hdc2, 0, 0) == 0x000000ff, "Pixel[0][0] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 0, 0)); - TESTX(NtGdiGetPixel(hdc2, 0, 1) == 0x00ff0000, "Pixel[0][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 0, 1)); - TESTX(NtGdiGetPixel(hdc2, 1, 0) == 0x0000ff00, "Pixel[1][0] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 0)); - TESTX(NtGdiGetPixel(hdc2, 1, 1) == 0x00ffffff, "Pixel[1][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 1)); - - NtGdiSetPixel(hdc2, 0, 0, 0x00000000); - NtGdiSetPixel(hdc2, 1, 0, 0x00000000); - NtGdiSetPixel(hdc2, 0, 1, 0x00000000); - NtGdiSetPixel(hdc2, 1, 1, 0x00000000); - - bRet = NtGdiBitBlt(hdc2, 0, 0, 2, 2, hdc1, 0, 0, SRCCOPY, 0, 0); - TEST(bRet == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TESTX(NtGdiGetPixel(hdc2, 0, 0) == 0x000000ff, "Pixel[0][0] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 0, 0)); - TESTX(NtGdiGetPixel(hdc2, 0, 1) == 0x00ff0000, "Pixel[0][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 0, 1)); - TESTX(NtGdiGetPixel(hdc2, 1, 0) == 0x0000ff00, "Pixel[1][0] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 0)); - TESTX(NtGdiGetPixel(hdc2, 1, 1) == 0x00ffffff, "Pixel[1][1] 0x%08x\n", (UINT)NtGdiGetPixel(hdc2, 1, 1)); - - SelectObject(hdc2, hOldBmp2); - SelectObject(hdc1, hOldBmp1); - - DeleteObject(hbmp2); - DeleteObject(hbmp1); - - DeleteDC(hdc1); - DeleteDC(hdc2); - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiCombineRgn.c b/rostests/apitests/w32knapi/ntgdi/NtGdiCombineRgn.c deleted file mode 100644 index 0b267d33065..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiCombineRgn.c +++ /dev/null @@ -1,49 +0,0 @@ - -INT -Test_NtGdiCombineRgn(PTESTINFO pti) -{ - HRGN hRgnDest, hRgn1, hRgn2; -// test what params are accepted for what operations -// 0? invalid? are params maybe ignored in some cases? -// LastError - - /* Preparation */ - hRgnDest = CreateRectRgn(0,0,1,1); - hRgn1 = CreateRectRgn(1,1,4,4); - hRgn2 = CreateRectRgn(2,2,6,3); - - /* RGN_AND = 1, RGN_OR = 2, RGN_XOR = 3, RGN_DIFF = 4, RGN_COPY = 5 */ - - TEST(NtGdiCombineRgn(hRgnDest, hRgn1, hRgn2, 0) == ERROR); - TEST(NtGdiCombineRgn(hRgnDest, hRgn1, hRgn2, 6) == ERROR); - - SetLastError(ERROR_SUCCESS); - TEST(NtGdiCombineRgn(hRgnDest, 0, 0, RGN_AND) == ERROR); - TEST(GetLastError() == ERROR_INVALID_HANDLE); - SetLastError(ERROR_SUCCESS); - TEST(NtGdiCombineRgn(hRgnDest, hRgn1, 0, RGN_AND) == ERROR); - TEST(GetLastError() == ERROR_INVALID_HANDLE); - SetLastError(ERROR_SUCCESS); - TEST(NtGdiCombineRgn(hRgnDest, 0, hRgn1, RGN_AND) == ERROR); - TEST(GetLastError() == ERROR_INVALID_HANDLE); - SetLastError(ERROR_SUCCESS); - TEST(NtGdiCombineRgn(0, hRgn1, hRgn2, RGN_AND) == ERROR); - TEST(GetLastError() == ERROR_INVALID_HANDLE); - - /* Create intersection */ - TEST(NtGdiCombineRgn(hRgnDest, hRgn1, hRgn2, RGN_AND) == SIMPLEREGION); - SetRectRgn(hRgn1, 2, 2, 4, 3); - TEST(NtGdiCombineRgn(hRgnDest, hRgnDest, hRgn1, RGN_XOR) == NULLREGION); - - /* Create intersection with itself */ - SetRectRgn(hRgnDest, 2, 2, 4, 3); - TEST(NtGdiCombineRgn(hRgnDest, hRgnDest, hRgnDest, RGN_AND) == SIMPLEREGION); - SetRectRgn(hRgn1, 2, 2, 4, 3); - TEST(NtGdiCombineRgn(hRgnDest, hRgnDest, hRgn1, RGN_XOR) == NULLREGION); - - - /* What if 2 regions are the same */ - - return APISTATUS_NORMAL; -} - diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiCreateBitmap.c b/rostests/apitests/w32knapi/ntgdi/NtGdiCreateBitmap.c deleted file mode 100644 index 8700a77be1b..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiCreateBitmap.c +++ /dev/null @@ -1,211 +0,0 @@ -INT -Test_NtGdiCreateBitmap_Params(PTESTINFO pti) -{ - HBITMAP hBmp; - BITMAP bitmap; - BYTE BitmapData[10] = {0x11, 0x22, 0x33}; - - /* Test simple params */ - SetLastError(ERROR_SUCCESS); - TEST((hBmp = NtGdiCreateBitmap(1, 1, 1, 1, NULL)) != NULL); - TEST(GetLastError() == ERROR_SUCCESS); - DeleteObject(hBmp); - - /* Test all zero */ - SetLastError(ERROR_SUCCESS); - TEST(NtGdiCreateBitmap(0, 0, 0, 0, NULL) == NULL); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - /* Test cx == 0 */ - SetLastError(ERROR_SUCCESS); - TEST(NtGdiCreateBitmap(0, 1, 1, 1, NULL) == NULL); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - /* Test negative cx */ - SetLastError(ERROR_SUCCESS); - TEST(NtGdiCreateBitmap(-10, 1, 1, 1, NULL) == NULL); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - /* Test cy == 0 */ - SetLastError(ERROR_SUCCESS); - TEST(NtGdiCreateBitmap(1, 0, 1, 1, NULL) == NULL); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - /* Test negative cy */ - SetLastError(ERROR_SUCCESS); - TEST(NtGdiCreateBitmap(1, -2, 1, 1, NULL) == NULL); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - /* Test negative cy and valid bits */ - SetLastError(ERROR_SUCCESS); - TEST(NtGdiCreateBitmap(1, -2, 1, 1, BitmapData) == NULL); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test negative cy and invalid bits */ - SetLastError(ERROR_SUCCESS); - TEST(NtGdiCreateBitmap(1, -2, 1, 1, (BYTE*)0x80001234) == NULL); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test huge size */ - SetLastError(ERROR_SUCCESS); - TEST(NtGdiCreateBitmap(100000, 100000, 1, 1, NULL) == NULL); - TEST(GetLastError() == ERROR_NOT_ENOUGH_MEMORY); - - /* Test huge size and valid bits */ - SetLastError(ERROR_SUCCESS); - TEST(NtGdiCreateBitmap(1000, 1000, 1, 1, BitmapData) == NULL); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test huge size and invalid bits */ - SetLastError(ERROR_SUCCESS); - TEST(NtGdiCreateBitmap(100000, 100000, 1, 1, (BYTE*)0x80001234) == NULL); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test cPlanes == 0 */ - SetLastError(ERROR_SUCCESS); - TEST((hBmp = NtGdiCreateBitmap(1, 1, 0, 1, NULL)) != NULL); - TEST(GetLastError() == ERROR_SUCCESS); - ASSERT(GetObject(hBmp, sizeof(BITMAP), &bitmap) == sizeof(BITMAP)); - TEST(bitmap.bmType == 0); - TEST(bitmap.bmWidth == 1); - TEST(bitmap.bmHeight == 1); - TEST(bitmap.bmWidthBytes == 2); - TEST(bitmap.bmPlanes == 1); - TEST(bitmap.bmBitsPixel == 1); - DeleteObject(hBmp); - - /* Test big cPlanes */ - SetLastError(ERROR_SUCCESS); - TEST((hBmp = NtGdiCreateBitmap(1, 1, 32, 1, NULL)) != NULL); - TEST(GetLastError() == ERROR_SUCCESS); - DeleteObject(hBmp); - - TEST(NtGdiCreateBitmap(1, 1, 33, 1, NULL) == NULL); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - /* Test cBPP == 0 */ - SetLastError(ERROR_SUCCESS); - TEST((hBmp = NtGdiCreateBitmap(1, 1, 1, 0, NULL)) != NULL); - TEST(GetLastError() == ERROR_SUCCESS); - ASSERT(GetObject(hBmp, sizeof(BITMAP), &bitmap) == sizeof(BITMAP)); - TEST(bitmap.bmType == 0); - TEST(bitmap.bmWidth == 1); - TEST(bitmap.bmHeight == 1); - TEST(bitmap.bmWidthBytes == 2); - TEST(bitmap.bmPlanes == 1); - TEST(bitmap.bmBitsPixel == 1); - DeleteObject(hBmp); - - /* Test negative cBPP */ - SetLastError(ERROR_SUCCESS); - TEST(NtGdiCreateBitmap(1, 1, 1, -1, NULL) == NULL); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - /* Test bad cBPP */ - SetLastError(ERROR_SUCCESS); - TEST((hBmp = NtGdiCreateBitmap(1, 1, 1, 3, NULL)) != NULL); - ASSERT(GetObject(hBmp, sizeof(BITMAP), &bitmap) == sizeof(BITMAP)); - TEST(bitmap.bmBitsPixel == 4); - DeleteObject(hBmp); - - TEST((hBmp = NtGdiCreateBitmap(1, 1, 1, 6, NULL)) != NULL); - ASSERT(GetObject(hBmp, sizeof(BITMAP), &bitmap) == sizeof(BITMAP)); - TEST(bitmap.bmBitsPixel == 8); - DeleteObject(hBmp); - - TEST((hBmp = NtGdiCreateBitmap(1, 1, 1, 15, NULL)) != NULL); - ASSERT(GetObject(hBmp, sizeof(BITMAP), &bitmap) == sizeof(BITMAP)); - TEST(bitmap.bmBitsPixel == 16); - DeleteObject(hBmp); - - TEST((hBmp = NtGdiCreateBitmap(1, 1, 1, 17, NULL)) != NULL); - ASSERT(GetObject(hBmp, sizeof(BITMAP), &bitmap) == sizeof(BITMAP)); - TEST(bitmap.bmBitsPixel == 24); - DeleteObject(hBmp); - - TEST((hBmp = NtGdiCreateBitmap(1, 1, 3, 7, NULL)) != NULL); - ASSERT(GetObject(hBmp, sizeof(BITMAP), &bitmap) == sizeof(BITMAP)); - TEST(bitmap.bmBitsPixel == 24); - DeleteObject(hBmp); - - TEST((hBmp = NtGdiCreateBitmap(1, 1, 1, 25, NULL)) != NULL); - ASSERT(GetObject(hBmp, sizeof(BITMAP), &bitmap) == sizeof(BITMAP)); - TEST(bitmap.bmBitsPixel == 32); - DeleteObject(hBmp); - - TEST(GetLastError() == ERROR_SUCCESS); - - TEST(NtGdiCreateBitmap(1, 1, 1, 33, NULL) == NULL); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - /* Test bad pointer */ - SetLastError(ERROR_SUCCESS); - TEST(NtGdiCreateBitmap(1, 1, 1, 1, (BYTE*)0x80001234) == NULL); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test pointer alignment */ - SetLastError(ERROR_SUCCESS); - TEST((hBmp = NtGdiCreateBitmap(1, 1, 1, 1, &BitmapData[1])) != NULL); - TEST(GetLastError() == ERROR_SUCCESS); - DeleteObject(hBmp); - - /* Test normal params */ - SetLastError(ERROR_SUCCESS); - TEST((hBmp = NtGdiCreateBitmap(5, 7, 2, 4, NULL)) != NULL); - TEST(GetLastError() == ERROR_SUCCESS); - ASSERT(GetObject(hBmp, sizeof(BITMAP), &bitmap) == sizeof(BITMAP)); - TEST(bitmap.bmType == 0); - TEST(bitmap.bmWidth == 5); - TEST(bitmap.bmHeight == 7); - TEST(bitmap.bmWidthBytes == 6); - TEST(bitmap.bmPlanes == 1); - TEST(bitmap.bmBitsPixel == 8); - DeleteObject(hBmp); - - - /* Test height 0 params */ - SetLastError(ERROR_SUCCESS); - TEST((hBmp = NtGdiCreateBitmap(1, 0, 1, 1, NULL)) == NULL); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - /* Test height -1 params */ - SetLastError(ERROR_SUCCESS); - TEST((hBmp = NtGdiCreateBitmap(1, -1, 1, 1, NULL)) == NULL); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - /* Test witdth 0 params */ - SetLastError(ERROR_SUCCESS); - TEST((hBmp = NtGdiCreateBitmap(0, 1, 1, 1, NULL)) == NULL); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - /* Test witdth -1 params */ - SetLastError(ERROR_SUCCESS); - TEST((hBmp = NtGdiCreateBitmap(-1, 0, 1, 1, NULL)) == NULL); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - - /* Test witdth -1 params */ - SetLastError(ERROR_SUCCESS); - TEST((hBmp = NtGdiCreateBitmap(0, 0, 1, 1, NULL)) == NULL); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - - return APISTATUS_NORMAL; -} - -INT -Test_NtGdiCreateBitmap(PTESTINFO pti) -{ - INT ret; - - ret = Test_NtGdiCreateBitmap_Params(pti); - if (ret != APISTATUS_NORMAL) - return ret; - -// ret = Test_NtGdiCreateBitmap_Pixel(pti); -// if (ret != APISTATUS_NORMAL) -// return ret; - - return APISTATUS_NORMAL; - -} diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiCreateCompatibleBitmap.c b/rostests/apitests/w32knapi/ntgdi/NtGdiCreateCompatibleBitmap.c deleted file mode 100644 index a7315c97a20..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiCreateCompatibleBitmap.c +++ /dev/null @@ -1,6 +0,0 @@ - -INT -Test_NtGdiCreateCompatibleBitmap(PTESTINFO pti) -{ - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiCreateCompatibleDC.c b/rostests/apitests/w32knapi/ntgdi/NtGdiCreateCompatibleDC.c deleted file mode 100644 index ac4ed28b8d5..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiCreateCompatibleDC.c +++ /dev/null @@ -1,29 +0,0 @@ - -INT -Test_NtGdiCreateCompatibleDC(PTESTINFO pti) -{ - HDC hDC; - HGDIOBJ hObj; - - /* Test if aa NULL DC is accepted */ - hDC = NtGdiCreateCompatibleDC(NULL); - TEST(hDC != NULL); - - /* We select a nwe palette. Note: SelectObject doesn't work with palettes! */ - hObj = SelectPalette(hDC, GetStockObject(DEFAULT_PALETTE), 0); - /* The old palette should be GetStockObject(DEFAULT_PALETTE) */ - TEST(hObj == GetStockObject(DEFAULT_PALETTE)); - - /* The default bitmap should be GetStockObject(21) */ - hObj = SelectObject(hDC, GetStockObject(21)); - TEST(hObj == GetStockObject(21)); - - /* The default pen should be GetStockObject(BLACK_PEN) */ - hObj = SelectObject(hDC, GetStockObject(WHITE_PEN)); - TEST(hObj == GetStockObject(BLACK_PEN)); - - TEST(NtGdiDeleteObjectApp(hDC) != 0); - - return APISTATUS_NORMAL; -} - diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiCreateDIBSection.c b/rostests/apitests/w32knapi/ntgdi/NtGdiCreateDIBSection.c deleted file mode 100644 index 9375ef2300f..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiCreateDIBSection.c +++ /dev/null @@ -1,475 +0,0 @@ - -/* -HBITMAP -APIENTRY -NtGdiCreateDIBSection( - IN HDC hDC, - IN OPTIONAL HANDLE hSection, - IN DWORD dwOffset, - IN LPBITMAPINFO pbmi, - IN DWORD iUsage, - IN UINT cjHeader, - IN FLONG fl, - IN ULONG_PTR dwColorSpace, - OUT PVOID *ppvBits) -*/ - -ULONG -GetBitmapSize(BITMAPINFOHEADER *pbih) -{ - ULONG WidthBits, WidthBytes; - - WidthBits = pbih->biWidth * pbih->biBitCount * pbih->biPlanes; - WidthBytes = ((WidthBits + 31) & ~ 31) >> 3; - - return pbih->biHeight * WidthBytes; -} - - -INT -Test_NtGdiCreateDIBSection(PTESTINFO pti) -{ - HBITMAP hbmp; - HDC hDC; - ULONG cjHeader; - PVOID pvBits = NULL; - ULONG cEntries; - DIBSECTION dibsection; - - struct - { - BITMAPINFOHEADER bmiHeader; - RGBQUAD bmiColors[100]; - } bmi; - PBITMAPINFO pbmi = (PBITMAPINFO)&bmi; - PBITMAPINFOHEADER pbih = (PBITMAPINFOHEADER)&bmi.bmiHeader; - PBITMAPV4HEADER pbV4h = (PBITMAPV4HEADER)&bmi.bmiHeader; - PBITMAPV5HEADER pbV5h = (PBITMAPV5HEADER)&bmi.bmiHeader; - - HANDLE hSection; - NTSTATUS Status; - LARGE_INTEGER MaximumSize; - - hDC = GetDC(0); - pbih->biSize = sizeof(BITMAPINFOHEADER); - pbih->biWidth = 2; - pbih->biHeight = 2; - pbih->biPlanes = 1; - pbih->biBitCount = 1; - pbih->biCompression = BI_RGB; - pbih->biSizeImage = 0; - pbih->biXPelsPerMeter = 100; - pbih->biYPelsPerMeter = 100; - pbih->biClrUsed = 2; - pbih->biClrImportant = 2; - - cEntries = 0; - -/** iUsage = 0 (DIB_RGB_COLORS) ***********************************************/ - - cjHeader = bmi.bmiHeader.biSize + cEntries * 4 + 8; - - /* Test something simple */ - SetLastError(0); - pvBits = 0; - hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, pbmi, 0, cjHeader, 0, 0, &pvBits); - TEST(pvBits != NULL); - TEST(hbmp != 0); -// TEST(GetLastError() == 0); - TEST(GetObject(hbmp, sizeof(DIBSECTION), &dibsection) == sizeof(DIBSECTION)); - TEST(dibsection.dsBitfields[0] == 0); - TEST(dibsection.dsBitfields[1] == 0); - TEST(dibsection.dsBitfields[2] == 0); - TEST(dibsection.dshSection == 0); - TEST(dibsection.dsOffset == 0); - if (hbmp) DeleteObject(hbmp); - - - /* Test a 0 HDC */ - SetLastError(0); - pvBits = 0; - hbmp = NtGdiCreateDIBSection(0, NULL, 0, pbmi, 0, cjHeader, 0, 0, &pvBits); - TEST(pvBits != NULL); - TEST(hbmp != 0); - TEST(GetLastError() == ERROR_NOT_ENOUGH_MEMORY); - if (hbmp) DeleteObject(hbmp); - - /* Test a wrong HDC */ - SetLastError(0); - pvBits = 0; - hbmp = NtGdiCreateDIBSection((HDC)0xdeadbeef, NULL, 0, pbmi, 0, cjHeader, 0, 0, &pvBits); - TEST(pvBits != 0); - TEST(hbmp != 0); - TEST(GetLastError() == 8); - if (hbmp) DeleteObject(hbmp); - - /* Test pbmi = NULL */ - SetLastError(0); - pvBits = (PVOID)-1; - hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, NULL, 0, cjHeader, 0, 0, &pvBits); - TEST(pvBits == (PVOID)-1); - TEST(hbmp == 0); - TEST(GetLastError() == 0); - if (hbmp) DeleteObject(hbmp); - - /* Test invalid pbmi */ - SetLastError(0); - pvBits = (PVOID)-1; - hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, (PVOID)0x80001234, 0, cjHeader, 0, 0, &pvBits); - TEST(pvBits == (PVOID)-1); - TEST(hbmp == 0); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - if (hbmp) DeleteObject(hbmp); - - /* Test invalid pbmi */ - SetLastError(0); - pvBits = (PVOID)-1; - hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, (PVOID)1, 0, cjHeader, 0, 0, &pvBits); - TEST(pvBits == (PVOID)-1); - TEST(hbmp == 0); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - if (hbmp) DeleteObject(hbmp); - - /* Test ppvBits = NULL */ - SetLastError(0); - hbmp = NtGdiCreateDIBSection(0, NULL, 0, pbmi, 0, cjHeader, 0, 0, NULL); - TEST(hbmp == 0); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - if (hbmp) DeleteObject(hbmp); - - /* Test ppvBits = NULL and pbmi == 0*/ - SetLastError(0); - hbmp = NtGdiCreateDIBSection(0, NULL, 0, NULL, 0, cjHeader, 0, 0, NULL); - TEST(hbmp == 0); - TEST(GetLastError() == 0); - if (hbmp) DeleteObject(hbmp); - - /* Test ppvBits = NULL and wrong cjHeader */ - SetLastError(0); - hbmp = NtGdiCreateDIBSection(0, NULL, 0, pbmi, 0, cjHeader+4, 0, 0, NULL); - TEST(hbmp == 0); - TEST(GetLastError() == 0); - if (hbmp) DeleteObject(hbmp); - - /* Test ppvBits = NULL and cjHeader = 0 */ - SetLastError(0); - hbmp = NtGdiCreateDIBSection(0, NULL, 0, pbmi, 0, 0, 0, 0, NULL); - TEST(hbmp == 0); - TEST(GetLastError() == 0); - if (hbmp) DeleteObject(hbmp); - - /* Test wrong cjHeader */ - SetLastError(0); - pvBits = (PVOID)-1; - hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, pbmi, 0, cjHeader+4, 0, 0, &pvBits); - pvBits = (PVOID)-1; - TEST(hbmp == 0); - TEST(GetLastError() == 0); - if (hbmp) DeleteObject(hbmp); - - /* Test different bitcount */ - pbih->biBitCount = 4; - hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, pbmi, 0, cjHeader, 0, 0, &pvBits); - TEST(hbmp != 0); - if (hbmp) DeleteObject(hbmp); - - pbih->biBitCount = 8; - hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, pbmi, 0, cjHeader, 0, 0, &pvBits); - TEST(hbmp != 0); - if (hbmp) DeleteObject(hbmp); - - cjHeader = pbih->biSize; - pbih->biBitCount = 16; - hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, pbmi, 0, cjHeader, 0, 0, &pvBits); - TEST(hbmp != 0); - if (hbmp) DeleteObject(hbmp); - - pbih->biBitCount = 24; - hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, pbmi, 0, cjHeader, 0, 0, &pvBits); - TEST(hbmp != 0); - if (hbmp) DeleteObject(hbmp); - - pbih->biBitCount = 32; - hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, pbmi, 0, cjHeader, 0, 0, &pvBits); - TEST(hbmp != 0); - if (hbmp) DeleteObject(hbmp); - - /* Test BI_BITFIELDS */ - cEntries = 3; - cjHeader = pbih->biSize + cEntries * sizeof(DWORD); - pbih->biBitCount = 16; - pbih->biCompression = BI_BITFIELDS; - ((DWORD*)pbmi->bmiColors)[0] = 0x0007; - ((DWORD*)pbmi->bmiColors)[1] = 0x0038; - ((DWORD*)pbmi->bmiColors)[2] = 0x01C0; - hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, pbmi, 0, cjHeader, 0, 0, &pvBits); - TEST(hbmp != 0); - TEST(GetObject(hbmp, sizeof(DIBSECTION), &dibsection) == sizeof(DIBSECTION)); - TEST(dibsection.dsBm.bmType == 0); - TEST(dibsection.dsBm.bmWidth == 2); - TEST(dibsection.dsBm.bmHeight == 2); - TEST(dibsection.dsBm.bmWidthBytes == 4); - TEST(dibsection.dsBm.bmPlanes == 1); - TEST(dibsection.dsBm.bmBitsPixel == 16); - TEST(dibsection.dsBm.bmBits == pvBits); - TEST(dibsection.dsBmih.biSize == sizeof(BITMAPINFOHEADER)); - TEST(dibsection.dsBmih.biWidth == 2); - TEST(dibsection.dsBmih.biHeight == 2); - TEST(dibsection.dsBmih.biPlanes == 1); - TEST(dibsection.dsBmih.biBitCount == 16); - TEST(dibsection.dsBmih.biCompression == BI_BITFIELDS); - TEST(dibsection.dsBmih.biSizeImage == 8); - TEST(dibsection.dsBmih.biXPelsPerMeter == 0); - TEST(dibsection.dsBmih.biYPelsPerMeter == 0); - TEST(dibsection.dsBmih.biClrUsed == 0); - TEST(dibsection.dsBmih.biClrImportant == 0); - TEST(dibsection.dsBitfields[0] == 0x0007); - TEST(dibsection.dsBitfields[1] == 0x0038); - TEST(dibsection.dsBitfields[2] == 0x01C0); - TEST(dibsection.dshSection == 0); - TEST(dibsection.dsOffset == 0); - -printf("dib with bitfileds: %p\n", hbmp); -//system("PAUSE"); - - if (hbmp) DeleteObject(hbmp); - - - /* Test BI_BITFIELDS */ - SetLastError(0); - pvBits = 0; - - pbih->biSize = sizeof(BITMAPINFOHEADER); - pbih->biWidth = 2; - pbih->biHeight = 2; - pbih->biPlanes = 1; - pbih->biBitCount = 4; - pbih->biCompression = BI_RGB; - pbih->biSizeImage = 0; - pbih->biXPelsPerMeter = 100; - pbih->biYPelsPerMeter = 100; - pbih->biClrUsed = 0; - pbih->biClrImportant = 0; - ((DWORD*)pbmi->bmiColors)[0] = 0xF800; - ((DWORD*)pbmi->bmiColors)[1] = 0x00ff00; - ((DWORD*)pbmi->bmiColors)[2] = 0x0000ff; - cEntries = 0; - cjHeader = bmi.bmiHeader.biSize + cEntries * 4 + 20; - - -/** iUsage = 1 (DIB_PAL_COLORS) ***********************************************/ - - pbmi->bmiHeader.biClrUsed = 2; - pbmi->bmiHeader.biClrImportant = 2; - - cEntries = 2; - cjHeader = bmi.bmiHeader.biSize + cEntries * 4 + 8; - - /* Test iUsage = 1 */ - SetLastError(0); - pvBits = (PVOID)-1; - hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, pbmi, 1, cjHeader, 0, 0, &pvBits); - TEST(pvBits == (PVOID)-1); - TEST(hbmp == 0); - TEST(GetLastError() == 0); - if (hbmp) DeleteObject(hbmp); - - - -/** iUsage = 2 (???) **********************************************************/ - - /* Test iUsage = 2 */ - SetLastError(0); - pvBits = (PVOID)-1; - hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, pbmi, 2, cjHeader, 0, 0, &pvBits); - TEST(pvBits == (PVOID)-1); - TEST(hbmp == 0); - TEST(GetLastError() == 0); - if (hbmp) DeleteObject(hbmp); - - -/** wrong iUsage **************************************************************/ - - cEntries = 0; - cjHeader = bmi.bmiHeader.biSize + cEntries * 4 + 8; - - /* Test iUsage = 3 */ - SetLastError(0); - pvBits = (PVOID)-1; - hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, pbmi, 3, cjHeader, 0, 0, &pvBits); - TEST(pvBits == (PVOID)-1); - TEST(hbmp == 0); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - if (hbmp) DeleteObject(hbmp); - - /* Test iUsage = 3 */ - SetLastError(0); - pvBits = (PVOID)-1; - hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, pbmi, 3, cjHeader+4, 0, 0, &pvBits); - TEST(pvBits == (PVOID)-1); - TEST(hbmp == 0); - TEST(GetLastError() == 0); - if (hbmp) DeleteObject(hbmp); - - /* Test wrong iUsage */ - SetLastError(0); - pvBits = (PVOID)-1; - hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, pbmi, -55, cjHeader, 0, 0, &pvBits); - TEST(pvBits == (PVOID)-1); - TEST(hbmp == 0); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - if (hbmp) DeleteObject(hbmp); - - /* Test wrong iUsage and wrong cjHeader */ - SetLastError(0); - pvBits = (PVOID)-1; - hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, pbmi, -55, cjHeader+4, 0, 0, &pvBits); - TEST(pvBits == (PVOID)-1); - TEST(hbmp == 0); - TEST(GetLastError() == 0); - if (hbmp) DeleteObject(hbmp); - - /* increased header size */ - pbih->biSize = sizeof(BITMAPINFOHEADER) + 4; - cjHeader = pbih->biSize + cEntries * 4 + 8; - SetLastError(0); - pvBits = 0; - hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, pbmi, 0, cjHeader, 0, 0, &pvBits); - TEST(pvBits != NULL); - TEST(hbmp != 0); - TEST(GetLastError() == 8); - if (hbmp) DeleteObject(hbmp); - - /* increased header size */ - pbih->biSize = sizeof(BITMAPINFOHEADER) + 2; - cjHeader = pbih->biSize + cEntries * 4 + 8; - SetLastError(0); - pvBits = (PVOID)-1; - hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, pbmi, 0, cjHeader, 0, 0, &pvBits); - TEST(pvBits == (PVOID)-1); - TEST(hbmp == 0); - TEST(GetLastError() == 0); - if (hbmp) DeleteObject(hbmp); - - /* decreased header size */ - pbih->biSize = sizeof(BITMAPINFOHEADER) - 4; - cjHeader = pbih->biSize + cEntries * 4 + 8; - SetLastError(0); - pvBits = (PVOID)-1; - hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, pbmi, 0, cjHeader, 0, 0, &pvBits); - TEST(pvBits == (PVOID)-1); - TEST(hbmp == 0); - TEST(GetLastError() == 0); - if (hbmp) DeleteObject(hbmp); - - -/** BITMAPV4HEADER ************************************************************/ - - pbV4h->bV4Size = sizeof(BITMAPV4HEADER); - pbV4h->bV4Width = 2; - pbV4h->bV4Height = 3; - pbV4h->bV4Planes = 1; - pbV4h->bV4BitCount = 1; - pbV4h->bV4V4Compression = BI_RGB; - pbV4h->bV4SizeImage = 0; - pbV4h->bV4XPelsPerMeter = 100; - pbV4h->bV4YPelsPerMeter = 100; - pbV4h->bV4ClrUsed = 0; - pbV4h->bV4ClrImportant = 0; - pbV4h->bV4RedMask = 0; - pbV4h->bV4GreenMask = 0; - pbV4h->bV4BlueMask = 0; - pbV4h->bV4AlphaMask = 0; - pbV4h->bV4CSType = 0; - memset(&pbV4h->bV4Endpoints, sizeof(CIEXYZTRIPLE), 0); - pbV4h->bV4GammaRed = 0; - pbV4h->bV4GammaGreen = 0; - pbV4h->bV4GammaBlue = 0; - - cEntries = 0; - cjHeader = bmi.bmiHeader.biSize + cEntries * 4 + 8; - - /* Test something simple */ - SetLastError(0); - pvBits = 0; - hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, pbmi, 0, cjHeader, 0, 0, &pvBits); - TEST(pvBits != NULL); - TEST(hbmp != 0); - TEST(GetLastError() == 8); - if (hbmp) DeleteObject(hbmp); - - -/** BITMAPV5HEADER ************************************************************/ - - pbV5h->bV5Size = sizeof(BITMAPV5HEADER); - pbV5h->bV5Width = 2; - pbV5h->bV5Height = 3; - pbV5h->bV5Planes = 1; - pbV5h->bV5BitCount = 1; - pbV5h->bV5Compression = BI_RGB; - pbV5h->bV5SizeImage = 0; - pbV5h->bV5XPelsPerMeter = 100; - pbV5h->bV5YPelsPerMeter = 100; - pbV5h->bV5ClrUsed = 2; - pbV5h->bV5ClrImportant = 2; - pbV5h->bV5RedMask = 0; - pbV5h->bV5GreenMask = 0; - pbV5h->bV5BlueMask = 0; - pbV5h->bV5AlphaMask = 0; - pbV5h->bV5CSType = 0; - memset(&pbV5h->bV5Endpoints, sizeof(CIEXYZTRIPLE), 0); - pbV5h->bV5GammaRed = 0; - pbV5h->bV5GammaGreen = 0; - pbV5h->bV5GammaBlue = 0; - pbV5h->bV5Intent = 0; - pbV5h->bV5ProfileData = 0; - pbV5h->bV5ProfileSize = 0; - pbV5h->bV5Reserved = 0; - - cEntries = 0; - cjHeader = pbV5h->bV5Size + cEntries * 4 + 8; - - /* Test something simple */ - SetLastError(0); - pvBits = 0; - hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, pbmi, 0, cjHeader, 0, 0, &pvBits); - TEST(pvBits != NULL); - TEST(hbmp != 0); - TEST(GetLastError() == 8); - if (hbmp) DeleteObject(hbmp); - - /* increased header size */ - pbV5h->bV5Size = sizeof(BITMAPV5HEADER) + 64; - cjHeader = pbV5h->bV5Size + cEntries * 4 + 8; - SetLastError(0); - pvBits = 0; - hbmp = NtGdiCreateDIBSection(hDC, NULL, 0, pbmi, 0, cjHeader, 0, 0, &pvBits); - TEST(pvBits != NULL); - TEST(hbmp != 0); - TEST(GetLastError() == 8); - if (hbmp) DeleteObject(hbmp); - - /* Test section */ - MaximumSize.QuadPart = 4096; - Status = ZwCreateSection(&hSection, - SECTION_ALL_ACCESS, - NULL, - &MaximumSize, - PAGE_READWRITE, - SEC_COMMIT, - NULL); - ASSERT(NT_SUCCESS(Status)); - - SetLastError(0); - pvBits = 0; - hbmp = NtGdiCreateDIBSection(hDC, hSection, 0, pbmi, 0, cjHeader, 0, 0, &pvBits); - TEST(pvBits != NULL); - TEST(hbmp != 0); -// TEST(GetLastError() == 0); - printf("hbmp = %p, pvBits = %p, hSection = %p\n", hbmp, pvBits, hSection); -//system("PAUSE"); - if (hbmp) DeleteObject(hbmp); - - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiDeleteObjectApp.c b/rostests/apitests/w32knapi/ntgdi/NtGdiDeleteObjectApp.c deleted file mode 100644 index 7403ab4ccf4..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiDeleteObjectApp.c +++ /dev/null @@ -1,118 +0,0 @@ - -INT -Test_NtGdiDeleteObjectApp(PTESTINFO pti) -{ - HDC hdc; - HBITMAP hbmp; - HBRUSH hbrush; - HPEN hpen; - - /* Try to delete 0 */ - SetLastError(0); - TEST(NtGdiDeleteObjectApp(0) == 0); - TEST(GetLastError() == 0); - - /* Try to delete something with a stockbit */ - SetLastError(0); - TEST(NtGdiDeleteObjectApp((PVOID)(GDI_HANDLE_STOCK_MASK | 0x1234)) == 1); - TEST(GetLastError() == 0); - - /* Delete a compatible DC */ - SetLastError(0); - hdc = CreateCompatibleDC(NULL); - ASSERT(IsHandleValid(hdc) == 1); - TEST(NtGdiDeleteObjectApp(hdc) == 1); - TEST(GetLastError() == 0); - TEST(IsHandleValid(hdc) == 0); - - /* Delete a display DC */ - SetLastError(0); - hdc = CreateDC("DISPLAY", NULL, NULL, NULL); - ASSERT(IsHandleValid(hdc) == 1); - TEST((hpen=SelectObject(hdc, GetStockObject(WHITE_PEN))) != NULL); - SelectObject(hdc, hpen); - TEST(NtGdiDeleteObjectApp(hdc) != 0); - TEST(GetLastError() == 0); - TEST(IsHandleValid(hdc) == 1); - TEST(SelectObject(hdc, GetStockObject(WHITE_PEN)) == NULL); - TESTX(GetLastError() == ERROR_INVALID_PARAMETER, "GetLasterror returned 0x%08x\n", (unsigned int)GetLastError()); - - /* Once more */ - SetLastError(0); - hdc = GetDC(0); - ASSERT(IsHandleValid(hdc) == 1); - TEST(NtGdiDeleteObjectApp(hdc) != 0); - TEST(GetLastError() == 0); - TEST(IsHandleValid(hdc) == 1); - TEST(SelectObject(hdc, GetStockObject(WHITE_PEN)) == NULL); - TESTX(GetLastError() == ERROR_INVALID_PARAMETER, "GetLasterror returned 0x%08x\n", (unsigned int)GetLastError()); - /* Make sure */ - TEST(NtUserCallOneParam((DWORD_PTR)hdc, ONEPARAM_ROUTINE_RELEASEDC) == 0); - - /* Delete a brush */ - SetLastError(0); - hbrush = CreateSolidBrush(0x123456); - ASSERT(IsHandleValid(hbrush) == 1); - TEST(NtGdiDeleteObjectApp(hbrush) == 1); - TEST(GetLastError() == 0); - TEST(IsHandleValid(hbrush) == 0); - - /* Try to delete a stock brush */ - SetLastError(0); - hbrush = GetStockObject(BLACK_BRUSH); - ASSERT(IsHandleValid(hbrush) == 1); - TEST(NtGdiDeleteObjectApp(hbrush) == 1); - TEST(GetLastError() == 0); - TEST(IsHandleValid(hbrush) == 1); - - /* Delete a bitmap */ - SetLastError(0); - hbmp = CreateBitmap(10, 10, 1, 1, NULL); - ASSERT(IsHandleValid(hbmp) == 1); - TEST(NtGdiDeleteObjectApp(hbmp) == 1); - TEST(GetLastError() == 0); - TEST(IsHandleValid(hbmp) == 0); - - /* Create a DC for further use */ - hdc = CreateCompatibleDC(NULL); - ASSERT(hdc); - - /* Try to delete a brush that is selected into a DC */ - SetLastError(0); - hbrush = CreateSolidBrush(0x123456); - ASSERT(IsHandleValid(hbrush) == 1); - TEST(NtGdiSelectBrush(hdc, hbrush)); - TEST(NtGdiDeleteObjectApp(hbrush) == 1); - TEST(GetLastError() == 0); - TEST(IsHandleValid(hbrush) == 1); - - /* Try to delete a bitmap that is selected into a DC */ - SetLastError(0); - hbmp = CreateBitmap(10, 10, 1, 1, NULL); - ASSERT(IsHandleValid(hbmp) == 1); - TEST(NtGdiSelectBitmap(hdc, hbmp)); - - TEST(NtGdiDeleteObjectApp(hbmp) == 1); - TEST(GetLastError() == 0); - TEST(IsHandleValid(hbmp) == 1); - - /* Bitmap get's deleted as soon as we dereference it */ - NtGdiSelectBitmap(hdc, GetStockObject(DEFAULT_BITMAP)); - TEST(IsHandleValid(hbmp) == 0); - - TEST(NtGdiDeleteObjectApp(hbmp) == 1); - TEST(GetLastError() == 0); - TEST(IsHandleValid(hbmp) == 0); - - /* Try to delete a brush that is selected into a DC */ - SetLastError(0); - hbrush = CreateSolidBrush(123); - ASSERT(IsHandleValid(hbrush) == 1); - TEST(NtGdiSelectBrush(hdc, hbrush)); - - TEST(NtGdiDeleteObjectApp(hbrush) == 1); - TEST(GetLastError() == 0); - TEST(IsHandleValid(hbrush) == 1); - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiDoPalette.c b/rostests/apitests/w32knapi/ntgdi/NtGdiDoPalette.c deleted file mode 100644 index 26ee94a848a..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiDoPalette.c +++ /dev/null @@ -1,318 +0,0 @@ -HPALETTE -CreateTestPalette() -{ - struct - { - LOGPALETTE logpal; - PALETTEENTRY entry[5]; - } palstruct = - { {0x300,5, - { {1,2,3,0} }}, - { {22,33,44,PC_RESERVED}, - {11,55,77,PC_EXPLICIT}, - {00,77,66,PC_RESERVED | PC_NOCOLLAPSE}, - {12,34,56,78}} }; - - return CreatePalette((LOGPALETTE*)&palstruct); -} - -INT -Test_NtGdiDoPalette_GdiPalAnimate(PTESTINFO pti) -{ - HPALETTE hPal; - PALETTEENTRY palEntries[5] = { - {0,0,0,0}, - {0xff,0xff,0xff,0}, - {0x33,0x66,0x99,0}, - {0x25,0x84,0x14,0}, - {0x12,0x34,0x56,0x11}}; - PALETTEENTRY palEntries2[5]; - - /* Test stock palette */ - SetLastError(ERROR_SUCCESS); - RTEST(NtGdiDoPalette(GetStockObject(DEFAULT_PALETTE), 0, 1, palEntries, GdiPalAnimate, FALSE) == 0); - RTEST(GetLastError() == ERROR_SUCCESS); - - - /* Test pEntries = NULL */ - hPal = CreateTestPalette(); - RTEST(NtGdiDoPalette(hPal, 0, 1, NULL, GdiPalAnimate, TRUE) == 0); - RTEST(NtGdiDoPalette(hPal, 0, 1, NULL, GdiPalAnimate, FALSE) == 0); - DeleteObject(hPal); - - /* Test PC_RESERVED */ - hPal = CreateTestPalette(); - RTEST(NtGdiDoPalette(hPal, 0, 5, palEntries, GdiPalAnimate, TRUE) == 2); - DeleteObject(hPal); - - hPal = CreateTestPalette(); - RTEST(NtGdiDoPalette(hPal, 1, 5, palEntries, GdiPalAnimate, TRUE) == 2); - DeleteObject(hPal); - - hPal = CreateTestPalette(); - RTEST(NtGdiDoPalette(hPal, 2, 5, palEntries, GdiPalAnimate, TRUE) == 1); - DeleteObject(hPal); - - hPal = CreateTestPalette(); - RTEST(NtGdiDoPalette(hPal, 3, 5, palEntries, GdiPalAnimate, TRUE) == 1); - DeleteObject(hPal); - - hPal = CreateTestPalette(); - RTEST(NtGdiDoPalette(hPal, 4, 5, palEntries, GdiPalAnimate, TRUE) == 0); - DeleteObject(hPal); - - hPal = CreateTestPalette(); - RTEST(NtGdiDoPalette(hPal, 5, 5, palEntries, GdiPalAnimate, TRUE) == 0); - DeleteObject(hPal); - - hPal = CreateTestPalette(); - RTEST(NtGdiDoPalette(hPal, 0, 5, palEntries, GdiPalAnimate, FALSE) == 2); - DeleteObject(hPal); - - hPal = CreateTestPalette(); - RTEST(NtGdiDoPalette(hPal, 3, 5, palEntries, GdiPalAnimate, FALSE) == 1); - DeleteObject(hPal); - - /* Test if entries are set correctly */ - hPal = CreateTestPalette(); - NtGdiDoPalette(hPal, 0, 5, palEntries, GdiPalAnimate, TRUE); - NtGdiDoPalette(hPal, 0, 5, palEntries2, GdiPalGetEntries, FALSE); - RTEST(palEntries2[0].peRed == 1); - RTEST(palEntries2[0].peGreen == 2); - RTEST(palEntries2[0].peBlue == 3); - RTEST(palEntries2[0].peFlags == 0); - RTEST(palEntries2[1].peRed == palEntries[1].peRed); - RTEST(palEntries2[1].peGreen == palEntries[1].peGreen); - RTEST(palEntries2[1].peBlue == palEntries[1].peBlue); - RTEST(palEntries2[1].peFlags == palEntries[1].peFlags); - RTEST(palEntries2[2].peRed == 11); - RTEST(palEntries2[2].peGreen == 55); - RTEST(palEntries2[2].peBlue == 77); - TEST(palEntries2[2].peFlags == PC_EXPLICIT); - RTEST(palEntries2[3].peRed == palEntries[3].peRed); - RTEST(palEntries2[3].peGreen == palEntries[3].peGreen); - RTEST(palEntries2[3].peBlue == palEntries[3].peBlue); - RTEST(palEntries2[3].peFlags == palEntries[3].peFlags); - DeleteObject(hPal); - - - return APISTATUS_NORMAL; -} - -INT -Test_NtGdiDoPalette_GdiPalSetEntries(PTESTINFO pti) -{ - HDC hDC; - HPALETTE hPal, hOldPal; - PALETTEENTRY palEntries[5] = { - {0,0,0,0}, - {0xff,0xff,0xff,0}, - {0x33,0x66,0x99,0}, - {0x25,0x84,0x14,0}, - {0x12,0x34,0x56,0x11}}; - PALETTEENTRY palEntries2[5]; - - hPal = CreateTestPalette(); - - /* Test invalid handle */ - SetLastError(ERROR_SUCCESS); - RTEST(NtGdiDoPalette((HPALETTE)23, 0, 1, palEntries, GdiPalSetEntries, TRUE) == 0); - RTEST(GetLastError() == ERROR_SUCCESS); - - /* Test system palette */ - RTEST(NtGdiDoPalette(GetStockObject(DEFAULT_PALETTE), 0, 1, palEntries, GdiPalSetEntries, TRUE) == 0); - RTEST(GetLastError() == ERROR_SUCCESS); - - RTEST(NtGdiDoPalette(hPal, 0, 1, palEntries, GdiPalSetEntries, TRUE) == 1); - RTEST(NtGdiDoPalette(hPal, 0, 2, palEntries, GdiPalSetEntries, TRUE) == 2); - RTEST(NtGdiDoPalette(hPal, 0, 3, palEntries, GdiPalSetEntries, TRUE) == 3); - RTEST(NtGdiDoPalette(hPal, 0, 5, palEntries, GdiPalSetEntries, TRUE) == 5); - RTEST(NtGdiDoPalette(hPal, 0, 6, palEntries, GdiPalSetEntries, TRUE) == 5); - RTEST(NtGdiDoPalette(hPal, 3, 6, palEntries, GdiPalSetEntries, TRUE) == 2); -// TEST(NtGdiDoPalette(hPal, 4, 23247, palEntries, GdiPalSetEntries, TRUE) == 0); - - /* Test bInbound == FALSE */ - NtGdiDoPalette(hPal, 0, 5, palEntries, GdiPalSetEntries, TRUE); - ZeroMemory(palEntries2, sizeof(palEntries2)); - RTEST(NtGdiDoPalette(hPal, 0, 5, palEntries2, GdiPalSetEntries, FALSE) == 5); - /* we should get the old values returned in our buffer! */ - TEST(memcmp(palEntries2, palEntries, sizeof(palEntries)) == 0); - - /* check what we have in our palette now */ - ZeroMemory(palEntries2, sizeof(palEntries2)); - RTEST(NtGdiDoPalette(hPal, 0, 5, palEntries2, GdiPalGetEntries, FALSE) == 5); - TEST(memcmp(palEntries2, palEntries, sizeof(palEntries)) == 0); - - RTEST(NtGdiDoPalette(hPal, 0, 4, palEntries2, GdiPalSetEntries, TRUE) == 4); - RTEST(GetLastError() == ERROR_SUCCESS); - - /* Test if entries are set correctly */ - hPal = CreateTestPalette(); - NtGdiDoPalette(hPal, 0, 5, palEntries, GdiPalSetEntries, TRUE); - NtGdiDoPalette(hPal, 0, 5, palEntries2, GdiPalGetEntries, FALSE); - RTEST(palEntries2[0].peRed == 0); - RTEST(palEntries2[0].peGreen == 0); - RTEST(palEntries2[0].peBlue == 0); - RTEST(palEntries2[0].peFlags == 0); - - /* Test that the buffer was not changed */ - - - /* Test with palette selected into dc */ - hDC = CreateCompatibleDC(NULL); - hOldPal = SelectPalette(hDC, hPal, 0); - RTEST(NtGdiDoPalette(hPal, 0, 4, palEntries, GdiPalSetEntries, TRUE) == 4); - SelectPalette(hDC, hOldPal, 0); - - /* Test pEntries = NULL */ - RTEST(NtGdiDoPalette(hPal, 0, 1, NULL, GdiPalGetEntries, TRUE) == 0); - - return APISTATUS_NORMAL; -} - -INT -Test_NtGdiDoPalette_GdiPalGetEntries(PTESTINFO pti) -{ - HPALETTE hPal; - - hPal = CreateTestPalette(); - - /* Test pEntries = NULL */ - RTEST(NtGdiDoPalette(hPal, 0, 1, NULL, GdiPalGetEntries, TRUE) == 0); - RTEST(NtGdiDoPalette(hPal, 0, 1, NULL, GdiPalGetEntries, FALSE) == 5); - RTEST(NtGdiDoPalette(hPal, 2, 1, NULL, GdiPalGetEntries, FALSE) == 5); - RTEST(NtGdiDoPalette(hPal, 20, 1, NULL, GdiPalGetEntries, FALSE) == 5); - RTEST(NtGdiDoPalette(hPal, -20, 1, NULL, GdiPalGetEntries, FALSE) == 5); - RTEST(NtGdiDoPalette(hPal, 2, 0, NULL, GdiPalGetEntries, FALSE) == 5); - - -// Test flags 0xf0 - - return APISTATUS_NORMAL; -} - -INT -Test_NtGdiDoPalette_GetSystemPalette(PTESTINFO pti) -{ - return APISTATUS_NORMAL; -} - -INT -Test_NtGdiDoPalette_GetBIBColorTable(PTESTINFO pti) -{ - return APISTATUS_NORMAL; -} - -INT -Test_NtGdiDoPalette_SetDIBColorTable(PTESTINFO pti) -{ - HDC hdc; - HBITMAP hbmp; - BYTE *pjBits; - - struct - { - BITMAPINFOHEADER bmiHeader; - ULONG bmiColors[10]; - } bmi; - - hdc = CreateCompatibleDC(0); - ASSERT(hdc); - - bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bmi.bmiHeader.biWidth = 10; - bmi.bmiHeader.biHeight = 10; - bmi.bmiHeader.biPlanes = 1; - bmi.bmiHeader.biBitCount = 8; - bmi.bmiHeader.biCompression = BI_RGB; - bmi.bmiHeader.biSizeImage = 0; - bmi.bmiHeader.biXPelsPerMeter = 1; - bmi.bmiHeader.biYPelsPerMeter = 1; - bmi.bmiHeader.biClrUsed = 9; - bmi.bmiHeader.biClrImportant = 9; - bmi.bmiColors[0] = 0x000000; - bmi.bmiColors[1] = 0x202020; - bmi.bmiColors[2] = 0x404040; - bmi.bmiColors[3] = 0x606060; - bmi.bmiColors[4] = 0x808080; - bmi.bmiColors[5] = 0xA0A0A0; - bmi.bmiColors[6] = 0xC0C0C0; - bmi.bmiColors[7] = 0xE0E0E0; - bmi.bmiColors[8] = 0xffffff; - hbmp = CreateDIBSection(hdc, (BITMAPINFO*)&bmi, DIB_PAL_COLORS, (PVOID*)&pjBits, NULL, 0); - ASSERT(hbmp); - ASSERT(pjBits); - - SelectObject(hdc, hbmp); - - - pjBits[0] = 8; - pjBits[1] = 1; - pjBits[2] = 2; - pjBits[3] = 3; - - bmi.bmiColors[8] = 0x000000; - bmi.bmiColors[7] = 0x202020; - bmi.bmiColors[6] = 0x404040; - bmi.bmiColors[5] = 0x606060; - bmi.bmiColors[4] = 0x808080; - bmi.bmiColors[3] = 0xA0A0A0; - bmi.bmiColors[2] = 0xC0C0C0; - bmi.bmiColors[1] = 0xE0E0E0; - bmi.bmiColors[0] = 0xffffff; - TEST(NtGdiDoPalette(hdc, 0, 9, &bmi.bmiColors, GdiPalSetColorTable, FALSE) == 9); - - SetDCPenColor(hdc, 0xE0E0E0); - SetDCBrushColor(hdc, 0x202020); - Rectangle(hdc, 0, 0, 10, 10); - - DeleteDC(hdc); - DeleteObject(hbmp); - - return APISTATUS_NORMAL; -} - - -INT -Test_NtGdiDoPalette(PTESTINFO pti) -{ - INT ret; - - ret = Test_NtGdiDoPalette_GdiPalAnimate(pti); - if (ret != APISTATUS_NORMAL) - { - return ret; - } - - ret = Test_NtGdiDoPalette_GdiPalSetEntries(pti); - if (ret != APISTATUS_NORMAL) - { - return ret; - } - - ret = Test_NtGdiDoPalette_GdiPalGetEntries(pti); - if (ret != APISTATUS_NORMAL) - { - return ret; - } - - ret = Test_NtGdiDoPalette_GetSystemPalette(pti); - if (ret != APISTATUS_NORMAL) - { - return ret; - } - - ret = Test_NtGdiDoPalette_GetBIBColorTable(pti); - if (ret != APISTATUS_NORMAL) - { - return ret; - } - - ret = Test_NtGdiDoPalette_SetDIBColorTable(pti); - if (ret != APISTATUS_NORMAL) - { - return ret; - } - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiEngCreatePalette.c b/rostests/apitests/w32knapi/ntgdi/NtGdiEngCreatePalette.c deleted file mode 100644 index 5e2183cdbfa..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiEngCreatePalette.c +++ /dev/null @@ -1,20 +0,0 @@ - -INT -Test_NtGdiEngCreatePalette(PTESTINFO pti) -{ - HPALETTE hPal; - ULONG Colors[3] = {1,2,3}; - PGDI_TABLE_ENTRY pEntry; - - hPal = NtGdiEngCreatePalette(PAL_RGB, 3, Colors, 0xff000000, 0x00ff0000, 0x0000ff00); - - TEST(hPal != 0); - TEST(GDI_HANDLE_GET_TYPE(hPal) == GDI_OBJECT_TYPE_PALETTE); - pEntry = &GdiHandleTable[GDI_HANDLE_GET_INDEX(hPal)]; - TEST(pEntry->KernelData != NULL); - TEST(pEntry->ProcessId == GetCurrentProcessId()); - TEST(pEntry->UserData == 0); - TEST(pEntry->Type == (((UINT)hPal >> 16) | GDI_OBJECT_TYPE_PALETTE)); - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiEnumFontOpen.c b/rostests/apitests/w32knapi/ntgdi/NtGdiEnumFontOpen.c deleted file mode 100644 index c95749348bd..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiEnumFontOpen.c +++ /dev/null @@ -1,36 +0,0 @@ - -INT -Test_NtGdiEnumFontOpen(PTESTINFO pti) -{ - HDC hDC; - ULONG_PTR idEnum; - ULONG ulCount; - PGDI_TABLE_ENTRY pEntry; - - hDC = CreateDCW(L"DISPLAY",NULL,NULL,NULL); - - // FIXME: We should load the font first - - idEnum = NtGdiEnumFontOpen(hDC, 2, 0, 32, L"Courier", ANSI_CHARSET, &ulCount); - ASSERT(idEnum != 0); - - /* we should have a gdi handle here */ - TEST(GDI_HANDLE_GET_TYPE(idEnum) == GDI_OBJECT_TYPE_ENUMFONT); - pEntry = &GdiHandleTable[GDI_HANDLE_GET_INDEX(idEnum)]; - TEST(pEntry->KernelData != NULL); - TEST(pEntry->ProcessId == GetCurrentProcessId()); - TEST(pEntry->UserData == 0); - TEST(pEntry->Type == ((idEnum >> 16) | GDI_OBJECT_TYPE_ENUMFONT)); - - /* We should not be able to use DeleteObject() on the handle */ - TEST(DeleteObject((HGDIOBJ)idEnum) == FALSE); - - NtGdiEnumFontClose(idEnum); - - // Test no logfont (NULL): should word - // Test empty lfFaceName string: should not work - - - return APISTATUS_NORMAL; -} - diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiExtTextOutW.c b/rostests/apitests/w32knapi/ntgdi/NtGdiExtTextOutW.c deleted file mode 100644 index fa38b05436d..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiExtTextOutW.c +++ /dev/null @@ -1,53 +0,0 @@ - -/* -BOOL -APIENTRY -NtGdiExtTextOutW( - IN HDC hDC, - IN INT XStart, - IN INT YStart, - IN UINT fuOptions, - IN OPTIONAL LPRECT UnsafeRect, - IN LPWSTR UnsafeString, - IN INT Count, - IN OPTIONAL LPINT UnsafeDx, - IN DWORD dwCodePage) -*/ - -INT -Test_NtGdiExtTextOutW(PTESTINFO pti) -{ - HWND hWnd; - HDC hDC; - RECT rect; - LPWSTR lpstr; - BOOL ret; - ULONG len; - INT Dx[10] = {10, -5, 10, 5, 10, -10, 10, 5, 10, 5}; - - /* Create a window */ - hWnd = CreateWindowW(L"BUTTON", L"TestWindow", WS_OVERLAPPEDWINDOW | WS_VISIBLE, - CW_USEDEFAULT, CW_USEDEFAULT, 100, 100, - NULL, NULL, g_hInstance, 0); - hDC = GetDC(hWnd); - - lpstr = L"Hallo"; - len = wcslen(lpstr); - - ret = NtGdiExtTextOutW(hDC, 0, 0, 0, &rect, lpstr, len, Dx, 0); - TEST(ret == 1); - - ret = NtGdiExtTextOutW(hDC, 0, 0, ETO_PDY, &rect, lpstr, len, Dx, 0); - TEST(ret == 1); - - /* Test invalid lpDx */ - ret = NtGdiExtTextOutW(hDC, 0, 0, 0, 0, lpstr, len, (INT*)((ULONG_PTR)-1), 0); - TEST(ret == 0); - - /* Test alignment requirement for lpDx */ - ret = NtGdiExtTextOutW(hDC, 0, 0, 0, 0, lpstr, len, (INT*)((ULONG_PTR)Dx + 1), 0); - TEST(ret == 1); - - return APISTATUS_NORMAL; -} - diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiFlushUserBatch.c b/rostests/apitests/w32knapi/ntgdi/NtGdiFlushUserBatch.c deleted file mode 100644 index 4f4b5e6f6c7..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiFlushUserBatch.c +++ /dev/null @@ -1,35 +0,0 @@ - -INT -Test_NtGdiFlushUserBatch(PTESTINFO pti) -{ - PVOID pRet; - PTEB pTeb; - - pTeb = NtCurrentTeb(); - ASSERT(pTeb); - - pRet = (PVOID)NtGdiFlushUserBatch(); - - TEST(pRet != 0); - TEST(pRet == &pTeb->RealClientId); - - TEST(pTeb->GdiBatchCount == 0); - TEST(pTeb->GdiTebBatch.Offset == 0); - TEST(pTeb->GdiTebBatch.HDC == 0); - - /* Set up some bullshit */ - pTeb->InDbgPrint = 1; - pTeb->GdiBatchCount = 12; - pTeb->GdiTebBatch.Offset = 21; - pTeb->GdiTebBatch.HDC = (HDC)123; - - pRet = (PVOID)NtGdiFlushUserBatch(); - TEST(pRet == &pTeb->RealClientId); - - TEST(pTeb->InDbgPrint == 0); - TEST(pTeb->GdiBatchCount == 12); - TEST(pTeb->GdiTebBatch.Offset == 0); - TEST(pTeb->GdiTebBatch.HDC == 0); - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiGetBitmapBits.c b/rostests/apitests/w32knapi/ntgdi/NtGdiGetBitmapBits.c deleted file mode 100644 index 06c2b08f1d5..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiGetBitmapBits.c +++ /dev/null @@ -1,62 +0,0 @@ -INT -Test_NtGdiGetBitmapBits(PTESTINFO pti) -{ - BYTE Bits[50] = {0,1,2,3,4,5,6,7,8,9}; - HBITMAP hBitmap; - - SetLastError(ERROR_SUCCESS); - RTEST(NtGdiGetBitmapBits(0, 0, 0) == 0); - RTEST(GetLastError() == ERROR_INVALID_HANDLE); - - /* Test NULL bitmap handle */ - SetLastError(ERROR_SUCCESS); - RTEST(NtGdiGetBitmapBits(0, 5, Bits) == 0); - RTEST(GetLastError() == ERROR_INVALID_HANDLE); - - /* Test invalid bitmap handle */ - hBitmap = (HBITMAP)CreatePen(PS_SOLID, 1, RGB(1,2,3)); - SetLastError(ERROR_SUCCESS); - RTEST(NtGdiGetBitmapBits(hBitmap, 5, Bits) == 0); - RTEST(GetLastError() == ERROR_INVALID_HANDLE); - DeleteObject(hBitmap); - - hBitmap = CreateBitmap(3, 3, 1, 8, NULL); - SetLastError(ERROR_SUCCESS); - - /* test NULL pointer and count buffer size != 0 */ - RTEST(NtGdiGetBitmapBits(hBitmap, 5, NULL) == 12); - - /* test NULL pointer and buffer size == 0*/ - RTEST(NtGdiGetBitmapBits(hBitmap, 0, NULL) == 12); - - /* test bad pointer */ - RTEST(NtGdiGetBitmapBits(hBitmap, 5, (PBYTE)0x500) == 0); - - /* Test if we can set a number of bytes between lines */ - RTEST(NtGdiGetBitmapBits(hBitmap, 5, Bits) == 5); - - /* Test alignment */ - RTEST(NtGdiGetBitmapBits(hBitmap, 4, Bits+1) == 4); - - /* Test 1 byte too much */ - RTEST(NtGdiGetBitmapBits(hBitmap, 10, Bits) == 10); - - /* Test one row too much */ - RTEST(NtGdiGetBitmapBits(hBitmap, 12, Bits) == 12); - - RTEST(NtGdiGetBitmapBits(hBitmap, 13, Bits) == 12); - - RTEST(NtGdiGetBitmapBits(hBitmap, 100, Bits) == 12); - - /* Test huge bytes count */ - RTEST(NtGdiGetBitmapBits(hBitmap, 12345678, Bits) == 12); - - /* Test negative bytes count */ - RTEST(NtGdiGetBitmapBits(hBitmap, -5, Bits) == 12); - - RTEST(GetLastError() == ERROR_SUCCESS); - - DeleteObject(hBitmap); - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiGetDIBits.c b/rostests/apitests/w32knapi/ntgdi/NtGdiGetDIBits.c deleted file mode 100644 index 960b0d49fdf..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiGetDIBits.c +++ /dev/null @@ -1,131 +0,0 @@ -/* taken from gdi32, bitmap.c */ -UINT -FASTCALL -DIB_BitmapMaxBitsSize( PBITMAPINFO Info, UINT ScanLines ) -{ - UINT MaxBits = 0; - - if (Info->bmiHeader.biSize == sizeof(BITMAPCOREHEADER)) - { - PBITMAPCOREHEADER Core = (PBITMAPCOREHEADER)Info; - MaxBits = Core->bcBitCount * Core->bcPlanes * Core->bcWidth; - } - else /* assume BITMAPINFOHEADER */ - { - if ((Info->bmiHeader.biCompression) && (Info->bmiHeader.biCompression != BI_BITFIELDS)) - return Info->bmiHeader.biSizeImage; - // Planes are over looked by Yuan. I guess assumed always 1. - MaxBits = Info->bmiHeader.biBitCount * Info->bmiHeader.biPlanes * Info->bmiHeader.biWidth; - } - MaxBits = ((MaxBits + 31) & ~31 ) / 8; // From Yuan, ScanLineSize = (Width * bitcount + 31)/32 - return (MaxBits * ScanLines); // ret the full Size. -} - - -INT -Test_NtGdiGetDIBitsInternal(PTESTINFO pti) -{ - HBITMAP hBitmap; - struct - { - BITMAPINFO bi; - RGBQUAD Colors[20]; - } bmp; -// BITMAPINFO bi; - INT ScreenBpp; - BITMAPCOREINFO bic; - DWORD data[20*16]; - - HDC hDCScreen = GetDC(NULL); - ASSERT(hDCScreen != NULL); - - hBitmap = CreateCompatibleBitmap(hDCScreen, 16, 16); - ASSERT(hBitmap != NULL); - - SetLastError(ERROR_SUCCESS); - RTEST(NtGdiGetDIBitsInternal(0, 0, 0, 0, NULL, NULL, 0, 0, 0) == 0); - RTEST(GetLastError() == ERROR_SUCCESS); - - SetLastError(ERROR_SUCCESS); - RTEST(NtGdiGetDIBitsInternal((HDC)2345, 0, 0, 0, NULL, NULL, 0, 0, 0) == 0); - RTEST(GetLastError() == ERROR_SUCCESS); - - SetLastError(ERROR_SUCCESS); - RTEST(NtGdiGetDIBitsInternal((HDC)2345, hBitmap, 0, 0, NULL, NULL, 0, 0, 0) == 0); - RTEST(GetLastError() == ERROR_SUCCESS); - - SetLastError(ERROR_SUCCESS); - RTEST(NtGdiGetDIBitsInternal(hDCScreen, hBitmap, 0, 0, NULL, NULL, 0, 0, 0) == 0); - RTEST(GetLastError() == ERROR_SUCCESS); - - SetLastError(ERROR_SUCCESS); - RTEST(NtGdiGetDIBitsInternal(hDCScreen, hBitmap, 0, 15, NULL, NULL, 0, 0, 0) == 0); - RTEST(GetLastError() == ERROR_SUCCESS); - - ZeroMemory(&bmp, sizeof(bmp)); - bmp.bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - FillMemory(&bmp.Colors, sizeof(bmp.Colors), 0x44); - - SetLastError(ERROR_SUCCESS); - RTEST(NtGdiGetDIBitsInternal((HDC)0, hBitmap, 0, 15, NULL, &bmp.bi, 0, 0, 0) > 0); - RTEST(GetLastError() == ERROR_SUCCESS); - TEST(bmp.Colors[0].rgbRed == 0x44); - - ZeroMemory(&bmp, sizeof(bmp)); - bmp.bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - FillMemory(&bmp.Colors, sizeof(bmp.Colors), 0x44); - - SetLastError(ERROR_SUCCESS); - RTEST(NtGdiGetDIBitsInternal((HDC)2345, hBitmap, 0, 15, NULL, &bmp.bi, 0, 0, 0) > 0); - RTEST(GetLastError() == ERROR_SUCCESS); - TEST(bmp.Colors[0].rgbRed == 0x44); - - ZeroMemory(&bmp, sizeof(bmp)); - bmp.bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - FillMemory(&bmp.Colors, sizeof(bmp.Colors), 0x44); - - SetLastError(ERROR_SUCCESS); - RTEST(NtGdiGetDIBitsInternal(hDCScreen, hBitmap, 0, 15, NULL, &bmp.bi, DIB_RGB_COLORS, - DIB_BitmapMaxBitsSize(&bmp.bi, 15), 0) > 0); - RTEST(GetLastError() == ERROR_SUCCESS); - - ScreenBpp = GetDeviceCaps(hDCScreen, BITSPIXEL); - - RTEST(bmp.bi.bmiHeader.biWidth == 16); - RTEST(bmp.bi.bmiHeader.biHeight == 16); - RTEST(bmp.bi.bmiHeader.biBitCount == ScreenBpp); - RTEST(bmp.bi.bmiHeader.biSizeImage == (16 * 16) * (ScreenBpp / 8)); - - TEST(bmp.Colors[0].rgbRed == 0x44); - - /* Test with pointer */ -// ZeroMemory(&bmp.bi, sizeof(BITMAPINFO)); - bmp.bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); -// FillMemory(&bmp.Colors, sizeof(bmp.Colors), 0x11223344); - - SetLastError(ERROR_SUCCESS); - TEST(NtGdiGetDIBitsInternal(hDCScreen, hBitmap, 0, 15, (void*)data, &bmp.bi, DIB_RGB_COLORS, - DIB_BitmapMaxBitsSize(&bmp.bi, 15), 0) > 0); - RTEST(GetLastError() == ERROR_SUCCESS); - - RTEST(bmp.bi.bmiHeader.biWidth == 16); - RTEST(bmp.bi.bmiHeader.biHeight == 16); - RTEST(bmp.bi.bmiHeader.biBitCount == ScreenBpp); - RTEST(bmp.bi.bmiHeader.biSizeImage == (16 * 16) * (ScreenBpp / 8)); - - TEST(bmp.Colors[0].rgbRed != 0x44); - - /* Test a BITMAPCOREINFO structure */ - SetLastError(ERROR_SUCCESS); - ZeroMemory(&bic, sizeof(BITMAPCOREINFO)); - bic.bmciHeader.bcSize = sizeof(BITMAPCOREHEADER); - TEST(NtGdiGetDIBitsInternal(hDCScreen, hBitmap, 0, 15, NULL, (PBITMAPINFO)&bic, DIB_RGB_COLORS, - DIB_BitmapMaxBitsSize((PBITMAPINFO)&bic, 15), 0) > 0); - RTEST(GetLastError() == ERROR_SUCCESS); - - - ReleaseDC(NULL, hDCScreen); - DeleteObject(hBitmap); - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiGetFontResourceInfoInternalW.c b/rostests/apitests/w32knapi/ntgdi/NtGdiGetFontResourceInfoInternalW.c deleted file mode 100644 index ab6dd24fdcb..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiGetFontResourceInfoInternalW.c +++ /dev/null @@ -1,37 +0,0 @@ - -INT -Test_NtGdiGetFontResourceInfoInternalW(PTESTINFO pti) -{ - BOOL bRet; - DWORD dwBufSize; - LOGFONTW logfont; - UNICODE_STRING NtFileName; - - ASSERT(RtlDosPathNameToNtPathName_U(L".\\test.otf", - &NtFileName, - NULL, - NULL)); - - dwBufSize = sizeof(logfont); - memset(&logfont, 0x0, dwBufSize); - - bRet = NtGdiGetFontResourceInfoInternalW( - NtFileName.Buffer, - (NtFileName.Length / sizeof(WCHAR)) +1, - 1, - dwBufSize, - &dwBufSize, - &logfont, - 2); - - TEST(bRet != FALSE); - - printf("lfHeight = %ld\n", logfont.lfHeight); - printf("lfWidth = %ld\n", logfont.lfWidth); - printf("lfFaceName = %ls\n", logfont.lfFaceName); - -// RemoveFontResourceW(szFullFileName); - - return APISTATUS_NORMAL; -} - diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiGetRandomRgn.c b/rostests/apitests/w32knapi/ntgdi/NtGdiGetRandomRgn.c deleted file mode 100644 index a666a194c07..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiGetRandomRgn.c +++ /dev/null @@ -1,80 +0,0 @@ -INT -Test_NtGdiGetRandomRgn(PTESTINFO pti) -{ - HWND hWnd; - HDC hDC; - HRGN hrgn, hrgn2; - - /* Create a window */ - hWnd = CreateWindowW(L"BUTTON", L"TestWindow", WS_OVERLAPPEDWINDOW | WS_VISIBLE, - CW_USEDEFAULT, CW_USEDEFAULT, 100, 100, - NULL, NULL, g_hInstance, 0); -// UpdateWindow(hWnd); - hDC = GetDC(hWnd); - - ASSERT(hDC != NULL); - - hrgn = CreateRectRgn(0,0,0,0); - hrgn2 = CreateRectRgn(3,3,10,10); - SetLastError(ERROR_SUCCESS); - RTEST(NtGdiGetRandomRgn(0, hrgn, 0) == -1); - RTEST(GetLastError() == ERROR_INVALID_HANDLE); - - SetLastError(ERROR_SUCCESS); - RTEST(NtGdiGetRandomRgn((HDC)2345, hrgn, 1) == -1); - RTEST(GetLastError() == ERROR_INVALID_HANDLE); - - SetLastError(ERROR_SUCCESS); - RTEST(NtGdiGetRandomRgn((HDC)2345, hrgn, 10) == -1); - RTEST(GetLastError() == ERROR_INVALID_HANDLE); - - SetLastError(ERROR_SUCCESS); - RTEST(NtGdiGetRandomRgn((HDC)2345, (HRGN)10, 10) == -1); - RTEST(GetLastError() == ERROR_INVALID_HANDLE); - - SetLastError(ERROR_SUCCESS); - RTEST(NtGdiGetRandomRgn((HDC)2345, 0, 1) == -1); - RTEST(GetLastError() == ERROR_INVALID_HANDLE); - - SetLastError(ERROR_SUCCESS); - RTEST(NtGdiGetRandomRgn(hDC, 0, 0) == 0); - RTEST(NtGdiGetRandomRgn(hDC, 0, 1) == 0); - RTEST(NtGdiGetRandomRgn(hDC, (HRGN)-5, 0) == 0); - RTEST(NtGdiGetRandomRgn(hDC, (HRGN)-5, 1) == 0); - RTEST(NtGdiGetRandomRgn(hDC, hrgn, 0) == 0); - RTEST(NtGdiGetRandomRgn(hDC, hrgn, 1) == 0); - TEST(NtGdiGetRandomRgn(hDC, hrgn, 2) == 0); - RTEST(NtGdiGetRandomRgn(hDC, hrgn, 3) == 0); - RTEST(NtGdiGetRandomRgn(hDC, hrgn, 4) == 1); - RTEST(NtGdiGetRandomRgn(hDC, hrgn, 5) == 0); - RTEST(NtGdiGetRandomRgn(hDC, hrgn, 10) == 0); - RTEST(NtGdiGetRandomRgn(hDC, hrgn, -10) == 0); - RTEST(GetLastError() == ERROR_SUCCESS); - - SelectClipRgn(hDC, hrgn2); - RTEST(NtGdiGetRandomRgn(hDC, 0, 1) == -1); - RTEST(GetLastError() == ERROR_SUCCESS); - RTEST(NtGdiGetRandomRgn(hDC, hrgn, 1) == 1); - RTEST(CombineRgn(hrgn, hrgn, hrgn, RGN_OR) == SIMPLEREGION); - RTEST(CombineRgn(hrgn, hrgn, hrgn2, RGN_XOR) == NULLREGION); - - SetRectRgn(hrgn2,0,0,0,0); - SelectClipRgn(hDC, hrgn2); - RTEST(NtGdiGetRandomRgn(hDC, hrgn, 1) == 1); - - RTEST(CombineRgn(hrgn2, hrgn, hrgn2, RGN_XOR) == NULLREGION); - RTEST(CombineRgn(hrgn2, hrgn, hrgn, RGN_OR) == NULLREGION); - - SelectClipRgn(hDC, NULL); - RTEST(NtGdiGetRandomRgn(hDC, hrgn, 1) == 0); - - - RTEST(NtGdiGetRandomRgn(hDC, hrgn, 4) == 1); - - RTEST(GetLastError() == ERROR_SUCCESS); - - ReleaseDC(hWnd, hDC); - DestroyWindow(hWnd); - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiGetStockObject.c b/rostests/apitests/w32knapi/ntgdi/NtGdiGetStockObject.c deleted file mode 100644 index 9773ef5c381..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiGetStockObject.c +++ /dev/null @@ -1,137 +0,0 @@ - -INT -Test_NtGdiGetStockObject(PTESTINFO pti) -{ - HANDLE handle = NULL; - BITMAP bitmap; - - /* BRUSH testing */ - handle = (HANDLE) NtGdiGetStockObject(WHITE_BRUSH); - RTEST(handle != 0); - RTEST(GDI_HANDLE_GET_TYPE(handle) == GDI_OBJECT_TYPE_BRUSH); - RTEST(GDI_HANDLE_IS_STOCKOBJ(handle) == TRUE); - - handle = (HANDLE) NtGdiGetStockObject(LTGRAY_BRUSH); - RTEST(handle != 0); - RTEST(GDI_HANDLE_GET_TYPE(handle) == GDI_OBJECT_TYPE_BRUSH); - RTEST(GDI_HANDLE_IS_STOCKOBJ(handle) == TRUE); - - handle = (HANDLE) NtGdiGetStockObject(GRAY_BRUSH); - RTEST(handle != 0); - RTEST(GDI_HANDLE_GET_TYPE(handle) == GDI_OBJECT_TYPE_BRUSH); - RTEST(GDI_HANDLE_IS_STOCKOBJ(handle) == TRUE); - - handle = (HANDLE) NtGdiGetStockObject(DKGRAY_BRUSH); - RTEST(handle != 0); - RTEST(GDI_HANDLE_GET_TYPE(handle) == GDI_OBJECT_TYPE_BRUSH); - RTEST(GDI_HANDLE_IS_STOCKOBJ(handle) == TRUE); - - handle = (HANDLE) NtGdiGetStockObject(BLACK_BRUSH); - RTEST(handle != 0); - RTEST(GDI_HANDLE_GET_TYPE(handle) == GDI_OBJECT_TYPE_BRUSH); - RTEST(GDI_HANDLE_IS_STOCKOBJ(handle) == TRUE); - - handle = (HANDLE) NtGdiGetStockObject(NULL_BRUSH); - RTEST(handle != 0); - RTEST(GDI_HANDLE_GET_TYPE(handle) == GDI_OBJECT_TYPE_BRUSH); - RTEST(GDI_HANDLE_IS_STOCKOBJ(handle) == TRUE); - - /* PEN testing */ - handle = (HANDLE) NtGdiGetStockObject(WHITE_PEN); - RTEST(handle != 0); - RTEST(GDI_HANDLE_GET_TYPE(handle) == GDI_OBJECT_TYPE_PEN); - RTEST(GDI_HANDLE_IS_STOCKOBJ(handle) != 0); - - handle = (HANDLE) NtGdiGetStockObject(BLACK_PEN); - RTEST(handle != 0); - RTEST(GDI_HANDLE_GET_TYPE(handle) == GDI_OBJECT_TYPE_PEN); - RTEST(GDI_HANDLE_IS_STOCKOBJ(handle) != 0); - - handle = (HANDLE) NtGdiGetStockObject(NULL_PEN); - RTEST(handle != 0); - RTEST(GDI_HANDLE_GET_TYPE(handle) == GDI_OBJECT_TYPE_PEN); - RTEST(GDI_HANDLE_IS_STOCKOBJ(handle) == TRUE); - - /* Not inuse ? */ - RTEST(NtGdiGetStockObject(9) == 0); - - /* FONT testing */ - handle = (HANDLE) NtGdiGetStockObject(OEM_FIXED_FONT); - RTEST(handle != 0); - RTEST(GDI_HANDLE_GET_TYPE(handle) == GDI_OBJECT_TYPE_FONT); - RTEST(GDI_HANDLE_IS_STOCKOBJ(handle) != 0); - - handle = (HANDLE) NtGdiGetStockObject(ANSI_FIXED_FONT); - RTEST(handle != 0); - RTEST(GDI_HANDLE_GET_TYPE(handle) == GDI_OBJECT_TYPE_FONT); - RTEST(GDI_HANDLE_IS_STOCKOBJ(handle) == TRUE); - - handle = (HANDLE) NtGdiGetStockObject(ANSI_VAR_FONT); - RTEST(handle != 0); - RTEST(GDI_HANDLE_GET_TYPE(handle) == GDI_OBJECT_TYPE_FONT); - RTEST(GDI_HANDLE_IS_STOCKOBJ(handle) == TRUE); - - handle = (HANDLE) NtGdiGetStockObject(SYSTEM_FONT); - RTEST(handle != 0); - RTEST(GDI_HANDLE_GET_TYPE(handle) == GDI_OBJECT_TYPE_FONT); - RTEST(GDI_HANDLE_IS_STOCKOBJ(handle) == TRUE); - - handle = (HANDLE) NtGdiGetStockObject(DEVICE_DEFAULT_FONT); - RTEST(handle != 0); - RTEST(GDI_HANDLE_GET_TYPE(handle) == GDI_OBJECT_TYPE_FONT); - RTEST(GDI_HANDLE_IS_STOCKOBJ(handle) == TRUE); - - handle = (HANDLE) NtGdiGetStockObject(SYSTEM_FIXED_FONT); - RTEST(handle != 0); - RTEST(GDI_HANDLE_GET_TYPE(handle) == GDI_OBJECT_TYPE_FONT); - RTEST(GDI_HANDLE_IS_STOCKOBJ(handle) == TRUE); - - handle = (HANDLE) NtGdiGetStockObject(DEFAULT_GUI_FONT); - RTEST(handle != 0); - RTEST(GDI_HANDLE_GET_TYPE(handle) == GDI_OBJECT_TYPE_FONT); - RTEST(GDI_HANDLE_IS_STOCKOBJ(handle) == TRUE); - - /* PALETTE testing */ - handle = (HANDLE) NtGdiGetStockObject(DEFAULT_PALETTE); - RTEST(handle != 0); - RTEST(GDI_HANDLE_GET_TYPE(handle) == GDI_OBJECT_TYPE_PALETTE); - RTEST(GDI_HANDLE_IS_STOCKOBJ(handle) == TRUE); - - /* DC testing */ - handle = (HANDLE) NtGdiGetStockObject(DC_BRUSH); - RTEST(handle != 0); - RTEST(GDI_HANDLE_GET_TYPE(handle) == GDI_OBJECT_TYPE_BRUSH); - RTEST(GDI_HANDLE_IS_STOCKOBJ(handle) == TRUE); - - handle = (HANDLE) NtGdiGetStockObject(DC_PEN); - RTEST(handle != 0); - RTEST(GDI_HANDLE_GET_TYPE(handle) == GDI_OBJECT_TYPE_PEN); - RTEST(GDI_HANDLE_IS_STOCKOBJ(handle) == TRUE); - - - /* ? testing */ - handle = (HANDLE) NtGdiGetStockObject(20); - RTEST(handle != 0); - RTEST(GDI_HANDLE_GET_TYPE(handle) == GDI_OBJECT_TYPE_COLORSPACE); - RTEST(GDI_HANDLE_IS_STOCKOBJ(handle) == TRUE); - - /* value 21 is getting back 1x1 1Bpp Bitmap */ - handle = (HANDLE) NtGdiGetStockObject(21); - RTEST(handle != 0); - RTEST(GDI_HANDLE_GET_TYPE(handle) == GDI_OBJECT_TYPE_BITMAP); - RTEST(GDI_HANDLE_IS_STOCKOBJ(handle) == TRUE); - - RTEST(GetObject(handle, sizeof(BITMAP), &bitmap) == sizeof(BITMAP)); - RTEST(bitmap.bmType == 0); - RTEST(bitmap.bmWidth == 1); - RTEST(bitmap.bmHeight == 1); - RTEST(bitmap.bmWidthBytes == 2); - RTEST(bitmap.bmPlanes == 1); - RTEST(bitmap.bmBitsPixel == 1); - RTEST(bitmap.bmBits == 0); - - - RTEST(NtGdiGetStockObject(22) == 0); - RTEST(NtGdiGetStockObject(23) == 0); - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiPolyPolyDraw.c b/rostests/apitests/w32knapi/ntgdi/NtGdiPolyPolyDraw.c deleted file mode 100644 index 1b2dbc408a0..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiPolyPolyDraw.c +++ /dev/null @@ -1,208 +0,0 @@ - - -static -INT -Test_Params(PTESTINFO pti) -{ - ULONG_PTR ret; - ULONG Count1[4] = {3, 2, 4, 3}; - ULONG Count2[2] = {0, 3}; - ULONG Count3[2] = {0, 0}; - ULONG Count4[2] = {1, 3}; - ULONG Count5[2] = {0x80000001, 0x80000001}; - POINT Points[6] = {{0,0}, {1,1}, {3,-3}, {-2,2}, {4,2}, {2,4}}; - HDC hDC; - - SetLastError(0); - ret = NtGdiPolyPolyDraw(NULL, NULL, NULL, 0, 0); - TEST(ret == 0); - TEST(GetLastError() == 0); - - SetLastError(0); - ret = NtGdiPolyPolyDraw(NULL, NULL, NULL, 0, 1); - TEST(ret == 0); - TEST(GetLastError() == 0); - - SetLastError(0); - ret = NtGdiPolyPolyDraw(NULL, NULL, NULL, 0, 2); - TEST(ret == 0); - TEST(GetLastError() == 0); - - SetLastError(0); - ret = NtGdiPolyPolyDraw(NULL, NULL, NULL, 0, 3); - TEST(ret == 0); - TEST(GetLastError() == 0); - - SetLastError(0); - ret = NtGdiPolyPolyDraw(NULL, NULL, NULL, 0, 4); - TEST(ret == 0); - TEST(GetLastError() == 0); - - SetLastError(0); - ret = NtGdiPolyPolyDraw(NULL, NULL, NULL, 0, 5); - TEST(ret == 0); - TEST(GetLastError() == 0); - - SetLastError(0); - ret = NtGdiPolyPolyDraw(NULL, NULL, NULL, 0, 6); - TEST(ret == 0); - TEST(GetLastError() == 0); - -//////////////////////////////////////////////////////////////////////////////// - - /* Test with an invalid DC */ - - SetLastError(0); - ret = NtGdiPolyPolyDraw(0, Points, Count1, 2, 1); - TEST(ret == 0); - TEST(GetLastError() == ERROR_INVALID_HANDLE); - - hDC = (HDC)0x12345; - - SetLastError(0); - ret = NtGdiPolyPolyDraw(hDC, Points, Count1, 2, 0); - TEST(ret == 0); - TEST(GetLastError() == 0); - - SetLastError(0); - ret = NtGdiPolyPolyDraw(hDC, Points, Count1, 2, 1); - TEST(ret == 0); - TEST(GetLastError() == ERROR_INVALID_HANDLE); - - SetLastError(0); - ret = NtGdiPolyPolyDraw(hDC, Points, Count1, 2, 2); - TEST(ret == 0); - TEST(GetLastError() == ERROR_INVALID_HANDLE); - - SetLastError(0); - ret = NtGdiPolyPolyDraw(hDC, Points, Count1, 2, 3); - TEST(ret == 0); - TEST(GetLastError() == ERROR_INVALID_HANDLE); - - SetLastError(0); - ret = NtGdiPolyPolyDraw(hDC, Points, Count1, 2, 4); - TEST(ret == 0); - TEST(GetLastError() == ERROR_INVALID_HANDLE); - - SetLastError(0); - ret = NtGdiPolyPolyDraw(hDC, Points, Count1, 2, 5); - TEST(ret == 0); - TEST(GetLastError() == ERROR_INVALID_HANDLE); - - SetLastError(0); - ret = NtGdiPolyPolyDraw(hDC, Points, Count1, 2, 6); - TEST(ret == 0); - TEST(GetLastError() == 0); - - SetLastError(0); - ret = NtGdiPolyPolyDraw((HDC)1, Points, Count1, 1, 6); - TEST((ret & GDI_HANDLE_BASETYPE_MASK) == GDI_OBJECT_TYPE_REGION); - TEST(GetLastError() == 0); - - SetLastError(0); - ret = NtGdiPolyPolyDraw((HDC)0, Points, Count1, 1, 6); - TEST(ret == 0); - TEST(GetLastError() == 0); - - SetLastError(0); - ret = NtGdiPolyPolyDraw(hDC, Points, Count1, 0, 1); - TEST(ret == 0); - TEST(GetLastError() == 0); - - SetLastError(0); - ret = NtGdiPolyPolyDraw(hDC, Points, Count2, 2, 1); - TEST(ret == 0); - TEST(GetLastError() == ERROR_INVALID_HANDLE); - - SetLastError(0); - ret = NtGdiPolyPolyDraw(hDC, Points, NULL, 2, 1); - TEST(ret == 0); - TEST(GetLastError() == 0); - - SetLastError(0); - ret = NtGdiPolyPolyDraw(hDC, Points, (PVOID)0x81000000, 2, 1); - TEST(ret == 0); - TEST(GetLastError() == 0); - - SetLastError(0); - ret = NtGdiPolyPolyDraw(hDC, NULL, Count1, 2, 1); - TEST(ret == 0); - TEST(GetLastError() == 0); - - SetLastError(0); - ret = NtGdiPolyPolyDraw(hDC, (PVOID)0x81000000, Count1, 2, 1); - TEST(ret == 0); - TEST(GetLastError() == 0); - - -//////////////////////////////////////////////////////////////////////////////// - - /* Test with a valid DC */ - - hDC = CreateCompatibleDC(NULL); - ASSERT(hDC); - - SetLastError(0); - ret = NtGdiPolyPolyDraw(hDC, Points, Count1, 2, 0); - TEST(ret == 0); - TEST(GetLastError() == 0); - - SetLastError(0); - ret = NtGdiPolyPolyDraw(hDC, Points, Count1, 2, 1); - TEST(ret == 1); - TEST(GetLastError() == 0); - - SetLastError(0); - ret = NtGdiPolyPolyDraw(hDC, Points, Count1, 2, 2); - TEST(ret == 1); - TEST(GetLastError() == 0); - -#if 0 - SetLastError(0); - // better don't do this on win xp!!! (random crashes) -// ret = NtGdiPolyPolyDraw(hDC, Points, Count1, 2, 3); - TEST(ret == 0); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - SetLastError(0); - // better don't do this on win xp!!! (random crashes) -// ret = NtGdiPolyPolyDraw(hDC, Points, Count1, 2, 4); - TEST(ret == 0); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - -#endif - - SetLastError(0); - ret = NtGdiPolyPolyDraw(hDC, Points, Count2, 2, 1); - TEST(ret == 0); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - SetLastError(0); - ret = NtGdiPolyPolyDraw(hDC, Points, Count3, 2, 1); - TEST(ret == 0); - TEST(GetLastError() == 0); - - SetLastError(0); - ret = NtGdiPolyPolyDraw(hDC, Points, Count4, 2, 1); - TEST(ret == 0); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - SetLastError(0); - ret = NtGdiPolyPolyDraw(hDC, Points, Count5, 2, 1); - TEST(ret == 0); - TEST(GetLastError() == 87); - - return APISTATUS_NORMAL; -} - - - - -INT -Test_NtGdiPolyPolyDraw(PTESTINFO pti) -{ - Test_Params(pti); - - return APISTATUS_NORMAL; -} - diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiRestoreDC.c b/rostests/apitests/w32knapi/ntgdi/NtGdiRestoreDC.c deleted file mode 100644 index fd14a50c214..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiRestoreDC.c +++ /dev/null @@ -1,192 +0,0 @@ - - -static HBRUSH hbrush; -static HBITMAP hbitmap; -static HPEN hpen; -static HFONT hfont; -static HRGN hrgn, hrgn2; - -static -void -SetSpecialDCState(HDC hdc) -{ - /* Select spcial Objects */ - SelectObject(hdc, hbrush); - SelectObject(hdc, hpen); - SelectObject(hdc, hbitmap); - SelectObject(hdc, hfont); - SelectObject(hdc, hrgn); - - /* Colors */ - SetDCBrushColor(hdc, RGB(12,34,56)); - SetDCPenColor(hdc, RGB(23,34,45)); - - /* Coordinates */ - SetMapMode(hdc, MM_ANISOTROPIC); - SetGraphicsMode(hdc, GM_ADVANCED); - SetWindowOrgEx(hdc, 12, 34, NULL); - SetViewportOrgEx(hdc, 56, 78, NULL); - SetWindowExtEx(hdc, 123, 456, NULL); - SetViewportExtEx(hdc, 234, 567, NULL); - - - -} - -static -void -SetSpecialDCState2(HDC hdc) -{ - /* Select spcial Objects */ - SelectObject(hdc, GetStockObject(DC_BRUSH)); - SelectObject(hdc, GetStockObject(DC_PEN)); - SelectObject(hdc, GetStockObject(DEFAULT_BITMAP)); - SelectObject(hdc, GetStockObject(DEFAULT_GUI_FONT)); - SelectObject(hdc, hrgn2); - - /* Colors */ - SetDCBrushColor(hdc, RGB(65,43,21)); - SetDCPenColor(hdc, RGB(54,43,32)); - - /* Coordinates */ - SetMapMode(hdc, MM_ISOTROPIC); - SetGraphicsMode(hdc, GM_COMPATIBLE); - SetWindowOrgEx(hdc, 43, 21, NULL); - SetViewportOrgEx(hdc, 87, 65, NULL); - SetWindowExtEx(hdc, 654, 321, NULL); - SetViewportExtEx(hdc, 765, 432, NULL); - - -} - -static -void -Test_IsSpecialState(PTESTINFO pti, HDC hdc, BOOL bMemDC) -{ - POINT pt; - SIZE sz; - - /* Test Objects */ - TEST(SelectObject(hdc, GetStockObject(DC_BRUSH)) == hbrush); - TEST(SelectObject(hdc, GetStockObject(DC_PEN)) == hpen); - TEST(SelectObject(hdc, GetStockObject(DEFAULT_GUI_FONT)) == hfont); - if (bMemDC) - { - TEST(SelectObject(hdc, GetStockObject(DEFAULT_BITMAP)) == hbitmap); - TEST(SelectObject(hdc, hrgn2) == (PVOID)1); - } - else - { - TEST(SelectObject(hdc, GetStockObject(DEFAULT_BITMAP)) == 0); - TEST(SelectObject(hdc, hrgn2) == (PVOID)2); - } - - /* Test colors */ - TEST(GetDCBrushColor(hdc) == RGB(12,34,56)); - TEST(GetDCPenColor(hdc) == RGB(23,34,45)); - - /* Test coordinates */ - TEST(GetMapMode(hdc) == MM_ANISOTROPIC); - TEST(GetGraphicsMode(hdc) == GM_ADVANCED); - GetWindowOrgEx(hdc, &pt); - TEST(pt.x == 12); - TEST(pt.y == 34); - GetViewportOrgEx(hdc, &pt); - TEST(pt.x == 56); - TEST(pt.y == 78); - GetWindowExtEx(hdc, &sz); - TESTX(sz.cx == 123, "sz.cx == %ld\n", sz.cx); - TESTX(sz.cy == 456, "sz.cy == %ld\n", sz.cy); - GetViewportExtEx(hdc, &sz); - TEST(sz.cx == 234); - TEST(sz.cy == 567); - - -} - - -static -void -Test_SaveRestore(PTESTINFO pti, HDC hdc, BOOL bMemDC) -{ - SetSpecialDCState(hdc); - NtGdiSaveDC(hdc); - SetSpecialDCState2(hdc); - - SetLastError(0); - TEST(NtGdiRestoreDC(hdc, 2) == 0); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - SetLastError(0); - TEST(NtGdiRestoreDC(hdc, 0) == 0); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - SetLastError(0); - TEST(NtGdiRestoreDC(hdc, -2) == 0); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - SetLastError(0); - TEST(NtGdiRestoreDC(hdc, 1) == 1); - TEST(GetLastError() == 0); - - Test_IsSpecialState(pti, hdc, bMemDC); -} - - -INT -Test_NtGdiRestoreDC(PTESTINFO pti) -{ - HDC hdc; - - hdc = CreateCompatibleDC(0); - ASSERT(IsHandleValid(hdc)); - - SetLastError(0); - TEST(NtGdiRestoreDC(0, -10) == 0); - TEST(GetLastError() == ERROR_INVALID_HANDLE); - - SetLastError(0); - TEST(NtGdiRestoreDC(hdc, 0) == 0); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - SetLastError(0); - TEST(NtGdiRestoreDC(hdc, 1) == 0); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - /* Initialize objects */ - hbrush = CreateSolidBrush(12345); - ASSERT(IsHandleValid(hbrush)); - hpen = CreatePen(PS_SOLID, 4, RGB(10,12,32)); - ASSERT(IsHandleValid(hpen)); - hbitmap = CreateBitmap(10, 10, 1, 1, NULL); - ASSERT(IsHandleValid(hbitmap)); - hfont = CreateFont(10, 0, 0, 0, FW_NORMAL, 0, 0, 0, ANSI_CHARSET, - OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, - DEFAULT_PITCH, "Arial"); - ASSERT(IsHandleValid(hfont)); - hrgn = CreateRectRgn(12, 14, 14, 17); - ASSERT(IsHandleValid(hrgn)); - hrgn2 = CreateRectRgn(1, 1, 2, 2); - ASSERT(IsHandleValid(hrgn2)); - - /* Test mem dc */ - Test_SaveRestore(pti, hdc, TRUE); - DeleteDC(hdc); - - /* Test screen DC */ - hdc = GetDC(0); - ASSERT(IsHandleValid(hdc)); - Test_SaveRestore(pti, hdc, FALSE); - ReleaseDC(0, hdc); - - /* Test info dc */ - hdc = CreateICW(L"DISPLAY", NULL, NULL, NULL); - ASSERT(IsHandleValid(hdc)); - Test_SaveRestore(pti, hdc, FALSE); - DeleteDC(hdc); - - - - return APISTATUS_NORMAL; -} - diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiSaveDC.c b/rostests/apitests/w32knapi/ntgdi/NtGdiSaveDC.c deleted file mode 100644 index 2163776f387..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiSaveDC.c +++ /dev/null @@ -1,78 +0,0 @@ - -INT -Test_NtGdiSaveDC(PTESTINFO pti) -{ - HDC hdc, hdc2; - HWND hwnd; - HBITMAP hbmp1, hbmp2, hOldBmp; - - /* Test 0 hdc */ - TEST(NtGdiSaveDC(0) == 0); - - /* Test info dc */ - hdc = CreateICW(L"DISPLAY",NULL,NULL,NULL); - TEST(hdc); - TEST(NtGdiSaveDC(hdc) == 1); - TEST(NtGdiSaveDC(hdc) == 2); - DeleteDC(hdc); - - /* Test display dc */ - hdc = GetDC(0); - TEST(hdc); - TEST(NtGdiSaveDC(hdc) == 1); - TEST(NtGdiSaveDC(hdc) == 2); - ReleaseDC(0, hdc); - - /* Test a mem DC */ - hdc = CreateCompatibleDC(0); - TEST(hdc); - TEST(NtGdiSaveDC(hdc) == 1); - TEST(NtGdiSaveDC(hdc) == 2); - DeleteDC(hdc); - - /* Create a window */ - hwnd = CreateWindowW(L"BUTTON", L"TestWindow", WS_OVERLAPPEDWINDOW | WS_VISIBLE, - 10, 10, 100, 100, - NULL, NULL, g_hInstance, 0); - hdc = GetDC(hwnd); - TEST(hdc); - TEST(NtGdiSaveDC(hdc) == 1); - NtGdiRestoreDC(hdc, 1); - ReleaseDC(hwnd, hdc); - DestroyWindow(hwnd); - - /* test behaviour when a bitmap is selected */ - hbmp1 = CreateBitmap(2, 2, 1, 1, NULL); - TEST(hbmp1); - hbmp2 = CreateBitmap(2, 2, 1, 1, NULL); - TEST(hbmp2); - hdc = CreateCompatibleDC(0); - TEST(hdc); - hdc2 = CreateCompatibleDC(0); - TEST(hdc2); - hOldBmp = SelectObject(hdc, hbmp1); - TEST(hOldBmp); - TEST(NtGdiSaveDC(hdc) == 1); - TEST(SelectObject(hdc, hbmp2) == hbmp1); - TEST(SelectObject(hdc2, hbmp1) == NULL); - SelectObject(hdc, hOldBmp); - NtGdiRestoreDC(hdc, 1); - TEST(GetCurrentObject(hdc, OBJ_BITMAP) == hbmp1); - /* Again, just to be sure */ - TEST(NtGdiSaveDC(hdc) == 1); - TEST(NtGdiSaveDC(hdc) == 2); - TEST(SelectObject(hdc, hbmp2) == hbmp1); - TEST(SelectObject(hdc2, hbmp1) == NULL); - SelectObject(hdc, hOldBmp); - NtGdiRestoreDC(hdc, 2); - TEST(GetCurrentObject(hdc, OBJ_BITMAP) == hbmp1); - /*Cleanup */ - SelectObject(hdc, hOldBmp); - DeleteDC(hdc); - DeleteDC(hdc2); - DeleteObject(hbmp1); - DeleteObject(hbmp2); - - return APISTATUS_NORMAL; -} - diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiSelectBitmap.c b/rostests/apitests/w32knapi/ntgdi/NtGdiSelectBitmap.c deleted file mode 100644 index c45243e50e2..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiSelectBitmap.c +++ /dev/null @@ -1,113 +0,0 @@ - -INT -Test_SelectDIBSection(PTESTINFO pti) -{ - HDC hdc; - HBITMAP hbmp; - struct - { - BITMAPINFOHEADER bmiHeader; - RGBQUAD bmiColors[100]; - } bmi; - PBITMAPINFO pbmi = (PBITMAPINFO)&bmi; - PVOID pvBits; - - hdc = CreateCompatibleDC(0); - ASSERT(hdc); - - bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bmi.bmiHeader.biWidth = 2; - bmi.bmiHeader.biHeight = 2; - bmi.bmiHeader.biPlanes = 1; - bmi.bmiHeader.biBitCount = 1; - bmi.bmiHeader.biCompression = BI_RGB; - bmi.bmiHeader.biSizeImage = 0; - bmi.bmiHeader.biXPelsPerMeter = 100; - bmi.bmiHeader.biYPelsPerMeter = 100; - bmi.bmiHeader.biClrUsed = 2; - bmi.bmiHeader.biClrImportant = 2; - - hbmp = CreateDIBSection(hdc, pbmi, DIB_PAL_COLORS, &pvBits, NULL, 0); - ASSERT(hbmp); - - TEST(NtGdiSelectBitmap(hdc, hbmp) != 0); - - return 0; -} - - -INT -Test_NtGdiSelectBitmap(PTESTINFO pti) -{ - HDC hDC; - HBITMAP hBmp, hOldBmp; - HPALETTE hOldPalette, hPalette; - LOGPALETTE logpal = {0x300, 1, {{12,13,14,15}}}; - - hBmp = CreateBitmap(2,2,1,1,NULL); - ASSERT(hBmp); - - /* We cannot select a bitmap into a display DC */ - hDC = GetDC(NULL); - ASSERT(hDC); - hOldBmp = NtGdiSelectBitmap(hDC, hBmp); - TEST(hOldBmp == NULL); - - hDC = CreateCompatibleDC(GetDC(NULL)); - ASSERT(hDC); - - /* Check the palette before we mess it up*/ - hPalette = CreatePalette(&logpal); - hOldPalette = SelectPalette(hDC, hPalette, 0); - TEST(hOldPalette == GetStockObject(DEFAULT_PALETTE)); - - /* Test NULL DC */ - SetLastError(ERROR_SUCCESS); - hOldBmp = NtGdiSelectBitmap(NULL, hBmp); - TEST(hOldBmp == NULL); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test invalid DC */ - SetLastError(ERROR_SUCCESS); - hOldBmp = NtGdiSelectBitmap((HDC)((ULONG_PTR)hDC & 0x0000ffff), hBmp); - TEST(hOldBmp == NULL); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test NULL bitmap */ - SetLastError(ERROR_SUCCESS); - hOldBmp = NtGdiSelectBitmap(hDC, NULL); - TEST(hOldBmp == NULL); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test bitmap with only index */ - SetLastError(ERROR_SUCCESS); - hOldBmp = NtGdiSelectBitmap(hDC, (HBITMAP)((ULONG_PTR)hBmp & 0x0000ffff)); - TEST(hOldBmp == NULL); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test valid bitmap */ - SetLastError(ERROR_SUCCESS); - hOldBmp = NtGdiSelectBitmap(hDC, hBmp); - TEST(hOldBmp != NULL); - /* The default bitmap should be GetStockObject(21) */ - TEST(hOldBmp == GetStockObject(21)); - - /* Check the palette */ - hOldPalette = SelectPalette(hDC, hOldPalette, 0); - TEST(hOldPalette == hPalette); - DeleteObject(hPalette); - - /* Select the old one again and check */ - hOldBmp = NtGdiSelectBitmap(hDC, hOldBmp); - TEST(hOldBmp == hBmp); - TEST(GetLastError() == ERROR_SUCCESS); - - /* cleanup */ - DeleteObject(hBmp); - DeleteDC(hDC); - - Test_SelectDIBSection(pti); - - return APISTATUS_NORMAL; -} - diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiSelectBrush.c b/rostests/apitests/w32knapi/ntgdi/NtGdiSelectBrush.c deleted file mode 100644 index ba39232165f..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiSelectBrush.c +++ /dev/null @@ -1,67 +0,0 @@ -INT -Test_NtGdiSelectBrush(PTESTINFO pti) -{ - HDC hDC; - HBRUSH hBrush, hOldBrush; - DC_ATTR *pdcattr; - - hDC = CreateDCW(L"DISPLAY", NULL, NULL, NULL); - - hBrush = GetStockObject(GRAY_BRUSH); - - /* Test NULL DC */ - SetLastError(ERROR_SUCCESS); - hOldBrush = NtGdiSelectBrush(NULL, hBrush); - TEST(hOldBrush == NULL); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test invalid DC */ - SetLastError(ERROR_SUCCESS); - hOldBrush = NtGdiSelectBrush((HDC)((ULONG_PTR)hDC & 0x0000ffff), hBrush); - TEST(hOldBrush == NULL); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test NULL brush */ - SetLastError(ERROR_SUCCESS); - hOldBrush = NtGdiSelectBrush(hDC, NULL); - TEST(hOldBrush == NULL); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test invalid brush */ - SetLastError(ERROR_SUCCESS); - hOldBrush = NtGdiSelectBrush(hDC, (HBRUSH)((ULONG_PTR)hBrush & 0x0000ffff)); - TEST(hOldBrush == NULL); - TEST(GetLastError() == ERROR_SUCCESS); - - SetLastError(ERROR_SUCCESS); - hOldBrush = NtGdiSelectBrush(hDC, hBrush); - TEST(hOldBrush != NULL); - hOldBrush = NtGdiSelectBrush(hDC, hOldBrush); - TEST(hOldBrush == hBrush); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Begin with a white brush */ - NtGdiSelectBrush(hDC, GetStockObject(WHITE_BRUSH)); - /* Select a brush in user mode */ - SelectObject(hDC, GetStockObject(BLACK_BRUSH)); - /* See what we get returned */ - hOldBrush = NtGdiSelectBrush(hDC, GetStockObject(WHITE_BRUSH)); - TEST(hOldBrush == GetStockObject(BLACK_BRUSH)); - - - /* Begin with a white brush */ - NtGdiSelectBrush(hDC, GetStockObject(WHITE_BRUSH)); - - pdcattr = GetHandleUserData(hDC); - /* Change the brush in user mode, without setting flags */ - pdcattr->hbrush = (HBRUSH)12345; - - hOldBrush = NtGdiSelectBrush(hDC, GetStockObject(BLACK_BRUSH)); - TEST(hOldBrush == (HBRUSH)12345); - - - DeleteDC(hDC); - - return APISTATUS_NORMAL; -} - diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiSelectFont.c b/rostests/apitests/w32knapi/ntgdi/NtGdiSelectFont.c deleted file mode 100644 index acba727e60e..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiSelectFont.c +++ /dev/null @@ -1,47 +0,0 @@ -INT -Test_NtGdiSelectFont(PTESTINFO pti) -{ - HDC hDC; - HFONT hFont, hOldFont; - - hDC = CreateDCW(L"DISPLAY", NULL, NULL, NULL); - - hFont = GetStockObject(DEFAULT_GUI_FONT); - - /* Test NULL DC */ - SetLastError(ERROR_SUCCESS); - hOldFont = NtGdiSelectFont(NULL, hFont); - TEST(hOldFont == NULL); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test invalid DC */ - SetLastError(ERROR_SUCCESS); - hOldFont = NtGdiSelectFont((HDC)((ULONG_PTR)hDC & 0x0000ffff), hFont); - TEST(hOldFont == NULL); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test NULL font */ - SetLastError(ERROR_SUCCESS); - hOldFont = NtGdiSelectFont(hDC, NULL); - TEST(hOldFont == NULL); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test invalid font */ - SetLastError(ERROR_SUCCESS); - hOldFont = NtGdiSelectFont(hDC, (HFONT)((ULONG_PTR)hFont & 0x0000ffff)); - TEST(hOldFont == NULL); - TEST(GetLastError() == ERROR_SUCCESS); - - SetLastError(ERROR_SUCCESS); - hOldFont = NtGdiSelectFont(hDC, hFont); - TEST(hOldFont != NULL); - hOldFont = NtGdiSelectFont(hDC, hOldFont); - TEST(hOldFont == hFont); - TEST(GetLastError() == ERROR_SUCCESS); - - - DeleteDC(hDC); - - return APISTATUS_NORMAL; -} - diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiSelectPen.c b/rostests/apitests/w32knapi/ntgdi/NtGdiSelectPen.c deleted file mode 100644 index e9f67134549..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiSelectPen.c +++ /dev/null @@ -1,71 +0,0 @@ -INT -Test_NtGdiSelectPen(PTESTINFO pti) -{ - HDC hDC; - HPEN hPen, hOldPen; - LOGBRUSH logbrush; - - hDC = GetDC(NULL); - ASSERT(hDC); - - hPen = GetStockObject(WHITE_PEN); - - /* Test NULL DC */ - SetLastError(ERROR_SUCCESS); - hOldPen = NtGdiSelectPen(NULL, hPen); - TEST(hOldPen == NULL); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test invalid DC */ - SetLastError(ERROR_SUCCESS); - hOldPen = NtGdiSelectPen((HDC)((ULONG_PTR)hDC & 0x0000ffff), hPen); - TEST(hOldPen == NULL); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test NULL pen */ - SetLastError(ERROR_SUCCESS); - hOldPen = NtGdiSelectPen(hDC, NULL); - TEST(hOldPen == NULL); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test invalid pen */ - SetLastError(ERROR_SUCCESS); - hOldPen = NtGdiSelectPen(hDC, (HPEN)((ULONG_PTR)hPen & 0x0000ffff)); - TEST(hOldPen == NULL); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test valid pen */ - SelectObject(hDC, GetStockObject(BLACK_PEN)); - SetLastError(ERROR_SUCCESS); - hOldPen = NtGdiSelectPen(hDC, hPen); - TEST(hOldPen == GetStockObject(BLACK_PEN)); - hOldPen = NtGdiSelectPen(hDC, hOldPen); - TEST(hOldPen == hPen); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test extpen */ - SetLastError(ERROR_SUCCESS); - logbrush.lbStyle = BS_SOLID; - logbrush.lbColor = RGB(0x12,0x34,0x56); - hPen = ExtCreatePen(PS_COSMETIC|PS_ALTERNATE, 1, &logbrush, 0, NULL); - ASSERT(hPen); - hOldPen = NtGdiSelectPen(hDC, hPen); - TEST(hOldPen != NULL); - hOldPen = NtGdiSelectPen(hDC, hOldPen); - TEST(hOldPen == hPen); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test deleting pen */ - SetLastError(ERROR_SUCCESS); - hOldPen = NtGdiSelectPen(hDC, hPen); - TEST(DeleteObject(hPen) == 1); - hOldPen = NtGdiSelectPen(hDC, hOldPen); - TEST(hOldPen == hPen); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test that fallback pen is BLACK_PEN */ - - DeleteDC(hDC); - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiSetBitmapBits.c b/rostests/apitests/w32knapi/ntgdi/NtGdiSetBitmapBits.c deleted file mode 100644 index 466cfcb2885..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiSetBitmapBits.c +++ /dev/null @@ -1,62 +0,0 @@ -INT -Test_NtGdiSetBitmapBits(PTESTINFO pti) -{ - BYTE Bits[50] = {0,1,2,3,4,5,6,7,8,9}; - HBITMAP hBitmap; - - SetLastError(ERROR_SUCCESS); - RTEST(NtGdiSetBitmapBits(0, 0, 0) == 0); - RTEST(GetLastError() == ERROR_SUCCESS); - - /* Test NULL bitnap handle */ - SetLastError(ERROR_SUCCESS); - RTEST(NtGdiSetBitmapBits(0, 5, Bits) == 0); - RTEST(GetLastError() == ERROR_INVALID_HANDLE); - - /* Test invalid bitmap handle */ - hBitmap = (HBITMAP)CreatePen(PS_SOLID, 1, RGB(1,2,3)); - SetLastError(ERROR_SUCCESS); - RTEST(NtGdiSetBitmapBits(hBitmap, 5, Bits) == 0); - RTEST(GetLastError() == ERROR_INVALID_HANDLE); - DeleteObject(hBitmap); - - hBitmap = CreateBitmap(3, 3, 1, 8, NULL); - SetLastError(ERROR_SUCCESS); - - /* test NULL pointer and count buffer size != 0 */ - RTEST(NtGdiSetBitmapBits(hBitmap, 5, NULL) == 0); - - /* test NULL pointer and buffer size == 0*/ - RTEST(NtGdiSetBitmapBits(hBitmap, 0, NULL) == 0); - - /* test bad pointer */ - RTEST(NtGdiSetBitmapBits(hBitmap, 5, (PBYTE)0x500) == 0); - - /* Test if we can set a number of bytes between lines */ - RTEST(NtGdiSetBitmapBits(hBitmap, 5, Bits) == 5); - - /* Test alignment */ - RTEST(NtGdiSetBitmapBits(hBitmap, 4, Bits+1) == 4); - - /* Test 1 byte too much */ - RTEST(NtGdiSetBitmapBits(hBitmap, 10, Bits) == 10); - - /* Test one row too much */ - RTEST(NtGdiSetBitmapBits(hBitmap, 12, Bits) == 12); - - RTEST(NtGdiSetBitmapBits(hBitmap, 13, Bits) == 12); - - RTEST(NtGdiSetBitmapBits(hBitmap, 100, Bits) == 12); - - /* Test huge bytes count */ - TEST(NtGdiSetBitmapBits(hBitmap, 12345678, Bits) == 0); - - /* Test negative bytes count */ - RTEST(NtGdiSetBitmapBits(hBitmap, -5, Bits) == 0); - - RTEST(GetLastError() == ERROR_SUCCESS); - - DeleteObject(hBitmap); - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntgdi/NtGdiSetDIBitsToDeviceInternal.c b/rostests/apitests/w32knapi/ntgdi/NtGdiSetDIBitsToDeviceInternal.c deleted file mode 100644 index 7ba68af96a2..00000000000 --- a/rostests/apitests/w32knapi/ntgdi/NtGdiSetDIBitsToDeviceInternal.c +++ /dev/null @@ -1,92 +0,0 @@ - -void -ReadBits(HDC hDC, PDWORD OutBits) -{ - int x,y; - - for (y = 0; y < 8; y++) - { - DWORD Row = 0; - for (x = 0; x < 8; x++) - Row |= (0x80 & GetPixel(hDC, 2 + x, 3 + y)) >> x; - OutBits[y] = Row; - } -} - - -INT -Test_NtGdiSetDIBitsToDeviceInternal(PTESTINFO pti) -{ - static const DWORD InBits[8] = { 0x81, 0x7E, 0x5A, 0x7E, 0x7E, 0x42, 0x7E, 0x81 }; - DWORD OutBits[8]; - XFORM xform; - - HWND hWnd = CreateWindowW(L"Static", NULL, WS_VISIBLE, - 100, 100, 200, 200, - NULL, NULL, NULL, NULL); - /* This DC has an nonzero origin */ - HDC hDC = GetDC(hWnd); - struct - { - BITMAPINFOHEADER bmiHeader; - RGBQUAD bmiColors[2]; - } bmi; - int x, y; - - bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bmi.bmiHeader.biWidth = 8; - bmi.bmiHeader.biHeight = -8; - bmi.bmiHeader.biPlanes = 1; - bmi.bmiHeader.biBitCount = 1; - bmi.bmiHeader.biCompression = 0; - bmi.bmiHeader.biSizeImage = 0; - bmi.bmiHeader.biXPelsPerMeter = 0; - bmi.bmiHeader.biYPelsPerMeter = 0; - bmi.bmiHeader.biClrUsed = 0; - bmi.bmiHeader.biClrImportant = 0; - *(DWORD *)&bmi.bmiColors[0] = 0x000000; - *(DWORD *)&bmi.bmiColors[1] = 0xFFFFFF; - - /* The destination coordinates are relative to the DC origin */ - TEST(NtGdiSetDIBitsToDeviceInternal(hDC, 2, 3, 8, 8, 0, 0, 0, 8, - (PVOID)InBits, (BITMAPINFO *)&bmi, DIB_RGB_COLORS, - sizeof(InBits), sizeof(bmi), TRUE, NULL)); - - /* Now get the data from the screen, and see if it matches */ - ReadBits(hDC, OutBits); - - TEST(memcmp(InBits, OutBits, sizeof(InBits)) == 0); - - /* Change transformation */ - GetWorldTransform(hDC, &xform); - xform.eM11 = 2; - xform.eM22 = 2; - xform.eDx = 10; - SetWorldTransform(hDC, &xform); - - TEST(NtGdiSetDIBitsToDeviceInternal(hDC, 2, 3, 8, 8, 0, 0, 0, 8, - (PVOID)InBits, (BITMAPINFO *)&bmi, DIB_RGB_COLORS, - sizeof(InBits), sizeof(bmi), TRUE, NULL)); - - xform.eM11 = 1; - xform.eM22 = 1; - xform.eDx = 0; - SetWorldTransform(hDC, &xform); - - /* Now get the data from the screen, and see if it matches */ - for (y = 0; y < 8; y++) - { - DWORD Row = 0; - for (x = 0; x < 8; x++) - Row |= (0x80 & GetPixel(hDC, 2 + x, 3 + y)) >> x; - OutBits[y] = Row; - } - - TEST(memcmp(InBits, OutBits, sizeof(InBits)) == 0); - - - ReleaseDC(hWnd, hDC); - DestroyWindow(hWnd); - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntuser/NtUserCallHwnd.c b/rostests/apitests/w32knapi/ntuser/NtUserCallHwnd.c deleted file mode 100644 index 012dc62cfe9..00000000000 --- a/rostests/apitests/w32knapi/ntuser/NtUserCallHwnd.c +++ /dev/null @@ -1,56 +0,0 @@ - -INT -Test_HwndRoutine_DeregisterShellHookWindow(PTESTINFO pti, HWND hWnd) -{ - TEST(NtUserCallHwnd(hWnd, _HWND_ROUTINE_DEREGISTERSHELLHOOKWINDOW) == TRUE); - return APISTATUS_NORMAL; -} - -INT -Test_HwndRoutine_GetWindowContextHelpId (PTESTINFO pti, HWND hWnd) -{ - TEST(NtUserCallHwndParam(hWnd, 0xbadb00b, _HWNDPARAM_ROUTINE_SETWNDCONTEXTHLPID) == TRUE); - TEST(NtUserCallHwnd(hWnd, _HWND_ROUTINE_GETWNDCONTEXTHLPID) == 0xbadb00b); - return APISTATUS_NORMAL; -} - -INT -Test_HwndRoutine_SetMsgBox(PTESTINFO pti, HWND hWnd) -{ - TEST(NtUserCallHwnd(hWnd, 0x49) != FALSE); - return APISTATUS_NORMAL; -} - - - -INT -Test_NtUserCallHwnd(PTESTINFO pti) -{ - HWND hWnd; - - hWnd = CreateWindowA("BUTTON", - "Test", - BS_PUSHBUTTON | WS_VISIBLE, - 0, - 0, - 50, - 30, - NULL, - NULL, - g_hInstance, - 0); - ASSERT(hWnd); - - SetLastError(ERROR_SUCCESS); - TEST(NtUserCallHwnd(hWnd, 0x44) == FALSE); - Test_HwndRoutine_DeregisterShellHookWindow(pti, hWnd); /* 0x45 */ - TEST(NtUserCallHwnd(hWnd, 0x46) == FALSE); // DWP_GetEnabledPopup - Test_HwndRoutine_GetWindowContextHelpId (pti, hWnd); /* 0x47 */ - TEST(NtUserCallHwnd(hWnd, 0x48) == TRUE); - Test_HwndRoutine_SetMsgBox(pti, hWnd); /* 0x49 */ - TEST(GetLastError() == ERROR_SUCCESS); - - DestroyWindow(hWnd); - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntuser/NtUserCallHwndLock.c b/rostests/apitests/w32knapi/ntuser/NtUserCallHwndLock.c deleted file mode 100644 index 0178346b7ab..00000000000 --- a/rostests/apitests/w32knapi/ntuser/NtUserCallHwndLock.c +++ /dev/null @@ -1,100 +0,0 @@ - - -HMENU g_hMenu; - -INT -Test_HwndLockRoutine_WindowHasShadow (PTESTINFO pti, HWND hWnd) /* 0x53 */ -{ -// TEST(NtUserCallHwndLock(hWnd, 0x53) == 0); - return APISTATUS_NORMAL; -} - - -INT -Test_HwndLockRoutine_ArrangeIconicWindows(PTESTINFO pti, HWND hWnd) /* 0x54 */ -{ -// TEST(NtUserCallHwndLock(hWnd, _HWNDLOCK_ROUTINE_ARRANGEICONICWINDOWS) == 0); - return APISTATUS_NORMAL; -} - -INT -Test_HwndLockRoutine_DrawMenuBar(PTESTINFO pti, HWND hWnd) /* 0x55 */ -{ - TEST(NtUserCallHwndLock(hWnd, 0x55) == 1); - return APISTATUS_NORMAL; -} - -INT -Test_HwndLockRoutine_CheckImeShowStatusInThread(PTESTINFO pti, HWND hWnd) /* 0x56 */ -{ - TEST(NtUserCallHwndLock(hWnd, 0x56) != 0); - return APISTATUS_NORMAL; -} - -INT -Test_HwndLockRoutine_GetSysMenuHandle(PTESTINFO pti, HWND hWnd) /* 0x57 */ -{ - NtUserCallHwndLock(hWnd, 0x5c); -// HMENU hMenu = (HMENU)NtUserCallHwndLock(hWnd, 0x57); -// TEST(hMenu != 0); - return APISTATUS_NORMAL; -} - -INT -Test_HwndLockRoutine_RedrawFrame(PTESTINFO pti, HWND hWnd) /* 0x58 */ -{ -// TEST(NtUserCallHwndLock(hWnd, 0x68) != 0); - return APISTATUS_NORMAL; -} - -INT -Test_HwndLockRoutine_UpdateWindow(PTESTINFO pti, HWND hWnd) /* 0x5e */ -{ - TEST(NtUserCallHwndLock(hWnd, 0x5e) == 1); - return APISTATUS_NORMAL; -} - -INT -Test_NtUserCallHwndLock(PTESTINFO pti) -{ - HWND hWnd; - g_hMenu = CreateMenu(); - - hWnd = CreateWindowA("BUTTON", - "Test", - BS_PUSHBUTTON | WS_VISIBLE, - 0, - 0, - 50, - 30, - NULL, - g_hMenu, - g_hInstance, - 0); - ASSERT(hWnd); - - SetLastError(ERROR_SUCCESS); - TEST(NtUserCallHwndLock((HWND)-22, 999) == 0); - TEST(GetLastError() == ERROR_INVALID_WINDOW_HANDLE); - - SetLastError(ERROR_SUCCESS); - TEST(NtUserCallHwndLock((HWND)0, 0x55) == 0); - TEST(GetLastError() == ERROR_INVALID_WINDOW_HANDLE); - - SetLastError(ERROR_SUCCESS); - TEST(NtUserCallHwndLock(hWnd, 999) == 0); - TEST(GetLastError() == ERROR_SUCCESS); - - Test_HwndLockRoutine_WindowHasShadow (pti, hWnd); /* 0x53 */ - Test_HwndLockRoutine_ArrangeIconicWindows(pti, hWnd); - Test_HwndLockRoutine_DrawMenuBar(pti, hWnd); - Test_HwndLockRoutine_CheckImeShowStatusInThread(pti, hWnd); - Test_HwndLockRoutine_GetSysMenuHandle(pti, hWnd); - Test_HwndLockRoutine_RedrawFrame(pti, hWnd); - - Test_HwndLockRoutine_UpdateWindow(pti, hWnd); - - DestroyWindow(hWnd); - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntuser/NtUserCallHwndOpt.c b/rostests/apitests/w32knapi/ntuser/NtUserCallHwndOpt.c deleted file mode 100644 index 078e626e08a..00000000000 --- a/rostests/apitests/w32knapi/ntuser/NtUserCallHwndOpt.c +++ /dev/null @@ -1,25 +0,0 @@ - - -INT -Test_HwndOptRoutine_SetProgmanWindow(PTESTINFO pti) /* 0x4a */ -{ -// NtUserCallHwndOpt(hWnd, HWNDOPT_ROUTINE_SETPROGMANWINDOW); - return APISTATUS_NORMAL; -} - -INT -Test_HwndOptRoutine_SetTaskmanWindow (PTESTINFO pti) /* 0x4b */ -{ -// NtUserCallHwndOpt(hWnd, HWNDOPT_ROUTINE_SETTASKMANWINDOW); - return APISTATUS_NORMAL; -} - -INT -Test_NtUserCallHwndOpt(PTESTINFO pti) -{ - - Test_HwndOptRoutine_SetProgmanWindow(pti); /* 0x4a */ - Test_HwndOptRoutine_SetTaskmanWindow (pti); /* 0x4b */ - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntuser/NtUserCallHwndParam.c b/rostests/apitests/w32knapi/ntuser/NtUserCallHwndParam.c deleted file mode 100644 index 36a4fb493f4..00000000000 --- a/rostests/apitests/w32knapi/ntuser/NtUserCallHwndParam.c +++ /dev/null @@ -1,34 +0,0 @@ - -INT -Test_HwndParamRoutine_SetWindowContextHelpId (PTESTINFO pti, HWND hWnd) -{ - TEST(NtUserCallHwndParam(hWnd, 12345, _HWNDPARAM_ROUTINE_SETWNDCONTEXTHLPID) == TRUE); - TEST(NtUserCallHwnd(hWnd, _HWND_ROUTINE_GETWNDCONTEXTHLPID) == 12345); - return APISTATUS_NORMAL; -} - - -INT -Test_NtUserCallHwndParam(PTESTINFO pti) -{ - HWND hWnd; - - hWnd = CreateWindowA("BUTTON", - "Test", - BS_PUSHBUTTON | WS_VISIBLE, - 0, - 0, - 50, - 30, - NULL, - NULL, - g_hInstance, - 0); - ASSERT(hWnd); - - Test_HwndParamRoutine_SetWindowContextHelpId (pti, hWnd); - - DestroyWindow(hWnd); - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntuser/NtUserCallHwndParamLock.c b/rostests/apitests/w32knapi/ntuser/NtUserCallHwndParamLock.c deleted file mode 100644 index 9d12583b719..00000000000 --- a/rostests/apitests/w32knapi/ntuser/NtUserCallHwndParamLock.c +++ /dev/null @@ -1,7 +0,0 @@ - - -INT -Test_NtUserCallHwndParamLock(PTESTINFO pti) -{ - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntuser/NtUserCallNoParam.c b/rostests/apitests/w32knapi/ntuser/NtUserCallNoParam.c deleted file mode 100644 index c282f1db859..00000000000 --- a/rostests/apitests/w32knapi/ntuser/NtUserCallNoParam.c +++ /dev/null @@ -1,69 +0,0 @@ - -INT -Test_NoParamRoutine_CreateMenu(PTESTINFO pti) /* 0 */ -{ - HMENU hMenu; - - hMenu = (HMENU)NtUserCallNoParam(_NOPARAM_ROUTINE_CREATEMENU); - TEST(IsMenu(hMenu) == TRUE); - DestroyMenu(hMenu); - - return APISTATUS_NORMAL; -} - -INT -Test_NoParamRoutine_CreatePopupMenu(PTESTINFO pti) /* 1 */ -{ - HMENU hMenu; - - hMenu = (HMENU)NtUserCallNoParam(_NOPARAM_ROUTINE_CREATEMENUPOPUP); - TEST(IsMenu(hMenu) == TRUE); - DestroyMenu(hMenu); - - return APISTATUS_NORMAL; -} - -INT -Test_NoParamRoutine_DisableProcessWindowsGhosting(PTESTINFO pti) /* 2 */ -{ - return APISTATUS_NORMAL; -} - -INT -Test_NoParamRoutine_ClearWakeMask(PTESTINFO pti) /* 3 */ -{ - return APISTATUS_NORMAL; -} - -INT -Test_NoParamRoutine_AllowForegroundActivation(PTESTINFO pti) /* 4 */ -{ - return APISTATUS_NORMAL; -} - -INT -Test_NoParamRoutine_DestroyCaret(PTESTINFO pti) /* 5 */ -{ - return APISTATUS_NORMAL; -} - -INT -Test_NoParamRoutine_LoadUserApiHook(PTESTINFO pti) /* 0x1d */ -{ - DWORD dwRet; - dwRet = NtUserCallNoParam(_NOPARAM_ROUTINE_LOADUSERAPIHOOK); - -// TEST(dwRet != 0); - return APISTATUS_NORMAL; -} - - -INT -Test_NtUserCallNoParam(PTESTINFO pti) -{ - Test_NoParamRoutine_CreateMenu(pti); - Test_NoParamRoutine_CreatePopupMenu(pti); - Test_NoParamRoutine_LoadUserApiHook(pti); /* 0x1d */ - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntuser/NtUserCallOneParam.c b/rostests/apitests/w32knapi/ntuser/NtUserCallOneParam.c deleted file mode 100644 index 519d8e8887c..00000000000 --- a/rostests/apitests/w32knapi/ntuser/NtUserCallOneParam.c +++ /dev/null @@ -1,95 +0,0 @@ - -INT -Test_OneParamRoutine_BeginDeferWindowPos(PTESTINFO pti) /* 0x1e */ -{ - HDWP hWinPosInfo; - - hWinPosInfo = (HDWP)NtUserCallOneParam(5, 0x1e); - TEST(hWinPosInfo != 0); - TEST(EndDeferWindowPos(hWinPosInfo) != 0); - - return APISTATUS_NORMAL; -} - -INT -Test_OneParamRoutine_WindowFromDC(PTESTINFO pti) /* 0x1f */ -{ - HDC hDC = GetDC(NULL); - HWND hWnd; - - hWnd = (HWND)NtUserCallOneParam((DWORD)hDC, 0x1f); - TEST(hWnd != 0); - TEST(IsWindow(hWnd)); - TEST(hWnd == GetDesktopWindow()); - - return APISTATUS_NORMAL; -} - -INT -Test_OneParamRoutine_CreateEmptyCurObject(PTESTINFO pti) /* XP/2k3 : 0x21, vista 0x25 */ -{ - HICON hIcon ; - - /* Test 0 */ - hIcon = (HICON) NtUserCallOneParam(0, _ONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT); - TEST(hIcon != NULL); - - TEST(NtUserDestroyCursor(hIcon, 0) == TRUE); - - /* Test Garbage */ - hIcon = (HICON) NtUserCallOneParam(0xdeadbeef, _ONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT); - TEST(hIcon != NULL); - - TEST(NtUserDestroyCursor(hIcon, 0xbaadf00d) == TRUE); - - return APISTATUS_NORMAL; -} - -INT -Test_OneParamRoutine_MapDesktopObject(PTESTINFO pti) /* 0x30 */ -{ - DWORD pObject; - HWND hWnd; - HMENU hMenu; - - hWnd = GetDesktopWindow(); - pObject = NtUserCallOneParam((DWORD)hWnd, _ONEPARAM_ROUTINE_MAPDEKTOPOBJECT); - TEST(pObject > 0); - TEST(pObject < 0x80000000); - - hMenu = CreateMenu(); - pObject = NtUserCallOneParam((DWORD)hMenu, _ONEPARAM_ROUTINE_MAPDEKTOPOBJECT); - DestroyMenu(hMenu); - TEST(pObject > 0); - TEST(pObject < 0x80000000); - - return APISTATUS_NORMAL; -} - -INT -Test_OneParamRoutine_SwapMouseButtons(PTESTINFO pti) /* 0x42 */ -{ - BOOL bInverse; - - NtUserCallOneParam(TRUE, _ONEPARAM_ROUTINE_SWAPMOUSEBUTTON); - bInverse = (BOOL)NtUserCallOneParam(FALSE, _ONEPARAM_ROUTINE_SWAPMOUSEBUTTON); - TEST(bInverse == TRUE); - bInverse = (BOOL)NtUserCallOneParam(FALSE, _ONEPARAM_ROUTINE_SWAPMOUSEBUTTON); - TEST(bInverse == FALSE); - - // TODO: test other values - return APISTATUS_NORMAL; -} - -INT -Test_NtUserCallOneParam(PTESTINFO pti) -{ - Test_OneParamRoutine_BeginDeferWindowPos(pti); /* 0x1e */ - Test_OneParamRoutine_WindowFromDC(pti); /* 0x1f */ - Test_OneParamRoutine_CreateEmptyCurObject(pti); /* XP/2k3 : 0x21, vista 0x25 */ - Test_OneParamRoutine_MapDesktopObject(pti); /* 0x30 */ - - Test_OneParamRoutine_SwapMouseButtons(pti); /* 0x42 */ - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntuser/NtUserCountClipboardFormats.c b/rostests/apitests/w32knapi/ntuser/NtUserCountClipboardFormats.c deleted file mode 100644 index 7a51f87e940..00000000000 --- a/rostests/apitests/w32knapi/ntuser/NtUserCountClipboardFormats.c +++ /dev/null @@ -1,15 +0,0 @@ -/* First the call stub */ -DWORD WINAPI -NtUserCountClipboardFormats(VOID) -{ - DWORD p; - return Syscall(L"NtUserCountClipboardFormats", 0, &p); -} - -INT -Test_NtUserCountClipboardFormats(PTESTINFO pti) -{ - RTEST(NtUserCountClipboardFormats() < 1000); - return APISTATUS_NORMAL; -} - diff --git a/rostests/apitests/w32knapi/ntuser/NtUserEnumDisplayMonitors.c b/rostests/apitests/w32knapi/ntuser/NtUserEnumDisplayMonitors.c deleted file mode 100644 index a250621d860..00000000000 --- a/rostests/apitests/w32knapi/ntuser/NtUserEnumDisplayMonitors.c +++ /dev/null @@ -1,52 +0,0 @@ - -ULONG gMonitorCount = 0; -HDC ghdcMonitor = 0; -RECT grcMonitor = {0}; - -BOOL -NTAPI -NtUserEnumDisplayMonitors1( - HDC hDC, - LPCRECT lprcClip, - MONITORENUMPROC lpfnEnum, - LPARAM dwData) -{ - return (INT)Syscall(L"NtUserEnumDisplayMonitors", 4, &hDC); -} - -BOOL CALLBACK -MonitorEnumProc( - HMONITOR hMonitor, - HDC hdcMonitor, - LPRECT lprcMonitor, - LPARAM dwData) -{ - gMonitorCount++; - if (gMonitorCount == 1) - { - ghdcMonitor = hdcMonitor; - grcMonitor = *lprcMonitor; - } - return TRUE; -} - -INT -Test_NtUserEnumDisplayMonitors(PTESTINFO pti) -{ - BOOL ret; - - // WILL crash! -// TEST(NtUserEnumDisplayMonitors1(NULL, NULL, NULL, 0) == 0); - - ret = NtUserEnumDisplayMonitors1(0, NULL, MonitorEnumProc, 0); - TEST(ret == TRUE); - TEST(gMonitorCount > 0); - TEST(ghdcMonitor == 0); - TEST(grcMonitor.left == 0); - TEST(grcMonitor.right > 0); - TEST(grcMonitor.top == 0); - TEST(grcMonitor.bottom > 0); - - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntuser/NtUserEnumDisplaySettings.c b/rostests/apitests/w32knapi/ntuser/NtUserEnumDisplaySettings.c deleted file mode 100644 index 2b741277599..00000000000 --- a/rostests/apitests/w32knapi/ntuser/NtUserEnumDisplaySettings.c +++ /dev/null @@ -1,99 +0,0 @@ - -static struct -{ - DEVMODEW devmode; - CHAR buffer[0xffff]; -} data; - -INT -TEST_NtUserEnumDisplaySettings(PTESTINFO pti) -{ - UNICODE_STRING usDeviceName; - WCHAR szName[] = L"DISPLAY"; - NTSTATUS Status; - INT i; - - SetLastError(ERROR_SUCCESS); - Status = NtUserEnumDisplaySettings(NULL, 0, 0, 0); - TEST(Status == STATUS_ACCESS_VIOLATION); - TEST(GetLastError() == ERROR_SUCCESS); - - data.devmode.dmDriverExtra = 0; - for (i = 0; i < 2 * sizeof(DEVMODEW); i++) - { - data.devmode.dmSize = i; - Status = NtUserEnumDisplaySettings(NULL, 1000, (DEVMODEW*)&data, 0); - if (i != sizeof(DEVMODEW)) - { - TEST(Status == STATUS_BUFFER_TOO_SMALL); - } - } - TEST(GetLastError() == ERROR_SUCCESS); - - usDeviceName.Buffer = NULL; - usDeviceName.Length = 0; - usDeviceName.MaximumLength = 0; - Status = NtUserEnumDisplaySettings(&usDeviceName, ENUM_CURRENT_SETTINGS, (DEVMODEW*)&data, 0); - TEST(Status == STATUS_BUFFER_TOO_SMALL); - Status = NtUserEnumDisplaySettings(&usDeviceName, -4, (DEVMODEW*)&data, 0); - TEST(Status == STATUS_BUFFER_TOO_SMALL); - - data.devmode.dmSize = sizeof(DEVMODEW); - data.devmode.dmDriverExtra = 0xffff; - Status = NtUserEnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, (DEVMODEW*)&data, 0); - TEST(Status == STATUS_SUCCESS); - - data.devmode.dmSize = sizeof(DEVMODEW); - data.devmode.dmDriverExtra = 0; - Status = NtUserEnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, (DEVMODEW*)&data, 0); - TEST(Status == STATUS_SUCCESS); - - usDeviceName.Buffer = NULL; - usDeviceName.Length = 0; - usDeviceName.MaximumLength = 0; - Status = NtUserEnumDisplaySettings(&usDeviceName, ENUM_CURRENT_SETTINGS, (DEVMODEW*)&data, 0); - TEST(Status == STATUS_INVALID_PARAMETER_1); - Status = NtUserEnumDisplaySettings(&usDeviceName, -4, (DEVMODEW*)&data, 0); - TEST(Status == STATUS_INVALID_PARAMETER_1); - - Status = NtUserEnumDisplaySettings(NULL, 0, (DEVMODEW*)&data, 0); - TEST(Status == STATUS_SUCCESS); - Status = NtUserEnumDisplaySettings(NULL, 1, (DEVMODEW*)&data, 0); - TEST(Status == STATUS_SUCCESS); - Status = NtUserEnumDisplaySettings(NULL, 2, (DEVMODEW*)&data, 0); - TEST(Status == STATUS_SUCCESS); - Status = NtUserEnumDisplaySettings(NULL, 4, (DEVMODEW*)&data, 0); - TEST(Status == STATUS_SUCCESS); - Status = NtUserEnumDisplaySettings(NULL, 8, (DEVMODEW*)&data, 0); - TEST(Status == STATUS_SUCCESS); - - Status = NtUserEnumDisplaySettings(NULL, 247, (DEVMODEW*)&data, 0); - TEST(Status == STATUS_SUCCESS); - Status = NtUserEnumDisplaySettings(NULL, 248, (DEVMODEW*)&data, 0); - TEST(Status == STATUS_INVALID_PARAMETER_2); - - Status = NtUserEnumDisplaySettings(NULL, -1, (DEVMODEW*)&data, 0); - TEST(Status == STATUS_SUCCESS); - Status = NtUserEnumDisplaySettings(NULL, -2, (DEVMODEW*)&data, 0); - TEST(Status == STATUS_SUCCESS); - Status = NtUserEnumDisplaySettings(NULL, -3, (DEVMODEW*)&data, 0); - TEST(Status == STATUS_SUCCESS); - Status = NtUserEnumDisplaySettings(NULL, -4, (DEVMODEW*)&data, 0); - TEST(Status == STATUS_INVALID_PARAMETER_2); - - Status = NtUserEnumDisplaySettings(&usDeviceName, ENUM_CURRENT_SETTINGS, (DEVMODEW*)&data, 0); - TEST(Status == STATUS_INVALID_PARAMETER_1); - - usDeviceName.Buffer = szName; - usDeviceName.Length = wcslen(szName); - usDeviceName.MaximumLength = usDeviceName.Length; - Status = NtUserEnumDisplaySettings(&usDeviceName, ENUM_CURRENT_SETTINGS, (DEVMODEW*)&data, 0); - TEST(Status == STATUS_INVALID_PARAMETER_1); - - Status = NtUserEnumDisplaySettings(&usDeviceName, 1000, (DEVMODEW*)&data, 123456); - TEST(Status == STATUS_INVALID_PARAMETER_1); - - TEST(GetLastError() == ERROR_SUCCESS); - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntuser/NtUserFindExistingCursorIcon.c b/rostests/apitests/w32knapi/ntuser/NtUserFindExistingCursorIcon.c deleted file mode 100644 index f6ba4f9f100..00000000000 --- a/rostests/apitests/w32knapi/ntuser/NtUserFindExistingCursorIcon.c +++ /dev/null @@ -1,7 +0,0 @@ -INT -Test_NtUserFindExistingCursoricon(PTESTINFO pti) -{ - - return APISTATUS_NORMAL; -} - diff --git a/rostests/apitests/w32knapi/ntuser/NtUserGetClassInfo.c b/rostests/apitests/w32knapi/ntuser/NtUserGetClassInfo.c deleted file mode 100644 index 11dad25c9ff..00000000000 --- a/rostests/apitests/w32knapi/ntuser/NtUserGetClassInfo.c +++ /dev/null @@ -1,58 +0,0 @@ -BOOL -NTAPI -NtUserGetClassInfo2( - HINSTANCE hInstance, - PUNICODE_STRING ClassName, - LPWNDCLASSEXW wcex, - LPWSTR *ppwstr, - BOOL Ansi) -{ - return (BOOL)Syscall(L"NtUserGetClassInfo", 5, &hInstance); -} - -INT -Test_NtUserGetClassInfo(PTESTINFO pti) -{ - WNDCLASSEXW wclex, wclex2 = {0}; - UNICODE_STRING us; - PWSTR pwstr; - - us.Length = 8; - us.MaximumLength = 8; - us.Buffer = L"test"; - - wclex.cbSize = sizeof(WNDCLASSEXW); - wclex.style = 0; - wclex.lpfnWndProc = NULL; - wclex.cbClsExtra = 2; - wclex.cbWndExtra = 4; - wclex.hInstance = g_hInstance; - wclex.hIcon = NULL; - wclex.hCursor = NULL; - wclex.hbrBackground = CreateSolidBrush(RGB(4,7,5)); - wclex.lpszMenuName = L"MyMenu"; - wclex.lpszClassName = us.Buffer; - wclex.hIconSm = NULL; - - ASSERT(RegisterClassExW(&wclex) != 0); - - TEST(GetClassInfoExW(g_hInstance, us.Buffer, &wclex) != 0); - wclex2.cbSize = sizeof(WNDCLASSEXW); - TEST(NtUserGetClassInfo2(g_hInstance, &us, &wclex2, &pwstr, 0) != 0); - - TEST(pwstr == wclex.lpszMenuName); - TEST(wclex2.cbSize == wclex.cbSize); - TEST(wclex2.style == wclex.style); - TEST(wclex2.lpfnWndProc == wclex.lpfnWndProc); - TEST(wclex2.cbClsExtra == wclex.cbClsExtra); - TEST(wclex2.cbWndExtra == wclex.cbWndExtra); - TEST(wclex2.hInstance == wclex.hInstance); - TEST(wclex2.hIcon == wclex.hIcon); - TEST(wclex2.hCursor == wclex.hCursor); - TEST(wclex2.hbrBackground == wclex.hbrBackground); - TEST(wclex2.lpszMenuName == 0); - TEST(wclex2.lpszClassName == 0); - TEST(wclex2.hIconSm == wclex.hIconSm); - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntuser/NtUserGetIconInfo.c b/rostests/apitests/w32knapi/ntuser/NtUserGetIconInfo.c deleted file mode 100644 index 2b4fd81a7f5..00000000000 --- a/rostests/apitests/w32knapi/ntuser/NtUserGetIconInfo.c +++ /dev/null @@ -1,149 +0,0 @@ -INT -Test_NtUserGetIconInfo(PTESTINFO pti) -{ - HICON hIcon; - ICONINFO iinfo; - HBITMAP mask, color; - UNICODE_STRING hInstStr; - UNICODE_STRING ResourceStr; - DWORD bpp = 0; - - ZeroMemory(&iinfo, sizeof(ICONINFO)); - - /* BASIC TESTS */ - hIcon = (HICON) NtUserCallOneParam(0, _ONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT); - TEST(hIcon != NULL); - - /* Last param is unknown */ - TEST(NtUserGetIconInfo(hIcon, &iinfo, NULL, NULL, NULL, FALSE) == FALSE); - TEST(NtUserGetIconInfo(hIcon, &iinfo, NULL, NULL, NULL, TRUE) == FALSE); - - TEST(NtUserDestroyCursor(hIcon, 0) == TRUE); - - mask = CreateBitmap(16,16,1,1,NULL); - color = CreateBitmap(16,16,1,16,NULL); - - iinfo.hbmMask = mask; - iinfo.hbmColor = color ; - iinfo.fIcon = TRUE; - iinfo.xHotspot = 8; - iinfo.yHotspot = 8; - - hIcon = CreateIconIndirect(&iinfo); - TEST(hIcon!=NULL); - - // TODO : test last parameter... - TEST(NtUserGetIconInfo(hIcon, &iinfo, NULL, NULL, NULL, FALSE) == TRUE); - - TEST(iinfo.hbmMask != NULL); - TEST(iinfo.hbmColor != NULL); - TEST(iinfo.fIcon == TRUE); - TEST(iinfo.yHotspot == 8); - TEST(iinfo.xHotspot == 8); - - TEST(iinfo.hbmMask != mask); - TEST(iinfo.hbmColor != color); - - /* Does it make a difference? */ - TEST(NtUserGetIconInfo(hIcon, &iinfo, NULL, NULL, NULL, TRUE) == TRUE); - - TEST(iinfo.hbmMask != NULL); - TEST(iinfo.hbmColor != NULL); - TEST(iinfo.fIcon == TRUE); - TEST(iinfo.yHotspot == 8); - TEST(iinfo.xHotspot == 8); - - TEST(iinfo.hbmMask != mask); - TEST(iinfo.hbmColor != color); - - DeleteObject(mask); - DeleteObject(color); - - DestroyIcon(hIcon); - - /* Test full param, with local icon */ - hIcon = LoadImageA(GetModuleHandle(NULL), - MAKEINTRESOURCE(IDI_ICON), - IMAGE_ICON, - 0, - 0, - LR_DEFAULTSIZE); - - TEST(hIcon != NULL); - - RtlInitUnicodeString(&hInstStr, NULL); - RtlInitUnicodeString(&ResourceStr, NULL); - - TEST(NtUserGetIconInfo(hIcon, - &iinfo, - &hInstStr, - &ResourceStr, - &bpp, - FALSE) == TRUE); - - TESTX(hInstStr.Buffer == NULL, "hInstStr.buffer : %p\n", hInstStr.Buffer); - TEST((LPCTSTR)ResourceStr.Buffer == MAKEINTRESOURCE(IDI_ICON)); - TEST(bpp == 32); - - /* Last param doesn't seem to matter*/ - TEST(NtUserGetIconInfo(hIcon, - &iinfo, - &hInstStr, - &ResourceStr, - &bpp, - TRUE) == TRUE); - - TESTX(hInstStr.Buffer == NULL, "hInstStr.buffer : %p\n", hInstStr.Buffer); - TEST((LPCTSTR)ResourceStr.Buffer == MAKEINTRESOURCE(IDI_ICON)); - TEST(bpp == 32); - - DestroyIcon(hIcon); - - /* Test full param, with foreign icon */ - hIcon = LoadImageA(GetModuleHandleA("shell32.dll"), - MAKEINTRESOURCE(293), - IMAGE_ICON, - 0, - 0, - LR_DEFAULTSIZE); - - TEST(hIcon != NULL); - - RtlInitUnicodeString(&hInstStr, NULL); - RtlInitUnicodeString(&ResourceStr, NULL); - - TEST(NtUserGetIconInfo(hIcon, - &iinfo, - &hInstStr, - &ResourceStr, - &bpp, - FALSE) == TRUE); - - TESTX(hInstStr.Buffer == NULL, "hInstStr.buffer : %p\n", hInstStr.Buffer); - TEST(hInstStr.Length == 0); - TEST(hInstStr.MaximumLength == 0); - TEST((LPCTSTR)ResourceStr.Buffer == MAKEINTRESOURCE(293)); - TEST(ResourceStr.Length == 0); - TEST(ResourceStr.MaximumLength == 0); - TEST(bpp == 32); - - RtlInitUnicodeString(&hInstStr, NULL); - RtlInitUnicodeString(&ResourceStr, NULL); - - TEST(NtUserGetIconInfo(hIcon, - &iinfo, - &hInstStr, - &ResourceStr, - &bpp, - TRUE) == TRUE); - - TESTX(hInstStr.Buffer == NULL, "hInstStr.buffer : %p\n", hInstStr.Buffer); - TEST(hInstStr.Length == 0); - TEST(hInstStr.MaximumLength == 0); - TEST((LPCTSTR)ResourceStr.Buffer == MAKEINTRESOURCE(293)); - TEST(bpp == 32); - - DestroyIcon(hIcon); - - return APISTATUS_NORMAL; -} \ No newline at end of file diff --git a/rostests/apitests/w32knapi/ntuser/NtUserGetTitleBarInfo.c b/rostests/apitests/w32knapi/ntuser/NtUserGetTitleBarInfo.c deleted file mode 100644 index 3980680fd7d..00000000000 --- a/rostests/apitests/w32knapi/ntuser/NtUserGetTitleBarInfo.c +++ /dev/null @@ -1,40 +0,0 @@ -INT -Test_NtUserGetTitleBarInfo(PTESTINFO pti) -{ - HWND hWnd; - TITLEBARINFO tbi; - - hWnd = CreateWindowA("BUTTON", - "Test", - BS_PUSHBUTTON | WS_VISIBLE, - 0, - 0, - 50, - 30, - NULL, - NULL, - g_hInstance, - 0); - - ASSERT(hWnd); - - /* FALSE case */ - /* no windows handle */ - TEST(NtUserGetTitleBarInfo(NULL, &tbi) == FALSE); - /* no TITLEBARINFO struct */ - TEST(NtUserGetTitleBarInfo(hWnd, NULL) == FALSE); - /* nothing */ - TEST(NtUserGetTitleBarInfo(NULL, NULL) == FALSE); - /* wrong size */ - tbi.cbSize = 0; - TEST(NtUserGetTitleBarInfo(hWnd, &tbi) == FALSE); - - /* TRUE case */ - tbi.cbSize = sizeof(TITLEBARINFO); - TEST(NtUserGetTitleBarInfo(hWnd, &tbi) == TRUE); - - DestroyWindow(hWnd); - - return APISTATUS_NORMAL; -} - diff --git a/rostests/apitests/w32knapi/ntuser/NtUserProcessConnect.c b/rostests/apitests/w32knapi/ntuser/NtUserProcessConnect.c deleted file mode 100644 index c870fd64907..00000000000 --- a/rostests/apitests/w32knapi/ntuser/NtUserProcessConnect.c +++ /dev/null @@ -1,24 +0,0 @@ - -INT -Test_NtUserProcessConnect(PTESTINFO pti) -{ - HANDLE hProcess; - NTSTATUS Status; - USERCONNECT UserConnect = {0}; - - hProcess = GetCurrentProcess(); - - UserConnect.ulVersion = MAKELONG(0, 5); - Status = NtUserProcessConnect(hProcess, (USERCONNECT*)&UserConnect, sizeof(USERCONNECT)); - TEST(NT_SUCCESS(Status)); - - printf("UserConnect.ulVersion = 0x%lx\n", UserConnect.ulVersion); - printf("UserConnect.ulCurrentVersion = 0x%lx\n", UserConnect.ulCurrentVersion); - printf("UserConnect.dwDispatchCount = 0x%lx\n", UserConnect.dwDispatchCount); - printf("UserConnect.siClient.psi = 0x%p\n", UserConnect.siClient.psi); - printf("UserConnect.siClient.aheList = 0x%p\n", UserConnect.siClient.aheList); - printf("UserConnect.siClient.pDispInfo = 0x%p\n", UserConnect.siClient.pDispInfo); - printf("UserConnect.siClient.ulSharedDelta = 0x%lx\n", UserConnect.siClient.ulSharedDelta); - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntuser/NtUserRedrawWindow.c b/rostests/apitests/w32knapi/ntuser/NtUserRedrawWindow.c deleted file mode 100644 index 5284e13d510..00000000000 --- a/rostests/apitests/w32knapi/ntuser/NtUserRedrawWindow.c +++ /dev/null @@ -1,30 +0,0 @@ -INT -Test_NtUserRedrawWindow(PTESTINFO pti) -{ - HWND hWnd; - RECT rect; - - hWnd = CreateWindowA("BUTTON", - "Test", - BS_PUSHBUTTON | WS_VISIBLE, - 0, - 0, - 50, - 30, - NULL, - NULL, - g_hInstance, - 0); - ASSERT(hWnd); - - rect.left = 0; - rect.top = 0; - rect.right = 10; - rect.bottom = 10; - - TEST(NtUserRedrawWindow(hWnd, &rect, NULL, RDW_VALIDATE) == TRUE); - - DestroyWindow(hWnd); - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntuser/NtUserScrollDC.c b/rostests/apitests/w32knapi/ntuser/NtUserScrollDC.c deleted file mode 100644 index 7c1b48d7f6e..00000000000 --- a/rostests/apitests/w32knapi/ntuser/NtUserScrollDC.c +++ /dev/null @@ -1,111 +0,0 @@ - - -INT -Test_NtUserScrollDC(PTESTINFO pti) -{ - HWND hWnd; - HDC hDC; - HRGN hRgn, hTmpRgn; - RECT rcScroll, rcClip, rcUpdate; - RECT rect = {0,0,100,100}; - INT Result; - - hWnd = CreateWindowA("BUTTON", - "Test", - BS_PUSHBUTTON | WS_VISIBLE, - 0, - 0, - 50, - 100, - NULL, - NULL, - g_hInstance, - 0); - ASSERT(hWnd); - RedrawWindow(hWnd, &rect, NULL, RDW_UPDATENOW); - - hDC = GetDC(hWnd); - ASSERT(hDC); - - hRgn = CreateRectRgn(0,0,10,10); - - - /* Test inverted clip rect */ - rcScroll.left = 0; - rcScroll.top = 25; - rcScroll.right = 100; - rcScroll.bottom = 40; - rcClip.left = 0; - rcClip.top = 35; - rcClip.right = -70; - rcClip.bottom = -1000; - SetLastError(ERROR_SUCCESS); - Result = NtUserScrollDC(hDC, 10, 20, &rcScroll, &rcClip, hRgn, &rcUpdate); - RTEST(Result == 1); - RTEST(GetLastError() == ERROR_SUCCESS); - - /* Test inverted scroll rect */ - rcScroll.left = 0; - rcScroll.top = 25; - rcScroll.right = -100; - rcScroll.bottom = -40; - rcClip.left = 0; - rcClip.top = 35; - rcClip.right = 70; - rcClip.bottom = 1000; - SetLastError(ERROR_SUCCESS); - Result = NtUserScrollDC(hDC, 10, 20, &rcScroll, &rcClip, hRgn, &rcUpdate); - RTEST(Result == 1); - RTEST(GetLastError() == ERROR_SUCCESS); - - rcScroll.left = 0; - rcScroll.top = 25; - rcScroll.right = 100; - rcScroll.bottom = 40; - - /* Test invalid update region */ - SetLastError(ERROR_SUCCESS); - Result = NtUserScrollDC(hDC, 10, 20, &rcScroll, &rcClip, (HRGN)0x123456, &rcUpdate); - RTEST(Result == 0); - TEST(GetLastError() == ERROR_INVALID_HANDLE); - - /* Test invalid dc */ - SetLastError(ERROR_SUCCESS); - Result = NtUserScrollDC((HDC)0x123456, 10, 20, &rcScroll, &rcClip, hRgn, &rcUpdate); - RTEST(Result == 0); - RTEST(GetLastError() == ERROR_SUCCESS); - - /* Test invalid update rect */ - SetLastError(ERROR_SUCCESS); - Result = NtUserScrollDC(hDC, 10, 20, &rcScroll, &rcClip, hRgn, (PVOID)0x80001000); - RTEST(Result == 0); - RTEST(GetLastError() == ERROR_NOACCESS); - - Result = NtUserScrollDC(hDC, 10, 20, &rcScroll, &rcClip, hRgn, &rcUpdate); - - RTEST(Result == TRUE); - RTEST(rcUpdate.left == 0); - RTEST(rcUpdate.top == 35); - RTEST(rcUpdate.right == 70); - RTEST(rcUpdate.bottom == 55); - - hTmpRgn = CreateRectRgn(10,45,70,55); - Result = CombineRgn(hRgn, hRgn, hTmpRgn, RGN_XOR); - RTEST(Result == SIMPLEREGION); - - SetRectRgn(hTmpRgn,0,35,70,40); - Result = CombineRgn(hRgn, hRgn, hTmpRgn, RGN_XOR); - RTEST(Result == NULLREGION); - - DeleteObject(hTmpRgn); - - /* TODO: Test with another window in front */ - /* TODO: Test with different viewport extension */ - - ReleaseDC(hWnd, hDC); - DestroyWindow(hWnd); - DeleteObject(hRgn); - - return APISTATUS_NORMAL; -} - diff --git a/rostests/apitests/w32knapi/ntuser/NtUserSelectPalette.c b/rostests/apitests/w32knapi/ntuser/NtUserSelectPalette.c deleted file mode 100644 index dac693c39a0..00000000000 --- a/rostests/apitests/w32knapi/ntuser/NtUserSelectPalette.c +++ /dev/null @@ -1,148 +0,0 @@ - - -FORCEINLINE -PALETTEENTRY -PALENTRY(BYTE r, BYTE g, BYTE b) -{ - PALETTEENTRY ret; - - ret.peRed = r; - ret.peGreen = g; - ret.peBlue = b; - ret.peFlags = 0; - return ret; -} - -INT -Test_NtUserSelectPalette(PTESTINFO pti) -{ - HPALETTE hPal, hOldPal; - HWND hWnd; - HDC hDC, hCompDC; - struct - { - LOGPALETTE logpal; - PALETTEENTRY entry[20]; - } pal; - - ZeroMemory(&pal, sizeof(pal)); - - pal.logpal.palVersion = 0x300; - pal.logpal.palNumEntries = 6; - pal.entry[0] = PALENTRY(0,0,0); - pal.entry[1] = PALENTRY(255,255,255); - pal.entry[2] = PALENTRY(128,128,128); - pal.entry[3] = PALENTRY(128,0,0); - pal.entry[4] = PALENTRY(0,128,0); - pal.entry[5] = PALENTRY(0,0,128); - - hPal = CreatePalette(&pal.logpal); - ASSERT(hPal); - TEST(DeletePalette(hPal) == 1); - hPal = CreatePalette(&pal.logpal); - ASSERT(hPal); - - /* Create a window */ - hWnd = CreateWindowW(L"BUTTON", L"TestWindow", WS_OVERLAPPEDWINDOW | WS_VISIBLE, - CW_USEDEFAULT, CW_USEDEFAULT, 100, 100, - NULL, NULL, g_hInstance, 0); - hDC = GetDC(hWnd); - ASSERT(hDC); - hCompDC = CreateCompatibleDC(hDC); - ASSERT(hCompDC); - - /* Test NULL DC */ - SetLastError(ERROR_SUCCESS); - hOldPal = NtUserSelectPalette(NULL, hPal, 0); - TEST(hOldPal == 0); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test invalid DC */ - SetLastError(ERROR_SUCCESS); - hOldPal = NtUserSelectPalette((HDC)-1, hPal, 0); - TEST(hOldPal == 0); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test NULL palette */ - SetLastError(ERROR_SUCCESS); - hOldPal = NtUserSelectPalette(hDC, NULL, 0); - TEST(hOldPal == 0); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test invalid palette */ - SetLastError(ERROR_SUCCESS); - hOldPal = NtUserSelectPalette(hDC, (HPALETTE)-1, 0); - TEST(hOldPal == 0); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test valid palette */ - hOldPal = NtUserSelectPalette(hDC, hPal, 0); - TEST(hOldPal != 0); - TEST(hOldPal == GetStockObject(DEFAULT_PALETTE)); - - /* We cannot Delete the palette */ - TEST(DeletePalette(hPal) == 0); - - /* We can still select the Palette into a compatible DC */ - hOldPal = NtUserSelectPalette(hCompDC, hPal, 0); - TEST(hOldPal != 0); - - - -#if 0 - RealizePalette(hDC); - - GetClientRect(hWnd, &rect); - FillRect(hDC, &rect, GetSysColorBrush(COLOR_BTNSHADOW)); - - TEST(GetNearestColor(hDC, RGB(0,0,0)) == RGB(0,0,0)); - TEST(GetNearestColor(hDC, RGB(0,0,1)) == RGB(0,0,1)); - - ReleaseDC(hWnd, hDC); - DestroyWindow(hWnd); - RECT rect; - HBITMAP hBmp; - - - BITMAPINFOHEADER bmih = {sizeof(BITMAPINFOHEADER), // biSize - 3, // biWidth - 3, // biHeight - 1, // biPlanes - 8, // biBitCount - BI_RGB, // biCompression - 0, // biSizeImage - 92, // biXPelsPerMeter - 92, // biYPelsPerMeter - 6, // biClrUsed - 6}; // biClrImportant - BYTE bits[3][3] = {{0,1,2},{3,4,5},{6,1,2}}; - - struct - { - BITMAPINFOHEADER bmih; - RGBQUAD colors[6]; - } bmi = {{sizeof(BITMAPINFOHEADER),3,3,1,8,BI_RGB,0,92,92,6,6}, - {{0,0,0,0},{255,255,255,0},{255,0,0,0}, - {0,255,0,0},{0,0,255,0},{128,128,128,0}}}; - - hBmp = CreateDIBitmap(hCompDC, &bmih, CBM_INIT, &bits, (BITMAPINFO*)&bmi, DIB_RGB_COLORS); - ASSERT(hBmp); - - SetLastError(0); - TEST(NtGdiSelectBitmap(hCompDC, hBmp)); - hOldPal = NtUserSelectPalette(hCompDC, hPal, 0); - TEST(hOldPal != NULL); - RealizePalette(hCompDC); - - TEST(GetNearestColor(hCompDC, RGB(0,0,0)) == RGB(0,0,0)); - TEST(GetNearestColor(hCompDC, RGB(0,0,1)) == RGB(0,0,0)); - TEST(GetNearestColor(hCompDC, RGB(100,0,0)) == RGB(0,0,0)); - TEST(GetNearestColor(hCompDC, RGB(250,250,250)) == RGB(255,255,255)); - TEST(GetNearestColor(hCompDC, RGB(120,100,110)) == RGB(128,128,128)); - -printf("nearest = 0x%x\n", GetNearestColor(hCompDC, RGB(120,100,110))); -#endif - - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntuser/NtUserSetTimer.c b/rostests/apitests/w32knapi/ntuser/NtUserSetTimer.c deleted file mode 100644 index 380257947db..00000000000 --- a/rostests/apitests/w32knapi/ntuser/NtUserSetTimer.c +++ /dev/null @@ -1,15 +0,0 @@ - - - -INT -Test_NtUserSetTimer(PTESTINFO pti) -{ - - - // check valid argument - // check for replacement / new timers - // check when expiries are handled (msgs and calls) - - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntuser/NtUserSystemParametersInfo.c b/rostests/apitests/w32knapi/ntuser/NtUserSystemParametersInfo.c deleted file mode 100644 index dd429b17995..00000000000 --- a/rostests/apitests/w32knapi/ntuser/NtUserSystemParametersInfo.c +++ /dev/null @@ -1,1154 +0,0 @@ - -static const WCHAR* KEY_MOUSE = L"Control Panel\\Mouse"; -//static const WCHAR* VAL_MOUSE1 = L"MouseThreshold1"; -//static const WCHAR* VAL_MOUSE2 = L"MouseThreshold2"; -//static const WCHAR* VAL_MOUSE3 = L"MouseSpeed"; -//static const WCHAR* VAL_DBLCLKWIDTH = L"DoubleClickWidth"; -//static const WCHAR* VAL_DBLCLKHEIGHT = L"DoubleClickHeight"; -//static const WCHAR* VAL_DBLCLKTIME = L"DoubleClickSpeed"; -static const WCHAR* VAL_SWAP = L"SwapMouseButtons"; - -static const WCHAR* KEY_DESKTOP = L"Control Panel\\Desktop"; -//static const WCHAR* VAL_SCRTO = L"ScreenSaveTimeOut"; -//static const WCHAR* VAL_SCRACT = L"ScreenSaveActive"; -//static const WCHAR* VAL_GRID = L"GridGranularity"; -//static const WCHAR* VAL_DRAG = L"DragFullWindows"; -//static const WCHAR* VAL_DRAGHEIGHT = L"DragHeight"; -//static const WCHAR* VAL_DRAGWIDTH = L"DragWidth"; -//static const WCHAR* VAL_FNTSMOOTH = L"FontSmoothing"; -static const WCHAR* VAL_PREFMASK = L"UserPreferencesMask"; - -enum -{ - UPM_ACTIVEWINDOWTRACKING = 0x01, - UPM_MENUANIMATION = 0x02, - UPM_COMBOBOXANIMATION = 0x04, - UPM_LISTBOXSMOOTHSCROLLING = 0x08, - UPM_GRADIENTCAPTIONS = 0x10, - UPM_KEYBOARDCUES = 0x20, - UPM_ACTIVEWNDTRKZORDER = 0x40, - UPM_HOTTRACKING = 0x80, - UPM_RESERVED = 0x100, - UPM_MENUFADE = 0x200, - UPM_SELECTIONFADE = 0x400, - UPM_TOOLTIPANIMATION = 0x800, - UPM_TOOLTIPFADE = 0x1000, - UPM_CURSORSHADOW = 0x2000, - UPM_CLICKLOCK = 0x8000, - // room for more - UPM_UIEFFECTS = 0x80000000, - UPM_DEFAULT = 0x80003E9E -} USERPREFMASKS; - - -//static const WCHAR* KEY_MDALIGN = L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows"; -//static const WCHAR* VAL_MDALIGN = L"MenuDropAlignment"; - -static const WCHAR* KEY_METRIC = L"Control Panel\\Desktop\\WindowMetrics"; -//static const WCHAR* VAL_BORDER = L"BorderWidth"; -//static const WCHAR* VAL_ICONSPC = L"IconSpacing"; -//static const WCHAR* VAL_ICONVSPC = L"IconVerticalspacing"; -//static const WCHAR* VAL_ITWRAP = L"IconTitleWrap"; - -static const WCHAR* KEY_SOUND = L"Control Panel\\Sound"; -static const WCHAR* VAL_BEEP = L"Beep"; - -//static const WCHAR* KEY_KBD = L"Control Panel\\Keyboard"; -//static const WCHAR* VAL_KBDSPD = L"KeyboardSpeed"; -//static const WCHAR* VAL_KBDDELAY = L"KeyboardDelay"; - -//static const WCHAR* KEY_SHOWSNDS = L"Control Panel\\Accessibility\\ShowSounds"; -//static const WCHAR* KEY_KDBPREF = L"Control Panel\\Accessibility\\Keyboard Preference"; -//static const WCHAR* KEY_SCRREAD = L"Control Panel\\Accessibility\\Blind Access"; -//static const WCHAR* VAL_ON = L"On"; - -LONG -QueryUserRegValueW(PCWSTR pszSubKey, PCWSTR pszValueName, PVOID pData, LPDWORD cbSize, LPDWORD pType) -{ - HKEY hKey; - LONG ret; - - RegOpenKeyExW(HKEY_CURRENT_USER, pszSubKey, 0, KEY_QUERY_VALUE, &hKey); - ret = RegQueryValueExW(hKey, pszValueName, NULL, pType, (LPBYTE)pData, cbSize); - RegCloseKey(hKey); - return ret; -} - - -HWND -CreateTestWindow() -{ - WNDCLASSA wc; - - wc.style = 0; - wc.lpfnWndProc = DefWindowProcA; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = g_hInstance; - wc.hIcon = NULL; - wc.hCursor = NULL; - wc.hbrBackground = NULL; - wc.lpszMenuName = NULL; - wc.lpszClassName = "testclass"; - - RegisterClassA(&wc); - return CreateWindowA("testclass", - "testwnd", - WS_VISIBLE, - 0, - 0, - 50, - 30, - NULL, - NULL, - g_hInstance, - 0); -} - -void -Test_NtUserSystemParametersInfo_Params(PTESTINFO pti) -{ -// UINT uint; - DWORD data[1000]; - UINT i, uint; - ACCESSTIMEOUT ato; - /* Test normal */ - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(SPI_GETFOCUSBORDERHEIGHT, 0, &uint, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - - /* Test invalid SPI code */ - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(7, 0, &data, 0) == FALSE); - TEST(GetLastError() == ERROR_INVALID_PARAMETER); - - /* Test wrong cbSize member */ - ato.cbSize = 1; - SetLastError(0xdeadbeef); - TEST(NtUserSystemParametersInfo(SPI_GETACCESSTIMEOUT, 0, &ato, 0) == FALSE); - TEST(GetLastError() == 0xdeadbeef); -#if 0 - /* Test undocumented, but valid SPI codes */ - for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef; - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(0x1010, 0, &data, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TEST(data[0] <= 1); - TEST(data[1] == 0xdeadbeef); - - for(i = 0; i < 1000; i++) data[i] = 0xbeefdead; - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(0x1011, 0, &data, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TEST(data[0] == 0xbeefdead); - TEST(data[1] == 0xbeefdead); - data[0] = 0; - NtUserSystemParametersInfo(0x1010, 0, &data, 0); - TEST(data[0] == 1); - - for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef; - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(0x1028, 0, &data, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TEST(data[0] != 0xdeadbeef); - TEST(data[1] == 0xdeadbeef); - - for(i = 0; i < 1000; i++) data[i] = 0xbeefdead; - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(0x1029, 0, &data, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TEST(data[0] == 0xbeefdead); - TEST(data[1] == 0xbeefdead); - - for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef; - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(0x102A, 0, &data, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TEST(data[0] != 0xdeadbeef); - TEST(data[1] == 0xdeadbeef); - - for(i = 0; i < 1000; i++) data[i] = 0xbeefdead; - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(4139, 0, &data, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TEST(data[0] == 0xbeefdead); - TEST(data[1] == 0xbeefdead); - - for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef; - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(4140, 0, &data, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TEST(data[0] != 0xdeadbeef); - TEST(data[1] == 0xdeadbeef); - - for(i = 0; i < 1000; i++) data[i] = 0xbeefdead; - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(4141, 0, &data, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TEST(data[0] == 0xbeefdead); - TEST(data[1] == 0xbeefdead); - - for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef; - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(4142, 0, &data, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TEST(data[0] != 0xdeadbeef); - TEST(data[1] == 0xdeadbeef); - - for(i = 0; i < 1000; i++) data[i] = 0xbeefdead; - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(4143, 0, &data, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TEST(data[0] == 0xbeefdead); - TEST(data[1] == 0xbeefdead); - - for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef; - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(4144, 0, &data, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TEST(data[0] != 0xdeadbeef); - TEST(data[1] == 0xdeadbeef); - - for(i = 0; i < 1000; i++) data[i] = 0xbeefdead; - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(4145, 0, &data, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TEST(data[0] == 0xbeefdead); - TEST(data[1] == 0xbeefdead); - - for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef; - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(4146, 0, &data, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TEST(data[0] != 0xdeadbeef); - TEST(data[1] == 0xdeadbeef); - - for(i = 0; i < 1000; i++) data[i] = 0xbeefdead; - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(4147, 0, &data, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TEST(data[0] == 0xbeefdead); - TEST(data[1] == 0xbeefdead); - - for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef; - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(4148, 0, &data, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TEST(data[0] != 0xdeadbeef); - TEST(data[1] == 0xdeadbeef); - - for(i = 0; i < 1000; i++) data[i] = 0xbeefdead; - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(4149, 0, &data, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TEST(data[0] == 0xbeefdead); - TEST(data[1] == 0xbeefdead); - - for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef; - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(4150, 0, &data, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TEST(data[0] != 0xdeadbeef); - TEST(data[1] == 0xdeadbeef); - - for(i = 0; i < 1000; i++) data[i] = 0xbeefdead; - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(4151, 0, &data, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TEST(data[0] == 0xbeefdead); - TEST(data[1] == 0xbeefdead); - - for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef; - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(4152, 0, &data, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TEST(data[0] != 0xdeadbeef); - TEST(data[1] == 0xdeadbeef); - - for(i = 0; i < 1000; i++) data[i] = 0xbeefdead; - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(4153, 0, &data, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TEST(data[0] == 0xbeefdead); - TEST(data[1] == 0xbeefdead); - - for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef; - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(4154, 0, &data, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TEST(data[0] != 0xdeadbeef); - TEST(data[1] == 0xdeadbeef); - - for(i = 0; i < 1000; i++) data[i] = 0xbeefdead; - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(4155, 0, &data, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TEST(data[0] == 0xbeefdead); - TEST(data[1] == 0xbeefdead); - - for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef; - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(4156, 0, &data, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TEST(data[0] != 0xdeadbeef); - TEST(data[1] == 0xdeadbeef); - - for(i = 0; i < 1000; i++) data[i] = 0xbeefdead; - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(4157, 0, &data, 0) == TRUE); - TEST(GetLastError() == ERROR_SUCCESS); - TEST(data[0] == 0xbeefdead); - TEST(data[1] == 0xbeefdead); -#endif - /* Test invalid pointer */ - SetLastError(ERROR_SUCCESS); - TEST(NtUserSystemParametersInfo(SPI_GETFOCUSBORDERHEIGHT, 0, (PVOID)0x80000000, 0) == FALSE); - TEST(GetLastError() == ERROR_NOACCESS); - for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef; - - /* test wrong bools */ -} - -void -Test_NtUserSystemParametersInfo_Winsta(PTESTINFO pti) -{ - HWINSTA hwinsta, hwinstaOld; - INT ai[20]; - BOOL bRet; -// INT i; - - hwinstaOld = GetProcessWindowStation(); - hwinsta = CreateWindowStation(NULL, 0, READ_CONTROL, NULL); - SetProcessWindowStation(hwinsta); - printf("hwinstaOld=%p, hwinsta=%p\n", hwinstaOld, hwinsta); - -#if 1 // currently Winsta stuff is broken in ros - TEST(SystemParametersInfoA(SPI_GETBEEP, 0, ai, 0) == 0); - TEST(GetLastError() == ERROR_ACCESS_DENIED); - TEST(SystemParametersInfoA(SPI_SETBEEP, 0, ai, 0) == 0); - TEST(GetLastError() == ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION); - TEST(SystemParametersInfoA(SPI_GETMOUSE, 0, ai, 0) == 0); - TEST(GetLastError() == ERROR_ACCESS_DENIED); - TEST(SystemParametersInfoA(SPI_SETMOUSE, 0, ai, 0) == 0); - TEST(GetLastError() == ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION); - TEST(SystemParametersInfoA(SPI_GETBORDER, 0, ai, 0) == 0); - TEST(GetLastError() == ERROR_ACCESS_DENIED); - TEST(SystemParametersInfoA(SPI_SETBORDER, 0, ai, 0) == 0); - TEST(GetLastError() == ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION); - TEST(SystemParametersInfoA(SPI_GETKEYBOARDSPEED, 0, ai, 0) == 0); - TEST(GetLastError() == ERROR_ACCESS_DENIED); - TEST(SystemParametersInfoA(SPI_SETKEYBOARDSPEED, 0, ai, 0) == 0); - TEST(GetLastError() == ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION); - TEST(SystemParametersInfoA(SPI_ICONHORIZONTALSPACING, 0, ai, 0) == 0); - TEST(GetLastError() == ERROR_ACCESS_DENIED); - TEST(SystemParametersInfoA(SPI_ICONHORIZONTALSPACING, 32, 0, 0) == 0); - TEST(GetLastError() == ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION); - TEST(SystemParametersInfoA(SPI_GETSCREENSAVETIMEOUT, 0, ai, 0) == 0); - TEST(GetLastError() == ERROR_ACCESS_DENIED); - TEST(SystemParametersInfoA(SPI_SETSCREENSAVETIMEOUT, 0, ai, 0) == 0); - TEST(GetLastError() == ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION); - TEST(SystemParametersInfoA(SPI_GETKEYBOARDCUES, 0, &bRet, 0) == 0); - TEST(GetLastError() == ERROR_ACCESS_DENIED); - TEST(SystemParametersInfoA(SPI_SETKEYBOARDCUES, 0, (PVOID)1, 0) == 0); - TEST(GetLastError() == ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION); -#endif - - SetProcessWindowStation(hwinstaOld); -} - -void -Test_NtUserSystemParametersInfo_fWinIni(PTESTINFO pti) -{ - ACCESSTIMEOUT ato; -// UINT uFocusBorderHeight; - WCHAR Buffer[6]; - DWORD cbSize; - - ato.cbSize = sizeof(ato); - NtUserSystemParametersInfo(SPI_GETACCESSTIMEOUT, 0, &ato, 0); - ato.iTimeOutMSec++; - NtUserSystemParametersInfo(SPI_SETACCESSTIMEOUT, 0, &ato, 0); - ato.iTimeOutMSec--; - -// NtUserSystemParametersInfo(SPI_GETFOCUSBORDERHEIGHT, 0, &uFocusBorderHeight, 0); -// NtUserSystemParametersInfo(SPI_SETFOCUSBORDERHEIGHT, 0, &uFocusBorderHeight, SPIF_UPDATEINIFILE); - - NtUserSystemParametersInfo(SPI_SETACCESSTIMEOUT, 0, &ato, 0); - - cbSize = 6; - QueryUserRegValueW(L"Control Panel\\Accessibility\\TimeOut", L"TimeToWait", &Buffer, &cbSize, NULL); - -} - -void -Test_MetricKey(PTESTINFO pti, PCWSTR pwszVal, INT iVal) -{ - WCHAR szReg[10]; - DWORD cbSize; - - cbSize = sizeof(szReg); - TESTX(QueryUserRegValueW(KEY_METRIC, pwszVal, &szReg, &cbSize, NULL) == ERROR_SUCCESS, "Value=%S\n", pwszVal); - TESTX(_wcsicmp(szReg, L"1") == 0, "Value=%S\n", pwszVal); - -} - -INT -Test_UserPref(PTESTINFO pti, UINT uiGet, UINT uiSet, DWORD dwPrefMask) -{ - BOOL bOrig, bTemp = 0; - DWORD dwUserPref, dwUserPrefOrg; - DWORD cbSize; - - /* Get original values */ - NtUserSystemParametersInfo(uiGet, 0, &bOrig, 0); - cbSize = sizeof(dwUserPrefOrg); - QueryUserRegValueW(KEY_DESKTOP, VAL_PREFMASK, &dwUserPrefOrg, &cbSize, NULL); - - /* Value 0 */ - NtUserSystemParametersInfo(uiSet, 0, NULL, SPIF_UPDATEINIFILE); - NtUserSystemParametersInfo(uiGet, 0, &bTemp, 0); - TEST(bTemp == 0); - cbSize = sizeof(dwUserPref); - TEST(QueryUserRegValueW(KEY_DESKTOP, VAL_PREFMASK, &dwUserPref, &cbSize, NULL) == ERROR_SUCCESS); - TEST((dwUserPref & dwPrefMask) == 0); - TEST((dwUserPref & (~dwPrefMask)) == (dwUserPrefOrg & (~dwPrefMask))); - - /* Value 1 without Registry */ - NtUserSystemParametersInfo(uiSet, 0, (PVOID)1, 0); - NtUserSystemParametersInfo(uiGet, 0, &bTemp, 0); - TEST(bTemp == 1); - cbSize = sizeof(dwUserPref); - TEST(QueryUserRegValueW(KEY_DESKTOP, VAL_PREFMASK, &dwUserPref, &cbSize, NULL) == ERROR_SUCCESS); - TEST((dwUserPref & dwPrefMask) == 0); - TEST((dwUserPref & (~dwPrefMask)) == (dwUserPrefOrg & (~dwPrefMask))); - - /* Value 2 without Registry */ - NtUserSystemParametersInfo(uiSet, 0, (PVOID)2, 0); - NtUserSystemParametersInfo(uiGet, 0, &bTemp, 0); - TEST(bTemp == 1); - cbSize = sizeof(dwUserPref); - TEST(QueryUserRegValueW(KEY_DESKTOP, VAL_PREFMASK, &dwUserPref, &cbSize, NULL) == ERROR_SUCCESS); - TEST((dwUserPref & dwPrefMask) == 0); - TEST((dwUserPref & (~dwPrefMask)) == (dwUserPrefOrg & (~dwPrefMask))); - - /* Value 1 with Registry */ - NtUserSystemParametersInfo(uiSet, 0, (PVOID)1, SPIF_UPDATEINIFILE); - NtUserSystemParametersInfo(uiGet, 0, &bTemp, 0); - TEST(bTemp == 1); - cbSize = sizeof(dwUserPref); - TEST(QueryUserRegValueW(KEY_DESKTOP, VAL_PREFMASK, &dwUserPref, &cbSize, NULL) == ERROR_SUCCESS); - TEST((dwUserPref & dwPrefMask) == dwPrefMask); - TEST((dwUserPref & (~dwPrefMask)) == (dwUserPrefOrg & (~dwPrefMask))); - - /* Restore original value */ - NtUserSystemParametersInfo(uiSet, 0, (PVOID)bOrig, SPIF_UPDATEINIFILE); - - return APISTATUS_NORMAL; -} - - -/******************************************************************************/ - -void -Test_SPI_SETBEEP(PTESTINFO pti) -{ - BOOL bOrig, bTemp = 0; - WCHAR szReg[10]; - DWORD cbSize; - - /* Get original value */ - NtUserSystemParametersInfo(SPI_GETBEEP, 0, &bOrig, 0); - - /* Value 0 */ - NtUserSystemParametersInfo(SPI_SETBEEP, 0, NULL, SPIF_UPDATEINIFILE); - NtUserSystemParametersInfo(SPI_GETBEEP, 0, &bTemp, 0); - TEST(bTemp == 0); - cbSize = sizeof(szReg); - TEST(QueryUserRegValueW(KEY_SOUND, VAL_BEEP, &szReg, &cbSize, NULL) == ERROR_SUCCESS); - TEST(_wcsicmp(szReg, L"No") == 0); - - /* Value 1 */ - NtUserSystemParametersInfo(SPI_SETBEEP, 1, NULL, SPIF_UPDATEINIFILE); - NtUserSystemParametersInfo(SPI_GETBEEP, 0, &bTemp, 0); - TEST(bTemp == 1); - cbSize = sizeof(szReg); - TEST(QueryUserRegValueW(KEY_SOUND, VAL_BEEP, &szReg, &cbSize, NULL) == ERROR_SUCCESS); - TEST(_wcsicmp(szReg, L"Yes") == 0); - - /* Value 2 */ - NtUserSystemParametersInfo(SPI_SETBEEP, 2, NULL, SPIF_UPDATEINIFILE); - NtUserSystemParametersInfo(SPI_GETBEEP, 0, &bTemp, 0); - TEST(bTemp == 1); - cbSize = sizeof(szReg); - TEST(QueryUserRegValueW(KEY_SOUND, VAL_BEEP, &szReg, &cbSize, NULL) == ERROR_SUCCESS); - TEST(_wcsicmp(szReg, L"Yes") == 0); - - /* Restore original value */ - NtUserSystemParametersInfo(SPI_SETBEEP, 0, &bOrig, SPIF_UPDATEINIFILE); -} - -void -Test_SPI_SETMOUSE(PTESTINFO pti) -{ - INT aiOrig[3], aiTemp[3]; - - /* Get original value */ - NtUserSystemParametersInfo(SPI_GETMOUSE, 0, aiOrig, 0); - - /* Test uiParam value */ - TEST(NtUserSystemParametersInfo(SPI_GETMOUSE, 0, aiTemp, 0) == 1); - TEST(NtUserSystemParametersInfo(SPI_GETMOUSE, 1, aiTemp, 0) == 1); - TEST(NtUserSystemParametersInfo(SPI_GETMOUSE, -1, aiTemp, 0) == 1); - TEST(NtUserSystemParametersInfo(SPI_GETMOUSE, 0xdeadbeef, aiTemp, 0) == 1); - - /* Set modified values */ - aiTemp[0] = aiOrig[0] + 1; - aiTemp[1] = aiOrig[1] - 1; - aiTemp[2] = aiOrig[2] + 2; - NtUserSystemParametersInfo(SPI_SETMOUSE, 2, aiTemp, SPIF_UPDATEINIFILE); - aiTemp[0] = aiTemp[1] = aiTemp[2] = 0; - - /* Get new values */ - NtUserSystemParametersInfo(SPI_GETMOUSE, 0, aiTemp, 0); - - /* Test modified values */ - TEST(aiTemp[0] == aiOrig[0] + 1); - TEST(aiTemp[1] == aiOrig[1] - 1); - TEST(aiTemp[2] == aiOrig[2] + 2); - - // FIXME: Test registry values - - /* Restore original value */ - NtUserSystemParametersInfo(SPI_SETMOUSE, 0, aiOrig, SPIF_UPDATEINIFILE); -} - -void -Test_SPI_SETBORDER(PTESTINFO pti) -{ - INT iOrig, iTemp = 0; - - /* Get original value */ - NtUserSystemParametersInfo(SPI_GETBORDER, 0, &iOrig, 0); - - /* Value 0 */ - NtUserSystemParametersInfo(SPI_SETBORDER, 0, NULL, SPIF_UPDATEINIFILE); - NtUserSystemParametersInfo(SPI_GETBORDER, 0, &iTemp, 0); - TEST(iTemp == 1); - TEST(GetSystemMetrics(SM_CXBORDER) == 1); - - /* Value 1 */ - NtUserSystemParametersInfo(SPI_SETBORDER, 1, NULL, SPIF_UPDATEINIFILE); - NtUserSystemParametersInfo(SPI_GETBORDER, 0, &iTemp, 0); - TEST(iTemp == 1); -// Test_MetricKey(pti, VAL_BORDER, 1); - - /* Value 2 */ - NtUserSystemParametersInfo(SPI_SETBORDER, 2, NULL, SPIF_UPDATEINIFILE); - NtUserSystemParametersInfo(SPI_GETBORDER, 0, &iTemp, 0); - TEST(iTemp == 2); - TEST(GetSystemMetrics(SM_CXBORDER) == 1); - - /* Restore original value */ - NtUserSystemParametersInfo(SPI_SETBORDER, iOrig, NULL, SPIF_UPDATEINIFILE); - -} - -// Test_SPI_SETKEYBOARDSPEED(pti); -// Test_SPI_LANGDRIVER(pti); -// Test_SPI_ICONHORIZONTALSPACING(pti); -// Test_SPI_SETSCREENSAVETIMEOUT(pti); -// Test_SPI_SETSCREENSAVEACTIVE(pti); -// Test_SPI_SETGRIDGRANULARITY(pti); - -void -Test_SPI_SETDESKWALLPAPER(PTESTINFO pti) -{ - UNICODE_STRING ustrOld, ustrNew; - WCHAR szOld[MAX_PATH]; - WCHAR szNew[MAX_PATH]; - - /* Get old Wallpaper */ - TEST(NtUserSystemParametersInfo(SPI_GETDESKWALLPAPER, MAX_PATH, szOld, 0) == 1); - RtlInitUnicodeString(&ustrOld, szOld); - - /* Set no Wallpaper */ - TEST(NtUserSystemParametersInfo(SPI_SETDESKWALLPAPER, 0, L"", 0) == 1); - TEST(NtUserSystemParametersInfo(SPI_GETDESKWALLPAPER, MAX_PATH, szNew, 0) == 1); - TEST(szNew[0] == 0); - - /* Set no Wallpaper 2 */ - RtlInitUnicodeString(&ustrNew, L""); - TEST(NtUserSystemParametersInfo(SPI_SETDESKWALLPAPER, 0, &ustrNew, 0) == 1); - TEST(NtUserSystemParametersInfo(SPI_GETDESKWALLPAPER, MAX_PATH, szNew, 0) == 1); - TEST(szNew[0] == 0); - - /* Reset Wallpaper */ - TEST(NtUserSystemParametersInfo(SPI_SETDESKWALLPAPER, 0, NULL, 0) == 1); - TEST(NtUserSystemParametersInfo(SPI_GETDESKWALLPAPER, MAX_PATH, szNew, 0) == 1); - TEST(wcscmp(szNew, szOld) == 0); - - /* Set new Wallpaper */ - RtlInitUnicodeString(&ustrNew, L"test.bmp"); - TEST(NtUserSystemParametersInfo(SPI_SETDESKWALLPAPER, 0, &ustrNew, 0) == 1); - TEST(NtUserSystemParametersInfo(SPI_GETDESKWALLPAPER, MAX_PATH, szNew, 0) == 1); - TEST(wcscmp(szNew, L"test.bmp") == 0); - - /* Get Wallpaper, too small buffer */ - szNew[0] = 0; szNew[1] = 0; szNew[2] = 0; - TEST(NtUserSystemParametersInfo(SPI_GETDESKWALLPAPER, 3, szNew, 0) == 1); - TEST(szNew[0] != 0); - TEST(szNew[1] != 0); - TEST(szNew[2] != 0); - - /* Set invalid Wallpaper */ - SetLastError(0xdeadbeef); - RtlInitUnicodeString(&ustrNew, L"*#!!-&"); - TEST(NtUserSystemParametersInfo(SPI_SETDESKWALLPAPER, 0, &ustrNew, 0) == 0); - TEST(GetLastError() == ERROR_FILE_NOT_FOUND); - TEST(NtUserSystemParametersInfo(SPI_GETDESKWALLPAPER, MAX_PATH, szNew, 0) == 1); - TEST(wcscmp(szNew, L"*#!!-&") == 0); - - /* Restore old Wallpaper */ - TEST(NtUserSystemParametersInfo(SPI_SETDESKWALLPAPER, MAX_PATH, &ustrOld, SPIF_UPDATEINIFILE) == 1); - -} - -// Test_SPI_SETDESKPATTERN(pti); -// Test_SPI_SETKEYBOARDDELAY(pti); -// Test_SPI_ICONVERTICALSPACING(pti); -// Test_SPI_SETICONTITLEWRAP(pti); -// Test_SPI_SETMENUDROPALIGNMENT(pti); -// Test_SPI_SETDOUBLECLKWIDTH(pti); -// Test_SPI_SETDOUBLECLKHEIGHT(pti); -// Test_SPI_SETDOUBLECLICKTIME(pti); - -INT -Test_SPI_SETMOUSEBUTTONSWAP(PTESTINFO pti) -{ - BOOL bOrig, bTemp = 0; - WCHAR szReg[10]; - DWORD cbSize; - - /* Get original value */ - bOrig = GetSystemMetrics(SM_SWAPBUTTON); - - /* Value 0 */ - NtUserSystemParametersInfo(SPI_SETMOUSEBUTTONSWAP, 0, NULL, SPIF_UPDATEINIFILE); - bTemp = GetSystemMetrics(SM_SWAPBUTTON); - TEST(bTemp == 0); - cbSize = sizeof(szReg); - TEST(QueryUserRegValueW(KEY_MOUSE, VAL_SWAP, &szReg, &cbSize, NULL) == ERROR_SUCCESS); - TEST(_wcsicmp(szReg, L"0") == 0); - - /* Value 1 */ - NtUserSystemParametersInfo(SPI_SETMOUSEBUTTONSWAP, 1, NULL, SPIF_UPDATEINIFILE); - bTemp = GetSystemMetrics(SM_SWAPBUTTON); - TEST(bTemp == 1); - cbSize = sizeof(szReg); - TEST(QueryUserRegValueW(KEY_MOUSE, VAL_SWAP, &szReg, &cbSize, NULL) == ERROR_SUCCESS); - TEST(_wcsicmp(szReg, L"1") == 0); - - /* Value 2 */ - NtUserSystemParametersInfo(SPI_SETMOUSEBUTTONSWAP, 2, NULL, SPIF_UPDATEINIFILE); - bTemp = GetSystemMetrics(SM_SWAPBUTTON); - TEST(bTemp == 1); - cbSize = sizeof(szReg); - TEST(QueryUserRegValueW(KEY_MOUSE, VAL_SWAP, &szReg, &cbSize, NULL) == ERROR_SUCCESS); - TEST(_wcsicmp(szReg, L"2") == 0); - - /* Value -1 */ - NtUserSystemParametersInfo(SPI_SETMOUSEBUTTONSWAP, -1, NULL, SPIF_UPDATEINIFILE); - bTemp = GetSystemMetrics(SM_SWAPBUTTON); - TEST(bTemp == 1); - cbSize = sizeof(szReg); - TEST(QueryUserRegValueW(KEY_MOUSE, VAL_SWAP, &szReg, &cbSize, NULL) == ERROR_SUCCESS); - TEST(_wcsicmp(szReg, L"-1") == 0); - - /* Restore original value */ - NtUserSystemParametersInfo(SPI_SETMOUSEBUTTONSWAP, bOrig, 0, SPIF_UPDATEINIFILE); - - return APISTATUS_NORMAL; -} - -INT -Test_SPI_SETICONTITLELOGFONT(PTESTINFO pti) -{ - LOGFONTW lfOrig; - struct - { - LOGFONTW lf; - DWORD dwRedzone; - } buf; - - /* Get original value */ - ASSERT(NtUserSystemParametersInfo(SPI_GETICONTITLELOGFONT, sizeof(lfOrig), &lfOrig, 0)); - - /* Test uiParam == 0 */ - memset(&buf, 0, sizeof(buf)); - buf.lf.lfFaceName[LF_FACESIZE-1] = 33; - buf.dwRedzone = 0xdeadbeef; - TEST(NtUserSystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, &buf.lf, 0) == 1); - TEST(buf.lf.lfHeight != 0); - TEST(buf.lf.lfWeight != 0); - TEST(buf.lf.lfFaceName[0] != 0); - TEST(buf.lf.lfFaceName[LF_FACESIZE-1] == 0); - TEST(buf.dwRedzone == 0xdeadbeef); - - /* Test uiParam < sizeof(LOGFONTW) */ - memset(&buf, 0, sizeof(buf)); - buf.lf.lfFaceName[LF_FACESIZE-1] = 33; - buf.dwRedzone = 0xdeadbeef; - TEST(NtUserSystemParametersInfo(SPI_GETICONTITLELOGFONT, 8, &buf.lf, 0) == 1); - TEST(buf.lf.lfHeight != 0); - TEST(buf.lf.lfWeight != 0); - TEST(buf.lf.lfFaceName[0] != 0); - TEST(buf.lf.lfFaceName[LF_FACESIZE-1] == 0); - TEST(buf.dwRedzone == 0xdeadbeef); - - /* Test uiParam < 0 */ - TEST(NtUserSystemParametersInfo(SPI_GETICONTITLELOGFONT, -1, &buf.lf, 0) == 1); - - return APISTATUS_NORMAL; -} - -INT -Test_SPI_SETFASTTASKSWITCH(PTESTINFO pti) -{ - char buf[10]; - TEST(NtUserSystemParametersInfo(SPI_SETFASTTASKSWITCH, 0, 0, 0) == 1); - TEST(NtUserSystemParametersInfo(SPI_SETFASTTASKSWITCH, 0, buf, 0) == 1); - - return APISTATUS_NORMAL; -} - -INT -Test_SPI_SETDRAGFULLWINDOWS(PTESTINFO pti) -{ - return APISTATUS_NORMAL; -} - -INT -Test_SPI_SETNONCLIENTMETRICS(PTESTINFO pti) -{ - return APISTATUS_NORMAL; -} - -INT -Test_SPI_SETMINIMIZEDMETRICS(PTESTINFO pti) -{ - return APISTATUS_NORMAL; -} - -INT -Test_SPI_SETICONMETRICS(PTESTINFO pti) -{ - return APISTATUS_NORMAL; -} - -INT -Test_SPI_SETWORKAREA(PTESTINFO pti) -{ - RECT rcOrig, rc; - - /* Get the original value */ - ASSERT(NtUserSystemParametersInfo(SPI_GETWORKAREA, 0, &rcOrig, 0) == 1); - - /* Change value */ - rc = rcOrig; - rc.left += 1; - rc.top += 2; - rc.right -= 3; - rc.bottom -= 2; - TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 1, &rc, 0) == 1); - TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 1); - TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, sizeof(RECT), &rc, 0) == 1); - - TEST(NtUserSystemParametersInfo(SPI_GETWORKAREA, 1, &rc, 0) == 1); - TEST(NtUserSystemParametersInfo(SPI_GETWORKAREA, -1, &rc, 0) == 1); - TEST(NtUserSystemParametersInfo(SPI_GETWORKAREA, 0xdeadbeef, &rc, 0) == 1); - TEST(NtUserSystemParametersInfo(SPI_GETWORKAREA, 0, (PVOID)0xdeadbeef, 0) == 0); - - /* Test values */ - rc = rcOrig; rc.left = -1; - TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 0); - rc = rcOrig; rc.top = -1; - TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 0); - rc = rcOrig; rc.top = 10; rc.bottom = 11; - TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 1); - rc = rcOrig; rc.top = 10; rc.bottom = 10; - TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 0); - rc = rcOrig; rc.top = 10; rc.bottom = 9; - TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 0); - rc = rcOrig; rc.left = 10; rc.right = 11; - TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 1); - rc = rcOrig; rc.left = 10; rc.right = 10; - TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 0); - rc = rcOrig; rc.left = 10; rc.right = 9; - TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 0); - rc = rcOrig; rc.bottom = GetSystemMetrics(SM_CYVIRTUALSCREEN); - TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 1); - rc = rcOrig; rc.bottom = GetSystemMetrics(SM_CYVIRTUALSCREEN)+1; - TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 0); - rc = rcOrig; rc.right = GetSystemMetrics(SM_CXVIRTUALSCREEN); - TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 1); - rc = rcOrig; rc.right = GetSystemMetrics(SM_CXVIRTUALSCREEN)+1; - TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 0); - - /* Restore original value */ - ASSERT(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rcOrig, 0) == 1); - - return APISTATUS_NORMAL; -} - -INT -Test_SPI_SETPENWINDOWS(PTESTINFO pti) -{ - return APISTATUS_NORMAL; -} - -INT -Test_SPI_SETFILTERKEYS(PTESTINFO pti) -{ - return APISTATUS_NORMAL; -} - -INT -Test_SPI_SETTOGGLEKEYS(PTESTINFO pti) -{ - return APISTATUS_NORMAL; -} - -INT -Test_SPI_SETMOUSEKEYS(PTESTINFO pti) -{ - return APISTATUS_NORMAL; -} - -INT -Test_SPI_SETSHOWSOUNDS(PTESTINFO pti) -{ - return APISTATUS_NORMAL; -} - -INT -Test_SPI_SETSTICKYKEYS(PTESTINFO pti) -{ - STICKYKEYS skOrig, sk; - - /* Get original values */ - skOrig.cbSize = sizeof(STICKYKEYS); - ASSERT(NtUserSystemParametersInfo(SPI_GETSTICKYKEYS, 0, &skOrig, 0) == 1); - - sk.cbSize = sizeof(STICKYKEYS)+1; - TEST(NtUserSystemParametersInfo(SPI_GETSTICKYKEYS, 0, &sk, 0) == 0); - - sk.cbSize = sizeof(STICKYKEYS)-1; - TEST(NtUserSystemParametersInfo(SPI_GETSTICKYKEYS, 0, &sk, 0) == 0); - - sk.cbSize = sizeof(STICKYKEYS); - TEST(NtUserSystemParametersInfo(SPI_GETSTICKYKEYS, 1, &sk, 0) == 0); - TEST(NtUserSystemParametersInfo(SPI_GETSTICKYKEYS, -1, &sk, 0) == 0); - TEST(NtUserSystemParametersInfo(SPI_GETSTICKYKEYS, sk.cbSize, &sk, 0) == 1); - TEST(NtUserSystemParametersInfo(SPI_GETSTICKYKEYS, sk.cbSize-1, &sk, 0) == 0); - TEST(NtUserSystemParametersInfo(SPI_GETSTICKYKEYS, sk.cbSize+1, &sk, 0) == 0); - - sk = skOrig; - sk.dwFlags = (skOrig.dwFlags ^ 1); - TEST(NtUserSystemParametersInfo(SPI_SETSTICKYKEYS, sk.cbSize+1, &sk, 0) == 0); - TEST(NtUserSystemParametersInfo(SPI_SETSTICKYKEYS, sk.cbSize-1, &sk, 0) == 0); - TEST(NtUserSystemParametersInfo(SPI_SETSTICKYKEYS, sk.cbSize, &sk, 0) == 1); - - sk = skOrig; - TEST(NtUserSystemParametersInfo(SPI_GETSTICKYKEYS, 0, &sk, 0) == 1); - TEST(sk.dwFlags == (skOrig.dwFlags ^ 1)); - - /* Restore original values */ - skOrig.cbSize = sizeof(STICKYKEYS); - ASSERT(NtUserSystemParametersInfo(SPI_SETSTICKYKEYS, 0, &skOrig, 0) == 1); - - return APISTATUS_NORMAL; -} - -INT -Test_SPI_SETACCESSTIMEOUT(PTESTINFO pti) -{ - ACCESSTIMEOUT atoOrig, atoTmp; - - /* Get original values */ - atoOrig.cbSize = sizeof(ACCESSTIMEOUT); - ASSERT(NtUserSystemParametersInfo(SPI_GETACCESSTIMEOUT, 0, &atoOrig, 0) == 1); - - atoTmp.cbSize = sizeof(ACCESSTIMEOUT) - 1; - TEST(NtUserSystemParametersInfo(SPI_GETACCESSTIMEOUT, 0, &atoTmp, 0) == 0); - atoTmp.cbSize = sizeof(ACCESSTIMEOUT) + 1; - TEST(NtUserSystemParametersInfo(SPI_GETACCESSTIMEOUT, 0, &atoTmp, 0) == 0); - atoTmp.cbSize = sizeof(ACCESSTIMEOUT); - TEST(NtUserSystemParametersInfo(SPI_GETACCESSTIMEOUT, 0, &atoTmp, 0) == 1); - atoTmp.cbSize = sizeof(ACCESSTIMEOUT); - TEST(NtUserSystemParametersInfo(SPI_GETACCESSTIMEOUT, 1, &atoTmp, 0) == 0); - atoTmp.cbSize = sizeof(ACCESSTIMEOUT); - TEST(NtUserSystemParametersInfo(SPI_GETACCESSTIMEOUT, -1, &atoTmp, 0) == 0); - atoTmp.cbSize = sizeof(ACCESSTIMEOUT); - TEST(NtUserSystemParametersInfo(SPI_GETACCESSTIMEOUT, sizeof(ACCESSTIMEOUT), &atoTmp, 0) == 1); - atoTmp.cbSize = sizeof(ACCESSTIMEOUT); - TEST(NtUserSystemParametersInfo(SPI_GETACCESSTIMEOUT, sizeof(ACCESSTIMEOUT)-1, &atoTmp, 0) == 0); - atoTmp.cbSize = sizeof(ACCESSTIMEOUT); - TEST(NtUserSystemParametersInfo(SPI_GETACCESSTIMEOUT, sizeof(ACCESSTIMEOUT)+1, &atoTmp, 0) == 0); - - /* Restore original values */ - ASSERT(NtUserSystemParametersInfo(SPI_SETACCESSTIMEOUT, sizeof(atoOrig), &atoOrig, 0) == 1); - - return APISTATUS_NORMAL; -} - -INT -Test_SPI_SETSERIALKEYS(PTESTINFO pti) -{ - return APISTATUS_NORMAL; -} - -INT -Test_SPI_SETSOUNDSENTRY(PTESTINFO pti) -{ - return APISTATUS_NORMAL; -} - -INT -Test_SPI_SETHIGHCONTRAST(PTESTINFO pti) -{ - return APISTATUS_NORMAL; -} - -INT -Test_SPI_SETKEYBOARDPREF(PTESTINFO pti) -{ - return APISTATUS_NORMAL; -} - -// Test_SPI_SETSCREENREADER(pti); -/// Test_SPI_SETANIMATION(pti); -// Test_SPI_SETFONTSMOOTHING(pti); -// Test_SPI_SETDRAGWIDTH(pti); -// Test_SPI_SETDRAGHEIGHT(pti); -// Test_SPI_SETHANDHELD(pti); -// Test_SPI_SETLOWPOWERTIMEOUT(pti); -// Test_SPI_SETPOWEROFFTIMEOUT(pti); -// Test_SPI_SETLOWPOWERACTIVE(pti); -// Test_SPI_SETPOWEROFFACTIVE(pti); -// Test_SPI_SETCURSORS(pti); -// Test_SPI_SETICONS(pti); -// Test_SPI_SETDEFAULTINPUTLANG(pti); -// Test_SPI_SETLANGTOGGLE(pti); -// Test_SPI_GETWINDOWSEXTENSION(pti); -// Test_SPI_SETMOUSETRAILS(pti); -// Test_SPI_SETSNAPTODEFBUTTON(pti); -// Test_SPI_GETSCREENSAVERRUNNING(pti); -// Test_SPI_SETMOUSEHOVERWIDTH(pti); -// Test_SPI_SETMOUSEHOVERHEIGHT(pti); -// Test_SPI_SETMOUSEHOVERTIME(pti); -// Test_SPI_SETWHEELSCROLLLINES(pti); -// Test_SPI_SETMENUSHOWDELAY(pti); -// Test_SPI_SETWHEELSCROLLCHARS(pti); -// Test_SPI_SETSHOWIMEUI(pti); -// Test_SPI_SETMOUSESPEED(pti); -// Test_SPI_GETSCREENSAVERRUNNING(pti); -// Test_SPI_SETAUDIODESCRIPTION(pti); -// Test_SPI_SETSCREENSAVESECURE(pti); -// Test_SPI_SETACTIVEWINDOWTRACKING(pti); - -INT -Test_SPI_SETMENUANIMATION(PTESTINFO pti) -{ - BOOL bOrig, bTemp = 0; - DWORD dwUserPrefMask; - DWORD cbSize; - - /* Get original values */ - NtUserSystemParametersInfo(SPI_GETMENUANIMATION, 0, &bOrig, 0); - - /* Value 0 */ - NtUserSystemParametersInfo(SPI_SETMENUANIMATION, 0, NULL, SPIF_UPDATEINIFILE); - NtUserSystemParametersInfo(SPI_GETMENUANIMATION, 0, &bTemp, 0); - TEST(bTemp == 0); - cbSize = sizeof(dwUserPrefMask); - TEST(QueryUserRegValueW(KEY_DESKTOP, VAL_PREFMASK, &dwUserPrefMask, &cbSize, NULL) == ERROR_SUCCESS); - TEST((dwUserPrefMask & UPM_MENUANIMATION) == 0); - - /* Value 1 */ - NtUserSystemParametersInfo(SPI_SETMENUANIMATION, 0, (PVOID)1, SPIF_UPDATEINIFILE); - NtUserSystemParametersInfo(SPI_GETMENUANIMATION, 0, &bTemp, 0); - TEST(bTemp == 1); - cbSize = sizeof(dwUserPrefMask); - TEST(QueryUserRegValueW(KEY_DESKTOP, VAL_PREFMASK, &dwUserPrefMask, &cbSize, NULL) == ERROR_SUCCESS); - TEST((dwUserPrefMask & UPM_MENUANIMATION) != 0); - - - /* Restore original values */ - NtUserSystemParametersInfo(SPI_SETMENUANIMATION, 0, (PVOID)bOrig, SPIF_UPDATEINIFILE); - - return APISTATUS_NORMAL; -} - -// Test_SPI_SETCOMBOBOXANIMATION(pti); -// Test_SPI_SETLISTBOXSMOOTHSCROLLING(pti); -// Test_SPI_SETGRADIENTCAPTIONS(pti); - -INT -Test_SPI_SETKEYBOARDCUES(PTESTINFO pti) -{ - return Test_UserPref(pti, SPI_GETKEYBOARDCUES, SPI_SETKEYBOARDCUES, UPM_KEYBOARDCUES); -} - -// Test_SPI_SETACTIVEWNDTRKZORDER(pti); -// Test_SPI_SETHOTTRACKING(pti); -// Test_SPI_SETMENUFADE(pti); -// Test_SPI_SETSELECTIONFADE(pti); -// Test_SPI_SETTOOLTIPANIMATION(pti); -// Test_SPI_SETTOOLTIPFADE(pti); -// Test_SPI_SETCURSORSHADOW(pti); -// Test_SPI_SETMOUSESONAR(pti); - -INT -Test_SPI_SETMOUSECLICKLOCK(PTESTINFO pti) -{ - return Test_UserPref(pti, SPI_GETMOUSECLICKLOCK, SPI_SETMOUSECLICKLOCK, UPM_CLICKLOCK); -} - -// Test_SPI_SETMOUSEVANISH(pti); -// Test_SPI_SETFLATMENU(pti); -// Test_SPI_SETDROPSHADOW(pti); -// Test_SPI_SETBLOCKSENDINPUTRESETS(pti); -// Test_SPI_GETSETUIEFFECTS(pti); -// Test_SPI_SETDISABLEOVERLAPPEDCONTENT(pti); -// Test_SPI_SETCLIENTAREAANIMATION(pti); -// Test_SPI_SETCLEARTYPE(pti); -// Test_SPI_SETSPEECHRECOGNITION(pti); -// Test_SPI_SETFOREGROUNDLOCKTIMEOUT(pti); -// Test_SPI_SETACTIVEWNDTRKTIMEOUT(pti); -// Test_SPI_SETFOREGROUNDFLASHCOUNT(pti); -// Test_SPI_SETCARETWIDTH(pti); -// Test_SPI_SETMOUSECLICKLOCKTIME(pti); -// Test_SPI_SETFONTSMOOTHINGTYPE(pti); -// Test_SPI_SETFONTSMOOTHINGCONTRAST(pti); -// Test_SPI_SETFOCUSBORDERWIDTH(pti); -// Test_SPI_SETFOCUSBORDERHEIGHT(pti); -// Test_SPI_SETFONTSMOOTHINGORIENTATION(pti); - - -INT -Test_NtUserSystemParametersInfo(PTESTINFO pti) -{ - HWND hWnd; - - hWnd = CreateTestWindow(); - ASSERT(hWnd); - - Test_NtUserSystemParametersInfo_Params(pti); - Test_NtUserSystemParametersInfo_fWinIni(pti); - Test_NtUserSystemParametersInfo_Winsta(pti); - - Test_SPI_SETBEEP(pti); - Test_SPI_SETMOUSE(pti); - Test_SPI_SETBORDER(pti); -// Test_SPI_SETKEYBOARDSPEED(pti); -// Test_SPI_LANGDRIVER(pti); -// Test_SPI_ICONHORIZONTALSPACING(pti); -// Test_SPI_SETSCREENSAVETIMEOUT(pti); -// Test_SPI_SETSCREENSAVEACTIVE(pti); -// Test_SPI_SETGRIDGRANULARITY(pti); - Test_SPI_SETDESKWALLPAPER(pti); -// Test_SPI_SETDESKPATTERN(pti); -// Test_SPI_SETKEYBOARDDELAY(pti); -// Test_SPI_ICONVERTICALSPACING(pti); -// Test_SPI_SETICONTITLEWRAP(pti); -// Test_SPI_SETMENUDROPALIGNMENT(pti); -// Test_SPI_SETDOUBLECLKWIDTH(pti); -// Test_SPI_SETDOUBLECLKHEIGHT(pti); -// Test_SPI_SETDOUBLECLICKTIME(pti); - Test_SPI_SETMOUSEBUTTONSWAP(pti); - Test_SPI_SETICONTITLELOGFONT(pti); - Test_SPI_SETFASTTASKSWITCH(pti); - Test_SPI_SETDRAGFULLWINDOWS(pti); - Test_SPI_SETNONCLIENTMETRICS(pti); - Test_SPI_SETMINIMIZEDMETRICS(pti); - Test_SPI_SETICONMETRICS(pti); - Test_SPI_SETWORKAREA(pti); - Test_SPI_SETPENWINDOWS(pti); - Test_SPI_SETFILTERKEYS(pti); - Test_SPI_SETTOGGLEKEYS(pti); - Test_SPI_SETMOUSEKEYS(pti); - Test_SPI_SETSHOWSOUNDS(pti); - Test_SPI_SETSTICKYKEYS(pti); - Test_SPI_SETACCESSTIMEOUT(pti); - Test_SPI_SETSERIALKEYS(pti); - Test_SPI_SETSOUNDSENTRY(pti); - Test_SPI_SETHIGHCONTRAST(pti); - Test_SPI_SETKEYBOARDPREF(pti); -// Test_SPI_SETSCREENREADER(pti); -/// Test_SPI_SETANIMATION(pti); -// Test_SPI_SETFONTSMOOTHING(pti); -// Test_SPI_SETDRAGWIDTH(pti); -// Test_SPI_SETDRAGHEIGHT(pti); -// Test_SPI_SETHANDHELD(pti); -// Test_SPI_SETLOWPOWERTIMEOUT(pti); -// Test_SPI_SETPOWEROFFTIMEOUT(pti); -// Test_SPI_SETLOWPOWERACTIVE(pti); -// Test_SPI_SETPOWEROFFACTIVE(pti); -// Test_SPI_SETCURSORS(pti); -// Test_SPI_SETICONS(pti); -// Test_SPI_SETDEFAULTINPUTLANG(pti); -// Test_SPI_SETLANGTOGGLE(pti); -// Test_SPI_GETWINDOWSEXTENSION(pti); -// Test_SPI_SETMOUSETRAILS(pti); -// Test_SPI_SETSNAPTODEFBUTTON(pti); -// Test_SPI_GETSCREENSAVERRUNNING(pti); -// Test_SPI_SETMOUSEHOVERWIDTH(pti); -// Test_SPI_SETMOUSEHOVERHEIGHT(pti); -// Test_SPI_SETMOUSEHOVERTIME(pti); -// Test_SPI_SETWHEELSCROLLLINES(pti); -// Test_SPI_SETMENUSHOWDELAY(pti); -// Test_SPI_SETWHEELSCROLLCHARS(pti); -// Test_SPI_SETSHOWIMEUI(pti); -// Test_SPI_SETMOUSESPEED(pti); -// Test_SPI_GETSCREENSAVERRUNNING(pti); -// Test_SPI_SETAUDIODESCRIPTION(pti); -// Test_SPI_SETSCREENSAVESECURE(pti); -// Test_SPI_SETACTIVEWINDOWTRACKING(pti); - Test_SPI_SETMENUANIMATION(pti); -// Test_SPI_SETCOMBOBOXANIMATION(pti); -// Test_SPI_SETLISTBOXSMOOTHSCROLLING(pti); -// Test_SPI_SETGRADIENTCAPTIONS(pti); - Test_SPI_SETKEYBOARDCUES(pti); -// Test_SPI_SETACTIVEWNDTRKZORDER(pti); -// Test_SPI_SETHOTTRACKING(pti); -// Test_SPI_SETMENUFADE(pti); -// Test_SPI_SETSELECTIONFADE(pti); -// Test_SPI_SETTOOLTIPANIMATION(pti); -// Test_SPI_SETTOOLTIPFADE(pti); -// Test_SPI_SETCURSORSHADOW(pti); -// Test_SPI_SETMOUSESONAR(pti); - Test_SPI_SETMOUSECLICKLOCK(pti); -// Test_SPI_SETMOUSEVANISH(pti); -// Test_SPI_SETFLATMENU(pti); -// Test_SPI_SETDROPSHADOW(pti); -// Test_SPI_SETBLOCKSENDINPUTRESETS(pti); -// Test_SPI_GETSETUIEFFECTS(pti); -// Test_SPI_SETDISABLEOVERLAPPEDCONTENT(pti); -// Test_SPI_SETCLIENTAREAANIMATION(pti); -// Test_SPI_SETCLEARTYPE(pti); -// Test_SPI_SETSPEECHRECOGNITION(pti); -// Test_SPI_SETFOREGROUNDLOCKTIMEOUT(pti); -// Test_SPI_SETACTIVEWNDTRKTIMEOUT(pti); -// Test_SPI_SETFOREGROUNDFLASHCOUNT(pti); -// Test_SPI_SETCARETWIDTH(pti); -// Test_SPI_SETMOUSECLICKLOCKTIME(pti); -// Test_SPI_SETFONTSMOOTHINGTYPE(pti); -// Test_SPI_SETFONTSMOOTHINGCONTRAST(pti); -// Test_SPI_SETFOCUSBORDERWIDTH(pti); -// Test_SPI_SETFOCUSBORDERHEIGHT(pti); -// Test_SPI_SETFONTSMOOTHINGORIENTATION(pti); - - DestroyWindow(hWnd); - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/ntuser/NtUserToUnicodeEx.c b/rostests/apitests/w32knapi/ntuser/NtUserToUnicodeEx.c deleted file mode 100644 index 921b660752e..00000000000 --- a/rostests/apitests/w32knapi/ntuser/NtUserToUnicodeEx.c +++ /dev/null @@ -1,438 +0,0 @@ - -INT -Test_NtUserToUnicodeEx(PTESTINFO pti) -{ - BYTE KeyState[256] = {0}; - WCHAR Buffer[10]; - HKL hkl = LoadKeyboardLayoutW(L"00000409", KLF_NOTELLSHELL); - - TEST(NtUserToUnicodeEx(27, 1, KeyState, Buffer, 10, 0, 0) == 1); - - /* Test with no key pressed */ - ZeroMemory(KeyState, 256); - TEST(NtUserToUnicodeEx(27, 1, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 27); - TEST(NtUserToUnicodeEx(49, 2, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '1'); - TEST(NtUserToUnicodeEx(50, 3, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '2'); - TEST(NtUserToUnicodeEx(51, 4, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '3'); - TEST(NtUserToUnicodeEx(52, 5, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '4'); - TEST(NtUserToUnicodeEx(53, 6, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '5'); - TEST(NtUserToUnicodeEx(54, 7, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '6'); - TEST(NtUserToUnicodeEx(55, 8, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '7'); - TEST(NtUserToUnicodeEx(56, 9, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '8'); - TEST(NtUserToUnicodeEx(57, 10, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '9'); - TEST(NtUserToUnicodeEx(48, 11, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '0'); - TEST(NtUserToUnicodeEx(189, 12, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '-'); - TEST(NtUserToUnicodeEx(187, 13, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '='); - TEST(NtUserToUnicodeEx(8, 14, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 8); - TEST(NtUserToUnicodeEx(9, 15, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 9); - TEST(NtUserToUnicodeEx(81, 16, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'q'); - TEST(NtUserToUnicodeEx(87, 17, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'w'); - TEST(NtUserToUnicodeEx(69, 18, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'e'); - TEST(NtUserToUnicodeEx(82, 19, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'r'); - TEST(NtUserToUnicodeEx(84, 20, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 't'); - TEST(NtUserToUnicodeEx(89, 21, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'y'); - TEST(NtUserToUnicodeEx(85, 22, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'u'); - TEST(NtUserToUnicodeEx(73, 23, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'i'); - TEST(NtUserToUnicodeEx(79, 24, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'o'); - TEST(NtUserToUnicodeEx(80, 25, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'p'); - TEST(NtUserToUnicodeEx(219, 26, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '['); - TEST(NtUserToUnicodeEx(221, 27, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == ']'); - TEST(NtUserToUnicodeEx(13, 28, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 13); - TEST(NtUserToUnicodeEx(65, 30, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'a'); - TEST(NtUserToUnicodeEx(83, 31, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 's'); - TEST(NtUserToUnicodeEx(68, 32, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'd'); - TEST(NtUserToUnicodeEx(70, 33, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'f'); - TEST(NtUserToUnicodeEx(71, 34, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'g'); - TEST(NtUserToUnicodeEx(72, 35, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'h'); - TEST(NtUserToUnicodeEx(74, 36, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'j'); - TEST(NtUserToUnicodeEx(75, 37, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'k'); - TEST(NtUserToUnicodeEx(76, 38, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'l'); - TEST(NtUserToUnicodeEx(186, 39, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == ';'); - TEST(NtUserToUnicodeEx(222, 40, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '\''); - TEST(NtUserToUnicodeEx(192, 41, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '`'); - TEST(NtUserToUnicodeEx(220, 43, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '\\'); - TEST(NtUserToUnicodeEx(90, 44, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'z'); - TEST(NtUserToUnicodeEx(88, 45, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'x'); - TEST(NtUserToUnicodeEx(67, 46, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'c'); - TEST(NtUserToUnicodeEx(86, 47, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'v'); - TEST(NtUserToUnicodeEx(66, 48, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'b'); - TEST(NtUserToUnicodeEx(78, 49, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'n'); - TEST(NtUserToUnicodeEx(77, 50, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'm'); - TEST(NtUserToUnicodeEx(188, 51, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == ','); - TEST(NtUserToUnicodeEx(190, 52, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '.'); - TEST(NtUserToUnicodeEx(191, 53, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '/'); - TEST(NtUserToUnicodeEx(106, 55, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '*'); - TEST(NtUserToUnicodeEx(32, 57, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == ' '); - TEST(NtUserToUnicodeEx(109, 74, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '-'); - TEST(NtUserToUnicodeEx(107, 78, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '+'); - TEST(NtUserToUnicodeEx(226, 86, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '\\'); - TEST(NtUserToUnicodeEx(9, 124, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 9); - - /* Test with shift key pressed */ - ZeroMemory(KeyState, 256); - KeyState[VK_SHIFT] = 0xff; - TEST(NtUserToUnicodeEx(27, 1, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 27); - TEST(NtUserToUnicodeEx(49, 2, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '!'); - TEST(NtUserToUnicodeEx(50, 3, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '@'); - TEST(NtUserToUnicodeEx(51, 4, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '#'); - TEST(NtUserToUnicodeEx(52, 5, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '$'); - TEST(NtUserToUnicodeEx(53, 6, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '%'); - TEST(NtUserToUnicodeEx(54, 7, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '^'); - TEST(NtUserToUnicodeEx(55, 8, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '&'); - TEST(NtUserToUnicodeEx(56, 9, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '*'); - TEST(NtUserToUnicodeEx(57, 10, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '('); - TEST(NtUserToUnicodeEx(48, 11, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == ')'); - TEST(NtUserToUnicodeEx(189, 12, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '_'); - TEST(NtUserToUnicodeEx(187, 13, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '+'); - TEST(NtUserToUnicodeEx(8, 14, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 8); - TEST(NtUserToUnicodeEx(9, 15, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 9); - TEST(NtUserToUnicodeEx(81, 16, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'Q'); - TEST(NtUserToUnicodeEx(87, 17, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'W'); - TEST(NtUserToUnicodeEx(69, 18, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'E'); - TEST(NtUserToUnicodeEx(82, 19, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'R'); - TEST(NtUserToUnicodeEx(84, 20, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'T'); - TEST(NtUserToUnicodeEx(89, 21, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'Y'); - TEST(NtUserToUnicodeEx(85, 22, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'U'); - TEST(NtUserToUnicodeEx(73, 23, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'I'); - TEST(NtUserToUnicodeEx(79, 24, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'O'); - TEST(NtUserToUnicodeEx(80, 25, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'P'); - TEST(NtUserToUnicodeEx(219, 26, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '{'); - TEST(NtUserToUnicodeEx(221, 27, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '}'); - TEST(NtUserToUnicodeEx(13, 28, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 13); - TEST(NtUserToUnicodeEx(65, 30, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'A'); - TEST(NtUserToUnicodeEx(83, 31, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'S'); - TEST(NtUserToUnicodeEx(68, 32, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'D'); - TEST(NtUserToUnicodeEx(70, 33, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'F'); - TEST(NtUserToUnicodeEx(71, 34, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'G'); - TEST(NtUserToUnicodeEx(72, 35, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'H'); - TEST(NtUserToUnicodeEx(74, 36, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'J'); - TEST(NtUserToUnicodeEx(75, 37, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'K'); - TEST(NtUserToUnicodeEx(76, 38, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'L'); - TEST(NtUserToUnicodeEx(186, 39, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == ':'); - TEST(NtUserToUnicodeEx(222, 40, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '"'); - TEST(NtUserToUnicodeEx(192, 41, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '~'); - TEST(NtUserToUnicodeEx(220, 43, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '|'); - TEST(NtUserToUnicodeEx(90, 44, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'Z'); - TEST(NtUserToUnicodeEx(88, 45, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'X'); - TEST(NtUserToUnicodeEx(67, 46, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'C'); - TEST(NtUserToUnicodeEx(86, 47, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'V'); - TEST(NtUserToUnicodeEx(66, 48, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'B'); - TEST(NtUserToUnicodeEx(78, 49, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'N'); - TEST(NtUserToUnicodeEx(77, 50, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'M'); - TEST(NtUserToUnicodeEx(188, 51, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '<'); - TEST(NtUserToUnicodeEx(190, 52, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '>'); - TEST(NtUserToUnicodeEx(191, 53, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '?'); - TEST(NtUserToUnicodeEx(106, 55, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '*'); - TEST(NtUserToUnicodeEx(32, 57, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == ' '); - TEST(NtUserToUnicodeEx(109, 74, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '-'); - TEST(NtUserToUnicodeEx(107, 78, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '+'); - TEST(NtUserToUnicodeEx(226, 86, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '|'); - TEST(NtUserToUnicodeEx(9, 124, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 9); - - /* Test with ctrl key pressed */ - ZeroMemory(KeyState, 256); - KeyState[VK_CONTROL] = 0xff; -// TEST(NtUserToUnicodeEx(27, 1, KeyState, Buffer, 10, 0, hkl) == 1); -// TEST(Buffer[0] == 27); -// TEST(NtUserToUnicodeEx(8, 14, KeyState, Buffer, 10, 0, hkl) == 1); -// TEST(Buffer[0] == 127); - TEST(NtUserToUnicodeEx(81, 16, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 17); - TEST(NtUserToUnicodeEx(87, 17, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 23); - TEST(NtUserToUnicodeEx(69, 18, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 5); - TEST(NtUserToUnicodeEx(82, 19, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 18); - TEST(NtUserToUnicodeEx(84, 20, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 20); - TEST(NtUserToUnicodeEx(89, 21, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 25); - TEST(NtUserToUnicodeEx(85, 22, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 21); - TEST(NtUserToUnicodeEx(73, 23, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 9); - TEST(NtUserToUnicodeEx(79, 24, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 15); - TEST(NtUserToUnicodeEx(80, 25, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 16); - TEST(NtUserToUnicodeEx(219, 26, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 27); - TEST(NtUserToUnicodeEx(221, 27, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 29); - TEST(NtUserToUnicodeEx(13, 28, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 10); - TEST(NtUserToUnicodeEx(65, 30, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 1); - TEST(NtUserToUnicodeEx(83, 31, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 19); - TEST(NtUserToUnicodeEx(68, 32, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 4); - TEST(NtUserToUnicodeEx(70, 33, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 6); - TEST(NtUserToUnicodeEx(71, 34, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 7); - TEST(NtUserToUnicodeEx(72, 35, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 8); - TEST(NtUserToUnicodeEx(74, 36, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 10); - TEST(NtUserToUnicodeEx(75, 37, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 11); - TEST(NtUserToUnicodeEx(76, 38, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 12); - TEST(NtUserToUnicodeEx(220, 43, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 28); - TEST(NtUserToUnicodeEx(90, 44, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 26); - TEST(NtUserToUnicodeEx(88, 45, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 24); - TEST(NtUserToUnicodeEx(67, 46, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 3); - TEST(NtUserToUnicodeEx(86, 47, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 22); - TEST(NtUserToUnicodeEx(66, 48, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 2); - TEST(NtUserToUnicodeEx(78, 49, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 14); - TEST(NtUserToUnicodeEx(77, 50, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 13); -// TEST(NtUserToUnicodeEx(32, 57, KeyState, Buffer, 10, 0, hkl) == 1); -// TEST(Buffer[0] == 32); - TEST(NtUserToUnicodeEx(226, 86, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 28); - - /* Test with VK_CAPITAL key pressed */ - ZeroMemory(KeyState, 256); - KeyState[VK_CAPITAL] = 0xff; - TEST(NtUserToUnicodeEx(27, 1, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 27); - TEST(NtUserToUnicodeEx(49, 2, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '1'); - TEST(NtUserToUnicodeEx(50, 3, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '2'); - TEST(NtUserToUnicodeEx(51, 4, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '3'); - TEST(NtUserToUnicodeEx(52, 5, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '4'); - TEST(NtUserToUnicodeEx(53, 6, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '5'); - TEST(NtUserToUnicodeEx(54, 7, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '6'); - TEST(NtUserToUnicodeEx(55, 8, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '7'); - TEST(NtUserToUnicodeEx(56, 9, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '8'); - TEST(NtUserToUnicodeEx(57, 10, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '9'); - TEST(NtUserToUnicodeEx(48, 11, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '0'); - TEST(NtUserToUnicodeEx(189, 12, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '-'); - TEST(NtUserToUnicodeEx(187, 13, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '='); - TEST(NtUserToUnicodeEx(8, 14, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 8); - TEST(NtUserToUnicodeEx(9, 15, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 9); - TEST(NtUserToUnicodeEx(81, 16, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'Q'); - TEST(NtUserToUnicodeEx(87, 17, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'W'); - TEST(NtUserToUnicodeEx(69, 18, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'E'); - TEST(NtUserToUnicodeEx(82, 19, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'R'); - TEST(NtUserToUnicodeEx(84, 20, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'T'); - TEST(NtUserToUnicodeEx(89, 21, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'Y'); - TEST(NtUserToUnicodeEx(85, 22, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'U'); - TEST(NtUserToUnicodeEx(73, 23, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'I'); - TEST(NtUserToUnicodeEx(79, 24, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'O'); - TEST(NtUserToUnicodeEx(80, 25, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'P'); - TEST(NtUserToUnicodeEx(219, 26, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '['); - TEST(NtUserToUnicodeEx(221, 27, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == ']'); - TEST(NtUserToUnicodeEx(13, 28, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 13); - TEST(NtUserToUnicodeEx(65, 30, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'A'); - TEST(NtUserToUnicodeEx(83, 31, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'S'); - TEST(NtUserToUnicodeEx(68, 32, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'D'); - TEST(NtUserToUnicodeEx(70, 33, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'F'); - TEST(NtUserToUnicodeEx(71, 34, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'G'); - TEST(NtUserToUnicodeEx(72, 35, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'H'); - TEST(NtUserToUnicodeEx(74, 36, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'J'); - TEST(NtUserToUnicodeEx(75, 37, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'K'); - TEST(NtUserToUnicodeEx(76, 38, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'L'); - TEST(NtUserToUnicodeEx(186, 39, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == ';'); - TEST(NtUserToUnicodeEx(222, 40, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '\''); - TEST(NtUserToUnicodeEx(192, 41, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '`'); - TEST(NtUserToUnicodeEx(220, 43, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '\\'); - TEST(NtUserToUnicodeEx(90, 44, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'Z'); - TEST(NtUserToUnicodeEx(88, 45, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'X'); - TEST(NtUserToUnicodeEx(67, 46, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'C'); - TEST(NtUserToUnicodeEx(86, 47, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'V'); - TEST(NtUserToUnicodeEx(66, 48, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'B'); - TEST(NtUserToUnicodeEx(78, 49, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'N'); - TEST(NtUserToUnicodeEx(77, 50, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 'M'); - TEST(NtUserToUnicodeEx(188, 51, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == ','); - TEST(NtUserToUnicodeEx(190, 52, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '.'); - TEST(NtUserToUnicodeEx(191, 53, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '/'); - TEST(NtUserToUnicodeEx(106, 55, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '*'); - TEST(NtUserToUnicodeEx(32, 57, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == ' '); - TEST(NtUserToUnicodeEx(109, 74, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '-'); - TEST(NtUserToUnicodeEx(107, 78, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '+'); - TEST(NtUserToUnicodeEx(226, 86, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == '\\'); - TEST(NtUserToUnicodeEx(9, 124, KeyState, Buffer, 10, 0, hkl) == 1); - TEST(Buffer[0] == 9); - - return APISTATUS_NORMAL; -} - diff --git a/rostests/apitests/w32knapi/ntuser/NtUserUpdatePerUserSystemParameters.c b/rostests/apitests/w32knapi/ntuser/NtUserUpdatePerUserSystemParameters.c deleted file mode 100644 index d05b8b6b43e..00000000000 --- a/rostests/apitests/w32knapi/ntuser/NtUserUpdatePerUserSystemParameters.c +++ /dev/null @@ -1,22 +0,0 @@ - -DWORD WINAPI -UpdatePerUserSystemParameters(DWORD dw1, DWORD dw2); - -INT -Test_NtUserUpdatePerUserSystemParameters(PTESTINFO pti) -{ - BOOL bScrRd; - - TEST(NtUserUpdatePerUserSystemParameters(0, 0) == 0); - TEST(NtUserUpdatePerUserSystemParameters(0, 1) == 0); - TEST(NtUserUpdatePerUserSystemParameters(1, 0) == 0); - TEST(NtUserUpdatePerUserSystemParameters(1, 1) == 0); - TEST(NtUserUpdatePerUserSystemParameters(0, 2) == 0); - TEST(NtUserUpdatePerUserSystemParameters(0, -1) == 0); - -// NtUserSystemParametersInfo(SPI_SETSCREENREADER, 1, 0, 0); - NtUserSystemParametersInfo(SPI_GETSCREENREADER, 0, &bScrRd, 0); - printf("bScrRd = %d\n", bScrRd); - - return APISTATUS_NORMAL; -} diff --git a/rostests/apitests/w32knapi/osver.c b/rostests/apitests/w32knapi/osver.c deleted file mode 100644 index 18e0dc44867..00000000000 --- a/rostests/apitests/w32knapi/osver.c +++ /dev/null @@ -1,50 +0,0 @@ -#include "w32knapi.h" - -OSVERSIONINFOW g_OsVer; -UINT g_OsIdx; - -ASPI gNOPARAM_ROUTINE_CREATEMENU = {-1,-1,0x00,-1,0x00}; -ASPI gNOPARAM_ROUTINE_CREATEMENUPOPUP = {-1,-1,0x01,-1,0x01}; -ASPI gNOPARAM_ROUTINE_LOADUSERAPIHOOK = {-1,-1,0x1d,-1,0x0e}; -ASPI gONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT = {-1, -1, 0x21, 0x21, 0x25}; -ASPI gONEPARAM_ROUTINE_MAPDEKTOPOBJECT = {-1,-1,0x30,-1,0x31}; -ASPI gONEPARAM_ROUTINE_SWAPMOUSEBUTTON = {-1,-1,0x42,-1,0x44}; - -ASPI gHWND_ROUTINE_DEREGISTERSHELLHOOKWINDOW = {-1,-1,0x45,-1,0x46}; -ASPI gHWND_ROUTINE_GETWNDCONTEXTHLPID = {-1,-1,0x47,-1,0x48}; -ASPI gHWNDPARAM_ROUTINE_SETWNDCONTEXTHLPID = {-1,-1,0x51,-1,0x52}; - -BOOL InitOsVersion() -{ - g_OsVer.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW); - GetVersionExW((LPOSVERSIONINFOW)&g_OsVer); - if (g_OsVer.dwMajorVersion == 4) - { - g_OsIdx = 0; - return TRUE; - } - else if (g_OsVer.dwMajorVersion == 5) - { - if (g_OsVer.dwMinorVersion == 0) - { - g_OsIdx = 1; - return TRUE; - } - else if (g_OsVer.dwMinorVersion == 1) - { - g_OsIdx = 2; - return TRUE; - } - else if (g_OsVer.dwMinorVersion == 2) - { - g_OsIdx = 3; - return TRUE; - } - } - else if (g_OsVer.dwMajorVersion == 6) - { - g_OsIdx = 4; - return TRUE; - } - return FALSE; -} diff --git a/rostests/apitests/w32knapi/resource.h b/rostests/apitests/w32knapi/resource.h deleted file mode 100644 index b4e9b8b5159..00000000000 --- a/rostests/apitests/w32knapi/resource.h +++ /dev/null @@ -1,2 +0,0 @@ - -#define IDI_ICON 1000 diff --git a/rostests/apitests/w32knapi/resource/system.ico b/rostests/apitests/w32knapi/resource/system.ico deleted file mode 100644 index 2d8f3223187..00000000000 Binary files a/rostests/apitests/w32knapi/resource/system.ico and /dev/null differ diff --git a/rostests/apitests/w32knapi/testlist.c b/rostests/apitests/w32knapi/testlist.c deleted file mode 100644 index aa87801236e..00000000000 --- a/rostests/apitests/w32knapi/testlist.c +++ /dev/null @@ -1,136 +0,0 @@ -#include "w32knapi.h" - -/* include the tests */ - -#include "ntdd/NtGdiDdCreateDirectDrawObject.c" -#include "ntdd/NtGdiDdDeleteDirectDrawObject.c" -#include "ntdd/NtGdiDdQueryDirectDrawObject.c" - -#include "ntgdi/NtGdiArcInternal.c" -#include "ntgdi/NtGdiBitBlt.c" -#include "ntgdi/NtGdiCombineRgn.c" -#include "ntgdi/NtGdiCreateBitmap.c" -#include "ntgdi/NtGdiCreateCompatibleBitmap.c" -#include "ntgdi/NtGdiCreateCompatibleDC.c" -#include "ntgdi/NtGdiCreateDIBSection.c" -#include "ntgdi/NtGdiDeleteObjectApp.c" -#include "ntgdi/NtGdiDoPalette.c" -#include "ntgdi/NtGdiEngCreatePalette.c" -//#include "ntgdi/NtGdiEnumFontChunk.c" -#include "ntgdi/NtGdiEnumFontOpen.c" -//#include "ntgdi/NtGdiExtCreatePen.c" -#include "ntgdi/NtGdiExtTextOutW.c" -#include "ntgdi/NtGdiFlushUserBatch.c" -#include "ntgdi/NtGdiGetBitmapBits.c" -#include "ntgdi/NtGdiGetFontResourceInfoInternalW.c" -#include "ntgdi/NtGdiGetRandomRgn.c" -#include "ntgdi/NtGdiPolyPolyDraw.c" -#include "ntgdi/NtGdiRestoreDC.c" -#include "ntgdi/NtGdiSaveDC.c" -#include "ntgdi/NtGdiSelectBitmap.c" -#include "ntgdi/NtGdiSelectBrush.c" -#include "ntgdi/NtGdiSelectFont.c" -#include "ntgdi/NtGdiSelectPen.c" -#include "ntgdi/NtGdiSetBitmapBits.c" -#include "ntgdi/NtGdiSetDIBitsToDeviceInternal.c" -//#include "ntgdi/NtGdiSTROBJ_vEnumStart.c" -#include "ntgdi/NtGdiGetDIBits.c" -#include "ntgdi/NtGdiGetStockObject.c" - -#include "ntuser/NtUserCallHwnd.c" -#include "ntuser/NtUserCallHwndLock.c" -#include "ntuser/NtUserCallHwndOpt.c" -#include "ntuser/NtUserCallHwndParam.c" -#include "ntuser/NtUserCallHwndParamLock.c" -#include "ntuser/NtUserCallNoParam.c" -#include "ntuser/NtUserCallOneParam.c" -#include "ntuser/NtUserCountClipboardFormats.c" -//#include "ntuser/NtUserCreateWindowEx.c" -#include "ntuser/NtUserEnumDisplayMonitors.c" -#include "ntuser/NtUserEnumDisplaySettings.c" -#include "ntuser/NtUserFindExistingCursorIcon.c" -#include "ntuser/NtUserGetClassInfo.c" -#include "ntuser/NtUserGetIconInfo.c" -#include "ntuser/NtUserGetTitleBarInfo.c" -#include "ntuser/NtUserProcessConnect.c" -#include "ntuser/NtUserRedrawWindow.c" -#include "ntuser/NtUserScrollDC.c" -#include "ntuser/NtUserSelectPalette.c" -#include "ntuser/NtUserSetTimer.c" -#include "ntuser/NtUserSystemParametersInfo.c" -#include "ntuser/NtUserToUnicodeEx.c" -#include "ntuser/NtUserUpdatePerUserSystemParameters.c" - -/* The List of tests */ -TESTENTRY TestList[] = -{ - /* DirectDraw */ - { L"NtGdiDdCreateDirectDrawObject", Test_NtGdiDdCreateDirectDrawObject }, - { L"NtGdiDdQueryDirectDrawObject", Test_NtGdiDdQueryDirectDrawObject }, - { L"NtGdiDdDeleteDirectDrawObject", Test_NtGdiDdDeleteDirectDrawObject }, - - /* ntgdi */ - { L"NtGdiArcInternal", Test_NtGdiArcInternal }, - { L"NtGdiBitBlt", Test_NtGdiBitBlt }, - { L"NtGdiCombineRgn", Test_NtGdiCombineRgn }, - { L"NtGdiCreateBitmap", Test_NtGdiCreateBitmap }, - { L"NtGdiCreateCompatibleBitmap", Test_NtGdiCreateCompatibleBitmap }, - { L"NtGdiCreateCompatibleDC", Test_NtGdiCreateCompatibleDC }, - { L"NtGdiCreateDIBSection", Test_NtGdiCreateDIBSection }, - { L"NtGdiDeleteObjectApp", Test_NtGdiDeleteObjectApp }, - { L"NtGdiDoPalette", Test_NtGdiDoPalette }, - { L"NtGdiEngCreatePalette", Test_NtGdiEngCreatePalette }, -// { L"NtGdiEnumFontChunk", Test_NtGdiEnumFontChunk }, - { L"NtGdiEnumFontOpen", Test_NtGdiEnumFontOpen }, -// { L"NtGdiExtCreatePen", Test_NtGdiExtCreatePen }, - { L"NtGdiExtTextOutW", Test_NtGdiExtTextOutW }, - { L"NtGdiFlushUserBatch", Test_NtGdiFlushUserBatch }, - { L"NtGdiGetBitmapBits", Test_NtGdiGetBitmapBits }, - { L"NtGdiGetFontResourceInfoInternalW", Test_NtGdiGetFontResourceInfoInternalW }, - { L"NtGdiGetRandomRgn", Test_NtGdiGetRandomRgn }, - { L"NtGdiPolyPolyDraw", Test_NtGdiPolyPolyDraw }, - { L"NtGdiRestoreDC", Test_NtGdiRestoreDC }, - { L"NtGdiSaveDC", Test_NtGdiSaveDC }, - { L"NtGdiSetBitmapBits", Test_NtGdiSetBitmapBits }, - { L"NtGdiSetDIBitsToDeviceInternal", Test_NtGdiSetDIBitsToDeviceInternal }, - { L"NtGdiSelectBitmap", Test_NtGdiSelectBitmap }, - { L"NtGdiSelectBrush", Test_NtGdiSelectBrush }, - { L"NtGdiSelectFont", Test_NtGdiSelectFont }, - { L"NtGdiSelectPen", Test_NtGdiSelectPen }, -// { L"NtGdiSTROBJ_vEnumStart", Test_NtGdiSTROBJ_vEnumStart }, - { L"NtGdiGetDIBitsInternal", Test_NtGdiGetDIBitsInternal }, - { L"NtGdiGetStockObject", Test_NtGdiGetStockObject }, - - /* ntuser */ - { L"NtUserCallHwnd", Test_NtUserCallHwnd }, - { L"NtUserCallHwndLock", Test_NtUserCallHwndLock }, - { L"NtUserCallHwndOpt", Test_NtUserCallHwndOpt }, - { L"NtUserCallHwndParam", Test_NtUserCallHwndParam }, - { L"NtUserCallHwndParamLock", Test_NtUserCallHwndParamLock }, - { L"NtUserCallNoParam", Test_NtUserCallNoParam }, - { L"NtUserCallOneParam", Test_NtUserCallOneParam }, - { L"NtUserCountClipboardFormats", Test_NtUserCountClipboardFormats }, -// { L"NtUserCreateWindowEx", Test_NtUserCreateWindowEx }, - { L"NtUserEnumDisplayMonitors", Test_NtUserEnumDisplayMonitors }, - { L"NtUserEnumDisplaySettings", TEST_NtUserEnumDisplaySettings }, - { L"NtUserFindExistingCursorIcon", Test_NtUserFindExistingCursoricon }, - { L"NtUserGetClassInfo", Test_NtUserGetClassInfo }, - { L"NtUserGetIconInfo", Test_NtUserGetIconInfo }, - { L"NtUserGetTitleBarInfo", Test_NtUserGetTitleBarInfo }, - { L"NtUserProcessConnect", Test_NtUserProcessConnect }, - { L"NtUserRedrawWindow", Test_NtUserRedrawWindow }, - { L"NtUserScrollDC", Test_NtUserScrollDC }, - { L"NtUserSelectPalette", Test_NtUserSelectPalette }, - { L"NtUserSetTimer", Test_NtUserSetTimer }, - { L"NtUserSystemParametersInfo", Test_NtUserSystemParametersInfo }, - { L"NtUserToUnicodeEx", Test_NtUserToUnicodeEx }, - { L"NtUserUpdatePerUserSystemParameters", Test_NtUserUpdatePerUserSystemParameters }, -}; - -/* The function that gives us the number of tests */ -INT NumTests(void) -{ - return sizeof(TestList) / sizeof(TESTENTRY); -} - - diff --git a/rostests/apitests/w32knapi/w32knapi.c b/rostests/apitests/w32knapi/w32knapi.c deleted file mode 100644 index 28240e210bb..00000000000 --- a/rostests/apitests/w32knapi/w32knapi.c +++ /dev/null @@ -1,148 +0,0 @@ -#include "w32knapi.h" - -HINSTANCE g_hInstance; -HMODULE g_hModule = NULL; -PGDI_TABLE_ENTRY GdiHandleTable; - -static -PGDI_TABLE_ENTRY -MyGdiQueryTable() -{ - PTEB pTeb = NtCurrentTeb(); - PPEB pPeb = pTeb->ProcessEnvironmentBlock; - return pPeb->GdiSharedHandleTable; -} - -BOOL -IsHandleValid(HGDIOBJ hobj) -{ - USHORT Index = (ULONG_PTR)hobj; - PGDI_TABLE_ENTRY pentry = &GdiHandleTable[Index]; - - if (pentry->KernelData == NULL || - pentry->KernelData < (PVOID)0x80000000 || - (USHORT)pentry->FullUnique != (USHORT)((ULONG_PTR)hobj >> 16)) - { - return FALSE; - } - - return TRUE; -} - -PVOID -GetHandleUserData(HGDIOBJ hobj) -{ - USHORT Index = (ULONG_PTR)hobj; - PGDI_TABLE_ENTRY pentry = &GdiHandleTable[Index]; - - if (pentry->KernelData == NULL || - pentry->KernelData < (PVOID)0x80000000 || - (USHORT)pentry->FullUnique != (USHORT)((ULONG_PTR)hobj >> 16)) - { - return NULL; - } - - return pentry->UserData; -} - - -static DWORD WINAPI -IntSyscall(FARPROC proc, UINT cParams, PVOID pFirstParam) -{ - DWORD retval; - -#ifdef __GNUC__ - asm volatile - ( - "pushfl;" // Save flags - "movl %%ecx, %%eax;" - "shl $2, %%eax;" // Calculate param size - "subl %%eax, %%esp;" // Calculate new stack pos - "movl %%esp, %%edi;" // Destination is stackpointer - "cld;" // Clear direction flag - "rep movsd;" // Copy params to the stack - "call *%%edx;" // Call function - "popfl;" // Restore flags - : "=a" (retval) - : "S" (pFirstParam), "c" (cParams), "d"(proc) - : "%edi" - ); -#else - __asm - { - pushf - mov eax, cParams - shl eax, 2 - sub esp, eax - mov edi, esp - cld - rep movsd - call proc - mov retval, eax - popf - }; -#endif - - return retval; -} - -DWORD -Syscall(LPWSTR pszFunction, int cParams, void* pParams) -{ - char szFunctionName[MAX_PATH]; - FARPROC proc; - - sprintf(szFunctionName, "%ls", pszFunction); - proc = (FARPROC)GetProcAddress(g_hModule, szFunctionName); - if (!proc) - { - printf("Couldn't find proc: %s\n", szFunctionName); - return FALSE; - } - - return IntSyscall(proc, cParams, pParams); -} - -BOOL -IsFunctionPresent(LPWSTR lpszFunction) -{ - char szFunctionName[MAX_PATH]; - sprintf(szFunctionName, "%ls", lpszFunction); - return (GetProcAddress(g_hModule, szFunctionName) != NULL); -} - -int APIENTRY -WinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpCmdLine, - int nCmdShow) -{ - g_hInstance = hInstance; - - printf("Win32k native API test\n"); - - /* Convert to gui thread */ - // IsGUIThread(TRUE); <- does not exists on win2k - - InitOsVersion(); - printf("g_OsIdx = %d\n", g_OsIdx); - - g_hModule = LoadLibraryW(L"w32kdll.dll"); - if (!g_hModule) - { - printf("w32kdll.dll not found!\n"); - return -1; - } - - GdiHandleTable = MyGdiQueryTable(); - if(!GdiHandleTable) - { - FreeLibrary(g_hModule); - printf("GdiHandleTable not found!\n"); - return -1; - } - - printf("\n"); - - return TestMain(L"w32knapi", L"win32k.sys Nt-Api"); -} diff --git a/rostests/apitests/w32knapi/w32knapi.h b/rostests/apitests/w32knapi/w32knapi.h deleted file mode 100644 index 764437bd1f2..00000000000 --- a/rostests/apitests/w32knapi/w32knapi.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef _W32KNAPI_H -#define _W32KNAPI_H - -/* SDK/NDK Headers */ -#define NTOS_MODE_USER -#define WIN32_NO_STATUS -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* Public Win32K Headers */ -#include -#include -#include -#include -#include -#include - -#include "../apitest.h" -#include "resource.h" - -typedef struct -{ - LPWSTR lpszFunction; - INT nSyscallNum; - INT nParams; -} SYCALL_ENTRY, *PSYSCALL_ENTRY; - -extern HINSTANCE g_hInstance; -extern HMODULE g_hModule; -extern PGDI_TABLE_ENTRY GdiHandleTable; - -BOOL IsHandleValid(HGDIOBJ hobj); -PVOID GetHandleUserData(HGDIOBJ hobj); -DWORD Syscall(LPWSTR lpszFunction, int cParams, void* pParams); -BOOL InitOsVersion(VOID); -extern UINT g_OsIdx; - -typedef UINT ASPI[5]; -extern ASPI gNOPARAM_ROUTINE_CREATEMENU; -extern ASPI gNOPARAM_ROUTINE_CREATEMENUPOPUP; -extern ASPI gNOPARAM_ROUTINE_LOADUSERAPIHOOK; -extern ASPI gONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT; -extern ASPI gONEPARAM_ROUTINE_MAPDEKTOPOBJECT; -extern ASPI gONEPARAM_ROUTINE_SWAPMOUSEBUTTON; -extern ASPI gHWND_ROUTINE_DEREGISTERSHELLHOOKWINDOW; -extern ASPI gHWND_ROUTINE_GETWNDCONTEXTHLPID; -extern ASPI gHWNDPARAM_ROUTINE_SETWNDCONTEXTHLPID; - -#define _NOPARAM_ROUTINE_CREATEMENU gNOPARAM_ROUTINE_CREATEMENU[g_OsIdx] -#define _NOPARAM_ROUTINE_CREATEMENUPOPUP gNOPARAM_ROUTINE_CREATEMENUPOPUP[g_OsIdx] -#define _NOPARAM_ROUTINE_LOADUSERAPIHOOK gNOPARAM_ROUTINE_LOADUSERAPIHOOK[g_OsIdx] -#define _ONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT gONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT[g_OsIdx] -#define _ONEPARAM_ROUTINE_MAPDEKTOPOBJECT gONEPARAM_ROUTINE_MAPDEKTOPOBJECT[g_OsIdx] -#define _ONEPARAM_ROUTINE_SWAPMOUSEBUTTON gONEPARAM_ROUTINE_SWAPMOUSEBUTTON[g_OsIdx] -#define _HWND_ROUTINE_DEREGISTERSHELLHOOKWINDOW gHWND_ROUTINE_DEREGISTERSHELLHOOKWINDOW[g_OsIdx] -#define _HWND_ROUTINE_GETWNDCONTEXTHLPID gHWND_ROUTINE_GETWNDCONTEXTHLPID[g_OsIdx] -#define _HWNDPARAM_ROUTINE_SETWNDCONTEXTHLPID gHWNDPARAM_ROUTINE_SETWNDCONTEXTHLPID[g_OsIdx] - - - -#endif /* _W32KNAPI_H */ diff --git a/rostests/apitests/w32knapi/w32knapi.rbuild b/rostests/apitests/w32knapi/w32knapi.rbuild deleted file mode 100644 index 4574c831e22..00000000000 --- a/rostests/apitests/w32knapi/w32knapi.rbuild +++ /dev/null @@ -1,16 +0,0 @@ - - . - apitest - ntdll - user32 - gdi32 - shell32 - advapi32 - w32kdll - dbghelp - -fms-extensions - w32knapi.c - osver.c - testlist.c - w32knapi.rc - diff --git a/rostests/apitests/w32knapi/w32knapi.rc b/rostests/apitests/w32knapi/w32knapi.rc deleted file mode 100644 index 4e631d954c6..00000000000 --- a/rostests/apitests/w32knapi/w32knapi.rc +++ /dev/null @@ -1,5 +0,0 @@ -#include -#include "resource.h" - -IDI_ICON ICON "resource/system.ico" - diff --git a/rostests/apitests/ws2_32/CMakeLists.txt b/rostests/apitests/ws2_32/CMakeLists.txt deleted file mode 100644 index 4f43560bfe2..00000000000 --- a/rostests/apitests/ws2_32/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ - -add_definitions(-D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - helpers.c - ioctlsocket.c - recv.c - testlist.c) - -add_executable(ws2_32_apitest ${SOURCE}) -target_link_libraries(ws2_32_apitest wine) -set_module_type(ws2_32_apitest win32cui) -add_importlibs(ws2_32_apitest ws2_32 msvcrt kernel32 ntdll) -add_cd_file(TARGET ws2_32_apitest DESTINATION reactos/bin FOR all) diff --git a/rostests/apitests/ws2_32/helpers.c b/rostests/apitests/ws2_32/helpers.c deleted file mode 100644 index 44af7e93174..00000000000 --- a/rostests/apitests/ws2_32/helpers.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * PROJECT: ws2_32.dll API tests - * LICENSE: GPLv2 or any later version - * FILE: apitests/ws2_32/helpers.c - * PURPOSE: Helper functions for the socket tests - * COPYRIGHT: Copyright 2008 Colin Finck - */ - -#include -#include -#include "ws2_32.h" - -int CreateSocket(SOCKET* psck) -{ - /* Create the socket */ - *psck = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - ok(*psck != INVALID_SOCKET, "*psck = %d\n", *psck); - - if(*psck == INVALID_SOCKET) - { - printf("Winsock error code is %u\n", WSAGetLastError()); - WSACleanup(); - return 0; - } - - return 1; -} - -int ConnectToReactOSWebsite(SOCKET sck) -{ - int iResult; - struct hostent* host; - struct sockaddr_in sa; - - /* Connect to "www.reactos.org" */ - host = gethostbyname("www.reactos.org"); - - sa.sin_family = AF_INET; - sa.sin_addr.s_addr = *(u_long*)host->h_addr_list[0]; - sa.sin_port = htons(80); - - SCKTEST(connect(sck, (struct sockaddr *)&sa, sizeof(sa))); - - return 1; -} - -int GetRequestAndWait(SOCKET sck) -{ - const char szGetRequest[] = "GET / HTTP/1.0\r\n\r\n"; - int iResult; - struct fd_set readable; - - /* Send the GET request */ - SCKTEST(send(sck, szGetRequest, strlen(szGetRequest), 0)); - ok(iResult == strlen(szGetRequest), "iResult = %d\n", iResult); - - /* Shutdown the SEND connection */ - SCKTEST(shutdown(sck, SD_SEND)); - - /* Wait until we're ready to read */ - FD_ZERO(&readable); - FD_SET(sck, &readable); - - SCKTEST(select(0, &readable, NULL, NULL, NULL)); - - return 1; -} diff --git a/rostests/apitests/ws2_32/ioctlsocket.c b/rostests/apitests/ws2_32/ioctlsocket.c deleted file mode 100644 index 83b0d05a00c..00000000000 --- a/rostests/apitests/ws2_32/ioctlsocket.c +++ /dev/null @@ -1,98 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for ioctlsocket - * PROGRAMMERS: Colin Finck - */ - -#include -#include -#include -#include "ws2_32.h" - -int Test_ioctlsocket() -{ - LPSTR pszBuf; - int iResult; - SOCKET sck; - ULONG BytesAvailable; - ULONG BytesToRead; - WSADATA wdata; - - /* Start up Winsock */ - iResult = WSAStartup(MAKEWORD(2, 2), &wdata); - ok(iResult == 0, "WSAStartup failed. iResult = %d\n", iResult); - - /* If we call ioctlsocket without a socket, it should return with an error and do nothing. */ - BytesAvailable = 0xdeadbeef; - iResult = ioctlsocket(0, FIONREAD, &BytesAvailable); - ok(iResult == SOCKET_ERROR, "iResult = %d\n", iResult); - ok(BytesAvailable == 0xdeadbeef, "BytesAvailable = %ld\n", BytesAvailable); - - /* Create the socket */ - if (!CreateSocket(&sck)) - { - ok(0, "CreateSocket failed. Aborting test.\n"); - return 0; - } - - /* Now we can pass at least a socket, but we have no connection yet. The function should return 0. */ - BytesAvailable = 0xdeadbeef; - iResult = ioctlsocket(sck, FIONREAD, &BytesAvailable); - ok(iResult == 0, "iResult = %d\n", iResult); - ok(BytesAvailable == 0, "BytesAvailable = %ld\n", BytesAvailable); - - /* Connect to "www.reactos.org" */ - if (!ConnectToReactOSWebsite(sck)) - { - ok(0, "ConnectToReactOSWebsite failed. Aborting test.\n"); - return 0; - } - - /* Even with a connection, there shouldn't be any bytes available. */ - iResult = ioctlsocket(sck, FIONREAD, &BytesAvailable); - ok(iResult == 0, "iResult = %d\n", iResult); - ok(BytesAvailable == 0, "BytesAvailable = %ld\n", BytesAvailable); - - /* Send the GET request */ - if (!GetRequestAndWait(sck)) - { - ok(0, "GetRequestAndWait failed. Aborting test.\n"); - return 0; - } - - /* Try ioctlsocket with FIONREAD. There should be bytes available now. */ - SCKTEST(ioctlsocket(sck, FIONREAD, &BytesAvailable)); - ok(BytesAvailable != 0, "BytesAvailable = %ld\n", BytesAvailable); - - /* Get half of the data */ - BytesToRead = BytesAvailable / 2; - pszBuf = (LPSTR) HeapAlloc(GetProcessHeap(), 0, BytesToRead); - SCKTEST(recv(sck, pszBuf, BytesToRead, 0)); - HeapFree(GetProcessHeap(), 0, pszBuf); - - BytesToRead = BytesAvailable - BytesToRead; - - /* Now try ioctlsocket again. BytesAvailable should be at the value saved in BytesToRead now. */ - SCKTEST(ioctlsocket(sck, FIONREAD, &BytesAvailable)); - ok(BytesAvailable == BytesToRead, "BytesAvailable = %ld\n", BytesAvailable); - - /* Read those bytes */ - pszBuf = (LPSTR) HeapAlloc(GetProcessHeap(), 0, BytesToRead); - SCKTEST(recv(sck, pszBuf, BytesToRead, 0)); - HeapFree(GetProcessHeap(), 0, pszBuf); - - /* Try it for the last time. BytesAvailable should be at 0 now. */ - SCKTEST(ioctlsocket(sck, FIONREAD, &BytesAvailable)); - ok(BytesAvailable == 0, "BytesAvailable = %ld\n", BytesAvailable); - - closesocket(sck); - WSACleanup(); - return 1; -} - -START_TEST(ioctlsocket) -{ - Test_ioctlsocket(); -} - diff --git a/rostests/apitests/ws2_32/recv.c b/rostests/apitests/ws2_32/recv.c deleted file mode 100644 index aab7109a254..00000000000 --- a/rostests/apitests/ws2_32/recv.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for recv - * PROGRAMMERS: Colin Finck - */ - -#include -#include -#include -#include "ws2_32.h" - -#define RECV_BUF 4 - -/* For valid test results, the ReactOS Website needs to return at least 8 bytes on a "GET / HTTP/1.0" request. - Also the first 4 bytes and the last 4 bytes need to be different. - Both factors usually apply on standard HTTP responses. */ - -int Test_recv() -{ - const char szDummyBytes[RECV_BUF] = {0xFF, 0x00, 0xFF, 0x00}; - - char szBuf1[RECV_BUF]; - char szBuf2[RECV_BUF]; - int iResult; - SOCKET sck; - WSADATA wdata; - - /* Start up Winsock */ - iResult = WSAStartup(MAKEWORD(2, 2), &wdata); - ok(iResult == 0, "WSAStartup failed, iResult == %d\n", iResult); - - /* If we call recv without a socket, it should return with an error and do nothing. */ - memcpy(szBuf1, szDummyBytes, RECV_BUF); - iResult = recv(0, szBuf1, RECV_BUF, 0); - ok(iResult == SOCKET_ERROR, "iRseult = %d\n", iResult); - ok(!memcmp(szBuf1, szDummyBytes, RECV_BUF), "not equal\n"); - - /* Create the socket */ - if (!CreateSocket(&sck)) - { - ok(0, "CreateSocket failed. Aborting test.\n"); - return 0; - } - - /* Now we can pass at least a socket, but we have no connection yet. Should return with an error and do nothing. */ - memcpy(szBuf1, szDummyBytes, RECV_BUF); - iResult = recv(sck, szBuf1, RECV_BUF, 0); - ok(iResult == SOCKET_ERROR, "iResult = %d\n", iResult); - ok(!memcmp(szBuf1, szDummyBytes, RECV_BUF), "not equal\n"); - - /* Connect to "www.reactos.org" */ - if (!ConnectToReactOSWebsite(sck)) - { - ok(0, "ConnectToReactOSWebsite failed. Aborting test.\n"); - return 0; - } - - /* Send the GET request */ - if (!GetRequestAndWait(sck)) - { - ok(0, "GetRequestAndWait failed. Aborting test.\n"); - return 0; - } - - /* Receive the data. - MSG_PEEK will not change the internal number of bytes read, so that a subsequent request should return the same bytes again. */ - SCKTEST(recv(sck, szBuf1, RECV_BUF, MSG_PEEK)); - SCKTEST(recv(sck, szBuf2, RECV_BUF, 0)); - ok(!memcmp(szBuf1, szBuf2, RECV_BUF), "not equal\n"); - - /* The last recv() call moved the internal file pointer, so that the next request should return different data. */ - SCKTEST(recv(sck, szBuf1, RECV_BUF, 0)); - ok(memcmp(szBuf1, szBuf2, RECV_BUF), "equal\n"); - - closesocket(sck); - WSACleanup(); - return 1; -} - -START_TEST(recv) -{ - Test_recv(); -} - diff --git a/rostests/apitests/ws2_32/testlist.c b/rostests/apitests/ws2_32/testlist.c deleted file mode 100644 index e760096393e..00000000000 --- a/rostests/apitests/ws2_32/testlist.c +++ /dev/null @@ -1,18 +0,0 @@ -#define WIN32_LEAN_AND_MEAN -#define __ROS_LONG64__ -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_ioctlsocket(void); -extern void func_recv(void); - -const struct test winetest_testlist[] = -{ - { "ioctlsocket", func_ioctlsocket }, - { "recv", func_recv }, - - { 0, 0 } -}; - diff --git a/rostests/apitests/ws2_32/ws2_32.h b/rostests/apitests/ws2_32/ws2_32.h deleted file mode 100644 index e6fedc264b4..00000000000 --- a/rostests/apitests/ws2_32/ws2_32.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * PROJECT: ws2_32.dll API tests - * LICENSE: GPLv2 or any later version - * FILE: apitests/ws2_32/ws2_32.h - * PURPOSE: Main header file - * COPYRIGHT: Copyright 2008 Colin Finck - */ - -#ifndef _WS2_32_APITESTS_H -#define _WS2_32_APITESTS_H - -#include - -/* Simple macro for executing a socket command and doing cleanup operations in case of a failure */ -#define SCKTEST(_cmd_) \ - iResult = _cmd_; \ - ok(iResult != SOCKET_ERROR, "iResult = %d\n", iResult); \ - if(iResult == SOCKET_ERROR) \ - { \ - printf("Winsock error code is %u\n", WSAGetLastError()); \ - closesocket(sck); \ - WSACleanup(); \ - return 0; \ - } - -/* helpers.c */ -int CreateSocket(SOCKET* sck); -int ConnectToReactOSWebsite(SOCKET sck); -int GetRequestAndWait(SOCKET sck); - -/* ws2_32.c */ -extern HANDLE g_hHeap; - -#endif diff --git a/rostests/apitests/ws2_32/ws2_32_apitest.rbuild b/rostests/apitests/ws2_32/ws2_32_apitest.rbuild deleted file mode 100644 index 356425806ee..00000000000 --- a/rostests/apitests/ws2_32/ws2_32_apitest.rbuild +++ /dev/null @@ -1,18 +0,0 @@ - - - - - . - wine - gdi32 - user32 - pseh - ws2_32 - testlist.c - helpers.c - - ioctlsocket.c - recv.c - - - diff --git a/rostests/dibtests/alphablend/alphablend.c b/rostests/dibtests/alphablend/alphablend.c deleted file mode 100644 index aea5d40e6b6..00000000000 --- a/rostests/dibtests/alphablend/alphablend.c +++ /dev/null @@ -1,212 +0,0 @@ -#include -#include - -BOOL WINAPI GdiAlphaBlend(HDC hdcDst, int xDst, int yDst, int widthDst, int heightDst, - HDC hdcSrc, int xSrc, int ySrc, int widthSrc, int heightSrc, - BLENDFUNCTION blendFunction); - -#ifndef AC_SRC_ALPHA -#define AC_SRC_ALPHA (0x1) -#endif - -HINSTANCE HInst; -const char* WndClassName = "GMainWnd"; -LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam, - LPARAM LParam); - -int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE HPrevInstance, - LPTSTR lpCmdLine, int nCmdShow) -{ - WNDCLASS wc; - MSG msg; - - HInst = HInstance; - - memset(&wc, 0, sizeof(WNDCLASS)); - - wc.style = CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS; - wc.lpfnWndProc = MainWndProc; - wc.hInstance = HInstance; - wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW); - /* wc.hbrBackground = reinterpret_cast(COLOR_BTNFACE + 1); */ - wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); - wc.lpszClassName = WndClassName; - - if (RegisterClass(&wc)) - { - HWND HWnd = - CreateWindow( - WndClassName, TEXT("AlphaBlend Rendering Demo"), - WS_OVERLAPPED | WS_SYSMENU | WS_CAPTION | - WS_VISIBLE | WS_CLIPSIBLINGS, - 0, 0, 320, 430, - NULL, NULL, HInst, NULL - ); - - if (HWnd) - { - ShowWindow(HWnd, nCmdShow); - UpdateWindow(HWnd); - - while (GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } - } - return 0; -} - -/* image related */ -BITMAP bmp; -LPCSTR filename = TEXT("lena.bmp"); -HDC HMemDC = NULL, HMemDC2 = NULL; -HBITMAP HOldBmp = NULL; -PVOID pBmpBits = NULL; -HBITMAP H32BppBitmap = NULL; -BITMAPINFO bmpi; - -BOOL ConvertBitmapTo32Bpp(HDC hDC, BITMAP *bmp) -{ - ZeroMemory(&bmpi, sizeof(BITMAPINFO)); - bmpi.bmiHeader.biSize = sizeof(BITMAPINFO); - bmpi.bmiHeader.biWidth = bmp->bmWidth; - bmpi.bmiHeader.biHeight = bmp->bmHeight; - bmpi.bmiHeader.biPlanes = 1; - bmpi.bmiHeader.biBitCount = 32; - bmpi.bmiHeader.biCompression = BI_RGB; - bmpi.bmiHeader.biSizeImage = 4 * bmpi.bmiHeader.biWidth * bmpi.bmiHeader.biHeight; - H32BppBitmap = CreateDIBSection(hDC, &bmpi, DIB_RGB_COLORS, &pBmpBits, 0, 0); - if(H32BppBitmap) - { - HBITMAP bmpalpha; - SelectObject(hDC, H32BppBitmap); - BitBlt(hDC, 0, 0, bmp->bmWidth, bmp->bmHeight, HMemDC, 0, 0, SRCCOPY); - - /* load and apply alpha channel */ - bmpalpha = LoadImage(HInst, MAKEINTRESOURCE(2000), IMAGE_BITMAP, - 0, 0, 0); - if(bmpalpha) - { - COLORREF *col = pBmpBits; - int x, y; - HDC hdcTemp = CreateCompatibleDC(NULL); - if(!hdcTemp) - { - DeleteObject(bmpalpha); - return FALSE; - } - SelectObject(hdcTemp, bmpalpha); - - for(y = 0; y < bmp->bmHeight; y++) - { - for(x = 0; x < bmp->bmWidth; x++) - { - COLORREF Color = (COLORREF)GetRValue(GetPixel(hdcTemp, x, y)) << 24; - *col++ |= Color; - } - } - - DeleteObject(bmpalpha); - DeleteDC(hdcTemp); - return TRUE; - } - return FALSE; - } - return FALSE; -} - -LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam, - LPARAM LParam) -{ - switch (Msg) - { - case WM_CREATE: - { - /* create a memory DC */ - HMemDC = CreateCompatibleDC(NULL); - if (HMemDC) - { - /* load a bitmap from file */ - HBITMAP HBmp = - /* static_cast */( - LoadImage(HInst, MAKEINTRESOURCE(1000), IMAGE_BITMAP, - 0, 0, 0) - ); - if (HBmp) - { - /* extract dimensions of the bitmap */ - GetObject(HBmp, sizeof(BITMAP), &bmp); - - /* associate the bitmap with the memory DC */ - /* HOldBmp = static_cast */ - (SelectObject(HMemDC, HBmp) - ); - HMemDC2 = CreateCompatibleDC(NULL); - if(!ConvertBitmapTo32Bpp(HMemDC2, &bmp)) - { - PostQuitMessage(0); - return 0; - } - } - } - } - case WM_PAINT: - { - PAINTSTRUCT ps; - BLENDFUNCTION BlendFunc; - HDC Hdc = BeginPaint(HWnd, &ps); -#if 0 - try -#endif - { - - BlendFunc.BlendOp = AC_SRC_OVER; - BlendFunc.BlendFlags = 0; - BlendFunc.SourceConstantAlpha = 128; - BlendFunc.AlphaFormat = 0; - - BitBlt(Hdc, 100, 90, - bmp.bmWidth, bmp.bmHeight, - HMemDC2, 0, 0, - SRCCOPY); - GdiAlphaBlend(Hdc, 0, 0, bmp.bmWidth, bmp.bmHeight, - HMemDC2, 0, 0, bmp.bmWidth, bmp.bmHeight, - BlendFunc); - GdiAlphaBlend(Hdc, bmp.bmWidth - 15, 10, bmp.bmWidth / 2, bmp.bmHeight / 2, - HMemDC2, 0, 0, bmp.bmWidth, bmp.bmHeight, - BlendFunc); - - BlendFunc.SourceConstantAlpha = 255; - BlendFunc.AlphaFormat = AC_SRC_ALPHA; - - GdiAlphaBlend(Hdc, 140, 200, bmp.bmWidth, bmp.bmHeight, - HMemDC2, 0, 0, bmp.bmWidth, bmp.bmHeight, - BlendFunc); - GdiAlphaBlend(Hdc, 20, 210, (bmp.bmWidth / 3) * 2, (bmp.bmHeight / 3) * 2, - HMemDC2, 0, 0, bmp.bmWidth, bmp.bmHeight, - BlendFunc); - } -#if 0 - catch (...) - { - EndPaint(HWnd, &ps); - } -#endif - EndPaint(HWnd, &ps); - break; - } - case WM_DESTROY: - { - /* clean up */ - DeleteObject(SelectObject(HMemDC, HOldBmp)); - DeleteDC(HMemDC); - DeleteDC(HMemDC2); - - PostQuitMessage(0); - return 0; - } - } - return DefWindowProc(HWnd, Msg, WParam, LParam); -} diff --git a/rostests/dibtests/alphablend/alphablend.rbuild b/rostests/dibtests/alphablend/alphablend.rbuild deleted file mode 100644 index a24f9d3692b..00000000000 --- a/rostests/dibtests/alphablend/alphablend.rbuild +++ /dev/null @@ -1,7 +0,0 @@ - - . - user32 - gdi32 - alphablend.c - alphablend.rc - diff --git a/rostests/dibtests/alphablend/alphablend.rc b/rostests/dibtests/alphablend/alphablend.rc deleted file mode 100644 index b51fd156496..00000000000 --- a/rostests/dibtests/alphablend/alphablend.rc +++ /dev/null @@ -1,3 +0,0 @@ - -1000 BITMAP MOVEABLE PURE "lena.bmp" -2000 BITMAP MOVEABLE PURE "lenaalpha.bmp" diff --git a/rostests/dibtests/alphablend/lena.bmp b/rostests/dibtests/alphablend/lena.bmp deleted file mode 100644 index e9916963852..00000000000 Binary files a/rostests/dibtests/alphablend/lena.bmp and /dev/null differ diff --git a/rostests/dibtests/alphablend/lenaalpha.bmp b/rostests/dibtests/alphablend/lenaalpha.bmp deleted file mode 100644 index 71982ce8b06..00000000000 Binary files a/rostests/dibtests/alphablend/lenaalpha.bmp and /dev/null differ diff --git a/rostests/dibtests/bitblt/bitblt.c b/rostests/dibtests/bitblt/bitblt.c deleted file mode 100644 index 2a2c3dda85b..00000000000 --- a/rostests/dibtests/bitblt/bitblt.c +++ /dev/null @@ -1,139 +0,0 @@ - -/* - * Windows 2000 Graphics API Black Book - * (BitBlt Bitmap Rendering Demo) - * - * Created by Damon Chandler - * Updates can be downloaded at: - * - * Please do not hesistate to e-mail me at dmc27@ee.cornell.edu - * if you have any questions about this code. - */ - - -#include -#include - -HINSTANCE HInst; -const char* WndClassName = "GMainWnd"; -LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam, - LPARAM LParam); - - -int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE HPrevInstance, - LPTSTR lpCmdLine, int nCmdShow) -{ - WNDCLASS wc; - MSG msg; - - HInst = HInstance; - - memset(&wc, 0, sizeof(WNDCLASS)); - - wc.style = CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS; - wc.lpfnWndProc = MainWndProc; - wc.hInstance = HInstance; - wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW); - /* wc.hbrBackground = reinterpret_cast(COLOR_BTNFACE + 1); */ - wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); - wc.lpszClassName = WndClassName; - - if (RegisterClass(&wc)) - { - HWND HWnd = - CreateWindow( - WndClassName, TEXT("BitBlt Bitmap Rendering Demo"), - WS_OVERLAPPED | WS_SYSMENU | WS_CAPTION | - WS_VISIBLE | WS_CLIPSIBLINGS, - 0, 0, 220, 230, - NULL, NULL, HInst, NULL - ); - - if (HWnd) - { - ShowWindow(HWnd, nCmdShow); - UpdateWindow(HWnd); - - while (GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } - } - return 0; -} - -/* image related */ -BITMAP bmp; -LPCSTR filename = TEXT("lena.bmp"); -HDC HMemDC = NULL; -HBITMAP HOldBmp = NULL; - -LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam, - LPARAM LParam) -{ - switch (Msg) - { - case WM_CREATE: - { - /* create a memory DC */ - HMemDC = CreateCompatibleDC(NULL); - if (HMemDC) - { - /* load a bitmap from file */ - HBITMAP HBmp = - /* static_cast */( - LoadImage(HInst, MAKEINTRESOURCE(1000), IMAGE_BITMAP, - 0, 0, 0) - ); - if (HBmp) - { - /* extract dimensions of the bitmap */ - GetObject(HBmp, sizeof(BITMAP), &bmp); - - /* associate the bitmap with the memory DC */ - /* HOldBmp = static_cast */ - (SelectObject(HMemDC, HBmp) - ); - } - } - } - case WM_PAINT: - { - PAINTSTRUCT ps; - const HDC Hdc = BeginPaint(HWnd, &ps); -#if 0 - try -#endif - { - - /* TODO: add palette support (see Chapter 9)... */ - - - BitBlt(Hdc, 20, 15, - bmp.bmWidth, bmp.bmHeight, - HMemDC, 0, 0, - SRCCOPY); - } -#if 0 - catch (...) -#endif - { - EndPaint(HWnd, &ps); - } - EndPaint(HWnd, &ps); - break; - } - case WM_DESTROY: - { - /* clean up */ - DeleteObject(SelectObject(HMemDC, HOldBmp)); - DeleteDC(HMemDC); - - PostQuitMessage(0); - return 0; - } - } - return DefWindowProc(HWnd, Msg, WParam, LParam); -} diff --git a/rostests/dibtests/bitblt/bitblt.rbuild b/rostests/dibtests/bitblt/bitblt.rbuild deleted file mode 100644 index e7a04b0c711..00000000000 --- a/rostests/dibtests/bitblt/bitblt.rbuild +++ /dev/null @@ -1,7 +0,0 @@ - - . - user32 - gdi32 - bitblt.c - bitblt.rc - diff --git a/rostests/dibtests/bitblt/bitblt.rc b/rostests/dibtests/bitblt/bitblt.rc deleted file mode 100644 index 25d17abdb36..00000000000 --- a/rostests/dibtests/bitblt/bitblt.rc +++ /dev/null @@ -1,2 +0,0 @@ -1000 BITMAP MOVEABLE PURE "lena.bmp" - diff --git a/rostests/dibtests/bitblt/lena.bmp b/rostests/dibtests/bitblt/lena.bmp deleted file mode 100644 index e9916963852..00000000000 Binary files a/rostests/dibtests/bitblt/lena.bmp and /dev/null differ diff --git a/rostests/dibtests/bltrop/bltrop.c b/rostests/dibtests/bltrop/bltrop.c deleted file mode 100644 index 8b73cf9018a..00000000000 --- a/rostests/dibtests/bltrop/bltrop.c +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Shows the 15 well known BitBlt raster operations - * using src, dest, pattern, a background brush and color. - * - * Created by Gregor Schneider , November 2008 -*/ - -#include -#include - -HINSTANCE hInst; -TCHAR szWindowClass[] = _T("testclass"); - -static LRESULT CALLBACK -WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - static HBITMAP hBmpTest; - - switch (message) - { - case WM_CREATE: - { - hBmpTest = (HBITMAP)LoadImage(hInst, MAKEINTRESOURCE(100), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR); - break; - } - - case WM_PAINT: - { - PAINTSTRUCT ps; - HDC hdc, hdcMem; - BITMAP bitmap; - HBRUSH brush, brush2; - INT l; - - hdc = BeginPaint(hWnd, &ps); - hdcMem = CreateCompatibleDC(hdc); - - GetObject(hBmpTest, sizeof(BITMAP), &bitmap); - - /* fill destination with brush */ - brush = CreateHatchBrush(HS_DIAGCROSS, RGB(255,0,0)); - SelectObject(hdc, brush); - PatBlt(hdc, 30, 0, 4*bitmap.bmWidth*2, 4*bitmap.bmHeight, PATCOPY); - - /* hatched brushes */ - l = 66; - brush = CreateHatchBrush(HS_DIAGCROSS, RGB(255,0,0)); - SelectObject(hdc, brush); - PatBlt(hdc, 0, 0, 30, l, PATCOPY); - DeleteObject(brush); - - brush = CreateHatchBrush(HS_CROSS, RGB(255,0,0)); - SelectObject(hdc, brush); - PatBlt(hdc, 0, 1*l, 30, l, PATCOPY); - DeleteObject(brush); - - brush = CreateHatchBrush(HS_FDIAGONAL, RGB(255,0,0)); - SelectObject(hdc, brush); - PatBlt(hdc, 0, 2*l, 30, l, PATCOPY); - DeleteObject(brush); - - brush = CreateHatchBrush(HS_BDIAGONAL, RGB(255,0,0)); - SelectObject(hdc, brush); - PatBlt(hdc, 0, 3*l, 30, l, PATCOPY); - DeleteObject(brush); - - brush = CreateHatchBrush(HS_VERTICAL, RGB(255,0,0)); - SelectObject(hdc, brush); - PatBlt(hdc, 0, 4*l, 30, l, PATCOPY); - DeleteObject(brush); - - brush = CreateHatchBrush(HS_HORIZONTAL, RGB(255,0,0)); - SelectObject(hdc, brush); - PatBlt(hdc, 0, 5*l, 30, l, PATCOPY); - DeleteObject(brush); - - /* set up a second brush */ - brush2 = CreateHatchBrush(HS_VERTICAL, RGB(127,127,127)); - - /* first select brush, then set bk color */ - SelectObject(hdc, brush2); - SetBkColor(hdc, RGB(0, 255, 0)); - - /* 15 blt op's with bitblt */ - SelectObject(hdcMem, hBmpTest); - /* offset coordinates */ - SetWindowOrgEx(hdc, -10, -10, NULL); - BitBlt(hdc, 30, 0, bitmap.bmWidth, bitmap.bmHeight, hdcMem, 0, 0, SRCCOPY); - BitBlt(hdc, 130, 0, bitmap.bmWidth, bitmap.bmHeight, hdcMem, 0, 0, DSTINVERT); - BitBlt(hdc, 230, 0, bitmap.bmWidth, bitmap.bmHeight, hdcMem, 0, 0, MERGECOPY); - BitBlt(hdc, 330, 0, bitmap.bmWidth, bitmap.bmHeight, hdcMem, 0, 0, MERGEPAINT); - - BitBlt(hdc, 30, 100, bitmap.bmWidth, bitmap.bmHeight, hdcMem, 0, 0, NOTSRCCOPY); - BitBlt(hdc, 130, 100, bitmap.bmWidth, bitmap.bmHeight, hdcMem, 0, 0, NOTSRCERASE); - BitBlt(hdc, 230, 100, bitmap.bmWidth, bitmap.bmHeight, hdcMem, 0, 0, PATCOPY); - BitBlt(hdc, 330, 100, bitmap.bmWidth, bitmap.bmHeight, hdcMem, 0, 0, PATINVERT); - - BitBlt(hdc, 30, 200, bitmap.bmWidth, bitmap.bmHeight, hdcMem, 0, 0, PATPAINT); - BitBlt(hdc, 130, 200, bitmap.bmWidth, bitmap.bmHeight, hdcMem, 0, 0, SRCAND); - BitBlt(hdc, 230, 200, bitmap.bmWidth, bitmap.bmHeight, hdcMem, 0, 0, SRCERASE); - BitBlt(hdc, 330, 200, bitmap.bmWidth, bitmap.bmHeight, hdcMem, 0, 0, SRCINVERT); - - BitBlt(hdc, 30, 300, bitmap.bmWidth, bitmap.bmHeight, hdcMem, 0, 0, BLACKNESS); - BitBlt(hdc, 130, 300, bitmap.bmWidth, bitmap.bmHeight, hdcMem, 0, 0, SRCPAINT); - BitBlt(hdc, 230, 300, bitmap.bmWidth, bitmap.bmHeight, hdcMem, 0, 0, WHITENESS); - - /* 15 blt op's with stretchblt */ - StretchBlt(hdc, 30+400, 0, bitmap.bmWidth/2, bitmap.bmHeight/2, hdcMem, 0, 0, bitmap.bmWidth, bitmap.bmHeight, SRCCOPY); - StretchBlt(hdc, 130+400, 0, bitmap.bmWidth/2, bitmap.bmHeight/2, hdcMem, 0, 0, bitmap.bmWidth, bitmap.bmHeight, DSTINVERT); - StretchBlt(hdc, 230+400, 0, bitmap.bmWidth/2, bitmap.bmHeight/2, hdcMem, 0, 0, bitmap.bmWidth, bitmap.bmHeight, MERGECOPY); - StretchBlt(hdc, 330+400, 0, bitmap.bmWidth/2, bitmap.bmHeight/2, hdcMem, 0, 0, bitmap.bmWidth, bitmap.bmHeight, MERGEPAINT); - - StretchBlt(hdc, 30+400, 100, bitmap.bmWidth/2, bitmap.bmHeight/2, hdcMem, 0, 0, bitmap.bmWidth, bitmap.bmHeight, NOTSRCCOPY); - StretchBlt(hdc, 130+400, 100, bitmap.bmWidth/2, bitmap.bmHeight/2, hdcMem, 0, 0, bitmap.bmWidth, bitmap.bmHeight, NOTSRCERASE); - StretchBlt(hdc, 230+400, 100, bitmap.bmWidth/2, bitmap.bmHeight/2, hdcMem, 0, 0, bitmap.bmWidth, bitmap.bmHeight, PATCOPY); - StretchBlt(hdc, 330+400, 100, bitmap.bmWidth/2, bitmap.bmHeight/2, hdcMem, 0, 0, bitmap.bmWidth, bitmap.bmHeight, PATINVERT); - - StretchBlt(hdc, 30+400, 200, bitmap.bmWidth/2, bitmap.bmHeight/2, hdcMem, 0, 0, bitmap.bmWidth, bitmap.bmHeight, PATPAINT); - StretchBlt(hdc, 130+400, 200, bitmap.bmWidth/2, bitmap.bmHeight/2, hdcMem, 0, 0, bitmap.bmWidth, bitmap.bmHeight, SRCAND); - StretchBlt(hdc, 230+400, 200, bitmap.bmWidth/2, bitmap.bmHeight/2, hdcMem, 0, 0, bitmap.bmWidth, bitmap.bmHeight, SRCERASE); - StretchBlt(hdc, 330+400, 200, bitmap.bmWidth/2, bitmap.bmHeight/2, hdcMem, 0, 0, bitmap.bmWidth, bitmap.bmHeight, SRCINVERT); - - StretchBlt(hdc, 30+400, 300, bitmap.bmWidth/2, bitmap.bmHeight/2, hdcMem, 0, 0, bitmap.bmWidth, bitmap.bmHeight, BLACKNESS); - StretchBlt(hdc, 130+400, 300, bitmap.bmWidth/2, bitmap.bmHeight/2, hdcMem, 0, 0, bitmap.bmWidth, bitmap.bmHeight, SRCPAINT); - StretchBlt(hdc, 230+400, 300, bitmap.bmWidth/2, bitmap.bmHeight/2, hdcMem, 0, 0, bitmap.bmWidth, bitmap.bmHeight, WHITENESS); - - DeleteObject(brush); - DeleteObject(brush2); - DeleteDC(hdcMem); - EndPaint(hWnd, &ps); - break; - } - - case WM_DESTROY: - PostQuitMessage(0); - break; - default: - return DefWindowProc(hWnd, message, wParam, lParam); - } - return 0; -} - - -static ATOM -MyRegisterClass(HINSTANCE hInstance) -{ - WNDCLASSEX wcex; - - wcex.cbSize = sizeof(WNDCLASSEX); - - wcex.style = CS_HREDRAW | CS_VREDRAW; - wcex.lpfnWndProc = WndProc; - wcex.cbClsExtra = 0; - wcex.cbWndExtra = 0; - wcex.hInstance = hInstance; - wcex.hIcon = NULL; - wcex.hCursor = LoadCursor(NULL, IDC_ARROW); - wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); - wcex.lpszMenuName = NULL; - wcex.lpszClassName = szWindowClass; - wcex.hIconSm = NULL; - - return RegisterClassEx(&wcex); -} - - -static BOOL -InitInstance(HINSTANCE hInstance, int nCmdShow) -{ - HWND hWnd; - - hInst = hInstance; - - hWnd = CreateWindowEx(0, - szWindowClass, - _T("BitBlt raster operation test"), - WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, - CW_USEDEFAULT, - 840, - 440, - NULL, - NULL, - hInstance, - NULL); - - if (!hWnd) - { - return FALSE; - } - - ShowWindow(hWnd, nCmdShow); - UpdateWindow(hWnd); - - return TRUE; -} - - -int WINAPI -_tWinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPTSTR lpCmdLine, - int nCmdShow) -{ - MSG msg; - - MyRegisterClass(hInstance); - - if (!InitInstance(hInstance, nCmdShow)) - { - return FALSE; - } - - while (GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - return (int)msg.wParam; -} diff --git a/rostests/dibtests/bltrop/bltrop.rbuild b/rostests/dibtests/bltrop/bltrop.rbuild deleted file mode 100644 index 82b0a098e2b..00000000000 --- a/rostests/dibtests/bltrop/bltrop.rbuild +++ /dev/null @@ -1,7 +0,0 @@ - - . - gdi32 - user32 - bltrop.c - bltrop.rc - diff --git a/rostests/dibtests/bltrop/bltrop.rc b/rostests/dibtests/bltrop/bltrop.rc deleted file mode 100644 index deb50ccf35c..00000000000 --- a/rostests/dibtests/bltrop/bltrop.rc +++ /dev/null @@ -1 +0,0 @@ -100 BITMAP "mars.bmp" diff --git a/rostests/dibtests/bltrop/mars.bmp b/rostests/dibtests/bltrop/mars.bmp deleted file mode 100644 index 84a937c7ceb..00000000000 Binary files a/rostests/dibtests/bltrop/mars.bmp and /dev/null differ diff --git a/rostests/dibtests/dibtest/dibtest.c b/rostests/dibtests/dibtest/dibtest.c deleted file mode 100644 index 3db6168f0c2..00000000000 --- a/rostests/dibtests/dibtest/dibtest.c +++ /dev/null @@ -1,196 +0,0 @@ -#include -#include -#include - -#define CELL_SIZE 10 - -static RGBQUAD Colors[] = -{ - { 0x00, 0x00, 0x00, 0x00 }, // black - { 0x00, 0x00, 0x80, 0x00 }, // red - { 0x00, 0x80, 0x00, 0x00 }, // green - { 0x00, 0x80, 0x80, 0x00 }, // brown - { 0x80, 0x00, 0x00, 0x00 }, // blue - { 0x80, 0x00, 0x80, 0x00 }, // magenta - { 0x80, 0x80, 0x00, 0x00 }, // cyan - { 0x80, 0x80, 0x80, 0x00 }, // dark gray - { 0xc0, 0xc0, 0xc0, 0x00 }, // light gray - { 0x00, 0x00, 0xFF, 0x00 }, // bright red - { 0x00, 0xFF, 0x00, 0x00 }, // bright green - { 0x00, 0xFF, 0xFF, 0x00 }, // bright yellow - { 0xFF, 0x00, 0x00, 0x00 }, // bright blue - { 0xFF, 0x00, 0xFF, 0x00 }, // bright magenta - { 0xFF, 0xFF, 0x00, 0x00 }, // bright cyan - { 0xFF, 0xFF, 0xFF, 0x00 } // bright white -}; - -LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM); - -int WINAPI -WinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpszCmdLine, - int nCmdShow) -{ - WNDCLASS wc; - MSG msg; - HWND hWnd; - - wc.lpszClassName = "DibTestClass"; - wc.lpfnWndProc = MainWndProc; - wc.style = CS_VREDRAW | CS_HREDRAW; - wc.hInstance = hInstance; - wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION); - wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW); - wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH); - wc.lpszMenuName = NULL; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - if (RegisterClass(&wc) == 0) - { - fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - hWnd = CreateWindow("DibTestClass", - "DIB Test", - WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, - CW_USEDEFAULT, - 25 * CELL_SIZE + 5, - 25 * CELL_SIZE + 20, - NULL, - NULL, - hInstance, - NULL); - if (hWnd == NULL) - { - fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - ShowWindow(hWnd, nCmdShow); - - while(GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - return msg.wParam; -} - -static void PaintCells(HDC WindowDC, WORD BitCount1, WORD BitCount2, - int XDest, int YDest) -{ - HBRUSH Brush; - RECT Rect; - UINT row, col; - BITMAPINFO *BitmapInfo; - HBITMAP DIB1, DIB2; - HDC DC1, DC2; - - BitmapInfo = malloc(sizeof(BITMAPINFO) + 15 * sizeof(RGBQUAD)); - BitmapInfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - BitmapInfo->bmiHeader.biWidth = 4 * CELL_SIZE + 9; - BitmapInfo->bmiHeader.biHeight = -(4 * CELL_SIZE + 9); // it's top down (since BI_RGB is used, the sign is operative of direction) - BitmapInfo->bmiHeader.biPlanes = 1; - BitmapInfo->bmiHeader.biBitCount = BitCount1; - BitmapInfo->bmiHeader.biCompression = BI_RGB; - BitmapInfo->bmiHeader.biSizeImage = 0; - BitmapInfo->bmiHeader.biXPelsPerMeter = 0; - BitmapInfo->bmiHeader.biYPelsPerMeter = 0; - BitmapInfo->bmiHeader.biClrUsed = 16; - BitmapInfo->bmiHeader.biClrImportant = 16; - for (col = 0; col < 16; col++) { - BitmapInfo->bmiColors[col] = Colors[col]; - } - DIB1 = CreateDIBSection(NULL, BitmapInfo, DIB_RGB_COLORS, NULL, NULL, 0); - DC1 = CreateCompatibleDC(NULL); - SelectObject(DC1, DIB1); - - BitmapInfo->bmiHeader.biBitCount = BitCount2; - DIB2 = CreateDIBSection(NULL, BitmapInfo, DIB_RGB_COLORS, NULL, NULL, 0); - DC2 = CreateCompatibleDC(NULL); - SelectObject(DC2, DIB2); - free(BitmapInfo); - - /* Now paint on the first bitmap */ - for (row = 0; row < 4; row++) - { - for (col = 0; col < 4; col++) - { - Brush = CreateSolidBrush(RGB(Colors[4 * row + col].rgbRed, - Colors[4 * row + col].rgbGreen, - Colors[4 * row + col].rgbBlue)); - Rect.left = CELL_SIZE * col + 5; - Rect.top = CELL_SIZE * row + 5; - Rect.right = Rect.left + CELL_SIZE; - Rect.bottom = Rect.top + CELL_SIZE; - FillRect(DC1, &Rect, Brush); - DeleteObject(Brush); - } - } - - /* Copy the first bitmap to the second */ - BitBlt(DC2, 4, 4, 4 * CELL_SIZE, 4 * CELL_SIZE, DC1, 5, 5, SRCCOPY); - - /* Show results on screen */ - BitBlt(WindowDC, XDest, YDest, 4 * CELL_SIZE, 4 * CELL_SIZE, DC2, 4, 4, SRCCOPY); -} - -LRESULT CALLBACK MainWndProc(HWND Wnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - PAINTSTRUCT ps; - HDC WindowDC; - - switch(msg) - { - case WM_PAINT: - WindowDC = BeginPaint(Wnd, &ps); - - PaintCells(WindowDC, 4, 4, 0, 0); - PaintCells(WindowDC, 4, 8, 5 * CELL_SIZE, 0); - PaintCells(WindowDC, 4, 16, 10 * CELL_SIZE, 0); - PaintCells(WindowDC, 4, 24, 15 * CELL_SIZE, 0); - PaintCells(WindowDC, 4, 32, 20 * CELL_SIZE, 0); - - PaintCells(WindowDC, 8, 4, 0, 5 * CELL_SIZE); - PaintCells(WindowDC, 8, 8, 5 * CELL_SIZE, 5 * CELL_SIZE); - PaintCells(WindowDC, 8, 16, 10 * CELL_SIZE, 5 * CELL_SIZE); - PaintCells(WindowDC, 8, 24, 15 * CELL_SIZE, 5 * CELL_SIZE); - PaintCells(WindowDC, 8, 32, 20 * CELL_SIZE, 5 * CELL_SIZE); - - PaintCells(WindowDC, 16, 4, 0, 10 * CELL_SIZE); - PaintCells(WindowDC, 16, 8, 5 * CELL_SIZE, 10 * CELL_SIZE); - PaintCells(WindowDC, 16, 16, 10 * CELL_SIZE, 10 * CELL_SIZE); - PaintCells(WindowDC, 16, 24, 15 * CELL_SIZE, 10 * CELL_SIZE); - PaintCells(WindowDC, 16, 32, 20 * CELL_SIZE, 10 * CELL_SIZE); - - PaintCells(WindowDC, 24, 4, 0, 15 * CELL_SIZE); - PaintCells(WindowDC, 24, 8, 5 * CELL_SIZE, 15 * CELL_SIZE); - PaintCells(WindowDC, 24, 16, 10 * CELL_SIZE, 15 * CELL_SIZE); - PaintCells(WindowDC, 24, 24, 15 * CELL_SIZE, 15 * CELL_SIZE); - PaintCells(WindowDC, 24, 32, 20 * CELL_SIZE, 15 * CELL_SIZE); - - PaintCells(WindowDC, 32, 4, 0, 20 * CELL_SIZE); - PaintCells(WindowDC, 32, 8, 5 * CELL_SIZE, 20 * CELL_SIZE); - PaintCells(WindowDC, 32, 16, 10 * CELL_SIZE, 20 * CELL_SIZE); - PaintCells(WindowDC, 32, 24, 15 * CELL_SIZE, 20 * CELL_SIZE); - PaintCells(WindowDC, 32, 32, 20 * CELL_SIZE, 20 * CELL_SIZE); - - EndPaint(Wnd, &ps); - break; - - case WM_DESTROY: - PostQuitMessage(0); - break; - - default: - return DefWindowProc(Wnd, msg, wParam, lParam); - } - - return 0; -} diff --git a/rostests/dibtests/dibtest/dibtest.rbuild b/rostests/dibtests/dibtest/dibtest.rbuild deleted file mode 100644 index de99253175b..00000000000 --- a/rostests/dibtests/dibtest/dibtest.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - dibtest.c - diff --git a/rostests/dibtests/directory.rbuild b/rostests/dibtests/directory.rbuild deleted file mode 100644 index 68d3ef88186..00000000000 --- a/rostests/dibtests/directory.rbuild +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rostests/dibtests/icontest/icon.ico b/rostests/dibtests/icontest/icon.ico deleted file mode 100644 index 746b9be45a0..00000000000 Binary files a/rostests/dibtests/icontest/icon.ico and /dev/null differ diff --git a/rostests/dibtests/icontest/icontest.c b/rostests/dibtests/icontest/icontest.c deleted file mode 100644 index f48320dd569..00000000000 --- a/rostests/dibtests/icontest/icontest.c +++ /dev/null @@ -1,208 +0,0 @@ -#include -#include "resource.h" -#include -#include - -ULONG __cdecl DbgPrint(IN PCH Format, IN ...); - -const char titleDrwIco[] = "DrawIcon Output"; -const char titleMask[] = "Mask(AND image)"; -const char titleXor[] = "XOR(color image)"; -const char file[] = "Icon from file:"; -const char res[] = "Icon from Resource:"; -const char cursor[] = "Current Cursor:"; -const char cursormask[] = "Cursor Mask Bitmap"; -const char cursorcolor[] = "Cursor Color Bitmap"; - -HFONT tf; -HINSTANCE hInst; - -LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM); - -int WINAPI -WinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpszCmdLine, - int nCmdShow) -{ - WNDCLASS wc; - MSG msg; - HWND hWnd; - - hInst = hInstance; - - #ifdef _GetCursorInfo - GetCursorInfo = (GETCURSORINFO)GetProcAddress(GetModuleHandleW(L"user32.dll"), "GetCursorInfo"); - #endif - - wc.lpszClassName = "IconTestClass"; - wc.lpfnWndProc = MainWndProc; - wc.style = CS_VREDRAW | CS_HREDRAW; - wc.hInstance = hInstance; - wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION); - wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW); - wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); - wc.lpszMenuName = NULL; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - if (RegisterClass(&wc) == 0) - { - DbgPrint("RegisterClass failed (last error 0x%X)\n", GetLastError()); - return(1); - } - - hWnd = CreateWindow("IconTestClass", - "Icon Test", - WS_OVERLAPPEDWINDOW|WS_HSCROLL|WS_VSCROLL, - CW_USEDEFAULT, - CW_USEDEFAULT, - 480, - 480, - NULL, - NULL, - hInstance, - NULL); - if (hWnd == NULL) - { - DbgPrint("CreateWindow failed (last error 0x%X)\n", GetLastError()); - return(1); - } - - tf = CreateFontA(14,0, 0, TA_BASELINE, FW_NORMAL, FALSE, FALSE, FALSE, - ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, - DEFAULT_QUALITY, FIXED_PITCH|FF_DONTCARE, "Timmons"); - - ShowWindow(hWnd, nCmdShow); - - SetTimer(hWnd, 1, 1000, NULL); - - while(GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - return msg.wParam; -} - -LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - PAINTSTRUCT ps; - HDC hDC; - HICON hIcon; - HGDIOBJ hOld; - HDC hMemDC; - CURSORINFO cursorinfo; - ICONINFO iconinfo; - BITMAP bmp; - RECT rc; - CHAR str[20]; - - switch(msg) - { - case WM_PAINT: - hDC = BeginPaint(hWnd, &ps); - SelectObject(hDC, tf); - SetBkMode(hDC, TRANSPARENT); - - TextOut(hDC, 160, 10, file, strlen(file)); - TextOut(hDC, 15, 85, titleDrwIco, strlen(titleDrwIco)); - TextOut(hDC, 160, 85, titleMask, strlen(titleMask)); - TextOut(hDC, 300, 85, titleXor, strlen(titleXor)); - - hIcon = LoadImage(NULL, "icon.ico", IMAGE_ICON, 0, 0, LR_DEFAULTSIZE|LR_LOADFROMFILE); - DrawIcon(hDC,50,50,hIcon); - - hMemDC = CreateCompatibleDC(hDC); - GetIconInfo(hIcon, &iconinfo); - DestroyIcon(hIcon); - - hOld = SelectObject(hMemDC, iconinfo.hbmMask); - BitBlt(hDC, 200, 50, 32, 32, hMemDC, 0, 0, SRCCOPY); - SelectObject(hMemDC, iconinfo.hbmColor); - BitBlt(hDC, 350, 50, 32, 32, hMemDC, 0, 0, SRCCOPY); - - DeleteObject(iconinfo.hbmMask); - DeleteObject(iconinfo.hbmColor); - - TextOut(hDC, 145, 150, res, strlen(res)); - TextOut(hDC, 15, 225, titleDrwIco, strlen(titleDrwIco)); - TextOut(hDC, 160, 225, titleMask, strlen(titleMask)); - TextOut(hDC, 300, 225, titleXor, strlen(titleXor)); - - hIcon = LoadImage(hInst, MAKEINTRESOURCE(IDI_ICON), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE); - DrawIcon(hDC,50,190,hIcon); - - GetIconInfo(hIcon, &iconinfo); - DestroyIcon(hIcon); - - SelectObject(hMemDC, iconinfo.hbmMask); - BitBlt(hDC, 200, 190, 32, 32, hMemDC, 0, 0, SRCCOPY); - SelectObject(hMemDC, iconinfo.hbmColor); - BitBlt(hDC, 350, 190, 32, 32, hMemDC, 0, 0, SRCCOPY); - - DeleteObject(iconinfo.hbmMask); - DeleteObject(iconinfo.hbmColor); - - cursorinfo.cbSize = sizeof(CURSORINFO); - if(GetCursorInfo(&cursorinfo)) - { - if(cursorinfo.hCursor && cursorinfo.flags) - { - TextOut(hDC, 160, 290, cursor, strlen(cursor)); - DrawIcon(hDC, 50, 330, cursorinfo.hCursor); - GetIconInfo(cursorinfo.hCursor, &iconinfo); - TextOut(hDC, 15, 365, titleDrwIco, strlen(titleDrwIco)); - - sprintf(str, "Hotspot: %ld; %ld", iconinfo.xHotspot, iconinfo.yHotspot); - TextOut(hDC, 15, 380, str, strlen(str)); - - if(iconinfo.hbmMask) - { - GetObjectW(iconinfo.hbmMask, sizeof(BITMAP), &bmp); - SelectObject(hMemDC, iconinfo.hbmMask); - BitBlt(hDC, 200, 330, bmp.bmWidth, bmp.bmHeight, hMemDC, 0, 0, SRCCOPY); - DeleteObject(iconinfo.hbmMask); - TextOut(hDC, 160, 365 - 32 + bmp.bmHeight, cursormask, strlen(cursormask)); - - sprintf(str, "%dBPP", bmp.bmBitsPixel); - TextOut(hDC, 160, 380 - 32 + bmp.bmHeight, str, strlen(str)); - } - - if(iconinfo.hbmColor) - { - GetObjectW(iconinfo.hbmColor, sizeof(BITMAP), &bmp); - SelectObject(hMemDC, iconinfo.hbmColor); - BitBlt(hDC, 350, 330, bmp.bmWidth, bmp.bmHeight, hMemDC, 0, 0, SRCCOPY); - DeleteObject(iconinfo.hbmColor); - TextOut(hDC, 300, 365 - 32 + bmp.bmHeight, cursorcolor, strlen(cursorcolor)); - - sprintf(str, "%dBPP", bmp.bmBitsPixel); - TextOut(hDC, 300, 380 - 32 + bmp.bmHeight, str, strlen(str)); - } - } - } - - SelectObject(hMemDC, hOld); - - DeleteObject(hMemDC); - EndPaint(hWnd, &ps); - break; - - case WM_TIMER: - rc.left = 0; - rc.top = 330; - rc.right = 480; - rc.bottom = 480; - InvalidateRect(hWnd, &rc, TRUE); - break; - - case WM_DESTROY: - PostQuitMessage(0); - break; - - default: - return DefWindowProc(hWnd, msg, wParam, lParam); - } - return 0; -} diff --git a/rostests/dibtests/icontest/icontest.rbuild b/rostests/dibtests/icontest/icontest.rbuild deleted file mode 100644 index 8936201e290..00000000000 --- a/rostests/dibtests/icontest/icontest.rbuild +++ /dev/null @@ -1,8 +0,0 @@ - - . - user32 - gdi32 - ntdll - icontest.c - icontest.rc - diff --git a/rostests/dibtests/icontest/icontest.rc b/rostests/dibtests/icontest/icontest.rc deleted file mode 100644 index 68c787a9de3..00000000000 --- a/rostests/dibtests/icontest/icontest.rc +++ /dev/null @@ -1,4 +0,0 @@ -#include -#include "resource.h" - -IDI_ICON ICON DISCARDABLE "icon.ico" diff --git a/rostests/dibtests/icontest/resource.h b/rostests/dibtests/icontest/resource.h deleted file mode 100644 index 5d9eb75e1c4..00000000000 --- a/rostests/dibtests/icontest/resource.h +++ /dev/null @@ -1 +0,0 @@ -#define IDI_ICON 101 diff --git a/rostests/dibtests/palbitblt/pal.c b/rostests/dibtests/palbitblt/pal.c deleted file mode 100644 index b1af6a537d0..00000000000 --- a/rostests/dibtests/palbitblt/pal.c +++ /dev/null @@ -1,201 +0,0 @@ -/* The idea of this test app is inspired from tutorial * - * found at http://www.theparticle.com/pgraph.html * - * * - * Developed by: Aleksey Bragin * - * Version: 1.0 */ - -#include -#include - -#define W_WIDTH 320 -#define W_HEIGHT 240 - -// special version of BITMAPINFO and LOGPALETTE for max of 256 palette entries -typedef struct -{ - BITMAPINFOHEADER bmiHeader; - RGBQUAD bmiColors[256]; -} BITMAPINFO256; - -typedef struct { - WORD palVersion; - WORD palNumEntries; - PALETTEENTRY palPalEntry[256]; -} LOGPALETTE256; - -// The only global variable --- contents of the DIBitmap -BYTE* dibits; - -void GeneratePalette(RGBQUAD* p) -{ - int i; - for(i=0;i<256;i++) - { - p[i].rgbRed = i; - p[i].rgbGreen = i; - p[i].rgbBlue = i; - p[i].rgbReserved = 0; - } -} - -void DoBlt(HBITMAP hBM) -{ - HDC hDC,Context; - HWND ActiveWindow; - RECT dest; - HBITMAP dflBmp; - - if((ActiveWindow = GetActiveWindow()) == NULL) - return; - - hDC = GetDC(ActiveWindow); - GetClientRect(ActiveWindow,&dest); - - Context = CreateCompatibleDC(0); - dflBmp = SelectObject(Context, hBM); - BitBlt(hDC, 0, 0, dest.right, dest.bottom, Context, 0, 0, SRCCOPY); - SelectObject(Context, dflBmp); - DeleteDC(Context); - DeleteObject(dflBmp); - ReleaseDC(ActiveWindow, hDC); -} - -void UpdatePalette(HBITMAP hBM){ - int i,y; - static unsigned int c=0; - - for(i=0;i 512) - c = 0; - else - c++; // It's operation of incrementing of c variable, not reference of a cool OO language :-) - } - - DoBlt(hBM); -} - -void InitBitmap(HBITMAP *hBM){ - HPALETTE PalHan; - HWND ActiveWindow; - HDC hDC; - RGBQUAD palette[256]; - int i; - BITMAPINFO256 bmInf; - LOGPALETTE256 palInf; - - ActiveWindow = GetActiveWindow(); - hDC = GetDC(ActiveWindow); - - bmInf.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bmInf.bmiHeader.biWidth = W_WIDTH; - bmInf.bmiHeader.biHeight = -abs(W_HEIGHT); - bmInf.bmiHeader.biPlanes = 1; - bmInf.bmiHeader.biBitCount = 8; - bmInf.bmiHeader.biCompression = BI_RGB; - bmInf.bmiHeader.biSizeImage = 0; - bmInf.bmiHeader.biXPelsPerMeter = 0; - bmInf.bmiHeader.biYPelsPerMeter = 0; - bmInf.bmiHeader.biClrUsed = 256; - bmInf.bmiHeader.biClrImportant = 256; - - GeneratePalette(palette); - - for(i=0;i<256;i++) - bmInf.bmiColors[i] = palette[i]; - - palInf.palVersion = 0x300; - palInf.palNumEntries = 256; - for(i=0;i<256;i++){ - palInf.palPalEntry[i].peRed = palette[i].rgbRed; - palInf.palPalEntry[i].peGreen = palette[i].rgbGreen; - palInf.palPalEntry[i].peBlue = palette[i].rgbBlue; - palInf.palPalEntry[i].peFlags = PC_NOCOLLAPSE; - } - - // Create palette - PalHan = CreatePalette((LOGPALETTE*)&palInf); - - // Select it into hDC - SelectPalette(hDC,PalHan,FALSE); - - // Realize palette in hDC - RealizePalette(hDC); - - // Delete handle to palette - DeleteObject(PalHan); - - // Create dib section - *hBM = CreateDIBSection(hDC,(BITMAPINFO*)&bmInf, - DIB_RGB_COLORS,(void**)&dibits,0,0); - - // Release dc - ReleaseDC(ActiveWindow,hDC); -} - -LRESULT CALLBACK WndProc(HWND hWnd,UINT msg, WPARAM wParam,LPARAM lParam) -{ - switch(msg){ - case WM_DESTROY: - PostQuitMessage(0); - return 0; - default: - return DefWindowProc(hWnd,msg,wParam,lParam); - } -} - - - -int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance, LPSTR lpszCmdParam,int nCmdShow) -{ - WNDCLASS WndClass; - HWND hWnd; - MSG msg; - char szName[] = "Palette BitBlt test"; - BOOL exit = FALSE; - HBITMAP hBM; - - // Create and register window class (not modified!!!!!!!!!!!1) - WndClass.style = CS_HREDRAW|CS_VREDRAW|CS_OWNDC; - WndClass.lpfnWndProc = WndProc; - WndClass.cbClsExtra = 0; - WndClass.cbWndExtra = 0; - WndClass.hbrBackground = NULL;//GetStockObject(BLACK_BRUSH); - WndClass.hIcon = NULL;//LoadIcon(hInstance,NULL); - WndClass.hCursor = NULL;//LoadCursor(NULL,IDC_ARROW); - WndClass.hInstance = hInstance; - WndClass.lpszClassName = szName; - WndClass.lpszMenuName = 0; - - RegisterClass(&WndClass); - - // Create and show window (change styles !!!!!!!!) - hWnd = CreateWindow(szName, "ReactOS palette bitblt test", - WS_CAPTION|WS_MINIMIZEBOX|WS_SYSMENU, - CW_USEDEFAULT,CW_USEDEFAULT,W_WIDTH,W_HEIGHT, - 0,0,hInstance,0); - ShowWindow(hWnd,nCmdShow); - - // Prepare bitmap to be bitblt - InitBitmap(&hBM); - - // Main message loop - while (!exit) - { - UpdatePalette(hBM); - Sleep(200); - - if(PeekMessage(&msg,0,0,0,PM_NOREMOVE) == TRUE) - { - if (!GetMessage(&msg,0,0,0)) - exit = TRUE; - - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } - - return msg.wParam; -} diff --git a/rostests/dibtests/palbitblt/palbitblt.rbuild b/rostests/dibtests/palbitblt/palbitblt.rbuild deleted file mode 100644 index 1d75d706d0d..00000000000 --- a/rostests/dibtests/palbitblt/palbitblt.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - pal.c - diff --git a/rostests/dibtests/patblt/Penguin.bmp b/rostests/dibtests/patblt/Penguin.bmp deleted file mode 100644 index ec4e1daaf93..00000000000 Binary files a/rostests/dibtests/patblt/Penguin.bmp and /dev/null differ diff --git a/rostests/dibtests/patblt/patblt.cpp b/rostests/dibtests/patblt/patblt.cpp deleted file mode 100644 index 86d4e7678fc..00000000000 --- a/rostests/dibtests/patblt/patblt.cpp +++ /dev/null @@ -1,270 +0,0 @@ - -// ------------------------------------------------------------------ -// Windows 2000 Graphics API Black Book -// Chapter 2 - Listing 2.1 (PatBlt Tracking Rect Demo) -// -// Created by Damon Chandler -// Updates can be downloaded at: -// -// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu -// if you have any questions about this code. -// ------------------------------------------------------------------ - - -//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -#include -//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - - -HINSTANCE HInst; -const char* WndClassName = "GMainWnd"; -LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam, - LPARAM LParam); - - -int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE, LPTSTR, - int nCmdShow) -{ - HInst = HInstance; - - WNDCLASS wc; - memset(&wc, 0, sizeof(WNDCLASS)); - - wc.style = CS_VREDRAW | CS_HREDRAW; - wc.lpszClassName = WndClassName; - wc.lpfnWndProc = MainWndProc; - wc.hInstance = HInstance; - wc.hCursor = LoadCursor(NULL, IDC_ARROW); - wc.hbrBackground = static_cast( - GetStockObject(BLACK_BRUSH) - ); - - if (RegisterClass(&wc)) - { - HWND HWnd = - CreateWindow(WndClassName, - TEXT("PatBlt Tracking Rect Demo"), - WS_OVERLAPPEDWINDOW | WS_CAPTION | - WS_VISIBLE | WS_CLIPCHILDREN, - CW_USEDEFAULT, CW_USEDEFAULT, 640, 480, - NULL, NULL, HInst, NULL); - - if (HWnd) - { - ShowWindow(HWnd, nCmdShow); - UpdateWindow(HWnd); - - MSG msg; - while (GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } - } - return 0; -} -//------------------------------------------------------------------ - - -// image related -HDC HMemDC = NULL; -HBITMAP HOldBmp = NULL; -const char* filename = "PENGUIN.BMP"; -RECT RImage = {225, 110, 225, 110}; - -// tracking related -bool is_tracking = false; -HDC HScreenDC = NULL; -POINT PMouse = {0, 0}; -RECT RTrack = {0, 0, 0, 0}; -const int line_width = 5; - - -// utility function to map to/from window coordinates -void MapRect(IN HWND HWndFrom, IN HWND HWndTo, IN OUT RECT& RMap) -{ - MapWindowPoints( - HWndFrom, HWndTo, - reinterpret_cast(&RMap), 2 - ); -} -//------------------------------------------------------------------ - - -// utility function that uses the PatBlt function to -// render a tracking rectangle -void RenderTrackingRect(IN HDC HDestDC, IN const RECT& RRender) -{ - const int width = RRender.right - RRender.left; - const int height = RRender.bottom - RRender.top; - const DWORD dwROP3 = DSTINVERT; // experiment with others - - // render top bar - PatBlt(HDestDC, - RRender.left, RRender.top, - width, line_width, - dwROP3); - // render bottom bar - PatBlt(HDestDC, - RRender.left, RRender.bottom - line_width, - width, line_width, - dwROP3); - // render left bar - PatBlt(HDestDC, - RRender.left, RRender.top + line_width, - line_width, height - (2 * line_width), - dwROP3); - // render right bar - PatBlt(HDestDC, - RRender.right - line_width, RRender.top + line_width, - line_width, height - (2 * line_width), - dwROP3); - -} -//------------------------------------------------------------------ - - -LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam, - LPARAM LParam) -{ - switch (Msg) - { - case WM_CREATE: - { - // create a memory DC - HMemDC = CreateCompatibleDC(NULL); - if (HMemDC) - { - // load the penguin bitmap - HBITMAP HBmp = static_cast( - LoadImage(HInst, filename, IMAGE_BITMAP, 0, 0, - LR_LOADFROMFILE | LR_DEFAULTSIZE) - ); - if (HBmp) - { - // get the bitmap's dimensions - BITMAP bmp; - if (GetObject(HBmp, sizeof(BITMAP), &bmp)) - { - RImage.right += bmp.bmWidth; - RImage.bottom += bmp.bmHeight; - - // realize the bitmap - HOldBmp = static_cast( - SelectObject(HMemDC, HBmp) - ); - } - else DeleteObject(HBmp); - } - } - break; - } - case WM_LBUTTONDOWN: - { - PMouse.x = LOWORD(LParam); - PMouse.y = HIWORD(LParam); - - RECT RClient; - if (PtInRect(&RImage, PMouse) && - GetClientRect(HWnd, &RClient)) - { - MapRect(HWnd, HWND_DESKTOP, RClient); - ClipCursor(&RClient); - - // grab a handle to the screen DC and clip - // all output to the client area of our window - HScreenDC = GetDC(NULL); - HRGN HClipRgn = CreateRectRgnIndirect(&RClient); - SelectClipRgn(HScreenDC, HClipRgn); - DeleteObject(HClipRgn); - - CopyRect(&RTrack, &RImage); - MapRect(HWnd, HWND_DESKTOP, RTrack); - - // render the first tracking rect - RenderTrackingRect(HScreenDC, RTrack); - is_tracking = true; - } - break; - } - case WM_MOUSEMOVE: - { - if (HScreenDC && is_tracking) - { - POINT PCurrent = {LOWORD(LParam), HIWORD(LParam)}; - const int dX = PCurrent.x - PMouse.x; - const int dY = PCurrent.y - PMouse.y; - - // erase the previous rectangle - RenderTrackingRect(HScreenDC, RTrack); - // update the postion - OffsetRect(&RTrack, dX, dY); - // render the new tracking rectangle - RenderTrackingRect(HScreenDC, RTrack); - - // update the mouse position - memcpy(&PMouse, &PCurrent, sizeof(POINT)); - } - break; - } - case WM_LBUTTONUP: - { - // clean up - if (is_tracking) - { - is_tracking = false; - SelectClipRgn(HScreenDC, NULL); - ReleaseDC(NULL, HScreenDC); - - InvalidateRect(HWnd, &RImage, true); - CopyRect(&RImage, &RTrack); - MapRect(HWND_DESKTOP, HWnd, RImage); - InvalidateRect(HWnd, &RImage, true); - - ClipCursor(NULL); - } - break; - } - case WM_PAINT: - { - PAINTSTRUCT ps; - HDC Hdc = BeginPaint(HWnd, &ps); - try - { - // - // TODO: Add palette support... - // - - // render the penguin - BitBlt(Hdc, RImage.left, RImage.top, - RImage.right - RImage.left, - RImage.bottom - RImage.top, - HMemDC, 0, 0, - SRCCOPY); - } - catch (...) - { - EndPaint(HWnd, &ps); - } - EndPaint(HWnd, &ps); - break; - } - case WM_DESTROY: - { - // clean up - if (HOldBmp) - { - DeleteObject(SelectObject(HMemDC, HOldBmp)); - } - if (HMemDC) - { - DeleteDC(HMemDC); - } - PostQuitMessage(0); - return 0; - } - } - return DefWindowProc(HWnd, Msg, WParam, LParam); -} -//------------------------------------------------------------------ diff --git a/rostests/dibtests/patblt/patblt.rbuild b/rostests/dibtests/patblt/patblt.rbuild deleted file mode 100644 index e7295167e0e..00000000000 --- a/rostests/dibtests/patblt/patblt.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - patblt.cpp - diff --git a/rostests/dibtests/stretchblt/lena.bmp b/rostests/dibtests/stretchblt/lena.bmp deleted file mode 100644 index e9916963852..00000000000 Binary files a/rostests/dibtests/stretchblt/lena.bmp and /dev/null differ diff --git a/rostests/dibtests/stretchblt/stretchblt.cpp b/rostests/dibtests/stretchblt/stretchblt.cpp deleted file mode 100644 index 68b9b7a76bd..00000000000 --- a/rostests/dibtests/stretchblt/stretchblt.cpp +++ /dev/null @@ -1,380 +0,0 @@ - -// ------------------------------------------------------------------ -// Windows 2000 Graphics API Black Book -// Chapter 1 - Listing 1.5 (StretchBlt Zooming Demo) -// -// Created by Damon Chandler -// Updates can be downloaded at: -// -// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu -// if you have any questions about this code. -// ------------------------------------------------------------------ - -// Modified by Aleksey Bragin (aleksey at studiocerebral.com) -// to support non-uniform scaling, and output via sretchdibits -// (type something in the command line to invoke this mode, -// in future it will be source BPP) - -//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -#include -#include -//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - - -HWND HListBox = NULL; -HWND VListBox = NULL; -const int ID_LISTBOX = 101; -const int ID_LISTBOX2 = 102; -BOOL useDIBits=FALSE; // How to display the image - via StretchDIBits - -HINSTANCE HInst; -HINSTANCE HPrevInst; -TCHAR *cmdline; -const char* WndClassName = "GMainWnd"; -LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam, - LPARAM LParam); - - -int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE HPrevInstance, - LPTSTR lpCmdLine, int nCmdShow) -{ - HInst = HInstance; - HPrevInst = HPrevInstance; - cmdline = lpCmdLine; - - WNDCLASS wc; - memset(&wc, 0, sizeof(WNDCLASS)); - - wc.style = CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS; - wc.lpfnWndProc = MainWndProc; - wc.hInstance = HInstance; - wc.hCursor = LoadCursor(NULL, IDC_ARROW); - wc.hbrBackground = reinterpret_cast(COLOR_BTNFACE + 1); - wc.lpszClassName = WndClassName; - - if (RegisterClass(&wc)) - { - HWND HWnd = - CreateWindow(WndClassName, TEXT("StretchBlt NonUniform Zooming Demo"), - WS_OVERLAPPEDWINDOW | WS_CAPTION | - WS_VISIBLE | WS_CLIPSIBLINGS, - 0, 0, 675, 560, - NULL, NULL, HInst, NULL); - - if (HWnd) - { - HListBox = - CreateWindowEx(WS_EX_CLIENTEDGE, "LISTBOX", "", - LBS_NOTIFY | WS_CHILD | WS_VISIBLE, - 530, 5, 130, 150, HWnd, - reinterpret_cast(ID_LISTBOX), - HInst, NULL); - VListBox = - CreateWindowEx(WS_EX_CLIENTEDGE, "LISTBOX", "", - LBS_NOTIFY | WS_CHILD | WS_VISIBLE, - 530, 5+170, 130, 150, HWnd, - reinterpret_cast(ID_LISTBOX2), - HInst, NULL); - - if (HListBox && VListBox) - { -// horizontal zoom - SNDMSG(HListBox, LB_ADDSTRING, 0, - reinterpret_cast("Zoom 25%")); - SNDMSG(HListBox, LB_ADDSTRING, 0, - reinterpret_cast("Zoom 50%")); - SNDMSG(HListBox, LB_ADDSTRING, 0, - reinterpret_cast("Zoom 75%")); - SNDMSG(HListBox, LB_ADDSTRING, 0, - reinterpret_cast("Zoom 100%")); - SNDMSG(HListBox, LB_ADDSTRING, 0, - reinterpret_cast("Zoom 125%")); - SNDMSG(HListBox, LB_ADDSTRING, 0, - reinterpret_cast("Zoom 150%")); - SNDMSG(HListBox, LB_ADDSTRING, 0, - reinterpret_cast("Zoom 200%")); - SNDMSG(HListBox, LB_ADDSTRING, 0, - reinterpret_cast("Zoom 300%")); -// vertical zoom - SNDMSG(VListBox, LB_ADDSTRING, 0, - reinterpret_cast("Zoom 25%")); - SNDMSG(VListBox, LB_ADDSTRING, 0, - reinterpret_cast("Zoom 50%")); - SNDMSG(VListBox, LB_ADDSTRING, 0, - reinterpret_cast("Zoom 75%")); - SNDMSG(VListBox, LB_ADDSTRING, 0, - reinterpret_cast("Zoom 100%")); - SNDMSG(VListBox, LB_ADDSTRING, 0, - reinterpret_cast("Zoom 125%")); - SNDMSG(VListBox, LB_ADDSTRING, 0, - reinterpret_cast("Zoom 150%")); - SNDMSG(VListBox, LB_ADDSTRING, 0, - reinterpret_cast("Zoom 200%")); - SNDMSG(VListBox, LB_ADDSTRING, 0, - reinterpret_cast("Zoom 300%")); - - } - - ShowWindow(HWnd, nCmdShow); - UpdateWindow(HWnd); - - MSG msg; - while (GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } - } - return 0; -} -//------------------------------------------------------------------ - - -// image related -BITMAP bmp; -BITMAPINFO bmInfo; -char *bbits = NULL; // bitmap bits -const char* filename = "LENA.BMP"; -HDC HMemDC = NULL; -HBITMAP HOldBmp = NULL; - -// zooming related -float zoom_factor_h = 0.5; -float zoom_factor_v = 0.5; -RECT RDest = {5, 5, 0, 0}; -enum {ID_ZOOM25, ID_ZOOM50, ID_ZOOM75, ID_ZOOM100, - ID_ZOOM125, ID_ZOOM150, ID_ZOOM200, ID_ZOOM300}; - -LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam, - LPARAM LParam) -{ - switch (Msg) - { - case WM_CREATE: - { - // check commandline - if (strlen(cmdline) != 0) - { - - useDIBits = TRUE; - } - else - useDIBits = FALSE; - - // create a memory DC - HMemDC = CreateCompatibleDC(NULL); - if (HMemDC) - { - // load a bitmap from file - HBITMAP HBmp = - static_cast( - LoadImage(HInst, filename, IMAGE_BITMAP, - 0, 0, LR_LOADFROMFILE) - ); - if (HBmp) - { - // extract dimensions of the bitmap - GetObject(HBmp, sizeof(BITMAP), &bmp); - - // fill the BITMAPINFO stucture for further use by StretchDIBits - bmInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bmInfo.bmiHeader.biWidth = bmp.bmWidth; - bmInfo.bmiHeader.biHeight = bmp.bmHeight; - bmInfo.bmiHeader.biPlanes = 1;//bmp.bmPlanes; - bmInfo.bmiHeader.biBitCount = bmp.bmBitsPixel; - bmInfo.bmiHeader.biCompression = BI_RGB; - bmInfo.bmiHeader.biSizeImage = 0; - bmInfo.bmiHeader.biXPelsPerMeter = 0; - bmInfo.bmiHeader.biClrImportant = 0; - bmInfo.bmiHeader.biClrUsed = 0; - - // associate the bitmap with the memory DC - HOldBmp = static_cast( - SelectObject(HMemDC, HBmp) - ); - - if (useDIBits) - { - bbits = new char[bmp.bmHeight*bmp.bmWidthBytes*(bmp.bmBitsPixel / 8)]; - //GetDIBits(HMemDC, HBmp, 0, bmp.bmHeight, bbits, &bmInfo, DIB_RGB_COLORS); - - // Here goes a temp hack, since GetDIBits doesn't exist in ReactOS yet - FILE *f = fopen(filename, "rb"); - BITMAPFILEHEADER bmpHeader; - - fread(&bmpHeader, sizeof(BITMAPFILEHEADER), 1, f); - fread(&bmInfo, sizeof(BITMAPINFO), 1, f); - fseek(f, bmpHeader.bfOffBits, SEEK_SET); - fread(bbits, bmp.bmHeight*bmp.bmWidthBytes*(bmp.bmBitsPixel / 8), 1, f); - - fclose(f); - } - } - } - } - case WM_COMMAND: - { - if (WParam == MAKEWPARAM(ID_LISTBOX, LBN_SELCHANGE) || - WParam == MAKEWPARAM(ID_LISTBOX2, LBN_SELCHANGE)) - { - switch (SNDMSG(HListBox, LB_GETCURSEL, 0, 0)) - { - case ID_ZOOM25: zoom_factor_h = 0.25; break; - case ID_ZOOM50: zoom_factor_h = 0.50; break; - case ID_ZOOM75: zoom_factor_h = 0.75; break; - case ID_ZOOM100: zoom_factor_h = 1.00; break; - case ID_ZOOM125: zoom_factor_h = 1.25; break; - case ID_ZOOM150: zoom_factor_h = 1.50; break; - case ID_ZOOM200: zoom_factor_h = 2.00; break; - case ID_ZOOM300: zoom_factor_h = 3.00; break; - } - - switch (SNDMSG(VListBox, LB_GETCURSEL, 0, 0)) - { - case ID_ZOOM25: zoom_factor_v = 0.25; break; - case ID_ZOOM50: zoom_factor_v = 0.50; break; - case ID_ZOOM75: zoom_factor_v = 0.75; break; - case ID_ZOOM100: zoom_factor_v = 1.00; break; - case ID_ZOOM125: zoom_factor_v = 1.25; break; - case ID_ZOOM150: zoom_factor_v = 1.50; break; - case ID_ZOOM200: zoom_factor_v = 2.00; break; - case ID_ZOOM300: zoom_factor_v = 3.00; break; - } - - // calculate the new width and height - const int new_width = - static_cast(zoom_factor_h * bmp.bmWidth); - const int new_height = - static_cast(zoom_factor_v * bmp.bmHeight); - - // is zooming in? - bool zoom_in = (new_width > RDest.right - RDest.left); - - // caculate the area that needs to be updated - RECT RUpdate = { - RDest.left, RDest.top, - RDest.left + max(new_width, RDest.right - RDest.left), - RDest.top + max(new_height, RDest.bottom - RDest.top) - }; - - // adjust the dimenstions of the - // destination rectangle - RDest.right = RDest.left + new_width; - RDest.bottom = RDest.top + new_height; - - // create an update region from the XOR combination - // of the update and destination rectangles - HRGN HUpdateRgn = CreateRectRgnIndirect(&RUpdate); - HRGN HDestRgn = CreateRectRgnIndirect(&RDest); - int result = - CombineRgn(HUpdateRgn, HUpdateRgn, HDestRgn, RGN_XOR); - - // incite a repaint - if (result != NULLREGION && result != ERROR) - { - InvalidateRgn(HWnd, HUpdateRgn, true); - RedrawWindow(HWnd, &RDest, NULL, RDW_NOERASE | RDW_INVALIDATE); - } - else if (result == NULLREGION) - { - InvalidateRect(HWnd, &RUpdate, zoom_in ? false : true); - } - - // clean up - DeleteObject(HUpdateRgn); - DeleteObject(HDestRgn); - } - break; - } - case WM_PAINT: - { - PAINTSTRUCT ps; - const HDC Hdc = BeginPaint(HWnd, &ps); -#if 0 - try -#endif - { - // - // TODO: add palette support (see Chapter 9)... - // - if (useDIBits) - { - if (RDest.right - RDest.left > 0) - { - if (zoom_factor_h < 1.0 || zoom_factor_v < 1.0) - { - SetStretchBltMode(Hdc, COLORONCOLOR); - } - - // render the zoomed image - StretchDIBits(Hdc, RDest.left, RDest.top, - RDest.right - RDest.left, - RDest.bottom - RDest.top, - 0, 0, - bmp.bmWidth, bmp.bmHeight, - bbits, &bmInfo, - DIB_RGB_COLORS, - SRCCOPY); - } - } - else - { - if (RDest.right - RDest.left > 0) - { - - // use BitBlt when not zooming - if (zoom_factor_h == 1.0 && zoom_factor_v == 1.0) - { - BitBlt(Hdc, RDest.left, RDest.top, - RDest.right - RDest.left, - RDest.bottom - RDest.top, - HMemDC, 0, 0, - SRCCOPY); - } - else - { - if (zoom_factor_h < 1.0 || zoom_factor_v < 1.0) - { - SetStretchBltMode(Hdc, COLORONCOLOR); - } - - // render the zoomed image - StretchBlt(Hdc, RDest.left, RDest.top, - RDest.right - RDest.left, - RDest.bottom - RDest.top, - HMemDC, 0, 0, - bmp.bmWidth, bmp.bmHeight, - SRCCOPY); - } - } - } - } -#if 0 - catch (...) -#endif - { - EndPaint(HWnd, &ps); - } - EndPaint(HWnd, &ps); - break; - } - case WM_DESTROY: - { - // clean up - DeleteObject(SelectObject(HMemDC, HOldBmp)); - DeleteDC(HMemDC); - - if (bbits) - delete[] bbits; - - PostQuitMessage(0); - return 0; - } - } - return DefWindowProc(HWnd, Msg, WParam, LParam); -} -//------------------------------------------------------------------ - - - diff --git a/rostests/dibtests/stretchblt/stretchblt.rbuild b/rostests/dibtests/stretchblt/stretchblt.rbuild deleted file mode 100644 index 48626f7c20f..00000000000 --- a/rostests/dibtests/stretchblt/stretchblt.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - stretchblt.cpp - diff --git a/rostests/dibtests/vbltest/test_inv01.bmp b/rostests/dibtests/vbltest/test_inv01.bmp deleted file mode 100644 index 5858d285cf7..00000000000 Binary files a/rostests/dibtests/vbltest/test_inv01.bmp and /dev/null differ diff --git a/rostests/dibtests/vbltest/test_inv04.bmp b/rostests/dibtests/vbltest/test_inv04.bmp deleted file mode 100644 index 9d5b3592938..00000000000 Binary files a/rostests/dibtests/vbltest/test_inv04.bmp and /dev/null differ diff --git a/rostests/dibtests/vbltest/test_inv08.bmp b/rostests/dibtests/vbltest/test_inv08.bmp deleted file mode 100644 index 75a19196e3f..00000000000 Binary files a/rostests/dibtests/vbltest/test_inv08.bmp and /dev/null differ diff --git a/rostests/dibtests/vbltest/test_inv24.bmp b/rostests/dibtests/vbltest/test_inv24.bmp deleted file mode 100644 index 77988e01475..00000000000 Binary files a/rostests/dibtests/vbltest/test_inv24.bmp and /dev/null differ diff --git a/rostests/dibtests/vbltest/test_inv32.ico b/rostests/dibtests/vbltest/test_inv32.ico deleted file mode 100644 index 2c32fdf0022..00000000000 Binary files a/rostests/dibtests/vbltest/test_inv32.ico and /dev/null differ diff --git a/rostests/dibtests/vbltest/vbltest.c b/rostests/dibtests/vbltest/vbltest.c deleted file mode 100644 index 0e2bb25fe27..00000000000 --- a/rostests/dibtests/vbltest/vbltest.c +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Tests various blit and blend operations with different src - * bit depths and scaling where possbile. - * - * Created by Gregor Schneider , November 2008 -*/ - -#include -#include - -BOOL WINAPI GdiAlphaBlend( - HDC hdcDst, int xDst, int yDst, int wDst, int hDst, - HDC hdcSrc, int xSrc, int ySrc, int wSrc, int hSrc, - BLENDFUNCTION blendFunction); - -BOOL WINAPI GdiTransparentBlt( - HDC hdcDst, int xDst, int yDst, int wDst, int hDst, - HDC hdcSrc, int xSrc, int ySrc, int wSrc, int hSrc, - UINT crTransparent); - -#define CURRENT_BMPS 4 -#define CURRENT_ICONS 1 -#define SCALE 1.5 -#define OFFSET 5 - -HINSTANCE hInst; -TCHAR szWindowClass[] = _T("testclass"); - -static LRESULT CALLBACK -WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - static HBITMAP hbmList[CURRENT_BMPS]; - static HICON hicList[CURRENT_ICONS]; - - switch (message) - { - case WM_CREATE: - { - hbmList[0] = (HBITMAP)LoadImage(hInst, MAKEINTRESOURCE(100), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR); - hbmList[1] = (HBITMAP)LoadImage(hInst, MAKEINTRESOURCE(400), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR); - hbmList[2] = (HBITMAP)LoadImage(hInst, MAKEINTRESOURCE(800), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR); - hbmList[3] = (HBITMAP)LoadImage(hInst, MAKEINTRESOURCE(2400), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR); - hicList[0] = (HICON)LoadIcon(hInst, MAKEINTRESOURCE(3200)); - break; - } - - case WM_PAINT: - { - PAINTSTRUCT ps; - HDC hdc, hdcMem; - BITMAP bitmap; - BLENDFUNCTION bfunc; - int x = 0, y = 0, i; - hdc = BeginPaint(hWnd, &ps); - hdcMem = CreateCompatibleDC(hdc); - - bfunc.AlphaFormat = AC_SRC_ALPHA; - bfunc.BlendFlags = 0; - bfunc.BlendOp = AC_SRC_OVER; - bfunc.SourceConstantAlpha = 128; - - /* bitmaps */ - for(i = 0; i < CURRENT_BMPS; i++) - { - y = 0; - SelectObject(hdcMem, hbmList[i]); - GetObject(hbmList[i], sizeof(BITMAP), &bitmap); - - /* bit blt */ - BitBlt(hdc, x, y, bitmap.bmWidth, bitmap.bmHeight, hdcMem, 0, 0, SRCCOPY); - y += bitmap.bmHeight + OFFSET; - - /* stretch blt, org size */ - StretchBlt(hdc, x, y, bitmap.bmWidth, bitmap.bmHeight, hdcMem, 0, 0, bitmap.bmWidth, bitmap.bmHeight, SRCCOPY); - y += bitmap.bmHeight + OFFSET; - - /* stretch blt, scaled */ - StretchBlt(hdc, x, y, bitmap.bmWidth*SCALE, bitmap.bmHeight*SCALE, hdcMem, 0, 0, bitmap.bmWidth, bitmap.bmHeight, SRCCOPY); - y += bitmap.bmHeight*SCALE + OFFSET; - - /* transparent blt, transparency: grey */ - GdiTransparentBlt(hdc, x, y, bitmap.bmWidth, bitmap.bmHeight, hdcMem, 0, 0, bitmap.bmWidth, bitmap.bmHeight, 128*256*256+128*256+128); - y += bitmap.bmHeight + OFFSET; - - /* transparent blt, transparency: grey, scaled */ - GdiTransparentBlt(hdc, x, y, bitmap.bmWidth*SCALE, bitmap.bmHeight*SCALE, hdcMem, 0, 0, bitmap.bmWidth, bitmap.bmHeight, 128*256*256+128*256+128); - y += bitmap.bmHeight*SCALE + OFFSET; - - /* alpha blend, org size */ - GdiAlphaBlend(hdc, x, y, bitmap.bmWidth, bitmap.bmHeight, hdcMem, 0, 0, bitmap.bmWidth, bitmap.bmHeight, bfunc); - y += bitmap.bmHeight + OFFSET; - - /* alpha blend, scaled */ - GdiAlphaBlend(hdc, x, y, bitmap.bmWidth*SCALE, bitmap.bmHeight*SCALE, hdcMem, 0, 0, bitmap.bmWidth, bitmap.bmHeight, bfunc); - y += bitmap.bmHeight*SCALE + OFFSET; - - x += bitmap.bmWidth*SCALE + OFFSET; - } - - /* icons */ - for(i = 0; i < CURRENT_ICONS; i++) - { - y = 0; - /* pure icon */ - DrawIcon(hdc, x, y, hicList[i]); - y += bitmap.bmHeight + OFFSET; - - /* normal icon using Ex */ - DrawIconEx(hdc, x, y, hicList[i], 0, 0, 0, NULL, DI_NORMAL); - y += bitmap.bmHeight + OFFSET; - - /* normal icon using Ex with bigger size */ - DrawIconEx(hdc, x, y, hicList[i], bitmap.bmWidth, bitmap.bmHeight, 0, NULL, DI_NORMAL); - y += bitmap.bmHeight + OFFSET; - - /* only icon using Ex */ - DrawIconEx(hdc, x, y, hicList[i], 0, 0, 0, NULL, DI_IMAGE); - y += bitmap.bmHeight + OFFSET; - - /* mask using Ex */ - DrawIconEx(hdc, x, y, hicList[i], 0, 0, 0, NULL, DI_MASK); - y += bitmap.bmHeight + OFFSET; - - x += bitmap.bmWidth*SCALE + OFFSET; - } - - DeleteDC(hdcMem); - EndPaint(hWnd, &ps); - break; - } - - case WM_DESTROY: - PostQuitMessage(0); - break; - default: - return DefWindowProc(hWnd, message, wParam, lParam); - } - return 0; -} - - -static ATOM -MyRegisterClass(HINSTANCE hInstance) -{ - WNDCLASSEX wcex; - - wcex.cbSize = sizeof(WNDCLASSEX); - - wcex.style = CS_HREDRAW | CS_VREDRAW; - wcex.lpfnWndProc = WndProc; - wcex.cbClsExtra = 0; - wcex.cbWndExtra = 0; - wcex.hInstance = hInstance; - wcex.hIcon = NULL; - wcex.hCursor = LoadCursor(NULL, IDC_ARROW); - wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); - wcex.lpszMenuName = NULL; - wcex.lpszClassName = szWindowClass; - wcex.hIconSm = NULL; - - return RegisterClassEx(&wcex); -} - - -static BOOL -InitInstance(HINSTANCE hInstance, int nCmdShow) -{ - HWND hWnd; - - hInst = hInstance; - - hWnd = CreateWindowEx(0, - szWindowClass, - _T("Various blit and blend operations"), - WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, - CW_USEDEFAULT, - 640, - 640, - NULL, - NULL, - hInstance, - NULL); - - if (!hWnd) - { - return FALSE; - } - - ShowWindow(hWnd, nCmdShow); - UpdateWindow(hWnd); - - return TRUE; -} - - -int WINAPI -_tWinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPTSTR lpCmdLine, - int nCmdShow) -{ - MSG msg; - - MyRegisterClass(hInstance); - - if (!InitInstance(hInstance, nCmdShow)) - { - return FALSE; - } - - while (GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - return (int)msg.wParam; -} diff --git a/rostests/dibtests/vbltest/vbltest.rbuild b/rostests/dibtests/vbltest/vbltest.rbuild deleted file mode 100644 index c49b905f530..00000000000 --- a/rostests/dibtests/vbltest/vbltest.rbuild +++ /dev/null @@ -1,7 +0,0 @@ - - . - user32 - gdi32 - vbltest.c - vbltest.rc - \ No newline at end of file diff --git a/rostests/dibtests/vbltest/vbltest.rc b/rostests/dibtests/vbltest/vbltest.rc deleted file mode 100644 index 432bf1ce56b..00000000000 --- a/rostests/dibtests/vbltest/vbltest.rc +++ /dev/null @@ -1,6 +0,0 @@ -100 BITMAP "test_inv01.bmp" -400 BITMAP "test_inv04.bmp" -800 BITMAP "test_inv08.bmp" -2400 BITMAP "test_inv24.bmp" -3200 ICON "test_inv32.ico" - diff --git a/rostests/directory.rbuild b/rostests/directory.rbuild deleted file mode 100644 index 2aedf49181d..00000000000 --- a/rostests/directory.rbuild +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rostests/drivers/csqtest/SOURCES b/rostests/drivers/csqtest/SOURCES deleted file mode 100644 index 57f9e156818..00000000000 --- a/rostests/drivers/csqtest/SOURCES +++ /dev/null @@ -1,5 +0,0 @@ -TARGETNAME=csqtest -TARGETTYPE=DRIVER -TARGETPATH=obj -TARGETLIBS= csq.lib -SOURCES= csqtest.c diff --git a/rostests/drivers/csqtest/csqtest.c b/rostests/drivers/csqtest/csqtest.c deleted file mode 100644 index de65afdc749..00000000000 --- a/rostests/drivers/csqtest/csqtest.c +++ /dev/null @@ -1,227 +0,0 @@ -/* - * CSQ Test Driver - * Copyright (c) 2004, Vizzini (vizzini@plasmic.com) - * Released under the GNU GPL for the ReactOS project - * - * This driver is designed to exercise the cancel-safe IRP queue logic. - * Please refer to reactos/include/ddk/csq.h and reactos/drivers/lib/csq. - */ -#include -#include - -/* XXX shortcomings in our headers... */ -#define assert(x) -#ifndef KdPrint -#define KdPrint(x) DbgPrint x -#endif - -/* Device name */ -#define NT_DEVICE_NAME L"\\Device\\csqtest" - -/* DosDevices name */ -#define DOS_DEVICE_NAME L"\\??\\csqtest" - -/* Global CSQ struct that the CSQ functions init */ -IO_CSQ Csq; - -/* List and lock for the actual IRP queue */ -LIST_ENTRY IrpQueue; -KSPIN_LOCK IrpQueueLock; - -/* Device object */ -PDEVICE_OBJECT DeviceObject; - -/* - * CSQ Callbacks - */ -VOID NTAPI CsqInsertIrp(PIO_CSQ Csq, PIRP Irp) -{ - KdPrint(("Inserting IRP 0x%x into CSQ\n", Irp)); - InsertTailList(&IrpQueue, &Irp->Tail.Overlay.ListEntry); -} - -VOID NTAPI CsqRemoveIrp(PIO_CSQ Csq, PIRP Irp) -{ - KdPrint(("Removing IRP 0x%x from CSQ\n", Irp)); - RemoveEntryList(&Irp->Tail.Overlay.ListEntry); -} - -PIRP NTAPI CsqPeekNextIrp(PIO_CSQ Csq, PIRP Irp, PVOID PeekContext) -{ - KdPrint(("Peeking for next IRP\n")); - - if(Irp) - return CONTAINING_RECORD(&Irp->Tail.Overlay.ListEntry.Flink, IRP, Tail.Overlay.ListEntry); - - if(IsListEmpty(&IrpQueue)) - return NULL; - - return CONTAINING_RECORD(IrpQueue.Flink, IRP, Tail.Overlay.ListEntry); -} - -VOID NTAPI CsqAcquireLock(PIO_CSQ Csq, PKIRQL Irql) -{ - KdPrint(("Acquiring spin lock\n")); - KeAcquireSpinLock(&IrpQueueLock, Irql); -} - -VOID NTAPI CsqReleaseLock(PIO_CSQ Csq, KIRQL Irql) -{ - KdPrint(("Releasing spin lock\n")); - KeReleaseSpinLock(&IrpQueueLock, Irql); -} - -VOID NTAPI CsqCompleteCancelledIrp(PIO_CSQ Csq, PIRP Irp) -{ - KdPrint(("cancelling irp 0x%x\n", Irp)); - Irp->IoStatus.Status = STATUS_CANCELLED; - Irp->IoStatus.Information = 0; - IoCompleteRequest(Irp, IO_NO_INCREMENT); -} - -NTSTATUS NTAPI CsqInsertIrpEx(PIO_CSQ Csq, PIRP Irp, PVOID InsertContext) -/* - * FUNCTION: Insert into IRP queue, with extra context - * - * NOTE: Switch call in DriverEntry to IoCsqInitializeEx to use this - */ -{ - CsqInsertIrp(Csq, Irp); - return STATUS_PENDING; -} - -/* - * DISPATCH ROUTINES - */ - -NTSTATUS NTAPI DispatchCreateCloseCleanup(PDEVICE_OBJECT DeviceObject, PIRP Irp) -{ - PIO_STACK_LOCATION StackLocation = IoGetCurrentIrpStackLocation(Irp); - - if(StackLocation->MajorFunction == IRP_MJ_CLEANUP) - { - /* flush the irp queue */ - PIRP CurrentIrp; - - KdPrint(("csqtest: Cleanup received; flushing the IRP queue with cancel\n")); - - while((CurrentIrp = IoCsqRemoveNextIrp(&Csq, 0))) - { - CurrentIrp->IoStatus.Status = STATUS_CANCELLED; - CurrentIrp->IoStatus.Information = 0; - - IoCompleteRequest(CurrentIrp, IO_NO_INCREMENT); - } - } - - Irp->IoStatus.Status = STATUS_SUCCESS; - Irp->IoStatus.Information = 0; - - IoCompleteRequest(Irp, IO_NO_INCREMENT); - - return STATUS_SUCCESS; -} - -NTSTATUS NTAPI DispatchReadWrite(PDEVICE_OBJECT DeviceObject, PIRP Irp) -{ - /* According to the cancel sample in the DDK, IoCsqInsertIrp() marks the irp pending */ - /* However, I think it's wrong. */ - IoMarkIrpPending(Irp); - IoCsqInsertIrp(&Csq, Irp, 0); - - return STATUS_PENDING; -} - -NTSTATUS NTAPI DispatchIoctl(PDEVICE_OBJECT DeviceObject, PIRP Irp) -/* - * all IOCTL requests flush the irp queue - */ -{ - PIRP CurrentIrp; - - KdPrint(("csqtest: Ioctl received; flushing the IRP queue with success\n")); - - while((CurrentIrp = IoCsqRemoveNextIrp(&Csq, 0))) - { - CurrentIrp->IoStatus.Status = STATUS_SUCCESS; - CurrentIrp->IoStatus.Information = 0; - - IoCompleteRequest(CurrentIrp, IO_NO_INCREMENT); - } - - Irp->IoStatus.Status = STATUS_SUCCESS; - Irp->IoStatus.Information = 0; - - IoCompleteRequest(Irp, IO_NO_INCREMENT); - - return STATUS_SUCCESS; -} - -VOID NTAPI Unload(PDRIVER_OBJECT DriverObject) -/* - * Function: called by the OS to release resources before unload - */ -{ - UNICODE_STRING LinkName; - - RtlInitUnicodeString(&LinkName, DOS_DEVICE_NAME); - - IoDeleteSymbolicLink(&LinkName); - - if(DeviceObject) - IoDeleteDevice(DeviceObject); -} - -/* - * DriverEntry - */ - -NTSTATUS NTAPI DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) -{ - NTSTATUS Status; - UNICODE_STRING NtName; - UNICODE_STRING DosName; - - DriverObject->MajorFunction[IRP_MJ_CREATE] = DispatchCreateCloseCleanup; - DriverObject->MajorFunction[IRP_MJ_CLOSE] = DispatchCreateCloseCleanup; - DriverObject->MajorFunction[IRP_MJ_CLEANUP] = DispatchCreateCloseCleanup; - DriverObject->MajorFunction[IRP_MJ_READ] = DispatchReadWrite; - DriverObject->MajorFunction[IRP_MJ_WRITE] = DispatchReadWrite; - DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = DispatchIoctl; - DriverObject->DriverUnload = Unload; - - Status = IoCsqInitialize(&Csq, CsqInsertIrp, CsqRemoveIrp, CsqPeekNextIrp, - CsqAcquireLock, CsqReleaseLock, CsqCompleteCancelledIrp); - - if(Status != STATUS_SUCCESS) - KdPrint(("csqtest: IoCsqInitalize failed: 0x%x\n", Status)); - else - KdPrint(("csqtest: IoCsqInitalize succeeded\n")); - - InitializeListHead(&IrpQueue); - KeInitializeSpinLock(&IrpQueueLock); - - /* Set up a device */ - RtlInitUnicodeString(&NtName, NT_DEVICE_NAME); - Status = IoCreateDevice(DriverObject, 0, &NtName, FILE_DEVICE_UNKNOWN, 0, 0, &DeviceObject); - - if(!NT_SUCCESS(Status)) - { - KdPrint(("csqtest: Unable to create device: 0x%x\n", Status)); - return Status; - } - - RtlInitUnicodeString(&DosName, DOS_DEVICE_NAME); - Status = IoCreateSymbolicLink(&DosName, &NtName); - - if(!NT_SUCCESS(Status)) - { - KdPrint(("csqtest: Unable to create link: 0x%x\n", Status)); - return Status; - } - - DeviceObject->Flags |= DO_BUFFERED_IO; - - return STATUS_SUCCESS; -} - diff --git a/rostests/drivers/csqtest/csqtest.rbuild b/rostests/drivers/csqtest/csqtest.rbuild deleted file mode 100644 index 222924a0ab0..00000000000 --- a/rostests/drivers/csqtest/csqtest.rbuild +++ /dev/null @@ -1,8 +0,0 @@ - - - include/reactos/drivers - ntoskrnl - hal - csqtest.c - csqtest.rc - diff --git a/rostests/drivers/csqtest/csqtest.rc b/rostests/drivers/csqtest/csqtest.rc deleted file mode 100644 index b0f70095537..00000000000 --- a/rostests/drivers/csqtest/csqtest.rc +++ /dev/null @@ -1,7 +0,0 @@ -/* $Id$ */ - -#define REACTOS_VERSION_DLL -#define REACTOS_STR_FILE_DESCRIPTION "CSQ Test\0" -#define REACTOS_STR_INTERNAL_NAME "csqtest\0" -#define REACTOS_STR_ORIGINAL_FILENAME "csqtest.sys\0" -#include diff --git a/rostests/drivers/directory.rbuild b/rostests/drivers/directory.rbuild deleted file mode 100644 index 63ed0581c0c..00000000000 --- a/rostests/drivers/directory.rbuild +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/rostests/drivers/memtest/memtest.c b/rostests/drivers/memtest/memtest.c deleted file mode 100644 index 8d20747b75b..00000000000 --- a/rostests/drivers/memtest/memtest.c +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Memory Manager Information and Test driver - * - * Copyright 2006 Aleksey Bragin - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; see the file COPYING.LIB. - * If not, write to the Free Software Foundation, - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -/* INCLUDES *******************************************************************/ - -#include -#include "memtest.h" - -//#define NDEBUG -#include - -HANDLE MonitorThreadHandle; - -/* FUNCTIONS ***********************************************************/ - -static VOID NTAPI -MonitorThread(PVOID Ignored) -{ - SYSTEM_PERFORMANCE_INFORMATION PerformanceInfo; - ULONG Length; - LARGE_INTEGER Interval, SystemTime; - - /* Main loop */ - while (TRUE) - { - Interval.QuadPart = -300 * 10000; // 300 ms - - /* Query information */ - if (ZwQuerySystemInformation(SystemPerformanceInformation, - (PVOID) &PerformanceInfo, - sizeof(SYSTEM_PERFORMANCE_INFORMATION), - &Length) != STATUS_SUCCESS) - { - break; - } - - /* Query current system time */ - KeQuerySystemTime(&SystemTime); - - - DbgPrint("%I64d;%d;%d\n", SystemTime.QuadPart, - PerformanceInfo.CommittedPages, PerformanceInfo.AvailablePages); - - /* Wait for a bit. */ - KeDelayExecutionThread(KernelMode, FALSE, &Interval); - } - - DPRINT("Finishing monitoring thread.\n"); - - PsTerminateSystemThread(0); -} - - -VOID -StartMemoryMonitor() -{ - NTSTATUS Status; - - Status = PsCreateSystemThread( - &MonitorThreadHandle, - THREAD_ALL_ACCESS, - NULL, - NULL, - NULL, - MonitorThread, - NULL); - - if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to start a monitoring thread\n"); - return; - } -} - -/* PUBLIC FUNCTIONS ***********************************************************/ - -/* - * DriverEntry - */ -NTSTATUS -NTAPI -DriverEntry(PDRIVER_OBJECT DriverObject, - PUNICODE_STRING RegistryPath) -{ - DbgPrint("\n===============================================\n Memory Manager Information and Test driver\n"); - DbgPrint("Time;Memory pages allocated;Memory pages free\n"); - - - StartMemoryMonitor(); - - return STATUS_SUCCESS; -} diff --git a/rostests/drivers/memtest/memtest.h b/rostests/drivers/memtest/memtest.h deleted file mode 100644 index f165f4c2ca5..00000000000 --- a/rostests/drivers/memtest/memtest.h +++ /dev/null @@ -1,100 +0,0 @@ -#ifndef MEMTEST_H -#define MEMTEST_H - -#include -#include -#include - -// Class 2 -typedef struct _SYSTEM_PERFORMANCE_INFORMATION -{ - LARGE_INTEGER IdleProcessTime; - LARGE_INTEGER IoReadTransferCount; - LARGE_INTEGER IoWriteTransferCount; - LARGE_INTEGER IoOtherTransferCount; - ULONG IoReadOperationCount; - ULONG IoWriteOperationCount; - ULONG IoOtherOperationCount; - ULONG AvailablePages; - ULONG CommittedPages; - ULONG CommitLimit; - ULONG PeakCommitment; - ULONG PageFaultCount; - ULONG CopyOnWriteCount; - ULONG TransitionCount; - ULONG CacheTransitionCount; - ULONG DemandZeroCount; - ULONG PageReadCount; - ULONG PageReadIoCount; - ULONG CacheReadCount; - ULONG CacheIoCount; - ULONG DirtyPagesWriteCount; - ULONG DirtyWriteIoCount; - ULONG MappedPagesWriteCount; - ULONG MappedWriteIoCount; - ULONG PagedPoolPages; - ULONG NonPagedPoolPages; - ULONG PagedPoolAllocs; - ULONG PagedPoolFrees; - ULONG NonPagedPoolAllocs; - ULONG NonPagedPoolFrees; - ULONG FreeSystemPtes; - ULONG ResidentSystemCodePage; - ULONG TotalSystemDriverPages; - ULONG TotalSystemCodePages; - ULONG NonPagedPoolLookasideHits; - ULONG PagedPoolLookasideHits; - ULONG Spare3Count; - ULONG ResidentSystemCachePage; - ULONG ResidentPagedPoolPage; - ULONG ResidentSystemDriverPage; - ULONG CcFastReadNoWait; - ULONG CcFastReadWait; - ULONG CcFastReadResourceMiss; - ULONG CcFastReadNotPossible; - ULONG CcFastMdlReadNoWait; - ULONG CcFastMdlReadWait; - ULONG CcFastMdlReadResourceMiss; - ULONG CcFastMdlReadNotPossible; - ULONG CcMapDataNoWait; - ULONG CcMapDataWait; - ULONG CcMapDataNoWaitMiss; - ULONG CcMapDataWaitMiss; - ULONG CcPinMappedDataCount; - ULONG CcPinReadNoWait; - ULONG CcPinReadWait; - ULONG CcPinReadNoWaitMiss; - ULONG CcPinReadWaitMiss; - ULONG CcCopyReadNoWait; - ULONG CcCopyReadWait; - ULONG CcCopyReadNoWaitMiss; - ULONG CcCopyReadWaitMiss; - ULONG CcMdlReadNoWait; - ULONG CcMdlReadWait; - ULONG CcMdlReadNoWaitMiss; - ULONG CcMdlReadWaitMiss; - ULONG CcReadAheadIos; - ULONG CcLazyWriteIos; - ULONG CcLazyWritePages; - ULONG CcDataFlushes; - ULONG CcDataPages; - ULONG ContextSwitches; - ULONG FirstLevelTbFills; - ULONG SecondLevelTbFills; - ULONG SystemCalls; -} SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION; - -#define SystemPerformanceInformation 2 - - -LONG -NTAPI -ZwQuerySystemInformation( - IN ULONG SystemInformationClass, - OUT PVOID SystemInformation, - IN ULONG Length, - OUT PULONG ResultLength -); - - -#endif /* MEMTEST_H */ diff --git a/rostests/drivers/memtest/memtest.rbuild b/rostests/drivers/memtest/memtest.rbuild deleted file mode 100644 index 61cb6fec55d..00000000000 --- a/rostests/drivers/memtest/memtest.rbuild +++ /dev/null @@ -1,8 +0,0 @@ - - - include/reactos/drivers - ntoskrnl - hal - memtest.c - memtest.rc - diff --git a/rostests/drivers/memtest/memtest.rc b/rostests/drivers/memtest/memtest.rc deleted file mode 100644 index ab1afb56063..00000000000 --- a/rostests/drivers/memtest/memtest.rc +++ /dev/null @@ -1,7 +0,0 @@ -/* $Id: csqtest.rc 21842 2006-05-07 19:16:11Z ion $ */ - -#define REACTOS_VERSION_DLL -#define REACTOS_STR_FILE_DESCRIPTION "Memory Manager Information and Testing\0" -#define REACTOS_STR_INTERNAL_NAME "memtest\0" -#define REACTOS_STR_ORIGINAL_FILENAME "memtest.sys\0" -#include diff --git a/rostests/drivers/ntoskrnl/IoEaTest.cpp b/rostests/drivers/ntoskrnl/IoEaTest.cpp deleted file mode 100644 index 4bd18e5e959..00000000000 --- a/rostests/drivers/ntoskrnl/IoEaTest.cpp +++ /dev/null @@ -1,507 +0,0 @@ -// IoEaTest.cpp : Defines the entry point for the console application. -// - -#include "stdafx.h" - -#include -#include - -typedef struct _FILE_FULL_EA_INFORMATION { - ULONG NextEntryOffset; - UCHAR Flags; - UCHAR EaNameLength; - USHORT EaValueLength; - CHAR EaName[1]; -} FILE_FULL_EA_INFORMATION, *PFILE_FULL_EA_INFORMATION; - -#define ULONG_PTR unsigned char* - -#define NTSTATUS unsigned int - -#define STATUS_EA_LIST_INCONSISTENT 0x80000014L -#define STATUS_SUCCESS 0x00000000L - -/* - * @implemented - */ -NTSTATUS -NTAPI -IoCheckEaBufferValidityROS(IN PFILE_FULL_EA_INFORMATION EaBuffer, - IN ULONG EaLength, - OUT PULONG ErrorOffset) -{ - PFILE_FULL_EA_INFORMATION EaBufferEnd; - ULONG NextEaBufferOffset; - UINT IntEaLength; - - /* Lenght of the rest. Inital equal to EaLength */ - IntEaLength = EaLength; - /* Inital EaBuffer equal to EaBuffer */ - EaBufferEnd = EaBuffer; - - /* The rest length of the buffer */ - /* 8 = sizeof(ULONG) + sizeof(UCHAR) + sizeof(UCHAR) + sizeof(USHORT) */ - while (IntEaLength >= 8) - { - /* rest of buffer must greater then the sizeof(FILE_FULL_EA_INFORMATION) + buffer */ - NextEaBufferOffset = EaBufferEnd->EaNameLength+EaBufferEnd->EaValueLength + 9; - if (IntEaLength >= NextEaBufferOffset) - { - /* is the EaBufferName terminated with zero? */ - if (EaBufferEnd->EaName[EaBufferEnd->EaNameLength]==0) - { - /* more EaBuffers ahead */ - if (EaBufferEnd->NextEntryOffset == 0) - { - /* test the rest buffersize */ - IntEaLength = IntEaLength - NextEaBufferOffset; - if (IntEaLength>=0) - { - return STATUS_SUCCESS; - } - } - else - { - /* - From the MSDN (http://msdn2.microsoft.com/en-us/library/ms795740.aspx). - For all entries except the last, the value of NextEntryOffset must be greater - than zero and must fall on a ULONG boundary. - */ - NextEaBufferOffset = ((NextEaBufferOffset + 3) & 0xFFFFFFFC); - if ((EaBufferEnd->NextEntryOffset == NextEaBufferOffset) && (EaBufferEnd->NextEntryOffset>0)) - { - /* rest of buffer must be greater then the next offset */ - IntEaLength = IntEaLength - EaBufferEnd->NextEntryOffset; - if (IntEaLength>=0) - { - EaBufferEnd = (PFILE_FULL_EA_INFORMATION)((ULONG_PTR)EaBufferEnd + EaBufferEnd->NextEntryOffset); - continue; - } - } - } - } - } - break; - } - - if (ErrorOffset != NULL) - { - /* calculate the error offset. Or in */ - *ErrorOffset = (ULONG)((ULONG_PTR)EaBufferEnd - (ULONG_PTR)EaBuffer); - } - - return STATUS_EA_LIST_INCONSISTENT; -} - - - - - -void CheckROSAgainstWinAndPrintResult(PFILE_FULL_EA_INFORMATION WinEaBuffer,PFILE_FULL_EA_INFORMATION ROSEaBuffer,NTSTATUS WinStatus,NTSTATUS ROSStatus,ULONG WinErrorOffset,ULONG ROSErrorOffset,int iBufferLength,int iTestCount,ULONG TestEaLength) -{ - printf("Subtest:%i Status:%x EaErrorOffset:%x TestEaLength:%i passed - ",iTestCount,WinStatus,WinErrorOffset,TestEaLength); - if (memcmp(WinEaBuffer,ROSEaBuffer,iBufferLength)==0) - { - if (WinStatus == ROSStatus) - { - if (WinErrorOffset == ROSErrorOffset) - { - printf("okay\n"); - return; - } - } - } - printf("*failed*\n"); -} - -typedef NTSTATUS (*NTAPI pIoCheckEaBufferValidity) (IN PFILE_FULL_EA_INFORMATION EaBuffer,IN ULONG EaLength,OUT PULONG ErrorOffset); - -typedef PVOID (*NTAPI pMmPageEntireDriver) (IN PVOID AddressWithinSection); - -#define RANDOM_INIT_ERROR 0xDEADBAD0 -#define TEST_BUFFER_LEN 256 - -int _tmain(int argc, _TCHAR* argv[]) -{ - void *pFunction; - pIoCheckEaBufferValidity IoCheckEaBufferValidity; - - HMODULE hKrnlMod = LoadLibrary(L"ntoskrnl.exe"); - if (hKrnlMod) - { - pFunction = GetProcAddress(hKrnlMod,"IoCheckEaBufferValidity"); - IoCheckEaBufferValidity = (pIoCheckEaBufferValidity)pFunction; - if (IoCheckEaBufferValidity!=NULL) - { - /* Check tes Windows Function */ - ULONG ulWinError; - ULONG ulROSError; - NTSTATUS WinStatus; - NTSTATUS ROSStatus; - PFILE_FULL_EA_INFORMATION WinEaBuffer; - PFILE_FULL_EA_INFORMATION ROSEaBuffer; - char szTest[100] = "FltMgr"; - int iTestCount,i; - ULONG TestEaLength; - UCHAR TestEaBufferFlags; - - // Test the flag - TestEaBufferFlags = 0; - - iTestCount = 1; - WinEaBuffer = (PFILE_FULL_EA_INFORMATION)malloc(TEST_BUFFER_LEN); - ROSEaBuffer = (PFILE_FULL_EA_INFORMATION)malloc(TEST_BUFFER_LEN); - - - printf("1.) Test : *********************\n"); - - /* Check EaLength calculation */ - /* Here all zero : only i>9 pass the test with STATUS_SUCCESS */ - - for (i=0;iFlags = TestEaBufferFlags; - WinStatus = IoCheckEaBufferValidity(WinEaBuffer,TestEaLength,&ulWinError); - - // ROS - memset(ROSEaBuffer,0,TEST_BUFFER_LEN); - ulROSError = RANDOM_INIT_ERROR; - ROSEaBuffer->Flags = TestEaBufferFlags; - ROSStatus = IoCheckEaBufferValidityROS(ROSEaBuffer,TestEaLength,&ulROSError); - - CheckROSAgainstWinAndPrintResult(WinEaBuffer,ROSEaBuffer,WinStatus,ROSStatus,ulWinError,ulWinError,TEST_BUFFER_LEN,iTestCount,TestEaLength); - iTestCount++; - } - - printf("2.) Test : *********************\n"); - - /* Here all zero but EaBuffer::EaName is set : will allways end in STATUS_EA_LIST_INCONSISTENT */ - /* There must a link to EaBuffer::EaName */ - for (i=0;iEaName,"%x",RANDOM_INIT_ERROR); - ulWinError = RANDOM_INIT_ERROR; - WinEaBuffer->Flags = TestEaBufferFlags; - WinStatus = IoCheckEaBufferValidity(WinEaBuffer,TestEaLength,&ulWinError); - - // ROS - memset(ROSEaBuffer,0,TEST_BUFFER_LEN); - sprintf(ROSEaBuffer->EaName,"%x",RANDOM_INIT_ERROR); - ulROSError = RANDOM_INIT_ERROR; - ROSStatus = IoCheckEaBufferValidityROS(ROSEaBuffer,TestEaLength,&ulROSError); - - CheckROSAgainstWinAndPrintResult(WinEaBuffer,ROSEaBuffer,WinStatus,ROSStatus,ulWinError,ulWinError,TEST_BUFFER_LEN,iTestCount,TestEaLength); - iTestCount++; - } - - printf("3.) Test : *********************\n"); - - /* Here EaBuffer::EaName is set and EaBuffer::EaNameLength is count up. EaLength is maxbuffer: STATUS_SUCCESS when EaBuffer::EaNameLength>strlen(EaBuffer::EaName) */ - TestEaLength = TEST_BUFFER_LEN; - for (i=0;iEaName,"%x",RANDOM_INIT_ERROR); - WinEaBuffer->EaNameLength = i; - ulWinError = RANDOM_INIT_ERROR; - WinEaBuffer->Flags = TestEaBufferFlags; - WinStatus = IoCheckEaBufferValidity(WinEaBuffer,TestEaLength,&ulWinError); - - // ROS - memset(ROSEaBuffer,0,TEST_BUFFER_LEN); - sprintf(ROSEaBuffer->EaName,"%x",RANDOM_INIT_ERROR); - ROSEaBuffer->EaNameLength = i; - ulROSError = RANDOM_INIT_ERROR; - ROSEaBuffer->Flags = TestEaBufferFlags; - ROSStatus = IoCheckEaBufferValidityROS(ROSEaBuffer,TestEaLength,&ulROSError); - - CheckROSAgainstWinAndPrintResult(WinEaBuffer,ROSEaBuffer,WinStatus,ROSStatus,ulWinError,ulWinError,TEST_BUFFER_LEN,iTestCount,TestEaLength); - iTestCount++; - } - - printf("4.) Test : *********************\n"); - - /* Here EaBuffer::EaName is set and EaBuffer::EaNameLength is strlen(EaBuffer::EaName). EaLength is count: STATUS_SUCCESS when EaLength>=17 (EaBuffer::EaNameLength+9) */ - for (i=0;iEaName,"%x",RANDOM_INIT_ERROR); - WinEaBuffer->EaNameLength = (UCHAR)strlen(WinEaBuffer->EaName); - ulWinError = RANDOM_INIT_ERROR; - WinEaBuffer->Flags = TestEaBufferFlags; - WinStatus = IoCheckEaBufferValidity(WinEaBuffer,TestEaLength,&ulWinError); - - // ROS - memset(ROSEaBuffer,0,TEST_BUFFER_LEN); - sprintf(ROSEaBuffer->EaName,"%x",RANDOM_INIT_ERROR); - ROSEaBuffer->EaNameLength = (UCHAR)strlen(ROSEaBuffer->EaName); - ulROSError = RANDOM_INIT_ERROR; - ROSEaBuffer->Flags = TestEaBufferFlags; - ROSStatus = IoCheckEaBufferValidityROS(ROSEaBuffer,TestEaLength,&ulROSError); - - CheckROSAgainstWinAndPrintResult(WinEaBuffer,ROSEaBuffer,WinStatus,ROSStatus,ulWinError,ulWinError,TEST_BUFFER_LEN,iTestCount,TestEaLength); - iTestCount++; - } - - printf("5.) Test : *********************\n"); - - /* Here EaBuffer::EaName is set and EaBuffer::EaNameLength is strlen(EaBuffer::EaName) EaBuffer::EaValueLength is strlen(EaBuffer::EaName)+1. EaLength is count: STATUS_SUCCESS when EaLength>=26 (EaBuffer::EaNameLength+EaBuffer::EaValueLength+9) */ - for (i=0;iEaName,"%x",RANDOM_INIT_ERROR); - WinEaBuffer->EaNameLength = (UCHAR)strlen(WinEaBuffer->EaName); - WinEaBuffer->EaValueLength = (UCHAR)strlen(WinEaBuffer->EaName)+1; - ulWinError = RANDOM_INIT_ERROR; - WinEaBuffer->Flags = TestEaBufferFlags; - WinStatus = IoCheckEaBufferValidity(WinEaBuffer,TestEaLength,&ulWinError); - - // ROS - memset(ROSEaBuffer,0,TEST_BUFFER_LEN); - sprintf(ROSEaBuffer->EaName,"%x",RANDOM_INIT_ERROR); - ROSEaBuffer->EaNameLength = (UCHAR)strlen(ROSEaBuffer->EaName); - ROSEaBuffer->EaValueLength = (UCHAR)strlen(ROSEaBuffer->EaName)+1; - ulROSError = RANDOM_INIT_ERROR; - ROSEaBuffer->Flags = TestEaBufferFlags; - ROSStatus = IoCheckEaBufferValidityROS(ROSEaBuffer,TestEaLength,&ulROSError); - - CheckROSAgainstWinAndPrintResult(WinEaBuffer,ROSEaBuffer,WinStatus,ROSStatus,ulWinError,ulWinError,TEST_BUFFER_LEN,iTestCount,TestEaLength); - iTestCount++; - } - - - printf("6.) Test : *********************\n"); - - /* The same test like 5.) but more data in the buffer*/ - /* Here EaBuffer::EaName is set and EaBuffer::EaNameLength is strlen(EaBuffer::EaName) EaBuffer::EaValueLength is strlen(EaBuffer::EaName)+1. EaLength is count: STATUS_SUCCESS when EaLength>=26 (EaBuffer::EaNameLength+EaBuffer::EaValueLength+9) */ - - for (i=0;iEaName,"%x%x%x",RANDOM_INIT_ERROR,RANDOM_INIT_ERROR,RANDOM_INIT_ERROR); - sprintf(WinEaBuffer->EaName,"%x",RANDOM_INIT_ERROR); - WinEaBuffer->EaNameLength = (UCHAR)strlen(WinEaBuffer->EaName); - WinEaBuffer->EaValueLength = (UCHAR)strlen(WinEaBuffer->EaName)+1; - ulWinError = RANDOM_INIT_ERROR; - WinEaBuffer->Flags = TestEaBufferFlags; - WinStatus = IoCheckEaBufferValidity(WinEaBuffer,TestEaLength,&ulWinError); - - // ROS - memset(ROSEaBuffer,0,TEST_BUFFER_LEN); - sprintf(ROSEaBuffer->EaName,"%x%x%x",RANDOM_INIT_ERROR,RANDOM_INIT_ERROR,RANDOM_INIT_ERROR); - sprintf(ROSEaBuffer->EaName,"%x",RANDOM_INIT_ERROR); - ROSEaBuffer->EaNameLength = (UCHAR)strlen(ROSEaBuffer->EaName); - ROSEaBuffer->EaValueLength = (UCHAR)strlen(ROSEaBuffer->EaName)+1; - ulROSError = RANDOM_INIT_ERROR; - ROSEaBuffer->Flags = TestEaBufferFlags; - ROSStatus = IoCheckEaBufferValidityROS(ROSEaBuffer,TestEaLength,&ulROSError); - - CheckROSAgainstWinAndPrintResult(WinEaBuffer,ROSEaBuffer,WinStatus,ROSStatus,ulWinError,ulWinError,TEST_BUFFER_LEN,iTestCount,TestEaLength); - iTestCount++; - } - - printf("7.) Test : *********************\n"); - - /* The same test like 6.) but wrong strlen */ - /* Here EaBuffer::EaName is set and EaBuffer::EaNameLength is strlen(EaBuffer::EaName) EaBuffer::EaValueLength is strlen(EaBuffer::EaName)+1. EaLength is count: will allways end in STATUS_EA_LIST_INCONSISTENT */ - for (i=0;iEaName,"%x%x%x",RANDOM_INIT_ERROR,RANDOM_INIT_ERROR,RANDOM_INIT_ERROR); - sprintf(WinEaBuffer->EaName,"%x",RANDOM_INIT_ERROR); - WinEaBuffer->EaNameLength = (UCHAR)strlen(WinEaBuffer->EaName)-1; - WinEaBuffer->EaValueLength = (UCHAR)strlen(WinEaBuffer->EaName)+2; - ulWinError = RANDOM_INIT_ERROR; - WinEaBuffer->Flags = TestEaBufferFlags; - WinStatus = IoCheckEaBufferValidity(WinEaBuffer,TestEaLength,&ulWinError); - - // ROS - memset(ROSEaBuffer,0,TEST_BUFFER_LEN); - sprintf(ROSEaBuffer->EaName,"%x%x%x",RANDOM_INIT_ERROR,RANDOM_INIT_ERROR,RANDOM_INIT_ERROR); - sprintf(ROSEaBuffer->EaName,"%x",RANDOM_INIT_ERROR); - ROSEaBuffer->EaNameLength = (UCHAR)strlen(ROSEaBuffer->EaName)-1; - ROSEaBuffer->EaValueLength = (UCHAR)strlen(ROSEaBuffer->EaName)+2; - ulROSError = RANDOM_INIT_ERROR; - ROSEaBuffer->Flags = TestEaBufferFlags; - ROSStatus = IoCheckEaBufferValidityROS(ROSEaBuffer,TestEaLength,&ulROSError); - - CheckROSAgainstWinAndPrintResult(WinEaBuffer,ROSEaBuffer,WinStatus,ROSStatus,ulWinError,ulWinError,TEST_BUFFER_LEN,iTestCount,TestEaLength); - iTestCount++; - } - - - printf("8.) Test : *********************\n"); - - /* Here WinEaBuffer->NextEntryOffset test : STATUS_SUCCESS when NextEntryOffset=0 else STATUS_EA_LIST_INCONSISTENT when NextEntryOffset = 28 = 8+8+9 ((WinEaBuffer->EaNameLength+WinEaBuffer->EaNameLength+9)+3)&0xFFFFFFFC then ErrorOffset 28 */ - /* From the MSDN (http://msdn2.microsoft.com/en-us/library/ms795740.aspx). For all entries except the last, the value of NextEntryOffset must be greater than zero and must fall on a ULONG boundary.*/ - for (i=0;iEaName,"%x%x%x",RANDOM_INIT_ERROR,RANDOM_INIT_ERROR,RANDOM_INIT_ERROR); - sprintf(WinEaBuffer->EaName,"%x",RANDOM_INIT_ERROR); - WinEaBuffer->EaNameLength = (UCHAR)strlen(WinEaBuffer->EaName); - WinEaBuffer->EaValueLength = (UCHAR)strlen(WinEaBuffer->EaName); - ulWinError = RANDOM_INIT_ERROR; - WinEaBuffer->Flags = TestEaBufferFlags; - WinEaBuffer->NextEntryOffset = i; - WinStatus = IoCheckEaBufferValidity(WinEaBuffer,TestEaLength,&ulWinError); - - // ROS - memset(ROSEaBuffer,0,TEST_BUFFER_LEN); - sprintf(ROSEaBuffer->EaName,"%x%x%x",RANDOM_INIT_ERROR,RANDOM_INIT_ERROR,RANDOM_INIT_ERROR); - sprintf(ROSEaBuffer->EaName,"%x",RANDOM_INIT_ERROR); - ROSEaBuffer->EaNameLength = (UCHAR)strlen(ROSEaBuffer->EaName); - ROSEaBuffer->EaValueLength = (UCHAR)strlen(ROSEaBuffer->EaName); - ulROSError = RANDOM_INIT_ERROR; - ROSEaBuffer->Flags = TestEaBufferFlags; - ROSEaBuffer->NextEntryOffset = i; - ROSStatus = IoCheckEaBufferValidityROS(ROSEaBuffer,TestEaLength,&ulROSError); - - printf("%i-",ROSEaBuffer->NextEntryOffset); - CheckROSAgainstWinAndPrintResult(WinEaBuffer,ROSEaBuffer,WinStatus,ROSStatus,ulWinError,ulWinError,TEST_BUFFER_LEN,iTestCount,TestEaLength); - iTestCount++; - } - - printf("9.) Test : *********************\n"); - - /* Here WinEaBuffer->NextEntryOffset test wrong strlen: STATUS_SUCCESS NextEntryOffset=0 & NextEntryOffset = 28 = 8+8+9 ((WinEaBuffer->EaNameLength+WinEaBuffer->EaNameLength+9)+3)&0xFFFFFFFC */ - /* From the MSDN (http://msdn2.microsoft.com/en-us/library/ms795740.aspx). For all entries except the last, the value of NextEntryOffset must be greater than zero and must fall on a ULONG boundary.*/ - for (i=0;iEaName,"%x",RANDOM_INIT_ERROR); - - WinEaBuffer->EaNameLength = (UCHAR)strlen(WinEaBuffer->EaName)-1; - WinEaBuffer->EaValueLength = (UCHAR)strlen(WinEaBuffer->EaName); - ulWinError = RANDOM_INIT_ERROR; - WinEaBuffer->Flags = TestEaBufferFlags; - WinEaBuffer->NextEntryOffset = i; - WinStatus = IoCheckEaBufferValidity(WinEaBuffer,TestEaLength,&ulWinError); - - // ROS - memset(ROSEaBuffer,0,TEST_BUFFER_LEN); - sprintf(ROSEaBuffer->EaName,"%x",RANDOM_INIT_ERROR); - - ROSEaBuffer->EaNameLength = (UCHAR)strlen(ROSEaBuffer->EaName)-1; - ROSEaBuffer->EaValueLength = (UCHAR)strlen(ROSEaBuffer->EaName); - ulROSError = RANDOM_INIT_ERROR; - ROSEaBuffer->Flags = TestEaBufferFlags; - ROSEaBuffer->NextEntryOffset = i; - ROSStatus = IoCheckEaBufferValidityROS(ROSEaBuffer,TestEaLength,&ulROSError); - - printf("%i-",ROSEaBuffer->NextEntryOffset); - CheckROSAgainstWinAndPrintResult(WinEaBuffer,ROSEaBuffer,WinStatus,ROSStatus,ulWinError,ulWinError,TEST_BUFFER_LEN,iTestCount,TestEaLength); - iTestCount++; - } - - printf("10.) Test : *********************\n"); - - /* Here WinEaBuffer->NextEntryOffset test wrong strlen: STATUS_SUCCESS NextEntryOffset=0 & NextEntryOffset = 28 = 8+8+9 ((WinEaBuffer->EaNameLength+WinEaBuffer->EaNameLength+9)+3)&0xFFFFFFFC */ - /* From the MSDN (http://msdn2.microsoft.com/en-us/library/ms795740.aspx). For all entries except the last, the value of NextEntryOffset must be greater than zero and must fall on a ULONG boundary.*/ - for (i=0;iEaName,"%x",RANDOM_INIT_ERROR); - - WinEaBuffer->EaNameLength = (UCHAR)strlen(WinEaBuffer->EaName)+1; - WinEaBuffer->EaValueLength = (UCHAR)strlen(WinEaBuffer->EaName)+1; - ulWinError = RANDOM_INIT_ERROR; - WinEaBuffer->Flags = TestEaBufferFlags; - WinEaBuffer->NextEntryOffset = i; - WinStatus = IoCheckEaBufferValidity(WinEaBuffer,TestEaLength,&ulWinError); - - // ROS - memset(ROSEaBuffer,0,TEST_BUFFER_LEN); - sprintf(ROSEaBuffer->EaName,"%x",RANDOM_INIT_ERROR); - - ROSEaBuffer->EaNameLength = (UCHAR)strlen(ROSEaBuffer->EaName)+1; - ROSEaBuffer->EaValueLength = (UCHAR)strlen(ROSEaBuffer->EaName)+1; - ulROSError = RANDOM_INIT_ERROR; - ROSEaBuffer->Flags = TestEaBufferFlags; - ROSEaBuffer->NextEntryOffset = i; - ROSStatus = IoCheckEaBufferValidityROS(ROSEaBuffer,TestEaLength,&ulROSError); - - printf("%i-",ROSEaBuffer->NextEntryOffset); - CheckROSAgainstWinAndPrintResult(WinEaBuffer,ROSEaBuffer,WinStatus,ROSStatus,ulWinError,ulWinError,TEST_BUFFER_LEN,iTestCount,TestEaLength); - iTestCount++; - } - - printf("11.) Test : *********************\n"); - - /* Here WinEaBuffer->NextEntryOffset : */ - for (i=0;iEaName,"%x",RANDOM_INIT_ERROR,RANDOM_INIT_ERROR); - - WinEaBuffer->EaNameLength = (UCHAR)strlen(WinEaBuffer->EaName); - WinEaBuffer->EaValueLength = (UCHAR)strlen(WinEaBuffer->EaName); - ulWinError = RANDOM_INIT_ERROR; - WinEaBuffer->Flags = TestEaBufferFlags; - WinEaBuffer->NextEntryOffset = ((WinEaBuffer->EaNameLength+WinEaBuffer->EaNameLength+9)+3)&0xFFFFFFFC; - WinStatus = IoCheckEaBufferValidity(WinEaBuffer,TestEaLength,&ulWinError); - - // ROS - memset(ROSEaBuffer,0,TEST_BUFFER_LEN); - sprintf(ROSEaBuffer->EaName,"%x",RANDOM_INIT_ERROR,RANDOM_INIT_ERROR); - - ROSEaBuffer->EaNameLength = (UCHAR)strlen(ROSEaBuffer->EaName); - ROSEaBuffer->EaValueLength = (UCHAR)strlen(ROSEaBuffer->EaName); - ulROSError = RANDOM_INIT_ERROR; - ROSEaBuffer->Flags = TestEaBufferFlags; - ROSEaBuffer->NextEntryOffset = ((ROSEaBuffer->EaNameLength+ROSEaBuffer->EaNameLength+9)+3)&0xFFFFFFFC;; - ROSStatus = IoCheckEaBufferValidityROS(ROSEaBuffer,TestEaLength,&ulROSError); - - printf("%i-",ROSEaBuffer->NextEntryOffset); - CheckROSAgainstWinAndPrintResult(WinEaBuffer,ROSEaBuffer,WinStatus,ROSStatus,ulWinError,ulWinError,TEST_BUFFER_LEN,iTestCount,TestEaLength); - iTestCount++; - } - - - free(WinEaBuffer); - free(ROSEaBuffer); - } - - FreeLibrary(hKrnlMod); - } - else - { - DWORD dwLastError = GetLastError(); - switch (dwLastError) - { - case ERROR_MOD_NOT_FOUND: - printf("ERROR_MOD_NOT_FOUND\n"); - break; - case ERROR_BAD_EXE_FORMAT: - printf("ERROR_BAD_EXE_FORMAT\n"); - break; - } - } - return 0; -} - diff --git a/rostests/dxtest/ddraw/DDraw/available_mem.cpp b/rostests/dxtest/ddraw/DDraw/available_mem.cpp deleted file mode 100644 index 6a93fb956c7..00000000000 --- a/rostests/dxtest/ddraw/DDraw/available_mem.cpp +++ /dev/null @@ -1,269 +0,0 @@ - -BOOL Test_GetAvailableVidMem (INT* passed, INT* failed) -{ - LPDIRECTDRAW7 DirectDraw; - - /* Preparations */ - if (DirectDrawCreateEx(NULL, (VOID**)&DirectDraw, IID_IDirectDraw7, NULL) != DD_OK) - { - printf("ERROR: Failed to set up ddraw\n"); - return FALSE; - } - - /* Here we go */ - DWORD Total, Free; - DDSCAPS2 Caps = { 0 }; - - TEST (DirectDraw->GetAvailableVidMem(&Caps, NULL, NULL) == DDERR_INVALIDPARAMS); - TEST (DirectDraw->GetAvailableVidMem(NULL, &Total, &Free) == DDERR_INVALIDPARAMS); - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - /* testing caps */ - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_RESERVED1; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_ALPHA; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_BACKBUFFER; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DDERR_INVALIDPARAMS ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_COMPLEX; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DDERR_INVALIDPARAMS ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_FLIP; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DDERR_INVALIDPARAMS ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_FRONTBUFFER; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DDERR_INVALIDPARAMS ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_OFFSCREENPLAIN; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_OVERLAY; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_PALETTE; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DDERR_INVALIDPARAMS ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_PRIMARYSURFACE; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_RESERVED3; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_SYSTEMMEMORY; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DDERR_INVALIDPARAMS ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_TEXTURE; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_3DDEVICE; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_VIDEOMEMORY; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_VISIBLE; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DDERR_INVALIDPARAMS ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_WRITEONLY; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DDERR_INVALIDPARAMS ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_ZBUFFER; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_OWNDC; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DDERR_INVALIDPARAMS ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_LIVEVIDEO; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_HWCODEC; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_MODEX; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_MIPMAP; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_RESERVED2; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_ALLOCONLOAD; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_VIDEOPORT; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK ); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_LOCALVIDMEM; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps = DDSCAPS_NONLOCALVIDMEM; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = 0x01; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DDERR_INVALIDCAPS); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_RESERVED4; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_HINTDYNAMIC; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_HINTSTATIC; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_TEXTUREMANAGE; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_RESERVED1; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_RESERVED2; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_OPAQUE; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_HINTANTIALIASING; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_CUBEMAP; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_CUBEMAP_POSITIVEX; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_CUBEMAP_NEGATIVEX; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_CUBEMAP_POSITIVEY; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_CUBEMAP_NEGATIVEY; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_CUBEMAP_POSITIVEZ; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_CUBEMAP_NEGATIVEZ; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_MIPMAPSUBLEVEL; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_D3DTEXTUREMANAGE; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_DONOTPERSIST; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_STEREOSURFACELEFT; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_VOLUME; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_NOTUSERLOCKABLE; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_POINTS; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_RTPATCHES; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_NPATCHES; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_RESERVED3; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_DISCARDBACKBUFFER; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_ENABLEALPHACHANNEL; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_EXTENDEDFORMATPRIMARY; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps2 = DDSCAPS2_ADDITIONALPRIMARY; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps3 = ~(DDSCAPS3_MULTISAMPLE_QUALITY_MASK | DDSCAPS3_MULTISAMPLE_MASK | DDSCAPS3_RESERVED1 | DDSCAPS3_RESERVED2 | DDSCAPS3_LIGHTWEIGHTMIPMAP | DDSCAPS3_AUTOGENMIPMAP | DDSCAPS3_DMAP); - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DDERR_INVALIDCAPS); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps3 = (DDSCAPS3_MULTISAMPLE_QUALITY_MASK | DDSCAPS3_MULTISAMPLE_MASK | DDSCAPS3_RESERVED1 | DDSCAPS3_RESERVED2 | DDSCAPS3_LIGHTWEIGHTMIPMAP | DDSCAPS3_AUTOGENMIPMAP | DDSCAPS3_DMAP); - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK); - - memset(&Caps,0,sizeof(DDSCAPS2)); - Caps.dwCaps4 = 1; - TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DDERR_INVALIDCAPS ); - - DirectDraw->Release(); - - return TRUE; -} diff --git a/rostests/dxtest/ddraw/DDraw/create.cpp b/rostests/dxtest/ddraw/DDraw/create.cpp deleted file mode 100644 index ffa612b18c6..00000000000 --- a/rostests/dxtest/ddraw/DDraw/create.cpp +++ /dev/null @@ -1,157 +0,0 @@ -#include "ddrawtest.h" - -HWND CreateBasicWindow (VOID); - -BOOL Test_CreateDDraw (INT* passed, INT* failed) -{ - LPDIRECTDRAW7 DirectDraw; - IDirectDraw* DirectDraw2; - - /*** FIXME: Test first parameter using EnumDisplayDrivers ***/ - DirectDrawCreateEx(NULL, (VOID**)&DirectDraw, IID_IDirectDraw7, NULL); - - TEST (DirectDrawCreateEx(NULL, (VOID**)&DirectDraw, IID_IDirectDraw7, (IUnknown*)0xdeadbeef) == CLASS_E_NOAGGREGATION); - TEST (DirectDrawCreateEx(NULL, (VOID**)&DirectDraw, IID_IDirectDraw4, NULL) == DDERR_INVALIDPARAMS); - TEST (DirectDrawCreateEx(NULL, NULL, IID_IDirectDraw7, NULL) == DDERR_INVALIDPARAMS); - - DirectDraw = NULL; - TEST (DirectDrawCreateEx(NULL, (VOID**)&DirectDraw, IID_IDirectDraw7, NULL) == DD_OK); - if(DirectDraw) - { - TEST (DirectDraw->Initialize(NULL) == DDERR_ALREADYINITIALIZED); - TEST (DirectDraw->Release() == 0); - } - - DirectDraw2 = NULL; - TEST (DirectDrawCreate(NULL ,&DirectDraw2, NULL) == DD_OK); - if(DirectDraw2) - { - TEST (DirectDraw2->QueryInterface(IID_IDirectDraw7, (PVOID*)&DirectDraw) == 0); - TEST (DirectDraw2->AddRef() == 2); - TEST (DirectDraw->AddRef() == 2); - TEST (DirectDraw->Release() == 1); - TEST (DirectDraw->Release() == 0); - TEST (DirectDraw2->Release() == 1); - TEST (DirectDraw2->Release() == 0); - } - - return TRUE; -} - -BOOL Test_SetCooperativeLevel (INT* passed, INT* failed) -{ - HWND hwnd; - LPDIRECTDRAW7 DirectDraw; - - /* Preparations */ - if (DirectDrawCreateEx(NULL, (VOID**)&DirectDraw, IID_IDirectDraw7, NULL) != DD_OK) - { - printf("ERROR: Failed to set up ddraw\n"); - return FALSE; - } - - if(!( hwnd = CreateBasicWindow() )) - { - printf("ERROR: Failed to create window\n"); - DirectDraw->Release(); - return FALSE; - } - - /* The Test */ - TEST ( DirectDraw->SetCooperativeLevel (NULL, DDSCL_FULLSCREEN) == DDERR_INVALIDPARAMS ); - TEST ( DirectDraw->SetCooperativeLevel (hwnd, DDSCL_FULLSCREEN) == DDERR_INVALIDPARAMS ); - - TEST ( DirectDraw->SetCooperativeLevel (hwnd, DDSCL_NORMAL) == DD_OK ); - TEST ( DirectDraw->Compact() == DDERR_NOEXCLUSIVEMODE ); - - - TEST ( DirectDraw->SetCooperativeLevel (NULL, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE) == DDERR_INVALIDPARAMS ); - TEST ( DirectDraw->SetCooperativeLevel (hwnd, DDSCL_FULLSCREEN) == DDERR_INVALIDPARAMS); - TEST ( DirectDraw->SetCooperativeLevel (hwnd, DDSCL_NORMAL | DDSCL_ALLOWMODEX) == DDERR_INVALIDPARAMS ); - TEST ( DirectDraw->SetCooperativeLevel ((HWND)0xdeadbeef, DDSCL_NORMAL) == DDERR_INVALIDPARAMS); - - TEST ( DirectDraw->SetCooperativeLevel (hwnd, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE) == DD_OK); - TEST ( DirectDraw->Compact() == DD_OK ); - TEST ( DirectDraw->SetCooperativeLevel (hwnd, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE | DDSCL_ALLOWMODEX) == DD_OK); - TEST ( DirectDraw->Compact() == DD_OK ); - TEST ( DirectDraw->SetCooperativeLevel (NULL, DDSCL_NORMAL) == DD_OK ); - TEST ( DirectDraw->Compact() == DDERR_NOEXCLUSIVEMODE ); - TEST ( DirectDraw->SetCooperativeLevel (hwnd, DDSCL_NORMAL) == DD_OK ); - TEST ( DirectDraw->Compact() == DDERR_NOEXCLUSIVEMODE ); - - TEST ( DirectDraw->TestCooperativeLevel() == DD_OK ); // I do not get what this API does it always seems to return DD_OK - - DirectDraw->Release(); - - return TRUE; -} - -BOOL Test_GetFourCCCodes (INT* passed, INT* failed) -{ - LPDIRECTDRAW7 DirectDraw; - - /* Preparations */ - if (DirectDrawCreateEx(NULL, (VOID**)&DirectDraw, IID_IDirectDraw7, NULL) != DD_OK) - { - printf("ERROR: Failed to set up ddraw\n"); - return FALSE; - } - - /* Here we go */ - DWORD dwNumCodes, *lpCodes; - TEST (DirectDraw->GetFourCCCodes(NULL, (PDWORD)0xdeadbeef) == DDERR_INVALIDPARAMS); - - TEST (DirectDraw->GetFourCCCodes(&dwNumCodes, NULL) == DD_OK && dwNumCodes); - lpCodes = (PDWORD)HeapAlloc(GetProcessHeap(), 0, sizeof(DWORD)*dwNumCodes); - *lpCodes = 0; - TEST ( DirectDraw->GetFourCCCodes(NULL, lpCodes) == DDERR_INVALIDPARAMS ); - TEST (DirectDraw->GetFourCCCodes(&dwNumCodes, lpCodes) == DD_OK && *lpCodes ); - - DirectDraw->Release(); - - return TRUE; -} - -BOOL Test_GetDeviceIdentifier (INT* passed, INT* failed) -{ - LPDIRECTDRAW7 DirectDraw; - DDDEVICEIDENTIFIER2 pDDDI; - //OLECHAR GuidStr[100]; - - /* Preparations */ - if (DirectDrawCreateEx(NULL, (VOID**)&DirectDraw, IID_IDirectDraw7, NULL) != DD_OK) - { - printf("ERROR: Failed to set up ddraw\n"); - return FALSE; - } - - TEST ( DirectDraw->GetDeviceIdentifier(NULL, 0) == DDERR_INVALIDPARAMS ); - TEST ( DirectDraw->GetDeviceIdentifier(NULL, ~DDGDI_GETHOSTIDENTIFIER) == DDERR_INVALIDPARAMS ); - TEST ( DirectDraw->GetDeviceIdentifier(NULL, DDGDI_GETHOSTIDENTIFIER) == DDERR_INVALIDPARAMS ); - - memset(&pDDDI,0,sizeof(DDDEVICEIDENTIFIER2)); - TEST ( DirectDraw->GetDeviceIdentifier(&pDDDI, 0) == DD_OK ); - -/* - StringFromGUID2(pDDDI.guidDeviceIdentifier, GuidStr, 100); - printf("1. \n"); - printf("szDriver : %s\n",pDDDI.szDriver); - printf("szDescription : %s\n",pDDDI.szDescription); - printf("liDriverVersion : 0x%08x . 0x%08x\n", pDDDI.liDriverVersion.HighPart, pDDDI.liDriverVersion.LowPart); - printf("dwVendorId : 0x%08x\n",pDDDI.dwVendorId); - printf("dwDeviceId : 0x%08x\n",pDDDI.dwDeviceId); - printf("dwSubSysId : 0x%08x\n",pDDDI.dwSubSysId); - printf("dwRevision : 0x%08x\n",pDDDI.dwRevision); - printf("guidDeviceIdentifier : %ls\n",GuidStr); - printf("dwWHQLLevel : 0x%08x\n",pDDDI.dwWHQLLevel); -*/ - - memset(&pDDDI,0,sizeof(DDDEVICEIDENTIFIER2)); - TEST ( DirectDraw->GetDeviceIdentifier(&pDDDI, DDGDI_GETHOSTIDENTIFIER) == DD_OK ); - memset(&pDDDI,0,sizeof(DDDEVICEIDENTIFIER2)); - TEST ( DirectDraw->GetDeviceIdentifier(&pDDDI, ~DDGDI_GETHOSTIDENTIFIER) == DDERR_INVALIDPARAMS ); - - DirectDraw->Release(); - - return TRUE; -} diff --git a/rostests/dxtest/ddraw/DDraw/display_modes.cpp b/rostests/dxtest/ddraw/DDraw/display_modes.cpp deleted file mode 100644 index 3143575dee0..00000000000 --- a/rostests/dxtest/ddraw/DDraw/display_modes.cpp +++ /dev/null @@ -1,127 +0,0 @@ -typedef struct -{ - INT* passed; - INT* failed; - LPDIRECTDRAW7 DirectDraw; -} ENUMCONTEXT; - -BOOL Test_GetMonitorFrequency (INT* passed, INT* failed); - -HRESULT CALLBACK DummyEnumDisplayModes( LPDDSURFACEDESC2 pDDSD, ENUMCONTEXT* Context ) -{ - return DDENUMRET_OK; -} - -HRESULT CALLBACK EnumDisplayModes( LPDDSURFACEDESC2 pDDSD, ENUMCONTEXT* Context ) -{ - static int setcout = 0; - if(setcout >= 5) - return DDENUMRET_OK; - - DWORD lpdwFrequency = 0; - INT* passed = Context->passed; - INT* failed = Context->failed; - DDSURFACEDESC2 DisplayMode = {0}; - DisplayMode.dwSize = sizeof(DDSURFACEDESC2); - - TEST ( pDDSD->dwFlags == (DDSD_HEIGHT | DDSD_WIDTH | DDSD_PITCH | DDSD_PIXELFORMAT | DDSD_REFRESHRATE)); - TEST ( pDDSD->ddpfPixelFormat.dwFlags == (DDPF_RGB | DDPF_PALETTEINDEXED8) || pDDSD->ddpfPixelFormat.dwFlags == DDPF_RGB ); - TEST ( Context->DirectDraw->SetDisplayMode (pDDSD->dwWidth, pDDSD->dwHeight, pDDSD->ddpfPixelFormat.dwRGBBitCount, pDDSD->dwRefreshRate, 0) == DD_OK); - TEST ( Context->DirectDraw->GetMonitorFrequency (&lpdwFrequency) == DD_OK && lpdwFrequency == pDDSD->dwRefreshRate); - TEST ( Context->DirectDraw->GetDisplayMode (&DisplayMode) == DD_OK - && pDDSD->dwHeight == DisplayMode.dwHeight - && pDDSD->dwWidth == DisplayMode.dwWidth - && pDDSD->dwRefreshRate == DisplayMode.dwRefreshRate - && pDDSD->ddpfPixelFormat.dwRGBBitCount == DisplayMode.ddpfPixelFormat.dwRGBBitCount - && DisplayMode.dwFlags == (DDSD_HEIGHT | DDSD_WIDTH | DDSD_PITCH | DDSD_PIXELFORMAT | DDSD_REFRESHRATE) ); - - setcout++; - return DDENUMRET_OK; -} - -BOOL Test_DisplayModes (INT* passed, INT* failed) -{ - /*** FIXME: Also test with surface as parameter; try busy/locked surface as well ***/ - LPDIRECTDRAW7 DirectDraw; - - /* Preparations */ - if (DirectDrawCreateEx(NULL, (VOID**)&DirectDraw, IID_IDirectDraw7, NULL) != DD_OK) - { - printf("ERROR: Failed to set up ddraw\n"); - return FALSE; - } - - ENUMCONTEXT Context = {passed, failed, DirectDraw}; - - /* The Test */ - - Test_GetMonitorFrequency(passed, failed); - - /* First try with some generic display modes */ - TEST ( DirectDraw->SetDisplayMode (1586, 895, 0, 0, 0) == DDERR_UNSUPPORTED ); - TEST ( DirectDraw->SetDisplayMode (0, 0, 0, 0, 0x123) == DDERR_INVALIDPARAMS ); - - // does this change the display mode to DDSCL_EXCLUSIVE ? - TEST ( DirectDraw->SetDisplayMode (0, 0, 0, 0, 0) == DD_OK ); - TEST ( DirectDraw->SetDisplayMode (800, 600, 0, 0, 0) == DD_OK ); - TEST ( DirectDraw->SetDisplayMode (0, 0, 16, 0, 0) == DD_OK ); - - TEST ( DirectDraw->GetDisplayMode (NULL) == DDERR_INVALIDPARAMS ); - DDSURFACEDESC2 DisplayMode = {0}; - TEST ( DirectDraw->GetDisplayMode (&DisplayMode) == DDERR_INVALIDPARAMS ); - - //* Now try getting vaild modes from drive */ - TEST (DirectDraw->EnumDisplayModes(DDEDM_STANDARDVGAMODES, NULL, (PVOID)&Context, NULL) == DDERR_INVALIDPARAMS); - TEST (DirectDraw->EnumDisplayModes(0, NULL, (PVOID)&Context, (LPDDENUMMODESCALLBACK2)DummyEnumDisplayModes) == DD_OK ); - TEST (DirectDraw->EnumDisplayModes(DDEDM_REFRESHRATES, NULL, (PVOID)&Context, (LPDDENUMMODESCALLBACK2)DummyEnumDisplayModes) == DD_OK ); - TEST (DirectDraw->EnumDisplayModes(DDEDM_STANDARDVGAMODES, NULL, (PVOID)&Context, (LPDDENUMMODESCALLBACK2)DummyEnumDisplayModes) == DD_OK ); - TEST (DirectDraw->EnumDisplayModes(DDEDM_STANDARDVGAMODES|DDEDM_REFRESHRATES, NULL, (PVOID)&Context, (LPDDENUMMODESCALLBACK2)EnumDisplayModes) == DD_OK); - - TEST (DirectDraw->RestoreDisplayMode() == DD_OK); - - DirectDraw->Release(); - - return TRUE; -} - -BOOL Test_GetMonitorFrequency (INT* passed, INT* failed) -{ - LPDIRECTDRAW7 DirectDraw; - LPDDRAWI_DIRECTDRAW_INT This; - - /* Preparations */ - if (DirectDrawCreateEx(NULL, (VOID**)&DirectDraw, IID_IDirectDraw7, NULL) != DD_OK) - { - printf("ERROR: Failed to set up ddraw\n"); - return FALSE; - } - This = (LPDDRAWI_DIRECTDRAW_INT)DirectDraw; - - /* Here we go */ - DWORD lpFreq; - DWORD temp; - HRESULT retVal; - TEST (DirectDraw->GetMonitorFrequency((PDWORD)0xdeadbeef) == DDERR_INVALIDPARAMS); - TEST (DirectDraw->GetMonitorFrequency(NULL) == DDERR_INVALIDPARAMS); - - // result depends on our graphices card - retVal = DirectDraw->GetMonitorFrequency((PDWORD)&lpFreq); - TEST ( retVal == DD_OK || retVal == DDERR_UNSUPPORTED); - - /* Test by hacking interal structures */ - - // should return DDERR_UNSUPPORTED - This->lpLcl->lpGbl->dwMonitorFrequency = 0; - TEST (DirectDraw->GetMonitorFrequency(&temp) == DDERR_UNSUPPORTED); - - // should return DD_OK - This->lpLcl->lpGbl->dwMonitorFrequency = 85; - TEST (DirectDraw->GetMonitorFrequency(&temp) == DD_OK); - - /* Restore */ - This->lpLcl->lpGbl->dwMonitorFrequency = lpFreq; - - DirectDraw->Release(); - - return TRUE; -} diff --git a/rostests/dxtest/ddraw/Surface/blt.cpp b/rostests/dxtest/ddraw/Surface/blt.cpp deleted file mode 100644 index 620641a4589..00000000000 --- a/rostests/dxtest/ddraw/Surface/blt.cpp +++ /dev/null @@ -1,157 +0,0 @@ - -DWORD GetPixel (LPDIRECTDRAWSURFACE7 Surface, UINT x, UINT y) -{ - DWORD ret; - RECT rect = {x, y, x+1, y+1}; - DDSURFACEDESC2 desc = {0}; - desc.dwSize = sizeof(DDSURFACEDESC2); - - if(Surface->Lock(&rect, &desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL)) - { - printf("ERROR: Unable to lock surface\n"); - return 0xdeadbeef; - } - - ret = *((DWORD *)desc.lpSurface); - - if(Surface->Unlock (&rect) != DD_OK) - { - printf("ERROR: Unable to unlock surface ?!\n"); - } - - return ret; -} - -VOID Blt_Test (LPDIRECTDRAWSURFACE7 Surface, INT* passed, INT* failed) -{ - LPDIRECTDRAWSURFACE7 Source; - if(!CreateSurface(&Source)) - return; - - // The following has been tested with Nvidea hardware - // the results might differently with other graphic - // card drivers. - mbosma - - // FIXME: Test Color Key (DDBLT_KEYDEST / DDBLT_KEYSRC / DDBLT_KEYDESTOVERRIDE / DDBLT_KEYSRCOVERRIDE) - - // General Tests - DDBLTFX bltfx; - TEST (Surface->Blt(NULL, NULL, NULL, 0, NULL) == DDERR_INVALIDPARAMS); - TEST (Surface->Blt(NULL, Surface, NULL, 0, NULL) == DD_OK ); // blting to itself - - TEST (Surface->Blt(NULL, NULL, NULL, DDBLT_WAIT|DDBLT_DDFX, &bltfx) == DDERR_INVALIDPARAMS); - bltfx.dwDDFX = DDBLTFX_NOTEARING; - TEST (Surface->Blt(NULL, NULL, NULL, DDBLT_WAIT|DDBLT_DDFX, &bltfx) == DDERR_INVALIDPARAMS); - bltfx.dwSize = sizeof(DDBLTFX); - TEST (Surface->Blt(NULL, NULL, NULL, DDBLT_WAIT, &bltfx) == DDERR_INVALIDPARAMS); - TEST (Surface->Blt(NULL, Source, NULL, DDBLT_WAIT|DDBLT_DDFX, &bltfx) == DD_OK); // don't know why this works on a offscreen surfaces - - // Test color filling - bltfx.dwFillColor = RGB(0, 255, 0); - TEST (Source->Blt(NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &bltfx) == DD_OK); - RECT rect = {100, 100, 200, 200}; - bltfx.dwFillColor = RGB(255, 255, 0); - TEST (Source->Blt(&rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &bltfx) == DD_OK); - TEST (GetPixel(Source, 0, 0) == RGB(0, 255, 0)); - TEST (GetPixel(Source, 100, 100) == RGB(255, 255, 0)); - - // Test DestRect and SrcRect - RECT SourceRect = {100, 100, 200, 200}; - RECT DestRect = {0, 0, 200, 100}; - - TEST (Surface->Blt(&SourceRect, Source, &DestRect, 0, NULL) == DD_OK); - TEST (GetPixel(Surface, 100, 100) == RGB(0, 255, 0)); // Src bigger: normal blt - - TEST (Surface->Blt(&DestRect, Source, &SourceRect, 0, NULL) == DD_OK); - TEST (GetPixel(Surface, 0, 0) == 0x00ffbf); // Dest bigger: wtf ?? - - DestRect.right = 100; // both are same size now - TEST (Surface->Blt(&DestRect, Source, &SourceRect, 0, NULL) == DD_OK); - TEST (GetPixel(Surface, 0, 0) == RGB(255, 255, 0)); - - RECT TooBig = {100, 100, 200, 250}; - TEST (Surface->Blt(&TooBig, Source, &SourceRect, 0, NULL) == DDERR_INVALIDRECT); - TEST (Surface->Blt(&DestRect, Source, &TooBig, 0, NULL) == DDERR_INVALIDRECT); - - // Test Rotation - bltfx.dwDDFX = DDBLTFX_MIRRORLEFTRIGHT|DDBLTFX_MIRRORUPDOWN; - TEST (Surface->Blt(NULL, Source, NULL, DDBLT_WAIT|DDBLT_DDFX, &bltfx) == DD_OK); - TEST (GetPixel(Surface, 0, 0) == RGB(255, 255, 0)); - - bltfx.dwDDFX = DDBLTFX_ROTATE180; - TEST (Surface->Blt(NULL, Source, NULL, DDBLT_DDFX, &bltfx) == DDERR_NOROTATIONHW); - - //bltfx.dwRotationAngle = - TEST (Surface->Blt(NULL, Source, NULL, DDBLT_ROTATIONANGLE, &bltfx) == DDERR_NOROTATIONHW); - - // Test Raster Operations - bltfx.dwROP = BLACKNESS; - TEST (Surface->Blt(NULL, Source, NULL, DDBLT_WAIT|DDBLT_ROP, &bltfx) == DD_OK); - TEST(GetPixel(Surface, 0, 0) == RGB(0, 0, 0)); - bltfx.dwROP = WHITENESS; - TEST (Surface->Blt(NULL, Source, NULL, DDBLT_WAIT|DDBLT_ROP, &bltfx) == DD_OK); - TEST(GetPixel(Surface, 0, 0) == RGB(255, 255, 255)); - bltfx.dwROP = SRCCOPY; // this flag actually does nothing - TEST (Surface->Blt(NULL, Source, NULL, DDBLT_WAIT|DDBLT_ROP, &bltfx) == DD_OK); - TEST(GetPixel(Surface, 0, 0) == RGB(0, 255, 0)); - bltfx.dwROP = SRCAND; - TEST (Surface->Blt(NULL, Source, NULL, DDBLT_WAIT|DDBLT_ROP, &bltfx) == DDERR_NORASTEROPHW); - - // Test Direct Draw Raster Operations - bltfx.dwDDROP = 0x123; - TEST (Surface->Blt(NULL, Source, NULL, DDBLT_WAIT|DDBLT_DDROPS, &bltfx) == DDERR_NODDROPSHW); - - // Streching - bltfx.dwDDFX = DDBLTFX_ARITHSTRETCHY; - TEST (Surface->Blt(NULL, Source, NULL, DDBLT_WAIT|DDBLT_DDFX, &bltfx) == DDERR_NOSTRETCHHW); -} - -VOID GetBltStatus_Test (LPDIRECTDRAWSURFACE7 Surface, INT* passed, INT* failed) -{ - TEST (Surface->GetBltStatus(0) == DDERR_INVALIDPARAMS); - TEST (Surface->GetBltStatus(DDGBS_CANBLT) == DD_OK); - //TEST (Surface->GetBltStatus(DDGBS_ISBLTDONE) == DD_OK); - - // Lock Surface - DDSURFACEDESC2 desc = {0}; - desc.dwSize = sizeof(DDSURFACEDESC2); - Surface->Lock(NULL, &desc, DDLOCK_WAIT, NULL); - TEST (Surface->GetBltStatus(DDGBS_ISBLTDONE) == DD_OK); - TEST (Surface->GetBltStatus(DDGBS_CANBLT) == DD_OK); // does not return DDERR_SURFACEBUSY for me as msdn says (xp,nvidea) - Surface->Unlock (NULL); - - // Try to produce busy surface by filling it 500 times - DDBLTFX bltfx; - bltfx.dwSize = sizeof(DDBLTFX); - bltfx.dwFillColor = RGB(0, 0, 0); - - int i; - for(i=0; i<500; i++) - Surface->Blt(NULL, NULL, NULL, DDBLT_COLORFILL, &bltfx); - - TEST (Surface->GetBltStatus(DDGBS_ISBLTDONE) == DDERR_WASSTILLDRAWING); - TEST (Surface->GetBltStatus(DDGBS_CANBLT) == DD_OK); -} - -BOOL Test_Blt (INT* passed, INT* failed) -{ - LPDIRECTDRAWSURFACE7 Surface; - if(!CreateSurface(&Surface)) - return FALSE; - - // Test GetPixel (needs Lock API) - DDBLTFX bltfx; - bltfx.dwSize = sizeof(DDBLTFX); - bltfx.dwFillColor = RGB(0, 0, 0); - Surface->Blt(NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &bltfx); - if(GetPixel(Surface, 0, 0) != RGB(0, 0, 0)) - return FALSE; - - // The tests - TEST(Surface->BltBatch(NULL, 0, 0) == DDERR_UNSUPPORTED); - Blt_Test (Surface, passed, failed); - GetBltStatus_Test (Surface, passed, failed); - - Surface->Release(); - return TRUE; -} diff --git a/rostests/dxtest/ddraw/Surface/caps_tests.h b/rostests/dxtest/ddraw/Surface/caps_tests.h deleted file mode 100644 index 0a1394f6582..00000000000 --- a/rostests/dxtest/ddraw/Surface/caps_tests.h +++ /dev/null @@ -1,2311 +0,0 @@ -/* - * The following test cases have been generated automatically. Many of them might be - * redundant. Also some of them might fail on other other machines then the one I - * used (win xp, nvidea, 32 bit color deepth) - mbosma - * - */ - -TEST(TestCaps("0", 0x0, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OFFSCREENPLAIN", 0x40, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OVERLAY", 0x80, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_PRIMARYSURFACE", 0x200, DD_OK, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_SYSTEMMEMORY", 0x800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0xa00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_TEXTURE", 0x1000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE", 0x2000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN", 0x2040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY", 0x2080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE", 0x2200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY", 0x2800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x2840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_TEXTURE", 0x3000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_VIDEOMEMORY", 0x4000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x4040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x4080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x4200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x5000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY", 0x6000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x6040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x6080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x6200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x7000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x40800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x40840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x40880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x40a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x41800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x42800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x42840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x42880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x42a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x43800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO", 0x80000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN", 0x80040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY", 0x80080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE", 0x80200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY", 0x80800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x80840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x80880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x80a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE", 0x81000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x81800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO", 0x82000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN", 0x82040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY", 0x82080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE", 0x82200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY", 0x82800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x82840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x82880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x82a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE", 0x83000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x83800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_VIDEOMEMORY", 0x84000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x84040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x84080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x84200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x85000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_VIDEOMEMORY", 0x86000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x86040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x86080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x86200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x87000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0xc0800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0xc0840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0xc0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0xc0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0xc1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0xc2800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0xc2840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0xc2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0xc2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0xc3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC", 0x100000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN", 0x100040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY", 0x100080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE", 0x100200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_SYSTEMMEMORY", 0x100800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x100840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x100880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x100a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_TEXTURE", 0x101000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x101800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC", 0x102000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN", 0x102040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY", 0x102080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE", 0x102200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_SYSTEMMEMORY", 0x102800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x102840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x102880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x102a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_TEXTURE", 0x103000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x103800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_VIDEOMEMORY", 0x104000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x104040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x104080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x104200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x105000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_VIDEOMEMORY", 0x106000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x106040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x106080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x106200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x107000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x140800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x140840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x140880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x140a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x141800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x142800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x142840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x142880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x142a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x143800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO", 0x180000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN", 0x180040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY", 0x180080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE", 0x180200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY", 0x180800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x180840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x180880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x180a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE", 0x181000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x181800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO", 0x182000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN", 0x182040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY", 0x182080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE", 0x182200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY", 0x182800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x182840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x182880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x182a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE", 0x183000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x183800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_VIDEOMEMORY", 0x184000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x184040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x184080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x184200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x185000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_VIDEOMEMORY", 0x186000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x186040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x186080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x186200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x187000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x1c0800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x1c0840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x1c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x1c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x1c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x1c2800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x1c2840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x1c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x1c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x1c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX", 0x200000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN", 0x200040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY", 0x200080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE", 0x200200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY", 0x200800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x200840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x200880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x200a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x201000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x201800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX", 0x202000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN", 0x202040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY", 0x202080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE", 0x202200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY", 0x202800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x202840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x202880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x202a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x203000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x203800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x204000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x204040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x204080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x204200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x205000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x206000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x206040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x206080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x206200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x207000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x240800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x240840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x240880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x240a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x241800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x242800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x242840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x242880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x242a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x243800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX", 0x280000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN", 0x280040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY", 0x280080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE", 0x280200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY", 0x280800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x280840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x280880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x280a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x281000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x281800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX", 0x282000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN", 0x282040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY", 0x282080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE", 0x282200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY", 0x282800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x282840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x282880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x282a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x283000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x283800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x284000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x284040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x284080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x284200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x285000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x286000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x286040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x286080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x286200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x287000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x2c0800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x2c0840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x2c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x2c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x2c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x2c2800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x2c2840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x2c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x2c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x2c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX", 0x300000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN", 0x300040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY", 0x300080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE", 0x300200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY", 0x300800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x300840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x300880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x300a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x301000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x301800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX", 0x302000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN", 0x302040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY", 0x302080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE", 0x302200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY", 0x302800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x302840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x302880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x302a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x303000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x303800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x304000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x304040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x304080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x304200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x305000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x306000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x306040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x306080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x306200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x307000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x340800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x340840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x340880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x340a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x341800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x342800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x342840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x342880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x342a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x343800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX", 0x380000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN", 0x380040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY", 0x380080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE", 0x380200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY", 0x380800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x380840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x380880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x380a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x381000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x381800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX", 0x382000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN", 0x382040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY", 0x382080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE", 0x382200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY", 0x382800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x382840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x382880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x382a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x383000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x383800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x384000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x384040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x384080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x384200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x385000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x386000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x386040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x386080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x386200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x387000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x3c0800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x3c0840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x3c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x3c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x3c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x3c2800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x3c2840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x3c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x3c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x3c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_TEXTURE", 0x4001000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4001800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_TEXTURE", 0x4003000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4003800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4005000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4007000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4041800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4043800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE", 0x4081000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4081800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE", 0x4083000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4083800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4085000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4087000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_TEXTURE", 0x4101000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4101800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_TEXTURE", 0x4103000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4103800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4105000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4107000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4141800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4143800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE", 0x4181000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4181800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE", 0x4183000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4183800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4185000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4187000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x41c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x41c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x4201000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4201800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x4203000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4203800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4205000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4207000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4241800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4243800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x4281000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4281800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x4283000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4283800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4285000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4287000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x42c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x42c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x4301000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4301800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x4303000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4303800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4305000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4307000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4341800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4343800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x4381000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4381800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x4383000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4383800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4385000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4387000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x43c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x43c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_VIDEOPORT", 0x8000000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8000040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8000080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8000200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8000800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8000840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8000880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8000a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8001000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8001800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_VIDEOPORT", 0x8002000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8002040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8002080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8002200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8002800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8002840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8002880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8002a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8003000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8003800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8004000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8004040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8004080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8004200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8005000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8006000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8006040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8006080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8006200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8007000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8040800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8040840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8040880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8040a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8041800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8042800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8042840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8042880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8042a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8043800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_VIDEOPORT", 0x8080000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8080040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8080080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8080200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8080800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8080840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8080880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8080a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8081000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8081800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_VIDEOPORT", 0x8082000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8082040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8082080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8082200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8082800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8082840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8082880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8082a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8083000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8083800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8084000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8084040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8084080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8084200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8085000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8086000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8086040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8086080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8086200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8087000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x80c0800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x80c0840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x80c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x80c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x80c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x80c2800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x80c2840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x80c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x80c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x80c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_VIDEOPORT", 0x8100000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8100040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8100080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8100200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8100800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8100840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8100880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8100a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8101000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8101800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_VIDEOPORT", 0x8102000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8102040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8102080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8102200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8102800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8102840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8102880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8102a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8103000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8103800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8104000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8104040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8104080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8104200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8105000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8106000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8106040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8106080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8106200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8107000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8140800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8140840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8140880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8140a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8141800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8142800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8142840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8142880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8142a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8143800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_VIDEOPORT", 0x8180000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8180040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8180080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8180200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8180800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8180840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8180880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8180a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8181000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8181800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_VIDEOPORT", 0x8182000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8182040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8182080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8182200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8182800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8182840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8182880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8182a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8183000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8183800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8184000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8184040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8184080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8184200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8185000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8186000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8186040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8186080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8186200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8187000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x81c0800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x81c0840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x81c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x81c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x81c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x81c2800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x81c2840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x81c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x81c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x81c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_VIDEOPORT", 0x8200000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8200040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8200080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8200200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8200800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8200840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8200880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8200a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8201000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8201800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_VIDEOPORT", 0x8202000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8202040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8202080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8202200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8202800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8202840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8202880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8202a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8203000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8203800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8204000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8204040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8204080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8204200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8205000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8206000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8206040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8206080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8206200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8207000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8240800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8240840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8240880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8240a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8241800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8242800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8242840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8242880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8242a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8243800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_VIDEOPORT", 0x8280000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8280040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8280080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8280200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8280800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8280840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8280880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8280a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8281000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8281800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_VIDEOPORT", 0x8282000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8282040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8282080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8282200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8282800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8282840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8282880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8282a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8283000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8283800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8284000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8284040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8284080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8284200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8285000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8286000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8286040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8286080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8286200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8287000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x82c0800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x82c0840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x82c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x82c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x82c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x82c2800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x82c2840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x82c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x82c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x82c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_VIDEOPORT", 0x8300000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8300040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8300080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8300200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8300800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8300840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8300880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8300a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8301000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8301800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_VIDEOPORT", 0x8302000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8302040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8302080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8302200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8302800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8302840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8302880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8302a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8303000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8303800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8304000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8304040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8304080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8304200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8305000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8306000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8306040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8306080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8306200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8307000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8340800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8340840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8340880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8340a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8341800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8342800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8342840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8342880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8342a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8343800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_VIDEOPORT", 0x8380000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8380040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8380080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8380200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8380800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8380840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8380880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8380a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8381000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8381800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_VIDEOPORT", 0x8382000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8382040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8382080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8382200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8382800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8382840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8382880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8382a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8383000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8383800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8384000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8384040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8384080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8384200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8385000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8386000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8386040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8386080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8386200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8387000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x83c0800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x83c0840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x83c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x83c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x83c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x83c2800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x83c2840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x83c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x83c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x83c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc001000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc001800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc003000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc003800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc005000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc007000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc041800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc043800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc081000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc081800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc083000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc083800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc085000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc087000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc0c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc0c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc101000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc101800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc103000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc103800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc105000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc107000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc141800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc143800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc181000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc181800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc183000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc183800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc185000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc187000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc1c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc1c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc201000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc201800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc203000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc203800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc205000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc207000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc241800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc243800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc281000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc281800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc283000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc283800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc285000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc287000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc2c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc2c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc301000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc301800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc303000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc303800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc305000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc307000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc341800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc343800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc381000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc381800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc383000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc383800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc385000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc387000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc3c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc3c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x10004000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10004040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10004080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10004200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10005000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x10006000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10006040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10006080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10006200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10007000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x10084000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10084040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10084080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10084200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10085000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x10086000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10086040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10086080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10086200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10087000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x10104000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10104040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10104080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10104200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10105000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x10106000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10106040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10106080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10106200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10107000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x10184000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10184040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10184080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10184200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10185000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x10186000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10186040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10186080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10186200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10187000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x10204000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10204040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10204080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10204200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10205000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x10206000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10206040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10206080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10206200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10207000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x10284000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10284040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10284080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10284200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10285000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x10286000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10286040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10286080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10286200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10287000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x10304000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10304040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10304080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10304200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10305000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x10306000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10306040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10306080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10306200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10307000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x10384000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10384040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10384080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10384200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10385000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x10386000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10386040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10386080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10386200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10387000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14005000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14007000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14085000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14087000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14105000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14107000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14185000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14187000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14205000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14207000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14285000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14287000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14305000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14307000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14385000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14387000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18004000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18004040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18004080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18004200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18005000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18006000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18006040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18006080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18006200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18007000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18084000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18084040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18084080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18084200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18085000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18086000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18086040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18086080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18086200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18087000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18104000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18104040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18104080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18104200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18105000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18106000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18106040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18106080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18106200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18107000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18184000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18184040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18184080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18184200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18185000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18186000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18186040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18186080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18186200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18187000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18204000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18204040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18204080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18204200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18205000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18206000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18206040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18206080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18206200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18207000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18284000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18284040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18284080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18284200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18285000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18286000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18286040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18286080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18286200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18287000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18304000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18304040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18304080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18304200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18305000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18306000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18306040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18306080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18306200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18307000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18384000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18384040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18384080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18384200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18385000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18386000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18386040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18386080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18386200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18387000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c005000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c007000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c085000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c087000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c105000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c107000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c185000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c187000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c205000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c207000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c285000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c287000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c305000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c307000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c385000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c387000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20004000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20004040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20004080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20004200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20005000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20006000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20006040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20006080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20006200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20007000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20084000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20084040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20084080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20084200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20085000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20086000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20086040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20086080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20086200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20087000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20104000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20104040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20104080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20104200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20105000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20106000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20106040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20106080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20106200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20107000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20184000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20184040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20184080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20184200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20185000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20186000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20186040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20186080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20186200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20187000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20204000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20204040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20204080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20204200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20205000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20206000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20206040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20206080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20206200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20207000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20284000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20284040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20284080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20284200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20285000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20286000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20286040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20286080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20286200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20287000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20304000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20304040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20304080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20304200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20305000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20306000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20306040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20306080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20306200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20307000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20384000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20384040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20384080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20384200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20385000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20386000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20386040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20386080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20386200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20387000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24005000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24007000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24085000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24087000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24105000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24107000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24185000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24187000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24205000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24207000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24285000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24287000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24305000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24307000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24385000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24387000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28004000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28004040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28004080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28004200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28005000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28006000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28006040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28006080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28006200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28007000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28084000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28084040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28084080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28084200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28085000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28086000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28086040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28086080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28086200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28087000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28104000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28104040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28104080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28104200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28105000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28106000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28106040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28106080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28106200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28107000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28184000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28184040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28184080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28184200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28185000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28186000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28186040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28186080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28186200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28187000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28204000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28204040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28204080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28204200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28205000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28206000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28206040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28206080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28206200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28207000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28284000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28284040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28284080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28284200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28285000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28286000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28286040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28286080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28286200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28287000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28304000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28304040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28304080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28304200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28305000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28306000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28306040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28306080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28306200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28307000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28384000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28384040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28384080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28384200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28385000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28386000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28386040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28386080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28386200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28387000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c005000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c007000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c085000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c087000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c105000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c107000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c185000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c187000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c205000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c207000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c285000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c287000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c305000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c307000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c385000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c387000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_STANDARDVGAMODE", 0x40000000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40000040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40000080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40000200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40000800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40000840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40000880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40000a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40001000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40001800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_STANDARDVGAMODE", 0x40002000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40002040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40002080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40002200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40002800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40002840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40002880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40002a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40003000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40003800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40004000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40004040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40004080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40004200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40005000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40006000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40006040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40006080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40006200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40007000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40040800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40040840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40040880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40040a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40041800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40042800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40042840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40042880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40042a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40043800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE", 0x40080000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40080040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40080080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40080200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40080800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40080840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40080880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40080a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40081000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40081800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE", 0x40082000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40082040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40082080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40082200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40082800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40082840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40082880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40082a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40083000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40083800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40084000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40084040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40084080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40084200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40085000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40086000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40086040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40086080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40086200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40087000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x400c0800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x400c0840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x400c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x400c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x400c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x400c2800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x400c2840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x400c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x400c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x400c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE", 0x40100000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40100040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40100080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40100200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40100800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40100840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40100880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40100a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40101000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40101800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE", 0x40102000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40102040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40102080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40102200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40102800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40102840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40102880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40102a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40103000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40103800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40104000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40104040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40104080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40104200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40105000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40106000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40106040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40106080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40106200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40107000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40140800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40140840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40140880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40140a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40141800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40142800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40142840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40142880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40142a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40143800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE", 0x40180000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40180040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40180080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40180200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40180800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40180840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40180880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40180a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40181000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40181800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE", 0x40182000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40182040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40182080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40182200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40182800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40182840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40182880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40182a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40183000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40183800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40184000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40184040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40184080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40184200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40185000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40186000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40186040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40186080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40186200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40187000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x401c0800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x401c0840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x401c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x401c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x401c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x401c2800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x401c2840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x401c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x401c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x401c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE", 0x40200000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40200040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40200080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40200200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40200800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40200840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40200880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40200a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40201000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40201800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE", 0x40202000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40202040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40202080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40202200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40202800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40202840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40202880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40202a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40203000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40203800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40204000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40204040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40204080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40204200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40205000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40206000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40206040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40206080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40206200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40207000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40240800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40240840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40240880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40240a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40241800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40242800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40242840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40242880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40242a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40243800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE", 0x40280000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40280040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40280080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40280200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40280800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40280840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40280880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40280a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40281000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40281800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE", 0x40282000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40282040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40282080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40282200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40282800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40282840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40282880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40282a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40283000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40283800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40284000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40284040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40284080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40284200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40285000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40286000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40286040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40286080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40286200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40287000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x402c0800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x402c0840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x402c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x402c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x402c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x402c2800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x402c2840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x402c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x402c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x402c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE", 0x40300000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40300040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40300080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40300200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40300800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40300840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40300880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40300a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40301000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40301800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE", 0x40302000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40302040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40302080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40302200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40302800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40302840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40302880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40302a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40303000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40303800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40304000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40304040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40304080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40304200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40305000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40306000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40306040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40306080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40306200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40307000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40340800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40340840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40340880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40340a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40341800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40342800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40342840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40342880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40342a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40343800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE", 0x40380000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40380040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40380080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40380200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40380800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40380840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40380880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40380a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40381000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40381800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE", 0x40382000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40382040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40382080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40382200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40382800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40382840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40382880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40382a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40383000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40383800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40384000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40384040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40384080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40384200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40385000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40386000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40386040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40386080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40386200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40387000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x403c0800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x403c0840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x403c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x403c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x403c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x403c2800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x403c2840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x403c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x403c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x403c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44001000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44001800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44003000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44003800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44005000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44007000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44041800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44043800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44081000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44081800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44083000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44083800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44085000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44087000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x440c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x440c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44101000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44101800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44103000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44103800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44105000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44107000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44141800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44143800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44181000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44181800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44183000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44183800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44185000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44187000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x441c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x441c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44201000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44201800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44203000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44203800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44205000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44207000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44241800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44243800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44281000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44281800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44283000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44283800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44285000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44287000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x442c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x442c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44301000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44301800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44303000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44303800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44305000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44307000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44341800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44343800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44381000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44381800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44383000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44383800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44385000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44387000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x443c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x443c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48000000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48000040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48000080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48000200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48000800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48000840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48000880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48000a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48001000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48001800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48002000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48002040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48002080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48002200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48002800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48002840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48002880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48002a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48003000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48003800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48004000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48004040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48004080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48004200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48005000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48006000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48006040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48006080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48006200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48007000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48040800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48040840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48040880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48040a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48041800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48042800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48042840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48042880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48042a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48043800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48080000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48080040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48080080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48080200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48080800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48080840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48080880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48080a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48081000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48081800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48082000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48082040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48082080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48082200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48082800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48082840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48082880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48082a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48083000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48083800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48084000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48084040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48084080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48084200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48085000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48086000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48086040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48086080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48086200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48087000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x480c0800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x480c0840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x480c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x480c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x480c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x480c2800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x480c2840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x480c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x480c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x480c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48100000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48100040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48100080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48100200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48100800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48100840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48100880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48100a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48101000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48101800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48102000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48102040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48102080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48102200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48102800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48102840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48102880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48102a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48103000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48103800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48104000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48104040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48104080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48104200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48105000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48106000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48106040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48106080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48106200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48107000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48140800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48140840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48140880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48140a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48141800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48142800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48142840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48142880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48142a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48143800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48180000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48180040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48180080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48180200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48180800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48180840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48180880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48180a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48181000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48181800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48182000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48182040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48182080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48182200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48182800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48182840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48182880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48182a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48183000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48183800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48184000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48184040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48184080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48184200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48185000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48186000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48186040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48186080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48186200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48187000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x481c0800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x481c0840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x481c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x481c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x481c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x481c2800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x481c2840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x481c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x481c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x481c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48200000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48200040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48200080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48200200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48200800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48200840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48200880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48200a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48201000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48201800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48202000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48202040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48202080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48202200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48202800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48202840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48202880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48202a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48203000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48203800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48204000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48204040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48204080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48204200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48205000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48206000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48206040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48206080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48206200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48207000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48240800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48240840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48240880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48240a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48241800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48242800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48242840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48242880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48242a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48243800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48280000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48280040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48280080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48280200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48280800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48280840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48280880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48280a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48281000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48281800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48282000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48282040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48282080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48282200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48282800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48282840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48282880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48282a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48283000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48283800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48284000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48284040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48284080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48284200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48285000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48286000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48286040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48286080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48286200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48287000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x482c0800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x482c0840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x482c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x482c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x482c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x482c2800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x482c2840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x482c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x482c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x482c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48300000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48300040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48300080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48300200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48300800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48300840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48300880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48300a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48301000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48301800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48302000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48302040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48302080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48302200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48302800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48302840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48302880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48302a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48303000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48303800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48304000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48304040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48304080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48304200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48305000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48306000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48306040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48306080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48306200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48307000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48340800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48340840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48340880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48340a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48341800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48342800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48342840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48342880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48342a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48343800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48380000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48380040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48380080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48380200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48380800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48380840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48380880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48380a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48381000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48381800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48382000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48382040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48382080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48382200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48382800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48382840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48382880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48382a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48383000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48383800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48384000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48384040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48384080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48384200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48385000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48386000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48386040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48386080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48386200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48387000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x483c0800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x483c0840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x483c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x483c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x483c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x483c2800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x483c2840, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x483c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x483c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x483c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c001000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c001800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c003000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c003800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c005000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c007000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c041800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c043800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c081000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c081800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c083000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c083800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c085000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c087000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c0c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c0c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c101000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c101800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c103000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c103800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c105000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c107000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c141800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c143800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c181000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c181800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c183000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c183800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c185000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c187000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c1c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c1c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c201000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c201800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c203000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c203800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c205000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c207000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c241800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c243800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c281000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c281800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c283000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c283800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c285000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c287000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c2c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c2c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c301000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c301800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c303000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c303800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c305000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c307000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c341800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c343800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c381000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c381800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c383000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c383800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c385000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c387000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c3c1800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c3c3800, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50004000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50004040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50004080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50004200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50005000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50006000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50006040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50006080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50006200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50007000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50084000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50084040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50084080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50084200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50085000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50086000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50086040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50086080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50086200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50087000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50104000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50104040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50104080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50104200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50105000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50106000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50106040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50106080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50106200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50107000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50184000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50184040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50184080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50184200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50185000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50186000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50186040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50186080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50186200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50187000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50204000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50204040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50204080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50204200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50205000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50206000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50206040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50206080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50206200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50207000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50284000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50284040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50284080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50284200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50285000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50286000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50286040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50286080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50286200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50287000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50304000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50304040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50304080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50304200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50305000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50306000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50306040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50306080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50306200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50307000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50384000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50384040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50384080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50384200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50385000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50386000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50386040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50386080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50386200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50387000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54005000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54007000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54085000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54087000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54105000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54107000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54185000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54187000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54205000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54207000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54285000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54287000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54305000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54307000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54385000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54387000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58004000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58004040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58004080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58004200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58005000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58006000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58006040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58006080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58006200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58007000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58084000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58084040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58084080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58084200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58085000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58086000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58086040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58086080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58086200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58087000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58104000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58104040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58104080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58104200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58105000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58106000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58106040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58106080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58106200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58107000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58184000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58184040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58184080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58184200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58185000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58186000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58186040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58186080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58186200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58187000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58204000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58204040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58204080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58204200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58205000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58206000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58206040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58206080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58206200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58207000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58284000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58284040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58284080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58284200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58285000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58286000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58286040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58286080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58286200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58287000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58304000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58304040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58304080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58304200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58305000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58306000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58306040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58306080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58306200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58307000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58384000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58384040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58384080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58384200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58385000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58386000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58386040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58386080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58386200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58387000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c005000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c007000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c085000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c087000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c105000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c107000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c185000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c187000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c205000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c207000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c285000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c287000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c305000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c307000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c385000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c387000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60004000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60004040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60004080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60004200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60005000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60006000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60006040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60006080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60006200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60007000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60084000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60084040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60084080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60084200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60085000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60086000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60086040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60086080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60086200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60087000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60104000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60104040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60104080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60104200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60105000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60106000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60106040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60106080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60106200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60107000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60184000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60184040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60184080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60184200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60185000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60186000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60186040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60186080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60186200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60187000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60204000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60204040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60204080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60204200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60205000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60206000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60206040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60206080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60206200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60207000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60284000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60284040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60284080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60284200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60285000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60286000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60286040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60286080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60286200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60287000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60304000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60304040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60304080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60304200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60305000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60306000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60306040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60306080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60306200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60307000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60384000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60384040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60384080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60384200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60385000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60386000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60386040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60386080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60386200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60387000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64005000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64007000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64085000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64087000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64105000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64107000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64185000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64187000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64205000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64207000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64285000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64287000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64305000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64307000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64385000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64387000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68004000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68004040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68004080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68004200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68005000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68006000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68006040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68006080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68006200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68007000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68084000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68084040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68084080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68084200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68085000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68086000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68086040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68086080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68086200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68087000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68104000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68104040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68104080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68104200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68105000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68106000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68106040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68106080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68106200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68107000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68184000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68184040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68184080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68184200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68185000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68186000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68186040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68186080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68186200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68187000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68204000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68204040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68204080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68204200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68205000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68206000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68206040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68206080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68206200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68207000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68284000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68284040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68284080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68284200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68285000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68286000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68286040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68286080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68286200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68287000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68304000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68304040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68304080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68304200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68305000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68306000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68306040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68306080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68306200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68307000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68384000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68384040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68384080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68384200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68385000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68386000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68386040, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68386080, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68386200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68387000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c005000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c007000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c085000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c087000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c105000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c107000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c185000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c187000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c205000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c207000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c285000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c287000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c305000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c307000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c385000, DDERR_INVALIDPARAMS, DD_OK)); -TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c387000, DDERR_INVALIDPARAMS, DD_OK)); diff --git a/rostests/dxtest/ddraw/Surface/create.cpp b/rostests/dxtest/ddraw/Surface/create.cpp deleted file mode 100644 index 14c33346e93..00000000000 --- a/rostests/dxtest/ddraw/Surface/create.cpp +++ /dev/null @@ -1,71 +0,0 @@ -HWND CreateBasicWindow (VOID); - -LPDIRECTDRAW7 DirectDraw; - -BOOL TestCaps (const char* dummy, DWORD Caps, HRESULT test1, HRESULT test2) -{ - LPDIRECTDRAWSURFACE7 Surface = NULL; - DDSURFACEDESC2 Desc = { 0 }; - Desc.dwHeight = 200; - Desc.dwWidth = 200; - Desc.dwSize = sizeof (DDSURFACEDESC2); - Desc.ddsCaps.dwCaps = Caps; - - Desc.dwFlags = DDSD_CAPS; - BOOL ret = DirectDraw->CreateSurface(&Desc, &Surface, NULL) == test1; - - Desc.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH; - ret = ret && DirectDraw->CreateSurface(&Desc, &Surface, NULL) == test2; - - if ( Surface ) - Surface->Release(); - - return ret; -} - -BOOL Test_CreateSurface (INT* passed, INT* failed) -{ - LPDIRECTDRAWSURFACE7 Surface = NULL; - HWND hwnd; - - /* Preparations */ - if (DirectDrawCreateEx(NULL, (VOID**)&DirectDraw, IID_IDirectDraw7, NULL) != DD_OK) - { - printf("ERROR: Failed to set up ddraw\n"); - return FALSE; - } - - TEST ( DirectDraw->CreateSurface(NULL, NULL, NULL) == DDERR_NOCOOPERATIVELEVELSET); - - if(!( hwnd = CreateBasicWindow() )) - { - printf("ERROR: Failed to create window\n"); - DirectDraw->Release(); - return FALSE; - } - - if (DirectDraw->SetCooperativeLevel (hwnd, DDSCL_NORMAL) != DD_OK) - { - printf("ERROR: Could not set cooperative level\n"); - DirectDraw->Release(); - return 0; - } - - /* The Test */ - DDSURFACEDESC2 Desc = { 0 }; - Desc.dwSize = sizeof (DDSURFACEDESC2); - Desc.dwHeight = 200; - Desc.dwWidth = 200; - - TEST ( DirectDraw->CreateSurface(&Desc, &Surface, (IUnknown*)0xdeadbeef) == CLASS_E_NOAGGREGATION ); - TEST ( DirectDraw->CreateSurface(NULL, &Surface, NULL) == DDERR_INVALIDPARAMS ); - TEST ( DirectDraw->CreateSurface(&Desc, NULL, NULL) == DDERR_INVALIDPARAMS ); - TEST ( DirectDraw->CreateSurface(&Desc, &Surface, NULL) == DDERR_INVALIDPARAMS ); - - // Test (nearly) all possible cap combinations - #include "caps_tests.h" - - DirectDraw->Release(); - - return TRUE; -} diff --git a/rostests/dxtest/ddraw/Surface/misc.cpp b/rostests/dxtest/ddraw/Surface/misc.cpp deleted file mode 100644 index 0c323db0b64..00000000000 --- a/rostests/dxtest/ddraw/Surface/misc.cpp +++ /dev/null @@ -1,64 +0,0 @@ -BOOL CreateSurface(LPDIRECTDRAWSURFACE7* pSurface); - -BOOL Test_Misc (INT* passed, INT* failed) -{ - LPDIRECTDRAWSURFACE7 Surface; - if(!CreateSurface(&Surface)) - return FALSE; - - TEST (Surface->Initialize(NULL, NULL) == DDERR_ALREADYINITIALIZED); - - // GetCaps - DDSCAPS2 Caps; - TEST (Surface->GetCaps((DDSCAPS2*)0xdeadbeef) == DDERR_INVALIDPARAMS); - TEST (Surface->GetCaps(&Caps) == DD_OK && Caps.dwCaps == 0x10004040 - && Caps.dwCaps2 == 0 && Caps.dwCaps3 == 0 && Caps.dwCaps4 == 0); // FIXME: Replace 0x10004040 - - // GetDC / ReleaseDC - HDC hdc; - TEST (Surface->GetDC((HDC*)0xdeadbeef) == DDERR_INVALIDPARAMS); - TEST (Surface->ReleaseDC((HDC)0xdeadbeef) == DDERR_NODC); - TEST (Surface->ReleaseDC(GetDC(NULL)) == DDERR_NODC); - - TEST (Surface->GetDC(&hdc) == DD_OK); - TEST (MoveToEx(hdc, 0, 0, NULL) == TRUE); // validate hdc - TEST (Surface->Blt(NULL, NULL, NULL, 0, NULL) == DDERR_SURFACEBUSY); // check lock - TEST (Surface->ReleaseDC(hdc) == DD_OK); - - // ChangeUniquenessValue / GetUniquenessValue - DWORD Value; - // FIXME: find out other apis which increases the uniqueness value - TEST (Surface->GetUniquenessValue(&Value) == DD_OK && Value == 2); - TEST (Surface->Blt(NULL, NULL, NULL, 0, NULL) == DDERR_INVALIDPARAMS); // Even this increases the uniqueness value - TEST (Surface->GetUniquenessValue(&Value) == DD_OK && Value == 3); - TEST (Surface->ChangeUniquenessValue() == DD_OK); - TEST (Surface->GetUniquenessValue(&Value) == DD_OK && Value == 4); - - // GetPixelFormat - DDPIXELFORMAT PixelFormat = {0}; - // FIXME: Produce DDERR_INVALIDSURFACETYPE - TEST (Surface->GetPixelFormat((LPDDPIXELFORMAT)0xdeadbeef) == DDERR_INVALIDPARAMS); - TEST (Surface->GetPixelFormat(&PixelFormat)); - PixelFormat.dwSize = sizeof(DDPIXELFORMAT); - TEST (Surface->GetPixelFormat(&PixelFormat) == DD_OK && PixelFormat.dwFlags == 0x40); // FIXME: Find out what 0x40 is - - // GetSurfaceDesc / SetSurfaceDesc - DDSURFACEDESC2 Desc = {0}; - // FIXME: Produce DDERR_INVALIDSURFACETYPE - TEST (Surface->GetSurfaceDesc((LPDDSURFACEDESC2)0xdeadbeef) == DDERR_INVALIDPARAMS); - TEST (Surface->GetSurfaceDesc(&Desc)); - Desc.dwSize = sizeof(DDSURFACEDESC2); - TEST (Surface->GetSurfaceDesc(&Desc) == DD_OK && Desc.dwFlags == 0x100f); // FIXME: Find out what 0x100f is - TEST (memcmp ((PVOID)&Desc.ddpfPixelFormat, (PVOID)&PixelFormat, sizeof(DDPIXELFORMAT)) == 0); - // FIXME: Test SetSurfaceDesc - - // GetDDInterface - IUnknown* iface; - TEST(Surface->GetDDInterface((LPVOID*)0xdeadbeef) == DDERR_INVALIDPARAMS); - TEST(Surface->GetDDInterface((LPVOID*)&iface) == DD_OK && iface); - TEST(iface->Release() == 1); // FIXME: Test the interface further - - Surface->Release(); - - return TRUE; -} diff --git a/rostests/dxtest/ddraw/Surface/private_data.cpp b/rostests/dxtest/ddraw/Surface/private_data.cpp deleted file mode 100644 index e9839af7e05..00000000000 --- a/rostests/dxtest/ddraw/Surface/private_data.cpp +++ /dev/null @@ -1,49 +0,0 @@ -BOOL CreateSurface(LPDIRECTDRAWSURFACE7* pSurface); - -BOOL Test_PrivateData (INT* passed, INT* failed) -{ - LPDIRECTDRAWSURFACE7 Surface; - DWORD size, dummy = 0xBAADF00D; - GUID guid = { 0 }; - GUID guid2 = { 0x1 }; - - if(!CreateSurface(&Surface)) - return FALSE; - - // General test - TEST(Surface->SetPrivateData(guid, NULL, 0, 0) == DDERR_INVALIDPARAMS); - TEST(Surface->SetPrivateData(guid, (LPVOID)&dummy, 0, 0) == DDERR_INVALIDPARAMS); - TEST(Surface->SetPrivateData(guid, (LPVOID)0xdeadbeef, sizeof(DWORD), 0) == DDERR_INVALIDPARAMS); - TEST(Surface->SetPrivateData(guid, (LPVOID)&dummy, sizeof(DWORD), 0) == DD_OK); - - TEST(Surface->GetPrivateData(guid, NULL, 0) == DDERR_INVALIDPARAMS); - TEST(Surface->GetPrivateData(guid, &dummy, 0) == DDERR_INVALIDPARAMS); - size = 0; - TEST(Surface->GetPrivateData(guid, &dummy, &size) == DDERR_MOREDATA && size == sizeof(DWORD)); - size = 2; - TEST(Surface->GetPrivateData(guid, NULL, &size) == DDERR_MOREDATA && size == sizeof(DWORD)); - TEST(Surface->GetPrivateData(guid, NULL, &size) == DDERR_INVALIDPARAMS); - TEST(Surface->GetPrivateData(guid, &dummy, &size) == DD_OK && dummy == 0xBAADF00D); - TEST(Surface->GetPrivateData(guid2, NULL, 0) == DDERR_NOTFOUND); - - TEST(Surface->FreePrivateData(guid) == DD_OK); - TEST(Surface->FreePrivateData(guid) == DDERR_NOTFOUND); - - // Test for DDSPD_VOLATILE flag - TEST(Surface->SetPrivateData(guid, (LPVOID)&dummy, sizeof(DWORD), DDSPD_VOLATILE) == DD_OK); - size = 0; - TEST(Surface->GetPrivateData(guid, NULL, &size) == DDERR_MOREDATA && size == sizeof(DWORD)); - TEST(Surface->GetPrivateData(guid, &dummy, &size) == DD_OK && dummy == 0xBAADF00D); - - DDBLTFX bltfx; - bltfx.dwSize = sizeof(DDBLTFX); - bltfx.dwFillColor = RGB(0, 0, 0); - if(Surface->Blt(NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &bltfx) != DD_OK) - printf("ERROR: Failed to draw to surface !"); - TEST(Surface->GetPrivateData(guid, &dummy, &size) == DDERR_EXPIRED); - - // TODO: Test for DDSPD_IUNKNOWNPOINTER (see http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/ddraw7/directdraw7/ddref_5qyf.asp) - - Surface->Release(); - return TRUE; -} diff --git a/rostests/dxtest/ddraw/ddraw.rbuild b/rostests/dxtest/ddraw/ddraw.rbuild deleted file mode 100644 index eca73152570..00000000000 --- a/rostests/dxtest/ddraw/ddraw.rbuild +++ /dev/null @@ -1,11 +0,0 @@ - - . - user32 - gdi32 - ole32 - ddraw - dxguid - ddraw_test.cpp - helper.cpp - testlist.cpp - diff --git a/rostests/dxtest/ddraw/ddraw_test.cpp b/rostests/dxtest/ddraw/ddraw_test.cpp deleted file mode 100644 index ba6a03df302..00000000000 --- a/rostests/dxtest/ddraw/ddraw_test.cpp +++ /dev/null @@ -1,51 +0,0 @@ -#include -#include - -#include "ddrawtest.h" - -INT NumTests(void); - -int main(int argc, char *argv[]) -{ - INT Num = NumTests(); - INT i, j; - INT passed, failed, opassed, ofailed; - - opassed = 0; - ofailed = 0; - printf("DirectDraw tests\n"); - if (argc > 1) - { - for (i = 1; i < argc; i++) - { - for (j = 0; j < NumTests(); j++) - { - if (_stricmp(argv[i], TestList[j].Test) == 0) - { - passed = 0; - failed = 0; - TestList[j].Proc(&passed, &failed); - opassed += passed; - ofailed += failed; - printf(" tests: %d, passed: %d, failed: %d\n\n", passed+failed, passed, failed); - } - } - } - } - else - { - for (i = 0; i < Num; i++) - { - passed = 0; - failed = 0; - printf("Test: %s\n", TestList[i].Test); - TestList[i].Proc(&passed, &failed); - opassed += passed; - ofailed += failed; - printf(" tests: %d, passed: %d, failed: %d\n\n", passed+failed, passed, failed); - } - } - printf("\nOverall tests: %d, passed: %d, failed: %d\n", opassed+ofailed, opassed, ofailed); - - return ofailed; -} diff --git a/rostests/dxtest/ddraw/ddrawtest.h b/rostests/dxtest/ddraw/ddrawtest.h deleted file mode 100644 index 35d4a27b304..00000000000 --- a/rostests/dxtest/ddraw/ddrawtest.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef _DDRAWTEST_H -#define _DDRAWTEST_H - -#include -#include -#include -#include -#include -#include -#include - -#define TEST(x) \ - if (x)\ - {\ - (*passed)++;\ - } else {\ - (*failed)++;\ - printf("Test failed in %s:%d (%s)\n", __FILE__, __LINE__, #x);\ - }; - - -/* The type definitions */ -typedef BOOL (*TESTPROC)(INT*, INT*); - -typedef struct tagTEST -{ - const CHAR* Test; - TESTPROC Proc; -} TEST, *PTEST; - - -extern TEST TestList[]; - -#endif /* _DDRAWTEST_H */ - -/* EOF */ diff --git a/rostests/dxtest/ddraw/debug.cpp b/rostests/dxtest/ddraw/debug.cpp deleted file mode 100644 index 6feda229275..00000000000 --- a/rostests/dxtest/ddraw/debug.cpp +++ /dev/null @@ -1,111 +0,0 @@ - -#define GetCode(X) printf("%s\n", DDErrorString(X)); - -const CHAR* DDErrorString (HRESULT hResult) -{ - switch (hResult) - { - case DD_OK: return "DD_OK"; - case DDERR_ALREADYINITIALIZED: return "DDERR_ALREADYINITIALIZED"; - case DDERR_CANNOTATTACHSURFACE: return "DDERR_CANNOTATTACHSURFACE"; - case DDERR_CANNOTDETACHSURFACE: return "DDERR_CANNOTDETACHSURFACE"; - case DDERR_CURRENTLYNOTAVAIL: return "DDERR_CURRENTLYNOTAVAIL"; - case DDERR_EXCEPTION: return "DDERR_EXCEPTION"; - case DDERR_GENERIC: return "DDERR_GENERIC"; - case DDERR_HEIGHTALIGN: return "DDERR_HEIGHTALIGN"; - case DDERR_INCOMPATIBLEPRIMARY: return "DDERR_INCOMPATIBLEPRIMARY"; - case DDERR_INVALIDCAPS: return "DDERR_INVALIDCAPS"; - case DDERR_INVALIDCLIPLIST: return "DDERR_INVALIDCLIPLIST"; - case DDERR_INVALIDMODE: return "DDERR_INVALIDMODE"; - case DDERR_INVALIDOBJECT: return "DDERR_INVALIDOBJECT"; - case DDERR_INVALIDPARAMS: return "DDERR_INVALIDPARAMS"; - case DDERR_INVALIDPIXELFORMAT: return "DDERR_INVALIDPIXELFORMAT"; - case DDERR_INVALIDRECT: return "DDERR_INVALIDRECT"; - case DDERR_LOCKEDSURFACES: return "DDERR_LOCKEDSURFACES"; - case DDERR_NO3D: return "DDERR_NO3D"; - case DDERR_NOALPHAHW: return "DDERR_NOALPHAHW"; - case DDERR_NOCLIPLIST: return "DDERR_NOCLIPLIST"; - case DDERR_NOCOLORCONVHW: return "DDERR_NOCOLORCONVHW"; - case DDERR_NOCOOPERATIVELEVELSET: return "DDERR_NOCOOPERATIVELEVELSET"; - case DDERR_NOCOLORKEY: return "DDERR_NOCOLORKEY"; - case DDERR_NOCOLORKEYHW: return "DDERR_NOCOLORKEYHW"; - case DDERR_NODIRECTDRAWSUPPORT: return "DDERR_NODIRECTDRAWSUPPORT"; - case DDERR_NOEXCLUSIVEMODE: return "DDERR_NOEXCLUSIVEMODE"; - case DDERR_NOFLIPHW: return "DDERR_NOFLIPHW"; - case DDERR_NOGDI: return "DDERR_NOGDI"; - case DDERR_NOMIRRORHW: return "DDERR_NOMIRRORHW"; - case DDERR_NOTFOUND: return "DDERR_NOTFOUND"; - case DDERR_NOOVERLAYHW: return "DDERR_NOOVERLAYHW"; - case DDERR_NORASTEROPHW: return "DDERR_NORASTEROPHW"; - case DDERR_NOROTATIONHW: return "DDERR_NOROTATIONHW"; - case DDERR_NOSTRETCHHW: return "DDERR_NOSTRETCHHW"; - case DDERR_NOT4BITCOLOR: return "DDERR_NOT4BITCOLOR"; - case DDERR_NOT4BITCOLORINDEX: return "DDERR_NOT4BITCOLORINDEX"; - case DDERR_NOT8BITCOLOR: return "DDERR_NOT8BITCOLOR"; - case DDERR_NOTEXTUREHW: return "DDERR_NOTEXTUREHW"; - case DDERR_NOVSYNCHW: return "DDERR_NOVSYNCHW"; - case DDERR_NOZBUFFERHW: return "DDERR_NOZBUFFERHW"; - case DDERR_NOZOVERLAYHW: return "DDERR_NOZOVERLAYHW"; - case DDERR_OUTOFCAPS: return "DDERR_OUTOFCAPS"; - case DDERR_OUTOFMEMORY: return "DDERR_OUTOFMEMORY"; - case DDERR_OUTOFVIDEOMEMORY: return "DDERR_OUTOFVIDEOMEMORY"; - case DDERR_OVERLAYCANTCLIP: return "DDERR_OVERLAYCANTCLIP"; - case DDERR_OVERLAYCOLORKEYONLYONEACTIVE: return "DDERR_OVERLAYCOLORKEYONLYONEACTIVE"; - case DDERR_PALETTEBUSY: return "DDERR_PALETTEBUSY"; - case DDERR_COLORKEYNOTSET: return "DDERR_COLORKEYNOTSET"; - case DDERR_SURFACEALREADYATTACHED: return "DDERR_SURFACEALREADYATTACHED"; - case DDERR_SURFACEALREADYDEPENDENT: return "DDERR_SURFACEALREADYDEPENDENT"; - case DDERR_SURFACEBUSY: return "DDERR_SURFACEBUSY"; - case DDERR_CANTLOCKSURFACE: return "DDERR_CANTLOCKSURFACE"; - case DDERR_SURFACEISOBSCURED: return "DDERR_SURFACEISOBSCURED"; - case DDERR_SURFACELOST: return "DDERR_SURFACELOST"; - case DDERR_SURFACENOTATTACHED: return "DDERR_SURFACENOTATTACHED"; - case DDERR_TOOBIGHEIGHT: return "DDERR_TOOBIGHEIGHT"; - case DDERR_TOOBIGSIZE: return "DDERR_TOOBIGSIZE"; - case DDERR_TOOBIGWIDTH: return "DDERR_TOOBIGWIDTH"; - case DDERR_UNSUPPORTED: return "DDERR_UNSUPPORTED"; - case DDERR_UNSUPPORTEDFORMAT: return "DDERR_UNSUPPORTEDFORMAT"; - case DDERR_UNSUPPORTEDMASK: return "DDERR_UNSUPPORTEDMASK"; - case DDERR_VERTICALBLANKINPROGRESS: return "DDERR_VERTICALBLANKINPROGRESS"; - case DDERR_WASSTILLDRAWING: return "DDERR_WASSTILLDRAWING"; - case DDERR_XALIGN: return "DDERR_XALIGN"; - case DDERR_INVALIDDIRECTDRAWGUID: return "DDERR_INVALIDDIRECTDRAWGUID"; - case DDERR_DIRECTDRAWALREADYCREATED: return "DDERR_DIRECTDRAWALREADYCREATED"; - case DDERR_NODIRECTDRAWHW: return "DDERR_NODIRECTDRAWHW"; - case DDERR_PRIMARYSURFACEALREADYEXISTS: return "DDERR_PRIMARYSURFACEALREADYEXISTS"; - case DDERR_NOEMULATION: return "DDERR_NOEMULATION"; - case DDERR_REGIONTOOSMALL: return "DDERR_REGIONTOOSMALL"; - case DDERR_CLIPPERISUSINGHWND: return "DDERR_CLIPPERISUSINGHWND"; - case DDERR_NOCLIPPERATTACHED: return "DDERR_NOCLIPPERATTACHED"; - case DDERR_NOHWND: return "DDERR_NOHWND"; - case DDERR_HWNDSUBCLASSED: return "DDERR_HWNDSUBCLASSED"; - case DDERR_HWNDALREADYSET: return "DDERR_HWNDALREADYSET"; - case DDERR_NOPALETTEATTACHED: return "DDERR_NOPALETTEATTACHED"; - case DDERR_NOPALETTEHW: return "DDERR_NOPALETTEHW"; - case DDERR_BLTFASTCANTCLIP: return "DDERR_BLTFASTCANTCLIP"; - case DDERR_NOBLTHW: return "DDERR_NOBLTHW"; - case DDERR_NODDROPSHW: return "DDERR_NODDROPSHW"; - case DDERR_OVERLAYNOTVISIBLE: return "DDERR_OVERLAYNOTVISIBLE"; - case DDERR_NOOVERLAYDEST: return "DDERR_NOOVERLAYDEST"; - case DDERR_INVALIDPOSITION: return "DDERR_INVALIDPOSITION"; - case DDERR_NOTAOVERLAYSURFACE: return "DDERR_NOTAOVERLAYSURFACE"; - case DDERR_EXCLUSIVEMODEALREADYSET: return "DDERR_EXCLUSIVEMODEALREADYSET"; - case DDERR_NOTFLIPPABLE: return "DDERR_NOTFLIPPABLE"; - case DDERR_CANTDUPLICATE: return "DDERR_CANTDUPLICATE"; - case DDERR_NOTLOCKED: return "DDERR_NOTLOCKED"; - case DDERR_CANTCREATEDC: return "DDERR_CANTCREATEDC"; - case DDERR_NODC: return "DDERR_NODC"; - case DDERR_WRONGMODE: return "DDERR_WRONGMODE"; - case DDERR_IMPLICITLYCREATED: return "DDERR_IMPLICITLYCREATED"; - case DDERR_NOTPALETTIZED: return "DDERR_NOTPALETTIZED"; - case DDERR_UNSUPPORTEDMODE: return "DDERR_UNSUPPORTEDMODE"; - case DDERR_NOMIPMAPHW: return "DDERR_NOMIPMAPHW"; - case DDERR_INVALIDSURFACETYPE: return "DDERR_INVALIDSURFACETYPE"; - case DDERR_DCALREADYCREATED: return "DDERR_DCALREADYCREATED"; - case DDERR_CANTPAGELOCK: return "DDERR_CANTPAGELOCK"; - case DDERR_CANTPAGEUNLOCK: return "DDERR_CANTPAGEUNLOCK"; - case DDERR_NOTPAGELOCKED: return "DDERR_NOTPAGELOCKED"; - case DDERR_NOTINITIALIZED: return "DDERR_NOTINITIALIZED"; - } - return "Unknown Error"; -} diff --git a/rostests/dxtest/ddraw/helper.cpp b/rostests/dxtest/ddraw/helper.cpp deleted file mode 100644 index 3d6e1fd105c..00000000000 --- a/rostests/dxtest/ddraw/helper.cpp +++ /dev/null @@ -1,73 +0,0 @@ -#include "ddrawtest.h" - -LRESULT WINAPI BasicWindowProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - switch (message) - { - case WM_DESTROY: - { - PostQuitMessage (0); - return 0; - } break; - } - - return DefWindowProc (hwnd, message, wParam, lParam); -} - -HWND CreateBasicWindow (VOID) -{ - WNDCLASS wndclass = {0}; - wndclass.lpfnWndProc = BasicWindowProc; - wndclass.hInstance = GetModuleHandle(NULL); - wndclass.lpszClassName = "DDrawTest"; - RegisterClass(&wndclass); - - return CreateWindow("DDrawTest", "ReactOS DirectDraw Test", WS_POPUP, 0, 0, 10, 10, NULL, NULL, GetModuleHandle(NULL), NULL); -} - -BOOL CreateSurface(LPDIRECTDRAWSURFACE7* pSurface) -{ - LPDIRECTDRAW7 DirectDraw; - LPDIRECTDRAWSURFACE7 Surface; - HWND hwnd; - - // Create DDraw Object - if (DirectDrawCreateEx(NULL, (VOID**)&DirectDraw, IID_IDirectDraw7, NULL) != DD_OK) - { - printf("ERROR: Failed to set up ddraw\n"); - return FALSE; - } - - if(!( hwnd = CreateBasicWindow() )) - { - printf("ERROR: Failed to create window\n"); - DirectDraw->Release(); - return FALSE; - } - - if (DirectDraw->SetCooperativeLevel (hwnd, DDSCL_NORMAL) != DD_OK) - { - printf("ERROR: Could not set cooperative level\n"); - DirectDraw->Release(); - return 0; - } - - // Creat Surface - DDSURFACEDESC2 Desc = { 0 }; - Desc.dwHeight = 200; - Desc.dwWidth = 200; - Desc.dwSize = sizeof (DDSURFACEDESC2); - Desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; - Desc.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH; - - if(DirectDraw->CreateSurface(&Desc, &Surface, NULL) != DD_OK) - { - printf("ERROR: Faild to create Surface\n"); - return FALSE; - } - - DirectDraw->Release(); - - *pSurface = Surface; - return TRUE; -} diff --git a/rostests/dxtest/ddraw/testlist.cpp b/rostests/dxtest/ddraw/testlist.cpp deleted file mode 100644 index 3884961d370..00000000000 --- a/rostests/dxtest/ddraw/testlist.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef _DDRAWTESTLIST_H -#define _DDRAWTESTLIST_H - -#include "ddrawtest.h" -#include "debug.cpp" - -/* include the tests */ -#include "DDraw/create.cpp" -#include "DDraw/display_modes.cpp" -#include "DDraw/available_mem.cpp" -#include "Surface/create.cpp" -#include "Surface/private_data.cpp" -#include "Surface/blt.cpp" -#include "Surface/misc.cpp" - -/* The List of tests */ -TEST TestList[] = -{ - { "IDirectDraw: COM Stuff", Test_CreateDDraw }, - { "IDirectDraw: GetDeviceIdentifier", Test_GetDeviceIdentifier }, - { "IDirectDraw: Display Modes", Test_DisplayModes }, - { "IDirectDraw: Available Video Memory", Test_GetAvailableVidMem }, - { "IDirectDraw: GetFourCC", Test_GetFourCCCodes }, - { "IDirectDraw: Cooperative Levels", Test_SetCooperativeLevel }, - { "IDirectDrawSurface: Creation", Test_CreateSurface }, - { "IDirectDrawSurface: Blting", Test_Blt }, - { "IDirectDrawSurface: Private Data", Test_PrivateData }, - { "IDirectDrawSurface: Miscellaneous Tests", Test_Misc }, -}; - -/* The function that gives us the number of tests */ -INT NumTests(void) -{ - return sizeof(TestList) / sizeof(TEST); -} - -#endif /* _DDRAWTESTLIST_H */ - -/* EOF */ diff --git a/rostests/dxtest/directory.rbuild b/rostests/dxtest/directory.rbuild deleted file mode 100644 index 5c8daf9beb1..00000000000 --- a/rostests/dxtest/directory.rbuild +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/rostests/dxtest/win32kdxtest/NtGdiDdCanCreateSurface.c b/rostests/dxtest/win32kdxtest/NtGdiDdCanCreateSurface.c deleted file mode 100644 index b183275f966..00000000000 --- a/rostests/dxtest/win32kdxtest/NtGdiDdCanCreateSurface.c +++ /dev/null @@ -1,45 +0,0 @@ - -#include -/* SDK/DDK/NDK Headers. */ -#include -#include -#include -#include -#include -#include -#include "test.h" - -/* - * Test see if we can delete a DirectDrawObject from win32k - * - */ -void -test_NtGdiDdCanCreateSurface(HANDLE hDirectDrawLocal) -{ - int fails=0; - BOOL retValue=FALSE; - DDHAL_CANCREATESURFACEDATA pCanCreateSurface; - DDSURFACEDESC2 desc; - - RtlZeroMemory(&pCanCreateSurface,sizeof(DDHAL_CANCREATESURFACEDATA)); - RtlZeroMemory(&desc,sizeof(DDSURFACEDESC2)); - - /* crash in windows 2000 */ - retValue = OsThunkDdCanCreateSurface(NULL,NULL); - testing_eq(retValue, DDHAL_DRIVER_HANDLED,fails,"1. NtGdiDdCanCreateSurface(NULL,NULL);\0"); - - retValue = OsThunkDdCanCreateSurface(hDirectDrawLocal,NULL); - testing_eq(retValue, DDHAL_DRIVER_HANDLED,fails,"2. NtGdiDdCanCreateSurface(hDirectDrawLocal,NULL);\0"); - - retValue = OsThunkDdCanCreateSurface(hDirectDrawLocal,(PDD_CANCREATESURFACEDATA)&pCanCreateSurface); - testing_eq(retValue, DDHAL_DRIVER_HANDLED,fails,"3. NtGdiDdCanCreateSurface(hDirectDrawLocal,pCanCreateSurface);\0"); - - pCanCreateSurface.lpDDSurfaceDesc = (DDSURFACEDESC*)&desc; - desc.dwSize = sizeof(DDSURFACEDESC2); - - retValue = OsThunkDdCanCreateSurface(hDirectDrawLocal,(PDD_CANCREATESURFACEDATA)&pCanCreateSurface); - testing_eq(retValue, DDHAL_DRIVER_HANDLED,fails,"4. NtGdiDdCanCreateSurface(hDirectDrawLocal,pCanCreateSurface);\0"); - -} - - diff --git a/rostests/dxtest/win32kdxtest/NtGdiDdCreateDirectDrawObject.c b/rostests/dxtest/win32kdxtest/NtGdiDdCreateDirectDrawObject.c deleted file mode 100644 index 28943ce76bd..00000000000 --- a/rostests/dxtest/win32kdxtest/NtGdiDdCreateDirectDrawObject.c +++ /dev/null @@ -1,50 +0,0 @@ -#include -/* SDK/DDK/NDK Headers. */ -#include -#include -#include -#include -#include -#include "test.h" - - -/* - * Test see if we getting a DirectDrawObject from win32k - * - */ -HANDLE -test_NtGdiDdCreateDirectDrawObject() -{ - HANDLE retValue=0; - int fails=0; - HDC hdc=CreateDCW(L"Display",NULL,NULL,NULL); - - if (hdc == NULL) - { - printf("No hdc was created with Display, trying now with DISPLAY\n"); - hdc=CreateDCW(L"DISPLAY",NULL,NULL,NULL); - if (hdc == NULL) - { - printf("No hdc was created with DISPLAY, trying now with NULL\n"); - hdc=CreateDCW(NULL,NULL,NULL,NULL); - } - } - - if (hdc == NULL) - { - printf("No hdc was created at all perpare all test will fail\n"); - return NULL; - } - - printf("Start testing of NtGdiDdCreateDirectDrawObject\n"); - - retValue = OsThunkDdCreateDirectDrawObject(NULL); - testing_noteq(retValue,NULL,fails,"NtGdiDdCreateDirectDrawObject(NULL);\0"); - - retValue = OsThunkDdCreateDirectDrawObject(hdc); - testing_eq(retValue,NULL,fails,"NtGdiDdCreateDirectDrawObject(hdc);\0"); - - show_status(fails, "NtGdiDdCreateDirectDrawObject\0"); - - return retValue; -} diff --git a/rostests/dxtest/win32kdxtest/NtGdiDdDeleteDirectDrawObject.c b/rostests/dxtest/win32kdxtest/NtGdiDdDeleteDirectDrawObject.c deleted file mode 100644 index 0fd1e47f5db..00000000000 --- a/rostests/dxtest/win32kdxtest/NtGdiDdDeleteDirectDrawObject.c +++ /dev/null @@ -1,29 +0,0 @@ -#include -/* SDK/DDK/NDK Headers. */ -#include -#include -#include -#include -#include -#include "test.h" - -/* - * Test see if we can delete a DirectDrawObject from win32k - * - */ -void -test_NtGdiDdDeleteDirectDrawObject(HANDLE hDirectDrawLocal) -{ - int fails=0; - BOOL retValue=FALSE; - printf("Start testing of NtGdiDdDeleteDirectDrawObject\n"); - - retValue = OsThunkDdDeleteDirectDrawObject(hDirectDrawLocal); - testing_eq(retValue,FALSE,fails,"NtGdiDdDeleteDirectDrawObject(hDirectDrawLocal);\0"); - - retValue = OsThunkDdDeleteDirectDrawObject(NULL); - testing_eq(retValue,TRUE,fails,"NtGdiDdDeleteDirectDrawObject(NULL);\0"); - - show_status(fails, "NtGdiDdDeleteDirectDrawObject\0"); -} - diff --git a/rostests/dxtest/win32kdxtest/NtGdiDdGetScanLine.c b/rostests/dxtest/win32kdxtest/NtGdiDdGetScanLine.c deleted file mode 100644 index b5367828b51..00000000000 --- a/rostests/dxtest/win32kdxtest/NtGdiDdGetScanLine.c +++ /dev/null @@ -1,40 +0,0 @@ -#include -/* SDK/DDK/NDK Headers. */ -#include -#include -#include -#include -#include -#include "test.h" - -/* - * Test see if we can delete a DirectDrawObject from win32k - * - */ -void -test_NtGdiDdGetScanLine(HANDLE hDirectDrawLocal) -{ - int fails=0; - BOOL retValue=FALSE; - DD_GETSCANLINEDATA puGetScanLineData; - - printf("Start testing of NtGdiDdGetScanLine\n"); - RtlZeroMemory(&puGetScanLineData,sizeof(DD_GETSCANLINEDATA)); - - retValue = OsThunkDdGetScanLine(NULL,NULL); - testing_eq(retValue, DDHAL_DRIVER_HANDLED,fails,"1. NtGdiDdGetScanLine(NULL,NULL);\0"); - - retValue = OsThunkDdGetScanLine(hDirectDrawLocal,NULL); - testing_eq(retValue, DDHAL_DRIVER_HANDLED,fails,"2. NtGdiDdGetScanLine(hDirectDrawLocal,NULL);\0"); - - puGetScanLineData.ddRVal = DDERR_GENERIC; - retValue = OsThunkDdGetScanLine(hDirectDrawLocal,&puGetScanLineData); - testing_eq(retValue,DDHAL_DRIVER_NOTHANDLED,fails,"3. NtGdiDdGetScanLine(hDirectDrawLocal,puGetScanLineData);\0"); - testing_noteq(puGetScanLineData.ddRVal,DD_OK,fails,"4. NtGdiDdGetScanLine(hDirectDrawLocal,puGetScanLineData);\0"); - testing_eq(puGetScanLineData.dwScanLine,0,fails,"4. NtGdiDdGetScanLine(hDirectDrawLocal,puGetScanLineData);\0"); - - - /* FIXME DDERR_VERTICALBLANKINPROGRESS test */ - - show_status(fails, "NtGdiDdGetScanLine\0"); -} diff --git a/rostests/dxtest/win32kdxtest/NtGdiDdQueryDirectDrawObject.c b/rostests/dxtest/win32kdxtest/NtGdiDdQueryDirectDrawObject.c deleted file mode 100644 index c0e4886d745..00000000000 --- a/rostests/dxtest/win32kdxtest/NtGdiDdQueryDirectDrawObject.c +++ /dev/null @@ -1,420 +0,0 @@ -#include -/* SDK/DDK/NDK Headers. */ -#include -#include -#include -#include -#include -#include "test.h" - -extern BOOL dumping_on; - -/* my struct */ -struct -{ - DWORD pos; -} *mytest; - -/* - * Test see if we can setup DirectDrawObject - * - */ - -/* - * ToDO - * 1. add more testcase it is only some, but we do not test for all case - * that happen only some - * - * 2.Fixed the false alaret for drivers only support 2d dx interface - * - * 3. fixed the dumping of d3d struct. - * - */ - -void -test_NtGdiDdQueryDirectDrawObject( HANDLE hDirectDrawLocal) -{ - int fails=0; - BOOL retValue=FALSE; - - DD_HALINFO *pHalInfo = NULL; - DWORD *pCallBackFlags = NULL; - LPD3DNTHAL_CALLBACKS puD3dCallbacks = NULL; - LPD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData = NULL; - PDD_D3DBUFCALLBACKS puD3dBufferCallbacks = NULL; - LPDDSURFACEDESC puD3dTextureFormats = NULL; - DWORD *puNumHeaps = NULL; - VIDEOMEMORY *puvmList = NULL; - DWORD *puNumFourCC = NULL; - DWORD *puFourCC = NULL; - - DD_HALINFO HalInfo; - DWORD CallBackFlags[4]; - D3DNTHAL_CALLBACKS D3dCallbacks; - D3DNTHAL_GLOBALDRIVERDATA D3dDriverData; - DD_D3DBUFCALLBACKS D3dBufferCallbacks; - DDSURFACEDESC2 D3dTextureFormats[100]; - VIDEOMEMORY vmList; - - /* clear data */ - memset(&vmList,0,sizeof(VIDEOMEMORY)); - memset(&D3dTextureFormats,0,sizeof(DDSURFACEDESC)); - memset(&D3dBufferCallbacks,0,sizeof(DD_D3DBUFCALLBACKS)); - memset(&D3dDriverData,0,sizeof(D3DNTHAL_GLOBALDRIVERDATA)); - memset(&D3dCallbacks,0,sizeof(D3DNTHAL_CALLBACKS)); - memset(&HalInfo,0,sizeof(DD_HALINFO)); - memset(CallBackFlags,0,sizeof(DWORD)*3); - - printf("Start testing of NtGdiDdQueryDirectDrawObject\n"); - - /* testing OsThunkDdQueryDirectDrawObject( NULL, .... */ - printf("testing DdQueryDirectDrawObject( NULL, ....)\n"); - - retValue = OsThunkDdQueryDirectDrawObject( NULL, pHalInfo, - pCallBackFlags, puD3dCallbacks, - puD3dDriverData, puD3dBufferCallbacks, - puD3dTextureFormats, puNumHeaps, - puvmList, puNumFourCC, - puFourCC); - - testing_noteq(retValue,FALSE,fails,"1. NtGdiDdQueryDirectDrawObject(NULL, ...);\0"); - testing_noteq(pHalInfo,NULL,fails,"2. NtGdiDdQueryDirectDrawObject(NULL, ...);\0"); - testing_noteq(pCallBackFlags,NULL,fails,"3. NtGdiDdQueryDirectDrawObject(NULL, ...);\0"); - testing_noteq(puD3dCallbacks,NULL,fails,"4. NtGdiDdQueryDirectDrawObject(NULL, ...);\0"); - testing_noteq(puD3dDriverData,NULL,fails,"5. NtGdiDdQueryDirectDrawObject(NULL, ...);\0"); - testing_noteq(puD3dBufferCallbacks,NULL,fails,"6. NtGdiDdQueryDirectDrawObject(NULL, ...);\0"); - testing_noteq(puD3dTextureFormats,NULL,fails,"7. NtGdiDdQueryDirectDrawObject(NULL, ...);\0"); - testing_noteq(puNumFourCC,NULL,fails,"8. NtGdiDdQueryDirectDrawObject(NULL, ...);\0"); - testing_noteq(puFourCC,NULL,fails,"9. NtGdiDdQueryDirectDrawObject(NULL, ...);\0"); - - /* testing OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, NULL, .... */ - printf("testing DdQueryDirectDrawObject( hDD, NULL, ....)\n"); - - retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo, - pCallBackFlags, puD3dCallbacks, - puD3dDriverData, puD3dBufferCallbacks, - puD3dTextureFormats, puNumHeaps, - puvmList, puNumFourCC, - puFourCC); - - testing_noteq(retValue,FALSE,fails,"10. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, NULL, ...);\0"); - testing_noteq(pHalInfo,NULL,fails,"11. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, NULL, ...);\0"); - testing_noteq(pCallBackFlags,NULL,fails,"12. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, NULL, ...);\0"); - testing_noteq(puD3dCallbacks,NULL,fails,"13. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, NULL, ...);\0"); - testing_noteq(puD3dDriverData,NULL,fails,"14. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, NULL, ...);\0"); - testing_noteq(puD3dBufferCallbacks,NULL,fails,"15. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, NULL, ...);\0"); - testing_noteq(puD3dTextureFormats,NULL,fails,"16. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, NULL, ...);\0"); - testing_noteq(puNumFourCC,NULL,fails,"17. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, NULL, ...);\0"); - testing_noteq(puFourCC,NULL,fails,"18. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, NULL, ...);\0"); - - /* testing OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo, NULL, .... */ - printf("testing DdQueryDirectDrawObject( hDD, pHalInfo, NULL, ....)\n"); - - pHalInfo = &HalInfo; - retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo, - pCallBackFlags, puD3dCallbacks, - puD3dDriverData, puD3dBufferCallbacks, - puD3dTextureFormats, puNumHeaps, - puvmList, puNumFourCC, - puFourCC); - - testing_noteq(retValue,FALSE,fails,"19. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, NULL, ...);\0"); - testing_eq(pHalInfo,NULL,fails,"20. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, NULL, ...);\0"); - testing_noteq(pCallBackFlags,NULL,fails,"21. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, NULL, ...);\0"); - testing_noteq(puD3dCallbacks,NULL,fails,"22. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, NULL, ...);\0"); - testing_noteq(puD3dDriverData,NULL,fails,"23. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, NULL, ...);\0"); - testing_noteq(puD3dBufferCallbacks,NULL,fails,"24. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, NULL, ...);\0"); - testing_noteq(puD3dTextureFormats,NULL,fails,"25. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, NULL, ...);\0"); - testing_noteq(puNumFourCC,NULL,fails,"26. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, NULL, ...);\0"); - testing_noteq(puFourCC,NULL,fails,"27. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, NULL, ...);\0"); - - /* - if ((pHalInfo->dwSize != sizeof(DD_HALINFO)) && - (pHalInfo->dwSize != sizeof(DD_HALINFO_V4))) - { - printf("28. if this show for NT 2000/XP/2003 ignore it, NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, NULL, ...);\n"); - fails++; - } - */ - - if (dumping_on == TRUE) - { - dump_halinfo(pHalInfo,"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, NULL, ...)"); - } - - - - - - - - - - - - - - /* testing OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo, pCallBackFlags, NULL, .... */ - printf("testing DdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags, NULL, ....)\n"); - - pHalInfo = &HalInfo; - pCallBackFlags = CallBackFlags; - - RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO)); - - retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo, - pCallBackFlags, puD3dCallbacks, - puD3dDriverData, puD3dBufferCallbacks, - puD3dTextureFormats, puNumHeaps, - puvmList, puNumFourCC, - puFourCC); - - testing_noteq(retValue,FALSE,fails,"29. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, NULL, ...);\0"); - testing_eq(pHalInfo,NULL,fails,"30. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, NULL, ...);\0"); - testing_eq(pCallBackFlags,NULL,fails,"31. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, NULL, ...);\0"); - testing_noteq(puD3dCallbacks,NULL,fails,"32. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, NULL, ...);\0"); - testing_noteq(puD3dDriverData,NULL,fails,"33. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, NULL, ...);\0"); - testing_noteq(puD3dBufferCallbacks,NULL,fails,"34. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, NULL, ...);\0"); - testing_noteq(puD3dTextureFormats,NULL,fails,"35. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, NULL, ...);\0"); - testing_noteq(puNumFourCC,NULL,fails,"36. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, NULL, ...);\0"); - testing_noteq(puFourCC,NULL,fails,"37. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, NULL, ...);\0"); - /* - if ((pHalInfo->dwSize != sizeof(DD_HALINFO)) && - (pHalInfo->dwSize != sizeof(DD_HALINFO_V4))) - { - printf("38. if this show for NT 2000/XP/2003 ignore it, NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, NULL, ...);\n"); - fails++; - } - */ - - if (dumping_on == TRUE) - { - dump_halinfo(pHalInfo,"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, NULL, ...)"); - dump_CallBackFlags(pCallBackFlags,"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, NULL, ...)"); - } - - /* testing OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo, pCallBackFlags, D3dCallbacks, .... */ - printf("testing DdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags, puD3dCallbacks, NULL, ....)\n"); - - pHalInfo = &HalInfo; - pCallBackFlags = CallBackFlags; - puD3dCallbacks = &D3dCallbacks; - - RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO)); - RtlZeroMemory(pCallBackFlags,sizeof(DWORD)*3); - - retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo, - pCallBackFlags, puD3dCallbacks, - puD3dDriverData, puD3dBufferCallbacks, - puD3dTextureFormats, puNumHeaps, - puvmList, puNumFourCC, - puFourCC); - - testing_noteq(retValue,FALSE,fails,"39. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, NULL, ...);\0"); - testing_eq(pHalInfo,NULL,fails,"40. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, NULL, ...);\0"); - testing_eq(pCallBackFlags,NULL,fails,"41. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, NULL, ...);\0"); - - - testing_noteq(puD3dCallbacks->dwSize,sizeof(D3DNTHAL_CALLBACKS),fails,"42. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, NULL, ...);\0"); - - testing_noteq(puD3dDriverData,NULL,fails,"43. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, NULL, ...);\0"); - testing_noteq(puD3dBufferCallbacks,NULL,fails,"44. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, NULL, ...);\0"); - testing_noteq(puD3dTextureFormats,NULL,fails,"45. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, NULL, ...);\0"); - testing_noteq(puNumFourCC,NULL,fails,"46. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, NULL, ...);\0"); - testing_noteq(puFourCC,NULL,fails,"47. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, NULL, ...);\0"); - /* - if ((pHalInfo->dwSize != sizeof(DD_HALINFO)) && - (pHalInfo->dwSize != sizeof(DD_HALINFO_V4))) - { - printf("48. if this show for NT 2000/XP/2003 ignore it, NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, NULL, ...);\n"); - fails++; - } - */ - - if (dumping_on == TRUE) - { - dump_halinfo(pHalInfo,"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, NULL, ...)"); - dump_CallBackFlags(pCallBackFlags,"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, NULL, ...)"); - dump_D3dCallbacks(puD3dCallbacks,"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, NULL, ...)"); - } - - /* testing OsThunkDdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, NULL, */ - printf("testing DdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, NULL, ....)\n"); - - pHalInfo = &HalInfo; - pCallBackFlags = CallBackFlags; - puD3dCallbacks = &D3dCallbacks; - puD3dDriverData = &D3dDriverData; - - RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO)); - RtlZeroMemory(pCallBackFlags,sizeof(DWORD)*3); - RtlZeroMemory(puD3dCallbacks,sizeof(D3DNTHAL_CALLBACKS)); - - retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo, - pCallBackFlags, puD3dCallbacks, - puD3dDriverData, puD3dBufferCallbacks, - puD3dTextureFormats, puNumHeaps, - puvmList, puNumFourCC, - puFourCC); - - testing_noteq(retValue,FALSE,fails,"49. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, NULL, ...);\0"); - testing_eq(pHalInfo,NULL,fails,"50. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, NULL, ...);\0"); - testing_eq(pCallBackFlags,NULL,fails,"51. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, NULL, ...);\0"); - testing_noteq(puD3dCallbacks->dwSize,sizeof(D3DNTHAL_CALLBACKS),fails,"52. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, NULL, ...);\0"); - - testing_noteq(puD3dDriverData->dwSize,sizeof(D3DNTHAL_GLOBALDRIVERDATA),fails,"53. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, NULL, ...);\0"); - - testing_noteq(puD3dBufferCallbacks,NULL,fails,"54. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, NULL, ...);\0"); - testing_noteq(puD3dTextureFormats,NULL,fails,"55. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, NULL, ...);\0"); - testing_noteq(puNumFourCC,NULL,fails,"56. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, NULL, ...);\0"); - testing_noteq(puFourCC,NULL,fails,"57. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, NULL, ...);\0"); - /* - if ((pHalInfo->dwSize != sizeof(DD_HALINFO)) && - (pHalInfo->dwSize != sizeof(DD_HALINFO_V4))) - { - printf("58. if this show for NT 2000/XP/2003 ignore it, NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, NULL, ...);\n"); - fails++; - } - */ - - if (dumping_on == TRUE) - { - dump_halinfo(pHalInfo,"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, NULL, ...)"); - dump_CallBackFlags(pCallBackFlags,"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, NULL, ...)"); - dump_D3dCallbacks(puD3dCallbacks,"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, NULL, ...)"); - dump_D3dDriverData(puD3dDriverData,"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, NULL, ...)"); - } - -/* testing OsThunkDdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, D3dBufferCallbacks, NULL, */ - printf("testing DdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, D3dBufferCallbacks, NULL, ....)\n"); - - pHalInfo = &HalInfo; - pCallBackFlags = CallBackFlags; - puD3dCallbacks = &D3dCallbacks; - puD3dDriverData = &D3dDriverData; - puD3dBufferCallbacks = &D3dBufferCallbacks; - - RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO)); - RtlZeroMemory(pCallBackFlags,sizeof(DWORD)*3); - RtlZeroMemory(puD3dCallbacks,sizeof(D3DNTHAL_CALLBACKS)); - RtlZeroMemory(puD3dDriverData,sizeof(D3DNTHAL_CALLBACKS)); - - retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo, - pCallBackFlags, puD3dCallbacks, - puD3dDriverData, puD3dBufferCallbacks, - puD3dTextureFormats, puNumHeaps, - puvmList, puNumFourCC, - puFourCC); - - testing_noteq(retValue,FALSE,fails,"59. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL, ...);\0"); - testing_eq(pHalInfo,NULL,fails,"60. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL, ...);\0"); - testing_eq(pCallBackFlags,NULL,fails,"61. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL, ...);\0"); - testing_noteq(puD3dCallbacks->dwSize,sizeof(D3DNTHAL_CALLBACKS),fails,"62. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL, ...);\0"); - - testing_noteq(puD3dDriverData->dwSize,sizeof(D3DNTHAL_GLOBALDRIVERDATA),fails,"63. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dBufferCallbacks, NULL, ...);\0"); - - testing_noteq(puD3dTextureFormats,NULL,fails,"64. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL, ...);\0"); - testing_noteq(puNumFourCC,NULL,fails,"65. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL, ...);\0"); - testing_noteq(puFourCC,NULL,fails,"66. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL, ...);\0"); - /* - if ((pHalInfo->dwSize != sizeof(DD_HALINFO)) && - (pHalInfo->dwSize != sizeof(DD_HALINFO_V4))) - { - printf("67. if this show for NT 2000/XP/2003 ignore it, NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL, ...);\n"); - fails++; - } - */ - - if (puD3dBufferCallbacks) - { - testing_noteq(puD3dBufferCallbacks->dwSize,sizeof(DD_D3DBUFCALLBACKS),fails,"68. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL...);\0"); - } - - if (dumping_on == TRUE) - { - dump_halinfo(pHalInfo,"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL, ...)"); - dump_CallBackFlags(pCallBackFlags,"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL, ...)"); - dump_D3dCallbacks(puD3dCallbacks,"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL, ...)"); - dump_D3dDriverData(puD3dDriverData, "NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL, ...)"); - dump_D3dBufferCallbacks(puD3dBufferCallbacks, "NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL, ...)"); - } - -/* testing OsThunkDdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, D3dBufferCallbacks, puD3dTextureFormats, NULL, */ - printf("testing DdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, D3dBufferCallbacks, puD3dTextureFormats, NULL, ....)\n"); - - pHalInfo = &HalInfo; - pCallBackFlags = CallBackFlags; - puD3dCallbacks = &D3dCallbacks; - puD3dDriverData = &D3dDriverData; - puD3dBufferCallbacks = &D3dBufferCallbacks; - - if (puD3dDriverData) - { - puD3dTextureFormats = malloc (puD3dDriverData->dwNumTextureFormats * sizeof(DDSURFACEDESC2)); - if (!puD3dTextureFormats) - printf("Waring Out of memory\n"); - - RtlZeroMemory(puD3dTextureFormats, puD3dDriverData->dwNumTextureFormats * sizeof(DDSURFACEDESC2)); - } - - retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo, - pCallBackFlags, puD3dCallbacks, - puD3dDriverData, puD3dBufferCallbacks, - puD3dTextureFormats, puNumHeaps, - puvmList, puNumFourCC, - puFourCC); - - - - - - testing_noteq(retValue,FALSE,fails,"69. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0"); - testing_eq(pHalInfo,NULL,fails,"70. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0"); - testing_eq(pCallBackFlags,NULL,fails,"71. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0"); - - /* does not work nice in xp */ - // testing_noteq(puD3dCallbacks->dwSize,sizeof(D3DNTHAL_CALLBACKS),fails,"72. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0"); - - testing_noteq(puD3dDriverData->dwSize,sizeof(D3DNTHAL_GLOBALDRIVERDATA),fails,"73. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0"); - - testing_noteq(puNumFourCC,NULL,fails,"74. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0"); - testing_noteq(puFourCC,NULL,fails,"75. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0"); - -// /* -// if ((pHalInfo->dwSize != sizeof(DD_HALINFO)) && -// (pHalInfo->dwSize != sizeof(DD_HALINFO_V4))) -// { -// printf("8. if this show for NT 2000/XP/2003 ignore it, NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\n"); -// fails++; -// } -// */ -// - if (puD3dBufferCallbacks) - { - - testing_noteq(puD3dBufferCallbacks->dwSize,sizeof(DD_D3DBUFCALLBACKS),fails,"76. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL...);\0"); - } - - if (puD3dTextureFormats) - { - /* fixme test case for it */ - } - - if (dumping_on == TRUE) - { - dump_halinfo(pHalInfo,"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...)"); - dump_CallBackFlags(pCallBackFlags,"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...)"); - dump_D3dCallbacks(puD3dCallbacks,"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...)"); - dump_D3dDriverData(puD3dDriverData, "NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...)"); - dump_D3dBufferCallbacks(puD3dBufferCallbacks, "NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...)"); - dump_D3dTextureFormats(puD3dTextureFormats, puD3dDriverData->dwNumTextureFormats, "NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...)"); - } - - - - - - if (puD3dTextureFormats) - free (puD3dTextureFormats); - show_status(fails, "NtGdiDdQueryDirectDrawObject\0"); -} diff --git a/rostests/dxtest/win32kdxtest/NtGdiDdWaitForVerticalBlank.c b/rostests/dxtest/win32kdxtest/NtGdiDdWaitForVerticalBlank.c deleted file mode 100644 index 22b28967a4f..00000000000 --- a/rostests/dxtest/win32kdxtest/NtGdiDdWaitForVerticalBlank.c +++ /dev/null @@ -1,46 +0,0 @@ -#include -/* SDK/DDK/NDK Headers. */ -#include -#include -#include -#include -#include - -#include -#include "test.h" - -/* - * Test see if we can delete a DirectDrawObject from win32k - * - */ -void -test_NtGdiDdWaitForVerticalBlank(HANDLE hDirectDrawLocal) -{ - int fails=0; - BOOL retValue=FALSE; - DDHAL_WAITFORVERTICALBLANKDATA pDdWaitForVerticalBlankData; - - RtlZeroMemory(&pDdWaitForVerticalBlankData,sizeof(DDHAL_WAITFORVERTICALBLANKDATA)); - - retValue = OsThunkDdWaitForVerticalBlank(NULL,NULL); - testing_eq(retValue, DDHAL_DRIVER_HANDLED,fails,"1. NtGdiDdWaitForVerticalBlank(NULL,NULL);\0"); - - retValue = OsThunkDdWaitForVerticalBlank(hDirectDrawLocal,NULL); - testing_eq(retValue, DDHAL_DRIVER_HANDLED,fails,"2. NtGdiDdWaitForVerticalBlank(hDirectDrawLocal,NULL);\0"); - - retValue = OsThunkDdWaitForVerticalBlank(hDirectDrawLocal,(PDD_WAITFORVERTICALBLANKDATA)&pDdWaitForVerticalBlankData); - testing_eq(retValue, DDHAL_DRIVER_HANDLED,fails,"3. NtGdiDdWaitForVerticalBlank(hDirectDrawLocal,NULL);\0"); - testing_eq(pDdWaitForVerticalBlankData.ddRVal, DD_OK,fails,"4. NtGdiDdWaitForVerticalBlank(hDirectDrawLocal,NULL);\0"); - - RtlZeroMemory(&pDdWaitForVerticalBlankData,sizeof(DDHAL_WAITFORVERTICALBLANKDATA)); - pDdWaitForVerticalBlankData.dwFlags = DDWAITVB_I_TESTVB; - retValue = OsThunkDdWaitForVerticalBlank(hDirectDrawLocal,(PDD_WAITFORVERTICALBLANKDATA)&pDdWaitForVerticalBlankData); - - testing_eq(retValue, DDHAL_DRIVER_NOTHANDLED,fails,"5. NtGdiDdWaitForVerticalBlank(hDirectDrawLocal,NULL);\0"); - testing_noteq(pDdWaitForVerticalBlankData.ddRVal, DD_OK,fails,"6. NtGdiDdWaitForVerticalBlank(hDirectDrawLocal,NULL);\0"); - - retValue = OsThunkDdWaitForVerticalBlank(hDirectDrawLocal,(PDD_WAITFORVERTICALBLANKDATA)&pDdWaitForVerticalBlankData); - - show_status(fails, "NtGdiDdWaitForVerticalBlank\0"); -} - diff --git a/rostests/dxtest/win32kdxtest/dump.c b/rostests/dxtest/win32kdxtest/dump.c deleted file mode 100644 index 9598030d2a8..00000000000 --- a/rostests/dxtest/win32kdxtest/dump.c +++ /dev/null @@ -1,1436 +0,0 @@ -/* All testcase are base how windows 2000 sp4 acting */ - - -#include -#include -#include -#include -#include - -#include "test.h" - -/* this flag are only set for dx5 and lower but we need check see if we getting it back from win32k or not */ -#define D3DLIGHTCAPS_GLSPOT 0x00000010 - -/* this flag are only set for dx6 and lower but we need check see if we getting it back from win32k or not */ -#define D3DLIGHTCAPS_PARALLELPOINT 0x00000008 - -#define checkflag(dwflag,dwvalue,text) \ - if (dwflag & dwvalue) \ - { \ - if (count!=0) \ - { \ - printf("| "); \ - } \ - dwflag = (ULONG)dwflag - (ULONG)dwvalue; \ - printf("%s ",text); \ - count++; \ - } - -#define endcheckflag(dwflag,text) \ - if (count==0) \ - printf("0x%08lx\n", (ULONG) dwflag);\ - else \ - printf("\n");\ - if (flag != 0) \ - printf("undoc value in %s flags value %08lx\n",text, (ULONG) dwflag); - - - -void -dump_CallBackFlags(DWORD *pCallBackFlags, char *text) -{ - UINT flag; - INT count; - - printf("dumping the CallBackFlags from %s\n",text); - printf("pCallBackFlags[0] : "); - - flag=pCallBackFlags[0]; - count=0; - checkflag(flag,DDHAL_CB32_CANCREATESURFACE,"DDHAL_CB32_CANCREATESURFACE"); - checkflag(flag,DDHAL_CB32_CREATEPALETTE,"DDHAL_CB32_CREATEPALETTE"); - checkflag(flag,DDHAL_CB32_CREATESURFACE,"DDHAL_CB32_CREATESURFACE"); - checkflag(flag,DDHAL_CB32_GETSCANLINE,"DDHAL_CB32_GETSCANLINE"); - checkflag(flag,DDHAL_CB32_MAPMEMORY,"DDHAL_CB32_MAPMEMORY"); - checkflag(flag,DDHAL_CB32_SETCOLORKEY,"DDHAL_CB32_SETCOLORKEY"); - checkflag(flag,DDHAL_CB32_SETMODE,"DDHAL_CB32_SETMODE"); - checkflag(flag,DDHAL_CB32_WAITFORVERTICALBLANK,"DDHAL_CB32_WAITFORVERTICALBLANK"); - endcheckflag(flag,"pCallBackFlags[0]"); - - /* SURFACE callback */ - printf("pCallBackFlags[1] : "); - flag = pCallBackFlags[1]; - count = 0; - checkflag(flag,DDHAL_SURFCB32_ADDATTACHEDSURFACE,"DDHAL_SURFCB32_ADDATTACHEDSURFACE"); - checkflag(flag,DDHAL_SURFCB32_BLT,"DDHAL_SURFCB32_BLT"); - checkflag(flag,DDHAL_SURFCB32_DESTROYSURFACE,"DDHAL_SURFCB32_DESTROYSURFACE"); - checkflag(flag,DDHAL_SURFCB32_FLIP,"DDHAL_SURFCB32_FLIP"); - checkflag(flag,DDHAL_SURFCB32_GETBLTSTATUS,"DDHAL_SURFCB32_GETBLTSTATUS"); - checkflag(flag,DDHAL_SURFCB32_GETFLIPSTATUS,"DDHAL_SURFCB32_GETFLIPSTATUS"); - checkflag(flag,DDHAL_SURFCB32_LOCK,"DDHAL_SURFCB32_LOCK"); - checkflag(flag,DDHAL_SURFCB32_RESERVED4,"DDHAL_SURFCB32_RESERVED4"); - checkflag(flag,DDHAL_SURFCB32_SETCLIPLIST,"DDHAL_SURFCB32_SETCLIPLIST"); - checkflag(flag,DDHAL_SURFCB32_SETCOLORKEY,"DDHAL_SURFCB32_SETCOLORKEY"); - checkflag(flag,DDHAL_SURFCB32_SETOVERLAYPOSITION,"DDHAL_SURFCB32_SETOVERLAYPOSITION"); - checkflag(flag,DDHAL_SURFCB32_SETPALETTE,"DDHAL_SURFCB32_SETPALETTE"); - checkflag(flag,DDHAL_SURFCB32_UNLOCK,"DDHAL_SURFCB32_UNLOCK"); - checkflag(flag,DDHAL_SURFCB32_UPDATEOVERLAY,"DDHAL_SURFCB32_UPDATEOVERLAY"); - endcheckflag(flag,"pCallBackFlags[1]"); - - - /* palleted */ - printf("pCallBackFlags[2] : "); - flag = pCallBackFlags[2]; - count = 0; - checkflag(flag,DDHAL_PALCB32_DESTROYPALETTE,"DDHAL_PALCB32_DESTROYPALETTE"); - checkflag(flag,DDHAL_PALCB32_SETENTRIES,"DDHAL_PALCB32_SETENTRIES"); - endcheckflag(flag,"pCallBackFlags[2]"); -} - -void -dump_halinfo(DD_HALINFO *pHalInfo, char *text) -{ - printf("dumping the DD_HALINFO from %s\n",text); - - if (pHalInfo->dwSize == sizeof(DD_HALINFO_V4)) - { - DD_HALINFO_V4 *pHalInfo4 = (DD_HALINFO_V4 *) pHalInfo; - int t; - - printf("DD_HALINFO Version NT4 found \n"); - printf(" pHalInfo4->dwSize : 0x%08lx\n",(long)pHalInfo4->dwSize); - printf(" pHalInfo4->vmiData->fpPrimary : 0x%08lx\n",(long)pHalInfo4->vmiData.fpPrimary); - printf(" pHalInfo4->vmiData->dwFlags : 0x%08lx\n",(long)pHalInfo4->vmiData.dwFlags); - printf(" pHalInfo4->vmiData->dwDisplayWidth : 0x%08lx\n",(long)pHalInfo4->vmiData.dwDisplayWidth); - printf(" pHalInfo4->vmiData->dwDisplayHeight : 0x%08lx\n",(long)pHalInfo4->vmiData.dwDisplayHeight); - printf(" pHalInfo4->vmiData->lDisplayPitch : 0x%08lx\n",(long)pHalInfo4->vmiData.lDisplayPitch); - - printf(" pHalInfo4->vmiData->ddpfDisplay.dwSize : 0x%08lx\n",(long)pHalInfo4->vmiData.ddpfDisplay.dwSize); - printf(" pHalInfo4->vmiData->ddpfDisplay.dwFlags : 0x%08lx\n",(long)pHalInfo4->vmiData.ddpfDisplay.dwFlags); - printf(" pHalInfo4->vmiData->ddpfDisplay.dwFourCC : 0x%08lx\n",(long)pHalInfo4->vmiData.ddpfDisplay.dwFourCC); - printf(" pHalInfo4->vmiData->ddpfDisplay.dwRGBBitCount : 0x%08lx\n",(long)pHalInfo4->vmiData.ddpfDisplay.dwRGBBitCount); - printf(" pHalInfo4->vmiData->ddpfDisplay.dwRBitMask : 0x%08lx\n",(long)pHalInfo4->vmiData.ddpfDisplay.dwRBitMask); - printf(" pHalInfo4->vmiData->ddpfDisplay.dwGBitMask : 0x%08lx\n",(long)pHalInfo4->vmiData.ddpfDisplay.dwGBitMask); - printf(" pHalInfo4->vmiData->ddpfDisplay.dwBBitMask : 0x%08lx\n",(long)pHalInfo4->vmiData.ddpfDisplay.dwBBitMask); - printf(" pHalInfo4->vmiData->ddpfDisplay.dwRGBAlphaBitMask : 0x%08lx\n",(long)pHalInfo4->vmiData.ddpfDisplay.dwRGBAlphaBitMask); - - printf(" pHalInfo4->vmiData->dwOffscreenAlign : 0x%08lx\n",(long)pHalInfo4->vmiData.dwOffscreenAlign); - printf(" pHalInfo4->vmiData->dwOverlayAlign : 0x%08lx\n",(long)pHalInfo4->vmiData.dwOverlayAlign); - printf(" pHalInfo4->vmiData->dwTextureAlign : 0x%08lx\n",(long)pHalInfo4->vmiData.dwTextureAlign); - printf(" pHalInfo4->vmiData->dwZBufferAlign : 0x%08lx\n",(long)pHalInfo4->vmiData.dwZBufferAlign); - printf(" pHalInfo4->vmiData->dwAlphaAlign : 0x%08lx\n",(long)pHalInfo4->vmiData.dwAlphaAlign); - printf(" pHalInfo4->vmiData->pvPrimary : 0x%08lx\n",(long)pHalInfo4->vmiData.pvPrimary); - - printf(" pHalInfo4->ddCaps.dwSize : 0x%08lx\n",pHalInfo4->ddCaps.dwSize); - printf(" pHalInfo4->ddCaps.dwCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwCaps); - printf(" pHalInfo4->ddCaps.dwCaps2 : 0x%08lx\n",pHalInfo4->ddCaps.dwCaps2); - printf(" pHalInfo4->ddCaps.dwCKeyCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwCKeyCaps); - printf(" pHalInfo4->ddCaps.dwFXCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwFXCaps); - printf(" pHalInfo4->ddCaps.dwFXAlphaCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwFXAlphaCaps); - printf(" pHalInfo4->ddCaps.dwPalCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwPalCaps); - printf(" pHalInfo4->ddCaps.dwSVCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwSVCaps); - printf(" pHalInfo4->ddCaps.dwAlphaBltConstBitDepths : 0x%08lx\n",pHalInfo4->ddCaps.dwAlphaBltConstBitDepths); - printf(" pHalInfo4->ddCaps.dwAlphaBltPixelBitDepths : 0x%08lx\n",pHalInfo4->ddCaps.dwAlphaBltPixelBitDepths); - printf(" pHalInfo4->ddCaps.dwAlphaBltSurfaceBitDepths : 0x%08lx\n",pHalInfo4->ddCaps.dwAlphaBltSurfaceBitDepths); - printf(" pHalInfo4->ddCaps.dwAlphaOverlayConstBitDepths : 0x%08lx\n",pHalInfo4->ddCaps.dwAlphaOverlayConstBitDepths); - printf(" pHalInfo4->ddCaps.dwAlphaOverlayPixelBitDepths : 0x%08lx\n",pHalInfo4->ddCaps.dwAlphaOverlayPixelBitDepths); - printf(" pHalInfo4->ddCaps.dwAlphaOverlaySurfaceBitDepths : 0x%08lx\n",pHalInfo4->ddCaps.dwAlphaOverlaySurfaceBitDepths); - printf(" pHalInfo4->ddCaps.dwZBufferBitDepths : 0x%08lx\n",pHalInfo4->ddCaps.dwZBufferBitDepths); - printf(" pHalInfo4->ddCaps.dwVidMemTotal : 0x%08lx\n",pHalInfo4->ddCaps.dwVidMemTotal); - printf(" pHalInfo4->ddCaps.dwVidMemFree : 0x%08lx\n",pHalInfo4->ddCaps.dwVidMemFree); - printf(" pHalInfo4->ddCaps.dwMaxVisibleOverlays : 0x%08lx\n",pHalInfo4->ddCaps.dwMaxVisibleOverlays); - printf(" pHalInfo4->ddCaps.dwCurrVisibleOverlays : 0x%08lx\n",pHalInfo4->ddCaps.dwCurrVisibleOverlays); - printf(" pHalInfo4->ddCaps.dwNumFourCCCodes : 0x%08lx\n",pHalInfo4->ddCaps.dwNumFourCCCodes); - printf(" pHalInfo4->ddCaps.dwAlignBoundarySrc : 0x%08lx\n",pHalInfo4->ddCaps.dwAlignBoundarySrc); - printf(" pHalInfo4->ddCaps.dwAlignSizeSrc : 0x%08lx\n",pHalInfo4->ddCaps.dwAlignSizeSrc); - printf(" pHalInfo4->ddCaps.dwAlignBoundaryDes : 0x%08lx\n",pHalInfo4->ddCaps.dwAlignBoundaryDest); - printf(" pHalInfo4->ddCaps.dwAlignSizeDest : 0x%08lx\n",pHalInfo4->ddCaps.dwAlignSizeDest); - printf(" pHalInfo4->ddCaps.dwAlignStrideAlign : 0x%08lx\n",pHalInfo4->ddCaps.dwAlignStrideAlign); - for (t=0;tddCaps.dwRops[0x%04x] : 0x%08lx\n",t,pHalInfo4->ddCaps.dwRops[t]); - } - printf(" pHalInfo4->ddCaps.ddsCaps.dwCaps : 0x%08lx\n",pHalInfo4->ddCaps.ddsCaps.dwCaps); - printf(" pHalInfo4->ddCaps.dwMinOverlayStretch : 0x%08lx\n",pHalInfo4->ddCaps.dwMinOverlayStretch); - printf(" pHalInfo4->ddCaps.dwMaxOverlayStretch : 0x%08lx\n",pHalInfo4->ddCaps.dwMaxOverlayStretch); - printf(" pHalInfo4->ddCaps.dwMinLiveVideoStretch : 0x%08lx\n",pHalInfo4->ddCaps.dwMinLiveVideoStretch); - printf(" pHalInfo4->ddCaps.dwMaxLiveVideoStretch : 0x%08lx\n",pHalInfo4->ddCaps.dwMaxLiveVideoStretch); - printf(" pHalInfo4->ddCaps.dwMinHwCodecStretch : 0x%08lx\n",pHalInfo4->ddCaps.dwMinHwCodecStretch); - printf(" pHalInfo4->ddCaps.dwMaxHwCodecStretch : 0x%08lx\n",pHalInfo4->ddCaps.dwMaxHwCodecStretch); - printf(" pHalInfo4->ddCaps.dwReserved1 : 0x%08lx\n",pHalInfo4->ddCaps.dwReserved1); - printf(" pHalInfo4->ddCaps.dwReserved2 : 0x%08lx\n",pHalInfo4->ddCaps.dwReserved2); - printf(" pHalInfo4->ddCaps.dwReserved3 : 0x%08lx\n",pHalInfo4->ddCaps.dwReserved3); - printf(" pHalInfo4->ddCaps.dwSVBCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwSVBCaps); - printf(" pHalInfo4->ddCaps.dwSVBCKeyCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwSVBCKeyCaps); - printf(" pHalInfo4->ddCaps.dwSVBFXCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwSVBFXCaps); - for (t=0;tddCaps.dwSVBRops[0x%04x] : 0x%08lx\n",t,pHalInfo4->ddCaps.dwSVBRops[t]); - } - printf(" pHalInfo4->ddCaps.dwVSBCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwVSBCaps); - printf(" pHalInfo4->ddCaps.dwVSBCKeyCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwVSBCKeyCaps); - printf(" pHalInfo4->ddCaps.dwVSBFXCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwVSBFXCaps); - for (t=0;tddCaps.dwVSBRops[0x%04x] : 0x%08lx\n",t,pHalInfo4->ddCaps.dwVSBRops[t]); - } - printf(" pHalInfo4->ddCaps.dwSSBCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwSSBCaps); - printf(" pHalInfo4->ddCaps.dwSSBCKeyCa : 0x%08lx\n",pHalInfo4->ddCaps.dwSSBCKeyCaps); - printf(" pHalInfo4->ddCaps.dwSSBFXCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwSSBFXCaps); - for (t=0;tddCaps.dwSSBRops[0x%04x] : 0x%08lx\n",t,pHalInfo4->ddCaps.dwSSBRops[t]); - } - - printf(" pHalInfo4->ddCaps.dwMaxVideoPorts : 0x%08lx\n",pHalInfo4->ddCaps.dwMaxVideoPorts); - printf(" pHalInfo4->ddCaps.dwCurrVideoPorts : 0x%08lx\n",pHalInfo4->ddCaps.dwCurrVideoPorts); - printf(" pHalInfo4->ddCaps.dwSVBCaps2 : 0x%08lx\n",pHalInfo4->ddCaps.dwSVBCaps2); - - - printf(" pHalInfo4->GetDriverInfo : 0x%08lx\n",(long)pHalInfo4->GetDriverInfo); - printf(" pHalInfo4->dwFlags : 0x%08lx\n",(long)pHalInfo4->dwFlags); - - } - else if (pHalInfo->dwSize == sizeof(DD_HALINFO)) - { - int t; - UINT flag; - INT count=0; - - printf("DD_HALINFO Version NT 2000/XP/2003 found \n"); - printf(" pHalInfo->dwSize : 0x%08lx\n",(long)pHalInfo->dwSize); - - printf(" pHalInfo->vmiData->fpPrimary : 0x%08lx\n",(long)pHalInfo->vmiData.fpPrimary); - printf(" pHalInfo->vmiData->dwFlags : 0x%08lx\n",(long)pHalInfo->vmiData.dwFlags); - printf(" pHalInfo->vmiData->dwDisplayWidth : 0x%08lx\n",(long)pHalInfo->vmiData.dwDisplayWidth); - printf(" pHalInfo->vmiData->dwDisplayHeight : 0x%08lx\n",(long)pHalInfo->vmiData.dwDisplayHeight); - printf(" pHalInfo->vmiData->lDisplayPitch : 0x%08lx\n",(long)pHalInfo->vmiData.lDisplayPitch); - - printf(" pHalInfo->vmiData->ddpfDisplay.dwSize : 0x%08lx\n",(long)pHalInfo->vmiData.ddpfDisplay.dwSize); - printf(" pHalInfo->vmiData->ddpfDisplay.dwFlags : 0x%08lx\n",(long)pHalInfo->vmiData.ddpfDisplay.dwFlags); - printf(" pHalInfo->vmiData->ddpfDisplay.dwFourCC : 0x%08lx\n",(long)pHalInfo->vmiData.ddpfDisplay.dwFourCC); - printf(" pHalInfo->vmiData->ddpfDisplay.dwRGBBitCount : 0x%08lx\n",(long)pHalInfo->vmiData.ddpfDisplay.dwRGBBitCount); - printf(" pHalInfo->vmiData->ddpfDisplay.dwRBitMask : 0x%08lx\n",(long)pHalInfo->vmiData.ddpfDisplay.dwRBitMask); - printf(" pHalInfo->vmiData->ddpfDisplay.dwGBitMask : 0x%08lx\n",(long)pHalInfo->vmiData.ddpfDisplay.dwGBitMask); - printf(" pHalInfo->vmiData->ddpfDisplay.dwBBitMask : 0x%08lx\n",(long)pHalInfo->vmiData.ddpfDisplay.dwBBitMask); - printf(" pHalInfo->vmiData->ddpfDisplay.dwRGBAlphaBitMask : 0x%08lx\n",(long)pHalInfo->vmiData.ddpfDisplay.dwRGBAlphaBitMask); - - - printf(" pHalInfo->vmiData->dwOffscreenAlign : 0x%08lx\n",(long)pHalInfo->vmiData.dwOffscreenAlign); - printf(" pHalInfo->vmiData->dwOverlayAlign : 0x%08lx\n",(long)pHalInfo->vmiData.dwOverlayAlign); - printf(" pHalInfo->vmiData->dwTextureAlign : 0x%08lx\n",(long)pHalInfo->vmiData.dwTextureAlign); - printf(" pHalInfo->vmiData->dwZBufferAlign : 0x%08lx\n",(long)pHalInfo->vmiData.dwZBufferAlign); - printf(" pHalInfo->vmiData->dwAlphaAlign : 0x%08lx\n",(long)pHalInfo->vmiData.dwAlphaAlign); - printf(" pHalInfo->vmiData->pvPrimary : 0x%08lx\n",(long)pHalInfo->vmiData.pvPrimary); - - printf(" pHalInfo->ddCaps.dwSize : 0x%08lx\n",pHalInfo->ddCaps.dwSize); - printf(" pHalInfo->ddCaps.dwCaps : "); - flag = pHalInfo->ddCaps.dwCaps; - count = 0; - checkflag(flag,DDCAPS_3D,"DDCAPS_3D"); - checkflag(flag,DDCAPS_ALIGNBOUNDARYDEST,"DDCAPS_ALIGNBOUNDARYDEST"); - checkflag(flag,DDCAPS_ALIGNBOUNDARYSRC,"DDCAPS_ALIGNBOUNDARYSRC"); - checkflag(flag,DDCAPS_ALIGNSIZEDEST,"DDCAPS_ALIGNSIZEDEST"); - checkflag(flag,DDCAPS_ALIGNSIZESRC,"DDCAPS_ALIGNSIZESRC"); - checkflag(flag,DDCAPS_ALIGNSTRIDE,"DDCAPS_ALIGNSTRIDE"); - checkflag(flag,DDCAPS_ALPHA,"DDCAPS_ALPHA"); - checkflag(flag,DDCAPS_BANKSWITCHED,"DDCAPS_BANKSWITCHED"); - checkflag(flag,DDCAPS_BLT,"DDCAPS_BLT"); - checkflag(flag,DDCAPS_BLTCOLORFILL,"DDCAPS_BLTCOLORFILL"); - checkflag(flag,DDCAPS_BLTDEPTHFILL,"DDCAPS_BLTDEPTHFILL"); - checkflag(flag,DDCAPS_BLTFOURCC,"DDCAPS_BLTFOURCC"); - checkflag(flag,DDCAPS_BLTQUEUE,"DDCAPS_BLTQUEUE"); - checkflag(flag,DDCAPS_BLTSTRETCH,"DDCAPS_BLTSTRETCH"); - checkflag(flag,DDCAPS_CANBLTSYSMEM,"DDCAPS_CANBLTSYSMEM"); - checkflag(flag,DDCAPS_CANCLIP,"DDCAPS_CANCLIP"); - checkflag(flag,DDCAPS_CANCLIPSTRETCHED,"DDCAPS_CANCLIPSTRETCHED"); - checkflag(flag,DDCAPS_COLORKEY,"DDCAPS_COLORKEY"); - checkflag(flag,DDCAPS_COLORKEYHWASSIST,"DDCAPS_COLORKEYHWASSIST"); - checkflag(flag,DDCAPS_GDI,"DDCAPS_GDI"); - checkflag(flag,DDCAPS_NOHARDWARE,"DDCAPS_NOHARDWARE"); - checkflag(flag,DDCAPS_OVERLAY,"DDCAPS_OVERLAY"); - checkflag(flag,DDCAPS_OVERLAYCANTCLIP,"DDCAPS_OVERLAYCANTCLIP"); - checkflag(flag,DDCAPS_OVERLAYFOURCC,"DDCAPS_OVERLAYFOURCC"); - checkflag(flag,DDCAPS_OVERLAYSTRETCH,"DDCAPS_OVERLAYSTRETCH"); - checkflag(flag,DDCAPS_PALETTE,"DDCAPS_PALETTE"); - checkflag(flag,DDCAPS_PALETTEVSYNC,"DDCAPS_PALETTEVSYNC"); - checkflag(flag,DDCAPS_READSCANLINE,"DDCAPS_READSCANLINE"); - checkflag(flag,DDCAPS_STEREOVIEW,"DDCAPS_STEREOVIEW"); - checkflag(flag,DDCAPS_VBI,"DDCAPS_VBI"); - checkflag(flag,DDCAPS_ZBLTS,"DDCAPS_ZBLTS"); - checkflag(flag,DDCAPS_ZOVERLAYS,"DDCAPS_ZOVERLAYS"); - endcheckflag(flag,"pHalInfo->ddCaps.dwCaps"); - - printf(" pHalInfo->ddCaps.dwCaps2 : "); - flag = pHalInfo->ddCaps.dwCaps2; - count = 0; - checkflag(flag,DDCAPS2_AUTOFLIPOVERLAY,"DDCAPS2_AUTOFLIPOVERLAY"); - checkflag(flag,DDCAPS2_CANAUTOGENMIPMAP,"DDCAPS2_CANAUTOGENMIPMAP"); - checkflag(flag,DDCAPS2_CANBOBHARDWARE,"DDCAPS2_CANBOBHARDWARE"); - checkflag(flag,DDCAPS2_CANBOBINTERLEAVED,"DDCAPS2_CANBOBINTERLEAVED"); - checkflag(flag,DDCAPS2_CANBOBNONINTERLEAVED,"DDCAPS2_CANBOBNONINTERLEAVED"); - checkflag(flag,DDCAPS2_CANCALIBRATEGAMMA,"DDCAPS2_CANCALIBRATEGAMMA"); - checkflag(flag,DDCAPS2_CANDROPZ16BIT,"DDCAPS2_CANDROPZ16BIT"); - checkflag(flag,DDCAPS2_CANFLIPODDEVEN,"DDCAPS2_CANFLIPODDEVEN"); - checkflag(flag,DDCAPS2_CANMANAGERESOURCE,"DDCAPS2_CANMANAGERESOURCE"); - checkflag(flag,DDCAPS2_CANMANAGETEXTURE,"DDCAPS2_CANMANAGETEXTURE"); - - checkflag(flag,DDCAPS2_CANRENDERWINDOWED,"DDCAPS2_CANRENDERWINDOWED"); - checkflag(flag,DDCAPS2_CERTIFIED,"DDCAPS2_CERTIFIED"); - checkflag(flag,DDCAPS2_COLORCONTROLOVERLAY,"DDCAPS2_COLORCONTROLOVERLAY"); - checkflag(flag,DDCAPS2_COLORCONTROLPRIMARY,"DDCAPS2_COLORCONTROLPRIMARY"); - checkflag(flag,DDCAPS2_COPYFOURCC,"DDCAPS2_COPYFOURCC"); - checkflag(flag,DDCAPS2_FLIPINTERVAL,"DDCAPS2_FLIPINTERVAL"); - checkflag(flag,DDCAPS2_FLIPNOVSYNC,"DDCAPS2_FLIPNOVSYNC"); - checkflag(flag,DDCAPS2_NO2DDURING3DSCENE,"DDCAPS2_NO2DDURING3DSCENE"); - checkflag(flag,DDCAPS2_NONLOCALVIDMEM,"DDCAPS2_NONLOCALVIDMEM"); - checkflag(flag,DDCAPS2_NONLOCALVIDMEMCAPS,"DDCAPS2_NONLOCALVIDMEMCAPS"); - checkflag(flag,DDCAPS2_NOPAGELOCKREQUIRED,"DDCAPS2_NOPAGELOCKREQUIRED"); - checkflag(flag,DDCAPS2_PRIMARYGAMMA,"DDCAPS2_PRIMARYGAMMA"); - checkflag(flag,DDCAPS2_VIDEOPORT,"DDCAPS2_VIDEOPORT"); - checkflag(flag,DDCAPS2_WIDESURFACES,"DDCAPS2_WIDESURFACES"); - endcheckflag(flag,"pHalInfo->ddCaps.dwCaps2"); - - printf(" pHalInfo->ddCaps.dwCKeyCaps : "); - flag = pHalInfo->ddCaps.dwCKeyCaps; - count = 0; - checkflag(flag,DDCKEYCAPS_DESTBLT,"DDCKEYCAPS_DESTBLT"); - checkflag(flag,DDCKEYCAPS_DESTBLTCLRSPACE,"DDCKEYCAPS_DESTBLTCLRSPACE"); - checkflag(flag,DDCKEYCAPS_DESTBLTCLRSPACEYUV,"DDCKEYCAPS_DESTBLTCLRSPACEYUV"); - checkflag(flag,DDCKEYCAPS_DESTBLTYUV,"DDCKEYCAPS_DESTBLTYUV"); - checkflag(flag,DDCKEYCAPS_DESTOVERLAY,"DDCKEYCAPS_DESTOVERLAY"); - checkflag(flag,DDCKEYCAPS_DESTOVERLAYCLRSPACE,"DDCKEYCAPS_DESTOVERLAYCLRSPACE"); - checkflag(flag,DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV,"DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV"); - checkflag(flag,DDCKEYCAPS_DESTOVERLAYONEACTIVE,"DDCKEYCAPS_DESTOVERLAYONEACTIVE"); - checkflag(flag,DDCKEYCAPS_DESTOVERLAYYUV,"DDCKEYCAPS_DESTOVERLAYYUV"); - checkflag(flag,DDCKEYCAPS_NOCOSTOVERLAY,"DDCKEYCAPS_NOCOSTOVERLAY"); - checkflag(flag,DDCKEYCAPS_SRCBLT,"DDCKEYCAPS_SRCBLT"); - checkflag(flag,DDCKEYCAPS_SRCBLTCLRSPACE,"DDCKEYCAPS_SRCBLTCLRSPACE"); - checkflag(flag,DDCKEYCAPS_SRCBLTCLRSPACEYUV,"DDCKEYCAPS_SRCBLTCLRSPACEYUV"); - checkflag(flag,DDCKEYCAPS_SRCBLTYUV,"DDCKEYCAPS_SRCBLTYUV"); - checkflag(flag,DDCKEYCAPS_SRCOVERLAY,"DDCKEYCAPS_SRCOVERLAY"); - checkflag(flag,DDCKEYCAPS_SRCOVERLAYCLRSPACE,"DDCKEYCAPS_SRCOVERLAYCLRSPACE"); - checkflag(flag,DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV,"DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV"); - checkflag(flag,DDCKEYCAPS_SRCOVERLAYONEACTIVE,"DDCKEYCAPS_SRCOVERLAYONEACTIVE"); - checkflag(flag,DDCKEYCAPS_SRCOVERLAYYUV,"DDCKEYCAPS_SRCOVERLAYYUV"); - endcheckflag(flag,"pHalInfo->ddCaps.dwCKeyCaps"); - - printf(" pHalInfo->ddCaps.dwFXCaps : "); - flag = pHalInfo->ddCaps.dwFXCaps; - count = 0; - checkflag(flag,DDFXCAPS_BLTARITHSTRETCHY,"DDFXCAPS_BLTARITHSTRETCHY"); - checkflag(flag,DDFXCAPS_BLTARITHSTRETCHYN,"DDFXCAPS_BLTARITHSTRETCHYN"); - checkflag(flag,DDFXCAPS_BLTMIRRORLEFTRIGHT,"DDFXCAPS_BLTMIRRORLEFTRIGHT"); - checkflag(flag,DDFXCAPS_BLTMIRRORUPDOWN,"DDFXCAPS_BLTMIRRORUPDOWN"); - checkflag(flag,DDFXCAPS_BLTROTATION,"DDFXCAPS_BLTROTATION"); - checkflag(flag,DDFXCAPS_BLTROTATION90,"DDFXCAPS_BLTROTATION90"); - checkflag(flag,DDFXCAPS_BLTSHRINKX,"DDFXCAPS_BLTSHRINKX"); - checkflag(flag,DDFXCAPS_BLTSHRINKXN,"DDFXCAPS_BLTSHRINKXN"); - checkflag(flag,DDFXCAPS_BLTSHRINKY,"DDFXCAPS_BLTSHRINKY"); - checkflag(flag,DDFXCAPS_BLTSHRINKYN,"DDFXCAPS_BLTSHRINKYN"); - checkflag(flag,DDFXCAPS_BLTSTRETCHX,"DDFXCAPS_BLTSTRETCHX"); - checkflag(flag,DDFXCAPS_BLTSTRETCHXN,"DDFXCAPS_BLTSTRETCHXN"); - checkflag(flag,DDFXCAPS_BLTSTRETCHY,"DDFXCAPS_BLTSTRETCHY"); - checkflag(flag,DDFXCAPS_BLTSTRETCHYN,"DDFXCAPS_BLTSTRETCHYN"); - checkflag(flag,DDFXCAPS_OVERLAYARITHSTRETCHY,"DDFXCAPS_OVERLAYARITHSTRETCHY"); - checkflag(flag,DDFXCAPS_OVERLAYARITHSTRETCHYN,"DDFXCAPS_OVERLAYARITHSTRETCHYN"); - checkflag(flag,DDFXCAPS_OVERLAYMIRRORLEFTRIGHT,"DDFXCAPS_OVERLAYMIRRORLEFTRIGHT"); - checkflag(flag,DDFXCAPS_OVERLAYMIRRORUPDOWN,"DDFXCAPS_OVERLAYMIRRORUPDOWN"); - checkflag(flag,DDFXCAPS_OVERLAYSHRINKX,"DDFXCAPS_OVERLAYSHRINKX"); - checkflag(flag,DDFXCAPS_OVERLAYSHRINKXN,"DDFXCAPS_OVERLAYSHRINKXN"); - checkflag(flag,DDFXCAPS_OVERLAYSHRINKY,"DDFXCAPS_OVERLAYSHRINKY"); - checkflag(flag,DDFXCAPS_OVERLAYSHRINKYN,"DDFXCAPS_OVERLAYSHRINKYN"); - checkflag(flag,DDFXCAPS_OVERLAYSTRETCHX,"DDFXCAPS_OVERLAYSTRETCHX"); - checkflag(flag,DDFXCAPS_OVERLAYSTRETCHX,"DDFXCAPS_OVERLAYSTRETCHX"); - checkflag(flag,DDFXCAPS_OVERLAYSTRETCHY,"DDFXCAPS_OVERLAYSTRETCHY"); - checkflag(flag,DDFXCAPS_OVERLAYSTRETCHYN,"DDFXCAPS_OVERLAYSTRETCHYN"); - endcheckflag(flag,"pHalInfo->ddCaps.dwFXCaps"); - - printf(" pHalInfo->ddCaps.dwFXAlphaCaps : 0x%08lx\n",pHalInfo->ddCaps.dwFXAlphaCaps); - printf(" pHalInfo->ddCaps.dwPalCaps : 0x%08lx\n",pHalInfo->ddCaps.dwPalCaps); - - printf(" pHalInfo->ddCaps.dwSVCaps : "); - flag = pHalInfo->ddCaps.dwSVCaps; - count = 0; - checkflag(flag,DDSVCAPS_ENIGMA,"DDSVCAPS_ENIGMA"); - checkflag(flag,DDSVCAPS_FLICKER,"DDSVCAPS_FLICKER"); - checkflag(flag,DDSVCAPS_REDBLUE,"DDSVCAPS_REDBLUE"); - checkflag(flag,DDSVCAPS_SPLIT,"DDSVCAPS_SPLIT"); - endcheckflag(flag,"pHalInfo->ddCaps.dwSVCaps"); - - printf(" pHalInfo->ddCaps.dwAlphaBltConstBitDepths : 0x%08lx\n",pHalInfo->ddCaps.dwAlphaBltConstBitDepths); - printf(" pHalInfo->ddCaps.dwAlphaBltPixelBitDepths : 0x%08lx\n",pHalInfo->ddCaps.dwAlphaBltPixelBitDepths); - printf(" pHalInfo->ddCaps.dwAlphaBltSurfaceBitDepths : 0x%08lx\n",pHalInfo->ddCaps.dwAlphaBltSurfaceBitDepths); - printf(" pHalInfo->ddCaps.dwAlphaOverlayConstBitDepths : 0x%08lx\n",pHalInfo->ddCaps.dwAlphaOverlayConstBitDepths); - printf(" pHalInfo->ddCaps.dwAlphaOverlayPixelBitDepths : 0x%08lx\n",pHalInfo->ddCaps.dwAlphaOverlayPixelBitDepths); - printf(" pHalInfo->ddCaps.dwAlphaOverlaySurfaceBitDepths : 0x%08lx\n",pHalInfo->ddCaps.dwAlphaOverlaySurfaceBitDepths); - printf(" pHalInfo->ddCaps.dwZBufferBitDepths : 0x%08lx\n",pHalInfo->ddCaps.dwZBufferBitDepths); - printf(" pHalInfo->ddCaps.dwVidMemTotal : 0x%08lx\n",pHalInfo->ddCaps.dwVidMemTotal); - printf(" pHalInfo->ddCaps.dwVidMemFree : 0x%08lx\n",pHalInfo->ddCaps.dwVidMemFree); - printf(" pHalInfo->ddCaps.dwMaxVisibleOverlays : 0x%08lx\n",pHalInfo->ddCaps.dwMaxVisibleOverlays); - printf(" pHalInfo->ddCaps.dwCurrVisibleOverlays : 0x%08lx\n",pHalInfo->ddCaps.dwCurrVisibleOverlays); - printf(" pHalInfo->ddCaps.dwNumFourCCCodes : 0x%08lx\n",pHalInfo->ddCaps.dwNumFourCCCodes); - printf(" pHalInfo->ddCaps.dwAlignBoundarySrc : 0x%08lx\n",pHalInfo->ddCaps.dwAlignBoundarySrc); - printf(" pHalInfo->ddCaps.dwAlignSizeSrc : 0x%08lx\n",pHalInfo->ddCaps.dwAlignSizeSrc); - printf(" pHalInfo->ddCaps.dwAlignBoundaryDes : 0x%08lx\n",pHalInfo->ddCaps.dwAlignBoundaryDest); - printf(" pHalInfo->ddCaps.dwAlignSizeDest : 0x%08lx\n",pHalInfo->ddCaps.dwAlignSizeDest); - printf(" pHalInfo->ddCaps.dwAlignStrideAlign : 0x%08lx\n",pHalInfo->ddCaps.dwAlignStrideAlign); - for (t=0;tddCaps.dwRops[0x%04x] : 0x%08lx\n",t,pHalInfo->ddCaps.dwRops[t]); - } - printf(" pHalInfo->ddCaps.ddsCaps.dwCaps : "); - flag = pHalInfo->ddCaps.ddsCaps.dwCaps; - count = 0; - checkflag(flag,DDSCAPS_3DDEVICE,"DDSCAPS_3DDEVICE"); - checkflag(flag,DDSCAPS_ALLOCONLOAD,"DDSCAPS_ALLOCONLOAD"); - checkflag(flag,DDSCAPS_ALPHA,"DDSCAPS_ALPHA"); - checkflag(flag,DDSCAPS_BACKBUFFER,"DDSCAPS_BACKBUFFER"); - checkflag(flag,DDSCAPS_COMPLEX,"DDSCAPS_COMPLEX"); - checkflag(flag,DDSCAPS_EXECUTEBUFFER,"DDSCAPS_EXECUTEBUFFER"); - checkflag(flag,DDSCAPS_FLIP,"DDSCAPS_FLIP"); - checkflag(flag,DDSCAPS_FRONTBUFFER,"DDSCAPS_FRONTBUFFER"); - checkflag(flag,DDSCAPS_HWCODEC,"DDSCAPS_HWCODEC"); - checkflag(flag,DDSCAPS_LIVEVIDEO,"DDSCAPS_LIVEVIDEO"); - checkflag(flag,DDSCAPS_LOCALVIDMEM,"DDSCAPS_LOCALVIDMEM"); - checkflag(flag,DDSCAPS_MIPMAP,"DDSCAPS_MIPMAP"); - checkflag(flag,DDSCAPS_MODEX,"DDSCAPS_MODEX"); - checkflag(flag,DDSCAPS_NONLOCALVIDMEM,"DDSCAPS_NONLOCALVIDMEM"); - checkflag(flag,DDSCAPS_OFFSCREENPLAIN,"DDSCAPS_OFFSCREENPLAIN"); - checkflag(flag,DDSCAPS_OVERLAY,"DDSCAPS_OVERLAY"); - checkflag(flag,DDSCAPS_OPTIMIZED,"DDSCAPS_OPTIMIZED"); - checkflag(flag,DDSCAPS_OWNDC,"DDSCAPS_OWNDC"); - checkflag(flag,DDSCAPS_PALETTE,"DDSCAPS_PALETTE"); - checkflag(flag,DDSCAPS_PRIMARYSURFACE,"DDSCAPS_PRIMARYSURFACE"); - checkflag(flag,DDSCAPS_PRIMARYSURFACELEFT,"DDSCAPS_PRIMARYSURFACELEFT"); - checkflag(flag,DDSCAPS_STANDARDVGAMODE,"DDSCAPS_STANDARDVGAMODE"); - checkflag(flag,DDSCAPS_SYSTEMMEMORY,"DDSCAPS_SYSTEMMEMORY"); - checkflag(flag,DDSCAPS_TEXTURE,"DDSCAPS_TEXTURE"); - checkflag(flag,DDSCAPS_VIDEOMEMORY,"DDSCAPS_VIDEOMEMORY"); - checkflag(flag,DDSCAPS_VIDEOPORT,"DDSCAPS_VIDEOPORT"); - checkflag(flag,DDSCAPS_VISIBLE,"DDSCAPS_VISIBLE"); - checkflag(flag,DDSCAPS_WRITEONLY,"DDSCAPS_WRITEONLY"); - checkflag(flag,DDSCAPS_ZBUFFER,"DDSCAPS_ZBUFFER"); - endcheckflag(flag,"pHalInfo->ddCaps.ddsCaps.dwCaps"); - - printf(" pHalInfo->ddCaps.dwMinOverlayStretch : 0x%08lx\n",pHalInfo->ddCaps.dwMinOverlayStretch); - printf(" pHalInfo->ddCaps.dwMaxOverlayStretch : 0x%08lx\n",pHalInfo->ddCaps.dwMaxOverlayStretch); - printf(" pHalInfo->ddCaps.dwMinLiveVideoStretch : 0x%08lx\n",pHalInfo->ddCaps.dwMinLiveVideoStretch); - printf(" pHalInfo->ddCaps.dwMaxLiveVideoStretch : 0x%08lx\n",pHalInfo->ddCaps.dwMaxLiveVideoStretch); - printf(" pHalInfo->ddCaps.dwMinHwCodecStretch : 0x%08lx\n",pHalInfo->ddCaps.dwMinHwCodecStretch); - printf(" pHalInfo->ddCaps.dwMaxHwCodecStretch : 0x%08lx\n",pHalInfo->ddCaps.dwMaxHwCodecStretch); - printf(" pHalInfo->ddCaps.dwReserved1 : 0x%08lx\n",pHalInfo->ddCaps.dwReserved1); - printf(" pHalInfo->ddCaps.dwReserved2 : 0x%08lx\n",pHalInfo->ddCaps.dwReserved2); - printf(" pHalInfo->ddCaps.dwReserved3 : 0x%08lx\n",pHalInfo->ddCaps.dwReserved3); - - printf(" pHalInfo->ddCaps.dwSVBCaps : "); - flag = pHalInfo->ddCaps.dwSVBCaps; - count = 0; - checkflag(flag,DDCAPS_3D,"DDCAPS_3D"); - checkflag(flag,DDCAPS_ALIGNBOUNDARYDEST,"DDCAPS_ALIGNBOUNDARYDEST"); - checkflag(flag,DDCAPS_ALIGNBOUNDARYSRC,"DDCAPS_ALIGNBOUNDARYSRC"); - checkflag(flag,DDCAPS_ALIGNSIZEDEST,"DDCAPS_ALIGNSIZEDEST"); - checkflag(flag,DDCAPS_ALIGNSIZESRC,"DDCAPS_ALIGNSIZESRC"); - checkflag(flag,DDCAPS_ALIGNSTRIDE,"DDCAPS_ALIGNSTRIDE"); - checkflag(flag,DDCAPS_ALPHA,"DDCAPS_ALPHA"); - checkflag(flag,DDCAPS_BANKSWITCHED,"DDCAPS_BANKSWITCHED"); - checkflag(flag,DDCAPS_BLT,"DDCAPS_BLT"); - checkflag(flag,DDCAPS_BLTCOLORFILL,"DDCAPS_BLTCOLORFILL"); - checkflag(flag,DDCAPS_BLTDEPTHFILL,"DDCAPS_BLTDEPTHFILL"); - checkflag(flag,DDCAPS_BLTFOURCC,"DDCAPS_BLTFOURCC"); - checkflag(flag,DDCAPS_BLTQUEUE,"DDCAPS_BLTQUEUE"); - checkflag(flag,DDCAPS_BLTSTRETCH,"DDCAPS_BLTSTRETCH"); - checkflag(flag,DDCAPS_CANBLTSYSMEM,"DDCAPS_CANBLTSYSMEM"); - checkflag(flag,DDCAPS_CANCLIP,"DDCAPS_CANCLIP"); - checkflag(flag,DDCAPS_CANCLIPSTRETCHED,"DDCAPS_CANCLIPSTRETCHED"); - checkflag(flag,DDCAPS_COLORKEY,"DDCAPS_COLORKEY"); - checkflag(flag,DDCAPS_COLORKEYHWASSIST,"DDCAPS_COLORKEYHWASSIST"); - checkflag(flag,DDCAPS_GDI,"DDCAPS_GDI"); - checkflag(flag,DDCAPS_NOHARDWARE,"DDCAPS_NOHARDWARE"); - checkflag(flag,DDCAPS_OVERLAY,"DDCAPS_OVERLAY"); - checkflag(flag,DDCAPS_OVERLAYCANTCLIP,"DDCAPS_OVERLAYCANTCLIP"); - checkflag(flag,DDCAPS_OVERLAYFOURCC,"DDCAPS_OVERLAYFOURCC"); - checkflag(flag,DDCAPS_OVERLAYSTRETCH,"DDCAPS_OVERLAYSTRETCH"); - checkflag(flag,DDCAPS_PALETTE,"DDCAPS_PALETTE"); - checkflag(flag,DDCAPS_PALETTEVSYNC,"DDCAPS_PALETTEVSYNC"); - checkflag(flag,DDCAPS_READSCANLINE,"DDCAPS_READSCANLINE"); - checkflag(flag,DDCAPS_STEREOVIEW,"DDCAPS_STEREOVIEW"); - checkflag(flag,DDCAPS_VBI,"DDCAPS_VBI"); - checkflag(flag,DDCAPS_ZBLTS,"DDCAPS_ZBLTS"); - checkflag(flag,DDCAPS_ZOVERLAYS,"DDCAPS_ZOVERLAYS"); - endcheckflag(flag,"pHalInfo->ddCaps.dwSVBCaps"); - - printf(" pHalInfo->ddCaps.dwSVBCKeyCaps : 0x%08lx\n",pHalInfo->ddCaps.dwSVBCKeyCaps); - printf(" pHalInfo->ddCaps.dwSVBFXCaps : 0x%08lx\n",pHalInfo->ddCaps.dwSVBFXCaps); - for (t=0;tddCaps.dwSVBRops[0x%04x] : 0x%08lx\n",t,pHalInfo->ddCaps.dwSVBRops[t]); - } - - printf(" pHalInfo->ddCaps.dwVSBCaps : "); - flag = pHalInfo->ddCaps.dwVSBCaps; - count = 0; - checkflag(flag,DDCAPS_3D,"DDCAPS_3D"); - checkflag(flag,DDCAPS_ALIGNBOUNDARYDEST,"DDCAPS_ALIGNBOUNDARYDEST"); - checkflag(flag,DDCAPS_ALIGNBOUNDARYSRC,"DDCAPS_ALIGNBOUNDARYSRC"); - checkflag(flag,DDCAPS_ALIGNSIZEDEST,"DDCAPS_ALIGNSIZEDEST"); - checkflag(flag,DDCAPS_ALIGNSIZESRC,"DDCAPS_ALIGNSIZESRC"); - checkflag(flag,DDCAPS_ALIGNSTRIDE,"DDCAPS_ALIGNSTRIDE"); - checkflag(flag,DDCAPS_ALPHA,"DDCAPS_ALPHA"); - checkflag(flag,DDCAPS_BANKSWITCHED,"DDCAPS_BANKSWITCHED"); - checkflag(flag,DDCAPS_BLT,"DDCAPS_BLT"); - checkflag(flag,DDCAPS_BLTCOLORFILL,"DDCAPS_BLTCOLORFILL"); - checkflag(flag,DDCAPS_BLTDEPTHFILL,"DDCAPS_BLTDEPTHFILL"); - checkflag(flag,DDCAPS_BLTFOURCC,"DDCAPS_BLTFOURCC"); - checkflag(flag,DDCAPS_BLTQUEUE,"DDCAPS_BLTQUEUE"); - checkflag(flag,DDCAPS_BLTSTRETCH,"DDCAPS_BLTSTRETCH"); - checkflag(flag,DDCAPS_CANBLTSYSMEM,"DDCAPS_CANBLTSYSMEM"); - checkflag(flag,DDCAPS_CANCLIP,"DDCAPS_CANCLIP"); - checkflag(flag,DDCAPS_CANCLIPSTRETCHED,"DDCAPS_CANCLIPSTRETCHED"); - checkflag(flag,DDCAPS_COLORKEY,"DDCAPS_COLORKEY"); - checkflag(flag,DDCAPS_COLORKEYHWASSIST,"DDCAPS_COLORKEYHWASSIST"); - checkflag(flag,DDCAPS_GDI,"DDCAPS_GDI"); - checkflag(flag,DDCAPS_NOHARDWARE,"DDCAPS_NOHARDWARE"); - checkflag(flag,DDCAPS_OVERLAY,"DDCAPS_OVERLAY"); - checkflag(flag,DDCAPS_OVERLAYCANTCLIP,"DDCAPS_OVERLAYCANTCLIP"); - checkflag(flag,DDCAPS_OVERLAYFOURCC,"DDCAPS_OVERLAYFOURCC"); - checkflag(flag,DDCAPS_OVERLAYSTRETCH,"DDCAPS_OVERLAYSTRETCH"); - checkflag(flag,DDCAPS_PALETTE,"DDCAPS_PALETTE"); - checkflag(flag,DDCAPS_PALETTEVSYNC,"DDCAPS_PALETTEVSYNC"); - checkflag(flag,DDCAPS_READSCANLINE,"DDCAPS_READSCANLINE"); - checkflag(flag,DDCAPS_STEREOVIEW,"DDCAPS_STEREOVIEW"); - checkflag(flag,DDCAPS_VBI,"DDCAPS_VBI"); - checkflag(flag,DDCAPS_ZBLTS,"DDCAPS_ZBLTS"); - checkflag(flag,DDCAPS_ZOVERLAYS,"DDCAPS_ZOVERLAYS"); - endcheckflag(flag,"pHalInfo->ddCaps.dwVSBCaps"); - - printf(" pHalInfo->ddCaps.dwVSBCKeyCaps : 0x%08lx\n",pHalInfo->ddCaps.dwVSBCKeyCaps); - printf(" pHalInfo->ddCaps.dwVSBFXCaps : 0x%08lx\n",pHalInfo->ddCaps.dwVSBFXCaps); - for (t=0;tddCaps.dwVSBRops[0x%04x] : 0x%08lx\n",t,pHalInfo->ddCaps.dwVSBRops[t]); - } - printf(" pHalInfo->ddCaps.dwSSBCaps : 0x%08lx\n",pHalInfo->ddCaps.dwSSBCaps); - printf(" pHalInfo->ddCaps.dwSSBCKeyCa : 0x%08lx\n",pHalInfo->ddCaps.dwSSBCKeyCaps); - printf(" pHalInfo->ddCaps.dwSSBFXCaps : 0x%08lx\n",pHalInfo->ddCaps.dwSSBFXCaps); - for (t=0;tddCaps.dwSSBRops[0x%04x] : 0x%08lx\n",t,pHalInfo->ddCaps.dwSSBRops[t]); - } - - printf(" pHalInfo->GetDriverInfo : 0x%08lx\n",(long)pHalInfo->GetDriverInfo); - printf(" pHalInfo->dwFlags : "); - - flag = pHalInfo->dwFlags; - count = 0; - checkflag(flag,DDHALINFO_ISPRIMARYDISPLAY,"DDHALINFO_ISPRIMARYDISPLAY"); - checkflag(flag,DDHALINFO_MODEXILLEGAL,"DDHALINFO_MODEXILLEGAL"); - checkflag(flag,DDHALINFO_GETDRIVERINFOSET,"DDHALINFO_GETDRIVERINFOSET"); - checkflag(flag,DDHALINFO_GETDRIVERINFO2,"DDHALINFO_GETDRIVERINFO2"); - endcheckflag(flag,"pHalInfo->dwFlags"); - - printf(" pHalInfo->lpD3DGlobalDriverData : 0x%08lx\n",(long)pHalInfo->lpD3DGlobalDriverData); - printf(" pHalInfo->lpD3DHALCallbacks : 0x%08lx\n",(long)pHalInfo->lpD3DHALCallbacks); - printf(" pHalInfo->lpD3DBufCallbacks : 0x%08lx\n",(long)pHalInfo->lpD3DBufCallbacks); - } - else - { - if (pHalInfo->dwSize !=0) - { - printf("unkonwn dwSize DD_HALINFO : the size found is 0x%08lx\n",pHalInfo->dwSize); - } - else - { - printf("none pHalInfo from the driver 0x%08lx\n",pHalInfo->dwSize); - } - } -} - - -void -dump_D3dCallbacks(D3DNTHAL_CALLBACKS *puD3dCallbacks, char *text) -{ - printf("dumping the D3DNTHAL_CALLBACKS from %s\n",text); - if (puD3dCallbacks->dwSize == sizeof(D3DNTHAL_CALLBACKS)) - { - printf(" puD3dCallbacks->dwSize : 0x%08lx\n",(long)puD3dCallbacks->dwSize); - printf(" puD3dCallbacks->ContextCreate : 0x%08lx\n",(long)puD3dCallbacks->ContextCreate); - printf(" puD3dCallbacks->ContextDestroy : 0x%08lx\n",(long)puD3dCallbacks->ContextDestroy); - printf(" puD3dCallbacks->ContextDestroyAll : 0x%08lx\n",(long)puD3dCallbacks->ContextDestroyAll); - printf(" puD3dCallbacks->SceneCapture : 0x%08lx\n",(long)puD3dCallbacks->SceneCapture); - printf(" puD3dCallbacks->dwReserved10 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved10); - printf(" puD3dCallbacks->dwReserved11 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved11); - printf(" puD3dCallbacks->dwReserved22 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved22); - printf(" puD3dCallbacks->dwReserved23 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved23); - printf(" puD3dCallbacks->dwReserved : 0x%08lx\n",(long)puD3dCallbacks->dwReserved); - printf(" puD3dCallbacks->TextureCreate : 0x%08lx\n",(long)puD3dCallbacks->TextureCreate); - printf(" puD3dCallbacks->TextureDestroy : 0x%08lx\n",(long)puD3dCallbacks->TextureDestroy); - printf(" puD3dCallbacks->TextureSwap : 0x%08lx\n",(long)puD3dCallbacks->TextureSwap); - printf(" puD3dCallbacks->TextureGetSurf : 0x%08lx\n",(long)puD3dCallbacks->TextureGetSurf); - printf(" puD3dCallbacks->dwReserved12 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved12); - printf(" puD3dCallbacks->dwReserved13 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved13); - printf(" puD3dCallbacks->dwReserved14 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved14); - printf(" puD3dCallbacks->dwReserved15 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved15); - printf(" puD3dCallbacks->dwReserved16 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved16); - printf(" puD3dCallbacks->dwReserved17 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved17); - printf(" puD3dCallbacks->dwReserved18 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved18); - printf(" puD3dCallbacks->dwReserved19 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved19); - printf(" puD3dCallbacks->dwReserved20 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved20); - printf(" puD3dCallbacks->dwReserved21 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved21); - printf(" puD3dCallbacks->dwReserved24 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved24); - printf(" puD3dCallbacks->dwReserved0 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved0); - printf(" puD3dCallbacks->dwReserved1 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved1); - printf(" puD3dCallbacks->dwReserved2 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved2); - printf(" puD3dCallbacks->dwReserved3 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved3); - printf(" puD3dCallbacks->dwReserved4 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved4); - printf(" puD3dCallbacks->dwReserved5 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved5); - printf(" puD3dCallbacks->dwReserved6 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved6); - printf(" puD3dCallbacks->dwReserved7 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved7); - printf(" puD3dCallbacks->dwReserved8 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved8); - printf(" puD3dCallbacks->dwReserved9 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved9); - } - else - { - printf("none puD3dCallbacks from the driver 0x%08lx\n",puD3dCallbacks->dwSize); - } -} - - -void -dump_D3dDriverData(D3DNTHAL_GLOBALDRIVERDATA *puD3dDriverData, char *text) -{ - UINT flag = 0; - INT count = 0; - - printf("dumping the D3DNTHAL_GLOBALDRIVERDATA from %s\n",text); - if (puD3dDriverData->dwSize == sizeof(D3DNTHAL_GLOBALDRIVERDATA)) - { - printf(" puD3dDriverData->dwSize : 0x%08lx\n",(long)puD3dDriverData->dwSize); - if (puD3dDriverData->hwCaps.dwSize == sizeof(D3DNTHALDEVICEDESC_V1)) - { - printf(" puD3dDriverData->hwCaps.dwSize : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dwSize); - printf(" puD3dDriverData->hwCaps.dwFlags : "); - - flag = puD3dDriverData->hwCaps.dwFlags; - checkflag(flag,D3DDD_BCLIPPING,"D3DDD_BCLIPPING"); - checkflag(flag,D3DDD_COLORMODEL,"D3DDD_COLORMODEL"); - checkflag(flag,D3DDD_DEVCAPS,"D3DDD_DEVCAPS"); - checkflag(flag,D3DDD_DEVICERENDERBITDEPTH,"D3DDD_DEVICERENDERBITDEPTH"); - checkflag(flag,D3DDD_DEVICEZBUFFERBITDEPTH,"D3DDD_DEVICEZBUFFERBITDEPTH"); - checkflag(flag,D3DDD_LIGHTINGCAPS,"D3DDD_LIGHTINGCAPS"); - checkflag(flag,D3DDD_LINECAPS,"D3DDD_LINECAPS"); - checkflag(flag,D3DDD_MAXBUFFERSIZE,"D3DDD_MAXBUFFERSIZE"); - checkflag(flag,D3DDD_MAXVERTEXCOUNT,"D3DDD_MAXVERTEXCOUNT"); - checkflag(flag,D3DDD_TRANSFORMCAPS,"D3DDD_TRANSFORMCAPS"); - checkflag(flag,D3DDD_TRICAPS,"D3DDD_TRICAPS"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dwFlags "); - - printf(" puD3dDriverData->hwCaps.dcmColorModel : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dcmColorModel); - printf(" puD3dDriverData->hwCaps.dwDevCaps : "); - - count = 0; - flag = puD3dDriverData->hwCaps.dwDevCaps; - checkflag(flag,D3DDEVCAPS_CANBLTSYSTONONLOCAL,"D3DDEVCAPS_CANBLTSYSTONONLOCAL"); - checkflag(flag,D3DDEVCAPS_CANRENDERAFTERFLIP,"D3DDEVCAPS_CANRENDERAFTERFLIP"); - checkflag(flag,D3DDEVCAPS_DRAWPRIMITIVES2,"D3DDEVCAPS_DRAWPRIMITIVES2"); - checkflag(flag,D3DDEVCAPS_DRAWPRIMITIVES2EX,"D3DDEVCAPS_DRAWPRIMITIVES2EX"); - checkflag(flag,D3DDEVCAPS_DRAWPRIMTLVERTEX,"D3DDEVCAPS_DRAWPRIMTLVERTEX"); - checkflag(flag,D3DDEVCAPS_EXECUTESYSTEMMEMORY,"D3DDEVCAPS_EXECUTESYSTEMMEMORY"); - checkflag(flag,D3DDEVCAPS_EXECUTEVIDEOMEMORY,"D3DDEVCAPS_EXECUTEVIDEOMEMORY"); - checkflag(flag,D3DDEVCAPS_FLOATTLVERTEX,"D3DDEVCAPS_FLOATTLVERTEX"); - checkflag(flag,D3DDEVCAPS_HWRASTERIZATION,"D3DDEVCAPS_HWRASTERIZATION"); - checkflag(flag,D3DDEVCAPS_HWTRANSFORMANDLIGHT,"D3DDEVCAPS_HWTRANSFORMANDLIGHT"); - checkflag(flag,D3DDEVCAPS_SEPARATETEXTUREMEMORIES,"D3DDEVCAPS_SEPARATETEXTUREMEMORIES"); - checkflag(flag,D3DDEVCAPS_SORTDECREASINGZ,"D3DDEVCAPS_SORTDECREASINGZ"); - checkflag(flag,D3DDEVCAPS_SORTEXACT,"D3DDEVCAPS_SORTEXACT"); - checkflag(flag,D3DDEVCAPS_SORTINCREASINGZ,"D3DDEVCAPS_SORTINCREASINGZ"); - // not in ddk or dxsdk I have but it is msdn checkflag(flag,D3DDEVCAPS_TEXTURENONLOCALVIDEOMEMORY,"D3DDEVCAPS_TEXTURENONLOCALVIDEOMEMORY"); - checkflag(flag,D3DDEVCAPS_TLVERTEXSYSTEMMEMORY,"D3DDEVCAPS_TLVERTEXSYSTEMMEMORY"); - checkflag(flag,D3DDEVCAPS_TLVERTEXVIDEOMEMORY,"D3DDEVCAPS_TLVERTEXVIDEOMEMORY"); - checkflag(flag,D3DDEVCAPS_TEXTURESYSTEMMEMORY,"D3DDEVCAPS_TEXTURESYSTEMMEMORY"); - checkflag(flag,D3DDEVCAPS_TEXTUREVIDEOMEMORY,"D3DDEVCAPS_TEXTUREVIDEOMEMORY"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dwDevCaps"); - - if (puD3dDriverData->hwCaps.dtcTransformCaps.dwSize == sizeof(D3DTRANSFORMCAPS)) - { - printf(" puD3dDriverData->hwCaps.dtcTransformCaps.dwSize : 0x%08lx\n",(long) puD3dDriverData->hwCaps.dtcTransformCaps.dwSize); - printf(" puD3dDriverData->hwCaps.dtcTransformCaps.dwCaps : "); - - count = 0; - flag = puD3dDriverData->hwCaps.dtcTransformCaps.dwCaps; - checkflag(flag,D3DTRANSFORMCAPS_CLIP,"D3DTRANSFORMCAPS_CLIP"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dtcTransformCaps.dwCaps"); - } - else - { - printf("none puD3dDriverData->hwCaps.dtcTransformCaps.dwSize from the driver 0x%08lx\n",puD3dDriverData->hwCaps.dtcTransformCaps.dwSize); - } - - if (puD3dDriverData->hwCaps.dlcLightingCaps.dwSize == sizeof(D3DLIGHTINGCAPS)) - { - printf(" puD3dDriverData->hwCaps.dlcLightingCaps.dwSize : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dlcLightingCaps.dwSize); - printf(" puD3dDriverData->hwCaps.dlcLightingCaps.dwCaps : "); - - count = 0; - flag = puD3dDriverData->hwCaps.dlcLightingCaps.dwCaps; - - checkflag(flag,D3DLIGHTCAPS_DIRECTIONAL,"D3DLIGHTCAPS_DIRECTIONAL"); - checkflag(flag,D3DLIGHTCAPS_GLSPOT,"D3DLIGHTCAPS_GLSPOT"); - checkflag(flag,D3DLIGHTCAPS_PARALLELPOINT,"D3DLIGHTCAPS_PARALLELPOINT"); - checkflag(flag,D3DLIGHTCAPS_POINT,"D3DLIGHTCAPS_POINT"); - checkflag(flag,D3DLIGHTCAPS_SPOT,"D3DLIGHTCAPS_SPOT"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dlcLightingCaps.dwCaps"); - - printf(" puD3dDriverData->hwCaps.dlcLightingCaps.dwLightingModel : "); - - count = 0; - flag = puD3dDriverData->hwCaps.dlcLightingCaps.dwLightingModel; - - checkflag(flag,D3DLIGHTINGMODEL_MONO,"D3DLIGHTINGMODEL_MONO"); - checkflag(flag,D3DLIGHTINGMODEL_RGB,"D3DLIGHTINGMODEL_RGB"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dlcLightingCaps.dwLightingModel"); - - printf(" puD3dDriverData->hwCaps.dlcLightingCaps.dwNumLights : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dlcLightingCaps.dwNumLights); - } - else - { - printf("none puD3dDriverData->hwCaps.dlcLightingCaps.dwSize from the driver 0x%08lx\n",puD3dDriverData->hwCaps.dlcLightingCaps.dwSize); - } - - - if (puD3dDriverData->hwCaps.dpcLineCaps.dwSize == sizeof(D3DPRIMCAPS)) - { - printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwSize : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dpcLineCaps.dwSize); - - printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwMiscCaps : "); - count = 0; - flag = puD3dDriverData->hwCaps.dpcLineCaps.dwMiscCaps; - checkflag(flag,D3DPMISCCAPS_CONFORMANT,"D3DPMISCCAPS_CONFORMANT"); - checkflag(flag,D3DPMISCCAPS_CULLCCW,"D3DPMISCCAPS_CULLCCW"); - checkflag(flag,D3DPMISCCAPS_CULLCW,"D3DPMISCCAPS_CULLCW"); - checkflag(flag,D3DPMISCCAPS_CULLNONE,"D3DPMISCCAPS_CULLNONE"); - checkflag(flag,D3DPMISCCAPS_LINEPATTERNREP,"D3DPMISCCAPS_LINEPATTERNREP"); - checkflag(flag,D3DPMISCCAPS_MASKPLANES,"D3DPMISCCAPS_MASKPLANES"); - checkflag(flag,D3DPMISCCAPS_MASKZ,"D3DPMISCCAPS_MASKZ"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dpcLineCaps.dwMiscCaps"); - - printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwRasterCaps : "); - count = 0; - flag = puD3dDriverData->hwCaps.dpcLineCaps.dwRasterCaps; - checkflag(flag,D3DPRASTERCAPS_ANISOTROPY,"D3DPRASTERCAPS_ANISOTROPY"); - checkflag(flag,D3DPRASTERCAPS_ANTIALIASEDGES,"D3DPRASTERCAPS_ANTIALIASEDGES"); - checkflag(flag,D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT,"D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT"); - checkflag(flag,D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT,"D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT"); - checkflag(flag,D3DPRASTERCAPS_DITHER,"D3DPRASTERCAPS_DITHER"); - checkflag(flag,D3DPRASTERCAPS_FOGRANGE,"D3DPRASTERCAPS_FOGRANGE"); - checkflag(flag,D3DPRASTERCAPS_FOGTABLE,"D3DPRASTERCAPS_FOGTABLE"); - checkflag(flag,D3DPRASTERCAPS_FOGVERTEX,"D3DPRASTERCAPS_FOGVERTEX"); - checkflag(flag,D3DPRASTERCAPS_PAT,"D3DPRASTERCAPS_PAT"); - checkflag(flag,D3DPRASTERCAPS_ROP2,"D3DPRASTERCAPS_ROP2"); - checkflag(flag,D3DPRASTERCAPS_STIPPLE,"D3DPRASTERCAPS_STIPPLE"); - checkflag(flag,D3DPRASTERCAPS_SUBPIXEL,"D3DPRASTERCAPS_SUBPIXEL"); - checkflag(flag,D3DPRASTERCAPS_SUBPIXELX,"D3DPRASTERCAPS_SUBPIXELX"); - checkflag(flag,D3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT,"D3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT"); - checkflag(flag,D3DPRASTERCAPS_WBUFFER,"D3DPRASTERCAPS_WBUFFER"); - checkflag(flag,D3DPRASTERCAPS_WFOG,"D3DPRASTERCAPS_WFOG"); - checkflag(flag,D3DPRASTERCAPS_XOR,"D3DPRASTERCAPS_XOR"); - checkflag(flag,D3DPRASTERCAPS_ZBIAS,"D3DPRASTERCAPS_ZBIAS"); - checkflag(flag,D3DPRASTERCAPS_ZBUFFERLESSHSR,"D3DPRASTERCAPS_ZBUFFERLESSHSR"); - checkflag(flag,D3DPRASTERCAPS_ZFOG,"D3DPRASTERCAPS_ZFOG"); - checkflag(flag,D3DPRASTERCAPS_ZTEST,"D3DPRASTERCAPS_ZTEST"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dpcLineCaps.dwRasterCaps"); - - printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwZCmpCaps : "); - count = 0; - flag = puD3dDriverData->hwCaps.dpcLineCaps.dwZCmpCaps; - checkflag(flag,D3DPCMPCAPS_ALWAYS,"D3DPCMPCAPS_ALWAYS"); - checkflag(flag,D3DPCMPCAPS_EQUAL,"D3DPCMPCAPS_EQUAL"); - checkflag(flag,D3DPCMPCAPS_GREATER,"D3DPCMPCAPS_GREATER"); - checkflag(flag,D3DPCMPCAPS_GREATEREQUAL,"D3DPCMPCAPS_GREATEREQUAL"); - checkflag(flag,D3DPCMPCAPS_LESS,"D3DPCMPCAPS_LESS"); - checkflag(flag,D3DPCMPCAPS_LESSEQUAL,"D3DPCMPCAPS_LESSEQUAL"); - checkflag(flag,D3DPCMPCAPS_NEVER,"D3DPCMPCAPS_NEVER"); - checkflag(flag,D3DPCMPCAPS_NOTEQUAL,"D3DPCMPCAPS_NOTEQUAL"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dpcLineCaps.dwZCmpCaps "); - - printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwSrcBlendCaps : "); - count = 0; - flag = puD3dDriverData->hwCaps.dpcLineCaps.dwSrcBlendCaps; - checkflag(flag,D3DPBLENDCAPS_BOTHINVSRCALPHA,"D3DPBLENDCAPS_BOTHINVSRCALPHA"); - checkflag(flag,D3DPBLENDCAPS_BOTHSRCALPHA,"D3DPBLENDCAPS_BOTHSRCALPHA"); - checkflag(flag,D3DPBLENDCAPS_DESTALPHA,"D3DPBLENDCAPS_DESTALPHA"); - checkflag(flag,D3DPBLENDCAPS_DESTCOLOR,"D3DPBLENDCAPS_DESTCOLOR"); - checkflag(flag,D3DPBLENDCAPS_INVDESTALPHA,"D3DPBLENDCAPS_INVDESTALPHA"); - checkflag(flag,D3DPBLENDCAPS_INVDESTCOLOR,"D3DPBLENDCAPS_INVDESTCOLOR"); - checkflag(flag,D3DPBLENDCAPS_INVSRCALPHA,"D3DPBLENDCAPS_INVSRCALPHA"); - checkflag(flag,D3DPBLENDCAPS_INVSRCCOLOR,"D3DPBLENDCAPS_INVSRCCOLOR"); - checkflag(flag,D3DPBLENDCAPS_ONE,"D3DPBLENDCAPS_ONE"); - checkflag(flag,D3DPBLENDCAPS_SRCALPHA,"D3DPBLENDCAPS_SRCALPHA"); - checkflag(flag,D3DPBLENDCAPS_SRCALPHASAT,"D3DPBLENDCAPS_SRCALPHASAT"); - checkflag(flag,D3DPBLENDCAPS_SRCCOLOR,"D3DPBLENDCAPS_SRCCOLOR"); - checkflag(flag,D3DPBLENDCAPS_ZERO,"D3DPBLENDCAPS_ZERO"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dpcLineCaps.dwSrcBlendCaps "); - - printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwDestBlendCaps : "); - count = 0; - flag = puD3dDriverData->hwCaps.dpcLineCaps.dwDestBlendCaps; - checkflag(flag,D3DPBLENDCAPS_BOTHINVSRCALPHA,"D3DPBLENDCAPS_BOTHINVSRCALPHA"); - checkflag(flag,D3DPBLENDCAPS_BOTHSRCALPHA,"D3DPBLENDCAPS_BOTHSRCALPHA"); - checkflag(flag,D3DPBLENDCAPS_DESTALPHA,"D3DPBLENDCAPS_DESTALPHA"); - checkflag(flag,D3DPBLENDCAPS_DESTCOLOR,"D3DPBLENDCAPS_DESTCOLOR"); - checkflag(flag,D3DPBLENDCAPS_INVDESTALPHA,"D3DPBLENDCAPS_INVDESTALPHA"); - checkflag(flag,D3DPBLENDCAPS_INVDESTCOLOR,"D3DPBLENDCAPS_INVDESTCOLOR"); - checkflag(flag,D3DPBLENDCAPS_INVSRCALPHA,"D3DPBLENDCAPS_INVSRCALPHA"); - checkflag(flag,D3DPBLENDCAPS_INVSRCCOLOR,"D3DPBLENDCAPS_INVSRCCOLOR"); - checkflag(flag,D3DPBLENDCAPS_ONE,"D3DPBLENDCAPS_ONE"); - checkflag(flag,D3DPBLENDCAPS_SRCALPHA,"D3DPBLENDCAPS_SRCALPHA"); - checkflag(flag,D3DPBLENDCAPS_SRCALPHASAT,"D3DPBLENDCAPS_SRCALPHASAT"); - checkflag(flag,D3DPBLENDCAPS_SRCCOLOR,"D3DPBLENDCAPS_SRCCOLOR"); - checkflag(flag,D3DPBLENDCAPS_ZERO,"D3DPBLENDCAPS_ZERO"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dpcLineCaps.dwDestBlendCaps "); - - printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwAlphaCmpCaps : "); - count = 0; - flag = puD3dDriverData->hwCaps.dpcLineCaps.dwAlphaCmpCaps; - checkflag(flag,D3DPCMPCAPS_ALWAYS,"D3DPCMPCAPS_ALWAYS"); - checkflag(flag,D3DPCMPCAPS_EQUAL,"D3DPCMPCAPS_EQUAL"); - checkflag(flag,D3DPCMPCAPS_GREATER,"D3DPCMPCAPS_GREATER"); - checkflag(flag,D3DPCMPCAPS_GREATEREQUAL,"D3DPCMPCAPS_GREATEREQUAL"); - checkflag(flag,D3DPCMPCAPS_LESS,"D3DPCMPCAPS_LESS"); - checkflag(flag,D3DPCMPCAPS_LESSEQUAL,"D3DPCMPCAPS_LESSEQUAL"); - checkflag(flag,D3DPCMPCAPS_NEVER,"D3DPCMPCAPS_NEVER"); - checkflag(flag,D3DPCMPCAPS_NOTEQUAL,"D3DPCMPCAPS_NOTEQUAL"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dpcLineCaps.dwAlphaCmpCaps "); - - printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwShadeCaps : "); - count = 0; - flag = puD3dDriverData->hwCaps.dpcLineCaps.dwShadeCaps; - checkflag(flag,D3DPSHADECAPS_ALPHAFLATBLEND,"D3DPSHADECAPS_ALPHAFLATBLEND"); - checkflag(flag,D3DPSHADECAPS_ALPHAFLATSTIPPLED,"D3DPSHADECAPS_ALPHAFLATSTIPPLED"); - checkflag(flag,D3DPSHADECAPS_ALPHAGOURAUDBLEND,"D3DPSHADECAPS_ALPHAGOURAUDBLEND"); - checkflag(flag,D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED,"D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED"); - checkflag(flag,D3DPSHADECAPS_ALPHAPHONGBLEND,"D3DPSHADECAPS_ALPHAPHONGBLEND"); - checkflag(flag,D3DPSHADECAPS_ALPHAPHONGSTIPPLED,"D3DPSHADECAPS_ALPHAPHONGSTIPPLED"); - checkflag(flag,D3DPSHADECAPS_COLORFLATMONO,"D3DPSHADECAPS_COLORFLATMONO"); - checkflag(flag,D3DPSHADECAPS_COLORFLATRGB,"D3DPSHADECAPS_COLORFLATRGB"); - checkflag(flag,D3DPSHADECAPS_COLORGOURAUDMONO,"D3DPSHADECAPS_COLORGOURAUDMONO"); - checkflag(flag,D3DPSHADECAPS_COLORGOURAUDRGB,"D3DPSHADECAPS_COLORGOURAUDRGB"); - checkflag(flag,D3DPSHADECAPS_COLORPHONGMONO,"D3DPSHADECAPS_COLORPHONGMONO"); - checkflag(flag,D3DPSHADECAPS_COLORPHONGRGB,"D3DPSHADECAPS_COLORPHONGRGB"); - checkflag(flag,D3DPSHADECAPS_FOGFLAT,"D3DPSHADECAPS_FOGFLAT"); - checkflag(flag,D3DPSHADECAPS_FOGGOURAUD,"D3DPSHADECAPS_FOGGOURAUD"); - checkflag(flag,D3DPSHADECAPS_FOGPHONG,"D3DPSHADECAPS_FOGPHONG"); - checkflag(flag,D3DPSHADECAPS_SPECULARFLATMONO,"D3DPSHADECAPS_SPECULARFLATMONO"); - checkflag(flag,D3DPSHADECAPS_SPECULARFLATRGB,"D3DPSHADECAPS_SPECULARFLATRGB"); - checkflag(flag,D3DPSHADECAPS_SPECULARGOURAUDMONO,"D3DPSHADECAPS_SPECULARGOURAUDMONO"); - checkflag(flag,D3DPSHADECAPS_SPECULARGOURAUDRGB,"D3DPSHADECAPS_SPECULARGOURAUDRGB"); - checkflag(flag,D3DPSHADECAPS_SPECULARPHONGMONO,"D3DPSHADECAPS_SPECULARPHONGMONO"); - checkflag(flag,D3DPSHADECAPS_SPECULARPHONGRGB,"D3DPSHADECAPS_SPECULARPHONGRGB"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dpcLineCaps.dwShadeCaps "); - - printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwTextureCaps : "); - count = 0; - flag = puD3dDriverData->hwCaps.dpcLineCaps.dwTextureCaps; - checkflag(flag,D3DPTEXTURECAPS_ALPHA,"D3DPTEXTURECAPS_ALPHA"); - checkflag(flag,D3DPTEXTURECAPS_ALPHAPALETTE,"D3DPTEXTURECAPS_ALPHAPALETTE"); - checkflag(flag,D3DPTEXTURECAPS_BORDER,"D3DPTEXTURECAPS_BORDER"); - checkflag(flag,D3DPTEXTURECAPS_COLORKEYBLEND,"D3DPTEXTURECAPS_COLORKEYBLEND"); - checkflag(flag,D3DPTEXTURECAPS_CUBEMAP,"D3DPTEXTURECAPS_CUBEMAP"); - checkflag(flag,D3DPTEXTURECAPS_PERSPECTIVE,"D3DPTEXTURECAPS_PERSPECTIVE"); - checkflag(flag,D3DPTEXTURECAPS_POW2,"D3DPTEXTURECAPS_POW2"); - checkflag(flag,D3DPTEXTURECAPS_PROJECTED,"D3DPTEXTURECAPS_PROJECTED"); - checkflag(flag,D3DPTEXTURECAPS_NONPOW2CONDITIONAL,"D3DPTEXTURECAPS_NONPOW2CONDITIONAL"); - checkflag(flag,D3DPTEXTURECAPS_SQUAREONLY,"D3DPTEXTURECAPS_SQUAREONLY"); - // not in ddk or dxsdk but it is in msdn checkflag(flag,D3DPTEXTURECAPS_TEXREPEATNOTSCALESBYSIZE,"D3DPTEXTURECAPS_TEXREPEATNOTSCALESBYSIZE"); - // not in ddk or dxsdk but it is in msdn checkflag(flag,D3DPTEXTURECAPS_TEXTURETRANSFORM,"D3DPTEXTURECAPS_TEXTURETRANSFORM"); - checkflag(flag,D3DPTEXTURECAPS_TRANSPARENCY,"D3DPTEXTURECAPS_TRANSPARENCY"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dpcLineCaps.dwTextureCaps "); - - printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwTextureFilterCaps : "); - count = 0; - flag = puD3dDriverData->hwCaps.dpcLineCaps.dwTextureFilterCaps; - checkflag(flag,D3DPTFILTERCAPS_LINEAR,"D3DPTFILTERCAPS_LINEAR"); - checkflag(flag,D3DPTFILTERCAPS_LINEARMIPLINEAR,"D3DPTFILTERCAPS_LINEARMIPLINEAR"); - checkflag(flag,D3DPTFILTERCAPS_LINEARMIPNEAREST,"D3DPTFILTERCAPS_LINEARMIPNEAREST"); - checkflag(flag,D3DPTFILTERCAPS_MAGFAFLATCUBIC,"D3DPTFILTERCAPS_MAGFAFLATCUBIC"); - checkflag(flag,D3DPTFILTERCAPS_MAGFANISOTROPIC,"D3DPTFILTERCAPS_MAGFANISOTROPIC"); - checkflag(flag,D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC,"D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC"); - checkflag(flag,D3DPTFILTERCAPS_MAGFLINEAR,"D3DPTFILTERCAPS_MAGFLINEAR"); - checkflag(flag,D3DPTFILTERCAPS_MAGFPOINT,"D3DPTFILTERCAPS_MAGFPOINT"); - checkflag(flag,D3DPTFILTERCAPS_MINFANISOTROPIC,"D3DPTFILTERCAPS_MINFANISOTROPIC"); - checkflag(flag,D3DPTFILTERCAPS_MINFLINEAR,"D3DPTFILTERCAPS_MINFLINEAR"); - checkflag(flag,D3DPTFILTERCAPS_MINFPOINT,"D3DPTFILTERCAPS_MINFPOINT"); - checkflag(flag,D3DPTFILTERCAPS_MIPFLINEAR,"D3DPTFILTERCAPS_MIPFLINEAR"); - checkflag(flag,D3DPTFILTERCAPS_MIPFPOINT,"D3DPTFILTERCAPS_MIPFPOINT"); - checkflag(flag,D3DPTFILTERCAPS_MIPLINEAR,"D3DPTFILTERCAPS_MIPLINEAR"); - checkflag(flag,D3DPTFILTERCAPS_MIPNEAREST,"D3DPTFILTERCAPS_MIPNEAREST"); - checkflag(flag,D3DPTFILTERCAPS_NEAREST,"D3DPTFILTERCAPS_NEAREST"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dpcLineCaps.dwTextureFilterCaps "); - - printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwTextureBlendCaps : "); - count = 0; - flag = puD3dDriverData->hwCaps.dpcLineCaps.dwTextureBlendCaps; - checkflag(flag,D3DPTBLENDCAPS_ADD,"D3DPTBLENDCAPS_ADD"); - checkflag(flag,D3DPTBLENDCAPS_COPY,"D3DPTBLENDCAPS_COPY"); - checkflag(flag,D3DPTBLENDCAPS_DECAL,"D3DPTBLENDCAPS_DECAL"); - checkflag(flag,D3DPTBLENDCAPS_DECALALPHA,"D3DPTBLENDCAPS_DECALALPHA"); - checkflag(flag,D3DPTBLENDCAPS_DECALMASK,"D3DPTBLENDCAPS_DECALMASK"); - checkflag(flag,D3DPTBLENDCAPS_MODULATE,"D3DPTBLENDCAPS_MODULATE"); - checkflag(flag,D3DPTBLENDCAPS_MODULATEALPHA,"D3DPTBLENDCAPS_MODULATEALPHA"); - checkflag(flag,D3DPTBLENDCAPS_MODULATEMASK,"D3DPTBLENDCAPS_MODULATEMASK"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dpcLineCaps.dwTextureBlendCaps "); - - printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwTextureAddressCaps : "); - count = 0; - flag = puD3dDriverData->hwCaps.dpcLineCaps.dwTextureAddressCaps; - checkflag(flag,D3DPTADDRESSCAPS_BORDER,"D3DPTADDRESSCAPS_BORDER"); - checkflag(flag,D3DPTADDRESSCAPS_CLAMP,"D3DPTADDRESSCAPS_CLAMP"); - checkflag(flag,D3DPTADDRESSCAPS_INDEPENDENTUV,"D3DPTADDRESSCAPS_INDEPENDENTUV"); - checkflag(flag,D3DPTADDRESSCAPS_MIRROR,"D3DPTADDRESSCAPS_MIRROR"); - checkflag(flag,D3DPTADDRESSCAPS_WRAP,"D3DPTADDRESSCAPS_WRAP"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dpcLineCaps.dwTextureAddressCaps "); - - printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwStippleWidth : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dpcLineCaps.dwStippleWidth); - printf(" puD3dDriverData->hwCaps.dpcLineCaps.dwStippleHeight : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dpcLineCaps.dwStippleHeight); - } - else - { - printf("none puD3dDriverData->hwCaps.dpcLineCaps.dwSize from the driver 0x%08lx\n",puD3dDriverData->hwCaps.dpcLineCaps.dwSize); - } - - if (puD3dDriverData->hwCaps.dpcTriCaps.dwSize == sizeof(D3DPRIMCAPS)) - { - printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwSize : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dpcTriCaps.dwSize); - - printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwMiscCaps : "); - count = 0; - flag = puD3dDriverData->hwCaps.dpcTriCaps.dwMiscCaps; - checkflag(flag,D3DPMISCCAPS_CONFORMANT,"D3DPMISCCAPS_CONFORMANT"); - checkflag(flag,D3DPMISCCAPS_CULLCCW,"D3DPMISCCAPS_CULLCCW"); - checkflag(flag,D3DPMISCCAPS_CULLCW,"D3DPMISCCAPS_CULLCW"); - checkflag(flag,D3DPMISCCAPS_CULLNONE,"D3DPMISCCAPS_CULLNONE"); - checkflag(flag,D3DPMISCCAPS_LINEPATTERNREP,"D3DPMISCCAPS_LINEPATTERNREP"); - checkflag(flag,D3DPMISCCAPS_MASKPLANES,"D3DPMISCCAPS_MASKPLANES"); - checkflag(flag,D3DPMISCCAPS_MASKZ,"D3DPMISCCAPS_MASKZ"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dpcTriCaps.dwMiscCaps"); - - printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwRasterCaps : "); - count = 0; - flag = puD3dDriverData->hwCaps.dpcTriCaps.dwRasterCaps; - checkflag(flag,D3DPRASTERCAPS_ANISOTROPY,"D3DPRASTERCAPS_ANISOTROPY"); - checkflag(flag,D3DPRASTERCAPS_ANTIALIASEDGES,"D3DPRASTERCAPS_ANTIALIASEDGES"); - checkflag(flag,D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT,"D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT"); - checkflag(flag,D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT,"D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT"); - checkflag(flag,D3DPRASTERCAPS_DITHER,"D3DPRASTERCAPS_DITHER"); - checkflag(flag,D3DPRASTERCAPS_FOGRANGE,"D3DPRASTERCAPS_FOGRANGE"); - checkflag(flag,D3DPRASTERCAPS_FOGTABLE,"D3DPRASTERCAPS_FOGTABLE"); - checkflag(flag,D3DPRASTERCAPS_FOGVERTEX,"D3DPRASTERCAPS_FOGVERTEX"); - checkflag(flag,D3DPRASTERCAPS_PAT,"D3DPRASTERCAPS_PAT"); - checkflag(flag,D3DPRASTERCAPS_ROP2,"D3DPRASTERCAPS_ROP2"); - checkflag(flag,D3DPRASTERCAPS_STIPPLE,"D3DPRASTERCAPS_STIPPLE"); - checkflag(flag,D3DPRASTERCAPS_SUBPIXEL,"D3DPRASTERCAPS_SUBPIXEL"); - checkflag(flag,D3DPRASTERCAPS_SUBPIXELX,"D3DPRASTERCAPS_SUBPIXELX"); - checkflag(flag,D3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT,"D3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT"); - checkflag(flag,D3DPRASTERCAPS_WBUFFER,"D3DPRASTERCAPS_WBUFFER"); - checkflag(flag,D3DPRASTERCAPS_WFOG,"D3DPRASTERCAPS_WFOG"); - checkflag(flag,D3DPRASTERCAPS_XOR,"D3DPRASTERCAPS_XOR"); - checkflag(flag,D3DPRASTERCAPS_ZBIAS,"D3DPRASTERCAPS_ZBIAS"); - checkflag(flag,D3DPRASTERCAPS_ZBUFFERLESSHSR,"D3DPRASTERCAPS_ZBUFFERLESSHSR"); - checkflag(flag,D3DPRASTERCAPS_ZFOG,"D3DPRASTERCAPS_ZFOG"); - checkflag(flag,D3DPRASTERCAPS_ZTEST,"D3DPRASTERCAPS_ZTEST"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dpcTriCaps.dwRasterCaps"); - - printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwZCmpCaps : "); - count = 0; - flag = puD3dDriverData->hwCaps.dpcTriCaps.dwZCmpCaps; - checkflag(flag,D3DPCMPCAPS_ALWAYS,"D3DPCMPCAPS_ALWAYS"); - checkflag(flag,D3DPCMPCAPS_EQUAL,"D3DPCMPCAPS_EQUAL"); - checkflag(flag,D3DPCMPCAPS_GREATER,"D3DPCMPCAPS_GREATER"); - checkflag(flag,D3DPCMPCAPS_GREATEREQUAL,"D3DPCMPCAPS_GREATEREQUAL"); - checkflag(flag,D3DPCMPCAPS_LESS,"D3DPCMPCAPS_LESS"); - checkflag(flag,D3DPCMPCAPS_LESSEQUAL,"D3DPCMPCAPS_LESSEQUAL"); - checkflag(flag,D3DPCMPCAPS_NEVER,"D3DPCMPCAPS_NEVER"); - checkflag(flag,D3DPCMPCAPS_NOTEQUAL,"D3DPCMPCAPS_NOTEQUAL"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dpcTriCaps.dwZCmpCaps "); - - printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwSrcBlendCaps : "); - count = 0; - flag = puD3dDriverData->hwCaps.dpcTriCaps.dwSrcBlendCaps; - checkflag(flag,D3DPBLENDCAPS_BOTHINVSRCALPHA,"D3DPBLENDCAPS_BOTHINVSRCALPHA"); - checkflag(flag,D3DPBLENDCAPS_BOTHSRCALPHA,"D3DPBLENDCAPS_BOTHSRCALPHA"); - checkflag(flag,D3DPBLENDCAPS_DESTALPHA,"D3DPBLENDCAPS_DESTALPHA"); - checkflag(flag,D3DPBLENDCAPS_DESTCOLOR,"D3DPBLENDCAPS_DESTCOLOR"); - checkflag(flag,D3DPBLENDCAPS_INVDESTALPHA,"D3DPBLENDCAPS_INVDESTALPHA"); - checkflag(flag,D3DPBLENDCAPS_INVDESTCOLOR,"D3DPBLENDCAPS_INVDESTCOLOR"); - checkflag(flag,D3DPBLENDCAPS_INVSRCALPHA,"D3DPBLENDCAPS_INVSRCALPHA"); - checkflag(flag,D3DPBLENDCAPS_INVSRCCOLOR,"D3DPBLENDCAPS_INVSRCCOLOR"); - checkflag(flag,D3DPBLENDCAPS_ONE,"D3DPBLENDCAPS_ONE"); - checkflag(flag,D3DPBLENDCAPS_SRCALPHA,"D3DPBLENDCAPS_SRCALPHA"); - checkflag(flag,D3DPBLENDCAPS_SRCALPHASAT,"D3DPBLENDCAPS_SRCALPHASAT"); - checkflag(flag,D3DPBLENDCAPS_SRCCOLOR,"D3DPBLENDCAPS_SRCCOLOR"); - checkflag(flag,D3DPBLENDCAPS_ZERO,"D3DPBLENDCAPS_ZERO"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dpcTriCaps.dwSrcBlendCaps "); - - printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwDestBlendCaps : "); - count = 0; - flag = puD3dDriverData->hwCaps.dpcTriCaps.dwDestBlendCaps; - checkflag(flag,D3DPBLENDCAPS_BOTHINVSRCALPHA,"D3DPBLENDCAPS_BOTHINVSRCALPHA"); - checkflag(flag,D3DPBLENDCAPS_BOTHSRCALPHA,"D3DPBLENDCAPS_BOTHSRCALPHA"); - checkflag(flag,D3DPBLENDCAPS_DESTALPHA,"D3DPBLENDCAPS_DESTALPHA"); - checkflag(flag,D3DPBLENDCAPS_DESTCOLOR,"D3DPBLENDCAPS_DESTCOLOR"); - checkflag(flag,D3DPBLENDCAPS_INVDESTALPHA,"D3DPBLENDCAPS_INVDESTALPHA"); - checkflag(flag,D3DPBLENDCAPS_INVDESTCOLOR,"D3DPBLENDCAPS_INVDESTCOLOR"); - checkflag(flag,D3DPBLENDCAPS_INVSRCALPHA,"D3DPBLENDCAPS_INVSRCALPHA"); - checkflag(flag,D3DPBLENDCAPS_INVSRCCOLOR,"D3DPBLENDCAPS_INVSRCCOLOR"); - checkflag(flag,D3DPBLENDCAPS_ONE,"D3DPBLENDCAPS_ONE"); - checkflag(flag,D3DPBLENDCAPS_SRCALPHA,"D3DPBLENDCAPS_SRCALPHA"); - checkflag(flag,D3DPBLENDCAPS_SRCALPHASAT,"D3DPBLENDCAPS_SRCALPHASAT"); - checkflag(flag,D3DPBLENDCAPS_SRCCOLOR,"D3DPBLENDCAPS_SRCCOLOR"); - checkflag(flag,D3DPBLENDCAPS_ZERO,"D3DPBLENDCAPS_ZERO"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dpcTriCaps.dwDestBlendCaps "); - - printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwAlphaCmpCaps : "); - count = 0; - flag = puD3dDriverData->hwCaps.dpcTriCaps.dwAlphaCmpCaps; - checkflag(flag,D3DPCMPCAPS_ALWAYS,"D3DPCMPCAPS_ALWAYS"); - checkflag(flag,D3DPCMPCAPS_EQUAL,"D3DPCMPCAPS_EQUAL"); - checkflag(flag,D3DPCMPCAPS_GREATER,"D3DPCMPCAPS_GREATER"); - checkflag(flag,D3DPCMPCAPS_GREATEREQUAL,"D3DPCMPCAPS_GREATEREQUAL"); - checkflag(flag,D3DPCMPCAPS_LESS,"D3DPCMPCAPS_LESS"); - checkflag(flag,D3DPCMPCAPS_LESSEQUAL,"D3DPCMPCAPS_LESSEQUAL"); - checkflag(flag,D3DPCMPCAPS_NEVER,"D3DPCMPCAPS_NEVER"); - checkflag(flag,D3DPCMPCAPS_NOTEQUAL,"D3DPCMPCAPS_NOTEQUAL"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dpcTriCaps.dwAlphaCmpCaps "); - - printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwShadeCaps : "); - count = 0; - flag = puD3dDriverData->hwCaps.dpcTriCaps.dwShadeCaps; - checkflag(flag,D3DPSHADECAPS_ALPHAFLATBLEND,"D3DPSHADECAPS_ALPHAFLATBLEND"); - checkflag(flag,D3DPSHADECAPS_ALPHAFLATSTIPPLED,"D3DPSHADECAPS_ALPHAFLATSTIPPLED"); - checkflag(flag,D3DPSHADECAPS_ALPHAGOURAUDBLEND,"D3DPSHADECAPS_ALPHAGOURAUDBLEND"); - checkflag(flag,D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED,"D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED"); - checkflag(flag,D3DPSHADECAPS_ALPHAPHONGBLEND,"D3DPSHADECAPS_ALPHAPHONGBLEND"); - checkflag(flag,D3DPSHADECAPS_ALPHAPHONGSTIPPLED,"D3DPSHADECAPS_ALPHAPHONGSTIPPLED"); - checkflag(flag,D3DPSHADECAPS_COLORFLATMONO,"D3DPSHADECAPS_COLORFLATMONO"); - checkflag(flag,D3DPSHADECAPS_COLORFLATRGB,"D3DPSHADECAPS_COLORFLATRGB"); - checkflag(flag,D3DPSHADECAPS_COLORGOURAUDMONO,"D3DPSHADECAPS_COLORGOURAUDMONO"); - checkflag(flag,D3DPSHADECAPS_COLORGOURAUDRGB,"D3DPSHADECAPS_COLORGOURAUDRGB"); - checkflag(flag,D3DPSHADECAPS_COLORPHONGMONO,"D3DPSHADECAPS_COLORPHONGMONO"); - checkflag(flag,D3DPSHADECAPS_COLORPHONGRGB,"D3DPSHADECAPS_COLORPHONGRGB"); - checkflag(flag,D3DPSHADECAPS_FOGFLAT,"D3DPSHADECAPS_FOGFLAT"); - checkflag(flag,D3DPSHADECAPS_FOGGOURAUD,"D3DPSHADECAPS_FOGGOURAUD"); - checkflag(flag,D3DPSHADECAPS_FOGPHONG,"D3DPSHADECAPS_FOGPHONG"); - checkflag(flag,D3DPSHADECAPS_SPECULARFLATMONO,"D3DPSHADECAPS_SPECULARFLATMONO"); - checkflag(flag,D3DPSHADECAPS_SPECULARFLATRGB,"D3DPSHADECAPS_SPECULARFLATRGB"); - checkflag(flag,D3DPSHADECAPS_SPECULARGOURAUDMONO,"D3DPSHADECAPS_SPECULARGOURAUDMONO"); - checkflag(flag,D3DPSHADECAPS_SPECULARGOURAUDRGB,"D3DPSHADECAPS_SPECULARGOURAUDRGB"); - checkflag(flag,D3DPSHADECAPS_SPECULARPHONGMONO,"D3DPSHADECAPS_SPECULARPHONGMONO"); - checkflag(flag,D3DPSHADECAPS_SPECULARPHONGRGB,"D3DPSHADECAPS_SPECULARPHONGRGB"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dpcTriCaps.dwShadeCaps "); - - printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwTextureCaps : "); - count = 0; - flag = puD3dDriverData->hwCaps.dpcTriCaps.dwTextureCaps; - checkflag(flag,D3DPTEXTURECAPS_ALPHA,"D3DPTEXTURECAPS_ALPHA"); - checkflag(flag,D3DPTEXTURECAPS_ALPHAPALETTE,"D3DPTEXTURECAPS_ALPHAPALETTE"); - checkflag(flag,D3DPTEXTURECAPS_BORDER,"D3DPTEXTURECAPS_BORDER"); - checkflag(flag,D3DPTEXTURECAPS_COLORKEYBLEND,"D3DPTEXTURECAPS_COLORKEYBLEND"); - checkflag(flag,D3DPTEXTURECAPS_CUBEMAP,"D3DPTEXTURECAPS_CUBEMAP"); - checkflag(flag,D3DPTEXTURECAPS_PERSPECTIVE,"D3DPTEXTURECAPS_PERSPECTIVE"); - checkflag(flag,D3DPTEXTURECAPS_POW2,"D3DPTEXTURECAPS_POW2"); - checkflag(flag,D3DPTEXTURECAPS_PROJECTED,"D3DPTEXTURECAPS_PROJECTED"); - checkflag(flag,D3DPTEXTURECAPS_NONPOW2CONDITIONAL,"D3DPTEXTURECAPS_NONPOW2CONDITIONAL"); - checkflag(flag,D3DPTEXTURECAPS_SQUAREONLY,"D3DPTEXTURECAPS_SQUAREONLY"); - //not in ddk or dxsdk but it is in msdn checkflag(flag,D3DPTEXTURECAPS_TEXREPEATNOTSCALESBYSIZE,"D3DPTEXTURECAPS_TEXREPEATNOTSCALESBYSIZE"); - //not in ddk or dxsdk but it is in msdn checkflag(flag,D3DPTEXTURECAPS_TEXTURETRANSFORM,"D3DPTEXTURECAPS_TEXTURETRANSFORM"); - checkflag(flag,D3DPTEXTURECAPS_TRANSPARENCY,"D3DPTEXTURECAPS_TRANSPARENCY"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dpcTriCaps.dwTextureCaps "); - - printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwTextureFilterCaps : "); - count = 0; - flag = puD3dDriverData->hwCaps.dpcTriCaps.dwTextureFilterCaps; - checkflag(flag,D3DPTFILTERCAPS_LINEAR,"D3DPTFILTERCAPS_LINEAR"); - checkflag(flag,D3DPTFILTERCAPS_LINEARMIPLINEAR,"D3DPTFILTERCAPS_LINEARMIPLINEAR"); - checkflag(flag,D3DPTFILTERCAPS_LINEARMIPNEAREST,"D3DPTFILTERCAPS_LINEARMIPNEAREST"); - checkflag(flag,D3DPTFILTERCAPS_MAGFAFLATCUBIC,"D3DPTFILTERCAPS_MAGFAFLATCUBIC"); - checkflag(flag,D3DPTFILTERCAPS_MAGFANISOTROPIC,"D3DPTFILTERCAPS_MAGFANISOTROPIC"); - checkflag(flag,D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC,"D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC"); - checkflag(flag,D3DPTFILTERCAPS_MAGFLINEAR,"D3DPTFILTERCAPS_MAGFLINEAR"); - checkflag(flag,D3DPTFILTERCAPS_MAGFPOINT,"D3DPTFILTERCAPS_MAGFPOINT"); - checkflag(flag,D3DPTFILTERCAPS_MINFANISOTROPIC,"D3DPTFILTERCAPS_MINFANISOTROPIC"); - checkflag(flag,D3DPTFILTERCAPS_MINFLINEAR,"D3DPTFILTERCAPS_MINFLINEAR"); - checkflag(flag,D3DPTFILTERCAPS_MINFPOINT,"D3DPTFILTERCAPS_MINFPOINT"); - checkflag(flag,D3DPTFILTERCAPS_MIPFLINEAR,"D3DPTFILTERCAPS_MIPFLINEAR"); - checkflag(flag,D3DPTFILTERCAPS_MIPFPOINT,"D3DPTFILTERCAPS_MIPFPOINT"); - checkflag(flag,D3DPTFILTERCAPS_MIPLINEAR,"D3DPTFILTERCAPS_MIPLINEAR"); - checkflag(flag,D3DPTFILTERCAPS_MIPNEAREST,"D3DPTFILTERCAPS_MIPNEAREST"); - checkflag(flag,D3DPTFILTERCAPS_NEAREST,"D3DPTFILTERCAPS_NEAREST"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dpcTriCaps.dwTextureFilterCaps "); - - printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwTextureBlendCaps : "); - count = 0; - flag = puD3dDriverData->hwCaps.dpcTriCaps.dwTextureBlendCaps; - checkflag(flag,D3DPTBLENDCAPS_ADD,"D3DPTBLENDCAPS_ADD"); - checkflag(flag,D3DPTBLENDCAPS_COPY,"D3DPTBLENDCAPS_COPY"); - checkflag(flag,D3DPTBLENDCAPS_DECAL,"D3DPTBLENDCAPS_DECAL"); - checkflag(flag,D3DPTBLENDCAPS_DECALALPHA,"D3DPTBLENDCAPS_DECALALPHA"); - checkflag(flag,D3DPTBLENDCAPS_DECALMASK,"D3DPTBLENDCAPS_DECALMASK"); - checkflag(flag,D3DPTBLENDCAPS_MODULATE,"D3DPTBLENDCAPS_MODULATE"); - checkflag(flag,D3DPTBLENDCAPS_MODULATEALPHA,"D3DPTBLENDCAPS_MODULATEALPHA"); - checkflag(flag,D3DPTBLENDCAPS_MODULATEMASK,"D3DPTBLENDCAPS_MODULATEMASK"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dpcTriCaps.dwTextureBlendCaps "); - - printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwTextureAddressCaps : "); - count = 0; - flag = puD3dDriverData->hwCaps.dpcTriCaps.dwTextureAddressCaps; - checkflag(flag,D3DPTADDRESSCAPS_BORDER,"D3DPTADDRESSCAPS_BORDER"); - checkflag(flag,D3DPTADDRESSCAPS_CLAMP,"D3DPTADDRESSCAPS_CLAMP"); - checkflag(flag,D3DPTADDRESSCAPS_INDEPENDENTUV,"D3DPTADDRESSCAPS_INDEPENDENTUV"); - checkflag(flag,D3DPTADDRESSCAPS_MIRROR,"D3DPTADDRESSCAPS_MIRROR"); - checkflag(flag,D3DPTADDRESSCAPS_WRAP,"D3DPTADDRESSCAPS_WRAP"); - endcheckflag(flag,"puD3dDriverData->hwCaps.dpcTriCaps.dwTextureAddressCaps "); - - printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwStippleWidth : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dpcTriCaps.dwStippleWidth); - printf(" puD3dDriverData->hwCaps.dpcTriCaps.dwStippleHeight : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dpcTriCaps.dwStippleHeight); - } - else - { - printf("none puD3dDriverData->hwCaps.dpcTriCaps.dwSize from the driver 0x%08lx\n",puD3dDriverData->hwCaps.dpcTriCaps.dwSize); - } - - printf(" puD3dDriverData->hwCaps.dwDeviceRenderBitDepth : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dwDeviceRenderBitDepth); - printf(" puD3dDriverData->hwCaps.dwDeviceZBufferBitDepth : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dwDeviceZBufferBitDepth); - printf(" puD3dDriverData->hwCaps.dwMaxBufferSize : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dwMaxBufferSize); - printf(" puD3dDriverData->hwCaps.dwMaxVertexCount : 0x%08lx\n",(long)puD3dDriverData->hwCaps.dwMaxVertexCount); - } - else - { - printf("none puD3dDriverData->hwCaps.dwSize from the driver 0x%08lx\n",puD3dDriverData->hwCaps.dwSize); - } - - printf(" puD3dDriverData->dwNumVertices : 0x%08lx\n",(long)puD3dDriverData->dwNumVertices); - printf(" puD3dDriverData->dwNumClipVertices : 0x%08lx\n",(long)puD3dDriverData->dwNumClipVertices); - printf(" puD3dDriverData->dwNumTextureFormats : 0x%08lx\n",(long)puD3dDriverData->dwNumTextureFormats); - printf(" puD3dDriverData->lpTextureFormats : 0x%08lx\n",(long)puD3dDriverData->lpTextureFormats); - printf(" puD3dDriverData->lpTextureFormats : 0x%08lx\n",(long)puD3dDriverData->lpTextureFormats); - } - else - { - printf("none puD3dDriverData from the driver 0x%08lx\n",puD3dDriverData->dwSize); - } -} - - -void -dump_D3dBufferCallbacks(DD_D3DBUFCALLBACKS *puD3dBufferCallbacks, char *text) -{ - int count = 0; - DWORD flag = 0; - - printf("dumping the DD_D3DBUFCALLBACKS from %s\n",text); - - if (puD3dBufferCallbacks->dwSize == sizeof(DD_D3DBUFCALLBACKS)) - { - printf(" puD3dBufferCallbacks->dwSize : 0x%08lx\n",(long)puD3dBufferCallbacks->dwSize); - printf(" puD3dBufferCallbacks->dwFlags : "); - - /* rember this flags are not in msdn only in ms ddk */ - count = 0; - flag = puD3dBufferCallbacks->dwFlags; - checkflag(flag,DDHAL_D3DBUFCB32_CANCREATED3DBUF,"DDHAL_D3DBUFCB32_CANCREATED3DBUF"); - checkflag(flag,DDHAL_D3DBUFCB32_CREATED3DBUF,"DDHAL_D3DBUFCB32_CREATED3DBUF"); - - checkflag(flag,DDHAL_D3DBUFCB32_DESTROYD3DBUF,"DDHAL_D3DBUFCB32_DESTROYD3DBUF"); - - checkflag(flag,DDHAL_D3DBUFCB32_LOCKD3DBUF,"DDHAL_D3DBUFCB32_LOCKD3DBUF"); - checkflag(flag,DDHAL_D3DBUFCB32_UNLOCKD3DBUF,"DDHAL_D3DBUFCB32_UNLOCKD3DBUF"); - endcheckflag(flag,"puD3dBufferCallbacks->dwFlags"); - - printf(" puD3dBufferCallbacks->CanCreateD3DBuffer : 0x%08lx\n",(long)puD3dBufferCallbacks->CanCreateD3DBuffer); - printf(" puD3dBufferCallbacks->CreateD3DBuffer : 0x%08lx\n",(long)puD3dBufferCallbacks->CreateD3DBuffer); - printf(" puD3dBufferCallbacks->DestroyD3DBuffer : 0x%08lx\n",(long)puD3dBufferCallbacks->DestroyD3DBuffer); - printf(" puD3dBufferCallbacks->LockD3DBuffer : 0x%08lx\n",(long)puD3dBufferCallbacks->LockD3DBuffer); - printf(" puD3dBufferCallbacks->UnlockD3DBuffer : 0x%08lx\n",(long)puD3dBufferCallbacks->UnlockD3DBuffer); - } - else - { - printf("none puD3dBufferCallbacks from the driver 0x%08lx\n",puD3dBufferCallbacks->dwSize); - } - -} - -void -dump_D3dTextureFormats(DDSURFACEDESC *puD3dTextureFormats, int dwNum, char *text) -{ - int t=0; - int count = 0; - DWORD flag = 0; - DDSURFACEDESC * myTextureFormats = puD3dTextureFormats; - - printf("dumping the DDSURFACEDESC/DDSURFACEDESC2 from %s\n",text); - - for (t=0;tdwSize == sizeof(DDSURFACEDESC)) - { - printf(" puD3dTextureFormats->dwSize : 0x%08lx\n",(long)myTextureFormats->dwSize); - - printf(" puD3dTextureFormats->dwFlags : "); - count = 0; - flag = myTextureFormats->dwFlags; - checkflag(flag,DDSD_ALPHABITDEPTH,"DDSD_ALPHABITDEPTH"); - checkflag(flag,DDSD_BACKBUFFERCOUNT ,"DDSD_BACKBUFFERCOUNT"); - checkflag(flag,DDSD_CAPS,"DDSD_CAPS "); - checkflag(flag,DDSD_CKDESTBLT,"DDSD_CKDESTBLT"); - checkflag(flag,DDSD_CKDESTOVERLAY,"DDSD_CKDESTOVERLAY"); - checkflag(flag,DDSD_CKSRCBLT,"DDSD_CKSRCBLT"); - checkflag(flag,DDSD_CKSRCOVERLAY,"DDSD_CKSRCOVERLAY"); - checkflag(flag,DDSD_HEIGHT,"DDSD_HEIGHT"); - checkflag(flag,DDSD_LINEARSIZE,"DDSD_LINEARSIZE"); - checkflag(flag,DDSD_LPSURFACE,"DDSD_LPSURFACE"); - checkflag(flag,DDSD_MIPMAPCOUNT,"DDSD_MIPMAPCOUNT"); - checkflag(flag,DDSD_PITCH,"DDSD_PITCH"); - checkflag(flag,DDSD_PIXELFORMAT,"DDSD_PIXELFORMAT"); - checkflag(flag,DDSD_REFRESHRATE,"DDSD_REFRESHRATE"); - checkflag(flag,DDSD_WIDTH,"DDSD_WIDTH"); - checkflag(flag,DDSD_ZBUFFERBITDEPTH,"DDSD_ZBUFFERBITDEPTH"); - endcheckflag(flag,"puD3dTextureFormats->dwFlags"); - - printf(" puD3dTextureFormats->dwHeight : 0x%08lx\n",(long)myTextureFormats->dwHeight); - printf(" puD3dTextureFormats->dwWidth : 0x%08lx\n",(long)myTextureFormats->dwWidth); - printf(" puD3dTextureFormats->dwLinearSize : 0x%08lx\n",(long)myTextureFormats->dwLinearSize); - printf(" puD3dTextureFormats->dwBackBufferCount : 0x%08lx\n",(long)myTextureFormats->dwBackBufferCount); - printf(" puD3dTextureFormats->dwZBufferBitDepth : 0x%08lx\n",(long)myTextureFormats->dwZBufferBitDepth); - printf(" puD3dTextureFormats->dwAlphaBitDepth : 0x%08lx\n",(long)myTextureFormats->dwAlphaBitDepth); - printf(" puD3dTextureFormats->dwReserved : 0x%08lx\n",(long)myTextureFormats->dwReserved); - printf(" puD3dTextureFormats->lpSurface : 0x%08lx\n",(long)myTextureFormats->lpSurface); - printf(" puD3dTextureFormats->ddckCKDestOverlay.dwColorSpaceLowValue : 0x%08lx\n",(long)myTextureFormats->ddckCKDestOverlay.dwColorSpaceLowValue); - printf(" puD3dTextureFormats->ddckCKDestOverlay.dwColorSpaceHighValue : 0x%08lx\n",(long)myTextureFormats->ddckCKDestOverlay.dwColorSpaceHighValue); - printf(" puD3dTextureFormats->ddckCKDestBlt.dwColorSpaceLowValue : 0x%08lx\n",(long)myTextureFormats->ddckCKDestBlt.dwColorSpaceLowValue); - printf(" puD3dTextureFormats->ddckCKDestBlt : 0x%08lx\n",(long)myTextureFormats->ddckCKDestBlt.dwColorSpaceHighValue); - printf(" puD3dTextureFormats->ddckCKSrcOverlay.dwColorSpaceLowValue : 0x%08lx\n",(long)myTextureFormats->ddckCKSrcOverlay.dwColorSpaceLowValue); - printf(" puD3dTextureFormats->ddckCKSrcOverlay.dwColorSpaceHighValue : 0x%08lx\n",(long)myTextureFormats->ddckCKSrcOverlay.dwColorSpaceHighValue); - printf(" puD3dTextureFormats->ddckCKSrcBlt.dwColorSpaceLowValue : 0x%08lx\n",(long)myTextureFormats->ddckCKSrcBlt.dwColorSpaceLowValue); - printf(" puD3dTextureFormats->ddckCKSrcBlt.dwColorSpaceHighValue : 0x%08lx\n",(long)myTextureFormats->ddckCKSrcBlt.dwColorSpaceHighValue); - - // DDPIXELFORMAT - printf(" puD3dTextureFormats->ddpfPixelFormat.dwSize : 0x%08lx\n",(long)myTextureFormats->ddpfPixelFormat.dwSize); - if (puD3dTextureFormats->ddpfPixelFormat.dwSize == sizeof(DDPIXELFORMAT)) - { - printf(" puD3dTextureFormats->ddpfPixelFormat.dwFlags : "); - count = 0; - flag = myTextureFormats->ddpfPixelFormat.dwFlags; - checkflag(flag,DDPF_ALPHA,"DDPF_ALPHA"); - checkflag(flag,DDPF_ALPHAPIXELS ,"DDPF_ALPHAPIXELS"); - checkflag(flag,DDPF_ALPHAPREMULT,"DDPF_ALPHAPREMULT"); - checkflag(flag,DDPF_BUMPLUMINANCE ,"DDPF_BUMPLUMINANCE"); - checkflag(flag,DDPF_BUMPDUDV,"DDPF_BUMPDUDV"); - checkflag(flag,DDPF_COMPRESSED,"DDPF_COMPRESSED"); - checkflag(flag,DDPF_FOURCC,"DDPF_FOURCC"); - checkflag(flag,DDPF_LUMINANCE,"DDPF_LUMINANCE"); - checkflag(flag,DDPF_PALETTEINDEXED1,"DDPF_PALETTEINDEXED1"); - checkflag(flag,DDPF_PALETTEINDEXED2,"DDPF_PALETTEINDEXED2"); - checkflag(flag,DDPF_PALETTEINDEXED4,"DDPF_PALETTEINDEXED4"); - checkflag(flag,DDPF_PALETTEINDEXED8,"DDPF_PALETTEINDEXED8"); - checkflag(flag,DDPF_PALETTEINDEXEDTO8,"DDPF_PALETTEINDEXEDTO8"); - checkflag(flag,DDPF_RGB ,"DDPF_RGB"); - checkflag(flag,DDPF_RGBTOYUV,"DDPF_RGBTOYUV"); - checkflag(flag,DDPF_STENCILBUFFER,"DDPF_STENCILBUFFER"); - checkflag(flag,DDPF_YUV,"DDPF_YUV"); - checkflag(flag,DDPF_ZBUFFER,"DDPF_ZBUFFER"); - checkflag(flag,DDPF_ZPIXELS,"DDPF_ZPIXELS"); - endcheckflag(flag,"puD3dTextureFormats->ddpfPixelFormat.dwFlags"); - - - if (myTextureFormats->ddpfPixelFormat.dwFlags & DDPF_FOURCC) - { - printf(" puD3dTextureFormats->ddpfPixelFormat.dwFourCC : "); - switch(myTextureFormats->ddpfPixelFormat.dwFourCC) - { - case MAKEFOURCC('A','U','R','2'): - printf("AUR2\n"); - break; - - case MAKEFOURCC('A','U','R','A'): - printf("AURA\n"); - break; - - case MAKEFOURCC('C','H','A','M'): - printf("CHAM\n"); - break; - - case MAKEFOURCC('C','V','I','D'): - printf("CVID\n"); - break; - - case MAKEFOURCC('D','X','T','1'): - printf("DXT1\n"); - break; - - case MAKEFOURCC('D','X','T','2'): - printf("DXT2\n"); - break; - - case MAKEFOURCC('D','X','T','3'): - printf("DXT3\n"); - break; - - case MAKEFOURCC('D','X','T','4'): - printf("DXT4\n"); - break; - - case MAKEFOURCC('D','X','T','5'): - printf("DXT5\n"); - break; - - case MAKEFOURCC('F','V','F','1'): - printf("FVF1\n"); - break; - - case MAKEFOURCC('I','F','0','9'): - printf("IF09\n"); - break; - - case MAKEFOURCC('I','V','3','1'): - printf("IV31\n"); - break; - - case MAKEFOURCC('J','P','E','G'): - printf("JPEG\n"); - break; - - case MAKEFOURCC('M','J','P','G'): - printf("MJPG\n"); - break; - - case MAKEFOURCC('M','R','L','E'): - printf("MRLE\n"); - break; - - case MAKEFOURCC('M','S','V','C'): - printf("MSVC\n"); - break; - - case MAKEFOURCC('P','H','M','O'): - printf("PHMO\n"); - break; - - case MAKEFOURCC('R','T','2','1'): - printf("RT21\n"); - break; - - case MAKEFOURCC('U','L','T','I'): - printf("ULTI\n"); - break; - - case MAKEFOURCC('V','4','2','2'): - printf("V422\n"); - break; - - case MAKEFOURCC('V','6','5','5'): - printf("V655\n"); - break; - - case MAKEFOURCC('V','D','C','T'): - printf("VDCT\n"); - break; - - case MAKEFOURCC('V','I','D','S'): - printf("VIDS\n"); - break; - - case MAKEFOURCC('Y','U','9','2'): - printf("YU92\n"); - break; - - case MAKEFOURCC('Y','U','V','8'): - printf("YUV8\n"); - break; - - case MAKEFOURCC('Y','U','V','9'): - printf("YUV9\n"); - break; - - case MAKEFOURCC('Y','U','Y','V'): - printf("YUYV\n"); - break; - - case MAKEFOURCC('Z','P','E','G'): - printf("ZPEG\n"); - break; - - default: - printf("0x%08lx\n",(long)myTextureFormats->ddpfPixelFormat.dwFourCC); - break; - } - } - else - { - printf(" puD3dTextureFormats->ddpfPixelFormat.dwFourCC : 0x%08lx\n",(long)myTextureFormats->ddpfPixelFormat.dwFourCC); - } - printf(" puD3dTextureFormats->ddpfPixelFormat.dwRGBBitCount : 0x%08lx\n",(long)myTextureFormats->ddpfPixelFormat.dwRGBBitCount); - printf(" puD3dTextureFormats->ddpfPixelFormat.dwRBitMask : 0x%08lx\n",(long)myTextureFormats->ddpfPixelFormat.dwRBitMask); - printf(" puD3dTextureFormats->ddpfPixelFormat.dwGBitMask : 0x%08lx\n",(long)myTextureFormats->ddpfPixelFormat.dwGBitMask); - printf(" puD3dTextureFormats->ddpfPixelFormat.dwBBitMask : 0x%08lx\n",(long)myTextureFormats->ddpfPixelFormat.dwBBitMask); - printf(" puD3dTextureFormats->ddpfPixelFormat.dwRGBAlphaBitMask : 0x%08lx\n",(long)myTextureFormats->ddpfPixelFormat.dwRGBAlphaBitMask); - } - else - { - printf("none uD3dTextureFormats->ddpfPixelFormat from the driver 0x%08lx\n",myTextureFormats->ddpfPixelFormat.dwSize); - } - - printf(" puD3dTextureFormats->ddsCaps.dwCaps : "); - count = 0; - flag = myTextureFormats->ddsCaps.dwCaps; - // not in use longer acoing msdn checkflag(flag,DDSCAPS_3D,"DDSCAPS_3D"); - checkflag(flag,DDSCAPS_3DDEVICE ,"DDSCAPS_3DDEVICE"); - checkflag(flag,DDSCAPS_ALLOCONLOAD,"DDSCAPS_ALLOCONLOAD "); - checkflag(flag,DDSCAPS_ALPHA,"DDSCAPS_ALPHA"); - checkflag(flag,DDSCAPS_BACKBUFFER,"DDSCAPS_BACKBUFFER"); - checkflag(flag,DDSCAPS_FLIP,"DDSCAPS_FLIP"); - checkflag(flag,DDSCAPS_FRONTBUFFER,"DDSCAPS_FRONTBUFFER"); - checkflag(flag,DDSCAPS_HWCODEC,"DDSCAPS_HWCODEC"); - checkflag(flag,DDSCAPS_LIVEVIDEO ,"DDSCAPS_LIVEVIDEO"); - checkflag(flag,DDSCAPS_LOCALVIDMEM,"DDSCAPS_LOCALVIDMEM"); - checkflag(flag,DDSCAPS_MIPMAP,"DDSCAPS_MIPMAP"); - checkflag(flag,DDSCAPS_MODEX,"DDSCAPS_MODEX"); - checkflag(flag,DDSCAPS_NONLOCALVIDMEM,"DDSCAPS_NONLOCALVIDMEM"); - checkflag(flag,DDSCAPS_OFFSCREENPLAIN,"DDSCAPS_OFFSCREENPLAIN"); - checkflag(flag,DDSCAPS_OPTIMIZED,"DDSCAPS_OPTIMIZED"); - checkflag(flag,DDSCAPS_OVERLAY,"DDSCAPS_OVERLAY"); - checkflag(flag,DDSCAPS_OWNDC,"DDSCAPS_OWNDC"); - checkflag(flag,DDSCAPS_PALETTE,"DDSCAPS_PALETTE"); - checkflag(flag,DDSCAPS_PRIMARYSURFACE ,"DDSCAPS_PRIMARYSURFACE"); - checkflag(flag,DDSCAPS_STANDARDVGAMODE,"DDSCAPS_STANDARDVGAMODE"); - checkflag(flag,DDSCAPS_SYSTEMMEMORY,"DDSCAPS_SYSTEMMEMORY"); - checkflag(flag,DDSCAPS_TEXTURE,"DDSCAPS_TEXTURE"); - checkflag(flag,DDSCAPS_VIDEOMEMORY,"DDSCAPS_VIDEOMEMORY"); - checkflag(flag,DDSCAPS_VIDEOPORT,"DDSCAPS_VIDEOPORT"); - checkflag(flag,DDSCAPS_VISIBLE,"DDSCAPS_VISIBLE"); - checkflag(flag,DDSCAPS_WRITEONLY ,"DDSCAPS_WRITEONLY"); - checkflag(flag,DDSCAPS_ZBUFFER,"DDSCAPS_ZBUFFER"); - endcheckflag(flag,"puD3dTextureFormats->ddsCaps.dwCaps"); - - - myTextureFormats = (DDSURFACEDESC *) (((DWORD) myTextureFormats) + sizeof(DDSURFACEDESC)); - } - else - { - printf("error this should not happen : puD3dTextureFormats from the driver 0x%08lx\n",myTextureFormats->dwSize); - break; - } - } - - - - - - - - - - - -} diff --git a/rostests/dxtest/win32kdxtest/main.c b/rostests/dxtest/win32kdxtest/main.c deleted file mode 100644 index fe23dc231b9..00000000000 --- a/rostests/dxtest/win32kdxtest/main.c +++ /dev/null @@ -1,91 +0,0 @@ - - -/* All testcase are base how windows 2000 sp4 acting */ - - -#include -/* SDK/DDK/NDK Headers. */ -#include -#include -#include -#include -#include -#include "test.h" - -BOOL dumping_on =FALSE; -FILE *fs_file; - -/* we using d3d8thk.dll it is doing the real syscall in windows 2000 - * in ReactOS and Windows XP and higher d3d8thk.dll it linking to - * gdi32.dll instead doing syscall, gdi32.dll export DdEntry1-56 - * and doing the syscall direcly. I did forget about it, This - * test program are now working on any Windows and ReactOS - * that got d3d8thk.dll - */ - -int main(int argc, char **argv) -{ - HANDLE hDirectDrawLocal; - - if (argc == 2) - { - if (stricmp(argv[1],"-dump")==0) - { - dumping_on = TRUE; - } - - if ( (stricmp(argv[1],"-help")==0) || - (stricmp(argv[1],"-?")==0) || - (stricmp(argv[1],"/help")==0) || - (stricmp(argv[1],"/?")==0) ) - { - printf("the %s support follow param \n",argv[0]); - printf("-dump : It dump all data it resvie to screen \n"); - printf("-dumpfile filename : It dump all data it resvie to file \n"); - printf("\nrember u can only use one of them at time \n"); - exit(1); - } - } - - if (argc == 3) - { - if (stricmp(argv[1],"-dumpfile")==0) - { - /* create or over write a file in binary mode, and redirect printf to the file */ - if ( (fs_file = freopen(argv[2], "wb", stdout)) != NULL) - { - dumping_on = TRUE; - } - } - } - - hDirectDrawLocal = test_NtGdiDdCreateDirectDrawObject(); - - test_NtGdiDdQueryDirectDrawObject(hDirectDrawLocal); - - test_NtGdiDdGetScanLine(hDirectDrawLocal); - - test_NtGdiDdWaitForVerticalBlank(hDirectDrawLocal); - - test_NtGdiDdCanCreateSurface(hDirectDrawLocal); - - test_NtGdiDdDeleteDirectDrawObject(hDirectDrawLocal); - - if (fs_file != NULL) - { - fclose(fs_file); - } - return 0; -} - - - - - - - - - - - - diff --git a/rostests/dxtest/win32kdxtest/test.h b/rostests/dxtest/win32kdxtest/test.h deleted file mode 100644 index a349d812fb5..00000000000 --- a/rostests/dxtest/win32kdxtest/test.h +++ /dev/null @@ -1,61 +0,0 @@ - - -HANDLE test_NtGdiDdCreateDirectDrawObject(void); -void test_NtGdiDdDeleteDirectDrawObject(HANDLE hDirectDrawLocal); -void test_NtGdiDdQueryDirectDrawObject(HANDLE hDirectDrawLocal); -void test_NtGdiDdGetScanLine(HANDLE hDirectDrawLocal); -void test_NtGdiDdWaitForVerticalBlank(HANDLE hDirectDrawLocal); -void test_NtGdiDdCanCreateSurface(HANDLE hDirectDrawLocal); - - -void dump_halinfo(DD_HALINFO *pHalInfo, char *text); -void dump_CallBackFlags(DWORD *pCallBackFlags, char *text); -void dump_D3dCallbacks(D3DNTHAL_CALLBACKS *puD3dCallbacks, char *text); -void dump_D3dDriverData(D3DNTHAL_GLOBALDRIVERDATA *puD3dDriverData, char *text); -void dump_D3dBufferCallbacks(DD_D3DBUFCALLBACKS *puD3dCallbacks, char *text); -void dump_D3dTextureFormats(DDSURFACEDESC *puD3dTextureFormats, int dwNum, char *text); - - - - - - - -#define testing_eq(input,value,counter,text) \ - if (input == value) \ - { \ - counter++; \ - printf("FAIL ret=%s, %d != %d )\n",text,(int)input,(int)value); \ - } - - -#define testing_noteq(input,value,counter,text) \ - if (input != value) \ - { \ - counter++; \ - printf("FAIL ret=%s, %d == %d )\n",text,(int)input,(int)value); \ - } - - -#define show_status(counter, text) \ - if (counter == 0) \ - { \ - printf("End testing of %s Status : ok\n\n",text); \ - } \ - else \ - { \ - printf("End testing of %s Status : fail\n\n",text); \ - } - - -#if !defined(__REACTOS__) - -#define win_syscall(inValue,outValue,syscallid) \ - __asm { mov eax, syscallid }; \ - __asm { lea edx, [inValue] }; \ - __asm { int 0x2E }; \ - __asm { mov outValue,eax}; - - - -#endif diff --git a/rostests/dxtest/win32kdxtest/win32kdxtest.rbuild b/rostests/dxtest/win32kdxtest/win32kdxtest.rbuild deleted file mode 100644 index 90122ac0b6f..00000000000 --- a/rostests/dxtest/win32kdxtest/win32kdxtest.rbuild +++ /dev/null @@ -1,14 +0,0 @@ - - . - user32 - gdi32 - d3d8thk - main.c - NtGdiDdCreateDirectDrawObject.c - NtGdiDdDeleteDirectDrawObject.c - NtGdiDdQueryDirectDrawObject.c - NtGdiDdGetScanLine.c - NtGdiDdWaitForVerticalBlank.c - NtGdiDdCanCreateSurface.c - dump.c - \ No newline at end of file diff --git a/rostests/kmtests/CMakeLists.txt b/rostests/kmtests/CMakeLists.txt deleted file mode 100644 index 92d092df443..00000000000 --- a/rostests/kmtests/CMakeLists.txt +++ /dev/null @@ -1,109 +0,0 @@ -include_directories( - include) - -# -# subdirectories containing special-purpose drivers -# -add_subdirectory(example) -add_subdirectory(ntos_io) - -list(APPEND COMMON_SOURCE - example/GuardedMemory.c - rtl/RtlAvlTree.c - rtl/RtlMemory.c - rtl/RtlSplayTree.c - rtl/RtlUnicodeString.c) - -# -# kmtest_drv.sys driver -# -list(APPEND KMTEST_DRV_SOURCE - kmtest_drv/kmtest_drv.c - kmtest_drv/testlist.c - - example/Example.c - example/KernelType.c - ntos_ex/ExDoubleList.c - ntos_ex/ExFastMutex.c - ntos_ex/ExHardError.c - ntos_ex/ExInterlocked.c - ntos_ex/ExPools.c - ntos_ex/ExResource.c - ntos_ex/ExSequencedList.c - ntos_ex/ExSingleList.c - ntos_ex/ExTimer.c - ntos_fsrtl/FsRtlExpression.c - ntos_io/IoDeviceInterface.c - ntos_io/IoInterrupt.c - ntos_io/IoIrp.c - ntos_io/IoMdl.c - ntos_ke/KeApc.c - ntos_ke/KeDpc.c - ntos_ke/KeEvent.c - ntos_ke/KeGuardedMutex.c - ntos_ke/KeIrql.c - ntos_ke/KeProcessor.c - ntos_ke/KeSpinLock.c - ntos_ke/KeTimer.c - ntos_mm/MmSection.c - ntos_ob/ObReference.c - ntos_ob/ObType.c - ${COMMON_SOURCE} - - kmtest_drv/kmtest_drv.rc) - -add_library(kmtest_drv SHARED ${KMTEST_DRV_SOURCE}) - -set_module_type(kmtest_drv kernelmodedriver) -target_link_libraries(kmtest_drv kmtest_printf ${PSEH_LIB}) -add_importlibs(kmtest_drv ntoskrnl hal) -add_target_compile_definitions(kmtest_drv KMT_KERNEL_MODE NTDDI_VERSION=NTDDI_WS03SP1) -#add_pch(kmtest_drv include/kmt_test.h) - -add_cd_file(TARGET kmtest_drv DESTINATION reactos/bin FOR all) - -add_library(kmtest_printf - kmtest_drv/printf_stubs.c - ${REACTOS_SOURCE_DIR}/lib/sdk/crt/printf/streamout.c) -add_target_compile_definitions(kmtest_printf _LIBCNT_ _USER32_WSPRINTF wctomb=KmtWcToMb) -add_target_include_directories(kmtest_printf ${REACTOS_SOURCE_DIR}/lib/sdk/crt/include) - -# -# kmtest.exe loader application -# -set_rc_compiler() - -list(APPEND KMTEST_SOURCE - kmtest/kmtest.c - kmtest/service.c - kmtest/support.c - kmtest/testlist.c - - example/Example_user.c - ntos_io/IoDeviceObject_user.c - ${COMMON_SOURCE} - - kmtest/kmtest.rc) - -add_executable(kmtest ${KMTEST_SOURCE}) -set_module_type(kmtest win32cui) -target_link_libraries(kmtest ${PSEH_LIB}) -add_importlibs(kmtest advapi32 msvcrt kernel32 ntdll) -add_target_compile_definitions(kmtest KMT_USER_MODE) -#add_pch(kmtest include/kmt_test.h) - -set_target_properties(kmtest PROPERTIES OUTPUT_NAME "kmtest_") -add_cd_file(TARGET kmtest DESTINATION reactos/bin FOR all) - -# -# Group targets -# -add_custom_target(kmtest_drivers) -add_dependencies(kmtest_drivers - kmtest_drv - example_drv - iodeviceobject_drv - iohelper_drv) - -add_custom_target(kmtest_all) -add_dependencies(kmtest_all kmtest_drivers kmtest) diff --git a/rostests/kmtests/directory.rbuild b/rostests/kmtests/directory.rbuild deleted file mode 100644 index 7807604db3f..00000000000 --- a/rostests/kmtests/directory.rbuild +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/rostests/kmtests/example/CMakeLists.txt b/rostests/kmtests/example/CMakeLists.txt deleted file mode 100644 index 1ea27859ac5..00000000000 --- a/rostests/kmtests/example/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -include_directories( - ../include) - -list(APPEND EXAMPLE_DRV_SOURCE - ../kmtest_drv/kmtest_standalone.c - Example_drv.c) - -add_library(example_drv SHARED ${EXAMPLE_DRV_SOURCE}) - -set_module_type(example_drv kernelmodedriver) -target_link_libraries(example_drv kmtest_printf ${PSEH_LIB}) -add_importlibs(example_drv ntoskrnl hal) -add_target_compile_definitions(example_drv KMT_STANDALONE_DRIVER) -#add_pch(example_drv ../include/kmt_test.h) - -add_cd_file(TARGET example_drv DESTINATION reactos/bin FOR all) diff --git a/rostests/kmtests/example/Example.c b/rostests/kmtests/example/Example.c deleted file mode 100644 index 1d2c39d9f97..00000000000 --- a/rostests/kmtests/example/Example.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Example kernel-mode test part - * PROGRAMMER: Thomas Faber - */ - -#include - -START_TEST(Example) -{ - KIRQL Irql; - - ok(1, "This test should succeed.\n"); - ok(0, "This test should fail.\n"); - trace("Message from kernel, low-irql. %s. %ls.\n", "Format strings work", L"Even with Unicode"); - KeRaiseIrql(HIGH_LEVEL, &Irql); - trace("Message from kernel, high-irql. %s. %ls.\n", "Format strings work", L"Even with Unicode"); - - ok_irql(DISPATCH_LEVEL); - ok_eq_int(5, 6); - ok_eq_uint(6U, 7U); - ok_eq_long(1L, 2L); - ok_eq_ulong(3LU, 4LU); - ok_eq_pointer((PVOID)8, (PVOID)9); - ok_eq_hex(0x1234LU, 0x5678LU); - ok_eq_bool(TRUE, TRUE); - ok_eq_bool(TRUE, FALSE); - ok_eq_bool(FALSE, TRUE); - ok_bool_true(FALSE, "foo"); - ok_bool_false(TRUE, "bar"); - ok_eq_print(1, 2, "%i"); - ok_eq_str("Hello", "world"); - ok_eq_wstr(L"ABC", L"DEF"); - - if (!skip(KeGetCurrentIrql() == HIGH_LEVEL, "This should only work on HIGH_LEVEL\n")) - { - /* do tests depending on HIGH_LEVEL here */ - ok(1, "This is fine\n"); - } - - KeLowerIrql(Irql); -} diff --git a/rostests/kmtests/example/Example.h b/rostests/kmtests/example/Example.h deleted file mode 100644 index 7c7bfec9494..00000000000 --- a/rostests/kmtests/example/Example.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Example Test declarations - * PROGRAMMER: Thomas Faber - */ - -#ifndef _KMTEST_EXAMPLE_H_ -#define _KMTEST_EXAMPLE_H_ - -typedef struct -{ - int a; - char b[8]; -} MY_STRUCT, *PMY_STRUCT; - -#define IOCTL_NOTIFY 1 -#define IOCTL_SEND_STRING 2 -#define IOCTL_SEND_MYSTRUCT 3 - -#endif /* !defined _KMTEST_EXAMPLE_H_ */ diff --git a/rostests/kmtests/example/Example_drv.c b/rostests/kmtests/example/Example_drv.c deleted file mode 100644 index 641c71a6848..00000000000 --- a/rostests/kmtests/example/Example_drv.c +++ /dev/null @@ -1,245 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Example Test Driver - * PROGRAMMER: Thomas Faber - */ - -#include - -//#define NDEBUG -#include - -#include "Example.h" - -/* prototypes */ -static KMT_MESSAGE_HANDLER TestMessageHandler; -static KMT_IRP_HANDLER TestIrpHandler; - -/* globals */ -static PDRIVER_OBJECT TestDriverObject; - -/** - * @name TestEntry - * - * Test entry point. - * This is called by DriverEntry as early as possible, but with ResultBuffer - * initialized, so that test macros work correctly - * - * @param DriverObject - * Driver Object. - * This is guaranteed not to have been touched by DriverEntry before - * the call to TestEntry - * @param RegistryPath - * Driver Registry Path - * This is guaranteed not to have been touched by DriverEntry before - * the call to TestEntry - * @param DeviceName - * Pointer to receive a test-specific name for the device to create - * @param Flags - * Pointer to a flags variable instructing DriverEntry how to proceed. - * See the KMT_TESTENTRY_FLAGS enumeration for possible values - * Initialized to zero on entry - * - * @return Status. - * DriverEntry will fail if this is a failure status - */ -NTSTATUS -TestEntry( - IN PDRIVER_OBJECT DriverObject, - IN PCUNICODE_STRING RegistryPath, - OUT PCWSTR *DeviceName, - IN OUT INT *Flags) -{ - NTSTATUS Status = STATUS_SUCCESS; - - PAGED_CODE(); - - UNREFERENCED_PARAMETER(RegistryPath); - UNREFERENCED_PARAMETER(Flags); - - DPRINT("Entry!\n"); - - ok_irql(PASSIVE_LEVEL); - TestDriverObject = DriverObject; - - *DeviceName = L"Example"; - - trace("Hi, this is the example driver\n"); - - KmtRegisterIrpHandler(IRP_MJ_CREATE, NULL, TestIrpHandler); - KmtRegisterIrpHandler(IRP_MJ_CLOSE, NULL, TestIrpHandler); - KmtRegisterMessageHandler(0, NULL, TestMessageHandler); - - return Status; -} - -/** - * @name TestUnload - * - * Test unload routine. - * This is called by the driver's Unload routine as early as possible, with - * ResultBuffer and the test device object still valid, so that test macros - * work correctly - * - * @param DriverObject - * Driver Object. - * This is guaranteed not to have been touched by Unload before the call - * to TestEntry - * - * @return Status - */ -VOID -TestUnload( - IN PDRIVER_OBJECT DriverObject) -{ - PAGED_CODE(); - - DPRINT("Unload!\n"); - - ok_irql(PASSIVE_LEVEL); - ok_eq_pointer(DriverObject, TestDriverObject); - - trace("Unloading example driver\n"); -} - -/** - * @name TestMessageHandler - * - * Test message handler routine - * - * @param DeviceObject - * Device Object. - * This is guaranteed not to have been touched by the dispatch function - * before the call to the IRP handler - * @param Irp - * Device Object. - * This is guaranteed not to have been touched by the dispatch function - * before the call to the IRP handler, except for passing it to - * IoGetCurrentStackLocation - * @param IoStackLocation - * Device Object. - * This is guaranteed not to have been touched by the dispatch function - * before the call to the IRP handler - * - * @return Status - */ -static -NTSTATUS -TestMessageHandler( - IN PDEVICE_OBJECT DeviceObject, - IN ULONG ControlCode, - IN PVOID Buffer OPTIONAL, - IN SIZE_T InLength, - IN OUT PSIZE_T OutLength) -{ - NTSTATUS Status = STATUS_SUCCESS; - - switch (ControlCode) - { - case IOCTL_NOTIFY: - { - static int TimesReceived = 0; - - ++TimesReceived; - ok(TimesReceived == 1, "Received control code 1 %d times\n", TimesReceived); - ok_eq_pointer(Buffer, NULL); - ok_eq_ulong((ULONG)InLength, 0LU); - ok_eq_ulong((ULONG)*OutLength, 0LU); - break; - } - case IOCTL_SEND_STRING: - { - static int TimesReceived = 0; - ANSI_STRING ExpectedString = RTL_CONSTANT_STRING("yay"); - ANSI_STRING ReceivedString; - - ++TimesReceived; - ok(TimesReceived == 1, "Received control code 2 %d times\n", TimesReceived); - ok(Buffer != NULL, "Buffer is NULL\n"); - ok_eq_ulong((ULONG)InLength, (ULONG)ExpectedString.Length); - ok_eq_ulong((ULONG)*OutLength, 0LU); - ReceivedString.MaximumLength = ReceivedString.Length = (USHORT)InLength; - ReceivedString.Buffer = Buffer; - ok(RtlCompareString(&ExpectedString, &ReceivedString, FALSE) == 0, "Received string: %Z\n", &ReceivedString); - break; - } - case IOCTL_SEND_MYSTRUCT: - { - static int TimesReceived = 0; - MY_STRUCT ExpectedStruct = { 123, ":D" }; - MY_STRUCT ResultStruct = { 456, "!!!" }; - - ++TimesReceived; - ok(TimesReceived == 1, "Received control code 3 %d times\n", TimesReceived); - ok(Buffer != NULL, "Buffer is NULL\n"); - ok_eq_ulong((ULONG)InLength, (ULONG)sizeof ExpectedStruct); - ok_eq_ulong((ULONG)*OutLength, 2LU * sizeof ExpectedStruct); - if (!skip(Buffer && InLength >= sizeof ExpectedStruct, "Cannot read from buffer!\n")) - ok(RtlCompareMemory(&ExpectedStruct, Buffer, sizeof ExpectedStruct) == sizeof ExpectedStruct, "Buffer does not contain expected values\n"); - - if (!skip(Buffer && *OutLength >= 2 * sizeof ExpectedStruct, "Cannot write to buffer!\n")) - { - RtlCopyMemory((PCHAR)Buffer + sizeof ExpectedStruct, &ResultStruct, sizeof ResultStruct); - *OutLength = 2 * sizeof ExpectedStruct; - } - break; - } - default: - ok(0, "Got an unknown message! DeviceObject=%p, ControlCode=%lu, Buffer=%p, In=%lu, Out=%lu bytes\n", - DeviceObject, ControlCode, Buffer, InLength, *OutLength); - break; - } - - return Status; -} - -/** - * @name TestIrpHandler - * - * Test IRP handler routine - * - * @param DeviceObject - * Device Object. - * This is guaranteed not to have been touched by the dispatch function - * before the call to the IRP handler - * @param Irp - * Device Object. - * This is guaranteed not to have been touched by the dispatch function - * before the call to the IRP handler, except for passing it to - * IoGetCurrentStackLocation - * @param IoStackLocation - * Device Object. - * This is guaranteed not to have been touched by the dispatch function - * before the call to the IRP handler - * - * @return Status - */ -static -NTSTATUS -TestIrpHandler( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp, - IN PIO_STACK_LOCATION IoStackLocation) -{ - NTSTATUS Status = STATUS_SUCCESS; - - DPRINT("IRP!\n"); - - ok_irql(PASSIVE_LEVEL); - ok_eq_pointer(DeviceObject->DriverObject, TestDriverObject); - - if (IoStackLocation->MajorFunction == IRP_MJ_CREATE) - trace("Got IRP_MJ_CREATE!\n"); - else if (IoStackLocation->MajorFunction == IRP_MJ_CLOSE) - trace("Got IRP_MJ_CLOSE!\n"); - else - trace("Got an IRP!\n"); - - Irp->IoStatus.Status = Status; - Irp->IoStatus.Information = 0; - - IoCompleteRequest(Irp, IO_NO_INCREMENT); - - return Status; -} diff --git a/rostests/kmtests/example/Example_user.c b/rostests/kmtests/example/Example_user.c deleted file mode 100644 index f462fc6253c..00000000000 --- a/rostests/kmtests/example/Example_user.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Example user-mode test part - * PROGRAMMER: Thomas Faber - */ - -#include - -#include "Example.h" - -START_TEST(Example) -{ - /* do some user-mode stuff */ - SYSTEM_INFO SystemInfo; - MY_STRUCT MyStruct[2] = { { 123, ":D" }, { 0 } }; - DWORD Length = sizeof MyStruct; - - trace("Message from user-mode\n"); - - GetSystemInfo(&SystemInfo); - ok(SystemInfo.dwActiveProcessorMask != 0, "No active processors?!\n"); - - /* now run the kernel-mode part (see Example.c). - * If no user-mode part exists, this is what's done automatically */ - KmtRunKernelTest("Example"); - - /* now start the special-purpose driver */ - KmtLoadDriver(L"Example", FALSE); - trace("After Entry\n"); - KmtOpenDriver(); - trace("After Create\n"); - - ok(KmtSendToDriver(IOCTL_NOTIFY) == ERROR_SUCCESS, "\n"); - ok(KmtSendStringToDriver(IOCTL_SEND_STRING, "yay") == ERROR_SUCCESS, "\n"); - ok(KmtSendBufferToDriver(IOCTL_SEND_MYSTRUCT, MyStruct, sizeof MyStruct[0], &Length) == ERROR_SUCCESS, "\n"); - ok_eq_int(MyStruct[1].a, 456); - ok_eq_str(MyStruct[1].b, "!!!"); - - KmtCloseDriver(); - trace("After Close\n"); - KmtUnloadDriver(); - trace("After Unload\n"); -} diff --git a/rostests/kmtests/example/GuardedMemory.c b/rostests/kmtests/example/GuardedMemory.c deleted file mode 100644 index 766b5686f7d..00000000000 --- a/rostests/kmtests/example/GuardedMemory.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Guarded Memory example test - * PROGRAMMER: Thomas Faber - */ - -#include - -#ifdef __GNUC__ -#pragma GCC diagnostic ignored "-Wnonnull" -#endif /* defined __GNUC__ */ - -START_TEST(GuardedMemory) -{ - NTSTATUS Status; - SIZE_T Size = 123; - PCHAR *Buffer; - - /* access some invalid memory to test SEH */ - Status = STATUS_SUCCESS; - _SEH2_TRY - { - RtlFillMemory(NULL, 1, 0); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - Status = _SEH2_GetExceptionCode(); - } _SEH2_END; - ok_eq_hex(Status, STATUS_ACCESS_VIOLATION); - - /* get guarded mem */ - Buffer = KmtAllocateGuarded(Size); - - if (skip(Buffer != NULL, "Failed to allocate guarded memory\n")) - return; - - /* access to guarded mem should be fine */ - Status = STATUS_SUCCESS; - _SEH2_TRY - { - RtlFillMemory(Buffer, Size, 0); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - Status = _SEH2_GetExceptionCode(); - } _SEH2_END; - ok_eq_hex(Status, STATUS_SUCCESS); - - /* access one byte behind guarded mem must cause an access violation! */ - Status = STATUS_SUCCESS; - _SEH2_TRY - { - RtlFillMemory(Buffer + Size, 1, 0); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - Status = _SEH2_GetExceptionCode(); - } _SEH2_END; - ok_eq_hex(Status, STATUS_ACCESS_VIOLATION); - - KmtFreeGuarded(Buffer); -} diff --git a/rostests/kmtests/example/KernelType.c b/rostests/kmtests/example/KernelType.c deleted file mode 100644 index 1df835f2d3c..00000000000 --- a/rostests/kmtests/example/KernelType.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Kernel Type example test - * PROGRAMMER: Thomas Faber - */ - -#include - -START_TEST(KernelType) -{ - if (KmtIsMultiProcessorBuild) - trace("This is a MultiProcessor kernel\n"); - else - trace("This is a Uniprocessor kernel\n"); - if (KmtIsCheckedBuild) - trace("This is a Checked kernel\n"); - else - trace("This is a Free kernel\n"); -} diff --git a/rostests/kmtests/example/example_drv.rbuild b/rostests/kmtests/example/example_drv.rbuild deleted file mode 100644 index e5460e7db8b..00000000000 --- a/rostests/kmtests/example/example_drv.rbuild +++ /dev/null @@ -1,14 +0,0 @@ - - include - ntoskrnl - hal - pseh - kmtest_printf - - Example_drv.c - - - kmtest_standalone.c - - - diff --git a/rostests/kmtests/include/kmt_platform.h b/rostests/kmtests/include/kmt_platform.h deleted file mode 100644 index 580a098c452..00000000000 --- a/rostests/kmtests/include/kmt_platform.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite platform declarations - * PROGRAMMER: Thomas Faber - */ - -#ifndef _KMTEST_PLATFORM_H_ -#define _KMTEST_PLATFORM_H_ - -#if !defined _KMTEST_TEST_H_ -#error include kmt_test.h instead of including kmt_platform.h! -#endif /* !defined _KMTEST_TEST_H_ */ - -#if defined KMT_KERNEL_MODE || defined KMT_STANDALONE_DRIVER -#include -#include -#include -#include - -#elif defined KMT_USER_MODE -#define WIN32_LEAN_AND_MEAN -#define WIN32_NO_STATUS -#define UNICODE -#include -#include -#include -#include - -#ifdef KMT_EMULATE_KERNEL -#define ok_irql(i) -#define KIRQL int -typedef const UCHAR CUCHAR, *PCUCHAR; -typedef ULONG LOGICAL, *PLOGICAL; - -#undef KeRaiseIrql -#define KeRaiseIrql(new, old) *(old) = 123 -#undef KeLowerIrql -#define KeLowerIrql(i) (void)(i) -#define ExAllocatePool(type, size) HeapAlloc(GetProcessHeap(), 0, size) -#define ExAllocatePoolWithTag(type, size, tag) HeapAlloc(GetProcessHeap(), 0, size) -#define ExFreePool(p) HeapFree(GetProcessHeap(), 0, p) -#define ExFreePoolWithTag(p, tag) HeapFree(GetProcessHeap(), 0, p) -#define RtlCopyMemoryNonTemporal RtlCopyMemory -#define RtlPrefetchMemoryNonTemporal(s, l) -#endif /* defined KMT_EMULATE_KERNEL */ - -#endif /* defined KMT_USER_MODE */ - -#include -#include -#include - -#endif /* !defined _KMTEST_PLATFORM_H_ */ diff --git a/rostests/kmtests/include/kmt_public.h b/rostests/kmtests/include/kmt_public.h deleted file mode 100644 index abb260dc1d5..00000000000 --- a/rostests/kmtests/include/kmt_public.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite public declarations - * PROGRAMMER: Thomas Faber - */ - -#ifndef _KMTEST_PUBLIC_H_ -#define _KMTEST_PUBLIC_H_ - -#define IOCTL_KMTEST_GET_TESTS \ - CTL_CODE(FILE_DEVICE_UNKNOWN, 0x800, METHOD_BUFFERED, FILE_READ_DATA) - -#define IOCTL_KMTEST_RUN_TEST \ - CTL_CODE(FILE_DEVICE_UNKNOWN, 0x801, METHOD_BUFFERED, FILE_READ_DATA | FILE_WRITE_DATA) - -#define IOCTL_KMTEST_SET_RESULTBUFFER \ - CTL_CODE(FILE_DEVICE_UNKNOWN, 0x802, METHOD_NEITHER, FILE_READ_DATA | FILE_WRITE_DATA) - -#define KMTEST_DEVICE_NAME L"Kmtest" -#define KMTEST_DEVICE_DRIVER_PATH L"\\Device\\" KMTEST_DEVICE_NAME -#define KMTEST_DEVICE_PATH L"\\\\.\\Global\\GLOBALROOT" KMTEST_DEVICE_DRIVER_PATH - -#endif /* !defined _KMTEST_PUBLIC_H_ */ diff --git a/rostests/kmtests/include/kmt_test.h b/rostests/kmtests/include/kmt_test.h deleted file mode 100644 index b1ac21e72a6..00000000000 --- a/rostests/kmtests/include/kmt_test.h +++ /dev/null @@ -1,457 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite test framework declarations - * PROGRAMMER: Thomas Faber - */ - -/* Inspired by Wine C unit tests, Copyright (C) 2002 Alexandre Julliard - * Inspired by ReactOS kernel-mode regression tests, - * Copyright (C) Aleksey Bragin, Filip Navara - */ - -#ifndef _KMTEST_TEST_H_ -#define _KMTEST_TEST_H_ - -#include - -typedef VOID KMT_TESTFUNC(VOID); -typedef KMT_TESTFUNC *PKMT_TESTFUNC; - -typedef struct -{ - const char *TestName; - KMT_TESTFUNC *TestFunction; -} KMT_TEST, *PKMT_TEST; - -typedef const KMT_TEST CKMT_TEST, *PCKMT_TEST; - -extern const KMT_TEST TestList[]; - -typedef struct -{ - volatile LONG Successes; - volatile LONG Failures; - volatile LONG Skipped; - volatile LONG LogBufferLength; - LONG LogBufferMaxLength; - CHAR LogBuffer[ANYSIZE_ARRAY]; -} KMT_RESULTBUFFER, *PKMT_RESULTBUFFER; - -#ifdef KMT_STANDALONE_DRIVER -#define KMT_KERNEL_MODE - -typedef NTSTATUS (KMT_IRP_HANDLER)( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp, - IN PIO_STACK_LOCATION IoStackLocation); -typedef KMT_IRP_HANDLER *PKMT_IRP_HANDLER; - -NTSTATUS KmtRegisterIrpHandler(IN UCHAR MajorFunction, IN PDEVICE_OBJECT DeviceObject OPTIONAL, IN PKMT_IRP_HANDLER IrpHandler); -NTSTATUS KmtUnregisterIrpHandler(IN UCHAR MajorFunction, IN PDEVICE_OBJECT DeviceObject OPTIONAL, IN PKMT_IRP_HANDLER IrpHandler); - -typedef NTSTATUS (KMT_MESSAGE_HANDLER)( - IN PDEVICE_OBJECT DeviceObject, - IN ULONG ControlCode, - IN PVOID Buffer OPTIONAL, - IN SIZE_T InLength, - IN OUT PSIZE_T OutLength); -typedef KMT_MESSAGE_HANDLER *PKMT_MESSAGE_HANDLER; - -NTSTATUS KmtRegisterMessageHandler(IN ULONG ControlCode OPTIONAL, IN PDEVICE_OBJECT DeviceObject OPTIONAL, IN PKMT_MESSAGE_HANDLER MessageHandler); -NTSTATUS KmtUnregisterMessageHandler(IN ULONG ControlCode OPTIONAL, IN PDEVICE_OBJECT DeviceObject OPTIONAL, IN PKMT_MESSAGE_HANDLER MessageHandler); - -typedef enum -{ - TESTENTRY_NO_CREATE_DEVICE = 1, - TESTENTRY_NO_REGISTER_DISPATCH = 2, - TESTENTRY_NO_REGISTER_UNLOAD = 4, -} KMT_TESTENTRY_FLAGS; - -NTSTATUS TestEntry(IN PDRIVER_OBJECT DriverObject, IN PCUNICODE_STRING RegistryPath, OUT PCWSTR *DeviceName, IN OUT INT *Flags); -VOID TestUnload(IN PDRIVER_OBJECT DriverObject); -#endif /* defined KMT_STANDALONE_DRIVER */ - -#ifdef KMT_KERNEL_MODE -/* Device Extension layout */ -typedef struct -{ - PKMT_RESULTBUFFER ResultBuffer; - PMDL Mdl; -} KMT_DEVICE_EXTENSION, *PKMT_DEVICE_EXTENSION; - -extern BOOLEAN KmtIsCheckedBuild; -extern BOOLEAN KmtIsMultiProcessorBuild; -extern PCSTR KmtMajorFunctionNames[]; -extern PDRIVER_OBJECT KmtDriverObject; - -VOID KmtSetIrql(IN KIRQL NewIrql); -BOOLEAN KmtAreInterruptsEnabled(VOID); -#elif defined KMT_USER_MODE -DWORD KmtRunKernelTest(IN PCSTR TestName); - -VOID KmtLoadDriver(IN PCWSTR ServiceName, IN BOOLEAN RestartIfRunning); -VOID KmtUnloadDriver(VOID); -VOID KmtOpenDriver(VOID); -VOID KmtCloseDriver(VOID); - -DWORD KmtSendToDriver(IN DWORD ControlCode); -DWORD KmtSendStringToDriver(IN DWORD ControlCode, IN PCSTR String); -DWORD KmtSendBufferToDriver(IN DWORD ControlCode, IN OUT PVOID Buffer OPTIONAL, IN DWORD InLength, IN OUT PDWORD OutLength); -#else /* if !defined KMT_KERNEL_MODE && !defined KMT_USER_MODE */ -#error either KMT_KERNEL_MODE or KMT_USER_MODE must be defined -#endif /* !defined KMT_KERNEL_MODE && !defined KMT_USER_MODE */ - -extern PKMT_RESULTBUFFER ResultBuffer; - -#ifdef __GNUC__ -/* TODO: GCC doesn't understand %wZ :( */ -#define KMT_FORMAT(type, fmt, first) /*__attribute__((__format__(type, fmt, first)))*/ -#elif !defined __GNUC__ -#define KMT_FORMAT(type, fmt, first) -#endif /* !defined __GNUC__ */ - -#define START_TEST(name) VOID Test_##name(VOID) - -#ifndef KMT_STRINGIZE -#define KMT_STRINGIZE(x) #x -#endif /* !defined KMT_STRINGIZE */ -#define ok(test, ...) ok_(test, __FILE__, __LINE__, __VA_ARGS__) -#define trace(...) trace_( __FILE__, __LINE__, __VA_ARGS__) -#define skip(test, ...) skip_(test, __FILE__, __LINE__, __VA_ARGS__) - -#define ok_(test, file, line, ...) KmtOk(test, file ":" KMT_STRINGIZE(line), __VA_ARGS__) -#define trace_(file, line, ...) KmtTrace( file ":" KMT_STRINGIZE(line), __VA_ARGS__) -#define skip_(test, file, line, ...) KmtSkip(test, file ":" KMT_STRINGIZE(line), __VA_ARGS__) - -VOID KmtVOk(INT Condition, PCSTR FileAndLine, PCSTR Format, va_list Arguments) KMT_FORMAT(ms_printf, 3, 0); -VOID KmtOk(INT Condition, PCSTR FileAndLine, PCSTR Format, ...) KMT_FORMAT(ms_printf, 3, 4); -VOID KmtVTrace(PCSTR FileAndLine, PCSTR Format, va_list Arguments) KMT_FORMAT(ms_printf, 2, 0); -VOID KmtTrace(PCSTR FileAndLine, PCSTR Format, ...) KMT_FORMAT(ms_printf, 2, 3); -BOOLEAN KmtVSkip(INT Condition, PCSTR FileAndLine, PCSTR Format, va_list Arguments) KMT_FORMAT(ms_printf, 3, 0); -BOOLEAN KmtSkip(INT Condition, PCSTR FileAndLine, PCSTR Format, ...) KMT_FORMAT(ms_printf, 3, 4); -PVOID KmtAllocateGuarded(SIZE_T SizeRequested); -VOID KmtFreeGuarded(PVOID Pointer); - -#ifdef KMT_KERNEL_MODE -#define ok_irql(irql) ok(KeGetCurrentIrql() == irql, "IRQL is %d, expected %d\n", KeGetCurrentIrql(), irql) -#endif /* defined KMT_KERNEL_MODE */ -#define ok_eq_print(value, expected, spec) ok((value) == (expected), #value " = " spec ", expected " spec "\n", value, expected) -#define ok_eq_pointer(value, expected) ok_eq_print(value, expected, "%p") -#define ok_eq_int(value, expected) ok_eq_print(value, expected, "%d") -#define ok_eq_uint(value, expected) ok_eq_print(value, expected, "%u") -#define ok_eq_long(value, expected) ok_eq_print(value, expected, "%ld") -#define ok_eq_ulong(value, expected) ok_eq_print(value, expected, "%lu") -#define ok_eq_longlong(value, expected) ok_eq_print(value, expected, "%I64d") -#define ok_eq_ulonglong(value, expected) ok_eq_print(value, expected, "%I64u") -#ifndef _WIN64 -#define ok_eq_size(value, expected) ok_eq_print(value, (SIZE_T)(expected), "%lu") -#define ok_eq_longptr(value, expected) ok_eq_print(value, (LONG_PTR)(expected), "%ld") -#define ok_eq_ulongptr(value, expected) ok_eq_print(value, (ULONG_PTR)(expected), "%lu") -#elif defined _WIN64 -#define ok_eq_size(value, expected) ok_eq_print(value, (SIZE_T)(expected), "%I64u") -#define ok_eq_longptr(value, expected) ok_eq_print(value, (LONG_PTR)(expected), "%I64d") -#define ok_eq_ulongptr(value, expected) ok_eq_print(value, (ULONG_PTR)(expected), "%I64u") -#endif /* defined _WIN64 */ -#define ok_eq_hex(value, expected) ok_eq_print(value, expected, "0x%08lx") -#define ok_bool_true(value, desc) ok((value) == TRUE, desc " FALSE, expected TRUE\n") -#define ok_bool_false(value, desc) ok((value) == FALSE, desc " TRUE, expected FALSE\n") -#define ok_eq_bool(value, expected) ok((value) == (expected), #value " = %s, expected %s\n", \ - (value) ? "TRUE" : "FALSE", \ - (expected) ? "TRUE" : "FALSE") -#define ok_eq_str(value, expected) ok(!strcmp(value, expected), #value " = \"%s\", expected \"%s\"\n", value, expected) -#define ok_eq_wstr(value, expected) ok(!wcscmp(value, expected), #value " = \"%ls\", expected \"%ls\"\n", value, expected) - -#define KMT_MAKE_CODE(ControlCode) CTL_CODE(FILE_DEVICE_UNKNOWN, \ - 0xC00 + (ControlCode), \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define MICROSECOND 10 -#define MILLISECOND (1000 * MICROSECOND) -#define SECOND (1000 * MILLISECOND) - -#if defined KMT_DEFINE_TEST_FUNCTIONS - -#if defined KMT_KERNEL_MODE -BOOLEAN KmtIsCheckedBuild; -BOOLEAN KmtIsMultiProcessorBuild; -PCSTR KmtMajorFunctionNames[] = -{ - "Create", - "CreateNamedPipe", - "Close", - "Read", - "Write", - "QueryInformation", - "SetInformation", - "QueryEa", - "SetEa", - "FlushBuffers", - "QueryVolumeInformation", - "SetVolumeInformation", - "DirectoryControl", - "FileSystemControl", - "DeviceControl", - "InternalDeviceControl/Scsi", - "Shutdown", - "LockControl", - "Cleanup", - "CreateMailslot", - "QuerySecurity", - "SetSecurity", - "Power", - "SystemControl", - "DeviceChange", - "QueryQuota", - "SetQuota", - "Pnp/PnpPower" -}; - -VOID KmtSetIrql(IN KIRQL NewIrql) -{ - KIRQL Irql = KeGetCurrentIrql(); - if (Irql > NewIrql) - KeLowerIrql(NewIrql); - else if (Irql < NewIrql) - KeRaiseIrql(NewIrql, &Irql); -} - -BOOLEAN KmtAreInterruptsEnabled(VOID) -{ - return (__readeflags() & (1 << 9)) != 0; -} - -INT __cdecl KmtVSNPrintF(PSTR Buffer, SIZE_T BufferMaxLength, PCSTR Format, va_list Arguments) KMT_FORMAT(ms_printf, 3, 0); -#elif defined KMT_USER_MODE -static PKMT_RESULTBUFFER KmtAllocateResultBuffer(SIZE_T ResultBufferSize) -{ - PKMT_RESULTBUFFER Buffer = HeapAlloc(GetProcessHeap(), 0, ResultBufferSize); - if (!Buffer) - return NULL; - - Buffer->Successes = 0; - Buffer->Failures = 0; - Buffer->Skipped = 0; - Buffer->LogBufferLength = 0; - Buffer->LogBufferMaxLength = ResultBufferSize - FIELD_OFFSET(KMT_RESULTBUFFER, LogBuffer); - - return Buffer; -} - -static VOID KmtFreeResultBuffer(PKMT_RESULTBUFFER Buffer) -{ - HeapFree(GetProcessHeap(), 0, Buffer); -} - -#define KmtVSNPrintF vsnprintf -#endif /* defined KMT_USER_MODE */ - -PKMT_RESULTBUFFER ResultBuffer = NULL; - -static VOID KmtAddToLogBuffer(PKMT_RESULTBUFFER Buffer, PCSTR String, SIZE_T Length) -{ - LONG OldLength; - LONG NewLength; - - if (!Buffer) - return; - - do - { - OldLength = Buffer->LogBufferLength; - NewLength = OldLength + Length; - if (NewLength > Buffer->LogBufferMaxLength) - return; - } while (InterlockedCompareExchange(&Buffer->LogBufferLength, NewLength, OldLength) != OldLength); - - memcpy(&Buffer->LogBuffer[OldLength], String, Length); -} - -KMT_FORMAT(ms_printf, 5, 0) -static SIZE_T KmtXVSNPrintF(PSTR Buffer, SIZE_T BufferMaxLength, PCSTR FileAndLine, PCSTR Prepend, PCSTR Format, va_list Arguments) -{ - SIZE_T BufferLength = 0; - SIZE_T Length; - - if (FileAndLine) - { - PCSTR Slash; - Slash = strrchr(FileAndLine, '\\'); - if (Slash) - FileAndLine = Slash + 1; - Slash = strrchr(FileAndLine, '/'); - if (Slash) - FileAndLine = Slash + 1; - - Length = min(BufferMaxLength, strlen(FileAndLine)); - memcpy(Buffer, FileAndLine, Length); - Buffer += Length; - BufferLength += Length; - BufferMaxLength -= Length; - } - if (Prepend) - { - Length = min(BufferMaxLength, strlen(Prepend)); - memcpy(Buffer, Prepend, Length); - Buffer += Length; - BufferLength += Length; - BufferMaxLength -= Length; - } - if (Format) - { - Length = KmtVSNPrintF(Buffer, BufferMaxLength, Format, Arguments); - /* vsnprintf can return more than maxLength, we don't want to do that */ - BufferLength += min(Length, BufferMaxLength); - } - return BufferLength; -} - -KMT_FORMAT(ms_printf, 5, 6) -static SIZE_T KmtXSNPrintF(PSTR Buffer, SIZE_T BufferMaxLength, PCSTR FileAndLine, PCSTR Prepend, PCSTR Format, ...) -{ - SIZE_T BufferLength; - va_list Arguments; - va_start(Arguments, Format); - BufferLength = KmtXVSNPrintF(Buffer, BufferMaxLength, FileAndLine, Prepend, Format, Arguments); - va_end(Arguments); - return BufferLength; -} - -VOID KmtFinishTest(PCSTR TestName) -{ - CHAR MessageBuffer[512]; - SIZE_T MessageLength; - - if (!ResultBuffer) - return; - - MessageLength = KmtXSNPrintF(MessageBuffer, sizeof MessageBuffer, NULL, NULL, - "%s: %ld tests executed (0 marked as todo, %ld failures), %ld skipped.\n", - TestName, - ResultBuffer->Successes + ResultBuffer->Failures, - ResultBuffer->Failures, - ResultBuffer->Skipped); - KmtAddToLogBuffer(ResultBuffer, MessageBuffer, MessageLength); -} - -VOID KmtVOk(INT Condition, PCSTR FileAndLine, PCSTR Format, va_list Arguments) -{ - CHAR MessageBuffer[512]; - SIZE_T MessageLength; - - if (!ResultBuffer) - return; - - if (Condition) - { - InterlockedIncrement(&ResultBuffer->Successes); - - if (0/*KmtReportSuccess*/) - { - MessageLength = KmtXSNPrintF(MessageBuffer, sizeof MessageBuffer, FileAndLine, ": Test succeeded\n", NULL); - KmtAddToLogBuffer(ResultBuffer, MessageBuffer, MessageLength); - } - } - else - { - InterlockedIncrement(&ResultBuffer->Failures); - MessageLength = KmtXVSNPrintF(MessageBuffer, sizeof MessageBuffer, FileAndLine, ": Test failed: ", Format, Arguments); - KmtAddToLogBuffer(ResultBuffer, MessageBuffer, MessageLength); - } -} - -VOID KmtOk(INT Condition, PCSTR FileAndLine, PCSTR Format, ...) -{ - va_list Arguments; - va_start(Arguments, Format); - KmtVOk(Condition, FileAndLine, Format, Arguments); - va_end(Arguments); -} - -VOID KmtVTrace(PCSTR FileAndLine, PCSTR Format, va_list Arguments) -{ - CHAR MessageBuffer[512]; - SIZE_T MessageLength; - - MessageLength = KmtXVSNPrintF(MessageBuffer, sizeof MessageBuffer, FileAndLine, ": ", Format, Arguments); - KmtAddToLogBuffer(ResultBuffer, MessageBuffer, MessageLength); -} - -VOID KmtTrace(PCSTR FileAndLine, PCSTR Format, ...) -{ - va_list Arguments; - va_start(Arguments, Format); - KmtVTrace(FileAndLine, Format, Arguments); - va_end(Arguments); -} - -BOOLEAN KmtVSkip(INT Condition, PCSTR FileAndLine, PCSTR Format, va_list Arguments) -{ - CHAR MessageBuffer[512]; - SIZE_T MessageLength; - - if (!ResultBuffer) - return !Condition; - - if (!Condition) - { - InterlockedIncrement(&ResultBuffer->Skipped); - MessageLength = KmtXVSNPrintF(MessageBuffer, sizeof MessageBuffer, FileAndLine, ": Tests skipped: ", Format, Arguments); - KmtAddToLogBuffer(ResultBuffer, MessageBuffer, MessageLength); - } - - return !Condition; -} - -BOOLEAN KmtSkip(INT Condition, PCSTR FileAndLine, PCSTR Format, ...) -{ - BOOLEAN Ret; - va_list Arguments; - va_start(Arguments, Format); - Ret = KmtVSkip(Condition, FileAndLine, Format, Arguments); - va_end(Arguments); - return Ret; -} - -PVOID KmtAllocateGuarded(SIZE_T SizeRequested) -{ - NTSTATUS Status; - SIZE_T Size = PAGE_ROUND_UP(SizeRequested + PAGE_SIZE); - PVOID VirtualMemory = NULL; - PCHAR StartOfBuffer; - - Status = ZwAllocateVirtualMemory(ZwCurrentProcess(), &VirtualMemory, 0, &Size, MEM_RESERVE, PAGE_NOACCESS); - - if (!NT_SUCCESS(Status)) - return NULL; - - Size -= PAGE_SIZE; - Status = ZwAllocateVirtualMemory(ZwCurrentProcess(), &VirtualMemory, 0, &Size, MEM_COMMIT, PAGE_READWRITE); - if (!NT_SUCCESS(Status)) - { - Size = 0; - Status = ZwFreeVirtualMemory(ZwCurrentProcess(), &VirtualMemory, &Size, MEM_RELEASE); - ok_eq_hex(Status, STATUS_SUCCESS); - return NULL; - } - - StartOfBuffer = VirtualMemory; - StartOfBuffer += Size - SizeRequested; - - return StartOfBuffer; -} - -VOID KmtFreeGuarded(PVOID Pointer) -{ - NTSTATUS Status; - PVOID VirtualMemory = (PVOID)PAGE_ROUND_DOWN((SIZE_T)Pointer); - SIZE_T Size = 0; - - Status = ZwFreeVirtualMemory(ZwCurrentProcess(), &VirtualMemory, &Size, MEM_RELEASE); - ok_eq_hex(Status, STATUS_SUCCESS); -} - -#endif /* defined KMT_DEFINE_TEST_FUNCTIONS */ - -#endif /* !defined _KMTEST_TEST_H_ */ diff --git a/rostests/kmtests/kmtest.rbuild b/rostests/kmtests/kmtest.rbuild deleted file mode 100644 index 306261cde8b..00000000000 --- a/rostests/kmtests/kmtest.rbuild +++ /dev/null @@ -1,26 +0,0 @@ - - include - advapi32 - ntdll - pseh - - - kmtest.c - service.c - support.c - testlist.c - - - Example_user.c - GuardedMemory.c - - - IoDeviceObject_user.c - - - RtlAvlTree.c - RtlMemory.c - RtlSplayTree.c - RtlUnicodeString.c - - diff --git a/rostests/kmtests/kmtest/kmtest.c b/rostests/kmtests/kmtest/kmtest.c deleted file mode 100644 index f9f3cde9928..00000000000 --- a/rostests/kmtests/kmtest/kmtest.c +++ /dev/null @@ -1,395 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Loader Application - * PROGRAMMER: Thomas Faber - */ - -#define KMT_DEFINE_TEST_FUNCTIONS -#include - -#include "kmtest.h" -#include - -#include -#include -#include - -#define SERVICE_NAME L"Kmtest" -#define SERVICE_PATH L"kmtest_drv.sys" -#define SERVICE_DESCRIPTION L"ReactOS Kernel-Mode Test Suite Driver" - -#define RESULTBUFFER_SIZE (1024 * 1024) - -typedef enum -{ - KMT_DO_NOTHING, - KMT_LIST_TESTS, - KMT_LIST_ALL_TESTS, - KMT_RUN_TEST, -} KMT_OPERATION; - -HANDLE KmtestHandle; -SC_HANDLE KmtestServiceHandle; -PCSTR ErrorFileAndLine = "No error"; - -static void OutputError(IN DWORD Error); -static DWORD ListTests(IN BOOLEAN IncludeHidden); -static PKMT_TESTFUNC FindTest(IN PCSTR TestName); -static DWORD OutputResult(IN PCSTR TestName); -static DWORD RunTest(IN PCSTR TestName); -int __cdecl main(int ArgCount, char **Arguments); - -/** - * @name OutputError - * - * Output an error message to the console. - * - * @param Error - * Win32 error code - */ -static -void -OutputError( - IN DWORD Error) -{ - PSTR Message; - if (!FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_ALLOCATE_BUFFER, - NULL, Error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&Message, 0, NULL)) - { - fprintf(stderr, "%s: Could not retrieve error message (error 0x%08lx). Original error: 0x%08lx\n", - ErrorFileAndLine, GetLastError(), Error); - return; - } - - fprintf(stderr, "%s: error 0x%08lx: %s\n", ErrorFileAndLine, Error, Message); - - LocalFree(Message); -} - -/** - * @name CompareTestNames - * - * strcmp that skips a leading '-' on either string if present - * - * @param Str1 - * @param Str2 - * @return see strcmp - */ -static -INT -CompareTestNames( - IN PCSTR Str1, - IN PCSTR Str2) -{ - if (*Str1 == '-') - ++Str1; - if (*Str2 == '-') - ++Str2; - while (*Str1 && *Str1 == *Str2) - { - ++Str1; - ++Str2; - } - return *Str1 - *Str2; -} - -/** - * @name ListTests - * - * Output the list of tests to the console. - * The list will comprise tests as listed by the driver - * in addition to user-mode tests in TestList. - * - * @param IncludeHidden - * TRUE to include "hidden" tests prefixed with a '-' - * - * @return Win32 error code - */ -static -DWORD -ListTests( - IN BOOLEAN IncludeHidden) -{ - DWORD Error = ERROR_SUCCESS; - CHAR Buffer[1024]; - DWORD BytesRead; - PCSTR TestName = Buffer; - PCKMT_TEST TestEntry = TestList; - PCSTR NextTestName; - - puts("Valid test names:"); - - // get test list from driver - if (!DeviceIoControl(KmtestHandle, IOCTL_KMTEST_GET_TESTS, NULL, 0, Buffer, sizeof Buffer, &BytesRead, NULL)) - error_goto(Error, cleanup); - - // output test list plus user-mode tests - while (TestEntry->TestName || *TestName) - { - if (!TestEntry->TestName) - { - NextTestName = TestName; - TestName += strlen(TestName) + 1; - } - else if (!*TestName) - { - NextTestName = TestEntry->TestName; - ++TestEntry; - } - else - { - INT Result = CompareTestNames(TestEntry->TestName, TestName); - - if (Result == 0) - { - NextTestName = TestEntry->TestName; - TestName += strlen(TestName) + 1; - ++TestEntry; - } - else if (Result < 0) - { - NextTestName = TestEntry->TestName; - ++TestEntry; - } - else - { - NextTestName = TestName; - TestName += strlen(TestName) + 1; - } - } - - if (IncludeHidden && NextTestName[0] == '-') - ++NextTestName; - - if (NextTestName[0] != '-') - printf(" %s\n", NextTestName); - } - -cleanup: - return Error; -} - -/** - * @name FindTest - * - * Find a test in TestList by name. - * - * @param TestName - * Name of the test to look for. Case sensitive - * - * @return pointer to test function, or NULL if not found - */ -static -PKMT_TESTFUNC -FindTest( - IN PCSTR TestName) -{ - PCKMT_TEST TestEntry = TestList; - - for (TestEntry = TestList; TestEntry->TestName; ++TestEntry) - { - PCSTR TestEntryName = TestEntry->TestName; - - // skip leading '-' if present - if (*TestEntryName == '-') - ++TestEntryName; - - if (!lstrcmpA(TestEntryName, TestName)) - break; - } - - return TestEntry->TestFunction; -} - -/** - * @name OutputResult - * - * Output the test results in ResultBuffer to the console. - * - * @param TestName - * Name of the test whose result is to be printed - * - * @return Win32 error code - */ -static -DWORD -OutputResult( - IN PCSTR TestName) -{ - DWORD Error = ERROR_SUCCESS; - DWORD BytesWritten; - DWORD LogBufferLength; - DWORD Offset = 0; - /* A console window can't handle a single - * huge block of data, so split it up */ - const DWORD BlockSize = 8 * 1024; - - KmtFinishTest(TestName); - - LogBufferLength = ResultBuffer->LogBufferLength; - for (Offset = 0; Offset < LogBufferLength; Offset += BlockSize) - { - DWORD Length = min(LogBufferLength - Offset, BlockSize); - if (!WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), ResultBuffer->LogBuffer + Offset, Length, &BytesWritten, NULL)) - error(Error); - } - - return Error; -} - -/** - * @name RunTest - * - * Run the named test and output its results. - * - * @param TestName - * Name of the test to run. Case sensitive - * - * @return Win32 error code - */ -static -DWORD -RunTest( - IN PCSTR TestName) -{ - DWORD Error = ERROR_SUCCESS; - PKMT_TESTFUNC TestFunction; - DWORD BytesRead; - - assert(TestName != NULL); - - if (!ResultBuffer) - { - ResultBuffer = KmtAllocateResultBuffer(RESULTBUFFER_SIZE); - if (!ResultBuffer) - error_goto(Error, cleanup); - if (!DeviceIoControl(KmtestHandle, IOCTL_KMTEST_SET_RESULTBUFFER, ResultBuffer, RESULTBUFFER_SIZE, NULL, 0, &BytesRead, NULL)) - error_goto(Error, cleanup); - } - - // check test list - TestFunction = FindTest(TestName); - - if (TestFunction) - { - TestFunction(); - goto cleanup; - } - - // not found in user-mode test list, call driver - Error = KmtRunKernelTest(TestName); - -cleanup: - if (!Error) - Error = OutputResult(TestName); - - return Error; -} - -/** - * @name main - * - * Program entry point - * - * @param ArgCount - * @param Arguments - * - * @return EXIT_SUCCESS on success, EXIT_FAILURE on failure - */ -int -main( - int ArgCount, - char **Arguments) -{ - INT Status = EXIT_SUCCESS; - DWORD Error = ERROR_SUCCESS; - PCSTR AppName = "kmtest.exe"; - PCSTR TestName = NULL; - KMT_OPERATION Operation = KMT_DO_NOTHING; - BOOLEAN ShowHidden = FALSE; - - Error = KmtServiceInit(); - if (Error) - goto cleanup; - - if (ArgCount >= 1) - AppName = Arguments[0]; - - if (ArgCount <= 1) - { - printf("Usage: %s - run the specified test (creates/starts the driver(s) as appropriate)\n", AppName); - printf(" %s --list - list available tests\n", AppName); - printf(" %s --list-all - list available tests, including hidden\n", AppName); - printf(" %s - manage the kmtest driver\n\n", AppName); - Operation = KMT_LIST_TESTS; - } - else - { - TestName = Arguments[1]; - if (!lstrcmpA(TestName, "create")) - Error = KmtCreateService(SERVICE_NAME, SERVICE_PATH, SERVICE_DESCRIPTION, &KmtestServiceHandle); - else if (!lstrcmpA(TestName, "delete")) - Error = KmtDeleteService(SERVICE_NAME, &KmtestServiceHandle); - else if (!lstrcmpA(TestName, "start")) - Error = KmtStartService(SERVICE_NAME, &KmtestServiceHandle); - else if (!lstrcmpA(TestName, "stop")) - Error = KmtStopService(SERVICE_NAME, &KmtestServiceHandle); - - else if (!lstrcmpA(TestName, "--list")) - Operation = KMT_LIST_TESTS; - else if (!lstrcmpA(TestName, "--list-all")) - Operation = KMT_LIST_ALL_TESTS; - else - Operation = KMT_RUN_TEST; - } - - if (Operation) - { - Error = KmtCreateAndStartService(SERVICE_NAME, SERVICE_PATH, SERVICE_DESCRIPTION, &KmtestServiceHandle, FALSE); - if (Error) - goto cleanup; - - KmtestHandle = CreateFile(KMTEST_DEVICE_PATH, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); - if (KmtestHandle == INVALID_HANDLE_VALUE) - error_goto(Error, cleanup); - - switch (Operation) - { - case KMT_LIST_ALL_TESTS: - ShowHidden = TRUE; - /* fall through */ - case KMT_LIST_TESTS: - Error = ListTests(ShowHidden); - break; - case KMT_RUN_TEST: - Error = RunTest(TestName); - break; - default: - assert(FALSE); - } - } - -cleanup: - if (KmtestHandle) - CloseHandle(KmtestHandle); - - if (ResultBuffer) - KmtFreeResultBuffer(ResultBuffer); - - KmtCloseService(&KmtestServiceHandle); - - if (Error) - KmtServiceCleanup(TRUE); - else - Error = KmtServiceCleanup(FALSE); - - if (Error) - { - OutputError(Error); - - Status = EXIT_FAILURE; - } - - return Status; -} diff --git a/rostests/kmtests/kmtest/kmtest.exe.manifest b/rostests/kmtests/kmtest/kmtest.exe.manifest deleted file mode 100644 index 07b59440c3f..00000000000 --- a/rostests/kmtests/kmtest/kmtest.exe.manifest +++ /dev/null @@ -1,12 +0,0 @@ - - - - ReactOS Kernel-Mode Test Suite Loader Application - - - - - - - - diff --git a/rostests/kmtests/kmtest/kmtest.h b/rostests/kmtests/kmtest/kmtest.h deleted file mode 100644 index d7e50ae7d48..00000000000 --- a/rostests/kmtests/kmtest/kmtest.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Loader Application - * PROGRAMMER: Thomas Faber - */ - -#ifndef _KMTESTS_H_ -#define _KMTESTS_H_ - -extern PCSTR ErrorFileAndLine; - -#ifndef KMT_STRINGIZE -#define KMT_STRINGIZE(x) #x -#endif /* !defined KMT_STRINGIZE */ - -#define location(file, line) do { ErrorFileAndLine = file ":" KMT_STRINGIZE(line); } while (0) -#define error_value(Error, value) do { location(__FILE__, __LINE__); Error = value; } while (0) -#define error(Error) error_value(Error, GetLastError()) -#define error_goto(Error, label) do { error(Error); goto label; } while (0) -#define error_value_goto(Error, value, label) do { error_value(Error, value); goto label; } while (0) - -/* service management functions */ -DWORD -KmtServiceInit(VOID); - -DWORD -KmtServiceCleanup( - BOOLEAN IgnoreErrors); - -DWORD -KmtCreateService( - IN PCWSTR ServiceName, - IN PCWSTR ServicePath, - IN PCWSTR DisplayName OPTIONAL, - OUT SC_HANDLE *ServiceHandle); - -DWORD -KmtStartService( - IN PCWSTR ServiceName OPTIONAL, - IN OUT SC_HANDLE *ServiceHandle); - -DWORD -KmtCreateAndStartService( - IN PCWSTR ServiceName, - IN PCWSTR ServicePath, - IN PCWSTR DisplayName OPTIONAL, - OUT SC_HANDLE *ServiceHandle, - IN BOOLEAN RestartIfRunning); - -DWORD -KmtStopService( - IN PCWSTR ServiceName OPTIONAL, - IN OUT SC_HANDLE *ServiceHandle); - -DWORD -KmtDeleteService( - IN PCWSTR ServiceName OPTIONAL, - IN OUT SC_HANDLE *ServiceHandle); - -DWORD KmtCloseService( - IN OUT SC_HANDLE *ServiceHandle); - -#endif /* !defined _KMTESTS_H_ */ diff --git a/rostests/kmtests/kmtest/kmtest.rc b/rostests/kmtests/kmtest/kmtest.rc deleted file mode 100644 index 890e56eb43d..00000000000 --- a/rostests/kmtests/kmtest/kmtest.rc +++ /dev/null @@ -1,15 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Loader Resource File - * PROGRAMMER: Thomas Faber - */ - -#include - -#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Kernel-Mode Test Suite Loader Application\0" -#define REACTOS_STR_INTERNAL_NAME "kmtest.exe\0" -#define REACTOS_STR_ORIGINAL_FILENAME "kmtest.exe\0" -#include - -CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST DISCARDABLE PURE "kmtest/kmtest.exe.manifest" diff --git a/rostests/kmtests/kmtest/service.c b/rostests/kmtests/kmtest/service.c deleted file mode 100644 index 7313a1cec74..00000000000 --- a/rostests/kmtests/kmtest/service.c +++ /dev/null @@ -1,309 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Loader service control functions - * PROGRAMMER: Thomas Faber - */ - -#include -#include "kmtest.h" - -#include - -#define SERVICE_ACCESS (SERVICE_START | SERVICE_STOP | DELETE) - -static SC_HANDLE ScmHandle; - -/** - * @name KmtServiceInit - * - * Initialize service management routines (by opening the service control manager) - * - * @return Win32 error code - */ -DWORD -KmtServiceInit(VOID) -{ - DWORD Error = ERROR_SUCCESS; - - assert(!ScmHandle); - - ScmHandle = OpenSCManager(NULL, NULL, SC_MANAGER_CREATE_SERVICE); - if (!ScmHandle) - error(Error); - - return Error; -} - -/** - * @name KmtServiceCleanup - * - * Clean up resources used by service management routines. - * - * @param IgnoreErrors - * If TRUE, the function will never set ErrorLineAndFile, and always return ERROR_SUCCESS - * - * @return Win32 error code - */ -DWORD -KmtServiceCleanup( - BOOLEAN IgnoreErrors) -{ - DWORD Error = ERROR_SUCCESS; - - if (ScmHandle && !CloseServiceHandle(ScmHandle) && !IgnoreErrors) - error(Error); - - return Error; -} - -/** - * @name KmtCreateService - * - * Create the specified driver service and return a handle to it - * - * @param ServiceName - * Name of the service to create - * @param ServicePath - * File name of the driver, relative to the current directory - * @param DisplayName - * Service display name - * @param ServiceHandle - * Pointer to a variable to receive the handle to the service - * - * @return Win32 error code - */ -DWORD -KmtCreateService( - IN PCWSTR ServiceName, - IN PCWSTR ServicePath, - IN PCWSTR DisplayName OPTIONAL, - OUT SC_HANDLE *ServiceHandle) -{ - DWORD Error = ERROR_SUCCESS; - WCHAR DriverPath[MAX_PATH]; - HRESULT result = S_OK; - - assert(ServiceHandle); - assert(ServiceName && ServicePath); - - if (!GetModuleFileName(NULL, DriverPath, sizeof DriverPath / sizeof DriverPath[0])) - error_goto(Error, cleanup); - - assert(wcsrchr(DriverPath, L'\\') != NULL); - wcsrchr(DriverPath, L'\\')[1] = L'\0'; - - result = StringCbCat(DriverPath, sizeof DriverPath, ServicePath); - if (FAILED(result)) - error_value_goto(Error, result, cleanup); - - if (GetFileAttributes(DriverPath) == INVALID_FILE_ATTRIBUTES) - error_goto(Error, cleanup); - - *ServiceHandle = CreateService(ScmHandle, ServiceName, DisplayName, - SERVICE_ACCESS, SERVICE_KERNEL_DRIVER, SERVICE_DEMAND_START, - SERVICE_ERROR_NORMAL, DriverPath, NULL, NULL, NULL, NULL, NULL); - - if (!*ServiceHandle) - error_goto(Error, cleanup); - -cleanup: - return Error; -} - -/** - * @name KmtStartService - * - * Start the specified driver service by handle or name (and return a handle to it) - * - * @param ServiceName - * If *ServiceHandle is NULL, name of the service to start - * @param ServiceHandle - * Pointer to a variable containing the service handle, - * or NULL (in which case it will be filled with a handle to the service) - * - * @return Win32 error code - */ -DWORD -KmtStartService( - IN PCWSTR ServiceName OPTIONAL, - IN OUT SC_HANDLE *ServiceHandle) -{ - DWORD Error = ERROR_SUCCESS; - - assert(ServiceHandle); - assert(ServiceName || *ServiceHandle); - - if (!*ServiceHandle) - *ServiceHandle = OpenService(ScmHandle, ServiceName, SERVICE_ACCESS); - - if (!*ServiceHandle) - error_goto(Error, cleanup); - - if (!StartService(*ServiceHandle, 0, NULL)) - error_goto(Error, cleanup); - -cleanup: - return Error; -} - -/** - * @name KmtCreateAndStartService - * - * Create and start the specified driver service and return a handle to it - * - * @param ServiceName - * Name of the service to create - * @param ServicePath - * File name of the driver, relative to the current directory - * @param DisplayName - * Service display name - * @param ServiceHandle - * Pointer to a variable to receive the handle to the service - * @param RestartIfRunning - * TRUE to stop and restart the service if it is already running - * - * @return Win32 error code - */ -DWORD -KmtCreateAndStartService( - IN PCWSTR ServiceName, - IN PCWSTR ServicePath, - IN PCWSTR DisplayName OPTIONAL, - OUT SC_HANDLE *ServiceHandle, - IN BOOLEAN RestartIfRunning) -{ - DWORD Error = ERROR_SUCCESS; - - assert(ServiceHandle); - - Error = KmtCreateService(ServiceName, ServicePath, DisplayName, ServiceHandle); - - if (Error && Error != ERROR_SERVICE_EXISTS) - goto cleanup; - - Error = KmtStartService(ServiceName, ServiceHandle); - - if (Error != ERROR_SERVICE_ALREADY_RUNNING) - goto cleanup; - - Error = ERROR_SUCCESS; - - if (!RestartIfRunning) - goto cleanup; - - Error = KmtStopService(ServiceName, ServiceHandle); - if (Error) - goto cleanup; - - Error = KmtStartService(ServiceName, ServiceHandle); - if (Error) - goto cleanup; - -cleanup: - assert(Error || *ServiceHandle); - return Error; -} - -/** - * @name KmtStopService - * - * Stop the specified driver service by handle or name (and return a handle to it) - * - * @param ServiceName - * If *ServiceHandle is NULL, name of the service to stop - * @param ServiceHandle - * Pointer to a variable containing the service handle, - * or NULL (in which case it will be filled with a handle to the service) - * - * @return Win32 error code - */ -DWORD -KmtStopService( - IN PCWSTR ServiceName OPTIONAL, - IN OUT SC_HANDLE *ServiceHandle) -{ - DWORD Error = ERROR_SUCCESS; - SERVICE_STATUS ServiceStatus; - - assert(ServiceHandle); - assert(ServiceName || *ServiceHandle); - - if (!*ServiceHandle) - *ServiceHandle = OpenService(ScmHandle, ServiceName, SERVICE_ACCESS); - - if (!*ServiceHandle) - error_goto(Error, cleanup); - - if (!ControlService(*ServiceHandle, SERVICE_CONTROL_STOP, &ServiceStatus)) - error_goto(Error, cleanup); - -cleanup: - return Error; -} - -/** - * @name KmtDeleteService - * - * Delete the specified driver service by handle or name (and return a handle to it) - * - * @param ServiceName - * If *ServiceHandle is NULL, name of the service to delete - * @param ServiceHandle - * Pointer to a variable containing the service handle. - * Will be set to NULL on success - * - * @return Win32 error code - */ -DWORD -KmtDeleteService( - IN PCWSTR ServiceName OPTIONAL, - IN OUT SC_HANDLE *ServiceHandle) -{ - DWORD Error = ERROR_SUCCESS; - - assert(ServiceHandle); - assert(ServiceName || *ServiceHandle); - - if (!*ServiceHandle) - *ServiceHandle = OpenService(ScmHandle, ServiceName, SERVICE_ACCESS); - - if (!*ServiceHandle) - error_goto(Error, cleanup); - - if (!DeleteService(*ServiceHandle)) - error_goto(Error, cleanup); - - if (*ServiceHandle) - CloseServiceHandle(*ServiceHandle); - -cleanup: - return Error; -} - -/** - * @name KmtCloseService - * - * Close the specified driver service handle - * - * @param ServiceHandle - * Pointer to a variable containing the service handle. - * Will be set to NULL on success - * - * @return Win32 error code - */ -DWORD KmtCloseService( - IN OUT SC_HANDLE *ServiceHandle) -{ - DWORD Error = ERROR_SUCCESS; - - assert(ServiceHandle); - - if (*ServiceHandle && !CloseServiceHandle(*ServiceHandle)) - error_goto(Error, cleanup); - - *ServiceHandle = NULL; - -cleanup: - return Error; -} diff --git a/rostests/kmtests/kmtest/support.c b/rostests/kmtests/kmtest/support.c deleted file mode 100644 index 03c10af2cce..00000000000 --- a/rostests/kmtests/kmtest/support.c +++ /dev/null @@ -1,215 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Driver - * PROGRAMMER: Thomas Faber - */ - -#include - -#include "kmtest.h" -#include - -#include - -extern HANDLE KmtestHandle; - -/** - * @name KmtRunKernelTest - * - * Run the specified kernel-mode test part - * - * @param TestName - * Name of the test to run - * - * @return Win32 error code as returned by DeviceIoControl - */ -DWORD -KmtRunKernelTest( - IN PCSTR TestName) -{ - DWORD Error = ERROR_SUCCESS; - DWORD BytesRead; - - if (!DeviceIoControl(KmtestHandle, IOCTL_KMTEST_RUN_TEST, (PVOID)TestName, strlen(TestName), NULL, 0, &BytesRead, NULL)) - error(Error); - - return Error; -} - -static WCHAR TestServiceName[MAX_PATH]; -static SC_HANDLE TestServiceHandle; -static HANDLE TestDeviceHandle; - -/** - * @name KmtLoadDriver - * - * Load the specified special-purpose driver (create/start the service) - * - * @param ServiceName - * Name of the driver service (Kmtest- prefix will be added automatically) - * @param RestartIfRunning - * TRUE to stop and restart the service if it is already running - */ -VOID -KmtLoadDriver( - IN PCWSTR ServiceName, - IN BOOLEAN RestartIfRunning) -{ - DWORD Error = ERROR_SUCCESS; - WCHAR ServicePath[MAX_PATH]; - - StringCbCopy(ServicePath, sizeof ServicePath, ServiceName); - StringCbCat(ServicePath, sizeof ServicePath, L"_drv.sys"); - - StringCbCopy(TestServiceName, sizeof TestServiceName, L"Kmtest-"); - StringCbCat(TestServiceName, sizeof TestServiceName, ServiceName); - - Error = KmtCreateAndStartService(TestServiceName, ServicePath, NULL, &TestServiceHandle, RestartIfRunning); - - if (Error) - { - // TODO - __debugbreak(); - } -} - -/** - * @name KmtUnloadDriver - * - * Unload special-purpose driver (stop the service) - */ -VOID -KmtUnloadDriver(VOID) -{ - DWORD Error = ERROR_SUCCESS; - - Error = KmtStopService(TestServiceName, &TestServiceHandle); - - if (Error) - { - // TODO - __debugbreak(); - } -} - -/** - * @name KmtOpenDriver - * - * Open special-purpose driver (acquire a device handle) - */ -VOID -KmtOpenDriver(VOID) -{ - DWORD Error = ERROR_SUCCESS; - WCHAR DevicePath[MAX_PATH]; - - StringCbCopy(DevicePath, sizeof DevicePath, L"\\\\.\\Global\\GLOBALROOT\\Device\\"); - StringCbCat(DevicePath, sizeof DevicePath, TestServiceName); - - TestDeviceHandle = CreateFile(DevicePath, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); - if (TestDeviceHandle == INVALID_HANDLE_VALUE) - error(Error); - - if (Error) - { - // TODO - __debugbreak(); - } - -} - -/** - * @name KmtCloseDriver - * - * Close special-purpose driver (close device handle) - */ -VOID -KmtCloseDriver(VOID) -{ - DWORD Error = ERROR_SUCCESS; - - if (TestDeviceHandle && !CloseHandle(TestDeviceHandle)) - error(Error); - - if (Error) - { - // TODO - __debugbreak(); - } -} - -/** - * @name KmtSendToDriver - * - * Unload special-purpose driver (stop the service) - * - * @param ControlCode - * - * @return Win32 error code as returned by DeviceIoControl - */ -DWORD -KmtSendToDriver( - IN DWORD ControlCode) -{ - DWORD BytesRead; - - assert(ControlCode < 0x400); - - if (!DeviceIoControl(TestDeviceHandle, KMT_MAKE_CODE(ControlCode), NULL, 0, NULL, 0, &BytesRead, NULL)) - return GetLastError(); - - return ERROR_SUCCESS; -} - -/** - * @name KmtSendStringToDriver - * - * Unload special-purpose driver (stop the service) - * - * @param ControlCode - * @param String - * - * @return Win32 error code as returned by DeviceIoControl - */ -DWORD -KmtSendStringToDriver( - IN DWORD ControlCode, - IN PCSTR String) -{ - DWORD BytesRead; - - assert(ControlCode < 0x400); - - if (!DeviceIoControl(TestDeviceHandle, KMT_MAKE_CODE(ControlCode), (PVOID)String, strlen(String), NULL, 0, &BytesRead, NULL)) - return GetLastError(); - - return ERROR_SUCCESS; -} - -/** - * @name KmtSendBufferToDriver - * - * @param ControlCode - * @param Buffer - * @param InLength - * @param OutLength - * - * @return Win32 error code as returned by DeviceIoControl - */ -DWORD -KmtSendBufferToDriver( - IN DWORD ControlCode, - IN OUT PVOID Buffer OPTIONAL, - IN DWORD InLength, - IN OUT PDWORD OutLength) -{ - assert(OutLength); - assert(Buffer || (!InLength && !*OutLength)); - assert(ControlCode < 0x400); - - if (!DeviceIoControl(TestDeviceHandle, KMT_MAKE_CODE(ControlCode), Buffer, InLength, Buffer, *OutLength, OutLength, NULL)) - return GetLastError(); - - return ERROR_SUCCESS; -} \ No newline at end of file diff --git a/rostests/kmtests/kmtest/testlist.c b/rostests/kmtests/kmtest/testlist.c deleted file mode 100644 index 117404f4d48..00000000000 --- a/rostests/kmtests/kmtest/testlist.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite user-mode test list - * PROGRAMMER: Thomas Faber - */ - -#include - -KMT_TESTFUNC Test_Example; -KMT_TESTFUNC Test_IoDeviceObject; -KMT_TESTFUNC Test_RtlAvlTree; -KMT_TESTFUNC Test_RtlMemory; -KMT_TESTFUNC Test_RtlSplayTree; -KMT_TESTFUNC Test_RtlUnicodeString; - -/* tests with a leading '-' will not be listed */ -const KMT_TEST TestList[] = -{ - { "Example", Test_Example }, - { "IoDeviceObject", Test_IoDeviceObject }, - { "RtlAvlTree", Test_RtlAvlTree }, - { "RtlMemory", Test_RtlMemory }, - { "RtlSplayTree", Test_RtlSplayTree }, - { "RtlUnicodeString", Test_RtlUnicodeString }, - { NULL, NULL }, -}; diff --git a/rostests/kmtests/kmtest_drv.rbuild b/rostests/kmtests/kmtest_drv.rbuild deleted file mode 100644 index af34b02afec..00000000000 --- a/rostests/kmtests/kmtest_drv.rbuild +++ /dev/null @@ -1,85 +0,0 @@ - - include - ntoskrnl - hal - pseh - kmtest_printf - - NTDDI_WS03SP1 - - kmtest_drv.c - testlist.c - - - Example.c - GuardedMemory.c - KernelType.c - - - ExDoubleList.c - ExFastMutex.c - ExHardError.c - ExInterlocked.c - ExPools.c - ExResource.c - ExSequencedList.c - ExSingleList.c - ExTimer.c - - - FsRtlExpression.c - - - IoDeviceInterface.c - IoInterrupt.c - IoIrp.c - IoMdl.c - - - KeApc.c - KeDpc.c - KeEvent.c - KeGuardedMutex.c - KeIrql.c - KeProcessor.c - KeSpinLock.c - KeTimer.c - - - MmSection.c - - - ObReference.c - ObType.c - - - RtlAvlTree.c - RtlMemory.c - RtlSplayTree.c - RtlUnicodeString.c - - - - include - - - KmtWcToMb - - printf_stubs.c - - - - - - - - - streamout.c - - - - - - - - diff --git a/rostests/kmtests/kmtest_drv/kmtest_drv.c b/rostests/kmtests/kmtest_drv/kmtest_drv.c deleted file mode 100644 index d15fd2a1761..00000000000 --- a/rostests/kmtests/kmtest_drv/kmtest_drv.c +++ /dev/null @@ -1,379 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Driver - * PROGRAMMER: Thomas Faber - */ - -#include -#include -#include -#include -#include -#include - -//#define NDEBUG -#include - -#include -#define KMT_DEFINE_TEST_FUNCTIONS -#include - -/* Prototypes */ -DRIVER_INITIALIZE DriverEntry; -static DRIVER_UNLOAD DriverUnload; -static DRIVER_DISPATCH DriverCreate; -static DRIVER_DISPATCH DriverClose; -static DRIVER_DISPATCH DriverIoControl; - -/* Globals */ -static PDEVICE_OBJECT MainDeviceObject; -PDRIVER_OBJECT KmtDriverObject = NULL; - -/* Entry */ -/** - * @name DriverEntry - * - * Driver Entry point. - * - * @param DriverObject - * Driver Object - * @param RegistryPath - * Driver Registry Path - * - * @return Status - */ -NTSTATUS -NTAPI -DriverEntry( - IN PDRIVER_OBJECT DriverObject, - IN PUNICODE_STRING RegistryPath) -{ - NTSTATUS Status = STATUS_SUCCESS; - UNICODE_STRING DeviceName; - PKMT_DEVICE_EXTENSION DeviceExtension; - PKPRCB Prcb; - - PAGED_CODE(); - - UNREFERENCED_PARAMETER(RegistryPath); - - DPRINT("DriverEntry\n"); - - Prcb = KeGetCurrentPrcb(); - KmtIsCheckedBuild = (Prcb->BuildType & PRCB_BUILD_DEBUG) != 0; - KmtIsMultiProcessorBuild = (Prcb->BuildType & PRCB_BUILD_UNIPROCESSOR) == 0; - KmtDriverObject = DriverObject; - - RtlInitUnicodeString(&DeviceName, KMTEST_DEVICE_DRIVER_PATH); - Status = IoCreateDevice(DriverObject, sizeof(KMT_DEVICE_EXTENSION), - &DeviceName, - FILE_DEVICE_UNKNOWN, - FILE_DEVICE_SECURE_OPEN | FILE_READ_ONLY_DEVICE, - FALSE, &MainDeviceObject); - - if (!NT_SUCCESS(Status)) - goto cleanup; - - DPRINT("DriverEntry. Created DeviceObject %p. DeviceExtension %p\n", - MainDeviceObject, MainDeviceObject->DeviceExtension); - DeviceExtension = MainDeviceObject->DeviceExtension; - DeviceExtension->ResultBuffer = NULL; - DeviceExtension->Mdl = NULL; - - DriverObject->DriverUnload = DriverUnload; - DriverObject->MajorFunction[IRP_MJ_CREATE] = DriverCreate; - DriverObject->MajorFunction[IRP_MJ_CLOSE] = DriverClose; - DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = DriverIoControl; - -cleanup: - if (MainDeviceObject && !NT_SUCCESS(Status)) - { - IoDeleteDevice(MainDeviceObject); - MainDeviceObject = NULL; - } - - return Status; -} - -/* Dispatch functions */ -/** - * @name DriverUnload - * - * Driver cleanup funtion. - * - * @param DriverObject - * Driver Object - */ -static -VOID -NTAPI -DriverUnload( - IN PDRIVER_OBJECT DriverObject) -{ - PAGED_CODE(); - - UNREFERENCED_PARAMETER(DriverObject); - - DPRINT("DriverUnload\n"); - - if (MainDeviceObject) - { - PKMT_DEVICE_EXTENSION DeviceExtension = MainDeviceObject->DeviceExtension; - ASSERT(!DeviceExtension->Mdl); - ASSERT(!DeviceExtension->ResultBuffer); - ASSERT(!ResultBuffer); - IoDeleteDevice(MainDeviceObject); - } -} - -/** - * @name DriverCreate - * - * Driver Dispatch function for CreateFile - * - * @param DeviceObject - * Device Object - * @param Irp - * I/O request packet - * - * @return Status - */ -static -NTSTATUS -NTAPI -DriverCreate( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) -{ - NTSTATUS Status = STATUS_SUCCESS; - PIO_STACK_LOCATION IoStackLocation; - - PAGED_CODE(); - - IoStackLocation = IoGetCurrentIrpStackLocation(Irp); - - DPRINT("DriverCreate. DeviceObject=%p, RequestorMode=%d, FileObject=%p, FsContext=%p, FsContext2=%p\n", - DeviceObject, Irp->RequestorMode, IoStackLocation->FileObject, - IoStackLocation->FileObject->FsContext, IoStackLocation->FileObject->FsContext2); - - Irp->IoStatus.Status = Status; - Irp->IoStatus.Information = 0; - - IoCompleteRequest(Irp, IO_NO_INCREMENT); - - return Status; -} - -/** - * @name DriverClose - * - * Driver Dispatch function for CloseHandle. - * - * @param DeviceObject - * Device Object - * @param Irp - * I/O request packet - * - * @return Status - */ -static -NTSTATUS -NTAPI -DriverClose( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) -{ - NTSTATUS Status = STATUS_SUCCESS; - PIO_STACK_LOCATION IoStackLocation; - PKMT_DEVICE_EXTENSION DeviceExtension; - - PAGED_CODE(); - - IoStackLocation = IoGetCurrentIrpStackLocation(Irp); - - DPRINT("DriverClose. DeviceObject=%p, RequestorMode=%d, FileObject=%p, FsContext=%p, FsContext2=%p\n", - DeviceObject, Irp->RequestorMode, IoStackLocation->FileObject, - IoStackLocation->FileObject->FsContext, IoStackLocation->FileObject->FsContext2); - - ASSERT(IoStackLocation->FileObject->FsContext2 == NULL); - DeviceExtension = DeviceObject->DeviceExtension; - if (DeviceExtension->Mdl && IoStackLocation->FileObject->FsContext == DeviceExtension->Mdl) - { - MmUnlockPages(DeviceExtension->Mdl); - IoFreeMdl(DeviceExtension->Mdl); - DeviceExtension->Mdl = NULL; - ResultBuffer = DeviceExtension->ResultBuffer = NULL; - } - else - { - ASSERT(IoStackLocation->FileObject->FsContext == NULL); - } - - Irp->IoStatus.Status = Status; - Irp->IoStatus.Information = 0; - - IoCompleteRequest(Irp, IO_NO_INCREMENT); - - return Status; -} - -/** - * @name DriverIoControl - * - * Driver Dispatch function for DeviceIoControl. - * - * @param DeviceObject - * Device Object - * @param Irp - * I/O request packet - * - * @return Status - */ -static -NTSTATUS -NTAPI -DriverIoControl( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) -{ - NTSTATUS Status = STATUS_SUCCESS; - PIO_STACK_LOCATION IoStackLocation; - ULONG Length = 0; - - PAGED_CODE(); - - IoStackLocation = IoGetCurrentIrpStackLocation(Irp); - - DPRINT("DriverIoControl. Code=0x%08X, DeviceObject=%p, FileObject=%p, FsContext=%p, FsContext2=%p\n", - IoStackLocation->Parameters.DeviceIoControl.IoControlCode, - DeviceObject, IoStackLocation->FileObject, - IoStackLocation->FileObject->FsContext, IoStackLocation->FileObject->FsContext2); - - switch (IoStackLocation->Parameters.DeviceIoControl.IoControlCode) - { - case IOCTL_KMTEST_GET_TESTS: - { - PCKMT_TEST TestEntry; - LPSTR OutputBuffer = Irp->AssociatedIrp.SystemBuffer; - size_t Remaining = IoStackLocation->Parameters.DeviceIoControl.OutputBufferLength; - - DPRINT("DriverIoControl. IOCTL_KMTEST_GET_TESTS, outlen=%lu\n", - IoStackLocation->Parameters.DeviceIoControl.OutputBufferLength); - - for (TestEntry = TestList; TestEntry->TestName; ++TestEntry) - { - RtlStringCbCopyExA(OutputBuffer, Remaining, TestEntry->TestName, &OutputBuffer, &Remaining, 0); - if (Remaining) - { - *OutputBuffer++ = '\0'; - --Remaining; - } - } - if (Remaining) - { - *OutputBuffer++ = '\0'; - --Remaining; - } - Length = IoStackLocation->Parameters.DeviceIoControl.OutputBufferLength - Remaining; - break; - } - case IOCTL_KMTEST_RUN_TEST: - { - ANSI_STRING TestName; - PCKMT_TEST TestEntry; - - DPRINT("DriverIoControl. IOCTL_KMTEST_RUN_TEST, inlen=%lu, outlen=%lu\n", - IoStackLocation->Parameters.DeviceIoControl.InputBufferLength, - IoStackLocation->Parameters.DeviceIoControl.OutputBufferLength); - TestName.Length = TestName.MaximumLength = (USHORT)min(IoStackLocation->Parameters.DeviceIoControl.InputBufferLength, USHRT_MAX); - TestName.Buffer = Irp->AssociatedIrp.SystemBuffer; - DPRINT("DriverIoControl. Run test: %Z\n", &TestName); - - for (TestEntry = TestList; TestEntry->TestName; ++TestEntry) - { - ANSI_STRING EntryName; - if (TestEntry->TestName[0] == '-') - RtlInitAnsiString(&EntryName, TestEntry->TestName + 1); - else - RtlInitAnsiString(&EntryName, TestEntry->TestName); - - if (!RtlCompareString(&TestName, &EntryName, FALSE)) - { - DPRINT1("DriverIoControl. Starting test %Z\n", &EntryName); - TestEntry->TestFunction(); - DPRINT1("DriverIoControl. Finished test %Z\n", &EntryName); - break; - } - } - - if (!TestEntry->TestName) - Status = STATUS_OBJECT_NAME_INVALID; - - break; - } - case IOCTL_KMTEST_SET_RESULTBUFFER: - { - PKMT_DEVICE_EXTENSION DeviceExtension = DeviceObject->DeviceExtension; - - DPRINT("DriverIoControl. IOCTL_KMTEST_SET_RESULTBUFFER, buffer=%p, inlen=%lu, outlen=%lu\n", - IoStackLocation->Parameters.DeviceIoControl.Type3InputBuffer, - IoStackLocation->Parameters.DeviceIoControl.InputBufferLength, - IoStackLocation->Parameters.DeviceIoControl.OutputBufferLength); - - if (DeviceExtension->Mdl) - { - if (IoStackLocation->FileObject->FsContext != DeviceExtension->Mdl) - { - Status = STATUS_ACCESS_DENIED; - break; - } - MmUnlockPages(DeviceExtension->Mdl); - IoFreeMdl(DeviceExtension->Mdl); - IoStackLocation->FileObject->FsContext = NULL; - ResultBuffer = DeviceExtension->ResultBuffer = NULL; - } - - DeviceExtension->Mdl = IoAllocateMdl(IoStackLocation->Parameters.DeviceIoControl.Type3InputBuffer, - IoStackLocation->Parameters.DeviceIoControl.InputBufferLength, - FALSE, FALSE, NULL); - if (!DeviceExtension->Mdl) - { - Status = STATUS_INSUFFICIENT_RESOURCES; - break; - } - - _SEH2_TRY - { - MmProbeAndLockPages(DeviceExtension->Mdl, UserMode, IoModifyAccess); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - Status = _SEH2_GetExceptionCode(); - IoFreeMdl(DeviceExtension->Mdl); - DeviceExtension->Mdl = NULL; - break; - } _SEH2_END; - - ResultBuffer = DeviceExtension->ResultBuffer = MmGetSystemAddressForMdlSafe(DeviceExtension->Mdl, NormalPagePriority); - IoStackLocation->FileObject->FsContext = DeviceExtension->Mdl; - - DPRINT("DriverIoControl. ResultBuffer: %ld %ld %ld %ld\n", - ResultBuffer->Successes, ResultBuffer->Failures, - ResultBuffer->LogBufferLength, ResultBuffer->LogBufferMaxLength); - break; - } - default: - DPRINT1("DriverIoControl. Invalid IoCtl code 0x%08X\n", - IoStackLocation->Parameters.DeviceIoControl.IoControlCode); - Status = STATUS_INVALID_DEVICE_REQUEST; - break; - } - - Irp->IoStatus.Status = Status; - Irp->IoStatus.Information = Length; - - IoCompleteRequest(Irp, IO_NO_INCREMENT); - - return Status; -} diff --git a/rostests/kmtests/kmtest_drv/kmtest_drv.rc b/rostests/kmtests/kmtest_drv/kmtest_drv.rc deleted file mode 100644 index 50a28eb7c50..00000000000 --- a/rostests/kmtests/kmtest_drv/kmtest_drv.rc +++ /dev/null @@ -1,15 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Driver Resource File - * PROGRAMMER: Thomas Faber - */ - -#include - -#define REACTOS_FILETYPE VFT_DRV -#define REACTOS_FILESUBTYPE VFT2_DRV_SYSTEM -#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Kernel-Mode Test Suite Driver\0" -#define REACTOS_STR_INTERNAL_NAME "kmtest.sys\0" -#define REACTOS_STR_ORIGINAL_FILENAME "kmtest.sys\0" -#include diff --git a/rostests/kmtests/kmtest_drv/kmtest_standalone.c b/rostests/kmtests/kmtest_drv/kmtest_standalone.c deleted file mode 100644 index a8bb707b3ae..00000000000 --- a/rostests/kmtests/kmtest_drv/kmtest_standalone.c +++ /dev/null @@ -1,488 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Example Test Driver - * PROGRAMMER: Thomas Faber - */ - -#include -#include -#include - -#define KMT_DEFINE_TEST_FUNCTIONS -#include - -//#define NDEBUG -#include - -#include - -/* types */ -typedef struct -{ - UCHAR MajorFunction; - PDEVICE_OBJECT DeviceObject; - PKMT_IRP_HANDLER IrpHandler; -} KMT_IRP_HANDLER_ENTRY, *PKMT_IRP_HANDLER_ENTRY; - -typedef struct -{ - ULONG ControlCode; - PDEVICE_OBJECT DeviceObject; - PKMT_MESSAGE_HANDLER MessageHandler; -} KMT_MESSAGE_HANDLER_ENTRY, *PKMT_MESSAGE_HANDLER_ENTRY; - -/* Prototypes */ -DRIVER_INITIALIZE DriverEntry; -static DRIVER_UNLOAD DriverUnload; -static DRIVER_DISPATCH DriverDispatch; -static KMT_IRP_HANDLER DeviceControlHandler; - -/* Globals */ -static PDEVICE_OBJECT TestDeviceObject; -static PDEVICE_OBJECT KmtestDeviceObject; - -#define KMT_MAX_IRP_HANDLERS 256 -static KMT_IRP_HANDLER_ENTRY IrpHandlers[KMT_MAX_IRP_HANDLERS] = { { 0 } }; -#define KMT_MAX_MESSAGE_HANDLERS 256 -static KMT_MESSAGE_HANDLER_ENTRY MessageHandlers[KMT_MAX_MESSAGE_HANDLERS] = { { 0 } }; - -/** - * @name DriverEntry - * - * Driver entry point. - * - * @param DriverObject - * Driver Object - * @param RegistryPath - * Driver Registry Path - * - * @return Status - */ -NTSTATUS -NTAPI -DriverEntry( - IN PDRIVER_OBJECT DriverObject, - IN PUNICODE_STRING RegistryPath) -{ - NTSTATUS Status = STATUS_SUCCESS; - WCHAR DeviceNameBuffer[128] = L"\\Device\\Kmtest-"; - UNICODE_STRING KmtestDeviceName; - PFILE_OBJECT KmtestFileObject; - PKMT_DEVICE_EXTENSION KmtestDeviceExtension; - UNICODE_STRING DeviceName; - PCWSTR DeviceNameSuffix; - INT Flags = 0; - int i; - PKPRCB Prcb; - - PAGED_CODE(); - - DPRINT("DriverEntry\n"); - - Prcb = KeGetCurrentPrcb(); - KmtIsCheckedBuild = (Prcb->BuildType & PRCB_BUILD_DEBUG) != 0; - KmtIsMultiProcessorBuild = (Prcb->BuildType & PRCB_BUILD_UNIPROCESSOR) == 0; - - /* get the Kmtest device, so that we get a ResultBuffer pointer */ - RtlInitUnicodeString(&KmtestDeviceName, KMTEST_DEVICE_DRIVER_PATH); - Status = IoGetDeviceObjectPointer(&KmtestDeviceName, FILE_ALL_ACCESS, &KmtestFileObject, &KmtestDeviceObject); - - if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to get Kmtest device object pointer\n"); - goto cleanup; - } - - Status = ObReferenceObjectByPointer(KmtestDeviceObject, FILE_ALL_ACCESS, NULL, KernelMode); - - if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to reference Kmtest device object\n"); - goto cleanup; - } - - ObDereferenceObject(KmtestFileObject); - KmtestFileObject = NULL; - KmtestDeviceExtension = KmtestDeviceObject->DeviceExtension; - ResultBuffer = KmtestDeviceExtension->ResultBuffer; - DPRINT("KmtestDeviceObject: %p\n", (PVOID)KmtestDeviceObject); - DPRINT("KmtestDeviceExtension: %p\n", (PVOID)KmtestDeviceExtension); - DPRINT("Setting ResultBuffer: %p\n", (PVOID)ResultBuffer); - - /* call TestEntry */ - RtlInitUnicodeString(&DeviceName, DeviceNameBuffer); - DeviceName.MaximumLength = sizeof DeviceNameBuffer; - TestEntry(DriverObject, RegistryPath, &DeviceNameSuffix, &Flags); - - /* create test device */ - if (!(Flags & TESTENTRY_NO_CREATE_DEVICE)) - { - RtlAppendUnicodeToString(&DeviceName, DeviceNameSuffix); - Status = IoCreateDevice(DriverObject, 0, &DeviceName, - FILE_DEVICE_UNKNOWN, - FILE_DEVICE_SECURE_OPEN | FILE_READ_ONLY_DEVICE, - TRUE, &TestDeviceObject); - - if (!NT_SUCCESS(Status)) - { - DPRINT1("Could not create device object %wZ\n", &DeviceName); - goto cleanup; - } - - DPRINT("DriverEntry. Created DeviceObject %p\n", - TestDeviceObject); - } - - /* initialize dispatch functions */ - if (!(Flags & TESTENTRY_NO_REGISTER_UNLOAD)) - DriverObject->DriverUnload = DriverUnload; - if (!(Flags & TESTENTRY_NO_REGISTER_DISPATCH)) - for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; ++i) - DriverObject->MajorFunction[i] = DriverDispatch; - -cleanup: - if (TestDeviceObject && !NT_SUCCESS(Status)) - { - IoDeleteDevice(TestDeviceObject); - TestDeviceObject = NULL; - } - - if (KmtestDeviceObject && !NT_SUCCESS(Status)) - { - ObDereferenceObject(KmtestDeviceObject); - KmtestDeviceObject = NULL; - if (KmtestFileObject) - ObDereferenceObject(KmtestFileObject); - } - - return Status; -} - -/** - * @name DriverUnload - * - * Driver cleanup funtion. - * - * @param DriverObject - * Driver Object - */ -static -VOID -NTAPI -DriverUnload( - IN PDRIVER_OBJECT DriverObject) -{ - PAGED_CODE(); - - UNREFERENCED_PARAMETER(DriverObject); - - DPRINT("DriverUnload\n"); - - TestUnload(DriverObject); - - if (TestDeviceObject) - IoDeleteDevice(TestDeviceObject); - - if (KmtestDeviceObject) - ObDereferenceObject(KmtestDeviceObject); -} - -/** - * @name KmtRegisterIrpHandler - * - * Register a handler with the IRP Dispatcher. - * If multiple registered handlers match an IRP, it is unspecified which of - * them is called on IRP reception - * - * @param MajorFunction - * IRP major function code to be handled - * @param DeviceObject - * Device Object to handle IRPs for. - * Can be NULL to indicate any device object - * @param IrpHandler - * Handler function to register. - * - * @return Status - */ -NTSTATUS -KmtRegisterIrpHandler( - IN UCHAR MajorFunction, - IN PDEVICE_OBJECT DeviceObject OPTIONAL, - IN PKMT_IRP_HANDLER IrpHandler) -{ - NTSTATUS Status = STATUS_SUCCESS; - int i; - - if (MajorFunction > IRP_MJ_MAXIMUM_FUNCTION) - { - Status = STATUS_INVALID_PARAMETER_1; - goto cleanup; - } - - if (IrpHandler == NULL) - { - Status = STATUS_INVALID_PARAMETER_3; - goto cleanup; - } - - for (i = 0; i < sizeof IrpHandlers / sizeof IrpHandlers[0]; ++i) - if (IrpHandlers[i].IrpHandler == NULL) - { - IrpHandlers[i].MajorFunction = MajorFunction; - IrpHandlers[i].DeviceObject = DeviceObject; - IrpHandlers[i].IrpHandler = IrpHandler; - goto cleanup; - } - - Status = STATUS_ALLOTTED_SPACE_EXCEEDED; - -cleanup: - return Status; -} - -/** - * @name KmtUnregisterIrpHandler - * - * Unregister a handler with the IRP Dispatcher. - * Parameters must be specified exactly as in the call to - * KmtRegisterIrpHandler. Only the first matching entry will be removed - * if multiple exist - * - * @param MajorFunction - * IRP major function code of the handler to be removed - * @param DeviceObject - * Device Object to of the handler to be removed - * @param IrpHandler - * Handler function of the handler to be removed - * - * @return Status - */ -NTSTATUS -KmtUnregisterIrpHandler( - IN UCHAR MajorFunction, - IN PDEVICE_OBJECT DeviceObject OPTIONAL, - IN PKMT_IRP_HANDLER IrpHandler) -{ - NTSTATUS Status = STATUS_SUCCESS; - int i; - - for (i = 0; i < sizeof IrpHandlers / sizeof IrpHandlers[0]; ++i) - if (IrpHandlers[i].MajorFunction == MajorFunction && - IrpHandlers[i].DeviceObject == DeviceObject && - IrpHandlers[i].IrpHandler == IrpHandler) - { - IrpHandlers[i].IrpHandler = NULL; - goto cleanup; - } - - Status = STATUS_NOT_FOUND; - -cleanup: - return Status; -} - -/** - * @name DriverDispatch - * - * Driver Dispatch function - * - * @param DeviceObject - * Device Object - * @param Irp - * I/O request packet - * - * @return Status - */ -static -NTSTATUS -NTAPI -DriverDispatch( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) -{ - NTSTATUS Status = STATUS_SUCCESS; - PIO_STACK_LOCATION IoStackLocation; - int i; - - PAGED_CODE(); - - IoStackLocation = IoGetCurrentIrpStackLocation(Irp); - - DPRINT("DriverDispatch: Function=%s, Device=%p\n", - KmtMajorFunctionNames[IoStackLocation->MajorFunction], - DeviceObject); - - for (i = 0; i < sizeof IrpHandlers / sizeof IrpHandlers[0]; ++i) - { - if (IrpHandlers[i].MajorFunction == IoStackLocation->MajorFunction && - (IrpHandlers[i].DeviceObject == NULL || IrpHandlers[i].DeviceObject == DeviceObject) && - IrpHandlers[i].IrpHandler != NULL) - return IrpHandlers[i].IrpHandler(DeviceObject, Irp, IoStackLocation); - } - - /* default handler for DeviceControl */ - if (IoStackLocation->MajorFunction == IRP_MJ_DEVICE_CONTROL || - IoStackLocation->MajorFunction == IRP_MJ_INTERNAL_DEVICE_CONTROL) - return DeviceControlHandler(DeviceObject, Irp, IoStackLocation); - - /* default handler */ - Irp->IoStatus.Status = Status; - Irp->IoStatus.Information = 0; - - IoCompleteRequest(Irp, IO_NO_INCREMENT); - - return Status; -} - -/** - * @name KmtRegisterMessageHandler - * - * Register a handler with the DeviceControl Dispatcher. - * If multiple registered handlers match a message, it is unspecified which of - * them is called on message reception. - * NOTE: message handlers registered with this function will not be called - * if a custom IRP handler matching the corresponding IRP is installed! - * - * @param ControlCode - * Control code to be handled, as passed by the application. - * Can be 0 to indicate any control code - * @param DeviceObject - * Device Object to handle IRPs for. - * Can be NULL to indicate any device object - * @param MessageHandler - * Handler function to register. - * - * @return Status - */ -NTSTATUS -KmtRegisterMessageHandler( - IN ULONG ControlCode OPTIONAL, - IN PDEVICE_OBJECT DeviceObject OPTIONAL, - IN PKMT_MESSAGE_HANDLER MessageHandler) -{ - NTSTATUS Status = STATUS_SUCCESS; - int i; - - if (ControlCode >= 0x400) - { - Status = STATUS_INVALID_PARAMETER_1; - goto cleanup; - } - - if (MessageHandler == NULL) - { - Status = STATUS_INVALID_PARAMETER_2; - goto cleanup; - } - - for (i = 0; i < sizeof MessageHandlers / sizeof MessageHandlers[0]; ++i) - if (MessageHandlers[i].MessageHandler == NULL) - { - MessageHandlers[i].ControlCode = ControlCode; - MessageHandlers[i].DeviceObject = DeviceObject; - MessageHandlers[i].MessageHandler = MessageHandler; - goto cleanup; - } - - Status = STATUS_ALLOTTED_SPACE_EXCEEDED; - -cleanup: - return Status; -} - -/** - * @name KmtUnregisterMessageHandler - * - * Unregister a handler with the DeviceControl Dispatcher. - * Parameters must be specified exactly as in the call to - * KmtRegisterMessageHandler. Only the first matching entry will be removed - * if multiple exist - * - * @param ControlCode - * Control code of the handler to be removed - * @param DeviceObject - * Device Object to of the handler to be removed - * @param MessageHandler - * Handler function of the handler to be removed - * - * @return Status - */ -NTSTATUS -KmtUnregisterMessageHandler( - IN ULONG ControlCode OPTIONAL, - IN PDEVICE_OBJECT DeviceObject OPTIONAL, - IN PKMT_MESSAGE_HANDLER MessageHandler) -{ - NTSTATUS Status = STATUS_SUCCESS; - int i; - - for (i = 0; i < sizeof MessageHandlers / sizeof MessageHandlers[0]; ++i) - if (MessageHandlers[i].ControlCode == ControlCode && - MessageHandlers[i].DeviceObject == DeviceObject && - MessageHandlers[i].MessageHandler == MessageHandler) - { - MessageHandlers[i].MessageHandler = NULL; - goto cleanup; - } - - Status = STATUS_NOT_FOUND; - -cleanup: - return Status; -} - -/** - * @name DeviceControlHandler - * - * Default IRP_MJ_DEVICE_CONTROL/IRP_MJ_INTERNAL_DEVICE_CONTROL handler - * - * @param DeviceObject - * Device Object. - * This is guaranteed not to have been touched by the dispatch function - * before the call to the IRP handler - * @param Irp - * Device Object. - * This is guaranteed not to have been touched by the dispatch function - * before the call to the IRP handler, except for passing it to - * IoGetCurrentStackLocation - * @param IoStackLocation - * Device Object. - * This is guaranteed not to have been touched by the dispatch function - * before the call to the IRP handler - * - * @return Status - */ -static -NTSTATUS -DeviceControlHandler( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp, - IN PIO_STACK_LOCATION IoStackLocation) -{ - NTSTATUS Status = STATUS_SUCCESS; - ULONG ControlCode = (IoStackLocation->Parameters.DeviceIoControl.IoControlCode & 0x00000FFC) >> 2; - ULONG OutLength = IoStackLocation->Parameters.DeviceIoControl.OutputBufferLength; - int i; - - for (i = 0; i < sizeof MessageHandlers / sizeof MessageHandlers[0]; ++i) - { - if ((MessageHandlers[i].ControlCode == 0 || - MessageHandlers[i].ControlCode == ControlCode) && - (MessageHandlers[i].DeviceObject == NULL || MessageHandlers[i].DeviceObject == DeviceObject) && - MessageHandlers[i].MessageHandler != NULL) - { - Status = MessageHandlers[i].MessageHandler(DeviceObject, ControlCode, Irp->AssociatedIrp.SystemBuffer, - IoStackLocation->Parameters.DeviceIoControl.InputBufferLength, - &OutLength); - break; - } - } - - Irp->IoStatus.Status = Status; - Irp->IoStatus.Information = OutLength; - - IoCompleteRequest(Irp, IO_NO_INCREMENT); - - return Status; -} diff --git a/rostests/kmtests/kmtest_drv/printf_stubs.c b/rostests/kmtests/kmtest_drv/printf_stubs.c deleted file mode 100644 index 09e4d2b96c3..00000000000 --- a/rostests/kmtests/kmtest_drv/printf_stubs.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite stub functions for any-IRQL vsnprintf - * PROGRAMMER: Thomas Faber - */ - -#undef wctomb -#include -#include -#include - -int __cdecl KmtWcToMb(char *mbchar, wchar_t wchar) -{ - *mbchar = (char)wchar; - return 1; -} - -int __cdecl streamout(FILE *stream, const char *format, va_list argptr); - -int __cdecl KmtVSNPrintF(char *buffer, size_t count, const char *format, va_list argptr) -{ - int result; - FILE stream; - - stream._base = (char *)buffer; - stream._ptr = stream._base; - stream._charbuf = 0; - stream._cnt = count; - stream._bufsiz = 0; - stream._flag = _IOSTRG | _IOWRT; - stream._tmpfname = 0; - - result = streamout(&stream, format, argptr); - - /* Only zero terminate if there is enough space left */ - if (stream._cnt) *(char *)stream._ptr = '\0'; - - return result; -} diff --git a/rostests/kmtests/kmtest_drv/testlist.c b/rostests/kmtests/kmtest_drv/testlist.c deleted file mode 100644 index 2cf37277e4d..00000000000 --- a/rostests/kmtests/kmtest_drv/testlist.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Driver test list - * PROGRAMMER: Thomas Faber - */ - -#include - -KMT_TESTFUNC Test_Example; -KMT_TESTFUNC Test_ExDoubleList; -KMT_TESTFUNC Test_ExFastMutex; -KMT_TESTFUNC Test_ExHardError; -KMT_TESTFUNC Test_ExHardErrorInteractive; -KMT_TESTFUNC Test_ExInterlocked; -KMT_TESTFUNC Test_ExPools; -KMT_TESTFUNC Test_ExResource; -KMT_TESTFUNC Test_ExSequencedList; -KMT_TESTFUNC Test_ExSingleList; -KMT_TESTFUNC Test_ExTimer; -KMT_TESTFUNC Test_FsRtlExpression; -KMT_TESTFUNC Test_IoDeviceInterface; -KMT_TESTFUNC Test_IoInterrupt; -KMT_TESTFUNC Test_IoIrp; -KMT_TESTFUNC Test_IoMdl; -KMT_TESTFUNC Test_KeApc; -KMT_TESTFUNC Test_KeDpc; -KMT_TESTFUNC Test_KeEvent; -KMT_TESTFUNC Test_KeGuardedMutex; -KMT_TESTFUNC Test_KeIrql; -KMT_TESTFUNC Test_KeProcessor; -KMT_TESTFUNC Test_KeTimer; -KMT_TESTFUNC Test_KernelType; -KMT_TESTFUNC Test_MmSection; -KMT_TESTFUNC Test_ObReference; -KMT_TESTFUNC Test_ObType; -KMT_TESTFUNC Test_ObTypeClean; -KMT_TESTFUNC Test_ObTypeNoClean; -KMT_TESTFUNC Test_RtlAvlTree; -KMT_TESTFUNC Test_RtlMemory; -KMT_TESTFUNC Test_RtlSplayTree; - -const KMT_TEST TestList[] = -{ - { "ExDoubleList", Test_ExDoubleList }, - { "ExFastMutex", Test_ExFastMutex }, - { "ExHardError", Test_ExHardError }, - { "-ExHardErrorInteractive", Test_ExHardErrorInteractive }, - { "ExInterlocked", Test_ExInterlocked }, - { "ExPools", Test_ExPools }, - { "ExResource", Test_ExResource }, - { "ExSequencedList", Test_ExSequencedList }, - { "ExSingleList", Test_ExSingleList }, - { "-ExTimer", Test_ExTimer }, - { "Example", Test_Example }, - { "FsRtlExpression", Test_FsRtlExpression }, - { "IoDeviceInterface", Test_IoDeviceInterface }, - { "IoInterrupt", Test_IoInterrupt }, - { "IoIrp", Test_IoIrp }, - { "IoMdl", Test_IoMdl }, - { "KeApc", Test_KeApc }, - { "KeDpc", Test_KeDpc }, - { "KeEvent", Test_KeEvent }, - { "KeGuardedMutex", Test_KeGuardedMutex }, - { "KeIrql", Test_KeIrql }, - { "-KeProcessor", Test_KeProcessor }, - { "KeTimer", Test_KeTimer }, - { "-KernelType", Test_KernelType }, - { "MmSection", Test_MmSection }, - { "ObReference", Test_ObReference }, - { "ObType", Test_ObType }, - { "-ObTypeClean", Test_ObTypeClean }, - { "-ObTypeNoClean", Test_ObTypeNoClean }, - { "RtlAvlTreeKM", Test_RtlAvlTree }, - { "RtlMemoryKM", Test_RtlMemory }, - { "RtlSplayTreeKM", Test_RtlSplayTree }, - { NULL, NULL } -}; diff --git a/rostests/kmtests/ntos_ex/ExDoubleList.c b/rostests/kmtests/ntos_ex/ExDoubleList.c deleted file mode 100644 index d2da26ca1cf..00000000000 --- a/rostests/kmtests/ntos_ex/ExDoubleList.c +++ /dev/null @@ -1,237 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Doubly-linked list test - * PROGRAMMER: Thomas Faber - */ - -struct _LIST_ENTRY; -#ifdef _X86_ -struct _LIST_ENTRY *__stdcall ExInterlockedInsertHeadList(struct _LIST_ENTRY *, struct _LIST_ENTRY *, unsigned long *); -struct _LIST_ENTRY *__stdcall ExInterlockedInsertTailList(struct _LIST_ENTRY *, struct _LIST_ENTRY *, unsigned long *); -struct _LIST_ENTRY *__stdcall ExInterlockedRemoveHeadList(struct _LIST_ENTRY *, unsigned long *); -#endif - -#include - -LIST_ENTRY Entries[5]; - -#define ok_eq_free(Value, Expected) do \ -{ \ - if (KmtIsCheckedBuild) \ - ok_eq_pointer(Value, (PVOID)0x0BADD0FF); \ - else \ - ok_eq_pointer(Value, Expected); \ -} while (0) - -#define ok_eq_free2(Value, Expected) do \ -{ \ - if (KmtIsCheckedBuild) \ - ok_eq_pointer(Value, (PVOID)0xBADDD0FF); \ - else \ - ok_eq_pointer(Value, Expected); \ -} while (0) - -START_TEST(ExDoubleList) -{ - KSPIN_LOCK SpinLock; - LIST_ENTRY ListHead; - PLIST_ENTRY Ret; - - KeInitializeSpinLock(&SpinLock); - - memset(&ListHead, 0x55, sizeof ListHead); - InitializeListHead(&ListHead); - ok_eq_pointer(ListHead.Flink, &ListHead); - ok_eq_pointer(ListHead.Blink, &ListHead); - ok_bool_true(KmtAreInterruptsEnabled(), "Interrupts enabled:"); - ok_irql(PASSIVE_LEVEL); - - Ret = ExInterlockedInsertHeadList(&ListHead, &Entries[0], &SpinLock); - ok_eq_pointer(Ret, NULL); - ok_eq_pointer(ListHead.Flink, &Entries[0]); - ok_eq_pointer(ListHead.Blink, &Entries[0]); - ok_eq_pointer(Entries[0].Flink, &ListHead); - ok_eq_pointer(Entries[0].Blink, &ListHead); - ok_bool_true(KmtAreInterruptsEnabled(), "Interrupts enabled:"); - ok_irql(PASSIVE_LEVEL); - - Ret = ExInterlockedRemoveHeadList(&ListHead, &SpinLock); - ok_eq_pointer(Ret, &Entries[0]); - ok_eq_pointer(ListHead.Flink, &ListHead); - ok_eq_pointer(ListHead.Blink, &ListHead); - ok_eq_free(Entries[0].Flink, &ListHead); - ok_eq_free(Entries[0].Blink, &ListHead); - ok_bool_true(KmtAreInterruptsEnabled(), "Interrupts enabled:"); - ok_irql(PASSIVE_LEVEL); - - Ret = ExInterlockedRemoveHeadList(&ListHead, &SpinLock); - ok_eq_pointer(Ret, NULL); - ok_eq_pointer(ListHead.Flink, &ListHead); - ok_eq_pointer(ListHead.Blink, &ListHead); - ok_eq_free(Entries[0].Flink, &ListHead); - ok_eq_free(Entries[0].Blink, &ListHead); - ok_bool_true(KmtAreInterruptsEnabled(), "Interrupts enabled:"); - ok_irql(PASSIVE_LEVEL); - - Ret = ExInterlockedInsertTailList(&ListHead, &Entries[0], &SpinLock); - ok_eq_pointer(Ret, NULL); - ok_eq_pointer(ListHead.Flink, &Entries[0]); - ok_eq_pointer(ListHead.Blink, &Entries[0]); - ok_eq_pointer(Entries[0].Flink, &ListHead); - ok_eq_pointer(Entries[0].Blink, &ListHead); - ok_bool_true(KmtAreInterruptsEnabled(), "Interrupts enabled:"); - ok_irql(PASSIVE_LEVEL); - - Ret = ExInterlockedRemoveHeadList(&ListHead, &SpinLock); - ok_eq_pointer(Ret, &Entries[0]); - ok_eq_pointer(ListHead.Flink, &ListHead); - ok_eq_pointer(ListHead.Blink, &ListHead); - ok_eq_free(Entries[0].Flink, &ListHead); - ok_eq_free(Entries[0].Blink, &ListHead); - ok_bool_true(KmtAreInterruptsEnabled(), "Interrupts enabled:"); - ok_irql(PASSIVE_LEVEL); - - Ret = ExInterlockedRemoveHeadList(&ListHead, &SpinLock); - ok_eq_pointer(Ret, NULL); - ok_eq_pointer(ListHead.Flink, &ListHead); - ok_eq_pointer(ListHead.Blink, &ListHead); - ok_eq_free(Entries[0].Flink, &ListHead); - ok_eq_free(Entries[0].Blink, &ListHead); - ok_bool_true(KmtAreInterruptsEnabled(), "Interrupts enabled:"); - ok_irql(PASSIVE_LEVEL); - - Ret = ExInterlockedInsertTailList(&ListHead, &Entries[0], &SpinLock); - ok_eq_pointer(Ret, NULL); - ok_eq_pointer(ListHead.Flink, &Entries[0]); - ok_eq_pointer(ListHead.Blink, &Entries[0]); - ok_eq_pointer(Entries[0].Flink, &ListHead); - ok_eq_pointer(Entries[0].Blink, &ListHead); - ok_bool_true(KmtAreInterruptsEnabled(), "Interrupts enabled:"); - ok_irql(PASSIVE_LEVEL); - - Ret = ExInterlockedInsertHeadList(&ListHead, &Entries[1], &SpinLock); - ok_eq_pointer(Ret, &Entries[0]); - ok_eq_pointer(ListHead.Flink, &Entries[1]); - ok_eq_pointer(ListHead.Blink, &Entries[0]); - ok_eq_pointer(Entries[0].Flink, &ListHead); - ok_eq_pointer(Entries[0].Blink, &Entries[1]); - ok_eq_pointer(Entries[1].Flink, &Entries[0]); - ok_eq_pointer(Entries[1].Blink, &ListHead); - ok_bool_true(KmtAreInterruptsEnabled(), "Interrupts enabled:"); - ok_irql(PASSIVE_LEVEL); - - Ret = ExInterlockedInsertTailList(&ListHead, &Entries[2], &SpinLock); - ok_eq_pointer(Ret, &Entries[0]); - ok_eq_pointer(ListHead.Flink, &Entries[1]); - ok_eq_pointer(ListHead.Blink, &Entries[2]); - ok_eq_pointer(Entries[0].Flink, &Entries[2]); - ok_eq_pointer(Entries[0].Blink, &Entries[1]); - ok_eq_pointer(Entries[1].Flink, &Entries[0]); - ok_eq_pointer(Entries[1].Blink, &ListHead); - ok_eq_pointer(Entries[2].Flink, &ListHead); - ok_eq_pointer(Entries[2].Blink, &Entries[0]); - ok_bool_true(KmtAreInterruptsEnabled(), "Interrupts enabled:"); - ok_irql(PASSIVE_LEVEL); - - memset(Entries, 0x55, sizeof Entries); -#undef ExInterlockedInsertHeadList -#undef ExInterlockedInsertTailList -#undef ExInterlockedRemoveHeadList - - memset(&ListHead, 0x55, sizeof ListHead); - InitializeListHead(&ListHead); - ok_eq_pointer(ListHead.Flink, &ListHead); - ok_eq_pointer(ListHead.Blink, &ListHead); - ok_bool_true(KmtAreInterruptsEnabled(), "Interrupts enabled:"); - ok_irql(PASSIVE_LEVEL); - - Ret = ExInterlockedInsertHeadList(&ListHead, &Entries[0], &SpinLock); - ok_eq_pointer(Ret, NULL); - ok_eq_pointer(ListHead.Flink, &Entries[0]); - ok_eq_pointer(ListHead.Blink, &Entries[0]); - ok_eq_pointer(Entries[0].Flink, &ListHead); - ok_eq_pointer(Entries[0].Blink, &ListHead); - ok_bool_true(KmtAreInterruptsEnabled(), "Interrupts enabled:"); - ok_irql(PASSIVE_LEVEL); - - Ret = ExInterlockedRemoveHeadList(&ListHead, &SpinLock); - ok_eq_pointer(Ret, &Entries[0]); - ok_eq_pointer(ListHead.Flink, &ListHead); - ok_eq_pointer(ListHead.Blink, &ListHead); - ok_eq_free2(Entries[0].Flink, &ListHead); - ok_eq_free2(Entries[0].Blink, &ListHead); - ok_bool_true(KmtAreInterruptsEnabled(), "Interrupts enabled:"); - ok_irql(PASSIVE_LEVEL); - - Ret = ExInterlockedRemoveHeadList(&ListHead, &SpinLock); - ok_eq_pointer(Ret, NULL); - ok_eq_pointer(ListHead.Flink, &ListHead); - ok_eq_pointer(ListHead.Blink, &ListHead); - ok_eq_free2(Entries[0].Flink, &ListHead); - ok_eq_free2(Entries[0].Blink, &ListHead); - ok_bool_true(KmtAreInterruptsEnabled(), "Interrupts enabled:"); - ok_irql(PASSIVE_LEVEL); - - Ret = ExInterlockedInsertTailList(&ListHead, &Entries[0], &SpinLock); - ok_eq_pointer(Ret, NULL); - ok_eq_pointer(ListHead.Flink, &Entries[0]); - ok_eq_pointer(ListHead.Blink, &Entries[0]); - ok_eq_pointer(Entries[0].Flink, &ListHead); - ok_eq_pointer(Entries[0].Blink, &ListHead); - ok_bool_true(KmtAreInterruptsEnabled(), "Interrupts enabled:"); - ok_irql(PASSIVE_LEVEL); - - Ret = ExInterlockedRemoveHeadList(&ListHead, &SpinLock); - ok_eq_pointer(Ret, &Entries[0]); - ok_eq_pointer(ListHead.Flink, &ListHead); - ok_eq_pointer(ListHead.Blink, &ListHead); - ok_eq_free2(Entries[0].Flink, &ListHead); - ok_eq_free2(Entries[0].Blink, &ListHead); - ok_bool_true(KmtAreInterruptsEnabled(), "Interrupts enabled:"); - ok_irql(PASSIVE_LEVEL); - - Ret = ExInterlockedRemoveHeadList(&ListHead, &SpinLock); - ok_eq_pointer(Ret, NULL); - ok_eq_pointer(ListHead.Flink, &ListHead); - ok_eq_pointer(ListHead.Blink, &ListHead); - ok_eq_free2(Entries[0].Flink, &ListHead); - ok_eq_free2(Entries[0].Blink, &ListHead); - ok_bool_true(KmtAreInterruptsEnabled(), "Interrupts enabled:"); - ok_irql(PASSIVE_LEVEL); - - Ret = ExInterlockedInsertTailList(&ListHead, &Entries[0], &SpinLock); - ok_eq_pointer(Ret, NULL); - ok_eq_pointer(ListHead.Flink, &Entries[0]); - ok_eq_pointer(ListHead.Blink, &Entries[0]); - ok_eq_pointer(Entries[0].Flink, &ListHead); - ok_eq_pointer(Entries[0].Blink, &ListHead); - ok_bool_true(KmtAreInterruptsEnabled(), "Interrupts enabled:"); - ok_irql(PASSIVE_LEVEL); - - Ret = ExInterlockedInsertHeadList(&ListHead, &Entries[1], &SpinLock); - ok_eq_pointer(Ret, &Entries[0]); - ok_eq_pointer(ListHead.Flink, &Entries[1]); - ok_eq_pointer(ListHead.Blink, &Entries[0]); - ok_eq_pointer(Entries[0].Flink, &ListHead); - ok_eq_pointer(Entries[0].Blink, &Entries[1]); - ok_eq_pointer(Entries[1].Flink, &Entries[0]); - ok_eq_pointer(Entries[1].Blink, &ListHead); - ok_bool_true(KmtAreInterruptsEnabled(), "Interrupts enabled:"); - ok_irql(PASSIVE_LEVEL); - - Ret = ExInterlockedInsertTailList(&ListHead, &Entries[2], &SpinLock); - ok_eq_pointer(Ret, &Entries[0]); - ok_eq_pointer(ListHead.Flink, &Entries[1]); - ok_eq_pointer(ListHead.Blink, &Entries[2]); - ok_eq_pointer(Entries[0].Flink, &Entries[2]); - ok_eq_pointer(Entries[0].Blink, &Entries[1]); - ok_eq_pointer(Entries[1].Flink, &Entries[0]); - ok_eq_pointer(Entries[1].Blink, &ListHead); - ok_eq_pointer(Entries[2].Flink, &ListHead); - ok_eq_pointer(Entries[2].Blink, &Entries[0]); - ok_bool_true(KmtAreInterruptsEnabled(), "Interrupts enabled:"); - ok_irql(PASSIVE_LEVEL); - - KmtSetIrql(PASSIVE_LEVEL); -} diff --git a/rostests/kmtests/ntos_ex/ExFastMutex.c b/rostests/kmtests/ntos_ex/ExFastMutex.c deleted file mode 100644 index 4535ddfc66b..00000000000 --- a/rostests/kmtests/ntos_ex/ExFastMutex.c +++ /dev/null @@ -1,311 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Fast Mutex test - * PROGRAMMER: Thomas Faber - */ - -#include - -//#define NDEBUG -#include - -NTKERNELAPI VOID FASTCALL ExiAcquireFastMutex(IN OUT PFAST_MUTEX FastMutex); -NTKERNELAPI VOID FASTCALL ExiReleaseFastMutex(IN OUT PFAST_MUTEX FastMutex); -NTKERNELAPI BOOLEAN FASTCALL ExiTryToAcquireFastMutex(IN OUT PFAST_MUTEX FastMutex); - -#define CheckMutex(Mutex, ExpectedCount, ExpectedOwner, \ - ExpectedContention, ExpectedOldIrql, \ - ExpectedIrql) do \ -{ \ - ok_eq_long((Mutex)->Count, ExpectedCount); \ - ok_eq_pointer((Mutex)->Owner, ExpectedOwner); \ - ok_eq_ulong((Mutex)->Contention, ExpectedContention); \ - ok_eq_ulong((Mutex)->OldIrql, (ULONG)ExpectedOldIrql); \ - ok_bool_false(KeAreApcsDisabled(), "KeAreApcsDisabled returned"); \ - ok_irql(ExpectedIrql); \ -} while (0) - -static -VOID -TestFastMutex( - PFAST_MUTEX Mutex, - KIRQL OriginalIrql) -{ - PKTHREAD Thread = KeGetCurrentThread(); - - ok_irql(OriginalIrql); - - /* acquire/release normally */ - ExAcquireFastMutex(Mutex); - CheckMutex(Mutex, 0L, Thread, 0LU, OriginalIrql, APC_LEVEL); - ok_bool_false(ExTryToAcquireFastMutex(Mutex), "ExTryToAcquireFastMutex returned"); - CheckMutex(Mutex, 0L, Thread, 0LU, OriginalIrql, APC_LEVEL); - ExReleaseFastMutex(Mutex); - CheckMutex(Mutex, 1L, NULL, 0LU, OriginalIrql, OriginalIrql); - -#ifdef _M_IX86 - /* ntoskrnl's fastcall version */ - ExiAcquireFastMutex(Mutex); - CheckMutex(Mutex, 0L, Thread, 0LU, OriginalIrql, APC_LEVEL); - ok_bool_false(ExiTryToAcquireFastMutex(Mutex), "ExiTryToAcquireFastMutex returned"); - CheckMutex(Mutex, 0L, Thread, 0LU, OriginalIrql, APC_LEVEL); - ExiReleaseFastMutex(Mutex); - CheckMutex(Mutex, 1L, NULL, 0LU, OriginalIrql, OriginalIrql); -#endif - - /* try to acquire */ - ok_bool_true(ExTryToAcquireFastMutex(Mutex), "ExTryToAcquireFastMutex returned"); - CheckMutex(Mutex, 0L, Thread, 0LU, OriginalIrql, APC_LEVEL); - ExReleaseFastMutex(Mutex); - CheckMutex(Mutex, 1L, NULL, 0LU, OriginalIrql, OriginalIrql); - - /* shortcut functions with critical region */ - ExEnterCriticalRegionAndAcquireFastMutexUnsafe(Mutex); - ok_bool_true(KeAreApcsDisabled(), "KeAreApcsDisabled returned"); - ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(Mutex); - - /* acquire/release unsafe */ - if (!KmtIsCheckedBuild || OriginalIrql == APC_LEVEL) - { - ExAcquireFastMutexUnsafe(Mutex); - CheckMutex(Mutex, 0L, Thread, 0LU, OriginalIrql, OriginalIrql); - ExReleaseFastMutexUnsafe(Mutex); - CheckMutex(Mutex, 1L, NULL, 0LU, OriginalIrql, OriginalIrql); - - /* mismatched acquire/release */ - ExAcquireFastMutex(Mutex); - CheckMutex(Mutex, 0L, Thread, 0LU, OriginalIrql, APC_LEVEL); - ExReleaseFastMutexUnsafe(Mutex); - CheckMutex(Mutex, 1L, NULL, 0LU, OriginalIrql, APC_LEVEL); - KmtSetIrql(OriginalIrql); - CheckMutex(Mutex, 1L, NULL, 0LU, OriginalIrql, OriginalIrql); - - Mutex->OldIrql = 0x55555555LU; - ExAcquireFastMutexUnsafe(Mutex); - CheckMutex(Mutex, 0L, Thread, 0LU, 0x55555555LU, OriginalIrql); - Mutex->OldIrql = PASSIVE_LEVEL; - ExReleaseFastMutex(Mutex); - CheckMutex(Mutex, 1L, NULL, 0LU, PASSIVE_LEVEL, PASSIVE_LEVEL); - KmtSetIrql(OriginalIrql); - CheckMutex(Mutex, 1L, NULL, 0LU, PASSIVE_LEVEL, OriginalIrql); - } - - if (!KmtIsCheckedBuild) - { - /* release without acquire */ - ExReleaseFastMutexUnsafe(Mutex); - CheckMutex(Mutex, 2L, NULL, 0LU, PASSIVE_LEVEL, OriginalIrql); - --Mutex->Count; - Mutex->OldIrql = OriginalIrql; - ExReleaseFastMutex(Mutex); - CheckMutex(Mutex, 2L, NULL, 0LU, OriginalIrql, OriginalIrql); - ExReleaseFastMutex(Mutex); - CheckMutex(Mutex, 3L, NULL, 0LU, OriginalIrql, OriginalIrql); - Mutex->Count -= 2; - } - - /* make sure we survive this in case of error */ - ok_eq_long(Mutex->Count, 1L); - Mutex->Count = 1; - ok_irql(OriginalIrql); - KmtSetIrql(OriginalIrql); -} - -typedef VOID (FASTCALL *PMUTEX_FUNCTION)(PFAST_MUTEX); -typedef BOOLEAN (FASTCALL *PMUTEX_TRY_FUNCTION)(PFAST_MUTEX); - -typedef struct -{ - HANDLE Handle; - PKTHREAD Thread; - KIRQL Irql; - PFAST_MUTEX Mutex; - PMUTEX_FUNCTION Acquire; - PMUTEX_TRY_FUNCTION TryAcquire; - PMUTEX_FUNCTION Release; - BOOLEAN Try; - BOOLEAN RetExpected; - KEVENT InEvent; - KEVENT OutEvent; -} THREAD_DATA, *PTHREAD_DATA; - -static -VOID -NTAPI -AcquireMutexThread( - PVOID Parameter) -{ - PTHREAD_DATA ThreadData = Parameter; - KIRQL Irql; - BOOLEAN Ret = FALSE; - NTSTATUS Status; - - KeRaiseIrql(ThreadData->Irql, &Irql); - - if (ThreadData->Try) - { - Ret = ThreadData->TryAcquire(ThreadData->Mutex); - ok_eq_bool(Ret, ThreadData->RetExpected); - } - else - ThreadData->Acquire(ThreadData->Mutex); - - ok_bool_false(KeSetEvent(&ThreadData->OutEvent, 0, TRUE), "KeSetEvent returned"); - Status = KeWaitForSingleObject(&ThreadData->InEvent, Executive, KernelMode, FALSE, NULL); - ok_eq_hex(Status, STATUS_SUCCESS); - - if (!ThreadData->Try || Ret) - ThreadData->Release(ThreadData->Mutex); - - KeLowerIrql(Irql); -} - -static -VOID -InitThreadData( - PTHREAD_DATA ThreadData, - PFAST_MUTEX Mutex, - PMUTEX_FUNCTION Acquire, - PMUTEX_TRY_FUNCTION TryAcquire, - PMUTEX_FUNCTION Release) -{ - ThreadData->Mutex = Mutex; - KeInitializeEvent(&ThreadData->InEvent, NotificationEvent, FALSE); - KeInitializeEvent(&ThreadData->OutEvent, NotificationEvent, FALSE); - ThreadData->Acquire = Acquire; - ThreadData->TryAcquire = TryAcquire; - ThreadData->Release = Release; -} - -static -NTSTATUS -StartThread( - PTHREAD_DATA ThreadData, - PLARGE_INTEGER Timeout, - KIRQL Irql, - BOOLEAN Try, - BOOLEAN RetExpected) -{ - NTSTATUS Status = STATUS_SUCCESS; - OBJECT_ATTRIBUTES Attributes; - - ThreadData->Try = Try; - ThreadData->Irql = Irql; - ThreadData->RetExpected = RetExpected; - InitializeObjectAttributes(&Attributes, NULL, OBJ_KERNEL_HANDLE, NULL, NULL); - Status = PsCreateSystemThread(&ThreadData->Handle, GENERIC_ALL, &Attributes, NULL, NULL, AcquireMutexThread, ThreadData); - ok_eq_hex(Status, STATUS_SUCCESS); - Status = ObReferenceObjectByHandle(ThreadData->Handle, SYNCHRONIZE, PsThreadType, KernelMode, (PVOID *)&ThreadData->Thread, NULL); - ok_eq_hex(Status, STATUS_SUCCESS); - - return KeWaitForSingleObject(&ThreadData->OutEvent, Executive, KernelMode, FALSE, Timeout); -} - -static -VOID -FinishThread( - PTHREAD_DATA ThreadData) -{ - NTSTATUS Status = STATUS_SUCCESS; - - KeSetEvent(&ThreadData->InEvent, 0, TRUE); - Status = KeWaitForSingleObject(ThreadData->Thread, Executive, KernelMode, FALSE, NULL); - ok_eq_hex(Status, STATUS_SUCCESS); - - ObDereferenceObject(ThreadData->Thread); - Status = ZwClose(ThreadData->Handle); - ok_eq_hex(Status, STATUS_SUCCESS); - KeClearEvent(&ThreadData->InEvent); - KeClearEvent(&ThreadData->OutEvent); -} - -static -VOID -TestFastMutexConcurrent( - PFAST_MUTEX Mutex) -{ - NTSTATUS Status; - THREAD_DATA ThreadData; - THREAD_DATA ThreadData2; - THREAD_DATA ThreadDataUnsafe; - THREAD_DATA ThreadDataTry; - LARGE_INTEGER Timeout; - Timeout.QuadPart = -10 * 1000 * 10; /* 10 ms */ - - InitThreadData(&ThreadData, Mutex, ExAcquireFastMutex, NULL, ExReleaseFastMutex); - InitThreadData(&ThreadData2, Mutex, ExAcquireFastMutex, NULL, ExReleaseFastMutex); - InitThreadData(&ThreadDataUnsafe, Mutex, ExAcquireFastMutexUnsafe, NULL, ExReleaseFastMutexUnsafe); - InitThreadData(&ThreadDataTry, Mutex, NULL, ExTryToAcquireFastMutex, ExReleaseFastMutex); - - /* have a thread acquire the mutex */ - Status = StartThread(&ThreadData, NULL, PASSIVE_LEVEL, FALSE, FALSE); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckMutex(Mutex, 0L, ThreadData.Thread, 0LU, PASSIVE_LEVEL, PASSIVE_LEVEL); - /* have a second thread try to acquire it -- should fail */ - Status = StartThread(&ThreadDataTry, NULL, PASSIVE_LEVEL, TRUE, FALSE); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckMutex(Mutex, 0L, ThreadData.Thread, 0LU, PASSIVE_LEVEL, PASSIVE_LEVEL); - FinishThread(&ThreadDataTry); - - /* have another thread acquire it -- should block */ - Status = StartThread(&ThreadData2, &Timeout, APC_LEVEL, FALSE, FALSE); - ok_eq_hex(Status, STATUS_TIMEOUT); - CheckMutex(Mutex, -1L, ThreadData.Thread, 1LU, PASSIVE_LEVEL, PASSIVE_LEVEL); - - /* finish the first thread -- now the second should become available */ - FinishThread(&ThreadData); - Status = KeWaitForSingleObject(&ThreadData2.OutEvent, Executive, KernelMode, FALSE, NULL); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckMutex(Mutex, 0L, ThreadData2.Thread, 1LU, APC_LEVEL, PASSIVE_LEVEL); - - /* block two more threads */ - Status = StartThread(&ThreadDataUnsafe, &Timeout, APC_LEVEL, FALSE, FALSE); - ok_eq_hex(Status, STATUS_TIMEOUT); - CheckMutex(Mutex, -1L, ThreadData2.Thread, 2LU, APC_LEVEL, PASSIVE_LEVEL); - - Status = StartThread(&ThreadData, &Timeout, PASSIVE_LEVEL, FALSE, FALSE); - ok_eq_hex(Status, STATUS_TIMEOUT); - CheckMutex(Mutex, -2L, ThreadData2.Thread, 3LU, APC_LEVEL, PASSIVE_LEVEL); - - /* finish 1 */ - FinishThread(&ThreadData2); - Status = KeWaitForSingleObject(&ThreadDataUnsafe.OutEvent, Executive, KernelMode, FALSE, NULL); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckMutex(Mutex, -1L, ThreadDataUnsafe.Thread, 3LU, APC_LEVEL, PASSIVE_LEVEL); - - /* finish 2 */ - FinishThread(&ThreadDataUnsafe); - Status = KeWaitForSingleObject(&ThreadData.OutEvent, Executive, KernelMode, FALSE, NULL); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckMutex(Mutex, 0L, ThreadData.Thread, 3LU, PASSIVE_LEVEL, PASSIVE_LEVEL); - - /* finish 3 */ - FinishThread(&ThreadData); - - CheckMutex(Mutex, 1L, NULL, 3LU, PASSIVE_LEVEL, PASSIVE_LEVEL); -} - -START_TEST(ExFastMutex) -{ - FAST_MUTEX Mutex; - KIRQL Irql; - - memset(&Mutex, 0x55, sizeof Mutex); - ExInitializeFastMutex(&Mutex); - CheckMutex(&Mutex, 1L, NULL, 0LU, 0x55555555LU, PASSIVE_LEVEL); - - TestFastMutex(&Mutex, PASSIVE_LEVEL); - KeRaiseIrql(APC_LEVEL, &Irql); - TestFastMutex(&Mutex, APC_LEVEL); - if (!KmtIsCheckedBuild) - { - KeRaiseIrql(DISPATCH_LEVEL, &Irql); - TestFastMutex(&Mutex, DISPATCH_LEVEL); - KeRaiseIrql(HIGH_LEVEL, &Irql); - TestFastMutex(&Mutex, HIGH_LEVEL); - } - KeLowerIrql(PASSIVE_LEVEL); - - TestFastMutexConcurrent(&Mutex); -} diff --git a/rostests/kmtests/ntos_ex/ExHardError.c b/rostests/kmtests/ntos_ex/ExHardError.c deleted file mode 100644 index 39cd0aba82c..00000000000 --- a/rostests/kmtests/ntos_ex/ExHardError.c +++ /dev/null @@ -1,236 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Hard error message test - * PROGRAMMER: Thomas Faber - */ - -#include - -/* TODO: don't require user interaction, test Io* routines, - * test NTSTATUS values with special handling */ - -static -VOID -SetParameters( - OUT PULONG_PTR Parameters, - IN INT Count, - ...) -{ - INT i; - va_list Arguments; - va_start(Arguments, Count); - for (i = 0; i < Count; ++i) - Parameters[i] = va_arg(Arguments, ULONG_PTR); - va_end(Arguments); -} - -#define NoResponse 27 - -#define CheckHardError(ErrStatus, UnicodeStringMask, ResponseOption, \ - ExpectedStatus, ExpectedResponse, \ - NumberOfParameters, ...) do \ -{ \ - SetParameters(HardErrorParameters, NumberOfParameters, __VA_ARGS__);\ - Response = NoResponse; \ - _SEH2_TRY { \ - Status = ExRaiseHardError(ErrStatus, \ - NumberOfParameters, \ - UnicodeStringMask, \ - HardErrorParameters, \ - ResponseOption, \ - &Response); \ - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { \ - Status = _SEH2_GetExceptionCode(); \ - } _SEH2_END; \ - ok_eq_hex(Status, ExpectedStatus); \ - ok_eq_ulong(Response, (ULONG)ExpectedResponse); \ -} while (0) - -#define CheckInformationalHardError(ErrStatus, String, Thread, \ - ExpectedStatus, ExpectedRet) do \ -{ \ - Status = STATUS_SUCCESS; \ - Ret = !ExpectedRet; \ - _SEH2_TRY { \ - Ret = IoRaiseInformationalHardError(ErrStatus, \ - String, \ - Thread); \ - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { \ - Status = _SEH2_GetExceptionCode(); \ - } _SEH2_END; \ - ok_eq_hex(Status, ExpectedStatus); \ - ok_eq_bool(Ret, ExpectedRet); \ -} while (0) - -static -VOID -TestHardError( - BOOLEAN InteractivePart1, - BOOLEAN InteractivePart2, - BOOLEAN InteractivePart3, - BOOLEAN InteractivePart4) -{ - NTSTATUS Status; - ULONG Response; - WCHAR StringBuffer1[] = L"Parameter1+Garbage"; - CHAR StringBuffer1Ansi[] = "Parameter1+Garbage"; - WCHAR StringBuffer2[] = L"Parameter2+Garbage"; - UNICODE_STRING String1 = RTL_CONSTANT_STRING(StringBuffer1); - ANSI_STRING String1Ansi = RTL_CONSTANT_STRING(StringBuffer1Ansi); - UNICODE_STRING String2 = RTL_CONSTANT_STRING(StringBuffer2); - ULONG_PTR HardErrorParameters[6]; - BOOLEAN Ret; - - String1.Length = sizeof L"Parameter1" - sizeof UNICODE_NULL; - String1Ansi.Length = sizeof "Parameter1" - sizeof ANSI_NULL; - String2.Length = sizeof L"Parameter2" - sizeof UNICODE_NULL; - - if (InteractivePart1) - { - CheckHardError(0x40000000, 0, OptionOk, STATUS_SUCCESS, ResponseOk, 0, 0); // outputs a box :| - CheckHardError(0x40000001, 0, OptionOk, STATUS_SUCCESS, ResponseOk, 4, 1, 2, 3, 4); // outputs a box :| - CheckHardError(0x40000002, 0, OptionOk, STATUS_SUCCESS, ResponseOk, 5, 1, 2, 3, 4, 5); // outputs a box :| - CheckHardError(0x40000003, 0, OptionOk, STATUS_SUCCESS, ResponseNotHandled, 6, 1, 2, 3, 4, 5, 6); // TODO: interactive on ROS - } - - CheckHardError(0x40000004, 0, OptionShutdownSystem, STATUS_PRIVILEGE_NOT_HELD, ResponseNotHandled, 0, 0); - if (InteractivePart1) - { - // TODO: these 2 are interactive on ROS - CheckHardError(0x40000005, 0, OptionOkNoWait, STATUS_SUCCESS, ResponseOk, 0, 0); // outputs a balloon notification - CheckHardError(0x4000000f, 0, OptionOkNoWait, STATUS_SUCCESS, ResponseOk, 0, 0); // outputs a balloon notification - CheckHardError(0x40000006, 0, OptionAbortRetryIgnore, STATUS_SUCCESS, ResponseAbort, 0, 0); // outputs a box :| - CheckHardError(0x40000006, 0, OptionAbortRetryIgnore, STATUS_SUCCESS, ResponseRetry, 0, 0); // outputs a box :| - CheckHardError(0x40000006, 0, OptionAbortRetryIgnore, STATUS_SUCCESS, ResponseIgnore, 0, 0); // outputs a box :| - CheckHardError(0x40000008, 0, OptionCancelTryContinue, STATUS_SUCCESS, ResponseCancel, 0, 0); // outputs a box :| - CheckHardError(0x40000008, 0, OptionCancelTryContinue, STATUS_SUCCESS, ResponseTryAgain, 0, 0); // outputs a box :| - CheckHardError(0x40000008, 0, OptionCancelTryContinue, STATUS_SUCCESS, ResponseContinue, 0, 0); // outputs a box :| - CheckHardError(0x40000010, 0, OptionOkCancel, STATUS_SUCCESS, ResponseOk, 0, 0); // outputs a box :| - CheckHardError(0x40000010, 0, OptionOkCancel, STATUS_SUCCESS, ResponseCancel, 0, 0); // outputs a box :| - CheckHardError(0x40000011, 0, OptionRetryCancel, STATUS_SUCCESS, ResponseRetry, 0, 0); // outputs a box :| - CheckHardError(0x40000011, 0, OptionRetryCancel, STATUS_SUCCESS, ResponseCancel, 0, 0); // outputs a box :| - CheckHardError(0x40000012, 0, OptionYesNo, STATUS_SUCCESS, ResponseYes, 0, 0); // outputs a box :| - CheckHardError(0x40000012, 0, OptionYesNo, STATUS_SUCCESS, ResponseNo, 0, 0); // outputs a box :| - CheckHardError(0x40000013, 0, OptionYesNoCancel, STATUS_SUCCESS, ResponseYes, 0, 0); // outputs a box :| - CheckHardError(0x40000013, 0, OptionYesNoCancel, STATUS_SUCCESS, ResponseNo, 0, 0); // outputs a box :| - CheckHardError(0x40000013, 0, OptionYesNoCancel, STATUS_SUCCESS, ResponseCancel, 0, 0); // outputs a box :| - } - CheckHardError(0x40000009, 0, 9, STATUS_SUCCESS, ResponseNotHandled, 0, 0); - CheckHardError(0x4000000a, 0, 10, STATUS_SUCCESS, ResponseNotHandled, 0, 0); - CheckHardError(0x4000000b, 0, 11, STATUS_SUCCESS, ResponseNotHandled, 0, 0); - CheckHardError(0x4000000c, 0, 12, STATUS_SUCCESS, ResponseNotHandled, 0, 0); - CheckHardError(0x4000000d, 0, MAXULONG / 2 + 1, STATUS_SUCCESS, ResponseNotHandled, 0, 0); - CheckHardError(0x4000000d, 0, MAXULONG, STATUS_SUCCESS, ResponseNotHandled, 0, 0); - - if (InteractivePart2) - { - /* try a message with one parameter */ - CheckHardError(STATUS_DLL_NOT_FOUND, 1, OptionYesNoCancel, STATUS_SUCCESS, ResponseYes, 1, &String1); // outputs a box :| - CheckHardError(STATUS_DLL_NOT_FOUND, 0, OptionYesNoCancel, STATUS_SUCCESS, ResponseCancel, 1, &String1); // outputs a box :| - CheckHardError(STATUS_DLL_NOT_FOUND, 1, OptionYesNoCancel, STATUS_SUCCESS, ResponseCancel, 0, &String1); // outputs a box :| - CheckHardError(STATUS_DLL_NOT_FOUND, 0, OptionYesNoCancel, STATUS_SUCCESS, ResponseCancel, 0, &String1); // outputs a box :| - /* give too many parameters */ - CheckHardError(STATUS_DLL_NOT_FOUND, 1, OptionYesNoCancel, STATUS_SUCCESS, ResponseYes, 2, &String1, &String2); // outputs a box :| - CheckHardError(STATUS_DLL_NOT_FOUND, 2, OptionYesNoCancel, STATUS_SUCCESS, ResponseCancel, 2, &String1, &String2); // outputs a box :| - CheckHardError(STATUS_DLL_NOT_FOUND, 3, OptionYesNoCancel, STATUS_SUCCESS, ResponseYes, 2, &String1, &String2); // outputs a box :| - CheckHardError(STATUS_DLL_NOT_FOUND, 3, OptionYesNoCancel, STATUS_SUCCESS, ResponseYes, 4, &String1, &String2, 0, 0); // outputs a box :| - /* try with stuff that's not a UNICODE_STRING */ - CheckHardError(STATUS_DLL_NOT_FOUND, 1, OptionYesNoCancel, STATUS_SUCCESS, ResponseNo, 1, &String1Ansi); // outputs a box :| - CheckHardError(STATUS_DLL_NOT_FOUND, 1, OptionYesNoCancel, STATUS_SUCCESS, ResponseNo, 1, L"Parameter1"); // outputs a box :| - CheckHardError(STATUS_DLL_NOT_FOUND, 1, OptionYesNoCancel, STATUS_SUCCESS, ResponseNo, 1, "Parameter1"); // outputs a box :| - CheckHardError(STATUS_DLL_NOT_FOUND, 1, OptionYesNoCancel, STATUS_ACCESS_VIOLATION, NoResponse, 1, 1234); // outputs a box :| - CheckHardError(STATUS_DLL_NOT_FOUND, 1, OptionYesNoCancel, STATUS_ACCESS_VIOLATION, NoResponse, 1, NULL); // outputs a box :| - CheckHardError(STATUS_DLL_NOT_FOUND, 0, OptionYesNoCancel, STATUS_SUCCESS, ResponseCancel, 1, &String1Ansi); // outputs a box :| - CheckHardError(STATUS_DLL_NOT_FOUND, 0, OptionYesNoCancel, STATUS_SUCCESS, ResponseCancel, 1, L"Parameter1"); // outputs a box :| - CheckHardError(STATUS_DLL_NOT_FOUND, 0, OptionYesNoCancel, STATUS_SUCCESS, ResponseCancel, 1, "Parameter1"); // outputs a box :| - CheckHardError(STATUS_DLL_NOT_FOUND, 0, OptionYesNoCancel, STATUS_SUCCESS, ResponseCancel, 1, 1234); // outputs a box :| - CheckHardError(STATUS_DLL_NOT_FOUND, 0, OptionYesNoCancel, STATUS_SUCCESS, ResponseCancel, 1, NULL); // outputs a box :| - } - if (InteractivePart3) - { - /* try a message with one parameter */ - CheckHardError(STATUS_SERVICE_NOTIFICATION, 1, OptionYesNoCancel, STATUS_SUCCESS, ResponseNotHandled, 1, &String1); // outputs a box :| - CheckHardError(STATUS_SERVICE_NOTIFICATION, 0, OptionYesNoCancel, STATUS_SUCCESS, ResponseNotHandled, 1, &String1); // outputs a box :| - CheckHardError(STATUS_SERVICE_NOTIFICATION, 1, OptionYesNoCancel, STATUS_SUCCESS, ResponseNotHandled, 0, &String1); // outputs a box :| - CheckHardError(STATUS_SERVICE_NOTIFICATION, 0, OptionYesNoCancel, STATUS_SUCCESS, ResponseNotHandled, 0, &String1); // outputs a box :| - /* give too many parameters */ - CheckHardError(STATUS_SERVICE_NOTIFICATION, 1, OptionYesNoCancel, STATUS_SUCCESS, ResponseNotHandled, 2, &String1, &String2); // outputs a box :| - CheckHardError(STATUS_SERVICE_NOTIFICATION, 2, OptionYesNoCancel, STATUS_SUCCESS, ResponseNotHandled, 2, &String1, &String2); // outputs a box :| - CheckHardError(STATUS_SERVICE_NOTIFICATION, 3, OptionYesNoCancel, STATUS_SUCCESS, ResponseNotHandled, 2, &String1, &String2); // outputs a box :| - CheckHardError(STATUS_SERVICE_NOTIFICATION, 3, OptionYesNoCancel, STATUS_SUCCESS, ResponseOk, 3, &String1, &String2, 0); // outputs a box :| - CheckHardError(STATUS_SERVICE_NOTIFICATION, 3, OptionYesNoCancel, STATUS_SUCCESS, ResponseOk, 4, &String1, &String2, 0, 0); // outputs a box :| - CheckHardError(STATUS_SERVICE_NOTIFICATION, 3, OptionOkNoWait, STATUS_SUCCESS, ResponseOk, 4, &String1, &String2, 0, 0); // outputs a balloon notification - /* try with stuff that's not a UNICODE_STRING */ - CheckHardError(STATUS_SERVICE_NOTIFICATION, 1, OptionYesNoCancel, STATUS_SUCCESS, ResponseNotHandled, 1, &String1Ansi); // outputs a box :| - CheckHardError(STATUS_SERVICE_NOTIFICATION, 1, OptionYesNoCancel, STATUS_SUCCESS, ResponseNotHandled, 1, L"Parameter1"); // outputs a box :| - CheckHardError(STATUS_SERVICE_NOTIFICATION, 1, OptionYesNoCancel, STATUS_SUCCESS, ResponseNotHandled, 1, "Parameter1"); // outputs a box :| - CheckHardError(STATUS_SERVICE_NOTIFICATION, 1, OptionYesNoCancel, STATUS_ACCESS_VIOLATION, NoResponse, 1, 1234); // outputs a box :| - CheckHardError(STATUS_SERVICE_NOTIFICATION, 1, OptionYesNoCancel, STATUS_ACCESS_VIOLATION, NoResponse, 1, NULL); // outputs a box :| - CheckHardError(STATUS_SERVICE_NOTIFICATION, 0, OptionYesNoCancel, STATUS_SUCCESS, ResponseNotHandled, 1, &String1Ansi); // outputs a box :| - CheckHardError(STATUS_SERVICE_NOTIFICATION, 0, OptionYesNoCancel, STATUS_SUCCESS, ResponseNotHandled, 1, L"Parameter1"); // outputs a box :| - CheckHardError(STATUS_SERVICE_NOTIFICATION, 0, OptionYesNoCancel, STATUS_SUCCESS, ResponseNotHandled, 1, "Parameter1"); // outputs a box :| - CheckHardError(STATUS_SERVICE_NOTIFICATION, 0, OptionYesNoCancel, STATUS_SUCCESS, ResponseNotHandled, 1, 1234); // outputs a box :| - CheckHardError(STATUS_SERVICE_NOTIFICATION, 0, OptionYesNoCancel, STATUS_SUCCESS, ResponseNotHandled, 1, NULL); // outputs a box :| - } - if (InteractivePart4) - { - /* try a message with one parameter */ - CheckHardError(STATUS_FATAL_APP_EXIT, 1, OptionYesNoCancel, STATUS_SUCCESS, ResponseYes, 1, &String1); // outputs a box :| - CheckHardError(STATUS_FATAL_APP_EXIT, 0, OptionYesNoCancel, STATUS_SUCCESS, ResponseCancel, 1, &String1); // outputs a box :| - CheckHardError(STATUS_FATAL_APP_EXIT, 1, OptionYesNoCancel, STATUS_SUCCESS, ResponseCancel, 0, &String1); // outputs a box :| - CheckHardError(STATUS_FATAL_APP_EXIT, 0, OptionYesNoCancel, STATUS_SUCCESS, ResponseCancel, 0, &String1); // outputs a box :| - /* give too many parameters */ - CheckHardError(STATUS_FATAL_APP_EXIT, 1, OptionYesNoCancel, STATUS_SUCCESS, ResponseYes, 2, &String1, &String2); // outputs a box :| - CheckHardError(STATUS_FATAL_APP_EXIT, 2, OptionYesNoCancel, STATUS_SUCCESS, ResponseCancel, 2, &String1, &String2); // outputs a box :| - CheckHardError(STATUS_FATAL_APP_EXIT, 3, OptionYesNoCancel, STATUS_SUCCESS, ResponseYes, 2, &String1, &String2); // outputs a box :| - CheckHardError(STATUS_FATAL_APP_EXIT, 3, OptionYesNoCancel, STATUS_SUCCESS, ResponseYes, 4, &String1, &String2, 0, 0); // outputs a box :| - /* try with stuff that's not a UNICODE_STRING */ - CheckHardError(STATUS_FATAL_APP_EXIT, 1, OptionYesNoCancel, STATUS_SUCCESS, ResponseNo, 1, &String1Ansi); // outputs a box :| - CheckHardError(STATUS_FATAL_APP_EXIT, 1, OptionYesNoCancel, STATUS_SUCCESS, ResponseNo, 1, L"Parameter1"); // outputs a box :| - CheckHardError(STATUS_FATAL_APP_EXIT, 1, OptionYesNoCancel, STATUS_SUCCESS, ResponseNo, 1, "Parameter1"); // outputs a box :| - CheckHardError(STATUS_FATAL_APP_EXIT, 1, OptionYesNoCancel, STATUS_ACCESS_VIOLATION, NoResponse, 1, 1234); // outputs a box :| - CheckHardError(STATUS_FATAL_APP_EXIT, 1, OptionYesNoCancel, STATUS_ACCESS_VIOLATION, NoResponse, 1, NULL); // outputs a box :| - CheckHardError(STATUS_FATAL_APP_EXIT, 0, OptionYesNoCancel, STATUS_SUCCESS, ResponseCancel, 1, &String1Ansi); // outputs a box :| - CheckHardError(STATUS_FATAL_APP_EXIT, 0, OptionYesNoCancel, STATUS_SUCCESS, ResponseCancel, 1, L"Parameter1"); // outputs a box :| - CheckHardError(STATUS_FATAL_APP_EXIT, 0, OptionYesNoCancel, STATUS_SUCCESS, ResponseCancel, 1, "Parameter1"); // outputs a box :| - CheckHardError(STATUS_FATAL_APP_EXIT, 0, OptionYesNoCancel, STATUS_SUCCESS, ResponseCancel, 1, 1234); // outputs a box :| - CheckHardError(STATUS_FATAL_APP_EXIT, 0, OptionYesNoCancel, STATUS_SUCCESS, ResponseCancel, 1, NULL); // outputs a box :| - - // TODO: these 3 are interactive on ROS - CheckInformationalHardError(STATUS_WAIT_0, NULL, NULL, STATUS_SUCCESS, TRUE); // outputs a balloon notification - CheckInformationalHardError(STATUS_DLL_NOT_FOUND, &String1, NULL, STATUS_SUCCESS, TRUE); // outputs a balloon notification - CheckInformationalHardError(STATUS_DLL_NOT_FOUND, NULL, NULL, STATUS_SUCCESS, TRUE); // outputs a balloon notification - } - CheckInformationalHardError(STATUS_SERVICE_NOTIFICATION, &String1, NULL, STATUS_SUCCESS, FALSE); - - ok_bool_true(IoSetThreadHardErrorMode(TRUE), "IoSetThreadHardErrorMode returned"); - ok_bool_true(IoSetThreadHardErrorMode(FALSE), "IoSetThreadHardErrorMode returned"); - ok_bool_false(IoSetThreadHardErrorMode(FALSE), "IoSetThreadHardErrorMode returned"); - CheckHardError(STATUS_FATAL_APP_EXIT, 0, OptionYesNoCancel, STATUS_SUCCESS, ResponseReturnToCaller, 0, 0); - CheckHardError(STATUS_FATAL_APP_EXIT, 1, OptionYesNoCancel, STATUS_ACCESS_VIOLATION, NoResponse, 1, NULL); - CheckInformationalHardError(STATUS_WAIT_0, NULL, NULL, STATUS_SUCCESS, FALSE); - CheckInformationalHardError(STATUS_DLL_NOT_FOUND, &String1, NULL, STATUS_SUCCESS, FALSE); - CheckInformationalHardError(STATUS_DLL_NOT_FOUND, NULL, NULL, STATUS_SUCCESS, FALSE); - CheckInformationalHardError(STATUS_SERVICE_NOTIFICATION, &String1, NULL, STATUS_SUCCESS, FALSE); - ok_bool_false(IoSetThreadHardErrorMode(TRUE), "IoSetThreadHardErrorMode returned"); -} - -START_TEST(ExHardError) -{ - TestHardError(FALSE, FALSE, FALSE, FALSE); -} - -/* Here's how to do the interactive test: - * - First there will be a few messages random messages. If there's - * multiple options available, the same box will appear multiple times -- - * click the buttons in order from left to right - * - After that, you must verify the error parameters. You should always - * see Parameter1 or Parameter2 for strings, and 0x12345678 for numbers. - * if there's a message saying an exception occured during processing, - * click cancel. If there's a bad parameter (Parameter1+, Parameter1+Garbage - * or an empty string for example), click no. Otherwise click yes. */ -START_TEST(ExHardErrorInteractive) -{ - TestHardError(TRUE, TRUE, TRUE, TRUE); -} diff --git a/rostests/kmtests/ntos_ex/ExInterlocked.c b/rostests/kmtests/ntos_ex/ExInterlocked.c deleted file mode 100644 index 6131f0301e3..00000000000 --- a/rostests/kmtests/ntos_ex/ExInterlocked.c +++ /dev/null @@ -1,399 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Interlocked function test - * PROGRAMMER: Thomas Faber - */ - -/* missing prototypes >:| */ -#ifndef _MSC_VER -typedef long long __int64; -#endif -struct _KSPIN_LOCK; -__declspec(dllimport) long __fastcall InterlockedCompareExchange(volatile long *, long, long); -__declspec(dllimport) __int64 __fastcall ExInterlockedCompareExchange64(volatile __int64 *, __int64 *, __int64 *, void *); -__declspec(dllimport) __int64 __fastcall ExfInterlockedCompareExchange64(volatile __int64 *, __int64 *, __int64 *); -__declspec(dllimport) long __fastcall InterlockedExchange(volatile long *, long); -__declspec(dllimport) unsigned long __stdcall ExInterlockedExchangeUlong(unsigned long *, unsigned long, void *); -__declspec(dllimport) long __fastcall InterlockedExchangeAdd(volatile long *, long); -__declspec(dllimport) unsigned long __stdcall ExInterlockedAddUlong(unsigned long *, unsigned long, void *); -__declspec(dllimport) unsigned long __stdcall Exi386InterlockedExchangeUlong(unsigned long *, unsigned long); -__declspec(dllimport) long __fastcall InterlockedIncrement(long *); -__declspec(dllimport) long __fastcall InterlockedDecrement(long *); -__declspec(dllimport) int __stdcall ExInterlockedIncrementLong(long *, void *); -__declspec(dllimport) int __stdcall ExInterlockedDecrementLong(long *, void *); -__declspec(dllimport) int __stdcall Exi386InterlockedIncrementLong(long *); -__declspec(dllimport) int __stdcall Exi386InterlockedDecrementLong(long *); - -#include - -/* TODO: There are quite some changes needed for other architectures! - ExInterlockedAddLargeInteger, ExInterlockedAddUlong are the only two - functions actually exported by my win7/x64 kernel! */ - -/* TODO: stress-testing */ - -static KSPIN_LOCK SpinLock; - -#ifdef _M_IX86 -typedef struct -{ - unsigned long esi, edi, ebx, ebp, esp; -} PROCESSOR_STATE; -#elif defined(_M_AMD64) -typedef struct -{ - unsigned long long rsi, rdi, rbx, rbp, rsp, r12, r13, r14, r15; -} PROCESSOR_STATE; -#else -// dummy -typedef int PROCESSOR_STATE; -#endif - -#if defined(_MSC_VER) && defined(_M_IX86) -#define SaveState(State) do \ -{ \ - __asm lea ecx, [State] \ - __asm mov [ecx], esi \ - __asm mov [ecx+4], edi \ - __asm mov [ecx+8], ebx \ - __asm mov [ecx+12], ebp \ - __asm mov [ecx+16], esp \ -} while (0) - -#define CheckState(OldState, NewState) do \ -{ \ - ok_eq_hex((OldState)->esi, (NewState)->esi); \ - ok_eq_hex((OldState)->edi, (NewState)->edi); \ - ok_eq_hex((OldState)->ebx, (NewState)->ebx); \ - ok_eq_hex((OldState)->ebp, (NewState)->ebp); \ - ok_eq_hex((OldState)->esp, (NewState)->esp); \ -} while (0) - -#elif defined(__GNUC__) && defined(_M_IX86) -#define SaveState(State) \ - asm volatile( \ - ".intel_syntax noprefix\n\t" \ - "mov\t[ecx], esi\n\t" \ - "mov\t[ecx+4], edi\n\t" \ - "mov\t[ecx+8], ebx\n\t" \ - "mov\t[ecx+12], ebp\n\t" \ - "mov\t[ecx+16], esp\n\t" \ - ".att_syntax prefix" \ - : : "c" (&State) : "memory" \ - ); - -#define CheckState(OldState, NewState) do \ -{ \ - ok_eq_hex((OldState)->esi, (NewState)->esi); \ - ok_eq_hex((OldState)->edi, (NewState)->edi); \ - ok_eq_hex((OldState)->ebx, (NewState)->ebx); \ - ok_eq_hex((OldState)->ebp, (NewState)->ebp); \ - ok_eq_hex((OldState)->esp, (NewState)->esp); \ -} while (0) -#elif defined(__GNUC__) && defined(_M_AMD64) -#define SaveState(State) \ - asm volatile( \ - ".intel_syntax noprefix\n\t" \ - "mov\t[rcx], rsi\n\t" \ - "mov\t[rcx+8], rdi\n\t" \ - "mov\t[rcx+16], rbx\n\t" \ - "mov\t[rcx+24], rbp\n\t" \ - "mov\t[rcx+32], rsp\n\t" \ - "mov\t[rcx+40], r12\n\t" \ - "mov\t[rcx+48], r13\n\t" \ - "mov\t[rcx+56], r14\n\t" \ - "mov\t[rcx+64], r15\n\t" \ - ".att_syntax prefix" \ - : : "c" (&State) : "memory" \ - ); - -#define CheckState(OldState, NewState) do \ -{ \ - ok_eq_hex((OldState)->rsi, (NewState)->rsi); \ - ok_eq_hex((OldState)->rdi, (NewState)->rdi); \ - ok_eq_hex((OldState)->rbx, (NewState)->rbx); \ - ok_eq_hex((OldState)->rbp, (NewState)->rbp); \ - ok_eq_hex((OldState)->rsp, (NewState)->rsp); \ - ok_eq_hex((OldState)->r12, (NewState)->r12); \ - ok_eq_hex((OldState)->r13, (NewState)->r13); \ - ok_eq_hex((OldState)->r14, (NewState)->r14); \ - ok_eq_hex((OldState)->r15, (NewState)->r15); \ -} while (0) -#else -#define SaveState(State) -#define CheckState(OldState, NewState) -#endif - -static -LARGE_INTEGER -Large( - ULONGLONG Value) -{ - LARGE_INTEGER Ret; - Ret.QuadPart = Value; - return Ret; -} - -#define CheckInterlockedCmpXchg(Function, Type, Print, Val, Cmp, Xchg, \ - ExpectedValue, ExpectedRet) do \ -{ \ - Type Ret##Type = 0; \ - Type Value##Type = Val; \ - Status = STATUS_SUCCESS; \ - _SEH2_TRY { \ - SaveState(OldState); \ - Ret##Type = Function(&Value##Type, Xchg, Cmp); \ - SaveState(NewState); \ - CheckState(&OldState, &NewState); \ - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { \ - Status = _SEH2_GetExceptionCode(); \ - } _SEH2_END; \ - ok_eq_hex(Status, STATUS_SUCCESS); \ - ok_eq_print(Ret##Type, ExpectedRet, Print); \ - ok_eq_print(Value##Type, ExpectedValue, Print); \ -} while (0) - -#define CheckInterlockedCmpXchgI(Function, Type, Print, Val, Cmp, Xchg, \ - ExpectedValue, ExpectedRet, ...) do \ -{ \ - Type Ret##Type = 0; \ - Type Value##Type = Val; \ - Type Compare##Type = Cmp; \ - Type Exchange##Type = Xchg; \ - Status = STATUS_SUCCESS; \ - _SEH2_TRY { \ - SaveState(OldState); \ - Ret##Type = Function(&Value##Type, &Exchange##Type, \ - &Compare##Type, ##__VA_ARGS__); \ - SaveState(NewState); \ - CheckState(&OldState, &NewState); \ - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { \ - Status = _SEH2_GetExceptionCode(); \ - } _SEH2_END; \ - ok_eq_hex(Status, STATUS_SUCCESS); \ - ok_eq_print(Ret##Type, ExpectedRet, Print); \ - ok_eq_print(Value##Type, ExpectedValue, Print); \ - ok_eq_print(Exchange##Type, Xchg, Print); \ - ok_eq_print(Compare##Type, Cmp, Print); \ -} while(0) - -#define CheckInterlockedOp(Function, Type, Print, Val, Op, \ - ExpectedValue, ExpectedRet, ...) do \ -{ \ - Type Ret##Type = 0; \ - Type Value##Type = Val; \ - Status = STATUS_SUCCESS; \ - _SEH2_TRY { \ - SaveState(OldState); \ - Ret##Type = Function(&Value##Type, Op, ##__VA_ARGS__); \ - SaveState(NewState); \ - CheckState(&OldState, &NewState); \ - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { \ - Status = _SEH2_GetExceptionCode(); \ - } _SEH2_END; \ - ok_eq_hex(Status, STATUS_SUCCESS); \ - ok_eq_print(Ret##Type, ExpectedRet, Print); \ - ok_eq_print(Value##Type, ExpectedValue, Print); \ -} while (0) - -#define CheckInterlockedOpNoArg(Function, Type, Print, Val, \ - ExpectedValue, ExpectedRet, ...) do \ -{ \ - Type Ret##Type = 0; \ - Type Value##Type = Val; \ - Status = STATUS_SUCCESS; \ - _SEH2_TRY { \ - SaveState(OldState); \ - Ret##Type = Function(&Value##Type, ##__VA_ARGS__); \ - SaveState(NewState); \ - CheckState(&OldState, &NewState); \ - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { \ - Status = _SEH2_GetExceptionCode(); \ - } _SEH2_END; \ - ok_eq_hex(Status, STATUS_SUCCESS); \ - ok_eq_print(Ret##Type, ExpectedRet, Print); \ - ok_eq_print(Value##Type, ExpectedValue, Print); \ -} while (0) - -#define CheckInterlockedOpLarge(Function, Type, Print, Val, Op, \ - ExpectedValue, ExpectedRet, ...) do \ -{ \ - Type Ret##Type = Large(0); \ - Type Value##Type = Val; \ - Status = STATUS_SUCCESS; \ - _SEH2_TRY { \ - SaveState(OldState); \ - Ret##Type = Function(&Value##Type, Op, ##__VA_ARGS__); \ - SaveState(NewState); \ - CheckState(&OldState, &NewState); \ - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { \ - Status = _SEH2_GetExceptionCode(); \ - } _SEH2_END; \ - ok_eq_hex(Status, STATUS_SUCCESS); \ - ok_eq_print(Ret##Type.QuadPart, ExpectedRet, Print); \ - ok_eq_print(Value##Type.QuadPart, ExpectedValue, Print); \ -} while (0) - -#define CheckInterlockedOpLargeNoRet(Function, Type, Print, Val, Op, \ - ExpectedValue) do \ -{ \ - Type Value##Type = Val; \ - Status = STATUS_SUCCESS; \ - _SEH2_TRY { \ - SaveState(OldState); \ - Function(&Value##Type, Op); \ - SaveState(NewState); \ - CheckState(&OldState, &NewState); \ - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { \ - Status = _SEH2_GetExceptionCode(); \ - } _SEH2_END; \ - ok_eq_hex(Status, STATUS_SUCCESS); \ - ok_eq_print(Value##Type.QuadPart, ExpectedValue, Print); \ -} while (0) - -/* TODO: missing in wdm.h! */ -#define InterlockedCompareExchangeAcquire InterlockedCompareExchange -#define InterlockedCompareExchangeRelease InterlockedCompareExchange -#define InterlockedIncrementAcquire InterlockedIncrement -#define InterlockedIncrementRelease InterlockedIncrement -#define InterlockedDecrementAcquire InterlockedDecrement -#define InterlockedDecrementRelease InterlockedDecrement - -static -VOID -TestInterlockedFunctional(VOID) -{ - NTSTATUS Status; - PKSPIN_LOCK pSpinLock = &SpinLock; - PROCESSOR_STATE OldState, NewState; - - /* on x86, most of these are supported intrinsically and don't need a spinlock! */ -#if defined _M_IX86 || defined _M_AMD64 - pSpinLock = NULL; -#endif - - /* CompareExchange */ - /* macro version */ - CheckInterlockedCmpXchg(InterlockedCompareExchange, LONG, "%ld", 5, 6, 8, 5L, 5L); - CheckInterlockedCmpXchg(InterlockedCompareExchange, LONG, "%ld", 5, 5, 9, 9L, 5L); - /* these only exist as macros on x86 */ - CheckInterlockedCmpXchg(InterlockedCompareExchangeAcquire, LONG, "%ld", 16, 9, 12, 16L, 16L); - CheckInterlockedCmpXchg(InterlockedCompareExchangeAcquire, LONG, "%ld", 16, 16, 4, 4L, 16L); - CheckInterlockedCmpXchg(InterlockedCompareExchangeRelease, LONG, "%ld", 27, 123, 38, 27L, 27L); - CheckInterlockedCmpXchg(InterlockedCompareExchangeRelease, LONG, "%ld", 27, 27, 39, 39L, 27L); - /* exported function */ -#undef InterlockedCompareExchange -#ifdef _M_IX86 - CheckInterlockedCmpXchg(InterlockedCompareExchange, LONG, "%ld", 5, 6, 8, 5L, 5L); - CheckInterlockedCmpXchg(InterlockedCompareExchange, LONG, "%ld", 5, 5, 9, 9L, 5L); -#endif - /* only exists as a macro */ - CheckInterlockedCmpXchg(InterlockedCompareExchangePointer, PVOID, "%p", (PVOID)117, (PVOID)711, (PVOID)12, (PVOID)117, (PVOID)117); - CheckInterlockedCmpXchg(InterlockedCompareExchangePointer, PVOID, "%p", (PVOID)117, (PVOID)117, (PVOID)228, (PVOID)228, (PVOID)117); - /* macro version */ - CheckInterlockedCmpXchgI(ExInterlockedCompareExchange64, LONGLONG, "%I64d", 17, 4LL, 20LL, 17LL, 17LL, pSpinLock); - CheckInterlockedCmpXchgI(ExInterlockedCompareExchange64, LONGLONG, "%I64d", 17, 17LL, 21LL, 21LL, 17LL, pSpinLock); -#ifdef _M_IX86 - /* exported function */ - CheckInterlockedCmpXchgI((ExInterlockedCompareExchange64), LONGLONG, "%I64d", 17, 4LL, 20LL, 17LL, 17LL, pSpinLock); - CheckInterlockedCmpXchgI((ExInterlockedCompareExchange64), LONGLONG, "%I64d", 17, 17LL, 21LL, 21LL, 17LL, pSpinLock); - /* fastcall version */ - CheckInterlockedCmpXchgI(ExfInterlockedCompareExchange64, LONGLONG, "%I64d", 17, 4LL, 20LL, 17LL, 17LL); - CheckInterlockedCmpXchgI(ExfInterlockedCompareExchange64, LONGLONG, "%I64d", 17, 17LL, 21LL, 21LL, 17LL); -#endif - - /* Exchange */ - CheckInterlockedOp(InterlockedExchange, LONG, "%ld", 5, 8, 8L, 5L); - CheckInterlockedOpNoArg(InterlockedExchangePointer, PVOID, "%p", (PVOID)700, (PVOID)93, (PVOID)700, (PVOID)93); -#undef InterlockedExchange -#ifdef _M_IX86 - CheckInterlockedOp(InterlockedExchange, LONG, "%ld", 5, 8, 8L, 5L); - CheckInterlockedOp(ExInterlockedExchangeUlong, ULONG, "%lu", 212, 121, 121LU, 212LU, pSpinLock); - CheckInterlockedOp((ExInterlockedExchangeUlong), ULONG, "%lu", 212, 121, 121LU, 212LU, pSpinLock); - CheckInterlockedOp(Exi386InterlockedExchangeUlong, ULONG, "%lu", 212, 121, 121LU, 212LU); - CheckInterlockedOp(Exfi386InterlockedExchangeUlong, ULONG, "%lu", 212, 121, 121LU, 212LU); -#endif - - /* ExchangeAdd */ - /* TODO: ExInterlockedExchangeAddLargeInteger? */ - CheckInterlockedOp(InterlockedExchangeAdd, LONG, "%ld", 312, 7, 319L, 312L); -#undef InterlockedExchangeAdd -#ifdef _M_IX86 - CheckInterlockedOp(InterlockedExchangeAdd, LONG, "%ld", 312, 7, 319L, 312L); -#endif - - /* Add */ - /* these DO need a valid spinlock even on x86 */ - CheckInterlockedOpLarge(ExInterlockedAddLargeInteger, LARGE_INTEGER, "%I64d", Large(23), Large(7), 30LL, 23LL, &SpinLock); - CheckInterlockedOpLargeNoRet(ExInterlockedAddLargeStatistic, LARGE_INTEGER, "%I64d", Large(15), 17LL, 32LL); - CheckInterlockedOp(ExInterlockedAddUlong, ULONG, "%lu", 239, 44, 283LU, 239LU, &SpinLock); -#undef ExInterlockedAddUlong - CheckInterlockedOp(ExInterlockedAddUlong, ULONG, "%lu", 239, 44, 283LU, 239LU, &SpinLock); - - /* Increment */ - CheckInterlockedOpNoArg(InterlockedIncrement, LONG, "%ld", 2341L, 2342L, 2342L); - CheckInterlockedOpNoArg(InterlockedIncrement, LONG, "%ld", (LONG)MAXLONG, (LONG)MINLONG, (LONG)MINLONG); - CheckInterlockedOpNoArg(InterlockedIncrementAcquire, LONG, "%ld", 2341L, 2342L, 2342L); - CheckInterlockedOpNoArg(InterlockedIncrementRelease, LONG, "%ld", 2341L, 2342L, 2342L); -#undef InterlockedIncrement -#ifdef _M_IX86 - CheckInterlockedOpNoArg(InterlockedIncrement, LONG, "%ld", 2341L, 2342L, 2342L); - CheckInterlockedOpNoArg(InterlockedIncrement, LONG, "%ld", (LONG)MAXLONG, (LONG)MINLONG, (LONG)MINLONG); - CheckInterlockedOpNoArg(ExInterlockedIncrementLong, LONG, "%ld", -2L, -1L, (LONG)ResultNegative, pSpinLock); - CheckInterlockedOpNoArg(ExInterlockedIncrementLong, LONG, "%ld", -1L, 0L, (LONG)ResultZero, pSpinLock); - CheckInterlockedOpNoArg(ExInterlockedIncrementLong, LONG, "%ld", 0L, 1L, (LONG)ResultPositive, pSpinLock); - CheckInterlockedOpNoArg(ExInterlockedIncrementLong, LONG, "%ld", (LONG)MAXLONG, (LONG)MINLONG, (LONG)ResultNegative, pSpinLock); - CheckInterlockedOpNoArg((ExInterlockedIncrementLong), LONG, "%ld", -2L, -1L, (LONG)ResultNegative, pSpinLock); - CheckInterlockedOpNoArg((ExInterlockedIncrementLong), LONG, "%ld", -1L, 0L, (LONG)ResultZero, pSpinLock); - CheckInterlockedOpNoArg((ExInterlockedIncrementLong), LONG, "%ld", 0L, 1L, (LONG)ResultPositive, pSpinLock); - CheckInterlockedOpNoArg((ExInterlockedIncrementLong), LONG, "%ld", (LONG)MAXLONG, (LONG)MINLONG, (LONG)ResultNegative, pSpinLock); - CheckInterlockedOpNoArg(Exi386InterlockedIncrementLong, LONG, "%ld", -2L, -1L, (LONG)ResultNegative); - CheckInterlockedOpNoArg(Exi386InterlockedIncrementLong, LONG, "%ld", -1L, 0L, (LONG)ResultZero); - CheckInterlockedOpNoArg(Exi386InterlockedIncrementLong, LONG, "%ld", 0L, 1L, (LONG)ResultPositive); - CheckInterlockedOpNoArg(Exi386InterlockedIncrementLong, LONG, "%ld", (LONG)MAXLONG, (LONG)MINLONG, (LONG)ResultNegative); -#endif - - /* Decrement */ - CheckInterlockedOpNoArg(InterlockedDecrement, LONG, "%ld", 1745L, 1744L, 1744L); - CheckInterlockedOpNoArg(InterlockedDecrement, LONG, "%ld", (LONG)MINLONG, (LONG)MAXLONG, (LONG)MAXLONG); - CheckInterlockedOpNoArg(InterlockedDecrementAcquire, LONG, "%ld", 1745L, 1744L, 1744L); - CheckInterlockedOpNoArg(InterlockedDecrementRelease, LONG, "%ld", 1745L, 1744L, 1744L); -#undef InterlockedDecrement -#ifdef _M_IX86 - CheckInterlockedOpNoArg(InterlockedDecrement, LONG, "%ld", 1745L, 1744L, 1744L); - CheckInterlockedOpNoArg(InterlockedDecrement, LONG, "%ld", (LONG)MINLONG, (LONG)MAXLONG, (LONG)MAXLONG); - CheckInterlockedOpNoArg(ExInterlockedDecrementLong, LONG, "%ld", (LONG)MINLONG, (LONG)MAXLONG, (LONG)ResultPositive, pSpinLock); - CheckInterlockedOpNoArg(ExInterlockedDecrementLong, LONG, "%ld", 0L, -1L, (LONG)ResultNegative, pSpinLock); - CheckInterlockedOpNoArg(ExInterlockedDecrementLong, LONG, "%ld", 1L, 0L, (LONG)ResultZero, pSpinLock); - CheckInterlockedOpNoArg(ExInterlockedDecrementLong, LONG, "%ld", 2L, 1L, (LONG)ResultPositive, pSpinLock); - CheckInterlockedOpNoArg((ExInterlockedDecrementLong), LONG, "%ld", (LONG)MINLONG, (LONG)MAXLONG, (LONG)ResultPositive, pSpinLock); - CheckInterlockedOpNoArg((ExInterlockedDecrementLong), LONG, "%ld", 0L, -1L, (LONG)ResultNegative, pSpinLock); - CheckInterlockedOpNoArg((ExInterlockedDecrementLong), LONG, "%ld", 1L, 0L, (LONG)ResultZero, pSpinLock); - CheckInterlockedOpNoArg((ExInterlockedDecrementLong), LONG, "%ld", 2L, 1L, (LONG)ResultPositive, pSpinLock); - CheckInterlockedOpNoArg(Exi386InterlockedDecrementLong, LONG, "%ld", (LONG)MINLONG, (LONG)MAXLONG, (LONG)ResultPositive); - CheckInterlockedOpNoArg(Exi386InterlockedDecrementLong, LONG, "%ld", 0L, -1L, (LONG)ResultNegative); - CheckInterlockedOpNoArg(Exi386InterlockedDecrementLong, LONG, "%ld", 1L, 0L, (LONG)ResultZero); - CheckInterlockedOpNoArg(Exi386InterlockedDecrementLong, LONG, "%ld", 2L, 1L, (LONG)ResultPositive); -#endif - - /* And, Or, Xor */ - CheckInterlockedOp(InterlockedAnd, LONG, "0x%lx", 0x1234L, 0x1111L, 0x1010L, 0x1234L); - CheckInterlockedOp(InterlockedOr, LONG, "0x%lx", 0x1234L, 0x1111L, 0x1335L, 0x1234L); - CheckInterlockedOp(InterlockedXor, LONG, "0x%lx", 0x1234L, 0x1111L, 0x0325L, 0x1234L); -#ifdef _WIN64 - CheckInterlockedOp(InterlockedXor64, LONGLONG, "0x%I64x", 0x200001234LL, 0x100001111LL, 0x300000325LL, 0x200001234LL); -#endif -} - -START_TEST(ExInterlocked) -{ - KIRQL Irql; - KeInitializeSpinLock(&SpinLock); - - /* functional testing */ - TestInterlockedFunctional(); - KeRaiseIrql(HIGH_LEVEL, &Irql); - TestInterlockedFunctional(); - KeLowerIrql(Irql); -} diff --git a/rostests/kmtests/ntos_ex/ExPools.c b/rostests/kmtests/ntos_ex/ExPools.c deleted file mode 100644 index c6357200be4..00000000000 --- a/rostests/kmtests/ntos_ex/ExPools.c +++ /dev/null @@ -1,151 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: LGPLv2+ - See COPYING.LIB in the top level directory - * PURPOSE: Kernel-Mode Test Suite Pools test routines KM-Test - * PROGRAMMER: Aleksey Bragin - */ - -/* TODO: PoolsCorruption tests fail because accessing invalid memory doesn't necessarily cause an access violation */ - -#include - -#define NDEBUG -#include - -#define TAG_POOLTEST 'tstP' - -static VOID PoolsTest(VOID) -{ - PVOID Ptr; - ULONG AllocSize, i, AllocNumber; - PVOID *Allocs; - - // Stress-test nonpaged pool - for (i=1; i<10000; i++) - { - // make up some increasing, a bit irregular size - AllocSize = i*10; - - if (i % 10) - AllocSize++; - - if (i % 25) - AllocSize += 13; - - // start with non-paged pool - Ptr = ExAllocatePoolWithTag(NonPagedPool, AllocSize, TAG_POOLTEST); - - // it may fail due to no-memory condition - if (!Ptr) break; - - // try to fully fill it - RtlFillMemory(Ptr, AllocSize, 0xAB); - - // free it - ExFreePoolWithTag(Ptr, TAG_POOLTEST); - } - - // now paged one - for (i=1; i<10000; i++) - { - // make up some increasing, a bit irregular size - AllocSize = i*50; - - if (i % 10) - AllocSize++; - - if (i % 25) - AllocSize += 13; - - // start with non-paged pool - Ptr = ExAllocatePoolWithTag(PagedPool, AllocSize, TAG_POOLTEST); - - // it may fail due to no-memory condition - if (!Ptr) break; - - // try to fully fill it - RtlFillMemory(Ptr, AllocSize, 0xAB); - - // free it - ExFreePoolWithTag(Ptr, TAG_POOLTEST); - } - - // test super-big allocations - /*AllocSize = 2UL * 1024 * 1024 * 1024; - Ptr = ExAllocatePoolWithTag(NonPagedPool, AllocSize, TAG_POOLTEST); - ok(Ptr == NULL, "Allocating 2Gb of nonpaged pool should fail\n"); - - Ptr = ExAllocatePoolWithTag(PagedPool, AllocSize, TAG_POOLTEST); - ok(Ptr == NULL, "Allocating 2Gb of paged pool should fail\n");*/ - - // now test allocating lots of small/medium blocks - AllocNumber = 100000; - Allocs = ExAllocatePoolWithTag(PagedPool, sizeof(Allocs) * AllocNumber, TAG_POOLTEST); - - // alloc blocks - for (i=0; i - */ - -#include - -//#define NDEBUG -#include - -/* TODO: This is getting pretty long, make it somehow easier to read if possible */ - -/* TODO: this is the Windows Server 2003 version! ROS should use this! - * This declaration can be removed once ROS headers are corrected */ -typedef struct _ERESOURCE_2K3 { - LIST_ENTRY SystemResourcesList; - POWNER_ENTRY OwnerTable; - SHORT ActiveCount; - USHORT Flag; - volatile PKSEMAPHORE SharedWaiters; - volatile PKEVENT ExclusiveWaiters; - OWNER_ENTRY OwnerThreads[2]; - ULONG ContentionCount; - USHORT NumberOfSharedWaiters; - USHORT NumberOfExclusiveWaiters; - _ANONYMOUS_UNION union { - PVOID Address; - ULONG_PTR CreatorBackTraceIndex; - } DUMMYUNIONNAME; - KSPIN_LOCK SpinLock; -} ERESOURCE_2K3, *PERESOURCE_2K3; - -#define CheckResourceFields(Res, Reinit) do \ -{ \ - ok_eq_pointer((Res)->SystemResourcesList.Flink->Blink, &(Res)->SystemResourcesList); \ - ok_eq_pointer((Res)->SystemResourcesList.Blink->Flink, &(Res)->SystemResourcesList); \ - if (!Reinit) ok_eq_pointer((Res)->OwnerTable, NULL); \ - ok_eq_int((Res)->ActiveCount, 0); \ - ok_eq_uint((Res)->Flag, 0); \ - if (!Reinit) ok_eq_pointer((Res)->SharedWaiters, NULL); \ - if (!Reinit) ok_eq_pointer((Res)->ExclusiveWaiters, NULL); \ - ok_eq_ulongptr((Res)->OwnerThreads[0].OwnerThread, 0); \ - ok_eq_ulong((Res)->OwnerThreads[0].TableSize, 0LU); \ - ok_eq_ulongptr((Res)->OwnerThreads[1].OwnerThread, 0); \ - ok_eq_ulong((Res)->OwnerThreads[1].TableSize, 0LU); \ - ok_eq_ulong((Res)->ContentionCount, 0LU); \ - ok_eq_uint((Res)->NumberOfSharedWaiters, 0); \ - ok_eq_uint((Res)->NumberOfExclusiveWaiters, 0); \ - ok_eq_pointer((Res)->Address, NULL); \ - ok_eq_ulongptr((Res)->SpinLock, 0); \ -} while (0) - -#define CheckResourceStatus(Res, Exclusive, Shared, ExclusiveWaiters, SharedWaiters) do \ -{ \ - if (Exclusive) \ - ok_bool_true(ExIsResourceAcquiredExclusiveLite(Res), "ExIsResourceAcquiredExclusiveLite returned"); \ - else \ - ok_bool_false(ExIsResourceAcquiredExclusiveLite(Res), "ExIsResourceAcquiredExclusiveLite returned"); \ - ok_eq_ulong(ExIsResourceAcquiredSharedLite(Res), Shared); \ - ok_eq_ulong(ExGetExclusiveWaiterCount(Res), ExclusiveWaiters); \ - ok_eq_ulong(ExGetSharedWaiterCount(Res), SharedWaiters); \ -} while (0) - -static -VOID -TestResourceSharedAccess( - IN PERESOURCE Res) -{ - LONG Count = 0; - - KeEnterCriticalRegion(); - ok_bool_true(ExAcquireResourceSharedLite(Res, FALSE), "ExAcquireResourceSharedLite returned"); ++Count; - CheckResourceStatus(Res, FALSE, Count, 0LU, 0LU); - - ok_bool_true(ExAcquireResourceSharedLite(Res, FALSE), "ExAcquireResourceSharedLite returned"); ++Count; - ok_bool_true(ExAcquireResourceSharedLite(Res, TRUE), "ExAcquireResourceSharedLite returned"); ++Count; - ok_bool_true(ExAcquireSharedStarveExclusive(Res, FALSE), "ExAcquireSharedStarveExclusive returned"); ++Count; - ok_bool_true(ExAcquireSharedStarveExclusive(Res, TRUE), "ExAcquireSharedStarveExclusive returned"); ++Count; - ok_bool_true(ExAcquireSharedWaitForExclusive(Res, FALSE), "ExAcquireSharedWaitForExclusive returned"); ++Count; - ok_bool_true(ExAcquireSharedWaitForExclusive(Res, TRUE), "ExAcquireSharedWaitForExclusive returned"); ++Count; - CheckResourceStatus(Res, FALSE, Count, 0LU, 0LU); - - /* this one fails, TRUE would deadlock */ - ok_bool_false(ExAcquireResourceExclusiveLite(Res, FALSE), "ExAcquireResourceExclusiveLite returned"); - CheckResourceStatus(Res, FALSE, Count, 0LU, 0LU); - - /* this asserts */ - if (!KmtIsCheckedBuild) - ExConvertExclusiveToSharedLite(Res); - CheckResourceStatus(Res, FALSE, Count, 0LU, 0LU); - - while (Count--) - ExReleaseResourceLite(Res); - KeLeaveCriticalRegion(); -} - -static -VOID -TestResourceExclusiveAccess( - IN PERESOURCE Res) -{ - LONG Count = 0; - - KeEnterCriticalRegion(); - ok_bool_true(ExAcquireResourceExclusiveLite(Res, FALSE), "ExAcquireResourceExclusiveLite returned"); ++Count; - - CheckResourceStatus(Res, TRUE, Count, 0LU, 0LU); - - ok_bool_true(ExAcquireResourceExclusiveLite(Res, TRUE), "ExAcquireResourceExclusiveLite returned"); ++Count; - CheckResourceStatus(Res, TRUE, Count, 0LU, 0LU); - - ok_bool_true(ExAcquireResourceSharedLite(Res, FALSE), "ExAcquireResourceSharedLite returned"); ++Count; - ok_bool_true(ExAcquireResourceSharedLite(Res, TRUE), "ExAcquireResourceSharedLite returned"); ++Count; - ok_bool_true(ExAcquireSharedStarveExclusive(Res, FALSE), "ExAcquireSharedStarveExclusive returned"); ++Count; - ok_bool_true(ExAcquireSharedStarveExclusive(Res, TRUE), "ExAcquireSharedStarveExclusive returned"); ++Count; - ok_bool_true(ExAcquireSharedWaitForExclusive(Res, FALSE), "ExAcquireSharedWaitForExclusive returned"); ++Count; - ok_bool_true(ExAcquireSharedWaitForExclusive(Res, TRUE), "ExAcquireSharedWaitForExclusive returned"); ++Count; - CheckResourceStatus(Res, TRUE, Count, 0LU, 0LU); - - ExConvertExclusiveToSharedLite(Res); - CheckResourceStatus(Res, FALSE, Count, 0LU, 0LU); - - while (Count--) - ExReleaseResourceLite(Res); - KeLeaveCriticalRegion(); -} - -static -VOID -TestResourceUndocumentedShortcuts( - IN PERESOURCE Res, - IN BOOLEAN AreApcsDisabled) -{ - PVOID Ret; - LONG Count = 0; - - ok_bool_false(KeAreApcsDisabled(), "KeAreApcsDisabled returned"); - ok_eq_uint(KeAreAllApcsDisabled(), AreApcsDisabled); - - /* ExEnterCriticalRegionAndAcquireResourceShared, ExEnterCriticalRegionAndAcquireSharedWaitForExclusive */ - Count = 0; - Ret = ExEnterCriticalRegionAndAcquireResourceShared(Res); ++Count; - ok_eq_pointer(Ret, KeGetCurrentThread()->Win32Thread); - ok_bool_true(KeAreApcsDisabled(), "KeAreApcsDisabled returned"); - ok_eq_bool(KeAreAllApcsDisabled(), AreApcsDisabled); - CheckResourceStatus(Res, FALSE, Count, 0LU, 0LU); - - Ret = ExEnterCriticalRegionAndAcquireResourceShared(Res); ++Count; - ok_eq_pointer(Ret, KeGetCurrentThread()->Win32Thread); - ok_bool_true(KeAreApcsDisabled(), "KeAreApcsDisabled returned"); - ok_eq_bool(KeAreAllApcsDisabled(), AreApcsDisabled); - CheckResourceStatus(Res, FALSE, Count, 0LU, 0LU); - - ExEnterCriticalRegionAndAcquireSharedWaitForExclusive(Res); ++Count; - ok_eq_pointer(Ret, KeGetCurrentThread()->Win32Thread); - ok_bool_true(KeAreApcsDisabled(), "KeAreApcsDisabled returned"); - ok_eq_bool(KeAreAllApcsDisabled(), AreApcsDisabled); - CheckResourceStatus(Res, FALSE, Count, 0LU, 0LU); - - while (Count-- > 1) - { - ExReleaseResourceAndLeaveCriticalRegion(Res); - ok_bool_true(KeAreApcsDisabled(), "KeAreApcsDisabled returned"); - ok_eq_bool(KeAreAllApcsDisabled(), AreApcsDisabled); - CheckResourceStatus(Res, FALSE, Count, 0LU, 0LU); - } - - ExReleaseResourceAndLeaveCriticalRegion(Res); - ok_bool_false(KeAreApcsDisabled(), "KeAreApcsDisabled returned"); - ok_eq_bool(KeAreAllApcsDisabled(), AreApcsDisabled); - CheckResourceStatus(Res, FALSE, Count, 0LU, 0LU); - - /* ExEnterCriticalRegionAndAcquireResourceExclusive */ - Count = 0; - ok_bool_false(KeAreApcsDisabled(), "KeAreApcsDisabled returned"); - ok_eq_bool(KeAreAllApcsDisabled(), AreApcsDisabled); - Ret = ExEnterCriticalRegionAndAcquireResourceExclusive(Res); ++Count; - ok_eq_pointer(Ret, KeGetCurrentThread()->Win32Thread); - ok_bool_true(KeAreApcsDisabled(), "KeAreApcsDisabled returned"); - ok_eq_bool(KeAreAllApcsDisabled(), AreApcsDisabled); - CheckResourceStatus(Res, TRUE, Count, 0LU, 0LU); - - Ret = ExEnterCriticalRegionAndAcquireResourceExclusive(Res); ++Count; - ok_eq_pointer(Ret, KeGetCurrentThread()->Win32Thread); - ok_bool_true(KeAreApcsDisabled(), "KeAreApcsDisabled returned"); - ok_eq_bool(KeAreAllApcsDisabled(), AreApcsDisabled); - CheckResourceStatus(Res, TRUE, Count, 0LU, 0LU); - - ExReleaseResourceAndLeaveCriticalRegion(Res); --Count; - ok_bool_true(KeAreApcsDisabled(), "KeAreApcsDisabled returned"); - ok_eq_bool(KeAreAllApcsDisabled(), AreApcsDisabled); - CheckResourceStatus(Res, TRUE, Count, 0LU, 0LU); - - ExReleaseResourceAndLeaveCriticalRegion(Res); --Count; - ok_bool_false(KeAreApcsDisabled(), "KeAreApcsDisabled returned"); - ok_eq_uint(KeAreAllApcsDisabled(), AreApcsDisabled); - CheckResourceStatus(Res, FALSE, Count, 0LU, 0LU); -} - -typedef BOOLEAN (NTAPI *PACQUIRE_FUNCTION)(PERESOURCE, BOOLEAN); - -typedef struct -{ - HANDLE Handle; - PKTHREAD Thread; - PERESOURCE Res; - KEVENT InEvent; - KEVENT OutEvent; - PACQUIRE_FUNCTION AcquireResource; - BOOLEAN Wait; - BOOLEAN RetExpected; -} THREAD_DATA, *PTHREAD_DATA; - -static -VOID -NTAPI -AcquireResourceThread( - PVOID Context) -{ - NTSTATUS Status = STATUS_SUCCESS; - PTHREAD_DATA ThreadData = Context; - BOOLEAN Ret; - - KeEnterCriticalRegion(); - Ret = ThreadData->AcquireResource(ThreadData->Res, ThreadData->Wait); - if (ThreadData->RetExpected) - ok_bool_true(Ret, "AcquireResource returned"); - else - ok_bool_false(Ret, "AcquireResource returned"); - - ok_bool_false(KeSetEvent(&ThreadData->OutEvent, 0, TRUE), "KeSetEvent returned"); - Status = KeWaitForSingleObject(&ThreadData->InEvent, Executive, KernelMode, FALSE, NULL); - ok_eq_hex(Status, STATUS_SUCCESS); - - if (Ret) - ExReleaseResource(ThreadData->Res); - KeLeaveCriticalRegion(); -} - -static -VOID -InitThreadData( - PTHREAD_DATA ThreadData, - PERESOURCE Res, - PACQUIRE_FUNCTION AcquireFunction) -{ - ThreadData->Res = Res; - KeInitializeEvent(&ThreadData->InEvent, NotificationEvent, FALSE); - KeInitializeEvent(&ThreadData->OutEvent, NotificationEvent, FALSE); - ThreadData->AcquireResource = AcquireFunction; -} - -static -NTSTATUS -StartThread( - PTHREAD_DATA ThreadData, - PLARGE_INTEGER Timeout, - BOOLEAN Wait, - BOOLEAN RetExpected) -{ - NTSTATUS Status = STATUS_SUCCESS; - OBJECT_ATTRIBUTES Attributes; - - ThreadData->Wait = Wait; - ThreadData->RetExpected = RetExpected; - InitializeObjectAttributes(&Attributes, NULL, OBJ_KERNEL_HANDLE, NULL, NULL); - Status = PsCreateSystemThread(&ThreadData->Handle, GENERIC_ALL, &Attributes, NULL, NULL, AcquireResourceThread, ThreadData); - ok_eq_hex(Status, STATUS_SUCCESS); - Status = ObReferenceObjectByHandle(ThreadData->Handle, SYNCHRONIZE, PsThreadType, KernelMode, (PVOID *)&ThreadData->Thread, NULL); - ok_eq_hex(Status, STATUS_SUCCESS); - - return KeWaitForSingleObject(&ThreadData->OutEvent, Executive, KernelMode, FALSE, Timeout); -} - -static -VOID -FinishThread( - PTHREAD_DATA ThreadData) -{ - NTSTATUS Status = STATUS_SUCCESS; - - KeSetEvent(&ThreadData->InEvent, 0, TRUE); - Status = KeWaitForSingleObject(ThreadData->Thread, Executive, KernelMode, FALSE, NULL); - ok_eq_hex(Status, STATUS_SUCCESS); - - ObDereferenceObject(ThreadData->Thread); - Status = ZwClose(ThreadData->Handle); - ok_eq_hex(Status, STATUS_SUCCESS); - KeClearEvent(&ThreadData->InEvent); - KeClearEvent(&ThreadData->OutEvent); -} - -static -VOID -TestResourceWithThreads( - IN PERESOURCE Res) -{ - NTSTATUS Status = STATUS_SUCCESS; - THREAD_DATA ThreadDataShared; - THREAD_DATA ThreadDataShared2; - THREAD_DATA ThreadDataExclusive; - THREAD_DATA ThreadDataSharedStarve; - THREAD_DATA ThreadDataSharedWait; - LARGE_INTEGER Timeout; - Timeout.QuadPart = -10 * 1000 * 10; /* 10 ms */ - - InitThreadData(&ThreadDataShared, Res, ExAcquireResourceSharedLite); - InitThreadData(&ThreadDataShared2, Res, ExAcquireResourceSharedLite); - InitThreadData(&ThreadDataExclusive, Res, ExAcquireResourceExclusiveLite); - InitThreadData(&ThreadDataSharedStarve, Res, ExAcquireSharedStarveExclusive); - InitThreadData(&ThreadDataSharedWait, Res, ExAcquireSharedWaitForExclusive); - - /* have a thread acquire the resource shared */ - Status = StartThread(&ThreadDataShared, NULL, FALSE, TRUE); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckResourceStatus(Res, FALSE, 0LU, 0LU, 0LU); - ok_eq_int(Res->ActiveCount, 1); - - /* a second thread should be able to acquire the resource shared */ - Status = StartThread(&ThreadDataShared2, NULL, FALSE, TRUE); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckResourceStatus(Res, FALSE, 0LU, 0LU, 0LU); - ok_eq_int(Res->ActiveCount, 2); - FinishThread(&ThreadDataShared2); - CheckResourceStatus(Res, FALSE, 0LU, 0LU, 0LU); - ok_eq_int(Res->ActiveCount, 1); - - /* now have a thread that tries to acquire the resource exclusive -- it should fail */ - Status = StartThread(&ThreadDataExclusive, NULL, FALSE, FALSE); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckResourceStatus(Res, FALSE, 0LU, 0LU, 0LU); - ok_eq_int(Res->ActiveCount, 1); - FinishThread(&ThreadDataExclusive); - CheckResourceStatus(Res, FALSE, 0LU, 0LU, 0LU); - ok_eq_int(Res->ActiveCount, 1); - - /* as above, but this time it should block */ - Status = StartThread(&ThreadDataExclusive, &Timeout, TRUE, TRUE); - ok_eq_hex(Status, STATUS_TIMEOUT); - CheckResourceStatus(Res, FALSE, 0LU, 1LU, 0LU); - ok_eq_int(Res->ActiveCount, 1); - - /* now try another shared one -- it should fail */ - Status = StartThread(&ThreadDataShared2, NULL, FALSE, FALSE); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckResourceStatus(Res, FALSE, 0LU, 1LU, 0LU); - ok_eq_int(Res->ActiveCount, 1); - FinishThread(&ThreadDataShared2); - - /* same for ExAcquireSharedWaitForExclusive */ - Status = StartThread(&ThreadDataSharedWait, NULL, FALSE, FALSE); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckResourceStatus(Res, FALSE, 0LU, 1LU, 0LU); - ok_eq_int(Res->ActiveCount, 1); - FinishThread(&ThreadDataSharedWait); - - /* ExAcquireSharedStarveExclusive must get access though! */ - Status = StartThread(&ThreadDataSharedStarve, NULL, TRUE, TRUE); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckResourceStatus(Res, FALSE, 0LU, 1LU, 0LU); - ok_eq_int(Res->ActiveCount, 2); - FinishThread(&ThreadDataSharedStarve); - CheckResourceStatus(Res, FALSE, 0LU, 1LU, 0LU); - ok_eq_int(Res->ActiveCount, 1); - - /* block another shared one */ - Status = StartThread(&ThreadDataShared2, &Timeout, TRUE, TRUE); - ok_eq_hex(Status, STATUS_TIMEOUT); - CheckResourceStatus(Res, FALSE, 0LU, 1LU, 1LU); - ok_eq_int(Res->ActiveCount, 1); - - /* finish the very first one */ - FinishThread(&ThreadDataShared); - - /* now the blocked exclusive one should get the resource */ - Status = KeWaitForSingleObject(&ThreadDataExclusive.OutEvent, Executive, KernelMode, FALSE, NULL); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckResourceStatus(Res, FALSE, 0LU, 0LU, 1LU); - ok_eq_int(Res->ActiveCount, 1); - ok_eq_uint((Res->Flag & ResourceOwnedExclusive) != 0, 1); - - FinishThread(&ThreadDataExclusive); - CheckResourceStatus(Res, FALSE, 0LU, 0LU, 0LU); - - /* now the blocked shared one should resume */ - Status = KeWaitForSingleObject(&ThreadDataShared2.OutEvent, Executive, KernelMode, FALSE, NULL); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckResourceStatus(Res, FALSE, 0LU, 0LU, 0LU); - ok_eq_int(Res->ActiveCount, 1); - FinishThread(&ThreadDataShared2); - CheckResourceStatus(Res, FALSE, 0LU, 0LU, 0LU); - ok_eq_int(Res->ActiveCount, 0); -} - -START_TEST(ExResource) -{ - NTSTATUS Status; - ERESOURCE Res; - KIRQL Irql; - - /* this must be true even with the different structure versions */ - ASSERT(sizeof(ERESOURCE) == sizeof(ERESOURCE_2K3)); - - /* functional tests & internals */ - Irql = KeRaiseIrqlToDpcLevel(); - Status = ExInitializeResourceLite(&Res); - ok_eq_hex(Status, STATUS_SUCCESS); - KeLowerIrql(APC_LEVEL); - - Status = ExDeleteResourceLite(&Res); - ok_eq_hex(Status, STATUS_SUCCESS); - KeLowerIrql(Irql); - - memset(&Res, 0x55, sizeof Res); - Status = ExInitializeResourceLite(&Res); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckResourceFields((PERESOURCE_2K3)&Res, FALSE); - - CheckResourceStatus(&Res, FALSE, 0LU, 0LU, 0LU); - - TestResourceSharedAccess(&Res); - CheckResourceStatus(&Res, FALSE, 0LU, 0LU, 0LU); - - TestResourceExclusiveAccess(&Res); - CheckResourceStatus(&Res, FALSE, 0LU, 0LU, 0LU); - - TestResourceUndocumentedShortcuts(&Res, FALSE); - CheckResourceStatus(&Res, FALSE, 0LU, 0LU, 0LU); - KeRaiseIrql(APC_LEVEL, &Irql); - TestResourceUndocumentedShortcuts(&Res, TRUE); - KeLowerIrql(Irql); - ok_bool_false(KeAreApcsDisabled(), "KeAreApcsDisabled returned"); - CheckResourceStatus(&Res, FALSE, 0LU, 0LU, 0LU); - - TestResourceWithThreads(&Res); - - /* ExReinitializeResourceLite cleans up after us */ - Status = ExReinitializeResourceLite(&Res); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckResourceFields((PERESOURCE_2K3)&Res, TRUE); - CheckResourceStatus(&Res, FALSE, 0LU, 0LU, 0LU); - - Status = ExDeleteResourceLite(&Res); - ok_eq_hex(Status, STATUS_SUCCESS); - - /* parameter checks */ - Status = STATUS_SUCCESS; - _SEH2_TRY { - ExInitializeResourceLite(NULL); - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - Status = _SEH2_GetExceptionCode(); - } _SEH2_END; - ok_eq_hex(Status, STATUS_ACCESS_VIOLATION); - - /* these bugcheck - ExDeleteResourceLite(NULL); - Status = ExDeleteResourceLite(&Res);*/ -} diff --git a/rostests/kmtests/ntos_ex/ExSequencedList.c b/rostests/kmtests/ntos_ex/ExSequencedList.c deleted file mode 100644 index 8f148f639b9..00000000000 --- a/rostests/kmtests/ntos_ex/ExSequencedList.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite sequenced singly-linked list test - * PROGRAMMER: Thomas Faber - */ - -struct _SINGLE_LIST_ENTRY; -union _SLIST_HEADER; -struct _SINGLE_LIST_ENTRY *__fastcall ExInterlockedPushEntrySList(union _SLIST_HEADER *, struct _SINGLE_LIST_ENTRY *, unsigned long *); -struct _SINGLE_LIST_ENTRY *__fastcall ExInterlockedPopEntrySList(union _SLIST_HEADER *, unsigned long *); - -#include - -/* TODO: SLIST_HEADER is a lot different for x64 */ -#ifndef _M_AMD64 -#define CheckSListHeader(ListHead, ExpectedPointer, ExpectedDepth) do \ -{ \ - ok_eq_pointer((ListHead)->Next.Next, ExpectedPointer); \ - /*ok_eq_pointer(FirstEntrySList(ListHead), ExpectedPointer);*/ \ - ok_eq_uint((ListHead)->Depth, ExpectedDepth); \ - ok_eq_uint((ListHead)->Sequence, ExpectedSequence); \ - ok_eq_uint(ExQueryDepthSList(ListHead), ExpectedDepth); \ - ok_irql(HIGH_LEVEL); \ - ok_bool_true(KmtAreInterruptsEnabled(), "Interrupts enabled:"); \ -} while (0) - -#define PXLIST_HEADER PSLIST_HEADER -#define PXLIST_ENTRY PSLIST_ENTRY -#define PushXList ExInterlockedPushEntrySList -#define PopXList ExInterlockedPopEntrySList -#define FlushXList ExInterlockedFlushSList -#define ok_free_xlist ok_eq_pointer -#define CheckXListHeader CheckSListHeader -#define TestXListFunctional TestSListFunctional -#include "ExXList.h" - -#undef ExInterlockedPushEntrySList -#undef ExInterlockedPopEntrySList -#define TestXListFunctional TestSListFunctionalExports -#include "ExXList.h" -#endif - -START_TEST(ExSequencedList) -{ -#ifndef _M_AMD64 - PSLIST_HEADER ListHead; - KSPIN_LOCK SpinLock; - USHORT ExpectedSequence = 0; - PKSPIN_LOCK pSpinLock = &SpinLock; - PCHAR Buffer; - PSLIST_ENTRY Entries; - SIZE_T EntriesSize = 5 * sizeof *Entries; - KIRQL Irql; - - KeInitializeSpinLock(&SpinLock); -#ifdef _M_IX86 - pSpinLock = NULL; -#endif - - /* make sure stuff is as un-aligned as possible ;) */ - Buffer = ExAllocatePoolWithTag(NonPagedPool, sizeof *ListHead + EntriesSize + 1, 'TLqS'); - ListHead = (PVOID)&Buffer[1]; - Entries = (PVOID)&ListHead[1]; - KeRaiseIrql(HIGH_LEVEL, &Irql); - - RtlFillMemory(Entries, EntriesSize, 0x55); - RtlFillMemory(ListHead, sizeof *ListHead, 0x55); - InitializeSListHead(ListHead); - CheckSListHeader(ListHead, NULL, 0); - TestSListFunctional(ListHead, Entries, pSpinLock); - - RtlFillMemory(Entries, EntriesSize, 0x55); - RtlFillMemory(ListHead, sizeof *ListHead, 0x55); - ExInitializeSListHead(ListHead); - CheckSListHeader(ListHead, NULL, 0); - TestSListFunctionalExports(ListHead, Entries, pSpinLock); - - KeLowerIrql(Irql); - ExFreePoolWithTag(Buffer, 'TLqS'); -#endif -} diff --git a/rostests/kmtests/ntos_ex/ExSingleList.c b/rostests/kmtests/ntos_ex/ExSingleList.c deleted file mode 100644 index d786ec79227..00000000000 --- a/rostests/kmtests/ntos_ex/ExSingleList.c +++ /dev/null @@ -1,114 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Singly-linked list test - * PROGRAMMER: Thomas Faber - */ - -struct _SINGLE_LIST_ENTRY; -#ifdef _X86_ -struct _SINGLE_LIST_ENTRY *__stdcall ExInterlockedPushEntryList(struct _SINGLE_LIST_ENTRY *, struct _SINGLE_LIST_ENTRY *, unsigned long *); -struct _SINGLE_LIST_ENTRY *__stdcall ExInterlockedPopEntryList(struct _SINGLE_LIST_ENTRY *, unsigned long *); -#endif - -#include - -#define ok_eq_free2(Value, Expected) do \ -{ \ - if (KmtIsCheckedBuild) \ - ok_eq_pointer(Value, (PVOID)0xBADDD0FF); \ - else \ - ok_eq_pointer(Value, Expected); \ -} while (0) - -PSINGLE_LIST_ENTRY FlushList(PSINGLE_LIST_ENTRY ListHead) -{ - PSINGLE_LIST_ENTRY Ret = ListHead->Next; - ListHead->Next = NULL; - return Ret; -} - -USHORT QueryDepthList(PSINGLE_LIST_ENTRY ListHead) -{ - USHORT Depth = 0; - while (ListHead->Next) - { - ++Depth; - ListHead = ListHead->Next; - } - return Depth; -} - -PSINGLE_LIST_ENTRY PushEntryListWrapper(PSINGLE_LIST_ENTRY ListHead, PSINGLE_LIST_ENTRY Entry, PKSPIN_LOCK Lock) -{ - PSINGLE_LIST_ENTRY Ret; - UNREFERENCED_PARAMETER(Lock); - Ret = ListHead->Next; - PushEntryList(ListHead, Entry); - return Ret; -} - -#define CheckListHeader(ListHead, ExpectedPointer, ExpectedDepth) do \ -{ \ - ok_eq_pointer((ListHead)->Next, ExpectedPointer); \ - ok_eq_uint(QueryDepthList(ListHead), ExpectedDepth); \ - ok_irql(HIGH_LEVEL); \ - ok_bool_true(KmtAreInterruptsEnabled(), "Interrupts enabled:"); \ -} while (0) - -#define PXLIST_HEADER PSINGLE_LIST_ENTRY -#define PXLIST_ENTRY PSINGLE_LIST_ENTRY -#define PushXList ExInterlockedPushEntryList -#define PopXList ExInterlockedPopEntryList -#define FlushXList FlushList -#define ok_free_xlist ok_eq_free2 -#define CheckXListHeader CheckListHeader -#define TestXListFunctional TestListFunctional -#include "ExXList.h" - -#undef ExInterlockedPushEntryList -#undef ExInterlockedPopEntryList -#define TestXListFunctional TestListFunctionalExports -#include "ExXList.h" - -#undef PushXList -#define PushXList PushEntryListWrapper -#undef PopXList -#define PopXList(h, s) PopEntryList(h) -#undef ok_free_xlist -#define ok_free_xlist ok_eq_pointer -#define TestXListFunctional TestListFunctionalNoInterlocked -#include "ExXList.h" - -START_TEST(ExSingleList) -{ - KSPIN_LOCK SpinLock; - PSINGLE_LIST_ENTRY ListHead; - PSINGLE_LIST_ENTRY Entries; - SIZE_T EntriesSize = 5 * sizeof *Entries; - PCHAR Buffer; - KIRQL Irql; - - KeInitializeSpinLock(&SpinLock); - - /* make sure stuff is as un-aligned as possible ;) */ - Buffer = ExAllocatePoolWithTag(NonPagedPool, sizeof *ListHead + EntriesSize + 1, 'TLiS'); - ListHead = (PVOID)&Buffer[1]; - Entries = (PVOID)&ListHead[1]; - KeRaiseIrql(HIGH_LEVEL, &Irql); - - RtlFillMemory(Entries, sizeof Entries, 0x55); - ListHead->Next = NULL; - TestListFunctional(ListHead, Entries, &SpinLock); - - RtlFillMemory(Entries, sizeof Entries, 0x55); - ListHead->Next = NULL; - TestListFunctionalExports(ListHead, Entries, &SpinLock); - - RtlFillMemory(Entries, sizeof Entries, 0x55); - ListHead->Next = NULL; - TestListFunctionalNoInterlocked(ListHead, Entries, &SpinLock); - - KeLowerIrql(Irql); - ExFreePoolWithTag(Buffer, 'TLiS'); -} diff --git a/rostests/kmtests/ntos_ex/ExTimer.c b/rostests/kmtests/ntos_ex/ExTimer.c deleted file mode 100644 index 566a7dc121b..00000000000 --- a/rostests/kmtests/ntos_ex/ExTimer.c +++ /dev/null @@ -1,144 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: LGPLv2+ - See COPYING.LIB in the top level directory - * PURPOSE: Kernel-Mode Test Suite Executive Regressions KM-Test - * PROGRAMMER: Aleksey Bragin - */ - -#include - -#define NDEBUG -#include - -static -VOID -NTAPI -TestTimerApcRoutine(IN PVOID TimerContext, - IN ULONG TimerLowValue, - IN LONG TimerHighValue) - -{ - ULONG *ApcCount = (ULONG *)TimerContext; - DPRINT("Timer Apc called!\n"); - (*ApcCount)++; -} - -START_TEST(ExTimer) -{ - UNICODE_STRING TimerName; - OBJECT_ATTRIBUTES ObjectAttributes; - HANDLE TimerHandle; - HANDLE HandleOpened; - LARGE_INTEGER DueTime; - BOOLEAN PreviousState, CurrentState; - NTSTATUS Status; - ULONG ApcCount; - - // Create the timer - RtlInitUnicodeString(&TimerName, L"\\TestTimer"); - InitializeObjectAttributes(&ObjectAttributes, &TimerName, 0, NULL, NULL); - Status = ZwCreateTimer(&TimerHandle, TIMER_ALL_ACCESS, - &ObjectAttributes, NotificationTimer); - ok(Status == STATUS_SUCCESS, "ZwCreateTimer failed with Status=0x%08lX", Status); - - // Open the timer - Status = ZwOpenTimer(&HandleOpened, TIMER_ALL_ACCESS, &ObjectAttributes); - ok(Status == STATUS_SUCCESS, "ZwOpenTimer failed with Status=0x%08lX", Status); - - // Set the timer, to some rather high value so it doesn't expire - DPRINT("Set timer 1\n"); - DueTime.LowPart = -10000; - DueTime.HighPart = -10; - PreviousState = TRUE; - Status = ZwSetTimer(HandleOpened, &DueTime, NULL, NULL, FALSE, 0L, &PreviousState); - ok(Status == STATUS_SUCCESS, "ZwSetTimer failed with Status=0x%08lX", Status); - ok(PreviousState == FALSE, "Incorrect PreviousState returned when setting the timer"); - - // Cancel the timer - CurrentState = TRUE; - Status = ZwCancelTimer(HandleOpened, &CurrentState); - ok(Status == STATUS_SUCCESS, "ZwCancelTimer failed with Status=0x%08lX", Status); - ok(CurrentState == FALSE, "Incorrect CurrentState returned when canceling the timer"); - - // Set the timer to some small value, because we'll wait for it to expire - DPRINT("Set timer 2\n"); - DueTime.LowPart = -100; - DueTime.HighPart = -1; - PreviousState = TRUE; - Status = ZwSetTimer(HandleOpened, &DueTime, NULL, NULL, FALSE, 0L, &PreviousState); - ok(Status == STATUS_SUCCESS, "ZwSetTimer failed with Status=0x%08lX", Status); - ok(PreviousState == FALSE, "Incorrect PreviousState returned when setting the timer"); - - // Wait until it expires - DPRINT("Wait till timer expires\n"); - Status = ZwWaitForSingleObject(HandleOpened, FALSE, NULL); - ok(Status == STATUS_SUCCESS, "ZwWaitForSingleObject failed with Status=0x%08lX", Status); - - // And cancel it - DPRINT("Cancel it\n"); - CurrentState = FALSE; - Status = ZwCancelTimer(HandleOpened, &CurrentState); - ok(Status == STATUS_SUCCESS, "ZwCancelTimer failed with Status=0x%08lX", Status); - ok(CurrentState == TRUE, "Incorrect CurrentState returned when setting the timer"); - - // Test it with APC: Set, Cancel, check if APC has been called - DPRINT("Set timer with Apc (3)\n"); - ApcCount = 0; - DueTime.LowPart = -10000; - DueTime.HighPart = -10; - PreviousState = FALSE; - Status = ZwSetTimer(HandleOpened, &DueTime, - (PTIMER_APC_ROUTINE)TestTimerApcRoutine, &ApcCount, FALSE, - 0L, &PreviousState); - - ok(Status == STATUS_SUCCESS, "ZwSetTimer failed with Status=0x%08lX", Status); - ok(PreviousState == TRUE, "Incorrect PreviousState returned when setting the timer"); - - DPRINT("Cancel it\n"); - CurrentState = TRUE; - Status = ZwCancelTimer(HandleOpened, &CurrentState); - ok(Status == STATUS_SUCCESS, "ZwCancelTimer failed with Status=0x%08lX", Status); - ok(CurrentState == FALSE, "Incorrect CurrentState returned when cancelling the timer"); - ok(ApcCount == 0, "Incorrect count of TimerApcRoutine calls: %ld, should be 0\n", ApcCount); - - // Test setting the timer two times in a row, APC routine must not be called - DPRINT("Set timer with Apc (4)\n"); - ApcCount = 0; - DueTime.LowPart = -10000; - DueTime.HighPart = -10; - PreviousState = TRUE; - Status = ZwSetTimer(HandleOpened, &DueTime, - (PTIMER_APC_ROUTINE)TestTimerApcRoutine, &ApcCount, FALSE, - 0L, &PreviousState); - ok(Status == STATUS_SUCCESS, "ZwSetTimer failed with Status=0x%08lX", Status); - ok(PreviousState == FALSE, "Incorrect PreviousState returned when setting the timer"); - - // Set small due time, since we have to wait for timer to finish - DPRINT("Set timer with Apc (5)\n"); - DueTime.LowPart = -10; - DueTime.HighPart = -1; - PreviousState = TRUE; - Status = ZwSetTimer(HandleOpened, &DueTime, - (PTIMER_APC_ROUTINE)TestTimerApcRoutine, &ApcCount, FALSE, - 0L, &PreviousState); - ok(Status == STATUS_SUCCESS, "ZwSetTimer failed with Status=0x%08lX", Status); - ok(PreviousState == FALSE, "Incorrect PreviousState returned when setting the timer"); - - // Now wait till it's finished, and then check APC call - DPRINT("Wait for it\n"); - Status = ZwWaitForSingleObject(HandleOpened, FALSE, NULL); - ok(Status == STATUS_SUCCESS, "ZwWaitForSingleObject failed with Status=0x%08lX", Status); - - CurrentState = FALSE; - Status = ZwCancelTimer(HandleOpened, &CurrentState); - ok(Status == STATUS_SUCCESS, "ZwCancelTimer failed with Status=0x%08lX", Status); - ok(CurrentState == TRUE, "Incorrect CurrentState returned when cancelling the timer"); - ok(ApcCount == 1, "Incorrect count of TimerApcRoutine calls: %ld, should be 1\n", ApcCount); - - // Cleanup... - Status = ZwClose(HandleOpened); - ok(Status == STATUS_SUCCESS, "ZwClose failed with Status=0x%08lX", Status); - - Status = ZwClose(TimerHandle); - ok(Status == STATUS_SUCCESS, "ZwClose failed with Status=0x%08lX", Status); -} diff --git a/rostests/kmtests/ntos_ex/ExXList.h b/rostests/kmtests/ntos_ex/ExXList.h deleted file mode 100644 index f5928c92990..00000000000 --- a/rostests/kmtests/ntos_ex/ExXList.h +++ /dev/null @@ -1,91 +0,0 @@ -/* used by ExSingleList and ExSequencedList tests */ -static -VOID -TestXListFunctional( - IN PXLIST_HEADER ListHead, - IN PXLIST_ENTRY Entries, - IN PKSPIN_LOCK pSpinLock) -{ - USHORT ExpectedSequence = 0; - PXLIST_ENTRY Ret; - - Ret = FlushXList(ListHead); - ok_eq_pointer(Ret, NULL); - CheckXListHeader(ListHead, NULL, 0); - - Ret = PopXList(ListHead, pSpinLock); - ok_eq_pointer(Ret, NULL); - CheckXListHeader(ListHead, NULL, 0); - - Ret = PushXList(ListHead, &Entries[0], pSpinLock); - ++ExpectedSequence; - ok_eq_pointer(Ret, NULL); - ok_eq_pointer(Entries[0].Next, NULL); - CheckXListHeader(ListHead, &Entries[0], 1); - - Ret = PushXList(ListHead, &Entries[1], pSpinLock); - ++ExpectedSequence; - ok_eq_pointer(Ret, &Entries[0]); - ok_eq_pointer(Entries[0].Next, NULL); - ok_eq_pointer(Entries[1].Next, &Entries[0]); - CheckXListHeader(ListHead, &Entries[1], 2); - - Ret = PopXList(ListHead, pSpinLock); - ok_eq_pointer(Ret, &Entries[1]); - ok_eq_pointer(Entries[0].Next, NULL); - ok_free_xlist(Entries[1].Next, &Entries[0]); - CheckXListHeader(ListHead, &Entries[0], 1); - - Ret = PopXList(ListHead, pSpinLock); - ok_eq_pointer(Ret, &Entries[0]); - ok_free_xlist(Entries[0].Next, NULL); - ok_free_xlist(Entries[1].Next, &Entries[0]); - CheckXListHeader(ListHead, NULL, 0); - - Ret = PopXList(ListHead, pSpinLock); - ok_eq_pointer(Ret, NULL); - ok_free_xlist(Entries[0].Next, NULL); - ok_free_xlist(Entries[1].Next, &Entries[0]); - CheckXListHeader(ListHead, NULL, 0); - - /* add entries again */ - Ret = PushXList(ListHead, &Entries[0], pSpinLock); - ++ExpectedSequence; - ok_eq_pointer(Ret, NULL); - ok_eq_pointer(Entries[0].Next, NULL); - CheckXListHeader(ListHead, &Entries[0], 1); - - Ret = PushXList(ListHead, &Entries[1], pSpinLock); - ++ExpectedSequence; - ok_eq_pointer(Ret, &Entries[0]); - ok_eq_pointer(Entries[0].Next, NULL); - ok_eq_pointer(Entries[1].Next, &Entries[0]); - CheckXListHeader(ListHead, &Entries[1], 2); - - Ret = PopXList(ListHead, pSpinLock); - ok_eq_pointer(Ret, &Entries[1]); - ok_eq_pointer(Entries[0].Next, NULL); - ok_free_xlist(Entries[1].Next, &Entries[0]); - CheckXListHeader(ListHead, &Entries[0], 1); - - Ret = PushXList(ListHead, &Entries[1], pSpinLock); - ++ExpectedSequence; - ok_eq_pointer(Ret, &Entries[0]); - ok_eq_pointer(Entries[0].Next, NULL); - ok_eq_pointer(Entries[1].Next, &Entries[0]); - CheckXListHeader(ListHead, &Entries[1], 2); - - Ret = PushXList(ListHead, &Entries[2], pSpinLock); - ++ExpectedSequence; - ok_eq_pointer(Ret, &Entries[1]); - ok_eq_pointer(Entries[0].Next, NULL); - ok_eq_pointer(Entries[1].Next, &Entries[0]); - ok_eq_pointer(Entries[2].Next, &Entries[1]); - CheckXListHeader(ListHead, &Entries[2], 3); - - Ret = FlushXList(ListHead); - ok_eq_pointer(Ret, &Entries[2]); - CheckXListHeader(ListHead, NULL, 0); -} - -#undef TestXListFunctional diff --git a/rostests/kmtests/ntos_fsrtl/FsRtlExpression.c b/rostests/kmtests/ntos_fsrtl/FsRtlExpression.c deleted file mode 100644 index 5d1b043d78d..00000000000 --- a/rostests/kmtests/ntos_fsrtl/FsRtlExpression.c +++ /dev/null @@ -1,356 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: LGPLv2+ - See COPYING.LIB in the top level directory - * PURPOSE: Kernel-Mode Test Suite FsRtl Test - * PROGRAMMER: Pierre Schweitzer - */ - -/* TODO: most of these calls fail the Windows checked build's !islower assertion and others */ - -#include - -#define NDEBUG -#include - -static VOID FsRtlIsNameInExpressionTest() -{ - UNICODE_STRING Expression, Name; - - /* !Name->Length || !Expression->Length asserts */ - if (!KmtIsCheckedBuild) - { - RtlInitUnicodeString(&Expression, L"*"); - RtlInitUnicodeString(&Name, L""); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - RtlInitUnicodeString(&Expression, L""); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); - } - - RtlInitUnicodeString(&Expression, L"ntdll.dll"); - RtlInitUnicodeString(&Name, L"."); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - RtlInitUnicodeString(&Name, L"~1"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - RtlInitUnicodeString(&Name, L".."); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - RtlInitUnicodeString(&Name, L"ntdll.dll"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); - - RtlInitUnicodeString(&Expression, L"smss.exe"); - RtlInitUnicodeString(&Name, L"."); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - RtlInitUnicodeString(&Name, L"~1"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - RtlInitUnicodeString(&Name, L".."); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - RtlInitUnicodeString(&Name, L"ntdll.dll"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - RtlInitUnicodeString(&Name, L"NTDLL.dll"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - - RtlInitUnicodeString(&Expression, L"nt??krnl.???"); - RtlInitUnicodeString(&Name, L"ntoskrnl.exe"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); - - RtlInitUnicodeString(&Expression, L"he*o"); - RtlInitUnicodeString(&Name, L"hello"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); - RtlInitUnicodeString(&Name, L"helo"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); - RtlInitUnicodeString(&Name, L"hella"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - - RtlInitUnicodeString(&Expression, L"he*"); - RtlInitUnicodeString(&Name, L"hello"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); - RtlInitUnicodeString(&Name, L"helo"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); - RtlInitUnicodeString(&Name, L"hella"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); - - RtlInitUnicodeString(&Expression, L"*.cpl"); - RtlInitUnicodeString(&Name, L"kdcom.dll"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - RtlInitUnicodeString(&Name, L"bootvid.dll"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - RtlInitUnicodeString(&Name, L"ntoskrnl.exe"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - - RtlInitUnicodeString(&Expression, L"."); - RtlInitUnicodeString(&Name, L"NTDLL.DLL"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - - RtlInitUnicodeString(&Expression, L"F0_*.*"); - RtlInitUnicodeString(&Name, L"."); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - RtlInitUnicodeString(&Name, L".."); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - RtlInitUnicodeString(&Name, L"SETUP.EXE"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - RtlInitUnicodeString(&Name, L"F0_001"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - - RtlInitUnicodeString(&Expression, L"*.TTF"); - RtlInitUnicodeString(&Name, L"."); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - RtlInitUnicodeString(&Name, L".."); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - RtlInitUnicodeString(&Name, L"SETUP.INI"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - - RtlInitUnicodeString(&Expression, L"*"); - RtlInitUnicodeString(&Name, L"."); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); - RtlInitUnicodeString(&Name, L".."); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); - RtlInitUnicodeString(&Name, L"SETUP.INI"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); - - RtlInitUnicodeString(&Expression, L"\"ntoskrnl.exe"); - RtlInitUnicodeString(&Name, L"ntoskrnl.exe"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - RtlInitUnicodeString(&Expression, L"ntoskrnl\"exe"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); - RtlInitUnicodeString(&Expression, L"ntoskrn\".exe"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - RtlInitUnicodeString(&Expression, L"ntoskrn\"\"exe"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - RtlInitUnicodeString(&Expression, L"ntoskrnl.\"exe"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - RtlInitUnicodeString(&Expression, L"ntoskrnl.exe\""); - RtlInitUnicodeString(&Name, L"ntoskrnl.exe"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); - RtlInitUnicodeString(&Name, L"ntoskrnl.exe."); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); - - RtlInitUnicodeString(&Expression, L"*.c.d"); - RtlInitUnicodeString(&Name, L"a.b.c.d"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); - RtlInitUnicodeString(&Expression, L"*.?.c.d"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); - RtlInitUnicodeString(&Expression, L"*?"); - if (!KmtIsCheckedBuild) - { - RtlInitUnicodeString(&Name, L""); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - } - RtlInitUnicodeString(&Name, L"a"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); - RtlInitUnicodeString(&Name, L"aa"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); - RtlInitUnicodeString(&Name, L"aaa"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); - RtlInitUnicodeString(&Expression, L"?*?"); - if (!KmtIsCheckedBuild) - { - RtlInitUnicodeString(&Name, L""); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - } - RtlInitUnicodeString(&Name, L"a"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - RtlInitUnicodeString(&Name, L"aa"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); - RtlInitUnicodeString(&Name, L"aaa"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); - RtlInitUnicodeString(&Name, L"aaaa"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); - - /* Tests from #5923 */ - RtlInitUnicodeString(&Expression, L"C:\\ReactOS\\**"); - RtlInitUnicodeString(&Name, L"C:\\ReactOS\\dings.bmp"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); - RtlInitUnicodeString(&Expression, L"C:\\ReactOS\\***"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); - RtlInitUnicodeString(&Expression, L"C:\\Windows\\*a*"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - - RtlInitUnicodeString(&Expression, L"C:\\ReactOS\\*.bmp"); - RtlInitUnicodeString(&Name, L"C:\\Windows\\explorer.exe"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - RtlInitUnicodeString(&Expression, L"*.bmp;*.dib"); - RtlInitUnicodeString(&Name, L"winhlp32.exe"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); - - /* Backtracking tests */ - RtlInitUnicodeString(&Expression, L"*.*.*.*"); - RtlInitUnicodeString(&Name, L"127.0.0.1"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); - - RtlInitUnicodeString(&Expression, L"*a*ab*abc"); - RtlInitUnicodeString(&Name, L"aabaabcdadabdabc"); - ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); -} - -static VOID FsRtlIsDbcsInExpressionTest() -{ - ANSI_STRING Expression, Name; - - if (!KmtIsCheckedBuild) - { - RtlInitAnsiString(&Expression, "*"); - RtlInitAnsiString(&Name, ""); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - RtlInitAnsiString(&Expression, ""); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); - } - - RtlInitAnsiString(&Expression, "ntdll.dll"); - RtlInitAnsiString(&Name, "."); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - RtlInitAnsiString(&Name, "~1"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - RtlInitAnsiString(&Name, ".."); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - RtlInitAnsiString(&Name, "ntdll.dll"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); - - RtlInitAnsiString(&Expression, "smss.exe"); - RtlInitAnsiString(&Name, "."); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - RtlInitAnsiString(&Name, "~1"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - RtlInitAnsiString(&Name, ".."); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - RtlInitAnsiString(&Name, "ntdll.dll"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - RtlInitAnsiString(&Name, "NTDLL.dll"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - - RtlInitAnsiString(&Expression, "nt??krnl.???"); - RtlInitAnsiString(&Name, "ntoskrnl.exe"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); - - RtlInitAnsiString(&Expression, "he*o"); - RtlInitAnsiString(&Name, "hello"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); - RtlInitAnsiString(&Name, "helo"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); - RtlInitAnsiString(&Name, "hella"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - - RtlInitAnsiString(&Expression, "he*"); - RtlInitAnsiString(&Name, "hello"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); - RtlInitAnsiString(&Name, "helo"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); - RtlInitAnsiString(&Name, "hella"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); - - RtlInitAnsiString(&Expression, "*.cpl"); - RtlInitAnsiString(&Name, "kdcom.dll"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - RtlInitAnsiString(&Name, "bootvid.dll"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - RtlInitAnsiString(&Name, "ntoskrnl.exe"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - - RtlInitAnsiString(&Expression, "."); - RtlInitAnsiString(&Name, "NTDLL.DLL"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - - RtlInitAnsiString(&Expression, "F0_*.*"); - RtlInitAnsiString(&Name, "."); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - RtlInitAnsiString(&Name, ".."); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - RtlInitAnsiString(&Name, "SETUP.EXE"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - RtlInitAnsiString(&Name, "F0_001"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - - RtlInitAnsiString(&Expression, "*.TTF"); - RtlInitAnsiString(&Name, "."); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - RtlInitAnsiString(&Name, ".."); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - RtlInitAnsiString(&Name, "SETUP.INI"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - - RtlInitAnsiString(&Expression, "*"); - RtlInitAnsiString(&Name, "."); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); - RtlInitAnsiString(&Name, ".."); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); - RtlInitAnsiString(&Name, "SETUP.INI"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); - - RtlInitAnsiString(&Expression, "\"ntoskrnl.exe"); - RtlInitAnsiString(&Name, "ntoskrnl.exe"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - RtlInitAnsiString(&Expression, "ntoskrnl\"exe"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); - RtlInitAnsiString(&Expression, "ntoskrn\".exe"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - RtlInitAnsiString(&Expression, "ntoskrn\"\"exe"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - RtlInitAnsiString(&Expression, "ntoskrnl.\"exe"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - RtlInitAnsiString(&Expression, "ntoskrnl.exe\""); - RtlInitAnsiString(&Name, "ntoskrnl.exe"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); - RtlInitAnsiString(&Name, "ntoskrnl.exe."); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); - - RtlInitAnsiString(&Expression, "*.c.d"); - RtlInitAnsiString(&Name, "a.b.c.d"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); - RtlInitAnsiString(&Expression, "*.?.c.d"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); - RtlInitAnsiString(&Expression, "*?"); - if (!KmtIsCheckedBuild) - { - RtlInitAnsiString(&Name, ""); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - } - RtlInitAnsiString(&Name, "a"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); - RtlInitAnsiString(&Name, "aa"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); - RtlInitAnsiString(&Name, "aaa"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); - RtlInitAnsiString(&Expression, "?*?"); - if (!KmtIsCheckedBuild) - { - RtlInitAnsiString(&Name, ""); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - } - RtlInitAnsiString(&Name, "a"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - RtlInitAnsiString(&Name, "aa"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); - RtlInitAnsiString(&Name, "aaa"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); - RtlInitAnsiString(&Name, "aaaa"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); - - /* Tests from #5923 */ - RtlInitAnsiString(&Expression, "C:\\ReactOS\\**"); - RtlInitAnsiString(&Name, "C:\\ReactOS\\dings.bmp"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); - RtlInitAnsiString(&Expression, "C:\\ReactOS\\***"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); - RtlInitAnsiString(&Expression, "C:\\Windows\\*a*"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - - RtlInitAnsiString(&Expression, "C:\\ReactOS\\*.bmp"); - RtlInitAnsiString(&Name, "C:\\Windows\\explorer.exe"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - RtlInitAnsiString(&Expression, "*.bmp;*.dib"); - RtlInitAnsiString(&Name, "winhlp32.exe"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); - - /* Backtracking tetss */ - RtlInitAnsiString(&Expression, "*.*.*.*"); - RtlInitAnsiString(&Name, "127.0.0.1"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); - - RtlInitAnsiString(&Expression, "*a*ab*abc"); - RtlInitAnsiString(&Name, "aabaabcdadabdabc"); - ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); -} - -START_TEST(FsRtlExpression) -{ - FsRtlIsNameInExpressionTest(); - FsRtlIsDbcsInExpressionTest(); -} diff --git a/rostests/kmtests/ntos_io/CMakeLists.txt b/rostests/kmtests/ntos_io/CMakeLists.txt deleted file mode 100644 index af43acfcdb2..00000000000 --- a/rostests/kmtests/ntos_io/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ -include_directories( - ../include) - -# -# IoDeviceObject -# -list(APPEND IODEVICEOBJECT_DRV_SOURCE - ../kmtest_drv/kmtest_standalone.c - IoDeviceObject_drv.c) - -add_library(iodeviceobject_drv SHARED ${IODEVICEOBJECT_DRV_SOURCE}) - -set_module_type(iodeviceobject_drv kernelmodedriver) -target_link_libraries(iodeviceobject_drv kmtest_printf ${PSEH_LIB}) -add_importlibs(iodeviceobject_drv ntoskrnl hal) -add_target_compile_definitions(iodeviceobject_drv KMT_STANDALONE_DRIVER) -#add_pch(iodeviceobject_drv ../include/kmt_test.h) - -add_cd_file(TARGET iodeviceobject_drv DESTINATION reactos/bin FOR all) - -# -# IoHelper -# -list(APPEND IOHELPER_DRV_SOURCE - ../kmtest_drv/kmtest_standalone.c - IoHelper_drv.c) - -add_library(iohelper_drv SHARED ${IOHELPER_DRV_SOURCE}) - -set_module_type(iohelper_drv kernelmodedriver) -target_link_libraries(iohelper_drv kmtest_printf ${PSEH_LIB}) -add_importlibs(iohelper_drv ntoskrnl hal) -add_target_compile_definitions(iohelper_drv KMT_STANDALONE_DRIVER) -#add_pch(iohelper_drv ../include/kmt_test.h) - -add_cd_file(TARGET iohelper_drv DESTINATION reactos/bin FOR all) diff --git a/rostests/kmtests/ntos_io/IoDeviceInterface.c b/rostests/kmtests/ntos_io/IoDeviceInterface.c deleted file mode 100644 index 98edc8f682e..00000000000 --- a/rostests/kmtests/ntos_io/IoDeviceInterface.c +++ /dev/null @@ -1,120 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: LGPLv2+ - See COPYING.LIB in the top level directory - * PURPOSE: Kernel-Mode Test Suite Device Interface functions test - * PROGRAMMER: Filip Navara - */ - -/* TODO: what's with the prototypes at the top, what's with the if-ed out part? Doesn't process most results */ - -#include - -#define NDEBUG -#include - -#if 0 -NTSTATUS -(NTAPI *IoGetDeviceInterfaces_Func)( - IN CONST GUID *InterfaceClassGuid, - IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL, - IN ULONG Flags, - OUT PWSTR *SymbolicLinkList); - -NTSTATUS NTAPI -ReactOS_IoGetDeviceInterfaces( - IN CONST GUID *InterfaceClassGuid, - IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL, - IN ULONG Flags, - OUT PWSTR *SymbolicLinkList); -#endif /* 0 */ - -static VOID DeviceInterfaceTest_Func() -{ - NTSTATUS Status; - PWSTR SymbolicLinkList; - PWSTR SymbolicLinkListPtr; - GUID Guid = {0x378de44c, 0x56ef, 0x11d1, {0xbc, 0x8c, 0x00, 0xa0, 0xc9, 0x14, 0x05, 0xdd}}; - - Status = IoGetDeviceInterfaces( - &Guid, - NULL, - 0, - &SymbolicLinkList); - - ok(NT_SUCCESS(Status), - "IoGetDeviceInterfaces failed with status 0x%X\n", - (unsigned int)Status); - if (!NT_SUCCESS(Status)) - { - return; - } - - DPRINT("IoGetDeviceInterfaces results:\n"); - for (SymbolicLinkListPtr = SymbolicLinkList; - SymbolicLinkListPtr[0] != 0 && SymbolicLinkListPtr[1] != 0; - SymbolicLinkListPtr += wcslen(SymbolicLinkListPtr) + 1) - { - DPRINT1("Symbolic Link: %S\n", SymbolicLinkListPtr); - } - -#if 0 - DPRINT("[PnP Test] Trying to get aliases\n"); - - for (SymbolicLinkListPtr = SymbolicLinkList; - SymbolicLinkListPtr[0] != 0 && SymbolicLinkListPtr[1] != 0; - SymbolicLinkListPtr += wcslen(SymbolicLinkListPtr) + 1) - { - UNICODE_STRING SymbolicLink; - UNICODE_STRING AliasSymbolicLink; - - SymbolicLink.Buffer = SymbolicLinkListPtr; - SymbolicLink.Length = SymbolicLink.MaximumLength = wcslen(SymbolicLinkListPtr); - RtlInitUnicodeString(&AliasSymbolicLink, NULL); - IoGetDeviceInterfaceAlias( - &SymbolicLink, - &AliasGuid, - &AliasSymbolicLink); - if (AliasSymbolicLink.Buffer != NULL) - { - DPRINT("[PnP Test] Original: %S\n", SymbolicLinkListPtr); - DPRINT("[PnP Test] Alias: %S\n", AliasSymbolicLink.Buffer); - } - } -#endif - - ExFreePool(SymbolicLinkList); -} - -START_TEST(IoDeviceInterface) -{ - GUID Guid = {0x378de44c, 0x56ef, 0x11d1, {0xbc, 0x8c, 0x00, 0xa0, 0xc9, 0x14, 0x05, 0xdd}}; - DEVICE_OBJECT DeviceObject; - EXTENDED_DEVOBJ_EXTENSION DeviceObjectExtension; - DEVICE_NODE DeviceNode; - UNICODE_STRING SymbolicLinkName; - NTSTATUS Status; - - RtlInitUnicodeString(&SymbolicLinkName, L""); - - // Prepare our surrogate of a Device Object - DeviceObject.DeviceObjectExtension = (PDEVOBJ_EXTENSION)&DeviceObjectExtension; - - // 1. DeviceNode = NULL - DeviceObjectExtension.DeviceNode = NULL; - Status = IoRegisterDeviceInterface(&DeviceObject, &Guid, NULL, - &SymbolicLinkName); - - ok(Status == STATUS_INVALID_DEVICE_REQUEST, - "IoRegisterDeviceInterface returned 0x%08lX\n", Status); - - // 2. DeviceNode->InstancePath is of a null length - DeviceObjectExtension.DeviceNode = &DeviceNode; - DeviceNode.InstancePath.Length = 0; - Status = IoRegisterDeviceInterface(&DeviceObject, &Guid, NULL, - &SymbolicLinkName); - - ok(Status == STATUS_INVALID_DEVICE_REQUEST, - "IoRegisterDeviceInterface returned 0x%08lX\n", Status); - - DeviceInterfaceTest_Func(); -} diff --git a/rostests/kmtests/ntos_io/IoDeviceObject_drv.c b/rostests/kmtests/ntos_io/IoDeviceObject_drv.c deleted file mode 100644 index 688f3081110..00000000000 --- a/rostests/kmtests/ntos_io/IoDeviceObject_drv.c +++ /dev/null @@ -1,495 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Driver Object Test Driver - * PROGRAMMER: Michael Martin - * Thomas Faber - */ - -#include - -//#define NDEBUG -#include - -typedef enum -{ - DriverEntry, - DriverIrp, - DriverUnload -} DRIVER_STATUS; - -static DRIVER_DISPATCH TestDispatch; -static VOID TestDriverObject(IN PDRIVER_OBJECT DriverObject, IN DRIVER_STATUS DriverStatus); -static BOOLEAN TestZwLoad(IN PDRIVER_OBJECT DriverObject, IN PCUNICODE_STRING DriverRegistryPath, IN PWCHAR NewDriverRegPath); -static BOOLEAN TestZwUnload(IN PDRIVER_OBJECT DriverObject, IN PCUNICODE_STRING DriverRegistryPath, IN PWCHAR NewDriverRegPath); -static VOID TestLowerDeviceKernelAPI(IN PDEVICE_OBJECT DeviceObject); -static VOID TestDeviceCreated(IN PDEVICE_OBJECT DeviceObject, IN BOOLEAN ExclusiveAccess); -static VOID TestDeviceDeletion(IN PDEVICE_OBJECT DeviceObject, IN BOOLEAN Lower, IN BOOLEAN Attached); -static VOID TestDeviceCreateDelete(IN PDRIVER_OBJECT DriverObject); -static VOID TestAttachDevice(IN PDEVICE_OBJECT DeviceObject, IN PWCHAR NewDriverRegPath); -static VOID TestDetachDevice(IN PDEVICE_OBJECT AttachedDevice); - -static PDEVICE_OBJECT MainDeviceObject; -static PDEVICE_OBJECT AttachDeviceObject; -static PDRIVER_OBJECT ThisDriverObject; - -NTSTATUS -TestEntry( - IN PDRIVER_OBJECT DriverObject, - IN PCUNICODE_STRING RegistryPath, - OUT PCWSTR *DeviceName, - IN OUT INT *Flags) -{ - NTSTATUS Status = STATUS_SUCCESS; - BOOLEAN Ret; - INT i; - - PAGED_CODE(); - - UNREFERENCED_PARAMETER(DeviceName); - - *Flags = TESTENTRY_NO_CREATE_DEVICE | TESTENTRY_NO_REGISTER_DISPATCH; - - ThisDriverObject = DriverObject; - - TestDriverObject(DriverObject, DriverEntry); - - /* Create and delete device, on return MainDeviceObject has been created */ - TestDeviceCreateDelete(DriverObject); - - /* Make sure a device object was created */ - if (!skip(MainDeviceObject != NULL, "Device object creation failed\n")) - { - PWCHAR LowerDriverRegPath = L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\Kmtest-IoHelper"; - - /* Load driver test and load the lower driver */ - Ret = TestZwLoad(DriverObject, RegistryPath, LowerDriverRegPath); - if (!skip(Ret, "Failed to load helper driver\n")) - { - TestAttachDevice(MainDeviceObject, L"\\Device\\Kmtest-IoHelper"); - if (!skip(AttachDeviceObject != NULL, "No attached device object\n")) - TestLowerDeviceKernelAPI(MainDeviceObject); - - /* Unload lower driver without detaching from its device */ - TestZwUnload(DriverObject, RegistryPath, LowerDriverRegPath); - TestLowerDeviceKernelAPI(MainDeviceObject); - } - } - - for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; ++i) - DriverObject->MajorFunction[i] = NULL; - DriverObject->MajorFunction[IRP_MJ_CREATE] = TestDispatch; - DriverObject->MajorFunction[IRP_MJ_CLOSE] = TestDispatch; - DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = TestDispatch; - - return Status; -} - -VOID -TestUnload( - IN PDRIVER_OBJECT DriverObject) -{ - PAGED_CODE(); - - if (!skip(AttachDeviceObject != NULL, "no attached device object\n")) - { - TestDeviceDeletion(MainDeviceObject, FALSE, TRUE); - TestDeviceDeletion(AttachDeviceObject, TRUE, FALSE); - TestDetachDevice(AttachDeviceObject); - } - - TestDeviceDeletion(MainDeviceObject, FALSE, FALSE); - TestDriverObject(DriverObject, DriverUnload); - - if (MainDeviceObject) - IoDeleteDevice(MainDeviceObject); -} - -static -NTSTATUS -NTAPI -TestDispatch( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) -{ - NTSTATUS Status = STATUS_SUCCESS; - PIO_STACK_LOCATION IoStackLocation; - - PAGED_CODE(); - - IoStackLocation = IoGetCurrentIrpStackLocation(Irp); - - DPRINT("TestIrpHandler. Function=%s, DeviceObject=%p, AttachDeviceObject=%p\n", - KmtMajorFunctionNames[IoStackLocation->MajorFunction], - DeviceObject, - AttachDeviceObject); - - if (AttachDeviceObject) - { - IoSkipCurrentIrpStackLocation(Irp); - Status = IoCallDriver(AttachDeviceObject, Irp); - return Status; - } - - TestDriverObject(DeviceObject->DriverObject, DriverIrp); - - Irp->IoStatus.Status = Status; - Irp->IoStatus.Information = 0; - - IoCompleteRequest(Irp, IO_NO_INCREMENT); - - return Status; -} - -static -VOID -TestDriverObject( - IN PDRIVER_OBJECT DriverObject, - IN DRIVER_STATUS DriverStatus) -{ - BOOLEAN CheckThisDispatchRoutine; - PVOID FirstMajorFunc; - int i; - - ok(DriverObject->Size == sizeof(DRIVER_OBJECT), "Size does not match, got %x\n",DriverObject->Size); - ok(DriverObject->Type == 4, "Type does not match 4. got %d\n", DriverObject->Type); - - if (DriverStatus == DriverEntry) - { - ok(DriverObject->DeviceObject == NULL, "Expected DeviceObject pointer to be 0, got %p\n", - DriverObject->DeviceObject); - ok (DriverObject->Flags == DRVO_LEGACY_DRIVER, - "Expected Flags to be DRVO_LEGACY_DRIVER, got %lu\n", - DriverObject->Flags); - } - else if (DriverStatus == DriverIrp) - { - ok(DriverObject->DeviceObject != NULL, "Expected DeviceObject pointer to non null\n"); - ok (DriverObject->Flags == (DRVO_LEGACY_DRIVER | DRVO_INITIALIZED), - "Expected Flags to be DRVO_LEGACY_DRIVER | DRVO_INITIALIZED, got %lu\n", - DriverObject->Flags); - } - else if (DriverStatus == DriverUnload) - { - ok(DriverObject->DeviceObject != NULL, "Expected DeviceObject pointer to non null\n"); - ok (DriverObject->Flags == (DRVO_LEGACY_DRIVER | DRVO_INITIALIZED | DRVO_UNLOAD_INVOKED), - "Expected Flags to be DRVO_LEGACY_DRIVER | DRVO_INITIALIZED | DRVO_UNLOAD_INVOKED, got %lu\n", - DriverObject->Flags); - } - else - ASSERT(FALSE); - - /* Select a routine that was not changed */ - FirstMajorFunc = DriverObject->MajorFunction[1]; - ok(FirstMajorFunc != 0, "Expected MajorFunction[1] to be non NULL\n"); - - if (!skip(FirstMajorFunc != NULL, "First major function not set!\n")) - { - for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++) - { - if (DriverStatus > 0) CheckThisDispatchRoutine = (i > 3) && (i != 14); - else CheckThisDispatchRoutine = TRUE; - - if (CheckThisDispatchRoutine) - { - ok(DriverObject->MajorFunction[i] == FirstMajorFunc, "Expected MajorFunction[%d] to match %p\n", - i, FirstMajorFunc); - } - } - } -} - -static -BOOLEAN -TestZwLoad( - IN PDRIVER_OBJECT DriverObject, - IN PCUNICODE_STRING DriverRegistryPath, - IN PWCHAR NewDriverRegPath) -{ - UNICODE_STRING RegPath; - NTSTATUS Status; - - /* Try to load ourself */ - Status = ZwLoadDriver((PUNICODE_STRING)DriverRegistryPath); - ok (Status == STATUS_IMAGE_ALREADY_LOADED, "Expected NTSTATUS STATUS_IMAGE_ALREADY_LOADED, got 0x%lX\n", Status); - - if (Status != STATUS_IMAGE_ALREADY_LOADED) - { - DbgPrint("WARNING: Loading this a second time will cause BUGCHECK!\n"); - } - - /* Try to load with a Registry Path that doesnt exist */ - RtlInitUnicodeString(&RegPath, L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\deadbeef"); - Status = ZwLoadDriver(&RegPath); - ok (Status == STATUS_OBJECT_NAME_NOT_FOUND, "Expected NTSTATUS STATUS_OBJECT_NAME_NOT_FOUND, got 0x%lX\n", Status); - - /* Load the driver */ - RtlInitUnicodeString(&RegPath, NewDriverRegPath); - Status = ZwLoadDriver(&RegPath); - ok(Status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got 0x%lX\n", Status); - - return NT_SUCCESS(Status); -} - -static -BOOLEAN -TestZwUnload( - IN PDRIVER_OBJECT DriverObject, - IN PCUNICODE_STRING DriverRegistryPath, - IN PWCHAR NewDriverRegPath) -{ - UNICODE_STRING RegPath; - NTSTATUS Status; - - /* Try to unload ourself, which should fail as our Unload routine hasnt been set yet. */ - Status = ZwUnloadDriver((PUNICODE_STRING)DriverRegistryPath); - ok (Status == STATUS_INVALID_DEVICE_REQUEST, "Expected NTSTATUS STATUS_INVALID_DEVICE_REQUEST, got 0x%lX\n", Status); - - /* Try to unload with a Registry Path that doesnt exist */ - RtlInitUnicodeString(&RegPath, L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\deadbeef"); - Status = ZwUnloadDriver(&RegPath); - ok (Status == STATUS_OBJECT_NAME_NOT_FOUND, "Expected NTSTATUS STATUS_OBJECT_NAME_NOT_FOUND, got 0x%lX\n", Status); - - /* Unload the driver */ - RtlInitUnicodeString(&RegPath, NewDriverRegPath); - Status = ZwUnloadDriver(&RegPath); - ok(Status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got 0x%lX\n", Status); - - return NT_SUCCESS(Status); -} - -static -VOID -TestLowerDeviceKernelAPI( - IN PDEVICE_OBJECT DeviceObject) -{ - PDEVICE_OBJECT RetObject; - - RetObject = IoGetLowerDeviceObject(DeviceObject); - - ok(RetObject == AttachDeviceObject, - "Expected an Attached DeviceObject %p, got %p\n", AttachDeviceObject, RetObject); - - if (RetObject) - { - ObDereferenceObject(RetObject); - } - - RetObject = IoGetDeviceAttachmentBaseRef(DeviceObject); - ok(RetObject == AttachDeviceObject, - "Expected an Attached DeviceObject %p, got %p\n", AttachDeviceObject, RetObject); - - if (RetObject) - { - ObDereferenceObject(RetObject); - } - -} - -static -VOID -TestDeviceCreated( - IN PDEVICE_OBJECT DeviceObject, - IN BOOLEAN ExclusiveAccess) -{ - PEXTENDED_DEVOBJ_EXTENSION extdev; - - /* Check the device object members */ - ok(DeviceObject->Type == 3, "Expected Type = 3, got %x\n", DeviceObject->Type); - ok(DeviceObject->Size == 0xb8, "Expected Size = 0xb8, got %x\n", DeviceObject->Size); - ok(DeviceObject->ReferenceCount == 0, "Expected ReferenceCount = 0, got %lu\n", - DeviceObject->ReferenceCount); - ok(DeviceObject->DriverObject == ThisDriverObject, - "Expected DriverObject member to match this DriverObject %p, got %p\n", - ThisDriverObject, DeviceObject->DriverObject); - ok(DeviceObject->NextDevice == NULL, "Expected NextDevice to be NULL, got %p\n", DeviceObject->NextDevice); - ok(DeviceObject->AttachedDevice == NULL, "Expected AttachDevice to be NULL, got %p\n", DeviceObject->AttachedDevice); - ok(DeviceObject->Characteristics == 0, "Expected Characteristics to be 0\n"); - if (ExclusiveAccess) - { - ok((DeviceObject->Flags == (DO_DEVICE_HAS_NAME | DO_DEVICE_INITIALIZING | DO_EXCLUSIVE)), - "Expected Flags DO_DEVICE_HAS_NAME | DO_DEVICE_INITIALIZING | DO_EXCLUSIVE, got %lu\n", DeviceObject->Flags); - } - else - { - ok((DeviceObject->Flags == (DO_DEVICE_HAS_NAME | DO_DEVICE_INITIALIZING)), - "Expected Flags DO_DEVICE_HAS_NAME | DO_DEVICE_INITIALIZING, got %lu\n", DeviceObject->Flags); - } - ok(DeviceObject->DeviceType == FILE_DEVICE_UNKNOWN, - "Expected DeviceType to match creation parameter FILE_DEVICE_UNKNWOWN, got %lu\n", - DeviceObject->DeviceType); - ok(DeviceObject->ActiveThreadCount == 0, "Expected ActiveThreadCount = 0, got %lu\n", DeviceObject->ActiveThreadCount); - - /* Check the extended extension */ - extdev = (PEXTENDED_DEVOBJ_EXTENSION)DeviceObject->DeviceObjectExtension; - ok(extdev->ExtensionFlags == 0, "Expected Extended ExtensionFlags to be 0, got %lu\n", extdev->ExtensionFlags); - ok (extdev->Type == 13, "Expected Type of 13, got %d\n", extdev->Type); - ok (extdev->Size == 0, "Expected Size of 0, got %d\n", extdev->Size); - ok (extdev->DeviceObject == DeviceObject, "Expected DeviceOject to match newly created device %p, got %p\n", - DeviceObject, extdev->DeviceObject); - ok(extdev->AttachedTo == NULL, "Expected AttachTo to be NULL, got %p\n", extdev->AttachedTo); - ok(extdev->StartIoCount == 0, "Expected StartIoCount = 0, got %lu\n", extdev->StartIoCount); - ok(extdev->StartIoKey == 0, "Expected StartIoKey = 0, got %lu\n", extdev->StartIoKey); - ok(extdev->StartIoFlags == 0, "Expected StartIoFlags = 0, got %lu\n", extdev->StartIoFlags); -} - -static -VOID -TestDeviceDeletion( - IN PDEVICE_OBJECT DeviceObject, - IN BOOLEAN Lower, - IN BOOLEAN Attached) -{ - PEXTENDED_DEVOBJ_EXTENSION extdev; - - /* Check the device object members */ - ok(DeviceObject->Type == 3, "Expected Type = 3, got %d\n", DeviceObject->Type); - ok(DeviceObject->Size == 0xb8, "Expected Size = 0xb8, got %d\n", DeviceObject->Size); - ok(DeviceObject->ReferenceCount == 0, "Expected ReferenceCount = 0, got %lu\n", - DeviceObject->ReferenceCount); - if (!Lower) - { - ok(DeviceObject->DriverObject == ThisDriverObject, - "Expected DriverObject member to match this DriverObject %p, got %p\n", - ThisDriverObject, DeviceObject->DriverObject); - } - ok(DeviceObject->NextDevice == NULL, "Expected NextDevice to be NULL, got %p\n", DeviceObject->NextDevice); - - if (Lower) - { - ok(DeviceObject->AttachedDevice == MainDeviceObject, - "Expected AttachDevice to be %p, got %p\n", MainDeviceObject, DeviceObject->AttachedDevice); - } - else - { - ok(DeviceObject->AttachedDevice == NULL, "Expected AttachDevice to be NULL, got %p\n", DeviceObject->AttachedDevice); - } - - ok(DeviceObject->Flags == (DO_DEVICE_HAS_NAME | (Lower ? DO_EXCLUSIVE : 0)), - "Expected Flags DO_DEVICE_HAS_NAME, got %lu\n", DeviceObject->Flags); - ok(DeviceObject->DeviceType == FILE_DEVICE_UNKNOWN, - "Expected DeviceType to match creation parameter FILE_DEVICE_UNKNWOWN, got %lu\n", - DeviceObject->DeviceType); - ok(DeviceObject->ActiveThreadCount == 0, "Expected ActiveThreadCount = 0, got %lu\n", DeviceObject->ActiveThreadCount); - - /*Check the extended extension */ - extdev = (PEXTENDED_DEVOBJ_EXTENSION)DeviceObject->DeviceObjectExtension; - ok(extdev->ExtensionFlags == DOE_UNLOAD_PENDING, - "Expected Extended ExtensionFlags to be DOE_UNLOAD_PENDING, got %lu\n", extdev->ExtensionFlags); - ok (extdev->Type == 13, "Expected Type of 13, got %d\n", extdev->Type); - ok (extdev->Size == 0, "Expected Size of 0, got %d\n", extdev->Size); - ok (extdev->DeviceObject == DeviceObject, "Expected DeviceOject to match newly created device %p, got %p\n", - DeviceObject, extdev->DeviceObject); - if (Lower || !Attached) - { - ok(extdev->AttachedTo == NULL, "Expected AttachTo to be NULL, got %p\n", extdev->AttachedTo); - } - else - { - ok(extdev->AttachedTo == AttachDeviceObject, "Expected AttachTo to %p, got %p\n", AttachDeviceObject, extdev->AttachedTo); - } - ok(extdev->StartIoCount == 0, "Expected StartIoCount = 0, got %lu\n", extdev->StartIoCount); - ok(extdev->StartIoKey == 0, "Expected StartIoKey = 0, got %lu\n", extdev->StartIoKey); - ok(extdev->StartIoFlags == 0, "Expected StartIoFlags = 0, got %lu\n", extdev->StartIoFlags); -} - -static -VOID -TestDeviceCreateDelete( - IN PDRIVER_OBJECT DriverObject) -{ - NTSTATUS Status; - UNICODE_STRING DeviceString; - PDEVICE_OBJECT DeviceObject; - - /* Create using wrong directory */ - RtlInitUnicodeString(&DeviceString, L"\\Device1\\Kmtest-IoDeviceObject"); - Status = IoCreateDevice(DriverObject, - 0, - &DeviceString, - FILE_DEVICE_UNKNOWN, - 0, - FALSE, - &DeviceObject); - ok(Status == STATUS_OBJECT_PATH_NOT_FOUND, "Expected STATUS_OBJECT_PATH_NOT_FOUND, got 0x%lX\n", Status); - - /* Create using correct params with exclusice access */ - RtlInitUnicodeString(&DeviceString, L"\\Device\\Kmtest-IoDeviceObject"); - Status = IoCreateDevice(DriverObject, - 0, - &DeviceString, - FILE_DEVICE_UNKNOWN, - 0, - TRUE, - &DeviceObject); - ok(Status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got 0x%lX\n", Status); - - TestDeviceCreated(DeviceObject, TRUE); - - /* Delete the device */ - if (NT_SUCCESS(Status)) - { - IoDeleteDevice(DeviceObject); - ok(DriverObject->DeviceObject == 0, "Expected DriverObject->DeviceObject to be NULL, got %p\n", - DriverObject->DeviceObject); - } - - /* Create using correct params without exclusice access */ - Status = IoCreateDevice(DriverObject, - 0, - &DeviceString, - FILE_DEVICE_UNKNOWN, - 0, - FALSE, - &DeviceObject); - ok(Status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got 0x%lX\n", Status); - - TestDeviceCreated(DeviceObject, FALSE); - - /* Delete the device */ - if (NT_SUCCESS(Status)) - { - IoDeleteDevice(DeviceObject); - ok(DriverObject->DeviceObject == 0, "Expected DriverObject->DeviceObject to be NULL, got %p\n", - DriverObject->DeviceObject); - } - - /* Recreate device */ - Status = IoCreateDevice(DriverObject, - 0, - &DeviceString, - FILE_DEVICE_UNKNOWN, - 0, - FALSE, - &DeviceObject); - ok(Status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got 0x%lX\n", Status); - - if (NT_SUCCESS(Status)) - MainDeviceObject = DeviceObject; -} - -static -VOID -TestAttachDevice( - IN PDEVICE_OBJECT DeviceObject, - IN PWCHAR NewDriverRegPath) -{ - NTSTATUS Status; - UNICODE_STRING LowerDeviceName; - - RtlInitUnicodeString(&LowerDeviceName, NewDriverRegPath); - Status = IoAttachDevice(DeviceObject, &LowerDeviceName, &AttachDeviceObject); - ok_eq_hex(Status, STATUS_SUCCESS); - - /* TODO: Add more tests */ -} - -static -VOID -TestDetachDevice( - IN PDEVICE_OBJECT AttachedDevice) -{ - IoDetachDevice(AttachedDevice); - - /* TODO: Add more tests */ -} diff --git a/rostests/kmtests/ntos_io/IoDeviceObject_user.c b/rostests/kmtests/ntos_io/IoDeviceObject_user.c deleted file mode 100644 index 5ce1ac85697..00000000000 --- a/rostests/kmtests/ntos_io/IoDeviceObject_user.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Driver Object test user-mode part - * PROGRAMMER: Thomas Faber - */ - -#include - -START_TEST(IoDeviceObject) -{ - /* make sure IoHelper has an existing service key, but is not started */ - KmtLoadDriver(L"IoHelper", FALSE); - KmtUnloadDriver(); - - KmtLoadDriver(L"IoDeviceObject", TRUE); - KmtOpenDriver(); - KmtCloseDriver(); - KmtUnloadDriver(); -} diff --git a/rostests/kmtests/ntos_io/IoHelper_drv.c b/rostests/kmtests/ntos_io/IoHelper_drv.c deleted file mode 100644 index fc7b1168c5f..00000000000 --- a/rostests/kmtests/ntos_io/IoHelper_drv.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite I/O Test Helper driver - * PROGRAMMER: Thomas Faber - */ - -#include - -//#define NDEBUG -#include - -static KMT_IRP_HANDLER TestIrpHandler; - -NTSTATUS -TestEntry( - IN PDRIVER_OBJECT DriverObject, - IN PCUNICODE_STRING RegistryPath, - OUT PCWSTR *DeviceName, - IN OUT INT *Flags) -{ - NTSTATUS Status = STATUS_SUCCESS; - INT i; - - PAGED_CODE(); - - UNREFERENCED_PARAMETER(DriverObject); - UNREFERENCED_PARAMETER(RegistryPath); - UNREFERENCED_PARAMETER(Flags); - - DPRINT("TestEntry. DriverObject=%p, RegistryPath=%wZ\n", DriverObject, RegistryPath); - - *DeviceName = L"IoHelper"; - - for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; ++i) - KmtRegisterIrpHandler(i, NULL, TestIrpHandler); - - return Status; -} - -VOID -TestUnload( - IN PDRIVER_OBJECT DriverObject) -{ - PAGED_CODE(); - - UNREFERENCED_PARAMETER(DriverObject); - - DPRINT("TestUnload. DriverObject=%p\n", DriverObject); -} - -static -NTSTATUS -TestIrpHandler( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp, - IN PIO_STACK_LOCATION IoStackLocation) -{ - NTSTATUS Status = STATUS_SUCCESS; - - DPRINT("TestIrpHandler. Function=%s, DeviceObject=%p\n", - KmtMajorFunctionNames[IoStackLocation->MajorFunction], - DeviceObject); - - Irp->IoStatus.Status = Status; - Irp->IoStatus.Information = 0; - - IoCompleteRequest(Irp, IO_NO_INCREMENT); - - return Status; -} diff --git a/rostests/kmtests/ntos_io/IoInterrupt.c b/rostests/kmtests/ntos_io/IoInterrupt.c deleted file mode 100644 index 0f4d8de9027..00000000000 --- a/rostests/kmtests/ntos_io/IoInterrupt.c +++ /dev/null @@ -1,95 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Interrupt test - * PROGRAMMER: Thomas Faber - */ - -#include - -#define NDEBUG -#include - -#define CheckSpinLock(Lock, Locked) do \ -{ \ - if (KmtIsMultiProcessorBuild) \ - ok_eq_ulongptr(*(Lock), (Locked) != 0); \ - else \ - ok_eq_ulongptr(*(Lock), 0); \ -} while (0) - -typedef struct -{ - BOOLEAN ReturnValue; - KIRQL ExpectedIrql; - PKINTERRUPT Interrupt; -} TEST_CONTEXT, *PTEST_CONTEXT; - -static KSYNCHRONIZE_ROUTINE SynchronizeRoutine; - -static -BOOLEAN -NTAPI -SynchronizeRoutine( - IN PVOID Context) -{ - PTEST_CONTEXT TestContext = Context; - - ok_irql(TestContext->ExpectedIrql); - - CheckSpinLock(TestContext->Interrupt->ActualLock, TRUE); - - return TestContext->ReturnValue; -} - -static -VOID -TestSynchronizeExecution(VOID) -{ - KINTERRUPT Interrupt; - TEST_CONTEXT TestContext; - KIRQL SynchIrql; - KIRQL OriginalIrql; - KIRQL Irql; - KSPIN_LOCK ActualLock; - BOOLEAN Ret; - - RtlFillMemory(&Interrupt, sizeof Interrupt, 0x55); - Interrupt.ActualLock = &ActualLock; - KeInitializeSpinLock(Interrupt.ActualLock); - CheckSpinLock(Interrupt.ActualLock, FALSE); - - TestContext.Interrupt = &Interrupt; - TestContext.ReturnValue = TRUE; - - for (TestContext.ReturnValue = 0; TestContext.ReturnValue <= 2; ++TestContext.ReturnValue) - { - for (OriginalIrql = PASSIVE_LEVEL; OriginalIrql <= HIGH_LEVEL; ++OriginalIrql) - { - /* TODO: don't hardcode this :| */ - if (OriginalIrql == 3 || (OriginalIrql >= 11 && OriginalIrql <= 26) || OriginalIrql == 30) - continue; - KeRaiseIrql(OriginalIrql, &Irql); - for (SynchIrql = max(DISPATCH_LEVEL, OriginalIrql); SynchIrql <= HIGH_LEVEL; ++SynchIrql) - { - if (SynchIrql == 3 || (SynchIrql >= 11 && SynchIrql <= 26) || SynchIrql == 30) - continue; - Interrupt.SynchronizeIrql = SynchIrql; - ok_irql(OriginalIrql); - CheckSpinLock(Interrupt.ActualLock, FALSE); - TestContext.ExpectedIrql = SynchIrql; - Ret = KeSynchronizeExecution(&Interrupt, SynchronizeRoutine, &TestContext); - ok_eq_int(Ret, TestContext.ReturnValue); - ok_irql(OriginalIrql); - CheckSpinLock(Interrupt.ActualLock, FALSE); - /* TODO: Check that all other fields of the interrupt are untouched */ - } - KeLowerIrql(Irql); - } - } -} - -START_TEST(IoInterrupt) -{ - TestSynchronizeExecution(); -} diff --git a/rostests/kmtests/ntos_io/IoIrp.c b/rostests/kmtests/ntos_io/IoIrp.c deleted file mode 100644 index a96de5c62d5..00000000000 --- a/rostests/kmtests/ntos_io/IoIrp.c +++ /dev/null @@ -1,93 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: LGPLv2+ - See COPYING.LIB in the top level directory - * PURPOSE: Kernel-Mode Test Suite Io Regressions KM-Test (Irp) - * PROGRAMMER: Aleksey Bragin - */ -/* Based on code Copyright 2008 Etersoft (Alexander Morozov) */ - -#include - -#define NDEBUG -#include - -START_TEST(IoIrp) -{ - USHORT size; - IRP *iorp; - - // 1st test - size = sizeof(IRP) + 5 * sizeof(IO_STACK_LOCATION); - iorp = ExAllocatePool(NonPagedPool, size); - - if (NULL != iorp) - { - IoInitializeIrp(iorp, size, 5); - - ok(6 == iorp->Type, "Irp type should be 6, but got %d\n", iorp->Type); - ok(iorp->Size == size, "Irp size should be %d, but got %d\n", - iorp->Size, size); - ok(5 == iorp->StackCount, "Irp StackCount should be 5, but got %d\n", - iorp->StackCount); - ok(6 == iorp->CurrentLocation, "Irp CurrentLocation should be 6, but got %d\n", - iorp->CurrentLocation); - ok(IsListEmpty(&iorp->ThreadListEntry), "IRP thread list is not empty\n"); - ok ((PIO_STACK_LOCATION)(iorp + 1) + 5 == - iorp->Tail.Overlay.CurrentStackLocation, - "CurrentStackLocation mismatch\n"); - - ExFreePool(iorp); - } - - // 2nd test - size = sizeof(IRP) + 2 * sizeof(IO_STACK_LOCATION); - iorp = IoAllocateIrp(2, FALSE); - - if (NULL != iorp) - { - ok(6 == iorp->Type, "Irp type should be 6, but got %d\n", iorp->Type); - ok(iorp->Size >= size, - "Irp size should be more or equal to %d, but got %d\n", - iorp->Size, size); - ok(2 == iorp->StackCount, "Irp StackCount should be 2, but got %d\n", - iorp->StackCount); - ok(3 == iorp->CurrentLocation, "Irp CurrentLocation should be 3, but got %d\n", - iorp->CurrentLocation); - ok(IsListEmpty(&iorp->ThreadListEntry), "IRP thread list is not empty\n"); - ok ((PIO_STACK_LOCATION)(iorp + 1) + 2 == - iorp->Tail.Overlay.CurrentStackLocation, - "CurrentStackLocation mismatch\n"); - ok((IRP_ALLOCATED_FIXED_SIZE & iorp->AllocationFlags), - "IRP Allocation flags lack fixed size attribute\n"); - ok(!(IRP_LOOKASIDE_ALLOCATION & iorp->AllocationFlags), - "IRP Allocation flags should not have lookaside allocation\n"); - - IoFreeIrp(iorp); - } - - // 3rd test - size = sizeof(IRP) + 2 * sizeof(IO_STACK_LOCATION); - iorp = IoAllocateIrp(2, TRUE); - - if (NULL != iorp) - { - ok(6 == iorp->Type, "Irp type should be 6, but got %d\n", iorp->Type); - ok(iorp->Size >= size, - "Irp size should be more or equal to %d, but got %d\n", - iorp->Size, size); - ok(2 == iorp->StackCount, "Irp StackCount should be 2, but got %d\n", - iorp->StackCount); - ok(3 == iorp->CurrentLocation, "Irp CurrentLocation should be 3, but got %d\n", - iorp->CurrentLocation); - ok(IsListEmpty(&iorp->ThreadListEntry), "IRP thread list is not empty\n"); - ok ((PIO_STACK_LOCATION)(iorp + 1) + 2 == - iorp->Tail.Overlay.CurrentStackLocation, - "CurrentStackLocation mismatch\n"); - ok((IRP_ALLOCATED_FIXED_SIZE & iorp->AllocationFlags), - "IRP Allocation flags lack fixed size attribute\n"); - ok((IRP_LOOKASIDE_ALLOCATION & iorp->AllocationFlags), - "IRP Allocation flags lack lookaside allocation\n"); - - IoFreeIrp(iorp); - } -} diff --git a/rostests/kmtests/ntos_io/IoMdl.c b/rostests/kmtests/ntos_io/IoMdl.c deleted file mode 100644 index 898761cfac4..00000000000 --- a/rostests/kmtests/ntos_io/IoMdl.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: LGPLv2+ - See COPYING.LIB in the top level directory - * PURPOSE: Kernel-Mode Test Suite Io Regressions KM-Test (Mdl) - * PROGRAMMER: Aleksey Bragin - */ - -#include - -#define NDEBUG -#include - -START_TEST(IoMdl) -{ - PMDL Mdl; - PIRP Irp; - PVOID VirtualAddress; - ULONG MdlSize = 2*4096+184; // 2 pages and some random value - - // Try to alloc 2Gb MDL - Mdl = IoAllocateMdl(NULL, 2048UL*0x100000, FALSE, FALSE, NULL); - - ok(Mdl == NULL, - "IoAllocateMdl should fail allocation of 2Gb or more, but got Mdl=0x%X", - (UINT_PTR)Mdl); - - if (Mdl) - IoFreeMdl(Mdl); - - // Now create a valid MDL - VirtualAddress = ExAllocatePool(NonPagedPool, MdlSize); - Mdl = IoAllocateMdl(VirtualAddress, MdlSize, FALSE, FALSE, NULL); - ok(Mdl != NULL, "Mdl allocation failed"); - // Check fields of the allocated struct - ok(Mdl->Next == NULL, "Mdl->Next should be NULL, but is 0x%X", - (UINT_PTR)Mdl->Next); - ok(Mdl->ByteCount == MdlSize, - "Mdl->ByteCount should be equal to MdlSize, but is 0x%X", - (UINT_PTR)Mdl->ByteCount); - // TODO: Check other fields of MDL struct - - IoFreeMdl(Mdl); - // Allocate now with pointer to an Irp - Irp = IoAllocateIrp(1, FALSE); - ok(Irp != NULL, "IRP allocation failed"); - Mdl = IoAllocateMdl(VirtualAddress, MdlSize, FALSE, FALSE, Irp); - ok(Mdl != NULL, "Mdl allocation failed"); - ok(Irp->MdlAddress == Mdl, "Irp->MdlAddress should be 0x%X, but is 0x%X", - (UINT_PTR)Mdl, (UINT_PTR)Irp->MdlAddress); - - IoFreeMdl(Mdl); - - // TODO: Check a case when SecondaryBuffer == TRUE - - IoFreeIrp(Irp); - ExFreePool(VirtualAddress); -} diff --git a/rostests/kmtests/ntos_io/iodeviceobject_drv.rbuild b/rostests/kmtests/ntos_io/iodeviceobject_drv.rbuild deleted file mode 100644 index 037d838b6ad..00000000000 --- a/rostests/kmtests/ntos_io/iodeviceobject_drv.rbuild +++ /dev/null @@ -1,14 +0,0 @@ - - include - ntoskrnl - hal - pseh - kmtest_printf - - IoDeviceObject_drv.c - - - kmtest_standalone.c - - - diff --git a/rostests/kmtests/ntos_io/iohelper_drv.rbuild b/rostests/kmtests/ntos_io/iohelper_drv.rbuild deleted file mode 100644 index 5d0b55438ad..00000000000 --- a/rostests/kmtests/ntos_io/iohelper_drv.rbuild +++ /dev/null @@ -1,14 +0,0 @@ - - include - ntoskrnl - hal - pseh - kmtest_printf - - IoHelper_drv.c - - - kmtest_standalone.c - - - diff --git a/rostests/kmtests/ntos_ke/KeApc.c b/rostests/kmtests/ntos_ke/KeApc.c deleted file mode 100644 index 3b00c53ea72..00000000000 --- a/rostests/kmtests/ntos_ke/KeApc.c +++ /dev/null @@ -1,193 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Asynchronous Procedure Call test - * PROGRAMMER: Thomas Faber - */ - -#include - -#define CheckApcs(KernelApcsDisabled, SpecialApcsDisabled, AllApcsDisabled, Irql) do \ -{ \ - ok_eq_bool(KeAreApcsDisabled(), KernelApcsDisabled || SpecialApcsDisabled); \ - ok_eq_int(Thread->KernelApcDisable, KernelApcsDisabled); \ - ok_eq_bool(KeAreAllApcsDisabled(), AllApcsDisabled); \ - ok_eq_int(Thread->SpecialApcDisable, SpecialApcsDisabled); \ - ok_irql(Irql); \ -} while (0) - -START_TEST(KeApc) -{ - KIRQL Irql; - PKTHREAD Thread = KeGetCurrentThread(); - - CheckApcs(0, 0, FALSE, PASSIVE_LEVEL); - - /* critical region */ - KeEnterCriticalRegion(); - CheckApcs(-1, 0, FALSE, PASSIVE_LEVEL); - KeEnterCriticalRegion(); - CheckApcs(-2, 0, FALSE, PASSIVE_LEVEL); - KeEnterCriticalRegion(); - CheckApcs(-3, 0, FALSE, PASSIVE_LEVEL); - KeLeaveCriticalRegion(); - CheckApcs(-2, 0, FALSE, PASSIVE_LEVEL); - KeLeaveCriticalRegion(); - CheckApcs(-1, 0, FALSE, PASSIVE_LEVEL); - KeLeaveCriticalRegion(); - CheckApcs(0, 0, FALSE, PASSIVE_LEVEL); - - /* guarded region */ - KeEnterGuardedRegion(); - CheckApcs(0, -1, TRUE, PASSIVE_LEVEL); - KeEnterGuardedRegion(); - CheckApcs(0, -2, TRUE, PASSIVE_LEVEL); - KeEnterGuardedRegion(); - CheckApcs(0, -3, TRUE, PASSIVE_LEVEL); - KeLeaveGuardedRegion(); - CheckApcs(0, -2, TRUE, PASSIVE_LEVEL); - KeLeaveGuardedRegion(); - CheckApcs(0, -1, TRUE, PASSIVE_LEVEL); - KeLeaveGuardedRegion(); - CheckApcs(0, 0, FALSE, PASSIVE_LEVEL); - - /* mix them */ - KeEnterGuardedRegion(); - CheckApcs(0, -1, TRUE, PASSIVE_LEVEL); - KeEnterCriticalRegion(); - CheckApcs(-1, -1, TRUE, PASSIVE_LEVEL); - KeLeaveCriticalRegion(); - CheckApcs(0, -1, TRUE, PASSIVE_LEVEL); - KeLeaveGuardedRegion(); - CheckApcs(0, 0, FALSE, PASSIVE_LEVEL); - - KeEnterCriticalRegion(); - CheckApcs(-1, 0, FALSE, PASSIVE_LEVEL); - KeEnterGuardedRegion(); - CheckApcs(-1, -1, TRUE, PASSIVE_LEVEL); - KeLeaveGuardedRegion(); - CheckApcs(-1, 0, FALSE, PASSIVE_LEVEL); - KeLeaveCriticalRegion(); - CheckApcs(0, 0, FALSE, PASSIVE_LEVEL); - - /* leave without entering */ - if (!KmtIsCheckedBuild) - { - KeLeaveCriticalRegion(); - CheckApcs(1, 0, FALSE, PASSIVE_LEVEL); - KeEnterCriticalRegion(); - CheckApcs(0, 0, FALSE, PASSIVE_LEVEL); - - KeLeaveGuardedRegion(); - CheckApcs(0, 1, TRUE, PASSIVE_LEVEL); - KeEnterGuardedRegion(); - CheckApcs(0, 0, FALSE, PASSIVE_LEVEL); - - KeLeaveCriticalRegion(); - CheckApcs(1, 0, FALSE, PASSIVE_LEVEL); - KeLeaveGuardedRegion(); - CheckApcs(1, 1, TRUE, PASSIVE_LEVEL); - KeEnterCriticalRegion(); - CheckApcs(0, 1, TRUE, PASSIVE_LEVEL); - KeEnterGuardedRegion(); - CheckApcs(0, 0, FALSE, PASSIVE_LEVEL); - } - - /* manually disable APCs */ - Thread->KernelApcDisable = -1; - CheckApcs(-1, 0, FALSE, PASSIVE_LEVEL); - Thread->SpecialApcDisable = -1; - CheckApcs(-1, -1, TRUE, PASSIVE_LEVEL); - Thread->KernelApcDisable = 0; - CheckApcs(0, -1, TRUE, PASSIVE_LEVEL); - Thread->SpecialApcDisable = 0; - CheckApcs(0, 0, FALSE, PASSIVE_LEVEL); - - /* raised irql - APC_LEVEL should disable APCs */ - KeRaiseIrql(APC_LEVEL, &Irql); - CheckApcs(0, 0, TRUE, APC_LEVEL); - KeLowerIrql(Irql); - CheckApcs(0, 0, FALSE, PASSIVE_LEVEL); - - /* KeAre*ApcsDisabled are documented to work up to DISPATCH_LEVEL... */ - KeRaiseIrql(DISPATCH_LEVEL, &Irql); - CheckApcs(0, 0, TRUE, DISPATCH_LEVEL); - KeLowerIrql(Irql); - CheckApcs(0, 0, FALSE, PASSIVE_LEVEL); - - /* ... but also work on higher levels! */ - KeRaiseIrql(HIGH_LEVEL, &Irql); - CheckApcs(0, 0, TRUE, HIGH_LEVEL); - KeLowerIrql(Irql); - CheckApcs(0, 0, FALSE, PASSIVE_LEVEL); - - /* now comes the crazy stuff */ - KeRaiseIrql(HIGH_LEVEL, &Irql); - CheckApcs(0, 0, TRUE, HIGH_LEVEL); - KeEnterCriticalRegion(); - CheckApcs(-1, 0, TRUE, HIGH_LEVEL); - KeLeaveCriticalRegion(); - CheckApcs(0, 0, TRUE, HIGH_LEVEL); - - /* Ke*GuardedRegion assert at > APC_LEVEL */ - if (!KmtIsCheckedBuild) - { - KeEnterGuardedRegion(); - CheckApcs(0, -1, TRUE, HIGH_LEVEL); - KeLeaveGuardedRegion(); - } - CheckApcs(0, 0, TRUE, HIGH_LEVEL); - KeLowerIrql(Irql); - CheckApcs(0, 0, FALSE, PASSIVE_LEVEL); - - if (!KmtIsCheckedBuild) - { - KeRaiseIrql(HIGH_LEVEL, &Irql); - CheckApcs(0, 0, TRUE, HIGH_LEVEL); - KeEnterCriticalRegion(); - CheckApcs(-1, 0, TRUE, HIGH_LEVEL); - KeEnterGuardedRegion(); - CheckApcs(-1, -1, TRUE, HIGH_LEVEL); - KeLowerIrql(Irql); - CheckApcs(-1, -1, TRUE, PASSIVE_LEVEL); - KeLeaveCriticalRegion(); - CheckApcs(0, -1, TRUE, PASSIVE_LEVEL); - KeLeaveGuardedRegion(); - CheckApcs(0, 0, FALSE, PASSIVE_LEVEL); - - KeEnterGuardedRegion(); - CheckApcs(0, -1, TRUE, PASSIVE_LEVEL); - KeRaiseIrql(HIGH_LEVEL, &Irql); - CheckApcs(0, -1, TRUE, HIGH_LEVEL); - KeEnterCriticalRegion(); - CheckApcs(-1, -1, TRUE, HIGH_LEVEL); - KeLeaveGuardedRegion(); - CheckApcs(-1, 0, TRUE, HIGH_LEVEL); - KeLowerIrql(Irql); - CheckApcs(-1, 0, FALSE, PASSIVE_LEVEL); - KeLeaveCriticalRegion(); - CheckApcs(0, 0, FALSE, PASSIVE_LEVEL); - - KeEnterCriticalRegion(); - CheckApcs(-1, 0, FALSE, PASSIVE_LEVEL); - KeRaiseIrql(HIGH_LEVEL, &Irql); - CheckApcs(-1, 0, TRUE, HIGH_LEVEL); - KeEnterGuardedRegion(); - CheckApcs(-1, -1, TRUE, HIGH_LEVEL); - KeLeaveCriticalRegion(); - CheckApcs(0, -1, TRUE, HIGH_LEVEL); - KeLowerIrql(Irql); - CheckApcs(0, -1, TRUE, PASSIVE_LEVEL); - KeLeaveGuardedRegion(); - CheckApcs(0, 0, FALSE, PASSIVE_LEVEL); - } - - KeEnterCriticalRegion(); - CheckApcs(-1, 0, FALSE, PASSIVE_LEVEL); - KeRaiseIrql(HIGH_LEVEL, &Irql); - CheckApcs(-1, 0, TRUE, HIGH_LEVEL); - KeLeaveCriticalRegion(); - CheckApcs(0, 0, TRUE, HIGH_LEVEL); - KeLowerIrql(Irql); - CheckApcs(0, 0, FALSE, PASSIVE_LEVEL); -} diff --git a/rostests/kmtests/ntos_ke/KeDpc.c b/rostests/kmtests/ntos_ke/KeDpc.c deleted file mode 100644 index b52c0dbe280..00000000000 --- a/rostests/kmtests/ntos_ke/KeDpc.c +++ /dev/null @@ -1,181 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Deferred Procedure Call test - * PROGRAMMER: Thomas Faber - */ - -#include - -//#define NDEBUG -#include - -/* TODO: DPC importance */ - -static volatile LONG DpcCount; -static volatile UCHAR DpcImportance; - -static KDEFERRED_ROUTINE DpcHandler; - -static -VOID -NTAPI -DpcHandler( - IN PRKDPC Dpc, - IN PVOID DeferredContext, - IN PVOID SystemArgument1, - IN PVOID SystemArgument2) -{ - PKPRCB Prcb = KeGetCurrentPrcb(); - - ok_irql(DISPATCH_LEVEL); - InterlockedIncrement(&DpcCount); - ok(DeferredContext == Dpc, "DeferredContext = %p, Dpc = %p, expected equal\n", DeferredContext, Dpc); - ok_eq_pointer(SystemArgument1, (PVOID)0xabc123); - ok_eq_pointer(SystemArgument2, (PVOID)0x5678); - - /* KDPC object contents */ - ok_eq_uint(Dpc->Type, DpcObject); - ok_eq_uint(Dpc->Importance, DpcImportance); - ok_eq_uint(Dpc->Number, 0); - ok(Dpc->DpcListEntry.Blink != NULL, "\n"); - ok(Dpc->DpcListEntry.Blink != &Dpc->DpcListEntry, "\n"); - if (!skip(Dpc->DpcListEntry.Blink != NULL, "DpcListEntry.Blink == NULL\n")) - ok_eq_pointer(Dpc->DpcListEntry.Flink, Dpc->DpcListEntry.Blink->Flink); - - ok(Dpc->DpcListEntry.Flink != NULL, "\n"); - ok(Dpc->DpcListEntry.Flink != &Dpc->DpcListEntry, "\n"); - if (!skip(Dpc->DpcListEntry.Flink != NULL, "DpcListEntry.Flink == NULL\n")) - ok_eq_pointer(Dpc->DpcListEntry.Blink, Dpc->DpcListEntry.Flink->Blink); - - ok_eq_pointer(Dpc->DeferredRoutine, DpcHandler); - ok_eq_pointer(Dpc->DeferredContext, DeferredContext); - ok_eq_pointer(Dpc->SystemArgument1, SystemArgument1); - ok_eq_pointer(Dpc->SystemArgument2, SystemArgument2); - ok_eq_pointer(Dpc->DpcData, NULL); - - ok_eq_uint(Prcb->DpcRoutineActive, 1); - /* this DPC is not in the list anymore, but it was at the head! */ - ok_eq_pointer(Prcb->DpcData[DPC_NORMAL].DpcListHead.Flink, Dpc->DpcListEntry.Flink); - ok_eq_pointer(Prcb->DpcData[DPC_NORMAL].DpcListHead.Blink, Dpc->DpcListEntry.Blink); -} - -START_TEST(KeDpc) -{ - NTSTATUS Status = STATUS_SUCCESS; - KDPC Dpc; - KIRQL Irql, Irql2, Irql3; - LONG ExpectedDpcCount = 0; - BOOLEAN Ret; - int i; - - DpcCount = 0; - DpcImportance = MediumImportance; - -#define ok_dpccount() ok(DpcCount == ExpectedDpcCount, "DpcCount = %ld, expected %ld\n", DpcCount, ExpectedDpcCount); - trace("Dpc = %p\n", &Dpc); - memset(&Dpc, 0x55, sizeof Dpc); - KeInitializeDpc(&Dpc, DpcHandler, &Dpc); - /* check the Dpc object's fields */ - ok_eq_uint(Dpc.Type, DpcObject); - ok_eq_uint(Dpc.Importance, DpcImportance); - ok_eq_uint(Dpc.Number, 0); - ok_eq_pointer(Dpc.DpcListEntry.Flink, (LIST_ENTRY *)0x5555555555555555LL); - ok_eq_pointer(Dpc.DpcListEntry.Blink, (LIST_ENTRY *)0x5555555555555555LL); - ok_eq_pointer(Dpc.DeferredRoutine, DpcHandler); - ok_eq_pointer(Dpc.DeferredContext, &Dpc); - ok_eq_pointer(Dpc.SystemArgument1, (PVOID)0x5555555555555555LL); - ok_eq_pointer(Dpc.SystemArgument2, (PVOID)0x5555555555555555LL); - ok_eq_pointer(Dpc.DpcData, NULL); - - /* simply run the Dpc a few times */ - for (i = 0; i < 5; ++i) - { - ok_dpccount(); - Ret = KeInsertQueueDpc(&Dpc, (PVOID)0xabc123, (PVOID)0x5678); - ok_bool_true(Ret, "KeInsertQueueDpc returned"); - ++ExpectedDpcCount; - ok_dpccount(); - } - - /* insert into queue at high irql - * -> should only run when lowered to APC_LEVEL, - * inserting a second time should fail - */ - KeRaiseIrql(APC_LEVEL, &Irql); - for (i = 0; i < 5; ++i) - { - KeRaiseIrql(DISPATCH_LEVEL, &Irql2); - ok_dpccount(); - Ret = KeInsertQueueDpc(&Dpc, (PVOID)0xabc123, (PVOID)0x5678); - ok_bool_true(Ret, "KeInsertQueueDpc returned"); - Ret = KeInsertQueueDpc(&Dpc, (PVOID)0xdef, (PVOID)0x123); - ok_bool_false(Ret, "KeInsertQueueDpc returned"); - ok_dpccount(); - KeRaiseIrql(HIGH_LEVEL, &Irql3); - ok_dpccount(); - KeLowerIrql(Irql3); - ok_dpccount(); - KeLowerIrql(Irql2); - ++ExpectedDpcCount; - ok_dpccount(); - } - KeLowerIrql(Irql); - - /* now test removing from the queue */ - KeRaiseIrql(APC_LEVEL, &Irql); - for (i = 0; i < 5; ++i) - { - KeRaiseIrql(DISPATCH_LEVEL, &Irql2); - ok_dpccount(); - Ret = KeRemoveQueueDpc(&Dpc); - ok_bool_false(Ret, "KeRemoveQueueDpc returned"); - Ret = KeInsertQueueDpc(&Dpc, (PVOID)0xabc123, (PVOID)0x5678); - ok_bool_true(Ret, "KeInsertQueueDpc returned"); - ok_dpccount(); - KeRaiseIrql(HIGH_LEVEL, &Irql3); - ok_dpccount(); - KeLowerIrql(Irql3); - ok_dpccount(); - Ret = KeRemoveQueueDpc(&Dpc); - ok_bool_true(Ret, "KeRemoveQueueDpc returned"); - KeLowerIrql(Irql2); - ok_dpccount(); - } - KeLowerIrql(Irql); - - /* parameter checks */ - Status = STATUS_SUCCESS; - _SEH2_TRY { - KeInitializeDpc(&Dpc, NULL, NULL); - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - Status = _SEH2_GetExceptionCode(); - } _SEH2_END; - ok_eq_hex(Status, STATUS_SUCCESS); - - if (!skip(Status == STATUS_SUCCESS, "KeInitializeDpc failed\n")) - { - KeRaiseIrql(HIGH_LEVEL, &Irql); - Ret = KeInsertQueueDpc(&Dpc, NULL, NULL); - ok_bool_true(Ret, "KeInsertQueueDpc returned"); - Ret = KeRemoveQueueDpc(&Dpc); - ok_bool_true(Ret, "KeRemoveQueueDpc returned"); - KeLowerIrql(Irql); - } - - Status = STATUS_SUCCESS; - _SEH2_TRY { - KeInitializeDpc(NULL, NULL, NULL); - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - Status = _SEH2_GetExceptionCode(); - } _SEH2_END; - ok_eq_hex(Status, STATUS_ACCESS_VIOLATION); - - /* These result in IRQL_NOT_LESS_OR_EQUAL on 2k3 -- IRQLs 0x1f and 0xff (?) - Ret = KeInsertQueueDpc(NULL, NULL, NULL); - Ret = KeRemoveQueueDpc(NULL);*/ - - ok_dpccount(); - ok_irql(PASSIVE_LEVEL); - trace("Final Dpc count: %ld, expected %ld\n", DpcCount, ExpectedDpcCount); -} diff --git a/rostests/kmtests/ntos_ke/KeEvent.c b/rostests/kmtests/ntos_ke/KeEvent.c deleted file mode 100644 index 2446ef6190c..00000000000 --- a/rostests/kmtests/ntos_ke/KeEvent.c +++ /dev/null @@ -1,267 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Event test - * PROGRAMMER: Thomas Faber - */ - -#include - -/* TODO: why does GCC have 3 tests less than MSVC?! */ - -#define CheckEvent(Event, ExpectedType, State, ExpectedWaitNext, \ - Irql, ThreadList, ThreadCount) do \ -{ \ - INT TheIndex; \ - PLIST_ENTRY TheEntry; \ - PKTHREAD TheThread; \ - ok_eq_uint((Event)->Header.Type, ExpectedType); \ - ok_eq_uint((Event)->Header.Hand, sizeof *(Event) / sizeof(ULONG)); \ - ok_eq_hex((Event)->Header.Lock & 0xFF00FF00L, 0x55005500L); \ - ok_eq_long((Event)->Header.SignalState, State); \ - TheEntry = (Event)->Header.WaitListHead.Flink; \ - for (TheIndex = 0; TheIndex < (ThreadCount); ++TheIndex) \ - { \ - TheThread = CONTAINING_RECORD(TheEntry, KTHREAD, \ - WaitBlock[0].WaitListEntry); \ - ok_eq_pointer(TheThread, (ThreadList)[TheIndex]); \ - ok_eq_pointer(TheEntry->Flink->Blink, TheEntry); \ - TheEntry = TheEntry->Flink; \ - } \ - ok_eq_pointer(TheEntry, &(Event)->Header.WaitListHead); \ - ok_eq_pointer(TheEntry->Flink->Blink, TheEntry); \ - ok_eq_long(KeReadStateEvent(Event), State); \ - ok_eq_bool(Thread->WaitNext, ExpectedWaitNext); \ - ok_irql(Irql); \ -} while (0) - -static -VOID -TestEventFunctional( - IN PKEVENT Event, - IN EVENT_TYPE Type, - IN KIRQL OriginalIrql) -{ - LONG State; - PKTHREAD Thread = KeGetCurrentThread(); - - memset(Event, 0x55, sizeof *Event); - KeInitializeEvent(Event, Type, FALSE); - CheckEvent(Event, Type, 0L, FALSE, OriginalIrql, (PVOID *)NULL, 0); - - memset(Event, 0x55, sizeof *Event); - KeInitializeEvent(Event, Type, TRUE); - CheckEvent(Event, Type, 1L, FALSE, OriginalIrql, (PVOID *)NULL, 0); - - Event->Header.SignalState = 0x12345678L; - CheckEvent(Event, Type, 0x12345678L, FALSE, OriginalIrql, (PVOID *)NULL, 0); - - State = KePulseEvent(Event, 0, FALSE); - CheckEvent(Event, Type, 0L, FALSE, OriginalIrql, (PVOID *)NULL, 0); - ok_eq_long(State, 0x12345678L); - - Event->Header.SignalState = 0x12345678L; - KeClearEvent(Event); - CheckEvent(Event, Type, 0L, FALSE, OriginalIrql, (PVOID *)NULL, 0); - - State = KeSetEvent(Event, 0, FALSE); - CheckEvent(Event, Type, 1L, FALSE, OriginalIrql, (PVOID *)NULL, 0); - ok_eq_long(State, 0L); - - State = KeResetEvent(Event); - CheckEvent(Event, Type, 0L, FALSE, OriginalIrql, (PVOID *)NULL, 0); - ok_eq_long(State, 1L); - - Event->Header.SignalState = 0x23456789L; - State = KeSetEvent(Event, 0, FALSE); - CheckEvent(Event, Type, 1L, FALSE, OriginalIrql, (PVOID *)NULL, 0); - ok_eq_long(State, 0x23456789L); - - Event->Header.SignalState = 0x3456789AL; - State = KeResetEvent(Event); - CheckEvent(Event, Type, 0L, FALSE, OriginalIrql, (PVOID *)NULL, 0); - ok_eq_long(State, 0x3456789AL); - - /* Irql is raised to DISPATCH_LEVEL here, which kills checked build, - * a spinlock is acquired and never released, which kills MP build */ - if ((OriginalIrql <= DISPATCH_LEVEL || !KmtIsCheckedBuild) && - !KmtIsMultiProcessorBuild) - { - Event->Header.SignalState = 0x456789ABL; - State = KeSetEvent(Event, 0, TRUE); - CheckEvent(Event, Type, 1L, TRUE, DISPATCH_LEVEL, (PVOID *)NULL, 0); - ok_eq_long(State, 0x456789ABL); - ok_eq_uint(Thread->WaitIrql, OriginalIrql); - /* repair the "damage" */ - Thread->WaitNext = FALSE; - KmtSetIrql(OriginalIrql); - - Event->Header.SignalState = 0x56789ABCL; - State = KePulseEvent(Event, 0, TRUE); - CheckEvent(Event, Type, 0L, TRUE, DISPATCH_LEVEL, (PVOID *)NULL, 0); - ok_eq_long(State, 0x56789ABCL); - ok_eq_uint(Thread->WaitIrql, OriginalIrql); - /* repair the "damage" */ - Thread->WaitNext = FALSE; - KmtSetIrql(OriginalIrql); - } - - ok_irql(OriginalIrql); - KmtSetIrql(OriginalIrql); -} - -typedef struct -{ - HANDLE Handle; - PKTHREAD Thread; - PKEVENT Event; - volatile BOOLEAN Signal; -} THREAD_DATA, *PTHREAD_DATA; - -static -VOID -NTAPI -WaitForEventThread( - IN OUT PVOID Context) -{ - NTSTATUS Status; - PTHREAD_DATA ThreadData = Context; - - ok_irql(PASSIVE_LEVEL); - ThreadData->Signal = TRUE; - Status = KeWaitForSingleObject(ThreadData->Event, Executive, KernelMode, FALSE, NULL); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_irql(PASSIVE_LEVEL); -} - -typedef LONG (NTAPI *PSET_EVENT_FUNCTION)(PRKEVENT, KPRIORITY, BOOLEAN); - -static -VOID -TestEventConcurrent( - IN PKEVENT Event, - IN EVENT_TYPE Type, - IN KIRQL OriginalIrql, - PSET_EVENT_FUNCTION SetEvent, - KPRIORITY PriorityIncrement, - LONG ExpectedState, - BOOLEAN SatisfiesAll) -{ - NTSTATUS Status; - THREAD_DATA Threads[5]; - const INT ThreadCount = sizeof Threads / sizeof Threads[0]; - KPRIORITY Priority; - LARGE_INTEGER LongTimeout, ShortTimeout; - INT i; - KWAIT_BLOCK WaitBlock[MAXIMUM_WAIT_OBJECTS]; - PVOID ThreadObjects[MAXIMUM_WAIT_OBJECTS]; - LONG State; - PKTHREAD Thread = KeGetCurrentThread(); - - LongTimeout.QuadPart = -100 * MILLISECOND; - ShortTimeout.QuadPart = -1 * MILLISECOND; - - KeInitializeEvent(Event, Type, FALSE); - - for (i = 0; i < ThreadCount; ++i) - { - Threads[i].Event = Event; - Threads[i].Signal = FALSE; - Status = PsCreateSystemThread(&Threads[i].Handle, GENERIC_ALL, NULL, NULL, NULL, WaitForEventThread, &Threads[i]); - ok_eq_hex(Status, STATUS_SUCCESS); - Status = ObReferenceObjectByHandle(Threads[i].Handle, SYNCHRONIZE, PsThreadType, KernelMode, (PVOID *)&Threads[i].Thread, NULL); - ok_eq_hex(Status, STATUS_SUCCESS); - ThreadObjects[i] = Threads[i].Thread; - Priority = KeQueryPriorityThread(Threads[i].Thread); - ok_eq_long(Priority, 8L); - while (!Threads[i].Signal) - { - Status = KeDelayExecutionThread(KernelMode, FALSE, &ShortTimeout); - ok_eq_hex(Status, STATUS_SUCCESS); - } - CheckEvent(Event, Type, 0L, FALSE, OriginalIrql, ThreadObjects, i + 1); - } - - /* the threads shouldn't wake up on their own */ - Status = KeDelayExecutionThread(KernelMode, FALSE, &ShortTimeout); - ok_eq_hex(Status, STATUS_SUCCESS); - - for (i = 0; i < ThreadCount; ++i) - { - CheckEvent(Event, Type, 0L, FALSE, OriginalIrql, ThreadObjects + i, ThreadCount - i); - State = SetEvent(Event, PriorityIncrement + i, FALSE); - - ok_eq_long(State, 0L); - CheckEvent(Event, Type, ExpectedState, FALSE, OriginalIrql, ThreadObjects + i + 1, SatisfiesAll ? 0 : ThreadCount - i - 1); - Status = KeWaitForMultipleObjects(ThreadCount, ThreadObjects, SatisfiesAll ? WaitAll : WaitAny, Executive, KernelMode, FALSE, &LongTimeout, WaitBlock); - ok_eq_hex(Status, STATUS_WAIT_0 + i); - if (SatisfiesAll) - { - for (; i < ThreadCount; ++i) - { - Priority = KeQueryPriorityThread(Threads[i].Thread); - ok_eq_long(Priority, max(min(8L + PriorityIncrement, 15L), 8L)); - } - break; - } - Priority = KeQueryPriorityThread(Threads[i].Thread); - ok_eq_long(Priority, max(min(8L + PriorityIncrement + i, 15L), 8L)); - /* replace the thread with the current thread - which will never signal */ - if (!skip((Status & 0x3F) < ThreadCount, "Index out of bounds")) - ThreadObjects[Status & 0x3F] = Thread; - Status = KeWaitForMultipleObjects(ThreadCount, ThreadObjects, WaitAny, Executive, KernelMode, FALSE, &ShortTimeout, WaitBlock); - ok_eq_hex(Status, STATUS_TIMEOUT); - } - - for (i = 0; i < ThreadCount; ++i) - { - ObDereferenceObject(Threads[i].Thread); - Status = ZwClose(Threads[i].Handle); - ok_eq_hex(Status, STATUS_SUCCESS); - } -} - -START_TEST(KeEvent) -{ - KEVENT Event; - KIRQL Irql; - KIRQL Irqls[] = { PASSIVE_LEVEL, APC_LEVEL, DISPATCH_LEVEL, HIGH_LEVEL }; - INT i; - KPRIORITY PriorityIncrement; - - for (i = 0; i < sizeof Irqls / sizeof Irqls[0]; ++i) - { - /* DRIVER_IRQL_NOT_LESS_OR_EQUAL (TODO: on MP only?) */ - if (Irqls[i] > DISPATCH_LEVEL && KmtIsCheckedBuild) - return; - KeRaiseIrql(Irqls[i], &Irql); - TestEventFunctional(&Event, NotificationEvent, Irqls[i]); - TestEventFunctional(&Event, SynchronizationEvent, Irqls[i]); - KeLowerIrql(Irql); - } - - for (i = 0; i < sizeof Irqls / sizeof Irqls[0]; ++i) - { - /* creating threads above DISPATCH_LEVEL... nope */ - if (Irqls[i] >= DISPATCH_LEVEL && KmtIsCheckedBuild) - continue; - KeRaiseIrql(Irqls[i], &Irql); - trace("IRQL: %u\n", Irqls[i]); - for (PriorityIncrement = -1; PriorityIncrement <= 8; ++PriorityIncrement) - { - trace("PriorityIncrement: %ld\n", PriorityIncrement); - trace("-> Checking KeSetEvent, NotificationEvent\n"); - TestEventConcurrent(&Event, NotificationEvent, Irqls[i], KeSetEvent, PriorityIncrement, 1, TRUE); - trace("-> Checking KeSetEvent, SynchronizationEvent\n"); - TestEventConcurrent(&Event, SynchronizationEvent, Irqls[i], KeSetEvent, PriorityIncrement, 0, FALSE); - trace("-> Checking KePulseEvent, NotificationEvent\n"); - TestEventConcurrent(&Event, NotificationEvent, Irqls[i], KePulseEvent, PriorityIncrement, 0, TRUE); - trace("-> Checking KePulseEvent, SynchronizationEvent\n"); - TestEventConcurrent(&Event, SynchronizationEvent, Irqls[i], KePulseEvent, PriorityIncrement, 0, FALSE); - } - KeLowerIrql(Irql); - } - - ok_irql(PASSIVE_LEVEL); - KmtSetIrql(PASSIVE_LEVEL); -} diff --git a/rostests/kmtests/ntos_ke/KeGuardedMutex.c b/rostests/kmtests/ntos_ke/KeGuardedMutex.c deleted file mode 100644 index 6f4101e63b9..00000000000 --- a/rostests/kmtests/ntos_ke/KeGuardedMutex.c +++ /dev/null @@ -1,361 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Guarded Mutex test - * PROGRAMMER: Thomas Faber - */ - -#include - -#define NDEBUG -#include - -#define CheckMutex(Mutex, ExpectedCount, ExpectedOwner, ExpectedContention, \ - ExpectedKernelApcDisable, ExpectedSpecialApcDisable, \ - KernelApcsDisabled, SpecialApcsDisabled, AllApcsDisabled, \ - ExpectedIrql) do \ -{ \ - ok_eq_long((Mutex)->Count, ExpectedCount); \ - ok_eq_pointer((Mutex)->Owner, ExpectedOwner); \ - ok_eq_ulong((Mutex)->Contention, ExpectedContention); \ - ok_eq_int((Mutex)->KernelApcDisable, ExpectedKernelApcDisable); \ - if (KmtIsCheckedBuild) \ - ok_eq_int((Mutex)->SpecialApcDisable, ExpectedSpecialApcDisable); \ - else \ - ok_eq_int((Mutex)->SpecialApcDisable, 0x5555); \ - ok_eq_bool(KeAreApcsDisabled(), KernelApcsDisabled || SpecialApcsDisabled); \ - ok_eq_int(Thread->KernelApcDisable, KernelApcsDisabled); \ - ok_eq_bool(KeAreAllApcsDisabled(), AllApcsDisabled); \ - ok_eq_int(Thread->SpecialApcDisable, SpecialApcsDisabled); \ - ok_irql(ExpectedIrql); \ -} while (0) - -static -VOID -TestGuardedMutex( - PKGUARDED_MUTEX Mutex, - SHORT KernelApcsDisabled, - SHORT SpecialApcsDisabled, - SHORT AllApcsDisabled, - KIRQL OriginalIrql) -{ - PKTHREAD Thread = KeGetCurrentThread(); - - ok_irql(OriginalIrql); - CheckMutex(Mutex, 1L, NULL, 0LU, 0x5555, 0x5555, KernelApcsDisabled, SpecialApcsDisabled, AllApcsDisabled, OriginalIrql); - - /* these ASSERT */ - if (!KmtIsCheckedBuild || OriginalIrql <= APC_LEVEL) - { - /* acquire/release normally */ - KeAcquireGuardedMutex(Mutex); - CheckMutex(Mutex, 0L, Thread, 0LU, 0x5555, SpecialApcsDisabled - 1, KernelApcsDisabled, SpecialApcsDisabled - 1, TRUE, OriginalIrql); - ok_bool_false(KeTryToAcquireGuardedMutex(Mutex), "KeTryToAcquireGuardedMutex returned"); - CheckMutex(Mutex, 0L, Thread, 0LU, 0x5555, SpecialApcsDisabled - 1, KernelApcsDisabled, SpecialApcsDisabled - 1, TRUE, OriginalIrql); - KeReleaseGuardedMutex(Mutex); - CheckMutex(Mutex, 1L, NULL, 0LU, 0x5555, SpecialApcsDisabled - 1, KernelApcsDisabled, SpecialApcsDisabled, AllApcsDisabled, OriginalIrql); - - /* try to acquire */ - ok_bool_true(KeTryToAcquireGuardedMutex(Mutex), "KeTryToAcquireGuardedMutex returned"); - CheckMutex(Mutex, 0L, Thread, 0LU, 0x5555, SpecialApcsDisabled - 1, KernelApcsDisabled, SpecialApcsDisabled - 1, TRUE, OriginalIrql); - KeReleaseGuardedMutex(Mutex); - CheckMutex(Mutex, 1L, NULL, 0LU, 0x5555, SpecialApcsDisabled - 1, KernelApcsDisabled, SpecialApcsDisabled, AllApcsDisabled, OriginalIrql); - } - else - /* Make the following test happy */ - Mutex->SpecialApcDisable = SpecialApcsDisabled - 1; - - /* ASSERT */ - if (!KmtIsCheckedBuild || OriginalIrql == APC_LEVEL || SpecialApcsDisabled < 0) - { - /* acquire/release unsafe */ - KeAcquireGuardedMutexUnsafe(Mutex); - CheckMutex(Mutex, 0L, Thread, 0LU, 0x5555, SpecialApcsDisabled - 1, KernelApcsDisabled, SpecialApcsDisabled, AllApcsDisabled, OriginalIrql); - KeReleaseGuardedMutexUnsafe(Mutex); - CheckMutex(Mutex, 1L, NULL, 0LU, 0x5555, SpecialApcsDisabled - 1, KernelApcsDisabled, SpecialApcsDisabled, AllApcsDisabled, OriginalIrql); - } - - /* Bugchecks >= DISPATCH_LEVEL */ - if (!KmtIsCheckedBuild) - { - /* mismatched acquire/release */ - KeAcquireGuardedMutex(Mutex); - CheckMutex(Mutex, 0L, Thread, 0LU, 0x5555, SpecialApcsDisabled - 1, KernelApcsDisabled, SpecialApcsDisabled - 1, TRUE, OriginalIrql); - KeReleaseGuardedMutexUnsafe(Mutex); - CheckMutex(Mutex, 1L, NULL, 0LU, 0x5555, SpecialApcsDisabled - 1, KernelApcsDisabled, SpecialApcsDisabled - 1, TRUE, OriginalIrql); - KeLeaveGuardedRegion(); - CheckMutex(Mutex, 1L, NULL, 0LU, 0x5555, SpecialApcsDisabled - 1, KernelApcsDisabled, SpecialApcsDisabled, AllApcsDisabled, OriginalIrql); - - KeAcquireGuardedMutexUnsafe(Mutex); - CheckMutex(Mutex, 0L, Thread, 0LU, 0x5555, SpecialApcsDisabled - 1, KernelApcsDisabled, SpecialApcsDisabled, AllApcsDisabled, OriginalIrql); - KeReleaseGuardedMutex(Mutex); - CheckMutex(Mutex, 1L, NULL, 0LU, 0x5555, SpecialApcsDisabled - 1, KernelApcsDisabled, SpecialApcsDisabled + 1, OriginalIrql >= APC_LEVEL || SpecialApcsDisabled != -1, OriginalIrql); - KeEnterGuardedRegion(); - CheckMutex(Mutex, 1L, NULL, 0LU, 0x5555, SpecialApcsDisabled - 1, KernelApcsDisabled, SpecialApcsDisabled, AllApcsDisabled, OriginalIrql); - - /* release without acquire */ - KeReleaseGuardedMutexUnsafe(Mutex); - CheckMutex(Mutex, 0L, NULL, 0LU, 0x5555, SpecialApcsDisabled - 1, KernelApcsDisabled, SpecialApcsDisabled, AllApcsDisabled, OriginalIrql); - KeReleaseGuardedMutex(Mutex); - CheckMutex(Mutex, 1L, NULL, 0LU, 0x5555, SpecialApcsDisabled, KernelApcsDisabled, SpecialApcsDisabled + 1, OriginalIrql >= APC_LEVEL || SpecialApcsDisabled != -1, OriginalIrql); - KeReleaseGuardedMutex(Mutex); - /* TODO: here we see that Mutex->Count isn't actually just a count. Test the bits correctly! */ - CheckMutex(Mutex, 0L, NULL, 0LU, 0x5555, SpecialApcsDisabled, KernelApcsDisabled, SpecialApcsDisabled + 2, OriginalIrql >= APC_LEVEL || SpecialApcsDisabled != -2, OriginalIrql); - KeReleaseGuardedMutex(Mutex); - CheckMutex(Mutex, 1L, NULL, 0LU, 0x5555, SpecialApcsDisabled, KernelApcsDisabled, SpecialApcsDisabled + 3, OriginalIrql >= APC_LEVEL || SpecialApcsDisabled != -3, OriginalIrql); - Thread->SpecialApcDisable -= 3; - } - - /* make sure we survive this in case of error */ - ok_eq_long(Mutex->Count, 1L); - Mutex->Count = 1; - ok_eq_int(Thread->KernelApcDisable, KernelApcsDisabled); - Thread->KernelApcDisable = KernelApcsDisabled; - ok_eq_int(Thread->SpecialApcDisable, SpecialApcsDisabled); - Thread->SpecialApcDisable = SpecialApcsDisabled; - ok_irql(OriginalIrql); -} - -typedef VOID (FASTCALL *PMUTEX_FUNCTION)(PKGUARDED_MUTEX); -typedef BOOLEAN (FASTCALL *PMUTEX_TRY_FUNCTION)(PKGUARDED_MUTEX); - -typedef struct -{ - HANDLE Handle; - PKTHREAD Thread; - KIRQL Irql; - PKGUARDED_MUTEX Mutex; - PMUTEX_FUNCTION Acquire; - PMUTEX_TRY_FUNCTION TryAcquire; - PMUTEX_FUNCTION Release; - BOOLEAN Try; - BOOLEAN RetExpected; - KEVENT InEvent; - KEVENT OutEvent; -} THREAD_DATA, *PTHREAD_DATA; - -static -VOID -NTAPI -AcquireMutexThread( - PVOID Parameter) -{ - PTHREAD_DATA ThreadData = Parameter; - KIRQL Irql; - BOOLEAN Ret = FALSE; - NTSTATUS Status; - - DPRINT("Thread starting\n"); - KeRaiseIrql(ThreadData->Irql, &Irql); - - if (ThreadData->Try) - { - Ret = ThreadData->TryAcquire(ThreadData->Mutex); - ok_eq_bool(Ret, ThreadData->RetExpected); - } - else - ThreadData->Acquire(ThreadData->Mutex); - - ok_bool_false(KeSetEvent(&ThreadData->OutEvent, 0, TRUE), "KeSetEvent returned"); - DPRINT("Thread now waiting\n"); - Status = KeWaitForSingleObject(&ThreadData->InEvent, Executive, KernelMode, FALSE, NULL); - DPRINT("Thread done waiting\n"); - ok_eq_hex(Status, STATUS_SUCCESS); - - if (!ThreadData->Try || Ret) - ThreadData->Release(ThreadData->Mutex); - - KeLowerIrql(Irql); - DPRINT("Thread exiting\n"); -} - -static -VOID -InitThreadData( - PTHREAD_DATA ThreadData, - PKGUARDED_MUTEX Mutex, - PMUTEX_FUNCTION Acquire, - PMUTEX_TRY_FUNCTION TryAcquire, - PMUTEX_FUNCTION Release) -{ - ThreadData->Mutex = Mutex; - KeInitializeEvent(&ThreadData->InEvent, NotificationEvent, FALSE); - KeInitializeEvent(&ThreadData->OutEvent, NotificationEvent, FALSE); - ThreadData->Acquire = Acquire; - ThreadData->TryAcquire = TryAcquire; - ThreadData->Release = Release; -} - -static -NTSTATUS -StartThread( - PTHREAD_DATA ThreadData, - PLARGE_INTEGER Timeout, - KIRQL Irql, - BOOLEAN Try, - BOOLEAN RetExpected) -{ - NTSTATUS Status = STATUS_SUCCESS; - OBJECT_ATTRIBUTES Attributes; - - ThreadData->Try = Try; - ThreadData->Irql = Irql; - ThreadData->RetExpected = RetExpected; - InitializeObjectAttributes(&Attributes, NULL, OBJ_KERNEL_HANDLE, NULL, NULL); - Status = PsCreateSystemThread(&ThreadData->Handle, GENERIC_ALL, &Attributes, NULL, NULL, AcquireMutexThread, ThreadData); - ok_eq_hex(Status, STATUS_SUCCESS); - Status = ObReferenceObjectByHandle(ThreadData->Handle, SYNCHRONIZE, PsThreadType, KernelMode, (PVOID *)&ThreadData->Thread, NULL); - ok_eq_hex(Status, STATUS_SUCCESS); - - return KeWaitForSingleObject(&ThreadData->OutEvent, Executive, KernelMode, FALSE, Timeout); -} - -static -VOID -FinishThread( - PTHREAD_DATA ThreadData) -{ - NTSTATUS Status = STATUS_SUCCESS; - - KeSetEvent(&ThreadData->InEvent, 0, TRUE); - Status = KeWaitForSingleObject(ThreadData->Thread, Executive, KernelMode, FALSE, NULL); - ok_eq_hex(Status, STATUS_SUCCESS); - - ObDereferenceObject(ThreadData->Thread); - Status = ZwClose(ThreadData->Handle); - ok_eq_hex(Status, STATUS_SUCCESS); - KeClearEvent(&ThreadData->InEvent); - KeClearEvent(&ThreadData->OutEvent); -} - -static -VOID -TestGuardedMutexConcurrent( - PKGUARDED_MUTEX Mutex) -{ - NTSTATUS Status; - THREAD_DATA ThreadData; - THREAD_DATA ThreadData2; - THREAD_DATA ThreadDataUnsafe; - THREAD_DATA ThreadDataTry; - PKTHREAD Thread = KeGetCurrentThread(); - LARGE_INTEGER Timeout; - Timeout.QuadPart = -10 * 1000 * 10; /* 10 ms */ - - InitThreadData(&ThreadData, Mutex, KeAcquireGuardedMutex, NULL, KeReleaseGuardedMutex); - InitThreadData(&ThreadData2, Mutex, KeAcquireGuardedMutex, NULL, KeReleaseGuardedMutex); - InitThreadData(&ThreadDataUnsafe, Mutex, KeAcquireGuardedMutexUnsafe, NULL, KeReleaseGuardedMutexUnsafe); - InitThreadData(&ThreadDataTry, Mutex, NULL, KeTryToAcquireGuardedMutex, KeReleaseGuardedMutex); - - /* have a thread acquire the mutex */ - Status = StartThread(&ThreadData, NULL, PASSIVE_LEVEL, FALSE, FALSE); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckMutex(Mutex, 0L, ThreadData.Thread, 0LU, 0x5555, -1, 0, 0, FALSE, PASSIVE_LEVEL); - /* have a second thread try to acquire it -- should fail */ - Status = StartThread(&ThreadDataTry, NULL, PASSIVE_LEVEL, TRUE, FALSE); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckMutex(Mutex, 0L, ThreadData.Thread, 0LU, 0x5555, -1, 0, 0, FALSE, PASSIVE_LEVEL); - FinishThread(&ThreadDataTry); - - /* have another thread acquire it -- should block */ - Status = StartThread(&ThreadData2, &Timeout, APC_LEVEL, FALSE, FALSE); - ok_eq_hex(Status, STATUS_TIMEOUT); - CheckMutex(Mutex, 4L, ThreadData.Thread, 1LU, 0x5555, -1, 0, 0, FALSE, PASSIVE_LEVEL); - - /* finish the first thread -- now the second should become available */ - FinishThread(&ThreadData); - Status = KeWaitForSingleObject(&ThreadData2.OutEvent, Executive, KernelMode, FALSE, NULL); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckMutex(Mutex, 0L, ThreadData2.Thread, 1LU, 0x5555, -1, 0, 0, FALSE, PASSIVE_LEVEL); - - /* block two more threads */ - Status = StartThread(&ThreadDataUnsafe, &Timeout, APC_LEVEL, FALSE, FALSE); - ok_eq_hex(Status, STATUS_TIMEOUT); - CheckMutex(Mutex, 4L, ThreadData2.Thread, 2LU, 0x5555, -1, 0, 0, FALSE, PASSIVE_LEVEL); - - Status = StartThread(&ThreadData, &Timeout, PASSIVE_LEVEL, FALSE, FALSE); - ok_eq_hex(Status, STATUS_TIMEOUT); - CheckMutex(Mutex, 8L, ThreadData2.Thread, 3LU, 0x5555, -1, 0, 0, FALSE, PASSIVE_LEVEL); - - /* finish 1 */ - FinishThread(&ThreadData2); - Status = KeWaitForSingleObject(&ThreadDataUnsafe.OutEvent, Executive, KernelMode, FALSE, NULL); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckMutex(Mutex, 4L, ThreadDataUnsafe.Thread, 3LU, 0x5555, -1, 0, 0, FALSE, PASSIVE_LEVEL); - - /* finish 2 */ - FinishThread(&ThreadDataUnsafe); - Status = KeWaitForSingleObject(&ThreadData.OutEvent, Executive, KernelMode, FALSE, NULL); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckMutex(Mutex, 0L, ThreadData.Thread, 3LU, 0x5555, -1, 0, 0, FALSE, PASSIVE_LEVEL); - - /* finish 3 */ - FinishThread(&ThreadData); - - CheckMutex(Mutex, 1L, NULL, 3LU, 0x5555, -1, 0, 0, FALSE, PASSIVE_LEVEL); -} - -START_TEST(KeGuardedMutex) -{ - KGUARDED_MUTEX Mutex; - KIRQL OldIrql; - PKTHREAD Thread = KeGetCurrentThread(); - struct { - KIRQL Irql; - SHORT KernelApcsDisabled; - SHORT SpecialApcsDisabled; - BOOLEAN AllApcsDisabled; - } TestIterations[] = - { - { PASSIVE_LEVEL, 0, 0, FALSE }, - { PASSIVE_LEVEL, -1, 0, FALSE }, - { PASSIVE_LEVEL, -3, 0, FALSE }, - { PASSIVE_LEVEL, 0, -1, TRUE }, - { PASSIVE_LEVEL, -1, -1, TRUE }, - { PASSIVE_LEVEL, -3, -2, TRUE }, - // 6 - { APC_LEVEL, 0, 0, TRUE }, - { APC_LEVEL, -1, 0, TRUE }, - { APC_LEVEL, -3, 0, TRUE }, - { APC_LEVEL, 0, -1, TRUE }, - { APC_LEVEL, -1, -1, TRUE }, - { APC_LEVEL, -3, -2, TRUE }, - // 12 - { DISPATCH_LEVEL, 0, 0, TRUE }, - { DISPATCH_LEVEL, -1, 0, TRUE }, - { DISPATCH_LEVEL, -3, 0, TRUE }, - { DISPATCH_LEVEL, 0, -1, TRUE }, - { DISPATCH_LEVEL, -1, -1, TRUE }, - { DISPATCH_LEVEL, -3, -2, TRUE }, - // 18 - { HIGH_LEVEL, 0, 0, TRUE }, - { HIGH_LEVEL, -1, 0, TRUE }, - { HIGH_LEVEL, -3, 0, TRUE }, - { HIGH_LEVEL, 0, -1, TRUE }, - { HIGH_LEVEL, -1, -1, TRUE }, - { HIGH_LEVEL, -3, -2, TRUE }, - }; - int i; - - for (i = 0; i < sizeof TestIterations / sizeof TestIterations[0]; ++i) - { - trace("Run %d\n", i); - KeRaiseIrql(TestIterations[i].Irql, &OldIrql); - Thread->KernelApcDisable = TestIterations[i].KernelApcsDisabled; - Thread->SpecialApcDisable = TestIterations[i].SpecialApcsDisabled; - - RtlFillMemory(&Mutex, sizeof Mutex, 0x55); - KeInitializeGuardedMutex(&Mutex); - CheckMutex(&Mutex, 1L, NULL, 0LU, 0x5555, 0x5555, TestIterations[i].KernelApcsDisabled, TestIterations[i].SpecialApcsDisabled, TestIterations[i].AllApcsDisabled, TestIterations[i].Irql); - TestGuardedMutex(&Mutex, TestIterations[i].KernelApcsDisabled, TestIterations[i].SpecialApcsDisabled, TestIterations[i].AllApcsDisabled, TestIterations[i].Irql); - - Thread->SpecialApcDisable = 0; - Thread->KernelApcDisable = 0; - KeLowerIrql(OldIrql); - } - - trace("Concurrent test\n"); - RtlFillMemory(&Mutex, sizeof Mutex, 0x55); - KeInitializeGuardedMutex(&Mutex); - TestGuardedMutexConcurrent(&Mutex); -} diff --git a/rostests/kmtests/ntos_ke/KeIrql.c b/rostests/kmtests/ntos_ke/KeIrql.c deleted file mode 100644 index f601dcbe869..00000000000 --- a/rostests/kmtests/ntos_ke/KeIrql.c +++ /dev/null @@ -1,139 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Interrupt Request Level test - * PROGRAMMER: Thomas Faber - */ - -#ifndef _M_AMD64 -__declspec(dllimport) void __stdcall KeRaiseIrql(unsigned char, unsigned char *); -__declspec(dllimport) void __stdcall KeLowerIrql(unsigned char); -#else -#define CLOCK1_LEVEL CLOCK_LEVEL -#define CLOCK2_LEVEL CLOCK_LEVEL -#endif - -#include - -#define NDEBUG -#include - -START_TEST(KeIrql) -{ - KIRQL Irql, Irql2, PrevIrql, SynchIrql; - - /* we should be called at PASSIVE_LEVEL */ - ok_irql(PASSIVE_LEVEL); - - PrevIrql = KeGetCurrentIrql(); - - /* SYNCH_LEVEL is different for UP/MP */ - if (KmtIsMultiProcessorBuild) - SynchIrql = IPI_LEVEL - 2; - else - SynchIrql = DISPATCH_LEVEL; - - /* some Irqls MUST work */ - { - const KIRQL Irqls[] = { LOW_LEVEL, PASSIVE_LEVEL, APC_LEVEL, DISPATCH_LEVEL, - CMCI_LEVEL, CLOCK1_LEVEL, CLOCK2_LEVEL, CLOCK_LEVEL, - PROFILE_LEVEL, IPI_LEVEL, /*POWER_LEVEL,*/ SynchIrql, HIGH_LEVEL }; - int i; - for (i = 0; i < sizeof Irqls / sizeof Irqls[0]; ++i) - { - KeRaiseIrql(Irqls[i], &Irql2); - ok_eq_uint(Irql2, PrevIrql); - ok_irql(Irqls[i]); - KeLowerIrql(Irql2); - ok_irql(PrevIrql); - } - } - - /* raising/lowering to the current level should have no effect */ - ok_irql(PASSIVE_LEVEL); - KeRaiseIrql(PASSIVE_LEVEL, &Irql); - ok_eq_uint(Irql, PASSIVE_LEVEL); - KeLowerIrql(PASSIVE_LEVEL); - ok_irql(PASSIVE_LEVEL); - - /* try to raise to each Irql and back */ - for (Irql = PASSIVE_LEVEL; Irql <= HIGH_LEVEL; ++Irql) - { - DPRINT("Raising to %u\n", Irql); - KeRaiseIrql(Irql, &Irql2); - ok_eq_uint(Irql2, PrevIrql); - KeLowerIrql(Irql2); - ok_irql(PrevIrql); - } - - /* go through all Irqls in order, skip the ones that the system doesn't accept */ - for (Irql = PASSIVE_LEVEL; Irql <= HIGH_LEVEL; ++Irql) - { - DPRINT("Raising to %u\n", Irql); - KeRaiseIrql(Irql, &Irql2); - ok_eq_uint(Irql2, PrevIrql); - Irql2 = KeGetCurrentIrql(); - ok(Irql2 <= Irql, "New Irql is %u, expected <= requested value of %u\n", Irql2, Irql); - PrevIrql = Irql2; - } - - ok_irql(HIGH_LEVEL); - - /* now go back again, skipping the ones that don't work */ - for (Irql = HIGH_LEVEL; Irql > PASSIVE_LEVEL;) - { - DPRINT("Lowering to %u\n", Irql - 1); - KeLowerIrql(Irql - 1); - Irql2 = KeGetCurrentIrql(); - ok(Irql2 < Irql, "New Irql is %u, expected <= requested value of %u\n", Irql2, Irql - 1); - if (Irql2 < Irql) - Irql = Irql2; - else - --Irql; - } - - /* test KeRaiseIrqlToDpcLevel */ - ok_irql(PASSIVE_LEVEL); - Irql = KeRaiseIrqlToDpcLevel(); - ok_irql(DISPATCH_LEVEL); - ok_eq_uint(Irql, PASSIVE_LEVEL); - Irql = KeRaiseIrqlToDpcLevel(); - ok_irql(DISPATCH_LEVEL); - ok_eq_uint(Irql, DISPATCH_LEVEL); - KeLowerIrql(PASSIVE_LEVEL); - - /* test KeRaiseIrqlToSynchLevel */ - ok_irql(PASSIVE_LEVEL); - Irql = KeRaiseIrqlToSynchLevel(); - ok_irql(SynchIrql); - ok_eq_uint(Irql, PASSIVE_LEVEL); - Irql = KeRaiseIrqlToSynchLevel(); - ok_irql(SynchIrql); - ok_eq_uint(Irql, SynchIrql); - KeLowerIrql(PASSIVE_LEVEL); - - /* these bugcheck on a checked build but run fine on free! */ - if (!KmtIsCheckedBuild) - { - KeRaiseIrql(HIGH_LEVEL, &Irql); - KeRaiseIrql(APC_LEVEL, &Irql); - ok_irql(APC_LEVEL); - KeLowerIrql(HIGH_LEVEL); - ok_irql(HIGH_LEVEL); - KeLowerIrql(PASSIVE_LEVEL); - } - -#ifndef _M_AMD64 - /* try the actual exports, not only the fastcall versions */ - ok_irql(PASSIVE_LEVEL); - (KeRaiseIrql)(HIGH_LEVEL, &Irql); - ok_irql(HIGH_LEVEL); - ok_eq_uint(Irql, PASSIVE_LEVEL); - (KeLowerIrql)(Irql); - ok_irql(PASSIVE_LEVEL); -#endif - - /* make sure we exit gracefully */ - ok_irql(PASSIVE_LEVEL); - KeLowerIrql(PASSIVE_LEVEL); -} diff --git a/rostests/kmtests/ntos_ke/KeProcessor.c b/rostests/kmtests/ntos_ke/KeProcessor.c deleted file mode 100644 index fdf7e3bb555..00000000000 --- a/rostests/kmtests/ntos_ke/KeProcessor.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: LGPLv2+ - See COPYING.LIB in the top level directory - * PURPOSE: Kernel-Mode Test Suite Executive Regressions KM-Test - * PROGRAMMER: Aleksey Bragin - */ - -/* TODO: this test doesn't process any test results; it also takes very long */ - -#include - -#define NDEBUG -#include - -static VOID KeStallExecutionProcessorTest(VOID) -{ - ULONG i; - LARGE_INTEGER TimeStart, TimeFinish; - - DPRINT1("Waiting for 30 secs with 50us stalls...\n"); - KeQuerySystemTime(&TimeStart); - for (i = 0; i < (30*1000*20); i++) - { - KeStallExecutionProcessor(50); - } - KeQuerySystemTime(&TimeFinish); - DPRINT1("Time elapsed: %d secs\n", (TimeFinish.QuadPart - TimeStart.QuadPart) / 10000000); // 30 - - DPRINT1("Waiting for 30 secs with 1000us stalls...\n"); - KeQuerySystemTime(&TimeStart); - for (i = 0; i < (30*1000); i++) - { - KeStallExecutionProcessor(1000); - } - KeQuerySystemTime(&TimeFinish); - DPRINT1("Time elapsed: %d secs\n", (TimeFinish.QuadPart - TimeStart.QuadPart) / 10000000); // 30 - - DPRINT1("Waiting for 30 secs with 1us stalls...\n"); - KeQuerySystemTime(&TimeStart); - for (i = 0; i < (30*1000*1000); i++) - { - KeStallExecutionProcessor(1); - } - KeQuerySystemTime(&TimeFinish); - DPRINT1("Time elapsed: %d secs\n", (TimeFinish.QuadPart - TimeStart.QuadPart) / 10000000); // 43 - - DPRINT1("Waiting for 30 secs with one huge stall...\n"); - KeQuerySystemTime(&TimeStart); - KeStallExecutionProcessor(30*1000000); - KeQuerySystemTime(&TimeFinish); - DPRINT1("Time elapsed: %d secs\n", (TimeFinish.QuadPart - TimeStart.QuadPart) / 10000000); // 30 -} - -START_TEST(KeProcessor) -{ - KeStallExecutionProcessorTest(); -} \ No newline at end of file diff --git a/rostests/kmtests/ntos_ke/KeSpinLock.c b/rostests/kmtests/ntos_ke/KeSpinLock.c deleted file mode 100644 index 2b5b67a671d..00000000000 --- a/rostests/kmtests/ntos_ke/KeSpinLock.c +++ /dev/null @@ -1,374 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Spin lock test - * PROGRAMMER: Thomas Faber - */ - -#ifndef _WIN64 -__declspec(dllimport) void __stdcall KeAcquireSpinLock(unsigned long *, unsigned char *); -__declspec(dllimport) void __stdcall KeReleaseSpinLock(unsigned long *, unsigned char); -__declspec(dllimport) void __stdcall KeAcquireSpinLockAtDpcLevel(unsigned long *); -__declspec(dllimport) void __stdcall KeReleaseSpinLockFromDpcLevel(unsigned long *); -#endif - -/* this define makes KeInitializeSpinLock not use the inlined version */ -#define WIN9X_COMPAT_SPINLOCK -#include -#include - -//#define NDEBUG -#include - -/* TODO: these are documented for Vista+ */ -NTKERNELAPI -VOID -FASTCALL -KeAcquireInStackQueuedSpinLockForDpc( - IN OUT PKSPIN_LOCK SpinLock, - OUT PKLOCK_QUEUE_HANDLE LockHandle); - -NTKERNELAPI -VOID -FASTCALL -KeReleaseInStackQueuedSpinLockForDpc( - IN PKLOCK_QUEUE_HANDLE LockHandle); - -/* TODO: multiprocessor testing */ - -struct _CHECK_DATA; -typedef struct _CHECK_DATA CHECK_DATA, *PCHECK_DATA; - -typedef VOID (*PACQUIRE_FUNCTION)(PKSPIN_LOCK, PCHECK_DATA); -typedef VOID (*PRELEASE_FUNCTION)(PKSPIN_LOCK, PCHECK_DATA); -typedef BOOLEAN (*PTRY_FUNCTION)(PKSPIN_LOCK, PCHECK_DATA); - -struct _CHECK_DATA -{ - enum - { - CheckQueueHandle, - CheckQueue, - CheckLock - } Check; - KIRQL IrqlWhenAcquired; - PACQUIRE_FUNCTION Acquire; - PRELEASE_FUNCTION Release; - PTRY_FUNCTION TryAcquire; - PACQUIRE_FUNCTION AcquireNoRaise; - PRELEASE_FUNCTION ReleaseNoLower; - PTRY_FUNCTION TryAcquireNoRaise; - KSPIN_LOCK_QUEUE_NUMBER QueueNumber; - BOOLEAN TryRetOnFailure; - KIRQL OriginalIrql; - BOOLEAN IsAcquired; - _ANONYMOUS_UNION union - { - KLOCK_QUEUE_HANDLE QueueHandle; - PKSPIN_LOCK_QUEUE Queue; - KIRQL Irql; - } DUMMYUNIONNAME; - PVOID UntouchedValue; -}; - -#define DEFINE_ACQUIRE(LocalName, SetIsAcquired, DoCall) \ -static VOID LocalName(PKSPIN_LOCK SpinLock, PCHECK_DATA CheckData) \ -{ \ - ASSERT(!CheckData->IsAcquired); \ - DoCall; \ - if (SetIsAcquired) CheckData->IsAcquired = TRUE; \ -} - -#define DEFINE_RELEASE(LocalName, SetIsAcquired, DoCall) \ -static VOID LocalName(PKSPIN_LOCK SpinLock, PCHECK_DATA CheckData) \ -{ \ - DoCall; \ - if (SetIsAcquired) CheckData->IsAcquired = FALSE; \ -} - -DEFINE_ACQUIRE(AcquireNormal, TRUE, KeAcquireSpinLock(SpinLock, &CheckData->Irql)) -DEFINE_RELEASE(ReleaseNormal, TRUE, KeReleaseSpinLock(SpinLock, CheckData->Irql)) -#ifdef _X86_ -DEFINE_ACQUIRE(AcquireExp, TRUE, (KeAcquireSpinLock)(SpinLock, &CheckData->Irql)) -DEFINE_RELEASE(ReleaseExp, TRUE, (KeReleaseSpinLock)(SpinLock, CheckData->Irql)) -#else -DEFINE_ACQUIRE(AcquireExp, TRUE, KeAcquireSpinLock(SpinLock, &CheckData->Irql)) -DEFINE_RELEASE(ReleaseExp, TRUE, KeReleaseSpinLock(SpinLock, CheckData->Irql)) -#endif -DEFINE_ACQUIRE(AcquireSynch, TRUE, CheckData->Irql = KeAcquireSpinLockRaiseToSynch(SpinLock)) - -DEFINE_ACQUIRE(AcquireInStackQueued, TRUE, KeAcquireInStackQueuedSpinLock(SpinLock, &CheckData->QueueHandle)) -DEFINE_ACQUIRE(AcquireInStackSynch, TRUE, KeAcquireInStackQueuedSpinLockRaiseToSynch(SpinLock, &CheckData->QueueHandle)) -DEFINE_RELEASE(ReleaseInStackQueued, TRUE, KeReleaseInStackQueuedSpinLock(&CheckData->QueueHandle)) - -DEFINE_ACQUIRE(AcquireQueued, TRUE, CheckData->Irql = KeAcquireQueuedSpinLock(CheckData->QueueNumber)) -DEFINE_ACQUIRE(AcquireQueuedSynch, TRUE, CheckData->Irql = KeAcquireQueuedSpinLockRaiseToSynch(CheckData->QueueNumber)) -DEFINE_RELEASE(ReleaseQueued, TRUE, KeReleaseQueuedSpinLock(CheckData->QueueNumber, CheckData->Irql)) - -DEFINE_ACQUIRE(AcquireNoRaise, FALSE, KeAcquireSpinLockAtDpcLevel(SpinLock)) -DEFINE_RELEASE(ReleaseNoLower, FALSE, KeReleaseSpinLockFromDpcLevel(SpinLock)) -DEFINE_ACQUIRE(AcquireExpNoRaise, FALSE, (KeAcquireSpinLockAtDpcLevel)(SpinLock)) -DEFINE_RELEASE(ReleaseExpNoLower, FALSE, (KeReleaseSpinLockFromDpcLevel)(SpinLock)) - -DEFINE_ACQUIRE(AcquireInStackNoRaise, FALSE, KeAcquireInStackQueuedSpinLockAtDpcLevel(SpinLock, &CheckData->QueueHandle)) -DEFINE_RELEASE(ReleaseInStackNoRaise, FALSE, KeReleaseInStackQueuedSpinLockFromDpcLevel(&CheckData->QueueHandle)) - -/* TODO: test these functions. They behave weirdly, though */ -#if 0 -DEFINE_ACQUIRE(AcquireForDpc, TRUE, CheckData->Irql = KeAcquireSpinLockForDpc(SpinLock)) -DEFINE_RELEASE(ReleaseForDpc, TRUE, KeReleaseSpinLockForDpc(SpinLock, CheckData->Irql)) -#endif - -DEFINE_ACQUIRE(AcquireInStackForDpc, FALSE, KeAcquireInStackQueuedSpinLockForDpc(SpinLock, &CheckData->QueueHandle)) -DEFINE_RELEASE(ReleaseInStackForDpc, FALSE, KeReleaseInStackQueuedSpinLockForDpc(&CheckData->QueueHandle)) - -#ifdef _X86_ -DEFINE_ACQUIRE(AcquireInt, FALSE, KiAcquireSpinLock(SpinLock)) -DEFINE_RELEASE(ReleaseInt, FALSE, KiReleaseSpinLock(SpinLock)) -#else -DEFINE_ACQUIRE(AcquireInt, TRUE, KeAcquireSpinLock(SpinLock, &CheckData->Irql)) -DEFINE_RELEASE(ReleaseInt, TRUE, KeReleaseSpinLock(SpinLock, CheckData->Irql)) -#endif - -BOOLEAN TryQueued(PKSPIN_LOCK SpinLock, PCHECK_DATA CheckData) { - LOGICAL Ret = KeTryToAcquireQueuedSpinLock(CheckData->QueueNumber, &CheckData->Irql); - CheckData->IsAcquired = TRUE; - ASSERT(Ret == FALSE || Ret == TRUE); - return (BOOLEAN)Ret; -} -BOOLEAN TryQueuedSynch(PKSPIN_LOCK SpinLock, PCHECK_DATA CheckData) { - BOOLEAN Ret = KeTryToAcquireQueuedSpinLockRaiseToSynch(CheckData->QueueNumber, &CheckData->Irql); - CheckData->IsAcquired = TRUE; - return Ret; -} -BOOLEAN TryNoRaise(PKSPIN_LOCK SpinLock, PCHECK_DATA CheckData) { - BOOLEAN Ret = KeTryToAcquireSpinLockAtDpcLevel(SpinLock); - return Ret; -} - -#define CheckSpinLockLock(SpinLock, CheckData, Value) do \ -{ \ - PKTHREAD Thread = KeGetCurrentThread(); \ - if (KmtIsMultiProcessorBuild) \ - { \ - ok_eq_bool(Ret, (Value) == 0); \ - if (SpinLock) \ - ok_eq_ulongptr(*(SpinLock), \ - (Value) ? (ULONG_PTR)Thread | 1 : 0); \ - } \ - else \ - { \ - ok_bool_true(Ret, "KeTestSpinLock returned"); \ - if (SpinLock) \ - ok_eq_ulongptr(*(SpinLock), 0); \ - } \ - ok_eq_uint((CheckData)->Irql, (CheckData)->OriginalIrql); \ -} while (0) - -#define CheckSpinLockQueue(SpinLock, CheckData, Value) do \ -{ \ - ok_eq_pointer((CheckData)->Queue->Next, NULL); \ - ok_eq_pointer((CheckData)->Queue->Lock, NULL); \ - ok_eq_uint((CheckData)->Irql, (CheckData)->OriginalIrql); \ -} while (0) - -#define CheckSpinLockQueueHandle(SpinLock, CheckData, Value) do \ -{ \ - if (KmtIsMultiProcessorBuild) \ - { \ - ok_eq_bool(Ret, (Value) == 0); \ - if (SpinLock) \ - ok_eq_ulongptr(*(SpinLock), \ - (Value) ? &(CheckData)->QueueHandle : 0); \ - ok_eq_pointer((CheckData)->QueueHandle.LockQueue.Next, NULL); \ - ok_eq_pointer((CheckData)->QueueHandle.LockQueue.Lock, \ - (PVOID)((ULONG_PTR)SpinLock | ((Value) ? 2 : 0))); \ - } \ - else \ - { \ - ok_bool_true(Ret, "KeTestSpinLock returned"); \ - if (SpinLock) \ - ok_eq_ulongptr(*(SpinLock), 0); \ - ok_eq_pointer((CheckData)->QueueHandle.LockQueue.Next, (CheckData)->UntouchedValue); \ - ok_eq_pointer((CheckData)->QueueHandle.LockQueue.Lock, (CheckData)->UntouchedValue); \ - } \ - ok_eq_uint((CheckData)->QueueHandle.OldIrql, (CheckData)->OriginalIrql); \ -} while (0) - -#define CheckSpinLock(SpinLock, CheckData, Value) do \ -{ \ - BOOLEAN Ret = SpinLock ? KeTestSpinLock(SpinLock) : TRUE; \ - KIRQL ExpectedIrql = (CheckData)->OriginalIrql; \ - \ - switch ((CheckData)->Check) \ - { \ - case CheckLock: \ - CheckSpinLockLock(SpinLock, CheckData, Value); \ - break; \ - case CheckQueue: \ - CheckSpinLockQueue(SpinLock, CheckData, Value); \ - break; \ - case CheckQueueHandle: \ - CheckSpinLockQueueHandle(SpinLock, CheckData, Value); \ - break; \ - } \ - \ - if ((CheckData)->IsAcquired) \ - ExpectedIrql = (CheckData)->IrqlWhenAcquired; \ - ok_irql(ExpectedIrql); \ - ok_bool_false(KeAreApcsDisabled(), "KeAreApcsDisabled returned"); \ - ok_bool_true(KmtAreInterruptsEnabled(), "Interrupts enabled:"); \ -} while (0) - -static -VOID -TestSpinLock( - PKSPIN_LOCK SpinLock, - PCHECK_DATA CheckData) -{ - static INT Run = 0; - trace("Test SpinLock run %d\n", Run++); - - ok_irql(CheckData->OriginalIrql); - - if (SpinLock) - ok_eq_ulongptr(*SpinLock, 0); - CheckData->Acquire(SpinLock, CheckData); - CheckSpinLock(SpinLock, CheckData, 1); - CheckData->Release(SpinLock, CheckData); - CheckSpinLock(SpinLock, CheckData, 0); - - if (CheckData->TryAcquire) - { - CheckSpinLock(SpinLock, CheckData, 0); - ok_bool_true(CheckData->TryAcquire(SpinLock, CheckData), "TryAcquire returned"); - CheckSpinLock(SpinLock, CheckData, 1); - if (!KmtIsCheckedBuild) - { - /* SPINLOCK_ALREADY_OWNED on checked build */ - ok_bool_true(CheckData->TryAcquire(SpinLock, CheckData), "TryAcquire returned"); - /* even a failing acquire sets irql */ - ok_eq_uint(CheckData->Irql, CheckData->IrqlWhenAcquired); - CheckData->Irql = CheckData->OriginalIrql; - CheckSpinLock(SpinLock, CheckData, 1); - } - CheckData->Release(SpinLock, CheckData); - CheckSpinLock(SpinLock, CheckData, 0); - } - - if (CheckData->AcquireNoRaise && - (CheckData->OriginalIrql >= DISPATCH_LEVEL || !KmtIsCheckedBuild)) - { - /* acquire/release without irql change */ - CheckData->AcquireNoRaise(SpinLock, CheckData); - CheckSpinLock(SpinLock, CheckData, 1); - CheckData->ReleaseNoLower(SpinLock, CheckData); - CheckSpinLock(SpinLock, CheckData, 0); - - /* acquire without raise, but normal release */ - CheckData->AcquireNoRaise(SpinLock, CheckData); - CheckSpinLock(SpinLock, CheckData, 1); - CheckData->Release(SpinLock, CheckData); - CheckSpinLock(SpinLock, CheckData, 0); - - /* acquire normally but release without lower */ - CheckData->Acquire(SpinLock, CheckData); - CheckSpinLock(SpinLock, CheckData, 1); - CheckData->ReleaseNoLower(SpinLock, CheckData); - CheckSpinLock(SpinLock, CheckData, 0); - CheckData->IsAcquired = FALSE; - KmtSetIrql(CheckData->OriginalIrql); - - if (CheckData->TryAcquireNoRaise) - { - CheckSpinLock(SpinLock, CheckData, 0); - ok_bool_true(CheckData->TryAcquireNoRaise(SpinLock, CheckData), "TryAcquireNoRaise returned"); - CheckSpinLock(SpinLock, CheckData, 1); - if (!KmtIsCheckedBuild) - { - ok_bool_true(CheckData->TryAcquireNoRaise(SpinLock, CheckData), "TryAcquireNoRaise returned"); - CheckSpinLock(SpinLock, CheckData, 1); - } - CheckData->ReleaseNoLower(SpinLock, CheckData); - CheckSpinLock(SpinLock, CheckData, 0); - } - } - - ok_irql(CheckData->OriginalIrql); - /* make sure we survive this in case of error */ - KmtSetIrql(CheckData->OriginalIrql); -} - -START_TEST(KeSpinLock) -{ - KSPIN_LOCK SpinLock = (KSPIN_LOCK)0x5555555555555555LL; - PKSPIN_LOCK pSpinLock = &SpinLock; - KIRQL Irql, SynchIrql = KmtIsMultiProcessorBuild ? IPI_LEVEL - 2 : DISPATCH_LEVEL; - KIRQL OriginalIrqls[] = { PASSIVE_LEVEL, APC_LEVEL, DISPATCH_LEVEL, HIGH_LEVEL }; - CHECK_DATA TestData[] = - { - { CheckLock, DISPATCH_LEVEL, AcquireNormal, ReleaseNormal, NULL, AcquireNoRaise, ReleaseNoLower, TryNoRaise }, - { CheckLock, DISPATCH_LEVEL, AcquireExp, ReleaseExp, NULL, AcquireExpNoRaise, ReleaseExpNoLower, NULL }, - /* TODO: this one is just weird! - { CheckLock, DISPATCH_LEVEL, AcquireNormal, ReleaseNormal, NULL, AcquireForDpc, ReleaseForDpc, NULL },*/ - { CheckLock, DISPATCH_LEVEL, AcquireNormal, ReleaseNormal, NULL, AcquireInt, ReleaseInt, NULL }, - { CheckLock, SynchIrql, AcquireSynch, ReleaseNormal, NULL, NULL, NULL, NULL }, - { CheckQueueHandle, DISPATCH_LEVEL, AcquireInStackQueued, ReleaseInStackQueued, NULL, AcquireInStackNoRaise, ReleaseInStackNoRaise, NULL }, - { CheckQueueHandle, SynchIrql, AcquireInStackSynch, ReleaseInStackQueued, NULL, NULL, NULL, NULL }, - { CheckQueueHandle, DISPATCH_LEVEL, AcquireInStackQueued, ReleaseInStackQueued, NULL, AcquireInStackForDpc, ReleaseInStackForDpc, NULL }, - { CheckQueue, DISPATCH_LEVEL, AcquireQueued, ReleaseQueued, TryQueued, NULL, NULL, NULL, LockQueuePfnLock }, - { CheckQueue, SynchIrql, AcquireQueuedSynch, ReleaseQueued, TryQueuedSynch, NULL, NULL, NULL, LockQueuePfnLock }, - }; - int i, iIrql; - PKPRCB Prcb = KeGetCurrentPrcb(); - - /* KeInitializeSpinLock */ - memset(&SpinLock, 0x55, sizeof SpinLock); - KeInitializeSpinLock(&SpinLock); - ok_eq_ulongptr(SpinLock, 0); - - /* KeTestSpinLock */ - ok_bool_true(KeTestSpinLock(&SpinLock), "KeTestSpinLock returned"); - SpinLock = 1; - ok_bool_false(KeTestSpinLock(&SpinLock), "KeTestSpinLock returned"); - SpinLock = 2; - ok_bool_false(KeTestSpinLock(&SpinLock), "KeTestSpinLock returned"); - SpinLock = (ULONG_PTR)-1; - ok_bool_false(KeTestSpinLock(&SpinLock), "KeTestSpinLock returned"); - SpinLock = (ULONG_PTR)1 << (sizeof(ULONG_PTR) * CHAR_BIT - 1); - ok_bool_false(KeTestSpinLock(&SpinLock), "KeTestSpinLock returned"); - SpinLock = 0; - ok_bool_true(KeTestSpinLock(&SpinLock), "KeTestSpinLock returned"); - - /* on UP none of the following functions actually looks at the spinlock! */ - if (!KmtIsMultiProcessorBuild && !KmtIsCheckedBuild) - pSpinLock = NULL; - - for (i = 0; i < sizeof TestData / sizeof TestData[0]; ++i) - { - memset(&SpinLock, 0x55, sizeof SpinLock); - KeInitializeSpinLock(&SpinLock); - if (TestData[i].Check == CheckQueueHandle) - memset(&TestData[i].QueueHandle, 0x55, sizeof TestData[i].QueueHandle); - if (TestData[i].Check == CheckQueue) - { - TestData[i].Queue = &Prcb->LockQueue[TestData[i].QueueNumber]; - TestData[i].UntouchedValue = NULL; - } - else - TestData[i].UntouchedValue = (PVOID)0x5555555555555555LL; - - for (iIrql = 0; iIrql < sizeof OriginalIrqls / sizeof OriginalIrqls[0]; ++iIrql) - { - if (KmtIsCheckedBuild && OriginalIrqls[iIrql] > DISPATCH_LEVEL) - continue; - KeRaiseIrql(OriginalIrqls[iIrql], &Irql); - TestData[i].OriginalIrql = OriginalIrqls[iIrql]; - TestData[i].IsAcquired = FALSE; - TestSpinLock(pSpinLock, &TestData[i]); - KeLowerIrql(Irql); - } - } - - KmtSetIrql(PASSIVE_LEVEL); -} diff --git a/rostests/kmtests/ntos_ke/KeTimer.c b/rostests/kmtests/ntos_ke/KeTimer.c deleted file mode 100644 index 69cb48f86f8..00000000000 --- a/rostests/kmtests/ntos_ke/KeTimer.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Timer test - * PROGRAMMER: Rafal Harabien - */ - -#include - -#define CheckTimer(Timer, ExpectedType, State, ExpectedWaitNext, \ - Irql, ThreadList, ThreadCount) do \ -{ \ - INT TheIndex; \ - PLIST_ENTRY TheEntry; \ - PKTHREAD TheThread; \ - ok_eq_uint((Timer)->Header.Type, ExpectedType); \ - ok_eq_uint((Timer)->Header.Hand, sizeof *(Timer) / sizeof(ULONG)); \ - ok_eq_hex((Timer)->Header.Lock & 0xFF00FF00L, 0x00005500L); \ - ok_eq_long((Timer)->Header.SignalState, State); \ - TheEntry = (Timer)->Header.WaitListHead.Flink; \ - for (TheIndex = 0; TheIndex < (ThreadCount); ++TheIndex) \ - { \ - TheThread = CONTAINING_RECORD(TheEntry, KTHREAD, \ - WaitBlock[0].WaitListEntry); \ - ok_eq_pointer(TheThread, (ThreadList)[TheIndex]); \ - ok_eq_pointer(TheEntry->Flink->Blink, TheEntry); \ - TheEntry = TheEntry->Flink; \ - } \ - ok_eq_pointer(TheEntry, &(Timer)->Header.WaitListHead); \ - ok_eq_pointer(TheEntry->Flink->Blink, TheEntry); \ - ok_eq_long(KeReadStateTimer(Timer), State); \ - ok_eq_bool(Thread->WaitNext, ExpectedWaitNext); \ - ok_irql(Irql); \ -} while (0) - -static -VOID -TestTimerFunctional( - IN PKTIMER Timer, - IN TIMER_TYPE Type, - IN KIRQL OriginalIrql) -{ - PKTHREAD Thread = KeGetCurrentThread(); - - memset(Timer, 0x55, sizeof *Timer); - KeInitializeTimerEx(Timer, Type); - CheckTimer(Timer, TimerNotificationObject + Type, 0L, FALSE, OriginalIrql, (PVOID *)NULL, 0); -} - -START_TEST(KeTimer) -{ - KTIMER Timer; - KIRQL Irql; - KIRQL Irqls[] = { PASSIVE_LEVEL, APC_LEVEL, DISPATCH_LEVEL, HIGH_LEVEL }; - INT i; - - for (i = 0; i < sizeof Irqls / sizeof Irqls[0]; ++i) - { - /* DRIVER_IRQL_NOT_LESS_OR_EQUAL (TODO: on MP only?) */ - if (Irqls[i] > DISPATCH_LEVEL && KmtIsCheckedBuild) - return; - KeRaiseIrql(Irqls[i], &Irql); - TestTimerFunctional(&Timer, NotificationTimer, Irqls[i]); - TestTimerFunctional(&Timer, SynchronizationTimer, Irqls[i]); - KeLowerIrql(Irql); - } - - ok_irql(PASSIVE_LEVEL); - KmtSetIrql(PASSIVE_LEVEL); -} diff --git a/rostests/kmtests/ntos_mm/MmSection.c b/rostests/kmtests/ntos_mm/MmSection.c deleted file mode 100644 index 7b3cf830001..00000000000 --- a/rostests/kmtests/ntos_mm/MmSection.c +++ /dev/null @@ -1,461 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Section Object test - * PROGRAMMER: Thomas Faber - */ - -#include - -#define StartSeh() ExceptionStatus = STATUS_SUCCESS; _SEH2_TRY { -#define EndSeh(ExpectedStatus) } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { ExceptionStatus = _SEH2_GetExceptionCode(); } _SEH2_END; ok_eq_hex(ExceptionStatus, ExpectedStatus) - -#define CheckObject(Handle, Pointers, Handles) do \ -{ \ - PUBLIC_OBJECT_BASIC_INFORMATION ObjectInfo; \ - Status = ZwQueryObject(Handle, ObjectBasicInformation, \ - &ObjectInfo, sizeof ObjectInfo, NULL); \ - ok_eq_hex(Status, STATUS_SUCCESS); \ - ok_eq_ulong(ObjectInfo.PointerCount, Pointers); \ - ok_eq_ulong(ObjectInfo.HandleCount, Handles); \ -} while (0) - -#define CheckSection(SectionObject, SectionFlag) do \ -{ \ - SECTION_BASIC_INFORMATION Sbi; \ - HANDLE SectionHandle = NULL; \ - NTSTATUS Status; \ - if (skip(SectionObject != NULL && \ - SectionObject != (PVOID)0x5555555555555555ULL, \ - "No section object\n")) \ - break; \ - Status = ObOpenObjectByPointer(SectionObject, OBJ_KERNEL_HANDLE, \ - NULL, 0, MmSectionObjectType, \ - KernelMode, &SectionHandle); \ - ok_eq_hex(Status, STATUS_SUCCESS); \ - ok(SectionHandle != NULL, "Section handle null\n"); \ - if (!skip(NT_SUCCESS(Status) && SectionHandle, \ - "No section handle\n")) \ - { \ - Status = ZwQuerySection(SectionHandle, SectionBasicInformation, \ - &Sbi, sizeof Sbi, NULL); \ - ok_eq_hex(Status, STATUS_SUCCESS); \ - ok_eq_pointer(Sbi.BaseAddress, NULL); \ - ok_eq_longlong(Sbi.Size.QuadPart, 1LL); \ - ok_eq_hex(Sbi.Attributes, SectionFlag | SEC_FILE); \ - ZwClose(SectionHandle); \ - } \ -} while (0) - -#define TestMapView(SectionObject, ExpectAtBase, ExpectM) do \ -{ \ - NTSTATUS Status; \ - PVOID BaseAddress = NULL; \ - SIZE_T ViewSize = 0; \ - LARGE_INTEGER SectionOffset; \ - if (skip(SectionObject != NULL && \ - SectionObject != (PVOID)0x5555555555555555ULL, \ - "No section object\n")) \ - break; \ - \ - SectionOffset.QuadPart = 0; \ - Status = MmMapViewOfSection(SectionObject, PsGetCurrentProcess(), \ - &BaseAddress, 0, 1, &SectionOffset, \ - &ViewSize, ViewUnmap, 0, PAGE_READONLY); \ - ok_eq_hex(Status, ExpectAtBase ? STATUS_SUCCESS : STATUS_IMAGE_NOT_AT_BASE);\ - if (!skip(NT_SUCCESS(Status), "Section not mapped\n")) \ - { \ - ok_eq_uint(*(PUCHAR)BaseAddress, ExpectM ? 'M' : 0); \ - Status = MmUnmapViewOfSection(PsGetCurrentProcess(), BaseAddress); \ - ok_eq_hex(Status, STATUS_SUCCESS); \ - } \ -} while (0) - -static -VOID -TestCreateSection( - IN HANDLE FileHandle1, - IN PFILE_OBJECT FileObject1, - IN HANDLE FileHandle2, - IN PFILE_OBJECT FileObject2) -{ - NTSTATUS Status = STATUS_SUCCESS; - NTSTATUS ExceptionStatus; - const PVOID InvalidPointer = (PVOID)0x5555555555555555ULL; - PVOID SectionObject; - LARGE_INTEGER MaximumSize; - ULONG PointerCount1, PointerCount2; - - StartSeh() - Status = MmCreateSection(NULL, 0, NULL, NULL, 0, SEC_RESERVE, NULL, NULL); - EndSeh(STATUS_SUCCESS); - ok_eq_hex(Status, STATUS_INVALID_PAGE_PROTECTION); - - if (!KmtIsCheckedBuild) - { - /* PAGE_NOACCESS and missing SEC_RESERVE/SEC_COMMIT/SEC_IMAGE assert */ - StartSeh() - Status = MmCreateSection(NULL, 0, NULL, NULL, PAGE_NOACCESS, SEC_RESERVE, NULL, NULL); - EndSeh(STATUS_ACCESS_VIOLATION); - - StartSeh() - Status = MmCreateSection(NULL, 0, NULL, NULL, PAGE_NOACCESS, 0, NULL, NULL); - EndSeh(STATUS_ACCESS_VIOLATION); - } - - SectionObject = InvalidPointer; - StartSeh() - Status = MmCreateSection(&SectionObject, 0, NULL, NULL, 0, SEC_RESERVE, NULL, NULL); - EndSeh(STATUS_SUCCESS); - ok_eq_hex(Status, STATUS_INVALID_PAGE_PROTECTION); - ok_eq_pointer(SectionObject, InvalidPointer); - - if (SectionObject && SectionObject != InvalidPointer) - ObDereferenceObject(SectionObject); - - StartSeh() - Status = MmCreateSection(NULL, 0, NULL, NULL, PAGE_READONLY, SEC_RESERVE, NULL, NULL); - EndSeh(STATUS_ACCESS_VIOLATION); - - SectionObject = InvalidPointer; - StartSeh() - Status = MmCreateSection(&SectionObject, 0, NULL, NULL, PAGE_READONLY, SEC_RESERVE, NULL, NULL); - EndSeh(STATUS_ACCESS_VIOLATION); - ok_eq_pointer(SectionObject, InvalidPointer); - - if (SectionObject && SectionObject != InvalidPointer) - ObDereferenceObject(SectionObject); - - SectionObject = InvalidPointer; - MaximumSize.QuadPart = 0; - StartSeh() - Status = MmCreateSection(&SectionObject, 0, NULL, &MaximumSize, PAGE_READONLY, SEC_IMAGE, NULL, NULL); - EndSeh(STATUS_SUCCESS); - ok_eq_hex(Status, STATUS_INVALID_FILE_FOR_SECTION); - ok_eq_longlong(MaximumSize.QuadPart, 0LL); - ok_eq_pointer(SectionObject, InvalidPointer); - - if (SectionObject && SectionObject != InvalidPointer) - ObDereferenceObject(SectionObject); - - MaximumSize.QuadPart = 0; - StartSeh() - Status = MmCreateSection(NULL, 0, NULL, &MaximumSize, PAGE_READONLY, SEC_RESERVE, NULL, NULL); - EndSeh(STATUS_SUCCESS); - ok_eq_hex(Status, STATUS_INVALID_PARAMETER_4); - ok_eq_longlong(MaximumSize.QuadPart, 0LL); - - if (SectionObject && SectionObject != InvalidPointer) - ObDereferenceObject(SectionObject); - - MaximumSize.QuadPart = 1; - StartSeh() - Status = MmCreateSection(NULL, 0, NULL, &MaximumSize, PAGE_READONLY, SEC_RESERVE, NULL, NULL); - EndSeh(STATUS_ACCESS_VIOLATION); - ok_eq_longlong(MaximumSize.QuadPart, 1LL); - - if (SectionObject && SectionObject != InvalidPointer) - ObDereferenceObject(SectionObject); - - SectionObject = InvalidPointer; - MaximumSize.QuadPart = 0; - StartSeh() - Status = MmCreateSection(&SectionObject, 0, NULL, &MaximumSize, PAGE_READONLY, SEC_RESERVE, NULL, NULL); - EndSeh(STATUS_SUCCESS); - ok_eq_hex(Status, STATUS_INVALID_PARAMETER_4); - ok_eq_longlong(MaximumSize.QuadPart, 0LL); - ok_eq_pointer(SectionObject, InvalidPointer); - - if (SectionObject && SectionObject != InvalidPointer) - ObDereferenceObject(SectionObject); - - /* page file section */ - SectionObject = InvalidPointer; - MaximumSize.QuadPart = 1; - StartSeh() - Status = MmCreateSection(&SectionObject, 0, NULL, &MaximumSize, PAGE_READONLY, SEC_RESERVE, NULL, NULL); - EndSeh(STATUS_SUCCESS); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_eq_longlong(MaximumSize.QuadPart, 1LL); - ok(SectionObject != InvalidPointer, "Section object pointer untouched\n"); - ok(SectionObject != NULL, "Section object pointer NULL\n"); - - if (SectionObject && SectionObject != InvalidPointer) - ObDereferenceObject(SectionObject); - - if (!skip(FileHandle1 != NULL && FileObject1 != NULL && - FileHandle2 != NULL && FileObject2 != NULL, "No file handle or object\n")) - { - PointerCount1 = 3; - PointerCount2 = 3; - /* image section */ - CheckObject(FileHandle2, PointerCount2, 1L); - SectionObject = InvalidPointer; - MaximumSize.QuadPart = 1; - StartSeh() - Status = MmCreateSection(&SectionObject, 0, NULL, &MaximumSize, PAGE_READONLY, SEC_IMAGE, FileHandle2, NULL); - EndSeh(STATUS_SUCCESS); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_eq_longlong(MaximumSize.QuadPart, 1LL); - ok(SectionObject != InvalidPointer, "Section object pointer untouched\n"); - ok(SectionObject != NULL, "Section object pointer NULL\n"); - CheckObject(FileHandle2, PointerCount2, 1L); - CheckSection(SectionObject, SEC_IMAGE); - TestMapView(SectionObject, FALSE, TRUE); - - if (SectionObject && SectionObject != InvalidPointer) - ObDereferenceObject(SectionObject); - - CheckObject(FileHandle2, PointerCount2, 1L); - SectionObject = InvalidPointer; - MaximumSize.QuadPart = 1; - StartSeh() - Status = MmCreateSection(&SectionObject, 0, NULL, &MaximumSize, PAGE_READONLY, SEC_IMAGE, NULL, FileObject2); - EndSeh(STATUS_SUCCESS); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_eq_longlong(MaximumSize.QuadPart, 1LL); - ok(SectionObject != InvalidPointer, "Section object pointer untouched\n"); - ok(SectionObject != NULL, "Section object pointer NULL\n"); - ++PointerCount2; - CheckObject(FileHandle2, PointerCount2, 1L); - CheckSection(SectionObject, 0); - TestMapView(SectionObject, TRUE, TRUE); - - if (SectionObject && SectionObject != InvalidPointer) - ObDereferenceObject(SectionObject); - //--PointerCount2; // ???? - - CheckObject(FileHandle2, PointerCount2, 1L); - SectionObject = InvalidPointer; - MaximumSize.QuadPart = 1; - StartSeh() - Status = MmCreateSection(&SectionObject, 0, NULL, &MaximumSize, PAGE_READONLY, SEC_IMAGE, FileHandle2, FileObject2); - EndSeh(STATUS_SUCCESS); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_eq_longlong(MaximumSize.QuadPart, 1LL); - ok(SectionObject != InvalidPointer, "Section object pointer untouched\n"); - ok(SectionObject != NULL, "Section object pointer NULL\n"); - CheckObject(FileHandle2, PointerCount2, 1L); - CheckSection(SectionObject, 0); - TestMapView(SectionObject, TRUE, TRUE); - - if (SectionObject && SectionObject != InvalidPointer) - ObDereferenceObject(SectionObject); - - /* image section with inappropriate file */ - CheckObject(FileHandle1, PointerCount1, 1L); - SectionObject = InvalidPointer; - MaximumSize.QuadPart = 1; - StartSeh() - Status = MmCreateSection(&SectionObject, 0, NULL, &MaximumSize, PAGE_READONLY, SEC_IMAGE, FileHandle1, NULL); - EndSeh(STATUS_SUCCESS); - ok_eq_hex(Status, STATUS_INVALID_IMAGE_NOT_MZ); - ok_eq_longlong(MaximumSize.QuadPart, 1LL); - ok_eq_pointer(SectionObject, InvalidPointer); - CheckObject(FileHandle1, PointerCount1, 1L); - - if (SectionObject && SectionObject != InvalidPointer) - ObDereferenceObject(SectionObject); - - CheckObject(FileHandle1, PointerCount1, 1L); - SectionObject = InvalidPointer; - MaximumSize.QuadPart = 1; - StartSeh() - Status = MmCreateSection(&SectionObject, 0, NULL, &MaximumSize, PAGE_READONLY, SEC_IMAGE, NULL, FileObject1); - EndSeh(STATUS_SUCCESS); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_eq_longlong(MaximumSize.QuadPart, 1LL); - ok(SectionObject != InvalidPointer, "Section object pointer untouched\n"); - ok(SectionObject != NULL, "Section object pointer NULL\n"); - ++PointerCount1; - CheckObject(FileHandle1, PointerCount1, 1L); - CheckSection(SectionObject, 0); - TestMapView(SectionObject, TRUE, FALSE); - - if (SectionObject && SectionObject != InvalidPointer) - ObDereferenceObject(SectionObject); - //--PointerCount1; // ???? - - CheckObject(FileHandle1, PointerCount1, 1L); - SectionObject = InvalidPointer; - MaximumSize.QuadPart = 1; - StartSeh() - Status = MmCreateSection(&SectionObject, 0, NULL, &MaximumSize, PAGE_READONLY, SEC_IMAGE, FileHandle1, FileObject1); - EndSeh(STATUS_SUCCESS); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_eq_longlong(MaximumSize.QuadPart, 1LL); - ok(SectionObject != InvalidPointer, "Section object pointer untouched\n"); - ok(SectionObject != NULL, "Section object pointer NULL\n"); - CheckObject(FileHandle1, PointerCount1, 1L); - CheckSection(SectionObject, 0); - TestMapView(SectionObject, TRUE, FALSE); - - if (SectionObject && SectionObject != InvalidPointer) - ObDereferenceObject(SectionObject); - - /* image section with two different files */ - CheckObject(FileHandle1, PointerCount1, 1L); - SectionObject = InvalidPointer; - MaximumSize.QuadPart = 1; - StartSeh() - Status = MmCreateSection(&SectionObject, 0, NULL, &MaximumSize, PAGE_READONLY, SEC_IMAGE, FileHandle1, FileObject2); - EndSeh(STATUS_SUCCESS); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_eq_longlong(MaximumSize.QuadPart, 1LL); - ok(SectionObject != InvalidPointer, "Section object pointer untouched\n"); - ok(SectionObject != NULL, "Section object pointer NULL\n"); - CheckObject(FileHandle1, PointerCount1, 1L); - CheckObject(FileHandle2, PointerCount2, 1L); - CheckSection(SectionObject, 0); - TestMapView(SectionObject, TRUE, TRUE); - - if (SectionObject && SectionObject != InvalidPointer) - ObDereferenceObject(SectionObject); - - CheckObject(FileHandle1, PointerCount1, 1L); - SectionObject = InvalidPointer; - MaximumSize.QuadPart = 1; - StartSeh() - Status = MmCreateSection(&SectionObject, 0, NULL, &MaximumSize, PAGE_READONLY, SEC_IMAGE, FileHandle2, FileObject1); - EndSeh(STATUS_SUCCESS); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_eq_longlong(MaximumSize.QuadPart, 1LL); - ok(SectionObject != InvalidPointer, "Section object pointer untouched\n"); - ok(SectionObject != NULL, "Section object pointer NULL\n"); - CheckObject(FileHandle1, PointerCount1, 1L); - CheckObject(FileHandle2, PointerCount2, 1L); - CheckSection(SectionObject, 0); - TestMapView(SectionObject, TRUE, FALSE); - - if (SectionObject && SectionObject != InvalidPointer) - ObDereferenceObject(SectionObject); - - /* data file section */ - CheckObject(FileHandle1, PointerCount1, 1L); - SectionObject = InvalidPointer; - MaximumSize.QuadPart = 1; - StartSeh() - Status = MmCreateSection(&SectionObject, 0, NULL, &MaximumSize, PAGE_READONLY, SEC_RESERVE, FileHandle1, NULL); - EndSeh(STATUS_SUCCESS); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_eq_longlong(MaximumSize.QuadPart, 1LL); - ok(SectionObject != InvalidPointer, "Section object pointer untouched\n"); - ok(SectionObject != NULL, "Section object pointer NULL\n"); - CheckObject(FileHandle1, PointerCount1, 1L); - CheckSection(SectionObject, 0); - TestMapView(SectionObject, TRUE, FALSE); - - if (SectionObject && SectionObject != InvalidPointer) - ObDereferenceObject(SectionObject); - - CheckObject(FileHandle1, PointerCount1, 1L); - SectionObject = InvalidPointer; - MaximumSize.QuadPart = 1; - StartSeh() - Status = MmCreateSection(&SectionObject, 0, NULL, &MaximumSize, PAGE_READONLY, SEC_RESERVE, NULL, FileObject1); - EndSeh(STATUS_SUCCESS); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_eq_longlong(MaximumSize.QuadPart, 1LL); - ok(SectionObject != InvalidPointer, "Section object pointer untouched\n"); - ok(SectionObject != NULL, "Section object pointer NULL\n"); - CheckObject(FileHandle1, PointerCount1, 1L); - CheckSection(SectionObject, 0); - TestMapView(SectionObject, TRUE, FALSE); - - if (SectionObject && SectionObject != InvalidPointer) - ObDereferenceObject(SectionObject); - - CheckObject(FileHandle1, PointerCount1, 1L); - SectionObject = InvalidPointer; - MaximumSize.QuadPart = 1; - StartSeh() - Status = MmCreateSection(&SectionObject, 0, NULL, &MaximumSize, PAGE_READONLY, SEC_RESERVE, FileHandle1, FileObject1); - EndSeh(STATUS_SUCCESS); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_eq_longlong(MaximumSize.QuadPart, 1LL); - ok(SectionObject != InvalidPointer, "Section object pointer untouched\n"); - ok(SectionObject != NULL, "Section object pointer NULL\n"); - CheckObject(FileHandle1, PointerCount1, 1L); - CheckSection(SectionObject, 0); - TestMapView(SectionObject, TRUE, FALSE); - - if (SectionObject && SectionObject != InvalidPointer) - ObDereferenceObject(SectionObject); - - CheckObject(FileHandle1, PointerCount1, 1L); - } -} - -START_TEST(MmSection) -{ - NTSTATUS Status; - HANDLE FileHandle1 = NULL, FileHandle2 = NULL; - PFILE_OBJECT FileObject1 = NULL, FileObject2 = NULL; - OBJECT_ATTRIBUTES ObjectAttributes; - IO_STATUS_BLOCK IoStatusBlock; - UNICODE_STRING FileName1 = RTL_CONSTANT_STRING(L"\\SystemRoot\\kmtest-MmSection.txt"); - UNICODE_STRING FileName2 = RTL_CONSTANT_STRING(L"\\SystemRoot\\system32\\ntdll.dll"); - LARGE_INTEGER FileOffset; - UCHAR FileData = 0; - - ok(ExGetPreviousMode() == UserMode, "Previous mode is kernel mode\n"); - /* create a one-byte file that we can use */ - InitializeObjectAttributes(&ObjectAttributes, &FileName1, OBJ_CASE_INSENSITIVE, NULL, NULL); - Status = ZwCreateFile(&FileHandle1, GENERIC_WRITE | SYNCHRONIZE, &ObjectAttributes, &IoStatusBlock, NULL, FILE_ATTRIBUTE_NORMAL, FILE_SHARE_READ, FILE_SUPERSEDE, FILE_NON_DIRECTORY_FILE, NULL, 0); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_eq_ulongptr(IoStatusBlock.Information, FILE_CREATED); - ok(FileHandle1 != NULL, "FileHandle1 is NULL\n"); - if (FileHandle1) - { - FileOffset.QuadPart = 0; - Status = ZwWriteFile(FileHandle1, NULL, NULL, NULL, &IoStatusBlock, &FileData, sizeof FileData, &FileOffset, NULL); - ok(Status == STATUS_SUCCESS || Status == STATUS_PENDING, "Status = 0x%08lx\n", Status); - Status = ZwWaitForSingleObject(FileHandle1, FALSE, NULL); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_eq_ulongptr(IoStatusBlock.Information, 1); - Status = ZwClose(FileHandle1); - ok_eq_hex(Status, STATUS_SUCCESS); - FileHandle1 = NULL; - } - - InitializeObjectAttributes(&ObjectAttributes, &FileName1, OBJ_CASE_INSENSITIVE, NULL, NULL); - Status = ZwCreateFile(&FileHandle1, GENERIC_ALL, &ObjectAttributes, &IoStatusBlock, NULL, FILE_ATTRIBUTE_NORMAL, FILE_SHARE_READ, FILE_OPEN, FILE_NON_DIRECTORY_FILE | FILE_DELETE_ON_CLOSE, NULL, 0); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_eq_ulongptr(IoStatusBlock.Information, FILE_OPENED); - ok(FileHandle1 != NULL, "FileHandle1 is NULL\n"); - CheckObject(FileHandle1, 2L, 1L); - - InitializeObjectAttributes(&ObjectAttributes, &FileName2, OBJ_CASE_INSENSITIVE, NULL, NULL); - Status = ZwCreateFile(&FileHandle2, GENERIC_READ, &ObjectAttributes, &IoStatusBlock, NULL, FILE_ATTRIBUTE_NORMAL, FILE_SHARE_READ, FILE_OPEN, FILE_NON_DIRECTORY_FILE, NULL, 0); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_eq_ulongptr(IoStatusBlock.Information, FILE_OPENED); - ok(FileHandle2 != NULL, "FileHandle2 is NULL\n"); - - if (!skip(Status == STATUS_SUCCESS && FileHandle1 != NULL, "Failed to open file 1\n")) - { - Status = ObReferenceObjectByHandle(FileHandle1, FILE_READ_DATA | FILE_WRITE_DATA, IoFileObjectType, KernelMode, (PVOID *)&FileObject1, NULL); - ok_eq_hex(Status, STATUS_SUCCESS); - ok(FileObject1 != NULL, "FileObject1 is NULL\n"); - CheckObject(FileHandle1, 3L, 1L); - } - - if (!skip(Status == STATUS_SUCCESS && FileHandle2 != NULL, "Failed to open file 2\n")) - { - Status = ObReferenceObjectByHandle(FileHandle2, FILE_READ_DATA | FILE_WRITE_DATA, IoFileObjectType, KernelMode, (PVOID *)&FileObject2, NULL); - ok_eq_hex(Status, STATUS_SUCCESS); - ok(FileObject2 != NULL, "FileObject2 is NULL\n"); - } - - trace("FileHandle1=%p, FileObject1=%p\n", FileHandle1, FileObject1); - trace("FileHandle2=%p, FileObject2=%p\n", FileHandle2, FileObject2); - TestCreateSection(FileHandle1, FileObject1, FileHandle2, FileObject2); - - if (FileObject2) - ObDereferenceObject(FileObject2); - if (FileObject1) - ObDereferenceObject(FileObject1); - if (FileHandle2) - ZwClose(FileHandle2); - if (FileHandle1) - ZwClose(FileHandle1); -} diff --git a/rostests/kmtests/ntos_ob/ObReference.c b/rostests/kmtests/ntos_ob/ObReference.c deleted file mode 100644 index 68b9a3284d0..00000000000 --- a/rostests/kmtests/ntos_ob/ObReference.c +++ /dev/null @@ -1,327 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Object Referencing test - * PROGRAMMER: Thomas Faber - */ - -#include -#define NDEBUG -#include - -#define CheckObject(Handle, Pointers, Handles) do \ -{ \ - PUBLIC_OBJECT_BASIC_INFORMATION ObjectInfo; \ - Status = ZwQueryObject(Handle, ObjectBasicInformation, \ - &ObjectInfo, sizeof ObjectInfo, NULL); \ - ok_eq_hex(Status, STATUS_SUCCESS); \ - ok_eq_ulong(ObjectInfo.PointerCount, Pointers); \ - ok_eq_ulong(ObjectInfo.HandleCount, Handles); \ -} while (0) - -static POBJECT_TYPE ObDirectoryObjectType; - -static -VOID -TestReference( - IN HANDLE Handle, - IN PUNICODE_STRING Name OPTIONAL, - IN PUNICODE_STRING NameUpper OPTIONAL, - IN BOOLEAN CaseSensitive, - IN ULONG AdditionalReferences, - IN BOOLEAN Permanent) -{ - NTSTATUS Status; - LONG_PTR Ret; - PVOID Object = NULL; - PVOID Object2 = NULL; - PVOID Object3 = NULL; - PVOID Object4 = NULL; - - CheckObject(Handle, 2LU + AdditionalReferences, 1LU); - - Status = ObReferenceObjectByHandle(Handle, DIRECTORY_ALL_ACCESS, NULL, KernelMode, &Object, NULL); - ok_eq_hex(Status, STATUS_SUCCESS); - ok(Object != NULL, "ObReferenceObjectByHandle returned NULL object\n"); - CheckObject(Handle, 3LU + AdditionalReferences, 1LU); - - Status = ObReferenceObjectByHandle(Handle, DIRECTORY_ALL_ACCESS, NULL, KernelMode, &Object2, NULL); - ok_eq_hex(Status, STATUS_SUCCESS); - ok(Object != NULL, "ObReferenceObjectByHandle returned NULL object\n"); - ok_eq_pointer(Object, Object2); - CheckObject(Handle, 4LU + AdditionalReferences, 1LU); - - if (!skip(Object != NULL, "No object to reference!\n")) - { - Ret = ObReferenceObject(Object); - ok_eq_longptr(Ret, (LONG_PTR)4 + AdditionalReferences); - CheckObject(Handle, 5LU + AdditionalReferences, 1LU); - - Ret = ObReferenceObject(Object); - ok_eq_longptr(Ret, (LONG_PTR)5 + AdditionalReferences); - CheckObject(Handle, 6LU + AdditionalReferences, 1LU); - - Status = ObReferenceObjectByPointer(Object, DIRECTORY_ALL_ACCESS, NULL, KernelMode); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckObject(Handle, 7LU + AdditionalReferences, 1LU); - - Status = ObReferenceObjectByPointer(Object, DIRECTORY_ALL_ACCESS, NULL, KernelMode); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckObject(Handle, 8LU + AdditionalReferences, 1LU); - - Ret = ObDereferenceObject(Object); - ok_eq_longptr(Ret, (LONG_PTR)6 + AdditionalReferences); - CheckObject(Handle, 7LU + AdditionalReferences, 1LU); - - Ret = ObDereferenceObject(Object); - ok_eq_longptr(Ret, (LONG_PTR)5 + AdditionalReferences); - CheckObject(Handle, 6LU + AdditionalReferences, 1LU); - - Ret = ObDereferenceObject(Object); - ok_eq_longptr(Ret, (LONG_PTR)4 + AdditionalReferences); - CheckObject(Handle, 5LU + AdditionalReferences, 1LU); - - Ret = ObDereferenceObject(Object); - ok_eq_longptr(Ret, (LONG_PTR)3 + AdditionalReferences); - CheckObject(Handle, 4LU + AdditionalReferences, 1LU); - } - - if (Name && !skip(ObDirectoryObjectType != NULL, "No directory object type\n")) - { - Status = ObReferenceObjectByName(Name, 0, NULL, DIRECTORY_ALL_ACCESS, ObDirectoryObjectType, KernelMode, NULL, &Object3); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckObject(Handle, 5LU + AdditionalReferences, 1LU); - } - - if (NameUpper && !skip(ObDirectoryObjectType != NULL, "No directory object type\n")) - { - Status = ObReferenceObjectByName(NameUpper, 0, NULL, DIRECTORY_ALL_ACCESS, ObDirectoryObjectType, KernelMode, NULL, &Object4); - ok_eq_hex(Status, CaseSensitive ? STATUS_OBJECT_NAME_NOT_FOUND : STATUS_SUCCESS); - CheckObject(Handle, 5LU + AdditionalReferences + !CaseSensitive, 1LU); - } - - if (NameUpper && !skip(Object4 != NULL, "No object to dereference\n")) - { - Ret = ObDereferenceObject(Object4); - ok_eq_longptr(Ret, (LONG_PTR)4 + AdditionalReferences); - CheckObject(Handle, 5LU + AdditionalReferences, 1LU); - } - if (Name && !skip(Object3 != NULL, "No object to dereference\n")) - { - Ret = ObDereferenceObject(Object3); - ok_eq_longptr(Ret, (LONG_PTR)3 + AdditionalReferences); - CheckObject(Handle, 4LU + AdditionalReferences, 1LU); - } - if (!skip(Object2 != NULL, "No object to dereference\n")) - { - Ret = ObDereferenceObject(Object2); - ok_eq_longptr(Ret, (LONG_PTR)2 + AdditionalReferences); - CheckObject(Handle, 3LU + AdditionalReferences, 1LU); - } - if (!skip(Object != NULL, "No object to dereference\n")) - { - Ret = ObDereferenceObject(Object); - ok_eq_longptr(Ret, (LONG_PTR)1 + AdditionalReferences); - CheckObject(Handle, 2LU + AdditionalReferences, 1LU); - } - - CheckObject(Handle, 2LU + AdditionalReferences, 1LU); - - if (Permanent) - { - Status = ZwMakeTemporaryObject(Handle); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckObject(Handle, 2LU + AdditionalReferences, 1LU); - - Status = ZwMakeTemporaryObject(Handle); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckObject(Handle, 2LU + AdditionalReferences, 1LU); - } -} - -START_TEST(ObReference) -{ - NTSTATUS Status; - NTSTATUS ExceptionStatus; - HANDLE DirectoryHandle = NULL; - OBJECT_ATTRIBUTES ObjectAttributes; - UNICODE_STRING Name, *pName; - UNICODE_STRING NameUpper, *pNameUpper; - ULONG i; - struct - { - PWSTR Name; - ULONG Flags; - ULONG AdditionalReferences; - } Tests[] = - { - { NULL, 0, 0 }, - { NULL, OBJ_CASE_INSENSITIVE, 0 }, - { NULL, OBJ_KERNEL_HANDLE, 0 }, - { NULL, OBJ_PERMANENT, 0 }, - { NULL, OBJ_CASE_INSENSITIVE | OBJ_PERMANENT, 0 }, - { NULL, OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, 0 }, - { NULL, OBJ_KERNEL_HANDLE | OBJ_PERMANENT, 0 }, - { NULL, OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE | OBJ_PERMANENT, 0 }, - { L"\\YayDirectory0", 0, 1 }, - { L"\\YayDirectory1", OBJ_CASE_INSENSITIVE, 1 }, - { L"\\YayDirectory2", OBJ_KERNEL_HANDLE, 1 }, - { L"\\YayDirectory3", OBJ_PERMANENT, 1 }, - { L"\\YayDirectory4", OBJ_CASE_INSENSITIVE | OBJ_PERMANENT, 1 }, - { L"\\YayDirectory5", OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, 1 }, - { L"\\YayDirectory6", OBJ_KERNEL_HANDLE | OBJ_PERMANENT, 1 }, - { L"\\YayDirectory7", OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE | OBJ_PERMANENT, 1 }, - }; - HANDLE ObjectTypeHandle; - - /* ObReferenceObjectByName needs the object type... so get it... */ - RtlInitUnicodeString(&Name, L"\\ObjectTypes\\Directory"); - InitializeObjectAttributes(&ObjectAttributes, &Name, OBJ_KERNEL_HANDLE, NULL, NULL); - Status = ObOpenObjectByName(&ObjectAttributes, NULL, KernelMode, NULL, 0, NULL, &ObjectTypeHandle); - ok_eq_hex(Status, STATUS_SUCCESS); - ok(ObjectTypeHandle != NULL, "ObjectTypeHandle = NULL\n"); - if (!skip(Status == STATUS_SUCCESS && ObjectTypeHandle, "No handle\n")) - { - Status = ObReferenceObjectByHandle(ObjectTypeHandle, 0, NULL, KernelMode, (PVOID)&ObDirectoryObjectType, NULL); - ok_eq_hex(Status, STATUS_SUCCESS); - ok(ObDirectoryObjectType != NULL, "ObDirectoryObjectType = NULL\n"); - Status = ZwClose(ObjectTypeHandle); - ok_eq_hex(Status, STATUS_SUCCESS); - } - - for (i = 0; i < sizeof Tests / sizeof Tests[0]; ++i) - { - DPRINT("Run %d\n", i); - if (Tests[i].Name) - { - RtlInitUnicodeString(&Name, Tests[i].Name); - pName = &Name; - Status = RtlUpcaseUnicodeString(&NameUpper, &Name, TRUE); - ok_eq_hex(Status, STATUS_SUCCESS); - if (skip(Status == STATUS_SUCCESS, "No upper case name\n")) - pNameUpper = NULL; - else - pNameUpper = &NameUpper; - } - else - { - pName = NULL; - pNameUpper = NULL; - } - InitializeObjectAttributes(&ObjectAttributes, pName, Tests[i].Flags, NULL, NULL); - Status = ZwCreateDirectoryObject(&DirectoryHandle, DIRECTORY_ALL_ACCESS, &ObjectAttributes); - ok_eq_hex(Status, STATUS_SUCCESS); - ok(DirectoryHandle != NULL, "DirectoryHandle = NULL\n"); - - if (!skip(Status == STATUS_SUCCESS && DirectoryHandle, "Cannot proceed without an object")) - { - TestReference(DirectoryHandle, pName, pNameUpper, FALSE, Tests[i].AdditionalReferences, (Tests[i].Flags & OBJ_PERMANENT) != 0); - /* try again for good measure */ - TestReference(DirectoryHandle, pName, pNameUpper, FALSE, Tests[i].AdditionalReferences, FALSE); - - Status = ZwClose(DirectoryHandle); - ok_eq_hex(Status, STATUS_SUCCESS); - DirectoryHandle = NULL; - } - - if (pNameUpper) - RtlFreeUnicodeString(pNameUpper); - } - - if (DirectoryHandle) - { - Status = ZwClose(DirectoryHandle); - ok_eq_hex(Status, STATUS_SUCCESS); - } - - /* parameter tests */ - /* bugcheck at APC_LEVEL - Status = ObReferenceObject(NULL); - Status = ObReferenceObjectByPointer(NULL, 0, NULL, UserMode); - Status = ObReferenceObjectByPointer(NULL, 0, NULL, KernelMode);*/ - - ExceptionStatus = STATUS_SUCCESS; - _SEH2_TRY { - /* TODO: this belongs in an ObHandle test if we ever have one */ - /* NtClose must accept everything */ - DPRINT("Closing null handle (NtClose)\n"); - Status = NtClose(NULL); - ok_eq_hex(Status, STATUS_INVALID_HANDLE); - DPRINT("Closing null kernel handle (NtClose)\n"); - Status = NtClose((HANDLE)0x80000000); - ok_eq_hex(Status, STATUS_INVALID_HANDLE); - DPRINT("Closing -1 handle (NtClose)\n"); - Status = NtClose((HANDLE)0x7FFFFFFF); - ok_eq_hex(Status, STATUS_INVALID_HANDLE); - DPRINT("Closing -1 kernel handle (NtClose)\n"); - Status = NtClose((HANDLE)0xFFFFFFFF); - ok_eq_hex(Status, STATUS_INVALID_HANDLE); - DPRINT("Closing 123 handle (NtClose)\n"); - Status = NtClose((HANDLE)123); - ok_eq_hex(Status, STATUS_INVALID_HANDLE); - DPRINT("Closing 123 kernel handle (NtClose)\n"); - Status = NtClose((HANDLE)(123 | 0x80000000)); - ok_eq_hex(Status, STATUS_INVALID_HANDLE); - - /* ObCloseHandle with UserMode accepts everything */ - DPRINT("Closing null handle (ObCloseHandle, UserMode)\n"); - Status = ObCloseHandle(NULL, UserMode); - ok_eq_hex(Status, STATUS_INVALID_HANDLE); - DPRINT("Closing null kernel handle (ObCloseHandle, UserMode)\n"); - Status = ObCloseHandle((HANDLE)0x80000000, UserMode); - ok_eq_hex(Status, STATUS_INVALID_HANDLE); - DPRINT("Closing -1 handle (ObCloseHandle, UserMode)\n"); - Status = ObCloseHandle((HANDLE)0x7FFFFFFF, UserMode); - ok_eq_hex(Status, STATUS_INVALID_HANDLE); - DPRINT("Closing -1 kernel handle (ObCloseHandle, UserMode)\n"); - Status = ObCloseHandle((HANDLE)0xFFFFFFFF, UserMode); - ok_eq_hex(Status, STATUS_INVALID_HANDLE); - DPRINT("Closing 123 handle (ObCloseHandle, UserMode)\n"); - Status = ObCloseHandle((HANDLE)123, UserMode); - ok_eq_hex(Status, STATUS_INVALID_HANDLE); - DPRINT("Closing 123 kernel handle (ObCloseHandle, UserMode)\n"); - Status = ObCloseHandle((HANDLE)(123 | 0x80000000), UserMode); - ok_eq_hex(Status, STATUS_INVALID_HANDLE); - - /* ZwClose only accepts 0 and -1 */ - DPRINT("Closing null handle (ZwClose)\n"); - Status = ZwClose(NULL); - ok_eq_hex(Status, STATUS_INVALID_HANDLE); - DPRINT("Closing null kernel handle (ZwClose)\n"); - Status = ZwClose((HANDLE)0x80000000); - ok_eq_hex(Status, STATUS_INVALID_HANDLE); - /* INVALID_KERNEL_HANDLE, 0x7FFFFFFF - Status = ZwClose((HANDLE)0x7FFFFFFF);*/ - DPRINT("Closing -1 kernel handle (ZwClose)\n"); - Status = ZwClose((HANDLE)0xFFFFFFFF); - ok_eq_hex(Status, STATUS_INVALID_HANDLE); - /* INVALID_KERNEL_HANDLE, 0x7B, 1, 0, 0 - Status = ZwClose((HANDLE)123); - Status = ZwClose((HANDLE)(123 | 0x80000000));*/ - - /* ObCloseHandle with KernelMode accepts only 0 and -1 */ - DPRINT("Closing null handle (ObCloseHandle, KernelMode)\n"); - Status = ObCloseHandle(NULL, KernelMode); - ok_eq_hex(Status, STATUS_INVALID_HANDLE); - DPRINT("Closing null kernel handle (ObCloseHandle, KernelMode)\n"); - Status = ObCloseHandle((HANDLE)0x80000000, KernelMode); - ok_eq_hex(Status, STATUS_INVALID_HANDLE); - /* INVALID_KERNEL_HANDLE, 0x7FFFFFFF, 1, 0, 0 - Status = ObCloseHandle((HANDLE)0x7FFFFFFF, KernelMode);*/ - DPRINT("Closing -1 kernel handle (ObCloseHandle, KernelMode)\n"); - Status = ObCloseHandle((HANDLE)0xFFFFFFFF, KernelMode); - ok_eq_hex(Status, STATUS_INVALID_HANDLE); - /* INVALID_KERNEL_HANDLE, 0x7B, 1, 0, 0 - Status = ObCloseHandle((HANDLE)123, KernelMode); - Status = ObCloseHandle((HANDLE)(123 | 0x80000000), KernelMode);*/ - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - ExceptionStatus = _SEH2_GetExceptionCode(); - } _SEH2_END; - ok_eq_hex(ExceptionStatus, STATUS_SUCCESS); - - if (ObDirectoryObjectType) - { - ObDereferenceObject(ObDirectoryObjectType); - ObDirectoryObjectType = NULL; - } -} diff --git a/rostests/kmtests/ntos_ob/ObType.c b/rostests/kmtests/ntos_ob/ObType.c deleted file mode 100644 index e428aa0fd6c..00000000000 --- a/rostests/kmtests/ntos_ob/ObType.c +++ /dev/null @@ -1,446 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: LGPLv2+ - See COPYING.LIB in the top level directory - * PURPOSE: Kernel-Mode Test Suite Ob Regressions KM-Test - * PROGRAMMER: Aleksey Bragin - * Thomas Faber - */ - -/* TODO: split this into multiple tests! ObLife, ObHandle, ObName, ... */ - -#include - -#define NDEBUG -#include - -#define CheckObject(Handle, Pointers, Handles) do \ -{ \ - PUBLIC_OBJECT_BASIC_INFORMATION ObjectInfo; \ - Status = ZwQueryObject(Handle, ObjectBasicInformation, \ - &ObjectInfo, sizeof ObjectInfo, NULL); \ - ok_eq_hex(Status, STATUS_SUCCESS); \ - ok_eq_ulong(ObjectInfo.PointerCount, Pointers); \ - ok_eq_ulong(ObjectInfo.HandleCount, Handles); \ -} while (0) - -#define NUM_OBTYPES 5 - -typedef struct _MY_OBJECT1 -{ - ULONG Something1; -} MY_OBJECT1, *PMY_OBJECT1; - -typedef struct _MY_OBJECT2 -{ - ULONG Something1; - ULONG SomeLong[10]; -} MY_OBJECT2, *PMY_OBJECT2; - -static POBJECT_TYPE ObTypes[NUM_OBTYPES]; -static UNICODE_STRING ObTypeName[NUM_OBTYPES]; -static UNICODE_STRING ObName[NUM_OBTYPES]; -static OBJECT_TYPE_INITIALIZER ObTypeInitializer[NUM_OBTYPES]; -static UNICODE_STRING ObDirectoryName; -static OBJECT_ATTRIBUTES ObDirectoryAttributes; -static OBJECT_ATTRIBUTES ObAttributes[NUM_OBTYPES]; -static PVOID ObBody[NUM_OBTYPES]; -static HANDLE ObHandle1[NUM_OBTYPES]; -static HANDLE DirectoryHandle; - -typedef struct _COUNTS -{ - USHORT Dump; - USHORT Open; - USHORT Close; - USHORT Delete; - USHORT Parse; - USHORT OkayToClose; - USHORT QueryName; -} COUNTS, *PCOUNTS; -static COUNTS Counts; - -static -VOID -NTAPI -DumpProc( - IN PVOID Object, - IN POB_DUMP_CONTROL DumpControl) -{ - DPRINT("DumpProc() called\n"); - ++Counts.Dump; -} - -static -NTSTATUS -NTAPI -OpenProc( - IN OB_OPEN_REASON OpenReason, - IN PEPROCESS Process, - IN PVOID Object, - IN ACCESS_MASK GrantedAccess, - IN ULONG HandleCount) -{ - DPRINT("OpenProc() 0x%p, OpenReason %d, HandleCount %lu, AccessMask 0x%lX\n", - Object, OpenReason, HandleCount, GrantedAccess); - ++Counts.Open; - return STATUS_SUCCESS; -} - -static -VOID -NTAPI -CloseProc( - IN PEPROCESS Process, - IN PVOID Object, - IN ACCESS_MASK GrantedAccess, - IN ULONG ProcessHandleCount, - IN ULONG SystemHandleCount) -{ - DPRINT("CloseProc() 0x%p, ProcessHandleCount %lu, SystemHandleCount %lu, AccessMask 0x%lX\n", - Object, ProcessHandleCount, SystemHandleCount, GrantedAccess); - ++Counts.Close; -} - -static -VOID -NTAPI -DeleteProc( - IN PVOID Object) -{ - DPRINT("DeleteProc() 0x%p\n", Object); - ++Counts.Delete; -} - -static -NTSTATUS -NTAPI -ParseProc( - IN PVOID ParseObject, - IN PVOID ObjectType, - IN OUT PACCESS_STATE AccessState, - IN KPROCESSOR_MODE AccessMode, - IN ULONG Attributes, - IN OUT PUNICODE_STRING CompleteName, - IN OUT PUNICODE_STRING RemainingName, - IN OUT PVOID Context OPTIONAL, - IN PSECURITY_QUALITY_OF_SERVICE SecurityQos OPTIONAL, - OUT PVOID *Object) -{ - DPRINT("ParseProc() called\n"); - *Object = NULL; - - ++Counts.Parse; - return STATUS_OBJECT_NAME_NOT_FOUND;//STATUS_SUCCESS; -} - -static -BOOLEAN -NTAPI -OkayToCloseProc( - IN PEPROCESS Process OPTIONAL, - IN PVOID Object, - IN HANDLE Handle, - IN KPROCESSOR_MODE AccessMode) -{ - DPRINT("OkayToCloseProc() 0x%p, Handle 0x%p, AccessMask 0x%lX\n", - Object, Handle, AccessMode); - ++Counts.OkayToClose; - return TRUE; -} - -static -NTSTATUS -NTAPI -QueryNameProc( - IN PVOID Object, - IN BOOLEAN HasObjectName, - OUT POBJECT_NAME_INFORMATION ObjectNameInfo, - IN ULONG Length, - OUT PULONG ReturnLength, - IN KPROCESSOR_MODE AccessMode) -{ - DPRINT("QueryNameProc() 0x%p, HasObjectName %d, Len %lu, AccessMask 0x%lX\n", - Object, HasObjectName, Length, AccessMode); - ++Counts.QueryName; - - ObjectNameInfo = NULL; - ReturnLength = 0; - return STATUS_OBJECT_NAME_NOT_FOUND; -} - -static -VOID -ObtCreateObjectTypes(VOID) -{ - INT i; - NTSTATUS Status; - struct - { - WCHAR DirectoryName[sizeof "\\ObjectTypes\\" - 1]; - WCHAR TypeName[15]; - } Name; - OBJECT_ATTRIBUTES ObjectAttributes; - HANDLE ObjectTypeHandle; - UNICODE_STRING ObjectPath; - - RtlCopyMemory(&Name.DirectoryName, L"\\ObjectTypes\\", sizeof Name.DirectoryName); - - for (i = 0; i < NUM_OBTYPES; ++i) - { - Status = RtlStringCbPrintfW(Name.TypeName, sizeof Name.TypeName, L"MyObjectType%x", i); - ASSERT(NT_SUCCESS(Status)); - RtlInitUnicodeString(&ObTypeName[i], Name.TypeName); - DPRINT("Creating object type %wZ\n", &ObTypeName[i]); - - RtlZeroMemory(&ObTypeInitializer[i], sizeof ObTypeInitializer[i]); - ObTypeInitializer[i].Length = sizeof ObTypeInitializer[i]; - ObTypeInitializer[i].PoolType = NonPagedPool; - ObTypeInitializer[i].MaintainHandleCount = TRUE; - ObTypeInitializer[i].ValidAccessMask = OBJECT_TYPE_ALL_ACCESS; - - // Test for invalid parameter - // FIXME: Make it more exact, to see which params Win2k3 checks - // existence of - Status = ObCreateObjectType(&ObTypeName[i], &ObTypeInitializer[i], NULL, &ObTypes[i]); - ok_eq_hex(Status, STATUS_INVALID_PARAMETER); - - ObTypeInitializer[i].CloseProcedure = CloseProc; - ObTypeInitializer[i].DeleteProcedure = DeleteProc; - ObTypeInitializer[i].DumpProcedure = DumpProc; - ObTypeInitializer[i].OpenProcedure = OpenProc; - ObTypeInitializer[i].ParseProcedure = ParseProc; - ObTypeInitializer[i].OkayToCloseProcedure = OkayToCloseProc; - ObTypeInitializer[i].QueryNameProcedure = QueryNameProc; - //ObTypeInitializer[i].SecurityProcedure = SecurityProc; - - Status = ObCreateObjectType(&ObTypeName[i], &ObTypeInitializer[i], NULL, &ObTypes[i]); - if (Status == STATUS_OBJECT_NAME_COLLISION) - { - /* as we cannot delete the object types, get a pointer if they - * already exist */ - RtlInitUnicodeString(&ObjectPath, Name.DirectoryName); - InitializeObjectAttributes(&ObjectAttributes, &ObjectPath, OBJ_KERNEL_HANDLE, NULL, NULL); - Status = ObOpenObjectByName(&ObjectAttributes, NULL, KernelMode, NULL, 0, NULL, &ObjectTypeHandle); - ok_eq_hex(Status, STATUS_SUCCESS); - ok(ObjectTypeHandle != NULL, "ObjectTypeHandle = NULL\n"); - if (!skip(Status == STATUS_SUCCESS && ObjectTypeHandle, "No handle\n")) - { - Status = ObReferenceObjectByHandle(ObjectTypeHandle, 0, NULL, KernelMode, (PVOID)&ObTypes[i], NULL); - ok_eq_hex(Status, STATUS_SUCCESS); - if (!skip(Status == STATUS_SUCCESS && ObTypes[i], "blah\n")) - { - ObTypes[i]->TypeInfo.CloseProcedure = CloseProc; - ObTypes[i]->TypeInfo.DeleteProcedure = DeleteProc; - ObTypes[i]->TypeInfo.DumpProcedure = DumpProc; - ObTypes[i]->TypeInfo.OpenProcedure = OpenProc; - ObTypes[i]->TypeInfo.ParseProcedure = ParseProc; - ObTypes[i]->TypeInfo.OkayToCloseProcedure = OkayToCloseProc; - ObTypes[i]->TypeInfo.QueryNameProcedure = QueryNameProc; - } - Status = ZwClose(ObjectTypeHandle); - } - } - - ok_eq_hex(Status, STATUS_SUCCESS); - ok(ObTypes[i] != NULL, "ObType = NULL\n"); - } -} - -static -VOID -ObtCreateDirectory(VOID) -{ - NTSTATUS Status; - - RtlInitUnicodeString(&ObDirectoryName, L"\\ObtDirectory"); - InitializeObjectAttributes(&ObDirectoryAttributes, &ObDirectoryName, OBJ_KERNEL_HANDLE | OBJ_PERMANENT | OBJ_CASE_INSENSITIVE, NULL, NULL); - Status = ZwCreateDirectoryObject(&DirectoryHandle, DELETE, &ObDirectoryAttributes); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckObject(DirectoryHandle, 3LU, 1LU); -} - -#define CheckCounts(OpenCount, CloseCount, DeleteCount, ParseCount, \ - OkayToCloseCount, QueryNameCount) do \ -{ \ - ok_eq_uint(Counts.Open, OpenCount); \ - ok_eq_uint(Counts.Close, CloseCount); \ - ok_eq_uint(Counts.Delete, DeleteCount); \ - ok_eq_uint(Counts.Parse, ParseCount); \ - ok_eq_uint(Counts.OkayToClose, OkayToCloseCount); \ - ok_eq_uint(Counts.QueryName, QueryNameCount); \ -} while (0) - -#define SaveCounts(Save) memcpy(&Save, &Counts, sizeof Counts) - -/* TODO: make this the same as NUM_OBTYPES */ -#define NUM_OBTYPES2 2 -static -VOID -ObtCreateObjects(VOID) -{ - NTSTATUS Status; - WCHAR Name[NUM_OBTYPES2][MAX_PATH]; - COUNTS SaveCounts; - INT i; - ACCESS_MASK Access[NUM_OBTYPES2] = { STANDARD_RIGHTS_ALL, GENERIC_ALL }; - ULONG ObjectSize[NUM_OBTYPES2] = { sizeof(MY_OBJECT1), sizeof(MY_OBJECT2) }; - - // Create two objects - for (i = 0; i < NUM_OBTYPES2; ++i) - { - ASSERT(sizeof Name[i] == MAX_PATH * sizeof(WCHAR)); - Status = RtlStringCbPrintfW(Name[i], sizeof Name[i], L"\\ObtDirectory\\MyObject%d", i + 1); - ASSERT(Status == STATUS_SUCCESS); - RtlInitUnicodeString(&ObName[i], Name[i]); - InitializeObjectAttributes(&ObAttributes[i], &ObName[i], OBJ_CASE_INSENSITIVE, NULL, NULL); - } - CheckObject(DirectoryHandle, 3LU, 1LU); - - for (i = 0; i < NUM_OBTYPES2; ++i) - { - Status = ObCreateObject(KernelMode, ObTypes[i], &ObAttributes[i], KernelMode, NULL, ObjectSize[i], 0L, 0L, &ObBody[i]); - ok_eq_hex(Status, STATUS_SUCCESS); - } - - SaveCounts(SaveCounts); - - // Insert them - for (i = 0; i < NUM_OBTYPES2; ++i) - { - CheckObject(DirectoryHandle, 3LU + i, 1LU); - Status = ObInsertObject(ObBody[i], NULL, Access[i], 0, &ObBody[i], &ObHandle1[i]); - ok_eq_hex(Status, STATUS_SUCCESS); - ok(ObBody[i] != NULL, "Object body = NULL\n"); - ok(ObHandle1[i] != NULL, "Handle = NULL\n"); - CheckObject(ObHandle1[i], 3LU, 1LU); - CheckCounts(SaveCounts.Open + 1, SaveCounts.Close, SaveCounts.Delete, SaveCounts.Parse, SaveCounts.OkayToClose, SaveCounts.QueryName); - SaveCounts(SaveCounts); - CheckObject(DirectoryHandle, 4LU + i, 1LU); - } - - //DPRINT1("%d %d %d %d %d %d %d\n", DumpCount, OpenCount, CloseCount, DeleteCount, ParseCount, OkayToCloseCount, QueryNameCount); - CheckCounts(SaveCounts.Open, SaveCounts.Close, SaveCounts.Delete, SaveCounts.Parse, SaveCounts.OkayToClose, SaveCounts.QueryName); -} - -static -VOID -ObtClose( - BOOLEAN Clean, - BOOLEAN AlternativeMethod) -{ - NTSTATUS Status; - LONG_PTR Ret; - PVOID TypeObject; - INT i; - UNICODE_STRING ObPathName[NUM_OBTYPES]; - WCHAR Name[MAX_PATH]; - - // Close what we have opened and free what we allocated - for (i = 0; i < NUM_OBTYPES2; ++i) - { - if (!skip(ObBody[i] != NULL, "Nothing to dereference\n")) - { - if (ObHandle1[i]) CheckObject(ObHandle1[i], 3LU, 1LU); - Ret = ObDereferenceObject(ObBody[i]); - ok_eq_longptr(Ret, (LONG_PTR)1); - if (ObHandle1[i]) CheckObject(ObHandle1[i], 2LU, 1LU); - ObBody[i] = NULL; - } - if (!skip(ObHandle1[i] != NULL, "Nothing to close\n")) - { - Status = ZwClose(ObHandle1[i]); - ok_eq_hex(Status, STATUS_SUCCESS); - ObHandle1[i] = NULL; - } - } - - if (skip(Clean, "Not cleaning up, as requested. Use ObTypeClean to clean up\n")) - return; - - // Now we have to get rid of a directory object - // Since it is permanent, we have to firstly make it temporary - // and only then kill - // (this procedure is described in DDK) - if (!skip(DirectoryHandle != NULL, "No directory handle\n")) - { - CheckObject(DirectoryHandle, 3LU, 1LU); - - Status = ZwMakeTemporaryObject(DirectoryHandle); - ok_eq_hex(Status, STATUS_SUCCESS); - CheckObject(DirectoryHandle, 3LU, 1LU); - - Status = ZwClose(DirectoryHandle); - ok_eq_hex(Status, STATUS_SUCCESS); - } - - /* we don't delete the object types we created. It makes Windows unstable. - * TODO: perhaps make it work in ROS anyway */ - return; - if (!AlternativeMethod) - { - for (i = 0; i < NUM_OBTYPES; ++i) - if (!skip(ObTypes[i] != NULL, "No object type to delete\n")) - { - Ret = ObDereferenceObject(ObTypes[i]); - ok_eq_longptr(Ret, (LONG_PTR)0); - ObTypes[i] = NULL; - } - } - else - { - for (i = 0; i < NUM_OBTYPES; ++i) - { - if (!skip(ObTypes[i] != NULL, "No object type to delete\n")) - { - Status = RtlStringCbPrintfW(Name, sizeof Name, L"\\ObjectTypes\\MyObjectType%d", i); - RtlInitUnicodeString(&ObPathName[i], Name); - Status = ObReferenceObjectByName(&ObPathName[i], OBJ_CASE_INSENSITIVE, NULL, 0L, NULL, KernelMode, NULL, &TypeObject); - - Ret = ObDereferenceObject(TypeObject); - ok_eq_longptr(Ret, (LONG_PTR)2); - Ret = ObDereferenceObject(TypeObject); - ok_eq_longptr(Ret, (LONG_PTR)1); - DPRINT("Reference Name %wZ = %p, ObTypes[%d] = %p\n", - ObPathName[i], TypeObject, i, ObTypes[i]); - ObTypes[i] = NULL; - } - } - } -} - -static -VOID -TestObjectType( - IN BOOLEAN Clean) -{ - RtlZeroMemory(&Counts, sizeof Counts); - - ObtCreateObjectTypes(); - DPRINT("ObtCreateObjectTypes() done\n"); - - ObtCreateDirectory(); - DPRINT("ObtCreateDirectory() done\n"); - - if (!skip(ObTypes[0] != NULL, "No object types!\n")) - ObtCreateObjects(); - DPRINT("ObtCreateObjects() done\n"); - - ObtClose(Clean, FALSE); -} - -START_TEST(ObType) -{ - TestObjectType(TRUE); -} - -/* run this to see the objects created in user mode */ -START_TEST(ObTypeNoClean) -{ - TestObjectType(FALSE); -} - -/* run this to clean up after ObTypeNoClean */ -START_TEST(ObTypeClean) -{ - ObtClose(TRUE, FALSE); -} diff --git a/rostests/kmtests/readme.txt b/rostests/kmtests/readme.txt deleted file mode 100644 index 7a328b5d6d2..00000000000 --- a/rostests/kmtests/readme.txt +++ /dev/null @@ -1,11 +0,0 @@ -This directory contains the ReactOS Kernel-Mode Test Suite. - -The kmtest, kmtest_drv and include subdirectories contain the -testing framework infrastructure, other directories contain tests. - -The example subdirectory contains a set of small tests that can be used as -examples and templates. - - -See http://www.reactos.org/wiki/KmtestsHowto for more -information and a guide on how to use the framework. diff --git a/rostests/kmtests/rtl/RtlAvlTree.c b/rostests/kmtests/rtl/RtlAvlTree.c deleted file mode 100644 index 999245a424a..00000000000 --- a/rostests/kmtests/rtl/RtlAvlTree.c +++ /dev/null @@ -1,4 +0,0 @@ -/* this is a little hacky, but better than duplicating the code (for now) */ -#define RTL_USE_AVL_TABLES -#define Test_RtlSplayTree Test_RtlAvlTree -#include "RtlSplayTree.c" diff --git a/rostests/kmtests/rtl/RtlMemory.c b/rostests/kmtests/rtl/RtlMemory.c deleted file mode 100644 index c33f0561a6d..00000000000 --- a/rostests/kmtests/rtl/RtlMemory.c +++ /dev/null @@ -1,501 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Runtime library memory functions test - * PROGRAMMER: Thomas Faber - */ - -#include -__declspec(dllimport) void __stdcall RtlMoveMemory(void *, const void *, size_t); -__declspec(dllimport) void __stdcall RtlFillMemory(void *, size_t, unsigned char); - -#define KMT_EMULATE_KERNEL -#include - -#ifdef __GNUC__ -#pragma GCC diagnostic ignored "-Wnonnull" -#endif /* defined __GNUC__ */ - -static -VOID -MakeBuffer( - OUT PVOID Buffer, - ...) -{ - PUCHAR OutBuffer = Buffer; - INT Count; - INT Value; - va_list Arguments; - - va_start(Arguments, Buffer); - - while (1) - { - Count = va_arg(Arguments, INT); - if (!Count) - break; - ASSERT(Count > 0); - - Value = va_arg(Arguments, INT); - while (Count--) - *OutBuffer++ = Value; - } - - va_end(Arguments); -} - -static -BOOLEAN -CheckBuffer( - IN const VOID *Buffer, - ...) -{ - PCUCHAR OutBuffer = Buffer; - INT Count; - INT Value; - va_list Arguments; - - va_start(Arguments, Buffer); - - while (1) - { - Count = va_arg(Arguments, INT); - if (!Count) - break; - ASSERT(Count > 0); - - Value = va_arg(Arguments, INT); - while (Count--) - if (*OutBuffer++ != Value) - { - --OutBuffer; - trace("CheckBuffer failed at offset %d, value %x, expected %x\n", OutBuffer - (PCUCHAR)Buffer, *OutBuffer, Value); - return FALSE; - } - } - - va_end(Arguments); - return TRUE; -} - -static -VOID -MakePattern( - OUT PVOID Buffer, - ...) -{ - PUCHAR OutBuffer = Buffer; - INT Count, Repeat, i; - INT Values[16]; - va_list Arguments; - - va_start(Arguments, Buffer); - - while (1) - { - Count = va_arg(Arguments, INT); - if (!Count) - break; - ASSERT(Count > 0 && Count < sizeof Values / sizeof Values[0]); - - Repeat = va_arg(Arguments, INT); - ASSERT(Repeat > 0); - - for (i = 0; i < Count; ++i) - Values[i] = va_arg(Arguments, INT); - - while (Repeat--) - for (i = 0; i < Count; ++i) - *OutBuffer++ = Values[i]; - } - - va_end(Arguments); -} - -static -BOOLEAN -CheckPattern( - IN const VOID *Buffer, - ...) -{ - PCUCHAR OutBuffer = Buffer; - INT Count, Repeat, i; - INT Values[16]; - va_list Arguments; - - va_start(Arguments, Buffer); - - while (1) - { - Count = va_arg(Arguments, INT); - if (!Count) - break; - ASSERT(Count > 0 && Count < sizeof Values / sizeof Values[0]); - - Repeat = va_arg(Arguments, INT); - ASSERT(Repeat > 0); - - for (i = 0; i < Count; ++i) - Values[i] = va_arg(Arguments, INT); - - while (Repeat--) - for (i = 0; i < Count; ++i) - if (*OutBuffer++ != Values[i]) - { - --OutBuffer; - trace("CheckPattern failed at offset %d, value %x, expected %x\n", OutBuffer - (PCUCHAR)Buffer, *OutBuffer, Values[i]); - return FALSE; - } - } - - va_end(Arguments); - return TRUE; -} - -START_TEST(RtlMemory) -{ - NTSTATUS Status; - UCHAR Buffer[513]; - const SIZE_T Size = 512; - const SIZE_T HalfSize = Size / 2; - SIZE_T RetSize; - KIRQL Irql; - ULONG i; - - KeRaiseIrql(HIGH_LEVEL, &Irql); - /* zero everything behind 'Size'. Tests will check that this wasn't changed. - * TODO: use guarded memory for this! */ - MakeBuffer(Buffer + Size, sizeof Buffer - Size, 0, 0); - - /* test our helper functions first */ - MakeBuffer(Buffer, HalfSize, 0x55, HalfSize, 0xAA, 0); - for (i = 0; i < HalfSize; ++i) - ok_eq_uint(Buffer[i], 0x55); - for (i = HalfSize; i < Size; ++i) - ok_eq_uint(Buffer[i], 0xAA); - ok_bool_true(CheckBuffer(Buffer, HalfSize, 0x55, HalfSize, 0xAA, 1, 0, 0), "CheckBuffer"); - - MakePattern(Buffer, 3, 20, 0x11, 0x22, 0x33, 1, 4, 0x44, 0); - for (i = 0; i < 60; i += 3) - { - ok_eq_uint(Buffer[i+0], 0x11); - ok_eq_uint(Buffer[i+1], 0x22); - ok_eq_uint(Buffer[i+2], 0x33); - } - for (i = 60; i < 64; ++i) - ok_eq_uint(Buffer[i], 0x44); - for (i = 64; i < HalfSize; ++i) - ok_eq_uint(Buffer[i], 0x55); - for (i = HalfSize; i < Size; ++i) - ok_eq_uint(Buffer[i], 0xAA); - ok_bool_true(CheckPattern(Buffer, 3, 20, 0x11, 0x22, 0x33, 1, 4, 0x44, 0), "CheckPattern"); - - /* RtlMoveMemory */ - MakePattern(Buffer, 2, 64, 0x12, 0x34, 2, 192, 0x56, 0x78, 0); - RtlMoveMemory(Buffer + 13, Buffer + 62, 95); - ok_bool_true(CheckPattern(Buffer, 2, 6, 0x12, 0x34, 1, 1, 0x12, 2, 33, 0x12, 0x34, 2, 14, 0x56, 0x78, 1, 1, 0x56, 2, 10, 0x12, 0x34, 2, 192, 0x56, 0x78, 1, 1, 0, 0), "CheckPattern"); - - MakePattern(Buffer, 2, 32, 0x12, 0x34, 2, 32, 0x56, 0x78, 2, 192, 0x9A, 0xAB, 0); - RtlMoveMemory(Buffer + 78, Buffer + 43, 107); - ok_bool_true(CheckPattern(Buffer, 2, 32, 0x12, 0x34, 2, 7, 0x56, 0x78, 1, 1, 0x34, 2, 10, 0x12, 0x34, 2, 32, 0x56, 0x78, 2, 11, 0x9A, 0xAB, 1, 1, 0xAB, 2, 163, 0x9A, 0xAB, 1, 1, 0, 0), "CheckPattern"); - - KeLowerIrql(Irql); - Status = STATUS_SUCCESS; - _SEH2_TRY { - RtlMoveMemory(NULL, NULL, 0); - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - Status = _SEH2_GetExceptionCode(); - } _SEH2_END; - ok_eq_hex(Status, STATUS_SUCCESS); - KeRaiseIrql(HIGH_LEVEL, &Irql); - -#undef RtlMoveMemory - /* RtlMoveMemory export */ - MakePattern(Buffer, 2, 64, 0x12, 0x34, 2, 192, 0x56, 0x78, 0); - RtlMoveMemory(Buffer + 13, Buffer + 62, 95); - ok_bool_true(CheckPattern(Buffer, 2, 6, 0x12, 0x34, 1, 1, 0x12, 2, 33, 0x12, 0x34, 2, 14, 0x56, 0x78, 1, 1, 0x56, 2, 10, 0x12, 0x34, 2, 192, 0x56, 0x78, 1, 1, 0, 0), "CheckPattern"); - - MakePattern(Buffer, 2, 32, 0x12, 0x34, 2, 32, 0x56, 0x78, 2, 192, 0x9A, 0xAB, 0); - RtlMoveMemory(Buffer + 78, Buffer + 43, 107); - ok_bool_true(CheckPattern(Buffer, 2, 32, 0x12, 0x34, 2, 7, 0x56, 0x78, 1, 1, 0x34, 2, 10, 0x12, 0x34, 2, 32, 0x56, 0x78, 2, 11, 0x9A, 0xAB, 1, 1, 0xAB, 2, 163, 0x9A, 0xAB, 1, 1, 0, 0), "CheckPattern"); - - KeLowerIrql(Irql); - Status = STATUS_SUCCESS; - _SEH2_TRY { - RtlMoveMemory(NULL, NULL, 0); - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - Status = _SEH2_GetExceptionCode(); - } _SEH2_END; - ok_eq_hex(Status, STATUS_SUCCESS); - KeRaiseIrql(HIGH_LEVEL, &Irql); - - /* RtlCopyMemory */ - MakePattern(Buffer, 2, 64, 0x12, 0x34, 2, 192, 0x56, 0x78, 0); - RtlCopyMemory(Buffer + 13, Buffer + 62, 95); - ok_bool_true(CheckPattern(Buffer, 2, 6, 0x12, 0x34, 1, 1, 0x12, 2, 33, 0x12, 0x34, 2, 14, 0x56, 0x78, 1, 1, 0x56, 2, 10, 0x12, 0x34, 2, 192, 0x56, 0x78, 1, 1, 0, 0), "CheckPattern"); - - MakePattern(Buffer, 2, 32, 0x12, 0x34, 2, 32, 0x56, 0x78, 2, 192, 0x9A, 0xAB, 0); - RtlCopyMemory(Buffer + 78, Buffer + 43, 107); - ok_bool_true(CheckPattern(Buffer, 2, 32, 0x12, 0x34, 2, 7, 0x56, 0x78, 1, 1, 0x34, 2, 10, 0x12, 0x34, 2, 32, 0x56, 0x78, 2, 11, 0x9A, 0xAB, 1, 1, 0xAB, 2, 163, 0x9A, 0xAB, 1, 1, 0, 0), "CheckPattern"); - - KeLowerIrql(Irql); - Status = STATUS_SUCCESS; - _SEH2_TRY { - RtlCopyMemory(NULL, NULL, 0); - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - Status = _SEH2_GetExceptionCode(); - } _SEH2_END; - ok_eq_hex(Status, STATUS_SUCCESS); - KeRaiseIrql(HIGH_LEVEL, &Irql); - - /* RtlCopyMemoryNonTemporal */ - MakePattern(Buffer, 2, 64, 0x12, 0x34, 2, 192, 0x56, 0x78, 0); - RtlCopyMemoryNonTemporal(Buffer + 13, Buffer + 62, 95); - ok_bool_true(CheckPattern(Buffer, 2, 6, 0x12, 0x34, 1, 1, 0x12, 2, 33, 0x12, 0x34, 2, 14, 0x56, 0x78, 1, 1, 0x56, 2, 10, 0x12, 0x34, 2, 192, 0x56, 0x78, 1, 1, 0, 0), "CheckPattern"); - - MakePattern(Buffer, 2, 32, 0x12, 0x34, 2, 32, 0x56, 0x78, 2, 192, 0x9A, 0xAB, 0); - RtlCopyMemoryNonTemporal(Buffer + 78, Buffer + 43, 107); - ok_bool_true(CheckPattern(Buffer, 2, 32, 0x12, 0x34, 2, 7, 0x56, 0x78, 1, 1, 0x34, 2, 10, 0x12, 0x34, 2, 32, 0x56, 0x78, 2, 11, 0x9A, 0xAB, 1, 1, 0xAB, 2, 163, 0x9A, 0xAB, 1, 1, 0, 0), "CheckPattern"); - - KeLowerIrql(Irql); - Status = STATUS_SUCCESS; - _SEH2_TRY { - RtlCopyMemoryNonTemporal(NULL, NULL, 0); - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - Status = _SEH2_GetExceptionCode(); - } _SEH2_END; - ok_eq_hex(Status, STATUS_SUCCESS); - KeRaiseIrql(HIGH_LEVEL, &Irql); - - /* RtlCopyBytes */ - MakePattern(Buffer, 2, 64, 0x12, 0x34, 2, 192, 0x56, 0x78, 0); - RtlCopyBytes(Buffer + 13, Buffer + 62, 95); - ok_bool_true(CheckPattern(Buffer, 2, 6, 0x12, 0x34, 1, 1, 0x12, 2, 33, 0x12, 0x34, 2, 14, 0x56, 0x78, 1, 1, 0x56, 2, 10, 0x12, 0x34, 2, 192, 0x56, 0x78, 1, 1, 0, 0), "CheckPattern"); - - MakePattern(Buffer, 2, 32, 0x12, 0x34, 2, 32, 0x56, 0x78, 2, 192, 0x9A, 0xAB, 0); - RtlCopyBytes(Buffer + 78, Buffer + 43, 107); - ok_bool_true(CheckPattern(Buffer, 2, 32, 0x12, 0x34, 2, 7, 0x56, 0x78, 1, 1, 0x34, 2, 10, 0x12, 0x34, 2, 32, 0x56, 0x78, 2, 11, 0x9A, 0xAB, 1, 1, 0xAB, 2, 163, 0x9A, 0xAB, 1, 1, 0, 0), "CheckPattern"); - - KeLowerIrql(Irql); - Status = STATUS_SUCCESS; - _SEH2_TRY { - RtlCopyBytes(NULL, NULL, 0); - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - Status = _SEH2_GetExceptionCode(); - } _SEH2_END; - ok_eq_hex(Status, STATUS_SUCCESS); - KeRaiseIrql(HIGH_LEVEL, &Irql); - - /* RtlEqualMemory */ - /* TODO: where is memcmp? */ - - /* RtlCompareMemory */ - MakePattern(Buffer, 8, HalfSize / 8 - 1, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0, - 1, 1, 0x12, - 8, HalfSize / 8, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0, - 1, 7, 0x12, 0); - - RetSize = RtlCompareMemory(Buffer, Buffer + HalfSize - 7, HalfSize - 8); - ok_eq_size(RetSize, HalfSize - 8); - RetSize = RtlCompareMemory(Buffer, Buffer + HalfSize - 7, HalfSize - 8 + 1); - ok_eq_size(RetSize, HalfSize - 8 + 1); - RetSize = RtlCompareMemory(Buffer, Buffer + HalfSize - 7, HalfSize - 8 + 2); - ok_eq_size(RetSize, HalfSize - 8 + 1); - - KeLowerIrql(Irql); - Status = STATUS_SUCCESS; - _SEH2_TRY { - RetSize = RtlCompareMemory(Buffer, Buffer + HalfSize - 7, SIZE_MAX); - ok_eq_size(RetSize, HalfSize - 8 + 1); - RetSize = RtlCompareMemory(NULL, NULL, 0); - ok_eq_size(RetSize, 0); - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - Status = _SEH2_GetExceptionCode(); - } _SEH2_END; - ok_eq_hex(Status, STATUS_SUCCESS); - KeRaiseIrql(HIGH_LEVEL, &Irql); - - /* RtlCompareMemoryUlong */ - MakeBuffer(Buffer, 8, 0x55, Size - 4, 0, 0); - RetSize = RtlCompareMemoryUlong(Buffer, sizeof(ULONG), 0x55555555LU); - ok_eq_size(RetSize, 4); - RetSize = RtlCompareMemoryUlong(Buffer + 1, sizeof(ULONG), 0x55555555LU); - ok_eq_size(RetSize, 4); - RetSize = RtlCompareMemoryUlong(Buffer + 2, sizeof(ULONG), 0x55555555LU); - ok_eq_size(RetSize, 4); - RetSize = RtlCompareMemoryUlong(Buffer + 3, sizeof(ULONG), 0x55555555LU); - ok_eq_size(RetSize, 4); - RetSize = RtlCompareMemoryUlong(Buffer + 5, sizeof(ULONG), 0x55555555LU); - ok_eq_size(RetSize, 0); - RetSize = RtlCompareMemoryUlong(Buffer + 5, sizeof(ULONG), 0x00555555LU); - ok_eq_size(RetSize, 4); - RetSize = RtlCompareMemoryUlong(Buffer, 1, 0x55555555LU); - ok_eq_size(RetSize, 0); - RetSize = RtlCompareMemoryUlong(Buffer, 2, 0x55555555LU); - ok_eq_size(RetSize, 0); - RetSize = RtlCompareMemoryUlong(Buffer, 3, 0x55555555LU); - ok_eq_size(RetSize, 0); - RetSize = RtlCompareMemoryUlong(Buffer, 5, 0x55555555LU); - ok_eq_size(RetSize, 4); - - KeLowerIrql(Irql); - Status = STATUS_SUCCESS; - _SEH2_TRY { - RetSize = RtlCompareMemoryUlong(NULL, 0, 0x55555555LU); - ok_eq_size(RetSize, 0); - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - Status = _SEH2_GetExceptionCode(); - } _SEH2_END; - ok_eq_hex(Status, STATUS_SUCCESS); - KeRaiseIrql(HIGH_LEVEL, &Irql); - - /* RtlZeroMemory */ - MakeBuffer(Buffer, Size, 0x11, 0); - RtlZeroMemory(Buffer, 1); - ok_bool_true(CheckBuffer(Buffer, 1, 0, Size - 1, 0x11, 1, 0, 0), "CheckBuffer"); - Buffer[0] = 0x11; - RtlZeroMemory(Buffer, Size - 1); - ok_bool_true(CheckBuffer(Buffer, Size - 1, 0, 1, 0x11, 1, 0, 0), "CheckBuffer"); - - KeLowerIrql(Irql); - Status = STATUS_SUCCESS; - _SEH2_TRY { - RtlZeroMemory(NULL, 0); - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - Status = _SEH2_GetExceptionCode(); - } _SEH2_END; - ok_eq_hex(Status, STATUS_SUCCESS); - KeRaiseIrql(HIGH_LEVEL, &Irql); - - /* RtlSecureZeroMemory */ - MakeBuffer(Buffer, Size, 0x11, 0); - RtlSecureZeroMemory(Buffer, 1); - ok_bool_true(CheckBuffer(Buffer, 1, 0, Size - 1, 0x11, 1, 0, 0), "CheckBuffer"); - Buffer[0] = 0x11; - RtlSecureZeroMemory(Buffer, Size - 1); - ok_bool_true(CheckBuffer(Buffer, Size - 1, 0, 1, 0x11, 1, 0, 0), "CheckBuffer"); - - KeLowerIrql(Irql); - Status = STATUS_SUCCESS; - _SEH2_TRY { - RtlSecureZeroMemory(NULL, 0); - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - Status = _SEH2_GetExceptionCode(); - } _SEH2_END; - ok_eq_hex(Status, STATUS_SUCCESS); - KeRaiseIrql(HIGH_LEVEL, &Irql); - - /* RtlZeroBytes */ - MakeBuffer(Buffer, Size, 0x11, 0); - RtlZeroBytes(Buffer, 1); - ok_bool_true(CheckBuffer(Buffer, 1, 0, Size - 1, 0x11, 1, 0, 0), "CheckBuffer"); - Buffer[0] = 0x11; - RtlZeroBytes(Buffer, Size - 1); - ok_bool_true(CheckBuffer(Buffer, Size - 1, 0, 1, 0x11, 1, 0, 0), "CheckBuffer"); - - KeLowerIrql(Irql); - Status = STATUS_SUCCESS; - _SEH2_TRY { - RtlZeroBytes(NULL, 0); - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - Status = _SEH2_GetExceptionCode(); - } _SEH2_END; - ok_eq_hex(Status, STATUS_SUCCESS); - KeRaiseIrql(HIGH_LEVEL, &Irql); - - /* RtlFillMemory */ - MakeBuffer(Buffer, Size, 0, 0); - RtlFillMemory(Buffer, HalfSize, 0x55); - RtlFillMemory(Buffer + HalfSize, HalfSize, 0xAA); - ok_bool_true(CheckBuffer(Buffer, HalfSize, 0x55, HalfSize, 0xAA, 1, 0, 0), "CheckBuffer"); - RtlFillMemory(Buffer + 3, 7, 0x88); - ok_bool_true(CheckBuffer(Buffer, 3, 0x55, 7, 0x88, HalfSize - 10, 0x55, HalfSize, 0xAA, 1, 0, 0), "CheckBuffer"); - - KeLowerIrql(Irql); - Status = STATUS_SUCCESS; - _SEH2_TRY { - RtlFillMemory(NULL, 0, 0x55); - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - Status = _SEH2_GetExceptionCode(); - } _SEH2_END; - ok_eq_hex(Status, STATUS_SUCCESS); - KeRaiseIrql(HIGH_LEVEL, &Irql); - -#undef RtlFillMemory - /* RtlFillMemory export */ - MakeBuffer(Buffer, Size, 0, 0); - RtlFillMemory(Buffer, HalfSize, 0x55); - RtlFillMemory(Buffer + HalfSize, HalfSize, 0xAA); - ok_bool_true(CheckBuffer(Buffer, HalfSize, 0x55, HalfSize, 0xAA, 1, 0, 0), "CheckBuffer"); - RtlFillMemory(Buffer + 3, 7, 0x88); - ok_bool_true(CheckBuffer(Buffer, 3, 0x55, 7, 0x88, HalfSize - 10, 0x55, HalfSize, 0xAA, 1, 0, 0), "CheckBuffer"); - - KeLowerIrql(Irql); - Status = STATUS_SUCCESS; - _SEH2_TRY { - RtlFillMemory(NULL, 0, 0x55); - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - Status = _SEH2_GetExceptionCode(); - } _SEH2_END; - ok_eq_hex(Status, STATUS_SUCCESS); - KeRaiseIrql(HIGH_LEVEL, &Irql); - - /* TODO: fix NDK. This should work! */ -#if !defined _M_AMD64 || defined KMT_KERNEL_MODE - /* RtlFillMemoryUlong */ - MakeBuffer(Buffer, Size, 0, 0); - RtlFillMemoryUlong(Buffer, HalfSize, 0x01234567LU); - RtlFillMemoryUlong(Buffer + HalfSize, HalfSize, 0x89ABCDEFLU); - ok_bool_true(CheckPattern(Buffer, 4, HalfSize / 4, 0x67, 0x45, 0x23, 0x01, 4, HalfSize / 4, 0xEF, 0xCD, 0xAB, 0x89, 1, 1, 0, 0), "CheckPattern"); - - KeLowerIrql(Irql); - Status = STATUS_SUCCESS; - _SEH2_TRY { - MakeBuffer(Buffer, Size, 0, 0); - RtlFillMemoryUlong(Buffer + 1, sizeof(ULONG), 0xAAAAAAAALU); - ok_bool_true(CheckBuffer(Buffer, 1, 0, sizeof(ULONG), 0xAA, Size - sizeof(ULONG) - 1, 0, 1, 0, 0), "CheckBuffer"); - - RtlFillMemoryUlong(NULL, 0, 0x55555555LU); - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - Status = _SEH2_GetExceptionCode(); - } _SEH2_END; - ok_eq_hex(Status, STATUS_SUCCESS); - KeRaiseIrql(HIGH_LEVEL, &Irql); -#endif - - /* RtlFillMemoryUlonglong */ - /* TODO: this function doesn't exist in 2k3/x86? wdm.h error? */ - - /* RtlFillBytes */ - MakeBuffer(Buffer, Size, 0, 0); - RtlFillBytes(Buffer, HalfSize, 0x55); - RtlFillBytes(Buffer + HalfSize, HalfSize, 0xAA); - ok_bool_true(CheckBuffer(Buffer, HalfSize, 0x55, HalfSize, 0xAA, 1, 0, 0), "CheckBuffer"); - RtlFillBytes(Buffer + 3, 7, 0x88); - ok_bool_true(CheckBuffer(Buffer, 3, 0x55, 7, 0x88, HalfSize - 10, 0x55, HalfSize, 0xAA, 1, 0, 0), "CheckBuffer"); - - KeLowerIrql(Irql); - Status = STATUS_SUCCESS; - _SEH2_TRY { - RtlFillBytes(NULL, 0, 0x55); - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - Status = _SEH2_GetExceptionCode(); - } _SEH2_END; - ok_eq_hex(Status, STATUS_SUCCESS); - KeRaiseIrql(HIGH_LEVEL, &Irql); - - /* RtlPrefetchMemoryNonTemporal */ - RtlPrefetchMemoryNonTemporal(Buffer, Size); - - KeLowerIrql(Irql); - Status = STATUS_SUCCESS; - _SEH2_TRY { - RtlPrefetchMemoryNonTemporal(NULL, 0); - } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - Status = _SEH2_GetExceptionCode(); - } _SEH2_END; - ok_eq_hex(Status, STATUS_SUCCESS); - KeRaiseIrql(HIGH_LEVEL, &Irql); - - KeLowerIrql(Irql); -} diff --git a/rostests/kmtests/rtl/RtlSplayTree.c b/rostests/kmtests/rtl/RtlSplayTree.c deleted file mode 100644 index 1e4b739b4d2..00000000000 --- a/rostests/kmtests/rtl/RtlSplayTree.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: LGPLv2+ - See COPYING.LIB in the top level directory - * PURPOSE: Kernel-Mode Test Suite RtlGenericTable - * PROGRAMMER: arty - */ - -#define KMT_EMULATE_KERNEL -#include - -#define NDEBUG -#include - -static LIST_ENTRY Allocations; - -static RTL_GENERIC_COMPARE_RESULTS NTAPI -CompareCharTable(PRTL_GENERIC_TABLE Table, PVOID A, PVOID B) -{ - RTL_GENERIC_COMPARE_RESULTS Result = (*((PCHAR)A) < *((PCHAR)B)) ? GenericLessThan : - (*((PCHAR)A) > *((PCHAR)B)) ? GenericGreaterThan : - GenericEqual; - return Result; -} - -static PVOID NTAPI -AllocRoutine(PRTL_GENERIC_TABLE Table, CLONG ByteSize) -{ - PLIST_ENTRY Entry = ExAllocatePool - (NonPagedPool, sizeof(LIST_ENTRY) + ByteSize); - InsertTailList(&Allocations, Entry); - return &Entry[1]; -} - -static VOID NTAPI -FreeRoutine(PRTL_GENERIC_TABLE Table, PVOID Buffer) -{ - PLIST_ENTRY Entry = (PLIST_ENTRY)(((PCHAR)Buffer) - sizeof(LIST_ENTRY)); - RemoveEntryList(Entry); - ExFreePool(Entry); -} - -static void RtlSplayTreeTest() -{ - ULONG i, del; - PCHAR Ch; - CHAR Text[] = "the quick_brown!fOx-jUmp3d/0vER+THe^lazy.D@g"; - CHAR NewE[] = "11111111111111111111111111111111110111111111"; - RTL_GENERIC_TABLE Table; - RtlInitializeGenericTable - (&Table, - CompareCharTable, - AllocRoutine, - FreeRoutine, - NULL); - for (i = 0; Text[i]; i++) { - BOOLEAN WasNew; - Ch = (PCHAR)RtlInsertElementGenericTable - (&Table, - &Text[i], - sizeof(Text[i]), - &WasNew); - ok(Ch && *Ch == Text[i], "Copy character into node\n"); - ok(WasNew == (NewE[i] == '1'), "Character newness didn't match\n"); - } - for (Ch = (PCHAR)RtlEnumerateGenericTable(&Table, TRUE), i = 0; - Ch; - Ch = (PCHAR)RtlEnumerateGenericTable(&Table, FALSE), i++) { - ok(strchr(Text, *Ch) != NULL, "Nonexistent character\n"); - } - ok(RtlNumberGenericTableElements(&Table) == strlen(Text) - 1, "Not the right number of elements\n"); - ok(RtlLookupElementGenericTable(&Table, "q") != NULL, "Could not lookup q\n"); - ok(!RtlLookupElementGenericTable(&Table, "#"), "Found a character that shouldn't appear\n"); - ok(strlen(Text) == i + 1, "Didn't enumerate enough characters\n"); - del = 0; - for (i = 0; Text[i]; i++) { - if (NewE[i] == '1') { - BOOLEAN WasDeleted; - WasDeleted = RtlDeleteElementGenericTable(&Table, &Text[i]); - del += WasDeleted; - } - } - ok(!RtlNumberGenericTableElements(&Table), "Not zero elements\n"); - ok(!RtlGetElementGenericTable(&Table, 0), "Elements left when we removed them all\n"); - ok(strlen(Text) == del + 1, "Deleted too many times\n"); - ok(IsListEmpty(&Allocations), "Didn't free all memory\n"); -} - -START_TEST(RtlSplayTree) -{ - InitializeListHead(&Allocations); - RtlSplayTreeTest(); -} diff --git a/rostests/kmtests/rtl/RtlUnicodeString.c b/rostests/kmtests/rtl/RtlUnicodeString.c deleted file mode 100644 index c69bf0a228e..00000000000 --- a/rostests/kmtests/rtl/RtlUnicodeString.c +++ /dev/null @@ -1,183 +0,0 @@ -/* - * PROJECT: ReactOS kernel-mode tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Kernel-Mode Test Suite Runtime library unicode string functions test - * PROGRAMMER: Thomas Faber - */ - -#define KMT_EMULATE_KERNEL -#include - -#define StartSeh() ExceptionStatus = STATUS_SUCCESS; _SEH2_TRY { -#define EndSeh(ExpectedStatus) } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { ExceptionStatus = _SEH2_GetExceptionCode(); } _SEH2_END; ok_eq_hex(ExceptionStatus, ExpectedStatus) - -static -VOID -TestFindCharInUnicodeString(VOID) -{ -#ifdef KMT_USER_MODE - NTSTATUS ExceptionStatus; - NTSTATUS Status; - UNICODE_STRING String = RTL_CONSTANT_STRING(L"I am a string"); - UNICODE_STRING Chars = RTL_CONSTANT_STRING(L"a"); - UNICODE_STRING Chars2 = RTL_CONSTANT_STRING(L"A"); - UNICODE_STRING Chars3 = RTL_CONSTANT_STRING(L"i"); - UNICODE_STRING Chars4 = RTL_CONSTANT_STRING(L"G"); - UNICODE_STRING ZeroLengthString; - USHORT Position; - ULONG LongPosition; - - RtlInitUnicodeString(&ZeroLengthString, NULL); - - /* Basic checks. Covered by Winetests */ - Position = 123; - Status = RtlFindCharInUnicodeString(0, &String, &Chars, &Position); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_eq_uint(Position, 6); - - Position = 123; - Status = RtlFindCharInUnicodeString(1, &String, &Chars, &Position); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_eq_uint(Position, 10); - - Position = 123; - Status = RtlFindCharInUnicodeString(2, &String, &Chars, &Position); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_eq_uint(Position, 2); - - Position = 123; - Status = RtlFindCharInUnicodeString(3, &String, &Chars, &Position); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_eq_uint(Position, 24); - - /* Show that checks are case sensitive by default */ - Position = 123; - Status = RtlFindCharInUnicodeString(0, &String, &Chars2, &Position); - ok_eq_hex(Status, STATUS_NOT_FOUND); - ok_eq_uint(Position, 0); - - Position = 123; - Status = RtlFindCharInUnicodeString(1, &String, &Chars2, &Position); - ok_eq_hex(Status, STATUS_NOT_FOUND); - ok_eq_uint(Position, 0); - - Position = 123; - Status = RtlFindCharInUnicodeString(2, &String, &Chars3, &Position); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_eq_uint(Position, 2); - - Position = 123; - Status = RtlFindCharInUnicodeString(3, &String, &Chars4, &Position); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_eq_uint(Position, 24); - - /* Show that 4 means case insensitive */ - Position = 123; - Status = RtlFindCharInUnicodeString(4, &String, &Chars2, &Position); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_eq_uint(Position, 6); - - Position = 123; - Status = RtlFindCharInUnicodeString(5, &String, &Chars2, &Position); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_eq_uint(Position, 10); - - Position = 123; - Status = RtlFindCharInUnicodeString(6, &String, &Chars3, &Position); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_eq_uint(Position, 4); - - Position = 123; - Status = RtlFindCharInUnicodeString(7, &String, &Chars4, &Position); - ok_eq_hex(Status, STATUS_SUCCESS); - ok_eq_uint(Position, 22); - - /* Show that Position is USHORT */ - LongPosition = 0x55555555; - Status = RtlFindCharInUnicodeString(8, &String, &String, (PUSHORT)&LongPosition); - ok_eq_hex(Status, STATUS_INVALID_PARAMETER); - ok_eq_ulong(LongPosition, 0x55550000UL); - - /* Invalid flags */ - Position = 123; - Status = RtlFindCharInUnicodeString(8, &String, &String, &Position); - ok_eq_hex(Status, STATUS_INVALID_PARAMETER); - ok_eq_uint(Position, 0); - - Position = 123; - Status = RtlFindCharInUnicodeString(0xFFFFFFF8, &String, &String, &Position); - ok_eq_hex(Status, STATUS_INVALID_PARAMETER); - ok_eq_uint(Position, 0); - - Position = 123; - Status = RtlFindCharInUnicodeString(0xFFFFFFFF, &String, &String, &Position); - ok_eq_hex(Status, STATUS_INVALID_PARAMETER); - ok_eq_uint(Position, 0); - - /* NULL for SearchString */ - Position = 123; - StartSeh() - Status = RtlFindCharInUnicodeString(0, NULL, &String, &Position); - EndSeh(STATUS_ACCESS_VIOLATION); - ok_eq_uint(Position, 0); - - /* NULL for SearchString and invalid flags */ - Position = 123; - StartSeh() - Status = RtlFindCharInUnicodeString(8, NULL, &String, &Position); - EndSeh(STATUS_SUCCESS); - ok_eq_hex(Status, STATUS_INVALID_PARAMETER); - ok_eq_uint(Position, 0); - ok_eq_uint(Position, 0); - - /* NULL for SearchString with zero-length MatchString */ - Position = 123; - StartSeh() - Status = RtlFindCharInUnicodeString(0, NULL, &ZeroLengthString, &Position); - EndSeh(STATUS_ACCESS_VIOLATION); - ok_eq_uint(Position, 0); - - /* NULL for MatchString */ - Position = 123; - StartSeh() - Status = RtlFindCharInUnicodeString(0, &String, NULL, &Position); - EndSeh(STATUS_ACCESS_VIOLATION); - ok_eq_uint(Position, 0); - - /* This crashes in Windows, but not in ROS. I see no reason to add - * additional code or redesign the function to replicate that */ -#if 0 - /* NULL for MatchString with zero-length SearchString */ - Position = 123; - StartSeh() - Status = RtlFindCharInUnicodeString(0, &ZeroLengthString, NULL, &Position); - EndSeh(STATUS_ACCESS_VIOLATION); - ok_eq_uint(Position, 0); -#endif - - /* NULL for MatchString and invalid flags */ - Position = 123; - StartSeh() - Status = RtlFindCharInUnicodeString(8, &String, NULL, &Position); - EndSeh(STATUS_SUCCESS); - ok_eq_hex(Status, STATUS_INVALID_PARAMETER); - ok_eq_uint(Position, 0); - - /* NULL for Position */ - StartSeh() - Status = RtlFindCharInUnicodeString(0, &String, &String, NULL); - EndSeh(STATUS_SUCCESS); - ok_eq_hex(Status, STATUS_INVALID_PARAMETER); - - /* NULL for all three */ - StartSeh() - Status = RtlFindCharInUnicodeString(0, NULL, NULL, NULL); - EndSeh(STATUS_SUCCESS); - ok_eq_hex(Status, STATUS_INVALID_PARAMETER); -#endif -} - -START_TEST(RtlUnicodeString) -{ - TestFindCharInUnicodeString(); -} diff --git a/rostests/readme.txt b/rostests/readme.txt deleted file mode 100644 index 2b10c84a0ff..00000000000 --- a/rostests/readme.txt +++ /dev/null @@ -1,9 +0,0 @@ -$Id: readme.txt 21229 2006-03-05 13:57:35Z frik85 $ - -==================== -ReactOS Tests -==================== - -This directory contains various tests for ReactOS. -Make sure you also have a copy of the rest of the ReactOS -source before you attempt to build anything in this module. \ No newline at end of file diff --git a/rostests/regtests/bugs/bug3481.c b/rostests/regtests/bugs/bug3481.c deleted file mode 100644 index aae9ed6c5b7..00000000000 --- a/rostests/regtests/bugs/bug3481.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * PROJECT: ReactOS bug regression tests - * LICENSE: GPL - See COPYING in the top level directory - * FILE: rostests/regtests/bugs/bug3481.c - * PURPOSE: Test for bug 3481 - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include -#include - -#define COUNT 26 - -void Test_bug3481() -{ - const char text[COUNT] = "abcdefghijklmnopqrstuvmxyz"; - WORD agi[COUNT]; - INT i, aiWidth1[COUNT], aiWidth2[COUNT]; - BOOL result; - HDC hdc; - SIZE size1, size2; - - /* Create a DC */ - hdc = CreateCompatibleDC(NULL); - - SelectObject(hdc, GetStockObject(DEFAULT_GUI_FONT)); - - /* Convert the charcaters into glyph indices */ - result = GetGlyphIndicesA(hdc, text, COUNT, agi, 0); - ok(result != 0, "result=%d, GetLastError()=%ld\n", result, GetLastError()); - - /* Get the size of the string */ - result = GetTextExtentPoint32A(hdc, text, COUNT, &size1); - ok(result != 0, "result=%d, GetLastError()=%ld\n", result, GetLastError()); - - /* Get the size from glyph indices */ - result = GetTextExtentPointI(hdc, agi, COUNT, &size2); - ok(result != 0, "result=%d, GetLastError()=%ld\n", result, GetLastError()); - - /* Compare sizes */ - ok(size1.cx == size2.cx, "Sizes don't match. size1.cx=%ld, size2.cx=%ld\n", size1.cx, size2.cx); - ok(size1.cy == size2.cy, "Sizes don't match. size1.cy=%ld, size2.cy=%ld\n", size1.cy, size2.cy); - - /* Get the size of the string */ - result = GetTextExtentExPointA(hdc, text, COUNT, MAXLONG, NULL, aiWidth1, &size1); - ok(result != 0, "result=%d, GetLastError()=%ld\n", result, GetLastError()); - - /* Get the size from glyph indices */ - result = GetTextExtentExPointI(hdc, agi, COUNT, MAXLONG, NULL, aiWidth2, &size2); - ok(result != 0, "result=%d, GetLastError()=%ld\n", result, GetLastError()); - - /* Compare sizes */ - ok(size1.cx == size2.cx, "Sizes don't match. size1.cx=%ld, size2.cx=%ld\n", size1.cx, size2.cx); - ok(size1.cy == size2.cy, "Sizes don't match. size1.cy=%ld, size2.cy=%ld\n", size1.cy, size2.cy); - - /* Loop all characters */ - for (i = 0; i < COUNT; i++) - { - /* Check if we got identical spacing values */ - ok(aiWidth1[i] == aiWidth2[i], "wrong spacing, i=%d, char:%d, index:%d\n", i, aiWidth1[i], aiWidth2[i]); - } - - /* Cleanup */ - DeleteDC(hdc); -} - -START_TEST(bug3481) -{ - Test_bug3481(); -} - diff --git a/rostests/regtests/bugs/bugs_regtest.rbuild b/rostests/regtests/bugs/bugs_regtest.rbuild deleted file mode 100644 index a02c69012b2..00000000000 --- a/rostests/regtests/bugs/bugs_regtest.rbuild +++ /dev/null @@ -1,12 +0,0 @@ - - - - - . - wine - gdi32 - testlist.c - - bug3481.c - - diff --git a/rostests/regtests/bugs/testlist.c b/rostests/regtests/bugs/testlist.c deleted file mode 100644 index 501e5c968f5..00000000000 --- a/rostests/regtests/bugs/testlist.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#define __ROS_LONG64__ -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_bug3481(void); - -const struct test winetest_testlist[] = -{ - { "bug3481", func_bug3481 }, - { 0, 0 } -}; - diff --git a/rostests/regtests/crt/crt_regtest.rbuild b/rostests/regtests/crt/crt_regtest.rbuild deleted file mode 100644 index 4b297d5b1b8..00000000000 --- a/rostests/regtests/crt/crt_regtest.rbuild +++ /dev/null @@ -1,11 +0,0 @@ - - - - - . - wine - iofuncs.c - testlist.c - time.c - - diff --git a/rostests/regtests/crt/iofuncs.c b/rostests/regtests/crt/iofuncs.c deleted file mode 100644 index cc64ac2c56a..00000000000 --- a/rostests/regtests/crt/iofuncs.c +++ /dev/null @@ -1,100 +0,0 @@ -/* - * PROJECT: ReactOS CRT regression tests - * LICENSE: GPL - See COPYING in the top level directory - * FILE: rostests/regtests/crt/iofuncs.c - * PURPOSE: Tests for input/output functions of the CRT - * PROGRAMMERS: Gregor Schneider - */ - -#include -#include - -#define _CRT_NON_CONFORMING_SWPRINTFS - -struct _testData -{ - double val; - int prec; - char* exp; - char* exp2; -} ECVTTESTDATA[] = -{ - { 45.0, 2, "+4.50E+001", "+4.5000E+001" }, /*0*/ - { 0.0001, 1, "+1.0E-004", "+1.000E-004" }, - { 0.0001, -10, "+1.000000E-004", "+1.000000E-004" }, - { 0.0001, 10, "+1.0000000000E-004", "+1.000000000000E-004" }, - { -111.0001, 5, "-1.11000E+002", "-1.1100010E+002" }, - { 111.0001, 5, "+1.11000E+002", "+1.1100010E+002" }, /*5*/ - { 3333.3, 2, "+3.33E+003", "+3.3333E+003" }, - { 999999999999.9, 3, "+1.000E+012", "+1.00000E+012" }, - { 0.0, 5, "+0.00000E+000", "+0.0000000E+000" }, - { 0.0, 0, "+0E+000", "+0.00E+000" }, - { 0.0, -1, "+0.000000E+000", "+0.0E+000" }, /*10*/ - { -123.0001, 0, "-1E+002", "-1.23E+002" }, - { -123.0001, -1, "-1.230001E+002", "-1.2E+002" }, - { -123.0001, -2, "-1.230001E+002", "-1E+002" }, - { -123.0001, -3, "-1.230001E+002", "-1.230001E+002" }, - { 99.99, 1, "+1.0E+002", "+9.999E+001" }, /*15*/ - { 0.0063, 2, "+6.30E-003", "+6.3000E-003" }, - { 0.0063, 3, "+6.300E-003", "+6.30000E-003" }, - { 0.09999999996, 2, "+1.00E-001", "+1.0000E-001" }, - { 0.6, 1, "+6.0E-001", "+6.000E-001" }, - { 0.6, 0, "+6E-001", "+6.00E-001" }, /*20*/ - { 0.4, 0, "+4E-001", "+4.00E-001" }, - { 0.49, 0, "+5E-001", "+4.90E-001" }, - { 0.51, 0, "+5E-001", "+5.10E-001" } -}; - -void Test_ofuncs() -{ - int i; - char* buf = NULL; - - /* Test exponential format */ - buf = malloc(30 * sizeof(char)); - if (buf == NULL) - { - printf("Memory full, exiting\n"); - return; - } - for (i = 0; i < sizeof(ECVTTESTDATA)/sizeof(ECVTTESTDATA[0]); i++) - { - sprintf(buf, "%-+.*E", ECVTTESTDATA[i].prec, ECVTTESTDATA[i].val); - ok(!strcmp(buf, ECVTTESTDATA[i].exp), - "sprintf exp test %d failed: got %s, expected %s\n", - i, buf, ECVTTESTDATA[i].exp); - } - for (i = 0; i < sizeof(ECVTTESTDATA)/sizeof(ECVTTESTDATA[0]); i++) - { - sprintf(buf, "%-+.*E", ECVTTESTDATA[i].prec + 2, ECVTTESTDATA[i].val); - ok(!strcmp(buf, ECVTTESTDATA[i].exp2), - "sprintf exp +2 prec test %d failed: got %s, expected %s\n", - i, buf, ECVTTESTDATA[i].exp2); - } - - /* Test with negative number to be rounded */ - sprintf(buf, "%-+.*E", ECVTTESTDATA[18].prec + 2, -ECVTTESTDATA[18].val); - ok(!strcmp(buf, "-1.0000E-001"), "Negative number sprintf rounding failed: got %s, expected %s\n", - buf, "-1.0000E-001"); - free(buf); -} - -void Test_ifuncs() -{ - double var; - char cnum[] = "12.3"; - wchar_t wnum[] = L"12.3"; - - /* Test sscanf behaviour */ - sscanf(cnum, "%lf", &var); - ok(var == 12.3, "sscanf double conversion failed: got %f\n", var); - swscanf(wnum, L"%lf", &var); - ok(var == 12.3, "swscanf double conversion failed: got %f\n", var); -} - -START_TEST(iofuncs) -{ - Test_ofuncs(); - Test_ifuncs(); -} - diff --git a/rostests/regtests/crt/testlist.c b/rostests/regtests/crt/testlist.c deleted file mode 100644 index 6d720ebc33d..00000000000 --- a/rostests/regtests/crt/testlist.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#define __ROS_LONG64__ -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_iofuncs(void); -extern void func_time(void); - -const struct test winetest_testlist[] = -{ - { "iofuncs", func_iofuncs }, - { "time", func_time }, - { 0, 0 } -}; - diff --git a/rostests/regtests/crt/time.c b/rostests/regtests/crt/time.c deleted file mode 100644 index e9f4f74e6ce..00000000000 --- a/rostests/regtests/crt/time.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * PROJECT: ReactOS CRT regression tests - * LICENSE: GPL - See COPYING in the top level directory - * FILE: rostests/regtests/crt/time.c - * PURPOSE: Tests for time functions of the CRT - * PROGRAMMERS: Gregor Schneider - */ - -#include -#include -#include - -void Test_asctime() -{ - /* Test asctime */ - struct tm time; - char* timestr; - char explowtime[] = "Mon Jun 04 00:30:20 1909\n"; /* XP's crt returns new line after the string */ - - time.tm_hour = 0; - time.tm_mday = 4; - time.tm_min = 30; - time.tm_mon = 5; - time.tm_sec = 20; - time.tm_wday = 1; - time.tm_yday = 200; - time.tm_year = 9; - - timestr = asctime(&time); - ok(!strcmp(timestr, explowtime), "Wrong time returned, got %s\n", timestr); -} - -void Test_ctime() -{ - /* Test border ctime cases */ - time_t time; - time = -15; - ok(ctime(&time) == NULL, "ctime doesn't return NULL for invalid parameters\n"); - time = -5000000; - ok(ctime(&time) == NULL, "ctime doesn't return NULL for invalid parameters\n"); -} - -START_TEST(time) -{ - Test_asctime(); - Test_ctime(); -} - diff --git a/rostests/regtests/directory.rbuild b/rostests/regtests/directory.rbuild deleted file mode 100644 index 5264d803af9..00000000000 --- a/rostests/regtests/directory.rbuild +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/rostests/regtests/gdi/gdi_regtest.rbuild b/rostests/regtests/gdi/gdi_regtest.rbuild deleted file mode 100644 index 1c3c010e40e..00000000000 --- a/rostests/regtests/gdi/gdi_regtest.rbuild +++ /dev/null @@ -1,14 +0,0 @@ - - - - - . - wine - gdi32 - user32 - ntdll - - xlate.c - testlist.c - - diff --git a/rostests/regtests/gdi/testlist.c b/rostests/regtests/gdi/testlist.c deleted file mode 100644 index 66d9dc0c2ae..00000000000 --- a/rostests/regtests/gdi/testlist.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#define __ROS_LONG64__ -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_xlate(void); - -const struct test winetest_testlist[] = -{ - { "xlate", func_xlate }, - { 0, 0 } -}; - diff --git a/rostests/regtests/gdi/xlate.c b/rostests/regtests/gdi/xlate.c deleted file mode 100644 index e981381cb53..00000000000 --- a/rostests/regtests/gdi/xlate.c +++ /dev/null @@ -1,544 +0,0 @@ - -#include -#include -#include - -enum -{ - BMF_1BPP = 0, - BMF_4BPP = 1, - BMF_8BPP = 2, - BMF_16BPP_555 = 3, - BMF_16BPP_565 = 4, - BMF_24BPP_RGB = 5, - BMF_24BPP_BGR = 6, - BMF_32BPP_RGB = 7, - BMF_32BPP_BGR = 8 -}; - -ULONG bpp[] = {1, 4, 8, 15, 16, 24, 24, 32, 32}; - -static BYTE ajBits1[] = {0xAA, 0xAA, 0xAA, 0xAA, 0,0,0,0}; -static BYTE ajBits8[] = {0x00, 0xFF, 0x80, 0xCC, 0,0,0,0}; -static WORD ajBits16[] = {0x0000, 0xFFFF, 0x1000, 0x0C0C, 0,0,0,0}; -static DWORD ajBits24[] = {0x0000, 0xFFFF, 0x1000, 0x0C0C, 0,0,0,0}; -static DWORD ajBits32[] = {0x0000, 0xFFFF, 0x1000, 0x0C0C, 0,0,0,0}; -static HBITMAP hbmp1bpp_a, hbmp1bpp_b; -static HBITMAP hbmp8bpp_a, hbmp8bpp_b; -static HBITMAP hbmp16bpp_a, hbmp16bpp_b; -static HBITMAP hbmp24bpp_a, hbmp24bpp_b; -static HBITMAP hbmp32bpp_a, hbmp32bpp_b; -static HBITMAP hbmpCompat; -static HDC hdcSrc, hdcDst; -static ULONG iDcFormat; - -ULONG -GetRealColorDepth() -{ - HBITMAP hbmp; - HDC hdc; - struct - { - BITMAPINFOHEADER bmiHeader; - ULONG aulMasks[3]; - } bmi; - PBITMAPINFO pbmi = (PBITMAPINFO)&bmi; - ULONG ulColorDepth; - - /* Get the screen DC */ - hdc = GetDC(NULL); - - /* Create a compatible bitmap */ - hbmp = CreateCompatibleBitmap(hdc, 1, 1); - - /* Fill BITMAPINFOHEADER */ - bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - GetDIBits(hdc, hbmp, 0, 1, NULL, pbmi, DIB_RGB_COLORS); - - /* Call again to fill in the bitfields */ - GetDIBits(hdc, hbmp, 0, 1, NULL, pbmi, DIB_RGB_COLORS); - - /* Get the basic color depth */ - ulColorDepth = bmi.bmiHeader.biBitCount; - - DeleteObject(hbmp); - - switch (ulColorDepth) - { - case 1: - return BMF_1BPP; - case 4: - return BMF_4BPP; - case 8: - return BMF_8BPP; - case 16: - /* Check the red mask */ - if (bmi.aulMasks[0] == 0x7c00) - return BMF_16BPP_555; - else - return BMF_16BPP_565; - case 24: - return BMF_4BPP; - case 32: - if (bmi.bmiHeader.biCompression == BI_BITFIELDS && - bmi.aulMasks[0] == 0xff) - return BMF_32BPP_RGB; - else - return BMF_32BPP_BGR; - } - - /* Cleanup and return */ - return BMF_32BPP_RGB; -} - -static -ULONG -iXlateFromRGB(ULONG iFormat, COLORREF crColor) -{ - ULONG ulRed, ulGreen, ulBlue; - - ulRed = GetRValue(crColor); - ulGreen = GetGValue(crColor); - ulBlue = GetBValue(crColor); - - switch (iFormat) - { - case BMF_1BPP: - return crColor ? 0xffffff : 0; - - case BMF_4BPP: - case BMF_8BPP: - case BMF_16BPP_555: - ulRed = (ulRed & 0xF8) >> 3; - ulGreen = (ulGreen & 0xF8) >> 3; - ulBlue = (ulBlue & 0xF8) >> 3; - return ulRed << 10 | ulGreen << 5 | ulBlue; - - case BMF_16BPP_565: - ulRed = (ulRed & 0xF8) >> 3; - ulGreen = (ulGreen & 0xFC) >> 2; - ulBlue = (ulBlue & 0xF8) >> 3; - return ulRed << 11 | ulGreen << 5 | ulBlue; - - case BMF_24BPP_RGB: - case BMF_32BPP_RGB: - return crColor; - - case BMF_24BPP_BGR: - case BMF_32BPP_BGR: - return RGB(ulBlue, ulGreen, ulRed); - } - return 0; -} - -static -COLORREF -iXlateToRGB(ULONG iFormat, ULONG ulColor) -{ - ULONG ulRed, ulGreen, ulBlue; - - switch (iFormat) - { - case BMF_1BPP: - return ulColor ? 0xffffff : 0; - - case BMF_4BPP: - case BMF_8BPP: - case BMF_16BPP_555: - ulRed = (ulColor & 0x7C00) >> 7; - ulRed |= ulRed >> 5; - ulGreen = (ulColor & 0x3E0) >> 2; - ulGreen |= ulGreen >> 5; - ulBlue = (ulColor & 0x1F) << 3; - ulBlue |= ulBlue >> 5; - return RGB(ulRed, ulGreen, ulBlue); - - case BMF_16BPP_565: - ulRed = (ulColor & 0xF800) >> 8; - ulRed |= ulRed >> 5; - ulGreen = (ulColor & 0x7E0) >> 3; - ulGreen |= ulGreen >> 6; - ulBlue = (ulColor & 0x1F) << 3; - ulBlue |= ulBlue >> 5; - return RGB(ulRed, ulGreen, ulBlue); - - case BMF_24BPP_RGB: - case BMF_32BPP_RGB: - return ulColor; - - case BMF_24BPP_BGR: - case BMF_32BPP_BGR: - ulRed = GetRValue(ulColor); - ulGreen = GetGValue(ulColor); - ulBlue = GetBValue(ulColor); - return RGB(ulBlue, ulGreen, ulRed); - } - return 0; -} - -static -ULONG -GetClosestColor(ULONG iFormat, COLORREF crColor, COLORREF crBackColor) -{ - if (iFormat == BMF_1BPP) - return crBackColor; - return iXlateToRGB(iFormat, iXlateFromRGB(iFormat, crColor)); -} - -ULONG -GetDIBPixel(ULONG iFormat, PVOID pvBits, ULONG x) -{ - switch (iFormat) - { - case BMF_1BPP: - // - case BMF_16BPP_555: - case BMF_16BPP_565: - return *(WORD*)((PCHAR)pvBits + x * sizeof(WORD)); - - case BMF_24BPP_RGB: - case BMF_24BPP_BGR: - return (*(DWORD*)((PCHAR)pvBits + x * 3)) & 0xffffff; - - case BMF_32BPP_RGB: - case BMF_32BPP_BGR: - return *(DWORD*)((PCHAR)pvBits + x * sizeof(DWORD)); - } - return 0; -} - -static -void -Initialize() -{ - hdcSrc = CreateCompatibleDC(0); - hdcDst = CreateCompatibleDC(0); - - hbmpCompat = CreateCompatibleBitmap(GetDC(0), 4, 2); - ok(hbmpCompat != 0, "CreateCompatibleBitmap failed\n"); - - iDcFormat = GetRealColorDepth(); - printf("got iDcFormat = %ld\n", iDcFormat); - - hbmp1bpp_a = CreateBitmap(4, 2, 1, 1, ajBits1); - ok(hbmp1bpp_a != 0, "CreateBitmap failed\n"); - - hbmp1bpp_b = CreateBitmap(4, 2, 1, 1, ajBits1); - ok(hbmp1bpp_b != 0, "CreateBitmap failed\n"); - - hbmp8bpp_a = CreateBitmap(4, 2, 1, 8, ajBits8); - ok(hbmp8bpp_a != 0, "CreateBitmap failed\n"); - - hbmp8bpp_b = CreateBitmap(4, 2, 1, 8, ajBits8); - ok(hbmp8bpp_b != 0, "CreateBitmap failed\n"); - - hbmp16bpp_a = CreateBitmap(4, 2, 1, 16, ajBits16); - ok(hbmp16bpp_a != 0, "CreateBitmap failed\n"); - - hbmp16bpp_b = CreateBitmap(4, 2, 1, 16, ajBits16); - ok(hbmp16bpp_b != 0, "CreateBitmap failed\n"); - - hbmp24bpp_a = CreateBitmap(4, 2, 1, 24, ajBits24); - ok(hbmp24bpp_a != 0, "CreateBitmap failed\n"); - - hbmp24bpp_b = CreateBitmap(4, 2, 1, 24, ajBits24); - ok(hbmp24bpp_b != 0, "CreateBitmap failed\n"); - - hbmp32bpp_a = CreateBitmap(4, 2, 1, 32, ajBits32); - ok(hbmp32bpp_a != 0, "CreateBitmap failed\n"); - - hbmp32bpp_b = CreateBitmap(4, 2, 1, 32, ajBits32); - ok(hbmp32bpp_b != 0, "CreateBitmap failed\n"); - -} - -void -Test_SrcMono1(ULONG iBmpFormat, HBITMAP hbmpDst, PVOID pvBits) -{ - COLORREF c, expected; - HBRUSH hbr; - RECT rect; - struct - { - BITMAPINFOHEADER bmiHeader; - ULONG bmiColors[2]; - BYTE aj[32]; - } bmi; - - SelectObject(hdcSrc, hbmp1bpp_a); - SelectObject(hdcDst, hbmpDst); - - /* Set default dc fore and back colors */ - SetTextColor(hdcSrc, 0x000000); - SetBkColor(hdcSrc, 0xffffff); - SetTextColor(hdcDst, 0x000000); - SetBkColor(hdcDst, 0xffffff); - - /* Do a bitblt operation */ - ok(BitBlt(hdcDst, 0, 0, 2, 2, hdcSrc, 0, 0, SRCCOPY), "(%ld): BitBlt failed", iBmpFormat); - - /* Test background color */ - c = GetPixel(hdcDst, 0, 0); - expected = 0xffffff; - ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); - - /* Test foreground color */ - c = GetPixel(hdcDst, 1, 0); - expected = 0x000000; - ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); - - if (pvBits) - { - c = GetDIBPixel(iBmpFormat, pvBits, 0); - expected = iXlateFromRGB(iBmpFormat, GetBkColor(hdcSrc)); - ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); - - c = GetDIBPixel(iBmpFormat, pvBits, 1); - expected = iXlateFromRGB(iBmpFormat, GetTextColor(hdcSrc)); - ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); - } - - /* Set different dc fore and back colors */ - SetTextColor(hdcSrc, 0xf00f0f); - SetBkColor(hdcSrc, 0xf0ff0f); - SetTextColor(hdcDst, 0xefFee5); - SetBkColor(hdcDst, 0x100121); - - /* Make sure this alone didn't affect the resulting colors */ - c = GetPixel(hdcDst, 0, 0); - expected = 0xffffff; - ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); - c = GetPixel(hdcDst, 1, 0); - expected = 0x000000; - ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); - - /* Repeat the bitblt operation */ - ok(BitBlt(hdcDst, 0, 0, 2, 2, hdcSrc, 0, 0, SRCCOPY), "(%ld): BitBlt failed", iBmpFormat); - - /* Test background color */ - c = GetPixel(hdcDst, 0, 0); - expected = GetClosestColor(iBmpFormat, GetBkColor(hdcDst), 0xffffff); - ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); - - /* Test foreground color */ - c = GetPixel(hdcDst, 1, 0); - expected = GetClosestColor(iBmpFormat, GetTextColor(hdcDst), 0); - ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); - - if (pvBits) - { - c = GetDIBPixel(iBmpFormat, pvBits, 0); - expected = iXlateFromRGB(iBmpFormat, GetBkColor(hdcDst)); - ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); - - c = GetDIBPixel(iBmpFormat, pvBits, 1); - expected = iXlateFromRGB(iBmpFormat, GetTextColor(hdcDst)); - ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); - } - - /* Set inverted fore and back colors */ - SetTextColor(hdcSrc, 0); - SetBkColor(hdcSrc, 0xffffff); - SetTextColor(hdcDst, 0xffffff); - SetBkColor(hdcDst, 0x000000); - - /* Repeat the bitblt operation */ - ok(BitBlt(hdcDst, 0, 0, 2, 2, hdcSrc, 0, 0, SRCCOPY), "(%ld): BitBlt failed", iBmpFormat); - - /* Test background color */ - c = GetPixel(hdcDst, 0, 0); - expected = GetClosestColor(iBmpFormat, GetBkColor(hdcDst), 0xffffff); - ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); - - /* Test foreground color */ - c = GetPixel(hdcDst, 1, 0); - expected = GetClosestColor(iBmpFormat, GetTextColor(hdcDst), 0); - ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); - - if (pvBits) - { - c = GetDIBPixel(iBmpFormat, pvBits, 0); - expected = iXlateFromRGB(iBmpFormat, GetBkColor(hdcDst)); - ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); - - c = GetDIBPixel(iBmpFormat, pvBits, 1); - expected = iXlateFromRGB(iBmpFormat, GetTextColor(hdcDst)); - ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); - } - - -/* Hatch brush ****************************************************************/ - - /* Set dc fore and back colors */ - SetTextColor(hdcDst, 0x102030); - SetBkColor(hdcDst, 0xeeccdd); - SetBkMode(hdcDst, OPAQUE); - - /* Create a hatch brush */ - hbr = CreateHatchBrush(HS_DIAGCROSS, 0x123456); - - /* Fill the destination bitmap */ - rect.left = rect.top = 0; - rect.bottom = rect.right = 4; - ok(FillRect(hdcDst, &rect, hbr), "FillRect failed\n"); - - /* Test the fore color of the hatch brush */ - c = GetPixel(hdcDst, 0, 0); - expected = GetClosestColor(iBmpFormat, 0x123456, 0); - ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); - - /* Test the back color of the hatch brush */ - c = GetPixel(hdcDst, 1, 0); - expected = GetClosestColor(iBmpFormat, GetBkColor(hdcDst), 0xffffff); - ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); - - if (pvBits) - { - c = GetDIBPixel(iBmpFormat, pvBits, 0); - expected = iXlateFromRGB(iBmpFormat, 0x123456); - ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); - - c = GetDIBPixel(iBmpFormat, pvBits, 1); - expected = iXlateFromRGB(iBmpFormat, GetBkColor(hdcDst)); - ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); - } - - DeleteObject(hbr); - -/* DIB brush ******************************************************************/ - - bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bmi.bmiHeader.biWidth = 8; - bmi.bmiHeader.biHeight = 8; - bmi.bmiHeader.biPlanes = 1; - bmi.bmiHeader.biBitCount = 1; - bmi.bmiHeader.biCompression = BI_RGB; - bmi.bmiHeader.biSizeImage = 0; - bmi.bmiHeader.biXPelsPerMeter = 1; - bmi.bmiHeader.biYPelsPerMeter = 1; - bmi.bmiHeader.biClrUsed = 2; - bmi.bmiHeader.biClrImportant = 2; - bmi.bmiColors[0] = 0xeeeeee; - bmi.bmiColors[1] = 0x111111; - memset(bmi.aj, 0xaaaa, sizeof(bmi.aj)); - hbr = CreateDIBPatternBrushPt(&bmi, DIB_RGB_COLORS); - ok(hbr != 0, "CreateDIBPatternBrushPt failed\n"); - - rect.left = rect.top = 0; - rect.bottom = rect.right = 4; - ok(FillRect(hdcDst, &rect, hbr),"FillRect failed\n"); - - /* Test color 1 of the dib brush */ - c = GetPixel(hdcDst, 0, 0); - expected = GetClosestColor(iBmpFormat, bmi.bmiColors[1], 0); - ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); - - /* Test color 0 of the dib brush */ - c = GetPixel(hdcDst, 1, 0); - expected = GetClosestColor(iBmpFormat, bmi.bmiColors[0], 0xffffff); - ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); - - if (pvBits) - { - c = GetDIBPixel(iBmpFormat, pvBits, 0); - expected = iXlateFromRGB(iBmpFormat, bmi.bmiColors[1]); - ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); - - c = GetDIBPixel(iBmpFormat, pvBits, 1); - expected = iXlateFromRGB(iBmpFormat, bmi.bmiColors[0]); - ok(c == expected, "(%ld): wrong color, expected %lx, got %lx\n", iBmpFormat, expected, c); - } - - DeleteObject(hbr); - - -} - -void -Test_SrcMono() -{ - HBITMAP hbmp; - struct - { - BITMAPINFOHEADER bmiHeader; - ULONG bmiColors[3]; - } bmi; - PVOID pvBits; - ULONG c, expected; - - SelectObject(hdcSrc, hbmp1bpp_a); - - Test_SrcMono1(BMF_1BPP, hbmp1bpp_b, 0); - Test_SrcMono1(iDcFormat, hbmpCompat, 0); - - bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bmi.bmiHeader.biWidth = 2; - bmi.bmiHeader.biHeight = -2; - bmi.bmiHeader.biPlanes = 1; - bmi.bmiHeader.biBitCount = 16; - bmi.bmiHeader.biCompression = BI_RGB; - bmi.bmiHeader.biSizeImage = 0; - bmi.bmiHeader.biXPelsPerMeter = 1; - bmi.bmiHeader.biYPelsPerMeter = 1; - bmi.bmiHeader.biClrUsed = 0; - bmi.bmiHeader.biClrImportant = 0; - hbmp = CreateDIBSection(hdcDst, (LPBITMAPINFO)&bmi, DIB_RGB_COLORS, &pvBits, NULL, 0); - ok(hbmp != 0, "CreateDIBSection failed\n"); - memset(pvBits, 0x55555555, 8 * 8 * 2); - - SelectObject(hdcDst, hbmp); - - c = GetPixel(hdcDst, 0, 0); - expected = iXlateToRGB(BMF_16BPP_555, 0x5555); - ok(c == expected, "expected %lx, got %lx\n", expected, c); - - expected = 0x123456; - SetPixel(hdcDst, 0, 0, expected); - expected = iXlateFromRGB(BMF_16BPP_555, expected); - c = *(volatile WORD*)pvBits; - ok(c == expected, "expected %lx, got %lx\n", expected, c); - - Test_SrcMono1(BMF_16BPP_555, hbmp, pvBits); - - DeleteObject(hbmp); - - /* Create a 565 DIB section */ - bmi.bmiHeader.biCompression = BI_BITFIELDS; - bmi.bmiHeader.biClrUsed = 3; - bmi.bmiHeader.biClrImportant = 3; - bmi.bmiColors[0] = 0xF800; - bmi.bmiColors[1] = 0x7E0; - bmi.bmiColors[2] = 0x1F; - hbmp = CreateDIBSection(hdcDst, (LPBITMAPINFO)&bmi, DIB_RGB_COLORS, &pvBits, NULL, 0); - ok(hbmp != 0, "CreateDIBSection failed\n"); - SelectObject(hdcDst, hbmp); - - Test_SrcMono1(BMF_16BPP_565, hbmp, pvBits); - - DeleteObject(hbmp); - - /* Create a 32 bpp DIB section */ - bmi.bmiHeader.biBitCount = 32; - bmi.bmiHeader.biCompression = BI_RGB; - bmi.bmiHeader.biClrUsed = 0; - bmi.bmiHeader.biClrImportant = 0; - hbmp = CreateDIBSection(hdcDst, (LPBITMAPINFO)&bmi, DIB_RGB_COLORS, &pvBits, NULL, 0); - ok(hbmp != 0, "CreateDIBSection failed\n"); - SelectObject(hdcDst, hbmp); - - Test_SrcMono1(BMF_32BPP_BGR, hbmp, pvBits); - - DeleteObject(hbmp); - -} - - -START_TEST(xlate) -{ - Initialize(); - - Test_SrcMono(); -} - -// trunk: 41 failures - diff --git a/rostests/rosautotest/CConfiguration.cpp b/rostests/rosautotest/CConfiguration.cpp deleted file mode 100644 index 66e1bc33f58..00000000000 --- a/rostests/rosautotest/CConfiguration.cpp +++ /dev/null @@ -1,207 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Class for managing all the configuration parameters - * COPYRIGHT: Copyright 2009-2011 Colin Finck - */ - -#include "precomp.h" - -#define CONFIGURATION_FILENAMEA "rosautotest.ini" -#define CONFIGURATION_FILENAMEW L"rosautotest.ini" - -typedef void (WINAPI *GETSYSINFO)(LPSYSTEM_INFO); - -/** - * Constructs an empty CConfiguration object - */ -CConfiguration::CConfiguration() -{ - WCHAR WindowsDirectory[MAX_PATH]; - - /* Zero-initialize variables */ - m_CrashRecovery = false; - m_Shutdown = false; - m_Submit = false; - - /* Check if we are running under ReactOS from the SystemRoot directory */ - if(!GetWindowsDirectoryW(WindowsDirectory, MAX_PATH)) - FATAL("GetWindowsDirectoryW failed"); - - m_IsReactOS = !_wcsnicmp(&WindowsDirectory[3], L"reactos", 7); -} - -/** - * Parses the passed parameters and sets the appropriate configuration settings. - * - * @param argc - * The number of parameters (argc parameter of the wmain function) - * - * @param argv - * Pointer to a wchar_t array containing the parameters (argv parameter of the wmain function) - */ -void -CConfiguration::ParseParameters(int argc, wchar_t* argv[]) -{ - /* Parse the command line arguments */ - for(int i = 1; i < argc; i++) - { - if(argv[i][0] == '-' || argv[i][0] == '/') - { - switch(argv[i][1]) - { - case 'c': - ++i; - m_Comment = UnicodeToAscii(argv[i]); - break; - - case 'r': - m_CrashRecovery = true; - break; - - case 's': - m_Shutdown = true; - break; - - case 'w': - m_Submit = true; - break; - - default: - throw CInvalidParameterException(); - } - } - else - { - /* Which parameter is this? */ - if(m_Module.empty()) - { - /* Copy the parameter */ - m_Module = argv[i]; - } - else if(m_Test.empty()) - { - /* Copy the parameter converted to ASCII */ - m_Test = UnicodeToAscii(argv[i]); - } - else - { - throw CInvalidParameterException(); - } - } - } - - /* The /r and /w options shouldn't be used in conjunction */ - if(m_CrashRecovery && m_Submit) - throw CInvalidParameterException(); -} - -/** - * Gets information about the running system and sets the appropriate configuration settings. - */ -void -CConfiguration::GetSystemInformation() -{ - char ProductType; - GETSYSINFO GetSysInfo; - HMODULE hKernel32; - OSVERSIONINFOEXW os; - stringstream ss; - SYSTEM_INFO si; - - /* Get the build from the define */ - ss << "&revision="; - ss << KERNEL_VERSION_BUILD_HEX; - - ss << "&platform="; - - if(m_IsReactOS) - { - ss << "reactos"; - } - else - { - /* No, then use the info from GetVersionExW */ - os.dwOSVersionInfoSize = sizeof(os); - - if(!GetVersionExW((LPOSVERSIONINFOW)&os)) - FATAL("GetVersionExW failed\n"); - - if(os.dwMajorVersion < 5) - EXCEPTION("Application requires at least Windows 2000!\n"); - - if(os.wProductType == VER_NT_WORKSTATION) - ProductType = 'w'; - else - ProductType = 's'; - - /* Print all necessary identification information into the Platform string */ - ss << os.dwMajorVersion << '.' - << os.dwMinorVersion << '.' - << os.dwBuildNumber << '.' - << os.wServicePackMajor << '.' - << os.wServicePackMinor << '.' - << ProductType << '.'; - } - - /* We also need to know about the processor architecture. - To retrieve this information accurately, check whether "GetNativeSystemInfo" is exported and use it then, otherwise fall back to "GetSystemInfo". */ - hKernel32 = GetModuleHandleW(L"KERNEL32.DLL"); - GetSysInfo = (GETSYSINFO)GetProcAddress(hKernel32, "GetNativeSystemInfo"); - - if(!GetSysInfo) - GetSysInfo = (GETSYSINFO)GetProcAddress(hKernel32, "GetSystemInfo"); - - GetSysInfo(&si); - ss << si.wProcessorArchitecture; - - m_SystemInfoRequestString = ss.str(); -} - -/** - * Reads additional configuration options from the INI file. - * - * ParseParameters should be called before this function to get the desired result. - */ -void -CConfiguration::GetConfigurationFromFile() -{ - DWORD Length; - string Value; - WCHAR ConfigFile[MAX_PATH]; - - /* Most values are only needed if we're going to submit anything */ - if(m_Submit) - { - /* Build the path to the configuration file from the application's path */ - GetModuleFileNameW(NULL, ConfigFile, MAX_PATH); - Length = wcsrchr(ConfigFile, '\\') - ConfigFile + 1; - wcscpy(&ConfigFile[Length], CONFIGURATION_FILENAMEW); - - /* Check if it exists */ - if(GetFileAttributesW(ConfigFile) == INVALID_FILE_ATTRIBUTES) - EXCEPTION("Missing \"" CONFIGURATION_FILENAMEA "\" configuration file!\n"); - - /* Get the user name */ - m_AuthenticationRequestString = "&sourceid="; - Value = GetINIValue(L"Login", L"SourceID", ConfigFile); - - if(Value.empty()) - EXCEPTION("SourceID is missing in the configuration file\n"); - - m_AuthenticationRequestString += EscapeString(Value); - - /* Get the password */ - m_AuthenticationRequestString += "&password="; - Value = GetINIValue(L"Login", L"Password", ConfigFile); - - if(Value.empty()) - EXCEPTION("Password is missing in the configuration file\n"); - - m_AuthenticationRequestString += EscapeString(Value); - - /* If we don't have any Comment string yet, try to find one in the INI file */ - if(m_Comment.empty()) - m_Comment = GetINIValue(L"Submission", L"Comment", ConfigFile); - } -} diff --git a/rostests/rosautotest/CConfiguration.h b/rostests/rosautotest/CConfiguration.h deleted file mode 100644 index b65db7d6e5e..00000000000 --- a/rostests/rosautotest/CConfiguration.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Class for managing all the configuration parameters - * COPYRIGHT: Copyright 2009 Colin Finck - */ - -class CConfiguration -{ -private: - bool m_CrashRecovery; - bool m_IsReactOS; - bool m_Shutdown; - bool m_Submit; - string m_Comment; - wstring m_Module; - string m_Test; - - string m_AuthenticationRequestString; - string m_SystemInfoRequestString; - -public: - CConfiguration(); - void ParseParameters(int argc, wchar_t* argv[]); - void GetSystemInformation(); - void GetConfigurationFromFile(); - - bool DoCrashRecovery() const { return m_CrashRecovery; } - bool DoShutdown() const { return m_Shutdown; } - bool DoSubmit() const { return m_Submit; } - bool IsReactOS() const { return m_IsReactOS; } - const string& GetComment() const { return m_Comment; } - const wstring& GetModule() const { return m_Module; } - const string& GetTest() const { return m_Test; } - - const string& GetAuthenticationRequestString() const { return m_AuthenticationRequestString; } - const string& GetSystemInfoRequestString() const { return m_SystemInfoRequestString; } -}; diff --git a/rostests/rosautotest/CFatalException.cpp b/rostests/rosautotest/CFatalException.cpp deleted file mode 100644 index 1c2a1699b9d..00000000000 --- a/rostests/rosautotest/CFatalException.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Fatal program exception with automatically added information - * COPYRIGHT: Copyright 2009 Colin Finck - */ - -#include "precomp.h" - -/** - * Constructs a CFatalException object, which is catched in wmain as an exception. - * You should always use the FATAL macro for throwing this exception. - * - * @param File - * Constant pointer to a char array with the source file where the exception occured (__FILE__) - * - * @param Line - * Integer value with the appropriate source line (__LINE__) - * - * @param Message - * Constant pointer to a char array containing a short message about the exception - */ -CFatalException::CFatalException(const char* File, int Line, const char* Message) - : m_File(File), m_Line(Line), m_Message(Message) -{ -} diff --git a/rostests/rosautotest/CFatalException.h b/rostests/rosautotest/CFatalException.h deleted file mode 100644 index a49f0c246c8..00000000000 --- a/rostests/rosautotest/CFatalException.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Fatal program exception with automatically added information - * COPYRIGHT: Copyright 2009 Colin Finck - */ - -class CFatalException -{ -private: - string m_File; - int m_Line; - string m_Message; - -public: - CFatalException(const char* File, int Line, const char* Message); - - const string& GetFile() const { return m_File; } - int GetLine() const { return m_Line; } - const string& GetMessage() const { return m_Message; } -}; diff --git a/rostests/rosautotest/CInvalidParameterException.cpp b/rostests/rosautotest/CInvalidParameterException.cpp deleted file mode 100644 index f28903f860f..00000000000 --- a/rostests/rosautotest/CInvalidParameterException.cpp +++ /dev/null @@ -1,15 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Empty exception thrown when the parameter processor detects an invalid parameter - * COPYRIGHT: Copyright 2009 Colin Finck - */ - -#include "precomp.h" - -/** - * Constructs an empty CInvalidParameterException object, which is catched in wmain as an exception. - */ -CInvalidParameterException::CInvalidParameterException() -{ -} diff --git a/rostests/rosautotest/CInvalidParameterException.h b/rostests/rosautotest/CInvalidParameterException.h deleted file mode 100644 index f3a87575cc2..00000000000 --- a/rostests/rosautotest/CInvalidParameterException.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Empty exception thrown when the parameter processor detects an invalid parameter - * COPYRIGHT: Copyright 2009 Colin Finck - */ - -class CInvalidParameterException -{ -public: - CInvalidParameterException(); -}; diff --git a/rostests/rosautotest/CJournaledTestList.cpp b/rostests/rosautotest/CJournaledTestList.cpp deleted file mode 100644 index ed0a74a32a0..00000000000 --- a/rostests/rosautotest/CJournaledTestList.cpp +++ /dev/null @@ -1,291 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Class implementing a journaled test list for the Crash Recovery feature - * COPYRIGHT: Copyright 2009 Colin Finck - */ - -#include "precomp.h" - -static const char szJournalHeader[] = "RAT_J-V1"; -static const WCHAR szJournalFileName[] = L"rosautotest.journal"; - -/** - * Constructs a CJournaledTestList object for an associated CTest-derived object. - * - * @param Test - * Pointer to a CTest-derived object, for which this test list shall serve. - */ -CJournaledTestList::CJournaledTestList(CTest* Test) - : CTestList(Test) -{ - WCHAR JournalFile[MAX_PATH]; - - m_hJournal = INVALID_HANDLE_VALUE; - - /* Build the path to the journal file */ - if(SHGetFolderPathW(NULL, CSIDL_APPDATA, NULL, SHGFP_TYPE_CURRENT, JournalFile) != S_OK) - FATAL("SHGetFolderPathW failed\n"); - - m_JournalFile = JournalFile; - m_JournalFile += L"\\rosautotest\\"; - - /* Create the directory if necessary */ - if(GetFileAttributesW(m_JournalFile.c_str()) == INVALID_FILE_ATTRIBUTES) - CreateDirectoryW(m_JournalFile.c_str(), NULL); - - m_JournalFile += szJournalFileName; - - /* Check if the journal already exists */ - if(GetFileAttributesW(m_JournalFile.c_str()) == INVALID_FILE_ATTRIBUTES) - WriteInitialJournalFile(); - else - LoadJournalFile(); -} - -/** - * Destructs a CJournaledTestList object. - */ -CJournaledTestList::~CJournaledTestList() -{ - if(m_hJournal != INVALID_HANDLE_VALUE) - CloseHandle(m_hJournal); -} - -/** - * Opens the journal file through the CreateFileW API using the m_hJournal handle. - * - * @param DesiredAccess - * dwDesiredAccess parameter passed to CreateFileW - * - * @param CreateNew - * true if the journal file shall be created, false if an existing one shall be opened - */ -void -CJournaledTestList::OpenJournal(DWORD DesiredAccess, bool CreateNew) -{ - m_hJournal = CreateFileW(m_JournalFile.c_str(), DesiredAccess, 0, NULL, (CreateNew ? CREATE_ALWAYS : OPEN_EXISTING), FILE_ATTRIBUTE_NORMAL, NULL); - - if(m_hJournal == INVALID_HANDLE_VALUE) - FATAL("CreateFileW failed\n"); -} - -/** - * Serializes a std::string and writes it into the opened journal file. - * - * @param String - * The std::string to serialize - * - * @see UnserializeFromBuffer - */ -void -CJournaledTestList::SerializeIntoJournal(const string& String) -{ - DWORD BytesWritten; - WriteFile(m_hJournal, String.c_str(), String.size() + 1, &BytesWritten, NULL); -} - -/** - * Serializes a std::wstring and writes it into the opened journal file. - * - * @param String - * The std::wstring to serialize - * - * @see UnserializeFromBuffer - */ -void -CJournaledTestList::SerializeIntoJournal(const wstring& String) -{ - DWORD BytesWritten; - WriteFile(m_hJournal, String.c_str(), (String.size() + 1) * sizeof(WCHAR), &BytesWritten, NULL); -} - -/** - * Unserializes the next std::string from the journal buffer. - * The passed buffer pointer will point at the next element afterwards. - * - * @param Buffer - * Pointer to a pointer to a char array containing the journal buffer - * - * @param Output - * The std::string to unserialize the value into. - */ -void -CJournaledTestList::UnserializeFromBuffer(char** Buffer, string& Output) -{ - Output = string(*Buffer); - *Buffer += Output.size() + 1; -} - -/** - * Unserializes the next std::wstring from the journal buffer. - * The passed buffer pointer will point at the next element afterwards. - * - * @param Buffer - * Pointer to a pointer to a char array containing the journal buffer - * - * @param Output - * The std::wstring to unserialize the value into. - */ -void -CJournaledTestList::UnserializeFromBuffer(char** Buffer, wstring& Output) -{ - Output = wstring((PWSTR)*Buffer); - *Buffer += (Output.size() + 1) * sizeof(WCHAR); -} - -/** - * Gets all tests to be run and writes an initial journal file with this information. - */ -void -CJournaledTestList::WriteInitialJournalFile() -{ - char TerminatingNull = 0; - CTestInfo* TestInfo; - DWORD BytesWritten; - - StringOut("Writing initial journal file...\n\n"); - - m_ListIterator = 0; - - /* Store all command lines in the m_List vector */ - while((TestInfo = m_Test->GetNextTestInfo()) != 0) - { - m_List.push_back(*TestInfo); - delete TestInfo; - } - - /* Serialize the vector and the iterator into a file */ - OpenJournal(GENERIC_WRITE, true); - - WriteFile(m_hJournal, szJournalHeader, sizeof(szJournalHeader), &BytesWritten, NULL); - WriteFile(m_hJournal, &m_ListIterator, sizeof(m_ListIterator), &BytesWritten, NULL); - - for(size_t i = 0; i < m_List.size(); i++) - { - SerializeIntoJournal(m_List[i].CommandLine); - SerializeIntoJournal(m_List[i].Module); - SerializeIntoJournal(m_List[i].Test); - } - - WriteFile(m_hJournal, &TerminatingNull, sizeof(TerminatingNull), &BytesWritten, NULL); - - CloseHandle(m_hJournal); - m_hJournal = INVALID_HANDLE_VALUE; - - /* m_ListIterator will be incremented before its first use */ - m_ListIterator = (size_t)-1; -} - -/** - * Loads the existing journal file and sets all members to the values saved in that file. - */ -void -CJournaledTestList::LoadJournalFile() -{ - char* Buffer; - char* pBuffer; - char FileHeader[sizeof(szJournalHeader)]; - DWORD BytesRead; - DWORD RemainingSize; - - StringOut("Loading journal file...\n\n"); - - OpenJournal(GENERIC_READ); - RemainingSize = GetFileSize(m_hJournal, NULL); - - /* Verify the header of the journal file */ - ReadFile(m_hJournal, FileHeader, sizeof(szJournalHeader), &BytesRead, NULL); - RemainingSize -= BytesRead; - - if(BytesRead != sizeof(szJournalHeader)) - EXCEPTION("Journal file contains no header!\n"); - - if(strcmp(FileHeader, szJournalHeader)) - EXCEPTION("Journal file has an unsupported header!\n"); - - /* Read the iterator */ - ReadFile(m_hJournal, &m_ListIterator, sizeof(m_ListIterator), &BytesRead, NULL); - RemainingSize -= BytesRead; - - if(BytesRead != sizeof(m_ListIterator)) - EXCEPTION("Journal file contains no m_ListIterator member!\n"); - - /* Read the rest of the file into a buffer */ - Buffer = new char[RemainingSize]; - pBuffer = Buffer; - ReadFile(m_hJournal, Buffer, RemainingSize, &BytesRead, NULL); - - CloseHandle(m_hJournal); - m_hJournal = NULL; - - /* Now recreate the m_List vector out of that information */ - while(*pBuffer) - { - CTestInfo TestInfo; - - UnserializeFromBuffer(&pBuffer, TestInfo.CommandLine); - UnserializeFromBuffer(&pBuffer, TestInfo.Module); - UnserializeFromBuffer(&pBuffer, TestInfo.Test); - - m_List.push_back(TestInfo); - } - - delete[] Buffer; -} - -/** - * Writes the current m_ListIterator value into the journal. - */ -void -CJournaledTestList::UpdateJournal() -{ - DWORD BytesWritten; - - OpenJournal(GENERIC_WRITE); - - /* Skip the header */ - SetFilePointer(m_hJournal, sizeof(szJournalHeader), NULL, FILE_CURRENT); - - WriteFile(m_hJournal, &m_ListIterator, sizeof(m_ListIterator), &BytesWritten, NULL); - - CloseHandle(m_hJournal); - m_hJournal = NULL; -} - -/** - * Interface to other classes for receiving information about the next test to be run. - * - * @return - * A pointer to a CTestInfo object, which contains all available information about the next test. - * The caller needs to free that object. - */ -CTestInfo* -CJournaledTestList::GetNextTestInfo() -{ - CTestInfo* TestInfo; - - /* Always jump to the next test here. - - If we're at the beginning of a new test list, the iterator will be set to 0. - - If we started with a loaded one, we assume that the test m_ListIterator is currently set - to crashed, so we move to the next test. */ - ++m_ListIterator; - - /* Check whether the iterator would already exceed the number of stored elements */ - if(m_ListIterator == m_List.size()) - { - /* Delete the journal and return no pointer */ - DeleteFileW(m_JournalFile.c_str()); - - TestInfo = NULL; - } - else - { - /* Update the journal with the current iterator and return the test information */ - UpdateJournal(); - - TestInfo = new CTestInfo(m_List[m_ListIterator]); - } - - return TestInfo; -} diff --git a/rostests/rosautotest/CJournaledTestList.h b/rostests/rosautotest/CJournaledTestList.h deleted file mode 100644 index 47900d3aa13..00000000000 --- a/rostests/rosautotest/CJournaledTestList.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Class implementing a journaled test list for the Crash Recovery feature - * COPYRIGHT: Copyright 2009 Colin Finck - */ - -class CJournaledTestList : public CTestList -{ -private: - HANDLE m_hJournal; - size_t m_ListIterator; - vector m_List; - wstring m_JournalFile; - - void LoadJournalFile(); - void OpenJournal(DWORD DesiredAccess, bool CreateNew = false); - void SerializeIntoJournal(const string& String); - void SerializeIntoJournal(const wstring& String); - void UnserializeFromBuffer(char** Buffer, string& Output); - void UnserializeFromBuffer(char** Buffer, wstring& Output); - void UpdateJournal(); - void WriteInitialJournalFile(); - -public: - CJournaledTestList(CTest* Test); - ~CJournaledTestList(); - - CTestInfo* GetNextTestInfo(); -}; diff --git a/rostests/rosautotest/CMakeLists.txt b/rostests/rosautotest/CMakeLists.txt deleted file mode 100644 index e77ec8c744f..00000000000 --- a/rostests/rosautotest/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ - -set_cpp() - -list(APPEND SOURCE - CConfiguration.cpp - CFatalException.cpp - CInvalidParameterException.cpp - CJournaledTestList.cpp - CProcess.cpp - CSimpleException.cpp - CTest.cpp - CTestInfo.cpp - CTestList.cpp - CVirtualTestList.cpp - CWebService.cpp - CWineTest.cpp - main.cpp - shutdown.cpp - tools.cpp) - -add_executable(rosautotest ${SOURCE}) - -set_module_type(rosautotest win32cui UNICODE) -add_importlibs(rosautotest advapi32 shell32 user32 wininet msvcrt kernel32 ntdll) -add_pch(rosautotest precomp.h) - -add_cd_file(TARGET rosautotest DESTINATION reactos/system32 FOR all) \ No newline at end of file diff --git a/rostests/rosautotest/CProcess.cpp b/rostests/rosautotest/CProcess.cpp deleted file mode 100644 index 6697318f349..00000000000 --- a/rostests/rosautotest/CProcess.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Class able to create a new process and closing its handles on destruction (exception-safe) - * COPYRIGHT: Copyright 2009 Colin Finck - */ - -#include "precomp.h" - -/** - * Constructs a CProcess object and uses the CreateProcessW function to start the process immediately. - * - * @param CommandLine - * A std::wstring containing the command line to run - * - * @param StartupInfo - * Pointer to a STARTUPINFOW structure containing process startup information - */ -CProcess::CProcess(const wstring& CommandLine, LPSTARTUPINFOW StartupInfo) -{ - auto_array_ptr CommandLinePtr(new WCHAR[CommandLine.size() + 1]); - - wcscpy(CommandLinePtr, CommandLine.c_str()); - - if(!CreateProcessW(NULL, CommandLinePtr, NULL, NULL, TRUE, NORMAL_PRIORITY_CLASS, NULL, NULL, StartupInfo, &m_ProcessInfo)) - FATAL("CreateProcessW failed\n"); -} - -/** - * Destructs a CProcess object and closes all handles belonging to the process. - */ -CProcess::~CProcess() -{ - CloseHandle(m_ProcessInfo.hThread); - CloseHandle(m_ProcessInfo.hProcess); -} diff --git a/rostests/rosautotest/CProcess.h b/rostests/rosautotest/CProcess.h deleted file mode 100644 index a46310c2c7e..00000000000 --- a/rostests/rosautotest/CProcess.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Class able to create a new process and closing its handles on destruction (exception-safe) - * COPYRIGHT: Copyright 2009 Colin Finck - */ - -class CProcess -{ -private: - PROCESS_INFORMATION m_ProcessInfo; - -public: - CProcess(const wstring& CommandLine, LPSTARTUPINFOW StartupInfo); - ~CProcess(); - - HANDLE GetProcessHandle() const { return m_ProcessInfo.hProcess; } -}; diff --git a/rostests/rosautotest/CSimpleException.cpp b/rostests/rosautotest/CSimpleException.cpp deleted file mode 100644 index f7ae841dff0..00000000000 --- a/rostests/rosautotest/CSimpleException.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Simple exception containing just a message - * COPYRIGHT: Copyright 2009 Colin Finck - */ - -#include "precomp.h" - -/** - * Constructs a CSimpleException object, which is catched in wmain as an exception. - * You should always use the EXCEPTION or SSEXCEPTION macro for throwing this exception. - * - * @param Message - * Constant pointer to a char array containing a short message about the exception - */ -CSimpleException::CSimpleException(const char* Message) - : m_Message(Message) -{ -} diff --git a/rostests/rosautotest/CSimpleException.h b/rostests/rosautotest/CSimpleException.h deleted file mode 100644 index 08bd09cd809..00000000000 --- a/rostests/rosautotest/CSimpleException.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Simple exception containing just a message - * COPYRIGHT: Copyright 2009 Colin Finck - */ - -class CSimpleException -{ -private: - string m_Message; - -public: - CSimpleException(const char* Message); - - const string& GetMessage() const { return m_Message; } -}; diff --git a/rostests/rosautotest/CTest.cpp b/rostests/rosautotest/CTest.cpp deleted file mode 100644 index 742130072da..00000000000 --- a/rostests/rosautotest/CTest.cpp +++ /dev/null @@ -1,8 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Class implementing a generic Test, needs to be used by a derived class - * COPYRIGHT: Copyright 2009 Colin Finck - */ - -#include "precomp.h" diff --git a/rostests/rosautotest/CTest.h b/rostests/rosautotest/CTest.h deleted file mode 100644 index 1f559b336f1..00000000000 --- a/rostests/rosautotest/CTest.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Class implementing a generic Test, needs to be used by a derived class - * COPYRIGHT: Copyright 2009 Colin Finck - */ - -class CTest -{ -private: - virtual CTestInfo* GetNextTestInfo() = 0; - -public: - virtual void Run() = 0; - - /* All CTestList-derived classes need to access the private GetNextTestInfo method */ - friend class CJournaledTestList; - friend class CVirtualTestList; -}; diff --git a/rostests/rosautotest/CTestInfo.cpp b/rostests/rosautotest/CTestInfo.cpp deleted file mode 100644 index bea24821475..00000000000 --- a/rostests/rosautotest/CTestInfo.cpp +++ /dev/null @@ -1,8 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Class implementing a bucket for Test information - * COPYRIGHT: Copyright 2009 Colin Finck - */ - -#include "precomp.h" diff --git a/rostests/rosautotest/CTestInfo.h b/rostests/rosautotest/CTestInfo.h deleted file mode 100644 index 791480540fc..00000000000 --- a/rostests/rosautotest/CTestInfo.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Class implementing a bucket for Test information - * COPYRIGHT: Copyright 2009 Colin Finck - */ - -class CTestInfo -{ -public: - wstring CommandLine; - string Module; - string Test; - string Log; -}; diff --git a/rostests/rosautotest/CTestList.cpp b/rostests/rosautotest/CTestList.cpp deleted file mode 100644 index 17e31d9739d..00000000000 --- a/rostests/rosautotest/CTestList.cpp +++ /dev/null @@ -1,19 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Class implementing a generic Test list, needs to be used by a derived class - * COPYRIGHT: Copyright 2009 Colin Finck - */ - -#include "precomp.h" - -/** - * Constructor serving for CTestList-derived classes. - * - * @param Test - * Pointer to a CTest-derived object, for which this test list shall serve. - */ -CTestList::CTestList(CTest* Test) : - m_Test(Test) -{ -} diff --git a/rostests/rosautotest/CTestList.h b/rostests/rosautotest/CTestList.h deleted file mode 100644 index 49a559ac999..00000000000 --- a/rostests/rosautotest/CTestList.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Class implementing a generic Test list, needs to be used by a derived class - * COPYRIGHT: Copyright 2009 Colin Finck - */ - -class CTestList -{ -protected: - CTest* m_Test; - - CTestList(CTest* Test); - -public: - virtual CTestInfo* GetNextTestInfo() = 0; -}; diff --git a/rostests/rosautotest/CVirtualTestList.cpp b/rostests/rosautotest/CVirtualTestList.cpp deleted file mode 100644 index 0aade7202fa..00000000000 --- a/rostests/rosautotest/CVirtualTestList.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Class implementing a virtual test list for the tests to be ran - * COPYRIGHT: Copyright 2009 Colin Finck - */ - -#include "precomp.h" - -/** - * Constructs a CVirtualTestList object for an associated CTest-derived object. - * - * @param Test - * Pointer to a CTest-derived object, for which this test list shall serve. - */ -CVirtualTestList::CVirtualTestList(CTest* Test) - : CTestList(Test) -{ -} - -/** - * Interface to other classes for receiving information about the next test to be run. - * - * @return - * A pointer to a CTestInfo object, which contains all available information about the next test. - * The caller needs to free that object. - */ -CTestInfo* -CVirtualTestList::GetNextTestInfo() -{ - return m_Test->GetNextTestInfo(); -} diff --git a/rostests/rosautotest/CVirtualTestList.h b/rostests/rosautotest/CVirtualTestList.h deleted file mode 100644 index d9d6d603e95..00000000000 --- a/rostests/rosautotest/CVirtualTestList.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Class implementing a virtual test list for the tests to be ran - * COPYRIGHT: Copyright 2009 Colin Finck - */ - -class CVirtualTestList : public CTestList -{ -public: - CVirtualTestList(CTest* Test); - - CTestInfo* GetNextTestInfo(); -}; diff --git a/rostests/rosautotest/CWebService.cpp b/rostests/rosautotest/CWebService.cpp deleted file mode 100644 index c467f3b2309..00000000000 --- a/rostests/rosautotest/CWebService.cpp +++ /dev/null @@ -1,214 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Class implementing the interface to the "testman" Web Service - * COPYRIGHT: Copyright 2009-2011 Colin Finck - */ - -#include "precomp.h" - -static const WCHAR szHostname[] = L"reactos.org"; -static const WCHAR szServerFile[] = L"testman/webservice/"; - -/** - * Constructs a CWebService object and immediately establishes a connection to the "testman" Web Service. - */ -CWebService::CWebService() -{ - /* Zero-initialize variables */ - m_hHTTP = NULL; - m_hHTTPRequest = NULL; - m_TestID = NULL; - - /* Establish an internet connection to the "testman" server */ - m_hInet = InternetOpenW(L"rosautotest", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0); - - if(!m_hInet) - FATAL("InternetOpenW failed\n"); - - m_hHTTP = InternetConnectW(m_hInet, szHostname, INTERNET_DEFAULT_HTTP_PORT, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0); - - if(!m_hHTTP) - FATAL("InternetConnectW failed\n"); -} - -/** - * Destructs a CWebService object and closes all connections to the Web Service. - */ -CWebService::~CWebService() -{ - if(m_hInet) - InternetCloseHandle(m_hInet); - - if(m_hHTTP) - InternetCloseHandle(m_hHTTP); - - if(m_hHTTPRequest) - InternetCloseHandle(m_hHTTPRequest); - - if(m_TestID) - delete m_TestID; -} - -/** - * Sends data to the Web Service. - * - * @param InputData - * A std::string containing all the data, which is going to be submitted as HTTP POST data. - * - * @return - * Returns a pointer to a char array containing the data received from the Web Service. - * The caller needs to free that pointer. - */ -PCHAR -CWebService::DoRequest(const string& InputData) -{ - const WCHAR szHeaders[] = L"Content-Type: application/x-www-form-urlencoded"; - - auto_array_ptr Data; - DWORD DataLength; - - /* Post our test results to the web service */ - m_hHTTPRequest = HttpOpenRequestW(m_hHTTP, L"POST", szServerFile, NULL, NULL, NULL, INTERNET_FLAG_NO_COOKIES | INTERNET_FLAG_RELOAD | INTERNET_FLAG_NO_CACHE_WRITE, 0); - - if(!m_hHTTPRequest) - FATAL("HttpOpenRequestW failed\n"); - - Data.reset(new char[InputData.size() + 1]); - strcpy(Data, InputData.c_str()); - - if(!HttpSendRequestW(m_hHTTPRequest, szHeaders, wcslen(szHeaders), Data, InputData.size())) - FATAL("HttpSendRequestW failed\n"); - - /* Get the response */ - if(!InternetQueryDataAvailable(m_hHTTPRequest, &DataLength, 0, 0)) - FATAL("InternetQueryDataAvailable failed\n"); - - Data.reset(new char[DataLength + 1]); - - if(!InternetReadFile(m_hHTTPRequest, Data, DataLength, &DataLength)) - FATAL("InternetReadFile failed\n"); - - Data[DataLength] = 0; - - return Data.release(); -} - -/** - * Requests a Test ID from the Web Service for our test run. - * - * @param TestType - * Constant pointer to a char array containing the test type to be run (i.e. "wine") - */ -void -CWebService::GetTestID(const char* TestType) -{ - string Data; - - Data = "action=gettestid"; - Data += Configuration.GetAuthenticationRequestString(); - Data += Configuration.GetSystemInfoRequestString(); - Data += "&testtype="; - Data += TestType; - - if(!Configuration.GetComment().empty()) - { - Data += "&comment="; - Data += Configuration.GetComment(); - } - - m_TestID = DoRequest(Data); - - /* Verify that this is really a number */ - if(!IsNumber(m_TestID)) - { - stringstream ss; - - ss << "Expected Test ID, but received:" << endl << m_TestID << endl; - SSEXCEPTION; - } -} - -/** - * Gets a Suite ID from the Web Service for this module/test combination. - * - * @param TestType - * Constant pointer to a char array containing the test type to be run (i.e. "wine") - * - * @param TestInfo - * Pointer to a CTestInfo object containing information about the test - * - * @return - * Returns a pointer to a char array containing the Suite ID received from the Web Service. - * The caller needs to free that pointer. - */ -PCHAR -CWebService::GetSuiteID(const char* TestType, CTestInfo* TestInfo) -{ - auto_array_ptr SuiteID; - string Data; - - Data = "action=getsuiteid"; - Data += Configuration.GetAuthenticationRequestString(); - Data += "&testtype="; - Data += TestType; - Data += "&module="; - Data += TestInfo->Module; - Data += "&test="; - Data += TestInfo->Test; - - SuiteID.reset(DoRequest(Data)); - - /* Verify that this is really a number */ - if(!IsNumber(SuiteID)) - { - stringstream ss; - - ss << "Expected Suite ID, but received:" << endl << SuiteID << endl; - SSEXCEPTION; - } - - return SuiteID.release(); -} - -/** - * Interface to other classes for submitting a result of one test - * - * @param TestType - * Constant pointer to a char array containing the test type to be run (i.e. "wine") - * - * @param TestInfo - * Pointer to a CTestInfo object containing information about the test - */ -void -CWebService::Submit(const char* TestType, CTestInfo* TestInfo) -{ - auto_array_ptr Response; - auto_array_ptr SuiteID; - string Data; - stringstream ss; - - if(!m_TestID) - GetTestID(TestType); - - SuiteID.reset(GetSuiteID(TestType, TestInfo)); - - Data = "action=submit"; - Data += Configuration.GetAuthenticationRequestString(); - Data += "&testtype="; - Data += TestType; - Data += "&testid="; - Data += m_TestID; - Data += "&suiteid="; - Data += SuiteID; - Data += "&log="; - Data += TestInfo->Log; - - Response.reset(DoRequest(Data)); - - ss << "The server responded:" << endl << Response << endl; - StringOut(ss.str()); - - if(strcmp(Response, "OK")) - EXCEPTION("Aborted!\n"); -} diff --git a/rostests/rosautotest/CWebService.h b/rostests/rosautotest/CWebService.h deleted file mode 100644 index 07dbf897707..00000000000 --- a/rostests/rosautotest/CWebService.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Class implementing the interface to the "testman" Web Service - * COPYRIGHT: Copyright 2009 Colin Finck - */ - -class CWebService -{ -private: - HINTERNET m_hInet; - HINTERNET m_hHTTP; - HINTERNET m_hHTTPRequest; - PCHAR m_TestID; - - PCHAR DoRequest(const string& InputData); - void GetTestID(const char* TestType); - PCHAR GetSuiteID(const char* TestType, CTestInfo* TestInfo); - -public: - CWebService(); - ~CWebService(); - - void Submit(const char* TestType, CTestInfo* TestInfo); -}; diff --git a/rostests/rosautotest/CWineTest.cpp b/rostests/rosautotest/CWineTest.cpp deleted file mode 100644 index 976343b8296..00000000000 --- a/rostests/rosautotest/CWineTest.cpp +++ /dev/null @@ -1,366 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Class implementing functions for handling Wine tests - * COPYRIGHT: Copyright 2009 Colin Finck - */ - -#include "precomp.h" - -static const DWORD ListTimeout = 10000; - -/** - * Constructs a CWineTest object. - */ -CWineTest::CWineTest() -{ - WCHAR WindowsDirectory[MAX_PATH]; - - /* Zero-initialize variables */ - m_hFind = NULL; - m_hReadPipe = NULL; - m_hWritePipe = NULL; - m_ListBuffer = NULL; - memset(&m_StartupInfo, 0, sizeof(m_StartupInfo)); - - /* Set up m_TestPath */ - if(!GetWindowsDirectoryW(WindowsDirectory, MAX_PATH)) - FATAL("GetWindowsDirectoryW failed"); - - m_TestPath = WindowsDirectory; - m_TestPath += L"\\bin\\"; -} - -/** - * Destructs a CWineTest object. - */ -CWineTest::~CWineTest() -{ - if(m_hFind) - FindClose(m_hFind); - - if(m_hReadPipe) - CloseHandle(m_hReadPipe); - - if(m_hWritePipe) - CloseHandle(m_hWritePipe); - - if(m_ListBuffer) - delete m_ListBuffer; -} - -/** - * Gets the next module test file using the FindFirstFileW/FindNextFileW API. - * - * @return - * true if we found a next file, otherwise false. - */ -bool -CWineTest::GetNextFile() -{ - bool FoundFile = false; - WIN32_FIND_DATAW fd; - - /* Did we already begin searching for files? */ - if(m_hFind) - { - /* Then get the next file (if any) */ - if(FindNextFileW(m_hFind, &fd)) - FoundFile = true; - } - else - { - /* Start searching for test files */ - wstring FindPath = m_TestPath; - - /* Did the user specify a module? */ - if(Configuration.GetModule().empty()) - { - /* No module, so search for all files in that directory */ - FindPath += L"*.exe"; - } - else - { - /* Search for files with the pattern "modulename_*" */ - FindPath += Configuration.GetModule(); - FindPath += L"_*.exe"; - } - - /* Search for the first file and check whether we got one */ - m_hFind = FindFirstFileW(FindPath.c_str(), &fd); - - if(m_hFind != INVALID_HANDLE_VALUE) - FoundFile = true; - } - - if(FoundFile) - m_CurrentFile = fd.cFileName; - - return FoundFile; -} - -/** - * Executes the --list command of a module test file to get information about the available tests. - * - * @return - * The number of bytes we read into the m_ListBuffer member variable by capturing the output of the --list command. - */ -DWORD -CWineTest::DoListCommand() -{ - DWORD BytesAvailable; - DWORD Temp; - wstring CommandLine; - - /* Build the command line */ - CommandLine = m_TestPath; - CommandLine += m_CurrentFile; - CommandLine += L" --list"; - - { - /* Start the process for getting all available tests */ - CProcess Process(CommandLine, &m_StartupInfo); - - /* Wait till this process ended */ - if(WaitForSingleObject(Process.GetProcessHandle(), ListTimeout) == WAIT_FAILED) - FATAL("WaitForSingleObject failed for the test list\n"); - } - - /* Read the output data into a buffer */ - if(!PeekNamedPipe(m_hReadPipe, NULL, 0, NULL, &BytesAvailable, NULL)) - FATAL("PeekNamedPipe failed for the test list\n"); - - /* Check if we got any */ - if(!BytesAvailable) - { - stringstream ss; - - ss << "The --list command did not return any data for " << UnicodeToAscii(m_CurrentFile) << endl; - SSEXCEPTION; - } - - /* Read the data */ - m_ListBuffer = new char[BytesAvailable]; - - if(!ReadFile(m_hReadPipe, m_ListBuffer, BytesAvailable, &Temp, NULL)) - FATAL("ReadPipe failed\n"); - - return BytesAvailable; -} - -/** - * Gets the next test from m_ListBuffer, which was filled with information from the --list command. - * - * @return - * true if a next test was found, otherwise false. - */ -bool -CWineTest::GetNextTest() -{ - PCHAR pEnd; - static DWORD BufferSize; - static PCHAR pStart; - - if(!m_ListBuffer) - { - /* Perform the --list command */ - BufferSize = DoListCommand(); - - /* Move the pointer to the first test */ - pStart = strchr(m_ListBuffer, '\n'); - pStart += 5; - } - - /* If we reach the buffer size, we finished analyzing the output of this test */ - if(pStart >= (m_ListBuffer + BufferSize)) - { - /* Clear m_CurrentFile to indicate that */ - m_CurrentFile.clear(); - - /* Also free the memory for the list buffer */ - delete m_ListBuffer; - m_ListBuffer = NULL; - - return false; - } - - /* Get start and end of this test name */ - pEnd = pStart; - - while(*pEnd != '\r') - ++pEnd; - - /* Store the test name */ - m_CurrentTest = string(pStart, pEnd); - - /* Move the pointer to the next test */ - pStart = pEnd + 6; - - return true; -} - -/** - * Interface to CTestList-derived classes for getting all information about the next test to be run. - * - * @return - * Returns a pointer to a CTestInfo object containing all available information about the next test. - */ -CTestInfo* -CWineTest::GetNextTestInfo() -{ - while(!m_CurrentFile.empty() || GetNextFile()) - { - while(GetNextTest()) - { - /* If the user specified a test through the command line, check this here */ - if(!Configuration.GetTest().empty() && Configuration.GetTest() != m_CurrentTest) - continue; - - { - auto_ptr TestInfo(new CTestInfo()); - size_t UnderscorePosition; - - /* Build the command line */ - TestInfo->CommandLine = m_TestPath; - TestInfo->CommandLine += m_CurrentFile; - TestInfo->CommandLine += ' '; - TestInfo->CommandLine += AsciiToUnicode(m_CurrentTest); - - /* Store the Module name */ - UnderscorePosition = m_CurrentFile.find_last_of('_'); - - if(UnderscorePosition == m_CurrentFile.npos) - { - stringstream ss; - - ss << "Invalid test file name: " << UnicodeToAscii(m_CurrentFile) << endl; - SSEXCEPTION; - } - - TestInfo->Module = UnicodeToAscii(m_CurrentFile.substr(0, UnderscorePosition)); - - /* Store the test */ - TestInfo->Test = m_CurrentTest; - - return TestInfo.release(); - } - } - } - - return NULL; -} - -/** - * Runs a Wine test and captures the output - * - * @param TestInfo - * Pointer to a CTestInfo object containing information about the test. - * Will contain the test log afterwards if the user wants to submit data. - */ -void -CWineTest::RunTest(CTestInfo* TestInfo) -{ - bool BreakLoop = false; - DWORD BytesAvailable; - DWORD Temp; - stringstream ss; - - ss << "Running Wine Test, Module: " << TestInfo->Module << ", Test: " << TestInfo->Test << endl; - StringOut(ss.str()); - - { - /* Execute the test */ - CProcess Process(TestInfo->CommandLine, &m_StartupInfo); - - /* Receive all the data from the pipe */ - do - { - /* When the application finished, make sure that we peek the pipe one more time, so that we get all data. - If the following condition would be the while() condition, we might hit a race condition: - - We check for data with PeekNamedPipe -> no data available - - The application outputs its data and finishes - - WaitForSingleObject reports that the application has finished and we break the loop without receiving any data - */ - if(WaitForSingleObject(Process.GetProcessHandle(), 0) != WAIT_TIMEOUT) - BreakLoop = true; - - if(!PeekNamedPipe(m_hReadPipe, NULL, 0, NULL, &BytesAvailable, NULL)) - FATAL("PeekNamedPipe failed for the test run\n"); - - if(BytesAvailable) - { - /* There is data, so get it and output it */ - auto_array_ptr Buffer(new char[BytesAvailable + 1]); - - if(!ReadFile(m_hReadPipe, Buffer, BytesAvailable, &Temp, NULL)) - FATAL("ReadFile failed for the test run\n"); - - /* Output all test output through StringOut, even while the test is still running */ - Buffer[BytesAvailable] = 0; - StringOut(string(Buffer)); - - if(Configuration.DoSubmit()) - TestInfo->Log += Buffer; - } - } - while(!BreakLoop); - } -} - -/** - * Interface to other classes for running all desired Wine tests. - */ -void -CWineTest::Run() -{ - auto_ptr TestList; - auto_ptr WebService; - CTestInfo* TestInfo; - SECURITY_ATTRIBUTES SecurityAttributes; - - /* Create a pipe for getting the output of the tests */ - SecurityAttributes.nLength = sizeof(SecurityAttributes); - SecurityAttributes.bInheritHandle = TRUE; - SecurityAttributes.lpSecurityDescriptor = NULL; - - if(!CreatePipe(&m_hReadPipe, &m_hWritePipe, &SecurityAttributes, 0)) - FATAL("CreatePipe failed\n"); - - m_StartupInfo.cb = sizeof(m_StartupInfo); - m_StartupInfo.dwFlags = STARTF_USESTDHANDLES; - m_StartupInfo.hStdOutput = m_hWritePipe; - - /* The virtual test list is of course faster, so it should be preferred over - the journaled one. - Enable the journaled one only in case ... - - we're running under ReactOS (as the journal is only useful in conjunction with sysreg2) - - we shall keep information for Crash Recovery - - and the user didn't specify a module (then doing Crash Recovery doesn't really make sense) */ - if(Configuration.IsReactOS() && Configuration.DoCrashRecovery() && Configuration.GetModule().empty()) - { - /* Use a test list with a permanent journal */ - TestList.reset(new CJournaledTestList(this)); - } - else - { - /* Use the fast virtual test list with no additional overhead */ - TestList.reset(new CVirtualTestList(this)); - } - - /* Initialize the Web Service interface if required */ - if(Configuration.DoSubmit()) - WebService.reset(new CWebService()); - - /* Get information for each test to run */ - while((TestInfo = TestList->GetNextTestInfo()) != 0) - { - auto_ptr TestInfoPtr(TestInfo); - - RunTest(TestInfo); - - if(Configuration.DoSubmit() && !TestInfo->Log.empty()) - WebService->Submit("wine", TestInfo); - - StringOut("\n\n"); - } -} diff --git a/rostests/rosautotest/CWineTest.h b/rostests/rosautotest/CWineTest.h deleted file mode 100644 index 58ca5585e84..00000000000 --- a/rostests/rosautotest/CWineTest.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Class implementing functions for handling Wine tests - * COPYRIGHT: Copyright 2009 Colin Finck - */ - -class CWineTest : public CTest -{ -private: - HANDLE m_hFind; - HANDLE m_hReadPipe; - HANDLE m_hWritePipe; - PCHAR m_ListBuffer; - STARTUPINFOW m_StartupInfo; - string m_CurrentTest; - wstring m_CurrentFile; - wstring m_CurrentListCommand; - wstring m_TestPath; - - bool GetNextFile(); - bool GetNextTest(); - CTestInfo* GetNextTestInfo(); - DWORD DoListCommand(); - void RunTest(CTestInfo* TestInfo); - -public: - CWineTest(); - ~CWineTest(); - - void Run(); -}; diff --git a/rostests/rosautotest/auto_array_ptr.h b/rostests/rosautotest/auto_array_ptr.h deleted file mode 100644 index e1e3b291803..00000000000 --- a/rostests/rosautotest/auto_array_ptr.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Template similar to std::auto_ptr for arrays - * COPYRIGHT: Copyright 2009 Colin Finck - */ - -template -class auto_array_ptr -{ -private: - Type* m_Ptr; - -public: - typedef Type element_type; - - /* Construct an auto_array_ptr from a pointer */ - explicit auto_array_ptr(Type* Ptr = 0) throw() - : m_Ptr(Ptr) - { - } - - /* Construct an auto_array_ptr from an existing auto_array_ptr */ - auto_array_ptr(auto_array_ptr& Right) throw() - : m_Ptr(Right.release()) - { - } - - /* Destruct the auto_array_ptr and remove the corresponding array from memory */ - ~auto_array_ptr() throw() - { - delete[] m_Ptr; - } - - /* Get the pointer address */ - Type* get() const throw() - { - return m_Ptr; - } - - /* Release the pointer */ - Type* release() throw() - { - Type* Tmp = m_Ptr; - m_Ptr = 0; - - return Tmp; - } - - /* Reset to a new pointer */ - void reset(Type* Ptr = 0) throw() - { - if(Ptr != m_Ptr) - delete[] m_Ptr; - - m_Ptr = Ptr; - } - - /* Simulate all the functionality of real arrays by casting the auto_array_ptr to Type* on demand */ - operator Type*() const throw() - { - return m_Ptr; - } -}; diff --git a/rostests/rosautotest/main.cpp b/rostests/rosautotest/main.cpp deleted file mode 100644 index 5fb5dd4c297..00000000000 --- a/rostests/rosautotest/main.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Main implementation file - * COPYRIGHT: Copyright 2008-2009 Colin Finck - */ - -#include "precomp.h" -#include - -CConfiguration Configuration; - -/** - * Prints the application usage. - */ -static void -IntPrintUsage() -{ - cout << "rosautotest - ReactOS Automatic Testing Utility" << endl - << "Usage: rosautotest [options] [module] [test]" << endl - << " options:" << endl - << " /? - Shows this help." << endl - << " /c - Specifies the comment to be submitted to the Web Service." << endl - << " Skips the comment set in the configuration file (if any)." << endl - << " Only has an effect when /w is also used." << endl - << " /r - Maintain information to resume from ReactOS crashes" << endl - << " Can only be run under ReactOS and relies on sysreg2," << endl - << " so incompatible with /w" << endl - << " /s - Shut down the system after finishing the tests." << endl - << " /w - Submit the results to the webservice." << endl - << " Requires a \"rosautotest.ini\" with valid login data." << endl - << " Incompatible with the /r option." << endl - << endl - << " module:" << endl - << " The module to be tested (i.e. \"advapi32\")" << endl - << " If this parameter is specified without any test parameter," << endl - << " all tests of the specified module are run." << endl - << endl - << " test:" << endl - << " The test to be run. Needs to be a test of the specified module." << endl; -} - -/** - * Main entry point - */ -extern "C" int -wmain(int argc, wchar_t* argv[]) -{ - CWineTest WineTest; - int ReturnValue = 1; - - try - { - /* Set up the configuration */ - Configuration.ParseParameters(argc, argv); - Configuration.GetSystemInformation(); - Configuration.GetConfigurationFromFile(); - - /* Run the tests */ - WineTest.Run(); - - /* For sysreg2 */ - DbgPrint("SYSREG_CHECKPOINT:THIRDBOOT_COMPLETE\n"); - - ReturnValue = 0; - } - catch(CInvalidParameterException) - { - IntPrintUsage(); - } - catch(CSimpleException& e) - { - StringOut(e.GetMessage()); - } - catch(CFatalException& e) - { - stringstream ss; - - ss << "An exception occured in rosautotest." << endl - << "Message: " << e.GetMessage() << endl - << "File: " << e.GetFile() << endl - << "Line: " << e.GetLine() << endl - << "Last Win32 Error: " << GetLastError() << endl; - StringOut(ss.str()); - } - - /* For sysreg2 to notice if rosautotest itself failed */ - if(ReturnValue == 1) - DbgPrint("SYSREG_ROSAUTOTEST_FAILURE\n"); - - /* Shut down the system if requested, also in case of an exception above */ - if(Configuration.DoShutdown() && !ShutdownSystem()) - ReturnValue = 1; - - return ReturnValue; -} diff --git a/rostests/rosautotest/precomp.h b/rostests/rosautotest/precomp.h deleted file mode 100644 index f5e65ad0798..00000000000 --- a/rostests/rosautotest/precomp.h +++ /dev/null @@ -1,62 +0,0 @@ -/* General includes */ -#include -#include -#include -#include -#include - -using namespace std; - -#define WIN32_NO_STATUS -#include -#include -#include -#include -#include - -#include -#include - -/* Class includes */ -#include "auto_array_ptr.h" -#include "CConfiguration.h" -#include "CFatalException.h" -#include "CInvalidParameterException.h" -#include "CProcess.h" -#include "CSimpleException.h" -#include "CTestInfo.h" -#include "CTest.h" -#include "CTestList.h" -#include "CJournaledTestList.h" -#include "CVirtualTestList.h" -#include "CWebService.h" -#include "CWineTest.h" - -/* Useful macros */ -#define EXCEPTION(Message) throw CSimpleException(Message) -#define FATAL(Message) throw CFatalException(__FILE__, __LINE__, Message) -#define SSEXCEPTION throw CSimpleException(ss.str().c_str()) - -/* main.c */ -extern CConfiguration Configuration; - -/* shutdown.c */ -bool ShutdownSystem(); - -/* tools.c */ -wstring AsciiToUnicode(const char* AsciiString); -wstring AsciiToUnicode(const string& AsciiString); -string EscapeString(const char* Input); -string EscapeString(const string& Input); -string GetINIValue(PCWCH AppName, PCWCH KeyName, PCWCH FileName); -bool IsNumber(const char* Input); -void StringOut(const string& String); -string UnicodeToAscii(PCWSTR UnicodeString); -string UnicodeToAscii(const wstring& UnicodeString); - - -/* Lazy HACK to allow compiling/debugging with MSVC while we lack support - for linking against "debugsup_ntdll" in MSVC */ -#ifdef _MSC_VER - #define DbgPrint -#endif diff --git a/rostests/rosautotest/rosautotest.rbuild b/rostests/rosautotest/rosautotest.rbuild deleted file mode 100644 index 5224c24df97..00000000000 --- a/rostests/rosautotest/rosautotest.rbuild +++ /dev/null @@ -1,26 +0,0 @@ - - - - -fno-rtti - . - advapi32 - shell32 - user32 - wininet - CConfiguration.cpp - CFatalException.cpp - CInvalidParameterException.cpp - CJournaledTestList.cpp - CProcess.cpp - CSimpleException.cpp - CTest.cpp - CTestInfo.cpp - CTestList.cpp - CVirtualTestList.cpp - CWebService.cpp - CWineTest.cpp - main.cpp - shutdown.cpp - tools.cpp - precomp.h - diff --git a/rostests/rosautotest/shutdown.cpp b/rostests/rosautotest/shutdown.cpp deleted file mode 100644 index dc243fa7afe..00000000000 --- a/rostests/rosautotest/shutdown.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Helper function for shutting down the system - * COPYRIGHT: Copyright 2008-2009 Colin Finck - */ - -#include "precomp.h" - -/** - * Shuts down the system. - * - * @return - * true if everything went well, false if there was a problem while trying to shut down the system. - */ -bool ShutdownSystem() -{ - HANDLE hToken; - TOKEN_PRIVILEGES Privileges; - - if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken)) - { - StringOut("OpenProcessToken failed\n"); - return false; - } - - /* Get the LUID for the Shutdown privilege */ - if (!LookupPrivilegeValueW(NULL, SE_SHUTDOWN_NAME, &Privileges.Privileges[0].Luid)) - { - StringOut("LookupPrivilegeValue failed\n"); - return false; - } - - /* Assign the Shutdown privilege to our process */ - Privileges.PrivilegeCount = 1; - Privileges.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; - - if (!AdjustTokenPrivileges(hToken, FALSE, &Privileges, 0, NULL, NULL)) - { - StringOut("AdjustTokenPrivileges failed\n"); - return false; - } - - /* Finally shut down the system */ - if(!ExitWindowsEx(EWX_POWEROFF, SHTDN_REASON_MAJOR_OTHER | SHTDN_REASON_MINOR_OTHER | SHTDN_REASON_FLAG_PLANNED)) - { - StringOut("ExitWindowsEx failed\n"); - return false; - } - - return true; -} diff --git a/rostests/rosautotest/tools.cpp b/rostests/rosautotest/tools.cpp deleted file mode 100644 index 6b1165c5bd5..00000000000 --- a/rostests/rosautotest/tools.cpp +++ /dev/null @@ -1,257 +0,0 @@ -/* - * PROJECT: ReactOS Automatic Testing Utility - * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation - * PURPOSE: Various helper functions - * COPYRIGHT: Copyright 2008-2009 Colin Finck - */ - -#include "precomp.h" - -#define DBGPRINT_BUFSIZE 511 -static const char HexCharacters[] = "0123456789ABCDEF"; - -/** - * Escapes a string according to RFC 1738. - * Required for passing parameters to the web service. - * - * @param Input - * Constant pointer to a char array, which contains the input buffer to escape. - * - * @return - * The escaped string as std::string. - */ -string -EscapeString(const char* Input) -{ - string ReturnedString; - - do - { - if(strchr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.~", *Input)) - { - /* It's a character we don't need to escape, just add it to the output string */ - ReturnedString += *Input; - } - else - { - /* We need to escape this character */ - ReturnedString += '%'; - ReturnedString += HexCharacters[((UCHAR)*Input >> 4) % 16]; - ReturnedString += HexCharacters[(UCHAR)*Input % 16]; - } - } - while(*++Input); - - return ReturnedString; -} - -/** - * Escapes a string according to RFC 1738. - * Required for passing parameters to the web service. - * - * @param Input - * Pointer to a std::string, which contains the input buffer to escape. - * - * @return - * The escaped string as std::string. - */ -string -EscapeString(const string& Input) -{ - return EscapeString(Input.c_str()); -} - -/** - * Determines whether a string contains entirely numeric values. - * - * @param Input - * Constant pointer to a char array containing the input to check. - * - * @return - * true if the string is entirely numeric, false otherwise. - */ -bool -IsNumber(const char* Input) -{ - do - { - if(!isdigit(*Input)) - return false; - - ++Input; - } - while(*Input); - - return true; -} - -/** - * Outputs a string through the standard output and the debug output. - * The string may have LF or CRLF line endings. - * - * @param String - * The std::string to output - */ -void -StringOut(const string& String) -{ - char DbgString[DBGPRINT_BUFSIZE + 1]; - size_t i; - string NewString; - - /* Unify the line endings (the piped output of the tests may use CRLF) */ - for(i = 0; i < String.size(); i++) - { - /* If this is a CRLF line-ending, only copy a \n to the new string and skip the next character */ - if(String[i] == '\r' && String[i + 1] == '\n') - { - NewString += '\n'; - ++i; - } - else - { - /* Otherwise copy the string */ - NewString += String[i]; - } - } - - /* Output the string. - For DbgPrint, this must be done in chunks of 512 bytes. */ - cout << NewString; - - for(i = 0; i < NewString.size(); i += DBGPRINT_BUFSIZE) - { - size_t BytesToCopy; - - if(NewString.size() - i > DBGPRINT_BUFSIZE) - BytesToCopy = DBGPRINT_BUFSIZE; - else - BytesToCopy = NewString.size() - i; - - memcpy(DbgString, NewString.c_str() + i, BytesToCopy); - DbgString[BytesToCopy] = 0; - - DbgPrint(DbgString); - } -} - -/** - * Gets a value from a specified INI file and returns it converted to ASCII. - * - * @param AppName - * Constant pointer to a WCHAR array with the INI section to look in (lpAppName parameter passed to GetPrivateProfileStringW) - * - * @param KeyName - * Constant pointer to a WCHAR array containing the key to look for in the specified section (lpKeyName parameter passed to GetPrivateProfileStringW) - * - * @param FileName - * Constant pointer to a WCHAR array containing the path to the INI file - * - * @return - * Returns the data of the value as std::string or an empty string if no data could be retrieved. - */ -string -GetINIValue(PCWCH AppName, PCWCH KeyName, PCWCH FileName) -{ - DWORD Length; - PCHAR AsciiBuffer; - string ReturnedString; - WCHAR Buffer[2048]; - - /* Load the value into a temporary Unicode buffer */ - Length = GetPrivateProfileStringW(AppName, KeyName, NULL, Buffer, sizeof(Buffer) / sizeof(WCHAR), FileName); - - if(Length) - { - /* Convert the string to ASCII charset */ - AsciiBuffer = new char[Length + 1]; - WideCharToMultiByte(CP_ACP, 0, Buffer, Length + 1, AsciiBuffer, Length + 1, NULL, NULL); - - ReturnedString = AsciiBuffer; - delete AsciiBuffer; - } - - return ReturnedString; -} - -/** - * Converts an ASCII string to a Unicode one. - * - * @param AsciiString - * Constant pointer to a char array containing the ASCII string - * - * @return - * The Unicode string as std::wstring - */ -wstring -AsciiToUnicode(const char* AsciiString) -{ - DWORD Length; - PWSTR UnicodeString; - wstring ReturnString; - - Length = MultiByteToWideChar(CP_ACP, 0, AsciiString, -1, NULL, 0); - - UnicodeString = new WCHAR[Length]; - MultiByteToWideChar(CP_ACP, 0, AsciiString, -1, UnicodeString, Length); - ReturnString = UnicodeString; - delete UnicodeString; - - return ReturnString; -} - -/** - * Converts an ASCII string to a Unicode one. - * - * @param AsciiString - * Pointer to a std::string containing the ASCII string - * - * @return - * The Unicode string as std::wstring - */ -wstring -AsciiToUnicode(const string& AsciiString) -{ - return AsciiToUnicode(AsciiString.c_str()); -} - -/** - * Converts a Unicode string to an ASCII one. - * - * @param UnicodeString - * Constant pointer to a WCHAR array containing the Unicode string - * - * @return - * The ASCII string as std::string - */ -string -UnicodeToAscii(PCWSTR UnicodeString) -{ - DWORD Length; - PCHAR AsciiString; - string ReturnString; - - Length = WideCharToMultiByte(CP_ACP, 0, UnicodeString, -1, NULL, 0, NULL, NULL); - - AsciiString = new char[Length]; - WideCharToMultiByte(CP_ACP, 0, UnicodeString, -1, AsciiString, Length, NULL, NULL); - ReturnString = AsciiString; - delete AsciiString; - - return ReturnString; -} - -/** - * Converts a Unicode string to an ASCII one. - * - * @param UnicodeString - * Pointer to a std::wstring containing the Unicode string - * - * @return - * The ASCII string as std::string - */ -string -UnicodeToAscii(const wstring& UnicodeString) -{ - return UnicodeToAscii(UnicodeString.c_str()); -} diff --git a/rostests/tests/CMakeLists.txt b/rostests/tests/CMakeLists.txt deleted file mode 100644 index 93b5020f9a3..00000000000 --- a/rostests/tests/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -add_subdirectory(mmixer_test) -if (NOT MSVC) - add_subdirectory(pseh2) -endif() diff --git a/rostests/tests/D3DParseUnknownCommand_show/D3DParseUnknownCommand_show.rbuild b/rostests/tests/D3DParseUnknownCommand_show/D3DParseUnknownCommand_show.rbuild deleted file mode 100644 index a291d22c87d..00000000000 --- a/rostests/tests/D3DParseUnknownCommand_show/D3DParseUnknownCommand_show.rbuild +++ /dev/null @@ -1,6 +0,0 @@ - - gdi32 - ddraw - user32 - main.c - diff --git a/rostests/tests/D3DParseUnknownCommand_show/main.c b/rostests/tests/D3DParseUnknownCommand_show/main.c deleted file mode 100644 index 84a8142341d..00000000000 --- a/rostests/tests/D3DParseUnknownCommand_show/main.c +++ /dev/null @@ -1,49 +0,0 @@ - -#include -#include - -#include -#include - -/* Black Box program for D3DParseUnknownCommand in ddraw.dll - * - * This program scaning all return valu that D3DParseUnknownCommand have in ddraw.dll - * This command is not 100% document in MSDN so I using ddk kit doc and WinCE document - * and ms ddk / ms sdk to figout the basic. and MSDN was unclare what this command support for - * D3DHAL_DP2COMMAND dp2command->bCommand so I wrote this small scanner - * - * it will show D3DParseUnknownCommand dp2command->bCommand support follow command - * command hex dec - * D3DDP2OP_VIEWPORTINFO (aka 0x1c) 28 - * D3DDP2OP_WINFO (aka 0x1d) 29 - * Unknown (aka 0x0d) 13 - * - * no doc in msdn about command 13 (dec) I will exaime it later - * - */ - -INT main(INT argc, TCHAR *argv[]); -VOID BuildReturnCode(DWORD * ReturnCode); - -INT main(INT argc, TCHAR *argv[]) -{ - DWORD ReturnCode[256]; - - BuildReturnCode(ReturnCode); - - return 0; -} - -VOID BuildReturnCode(DWORD * ReturnCode) -{ - INT t; - D3DHAL_DP2COMMAND dp2command; - DWORD lplpvReturnedCommand[2]; - - for (t=0;t<256;t++) - { - dp2command.bCommand = t; - ReturnCode[t] = D3DParseUnknownCommand ( (LPVOID) &dp2command, (LPVOID *) lplpvReturnedCommand) ; - printf("D3DParseUnknownCommand return code = %x command %d \n", (UINT)ReturnCode[t], t); - } -} diff --git a/rostests/tests/DxHalTest/DxHalTest.rbuild b/rostests/tests/DxHalTest/DxHalTest.rbuild deleted file mode 100644 index 52587302a6c..00000000000 --- a/rostests/tests/DxHalTest/DxHalTest.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - main.c - diff --git a/rostests/tests/DxHalTest/main.c b/rostests/tests/DxHalTest/main.c deleted file mode 100644 index ffc82451534..00000000000 --- a/rostests/tests/DxHalTest/main.c +++ /dev/null @@ -1,668 +0,0 @@ -#include -#include "main.h" - - -// TODO: -// -// - free memory -// - Check if we ran out of memory (HeapAlloc == NULL) - HDC hdc; - DDRAWI_DIRECTDRAW_GBL mDDrawGlobal; - DDRAWI_DIRECTDRAW_LCL mDDrawLocal; - DDHALINFO mHALInfo; - - DDHAL_CALLBACKS mCallbacks; - DDHAL_DDEXEBUFCALLBACKS mD3dBufferCallbacks; - D3DHAL_CALLBACKS mD3dCallbacks; - D3DHAL_GLOBALDRIVERDATA mD3dDriverData; - - UINT mcModeInfos; - DDHALMODEINFO *mpModeInfos; - - UINT mcvmList; - VIDMEM *mpvmList; - - UINT mcFourCC; - DWORD *mpFourCC; - - UINT mcTextures; - DDSURFACEDESC *mpTextures; - - /* Surface */ - DDRAWI_DDRAWSURFACE_GBL mPrimaryGlobal; - DDRAWI_DDRAWSURFACE_MORE mPrimaryMore; - DDRAWI_DDRAWSURFACE_LCL mPrimaryLocal; - DDRAWI_DDRAWSURFACE_LCL *mpPrimaryLocals[1]; - DDRAWI_DDRAWCLIPPER_LCL mPrimaryClipperLocal; - DDRAWI_DDRAWCLIPPER_GBL mPrimaryClipperGlobal; - //DDRAWI_DDRAWCLIPPER_INT mPrimaryClipperInterface; - DDSURFACEDESC mddsdPrimary; - DDSURFACEDESC mddsdOverlay; - - DDRAWI_DDRAWSURFACE_GBL mOverlayGlobal; - DDRAWI_DDRAWSURFACE_LCL mOverlayLocal[6]; - DDRAWI_DDRAWSURFACE_LCL *mpOverlayLocals[6]; - DDRAWI_DDRAWSURFACE_MORE mOverlayMore[6]; - - DDHAL_BLTDATA mDdBlt; - - -typedef struct _DD_GETDRIVERINFODATA { - VOID *dhpdev; - DWORD dwSize; - DWORD dwFlags; - GUID guidInfo; - DWORD dwExpectedSize; - PVOID lpvData; - DWORD dwActualSize; - HRESULT ddRVal; - ULONG_PTR dwContext; -} DD_GETDRIVERINFODATA, *PDD_GETDRIVERINFODATA; - - -typedef struct _DD_MISCELLANEOUSCALLBACKS { - DWORD dwSize; - DWORD dwFlags; - PVOID GetAvailDriverMemory; -} DD_MISCELLANEOUSCALLBACKS; - - -int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst, - LPSTR lpCmdLine, int nCmdShow) -{ - /* HAL Startup process */ - DEVMODE devmode; - HBITMAP hbmp; - const UINT bmiSize = sizeof(BITMAPINFOHEADER) + 0x10; - UCHAR *pbmiData; - BITMAPINFO *pbmi; - - DWORD *pMasks; - //BOOL newmode = FALSE; - //DWORD Status; /* for create surface */ - UINT i; - UINT j; - UINT cSurfaces; - - DDHAL_CANCREATESURFACEDATA mDdCanCreateSurface; - DDHAL_UPDATEOVERLAYDATA mDdUpdateOverlay; - DDRAWI_DDRAWSURFACE_LCL *pDDSurface; - DDHAL_CREATESURFACEDATA mDdCreateSurface; - - - /* get the functions we need */ -// DD_GETDRIVERINFODATA drv; - HMODULE lib = LoadLibrary("gdi32.dll"); - DdCreateDirectDrawObject = (BOOL (APIENTRY*)(LPDDRAWI_DIRECTDRAW_GBL, HDC))GetProcAddress(lib, "GdiEntry1"); - DdQueryDirectDrawObject = (BOOL (APIENTRY*)(LPDDRAWI_DIRECTDRAW_GBL, LPDDHALINFO,LPDDHAL_DDCALLBACKS,LPDDHAL_DDSURFACECALLBACKS,LPDDHAL_DDPALETTECALLBACKS,LPD3DHAL_CALLBACKS,LPD3DHAL_GLOBALDRIVERDATA,LPDDHAL_DDEXEBUFCALLBACKS,LPDDSURFACEDESC,LPDWORD,LPVIDMEM))GetProcAddress(lib, "GdiEntry2"); - DdAttachSurface = (BOOL (APIENTRY*)(LPDDRAWI_DDRAWSURFACE_LCL, LPDDRAWI_DDRAWSURFACE_LCL))GetProcAddress(lib, "GdiEntry11"); - DdResetVisrgn = (BOOL (APIENTRY*)(LPDDRAWI_DDRAWSURFACE_LCL, HWND))GetProcAddress(lib, "GdiEntry6"); - - printf("This apps showing how to start up directx draw/d3d interface and some other as well\n"); - printf("This code have been releae to some close applactons with my premtions, if any company\n"); - printf("want use part or whole code, you need contact the orginal author to ask for premtions\n"); - printf("This code are release under alot of diffent licen\n"); - printf("All GPL and LGPL project have right use and studing this code.\n"); - printf("This code maybe need more comment to known how stuff working and maybe looking bit mesy\n"); - printf("Bestreagds Magnus Olsen magnus@greatlord.com or greatlord@reactos.org\n"); - printf("Copyright 2006 by Magnus Olsen\n\n"); - printf("This demo showing how to start dx draw hal and create a primary surface,\n"); - printf("and a overlay sufrace and blt to the primary surface\n"); - - - /* - Get and Create mode info - */ - mcModeInfos = 1; - mpModeInfos = (DDHALMODEINFO*)HeapAlloc(GetProcessHeap(), - HEAP_ZERO_MEMORY, - mcModeInfos * sizeof(DDHALMODEINFO)); - - if (mpModeInfos == NULL) - { - printf("Fail to alloc mpModeInfos\n"); - return DD_FALSE; - } - - - EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &devmode); - - mpModeInfos[0].dwWidth = devmode.dmPelsWidth; - mpModeInfos[0].dwHeight = devmode.dmPelsHeight; - mpModeInfos[0].dwBPP = devmode.dmBitsPerPel; - mpModeInfos[0].lPitch = (devmode.dmPelsWidth*devmode.dmBitsPerPel)/8; - mpModeInfos[0].wRefreshRate = (WORD)devmode.dmDisplayFrequency; - - /* - Setup HDC and mDDrawGlobal right - */ - hdc = CreateDCW(L"DISPLAY",L"DISPLAY",NULL,NULL); - - if (hdc == NULL) - { - printf("Fail to create HDC\n"); - return DD_FALSE; - } - - /* - Dectect RGB bit mask - */ - hbmp = CreateCompatibleBitmap(hdc, 1, 1); - if (hbmp==NULL) - { - HeapFree(GetProcessHeap(), 0, mpModeInfos); - DeleteDC(hdc); - printf("Fail to Create Compatible Bitmap\n"); - return DD_FALSE; - } - - pbmiData = (UCHAR *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, bmiSize); - pbmi = (BITMAPINFO*)pbmiData; - - if (pbmiData==NULL) - { - HeapFree(GetProcessHeap(), 0, mpModeInfos); - free(mpModeInfos); - DeleteDC(hdc); - DeleteObject(hbmp); - printf("Fail to Alloc pbmiData\n"); - return DDERR_UNSUPPORTED; - } - - pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - pbmi->bmiHeader.biBitCount = (WORD)devmode.dmBitsPerPel; - pbmi->bmiHeader.biCompression = BI_BITFIELDS; - pbmi->bmiHeader.biWidth = 1; - pbmi->bmiHeader.biHeight = 1; - - GetDIBits(hdc, hbmp, 0, 0, NULL, pbmi, 0); - DeleteObject(hbmp); - - pMasks = (DWORD*)(pbmiData + sizeof(BITMAPINFOHEADER)); - mpModeInfos[0].dwRBitMask = pMasks[0]; - mpModeInfos[0].dwGBitMask = pMasks[1]; - mpModeInfos[0].dwBBitMask = pMasks[2]; - mpModeInfos[0].dwAlphaBitMask = pMasks[3]; - - HeapFree(GetProcessHeap(), 0, pbmiData); - - /* - prepare start up the DX Draw HAL interface now - */ - - memset(&mDDrawGlobal, 0, sizeof(DDRAWI_DIRECTDRAW_GBL)); - memset(&mHALInfo, 0, sizeof(DDHALINFO)); - memset(&mCallbacks, 0, sizeof(DDHAL_CALLBACKS)); - - /* - Startup DX HAL step one of three - */ - if (!DdCreateDirectDrawObject(&mDDrawGlobal, hdc)) - { - HeapFree(GetProcessHeap(), 0, mpModeInfos); - DeleteDC(hdc); - DeleteObject(hbmp); - printf("Fail to Create Direct DrawObject\n"); - return DD_FALSE; - } - - mDDrawGlobal.dwRefCnt = 1; //addref / remove ref - - // Do not relase HDC it have been map in kernel mode - // DeleteDC(hdc); - - /* we need reanable it if screen res have changes, and some bad drv need be reanble very few - to contiune */ - /* - if (!DdReenableDirectDrawObject(&mDDrawGlobal, &newmode)) - { - HeapFree(GetProcessHeap(), 0, mpModeInfos); - DeleteDC(hdc); - DeleteObject(hbmp); - return DD_FALSE; - }*/ - - /* - Setup the DirectDraw Local - */ - - mDDrawLocal.lpDDCB = &mCallbacks; - mDDrawLocal.lpGbl = &mDDrawGlobal; - mDDrawLocal.dwProcessId = GetCurrentProcessId(); - - mDDrawGlobal.lpDDCBtmp = &mCallbacks; - mDDrawGlobal.lpExclusiveOwner = &mDDrawLocal; - //mDDrawLocal.dwLocalFlags = DDRAWILCL_DIRECTDRAW7; - - - /* - Startup DX HAL step two of three - */ - - if (!DdQueryDirectDrawObject(&mDDrawGlobal, - &mHALInfo, - &mCallbacks.HALDD, - &mCallbacks.HALDDSurface, - &mCallbacks.HALDDPalette, - &mD3dCallbacks, - &mD3dDriverData, - &mD3dBufferCallbacks, - NULL, - NULL, - NULL)) - { - HeapFree(GetProcessHeap(), 0, mpModeInfos); - DeleteDC(hdc); - DeleteObject(hbmp); - // FIXME Close DX fristcall and second call - return DD_FALSE; - } - - mcvmList = mHALInfo.vmiData.dwNumHeaps; - mpvmList = (VIDMEM*) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(VIDMEM) * mcvmList); - if (mpvmList == NULL) - { - HeapFree(GetProcessHeap(), 0, mpModeInfos); - DeleteDC(hdc); - DeleteObject(hbmp); - // FIXME Close DX fristcall and second call - printf("Fail to QueryDirect Draw Object frist pass\n"); - return DD_FALSE; - } - - mcFourCC = mHALInfo.ddCaps.dwNumFourCCCodes; - mpFourCC = (DWORD *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DWORD) * mcFourCC); - if (mpFourCC == NULL) - { - HeapFree(GetProcessHeap(), 0, mpvmList); - HeapFree(GetProcessHeap(), 0, mpModeInfos); - DeleteDC(hdc); - DeleteObject(hbmp); - // FIXME Close DX fristcall and second call - return DD_FALSE; - } - - mcTextures = mD3dDriverData.dwNumTextureFormats; - mpTextures = (DDSURFACEDESC*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DDSURFACEDESC) * mcTextures); - if (mpTextures == NULL) - { - HeapFree(GetProcessHeap(), 0, mpFourCC); - HeapFree(GetProcessHeap(), 0, mpvmList); - HeapFree(GetProcessHeap(), 0, mpModeInfos); - DeleteDC(hdc); - DeleteObject(hbmp); - // FIXME Close DX fristcall and second call - printf("Fail QueryDirect Draw Object to Alloc mpTextures \n"); - return DD_FALSE; - } - - mHALInfo.vmiData.pvmList = mpvmList; - mHALInfo.lpdwFourCC = mpFourCC; - mD3dDriverData.lpTextureFormats = mpTextures; - - if (!DdQueryDirectDrawObject( - &mDDrawGlobal, - &mHALInfo, - &mCallbacks.HALDD, - &mCallbacks.HALDDSurface, - &mCallbacks.HALDDPalette, - &mD3dCallbacks, - &mD3dDriverData, - &mCallbacks.HALDDExeBuf, - mpTextures, - mpFourCC, - mpvmList)) - - { - HeapFree(GetProcessHeap(), 0, mpTextures); - HeapFree(GetProcessHeap(), 0, mpFourCC); - HeapFree(GetProcessHeap(), 0, mpvmList); - HeapFree(GetProcessHeap(), 0, mpModeInfos); - DeleteDC(hdc); - DeleteObject(hbmp); - printf("Fail to QueryDirect Draw Object second pass\n"); - return DD_FALSE; - } - - /* - Copy over from HalInfo to DirectDrawGlobal - */ - - // this is wrong, cDriverName need be in ASC code not UNICODE - //memcpy(mDDrawGlobal.cDriverName, mDisplayAdapter, sizeof(wchar)*MAX_DRIVER_NAME); - - memcpy(&mDDrawGlobal.vmiData, &mHALInfo.vmiData,sizeof(VIDMEMINFO)); - memcpy(&mDDrawGlobal.ddCaps, &mHALInfo.ddCaps,sizeof(DDCORECAPS)); - - mHALInfo.dwNumModes = mcModeInfos; - mHALInfo.lpModeInfo = mpModeInfos; - mHALInfo.dwMonitorFrequency = mpModeInfos[0].wRefreshRate; - - mDDrawGlobal.dwMonitorFrequency = mHALInfo.dwMonitorFrequency; - mDDrawGlobal.dwModeIndex = mHALInfo.dwModeIndex; - mDDrawGlobal.dwNumModes = mHALInfo.dwNumModes; - mDDrawGlobal.lpModeInfo = mHALInfo.lpModeInfo; - mDDrawGlobal.hInstance = mHALInfo.hInstance; - - mDDrawGlobal.lp16DD = &mDDrawGlobal; - - - - /* Hal insate is down now */ - - /* cleare surface code now*/ - - // memset(&mGlobal, 0, sizeof(DDRAWI_DDRAWSURFACE_GBL)); - // memset(&mMore, 0, sizeof(DDRAWI_DDRAWSURFACE_MORE)); - - /* mLocal.lpSurfMore = &mMore; - memset(mMore, 0, sizeof(DDRAWI_DDRAWSURFACE_MORE)); - mMore.dwSize = sizeof(DDRAWI_DDRAWSURFACE_MORE);*/ - - mPrimaryLocal.lpSurfMore = &mPrimaryMore; - - /* cleare surface ends now */ - - /* create primare surface now */ - - memset(&mddsdPrimary, 0, sizeof(DDSURFACEDESC)); - mddsdPrimary.dwSize = sizeof(DDSURFACEDESC); - mddsdPrimary.dwFlags = DDSD_CAPS; - mddsdPrimary.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VISIBLE; - - mDdCanCreateSurface.lpDD = &mDDrawGlobal; - mDdCanCreateSurface.CanCreateSurface = mCallbacks.HALDD.CanCreateSurface; - mDdCanCreateSurface.bIsDifferentPixelFormat = FALSE; //isDifferentPixelFormat; - mDdCanCreateSurface.lpDDSurfaceDesc = &mddsdPrimary; // pDDSD; - - if (mHALInfo.lpDDCallbacks->CanCreateSurface(&mDdCanCreateSurface)== DDHAL_DRIVER_NOTHANDLED) - { - printf("Fail to mDdCanCreateSurface DDHAL_DRIVER_NOTHANDLED\n"); - return DDERR_NOTINITIALIZED; - } - - if (mDdCanCreateSurface.ddRVal != DD_OK) - { - printf("Fail to mDdCanCreateSurface mDdCanCreateSurface.ddRVal = %d:%s\n",(int)mDdCanCreateSurface.ddRVal,DDErrorString(mDdCanCreateSurface.ddRVal)); - return DDERR_NOTINITIALIZED; - } - - memset(&mPrimaryGlobal, 0, sizeof(DDRAWI_DDRAWSURFACE_GBL)); - mPrimaryGlobal.dwGlobalFlags = DDRAWISURFGBL_ISGDISURFACE; - mPrimaryGlobal.lpDD = &mDDrawGlobal; - mPrimaryGlobal.lpDDHandle = &mDDrawGlobal; - mPrimaryGlobal.wWidth = (WORD)mpModeInfos[0].dwWidth; - mPrimaryGlobal.wHeight = (WORD)mpModeInfos[0].dwHeight; - mPrimaryGlobal.lPitch = mpModeInfos[0].lPitch; - - memset(&mPrimaryMore, 0, sizeof(DDRAWI_DDRAWSURFACE_MORE)); - mPrimaryMore.dwSize = sizeof(DDRAWI_DDRAWSURFACE_MORE); - - - //mPrimaryMore. = mpr - - memset(&mPrimaryLocal, 0, sizeof(DDRAWI_DDRAWSURFACE_LCL)); - mPrimaryLocal.lpGbl = &mPrimaryGlobal; - mPrimaryLocal.lpSurfMore = &mPrimaryMore; - mPrimaryLocal.dwProcessId = GetCurrentProcessId(); - mPrimaryLocal.dwFlags = DDRAWISURF_PARTOFPRIMARYCHAIN|DDRAWISURF_HASOVERLAYDATA; - mPrimaryLocal.ddsCaps.dwCaps = mddsdPrimary.ddsCaps.dwCaps; - - mpPrimaryLocals[0] = &mPrimaryLocal; - - mDdCreateSurface.lpDD = &mDDrawGlobal; - mDdCreateSurface.CreateSurface = mCallbacks.HALDD.CreateSurface; - mDdCreateSurface.lpDDSurfaceDesc = &mddsdPrimary;//pDDSD; - mDdCreateSurface.lplpSList = mpPrimaryLocals; //cSurfaces; - mDdCreateSurface.dwSCnt = 1 ; //ppSurfaces; - - if (mHALInfo.lpDDCallbacks->CreateSurface(&mDdCreateSurface) == DDHAL_DRIVER_NOTHANDLED) - { - printf("Fail to mDdCreateSurface DDHAL_DRIVER_NOTHANDLED \n"); - return DDERR_NOTINITIALIZED; - } - - - if (mDdCreateSurface.ddRVal != DD_OK) - { - printf("Fail to mDdCanCreateSurface mDdCreateSurface.ddRVal = %d:%s\n",(int)mDdCreateSurface.ddRVal,DDErrorString(mDdCreateSurface.ddRVal)); - return mDdCreateSurface.ddRVal; - } - - // -- Setup Clipper --------------------------------------------------------- - memset(&mPrimaryClipperGlobal, 0, sizeof(DDRAWI_DDRAWCLIPPER_GBL)); - mPrimaryClipperGlobal.dwFlags = DDRAWICLIP_ISINITIALIZED; - mPrimaryClipperGlobal.dwProcessId = GetCurrentProcessId(); - //mPrimaryClipperGlobal.hWnd = (ULONG_PTR)hwnd; - mPrimaryClipperGlobal.hWnd = (ULONG_PTR)GetDesktopWindow(); - mPrimaryClipperGlobal.lpDD = &mDDrawGlobal; - mPrimaryClipperGlobal.lpStaticClipList = NULL; - - memset(&mPrimaryClipperLocal, 0, sizeof(DDRAWI_DDRAWCLIPPER_LCL)); - mPrimaryClipperLocal.lpGbl = &mPrimaryClipperGlobal; - - //memset(&mPrimaryClipperInterface, 0, sizeof(DDRAWI_DDRAWCLIPPER_INT)); - //mPrimaryClipperInterface.lpLcl = &mPrimaryClipperLocal; - //mPrimaryClipperInterface.dwIntRefCnt = 1; - //mPrimaryClipperInterface.lpLink = null; - //mPrimaryClipperInterface.lpVtbl = null; - - mPrimaryLocal.lpDDClipper = &mPrimaryClipperLocal; - //mPrimaryMore.lpDDIClipper = &mPrimaryClipperInterface; - - mDdBlt.lpDDDestSurface = mpPrimaryLocals[0]; - - - /* create primare surface is down now */ - - /* create overlay surface now */ - - memset(&mddsdOverlay, 0, sizeof(DDSURFACEDESC)); - mddsdOverlay.dwSize = sizeof(DDSURFACEDESC); - mddsdOverlay.dwFlags = DDSD_CAPS | DDSD_PIXELFORMAT | DDSD_BACKBUFFERCOUNT | DDSD_WIDTH | DDSD_HEIGHT; - - mddsdOverlay.ddsCaps.dwCaps = DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM | DDSCAPS_COMPLEX | DDSCAPS_FLIP; - - mddsdOverlay.dwWidth = 100; //pels; - mddsdOverlay.dwHeight = 100; // lines; - mddsdOverlay.dwBackBufferCount = 1; //cBuffers; - - mddsdOverlay.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT); - mddsdOverlay.ddpfPixelFormat.dwFlags = DDPF_RGB; - mddsdOverlay.ddpfPixelFormat.dwRGBBitCount = 32; - - - //DDHAL_CANCREATESURFACEDATA mDdCanCreateSurface; - mDdCanCreateSurface.lpDD = &mDDrawGlobal; - mDdCanCreateSurface.CanCreateSurface = mCallbacks.HALDD.CanCreateSurface; - mDdCanCreateSurface.bIsDifferentPixelFormat = TRUE; //isDifferentPixelFormat; - mDdCanCreateSurface.lpDDSurfaceDesc = &mddsdOverlay; // pDDSD; - - - if (mHALInfo.lpDDCallbacks->CanCreateSurface(&mDdCanCreateSurface)== DDHAL_DRIVER_NOTHANDLED) - { - // derr(L"DirectDrawImpl[%08x]::__createPrimary Cannot create primary [%08x]", this, rv); - - printf("Fail to mDdCanCreateSurface DDHAL_DRIVER_NOTHANDLED \n"); - return DDERR_NOTINITIALIZED; - } - - if (mDdCanCreateSurface.ddRVal != DD_OK) - { - printf("Fail to mDdCanCreateSurface mDdCanCreateSurface.ddRVal = %d:%s\n",(int)mDdCanCreateSurface.ddRVal,DDErrorString(mDdCanCreateSurface.ddRVal)); - return DDERR_NOTINITIALIZED; - } - - - memset(&mOverlayGlobal, 0, sizeof(DDRAWI_DDRAWSURFACE_GBL)); - mOverlayGlobal.dwGlobalFlags = 0; - mOverlayGlobal.lpDD = &mDDrawGlobal; - mOverlayGlobal.lpDDHandle = &mDDrawGlobal; - mOverlayGlobal.wWidth = (WORD)mddsdOverlay.dwWidth; - mOverlayGlobal.wHeight = (WORD)mddsdOverlay.dwHeight; - mOverlayGlobal.lPitch = -1; - mOverlayGlobal.ddpfSurface = mddsdOverlay.ddpfPixelFormat; - - // setup front- and backbuffer surfaces - cSurfaces = mddsdOverlay.dwBackBufferCount + 1; - for ( i = 0; i < cSurfaces; i++) - { - memset(&mOverlayMore[i], 0, sizeof(DDRAWI_DDRAWSURFACE_MORE)); - mOverlayMore[i].dwSize = sizeof(DDRAWI_DDRAWSURFACE_MORE); - - memset(&mOverlayLocal[i], 0, sizeof(DDRAWI_DDRAWSURFACE_LCL)); - mOverlayLocal[i].lpGbl = &mOverlayGlobal; - mOverlayLocal[i].lpSurfMore = &mOverlayMore[i]; - mOverlayLocal[i].dwProcessId = GetCurrentProcessId(); - mOverlayLocal[i].dwFlags = (i == 0) ? - (DDRAWISURF_IMPLICITROOT|DDRAWISURF_FRONTBUFFER): - (DDRAWISURF_IMPLICITCREATE|DDRAWISURF_BACKBUFFER); - - mOverlayLocal[i].dwFlags |= - DDRAWISURF_ATTACHED|DDRAWISURF_ATTACHED_FROM| - DDRAWISURF_HASPIXELFORMAT| - DDRAWISURF_HASOVERLAYDATA; - - mOverlayLocal[i].ddsCaps.dwCaps = mddsdOverlay.ddsCaps.dwCaps; - mpOverlayLocals[i] = &mOverlayLocal[i]; - } - - for ( i = 0; i < cSurfaces; i++) - { - j = (i + 1) % cSurfaces; - - - /*if (!mHALInfo.lpDDSurfaceCallbacks->AddAttachedSurface(mpOverlayLocals[i], mpOverlayLocals[j])) - { - // derr(L"DirectDrawImpl[%08x]::__setupDevice DdAttachSurface(%d, %d) failed", this, i, j); - return DD_FALSE; - }*/ - - if (!DdAttachSurface(mpOverlayLocals[i], mpOverlayLocals[j])) - { - // derr(L"DirectDrawImpl[%08x]::__setupDevice DdAttachSurface(%d, %d) failed", this, i, j); - printf("Fail to DdAttachSurface (%d:%d)\n", i, j); - return DD_FALSE; - } - - } - - - // DDHAL_CREATESURFACEDATA mDdCreateSurface; - mDdCreateSurface.lpDD = &mDDrawGlobal; - mDdCreateSurface.CreateSurface = mCallbacks.HALDD.CreateSurface; - mDdCreateSurface.lpDDSurfaceDesc = &mddsdOverlay;//pDDSD; - mDdCreateSurface.lplpSList = mpOverlayLocals; //cSurfaces; - mDdCreateSurface.dwSCnt = 1 ; //ppSurfaces; - - if (mHALInfo.lpDDCallbacks->CreateSurface(&mDdCreateSurface) == DDHAL_DRIVER_NOTHANDLED) - { - printf("Fail to mDdCreateSurface = DDHAL_DRIVER_HANDLED\n"); - return DDERR_NOTINITIALIZED; - } - - - if (mDdCreateSurface.ddRVal != DD_OK) - { - printf("Fail to mDdCreateSurface mDdCreateSurface.ddRVal = %d:%s\n",(int)mDdCreateSurface.ddRVal,DDErrorString(mDdCreateSurface.ddRVal)); - return mDdCreateSurface.ddRVal; - } - - - mDdUpdateOverlay.lpDD = &mDDrawGlobal; - mDdUpdateOverlay.UpdateOverlay = mCallbacks.HALDDSurface.UpdateOverlay; - mDdUpdateOverlay.lpDDDestSurface = mpPrimaryLocals[0]; - mDdUpdateOverlay.lpDDSrcSurface = mpOverlayLocals[0];//pDDSurface; - mDdUpdateOverlay.dwFlags = DDOVER_SHOW; - - /* if (flags & DDOVER_DDFX) - mDdUpdateOverlay.overlayFX = *pFx; - copyRect(&mDdUpdateOverlay.rDest, pdst); - copyRect(&mDdUpdateOverlay.rSrc, psrc); -*/ - - mDdUpdateOverlay.rDest.top = 0; - mDdUpdateOverlay.rDest.left = 0; - mDdUpdateOverlay.rDest.right = 50; - mDdUpdateOverlay.rDest.bottom = 50; - - mDdUpdateOverlay.rSrc.top = 0; - mDdUpdateOverlay.rSrc.left = 0; - mDdUpdateOverlay.rSrc.right = 50; - mDdUpdateOverlay.rSrc.bottom = 50; - - - - - if ( mDdUpdateOverlay.UpdateOverlay(&mDdUpdateOverlay) == DDHAL_DRIVER_NOTHANDLED) - { - printf("Fail to mDdBlt = DDHAL_DRIVER_HANDLED\n"); - return DDERR_NOTINITIALIZED; - } - - - if (mDdUpdateOverlay.ddRVal != DD_OK) - { - printf("Fail to mDdUpdateOverlay mDdUpdateOverlay.ddRVal = %d:%s\n",(int)mDdUpdateOverlay.ddRVal,DDErrorString(mDdUpdateOverlay.ddRVal)); - return mDdUpdateOverlay.ddRVal; - } - - /* blt */ - - - pDDSurface = mpPrimaryLocals[0]; - - if (!DdResetVisrgn(pDDSurface, NULL)) - { - // derr(L"DirectDrawImpl[%08x]::_clear DdResetVisrgn failed", this); - } - - - memset(&mDdBlt, 0, sizeof(DDHAL_BLTDATA)); - memset(&mDdBlt.bltFX, 0, sizeof(DDBLTFX)); - mDdBlt.bltFX.dwSize = sizeof(DDBLTFX); - - mDdBlt.lpDD = &mDDrawGlobal; - mDdBlt.Blt = mCallbacks.HALDDSurface.Blt; - mDdBlt.lpDDDestSurface = mpPrimaryLocals[0]; - - mpPrimaryLocals[0]->hDC = (ULONG_PTR)GetDC(GetDesktopWindow()); - mDdBlt.rDest.top = 50; - mDdBlt.rDest.bottom = 100; - mDdBlt.rDest.left = 0; - mDdBlt.rDest.right = 100; - mDdBlt.lpDDSrcSurface = NULL; - mDdBlt.IsClipped = FALSE; - mDdBlt.bltFX.dwFillColor = 0xFFFF00; - mDdBlt.dwFlags = DDBLT_COLORFILL | DDBLT_WAIT; - // mDdBlt.IsClipped = TRUE; - - if (mDdBlt.Blt(&mDdBlt) != DDHAL_DRIVER_HANDLED) - { - printf("Fail to mDdBlt = DDHAL_DRIVER_HANDLED\n"); - return DDHAL_DRIVER_HANDLED; - } - - - - if (mDdBlt.ddRVal!=DD_OK) - { - printf("Fail to mDdBlt mDdBlt.ddRVal = %d:%s\n",(int)mDdBlt.ddRVal,DDErrorString(mDdBlt.ddRVal)); - return mDdBlt.ddRVal; - } - - mDdUpdateOverlay.rDest.right = 100; - if ( mDdUpdateOverlay.UpdateOverlay(&mDdUpdateOverlay) == DDHAL_DRIVER_NOTHANDLED) - { - printf("Fail to mDdUpdateOverlay = DDERR_NOTINITIALIZED\n"); - return DDERR_NOTINITIALIZED; - } - - while(TRUE); - - return DD_OK; - - -} - - diff --git a/rostests/tests/DxHalTest/main.h b/rostests/tests/DxHalTest/main.h deleted file mode 100644 index eb20d5f4af8..00000000000 --- a/rostests/tests/DxHalTest/main.h +++ /dev/null @@ -1,267 +0,0 @@ -#include -#include -#include - - -int StartupHAL (VOID); -extern HDC hdc; -extern DDRAWI_DIRECTDRAW_GBL mDDrawGlobal; - extern DDRAWI_DIRECTDRAW_LCL mDDrawLocal; - extern DDHALINFO mHALInfo; - - extern DDHAL_CALLBACKS mCallbacks; - extern DDHAL_DDEXEBUFCALLBACKS mD3dBufferCallbacks; - extern D3DHAL_CALLBACKS mD3dCallbacks; - extern D3DHAL_GLOBALDRIVERDATA mD3dDriverData; - - extern UINT mcModeInfos; - extern DDHALMODEINFO *mpModeInfos; - - extern UINT mcvmList; - extern VIDMEM *mpvmList; - - extern UINT mcFourCC; - extern DWORD *mpFourCC; - - extern UINT mcTextures; - extern DDSURFACEDESC *mpTextures; - - - -BOOL (APIENTRY *DdCreateDirectDrawObject) ( - LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal, - HDC hdc -); - -BOOL (APIENTRY *DdQueryDirectDrawObject) ( - LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal, - LPDDHALINFO pHalInfo, - LPDDHAL_DDCALLBACKS pDDCallbacks, - LPDDHAL_DDSURFACECALLBACKS pDDSurfaceCallbacks, - LPDDHAL_DDPALETTECALLBACKS pDDPaletteCallbacks, - LPD3DHAL_CALLBACKS pD3dCallbacks, - LPD3DHAL_GLOBALDRIVERDATA pD3dDriverData, - LPDDHAL_DDEXEBUFCALLBACKS pD3dBufferCallbacks, - LPDDSURFACEDESC pD3dTextureFormats, - LPDWORD pdwFourCC, - LPVIDMEM pvmList -); - -BOOL -APIENTRY -DdDeleteDirectDrawObject( - LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal -); - -BOOL -APIENTRY -DdCreateSurfaceObject( - LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal, - BOOL bPrimarySurface -); - -BOOL -APIENTRY -DdDeleteSurfaceObject( - LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal -); - -//BOOL -//APIENTRY -//DdResetVisrgn( -// LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal, -// HWND hWnd -//); -BOOL (APIENTRY *DdResetVisrgn) ( - LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal, - HWND hWnd -); - -HDC -APIENTRY -DdGetDC( - LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal, - LPPALETTEENTRY pColorTable -); - -BOOL -APIENTRY -DdReleaseDC( - LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal -); - -HBITMAP -APIENTRY -DdCreateDIBSection( - HDC hdc, - CONST BITMAPINFO *pbmi, - UINT iUsage, - VOID **ppvBits, - HANDLE hSectionApp, - DWORD dwOffset -); - -BOOL -APIENTRY -DdReenableDirectDrawObject( - LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal, - BOOL *pbNewMode -); - -//BOOL -//APIENTRY -//DdAttachSurface( -// LPDDRAWI_DDRAWSURFACE_LCL pSurfaceFrom, -// LPDDRAWI_DDRAWSURFACE_LCL pSurfaceTo -//); - -BOOL (APIENTRY *DdAttachSurface) ( - LPDDRAWI_DDRAWSURFACE_LCL pSurfaceFrom, - LPDDRAWI_DDRAWSURFACE_LCL pSurfaceTo -); - -VOID -APIENTRY -DdUnattachSurface( - LPDDRAWI_DDRAWSURFACE_LCL pSurface, - LPDDRAWI_DDRAWSURFACE_LCL pSurfaceAttached -); - -ULONG -APIENTRY -DdQueryDisplaySettingsUniqueness(VOID); - -HANDLE -APIENTRY -DdGetDxHandle( - LPDDRAWI_DIRECTDRAW_LCL pDDraw, - LPDDRAWI_DDRAWSURFACE_LCL pSurface, - BOOL bRelease -); - -BOOL -APIENTRY -DdSetGammaRamp( - LPDDRAWI_DIRECTDRAW_LCL pDDraw, - HDC hdc, - LPVOID lpGammaRamp -); - -DWORD -APIENTRY -DdSwapTextureHandles( - LPDDRAWI_DIRECTDRAW_LCL pDDraw, - LPDDRAWI_DDRAWSURFACE_LCL pDDSLcl1, - LPDDRAWI_DDRAWSURFACE_LCL pDDSLcl2 -); - -char* DDErrorString (HRESULT hr) -{ - switch (hr) - { - case DD_OK: return "DD_OK"; - case DDERR_ALREADYINITIALIZED: return "DDERR_ALREADYINITIALIZED"; - case DDERR_CANNOTATTACHSURFACE: return "DDERR_CANNOTATTACHSURFACE"; - case DDERR_CANNOTDETACHSURFACE: return "DDERR_CANNOTDETACHSURFACE"; - case DDERR_CURRENTLYNOTAVAIL: return "DDERR_CURRENTLYNOTAVAIL"; - case DDERR_EXCEPTION: return "DDERR_EXCEPTION"; - case DDERR_GENERIC: return "DDERR_GENERIC"; - case DDERR_HEIGHTALIGN: return "DDERR_HEIGHTALIGN"; - case DDERR_INCOMPATIBLEPRIMARY: return "DDERR_INCOMPATIBLEPRIMARY"; - case DDERR_INVALIDCAPS: return "DDERR_INVALIDCAPS"; - case DDERR_INVALIDCLIPLIST: return "DDERR_INVALIDCLIPLIST"; - case DDERR_INVALIDMODE: return "DDERR_INVALIDMODE"; - case DDERR_INVALIDOBJECT: return "DDERR_INVALIDOBJECT"; - case DDERR_INVALIDPARAMS: return "DDERR_INVALIDPARAMS"; - case DDERR_INVALIDPIXELFORMAT: return "DDERR_INVALIDPIXELFORMAT"; - case DDERR_INVALIDRECT: return "DDERR_INVALIDRECT"; - case DDERR_LOCKEDSURFACES: return "DDERR_LOCKEDSURFACES"; - case DDERR_NO3D: return "DDERR_NO3D"; - case DDERR_NOALPHAHW: return "DDERR_NOALPHAHW"; - case DDERR_NOCLIPLIST: return "DDERR_NOCLIPLIST"; - case DDERR_NOCOLORCONVHW: return "DDERR_NOCOLORCONVHW"; - case DDERR_NOCOOPERATIVELEVELSET: return "DDERR_NOCOOPERATIVELEVELSET"; - case DDERR_NOCOLORKEY: return "DDERR_NOCOLORKEY"; - case DDERR_NOCOLORKEYHW: return "DDERR_NOCOLORKEYHW"; - case DDERR_NODIRECTDRAWSUPPORT: return "DDERR_NODIRECTDRAWSUPPORT"; - case DDERR_NOEXCLUSIVEMODE: return "DDERR_NOEXCLUSIVEMODE"; - case DDERR_NOFLIPHW: return "DDERR_NOFLIPHW"; - case DDERR_NOGDI: return "DDERR_NOGDI"; - case DDERR_NOMIRRORHW: return "DDERR_NOMIRRORHW"; - case DDERR_NOTFOUND: return "DDERR_NOTFOUND"; - case DDERR_NOOVERLAYHW: return "DDERR_NOOVERLAYHW"; - case DDERR_NORASTEROPHW: return "DDERR_NORASTEROPHW"; - case DDERR_NOROTATIONHW: return "DDERR_NOROTATIONHW"; - case DDERR_NOSTRETCHHW: return "DDERR_NOSTRETCHHW"; - case DDERR_NOT4BITCOLOR: return "DDERR_NOT4BITCOLOR"; - case DDERR_NOT4BITCOLORINDEX: return "DDERR_NOT4BITCOLORINDEX"; - case DDERR_NOT8BITCOLOR: return "DDERR_NOT8BITCOLOR"; - case DDERR_NOTEXTUREHW: return "DDERR_NOTEXTUREHW"; - case DDERR_NOVSYNCHW: return "DDERR_NOVSYNCHW"; - case DDERR_NOZBUFFERHW: return "DDERR_NOZBUFFERHW"; - case DDERR_NOZOVERLAYHW: return "DDERR_NOZOVERLAYHW"; - case DDERR_OUTOFCAPS: return "DDERR_OUTOFCAPS"; - case DDERR_OUTOFMEMORY: return "DDERR_OUTOFMEMORY"; - case DDERR_OUTOFVIDEOMEMORY: return "DDERR_OUTOFVIDEOMEMORY"; - case DDERR_OVERLAYCANTCLIP: return "DDERR_OVERLAYCANTCLIP"; - case DDERR_OVERLAYCOLORKEYONLYONEACTIVE: return "DDERR_OVERLAYCOLORKEYONLYONEACTIVE"; - case DDERR_PALETTEBUSY: return "DDERR_PALETTEBUSY"; - case DDERR_COLORKEYNOTSET: return "DDERR_COLORKEYNOTSET"; - case DDERR_SURFACEALREADYATTACHED: return "DDERR_SURFACEALREADYATTACHED"; - case DDERR_SURFACEALREADYDEPENDENT: return "DDERR_SURFACEALREADYDEPENDENT"; - case DDERR_SURFACEBUSY: return "DDERR_SURFACEBUSY"; - case DDERR_CANTLOCKSURFACE: return "DDERR_CANTLOCKSURFACE"; - case DDERR_SURFACEISOBSCURED: return "DDERR_SURFACEISOBSCURED"; - case DDERR_SURFACELOST: return "DDERR_SURFACELOST"; - case DDERR_SURFACENOTATTACHED: return "DDERR_SURFACENOTATTACHED"; - case DDERR_TOOBIGHEIGHT: return "DDERR_TOOBIGHEIGHT"; - case DDERR_TOOBIGSIZE: return "DDERR_TOOBIGSIZE"; - case DDERR_TOOBIGWIDTH: return "DDERR_TOOBIGWIDTH"; - case DDERR_UNSUPPORTED: return "DDERR_UNSUPPORTED"; - case DDERR_UNSUPPORTEDFORMAT: return "DDERR_UNSUPPORTEDFORMAT"; - case DDERR_UNSUPPORTEDMASK: return "DDERR_UNSUPPORTEDMASK"; - case DDERR_VERTICALBLANKINPROGRESS: return "DDERR_VERTICALBLANKINPROGRESS"; - case DDERR_WASSTILLDRAWING: return "DDERR_WASSTILLDRAWING"; - case DDERR_XALIGN: return "DDERR_XALIGN"; - case DDERR_INVALIDDIRECTDRAWGUID: return "DDERR_INVALIDDIRECTDRAWGUID"; - case DDERR_DIRECTDRAWALREADYCREATED: return "DDERR_DIRECTDRAWALREADYCREATED"; - case DDERR_NODIRECTDRAWHW: return "DDERR_NODIRECTDRAWHW"; - case DDERR_PRIMARYSURFACEALREADYEXISTS: return "DDERR_PRIMARYSURFACEALREADYEXISTS"; - case DDERR_NOEMULATION: return "DDERR_NOEMULATION"; - case DDERR_REGIONTOOSMALL: return "DDERR_REGIONTOOSMALL"; - case DDERR_CLIPPERISUSINGHWND: return "DDERR_CLIPPERISUSINGHWND"; - case DDERR_NOCLIPPERATTACHED: return "DDERR_NOCLIPPERATTACHED"; - case DDERR_NOHWND: return "DDERR_NOHWND"; - case DDERR_HWNDSUBCLASSED: return "DDERR_HWNDSUBCLASSED"; - case DDERR_HWNDALREADYSET: return "DDERR_HWNDALREADYSET"; - case DDERR_NOPALETTEATTACHED: return "DDERR_NOPALETTEATTACHED"; - case DDERR_NOPALETTEHW: return "DDERR_NOPALETTEHW"; - case DDERR_BLTFASTCANTCLIP: return "DDERR_BLTFASTCANTCLIP"; - case DDERR_NOBLTHW: return "DDERR_NOBLTHW"; - case DDERR_NODDROPSHW: return "DDERR_NODDROPSHW"; - case DDERR_OVERLAYNOTVISIBLE: return "DDERR_OVERLAYNOTVISIBLE"; - case DDERR_NOOVERLAYDEST: return "DDERR_NOOVERLAYDEST"; - case DDERR_INVALIDPOSITION: return "DDERR_INVALIDPOSITION"; - case DDERR_NOTAOVERLAYSURFACE: return "DDERR_NOTAOVERLAYSURFACE"; - case DDERR_EXCLUSIVEMODEALREADYSET: return "DDERR_EXCLUSIVEMODEALREADYSET"; - case DDERR_NOTFLIPPABLE: return "DDERR_NOTFLIPPABLE"; - case DDERR_CANTDUPLICATE: return "DDERR_CANTDUPLICATE"; - case DDERR_NOTLOCKED: return "DDERR_NOTLOCKED"; - case DDERR_CANTCREATEDC: return "DDERR_CANTCREATEDC"; - case DDERR_NODC: return "DDERR_NODC"; - case DDERR_WRONGMODE: return "DDERR_WRONGMODE"; - case DDERR_IMPLICITLYCREATED: return "DDERR_IMPLICITLYCREATED"; - case DDERR_NOTPALETTIZED: return "DDERR_NOTPALETTIZED"; - case DDERR_UNSUPPORTEDMODE: return "DDERR_UNSUPPORTEDMODE"; - case DDERR_NOMIPMAPHW: return "DDERR_NOMIPMAPHW"; - case DDERR_INVALIDSURFACETYPE: return "DDERR_INVALIDSURFACETYPE"; - case DDERR_DCALREADYCREATED: return "DDERR_DCALREADYCREATED"; - case DDERR_CANTPAGELOCK: return "DDERR_CANTPAGELOCK"; - case DDERR_CANTPAGEUNLOCK: return "DDERR_CANTPAGEUNLOCK"; - case DDERR_NOTPAGELOCKED: return "DDERR_NOTPAGELOCKED"; - case DDERR_NOTINITIALIZED: return "DDERR_NOTINITIALIZED"; - } - - return "Unknown Error "; -} - diff --git a/rostests/tests/Imagelistviewer/imagelistviewer.rbuild b/rostests/tests/Imagelistviewer/imagelistviewer.rbuild deleted file mode 100644 index 8593263b062..00000000000 --- a/rostests/tests/Imagelistviewer/imagelistviewer.rbuild +++ /dev/null @@ -1,8 +0,0 @@ - - . - user32 - setupapi - comctl32 - main.c - res.rc - diff --git a/rostests/tests/Imagelistviewer/main.c b/rostests/tests/Imagelistviewer/main.c deleted file mode 100644 index f2832906894..00000000000 --- a/rostests/tests/Imagelistviewer/main.c +++ /dev/null @@ -1,146 +0,0 @@ -#include -#include -#include -#include -#include "resource.h" - -typedef BOOL (WINAPI * SH_GIL_PROC)(HIMAGELIST *phLarge, HIMAGELIST *phSmall); -typedef BOOL (WINAPI * FII_PROC)(BOOL fFullInit); - -/*** Shell32 undoc'd functions ***/ - /* Shell_GetImageLists @71 */ - /* FileIconInit @660 */ - -BOOL -DisplayImageList(HWND hwnd, - UINT uID) -{ - HWND hLV; - SP_CLASSIMAGELIST_DATA ImageListData; - LV_ITEM lvItem; - TCHAR Buf[6]; - INT ImageListCount = -1; - INT i = 0; - - hLV = GetDlgItem(hwnd, IDC_LSTVIEW); - (void)ListView_DeleteAllItems(hLV); - - if (uID == IDC_SYSTEM) - { - HIMAGELIST hLarge, hSmall; - HMODULE hShell32; - SH_GIL_PROC Shell_GetImageLists; - FII_PROC FileIconInit; - - hShell32 = LoadLibrary(_T("shell32.dll")); - if(hShell32 == NULL) - return FALSE; - - Shell_GetImageLists = (SH_GIL_PROC)GetProcAddress(hShell32, (LPCSTR)71); - FileIconInit = (FII_PROC)GetProcAddress(hShell32, (LPCSTR)660); - - if(Shell_GetImageLists == NULL || FileIconInit == NULL) - { - FreeLibrary(hShell32); - return FALSE; - } - - FileIconInit(TRUE); - - Shell_GetImageLists(&hLarge, &hSmall); - - ImageListCount = ImageList_GetImageCount(hSmall); - - (void)ListView_SetImageList(hLV, - hSmall, - LVSIL_SMALL); - - FreeLibrary(hShell32); - } - else if (uID == IDC_DEVICE) - { - ImageListData.cbSize = sizeof(SP_CLASSIMAGELIST_DATA); - SetupDiGetClassImageList(&ImageListData); - - ImageListCount = ImageList_GetImageCount(ImageListData.ImageList); - - (void)ListView_SetImageList(hLV, - ImageListData.ImageList, - LVSIL_SMALL); - } - else - return FALSE; - - lvItem.mask = LVIF_TEXT | LVIF_IMAGE; - - while (i <= ImageListCount) - { - lvItem.iItem = i; - lvItem.iSubItem = 0; - lvItem.pszText = _itot(i, Buf, 10); - lvItem.iImage = i; - - (void)ListView_InsertItem(hLV, &lvItem); - - i++; - } - - return TRUE; -} - - -BOOL CALLBACK -DlgProc(HWND hwnd, - UINT message, - WPARAM wParam, - LPARAM lParam) -{ - switch (message) - { - case WM_INITDIALOG: - DisplayImageList(hwnd, IDC_SYSTEM); - return TRUE; - - case WM_CLOSE: - EndDialog(hwnd, 0); - return TRUE; - - case WM_COMMAND: - { - switch(LOWORD(wParam)) - { - case IDOK: - EndDialog(hwnd, 0); - return TRUE; - - case IDC_SYSTEM: - DisplayImageList(hwnd, IDC_SYSTEM); - return TRUE; - - case IDC_DEVICE: - DisplayImageList(hwnd, IDC_DEVICE); - return TRUE; - } - } - } - - return FALSE; -} - -int WINAPI -WinMain(HINSTANCE hThisInstance, - HINSTANCE hPrevInstance, - LPSTR lpszArgument, - int nCmdShow) -{ - INITCOMMONCONTROLSEX icex; - - icex.dwSize = sizeof(INITCOMMONCONTROLSEX); - icex.dwICC = ICC_BAR_CLASSES | ICC_COOL_CLASSES; - InitCommonControlsEx(&icex); - - return DialogBox(hThisInstance, - MAKEINTRESOURCE(IDD_IMGLST), - NULL, - (DLGPROC)DlgProc); -} diff --git a/rostests/tests/Imagelistviewer/res.rc b/rostests/tests/Imagelistviewer/res.rc deleted file mode 100644 index 5a56f984e6e..00000000000 --- a/rostests/tests/Imagelistviewer/res.rc +++ /dev/null @@ -1,14 +0,0 @@ -#include -#include -#include "resource.h" - -IDD_IMGLST DIALOGEX 6,6,303,216 -CAPTION "Imagelist Viewer" -FONT 8, "MS Sans Serif", 0, 0 -STYLE WS_BORDER | WS_VISIBLE | WS_SYSMENU -BEGIN - CONTROL "", IDC_LSTVIEW, "SysListView32", WS_CHILD | WS_VISIBLE | WS_BORDER | LVS_LIST | LVS_SMALLICON | LVS_SHAREIMAGELISTS, 0, 0, 302, 200 - DEFPUSHBUTTON "System IL", IDC_SYSTEM, 2, 202, 54, 13 - PUSHBUTTON "Device IL", IDC_DEVICE, 60, 202, 54, 13 - PUSHBUTTON "Close", IDOK, 248, 202, 54, 13 -END diff --git a/rostests/tests/Imagelistviewer/resource.h b/rostests/tests/Imagelistviewer/resource.h deleted file mode 100644 index aa606bf1ca5..00000000000 --- a/rostests/tests/Imagelistviewer/resource.h +++ /dev/null @@ -1,4 +0,0 @@ -#define IDD_IMGLST 1000 -#define IDC_LSTVIEW 1001 -#define IDC_SYSTEM 1002 -#define IDC_DEVICE 1003 diff --git a/rostests/tests/README.txt b/rostests/tests/README.txt deleted file mode 100644 index 86aa8cae584..00000000000 --- a/rostests/tests/README.txt +++ /dev/null @@ -1,4 +0,0 @@ -This folder contains tests that are not merged in to -the new regression testing system. - -Please DO NOT add new tests here. \ No newline at end of file diff --git a/rostests/tests/accelerator/accelerator.c b/rostests/tests/accelerator/accelerator.c deleted file mode 100644 index 590cfe81880..00000000000 --- a/rostests/tests/accelerator/accelerator.c +++ /dev/null @@ -1,165 +0,0 @@ -#include -#include -#include - -#define ID_ACCEL1 0x100 -#define ID_ACCEL2 0x101 -#define ID_ACCEL3 0x102 -#define ID_ACCEL4 0x103 - -#ifndef VK_A -#define VK_A 0x41 -#endif - -/* - * {fVirt, key, cmd} - * fVirt |= FVIRTKEY | FCONTROL | FALT | FSHIFT - */ -//static HFONT tf; -static ACCEL Accelerators[4] = { - { FVIRTKEY, VK_A, ID_ACCEL1}, - { FVIRTKEY | FSHIFT, VK_A, ID_ACCEL2}, - { FVIRTKEY | FCONTROL, VK_A, ID_ACCEL3}, - { FVIRTKEY | FALT, VK_A, ID_ACCEL4}}; -static HACCEL hAcceleratorTable; -static char Event[200]; - -LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM); - -int WINAPI -WinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpszCmdLine, - int nCmdShow) -{ - WNDCLASS wc; - MSG msg; - HWND hWnd; - - wc.lpszClassName = "AcceleratorTest"; - wc.lpfnWndProc = MainWndProc; - wc.style = CS_VREDRAW | CS_HREDRAW; - wc.hInstance = hInstance; - wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION); - wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW); - wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH); - wc.lpszMenuName = NULL; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - if (RegisterClass(&wc) == 0) - { - fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - hWnd = CreateWindow("AcceleratorTest", - "Accelerator Test", - WS_OVERLAPPEDWINDOW, - 0, - 0, - CW_USEDEFAULT, - CW_USEDEFAULT, - NULL, - NULL, - hInstance, - NULL); - if (hWnd == NULL) - { - fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - /*tf = CreateFontA(14, 0, 0, TA_BASELINE, FW_NORMAL, FALSE, FALSE, FALSE, - ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, - DEFAULT_QUALITY, FIXED_PITCH|FF_DONTCARE, "Timmons");*/ - - Event[0] = 0; - - ShowWindow(hWnd, nCmdShow); - - hAcceleratorTable = CreateAcceleratorTable(Accelerators, - sizeof(Accelerators)/sizeof(Accelerators[1])); - if (hAcceleratorTable == NULL) - { - fprintf(stderr, "CreateAcceleratorTable failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - while(GetMessage(&msg, NULL, 0, 0)) - { - if (!TranslateAccelerator(hWnd, hAcceleratorTable, &msg)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } - - if (!DestroyAcceleratorTable(hAcceleratorTable)) - { - fprintf(stderr, "DestroyAcceleratorTable failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - //DeleteObject(tf); - - return msg.wParam; -} - -LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - PAINTSTRUCT ps; - HDC hDC; - char buf[200]; - - switch(msg) - { - case WM_PAINT: - hDC = BeginPaint(hWnd, &ps); - //SelectObject(hDC, tf); - sprintf(buf, "Event: '%s'", Event); - TextOut(hDC, 10, 10, buf, strlen(buf)); - EndPaint(hWnd, &ps); - break; - - case WM_DESTROY: - PostQuitMessage(0); - break; - - case WM_COMMAND: - - switch (LOWORD(wParam)) - { - case ID_ACCEL1: - strcpy(Event, "A"); - break; - - case ID_ACCEL2: - strcpy(Event, "SHIFT+A"); - break; - - case ID_ACCEL3: - strcpy(Event, "CTRL+A"); - break; - - case ID_ACCEL4: - strcpy(Event, "ALT+A"); - break; - - default: - sprintf(Event, "%d", LOWORD(wParam)); - break; - } - - InvalidateRect(hWnd, NULL, TRUE); - UpdateWindow(hWnd); - break; - - default: - return DefWindowProc(hWnd, msg, wParam, lParam); - } - return 0; -} diff --git a/rostests/tests/accelerator/accelerator.rbuild b/rostests/tests/accelerator/accelerator.rbuild deleted file mode 100644 index f18f0d19174..00000000000 --- a/rostests/tests/accelerator/accelerator.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - accelerator.c - diff --git a/rostests/tests/alive/alive.c b/rostests/tests/alive/alive.c deleted file mode 100644 index 5c99760069d..00000000000 --- a/rostests/tests/alive/alive.c +++ /dev/null @@ -1,48 +0,0 @@ -/* $Id$ - * - */ -#include -#include - -HANDLE StandardOutput = INVALID_HANDLE_VALUE; -CHAR Message [80]; -DWORD CharactersToWrite = 0; -DWORD WrittenCharacters = 0; -INT d = 0, h = 0, m = 0, s = 0; - -int -main (int argc, char * argv []) -{ - StandardOutput = GetStdHandle (STD_OUTPUT_HANDLE); - if (INVALID_HANDLE_VALUE == StandardOutput) - { - return (EXIT_FAILURE); - } - while (TRUE) - { - /* Prepare the message and update it */ - CharactersToWrite = - wsprintf ( - Message, - "Alive for %dd %dh %d' %d\" \r", - d, h, m, s - ); - WriteConsole ( - StandardOutput, - Message, - CharactersToWrite, - & WrittenCharacters, - NULL - ); - /* suspend the execution for 1s */ - Sleep (1000); - /* increment seconds */ - ++ s; - if (60 == s) { s = 0; ++ m; } - if (60 == m) { m = 0; ++ h; } - if (24 == h) { h = 0; ++ d; } - } - return (EXIT_SUCCESS); -} - -/* EOF */ diff --git a/rostests/tests/alive/alive.rbuild b/rostests/tests/alive/alive.rbuild deleted file mode 100644 index 0f1f48e293c..00000000000 --- a/rostests/tests/alive/alive.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - alive.c - diff --git a/rostests/tests/apc/apc.c b/rostests/tests/apc/apc.c deleted file mode 100644 index 5b45c37e772..00000000000 --- a/rostests/tests/apc/apc.c +++ /dev/null @@ -1,94 +0,0 @@ -#include -#include -#define WIN32_NO_STATUS -#include -#define NTOS_MODE_USER -#include - -HANDLE OutputHandle; -HANDLE InputHandle; - -VOID WINAPI -ApcRoutine(PVOID Context, - PIO_STATUS_BLOCK IoStatus, - ULONG Reserved) -{ - printf("(apc.exe) ApcRoutine(Context %p)\n", Context); -} - - -int main(int argc, char* argv[]) -{ - NTSTATUS Status; - HANDLE FileHandle; - OBJECT_ATTRIBUTES ObjectAttributes; - UNICODE_STRING FileName = RTL_CONSTANT_STRING(L"\\C:\\a.txt"); - IO_STATUS_BLOCK IoStatus; - CHAR Buffer[256]; - HANDLE EventHandle; - LARGE_INTEGER off; - - AllocConsole(); - InputHandle = GetStdHandle(STD_INPUT_HANDLE); - OutputHandle = GetStdHandle(STD_OUTPUT_HANDLE); - - printf("APC test program\n"); - - EventHandle = CreateEventW(NULL, - FALSE, - FALSE, - NULL); - if (EventHandle == INVALID_HANDLE_VALUE) - { - printf("Failed to create event\n"); - return 0; - } - - printf("Opening file\n"); - InitializeObjectAttributes(&ObjectAttributes, - &FileName, - 0, - NULL, - NULL); - - printf("Creating file\n"); - FileHandle = CreateFileW(L"C:\\a.txt", - FILE_GENERIC_READ | FILE_GENERIC_WRITE, - 0, - NULL, - OPEN_EXISTING, - FILE_FLAG_OVERLAPPED, - NULL); - - if (FileHandle == INVALID_HANDLE_VALUE) - { - - printf("Open failed last err 0x%lu\n",GetLastError()); - return 0; - } - - off.QuadPart = 0; - - printf("Reading file\n"); - Status = ZwReadFile(FileHandle, - NULL, - (PIO_APC_ROUTINE)ApcRoutine, - (PVOID) 0xdeadbeef, - &IoStatus, - Buffer, - 256,//len - &off ,//offset must exist if file was opened for asynch. i/o aka. OVERLAPPED - NULL); - - if (!NT_SUCCESS(Status)) - { - printf("Read failed status 0x%lu\n",Status); - } - printf("Waiting\n"); - WaitForSingleObjectEx(EventHandle, INFINITE, TRUE); - printf("Returned from wait\n"); - ZwClose(FileHandle); - printf("Program finished\n"); - return 0; -} - diff --git a/rostests/tests/apc/apc.rbuild b/rostests/tests/apc/apc.rbuild deleted file mode 100644 index 2dc589b569c..00000000000 --- a/rostests/tests/apc/apc.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - ntdll - apc.c - diff --git a/rostests/tests/apc2/apc2.c b/rostests/tests/apc2/apc2.c deleted file mode 100644 index 163806259cd..00000000000 --- a/rostests/tests/apc2/apc2.c +++ /dev/null @@ -1,53 +0,0 @@ - -#include -#include - -VOID CALLBACK TimerApcProc( - LPVOID lpArg, - DWORD dwTimerLowValue, - DWORD dwTimerHighValue ) -{ - printf("APC Callback %lu\n", *(PDWORD)lpArg); -} - - -int main() -{ - HANDLE hTimer; - BOOL bSuccess; - LARGE_INTEGER DueTime; - DWORD value = 1; - - hTimer = CreateWaitableTimer(NULL, FALSE, NULL ); - - if (!hTimer) - { - printf("CreateWaitableTimer failed!\n"); - return 0; - } - - DueTime.QuadPart = -(LONGLONG)(5 * 10000000); - - bSuccess = SetWaitableTimer( - hTimer, - &DueTime, - 2001 /*interval (using an odd number to be able to find it easy in kmode) */, - TimerApcProc, - &value /*callback argument*/, - FALSE ); - - if (!bSuccess) - { - printf("SetWaitableTimer failed!\n"); - return 0; - } - - for (;value <= 10; value++ ) - { - SleepEx(INFINITE, TRUE /*alertable*/ ); - } - - CloseHandle( hTimer ); - return 0; -} - diff --git a/rostests/tests/apc2/apc2.rbuild b/rostests/tests/apc2/apc2.rbuild deleted file mode 100644 index 0226796076c..00000000000 --- a/rostests/tests/apc2/apc2.rbuild +++ /dev/null @@ -1,3 +0,0 @@ - - apc2.c - diff --git a/rostests/tests/args/args.c b/rostests/tests/args/args.c deleted file mode 100644 index 91b0d0eb406..00000000000 --- a/rostests/tests/args/args.c +++ /dev/null @@ -1,39 +0,0 @@ -#include -#include -#include -#include - -HANDLE OutputHandle; -HANDLE InputHandle; - -void debug_printf(char* fmt, ...) -{ - va_list args; - char buffer[255]; - - va_start(args,fmt); - vsprintf(buffer,fmt,args); - WriteConsoleA(OutputHandle, buffer, strlen(buffer), NULL, NULL); - va_end(args); -} - - -int main(int argc, char* argv[]) -{ - int i; - - AllocConsole(); - InputHandle = GetStdHandle(STD_INPUT_HANDLE); - OutputHandle = GetStdHandle(STD_OUTPUT_HANDLE); - - printf("GetCommandLineA() %s\n",GetCommandLineA()); - debug_printf("GetCommandLineA() %s\n",GetCommandLineA()); - debug_printf("argc %d\n", argc); - for (i=0; i - args.c -
diff --git a/rostests/tests/atomtest/atomtest.c b/rostests/tests/atomtest/atomtest.c deleted file mode 100644 index 740e13a133e..00000000000 --- a/rostests/tests/atomtest/atomtest.c +++ /dev/null @@ -1,116 +0,0 @@ -#include -#include -#define WIN32_NO_STATUS -#include -#define NTOS_MODE_USER -#include - -#define BUFFER_SIZE 256 - -int main(int argc, char* argv[]) -{ - PRTL_ATOM_TABLE AtomTable = NULL; - RTL_ATOM AtomA = -1, AtomB = -1, AtomC = -1; - NTSTATUS Status; - WCHAR Buffer[BUFFER_SIZE]; - ULONG NameLength, Data1, Data2; - - printf("Atom table test app\n\n"); - - printf("RtlCreateAtomTable()\n"); - Status = RtlCreateAtomTable(37, - &AtomTable); - printf(" Status 0x%08lx\n", Status); - - if (NT_SUCCESS(Status)) - { - printf(" AtomTable %p\n", AtomTable); - - printf("RtlAddAtomToAtomTable()\n"); - Status = RtlAddAtomToAtomTable(AtomTable, - L"TestAtomA", - &AtomA); - printf(" Status 0x%08lx\n", Status); - if (NT_SUCCESS(Status)) - { - printf(" AtomA 0x%x\n", AtomA); - } - - printf("RtlAddAtomToAtomTable()\n"); - Status = RtlAddAtomToAtomTable(AtomTable, - L"TestAtomB", - &AtomB); - printf(" Status 0x%08lx\n", Status); - if (NT_SUCCESS(Status)) - { - printf(" AtomB 0x%x\n", AtomB); - } - - - printf("RtlLookupAtomInAtomTable()\n"); - Status = RtlLookupAtomInAtomTable(AtomTable, - L"TestAtomA", - &AtomC); - printf(" Status 0x%08lx\n", Status); - if (NT_SUCCESS(Status)) - { - printf(" AtomC 0x%x\n", AtomC); - } - - - printf("RtlPinAtomInAtomTable()\n"); - Status = RtlPinAtomInAtomTable(AtomTable, - AtomC); - printf(" Status 0x%08lx\n", Status); - - printf("RtlPinAtomInAtomTable()\n"); - Status = RtlPinAtomInAtomTable(AtomTable, - AtomC); - printf(" Status 0x%08lx\n", Status); - - -// printf("RtlDeleteAtomFromAtomTable()\n"); -// Status = RtlDeleteAtomFromAtomTable(AtomTable, -// AtomC); -// printf(" Status 0x%08lx\n", Status); - - -// printf("RtlEmptyAtomTable()\n"); -// Status = RtlEmptyAtomTable(AtomTable, -// TRUE); -// printf(" Status 0x%08lx\n", Status); - - -// printf("RtlLookupAtomInAtomTable()\n"); -// Status = RtlLookupAtomInAtomTable(AtomTable, -// L"TestAtomA", -// &AtomC); -// printf(" Status 0x%08lx\n", Status); - - - printf("RtlQueryAtomInAtomTable()\n"); - NameLength = sizeof(WCHAR) * BUFFER_SIZE; - Status = RtlQueryAtomInAtomTable(AtomTable, - AtomC, - &Data1, - &Data2, - Buffer, - &NameLength); - printf(" Status 0x%08lx\n", Status); - if (NT_SUCCESS(Status)) - { - printf(" RefCount %ld\n", Data1); - printf(" PinCount %ld\n", Data2); - printf(" NameLength %lu\n", NameLength); - printf(" AtomName: %S\n", Buffer); - } - - printf("RtlDestroyAtomTable()\n"); - RtlDestroyAtomTable(AtomTable); - - - printf("Atom table test app finished\n"); - } - - return(0); -} diff --git a/rostests/tests/atomtest/atomtest.rbuild b/rostests/tests/atomtest/atomtest.rbuild deleted file mode 100644 index b2d0039c405..00000000000 --- a/rostests/tests/atomtest/atomtest.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - ntdll - atomtest.c - diff --git a/rostests/tests/bench/bench-syscall.c b/rostests/tests/bench/bench-syscall.c deleted file mode 100644 index 621b3a15b21..00000000000 --- a/rostests/tests/bench/bench-syscall.c +++ /dev/null @@ -1,8 +0,0 @@ -/* - * - */ - -int main(int argc, char* argv[]) -{ - -} diff --git a/rostests/tests/bench/bench-thread.c b/rostests/tests/bench/bench-thread.c deleted file mode 100644 index a3aa9974f42..00000000000 --- a/rostests/tests/bench/bench-thread.c +++ /dev/null @@ -1,81 +0,0 @@ -#include -#include - -#define NR_THREADS (30) - - -DWORD WINAPI -thread_main1(LPVOID param) -{ - printf("Thread 1 running (Counter %lu)\n", PtrToUlong(param)); - SleepEx(INFINITE, TRUE); - return 0; -} - - -DWORD WINAPI -thread_main2(LPVOID param) -{ - printf("Thread 2 running (Counter %lu)\n", PtrToUlong(param)); - Sleep(INFINITE); - return 0; -} - - -int main (void) -{ - DWORD i=0; - DWORD id; - -#if 1 - printf("Creating %d threads...\n",NR_THREADS*2); - for (i=0;i - gdi32 - bench-thread.c -
diff --git a/rostests/tests/button/button.rbuild b/rostests/tests/button/button.rbuild deleted file mode 100644 index 45422cc3e28..00000000000 --- a/rostests/tests/button/button.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - buttontst.c - diff --git a/rostests/tests/button/buttontst.c b/rostests/tests/button/buttontst.c deleted file mode 100644 index 57cf7973464..00000000000 --- a/rostests/tests/button/buttontst.c +++ /dev/null @@ -1,107 +0,0 @@ -/* Based on Radoslaw Sokol's static control test. */ -#include - -static LPSTR BUTTON_CLASS = "BUTTON"; -static LPSTR TEST_WND_CLASS = "TESTWND"; - -#ifdef NDEBUG - #define DPRINT(s) (void)0 -#else - #define DPRINT(s) OutputDebugStringA("BUTTONTEST: " s "\n") -#endif - -HINSTANCE AppInstance = NULL; - -LRESULT WmCreate( - HWND Wnd) -{ - DPRINT("WM_CREATE (enter)."); - DPRINT("test 1"); - CreateWindowEx(0, BUTTON_CLASS, "PushButton", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE, - 10, 10, 150, 30, Wnd, NULL, AppInstance, NULL); - DPRINT("test 2"); - CreateWindowEx(0, BUTTON_CLASS, "DefPushButton", BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE, - 10, 40, 150, 30, Wnd, NULL, AppInstance, NULL); - DPRINT("test 3"); - CreateWindowEx(0, BUTTON_CLASS, "AutoRadioButton", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, - 10, 70, 150, 30, Wnd, NULL, AppInstance, NULL); - DPRINT("test 4"); - CreateWindowEx(0, BUTTON_CLASS, "AutoCheckBox", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE, - 10, 100, 150, 30, Wnd, NULL, AppInstance, NULL); - - DPRINT("WM_CREATE (leave)."); - return 0; -} - -LRESULT CALLBACK TestWndProc( - HWND Wnd, - UINT Msg, - WPARAM wParam, - LPARAM lParam) -{ - switch (Msg) { - case WM_CREATE: - return WmCreate(Wnd); - case WM_DESTROY: - PostQuitMessage(0); - return 0; - default: - return DefWindowProc(Wnd, Msg, wParam, lParam); - } -} - -int WINAPI WinMain( - HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpCmdLine, - int nShowCmd) -{ - ATOM Result; - MSG Msg; - HWND MainWindow; - WNDCLASSEX TestWndClass = {0}; - DPRINT("Application starting up."); - // Remember instance handle. - AppInstance = GetModuleHandle(NULL); - // Register test window class. - TestWndClass.cbSize = sizeof(WNDCLASSEX); - TestWndClass.lpfnWndProc = &TestWndProc; - TestWndClass.hInstance = AppInstance; - TestWndClass.hCursor = LoadCursor(0, (LPCTSTR)IDC_ARROW); - TestWndClass.hbrBackground = CreateSolidBrush(RGB(255,255,230)); - TestWndClass.lpszClassName = TEST_WND_CLASS; - Result = RegisterClassEx(&TestWndClass); - if (Result == 0) { - DPRINT("Error registering class."); - MessageBox(0, "Error registering test window class.", - "Button control test", MB_ICONSTOP | MB_OK); - ExitProcess(0); - } - // Create main window. - DPRINT("Creating main window."); - MainWindow = CreateWindowEx(WS_EX_APPWINDOW | WS_EX_CLIENTEDGE, - TEST_WND_CLASS, "Button test", - WS_OVERLAPPEDWINDOW, 50, 50, 180, 365, - NULL, NULL, AppInstance, NULL); - if (MainWindow == 0) { - DPRINT("Error creating main window."); - UnregisterClass(TEST_WND_CLASS, AppInstance); - MessageBox(0, "Error creating test window.", - "Static control test", MB_ICONSTOP | MB_OK); - ExitProcess(0); - } - DPRINT("Showing main window."); - ShowWindow(MainWindow, SW_SHOWNORMAL); - UpdateWindow(MainWindow); - // Run message loop. - DPRINT("Entering message loop."); - while (GetMessage(&Msg, NULL, 0, 0) > 0) { - TranslateMessage(&Msg); - DispatchMessage(&Msg); - } - // Unregister window class. - UnregisterClass(TEST_WND_CLASS, AppInstance); - DPRINT("Exiting."); - - return Msg.wParam; -} diff --git a/rostests/tests/button2/button2.rbuild b/rostests/tests/button2/button2.rbuild deleted file mode 100644 index 72a87543eb7..00000000000 --- a/rostests/tests/button2/button2.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - buttontst2.c - diff --git a/rostests/tests/button2/buttontst2.c b/rostests/tests/button2/buttontst2.c deleted file mode 100644 index 0564f7ec7b4..00000000000 --- a/rostests/tests/button2/buttontst2.c +++ /dev/null @@ -1,219 +0,0 @@ -#include -#include - -HFONT tf; -LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM); - -int WINAPI -WinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpszCmdLine, - int nCmdShow) -{ - WNDCLASS wc; - MSG msg; - HWND hWnd; - HWND hbtn[26]; - - wc.lpszClassName = "ButtonTest"; - wc.lpfnWndProc = MainWndProc; - wc.style = CS_VREDRAW | CS_HREDRAW; - wc.hInstance = hInstance; - wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION); - wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW); - wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH); - wc.lpszMenuName = NULL; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - if (RegisterClass(&wc) == 0) - { - fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - hWnd = CreateWindow("ButtonTest", - "Button Test", - WS_OVERLAPPEDWINDOW, - 0, - 0, - CW_USEDEFAULT, - CW_USEDEFAULT, - NULL, - NULL, - hInstance, - NULL); - if (hWnd == NULL) - { - fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - tf = CreateFontA(14, 0, 0, TA_BASELINE, FW_NORMAL, FALSE, FALSE, FALSE, - ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, - DEFAULT_QUALITY, FIXED_PITCH|FF_DONTCARE, "Timmons"); - - ShowWindow(hWnd, nCmdShow); - - hbtn[0] = CreateWindow( - "BUTTON","BS_DEFPUSHBUTTON",WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, - 10, 10, 200, 40, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - hbtn[1] = CreateWindow( - "BUTTON","BS_3STATE",WS_VISIBLE | WS_CHILD | BS_3STATE, - 10, 60, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - hbtn[2] = CreateWindow( - "BUTTON","BS_AUTO3STATE",WS_VISIBLE | WS_CHILD | BS_AUTO3STATE, - 10, 90, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - hbtn[3] = CreateWindow( - "BUTTON","BS_AUTOCHECKBOX",WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX, - 10, 120, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - hbtn[4] = CreateWindow( - "BUTTON","BS_AUTORADIOBUTTON",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON, - 10, 150, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - hbtn[5] = CreateWindow( - "BUTTON","BS_CHECKBOX",WS_VISIBLE | WS_CHILD | BS_CHECKBOX, - 10, 180, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - hbtn[6] = CreateWindow( - "BUTTON","BS_GROUPBOX",WS_VISIBLE | WS_CHILD | BS_GROUPBOX, - 10, 210, 200, 80, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - hbtn[7] = CreateWindow( - "BUTTON","BS_PUSHBUTTON",WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON, - 20, 230, 180, 30, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - hbtn[8] = CreateWindow( - "BUTTON","BS_RADIOBUTTON",WS_VISIBLE | WS_CHILD | BS_RADIOBUTTON, - 10, 300, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - hbtn[9] = CreateWindow( - "BUTTON","BS_AUTORADIOBUTTON",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON, - 220, 160, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - hbtn[10] = CreateWindow( - "BUTTON","BS_DEFPUSHBUTTON|BS_BOTTOM",WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON | BS_BOTTOM, - 220, 10, 250, 40, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - hbtn[11] = CreateWindow( - "BUTTON","BS_DEFPUSHBUTTON|BS_LEFT",WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON | BS_LEFT, - 480, 10, 250, 40, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - hbtn[12] = CreateWindow( - "BUTTON","BS_DEFPUSHBUTTON|BS_RIGHT|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON | BS_RIGHT |BS_MULTILINE, - 740, 10, 150, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - hbtn[13] = CreateWindow( - "BUTTON","BS_AUTORADIOBUTTON|BS_TOP",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_TOP, - 220, 60, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - // Other Combinations - - hbtn[14] = CreateWindow( - "BUTTON","BS_AUTORADIOBUTTON|BS_BOTTOM|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_BOTTOM | BS_MULTILINE, - 480, 60, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - hbtn[15] = CreateWindow( - "BUTTON","BS_AUTORADIOBUTTON|BS_LEFT",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_LEFT, - 740, 80, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - hbtn[16] = CreateWindow( - "BUTTON","BS_AUTORADIOBUTTON|BS_RIGHT|BS_TOP",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_RIGHT | BS_TOP, - 220, 130, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - hbtn[17] = CreateWindow( - "BUTTON","BS_AUTORADIOBUTTON|BS_TOP|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_TOP| BS_MULTILINE, - 480, 130, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - hbtn[18] = CreateWindow( - "BUTTON","BS_AUTOCHECKBOX|BS_BOTTOM|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX | BS_BOTTOM | BS_MULTILINE, - 740, 130, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - hbtn[19] = CreateWindow( - "BUTTON","BS_AUTOCHECKBOX|BS_TOP|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE, - 480, 190, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - hbtn[20] = CreateWindow( - "BUTTON","BS_AUTOCHECKBOX|BS_LEFT|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX | BS_LEFT | BS_MULTILINE, - 220, 230, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - hbtn[21] = CreateWindow( - "BUTTON","BS_AUTOCHECKBOX|BS_RIGHT|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX | BS_RIGHT | BS_MULTILINE, - 480, 240, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - hbtn[22] = CreateWindow( - "BUTTON","BS_GROUPBOX|BS_TOP",WS_VISIBLE | WS_CHILD | BS_GROUPBOX | BS_TOP, - 10, 340, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - hbtn[23] = CreateWindow( - "BUTTON","BS_GROUPBOX|BS_BOTTOM",WS_VISIBLE | WS_CHILD | BS_GROUPBOX | BS_BOTTOM, - 10, 410, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - hbtn[24] = CreateWindow( - "BUTTON","BS_GROUPBOXBOX|BS_LEFT",WS_VISIBLE | WS_CHILD | BS_GROUPBOX | BS_LEFT, - 520, 340, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - hbtn[25] = CreateWindow( - "BUTTON","BS_GROUPBOX|BS_RIGHT|BS_BOTTOM",WS_VISIBLE | WS_CHILD | BS_GROUPBOX | BS_BOTTOM | BS_RIGHT, - 300, 340, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL); - - while(GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - DeleteObject(tf); - - return msg.wParam; -} - -LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - PAINTSTRUCT ps; - HDC hDC; - - switch(msg) - { - case WM_PAINT: - hDC = BeginPaint(hWnd, &ps); - SelectObject(hDC, tf); - EndPaint(hWnd, &ps); - break; - - case WM_DESTROY: - PostQuitMessage(0); - break; - - case WM_COMMAND: - switch(HIWORD(wParam)) - { - case BN_CLICKED: - printf("BUTTON CLICKED !\n"); - break; - case BN_DBLCLK: - printf("BUTTON DOUBLE-CLICKED !\n"); - break; - case BN_PUSHED: - printf("BUTTON PUSHED !\n"); - break; - case BN_PAINT: - printf("BUTTON PAINTED !\n"); - break; - case BN_UNPUSHED: - printf("BUTTON UNPUSHED !\n"); - break; - - } - break; - - default: - return DefWindowProc(hWnd, msg, wParam, lParam); - } - return 0; -} diff --git a/rostests/tests/capclock/capclock.c b/rostests/tests/capclock/capclock.c deleted file mode 100644 index 5ea9d33cf45..00000000000 --- a/rostests/tests/capclock/capclock.c +++ /dev/null @@ -1,70 +0,0 @@ -/* $Id$ - * - * DESCRIPTION: Simple Win32 Caption Clock - * PROJECT : ReactOS (test applications) - * AUTHOR : Emanuele Aliberti - * DATE : 2003-09-03 - * LICENSE : GNU GPL v2.0 - */ -#include -#include - -UINT Timer = 1; - -static INT_PTR CALLBACK DialogFunc(HWND,UINT,WPARAM,LPARAM); -static VOID CALLBACK TimerProc(HWND,UINT,UINT_PTR,DWORD); - - -INT WINAPI WinMain (HINSTANCE hinst, HINSTANCE hinstPrev, LPSTR lpCmdLine, INT nCmdShow) -{ - WNDCLASS wc; - - ZeroMemory (& wc, sizeof wc); - wc.lpfnWndProc = DefDlgProc; - wc.cbWndExtra = DLGWINDOWEXTRA; - wc.hInstance = hinst; - wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW); - wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1); - wc.lpszClassName = "CapClock"; - RegisterClass (& wc); - return DialogBox(hinst, MAKEINTRESOURCE(2), NULL, DialogFunc); - -} -static int InitializeApp (HWND hDlg,WPARAM wParam, LPARAM lParam) -{ - Timer = SetTimer (hDlg,Timer,1000,TimerProc); - TimerProc (hDlg,0,0,0); - return 1; -} -static INT_PTR CALLBACK DialogFunc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch (msg) - { - case WM_INITDIALOG: - InitializeApp(hwndDlg,wParam,lParam); - return TRUE; - case WM_CLOSE: - KillTimer (hwndDlg,Timer); - EndDialog(hwndDlg,0); - return TRUE; - } - return FALSE; -} -static VOID CALLBACK TimerProc (HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) -{ - CHAR text [20]; - SYSTEMTIME lt; - - GetLocalTime (& lt); - wsprintf ( - text, - "%d-%02d-%02d %02d:%02d:%02d", - lt.wYear, - lt.wMonth, - lt.wDay, - lt.wHour, - lt.wMinute, - lt.wSecond); - SetWindowText (hwnd, text); -} -/* EOF */ diff --git a/rostests/tests/capclock/capclock.ico b/rostests/tests/capclock/capclock.ico deleted file mode 100644 index 0b52fb0ccde..00000000000 Binary files a/rostests/tests/capclock/capclock.ico and /dev/null differ diff --git a/rostests/tests/capclock/capclock.rbuild b/rostests/tests/capclock/capclock.rbuild deleted file mode 100644 index 778f153151b..00000000000 --- a/rostests/tests/capclock/capclock.rbuild +++ /dev/null @@ -1,7 +0,0 @@ - - . - user32 - gdi32 - capclock.c - capclock.rc - diff --git a/rostests/tests/capclock/capclock.rc b/rostests/tests/capclock/capclock.rc deleted file mode 100644 index e046542ec50..00000000000 --- a/rostests/tests/capclock/capclock.rc +++ /dev/null @@ -1,20 +0,0 @@ -/* $Id$ */ - -#include - -#define REACTOS_STR_FILE_DESCRIPTION "ReactOS W32 Caption Clock\0" -#define REACTOS_STR_INTERNAL_NAME "capclock\0" -#define REACTOS_STR_ORIGINAL_FILENAME "capclock.exe\0" -#include - -/* Icons */ - -1 ICON "capclock.ico" - -/* Dialogs */ - -2 DIALOG 6, 18, 132, 0 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -FONT 8, "Microsoft Sans Serif" -BEGIN -END diff --git a/rostests/tests/carets/caret.bmp b/rostests/tests/carets/caret.bmp deleted file mode 100644 index 5082a5b71a5..00000000000 Binary files a/rostests/tests/carets/caret.bmp and /dev/null differ diff --git a/rostests/tests/carets/carets.c b/rostests/tests/carets/carets.c deleted file mode 100644 index e18a2b1fa93..00000000000 --- a/rostests/tests/carets/carets.c +++ /dev/null @@ -1,152 +0,0 @@ -#include -#include -#include "resource.h" - -static int CaretWidth = 2; -static int CaretHeight = 16; -static int CharWidth = 10; -static int CharHeight = 16; -static HBITMAP CaretBitmap; - -ULONG __cdecl DbgPrint(IN PCH Format, IN ...); - -LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM); - -int WINAPI -WinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpszCmdLine, - int nCmdShow) -{ - WNDCLASS wc; - MSG msg; - HWND hWnd; - - CaretBitmap = LoadBitmap(hInstance, (LPCTSTR)IDB_CARET); - - wc.lpszClassName = "CaretTestClass"; - wc.lpfnWndProc = MainWndProc; - wc.style = CS_VREDRAW | CS_HREDRAW; - wc.hInstance = hInstance; - wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION); - wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW); - wc.hbrBackground = (HBRUSH)COLOR_WINDOW; - wc.lpszMenuName = NULL; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - if (RegisterClass(&wc) == 0) - { - fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - hWnd = CreateWindow(wc.lpszClassName, - "Caret Test", - WS_OVERLAPPEDWINDOW, - 0, - 0, - 200, - 250, - NULL, - NULL, - hInstance, - NULL); - if (hWnd == NULL) - { - fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - ShowWindow(hWnd, nCmdShow); - - while(GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - return msg.wParam; -} - -LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - POINT pt; - switch(msg) - { - case WM_ACTIVATE: - switch(LOWORD(wParam)) - { - case WA_ACTIVE: - case WA_CLICKACTIVE: - if(!ShowCaret(hWnd)) - DbgPrint("ShowCaret(0x%x)\n", hWnd); - break; - case WA_INACTIVE: - if(!HideCaret(hWnd)) - DbgPrint("HideCaret(0x%x)\n", hWnd); - break; - } - break; - - case WM_KEYDOWN: - if(!GetCaretPos(&pt)) - { - DbgPrint("GetCaretPos() failed!\n"); - break; - } - switch(wParam) - { - case VK_LEFT: - pt.x -= CharWidth; - break; - case VK_UP: - pt.y -= CharHeight; - break; - case VK_RIGHT: - pt.x += CharWidth; - break; - case VK_DOWN: - pt.y += CharHeight; - break; - } - if(!SetCaretPos(pt.x, pt.y)) - DbgPrint("SetCaretPos() failed!\n"); - break; - - case WM_RBUTTONDOWN: - if(!CreateCaret(hWnd, CaretBitmap, 0, 0)) - DbgPrint("CreateCaret() for window 0x%x failed!\n", hWnd); - else - if(!ShowCaret(hWnd)) - DbgPrint("ShowCaret(0x%x)\n", hWnd); - break; - - case WM_LBUTTONDOWN: - if(!CreateCaret(hWnd, (HBITMAP)0, CaretWidth, CaretHeight)) - DbgPrint("CreateCaret() for window 0x%x failed!\n", hWnd); - else - if(!ShowCaret(hWnd)) - DbgPrint("ShowCaret(0x%x)\n", hWnd); - break; - - case WM_CREATE: - if(!CreateCaret(hWnd, (HBITMAP)0, CaretWidth, CaretHeight)) - DbgPrint("CreateCaret() for window 0x%x failed!\n", hWnd); - else - if(!SetCaretPos(1, 1)) - DbgPrint("SetCaretPos(%i, %i) failed!\n", 1, 1); - break; - - case WM_DESTROY: - if(!DestroyCaret()) - DbgPrint("DestroyCaret() failed!\n"); - PostQuitMessage(0); - break; - - default: - return DefWindowProc(hWnd, msg, wParam, lParam); - } - return 0; -} diff --git a/rostests/tests/carets/carets.rbuild b/rostests/tests/carets/carets.rbuild deleted file mode 100644 index 33379ce421b..00000000000 --- a/rostests/tests/carets/carets.rbuild +++ /dev/null @@ -1,8 +0,0 @@ - - . - user32 - gdi32 - ntdll - carets.c - carets.rc - diff --git a/rostests/tests/carets/carets.rc b/rostests/tests/carets/carets.rc deleted file mode 100644 index b269d709790..00000000000 --- a/rostests/tests/carets/carets.rc +++ /dev/null @@ -1,3 +0,0 @@ -#include - -1 BITMAP DISCARDABLE "caret.bmp" diff --git a/rostests/tests/carets/resource.h b/rostests/tests/carets/resource.h deleted file mode 100644 index 4550828495a..00000000000 --- a/rostests/tests/carets/resource.h +++ /dev/null @@ -1 +0,0 @@ -#define IDB_CARET 101 diff --git a/rostests/tests/combotst/combotst.c b/rostests/tests/combotst/combotst.c deleted file mode 100644 index aeed18d159a..00000000000 --- a/rostests/tests/combotst/combotst.c +++ /dev/null @@ -1,687 +0,0 @@ -/* ComboBox Control Test for ReactOS. - -* This is a test program. Not made to be fast, small -* easy to mantain, or portable. - -* I'm not erasing text because I don't want to use other functions from the API -* or make this more complex. Also Fonts are not heavily used. - -* This source code is in the PUBLIC DOMAIN and has NO WARRANTY. -* by Waldo Alvarez Cañizares , started July 11, 2003. */ - -//#define WIN32_LEAN_AND_MEAN -#include -#include "utils.h" - -#define CONTROLCLASS "COMBOBOX" /* the class name */ -#define CONTROLCLASSW L"COMBOBOX" /* the class name in unicode*/ - -#define WINDOWWIDTH 560 -#define WINDOWHEIGHT 350 - -/* --- Command IDs of some buttons --- */ -#define CREATEWINDOW_ID 106 -#define CREATEWINDOWEX_ID 107 -#define CREATEWINDOWW_ID 108 -#define INITPAGE_ID 400 -#define SECONDPAGE_ID 401 -#define BACKFIRSTPAGE_ID 402 - -/* --- Position where the result text goes --- */ -#define ResultX 0 -#define ResultY 305 - -/* --- Position where the notify text goes --- */ -#define NOTIFYX 390 -#define NOTIFYY 285 - -/* --- The width of most buttons --- */ -#define CHECKBUTWIDTH 190 -#define SCROLLAMOUNT -15 - -/* Size of buffer to hold resulting strings from conversion -and returned by messages */ -#define BUFFERLEN 80 -char TextBuffer[BUFFERLEN]={'R','e','s','u','l','t',':',' '}; - -HWND g_hwnd = NULL; -HINSTANCE g_hInst = NULL; - -int pos = 10; -int n = 0; -int yButPos = 10; -int xButPos = 0; - -DWORD ComboStyle = 0; - -/* --- Control coordinates --- */ -#define CONTROLPOSX 390 -#define CONTROLPOSY 10 -DWORD ControlWidth = 160; -DWORD ControlHeight = 150; - -static RECT srect = {CONTROLPOSX,CONTROLPOSY,WINDOWWIDTH,WINDOWHEIGHT}; - -HWND hwndEdit = NULL; - -RECT rect; -DWORD StartP,EndP; -HWND hwnd; /* main window handle */ - -char AddString[] = "string added"; - -typedef void FunctionHandler(HWND,DWORD,WPARAM,LPARAM); -typedef FunctionHandler* LPFUNCTIONHANDLER; - -void PrintTextXY(char* Text,int x,int y,int len, RECT rect) - { - HDC hdc; - hdc = GetDC (g_hwnd); - SelectObject (hdc, GetStockObject (SYSTEM_FIXED_FONT)); - - TextOut (hdc, x,y,Text,len); - ReleaseDC (g_hwnd, hdc); - - ValidateRect (g_hwnd, &rect); - } - -static -VOID -HandlePrintReturnHex(HWND handle,DWORD Msg,WPARAM wParam,LPARAM lParam) - { - LRESULT ret; - RECT rect; - ret = SendMessage(handle,Msg,wParam,lParam); - htoa((unsigned int)ret,&TextBuffer[8]); - GetWindowRect(g_hwnd,&rect); - PrintTextXY(TextBuffer,ResultX,ResultY,16,rect); - } - - -static -VOID -HandlePrintReturnStr(HWND handle,DWORD Msg,WPARAM wParam,LPARAM lParam) - { - LRESULT ret; - RECT rect; - - TextBuffer[8] = (char)(BUFFERLEN - 8); /* Setting the max size to put chars in first byte */ - ret = SendMessage(handle,Msg,wParam,lParam); - GetWindowRect(g_hwnd,&rect); - PrintTextXY(TextBuffer,ResultX,ResultY,8+(int)ret,rect); - } - -static -VOID -HandlePrintRect(HWND handle,DWORD Msg,WPARAM wParam,LPARAM lParam) - { - RECT rect = *(RECT*)lParam; - TextBuffer[8] = (char)(BUFFERLEN - 8); /* Setting the max size to put chars in first byte */ - SendMessage(handle,Msg,wParam,lParam); - - htoa(rect.top,&TextBuffer[8]); - TextBuffer[8+8] = ' '; - htoa(rect.bottom,&TextBuffer[8+8+1]); - TextBuffer[8+8+8+1] = ' '; - htoa(rect.left,&TextBuffer[8+8+8+1+1]); - TextBuffer[8+8+8+8+1+1] = ' '; - htoa(rect.right,&TextBuffer[8+8+8+8+1+1+1]); - - GetWindowRect(g_hwnd,&rect); - PrintTextXY(TextBuffer,ResultX,ResultY,8+4*9-1,rect); - } - -struct - { - char* Text; /* Text for the button */ - DWORD MsgCode; /* Message Code */ - WPARAM wParam; /* Well hope you can understand this */ - LPARAM lParam; /* ditto */ - LPFUNCTIONHANDLER Handler; /* Funtion called to handle the result of each message */ - } -Msg[] = - { - {"CB_ADDSTRING",CB_ADDSTRING,0,(LPARAM)&AddString,&HandlePrintReturnHex}, - {"CB_ADDSTRING - long",CB_ADDSTRING,0,(LPARAM)"very loooooooooong striiinnnnnnnnnggg",&HandlePrintReturnHex}, - {"CB_DELETESTRING",CB_DELETESTRING,2,0,&HandlePrintReturnHex}, /* remember to catch WM_DELETEITEM*/ - - /* What a message, why M$ decided to implement his thing ? */ - {"CB_DIR - drives",CB_DIR,DDL_DRIVES, - /* Hoping that most machines have this */ - (LPARAM)"C:\\", - &HandlePrintReturnHex}, - - {"CB_DIR - dirs",CB_DIR,DDL_DIRECTORY,(LPARAM)"C:\\*",&HandlePrintReturnHex}, - - {"CB_DIR - files",CB_DIR, - DDL_ARCHIVE | DDL_EXCLUSIVE | DDL_HIDDEN | DDL_READONLY | DDL_READWRITE | DDL_SYSTEM, - (LPARAM)"C:\\*",&HandlePrintReturnHex}, - - /* Do not forget WM_COMPAREITEM */ - - {"CB_FINDSTRING",CB_FINDSTRING,1,(LPARAM)"str",&HandlePrintReturnHex}, - {"CB_FINDSTRINGEXACT(-1)",CB_FINDSTRINGEXACT,-1,(LPARAM)&AddString,&HandlePrintReturnHex}, - {"CB_FINDSTRINGEXACT(2)",CB_FINDSTRINGEXACT,2,(LPARAM)&AddString,&HandlePrintReturnHex}, - - /* "CB_GETCOMBOBOXINFO",CB_GETCOMBOBOXINFO,0,0,&HandlePrintReturnHex, winXP & .net server remember to handle the struct */ - - {"CB_GETCOUNT",CB_GETCOUNT,0,0,&HandlePrintReturnHex}, - - {"CB_GETCURSEL",CB_GETCURSEL,0,0,&HandlePrintReturnHex}, - - /* To implement "CB_GETEDITSEL - vars",CB_GETEDITSEL,,,&HandlePrintReturnHex, */ - - {"CB_GETEXTENDEDUI",CB_GETEXTENDEDUI,0,0,&HandlePrintReturnHex}, - {"CB_GETHORIZONTALEXTENT",CB_GETHORIZONTALEXTENT,0,0,&HandlePrintReturnHex}, - - - - {"CB_GETLBTEXT",CB_GETLBTEXT,1,(LPARAM)&TextBuffer[8],&HandlePrintReturnStr}, - {"CB_GETLBTEXTLEN",CB_GETLBTEXTLEN,1,0,&HandlePrintReturnHex}, - {"CB_GETLOCALE",CB_GETLOCALE,0,0,&HandlePrintReturnHex}, - - /* "CB_GETMINVISIBLE",CB_GETMINVISIBLE,0,0,&HandlePrintReturnHex, Included in Windows XP and Windows .NET Server. */ - - {"CB_GETTOPINDEX",CB_GETTOPINDEX,0,0,&HandlePrintReturnHex}, - - {"CB_INITSTORAGE",CB_INITSTORAGE,10,200,&HandlePrintReturnHex}, - {"CB_INSERTSTRING",CB_INSERTSTRING,2,(LPARAM)"inserted string",&HandlePrintReturnHex}, - - {"CB_LIMITTEXT",CB_LIMITTEXT,10,0,&HandlePrintReturnHex}, - {"CB_RESETCONTENT",CB_RESETCONTENT ,0,0,&HandlePrintReturnHex}, - {"CB_SELECTSTRING",CB_SELECTSTRING,2,(LPARAM)"str",&HandlePrintReturnHex}, - {"CB_SETCURSEL",CB_SETCURSEL,1,0,&HandlePrintReturnHex}, - - {"CB_SETDROPPEDWIDTH",CB_SETDROPPEDWIDTH,250,0,&HandlePrintReturnHex}, - - {"CB_SETEXTENDEDUI - set",CB_SETEXTENDEDUI,TRUE,0,&HandlePrintReturnHex}, - {"CB_SETEXTENDEDUI - clear",CB_SETEXTENDEDUI,FALSE,0,&HandlePrintReturnHex}, - - /* - * win2k have a small bug with this ^ , if you press F4 while it is cleared, - * the combobox is using style cbs_dropdown - * and the pointer is over the edit box then the mouse pointer is not changed - * to an arrow - */ - - {"CB_SETHORIZONTALEXTENT",CB_SETHORIZONTALEXTENT,500,0,&HandlePrintReturnHex}, - - {"CB_GETITEMDATA",CB_GETITEMDATA,1,0,&HandlePrintReturnHex}, - {"CB_SETITEMDATA",CB_SETITEMDATA,1,0x791031,&HandlePrintReturnHex}, - - {"CB_SETITEMHEIGHT",CB_SETITEMHEIGHT,-1,30,&HandlePrintReturnHex}, - {"CB_GETITEMHEIGHT",CB_GETITEMHEIGHT,2,0,&HandlePrintReturnHex}, - - /* "CB_SETMINVISIBLE",CB_SETMINVISIBLE,4,0,&HandlePrintReturnHex, Included in Windows XP and Windows .NET Server */ - - {"CB_GETEDITSEL",CB_GETEDITSEL,(WPARAM)NULL,(LPARAM)NULL,&HandlePrintReturnHex}, - {"CB_SETEDITSEL",CB_SETEDITSEL,0,0x00020005,&HandlePrintReturnHex}, - {"CB_SETEDITSEL - clear",CB_SETEDITSEL,0,0xFFFFFFFF,&HandlePrintReturnHex}, - - {"CB_SETTOPINDEX",CB_SETTOPINDEX,3,0,&HandlePrintReturnHex}, - - {"CB_SHOWDROPDOWN - true",CB_SHOWDROPDOWN,TRUE,0,&HandlePrintReturnHex}, - {"CB_SHOWDROPDOWN - false",CB_SHOWDROPDOWN,FALSE,0,&HandlePrintReturnHex}, - - {"CB_GETDROPPEDCONTROLRECT",CB_GETDROPPEDCONTROLRECT,0,(LPARAM)&rect,&HandlePrintRect}, - {"CB_GETDROPPEDSTATE",CB_GETDROPPEDSTATE,0,0,&HandlePrintReturnHex}, - {"CB_GETDROPPEDWIDTH",CB_GETDROPPEDWIDTH,0,0,&HandlePrintReturnHex}, - - {"WM_PASTE",WM_PASTE,0,0,&HandlePrintReturnHex}, - }; - -#define MAXMESSAGEBUTTONS 40 - -struct - { - char* Name; /* Text for the button */ - DWORD Code; /* Style Code */ - } -Styles[] = { - {"WS_DISABLED",WS_DISABLED}, - {"CBS_AUTOHSCROLL",CBS_AUTOHSCROLL}, - {"CBS_DISABLENOSCROLL",CBS_DISABLENOSCROLL}, - {"CBS_DROPDOWN",CBS_DROPDOWN}, - {"CBS_DROPDOWNLIST",CBS_DROPDOWNLIST}, - {"CBS_HASSTRINGS",CBS_HASSTRINGS}, - {"CBS_LOWERCASE",CBS_LOWERCASE}, - {"CBS_NOINTEGRALHEIGHT",CBS_NOINTEGRALHEIGHT}, - {"CBS_OEMCONVERT",CBS_OEMCONVERT}, - {"CBS_OWNERDRAWFIXED",CBS_OWNERDRAWFIXED}, - {"CBS_OWNERDRAWVARIABLE",CBS_OWNERDRAWVARIABLE}, - {"CBS_SIMPLE",CBS_SIMPLE}, - {"CBS_SORT",CBS_SORT}, - {"CBS_UPPERCASE",CBS_UPPERCASE}, - {"CBS_DISABLENOSCROLL",CBS_DISABLENOSCROLL}, - {"WS_HSCROLL",WS_HSCROLL}, - {"WS_VSCROLL",WS_VSCROLL} - }; - -/* The number of check buttons we have. -* Maybe some calculations at compile time would be better -*/ - -#define NUMBERCHECKS 17 - -#define NUMBERBUTTONS NUMBERCHECKS + 7 -HWND Buttons[NUMBERBUTTONS]; -HWND MessageButtons[MAXMESSAGEBUTTONS]; -HWND Back1But,Back2But; -HWND NextBut; - -HWND -CreateCheckButton(const char* lpWindowName, DWORD xSize, DWORD id) - { - HWND h; - h = CreateWindowEx(0, - "BUTTON", - lpWindowName, - WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, - xButPos, /* x */ - yButPos, /* y */ - xSize, /* nWidth */ - 20, /* nHeight */ - g_hwnd, - UlongToHandle(id), - g_hInst, - NULL - ); - yButPos += 21; - return h; - } - -HWND -CreatePushButton(const char* lpWindowName, DWORD xSize, DWORD id,DWORD Style) - { - - HWND h = CreateWindow("BUTTON", - lpWindowName, - WS_CHILD | BS_PUSHBUTTON | Style, - xButPos, /* x */ - yButPos, /* y */ - xSize, /* nWidth */ - 20, /* nHeight */ - g_hwnd, - LongToHandle(id), - g_hInst, - NULL - ); - - yButPos += 21; - return h; - } - -VOID -ReadNHide() - { - int i; - ComboStyle = 0; - for (i=0 ; i< NUMBERCHECKS ; i++) - { - if(BST_CHECKED == SendMessage(Buttons[i],BM_GETCHECK,0,0)) - ComboStyle |= Styles[i].Code; - ShowWindow(Buttons[i],SW_HIDE); - } - - for (; i< NUMBERBUTTONS ; i++)ShowWindow(Buttons[i],SW_HIDE); - for (i=0 ; i< 26 ; i++) ShowWindow(MessageButtons[i],SW_SHOW); - - ShowWindow(Back1But,SW_SHOW); - ShowWindow(NextBut,SW_SHOW); - } - -VOID -ForwardToSecondPage() - { - int i; - for (i=0;i<26;i++)ShowWindow(MessageButtons[i],SW_HIDE); - for(;i= 600) - { - Msg[LOWORD(wParam)-600].Handler(hwndEdit, - Msg[LOWORD(wParam)-600].MsgCode, - Msg[LOWORD(wParam)-600].wParam, - Msg[LOWORD(wParam)-600].lParam); - break; - } - - switch(LOWORD(wParam)){ - - case 100: - ControlWidth += 10; - break; - - case 101: - ControlWidth -= 10; - break; - - case 102: - ControlHeight += 10; - break; - - case 103: - ControlHeight -= 10; - break; - - case INITPAGE_ID: - BackToInitialPage(); - break; - - case SECONDPAGE_ID: - ForwardToSecondPage(); - break; - - case BACKFIRSTPAGE_ID: - BackToFirstPage(); - break; - - case CREATEWINDOW_ID: - ReadNHide(); - srect.top = CONTROLPOSY + ControlHeight; - hwndEdit = CreateWindow(CONTROLCLASS, - NULL, - ComboStyle | WS_CHILD | WS_VISIBLE, - CONTROLPOSX, - CONTROLPOSY, - ControlWidth, - ControlHeight, - g_hwnd, - NULL, - g_hInst, - NULL); - break; - - case CREATEWINDOWEX_ID: - ReadNHide(); - srect.top = CONTROLPOSY + ControlHeight; - hwndEdit = CreateWindowEx(WS_EX_CLIENTEDGE, - CONTROLCLASS, - NULL, - ComboStyle | WS_CHILD | WS_VISIBLE , - CONTROLPOSX, - CONTROLPOSY, - ControlWidth, - ControlHeight, - g_hwnd, - NULL, - g_hInst, - NULL); - break; - - case CREATEWINDOWW_ID: - ReadNHide(); - srect.top = CONTROLPOSY + ControlHeight; - hwndEdit = CreateWindowExW(WS_EX_CLIENTEDGE, - CONTROLCLASSW, - NULL, - ComboStyle | WS_CHILD | WS_VISIBLE , - CONTROLPOSX, - CONTROLPOSY, - ControlWidth, - ControlHeight, - g_hwnd, - NULL, - g_hInst, - NULL); - break; - } - - if (lParam == (LPARAM)hwndEdit) - switch(HIWORD(wParam)) - { - case CBN_DROPDOWN: - ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect); - PrintTextXY("CBN_DROPDOWN notification",NOTIFYX,NOTIFYY,25,srect); - break; - - case CBN_CLOSEUP: - ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect); - PrintTextXY("CBN_CLOSEUP notification",NOTIFYX,NOTIFYY,24,srect); - break; - - case CBN_DBLCLK: - ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect); - PrintTextXY("CBN_DBLCLK notification",NOTIFYX,NOTIFYY,23,srect); - break; - - case CBN_EDITCHANGE: - ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect); - PrintTextXY("CBN_EDITCHANGE notification",NOTIFYX,NOTIFYY,27,srect); - break; - - case (WORD)CBN_ERRSPACE: - ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect); - PrintTextXY("CBN_ERRSPACE notification",NOTIFYX,NOTIFYY,25,srect); - break; - - case CBN_KILLFOCUS: - ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect); - PrintTextXY("CBN_KILLFOCUS notification",NOTIFYX,NOTIFYY,26,srect); - break; - - case CBN_EDITUPDATE: - ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect); - PrintTextXY("CBN_EDITUPDATE notification",NOTIFYX,NOTIFYY,27,srect); - break; - - case CBN_SELCHANGE: - ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect); - PrintTextXY("CBN_SELCHANGE notification",NOTIFYX,NOTIFYY,26,srect); - break; - - case CBN_SELENDCANCEL: - ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect); - PrintTextXY("CBN_SELENDCANCEL notification",NOTIFYX,NOTIFYY,29,srect); - break; - - case CBN_SETFOCUS: - ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect); - PrintTextXY("CBN_SETFOCUS notification",NOTIFYX,NOTIFYY,25,srect); - break; - - case CBN_SELENDOK: - ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect); - PrintTextXY("CBN_SELENDOK notification",NOTIFYX,NOTIFYY,25,srect); - break; - } - - return DefWindowProc ( hwnd, msg, wParam, lParam ); - - case WM_MEASUREITEM: - ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect); - PrintTextXY("WM_MEASUREITEM called",NOTIFYX,NOTIFYY,21,srect); - break; - - case WM_COMPAREITEM: - ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect); - PrintTextXY("WM_COMPAREITEM called",NOTIFYX,NOTIFYY,21,srect); - break; - - case WM_DRAWITEM: - ScrollWindow (hwnd, 0, SCROLLAMOUNT, &srect, &srect); - PrintTextXY("WM_DRAWITEM called",NOTIFYX,NOTIFYY,18,srect); - break; - - case WM_SIZE : - return 0; - - case WM_CLOSE: - DestroyWindow (g_hwnd); - return 0; - - case WM_QUERYENDSESSION: - return 0; - - case WM_DESTROY: - PostQuitMessage(0); - return 0; - } - return DefWindowProc ( hwnd, msg, wParam, lParam ); - } - - -HWND -RegisterAndCreateWindow (HINSTANCE hInst, - const char* className, - const char* title) - { - WNDCLASSEX wc; - - - g_hInst = hInst; - - wc.cbSize = sizeof (WNDCLASSEX); - - wc.lpfnWndProc = WndProc; /* window procedure */ - wc.hInstance = hInst; /* owner of the class */ - - wc.lpszClassName = className; - wc.hCursor = LoadCursor ( 0, (LPCTSTR)IDC_ARROW ); - wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); - wc.style = CS_HREDRAW | CS_VREDRAW; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hIcon = 0; - wc.hIconSm = 0; - wc.lpszMenuName = 0; - - if ( !RegisterClassEx ( &wc ) ) - return NULL; - - hwnd = CreateWindowEx ( - 0, /* dwStyleEx */ - className, /* class name */ - title, /* window title */ - - WS_OVERLAPPEDWINDOW, /* dwStyle */ - - 1, /* x */ - 1, /* y */ - WINDOWWIDTH, /* width */ - WINDOWHEIGHT, /* height */ - NULL, /* hwndParent */ - NULL, /* hMenu */ - hInst, - 0 - ); - - if (!hwnd) return NULL; - - ShowWindow (hwnd, SW_SHOW); - UpdateWindow (hwnd); - - return hwnd; - } - -int -WINAPI -WinMain ( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdParam, int cmdShow ) - { - char className [] = "ComboBox Control Test"; - MSG msg; - - RegisterAndCreateWindow ( hInst, className, "ComboBox Control Test" ); - - while (GetMessage (&msg, NULL, 0, 0)) - { - TranslateMessage (&msg); - DispatchMessage (&msg); - } - return (int)msg.wParam; - } diff --git a/rostests/tests/combotst/combotst.rbuild b/rostests/tests/combotst/combotst.rbuild deleted file mode 100644 index 12bfec4063f..00000000000 --- a/rostests/tests/combotst/combotst.rbuild +++ /dev/null @@ -1,6 +0,0 @@ - - user32 - gdi32 - combotst.c - utils.c - diff --git a/rostests/tests/combotst/utils.c b/rostests/tests/combotst/utils.c deleted file mode 100644 index 563191e9531..00000000000 --- a/rostests/tests/combotst/utils.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Edit Control Test for ReactOS, quick n' dirty. There you go - * This source code is in the PUBLIC DOMAIN and has NO WARRANTY. - * by Waldo Alvarez Cañizares , June 22, 2003. - */ - -#include - -static const char hexvals[] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}; -VOID htoa (unsigned int val, char *buf) -{ - int i; - buf += 7; - - for (i=0;i<8;i++) - { - *buf-- = hexvals[val & 0x0000000F]; - val = val >> 4; - } -} - - -VOID strcpy_(char *dst, const char *src) -{ - const char* p = src; - while ((*dst++ = *p++)) {} -} - -VOID strcpyw_(wchar_t* dst,wchar_t* src) -{ - const wchar_t* p = src; - while ((*dst++ = *p++)) {} -} diff --git a/rostests/tests/combotst/utils.h b/rostests/tests/combotst/utils.h deleted file mode 100644 index f6a12649c1e..00000000000 --- a/rostests/tests/combotst/utils.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ -VOID htoa (unsigned int, char *); -VOID strcpy_(char *, const char *); -VOID strcpyw_(wchar_t*,wchar_t*); -#ifdef __cplusplus - } -#endif diff --git a/rostests/tests/consume/consume.c b/rostests/tests/consume/consume.c deleted file mode 100644 index 5ff2203dfcb..00000000000 --- a/rostests/tests/consume/consume.c +++ /dev/null @@ -1,31 +0,0 @@ -#include -#include -#include - -#define SIZE (65*1024*1024) - -ULONG x[SIZE / 4096]; - -int main() -{ - int i; - PUCHAR BaseAddress; - - BaseAddress = VirtualAlloc(NULL, - SIZE, - MEM_COMMIT, - PAGE_READONLY); - if (BaseAddress == NULL) - { - printf("Failed to allocate virtual memory"); - return(1); - } - printf("BaseAddress %p\n", BaseAddress); - for (i = 0; i < (SIZE / 4096); i++) - { - printf("%.8x ", i*4096); - x[i] = BaseAddress[i*4096]; - } - - return(0); -} diff --git a/rostests/tests/consume/consume.rbuild b/rostests/tests/consume/consume.rbuild deleted file mode 100644 index f6297999dcd..00000000000 --- a/rostests/tests/consume/consume.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - gdi32 - consume.c - - diff --git a/rostests/tests/copymove/copymove.c b/rostests/tests/copymove/copymove.c deleted file mode 100644 index de7df8560da..00000000000 --- a/rostests/tests/copymove/copymove.c +++ /dev/null @@ -1,303 +0,0 @@ -/* - * CopyFile, MoveFile and related routines test - */ - -#include -#include -#include -#include -#include - -static TCHAR -FindOtherDrive() -{ - DWORD drives = GetLogicalDrives(); - BOOL found = FALSE; - TCHAR drive; - TCHAR rootdir[] = _T( "?:\\" ); - TCHAR currentdir[MAX_PATH + 1]; - - if (0 != GetCurrentDirectory(MAX_PATH + 1, currentdir)) { - for (drive = _T('A'); ! found && drive <= _T('Z'); drive++) { - if (0 != (drives & (1 << (drive - _T('A'))))&& - drive != _totupper(currentdir[0])) { - rootdir[0] = drive; - found = (DRIVE_FIXED == GetDriveType(rootdir)); - } - } - } - - return found ? drive - 1 : _T( ' ' ); -} - -static void -DeleteTestFile(LPCTSTR filename) -{ - SetFileAttributes(filename, FILE_ATTRIBUTE_NORMAL); - DeleteFile(filename); -} - -static void -CreateTestFile(LPCTSTR filename, DWORD attributes) -{ - HANDLE file; - char buffer[4096]; - DWORD wrote; - int c; - - DeleteTestFile(filename); - file = CreateFile(filename, - GENERIC_READ | GENERIC_WRITE, - 0, - NULL, - CREATE_ALWAYS, - 0, - 0); - - if (INVALID_HANDLE_VALUE == file) { - fprintf(stderr, "CreateFile failed with code %lu\n", GetLastError()); - exit(1); - } - for(c = 0; c < sizeof(buffer); c++) { - buffer[c] = (char) c; - } - if (! WriteFile(file, buffer, sizeof(buffer), &wrote, NULL)) { - fprintf(stderr, "WriteFile failed with code %lu\n", GetLastError()); - exit(1); - } - CloseHandle(file); - - if (! SetFileAttributes(filename, attributes)) { - fprintf(stderr, "SetFileAttributes failed with code %lu\n", GetLastError()); - exit(1); - } -} - -static void -DeleteTestDir(LPCTSTR dirname) -{ - RemoveDirectory(dirname); -} - -static void -CreateTestDir(LPCTSTR dirname) -{ - if (! CreateDirectory(dirname, NULL)) { - fprintf(stderr, "CreateDirectory failed with code %lu\n", GetLastError()); - exit(1); - } -} - -static void -CheckTestFile(LPCTSTR filename, DWORD attributes) -{ - HANDLE file; - char buffer[4096]; - DWORD read; - int c; - DWORD diskattr; - - file = CreateFile(filename, - GENERIC_READ, - 0, - NULL, - OPEN_EXISTING, - 0, - 0); - - if (INVALID_HANDLE_VALUE == file) { - fprintf(stderr, "CreateFile failed with code %lu\n", GetLastError()); - exit(1); - } - - if (! ReadFile(file, buffer, sizeof(buffer), &read, NULL)) { - fprintf(stderr, "ReadFile failed with code %lu\n", GetLastError()); - exit(1); - } - if (read != sizeof(buffer)) { - fprintf(stderr, "Trying to read %u bytes but got %lu bytes\n", sizeof(buffer), read); - exit(1); - } - for(c = 0; c < sizeof(buffer); c++) { - if (buffer[c] != (char) c) { - fprintf(stderr, "File contents changed at position %u\n", c); - exit(1); - } - } - - CloseHandle(file); - - diskattr = GetFileAttributes(filename); - if (INVALID_FILE_ATTRIBUTES == diskattr) { - fprintf(stderr, "GetFileAttributes failed with code %lu\n", GetLastError()); - exit(1); - } - if (diskattr != attributes) { - fprintf(stderr, "Attribute mismatch, expected 0x%08lx found 0x%08lx\n", attributes, diskattr); - exit(1); - } -} - -int -main(int argc, char *argv[]) -{ - TCHAR otherdrive; - TCHAR otherfile[ ] = _T("?:\\other.dat"); - - otherdrive = FindOtherDrive(); - - printf("Testing simple move\n"); - CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE); - DeleteTestFile(_T("end.dat")); - if (! MoveFile(_T("begin.dat"), _T("end.dat"))) { - fprintf(stderr, "MoveFile failed with code %lu\n", GetLastError()); - exit(1); - } - CheckTestFile(_T("end.dat"), FILE_ATTRIBUTE_ARCHIVE); - DeleteTestFile(_T("end.dat")); - - printf("Testing move of non-existing file\n"); - DeleteTestFile(_T("begin.dat")); - DeleteTestFile(_T("end.dat")); - if (MoveFile(_T("begin.dat"), _T("end.dat"))) { - fprintf(stderr, "MoveFile succeeded but shouldn't have\n"); - exit(1); - } else if (ERROR_FILE_NOT_FOUND != GetLastError()) { - fprintf(stderr, "MoveFile failed with unexpected code %lu\n", GetLastError()); - exit(1); - } - DeleteTestFile(_T("end.dat")); - -/* Not correctly implemented in ros, destination file is kept open after this */ -#if 0 - printf("Testing move to existing file\n"); - CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE); - CreateTestFile(_T("end.dat"), FILE_ATTRIBUTE_ARCHIVE); - if (MoveFile(_T("begin.dat"), _T("end.dat"))) { - fprintf(stderr, "MoveFile succeeded but shouldn't have\n"); - exit(1); - } else if (ERROR_ALREADY_EXISTS != GetLastError()) { - fprintf(stderr, "MoveFile failed with unexpected code %lu\n", GetLastError()); - exit(1); - } - DeleteTestFile(_T("begin.dat")); - DeleteTestFile(_T("end.dat")); -#endif - -/* Not implemented yet in ros */ -#if 0 - printf("Testing directory move\n"); - CreateTestDir(_T("begin")); - CreateTestFile(_T("begin\\file.dat"), FILE_ATTRIBUTE_NORMAL); - DeleteTestDir(_T("end")); - if (! MoveFile(_T("begin"), _T("end"))) { - fprintf(stderr, "MoveFile failed with code %lu\n", GetLastError()); - exit(1); - } - CheckTestFile(_T("end\\file.dat"), FILE_ATTRIBUTE_NORMAL); - DeleteTestFile(_T("end\\file.dat")); - DeleteTestDir(_T("end")); -#endif - - printf("Testing file move to different directory\n"); - CreateTestFile(_T("file.dat"), FILE_ATTRIBUTE_NORMAL); - CreateTestDir(_T("end")); - if (! MoveFile(_T("file.dat"), _T("end\\file.dat"))) { - fprintf(stderr, "MoveFile failed with code %lu\n", GetLastError()); - exit(1); - } - CheckTestFile(_T("end\\file.dat"), FILE_ATTRIBUTE_ARCHIVE); - DeleteTestFile(_T("end\\file.dat")); - DeleteTestDir(_T("end")); - - printf("Testing move of read-only file\n"); - CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_READONLY); - DeleteTestFile(_T("end.dat")); - if (! MoveFile(_T("begin.dat"), _T("end.dat"))) { - fprintf(stderr, "MoveFile failed with code %lu\n", GetLastError()); - exit(1); - } - CheckTestFile(_T("end.dat"), FILE_ATTRIBUTE_ARCHIVE | FILE_ATTRIBUTE_READONLY); - DeleteTestFile(_T("end.dat")); - - printf("Testing move to different drive\n"); - if (_T(' ') != otherdrive) { - otherfile[0] = otherdrive; - CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE); - DeleteTestFile(otherfile); - if (! MoveFile(_T("begin.dat"), otherfile)) { - fprintf(stderr, "MoveFile failed with code %lu\n", GetLastError()); - exit(1); - } - CheckTestFile(otherfile, FILE_ATTRIBUTE_ARCHIVE); - DeleteTestFile(otherfile); - } else { - printf(" Test skipped, no other drive available\n"); - } - - printf("Testing move/overwrite of existing file\n"); - CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE); - CreateTestFile(_T("end.dat"), FILE_ATTRIBUTE_ARCHIVE); - if (! MoveFileEx(_T("begin.dat"), _T("end.dat"), MOVEFILE_REPLACE_EXISTING)) { - fprintf(stderr, "MoveFileEx failed with code %lu\n", GetLastError()); - exit(1); - } - DeleteTestFile(_T("begin.dat")); - DeleteTestFile(_T("end.dat")); - -/* Not (correctly) implemented in ros yet */ -#if 0 - printf("Testing move/overwrite of existing readonly file\n"); - CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE); - CreateTestFile(_T("end.dat"), FILE_ATTRIBUTE_READONLY); - if (MoveFileEx(_T("begin.dat"), _T("end.dat"), MOVEFILE_REPLACE_EXISTING)) { - fprintf(stderr, "MoveFileEx succeeded but shouldn't have\n"); - exit(1); - } else if (ERROR_ALREADY_EXISTS != GetLastError() && - ERROR_ACCESS_DENIED != GetLastError()) { - fprintf(stderr, "MoveFileEx failed with unexpected code %lu\n", GetLastError()); - exit(1); - } - DeleteTestFile(_T("begin.dat")); - DeleteTestFile(_T("end.dat")); -#endif - -/* Not implemented in ros yet */ -#if 0 - printf("Testing move to different drive without COPY_ALLOWED\n"); - if (_T(' ') != otherdrive) { - otherfile[0] = otherdrive; - CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE); - DeleteTestFile(otherfile); - if (MoveFileEx(_T("begin.dat"), otherfile, 0)) { - fprintf(stderr, "MoveFileEx succeeded but shouldn't have\n"); - exit(1); - } else if (ERROR_NOT_SAME_DEVICE != GetLastError()) { - fprintf(stderr, "MoveFileEx failed with unexpected code %lu\n", GetLastError()); - exit(1); - } - DeleteTestFile(otherfile); - } else { - printf(" Test skipped, no other drive available\n"); - } -#endif - - printf("Testing move to different drive with COPY_ALLOWED\n"); - if (_T(' ') != otherdrive) { - otherfile[0] = otherdrive; - CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE); - DeleteTestFile(otherfile); - if (! MoveFileEx(_T("begin.dat"), otherfile, MOVEFILE_COPY_ALLOWED)) { - fprintf(stderr, "MoveFileEx failed with code %lu\n", GetLastError()); - exit(1); - } - CheckTestFile(otherfile, FILE_ATTRIBUTE_ARCHIVE); - DeleteTestFile(otherfile); - } else { - printf(" Test skipped, no other drive available\n"); - } - - printf("All tests successfully completed\n"); - - return 0; -} diff --git a/rostests/tests/copymove/copymove.rbuild b/rostests/tests/copymove/copymove.rbuild deleted file mode 100644 index 198255ec035..00000000000 --- a/rostests/tests/copymove/copymove.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - copymove.c - diff --git a/rostests/tests/count/count.c b/rostests/tests/count/count.c deleted file mode 100644 index f1295691e7f..00000000000 --- a/rostests/tests/count/count.c +++ /dev/null @@ -1,15 +0,0 @@ -/* $Id$ - * - */ -#include - -int n = 0; - -int -main (int argc, char * argv []) -{ - while (1) printf ("%d ", n ++ ); - return (0); -} - -/* EOF */ diff --git a/rostests/tests/count/count.rbuild b/rostests/tests/count/count.rbuild deleted file mode 100644 index 18fe6f29647..00000000000 --- a/rostests/tests/count/count.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - count.c - diff --git a/rostests/tests/create-links/create-links.c b/rostests/tests/create-links/create-links.c deleted file mode 100644 index a2b4ce0523a..00000000000 --- a/rostests/tests/create-links/create-links.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - - compile via: - gcc -o create-links -D_WIN32_IE=0x400 create-links.c -lole32 -luuid -lshell32 -lshlwapi - - Martin Fuchs, 27.12.2003 - -*/ - -#define WIN32_LEAN_AND_MEAN -#include - -#include -#include -#include - -#include - -HRESULT CreateShellLink(LPCSTR linkPath, LPCSTR cmd, LPCSTR arg, LPCSTR dir, LPCSTR iconPath, int icon_nr, LPCSTR comment) -{ - IShellLinkA* psl; - IPersistFile* ppf; - WCHAR buffer[MAX_PATH]; - - HRESULT hr = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLink, (LPVOID*)&psl); - - printf("creating shortcut file '%s' to %s...\n", linkPath, cmd); - - if (SUCCEEDED(hr)) { - hr = psl->lpVtbl->SetPath(psl, cmd); - - if (arg) - hr = psl->lpVtbl->SetArguments(psl, arg); - - if (dir) - hr = psl->lpVtbl->SetWorkingDirectory(psl, dir); - - if (iconPath) - hr = psl->lpVtbl->SetIconLocation(psl, iconPath, icon_nr); - - if (comment) - hr = psl->lpVtbl->SetDescription(psl, comment); - - hr = psl->lpVtbl->QueryInterface(psl, &IID_IPersistFile, (LPVOID*)&ppf); - - if (SUCCEEDED(hr)) { - MultiByteToWideChar(CP_ACP, 0, linkPath, -1, buffer, MAX_PATH); - - hr = ppf->lpVtbl->Save(ppf, buffer, TRUE); - - ppf->lpVtbl->Release(ppf); - } - - psl->lpVtbl->Release(psl); - } - - if (SUCCEEDED(hr)) - printf("OK\n\n"); - else - printf("error %08x\n\n", (int) hr); - - return hr; -} - - -int main() -{ - char path[MAX_PATH]; - LPSTR p; - - CoInitialize(NULL); - - /* create some shortcuts in the start menu "programs" folder */ - SHGetSpecialFolderPathA(0, path, CSIDL_PROGRAMS, TRUE); - p = PathAddBackslash(path); - - strcpy(p, "start-cmd.lnk"); - CreateShellLink(path, "cmd.exe", "", NULL, NULL, 0, "open console window"); - - strcpy(p, "start-winhello.lnk"); - CreateShellLink(path, "winhello.exe", "", NULL, NULL, 0, "launch winhello"); - - - /* create some shortcuts on the desktop */ - SHGetSpecialFolderPathA(0, path, CSIDL_DESKTOP, TRUE); - p = PathAddBackslash(path); - - strcpy(p, "start-wcmd.lnk"); - CreateShellLink(path, "cmd.exe", "", NULL, NULL, 0, "open console window"); - - strcpy(p, "start-winemine.lnk"); - CreateShellLink(path, "winemine.exe", "", NULL, NULL, 0, "launch winemine"); - - CoUninitialize(); - - return 0; -} diff --git a/rostests/tests/create-links/create-links.rbuild b/rostests/tests/create-links/create-links.rbuild deleted file mode 100644 index 5693bddd372..00000000000 --- a/rostests/tests/create-links/create-links.rbuild +++ /dev/null @@ -1,8 +0,0 @@ - - gdi32 - ole32 - uuid - shell32 - shlwapi - create-links.c - diff --git a/rostests/tests/dirdlg/dirdlg.c b/rostests/tests/dirdlg/dirdlg.c deleted file mode 100644 index 932a0988cf7..00000000000 --- a/rostests/tests/dirdlg/dirdlg.c +++ /dev/null @@ -1,115 +0,0 @@ -#include -#include -#include -#include -#include "resource.h" - -static char selected[MAX_PATH + 1]; - -INT_PTR -CALLBACK -DlgMainProc( - HWND hwndDlg, - UINT uMsg, - WPARAM wParam, - LPARAM lParam -) -{ - char dir[MAX_PATH + 1]; - - switch(uMsg) - { - case WM_COMMAND: - { - switch(HIWORD(wParam)) - { - case LBN_DBLCLK: - { - switch(LOWORD(wParam)) - { - case IDC_DIRS: - { - if(DlgDirSelectEx(hwndDlg, dir, MAX_PATH, IDC_DIRS)) - { - chdir(dir); - GetCurrentDirectory(MAX_PATH, dir); - DlgDirList(hwndDlg, dir, IDC_DIRS, IDC_DIREDIT, DDL_DIRECTORY | DDL_DRIVES); - } - else - { - SendMessage(hwndDlg, WM_COMMAND, MAKEWPARAM(IDC_OK, 0), 0); - } - break; - } - } - break; - } - default: - { - switch(LOWORD(wParam)) - { - case IDC_OK: - { - char file[MAX_PATH + 1]; - int len; - - if(!DlgDirSelectEx(hwndDlg, file, MAX_PATH, IDC_DIRS)) - { - GetCurrentDirectory(MAX_PATH, selected); - len = strlen(selected); - if(strlen(file)) - { - if(selected[len - 1] != '\\') - { - lstrcat(selected, "\\"); - } - lstrcat(selected, file); - EndDialog(hwndDlg, IDC_OK); - } - } - break; - } - case IDC_CANCEL: - { - EndDialog(hwndDlg, IDC_CANCEL); - break; - } - } - break; - } - } - break; - } - case WM_INITDIALOG: - { - SendDlgItemMessage(hwndDlg, IDC_DIRS, LB_SETCOLUMNWIDTH, 150, 0); - GetCurrentDirectory(MAX_PATH, dir); - DlgDirList(hwndDlg, dir, IDC_DIRS, IDC_DIREDIT, DDL_DIRECTORY | DDL_DRIVES); - SetFocus(GetDlgItem(hwndDlg, IDC_DIRS)); - break; - } - case WM_CLOSE: - { - EndDialog(hwndDlg, IDC_CANCEL); - return TRUE; - } - } - return FALSE; -} - -int WINAPI -WinMain( - HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpszCmdLine, - int nCmdShow) -{ - char str[MAX_PATH + 32]; - if(DialogBox(hInstance, MAKEINTRESOURCE(IDD_MAIN), 0, DlgMainProc) == IDC_OK) - { - sprintf(str, "You selected \"%s\"", selected); - MessageBox(0, str, "Selected file", MB_ICONINFORMATION); - } - return 0; -} - diff --git a/rostests/tests/dirdlg/dirdlg.rbuild b/rostests/tests/dirdlg/dirdlg.rbuild deleted file mode 100644 index b305100eaf2..00000000000 --- a/rostests/tests/dirdlg/dirdlg.rbuild +++ /dev/null @@ -1,11 +0,0 @@ - - . - - - _chdir - - user32 - gdi32 - dirdlg.c - dirdlg.rc - diff --git a/rostests/tests/dirdlg/dirdlg.rc b/rostests/tests/dirdlg/dirdlg.rc deleted file mode 100644 index bd48b635794..00000000000 --- a/rostests/tests/dirdlg/dirdlg.rc +++ /dev/null @@ -1,13 +0,0 @@ -#include -#include "resource.h" - -IDD_MAIN DIALOG DISCARDABLE 20, 20, 220, 140 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -FONT 8, "MS Sans Serif" -CAPTION "Select a file" -BEGIN - EDITTEXT IDC_DIREDIT, 5, 5, 210, 13, ES_READONLY | ES_LEFT | WS_CHILD | WS_VISIBLE | WS_TABSTOP - LISTBOX IDC_DIRS, 5, 23, 210, 92, LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL - PUSHBUTTON "&OK", IDC_OK, 60, 120, 40, 15, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "&Cancel", IDC_CANCEL, 120, 120, 40, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP -END diff --git a/rostests/tests/dirdlg/resource.h b/rostests/tests/dirdlg/resource.h deleted file mode 100644 index 7a1063b932e..00000000000 --- a/rostests/tests/dirdlg/resource.h +++ /dev/null @@ -1,6 +0,0 @@ -#define IDD_MAIN 101 - -#define IDC_OK 1 -#define IDC_CANCEL 2 -#define IDC_DIRS 100 -#define IDC_DIREDIT 101 diff --git a/rostests/tests/directory.rbuild b/rostests/tests/directory.rbuild deleted file mode 100644 index d3b7849f510..00000000000 --- a/rostests/tests/directory.rbuild +++ /dev/null @@ -1,271 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rostests/tests/diskspeed/diskspeed.c b/rostests/tests/diskspeed/diskspeed.c deleted file mode 100644 index acb83c8d386..00000000000 --- a/rostests/tests/diskspeed/diskspeed.c +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (C) 2004 ReactOS Team - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS diskspeed.exe - * FILE: apps/tests/diskspeed/diskspeed.c - * PURPOSE: Determines disk transfer rates - * PROGRAMMER: - */ - -#include -#include -#define WIN32_NO_STATUS -#include -#define NTOS_MODE_USER -#include - -#define _NTSCSI_USER_MODE_ -#include -#include - -BOOL GetInquiryData(HANDLE hDevice, PINQUIRYDATA InquiryData) -{ - BOOL Result; - DWORD dwReturned; - SCSI_ADDRESS ScsiAddress; - PSCSI_ADAPTER_BUS_INFO AdapterInfo; - PSCSI_INQUIRY_DATA InquiryBuffer; - BYTE Buffer[4096]; - int i; - - Result = DeviceIoControl(hDevice, - IOCTL_SCSI_GET_ADDRESS, - NULL, - 0, - &ScsiAddress, - sizeof(ScsiAddress), - &dwReturned, - FALSE); - if (Result == FALSE) - { - return FALSE; - } - Result = DeviceIoControl(hDevice, - IOCTL_SCSI_GET_INQUIRY_DATA, - NULL, - 0, - Buffer, - sizeof(Buffer), - &dwReturned, - FALSE); - if (Result) - { - AdapterInfo = (PSCSI_ADAPTER_BUS_INFO)Buffer; - for (i = 0; i < AdapterInfo->NumberOfBuses; i++) - { - InquiryBuffer = (PSCSI_INQUIRY_DATA) (Buffer + AdapterInfo->BusData[i].InquiryDataOffset); - if (AdapterInfo->BusData[i].InquiryDataOffset) - { - while (1) - { - if (InquiryBuffer->PathId == ScsiAddress.PathId && - InquiryBuffer->TargetId == ScsiAddress.TargetId && - InquiryBuffer->Lun == ScsiAddress.Lun) - { - memcpy(InquiryData, InquiryBuffer->InquiryData, sizeof(INQUIRYDATA)); - return TRUE; - } - if (InquiryBuffer->NextInquiryDataOffset == 0) - { - break; - } - InquiryBuffer = (PSCSI_INQUIRY_DATA) (Buffer + InquiryBuffer->NextInquiryDataOffset); - } - } - } - } - return FALSE; -} - - - -int main(void) -{ - HANDLE hDevice; - OVERLAPPED ov; - - PBYTE Buffer = NULL ; - DWORD Start; - DWORD dwReturned; - DWORD dwReadTotal; - DWORD Size; - BOOL Result; - ULONG Drive; - CHAR Name[20]; - - INQUIRYDATA InquiryData; - - - Drive = 0; - while (1) - { - sprintf(Name, "\\\\.\\PHYSICALDRIVE%ld", Drive); - hDevice = CreateFile(Name, - GENERIC_READ, - FILE_SHARE_READ, - NULL, - OPEN_EXISTING, - 0, - NULL); - if (hDevice == INVALID_HANDLE_VALUE) - { - if (Drive > 0) - { - VirtualFree(Buffer, 512 * 1024, MEM_RELEASE); - } - else - { - printf("Cannot open '%s'\n", Name); - } - break; - } - if (Drive == 0) - { - printf("Transfer Size (kB) 1 2 4 8 16 32 64 128 256\n"); - printf("Transfer Rate (MB/s)\n"); - printf("-------------------------------------------------------------------------------\n"); - - Buffer = VirtualAlloc(NULL, 512 * 1024, MEM_COMMIT, PAGE_READWRITE); - } - Result = GetInquiryData(hDevice, &InquiryData); - if (Result) - { - printf("%.24s ", InquiryData.VendorId); - } - else - { - printf("Disk %ld ", Drive + 1); - } - Size = 1024; - memset(&ov, 0, sizeof(OVERLAPPED)); - while (Size <= 256 * 1024) - { - memset(Buffer, 0, Size); - dwReadTotal = 0; - - Start = GetTickCount() + 2000; - while (Start > GetTickCount()) - { - Result = ReadFile(hDevice, Buffer, Size, &dwReturned, &ov); - if (Result) - { - dwReadTotal += dwReturned; - ov.Offset += dwReturned; - } - } - dwReadTotal /= 2048; - printf("%3ld.%ld ", dwReadTotal / 1024, (dwReadTotal % 1024) * 10 / 1024); - Size *= 2; - } - printf("\n"); - CloseHandle(hDevice); - Drive++; - } - printf("\n"); - - - return 0; -} diff --git a/rostests/tests/diskspeed/diskspeed.rbuild b/rostests/tests/diskspeed/diskspeed.rbuild deleted file mode 100644 index 59367b61b1d..00000000000 --- a/rostests/tests/diskspeed/diskspeed.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - diskspeed.c - diff --git a/rostests/tests/dnsapi/dnsapi.c b/rostests/tests/dnsapi/dnsapi.c deleted file mode 100644 index e82dbd35a80..00000000000 --- a/rostests/tests/dnsapi/dnsapi.c +++ /dev/null @@ -1,33 +0,0 @@ -#include -#include -#include -#include -#include -#include - -int main( int argc, char **argv ) { - PDNS_RECORD QueryReply, AddrResponse; - DWORD Addr; - - assert (DnsValidateName( "||||", DnsNameDomain ) == DNS_ERROR_INVALID_NAME_CHAR); - assert (DnsValidateName( "a.b.c", DnsNameDomainLabel ) == DNS_ERROR_INVALID_NAME); - assert (DnsValidateName( "1234", DnsNameDomainLabel ) == ERROR_SUCCESS); - assert (DnsValidateName( "fubar", DnsNameDomain ) == ERROR_SUCCESS); - assert (DnsQuery ("www.reactos.com", DNS_TYPE_A, DNS_QUERY_STANDARD, - NULL, &QueryReply, NULL) == ERROR_SUCCESS); - AddrResponse = QueryReply; - while( AddrResponse ) { - if( AddrResponse->wType == DNS_TYPE_A ) { - Addr = ntohl( AddrResponse->Data.A.IpAddress ); - printf( "www.reactos.com == %d.%d.%d.%d\n", - (int)(Addr >> 24) & 0xff, - (int)(Addr >> 16) & 0xff, - (int)(Addr >> 8) & 0xff, - (int)Addr & 0xff ); - } - AddrResponse = AddrResponse->pNext; - } - DnsRecordListFree( QueryReply, DnsFreeRecordList ); - - return 0; -} diff --git a/rostests/tests/dnsapi/dnsapi.rbuild b/rostests/tests/dnsapi/dnsapi.rbuild deleted file mode 100644 index 05a6ca1a8c7..00000000000 --- a/rostests/tests/dnsapi/dnsapi.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - dnsapi - ws2_32 - dnsapi.c - diff --git a/rostests/tests/dnsquery/dnsquery.c b/rostests/tests/dnsquery/dnsquery.c deleted file mode 100644 index 7ceaaf3ee5f..00000000000 --- a/rostests/tests/dnsquery/dnsquery.c +++ /dev/null @@ -1,28 +0,0 @@ -#include -#include -#include -#include -#include - -int main( int argc, char **argv ) { - PDNS_RECORD QueryReply, AddrResponse; - DWORD Addr; - - assert (DnsQuery ("www.reactos.com", DNS_TYPE_A, DNS_QUERY_STANDARD, - NULL, &QueryReply, NULL) == ERROR_SUCCESS); - AddrResponse = QueryReply; - while( AddrResponse ) { - if( AddrResponse->wType == DNS_TYPE_A ) { - Addr = ntohl( AddrResponse->Data.A.IpAddress ); - printf( "www.reactos.com == %d.%d.%d.%d\n", - (int)(Addr >> 24) & 0xff, - (int)(Addr >> 16) & 0xff, - (int)(Addr >> 8) & 0xff, - (int)Addr & 0xff ); - } - AddrResponse = AddrResponse->pNext; - } - DnsRecordListFree( QueryReply, DnsFreeRecordList ); - - return 0; -} diff --git a/rostests/tests/dnsquery/dnsquery.rbuild b/rostests/tests/dnsquery/dnsquery.rbuild deleted file mode 100644 index 2f209b31e25..00000000000 --- a/rostests/tests/dnsquery/dnsquery.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - dnsapi - ws2_32 - dnsquery.c - diff --git a/rostests/tests/edit/edit.rbuild b/rostests/tests/edit/edit.rbuild deleted file mode 100644 index 4c257e5bfd3..00000000000 --- a/rostests/tests/edit/edit.rbuild +++ /dev/null @@ -1,6 +0,0 @@ - - user32 - gdi32 - edittest.c - utils.c - diff --git a/rostests/tests/edit/edittest.c b/rostests/tests/edit/edittest.c deleted file mode 100644 index 75a2e676fdd..00000000000 --- a/rostests/tests/edit/edittest.c +++ /dev/null @@ -1,649 +0,0 @@ -/* Edit Control Test for ReactOS, quick n' dirty. Very rigid too. - * There you go, is only a test program. Not made to be fast, small - * easy to mantain, or portable. Lots of duplicated code too. - - * I'm not erasing text because I don't want to use other functions from th API - * or make this more complex. - - * This source code is in the PUBLIC DOMAIN and has NO WARRANTY. - * by Waldo Alvarez Cañizares , June 22, 2003. */ - -//#define WIN32_LEAN_AND_MEAN -#include -#include "utils.h" - -#define CREATEWINDOW 106 -#define CREATEWINDOWEX 107 -#define CREATEWINDOWW 108 - -#define ResultX 0 -#define ResultY 305 - -#define NOTIFYX 350 -#define NOTIFYY 285 - -#define BUFFERLEN 80 /* Size of buffer to hold result strings */ - -/* Edit is created with this text */ -#define TestStr "The quick brown fox jumps over the lazy dog" - -#define TestStrW L"This is a WCHAR string" /* Wide to support unicode edits */ - -#define MAXMESSAGEBUTTONS 42 - -HWND g_hwnd = NULL; -HINSTANCE g_hInst = NULL; - -int pos = 10; -int n = 0; -int yButPos = 10; -int xButPos = 10; - -DWORD EditStyle = 0; -DWORD EditWidth = 240; -DWORD EditHeight = 250; - -BOOL UnicodeUsed = FALSE; - -HWND hwndEdit = NULL; - -POINTL point={10,3}; -RECT rect = {0,0,20,20},rect2; -DWORD StartP,EndP; - -#define ReplaceTextStr "->> Replaced!! <<-" - -char* AllocatedText; /* Buffer in the heap to feed it to the edit control */ -char* NewText = "New text for the edit control"; -wchar_t* NewTextW = L"New text for the edit control in UNICODE"; // Wide - -char TextBuffer[BUFFERLEN]={'R','e','s','u','l','t',':',' '}; - -typedef void FunctionHandler(HWND,DWORD,WPARAM,LPARAM); -typedef FunctionHandler* LPFUNCTIONHANDLER; - -VOID -PrintTextXY(char* Text,int x,int y,int len) -{ - HDC hdc; - hdc = GetDC (g_hwnd); - SelectObject (hdc, GetStockObject (SYSTEM_FIXED_FONT)); - - TextOut (hdc, x,y,Text,len); - ReleaseDC (g_hwnd, hdc); - ValidateRect (g_hwnd, &rect); -} - -static -VOID -HandlePrintReturnHex(HWND handle,DWORD Msg,WPARAM wParam,LPARAM lParam) - { - int ret; - ret = SendMessage(handle,Msg,wParam,lParam); - htoa(ret,&TextBuffer[8]); - PrintTextXY(TextBuffer,ResultX,ResultY,16); - } - -static -VOID -HandleSetHandlePrintHex(HWND handle,DWORD Msg,WPARAM wParam,LPARAM lParam) - { - LPVOID pMem; - HANDLE hNewBuffer; - int ret; - - LocalFree((HLOCAL)SendMessage(handle, EM_GETHANDLE, 0, 0L)); - if (UnicodeUsed) - { - hNewBuffer = LocalAlloc(LMEM_MOVEABLE | LMEM_ZEROINIT, 100); - pMem = LocalLock(hNewBuffer); - strcpyw_((wchar_t*)pMem,NewTextW); - } - else - { - hNewBuffer = LocalAlloc(LMEM_MOVEABLE | LMEM_ZEROINIT,50); - pMem = LocalLock(hNewBuffer); - strcpy_((char*)pMem,NewText); - } - - LocalUnlock(pMem); - hNewBuffer = LocalHandle(pMem); - - /* Updates the buffer and displays new buffer */ - ret = SendMessage(handle, EM_SETHANDLE, (WPARAM)hNewBuffer, 0L); - - htoa(ret,&TextBuffer[8]); - PrintTextXY(TextBuffer,ResultX,ResultY,16); - } - -static -VOID -HandlePrintReturnStr(HWND handle,DWORD Msg,WPARAM wParam,LPARAM lParam) - { - int ret; - TextBuffer[8] = (char)(BUFFERLEN - 8); /* Setting the max size to put chars in first byte */ - ret = SendMessage(handle,Msg,wParam,lParam); - PrintTextXY(TextBuffer,ResultX,ResultY,8+ret); - } - -static -VOID -HandlePrintRect(HWND handle,DWORD Msg,WPARAM wParam,LPARAM lParam) - { - TextBuffer[8] = (char)(BUFFERLEN - 8); /* Setting the max size to put chars in first byte */ - SendMessage(handle,Msg,wParam,lParam); - - htoa(rect.top,&TextBuffer[8]); - TextBuffer[8+8] = ' '; - htoa(rect.bottom,&TextBuffer[8+8+1]); - TextBuffer[8+8+8+1] = ' '; - htoa(rect.left,&TextBuffer[8+8+8+1+1]); - TextBuffer[8+8+8+8+1+1] = ' '; - htoa(rect.right,&TextBuffer[8+8+8+8+1+1+1]); - - PrintTextXY(TextBuffer,ResultX,ResultY,8+4*9-1); - } - -static -VOID -HandlePrintPasswdChar(HWND handle,DWORD Msg,WPARAM wParam,LPARAM lParam) - { - HDC hdc; - int ret = SendMessage(handle,Msg,wParam,lParam); - - int s; - - if (ret) - { - s = 1; - TextBuffer[8] = (char)(ret); - } - else - { - TextBuffer[8] = 'N'; - TextBuffer[9] = 'U'; - TextBuffer[10] = 'L'; - TextBuffer[11] = 'L'; - s = 4; - } - - hdc = GetDC (g_hwnd); - SelectObject (hdc, GetStockObject (SYSTEM_FIXED_FONT)); - - TextOut (hdc,ResultX ,ResultY,TextBuffer,8+s); - ReleaseDC (g_hwnd, hdc); - ValidateRect (g_hwnd, &rect); - } - - -struct -{ - char* Text; /* Text for the button */ - DWORD MsgCode; /* Message Code */ - WPARAM wParam; /* Well hope you can understand this */ - LPARAM lParam; /* ditto */ - LPFUNCTIONHANDLER Handler; /* Funtion called to handle the result of each message */ -} -Msg[] = -{ - {"EM_CANUNDO",EM_CANUNDO,0,0,&HandlePrintReturnHex}, - {"EM_CHARFROMPOS",EM_CHARFROMPOS,(WPARAM)&point,0,&HandlePrintReturnHex}, - {"EM_EMPTYUNDOBUFFER",EM_EMPTYUNDOBUFFER,0,0,&HandlePrintReturnHex}, - {"EM_FMTLINES",EM_FMTLINES,TRUE,0,&HandlePrintReturnHex}, - {"EM_GETFIRSTVISIBLELINE",EM_GETFIRSTVISIBLELINE,0,0,&HandlePrintReturnHex}, - - {"EM_GETLIMITTEXT",EM_GETLIMITTEXT,0,0,&HandlePrintReturnHex}, - {"EM_GETLINE",EM_GETLINE,2,(WPARAM)&TextBuffer[8],&HandlePrintReturnStr}, - {"EM_GETLINECOUNT",EM_GETLINECOUNT,0,0,&HandlePrintReturnHex}, - {"EM_GETMARGINS",EM_GETMARGINS,0,0,&HandlePrintReturnHex}, - {"EM_SETMARGINS",EM_SETMARGINS,EC_LEFTMARGIN,10,&HandlePrintReturnHex}, - - {"EM_GETMODIFY",EM_GETMODIFY,0,0,&HandlePrintReturnHex}, - {"EM_SETMODIFY",EM_SETMODIFY,TRUE,0,&HandlePrintReturnHex}, - - {"EM_GETSEL",EM_GETSEL,(WPARAM)&StartP,(LPARAM)&EndP,&HandlePrintReturnHex}, - - {"EM_GETTHUMB",EM_GETTHUMB,0,0,&HandlePrintReturnHex}, - - {"EM_LIMITTEXT",EM_LIMITTEXT,10,0,&HandlePrintReturnHex}, - {"EM_LINEFROMCHAR",EM_LINEFROMCHAR,-1,0,&HandlePrintReturnHex}, - {"EM_POSFROMCHAR",EM_POSFROMCHAR,10,0,&HandlePrintReturnHex}, - {"EM_LINEINDEX",EM_LINEINDEX,2,0,&HandlePrintReturnHex}, - {"EM_LINELENGTH",EM_LINELENGTH,-1,0,&HandlePrintReturnHex}, - - {"EM_GETWORDBREAKPROC",EM_GETWORDBREAKPROC,0,0,&HandlePrintReturnHex}, - {"EM_REPLACESEL",EM_REPLACESEL,TRUE,(LPARAM)&ReplaceTextStr,&HandlePrintReturnHex}, - - {"EM_LINESCROLL",EM_LINESCROLL,5,1,&HandlePrintReturnHex}, - {"EM_SCROLL",EM_SCROLL,SB_LINEDOWN,0,&HandlePrintReturnHex}, - {"EM_SCROLLCARET",EM_SCROLLCARET,0,0,&HandlePrintReturnHex}, - - {"EM_SETHANDLE",EM_SETHANDLE,0,0,&HandleSetHandlePrintHex}, - {"EM_GETHANDLE",EM_GETHANDLE,0,0,&HandlePrintReturnHex}, - {"EM_GETPASSWORDCHAR",EM_GETPASSWORDCHAR,0,0,&HandlePrintPasswdChar}, - {"EM_SETPASSWORDCHAR - clear",EM_SETPASSWORDCHAR,0,0,&HandlePrintReturnHex}, - {"EM_SETPASSWORDCHAR - x",EM_SETPASSWORDCHAR,'x',0,&HandlePrintReturnHex}, - - {"EM_SETREADONLY - set",EM_SETREADONLY,TRUE,0,&HandlePrintReturnHex}, - {"EM_SETREADONLY - clear",EM_SETREADONLY,FALSE,0,&HandlePrintReturnHex}, - - {"EM_GETRECT",EM_GETRECT,0,(LPARAM)&rect2,&HandlePrintRect}, - {"EM_SETRECT",EM_SETRECT,0,(LPARAM)&rect,&HandlePrintReturnHex}, - {"EM_SETRECTNP",EM_SETRECTNP,0,(LPARAM)&rect,&HandlePrintReturnHex}, - {"EM_SETSEL",EM_SETSEL,1,3,&HandlePrintReturnHex}, - - {"EM_SETSEL - all",EM_SETSEL,0,-1,&HandlePrintReturnHex}, - {"EM_SETSEL - remove",EM_SETSEL,-1,0,&HandlePrintReturnHex}, - {"EM_UNDO",EM_UNDO,0,0,&HandlePrintReturnHex}, - {"WM_UNDO",WM_UNDO,0,0,&HandlePrintReturnHex}, - {"WM_PASTE",WM_PASTE,0,0,&HandlePrintReturnHex}, - - {"WM_CUT",WM_CUT,0,0,&HandlePrintReturnHex}, - {"WM_COPY",WM_COPY,0,0,&HandlePrintReturnHex} - -}; - -DWORD EditStyles[] = { - WS_THICKFRAME,WS_DISABLED,WS_BORDER,ES_LOWERCASE,ES_UPPERCASE,ES_NUMBER,ES_AUTOVSCROLL, - ES_AUTOHSCROLL,ES_LEFT,ES_CENTER,ES_RIGHT,ES_MULTILINE, - ES_NOHIDESEL,ES_OEMCONVERT,ES_PASSWORD,ES_READONLY,ES_WANTRETURN, - WS_HSCROLL,WS_VSCROLL - }; - -char* StyleNames[] = { - "WS_THICKFRAME","WS_DISABLED","WS_BORDER","ES_LOWERCASE","ES_UPPERCASE","ES_NUMBER","ES_AUTOVSCROLL", - "ES_AUTOHSCROLL","ES_LEFT","ES_CENTER","ES_RIGHT","ES_MULTILINE", - "ES_NOHIDESEL","ES_OEMCONVERT","ES_PASSWORD","ES_READONLY","ES_WANTRETURN", - "WS_HSCROLL","WS_VSCROLL" - }; - -#define NUMBERBUTTONS 26 -HWND Buttons[NUMBERBUTTONS]; -HWND MessageButtons[MAXMESSAGEBUTTONS]; -HWND Back1But,Back2But; -HWND NextBut; - - -HWND -CreateCheckButton(const char* lpWindowName, DWORD xSize, DWORD id) - { - HWND h; - h = CreateWindowEx(0, - "BUTTON", - lpWindowName, - WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, - xButPos, /* x */ - yButPos, /* y */ - xSize, /* nWidth */ - 20, /* nHeight */ - g_hwnd, - UlongToHandle(id), - g_hInst, - NULL - ); - yButPos += 21; - return h; - } - -HWND -CreatePushButton(const char* lpWindowName, DWORD xSize, DWORD id,DWORD Style) - { - - HWND h = CreateWindow("BUTTON", - lpWindowName, - WS_CHILD | BS_PUSHBUTTON | Style, - xButPos, // x - yButPos, // y - xSize, // nWidth - 20, // nHeight - g_hwnd, - (HMENU)(ULONG_PTR) id, - g_hInst, - NULL - ); - - yButPos += 21; - return h; - } - -VOID -ReadNHide() - { - int i; - EditStyle = 0; - for (i=0 ; i< 19 ; i++) - { - if(BST_CHECKED == SendMessage(Buttons[i],BM_GETCHECK,0,0)) - EditStyle |= EditStyles[i]; - ShowWindow(Buttons[i],SW_HIDE); - } - - for (; i< NUMBERBUTTONS ; i++)ShowWindow(Buttons[i],SW_HIDE); - for (i=0 ; i< 26 ; i++) ShowWindow(MessageButtons[i],SW_SHOW); - - ShowWindow(Back1But,SW_SHOW); - ShowWindow(NextBut,SW_SHOW); - } - -VOID -ForwardToSecondPage() - { - int i; - for (i=0;i<26;i++)ShowWindow(MessageButtons[i],SW_HIDE); - for(;i= 600) - { - Msg[LOWORD(wParam)-600].Handler(hwndEdit, - Msg[LOWORD(wParam)-600].MsgCode, - Msg[LOWORD(wParam)-600].wParam, - Msg[LOWORD(wParam)-600].lParam); - break; - } - - switch(LOWORD(wParam)){ - - case 100: - EditWidth += 10; - break; - - case 101: - EditWidth -= 10; - break; - - case 102: - EditHeight += 10; - break; - - case 103: - EditHeight -= 10; - break; - - case 400: - BackToInitialPage(); - break; - - case 401: - ForwardToSecondPage(); - break; - - case 402: - BackToFirstPage(); - break; - - case CREATEWINDOW: - UnicodeUsed = FALSE; - ReadNHide(); - hwndEdit = CreateWindow("EDIT", - TestStr, - EditStyle | WS_CHILD | WS_VISIBLE, - 350, - 10, - EditWidth, - EditHeight, - g_hwnd, - NULL, - g_hInst, - NULL); - break; - - case CREATEWINDOWEX: - UnicodeUsed = FALSE; - ReadNHide(); - hwndEdit = CreateWindowEx(WS_EX_CLIENTEDGE, - "EDIT", - TestStr, - EditStyle | WS_CHILD | WS_VISIBLE , - 350, - 10, - EditWidth, - EditHeight, - g_hwnd, - NULL, - g_hInst, - NULL); - break; - - case CREATEWINDOWW: - UnicodeUsed = TRUE; - ReadNHide(); - hwndEdit = CreateWindowExW(WS_EX_CLIENTEDGE, - L"EDIT", - TestStrW, - EditStyle | WS_CHILD | WS_VISIBLE , - 350, - 10, - EditWidth, - EditHeight, - g_hwnd, - NULL, - g_hInst, - NULL); - break; - } - - if (lParam == (LPARAM)hwndEdit) - switch(HIWORD(wParam)) - { - case EN_CHANGE: - PrintTextXY("EN_CHANGE notification",NOTIFYX,NOTIFYY,22); - break; - - case EN_ERRSPACE: - PrintTextXY("EN_ERRSPACE notification",NOTIFYX,NOTIFYY,24); - break; - - /* --- FIXME not defined in w32api-2.3 headers - case H_SCROLL: - PrintTextXY("H_SCROLL notification",NOTIFYX,NOTIFYY,21); - break; */ - - /* --- FIXME not defined in w32api-2.3 headers - case KILL_FOCUS: - PrintTextXY("KILL_FOCUS notification",NOTIFYX,NOTIFYY,23); - break; */ - - /* --- FIXME not defined in w32api-2.3 headers - case EN_MAXTEST: - PrintTextXY("EN_MAXTEXT notification",NOTIFYX,NOTIFYY,23); - break; */ - - case EN_SETFOCUS: - PrintTextXY("EN_SETFOCUS notification",NOTIFYX,NOTIFYY,24); - break; - - case EN_UPDATE: - PrintTextXY("EN_UPDATE notification",NOTIFYX,NOTIFYY + 20,22); - break; - - case EN_VSCROLL: - PrintTextXY("EN_VSCROLL notification",NOTIFYX,NOTIFYY,23); - break; - - } - - break; - - case WM_SIZE : - return 0; - - case WM_CLOSE: - DestroyWindow (g_hwnd); - return 0; - - case WM_QUERYENDSESSION: - return 0; - - case WM_DESTROY: - PostQuitMessage(0); - return 0; - } - return DefWindowProc ( hwnd, msg, wParam, lParam ); -} - -HWND -RegisterAndCreateWindow (HINSTANCE hInst, - const char* className, - const char* title) -{ - WNDCLASSEX wc; - HWND hwnd; - - g_hInst = hInst; - - wc.cbSize = sizeof (WNDCLASSEX); - - wc.lpfnWndProc = WndProc; /* window procedure */ - wc.hInstance = hInst; /* owner of the class */ - - wc.lpszClassName = className; - wc.hCursor = LoadCursor ( 0, (LPCTSTR)IDC_ARROW ); - wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); - wc.style = CS_HREDRAW | CS_VREDRAW; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hIcon = 0; - wc.hIconSm = 0; - wc.lpszMenuName = 0; - - if ( !RegisterClassEx ( &wc ) ) - return NULL; - - hwnd = CreateWindowEx ( - 0, /* dwStyleEx */ - className, /* class name */ - title, /* window title */ - - WS_OVERLAPPEDWINDOW, /* dwStyle */ - - 1, /* x */ - 1, /* y */ - 560, /* width */ - 350, /* height */ - NULL, /* hwndParent */ - NULL, /* hMenu */ - hInst, - 0 - ); - - if (!hwnd) return NULL; - - ShowWindow (hwnd, SW_SHOW); - UpdateWindow (hwnd); - - return hwnd; -} - -int -WINAPI -WinMain ( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdParam, int cmdShow ) -{ - char className [] = "Edit Control Test"; - MSG msg; - - RegisterAndCreateWindow ( hInst, className, "Edit Control Styles Test" ); - - // Message loop - while (GetMessage (&msg, NULL, 0, 0)) - { - TranslateMessage (&msg); - DispatchMessage (&msg); - } - return msg.wParam; - -} diff --git a/rostests/tests/edit/utils.c b/rostests/tests/edit/utils.c deleted file mode 100644 index 563191e9531..00000000000 --- a/rostests/tests/edit/utils.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Edit Control Test for ReactOS, quick n' dirty. There you go - * This source code is in the PUBLIC DOMAIN and has NO WARRANTY. - * by Waldo Alvarez Cañizares , June 22, 2003. - */ - -#include - -static const char hexvals[] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}; -VOID htoa (unsigned int val, char *buf) -{ - int i; - buf += 7; - - for (i=0;i<8;i++) - { - *buf-- = hexvals[val & 0x0000000F]; - val = val >> 4; - } -} - - -VOID strcpy_(char *dst, const char *src) -{ - const char* p = src; - while ((*dst++ = *p++)) {} -} - -VOID strcpyw_(wchar_t* dst,wchar_t* src) -{ - const wchar_t* p = src; - while ((*dst++ = *p++)) {} -} diff --git a/rostests/tests/edit/utils.h b/rostests/tests/edit/utils.h deleted file mode 100644 index f6a12649c1e..00000000000 --- a/rostests/tests/edit/utils.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ -VOID htoa (unsigned int, char *); -VOID strcpy_(char *, const char *); -VOID strcpyw_(wchar_t*,wchar_t*); -#ifdef __cplusplus - } -#endif diff --git a/rostests/tests/enhmetafile/enhmetafile.c b/rostests/tests/enhmetafile/enhmetafile.c deleted file mode 100644 index ff41e5677d7..00000000000 --- a/rostests/tests/enhmetafile/enhmetafile.c +++ /dev/null @@ -1,123 +0,0 @@ -#include -#include -#include - -//HFONT tf; -HENHMETAFILE EnhMetafile; -SIZE EnhMetafileSize; -LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM); - -int WINAPI -WinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpszCmdLine, - int nCmdShow) -{ - WNDCLASS wc; - MSG msg; - HWND hWnd; - ENHMETAHEADER emh; - - EnhMetafile = GetEnhMetaFile("test.emf"); - if(!EnhMetafile) - { - fprintf(stderr, "GetEnhMetaFile failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - GetEnhMetaFileHeader(EnhMetafile, sizeof(ENHMETAHEADER), &emh); - EnhMetafileSize.cx = emh.rclBounds.right - emh.rclBounds.left; - EnhMetafileSize.cy = emh.rclBounds.bottom - emh.rclBounds.top; - - wc.lpszClassName = "EnhMetaFileClass"; - wc.lpfnWndProc = MainWndProc; - wc.style = CS_VREDRAW | CS_HREDRAW; - wc.hInstance = hInstance; - wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION); - wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW); - wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); - wc.lpszMenuName = NULL; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - if (RegisterClass(&wc) == 0) - { - DeleteEnhMetaFile(EnhMetafile); - fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - hWnd = CreateWindow("EnhMetaFileClass", - "Enhanced Metafile test", - WS_OVERLAPPEDWINDOW, - 0, - 0, - EnhMetafileSize.cx + (2 * GetSystemMetrics(SM_CXSIZEFRAME)) + 2, - EnhMetafileSize.cy + (2 * GetSystemMetrics(SM_CYSIZEFRAME)) + GetSystemMetrics(SM_CYCAPTION) + 2, - NULL, - NULL, - hInstance, - NULL); - if (hWnd == NULL) - { - DeleteEnhMetaFile(EnhMetafile); - fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - //tf = CreateFontA(14, 0, 0, TA_BASELINE, FW_NORMAL, FALSE, FALSE, FALSE, - // ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, - // DEFAULT_QUALITY, FIXED_PITCH|FF_DONTCARE, "Timmons"); - - ShowWindow(hWnd, nCmdShow); - - while(GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - DeleteEnhMetaFile(EnhMetafile); - - //DeleteObject(tf); - UnregisterClass("EnhMetaFileClass", hInstance); - - return msg.wParam; -} - -LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch(msg) - { - - case WM_PAINT: - { - PAINTSTRUCT ps; - RECT rc; - HDC hDC; - int bk; - - GetClientRect(hWnd, &rc); - hDC = BeginPaint(hWnd, &ps); - rc.left = (rc.right / 2) - (EnhMetafileSize.cx / 2); - rc.top = (rc.bottom / 2) - (EnhMetafileSize.cy / 2); - rc.right = rc.left + EnhMetafileSize.cx; - rc.bottom = rc.top + EnhMetafileSize.cy; - bk = SetBkMode(hDC, TRANSPARENT); - Rectangle(hDC, rc.left - 1, rc.top - 1, rc.right + 1, rc.bottom + 1); - SetBkMode(hDC, bk); - PlayEnhMetaFile(hDC, EnhMetafile, &rc); - EndPaint(hWnd, &ps); - break; - } - - case WM_DESTROY: - PostQuitMessage(0); - break; - - default: - return DefWindowProc(hWnd, msg, wParam, lParam); - } - return 0; -} diff --git a/rostests/tests/enhmetafile/enhmetafile.rbuild b/rostests/tests/enhmetafile/enhmetafile.rbuild deleted file mode 100644 index 4223d630970..00000000000 --- a/rostests/tests/enhmetafile/enhmetafile.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - enhmetafile.c - diff --git a/rostests/tests/enhmetafile/test.emf b/rostests/tests/enhmetafile/test.emf deleted file mode 100644 index d056e2070df..00000000000 Binary files a/rostests/tests/enhmetafile/test.emf and /dev/null differ diff --git a/rostests/tests/enumfonts/enumfonts.cpp b/rostests/tests/enumfonts/enumfonts.cpp deleted file mode 100644 index e7d9b4bdb2b..00000000000 --- a/rostests/tests/enumfonts/enumfonts.cpp +++ /dev/null @@ -1,271 +0,0 @@ - -// ------------------------------------------------------------------ -// Windows 2000 Graphics API Black Book -// Chapter 4 - Listing 4.2 (Font Enumeration Demo) -// -// Created by Damon Chandler -// Updates can be downloaded at: -// -// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu -// if you have any questions about this code. -// ------------------------------------------------------------------ - - -//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -#include -#include - - -#ifndef SNDMSG -#define SNDMSG ::SendMessage -#endif /* ifndef SNDMSG */ - - -//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - - -HWND hListBox = NULL; -const int ID_LISTBOX = 101; - -HINSTANCE hInst; -const char* WndClassName = "GMainWnd"; -LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, - LPARAM lParam); - - -int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR, - int nCmdShow) -{ - hInst = hInstance; - - WNDCLASS wc; - memset(&wc, 0, sizeof(WNDCLASS)); - - wc.style = CS_VREDRAW | CS_HREDRAW; - wc.lpszClassName = WndClassName; - wc.lpfnWndProc = MainWndProc; - wc.hInstance = hInstance; - wc.hCursor = NULL; //LoadCursor(NULL, IDC_ARROW); - wc.hbrBackground = reinterpret_cast( - COLOR_BTNFACE + 1 - ); - - if (RegisterClass(&wc)) - { - HWND hWnd = - CreateWindow( - WndClassName, TEXT("Font Enumeration Demo"), - WS_OVERLAPPED | WS_SYSMENU | WS_CAPTION | - WS_VISIBLE | WS_CLIPCHILDREN, - CW_USEDEFAULT, CW_USEDEFAULT, 295, 285, - NULL, NULL, hInst, NULL - ); - - if (hWnd) - { - ShowWindow(hWnd, nCmdShow); - UpdateWindow(hWnd); - - MSG msg; - while (GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } - } - return 0; -} -//------------------------------------------------------------------------- - - -int CALLBACK MyEnumFontFamExProc(ENUMLOGFONTEX *lpelfe, - NEWTEXTMETRICEX* lpntme, int FontType, LPARAM lParam) -{ - if (FontType == TRUETYPE_FONTTYPE) - { - // if the typeface name is not already in the list - LPARAM name = reinterpret_cast(lpelfe->elfFullName); - if (SNDMSG(hListBox, LB_FINDSTRINGEXACT, (ULONG)-1, name) == LB_ERR) - { - // add each font to the list box - int index = SNDMSG(hListBox, LB_ADDSTRING, 0, name); - - // fix the size of the font - lpelfe->elfLogFont.lfHeight = -20; - lpelfe->elfLogFont.lfWidth = 0; - - // create a new font and store its handle - // as the data of the newly added item - HFONT hFont = CreateFontIndirect(&lpelfe->elfLogFont); - SNDMSG(hListBox, LB_SETITEMDATA, index, - reinterpret_cast(hFont)); - } - } - return TRUE; -} -//------------------------------------------------------------------------- - - -void AddScreenFonts() -{ - // grab a handle to the screen's DC - HDC hScreenDC = GetDC(NULL); - try - { - // - // NOTE: Windows 95, 98 and Me requires that the lpLogfont - // (second) parameter of the EnumFontFamiliesEx function is - // non-NULL. This parameter can be NULL on Windows NT/2000. - // - LOGFONT lf = {0}; - lf.lfCharSet = DEFAULT_CHARSET; - - // enumerate the current screen fonts - EnumFontFamiliesEx( - hScreenDC, &lf, - (FONTENUMPROC)MyEnumFontFamExProc, - 0, 0 - ); - } - catch (...) - { - // release the screen's DC - ReleaseDC(NULL, hScreenDC); - } - // release the screen's DC - ReleaseDC(NULL, hScreenDC); -} -//------------------------------------------------------------------------- - - -LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, - LPARAM lParam) -{ - switch (msg) - { - case WM_CREATE: - { - hListBox = - CreateWindowEx( - WS_EX_CLIENTEDGE, TEXT("LISTBOX"), TEXT(""), - WS_CHILD | WS_VISIBLE | LBS_STANDARD | - LBS_HASSTRINGS | LBS_OWNERDRAWFIXED, - 20, 10, 250, 250, - hWnd, reinterpret_cast(ID_LISTBOX), - hInst, NULL - ); - if (hListBox) - { - AddScreenFonts(); - } - } - case WM_MEASUREITEM: - { - // grab a pointer to the MEASUREITEMSTRUCT structure - LPMEASUREITEMSTRUCT lpmis = - reinterpret_cast(lParam); - - // test the identifier of the control that - // the message is meant for - if ((int)lpmis->CtlID == ID_LISTBOX) - { - // adjust the height - lpmis->itemHeight = 25; - - return TRUE; - } - break; - } - case WM_DRAWITEM: - { - // grab a pointer to the DRAWITEMSTRUCT structure - LPDRAWITEMSTRUCT lpdis = - reinterpret_cast(lParam); - - // test the identifier of the control that - // the message is meant for - if ((int)lpdis->CtlID == ID_LISTBOX) - { - COLORREF OldColor = GetTextColor(lpdis->hDC); - int stock = WHITE_BRUSH; - - // if the item is currently selected - if (lpdis->itemState & ODS_SELECTED) - { - // set the text color to white and - // the background color to black - COLORREF clrWhite = PALETTERGB(255, 255, 255); - OldColor = SetTextColor(lpdis->hDC, clrWhite); - stock = BLACK_BRUSH; - } - FillRect( - lpdis->hDC, &lpdis->rcItem, - static_cast(GetStockObject(stock)) - ); - - if ((int)lpdis->itemID != -1) - { - // extract the item's text - char text[MAX_PATH]; - SNDMSG(hListBox, LB_GETTEXT, lpdis->itemID, - reinterpret_cast(text)); - - // extract the corresponding font handle - DWORD value = - SNDMSG(hListBox, LB_GETITEMDATA, lpdis->itemID, 0); - HFONT hFont = reinterpret_cast(value); - - // select the corresponding font - // into the device context - HFONT HOldFont = static_cast( - SelectObject(lpdis->hDC, hFont) - ); - - // render the text transparently - SetBkMode(lpdis->hDC, TRANSPARENT); - - // render the text - RECT RText = lpdis->rcItem; - InflateRect(&RText, -2, -2); - DrawText(lpdis->hDC, text, strlen(text), &RText, - DT_LEFT | DT_VCENTER | DT_SINGLELINE); - - // restore the previous font - SelectObject(lpdis->hDC, HOldFont); - } - - // render the focus rectangle - if (lpdis->itemState & ODS_FOCUS) - { - DrawFocusRect(lpdis->hDC, &lpdis->rcItem); - } - - // restore the previous color/mode - SetTextColor(lpdis->hDC, OldColor); - SetBkMode(lpdis->hDC, OPAQUE); - - return TRUE; - } - break; - } - case WM_DESTROY: - { - // delete each created font object - int count = SNDMSG(hListBox, LB_GETCOUNT, 0, 0); - for (int index = 0; index < count; ++index) - { - DWORD value = SNDMSG(hListBox, LB_GETITEMDATA, index, 0); - DeleteObject(reinterpret_cast(value)); - } - - PostQuitMessage(0); - break; - } - } - return DefWindowProc(hWnd, msg, wParam, lParam); -} -//------------------------------------------------------------------------- - - - diff --git a/rostests/tests/enumfonts/enumfonts.rbuild b/rostests/tests/enumfonts/enumfonts.rbuild deleted file mode 100644 index 3fea2ce0a5c..00000000000 --- a/rostests/tests/enumfonts/enumfonts.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - enumfonts.cpp - diff --git a/rostests/tests/enumwnd/enumwnd.c b/rostests/tests/enumwnd/enumwnd.c deleted file mode 100644 index f1d1acc1a0a..00000000000 --- a/rostests/tests/enumwnd/enumwnd.c +++ /dev/null @@ -1,187 +0,0 @@ -/* - * enumwnd.c - * - * application to test the various Window Enumeration functions - */ - -//#define WIN32_LEAN_AND_MEAN -#include -#include -#include - -HBRUSH hbrBackground; -HFONT tf; -int test = 0; -const TCHAR* APP_NAME = "EnumWnd Test"; -const TCHAR* CLASS_NAME = "EnumWndTestClass"; - -LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM); - -int WINAPI -WinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpszCmdLine, - int nCmdShow) -{ - WNDCLASS wc; - MSG msg; - HWND hWnd; - - wc.lpszClassName = CLASS_NAME; - wc.lpfnWndProc = MainWndProc; - wc.style = CS_VREDRAW | CS_HREDRAW; - wc.hInstance = hInstance; - wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION); - wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW); - wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH); - wc.lpszMenuName = NULL; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - if (RegisterClass(&wc) == 0) - { - _ftprintf ( stderr, _T("RegisterClass failed (last error 0x%lX)\n"), - GetLastError()); - return(1); - } - - hWnd = CreateWindow(CLASS_NAME, - APP_NAME, - WS_OVERLAPPEDWINDOW, - 0, - 0, - CW_USEDEFAULT, - CW_USEDEFAULT, - NULL, - NULL, - hInstance, - NULL); - if (hWnd == NULL) - { - _ftprintf ( stderr, _T("CreateWindow failed (last error 0x%lX)\n"), - GetLastError()); - return(1); - } - - tf = CreateFont (14, 0, 0, TA_BASELINE, FW_NORMAL, FALSE, FALSE, FALSE, - ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, - DEFAULT_QUALITY, FIXED_PITCH|FF_DONTCARE, _T("Timmons")); - - hbrBackground = CreateSolidBrush ( RGB(192,192,192) ); - - ShowWindow ( hWnd, nCmdShow ); - - while(GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - DeleteObject(hbrBackground); - - DeleteObject(tf); - - return msg.wParam; -} - -void MyTextOut ( HDC hdc, int x, int y, const TCHAR* text ) -{ - TextOut ( hdc, x, y, text, _tcslen(text) ); -} - -typedef struct _EnumData -{ - HDC hdc; - int x; - int y; -} EnumData; - -BOOL CALLBACK MyWindowEnumProc ( HWND hwnd, LPARAM lParam ) -{ - TCHAR wndcaption[1024], buf[1024]; - EnumData* ped = (EnumData*)lParam; - GetWindowText ( hwnd, wndcaption, sizeof(wndcaption)/sizeof(*wndcaption) ); - _sntprintf ( buf, sizeof(buf)/sizeof(*buf), _T("%x - %s"), hwnd, wndcaption ); - MyTextOut ( ped->hdc, ped->x, ped->y, buf ); - ped->y += 13; - return TRUE; -} - -LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - PAINTSTRUCT ps; - HDC hDC; - RECT rect; - TCHAR buf[100]; - EnumData ed; - - switch(msg) - { - case WM_PAINT: - hDC = BeginPaint(hWnd, &ps); - SelectObject(hDC, tf); - - GetClientRect ( hWnd, &rect ); - FillRect ( hDC, &rect, hbrBackground ); - - MyTextOut ( hDC, 10, 10, "EnumWnd Test" ); - - _sntprintf ( buf, sizeof(buf)/sizeof(*buf), _T("My HWND: %x"), hWnd ); - MyTextOut ( hDC, 10, 30, buf ); - - ed.hdc = hDC; - ed.x = 10; - ed.y = 70; - - switch ( test ) - { - case 1: - MyTextOut ( hDC, 10, 50, _T("Test #1: EnumWindows()") ); - EnumWindows ( MyWindowEnumProc, (LPARAM)&ed ); - break; - case 2: - MyTextOut ( hDC, 10, 50, _T("Test #2: EnumChildWindows()") ); - EnumChildWindows ( hWnd, MyWindowEnumProc, (LPARAM)&ed ); - break; - case 3: - MyTextOut ( hDC, 10, 50, _T("Test #3: EnumDesktopWindows") ); - EnumDesktopWindows ( NULL, MyWindowEnumProc, (LPARAM)&ed ); - break; - case 4: - MyTextOut ( hDC, 10, 50, _T("Test #4: EnumThreadWindows") ); - EnumThreadWindows ( GetCurrentThreadId(), MyWindowEnumProc, (LPARAM)&ed ); - break; - default: - MyTextOut ( hDC, 10, 50, _T("Press any of the number keys from 1 to 4 to run a test") ); - MyTextOut ( hDC, 10, 70, _T("Press the left and right mouse buttons to cycle through the tests") ); - break; - } - - EndPaint(hWnd, &ps); - break; - - case WM_CHAR: - test = (TCHAR)wParam - '1' + 1; - RedrawWindow ( hWnd, NULL, NULL, RDW_INVALIDATE ); - break; - - case WM_LBUTTONDOWN: - if ( ++test > 4 ) - test = 1; - RedrawWindow ( hWnd, NULL, NULL, RDW_INVALIDATE ); - break; - - case WM_RBUTTONDOWN: - if ( !--test ) - test = 4; - RedrawWindow ( hWnd, NULL, NULL, RDW_INVALIDATE ); - break; - - case WM_DESTROY: - PostQuitMessage(0); - break; - - default: - return DefWindowProc(hWnd, msg, wParam, lParam); - } - return 0; -} diff --git a/rostests/tests/enumwnd/enumwnd.dsp b/rostests/tests/enumwnd/enumwnd.dsp deleted file mode 100644 index b18de899a0c..00000000000 --- a/rostests/tests/enumwnd/enumwnd.dsp +++ /dev/null @@ -1,90 +0,0 @@ -# Microsoft Developer Studio Project File - Name="enumwnd" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=enumwnd - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "enumwnd.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "enumwnd.mak" CFG="enumwnd - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "enumwnd - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "enumwnd - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "enumwnd - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "enumwnd - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /debug /machine:I386 /pdbtype:sept -# SUBTRACT LINK32 /pdb:none - -!ENDIF - -# Begin Target - -# Name "enumwnd - Win32 Release" -# Name "enumwnd - Win32 Debug" -# Begin Source File - -SOURCE=.\enumwnd.c -# End Source File -# End Target -# End Project diff --git a/rostests/tests/enumwnd/enumwnd.rbuild b/rostests/tests/enumwnd/enumwnd.rbuild deleted file mode 100644 index 82b8401d11a..00000000000 --- a/rostests/tests/enumwnd/enumwnd.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - enumwnd.c - diff --git a/rostests/tests/enumws/enumws.c b/rostests/tests/enumws/enumws.c deleted file mode 100644 index 93d5a216bb2..00000000000 --- a/rostests/tests/enumws/enumws.c +++ /dev/null @@ -1,35 +0,0 @@ -#include -#include - -BOOL CALLBACK -EnumDesktopProc(LPWSTR lpszWindowStation, LPARAM lParam) -{ - printf("\t%S\n", lpszWindowStation); - - return TRUE; -} - -BOOL CALLBACK -EnumWindowStationProc(LPWSTR lpszWindowStation, LPARAM lParam) -{ - HWINSTA hWinSta; - - printf("%S\n", lpszWindowStation); - hWinSta = OpenWindowStationW(lpszWindowStation, FALSE, - WINSTA_ENUMDESKTOPS); - if (hWinSta == NULL) - { - printf("\tCan't open window station.\n"); - return TRUE; - } - EnumDesktopsW(hWinSta, EnumDesktopProc, 0xdede); - - return TRUE; -} - -int main() -{ - EnumWindowStationsW(EnumWindowStationProc, 0xbadbed); - - return 0; -} diff --git a/rostests/tests/enumws/enumws.rbuild b/rostests/tests/enumws/enumws.rbuild deleted file mode 100644 index 78597aca8af..00000000000 --- a/rostests/tests/enumws/enumws.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - enumws.c - diff --git a/rostests/tests/event/event.c b/rostests/tests/event/event.c deleted file mode 100644 index 9942bea0745..00000000000 --- a/rostests/tests/event/event.c +++ /dev/null @@ -1,33 +0,0 @@ -#include -#include - -HANDLE events[2]; - -DWORD WINAPI thread( LPVOID crap ) -{ - SetEvent( events[0] ); - if( crap ) - SetEvent( events[1] ); - return 1; -} - -int main( void ) -{ - DWORD id, Status; - printf( "Creating events\n" ); - events[0] = CreateEvent( 0, TRUE, FALSE, 0 ); - events[1] = CreateEvent( 0, TRUE, FALSE, 0 ); - printf( "Created events\n" ); - CreateThread( 0, 0, thread, 0, 0, &id ); - printf( "WaitForSingleObject %s\n", ( WaitForSingleObject( events[0], INFINITE ) == WAIT_OBJECT_0 ? "worked" : "failed" ) ); - ResetEvent( events[0] ); - CreateThread( 0, 0, thread, 0, 0, &id ); - printf( "WaitForMultipleObjects with waitall = FALSE %s\n", ( WaitForMultipleObjects( 2, events, FALSE, INFINITE ) == WAIT_OBJECT_0 ? "worked" : "failed" ) ); - ResetEvent( events[0] ); - CreateThread( 0, 0, thread, (void *)1, 0, &id ); - Status = WaitForMultipleObjects( 2, events, TRUE, INFINITE ); - printf( "WaitForMultipleObjects with waitall = TRUE %s\n", ( Status == WAIT_OBJECT_0 || Status == WAIT_OBJECT_0 + 1 ? "worked" : "failed" ) ); - ResetEvent( events[0] ); - printf( "WaitForSingleObject with timeout %s\n", ( WaitForSingleObject( events[0], 100 ) == WAIT_TIMEOUT ? "worked" : "failed" ) ); - return 0; -} diff --git a/rostests/tests/event/event.rbuild b/rostests/tests/event/event.rbuild deleted file mode 100644 index b2bf9e92c35..00000000000 --- a/rostests/tests/event/event.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - event.c - diff --git a/rostests/tests/fiber/fiber.c b/rostests/tests/fiber/fiber.c deleted file mode 100644 index 9aee0ec543e..00000000000 --- a/rostests/tests/fiber/fiber.c +++ /dev/null @@ -1,446 +0,0 @@ -/* $Id$ -*/ - -#include -#include -#include -#include -#include - -#include -#include - -#ifndef InitializeListHead -#define InitializeListHead(PLH__) ((PLH__)->Flink = (PLH__)->Blink = (PLH__)) -#endif - -#ifndef IsListEmpty -#define IsListEmpty(PLH__) ((PLH__)->Flink == (PVOID)(PLH__)) -#endif - -#ifndef RemoveEntryList - -#define RemoveEntryList(PLE__) \ -{ \ - PLIST_ENTRY pleBack__ = (PLIST_ENTRY)((PLE__)->Blink); \ - PLIST_ENTRY pleForward__ = (PLIST_ENTRY)((PLE__)->Flink); \ - \ - pleBack__->Flink = pleForward__; \ - pleForward__->Blink = pleBack__; \ -} - -#endif - -#ifndef InsertTailList - -#define InsertTailList(PLH__, PLE__) \ -{ \ - PLIST_ENTRY pleListHead__ = (PLH__); \ - PLIST_ENTRY pleBlink__ = (PLIST_ENTRY)((PLH__)->Blink); \ - \ - (PLE__)->Flink = pleListHead__; \ - (PLE__)->Blink = pleBlink__; \ - pleBlink__->Flink = (PLE__); \ - pleListHead__->Blink = (PLE__); \ -} - -#endif - -#ifndef RemoveHeadList - -#define RemoveHeadList(PLH__) \ - (PLIST_ENTRY)((PLH__)->Flink); \ - RemoveEntryList((PLIST_ENTRY)((PLH__)->Flink)); - -#endif - -#define FIBERTEST_COUNT 500 - -struct FiberData -{ - unsigned nMagic; - unsigned nId; - unsigned nPrio; - unsigned nRealPrio; - PVOID pFiber; - LIST_ENTRY leQueue; - int nQuantumQueued; - int nBoost; - struct FiberData * pfdPrev; - int bExitPrev; -}; - -static LIST_ENTRY a_leQueues[32]; -static unsigned nQuantum = 0; -static struct FiberData * pfdLastStarveScan = NULL; - -void Fbt_Create(int); -void Fbt_Exit(void); -void Fbt_Yield(void); - -struct FiberData * Fbt_GetCurrent(void); -unsigned Fbt_GetCurrentId(void); -VOID CALLBACK Fbt_Startup(PVOID); -void Fbt_Dispatch(struct FiberData *, int); -void Fbt_AfterSwitch(struct FiberData *); - -void DoStuff(void); - -struct FiberData * Fbt_GetCurrent(VOID) -{ - return GetFiberData(); -} - -unsigned Fbt_GetCurrentId(VOID) -{ - return Fbt_GetCurrent()->nId; -} - -void Fbt_Yield(VOID) -{ - struct FiberData * pfdCur; - - pfdCur = Fbt_GetCurrent(); - - if(pfdCur->nBoost) - { - -- pfdCur->nBoost; - - if(!pfdCur->nBoost) - pfdCur->nPrio = pfdCur->nRealPrio; - } - else if((rand() % 100) > 50 - (45 * pfdCur->nPrio) / 32) - Fbt_Dispatch(pfdCur, 0); -} - -void Fbt_AfterSwitch(struct FiberData * pfdCur) -{ - struct FiberData * pfdPrev; - - pfdPrev = pfdCur->pfdPrev; - - /* The previous fiber left some homework for us */ - if(pfdPrev) - { - /* Kill the predecessor */ - if(pfdCur->bExitPrev) - { - if(pfdLastStarveScan == pfdPrev) - pfdLastStarveScan = 0; - - DeleteFiber(pfdPrev->pFiber); - free(pfdPrev); - } - /* Enqueue the previous fiber in the correct ready queue */ - else - { - /* Remember the quantum in which the previous fiber was queued */ - pfdPrev->nQuantumQueued = nQuantum; - - /* Disable the anti-starvation boost */ - if(pfdPrev->nBoost) - { - pfdPrev->nBoost = 0; - pfdPrev->nPrio = pfdPrev->nRealPrio; - } - - /* Enqueue the previous fiber */ - InsertTailList - ( - &a_leQueues[pfdPrev->nPrio], - &pfdPrev->leQueue - ); - } - } -} - -VOID CALLBACK Fbt_Startup(PVOID pParam) -{ - assert(pParam == GetFiberData()); - Fbt_AfterSwitch(pParam); - DoStuff(); - Fbt_Exit(); -} - -void Fbt_Dispatch(struct FiberData * pfdCur, int bExit) -{ - UCHAR i; - UCHAR n; - struct FiberData * pfdNext; - - assert(pfdCur == GetFiberData()); - - ++ nQuantum; - - /* Every ten quantums check for starving threads */ - /* FIXME: this implementation of starvation prevention isn't that great */ - if(nQuantum % 10 == 0) - { - int j; - int k; - int b; - int bResume; - PLIST_ENTRY ple = NULL; - - bResume = 0; - i = 0; - - /* Pick up from where we left last time */ - if(pfdLastStarveScan) - { - unsigned nPrio; - - nPrio = pfdLastStarveScan->nPrio; - - /* The last fiber we scanned for starvation isn't queued anymore */ - if(IsListEmpty(&pfdLastStarveScan->leQueue)) - /* Scan the ready queue for its priority */ - i = nPrio; - /* Last fiber for its priority level */ - else if(pfdLastStarveScan->leQueue.Flink == &a_leQueues[nPrio]) - /* Scan the ready queue for the next priority level */ - i = nPrio + 1; - /* Scan the next fiber in the ready queue */ - else - { - i = nPrio; - ple = pfdLastStarveScan->leQueue.Flink; - bResume = 1; - } - - /* Priority levels 15-31 are never checked for starvation */ - if(i >= 15) - { - if(bResume) - bResume = 0; - - i = 0; - } - } - - /* - Scan at most 16 threads, in the priority range 0-14, applying in total at - most 10 boosts. This loop scales O(1) - */ - for(j = 0, k = 0, b = 0; j < 16 && k < 15 && b < 10; ++ j) - { - unsigned nDiff; - - /* No previous state to resume from */ - if(!bResume) - { - int nQueue; - - /* Get the first element in the current queue */ - nQueue = (k + i) % 15; - - if(IsListEmpty(&a_leQueues[nQueue])) - { - ++ k; - continue; - } - - ple = (PLIST_ENTRY)a_leQueues[nQueue].Flink; - } - else - bResume = 0; - - /* Get the current fiber */ - pfdLastStarveScan = CONTAINING_RECORD(ple, struct FiberData, leQueue); - assert(pfdLastStarveScan->nMagic == 0x12345678); - assert(pfdLastStarveScan != pfdCur); - - /* Calculate the number of quantums the fiber has been in the queue */ - if(nQuantum > pfdLastStarveScan->nQuantumQueued) - nDiff = nQuantum - pfdLastStarveScan->nQuantumQueued; - else - nDiff = UINT_MAX - pfdLastStarveScan->nQuantumQueued + nQuantum; - - /* The fiber has been ready for more than 30 quantums: it's starving */ - if(nDiff > 30) - { - /* Plus one boost applied */ - ++ b; - - /* Apply the boost */ - pfdLastStarveScan->nBoost = 1; - pfdLastStarveScan->nRealPrio = pfdLastStarveScan->nPrio; - pfdLastStarveScan->nPrio = 15; - - /* Re-enqueue the fiber in the correct priority queue */ - RemoveEntryList(&pfdLastStarveScan->leQueue); - InsertTailList(&a_leQueues[15], &pfdLastStarveScan->leQueue); - } - } - } - - pfdNext = NULL; - - /* This fiber is going to die: scan all ready queues */ - if(bExit) - n = 1; - /* - Scan only ready queues for priorities greater than or equal to the priority of - the current thread (round-robin) - */ - else - n = pfdCur->nPrio + 1; - - /* This loop scales O(1) */ - for(i = 32; i >= n; -- i) - { - PLIST_ENTRY pleNext; - - /* No fiber ready for this priority level */ - if(IsListEmpty(&a_leQueues[i - 1])) - continue; - - /* Get the next ready fiber */ - pleNext = RemoveHeadList(&a_leQueues[i - 1]); - InitializeListHead(pleNext); - pfdNext = CONTAINING_RECORD(pleNext, struct FiberData, leQueue); - assert(pfdNext->pFiber != GetCurrentFiber()); - assert(pfdNext->nMagic == 0x12345678); - break; - } - - /* Next fiber chosen */ - if(pfdNext) - { - /* Give some homework to the next fiber */ - pfdNext->pfdPrev = pfdCur; - pfdNext->bExitPrev = bExit; - - /* Switch to the next fiber */ - SwitchToFiber(pfdNext->pFiber); - - /* Complete the switch back to this fiber */ - Fbt_AfterSwitch(pfdCur); - } - /* No next fiber, and current fiber exiting */ - else if(bExit) - { - PVOID pCurFiber; - - /* Delete the current fiber. This kills the thread and stops the simulation */ - if(pfdLastStarveScan == pfdCur) - pfdLastStarveScan = NULL; - - pCurFiber = pfdCur->pFiber; - free(pfdCur); - DeleteFiber(pCurFiber); - } - /* No next fiber: continue running the current one */ -} - -void Fbt_Exit(VOID) -{ - Fbt_Dispatch(GetFiberData(), 1); -} - -void Fbt_CreateFiber(int bInitial) -{ - PVOID pFiber; - struct FiberData * pData; - static int s_bFiberPrioSeeded = 0; - static LONG s_nFiberIdSeed = 0; - - pData = malloc(sizeof(struct FiberData)); - - assert(pData); - - if(bInitial) - pFiber = ConvertThreadToFiber(pData); - else - pFiber = CreateFiber(0, Fbt_Startup, pData); - - if(!s_bFiberPrioSeeded) - { - unsigned nFiberPrioSeed; - time_t tCurTime; - - tCurTime = time(NULL); - memcpy(&nFiberPrioSeed, &tCurTime, sizeof(nFiberPrioSeed)); - srand(nFiberPrioSeed); - s_bFiberPrioSeeded = 1; - } - - assert(pFiber); - - pData->nMagic = 0x12345678; - pData->nId = InterlockedIncrement(&s_nFiberIdSeed); - pData->nPrio = rand() % 32; - pData->pFiber = pFiber; - pData->nQuantumQueued = 0; - pData->nBoost = 0; - pData->nRealPrio = pData->nPrio; - pData->pfdPrev = NULL; - pData->bExitPrev = 0; - - if(bInitial) - { - InitializeListHead(&pData->leQueue); - } - else - { - InsertTailList - ( - &a_leQueues[pData->nPrio], - &pData->leQueue - ); - } -} - -void DoStuff(void) -{ - unsigned i; - unsigned n; - unsigned nId; - - n = rand() % 1000; - nId = Fbt_GetCurrentId(); - - _ftprintf(stderr, _T("[%u] BEGIN\n"), nId); - - for(i = 0; i < n; ++ i) - { - unsigned j; - unsigned m; - - _ftprintf(stderr, _T("[%u] [%u/%u]\n"), nId, i + 1, n); - - m = rand() % 1000; - - for(j = 0; j < m; ++ j) - Sleep(0); - - Fbt_Yield(); - } - - _ftprintf(stderr, _T("[%u] END\n"), nId); -} - -int _tmain(int argc, _TCHAR const * const * argv) -{ - unsigned i; - unsigned nFibers; - - if(argc > 1) - nFibers = _tcstoul(argv[1], NULL, 0); - else - nFibers = FIBERTEST_COUNT; - - for(i = 0; i < 32; ++ i) - { - InitializeListHead(&a_leQueues[i]); - } - - for(i = 0; i < nFibers; ++ i) - Fbt_CreateFiber(i == 0); - - Fbt_Startup(GetFiberData()); - - return 0; -} - -/* EOF */ diff --git a/rostests/tests/fiber/fiber.rbuild b/rostests/tests/fiber/fiber.rbuild deleted file mode 100644 index 38ad1bb125b..00000000000 --- a/rostests/tests/fiber/fiber.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - fiber.c - diff --git a/rostests/tests/gethostbyname/gethostbyname.c b/rostests/tests/gethostbyname/gethostbyname.c deleted file mode 100644 index 9a42c4dedda..00000000000 --- a/rostests/tests/gethostbyname/gethostbyname.c +++ /dev/null @@ -1,21 +0,0 @@ -#include -#include - -int main( int argc, char **argv ) { - WSADATA wdata; - - WSAStartup( 0x0101, &wdata ); - - if( argc > 1 ) { - struct hostent *he = gethostbyname( argv[1] ); - if( !he ) { - printf( "lookup of host %s failed: %d\n", argv[1], WSAGetLastError() ); - return 1; - } else { - printf( "Lookup of host %s returned %s\n", - argv[1], inet_ntoa(*((struct in_addr *)he->h_addr_list[0])) ); - return 0; - } - } else - return 1; -} diff --git a/rostests/tests/gethostbyname/gethostbyname.rbuild b/rostests/tests/gethostbyname/gethostbyname.rbuild deleted file mode 100644 index 63e024e4991..00000000000 --- a/rostests/tests/gethostbyname/gethostbyname.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - ws2_32 - gethostbyname.c - diff --git a/rostests/tests/global_mem/global_mem.c b/rostests/tests/global_mem/global_mem.c deleted file mode 100644 index 5e614a58a8a..00000000000 --- a/rostests/tests/global_mem/global_mem.c +++ /dev/null @@ -1,1069 +0,0 @@ -/* File: global_mem.c -** -** This program is a test application used for testing correctness of the -** GlobalXXX memory API implementation. -** -** Programmer: Mark Tempel -*/ -#include -#include -#include - -/* -** All output is line wrapped to fit a 80 column screen. -** these defines control that formatting. To shrink the -** screen columns, just change the DISPLAY_COMUMNS macro. -*/ -#define DISPLAY_COLUMNS 78 -#define LINE_BUFFER_SIZE DISPLAY_COLUMNS + 2 - -/* -** This define controls the size of a memory allocation request. -** For this test suite to really be comprehensive, we should -** probably be testing many different block sizes. -*/ -#define MEM_BLOCK_SIZE 0x80000 - -/* -** This enumeration is really the return value for the program. -** All test return a TestStatus and test statuses can be combined -** with the relation TEST_CombineStatus. -*/ -typedef enum TestStatus -{ - FAILED = 0, - PASSED = 1, - SKIPPED = -1 -} TEST_STATUS; - -/*--------------------------------------------------------------------------- -** This is a relation used to combine two test statuses. -** The combine rules are as follows: -** FAIL & Anything == FAIL -** SKIPPED & Anything == Anything -** -*/ -TEST_STATUS TEST_CombineStatus(TEST_STATUS a, TEST_STATUS b) -{ - TEST_STATUS result = a; - - switch (a) - { - case PASSED: result = (PASSED == b || SKIPPED == b) ? (PASSED) : (FAILED); break; - case FAILED: result = FAILED; break; - case SKIPPED: result = b; break; - } - - return result; -} - -/*--------------------------------------------------------------------------- -** This outputs the banner border lines. -*/ -void OUTPUT_BannerLine() -{ - int c = 0; - printf("+"); - for (c = 1; c < DISPLAY_COLUMNS; c++) - { - printf("-"); - } - printf("\n"); -} - - -/*--------------------------------------------------------------------------- -** This method prints a line that has a | on the left, and is line wrapped -** to be no more that DISPLAY_COLUMNS +2 wide. -*/ -void OUTPUT_Line(const char *szLine) -{ - int spaceIndex = 0; - char output[LINE_BUFFER_SIZE]; - - memset(output, 0, DISPLAY_COLUMNS + 2); - - /*If this line is longer than DISPLAY_COLUMNS, - * break it at the first space. - */ - if (DISPLAY_COLUMNS - 2 < strlen(szLine)) - { - for (spaceIndex = DISPLAY_COLUMNS / 2; spaceIndex < DISPLAY_COLUMNS - 2; spaceIndex++) - { - if (' ' == szLine[spaceIndex]) - { - break; - } - } - - memcpy(output + 2, szLine, spaceIndex + 1); - output[0] = '|'; - output[1] = ' '; - output[strlen(output)] = '\n'; - printf(output); - - OUTPUT_Line(szLine + spaceIndex + 1); - } - else - { - sprintf(output,"| %s\n", szLine); - printf(output); - } - -} - -/*--------------------------------------------------------------------------- -** -*/ -void OUTPUT_Banner(const char *szBanner) -{ - OUTPUT_BannerLine(); - OUTPUT_Line(szBanner); - OUTPUT_BannerLine(); -} - -/*--------------------------------------------------------------------------- -** -*/ -void OUTPUT_Result(TEST_STATUS status) -{ - switch (status) - { - case PASSED: OUTPUT_Line("==> PASSED"); break; - case FAILED: OUTPUT_Line("*** FAILED"); break; - case SKIPPED: OUTPUT_Line("==> SKIPPED"); break; - } - OUTPUT_Line(""); -} - -/*--------------------------------------------------------------------------- -** -*/ -void OUTPUT_HexDword(DWORD dw) -{ - char buffer[32]; - sprintf(buffer, "0x%lX",dw); - OUTPUT_Line(buffer); -} - -void OUTPUT_Handle(HANDLE h) -{ - char buffer[32]; - sprintf(buffer, "0x%p", h); - OUTPUT_Line(buffer); -} - -/*--------------------------------------------------------------------------- -** -*/ -void OutputAllocFlags(UINT pFlags) -{ - if (pFlags & GMEM_MOVEABLE) - { - OUTPUT_Line("Movable Memory"); - } - else - { - OUTPUT_Line("Fixed Memory"); - } - - if (pFlags & GMEM_ZEROINIT) - { - OUTPUT_Line("Zero Initialized Memory"); - } -} - -/*--------------------------------------------------------------------------- -** -*/ -void OutputErrorCode() -{ - char buffer[256]; - - sprintf(buffer,"GetLastError() returned %lu", GetLastError()); - - OUTPUT_Line(buffer); -} -/*--------------------------------------------------------------------------- -** -*/ -TEST_STATUS TEST_MemoryWrite(LPVOID mem, DWORD cbSize) -{ - TEST_STATUS result = FAILED; - - if (0 == IsBadWritePtr(mem, cbSize)) - { - result = PASSED; - } - return result; -} - -/*--------------------------------------------------------------------------- -** -*/ -TEST_STATUS TEST_MemoryRead(LPVOID mem, DWORD cbSize) -{ - TEST_STATUS result = FAILED; - - if (0 == IsBadReadPtr(mem, cbSize)) - { - result = PASSED; - } - return result; -} - -/*--------------------------------------------------------------------------- -** This method tests to see if a block of global memory is movable -** by seeing if the value returned from GlobalLock is different from -** the passed in value. -*/ -int IsMovable(HGLOBAL hMem) -{ - LPVOID pMem = 0; - int rc = 0; - - pMem = GlobalLock(hMem); - if (pMem != hMem) - { - rc = 1; - } - GlobalUnlock(hMem); - - return rc; -} - -/*--------------------------------------------------------------------------- -** -*/ -TEST_STATUS TestGlobalAllocNFree(UINT allocFlags) -{ - TEST_STATUS status = SKIPPED; - HGLOBAL hTest = 0; - OUTPUT_Banner("Testing the GlobalAlloc and GlobalFree calls"); - OUTPUT_Line("Allocate a buffer"); - - OutputAllocFlags(allocFlags); - - status = FAILED; - hTest = GlobalAlloc(allocFlags, MEM_BLOCK_SIZE); - if (0 != hTest) - { - if (0 == GlobalFree(hTest)); - { - status = PASSED; - } - } - - OUTPUT_Line("Result for this run:"); - OUTPUT_Result(status); - OUTPUT_Line(""); - - return status; -} - -/*--------------------------------------------------------------------------- -** -*/ -TEST_STATUS TestGlobalLockNUnlock(UINT allocFlags) -{ - HGLOBAL hMem = 0; - LPVOID pMem = 0; - TEST_STATUS subtest = SKIPPED; - TEST_STATUS result = FAILED; - - OUTPUT_Banner("Testing the GlobalLock/Unlock functions."); - OutputAllocFlags(allocFlags); - OUTPUT_Line(""); - - hMem = GlobalAlloc(allocFlags, MEM_BLOCK_SIZE); - if (0 != hMem) - { - OUTPUT_Line("Allocated a memory block"); - - OUTPUT_Line("Testing Lock"); - pMem = GlobalLock(hMem); - if (0 != pMem) - { - OUTPUT_Result(PASSED); - - OUTPUT_Line("Testing memory for read."); - subtest = TEST_MemoryRead(pMem, MEM_BLOCK_SIZE); - OUTPUT_Result(subtest); - result = TEST_CombineStatus(PASSED, subtest); - - - OUTPUT_Line("Testing memory for write."); - subtest = TEST_MemoryRead(pMem, MEM_BLOCK_SIZE); - OUTPUT_Result(subtest); - result = TEST_CombineStatus(result, subtest); - - - OUTPUT_Line("Unlocking memory"); - if (GlobalUnlock(hMem)) - { - OUTPUT_Result(PASSED); - result = TEST_CombineStatus(result, PASSED); - } - else - { - if (NO_ERROR == GetLastError()) - { - OUTPUT_Result(PASSED); - result = TEST_CombineStatus(result, PASSED); - } - else - { - OutputErrorCode(); - OUTPUT_Result(FAILED); - result = TEST_CombineStatus(result, FAILED); - } - } - } - - OUTPUT_Line("Freeing memory"); - if (0 == GlobalFree(hMem)) - { - OUTPUT_Result(PASSED); - result = TEST_CombineStatus(result, PASSED); - } - else - { - OutputErrorCode(); - OUTPUT_Result(FAILED); - result = TEST_CombineStatus(result, FAILED); - } - } - return result; -} - -/*--------------------------------------------------------------------------- -** -*/ -TEST_STATUS TestGlobalReAllocFixed() -{ - HGLOBAL hMem = 0; - HGLOBAL hReAlloced = 0; - LPVOID pMem = 0; - TEST_STATUS subtest = SKIPPED; - TEST_STATUS result = SKIPPED; - - OUTPUT_Line("Testing GlobalReAlloc() on memory allocated as GMEM_FIXED"); - - /* Case 1: convert a fixed block to a movable block. */ - OUTPUT_Line("Allocating buffer"); - hMem = GlobalAlloc(GMEM_FIXED, MEM_BLOCK_SIZE); - if (0 != hMem) - { - OUTPUT_Line("Testing to see if this is converted into a movable block"); - hReAlloced = GlobalReAlloc(hMem, MEM_BLOCK_SIZE + 100, GMEM_MOVEABLE | GMEM_MODIFY); - if (0 == hReAlloced) - { - OUTPUT_Line("GlobalReAlloc failed-- returned NULL"); - subtest = TEST_CombineStatus(subtest, FAILED); - OUTPUT_Result(subtest); - } - else - { - hMem = hReAlloced; - if (0 == IsMovable(hMem)) - { - OUTPUT_Line("GlobalReAlloc returned a fixed pointer."); - subtest = TEST_CombineStatus(subtest, FAILED); - OUTPUT_Result(subtest); - } - else - { - pMem = GlobalLock(hMem); - subtest = TEST_CombineStatus(subtest, PASSED); - subtest = TEST_CombineStatus(subtest, TEST_MemoryRead(pMem, MEM_BLOCK_SIZE + 100)); - if (FAILED == subtest) - { - OUTPUT_Line("Memory Read failed."); - } - subtest = TEST_CombineStatus(subtest, TEST_MemoryWrite(pMem, MEM_BLOCK_SIZE + 100)); - if (FAILED == subtest) - { - OUTPUT_Line("Memory Write failed."); - } - GlobalUnlock(hMem); - } - } - - GlobalFree(hMem); - } - else - { - OUTPUT_Line("Global Alloc Failed."); - subtest = TEST_CombineStatus(subtest, FAILED); - } - OUTPUT_Line("Subtest result:"); - OUTPUT_Result(subtest); - OUTPUT_Line(""); - - result = TEST_CombineStatus(result, subtest); - subtest = SKIPPED; - - /* case 2 only move a fixed block */ - OUTPUT_Line("Allocating buffer"); - hMem = GlobalAlloc(GMEM_FIXED, MEM_BLOCK_SIZE); - if (0 != hMem) - { - OUTPUT_Line("Testing to see if a new fixed block is returned."); - hReAlloced = GlobalReAlloc(hMem, MEM_BLOCK_SIZE - 100, GMEM_MOVEABLE); - if (0 == hReAlloced) - { - OUTPUT_Line("GlobalReAlloc failed-- returned NULL"); - subtest = TEST_CombineStatus(subtest, FAILED); - OUTPUT_Result(subtest); - } - else - { - OUTPUT_Line("Alloced Handle: "); - OUTPUT_Handle(hMem); - OUTPUT_Line("ReAlloced Handle: "); - OUTPUT_Handle(hReAlloced); - if (hMem == hReAlloced) - { - OUTPUT_Line("GlobalReAlloc returned the same pointer. The documentation states that this is wrong, but Windows NT works this way."); - } - - hMem = hReAlloced; - subtest = TEST_CombineStatus(subtest, PASSED); - subtest = TEST_CombineStatus(subtest, TEST_MemoryRead((LPVOID)hMem, MEM_BLOCK_SIZE - 100)); - subtest = TEST_CombineStatus(subtest, TEST_MemoryWrite((LPVOID)hMem, MEM_BLOCK_SIZE - 100)); - } - - GlobalFree(hMem); - } - else - { - subtest = TEST_CombineStatus(subtest, FAILED); - } - OUTPUT_Line("Subtest result:"); - OUTPUT_Result(subtest); - OUTPUT_Line(""); - - result = TEST_CombineStatus(result, subtest); - subtest = SKIPPED; - - /* Case 3: re-allocate a fixed block in place */ - OUTPUT_Line("Allocating buffer"); - hMem = GlobalAlloc(GMEM_FIXED, MEM_BLOCK_SIZE); - if (0 != hMem) - { - OUTPUT_Line("Testing to see if a fixed pointer is reallocated in place."); - hReAlloced = GlobalReAlloc(hMem, MEM_BLOCK_SIZE - 100, 0); - if (0 == hReAlloced) - { - OUTPUT_Line("GlobalReAlloc failed-- returned NULL"); - subtest = TEST_CombineStatus(subtest, FAILED); - OUTPUT_Result(subtest); - } - else - { - OUTPUT_Line("Alloced Handle: "); - OUTPUT_Handle(hMem); - OUTPUT_Line("ReAlloced Handle: "); - OUTPUT_Handle(hReAlloced); - if (hMem != hReAlloced) - { - OUTPUT_Line("GlobalReAlloc returned a different."); - subtest = TEST_CombineStatus(subtest, FAILED); - OUTPUT_Result(subtest); - } - else - { - subtest = TEST_CombineStatus(subtest, PASSED); - subtest = TEST_CombineStatus(subtest, TEST_MemoryRead((LPVOID)hMem, MEM_BLOCK_SIZE - 100)); - subtest = TEST_CombineStatus(subtest, TEST_MemoryWrite((LPVOID)hMem, MEM_BLOCK_SIZE - 100)); - } - } - - GlobalFree(hMem); - } - else - { - subtest = TEST_CombineStatus(subtest, FAILED); - } - OUTPUT_Line("Subtest result:"); - OUTPUT_Result(subtest); - OUTPUT_Line(""); - - result = TEST_CombineStatus(result, subtest); - - OUTPUT_Line(""); - return result; -} -/*--------------------------------------------------------------------------- -** -*/ -TEST_STATUS TestGlobalReAllocMovable() -{ - HGLOBAL hMem = 0; - HGLOBAL hReAlloced = 0; - LPVOID pMem = 0; - TEST_STATUS subtest = SKIPPED; - TEST_STATUS result = SKIPPED; - - OUTPUT_Line("Testing GlobalReAlloc() on memory allocated as GMGM_MOVEABLE"); - - /* case 1 test reallocing a movable block that is unlocked. */ - OUTPUT_Line("Allocating buffer"); - hMem = GlobalAlloc(GMEM_MOVEABLE, MEM_BLOCK_SIZE); - if (0 != hMem) - { - OUTPUT_Line("Testing GlobalReAlloc on a unlocked block."); - hReAlloced = GlobalReAlloc(hMem, MEM_BLOCK_SIZE - 100, 0); - if (0 == hReAlloced) - { - OUTPUT_Line("GlobalReAlloc failed-- returned NULL"); - subtest = TEST_CombineStatus(subtest, FAILED); - OUTPUT_Result(subtest); - } - else - { - OUTPUT_Line("Alloced Handle: "); - OUTPUT_Handle(hMem); - OUTPUT_Line("ReAlloced Handle: "); - OUTPUT_Handle(hReAlloced); - - pMem = GlobalLock(hReAlloced); - hMem = hReAlloced; - subtest = TEST_CombineStatus(subtest, PASSED); - subtest = TEST_CombineStatus(subtest, TEST_MemoryRead(pMem, MEM_BLOCK_SIZE - 100)); - subtest = TEST_CombineStatus(subtest, TEST_MemoryWrite(pMem, MEM_BLOCK_SIZE - 100)); - GlobalUnlock(hReAlloced); - } - - GlobalFree(hMem); - } - else - { - subtest = TEST_CombineStatus(subtest, FAILED); - } - OUTPUT_Line("Subtest result:"); - OUTPUT_Result(subtest); - OUTPUT_Line(""); - - result = TEST_CombineStatus(result, subtest); - subtest = SKIPPED; - - /* Case 2: re-allocate a moveable block that is locked */ - OUTPUT_Line("Allocating buffer"); - hMem = GlobalAlloc(GMEM_MOVEABLE, MEM_BLOCK_SIZE); - if (0 != hMem) - { - - OUTPUT_Line("Testing GlobalReAlloc on a locked block."); - pMem = GlobalLock(hMem); - hReAlloced = GlobalReAlloc(hMem, MEM_BLOCK_SIZE - 100, 0); - if (0 == hReAlloced) - { - OUTPUT_Line("GlobalReAlloc failed-- returned NULL"); - subtest = TEST_CombineStatus(subtest, FAILED); - OUTPUT_Result(subtest); - } - else - { - OUTPUT_Line("Alloced Handle: "); - OUTPUT_Handle(hMem); - OUTPUT_Line("ReAlloced Handle: "); - OUTPUT_Handle(hReAlloced); - if (hMem != hReAlloced) - { - OUTPUT_Line("GlobalReAlloc returned a different block."); - } - pMem = GlobalLock(hReAlloced); - subtest = TEST_CombineStatus(subtest, PASSED); - subtest = TEST_CombineStatus(subtest, TEST_MemoryRead(pMem, MEM_BLOCK_SIZE - 100)); - subtest = TEST_CombineStatus(subtest, TEST_MemoryWrite(pMem , MEM_BLOCK_SIZE - 100)); - GlobalUnlock(hReAlloced); - - } - - GlobalUnlock(hMem); - - GlobalFree(hMem); - } - else - { - subtest = TEST_CombineStatus(subtest, FAILED); - } - OUTPUT_Line("Subtest result:"); - OUTPUT_Result(subtest); - OUTPUT_Line(""); - - result = TEST_CombineStatus(result, subtest); - - OUTPUT_Line(""); - return result; -} - -/*--------------------------------------------------------------------------- -** -*/ -TEST_STATUS TestGlobalReAlloc() -{ - TEST_STATUS result = SKIPPED; - OUTPUT_Banner("Testing GlobalReAlloc()"); - - result = TEST_CombineStatus(result, TestGlobalReAllocFixed()); - result = TEST_CombineStatus(result, TestGlobalReAllocMovable()); - - OUTPUT_Line("GlobalReAlloc test result:"); - OUTPUT_Result(result); - return result; -} - -/*--------------------------------------------------------------------------- -** -*/ -TEST_STATUS TestGlobalFlagsMoveable() -{ - HGLOBAL hMem = 0; - UINT uFlags = 0; - TEST_STATUS result = SKIPPED; - - OUTPUT_Line("Test for the proper lock count"); - - hMem = GlobalAlloc(GMEM_MOVEABLE, MEM_BLOCK_SIZE); - if (0 != hMem) - { - - OUTPUT_Line("Testing initial allocation"); - - OUTPUT_Line("Testing for a lock of 0"); - uFlags = GlobalFlags(hMem); - if (((GMEM_LOCKCOUNT & uFlags) == 0)) /*no locks*/ - { - result = TEST_CombineStatus(result, PASSED); - } - else - { - result = TEST_CombineStatus(result, FAILED); - } - OUTPUT_Result(result); - - OUTPUT_Line("Pointer from handle: "); - OUTPUT_Handle(GlobalLock(hMem)); - - OUTPUT_Line("Testing after a lock"); - OUTPUT_Line("Testing for a lock of 1"); - uFlags = GlobalFlags(hMem); - if (((GMEM_LOCKCOUNT & uFlags) == 1)) /*no locks*/ - { - result = TEST_CombineStatus(result, PASSED); - } - else - { - result = TEST_CombineStatus(result, FAILED); - } - OUTPUT_Result(result); - - GlobalUnlock(hMem); - OUTPUT_Line("Testing after an unlock"); - OUTPUT_Line("Testing for a lock of 0"); - uFlags = GlobalFlags(hMem); - if (((GMEM_LOCKCOUNT & uFlags) == 0)) /*no locks*/ - { - result = TEST_CombineStatus(result, PASSED); - } - else - { - result = TEST_CombineStatus(result, FAILED); - } - OUTPUT_Result(result); - } - else - { - OUTPUT_Line("GlobalAlloc failed!"); - result = TEST_CombineStatus(result, FAILED); - } - - OUTPUT_Line("Test for discarded memory"); - OUTPUT_Line("Allocating an empty moveable block---automatically marked as discarded"); - hMem = GlobalAlloc(GMEM_MOVEABLE, 0); /*allocate a discarded block*/ - if (0 != hMem) - { - OUTPUT_Line("Allocation handle: "); - OUTPUT_Handle(hMem); - OUTPUT_Line("Testing for a discarded flag"); - uFlags = GlobalFlags(hMem); - if (0 != (uFlags & GMEM_DISCARDED)) /*discarded*/ - { - result = TEST_CombineStatus(result, PASSED); - } - else - { - result = TEST_CombineStatus(result, FAILED); - } - OUTPUT_Line("Flags:"); - OUTPUT_HexDword(uFlags); - OUTPUT_Result(result); - - GlobalFree(hMem); - } - else - { - OUTPUT_Line("GlobalAlloc failed!"); - result = TEST_CombineStatus(result, FAILED); - } - return result; -} - - -/*--------------------------------------------------------------------------- -** -*/ -TEST_STATUS TestGlobalFlagsFixed() -{ - HGLOBAL hMem = 0; - UINT uFlags = 0; - TEST_STATUS result = SKIPPED; - - OUTPUT_Line("Testing for correct handling of GMEM_FIXED memory"); - hMem = GlobalAlloc(GMEM_FIXED, MEM_BLOCK_SIZE); - if (0 != hMem) - { - - OUTPUT_Line("Allocation handle: "); - OUTPUT_Handle(hMem); - - OUTPUT_Line("Testing initial allocation"); - OUTPUT_Line("Testing for non-discarded and lock of 0"); - uFlags = GlobalFlags(hMem); - if (((GMEM_LOCKCOUNT & uFlags) == 0) && /*no locks*/ - (((uFlags >> 8) & 0xff) == 0 )) /*not discarded*/ - { - result = TEST_CombineStatus(result, PASSED); - } - else - { - result = TEST_CombineStatus(result, FAILED); - } - OUTPUT_Result(result); - - OUTPUT_Line("Pointer from handle: "); - OUTPUT_Handle(GlobalLock(hMem)); - OUTPUT_Line("Testing after a lock"); - OUTPUT_Line("Testing for non-discarded and lock of 0"); - uFlags = GlobalFlags(hMem); - if (((GMEM_LOCKCOUNT & uFlags) == 0) && /*no locks*/ - (((uFlags >> 8) & 0xff) == 0 )) /*not discarded*/ - { - result = TEST_CombineStatus(result, PASSED); - } - else - { - result = TEST_CombineStatus(result, FAILED); - } - OUTPUT_Result(result); - - GlobalFree(hMem); - } - else - { - OUTPUT_Line("GlobalAlloc failed!"); - result = TEST_CombineStatus(result, FAILED); - } - - return result; -} -/*--------------------------------------------------------------------------- -** -*/ -TEST_STATUS TestGlobalFlags() -{ - TEST_STATUS result = SKIPPED; - OUTPUT_Banner("Testing GlobalFlags()"); - - result = TEST_CombineStatus(result, TestGlobalFlagsFixed()); - result = TEST_CombineStatus(result, TestGlobalFlagsMoveable()); - - OUTPUT_Line("GlobalFlags result:"); - OUTPUT_Result(result); - return result; -} -/*--------------------------------------------------------------------------- -** -*/ -TEST_STATUS TestGlobalHandle() -{ - HGLOBAL hMem = 0; - HGLOBAL hTest = 0; - PVOID pMem = 0; - TEST_STATUS subtest = SKIPPED; - TEST_STATUS result = SKIPPED; - - OUTPUT_Banner("Testing GlobalHandle()"); - - OUTPUT_Line("Testing GlobalHandle with a block of GMEM_FIXED memory"); - hMem = GlobalAlloc(GMEM_FIXED, MEM_BLOCK_SIZE); - if (0 != hMem) - { - - OUTPUT_Line("Allocation handle: "); - OUTPUT_Handle(hMem); - - hTest = GlobalHandle(hMem); - if (hMem == hTest) - { - subtest = TEST_CombineStatus(subtest, PASSED); - } - else - { - OUTPUT_Line("GlobalHandle returned:"); - OUTPUT_Handle(hTest); - subtest = TEST_CombineStatus(subtest, FAILED); - } - - GlobalFree(hMem); - } - else - { - OUTPUT_Line("GlobalAlloc failed!"); - subtest = TEST_CombineStatus(subtest, FAILED); - } - - OUTPUT_Line("Result from subtest:"); - OUTPUT_Result(subtest); - result = TEST_CombineStatus(result, subtest); - - - subtest = SKIPPED; - OUTPUT_Line("Testing GlobalHandle with a block of GMEM_MOVEABLE memory"); - hMem = GlobalAlloc(GMEM_MOVEABLE, MEM_BLOCK_SIZE); - if (0 != hMem) - { - - OUTPUT_Line("Allocation handle: "); - OUTPUT_Handle(hMem); - pMem = GlobalLock(hMem); - hTest = GlobalHandle(pMem); - if (hMem == hTest) - { - subtest = TEST_CombineStatus(subtest, PASSED); - } - else - { - OUTPUT_Line("GlobalHandle returned:"); - OUTPUT_Handle(hTest); - subtest = TEST_CombineStatus(subtest, FAILED); - } - - GlobalUnlock(hMem); - GlobalFree(hMem); - } - else - { - OUTPUT_Line("GlobalAlloc failed!"); - subtest = TEST_CombineStatus(subtest, FAILED); - } - - OUTPUT_Line("Result from subtest:"); - OUTPUT_Result(subtest); - result = TEST_CombineStatus(result, subtest); - - - OUTPUT_Line("Global Handle test results:"); - OUTPUT_Result(result); - return result; -} - -/*--------------------------------------------------------------------------- -** -*/ -TEST_STATUS TestGlobalSize() -{ - HGLOBAL hMem = 0; - SIZE_T size = 0; - TEST_STATUS subtest = SKIPPED; - TEST_STATUS result = SKIPPED; - OUTPUT_Banner("Testing GlobalSize()"); - - OUTPUT_Line("Testing GlobalSize with a block of GMEM_FIXED memory"); - hMem = GlobalAlloc(GMEM_FIXED, MEM_BLOCK_SIZE); - if (0 != hMem) - { - size = GlobalSize(hMem); - if (MEM_BLOCK_SIZE <= size) - { - subtest = TEST_CombineStatus(subtest, PASSED); - } - else - { - OUTPUT_Line("GlobalSize returned:"); - OUTPUT_HexDword(size); - subtest = TEST_CombineStatus(subtest, FAILED); - } - - GlobalFree(hMem); - } - else - { - OUTPUT_Line("GlobalAlloc failed!"); - subtest = TEST_CombineStatus(subtest, FAILED); - } - - OUTPUT_Line("Result from subtest:"); - OUTPUT_Result(subtest); - result = TEST_CombineStatus(result, subtest); - - OUTPUT_Line("Testing GlobalSize with a block of GMEM_MOVEABLE memory"); - hMem = GlobalAlloc(GMEM_MOVEABLE, MEM_BLOCK_SIZE); - if (0 != hMem) - { - size = GlobalSize(hMem); - if (MEM_BLOCK_SIZE <= size) - { - subtest = TEST_CombineStatus(subtest, PASSED); - } - else - { - OUTPUT_Line("GlobalSize returned:"); - OUTPUT_HexDword(size); - subtest = TEST_CombineStatus(subtest, FAILED); - } - - GlobalFree(hMem); - } - else - { - OUTPUT_Line("GlobalAlloc failed!"); - subtest = TEST_CombineStatus(subtest, FAILED); - } - - OUTPUT_Line("Result from subtest:"); - OUTPUT_Result(subtest); - result = TEST_CombineStatus(result, subtest); - - OUTPUT_Line("Testing GlobalSize with discarded memory"); - hMem = GlobalAlloc(GMEM_MOVEABLE, 0); - if (0 != hMem) - { - size = GlobalSize(hMem); - if (0 == size) - { - subtest = TEST_CombineStatus(subtest, PASSED); - } - else - { - OUTPUT_Line("GlobalSize returned:"); - OUTPUT_HexDword(size); - subtest = TEST_CombineStatus(subtest, FAILED); - } - - GlobalFree(hMem); - } - else - { - OUTPUT_Line("GlobalAlloc failed!"); - subtest = TEST_CombineStatus(subtest, FAILED); - } - - OUTPUT_Line("Result from subtest:"); - OUTPUT_Result(subtest); - result = TEST_CombineStatus(result, subtest); - - OUTPUT_Line("Test result:"); - OUTPUT_Result(result); - return result; -} - -/*--------------------------------------------------------------------------- -** -*/ -TEST_STATUS TestGlobalDiscard() -{ - HGLOBAL hMem = 0; - HGLOBAL hTest = 0; - DWORD uFlags = 0; - TEST_STATUS subtest = SKIPPED; - TEST_STATUS result = SKIPPED; - - OUTPUT_Banner("Testing GlobalDiscard()"); - hMem = GlobalAlloc(GMEM_MOVEABLE, MEM_BLOCK_SIZE); - if (0 != hMem) - { - OUTPUT_Line("Allocation handle: "); - OUTPUT_Handle(hMem); - - hTest = GlobalDiscard(hMem); - if (0 == hTest) - { - OUTPUT_Line("GlobalDiscard returned NULL"); - subtest = TEST_CombineStatus(subtest, FAILED); - } - else - { - uFlags = GlobalFlags(hTest); - OUTPUT_Line("Flags from the new memory block."); - OUTPUT_HexDword(uFlags); - if (0 != (uFlags & GMEM_DISCARDED)) - { - subtest = TEST_CombineStatus(subtest, PASSED); - } - else - { - OUTPUT_Line("Block is not marked as discardable."); - subtest = TEST_CombineStatus(subtest, FAILED); - } - } - - GlobalFree(hTest); - } - else - { - OUTPUT_Line("GlobalAlloc failed!"); - subtest = TEST_CombineStatus(subtest, FAILED); - } - - OUTPUT_Line("Result from subtest:"); - OUTPUT_Result(subtest); - - result = TEST_CombineStatus(result, subtest); - - OUTPUT_Result(result); - return result; -} - -/*--------------------------------------------------------------------------- -** -*/ -int main(int argc, char ** argv) -{ - TEST_STATUS test_set = SKIPPED; - OUTPUT_Banner("Testing GlobalXXX memory management functions."); - - test_set = TEST_CombineStatus(test_set, TestGlobalAllocNFree(GPTR)); - test_set = TEST_CombineStatus(test_set, TestGlobalAllocNFree(GHND)); - test_set = TEST_CombineStatus(test_set, TestGlobalAllocNFree(GMEM_FIXED)); - test_set = TEST_CombineStatus(test_set, TestGlobalAllocNFree(GMEM_MOVEABLE)); - - if (FAILED == test_set) - { - OUTPUT_Line("Skipping any further tests. GlobalAlloc/Free fails."); - OUTPUT_Result(test_set); - return test_set; - } - - test_set = TEST_CombineStatus(test_set, TestGlobalLockNUnlock(GPTR)); - test_set = TEST_CombineStatus(test_set, TestGlobalLockNUnlock(GHND)); - test_set = TEST_CombineStatus(test_set, TestGlobalLockNUnlock(GMEM_FIXED)); - test_set = TEST_CombineStatus(test_set, TestGlobalLockNUnlock(GMEM_MOVEABLE)); - - test_set = TEST_CombineStatus(test_set, TestGlobalReAlloc()); - - test_set = TEST_CombineStatus(test_set, TestGlobalFlags()); - - test_set = TEST_CombineStatus(test_set, TestGlobalHandle()); - - test_set = TEST_CombineStatus(test_set, TestGlobalSize()); - - test_set = TEST_CombineStatus(test_set, TestGlobalDiscard()); - - /* output the result for the entire set of tests*/ - OUTPUT_Banner("Test suite result"); - OUTPUT_Result(test_set); - return test_set; -} diff --git a/rostests/tests/global_mem/global_mem.rbuild b/rostests/tests/global_mem/global_mem.rbuild deleted file mode 100644 index f6ff723384a..00000000000 --- a/rostests/tests/global_mem/global_mem.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - global_mem.c - diff --git a/rostests/tests/gradient/gradient.c b/rostests/tests/gradient/gradient.c deleted file mode 100644 index 107b0ae9cde..00000000000 --- a/rostests/tests/gradient/gradient.c +++ /dev/null @@ -1,184 +0,0 @@ -#include -#include -#include - -BOOL WINAPI GdiGradientFill( HDC hdc, TRIVERTEX *vert_array, ULONG nvert, - void * grad_array, ULONG ngrad, ULONG mode ); - -LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM); - -int WINAPI -WinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpszCmdLine, - int nCmdShow) -{ - WNDCLASS wc; - MSG msg; - HWND hWnd; - - wc.lpszClassName = "GradientClass"; - wc.lpfnWndProc = MainWndProc; - wc.style = CS_VREDRAW | CS_HREDRAW; - wc.hInstance = hInstance; - wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION); - wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW); - wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH); - wc.lpszMenuName = NULL; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - if (RegisterClass(&wc) == 0) - { - fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - hWnd = CreateWindow("GradientClass", - "GradientFill Test", - WS_OVERLAPPEDWINDOW|WS_HSCROLL|WS_VSCROLL, - 0, - 0, - CW_USEDEFAULT, - CW_USEDEFAULT, - NULL, - NULL, - hInstance, - NULL); - if (hWnd == NULL) - { - fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - //tf = CreateFontA(14, 0, 0, TA_BASELINE, FW_NORMAL, FALSE, FALSE, FALSE, - // ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, - // DEFAULT_QUALITY, FIXED_PITCH|FF_DONTCARE, "Timmons"); - - ShowWindow(hWnd, nCmdShow); - - while(GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - //DeleteObject(tf); - - return msg.wParam; -} -LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - HDC hDC; - - switch(msg) - { - case WM_PAINT: - { - PAINTSTRUCT ps; - TRIVERTEX vert [5] ; - GRADIENT_TRIANGLE gTRi[3]; - GRADIENT_RECT gRect[2]; - hDC = BeginPaint(hWnd, &ps); - - vert [0] .x = 0; - vert [0] .y = 0; - vert [0] .Red = 0xff00; - vert [0] .Green = 0xff00; - vert [0] .Blue = 0xff00; - vert [0] .Alpha = 0x0000; - - vert [1] .x = 300; - vert [1] .y = 20; - vert [1] .Red = 0x0000; - vert [1] .Green = 0x0000; - vert [1] .Blue = 0xff00; - vert [1] .Alpha = 0x0000; - - vert [2] .x = 100; - vert [2] .y = 200; - vert [2] .Red = 0xff00; - vert [2] .Green = 0x0000; - vert [2] .Blue = 0x0000; - vert [2] .Alpha = 0x0000; - - vert [3] .x = 250; - vert [3] .y = 300; - vert [3] .Red = 0x8000; - vert [3] .Green = 0x8000; - vert [3] .Blue = 0x0000; - vert [3] .Alpha = 0x0000; - - vert [4] .x = 325; - vert [4] .y = 300; - vert [4] .Red = 0x0000; - vert [4] .Green = 0xff00; - vert [4] .Blue = 0x0000; - vert [4] .Alpha = 0x0000; - - gTRi[0].Vertex1 = 0; - gTRi[0].Vertex2 = 1; - gTRi[0].Vertex3 = 2; - - gTRi[1].Vertex1 = 1; - gTRi[1].Vertex2 = 2; - gTRi[1].Vertex3 = 3; - - gTRi[2].Vertex1 = 1; - gTRi[2].Vertex2 = 3; - gTRi[2].Vertex3 = 4; - - GdiGradientFill(hDC,vert,5,&gTRi,3,GRADIENT_FILL_TRIANGLE); - - - vert [0] .x = 5; - vert [0] .y = 200; - vert [0] .Red = 0x0000; - vert [0] .Green = 0x0000; - vert [0] .Blue = 0x0000; - vert [0] .Alpha = 0x0000; - - vert [1] .x = 90; - vert [1] .y = 240; - vert [1] .Red = 0x0000; - vert [1] .Green = 0x0000; - vert [1] .Blue = 0xff00; - vert [1] .Alpha = 0x0000; - - vert [2] .x = 5; - vert [2] .y = 245; - vert [2] .Red = 0x0000; - vert [2] .Green = 0x0000; - vert [2] .Blue = 0x0000; - vert [2] .Alpha = 0x0000; - - vert [3] .x = 90; - vert [3] .y = 300; - vert [3] .Red = 0x0000; - vert [3] .Green = 0x0000; - vert [3] .Blue = 0xff00; - vert [3] .Alpha = 0x0000; - - gRect[0].UpperLeft = 0; - gRect[0].LowerRight = 1; - - gRect[1].UpperLeft = 2; - gRect[1].LowerRight = 3; - - GdiGradientFill(hDC,vert,4,&gRect[0],1,GRADIENT_FILL_RECT_H); - GdiGradientFill(hDC,vert,4,&gRect[1],1,GRADIENT_FILL_RECT_V); - - EndPaint(hWnd, &ps); - break; - } - - case WM_DESTROY: - PostQuitMessage(0); - break; - - default: - return DefWindowProc(hWnd, msg, wParam, lParam); - } - return 0; -} diff --git a/rostests/tests/gradient/gradient.rbuild b/rostests/tests/gradient/gradient.rbuild deleted file mode 100644 index d085e899dff..00000000000 --- a/rostests/tests/gradient/gradient.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - gradient.c - diff --git a/rostests/tests/guithreadinfo/guithreadinfo.c b/rostests/tests/guithreadinfo/guithreadinfo.c deleted file mode 100644 index 6a0cce69279..00000000000 --- a/rostests/tests/guithreadinfo/guithreadinfo.c +++ /dev/null @@ -1,132 +0,0 @@ -#include -#include -#include - -static GUITHREADINFO gti; -//HFONT tf; -LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM); - -int WINAPI -WinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpszCmdLine, - int nCmdShow) -{ - WNDCLASS wc; - MSG msg; - HWND hWnd; - - wc.lpszClassName = "GuiThreadInfoClass"; - wc.lpfnWndProc = MainWndProc; - wc.style = CS_VREDRAW | CS_HREDRAW; - wc.hInstance = hInstance; - wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION); - wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW); - wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH); - wc.lpszMenuName = NULL; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - if (RegisterClass(&wc) == 0) - { - fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - hWnd = CreateWindow("GuiThreadInfoClass", - "GetGUIThreadInfo", - WS_OVERLAPPEDWINDOW|WS_HSCROLL|WS_VSCROLL, - 0, - 0, - CW_USEDEFAULT, - CW_USEDEFAULT, - NULL, - NULL, - hInstance, - NULL); - if (hWnd == NULL) - { - fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - //tf = CreateFontA(14, 0, 0, TA_BASELINE, FW_NORMAL, FALSE, FALSE, FALSE, - // ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, - // DEFAULT_QUALITY, FIXED_PITCH|FF_DONTCARE, "Timmons"); - - gti.cbSize = sizeof(GUITHREADINFO); - GetGUIThreadInfo(0, >i); - - SetTimer(hWnd, 1, 1000, NULL); - ShowWindow(hWnd, nCmdShow); - - while(GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - //DeleteObject(tf); - - return msg.wParam; -} - -LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - PAINTSTRUCT ps; - HDC hDC; - char str[255]; - - switch(msg) - { - - case WM_PAINT: - hDC = BeginPaint(hWnd, &ps); - wsprintf(str, "flags: "); - if(gti.flags & GUI_16BITTASK) lstrcat(str, "GUI_16BITTASK "); - if(gti.flags & GUI_CARETBLINKING) lstrcat(str, "GUI_CARETBLINKING "); - if(gti.flags & GUI_INMENUMODE) lstrcat(str, "GUI_INMENUMODE "); - if(gti.flags & GUI_INMOVESIZE) lstrcat(str, "GUI_INMOVESIZE "); - if(gti.flags & GUI_POPUPMENUMODE) lstrcat(str, "GUI_POPUPMENUMODE "); - if(gti.flags & GUI_SYSTEMMENUMODE) lstrcat(str, "GUI_SYSTEMMENUMODE "); - TextOut(hDC, 10, 10, str, strlen(str)); - - wsprintf(str, "hwndActive == %08X", gti.hwndActive); - TextOut(hDC, 10, 30, str, strlen(str)); - wsprintf(str, "hwndFocus == %08X", gti.hwndFocus); - TextOut(hDC, 10, 50, str, strlen(str)); - wsprintf(str, "hwndCapture == %08X", gti.hwndCapture); - TextOut(hDC, 10, 70, str, strlen(str)); - wsprintf(str, "hwndMenuOwner == %08X", gti.hwndMenuOwner); - TextOut(hDC, 10, 90, str, strlen(str)); - wsprintf(str, "hwndMoveSize == %08X", gti.hwndMoveSize); - TextOut(hDC, 10, 110, str, strlen(str)); - wsprintf(str, "hwndCaret == %08X", gti.hwndCaret); - TextOut(hDC, 10, 130, str, strlen(str)); - wsprintf(str, "rcCaret == (%lu, %lu, %lu, %lu)", gti.rcCaret.left, gti.rcCaret.top, gti.rcCaret.right, gti.rcCaret.bottom); - TextOut(hDC, 10, 150, str, strlen(str)); - - wsprintf(str, "GetGuiResources for the current process: %08X", GetCurrentProcess()); - TextOut(hDC, 10, 180, str, strlen(str)); - wsprintf(str, "GetGuiResources: GR_GDIOBJECTS == %04X", GetGuiResources(GetCurrentProcess(), GR_GDIOBJECTS)); - TextOut(hDC, 10, 200, str, strlen(str)); - wsprintf(str, "GetGuiResources: GR_USEROBJECTS == %04x", GetGuiResources(GetCurrentProcess(), GR_USEROBJECTS)); - TextOut(hDC, 10, 220, str, strlen(str)); - EndPaint(hWnd, &ps); - break; - - case WM_TIMER: - GetGUIThreadInfo(0, >i); - InvalidateRect(hWnd, NULL, TRUE); - break; - - case WM_DESTROY: - PostQuitMessage(0); - break; - - default: - return DefWindowProc(hWnd, msg, wParam, lParam); - } - return 0; -} diff --git a/rostests/tests/guithreadinfo/guithreadinfo.rbuild b/rostests/tests/guithreadinfo/guithreadinfo.rbuild deleted file mode 100644 index e6637d740b8..00000000000 --- a/rostests/tests/guithreadinfo/guithreadinfo.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - guithreadinfo.c - diff --git a/rostests/tests/hello/hello.c b/rostests/tests/hello/hello.c deleted file mode 100644 index bba959ab8f9..00000000000 --- a/rostests/tests/hello/hello.c +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include - -int main(int argc, char* argv[]) -{ - printf("Hello world\n"); - return(0); -} diff --git a/rostests/tests/hello/hello.rbuild b/rostests/tests/hello/hello.rbuild deleted file mode 100644 index e5016ffba83..00000000000 --- a/rostests/tests/hello/hello.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - hello.c - diff --git a/rostests/tests/hivetest/hivetest.c b/rostests/tests/hivetest/hivetest.c deleted file mode 100644 index 5d13432aec2..00000000000 --- a/rostests/tests/hivetest/hivetest.c +++ /dev/null @@ -1,1031 +0,0 @@ -#include -#include -#include -#define WIN32_NO_STATUS -#include -#define NTOS_MODE_USER -#include -#include - -#define RtlRosInitUnicodeStringFromLiteral(__Name__, __Value__) \ - { \ - (__Name__)->Buffer = (__Value__); \ - (__Name__)->Length = sizeof(__Value__) - sizeof(WCHAR); \ - (__Name__)->MaximumLength = sizeof(__Value__); \ - } - -HANDLE OutputHandle; -HANDLE InputHandle; - -void dprintf(char* fmt, ...) -{ - va_list args; - char buffer[255]; - - va_start(args,fmt); - vsprintf(buffer,fmt,args); - WriteConsoleA(OutputHandle, buffer, strlen(buffer), NULL, NULL); - va_end(args); -} - -void do_enumeratekey(PWSTR Name) -{ - ULONG Index,Length,i; - KEY_BASIC_INFORMATION KeyInformation[5]; - NTSTATUS Status; - OBJECT_ATTRIBUTES ObjectAttributes; - HANDLE hKey1; - UNICODE_STRING KeyName; - - RtlInitUnicodeString(&KeyName, Name); - InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE - , NULL, NULL); - Status=NtOpenKey( &hKey1, MAXIMUM_ALLOWED, &ObjectAttributes); - dprintf("NtEnumerateKey : \n"); - Index=0; - while(Status == STATUS_SUCCESS) - { - Status=NtEnumerateKey(hKey1,Index++,KeyBasicInformation - ,&KeyInformation[0], sizeof(KeyInformation) - ,&Length); - if(Status== STATUS_SUCCESS) - { - dprintf("\tSubKey Name = "); - for (i=0;i - user32 - ntdll - advapi32 - hivetest.c -
diff --git a/rostests/tests/iptest/iptest.cpp b/rostests/tests/iptest/iptest.cpp deleted file mode 100644 index 8d67a7cd086..00000000000 --- a/rostests/tests/iptest/iptest.cpp +++ /dev/null @@ -1,476 +0,0 @@ -#include -#include -#include -#include -extern "C" { - typedef unsigned short u_short; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -}; - -/* Undis */ -extern "C" VOID ExpInitLookasideLists(); - -std::list output_packets; -DWORD DebugTraceLevel = 0x7fffffff; -PVOID GlobalBufferPool, GlobalPacketPool; - -#define MAX_DG_SIZE 16384 - -char hwaddr[6] = { 0x08, 0x00, 0x20, 0x0b, 0xb7, 0xbb }; - -char hdr[14] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x00 }; - -#define STRINGIFY(x) #x - -void display_row( char *data, int off, int len ) { - int i; - - printf( "%08x:", off ); - for( i = off; i < len && i < off + 16; i++ ) { - printf( " %02x", data[i] & 0xff ); - } - - printf( " -- " ); - - for( i = off; i < len && i < off + 16; i++ ) { - printf( "%c", (data[i] >= ' ') ? data[i] : '.' ); - } - - printf( "\n" ); -} - -void connect_complete( void *context, NTSTATUS status, unsigned long count ) { - printf( "Connection: status %x\n", status ); -} - -void receive_complete( void *context, NTSTATUS status, unsigned long count ) { - printf( "Receive: status %s (bytes %d)\n", status, count ); - if( !status && count ) { - for( int off = 0; off < count; off += 16 ) { - display_row( (char *)context, off, count ); - } - printf( "\n" ); - } -} - -class SocketObject { -public: - virtual ~SocketObject() { } - virtual int send( char *buf, int len, int *bytes, - struct sockaddr_in *si ) = 0; - virtual int recv( char *buf, int len, int *bytes, - struct sockaddr_in *si ) = 0; -}; - -UINT TdiAddressSizeFromType( UINT AddressType ) { - switch( AddressType ) { - case TDI_ADDRESS_TYPE_IP: - return sizeof(TA_IP_ADDRESS); - default: - KeBugCheck( 0 ); - } - return 0; -} - -NTSTATUS TdiBuildNullConnectionInfoInPlace -( PTDI_CONNECTION_INFORMATION ConnInfo, - ULONG Type ) -/* - * FUNCTION: Builds a NULL TDI connection information structure - * ARGUMENTS: - * ConnectionInfo = Address of buffer to place connection information - * Type = TDI style address type (TDI_ADDRESS_TYPE_XXX). - * RETURNS: - * Status of operation - */ -{ - ULONG TdiAddressSize; - - TdiAddressSize = TdiAddressSizeFromType(Type); - - RtlZeroMemory(ConnInfo, - sizeof(TDI_CONNECTION_INFORMATION) + - TdiAddressSize); - - ConnInfo->OptionsLength = sizeof(ULONG); - ConnInfo->RemoteAddressLength = 0; - ConnInfo->RemoteAddress = NULL; - - return STATUS_SUCCESS; -} - -NTSTATUS TdiBuildNullConnectionInfo -( PTDI_CONNECTION_INFORMATION *ConnectionInfo, - ULONG Type ) -/* - * FUNCTION: Builds a NULL TDI connection information structure - * ARGUMENTS: - * ConnectionInfo = Address of buffer pointer to allocate connection - * information in - * Type = TDI style address type (TDI_ADDRESS_TYPE_XXX). - * RETURNS: - * Status of operation - */ -{ - PTDI_CONNECTION_INFORMATION ConnInfo; - ULONG TdiAddressSize; - NTSTATUS Status; - - TdiAddressSize = TdiAddressSizeFromType(Type); - - ConnInfo = (PTDI_CONNECTION_INFORMATION) - ExAllocatePool(NonPagedPool, - sizeof(TDI_CONNECTION_INFORMATION) + - TdiAddressSize); - if (!ConnInfo) - return STATUS_INSUFFICIENT_RESOURCES; - - Status = TdiBuildNullConnectionInfoInPlace( ConnInfo, Type ); - - if (!NT_SUCCESS(Status)) - ExFreePool( ConnInfo ); - else - *ConnectionInfo = ConnInfo; - - ConnInfo->RemoteAddress = (PTA_ADDRESS)&ConnInfo[1]; - ConnInfo->RemoteAddressLength = TdiAddressSize; - - return Status; -} - - -UINT TaLengthOfTransportAddress( PTRANSPORT_ADDRESS Addr ) { - UINT AddrLen = 2 * sizeof( ULONG ) + Addr->Address[0].AddressLength; - printf("AddrLen %x\n", AddrLen); - return AddrLen; -} - -NTSTATUS -TdiBuildConnectionInfoInPlace -( PTDI_CONNECTION_INFORMATION ConnectionInfo, - PTA_ADDRESS Address ) { - NTSTATUS Status = STATUS_SUCCESS; - - RtlCopyMemory( ConnectionInfo->RemoteAddress, - Address, - ConnectionInfo->RemoteAddressLength ); - - return Status; -} - -NTSTATUS -TdiBuildConnectionInfo -( PTDI_CONNECTION_INFORMATION *ConnectionInfo, - PTA_ADDRESS Address ) { - NTSTATUS Status = TdiBuildNullConnectionInfo( ConnectionInfo, - Address->AddressType ); - - if( NT_SUCCESS(Status) ) - TdiBuildConnectionInfoInPlace( *ConnectionInfo, Address ); - - return Status; -} - -class TCPSocketObject : public SocketObject { -public: - TCPSocketObject( std::string host, int port, NTSTATUS *status ) { - TA_IP_ADDRESS ConnectTo; - PTDI_CONNECTION_INFORMATION ConnInfo; - - ConnectTo.TAAddressCount = 1; - ConnectTo.Address[0].AddressLength = sizeof(TDI_ADDRESS_IP); - ConnectTo.Address[0].AddressType = TDI_ADDRESS_TYPE_IP; - ConnectTo.Address[0].Address[0].sin_port = htons(port); - ConnectTo.Address[0].Address[0].in_addr = 0x6a020a0a; - - TdiBuildConnectionInfo( &ConnInfo, (PTA_ADDRESS)&ConnectTo ); - - Connection = TCPAllocateConnectionEndpoint( NULL ); - *status = TCPSocket( Connection, - AF_INET, - SOCK_STREAM, IPPROTO_TCP ); - if( !*status ) - *status = TCPConnect( Connection, - ConnInfo, - NULL, - connect_complete, - NULL ); - } - - ~TCPSocketObject() { - TCPClose( Connection ); - if( Connection ) TCPFreeConnectionEndpoint( Connection ); - } - - int send( char *buf, int len, int *bytes, struct sockaddr_in *si ) { - NTSTATUS Status = STATUS_UNSUCCESSFUL; - - if( Connection ) - Status = TCPSendData( Connection, - buf, - len, - (PULONG)bytes, - 0 ); - return Status; - } - - int recv( char *buf, int len, int *bytes, struct sockaddr_in *si ) { - NTSTATUS Status = STATUS_UNSUCCESSFUL; - - if( Connection ) - Status = TCPSendData( Connection, - buf, - len, - (PULONG)bytes, - 0 ); - return Status; - } - -private: - PCONNECTION_ENDPOINT Connection; -}; - -VOID SendPacket( PVOID Context, - PNDIS_PACKET NdisPacket, - UINT Offset, - PVOID LinkAddress, - USHORT Type ) { - PCHAR DataOut; - PUCHAR Addr = (PUCHAR)LinkAddress; - UINT Size; - std::string output_packet; - - printf( "Sending packet: %02x:%02x:%02x:%02x:%02x:%02x\n", - Addr[0], Addr[1], Addr[2], Addr[3], Addr[4], Addr[5] ); - - GetDataPtr( NdisPacket, Offset, &DataOut, &Size ); - for( int off = 0; off < Size; off += 16 ) { - display_row( DataOut, off, Size ); - } - printf( "\n" ); - - output_packet += std::string( hwaddr, sizeof(hwaddr) ); - output_packet += std::string( (char *)LinkAddress, sizeof(hwaddr) ); - output_packet += (char)(Type >> 8); - output_packet += (char)Type; - output_packet += std::string( DataOut + Offset, Size - Offset ); - - output_packets.push_back( output_packet ); -} - -#if 0 -UINT CopyBufferToBufferChain -( PNDIS_BUFFER DstBuffer, UINT DstOffset, PCHAR SrcData, UINT Length ) { - assert( 0 ); -} -#endif - -int main( int argc, char **argv ) { - int asock = INVALID_SOCKET, selret, dgrecv, fromsize, err, port = 5001; - int bytes, adapter_id, mtu, speed; - char datagram[MAX_DG_SIZE]; - struct fd_set readf; - struct timeval tv; - struct sockaddr_in addr_from = { AF_INET }, addr_to; - std::string word, cmdin, host; - std::list::iterator i; - WSADATA wsadata; - NTSTATUS Status; - UNICODE_STRING RegistryUnicodePath; - PCONNECTION_ENDPOINT Connection; - PIP_INTERFACE Interface; - IP_PACKET IPPacket; - LLIP_BIND_INFO BindInfo; - SocketObject *S = NULL; - - RtlInitUnicodeString - ( &RegistryUnicodePath, - L"\\SYSTEM\\CurrentControlSet\\Services" - L"\\Tcpip" ); - - ExpInitLookasideLists(); - - WSAStartup( 0x101, &wsadata ); - - if( argc > 1 ) port = atoi(argv[1]); - - IPStartup( &RegistryUnicodePath ); - - BindInfo.Context = NULL; - BindInfo.HeaderSize = sizeof(ETH_HEADER); - BindInfo.MTU = 1500; /* MTU for ethernet */ - BindInfo.Address = (PUCHAR)hwaddr; - BindInfo.AddressLength = sizeof(hwaddr); - BindInfo.Transmit = SendPacket; - - IPCreateInterface( &BindInfo ); - - asock = socket( AF_INET, SOCK_DGRAM, 0 ); - - addr_from.sin_port = htons( port ); - - if( bind( asock, (struct sockaddr *)&addr_from, sizeof( addr_from ) ) ) { - printf( "Bind error\n" ); - return 0; - } - - while( true ) { - FD_ZERO( &readf ); - FD_SET( asock, &readf ); - tv.tv_sec = 0; - tv.tv_usec = 10000; - selret = select( asock + 1, &readf, NULL, NULL, &tv ); - - if( FD_ISSET( asock, &readf ) ) { - fromsize = sizeof( addr_from ); - dgrecv = recvfrom( asock, datagram, sizeof(datagram), 0, - (struct sockaddr *)&addr_from, &fromsize ); - - if( datagram[0] == 'C' && datagram[1] == 'M' && - datagram[2] == 'D' && datagram[3] == ' ' ) { - int theport, bytes, recvret, off, bytin; - struct sockaddr_in nam; - std::string faddr, word; - std::istringstream - cmdin( std::string( datagram + 4, dgrecv - 4 ) ); - - cmdin >> word; - -/* UDP Section */ - if( word == "udpsocket" ) { -/* TCP Section */ - } else if( word == "tcpsocket" ) { - cmdin >> host >> port; - S = new TCPSocketObject( host, port, &Status ); - fprintf( stderr, "Socket: Result %x\n", Status ); - } else if( word == "close" ) { - TCPClose( Connection ); - TCPFreeConnectionEndpoint( Connection ); - } else if( word == "type" ) { - std::string therest = &cmdin.str()[word.size()]; - char* p = &therest[0]; - p += strspn ( p, " \t" ); - char* src = p; - char* dst = p; - while ( *src ) - { - char c = *src++; - if ( c == '\r' || c == '\n' ) break; - if ( c == '\\' ) - { - c = *src++; - switch ( c ) - { - case 'b': c = '\b'; break; - case 'n': c = '\n'; break; - case 'r': c = '\r'; break; - case 't': c = '\t'; break; - case 'v': c = '\v'; break; - } - } - *dst++ = c; - } - *dst = '\0'; - if( S ) - err = S->send( p, strlen(p), &bytes, NULL ); - if( err > 0 ) { bytin = err; err = 0; } - - if( err ) - fprintf ( stderr, "OskitTCPConnect: error %d\n", - err ); - else { - printf ( "wrote %d bytes\n", bytin ); - } - } else if( word == "send" ) { - off = 0; - while( cmdin >> word ) { - datagram[off++] = - atoi( (std::string("0x") + word).c_str() ); - } - - if( (err = S->send( datagram, off, &bytin, NULL )) != 0 ) { - fprintf( stderr, "OskitTCPConnect: error %d\n", err ); - } else { - printf( "wrote %d bytes\n", bytin ); - } - } else if( word == "recv" ) { - cmdin >> bytes; - - if( (err = S->recv( datagram, - sizeof(datagram), - &bytes, - NULL )) != 0 ) { - fprintf( stderr, "OskitTCPRecv: error %d\n", err ); - } - -/* Misc section */ - } else if( word == "end" ) { - return 0; - } - } else if( dgrecv > 14 ) { - addr_to = addr_from; - - if( datagram[12] == 8 && datagram[13] == 6 ) { - /* Answer arp query */ - char laddr[4]; - /* Mark patch as to the previous sender */ - memcpy( datagram + 32, datagram + 6, 6 ); - memcpy( datagram, datagram + 6, 6 ); - /* Mark packet as from us */ - memcpy( datagram + 22, hwaddr, 6 ); - memcpy( datagram + 6, hwaddr, 6 ); - /* Swap inet addresses */ - memcpy( laddr, datagram + 28, 4 ); - memcpy( datagram + 28, datagram + 38, 4 ); - memcpy( datagram + 38, laddr, 4 ); - /* Set reply opcode */ - datagram[21] = 2; - - err = sendto( asock, datagram, dgrecv, 0, - (struct sockaddr *)&addr_to, - sizeof(addr_to) ); - - if( err != 0 ) - printf( "sendto: %d\n", err ); - } else { - memcpy( hdr, datagram + 6, 6 ); - memcpy( hdr + 6, datagram, 6 ); - memcpy( hdr + 12, datagram + 12, 2 ); - IPPacket.Header = datagram; - IPPacket.Data = datagram + 14; - IPPacket.TotalSize = dgrecv; - IPReceive( Interface, &IPPacket ); - } - } - } - - IPTimeout(NULL, NULL, NULL, NULL); - - for( i = output_packets.begin(); i != output_packets.end(); i++ ) { - err = sendto( asock, i->c_str(), i->size(), 0, - (struct sockaddr *)&addr_to, sizeof(addr_to) ); - - fprintf( stderr, "** SENDING PACKET %d bytes **\n", i->size() ); - - if( err != 0 ) - printf( "sendto: %d\n", err ); - } - - output_packets.clear(); - } -} - diff --git a/rostests/tests/iptest/iptest.rbuild b/rostests/tests/iptest/iptest.rbuild deleted file mode 100644 index d5707db646a..00000000000 --- a/rostests/tests/iptest/iptest.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - iptest.cpp - diff --git a/rostests/tests/isotest/isotest.c b/rostests/tests/isotest/isotest.c deleted file mode 100644 index d2f78513edf..00000000000 --- a/rostests/tests/isotest/isotest.c +++ /dev/null @@ -1,234 +0,0 @@ -/* - * isotest - display cdrom information - */ - -#define WIN32_NO_STATUS -#include -#define NTOS_MODE_USER -#include - -#include -#include -#include -#include -#include - - -void HexDump(char *buffer, ULONG size) -{ - ULONG offset = 0; - unsigned char *ptr; - - while (offset < (size & ~15)) - { - ptr = (unsigned char*)((ULONG_PTR)buffer + offset); - printf("%08lx %02hx %02hx %02hx %02hx %02hx %02hx %02hx %02hx-%02hx %02hx %02hx %02hx %02hx %02hx %02hx %02hx", - offset, - ptr[0], - ptr[1], - ptr[2], - ptr[3], - ptr[4], - ptr[5], - ptr[6], - ptr[7], - ptr[8], - ptr[9], - ptr[10], - ptr[11], - ptr[12], - ptr[13], - ptr[14], - ptr[15]); - - printf(" %c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c\n", - isprint(ptr[0])?ptr[0]:'.', - isprint(ptr[1])?ptr[1]:'.', - isprint(ptr[2])?ptr[2]:'.', - isprint(ptr[3])?ptr[3]:'.', - isprint(ptr[4])?ptr[4]:'.', - isprint(ptr[5])?ptr[5]:'.', - isprint(ptr[6])?ptr[6]:'.', - isprint(ptr[7])?ptr[7]:'.', - isprint(ptr[8])?ptr[8]:'.', - isprint(ptr[9])?ptr[9]:'.', - isprint(ptr[10])?ptr[10]:'.', - isprint(ptr[11])?ptr[11]:'.', - isprint(ptr[12])?ptr[12]:'.', - isprint(ptr[13])?ptr[13]:'.', - isprint(ptr[14])?ptr[14]:'.', - isprint(ptr[15])?ptr[15]:'.'); - - offset += 16; - } - - ptr = (unsigned char*)((ULONG_PTR)buffer + offset); - if (offset < size) - { - printf("%08lx ", offset); - while (offset < size) - { - printf(" %02hx", *ptr); - offset++; - ptr++; - } - } - - printf("\n\n"); -} - - -#ifndef EVENT_ALL_ACCESS -#define EVENT_ALL_ACCESS (0x1f0003L) -#endif - -BOOL -ReadBlock(HANDLE FileHandle, - PVOID Buffer, - PLARGE_INTEGER Offset, - ULONG Length, - PULONG BytesRead) -{ - IO_STATUS_BLOCK IoStatusBlock; - OBJECT_ATTRIBUTES ObjectAttributes; - NTSTATUS Status; - HANDLE EventHandle; - - InitializeObjectAttributes(&ObjectAttributes, - NULL, 0, NULL, NULL); - - Status = NtCreateEvent(&EventHandle, - EVENT_ALL_ACCESS, - &ObjectAttributes, - TRUE, - FALSE); - if (!NT_SUCCESS(Status)) - { - printf("NtCreateEvent() failed\n"); - return(FALSE); - } - - Status = NtReadFile(FileHandle, - EventHandle, - NULL, - NULL, - &IoStatusBlock, - Buffer, - Length, - Offset, - NULL); - if (Status == STATUS_PENDING) - { - NtWaitForSingleObject(EventHandle, FALSE, NULL); - Status = IoStatusBlock.Status; - } - - NtClose(EventHandle); - - if (Status != STATUS_PENDING && BytesRead != NULL) - { - *BytesRead = IoStatusBlock.Information; - } - if (!NT_SUCCESS(Status) && Status != STATUS_END_OF_FILE) - { - printf("ReadBlock() failed (Status: %lx)\n", Status); - return(FALSE); - } - - return(TRUE); -} - - - -int main (int argc, char *argv[]) -{ - HANDLE hDisk; - DWORD dwRead; - char *Buffer; - CHAR Filename[80]; - LARGE_INTEGER FilePosition; - - if (argc != 2) - { - printf("Usage: isotest [Drive:]\n"); - return 0; - } - - strcpy(Filename, "\\\\.\\"); - strcat(Filename, argv[1]); - - hDisk = CreateFile(Filename, - GENERIC_READ, - FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, - OPEN_EXISTING, - 0, - NULL); - if (hDisk == INVALID_HANDLE_VALUE) - { - printf("CreateFile(): Invalid disk handle!\n"); - return 0; - } - - Buffer = (char*)malloc(2048); - if (Buffer == NULL) - { - CloseHandle(hDisk); - printf("Out of memory!\n"); - return 0; - } - memset(Buffer, 0, 2048); - - - FilePosition.QuadPart = 16 * 2048; -#if 0 - SetLastError(NO_ERROR); - SetFilePointer(hDisk, - FilePosition.u.LowPart, - &FilePosition.u.HighPart, - FILE_BEGIN); - if (GetLastError() != NO_ERROR) - { - CloseHandle(hDisk); - free(Buffer); - printf("SetFilePointer() failed!\n"); - return 0; - } - - if (ReadFile(hDisk, - Buffer, - 2048, - &dwRead, - NULL) == FALSE) - { - CloseHandle(hDisk); - free(Buffer); - printf("ReadFile() failed!\n"); - return 0; - } -#endif - - if (ReadBlock(hDisk, - Buffer, - &FilePosition, - 2048, - &dwRead) == FALSE) - { - CloseHandle(hDisk); - free(Buffer); -#if 0 - printf("ReadBlock() failed!\n"); -#endif - return 0; - } - - HexDump(Buffer, 128); - - CloseHandle(hDisk); - - free(Buffer); - - return 0; -} - -/* EOF */ diff --git a/rostests/tests/isotest/isotest.rbuild b/rostests/tests/isotest/isotest.rbuild deleted file mode 100644 index 4ddf085f5d2..00000000000 --- a/rostests/tests/isotest/isotest.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - ntdll - isotest.c - diff --git a/rostests/tests/lantst/lantest.cpp b/rostests/tests/lantst/lantest.cpp deleted file mode 100644 index 4c3f8042f43..00000000000 --- a/rostests/tests/lantst/lantest.cpp +++ /dev/null @@ -1,218 +0,0 @@ -#include -#include -#include -#include -#include -#include - -using std::string; -using std::cin; -using std::cout; -using std::cerr; -using std::endl; - -void display_row( char *data, int off, int len ) { - int i; - - printf( "%08x:", off ); - for( i = off; i < len && i < off + 16; i++ ) { - printf( " %02x", data[i] & 0xff ); - } - - for( ; i < off + 16; i++ ) - printf(" "); - - printf( " -- " ); - - for( i = off; i < len && i < off + 16; i++ ) { - printf( "%c", (data[i] >= ' ' && data[i] <= '~') ? data[i] : '.' ); - } - - printf( "\n" ); -} - -void display_buffer( char *Packet, int ReadLen ) { - UINT PktLen; - for( PktLen = 0; PktLen < ReadLen; PktLen += 16 ) - display_row( Packet, PktLen, ReadLen ); -} - -int byte_till_end( char *Packet, int PktLen ) { - int byte; - std::string word; - - cin >> word; - while( word != "end" ) { - byte = strtoul( (string("0x") + word).c_str(), 0, 0 ); - fprintf( stderr, "Byte[%d]: %x\n", PktLen, byte & 0xff ); - Packet[PktLen++] = byte; - cin >> word; - } - - return PktLen; -} - -/* Ethernet types. We swap constants so we can compare values at runtime - without swapping them there */ -#define ETYPE_IPv4 WH2N(0x0800) -#define ETYPE_IPv6 WH2N(0x86DD) -#define ETYPE_ARP WH2N(0x0806) - -extern "C" -NTSTATUS NTAPI NtCreateFile( - PHANDLE FileHandle, - ACCESS_MASK DesiredAccess, - POBJECT_ATTRIBUTES ObjectAttributes, - PIO_STATUS_BLOCK IoStatusBlock, - PLARGE_INTEGER AllocationSize, - ULONG FileAttributes, - ULONG ShareAccess, - ULONG CreateDisposition, - ULONG CreateOptions, - PVOID EaBuffer, - ULONG EaLength); - -int main( int argc, char **argv ) { - string word; - HANDLE LanFile; - OBJECT_ATTRIBUTES Attributes; - UNICODE_STRING LanDevice; - IO_STATUS_BLOCK Iosb; - HANDLE Event; - PFILE_FULL_EA_INFORMATION EaBuffer; - NTSTATUS Status; - DWORD On = 1, PktLen; - CHAR Packet[1600]; - PLAN_PACKET_HEADER Hdr = (PLAN_PACKET_HEADER)Packet; - PLAN_ADDRESS Addr = (PLAN_ADDRESS)Packet; - USHORT TypesToListen[] = { ETYPE_IPv4, ETYPE_IPv6, ETYPE_ARP }; - UINT EaLength = LAN_EA_INFO_SIZE(sizeof(TypesToListen)/sizeof(USHORT)); - - Status = NtCreateEvent(&Event, - EVENT_ALL_ACCESS, - NULL, - 0, - 0 ); - - RtlInitUnicodeString( &LanDevice, L"\\Device\\Lan" ); - - InitializeObjectAttributes( &Attributes, - &LanDevice, - OBJ_CASE_INSENSITIVE, - NULL, - NULL ); - - EaBuffer = (PFILE_FULL_EA_INFORMATION)calloc( EaLength, 1 ); - LAN_FILL_EA_INFO(EaBuffer,sizeof(TypesToListen)/sizeof(USHORT), - TypesToListen); - - Status = ZwCreateFile( &LanFile, - SYNCHRONIZE | GENERIC_READ | GENERIC_WRITE | - GENERIC_EXECUTE, - &Attributes, - &Iosb, - NULL, - FILE_ATTRIBUTE_NORMAL, - FILE_SHARE_READ | FILE_SHARE_WRITE, - FILE_OPEN_IF, - FILE_SYNCHRONOUS_IO_NONALERT, - EaBuffer, - EaLength ); - - if( !NT_SUCCESS(Status) ) { - cerr << "Could not open lan device " << Status << "\n"; - return 1; - } - - Status = DeviceIoControl( LanFile, - IOCTL_IF_BUFFERED_MODE, - &On, - sizeof(On), - 0, - 0, - &PktLen, - NULL ); - - if( !Status ) { - cerr << "Could not turn on buffered mode " << Status << "\n"; - return 1; - } - - while( cin >> word ) { - if( word == "end" ) { - NtClose( LanFile ); - return 0; - } else if( word == "enum" ) { - Status = DeviceIoControl( LanFile, - IOCTL_IF_ENUM_ADAPTERS, - NULL, - 0, - Packet, - sizeof(Packet), - &PktLen, - NULL ); - - cout << "EnumAdapters: " << Status << "\n"; - if( Status ) - display_buffer( Packet, PktLen ); - } else if( word == "query" ) { - cin >> PktLen; - - Status = DeviceIoControl( LanFile, - IOCTL_IF_ADAPTER_INFO, - &PktLen, - sizeof(PktLen), - Packet, - sizeof(Packet), - &PktLen, - NULL ); - - cout << "QueryAdapterInfo: " << Status << "\n"; - if( Status ) - display_buffer( Packet, PktLen ); - } else if( word == "send" ) { - cin >> Hdr->Fixed.Adapter - >> Hdr->Fixed.AddressType - >> Hdr->Fixed.AddressLen - >> Hdr->Fixed.PacketType; - Hdr->Fixed.Mdl = NULL; - PktLen = byte_till_end( Packet, Hdr->Address - (PCHAR)Hdr ); - Status = NtWriteFile( LanFile, - NULL, - NULL, - NULL, - &Iosb, - Packet, - PktLen, - NULL, - NULL ); - - cout << "NtWriteFile: " << Status << "\n"; - } else if( word == "recv" ) { - ULONG ReadLen; - Status = NtReadFile( LanFile, - Event, - NULL, - NULL, - &Iosb, - Packet, - sizeof(Packet), - NULL, - NULL ); - cout << "NtReadFile: " << Status << "\n"; - if( Status == STATUS_PENDING ) { - LARGE_INTEGER Timeout = { 0 }; - Status = NtWaitForSingleObject( Event, 1, &Timeout ); - } - - ReadLen = Iosb.Information; - - if( Status == STATUS_SUCCESS ) { - cout << "Read " << ReadLen << " bytes\n"; - display_buffer( Packet, ReadLen ); - } - } - } - - return 0; -} diff --git a/rostests/tests/lantst/lantest.rbuild b/rostests/tests/lantst/lantest.rbuild deleted file mode 100644 index c9bbac74bc9..00000000000 --- a/rostests/tests/lantst/lantest.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - lantest.cpp - diff --git a/rostests/tests/lineclip/lineclip.c b/rostests/tests/lineclip/lineclip.c deleted file mode 100644 index 113125f4358..00000000000 --- a/rostests/tests/lineclip/lineclip.c +++ /dev/null @@ -1,166 +0,0 @@ -#include -#include - -LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM); - -int WINAPI -WinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpszCmdLine, - int nCmdShow) -{ - WNDCLASS wc; - MSG msg; - HWND hWnd; - - wc.lpszClassName = "ClipClass"; - wc.lpfnWndProc = MainWndProc; - wc.style = CS_VREDRAW | CS_HREDRAW; - wc.hInstance = hInstance; - wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION); - wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW); - wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH); - wc.lpszMenuName = NULL; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - if (RegisterClass(&wc) == 0) - { - fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - hWnd = CreateWindow("ClipClass", - "Line clipping test", - WS_OVERLAPPEDWINDOW|WS_HSCROLL|WS_VSCROLL, - 0, - 0, - CW_USEDEFAULT, - CW_USEDEFAULT, - NULL, - NULL, - hInstance, - NULL); - if (hWnd == NULL) - { - fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - ShowWindow(hWnd, nCmdShow); - - while(GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - return msg.wParam; -} - -static void -DrawLines(HDC hDC) -{ - static struct - { - int fromx; - int fromy; - int tox; - int toy; - } - points[ ] = - { - { 50, 99, 125, 99 }, - { 160, 99, 190, 99 }, - { 300, 99, 225, 99 }, - { 50, 100, 125, 100 }, - { 160, 100, 190, 100 }, - { 300, 100, 225, 100 }, - { 50, 125, 300, 125 }, - { 50, 149, 125, 149 }, - { 160, 149, 190, 149 }, - { 300, 149, 225, 149 }, - { 50, 150, 125, 150 }, - { 160, 150, 190, 150 }, - { 300, 150, 225, 150 }, - { 160, 249, 190, 249 }, - { 160, 250, 190, 250 }, - { 149, 50, 149, 125 }, - { 149, 160, 149, 190 }, - { 149, 300, 149, 225 }, - { 150, 50, 150, 125 }, - { 150, 160, 150, 190 }, - { 150, 300, 150, 225 }, - { 199, 50, 199, 125 }, - { 199, 160, 199, 190 }, - { 199, 300, 199, 225 }, - { 200, 50, 200, 125 }, - { 200, 160, 200, 190 }, - { 200, 300, 200, 225 }, - { 175, 50, 175, 300 }, - { 50, 55, 300, 290 }, - { 300, 295, 50, 60 }, - { 50, 290, 300, 55 }, - { 300, 60, 50, 295 }, - { 55, 50, 290, 300 }, - { 295, 300, 60, 50 }, - { 55, 300, 290, 50 }, - { 295, 50, 60, 300 } - }; - int i; - - for (i = 0; i < sizeof(points) / sizeof(points[0]); i++) - { - MoveToEx(hDC, points[i].fromx, points[i].fromy, NULL); - LineTo(hDC, points[i].tox, points[i].toy); - } -} - -LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - PAINTSTRUCT ps; - HDC hDC; - RECT clr; - HRGN ClipRgn, ExcludeRgn; - RECT Rect; - - switch(msg) - { - case WM_PAINT: - GetClientRect(hWnd, &clr); - ClipRgn = CreateRectRgnIndirect(&clr); - hDC = BeginPaint(hWnd, &ps); - Rect.left = 100; - Rect.top = 100; - Rect.right = 250; - Rect.bottom = 150; - FillRect(hDC, &Rect, CreateSolidBrush(RGB(0xFF, 0x00, 0x00))); - ExcludeRgn = CreateRectRgnIndirect(&Rect); - CombineRgn(ClipRgn, ClipRgn, ExcludeRgn, RGN_DIFF); - DeleteObject(ExcludeRgn); - Rect.left = 150; - Rect.top = 150; - Rect.right = 200; - Rect.bottom = 250; - FillRect(hDC, &Rect, CreateSolidBrush(RGB(0xFF, 0x00, 0x00))); - SelectObject(hDC, CreatePen(PS_SOLID, 0, RGB(0xFF, 0xFF, 0x00))); - DrawLines(hDC); - SelectObject(hDC, CreatePen(PS_SOLID, 0, RGB(0x00, 0x00, 0xFF))); - ExcludeRgn = CreateRectRgnIndirect(&Rect); - CombineRgn(ClipRgn, ClipRgn, ExcludeRgn, RGN_DIFF); - DeleteObject(ExcludeRgn); - SelectClipRgn(hDC, ClipRgn); - DrawLines(hDC); - EndPaint(hWnd, &ps); - break; - - case WM_DESTROY: - PostQuitMessage(0); - break; - - default: - return DefWindowProc(hWnd, msg, wParam, lParam); - } - return 0; -} diff --git a/rostests/tests/lineclip/lineclip.rbuild b/rostests/tests/lineclip/lineclip.rbuild deleted file mode 100644 index ac8811e4721..00000000000 --- a/rostests/tests/lineclip/lineclip.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - lineclip.c - diff --git a/rostests/tests/linetest/linetest.c b/rostests/tests/linetest/linetest.c deleted file mode 100644 index fdfd3a40511..00000000000 --- a/rostests/tests/linetest/linetest.c +++ /dev/null @@ -1,184 +0,0 @@ - -#include -#include - -#include - -LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM); - -const TCHAR* CLASS_NAME = _T("LineTestClass"); - -int WINAPI -WinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpszCmdLine, - int nCmdShow) -{ - WNDCLASS wc; - MSG msg; - HWND hWnd; - - wc.lpszClassName = CLASS_NAME; - wc.lpfnWndProc = MainWndProc; - wc.style = CS_VREDRAW | CS_HREDRAW; - wc.hInstance = hInstance; - wc.hIcon = LoadIcon(NULL, (LPCSTR)IDI_APPLICATION); - wc.hCursor = LoadCursor(NULL, (LPCSTR)IDC_ARROW); - wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH); - wc.lpszMenuName = NULL; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - if (RegisterClass(&wc) == 0) - { - fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - hWnd = CreateWindow(CLASS_NAME, - _T("Line drawing test"), - WS_OVERLAPPEDWINDOW, - 0, - 0, - CW_USEDEFAULT, - CW_USEDEFAULT, - NULL, - NULL, - hInstance, - NULL); - if (hWnd == NULL) - { - fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - ShowWindow(hWnd, nCmdShow); - - while(GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - return msg.wParam; -} - -#define red RGB(255,0,0) -#define grn RGB(0,255,0) -#define blu RGB(0,0,255) -#define blk RGB(0,0,0) - -static void -DrawLines(HDC hDC) -{ - static struct - { - int fromx; - int fromy; - int tox; - int toy; - COLORREF clr; - } - points[ ] = - { - { 10, 10, 19, 10, red }, - { 20, 10, 20, 19, grn }, - { 20, 20, 11, 20, blu }, - { 10, 20, 10, 11, blk }, - { 12, 12, 15, 15, red }, - { 18, 12, 15, 15, grn }, - { 18, 18, 15, 15, blu }, - { 12, 18, 15, 15, blk }, - - { 35, 10, 39, 14, red }, - { 40, 15, 36, 19, grn }, - { 35, 20, 31, 16, blu }, - { 30, 15, 34, 11, blk }, - - { 2, 1, 5, 2, red }, - { 6, 2, 5, 5, grn }, - { 5, 6, 2, 5, blu }, - { 1, 5, 2, 2, blk }, - - { 50, 1, 51, 1, red }, - { 50, 2, 52, 2, grn }, - { 50, 3, 53, 3, blu }, - { 50, 4, 54, 4, blk }, - { 50, 5, 55, 5, red }, - { 50, 6, 56, 6, grn }, - { 50, 7, 57, 7, blu }, - { 50, 8, 58, 8, blk }, - { 50, 9, 59, 9, red }, - { 50, 10, 60, 10, grn }, - { 50, 11, 61, 11, blu }, - { 50, 12, 62, 12, blk }, - - { 50, 14, 62, 14, red }, - { 51, 15, 62, 15, grn }, - { 52, 16, 62, 16, blu }, - { 53, 17, 62, 17, blk }, - { 54, 18, 62, 18, red }, - { 55, 19, 62, 19, grn }, - { 56, 20, 62, 20, blu }, - { 57, 21, 62, 21, blk }, - { 58, 22, 62, 22, red }, - { 59, 23, 62, 23, grn }, - { 60, 24, 62, 24, blu }, - { 61, 25, 62, 25, blk }, - }; - int i; - - for (i = 0; i < sizeof(points) / sizeof(points[0]); i++) - { - HPEN hpen, hpenold; - hpen = CreatePen ( PS_SOLID, 0, points[i].clr ); - hpenold = (HPEN)SelectObject ( hDC, hpen ); - MoveToEx ( hDC, points[i].fromx, points[i].fromy, NULL ); - LineTo ( hDC, points[i].tox, points[i].toy ); - SelectObject ( hDC, hpenold ); - DeleteObject ( hpen ); - } -} - -LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - PAINTSTRUCT ps; - HDC hDC; - RECT clr; - HBRUSH hbr; - - switch(msg) - { - case WM_PAINT: - GetClientRect(hWnd, &clr); - //ClipRgn = CreateRectRgnIndirect(&clr); - hDC = BeginPaint(hWnd, &ps); - //Rect.left = 100; - //Rect.top = 100; - //Rect.right = 250; - //Rect.bottom = 150; - //FillRect(hDC, &Rect, CreateSolidBrush(RGB(0xFF, 0x00, 0x00))); - //ExcludeRgn = CreateRectRgnIndirect(&Rect); - //CombineRgn(ClipRgn, ClipRgn, ExcludeRgn, RGN_DIFF); - //DeleteObject(ExcludeRgn); - //Rect.left = 150; - //Rect.top = 150; - //Rect.right = 200; - //Rect.bottom = 250; - hbr = CreateSolidBrush(RGB(255, 255, 255)); - FillRect ( hDC, &clr, hbr ); - DeleteObject ( hbr ); - DrawLines(hDC); - EndPaint(hWnd, &ps); - break; - - case WM_DESTROY: - PostQuitMessage(0); - break; - - default: - return DefWindowProc(hWnd, msg, wParam, lParam); - } - return 0; -} diff --git a/rostests/tests/linetest/linetest.rbuild b/rostests/tests/linetest/linetest.rbuild deleted file mode 100644 index e2f90590d99..00000000000 --- a/rostests/tests/linetest/linetest.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - linetest.c - diff --git a/rostests/tests/lpctst/conport.c b/rostests/tests/lpctst/conport.c deleted file mode 100644 index cfe7523bafe..00000000000 --- a/rostests/tests/lpctst/conport.c +++ /dev/null @@ -1,205 +0,0 @@ -/* $Id$ - * - * reactos/apps/lpc/conport.c - * - * To be run in a real WNT 4.0 system with - * "\SmApiPort" as argument. Do not try to - * connect to "\Windows\ApiPort" since that - * reboots immeditely. - * - * Use Russinovich' HandleEx to verify - * conport.exe owns two unnamed LPC ports: - * the one created by kernel32.dll connecting - * to csrss.exe, and one connected to here. - * - * 19990627 (Emanuele Aliberti) - * Initial implementation. - * 19990704 (EA) - * Dump object's attributes moved in dumpinfo.c. - */ -#include -#include -#include -#define PROTO_LPC -#include -#include "dumpinfo.h" - -#define LPC_CONNECT_FLAG1 0x00000001 -#define LPC_CONNECT_FLAG2 0x00000010 -#define LPC_CONNECT_FLAG3 0x00000100 -#define LPC_CONNECT_FLAG4 0x00001000 -#define LPC_CONNECT_FLAG5 0x00010000 - -NTSTATUS -(WINAPI * ConnectPort)( - OUT PHANDLE PortHandle, - IN PUNICODE_STRING PortName, - IN POBJECT_ATTRIBUTES ObjectAttributes, - IN DWORD Unknown3, - IN DWORD Unknown4, - IN DWORD Unknown5, - IN DWORD Unknown6, - IN ULONG Flags - ); - -NTSTATUS -(WINAPI * QueryObject)( - IN HANDLE ObjectHandle, - IN CINT ObjectInformationClass, - OUT PVOID ObjectInformation, - IN ULONG Length, - OUT PULONG ResultLength - ); - -NTSTATUS -(WINAPI * YieldExecution)(VOID); - -#define BUF_SIZE 1024 -#define MAXARG 1000000 - - -VOID -TryConnectPort(char *port_name) -{ - DWORD Status = 0; - HANDLE Port = 0; - int i; - UNICODE_STRING PortName; - OBJECT_ATTRIBUTES ObjectAttributes; - WORD Name [BUF_SIZE] = {0}; - int dwx = 0; - char * port_name_save = port_name; - - /* - * Convert the port's name to Unicode. - */ - for ( - PortName.Length = 0; - ( *port_name - && (PortName.Length < BUF_SIZE) - ); - ) - { - Name[PortName.Length++] = (WORD) *port_name++; - } - Name[PortName.Length] = 0; - - PortName.Length = PortName.Length * sizeof (WORD); - PortName.MaximumLength = PortName.Length + sizeof (WORD); - PortName.Buffer = (PWSTR) Name; - /* - * Prepare the port object attributes. - */ - ObjectAttributes.Length = - sizeof (OBJECT_ATTRIBUTES); - ObjectAttributes.RootDirectory = - NULL; - ObjectAttributes.ObjectName = - NULL /*& PortName */; - ObjectAttributes.Attributes = - OBJ_CASE_INSENSITIVE; - ObjectAttributes.SecurityDescriptor = - NULL; - ObjectAttributes.SecurityQualityOfService = - NULL; - /* - * Try to issue a connection request. - */ - Port = 0; - Status = ConnectPort( - & Port, /* & PortHandle */ - & PortName, /* & PortName */ - & ObjectAttributes, /* & PortAttributes */ - NULL, /* & SecurityQos */ - NULL, /* & SectionInfo */ - NULL, /* & MapInfo */ - NULL, /* & MaxMessageSize */ - LPC_CONNECT_FLAG5 /* & ConnectInfoLength */ - ); - if (Status == STATUS_SUCCESS) - { - DumpInfo( - Name, - Status, - "connected", - Port - ); - /* Hot waiting */ - for (dwx=0; dwx -#include -#include -#define PROTO_LPC -#include -#include "dumpinfo.h" - -#define LPC_CONNECT_FLAG1 0x00000001 -#define LPC_CONNECT_FLAG2 0x00000010 -#define LPC_CONNECT_FLAG3 0x00000100 -#define LPC_CONNECT_FLAG4 0x00001000 -#define LPC_CONNECT_FLAG5 0x00010000 - -NTSTATUS -(WINAPI * CreatePort)( - /*OUT PHANDLE PortHandle,*/ - PVOID Buffer, - IN POBJECT_ATTRIBUTES PortAttributes OPTIONAL, - IN ACCESS_MASK DesiredAccess, - IN DWORD Unknown3, - IN ULONG Flags - ); - -NTSTATUS -(WINAPI * QueryObject)( - IN HANDLE ObjectHandle, - IN CINT ObjectInformationClass, - OUT PVOID ObjectInformation, - IN ULONG Length, - OUT PULONG ResultLength - ); - -NTSTATUS -(WINAPI * YieldExecution)(VOID); - -#define BUF_SIZE 1024 -#define MAXARG 5000000 - - -VOID -TryCreatePort(char *port_name) -{ - DWORD Status = 0; - HANDLE Port = 0; - int i; - UNICODE_STRING PortName; - OBJECT_ATTRIBUTES ObjectAttributes; - WORD Name [BUF_SIZE] = {0}; - int dwx = 0; - char * port_name_save = port_name; - - /* - * Convert the port's name to Unicode. - */ - for ( - PortName.Length = 0; - ( *port_name - && (PortName.Length < BUF_SIZE) - ); - ) - { - Name[PortName.Length++] = (WORD) *port_name++; - } - Name[PortName.Length] = 0; - - PortName.Length = PortName.Length * sizeof (WORD); - PortName.MaximumLength = PortName.Length + sizeof (WORD); - PortName.Buffer = (PWSTR) Name; - /* - * Prepare the port object attributes. - */ - ObjectAttributes.Length = - sizeof (OBJECT_ATTRIBUTES); - ObjectAttributes.RootDirectory = - NULL; - ObjectAttributes.ObjectName = - & PortName; - ObjectAttributes.Attributes = - 0; //OBJ_CASE_INSENSITIVE --> STATUS_INVALID_PARAMETER ==> case sensitive!; - ObjectAttributes.SecurityDescriptor = - NULL; - ObjectAttributes.SecurityQualityOfService = - NULL; - /* - * Try to issue a connection request. - */ - Port = 0; - Status = CreatePort( - & Port, - & ObjectAttributes, - 0, /* ACCESS_MASK? */ - 0, /* Unknown3 */ - LPC_CONNECT_FLAG5 - ); - if (Status == STATUS_SUCCESS) - { - DumpInfo( - Name, - Status, - "created", - Port - ); - /* Hot waiting */ - for (dwx=0; dwx -#include -#include -#include - -#define BUF_SIZE 1024 -#define MAX_BASIC_INFO_SIZE 512 - - -extern -NTSTATUS -(WINAPI * QueryObject)( - IN HANDLE ObjectHandle, - IN CINT ObjectInformationClass, - OUT PVOID ObjectInformation, - IN ULONG Length, - OUT PULONG ResultLength - ); - -extern -NTSTATUS -(WINAPI * QueryInformationPort)( - IN HANDLE PortHandle, - IN CINT PortInformationClass, /* guess */ - OUT PVOID PortInformation, /* guess */ - IN ULONG PortInformationLength, /* guess */ - OUT PULONG ReturnLength /* guess */ - ); - - -/* -static -VOID -DumpBuffer( - char *Name, - BYTE *buffer, - ULONG size - ) -{ - register ULONG i = 0; - - printf("%s [%d] = ",Name,size); - for ( i = 0; - i != size; - ++i - ) - { - printf("%02X",buffer[i]); - } - printf("\n"); -} -*/ - -VOID -DumpInfo ( - LPCWSTR Name, - NTSTATUS Status, - LPCWSTR Comment, - HANDLE Port - ) -{ - BYTE ObjectInformation [BUF_SIZE] = {0}; - ULONG ResultLength; - - wprintf( - L"Port \"%s\" %s:\n", - Name, - Comment - ); - - printf("\tStatus = %08X\n",Status); - printf("\tPort = %08X\n\n",Port); - /* - * Query object information. - */ - printf("Basic Information:\n"); - Status = QueryObject( - Port, - ObjectBasicInformation, - ObjectInformation, - sizeof (LPC_PORT_BASIC_INFORMATION), - & ResultLength - ); - if (Status == STATUS_SUCCESS) - { - PLPC_PORT_BASIC_INFORMATION i; - - i = (PLPC_PORT_BASIC_INFORMATION) ObjectInformation; - - printf( "\tUnknown01 = 0x%08X\n", i->Unknown0 ); - printf( "\tUnknown02 = 0x%08X\n", i->Unknown1 ); - printf( "\tUnknown03 = 0x%08X\n", i->Unknown2 ); - printf( "\tUnknown04 = 0x%08X\n", i->Unknown3 ); - printf( "\tUnknown05 = 0x%08X\n", i->Unknown4 ); - printf( "\tUnknown06 = 0x%08X\n", i->Unknown5 ); - printf( "\tUnknown07 = 0x%08X\n", i->Unknown6 ); - printf( "\tUnknown08 = 0x%08X\n", i->Unknown7 ); - printf( "\tUnknown09 = 0x%08X\n", i->Unknown8 ); - printf( "\tUnknown10 = 0x%08X\n", i->Unknown9 ); - printf( "\tUnknown11 = 0x%08X\n", i->Unknown10 ); - printf( "\tUnknown12 = 0x%08X\n", i->Unknown11 ); - printf( "\tUnknown13 = 0x%08X\n", i->Unknown12 ); - printf( "\tUnknown14 = 0x%08X\n", i->Unknown13 ); - } - else - { - printf("\tStatus = %08X\n",Status); - } - printf("Type Information:\n"); - Status = QueryObject( - Port, - ObjectTypeInformation, - ObjectInformation, - sizeof ObjectInformation, - & ResultLength - ); - if (Status == STATUS_SUCCESS) - { - OBJECT_TYPE_INFORMATION * i; - - i = (OBJECT_TYPE_INFORMATION *) ObjectInformation; - - wprintf( - L"\tName: \"%s\"\n", - (i->Name.Length ? i->Name.Buffer : L"") - ); -/* -FIXME: why this always raise an access violation exception? - wprintf( - L"\tType: \"%s\"\n", - (i->Type.Length ? i->Type.Buffer : L"") - ); -/**/ - printf( - "\tTotal Handles: %d\n", - i->TotalHandles - ); - printf( - "\tReference Count: %d\n", - i->ReferenceCount - ); - } - else - { - printf("\tStatus = %08X\n",Status); - } - printf("Name Information:\n"); - Status = QueryObject( - Port, - ObjectNameInformation, - ObjectInformation, - sizeof ObjectInformation, - & ResultLength - ); - if (Status == STATUS_SUCCESS) - { - OBJECT_NAME_INFORMATION * i; - - i = (OBJECT_NAME_INFORMATION *) ObjectInformation; - wprintf( - L"\tName: \"%s\"\n", - (i->Name.Length ? i->Name.Buffer : L"") - ); - } - else - { - printf("\tStatus = %08X\n",Status); - } - printf("Data Information:\n"); - Status = QueryObject( - Port, - ObjectDataInformation, - ObjectInformation, - sizeof ObjectInformation, - & ResultLength - ); - if (Status == STATUS_SUCCESS) - { - OBJECT_DATA_INFORMATION * i; - - i = (OBJECT_DATA_INFORMATION *) ObjectInformation; - printf( - "\tInherit Handle: %s\n", - (i->bInheritHandle ? "TRUE" : "FALSE") - ); - printf( - "\tProtect from Close: %s\n", - (i->bProtectFromClose ? "TRUE" : "FALSE") - ); - } - else - { - printf("\tStatus = %08X\n",Status); - } -//--- - printf("Port Information:\n"); -/* Status = QueryInformationPort( - Port, - 1, /* info class * / - ObjectInformation, - sizeof ObjectInformation, - & ResultLength - ); - if (Status == STATUS_SUCCESS) - { - DWORD * i = ObjectInformation; - int j = 0; - - while (j < ResultLength / sizeof (DWORD)) - { - printf("\t%08X\n",i[j]); - ++j; - } - } - else - { - printf("\tStatus = %08X\n",Status); - } -*/ -} - - -/* EOF */ diff --git a/rostests/tests/lpctst/dumpinfo.h b/rostests/tests/lpctst/dumpinfo.h deleted file mode 100644 index 51e78736e07..00000000000 --- a/rostests/tests/lpctst/dumpinfo.h +++ /dev/null @@ -1,8 +0,0 @@ -VOID -DumpInfo ( - LPCWSTR Name, - NTSTATUS Status, - LPCWSTR Comment, - HANDLE Port - ); - diff --git a/rostests/tests/lpctst/lpcclt.c b/rostests/tests/lpctst/lpcclt.c deleted file mode 100644 index ecf102d4ece..00000000000 --- a/rostests/tests/lpctst/lpcclt.c +++ /dev/null @@ -1,92 +0,0 @@ -/* $Id$ - * - * DESCRIPTION: Simple LPC Client - * PROGRAMMER: David Welch - */ -#include -#include -#include -#include -#include -#include -#include - -#include "lpctest.h" - -const char * MyName = "LPC-CLI"; -HANDLE OutputHandle; -HANDLE InputHandle; - -void debug_printf(char* fmt, ...) -{ - va_list args; - char buffer[255]; - - va_start(args,fmt); - vsprintf(buffer,fmt,args); - WriteConsoleA(OutputHandle, buffer, strlen(buffer), NULL, NULL); - va_end(args); -} - - -int main(int argc, char* argv[]) -{ - UNICODE_STRING PortName = ROS_STRING_INITIALIZER(TEST_PORT_NAME_U); - NTSTATUS Status; - HANDLE PortHandle; - LPC_MAX_MESSAGE Request; - ULONG ConnectInfo; - ULONG ConnectInfoLength = 0; - SECURITY_QUALITY_OF_SERVICE Sqos; - - printf("%s: Lpc test client\n", MyName); - - printf("%s: Connecting to port \"%s\"...\n", MyName, TEST_PORT_NAME); - ConnectInfoLength = 0; - ZeroMemory (& Sqos, sizeof Sqos); - Status = NtConnectPort(&PortHandle, - &PortName, - & Sqos, - 0, - 0, - 0, - NULL, - &ConnectInfoLength); - if (!NT_SUCCESS(Status)) - { - printf("%s: NtConnectPort() failed with status = 0x%08X.\n", MyName, Status); - return EXIT_FAILURE; - } - - printf("%s: Connected to \"%s\" with anonymous port 0x%x.\n", MyName, TEST_PORT_NAME, PortHandle); - - ZeroMemory(& Request, sizeof Request); - strcpy(Request.Data, GetCommandLineA()); - Request.Header.DataSize = strlen(Request.Data); - Request.Header.MessageSize = sizeof(LPC_MESSAGE) + - Request.Header.DataSize; - - printf("%s: Sending to port 0x%x message \"%s\"...\n", - MyName, - PortHandle, - (char *) Request.Data); - Status = NtRequestPort(PortHandle, - &Request.Header); - if (!NT_SUCCESS(Status)) - { - printf("%s: NtRequestPort(0x%x) failed with status = 0x%8X.\n", - MyName, - PortHandle, - Status); - return EXIT_FAILURE; - } - - printf("%s: Sending datagram to port 0x%x succeeded.\n", MyName, PortHandle); - - Sleep(2000); - - printf("%s: Disconnecting...", MyName); - NtClose (PortHandle); - - return EXIT_SUCCESS; -} diff --git a/rostests/tests/lpctst/lpcsrv.c b/rostests/tests/lpctst/lpcsrv.c deleted file mode 100644 index 6af9a2057c8..00000000000 --- a/rostests/tests/lpctst/lpcsrv.c +++ /dev/null @@ -1,139 +0,0 @@ -/* $Id$ - * - * DESCRIPTION: Simple LPC Server - * PROGRAMMER: David Welch - */ -#include -#include -#include -#include -#include -#include -#include - -#include "lpctest.h" - -static const char * MyName = "LPC-SRV"; - -HANDLE OutputHandle; -HANDLE InputHandle; - -void debug_printf(char* fmt, ...) -{ - va_list args; - char buffer[255]; - - va_start(args,fmt); - vsprintf(buffer,fmt,args); - WriteConsoleA(OutputHandle, buffer, strlen(buffer), NULL, NULL); - va_end(args); -} - - -int main(int argc, char* argv[]) -{ - UNICODE_STRING PortName = ROS_STRING_INITIALIZER(TEST_PORT_NAME_U); - OBJECT_ATTRIBUTES ObjectAttributes; - NTSTATUS Status; - HANDLE NamedPortHandle; - HANDLE PortHandle; - LPC_MAX_MESSAGE ConnectMsg; - - printf("%s: Lpc test server\n", MyName); - - InitializeObjectAttributes(&ObjectAttributes, - &PortName, - 0, - NULL, - NULL); - - printf("%s: Creating port \"%s\"...\n", MyName, TEST_PORT_NAME); - Status = NtCreatePort(&NamedPortHandle, - &ObjectAttributes, - 0, - 0, - 0); - if (!NT_SUCCESS(Status)) - { - printf("%s: NtCreatePort() failed with status = 0x%08lX.\n", MyName, Status); - return EXIT_FAILURE; - } - printf("%s: Port \"%s\" created (0x%x).\n\n", MyName, TEST_PORT_NAME, NamedPortHandle); - - for (;;) - { - printf("%s: Listening for connections requests on port 0x%x...\n", MyName, NamedPortHandle); - Status = NtListenPort(NamedPortHandle, - &ConnectMsg.Header); - if (!NT_SUCCESS(Status)) - { - printf("%s: NtListenPort() failed with status = 0x%08lX.\n", MyName, Status); - return EXIT_FAILURE; - } - - printf("%s: Received connection request 0x%08x on port 0x%x.\n", MyName, - ConnectMsg.Header.MessageId, NamedPortHandle); - printf("%s: Request from: PID=%x, TID=%x.\n", MyName, - ConnectMsg.Header.ClientId.UniqueProcess, ConnectMsg.Header.ClientId.UniqueThread); - - printf("%s: Accepting connection request 0x%08x...\n", MyName, - ConnectMsg.Header.MessageId); - Status = NtAcceptConnectPort(&PortHandle, - NamedPortHandle, - & ConnectMsg.Header, - TRUE, - 0, - NULL); - if (!NT_SUCCESS(Status)) - { - printf("%s: NtAcceptConnectPort() failed with status = 0x%08lX.\n", MyName, Status); - return EXIT_FAILURE; - } - printf("%s: Connection request 0x%08x accepted as port 0x%x.\n", MyName, - ConnectMsg.Header.MessageId, PortHandle); - - printf("%s: Completing connection for port 0x%x (0x%08x).\n", MyName, - PortHandle, ConnectMsg.Header.MessageId); - Status = NtCompleteConnectPort(PortHandle); - if (!NT_SUCCESS(Status)) - { - printf("%s: NtCompleteConnectPort() failed with status = 0x%08lX.\n", MyName, Status); - return EXIT_FAILURE; - } - - printf("%s: Entering server loop for port 0x%x...\n", MyName, PortHandle); - for(;;) - { - LPC_MAX_MESSAGE Request; - - Status = NtReplyWaitReceivePort(PortHandle, - 0, - NULL, - &Request.Header); - if (!NT_SUCCESS(Status)) - { - printf("%s: NtReplyWaitReceivePort() failed with status = 0x%08lX.\n", MyName, Status); - return EXIT_FAILURE; - } - - if (LPC_DATAGRAM == PORT_MESSAGE_TYPE(Request)) - { - printf("%s: Datagram message contents are <%s>.\n", - MyName, - Request.Data); - } - else - { - printf("%s: Message with type %d received on port 0x%x.\n", MyName, - PORT_MESSAGE_TYPE(Request), PortHandle); - NtClose(PortHandle); - printf("%s: Connected port 0x%x closed.\n\n", MyName, PortHandle); - break; - } - } - } - return EXIT_SUCCESS; -} - - -/* EOF */ diff --git a/rostests/tests/lpctst/lpctest.h b/rostests/tests/lpctst/lpctest.h deleted file mode 100644 index 6e6520844e8..00000000000 --- a/rostests/tests/lpctst/lpctest.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef _LPCTEST_H -#define _LPCTEST_H -#define TEST_PORT_NAME "\\TestPort" -#define TEST_PORT_NAME_U L"\\TestPort" -#endif diff --git a/rostests/tests/lpctst/lpctst.rbuild b/rostests/tests/lpctst/lpctst.rbuild deleted file mode 100644 index 6dd03a63bd1..00000000000 --- a/rostests/tests/lpctst/lpctst.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - lpctst.c - diff --git a/rostests/tests/map_dup_inherit/map_dup_inherit.c b/rostests/tests/map_dup_inherit/map_dup_inherit.c deleted file mode 100644 index 3e78ad204f2..00000000000 --- a/rostests/tests/map_dup_inherit/map_dup_inherit.c +++ /dev/null @@ -1,110 +0,0 @@ -#include -#include -#include -#include - -/* This tests the ability of the target win32 to create an anonymous file - * mapping, create a mapping view with MapViewOfFile, and then realize the - * pages with VirtualAlloc. - */ - -int main( int argc, char **argv ) { - HANDLE file_view; - void *file_map; - int *x; - - fprintf( stderr, "%lu: Starting\n", GetCurrentProcessId() ); - - if( argc == 2 ) { - #ifdef WIN64 - file_map = (void *)_atoi64(argv[1]); - #else - file_map = (void *)UlongToPtr(atoi(argv[1])); - #endif - } else { - file_map = CreateFileMapping( INVALID_HANDLE_VALUE, - NULL, - PAGE_READWRITE | SEC_RESERVE, - 0, 0x1000, NULL ); - if( !SetHandleInformation( file_map, - HANDLE_FLAG_INHERIT, - HANDLE_FLAG_INHERIT ) ) { - fprintf( stderr, "%lu: Could not make handle inheritable.\n", - GetCurrentProcessId() ); - return 100; - } - } - - if( !file_map ) { - fprintf( stderr, "%lu: Could not create anonymous file map.\n", - GetCurrentProcessId() ); - return 1; - } - - file_view = MapViewOfFile( file_map, - FILE_MAP_WRITE, - 0, - 0, - 0x1000 ); - - if( !file_view ) { - fprintf( stderr, "%lu: Could not map view of file.\n", - GetCurrentProcessId() ); - if (file_map != INVALID_HANDLE_VALUE) - CloseHandle(file_map); - return 2; - } - - if( !VirtualAlloc( file_view, 0x1000, MEM_COMMIT, PAGE_READWRITE ) ) { - fprintf( stderr, "%lu: VirtualAlloc failed to realize the page.\n", - GetCurrentProcessId() ); - if (file_map != INVALID_HANDLE_VALUE) - CloseHandle(file_map); - return 3; - } - - x = (int *)file_view; - x[0] = 0x12345678; - - if( x[0] != 0x12345678 ) { - fprintf( stderr, "%lu: Can't write to the memory (%08x != 0x12345678)\n", - GetCurrentProcessId(), x[0] ); - return 4; - } - - if( argc == 1 ) { - STARTUPINFO si; - PROCESS_INFORMATION pi; - char cmdline[1000]; - - memset( &si, 0, sizeof( si ) ); - memset( &pi, 0, sizeof( pi ) ); - - sprintf(cmdline,"%s %p", argv[0], file_map); - CloseHandle(file_map); - - if( !CreateProcess(NULL, cmdline, NULL, NULL, TRUE, 0, NULL, NULL, - &si, &pi ) ) { - fprintf( stderr, "%lu: Could not create child process.\n", - GetCurrentProcessId() ); - if (pi.hProcess != INVALID_HANDLE_VALUE) - CloseHandle(pi.hProcess); - - return 5; - } - - if( WaitForSingleObject( pi.hThread, INFINITE ) != WAIT_OBJECT_0 ) { - fprintf( stderr, "%lu: Failed to wait for child process to terminate.\n", - GetCurrentProcessId() ); - if (pi.hProcess != INVALID_HANDLE_VALUE) - CloseHandle(pi.hProcess); - return 6; - } - - if (pi.hProcess != INVALID_HANDLE_VALUE) - CloseHandle(pi.hProcess); - - } - - return 0; -} diff --git a/rostests/tests/map_dup_inherit/map_dup_inherit.rbuild b/rostests/tests/map_dup_inherit/map_dup_inherit.rbuild deleted file mode 100644 index 1dfece66aab..00000000000 --- a/rostests/tests/map_dup_inherit/map_dup_inherit.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - map_dup_inherit.c - diff --git a/rostests/tests/mdi/mdi.c b/rostests/tests/mdi/mdi.c deleted file mode 100644 index 67cf1a9e51b..00000000000 --- a/rostests/tests/mdi/mdi.c +++ /dev/null @@ -1,523 +0,0 @@ -/* - Thanks to theForger from winprog.org -*/ -#include -#include - -#include -#include "resource.h" - -const char g_szClassName[] = "myWindowClass"; -const char g_szChildClassName[] = "myMDIChildWindowClass"; - -#define IDC_MAIN_MDI 101 -#define IDC_MAIN_TOOL 102 -#define IDC_MAIN_STATUS 103 - -#define IDC_CHILD_EDIT 101 - -#define ID_MDI_FIRSTCHILD 50000 - -HWND g_hMDIClient = NULL; -HWND g_hMainWindow = NULL; - -BOOL LoadTextFileToEdit(HWND hEdit, LPCTSTR pszFileName) -{ - HANDLE hFile; - BOOL bSuccess = FALSE; - - hFile = CreateFile(pszFileName, GENERIC_READ, FILE_SHARE_READ, NULL, - OPEN_EXISTING, 0, NULL); - if(hFile != INVALID_HANDLE_VALUE) - { - DWORD dwFileSize; - - dwFileSize = GetFileSize(hFile, NULL); - if(dwFileSize != 0xFFFFFFFF) - { - LPSTR pszFileText; - - pszFileText = GlobalAlloc(GPTR, dwFileSize + 1); - if(pszFileText != NULL) - { - DWORD dwRead; - - if(ReadFile(hFile, pszFileText, dwFileSize, &dwRead, NULL)) - { - pszFileText[dwFileSize] = 0; // Add null terminator - if(SetWindowText(hEdit, pszFileText)) - bSuccess = TRUE; // It worked! - } - GlobalFree(pszFileText); - } - } - CloseHandle(hFile); - } - return bSuccess; -} - -BOOL SaveTextFileFromEdit(HWND hEdit, LPCTSTR pszFileName) -{ - HANDLE hFile; - BOOL bSuccess = FALSE; - - hFile = CreateFile(pszFileName, GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - if(hFile != INVALID_HANDLE_VALUE) - { - DWORD dwTextLength; - - dwTextLength = GetWindowTextLength(hEdit); - // No need to bother if there's no text. - if(dwTextLength > 0) - { - LPSTR pszText; - DWORD dwBufferSize = dwTextLength + 1; - - pszText = GlobalAlloc(GPTR, dwBufferSize); - if(pszText != NULL) - { - if(GetWindowText(hEdit, pszText, dwBufferSize)) - { - DWORD dwWritten; - - if(WriteFile(hFile, pszText, dwTextLength, &dwWritten, NULL)) - bSuccess = TRUE; - } - GlobalFree(pszText); - } - } - CloseHandle(hFile); - } - return bSuccess; -} - -void DoFileOpen(HWND hwnd) -{ - OPENFILENAME ofn; - char szFileName[MAX_PATH] = ""; - - ZeroMemory(&ofn, sizeof(ofn)); - - ofn.lStructSize = sizeof(ofn); - ofn.hwndOwner = hwnd; - ofn.lpstrFilter = "Text Files (*.txt)\0*.txt\0All Files (*.*)\0*.*\0"; - ofn.lpstrFile = szFileName; - ofn.nMaxFile = MAX_PATH; - ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY; - ofn.lpstrDefExt = "txt"; - - if(GetOpenFileName(&ofn)) - { - HWND hEdit = GetDlgItem(hwnd, IDC_CHILD_EDIT); - if(LoadTextFileToEdit(hEdit, szFileName)) - { - SendDlgItemMessage(g_hMainWindow, IDC_MAIN_STATUS, SB_SETTEXT, 0, (LPARAM)"Opened..."); - SendDlgItemMessage(g_hMainWindow, IDC_MAIN_STATUS, SB_SETTEXT, 1, (LPARAM)szFileName); - - SetWindowText(hwnd, szFileName); - } - } -} - -void DoFileSave(HWND hwnd) -{ - OPENFILENAME ofn; - char szFileName[MAX_PATH] = ""; - - ZeroMemory(&ofn, sizeof(ofn)); - - ofn.lStructSize = sizeof(ofn); - ofn.hwndOwner = hwnd; - ofn.lpstrFilter = "Text Files (*.txt)\0*.txt\0All Files (*.*)\0*.*\0"; - ofn.lpstrFile = szFileName; - ofn.nMaxFile = MAX_PATH; - ofn.lpstrDefExt = "txt"; - ofn.Flags = OFN_EXPLORER | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT; - - if(GetSaveFileName(&ofn)) - { - HWND hEdit = GetDlgItem(hwnd, IDC_CHILD_EDIT); - if(SaveTextFileFromEdit(hEdit, szFileName)) - { - SendDlgItemMessage(g_hMainWindow, IDC_MAIN_STATUS, SB_SETTEXT, 0, (LPARAM)"Saved..."); - SendDlgItemMessage(g_hMainWindow, IDC_MAIN_STATUS, SB_SETTEXT, 1, (LPARAM)szFileName); - - SetWindowText(hwnd, szFileName); - } - } -} - -HWND CreateNewMDIChild(HWND hMDIClient) -{ - MDICREATESTRUCT mcs; - HWND hChild; - - mcs.szTitle = "[Untitled]"; - mcs.szClass = g_szChildClassName; - mcs.hOwner = GetModuleHandle(NULL); - mcs.x = mcs.cx = CW_USEDEFAULT; - mcs.y = mcs.cy = CW_USEDEFAULT; - mcs.style = MDIS_ALLCHILDSTYLES; - - hChild = (HWND)SendMessage(hMDIClient, WM_MDICREATE, 0, (LPARAM)&mcs); - if(!hChild) - { - MessageBox(hMDIClient, "MDI Child creation failed.", "Oh Oh...", - MB_ICONEXCLAMATION | MB_OK); - } - return hChild; -} - -LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch(msg) - { - case WM_CREATE: - { - HWND hTool; - TBBUTTON tbb[3]; - TBADDBITMAP tbab; - - HWND hStatus; - int statwidths[] = {100, -1}; - - CLIENTCREATESTRUCT ccs; - - // Create MDI Client - - // Find window menu where children will be listed - ccs.hWindowMenu = GetSubMenu(GetMenu(hwnd), 2); - ccs.idFirstChild = ID_MDI_FIRSTCHILD; - - g_hMDIClient = CreateWindowEx(WS_EX_CLIENTEDGE, "mdiclient", NULL, - WS_CHILD | WS_CLIPCHILDREN | WS_VSCROLL | WS_HSCROLL | WS_VISIBLE, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - hwnd, (HMENU)IDC_MAIN_MDI, GetModuleHandle(NULL), (LPVOID)&ccs); - - if(g_hMDIClient == NULL) - MessageBox(hwnd, "Could not create MDI client.", "Error", MB_OK | MB_ICONERROR); - - // Create Toolbar - - hTool = CreateWindowEx(0, TOOLBARCLASSNAME, NULL, WS_CHILD | WS_VISIBLE, 0, 0, 0, 0, - hwnd, (HMENU)IDC_MAIN_TOOL, GetModuleHandle(NULL), NULL); - if(hTool == NULL) - MessageBox(hwnd, "Could not create tool bar.", "Error", MB_OK | MB_ICONERROR); - - // Send the TB_BUTTONSTRUCTSIZE message, which is required for - // backward compatibility. - SendMessage(hTool, TB_BUTTONSTRUCTSIZE, (WPARAM)sizeof(TBBUTTON), 0); - - tbab.hInst = HINST_COMMCTRL; - tbab.nID = IDB_STD_SMALL_COLOR; - SendMessage(hTool, TB_ADDBITMAP, 0, (LPARAM)&tbab); - - ZeroMemory(tbb, sizeof(tbb)); - tbb[0].iBitmap = STD_FILENEW; - tbb[0].fsState = TBSTATE_ENABLED; - tbb[0].fsStyle = TBSTYLE_BUTTON; - tbb[0].idCommand = ID_FILE_NEW; - - tbb[1].iBitmap = STD_FILEOPEN; - tbb[1].fsState = TBSTATE_ENABLED; - tbb[1].fsStyle = TBSTYLE_BUTTON; - tbb[1].idCommand = ID_FILE_OPEN; - - tbb[2].iBitmap = STD_FILESAVE; - tbb[2].fsState = TBSTATE_ENABLED; - tbb[2].fsStyle = TBSTYLE_BUTTON; - tbb[2].idCommand = ID_FILE_SAVEAS; - - SendMessage(hTool, TB_ADDBUTTONS, sizeof(tbb)/sizeof(TBBUTTON), (LPARAM)&tbb); - - // Create Status bar - - hStatus = CreateWindowEx(0, STATUSCLASSNAME, NULL, - WS_CHILD | WS_VISIBLE | SBARS_SIZEGRIP, 0, 0, 0, 0, - hwnd, (HMENU)IDC_MAIN_STATUS, GetModuleHandle(NULL), NULL); - - SendMessage(hStatus, SB_SETPARTS, sizeof(statwidths)/sizeof(int), (LPARAM)statwidths); - SendMessage(hStatus, SB_SETTEXT, 0, (LPARAM)"Hi there :)"); - } - break; - case WM_SIZE: - { - HWND hTool; - RECT rcTool; - int iToolHeight; - - HWND hStatus; - RECT rcStatus; - int iStatusHeight; - - HWND hMDI; - int iMDIHeight; - RECT rcClient; - - // Size toolbar and get height - - hTool = GetDlgItem(hwnd, IDC_MAIN_TOOL); - SendMessage(hTool, TB_AUTOSIZE, 0, 0); - - GetWindowRect(hTool, &rcTool); - iToolHeight = rcTool.bottom - rcTool.top; - - // Size status bar and get height - - hStatus = GetDlgItem(hwnd, IDC_MAIN_STATUS); - SendMessage(hStatus, WM_SIZE, 0, 0); - - GetWindowRect(hStatus, &rcStatus); - iStatusHeight = rcStatus.bottom - rcStatus.top; - - // Calculate remaining height and size edit - - GetClientRect(hwnd, &rcClient); - - iMDIHeight = rcClient.bottom - iToolHeight - iStatusHeight; - - hMDI = GetDlgItem(hwnd, IDC_MAIN_MDI); - SetWindowPos(hMDI, NULL, 0, iToolHeight, rcClient.right, iMDIHeight, SWP_NOZORDER); - } - break; - case WM_CLOSE: - DestroyWindow(hwnd); - break; - case WM_DESTROY: - PostQuitMessage(0); - break; - case WM_COMMAND: - switch(LOWORD(wParam)) - { - case ID_FILE_EXIT: - PostMessage(hwnd, WM_CLOSE, 0, 0); - break; - case ID_FILE_NEW: - CreateNewMDIChild(g_hMDIClient); - break; - case ID_FILE_OPEN: - { - HWND hChild = CreateNewMDIChild(g_hMDIClient); - if(hChild) - { - DoFileOpen(hChild); - } - } - break; - case ID_FILE_CLOSE: - { - HWND hChild = (HWND)SendMessage(g_hMDIClient, WM_MDIGETACTIVE,0,0); - if(hChild) - { - SendMessage(hChild, WM_CLOSE, 0, 0); - } - } - break; - case ID_WINDOW_TILE: - SendMessage(g_hMDIClient, WM_MDITILE, 0, 0); - break; - case ID_WINDOW_CASCADE: - SendMessage(g_hMDIClient, WM_MDICASCADE, 0, 0); - break; - default: - { - if(LOWORD(wParam) >= ID_MDI_FIRSTCHILD) - { - DefFrameProc(hwnd, g_hMDIClient, WM_COMMAND, wParam, lParam); - } - else - { - HWND hChild = (HWND)SendMessage(g_hMDIClient, WM_MDIGETACTIVE,0,0); - if(hChild) - { - SendMessage(hChild, WM_COMMAND, wParam, lParam); - } - } - } - } - break; - default: - return DefFrameProc(hwnd, g_hMDIClient, msg, wParam, lParam); - } - return 0; -} - -LRESULT CALLBACK MDIChildWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch(msg) - { - case WM_CREATE: - { - HFONT hfDefault; - HWND hEdit; - - // Create Edit Control - - hEdit = CreateWindowEx(WS_EX_CLIENTEDGE, "EDIT", "", - WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL, - 0, 0, 100, 100, hwnd, (HMENU)IDC_CHILD_EDIT, GetModuleHandle(NULL), NULL); - if(hEdit == NULL) - MessageBox(hwnd, "Could not create edit box.", "Error", MB_OK | MB_ICONERROR); - - hfDefault = GetStockObject(DEFAULT_GUI_FONT); - SendMessage(hEdit, WM_SETFONT, (WPARAM)hfDefault, MAKELPARAM(FALSE, 0)); - } - break; - case WM_MDIACTIVATE: - { - HMENU hMenu, hFileMenu; - UINT EnableFlag; - - hMenu = GetMenu(g_hMainWindow); - if(hwnd == (HWND)lParam) - { //being activated, enable the menus - EnableFlag = MF_ENABLED; - } - else - { //being de-activated, gray the menus - EnableFlag = MF_GRAYED; - } - - EnableMenuItem(hMenu, 1, MF_BYPOSITION | EnableFlag); - EnableMenuItem(hMenu, 2, MF_BYPOSITION | EnableFlag); - - hFileMenu = GetSubMenu(hMenu, 0); - EnableMenuItem(hFileMenu, ID_FILE_SAVEAS, MF_BYCOMMAND | EnableFlag); - - EnableMenuItem(hFileMenu, ID_FILE_CLOSE, MF_BYCOMMAND | EnableFlag); - EnableMenuItem(hFileMenu, ID_FILE_CLOSEALL, MF_BYCOMMAND | EnableFlag); - - DrawMenuBar(g_hMainWindow); - } - break; - case WM_COMMAND: - switch(LOWORD(wParam)) - { - case ID_FILE_OPEN: - DoFileOpen(hwnd); - break; - case ID_FILE_SAVEAS: - DoFileSave(hwnd); - break; - case ID_EDIT_CUT: - SendDlgItemMessage(hwnd, IDC_CHILD_EDIT, WM_CUT, 0, 0); - break; - case ID_EDIT_COPY: - SendDlgItemMessage(hwnd, IDC_CHILD_EDIT, WM_COPY, 0, 0); - break; - case ID_EDIT_PASTE: - SendDlgItemMessage(hwnd, IDC_CHILD_EDIT, WM_PASTE, 0, 0); - break; - } - break; - case WM_SIZE: - { - HWND hEdit; - RECT rcClient; - - // Calculate remaining height and size edit - - GetClientRect(hwnd, &rcClient); - - hEdit = GetDlgItem(hwnd, IDC_CHILD_EDIT); - SetWindowPos(hEdit, NULL, 0, 0, rcClient.right, rcClient.bottom, SWP_NOZORDER); - } - return DefMDIChildProc(hwnd, msg, wParam, lParam); - default: - return DefMDIChildProc(hwnd, msg, wParam, lParam); - - } - return 0; -} - -BOOL SetUpMDIChildWindowClass(HINSTANCE hInstance) -{ - WNDCLASSEX wc; - - wc.cbSize = sizeof(WNDCLASSEX); - wc.style = CS_HREDRAW | CS_VREDRAW; - wc.lpfnWndProc = MDIChildWndProc; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = hInstance; - wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION); - wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW); - wc.hbrBackground = (HBRUSH)(COLOR_3DFACE+1); - wc.lpszMenuName = NULL; - wc.lpszClassName = g_szChildClassName; - wc.hIconSm = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION); - - if(!RegisterClassEx(&wc)) - { - MessageBox(0, "Could Not Register Child Window", "Oh Oh...", - MB_ICONEXCLAMATION | MB_OK); - return FALSE; - } - else - return TRUE; -} - - -int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, - LPSTR lpCmdLine, int nCmdShow) -{ - WNDCLASSEX wc; - HWND hwnd; - MSG Msg; - - InitCommonControls(); - - wc.cbSize = sizeof(WNDCLASSEX); - wc.style = 0; - wc.lpfnWndProc = WndProc; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = hInstance; - wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION); - wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW); - wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); - wc.lpszMenuName = MAKEINTRESOURCE(IDR_MAINMENU); - wc.lpszClassName = g_szClassName; - wc.hIconSm = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION); - - if(!RegisterClassEx(&wc)) - { - MessageBox(NULL, "Window Registration Failed!", "Error!", - MB_ICONEXCLAMATION | MB_OK); - return 0; - } - - if(!SetUpMDIChildWindowClass(hInstance)) - return 0; - - hwnd = CreateWindowEx( - 0, - g_szClassName, - "MDI Test Application", - WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, - CW_USEDEFAULT, CW_USEDEFAULT, 480, 320, - NULL, NULL, hInstance, NULL); - - if(hwnd == NULL) - { - MessageBox(NULL, "Window Creation Failed!", "Error!", - MB_ICONEXCLAMATION | MB_OK); - return 0; - } - - g_hMainWindow = hwnd; - - ShowWindow(hwnd, nCmdShow); - UpdateWindow(hwnd); - - while(GetMessage(&Msg, NULL, 0, 0) > 0) - { - if (!TranslateMDISysAccel(g_hMDIClient, &Msg)) - { - TranslateMessage(&Msg); - DispatchMessage(&Msg); - } - } - return Msg.wParam; -} diff --git a/rostests/tests/mdi/mdi.rbuild b/rostests/tests/mdi/mdi.rbuild deleted file mode 100644 index 04481eca1c9..00000000000 --- a/rostests/tests/mdi/mdi.rbuild +++ /dev/null @@ -1,8 +0,0 @@ - - user32 - gdi32 - comctl32 - comdlg32 - mdi.c - mdi.rc - diff --git a/rostests/tests/mdi/mdi.rc b/rostests/tests/mdi/mdi.rc deleted file mode 100644 index fa5b4a5416b..00000000000 --- a/rostests/tests/mdi/mdi.rc +++ /dev/null @@ -1,27 +0,0 @@ -#include -#include "resource.h" - -IDR_MAINMENU MENU DISCARDABLE -BEGIN - POPUP "&File" - BEGIN - MENUITEM "&New", ID_FILE_NEW - MENUITEM "&Open...", ID_FILE_OPEN - MENUITEM "Save &As...", ID_FILE_SAVEAS, GRAYED - MENUITEM SEPARATOR - MENUITEM "&Close", ID_FILE_CLOSE, GRAYED - MENUITEM SEPARATOR - MENUITEM "E&xit", ID_FILE_EXIT - END - POPUP "&Edit", GRAYED - BEGIN - MENUITEM "C&ut", ID_EDIT_CUT - MENUITEM "&Copy", ID_EDIT_COPY - MENUITEM "&Paste", ID_EDIT_PASTE - END - POPUP "&Window", GRAYED - BEGIN - MENUITEM "&Tile", ID_WINDOW_TILE - MENUITEM "&Cascade", ID_WINDOW_CASCADE - END -END diff --git a/rostests/tests/mdi/resource.h b/rostests/tests/mdi/resource.h deleted file mode 100644 index 548807bd8d0..00000000000 --- a/rostests/tests/mdi/resource.h +++ /dev/null @@ -1,27 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by app_four.rc -// -#define IDR_MAINMENU 102 -#define ID_FILE_EXIT 40001 -#define ID_FILE_NEW 40002 -#define ID_FILE_OPEN 40003 -#define ID_FILE_SAVEAS 40005 -#define ID_WINDOW_CASCADE 40008 -#define ID_WINDOW_TILE 40009 -#define ID_FILE_CLOSE 40010 -#define ID_FILE_CLOSEALL 40011 -#define ID_EDIT_CUT 40015 -#define ID_EDIT_COPY 40016 -#define ID_EDIT_PASTE 40017 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 101 -#define _APS_NEXT_COMMAND_VALUE 40020 -#define _APS_NEXT_CONTROL_VALUE 1000 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/rostests/tests/miditest/miditest.c b/rostests/tests/miditest/miditest.c deleted file mode 100644 index 695df008aca..00000000000 --- a/rostests/tests/miditest/miditest.c +++ /dev/null @@ -1,54 +0,0 @@ -#include -#include -#include - -// WINE's mmsystem.h doesn't seem to define these properly: - -#define MIDIOUTCAPS MIDIOUTCAPSA -#define MIDIINCAPS MIDIINCAPSA -#undef midiOutGetDevCaps -#define midiOutGetDevCaps midiOutGetDevCapsA -#undef midiInGetDevCaps -#define midiInGetDevCaps midiInGetDevCapsA - - -int main() -{ - UINT outs = midiOutGetNumDevs(); -// UINT ins = midiInGetNumDevs(); - - MIDIOUTCAPS outcaps; -// MIDIINCAPS incaps; - - int c; - - HMIDIOUT Handle = NULL; - UINT Result; - - printf("MIDI output devices: %d\n", outs); - - for (c = 0; c < outs; c ++) - { - if (midiOutGetDevCaps(c, &outcaps, sizeof(MIDIOUTCAPS)) == MMSYSERR_NOERROR) - printf("Device #%d: %s\n", c, outcaps.szPname); - } - - printf("Opening MIDI output #0\n"); - - Result = midiOutOpen(&Handle, 0, 0, 0, CALLBACK_NULL); - printf("Result == %d Handle == %p\n", Result, Handle); - - // play something: - midiOutShortMsg(Handle, 0x007f3090); - -/* - printf("\nMIDI input devices: %d\n", ins); - - for (c = 0; c < ins; c ++) - { - midiInGetDevCaps(c, &incaps, sizeof(incaps)); - printf("Device #%d: %s\n", c, incaps.szPname); - } -*/ - return 0; -} diff --git a/rostests/tests/miditest/miditest.rbuild b/rostests/tests/miditest/miditest.rbuild deleted file mode 100644 index 3b942ddd3d6..00000000000 --- a/rostests/tests/miditest/miditest.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - winmm - miditest.c - diff --git a/rostests/tests/miditest/miditest.rc b/rostests/tests/miditest/miditest.rc deleted file mode 100644 index 5174d310d99..00000000000 --- a/rostests/tests/miditest/miditest.rc +++ /dev/null @@ -1,26 +0,0 @@ -#include - -IDR_MAINMENU MENU DISCARDABLE -BEGIN - POPUP "&File" - BEGIN - MENUITEM "&New", ID_FILE_NEW - MENUITEM "&Open...", ID_FILE_OPEN - MENUITEM "Save &As...", ID_FILE_SAVEAS, GRAYED - MENUITEM SEPARATOR - MENUITEM "&Close", ID_FILE_CLOSE, GRAYED - MENUITEM SEPARATOR - MENUITEM "E&xit", ID_FILE_EXIT - END - POPUP "&Edit", GRAYED - BEGIN - MENUITEM "C&ut", ID_EDIT_CUT - MENUITEM "&Copy", ID_EDIT_COPY - MENUITEM "&Paste", ID_EDIT_PASTE - END - POPUP "&Window", GRAYED - BEGIN - MENUITEM "&Tile", ID_WINDOW_TILE - MENUITEM "&Cascade", ID_WINDOW_CASCADE - END -END diff --git a/rostests/tests/mktime/mktime.c b/rostests/tests/mktime/mktime.c deleted file mode 100644 index f5cf40bb2a9..00000000000 --- a/rostests/tests/mktime/mktime.c +++ /dev/null @@ -1,29 +0,0 @@ - -#include -#include - -struct tm time_str; - -char daybuf[20]; - -int main(void) -{ - printf("Testing mktime() by asking\n"); - printf("What day of the week is July 4, 2001?\n"); - - time_str.tm_year = 2001 - 1900; - time_str.tm_mon = 7 - 1; - time_str.tm_mday = 4; - time_str.tm_hour = 0; - time_str.tm_min = 0; - time_str.tm_sec = 1; - time_str.tm_isdst = -1; - if (mktime(&time_str) == -1) - (void)puts("-unknown-"); - else { - (void)strftime(daybuf, sizeof(daybuf), "%A", &time_str); - (void)puts(daybuf); - } - return 0; -} - diff --git a/rostests/tests/mktime/mktime.rbuild b/rostests/tests/mktime/mktime.rbuild deleted file mode 100644 index d8fa65d4d83..00000000000 --- a/rostests/tests/mktime/mktime.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - mktime.c - diff --git a/rostests/tests/mmixer_test/CMakeLists.txt b/rostests/tests/mmixer_test/CMakeLists.txt deleted file mode 100644 index cda6334372a..00000000000 --- a/rostests/tests/mmixer_test/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ - -add_definitions(-D_DLL -D__USE_CRTIMP) - -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/libs/sound) -include_directories(${REACTOS_SOURCE_DIR}/lib/drivers/sound/mmixer) - -add_executable(mmixer_test test.c) -set_module_type(mmixer_test win32cui) - -target_link_libraries(mmixer_test mmixer) -add_importlibs(mmixer_test advapi32 setupapi winmm ksuser user32 msvcrt kernel32) \ No newline at end of file diff --git a/rostests/tests/mmixer_test/mmixer_test.rbuild b/rostests/tests/mmixer_test/mmixer_test.rbuild deleted file mode 100644 index 3e0bbb85285..00000000000 --- a/rostests/tests/mmixer_test/mmixer_test.rbuild +++ /dev/null @@ -1,13 +0,0 @@ - - - - include/reactos/libs/sound - - advapi32 - setupapi - winmm - mmixer - ksuser - user32 - test.c - \ No newline at end of file diff --git a/rostests/tests/mmixer_test/test.c b/rostests/tests/mmixer_test/test.c deleted file mode 100644 index 6aaf1bd9ca8..00000000000 --- a/rostests/tests/mmixer_test/test.c +++ /dev/null @@ -1,219 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -HMIXER hMixer; -HANDLE hThread; -HWND hwnd; - -DWORD -WINAPI -MixerThread(LPVOID Parameter) -{ - - MSG msg; - - printf("hMixer %p\n", hMixer); - - while(GetMessage(&msg, NULL, 0, 0)) - { - if (msg.message == MM_MIXM_CONTROL_CHANGE) - printf("got MM_MIXM_CONTROL_CHANGE wParam %x lParam %lx\n", msg.wParam, msg.lParam); - else if (msg.message == MM_MIXM_LINE_CHANGE) - printf("got MM_MIXM_LINE_CHANGE wParam %x lParam %lx\n", msg.wParam, msg.lParam); - } - return 1; -} - -VOID -test() -{ - - - hwnd = CreateWindowExA(0, "static", "winmm test", WS_POPUP, 0,0,100,100, - 0, 0, 0, NULL); - - - if (!hwnd) { - printf("failed to create window\n"); - exit(-1); - } - - printf("window created\n"); - - if (mixerOpen(&hMixer, 0, (DWORD_PTR)hwnd, 0, CALLBACK_WINDOW | MIXER_OBJECTF_MIXER) != MMSYSERR_NOERROR) - { - printf("failed to create mixer\n"); - exit(-2); - } - - hThread = CreateThread(NULL, 0, MixerThread, NULL, 0, NULL); - - if (hThread == NULL) - { - printf("failed to create thread\n"); - exit(-3); - } -} - - - - - - -void -printMixerLine(LPMIXERLINEW MixerLine, IN ULONG MixerIndex) -{ - MIXERLINECONTROLSW MixerLineControls; - LPMIXERCONTROLDETAILS_LISTTEXTW ListText; - MIXERCONTROLDETAILS MixerControlDetails; - ULONG Index, SubIndex; - MMRESULT Result; - - printf("\n"); - printf("cChannels %lu\n", MixerLine->cChannels); - printf("cConnections %lu\n", MixerLine->cConnections); - printf("cControls %lu\n", MixerLine->cControls); - printf("dwComponentType %lx\n", MixerLine->dwComponentType); - printf("dwDestination %lu\n", MixerLine->dwDestination); - printf("dwLineID %lx\n", MixerLine->dwLineID); - printf("dwSource %lx\n", MixerLine->dwSource); - printf("dwUser %lu\n", MixerLine->dwUser); - printf("fdwLine %lu\n", MixerLine->fdwLine); - printf("szName %S\n", MixerLine->szName); - printf("szShortName %S\n", MixerLine->szShortName); - printf("Target.dwDeviceId %lu\n", MixerLine->Target.dwDeviceID); - printf("Target.dwType %lu\n", MixerLine->Target.dwType); - printf("Target.szName %S\n", MixerLine->Target.szPname); - printf("Target.vDriverVersion %x\n", MixerLine->Target.vDriverVersion); - printf("Target.wMid %x\n", MixerLine->Target.wMid ); - printf("Target.wPid %x\n", MixerLine->Target.wPid); - - MixerLineControls.cbStruct = sizeof(MixerLineControls); - MixerLineControls.dwLineID = MixerLine->dwLineID; - MixerLineControls.cControls = MixerLine->cControls; - MixerLineControls.cbmxctrl= sizeof(MIXERCONTROLW); - MixerLineControls.pamxctrl = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, MixerLineControls.cControls * sizeof(MIXERCONTROLW)); - - Result = mixerGetLineControlsW((HMIXEROBJ)MixerIndex, &MixerLineControls, MIXER_GETLINECONTROLSF_ALL | MIXER_OBJECTF_MIXER); - - printf("Result %u\n", Result); - - for(Index = 0; Index < MixerLine->cControls; Index++) - { - printf("\n"); - printf("Control Index: %lu\n", Index); - printf("\n"); - printf("cbStruct %lu\n", MixerLineControls.pamxctrl[Index].cbStruct); - printf("dwControlID %lu\n", MixerLineControls.pamxctrl[Index].dwControlID); - printf("dwControlType %lx\n", MixerLineControls.pamxctrl[Index].dwControlType); - printf("fdwControl %lu\n", MixerLineControls.pamxctrl[Index].fdwControl); - printf("cMultipleItems %lu\n", MixerLineControls.pamxctrl[Index].cMultipleItems); - printf("szShortName %S\n", MixerLineControls.pamxctrl[Index].szShortName); - printf("szName %S\n", MixerLineControls.pamxctrl[Index].szName); - printf("Bounds.dwMinimum %lu\n", MixerLineControls.pamxctrl[Index].Bounds.dwMinimum); - printf("Bounds.dwMaximum %lu\n", MixerLineControls.pamxctrl[Index].Bounds.dwMaximum); - - printf("Metrics.Reserved[0] %lu\n", MixerLineControls.pamxctrl[Index].Metrics.dwReserved[0]); - printf("Metrics.Reserved[1] %lu\n", MixerLineControls.pamxctrl[Index].Metrics.dwReserved[1]); - printf("Metrics.Reserved[2] %lu\n", MixerLineControls.pamxctrl[Index].Metrics.dwReserved[2]); - printf("Metrics.Reserved[3] %lu\n", MixerLineControls.pamxctrl[Index].Metrics.dwReserved[3]); - printf("Metrics.Reserved[4] %lu\n", MixerLineControls.pamxctrl[Index].Metrics.dwReserved[4]); - printf("Metrics.Reserved[5] %lu\n", MixerLineControls.pamxctrl[Index].Metrics.dwReserved[5]); - - if (MixerLineControls.pamxctrl[Index].dwControlType == MIXERCONTROL_CONTROLTYPE_MUX) - { - ZeroMemory(&MixerControlDetails, sizeof(MixerControlDetails)); - MixerControlDetails.cbStruct = sizeof(MIXERCONTROLDETAILS); - MixerControlDetails.cbDetails = sizeof(MIXERCONTROLDETAILS_LISTTEXTW); - MixerControlDetails.cChannels = 1; - MixerControlDetails.cMultipleItems = MixerLineControls.pamxctrl[Index].Metrics.dwReserved[0]; - MixerControlDetails.dwControlID = MixerLineControls.pamxctrl[Index].dwControlID; - MixerControlDetails.paDetails = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, MixerControlDetails.cbDetails * MixerControlDetails.cChannels * MixerControlDetails.cMultipleItems); - - Result = mixerGetControlDetailsW((HMIXEROBJ)MixerIndex, &MixerControlDetails, MIXER_GETCONTROLDETAILSF_LISTTEXT | MIXER_OBJECTF_MIXER); - - printf("Result %x\n", Result); - ListText = (LPMIXERCONTROLDETAILS_LISTTEXTW)MixerControlDetails.paDetails; - for(SubIndex = 0; SubIndex < MixerControlDetails.cMultipleItems; SubIndex++) - { - printf("dwParam1 %lx\n", ListText[SubIndex].dwParam1); - printf("dwParam1 %lx\n", ListText[SubIndex].dwParam2); - printf("szName %S\n", ListText[SubIndex].szName); - } - - MixerControlDetails.cbDetails = sizeof(MIXERCONTROLDETAILS_BOOLEAN); - MixerControlDetails.paDetails = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(MIXERCONTROLDETAILS_BOOLEAN) * MixerControlDetails.cMultipleItems); - ((LPMIXERCONTROLDETAILS_BOOLEAN)MixerControlDetails.paDetails)->fValue = TRUE; - - Result = mixerSetControlDetails((HMIXEROBJ)hMixer, &MixerControlDetails, MIXER_SETCONTROLDETAILSF_VALUE | MIXER_OBJECTF_HANDLE); - printf("Result %x hMixer %p\n", Result, hMixer); - } - } -} - -int main(int argc, char**argv) -{ - DWORD MixerCount, MixerIndex, DestinationIndex, SrcIndex; - MIXERCAPSW MixerCaps; - MIXERLINEW DstMixerLine, SrcLine; - MMRESULT Result; - - -test(); - - MixerCount = mixerGetNumDevs(); - - printf("MixerCount %lu\n", MixerCount); - - for(MixerIndex = 0; MixerIndex < MixerCount; MixerIndex++) - { - Result = mixerGetDevCapsW((UINT_PTR)MixerIndex, &MixerCaps, sizeof(MixerCaps)); - - printf("\n"); - printf("Index %lu Result %x\n", MixerIndex, Result); - printf("Name :%S\n", MixerCaps.szPname); - printf("cDestinations: %lu\n", MixerCaps.cDestinations); - printf("fdwSupport %lx\n", MixerCaps.fdwSupport); - printf("vDriverVersion %x\n", MixerCaps.vDriverVersion); - printf("wMid %x\n", MixerCaps.wMid); - printf("wPid %x\n", MixerCaps.wPid); - - for(DestinationIndex = 0; DestinationIndex < MixerCaps.cDestinations; DestinationIndex++) - { - ZeroMemory(&DstMixerLine, sizeof(DstMixerLine)); - DstMixerLine.dwDestination = DestinationIndex; - DstMixerLine.cbStruct = sizeof(DstMixerLine); - - Result = mixerGetLineInfoW((HMIXEROBJ)MixerIndex, &DstMixerLine, MIXER_GETLINEINFOF_DESTINATION | MIXER_OBJECTF_MIXER); - printf("\n"); - printf("Destination Index %lu\n", DestinationIndex); - printMixerLine(&DstMixerLine, MixerIndex); - for(SrcIndex = 0; SrcIndex < DstMixerLine.cConnections; SrcIndex++) - { - ZeroMemory(&SrcLine, sizeof(SrcLine)); - SrcLine.dwDestination = DestinationIndex; - SrcLine.dwSource = SrcIndex; - SrcLine.cbStruct = sizeof(SrcLine); - - Result = mixerGetLineInfoW((HMIXEROBJ)MixerIndex, &SrcLine, MIXER_GETLINEINFOF_SOURCE | MIXER_OBJECTF_MIXER); - - if (Result == MMSYSERR_NOERROR) - { - printf("\n"); - printf("SrcLineIndex %lu\n", SrcIndex); - printMixerLine(&SrcLine, MixerIndex); - } - } - } - } -WaitForSingleObject(hThread, INFINITE); -CloseHandle(hThread); - - return 0; -} diff --git a/rostests/tests/moztest/moztest.c b/rostests/tests/moztest/moztest.c deleted file mode 100644 index dd792e49d5a..00000000000 --- a/rostests/tests/moztest/moztest.c +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Mozilla Test - * Copyright (C) 2004 Filip Navara - */ - -#include -#include - -ULONG DbgPrint(PCH Format,...); - -#undef DBG -#define DBG(x) \ - printf("%s:%i - %s", __FILE__, __LINE__, x); \ - DbgPrint("%s:%i - %s", __FILE__, __LINE__, x); - -int SocketTest() -{ - /* - * A socket pair is often used for interprocess communication, - * so we need to make sure neither socket is associated with - * the I/O completion port; otherwise it can't be used by a - * child process. - * - * The default implementation below cannot be used for NT - * because PR_Accept would have associated the I/O completion - * port with the listening and accepted sockets. - */ - SOCKET listenSock; - SOCKET osfd[2]; - struct sockaddr_in selfAddr, peerAddr; - int addrLen; - WORD wVersionRequested; - WSADATA wsaData; - int err; - - /* - * Initialization. - */ - - wVersionRequested = MAKEWORD( 2, 2 ); - - DBG("Calling WSAStartup\n"); - err = WSAStartup( wVersionRequested, &wsaData ); - if ( err != 0 ) { - /* Tell the user that we could not find a usable */ - /* WinSock DLL. */ - DBG("WSAStartup failed\n"); - return 1; - } - - /* Confirm that the WinSock DLL supports 2.2.*/ - /* Note that if the DLL supports versions greater */ - /* than 2.2 in addition to 2.2, it will still return */ - /* 2.2 in wVersion since that is the version we */ - /* requested. */ - - if ( LOBYTE( wsaData.wVersion ) != 2 || - HIBYTE( wsaData.wVersion ) != 2 ) { - /* Tell the user that we could not find a usable */ - /* WinSock DLL. */ - DBG("WSAStartup version unacceptable\n"); - WSACleanup( ); - return 1; - } - - /* The WinSock DLL is acceptable. Proceed. */ - - DBG("Calling socket\n"); - osfd[0] = osfd[1] = INVALID_SOCKET; - listenSock = socket(AF_INET, SOCK_STREAM, 0); - if (listenSock == INVALID_SOCKET) { - DBG("socket failed\n"); - goto failed; - } - - selfAddr.sin_family = AF_INET; - selfAddr.sin_port = 0; - selfAddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); /* BugZilla: 35408 */ - addrLen = sizeof(selfAddr); - DBG("Calling bind\n"); - if (bind(listenSock, (struct sockaddr *) &selfAddr, - addrLen) == SOCKET_ERROR) { - DBG("bind failed\n"); - goto failed; - } - - DBG("Calling getsockname\n"); - if (getsockname(listenSock, (struct sockaddr *) &selfAddr, - &addrLen) == SOCKET_ERROR) { - DBG("getsockname failed\n"); - goto failed; - } - - DBG("Calling listen\n"); - if (listen(listenSock, 5) == SOCKET_ERROR) { - DBG("listen failed\n"); - goto failed; - } - - DBG("Calling socket\n"); - osfd[0] = socket(AF_INET, SOCK_STREAM, 0); - if (osfd[0] == INVALID_SOCKET) { - DBG("socket failed\n"); - goto failed; - } - selfAddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - - /* - * Only a thread is used to do the connect and accept. - * I am relying on the fact that connect returns - * successfully as soon as the connect request is put - * into the listen queue (but before accept is called). - * This is the behavior of the BSD socket code. If - * connect does not return until accept is called, we - * will need to create another thread to call connect. - */ - DBG("Calling connect\n"); - if (connect(osfd[0], (struct sockaddr *) &selfAddr, - addrLen) == SOCKET_ERROR) { - DBG("connect failed\n"); - goto failed; - } - - /* - * A malicious local process may connect to the listening - * socket, so we need to verify that the accepted connection - * is made from our own socket osfd[0]. - */ - DBG("Calling getsockname\n"); - if (getsockname(osfd[0], (struct sockaddr *) &selfAddr, - &addrLen) == SOCKET_ERROR) { - DBG("getsockname failed\n"); - goto failed; - } - - DBG("Calling accept\n"); - osfd[1] = accept(listenSock, (struct sockaddr *) &peerAddr, &addrLen); - if (osfd[1] == INVALID_SOCKET) { - DBG("accept failed\n"); - goto failed; - } - if (peerAddr.sin_port != selfAddr.sin_port) { - /* the connection we accepted is not from osfd[0] */ - DBG("peerAddr.sin_port != selfAddr.sin_port\n"); - goto failed; - } - - DBG("Hurray!\n"); - - closesocket(listenSock); - - closesocket(osfd[0]); - closesocket(osfd[1]); - - WSACleanup(); - - return 0; - -failed: - if (listenSock != INVALID_SOCKET) { - closesocket(listenSock); - } - if (osfd[0] != INVALID_SOCKET) { - closesocket(osfd[0]); - } - if (osfd[1] != INVALID_SOCKET) { - closesocket(osfd[1]); - } - - WSACleanup(); - - return 1; -} - -int VirtualTest() -{ - DWORD dwErr; - SYSTEM_INFO si; - HANDLE hMap; - PBYTE pBufferStart; - PCHAR pszFileName = "test.txt"; - ULONG dwMaxSize = strlen(pszFileName); - - DBG("Calling CreateFileMappingA\n"); - hMap = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, - PAGE_READWRITE | SEC_RESERVE, 0, dwMaxSize, pszFileName); - if (!hMap) - { - DBG("CreateFileMappingA failed\n"); - return 1; - } - - dwErr = GetLastError(); - DBG("Calling MapViewOfFile\n"); - pBufferStart = (BYTE *)MapViewOfFile(hMap, FILE_MAP_ALL_ACCESS, 0, 0, 0); - if (!pBufferStart) - { - DBG("MapViewOfFile failed\n"); - return 1; - } - - GetSystemInfo(&si); - - if (dwErr == ERROR_ALREADY_EXISTS) - { - DBG("MapViewOfFile returned ERROR_ALREADY_EXISTS\n"); - DBG("This really shouldn't happen, but it's not fatal.\n"); - UnmapViewOfFile(pBufferStart); - CloseHandle(hMap); - return 1; - } - else - { - DBG("Calling VirtualAlloc\n"); - if (!VirtualAlloc(pBufferStart, si.dwPageSize, MEM_COMMIT, PAGE_READWRITE)) - { - DBG("VirtualAlloc failed\n"); - UnmapViewOfFile(pBufferStart); - CloseHandle(hMap); - return 1; - } - } - - DBG("Hurray!\n"); - - UnmapViewOfFile(pBufferStart); - CloseHandle(hMap); - - return 0; -} - -int main(int argc, char **argv) -{ - if (argc != 2) - { - printf("Usage: %s test_name\n\n", argv[0]); - printf("Valid test names:\n"); - printf("\tsocket\n"); - printf("\tvirtual\n"); - return 0; - } - - if (!_stricmp(argv[1], "socket")) - return SocketTest(); - if (!_stricmp(argv[1], "virtual")) - return VirtualTest(); - - printf("Test '%s' doesn't exist\n", argv[1]); - - return 0; -} diff --git a/rostests/tests/moztest/moztest.rbuild b/rostests/tests/moztest/moztest.rbuild deleted file mode 100644 index ba7e8ead9c8..00000000000 --- a/rostests/tests/moztest/moztest.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - ntdll - ws2_32 - moztest.c - diff --git a/rostests/tests/mstest/msclient.c b/rostests/tests/mstest/msclient.c deleted file mode 100644 index 15551c4a09b..00000000000 --- a/rostests/tests/mstest/msclient.c +++ /dev/null @@ -1,46 +0,0 @@ -#include -#include -#include -#include -#include - -#define BUFSIZE 1024 -#define MAILSLOT_TIMEOUT 1000 - - -int main(int argc, char *argv[]) -{ - HANDLE hMailslot; - LPSTR lpszMailslotName = "\\\\.\\MAILSLOT\\mymailslot"; - LPSTR lpszTestMessage = "Mailslot test message!"; - DWORD cbLength, cbWritten; - - hMailslot = CreateFile(lpszMailslotName, - GENERIC_WRITE, - FILE_SHARE_READ, - (LPSECURITY_ATTRIBUTES)NULL, - OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, - (HANDLE)NULL); - printf("hMailslot %x\n", (DWORD)hMailslot); - if (hMailslot == INVALID_HANDLE_VALUE) - { - printf("CreateFile() failed\n"); - return 0; - } - - cbLength = (ULONG)strlen(lpszTestMessage)+1; - - WriteFile(hMailslot, - lpszTestMessage, - cbLength, - &cbWritten, - NULL); - - CloseHandle(hMailslot); - - return 0; -} - -/* EOF */ - diff --git a/rostests/tests/mstest/msserver.c b/rostests/tests/mstest/msserver.c deleted file mode 100644 index 939c0aa93e9..00000000000 --- a/rostests/tests/mstest/msserver.c +++ /dev/null @@ -1,40 +0,0 @@ - - -#include - - -int main(int argc, char *argv[]) -{ - HANDLE hMailslot; - CHAR chBuf[512]; - BOOL fResult; - DWORD cbRead; - LPTSTR lpszMailslotName = "\\\\.\\mailslot\\mymailslot"; - - hMailslot = CreateMailslot(lpszMailslotName, - 512, - MAILSLOT_WAIT_FOREVER, - NULL); -for (;;) -{ - fResult = ReadFile(hMailslot, - chBuf, - 512, - &cbRead, - NULL); - if (fResult == FALSE) - { - printf("ReadFile() failed!\n"); - CloseHandle(hMailslot); - return 0; - } - - printf("Data read: %s\n", chBuf); -} - - CloseHandle(hMailslot); - - return 0; -} - -/* EOF */ diff --git a/rostests/tests/mstest/mstest.rbuild b/rostests/tests/mstest/mstest.rbuild deleted file mode 100644 index f29a7244ece..00000000000 --- a/rostests/tests/mstest/mstest.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - mstest.c - diff --git a/rostests/tests/multithrdwin/multithrdwin.c b/rostests/tests/multithrdwin/multithrdwin.c deleted file mode 100644 index 0d4fc5e98f1..00000000000 --- a/rostests/tests/multithrdwin/multithrdwin.c +++ /dev/null @@ -1,238 +0,0 @@ -#include -#include - -ULONG DbgPrint(PCH Format,...); - -typedef struct _THRDCREATEWIN -{ - HANDLE hThread; - DWORD ThreadId; - LPSTR Caption; - HWND *Parent; - HWND Window; - DWORD Style; - POINT Position; - SIZE Size; -} THRDCREATEWIN, *PTHRDCREATEWIN; - -static HINSTANCE hAppInstance; -static HANDLE WinCreatedEvent; -static THRDCREATEWIN wnds[3]; - -LRESULT WINAPI MultiWndProc(HWND, UINT, WPARAM, LPARAM); - -DWORD WINAPI -WindowThreadProc(LPVOID lpParameter) -{ - MSG msg; - char caption[64]; - PTHRDCREATEWIN cw = (PTHRDCREATEWIN)lpParameter; - - sprintf(caption, cw->Caption, GetCurrentThreadId()); - - cw->Window = CreateWindow("MultiClass", - caption, - cw->Style | WS_VISIBLE, - cw->Position.x, - cw->Position.y, - cw->Size.cx, - cw->Size.cy, - (cw->Parent ? *(cw->Parent) : 0), - NULL, - hAppInstance, - NULL); - - SetEvent(WinCreatedEvent); - - if(!cw->Window) - { - fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n", - GetLastError()); - return 1; - } - CreateWindow("BUTTON","Sleep",WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_GROUP|BS_PUSHBUTTON, 10, 10, 70, 23, cw->Window, (PVOID)1, hAppInstance, NULL); - CreateWindow("BUTTON","1",WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_GROUP|BS_PUSHBUTTON, 83, 10, 20, 23, cw->Window, (PVOID)2, hAppInstance, NULL); - CreateWindow("BUTTON","2",WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_GROUP|BS_PUSHBUTTON, 105, 10, 20, 23, cw->Window, (PVOID)3, hAppInstance, NULL); - CreateWindow("BUTTON","3",WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_GROUP|BS_PUSHBUTTON, 127, 10, 20, 23, cw->Window, (PVOID)4, hAppInstance, NULL); - while(GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - return 0; -} - -int WINAPI -WinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpszCmdLine, - int nCmdShow) -{ - WNDCLASS wc; - int i; - HANDLE Threads[3]; - - hAppInstance = hInstance; - - WinCreatedEvent = CreateEvent(NULL, - FALSE, - FALSE, - NULL); - - if(!WinCreatedEvent) - { - fprintf(stderr, "Failed to create event (last error 0x%lX)\n", - GetLastError()); - return 1; - } - - wc.lpszClassName = "MultiClass"; - wc.lpfnWndProc = MultiWndProc; - wc.style = CS_VREDRAW | CS_HREDRAW; - wc.hInstance = hInstance; - wc.hIcon = LoadIcon(NULL, (LPCTSTR) IDI_APPLICATION); - wc.hCursor = LoadCursor(NULL, (LPCTSTR) IDC_ARROW); - wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1); - wc.lpszMenuName = NULL; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - if (RegisterClass(&wc) == 0) - { - fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - wnds[0].Caption = "TopLevel1 (ThreadID: %d)"; - wnds[0].Parent = NULL; - wnds[0].Style = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS; - wnds[0].Position.x = wnds[0].Position.y = 0; - wnds[0].Size.cx = 320; - wnds[0].Size.cy = 240; - - wnds[1].Caption = "Child1 of TopLevel1 (ThreadID: %d)"; - wnds[1].Parent = &wnds[0].Window; - wnds[1].Style = WS_CHILD | WS_BORDER | WS_CAPTION | WS_VISIBLE | WS_SYSMENU | WS_CLIPCHILDREN | WS_CLIPSIBLINGS; - wnds[1].Position.x = 20; - wnds[1].Position.y = 120; - wnds[1].Size.cx = wnds[1].Size.cy = 240; - - wnds[2].Caption = "TopLevel2 (ThreadID: %d)"; - wnds[2].Parent = NULL; - wnds[2].Style = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS; - wnds[2].Position.x = 400; - wnds[2].Position.y = 0; - wnds[2].Size.cx = 160; - wnds[2].Size.cy = 490; - - for(i = 0; i < (sizeof(wnds) / sizeof(THRDCREATEWIN)); i++) - { - wnds[i].hThread = CreateThread(NULL, - 0, - WindowThreadProc, - &wnds[i], - 0, - &wnds[i].ThreadId); - Threads[i] = wnds[i].hThread; - if(!wnds[i].hThread) - { - fprintf(stderr, "CreateThread #%i failed (last error 0x%lX)\n", - i, GetLastError()); - return 1; - } - WaitForSingleObject(WinCreatedEvent, INFINITE); - } - - WaitForMultipleObjects(sizeof(Threads) / sizeof(HANDLE), &Threads[0], TRUE, INFINITE); - - UnregisterClass("MultiClass", hInstance); - - return 0; -} - -LRESULT CALLBACK MultiWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - PAINTSTRUCT ps; - HDC hDC; - RECT Client; - HBRUSH Brush; - DWORD_PTR Ret; - - static COLORREF Colors[] = - { - RGB(0x00, 0x00, 0x00), - RGB(0x80, 0x00, 0x00), - RGB(0x00, 0x80, 0x00), - RGB(0x00, 0x00, 0x80), - RGB(0x80, 0x80, 0x00), - RGB(0x80, 0x00, 0x80), - RGB(0x00, 0x80, 0x80), - RGB(0x80, 0x80, 0x80), - RGB(0xff, 0x00, 0x00), - RGB(0x00, 0xff, 0x00), - RGB(0x00, 0x00, 0xff), - RGB(0xff, 0xff, 0x00), - RGB(0xff, 0x00, 0xff), - RGB(0x00, 0xff, 0xff), - RGB(0xff, 0xff, 0xff) - }; - static unsigned CurrentColor = 0; - - switch(msg) - { - case WM_PAINT: - hDC = BeginPaint(hWnd, &ps); - GetClientRect(hWnd, &Client); - Brush = CreateSolidBrush(Colors[CurrentColor]); - FillRect(hDC, &Client, Brush); - DeleteObject(Brush); - CurrentColor++; - if (sizeof(Colors) / sizeof(Colors[0]) <= CurrentColor) - { - CurrentColor = 0; - } - EndPaint(hWnd, &ps); - break; - - case WM_COMMAND: - switch(LOWORD(wParam)) - { - case 1: - Sleep(20000); - break; - case 2: - case 3: - case 4: - if(SendMessageTimeout(wnds[LOWORD(wParam) - 2].Window, WM_NULL, 0, 0, SMTO_ABORTIFHUNG, 1000, &Ret)) - { - DbgPrint("SendMessageTimeout() OK"); - MessageBox(hWnd, "SendMessageTimeout() OK", NULL, 0); - } - else - { - if(GetLastError() == ERROR_TIMEOUT) - { - DbgPrint("SendMessageTimeout() Timeout"); - MessageBox(hWnd, "SendMessageTimeout() Timeout", NULL, 0); - } - else - { - DbgPrint("SendMessageTimeout() Failed"); - MessageBox(hWnd, "SendMessageTimeout() Failed", NULL, 0); - } - } - break; - } - break; - - case WM_DESTROY: - PostQuitMessage(0); - break; - - default: - return DefWindowProc(hWnd, msg, wParam, lParam); - } - - return 0; -} diff --git a/rostests/tests/multithrdwin/multithrdwin.rbuild b/rostests/tests/multithrdwin/multithrdwin.rbuild deleted file mode 100644 index faf432f2ff2..00000000000 --- a/rostests/tests/multithrdwin/multithrdwin.rbuild +++ /dev/null @@ -1,6 +0,0 @@ - - user32 - gdi32 - ntdll - multithrdwin.c - diff --git a/rostests/tests/multiwin/multiwin.c b/rostests/tests/multiwin/multiwin.c deleted file mode 100644 index 73f8f672cef..00000000000 --- a/rostests/tests/multiwin/multiwin.c +++ /dev/null @@ -1,147 +0,0 @@ -#include -#include - -static UINT WindowCount; -LRESULT WINAPI MultiWndProc(HWND, UINT, WPARAM, LPARAM); - -int WINAPI -WinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpszCmdLine, - int nCmdShow) -{ - WNDCLASS wc; - MSG msg; - HWND hWnd1; - HWND hWnd2; - HWND hWndChild; - - wc.lpszClassName = "MultiClass"; - wc.lpfnWndProc = MultiWndProc; - wc.style = CS_VREDRAW | CS_HREDRAW; - wc.hInstance = hInstance; - wc.hIcon = LoadIcon(NULL, (LPCTSTR) IDI_APPLICATION); - wc.hCursor = LoadCursor(NULL, (LPCTSTR) IDC_ARROW); - wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1); - wc.lpszMenuName = NULL; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - if (RegisterClass(&wc) == 0) - { - fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - hWnd1 = CreateWindow("MultiClass", - "TopLevel1", - WS_OVERLAPPEDWINDOW, - 0, - 0, - 320, - 240, - NULL, - NULL, - hInstance, - NULL); - - hWndChild = CreateWindow("MultiClass", - "Child1 of TopLevel1", - WS_CHILD | WS_BORDER | WS_CAPTION | WS_VISIBLE | WS_SYSMENU, - 20, - 120, - 200, - 200, - hWnd1, - NULL, - hInstance, - NULL); - - hWnd2 = CreateWindow("MultiClass", - "TopLevel2", - WS_OVERLAPPEDWINDOW, - 400, - 0, - 160, - 490, - NULL, - NULL, - hInstance, - NULL); - - if (! hWnd1 || ! hWnd2 || ! hWndChild) - { - fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - WindowCount = 2; - - ShowWindow(hWnd1, SW_NORMAL); - ShowWindow(hWnd2, SW_NORMAL); - - while(GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - return msg.wParam; -} - -LRESULT CALLBACK MultiWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - PAINTSTRUCT ps; - HDC hDC; - LONG Style; - RECT Client; - HBRUSH Brush; - static COLORREF Colors[] = - { - RGB(0x00, 0x00, 0x00), - RGB(0x80, 0x00, 0x00), - RGB(0x00, 0x80, 0x00), - RGB(0x00, 0x00, 0x80), - RGB(0x80, 0x80, 0x00), - RGB(0x80, 0x00, 0x80), - RGB(0x00, 0x80, 0x80), - RGB(0x80, 0x80, 0x80), - RGB(0xff, 0x00, 0x00), - RGB(0x00, 0xff, 0x00), - RGB(0x00, 0x00, 0xff), - RGB(0xff, 0xff, 0x00), - RGB(0xff, 0x00, 0xff), - RGB(0x00, 0xff, 0xff), - RGB(0xff, 0xff, 0xff) - }; - static unsigned CurrentColor = 0; - - switch(msg) - { - case WM_PAINT: - hDC = BeginPaint(hWnd, &ps); - GetClientRect(hWnd, &Client); - Brush = CreateSolidBrush(Colors[CurrentColor]); - FillRect(hDC, &Client, Brush); - DeleteObject(Brush); - CurrentColor++; - if (sizeof(Colors) / sizeof(Colors[0]) <= CurrentColor) - { - CurrentColor = 0; - } - EndPaint(hWnd, &ps); - break; - - case WM_DESTROY: - Style = GetWindowLong(hWnd, GWL_STYLE); - if (0 == (Style & WS_CHILD) && 0 == --WindowCount) - { - PostQuitMessage(0); - } - break; - - default: - return DefWindowProc(hWnd, msg, wParam, lParam); - } - - return 0; -} diff --git a/rostests/tests/multiwin/multiwin.rbuild b/rostests/tests/multiwin/multiwin.rbuild deleted file mode 100644 index c37b37f17bf..00000000000 --- a/rostests/tests/multiwin/multiwin.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - multiwin.c - diff --git a/rostests/tests/mutex/mutex.c b/rostests/tests/mutex/mutex.c deleted file mode 100644 index c6d6afddad1..00000000000 --- a/rostests/tests/mutex/mutex.c +++ /dev/null @@ -1,121 +0,0 @@ -#include -#include -#include - - -HANDLE OutputHandle; -HANDLE InputHandle; - -HANDLE hThread[2]; -DWORD dwCounter = 0; -HANDLE hMutex; - - -void dprintf(char* fmt, ...) -{ - va_list args; - char buffer[255]; - - va_start(args,fmt); - vsprintf(buffer,fmt,args); - WriteConsoleA(OutputHandle, buffer, strlen(buffer), NULL, NULL); - va_end(args); -} - - -DWORD WINAPI thread1(LPVOID crap) -{ - DWORD dwError = 0; - DWORD i; - - dprintf("Thread 1 running!\n"); - - for (i = 0; i < 10; i++) - { - dwError = WaitForSingleObject(hMutex, INFINITE); - if (dwError == WAIT_FAILED) - { - dprintf("Thread2: WaitForSingleObject failed!\n"); - return 1; - } - else if (dwError == WAIT_ABANDONED_0) - { - dprintf("Thread2: WaitForSingleObject returned WAIT_ABANDONED_0\n"); - } - - dprintf("Thread1: dwCounter : %lu -->", dwCounter); - dwCounter++; - dprintf(" %lu\n", dwCounter); - ReleaseMutex(hMutex); - } - - dprintf("Thread 1 done!\n"); - - return 1; -} - -DWORD WINAPI thread2(LPVOID crap) -{ - DWORD dwError = 0; - DWORD i; - dprintf("Thread 2 running!\n"); - - for (i = 0; i < 10; i++) - { - dwError = WaitForSingleObject(hMutex, INFINITE); - if (dwError == WAIT_FAILED) - { - dprintf("Thread2: WaitForSingleObject failed!\n"); - return 1; - } - else if (dwError == WAIT_ABANDONED_0) - { - dprintf("Thread2: WaitForSingleObject returned WAIT_ABANDONED_0\n"); - } - - dprintf("Thread2: dwCounter : %lu -->", dwCounter); - dwCounter++; - dprintf(" %lu\n", dwCounter); - ReleaseMutex(hMutex); - } - - dprintf("Thread 2 done!\n"); - - return 1; -} - - -int main(int argc, char* argv[]) -{ - DWORD dwError; - DWORD id1,id2; - - AllocConsole(); - InputHandle = GetStdHandle(STD_INPUT_HANDLE); - OutputHandle = GetStdHandle(STD_OUTPUT_HANDLE); - - dprintf("Calling CreateMutex()\n"); - hMutex = CreateMutexW(NULL, FALSE, L"TestMutex"); - if (hMutex == INVALID_HANDLE_VALUE) - { - dprintf("CreateMutex() failed! Error: %lu\n", GetLastError()); - return 0; - } - dprintf("CreateMutex() succeeded!\n"); - - hThread[0] = CreateThread(0, 0, thread1, 0, 0, &id1); - hThread[1] = CreateThread(0, 0, thread2, 0, 0, &id2); - - dprintf("Calling WaitForMultipleObject()\n"); - dwError = WaitForMultipleObjects(2, hThread, TRUE, INFINITE); - dprintf("WaitForMultipleObject() Error: %lu\n", dwError); - - CloseHandle(hThread[0]); - CloseHandle(hThread[1]); - - CloseHandle(hMutex); - - dprintf("Main thread done!\n"); - - return 0; -} diff --git a/rostests/tests/mutex/mutex.rbuild b/rostests/tests/mutex/mutex.rbuild deleted file mode 100644 index c8a8a2bd59c..00000000000 --- a/rostests/tests/mutex/mutex.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - mutex.c - diff --git a/rostests/tests/nameserverlist/nameserverlist.c b/rostests/tests/nameserverlist/nameserverlist.c deleted file mode 100644 index 2f7f9238072..00000000000 --- a/rostests/tests/nameserverlist/nameserverlist.c +++ /dev/null @@ -1,32 +0,0 @@ -#include -#include -#include -#include - -int main( int argc, char **argv ) { - ULONG OutBufLen = 0; - PFIXED_INFO pFixedInfo; - PIP_ADDR_STRING Addr; - - GetNetworkParams(NULL, &OutBufLen); - pFixedInfo = malloc(OutBufLen); - if (!pFixedInfo) { - printf( "Failed to alloc %d bytes.\n", (int)OutBufLen ); - return 1; - } - - printf( "%d Bytes allocated\n", (int)OutBufLen ); - - GetNetworkParams(pFixedInfo,&OutBufLen); - - for( Addr = &pFixedInfo->DnsServerList; - Addr; - Addr = Addr->Next ) { - printf( "%c%s\n", - Addr == pFixedInfo->CurrentDnsServer ? '*' : ' ', - Addr->IpAddress.String ); - } - - free( pFixedInfo ); - return 0; -} diff --git a/rostests/tests/nameserverlist/nameserverlist.rbuild b/rostests/tests/nameserverlist/nameserverlist.rbuild deleted file mode 100644 index bd2224c0525..00000000000 --- a/rostests/tests/nameserverlist/nameserverlist.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - iphlpapi - nameserverlist.c - diff --git a/rostests/tests/noexecute/noexecute.c b/rostests/tests/noexecute/noexecute.c deleted file mode 100644 index 8cc997795e3..00000000000 --- a/rostests/tests/noexecute/noexecute.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * $Id$ - */ - -#include -#include -#include -#include - -#include - -int test(int x) -{ - return x+1; -} - -void execute(char* message, int(*func)(int)) -{ - ULONG status = 0; - ULONG result; - - printf("%s ... ", message); - - _SEH_TRY - { - result = func(1); - } - _SEH_HANDLE - { - status = _SEH_GetExceptionCode(); - } - _SEH_END; - if (status == 0) - { - printf("OK.\n"); - } - else - { - printf("Error, status=%lx.\n", status); - } -} - -char data[100]; - -int main(void) -{ - unsigned char stack[100]; - void* heap; - ULONG protection; - - printf("NoExecute\n"); - - execute("Executing within the code segment", test); - memcpy(data, test, 100); - execute("Executing within the data segment", (int(*)(int))data); - memcpy(stack, test, 100); - execute("Executing on stack segment", (int(*)(int))stack); - heap = VirtualAlloc(NULL, 100, MEM_COMMIT, PAGE_READWRITE); - memcpy(heap, test, 100); - execute("Executing on the heap with protection PAGE_READWRITE", (int(*)(int))heap); - VirtualProtect(heap, 100, PAGE_EXECUTE, &protection); - execute("Executing on the heap with protection PAGE_EXECUTE", (int(*)(int))heap); - - return 0; -} diff --git a/rostests/tests/noexecute/noexecute.rbuild b/rostests/tests/noexecute/noexecute.rbuild deleted file mode 100644 index 9d8b50acd3c..00000000000 --- a/rostests/tests/noexecute/noexecute.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - pseh - user32 - noexecute.c - diff --git a/rostests/tests/nptest/npclient.c b/rostests/tests/nptest/npclient.c deleted file mode 100644 index 6d93f3a1acd..00000000000 --- a/rostests/tests/nptest/npclient.c +++ /dev/null @@ -1,100 +0,0 @@ -#include - -VOID MyErrExit(LPTSTR Message) -{ -// MessageBox(NULL, Message, NULL, MB_OK); - puts(Message); - ExitProcess(0); -} - -int main(int argc, char *argv[]) -{ - HANDLE hPipe; - LPVOID lpvMessage; - CHAR chBuf[512]; - BOOL fSuccess; - DWORD cbRead, cbWritten, dwMode; - LPTSTR lpszPipename = "\\\\.\\pipe\\mynamedpipe"; - -// Try to open a named pipe; wait for it, if necessary. - - while (1) - { - hPipe = CreateFile( - lpszPipename, // pipe name - GENERIC_READ | // read and write access - GENERIC_WRITE, - 0, // no sharing - NULL, // no security attributes - OPEN_EXISTING, // opens existing pipe - 0, // default attributes - NULL); // no template file - - // Break if the pipe handle is valid. - - if (hPipe != INVALID_HANDLE_VALUE) - break; - - // Exit if an error other than ERROR_PIPE_BUSY occurs. - - if (GetLastError() != ERROR_PIPE_BUSY) - MyErrExit("Could not open pipe"); - - // All pipe instances are busy, so wait for 20 seconds. - - if (! WaitNamedPipe(lpszPipename, 20000) ) - MyErrExit("Could not open pipe"); - } - -// The pipe connected; change to message-read mode. - - dwMode = PIPE_READMODE_MESSAGE; - fSuccess = SetNamedPipeHandleState( - hPipe, // pipe handle - &dwMode, // new pipe mode - NULL, // don't set maximum bytes - NULL); // don't set maximum time - if (!fSuccess) - MyErrExit("SetNamedPipeHandleState"); - -// Send a message to the pipe server. - - lpvMessage = (argc > 1) ? argv[1] : "default message"; - - fSuccess = WriteFile( - hPipe, // pipe handle - lpvMessage, // message - strlen(lpvMessage) + 1, // message length - &cbWritten, // bytes written - NULL); // not overlapped - if (! fSuccess) - MyErrExit("WriteFile"); - - do - { - // Read from the pipe. - - fSuccess = ReadFile( - hPipe, // pipe handle - chBuf, // buffer to receive reply - 512, // size of buffer - &cbRead, // number of bytes read - NULL); // not overlapped - - if (! fSuccess && GetLastError() != ERROR_MORE_DATA) - break; - - // Reply from the pipe is written to STDOUT. - - if (! WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), - chBuf, cbRead, &cbWritten, NULL)) - { - break; - } - - } while (! fSuccess); // repeat loop if ERROR_MORE_DATA - - CloseHandle(hPipe); - - return 0; -} diff --git a/rostests/tests/nptest/npserver.c b/rostests/tests/nptest/npserver.c deleted file mode 100644 index 70ed6d5a2a2..00000000000 --- a/rostests/tests/nptest/npserver.c +++ /dev/null @@ -1,120 +0,0 @@ -#include -#include -#include -#include -#include - -#define BUFSIZE 1024 -#define PIPE_TIMEOUT 1000 - -VOID InstanceThread (LPVOID); - -VOID -GetAnswerToRequest(LPTSTR lpRequest, - LPTSTR lpReply, - LPDWORD lpcbReplyBytes) -{ -} - -VOID MyErrExit(LPTSTR Message) -{ -// MessageBox(NULL, Message, NULL, MB_OK); - puts(Message); - ExitProcess(0); -} - - - - -int xx = 0; - -int main(int argc, char *argv[]) -{ - BOOL fConnected; - DWORD dwThreadId; - HANDLE hPipe, hThread; - LPTSTR lpszPipename = TEXT("\\\\.\\pipe\\mynamedpipe"); - -// for (;;) -// { - hPipe = CreateNamedPipe(lpszPipename, - PIPE_ACCESS_DUPLEX, - PIPE_TYPE_MESSAGE | - PIPE_READMODE_MESSAGE | - PIPE_WAIT, - PIPE_UNLIMITED_INSTANCES, - BUFSIZE, - BUFSIZE, - PIPE_TIMEOUT, - NULL); - if (hPipe == INVALID_HANDLE_VALUE) - { - printf("CreateNamedPipe() failed\n"); - return 0; - } - - fConnected = ConnectNamedPipe(hPipe, - NULL) ? TRUE : (GetLastError () == - ERROR_PIPE_CONNECTED); - if (fConnected) - { - printf("Pipe connected!\n"); - - DisconnectNamedPipe(hPipe); - -#if 0 - hThread = CreateThread(NULL, - 0, - (LPTHREAD_START_ROUTINE) InstanceThread, - (LPVOID) hPipe, - 0, - &dwThreadId); - if (hThread == NULL) - MyErrExit("CreateThread"); -#endif - } - else - { -// CloseHandle(hPipe); - } -// } - - CloseHandle(hPipe); - - return 0; -} - -VOID InstanceThread (LPVOID lpvParam) -{ - CHAR chRequest[BUFSIZE]; - CHAR chReply[BUFSIZE]; - DWORD cbBytesRead, cbReplyBytes, cbWritten; - BOOL fSuccess; - HANDLE hPipe; - - hPipe = (HANDLE)lpvParam; - while (1) - { - fSuccess = ReadFile(hPipe, - chRequest, - BUFSIZE, - &cbBytesRead, - NULL); - if (!fSuccess || cbBytesRead == 0) - break; - - GetAnswerToRequest(chRequest, chReply, &cbReplyBytes); - - fSuccess = WriteFile(hPipe, - chReply, - cbReplyBytes, - &cbWritten, - NULL); - if (!fSuccess || cbReplyBytes != cbWritten) - break; - } - - FlushFileBuffers(hPipe); - DisconnectNamedPipe(hPipe); - CloseHandle(hPipe); -} diff --git a/rostests/tests/nptest/nptest.rbuild b/rostests/tests/nptest/nptest.rbuild deleted file mode 100644 index ce3ebe05a42..00000000000 --- a/rostests/tests/nptest/nptest.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - nptest.c - diff --git a/rostests/tests/oskittcp/cmd_oskit.py b/rostests/tests/oskittcp/cmd_oskit.py deleted file mode 100644 index e1fac177519..00000000000 --- a/rostests/tests/oskittcp/cmd_oskit.py +++ /dev/null @@ -1,10 +0,0 @@ -from socket import * -import sys - -s = socket(AF_INET,SOCK_DGRAM,0) -s.connect(('localhost',5001)) - -while 1: - sys.stdout.write('>> ') - line = sys.stdin.readline() - s.send('CMD ' + line) \ No newline at end of file diff --git a/rostests/tests/oskittcp/oskittcp.rbuild b/rostests/tests/oskittcp/oskittcp.rbuild deleted file mode 100644 index a9c29623c38..00000000000 --- a/rostests/tests/oskittcp/oskittcp.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - tcptest.cpp - diff --git a/rostests/tests/oskittcp/tcptest.cpp b/rostests/tests/oskittcp/tcptest.cpp deleted file mode 100644 index e1985a41b6f..00000000000 --- a/rostests/tests/oskittcp/tcptest.cpp +++ /dev/null @@ -1,380 +0,0 @@ -#ifdef _MSC_VER -#pragma warning ( disable : 4786 ) -#endif//_MSC_VER - -#include -#include -#include -#include -extern "C" { - typedef unsigned short u_short; -#include -#include -#include -#ifndef _MSC_VER -#include -#endif//_MSC_VER -}; - -unsigned char hwaddr[6] = { 0x08, 0x00, 0x20, 0x0b, 0xb7, 0xbb }; - -#undef malloc -#undef free - -unsigned long TCP_IPIdentification; - -#define MAX_DG_SIZE 0x10000 -#define TI_DbgPrint(x,y) printf y - -std::list output_packets; - -typedef struct _CONNECTION_ENDPOINT { - OSK_UINT State; -} CONNECTION_ENDPOINT, *PCONNECTION_ENDPOINT; - -extern "C" int is_stack_ptr ( const void* p ) -{ - MEMORY_BASIC_INFORMATION mbi1, mbi2; - VirtualQuery ( p, &mbi1, sizeof(mbi1) ); - VirtualQuery ( _alloca(1), &mbi2, sizeof(mbi2) ); - return mbi1.AllocationBase == mbi2.AllocationBase; -} - -int TCPSocketState(void *ClientData, - void *WhichSocket, - void *WhichConnection, - OSK_UINT NewState ) { - PCONNECTION_ENDPOINT Connection = (PCONNECTION_ENDPOINT)WhichConnection; - //PLIST_ENTRY Entry; - - TI_DbgPrint(MID_TRACE,("Called: NewState %x\n", NewState)); - - if( !Connection ) { - TI_DbgPrint(MID_TRACE,("Socket closing.\n")); - return 0; - } - - if( (NewState & SEL_CONNECT) && - !(Connection->State & SEL_CONNECT) ) { - } else if( (NewState & SEL_READ) || (NewState & SEL_FIN) ) { - } - - return 0; -} - -#define STRINGIFY(x) #x - -char hdr[14] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x00 }; - -int TCPPacketSend(void *ClientData, OSK_PCHAR data, OSK_UINT len ) { - output_packets.push_back( std::string( hdr, 14 ) + - std::string( (char *)data, (int)len ) ); - return 0; -} - -struct ifaddr *TCPFindInterface( void *ClientData, - OSK_UINT AddrType, - OSK_UINT FindType, - struct sockaddr *ReqAddr ) { - static struct sockaddr_in ifa = { AF_INET }, nm = { AF_INET }; - static struct ifaddr a = { - (struct sockaddr *)&ifa, - NULL, - (struct sockaddr *)&nm, - 0, - 0, - 1, - 1500 - }; - ifa.sin_addr.s_addr = inet_addr( "10.10.2.115" ); - nm.sin_addr.s_addr = inet_addr( "255.255.255.0" ); - return &a; -} - -void *TCPMalloc( void *ClientData, - OSK_UINT Bytes, OSK_PCHAR File, OSK_UINT Line ) { - void *v = malloc( Bytes ); - fprintf( stderr, "(%s:%d) malloc( %d ) => %x\n", File, Line, Bytes, v ); - return v; -} - -void TCPFree( void *ClientData, - void *data, OSK_PCHAR File, OSK_UINT Line ) { - fprintf( stderr, "(%s:%d) free( %x )\n", File, Line, data ); - free( data ); -} - -int TCPSleep( void *ClientData, void *token, int priority, char *msg, - int tmio ) { -#if 0 - PSLEEPING_THREAD SleepingThread; - - TI_DbgPrint(MID_TRACE, - ("Called TSLEEP: tok = %x, pri = %d, wmesg = %s, tmio = %x\n", - token, priority, msg, tmio)); - - SleepingThread = ExAllocatePool( NonPagedPool, sizeof( *SleepingThread ) ); - if( SleepingThread ) { - KeInitializeEvent( &SleepingThread->Event, NotificationEvent, FALSE ); - SleepingThread->SleepToken = token; - - ExAcquireFastMutex( &SleepingThreadsLock ); - InsertTailList( &SleepingThreadsList, &SleepingThread->Entry ); - ExReleaseFastMutex( &SleepingThreadsLock ); - - TI_DbgPrint(MID_TRACE,("Waiting on %x\n", token)); - KeWaitForSingleObject( &SleepingThread->Event, - WrSuspended, - KernelMode, - TRUE, - NULL ); - - ExAcquireFastMutex( &SleepingThreadsLock ); - RemoveEntryList( &SleepingThread->Entry ); - ExReleaseFastMutex( &SleepingThreadsLock ); - - ExFreePool( SleepingThread ); - } - TI_DbgPrint(MID_TRACE,("Waiting finished: %x\n", token)); -#endif - return 0; -} - -void TCPWakeup( void *ClientData, void *token ) { -#if 0 - PLIST_ENTRY Entry; - PSLEEPING_THREAD SleepingThread; - - ExAcquireFastMutex( &SleepingThreadsLock ); - Entry = SleepingThreadsList.Flink; - while( Entry != &SleepingThreadsList ) { - SleepingThread = CONTAINING_RECORD(Entry, SLEEPING_THREAD, Entry); - TI_DbgPrint(MID_TRACE,("Sleeper @ %x\n", SleepingThread)); - if( SleepingThread->SleepToken == token ) { - TI_DbgPrint(MID_TRACE,("Setting event to wake %x\n", token)); - KeSetEvent( &SleepingThread->Event, IO_NETWORK_INCREMENT, FALSE ); - } - Entry = Entry->Flink; - } - ExReleaseFastMutex( &SleepingThreadsLock ); -#endif -} - -OSKITTCP_EVENT_HANDLERS EventHandlers = { - NULL, - TCPSocketState, - TCPPacketSend, - TCPFindInterface, - TCPMalloc, - TCPFree, - TCPSleep, - TCPWakeup -}; - -void display_row( char *data, int off, int len ) { - int i; - - printf( "%08x:", off ); - for( i = off; i < len && i < off + 16; i++ ) { - printf( " %02x", data[i] & 0xff ); - } - - printf( " -- " ); - - for( i = off; i < len && i < off + 16; i++ ) { - printf( "%c", (data[i] >= ' ') ? data[i] : '.' ); - } - - printf( "\n" ); -} - -int main( int argc, char **argv ) { - int asock = INVALID_SOCKET, selret, dgrecv, fromsize, err, port = 5001; - char datagram[MAX_DG_SIZE]; - void *conn = 0; - struct fd_set readf; - struct timeval tv; - struct sockaddr_in addr_from = { AF_INET }, addr_to = { AF_INET }; - std::list::iterator i; - WSADATA wsadata; - - WSAStartup( 0x101, &wsadata ); - - if( argc > 1 ) port = atoi(argv[1]); - - RegisterOskitTCPEventHandlers( &EventHandlers ); - InitOskitTCP(); - - asock = socket( AF_INET, SOCK_DGRAM, 0 ); - - addr_from.sin_port = htons( port ); - - if( bind( asock, (struct sockaddr *)&addr_from, sizeof( addr_from ) ) ) { - printf( "Bind error\n" ); - return 0; - } - - addr_to.sin_port = htons( port & (~1) ); - addr_to.sin_addr.s_addr = inet_addr("127.0.0.1"); - - while( true ) { - FD_ZERO( &readf ); - FD_SET( asock, &readf ); - tv.tv_sec = 0; - tv.tv_usec = 10000; - selret = select( asock + 1, &readf, NULL, NULL, &tv ); - - if( FD_ISSET( asock, &readf ) ) { - fromsize = sizeof( addr_from ); - dgrecv = recvfrom( asock, datagram, sizeof(datagram), 0, - (struct sockaddr *)&addr_from, &fromsize ); - - if( datagram[0] == 'C' && datagram[1] == 'M' && - datagram[2] == 'D' && datagram[3] == ' ' ) { - int theport, bytes, /*recvret,*/ off, bytin; - struct sockaddr_in nam; - std::string faddr, word; - std::istringstream - cmdin( std::string( datagram + 4, dgrecv - 4 ) ); - - cmdin >> word; - - if( word == "socket" ) { - cmdin >> faddr >> theport; - - nam.sin_family = AF_INET; - nam.sin_addr.s_addr = inet_addr(faddr.c_str()); - nam.sin_port = htons(theport); - - if( (err = OskitTCPSocket( NULL, &conn, AF_INET, - SOCK_STREAM, 0 )) != 0 ) { - fprintf( stderr, "OskitTCPSocket: error %d\n", err ); - } - - if( (err = OskitTCPConnect( conn, NULL, &nam, - sizeof(nam) )) != 0 ) { - fprintf( stderr, "OskitTCPConnect: error %d\n", err ); - } else { - printf( "Socket created\n" ); - } - } - - /* The rest of the commands apply only to an open socket */ - if( !conn ) continue; - - if( word == "recv" ) { - cmdin >> bytes; - - if( (err = OskitTCPRecv( conn, (OSK_PCHAR)datagram, - sizeof(datagram), - (unsigned int *)&bytin, 0 )) != 0 ) { - fprintf( stderr, "OskitTCPRecv: error %d\n", err ); - } else { - for( off = 0; off < bytin; off += 16 ) { - display_row( datagram, off, bytin ); - } - printf( "\n" ); - } - } else if ( word == "type" ) { - std::string therest = &cmdin.str()[word.size()]; - char* p = &therest[0]; - p += strspn ( p, " \t" ); - char* src = p; - char* dst = p; - while ( *src ) - { - char c = *src++; - if ( c == '\r' || c == '\n' ) break; - if ( c == '\\' ) - { - c = *src++; - switch ( c ) - { - case 'b': c = '\b'; break; - case 'n': c = '\n'; break; - case 'r': c = '\r'; break; - case 't': c = '\t'; break; - case 'v': c = '\v'; break; - } - } - *dst++ = c; - } - *dst = '\0'; - if ( (err = OskitTCPSend ( conn, (OSK_PCHAR)p, strlen(p), (OSK_UINT*)&bytin, 0 )) - != 0 ) { - fprintf ( stderr, "OskitTCPConnect: error %d\n", err ); - } else { - printf ( "wrote %d bytes\n", bytin ); - } - } else if( word == "send" ) { - off = 0; - while( cmdin >> word ) { - datagram[off++] = - atoi( (std::string("0x") + word).c_str() ); - } - - if( (err = OskitTCPSend( conn, (OSK_PCHAR)datagram, - off, (OSK_UINT *)&bytin, 0 )) - != 0 ) { - fprintf( stderr, "OskitTCPConnect: error %d\n", err ); - } else { - printf( "wrote %d bytes\n", bytin ); - } - } else if( word == "close" ) { - OskitTCPClose( conn ); - conn = NULL; - } - } else if( dgrecv > 14 ) { - addr_to = addr_from; - - if( datagram[12] == 8 && datagram[13] == 6 ) { - /* Answer arp query */ - char laddr[4]; - /* Mark patch as to the previous sender */ - memcpy( datagram + 32, datagram + 6, 6 ); - memcpy( datagram, datagram + 6, 6 ); - /* Mark packet as from us */ - memcpy( datagram + 22, hwaddr, 6 ); - memcpy( datagram + 6, hwaddr, 6 ); - /* Swap inet addresses */ - memcpy( laddr, datagram + 28, 4 ); - memcpy( datagram + 28, datagram + 38, 4 ); - memcpy( datagram + 38, laddr, 4 ); - /* Set reply opcode */ - datagram[21] = 2; - - err = sendto( asock, datagram, dgrecv, 0, - (struct sockaddr *)&addr_to, - sizeof(addr_to) ); - - if( err != 0 ) - printf( "sendto: %d\n", err ); - } else { - memcpy( hdr, datagram + 6, 6 ); - memcpy( hdr + 6, datagram, 6 ); - memcpy( hdr + 12, datagram + 12, 2 ); - OskitTCPReceiveDatagram - ( (unsigned char *)datagram + 14, - dgrecv - 14, 20 ); - } - } - } - - TimerOskitTCP(); - - for( i = output_packets.begin(); i != output_packets.end(); i++ ) { - err = sendto( asock, i->c_str(), i->size(), 0, - (struct sockaddr *)&addr_to, sizeof(addr_to) ); - - fprintf( stderr, "** SENDING PACKET %d bytes **\n", i->size() ); - - if( err != 0 ) - printf( "sendto: %d\n", err ); - } - - output_packets.clear(); - } -} - diff --git a/rostests/tests/oskittcp/tcptest.dsp b/rostests/tests/oskittcp/tcptest.dsp deleted file mode 100644 index fd5f9039a4e..00000000000 --- a/rostests/tests/oskittcp/tcptest.dsp +++ /dev/null @@ -1,434 +0,0 @@ -# Microsoft Developer Studio Project File - Name="tcptest" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tcptest - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tcptest.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tcptest.mak" CFG="tcptest - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tcptest - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tcptest - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tcptest - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "tcptest - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../drivers/lib/oskittcp/include" /I "../../../drivers\lib\oskittcp\include\freebsd\src\sys" /I "../../../drivers\lib\oskittcp\include\freebsd\dev\include" /I "../../../drivers\lib\oskittcp\include\freebsd\net\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "KERNEL" /D __REACTOS__=1 /D "FREEZAP" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "tcptest - Win32 Release" -# Name "tcptest - Win32 Debug" -# Begin Group "tcptest" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\tcptest.cpp - -!IF "$(CFG)" == "tcptest - Win32 Release" - -!ELSEIF "$(CFG)" == "tcptest - Win32 Debug" - -# SUBTRACT CPP /D "KERNEL" - -!ENDIF - -# End Source File -# End Group -# Begin Group "oskittcp" - -# PROP Default_Filter "" -# Begin Group "src" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\defaults.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\in.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\in_cksum.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\in_pcb.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\in_proto.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\in_rmx.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\inet_ntoa.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\interface.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\ip_input.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\ip_output.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\kern_clock.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\kern_subr.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\param.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\radix.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\random.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\raw_cb.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\raw_ip.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\raw_usrreq.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\route.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\rtsock.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\scanc.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\sleep.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\tcp_debug.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\tcp_input.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\tcp_output.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\tcp_subr.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\tcp_timer.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\tcp_usrreq.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\uipc_domain.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\uipc_mbuf.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\uipc_socket.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\oskittcp\uipc_socket2.c -# End Source File -# End Group -# Begin Group "include" - -# PROP Default_Filter "" -# Begin Group "freebsd" - -# PROP Default_Filter "" -# Begin Group "src No. 1" - -# PROP Default_Filter "" -# Begin Group "sys" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\buf.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\callout.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\cdefs.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\domain.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\errno.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\fcntl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\file.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\filedesc.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\filio.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\ioccom.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\ioctl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\kernel.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\libkern.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\malloc.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\mbuf.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\param.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\proc.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\protosw.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\queue.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\resource.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\resourcevar.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\rtprio.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\select.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\signal.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\signalvar.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\socket.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\socketvar.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\sockio.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\stat.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\sysctl.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\syslimits.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\syslog.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\systm.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\time.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\ttycom.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\types.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\ucred.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\uio.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\freebsd\src\sys\sys\unistd.h -# End Source File -# End Group -# End Group -# End Group -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\memtrack.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\oskitdebug.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\oskiterrno.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\oskitfreebsd.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\oskittcp.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\drivers\lib\oskittcp\include\oskittypes.h -# End Source File -# End Group -# End Group -# End Target -# End Project diff --git a/rostests/tests/oskittcp/tcptest.dsw b/rostests/tests/oskittcp/tcptest.dsw deleted file mode 100644 index a00140eb137..00000000000 --- a/rostests/tests/oskittcp/tcptest.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "tcptest"=.\tcptest.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/rostests/tests/p_dup_handle/p_dup_handle.c b/rostests/tests/p_dup_handle/p_dup_handle.c deleted file mode 100644 index 9be3fd860da..00000000000 --- a/rostests/tests/p_dup_handle/p_dup_handle.c +++ /dev/null @@ -1,69 +0,0 @@ -#include -#include -#include -#include - -/* This tests the ability of the target win32 to duplicate a process handle, - * spawn a child, and have the child dup it's own handle back into the parent - * using the duplicated handle. - */ - -int main( int argc, char **argv ) { - HANDLE h_process; - HANDLE h_process_in_parent; - - fprintf( stderr, "%lu: Starting\n", GetCurrentProcessId() ); - - if( argc == 2 ) { - h_process = (HANDLE)(ULONG_PTR)atoi(argv[1]); - } else { - if( !DuplicateHandle( GetCurrentProcess(), - GetCurrentProcess(), - GetCurrentProcess(), - &h_process, - 0, - TRUE, - DUPLICATE_SAME_ACCESS) ) { - fprintf( stderr, "%lu: Could not duplicate my own process handle.\n", - GetCurrentProcessId() ); - return 101; - } - } - - if( argc == 1 ) { - STARTUPINFO si; - PROCESS_INFORMATION pi; - char cmdline[1000]; - - memset( &si, 0, sizeof( si ) ); - memset( &pi, 0, sizeof( pi ) ); - - sprintf( cmdline, "%s %p", argv[0], h_process ); - if( !CreateProcess(NULL, cmdline, NULL, NULL, TRUE, 0, NULL, NULL, - &si, &pi ) ) { - fprintf( stderr, "%lu: Could not create child process.\n", - GetCurrentProcessId() ); - return 5; - } - - if( WaitForSingleObject( pi.hThread, INFINITE ) != WAIT_OBJECT_0 ) { - fprintf( stderr, "%lu: Failed to wait for child process to terminate.\n", - GetCurrentProcessId() ); - return 6; - } - } else { - if( !DuplicateHandle( GetCurrentProcess(), - GetCurrentProcess(), - h_process, - &h_process_in_parent, - 0, - TRUE, - DUPLICATE_SAME_ACCESS) ) { - fprintf( stderr, "%lu: Could not duplicate my handle into the parent.\n", - GetCurrentProcessId() ); - return 102; - } - } - - return 0; -} diff --git a/rostests/tests/p_dup_handle/p_dup_handle.rbuild b/rostests/tests/p_dup_handle/p_dup_handle.rbuild deleted file mode 100644 index a404bc49f5f..00000000000 --- a/rostests/tests/p_dup_handle/p_dup_handle.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - p_dup_handle.c - diff --git a/rostests/tests/polytest/polytest.cpp b/rostests/tests/polytest/polytest.cpp deleted file mode 100644 index 53567c6a6d2..00000000000 --- a/rostests/tests/polytest/polytest.cpp +++ /dev/null @@ -1,868 +0,0 @@ -// this is a little 'sandbox' application I put together that duplicates -// the 'guts' of the Polygon algorithm. It allows for quick turn-around -// in testing the algorithm to see what effect your changes have. -// -// Royce3 - -// the stuff immediately following is support so that the sandbox code -// is nearly identical to the real thing. -// search for the _tagFILL_EDGE struct to find the beginning of the -// real stuff. - -#include -#include -#include -#include -#include -#include - -#define FASTCALL -#define INT int -#define CLIPOBJ int -#define SURFOBJ int -#define PBRUSHOBJ int -#define MIX char -#define BOOL bool -#define TRUE true -#define FALSE false -#define CONST const -#define MmCopyFromCaller memmove -#define ALTERNATE 0 -#define WINDING 1 - -#define ASSERT assert - -typedef struct W -{ - int polyFillMode; -} W; - -typedef struct DC -{ - CLIPOBJ CombinedClip; - W w; -} DC, *PDC; - -typedef struct tagPOINT -{ - long x, y; -} POINT, *PPOINT, *LPPOINT; - -typedef struct RECTL -{ - long left, top, right, bottom; -} RECTL, *PRECTL; - -#define EngFreeMem free - -#define FL_ZERO_MEMORY 1 - -#define DPRINT1 printf("%i:",__LINE__);printf -inline void DPRINT(...){} - -#define SCREENX 25 -#define SCREENY 15 -char screen[SCREENY][SCREENX]; - -#define EDGE_CHAR '*' -#define FILL_CHAR 'o' - -void* EngAllocMem ( int zero, unsigned long size, int tag=0 ) -{ - void* p = malloc ( size ); - if ( zero ) - memset ( p, 0, size ); - return p; -} - -template -inline T MIN ( T a, T b ) -{ - return a < b ? a : b; -} - -template -inline T MAX ( T a, T b ) -{ - return a > b ? a : b; -} - -template -inline T abs ( T t ) -{ - return t < 0 ? -t : t; -} - -void putpixel ( int x, int y, char c ) -{ - ASSERT( x >= 0 && x < SCREENX && y >= 0 && y < SCREENY ); - if ( screen[y][x] == c ) - return; - if ( screen[y][x] == ' ' ) - screen[y][x] = c; - else - screen[y][x] = '#'; -} - -void IntEngLineTo ( - SURFOBJ*, - CLIPOBJ, - PBRUSHOBJ, - int x1, int y1, int x2, int y2, - RECTL*, - MIX mix ) -{ - int dx = x2 - x1; - int dy = y2 - y1; - int absdx = abs(dx); - int absdy = abs(dy); - int EMax = MAX(absdx,absdy); - int E = EMax/2; - int xinc = dx < 0 ? -1 : 1, - yinc = dy < 0 ? -1 : 1; - if ( !dy ) - { - while ( x1 != x2 ) - { - putpixel ( x1, y1, mix ); - x1 += xinc; - } - return; - } - if ( !dx ) - { - while ( y1 != y2 ) - { - putpixel ( x1, y1, mix ); - y1 += yinc; - } - return; - } - for ( int i = 0; i < EMax; i++ ) - { - putpixel ( x1, y1, mix ); - if ( absdy > absdx ) - { - y1 += yinc; - E += absdx; - if ( E >= EMax ) - { - E -= absdy; - x1 += xinc; - } - } - else - { - x1 += xinc; - E += absdy; - if ( E >= EMax ) - { - E -= absdx; - y1 += yinc; - } - } - } -} - -#define FILL_EDGE_ALLOC_TAG 0x45465044 - -/* -** This struct is used for book keeping during polygon filling routines. -*/ -typedef struct _tagFILL_EDGE -{ - /*Basic line information*/ - int FromX; - int FromY; - int ToX; - int ToY; - int dx; - int dy; - int absdx, absdy; - int x, y; - int xmajor; - - /*Active Edge List information*/ - int XIntercept[2]; - int Error; - int ErrorMax; - int XDirection, YDirection; - - /* The next edge in the active Edge List*/ - struct _tagFILL_EDGE * pNext; -} FILL_EDGE; - -typedef struct _FILL_EDGE_LIST -{ - int Count; - FILL_EDGE** Edges; -} FILL_EDGE_LIST; - -#if 0 -static -void -DEBUG_PRINT_ACTIVE_EDGELIST ( FILL_EDGE* list ) -{ - FILL_EDGE* pThis = list; - if (0 == list) - { - DPRINT1("List is NULL\n"); - return; - } - - while(0 != pThis) - { - //DPRINT1("EDGE: (%d, %d) to (%d, %d)\n", pThis->FromX, pThis->FromY, pThis->ToX, pThis->ToY); - DPRINT1("EDGE: [%d,%d]\n", pThis->XIntercept[0], pThis->XIntercept[1] ); - pThis = pThis->pNext; - } -} -#else -#define DEBUG_PRINT_ACTIVE_EDGELIST(x) -#endif - -/* -** Hide memory clean up. -*/ -static -void -FASTCALL -POLYGONFILL_DestroyEdgeList(FILL_EDGE_LIST* list) -{ - int i; - if ( list ) - { - if ( list->Edges ) - { - for ( i = 0; i < list->Count; i++ ) - { - if ( list->Edges[i] ) - EngFreeMem ( list->Edges[i] ); - } - EngFreeMem ( list->Edges ); - } - EngFreeMem ( list ); - } -} - -/* -** This makes and initiaizes an Edge struct for a line between two points. -*/ -static -FILL_EDGE* -FASTCALL -POLYGONFILL_MakeEdge(POINT From, POINT To) -{ - FILL_EDGE* rc = (FILL_EDGE*)EngAllocMem(FL_ZERO_MEMORY, sizeof(FILL_EDGE), FILL_EDGE_ALLOC_TAG); - - if (0 == rc) - return NULL; - - //DPRINT1("Making Edge: (%d, %d) to (%d, %d)\n", From.x, From.y, To.x, To.y); - //Now Fill the struct. - if ( To.y < From.y ) - { - rc->FromX = To.x; - rc->FromY = To.y; - rc->ToX = From.x; - rc->ToY = From.y; - rc->YDirection = -1; - - // lines that go up get walked backwards, so need to be offset - // by -1 in order to make the walk identically on a pixel-level - rc->Error = -1; - } - else - { - rc->FromX = From.x; - rc->FromY = From.y; - rc->ToX = To.x; - rc->ToY = To.y; - rc->YDirection = 1; - - rc->Error = 0; - } - - rc->x = rc->FromX; - rc->y = rc->FromY; - rc->dx = rc->ToX - rc->FromX; - rc->dy = rc->ToY - rc->FromY; - rc->absdx = abs(rc->dx); - rc->absdy = abs(rc->dy); - - rc->xmajor = rc->absdx > rc->absdy; - - rc->ErrorMax = MAX(rc->absdx,rc->absdy); - - rc->Error += rc->ErrorMax / 2; - - rc->XDirection = (rc->dx < 0)?(-1):(1); - - rc->pNext = 0; - - DPRINT("MakeEdge (%i,%i)->(%i,%i) d=(%i,%i) dir=(%i,%i) err=%i max=%i\n", - From.x, From.y, To.x, To.y, rc->dx, rc->dy, rc->XDirection, rc->YDirection, rc->Error, rc->ErrorMax ); - - return rc; -} -/* -** My Edge comparison routine. -** This is for scan converting polygon fill. -** First sort by MinY, then Minx, then slope. -** -** This comparison will help us determine which -** lines will become active first when scanning from -** top (min y) to bottom (max y). -** -** Return Value Meaning -** Negative integer element1 < element2 -** Zero element1 = element2 -** Positive integer element1 > element2 -*/ -static -INT -FASTCALL -FILL_EDGE_Compare(FILL_EDGE* Edge1, FILL_EDGE* Edge2) -{ - int e1 = Edge1->XIntercept[0] + Edge1->XIntercept[1]; - int e2 = Edge2->XIntercept[0] + Edge2->XIntercept[1]; - - return e1 - e2; -} - - -/* -** Insert an edge into a list keeping the list in order. -*/ -static -void -FASTCALL -POLYGONFILL_ActiveListInsert(FILL_EDGE** activehead, FILL_EDGE* NewEdge ) -{ - FILL_EDGE *pPrev, *pThis; - //DPRINT1("In POLYGONFILL_ActiveListInsert()\n"); - ASSERT ( activehead && NewEdge ); - if ( !*activehead ) - { - NewEdge->pNext = NULL; - *activehead = NewEdge; - return; - } - /* - ** First lets check to see if we have a new smallest value. - */ - if (FILL_EDGE_Compare(NewEdge, *activehead) <= 0) - { - NewEdge->pNext = *activehead; - *activehead = NewEdge; - return; - } - /* - ** Ok, now scan to the next spot to put this item. - */ - pThis = *activehead; - pPrev = NULL; - while ( pThis && FILL_EDGE_Compare(pThis, NewEdge) < 0 ) - { - pPrev = pThis; - pThis = pThis->pNext; - } - - ASSERT(pPrev); - NewEdge->pNext = pPrev->pNext; - pPrev->pNext = NewEdge; - //DEBUG_PRINT_ACTIVE_EDGELIST(*activehead); -} - -/* -** Create a list of edges for a list of points. -*/ -static -FILL_EDGE_LIST* -FASTCALL -POLYGONFILL_MakeEdgeList(PPOINT Points, int Count) -{ - int CurPt = 0; - FILL_EDGE_LIST* list = 0; - FILL_EDGE* e = 0; - - if ( 0 == Points || 2 > Count ) - return 0; - - list = (FILL_EDGE_LIST*)EngAllocMem(FL_ZERO_MEMORY, sizeof(FILL_EDGE_LIST), FILL_EDGE_ALLOC_TAG); - if ( 0 == list ) - goto fail; - list->Count = 0; - list->Edges = (FILL_EDGE**)EngAllocMem(FL_ZERO_MEMORY, Count*sizeof(FILL_EDGE*), FILL_EDGE_ALLOC_TAG); - if ( !list->Edges ) - goto fail; - memset ( list->Edges, 0, Count * sizeof(FILL_EDGE*) ); - - for ( CurPt = 1; CurPt < Count; ++CurPt ) - { - e = POLYGONFILL_MakeEdge ( Points[CurPt-1], Points[CurPt] ); - if ( !e ) - goto fail; - // if a straight horizontal line - who cares? - if ( !e->absdy ) - EngFreeMem ( e ); - else - list->Edges[list->Count++] = e; - } - e = POLYGONFILL_MakeEdge ( Points[CurPt-1], Points[0] ); - if ( !e ) - goto fail; - if ( !e->absdy ) - EngFreeMem ( e ); - else - list->Edges[list->Count++] = e; - return list; - -fail: - DPRINT1("Out Of MEMORY!!\n"); - POLYGONFILL_DestroyEdgeList ( list ); - return 0; -} - - -/* -** This slow routine uses the data stored in the edge list to -** calculate the x intercepts for each line in the edge list -** for scanline Scanline. -**TODO: Get rid of this floating point arithmetic -*/ -static -void -FASTCALL -POLYGONFILL_UpdateScanline(FILL_EDGE* pEdge, int Scanline) -{ - if ( 0 == pEdge->dy ) - return; - - ASSERT ( pEdge->FromY <= Scanline && pEdge->ToY > Scanline ); - - if ( pEdge->xmajor ) - { - int steps; - - ASSERT ( pEdge->y == Scanline ); - - // now shoot to end of scanline collision - steps = (pEdge->ErrorMax-pEdge->Error-1)/pEdge->absdy; - if ( steps ) - { - // record first collision with scanline - int x1 = pEdge->x; - pEdge->x += steps * pEdge->XDirection; - pEdge->Error += steps * pEdge->absdy; - ASSERT ( pEdge->Error < pEdge->ErrorMax ); - pEdge->XIntercept[0] = MIN(x1,pEdge->x); - pEdge->XIntercept[1] = MAX(x1,pEdge->x); - } - else - { - pEdge->XIntercept[0] = pEdge->x; - pEdge->XIntercept[1] = pEdge->x; - } - - // we should require exactly 1 step to step onto next scanline... - ASSERT ( (pEdge->ErrorMax-pEdge->Error-1) / pEdge->absdy == 0 ); - pEdge->x += pEdge->XDirection; - pEdge->Error += pEdge->absdy; - ASSERT ( pEdge->Error >= pEdge->ErrorMax ); - - // now step onto next scanline... - pEdge->Error -= pEdge->absdx; - pEdge->y++; - } - else // then this is a y-major line - { - pEdge->XIntercept[0] = pEdge->x; - pEdge->XIntercept[1] = pEdge->x; - - pEdge->Error += pEdge->absdx; - pEdge->y++; - - if ( pEdge->Error >= pEdge->ErrorMax ) - { - pEdge->Error -= pEdge->ErrorMax; - pEdge->x += pEdge->XDirection; - ASSERT ( pEdge->Error < pEdge->ErrorMax ); - } - } - - DPRINT("Line (%d, %d) to (%d, %d) intersects scanline %d at (%d,%d)\n", - pEdge->FromX, pEdge->FromY, pEdge->ToX, pEdge->ToY, Scanline, pEdge->XIntercept[0], pEdge->XIntercept[1] ); -} - -/* -** This method updates the Active edge collection for the scanline Scanline. -*/ -static -void -POLYGONFILL_BuildActiveList ( int Scanline, FILL_EDGE_LIST* list, FILL_EDGE** ActiveHead ) -{ - int i; - - ASSERT ( list && ActiveHead ); - *ActiveHead = 0; - for ( i = 0; i < list->Count; i++ ) - { - FILL_EDGE* pEdge = list->Edges[i]; - ASSERT(pEdge); - if ( pEdge->FromY <= Scanline && pEdge->ToY > Scanline ) - { - POLYGONFILL_UpdateScanline ( pEdge, Scanline ); - POLYGONFILL_ActiveListInsert ( ActiveHead, pEdge ); - } - } -} - -/* -** This method fills the portion of the polygon that intersects with the scanline -** Scanline. -*/ -static -void -POLYGONFILL_FillScanLineAlternate( - PDC dc, - int ScanLine, - FILL_EDGE* ActiveHead, - SURFOBJ *SurfObj, - PBRUSHOBJ BrushObj, - MIX RopMode ) -{ - FILL_EDGE *pLeft, *pRight; - - if ( !ActiveHead ) - return; - - pLeft = ActiveHead; - pRight = pLeft->pNext; - ASSERT(pRight); - - while ( NULL != pRight ) - { - int x1 = pLeft->XIntercept[0]; - int x2 = pRight->XIntercept[1]; - if ( x2 > x1 ) - { - RECTL BoundRect; - BoundRect.top = ScanLine; - BoundRect.bottom = ScanLine + 1; - BoundRect.left = x1; - BoundRect.right = x2; - - DPRINT("Fill Line (%d, %d) to (%d, %d)\n",x1, ScanLine, x2, ScanLine); - IntEngLineTo( SurfObj, - dc->CombinedClip, - BrushObj, - x1, - ScanLine, - x2, - ScanLine, - &BoundRect, // Bounding rectangle - RopMode); // MIX - } - pLeft = pRight->pNext; - pRight = pLeft ? pLeft->pNext : NULL; - } -} - -static -void -POLYGONFILL_FillScanLineWinding( - PDC dc, - int ScanLine, - FILL_EDGE* ActiveHead, - SURFOBJ *SurfObj, - PBRUSHOBJ BrushObj, - MIX RopMode ) -{ - FILL_EDGE *pLeft, *pRight; - int x1, x2, winding = 0; - RECTL BoundRect; - - if ( !ActiveHead ) - return; - - BoundRect.top = ScanLine; - BoundRect.bottom = ScanLine + 1; - - pLeft = ActiveHead; - winding = pLeft->YDirection; - pRight = pLeft->pNext; - ASSERT(pRight); - - // setup first line... - x1 = pLeft->XIntercept[0]; - x2 = pRight->XIntercept[1]; - - pLeft = pRight; - pRight = pLeft->pNext; - winding += pLeft->YDirection; - - while ( NULL != pRight ) - { - int newx1 = pLeft->XIntercept[0]; - int newx2 = pRight->XIntercept[1]; - if ( winding ) - { - // check and see if this new line touches the previous... - if ( (newx1 >= x1 && newx1 <= x2) - || (newx2 >= x1 && newx2 <= x2) - || (x1 >= newx1 && x1 <= newx2) - || (x2 >= newx2 && x2 <= newx2) - ) - { - // yup, just tack it on to our existing line - x1 = MIN(x1,newx1); - x2 = MAX(x2,newx2); - } - else - { - // nope - render the old line.. - BoundRect.left = x1; - BoundRect.right = x2; - - DPRINT("Fill Line (%d, %d) to (%d, %d)\n",x1, ScanLine, x2, ScanLine); - IntEngLineTo( SurfObj, - dc->CombinedClip, - BrushObj, - x1, - ScanLine, - x2, - ScanLine, - &BoundRect, // Bounding rectangle - RopMode); // MIX - - x1 = newx1; - x2 = newx2; - } - } - pLeft = pRight; - pRight = pLeft->pNext; - winding += pLeft->YDirection; - } - // there will always be a line left-over, render it now... - BoundRect.left = x1; - BoundRect.right = x2; - - DPRINT("Fill Line (%d, %d) to (%d, %d)\n",x1, ScanLine, x2, ScanLine); - IntEngLineTo( SurfObj, - dc->CombinedClip, - BrushObj, - x1, - ScanLine, - x2, - ScanLine, - &BoundRect, // Bounding rectangle - RopMode); // MIX -} - -//When the fill mode is ALTERNATE, GDI fills the area between odd-numbered and -//even-numbered polygon sides on each scan line. That is, GDI fills the area between the -//first and second side, between the third and fourth side, and so on. - -//WINDING Selects winding mode (fills any region with a nonzero winding value). -//When the fill mode is WINDING, GDI fills any region that has a nonzero winding value. -//This value is defined as the number of times a pen used to draw the polygon would go around the region. -//The direction of each edge of the polygon is important. - -BOOL -FillPolygon( - PDC dc, - SURFOBJ *SurfObj, - PBRUSHOBJ BrushObj, - MIX RopMode, - CONST PPOINT Points, - int Count, - RECTL BoundRect ) -{ - FILL_EDGE_LIST *list = 0; - FILL_EDGE *ActiveHead = 0; - int ScanLine; - - void - (*FillScanLine)( - PDC dc, - int ScanLine, - FILL_EDGE* ActiveHead, - SURFOBJ *SurfObj, - PBRUSHOBJ BrushObj, - MIX RopMode ); - - DPRINT("FillPolygon\n"); - - /* Create Edge List. */ - list = POLYGONFILL_MakeEdgeList(Points, Count); - /* DEBUG_PRINT_EDGELIST(list); */ - if (NULL == list) - return FALSE; - - if ( WINDING == dc->w.polyFillMode ) - FillScanLine = POLYGONFILL_FillScanLineWinding; - else /* default */ - FillScanLine = POLYGONFILL_FillScanLineAlternate; - - /* For each Scanline from BoundRect.bottom to BoundRect.top, - * determine line segments to draw - */ - for ( ScanLine = BoundRect.top; ScanLine < BoundRect.bottom; ++ScanLine ) - { - POLYGONFILL_BuildActiveList(ScanLine, list, &ActiveHead); - //DEBUG_PRINT_ACTIVE_EDGELIST(ActiveHead); - FillScanLine ( dc, ScanLine, ActiveHead, SurfObj, BrushObj, RopMode ); - } - - /* Free Edge List. If any are left. */ - POLYGONFILL_DestroyEdgeList(list); - - return TRUE; -} - - - - - -// this is highly hacked from W32kPolygon... -BOOL -Polygon ( CONST PPOINT UnsafePoints, int Count, int polyFillMode ) -{ - BOOL ret; - RECTL DestRect; - int CurrentPoint; - PPOINT Points; - SURFOBJ* SurfObj = 0; - DC dc; - PBRUSHOBJ OutBrushObj = 0; - - dc.CombinedClip = 0; - dc.w.polyFillMode = polyFillMode; - - DPRINT1("In W32kPolygon()\n"); - - if ( NULL == UnsafePoints || Count < 2) - { - DPRINT1("ERROR_INVALID_PARAMETER\n"); - return FALSE; - } - - /* Copy points from userspace to kernelspace */ - Points = (PPOINT)EngAllocMem(0, Count * sizeof(POINT)); - if (NULL == Points) - { - DPRINT1("ERROR_NOT_ENOUGH_MEMORY\n"); - return FALSE; - } - MmCopyFromCaller(Points, UnsafePoints, Count * sizeof(POINT)); - if ( memcmp ( Points, UnsafePoints, Count * sizeof(POINT) ) ) - { - free(Points); - return FALSE; - } - - DestRect.left = Points[0].x; - DestRect.right = Points[0].x; - DestRect.top = Points[0].y; - DestRect.bottom = Points[0].y; - - for (CurrentPoint = 1; CurrentPoint < Count; ++CurrentPoint) - { - DestRect.left = MIN(DestRect.left, Points[CurrentPoint].x); - DestRect.right = MAX(DestRect.right, Points[CurrentPoint].x); - DestRect.top = MIN(DestRect.top, Points[CurrentPoint].y); - DestRect.bottom = MAX(DestRect.bottom, Points[CurrentPoint].y); - } - - // Draw the Polygon Edges with the current pen - for (CurrentPoint = 0; CurrentPoint < Count; ++CurrentPoint) - { - POINT To, From; //, Next; - - /* Let CurrentPoint be i - * if i+1 > Count, Draw a line from Points[i] to Points[0] - * Draw a line from Points[i] to Points[i+1] - */ - From = Points[CurrentPoint]; - if ( CurrentPoint + 1 >= Count) - { - To = Points[0]; - } - else - { - To = Points[CurrentPoint + 1]; - } - - DPRINT1("Polygon Making line from (%ld,%ld) to (%ld,%ld)\n", From.x, From.y, To.x, To.y ); - IntEngLineTo(SurfObj, - dc.CombinedClip, - OutBrushObj, - From.x, - From.y, - To.x, - To.y, - &DestRect, - EDGE_CHAR); /* MIX */ - } - /* determine the fill mode to fill the polygon. */ - ret = FillPolygon(&dc, SurfObj, OutBrushObj, FILL_CHAR, Points, Count, DestRect ); - free(Points); - - return ret; -} - - -int main() -{ - memset ( screen, ' ', sizeof(screen) ); - POINT pts[] = - { -#if 0 - { 0, 0 }, - { 12, 4 }, - { 4, 8 }, -#elif 0 - { 3, 0 }, - { 0, 3 }, - { 3, 6 }, -#elif 0 - { 1, 1 }, - { 3, 1 }, - { 3, 3 }, - { 1, 3 } -#elif 0 - { 0, 0 }, - { 4, 0 }, - { 4, 4 }, - { 8, 4 }, - { 8, 8 }, - { 4, 8 }, - { 4, 4 }, - { 0, 4 }, -#else - { 4, 12 }, - { 12, 0 }, - { 18, 12 }, - { 4, 4 }, - { 20, 4 } -#endif - }; - const int pts_count = sizeof(pts)/sizeof(pts[0]); - - // use ALTERNATE or WINDING for 3rd param - Polygon ( pts, pts_count, ALTERNATE ); - - // print out our "screen" - for ( int y = 0; y < SCREENY; y++ ) - { - for ( int x = 0; x < SCREENX; x++ ) - { - printf("%c", screen[y][x] ); - } - printf("\n"); - } - DPRINT1("Done!\n"); - (void)_getch(); -} -/* EOF */ diff --git a/rostests/tests/polytest/polytest.dsp b/rostests/tests/polytest/polytest.dsp deleted file mode 100644 index 8151a7c682e..00000000000 --- a/rostests/tests/polytest/polytest.dsp +++ /dev/null @@ -1,88 +0,0 @@ -# Microsoft Developer Studio Project File - Name="polytest" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=polytest - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "polytest.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "polytest.mak" CFG="polytest - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "polytest - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "polytest - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "polytest - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "polytest - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "polytest - Win32 Release" -# Name "polytest - Win32 Debug" -# Begin Source File - -SOURCE=.\polytest.cpp -# End Source File -# End Target -# End Project diff --git a/rostests/tests/polytest/polytest.dsw b/rostests/tests/polytest/polytest.dsw deleted file mode 100644 index c09be21753b..00000000000 --- a/rostests/tests/polytest/polytest.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "polytest"=".\polytest.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/rostests/tests/polytest/polytest.rbuild b/rostests/tests/polytest/polytest.rbuild deleted file mode 100644 index afe43b4e927..00000000000 --- a/rostests/tests/polytest/polytest.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - polytest.cpp - diff --git a/rostests/tests/popupmenu/popupmenu.c b/rostests/tests/popupmenu/popupmenu.c deleted file mode 100644 index 5fc41f3c061..00000000000 --- a/rostests/tests/popupmenu/popupmenu.c +++ /dev/null @@ -1,102 +0,0 @@ -#include -#include -#include -#include "resource.h" - -LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM); - -int WINAPI -WinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpszCmdLine, - int nCmdShow) -{ - WNDCLASS wc; - MSG msg; - HWND hWnd; - - wc.lpszClassName = "MenuTestClass"; - wc.lpfnWndProc = MainWndProc; - wc.style = CS_VREDRAW | CS_HREDRAW; - wc.hInstance = hInstance; - wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION); - wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW); - wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); - wc.lpszMenuName = (LPCTSTR)IDM_MAINMENU; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - if (RegisterClass(&wc) == 0) - { - fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - hWnd = CreateWindow("MenuTestClass", - "PopupMenu Test", - WS_OVERLAPPEDWINDOW | WS_VISIBLE, - 0, - 0, - CW_USEDEFAULT, - CW_USEDEFAULT, - NULL, - NULL, - hInstance, - NULL); - if (hWnd == NULL) - { - fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - while(GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - return msg.wParam; -} - -LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch(msg) - { - case WM_COMMAND: - { - switch(LOWORD(wParam)) - { - case IDM_EXIT: - PostQuitMessage(0); - break; - } - break; - } - case WM_RBUTTONUP: - { - POINT pos; - HMENU Menu; - - pos.x = LOWORD(lParam); - pos.y = HIWORD(lParam); - ClientToScreen(hWnd, &pos); - - if((Menu = GetMenu(hWnd)) && (Menu = GetSubMenu(Menu, 1))) - { - TrackPopupMenu(Menu, 0, pos.x, pos.y, 0, hWnd, NULL); - } - break; - } - case WM_DESTROY: - { - PostQuitMessage(0); - break; - } - default: - { - return DefWindowProc(hWnd, msg, wParam, lParam); - } - } - return 0; -} diff --git a/rostests/tests/popupmenu/popupmenu.rbuild b/rostests/tests/popupmenu/popupmenu.rbuild deleted file mode 100644 index bf2c82a6462..00000000000 --- a/rostests/tests/popupmenu/popupmenu.rbuild +++ /dev/null @@ -1,7 +0,0 @@ - - . - user32 - gdi32 - popupmenu.c - popupmenu.rc - diff --git a/rostests/tests/popupmenu/popupmenu.rc b/rostests/tests/popupmenu/popupmenu.rc deleted file mode 100644 index 75256967add..00000000000 --- a/rostests/tests/popupmenu/popupmenu.rc +++ /dev/null @@ -1,46 +0,0 @@ -#include -#include "resource.h" - -IDM_MAINMENU MENU LOADONCALL MOVEABLE DISCARDABLE -{ - POPUP "&File" - { - MENUITEM "&New\tCtrl+N", 1 - MENUITEM "&Open\tCtrl+O", 2 - POPUP "Open &Recent" - { - MENUITEM "&1", 11 - MENUITEM "&2", 12 - MENUITEM "&3", 13 - MENUITEM "&4", 14 - MENUITEM "&5", 15 - MENUITEM "&6", 16 - MENUITEM "&7", 17 - MENUITEM "&8", 18 - MENUITEM "&9", 19 - } - MENUITEM SEPARATOR - MENUITEM "&Save\tCtrl+S", 3 - MENUITEM "Save &as...", 4 - MENUITEM SEPARATOR - MENUITEM "E&xit\tAlt-F4", IDM_EXIT - } - POPUP "&Edit" - { - MENUITEM "&Undo\tCtrl+Z", 20 - MENUITEM "&Redo\tShift+Ctrl+Z", 21 - MENUITEM SEPARATOR - MENUITEM "&Cut\tCtrl+X", 22 - MENUITEM "&Copy\tCtrl+C", 23 - MENUITEM "&Paste\tCtrl+V", 24 - MENUITEM SEPARATOR - MENUITEM "Select &all", 25 - MENUITEM "&Delete\tDel", 26 - } - POPUP "&Help" - { - MENUITEM "&Help Topics\tF1", 30 - MENUITEM SEPARATOR - MENUITEM "&About...", 31 - } -} diff --git a/rostests/tests/popupmenu/resource.h b/rostests/tests/popupmenu/resource.h deleted file mode 100644 index b4929dbf2d2..00000000000 --- a/rostests/tests/popupmenu/resource.h +++ /dev/null @@ -1,2 +0,0 @@ -#define IDM_MAINMENU 101 -#define IDM_EXIT 199 diff --git a/rostests/tests/primitives/mk_font.cpp b/rostests/tests/primitives/mk_font.cpp deleted file mode 100644 index 650fdfe4277..00000000000 --- a/rostests/tests/primitives/mk_font.cpp +++ /dev/null @@ -1,69 +0,0 @@ - -// ------------------------------------------------------------------ -// Windows 2000 Graphics API Black Book -// Chapter 4 - Utility functions -// -// Created by Damon Chandler -// Updates can be downloaded at: -// -// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu -// if you have any questions about this code. -// ------------------------------------------------------------------ - -//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -#include -#include - -#include "mk_font.h" -//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - -namespace font { - -// creates a logical font -HFONT MakeFont( - IN HDC hDestDC, // handle to target DC - IN LPCSTR typeface_name, // font's typeface name - IN int point_size, // font's point size - IN const BYTE charset, // font's character set - IN const DWORD style // font's styles - ) -{ - // - // NOTE: On Windows 9x/Me, GetWorldTransform is not - // supported. For compatibility with these platforms you - // should initialize the XFORM::eM22 data member to 1.0. - // - XFORM xf = {0, 0, 0, 1.0, 0, 0}; - GetWorldTransform(hDestDC, &xf); - int pixels_per_inch = GetDeviceCaps(hDestDC, LOGPIXELSY); - - POINT PSize = { - 0, - -MulDiv(static_cast(xf.eM22 * point_size + 0.5), - pixels_per_inch, 72) - }; - - HFONT hResult = NULL; - if (DPtoLP(hDestDC, &PSize, 1)) - { - LOGFONT lf; - memset(&lf, 0, sizeof(LOGFONT)); - - lf.lfHeight = PSize.y; - lf.lfCharSet = charset; - lstrcpyn(reinterpret_cast(&lf.lfFaceName), - typeface_name, LF_FACESIZE); - - lf.lfWeight = (style & FS_BOLD) ? FW_BOLD : FW_DONTCARE; - lf.lfItalic = (style & FS_ITALIC) ? true : false; - lf.lfUnderline = (style & FS_UNDERLINE) ? true : false; - lf.lfStrikeOut = (style & FS_STRIKEOUT) ? true : false; - - // create the logical font - hResult = CreateFontIndirect(&lf); - } - return hResult; -} -//------------------------------------------------------------------------- - -} // namespace font diff --git a/rostests/tests/primitives/mk_font.h b/rostests/tests/primitives/mk_font.h deleted file mode 100644 index b84f8942f65..00000000000 --- a/rostests/tests/primitives/mk_font.h +++ /dev/null @@ -1,39 +0,0 @@ - -// ------------------------------------------------------------------ -// Windows 2000 Graphics API Black Book -// Chapter 4 - Utility functions -// -// Created by Damon Chandler -// Updates can be downloaded at: -// -// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu -// if you have any questions about this code. -// ------------------------------------------------------------------ - -//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -#ifndef CH4_UTILS_H -#define CH4_UTILS_H - -#include -//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - -// change namespace name appropriately to suit your needs -namespace font { - -// font options -static const ULONG FS_NONE = 0x00000000; -static const ULONG FS_BOLD = 0x00000001; -static const ULONG FS_ITALIC = 0x00000002; -static const ULONG FS_UNDERLINE = 0x00000004; -static const ULONG FS_STRIKEOUT = 0x00000008; - -// creates a logical font -HFONT MakeFont(IN HDC hDestDC, IN LPCSTR typeface_name, - IN int point_size, IN const BYTE charset = ANSI_CHARSET, - IN const DWORD style = FS_NONE); - -} - -//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -#endif // CH4_UTILS_H -//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< diff --git a/rostests/tests/primitives/primitives.cpp b/rostests/tests/primitives/primitives.cpp deleted file mode 100644 index 668ac14d87b..00000000000 --- a/rostests/tests/primitives/primitives.cpp +++ /dev/null @@ -1,351 +0,0 @@ - -// ------------------------------------------------------------------ -// Windows 2000 Graphics API Black Book -// Chapter 5 - Listing 5.1 (Output Primitives Demo) -// -// Created by Damon Chandler -// Updates can be downloaded at: -// -// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu -// if you have any questions about this code. -// ------------------------------------------------------------------ - - -//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -#include -#include - -// for the MakeFont() function... -#include "mk_font.h" -//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - - -HINSTANCE hInst; -const char* WndClassName = "GMainWnd"; -LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam, - LPARAM LParam); - - -int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR, - int nCmdShow) -{ - hInst = hInstance; - - WNDCLASS wc; - memset(&wc, 0, sizeof(WNDCLASS)); - - wc.style = CS_VREDRAW | CS_HREDRAW; - wc.lpszClassName = WndClassName; - wc.lpfnWndProc = MainWndProc; - wc.hInstance = hInst; - wc.hCursor = LoadCursor(NULL, IDC_ARROW); - wc.hbrBackground = reinterpret_cast( - COLOR_BTNFACE + 1 - ); - - if (RegisterClass(&wc)) - { - HWND hWnd = - CreateWindow( - WndClassName, TEXT("Output Primitives Demo"), - WS_OVERLAPPEDWINDOW | WS_CAPTION | - WS_VISIBLE | WS_CLIPCHILDREN, - CW_USEDEFAULT, CW_USEDEFAULT, 640, 480, - NULL, NULL, hInst, NULL - ); - - if (hWnd) - { - ShowWindow(hWnd, nCmdShow); - UpdateWindow(hWnd); - - MSG msg; - while (GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } - } - return 0; -} -//------------------------------------------------------------------ - - -enum OutPrimitive { - opLine, opBezier, opRectangle, opRoundRect, - opEllipse, opArc, opPie, opChord, opCustom - }; - -void DrawPrimitive(IN HDC hDC, IN const RECT& RPrimitive, - IN OutPrimitive PrimitiveID) -{ - RECT R = RPrimitive; - InflateRect(&R, -10, -10); - - switch (PrimitiveID) - { - case opLine: - { - const POINT PLine[] = {{R.left, R.top}, {R.right, R.bottom}}; - Polyline(hDC, PLine, 2); - break; - } - case opBezier: - { - const POINT PControlPoints[] = { - {R.left, R.top}, - {(R.right - R.left) / 2, R.top}, - {(R.right - R.left) / 2, R.bottom}, - {R.right, R.bottom} - }; - PolyBezier(hDC, PControlPoints, 4); - break; - } - case opRectangle: - { - Rectangle(hDC, R.left, R.top, R.right, R.bottom); - break; - } - case opRoundRect: - { - RoundRect(hDC, R.left, R.top, R.right, R.bottom, 20, 20); - break; - } - case opEllipse: - { - Ellipse(hDC, R.left, R.top, R.right, R.bottom); - break; - } - case opArc: - { - const POINT PRads[] = { - {(R.right - R.left) / 3 + R.left, R.top}, - {(R.right - R.left) / 3 + R.left, R.bottom} - }; - Arc(hDC, R.left, R.top, R.right, R.bottom, - PRads[0].x, PRads[0].y, PRads[1].x, PRads[1].y); - break; - } - case opPie: - { - const POINT PRads[] = { - {(R.right - R.left) / 3 + R.left, R.top}, - {(R.right - R.left) / 3 + R.left, R.bottom} - }; - Pie(hDC, R.left, R.top, R.right, R.bottom, - PRads[0].x, PRads[0].y, PRads[1].x, PRads[1].y); - break; - } - case opChord: - { - const POINT PRads[] = { - {(R.right - R.left) / 3 + R.left, R.top}, - {(R.right - R.left) / 3 + R.left, R.bottom} - }; - Chord(hDC, R.left, R.top, R.right, R.bottom, - PRads[0].x, PRads[0].y, PRads[1].x, PRads[1].y); - break; - } - case opCustom: - { - const POINT PVertices[] = { - {R.left, (R.bottom - R.top) / 2 + R.top}, - {(R.right - R.left) / 2 + R.left, R.top}, - {R.right, (R.bottom - R.top) / 2 + R.top}, - {(R.right - R.left) / 2 + R.left, R.bottom} - }; - Polygon(hDC, PVertices, 4); - break; - } - } -} -//------------------------------------------------------------------ - - -HWND hListBox = NULL; // handle to the list box -HBRUSH hListBrush = NULL; // handle to the list box brush -HPEN hListPen = NULL; // handle to the list box pen -HFONT hListFont = NULL; // handle to the list box font - -LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, - LPARAM lParam) -{ - switch (msg) - { - case WM_CREATE: - { - hListBox = - CreateWindowEx( - WS_EX_CLIENTEDGE, TEXT("LISTBOX"), TEXT(""), - WS_CHILD | WS_VISIBLE | WS_VSCROLL | - LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | - LBS_OWNERDRAWFIXED, - 0, 0, 640, 480, - hWnd, NULL, hInst, NULL - ); - assert(hListBox != NULL); - - SetWindowLongPtr( - hListBox, GWL_ID, reinterpret_cast(hListBox) - ); - - SNDMSG(hListBox, LB_ADDSTRING, 0, - reinterpret_cast(TEXT("Line"))); - SNDMSG(hListBox, LB_ADDSTRING, 0, - reinterpret_cast(TEXT("Bezier Curve"))); - SNDMSG(hListBox, LB_ADDSTRING, 0, - reinterpret_cast(TEXT("Rectangle"))); - SNDMSG(hListBox, LB_ADDSTRING, 0, - reinterpret_cast(TEXT("Rounded Rectangle"))); - SNDMSG(hListBox, LB_ADDSTRING, 0, - reinterpret_cast(TEXT("Ellipse"))); - SNDMSG(hListBox, LB_ADDSTRING, 0, - reinterpret_cast(TEXT("Arc"))); - SNDMSG(hListBox, LB_ADDSTRING, 0, - reinterpret_cast(TEXT("Pie Slice"))); - SNDMSG(hListBox, LB_ADDSTRING, 0, - reinterpret_cast(TEXT("Chord"))); - SNDMSG(hListBox, LB_ADDSTRING, 0, - reinterpret_cast(TEXT("Custom"))); - - hListBrush = CreateSolidBrush(PALETTERGB(64, 192, 64)); - hListPen = CreatePen(PS_SOLID, 3, PALETTERGB(0, 0, 0)); - HDC hScreenDC = GetDC(NULL); -#if 0 - try -#endif - { - // MakeFont() from Chapter 4 - hListFont = font::MakeFont( - hScreenDC, "Impact", 20, ANSI_CHARSET, - font::FS_BOLD | font::FS_UNDERLINE - ); - } -#if 0 - catch (...) -#endif - { - ReleaseDC(NULL, hScreenDC); - } - ReleaseDC(NULL, hScreenDC); - - break; - } - case WM_MEASUREITEM: - { - LPMEASUREITEMSTRUCT lpmis = - reinterpret_cast(lParam); - assert(lpmis != NULL); - - if (lpmis->CtlID == reinterpret_cast(hListBox)) - { - lpmis->itemHeight = 150; - return TRUE; - } - break; - } - case WM_DRAWITEM: - { - LPDRAWITEMSTRUCT lpdis = - reinterpret_cast(lParam); - assert(lpdis != NULL); - - if (lpdis->CtlID == reinterpret_cast(hListBox)) - { - SaveDC(lpdis->hDC); -#if 0 - try -#endif - { - SelectObject(lpdis->hDC, hListBrush); - SelectObject(lpdis->hDC, hListPen); - SelectObject(lpdis->hDC, hListFont); - - bool selected = (lpdis->itemState & ODS_SELECTED); - COLORREF clrText = GetSysColor( - selected ? COLOR_HIGHLIGHTTEXT : COLOR_WINDOWTEXT - ); - HBRUSH hListBrush = GetSysColorBrush( - selected ? COLOR_HIGHLIGHT : COLOR_WINDOW - ); - - // fill the background - FillRect(lpdis->hDC, &lpdis->rcItem, hListBrush); - - // render the output primitive - RECT RPrimitive = lpdis->rcItem; - InflateRect(&RPrimitive, -5, -5); - RPrimitive.right = static_cast( - 0.6 * lpdis->rcItem.right + 0.5 - ); - FillRect( - lpdis->hDC, &RPrimitive, - reinterpret_cast(COLOR_BTNFACE + 1) - ); - DrawPrimitive( - lpdis->hDC, RPrimitive, - static_cast(lpdis->itemID) - ); - if (selected) InvertRect(lpdis->hDC, &RPrimitive); - DrawEdge(lpdis->hDC, &RPrimitive, EDGE_SUNKEN, BF_RECT); - - // render the text - TCHAR text[13]; - if (SNDMSG(hListBox, LB_GETTEXT, lpdis->itemID, - reinterpret_cast(&text)) != LB_ERR) - { - RECT RText = RPrimitive; - RText.left = RPrimitive.right; - RText.right = lpdis->rcItem.right; - - SelectObject(lpdis->hDC, hListFont); - SetBkMode(lpdis->hDC, TRANSPARENT); - SetTextColor(lpdis->hDC, clrText); - - DrawText(lpdis->hDC, text, -1, &RText, - DT_CENTER | DT_VCENTER | DT_SINGLELINE); - } - - // indicate keyboard focus - if (lpdis->itemState & ODS_FOCUS) - { - RECT RFocus = lpdis->rcItem; - InflateRect(&RFocus, -1, -1); - DrawFocusRect(lpdis->hDC, &RFocus); - } - } -#if 0 - catch (...) -#endif - { - RestoreDC(lpdis->hDC, -1); - } - RestoreDC(lpdis->hDC, -1); - return TRUE; - } - break; - } - case WM_SIZE: - { - MoveWindow( - hListBox, 0, 0, LOWORD(lParam), HIWORD(lParam), TRUE - ); - return 0; - } - case WM_DESTROY: - { - if (hListBrush) DeleteObject(hListBrush); - if (hListPen) DeleteObject(hListPen); - if (hListFont) DeleteObject(hListFont); - - PostQuitMessage(0); - return 0; - } - } - return DefWindowProc(hWnd, msg, wParam, lParam); -} -//------------------------------------------------------------------------- - - - diff --git a/rostests/tests/primitives/primitives.rbuild b/rostests/tests/primitives/primitives.rbuild deleted file mode 100644 index 370350dd414..00000000000 --- a/rostests/tests/primitives/primitives.rbuild +++ /dev/null @@ -1,6 +0,0 @@ - - user32 - gdi32 - primitives.cpp - mk_font.cpp - diff --git a/rostests/tests/pseh2/CMakeLists.txt b/rostests/tests/pseh2/CMakeLists.txt deleted file mode 100644 index 38b627f093c..00000000000 --- a/rostests/tests/pseh2/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_executable(pseh2_test psehtest.c psehtest2.c) -target_link_libraries(pseh2_test wine ${PSEH_LIB}) -set_module_type(pseh2_test win32cui) -add_importlibs(pseh2_test msvcrt kernel32 ntdll) -add_cd_file(TARGET pseh2_test DESTINATION reactos/bin FOR all) - -if(NOT MSVC) - add_target_compile_flags(pseh2_test "-Wno-format") -endif() diff --git a/rostests/tests/pseh2/pseh2.rbuild b/rostests/tests/pseh2/pseh2.rbuild deleted file mode 100644 index 12b0afa520d..00000000000 --- a/rostests/tests/pseh2/pseh2.rbuild +++ /dev/null @@ -1,7 +0,0 @@ - - - wine - pseh - psehtest.c - psehtest2.c - diff --git a/rostests/tests/pseh2/psehtest.c b/rostests/tests/pseh2/psehtest.c deleted file mode 100644 index d8839e3c9f9..00000000000 --- a/rostests/tests/pseh2/psehtest.c +++ /dev/null @@ -1,2654 +0,0 @@ -/* - Copyright (c) 2008 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. -*/ - -#include -#include -#include -#include - -#include - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include - -extern void no_op(void); -extern int return_arg(int); - -extern int return_zero(void); -extern int return_positive(void); -extern int return_negative(void); -extern int return_one(void); -extern int return_minusone(void); - -extern int return_zero_2(void *); -extern int return_positive_2(void *); -extern int return_negative_2(void *); -extern int return_one_2(void *); -extern int return_minusone_2(void *); - -extern int return_zero_3(int); -extern int return_positive_3(int); -extern int return_negative_3(int); -extern int return_one_3(int); -extern int return_minusone_3(int); - -extern int return_zero_4(void *, int); -extern int return_positive_4(void *, int); -extern int return_negative_4(void *, int); -extern int return_one_4(void *, int); -extern int return_minusone_4(void *, int); - -extern void set_positive(int *); - -static int call_test(int (*)(void)); - -#define DEFINE_TEST(NAME_) static int NAME_(void) - -/* Empty statements *///{{{ -DEFINE_TEST(test_empty_1) -{ - _SEH2_TRY { } _SEH2_EXCEPT(0) { } _SEH2_END; - return 1; -} - -DEFINE_TEST(test_empty_2) -{ - _SEH2_TRY { } _SEH2_EXCEPT(-1) { } _SEH2_END; - return 1; -} - -DEFINE_TEST(test_empty_3) -{ - _SEH2_TRY { } _SEH2_EXCEPT(1) { } _SEH2_END; - return 1; -} - -DEFINE_TEST(test_empty_4) -{ - _SEH2_TRY { } _SEH2_FINALLY { } _SEH2_END; - return 1; -} - -DEFINE_TEST(test_empty_5) -{ - _SEH2_TRY { _SEH2_TRY { } _SEH2_EXCEPT(0) { } _SEH2_END; } _SEH2_FINALLY { } _SEH2_END; - return 1; -} - -DEFINE_TEST(test_empty_6) -{ - _SEH2_TRY { _SEH2_TRY { } _SEH2_EXCEPT(-1) { } _SEH2_END; } _SEH2_FINALLY { } _SEH2_END; - return 1; -} - -DEFINE_TEST(test_empty_7) -{ - _SEH2_TRY { _SEH2_TRY { } _SEH2_EXCEPT(1) { } _SEH2_END; } _SEH2_FINALLY { } _SEH2_END; - return 1; -} - -DEFINE_TEST(test_empty_8) -{ - _SEH2_TRY { _SEH2_TRY { } _SEH2_FINALLY { } _SEH2_END; } _SEH2_FINALLY { } _SEH2_END; - return 1; -} -//}}} - -/* Static exception filters *///{{{ -DEFINE_TEST(test_execute_handler_1) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_positive(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_continue_execution_1) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_positive(); - } - _SEH2_EXCEPT(EXCEPTION_CONTINUE_EXECUTION) - { - ret = return_zero(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_continue_search_1) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_EXCEPT(EXCEPTION_CONTINUE_SEARCH) - { - ret = return_zero(); - } - _SEH2_END; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_positive(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_execute_handler_2) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_EXCEPT(12345) - { - ret = return_positive(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_continue_execution_2) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_positive(); - } - _SEH2_EXCEPT(-12345) - { - ret = return_zero(); - } - _SEH2_END; - - return ret == return_positive(); -} -//}}} - -/* Dynamic exception filters *///{{{ -DEFINE_TEST(test_execute_handler_3) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_EXCEPT(return_one()) - { - ret = return_positive(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_continue_execution_3) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_positive(); - } - _SEH2_EXCEPT(return_minusone()) - { - ret = return_zero(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_continue_search_2) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_EXCEPT(return_zero()) - { - ret = return_zero(); - } - _SEH2_END; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_positive(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_execute_handler_4) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_EXCEPT(return_positive()) - { - ret = return_positive(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_continue_execution_4) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_positive(); - } - _SEH2_EXCEPT(return_negative()) - { - ret = return_zero(); - } - _SEH2_END; - - return ret == return_positive(); -} -//}}} - -/* Dynamic exception filters, using _SEH2_GetExceptionInformation() *///{{{ -DEFINE_TEST(test_execute_handler_5) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_EXCEPT(return_one_2(_SEH2_GetExceptionInformation())) - { - ret = return_positive(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_continue_execution_5) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_positive(); - } - _SEH2_EXCEPT(return_minusone_2(_SEH2_GetExceptionInformation())) - { - ret = return_zero(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_continue_search_3) -{ - static int ret; - - ret = return_positive(); - - _SEH2_TRY - { - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_EXCEPT(return_zero_2(_SEH2_GetExceptionInformation())) - { - ret = return_zero(); - } - _SEH2_END; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_arg(ret); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_execute_handler_6) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_EXCEPT(return_positive_2(_SEH2_GetExceptionInformation())) - { - ret = return_positive(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_continue_execution_6) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_positive(); - } - _SEH2_EXCEPT(return_negative_2(_SEH2_GetExceptionInformation())) - { - ret = return_zero(); - } - _SEH2_END; - - return ret == return_positive(); -} -//}}} - -/* Dynamic exception filters, using _SEH2_GetExceptionCode() *///{{{ -DEFINE_TEST(test_execute_handler_7) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_EXCEPT(return_one_3(_SEH2_GetExceptionCode())) - { - ret = return_positive(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_continue_execution_7) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_positive(); - } - _SEH2_EXCEPT(return_minusone_3(_SEH2_GetExceptionCode())) - { - ret = return_zero(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_continue_search_4) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_EXCEPT(return_zero_3(_SEH2_GetExceptionCode())) - { - ret = return_zero(); - } - _SEH2_END; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_positive(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_execute_handler_8) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_EXCEPT(return_positive_3(_SEH2_GetExceptionCode())) - { - ret = return_positive(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_continue_execution_8) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_positive(); - } - _SEH2_EXCEPT(return_negative_3(_SEH2_GetExceptionCode())) - { - ret = return_zero(); - } - _SEH2_END; - - return ret == return_positive(); -} -//}}} - -/* Dynamic exception filters, using _SEH2_GetExceptionInformation() and _SEH2_GetExceptionCode() *///{{{ -DEFINE_TEST(test_execute_handler_9) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_EXCEPT(return_one_4(_SEH2_GetExceptionInformation(), _SEH2_GetExceptionCode())) - { - ret = return_positive(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_continue_execution_9) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_positive(); - } - _SEH2_EXCEPT(return_minusone_4(_SEH2_GetExceptionInformation(), _SEH2_GetExceptionCode())) - { - ret = return_zero(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_continue_search_5) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_EXCEPT(return_zero_4(_SEH2_GetExceptionInformation(), _SEH2_GetExceptionCode())) - { - ret = return_zero(); - } - _SEH2_END; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_positive(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_execute_handler_10) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_EXCEPT(return_positive_4(_SEH2_GetExceptionInformation(), _SEH2_GetExceptionCode())) - { - ret = return_positive(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_continue_execution_10) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_positive(); - } - _SEH2_EXCEPT(return_negative_4(_SEH2_GetExceptionInformation(), _SEH2_GetExceptionCode())) - { - ret = return_zero(); - } - _SEH2_END; - - return ret == return_positive(); -} -//}}} - -/* Constant exception filters with side effects *///{{{ -DEFINE_TEST(test_execute_handler_11) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_EXCEPT(set_positive(&ret), EXCEPTION_EXECUTE_HANDLER) - { - ret = ret ? return_positive() : return_zero(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_continue_execution_11) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = ret ? return_positive() : return_zero(); - } - _SEH2_EXCEPT(set_positive(&ret), EXCEPTION_CONTINUE_EXECUTION) - { - ret = return_zero(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_continue_search_6) -{ - static int ret; - static int ret2; - - ret = return_zero(); - ret2 = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - ret2 = return_zero(); - } - _SEH2_EXCEPT(set_positive(&ret), EXCEPTION_CONTINUE_SEARCH) - { - ret = return_zero(); - ret2 = return_zero(); - } - _SEH2_END; - } - _SEH2_EXCEPT(set_positive(&ret2), EXCEPTION_EXECUTE_HANDLER) - { - ret = return_arg(ret); - ret2 = return_arg(ret2); - } - _SEH2_END; - - return ret == return_positive() && ret2 == return_positive(); -} - -DEFINE_TEST(test_execute_handler_12) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_EXCEPT(set_positive(&ret), 12345) - { - ret = return_arg(ret); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_continue_execution_12) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_arg(ret); - } - _SEH2_EXCEPT(set_positive(&ret), -12345) - { - ret = return_zero(); - } - _SEH2_END; - - return ret == return_positive(); -} -//}}} - -/* _SEH2_LEAVE *///{{{ -DEFINE_TEST(test_leave_1) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - ret = return_positive(); - _SEH2_LEAVE; - ret = return_zero(); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_zero(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_leave_2) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - ret = return_positive(); - _SEH2_LEAVE; - - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_zero(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_leave_3) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - ret = return_positive(); - - if(return_one()) - _SEH2_LEAVE; - - ret = return_zero(); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_zero(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_leave_4) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - int i; - int n = return_one() + return_one(); - - for(i = return_zero(); i < n; ++ i) - { - if(i == return_one()) - { - ret = return_positive(); - _SEH2_LEAVE; - } - } - - ret = return_zero(); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_zero(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_leave_5) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - switch(return_one()) - { - case 0: ret = return_zero(); - case 1: ret = return_positive(); _SEH2_LEAVE; - case 2: ret = return_zero(); - } - - ret = return_zero(); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_zero(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_leave_6) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - _SEH2_LEAVE; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_zero(); - } - _SEH2_END; - - ret = return_positive(); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_zero(); - } - _SEH2_END; - - return ret == return_positive(); -} -//}}} - -/* _SEH2_YIELD() *///{{{ -static -int test_yield_1_helper(void) -{ - _SEH2_TRY - { - _SEH2_YIELD(return return_positive()); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - _SEH2_YIELD(return return_zero()); - } - _SEH2_END; - - return return_zero(); -} - -DEFINE_TEST(test_yield_1) -{ - return test_yield_1_helper() == return_positive(); -} - -static -int test_yield_2_helper(void) -{ - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - _SEH2_YIELD(return return_zero()); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - _SEH2_YIELD(return return_positive()); - } - _SEH2_END; - - return return_zero(); -} - -DEFINE_TEST(test_yield_2) -{ - return test_yield_2_helper() == return_positive(); -} - -static -int test_yield_3_helper(void) -{ - _SEH2_TRY - { - _SEH2_TRY - { - _SEH2_YIELD(return return_positive()); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - _SEH2_YIELD(return return_zero()); - } - _SEH2_END; - - _SEH2_YIELD(return return_zero()); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - _SEH2_YIELD(return return_zero()); - } - _SEH2_END; - - return return_zero(); -} - -DEFINE_TEST(test_yield_3) -{ - return test_yield_3_helper() == return_positive(); -} - -static -int test_yield_4_helper(void) -{ - _SEH2_TRY - { - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - _SEH2_YIELD(return return_zero()); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - _SEH2_YIELD(return return_positive()); - } - _SEH2_END; - - _SEH2_YIELD(return return_zero()); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - _SEH2_YIELD(return return_zero()); - } - _SEH2_END; - - return return_zero(); -} - -DEFINE_TEST(test_yield_4) -{ - return test_yield_4_helper() == return_positive(); -} - -static int test_yield_5_ret; - -static -int test_yield_5_helper(void) -{ - test_yield_5_ret = return_zero(); - - _SEH2_TRY - { - _SEH2_YIELD(return return_positive()); - } - _SEH2_FINALLY - { - test_yield_5_ret = return_positive(); - } - _SEH2_END; - - return return_zero(); -} - -DEFINE_TEST(test_yield_5) -{ - return test_yield_5_helper() == return_positive() && test_yield_5_ret == return_positive(); -} - -int test_yield_6_ret; - -static -int test_yield_6_helper(void) -{ - test_yield_6_ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - _SEH2_YIELD(return return_positive()); - } - _SEH2_FINALLY - { - test_yield_6_ret = return_positive(); - } - _SEH2_END; - } - _SEH2_FINALLY - { - test_yield_6_ret += return_one(); - } - _SEH2_END; - - return return_zero(); -} - -DEFINE_TEST(test_yield_6) -{ - return test_yield_6_helper() == return_positive() && test_yield_6_ret == return_positive() + return_one(); -} -//}}} - -/* Termination blocks *///{{{ -DEFINE_TEST(test_finally_1) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - ret = return_arg(ret); - } - _SEH2_FINALLY - { - ret = return_positive(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_finally_2) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - ret = return_arg(ret); - _SEH2_LEAVE; - } - _SEH2_FINALLY - { - ret = return_positive(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_finally_3) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - ret = return_arg(ret); - _SEH2_YIELD(goto leave); - } - _SEH2_FINALLY - { - ret = return_positive(); - } - _SEH2_END; - -leave: - return ret == return_positive(); -} - -static int test_finally_4_ret; - -static int test_finally_4_helper(void) -{ - test_finally_4_ret = return_zero(); - - _SEH2_TRY - { - test_finally_4_ret = return_arg(test_finally_4_ret); - _SEH2_YIELD(return return_positive()); - } - _SEH2_FINALLY - { - test_finally_4_ret = return_positive(); - } - _SEH2_END; - - return return_zero(); -} - -DEFINE_TEST(test_finally_4) -{ - return test_finally_4_helper() == return_positive() && test_finally_4_ret; -} - -DEFINE_TEST(test_finally_5) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_FINALLY - { - ret = return_positive(); - } - _SEH2_END; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_arg(ret); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_finally_6) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - ret = return_arg(ret); - } - _SEH2_FINALLY - { - if(ret == return_zero()) - ret = return_positive(); - } - _SEH2_END; - } - _SEH2_FINALLY - { - if(ret == return_positive()) - ret = return_positive() + return_one(); - } - _SEH2_END; - - return ret == return_positive() + return_one(); -} - -DEFINE_TEST(test_finally_7) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - ret = return_arg(ret); - _SEH2_LEAVE; - } - _SEH2_FINALLY - { - if(ret == return_zero()) - ret = return_positive(); - } - _SEH2_END; - } - _SEH2_FINALLY - { - if(ret == return_positive()) - ret = return_positive() + return_one(); - } - _SEH2_END; - - return ret == return_positive() + return_one(); -} - -DEFINE_TEST(test_finally_8) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - ret = return_arg(ret); - _SEH2_YIELD(goto leave); - } - _SEH2_FINALLY - { - if(ret == return_zero()) - ret = return_positive(); - } - _SEH2_END; - } - _SEH2_FINALLY - { - if(ret == return_positive()) - ret = return_positive() + return_one(); - } - _SEH2_END; - -leave: - return ret == return_positive() + return_one(); -} - -static int test_finally_9_ret; - -static int test_finally_9_helper(void) -{ - test_finally_9_ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - test_finally_9_ret = return_arg(test_finally_9_ret); - _SEH2_YIELD(return return_positive()); - } - _SEH2_FINALLY - { - if(test_finally_9_ret == return_zero()) - test_finally_9_ret = return_positive(); - } - _SEH2_END; - } - _SEH2_FINALLY - { - if(test_finally_9_ret == return_positive()) - test_finally_9_ret = return_positive() + return_one(); - } - _SEH2_END; - - return return_zero(); -} - -DEFINE_TEST(test_finally_9) -{ - return test_finally_9_helper() == return_positive() && test_finally_9_ret == return_positive() + return_one(); -} - -DEFINE_TEST(test_finally_10) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_FINALLY - { - if(ret == return_zero()) - ret = return_positive(); - } - _SEH2_END; - } - _SEH2_FINALLY - { - if(ret == return_positive()) - ret = return_positive() + return_one(); - } - _SEH2_END; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_arg(ret); - } - _SEH2_END; - - return ret == return_positive() + return_one(); -} - -DEFINE_TEST(test_finally_11) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - _SEH2_TRY - { - ret = return_arg(ret); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_zero(); - } - _SEH2_END; - } - _SEH2_FINALLY - { - ret = return_positive(); - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_END; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - if(ret == return_positive()) - ret += return_one(); - } - _SEH2_END; - - return ret == return_positive() + return_one(); -} - -DEFINE_TEST(test_finally_12) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - _SEH2_TRY - { - ret = return_arg(ret); - } - _SEH2_FINALLY - { - ret = return_positive(); - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_END; - } - _SEH2_FINALLY - { - if(ret == return_positive()) - ret += return_one(); - } - _SEH2_END; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - if(ret == return_positive() + return_one()) - ret += return_one(); - } - _SEH2_END; - - return ret == return_positive() + return_one() + return_one(); -} - -static int test_finally_13_ret; - -static -void test_finally_13_helper(void) -{ - test_finally_13_ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - test_finally_13_ret = return_positive(); - _SEH2_YIELD(return); - test_finally_13_ret = return_zero(); - } - _SEH2_FINALLY - { - if(test_finally_13_ret == return_positive()) - test_finally_13_ret += return_one(); - } - _SEH2_END; - } - _SEH2_FINALLY - { - if(test_finally_13_ret == return_positive() + return_one()) - test_finally_13_ret += return_one(); - - RaiseException(0xE00DEAD0, 0, 0, NULL); - test_finally_13_ret = return_zero(); - } - _SEH2_END; - - test_finally_13_ret = return_zero(); -} - -DEFINE_TEST(test_finally_13) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - ret = return_arg(ret); - test_finally_13_helper(); - ret = return_zero(); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_positive(); - } - _SEH2_END; - - return ret == return_positive() && test_finally_13_ret == return_positive() + return_one() + return_one(); -} - -static int test_finally_14_ret; - -static -void test_finally_14_helper(void) -{ - test_finally_14_ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - _SEH2_TRY - { - test_finally_14_ret = return_positive(); - RaiseException(0xE00DEAD0, 0, 0, NULL); - test_finally_14_ret = return_zero(); - } - _SEH2_FINALLY - { - if(test_finally_14_ret == return_positive()) - test_finally_14_ret += return_one(); - } - _SEH2_END; - } - _SEH2_FINALLY - { - if(test_finally_14_ret == return_positive() + return_one()) - test_finally_14_ret += return_one(); - - RaiseException(0xE00DEAD0, 0, 0, NULL); - test_finally_14_ret = return_zero(); - } - _SEH2_END; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - if(test_finally_14_ret == return_positive() + return_one() + return_one()) - test_finally_14_ret += return_one(); - } - _SEH2_END; - - test_finally_14_ret = return_arg(test_finally_14_ret); -} - -DEFINE_TEST(test_finally_14) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - ret = return_arg(ret); - test_finally_14_helper(); - ret = return_positive(); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_zero(); - } - _SEH2_END; - - return ret == return_positive() && test_finally_14_ret == return_positive() + return_one() + return_one() + return_one(); -} -//}}} - -/* _SEH2_GetExceptionInformation() *///{{{ -static -int verify_xpointers(struct _EXCEPTION_POINTERS * ep, DWORD code, DWORD flags, DWORD argc, const ULONG_PTR * argv, int * ret, int filter) -{ - *ret = - ep && - ep->ExceptionRecord && - ep->ContextRecord && - ep->ExceptionRecord->ExceptionCode == code && - ep->ExceptionRecord->ExceptionFlags == flags && - ep->ExceptionRecord->NumberParameters == argc && - (argv || !argc) && - memcmp(ep->ExceptionRecord->ExceptionInformation, argv, sizeof(argv[0]) * argc) == 0; - - if(*ret) - *ret = return_positive(); - - return filter; -} - -DEFINE_TEST(test_xpointers_1) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - } - _SEH2_EXCEPT(verify_xpointers(_SEH2_GetExceptionInformation(), 0xE00DEAD0, 0, 0, NULL, &ret, EXCEPTION_EXECUTE_HANDLER)) - { - ret = return_arg(ret); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_xpointers_2) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, EXCEPTION_NONCONTINUABLE, 0, NULL); - } - _SEH2_EXCEPT(verify_xpointers(_SEH2_GetExceptionInformation(), 0xE00DEAD0, EXCEPTION_NONCONTINUABLE, 0, NULL, &ret, EXCEPTION_EXECUTE_HANDLER)) - { - ret = return_arg(ret); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_xpointers_3) -{ - static int ret; - static const ULONG_PTR args[] = { 1, 2, 12345 }; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, EXCEPTION_NONCONTINUABLE, 0, args); - } - _SEH2_EXCEPT(verify_xpointers(_SEH2_GetExceptionInformation(), 0xE00DEAD0, EXCEPTION_NONCONTINUABLE, 0, args, &ret, EXCEPTION_EXECUTE_HANDLER)) - { - ret = return_arg(ret); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_xpointers_4) -{ - static int ret; - static const ULONG_PTR args[] = { 1, 2, 12345 }; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, EXCEPTION_NONCONTINUABLE, 1, args); - } - _SEH2_EXCEPT(verify_xpointers(_SEH2_GetExceptionInformation(), 0xE00DEAD0, EXCEPTION_NONCONTINUABLE, 1, args, &ret, EXCEPTION_EXECUTE_HANDLER)) - { - ret = return_arg(ret); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_xpointers_5) -{ - static int ret; - static const ULONG_PTR args[] = { 1, 2, 12345 }; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, EXCEPTION_NONCONTINUABLE, 2, args); - } - _SEH2_EXCEPT(verify_xpointers(_SEH2_GetExceptionInformation(), 0xE00DEAD0, EXCEPTION_NONCONTINUABLE, 2, args, &ret, EXCEPTION_EXECUTE_HANDLER)) - { - ret = return_arg(ret); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_xpointers_6) -{ - static int ret; - static const ULONG_PTR args[] = { 1, 2, 12345 }; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, EXCEPTION_NONCONTINUABLE, 3, args); - } - _SEH2_EXCEPT(verify_xpointers(_SEH2_GetExceptionInformation(), 0xE00DEAD0, EXCEPTION_NONCONTINUABLE, 3, args, &ret, EXCEPTION_EXECUTE_HANDLER)) - { - ret = return_arg(ret); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_xpointers_7) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_arg(ret); - } - _SEH2_EXCEPT(verify_xpointers(_SEH2_GetExceptionInformation(), 0xE00DEAD0, 0, 0, NULL, &ret, EXCEPTION_CONTINUE_EXECUTION)) - { - ret = return_zero(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_xpointers_8) -{ - static int ret; - static const ULONG_PTR args[] = { 1, 2, 12345 }; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, args); - ret = return_arg(ret); - } - _SEH2_EXCEPT(verify_xpointers(_SEH2_GetExceptionInformation(), 0xE00DEAD0, 0, 0, args, &ret, EXCEPTION_CONTINUE_EXECUTION)) - { - ret = return_zero(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_xpointers_9) -{ - static int ret; - static const ULONG_PTR args[] = { 1, 2, 12345 }; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 1, args); - ret = return_arg(ret); - } - _SEH2_EXCEPT(verify_xpointers(_SEH2_GetExceptionInformation(), 0xE00DEAD0, 0, 1, args, &ret, EXCEPTION_CONTINUE_EXECUTION)) - { - ret = return_zero(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_xpointers_10) -{ - static int ret; - static const ULONG_PTR args[] = { 1, 2, 12345 }; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 2, args); - ret = return_arg(ret); - } - _SEH2_EXCEPT(verify_xpointers(_SEH2_GetExceptionInformation(), 0xE00DEAD0, 0, 2, args, &ret, EXCEPTION_CONTINUE_EXECUTION)) - { - ret = return_zero(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_xpointers_11) -{ - static int ret; - static const ULONG_PTR args[] = { 1, 2, 12345 }; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 3, args); - ret = return_arg(ret); - } - _SEH2_EXCEPT(verify_xpointers(_SEH2_GetExceptionInformation(), 0xE00DEAD0, 0, 3, args, &ret, EXCEPTION_CONTINUE_EXECUTION)) - { - ret = return_zero(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_xpointers_12) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - RaiseException(0xE00DEAD0, EXCEPTION_NONCONTINUABLE, 0, NULL); - } - _SEH2_EXCEPT(verify_xpointers(_SEH2_GetExceptionInformation(), 0xE00DEAD0, EXCEPTION_NONCONTINUABLE, 0, NULL, &ret, EXCEPTION_CONTINUE_SEARCH)) - { - ret = return_zero(); - } - _SEH2_END; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_arg(ret); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_xpointers_13) -{ - static int ret; - static const ULONG_PTR args[] = { 1, 2, 12345 }; - - ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - RaiseException(0xE00DEAD0, EXCEPTION_NONCONTINUABLE, 0, args); - } - _SEH2_EXCEPT(verify_xpointers(_SEH2_GetExceptionInformation(), 0xE00DEAD0, EXCEPTION_NONCONTINUABLE, 0, args, &ret, EXCEPTION_CONTINUE_SEARCH)) - { - ret = return_zero(); - } - _SEH2_END; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_arg(ret); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_xpointers_14) -{ - static int ret; - static const ULONG_PTR args[] = { 1, 2, 12345 }; - - ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - RaiseException(0xE00DEAD0, EXCEPTION_NONCONTINUABLE, 1, args); - } - _SEH2_EXCEPT(verify_xpointers(_SEH2_GetExceptionInformation(), 0xE00DEAD0, EXCEPTION_NONCONTINUABLE, 1, args, &ret, EXCEPTION_CONTINUE_SEARCH)) - { - ret = return_zero(); - } - _SEH2_END; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_arg(ret); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_xpointers_15) -{ - static int ret; - static const ULONG_PTR args[] = { 1, 2, 12345 }; - - ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - RaiseException(0xE00DEAD0, EXCEPTION_NONCONTINUABLE, 2, args); - } - _SEH2_EXCEPT(verify_xpointers(_SEH2_GetExceptionInformation(), 0xE00DEAD0, EXCEPTION_NONCONTINUABLE, 2, args, &ret, EXCEPTION_CONTINUE_SEARCH)) - { - ret = return_zero(); - } - _SEH2_END; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_arg(ret); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_xpointers_16) -{ - static int ret; - static const ULONG_PTR args[] = { 1, 2, 12345 }; - - ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - RaiseException(0xE00DEAD0, EXCEPTION_NONCONTINUABLE, 3, args); - } - _SEH2_EXCEPT(verify_xpointers(_SEH2_GetExceptionInformation(), 0xE00DEAD0, EXCEPTION_NONCONTINUABLE, 3, args, &ret, EXCEPTION_CONTINUE_SEARCH)) - { - ret = return_zero(); - } - _SEH2_END; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_arg(ret); - } - _SEH2_END; - - return ret == return_positive(); -} -//}}} - -/* _SEH2_GetExceptionCode() *///{{{ -static -int verify_xcode(int code, int xcode, int * ret, int filter) -{ - *ret = code == xcode; - - if(*ret) - *ret = return_positive(); - - return filter; -} - -DEFINE_TEST(test_xcode_1) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_EXCEPT(verify_xcode(_SEH2_GetExceptionCode(), 0xE00DEAD0, &ret, EXCEPTION_EXECUTE_HANDLER)) - { - ret = return_arg(ret); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_xcode_2) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_arg(ret); - } - _SEH2_EXCEPT(verify_xcode(_SEH2_GetExceptionCode(), 0xE00DEAD0, &ret, EXCEPTION_CONTINUE_EXECUTION)) - { - ret = return_zero(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_xcode_3) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_EXCEPT(verify_xcode(_SEH2_GetExceptionCode(), 0xE00DEAD0, &ret, EXCEPTION_CONTINUE_SEARCH)) - { - ret = return_zero(); - } - _SEH2_END; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_arg(ret); - } - _SEH2_END; - - return ret == return_positive(); -} -//}}} - -/* _SEH2_AbnormalTermination() *///{{{ -DEFINE_TEST(test_abnorm_1) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - ret = return_arg(ret); - } - _SEH2_FINALLY - { - ret = _SEH2_AbnormalTermination() ? return_zero() : return_positive(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_abnorm_2) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - _SEH2_LEAVE; - } - _SEH2_FINALLY - { - ret = _SEH2_AbnormalTermination() ? return_zero() : return_positive(); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_abnorm_3) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - _SEH2_YIELD(goto leave); - } - _SEH2_FINALLY - { - ret = _SEH2_AbnormalTermination() ? return_positive() : return_zero(); - } - _SEH2_END; - -leave: - return ret == return_positive(); -} - -DEFINE_TEST(test_abnorm_4) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_FINALLY - { - ret = _SEH2_AbnormalTermination() ? return_positive() : return_zero(); - } - _SEH2_END; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_arg(ret); - } - _SEH2_END; - - return ret == return_positive(); -} - -DEFINE_TEST(test_abnorm_5) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - ret = return_arg(ret); - } - _SEH2_FINALLY - { - ret = _SEH2_AbnormalTermination() ? return_zero() : return_positive(); - } - _SEH2_END; - } - _SEH2_FINALLY - { - ret = ret == return_positive() && !_SEH2_AbnormalTermination() ? return_positive() + return_one() : ret; - } - _SEH2_END; - - return ret == return_positive() + return_one(); -} - -DEFINE_TEST(test_abnorm_6) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - _SEH2_LEAVE; - } - _SEH2_FINALLY - { - ret = _SEH2_AbnormalTermination() ? return_zero() : return_positive(); - } - _SEH2_END; - } - _SEH2_FINALLY - { - ret = ret == return_positive() && !_SEH2_AbnormalTermination() ? return_positive() + return_one() : ret; - } - _SEH2_END; - - return ret == return_positive() + return_one(); -} - -DEFINE_TEST(test_abnorm_7) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - _SEH2_YIELD(goto leave); - } - _SEH2_FINALLY - { - ret = _SEH2_AbnormalTermination() ? return_positive() : return_zero(); - } - _SEH2_END; - } - _SEH2_FINALLY - { - ret = ret == return_positive() && _SEH2_AbnormalTermination() ? return_positive() + return_one() : ret; - } - _SEH2_END; - -leave: - return ret == return_positive() + return_one(); -} - -DEFINE_TEST(test_abnorm_8) -{ - static int ret; - - ret = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - ret = return_zero(); - } - _SEH2_FINALLY - { - ret = _SEH2_AbnormalTermination() ? return_positive() : return_zero(); - } - _SEH2_END; - } - _SEH2_FINALLY - { - ret = ret == return_positive() && _SEH2_AbnormalTermination() ? return_positive() + return_one() : ret; - } - _SEH2_END; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - ret = return_arg(ret); - } - _SEH2_END; - - return ret == return_positive() + return_one(); -} -//}}} - -/* Use of local variables from _SEH2_EXCEPT(...) and _SEH2_FINALLY { ... } *///{{{ -DEFINE_TEST(test_nested_locals_1) -{ - int var1 = return_one(); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, 0); - } - _SEH2_EXCEPT((var1 = (var1 == return_one() ? return_positive() : var1)), EXCEPTION_EXECUTE_HANDLER) - { - if(var1 == return_positive()) - var1 = return_positive() + 1; - } - _SEH2_END; - - return var1 == return_positive() + 1; -} - -DEFINE_TEST(test_nested_locals_2) -{ - int var1 = return_positive(); - - _SEH2_TRY - { - } - _SEH2_FINALLY - { - if(var1 == return_positive()) - var1 = return_positive() + 1; - } - _SEH2_END; - - return var1 == return_positive() + 1; -} - -DEFINE_TEST(test_nested_locals_3) -{ - int var1 = return_zero(); - - _SEH2_TRY - { - _SEH2_TRY - { - var1 = return_one(); - RaiseException(0xE00DEAD0, 0, 0, 0); - } - _SEH2_FINALLY - { - if(var1 == return_one()) - var1 = return_positive(); - } - _SEH2_END; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - if(var1 == return_positive()) - var1 = return_positive() + 1; - } - _SEH2_END; - - return var1 == return_positive() + 1; -} -//}}} - -/* System support *///{{{ -// TODO -//}}} - -/* CPU faults *///{{{ -// TODO -//}}} - -/* Past bugs, to detect regressions *///{{{ -/* #4004: volatile registers clobbered when catching across frames (originally misreported) *///{{{ -static -void test_bug_4004_helper_1(void) -{ - int i1, i2, i3; - - i1 = return_positive(); - i2 = return_positive(); - i3 = return_positive(); - (void)return_arg(i1 + i2 + i3); - - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, NULL); - } - _SEH2_FINALLY - { - } - _SEH2_END; -} - -static -void test_bug_4004_helper_2(void) -{ - _SEH2_TRY - { - test_bug_4004_helper_1(); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - } - _SEH2_END; -} - -DEFINE_TEST(test_bug_4004) -{ - int i1, i2, i3; - - i1 = return_positive(); - i2 = return_positive(); - i3 = return_positive(); - - test_bug_4004_helper_2(); - - return return_arg(i1) + return_arg(i2) + return_arg(i3) == return_positive() * 3; -} -//}}} - -/* #4663: *///{{{ -DEFINE_TEST(test_bug_4663) -{ - int i1, i2; - - i1 = return_positive(); - i2 = return_positive(); - - _SEH2_TRY - { - _SEH2_TRY - { - RaiseException(0xE00DEAD0, 0, 0, 0); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - if (i1 == return_positive()) - { - i1 = return_positive() + 1; - } - } - _SEH2_END; - - if (i1 == return_positive() + 1) - { - i1 = return_negative(); - RaiseException(0xE00DEAD0, 0, 0, 0); - } - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - i2 = return_negative(); - } - _SEH2_END; - - return ((i1 == return_negative()) && (i2 == return_negative())); -} -//}}} -//}}} - -static -LONG WINAPI unhandled_exception(PEXCEPTION_POINTERS ExceptionInfo) -{ - trace("unhandled exception %08lX thrown from %p\n", ExceptionInfo->ExceptionRecord->ExceptionCode, ExceptionInfo->ExceptionRecord->ExceptionAddress); - return EXCEPTION_CONTINUE_SEARCH; -} - -#if defined(_M_IX86) -struct volatile_context -{ - void * esp; - void * ebp; - void * ebx; - void * esi; - void * edi; -}; -#else -struct volatile_context -{ - int _ignore; -}; -#endif - -static -DECLSPEC_NOINLINE -int sanity_check(int ret, struct volatile_context * before, struct volatile_context * after) -{ - if(ret && memcmp(before, after, sizeof(before))) - { - trace("volatile context corrupted\n"); - return 0; - } - - return ret; -} - -static -int passthrough_handler(struct _EXCEPTION_RECORD * e, void * f, struct _CONTEXT * c, void * d) -{ - return ExceptionContinueSearch; -} - -static -DECLSPEC_NOINLINE -int call_test(int (* func)(void)) -{ - static int ret; - static struct volatile_context before, after; - static LPTOP_LEVEL_EXCEPTION_FILTER prev_unhandled_exception; - static _SEH2Registration_t * prev_frame; - _SEH2Registration_t passthrough_frame; - - prev_unhandled_exception = SetUnhandledExceptionFilter(&unhandled_exception); - -#if defined(_X86_) - prev_frame = (_SEH2Registration_t *)__readfsdword(0); - passthrough_frame.SER_Prev = prev_frame; - passthrough_frame.SER_Handler = passthrough_handler; - __writefsdword(0, (unsigned long)&passthrough_frame); -#endif - -#if defined(__GNUC__) && defined(__i386__) - __asm__ __volatile__ - ( - "mov %%esp, 0x00 + %c[before]\n" - "mov %%ebp, 0x04 + %c[before]\n" - "mov %%ebx, 0x08 + %c[before]\n" - "mov %%esi, 0x0c + %c[before]\n" - "mov %%edi, 0x10 + %c[before]\n" - "call *%[test]\n" - "mov %%esp, 0x00 + %c[after]\n" - "mov %%ebp, 0x04 + %c[after]\n" - "mov %%ebx, 0x08 + %c[after]\n" - "mov %%esi, 0x0c + %c[after]\n" - "mov %%edi, 0x10 + %c[after]\n" - "push %[after]\n" - "push %[before]\n" - "push %[ret]\n" - "call %c[sanity_check]\n" - "pop %%ecx\n" - "pop %%ecx\n" - "pop %%ecx\n" : - [ret] "=a" (ret) : - [test] "r" (func), [before] "i" (&before), [after] "i" (&after), [sanity_check] "i" (&sanity_check) : - "ebx", "ecx", "edx", "esi", "edi", "flags", "memory" - ); -#else - ret = func(); -#endif - -#if defined(_X86_) - if((_SEH2Registration_t *)__readfsdword(0) != &passthrough_frame || passthrough_frame.SER_Prev != prev_frame) - { - trace("exception registration list corrupted\n"); - ret = 0; - } - - __writefsdword(0, (unsigned long)prev_frame); -#endif - - SetUnhandledExceptionFilter(prev_unhandled_exception); - return ret; -} - -#define USE_TEST_NAME_(NAME_) # NAME_ -#define USE_TEST_NAME(NAME_) USE_TEST_NAME_(NAME_) -#define USE_TEST(NAME_) { USE_TEST_NAME(NAME_), NAME_ } - -struct subtest -{ - const char * name; - int (* func)(void); -}; - -void testsuite_syntax(void) -{ - const struct subtest testsuite[] = - { - USE_TEST(test_empty_1), - USE_TEST(test_empty_2), - USE_TEST(test_empty_3), - USE_TEST(test_empty_4), - USE_TEST(test_empty_5), - USE_TEST(test_empty_6), - USE_TEST(test_empty_7), - USE_TEST(test_empty_8), - - USE_TEST(test_execute_handler_1), - USE_TEST(test_continue_execution_1), - USE_TEST(test_continue_search_1), - USE_TEST(test_execute_handler_2), - USE_TEST(test_continue_execution_2), - - USE_TEST(test_execute_handler_3), - USE_TEST(test_continue_execution_3), - USE_TEST(test_continue_search_2), - USE_TEST(test_execute_handler_4), - USE_TEST(test_continue_execution_4), - - USE_TEST(test_execute_handler_5), - USE_TEST(test_continue_execution_5), - USE_TEST(test_continue_search_3), - USE_TEST(test_execute_handler_6), - USE_TEST(test_continue_execution_6), - - USE_TEST(test_execute_handler_7), - USE_TEST(test_continue_execution_7), - USE_TEST(test_continue_search_4), - USE_TEST(test_execute_handler_8), - USE_TEST(test_continue_execution_8), - - USE_TEST(test_execute_handler_9), - USE_TEST(test_continue_execution_9), - USE_TEST(test_continue_search_5), - USE_TEST(test_execute_handler_10), - USE_TEST(test_continue_execution_10), - - USE_TEST(test_execute_handler_11), - USE_TEST(test_continue_execution_11), - USE_TEST(test_continue_search_6), - USE_TEST(test_execute_handler_12), - USE_TEST(test_continue_execution_12), - - USE_TEST(test_leave_1), - USE_TEST(test_leave_2), - USE_TEST(test_leave_3), - USE_TEST(test_leave_4), - USE_TEST(test_leave_5), - USE_TEST(test_leave_6), - - USE_TEST(test_yield_1), - USE_TEST(test_yield_2), - USE_TEST(test_yield_3), - USE_TEST(test_yield_4), - USE_TEST(test_yield_5), - USE_TEST(test_yield_6), - - USE_TEST(test_finally_1), - USE_TEST(test_finally_2), - USE_TEST(test_finally_3), - USE_TEST(test_finally_4), - USE_TEST(test_finally_5), - USE_TEST(test_finally_6), - USE_TEST(test_finally_7), - USE_TEST(test_finally_8), - USE_TEST(test_finally_9), - USE_TEST(test_finally_10), - USE_TEST(test_finally_11), - USE_TEST(test_finally_12), - USE_TEST(test_finally_13), - USE_TEST(test_finally_14), - - USE_TEST(test_xpointers_1), - USE_TEST(test_xpointers_2), - USE_TEST(test_xpointers_3), - USE_TEST(test_xpointers_4), - USE_TEST(test_xpointers_5), - USE_TEST(test_xpointers_6), - USE_TEST(test_xpointers_7), - USE_TEST(test_xpointers_8), - USE_TEST(test_xpointers_9), - USE_TEST(test_xpointers_10), - USE_TEST(test_xpointers_11), - USE_TEST(test_xpointers_12), - USE_TEST(test_xpointers_13), - USE_TEST(test_xpointers_14), - USE_TEST(test_xpointers_15), - USE_TEST(test_xpointers_16), - - USE_TEST(test_xcode_1), - USE_TEST(test_xcode_2), - USE_TEST(test_xcode_3), - - USE_TEST(test_abnorm_1), - USE_TEST(test_abnorm_2), - USE_TEST(test_abnorm_3), - USE_TEST(test_abnorm_4), - USE_TEST(test_abnorm_5), - USE_TEST(test_abnorm_6), - USE_TEST(test_abnorm_7), - USE_TEST(test_abnorm_8), - - USE_TEST(test_nested_locals_1), - USE_TEST(test_nested_locals_2), - USE_TEST(test_nested_locals_3), - - USE_TEST(test_bug_4004), - USE_TEST(test_bug_4663), - }; - - size_t i; - - for(i = 0; i < sizeof(testsuite) / sizeof(testsuite[0]); ++ i) - ok(call_test(testsuite[i].func), "%s failed\n", testsuite[i].name); -} - -const struct test winetest_testlist[] = { - { "pseh2_syntax", testsuite_syntax }, - { 0, 0 } -}; - -/* EOF */ diff --git a/rostests/tests/pseh2/psehtest2.c b/rostests/tests/pseh2/psehtest2.c deleted file mode 100644 index dfdeb9e6d8d..00000000000 --- a/rostests/tests/pseh2/psehtest2.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - Copyright (c) 2008 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. -*/ - -extern -int return_arg(int arg) -{ - return arg; -} - -extern -void no_op(void) -{ -} - -extern -int return_zero(void) -{ - return 0; -} - -extern -int return_positive(void) -{ - return 1234; -} - -extern -int return_negative(void) -{ - return -1234; -} - -extern -int return_one(void) -{ - return 1; -} - -extern -int return_minusone(void) -{ - return -1; -} - -extern -int return_zero_2(void * p) -{ - return 0; -} - -extern -int return_positive_2(void * p) -{ - return 1234; -} - -extern -int return_negative_2(void * p) -{ - return -1234; -} - -extern -int return_one_2(void * p) -{ - return 1; -} - -extern -int return_minusone_2(void * p) -{ - return -1; -} - -extern -int return_zero_3(int n) -{ - return 0; -} - -extern -int return_positive_3(int n) -{ - return 1234; -} - -extern -int return_negative_3(int n) -{ - return -1234; -} - -extern -int return_one_3(int n) -{ - return 1; -} - -extern -int return_minusone_3(int n) -{ - return -1; -} - -extern -int return_zero_4(void * p, int n) -{ - return 0; -} - -extern -int return_positive_4(void * p, int n) -{ - return 1234; -} - -extern -int return_negative_4(void * p, int n) -{ - return -1234; -} - -extern -int return_one_4(void * p, int n) -{ - return 1; -} - -extern -int return_minusone_4(void * p, int n) -{ - return -1; -} - -extern -void set_positive(int * p) -{ - *p = 1234; -} - -/* EOF */ diff --git a/rostests/tests/pteb/pteb.c b/rostests/tests/pteb/pteb.c deleted file mode 100644 index 23cf8e48477..00000000000 --- a/rostests/tests/pteb/pteb.c +++ /dev/null @@ -1,23 +0,0 @@ -#include -#include - - -int main(int argc, char* argv[]) -{ - int x; - PTEB Teb; - - printf("TEB dumpper\n"); - __asm__("movl %%fs:0x18, %0\n\t" - : "=a" (x) - : /* no inputs */); - printf("fs[0x18] %x\n", x); - - Teb = (PTEB)x; - - printf("StackBase: 0x%08lX\n", (DWORD)Teb->Tib.StackBase); - printf("StackLimit: 0x%08lX\n", (DWORD)Teb->Tib.StackLimit); - printf("DeallocationStack: 0x%08lX\n", (DWORD)Teb->DeallocationStack); - - return(0); -} diff --git a/rostests/tests/pteb/pteb.rbuild b/rostests/tests/pteb/pteb.rbuild deleted file mode 100644 index a32e34a6f6e..00000000000 --- a/rostests/tests/pteb/pteb.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - pteb.c - diff --git a/rostests/tests/readconsole/main.c b/rostests/tests/readconsole/main.c deleted file mode 100644 index 0eb98f970d4..00000000000 --- a/rostests/tests/readconsole/main.c +++ /dev/null @@ -1,33 +0,0 @@ -#include -#include -#include - -int main() -{ - TCHAR Buffer = 0; - DWORD Count = 0; - - // - // We clear the mode, most importantly turn off ENABLE_ECHO_INPUT and ENABLE_LINE_INPUT - // This is the same mode as that is set up by getch() when trying to get a char - // - SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE),0); - - // - // We read one char from the input and then return - // - ReadConsole(GetStdHandle(STD_INPUT_HANDLE),&Buffer,1,&Count,NULL); - - // - // We print out this char as an int to show that infact a backspace does count as input - // - _tprintf(TEXT("You printed %c :: "), Buffer); - _tprintf(TEXT("With a value %d :: "), Buffer); - _tprintf(TEXT("Number of chars recieved %lu :: "), Count); - _tprintf(TEXT("Char equal to backspace %d \n"), (Buffer == TEXT('\b'))); - - // - // :) - // - return 0; -} diff --git a/rostests/tests/readconsole/readconsole.rbuild b/rostests/tests/readconsole/readconsole.rbuild deleted file mode 100644 index c854aeffc8a..00000000000 --- a/rostests/tests/readconsole/readconsole.rbuild +++ /dev/null @@ -1,3 +0,0 @@ - - main.c - diff --git a/rostests/tests/regdump/main.c b/rostests/tests/regdump/main.c deleted file mode 100644 index dd474c39743..00000000000 --- a/rostests/tests/regdump/main.c +++ /dev/null @@ -1,45 +0,0 @@ -// main.c : -// -#include -#include -#include "regdump.h" - - -HANDLE OutputHandle; -HANDLE InputHandle; - - -DWORD GetInput(char* Buffer, int buflen) -{ - DWORD Result; - - ReadConsoleA(InputHandle, Buffer, buflen, &Result, NULL); - return Result; -} - -int __cdecl main(int argc, char* argv[]) -{ - //AllocConsole(); - InputHandle = GetStdHandle(STD_INPUT_HANDLE); - OutputHandle = GetStdHandle(STD_OUTPUT_HANDLE); - //return regmain(argc, argv); - return regdump(argc, argv); -} - - -#ifndef __GNUC__ - -//__declspec(dllimport) int __stdcall DllMain(void* hinstDll, unsigned long dwReason, void* reserved); - -char* args[] = { "regdump.exe", "0", "ansi", "verbose"}; - -int __cdecl mainCRTStartup(void) -{ - - //DllMain(NULL, DLL_PROCESS_ATTACH, NULL); - - main(1, args); - return 0; -} - -#endif /*__GNUC__*/ diff --git a/rostests/tests/regdump/regcmds.c b/rostests/tests/regdump/regcmds.c deleted file mode 100644 index 13ea7a12646..00000000000 --- a/rostests/tests/regdump/regcmds.c +++ /dev/null @@ -1,224 +0,0 @@ -/* $Id$ - * - * ReactOS regedit - * - * regcmds.c - * - * Copyright (C) 2002 Robert Dickenson - * - * Original Work Copyright 2002 Andriy Palamarchuk - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers -#include -#include -#include - -#ifdef WIN32_REGDBG -#else -#include -#endif - -#include "regproc.h" - - -//////////////////////////////////////////////////////////////////////////////// -// Global Variables: -// - -static char *usage = -"Usage:\n" -" regedit filename\n" -" regedit /E filename [regpath]\n" -" regedit /D regpath\n" -"\n" -"filename - registry file name\n" -"regpath - name of the registry key\n" -"\n" -"When is called without any switches adds contents of the specified\n" -"registry file to the registry\n" -"\n" -"Switches:\n" -" /E - exports contents of the specified registry key to the specified\n" -" file. Exports the whole registry if no key is specified.\n" -" /D - deletes specified registry key\n" -" /S - silent execution, can be used with any other switch.\n" -" The only existing mode, exists for compatibility with Windows regedit.\n" -" /V - advanced mode, can be used with any other switch.\n" -" Ignored, exists for compatibility with Windows regedit.\n" -" /L - location of system.dat file. Can be used with any other switch.\n" -" Ignored. Exists for compatibility with Windows regedit.\n" -" /R - location of user.dat file. Can be used with any other switch.\n" -" Ignored. Exists for compatibility with Windows regedit.\n" -" /? - print this help. Any other switches are ignored.\n" -" /C - create registry from. Not implemented.\n" -"\n" -"The switches are case-insensitive, can be prefixed either by '-' or '/'.\n" -"This program is command-line compatible with Microsoft Windows\n" -"regedit. The difference with Windows regedit - this application has\n" -"command-line interface only.\n"; - -typedef enum { - ACTION_UNDEF, ACTION_ADD, ACTION_EXPORT, ACTION_DELETE, ACTION_VIEW -} REGEDIT_ACTION; - -/** - * Process unknown switch. - * - * Params: - * chu - the switch character in upper-case. - * s - the command line string where s points to the switch character. - */ -void error_unknown_switch(char chu, char *s) -{ - if (isalpha(chu)) { - printf("Undefined switch /%c!\n", chu); - } else { - printf("Alphabetic character is expected after '%c' " - "in switch specification\n", *(s - 1)); - } - //exit(1); -} - -BOOL PerformRegAction(REGEDIT_ACTION action, LPSTR s) -{ - TCHAR filename[MAX_PATH]; - TCHAR reg_key_name[KEY_MAX_LEN]; - - switch (action) { - case ACTION_ADD: - get_file_name(&s, filename, MAX_PATH); - if (!filename[0]) { - printf("No file name is specified\n%s", usage); - return FALSE; - //exit(1); - } - while (filename[0]) { - if (!import_registry_file(filename)) { - perror(""); - printf("Can't open file \"%s\"\n", filename); - return FALSE; - //exit(1); - } - get_file_name(&s, filename, MAX_PATH); - } - break; - case ACTION_DELETE: - get_file_name(&s, reg_key_name, KEY_MAX_LEN); - if (!reg_key_name[0]) { - printf("No registry key is specified for removal\n%s", usage); - return FALSE; - //exit(1); - } - delete_registry_key(reg_key_name); - break; - case ACTION_EXPORT: - filename[0] = '\0'; - get_file_name(&s, filename, MAX_PATH); - if (!filename[0]) { - printf("No file name is specified\n%s", usage); - return FALSE; - //exit(1); - } - if (s[0]) { - get_file_name(&s, reg_key_name, KEY_MAX_LEN); - export_registry_key(filename, reg_key_name); - } else { - export_registry_key(filename, NULL); - } - break; - default: - printf("Unhandled action!\n"); - return FALSE; - } - return TRUE; -} - -BOOL ProcessCmdLine(LPSTR lpCmdLine) -{ - REGEDIT_ACTION action = ACTION_UNDEF; - LPSTR s = lpCmdLine; /* command line pointer */ - CHAR ch = *s; /* current character */ - - while (ch && ((ch == '-') || (ch == '/'))) { - char chu; - char ch2; - - s++; - ch = *s; - ch2 = *(s+1); - chu = toupper(ch); - if (!ch2 || isspace(ch2)) { - if (chu == 'S' || chu == 'V') { - /* ignore these switches */ - } else { - switch (chu) { - case 'D': - action = ACTION_DELETE; - break; - case 'E': - action = ACTION_EXPORT; - break; - case 'V': - action = ACTION_VIEW; - break; - case '?': - printf(usage); - return FALSE; - //exit(0); - break; - default: - error_unknown_switch(chu, s); - return FALSE; - break; - } - } - s++; - } else { - if (ch2 == ':') { - switch (chu) { - case 'L': - /* fall through */ - case 'R': - s += 2; - while (*s && !isspace(*s)) { - s++; - } - break; - default: - error_unknown_switch(chu, s); - return FALSE; - break; - } - } else { - /* this is a file name, starting from '/' */ - s--; - break; - } - } - /* skip spaces to the next parameter */ - ch = *s; - while (ch && isspace(ch)) { - s++; - ch = *s; - } - } - if (action == ACTION_UNDEF) { - action = ACTION_ADD; - } - return PerformRegAction(action, s); -} diff --git a/rostests/tests/regdump/regdump.c b/rostests/tests/regdump/regdump.c deleted file mode 100644 index d13395893c3..00000000000 --- a/rostests/tests/regdump/regdump.c +++ /dev/null @@ -1,167 +0,0 @@ -/* $Id$ - * - * ReactOS regedit - * - * regdump.c - * - * Copyright (C) 2002 Robert Dickenson - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include "regdump.h" - - -#ifdef UNICODE -//#define dprintf _tprintf -#define dprintf printf -#else -#define dprintf printf -#endif - -void RegKeyPrint(int which); - - - -const char* default_cmd_line1 = "/E HKLM_EXPORT.TXT HKEY_LOCAL_MACHINE"; -const char* default_cmd_line2 = "TEST_IMPORT.TXT"; -const char* default_cmd_line3 = "/P HKEY_LOCAL_MACHINE\\SYSTEM"; -const char* default_cmd_line4 = "/P HKEY_LOCAL_MACHINE\\SOFTWARE"; -const char* default_cmd_line5 = "/P HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes"; -const char* default_cmd_line6 = "/E HKCR_EXPORT.TXT HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes"; -const char* default_cmd_line7 = "/D HKEY_LOCAL_MACHINE\\SYSTEM"; -const char* default_cmd_line8 = "/D HKEY_LOCAL_MACHINE\\SOFTWARE"; -const char* default_cmd_line9 = "/D HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes"; - -/* Show usage */ -void usage(const char* appName) -{ - fprintf(stderr, "%s: Dump registry key to console\n", appName); - fprintf(stderr, "%s HKCR | HKCU | HKLM | HKU | HKCC | HKRR\n", appName); -} - -void show_menu(void) -{ - _tprintf(_T("\nchoose test :\n")); - _tprintf(_T(" 0 = Exit\n")); - printf(" 1 = %s\n", default_cmd_line1); - printf(" 2 = %s\n", default_cmd_line2); - printf(" 3 = %s\n", default_cmd_line3); - printf(" 4 = %s\n", default_cmd_line4); - printf(" 5 = %s\n", default_cmd_line5); - printf(" 6 = %s\n", default_cmd_line6); - printf(" 7 = %s\n", default_cmd_line7); - printf(" 8 = %s\n", default_cmd_line8); - printf(" 9 = %s\n", default_cmd_line9); -/* - _tprintf(_T(" 1 = %s\n"), default_cmd_line1); - _tprintf(_T(" 2 = %s\n"), default_cmd_line2); - _tprintf(_T(" 3 = %s\n"), default_cmd_line3); - _tprintf(_T(" 4 = %s\n"), default_cmd_line4); - _tprintf(_T(" 5 = %s\n"), default_cmd_line5); - _tprintf(_T(" 6 = %s\n"), default_cmd_line6); - _tprintf(_T(" 7 = %s\n"), default_cmd_line7); - _tprintf(_T(" 8 = %s\n"), default_cmd_line8); - _tprintf(_T(" 9 = %s\n"), default_cmd_line9); - */ -// _tprintf(_T(" A = HKEY_CLASSES_ROOT\n")); -// _tprintf(_T(" B = HKEY_CURRENT_USER\n")); -// _tprintf(_T(" C = HKEY_LOCAL_MACHINE\n")); -// _tprintf(_T(" D = HKEY_USERS\n")); -// _tprintf(_T(" E = HKEY_CURRENT_CONFIG\n")); -// _tprintf(_T(" F = REGISTRY ROOT\n")); -} - -int regdump(int argc, char* argv[]) -{ - char Buffer[500]; - - if (argc > 1) { -// if (0 == _tcsstr(argv[1], _T("HKLM"))) { - if (strstr(argv[1], "help")) { - usage(argv[0]); - } else if (strstr(argv[1], "HKCR")) { - RegKeyPrint('1'); - } else if (strstr(argv[1], "HKCU")) { - RegKeyPrint('2'); - } else if (strstr(argv[1], "HKLM")) { - RegKeyPrint('3'); - } else if (strstr(argv[1], "HKU")) { - RegKeyPrint('4'); - } else if (strstr(argv[1], "HKCC")) { - RegKeyPrint('5'); - } else if (strstr(argv[1], "HKRR")) { - RegKeyPrint('6'); - } else { - dprintf("started with argc = %d, argv[1] = %s (unknown?)\n", argc, argv[1]); - } - return 0; - } - show_menu(); - while (1) { - GetInput(Buffer, sizeof(Buffer)); - switch (toupper(Buffer[0])) { - case '0': - return(0); - case '1': - strcpy(Buffer, default_cmd_line1); - goto doit; - case '2': - strcpy(Buffer, default_cmd_line2); - goto doit; - case '3': - strcpy(Buffer, default_cmd_line3); - goto doit; - case '4': - strcpy(Buffer, default_cmd_line4); - goto doit; - case '5': - strcpy(Buffer, default_cmd_line5); - goto doit; - case '6': - strcpy(Buffer, default_cmd_line6); - goto doit; - case '7': - strcpy(Buffer, default_cmd_line7); - goto doit; - case '8': - strcpy(Buffer, default_cmd_line8); - goto doit; - case '9': - strcpy(Buffer, default_cmd_line9); - goto doit; - case 'A': - case 'B': - case 'C': - case 'D': - case 'E': - case 'F': - RegKeyPrint(toupper(Buffer[0]) - 'A' + 1); - break; - default: doit: - if (!ProcessCmdLine(Buffer)) { - dprintf("invalid input.\n"); - show_menu(); - } else { - dprintf("done.\n"); - } - break; - } - } - return 0; -} diff --git a/rostests/tests/regdump/regdump.h b/rostests/tests/regdump/regdump.h deleted file mode 100644 index be2c895817c..00000000000 --- a/rostests/tests/regdump/regdump.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * ReactOS - * - * regdump.h - * - * Copyright (C) 2002 Robert Dickenson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __REGDUMP_H__ -#define __REGDUMP_H__ - -#ifdef __cplusplus -extern "C" { -#endif - - -extern HANDLE OutputHandle; -extern HANDLE InputHandle; - -DWORD GetInput(char* Buffer, int buflen); -//void dprintf(char* fmt, ...); -int regdump(int argc, char* argv[]); -BOOL ProcessCmdLine(LPSTR lpCmdLine); - - -#ifdef __cplusplus -}; -#endif - -#endif // __REGDUMP_H__ diff --git a/rostests/tests/regdump/regdump.rbuild b/rostests/tests/regdump/regdump.rbuild deleted file mode 100644 index ff7cdba8944..00000000000 --- a/rostests/tests/regdump/regdump.rbuild +++ /dev/null @@ -1,8 +0,0 @@ - - advapi32 - gdi32 - main.c - regdump.c - regcmds.c - regproc.c - diff --git a/rostests/tests/regdump/regproc.c b/rostests/tests/regdump/regproc.c deleted file mode 100644 index 56832b90031..00000000000 --- a/rostests/tests/regdump/regproc.c +++ /dev/null @@ -1,1491 +0,0 @@ -/* - * Registry processing routines. Routines, common for registry - * processing frontends. - * - * Copyright 1999 Sylvain St-Germain - * Copyright 2002 Andriy Palamarchuk - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifdef WIN32_REGDBG -#include -#include -#ifndef __GNUC__ -#include -#else -#include -#endif -#include -#include -#include -#include -//#include -#include "regdump.h" -#else - -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#endif - -#include "regproc.h" - - -#define REG_VAL_BUF_SIZE 4096 - -/* Delimiters used to parse the "value" to query queryValue*/ -#define QUERY_VALUE_MAX_ARGS 1 - -/* maximal number of characters in hexadecimal data line, - not including '\' character */ -#define REG_FILE_HEX_LINE_LEN 76 - -/* Globals used by the api setValue, queryValue */ -static LPTSTR currentKeyName = NULL; -static HKEY currentKeyClass = 0; -static HKEY currentKeyHandle = 0; -static BOOL bTheKeyIsOpen = FALSE; - -static TCHAR *reg_class_names[] = { - _T("HKEY_LOCAL_MACHINE"), - _T("HKEY_USERS"), - _T("HKEY_CLASSES_ROOT"), - _T("HKEY_CURRENT_CONFIG"), - _T("HKEY_CURRENT_USER") -}; - -#define REG_CLASS_NUMBER (sizeof(reg_class_names) / sizeof(reg_class_names[0])) - -static HKEY reg_class_keys[REG_CLASS_NUMBER] = { - HKEY_LOCAL_MACHINE, HKEY_USERS, HKEY_CLASSES_ROOT, - HKEY_CURRENT_CONFIG, HKEY_CURRENT_USER -}; - -/* return values */ -#define NOT_ENOUGH_MEMORY 1 -#define IO_ERROR 2 - -/* processing macros */ - -/* common check of memory allocation results */ -#ifdef UNICODE -#define CHECK_ENOUGH_MEMORY(p) \ - if (!(p)) \ - { \ - _tprintf(_T("file %S, line %d: Not enough memory"), __FILE__, __LINE__); \ - assert(0);\ - exit(NOT_ENOUGH_MEMORY); \ - } -#else -#define CHECK_ENOUGH_MEMORY(p) \ - if (!(p)) \ - { \ - _tprintf(_T("file %s, line %d: Not enough memory"), __FILE__, __LINE__); \ - assert(0);\ - exit(NOT_ENOUGH_MEMORY); \ - } -#endif - -#ifdef UNICODE -#define _TEOF WEOF -#else -#define _TEOF EOF -#endif - -/****************************************************************************** - * This is a replacement for strsep which is not portable (missing on Solaris). - */ -#if 0 -/* DISABLED */ -char* getToken(char** str, const char* delims) -{ - char* token; - - if (*str==NULL) { - /* No more tokens */ - return NULL; - } - - token=*str; - while (**str!='\0') { - if (strchr(delims,**str)!=NULL) { - **str='\0'; - (*str)++; - return token; - } - (*str)++; - } - /* There is no other token */ - *str=NULL; - return token; -} -#endif - -/****************************************************************************** - * Copies file name from command line string to the buffer. - * Rewinds the command line string pointer to the next non-spece character - * after the file name. - * Buffer contains an empty string if no filename was found; - * - * params: - * command_line - command line current position pointer - * where *s[0] is the first symbol of the file name. - * file_name - buffer to write the file name to. - */ -void get_file_nameA(CHAR **command_line, CHAR *file_name, int max_filename) -{ - CHAR *s = *command_line; - int pos = 0; /* position of pointer "s" in *command_line */ - file_name[0] = 0; - - if (!s[0]) { - return; - } - if (s[0] == '"') { - s++; - (*command_line)++; - while (s[0] != '"') { - if (!s[0]) { - _tprintf(_T("Unexpected end of file name!\n")); - assert(0); - //exit(1); - } - s++; - pos++; - } - } else { - while (s[0] && !isspace(s[0])) { - s++; - pos++; - } - } - memcpy(file_name, *command_line, pos * sizeof((*command_line)[0])); - /* remove the last backslash */ - if (file_name[pos - 1] == '\\') { - file_name[pos - 1] = '\0'; - } else { - file_name[pos] = '\0'; - } - if (s[0]) { - s++; - pos++; - } - while (s[0] && isspace(s[0])) { - s++; - pos++; - } - (*command_line) += pos; -} - -void get_file_nameW(CHAR** command_line, WCHAR* filename, int max_filename) -{ - CHAR filenameA[_MAX_PATH]; - int len; - - get_file_nameA(command_line, filenameA, _MAX_PATH); - len = strlen(filenameA); - OemToCharBuffW(filenameA, filename, max_filename); - filename[len] = _T('\0'); -/* - UNICODE_STRING UnicodeString; - ANSI_STRING AnsiString; - CHAR filenameA[_MAX_PATH]; - - get_file_nameA(command_line, filenameA, _MAX_PATH); - - //RtlInitAnsiString(&AnsiString, filenameA); - UnicodeString.Buffer = filename; - UnicodeString.MaximumLength = max_filename;//MAX_PATH; - RtlAnsiStringToUnicodeString(&UnicodeString, &AnsiString, FALSE); - */ -} - -/****************************************************************************** - * Converts a hex representation of a DWORD into a DWORD. - */ -DWORD convertHexToDWord(TCHAR* str, BYTE* buf) -{ - DWORD dw; - TCHAR xbuf[9]; - - memcpy(xbuf, str, 8 * sizeof(TCHAR)); - xbuf[88 * sizeof(TCHAR)] = '\0'; - _stscanf(xbuf, _T("%08lx"), &dw); - memcpy(buf, &dw, sizeof(DWORD)); - return sizeof(DWORD); -} - -/****************************************************************************** - * Converts a hex buffer into a hex comma separated values - */ -TCHAR* convertHexToHexCSV(BYTE* buf, ULONG bufLen) -{ - TCHAR* str; - TCHAR* ptrStr; - BYTE* ptrBuf; - - ULONG current = 0; - str = HeapAlloc(GetProcessHeap(), 0, (bufLen+1)*2*sizeof(TCHAR)); - memset(str, 0, (bufLen+1)*2); - ptrStr = str; /* Pointer to result */ - ptrBuf = buf; /* Pointer to current */ - while (current < bufLen) { - BYTE bCur = ptrBuf[current++]; - TCHAR res[3]; - _stprintf(res, _T("%02x"), (unsigned int)*&bCur); - _tcscat(str, res); - _tcscat(str, _T(",")); - } - /* Get rid of the last comma */ - str[_tcslen(str)-1] = _T('\0'); - return str; -} - -/****************************************************************************** - * Converts a hex buffer into a DWORD string - */ -TCHAR* convertHexToDWORDStr(BYTE* buf, ULONG bufLen) -{ - TCHAR* str; - DWORD dw; - - if (bufLen != sizeof(DWORD)) return NULL; - str = HeapAlloc(GetProcessHeap(), 0, ((bufLen*2)+1)*sizeof(TCHAR)); - memcpy(&dw, buf, sizeof(DWORD)); - _stprintf(str, _T("%08lx"), dw); - /* Get rid of the last comma */ - return str; -} - -/****************************************************************************** - * Converts a hex comma separated values list into a hex list. - * The Hex input string must be in exactly the correct form. - */ -DWORD convertHexCSVToHex(TCHAR* str, BYTE* buf, ULONG bufLen) -{ - TCHAR* s = str; /* Pointer to current */ - CHAR* b = buf; /* Pointer to result */ - ULONG strLen = _tcslen(str); - ULONG strPos = 0; - DWORD byteCount = 0; - - memset(buf, 0, bufLen); - /* - * warn the user if we are here with a string longer than 2 bytes that does - * not contains ",". It is more likely because the data is invalid. - */ - if ((strLen > 2) && (_tcschr(str, _T(',')) == NULL)) { - _tprintf(_T("WARNING converting CSV hex stream with no comma, ") \ - _T("input data seems invalid.\n")); - } - if (strLen > 3*bufLen) { - _tprintf(_T("ERROR converting CSV hex stream. Too long\n")); - } - while (strPos < strLen) { - TCHAR xbuf[3]; - TCHAR wc; - memcpy(xbuf, s, 2); - xbuf[3] = _T('\0'); - _stscanf(xbuf, _T("%02x"), (UINT*)&wc); - if (byteCount < bufLen) - *b++ = (unsigned char)wc; - s += 3; - strPos += 3; - ++byteCount; - } - return byteCount; -} - -/****************************************************************************** - * This function returns the HKEY associated with the data type encoded in the - * value. It modifies the input parameter (key value) in order to skip this - * "now useless" data type information. - * - * Note: Updated based on the algorithm used in 'server/registry.c' - */ -DWORD getDataType(LPTSTR* lpValue, DWORD* parse_type) -{ - struct data_type { const TCHAR *tag; int len; int type; int parse_type; }; - - static const struct data_type data_types[] = - { /* actual type */ /* type to assume for parsing */ - { _T("\""), 1, REG_SZ, REG_SZ }, - { _T("str:\""), 5, REG_SZ, REG_SZ }, -// { _T("str(2):\""), 8, REG_EXPAND_SZ, REG_SZ }, - { _T("expand:\""), 8, REG_EXPAND_SZ, REG_EXPAND_SZ }, - { _T("hex:"), 4, REG_BINARY, REG_BINARY }, - { _T("dword:"), 6, REG_DWORD, REG_DWORD }, - { _T("hex("), 4, -1, REG_BINARY }, - { NULL, 0, 0, 0 } - }; - - const struct data_type *ptr; - int type; - - for (ptr = data_types; ptr->tag; ptr++) { - if (memcmp(ptr->tag, *lpValue, ptr->len)) - continue; - - /* Found! */ - *parse_type = ptr->parse_type; - type = ptr->type; - *lpValue += ptr->len; - if (type == -1) { - TCHAR* end; - /* "hex(xx):" is special */ - type = (int)_tcstoul(*lpValue , &end, 16); - if (**lpValue == _T('\0') || *end != _T(')') || *(end+1) != _T(':')) { - type = REG_NONE; - } else { - *lpValue = end + 2; - } - } - return type; - } - return (**lpValue == _T('\0') ? REG_SZ : REG_NONE); -} - -/****************************************************************************** - * Returns an allocated buffer with a cleaned copy (removed the surrounding - * dbl quotes) of the passed value. - */ -LPTSTR getArg(LPTSTR arg) -{ - LPTSTR tmp = NULL; - ULONG len; - - if (arg == NULL) return NULL; - - // Get rid of surrounding quotes - len = _tcslen(arg); - if (arg[len-1] == _T('\"')) arg[len-1] = _T('\0'); - if (arg[0] == _T('\"')) arg++; - tmp = HeapAlloc(GetProcessHeap(), 0, (_tcslen(arg)+1) * sizeof(TCHAR)); - _tcscpy(tmp, arg); - return tmp; -} - -/****************************************************************************** - * Replaces escape sequences with the characters. - */ -void REGPROC_unescape_string(LPTSTR str) -{ - int str_idx = 0; /* current character under analysis */ - int val_idx = 0; /* the last character of the unescaped string */ - int len = _tcslen(str); - for (str_idx = 0; str_idx < len; str_idx++, val_idx++) { - if (str[str_idx] == _T('\\')) { - str_idx++; - switch (str[str_idx]) { - case _T('n'): - str[val_idx] = _T('\n'); - break; - case _T('\\'): - case _T('"'): - str[val_idx] = str[str_idx]; - break; - default: - _tprintf(_T("Warning! Unrecognized escape sequence: \\%c'\n"), str[str_idx]); - str[val_idx] = str[str_idx]; - break; - } - } else { - str[val_idx] = str[str_idx]; - } - } - str[val_idx] = _T('\0'); -} - -/****************************************************************************** - * Sets the value with name val_name to the data in val_data for the currently - * opened key. - * - * Parameters: - * val_name - name of the registry value - * val_data - registry value data - */ -HRESULT setValue(LPTSTR val_name, LPTSTR val_data) -{ - HRESULT hRes; - DWORD dwDataType, dwParseType; - LPBYTE lpbData; - BYTE convert[KEY_MAX_LEN]; - BYTE *bBigBuffer = 0; - DWORD dwLen; - - if ((val_name == NULL) || (val_data == NULL)) - return ERROR_INVALID_PARAMETER; - - /* Get the data type stored into the value field */ - dwDataType = getDataType(&val_data, &dwParseType); - -// if (dwParseType == REG_EXPAND_SZ) { -// } -// if (dwParseType == REG_SZ || dwParseType == REG_EXPAND_SZ) { /* no conversion for string */ - - if (dwParseType == REG_SZ) { /* no conversion for string */ - dwLen = _tcslen(val_data); - if (dwLen > 0 && val_data[dwLen-1] == _T('"')) { - dwLen--; - val_data[dwLen] = _T('\0'); - } - dwLen++; - dwLen *= sizeof(TCHAR); - REGPROC_unescape_string(val_data); - lpbData = val_data; - } else if (dwParseType == REG_DWORD) { /* Convert the dword types */ - dwLen = convertHexToDWord(val_data, convert); - lpbData = convert; - } else { /* Convert the hexadecimal types */ - int b_len = _tcslen(val_data)+2/3; - if (b_len > KEY_MAX_LEN) { - bBigBuffer = HeapAlloc (GetProcessHeap(), 0, b_len * sizeof(TCHAR)); - if (bBigBuffer == NULL) { - return ERROR_REGISTRY_IO_FAILED; - } - CHECK_ENOUGH_MEMORY(bBigBuffer); - dwLen = convertHexCSVToHex(val_data, bBigBuffer, b_len); - lpbData = bBigBuffer; - } else { - dwLen = convertHexCSVToHex(val_data, convert, KEY_MAX_LEN); - lpbData = convert; - } - } - hRes = RegSetValueEx(currentKeyHandle, val_name, - 0, /* Reserved */dwDataType, lpbData, dwLen); - - _tprintf(_T(" Value: %s, Data: %s\n"), val_name, lpbData); - - - if (bBigBuffer) - HeapFree(GetProcessHeap(), 0, bBigBuffer); - return hRes; -} - - -/****************************************************************************** - * Open the key - */ -HRESULT openKey(LPTSTR stdInput) -{ - DWORD dwDisp; - HRESULT hRes; - - /* Sanity checks */ - if (stdInput == NULL) - return ERROR_INVALID_PARAMETER; - - /* Get the registry class */ - currentKeyClass = getRegClass(stdInput); /* Sets global variable */ - if (currentKeyClass == (HKEY)ERROR_INVALID_PARAMETER) - return (HRESULT)ERROR_INVALID_PARAMETER; - - /* Get the key name */ - currentKeyName = getRegKeyName(stdInput); /* Sets global variable */ - if (currentKeyName == NULL) - return ERROR_INVALID_PARAMETER; - - hRes = RegCreateKeyEx( - currentKeyClass, /* Class */ - currentKeyName, /* Sub Key */ - 0, /* MUST BE 0 */ - NULL, /* object type */ - REG_OPTION_NON_VOLATILE, /* option, REG_OPTION_NON_VOLATILE ... */ - KEY_ALL_ACCESS, /* access mask, KEY_ALL_ACCESS */ - NULL, /* security attribute */ - ¤tKeyHandle, /* result */ - &dwDisp); /* disposition, REG_CREATED_NEW_KEY or - REG_OPENED_EXISTING_KEY */ - - if (hRes == ERROR_SUCCESS) - bTheKeyIsOpen = TRUE; - - return hRes; - -} - -/****************************************************************************** - * Extracts from [HKEY\some\key\path] or HKEY\some\key\path types of line - * the key name (what starts after the first '\') - */ -LPTSTR getRegKeyName(LPTSTR lpLine) -{ - LPTSTR keyNameBeg; - TCHAR lpLineCopy[KEY_MAX_LEN]; - - if (lpLine == NULL) - return NULL; - - _tcscpy(lpLineCopy, lpLine); - keyNameBeg = _tcschr(lpLineCopy, _T('\\')); /* The key name start by '\' */ - if (keyNameBeg) { - LPTSTR keyNameEnd; - - keyNameBeg++; /* is not part of the name */ - keyNameEnd = _tcschr(lpLineCopy, _T(']')); - if (keyNameEnd) { - *keyNameEnd = _T('\0'); /* remove ']' from the key name */ - } - } else { - keyNameBeg = lpLineCopy + _tcslen(lpLineCopy); /* branch - empty string */ - } - currentKeyName = HeapAlloc(GetProcessHeap(), 0, (_tcslen(keyNameBeg)+1)*sizeof(TCHAR)); - CHECK_ENOUGH_MEMORY(currentKeyName); - _tcscpy(currentKeyName, keyNameBeg); - return currentKeyName; -} - -/****************************************************************************** - * Extracts from [HKEY\some\key\path] or HKEY\some\key\path types of line - * the key class (what ends before the first '\') - */ -HKEY getRegClass(LPTSTR lpClass) -{ - LPTSTR classNameEnd; - LPTSTR classNameBeg; - int i; - - TCHAR lpClassCopy[KEY_MAX_LEN]; - - if (lpClass == NULL) - return (HKEY)ERROR_INVALID_PARAMETER; - - _tcsncpy(lpClassCopy, lpClass, KEY_MAX_LEN); - - classNameEnd = _tcschr(lpClassCopy, _T('\\')); /* The class name ends by '\' */ - if (!classNameEnd) { /* or the whole string */ - classNameEnd = lpClassCopy + _tcslen(lpClassCopy); - if (classNameEnd[-1] == _T(']')) { - classNameEnd--; - } - } - *classNameEnd = _T('\0'); /* Isolate the class name */ - if (lpClassCopy[0] == _T('[')) { - classNameBeg = lpClassCopy + 1; - } else { - classNameBeg = lpClassCopy; - } - for (i = 0; i < REG_CLASS_NUMBER; i++) { - if (!_tcscmp(classNameBeg, reg_class_names[i])) { - return reg_class_keys[i]; - } - } - return (HKEY)ERROR_INVALID_PARAMETER; -} - -/****************************************************************************** - * Close the currently opened key. - */ -void closeKey(VOID) -{ - RegCloseKey(currentKeyHandle); - HeapFree(GetProcessHeap(), 0, currentKeyName); /* Allocated by getKeyName */ - bTheKeyIsOpen = FALSE; - currentKeyName = NULL; - currentKeyClass = 0; - currentKeyHandle = 0; -} - -/****************************************************************************** - * This function is the main entry point to the setValue type of action. It - * receives the currently read line and dispatch the work depending on the - * context. - */ -void doSetValue(LPTSTR stdInput) -{ - /* - * We encountered the end of the file, make sure we - * close the opened key and exit - */ - if (stdInput == NULL) { - if (bTheKeyIsOpen != FALSE) - closeKey(); - return; - } - - if (stdInput[0] == _T('[')) { /* We are reading a new key */ - if (bTheKeyIsOpen != FALSE) { - closeKey(); /* Close the previous key before */ - } - if (openKey(stdInput) != ERROR_SUCCESS) { - _tprintf(_T("doSetValue failed to open key %s\n"), stdInput); - } - } else if ((bTheKeyIsOpen) && - ((stdInput[0] == _T('@')) || /* reading a default @=data pair */ - (stdInput[0] == _T('\"')))) { /* reading a new value=data pair */ - processSetValue(stdInput); - } else { /* since we are assuming that the file format is */ - if (bTheKeyIsOpen) /* valid we must be reading a blank line which */ - closeKey(); /* indicate end of this key processing */ - } -} - -/****************************************************************************** - * This funtion is the main entry point to the queryValue type of action. It - * receives the currently read line and dispatch the work depending on the - * context. - */ -void doQueryValue(LPTSTR stdInput) { - /* - * We encoutered the end of the file, make sure we - * close the opened key and exit - */ - if (stdInput == NULL) { - if (bTheKeyIsOpen != FALSE) - closeKey(); - return; - } - - if (stdInput[0] == _T('[')) { /* We are reading a new key */ - if (bTheKeyIsOpen != FALSE) - closeKey(); /* Close the previous key before */ - if (openKey(stdInput) != ERROR_SUCCESS ) { - _tprintf(_T("doQueryValue failed to open key %s\n"), stdInput); - } - } - else if( (bTheKeyIsOpen) && - ((stdInput[0] == _T('@')) || /* reading a default @=data pair */ - (stdInput[0] == _T('\"')))) { /* reading a new value=data pair */ - processQueryValue(stdInput); - } else { /* since we are assuming that the file format is */ - if (bTheKeyIsOpen) /* valid we must be reading a blank line which */ - closeKey(); /* indicate end of this key processing */ - } -} - -/****************************************************************************** - * This funtion is the main entry point to the deletetValue type of action. It - * receives the currently read line and dispatch the work depending on the - * context. - */ -void doDeleteValue(LPTSTR line) { - _tprintf(_T("deleteValue not yet implemented\n")); -} - -/****************************************************************************** - * This funtion is the main entry point to the deleteKey type of action. It - * receives the currently read line and dispatch the work depending on the - * context. - */ -void doDeleteKey(LPTSTR line) { - _tprintf(_T("deleteKey not yet implemented\n")); -} - -/****************************************************************************** - * This funtion is the main entry point to the createKey type of action. It - * receives the currently read line and dispatch the work depending on the - * context. - */ -void doCreateKey(LPTSTR line) { - _tprintf(_T("createKey not yet implemented\n")); -} - -/****************************************************************************** - * This function is a wrapper for the setValue function. It prepares the - * land and clean the area once completed. - * Note: this function modifies the line parameter. - * - * line - registry file unwrapped line. Should have the registry value name and - * complete registry value data. - */ -void processSetValue(LPTSTR line) -{ - LPTSTR val_name; /* registry value name */ - LPTSTR val_data; /* registry value data */ - - int line_idx = 0; /* current character under analysis */ - HRESULT hRes = 0; - - /* get value name */ - if (line[line_idx] == _T('@') && line[line_idx + 1] == _T('=')) { - line[line_idx] = _T('\0'); - val_name = line; - line_idx++; - } else if (line[line_idx] == _T('\"')) { - line_idx++; - val_name = line + line_idx; - while (TRUE) { - if (line[line_idx] == _T('\\')) { /* skip escaped character */ - line_idx += 2; - } else { - if (line[line_idx] == _T('\"')) { - line[line_idx] = _T('\0'); - line_idx++; - break; - } else { - line_idx++; - } - } - } - if (line[line_idx] != _T('=')) { - line[line_idx] = _T('\"'); - _tprintf(_T("Warning! uncrecognized line:\n%s\n"), line); - return; - } - } else { - _tprintf(_T("Warning! unrecognized line:\n%s\n"), line); - return; - } - line_idx++; /* skip the '=' character */ - val_data = line + line_idx; - REGPROC_unescape_string(val_name); - - _tprintf(_T("Key: %s, Value: %s, Data: %s\n"), currentKeyName, val_name, val_data); - - hRes = setValue(val_name, val_data); - if (hRes != ERROR_SUCCESS) { - _tprintf(_T("ERROR Key %s not created. Value: %s, Data: %s\n"), currentKeyName, val_name, val_data); - } -} - -/****************************************************************************** - * This function is a wrapper for the queryValue function. It prepares the - * land and clean the area once completed. - */ -void processQueryValue(LPTSTR cmdline) -{ - _tprintf(_T("ERROR!!! - temporary disabled")); - //exit(1); - return; -#if 0 - LPSTR argv[QUERY_VALUE_MAX_ARGS];/* args storage */ - LPSTR token = NULL; /* current token analized */ - ULONG argCounter = 0; /* counter of args */ - INT counter; - HRESULT hRes = 0; - LPSTR keyValue = NULL; - LPSTR lpsRes = NULL; - - /* - * Init storage and parse the line - */ - for (counter = 0; counter < QUERY_VALUE_MAX_ARGS; counter++) - argv[counter] = NULL; - - while ((token = getToken(&cmdline, queryValueDelim[argCounter])) != NULL) { - argv[argCounter++] = getArg(token); - if (argCounter == QUERY_VALUE_MAX_ARGS) - break; /* Stop processing args no matter what */ - } - - /* The value we look for is the first token on the line */ - if (argv[0] == NULL) - return; /* SHOULD NOT HAPPEN */ - else - keyValue = argv[0]; - - if ((keyValue[0] == '@') && (_tcslen(keyValue) == 1)) { - LONG lLen = KEY_MAX_LEN; - TCHAR* lpsData = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,KEY_MAX_LEN); - /* - * We need to query the key default value - */ - hRes = RegQueryValue(currentKeyHandle, currentKeyName, (LPBYTE)lpsData, &lLen); - if (hRes == ERROR_MORE_DATA) { - lpsData = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, lpsData, lLen); - hRes = RegQueryValue(currentKeyHandle, currentKeyName, (LPBYTE)lpsData, &lLen); - } - if (hRes == ERROR_SUCCESS) { - lpsRes = HeapAlloc(GetProcessHeap(), 0, lLen); - strncpy(lpsRes, lpsData, lLen); - lpsRes[lLen-1]='\0'; - } - } else { - DWORD dwLen = KEY_MAX_LEN; - BYTE* lpbData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, KEY_MAX_LEN); - DWORD dwType; - /* - * We need to query a specific value for the key - */ - hRes = RegQueryValueEx( - currentKeyHandle, - keyValue, - 0, - &dwType, - (LPBYTE)lpbData, - &dwLen); - - if (hRes == ERROR_MORE_DATA) { - lpbData = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, lpbData, dwLen * sizeof(TCHAR)); - hRes = RegQueryValueEx(currentKeyHandle, keyValue, NULL, &dwType, (LPBYTE)lpbData, &dwLen); - } - - if (hRes == ERROR_SUCCESS) { - /* - * Convert the returned data to a displayable format - */ - switch (dwType) { - case REG_SZ: - case REG_EXPAND_SZ: - lpsRes = HeapAlloc(GetProcessHeap(), 0, dwLen * sizeof(TCHAR)); - strncpy(lpsRes, lpbData, dwLen); - lpsRes[dwLen-1] = '\0'; - break; - case REG_DWORD: - lpsRes = convertHexToDWORDStr(lpbData, dwLen); - break; - default: - lpsRes = convertHexToHexCSV(lpbData, dwLen); - break; - } - } - - HeapFree(GetProcessHeap(), 0, lpbData); - } - if (hRes == ERROR_SUCCESS) { - _tprintf(_T("Value \"%s\" = \"%s\" in key [%s]\n"), keyValue, lpsRes, currentKeyName); - - } else { - _tprintf(_T("ERROR Value \"%s\" not found. for key \"%s\"\n"), keyValue, currentKeyName); - } - - /* - * Do some cleanup - */ - for (counter=0; counter= line && s <= line + lineSize); - size_remaining = lineSize - (s-line); - if (size_remaining < 2) { /* room for 1 character and the \0 */ - TCHAR *new_buffer; - size_t new_size = lineSize + REG_VAL_BUF_SIZE; - if (new_size > lineSize) /* no arithmetic overflow */ - new_buffer = HeapReAlloc (GetProcessHeap(), 0, line, new_size * sizeof(TCHAR)); - else - new_buffer = NULL; - CHECK_ENOUGH_MEMORY(new_buffer); - line = new_buffer; - s = line + lineSize - size_remaining; - lineSize = new_size; - size_remaining = lineSize - (s-line); - } - - /* Get as much as possible into the buffer, terminated either by - * eof, error, eol or getting the maximum amount. Abort on error. - */ -// -// This line is surely foobar, don't want to read INT_MAX in buffer at s, it's never going to be that big... -// size_to_get = (size_remaining > INT_MAX ? INT_MAX : size_remaining); -// -// Looks as if 'lineSize' contains the number of characters of buffer size -// - size_to_get = (size_remaining > lineSize ? lineSize : size_remaining); - - if (NULL == _fgetts(s, size_to_get, in)) { - if (ferror(in)) { - //_tperror(_T("While reading input")); - perror ("While reading input"); - //exit(IO_ERROR); - return; - } else { - assert (feof(in)); - *s = _T('\0'); - /* It is not clear to me from the definition that the - * contents of the buffer are well defined on detecting - * an eof without managing to read anything. - */ - } - } - - /* If we didn't read the eol nor the eof go around for the rest */ - s_eol = _tcschr (s, _T('\n')); - if (!feof (in) && !s_eol) { - s = _tcschr (s, _T('\0')); - /* It should be s + size_to_get - 1 but this is safer */ - continue; - } - - /* If it is a comment line then discard it and go around again */ - if (line [0] == _T('#')) { - s = line; - continue; - } - - /* Remove any line feed. Leave s_eol on the \0 */ - if (s_eol) { - *s_eol = _T('\0'); - if (s_eol > line && *(s_eol-1) == _T('\r')) - *--s_eol = _T('\0'); - } else { - s_eol = _tcschr (s, _T('\0')); - } - /* If there is a concatenating \\ then go around again */ - if (s_eol > line && *(s_eol-1) == _T('\\')) { - int c; - s = s_eol-1; - /* The following error protection could be made more self- - * correcting but I thought it not worth trying. - */ - - if ((c = _fgettc(in)) == _TEOF || c != _T(' ') || - (c = _fgettc(in)) == _TEOF || c != _T(' ')) - _tprintf(_T("ERROR - invalid continuation.\n")); - continue; - } - break; /* That is the full virtual line */ - } - command(line); - } - command(NULL); - HeapFree(GetProcessHeap(), 0, line); -} - -/****************************************************************************** - * This funtion is the main entry point to the registerDLL action. It - * receives the currently read line, then loads and registers the requested DLLs - */ -void doRegisterDLL(LPTSTR stdInput) -{ - HMODULE theLib = 0; - UINT retVal = 0; - - /* Check for valid input */ - if (stdInput == NULL) return; - - /* Load and register the library, then free it */ - theLib = LoadLibrary(stdInput); - if (theLib) { - FARPROC lpfnDLLRegProc = GetProcAddress(theLib, "DllRegisterServer"); - if (lpfnDLLRegProc) { - retVal = (*lpfnDLLRegProc)(); - } else { - _tprintf(_T("Couldn't find DllRegisterServer proc in '%s'.\n"), stdInput); - } - if (retVal != S_OK) { - _tprintf(_T("Couldn't find DllRegisterServer proc in '%s'.\n"), stdInput); - } - FreeLibrary(theLib); - } else { - _tprintf(_T("Could not load DLL '%s'.\n"), stdInput); - } -} - -/****************************************************************************** - * This funtion is the main entry point to the unregisterDLL action. It - * receives the currently read line, then loads and unregisters the requested DLLs - */ -void doUnregisterDLL(LPTSTR stdInput) -{ - HMODULE theLib = 0; - UINT retVal = 0; - - /* Check for valid input */ - if (stdInput == NULL) return; - - /* Load and unregister the library, then free it */ - theLib = LoadLibrary(stdInput); - if (theLib) { - FARPROC lpfnDLLRegProc = GetProcAddress(theLib, "DllUnregisterServer"); - if (lpfnDLLRegProc) { - retVal = (*lpfnDLLRegProc)(); - } else { - _tprintf(_T("Couldn't find DllUnregisterServer proc in '%s'.\n"), stdInput); - } - if (retVal != S_OK) { - _tprintf(_T("DLLUnregisterServer error 0x%x in '%s'.\n"), retVal, stdInput); - } - FreeLibrary(theLib); - } else { - _tprintf(_T("Could not load DLL '%s'.\n"), stdInput); - } -} - -/**************************************************************************** - * REGPROC_print_error - * - * Print the message for GetLastError - */ - -void REGPROC_print_error(VOID) -{ - LPVOID lpMsgBuf; - DWORD error_code; - int status; - - error_code = GetLastError (); - status = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, - NULL, error_code, 0, (LPTSTR) &lpMsgBuf, 0, NULL); - if (!status) { - _tprintf(_T("Cannot display message for error %ld, status %ld\n"), error_code, GetLastError()); - } else { - _tprintf(_T("REGPROC_print_error() - ")); - puts(lpMsgBuf); - LocalFree((HLOCAL)lpMsgBuf); - } - //exit(1); -} - -/****************************************************************************** - * Checks whether the buffer has enough room for the string or required size. - * Resizes the buffer if necessary. - * - * Parameters: - * buffer - pointer to a buffer for string - * len - current length of the buffer in characters. - * required_len - length of the string to place to the buffer in characters. - * The length does not include the terminating null character. - */ -void REGPROC_resize_char_buffer(TCHAR **buffer, DWORD *len, DWORD required_len) -{ - required_len++; - if (required_len > *len) { - *len = required_len; - *buffer = HeapReAlloc(GetProcessHeap(), 0, *buffer, *len * sizeof(**buffer)); - CHECK_ENOUGH_MEMORY(*buffer); - } -} - -/****************************************************************************** - * Prints string str to file - */ -void REGPROC_export_string(FILE *file, TCHAR *str) -{ - size_t len = _tcslen(str); - size_t i; - - /* escaping characters */ - for (i = 0; i < len; i++) { - TCHAR c = str[i]; - switch (c) { - //case _T('\\'): _fputts(_T("\\\\"), file); break; - case _T('\"'): _fputts(_T("\\\""), file); break; - case _T('\n'): _fputts(_T("\\\n"), file); break; - default: _fputtc(c, file); break; - } - } -} - -/****************************************************************************** - * Writes contents of the registry key to the specified file stream. - * - * Parameters: - * file - writable file stream to export registry branch to. - * key - registry branch to export. - * reg_key_name_buf - name of the key with registry class. - * Is resized if necessary. - * reg_key_name_len - length of the buffer for the registry class in characters. - * val_name_buf - buffer for storing value name. - * Is resized if necessary. - * val_name_len - length of the buffer for storing value names in characters. - * val_buf - buffer for storing values while extracting. - * Is resized if necessary. - * val_size - size of the buffer for storing values in bytes. - */ -void export_hkey(FILE *file, HKEY key, - TCHAR **reg_key_name_buf, DWORD *reg_key_name_len, - TCHAR **val_name_buf, DWORD *val_name_len, - BYTE **val_buf, DWORD *val_size) -{ - DWORD max_sub_key_len; - DWORD max_val_name_len; - DWORD max_val_size; - DWORD curr_len; - DWORD i; - BOOL more_data; - LONG ret; - - /* get size information and resize the buffers if necessary */ - if (RegQueryInfoKey(key, NULL, NULL, NULL, NULL, &max_sub_key_len, NULL, - NULL, &max_val_name_len, &max_val_size, NULL, NULL) != ERROR_SUCCESS) { - REGPROC_print_error(); - } - curr_len = _tcslen(*reg_key_name_buf); - REGPROC_resize_char_buffer(reg_key_name_buf, reg_key_name_len, max_sub_key_len + curr_len + 1); - REGPROC_resize_char_buffer(val_name_buf, val_name_len, max_val_name_len); - if (max_val_size > *val_size) { - *val_size = max_val_size; - *val_buf = HeapReAlloc(GetProcessHeap(), 0, *val_buf, *val_size * sizeof(TCHAR)); - CHECK_ENOUGH_MEMORY(val_buf); - } - /* output data for the current key */ - _fputts(_T("\n["), file); - _fputts(*reg_key_name_buf, file); - _fputts(_T("]\n"), file); - /* print all the values */ - i = 0; - more_data = TRUE; - while (more_data) { - DWORD value_type; - DWORD val_name_len1 = *val_name_len; - DWORD val_size1 = *val_size; - ret = RegEnumValue(key, i, *val_name_buf, &val_name_len1, NULL, &value_type, *val_buf, &val_size1); - if (ret != ERROR_SUCCESS) { - more_data = FALSE; - if (ret != ERROR_NO_MORE_ITEMS) { - REGPROC_print_error(); - } - } else { - i++; - if ((*val_name_buf)[0]) { - _fputts(_T("\""), file); - REGPROC_export_string(file, *val_name_buf); - _fputts(_T("\"="), file); - } else { - _fputts(_T("@="), file); - } - switch (value_type) { - case REG_EXPAND_SZ: - _fputts(_T("expand:"), file); - case REG_SZ: - _fputts(_T("\""), file); - REGPROC_export_string(file, *val_buf); - _fputts(_T("\"\n"), file); - break; - case REG_DWORD: - _ftprintf(file, _T("dword:%08lx\n"), *((DWORD *)*val_buf)); - break; - default: -/* - _tprintf(_T("warning - unsupported registry format '%ld', ") \ - _T("treating as binary\n"), value_type); - _tprintf(_T("key name: \"%s\"\n"), *reg_key_name_buf); - _tprintf(_T("value name:\"%s\"\n\n"), *val_name_buf); - */ - /* falls through */ - case REG_MULTI_SZ: - /* falls through */ - case REG_BINARY: - { - DWORD i1; - TCHAR *hex_prefix; - TCHAR buf[20]; - int cur_pos; - - if (value_type == REG_BINARY) { - hex_prefix = _T("hex:"); - } else { - hex_prefix = buf; - _stprintf(buf, _T("hex(%ld):"), value_type); - } - /* position of where the next character will be printed */ - /* NOTE: yes, _tcslen("hex:") is used even for hex(x): */ - cur_pos = _tcslen(_T("\"\"=")) + _tcslen(_T("hex:")) + - _tcslen(*val_name_buf); - _fputts(hex_prefix, file); - for (i1 = 0; i1 < val_size1; i1++) { - _ftprintf(file, _T("%02x"), (unsigned int)(*val_buf)[i1]); - if (i1 + 1 < val_size1) { - _fputts(_T(","), file); - } - cur_pos += 3; - /* wrap the line */ - if (cur_pos > REG_FILE_HEX_LINE_LEN) { - _fputts(_T("\\\n "), file); - cur_pos = 2; - } - } - _fputts(_T("\n"), file); - break; - } - } - } - } - i = 0; - more_data = TRUE; - (*reg_key_name_buf)[curr_len] = _T('\\'); - while (more_data) { - DWORD buf_len = *reg_key_name_len - curr_len; - ret = RegEnumKeyEx(key, i, *reg_key_name_buf + curr_len + 1, &buf_len, NULL, NULL, NULL, NULL); - if (ret != ERROR_SUCCESS && ret != ERROR_MORE_DATA) { - more_data = FALSE; - if (ret != ERROR_NO_MORE_ITEMS) { - REGPROC_print_error(); - } - } else { - HKEY subkey; - - i++; - if (RegOpenKey(key, *reg_key_name_buf + curr_len + 1, &subkey) == ERROR_SUCCESS) { - export_hkey(file, subkey, reg_key_name_buf, reg_key_name_len, val_name_buf, val_name_len, val_buf, val_size); - RegCloseKey(subkey); - } else { - REGPROC_print_error(); - } - } - } - (*reg_key_name_buf)[curr_len] = _T('\0'); -} -/* -#define REG_NONE ( 0 ) // No value type -#define REG_SZ ( 1 ) // Unicode nul terminated string -#define REG_EXPAND_SZ ( 2 ) // Unicode nul terminated string - // (with environment variable references) -#define REG_BINARY ( 3 ) // Free form binary -#define REG_DWORD ( 4 ) // 32-bit number -#define REG_DWORD_LITTLE_ENDIAN ( 4 ) // 32-bit number (same as REG_DWORD) -#define REG_DWORD_BIG_ENDIAN ( 5 ) // 32-bit number -#define REG_LINK ( 6 ) // Symbolic Link (unicode) -#define REG_MULTI_SZ ( 7 ) // Multiple Unicode strings -#define REG_RESOURCE_LIST ( 8 ) // Resource list in the resource map -#define REG_FULL_RESOURCE_DESCRIPTOR ( 9 ) // Resource list in the hardware description -#define REG_RESOURCE_REQUIREMENTS_LIST ( 10 ) - - */ -/****************************************************************************** - * Open file for export. - */ -FILE *REGPROC_open_export_file(TCHAR *file_name) -{ -//_CRTIMP FILE * __cdecl _wfopen(const wchar_t *, const wchar_t *); - -//FILE* fopen (const char* szFileName, const char* szMode); -//FILE* _wfopen(const wchar_t *file, const wchar_t *mode); - - FILE *file = _tfopen(file_name, _T("w")); - if (!file) { - perror(""); - _tprintf(_T("REGPROC_open_export_file(%s) - Can't open file.\n"), file_name); - //exit(1); - return NULL; - } - _fputts(_T("REGEDIT4\n"), file); - return file; -} - -/****************************************************************************** - * Writes contents of the registry key to the specified file stream. - * - * Parameters: - * file_name - name of a file to export registry branch to. - * reg_key_name - registry branch to export. The whole registry is exported if - * reg_key_name is NULL or contains an empty string. - */ -BOOL export_registry_key(TCHAR* file_name, TCHAR* reg_key_name) -{ - HKEY reg_key_class; - - TCHAR *reg_key_name_buf; - TCHAR *val_name_buf; - BYTE *val_buf; - DWORD reg_key_name_len = KEY_MAX_LEN; - DWORD val_name_len = KEY_MAX_LEN; - DWORD val_size = REG_VAL_BUF_SIZE; - FILE *file = NULL; - - //_tprintf(_T("export_registry_key(%s, %s)\n"), reg_key_name, file_name); - - reg_key_name_buf = HeapAlloc(GetProcessHeap(), 0, reg_key_name_len * sizeof(*reg_key_name_buf)); - val_name_buf = HeapAlloc(GetProcessHeap(), 0, val_name_len * sizeof(*val_name_buf)); - val_buf = HeapAlloc(GetProcessHeap(), 0, val_size); - CHECK_ENOUGH_MEMORY(reg_key_name_buf && val_name_buf && val_buf); - - if (reg_key_name && reg_key_name[0]) { - TCHAR *branch_name; - HKEY key; - - REGPROC_resize_char_buffer(®_key_name_buf, ®_key_name_len, - _tcslen(reg_key_name)); - _tcscpy(reg_key_name_buf, reg_key_name); - - /* open the specified key */ - reg_key_class = getRegClass(reg_key_name); - if (reg_key_class == (HKEY)ERROR_INVALID_PARAMETER) { - _tprintf(_T("Incorrect registry class specification in '%s\n"), reg_key_name); - //exit(1); - return FALSE; - } - branch_name = getRegKeyName(reg_key_name); - CHECK_ENOUGH_MEMORY(branch_name); - if (!branch_name[0]) { - /* no branch - registry class is specified */ - file = REGPROC_open_export_file(file_name); - export_hkey(file, reg_key_class, - ®_key_name_buf, ®_key_name_len, - &val_name_buf, &val_name_len, - &val_buf, &val_size); - } else if (RegOpenKey(reg_key_class, branch_name, &key) == ERROR_SUCCESS) { - file = REGPROC_open_export_file(file_name); - export_hkey(file, key, - ®_key_name_buf, ®_key_name_len, - &val_name_buf, &val_name_len, - &val_buf, &val_size); - RegCloseKey(key); - } else { - _tprintf(_T("Can't export. Registry key '%s does not exist!\n"), reg_key_name); - REGPROC_print_error(); - } - HeapFree(GetProcessHeap(), 0, branch_name); - } else { - int i; - - /* export all registry classes */ - file = REGPROC_open_export_file(file_name); - for (i = 0; i < REG_CLASS_NUMBER; i++) { - /* do not export HKEY_CLASSES_ROOT */ - if (reg_class_keys[i] != HKEY_CLASSES_ROOT && - reg_class_keys[i] != HKEY_CURRENT_USER && - reg_class_keys[i] != HKEY_CURRENT_CONFIG) { - _tcscpy(reg_key_name_buf, reg_class_names[i]); - export_hkey(file, reg_class_keys[i], - ®_key_name_buf, ®_key_name_len, - &val_name_buf, &val_name_len, - &val_buf, &val_size); - } - } - } - if (file) { - fclose(file); - } -// HeapFree(GetProcessHeap(), 0, reg_key_name); - HeapFree(GetProcessHeap(), 0, val_buf); - HeapFree(GetProcessHeap(), 0, val_name_buf); - HeapFree(GetProcessHeap(), 0, reg_key_name_buf); - return TRUE; -} - -/****************************************************************************** - * Reads contents of the specified file into the registry. - */ -BOOL import_registry_file(LPTSTR filename) -{ - FILE* reg_file = _tfopen(filename, _T("r")); - - if (reg_file) { - processRegLines(reg_file, doSetValue); - return TRUE; - } - return FALSE; -} - -/****************************************************************************** - * Recursive function which removes the registry key with all subkeys. - */ -BOOL delete_branch(HKEY key, TCHAR** reg_key_name_buf, DWORD* reg_key_name_len) -{ - HKEY branch_key; - DWORD max_sub_key_len; - DWORD subkeys; - DWORD curr_len; - LONG ret; - long int i; - - if (RegOpenKey(key, *reg_key_name_buf, &branch_key) != ERROR_SUCCESS) { - REGPROC_print_error(); - return FALSE; - } - - /* get size information and resize the buffers if necessary */ - if (RegQueryInfoKey(branch_key, NULL, NULL, NULL, &subkeys, &max_sub_key_len, - NULL, NULL, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) { - REGPROC_print_error(); - RegCloseKey(branch_key); - return FALSE; - } - curr_len = _tcslen(*reg_key_name_buf); - REGPROC_resize_char_buffer(reg_key_name_buf, reg_key_name_len, max_sub_key_len + curr_len + 1); - - (*reg_key_name_buf)[curr_len] = '\\'; - for (i = subkeys - 1; i >= 0; i--) { - DWORD buf_len = *reg_key_name_len - curr_len; - ret = RegEnumKeyEx(branch_key, i, *reg_key_name_buf + curr_len + 1, &buf_len, NULL, NULL, NULL, NULL); - if (ret != ERROR_SUCCESS && ret != ERROR_MORE_DATA && ret != ERROR_NO_MORE_ITEMS) { - REGPROC_print_error(); - RegCloseKey(branch_key); - return FALSE; - } else { - delete_branch(key, reg_key_name_buf, reg_key_name_len); - } - } - (*reg_key_name_buf)[curr_len] = '\0'; - RegCloseKey(branch_key); - RegDeleteKey(key, *reg_key_name_buf); - return TRUE; -} - -/****************************************************************************** - * Removes the registry key with all subkeys. Parses full key name. - * - * Parameters: - * reg_key_name - full name of registry branch to delete. Ignored if is NULL, - * empty, points to register key class, does not exist. - */ -void delete_registry_key(TCHAR* reg_key_name) -{ - TCHAR* branch_name; - DWORD branch_name_len; - HKEY reg_key_class; - HKEY branch_key; - - if (!reg_key_name || !reg_key_name[0]) { - return; - } - /* open the specified key */ - reg_key_class = getRegClass(reg_key_name); - if (reg_key_class == (HKEY)ERROR_INVALID_PARAMETER) { - _tprintf(_T("Incorrect registry class specification in '%s'\n"), reg_key_name); - //exit(1); - return; - } - branch_name = getRegKeyName(reg_key_name); - CHECK_ENOUGH_MEMORY(branch_name); - branch_name_len = _tcslen(branch_name); - if (!branch_name[0]) { - _tprintf(_T("Can't delete registry class '%s'\n"), reg_key_name); - //exit(1); - return; - } - if (RegOpenKey(reg_key_class, branch_name, &branch_key) == ERROR_SUCCESS) { - /* check whether the key exists */ - RegCloseKey(branch_key); - delete_branch(reg_key_class, &branch_name, &branch_name_len); - } - HeapFree(GetProcessHeap(), 0, branch_name); -} - diff --git a/rostests/tests/regdump/regproc.h b/rostests/tests/regdump/regproc.h deleted file mode 100644 index 70215a1ead4..00000000000 --- a/rostests/tests/regdump/regproc.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright 1999 Sylvain St-Germain - * Copyright 2002 Andriy Palamarchuk - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/****************************************************************************** - * Defines and consts - */ -#define KEY_MAX_LEN 1024 - -/* Return values */ -#define SUCCESS 0 -#define KEY_VALUE_ALREADY_SET 2 - -typedef void (*CommandAPI)(LPTSTR lpsLine); - -void doSetValue(LPTSTR lpsLine); -void doDeleteValue(LPTSTR lpsLine); -void doCreateKey(LPTSTR lpsLine); -void doDeleteKey(LPTSTR lpsLine); -void doQueryValue(LPTSTR lpsLine); -void doRegisterDLL(LPTSTR lpsLine); -void doUnregisterDLL(LPTSTR lpsLine); - -BOOL export_registry_key(TCHAR* file_name, TCHAR* reg_key_name); -BOOL import_registry_file(LPTSTR filename); -void delete_registry_key(TCHAR* reg_key_name); - -void processRegLines(FILE* in, CommandAPI command); - -/* - * Generic prototypes - */ -#ifdef _UNICODE -#define get_file_name get_file_nameW -#else -#define get_file_name get_file_nameA -#endif - -char* getToken(char** str, const char* delims); -void get_file_nameA(CHAR** command_line, CHAR* filename, int max_filename); -void get_file_nameW(CHAR** command_line, WCHAR* filename, int max_filename); -DWORD convertHexToDWord(TCHAR* str, BYTE* buf); -DWORD convertHexCSVToHex(TCHAR* str, BYTE* buf, ULONG bufLen); -LPTSTR convertHexToHexCSV(BYTE* buf, ULONG len); -LPTSTR convertHexToDWORDStr(BYTE* buf, ULONG len); -LPTSTR getRegKeyName(LPTSTR lpLine); -HKEY getRegClass(LPTSTR lpLine); -DWORD getDataType(LPTSTR* lpValue, DWORD* parse_type); -LPTSTR getArg(LPTSTR arg); -HRESULT openKey(LPTSTR stdInput); -void closeKey(VOID); - -/* - * api setValue prototypes - */ -void processSetValue(LPTSTR cmdline); -HRESULT setValue(LPTSTR val_name, LPTSTR val_data); - -/* - * api queryValue prototypes - */ -void processQueryValue(LPTSTR cmdline); - -#ifdef __GNUC__ -#ifdef WIN32_REGDBG -//typedef UINT_PTR SIZE_T, *PSIZE_T; -//#define _MAX_PATH 260 /* max. length of full pathname */ -#endif /*WIN32_REGDBG*/ - -#ifdef UNICODE -#define _tfopen _wfopen -#else -#define _tfopen fopen -#endif - -#endif /*__GNUC__*/ - -LPVOID RegHeapAlloc( - HANDLE hHeap, // handle to private heap block - DWORD dwFlags, // heap allocation control - SIZE_T dwBytes // number of bytes to allocate -); - -LPVOID RegHeapReAlloc( - HANDLE hHeap, // handle to heap block - DWORD dwFlags, // heap reallocation options - LPVOID lpMem, // pointer to memory to reallocate - SIZE_T dwBytes // number of bytes to reallocate -); - -BOOL RegHeapFree( - HANDLE hHeap, // handle to heap - DWORD dwFlags, // heap free options - LPVOID lpMem // pointer to memory -); diff --git a/rostests/tests/regqueryvalue/regqueryvalue.c b/rostests/tests/regqueryvalue/regqueryvalue.c deleted file mode 100644 index f43179a5e72..00000000000 --- a/rostests/tests/regqueryvalue/regqueryvalue.c +++ /dev/null @@ -1,67 +0,0 @@ -#include -#include -#include -#include -#include - -int main( int argc, char **argv ) { - ULONG ResultSize; - PWCHAR WcharResult; - WCHAR ValueNameWC[100]; - PCHAR CharResult; - HKEY RegKey; - int i; - - if( argc < 2 ) { - printf( "Usage: regqueryvalue [key] [value]\n" ); - printf( "Returns an HKEY_LOCAL_MACHINE value from the given key.\n" ); - return 1; - } - - if ( RegOpenKeyExA( HKEY_LOCAL_MACHINE, argv[1], 0, KEY_READ, &RegKey ) - != 0 ) { - printf( "Could not open key %s\n", argv[1] ); - return 2; - } - - for( i = 0; argv[2][i]; i++ ) ValueNameWC[i] = argv[2][i]; - ValueNameWC[i] = 0; - - if(RegQueryValueExW( RegKey, ValueNameWC, NULL, NULL, NULL, &ResultSize ) - != 0) { - printf( "The value %S does not exist.\n", ValueNameWC ); - return 5; - } - - WcharResult = malloc( (ResultSize + 1) * sizeof(WCHAR) ); - - if( !WcharResult ) { - printf( "Could not alloc %d wchars\n", (int)(ResultSize + 1) ); - return 6; - } - - RegQueryValueExW( RegKey, ValueNameWC, NULL, NULL, (LPBYTE)WcharResult, - &ResultSize ); - - printf( "wchar Value: %S\n", WcharResult ); - fflush( stdout ); - - RegQueryValueExA( RegKey, argv[2], NULL, NULL, NULL, &ResultSize ); - - CharResult = malloc( ResultSize + 1 ); - - if( !CharResult ) { - printf( "Could not alloc %d chars\n", (int)(ResultSize + 1) ); - return 7; - } - - RegQueryValueExA( RegKey, argv[2], NULL, NULL, (PBYTE)CharResult, &ResultSize ); - - printf( " char Value: %s\n", CharResult ); - fflush( stdout ); - - free( WcharResult ); - free( CharResult ); - - return 0; -} diff --git a/rostests/tests/regqueryvalue/regqueryvalue.rbuild b/rostests/tests/regqueryvalue/regqueryvalue.rbuild deleted file mode 100644 index 480491b5c47..00000000000 --- a/rostests/tests/regqueryvalue/regqueryvalue.rbuild +++ /dev/null @@ -1,6 +0,0 @@ - - user32 - advapi32 - gdi32 - regqueryvalue.c - diff --git a/rostests/tests/regtest/regtest.c b/rostests/tests/regtest/regtest.c deleted file mode 100644 index 5f93fd303a7..00000000000 --- a/rostests/tests/regtest/regtest.c +++ /dev/null @@ -1,995 +0,0 @@ -#include -#include -#include -#include -#include -#include - -HANDLE OutputHandle; -HANDLE InputHandle; - -void dprintf(char* fmt, ...) -{ - va_list args; - char buffer[255]; - - va_start(args,fmt); - vsprintf(buffer,fmt,args); - WriteConsoleA(OutputHandle, buffer, strlen(buffer), NULL, NULL); - va_end(args); -} - -void do_enumeratekey(PWSTR Name) -{ - ULONG Index,Length,i; - KEY_BASIC_INFORMATION KeyInformation[5]; - NTSTATUS Status; - OBJECT_ATTRIBUTES ObjectAttributes; - HANDLE hKey1; - UNICODE_STRING KeyName; - - RtlInitUnicodeString(&KeyName, Name); - InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE - , NULL, NULL); - Status=NtOpenKey( &hKey1, MAXIMUM_ALLOWED, &ObjectAttributes); - dprintf("NtEnumerateKey : \n"); - Index=0; - while(Status == STATUS_SUCCESS) - { - Status=NtEnumerateKey(hKey1,Index++,KeyBasicInformation - ,&KeyInformation[0], sizeof(KeyInformation) - ,&Length); - if(Status== STATUS_SUCCESS) - { - dprintf("\tSubKey Name = "); - for (i=0;i - gdi32 - regtest.c -
diff --git a/rostests/tests/sectest/sectest.c b/rostests/tests/sectest/sectest.c deleted file mode 100644 index afb9d3bea20..00000000000 --- a/rostests/tests/sectest/sectest.c +++ /dev/null @@ -1,75 +0,0 @@ -/* $Id$ */ -#define UNICODE -#define _UNICODE -#include -#include -#include - -#include - -int main(int argc, char* argv[]) -{ - HANDLE hFile; - HANDLE Section; - PVOID BaseAddress; - - printf("Section Test\n"); - - hFile = CreateFile(_T("sectest.txt"), - GENERIC_READ | GENERIC_WRITE, - 0, - NULL, - CREATE_ALWAYS, - 0, - 0); - if (hFile == INVALID_HANDLE_VALUE) - { - printf("Failed to create file (err=%ld)", GetLastError()); - return 1; - } - - Section = CreateFileMapping(hFile, - NULL, - PAGE_READWRITE, - 0, - 4096, - NULL); - if (Section == NULL) - { - printf("Failed to create section (err=%ld)", GetLastError()); - return 1; - } - - printf("Mapping view of section\n"); - BaseAddress = MapViewOfFile(Section, - FILE_MAP_ALL_ACCESS, - 0, - 0, - 4096); - printf("BaseAddress %x\n", (UINT) BaseAddress); - if (BaseAddress == NULL) - { - printf("Failed to map section (%ld)\n", GetLastError()); - return 1; - } - - printf("Clearing section\n"); - FillMemory(BaseAddress, 4096, ' '); - printf("Copying test data to section\n"); - strcpy(BaseAddress, "test data"); - - if (!UnmapViewOfFile(BaseAddress)) - { - printf("Failed to unmap view of file (%ld)\n", GetLastError()); - return 1; - } - - if (!CloseHandle(hFile)) - { - printf("Failed to close file (%ld)\n", GetLastError()); - return 1; - } - - return 0; -} - diff --git a/rostests/tests/sectest/sectest.rbuild b/rostests/tests/sectest/sectest.rbuild deleted file mode 100644 index b3405639853..00000000000 --- a/rostests/tests/sectest/sectest.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - sectest.c - diff --git a/rostests/tests/sertest/sertest.c b/rostests/tests/sertest/sertest.c deleted file mode 100644 index ea5cdbe379a..00000000000 --- a/rostests/tests/sertest/sertest.c +++ /dev/null @@ -1,133 +0,0 @@ -#include -#include - -#include - -#define BUFSIZE 128 -#define MAX_PORTNAME_LEN 20 -#define APP_VERSION_STR "0.01" - -int main(int argc, char *argv[]) -{ - CHAR txBuffer[BUFSIZE]; - CHAR rxBuffer[BUFSIZE]; - DWORD dwBaud = 9600; - DWORD dwNumWritten; - DWORD dwErrors; - DCB dcb; - BOOL bResult; - HANDLE hPort; - int i; - int j; - int k; - int nPortNum = 1; - - TCHAR szPortName[MAX_PORTNAME_LEN]; - - if (argc > 1) { - //sscanf(argv[1], "%d", &dwBaud); - sscanf(argv[1], "%d", &nPortNum); - } - sprintf(szPortName, _T("COM%d"), nPortNum); - - printf("Serial Port Test Application Version %s\n", APP_VERSION_STR); - printf("Attempting to open serial port %d - %s\n", nPortNum, szPortName); - hPort = CreateFile(szPortName, - GENERIC_READ|GENERIC_WRITE, - 0, // exclusive - NULL, // sec attr - OPEN_EXISTING, - 0, // no attributes - NULL); // no template - - if (hPort == (HANDLE)-1) { - printf("ERROR: CreateFile() failed with result: %lx\n", (DWORD)hPort); - return 1; - } - printf("CreateFile() returned: %lx\n", (DWORD)hPort); - - printf("Fiddling with DTR and RTS control lines...\n"); - for (i = 0; i < 100; i++) { - bResult = EscapeCommFunction(hPort, SETDTR); - if (!bResult) { - printf("WARNING: EscapeCommFunction(SETDTR) failed: %lx\n", (DWORD)bResult); - } - bResult = EscapeCommFunction(hPort, SETRTS); - if (!bResult) { - printf("WARNING: EscapeCommFunction(SETRTS) failed: %lx\n", (DWORD)bResult); - } - for (j = 0; j < 1000; j++) { - k *= j; - } -/* -#define CLRDTR (6) -#define CLRRTS (4) -#define SETDTR (5) -#define SETRTS (3) -#define SETXOFF (1) -#define SETXON (2) -#define SETBREAK (8) -#define CLRBREAK (9) - */ - bResult = EscapeCommFunction(hPort, CLRDTR); - if (!bResult) { - printf("WARNING: EscapeCommFunction(CLRDTR) failed: %lx\n", (DWORD)bResult); - } - bResult = EscapeCommFunction(hPort, CLRRTS); - if (!bResult) { - printf("WARNING: EscapeCommFunction(CLRRTS) failed: %lx\n", (DWORD)bResult); - } - } - printf("Getting the default line characteristics...\n"); - dcb.DCBlength = sizeof(DCB); - if (!GetCommState(hPort, &dcb)) { - printf("ERROR: failed to get the dcb: %ld\n", GetLastError()); - return 2; - } - printf("Setting the line characteristics to 9600,8,N,1\n"); - dcb.BaudRate = dwBaud; - dcb.ByteSize = 8; - dcb.Parity = NOPARITY; - dcb.StopBits = ONESTOPBIT; - - bResult = SetCommState(hPort, &dcb); - if (!bResult) { - printf("ERROR: failed to set the comm state: %lx\n", (DWORD)bResult); - return 3; - } - for (i = 0; i < BUFSIZE; i++) { - txBuffer[i] = (CHAR)i; - //printf(" %d ", txBuffer[i]); - rxBuffer[i] = 0xFF; - } - printf("\n"); - printf("Writting transmit buffer to the serial port\n"); - bResult = WriteFile(hPort, txBuffer, BUFSIZE, &dwNumWritten, NULL); - if (!bResult) { - printf("ERROR: failed to write to the serial port: %lx\n", (DWORD)bResult); - return 4; - } - printf("WriteFile() returned: %lx, byteswritten: %lx\n", (DWORD)bResult, dwNumWritten); -#if 0 - printf("Attempting to read %d bytes from the serial port\n", BUFSIZE); - bResult = ReadFile(hPort, rxBuffer, BUFSIZE, &dwNumRead, NULL); - if (!bResult) { - printf("ERROR: failed to read from the serial port: %lx\n", (DWORD)bResult); - return 5; - } - printf("ReadFile() returned: %lx, bytesread: %lx\n", (DWORD)bResult, dwNumRead); - for (i = 0; i < BUFSIZE; i++) { - printf(" %d ",rxBuffer[i]); - } -#endif - printf("Attempting to close the serial port\n"); - bResult = ClearCommError(hPort, &dwErrors, NULL); - printf("ClearCommError returned: %lx, dwErrors: %lx\n", (DWORD)bResult, dwErrors); - bResult = CloseHandle(hPort); - if (!bResult) { - printf("ERROR: failed to close the serial port: %lx\n", (DWORD)bResult); - return 6; - } - printf("Finished\n"); - return 0; -} diff --git a/rostests/tests/sertest/sertest.rbuild b/rostests/tests/sertest/sertest.rbuild deleted file mode 100644 index 924c73af075..00000000000 --- a/rostests/tests/sertest/sertest.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - sertest.c - diff --git a/rostests/tests/shaptest/shaptest.c b/rostests/tests/shaptest/shaptest.c deleted file mode 100644 index 8400a4c8906..00000000000 --- a/rostests/tests/shaptest/shaptest.c +++ /dev/null @@ -1,252 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * AUTHOR: See gditest-- (initial changes by Mark Tempel) - * shaptest - * - * This is a windowed application that should draw two polygons. One - * is drawn with ALTERNATE fill, the other is drawn with WINDING fill. - * This is used to test out the Polygon() implementation. - */ - -#include -#include -#include - -#ifndef ASSERT -#define ASSERT assert -#endif - -#define nelem(x) (sizeof (x) / sizeof *(x)) - -HFONT tf; -LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM); - -void PolygonTest ( HDC hdc ) -{ - HPEN Pen, OldPen; - HBRUSH RedBrush, OldBrush; - DWORD Mode; - POINT PointsAlternate[] = - { - { 20, 80 }, - { 60, 20 }, - { 90, 80 }, - { 20, 40 }, - { 100, 40 } - }; - POINT PointsWinding[] = - { - { 130, 80 }, - { 170, 20 }, - { 200, 80 }, - { 130, 40 }, - { 210, 40 } - }; - POINT Tri1[] = - { - { 3, 3 }, - { 5, 3 }, - { 3, 5 } - }; - POINT Tri2[] = - { - { 7, 3 }, - { 7, 7 }, - { 3, 7 }, - }; - POINT Square1[] = - { - { 1, 15 }, - { 3, 15 }, - { 3, 17 }, - { 1, 17 } - }; - POINT Square2[] = - { - { 5, 15 }, - { 7, 15 }, - { 7, 17 }, - { 5, 17 } - }; - POINT Square3[] = - { - { 1, 23 }, - { 3, 23 }, - { 3, 25 }, - { 1, 25 } - }; - POINT Square4[] = - { - { 5, 23 }, - { 7, 23 }, - { 7, 25 }, - { 5, 25 } - }; - POINT Square5[] = - { - { 1, 31 }, - { 3, 31 }, - { 3, 33 }, - { 1, 33 } - }; - POINT Square6[] = - { - { 5, 31 }, - { 7, 31 }, - { 7, 33 }, - { 5, 33 } - }; - - //create a pen to draw the shape - Pen = CreatePen(PS_SOLID, 1, RGB(0, 0, 0xff)); - ASSERT(Pen); - RedBrush = CreateSolidBrush(RGB(0xff, 0, 0)); - ASSERT(RedBrush); - - OldPen = (HPEN)SelectObject(hdc, Pen); - OldBrush = (HBRUSH)SelectObject(hdc, RedBrush); - - Mode = GetPolyFillMode(hdc); - - RoundRect ( hdc, 32, 8, 48, 24, 8, 8 ); - - SetPolyFillMode(hdc, ALTERNATE); - Polygon(hdc,PointsAlternate,nelem(PointsAlternate)); - - SetPolyFillMode(hdc, WINDING); - Polygon(hdc,PointsWinding,nelem(PointsWinding)); - - Rectangle ( hdc, 1, 1, 10, 10 ); - Polygon(hdc,Tri1,nelem(Tri1)); - Polygon(hdc,Tri2,nelem(Tri2)); - - Rectangle ( hdc, 1, 11, 4, 14 ); - Rectangle ( hdc, 5, 11, 8, 14 ); - Rectangle ( hdc, 9, 11, 12, 14 ); - Rectangle ( hdc, 13, 11, 16, 14 ); - Polygon(hdc,Square1,nelem(Square1)); - Polygon(hdc,Square2,nelem(Square2)); - Rectangle ( hdc, 1, 19, 4, 22 ); - Rectangle ( hdc, 5, 19, 8, 22 ); - Rectangle ( hdc, 9, 19, 12, 22 ); - Rectangle ( hdc, 13, 19, 16, 22 ); - Polygon(hdc,Square3,nelem(Square3)); - Polygon(hdc,Square4,nelem(Square4)); - Rectangle ( hdc, 1, 27, 4, 30 ); - Rectangle ( hdc, 5, 27, 8, 30 ); - Rectangle ( hdc, 9, 27, 12, 30 ); - Rectangle ( hdc, 13, 27, 16, 30 ); - - // switch to null pen to make surey they display correctly - DeleteObject ( SelectObject(hdc, OldPen) ); - Pen = CreatePen ( PS_NULL, 0, 0 ); - ASSERT(Pen); - OldPen = (HPEN)SelectObject(hdc, Pen); - - Polygon(hdc,Square5,nelem(Square5)); - Polygon(hdc,Square6,nelem(Square6)); - Rectangle ( hdc, 1, 35, 4, 38 ); - Rectangle ( hdc, 5, 35, 8, 38 ); - Rectangle ( hdc, 9, 35, 12, 38 ); - Rectangle ( hdc, 13, 35, 16, 38 ); - - //cleanup - SetPolyFillMode(hdc, Mode); - DeleteObject ( SelectObject(hdc, OldPen) ); - DeleteObject ( SelectObject(hdc, OldBrush) ); -} - - -void shaptest( HDC hdc ) -{ - //Test the Polygon routine. - PolygonTest(hdc); -} - - -int WINAPI -WinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpszCmdLine, - int nCmdShow) -{ - WNDCLASS wc; - MSG msg; - HWND hWnd; - - wc.lpszClassName = "ShapTestClass"; - wc.lpfnWndProc = MainWndProc; - wc.style = CS_VREDRAW | CS_HREDRAW; - wc.hInstance = hInstance; - wc.hIcon = (HICON)LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION); - wc.hCursor = (HCURSOR)LoadCursor(NULL, (LPCTSTR)IDC_ARROW); - wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH); - wc.lpszMenuName = NULL; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - if (RegisterClass(&wc) == 0) - { - fprintf(stderr, "RegisterClass failed (last error 0x%X)\n", - (unsigned int)GetLastError()); - return(1); - } - - hWnd = CreateWindow("ShapTestClass", - "Shaptest", - WS_OVERLAPPEDWINDOW|WS_HSCROLL|WS_VSCROLL, - 0, - 0, - CW_USEDEFAULT, - CW_USEDEFAULT, - NULL, - NULL, - hInstance, - NULL); - if (hWnd == NULL) - { - fprintf(stderr, "CreateWindow failed (last error 0x%X)\n", - (unsigned int)GetLastError()); - return(1); - } - - tf = CreateFontA(14, 0, 0, TA_BASELINE, FW_NORMAL, FALSE, FALSE, FALSE, - ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, - DEFAULT_QUALITY, FIXED_PITCH|FF_DONTCARE, "Timmons"); - - ShowWindow(hWnd, nCmdShow); - - while(GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - DeleteObject(tf); - - return msg.wParam; -} - -LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - PAINTSTRUCT ps; - HDC hDC; - - switch(msg) - { - - case WM_PAINT: - hDC = BeginPaint(hWnd, &ps); - shaptest( hDC ); - EndPaint(hWnd, &ps); - break; - - case WM_DESTROY: - PostQuitMessage(0); - break; - - default: - return DefWindowProc(hWnd, msg, wParam, lParam); - } - return 0; -} - diff --git a/rostests/tests/shaptest/shaptest.rbuild b/rostests/tests/shaptest/shaptest.rbuild deleted file mode 100644 index 48398589a1e..00000000000 --- a/rostests/tests/shaptest/shaptest.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - shaptest.c - diff --git a/rostests/tests/shm/shm.rbuild b/rostests/tests/shm/shm.rbuild deleted file mode 100644 index 702cad48182..00000000000 --- a/rostests/tests/shm/shm.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - shm.c - diff --git a/rostests/tests/shm/shmclt.c b/rostests/tests/shm/shmclt.c deleted file mode 100644 index f7ff5ac70a1..00000000000 --- a/rostests/tests/shm/shmclt.c +++ /dev/null @@ -1,61 +0,0 @@ -#include -#include -#include -#include -#include - -HANDLE OutputHandle; -HANDLE InputHandle; - -void debug_printf(char* fmt, ...) -{ - va_list args; - char buffer[255]; - - va_start(args,fmt); - vsprintf(buffer,fmt,args); - WriteConsoleA(OutputHandle, buffer, strlen(buffer), NULL, NULL); - va_end(args); -} - - -int -main(int argc, char* argv[]) -{ - HANDLE Section; - PVOID BaseAddress; - char buffer[256]; - - printf("Shm test server\n"); - - Section = OpenFileMappingW ( -// PAGE_EXECUTE_READWRITE, invalid parameter - FILE_MAP_WRITE, - FALSE, - L"TestSection" - ); - if (Section == NULL) - { - printf("Failed to open section (err=%d)", GetLastError()); - return 1; - } - - BaseAddress = MapViewOfFile(Section, - FILE_MAP_ALL_ACCESS, - 0, - 0, - 8192); - if (BaseAddress == NULL) - { - printf("Failed to map section (err=%d)\n", GetLastError()); - return 1; - } - printf("BaseAddress %x\n", (UINT) BaseAddress); - printf("Copying from section\n"); - strcpy(buffer, BaseAddress); - printf("Copyed <%s>\n", buffer); - -// for(;;); - return 0; -} - diff --git a/rostests/tests/shm/shmsrv.c b/rostests/tests/shm/shmsrv.c deleted file mode 100644 index 79527ea231d..00000000000 --- a/rostests/tests/shm/shmsrv.c +++ /dev/null @@ -1,53 +0,0 @@ -/* $Id$ - * - * FILE : reactos/apps/shm/shmsrv.c - * AUTHOR: David Welch - */ -#include -#include -#include -#include -#include - -int main(int argc, char* argv[]) -{ - HANDLE Section; - PVOID BaseAddress; - - printf("Shm test server\n"); - - Section = CreateFileMappingW ( - (HANDLE) 0xFFFFFFFF, - NULL, - PAGE_READWRITE, - 0, - 8192, - L"TestSection" - ); - if (Section == NULL) - { - printf("Failed to create section (err=%d)", GetLastError()); - return 1; - } - - printf("Mapping view of section\n"); - BaseAddress = MapViewOfFile(Section, - FILE_MAP_ALL_ACCESS, - 0, - 0, - 8192); - printf("BaseAddress %x\n", (UINT) BaseAddress); - if (BaseAddress == NULL) - { - printf("Failed to map section\n"); - } - - printf("Copying to section\n"); - printf("Copying %s\n", GetCommandLineA()); - strcpy(BaseAddress, GetCommandLineA()); - - Sleep(INFINITE); - - return 0; -} - diff --git a/rostests/tests/statst/statst.c b/rostests/tests/statst/statst.c deleted file mode 100644 index a51a67979d7..00000000000 --- a/rostests/tests/statst/statst.c +++ /dev/null @@ -1,165 +0,0 @@ -//#define WIN32_LEAN_AND_MEAN -#include - -static LPSTR STATIC_CLASS = "STATIC"; -static LPSTR TEST_WND_CLASS = "TESTWND"; - -#ifdef NDEBUG - #define DPRINT(s) (void)0 -#else - #define DPRINT(s) OutputDebugStringA("STATICTEST: " s "\n") -#endif - -HINSTANCE AppInstance = NULL; - -LRESULT WmCreate( - HWND Wnd) -{ - UCHAR i; - DPRINT("WM_CREATE (enter)."); - // Test 1 - black rectangle. - DPRINT("test 1"); - CreateWindowEx(0, STATIC_CLASS, NULL, WS_CHILD | WS_VISIBLE | SS_BLACKRECT, - 10, 10, 100, 20, Wnd, NULL, AppInstance, NULL); - // Test 2 - black frame. - DPRINT("test 2"); - CreateWindowEx(0, STATIC_CLASS, NULL, WS_CHILD | WS_VISIBLE | SS_BLACKFRAME, - 10, 40, 100, 20, Wnd, NULL, AppInstance, NULL); - // Test 3 - gray rectangle. - DPRINT("test 3"); - CreateWindowEx(0, STATIC_CLASS, NULL, WS_CHILD | WS_VISIBLE | SS_GRAYRECT, - 10, 70, 100, 20, Wnd, NULL, AppInstance, NULL); - // Test 4 - gray frame. - DPRINT("test 4"); - CreateWindowEx(0, STATIC_CLASS, NULL, WS_CHILD | WS_VISIBLE | SS_GRAYFRAME, - 10, 100, 100, 20, Wnd, NULL, AppInstance, NULL); - // Test 5 - left-aligned text. - DPRINT("test 5"); - CreateWindowEx(0, STATIC_CLASS, - "&Left-aligned text &static control window", - WS_CHILD | WS_VISIBLE | SS_LEFT, - 10, 130, 100, 50, Wnd, NULL, AppInstance, NULL); - // Test 6 - right-aligned text. - DPRINT("test 6"); - CreateWindowEx(0, STATIC_CLASS, - "&Right-aligned text &static control window", - WS_CHILD | WS_VISIBLE | SS_RIGHT, - 10, 185, 100, 50, Wnd, NULL, AppInstance, NULL); - // Test 7 - centered text. - DPRINT("test 7"); - CreateWindowEx(0, STATIC_CLASS, - "&Centered text &static control window", - WS_CHILD | WS_VISIBLE | SS_CENTER, - 10, 240, 100, 50, Wnd, NULL, AppInstance, NULL); - // Test 8 - left-aligned text with no word wrap and no prefixes. - DPRINT("test 8"); - CreateWindowEx(0, STATIC_CLASS, - "&No prefix and no word wrapping", - WS_CHILD | WS_VISIBLE | SS_LEFTNOWORDWRAP | SS_NOPREFIX, - 10, 295, 100, 20, Wnd, NULL, AppInstance, NULL); - // Test 9 - white rectangle. - DPRINT("test 9"); - CreateWindowEx(0, STATIC_CLASS, NULL, WS_CHILD | WS_VISIBLE | SS_WHITERECT, - 120, 10, 100, 20, Wnd, NULL, AppInstance, NULL); - // Test 10 - white frame. - DPRINT("test 10"); - CreateWindowEx(0, STATIC_CLASS, NULL, WS_CHILD | WS_VISIBLE | SS_WHITEFRAME, - 120, 40, 100, 20, Wnd, NULL, AppInstance, NULL); - // Test 11 - etched frame. - DPRINT("test 11"); - CreateWindowEx(0, STATIC_CLASS, NULL, WS_CHILD | WS_VISIBLE - | SS_ETCHEDFRAME, 120, 70, 100, 20, Wnd, NULL, AppInstance, NULL); - // Test 12 - etched horizontal lines. - DPRINT("test 12"); - for (i = 0; i < 5; ++i) - CreateWindowEx(0, STATIC_CLASS, NULL, WS_CHILD | WS_VISIBLE - | SS_ETCHEDHORZ, 120, 100 + (4L * i), 100, 4, Wnd, - NULL, AppInstance, NULL); - // Test 13 - etched vertical lines. - DPRINT("test 13"); - for (i = 0; i < 25; ++i) - CreateWindowEx(0, STATIC_CLASS, NULL, WS_CHILD | WS_VISIBLE - | SS_ETCHEDVERT, 120 + (4L * i), 130, 4, 20, Wnd, - NULL, AppInstance, NULL); - // Test 14 - sunken border. - DPRINT("test 14"); - CreateWindowEx(0, STATIC_CLASS, - "Sunken frame and word ellipsis", - WS_CHILD | WS_VISIBLE | SS_SUNKEN | SS_WORDELLIPSIS, - 120, 160, 100, 20, Wnd, NULL, AppInstance, NULL); - DPRINT("WM_CREATE (leave)."); - return 0; -} - -LRESULT CALLBACK TestWndProc( - HWND Wnd, - UINT Msg, - WPARAM wParam, - LPARAM lParam) -{ - switch (Msg) { - case WM_CREATE: - return WmCreate(Wnd); - case WM_DESTROY: - PostQuitMessage(0); - return 0; - default: - return DefWindowProc(Wnd, Msg, wParam, lParam); - } -} - -int WINAPI WinMain( - HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpCmdLine, - int nShowCmd) -{ - ATOM Result; - MSG Msg; - HWND MainWindow; - WNDCLASSEX TestWndClass = {0}; - DPRINT("Application starting up."); - // Remember instance handle. - AppInstance = GetModuleHandle(NULL); - // Register test window class. - TestWndClass.cbSize = sizeof(WNDCLASSEX); - TestWndClass.lpfnWndProc = &TestWndProc; - TestWndClass.hInstance = AppInstance; - TestWndClass.hCursor = LoadCursor(0, (LPCTSTR)IDC_ARROW); - TestWndClass.hbrBackground = CreateSolidBrush(RGB(255,255,230)); - TestWndClass.lpszClassName = TEST_WND_CLASS; - Result = RegisterClassEx(&TestWndClass); - if (Result == 0) { - DPRINT("Error registering class."); - MessageBox(0, "Error registering test window class.", - "Static control test", MB_ICONSTOP | MB_OK); - ExitProcess(0); - } - // Create main window. - DPRINT("Creating main window."); - MainWindow = CreateWindowEx(WS_EX_APPWINDOW | WS_EX_CLIENTEDGE, - TEST_WND_CLASS, "Static control test", - WS_OVERLAPPEDWINDOW, 50, 50, 245, 365, - NULL, NULL, AppInstance, NULL); - if (MainWindow == 0) { - DPRINT("Error creating main window."); - UnregisterClass(TEST_WND_CLASS, AppInstance); - MessageBox(0, "Error creating test window.", - "Static control test", MB_ICONSTOP | MB_OK); - ExitProcess(0); - } - DPRINT("Showing main window."); - ShowWindow(MainWindow, SW_SHOWNORMAL); - UpdateWindow(MainWindow); - // Run message loop. - DPRINT("Entering message loop."); - while (GetMessage(&Msg, NULL, 0, 0) > 0) { - TranslateMessage(&Msg); - DispatchMessage(&Msg); - } - // Unregister window class. - UnregisterClass(TEST_WND_CLASS, AppInstance); - DPRINT("Exiting."); - - return Msg.wParam; -} diff --git a/rostests/tests/statst/statst.rbuild b/rostests/tests/statst/statst.rbuild deleted file mode 100644 index d376f443c14..00000000000 --- a/rostests/tests/statst/statst.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - statst.c - diff --git a/rostests/tests/statst2/statst2.c b/rostests/tests/statst2/statst2.c deleted file mode 100644 index 6ac769ed38b..00000000000 --- a/rostests/tests/statst2/statst2.c +++ /dev/null @@ -1,180 +0,0 @@ -// Static Control Test.c - -//#define WIN32_LEAN_AND_MEAN -#include -#include - -#ifndef SS_ENDELLIPSIS -#define SS_ENDELLIPSIS 0x00004000L -#endif /* SS_ENDELLIPSIS */ - - -#define nMaxCtrls 32 -#define nStaticWidth 384 -#define nStaticHeight 18 - -HWND g_hwnd = NULL; -HINSTANCE g_hInst = 0; -int nNextCtrl = 0; -HWND g_hwndCtrl[nMaxCtrls]; - -static void CreateStatic ( const char* lpWindowName, DWORD dwStyle ) -{ - int n = nNextCtrl++; - assert ( n < nMaxCtrls ); - g_hwndCtrl[n] = CreateWindow ( - "STATIC", // lpClassName - lpWindowName, // lpWindowName - WS_VISIBLE|WS_CHILD|dwStyle, // dwStyle - n+2, // x - nStaticHeight*n+1, // y - nStaticWidth, // nWidth - nStaticHeight-1, // nHeight - g_hwnd, // hWndParent - NULL, // hMenu - g_hInst, // hInstance - NULL ); // lParam -} - -LRESULT CALLBACK WndProc ( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) -{ - int i; - switch ( msg ) - { - case WM_CREATE: - g_hwnd = hwnd; - for ( i = 0; i < nMaxCtrls; i++ ) - g_hwndCtrl[i] = NULL; - - CreateStatic ( "SS_NOTIFY test (click/double-click here)", SS_NOTIFY ); - - CreateStatic ( "SS_ENDELLIPSIS test test test test test test test test test test test", SS_ENDELLIPSIS ); - - CreateStatic ( "SS_CENTER test", SS_CENTER ); - - CreateStatic ( "SS_RIGHT test", SS_RIGHT ); - - CreateStatic ( "SS_BLACKFRAME test:", 0 ); - CreateStatic ( "this text shouldn't be visible!", SS_BLACKFRAME ); - - CreateStatic ( "SS_BLACKRECT test:", 0 ); - CreateStatic ( "this text shouldn't be visible!", SS_BLACKRECT ); - - CreateStatic ( "SS_ETCHEDFRAME test:", 0 ); - CreateStatic ( "this text shouldn't be visible!", SS_ETCHEDFRAME ); - - CreateStatic ( "SS_ETCHEDHORZ test:", 0 ); - CreateStatic ( "this text shouldn't be visible!", SS_ETCHEDHORZ ); - - CreateStatic ( "SS_ETCHEDVERT test", 0 ); - CreateStatic ( "this text shouldn't be visible!", SS_ETCHEDVERT ); - - CreateStatic ( "SS_GRAYFRAME test", 0 ); - CreateStatic ( "this text shouldn't be visible!", SS_GRAYFRAME ); - - CreateStatic ( "SS_GRAYRECT test", 0 ); - CreateStatic ( "this text shouldn't be visible!", SS_GRAYRECT ); - - CreateStatic ( "SS_NOPREFIX &test", SS_NOPREFIX ); - - CreateStatic ( "SS_OWNERDRAW test", SS_OWNERDRAW ); - - CreateStatic ( "SS_SUNKEN test", SS_SUNKEN ); - - CreateStatic ( "SS_WHITEFRAME test:", 0 ); - CreateStatic ( "this text shouldn't be visible!", SS_WHITEFRAME ); - - CreateStatic ( "SS_WHITERECT test:", 0 ); - CreateStatic ( "this text shouldn't be visible!", SS_WHITERECT ); - - //if ( creation fails ) - // return 0; - break; - - case WM_COMMAND: - if ( HIWORD(wParam) == STN_CLICKED ) - SetWindowText ( (HWND)lParam, "SS_NOTIFY:STN_CLICKED!" ); - if ( HIWORD(wParam) == STN_DBLCLK ) - SetWindowText ( (HWND)lParam, "SS_NOTIFY:STN_DBLCLK!" ); - break; - - case WM_DRAWITEM: - { - LPDRAWITEMSTRUCT lpDrawItem = (LPDRAWITEMSTRUCT) lParam; - DrawText ( lpDrawItem->hDC, "SS_DRAWITEM test successful!", 28, &(lpDrawItem->rcItem), 0 ); - } - break; - - case WM_DESTROY: - PostQuitMessage(0); - return 0; - } - return DefWindowProc ( hwnd, msg, wParam, lParam ); -} - -HWND RegisterAndCreateWindow ( - HINSTANCE hInst, - const char* className, - const char* title ) -{ - WNDCLASSEX wc; - HWND hwnd; - - g_hInst = hInst; - - wc.cbSize = sizeof (WNDCLASSEX); - wc.lpfnWndProc = WndProc; // window procedure: mandatory - wc.hInstance = hInst; // owner of the class: mandatory - wc.lpszClassName = className; // mandatory - wc.hCursor = LoadCursor ( 0, (LPCTSTR)IDC_ARROW ); // optional - wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); // optional - wc.style = 0; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hIcon = 0; - wc.hIconSm = 0; - wc.lpszMenuName = 0; - if ( !RegisterClassEx ( &wc ) ) - return NULL; - - hwnd = CreateWindowEx ( - 0, // dwStyleEx - className, // class name - title, // window title - WS_OVERLAPPEDWINDOW, // dwStyle - CW_USEDEFAULT, // x - CW_USEDEFAULT, // y - CW_USEDEFAULT, // width - CW_USEDEFAULT, // height - NULL, // hwndParent - NULL, // hMenu - hInst, // hInstance - 0 ); // lParam - - if ( !hwnd ) - return NULL; - - ShowWindow ( hwnd, SW_SHOW ); - UpdateWindow ( hwnd ); - - return hwnd; -} - -int WINAPI WinMain ( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdParam, int cmdShow ) -{ - char className [] = "Static Control Test"; - HWND hwnd; - MSG msg; - int status; - - hwnd = RegisterAndCreateWindow ( hInst, className, "Static Control Test" ); - - // Message loop - while ((status = GetMessage (& msg, 0, 0, 0)) != 0) - { - if (status == -1) - return -1; - DispatchMessage ( &msg ); - } - return msg.wParam; -} diff --git a/rostests/tests/statst2/statst2.rbuild b/rostests/tests/statst2/statst2.rbuild deleted file mode 100644 index 8ef65a7ec8c..00000000000 --- a/rostests/tests/statst2/statst2.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - statst2.c - diff --git a/rostests/tests/subclass/subclass.c b/rostests/tests/subclass/subclass.c deleted file mode 100644 index 63c4f0e568c..00000000000 --- a/rostests/tests/subclass/subclass.c +++ /dev/null @@ -1,172 +0,0 @@ -#include -#include - -LRESULT WINAPI UnicodeWndProc(HWND, UINT, WPARAM, LPARAM); -LRESULT WINAPI UnicodeSubclassProc(HWND, UINT, WPARAM, LPARAM); -LRESULT WINAPI AnsiSubclassProc(HWND, UINT, WPARAM, LPARAM); - -static WNDPROC SavedWndProcW; -static WNDPROC SavedWndProcA; - -int WINAPI -WinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpszCmdLine, - int nCmdShow) -{ - WNDCLASSW wc; - HWND hWnd; - WCHAR WindowTextW[256]; - char WindowTextA[256]; - - wc.lpszClassName = L"UnicodeClass"; - wc.lpfnWndProc = UnicodeWndProc; - wc.style = 0; - wc.hInstance = hInstance; - wc.hIcon = NULL; - wc.hCursor = NULL; - wc.hbrBackground = NULL; - wc.lpszMenuName = NULL; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - if (RegisterClassW(&wc) == 0) - { - fprintf(stderr, "RegisterClassW failed (last error 0x%lu)\n", - GetLastError()); - return 1; - } - printf("Unicode class registered, WndProc = 0x%p\n", wc.lpfnWndProc); - - hWnd = CreateWindowA("UnicodeClass", - "Unicode Window", - WS_OVERLAPPEDWINDOW, - 0, - 0, - CW_USEDEFAULT, - CW_USEDEFAULT, - NULL, - NULL, - hInstance, - NULL); - if (hWnd == NULL) - { - fprintf(stderr, "CreateWindowA failed (last error 0x%lu)\n", - GetLastError()); - return 1; - } - - printf("Window created, IsWindowUnicode returns %s\n", IsWindowUnicode(hWnd) ? "TRUE" : "FALSE"); - - printf("Calling GetWindowTextW\n"); - if (! GetWindowTextW(hWnd, WindowTextW, sizeof(WindowTextW) / sizeof(WindowTextW[0]))) - { - fprintf(stderr, "GetWindowTextW failed (last error 0x%lu)\n", GetLastError()); - return 1; - } - printf("GetWindowTextW returned Unicode string \"%S\"\n", WindowTextW); - - printf("Calling GetWindowTextA\n"); - if (! GetWindowTextA(hWnd, WindowTextA, sizeof(WindowTextA) / sizeof(WindowTextA[0]))) - { - fprintf(stderr, "GetWindowTextA failed (last error 0x%lu)\n", GetLastError()); - return 1; - } - printf("GetWindowTextA returned Ansi string \"%s\"\n", WindowTextA); - printf("\n"); - - SavedWndProcW = (WNDPROC) GetWindowLongW(hWnd, GWL_WNDPROC); - printf("GetWindowLongW returned 0x%p\n", SavedWndProcW); - SavedWndProcA = (WNDPROC) GetWindowLongA(hWnd, GWL_WNDPROC); - printf("GetWindowLongA returned 0x%p\n", SavedWndProcA); - printf("\n"); - - printf("Subclassing window using SetWindowLongW, new WndProc 0x%p\n", UnicodeSubclassProc); - SetWindowLongW(hWnd, GWL_WNDPROC, (LONG) UnicodeSubclassProc); - printf("After subclass, IsWindowUnicode %s, WndProcA 0x%lx, WndProcW 0x%lx\n", - IsWindowUnicode(hWnd) ? "TRUE" : "FALSE", GetWindowLongA(hWnd, GWL_WNDPROC), - GetWindowLongW(hWnd, GWL_WNDPROC)); - - printf("Calling GetWindowTextW\n"); - if (! GetWindowTextW(hWnd, WindowTextW, sizeof(WindowTextW) / sizeof(WindowTextW[0]))) - { - fprintf(stderr, "GetWindowTextW failed (last error 0x%lu)\n", GetLastError()); - return 1; - } - printf("GetWindowTextW returned Unicode string \"%S\"\n", WindowTextW); - printf("\n"); - - printf("Subclassing window using SetWindowLongA, new WndProc 0x%p\n", AnsiSubclassProc); - SetWindowLongA(hWnd, GWL_WNDPROC, (LONG) AnsiSubclassProc); - printf("After subclass, IsWindowUnicode %s, WndProcA 0x%lx, WndProcW 0x%lx\n", - IsWindowUnicode(hWnd) ? "TRUE" : "FALSE", GetWindowLongA(hWnd, GWL_WNDPROC), - GetWindowLongW(hWnd, GWL_WNDPROC)); - - printf("Calling GetWindowTextW\n"); - if (! GetWindowTextW(hWnd, WindowTextW, sizeof(WindowTextW) / sizeof(WindowTextW[0]))) - { - fprintf(stderr, "GetWindowTextW failed (last error 0x%lu)\n", GetLastError()); - return 1; - } - printf("GetWindowTextW returned Unicode string \"%S\"\n", WindowTextW); - - DestroyWindow(hWnd); - - return 0; -} - -LRESULT CALLBACK UnicodeWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - LRESULT Result; - - switch(msg) - { - case WM_GETTEXT: - printf("UnicodeWndProc calling DefWindowProcW\n"); - Result = DefWindowProcW(hWnd, msg, wParam, lParam); - printf("UnicodeWndProc Unicode window text \"%S\"\n", (LPWSTR) lParam); - break; - default: - Result = DefWindowProcW(hWnd, msg, wParam, lParam); - break; - } - - return Result; -} - -LRESULT CALLBACK UnicodeSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - LRESULT Result; - - switch(msg) - { - case WM_GETTEXT: - printf("UnicodeSubclassProc calling SavedWindowProc\n"); - Result = CallWindowProcW(SavedWndProcW, hWnd, msg, wParam, lParam); - printf("UnicodeSubclassProc Unicode window text \"%S\"\n", (LPWSTR) lParam); - break; - default: - Result = CallWindowProcW(SavedWndProcW, hWnd, msg, wParam, lParam); - break; - } - - return Result; -} - -LRESULT CALLBACK AnsiSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - LRESULT Result; - - switch(msg) - { - case WM_GETTEXT: - printf("AnsiSubclassProc calling SavedWindowProcA\n"); - Result = CallWindowProcA(SavedWndProcA, hWnd, msg, wParam, lParam); - printf("AnsiSubclassProc Ansi window text \"%s\"\n", (LPSTR) lParam); - break; - default: - Result = CallWindowProcA(SavedWndProcA, hWnd, msg, wParam, lParam); - break; - } - - return Result; -} diff --git a/rostests/tests/subclass/subclass.rbuild b/rostests/tests/subclass/subclass.rbuild deleted file mode 100644 index f92a22330c1..00000000000 --- a/rostests/tests/subclass/subclass.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - subclass.c - diff --git a/rostests/tests/suspend/suspend.c b/rostests/tests/suspend/suspend.c deleted file mode 100644 index 25cc38b0122..00000000000 --- a/rostests/tests/suspend/suspend.c +++ /dev/null @@ -1,77 +0,0 @@ -#define UNICODE -#define WIN32_NO_STATUS -#include -#include -#define NTOS_MODE_USER -#include - -#define NDEBUG -#include - -static volatile DWORD z; -static volatile DWORD x=0; - -static NTSTATUS WINAPI -thread_1(PVOID Param) -{ - DWORD y=0; - - for(;;) - { - z++; - if(x>50) - { - printf("I should have been suspended for years :-)\n"); - Sleep(100); - x=0;y++; - if(y==3) ExitProcess(0); - } - } -} - -int -main(int argc, char *argv[]) -{ - HANDLE thread; - DWORD thread_id; - CONTEXT context; - - context.ContextFlags=CONTEXT_CONTROL; - - z=0; - thread=CreateThread(NULL, - 0x1000, - (LPTHREAD_START_ROUTINE)thread_1, - NULL, - 0, - &thread_id); - - if(!thread) - { - printf("Error: could not create thread ...\n"); - ExitProcess(0); - } - - Sleep(1000); - - SuspendThread(thread); - - for(;;) - { - printf("%lx ", z); - Sleep(100);x++; - if(x>100 && GetThreadContext(thread, &context)) - { -#if defined(_M_IX86) - printf("EIP: %lx\n", context.Eip); -#elif defined(_M_AMD64) - printf("RIP: %p\n", context.Rip); -#endif - printf("Calling resumethread ... \n"); - ResumeThread(thread); - } - } - - ExitProcess(0); - return(0); -} diff --git a/rostests/tests/suspend/suspend.rbuild b/rostests/tests/suspend/suspend.rbuild deleted file mode 100644 index a2077b06d57..00000000000 --- a/rostests/tests/suspend/suspend.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - suspend.c - diff --git a/rostests/tests/tcpsvr/tcpsvr.c b/rostests/tests/tcpsvr/tcpsvr.c deleted file mode 100644 index 5915cf31126..00000000000 --- a/rostests/tests/tcpsvr/tcpsvr.c +++ /dev/null @@ -1,175 +0,0 @@ -/* tcpServer.c - * - * Simple Winsock TCP server test. - * Later will be used as base for ReactOS telnetd - * - * HISTORY: - * 6-15-02 - Added Winsock support to UNIX tcp test - * 6-16-02 - Removed Unix support - * 6-17-02 - Added extra comments to code - * - */ - -#include -#include -#include -#include - -#undef ERROR -#define SUCCESS 0 -#define ERROR 1 - -#define END_LINE 0x0A -#define SERVER_PORT 23 -#define MAX_MSG 100 - -/* function readline */ -int read_line(); - -int main (int argc, char *argv[]) { - - WORD wVersionRequested; - WSADATA WsaData; - INT Status; - int sd, newSd, cliLen; - - struct sockaddr_in cliAddr, servAddr; - char line[MAX_MSG]; - - wVersionRequested = MAKEWORD(2, 2); - - Status = WSAStartup(wVersionRequested, &WsaData); - if (Status != 0) { - printf("Could not initialize winsock dll.\n"); - return FALSE; - } - - /* create socket */ - sd = socket(AF_INET, SOCK_STREAM, 0); - if(sd<0) { - perror("cannot open socket "); - WSACleanup(); - return ERROR; - } - - /* bind server port */ - servAddr.sin_family = AF_INET; - servAddr.sin_addr.s_addr = htonl(INADDR_ANY); - servAddr.sin_port = htons(SERVER_PORT); - - if(bind(sd, (struct sockaddr *) &servAddr, sizeof(servAddr))<0) { - perror("cannot bind port "); - WSACleanup(); - return ERROR; - } - - listen(sd,5); - - while(1) { - - printf("%s: \n" - "To start test, Please telnet to localhost (127.0.0.1) port 23 \n" - "When connected input raw data followed by End of Line\n" - "Test is now running on TCP port %u\n",argv[0],SERVER_PORT); - - cliLen = sizeof(cliAddr); - newSd = accept(sd, (struct sockaddr *) &cliAddr, &cliLen); - if(newSd<0) { - perror("cannot accept connection "); - WSACleanup(); - return ERROR; - } - - /* init line */ - memset(line,0x0,MAX_MSG); - - /* receive segments */ - while(read_line(newSd,line)!=ERROR) { - - printf("%s: received from %s:TCP%d : %s\n", argv[0], - inet_ntoa(cliAddr.sin_addr), - ntohs(cliAddr.sin_port), line); - /* init line */ - memset(line,0x0,MAX_MSG); - - } /* while(read_line) */ - - } /* while (1) */ - -} - - -/* WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ -/* this function is experimental.. I don't know yet if it works */ -/* correctly or not. Use Steven's readline() function to have */ -/* something robust. */ -/* WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ - -/* rcv_line is my function readline(). Data is read from the socket when */ -/* needed, but not byte after bytes. All the received data is read. */ -/* This means only one call to recv(), instead of one call for */ -/* each received byte. */ -/* You can set END_CHAR to whatever means endofline for you. (0x0A is \n)*/ -/* read_lin returns the number of bytes returned in line_to_return */ -int read_line(int newSd, char *line_to_return) { - - static int rcv_ptr=0; - static char rcv_msg[MAX_MSG]; - static int n; - int offset; - - offset=0; - - while(1) { - if(rcv_ptr==0) { - /* read data from socket */ - memset(rcv_msg,0x0,MAX_MSG); /* init buffer */ - n = recv(newSd, rcv_msg, MAX_MSG, 0); /* wait for data */ - if (n<0) { - perror(" cannot receive data "); - return ERROR; - } else if (n==0) { - printf(" connection closed by client\n"); - closesocket(newSd); - WSACleanup(); - return ERROR; - } - } - - /* if new data read on socket */ - /* OR */ - /* if another line is still in buffer */ - - /* copy line into 'line_to_return' */ - while(*(rcv_msg+rcv_ptr)!=END_LINE && rcv_ptr return line */ - if(rcv_ptr==n-1) { - /* set last byte to END_LINE */ - *(line_to_return+offset)=END_LINE; - rcv_ptr=0; - return ++offset; - } - - /* end of line but still some data in buffer => return line */ - if(rcv_ptr */ - /* wait for more data to arrive on socket */ - if(rcv_ptr == n) { - rcv_ptr = 0; - } - - } /* while */ -} - - diff --git a/rostests/tests/tcpsvr/tcpsvr.rbuild b/rostests/tests/tcpsvr/tcpsvr.rbuild deleted file mode 100644 index 506274eee39..00000000000 --- a/rostests/tests/tcpsvr/tcpsvr.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - ws2_32 - tcpsvr.c - diff --git a/rostests/tests/terminate/terminate.c b/rostests/tests/terminate/terminate.c deleted file mode 100644 index 73ad49dd682..00000000000 --- a/rostests/tests/terminate/terminate.c +++ /dev/null @@ -1,75 +0,0 @@ -#define UNICODE -#define WIN32_NO_STATUS -#include -#include -#define NTOS_MODE_USER -#include - -#define NDEBUG -#include - -static volatile DWORD z; -static volatile DWORD x=0; - -static NTSTATUS WINAPI -thread_1(PVOID Param) -{ - DWORD y=0; - - for(;;) - { - z++; - if(x>50) - { - Sleep(100); - x=0;y++; - if(y==3) return(0); - } - } -} - -int -main(int argc, char *argv[]) -{ - HANDLE thread; - DWORD thread_id; - CONTEXT context; - DWORD z = 0; - - context.ContextFlags=CONTEXT_CONTROL; - - while (z < 50) - { - z++; - thread=CreateThread(NULL, - 0x1000, - (LPTHREAD_START_ROUTINE)thread_1, - NULL, - 0, - &thread_id); - - if(!thread) - { - printf("Error: could not create thread ...\n"); - ExitProcess(0); - } - - Sleep(1000); - - printf("T"); - if ((z % 5) == 0) - { - TerminateThread(thread, 0); - } - printf("C"); - GetThreadContext(thread, &context); - printf("S"); - SuspendThread(thread); - printf("R"); - ResumeThread(thread); - TerminateThread(thread, 0); - } - - ExitProcess(0); - return(0); -} diff --git a/rostests/tests/terminate/terminate.rbuild b/rostests/tests/terminate/terminate.rbuild deleted file mode 100644 index 5c651e1107a..00000000000 --- a/rostests/tests/terminate/terminate.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - terminate.c - diff --git a/rostests/tests/thread/thread.c b/rostests/tests/thread/thread.c deleted file mode 100644 index d9062645be7..00000000000 --- a/rostests/tests/thread/thread.c +++ /dev/null @@ -1,88 +0,0 @@ -/* $Id$ - * - * - * - * - */ - -#include -#include -#include - -#define NR_THREADS (10) - -ULONG nr; - -DWORD WINAPI thread_main1(LPVOID param) -{ - ULONG s; - - printf("Thread %ld running\n", (DWORD)param); - s = nr = ((nr * 1103515245) + 12345) & 0x7fffffff; - s = s % 10; - printf("s %ld\n", s); - Sleep(s); - printf("Thread %ld finished\n", (DWORD)param); - return 0; -} - -// Shows the help on how to use these program to the user -void showHelp(void) -{ - -printf("\nReactOS threads test program (built on %s).\n\n", __DATE__); -printf("syntax:\tthread.exe \n"); -printf("\twhere is an integer number\n"); -printf("\texample: thread.exe 100\n"); - - -} - -int main (int argc, char* argv[]) -{ - DWORD i=0; - DWORD id; - ULONG nr; - HANDLE ThreadHandle[NR_THREADS]; - - // The user must supply one argument (the seed). if he/she doesn't - // then we show the help. - // if(argc < 2) { - // showHelp(); - // return 1; - // } - - // nr = atoi(argv[1]); - nr = 500; - printf("Seed %ld\n", nr); - - printf("Creating %d threads...\n",NR_THREADS*2); - for (i=0;i - gdi32 - thread.c - diff --git a/rostests/tests/thread_msg/thread_msg.c b/rostests/tests/thread_msg/thread_msg.c deleted file mode 100644 index cbb22213ac0..00000000000 --- a/rostests/tests/thread_msg/thread_msg.c +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Test case for PostThreadMessage - * (C) 2003 ReactOS - * License: LGPL - * See: LGPL.txt in top directory. - * Author: arty - * - * Windows thread message queue test case. - * Derived from ../event/event.c in part. - */ - -#include -#include -#include - -HANDLE hWaitForFailure; -HANDLE hOkToPostThreadMessage; -HANDLE hOkToTerminate; - -DWORD WINAPI thread( LPVOID crap ) -{ - MSG msg; - - /* Failure case ... Wait for the parent to try to post a message - before queue creation */ - printf( "Waiting to create the message queue.\n" ); - - WaitForSingleObject(hWaitForFailure,INFINITE); - - printf( "Creating message queue.\n" ); - - /* "Create" a message queue */ - PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE ); - - printf( "Signalling the parent that we're ready.\n" ); - - /* Signal that it's ok to post */ - SetEvent( hOkToPostThreadMessage ); - - printf( "Listening messages.\n" ); - - /* Now read some messages */ - while( GetMessage( &msg, 0,0,0 ) ) { - printf( "Received message: %04x %04x %08lx\n", - (msg.message & 0xffff), - (msg.wParam & 0xffff), - msg.lParam ); - assert( !msg.hwnd ); - } - - printf( "Finished receiving messages.\n" ); - SetEvent( hOkToTerminate ); - - return 0; -} - -int main( int argc, char **argv ) -{ - DWORD id; - - printf( "Creating events\n" ); - - hOkToPostThreadMessage = CreateEvent( NULL, FALSE, FALSE, NULL ); - hOkToTerminate = CreateEvent( NULL, FALSE, FALSE, NULL ); - hWaitForFailure = CreateEvent( NULL, FALSE, FALSE, NULL ); - - printf( "Created events\n" ); - - if( CreateThread( 0, 0, thread, 0, 0, &id ) == NULL ) { - printf( "Couldn't create one thread.\n" ); - return 0; - } - - printf( "Posting to non-existent queue\n" ); - - /* Check failure case */ - assert( PostThreadMessage( id, WM_USER + 0, 1, 2 ) == FALSE ); - - printf( "Signalling thread to advance.\n" ); - - SetEvent( hWaitForFailure ); - - printf( "Waiting for signal from thread.\n" ); - WaitForSingleObject( hOkToPostThreadMessage, INFINITE ); - - printf( "Sending three messages, then quit.\n" ); - assert( PostThreadMessage( id, WM_USER + 0, 1, 2 ) ); - assert( PostThreadMessage( id, WM_USER + 1, 3, 4 ) ); - Sleep( 500 ); /* Sleep a bit, so that the queue is empty for a bit. */ - assert( PostThreadMessage( id, WM_USER + 2, 5, 6 ) ); - assert( PostThreadMessage( id, WM_QUIT, 0,0 ) ); - - WaitForSingleObject( hOkToTerminate, INFINITE ); - printf( "Test complete.\n" ); - - return 0; -} diff --git a/rostests/tests/thread_msg/thread_msg.rbuild b/rostests/tests/thread_msg/thread_msg.rbuild deleted file mode 100644 index 041c9e95b01..00000000000 --- a/rostests/tests/thread_msg/thread_msg.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - thread_msg.c - diff --git a/rostests/tests/threadwait/threadwait.c b/rostests/tests/threadwait/threadwait.c deleted file mode 100644 index 06c20c4259d..00000000000 --- a/rostests/tests/threadwait/threadwait.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Author: Skywing (skywing@valhallalegends.com) - * Date: 09/09/2003 - * Purpose: Probe for PsUnblockThread crash due to double-acquire spin lock. - */ - -#define WIN32_NO_STATUS -#include -#include - -#define NTOS_MODE_USER -#include - -DWORD __stdcall threadfunc(void* UNREFERENCED) -{ - printf("Thread: Initialized\n"); - Sleep(2500); - printf("Thread: Terminating...\n"); - return 0; -} - -int main(int ac, char **av) -{ - DWORD id; - HANDLE Thread; - - Thread = CreateThread(0, 0, threadfunc, 0, 0, &id); - printf("Main: ThreadId for new thread is %08lx\n", id); - printf("Main: Waiting on thread...\n"); - WaitForSingleObject(Thread, INFINITE); - printf("Main: OK, somebody fixed the PsUnblockThread spinlock double-acquire crash\n"); - NtClose(Thread); - printf("Main: Terminating...\n"); - return 0; -} diff --git a/rostests/tests/threadwait/threadwait.rbuild b/rostests/tests/threadwait/threadwait.rbuild deleted file mode 100644 index 8afada02cfd..00000000000 --- a/rostests/tests/threadwait/threadwait.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - ntdll - threadwait.c - diff --git a/rostests/tests/tmrqueue/tmrqueue.c b/rostests/tests/tmrqueue/tmrqueue.c deleted file mode 100644 index 0e58393bc03..00000000000 --- a/rostests/tests/tmrqueue/tmrqueue.c +++ /dev/null @@ -1,365 +0,0 @@ -#include -#include -#include - -#define N_TIMEOUT 3 - -/*******************************************************************************/ - -typedef struct _TEST *PTEST; - -typedef VOID (*PFNTEST)(PTEST Test, HANDLE hEvent); - -typedef struct _TEST -{ - TCHAR *description; - BOOL Result; - PFNTEST Routine; - int id; -} TEST; - -static TEST Tests[3]; - -VOID RunTests(VOID) -{ - int i, nTests; - static HANDLE hEvent; - - hEvent = CreateEvent(NULL, FALSE, FALSE, NULL); - if(hEvent == NULL) - { - _tprintf(_T("Unable to create event!")); - return; - } - - nTests = sizeof(Tests) / sizeof(TEST); - - for(i = 0; i < nTests; i++) - { - Tests[i].id = i + 1; - - if(Tests[i].Routine == NULL) - { - continue; - } - - _tprintf(_T("+++ TEST %d: %s\n"), Tests[i].id, Tests[i].description); - - Tests[i].Routine(&Tests[i], hEvent); - - WaitForSingleObject(hEvent, INFINITE); - - _tprintf(_T("\n\n")); - } - - CloseHandle(hEvent); -} - -VOID PrintTestResults(VOID) -{ - int i, nTests, nsuccess = 0, nfailed = 0; - TCHAR *status; - - nTests = sizeof(Tests) / sizeof(TEST); - - for(i = 0; i < nTests; i++) - { - if(Tests[i].Routine == NULL) - { - status = _T("SKIPPED"); - } - else if(Tests[i].Result == TRUE) - { - status = _T("SUCCESS"); - nsuccess++; - } - else - { - status = _T("FAILED "); - nfailed++; - } - - _tprintf(_T("Test %d: %s %s\n"), i, status, Tests[i].description); - } - - _tprintf(_T("\nTests succeeded: %d, failed: %d\n"), nsuccess, nfailed); - if(nfailed == 0) - { - _tprintf(_T(" ALL TESTS SUCCESSFUL!\n")); - } -} - -/*******************************************************************************/ - -typedef struct _TESTINFO -{ - PTEST Test; - int secsleft; - HANDLE hTimer; - HANDLE hEvent; - /* additional stuff */ - union - { - struct - { - HANDLE Dummy; - } Test1; - struct - { - HANDLE hWaitEvent; - } Test2; - struct - { - HANDLE hWaitEvent; - HANDLE hNotification; - } Test3; - }; -} TESTINFO, *PTESTINFO; - -VOID CALLBACK TimerCallback1(PVOID Param, BOOLEAN Fired) -{ - PTESTINFO Info = (PTESTINFO)Param; - - _tprintf(_T("[%d]TimerCallback(0x%x, %d) called (%d)\n"), (int)Info->Test->id, (int)Info->hTimer, (int)Fired, --Info->secsleft); - - if(Info->secsleft == 0) - { - BOOL stat; - - _tprintf(_T("[%d]Timout finished, delete timer queue..."), (int)Info->Test->id); - stat = DeleteTimerQueueTimer(NULL, Info->hTimer, NULL); - if(stat) - _tprintf(_T("returned OK -> test FAILED!\n")); - else - { - int error = GetLastError(); - - switch(error) - { - case ERROR_IO_PENDING: - _tprintf(_T("OK, Overlapped I/O operation in progress\n")); - /* this test is only successful in this case */ - Info->Test->Result = TRUE; - break; - default: - _tprintf(_T("Failed, LastError: %d\n"), (int)GetLastError()); - break; - } - } - - /* set the event to continue tests */ - SetEvent(Info->hEvent); - } -} - -VOID Test1(PTEST Test, HANDLE hEvent) -{ - static TESTINFO Info; - - Info.Test = Test; - Info.hEvent = hEvent; - Info.secsleft = N_TIMEOUT; - - if(!CreateTimerQueueTimer(&Info.hTimer, NULL, TimerCallback1, &Info, 1000, 1000, 0)) - { - _tprintf(_T("[%d]CreateTimerQueueTimer() failed, LastError: %d!"), (int)Info.Test->id, (int)GetLastError()); - /* we failed, set the event to continue tests */ - SetEvent(hEvent); - return; - } - - _tprintf(_T("[%d]CreateTimerQueueTimer() created timer 0x%x, countdown (%d sec)...\n"), (int)Info.Test->id, (int)Info.hTimer, (int)Info.secsleft); -} - -/*******************************************************************************/ - -VOID CALLBACK TimerCallback2(PVOID Param, BOOLEAN Fired) -{ - PTESTINFO Info = (PTESTINFO)Param; - - _tprintf(_T("[%d]TimerCallback(0x%x, %d) called (%d)\n"), (int)Info->Test->id, (int)Info->hTimer, (int)Fired, --Info->secsleft); - - if(Info->secsleft == 0) - { - /* set the event to continue tests */ - SetEvent(Info->Test2.hWaitEvent); - - /* sleep a bit */ - Sleep(1500); - } -} - -VOID Test2(PTEST Test, HANDLE hEvent) -{ - static TESTINFO Info; - BOOL stat; - - Info.Test = Test; - Info.hEvent = hEvent; - Info.secsleft = N_TIMEOUT; - - Info.Test2.hWaitEvent = CreateEvent(NULL, FALSE, FALSE, NULL); - if(Info.Test2.hWaitEvent == NULL) - { - _tprintf(_T("[%d]Unable to create event!\n"), (int)Info.Test->id); - return; - } - - if(!CreateTimerQueueTimer(&Info.hTimer, NULL, TimerCallback2, &Info, 1000, 1000, 0)) - { - _tprintf(_T("[%d]CreateTimerQueueTimer() failed, LastError: %d!"), (int)Info.Test->id, (int)GetLastError()); - - CloseHandle(Info.Test2.hWaitEvent); - /* we failed, set the event to continue tests */ - SetEvent(hEvent); - return; - } - - _tprintf(_T("[%d]CreateTimerQueueTimer() created timer 0x%x, countdown (%d sec)...\n"), (int)Test->id, (int)Info.hTimer, (int)Info.secsleft); - - WaitForSingleObject(Info.Test2.hWaitEvent, INFINITE); - - _tprintf(_T("[%d]Timout finished, delete timer queue..."), (int)Test->id); - stat = DeleteTimerQueueTimer(NULL, Info.hTimer, INVALID_HANDLE_VALUE); - if(stat) - { - _tprintf(_T("OK\n")); - /* this test is only successful in this case */ - Test->Result = TRUE; - } - else - { - int error = GetLastError(); - - switch(error) - { - case ERROR_IO_PENDING: - _tprintf(_T("FAILED, Overlapped I/O operation in progress\n")); - break; - default: - _tprintf(_T("Failed, LastError: %d\n"), (int)GetLastError()); - break; - } - } - - SetEvent(Info.hEvent); -} - -/*******************************************************************************/ - -VOID CALLBACK TimerCallback3(PVOID Param, BOOLEAN Fired) -{ - PTESTINFO Info = (PTESTINFO)Param; - - _tprintf(_T("[%d]TimerCallback(0x%x, %d) called (%d)\n"), (int)Info->Test->id, (int)Info->hTimer, (int)Fired, --Info->secsleft); - - if(Info->secsleft == 0) - { - /* set the event to continue tests */ - SetEvent(Info->Test3.hWaitEvent); - - /* sleep a bit */ - Sleep(1500); - } -} - -VOID Test3(PTEST Test, HANDLE hEvent) -{ - static TESTINFO Info; - BOOL stat; - - Info.Test = Test; - Info.hEvent = hEvent; - Info.secsleft = N_TIMEOUT; - - Info.Test3.hWaitEvent = CreateEvent(NULL, FALSE, FALSE, NULL); - if(Info.Test3.hWaitEvent == NULL) - { - _tprintf(_T("[%d]Unable to create event!\n"), (int)Info.Test->id); - return; - } - - Info.Test3.hNotification = CreateEvent(NULL, FALSE, FALSE, NULL); - if(Info.Test3.hNotification == NULL) - { - _tprintf(_T("[%d]Unable to create notification event!\n"), (int)Info.Test->id); - return; - } - - if(!CreateTimerQueueTimer(&Info.hTimer, NULL, TimerCallback3, &Info, 1000, 1000, 0)) - { - _tprintf(_T("[%d]CreateTimerQueueTimer() failed, LastError: %d!"), (int)Info.Test->id, (int)GetLastError()); - - CloseHandle(Info.Test3.hWaitEvent); - CloseHandle(Info.Test3.hNotification); - /* we failed, set the event to continue tests */ - SetEvent(hEvent); - return; - } - - _tprintf(_T("[%d]CreateTimerQueueTimer() created timer 0x%x, countdown (%d sec)...\n"), (int)Test->id, (int)Info.hTimer, (int)Info.secsleft); - - WaitForSingleObject(Info.Test3.hWaitEvent, INFINITE); - - _tprintf(_T("[%d]Timout finished, delete timer queue..."), (int)Test->id); - stat = DeleteTimerQueueTimer(NULL, Info.hTimer, Info.Test3.hNotification); - if(stat) - { - _tprintf(_T("returned OK -> test FAILED!\n")); - } - else - { - int error = GetLastError(); - - switch(error) - { - case ERROR_IO_PENDING: - _tprintf(_T("OK, Overlapped I/O operation in progress\n")); - /* this test is only successful in this case */ - Test->Result = TRUE; - break; - default: - _tprintf(_T("Failed, LastError: %d\n"), (int)GetLastError()); - break; - } - } - - WaitForSingleObject(Info.Test3.hNotification, INFINITE); - - CloseHandle(Info.Test3.hWaitEvent); - CloseHandle(Info.Test3.hNotification); - - SetEvent(Info.hEvent); -} - -/*******************************************************************************/ - -VOID -InitTests(VOID) -{ - ZeroMemory(Tests, sizeof(Tests)); - - Tests[0].description = _T("non-blocking DeleteTimerQueueTimer() call from callback"); - Tests[0].Routine = Test1; - - Tests[1].description = _T("blocking DeleteTimerQueueTimer() call"); - Tests[1].Routine = Test2; - - Tests[2].description = _T("blocking DeleteTimerQueueTimer() call with specified event"); - Tests[2].Routine = Test3; -} - -int main(int argc, char* argv[]) -{ - _tprintf(_T("+++ TimerQueue test running +++\n\n")); - - InitTests(); - - RunTests(); - - _tprintf(_T("\n+++ RESULTS +++\n")); - - PrintTestResults(); - - return 0; -} diff --git a/rostests/tests/tmrqueue/tmrqueue.rbuild b/rostests/tests/tmrqueue/tmrqueue.rbuild deleted file mode 100644 index 67140e61b04..00000000000 --- a/rostests/tests/tmrqueue/tmrqueue.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - tmrqueue.c - diff --git a/rostests/tests/tokentest/tokentest.c b/rostests/tests/tokentest/tokentest.c deleted file mode 100644 index 7c042821ee0..00000000000 --- a/rostests/tests/tokentest/tokentest.c +++ /dev/null @@ -1,524 +0,0 @@ -#define UNICODE -#define _UNICODE - -#define ANONYMOUSUNIONS -#include -#include - -#define NTOS_MODE_USER -#include - - -#define INCLUDE_THE_DDK_HEADERS -#ifdef INCLUDE_THE_DDK_HEADERS -#include -#define ROS_ACE_HEADER ACE_HEADER -#define ROS_ACE ACE - -#else -typedef LONG NTSTATUS, *PNTSTATUS; - -typedef struct _UNICODE_STRING -{ - USHORT Length; - USHORT MaximumLength; - PWSTR Buffer; -} UNICODE_STRING, *PUNICODE_STRING; - -typedef struct _OBJECT_ATTRIBUTES { - ULONG Length; - HANDLE RootDirectory; - PUNICODE_STRING ObjectName; - ULONG Attributes; - PVOID SecurityDescriptor; // Points to type SECURITY_DESCRIPTOR - PVOID SecurityQualityOfService; // Points to type SECURITY_QUALITY_OF_SERVICE -} OBJECT_ATTRIBUTES; -typedef OBJECT_ATTRIBUTES *POBJECT_ATTRIBUTES; - -typedef struct _ROS_ACE_HEADER -{ - CHAR AceType; - CHAR AceFlags; - USHORT AceSize; -} ROS_ACE_HEADER, *PROS_ACE_HEADER; - -typedef struct -{ - ACE_HEADER Header; - ACCESS_MASK AccessMask; -} ROS_ACE, *PROS_ACE; - -NTSYSAPI -NTSTATUS -NTAPI -RtlConvertSidToUnicodeString ( - IN OUT PUNICODE_STRING String, - IN PSID Sid, - IN BOOLEAN AllocateString - ); - -NTSYSAPI -NTSTATUS -NTAPI -RtlCreateAcl( - PACL Acl, - ULONG AclSize, - ULONG AclRevision); - -NTSYSAPI -NTSTATUS -NTAPI -RtlAddAccessAllowedAce ( - PACL Acl, - ULONG Revision, - ACCESS_MASK AccessMask, - PSID Sid - ); - -NTSYSAPI -NTSTATUS -NTAPI -RtlGetAce ( - PACL Acl, - ULONG AceIndex, - PROS_ACE *Ace - ); - -NTSYSAPI -NTSTATUS -NTAPI -ZwAllocateLocallyUniqueId( - OUT PLUID Luid - ); - -NTSYSAPI -NTSTATUS -NTAPI -ZwCreateToken( - OUT PHANDLE TokenHandle, - IN ACCESS_MASK DesiredAccess, - IN POBJECT_ATTRIBUTES ObjectAttributes, - IN TOKEN_TYPE TokenType, - IN PLUID AuthenticationId, - IN PLARGE_INTEGER ExpirationTime, - IN PTOKEN_USER TokenUser, - IN PTOKEN_GROUPS TokenGroups, - IN PTOKEN_PRIVILEGES TokenPrivileges, - IN PTOKEN_OWNER TokenOwner, - IN PTOKEN_PRIMARY_GROUP TokenPrimaryGroup, - IN PTOKEN_DEFAULT_DACL TokenDefaultDacl, - IN PTOKEN_SOURCE TokenSource - ); -#define NT_SUCCESS(StatCode) ((NTSTATUS)(StatCode) >= 0) -#endif - -#include - -#define INITIAL_PRIV_ENABLED SE_PRIVILEGE_ENABLED_BY_DEFAULT|SE_PRIVILEGE_ENABLED -#define INITIAL_PRIV_DISABLED 0 -LUID_AND_ATTRIBUTES InitialPrivilegeSet[] = -{ - { { 0x00000007, 0x00000000 }, INITIAL_PRIV_ENABLED }, // SeTcbPrivilege - { { 0x00000002, 0x00000000 }, INITIAL_PRIV_DISABLED }, // SeCreateTokenPrivilege - { { 0x00000009, 0x00000000 }, INITIAL_PRIV_DISABLED }, // SeTakeOwnershipPrivilege - { { 0x0000000f, 0x00000000 }, INITIAL_PRIV_ENABLED }, // SeCreatePagefilePrivilege - { { 0x00000004, 0x00000000 }, INITIAL_PRIV_ENABLED }, // SeLockMemoryPrivilege - { { 0x00000003, 0x00000000 }, INITIAL_PRIV_DISABLED }, // SeAssignPrimaryTokenPrivilege - { { 0x00000005, 0x00000000 }, INITIAL_PRIV_DISABLED }, // SeIncreaseQuotaPrivilege - { { 0x0000000e, 0x00000000 }, INITIAL_PRIV_ENABLED }, // SeIncreaseBasePriorityPrivilege - { { 0x00000010, 0x00000000 }, INITIAL_PRIV_ENABLED }, // SeCreatePermanentPrivilege - { { 0x00000014, 0x00000000 }, INITIAL_PRIV_ENABLED }, // SeDebugPrivilege - { { 0x00000015, 0x00000000 }, INITIAL_PRIV_ENABLED }, // SeAuditPrivilege - { { 0x00000008, 0x00000000 }, INITIAL_PRIV_DISABLED }, // SeSecurityPrivilege - { { 0x00000016, 0x00000000 }, INITIAL_PRIV_DISABLED }, // SeSystemEnvironmentPrivilege - { { 0x00000017, 0x00000000 }, INITIAL_PRIV_ENABLED }, // SeChangeNotifyPrivilege - { { 0x00000011, 0x00000000 }, INITIAL_PRIV_DISABLED }, // SeBackupPrivilege - { { 0x00000012, 0x00000000 }, INITIAL_PRIV_DISABLED }, // SeRestorePrivilege - { { 0x00000013, 0x00000000 }, INITIAL_PRIV_DISABLED }, // SeShutdownPrivilege - { { 0x0000000a, 0x00000000 }, INITIAL_PRIV_DISABLED }, // SeLoadDriverPrivilege - { { 0x0000000d, 0x00000000 }, INITIAL_PRIV_ENABLED }, // SeProfileSingleProcessPrivilege - { { 0x0000000c, 0x00000000 }, INITIAL_PRIV_DISABLED }, // SeSystemtimePrivilege - { { 0x00000019, 0x00000000 }, INITIAL_PRIV_DISABLED }, // SeUndockPrivilege - { { 0x0000001c, 0x00000000 }, INITIAL_PRIV_DISABLED }, // SeManageVolumePrivilege -}; - -typedef struct _SID_2 -{ - UCHAR Revision; - UCHAR SubAuthorityCount; - SID_IDENTIFIER_AUTHORITY IdentifierAuthority; - ULONG SubAuthority[2]; -} SID_2; - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -void -PrintSid(SID_AND_ATTRIBUTES* pSid, TOKEN_OWNER* pOwner, TOKEN_PRIMARY_GROUP* pPrimary) -{ - UNICODE_STRING scSid; - - RtlConvertSidToUnicodeString(&scSid, pSid->Sid, TRUE); - printf("%wZ [", &scSid); - LocalFree(scSid.Buffer); - - if ( EqualSid(pSid->Sid, pOwner->Owner) ) - printf("owner,"); - - if ( EqualSid(pSid->Sid, pPrimary->PrimaryGroup) ) - printf("primary,"); - - if ( pSid->Attributes & SE_GROUP_ENABLED ) - { - if ( pSid->Attributes & SE_GROUP_ENABLED_BY_DEFAULT ) - printf("enabled-default,"); - else - printf("enabled,"); - } - - if ( pSid->Attributes & SE_GROUP_LOGON_ID ) - printf("logon,"); - - - if ( pSid->Attributes & SE_GROUP_MANDATORY ) - printf("mandatory,"); - - printf("]\n"); -} - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -void -DisplayTokenSids(TOKEN_USER* pUser, - TOKEN_GROUPS* pGroups, - TOKEN_OWNER* pOwner, - TOKEN_PRIMARY_GROUP* pPrimary) -{ - DWORD i; - - printf("\nSids:\n"); - PrintSid(&pUser->User, pOwner, pPrimary); - printf("\nGroups:\n"); - for (i = 0; i < pGroups->GroupCount; i++) - PrintSid(&pGroups->Groups[i], pOwner, pPrimary); -} - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -void -DisplayTokenPrivileges(TOKEN_PRIVILEGES* pPriv) -{ - WCHAR buffer[256]; - DWORD i; - - printf("\nprivileges:\n"); - for (i = 0; i < pPriv->PrivilegeCount; i++) - { - DWORD cbName = sizeof(buffer) / sizeof(buffer[0]); - LookupPrivilegeName(0, &pPriv->Privileges[i].Luid, buffer, &cbName); - - printf("%S{0x%08x, 0x%08x} [", buffer, pPriv->Privileges[i].Luid.HighPart, pPriv->Privileges[i].Luid.LowPart); - - if ( pPriv->Privileges[i].Attributes & SE_PRIVILEGE_ENABLED ) - printf("enabled,"); - if ( pPriv->Privileges[i].Attributes & SE_PRIVILEGE_ENABLED_BY_DEFAULT ) - printf("default,"); - if ( pPriv->Privileges[i].Attributes & SE_PRIVILEGE_USED_FOR_ACCESS ) - printf("used"); - - printf("]\n"); - } -} - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -void -DisplayDacl(PACL pAcl) -{ - DWORD i; - NTSTATUS status; - - if ( ! pAcl ) - { - printf("\nNo Default Dacl.\n"); - return; - } - - printf("\nDacl:\n"); - for (i = 0; i < pAcl->AceCount; i++) - { - UNICODE_STRING scSid; - ROS_ACE* pAce; - LPWSTR wszType = 0; - PSID pSid; - - status = RtlGetAce(pAcl, i, (ROS_ACE**) &pAce); - if ( ! NT_SUCCESS(status) ) - { - printf("RtlGetAce(): status = 0x%08x\n", status); - break; - } - - pSid = (PSID) (pAce + 1); - if ( pAce->Header.AceType == ACCESS_ALLOWED_ACE_TYPE ) - wszType = L"allow"; - if ( pAce->Header.AceType == ACCESS_DENIED_ACE_TYPE ) - wszType = L"deny "; - - status = RtlConvertSidToUnicodeString(&scSid, pSid, TRUE); - if ( ! NT_SUCCESS(status) ) - { - printf("RtlConvertSidToUnicodeString(): status = 0x%08x\n", status); - break; - } - - printf("%d.) %S %wZ 0x%08x\n", i, wszType, &scSid, pAce->AccessMask); - LocalFree(scSid.Buffer); - } -} - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -PVOID -GetFromToken(HANDLE hToken, TOKEN_INFORMATION_CLASS tic) -{ - BOOL bResult; - DWORD n; - PBYTE p = 0; - - bResult = GetTokenInformation(hToken, tic, 0, 0, &n); - if ( ! bResult && GetLastError() != ERROR_INSUFFICIENT_BUFFER) - return 0; - - p = (PBYTE) malloc(n); - if ( ! GetTokenInformation(hToken, tic, p, n, &n) ) - { - printf("GetFromToken() failed for TOKEN_INFORMATION_CLASS(%d): %d\n", tic, GetLastError()); - free(p); - return 0; - } - - return p; -} - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -void -DisplayToken(HANDLE hTokenSource) -{ - TOKEN_USER* pTokenUser = (PTOKEN_USER) GetFromToken(hTokenSource, TokenUser); - TOKEN_GROUPS* pTokenGroups = (PTOKEN_GROUPS) GetFromToken(hTokenSource, TokenGroups); - TOKEN_OWNER* pTokenOwner = (PTOKEN_OWNER) GetFromToken(hTokenSource, TokenOwner); - TOKEN_PRIMARY_GROUP* pTokenPrimaryGroup = (PTOKEN_PRIMARY_GROUP) GetFromToken(hTokenSource, TokenPrimaryGroup); - TOKEN_PRIVILEGES* pTokenPrivileges = (PTOKEN_PRIVILEGES) GetFromToken(hTokenSource, TokenPrivileges); - TOKEN_DEFAULT_DACL* pTokenDefaultDacl = (PTOKEN_DEFAULT_DACL) GetFromToken(hTokenSource, TokenDefaultDacl); - - DisplayTokenSids(pTokenUser, pTokenGroups, pTokenOwner, pTokenPrimaryGroup); - // DisplayTokenPrivileges(pTokenPrivileges); - DisplayDacl(pTokenDefaultDacl->DefaultDacl); - - free(pTokenUser); - free(pTokenGroups); - free(pTokenOwner); - free(pTokenPrimaryGroup); - free(pTokenPrivileges); - free(pTokenDefaultDacl); -} - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -BOOL -EnablePrivilege(LPWSTR wszName) -{ - HANDLE hToken; - TOKEN_PRIVILEGES priv = {1, {{{0, 0}, SE_PRIVILEGE_ENABLED}}}; - BOOL bResult; - - LookupPrivilegeValue(0, wszName, &priv.Privileges[0].Luid); - - OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken); - - AdjustTokenPrivileges(hToken, FALSE, &priv, sizeof priv, 0, 0); - bResult = GetLastError() == ERROR_SUCCESS; - - CloseHandle(hToken); - return bResult; -} - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -NTSTATUS -CreateInitialSystemToken(HANDLE* phSystemToken) -{ - static SID sidSystem = { 1, 1, {SECURITY_NT_AUTHORITY}, {SECURITY_LOCAL_SYSTEM_RID} }; - static SID sidEveryone = { 1, 1, {SECURITY_WORLD_SID_AUTHORITY}, {SECURITY_WORLD_RID} }; - static SID sidAuthenticatedUser = { 1, 1, {SECURITY_NT_AUTHORITY}, {SECURITY_AUTHENTICATED_USER_RID} }; - static SID_2 sidAdministrators = { 1, 2, {SECURITY_NT_AUTHORITY}, {SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS} }; - static const int nGroupCount = 3; - - NTSTATUS status; - ULONG uSize; - DWORD i; - - TOKEN_USER tkUser; - TOKEN_OWNER tkDefaultOwner; - TOKEN_PRIMARY_GROUP tkPrimaryGroup; - - TOKEN_GROUPS* ptkGroups = 0; - TOKEN_PRIVILEGES* ptkPrivileges = 0; - TOKEN_DEFAULT_DACL tkDefaultDacl = { 0 }; - - LARGE_INTEGER tkExpiration; - - LUID authId = SYSTEM_LUID; - - TOKEN_SOURCE source = - { - { '*', '*', 'A', 'N', 'O', 'N', '*', '*' }, - {0, 0} - }; - - SECURITY_QUALITY_OF_SERVICE sqos = - { - sizeof(sqos), - SecurityAnonymous, - SECURITY_STATIC_TRACKING, - FALSE - }; - - OBJECT_ATTRIBUTES oa = - { - sizeof(oa), - 0, - 0, - 0, - 0, - &sqos - }; - - tkExpiration.QuadPart = -1; - status = ZwAllocateLocallyUniqueId(&source.SourceIdentifier); - if ( status != 0 ) - return status; - - tkUser.User.Sid = &sidSystem; - tkUser.User.Attributes = 0; - - // Under WinXP (the only MS OS I've tested) ZwCreateToken() - // squawks if we use sidAdministrators here -- though running - // a progrem under AT and using the DisplayToken() function - // shows that the system token does default ownership to - // Administrator. - - // For now, default ownership to system, since that works - tkDefaultOwner.Owner = &sidSystem; - tkPrimaryGroup.PrimaryGroup = &sidSystem; - - uSize = sizeof(TOKEN_GROUPS) - sizeof(ptkGroups->Groups); - uSize += sizeof(SID_AND_ATTRIBUTES) * nGroupCount; - - ptkGroups = (TOKEN_GROUPS*) malloc(uSize); - ptkGroups->GroupCount = nGroupCount; - - ptkGroups->Groups[0].Sid = (SID*) &sidAdministrators; - ptkGroups->Groups[0].Attributes = SE_GROUP_ENABLED; - - ptkGroups->Groups[1].Sid = &sidEveryone; - ptkGroups->Groups[1].Attributes = SE_GROUP_ENABLED|SE_GROUP_ENABLED_BY_DEFAULT|SE_GROUP_MANDATORY; - - ptkGroups->Groups[2].Sid = &sidAuthenticatedUser; - ptkGroups->Groups[2].Attributes = SE_GROUP_ENABLED|SE_GROUP_ENABLED_BY_DEFAULT|SE_GROUP_MANDATORY; - - uSize = sizeof(TOKEN_PRIVILEGES) - sizeof(ptkPrivileges->Privileges); - uSize += sizeof(LUID_AND_ATTRIBUTES) * sizeof(InitialPrivilegeSet) / sizeof(InitialPrivilegeSet[0]); - ptkPrivileges = (TOKEN_PRIVILEGES*) malloc(uSize); - ptkPrivileges->PrivilegeCount = sizeof(InitialPrivilegeSet) / sizeof(InitialPrivilegeSet[0]); - for (i = 0; i < ptkPrivileges->PrivilegeCount; i++) - { - ptkPrivileges->Privileges[i].Luid.HighPart = InitialPrivilegeSet[i].Luid.HighPart; - ptkPrivileges->Privileges[i].Luid.LowPart = InitialPrivilegeSet[i].Luid.LowPart; - ptkPrivileges->Privileges[i].Attributes = InitialPrivilegeSet[i].Attributes; - } - - // Calculate the length needed for the ACL - uSize = sizeof(ACL); - uSize += sizeof(ACE) + sizeof(sidSystem); - uSize += sizeof(ACE) + sizeof(sidAdministrators); - uSize = (uSize & (~3)) + 8; - tkDefaultDacl.DefaultDacl = (PACL) malloc(uSize); - - status = RtlCreateAcl(tkDefaultDacl.DefaultDacl, uSize, ACL_REVISION); - if ( ! NT_SUCCESS(status) ) - printf("RtlCreateAcl() failed: 0x%08x\n", status); - - status = RtlAddAccessAllowedAce(tkDefaultDacl.DefaultDacl, ACL_REVISION, GENERIC_ALL, &sidSystem); - if ( ! NT_SUCCESS(status) ) - printf("RtlAddAccessAllowedAce() failed: 0x%08x\n", status); - - status = RtlAddAccessAllowedAce(tkDefaultDacl.DefaultDacl, ACL_REVISION, GENERIC_READ|GENERIC_EXECUTE|READ_CONTROL, (PSID) &sidAdministrators); - if ( ! NT_SUCCESS(status) ) - printf("RtlAddAccessAllowedAce() failed: 0x%08x\n", status); - - printf("Parameters being passed into ZwCreateToken:\n\n"); - DisplayTokenSids(&tkUser, ptkGroups, &tkDefaultOwner, &tkPrimaryGroup); - DisplayDacl(tkDefaultDacl.DefaultDacl); - - printf("Calling ZwCreateToken()...\n"); - status = ZwCreateToken(phSystemToken, - TOKEN_ALL_ACCESS, - &oa, - TokenPrimary, - &authId, - &tkExpiration, - &tkUser, - ptkGroups, - ptkPrivileges, - &tkDefaultOwner, - &tkPrimaryGroup, - &tkDefaultDacl, - &source); - - // Cleanup - free(ptkGroups); - free(ptkPrivileges); - free(tkDefaultDacl.DefaultDacl); - - return status; -} - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -int -main(int argc, char* argv[]) -{ - NTSTATUS Status; - HANDLE hSystemToken; - CHAR buffer[512]; - HANDLE hOurToken; - - printf("Current process Token:\n"); - - Status=ZwOpenProcessToken(GetCurrentProcess(), TOKEN_QUERY|TOKEN_QUERY_SOURCE, &hOurToken); - if ( NT_SUCCESS(Status) ) - { - DisplayToken(hOurToken); - CloseHandle(hOurToken); - } - else - { - printf("ZwOpenProcessToken() failed: 0x%08x\n", Status); - } - -//#define ENABLE_PRIVILEGE -#ifdef ENABLE_PRIVILEGE - EnablePrivilege(SE_CREATE_TOKEN_NAME); -#endif - - // Now do the other one - Status = CreateInitialSystemToken(&hSystemToken); - if ( NT_SUCCESS(Status) ) - { - printf("System Token: 0x%08x\n", hSystemToken); - DisplayToken(hSystemToken); - CloseHandle(hSystemToken); - } - else - { - printf("CreateInitialSystemToken() return: 0x%08x\n", Status); - } - - printf("press return"); - gets(buffer); - - return 0; -} diff --git a/rostests/tests/tokentest/tokentest.rbuild b/rostests/tests/tokentest/tokentest.rbuild deleted file mode 100644 index 5d4ed10de95..00000000000 --- a/rostests/tests/tokentest/tokentest.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - tokentest.c - diff --git a/rostests/tests/txtscale/mk_font.cpp b/rostests/tests/txtscale/mk_font.cpp deleted file mode 100644 index 650fdfe4277..00000000000 --- a/rostests/tests/txtscale/mk_font.cpp +++ /dev/null @@ -1,69 +0,0 @@ - -// ------------------------------------------------------------------ -// Windows 2000 Graphics API Black Book -// Chapter 4 - Utility functions -// -// Created by Damon Chandler -// Updates can be downloaded at: -// -// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu -// if you have any questions about this code. -// ------------------------------------------------------------------ - -//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -#include -#include - -#include "mk_font.h" -//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - -namespace font { - -// creates a logical font -HFONT MakeFont( - IN HDC hDestDC, // handle to target DC - IN LPCSTR typeface_name, // font's typeface name - IN int point_size, // font's point size - IN const BYTE charset, // font's character set - IN const DWORD style // font's styles - ) -{ - // - // NOTE: On Windows 9x/Me, GetWorldTransform is not - // supported. For compatibility with these platforms you - // should initialize the XFORM::eM22 data member to 1.0. - // - XFORM xf = {0, 0, 0, 1.0, 0, 0}; - GetWorldTransform(hDestDC, &xf); - int pixels_per_inch = GetDeviceCaps(hDestDC, LOGPIXELSY); - - POINT PSize = { - 0, - -MulDiv(static_cast(xf.eM22 * point_size + 0.5), - pixels_per_inch, 72) - }; - - HFONT hResult = NULL; - if (DPtoLP(hDestDC, &PSize, 1)) - { - LOGFONT lf; - memset(&lf, 0, sizeof(LOGFONT)); - - lf.lfHeight = PSize.y; - lf.lfCharSet = charset; - lstrcpyn(reinterpret_cast(&lf.lfFaceName), - typeface_name, LF_FACESIZE); - - lf.lfWeight = (style & FS_BOLD) ? FW_BOLD : FW_DONTCARE; - lf.lfItalic = (style & FS_ITALIC) ? true : false; - lf.lfUnderline = (style & FS_UNDERLINE) ? true : false; - lf.lfStrikeOut = (style & FS_STRIKEOUT) ? true : false; - - // create the logical font - hResult = CreateFontIndirect(&lf); - } - return hResult; -} -//------------------------------------------------------------------------- - -} // namespace font diff --git a/rostests/tests/txtscale/mk_font.h b/rostests/tests/txtscale/mk_font.h deleted file mode 100644 index b84f8942f65..00000000000 --- a/rostests/tests/txtscale/mk_font.h +++ /dev/null @@ -1,39 +0,0 @@ - -// ------------------------------------------------------------------ -// Windows 2000 Graphics API Black Book -// Chapter 4 - Utility functions -// -// Created by Damon Chandler -// Updates can be downloaded at: -// -// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu -// if you have any questions about this code. -// ------------------------------------------------------------------ - -//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -#ifndef CH4_UTILS_H -#define CH4_UTILS_H - -#include -//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - -// change namespace name appropriately to suit your needs -namespace font { - -// font options -static const ULONG FS_NONE = 0x00000000; -static const ULONG FS_BOLD = 0x00000001; -static const ULONG FS_ITALIC = 0x00000002; -static const ULONG FS_UNDERLINE = 0x00000004; -static const ULONG FS_STRIKEOUT = 0x00000008; - -// creates a logical font -HFONT MakeFont(IN HDC hDestDC, IN LPCSTR typeface_name, - IN int point_size, IN const BYTE charset = ANSI_CHARSET, - IN const DWORD style = FS_NONE); - -} - -//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -#endif // CH4_UTILS_H -//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< diff --git a/rostests/tests/txtscale/txtscale.cpp b/rostests/tests/txtscale/txtscale.cpp deleted file mode 100644 index 8c86dc29c98..00000000000 --- a/rostests/tests/txtscale/txtscale.cpp +++ /dev/null @@ -1,266 +0,0 @@ - -// ------------------------------------------------------------------ -// Windows 2000 Graphics API Black Book -// Chapter 8 - Listing 8.1 (Scaled Text Demo) -// -// Created by Damon Chandler -// Updates can be downloaded at: -// -// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu -// if you have any questions about this code. -// ------------------------------------------------------------------ - - -//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -#include -#include -#include - -// for the MakeFont() function... -#include "mk_font.h" -//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - - -HINSTANCE hInst; -const char* WndClassName = "GMainWnd"; -LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam, - LPARAM LParam); - - -int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR, - int nCmdShow) -{ - hInst = hInstance; - - WNDCLASS wc; - memset(&wc, 0, sizeof(WNDCLASS)); - - wc.style = CS_HREDRAW | CS_VREDRAW; - wc.lpszClassName = WndClassName; - wc.lpfnWndProc = MainWndProc; - wc.hInstance = hInst; - wc.hCursor = LoadCursor(NULL, IDC_ARROW); - wc.hbrBackground = reinterpret_cast( - COLOR_BTNFACE + 1 - ); - - if (RegisterClass(&wc)) - { - HWND hWnd = - CreateWindow( - WndClassName, TEXT("Scaled Text Demo"), - WS_OVERLAPPEDWINDOW | WS_CAPTION | - WS_VISIBLE | WS_CLIPCHILDREN, - CW_USEDEFAULT, CW_USEDEFAULT, 800, 300, - NULL, NULL, hInst, NULL - ); - - if (hWnd) - { - ShowWindow(hWnd, nCmdShow); - UpdateWindow(hWnd); - - MSG msg; - while (GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } - } - return 0; -} -//------------------------------------------------------------------------- - - -HWND hTrackBar = NULL; -HFONT hTTFont = NULL; -double scale = 0.0; -LPCSTR pText = TEXT("The Scaled Text!"); - -LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, - LPARAM lParam) -{ - switch (msg) - { - case WM_CREATE: - { - INITCOMMONCONTROLSEX icx; - icx.dwSize = sizeof(INITCOMMONCONTROLSEX); - icx.dwICC = ICC_BAR_CLASSES; - - InitCommonControlsEx(&icx); - - hTrackBar = - CreateWindow( - TRACKBAR_CLASS, "", - TBS_HORZ | TBS_BOTH | TBS_AUTOTICKS | - TBS_FIXEDLENGTH | TBS_ENABLESELRANGE | - WS_CHILD | WS_VISIBLE, - 10, 260, 375, 40, - hWnd, NULL, hInst, NULL - ); - - assert(hTrackBar != NULL); - SNDMSG(hTrackBar, TBM_SETTHUMBLENGTH, 20, 0); - SNDMSG(hTrackBar, TBM_SETRANGEMAX, TRUE, 100); - - // create the TrueType (scalable) font - HDC hDC = GetDC(hWnd); - try - { - // see Chapter 4 for the definition of MakeFont - hTTFont = font::MakeFont(hDC, "Impact", 72); - if (!hTTFont) throw; - } - catch (...) - { - ReleaseDC(hWnd, hDC); - } - ReleaseDC(hWnd, hDC); - break; - } - case WM_HSCROLL: - { - if (reinterpret_cast(lParam) == hTrackBar) - { - // - // adjust the scaling factor according to - // the position of the trackbar's slider - // - scale = static_cast( - (SNDMSG(hTrackBar, TBM_GETPOS, 0, 0) + 1) / 50.0 - ); - InvalidateRect(hWnd, NULL, true); - } - break; - } - case WM_ERASEBKGND: - { - LRESULT res = DefWindowProc(hWnd, msg, wParam, lParam); - - HDC hDC = reinterpret_cast(wParam); - HFONT hOldFont = static_cast( - SelectObject(hDC, hTTFont) - ); - try - { - SetBkMode(hDC, TRANSPARENT); - - // open a path bracket - if (!BeginPath(hDC)) throw; - - // record the text to the path - TextOut(hDC, 10, 10, pText, lstrlen(pText)); - - // close the path bracket and - // select the path into hDC - EndPath(hDC); - - // determine the number of endpoints in the path - const int num_points = GetPath(hDC, NULL, NULL, 0); - if (num_points > 0) - { - // make room for the POINTs and vertex types - POINT* pPEnds = new POINT[num_points]; - unsigned char* pTypes = new unsigned char[num_points]; - try - { - // get the path's description - int num_got = GetPath(hDC, pPEnds, pTypes, num_points); - if (num_got > 0) - { - // start a new path bracket - if (!BeginPath(hDC)) throw; - - // scale each point in the description - int iPoint; - for (iPoint = 0; iPoint < num_got; ++iPoint) - { - pPEnds[iPoint].x = static_cast( - scale * pPEnds[iPoint].x + 0.5 - ); - pPEnds[iPoint].y = static_cast( - scale * pPEnds[iPoint].y + 0.5 - ); - } - - for (iPoint = 0; iPoint < num_points; ++iPoint) - { - // handle the MoveToEx case - if (pTypes[iPoint] == PT_MOVETO) - { - MoveToEx( - hDC, pPEnds[iPoint].x, pPEnds[iPoint].y, NULL - ); - } - // handle the LineTo case - else if ( - pTypes[iPoint] == PT_LINETO || - pTypes[iPoint] == (PT_LINETO | PT_CLOSEFIGURE) - ) - { - LineTo(hDC, pPEnds[iPoint].x, pPEnds[iPoint].y); - } - // handle the PolyBezierTo case - else if ( - pTypes[iPoint] == PT_BEZIERTO || - pTypes[iPoint] == (PT_BEZIERTO | PT_CLOSEFIGURE) - ) - { - PolyBezierTo(hDC, pPEnds + iPoint, 3); - iPoint += 2; - } - } - - // close the new path bracket - EndPath(hDC); - - // stroke and fill the new path - StrokeAndFillPath(hDC); - } - } - catch (...) - { - // clean up - delete [] pTypes; - delete [] pPEnds; - throw; - } - // clean up - delete [] pTypes; - delete [] pPEnds; - } - // ... - } - catch (...) - { - SelectObject(hDC, hOldFont); - } - SelectObject(hDC, hOldFont); - return res; - } - case WM_SIZE: - { - MoveWindow( - hTrackBar, - 0, HIWORD(lParam) - 40, LOWORD(lParam), 40, - false - ); - break; - } - case WM_DESTROY: - { - // clean up - DeleteObject(hTTFont); - PostQuitMessage(0); - break; - } - } - return DefWindowProc(hWnd, msg, wParam, lParam); -} -//------------------------------------------------------------------------- - - - - diff --git a/rostests/tests/txtscale/txtscale.rbuild b/rostests/tests/txtscale/txtscale.rbuild deleted file mode 100644 index 3f3af4fbbe3..00000000000 --- a/rostests/tests/txtscale/txtscale.rbuild +++ /dev/null @@ -1,7 +0,0 @@ - - user32 - gdi32 - comctl32 - txtscale.cpp - mk_font.cpp - diff --git a/rostests/tests/vmtest/vmtest.c b/rostests/tests/vmtest/vmtest.c deleted file mode 100644 index d9559282b6b..00000000000 --- a/rostests/tests/vmtest/vmtest.c +++ /dev/null @@ -1,55 +0,0 @@ -#include -#include - -int main() -{ - PBYTE Base; - PVOID Ret; - - Base = VirtualAlloc(NULL, - 1048576, - MEM_RESERVE, - PAGE_READWRITE); - if (Base == NULL) - { - printf("VirtualAlloc failed 1\n"); - } - - Ret = VirtualAlloc(Base + 4096, - 4096, - MEM_COMMIT, - PAGE_READWRITE); - if (Ret == NULL) - { - printf("VirtualAlloc failed 2\n"); - } - - Ret = VirtualAlloc(Base + 12288, - 4096, - MEM_COMMIT, - PAGE_READWRITE); - if (Ret == NULL) - { - printf("VirtualAlloc failed 3\n"); - } - - Ret = VirtualAlloc(Base + 20480, - 4096, - MEM_COMMIT, - PAGE_READWRITE); - if (Ret == NULL) - { - printf("VirtualAlloc failed 4\n"); - } - - Ret = VirtualAlloc(Base + 4096, - 28672, - MEM_RESERVE, - PAGE_READWRITE); - if (Ret == NULL) - { - printf("VirtualAlloc failed 5\n"); - } - return 0; -} - diff --git a/rostests/tests/vmtest/vmtest.rbuild b/rostests/tests/vmtest/vmtest.rbuild deleted file mode 100644 index d4bcf82c3c4..00000000000 --- a/rostests/tests/vmtest/vmtest.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - vmtest.c - diff --git a/rostests/tests/wclickat/wclickat.c b/rostests/tests/wclickat/wclickat.c deleted file mode 100644 index 22e2f97735b..00000000000 --- a/rostests/tests/wclickat/wclickat.c +++ /dev/null @@ -1,686 +0,0 @@ -/*---------------------------------------------------------------------------- -** wclickat.c -** Utilty to send clicks to Wine Windows -** -** See usage() for usage instructions. -** -**--------------------------------------------------------------------------- -** Copyright 2004 Jozef Stefanka for CodeWeavers, Inc. -** Copyright 2005 Dmitry Timoshkov for CodeWeavers, Inc. -** Copyright 2005 Francois Gouget for CodeWeavers, Inc. -** -** 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -** -**--------------------------------------------------------------------------*/ - - -#include -#include -#include -#include - - -#define APP_NAME "wclickat" -#define DEFAULT_DELAY 500 -#define DEFAULT_REPEAT 1000 - -#define ARRAY_LENGTH(array) (sizeof(array)/sizeof((array)[0])) - -static const WCHAR STATIC_CLASS[]={'s','t','a','t','i','c','\0'}; - -/*---------------------------------------------------------------------------- -** Global variables -**--------------------------------------------------------------------------*/ - -#define RC_RUNNING -1 -#define RC_SUCCESS 0 -#define RC_INVALID_ARGUMENTS 1 -#define RC_NODISPLAY 2 -#define RC_TIMEOUT 3 -static int status; - -typedef enum -{ - ACTION_INVALID, - ACTION_FIND, - ACTION_LCLICK, - ACTION_MCLICK, - ACTION_RCLICK -} action_type; -static action_type g_action = ACTION_INVALID; - -static WCHAR* g_window_class = NULL; -static WCHAR* g_window_title = NULL; -static long g_control_id = 0; -static WCHAR* g_control_class = NULL; -static WCHAR* g_control_caption = NULL; -static long g_x = -1; -static long g_y = -1; -static long g_dragto_x = -1; -static long g_dragto_y = -1; -static long g_disabled = 0; - -static long g_delay = DEFAULT_DELAY; -static long g_timeout = 0; -static long g_repeat = 0; -static long g_untildeath = 0; -static UINT timer_id; - - -/* - * Provide some basic debugging support. - */ -#ifdef __GNUC__ -#define __PRINTF_ATTR(fmt,args) __attribute__((format (printf,fmt,args))) -#else -#define __PRINTF_ATTR(fmt,args) -#endif -static int debug_on=0; -static int init_debug() -{ - char* str=getenv("CXTEST_DEBUG"); - if (str && strstr(str, "+wclickat")) - debug_on=1; - return debug_on; -} - -static void cxlog(const char* format, ...) __PRINTF_ATTR(1,2); -static void cxlog(const char* format, ...) -{ - va_list valist; - - if (debug_on) - { - va_start(valist, format); - vfprintf(stderr, format, valist); - va_end(valist); - } -} - -/*---------------------------------------------------------------------------- -** usage -**--------------------------------------------------------------------------*/ -static void usage(void) -{ - fprintf(stderr, "%s - Utility to send clicks to Wine Windows.\n", APP_NAME); - fprintf(stderr, "----------------------------------------------\n"); - fprintf(stderr, "Usage:\n"); - fprintf(stderr, " %s action --winclass class --wintitle title [--timeout ms]\n",APP_NAME); - fprintf(stderr, " %*.*s [--ctrlclas class] [--ctrlcaption caption] [--ctrlid id]\n", strlen(APP_NAME) + 3, strlen(APP_NAME) + 3, ""); - fprintf(stderr, " %*.*s [--position XxY] [--delay ms] [--untildeath] [--repeat ms]\n", strlen(APP_NAME) + 3, strlen(APP_NAME) + 3, ""); - fprintf(stderr, "Where action can be one of:\n"); - fprintf(stderr, " find Find the specified window or control\n"); - fprintf(stderr, " button Send a click with the given X button number\n"); - fprintf(stderr, " click|lclick Synonym for button1 (left click)\n"); - fprintf(stderr, " mclick Synonym for button2 (middle click)\n"); - fprintf(stderr, " rclick Synonym for button3 (right click)\n"); - fprintf(stderr, "\n"); - fprintf(stderr, "The options are as follows:\n"); - fprintf(stderr, " --timeout ms How long to wait before failing with a code of %d\n", RC_TIMEOUT); - fprintf(stderr, " --winclass class Class name of the top-level window of interest\n"); - fprintf(stderr, " --wintitle title Title of the top-level window of interest\n"); - fprintf(stderr, " --ctrlclass name Class name of the control of interest, if any\n"); - fprintf(stderr, " --ctrlcaption cap A substring of the control's caption\n"); - fprintf(stderr, " --ctrlid id Id of the control\n"); - fprintf(stderr, " --position XxY Coordinates for the click, relative to the window / control\n"); - fprintf(stderr, " --dragto If given, then position specifies start click, and\n"); - fprintf(stderr, " dragto specifies release coords.\n"); - fprintf(stderr, " --allow-disabled Match the window or control even hidden or disabled\n"); - fprintf(stderr, " --delay ms Wait ms milliseconds before clicking. The default is %d\n", DEFAULT_DELAY); - fprintf(stderr, " --untildeath Wait until the window disappears\n"); - fprintf(stderr, " --repeat ms Click every ms milliseconds. The default is %d\n", DEFAULT_REPEAT); - fprintf(stderr, "\n"); - fprintf(stderr, "%s returns %d on success\n", APP_NAME, RC_SUCCESS); - fprintf(stderr, "\n"); - fprintf(stderr, "Environment variable overrides:\n"); - fprintf(stderr, " CXTEST_TIME_MULTIPLE Specifies a floating multiplier applied to any\n"); - fprintf(stderr, " delay and timeout parameters.\n"); -} - -static const WCHAR* my_strstriW(const WCHAR* haystack, const WCHAR* needle) -{ - const WCHAR *h,*n; - WCHAR first; - - if (!*needle) - return haystack; - - /* Special case the first character because - * we will be doing a lot of comparisons with it. - */ - first=towlower(*needle); - needle++; - while (*haystack) - { - while (towlower(*haystack)!=first && *haystack) - haystack++; - - h=haystack+1; - n=needle; - while (towlower(*h)==towlower(*n) && *h) - { - h++; - n++; - } - if (!*n) - return haystack; - haystack++; - } - return NULL; -} - -static BOOL CALLBACK find_control(HWND hwnd, LPARAM lParam) -{ - WCHAR str[1024]; - HWND* pcontrol; - - if (!GetClassNameW(hwnd, str, ARRAY_LENGTH(str)) || - lstrcmpiW(str, g_control_class)) - return TRUE; - - if (g_control_caption) - { - if (!GetWindowTextW(hwnd, str, ARRAY_LENGTH(str)) || - !my_strstriW(str, g_control_caption)) - return TRUE; - } - if (g_control_id && g_control_id != GetWindowLong(hwnd, GWL_ID)) - return TRUE; - - /* Check that the control is visible and active */ - if (!g_disabled) - { - DWORD style = GetWindowStyle(hwnd); - if (!(style & WS_VISIBLE) || (style & WS_DISABLED)) - return TRUE; - } - - pcontrol = (HWND*)lParam; - *pcontrol = hwnd; - return FALSE; -} - -static BOOL CALLBACK find_top_window(HWND hwnd, LPARAM lParam) -{ - WCHAR str[1024]; - HWND* pwindow; - - if (!GetClassNameW(hwnd, str, ARRAY_LENGTH(str)) || - lstrcmpiW(str, g_window_class)) - return TRUE; - - if (!GetWindowTextW(hwnd, str, ARRAY_LENGTH(str)) || - lstrcmpiW(str, g_window_title)) - return TRUE; - - /* Check that the window is visible and active */ - if (!g_disabled) - { - DWORD style = GetWindowStyle(hwnd); - if (!(style & WS_VISIBLE) || (style & WS_DISABLED)) - return TRUE; - } - - /* See if we find the control we want */ - if (g_control_class) - { - HWND control = NULL; - EnumChildWindows(hwnd, find_control, (LPARAM)&control); - if (!control) - return TRUE; - hwnd=control; - } - - pwindow = (HWND*)lParam; - *pwindow = hwnd; - return FALSE; -} - -static HWND find_window() -{ - HWND hwnd; - - hwnd=NULL; - EnumWindows(find_top_window, (LPARAM)&hwnd); - return hwnd; -} - -static void do_click(HWND window, DWORD down, DWORD up) -{ - WINDOWINFO window_info; - long x, y; - - SetForegroundWindow(GetParent(window)); - window_info.cbSize=sizeof(window_info); - GetWindowInfo(window, &window_info); - - /* The calculations below convert the coordinates so they are absolute - * screen coordinates in 'Mickeys' as required by mouse_event. - * In mickeys the screen size is always 65535x65535. - */ - x=window_info.rcWindow.left+g_x; - if (x=window_info.rcWindow.right) - x=(window_info.rcWindow.right+window_info.rcWindow.left)/2; - x=(x << 16)/GetSystemMetrics(SM_CXSCREEN); - - y=window_info.rcWindow.top+g_y; - if (y=window_info.rcWindow.bottom) - y=(window_info.rcWindow.bottom+window_info.rcWindow.top)/2; - y=(y << 16)/GetSystemMetrics(SM_CYSCREEN); - - mouse_event(MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE, x, y, 0, 0); - if (down) { - mouse_event(MOUSEEVENTF_ABSOLUTE | down, x, y, 0, 0); - if ((g_dragto_x > 0) && (g_dragto_y > 0)) { - int i; - long dx, dy; - long step_per_x, step_per_y; - long dragto_x, dragto_y; - - dragto_x=window_info.rcWindow.left+g_dragto_x; - if (dragto_x=window_info.rcWindow.right) - dragto_x=(window_info.rcWindow.right+window_info.rcWindow.left)/2; - dragto_x=(dragto_x << 16)/GetSystemMetrics(SM_CXSCREEN); - - dragto_y=window_info.rcWindow.top+g_dragto_y; - if (dragto_y=window_info.rcWindow.bottom) - dragto_y=(window_info.rcWindow.bottom+window_info.rcWindow.top)/2; - dragto_y=(dragto_y << 16)/GetSystemMetrics(SM_CYSCREEN); - - dx = g_dragto_x - g_x; - dy = g_dragto_y - g_y; - step_per_x = dx / 4; - step_per_y = dy / 4; - for (i = 0; i < 4; i++) { - mouse_event(MOUSEEVENTF_MOVE, step_per_x, step_per_y, 0, 0); - } - x=dragto_x; - y=dragto_y; - } - } - if (up) - mouse_event(MOUSEEVENTF_ABSOLUTE | up, x, y, 0, 0); -} - -static void CALLBACK ClickProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) -{ - HWND window = find_window(); - - if (!window) - { - if (g_untildeath) - { - /* FIXME: The window / control might just be disabled and if - * that's the case we should not exit yet. But I don't expect - * --untildeath to be used at all anyway so fixing this can - * wait until it becomes necessary. - */ - status=RC_SUCCESS; - } - else - cxlog("The window has disappeared!\n"); - return; - } - - switch (g_action) - { - case ACTION_FIND: - /* Nothing to do */ - break; - case ACTION_LCLICK: - cxlog("Sending left click\n"); - do_click(window, MOUSEEVENTF_LEFTDOWN, MOUSEEVENTF_LEFTUP); - break; - case ACTION_MCLICK: - cxlog("Sending middle click\n"); - do_click(window, MOUSEEVENTF_MIDDLEDOWN, MOUSEEVENTF_MIDDLEUP); - break; - case ACTION_RCLICK: - cxlog("Sending right click\n"); - do_click(window, MOUSEEVENTF_RIGHTDOWN, MOUSEEVENTF_RIGHTUP); - default: - fprintf(stderr, "error: unknown action %d\n", g_action); - break; - } - if (!g_repeat) - status=RC_SUCCESS; -} - -static void CALLBACK DelayProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) -{ - KillTimer(NULL, timer_id); - timer_id=0; - if (g_repeat) - { - cxlog("Setting up a timer for --repeat\n"); - timer_id=SetTimer(NULL, 0, g_repeat, ClickProc); - } - - ClickProc(NULL, 0, 0, 0); -} - -static void CALLBACK FindWindowProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) -{ - HWND window = find_window(); - if (!window) - return; - - cxlog("Found the window\n"); - if (g_delay) - { - cxlog("Waiting for a bit\n"); - KillTimer(NULL, timer_id); - timer_id=SetTimer(NULL, 0, g_delay, DelayProc); - do_click(window, 0,0); - } - else - { - DelayProc(NULL, 0, 0, 0); - } -} - -static void CALLBACK TimeoutProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) -{ - status = RC_TIMEOUT; -} - -/*---------------------------------------------------------------------------- -** parse_arguments -**--------------------------------------------------------------------------*/ -static int arg_get_long(const char** *argv, const char* name, long* value) -{ - if (!**argv) - { - fprintf(stderr, "error: missing argument for '%s'\n", name); - return 1; - } - - *value=atol(**argv); - if (*value < 0) - { - fprintf(stderr, "error: invalid argument '%s' for '%s'\n", - **argv, name); - (*argv)++; - return 1; - } - (*argv)++; - return 0; -} - -static int arg_get_utf8(const char** *argv, const char* name, WCHAR* *value) -{ - int len; - - if (!**argv) - { - fprintf(stderr, "error: missing argument for '%s'\n", name); - return 1; - } - - len = MultiByteToWideChar(CP_UTF8, 0, **argv, -1, NULL, 0); - *value = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)); - if (!*value) - { - fprintf(stderr, "error: memory allocation error\n"); - (*argv)++; - return 1; - } - MultiByteToWideChar(CP_UTF8, 0, **argv, -1, *value, len); - (*argv)++; - return 0; -} - -static int parse_arguments(int argc, const char** argv) -{ - int rc; - const char* arg; - char* p; - - rc=0; - argv++; - while (*argv) - { - arg=*argv++; - if (*arg!='-') - { - if (g_action != ACTION_INVALID) - { - fprintf(stderr, "error: '%s' an action has already been specified\n", arg); - rc=1; - } - else if (strcmp(arg, "click") == 0 || strcmp(arg, "lclick") == 0) - { - g_action = ACTION_LCLICK; - } - else if (strcmp(arg, "mclick") == 0) - { - g_action = ACTION_MCLICK; - } - else if (strcmp(arg, "rclick") == 0) - { - g_action = ACTION_RCLICK; - } - else if (strncmp(arg, "button", 6) == 0) - { - int button; - char extra='\0'; - int r=sscanf(arg, "button%d%c", &button, &extra); - /* We should always get r==1 but due to a bug in Wine's - * msvcrt.dll implementation (at least up to 20050127) - * we may also get r==2 and extra=='\0'. - */ - if (r!=1 && (r!=2 || extra!='\0')) - { - fprintf(stderr, "error: invalid argument '%s' for '%s'\n", - *argv, arg); - rc=1; - } - else if (button<1 || button>3) - { - fprintf(stderr, "error: unknown button '%s'\n", arg); - rc=1; - } - else - { - /* Just to remain compatible with the enum */ - g_action=button+ACTION_LCLICK-1; - } - } - else if (strcmp(arg, "find") == 0) - { - g_action = ACTION_FIND; - } - else - { - fprintf(stderr, "error: unknown action '%s'\n", arg); - rc=1; - } - } - else if (strcmp(arg, "--winclass") == 0) - { - rc|=arg_get_utf8(&argv, arg, &g_window_class); - } - else if (strcmp(arg, "--wintitle") == 0) - { - rc|=arg_get_utf8(&argv,arg, &g_window_title); - } - else if (strcmp(arg, "--ctrlclass") == 0) - { - rc|=arg_get_utf8(&argv, arg, &g_control_class); - } - else if (strcmp(arg, "--ctrlid") == 0) - { - rc|=arg_get_long(&argv, arg, &g_control_id); - } - else if (strcmp(arg, "--ctrlcaption") == 0) - { - rc|=arg_get_utf8(&argv, arg, &g_control_caption); - } - else if (strcmp(arg, "--position") == 0) - { - if (!*argv) - { - fprintf(stderr, "error: missing argument for '%s'\n", arg); - rc=1; - } - else - { - char extra='\0'; - int r=sscanf(*argv, "%ldx%ld%c", &g_x, &g_y, &extra); - /* We should always get r==2 but due to a bug in Wine's - * msvcrt.dll implementation (at least up to 20050127) - * we may also get r==3 and extra=='\0'. - */ - if (r!=2 && (r!=3 || extra!='\0')) - { - fprintf(stderr, "error: invalid argument '%s' for '%s'\n", - *argv, arg); - rc=1; - } - argv++; - } - } - else if (strcmp(arg, "--dragto") == 0) - { - if (!*argv) - { - fprintf(stderr, "error: missing argument for '%s'\n", arg); - rc=1; - } - else - { - char extra='\0'; - int r=sscanf(*argv, "%ldx%ld%c", &g_dragto_x, &g_dragto_y, &extra); - /* We should always get r==2 but due to a bug in Wine's - * * msvcrt.dll implementation (at least up to 20050127) - * * we may also get r==3 and extra=='\0'. - * */ - if (r!=2 && (r!=3 || extra!='\0')) - { - fprintf(stderr, "error: invalid argument '%s' for '%s'\n", - *argv, arg); - rc=1; - } - argv++; - } - } - else if (strcmp(arg, "--allow-disabled") == 0) - { - g_disabled = 1; - } - else if (strcmp(arg, "--delay") == 0) - { - rc|=arg_get_long(&argv, arg, &g_delay); - } - else if (strcmp(arg, "--timeout") == 0) - { - rc|=arg_get_long(&argv, arg, &g_timeout); - } - else if (strcmp(arg, "--repeat") == 0) - { - rc|=arg_get_long(&argv, arg, &g_repeat); - } - else if (strcmp(arg, "--untildeath") == 0) - { - g_untildeath=1; - } - else if (strcmp(arg, "--help") == 0) - { - rc=2; - } - } - - if (g_action == ACTION_INVALID) - { - fprintf(stderr, "error: you must specify an action type\n"); - rc=1; - } - else - { - /* Adjust the default delay and repeat parameters depending on - * the operating mode so less needs to be specified on the command - * line, and so we can assume them to be set right. - */ - if (g_action == ACTION_FIND) - g_delay=0; - if (!g_untildeath) - g_repeat=0; - else if (!g_repeat) - g_repeat=DEFAULT_REPEAT; - } - - if (!g_window_class) - { - fprintf(stderr, "error: you must specify a --winclass parameter\n"); - rc=1; - } - if (!g_window_title) - { - fprintf(stderr, "error: you must specify a --wintitle parameter\n"); - rc=1; - } - if (g_control_class) - { - if (!g_control_id && !g_control_caption) - { - fprintf(stderr, "error: you must specify either the control id or its caption\n"); - rc=1; - } - } - - /*------------------------------------------------------------------------ - ** Process environment variables - **----------------------------------------------------------------------*/ - p = getenv("CXTEST_TIME_MULTIPLE"); - if (p) - { - float g_multiple = atof(p); - g_delay = (long) (((float) g_delay) * g_multiple); - g_timeout = (long) (((float) g_timeout) * g_multiple); - } - - return rc; -} - -int main(int argc, const char** argv) -{ - MSG msg; - - init_debug(); - - status = parse_arguments(argc, argv); - if (status) - { - if (status == 2) - usage(); - else - fprintf(stderr, "Issue %s --help for usage.\n", *argv); - return RC_INVALID_ARGUMENTS; - } - cxlog("Entering message loop. action=%d\n", g_action); - - if (g_timeout>0) - SetTimer(NULL, 0, g_timeout, TimeoutProc); - timer_id=SetTimer(NULL, 0, 100, FindWindowProc); - - status=RC_RUNNING; - while (status==RC_RUNNING && GetMessage(&msg, NULL, 0, 0)!=0) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - return status; -} diff --git a/rostests/tests/wclickat/wclickat.rbuild b/rostests/tests/wclickat/wclickat.rbuild deleted file mode 100644 index 17adf0b0233..00000000000 --- a/rostests/tests/wclickat/wclickat.rbuild +++ /dev/null @@ -1,6 +0,0 @@ - - user32 - gdi32 - wclickat.c - - diff --git a/rostests/tests/wcstombs-tests/wcstombs-tests.c b/rostests/tests/wcstombs-tests/wcstombs-tests.c deleted file mode 100644 index 012d37e7d96..00000000000 --- a/rostests/tests/wcstombs-tests/wcstombs-tests.c +++ /dev/null @@ -1,369 +0,0 @@ -/* - * PROJECT: ReactOS wcstombs Test Suite - * LICENSE: GPL v2 or any later version - * FILE: tests/wcstombs-tests/wcstombs-tests.c - * PURPOSE: Application for testing the CRT API's (wcstombs and wctomb) and the Win32 API WideCharToMultiByte for the Unicode to MultiByte string conversion - * COPYRIGHT: Copyright 2008 Colin Finck - */ - -#include -#include -#include -#include -#include - -/* Macros for simplification */ -#define SETLOCALE(locale) \ - loc = setlocale(LC_ALL, locale); \ - if(!loc) \ - { \ - puts("setlocale failed for " locale ", this locale is probably not installed on your system"); \ - return; \ - } - -#define OK(condition, fail_message, ...) \ - if(!(condition)) \ - printf("%d: " fail_message "\n", __LINE__, ##__VA_ARGS__); - -/* Global variables for easier handling */ -char mbc; -char mbs[5]; -int ret; -wchar_t wc1 = 228; /* Western Windows-1252 character */ -wchar_t wc2 = 1088; /* Russian Windows-1251 character not displayable for Windows-1252 */ -wchar_t wcs[5] = {'T', 'h', 1088, 'i', 0}; /* String with ASCII characters and a Russian character */ -wchar_t dbwcs[3] = {28953, 25152, 0}; /* String with Chinese (codepage 950) characters */ - - -void CRT_Tests() -{ - char* loc; - - puts("CRT-Tests"); - puts("---------"); - - /* Current locale is "C", wcstombs should return the length of the input buffer without the terminating null character */ - ret = wcstombs(NULL, dbwcs, 0); - OK(ret == 2, "ret is %d", ret); - - ret = wcstombs(mbs, dbwcs, ret); - OK(ret == -1, "ret is %d", ret); - OK(mbs[0] == 0, "mbs[0] is %d", mbs[0]); - OK(errno == EILSEQ, "errno is %d", errno); - - ret = wcstombs(NULL, wcs, 0); - OK(ret == 4, "ret is %d", ret); - - ret = wcstombs(mbs, wcs, ret); - OK(ret == -1, "ret is %d", ret); - OK(!strcmp(mbs, "Th"), "mbs is %s", mbs); - OK(errno == EILSEQ, "errno is %d", errno); - - ret = wctomb(&mbc, wcs[0]); - OK(ret == 1, "ret is %d", ret); - OK(mbc == 84, "mbc is %d", mbc); - - mbc = 84; - ret = wcstombs(&mbc, &dbwcs[0], 1); - OK(ret == -1, "ret is %d", ret); - OK(mbc == 84, "mbc is %d", mbc); - - ret = wcstombs(mbs, wcs, 0); - OK(ret == 0, "ret is %d", ret); - - /* The length for the null character (in any locale) is 0, but if you pass a variable, it will be set to 0 and wctomb returns 1 */ - ret = wctomb(NULL, 0); - OK(ret == 0, "ret is %d", ret); - - ret = wctomb(&mbc, 0); - OK(ret == 1, "ret is %d", ret); - OK(mbc == 0, "mbc is %d", mbc); - - /* msvcr80.dll and later versions of CRT change mbc in the following call back to 0, msvcrt.dll from WinXP SP2 leaves it untouched */ - mbc = 84; - ret = wctomb(&mbc, dbwcs[0]); - OK(ret == -1, "ret is %d", ret); - OK(errno == EILSEQ, "errno is %d", errno); - OK(mbc == 84, "mbc is %d", mbc); - - /* With a real locale, -1 also becomes a possible return value in case of an invalid character */ - SETLOCALE("German"); - ret = wcstombs(NULL, dbwcs, 0); - OK(ret == -1, "ret is %d", ret); - OK(errno == EILSEQ, "errno is %d", errno); - - ret = wcstombs(NULL, wcs, 2); - OK(ret == -1, "ret is %d", ret); - OK(errno == EILSEQ, "errno is %d", errno); - - /* Test if explicitly setting the locale back to "C" also leads to the same results as above */ - SETLOCALE("C"); - - ret = wcstombs(NULL, dbwcs, 0); - OK(ret == 2, "ret is %d", ret); - - ret = wcstombs(NULL, wcs, 0); - OK(ret == 4, "ret is %d", ret); - - /* Test wctomb() as well */ - SETLOCALE("English"); - - ret = wctomb(&mbc, wc1); - OK(ret == 1, "ret is %d", ret); - OK(mbc == -28, "mbc is %d", mbc); - - ret = wctomb(&mbc, wc2); - OK(ret == -1, "ret is %d", ret); - OK(errno == EILSEQ, "errno is %d", errno); - OK(mbc == 63, "mbc is %d", mbc); - - SETLOCALE("Russian"); - - ret = wcstombs(mbs, wcs, sizeof(mbs)); - OK(ret == 4, "ret is %d", ret); - OK(!strcmp(mbs, "Thði"), "mbs is %s", mbs); - - ret = wctomb(&mbc, wc2); - OK(ret == 1, "ret is %d", ret); - OK(mbc == -16, "mbc is %d", mbc); - - ret = wctomb(&mbc, wc1); - OK(ret == 1, "ret is %d", ret); - OK(mbc == 97, "mbc is %d", mbc); - - SETLOCALE("English"); - - ret = wcstombs(&mbc, wcs, 1); - OK(ret == 1, "ret is %d", ret); - OK(mbc == 84, "mbc is %d", mbc); - - ZeroMemory(mbs, sizeof(mbs)); - ret = wcstombs(mbs, wcs, sizeof(mbs)); - OK(ret == -1, "ret is %d", ret); - OK(errno == EILSEQ, "errno is %d", errno); - OK(!strcmp(mbs, "Th?i"), "mbs is %s", mbs); - mbs[0] = 0; - - /* wcstombs mustn't add any null character automatically. - So in this case, we should get the same string again, even if we only copied the first three bytes. */ - ret = wcstombs(mbs, wcs, 3); - OK(ret == -1, "ret is %d", ret); - OK(errno == EILSEQ, "errno is %d", errno); - OK(!strcmp(mbs, "Th?i"), "mbs is %s", mbs); - ZeroMemory(mbs, 5); - - /* Now this shouldn't be the case like above as we zeroed the complete string buffer. */ - ret = wcstombs(mbs, wcs, 3); - OK(ret == -1, "ret is %d", ret); - OK(errno == EILSEQ, "errno is %d", errno); - OK(!strcmp(mbs, "Th?"), "mbs is %s", mbs); - - /* Double-byte tests */ - SETLOCALE("Chinese"); - ret = wcstombs(mbs, dbwcs, sizeof(mbs)); - OK(ret == 4, "ret is %d", ret); - OK(!strcmp(mbs, "µH©Ò"), "mbs is %s", mbs); - ZeroMemory(mbs, 5); - - /* Length-only tests */ - SETLOCALE("English"); - ret = wcstombs(NULL, wcs, 0); - OK(ret == -1, "ret is %d", ret); - OK(errno == EILSEQ, "errno is %d", errno); - - SETLOCALE("Chinese"); - ret = wcstombs(NULL, dbwcs, 0); - OK(ret == 4, "ret is %d", ret); - - /* This call causes an ERROR_INSUFFICIENT_BUFFER in the called WideCharToMultiByte function. - For some reason, wcstombs under Windows doesn't reset the last error to the previous value here, so we can check for ERROR_INSUFFICIENT_BUFFER with GetLastError(). - This could also be seen as an indication that Windows uses WideCharToMultiByte internally for wcstombs. */ - ret = wcstombs(mbs, dbwcs, 1); - OK(ret == 0, "ret is %d", ret); - OK(mbs[0] == 0, "mbs[0] is %d", mbs[0]); - - /* ERROR_INSUFFICIENT_BUFFER is also the result of this call with SBCS characters. WTF?! - Anyway this is a Win32 error not related to the CRT, so we leave out this criteria. */ - ret = wcstombs(mbs, wcs, 1); - OK(ret == 1, "ret is %d", ret); - OK(mbs[0] == 84, "mbs[0] is %d", mbs[0]); - - putchar('\n'); -} - -void Win32_Tests(LPBOOL bUsedDefaultChar) -{ - SetLastError(0xdeadbeef); - - puts("Win32-Tests"); - puts("-----------"); - - ret = WideCharToMultiByte(1252, 0, &wc1, 1, &mbc, 1, NULL, bUsedDefaultChar); - OK(ret == 1, "ret is %d", ret); - OK(mbc == -28, "mbc is %d", mbc); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d", *bUsedDefaultChar); - OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); - - ret = WideCharToMultiByte(1252, 0, &wc2, 1, &mbc, 1, NULL, bUsedDefaultChar); - OK(ret == 1, "ret is %d", ret); - OK(mbc == 63, "mbc is %d", mbc); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d", *bUsedDefaultChar); - OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); - - ret = WideCharToMultiByte(1251, 0, &wc2, 1, &mbc, 1, NULL, bUsedDefaultChar); - OK(ret == 1, "ret is %d", ret); - OK(mbc == -16, "mbc is %d", mbc); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d", *bUsedDefaultChar); - OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); - - ret = WideCharToMultiByte(1251, 0, &wc1, 1, &mbc, 1, NULL, bUsedDefaultChar); - OK(ret == 1, "ret is %d", ret); - OK(mbc == 97, "mbc is %d", mbc); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d", *bUsedDefaultChar); - OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); - - /* The behaviour for this character is different when WC_NO_BEST_FIT_CHARS is used */ - ret = WideCharToMultiByte(1251, WC_NO_BEST_FIT_CHARS, &wc1, 1, &mbc, 1, NULL, bUsedDefaultChar); - OK(ret == 1, "ret is %d", ret); - OK(mbc == 63, "mbc is %d", mbc); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d", *bUsedDefaultChar); - OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); - - ret = WideCharToMultiByte(1252, 0, dbwcs, -1, mbs, sizeof(mbs), NULL, bUsedDefaultChar); - OK(ret == 3, "ret is %d", ret); - OK(!strcmp(mbs, "??"), "mbs is %s", mbs); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d", *bUsedDefaultChar); - OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); - ZeroMemory(mbs, 5); - - ret = WideCharToMultiByte(1252, WC_NO_BEST_FIT_CHARS, dbwcs, -1, mbs, sizeof(mbs), NULL, bUsedDefaultChar); - OK(ret == 3, "ret is %d", ret); - OK(!strcmp(mbs, "??"), "mbs is %s", mbs); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d", *bUsedDefaultChar); - OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); - - /* This call triggers the last Win32 error */ - ret = WideCharToMultiByte(1252, 0, wcs, -1, &mbc, 1, NULL, bUsedDefaultChar); - OK(ret == 0, "ret is %d", ret); - OK(mbc == 84, "mbc is %d", mbc); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d", *bUsedDefaultChar); - OK(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() is %lu", GetLastError()); - SetLastError(0xdeadbeef); - - ret = WideCharToMultiByte(1252, 0, wcs, -1, mbs, sizeof(mbs), NULL, bUsedDefaultChar); - OK(ret == 5, "ret is %d", ret); - OK(!strcmp(mbs, "Th?i"), "mbs is %s", mbs); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d", *bUsedDefaultChar); - OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); - mbs[0] = 0; - - /* WideCharToMultiByte mustn't add any null character automatically. - So in this case, we should get the same string again, even if we only copied the first three bytes. */ - ret = WideCharToMultiByte(1252, 0, wcs, 3, mbs, sizeof(mbs), NULL, bUsedDefaultChar); - OK(ret == 3, "ret is %d", ret); - OK(!strcmp(mbs, "Th?i"), "mbs is %s", mbs); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d", *bUsedDefaultChar); - OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); - ZeroMemory(mbs, 5); - - /* Now this shouldn't be the case like above as we zeroed the complete string buffer. */ - ret = WideCharToMultiByte(1252, 0, wcs, 3, mbs, sizeof(mbs), NULL, bUsedDefaultChar); - OK(ret == 3, "ret is %d", ret); - OK(!strcmp(mbs, "Th?"), "mbs is %s", mbs); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d", *bUsedDefaultChar); - OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); - - /* Chinese codepage tests - Swapping the WC_NO_BEST_FIT_CHARS and 0 tests causes bUsedDefaultChar to be set to TRUE in the following test, which quits with ERROR_INSUFFICIENT_BUFFER. - But as it isn't documented whether all other variables are undefined if ERROR_INSUFFICIENT_BUFFER is set, we skip this behaviour. */ - ret = WideCharToMultiByte(950, WC_NO_BEST_FIT_CHARS, &wc1, 1, &mbc, 1, NULL, bUsedDefaultChar); - OK(ret == 1, "ret is %d", ret); - OK(mbc == 63, "mbc is %d", mbc); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d", *bUsedDefaultChar); - OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); - - ret = WideCharToMultiByte(950, 0, &wc1, 1, &mbc, 1, NULL, bUsedDefaultChar); - OK(ret == 1, "ret is %d", ret); - OK(mbc == 97, "mbc is %d", mbc); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d", *bUsedDefaultChar); - OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); - - /* Double-byte tests */ - ret = WideCharToMultiByte(950, 0, dbwcs, -1, mbs, sizeof(mbs), NULL, bUsedDefaultChar); - OK(ret == 5, "ret is %d", ret); - OK(!strcmp(mbs, "µH©Ò"), "mbs is %s", mbs); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d", *bUsedDefaultChar); - OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); - - ret = WideCharToMultiByte(950, 0, dbwcs, 1, &mbc, 1, NULL, bUsedDefaultChar); - OK(ret == 0, "ret is %d", ret); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d", *bUsedDefaultChar); - OK(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() is %lu", GetLastError()); - SetLastError(0xdeadbeef); - ZeroMemory(mbs, 5); - - ret = WideCharToMultiByte(950, 0, dbwcs, 1, mbs, sizeof(mbs), NULL, bUsedDefaultChar); - OK(ret == 2, "ret is %d", ret); - OK(!strcmp(mbs, "µH"), "mbs is %s", mbs); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d", *bUsedDefaultChar); - OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); - - /* Length-only tests */ - ret = WideCharToMultiByte(1252, 0, &wc2, 1, NULL, 0, NULL, bUsedDefaultChar); - OK(ret == 1, "ret is %d", ret); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d", *bUsedDefaultChar); - OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); - - ret = WideCharToMultiByte(1252, 0, wcs, -1, NULL, 0, NULL, bUsedDefaultChar); - OK(ret == 5, "ret is %d", ret); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d", *bUsedDefaultChar); - OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); - - ret = WideCharToMultiByte(950, 0, dbwcs, 1, NULL, 0, NULL, bUsedDefaultChar); - OK(ret == 2, "ret is %d", ret); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d", *bUsedDefaultChar); - OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); - - ret = WideCharToMultiByte(950, 0, dbwcs, -1, NULL, 0, NULL, bUsedDefaultChar); - OK(ret == 5, "ret is %d", ret); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d", *bUsedDefaultChar); - OK(GetLastError() == 0xdeadbeef, "GetLastError() is %lu", GetLastError()); - - /* Abnormal uses of WideCharToMultiByte */ - ret = WideCharToMultiByte(1252, 0, NULL, 5, mbs, sizeof(mbs), NULL, bUsedDefaultChar); - OK(ret == 0, "ret is %d", ret); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d", *bUsedDefaultChar); - OK(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError() is %lu", GetLastError()); - SetLastError(0xdeadbeef); - - ret = WideCharToMultiByte(0, 0, dbwcs, 5, mbs, sizeof(mbs), NULL, bUsedDefaultChar); - OK(ret == 5, "ret is %d", ret); - OK(!strcmp(mbs, "??"), "mbs is %s", mbs); - if(bUsedDefaultChar) OK(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d", *bUsedDefaultChar); - - ret = WideCharToMultiByte(1252, 0, wcs, -1, (LPSTR)wcs, 5, NULL, bUsedDefaultChar); - OK(ret == 0, "ret is %d", ret); - OK(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError() is %lu", GetLastError()); - SetLastError(0xdeadbeef); - - ret = WideCharToMultiByte(1252, 0, wcs, -1, mbs, -1, NULL, bUsedDefaultChar); - OK(ret == 0, "ret is %d", ret); - OK(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError() is %lu", GetLastError()); - SetLastError(0xdeadbeef); - - putchar('\n'); -} - -int main() -{ - BOOL UsedDefaultChar; - - CRT_Tests(); - - /* There are two code pathes in WideCharToMultiByte, one when Flags || DefaultChar || UsedDefaultChar is set and one when it's not. - Test both here. */ - Win32_Tests(NULL); - Win32_Tests(&UsedDefaultChar); - - return 0; -} diff --git a/rostests/tests/wcstombs-tests/wcstombs-tests.rbuild b/rostests/tests/wcstombs-tests/wcstombs-tests.rbuild deleted file mode 100644 index d647069d3b6..00000000000 --- a/rostests/tests/wcstombs-tests/wcstombs-tests.rbuild +++ /dev/null @@ -1,3 +0,0 @@ - - wcstombs-tests.c - diff --git a/rostests/tests/winhello/winhello.c b/rostests/tests/winhello/winhello.c deleted file mode 100644 index e31a5ffc85b..00000000000 --- a/rostests/tests/winhello/winhello.c +++ /dev/null @@ -1,704 +0,0 @@ -/* - * ReactOS Winhello - Not So Simple Win32 Windowing test - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -/* What do we test with this app? - * - Windows and Class creation - * - A Simple Button - * - Some font rendering in the Window - * - Scrollbar support - * - Hotkeys - * - Messageboxes - * ???????? - */ - -#ifndef VK_C -#define VK_C 'C' -#endif - -#include -#include -#include - -HFONT tf; -LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM); -BOOLEAN bolWM_CHAR; -BOOLEAN bolWM_KEYDOWN; - -int WINAPI -WinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpszCmdLine, - int nCmdShow) -{ - WNDCLASS wc; - MSG msg; - HWND hWnd; - bolWM_CHAR = 0; - bolWM_KEYDOWN = 0; - - wc.lpszClassName = "HelloClass"; - wc.lpfnWndProc = MainWndProc; - wc.style = CS_VREDRAW | CS_HREDRAW; - wc.hInstance = hInstance; - wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION); - wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW); - wc.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH); - wc.lpszMenuName = NULL; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - if (RegisterClass(&wc) == 0) - { - fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - hWnd = CreateWindow("HelloClass", - "Hello World", - WS_OVERLAPPEDWINDOW|WS_HSCROLL|WS_VSCROLL, - 0, //Position; you can use CW_USEDEFAULT, too - 0, - 600, //height - 400, - NULL, - NULL, - hInstance, - NULL); - if (hWnd == NULL) - { - fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - tf = CreateFontA(14, 0, 0, TA_BASELINE, FW_NORMAL, FALSE, FALSE, FALSE, - ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, - DEFAULT_QUALITY, FIXED_PITCH|FF_DONTCARE, "Timmons"); - - ShowWindow(hWnd, nCmdShow); - - while(GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - DeleteObject(tf); - - return msg.wParam; -} - -#define CTRLC 1 /* Define our HotKeys */ -#define ALTF1 2 /* Define our HotKeys */ - -LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - PAINTSTRUCT ps; /* Also used during window drawing */ - HDC hDC; /* A device context used for drawing */ - RECT rc = {0,0,0,0}, clr, wir; /* A rectangle used during drawing */ - char spr[100], sir[100]; - static HBRUSH hbrWhite=NULL, hbrGray=NULL, hbrBlack=NULL, hbrRed=NULL, hbrBlue=NULL, hbrYellow=NULL; - - /* The window handle for the "Click Me" button. */ - static HWND hwndButton = 0; - static int cx, cy; /* Height and width of our button. */ - - switch(msg) - { - - case WM_CHAR: - { - TCHAR text[2]; - hDC = GetDC(hWnd); - text[0] = (TCHAR)wParam; - text[1] = _T('\0'); - - //Write in window - if( bolWM_KEYDOWN ) - { - TextOut(hDC, 400, 10, "WM CHAR:", strlen("WM CHAR:")); - bolWM_KEYDOWN = 0; - } - else - { - TextOut(hDC, 400, 10, "WM_CHAR:", strlen("WM_CHAR:")); - bolWM_KEYDOWN = 1; - } - TextOut(hDC, 530, 10, text, strlen(text)); - -#if 0 - // Make a line depending on the typed key - Rect.left = 10; - Rect.top = 75; - Rect.right = 610; - Rect.bottom = 85; - FillRect(hDC, &Rect, hbrWhite); - - Rect.left=308; - Rect.right=312; - FillRect(hDC, &Rect, hbrRed); - - Rect.left = 310; - Rect.top = 75; - Rect.right = 310 +text[0]*2; - Rect.bottom = 85; - HBRUSH hbrCustom = CreateSolidBrush ( RGB(text[0], text[0], text[0])); - FillRect(hDC, &Rect, hbrCustom); - DeleteObject ( hbrCustom ); - -#endif - - ReleaseDC(hWnd, hDC); - return 0; - } - - case WM_KEYDOWN: - { - RECT Rect; - TCHAR text[2]; - hDC = GetDC(hWnd); - text[0] = (TCHAR)wParam; - text[1] = _T('\0'); - - - /* Write in window */ - Rect.left = 400; - Rect.top = 50; - Rect.right = 550; - Rect.bottom = 70; - FillRect(hDC, &Rect, hbrWhite); - if( bolWM_CHAR ) - { - TextOut(hDC, 400, 30, "WM KEYDOWN:", strlen("WM KEYDOWN:")); - bolWM_CHAR = 0; - } - else - { - TextOut(hDC, 400, 30, "WM_KEYDOWN:", strlen("WM_KEYDOWN:")); - bolWM_CHAR = 1; - } - TextOut(hDC, 530, 30, text, strlen(text)); - ReleaseDC(hWnd, hDC); - return 0; - } - - case WM_KEYUP: - { - RECT Rect; - TCHAR text[2]; - hDC = GetDC(hWnd); - text[0] = (TCHAR)wParam; - text[1] = _T('\0'); - - - /* Write in window */ - Rect.left = 400; - Rect.top = 10; - Rect.right = 550; - Rect.bottom = 70; - FillRect(hDC, &Rect, hbrWhite); - TextOut(hDC, 400, 50, "WM_KEYUP:", strlen("WM_KEYUP:")); - TextOut(hDC, 530, 50, text, strlen(text)); - ReleaseDC(hWnd, hDC); - return 0; - } - - - case WM_LBUTTONDOWN: - { - ULONG x, y; - RECT Rect; - hDC = GetDC(hWnd); - x = LOWORD(lParam); - y = HIWORD(lParam); - - Rect.left = x - 5; - Rect.top = y - 5; - Rect.right = x + 5; - Rect.bottom = y + 5; - FillRect(hDC, &Rect, hbrRed); - - Rect.left = x - 3; - Rect.top = y - 3; - Rect.right = x + 3; - Rect.bottom = y + 3; - FillRect(hDC, &Rect, hbrBlack); - - ReleaseDC(hWnd, hDC); - break; - } - case WM_LBUTTONUP: - { - ULONG x, y; - RECT Rect; - hDC = GetDC(hWnd); - x = LOWORD(lParam); - y = HIWORD(lParam); - - Rect.left = x - 5; - Rect.top = y - 5; - Rect.right = x + 5; - Rect.bottom = y + 5; - FillRect(hDC, &Rect, hbrRed); - - Rect.left = x - 3; - Rect.top = y - 3; - Rect.right = x + 3; - Rect.bottom = y + 3; - FillRect(hDC, &Rect, hbrGray); - - ReleaseDC(hWnd, hDC); - break; - } - case WM_MBUTTONDOWN: - { - ULONG x, y; - RECT Rect; - hDC = GetDC(hWnd); - x = LOWORD(lParam); - y = HIWORD(lParam); - - Rect.left = x - 5; - Rect.top = y - 5; - Rect.right = x + 5; - Rect.bottom = y + 5; - FillRect(hDC, &Rect, hbrBlue); - - Rect.left = x - 3; - Rect.top = y - 3; - Rect.right = x + 3; - Rect.bottom = y + 3; - FillRect(hDC, &Rect, hbrBlack); - - ReleaseDC(hWnd, hDC); - break; - } - case WM_MBUTTONUP: - { - ULONG x, y; - RECT Rect; - hDC = GetDC(hWnd); - x = LOWORD(lParam); - y = HIWORD(lParam); - - Rect.left = x - 5; - Rect.top = y - 5; - Rect.right = x + 5; - Rect.bottom = y + 5; - FillRect(hDC, &Rect, hbrBlue); - - Rect.left = x - 3; - Rect.top = y - 3; - Rect.right = x + 3; - Rect.bottom = y + 3; - FillRect(hDC, &Rect, hbrGray); - - ReleaseDC(hWnd, hDC); - break; - } - case WM_RBUTTONDOWN: - { - ULONG x, y; - RECT Rect; - hDC = GetDC(hWnd); - x = LOWORD(lParam); - y = HIWORD(lParam); - - Rect.left = x - 5; - Rect.top = y - 5; - Rect.right = x + 5; - Rect.bottom = y + 5; - FillRect(hDC, &Rect, hbrYellow); - - Rect.left = x - 3; - Rect.top = y - 3; - Rect.right = x + 3; - Rect.bottom = y + 3; - FillRect(hDC, &Rect, hbrBlack); - - ReleaseDC(hWnd, hDC); - break; - } - case WM_RBUTTONUP: - { - ULONG x, y; - RECT Rect; - hDC = GetDC(hWnd); - x = LOWORD(lParam); - y = HIWORD(lParam); - - Rect.left = x - 5; - Rect.top = y - 5; - Rect.right = x + 5; - Rect.bottom = y + 5; - FillRect(hDC, &Rect, hbrYellow); - - Rect.left = x - 3; - Rect.top = y - 3; - Rect.right = x + 3; - Rect.bottom = y + 3; - FillRect(hDC, &Rect, hbrGray); - - ReleaseDC(hWnd, hDC); - break; - } - - case WM_MOUSEMOVE: - { - int fwKeys; - int x; - int y; - RECT Rect; - int temp; - TCHAR text[256]; - - hDC = GetDC(hWnd); - fwKeys = wParam; // key flags - x = LOWORD(lParam); // horizontal position of cursor - y = HIWORD(lParam); // vertical position of cursor - - Rect.left = 10; - Rect.top = 100; - Rect.right = 160; - Rect.bottom = 300; - FillRect(hDC, &Rect, hbrWhite); - - temp = _sntprintf ( text, sizeof(text)/sizeof(*text), _T("x: %d"), x ); - TextOut(hDC,10,100,text,strlen(text)); - temp = _sntprintf ( text, sizeof(text)/sizeof(*text), _T("y: %d"), y ); - TextOut(hDC,10,120,text,strlen(text)); - - Rect.left = x - 2; - Rect.top = y - 2; - Rect.right = x + 2; - Rect.bottom = y + 2; - - switch ( fwKeys ) - { - case MK_CONTROL: - TextOut(hDC,10,140,"Control",strlen("Control")); - break; - case MK_SHIFT: - TextOut(hDC,10,160,"Shift",strlen("Shift")); - break; - case MK_LBUTTON: - TextOut(hDC,10,180,"Left",strlen("Left")); - FillRect(hDC, &Rect, hbrRed); - break; - case MK_MBUTTON: - TextOut(hDC,10,200,"Middle",strlen("Middle")); - FillRect(hDC, &Rect, hbrBlue); - break; - case MK_RBUTTON: - TextOut(hDC,10,220,"Right",strlen("Right")); - FillRect(hDC, &Rect, hbrYellow); - break; - } - ReleaseDC(hWnd, hDC); - break; - } - - case WM_HSCROLL: - { - int nPos; - int temp; - RECT Rect; - int nScrollCode; - HWND hwndScrollBar; - TCHAR text[256]; - SCROLLINFO Scrollparameter; - nScrollCode = (int) LOWORD(wParam); // scroll bar value - nPos = (short int) HIWORD(wParam); // scroll box position - hwndScrollBar = (HWND) lParam; // handle to scroll bar - hDC = GetDC(hWnd); - - Scrollparameter.cbSize = sizeof(Scrollparameter); - Scrollparameter.fMask = SIF_ALL; - GetScrollInfo ( hWnd, SB_HORZ, &Scrollparameter ); - - Rect.left = 200; - Rect.top = 100; - Rect.right = 350; - Rect.bottom = 300; - FillRect(hDC, &Rect, hbrWhite); - - switch ( nScrollCode ) - { - case SB_ENDSCROLL: //Ends scroll. - TextOut(hDC,200,120,"SB_ENDSCROLL ",16); - Scrollparameter.nPos = Scrollparameter.nPos; - break; - case SB_LEFT: //Scrolls to the upper left. - TextOut(hDC,200,140,"SB_LEFT ",16); - Scrollparameter.nPos = Scrollparameter.nMin; - break; - case SB_RIGHT: //Scrolls to the lower right. - TextOut(hDC,200,160,"SB_RIGHT ",16); - Scrollparameter.nPos = Scrollparameter.nMax; - break; - case SB_LINELEFT: //Scrolls left by one unit. - TextOut(hDC,200,180,"SB_LINELEFT ",16); - Scrollparameter.nPos--; - break; - case SB_LINERIGHT: //Scrolls right by one unit. - TextOut(hDC,200,200,"SB_LINERIGHT ",16); - Scrollparameter.nPos++; - break; - case SB_PAGELEFT: //Scrolls left by the width of the window. - TextOut(hDC,200,220,"SB_PAGELEFT ",16); - Scrollparameter.nPos -= Scrollparameter.nPage; - break; - case SB_PAGERIGHT: //Scrolls right by the width of the window. - TextOut(hDC,200,240,"PAGERIGHT ",16); - Scrollparameter.nPos += Scrollparameter.nPage; - break; - case SB_THUMBPOSITION: //The user has dragged the scroll box (thumb) and released the mouse button. The nPos parameter indicates the position of the scroll box at the end of the drag operation. - TextOut(hDC,200,260,"SB_THUMBPOSITION",16); - Scrollparameter.nPos = Scrollparameter.nTrackPos; - break; - case SB_THUMBTRACK: // - TextOut(hDC,200,280,"SB_THUMBTRACK ",16); - Scrollparameter.nPos = Scrollparameter.nTrackPos; - break; - } - - SetScrollInfo( - hWnd, // handle to window with scroll bar - SB_HORZ, // scroll bar flag - &Scrollparameter, // pointer to structure with scroll parameters - 1 // redraw flag - ); - temp = _sntprintf ( text, sizeof(text)/sizeof(*text), _T("Horizontal: %d"), Scrollparameter.nPos ); - TextOut(hDC,200,100,text,strlen(text)); - ReleaseDC(hWnd, hDC); - return 0; - } - - case WM_VSCROLL: - { - int nPos; - int temp; - RECT Rect; - int nScrollCode; - HWND hwndScrollBar; - TCHAR text[256]; - SCROLLINFO Scrollparameter; - nScrollCode = (int) LOWORD(wParam); // scroll bar value - nPos = (short int) HIWORD(wParam); // scroll box position - hwndScrollBar = (HWND) lParam; // handle to scroll bar - hDC = GetDC(hWnd); - - Scrollparameter.cbSize = sizeof(Scrollparameter); - Scrollparameter.fMask = SIF_ALL; - GetScrollInfo ( hWnd, SB_VERT, &Scrollparameter ); - - Rect.left = 400; - Rect.top = 100; - Rect.right = 550; - Rect.bottom = 300; - FillRect(hDC, &Rect, hbrWhite); - - switch ( nScrollCode ) - { - case SB_ENDSCROLL: //Ends scroll. - TextOut(hDC,400,120,"SB_ENDSCROLL ",16); - Scrollparameter.nPos = Scrollparameter.nPos; - break; - case SB_LEFT: //Scrolls to the upper left. - TextOut(hDC,400,140,"SB_LEFT ",16); - Scrollparameter.nPos = Scrollparameter.nMin; - break; - case SB_RIGHT: //Scrolls to the lower right. - TextOut(hDC,400,160,"SB_RIGHT ",16); - Scrollparameter.nPos = Scrollparameter.nMax; - break; - case SB_LINELEFT: //Scrolls left by one unit. - TextOut(hDC,400,180,"SB_LINELEFT ",16); - Scrollparameter.nPos--; - break; - case SB_LINERIGHT: //Scrolls right by one unit. - TextOut(hDC,400,200,"SB_LINERIGHT ",16); - Scrollparameter.nPos++; - break; - case SB_PAGELEFT: //Scrolls left by the width of the window. - TextOut(hDC,400,220,"SB_PAGELEFT ",16); - Scrollparameter.nPos -= Scrollparameter.nPage; - break; - case SB_PAGERIGHT: //Scrolls right by the width of the window. - TextOut(hDC,400,240,"PAGERIGHT ",16); - Scrollparameter.nPos += Scrollparameter.nPage; - break; - case SB_THUMBPOSITION: //The user has dragged the scroll box (thumb) and released the mouse button. The nPos parameter indicates the position of the scroll box at the end of the drag operation. - TextOut(hDC,400,260,"SB_THUMBPOSITION",16); - Scrollparameter.nPos = Scrollparameter.nTrackPos; - break; - case SB_THUMBTRACK: // - TextOut(hDC,400,280,"SB_THUMBTRACK ",16); - Scrollparameter.nPos = Scrollparameter.nTrackPos; - break; - } - - SetScrollInfo( - hWnd, // handle to window with scroll bar - SB_VERT, // scroll bar flag - &Scrollparameter, // pointer to structure with scroll parameters - 1 // redraw flag - ); - temp = _sntprintf ( text, sizeof(text)/sizeof(*text), _T("Vertical: %d"), Scrollparameter.nPos ); - TextOut(hDC,400,100,text,strlen(text)); - ReleaseDC(hWnd, hDC); - return 0; - } - - case WM_HOTKEY: - switch(wParam) - { - case CTRLC: - MessageBox(hWnd, "You just pressed Ctrl+C", "Hotkey", MB_OK | MB_ICONINFORMATION); - break; - case ALTF1: - MessageBox(hWnd, "You just pressed Ctrl+Alt+F1", "Hotkey", MB_OK | MB_ICONINFORMATION); - break; - } - break; - - case WM_DESTROY: - UnregisterHotKey(hWnd, CTRLC); - UnregisterHotKey(hWnd, ALTF1); - PostQuitMessage(0); - DeleteObject ( hbrWhite ); - DeleteObject ( hbrGray ); - DeleteObject ( hbrBlack ); - DeleteObject ( hbrRed ); - DeleteObject ( hbrBlue ); - DeleteObject ( hbrYellow ); - break; - - case WM_CREATE: - { - SCROLLINFO si; - TEXTMETRIC tm; - /* Register a Ctrl+Alt+C hotkey*/ - RegisterHotKey(hWnd, CTRLC, MOD_CONTROL, VK_C); - RegisterHotKey(hWnd, ALTF1, MOD_CONTROL | MOD_ALT, VK_F1); - - hbrWhite = CreateSolidBrush ( RGB(0xFF, 0xFF, 0xFF)); - hbrGray = CreateSolidBrush ( RGB(0xAF, 0xAF, 0xAF)); - hbrBlack = CreateSolidBrush ( RGB(0x00, 0x00, 0x00)); - hbrRed = CreateSolidBrush ( RGB(0xFF, 0x00, 0x00)); - hbrBlue = CreateSolidBrush ( RGB(0x00, 0x00, 0xFF)); - hbrYellow = CreateSolidBrush ( RGB(0xFF, 0xFF, 0x00)); - - si.cbSize = sizeof(si); - si.fMask = SIF_ALL; - si.nMin = 0; - si.nMax = 100; - si.nPage = 5; - si.nPos = 0; - - SetScrollInfo ( hWnd, SB_HORZ, &si, FALSE ); - SetScrollInfo ( hWnd, SB_VERT, &si, FALSE ); - - - /* The window is being created. Create our button - * window now. */ - - /* First we use the system fixed font size to choose - * a nice button size. */ - hDC = GetDC (hWnd); - SelectObject (hDC, GetStockObject (SYSTEM_FIXED_FONT)); - GetTextMetrics (hDC, &tm); - cx = tm.tmAveCharWidth * 30; - cy = (tm.tmHeight + tm.tmExternalLeading) * 2; - ReleaseDC (hWnd, hDC); - - /* Now create the button */ - hwndButton = CreateWindow ( - "button", /* Builtin button class */ - "Click Here", - WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, - 0, 0, cx, cy, - hWnd, /* Parent is this window. */ - (HMENU) 1, /* Control ID: 1 */ - ((LPCREATESTRUCT) lParam)->hInstance, - NULL - ); - - return 0; - break; - } - - case WM_PAINT: - hDC = BeginPaint(hWnd, &ps); - TextOut(hDC, 10, 10, "Hello World from ReactOS!", - strlen("Hello World from ReactOS!")); - TextOut(hDC, 10, 80, "Press Ctrl+C or Ctrl+Alt+F1 to test Hotkey support.", - strlen("Press Ctrl+C or Ctrl+Alt+F1 to test Hotkey support.")); - GetClientRect(hWnd, &clr); - GetWindowRect(hWnd, &wir); - sprintf(spr, "%lu,%lu,%lu,%lu ", clr.left, clr.top, clr.right, clr.bottom); - sprintf(sir, "%lu,%lu,%lu,%lu ", wir.left, wir.top, wir.right, wir.bottom); - TextOut(hDC, 10, 30, spr, 20); - TextOut(hDC, 10, 50, sir, 20); - - /* Draw "Hello, World" in the middle of the upper - * half of the window. */ - rc.bottom = rc.bottom / 2; - DrawText (hDC, "Hello, World", -1, &rc, - DT_SINGLELINE | DT_CENTER | DT_VCENTER); - - EndPaint (hWnd, &ps); - return 0; - break; - - case WM_SIZE: - /* The window size is changing. If the button exists - * then place it in the center of the bottom half of - * the window. */ - if (hwndButton && - (wParam == SIZEFULLSCREEN || - wParam == SIZENORMAL) - ) - { - rc.left = (LOWORD(lParam) - cx) / 2; - rc.top = HIWORD(lParam) * 3 / 4 - cy / 2; - MoveWindow ( - hwndButton, - rc.left, rc.top, cx, cy, TRUE); - } - break; - - case WM_COMMAND: - /* Check the control ID, notification code and - * control handle to see if this is a button click - * message from our child button. */ - if (LOWORD(wParam) == 1 && - HIWORD(wParam) == BN_CLICKED && - (HWND) lParam == hwndButton) - { - /* Our button was clicked. Close the window. */ - DestroyWindow (hWnd); - } - return 0; - break; - - default: - return DefWindowProc(hWnd, msg, wParam, lParam); - } - return 0; -} diff --git a/rostests/tests/winhello/winhello.rbuild b/rostests/tests/winhello/winhello.rbuild deleted file mode 100644 index 9ee3e128e71..00000000000 --- a/rostests/tests/winhello/winhello.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - winhello.c - diff --git a/rostests/tests/wm_erasebkgnd/BACKBITMAP.BMP b/rostests/tests/wm_erasebkgnd/BACKBITMAP.BMP deleted file mode 100644 index 38bc9716b64..00000000000 Binary files a/rostests/tests/wm_erasebkgnd/BACKBITMAP.BMP and /dev/null differ diff --git a/rostests/tests/wm_erasebkgnd/wm_erasebkgnd.cpp b/rostests/tests/wm_erasebkgnd/wm_erasebkgnd.cpp deleted file mode 100644 index b964bdf4658..00000000000 --- a/rostests/tests/wm_erasebkgnd/wm_erasebkgnd.cpp +++ /dev/null @@ -1,179 +0,0 @@ - -// ------------------------------------------------------------------ -// Windows 2000 Graphics API Black Book -// Chapter 2 - CD-ROM (WM_ERASEBKGND Demo) -// -// Created by Damon Chandler -// Updates can be downloaded at: -// -// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu -// if you have any questions about this code. -// ------------------------------------------------------------------ - -//*********************************************************// -// // -// SYNOPSIS: // -// This sample project demonstrates how to render // -// a background image in response to the WM_ERASEBKGND // -// message. It also shows how to create a transparent // -// static (text) control by handling the // -// WM_CTLCOLORSTATIC message. // -// // -//*********************************************************// - - -//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -#include -//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - - -HINSTANCE HInst; -HINSTANCE HPrevInst; -TCHAR *cmdline; -const char* WndClassName = "GMainWnd"; -LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam, - LPARAM LParam); - - -int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE HPrevInstance, - LPTSTR lpCmdLine, int nCmdShow) -{ - HInst = HInstance; - HPrevInst = HPrevInstance; - cmdline = lpCmdLine; - - WNDCLASS wc; - memset(&wc, 0, sizeof(WNDCLASS)); - - wc.style = CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS; - wc.lpfnWndProc = MainWndProc; - wc.hInstance = HInstance; - wc.hCursor = LoadCursor(NULL, IDC_ARROW); - wc.hbrBackground = - reinterpret_cast(COLOR_BTNFACE + 1); - wc.lpszClassName = WndClassName; - - if (RegisterClass(&wc)) - { - HWND HWnd = - CreateWindow(WndClassName, - TEXT("WM_ERASEBKGND Demo"), - WS_OVERLAPPEDWINDOW | WS_CAPTION | - WS_VISIBLE | WS_CLIPSIBLINGS, - CW_USEDEFAULT, CW_USEDEFAULT, 205, 85, - NULL, NULL, HInstance, NULL); - - if (HWnd) - { - ShowWindow(HWnd, nCmdShow); - UpdateWindow(HWnd); - - MSG msg; - while (GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } - } - return 0; -} -//------------------------------------------------------------------ - - -// static text and bitmap-related variables -HWND HStatic; -HDC HMemDC; -HBITMAP HBmp, HOldBmp; -const char* filename = "BACKBITMAP.BMP"; - -LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam, - LPARAM LParam) -{ - switch (Msg) - { - case WM_CREATE: - { - HStatic = - CreateWindow(TEXT("STATIC"), TEXT("Static Text"), - WS_CHILD | WS_VISIBLE | SS_CENTER, - 10, 20, 175, 30, - HWnd, NULL, HInst, NULL); - - // create a memory DC compatible with the screen - HMemDC = CreateCompatibleDC(NULL); - if (HMemDC) - { - // load a DDB from file - HBmp = static_cast( - LoadImage(HInst, filename, IMAGE_BITMAP, - 0, 0, LR_LOADFROMFILE) - ); - if (HBmp) - { - // associate the DDB with the memory DC - HOldBmp = static_cast( - SelectObject(HMemDC, HBmp) - ); - } - } - } - case WM_CTLCOLORSTATIC: - { - if (reinterpret_cast(LParam) == HStatic) - { - HDC HStaticDC = reinterpret_cast(WParam); - SetBkMode(HStaticDC, TRANSPARENT); - - return reinterpret_cast( - GetStockObject(NULL_BRUSH) - ); - } - break; - } - case WM_ERASEBKGND: - { - BITMAP bmp; - if (GetObject(HBmp, sizeof(BITMAP), &bmp)) - { - RECT RClient; - GetClientRect(HWnd, &RClient); - - HDC Hdc = reinterpret_cast(WParam); - SetStretchBltMode(Hdc, COLORONCOLOR); - - // - // TODO: add palette handling code for - // palettized displays (see Chapter 9)... - // - - // render the background image - StretchBlt(Hdc, 0, 0, - RClient.right - RClient.left, - RClient.bottom - RClient.top, - HMemDC, 0, 0, bmp.bmWidth, bmp.bmHeight, - SRCCOPY); - return TRUE; - } - break; - } - case WM_DESTROY: - { - if (HBmp) - { - // free the bitmap - DeleteObject(SelectObject(HMemDC, HOldBmp)); - } - // free the memory DC - DeleteDC(HMemDC); - - PostQuitMessage(0); - return 0; - } - } - return DefWindowProc(HWnd, Msg, WParam, LParam); -} -//------------------------------------------------------------------ - - - diff --git a/rostests/tests/wm_erasebkgnd/wm_erasebkgnd.rbuild b/rostests/tests/wm_erasebkgnd/wm_erasebkgnd.rbuild deleted file mode 100644 index 12b61e673f1..00000000000 --- a/rostests/tests/wm_erasebkgnd/wm_erasebkgnd.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - wm_erasebkgnd.cpp - diff --git a/rostests/tests/wm_paint/wm_paint.c b/rostests/tests/wm_paint/wm_paint.c deleted file mode 100644 index 24f00aa5b9c..00000000000 --- a/rostests/tests/wm_paint/wm_paint.c +++ /dev/null @@ -1,131 +0,0 @@ - -// ------------------------------------------------------------------ -// Windows 2000 Graphics API Black Book -// Chapter 1 - Listing 1.1 (WM_PAINT Demo) -// -// Created by Damon Chandler -// Updates can be downloaded at: -// -// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu -// if you have any questions about this code. -// ------------------------------------------------------------------ - - -//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -#include -#include -//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - - -const char* WndClassName = "GMainWnd"; -LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam, - LPARAM LParam); - - -int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE HPrevInstance, - LPTSTR lpCmdLine, int nCmdShow) -{ - MSG msg; - WNDCLASS wc; - memset(&wc, 0, sizeof(WNDCLASS)); - - wc.style = CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS; - wc.lpfnWndProc = MainWndProc; - wc.hInstance = HInstance; - wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW); - wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); - wc.lpszClassName = WndClassName; - - if (RegisterClass(&wc)) - { - HWND HWnd = - CreateWindow(WndClassName, TEXT("WM_PAINT Demo"), - WS_OVERLAPPEDWINDOW | WS_CAPTION | WS_VISIBLE, - CW_USEDEFAULT, CW_USEDEFAULT, 200, 150, - NULL, NULL, HInstance, NULL); - - if (HWnd) - { - ShowWindow(HWnd, nCmdShow); - UpdateWindow(HWnd); - - while (GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } - } - return 0; -} -//------------------------------------------------------------------ - - -LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam, - LPARAM LParam) -{ - const char* text = "Persistent Text"; - - switch (Msg) - { - case WM_PAINT: - { - // determine the invalidated area of the window - RECT RUpdate; - HDC Hdc; - GetUpdateRect(HWnd, &RUpdate, FALSE); - - // grab a handle to our window's - // common display device context - Hdc = GetDC(HWnd); -#if 0 - try -#endif - { - RECT RClient; - GetClientRect(HWnd, &RClient); - - // set the clipping region - IntersectClipRect(Hdc, RUpdate.left, RUpdate.top, - RUpdate.right, RUpdate.bottom); - - // fill the client area with the background brush - /*HBRUSH HBrush = - reinterpret_cast - (HBRUSH)(GetClassLong(HWnd, GCL_HBRBACKGROUND) - );*/ - FillRect(Hdc, &RClient, NULL); - - // render the persistent text - SetTextColor(Hdc, PALETTERGB(0, 0, 255)); - DrawText(Hdc, text, strlen(text), &RClient, - DT_CENTER | DT_VCENTER | DT_SINGLELINE); - } -#if 0 - catch (...) -#endif - { - // release the device context - ReleaseDC(HWnd, Hdc); - - // validate the update area - ValidateRect(HWnd, &RUpdate); - } - // release the device context - ReleaseDC(HWnd, Hdc); - - // validate the update area - ValidateRect(HWnd, &RUpdate); - - break; - } - case WM_DESTROY: - { - PostQuitMessage(0); - return 0; - } - } - return DefWindowProc(HWnd, Msg, WParam, LParam); -} -//------------------------------------------------------------------ - diff --git a/rostests/tests/wm_paint/wm_paint.rbuild b/rostests/tests/wm_paint/wm_paint.rbuild deleted file mode 100644 index 4c1e5e63951..00000000000 --- a/rostests/tests/wm_paint/wm_paint.rbuild +++ /dev/null @@ -1,5 +0,0 @@ - - user32 - gdi32 - wm_paint.c - diff --git a/rostests/tests/wpickclick/wpickclick.c b/rostests/tests/wpickclick/wpickclick.c deleted file mode 100644 index 7277aeacfaf..00000000000 --- a/rostests/tests/wpickclick/wpickclick.c +++ /dev/null @@ -1,219 +0,0 @@ -/*---------------------------------------------------------------------------- -** wpickclick.c -** Utilty to pick clicks posted to Wine Windows -** -** -**--------------------------------------------------------------------------- -** Copyright 2004 Jozef Stefanka for CodeWeavers, Inc. -** Copyright 2005 Francois Gouget for CodeWeavers, Inc. -** Copyright 2005 Dmitry Timoshkov for CodeWeavers, Inc. -** -** 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -** -**--------------------------------------------------------------------------*/ -#include -#include -#include -#include - -#include "hook.h" - - -#define APP_NAME "wpickclick.exe" - - -static BOOL (WINAPI *pInstallHooks)(HMODULE hdll); -static void (WINAPI *pRemoveHooks)(); -static action_t* (WINAPI *pGetAction)(); -static void (WINAPI *pFreeAction)(action_t* action); - - -/* - * Provide some basic debugging support. - */ -#ifdef __GNUC__ -#define __PRINTF_ATTR(fmt,args) __attribute__((format (printf,fmt,args))) -#else -#define __PRINTF_ATTR(fmt,args) -#endif -static int debug_on=0; -static int init_debug() -{ - char* str=getenv("CXTEST_DEBUG"); - if (str && strstr(str, "+hook")) - debug_on=1; - return debug_on; -} - -static void cxlog(const char* format, ...) __PRINTF_ATTR(1,2); -static void cxlog(const char* format, ...) -{ - va_list valist; - - if (debug_on) - { - va_start(valist, format); - vfprintf(stderr, format, valist); - va_end(valist); - } -} - -static HINSTANCE load_hook_dll() -{ - HINSTANCE hinstDll; - char dllpath[MAX_PATH]; - char* p; - - hinstDll=LoadLibrary("hook.dll"); - if (hinstDll != NULL) - return hinstDll; - - if (!GetModuleFileName(NULL,dllpath,sizeof(dllpath))) - return NULL; - - p=strrchr(dllpath,'\\'); - if (!p) - return NULL; - *p='\0'; - p=strrchr(dllpath,'\\'); - if (!p) - return NULL; - *p='\0'; - strcat(dllpath,"\\hookdll\\hook.dll"); - hinstDll=LoadLibrary(dllpath); - return hinstDll; -} - -char* cleanup(char* str) -{ - char* s; - - while (*str==' ' || *str=='\t' || *str=='\r' || *str=='\n') - str++; - s=strchr(str,'\n'); - if (!s) - s=str+strlen(str)-1; - while (s>str && (*s==' ' || *s=='\t' || *s=='\r' || *s=='\n')) - s--; - *(s+1)='\0'; - return str; -} - -int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, - LPSTR lpCmdLine, int nCmdShow) -{ - HINSTANCE hDll; - action_t* action; - - init_debug(); - - /* Our scripts expect Unix-style line ends */ - _setmode(1,_O_BINARY); - _setmode(2,_O_BINARY); - - if (strstr(lpCmdLine,"--help")) - { - fprintf(stderr,"%s - Utility to print coordinates, component, window title, component class and window class name of a click\n", APP_NAME); - fprintf(stderr,"----------------------------------------------\n"); - fprintf(stderr,"Usage: %s\n",APP_NAME); - fprintf(stderr,"The options are as follows:\n"); - fprintf(stderr,"After starting you can\n"); - fprintf(stderr,"select where to click. If we properly track the click, it will be reported\n"); - fprintf(stderr,"in the following format:\n"); - fprintf(stderr," button-name x y component_name window_name component_class_name window_class_name\n"); - fprintf(stderr,"Note that x and y can be negative; this typically happens if you click within the\n"); - fprintf(stderr,"window manager decorations of a given window.\n"); - fprintf(stderr,"On success, %s returns 0, non zero on some failure\n",APP_NAME); - exit(0); - }; - - /* Load the hook library */ - hDll = load_hook_dll(); - if (!hDll) - { - fprintf(stderr, "Error: Unable to load 'hook.dll'\n"); - printf("failed\n"); - return 1; - } - - pInstallHooks=(void*)GetProcAddress(hDll, "InstallHooks"); - pRemoveHooks=(void*)GetProcAddress(hDll, "RemoveHooks"); - pGetAction=(void*)GetProcAddress(hDll, "GetAction"); - pFreeAction=(void*)GetProcAddress(hDll, "FreeAction"); - if (!pInstallHooks || !pRemoveHooks || !pGetAction) - { - fprintf(stderr, "Error: Unable to get the hook.dll functions (%ld)\n", - GetLastError()); - printf("failed\n"); - return 1; - } - - if (!pInstallHooks(hDll)) - { - fprintf(stderr, "Error: Unable to install the hooks (%ld)\n", - GetLastError()); - printf("failed\n"); - return 1; - } - - fprintf(stderr, "Ready for capture...\n"); - action=pGetAction(); - if (!action) - { - fprintf(stderr, "Error: GetAction() failed\n"); - printf("failed\n"); - return 1; - } - - switch (action->action) - { - case ACTION_FAILED: - printf("failed\n"); - break; - case ACTION_NONE: - printf("none\n"); - break; - case ACTION_FIND: - printf("find\n"); - break; - case ACTION_BUTTON1: - case ACTION_BUTTON2: - case ACTION_BUTTON3: - printf("button%d %ld %ld\n", action->action-ACTION_BUTTON1+1, - action->x, action->y); - break; - default: - fprintf(stderr, "Error: Unknown action %d\n",action->action); - printf("%d\n", action->action); - break; - } - printf("%s\n", action->window_class); - printf("%s\n", action->window_title); - printf("%ld\n", action->control_id); - printf("%s\n", action->control_class); - printf("%s\n", cleanup(action->control_caption)); - - cxlog("\n%s: action=%d x=%ld y=%ld\n", __FILE__, action->action, - action->x, action->y); - cxlog("window_class='%s'\n", action->window_class); - cxlog("window_title='%s'\n", action->window_title); - cxlog("control_id=%ld\n", action->control_id); - cxlog("control_class='%s'\n", action->control_class); - cxlog("control_caption='%s'\n", action->control_caption); - - pFreeAction(action); - pRemoveHooks(); - return 0; -} diff --git a/rostests/tests/wpickclick/wpickclick.rbuild b/rostests/tests/wpickclick/wpickclick.rbuild deleted file mode 100644 index 876f5753785..00000000000 --- a/rostests/tests/wpickclick/wpickclick.rbuild +++ /dev/null @@ -1,4 +0,0 @@ - - gdi32 - wpickclick.c - diff --git a/rostests/win32/DriverLoading/Application/Application.vcproj b/rostests/win32/DriverLoading/Application/Application.vcproj deleted file mode 100644 index be8af33fd0c..00000000000 --- a/rostests/win32/DriverLoading/Application/Application.vcproj +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rostests/win32/DriverLoading/Application/DriverTester.h b/rostests/win32/DriverLoading/Application/DriverTester.h deleted file mode 100644 index b5cca46b092..00000000000 --- a/rostests/win32/DriverLoading/Application/DriverTester.h +++ /dev/null @@ -1,72 +0,0 @@ -#define _WIN32_WINNT 0x0500 -#include -#include -#include - -#define DRIVER_NAME L"TestDriver" - -#define STATUS_SUCCESS ((NTSTATUS)0x00000000L) -#define STATUS_PRIVILEGE_NOT_HELD ((NTSTATUS)0xC0000061L) - -typedef LONG NTSTATUS; - -// -// umode methods -// -BOOL RegisterDriver(LPCWSTR lpDriverName, LPCWSTR lpPathName); -BOOL StartDriver(LPCWSTR lpDriverName); -BOOL StopDriver(LPCWSTR lpDriverName); -BOOL UnregisterDriver(LPCWSTR lpDriverName); - -// -// undoc methods -// -BOOL ConvertPath(LPCWSTR lpPath, LPWSTR lpDevice); -BOOL LoadVia_SystemLoadGdiDriverInformation(LPWSTR lpDriverPath); -BOOL LoadVia_SystemExtendServiceTableInformation(LPWSTR lpDriverPath); -BOOL NtStartDriver(LPCWSTR lpService); -BOOL NtStopDriver(LPCWSTR lpService); - - -// -// undocumented stuff -// -#define SystemLoadGdiDriverInformation 26 -#define SystemExtendServiceTableInformation 38 -NTSYSAPI NTSTATUS NTAPI -NtSetSystemInformation(IN INT SystemInformationClass, - IN PVOID SystemInformation, - IN ULONG SystemInformationLength ); -NTSTATUS -NtUnloadDriver(IN PUNICODE_STRING DriverServiceName); - -typedef struct _SYSTEM_GDI_DRIVER_INFORMATION -{ - UNICODE_STRING DriverName; - PVOID ImageAddress; - PVOID SectionPointer; - PVOID EntryPoint; - PIMAGE_EXPORT_DIRECTORY ExportSectionPointer; - ULONG ImageLength; -} SYSTEM_GDI_DRIVER_INFORMATION, *PSYSTEM_GDI_DRIVER_INFORMATION; - -typedef enum _OBJECT_INFORMATION_CLASS { - ObjectBasicInformation, - ObjectNameInformation, - ObjectTypeInformation, - ObjectAllTypesInformation, - ObjectHandleInformation -} OBJECT_INFO_CLASS; - -NTSTATUS NtQueryObject(IN HANDLE Handle, - IN OBJECT_INFO_CLASS ObjectInformationClass, - OUT PVOID ObjectInformation, - IN ULONG ObjectInformationLength, - OUT PULONG ReturnLength); - - -typedef struct _OBJECT_NAME_INFORMATION { - UNICODE_STRING Name; -} OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION; - - diff --git a/rostests/win32/DriverLoading/Application/main.c b/rostests/win32/DriverLoading/Application/main.c deleted file mode 100644 index 01d856a66df..00000000000 --- a/rostests/win32/DriverLoading/Application/main.c +++ /dev/null @@ -1,157 +0,0 @@ -#include "DriverTester.h" - -static BOOL -Initialize(LPCWSTR lpDriverPath) -{ - if (!RegisterDriver(DRIVER_NAME, lpDriverPath)) - { - wprintf(L"[%lu] Failed to install %s\n", GetLastError(), DRIVER_NAME); - return FALSE; - } - - return TRUE; -} - -static BOOL -Uninitialize(LPCWSTR lpDriverPath) -{ - if (!UnregisterDriver(DRIVER_NAME)) - { - wprintf(L"[%lu] Failed to unregister %s\n", GetLastError(), DRIVER_NAME); - return FALSE; - } - - return TRUE; -} - -static BOOL -UsermodeMethod(LPCWSTR lpDriverPath) -{ - wprintf(L"\nStarting %s.sys via the SCM\n", DRIVER_NAME); - - if (!StartDriver(DRIVER_NAME)) - { - wprintf(L"[%lu] Failed to start %s\n", GetLastError(), DRIVER_NAME); - UnregisterDriver(DRIVER_NAME); - return FALSE; - } - - wprintf(L"\tStarted\n"); - - wprintf(L"Stopping %s.sys via the SCM\n", DRIVER_NAME); - - if (!StopDriver(DRIVER_NAME)) - { - wprintf(L"[%lu] Failed to stop %s\n", GetLastError(), DRIVER_NAME); - UnregisterDriver(DRIVER_NAME); - return FALSE; - } - - wprintf(L"\tStopped\n"); - - return TRUE; -} - -static BOOL -UndocumentedMethod(LPCWSTR lpDriverPath) -{ - wprintf(L"\nStarting %s.sys via native API\n", DRIVER_NAME); - - if (!NtStartDriver(DRIVER_NAME)) - { - wprintf(L"[%lu] Failed to start %s\n", GetLastError(), DRIVER_NAME); - UnregisterDriver(DRIVER_NAME); - return FALSE; - } - - wprintf(L"\tStarted\n"); - - wprintf(L"Stopping %s.sys via native API\n", DRIVER_NAME); - - if (!NtStopDriver(DRIVER_NAME)) - { - wprintf(L"[%lu] Failed to stop %s\n", GetLastError(), DRIVER_NAME); - UnregisterDriver(DRIVER_NAME); - return FALSE; - } - - wprintf(L"\tStopped\n"); - - return TRUE; -} - - -static BOOL -SneakyUndocumentedMethods(LPCWSTR lpDriverPath) -{ - WCHAR szDevice[MAX_PATH]; - - if (ConvertPath(lpDriverPath, szDevice)) - { - wprintf(L"\nStarting %s.sys via NtSetSystemInformation with SystemLoadGdiDriverInformation\n", DRIVER_NAME); - if (LoadVia_SystemLoadGdiDriverInformation(szDevice)) - { - wprintf(L"\tStarted\n"); - - NtStopDriver(DRIVER_NAME); - } - - wprintf(L"\nStarting %s.sys via NtSetSystemInformation with SystemExtendServiceTableInformation\n", DRIVER_NAME); - if (LoadVia_SystemExtendServiceTableInformation(szDevice)) - { - wprintf(L"\tStarted\n"); - - NtStopDriver(DRIVER_NAME); - } - - return TRUE; - } - - return FALSE; -} - - -int __cdecl wmain(int argc, wchar_t *argv[]) -{ - WCHAR buf[MAX_PATH]; - - if (argc != 2) - { - wprintf(L"Usage: DriverTester.exe "); - return -1; - } - - if (!SearchPathW(NULL, - argv[1], - L".sys", - MAX_PATH, - buf, - NULL)) - { - wprintf(L"%s does not exist", argv[1]); - return -1; - } - - if (Initialize(argv[1])) - { - // - // Load using conventional SCM methods - // - UsermodeMethod(argv[1]); - - // - // Load using undocumented NtLoad/UnloadDriver - // - UndocumentedMethod(argv[1]); - - // - // Load using hidden unknown methods - // - SneakyUndocumentedMethods(argv[1]); - - Uninitialize(argv[1]); - } - - return 0; -} - diff --git a/rostests/win32/DriverLoading/Application/umode.c b/rostests/win32/DriverLoading/Application/umode.c deleted file mode 100644 index 9bf10580b4c..00000000000 --- a/rostests/win32/DriverLoading/Application/umode.c +++ /dev/null @@ -1,162 +0,0 @@ -#include "DriverTester.h" - - -BOOL -RegisterDriver(LPCWSTR lpDriverName, - LPCWSTR lpPathName) -{ - SC_HANDLE hSCManager; - SC_HANDLE hService; - - hSCManager = OpenSCManagerW(NULL, - NULL, - SC_MANAGER_ALL_ACCESS); - if (!hSCManager) - return FALSE; - -retry: - hService = CreateServiceW(hSCManager, - lpDriverName, - lpDriverName, - SERVICE_ALL_ACCESS, - SERVICE_KERNEL_DRIVER, - SERVICE_DEMAND_START, - SERVICE_ERROR_NORMAL, - lpPathName, - NULL, - NULL, - NULL, - NULL, - NULL); - - if (hService) - { - CloseServiceHandle(hService); - CloseServiceHandle(hSCManager); - return TRUE; - } - else - { - DWORD err = GetLastError(); - - if (err == ERROR_SERVICE_MARKED_FOR_DELETE) - { - StopDriver(DRIVER_NAME); - goto retry; - } - - CloseServiceHandle(hSCManager); - - // return TRUE if the driver is already registered - return (err == ERROR_SERVICE_EXISTS); - } -} - -BOOL -StartDriver(LPCWSTR lpDriverName) -{ - SC_HANDLE hSCManager; - SC_HANDLE hService; - BOOL bRet; - - hSCManager = OpenSCManagerW(NULL, - NULL, - SC_MANAGER_ALL_ACCESS); - if (!hSCManager) - return FALSE; - - hService = OpenServiceW(hSCManager, - lpDriverName, - SERVICE_ALL_ACCESS); - if (!hService) - { - CloseServiceHandle(hSCManager); - return FALSE; - } - - bRet = StartServiceW(hService, 0, NULL); - if (!bRet) - { - if (GetLastError() == ERROR_SERVICE_ALREADY_RUNNING) - { - wprintf(L"%s.sys already running\n", DRIVER_NAME); - bRet = TRUE; - } - } - - CloseServiceHandle(hService); - CloseServiceHandle(hSCManager); - - return bRet; -} - -BOOL -StopDriver(LPCWSTR lpDriverName) -{ - SC_HANDLE hSCManager; - SC_HANDLE hService; - SERVICE_STATUS serviceStatus; - BOOL bRet; - - hSCManager = OpenSCManagerW(NULL, - NULL, - SC_MANAGER_ALL_ACCESS); - if (!hSCManager) - return FALSE; - - hService = OpenServiceW(hSCManager, - lpDriverName, - SERVICE_ALL_ACCESS); - if (!hService) - { - CloseServiceHandle(hSCManager); - return FALSE; - } - - bRet = ControlService(hService, - SERVICE_CONTROL_STOP, - &serviceStatus); - if (!bRet) - { - if (GetLastError() == ERROR_SERVICE_NOT_ACTIVE) - { - wprintf(L"%s.sys wasn't running\n", DRIVER_NAME); - bRet = TRUE; - } - } - - CloseServiceHandle(hService); - CloseServiceHandle(hSCManager); - - return bRet; -} - -BOOL -UnregisterDriver(LPCWSTR lpDriverName) -{ - SC_HANDLE hService; - SC_HANDLE hSCManager; - BOOL bRet; - - hSCManager = OpenSCManagerW(NULL, - NULL, - SC_MANAGER_ALL_ACCESS); - if (!hSCManager) - return FALSE; - - hService = OpenServiceW(hSCManager, - lpDriverName, - SERVICE_ALL_ACCESS); - if (!hService) - { - CloseServiceHandle(hSCManager); - return FALSE; - } - - bRet = DeleteService(hService); - - CloseServiceHandle(hService); - CloseServiceHandle(hSCManager); - - return bRet; -} diff --git a/rostests/win32/DriverLoading/Application/undoc.c b/rostests/win32/DriverLoading/Application/undoc.c deleted file mode 100644 index 6a3f8c098a6..00000000000 --- a/rostests/win32/DriverLoading/Application/undoc.c +++ /dev/null @@ -1,276 +0,0 @@ -#include "DriverTester.h" - -static BOOL -SetPrivilege(BOOL bSet) -{ - TOKEN_PRIVILEGES tp; - HANDLE hToken; - LUID luid; - - if (!OpenProcessToken(GetCurrentProcess(), - TOKEN_ADJUST_PRIVILEGES, - &hToken)) - { - return FALSE; - } - - if(!LookupPrivilegeValue(NULL, - SE_LOAD_DRIVER_NAME, - &luid)) - { - CloseHandle(hToken); - return FALSE; - } - - tp.PrivilegeCount = 1; - tp.Privileges[0].Luid = luid; - - if (bSet) - { - tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; - } - else - { - tp.Privileges[0].Attributes = 0; - } - - AdjustTokenPrivileges(hToken, - FALSE, - &tp, - sizeof(TOKEN_PRIVILEGES), - NULL, - NULL); - if (GetLastError() != ERROR_SUCCESS) - { - CloseHandle(hToken); - return FALSE; - } - - CloseHandle(hToken); - - return TRUE; -} - - -BOOL -ConvertPath(LPCWSTR lpPath, - LPWSTR lpDevice) -{ - LPWSTR lpFullPath = NULL; - DWORD size; - - if (lpPath) - { - size = GetLongPathNameW(lpPath, - 0, - 0); - if (!size) - return FALSE; - - size = (size + 1) * sizeof(WCHAR); - - lpFullPath = HeapAlloc(GetProcessHeap(), - 0, - size); - if (!lpFullPath) - return FALSE; - - if (GetLongPathNameW(lpPath, - lpFullPath, - size)) - { - HANDLE hDevice; - POBJECT_NAME_INFORMATION pObjName; - NTSTATUS Status; - DWORD len; - - hDevice = CreateFileW(lpFullPath, - GENERIC_READ | GENERIC_WRITE, - 0, - NULL, - OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, - NULL); - - HeapFree(GetProcessHeap(), 0, lpFullPath); - - if(hDevice == INVALID_HANDLE_VALUE) - { - wprintf(L"[%x] Failed to open %s\n", GetLastError(), DRIVER_NAME); - return FALSE; - } - - size = MAX_PATH * sizeof(WCHAR); - pObjName = HeapAlloc(GetProcessHeap(), 0, size); - if (!pObjName) - return FALSE; - - Status = NtQueryObject(hDevice, - ObjectNameInformation, - pObjName, - size, - &size); - if (Status == STATUS_SUCCESS) - { - len = pObjName->Name.Length / sizeof(WCHAR); - wcsncpy(lpDevice, pObjName->Name.Buffer, len); - lpDevice[len] = UNICODE_NULL; - - HeapFree(GetProcessHeap(), 0, pObjName); - - return TRUE; - } - - HeapFree(GetProcessHeap(), 0, pObjName); - } - } - - return FALSE; -} - - -BOOL -NtStartDriver(LPCWSTR lpService) -{ - WCHAR szDriverPath[MAX_PATH]; - UNICODE_STRING DriverPath; - NTSTATUS Status = -1; - - wcscpy(szDriverPath, - L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\"); - wcscat(szDriverPath, - lpService); - - RtlInitUnicodeString(&DriverPath, - szDriverPath); - - if (SetPrivilege(TRUE)) - { - Status = NtLoadDriver(&DriverPath); - if (Status != STATUS_SUCCESS) - { - DWORD err = RtlNtStatusToDosError(Status); - wprintf(L"NtUnloadDriver failed [%lu]\n", err); - } - - SetPrivilege(FALSE); - } - - return (Status == STATUS_SUCCESS); -} - - -BOOL -NtStopDriver(LPCWSTR lpService) -{ - WCHAR szDriverPath[MAX_PATH]; - UNICODE_STRING DriverPath; - NTSTATUS Status = -1; - - wcscpy(szDriverPath, - L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\"); - wcscat(szDriverPath, - lpService); - - RtlInitUnicodeString(&DriverPath, - szDriverPath); - - if (SetPrivilege(TRUE)) - { - Status = NtUnloadDriver(&DriverPath); - if (Status != STATUS_SUCCESS) - { - DWORD err = RtlNtStatusToDosError(Status); - wprintf(L"NtUnloadDriver failed [%lu]\n", err); - } - - SetPrivilege(FALSE); - } - - return (Status == STATUS_SUCCESS); -} - - -// -// We shouldn't be able to call this from umode. -// Returns true if -// -BOOL -LoadVia_SystemLoadGdiDriverInformation(LPWSTR lpDriverPath) -{ - NTSTATUS Status; - SYSTEM_GDI_DRIVER_INFORMATION Buffer; - DWORD bufSize; - - bufSize = sizeof(SYSTEM_GDI_DRIVER_INFORMATION); - - ZeroMemory(&Buffer, bufSize); - RtlInitUnicodeString(&Buffer.DriverName, lpDriverPath); - - if (SetPrivilege(TRUE)) - { - Status = NtSetSystemInformation(SystemLoadGdiDriverInformation, - &Buffer, - bufSize); - if (Status == STATUS_PRIVILEGE_NOT_HELD) - { - wprintf(L"SystemLoadGdiDriverInformation can only be used in kmode.\n"); - } - else if (Status == STATUS_SUCCESS) - { - wprintf(L"SystemLoadGdiDriverInformation incorrectly loaded the driver\n"); - NtUnloadDriver(&Buffer.DriverName); - - return TRUE; - } - else - { - DWORD err = RtlNtStatusToDosError(Status); - wprintf(L"LoadVia_SystemLoadGdiDriverInformation failed [%lu]\n", err); - } - - SetPrivilege(FALSE); - } - - return FALSE; -} - - -BOOL -LoadVia_SystemExtendServiceTableInformation(LPWSTR lpDriverPath) -{ - NTSTATUS Status; - UNICODE_STRING Buffer; - DWORD bufSize; - - RtlInitUnicodeString(&Buffer, lpDriverPath); - bufSize = sizeof(UNICODE_STRING); - - if (SetPrivilege(TRUE)) - { - Status = NtSetSystemInformation(SystemExtendServiceTableInformation, - &Buffer, - bufSize); - if (Status == STATUS_PRIVILEGE_NOT_HELD) - { - wprintf(L"SystemExtendServiceTableInformation can only be used in kmode.\n"); - } - else if (Status == STATUS_SUCCESS) - { - wprintf(L"SystemExtendServiceTableInformation incorrectly loaded the driver\n"); - NtUnloadDriver(&Buffer); - - return TRUE; - } - else - { - DWORD err = RtlNtStatusToDosError(Status); - wprintf(L"LoadVia_SystemExtendServiceTableInformation failed [%lu] - 0x%x\n", err, Status); - } - - SetPrivilege(FALSE); - } - - return FALSE; -} - diff --git a/rostests/win32/DriverLoading/Driver/Driver.vcproj b/rostests/win32/DriverLoading/Driver/Driver.vcproj deleted file mode 100644 index ed3acacdf0f..00000000000 --- a/rostests/win32/DriverLoading/Driver/Driver.vcproj +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rostests/win32/DriverLoading/Driver/driver.c b/rostests/win32/DriverLoading/Driver/driver.c deleted file mode 100644 index 8d2e56182a8..00000000000 --- a/rostests/win32/DriverLoading/Driver/driver.c +++ /dev/null @@ -1,18 +0,0 @@ -#include - -VOID -DriverUnload(PDRIVER_OBJECT pDriverObject) -{ - DbgPrint("Test driver unloaded sucessfully\n"); -} - -NTSTATUS -DriverEntry(PDRIVER_OBJECT DriverObject, - PUNICODE_STRING RegistryPath) -{ - DriverObject->DriverUnload = DriverUnload; - - DbgPrint("Test driver loaded sucessfully\n"); - - return STATUS_SUCCESS; -} \ No newline at end of file diff --git a/rostests/win32/DriverLoading/DriverTester.sln b/rostests/win32/DriverLoading/DriverTester.sln deleted file mode 100644 index 8be28b2176e..00000000000 --- a/rostests/win32/DriverLoading/DriverTester.sln +++ /dev/null @@ -1,26 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Application", "Application\Application.vcproj", "{EABF0755-CD33-43CC-9062-DD5C5E0AC229}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Driver", "Driver\Driver.vcproj", "{983A51E3-3E69-4C26-B34B-7F17089CD4E3}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {EABF0755-CD33-43CC-9062-DD5C5E0AC229}.Debug|Win32.ActiveCfg = Debug|Win32 - {EABF0755-CD33-43CC-9062-DD5C5E0AC229}.Debug|Win32.Build.0 = Debug|Win32 - {EABF0755-CD33-43CC-9062-DD5C5E0AC229}.Release|Win32.ActiveCfg = Release|Win32 - {EABF0755-CD33-43CC-9062-DD5C5E0AC229}.Release|Win32.Build.0 = Release|Win32 - {983A51E3-3E69-4C26-B34B-7F17089CD4E3}.Debug|Win32.ActiveCfg = Debug|Win32 - {983A51E3-3E69-4C26-B34B-7F17089CD4E3}.Debug|Win32.Build.0 = Debug|Win32 - {983A51E3-3E69-4C26-B34B-7F17089CD4E3}.Release|Win32.ActiveCfg = Release|Win32 - {983A51E3-3E69-4C26-B34B-7F17089CD4E3}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/rostests/win32/cmd/cmd_test.rbuild b/rostests/win32/cmd/cmd_test.rbuild deleted file mode 100644 index 56b358501b5..00000000000 --- a/rostests/win32/cmd/cmd_test.rbuild +++ /dev/null @@ -1,16 +0,0 @@ - - . - include/reactos/wine - . - - 0x501 - rtshared - regtests - cmd_base - advapi32 - cmd_base - pseh - ntdll - setup.c - - diff --git a/rostests/win32/cmd/script_testsuite/lib/testlib.cmd b/rostests/win32/cmd/script_testsuite/lib/testlib.cmd deleted file mode 100644 index 5a917ab8f4a..00000000000 --- a/rostests/win32/cmd/script_testsuite/lib/testlib.cmd +++ /dev/null @@ -1,69 +0,0 @@ -:: -:: PROJECT: ReactOS CMD Testing Suite -:: LICENSE: GPL v2 or any later version -:: FILE: lib/testlib.cmd -:: PURPOSE: Library with functions available for all tests -:: COPYRIGHT: Copyright 2008 Colin Finck -:: - -:: Indicate that a test ran successfully -:_successful -set /a test_count+=1 -set /a successful_tests+=1 -goto :EOF - - -:: Indicate that a test failed -:: @param 1 Description of the test that failed -:_failed -set /a test_count+=1 -set /a failed_tests+=1 -echo Test "%~1" failed! -goto :EOF - - -:: Test whether a call succeeded -:: @param 1 The test command to run and check -:_test -%~1 - -if "%errorlevel%" == "0" ( - call :_successful -) else ( - call :_failed "%~1" -) -goto :EOF - - -:: Test whether a call failed -:: @param 1 The test command to run and check -:_testnot -%~1 - -if "%errorlevel%" == "0" ( - call :_failed "%~1" -) else ( - call :_successful -) -goto :EOF - - -:: Test the value of a variable -:: @param 1 The variable to check (like %test%) -:: @param 2 The variable name (like test) -:: @param 3 The expected result (like 5) -:: If this parameter wasn't given, _testvar checks if the variable is not "" -:_testvar -if "%~3" == "" ( - set testvar_operator=not -) else ( - set testvar_operator= -) - -if %testvar_operator% "%~1" == "%~3" ( - call :_successful -) else ( - call :_failed "if %%~2%% == %~3, actual result was %~1" -) - -goto :EOF diff --git a/rostests/win32/cmd/script_testsuite/run.cmd b/rostests/win32/cmd/script_testsuite/run.cmd deleted file mode 100644 index 57a6c1ccb29..00000000000 --- a/rostests/win32/cmd/script_testsuite/run.cmd +++ /dev/null @@ -1,43 +0,0 @@ -:: -:: PROJECT: ReactOS CMD Testing Suite -:: LICENSE: GPL v2 or any later version -:: FILE: run.cmd -:: PURPOSE: Runs the testing scripts -:: COPYRIGHT: Copyright 2008 Colin Finck -:: - -@echo off -cls -echo ReactOS CMD Testing Suite -echo ========================== -echo. - -:: Preparations -set failed_tests=0 -set successful_tests=0 -set test_count=0 - -if exist "temp\." ( - rmdir /s /q "temp" -) - -mkdir "temp" - -:: Run the tests -call :_runtest at -call :_runtest environment -call :_runtest if -call :_runtest redirect -call :_runtest set - -:: Print the summary and clean up -echo Executed %test_count% tests, %successful_tests% successful, %failed_tests% failed -rmdir /s /q "temp" -goto :EOF - -:: Functions -:_runtest -type "tests\%~1.cmd" > "temp\%~1.cmd" -type "lib\testlib.cmd" >> "temp\%~1.cmd" -call "temp\%~1.cmd" -goto :EOF diff --git a/rostests/win32/cmd/script_testsuite/tests/at.cmd b/rostests/win32/cmd/script_testsuite/tests/at.cmd deleted file mode 100644 index cf32abdce6c..00000000000 --- a/rostests/win32/cmd/script_testsuite/tests/at.cmd +++ /dev/null @@ -1,20 +0,0 @@ -:: -:: PROJECT: ReactOS CMD Testing Suite -:: LICENSE: GPL v2 or any later version -:: FILE: tests/at.cmd -:: PURPOSE: Tests for the correct parsing of the "@" character -:: COPYRIGHT: Copyright 2008 Colin Finck -:: - -:: Calling a command should work with any number of "@" characters prepended -call :_test "@echo Test >nul" -call :_test "@@echo Test >nul" - -:: Files with an "@" sign at the beginning should work as well -echo @^@echo Test > "temp\@file.cmd" -call :_test "call temp\@file.cmd >nul" - -echo ^@echo Test > "temp\@file.cmd" -call :_test "call temp\@file.cmd >nul" - -goto :EOF diff --git a/rostests/win32/cmd/script_testsuite/tests/environment.cmd b/rostests/win32/cmd/script_testsuite/tests/environment.cmd deleted file mode 100644 index fc552cc8ea2..00000000000 --- a/rostests/win32/cmd/script_testsuite/tests/environment.cmd +++ /dev/null @@ -1,47 +0,0 @@ -:: -:: PROJECT: ReactOS CMD Testing Suite -:: LICENSE: GPL v2 or any later version -:: FILE: tests/environment.cmd -:: PURPOSE: Tests for the environment (like automatically set variables) -:: COPYRIGHT: Copyright 2008 Colin Finck -:: - -:: ~0 contains the called path to the current script file -call :_testvar %~0 ~0 - -:: ~d0 contains the drive of the current script file -call :_testvar %~d0 ~d0 - -:: ~p0 contains the path of the current script file without the drive letter -call :_testvar %~p0 ~p0 - -:: ~dp0 contains the path to the current script file with the drive letter -call :_testvar %~dp0 ~dp0 - -:: ~dpf0 contains the full path to the current script file -call :_testvar %~dpf0 ~dpf0 - -:: ~n0 contains the name of the current script file without extension -call :_testvar %~n0 ~n0 - -:: ~x0 contains the extension of the current script file -call :_testvar %~x0 ~x0 - -:: ~a0 contains the attributes of the current script file -call :_testvar %~a0 ~a0 - -:: ~t0 contains the date and time of the current script file -call :_testvar "%~t0" ~t0 - -:: ~z0 contains the file size of the current script file in bytes -call :_testvar %~z0 ~z0 - -:: ~s0 and ~spf0 contain the short path to the current script file -call :_testvar %~s0 ~s0 -call :_testvar %~s0 ~s0 %~spf0% - -:: Now try to verify that the information is valid -set test_path=%~d0%~p0%~n0%~x0 -call :_testvar %test_path% test_path %~dpf0 - -goto :EOF diff --git a/rostests/win32/cmd/script_testsuite/tests/if.cmd b/rostests/win32/cmd/script_testsuite/tests/if.cmd deleted file mode 100644 index 33f6aa54c58..00000000000 --- a/rostests/win32/cmd/script_testsuite/tests/if.cmd +++ /dev/null @@ -1,26 +0,0 @@ -:: -:: PROJECT: ReactOS CMD Testing Suite -:: LICENSE: GPL v2 or any later version -:: FILE: tests/if.cmd -:: PURPOSE: Tests for the "if" command -:: COPYRIGHT: Copyright 2005 Royce Mitchell III -:: Copyright 2008 Colin Finck -:: - -:: Bugs in the if code -if not "=="=="==" call :_failed "if not "=="=="=="" -if "=="=="==" call :_successful - -if "1"=="2" ( - call :_failed "if "1"=="2"" -) else ( - call :_successful -) - -if not "1"=="1" ( - call :_failed "if "1"=="1"" -) else ( - call :_successful -) - -goto :EOF diff --git a/rostests/win32/cmd/script_testsuite/tests/redirect.cmd b/rostests/win32/cmd/script_testsuite/tests/redirect.cmd deleted file mode 100644 index 32c0eed1628..00000000000 --- a/rostests/win32/cmd/script_testsuite/tests/redirect.cmd +++ /dev/null @@ -1,28 +0,0 @@ -:: -:: PROJECT: ReactOS CMD Testing Suite -:: LICENSE: GPL v2 or any later version -:: FILE: tests/redirect.cmd -:: PURPOSE: Tests for redirections -:: COPYRIGHT: Copyright 2008 Colin Finck -:: - -:: One redirect, the file must exist -call :_test "echo moo > temp\redirect_temp.txt" -call :_test "type temp\redirect_temp.txt >nul" -call :_test "find "moo" temp\redirect_temp.txt >nul" - -:: Add the string yet another time to the file -call :_test "echo moo >> temp\redirect_temp.txt" - -set moo_temp=0 - -:: Count the moo's in the file (must be 2 now) -:: No idea why so many percent signs are necessary here :-) -call :_test "for /f "usebackq" %%%%i in (`findstr moo temp\redirect_temp.txt`) do set /a moo_temp+=1" -call :_testvar %moo_temp% moo_temp 2 - -:: Two redirects, the file in the middle mustn't exist after this call -call :_test "echo moo > temp\redirect_temp2.txt > nul" -call :_testnot "type temp\redirect_temp2.txt 2>nul" - -goto :EOF diff --git a/rostests/win32/cmd/script_testsuite/tests/set.cmd b/rostests/win32/cmd/script_testsuite/tests/set.cmd deleted file mode 100644 index 4e292bba72f..00000000000 --- a/rostests/win32/cmd/script_testsuite/tests/set.cmd +++ /dev/null @@ -1,104 +0,0 @@ -:: -:: PROJECT: ReactOS CMD Testing Suite -:: LICENSE: GPL v2 or any later version -:: FILE: tests/set.cmd -:: PURPOSE: Tests for the "set" command -:: COPYRIGHT: Copyright 2005 Royce Mitchell III -:: Copyright 2008 Colin Finck -:: - -:: Test the /A parameter -call :_test "set /a a=1" -call :_testvar %a% a 1 - -call :_test "set /a b=a" -call :_testvar %b% b 1 - -call :_test "set /a a=!5" -call :_testvar %a% a 0 - -call :_test "set /a a=!a" -call :_testvar %a% a 1 - -call :_test "set /a a=~5" -call :_testvar %a% a -6 - -call :_test "set /a a=5,a=-a" -call :_testvar %a% a -5 - -call :_test "set /a a=5*7" -call :_testvar %a% a 35 - -call :_test "set /a a=2000/10" -call :_testvar %a% a 200 - -call :_test "set /a a=42%%%%9" -call :_testvar %a% a 6 - -call :_test "set /a a=5%%2" -call :_testvar %a% a 5 - -call :_test "set /a a=42%13" -call :_testvar %a% a 423 - -call :_test "set /a a=7+9" -call :_testvar %a% a 16 - -call :_test "set /a a=9-7" -call :_testvar %a% a 2 - -set /a a=9^<^<2 -call :_testvar %a% a 36 - -set /a a=36^>^>2 -call :_testvar %a% a 9 - -set /a a=42^&9 -call :_testvar %a% a 8 - -set /a a=32^9 -call :_testvar %a% a 329 - -set /a a=32^^9 -call :_testvar %a% a 41 - -set /a a=10^|22 -call :_testvar %a% a 30 - -call :_test "set /a a=2,a*=3" -call :_testvar %a% a 6 - -call :_test "set /a a=11,a/=2" -call :_testvar %a% a 5 - -call :_test "set /a a=42,a%%%%=9" -call :_testvar %a% a 6 - -call :_test "set /a a=7,a+=9" -call :_testvar %a% a 16 - -call :_test "set /a a=9,a-=7" -call :_testvar %a% a 2 - -set /a a=42,a^&=9 -call :_testvar %a% a 8 - -set /a a=32,a^^=9 -call :_testvar %a% a 41 - -set /a a=10,a^|=22 -call :_testvar %a% a 30 - -set /a a=9,a^<^<=2 -call :_testvar %a% a 36 - -set /a a=36,a^>^>=2 -call :_testvar %a% a 9 - -call :_test "set /a a=1,2" -call :_testvar %a% a 1 - -call :_test "set /a a=(a=1,a+2)" -call :_testvar %a% a 3 - -goto :EOF diff --git a/rostests/win32/cmd/setup.c b/rostests/win32/cmd/setup.c deleted file mode 100644 index 66e28a8c8c8..00000000000 --- a/rostests/win32/cmd/setup.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2005 Casper S. Hornstrup - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#include -#include "regtests.h" - -_SetupOnce() -{ -} diff --git a/rostests/win32/cmd/stubs.rbuild b/rostests/win32/cmd/stubs.rbuild deleted file mode 100644 index 1c964b3eb62..00000000000 --- a/rostests/win32/cmd/stubs.rbuild +++ /dev/null @@ -1,84 +0,0 @@ - - FindFirstFileA@8 - GetLastError@0 - FindNextFileA@8 - FindClose@4 - GetFileAttributesA@4 - GetCurrentDirectoryA@8 - GetFullPathNameA@16 - CloseHandle@4 - CreateFileA@28 - Beep@8 - LoadStringA@16 - SetConsoleCP@4 - SetConsoleOutputCP@4 - WaitForSingleObject@8 - ReadConsoleInputA@16 - GetTickCount@0 - GetConsoleScreenBufferInfo@8 - FillConsoleOutputAttribute@20 - FillConsoleOutputCharacterA@20 - SetConsoleCursorPosition@8 - LoadLibraryA@4 - GetProcAddress@8 - SetCurrentDirectoryA@4 - SetConsoleMode@8 - CreateProcessA@40 - GetExitCodeProcess@8 - GetConsoleOutputCP@0 - GetTempPathA@8 - GetTempFileNameA@16 - GetCurrentProcess@0 - DuplicateHandle@28 - GetFileType@4 - SetFilePointer@16 - GetTimeFormatA@24 - GetDateFormatA@24 - GetEnvironmentVariableA@12 - GenerateConsoleCtrlEvent@8 - SetConsoleCtrlHandler@8 - GetVersionExA@4 - ExitProcess@4 - GetModuleFileNameA@12 - SetEnvironmentVariableA@8 - SetConsoleTextAttribute@8 - FlushConsoleInputBuffer@4 - WriteFile@20 - FormatMessageA@28 - LocalFree@4 - GetConsoleCP@0 - GetStdHandle@4 - FreeLibrary@4 - SetLastError@4 - SetStdHandle@8 - DeleteFileA@4 - FileTimeToLocalFileTime@8 - GetVolumeInformationA@32 - RemoveDirectoryA@4 - CreateDirectoryA@8 - GetLocaleInfoA@16 - GlobalMemoryStatus@4 - GetEnvironmentStrings@0 - FreeEnvironmentStringsA@4 - LocalFree - SetLocalTime@4 - GetLocalTime@4 - SetFileAttributesA@8 - SetFileApisToOEM@0 - GetConsoleMode@8 - SetConsoleCursorInfo@8 - ReadFile@20 - SetFileTime@16 - FileTimeToSystemTime@8 - GetDiskFreeSpaceA@20 - SetVolumeLabelA@8 - SetConsoleTitleA@4 - MoveFileExA@12 - GetFileTime@16 - Sleep@4 - MoveFileA@8 - CreateSemaphoreA@16 - InterlockedIncrement@4 - InterlockedDecrement@4 - ReleaseSemaphore@12 - diff --git a/rostests/win32/kernel32/directory.rbuild b/rostests/win32/kernel32/directory.rbuild deleted file mode 100644 index 40b39a7ea7e..00000000000 --- a/rostests/win32/kernel32/directory.rbuild +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/rostests/win32/kernel32/queuetest/queuetest.c b/rostests/win32/kernel32/queuetest/queuetest.c deleted file mode 100644 index 7b629c54900..00000000000 --- a/rostests/win32/kernel32/queuetest/queuetest.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * PROJECT: ReactOS Tests - * LICENSE: GPL - See COPYING in the top level directory - * FILE: queuetest.c - * PURPOSE: Usermode QueueUserWorkItem() testing - * PROGRAMMERS: Thomas Weidenmueller (w3seek@reactos.org) - */ - -#include -#include - -#define WT_EXECUTEINPERSISTENTIOTHREAD 0x00000040 -BOOL WINAPI QueueUserWorkItem(LPTHREAD_START_ROUTINE,PVOID,ULONG); - -#define TestProc(n) \ -DWORD CALLBACK TestProc##n(void *ctx)\ -{\ - printf("TestProc%d thread 0x%lu context 0x%p\n", n, GetCurrentThreadId(), ctx);\ - return 0;\ -} - -TestProc(1) -TestProc(2) -TestProc(3) -TestProc(4) -TestProc(5) -TestProc(6) - -int __cdecl -main(int argc, char* argv[]) -{ - PVOID x = (PVOID)0x12345; - QueueUserWorkItem(TestProc1, x, 0); - QueueUserWorkItem(TestProc2, x, WT_EXECUTELONGFUNCTION); - QueueUserWorkItem(TestProc3, x, WT_EXECUTEINIOTHREAD); - QueueUserWorkItem(TestProc4, x, WT_EXECUTEINIOTHREAD | WT_EXECUTELONGFUNCTION); - QueueUserWorkItem(TestProc5, x, WT_EXECUTEINPERSISTENTTHREAD); - QueueUserWorkItem(TestProc6, x, WT_EXECUTEINPERSISTENTIOTHREAD); - Sleep(INFINITE); - return 0; -} diff --git a/rostests/win32/kernel32/queuetest/queuetest.rbuild b/rostests/win32/kernel32/queuetest/queuetest.rbuild deleted file mode 100644 index 7fb8749a83f..00000000000 --- a/rostests/win32/kernel32/queuetest/queuetest.rbuild +++ /dev/null @@ -1,3 +0,0 @@ - - queuetest.c - diff --git a/rostests/win32/loadlib/loadlib.c b/rostests/win32/loadlib/loadlib.c deleted file mode 100644 index 391795f0323..00000000000 --- a/rostests/win32/loadlib/loadlib.c +++ /dev/null @@ -1,223 +0,0 @@ -/* - * ReactOS test program - - * - * loadlib.c - * - * Copyright (C) 2002 Robert Dickenson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include "loadlib.h" -#include -#include -#include - -#define APP_VERSION 1 -#define MAX_LIBS 25 - -#ifdef UNICODE -#define TARGET "UNICODE" -BOOL bUseAnsi = FALSE; -#else -#define TARGET "MBCS" -BOOL bUseAnsi = TRUE; -#endif -BOOL verbose_flagged = FALSE; -BOOL debug_flagged = FALSE; -BOOL loop_flagged = FALSE; -BOOL recursive_flagged = FALSE; - -HANDLE OutputHandle; -HANDLE InputHandle; - - -void dprintf(char* fmt, ...) -{ - va_list args; - char buffer[255]; - - va_start(args, fmt); - wvsprintfA(buffer, fmt, args); - WriteConsoleA(OutputHandle, buffer, lstrlenA(buffer), NULL, NULL); - va_end(args); -} - -long getinput(char* buf, int buflen) -{ - DWORD result; - - ReadConsoleA(InputHandle, buf, buflen, &result, NULL); - return (long)result; -} - -DWORD ReportLastError(void) -{ - DWORD dwError = GetLastError(); - if (dwError != ERROR_SUCCESS) { - PSTR msg = NULL; - if (FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM, - 0, dwError, MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT), (PSTR)&msg, 0, NULL)) { - if (msg != NULL) { - dprintf("ReportLastError() %d - %s\n", dwError, msg); - } else { - dprintf("ERROR: ReportLastError() %d - returned TRUE but with no msg string!\n", dwError); - } - } else { - dprintf("ReportLastError() %d - unknown error\n", dwError); - } - if (msg != NULL) { - LocalFree(msg); - } - } - return dwError; -} - -const char* appName(const char* argv0) -{ - const char* name; - - name = (const char*)strrchr(argv0, '\\'); - if (name != NULL) - return name + 1; - return argv0; -} - -int usage(const char* appName) -{ - dprintf("USAGE: %s libname [libname ...] [unicode]|[ansi] [loop][recurse]\n", appName); - dprintf("\tWhere libname(s) is one or more libraries to load.\n"); - dprintf("\t[unicode] - perform tests using UNICODE api calls\n"); - dprintf("\t[ansi] - perform tests using ANSI api calls\n"); - dprintf("\t default is %s\n", TARGET); - dprintf("\t[loop] - run test process in continuous loop\n"); - dprintf("\t[recurse] - load libraries recursively rather than sequentually\n"); - dprintf("\t[debug] - enable debug mode (unused)\n"); - dprintf("\t[verbose] - enable verbose output (unused)\n"); - return 0; -} - -DWORD LoadLibraryList(char** libnames, int counter, BOOL bUseAnsi) -{ - HMODULE hModule; - - dprintf("Attempting to LoadLibrary"); - if (bUseAnsi) { - dprintf("A(%s) - ", *libnames); - hModule = LoadLibraryA(*libnames); - } else { - int len; - wchar_t libnameW[500]; - len = mbstowcs(libnameW, *libnames, strlen(*libnames)); - if (len) { - libnameW[len] = L'\0'; - dprintf("W(%S) - ", libnameW); - hModule = LoadLibraryW(libnameW); - } else { - return ERROR_INVALID_PARAMETER; - } - } - if (hModule == NULL) { - dprintf("\nERROR: failed to obtain handle to module %s - %x\n", *libnames, hModule); - return ReportLastError(); - } - dprintf("%x\n", hModule); - - if (counter--) { - LoadLibraryList(++libnames, counter, bUseAnsi); - } - - if (!FreeLibrary(hModule)) { - dprintf("ERROR: failed to free module %s - %x\n", *libnames, hModule); - return ReportLastError(); - } else { - dprintf("FreeLibrary(%x) - successfull.\n", hModule); - } - return 0L; -} - -int __cdecl main(int argc, char* argv[]) -{ - char* libs[MAX_LIBS]; - int lib_count = 0; - int result = 0; - int i = 0; - - AllocConsole(); - InputHandle = GetStdHandle(STD_INPUT_HANDLE); - OutputHandle = GetStdHandle(STD_OUTPUT_HANDLE); - - dprintf("%s application - build %03d (default: %s)\n", appName(argv[0]), APP_VERSION, TARGET); - if (argc < 2) { - /*return */usage(appName(argv[0])); - } - memset(libs, 0, sizeof(libs)); - for (i = 1; i < argc; i++) { - if (lstrcmpiA(argv[i], "ansi") == 0) { - bUseAnsi = TRUE; - } else if (lstrcmpiA(argv[i], "unicode") == 0) { - bUseAnsi = FALSE; - } else if (lstrcmpiA(argv[i], "loop") == 0) { - loop_flagged = 1; - } else if (lstrcmpiA(argv[i], "recurse") == 0) { - recursive_flagged = 1; - } else if (lstrcmpiA(argv[i], "verbose") == 0) { - verbose_flagged = 1; - } else if (lstrcmpiA(argv[i], "debug") == 0) { - debug_flagged = 1; - } else { - if (lib_count < MAX_LIBS) { - libs[lib_count] = argv[i]; - ++lib_count; - } - } - } - if (lib_count) { - do { - if (recursive_flagged) { - result = LoadLibraryList(libs, lib_count - 1, bUseAnsi); - } else { - for (i = 0; i < lib_count; i++) { - result = LoadLibraryList(&libs[i], 0, bUseAnsi); - //if (result != 0) break; - } - } - } while (loop_flagged); - } else { - int len; - char buffer[500]; - do { - dprintf("\nEnter library name to attempt loading: "); - len = getinput(buffer, sizeof(buffer) - 1); - if (len > 2) { - char* buf = buffer; - buffer[len-2] = '\0'; - result = LoadLibraryList(&buf, 0, bUseAnsi); - } else break; - } while (!result && len); - } - dprintf("finished\n"); - return result; -} - - -#ifdef _NOCRT -char* args[] = { "loadlib.exe", "advapi32.dll", "user32.dll", "recurse"}; -int __cdecl mainCRTStartup(void) -{ - return main(3, args); -} -#endif /*__GNUC__*/ diff --git a/rostests/win32/loadlib/loadlib.h b/rostests/win32/loadlib/loadlib.h deleted file mode 100644 index c4b4acdb8c6..00000000000 --- a/rostests/win32/loadlib/loadlib.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * ReactOS test program - - * - * loadlib.h - * - * Copyright (C) 2002 Robert Dickenson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __LOADLIB_H__ -#define __LOADLIB_H__ - -#ifdef __cplusplus -extern "C" { -#endif - - -extern BOOL verbose_flagged; -extern BOOL debug_flagged; -extern BOOL loop_flagged; -extern BOOL recursive_flagged; - -DWORD ReportLastError(void); -long getinput(char* Buffer, int buflen); -void dprintf(char* fmt, ...); - - -#ifdef __cplusplus -}; -#endif - -#endif // __LOADLIB_H__ diff --git a/rostests/win32/msvcrt/fileio/_tfileio.c b/rostests/win32/msvcrt/fileio/_tfileio.c deleted file mode 100644 index e140dc3b87d..00000000000 --- a/rostests/win32/msvcrt/fileio/_tfileio.c +++ /dev/null @@ -1,421 +0,0 @@ -/* - * ReactOS test program - - * - * _tfileio.c - * - * Copyright (C) 2002 Robert Dickenson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#define WIN32_LEAN_AND_MEAN -#include -#include -#include -#include - - -#ifdef UNICODE -#define _tfopen _wfopen -#define _tunlink _wunlink -#define _TEOF WEOF -#define _gettchar getwchar -#define _puttchar putwchar -#define _THEX_FORMAT _T("0x%04x ") -#else /*UNICODE*/ -#define _tfopen fopen -#define _tunlink _unlink -#define _TEOF EOF -#define _gettchar getchar -#define _puttchar putchar -#define _THEX_FORMAT "0x%02x " -#endif /*UNICODE*/ - - -#define TEST_BUFFER_SIZE 200 -#define TEST_FILE_LINES 4 - -extern BOOL verbose_flagged; -extern BOOL status_flagged; - -static TCHAR test_buffer[TEST_BUFFER_SIZE]; - -static TCHAR dos_data[] = _T("line1: this is a bunch of readable text.\r\n")\ - _T("line2: some more printable text and punctuation !@#$%^&*()\r\n")\ - _T("line3: followed up with some numerals 1234567890\r\n")\ - _T("line4: done.\r\n"); - -static TCHAR nix_data[] = _T("line1: this is a bunch of readable text.\n")\ - _T("line2: some more printable text and punctuation !@#$%^&*()\n")\ - _T("line3: followed up with some numerals 1234567890\n")\ - _T("line4: done.\n"); - -#ifdef UNICODE -#define TEST_B1_FILE_SIZE ((((sizeof(dos_data)/2)-1)+TEST_FILE_LINES)/2) // (166+4)/2=85 -#define TEST_B2_FILE_SIZE (((sizeof(dos_data)/2)-1)*2) // (166*2) =332 -#define TEST_B3_FILE_SIZE ((((sizeof(nix_data)/2)-1)+TEST_FILE_LINES)/2) // (162+4)/2=83 -#define TEST_B4_FILE_SIZE (((sizeof(nix_data)/2)-1)*2) // (162*2) =324 -#else /*UNICODE*/ -#define TEST_B1_FILE_SIZE (sizeof(dos_data)-1+TEST_FILE_LINES) // (166+4)=170 -#define TEST_B2_FILE_SIZE (sizeof(dos_data)-1-TEST_FILE_LINES) // (166-4)=162 -#define TEST_B3_FILE_SIZE (sizeof(nix_data)-1+TEST_FILE_LINES) // (162+4)=166 -#define TEST_B4_FILE_SIZE (sizeof(nix_data)-1) // (162) =162 -#endif /*UNICODE*/ - - -// result = create_test_file(file_name, _T("wb"), _T("rb"), file_data); - -static BOOL test_file_truncate(TCHAR* file_name) -{ - BOOL result = FALSE; - int count = -1; - int error_code; - TCHAR ch; - TCHAR* file_data = _T("this file should have been truncated to zero bytes..."); - FILE *file = _tfopen(file_name, _T("wb")); - - if (verbose_flagged) { - _tprintf(_T("test_file_truncate(\"%s\")\n"), file_name); - } - - if (file != NULL) { - if (_fputts(file_data, file) != _TEOF) { - } else { - _tprintf(_T("ERROR: failed to write data to file \"%s\"\n"), file_name); - _tprintf(_T("ERROR: ferror returned %d\n"), ferror(file)); - } - fclose(file); - } else { - _tprintf(_T("ERROR: failed to open/create file \"%s\" for output\n"), file_name); - _tprintf(_T("ERROR: ferror returned %d\n"), ferror(file)); - } - - file = _tfopen(file_name, _T("wb")); - if (file != NULL) { - error_code = ferror(file); - if (error_code) { - _tprintf(_T("ERROR: (%s) ferror returned %d\n"), file_name, error_code); - } - fclose(file); - } else { - _tprintf(_T("ERROR: (%s) failed to open file for truncating\n"), file_name); - } - - file = _tfopen(file_name, _T("rb")); - if (file != NULL) { - count = 0; - while ((ch = _fgettc(file)) != _TEOF) { - if (verbose_flagged) { - _tprintf(_THEX_FORMAT, ch); - } - ++count; - } - error_code = ferror(file); - if (error_code) { - _tprintf(_T("ERROR: (%s) ferror returned %d after reading\n"), file_name, error_code); - perror("Read error"); - } - fclose(file); - } else { - _tprintf(_T("ERROR: (%s) failed to open file for reading\n"), file_name); - } - if (count) { - result = TRUE; - } - return result; -} - -static BOOL create_output_file(TCHAR* file_name, TCHAR* file_mode, TCHAR* file_data) -{ - BOOL result = FALSE; - FILE *file = _tfopen(file_name, file_mode); - if (file != NULL) { - if (_fputts(file_data, file) != _TEOF) { - result = TRUE; - } else { - _tprintf(_T("ERROR: failed to write data to file \"%s\"\n"), file_name); - _tprintf(_T("ERROR: ferror returned %d\n"), ferror(file)); - } - fclose(file); - } else { - _tprintf(_T("ERROR: failed to open/create file \"%s\" for output\n"), file_name); - _tprintf(_T("ERROR: ferror returned %d\n"), ferror(file)); - } - return result; -} - -static BOOL verify_output_file(TCHAR* file_name, TCHAR* file_mode, TCHAR* file_data) -{ - int error_code; - int offset = 0; - int line_num = 0; - BOOL result = FALSE; - BOOL error_flagged = FALSE; - FILE* file = _tfopen(file_name, file_mode); - if (file == NULL) { - _tprintf(_T("ERROR: (%s) Can't open file for reading\n"), file_name); - _tprintf(_T("ERROR: ferror returned %d\n"), ferror(file)); - return FALSE; - } else if (status_flagged) { - _tprintf(_T("STATUS: (%s) opened file for reading\n"), file_name); - } - while (_fgetts(test_buffer, TEST_BUFFER_SIZE, file)) { - int length = _tcslen(test_buffer); - int req_len = _tcschr(file_data+offset, _T('\n')) - (file_data+offset) + 1; - - ++line_num; - if (length > req_len) { - _tprintf(_T("ERROR: read excess bytes from line %d, length %d, but expected %d\n"), line_num, length, req_len); - error_flagged = TRUE; - break; - } - if (length < req_len) { - _tprintf(_T("ERROR: read to few bytes from line %d, length %d, but expected %d\n"), line_num, length, req_len); - error_flagged = TRUE; - break; - } - if (status_flagged) { - _tprintf(_T("STATUS: Verifying %d bytes read from line %d\n"), length, line_num); - } - if (_tcsncmp(test_buffer, file_data+offset, length - 1) == 0) { - result = TRUE; - } else { - if (status_flagged) { - int i; - _tprintf(_T("WARNING: (%s) failed to verify file\n"), file_name); - for (i = 0; i < length; i++) { - if (file_data[offset+i] != test_buffer[i]) { - _tprintf(_T("line %d, offset %d expected: 0x%04x found: 0x%04x\n"), line_num, i, (int)file_data[offset+i], (int)test_buffer[i]); - } - } - _tprintf(_T("\n")); - } else { - error_flagged = TRUE; - } - } - offset += length; - } - error_code = ferror(file); - if (error_code) { - _tprintf(_T("ERROR: (%s) ferror returned %d after reading\n"), file_name, error_code); - perror("Read error"); - } - if (!line_num) { - _tprintf(_T("ERROR: (%s) failed to read from file\n"), file_name); - } - if (error_flagged == TRUE) { - _tprintf(_T("ERROR: (%s) failed to verify file\n"), file_name); - result = FALSE; - } - fclose(file); - return result; -} - -static int create_test_file(TCHAR* file_name, TCHAR* write_mode, TCHAR* read_mode, TCHAR* file_data) -{ - if (status_flagged) { - _tprintf(_T("STATUS: Attempting to create output file %s\n"), file_name); - } - if (create_output_file(file_name, write_mode, file_data)) { - if (status_flagged) { - _tprintf(_T("STATUS: Attempting to verify output file %s\n"), file_name); - } - if (verify_output_file(file_name, read_mode, file_data)) { - if (status_flagged) { - _tprintf(_T("SUCCESS: %s verified ok\n"), file_name); - } - } else { - //_tprintf(_T("ERROR: failed to verify file %s\n"), file_name); - return 2; - } - } else { - _tprintf(_T("ERROR: failed to create file %s\n"), file_name); - return 1; - } - return 0; -} - -static int check_file_size(TCHAR* file_name, TCHAR* file_mode, int expected) -{ - int count = 0; - FILE* file; - TCHAR ch; - int error_code; - - if (status_flagged) { - //_tprintf(_T("STATUS: (%s) checking for %d bytes in %s mode\n"), file_name, expected, _tcschr(file_mode, _T('b')) ? _T("binary") : _T("text")); - _tprintf(_T("STATUS: (%s) checking for %d bytes with mode %s\n"), file_name, expected, file_mode); - } - file = _tfopen(file_name, file_mode); - if (file == NULL) { - _tprintf(_T("ERROR: (%s) failed to open file for reading\n"), file_name); - return 1; - } - while ((ch = _fgettc(file)) != _TEOF) { - if (verbose_flagged) { - _tprintf(_THEX_FORMAT, ch); - } - ++count; - } - error_code = ferror(file); - if (error_code) { - _tprintf(_T("ERROR: (%s) ferror returned %d after reading\n"), file_name, error_code); - perror("Read error"); - } - - if (verbose_flagged) { -// _puttc(_T('\n'), stdout); - } - fclose(file); - if (count == expected) { - if (status_flagged) { - _tprintf(_T("PASSED: (%s) read %d bytes\n"), file_name, count); - } - } else { - _tprintf(_T("FAILED: (%s) read %d bytes but expected %d using mode \"%s\"\n"), file_name, count, expected, file_mode); - } - return (count == expected) ? 0 : -1; -} - -static int test_console_io(void) -{ - TCHAR buffer[81]; - TCHAR ch; - int i, j; - - _tprintf(_T("Enter a line for echoing:\n")); - - //for (i = 0; (i < 80) && ((ch = _gettchar()) != _TEOF) && (ch != _T('\n')); i++) { - for (i = 0; (i < 80) && ((ch = _gettc(stdin)) != _TEOF) && (ch != _T('\n')); i++) { - buffer[i] = (TCHAR)ch; - } - buffer[i] = _T('\0'); - for (j = 0; j < i; j++) { - _puttc(buffer[j], stdout); - } - _puttc(_T('\n'), stdout); - _tprintf(_T("%s\n"), buffer); - return 0; -} - -static int test_console_getchar(void) -{ - int result = 0; - TCHAR ch; - - _tprintf(_T("Enter lines for dumping or to finish:\n")); - - //while ((ch = _gettchar()) != _TEOF) { - while ((ch = _gettc(stdin)) != _TEOF) { - _tprintf(_THEX_FORMAT, ch); - //printf("0x%04x ", ch); - } - return result; -} - -static int test_console_putch(void) -{ - int result = 0; - - _putch('1'); - _putch('@'); - _putch('3'); - _putch(':'); - _putch('\n'); - _putch('a'); - _putch('B'); - _putch('c'); - _putch(':'); - _putch('\n'); - return result; -} - -static int test_unlink_files(void) -{ - int result = 0; - - //printf("sizeof dos_data: %d\n", sizeof(dos_data)); - //printf("sizeof nix_data: %d\n", sizeof(nix_data)); - - result |= _tunlink(_T("binary.dos")); - result |= _tunlink(_T("binary.nix")); - result |= _tunlink(_T("text.dos")); - result |= _tunlink(_T("text.nix")); - return result; -} - -static int test_text_fileio(TCHAR* file_name, TCHAR* file_data, int tsize, int bsize) -{ - int result = 0; - - result = create_test_file(file_name, _T("w"), _T("r"), file_data); - result = check_file_size(file_name, _T("r"), tsize); - result = check_file_size(file_name, _T("rb"), bsize); - return result; -} - -static int test_binary_fileio(TCHAR* file_name, TCHAR* file_data, int tsize, int bsize) -{ - int result = 0; - - result = create_test_file(file_name, _T("wb"), _T("rb"), file_data); - result = check_file_size(file_name, _T("r"), tsize); - result = check_file_size(file_name, _T("rb"), bsize); - return result; -} - -static int test_files(int test_num, char* type) -{ - int result = 0; - - printf("performing test: %d (%s)\n", test_num, type); - - - if (test_file_truncate(_T("zerosize.foo"))) { - printf("System unable to truncate files yet, unlinking:\n"); - test_unlink_files(); - } - - switch (test_num) { - case 1: - result = test_text_fileio(_T("text.dos"), dos_data, 166, TEST_B1_FILE_SIZE); - break; - case 2: - result = test_binary_fileio(_T("binary.dos"), dos_data, TEST_B2_FILE_SIZE, 166); - break; - case 3: - result = test_text_fileio(_T("text.nix"), nix_data, 162, TEST_B3_FILE_SIZE); - break; - case 4: - result = test_binary_fileio(_T("binary.nix"), nix_data, TEST_B4_FILE_SIZE, 162); - break; - case 5: - result = test_console_io(); - break; - case 6: - result = test_console_getchar(); - break; - case 7: - result = test_console_putch(); - break; - case -1: - result = test_unlink_files(); - break; - default: - _tprintf(_T("no test number selected\n")); - break; - } - return result; -} diff --git a/rostests/win32/msvcrt/fileio/fileio.c b/rostests/win32/msvcrt/fileio/fileio.c deleted file mode 100644 index dd6659bf86a..00000000000 --- a/rostests/win32/msvcrt/fileio/fileio.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * ReactOS test program - - * - * _fileio.c - * - * Copyright (C) 2002 Robert Dickenson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#undef UNICODE -#undef _UNICODE -#include "_tfileio.c" - - -int run_ansi_tests(int test_num) -{ - return test_files(test_num, "ANSI"); -} diff --git a/rostests/win32/msvcrt/fileio/main.c b/rostests/win32/msvcrt/fileio/main.c deleted file mode 100644 index 3ac8f0a70c8..00000000000 --- a/rostests/win32/msvcrt/fileio/main.c +++ /dev/null @@ -1,124 +0,0 @@ -/* - * ReactOS test program - - * - * main.c - * - * Copyright (C) 2002 Robert Dickenson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#define WIN32_LEAN_AND_MEAN -#include -#include -#include -#include -#include - -#include "main.h" - - -#define VERSION 1 - -#ifdef UNICODE -#define TARGET "UNICODE" -#else -#define TARGET "MBCS" -#endif - -BOOL verbose_flagged = 0; -BOOL status_flagged = 0; - -int usage(char* argv0) -{ - printf("USAGE: %s test_id [unicode]|[ansi] [clean]|[status][verbose]\n", argv0); - printf("\tWhere test_id is one of:\n"); - printf("\t0 - (default) regression mode, run tests 1-4 displaying failures only\n"); - printf("\t1 - Write DOS style eol data to file in text mode (text.dos)\n"); - printf("\t2 - Write NIX style eol data to file in binary mode (binary.dos)\n"); - printf("\t3 - Write DOS style eol data to file in text mode (text.nix)\n"); - printf("\t4 - Write NIX style eol data to file in binary mode (binary.nix)\n"); - printf("\t5 - Echo console line input\n"); - printf("\t6 - Dump console line input in hex format\n"); - printf("\t7 - The source code is your friend\n"); - printf("\t[unicode] - perform tests using UNICODE versions of library functions\n"); - printf("\t[ansi] - perform tests using ANSI versions of library functions\n"); - printf("\t If neither unicode or ansi is specified build default is used\n"); - printf("\t[clean] - delete all temporary test output files\n"); - printf("\t[status] - enable extra status display while running\n"); - printf("\t[verbose] - enable verbose output when running\n"); - return 0; -} - -int __cdecl main(int argc, char* argv[]) -{ - int test_num = 0; - int version = 0; - int result = 0; - int i = 0; - - printf("%s test application - build %03d (default: %s)\n", argv[0], VERSION, TARGET); - if (argc < 2) { - return usage(argv[0]); - } - for (i = 1; i < argc; i++) { - if (strstr(argv[i], "ansi") || strstr(argv[i], "ANSI")) { - version = 1; - } else if (strstr(argv[i], "unicode") || strstr(argv[i], "UNICODE")) { - version = 2; - } else if (strstr(argv[i], "clean") || strstr(argv[i], "CLEAN")) { - test_num = -1; - } else if (strstr(argv[i], "verbose") || strstr(argv[i], "VERBOSE")) { - verbose_flagged = 1; - } else if (strstr(argv[i], "status") || strstr(argv[i], "STATUS")) { - status_flagged = 1; - } else { - test_num = atoi(argv[1]); - //if (test_num < 0 - } - } - for (i = test_num; i <= test_num; i++) { - if (!test_num) { - test_num = 4; - i = 1; - } - switch (version) { - case 1: - result = run_ansi_tests(i); - break; - case 2: - result = run_unicode_tests(i); - break; - default: - result = run_ansi_tests(i); - result = run_unicode_tests(i); - break; - } - } - printf("finished\n"); - return result; -} - -#ifndef __GNUC__ - -char* args[] = { "fileio.exe", "0", "unicode", "verbose"}; - -int __cdecl mainCRTStartup(void) -{ - main(2, args); - return 0; -} - -#endif /*__GNUC__*/ diff --git a/rostests/win32/msvcrt/fileio/main.h b/rostests/win32/msvcrt/fileio/main.h deleted file mode 100644 index df22b72516d..00000000000 --- a/rostests/win32/msvcrt/fileio/main.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * ReactOS test program - - * - * main.h - * - * Copyright (C) 2002 Robert Dickenson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __MAIN_H__ -#define __MAIN_H__ - -#ifdef __cplusplus -extern "C" { -#endif - - -int app_main(int argc, char* argv[]); -DWORD GetInput(char* Buffer, int buflen); - -int test_ansi_files(int test_num); -int test_unicode_files(int test_num); - - -#ifdef __cplusplus -}; -#endif - -#endif // __MAIN_H__ diff --git a/rostests/win32/msvcrt/fileio/wfileio.c b/rostests/win32/msvcrt/fileio/wfileio.c deleted file mode 100644 index 1f8fe376a71..00000000000 --- a/rostests/win32/msvcrt/fileio/wfileio.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * ReactOS test program - - * - * wfileio.c - * - * Copyright (C) 2002 Robert Dickenson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#define UNICODE -#define _UNICODE -#include "_tfileio.c" - - -int run_unicode_tests(int test_num) -{ - return test_files(test_num, "UNICODE"); -} diff --git a/rostests/win32/rpcrt4/context_handles/client.c b/rostests/win32/rpcrt4/context_handles/client.c deleted file mode 100644 index 5540cfd26a5..00000000000 --- a/rostests/win32/rpcrt4/context_handles/client.c +++ /dev/null @@ -1,457 +0,0 @@ -#include -#include -#include -#include "ctx.h" - -#define TYPE_FORMAT_STRING_SIZE 23 -#define PROC_FORMAT_STRING_SIZE 21 -#define TRANSMIT_AS_TABLE_SIZE 0 -#define WIRE_MARSHAL_TABLE_SIZE 0 - -typedef struct _MIDL_TYPE_FORMAT_STRING - { - short Pad; - unsigned char Format[ TYPE_FORMAT_STRING_SIZE ]; - } MIDL_TYPE_FORMAT_STRING; - -typedef struct _MIDL_PROC_FORMAT_STRING - { - short Pad; - unsigned char Format[ PROC_FORMAT_STRING_SIZE ]; -} MIDL_PROC_FORMAT_STRING; - -extern const MIDL_STUB_DESC hello_StubDesc; -extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString; -//extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;*/ - -/***************************************************************** - * Modified from midl-generated stubs * - *****************************************************************/ - - -void m_CtxOpen( - /* [out] */ PCTXTYPE __RPC_FAR *pphContext, - /* [in] */ long Value) -{ - RPC_BINDING_HANDLE _Handle = 0; - - RPC_MESSAGE _RpcMessage; - - MIDL_STUB_MESSAGE _StubMsg; - - char *ctx, *buf; - int i; - - printf("\n*******************************************************************\n"); - printf("**** CtxOpen() ***\n"); - printf("*******************************************************************\n\n"); - - if(!pphContext) - { - RpcRaiseException(RPC_X_NULL_REF_POINTER); - } - RpcTryFinally - { - NdrClientInitializeNew( - ( PRPC_MESSAGE )&_RpcMessage, - ( PMIDL_STUB_MESSAGE )&_StubMsg, - ( PMIDL_STUB_DESC )&hello_StubDesc, - 0); - - - _Handle = hBinding; - - - _StubMsg.BufferLength = 4U; - NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle ); - - *(( long __RPC_FAR * )_StubMsg.Buffer)++ = Value; - - NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer ); - - if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) - NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] ); - - - printf("Before NdrClientContextUnmarshall: Buflen=%d\nBuffer: ", _StubMsg.RpcMsg->BufferLength); - for(buf = _StubMsg.Buffer, i = 0; i < _StubMsg.RpcMsg->BufferLength; i++) - printf("0x%x, ", buf[i] & 0x0FF); - printf("\n\n"); - - *pphContext = (void *)0; - NdrClientContextUnmarshall( - ( PMIDL_STUB_MESSAGE )&_StubMsg, - ( NDR_CCONTEXT __RPC_FAR * )pphContext, - _Handle); - - ctx = (char*)*pphContext; - printf("\nNdrClientContextUnmarshall returned: handle=0x%p\n", ctx); - printf("00: 0x%x <- obviously pointer to binding handle copyed from _Handle\n", *((int*)ctx)); - ctx+=4; - printf("04: 0x%x <- unknown field\n", *((int*)ctx)); - printf("08: "); - - for(ctx+=4, i = 0; i < 20; i++) - printf("0x%x,", *(ctx+i) & 0x0FF); printf(" <- ndr 20 bytes\n\n"); - - printf("Buflen=%d, Buffer: ", _StubMsg.BufferLength); - for(buf = _StubMsg.BufferStart; buf < _StubMsg.BufferEnd; buf++) - printf("0x%x,", *buf & 0x0FF); - printf("\n"); - - - } - RpcFinally - { - NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg ); - - } - RpcEndFinally - -} - -void m_CtxOpen2( - /* [out] */ PCTXTYPE __RPC_FAR *pphContext, - /* [in] */ long Value) -{ - - RPC_BINDING_HANDLE _Handle = 0; - - RPC_MESSAGE _RpcMessage; - - MIDL_STUB_MESSAGE _StubMsg; - - char buf[255]; - - NdrClientInitializeNew( - ( PRPC_MESSAGE )&_RpcMessage, - ( PMIDL_STUB_MESSAGE )&_StubMsg, - ( PMIDL_STUB_DESC )&hello_StubDesc, - 0); - - - _Handle = hBinding; - - - _StubMsg.BufferLength = 4U; - NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle ); - - *(( long __RPC_FAR * )_StubMsg.Buffer)++ = Value; - - NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer ); - - if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) - NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] ); - - *pphContext = (void *)0; - - RpcTryExcept - { - NdrClientContextUnmarshall( - ( PMIDL_STUB_MESSAGE )&_StubMsg, - NULL, - _Handle); - } - RpcExcept(1) - { - printf("NdrClientContextUnmarshall reported exception = %d\n", RpcExceptionCode()); - } - RpcEndExcept - - - - RpcTryExcept - { - NdrClientContextUnmarshall( - ( PMIDL_STUB_MESSAGE )&_StubMsg, - (NDR_CCONTEXT __RPC_FAR * )pphContext, - NULL); - } - RpcExcept(1) - { - printf("NdrClientContextUnmarshall reported exception = %d\n", RpcExceptionCode()); - } - RpcEndExcept - - - RpcTryExcept - { - NdrClientContextMarshall( - ( PMIDL_STUB_MESSAGE )&_StubMsg, - NULL, - 1); - } - RpcExcept(1) - { - printf("NdrClientContextMarshall reported exception = %d\n", RpcExceptionCode()); - } - RpcEndExcept - - RpcTryExcept - { - NDRCContextUnmarshall( NULL, _Handle, buf, _RpcMessage.DataRepresentation ); - } - RpcExcept(1) - { - printf("NDRCContextUnmarshall reported exception = %d\n", RpcExceptionCode()); - } - RpcEndExcept - - - NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg ); - - -} - -void m_CtxHello( - /* [in] */ PCTXTYPE phContext) -{ - - RPC_BINDING_HANDLE _Handle = 0; - - RPC_MESSAGE _RpcMessage; - - MIDL_STUB_MESSAGE _StubMsg; - - char *buf; - int i; - - printf("\n*******************************************************************\n"); - printf("**** CtxHello() ***\n"); - printf("*******************************************************************\n\n"); - - RpcTryFinally - { - NdrClientInitializeNew( - ( PRPC_MESSAGE )&_RpcMessage, - ( PMIDL_STUB_MESSAGE )&_StubMsg, - ( PMIDL_STUB_DESC )&hello_StubDesc, - 1); - - - if(phContext != 0) - { - _Handle = NDRCContextBinding(( NDR_CCONTEXT )phContext);; - - } - else - { - RpcRaiseException(RPC_X_SS_IN_NULL_CONTEXT); - } - - _StubMsg.BufferLength = 20U; - NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle ); - - NdrClientContextMarshall( - ( PMIDL_STUB_MESSAGE )&_StubMsg, - ( NDR_CCONTEXT )phContext, - 1); - printf("After NdrClientContextMarshall: Buflen=%d\nBuffer: ", _StubMsg.BufferLength ); - for(buf = _StubMsg.Buffer, i = 0; i < _StubMsg.BufferLength; i++) - printf("0x%x, ", buf[i] & 0x0FF); - printf("\n\n"); - - NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer ); - - } - RpcFinally - { - NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg ); - - } - RpcEndFinally - -} - - -void m_CtxClose( - /* [out][in] */ PCTXTYPE __RPC_FAR *pphContext) -{ - - RPC_BINDING_HANDLE _Handle = 0; - - RPC_MESSAGE _RpcMessage; - - MIDL_STUB_MESSAGE _StubMsg; - char *buf; - int i; - - printf("\n*******************************************************************\n"); - printf("**** CtxClose() ***\n"); - printf("*******************************************************************\n\n"); - - if(!pphContext) - { - RpcRaiseException(RPC_X_NULL_REF_POINTER); - } - RpcTryFinally - { - NdrClientInitializeNew( - ( PRPC_MESSAGE )&_RpcMessage, - ( PMIDL_STUB_MESSAGE )&_StubMsg, - ( PMIDL_STUB_DESC )&hello_StubDesc, - 2); - - - if(*pphContext != 0) - { - _Handle = NDRCContextBinding(( NDR_CCONTEXT )*pphContext);; - - } - - _StubMsg.BufferLength = 20U; - NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle ); - - NdrClientContextMarshall( - ( PMIDL_STUB_MESSAGE )&_StubMsg, - ( NDR_CCONTEXT )*pphContext, - 0); - - NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer ); - - if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) - NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[14] ); - - - printf("Before NdrClientContextUnmarshall: Buflen=%d\nBuffer: ", _StubMsg.BufferLength ); - for(buf = _StubMsg.Buffer, i = 0; i < _StubMsg.BufferLength; i++) - printf("0x%x, ", buf[i] & 0x0FF); - printf("\n\n"); - - NdrClientContextUnmarshall( - ( PMIDL_STUB_MESSAGE )&_StubMsg, - ( NDR_CCONTEXT __RPC_FAR * )pphContext, - _Handle); - - - printf("\nNdrClientContextUnmarshall returned: handle=0x%p\n", *pphContext); - - - } - RpcFinally - { - NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg ); - - } - RpcEndFinally - -} - -int interactive = 0; -void interact() -{ - if(interactive) - { - printf("\nPress any key to continue..."); - getch(); - printf("\n\n"); - } -} - -void main(int argc, char **argv) -{ - RPC_STATUS status; - unsigned long ulCode; - PCTXTYPE hContext; - char *pszStringBinding = NULL; - RPC_BINDING_HANDLE Handle = 0; - char buffer[255]; - - int test_num = 0; - int test_value = 31337; - - if(argc<2) - { - printf("USAGE: client.exe [test_value] [interactive]\n" - "Available tests:\n" - "0. General test\n" - "1. NULL pointer test\n" - "2. Context rundown routine"); - return; - } - - test_num = atoi(argv[1]); - if(argc>2) test_value = atoi(argv[2]); - if(argc>3) interactive = 1; - - status = RpcStringBindingCompose(NULL, - "ncacn_np", - NULL, - "\\pipe\\hello", - NULL, - &pszStringBinding); - - if (status) - { - printf("RpcStringBindingCompose %x\n", status); - exit(status); - } - - status = RpcBindingFromStringBinding(pszStringBinding, &hBinding); - - if (status) - { - printf("RpcBindingFromStringBinding %x\n", status); - exit(status); - } - - RpcStringFree(&pszStringBinding); - - switch(test_num) - { - case 0: - m_CtxOpen(&hContext, test_value); - RpcBindingFree(&hBinding); - m_CtxHello(hContext); - interact(); - m_CtxClose(&hContext); - break; - case 1: - ///////////////////////////////////////////////////////////////////////////////////////// - RpcTryExcept - { - Handle = NDRCContextBinding(NULL); - printf("NDRCContextBinding(NULL) returned %p\n", Handle); - } - RpcExcept(1) - { - printf("NDRCContextBinding(NULL) reported exception = %d\n", RpcExceptionCode()); - } - RpcEndExcept - - m_CtxOpen2(&hContext, test_value); - - ///////////////////////////////////////////////////////////////////////////////////////// - RpcTryExcept - { - NDRCContextMarshall(NULL, &buffer); - printf("NDRCContextMarshall(NULL) returned %p\n", Handle); - } - RpcExcept(1) - { - printf("NDRCContextMarshall(NULL) reported exception = %d\n", RpcExceptionCode()); - } - RpcEndExcept - ///////////////////////////////////////////////////////////////////////////////////////// - break; - case 2: - CtxOpen(&hContext, test_value); - interact(); - ExitProcess(0); - break; - default: - printf("Unknown test %d\n", test_num); - } - -} - - -void __RPC_FAR * __RPC_USER midl_user_allocate(size_t len) -{ - return(malloc(len)); -} - -void __RPC_USER midl_user_free(void __RPC_FAR * ptr) -{ - free(ptr); -} diff --git a/rostests/win32/rpcrt4/context_handles/ctx.acf b/rostests/win32/rpcrt4/context_handles/ctx.acf deleted file mode 100644 index c02c5d1a213..00000000000 --- a/rostests/win32/rpcrt4/context_handles/ctx.acf +++ /dev/null @@ -1,8 +0,0 @@ -//file hello.idl -[ - implicit_handle(handle_t hBinding) -] -interface hello -{ - -} \ No newline at end of file diff --git a/rostests/win32/rpcrt4/context_handles/ctx.h b/rostests/win32/rpcrt4/context_handles/ctx.h deleted file mode 100644 index 3e6eee23cc5..00000000000 --- a/rostests/win32/rpcrt4/context_handles/ctx.h +++ /dev/null @@ -1,80 +0,0 @@ - -#pragma warning( disable: 4049 ) /* more than 64k source lines */ - -/* this ALWAYS GENERATED file contains the definitions for the interfaces */ - - - /* File created by MIDL compiler version 5.03.0280 */ -/* at Fri Mar 24 18:32:16 2006 - */ -/* Compiler settings for ctx.idl: - Os (OptLev=s), W1, Zp8, env=Win32 (32b run), ms_ext, c_ext - error checks: allocation ref bounds_check enum stub_data - VC __declspec() decoration level: - __declspec(uuid()), __declspec(selectany), __declspec(novtable) - DECLSPEC_UUID(), MIDL_INTERFACE() -*/ -//@@MIDL_FILE_HEADING( ) - - -/* verify that the version is high enough to compile this file*/ -#ifndef __REQUIRED_RPCNDR_H_VERSION__ -#define __REQUIRED_RPCNDR_H_VERSION__ 440 -#endif - -#include "rpc.h" -#include "rpcndr.h" - -#ifndef __ctx_h__ -#define __ctx_h__ - -/* Forward Declarations */ - -#ifdef __cplusplus -extern "C"{ -#endif - -void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); -void __RPC_USER MIDL_user_free( void __RPC_FAR * ); - -#ifndef __hello_INTERFACE_DEFINED__ -#define __hello_INTERFACE_DEFINED__ - -/* interface hello */ -/* [implicit_handle][version][uuid] */ - -typedef long CTXTYPE; - -typedef /* [context_handle] */ CTXTYPE __RPC_FAR *PCTXTYPE; - -void CtxOpen( - /* [out] */ PCTXTYPE __RPC_FAR *pphContext, - /* [in] */ long Value); - -void CtxHello( - /* [in] */ PCTXTYPE phContext); - -void CtxClose( - /* [out][in] */ PCTXTYPE __RPC_FAR *pphContext); - - -extern handle_t hBinding; - - -extern RPC_IF_HANDLE hello_v1_0_c_ifspec; -extern RPC_IF_HANDLE hello_v1_0_s_ifspec; -#endif /* __hello_INTERFACE_DEFINED__ */ - -/* Additional Prototypes for ALL interfaces */ - -void __RPC_USER PCTXTYPE_rundown( PCTXTYPE ); - -/* end of Additional Prototypes */ - -#ifdef __cplusplus -} -#endif - -#endif - - diff --git a/rostests/win32/rpcrt4/context_handles/ctx.idl b/rostests/win32/rpcrt4/context_handles/ctx.idl deleted file mode 100644 index e3226dde75e..00000000000 --- a/rostests/win32/rpcrt4/context_handles/ctx.idl +++ /dev/null @@ -1,19 +0,0 @@ -//file hello.idl -[ - uuid(7a98c250-6808-11cf-b73b-00aa00b677a7), - version(1.0) -] -interface hello -{ - -typedef long CTXTYPE; -typedef [context_handle] CTXTYPE *PCTXTYPE; - -void CtxOpen( [out] PCTXTYPE *pphContext, - [in] long Value); - -void CtxHello( [in] PCTXTYPE phContext ); - -void CtxClose( [in, out] PCTXTYPE *pphContext ); - -} \ No newline at end of file diff --git a/rostests/win32/rpcrt4/context_handles/ctx_c.c b/rostests/win32/rpcrt4/context_handles/ctx_c.c deleted file mode 100644 index ae3cbc10fb0..00000000000 --- a/rostests/win32/rpcrt4/context_handles/ctx_c.c +++ /dev/null @@ -1,335 +0,0 @@ - -#pragma warning( disable: 4049 ) /* more than 64k source lines */ - -/* this ALWAYS GENERATED file contains the RPC client stubs */ - - - /* File created by MIDL compiler version 5.03.0280 */ -/* at Fri Mar 24 18:32:16 2006 - */ -/* Compiler settings for ctx.idl: - Os (OptLev=s), W1, Zp8, env=Win32 (32b run), ms_ext, c_ext - error checks: allocation ref bounds_check enum stub_data - VC __declspec() decoration level: - __declspec(uuid()), __declspec(selectany), __declspec(novtable) - DECLSPEC_UUID(), MIDL_INTERFACE() -*/ -//@@MIDL_FILE_HEADING( ) - -#if !defined(_M_IA64) && !defined(_M_AXP64) -#include -#if defined( _ALPHA_ ) -#include -#endif - -#include "ctx.h" - -#define TYPE_FORMAT_STRING_SIZE 23 -#define PROC_FORMAT_STRING_SIZE 21 -#define TRANSMIT_AS_TABLE_SIZE 0 -#define WIRE_MARSHAL_TABLE_SIZE 0 - -typedef struct _MIDL_TYPE_FORMAT_STRING - { - short Pad; - unsigned char Format[ TYPE_FORMAT_STRING_SIZE ]; - } MIDL_TYPE_FORMAT_STRING; - -typedef struct _MIDL_PROC_FORMAT_STRING - { - short Pad; - unsigned char Format[ PROC_FORMAT_STRING_SIZE ]; - } MIDL_PROC_FORMAT_STRING; - - -extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString; -extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString; - -#define GENERIC_BINDING_TABLE_SIZE 0 - - -/* Standard interface: hello, ver. 1.0, - GUID={0x7a98c250,0x6808,0x11cf,{0xb7,0x3b,0x00,0xaa,0x00,0xb6,0x77,0xa7}} */ - -handle_t hBinding; - - -static const RPC_CLIENT_INTERFACE hello___RpcClientInterface = - { - sizeof(RPC_CLIENT_INTERFACE), - {{0x7a98c250,0x6808,0x11cf,{0xb7,0x3b,0x00,0xaa,0x00,0xb6,0x77,0xa7}},{1,0}}, - {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}}, - 0, - 0, - 0, - 0, - 0, - 0 - }; -RPC_IF_HANDLE hello_v1_0_c_ifspec = (RPC_IF_HANDLE)& hello___RpcClientInterface; - -extern const MIDL_STUB_DESC hello_StubDesc; - -RPC_BINDING_HANDLE hello__MIDL_AutoBindHandle; - - -void CtxOpen( - /* [out] */ PCTXTYPE __RPC_FAR *pphContext, - /* [in] */ long Value) -{ - - RPC_BINDING_HANDLE _Handle = 0; - - RPC_MESSAGE _RpcMessage; - - MIDL_STUB_MESSAGE _StubMsg; - - if(!pphContext) - { - RpcRaiseException(RPC_X_NULL_REF_POINTER); - } - RpcTryFinally - { - NdrClientInitializeNew( - ( PRPC_MESSAGE )&_RpcMessage, - ( PMIDL_STUB_MESSAGE )&_StubMsg, - ( PMIDL_STUB_DESC )&hello_StubDesc, - 0); - - - _Handle = hBinding; - - - _StubMsg.BufferLength = 4U; - NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle ); - - *(( long __RPC_FAR * )_StubMsg.Buffer)++ = Value; - - NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer ); - - if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) - NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] ); - - *pphContext = (void *)0; - NdrClientContextUnmarshall( - ( PMIDL_STUB_MESSAGE )&_StubMsg, - ( NDR_CCONTEXT __RPC_FAR * )pphContext, - _Handle); - - } - RpcFinally - { - NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg ); - - } - RpcEndFinally - -} - - -void CtxHello( - /* [in] */ PCTXTYPE phContext) -{ - - RPC_BINDING_HANDLE _Handle = 0; - - RPC_MESSAGE _RpcMessage; - - MIDL_STUB_MESSAGE _StubMsg; - - RpcTryFinally - { - NdrClientInitializeNew( - ( PRPC_MESSAGE )&_RpcMessage, - ( PMIDL_STUB_MESSAGE )&_StubMsg, - ( PMIDL_STUB_DESC )&hello_StubDesc, - 1); - - - if(phContext != 0) - { - _Handle = NDRCContextBinding(( NDR_CCONTEXT )phContext);; - - } - else - { - RpcRaiseException(RPC_X_SS_IN_NULL_CONTEXT); - } - - _StubMsg.BufferLength = 20U; - NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle ); - - NdrClientContextMarshall( - ( PMIDL_STUB_MESSAGE )&_StubMsg, - ( NDR_CCONTEXT )phContext, - 1); - NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer ); - - } - RpcFinally - { - NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg ); - - } - RpcEndFinally - -} - - -void CtxClose( - /* [out][in] */ PCTXTYPE __RPC_FAR *pphContext) -{ - - RPC_BINDING_HANDLE _Handle = 0; - - RPC_MESSAGE _RpcMessage; - - MIDL_STUB_MESSAGE _StubMsg; - - if(!pphContext) - { - RpcRaiseException(RPC_X_NULL_REF_POINTER); - } - RpcTryFinally - { - NdrClientInitializeNew( - ( PRPC_MESSAGE )&_RpcMessage, - ( PMIDL_STUB_MESSAGE )&_StubMsg, - ( PMIDL_STUB_DESC )&hello_StubDesc, - 2); - - - if(*pphContext != 0) - { - _Handle = NDRCContextBinding(( NDR_CCONTEXT )*pphContext);; - - } - - _StubMsg.BufferLength = 20U; - NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle ); - - NdrClientContextMarshall( - ( PMIDL_STUB_MESSAGE )&_StubMsg, - ( NDR_CCONTEXT )*pphContext, - 0); - NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer ); - - if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) - NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[14] ); - - NdrClientContextUnmarshall( - ( PMIDL_STUB_MESSAGE )&_StubMsg, - ( NDR_CCONTEXT __RPC_FAR * )pphContext, - _Handle); - - } - RpcFinally - { - NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg ); - - } - RpcEndFinally - -} - - -const MIDL_STUB_DESC hello_StubDesc = - { - (void __RPC_FAR *)& hello___RpcClientInterface, - MIDL_user_allocate, - MIDL_user_free, - &hBinding, - 0, - 0, - 0, - 0, - __MIDL_TypeFormatString.Format, - 1, /* -error bounds_check flag */ - 0x10001, /* Ndr library version */ - 0, - 0x5030118, /* MIDL Version 5.3.280 */ - 0, - 0, - 0, /* notify & notify_flag routine table */ - 0x1, /* MIDL flag */ - 0, /* Reserved3 */ - 0, /* Reserved4 */ - 0 /* Reserved5 */ - }; - -#if !defined(__RPC_WIN32__) -#error Invalid build platform for this stub. -#endif - -const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString = - { - 0, - { - - 0x51, /* FC_OUT_PARAM */ -#ifndef _ALPHA_ - 0x1, /* x86, MIPS & PPC stack size = 1 */ -#else - 0x2, /* Alpha stack size = 2 */ -#endif -/* 2 */ NdrFcShort( 0x2 ), /* Type Offset=2 */ -/* 4 */ 0x4e, /* FC_IN_PARAM_BASETYPE */ - 0x8, /* FC_LONG */ -/* 6 */ 0x5b, /* FC_END */ - 0x5c, /* FC_PAD */ -/* 8 */ - 0x4d, /* FC_IN_PARAM */ -#ifndef _ALPHA_ - 0x1, /* x86, MIPS & PPC stack size = 1 */ -#else - 0x2, /* Alpha stack size = 2 */ -#endif -/* 10 */ NdrFcShort( 0xa ), /* Type Offset=10 */ -/* 12 */ 0x5b, /* FC_END */ - 0x5c, /* FC_PAD */ -/* 14 */ - 0x50, /* FC_IN_OUT_PARAM */ -#ifndef _ALPHA_ - 0x1, /* x86, MIPS & PPC stack size = 1 */ -#else - 0x2, /* Alpha stack size = 2 */ -#endif -/* 16 */ NdrFcShort( 0xe ), /* Type Offset=14 */ -/* 18 */ 0x5b, /* FC_END */ - 0x5c, /* FC_PAD */ - - 0x0 - } - }; - -const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString = - { - 0, - { - NdrFcShort( 0x0 ), /* 0 */ -/* 2 */ - 0x11, 0x0, /* FC_RP */ -/* 4 */ NdrFcShort( 0x2 ), /* Offset= 2 (6) */ -/* 6 */ 0x30, /* FC_BIND_CONTEXT */ - 0xa0, /* Ctxt flags: via ptr, out, */ -/* 8 */ 0x0, /* 0 */ - 0x0, /* 0 */ -/* 10 */ 0x30, /* FC_BIND_CONTEXT */ - 0x41, /* Ctxt flags: in, can't be null */ -/* 12 */ 0x0, /* 0 */ - 0x0, /* 0 */ -/* 14 */ - 0x11, 0x0, /* FC_RP */ -/* 16 */ NdrFcShort( 0x2 ), /* Offset= 2 (18) */ -/* 18 */ 0x30, /* FC_BIND_CONTEXT */ - 0xe1, /* Ctxt flags: via ptr, in, out, can't be null */ -/* 20 */ 0x0, /* 0 */ - 0x0, /* 0 */ - - 0x0 - } - }; - - -#endif /* !defined(_M_IA64) && !defined(_M_AXP64)*/ - diff --git a/rostests/win32/rpcrt4/context_handles/ctx_s.c b/rostests/win32/rpcrt4/context_handles/ctx_s.c deleted file mode 100644 index 2c768712fab..00000000000 --- a/rostests/win32/rpcrt4/context_handles/ctx_s.c +++ /dev/null @@ -1,349 +0,0 @@ - -#pragma warning( disable: 4049 ) /* more than 64k source lines */ - -/* this ALWAYS GENERATED file contains the RPC server stubs */ - - - /* File created by MIDL compiler version 5.03.0280 */ -/* at Fri Mar 24 18:32:16 2006 - */ -/* Compiler settings for ctx.idl: - Os (OptLev=s), W1, Zp8, env=Win32 (32b run), ms_ext, c_ext - error checks: allocation ref bounds_check enum stub_data - VC __declspec() decoration level: - __declspec(uuid()), __declspec(selectany), __declspec(novtable) - DECLSPEC_UUID(), MIDL_INTERFACE() -*/ -//@@MIDL_FILE_HEADING( ) - -#if !defined(_M_IA64) && !defined(_M_AXP64) -#include -#include "ctx.h" - -#define TYPE_FORMAT_STRING_SIZE 23 -#define PROC_FORMAT_STRING_SIZE 21 -#define TRANSMIT_AS_TABLE_SIZE 0 -#define WIRE_MARSHAL_TABLE_SIZE 0 - -typedef struct _MIDL_TYPE_FORMAT_STRING - { - short Pad; - unsigned char Format[ TYPE_FORMAT_STRING_SIZE ]; - } MIDL_TYPE_FORMAT_STRING; - -typedef struct _MIDL_PROC_FORMAT_STRING - { - short Pad; - unsigned char Format[ PROC_FORMAT_STRING_SIZE ]; - } MIDL_PROC_FORMAT_STRING; - -extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString; -extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString; - -/* Standard interface: hello, ver. 1.0, - GUID={0x7a98c250,0x6808,0x11cf,{0xb7,0x3b,0x00,0xaa,0x00,0xb6,0x77,0xa7}} */ - - -extern RPC_DISPATCH_TABLE hello_v1_0_DispatchTable; - -static const RPC_SERVER_INTERFACE hello___RpcServerInterface = - { - sizeof(RPC_SERVER_INTERFACE), - {{0x7a98c250,0x6808,0x11cf,{0xb7,0x3b,0x00,0xaa,0x00,0xb6,0x77,0xa7}},{1,0}}, - {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}}, - &hello_v1_0_DispatchTable, - 0, - 0, - 0, - 0, - 0 - }; -RPC_IF_HANDLE hello_v1_0_s_ifspec = (RPC_IF_HANDLE)& hello___RpcServerInterface; - -extern const MIDL_STUB_DESC hello_StubDesc; - -void __RPC_STUB -hello_CtxOpen( - PRPC_MESSAGE _pRpcMessage ) -{ - long Value; - MIDL_STUB_MESSAGE _StubMsg; - NDR_SCONTEXT pphContext; - RPC_STATUS _Status; - - ((void)(_Status)); - NdrServerInitializeNew( - _pRpcMessage, - &_StubMsg, - &hello_StubDesc); - - ( PCTXTYPE __RPC_FAR * )pphContext = 0; - RpcTryFinally - { - RpcTryExcept - { - if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) - NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] ); - - Value = *(( long __RPC_FAR * )_StubMsg.Buffer)++; - - if(_StubMsg.Buffer > _StubMsg.BufferEnd) - { - RpcRaiseException(RPC_X_BAD_STUB_DATA); - } - } - RpcExcept( RPC_BAD_STUB_DATA_EXCEPTION_FILTER ) - { - RpcRaiseException(RPC_X_BAD_STUB_DATA); - } - RpcEndExcept - pphContext = NDRSContextUnmarshall( (char *)0, _pRpcMessage->DataRepresentation ); - - - CtxOpen(( PCTXTYPE __RPC_FAR * )NDRSContextValue(pphContext),Value); - - _StubMsg.BufferLength = 20U; - _pRpcMessage->BufferLength = _StubMsg.BufferLength; - - _Status = I_RpcGetBuffer( _pRpcMessage ); - if ( _Status ) - RpcRaiseException( _Status ); - - _StubMsg.Buffer = (unsigned char __RPC_FAR *) _pRpcMessage->Buffer; - - NdrServerContextMarshall( - ( PMIDL_STUB_MESSAGE )&_StubMsg, - ( NDR_SCONTEXT )pphContext, - ( NDR_RUNDOWN )PCTXTYPE_rundown); - - } - RpcFinally - { - } - RpcEndFinally - _pRpcMessage->BufferLength = - (unsigned int)(_StubMsg.Buffer - (unsigned char __RPC_FAR *)_pRpcMessage->Buffer); - -} - -void __RPC_STUB -hello_CtxHello( - PRPC_MESSAGE _pRpcMessage ) -{ - MIDL_STUB_MESSAGE _StubMsg; - NDR_SCONTEXT phContext; - RPC_STATUS _Status; - - ((void)(_Status)); - NdrServerInitializeNew( - _pRpcMessage, - &_StubMsg, - &hello_StubDesc); - - RpcTryFinally - { - RpcTryExcept - { - if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) - NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[8] ); - - phContext = NdrServerContextUnmarshall(( PMIDL_STUB_MESSAGE )&_StubMsg); - - if(_StubMsg.Buffer > _StubMsg.BufferEnd) - { - RpcRaiseException(RPC_X_BAD_STUB_DATA); - } - } - RpcExcept( RPC_BAD_STUB_DATA_EXCEPTION_FILTER ) - { - RpcRaiseException(RPC_X_BAD_STUB_DATA); - } - RpcEndExcept - - CtxHello(( PCTXTYPE )*NDRSContextValue(phContext)); - - } - RpcFinally - { - } - RpcEndFinally - _pRpcMessage->BufferLength = - (unsigned int)(_StubMsg.Buffer - (unsigned char __RPC_FAR *)_pRpcMessage->Buffer); - -} - -void __RPC_STUB -hello_CtxClose( - PRPC_MESSAGE _pRpcMessage ) -{ - MIDL_STUB_MESSAGE _StubMsg; - NDR_SCONTEXT pphContext; - RPC_STATUS _Status; - - ((void)(_Status)); - NdrServerInitializeNew( - _pRpcMessage, - &_StubMsg, - &hello_StubDesc); - - ( PCTXTYPE __RPC_FAR * )pphContext = 0; - RpcTryFinally - { - RpcTryExcept - { - if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION ) - NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[14] ); - - pphContext = NdrServerContextUnmarshall(( PMIDL_STUB_MESSAGE )&_StubMsg); - - if(_StubMsg.Buffer > _StubMsg.BufferEnd) - { - RpcRaiseException(RPC_X_BAD_STUB_DATA); - } - } - RpcExcept( RPC_BAD_STUB_DATA_EXCEPTION_FILTER ) - { - RpcRaiseException(RPC_X_BAD_STUB_DATA); - } - RpcEndExcept - - CtxClose(( PCTXTYPE __RPC_FAR * )NDRSContextValue(pphContext)); - - _StubMsg.BufferLength = 20U; - _pRpcMessage->BufferLength = _StubMsg.BufferLength; - - _Status = I_RpcGetBuffer( _pRpcMessage ); - if ( _Status ) - RpcRaiseException( _Status ); - - _StubMsg.Buffer = (unsigned char __RPC_FAR *) _pRpcMessage->Buffer; - - NdrServerContextMarshall( - ( PMIDL_STUB_MESSAGE )&_StubMsg, - ( NDR_SCONTEXT )pphContext, - ( NDR_RUNDOWN )PCTXTYPE_rundown); - - } - RpcFinally - { - } - RpcEndFinally - _pRpcMessage->BufferLength = - (unsigned int)(_StubMsg.Buffer - (unsigned char __RPC_FAR *)_pRpcMessage->Buffer); - -} - - -static const MIDL_STUB_DESC hello_StubDesc = - { - (void __RPC_FAR *)& hello___RpcServerInterface, - MIDL_user_allocate, - MIDL_user_free, - 0, - 0, - 0, - 0, - 0, - __MIDL_TypeFormatString.Format, - 1, /* -error bounds_check flag */ - 0x10001, /* Ndr library version */ - 0, - 0x5030118, /* MIDL Version 5.3.280 */ - 0, - 0, - 0, /* notify & notify_flag routine table */ - 0x1, /* MIDL flag */ - 0, /* Reserved3 */ - 0, /* Reserved4 */ - 0 /* Reserved5 */ - }; - -static RPC_DISPATCH_FUNCTION hello_table[] = - { - hello_CtxOpen, - hello_CtxHello, - hello_CtxClose, - 0 - }; -RPC_DISPATCH_TABLE hello_v1_0_DispatchTable = - { - 3, - hello_table - }; - -#if !defined(__RPC_WIN32__) -#error Invalid build platform for this stub. -#endif - -static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString = - { - 0, - { - - 0x51, /* FC_OUT_PARAM */ -#ifndef _ALPHA_ - 0x1, /* x86, MIPS & PPC stack size = 1 */ -#else - 0x2, /* Alpha stack size = 2 */ -#endif -/* 2 */ NdrFcShort( 0x2 ), /* Type Offset=2 */ -/* 4 */ 0x4e, /* FC_IN_PARAM_BASETYPE */ - 0x8, /* FC_LONG */ -/* 6 */ 0x5b, /* FC_END */ - 0x5c, /* FC_PAD */ -/* 8 */ - 0x4d, /* FC_IN_PARAM */ -#ifndef _ALPHA_ - 0x1, /* x86, MIPS & PPC stack size = 1 */ -#else - 0x2, /* Alpha stack size = 2 */ -#endif -/* 10 */ NdrFcShort( 0xa ), /* Type Offset=10 */ -/* 12 */ 0x5b, /* FC_END */ - 0x5c, /* FC_PAD */ -/* 14 */ - 0x50, /* FC_IN_OUT_PARAM */ -#ifndef _ALPHA_ - 0x1, /* x86, MIPS & PPC stack size = 1 */ -#else - 0x2, /* Alpha stack size = 2 */ -#endif -/* 16 */ NdrFcShort( 0xe ), /* Type Offset=14 */ -/* 18 */ 0x5b, /* FC_END */ - 0x5c, /* FC_PAD */ - - 0x0 - } - }; - -static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString = - { - 0, - { - NdrFcShort( 0x0 ), /* 0 */ -/* 2 */ - 0x11, 0x0, /* FC_RP */ -/* 4 */ NdrFcShort( 0x2 ), /* Offset= 2 (6) */ -/* 6 */ 0x30, /* FC_BIND_CONTEXT */ - 0xa0, /* Ctxt flags: via ptr, out, */ -/* 8 */ 0x0, /* 0 */ - 0x0, /* 0 */ -/* 10 */ 0x30, /* FC_BIND_CONTEXT */ - 0x41, /* Ctxt flags: in, can't be null */ -/* 12 */ 0x0, /* 0 */ - 0x0, /* 0 */ -/* 14 */ - 0x11, 0x0, /* FC_RP */ -/* 16 */ NdrFcShort( 0x2 ), /* Offset= 2 (18) */ -/* 18 */ 0x30, /* FC_BIND_CONTEXT */ - 0xe1, /* Ctxt flags: via ptr, in, out, can't be null */ -/* 20 */ 0x0, /* 0 */ - 0x0, /* 0 */ - - 0x0 - } - }; - - -#endif /* !defined(_M_IA64) && !defined(_M_AXP64)*/ - diff --git a/rostests/win32/rpcrt4/context_handles/server.c b/rostests/win32/rpcrt4/context_handles/server.c deleted file mode 100644 index 9c0ac0207fc..00000000000 --- a/rostests/win32/rpcrt4/context_handles/server.c +++ /dev/null @@ -1,78 +0,0 @@ -#include -#include -#include -#include "ctx.h" - -void CtxOpen( PCTXTYPE *pphContext, - long Value) -{ - printf("CtxOpen(): Value=%d\n",Value); - *pphContext = (PCTXTYPE)midl_user_allocate( sizeof(CTXTYPE) ); - **pphContext = Value; -} - -void CtxHello( PCTXTYPE phContext ) -{ - printf("CtxHello(): Hello, World! Context value: %d\n", *phContext); -} - -void CtxClose(PCTXTYPE *pphContext ) -{ - printf("CtxClose(): %d\n", **pphContext); - midl_user_free(*pphContext); - *pphContext = NULL; -} - - -void main() -{ - RPC_STATUS status; - unsigned int cMinCalls = 1; - unsigned int cMaxCalls = 20; - int i; - - status = RpcServerUseProtseqEp("ncacn_np", 20, "\\pipe\\hello", NULL); - - if (status) - { - printf("RpcServerUseProtseqEp %x\n", status); - exit(status); - } - - status = RpcServerRegisterIf(hello_v1_0_s_ifspec, NULL, NULL); - - if (status) - { - printf("RpcServerRegisterIf %x\n", status); - exit(status); - } - - status = RpcServerListen(1, 20, FALSE); - - if (status) - { - printf("RpcServerListen %x", status); - exit(status); - } - - scanf("%d", &i); -} - - -void __RPC_USER PCTXTYPE_rundown( - PCTXTYPE hContext) -{ - PCTXTYPE pCtx = (PCTXTYPE)hContext; - printf("Context rundown: Value=%d \n", *pCtx); - midl_user_free(hContext); -} - -void __RPC_FAR * __RPC_USER midl_user_allocate(size_t len) -{ - return(malloc(len)); -} - -void __RPC_USER midl_user_free(void __RPC_FAR * ptr) -{ - free(ptr); -} diff --git a/rostests/win32/smss/movefile/movefile.cpp b/rostests/win32/smss/movefile/movefile.cpp deleted file mode 100644 index 04442989755..00000000000 --- a/rostests/win32/smss/movefile/movefile.cpp +++ /dev/null @@ -1,235 +0,0 @@ -/* - * PROJECT: ReactOS Test applications - * LICENSE: GPL - See COPYING in the top level directory - * FILE: base/applications/testsets/smss/movefile.cpp - * PURPOSE: Provides testing for the "move file after reboot" - * function of smss.exe/kernel32.dll - * PROGRAMMERS: Dmitriy Philippov (shedon@mail.ru) - */ - - -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers -#include "windows.h" -#include -#include -#include "stdlib.h" -#include "string.h" - - -void Usage() -{ - printf(" Usage: smssTest.exe -g|c|s|d \n \ - g - generate test files \n \ - c - check files after reboot \n \ - s - show registry entry \n \ - d - delete registry value \n"); -} - -int ShowRegValue() -{ - BYTE lpBuff[255]; - memset(lpBuff, 0, sizeof(lpBuff)); - - DWORD lSize = sizeof(lpBuff); - HKEY hKey; - LONG retValue; - // test registry entry - retValue = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Control\\Session Manager", 0, KEY_QUERY_VALUE, &hKey); - if( ERROR_SUCCESS != retValue ) { - printf("RegOpenKeyEx err=%ld \n", retValue); - return 1; - } - - retValue = RegQueryValueEx(hKey, "PendingFileRenameOperations", NULL, NULL, lpBuff, &lSize); - if( ERROR_SUCCESS != retValue ) { - printf("RegQueryValueEx err=%ld \n", retValue); - lSize = 0; - } - - printf("reg data: \n"); - for(UINT i=0; i - . - advapi32 - user32 - movefile.cpp - movefile.rc - \ No newline at end of file diff --git a/rostests/win32/smss/movefile/movefile.rc b/rostests/win32/smss/movefile/movefile.rc deleted file mode 100644 index 4956e918088..00000000000 --- a/rostests/win32/smss/movefile/movefile.rc +++ /dev/null @@ -1,8 +0,0 @@ -#include - -#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Move File after reboot test\0" -#define REACTOS_STR_INTERNAL_NAME "movefiletest\0" -#define REACTOS_STR_ORIGINAL_FILENAME "movefiletest.exe\0" -#include - - diff --git a/rostests/win32/smss/smss.rbuild b/rostests/win32/smss/smss.rbuild deleted file mode 100644 index c1d1dc15a38..00000000000 --- a/rostests/win32/smss/smss.rbuild +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/rostests/win32/testsets.rbuild b/rostests/win32/testsets.rbuild deleted file mode 100644 index 1c2e72ec6bd..00000000000 --- a/rostests/win32/testsets.rbuild +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - diff --git a/rostests/win32/user32/drawcaption/capicon.c b/rostests/win32/user32/drawcaption/capicon.c deleted file mode 100644 index c113b4dbdf8..00000000000 --- a/rostests/win32/user32/drawcaption/capicon.c +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright 2006 Saveliy Tretiakov - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "windows.h" -#include "stdio.h" -#include "resource.h" - -WCHAR WndClass[] = L"capicon_class"; - -HINSTANCE hInst; -INT testnum = 0; - - -LRESULT CALLBACK WndProc(HWND hWnd, - UINT msg, - WPARAM wParam, - LPARAM lParam) -{ - HICON hIcon; - - switch (msg) - { - case WM_GETICON: - if(testnum>2) - { - if(wParam == ICON_SMALL) - hIcon = LoadIcon(hInst, MAKEINTRESOURCE(ID_ICON2SM)); - else if(wParam == ICON_BIG) - hIcon = LoadIcon(hInst, MAKEINTRESOURCE(ID_ICON2BIG)); - else hIcon = (HICON)1; - - if(!hIcon) - { - printf("LoadIcon() failed: %d\n", (INT)GetLastError()); - break; - } - - return (LRESULT)hIcon; - } - break; - - case WM_DESTROY: - PostQuitMessage(0); - return 0; - } - - return DefWindowProc(hWnd, msg, wParam, lParam); -} - - -int wmain(int argc, wchar_t**argv) -{ - HWND hWnd; - MSG msg; - WNDCLASSEX wcx; - UINT result; - - if(argc<2) - { - printf("DrawCaption icon test.\n"); - printf("USAGE: drawcap.exe \n\n"); - printf("Available tests:\n" - "1. Class small icon\n" - "2. Class big icon\n" - "3. Class small icon + WM_GETICON\n" - "4. Class big icon + WM_GETICON\n" - "5. WM_GETICON only\n\n"); - return 0; - } - - testnum = _wtoi(argv[1]); - if(testnum < 1 || testnum > 5) - { - printf("Unknown test %d\n", testnum); - return 1; - } - - hInst = GetModuleHandle(NULL); - - memset(&wcx, 0, sizeof(wcx)); - wcx.cbSize = sizeof(wcx); - wcx.style = CS_HREDRAW | CS_VREDRAW; - wcx.lpfnWndProc = (WNDPROC) WndProc; - wcx.hInstance = hInst; - wcx.hbrBackground = (HBRUSH)COLOR_WINDOW; - wcx.lpszClassName = WndClass; - if(testnum<5)wcx.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(ID_ICON1BIG)); - if(testnum == 1 || testnum == 3) - wcx.hIconSm = LoadIcon(hInst, MAKEINTRESOURCE(ID_ICON1SM)); - - if(!(result = RegisterClassEx(&wcx))) - { - printf("Shit! RegisterClassEx failed: %d\n", - (int)GetLastError()); - return 1; - } - - hWnd = CreateWindowEx(0, - WndClass, - L"DrawCaption icon test", - WS_OVERLAPPED|WS_THICKFRAME|WS_SYSMENU, - CW_USEDEFAULT, - CW_USEDEFAULT, - 250, - 100, - NULL, - 0, - hInst, - NULL); - - if(!hWnd) - { - printf("Shit! Can't create wnd!\n"); - UnregisterClass(WndClass, hInst); - return 1; - } - - - ShowWindow(hWnd, SW_SHOW); - UpdateWindow(hWnd); - - while(GetMessage(&msg, NULL, 0, 0 )) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - UnregisterClass(WndClass, hInst); - return 0; -} diff --git a/rostests/win32/user32/drawcaption/capicon.rc b/rostests/win32/user32/drawcaption/capicon.rc deleted file mode 100644 index 0cb31e4e0be..00000000000 --- a/rostests/win32/user32/drawcaption/capicon.rc +++ /dev/null @@ -1,13 +0,0 @@ -#include -#include "resource.h" - -#define REACTOS_STR_FILE_DESCRIPTION "ReactOS DrawCaption icon test\0" -#define REACTOS_STR_INTERNAL_NAME "capicon\0" -#define REACTOS_STR_ORIGINAL_FILENAME "capicon.exe\0" -#include - -ID_ICON1BIG ICON res\icon1big.ico -ID_ICON1SM ICON res\icon1sm.ico -ID_ICON2BIG ICON res\icon2big.ico -ID_ICON2SM ICON res\icon2sm.ico - diff --git a/rostests/win32/user32/drawcaption/drawcap.c b/rostests/win32/user32/drawcaption/drawcap.c deleted file mode 100644 index 2e31ee4e748..00000000000 --- a/rostests/win32/user32/drawcaption/drawcap.c +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Copyright 2006 Saveliy Tretiakov - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "windows.h" -#include "resource.h" -#include "stdio.h" - -WCHAR CaptWndClass[] = L"captwnd_class"; - -HINSTANCE hInst; -INT testnum = 0; - -//BOOL WINAPI (*DrawCaptionTemp) ( -// HWND hwnd, -// HDC hdc, -// const RECT *rect, -// HFONT hFont, -// HICON hIcon, -// LPCWSTR str, -// UINT uFlags); - -VOID CapTest(HWND hWnd, - HDC hDc, - LPRECT pR, - WCHAR *Text, - DWORD Flags, - WCHAR *AddonStr, - DWORD Addon) -{ - WCHAR Buf[512]; - - lstrcpy(Buf, AddonStr); - if(lstrlen(Buf))lstrcat(Buf, L" | "); - lstrcat(Buf, Text); - - DrawText( hDc, Buf, lstrlen(Buf), pR, DT_LEFT ); - - pR->top+=20; - pR->bottom+=20; - - if(!DrawCaption(hWnd, hDc, pR, Flags | Addon)) - { - printf("PAINT: DrawCaption failed: %d\n", (int)GetLastError()); - } - - pR->top+=30; - pR->bottom+=30; -} - -VOID DrawCaptionTest(HWND hWnd, HDC hDc, WCHAR *AddonStr, DWORD Addon) -{ - RECT Rect; - GetClientRect(hWnd, &Rect); - Rect.bottom = 30; - Rect.left = 10; - Rect.right-=10; - Rect.top = 10; - - CapTest(hWnd, hDc, &Rect, L"DC_TEXT:", DC_TEXT, AddonStr, Addon); - - CapTest(hWnd, hDc, &Rect, - L"DC_TEXT | DC_ACTIVE:", - DC_TEXT | DC_ACTIVE, - AddonStr, Addon); - - CapTest(hWnd, hDc, &Rect, - L"DC_TEXT | DC_ICON:" , - DC_TEXT | DC_ICON, - AddonStr, Addon); - - CapTest(hWnd, hDc, &Rect, - L"DC_TEXT | DC_ACTIVE | DC_ICON:" , - DC_TEXT | DC_ACTIVE | DC_ICON, - AddonStr, Addon); - - CapTest(hWnd, hDc, &Rect, - L"DC_TEXT | DC_INBUTTON:" , - DC_TEXT | DC_INBUTTON, - AddonStr, Addon); - - CapTest(hWnd, hDc, &Rect, - L"DC_TEXT | DC_ACTIVE | DC_INBUTTON:" , - DC_TEXT | DC_ACTIVE | DC_INBUTTON, - AddonStr, Addon); - - CapTest(hWnd, hDc, &Rect, - L"DC_TEXT | DC_ICON | DC_INBUTTON:" , - DC_TEXT | DC_ICON | DC_INBUTTON, - AddonStr, Addon); - - CapTest(hWnd, hDc, &Rect, - L"DC_TEXT | DC_ACTIVE | DC_ICON | DC_INBUTTON:" , - DC_TEXT | DC_ACTIVE | DC_ICON | DC_INBUTTON, - AddonStr, Addon); - -} - -LRESULT CALLBACK CaptWndProc(HWND hWnd, - UINT msg, - WPARAM wParam, - LPARAM lParam) -{ - - - switch (msg) - { - - case WM_PAINT: - { - HDC hDc; - PAINTSTRUCT Ps; - - hDc = BeginPaint(hWnd, &Ps); - SetBkMode( hDc, TRANSPARENT ); - - switch(testnum) - { - case 1: - DrawCaptionTest(hWnd, hDc, L"", 0); - break; - case 2: - DrawCaptionTest(hWnd, hDc, L"DC_GRADIENT", DC_GRADIENT); - break; - case 3: - DrawCaptionTest(hWnd, hDc, L"DC_SMALLCAP", DC_SMALLCAP); - break; - case 4: - DrawCaptionTest(hWnd, hDc, L"DC_BUTTONS", DC_BUTTONS); - break; - case 5: - DrawCaptionTest(hWnd, hDc, - L"DC_GRADIENT | DC_SMALLCAP", - DC_GRADIENT | DC_SMALLCAP); - break; - case 6: - DrawCaptionTest(hWnd, hDc, - L"DC_GRADIENT | DC_BUTTONS", - DC_GRADIENT | DC_BUTTONS); - break; - case 7: - DrawCaptionTest(hWnd, hDc, - L"DC_BUTTONS | DC_SMALLCAP", - DC_BUTTONS | DC_SMALLCAP); - break; - case 8: - DrawCaptionTest(hWnd, hDc, - L"DC_BUTTONS | DC_SMALLCAP | DC_GRADIENT", - DC_BUTTONS | DC_SMALLCAP | DC_GRADIENT); - break; - } - - EndPaint(hWnd, &Ps); - - return 0; - } - - case WM_DESTROY: - { - PostQuitMessage(0); - return 0; - } - } - - return DefWindowProc(hWnd, msg, wParam, lParam); -} - - -int wmain(int argc, wchar_t**argv) -{ - HWND hWnd; - MSG msg; - WNDCLASSEX wcx; - UINT result; - HBRUSH hBr; - //HMODULE hLib; - - if(argc<2) - { - printf("DrawCaption testcode.\n"); - printf("USAGE: drawcap.exe [useicon]\n\n"); - printf("Available tests:\n" - "1. DrawCaption test\n" - "2. DrawCaption test + DC_GRADIENT\n" - "3. DrawCaption test + DC_SMALLCAP\n" - "4. DrawCaption test + DC_BUTTONS\n" - "5. DrawCaption test + DC_GRADIENT | DC_SMALLCAP\n" - "6. DrawCaption test + DC_GRADIENT | DC_BUTTONS\n" - "7. DrawCaption test + DC_BUTTONS | DC_SMALLCAP\n" - "8. DrawCaption test + DC_BUTTONS | DC_SMALLCAP | DC_GRADIENT\n\n"); - return 0; - } - - testnum = _wtoi(argv[1]); - if(testnum < 1 || testnum > 8) - { - printf("Unknown test %d\n", testnum); - return 1; - } - - hInst = GetModuleHandle(NULL); - - //hLib = LoadLibrary(L"user32"); - //if(!hLib) - //{ - // printf("Shit! Can't load user32.dll\n"); - // return 1; - //} - - //DrawCaptionTemp = GetProcAddress(hLib, "DrawCaptionTempW"); - //if(!DrawCaptionTemp) - //{ - // printf("Shit! Can't get DrawCaptionTemp address\n"); - // return 1; - //} - - hBr = CreateSolidBrush(RGB(255, 255, 255)); - if(!hBr) - { - printf("Shit! Can't create brush."); - return 1; - } - - memset(&wcx, 0, sizeof(wcx)); - wcx.cbSize = sizeof(wcx); - wcx.style = CS_HREDRAW | CS_VREDRAW; - wcx.lpfnWndProc = (WNDPROC) CaptWndProc; - wcx.hInstance = hInst; - wcx.hbrBackground = hBr; - wcx.lpszClassName = CaptWndClass; - if(argc > 2) wcx.hIconSm = LoadIcon(hInst, MAKEINTRESOURCE(ID_ICON1SM)); - - if(!(result = RegisterClassEx(&wcx))) - { - printf("Shit! RegisterClassEx failed: %d\n", - (int)GetLastError()); - DeleteObject(hBr); - return 1; - } - - hWnd = CreateWindowEx(0, - CaptWndClass, - L"DrawCaption test", - WS_OVERLAPPED|WS_THICKFRAME|WS_SYSMENU, - CW_USEDEFAULT, - CW_USEDEFAULT, - 600, - 470, - NULL, - 0, - hInst, - NULL); - - if(!hWnd) - { - printf("Shit! Can't create wnd!\n"); - UnregisterClass(CaptWndClass, hInst); - DeleteObject(hBr); - return 1; - } - - - ShowWindow(hWnd, SW_SHOW); - UpdateWindow(hWnd); - - while(GetMessage(&msg, NULL, 0, 0 )) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - DeleteObject(hBr); - UnregisterClass(CaptWndClass, hInst); - return 0; -} diff --git a/rostests/win32/user32/drawcaption/drawcap.rc b/rostests/win32/user32/drawcaption/drawcap.rc deleted file mode 100644 index c7f3270e80a..00000000000 --- a/rostests/win32/user32/drawcaption/drawcap.rc +++ /dev/null @@ -1,11 +0,0 @@ -#include -#include "resource.h" - -#define REACTOS_STR_FILE_DESCRIPTION "ReactOS DrawCaption test\0" -#define REACTOS_STR_INTERNAL_NAME "drawcap\0" -#define REACTOS_STR_ORIGINAL_FILENAME "drawcap.exe\0" -#include - -ID_ICON1SM ICON res\icon1sm.ico - - diff --git a/rostests/win32/user32/drawcaption/drawcaption.rbuild b/rostests/win32/user32/drawcaption/drawcaption.rbuild deleted file mode 100644 index 026b2410bd8..00000000000 --- a/rostests/win32/user32/drawcaption/drawcaption.rbuild +++ /dev/null @@ -1,19 +0,0 @@ - - - - - . - user32 - gdi32 - drawcap.c - drawcap.rc - - - - . - user32 - gdi32 - capicon.c - capicon.rc - - diff --git a/rostests/win32/user32/drawcaption/res/icon1big.ico b/rostests/win32/user32/drawcaption/res/icon1big.ico deleted file mode 100644 index 2f4358ac9f8..00000000000 Binary files a/rostests/win32/user32/drawcaption/res/icon1big.ico and /dev/null differ diff --git a/rostests/win32/user32/drawcaption/res/icon1sm.ico b/rostests/win32/user32/drawcaption/res/icon1sm.ico deleted file mode 100644 index 523c7fc57f3..00000000000 Binary files a/rostests/win32/user32/drawcaption/res/icon1sm.ico and /dev/null differ diff --git a/rostests/win32/user32/drawcaption/res/icon2big.ico b/rostests/win32/user32/drawcaption/res/icon2big.ico deleted file mode 100644 index 909dbd0621b..00000000000 Binary files a/rostests/win32/user32/drawcaption/res/icon2big.ico and /dev/null differ diff --git a/rostests/win32/user32/drawcaption/res/icon2sm.ico b/rostests/win32/user32/drawcaption/res/icon2sm.ico deleted file mode 100644 index eeba9f57c65..00000000000 Binary files a/rostests/win32/user32/drawcaption/res/icon2sm.ico and /dev/null differ diff --git a/rostests/win32/user32/drawcaption/resource.h b/rostests/win32/user32/drawcaption/resource.h deleted file mode 100644 index ce5b98a9f4d..00000000000 --- a/rostests/win32/user32/drawcaption/resource.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _CAPICON_RESOURCE_H -#define _CAPICON_RESOURCE_H - -#define ID_ICON1BIG 101 -#define ID_ICON1SM 102 -#define ID_ICON2BIG 103 -#define ID_ICON2SM 104 - - -#endif /* _CAPICON_RESOURCE_H */ diff --git a/rostests/win32/user32/kbdlayout/kbdlayout.c b/rostests/win32/user32/kbdlayout/kbdlayout.c deleted file mode 100644 index ade01ba1954..00000000000 --- a/rostests/win32/user32/kbdlayout/kbdlayout.c +++ /dev/null @@ -1,387 +0,0 @@ -/* - * PROJECT: ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: base/applications/testset/user32/kbdlayout/kbdlayout.c - * PURPOSE: Keyboard layout testapp - * COPYRIGHT: Copyright 2007 Saveliy Tretiakov - */ - -#define UNICODE -#include -#include -#include "resource.h" - - - -LRESULT MainDialogProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam); - - -HINSTANCE hInst; -HWND hMainDlg; - - -typedef struct { - WNDPROC OrigProc; - WCHAR WndName[25]; -} WND_DATA; - -DWORD WINAPI ThreadProc(LPVOID lpParam) -{ - - DialogBoxParam(hInst, - MAKEINTRESOURCE(IDD_MAINDIALOG), - NULL, - (DLGPROC)MainDialogProc, - (LPARAM)NULL); - - return 0; -} - -INT WINAPI WinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpCmdLine, - int nCmdShow) -{ - - - hInst = hInstance; - - ThreadProc(0); - - return 0; -} - - -int GetKlList(HKL **list) -{ - HKL *ret; - int n; - - n = GetKeyboardLayoutList(0, NULL); - ret = HeapAlloc(GetProcessHeap(), 0, sizeof(HKL)*n); - GetKeyboardLayoutList(n, ret); - *list = ret; - return n; -} - -void FreeKlList(HKL *list) -{ - HeapFree(GetProcessHeap(), 0, list); -} - - -void UpdateData(HWND hDlg) -{ - WCHAR buf[KL_NAMELENGTH]; - WCHAR buf2[512]; - - HWND hList; - HKL *klList, hKl; - int n, i,j; - - GetKeyboardLayoutName(buf); - swprintf(buf2, L"Active: %s (%x)", buf, GetKeyboardLayout(0)); - SetWindowText(GetDlgItem(hDlg, IDC_ACTIVE), buf2); - - hList = GetDlgItem(hDlg, IDC_LIST); - SendMessage(hList, LB_RESETCONTENT, 0, 0); - - n = GetKlList(&klList); - hKl = GetKeyboardLayout(0); - for(i = 0; i < n; i++) - { - swprintf(buf, L"%x", klList[i] ); - j = SendMessage(hList, LB_ADDSTRING, 0, (LPARAM) buf); - SendMessage(hList, LB_SETITEMDATA, j, (LPARAM) klList[i]); - if(klList[i] == hKl) SendMessage(hList, LB_SETCURSEL, j, 0); - } - - FreeKlList(klList); -} - -void FormatMsg(WCHAR *format, ...) -{ - WCHAR buf[255]; - va_list argptr; - va_start(argptr, format); - _vsnwprintf(buf, sizeof(buf)-1, format, argptr); - MessageBox(0, buf, L"msg", 0); - va_end(argptr); -} - -void FormatBox(HWND hWnd, DWORD Flags, WCHAR *Caption, WCHAR *Format, ...) -{ - WCHAR buf[255]; - va_list argptr; - va_start(argptr, Format); - _vsnwprintf(buf, sizeof(buf)-1, Format, argptr); - MessageBox(hWnd, buf, Caption, Flags); - va_end(argptr); -} - - -LRESULT CALLBACK WndSubclassProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - WND_DATA *data = (WND_DATA*)GetWindowLongPtr(hwnd, GWL_USERDATA); - - if(uMsg == WM_INPUTLANGCHANGE) - { - FormatMsg(L"%s: WM_INPUTLANGCHANGE lParam=%x wParam=%x\n", data->WndName, lParam, wParam); - UpdateData(hMainDlg); - //Pass message to defwindowproc - } - else if(uMsg == WM_INPUTLANGCHANGEREQUEST) - { - FormatMsg(L"%s: WM_INPUTLANGCHANGEREQUEST lParam=%x wParam=%x\n", data->WndName, lParam, wParam); - UpdateData(hMainDlg); - //Pass message to defwindowproc - } - - return ( CallWindowProc( data->OrigProc, hwnd, uMsg, wParam, lParam) ); -} - -void SubclassWnd(HWND hWnd, WCHAR* Name) -{ - WND_DATA *data = HeapAlloc(GetProcessHeap(), 0, sizeof(WND_DATA)); - data->OrigProc = (WNDPROC)SetWindowLongPtr( hWnd, GWL_WNDPROC, (LONG_PTR)WndSubclassProc); - wcsncpy(data->WndName, Name, 25); - SetWindowLongPtr(hWnd, GWL_USERDATA, (LONG_PTR)data); - return; -} - -DWORD GetActivateFlags(HWND hDlg) -{ - DWORD ret = 0; - - if(IsDlgButtonChecked(hDlg, IDC_KLF_REORDER)) - ret |= KLF_REORDER; - - if(IsDlgButtonChecked(hDlg, IDC_KLF_RESET)) - ret |= KLF_RESET; - - if(IsDlgButtonChecked(hDlg, IDC_KLF_SHIFTLOCK)) - ret |= KLF_SHIFTLOCK; - - if(IsDlgButtonChecked(hDlg, IDC_KLF_SETFORPROCESS)) - ret |= KLF_SETFORPROCESS; - - return ret; - -} - -DWORD GetLoadFlags(HWND hDlg) -{ - DWORD ret = 0; - - if(IsDlgButtonChecked(hDlg, IDL_KLF_ACTIVATE)) - ret |= KLF_ACTIVATE; - - if(IsDlgButtonChecked(hDlg, IDL_KLF_NOTELLSHELL)) - ret |= KLF_NOTELLSHELL; - - if(IsDlgButtonChecked(hDlg, IDL_KLF_REORDER)) - ret |= KLF_REORDER; - - if(IsDlgButtonChecked(hDlg, IDL_KLF_REPLACELANG)) - ret |= KLF_REPLACELANG; - - if(IsDlgButtonChecked(hDlg, IDL_KLF_SUBSTITUTE_OK)) - ret |= KLF_SUBSTITUTE_OK; - - if(IsDlgButtonChecked(hDlg, IDL_KLF_SETFORPROCESS)) - ret |= KLF_SETFORPROCESS; - - return ret; -} - -UINT GetDelayMilliseconds(HWND hDlg) -{ - WCHAR Buf[255]; - UINT ret; - - GetWindowText(GetDlgItem(hDlg, IDC_DELAY), Buf, sizeof(Buf)); - - swscanf(Buf, L"%d", &ret); - - return ret*1000; -} - -HKL GetSelectedLayout(HWND hDlg) -{ - int n; - HWND hList; - hList = GetDlgItem(hDlg, IDC_LIST); - if((n = SendMessage(hList, LB_GETCURSEL, 0, 0)) != LB_ERR) - return (HKL) SendMessage(hList, LB_GETITEMDATA, n, 0); - else return INVALID_HANDLE_VALUE; -} - -HKL GetActivateHandle(HWND hDlg) -{ - - if(IsDlgButtonChecked(hDlg, IDC_FROMLIST)) - return GetSelectedLayout(hDlg); - else if(IsDlgButtonChecked(hDlg, IDC_HKL_NEXT)) - return (HKL)HKL_NEXT; - - return (HKL)HKL_PREV; - -} - - -/*************************************************** - * MainDialogProc * - ***************************************************/ - -LRESULT MainDialogProc(HWND hDlg, - UINT Msg, - WPARAM wParam, - LPARAM lParam) -{ - HKL hKl; - - switch (Msg) - { - case WM_INITDIALOG: - { - WCHAR Buf[255]; - UpdateData(hDlg); - hMainDlg = hDlg; - - SubclassWnd(GetDlgItem(hDlg, IDC_LIST), L"List"); - SubclassWnd(GetDlgItem(hDlg, IDC_EDIT1), L"Edit1"); - SubclassWnd(GetDlgItem(hDlg, IDC_KLID), L"Klid"); - SubclassWnd(GetDlgItem(hDlg, ID_CANCEL), L"CancelB"); - SubclassWnd(GetDlgItem(hDlg, IDC_ACTIVATE), L"ActivateB"); - SubclassWnd(GetDlgItem(hDlg, IDC_REFRESH), L"RefreshB"); - SubclassWnd(GetDlgItem(hDlg, IDC_UNLOAD), L"UnloadB"); - SubclassWnd(GetDlgItem(hDlg, IDC_LOAD), L"LoadB"); - - CheckRadioButton(hDlg, IDC_FROMLIST, IDC_FROMEDIT, IDC_FROMLIST); - SetWindowText(GetDlgItem(hDlg, IDC_KLID), L"00000419"); - - swprintf(Buf, L"Current thread id: %d", GetCurrentThreadId()); - SetWindowText(GetDlgItem(hDlg, IDC_CURTHREAD), Buf); - - SetWindowText(GetDlgItem(hDlg, IDC_DELAY), L"0"); - - return 0; - } /* WM_INITDIALOG */ - - case WM_COMMAND: - { - switch(LOWORD(wParam)) - { - case ID_CANCEL: - { - EndDialog(hDlg, ERROR_CANCELLED); - break; - } - - case IDC_ACTIVATE: - { - if((hKl = GetActivateHandle(hDlg)) != INVALID_HANDLE_VALUE) - { - Sleep(GetDelayMilliseconds(hDlg)); - if(!(hKl = ActivateKeyboardLayout(hKl, GetActivateFlags(hDlg)))) - FormatBox(hDlg, MB_ICONERROR, L"Error", - L"ActivateKeyboardLayout() failed. %d", GetLastError()); - else UpdateData(hDlg); - //FormatBox(hDlg, 0, L"Activated", L"Prev - %x, err - %d.", hKl, - // GetLastError()); - } - else MessageBox(hDlg, L"No item selected", L"Error", MB_ICONERROR); - break; - } - - case IDC_UNLOAD: - { - if((hKl = GetSelectedLayout(hDlg)) != INVALID_HANDLE_VALUE) - { - Sleep(GetDelayMilliseconds(hDlg)); - if(!UnloadKeyboardLayout(hKl)) - FormatBox(hDlg, MB_ICONERROR, L"Error", - L"UnloadKeyboardLayout() failed. %d", - GetLastError()); - else UpdateData(hDlg); - } - else MessageBox(hDlg, L"No item selected", L"Error", MB_ICONERROR); - break; - } - - case IDC_LOAD: - { - WCHAR buf[255]; - GetWindowText(GetDlgItem(hDlg, IDC_KLID), buf, sizeof(buf)); - Sleep(GetDelayMilliseconds(hDlg)); - if(!LoadKeyboardLayout(buf, GetLoadFlags(hDlg))) - FormatBox(hDlg, MB_ICONERROR, L"Error", - L"LoadKeyboardLayout() failed. %d", - GetLastError()); - else UpdateData(hDlg); - break; - } - - case IDC_REFRESH: - { - UpdateData(hDlg); - break; - } - - case IDC_NEWTHREAD: - { - if(!CreateThread(NULL, 0, ThreadProc, NULL, 0, NULL)) - { - FormatBox(hDlg, MB_ICONERROR, L"Error!", - L"Can not create thread (%d).", GetLastError()); - } - } - - case IDC_LIST: - { - if(HIWORD(wParam) == LBN_SELCHANGE) - { - WCHAR buf[25]; - if((hKl = GetSelectedLayout(hDlg)) != NULL) - { - swprintf(buf, L"%x", hKl); - SetWindowText(GetDlgItem(hDlg, IDC_HANDLE), buf); - } - } - break; - } - - } - - return TRUE; - } /* WM_COMMAND */ - - - case WM_INPUTLANGCHANGE: - { - FormatMsg(L"dlg WM_INPUTLANGCHANGE lParam=%x wParam=%x\n", lParam, wParam); - return FALSE; - } - - case WM_INPUTLANGCHANGEREQUEST: - { - FormatMsg(L"dlg WM_INPUTLANGCHANGEREQUEST lParam=%x wParam=%x\n", lParam, wParam); - UpdateData(hDlg); - return FALSE; - } - - case WM_CLOSE: - { - EndDialog(hDlg, ERROR_CANCELLED); - return TRUE; - } /* WM_CLOSE */ - - default: - return FALSE; - } - -} - - - - diff --git a/rostests/win32/user32/kbdlayout/kbdlayout.dsp b/rostests/win32/user32/kbdlayout/kbdlayout.dsp deleted file mode 100644 index e2d2d804e6d..00000000000 --- a/rostests/win32/user32/kbdlayout/kbdlayout.dsp +++ /dev/null @@ -1,98 +0,0 @@ -# Microsoft Developer Studio Project File - Name="kbdlayout" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=kbdlayout - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "kbdlayout.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "kbdlayout.mak" CFG="kbdlayout - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "kbdlayout - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "kbdlayout - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "kbdlayout - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x419 /d "NDEBUG" -# ADD RSC /l 0x419 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "kbdlayout - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x419 /d "_DEBUG" -# ADD RSC /l 0x419 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# SUBTRACT LINK32 /pdb:none - -!ENDIF - -# Begin Target - -# Name "kbdlayout - Win32 Release" -# Name "kbdlayout - Win32 Debug" -# Begin Source File - -SOURCE=.\kbdlayout.c -# End Source File -# Begin Source File - -SOURCE=.\kbdlayout.rc -# End Source File -# Begin Source File - -SOURCE=.\resource.h -# End Source File -# End Target -# End Project diff --git a/rostests/win32/user32/kbdlayout/kbdlayout.rbuild b/rostests/win32/user32/kbdlayout/kbdlayout.rbuild deleted file mode 100644 index b2c73909635..00000000000 --- a/rostests/win32/user32/kbdlayout/kbdlayout.rbuild +++ /dev/null @@ -1,7 +0,0 @@ - - . - user32 - gdi32 - kbdlayout.c - kbdlayout.rc - diff --git a/rostests/win32/user32/kbdlayout/kbdlayout.rc b/rostests/win32/user32/kbdlayout/kbdlayout.rc deleted file mode 100644 index 41eb31be514..00000000000 --- a/rostests/win32/user32/kbdlayout/kbdlayout.rc +++ /dev/null @@ -1,142 +0,0 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Russian resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) -#ifdef _WIN32 -LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -#pragma code_page(1251) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_MAINDIALOG DIALOG DISCARDABLE 0, 0, 327, 194 -STYLE DS_MODALFRAME | DS_CENTER | WS_CAPTION | WS_SYSMENU -CAPTION "Keyboard layout test" -FONT 8, "MS Sans Serif" -BEGIN - PUSHBUTTON "Close",ID_CANCEL,215,172,105,14 - EDITTEXT IDC_EDIT1,7,140,199,47,ES_MULTILINE | ES_AUTOHSCROLL - LISTBOX IDC_LIST,124,60,84,46,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | - WS_TABSTOP - LTEXT "Loaded layouts",IDC_STATIC,124,50,49,8 - LTEXT "Active:",IDC_ACTIVE,7,127,114,10,SS_SUNKEN - PUSHBUTTON "Unload",IDC_UNLOAD,124,109,41,14 - PUSHBUTTON "Activate",IDC_ACTIVATE,166,109,41,14 - GROUPBOX "Activate Flags",IDC_STATIC,215,7,103,67 - CONTROL "KLF_REORDER",IDC_KLF_REORDER,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,221,22,69,10 - CONTROL "KLF_RESET",IDC_KLF_RESET,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,221,34,66,12 - CONTROL "KLF_SETFORPROCESS",IDC_KLF_SETFORPROCESS,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,221,48,95,10 - CONTROL "KLF_SHIFTLOCK",IDC_KLF_SHIFTLOCK,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,221,60,72,10 - GROUPBOX "Activate layout",IDC_STATIC,216,77,103,50 - CONTROL "From list",IDC_FROMLIST,"Button",BS_AUTORADIOBUTTON | - WS_GROUP,220,90,41,10 - CONTROL "HKL_NEXT",IDC_HKL_NEXT,"Button",BS_AUTORADIOBUTTON,220, - 101,53,10 - CONTROL "HKL_PREV",IDC_HKL_PREV,"Button",BS_AUTORADIOBUTTON,220, - 112,53,10 - GROUPBOX "Load layout",IDC_STATIC,7,7,113,118 - CONTROL "KLF_ACTIVATE",IDL_KLF_ACTIVATE,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,14,44,67,10 - CONTROL "KLF_NOTELLSHELL",IDL_KLF_NOTELLSHELL,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,14,57,83,10 - LTEXT "pwszKLID:",IDC_STATIC,14,17,35,8 - EDITTEXT IDC_KLID,14,27,54,14,ES_AUTOHSCROLL - CONTROL "KLF_REORDER",IDL_KLF_REORDER,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,14,71,69,10 - CONTROL "KLF_REPLACELANG",IDL_KLF_REPLACELANG,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,14,84,85,10 - CONTROL "KLF_SUBSTITUTE_OK",IDL_KLF_SUBSTITUTE_OK,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,14,97,92,10 - CONTROL "KLF_SETFORPROCESS",IDL_KLF_SETFORPROCESS,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,14,110,95,10 - PUSHBUTTON "Load",IDC_LOAD,71,27,46,14 - PUSHBUTTON "Refresh",IDC_REFRESH,124,124,83,12 - GROUPBOX "Multithreading",IDC_STATIC,216,130,104,39 - LTEXT "Current thread ID:",IDC_CURTHREAD,219,141,93,8 - PUSHBUTTON "Create new thread",IDC_NEWTHREAD,234,152,71,12 - GROUPBOX "Load\\Activate delay",IDC_STATIC,124,7,85,40 - LTEXT "Delay (seconds):",IDC_STATIC,130,17,75,8 - EDITTEXT IDC_DELAY,128,29,59,14,ES_AUTOHSCROLL -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE -BEGIN - IDD_MAINDIALOG, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 320 - TOPMARGIN, 7 - BOTTOMMARGIN, 187 - END -END -#endif // APSTUDIO_INVOKED - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // Russian resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/rostests/win32/user32/kbdlayout/resource.h b/rostests/win32/user32/kbdlayout/resource.h deleted file mode 100644 index 91e056ea8e4..00000000000 --- a/rostests/win32/user32/kbdlayout/resource.h +++ /dev/null @@ -1,46 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by kbdlayout.rc -// -#define IDD_MAINDIALOG 101 -#define ID_CANCEL 1000 -#define IDC_EDIT1 1021 -#define IDC_LIST 1022 -#define IDC_ACTIVE 1023 -#define IDC_EDIT2 1024 -#define IDC_DELAY 1024 -#define IDC_UNLOAD 1025 -#define IDC_ACTIVATE 1026 -#define IDC_KLF_REORDER 1027 -#define IDC_KLF_RESET 1028 -#define IDC_KLF_SETFORPROCESS 1029 -#define IDC_KLF_SHIFTLOCK 1030 -#define IDC_FROMLIST 1032 -#define IDC_HKL_NEXT 1033 -#define IDC_HKL_PREV 1034 -#define IDL_KLF_ACTIVATE 1035 -#define IDL_KLF_NOTELLSHELL 1036 -#define IDC_KLID 1037 -#define IDL_KLF_REORDER 1038 -#define IDL_KLF_REPLACELANG 1039 -#define IDL_KLF_SUBSTITUTE_OK 1040 -#define IDL_KLF_SETFORPROCESS 1041 -#define IDC_HKL_PREV2 1042 -#define IDC_FROMEDIT 1042 -#define IDC_LOAD 1043 -#define IDC_REFRESH 1044 -#define IDC_HANDLE 1046 -#define IDC_CURTHREAD 1049 -#define IDC_NEWTHREAD 1050 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NO_MFC 1 -#define _APS_NEXT_RESOURCE_VALUE 105 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1051 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/rostests/win32/user32/sysicon/sysicon.c b/rostests/win32/user32/sysicon/sysicon.c deleted file mode 100644 index 0e74fbbcbd5..00000000000 --- a/rostests/win32/user32/sysicon/sysicon.c +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright 2006 Saveliy Tretiakov - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - /* This testapp demonstrates WS_SYSMENU + WS_EX_DLGMODALFRAME - * behavior and shows that DrawCaption does care - * about WS_EX_DLGMODALFRAME and WS_EX_TOOLWINDOW - */ - -#include "windows.h" -#include "stdio.h" -#include "resource.h" - -WCHAR WndClass[] = L"sysicon_class"; - -LRESULT CALLBACK WndProc(HWND hWnd, - UINT msg, - WPARAM wParam, - LPARAM lParam) -{ - - switch (msg) - { - - case WM_PAINT: - { - HDC hDc; - PAINTSTRUCT Ps; - RECT Rect; - GetClientRect(hWnd, &Rect); - - Rect.left = 10; - Rect.top = 10; - Rect.right-=10; - Rect.bottom = 25; - - hDc = BeginPaint(hWnd, &Ps); - SetBkMode( hDc, TRANSPARENT ); - - DrawCaption(hWnd, hDc, &Rect, DC_GRADIENT | DC_ACTIVE | DC_TEXT | DC_ICON); - - EndPaint(hWnd, &Ps); - - return 0; - } - - case WM_DESTROY: - PostQuitMessage(0); - return 0; - } - - return DefWindowProc(hWnd, msg, wParam, lParam); -} - -int APIENTRY wWinMain(HINSTANCE hInst, - HINSTANCE hPrevInstance, - LPWSTR lpCmdLine, - int nCmdShow) -{ - HWND hWnd1, hWnd2, hWnd3; - MSG msg; - WNDCLASSEX wcx; - UINT result; - - memset(&wcx, 0, sizeof(wcx)); - wcx.cbSize = sizeof(wcx); - wcx.lpfnWndProc = (WNDPROC) WndProc; - wcx.hInstance = hInst; - wcx.hbrBackground = (HBRUSH)COLOR_WINDOW; - wcx.lpszClassName = WndClass; - - if(!(result = RegisterClassEx(&wcx))) - { - return 1; - } - - /* WS_EX_DLGMODALFRAME */ - hWnd1 = CreateWindowEx(WS_EX_DLGMODALFRAME, - WndClass, - L"WS_SYSMENU | WS_EX_DLGMODALFRAME", - WS_CAPTION | WS_SYSMENU , - CW_USEDEFAULT, - CW_USEDEFAULT, - 400, - 100, - NULL, - 0, - hInst, - NULL); - - if(!hWnd1) - { - return 1; - } - - ShowWindow(hWnd1, SW_SHOW); - UpdateWindow(hWnd1); - - hWnd2 = CreateWindowEx(WS_EX_TOOLWINDOW, - WndClass, - L"WS_SYSMENU | WS_EX_TOOLWINDOW", - WS_CAPTION | WS_SYSMENU , - CW_USEDEFAULT, - CW_USEDEFAULT, - 400, - 100, - NULL, - 0, - hInst, - NULL); - - if(!hWnd2) - { - return 1; - } - - ShowWindow(hWnd2, SW_SHOW); - UpdateWindow(hWnd2); - - hWnd3 = CreateWindowEx(0, - WndClass, - L"WS_SYSMENU ", - WS_CAPTION | WS_SYSMENU , - CW_USEDEFAULT, - CW_USEDEFAULT, - 400, - 100, - NULL, - 0, - hInst, - NULL); - - if(!hWnd3) - { - return 1; - } - - ShowWindow(hWnd3, SW_SHOW); - UpdateWindow(hWnd3); - - while(GetMessage(&msg, NULL, 0, 0 )) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - UnregisterClass(WndClass, hInst); - return 0; -} diff --git a/rostests/win32/user32/sysicon/sysicon.rbuild b/rostests/win32/user32/sysicon/sysicon.rbuild deleted file mode 100644 index 030452bbb2c..00000000000 --- a/rostests/win32/user32/sysicon/sysicon.rbuild +++ /dev/null @@ -1,6 +0,0 @@ - - . - user32 - gdi32 - sysicon.c - diff --git a/rostests/win32/user32/user32.rbuild b/rostests/win32/user32/user32.rbuild deleted file mode 100644 index dcb5c66ed7b..00000000000 --- a/rostests/win32/user32/user32.rbuild +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/rostests/win32/win32k/setup.c b/rostests/win32/win32k/setup.c deleted file mode 100644 index 507484da7bd..00000000000 --- a/rostests/win32/win32k/setup.c +++ /dev/null @@ -1,6 +0,0 @@ -#include -#include "regtests.h" - -_SetupOnce() -{ -} diff --git a/rostests/win32/win32k/stubs.rbuild b/rostests/win32/win32k/stubs.rbuild deleted file mode 100644 index 3fb70ed726c..00000000000 --- a/rostests/win32/win32k/stubs.rbuild +++ /dev/null @@ -1,171 +0,0 @@ - - DbgPrint - RtlAssert@16 - ZwAllocateVirtualMemory@24 - RtlImageDirectoryEntryToData@16 - RtlInitAnsiString@8 - RtlInitUnicodeString@8 - NtClose@4 - ZwOpenFile@24 - ZwClose@4 - RtlNtStatusToDosError@4 - NtW32Call@20 - ZwOpenKey@12 - ZwQueryValueKey@24 - RtlUnicodeStringToInteger@12 - RtlQueryAtomInAtomTable@24 - RtlDeleteAtomFromAtomTable@8 - RtlCopyUnicodeString@8 - ZwRequestWaitReplyPort@12 - ZwDuplicateObject@28 - ZwSetSystemInformation@12 - RtlLookupAtomInAtomTable@12 - RtlAddAtomToAtomTable@12 - RtlFreeUnicodeString@4 - ZwConnectPort@32 - ZwOpenProcess@16 - RtlCreateUnicodeString@8 - RtlQueryRegistryValues@20 - RtlGetVersion@4 - NtOpenFile@24 - NtReadFile@36 - NtWaitForSingleObject@12 - NtDeviceIoControlFile@40 - NtAlertThread@4 - ZwQueryDefaultLocale@8 - ZwFreeVirtualMemory@16 - RtlFindClearBitsAndSet@12 - ZwReadFile@36 - RtlAnsiStringToUnicodeString@12 - RtlCompareUnicodeString@12 - ZwCreateDirectoryObject@12 - RtlCreateAtomTable@8 - RtlDestroyAtomTable@4 - ZwOpenDirectoryObject@12 - ZwQueryDirectoryObject@28 - RtlAppendUnicodeToString@8 - ZwCreateEvent@20 - RtlAreBitsSet@12 - RtlClearBits@12 - RtlInitializeBitMap@12 - RtlClearAllBits@4 - RtlAppendUnicodeStringToString@8 - ZwSetValueKey@24 - ZwQueryDirectoryFile@44 - RtlUnwind@16 - NtQueryInformationFile@20 - - - ExAllocatePool@8 - ExFreePool@4 - ExAllocatePoolWithTag@12 - IoBuildDeviceIoControlRequest@36 - IoBuildSynchronousFsdRequest@28 - @IofCallDriver@8 - KeWaitForSingleObject@20 - @ExAcquireFastMutex@4 - PsGetWin32Process@0 - @ExReleaseFastMutex@4 - @ExTryToAcquireFastMutex@4 - KeInitializeEvent@12 - ExEventObjectType - ObReferenceObjectByHandle@24 - KeSetEvent@12 - @ObfDereferenceObject@4 - KeRestoreFloatingPointState@4 - KeSaveFloatingPointState@4 - MmSecureVirtualMemory@12 - MmUnsecureVirtualMemory@4 - IoGetCurrentProcess@0 - KeQueryPerformanceCounter@4 - ExInitializeResourceLite@4 - ExAcquireResourceExclusiveLite@8 - KeGetCurrentThread@0 - PsGetCurrentProcessId@0 - @InterlockedDecrement@4 - @InterlockedExchange@8 - KeBugCheck@4 - ExDesktopObjectType - PsEstablishWin32Callouts@24 - MmUnmapViewInSystemSpace@4 - MmCreateSection@32 - MmMapViewInSystemSpace@12 - MmCopyToCaller@12 - PsGetWin32Thread@0 - KeDetachProcess@0 - ExInitializePagedLookasideList@28 - @InterlockedPushEntrySList@8 - ExInterlockedInsertTailList@12 - KeReleaseSpinLock@8 - ObOpenObjectByName@28 - ObOpenObjectByPointer@28 - KeAcquireSpinLock@8 - ExGetPreviousMode@0 - PsGetCurrentThreadId@0 - @ExReleaseResourceLite@4 - ExIsResourceAcquiredExclusiveLite@ - @InterlockedIncrement@4 - @InterlockedCompareExchange@12 - KeAddSystemServiceTable@20 - IoFileObjectType - ObReferenceObjectByPointer@16 - MmUnmapViewOfSection@8 - MmCopyFromCaller@12 - KiKernelApcDeliveryCheck@0 - ExIsResourceAcquiredExclusiveLite@4 - MmMapViewOfSection@40 - KeAttachProcess@4 - @InterlockedPopEntrySList@4 - ExWindowStationObjectType - ObInsertObject@24 - KeInitializeSpinLock@4 - PsThreadType - PsCreateSystemThread@28 - KeQueryTickCount@4 - PsLookupThreadByThreadId@8 - KeInitializeMutex@8 - KeWaitForMutexObject@20 - KeReleaseMutex@8 - KeDelayExecutionThread@12 - PsGetProcessId@4 - ObCreateObject@36 - KeClearEvent@4 - PsLookupProcessByProcessId@8 - PsProcessType - KeWaitForMultipleObjects@32 - KeQuerySystemTime@4 - ObReferenceObjectByName@32 - HalQueryDisplayOwnership@0 - IoDeviceObjectType - @KfReleaseSpinLock@8 - @KfAcquireSpinLock@4 - KeEnterCriticalRegion@0 - KeLeaveCriticalRegion@0 - KeGetCurrentIrql@0 - ExFreePoolWithTag@8 - PsGetProcessWin32Process@4 - ObFindHandleForObject@20 - PsSetProcessWin32Process@8 - PsGetThreadWin32Thread@4 - PsEstablishWin32Callouts@4 - PsSetThreadWin32Thread@8 - ProbeForRead@12 - ProbeForWrite@12 - @ExEnterCriticalRegionAndAcquireFastMutexUnsafe@4 - @ExReleaseFastMutexUnsafeAndLeaveCriticalRegion@4 - - - FT_Init_FreeType - FT_New_Memory_Face - FT_Done_Face - FT_MulFix - FT_Get_Sfnt_Table - FT_Get_First_Char - FT_Set_Pixel_Sizes - FT_Get_Char_Index - FT_Load_Glyph - FT_Get_Kerning - FT_Render_Glyph - FT_Set_Charmap - FT_Load_Sfnt_Table - diff --git a/rostests/win32/win32k/tests/eng-mem-1.c b/rostests/win32/win32k/tests/eng-mem-1.c deleted file mode 100644 index 54a4ed1b1ab..00000000000 --- a/rostests/win32/win32k/tests/eng-mem-1.c +++ /dev/null @@ -1,48 +0,0 @@ -#include -#include - -#include "regtests.h" - -static void RunTest() -{ -#if 0 - VOID *pmem1, *pmem2; - ULONG AllocSize1, AllocSize2; - ULONG AllocTag1, AllocTag2; - HANDLE Handle1, Handle2; - - /* Allocate memory with EngAllocMem */ - pmem1 = 0; - AllocSize1 = 1024; - AllocTag1 = 'zyxD'; - pmem1 = EngAllocMem(FL_ZERO_MEMORY, AllocSize1, AllocTag1); - _AssertNotEqualValue(pmem1, NULL); - - /* Allocate memory with EngAllocMem */ - pmem2 = 0; - AllocSize2 = 1024; - AllocTag2 = 'zyxD'; - pmem2 = EngAllocUserMem(AllocSize2, AllocTag2); - _AssertNotEqualValue(pmem1, NULL); - - /* Lock down memory with EngSecureMem - ** Dependant functions in ntoskrnl.exe are currently unimplemented - Handle1 = EngSecureMem(pmem1, AllocSize1); - _AssertNotEqualValue(pmem1, NULL); - Handle2 = EngSecureMem(pmem2, AllocSize2); - _AssertNotEqualValue(pmem2, NULL); - - /* Unlock down memory with EngSecureMem - ** Dependant functions in ntoskrnl.exe are currently unimplemented - EngUnsecureMem(Handle1); - EngUnsecureMem(Handle2); */ - - /* Free memory with EngFreeMem */ - EngFreeMem(pmem1); - - /* Free memory with EngFreeUserMem */ - EngFreeUserMem(pmem2); -#endif -} - -_Dispatcher(Eng_mem_1Test, "Win32k Engine Memory API") diff --git a/rostests/win32/win32k/win32k.rbuild b/rostests/win32/win32k/win32k.rbuild deleted file mode 100644 index 24a410216a7..00000000000 --- a/rostests/win32/win32k/win32k.rbuild +++ /dev/null @@ -1,16 +0,0 @@ - - . - . - include - include - include - - rtshared - regtests - win32k_base - pseh - freetype - ntoskrnl - setup.c - - diff --git a/rostests/winetests/CMakeLists.txt b/rostests/winetests/CMakeLists.txt deleted file mode 100644 index 4866549724f..00000000000 --- a/rostests/winetests/CMakeLists.txt +++ /dev/null @@ -1,106 +0,0 @@ - -add_definitions(-D__ROS_LONG64__) - -add_subdirectory(advapi32) -add_subdirectory(advpack) -if(NOT MSVC) - add_subdirectory(amstream) # FIXME: msvc build. -endif() -add_subdirectory(atl) -add_subdirectory(avifil32) -add_subdirectory(browseui) -add_subdirectory(cabinet) -add_subdirectory(comcat) -add_subdirectory(comctl32) -add_subdirectory(comdlg32) -add_subdirectory(credui) -add_subdirectory(crypt32) -add_subdirectory(cryptnet) -add_subdirectory(cryptui) -add_subdirectory(dnsapi) -add_subdirectory(dsound) -add_subdirectory(fusion) -add_subdirectory(gdi32) -add_subdirectory(gdiplus) -if(NOT MSVC) - add_subdirectory(hlink) # FIXME: msvc build. -endif() -add_subdirectory(icmp) -if(NOT MSVC) - add_subdirectory(imagehlp) # FIXME: msvc build. -endif() -add_subdirectory(imm32) -add_subdirectory(inetcomm) -add_subdirectory(inetmib1) -add_subdirectory(iphlpapi) -add_subdirectory(itss) -add_subdirectory(jscript) -add_subdirectory(kernel32) -add_subdirectory(localspl) -add_subdirectory(localui) -add_subdirectory(lz32) -add_subdirectory(mapi32) -add_subdirectory(mlang) -add_subdirectory(msacm32) -add_subdirectory(mscms) -add_subdirectory(msctf) -if(NOT MSVC) - # FIXME: msvc build. - add_subdirectory(mshtml) - add_subdirectory(msi) -endif() -add_subdirectory(mstask) -add_subdirectory(msvcrt) -add_subdirectory(msvcrtd) -add_subdirectory(msvfw32) -if(NOT MSVC) - add_subdirectory(msxml3) # FIXME: msvc build. -endif() -add_subdirectory(netapi32) -add_subdirectory(ntdll) -add_subdirectory(ntdsapi) -add_subdirectory(ntprint) -add_subdirectory(odbccp32) -add_subdirectory(ole32) -add_subdirectory(oleacc) -if(NOT MSVC) - add_subdirectory(oleaut32) # FIXME: msvc build. -endif() -add_subdirectory(opengl32) -add_subdirectory(pdh) -add_subdirectory(powrprof) -add_subdirectory(psapi) -add_subdirectory(qmgr) -add_subdirectory(quartz) -add_subdirectory(rasapi32) -add_subdirectory(riched20) -add_subdirectory(riched32) -add_subdirectory(rpcrt4) -add_subdirectory(rsabase) -add_subdirectory(rsaenh) -add_subdirectory(schannel) -add_subdirectory(secur32) -add_subdirectory(serialui) -add_subdirectory(setupapi) -add_subdirectory(shdocvw) -add_subdirectory(shell32) -add_subdirectory(shlwapi) -add_subdirectory(snmpapi) -add_subdirectory(spoolss) -add_subdirectory(twain_32) -if(NOT MSVC) - add_subdirectory(urlmon) # FIXME: msvc build. -endif() -add_subdirectory(user32) -add_subdirectory(userenv) -add_subdirectory(usp10) -add_subdirectory(uxtheme) -add_subdirectory(version) -add_subdirectory(winhttp) -add_subdirectory(wininet) -add_subdirectory(winmm) -add_subdirectory(wintrust) -add_subdirectory(wlanapi) -add_subdirectory(wldap32) -add_subdirectory(ws2_32) -add_subdirectory(xmllite) diff --git a/rostests/winetests/GUI/GUI.rbuild b/rostests/winetests/GUI/GUI.rbuild deleted file mode 100644 index 8aceb4b1268..00000000000 --- a/rostests/winetests/GUI/GUI.rbuild +++ /dev/null @@ -1,16 +0,0 @@ - - - - . - 0x600 - 0x501 - - gdi32 - user32 - comctl32 - browsewnd.c - mainwnd.c - misc.c - WinetestsGUI.rc - precomp.h - diff --git a/rostests/winetests/GUI/WinetestsGUI.rc b/rostests/winetests/GUI/WinetestsGUI.rc deleted file mode 100644 index 05d06f5f098..00000000000 --- a/rostests/winetests/GUI/WinetestsGUI.rc +++ /dev/null @@ -1,11 +0,0 @@ -#include -#include -#include "resource.h" - - -#define REACTOS_STR_FILE_DESCRIPTION "ReactOS API test GUI\0" -#define REACTOS_STR_INTERNAL_NAME "WinetestsGUI\0" -#define REACTOS_STR_ORIGINAL_FILENAME "WinetestsGUI.exe\0" -//#include - -#include "rsrc.rc" diff --git a/rostests/winetests/GUI/browsewnd.c b/rostests/winetests/GUI/browsewnd.c deleted file mode 100644 index 808a592eaba..00000000000 --- a/rostests/winetests/GUI/browsewnd.c +++ /dev/null @@ -1,414 +0,0 @@ -/* - * PROJECT: ReactOS API Test GUI - * LICENSE: GPL - See COPYING in the top level directory - * FILE: - * PURPOSE: browse dialog implementation - * COPYRIGHT: Copyright 2008 Ged Murphy - * - */ - -#include - -#define EXE_SEARCH_DIR L"\\Debug\\testexes\\*" -#define IL_MAIN 0 -#define IL_TEST 1 - -#define HAS_NO_CHILD 0 -#define HAS_CHILD 1 - - -static INT -GetNumberOfExesInFolder(LPWSTR lpFolder) -{ - HANDLE hFind; - WIN32_FIND_DATAW findFileData; - INT numFiles = 0; - - hFind = FindFirstFileW(lpFolder, - &findFileData); - if (hFind == INVALID_HANDLE_VALUE) - { - DisplayError(GetLastError()); - return 0; - } - - do - { - if (!(findFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) - { - numFiles++; - } - } while (FindNextFile(hFind, &findFileData) != 0); - - return numFiles; -} - -static INT -GetListOfTestExes(PMAIN_WND_INFO pInfo) -{ - HANDLE hFind; - WIN32_FIND_DATAW findFileData; - WCHAR szExePath[MAX_PATH]; - LPWSTR ptr; - INT numFiles = 0; - INT len; - - len = GetCurrentDirectoryW(MAX_PATH, szExePath); - if (!len) return 0; - - wcsncat(szExePath, EXE_SEARCH_DIR, MAX_PATH - (len + 1)); - - numFiles = GetNumberOfExesInFolder(szExePath); - if (!numFiles) return 0; - - pInfo->lpExeList = HeapAlloc(GetProcessHeap(), - 0, - numFiles * (MAX_PATH * sizeof(WCHAR))); - if (!pInfo->lpExeList) - return 0; - - hFind = FindFirstFileW(szExePath, - &findFileData); - if (hFind == INVALID_HANDLE_VALUE) - { - DisplayError(GetLastError()); - HeapFree(GetProcessHeap(), 0, pInfo->lpExeList); - return 0; - } - - /* remove the glob */ - ptr = wcschr(szExePath, L'*'); - if (ptr) - *ptr = L'\0'; - - /* don't modify our base pointer */ - ptr = pInfo->lpExeList; - - do - { - if (!(findFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) - { - /* set the path */ - wcscpy(ptr, szExePath); - - /* tag the file onto the path */ - len = MAX_PATH - (wcslen(ptr) + 1); - wcsncat(ptr, findFileData.cFileName, len); - - /* move the pointer along by MAX_PATH */ - ptr += MAX_PATH; - } - } while (FindNextFile(hFind, &findFileData) != 0); - - return numFiles; -} - -static BOOL -NodeHasChild(PMAIN_WND_INFO pInfo, - HTREEITEM hItem) -{ - TV_ITEM tvItem; - - tvItem.hItem = hItem; - tvItem.mask = TVIF_CHILDREN; - - (void)TreeView_GetItem(pInfo->hBrowseTV, &tvItem); - - return (tvItem.cChildren == 1); -} - -static VOID -FreeItemTag(PMAIN_WND_INFO pInfo, - HTREEITEM hItem) -{ - TV_ITEM tvItem; - - tvItem.hItem = hItem; - tvItem.mask = TVIF_PARAM; - - (void)TreeView_GetItem(pInfo->hBrowseTV, &tvItem); - - HeapFree(GetProcessHeap(), - 0, - (PTEST_ITEM)tvItem.lParam); -} - -static VOID -TraverseTreeView(PMAIN_WND_INFO pInfo, - HTREEITEM hItem) -{ - while (NodeHasChild(pInfo, hItem)) - { - HTREEITEM hChildItem; - - FreeItemTag(pInfo, hItem); - - hChildItem = TreeView_GetChild(pInfo->hBrowseTV, - hItem); - - TraverseTreeView(pInfo, - hChildItem); - - hItem = TreeView_GetNextSibling(pInfo->hBrowseTV, - hItem); - } - - if (hItem) - { - /* loop the child items and free the tags */ - while (TRUE) - { - HTREEITEM hOldItem; - - FreeItemTag(pInfo, hItem); - hOldItem = hItem; - hItem = TreeView_GetNextSibling(pInfo->hBrowseTV, - hItem); - if (hItem == NULL) - { - hItem = hOldItem; - break; - } - } - - hItem = TreeView_GetParent(pInfo->hBrowseTV, - hItem); - } -} - -static HTREEITEM -InsertIntoTreeView(HWND hTreeView, - HTREEITEM hRoot, - LPWSTR lpLabel, - LPARAM Tag, - INT Image, - INT Child) -{ - TV_ITEM tvi; - TV_INSERTSTRUCT tvins; - - ZeroMemory(&tvi, sizeof(tvi)); - ZeroMemory(&tvins, sizeof(tvins)); - - tvi.mask = TVIF_TEXT | TVIF_PARAM | TVIF_IMAGE | TVIF_CHILDREN | TVIF_SELECTEDIMAGE; - tvi.pszText = lpLabel; - tvi.cchTextMax = lstrlen(lpLabel); - tvi.lParam = Tag; - tvi.iImage = Image; - tvi.iSelectedImage = Image; - tvi.cChildren = Child; - - tvins.item = tvi; - tvins.hParent = hRoot; - - return TreeView_InsertItem(hTreeView, &tvins); -} - -static PTEST_ITEM -BuildTestItemData(LPWSTR lpName, - LPWSTR lpRunCmd) -{ - PTEST_ITEM pItem; - - pItem = (PTEST_ITEM)HeapAlloc(GetProcessHeap(), - 0, - sizeof(TEST_ITEM)); - if (pItem) - { - if (lpName) - { - wcsncpy(pItem->szName, lpName, MAX_PATH); - } - if (lpRunCmd) - { - wcsncpy(pItem->szRunCmd, lpRunCmd, MAX_RUN_CMD); - } - } - - return pItem; -} - -static VOID -PopulateTreeView(PMAIN_WND_INFO pInfo) -{ - HTREEITEM hRoot; - HIMAGELIST hImgList; - PTEST_ITEM pTestItem; - LPWSTR lpExePath; - LPWSTR lpTestName; - INT i; - - pInfo->hBrowseTV = GetDlgItem(pInfo->hBrowseDlg, IDC_TREEVIEW); - - (void)TreeView_DeleteAllItems(pInfo->hBrowseTV); - - hImgList = InitImageList(IDI_ICON, - IDI_TESTS, - 16, - 16); - if (!hImgList) return; - - (void)TreeView_SetImageList(pInfo->hBrowseTV, - hImgList, - TVSIL_NORMAL); - - pTestItem = BuildTestItemData(L"Full", L"runall"); - - /* insert the root item into the tree */ - hRoot = InsertIntoTreeView(pInfo->hBrowseTV, - NULL, - L"Full", - (LPARAM)pTestItem, - IL_MAIN, - HAS_CHILD); - - for (i = 0; i < pInfo->numExes; i++) - { - HTREEITEM hParent; - LPWSTR lpStr; - - lpExePath = pInfo->lpExeList + (MAX_PATH * i); - - lpTestName = wcsrchr(lpExePath, L'\\'); - if (lpTestName) - { - lpTestName++; - - lpStr = wcschr(lpTestName, L'_'); - if (lpStr) - { - //FIXME: Query the test name from the exe directly - - pTestItem = BuildTestItemData(lpTestName, lpExePath); - - hParent = InsertIntoTreeView(pInfo->hBrowseTV, - hRoot, - lpTestName, - (LPARAM)pTestItem, - IL_TEST, - HAS_CHILD); - } - } - } - - if (hRoot) - { - TreeView_Expand(pInfo->hBrowseTV, - hRoot, - TVE_EXPAND); - } -} - -static VOID -PopulateTestList(PMAIN_WND_INFO pInfo) -{ - pInfo->numExes = GetListOfTestExes(pInfo); - if (pInfo->numExes) - { - PopulateTreeView(pInfo); - } -} - -static BOOL -OnInitBrowseDialog(HWND hDlg, - LPARAM lParam) -{ - PMAIN_WND_INFO pInfo; - - pInfo = (PMAIN_WND_INFO)lParam; - - pInfo->hBrowseDlg = hDlg; - - SetWindowLongPtr(hDlg, - GWLP_USERDATA, - (LONG_PTR)pInfo); - - PopulateTestList(pInfo); - - return TRUE; -} - -BOOL CALLBACK -BrowseDlgProc(HWND hDlg, - UINT Message, - WPARAM wParam, - LPARAM lParam) -{ - PMAIN_WND_INFO pInfo; - - /* Get the window context */ - pInfo = (PMAIN_WND_INFO)GetWindowLongPtr(hDlg, - GWLP_USERDATA); - if (pInfo == NULL && Message != WM_INITDIALOG) - { - goto HandleDefaultMessage; - } - - switch(Message) - { - case WM_INITDIALOG: - return OnInitBrowseDialog(hDlg, lParam); - - case WM_COMMAND: - { - switch (LOWORD(wParam)) - { - case IDOK: - { - TV_ITEM tvItem; - - tvItem.hItem = TreeView_GetSelection(pInfo->hBrowseTV); - tvItem.mask = TVIF_PARAM; - - if (TreeView_GetItem(pInfo->hBrowseTV, &tvItem)) - { - PTEST_ITEM pItem; - - pItem = (PTEST_ITEM)tvItem.lParam; - if (pItem) - CopyMemory(&pInfo->SelectedTest, pItem, sizeof(TEST_ITEM)); - - EndDialog(hDlg, - LOWORD(wParam)); - } - else - { - DisplayMessage(L"Please select an item"); - } - - return TRUE; - } - - case IDCANCEL: - { - HeapFree(GetProcessHeap(), 0, pInfo->lpExeList); - pInfo->lpExeList = NULL; - - EndDialog(hDlg, - LOWORD(wParam)); - - return TRUE; - } - } - - break; - } - - case WM_DESTROY: - { - HTREEITEM hItem = TreeView_GetRoot(pInfo->hBrowseTV); - - TraverseTreeView(pInfo, hItem); - - pInfo->hBrowseDlg = NULL; - - break; - } - -HandleDefaultMessage: - default: - return FALSE; - } - - return FALSE; -} diff --git a/rostests/winetests/GUI/lang/en-US.rc b/rostests/winetests/GUI/lang/en-US.rc deleted file mode 100644 index c3a506c1465..00000000000 --- a/rostests/winetests/GUI/lang/en-US.rc +++ /dev/null @@ -1,47 +0,0 @@ -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US - -IDD_WINETESTGUI DIALOGEX 0, 0, 293, 262 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME -CAPTION "Winetest GUI" -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - DEFPUSHBUTTON "OK",IDOK,236,241,50,14,WS_GROUP - CONTROL "",IDC_LIST,"SysListView32",LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,69,279,103 - EDITTEXT IDC_OUTPUT,7,175,279,62,ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY - COMBOBOX IDC_TESTSELECTION,27,12,205,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - LTEXT "Test:",IDC_STATIC,6,14,18,8 - PUSHBUTTON "Browse...",IDC_BROWSE,236,11,50,14 - PUSHBUTTON "Run",IDC_RUN,236,30,50,14 - CONTROL "",IDC_PROGRESS,"msctls_progress32",PBS_SMOOTH | WS_BORDER,28,30,204,14 - LTEXT "Runs:",IDC_STATIC,8,53,20,8 - LTEXT "?",IDC_NUMRUNS,33,53,8,8 - LTEXT "Errors:",IDC_STATIC,55,53,23,8 - LTEXT "?",IDC_NUMERRORS,85,53,8,8 - LTEXT "Failures:",IDC_STATIC,107,53,28,8 - LTEXT "?",IDC_NUMFAILURES,141,53,8,8 - PUSHBUTTON "Options",IDC_OPTIONS,181,49,50,14 - PUSHBUTTON "Stop",IDC_STOP,236,49,50,14 - - LTEXT "status bar",IDC_STATUS,7,244,210,8 -END - -IDD_TESTBROWSER DIALOGEX 0, 0, 259, 250 -STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME -CAPTION "Test hierarchy" -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - PUSHBUTTON "Select", IDOK, 202, 7, 50, 14 - PUSHBUTTON "Close", IDCANCEL, 202, 34, 50, 14 - CONTROL "", IDC_TREEVIEW, "SysTreeView32", WS_BORDER | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT, 7, 7, 189, 236 -END - -IDD_OPTIONS DIALOGEX 0, 0, 180, 100 -STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME -CAPTION "Options" -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - PUSHBUTTON "OK", IDOK, 70, 80, 50, 14 - PUSHBUTTON "Cancel", IDCANCEL, 125, 80, 50, 14 - CONTROL "Hide console window",IDC_HIDECONSOLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,10,80,10 - CONTROL "Run on start",IDC_RUNONSTART,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,30,80,10 -END diff --git a/rostests/winetests/GUI/mainwnd.c b/rostests/winetests/GUI/mainwnd.c deleted file mode 100644 index a2b3d38f7de..00000000000 --- a/rostests/winetests/GUI/mainwnd.c +++ /dev/null @@ -1,415 +0,0 @@ -/* - * PROJECT: ReactOS API Test GUI - * LICENSE: GPL - See COPYING in the top level directory - * FILE: - * PURPOSE: main dialog implementation - * COPYRIGHT: Copyright 2008 Ged Murphy - * - */ - -#include -#include - -#define BUFSIZE 4096 - -HINSTANCE hInstance; - -WCHAR szPipeName[] = L"\\\\.\\pipe\\winetest_pipe"; - -typedef int (_cdecl *RUNTEST)(char **); - -DWORD WINAPI -PipeReadThread(LPVOID lpParam) -{ - PMAIN_WND_INFO pInfo; - HWND hList, hEdit; - DWORD dwRead; - CHAR chBuf[BUFSIZE]; - BOOL bSuccess = FALSE; - LVITEMA item; - INT count; - - pInfo = (PMAIN_WND_INFO)lpParam; - - hList = GetDlgItem(pInfo->hMainWnd, IDC_LIST); - hEdit = GetDlgItem(pInfo->hMainWnd, IDC_OUTPUT); - - ZeroMemory(&item, sizeof(LVITEMA)); - item.mask = LVIF_TEXT; - - while (TRUE) - { - dwRead = 0; - bSuccess = ReadFile(pInfo->hStdOutRd, - chBuf, - BUFSIZE, - &dwRead, - NULL); - if(!bSuccess || dwRead == 0) - break; - - chBuf[dwRead] = 0; - - count = GetWindowTextLengthA(hEdit); - SendMessageA(hEdit, EM_SETSEL, (WPARAM)count, (LPARAM)count); - SendMessageA(hEdit, EM_REPLACESEL, 0, (LPARAM)chBuf); - - //item.iItem = ListView_GetItemCount(hList); - //item.pszText = chBuf; - //SendMessage(hEdit, LVM_INSERTITEMA, 0, (LPARAM)&item); - } - - return 0; -} - - -DWORD WINAPI -CreateClientProcess(PMAIN_WND_INFO pInfo) -{ - SECURITY_ATTRIBUTES sa; - STARTUPINFO si; - PROCESS_INFORMATION pi; - BOOL bSuccess = FALSE; - - // - // Set up the security attributes - // - sa.nLength= sizeof(SECURITY_ATTRIBUTES); - sa.lpSecurityDescriptor = NULL; - sa.bInheritHandle = TRUE; - - // - // Create a pipe for the child process's STDOUT - // - if (!CreatePipe(&pInfo->hStdOutRd, - &pInfo->hStdOutWr, - &sa, - 0)) - { - return FALSE; - } - - // - // Ensure the read handle to the pipe for STDOUT is not inherited - // - if (!SetHandleInformation(pInfo->hStdOutRd, - HANDLE_FLAG_INHERIT, - 0)) - { - return FALSE; - } - - ZeroMemory(&si, sizeof(STARTUPINFO)); - si.cb = sizeof(STARTUPINFO); - si.hStdError = pInfo->hStdOutWr; - si.hStdOutput = pInfo->hStdOutWr; - si.hStdInput = GetStdHandle(STD_INPUT_HANDLE); - si.dwFlags |= STARTF_USESTDHANDLES; - - ZeroMemory(&pi, sizeof(PROCESS_INFORMATION)); - - bSuccess = CreateProcessW(pInfo->lpCmdLine, - NULL, - NULL, - NULL, - TRUE, - 0,//CREATE_SUSPENDED, - NULL, - NULL, - &si, - &pi); - if (bSuccess) - { - // - // Create thread to handle pipe input from child processes - // - pInfo->hPipeThread = CreateThread(NULL, - 0, - PipeReadThread, - pInfo, - 0, - NULL); - - WaitForSingleObject(pi.hProcess, INFINITE); - - CloseHandle(pi.hProcess); - CloseHandle(pi.hThread); - } - - return bSuccess; -} - - -static BOOL -OnInitMainDialog(HWND hDlg, - LPARAM lParam) -{ - PMAIN_WND_INFO pInfo; - - pInfo = (PMAIN_WND_INFO)lParam; - - /* Initialize the main window context */ - pInfo->hMainWnd = hDlg; - - SetWindowLongPtr(hDlg, - GWLP_USERDATA, - (LONG_PTR)pInfo); - - pInfo->hSmIcon = LoadImageW(hInstance, - MAKEINTRESOURCEW(IDI_ICON), - IMAGE_ICON, - 16, - 16, - 0); - if (pInfo->hSmIcon) - { - SendMessageW(hDlg, - WM_SETICON, - ICON_SMALL, - (LPARAM)pInfo->hSmIcon); - } - - pInfo->hBgIcon = LoadImageW(hInstance, - MAKEINTRESOURCEW(IDI_ICON), - IMAGE_ICON, - 32, - 32, - 0); - if (pInfo->hBgIcon) - { - SendMessageW(hDlg, - WM_SETICON, - ICON_BIG, - (LPARAM)pInfo->hBgIcon); - } - - return TRUE; -} - -static VOID -RunSelectedTest(PMAIN_WND_INFO pInfo) -{ - HWND hRunCmd; - WCHAR szTextCmd[MAX_RUN_CMD]; - INT sel; - - hRunCmd = GetDlgItem(pInfo->hMainWnd, IDC_TESTSELECTION); - - sel = SendMessageW(hRunCmd, - CB_GETCURSEL, - 0, - 0); - if (sel != CB_ERR) - { - if (SendMessageW(hRunCmd, - CB_GETLBTEXT, - sel, - (LPARAM)szTextCmd) != CB_ERR) - { - pInfo->lpCmdLine = (LPWSTR)SendMessage(hRunCmd, - CB_GETITEMDATA, - 0, - 0); - if (pInfo->lpCmdLine) - { - // - // Create a new thread to create the client process - // and recieve any ouput via stdout - // - CreateThread(NULL, - 0, - CreateClientProcess, - pInfo, - 0, - NULL); - } - } - } -} - -static VOID -AddTestToCombo(PMAIN_WND_INFO pInfo) -{ - HWND hRunCmd; - LPWSTR lpExePath; - INT len; - - hRunCmd = GetDlgItem(pInfo->hMainWnd, IDC_TESTSELECTION); - if (hRunCmd) - { - SendMessageW(hRunCmd, - CB_INSERTSTRING, - 0, - (LPARAM)pInfo->SelectedTest.szName); - - len = (wcslen(pInfo->SelectedTest.szRunCmd) + 1) * sizeof(WCHAR); - lpExePath = HeapAlloc(GetProcessHeap(), 0, len); - if (lpExePath) - { - wcsncpy(lpExePath, - pInfo->SelectedTest.szRunCmd, - len / sizeof(WCHAR)); - } - - SendMessageW(hRunCmd, - CB_SETITEMDATA, - 0, - (LPARAM)lpExePath); - SendMessageW(hRunCmd, - CB_SETCURSEL, - 0, - 0); - } -} - -static VOID -FreeTestCmdStrings(PMAIN_WND_INFO pInfo) -{ - HWND hRunCmd; - LPWSTR lpExePath; - INT cnt, i; - - hRunCmd = GetDlgItem(pInfo->hMainWnd, IDC_TESTSELECTION); - - cnt = SendMessageW(hRunCmd, - CB_GETCOUNT, - 0, - 0); - if (cnt != CB_ERR) - { - for (i = 0; i < cnt; i++) - { - lpExePath = (LPWSTR)SendMessage(hRunCmd, - CB_GETITEMDATA, - i, - 0); - if (lpExePath) - { - HeapFree(GetProcessHeap(), 0, lpExePath); - } - } - } -} - -static BOOL CALLBACK -MainDlgProc(HWND hDlg, - UINT Message, - WPARAM wParam, - LPARAM lParam) -{ - PMAIN_WND_INFO pInfo; - - /* Get the window context */ - pInfo = (PMAIN_WND_INFO)GetWindowLongPtr(hDlg, - GWLP_USERDATA); - if (pInfo == NULL && Message != WM_INITDIALOG) - { - goto HandleDefaultMessage; - } - - switch(Message) - { - case WM_INITDIALOG: - return OnInitMainDialog(hDlg, lParam); - - case WM_COMMAND: - { - switch(LOWORD(wParam)) - { - case IDC_BROWSE: - { - INT_PTR ret; - - ret = DialogBoxParamW(hInstance, - MAKEINTRESOURCEW(IDD_TESTBROWSER), - hDlg, - (DLGPROC)BrowseDlgProc, - (LPARAM)pInfo); - if (ret == IDOK) - { - AddTestToCombo(pInfo); - } - - break; - } - case IDC_OPTIONS: - DialogBoxParamW(hInstance, - MAKEINTRESOURCEW(IDD_OPTIONS), - hDlg, - (DLGPROC)OptionsDlgProc, - (LPARAM)pInfo); - break; - - case IDC_RUN: - RunSelectedTest(pInfo); - break; - - case IDOK: - EndDialog(hDlg, 0); - break; - } - } - break; - - case WM_CLOSE: - EndDialog(hDlg, 0); - break; - - case WM_DESTROY: - if (pInfo->hSmIcon) - DestroyIcon(pInfo->hSmIcon); - if (pInfo->hBgIcon) - DestroyIcon(pInfo->hBgIcon); - - FreeTestCmdStrings(pInfo); - - break; - -HandleDefaultMessage: - default: - return FALSE; - } - - return FALSE; -} - - -INT WINAPI -wWinMain(HINSTANCE hInst, - HINSTANCE hPrev, - LPWSTR Cmd, - int iCmd) -{ - INITCOMMONCONTROLSEX iccx; - PMAIN_WND_INFO pInfo; - INT Ret = -1; - - UNREFERENCED_PARAMETER(hPrev); - UNREFERENCED_PARAMETER(Cmd); - UNREFERENCED_PARAMETER(iCmd); - - hInstance = hInst; - - ZeroMemory(&iccx, sizeof(INITCOMMONCONTROLSEX)); - iccx.dwSize = sizeof(INITCOMMONCONTROLSEX); - iccx.dwICC = ICC_TAB_CLASSES; - InitCommonControlsEx(&iccx); - - pInfo = HeapAlloc(GetProcessHeap(), - 0, - sizeof(MAIN_WND_INFO)); - if (pInfo) - { - Ret = (DialogBoxParamW(hInstance, - MAKEINTRESOURCEW(IDD_WINETESTGUI), - NULL, - (DLGPROC)MainDlgProc, - (LPARAM)pInfo) == IDOK); - - HeapFree(GetProcessHeap(), - 0, - pInfo); - } - - return Ret; -} diff --git a/rostests/winetests/GUI/misc.c b/rostests/winetests/GUI/misc.c deleted file mode 100644 index 7830f277315..00000000000 --- a/rostests/winetests/GUI/misc.c +++ /dev/null @@ -1,311 +0,0 @@ -/* - * PROJECT: ReactOS API Test GUI - * LICENSE: GPL - See COPYING in the top level directory - * FILE: - * PURPOSE: miscallanous functions - * COPYRIGHT: Copyright 2005 Thomas Weidenmueller - * Copyright 2006 - 2008 Ged Murphy - * - */ - -#include - -static INT -LengthOfStrResource(IN HINSTANCE hInst, - IN UINT uID) -{ - HRSRC hrSrc; - HGLOBAL hRes; - LPWSTR lpName, lpStr; - - if (hInst == NULL) - { - return -1; - } - - /* There are always blocks of 16 strings */ - lpName = (LPWSTR)MAKEINTRESOURCEW((uID >> 4) + 1); - - /* Find the string table block */ - if ((hrSrc = FindResourceW(hInst, lpName, (LPWSTR)RT_STRING)) && - (hRes = LoadResource(hInst, hrSrc)) && - (lpStr = (WCHAR*) LockResource(hRes))) - { - UINT x; - - /* Find the string we're looking for */ - uID &= 0xF; /* position in the block, same as % 16 */ - for (x = 0; x < uID; x++) - { - lpStr += (*lpStr) + 1; - } - - /* Found the string */ - return (int)(*lpStr); - } - return -1; -} - -INT -AllocAndLoadString(OUT LPWSTR *lpTarget, - IN HINSTANCE hInst, - IN UINT uID) -{ - INT ln; - - ln = LengthOfStrResource(hInst, - uID); - if (ln++ > 0) - { - (*lpTarget) = (LPTSTR)LocalAlloc(LMEM_FIXED, - ln * sizeof(TCHAR)); - if ((*lpTarget) != NULL) - { - INT Ret; - if (!(Ret = LoadStringW(hInst, uID, *lpTarget, ln))) - { - LocalFree((HLOCAL)(*lpTarget)); - } - return Ret; - } - } - return 0; -} - -DWORD -LoadAndFormatString(IN HINSTANCE hInstance, - IN UINT uID, - OUT LPWSTR *lpTarget, - ...) -{ - DWORD Ret = 0; - LPTSTR lpFormat; - va_list lArgs; - - if (AllocAndLoadString(&lpFormat, - hInstance, - uID) > 0) - { - va_start(lArgs, lpTarget); - /* let's use Format to format it because it has the ability to allocate - memory automatically */ - Ret = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING, - lpFormat, - 0, - 0, - (LPTSTR)lpTarget, - 0, - &lArgs); - va_end(lArgs); - - LocalFree((HLOCAL)lpFormat); - } - - return Ret; -} - -BOOL -StatusBarLoadAndFormatString(IN HWND hStatusBar, - IN INT PartId, - IN HINSTANCE hInstance, - IN UINT uID, - ...) -{ - BOOL Ret = FALSE; - LPWSTR lpFormat, lpStr; - va_list lArgs; - - if (AllocAndLoadString(&lpFormat, - hInstance, - uID) > 0) - { - va_start(lArgs, uID); - /* let's use FormatMessage to format it because it has the ability to allocate - memory automatically */ - Ret = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING, - lpFormat, - 0, - 0, - (VOID*)&lpStr, - 0, - &lArgs); - va_end(lArgs); - - if (lpStr != NULL) - { - Ret = (BOOL)SendMessageW(hStatusBar, - SB_SETTEXT, - (WPARAM)PartId, - (LPARAM)lpStr); - LocalFree((HLOCAL)lpStr); - } - - LocalFree((HLOCAL)lpFormat); - } - - return Ret; -} - -BOOL -StatusBarLoadString(IN HWND hStatusBar, - IN INT PartId, - IN HINSTANCE hInstance, - IN UINT uID) -{ - BOOL Ret = FALSE; - LPWSTR lpStr; - - if (AllocAndLoadString(&lpStr, - hInstance, - uID) > 0) - { - Ret = (BOOL)SendMessageW(hStatusBar, - SB_SETTEXT, - (WPARAM)PartId, - (LPARAM)lpStr); - LocalFree((HLOCAL)lpStr); - } - - return Ret; -} - - -INT -GetTextFromEdit(OUT LPWSTR lpString, - IN HWND hDlg, - IN UINT Res) -{ - INT len = GetWindowTextLengthW(GetDlgItem(hDlg, Res)); - if(len > 0) - { - GetDlgItemTextW(hDlg, - Res, - lpString, - len + 1); - } - else - lpString = NULL; - - return len; -} - -VOID DisplayError(INT err) -{ - LPWSTR lpMsgBuf = NULL; - - FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - err, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (VOID*)&lpMsgBuf, - 0, - NULL ); - - MessageBoxW(NULL, lpMsgBuf, L"Error!", MB_OK | MB_ICONERROR); - - LocalFree(lpMsgBuf); -} - -VOID DisplayMessage(LPWSTR lpMsg) -{ - MessageBoxW(NULL, lpMsg, L"Note!", MB_ICONEXCLAMATION|MB_OK); -} - - - -HIMAGELIST -InitImageList(UINT StartResource, - UINT EndResource, - UINT Width, - UINT Height) -{ - HICON hIcon; - HIMAGELIST hImageList; - UINT i; - INT Ret; - - /* Create the toolbar icon image list */ - hImageList = ImageList_Create(Width, - Height, - ILC_MASK | ILC_COLOR32, - EndResource - StartResource, - 0); - if (hImageList == NULL) - return NULL; - - /* Add all icons to the image list */ - for (i = StartResource; i <= EndResource; i++) - { - hIcon = (HICON)LoadImageW(hInstance, - MAKEINTRESOURCEW(i), - IMAGE_ICON, - Width, - Height, - LR_DEFAULTCOLOR); - if (hIcon == NULL) - goto fail; - - Ret = ImageList_AddIcon(hImageList, - hIcon); - if (Ret == -1) - goto fail; - - DestroyIcon(hIcon); - } - - return hImageList; - -fail: - ImageList_Destroy(hImageList); - return NULL; -} - -DWORD -AnsiToUnicode(LPCSTR lpSrcStr, - LPWSTR *lpDstStr) -{ - INT length; - INT ret = 0; - - length = strlen(lpSrcStr) + 1; - - *lpDstStr = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, length * sizeof(WCHAR)); - if (*lpDstStr) - { - ret = MultiByteToWideChar(CP_ACP, - 0, - lpSrcStr, - -1, - *lpDstStr, - length); - } - - return ret; -} - -DWORD -UnicodeToAnsi(LPCWSTR lpSrcStr, - LPSTR *lpDstStr) -{ - INT length; - INT ret = 0; - - length = wcslen(lpSrcStr) + 1; - - *lpDstStr = (LPSTR)HeapAlloc(GetProcessHeap(), 0, length); - if (*lpDstStr) - { - ret = WideCharToMultiByte(CP_ACP, - 0, - lpSrcStr, - -1, - *lpDstStr, - length, - NULL, - NULL); - } - - return ret; -} diff --git a/rostests/winetests/GUI/optionswnd.c b/rostests/winetests/GUI/optionswnd.c deleted file mode 100644 index be5c01b47ee..00000000000 --- a/rostests/winetests/GUI/optionswnd.c +++ /dev/null @@ -1,100 +0,0 @@ -/* - * PROJECT: ReactOS API Test GUI - * LICENSE: GPL - See COPYING in the top level directory - * FILE: - * PURPOSE: options dialog implementation - * COPYRIGHT: Copyright 2008 Ged Murphy - * - */ - -#include - -static BOOL -OnInitBrowseDialog(HWND hDlg, - LPARAM lParam) -{ - PMAIN_WND_INFO pInfo; - - pInfo = (PMAIN_WND_INFO)lParam; - - pInfo->hBrowseDlg = hDlg; - - SetWindowLongPtr(hDlg, - GWLP_USERDATA, - (LONG_PTR)pInfo); - - return TRUE; -} - - -BOOL CALLBACK -OptionsDlgProc(HWND hDlg, - UINT Message, - WPARAM wParam, - LPARAM lParam) -{ - PMAIN_WND_INFO pInfo; - - //UNREFERENCED_PARAM( - - /* Get the window context */ - pInfo = (PMAIN_WND_INFO)GetWindowLongPtr(hDlg, - GWLP_USERDATA); - if (pInfo == NULL && Message != WM_INITDIALOG) - { - goto HandleDefaultMessage; - } - - switch(Message) - { - case WM_INITDIALOG: - return OnInitBrowseDialog(hDlg, lParam); - - case WM_COMMAND: - { - switch (LOWORD(wParam)) - { - case IDOK: - { - if (SendMessageW(GetDlgItem(hDlg, IDC_RUNONSTART), BM_GETCHECK, 0, 0) == BST_CHECKED) - { - pInfo->bRunOnStart = TRUE; - } - else - { - pInfo->bRunOnStart = FALSE; - } - - if (SendMessageW(GetDlgItem(hDlg, IDC_HIDECONSOLE), BM_GETCHECK, 0, 0) == BST_CHECKED) - { - pInfo->bHideConsole = TRUE; - } - else - { - pInfo->bHideConsole = FALSE; - } - - EndDialog(hDlg, - LOWORD(wParam)); - - return TRUE; - } - - case IDCANCEL: - { - EndDialog(hDlg, - LOWORD(wParam)); - - return TRUE; - } - } - - break; - } -HandleDefaultMessage: - default: - return FALSE; - } - - return FALSE; -} diff --git a/rostests/winetests/GUI/precomp.h b/rostests/winetests/GUI/precomp.h deleted file mode 100644 index 5164e5663a4..00000000000 --- a/rostests/winetests/GUI/precomp.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef __WINETESTGUI_PRECOMP_H -#define __WINETESTGUI_PRECOMP_H - -#include -#include -#include -#include -#include "resource.h" - -extern HINSTANCE hInstance; - -#define MAX_NAME 32 -#define MAX_RUN_CMD 256 - -typedef struct _TEST_ITEM -{ - WCHAR szName[MAX_NAME]; - WCHAR szRunCmd[MAX_RUN_CMD]; - -} TEST_ITEM, *PTEST_ITEM; - -typedef struct _MAIN_WND_INFO -{ - HWND hMainWnd; - HWND hBrowseDlg; - HWND hBrowseTV; - HWND hStatus; - HANDLE hPipeThread; - HANDLE hStdOutRd; - HANDLE hStdOutWr; - LPWSTR lpCmdLine; - int nCmdShow; - - HICON hSmIcon; - HICON hBgIcon; - - LPWSTR lpExeList; - INT numExes; - - TEST_ITEM SelectedTest; - - BOOL bRunOnStart; - BOOL bHideConsole; - -} MAIN_WND_INFO, *PMAIN_WND_INFO; - -/* dll exports */ -wchar_t *GetTestName(); -int GetModulesInTest(char **modules); -int RunTest(const char *lpTest); - - -/* mainwnd.c */ -BOOL SendCommandToClient(PMAIN_WND_INFO pInfo, LPWSTR lpCommand); - -/* browsewnd.c */ -BOOL CALLBACK BrowseDlgProc(HWND hDlg, UINT Message, WPARAM wParam, LPARAM lParam); - -/* optionswnd.c */ -BOOL CALLBACK OptionsDlgProc(HWND hDlg, UINT Message, WPARAM wParam, LPARAM lParam); - -/* misc.c */ -HIMAGELIST InitImageList(UINT StartResource, UINT EndResource, UINT Width, UINT Height); -VOID DisplayMessage(LPWSTR lpMsg); -VOID DisplayError(INT err); -DWORD AnsiToUnicode(LPCSTR lpSrcStr, LPWSTR *lpDstStr); -DWORD UnicodeToAnsi(LPCWSTR lpSrcStr, LPSTR *lpDstStr); - -#endif /* __WINETESTGUI_PRECOMP_H */ diff --git a/rostests/winetests/GUI/res/.gitignore b/rostests/winetests/GUI/res/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rostests/winetests/GUI/res/main.ico b/rostests/winetests/GUI/res/main.ico deleted file mode 100644 index 50d143f08fd..00000000000 Binary files a/rostests/winetests/GUI/res/main.ico and /dev/null differ diff --git a/rostests/winetests/GUI/res/tests.ico b/rostests/winetests/GUI/res/tests.ico deleted file mode 100644 index b792d0655c9..00000000000 Binary files a/rostests/winetests/GUI/res/tests.ico and /dev/null differ diff --git a/rostests/winetests/GUI/resource.h b/rostests/winetests/GUI/resource.h deleted file mode 100644 index 5a0994cb045..00000000000 --- a/rostests/winetests/GUI/resource.h +++ /dev/null @@ -1,28 +0,0 @@ -#define IDD_WINETESTGUI 102 -#define IDD_TESTBROWSER 103 -#define IDD_OPTIONS 104 -//#define IDM_ABOUT 104 -#define IDM_EXIT 105 -#define IDI_ICON 107 -#define IDI_TESTS 108 -#define IDC_DELETE 109 -#define IDR_MAINFRAME 128 -#define IDC_LIST 1000 -#define IDC_OUTPUT 1001 -#define IDC_TESTSELECTION 1002 -#define IDC_BROWSE 1003 -#define IDC_RUN 1004 -#define IDC_PROGRESS 1005 -#define IDC_NUMRUNS 1006 -#define IDC_NUMERRORS 1007 -#define IDC_NUMFAILURES 1008 -#define IDC_STOP 1010 -#define IDC_OPTIONS 1011 -#define IDC_SELECT 1013 -#define IDC_TREEVIEW 1014 - -#define IDC_HIDECONSOLE 1020 -#define IDC_RUNONSTART 1021 -#define IDC_STATUS 1012 - -#define IDC_STATIC -1 diff --git a/rostests/winetests/GUI/rsrc.rc b/rostests/winetests/GUI/rsrc.rc deleted file mode 100644 index 25ddc122f56..00000000000 --- a/rostests/winetests/GUI/rsrc.rc +++ /dev/null @@ -1,26 +0,0 @@ -#include -#include "resource.h" - -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL - -//IDI_ICON ICON "res/main.ico" -//IDI_TESTS ICON "res/tests.ico" - -//#include "lang/bg-BG.rc" -//#include "lang/ca-ES.rc" -//#include "lang/cs-CZ.rc" -#include "lang/en-US.rc" -//#include "lang/de-DE.rc" -//#include "lang/es-ES.rc" -//#include "lang/fr-FR.rc" -//#include "lang/id-ID.rc" -//#include "lang/it-IT.rc" -//#include "lang/ko-KO.rc" -//#include "lang/lt-LT.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/ru-RU.rc" -//#include "lang/el-GR.rc" diff --git a/rostests/winetests/advapi32/CMakeLists.txt b/rostests/winetests/advapi32/CMakeLists.txt deleted file mode 100644 index bfaa2f9f4b2..00000000000 --- a/rostests/winetests/advapi32/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - cred.c - crypt.c - crypt_lmhash.c - crypt_md4.c - crypt_md5.c - crypt_sha.c - eventlog.c - lsa.c - registry.c - security.c - service.c - testlist.c) - -add_executable(advapi32_winetest ${SOURCE}) - -target_link_libraries(advapi32_winetest uuid) - -set_module_type(advapi32_winetest win32cui) -add_importlibs(advapi32_winetest advapi32 ole32 msvcrt kernel32 ntdll) -add_cd_file(TARGET advapi32_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/advapi32/advapi32.rbuild b/rostests/winetests/advapi32/advapi32.rbuild deleted file mode 100644 index 09bb15038b2..00000000000 --- a/rostests/winetests/advapi32/advapi32.rbuild +++ /dev/null @@ -1,22 +0,0 @@ - - - - . - - advapi32 - ntdll - uuid - ole32 - cred.c - crypt.c - crypt_lmhash.c - crypt_md4.c - crypt_md5.c - crypt_sha.c - eventlog.c - lsa.c - registry.c - security.c - service.c - testlist.c - diff --git a/rostests/winetests/advapi32/cred.c b/rostests/winetests/advapi32/cred.c deleted file mode 100644 index c2d9027e1de..00000000000 --- a/rostests/winetests/advapi32/cred.c +++ /dev/null @@ -1,395 +0,0 @@ -/* - * Credential Function Tests - * - * Copyright 2007 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 -#include - -#include "windef.h" -#include "winbase.h" -#include "wincred.h" - -#include "wine/test.h" - -static BOOL (WINAPI *pCredDeleteA)(LPCSTR,DWORD,DWORD); -static BOOL (WINAPI *pCredEnumerateA)(LPCSTR,DWORD,DWORD *,PCREDENTIALA **); -static VOID (WINAPI *pCredFree)(PVOID); -static BOOL (WINAPI *pCredGetSessionTypes)(DWORD,LPDWORD); -static BOOL (WINAPI *pCredReadA)(LPCSTR,DWORD,DWORD,PCREDENTIALA *); -static BOOL (WINAPI *pCredRenameA)(LPCSTR,LPCSTR,DWORD,DWORD); -static BOOL (WINAPI *pCredWriteA)(PCREDENTIALA,DWORD); -static BOOL (WINAPI *pCredReadDomainCredentialsA)(PCREDENTIAL_TARGET_INFORMATIONA,DWORD,DWORD*,PCREDENTIALA**); - - -#define TEST_TARGET_NAME "credtest.winehq.org" -#define TEST_TARGET_NAME2 "credtest2.winehq.org" -static const WCHAR TEST_PASSWORD[] = {'p','4','$','$','w','0','r','d','!',0}; - -static void test_CredReadA(void) -{ - BOOL ret; - PCREDENTIALA cred; - - SetLastError(0xdeadbeef); - ret = pCredReadA(TEST_TARGET_NAME, -1, 0, &cred); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "CredReadA should have failed with ERROR_INVALID_PARAMETER instead of %d\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ret = pCredReadA(TEST_TARGET_NAME, CRED_TYPE_GENERIC, 0xdeadbeef, &cred); - ok(!ret && ( GetLastError() == ERROR_INVALID_FLAGS || GetLastError() == ERROR_INVALID_PARAMETER ), - "CredReadA should have failed with ERROR_INVALID_FLAGS or ERROR_INVALID_PARAMETER instead of %d\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ret = pCredReadA(NULL, CRED_TYPE_GENERIC, 0, &cred); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "CredReadA should have failed with ERROR_INVALID_PARAMETER instead of %d\n", - GetLastError()); -} - -static void test_CredWriteA(void) -{ - CREDENTIALA new_cred; - BOOL ret; - - SetLastError(0xdeadbeef); - ret = pCredWriteA(NULL, 0); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "CredWriteA should have failed with ERROR_INVALID_PARAMETER instead of %d\n", - GetLastError()); - - new_cred.Flags = 0; - new_cred.Type = CRED_TYPE_GENERIC; - new_cred.TargetName = NULL; - new_cred.Comment = (char *)"Comment"; - new_cred.CredentialBlobSize = 0; - new_cred.CredentialBlob = NULL; - new_cred.Persist = CRED_PERSIST_ENTERPRISE; - new_cred.AttributeCount = 0; - new_cred.Attributes = NULL; - new_cred.TargetAlias = NULL; - new_cred.UserName = (char *)"winetest"; - - SetLastError(0xdeadbeef); - ret = pCredWriteA(&new_cred, 0); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "CredWriteA should have failed with ERROR_INVALID_PARAMETER instead of %d\n", - GetLastError()); - - new_cred.TargetName = (char *)TEST_TARGET_NAME; - new_cred.Type = CRED_TYPE_DOMAIN_PASSWORD; - - SetLastError(0xdeadbeef); - ret = pCredWriteA(&new_cred, 0); - if (ret) - { - ok(GetLastError() == ERROR_SUCCESS || - GetLastError() == ERROR_IO_PENDING, /* Vista */ - "Expected ERROR_IO_PENDING, got %d\n", GetLastError()); - } - else - { - ok(GetLastError() == ERROR_BAD_USERNAME || - GetLastError() == ERROR_NO_SUCH_LOGON_SESSION, /* Vista */ - "CredWrite with username without domain should return ERROR_BAD_USERNAME" - "or ERROR_NO_SUCH_LOGON_SESSION not %d\n", GetLastError()); - } - - new_cred.UserName = NULL; - SetLastError(0xdeadbeef); - ret = pCredWriteA(&new_cred, 0); - ok(!ret && GetLastError() == ERROR_BAD_USERNAME, - "CredWriteA with NULL username should have failed with ERROR_BAD_USERNAME instead of %d\n", - GetLastError()); -} - -static void test_CredDeleteA(void) -{ - BOOL ret; - - SetLastError(0xdeadbeef); - ret = pCredDeleteA(TEST_TARGET_NAME, -1, 0); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "CredDeleteA should have failed with ERROR_INVALID_PARAMETER instead of %d\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ret = pCredDeleteA(TEST_TARGET_NAME, CRED_TYPE_GENERIC, 0xdeadbeef); - ok(!ret && ( GetLastError() == ERROR_INVALID_FLAGS || GetLastError() == ERROR_INVALID_PARAMETER /* Vista */ ), - "CredDeleteA should have failed with ERROR_INVALID_FLAGS or ERROR_INVALID_PARAMETER instead of %d\n", - GetLastError()); -} - -static void test_CredReadDomainCredentialsA(void) -{ - BOOL ret; - char target_name[] = "no_such_target"; - CREDENTIAL_TARGET_INFORMATIONA info = {target_name, NULL, target_name, NULL, NULL, NULL, NULL, 0, 0, NULL}; - DWORD count; - PCREDENTIAL* creds; - - if (!pCredReadDomainCredentialsA) - { - win_skip("CredReadDomainCredentialsA() is not implemented\n"); - return; - } - - /* these two tests would crash on both native and Wine. Implementations - * does not check for NULL output pointers and try to zero them out early */ -if(0) -{ - ret = pCredReadDomainCredentialsA(&info, 0, NULL, &creds); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "!\n"); - ret = pCredReadDomainCredentialsA(&info, 0, &count, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "!\n"); -} - - SetLastError(0xdeadbeef); - ret = pCredReadDomainCredentialsA(NULL, 0, &count, &creds); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "CredReadDomainCredentialsA should have failed with ERROR_INVALID_PARAMETER instead of %d\n", - GetLastError()); - - SetLastError(0xdeadbeef); - creds = (void*)0x12345; - count = 2; - ret = pCredReadDomainCredentialsA(&info, 0, &count, &creds); - ok(!ret && GetLastError() == ERROR_NOT_FOUND, - "CredReadDomainCredentialsA should have failed with ERROR_NOT_FOUND instead of %d\n", - GetLastError()); - ok(count ==0 && creds == NULL, "CredReadDomainCredentialsA must not return any result\n"); - - info.TargetName = NULL; - - SetLastError(0xdeadbeef); - ret = pCredReadDomainCredentialsA(&info, 0, &count, &creds); - ok(!ret, "CredReadDomainCredentialsA should have failed\n"); - ok(GetLastError() == ERROR_NOT_FOUND || - GetLastError() == ERROR_INVALID_PARAMETER, /* Vista, W2K8 */ - "Expected ERROR_NOT_FOUND or ERROR_INVALID_PARAMETER instead of %d\n", - GetLastError()); - - info.DnsServerName = NULL; - - SetLastError(0xdeadbeef); - ret = pCredReadDomainCredentialsA(&info, 0, &count, &creds); - ok(!ret, "CredReadDomainCredentialsA should have failed\n"); - ok(GetLastError() == ERROR_NOT_FOUND || - GetLastError() == ERROR_INVALID_PARAMETER, /* Vista, W2K8 */ - "Expected ERROR_NOT_FOUND or ERROR_INVALID_PARAMETER instead of %d\n", - GetLastError()); -} - -static void check_blob(int line, DWORD cred_type, PCREDENTIALA cred) -{ - if (cred_type == CRED_TYPE_DOMAIN_PASSWORD) - { - todo_wine - ok_(__FILE__, line)(cred->CredentialBlobSize == 0, "expected CredentialBlobSize of 0 but got %d\n", cred->CredentialBlobSize); - todo_wine - ok_(__FILE__, line)(!cred->CredentialBlob, "expected NULL credentials but got %p\n", cred->CredentialBlob); - } - else - { - DWORD size=sizeof(TEST_PASSWORD); - ok_(__FILE__, line)(cred->CredentialBlobSize == size, "expected CredentialBlobSize of %u but got %u\n", size, cred->CredentialBlobSize); - ok_(__FILE__, line)(cred->CredentialBlob != NULL, "CredentialBlob should be present\n"); - if (cred->CredentialBlob) - ok_(__FILE__, line)(!memcmp(cred->CredentialBlob, TEST_PASSWORD, size), "wrong CredentialBlob\n"); - } -} - -static void test_generic(void) -{ - BOOL ret; - DWORD count, i; - PCREDENTIALA *creds; - CREDENTIALA new_cred; - PCREDENTIALA cred; - BOOL found = FALSE; - - new_cred.Flags = 0; - new_cred.Type = CRED_TYPE_GENERIC; - new_cred.TargetName = (char *)TEST_TARGET_NAME; - new_cred.Comment = (char *)"Comment"; - new_cred.CredentialBlobSize = sizeof(TEST_PASSWORD); - new_cred.CredentialBlob = (LPBYTE)TEST_PASSWORD; - new_cred.Persist = CRED_PERSIST_ENTERPRISE; - new_cred.AttributeCount = 0; - new_cred.Attributes = NULL; - new_cred.TargetAlias = NULL; - new_cred.UserName = (char *)"winetest"; - - ret = pCredWriteA(&new_cred, 0); - ok(ret || broken(GetLastError() == ERROR_NO_SUCH_LOGON_SESSION), - "CredWriteA failed with error %d\n", GetLastError()); - if (!ret) - { - skip("couldn't write generic credentials, skipping tests\n"); - return; - } - - ret = pCredEnumerateA(NULL, 0, &count, &creds); - ok(ret, "CredEnumerateA failed with error %d\n", GetLastError()); - - for (i = 0; i < count; i++) - { - if (!strcmp(creds[i]->TargetName, TEST_TARGET_NAME)) - { - ok(creds[i]->Type == CRED_TYPE_GENERIC || - creds[i]->Type == CRED_TYPE_DOMAIN_PASSWORD, /* Vista */ - "expected creds[%d]->Type CRED_TYPE_GENERIC or CRED_TYPE_DOMAIN_PASSWORD but got %d\n", i, creds[i]->Type); - ok(!creds[i]->Flags, "expected creds[%d]->Flags 0 but got 0x%x\n", i, creds[i]->Flags); - ok(!strcmp(creds[i]->Comment, "Comment"), "expected creds[%d]->Comment \"Comment\" but got \"%s\"\n", i, creds[i]->Comment); - check_blob(__LINE__, creds[i]->Type, creds[i]); - ok(creds[i]->Persist, "expected creds[%d]->Persist CRED_PERSIST_ENTERPRISE but got %d\n", i, creds[i]->Persist); - ok(!strcmp(creds[i]->UserName, "winetest"), "expected creds[%d]->UserName \"winetest\" but got \"%s\"\n", i, creds[i]->UserName); - found = TRUE; - } - } - pCredFree(creds); - ok(found, "credentials not found\n"); - - ret = pCredReadA(TEST_TARGET_NAME, CRED_TYPE_GENERIC, 0, &cred); - ok(ret, "CredReadA failed with error %d\n", GetLastError()); - pCredFree(cred); - - ret = pCredDeleteA(TEST_TARGET_NAME, CRED_TYPE_GENERIC, 0); - ok(ret, "CredDeleteA failed with error %d\n", GetLastError()); -} - -static void test_domain_password(DWORD cred_type) -{ - BOOL ret; - DWORD count, i; - PCREDENTIALA *creds; - CREDENTIALA new_cred; - PCREDENTIALA cred; - BOOL found = FALSE; - - new_cred.Flags = 0; - new_cred.Type = cred_type; - new_cred.TargetName = (char *)TEST_TARGET_NAME; - new_cred.Comment = (char *)"Comment"; - new_cred.CredentialBlobSize = sizeof(TEST_PASSWORD); - new_cred.CredentialBlob = (LPBYTE)TEST_PASSWORD; - new_cred.Persist = CRED_PERSIST_ENTERPRISE; - new_cred.AttributeCount = 0; - new_cred.Attributes = NULL; - new_cred.TargetAlias = NULL; - new_cred.UserName = (char *)"test\\winetest"; - ret = pCredWriteA(&new_cred, 0); - if (!ret && GetLastError() == ERROR_NO_SUCH_LOGON_SESSION) - { - skip("CRED_TYPE_DOMAIN_PASSWORD credentials are not supported " - "or are disabled. Skipping\n"); - return; - } - ok(ret, "CredWriteA failed with error %d\n", GetLastError()); - - ret = pCredEnumerateA(NULL, 0, &count, &creds); - ok(ret, "CredEnumerateA failed with error %d\n", GetLastError()); - - for (i = 0; i < count; i++) - { - if (!strcmp(creds[i]->TargetName, TEST_TARGET_NAME)) - { - ok(creds[i]->Type == cred_type, "expected creds[%d]->Type CRED_TYPE_DOMAIN_PASSWORD but got %d\n", i, creds[i]->Type); - ok(!creds[i]->Flags, "expected creds[%d]->Flags 0 but got 0x%x\n", i, creds[i]->Flags); - ok(!strcmp(creds[i]->Comment, "Comment"), "expected creds[%d]->Comment \"Comment\" but got \"%s\"\n", i, creds[i]->Comment); - check_blob(__LINE__, cred_type, creds[i]); - ok(creds[i]->Persist, "expected creds[%d]->Persist CRED_PERSIST_ENTERPRISE but got %d\n", i, creds[i]->Persist); - ok(!strcmp(creds[i]->UserName, "test\\winetest"), "expected creds[%d]->UserName \"winetest\" but got \"%s\"\n", i, creds[i]->UserName); - found = TRUE; - } - } - pCredFree(creds); - ok(found, "credentials not found\n"); - - ret = pCredReadA(TEST_TARGET_NAME, cred_type, 0, &cred); - ok(ret, "CredReadA failed with error %d\n", GetLastError()); - if (ret) /* don't check the values of cred, if CredReadA failed. */ - { - check_blob(__LINE__, cred_type, cred); - pCredFree(cred); - } - - ret = pCredDeleteA(TEST_TARGET_NAME, cred_type, 0); - ok(ret, "CredDeleteA failed with error %d\n", GetLastError()); -} - -START_TEST(cred) -{ - DWORD persists[CRED_TYPE_MAXIMUM]; - - pCredEnumerateA = (void *)GetProcAddress(GetModuleHandle("advapi32.dll"), "CredEnumerateA"); - pCredFree = (void *)GetProcAddress(GetModuleHandle("advapi32.dll"), "CredFree"); - pCredGetSessionTypes = (void *)GetProcAddress(GetModuleHandle("advapi32.dll"), "CredGetSessionTypes"); - pCredWriteA = (void *)GetProcAddress(GetModuleHandle("advapi32.dll"), "CredWriteA"); - pCredDeleteA = (void *)GetProcAddress(GetModuleHandle("advapi32.dll"), "CredDeleteA"); - pCredReadA = (void *)GetProcAddress(GetModuleHandle("advapi32.dll"), "CredReadA"); - pCredRenameA = (void *)GetProcAddress(GetModuleHandle("advapi32.dll"), "CredRenameA"); - pCredReadDomainCredentialsA = (void *)GetProcAddress(GetModuleHandle("advapi32.dll"), "CredReadDomainCredentialsA"); - - if (!pCredEnumerateA || !pCredFree || !pCredWriteA || !pCredDeleteA || - !pCredReadA) - { - win_skip("credentials functions not present in advapi32.dll\n"); - return; - } - - if (pCredGetSessionTypes) - { - BOOL ret; - DWORD i; - ret = pCredGetSessionTypes(CRED_TYPE_MAXIMUM, persists); - ok(ret, "CredGetSessionTypes failed with error %d\n", GetLastError()); - ok(persists[0] == CRED_PERSIST_NONE, "persists[0] = %u instead of CRED_PERSIST_NONE\n", persists[0]); - for (i=0; i < CRED_TYPE_MAXIMUM; i++) - ok(persists[i] <= CRED_PERSIST_ENTERPRISE, "bad value for persists[%u]: %u\n", i, persists[i]); - } - else - memset(persists, CRED_PERSIST_ENTERPRISE, sizeof(persists)); - - test_CredReadA(); - test_CredWriteA(); - test_CredDeleteA(); - - test_CredReadDomainCredentialsA(); - - trace("generic:\n"); - if (persists[CRED_TYPE_GENERIC] == CRED_PERSIST_NONE) - skip("CRED_TYPE_GENERIC credentials are not supported or are disabled. Skipping\n"); - else - test_generic(); - - trace("domain password:\n"); - if (persists[CRED_TYPE_DOMAIN_PASSWORD] == CRED_PERSIST_NONE) - skip("CRED_TYPE_DOMAIN_PASSWORD credentials are not supported or are disabled. Skipping\n"); - else - test_domain_password(CRED_TYPE_DOMAIN_PASSWORD); - - trace("domain visible password:\n"); - if (persists[CRED_TYPE_DOMAIN_VISIBLE_PASSWORD] == CRED_PERSIST_NONE) - skip("CRED_TYPE_DOMAIN_VISIBLE_PASSWORD credentials are not supported or are disabled. Skipping\n"); - else - test_domain_password(CRED_TYPE_DOMAIN_VISIBLE_PASSWORD); -} diff --git a/rostests/winetests/advapi32/crypt.c b/rostests/winetests/advapi32/crypt.c deleted file mode 100644 index 11802757602..00000000000 --- a/rostests/winetests/advapi32/crypt.c +++ /dev/null @@ -1,1144 +0,0 @@ -/* - * Unit tests for crypt functions - * - * Copyright (c) 2004 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 St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -#include "windef.h" -#include "winbase.h" -#include "wincrypt.h" -#include "winerror.h" -#include "winreg.h" - -#include "wine/test.h" - -static const char szRsaBaseProv[] = MS_DEF_PROV_A; -static const char szNonExistentProv[] = "Wine Nonexistent Cryptographic Provider v11.2"; -static const char szKeySet[] = "wine_test_keyset"; -static const char szBadKeySet[] = "wine_test_bad_keyset"; -#define NON_DEF_PROV_TYPE 999 - -static BOOL (WINAPI *pCryptAcquireContextA)(HCRYPTPROV*,LPCSTR,LPCSTR,DWORD,DWORD); -static BOOL (WINAPI *pCryptEnumProviderTypesA)(DWORD, DWORD*, DWORD, DWORD*, LPSTR, DWORD*); -static BOOL (WINAPI *pCryptEnumProvidersA)(DWORD, DWORD*, DWORD, DWORD*, LPSTR, DWORD*); -static BOOL (WINAPI *pCryptGetDefaultProviderA)(DWORD, DWORD*, DWORD, LPSTR, DWORD*); -static BOOL (WINAPI *pCryptReleaseContext)(HCRYPTPROV, DWORD); -static BOOL (WINAPI *pCryptSetProviderExA)(LPCSTR, DWORD, DWORD*, DWORD); -static BOOL (WINAPI *pCryptCreateHash)(HCRYPTPROV, ALG_ID, HCRYPTKEY, DWORD, HCRYPTHASH*); -static BOOL (WINAPI *pCryptDestroyHash)(HCRYPTHASH); -static BOOL (WINAPI *pCryptGenRandom)(HCRYPTPROV, DWORD, BYTE*); -static BOOL (WINAPI *pCryptContextAddRef)(HCRYPTPROV, DWORD*, DWORD dwFlags); -static BOOL (WINAPI *pCryptGenKey)(HCRYPTPROV, ALG_ID, DWORD, HCRYPTKEY*); -static BOOL (WINAPI *pCryptDestroyKey)(HCRYPTKEY); -static BOOL (WINAPI *pCryptDecrypt)(HCRYPTKEY, HCRYPTHASH, BOOL, DWORD, BYTE*, DWORD*); -static BOOL (WINAPI *pCryptDeriveKey)(HCRYPTPROV, ALG_ID, HCRYPTHASH, DWORD, HCRYPTKEY*); -static BOOL (WINAPI *pCryptDuplicateHash)(HCRYPTHASH, DWORD*, DWORD, HCRYPTHASH*); -static BOOL (WINAPI *pCryptDuplicateKey)(HCRYPTKEY, DWORD*, DWORD, HCRYPTKEY*); -static BOOL (WINAPI *pCryptEncrypt)(HCRYPTKEY, HCRYPTHASH, BOOL, DWORD, BYTE*, DWORD*, DWORD); -static BOOL (WINAPI *pCryptExportKey)(HCRYPTKEY, HCRYPTKEY, DWORD, DWORD, BYTE*, DWORD*); -static BOOL (WINAPI *pCryptGetHashParam)(HCRYPTHASH, DWORD, BYTE*, DWORD*, DWORD); -static BOOL (WINAPI *pCryptGetKeyParam)(HCRYPTKEY, DWORD, BYTE*, DWORD*, DWORD); -static BOOL (WINAPI *pCryptGetProvParam)(HCRYPTPROV, DWORD, BYTE*, DWORD*, DWORD); -static BOOL (WINAPI *pCryptGetUserKey)(HCRYPTPROV, DWORD, HCRYPTKEY*); -static BOOL (WINAPI *pCryptHashData)(HCRYPTHASH, BYTE*, DWORD, DWORD); -static BOOL (WINAPI *pCryptHashSessionKey)(HCRYPTHASH, HCRYPTKEY, DWORD); -static BOOL (WINAPI *pCryptImportKey)(HCRYPTPROV, BYTE*, DWORD, HCRYPTKEY, DWORD, HCRYPTKEY*); -static BOOL (WINAPI *pCryptSignHashW)(HCRYPTHASH, DWORD, LPCWSTR, DWORD, BYTE*, DWORD*); -static BOOL (WINAPI *pCryptSetHashParam)(HCRYPTKEY, DWORD, BYTE*, DWORD); -static BOOL (WINAPI *pCryptSetKeyParam)(HCRYPTKEY, DWORD, BYTE*, DWORD); -static BOOL (WINAPI *pCryptSetProvParam)(HCRYPTPROV, DWORD, BYTE*, DWORD); -static BOOL (WINAPI *pCryptVerifySignatureW)(HCRYPTHASH, BYTE*, DWORD, HCRYPTKEY, LPCWSTR, DWORD); -static BOOLEAN (WINAPI *pSystemFunction036)(PVOID, ULONG); - -static void init_function_pointers(void) -{ - HMODULE hadvapi32 = GetModuleHandleA("advapi32.dll"); - - pCryptAcquireContextA = (void*)GetProcAddress(hadvapi32, "CryptAcquireContextA"); - pCryptEnumProviderTypesA = (void*)GetProcAddress(hadvapi32, "CryptEnumProviderTypesA"); - pCryptEnumProvidersA = (void*)GetProcAddress(hadvapi32, "CryptEnumProvidersA"); - pCryptGetDefaultProviderA = (void*)GetProcAddress(hadvapi32, "CryptGetDefaultProviderA"); - pCryptReleaseContext = (void*)GetProcAddress(hadvapi32, "CryptReleaseContext"); - pCryptSetProviderExA = (void*)GetProcAddress(hadvapi32, "CryptSetProviderExA"); - pCryptCreateHash = (void*)GetProcAddress(hadvapi32, "CryptCreateHash"); - pCryptDestroyHash = (void*)GetProcAddress(hadvapi32, "CryptDestroyHash"); - pCryptGenRandom = (void*)GetProcAddress(hadvapi32, "CryptGenRandom"); - pCryptContextAddRef = (void*)GetProcAddress(hadvapi32, "CryptContextAddRef"); - pCryptGenKey = (void*)GetProcAddress(hadvapi32, "CryptGenKey"); - pCryptDestroyKey = (void*)GetProcAddress(hadvapi32, "CryptDestroyKey"); - pCryptDecrypt = (void*)GetProcAddress(hadvapi32, "CryptDecrypt"); - pCryptDeriveKey = (void*)GetProcAddress(hadvapi32, "CryptDeriveKey"); - pCryptDuplicateHash = (void*)GetProcAddress(hadvapi32, "CryptDuplicateHash"); - pCryptDuplicateKey = (void*)GetProcAddress(hadvapi32, "CryptDuplicateKey"); - pCryptEncrypt = (void*)GetProcAddress(hadvapi32, "CryptEncrypt"); - pCryptExportKey = (void*)GetProcAddress(hadvapi32, "CryptExportKey"); - pCryptGetHashParam = (void*)GetProcAddress(hadvapi32, "CryptGetHashParam"); - pCryptGetKeyParam = (void*)GetProcAddress(hadvapi32, "CryptGetKeyParam"); - pCryptGetProvParam = (void*)GetProcAddress(hadvapi32, "CryptGetProvParam"); - pCryptGetUserKey = (void*)GetProcAddress(hadvapi32, "CryptGetUserKey"); - pCryptHashData = (void*)GetProcAddress(hadvapi32, "CryptHashData"); - pCryptHashSessionKey = (void*)GetProcAddress(hadvapi32, "CryptHashSessionKey"); - pCryptImportKey = (void*)GetProcAddress(hadvapi32, "CryptImportKey"); - pCryptSignHashW = (void*)GetProcAddress(hadvapi32, "CryptSignHashW"); - pCryptSetHashParam = (void*)GetProcAddress(hadvapi32, "CryptSetHashParam"); - pCryptSetKeyParam = (void*)GetProcAddress(hadvapi32, "CryptSetKeyParam"); - pCryptSetProvParam = (void*)GetProcAddress(hadvapi32, "CryptSetProvParam"); - pCryptVerifySignatureW = (void*)GetProcAddress(hadvapi32, "CryptVerifySignatureW"); - pSystemFunction036 = (void*)GetProcAddress(hadvapi32, "SystemFunction036"); -} - -static void init_environment(void) -{ - HCRYPTPROV hProv; - - /* Ensure that container "wine_test_keyset" does exist */ - if (!pCryptAcquireContextA(&hProv, szKeySet, szRsaBaseProv, PROV_RSA_FULL, 0)) - { - pCryptAcquireContextA(&hProv, szKeySet, szRsaBaseProv, PROV_RSA_FULL, CRYPT_NEWKEYSET); - } - pCryptReleaseContext(hProv, 0); - - /* Ensure that container "wine_test_keyset" does exist in default PROV_RSA_FULL type provider */ - if (!pCryptAcquireContextA(&hProv, szKeySet, NULL, PROV_RSA_FULL, 0)) - { - pCryptAcquireContextA(&hProv, szKeySet, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET); - } - pCryptReleaseContext(hProv, 0); - - /* Ensure that container "wine_test_bad_keyset" does not exist. */ - if (pCryptAcquireContextA(&hProv, szBadKeySet, szRsaBaseProv, PROV_RSA_FULL, 0)) - { - pCryptReleaseContext(hProv, 0); - pCryptAcquireContextA(&hProv, szBadKeySet, szRsaBaseProv, PROV_RSA_FULL, CRYPT_DELETEKEYSET); - } -} - -static void clean_up_environment(void) -{ - HCRYPTPROV hProv; - - /* Remove container "wine_test_keyset" */ - if (pCryptAcquireContextA(&hProv, szKeySet, szRsaBaseProv, PROV_RSA_FULL, 0)) - { - pCryptReleaseContext(hProv, 0); - pCryptAcquireContextA(&hProv, szKeySet, szRsaBaseProv, PROV_RSA_FULL, CRYPT_DELETEKEYSET); - } - - /* Remove container "wine_test_keyset" from default PROV_RSA_FULL type provider */ - if (pCryptAcquireContextA(&hProv, szKeySet, NULL, PROV_RSA_FULL, 0)) - { - pCryptReleaseContext(hProv, 0); - pCryptAcquireContextA(&hProv, szKeySet, NULL, PROV_RSA_FULL, CRYPT_DELETEKEYSET); - } -} - -static void test_acquire_context(void) -{ - BOOL result; - HCRYPTPROV hProv; - DWORD GLE; - - /* Provoke all kinds of error conditions (which are easy to provoke). - * The order of the error tests seems to match Windows XP's rsaenh.dll CSP, - * but since this is likely to change between CSP versions, we don't check - * this. Please don't change the order of tests. */ - result = pCryptAcquireContextA(&hProv, NULL, NULL, 0, 0); - ok(!result && GetLastError()==NTE_BAD_PROV_TYPE, "%d\n", GetLastError()); - - result = pCryptAcquireContextA(&hProv, NULL, NULL, 1000, 0); - ok(!result && GetLastError()==NTE_BAD_PROV_TYPE, "%d\n", GetLastError()); - - result = pCryptAcquireContextA(&hProv, NULL, NULL, NON_DEF_PROV_TYPE, 0); - ok(!result && GetLastError()==NTE_PROV_TYPE_NOT_DEF, "%d\n", GetLastError()); - - result = pCryptAcquireContextA(&hProv, szKeySet, szNonExistentProv, PROV_RSA_FULL, 0); - ok(!result && GetLastError()==NTE_KEYSET_NOT_DEF, "%d\n", GetLastError()); - - result = pCryptAcquireContextA(&hProv, szKeySet, szRsaBaseProv, NON_DEF_PROV_TYPE, 0); - ok(!result && GetLastError()==NTE_PROV_TYPE_NO_MATCH, "%d\n", GetLastError()); - - /* This test fails under Win2k SP4: - result = TRUE, GetLastError() == ERROR_INVALID_PARAMETER - SetLastError(0xdeadbeef); - result = pCryptAcquireContextA(NULL, szKeySet, szRsaBaseProv, PROV_RSA_FULL, 0); - ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "%d/%d\n", result, GetLastError()); - */ - - /* Last not least, try to really acquire a context. */ - hProv = 0; - SetLastError(0xdeadbeef); - result = pCryptAcquireContextA(&hProv, szKeySet, szRsaBaseProv, PROV_RSA_FULL, 0); - GLE = GetLastError(); - ok(result && (GLE == ERROR_ENVVAR_NOT_FOUND || - GLE == ERROR_SUCCESS || - GLE == ERROR_RING2_STACK_IN_USE || - GLE == NTE_FAIL || - GLE == ERROR_NOT_LOGGED_ON), "%d/%d\n", result, GLE); - - if (hProv) - pCryptReleaseContext(hProv, 0); - - /* Try again, witch an empty ("\0") szProvider parameter */ - hProv = 0; - SetLastError(0xdeadbeef); - result = pCryptAcquireContextA(&hProv, szKeySet, "", PROV_RSA_FULL, 0); - GLE = GetLastError(); - ok(result && (GLE == ERROR_ENVVAR_NOT_FOUND || - GLE == ERROR_SUCCESS || - GLE == ERROR_RING2_STACK_IN_USE || - GLE == NTE_FAIL || - GLE == ERROR_NOT_LOGGED_ON), "%d/%d\n", result, GetLastError()); - - if (hProv) - pCryptReleaseContext(hProv, 0); -} - -static void test_incorrect_api_usage(void) -{ - BOOL result; - HCRYPTPROV hProv, hProv2; - HCRYPTHASH hHash, hHash2; - HCRYPTKEY hKey, hKey2; - BYTE temp; - DWORD dwLen, dwTemp; - - /* This is to document incorrect api usage in the - * "Uru - Ages beyond Myst Demo" installer as reported by Paul Vriens. - * - * The installer destroys a hash object after having released the context - * with which the hash was created. This is not allowed according to MSDN, - * since CryptReleaseContext destroys all hash and key objects belonging to - * the respective context. However, while wine used to crash, Windows is more - * robust here and returns an ERROR_INVALID_PARAMETER code. - */ - - result = pCryptAcquireContextA(&hProv, szBadKeySet, szRsaBaseProv, - PROV_RSA_FULL, CRYPT_NEWKEYSET); - ok (result, "%08x\n", GetLastError()); - if (!result) return; - - result = pCryptCreateHash(hProv, CALG_SHA, 0, 0, &hHash); - ok (result, "%d\n", GetLastError()); - if (!result) return; - pCryptDestroyHash(hHash); - - result = pCryptGenKey(0, CALG_RC4, 0, &hKey); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); - - result = pCryptGenKey(hProv, CALG_RC4, 0, &hKey); - ok (result, "%d\n", GetLastError()); - if (!result) return; - - result = pCryptGenKey(hProv, CALG_RC4, 0, &hKey2); - ok (result, "%d\n", GetLastError()); - if (!result) return; - - result = pCryptDestroyKey(hKey2); - ok (result, "%d\n", GetLastError()); - - dwTemp = CRYPT_MODE_ECB; - result = pCryptSetKeyParam(hKey2, KP_MODE, (BYTE*)&dwTemp, sizeof(DWORD)); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); - - result = pCryptAcquireContextA(&hProv2, szBadKeySet, NULL, PROV_RSA_FULL, - CRYPT_DELETEKEYSET); - ok (result, "%d\n", GetLastError()); - if (!result) return; - - result = pCryptReleaseContext(hProv, 0); - ok (result, "%d\n", GetLastError()); - if (!result) return; - - result = pCryptReleaseContext(hProv, 0); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); - - result = pCryptGenRandom(hProv, 1, &temp); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); - -#ifdef CRASHES_ON_NT40 - result = pCryptContextAddRef(hProv, NULL, 0); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); -#endif - - result = pCryptCreateHash(hProv, CALG_SHA, 0, 0, &hHash2); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); - - dwLen = 1; - result = pCryptDecrypt(hKey, 0, TRUE, 0, &temp, &dwLen); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); - - dwLen = 1; - result = pCryptEncrypt(hKey, 0, TRUE, 0, &temp, &dwLen, 1); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); - - result = pCryptDeriveKey(hProv, CALG_RC4, hHash, 0, &hKey2); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); - -#ifdef CRASHES_ON_NT40 - result = pCryptDuplicateHash(hHash, NULL, 0, &hHash2); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); - - result = pCryptDuplicateKey(hKey, NULL, 0, &hKey2); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); -#endif - - dwLen = 1; - result = pCryptExportKey(hKey, 0, 0, 0, &temp, &dwLen); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); - - result = pCryptGenKey(hProv, CALG_RC4, 0, &hKey2); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); - - dwLen = 1; - result = pCryptGetHashParam(hHash, 0, &temp, &dwLen, 0); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); - - dwLen = 1; - result = pCryptGetKeyParam(hKey, 0, &temp, &dwLen, 0); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); - - dwLen = 1; - result = pCryptGetProvParam(hProv, 0, &temp, &dwLen, 0); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); - - result = pCryptGetUserKey(hProv, 0, &hKey2); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); - - result = pCryptHashData(hHash, &temp, 1, 0); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); - - result = pCryptHashSessionKey(hHash, hKey, 0); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); - - result = pCryptImportKey(hProv, &temp, 1, 0, 0, &hKey2); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); - - if (pCryptSignHashW) - { - dwLen = 1; - result = pCryptSignHashW(hHash, 0, NULL, 0, &temp, &dwLen); - ok (!result && (GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_CALL_NOT_IMPLEMENTED), "%d\n", GetLastError()); - } - else - win_skip("CryptSignHashW is not available\n"); - - result = pCryptSetKeyParam(hKey, 0, &temp, 1); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); - - result = pCryptSetHashParam(hHash, 0, &temp, 1); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); - - result = pCryptSetProvParam(hProv, 0, &temp, 1); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); - - if (pCryptVerifySignatureW) - { - result = pCryptVerifySignatureW(hHash, &temp, 1, hKey, NULL, 0); - ok (!result && (GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_CALL_NOT_IMPLEMENTED), "%d\n", GetLastError()); - } - else - win_skip("CryptVerifySignatureW is not available\n"); - - result = pCryptDestroyHash(hHash); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); - - result = pCryptDestroyKey(hKey); - ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); -} - -static const BYTE privKey[] = { - 0x07, 0x02, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x52, 0x53, 0x41, 0x32, 0x00, - 0x02, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x79, 0x10, 0x1c, 0xd0, 0x6b, 0x10, - 0x18, 0x30, 0x94, 0x61, 0xdc, 0x0e, 0xcb, 0x96, 0x4e, 0x21, 0x3f, 0x79, 0xcd, - 0xa9, 0x17, 0x62, 0xbc, 0xbb, 0x61, 0x4c, 0xe0, 0x75, 0x38, 0x6c, 0xf3, 0xde, - 0x60, 0x86, 0x03, 0x97, 0x65, 0xeb, 0x1e, 0x6b, 0xdb, 0x53, 0x85, 0xad, 0x68, - 0x21, 0xf1, 0x5d, 0xe7, 0x1f, 0xe6, 0x53, 0xb4, 0xbb, 0x59, 0x3e, 0x14, 0x27, - 0xb1, 0x83, 0xa7, 0x3a, 0x54, 0xe2, 0x8f, 0x65, 0x8e, 0x6a, 0x4a, 0xcf, 0x3b, - 0x1f, 0x65, 0xff, 0xfe, 0xf1, 0x31, 0x3a, 0x37, 0x7a, 0x8b, 0xcb, 0xc6, 0xd4, - 0x98, 0x50, 0x36, 0x67, 0xe4, 0xa1, 0xe8, 0x7e, 0x8a, 0xc5, 0x23, 0xf2, 0x77, - 0xf5, 0x37, 0x61, 0x49, 0x72, 0x59, 0xe8, 0x3d, 0xf7, 0x60, 0xb2, 0x77, 0xca, - 0x78, 0x54, 0x6d, 0x65, 0x9e, 0x03, 0x97, 0x1b, 0x61, 0xbd, 0x0c, 0xd8, 0x06, - 0x63, 0xe2, 0xc5, 0x48, 0xef, 0xb3, 0xe2, 0x6e, 0x98, 0x7d, 0xbd, 0x4e, 0x72, - 0x91, 0xdb, 0x31, 0x57, 0xe3, 0x65, 0x3a, 0x49, 0xca, 0xec, 0xd2, 0x02, 0x4e, - 0x22, 0x7e, 0x72, 0x8e, 0xf9, 0x79, 0x84, 0x82, 0xdf, 0x7b, 0x92, 0x2d, 0xaf, - 0xc9, 0xe4, 0x33, 0xef, 0x89, 0x5c, 0x66, 0x99, 0xd8, 0x80, 0x81, 0x47, 0x2b, - 0xb1, 0x66, 0x02, 0x84, 0x59, 0x7b, 0xc3, 0xbe, 0x98, 0x45, 0x4a, 0x3d, 0xdd, - 0xea, 0x2b, 0xdf, 0x4e, 0xb4, 0x24, 0x6b, 0xec, 0xe7, 0xd9, 0x0c, 0x45, 0xb8, - 0xbe, 0xca, 0x69, 0x37, 0x92, 0x4c, 0x38, 0x6b, 0x96, 0x6d, 0xcd, 0x86, 0x67, - 0x5c, 0xea, 0x54, 0x94, 0xa4, 0xca, 0xa4, 0x02, 0xa5, 0x21, 0x4d, 0xae, 0x40, - 0x8f, 0x9d, 0x51, 0x83, 0xf2, 0x3f, 0x33, 0xc1, 0x72, 0xb4, 0x1d, 0x94, 0x6e, - 0x7d, 0xe4, 0x27, 0x3f, 0xea, 0xff, 0xe5, 0x9b, 0xa7, 0x5e, 0x55, 0x8e, 0x0d, - 0x69, 0x1c, 0x7a, 0xff, 0x81, 0x9d, 0x53, 0x52, 0x97, 0x9a, 0x76, 0x79, 0xda, - 0x93, 0x32, 0x16, 0xec, 0x69, 0x51, 0x1a, 0x4e, 0xc3, 0xf1, 0x72, 0x80, 0x78, - 0x5e, 0x66, 0x4a, 0x8d, 0x85, 0x2f, 0x3f, 0xb2, 0xa7 }; - -static void test_verify_sig(void) -{ - BOOL ret; - HCRYPTPROV prov; - HCRYPTKEY key; - HCRYPTHASH hash; - BYTE bogus[] = { 0 }; - - if (!pCryptVerifySignatureW) - { - win_skip("CryptVerifySignatureW is not available\n"); - return; - } - - SetLastError(0xdeadbeef); - ret = pCryptVerifySignatureW(0, NULL, 0, 0, NULL, 0); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("CryptVerifySignatureW is not implemented\n"); - return; - } - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); - ret = pCryptAcquireContextA(&prov, szKeySet, NULL, PROV_RSA_FULL, - CRYPT_NEWKEYSET); - if (!ret && GetLastError() == NTE_EXISTS) - ret = pCryptAcquireContextA(&prov, szKeySet, NULL, PROV_RSA_FULL, 0); - ok(ret, "CryptAcquireContextA failed: %08x\n", GetLastError()); - ret = pCryptImportKey(prov, (LPBYTE)privKey, sizeof(privKey), 0, 0, &key); - ok(ret, "CryptImportKey failed: %08x\n", GetLastError()); - ret = pCryptCreateHash(prov, CALG_MD5, 0, 0, &hash); - ok(ret, "CryptCreateHash failed: %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pCryptVerifySignatureW(hash, NULL, 0, 0, NULL, 0); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pCryptVerifySignatureW(0, NULL, 0, key, NULL, 0); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pCryptVerifySignatureW(hash, NULL, 0, key, NULL, 0); - ok(!ret && (GetLastError() == NTE_BAD_SIGNATURE || - GetLastError() == ERROR_INVALID_PARAMETER), - "Expected NTE_BAD_SIGNATURE or ERROR_INVALID_PARAMETER, got %08x\n", - GetLastError()); - SetLastError(0xdeadbeef); - ret = pCryptVerifySignatureW(hash, NULL, sizeof(bogus), key, NULL, 0); - ok(!ret && (GetLastError() == NTE_BAD_SIGNATURE || - GetLastError() == ERROR_INVALID_PARAMETER), - "Expected NTE_BAD_SIGNATURE or ERROR_INVALID_PARAMETER, got %08x\n", - GetLastError()); - SetLastError(0xdeadbeef); - ret = pCryptVerifySignatureW(hash, bogus, 0, key, NULL, 0); - ok(!ret && GetLastError() == NTE_BAD_SIGNATURE, - "Expected NTE_BAD_SIGNATURE, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pCryptVerifySignatureW(hash, bogus, sizeof(bogus), key, NULL, 0); - ok(!ret && GetLastError() == NTE_BAD_SIGNATURE, - "Expected NTE_BAD_SIGNATURE, got %08x\n", GetLastError()); - pCryptDestroyKey(key); - pCryptDestroyHash(hash); - pCryptReleaseContext(prov, 0); -} - -static BOOL FindProvRegVals(DWORD dwIndex, DWORD *pdwProvType, LPSTR *pszProvName, - DWORD *pcbProvName, DWORD *pdwProvCount) -{ - HKEY hKey; - HKEY subkey; - DWORD size = sizeof(DWORD); - - if (RegOpenKey(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Cryptography\\Defaults\\Provider", &hKey)) - return FALSE; - - RegQueryInfoKey(hKey, NULL, NULL, NULL, pdwProvCount, pcbProvName, - NULL, NULL, NULL, NULL, NULL, NULL); - (*pcbProvName)++; - - if (!(*pszProvName = LocalAlloc(LMEM_ZEROINIT, *pcbProvName))) - return FALSE; - - RegEnumKeyEx(hKey, dwIndex, *pszProvName, pcbProvName, NULL, NULL, NULL, NULL); - (*pcbProvName)++; - - RegOpenKey(hKey, *pszProvName, &subkey); - RegQueryValueEx(subkey, "Type", NULL, NULL, (LPBYTE)pdwProvType, &size); - - RegCloseKey(subkey); - RegCloseKey(hKey); - - return TRUE; -} - -static void test_enum_providers(void) -{ - /* expected results */ - CHAR *pszProvName = NULL; - DWORD cbName; - DWORD dwType; - DWORD provCount; - DWORD dwIndex = 0; - - /* actual results */ - CHAR *provider = NULL; - DWORD providerLen; - DWORD type; - DWORD count; - DWORD result; - DWORD notNull = 5; - DWORD notZeroFlags = 5; - - if(!pCryptEnumProvidersA) - { - win_skip("CryptEnumProvidersA is not available\n"); - return; - } - - if (!FindProvRegVals(dwIndex, &dwType, &pszProvName, &cbName, &provCount)) - { - win_skip("Could not find providers in registry\n"); - return; - } - - /* check pdwReserved flag for NULL */ - result = pCryptEnumProvidersA(dwIndex, ¬Null, 0, &type, NULL, &providerLen); - ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "%d\n", GetLastError()); - - /* check dwFlags == 0 */ - result = pCryptEnumProvidersA(dwIndex, NULL, notZeroFlags, &type, NULL, &providerLen); - ok(!result && GetLastError()==NTE_BAD_FLAGS, "%d\n", GetLastError()); - - /* alloc provider to half the size required - * cbName holds the size required */ - providerLen = cbName / 2; - if (!(provider = LocalAlloc(LMEM_ZEROINIT, providerLen))) - return; - - result = pCryptEnumProvidersA(dwIndex, NULL, 0, &type, provider, &providerLen); - ok(!result && GetLastError()==ERROR_MORE_DATA, "expected %i, got %d\n", - ERROR_MORE_DATA, GetLastError()); - - LocalFree(provider); - - /* loop through the providers to get the number of providers - * after loop ends, count should be provCount + 1 so subtract 1 - * to get actual number of providers */ - count = 0; - while(pCryptEnumProvidersA(count++, NULL, 0, &type, NULL, &providerLen)) - ; - count--; - ok(count==provCount, "expected %i, got %i\n", (int)provCount, (int)count); - - /* loop past the actual number of providers to get the error - * ERROR_NO_MORE_ITEMS */ - for (count = 0; count < provCount + 1; count++) - result = pCryptEnumProvidersA(count, NULL, 0, &type, NULL, &providerLen); - ok(!result && GetLastError()==ERROR_NO_MORE_ITEMS, "expected %i, got %d\n", - ERROR_NO_MORE_ITEMS, GetLastError()); - - /* check expected versus actual values returned */ - result = pCryptEnumProvidersA(dwIndex, NULL, 0, &type, NULL, &providerLen); - ok(result && providerLen==cbName, "expected %i, got %i\n", (int)cbName, (int)providerLen); - if (!(provider = LocalAlloc(LMEM_ZEROINIT, providerLen))) - return; - - providerLen = 0xdeadbeef; - result = pCryptEnumProvidersA(dwIndex, NULL, 0, &type, provider, &providerLen); - ok(result, "expected TRUE, got %d\n", result); - ok(type==dwType, "expected %d, got %d\n", dwType, type); - if (pszProvName) - ok(!strcmp(pszProvName, provider), "expected %s, got %s\n", pszProvName, provider); - ok(cbName==providerLen, "expected %d, got %d\n", cbName, providerLen); - - LocalFree(pszProvName); - LocalFree(provider); -} - -static BOOL FindProvTypesRegVals(DWORD *pdwIndex, DWORD *pdwProvType, LPSTR *pszTypeName, - DWORD *pcbTypeName, DWORD *pdwTypeCount) -{ - HKEY hKey; - HKEY hSubKey; - PSTR ch; - LPSTR szName; - DWORD cbName; - BOOL ret = FALSE; - - if (RegOpenKey(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Cryptography\\Defaults\\Provider Types", &hKey)) - return FALSE; - - if (RegQueryInfoKey(hKey, NULL, NULL, NULL, pdwTypeCount, &cbName, NULL, - NULL, NULL, NULL, NULL, NULL)) - goto cleanup; - cbName++; - - if (!(szName = LocalAlloc(LMEM_ZEROINIT, cbName))) - goto cleanup; - - while (!RegEnumKeyEx(hKey, *pdwIndex, szName, &cbName, NULL, NULL, NULL, NULL)) - { - cbName++; - ch = szName + strlen(szName); - /* Convert "Type 000" to 0, etc/ */ - *pdwProvType = *(--ch) - '0'; - *pdwProvType += (*(--ch) - '0') * 10; - *pdwProvType += (*(--ch) - '0') * 100; - - if (RegOpenKey(hKey, szName, &hSubKey)) - break; - - if (!RegQueryValueEx(hSubKey, "TypeName", NULL, NULL, NULL, pcbTypeName)) - { - if (!(*pszTypeName = LocalAlloc(LMEM_ZEROINIT, *pcbTypeName))) - break; - - if (!RegQueryValueEx(hSubKey, "TypeName", NULL, NULL, (LPBYTE)*pszTypeName, pcbTypeName)) - { - ret = TRUE; - break; - } - - LocalFree(*pszTypeName); - } - - RegCloseKey(hSubKey); - - (*pdwIndex)++; - } - - if (!ret) - LocalFree(*pszTypeName); - RegCloseKey(hSubKey); - LocalFree(szName); - -cleanup: - RegCloseKey(hKey); - - return ret; -} - -static void test_enum_provider_types(void) -{ - /* expected values */ - DWORD dwProvType = 0; - LPSTR pszTypeName = NULL; - DWORD cbTypeName; - DWORD dwTypeCount; - - /* actual values */ - DWORD index = 0; - DWORD provType; - LPSTR typeName = NULL; - DWORD typeNameSize; - DWORD typeCount; - DWORD result; - DWORD notNull = 5; - DWORD notZeroFlags = 5; - - if(!pCryptEnumProviderTypesA) - { - win_skip("CryptEnumProviderTypesA is not available\n"); - return; - } - - if (!FindProvTypesRegVals(&index, &dwProvType, &pszTypeName, &cbTypeName, &dwTypeCount)) - { - skip("Could not find provider types in registry\n"); - return; - } - - /* check pdwReserved for NULL */ - result = pCryptEnumProviderTypesA(index, ¬Null, 0, &provType, typeName, &typeNameSize); - ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", - GetLastError()); - - /* check dwFlags == zero */ - result = pCryptEnumProviderTypesA(index, NULL, notZeroFlags, &provType, typeName, &typeNameSize); - ok(!result && GetLastError()==NTE_BAD_FLAGS, "expected ERROR_INVALID_PARAMETER, got %d\n", - GetLastError()); - - /* This test fails under Win2k SP4: - * result = TRUE, GetLastError() == 0xdeadbeef */ - if (0) - { - /* alloc provider type to half the size required - * cbTypeName holds the size required */ - typeNameSize = cbTypeName / 2; - if (!(typeName = LocalAlloc(LMEM_ZEROINIT, typeNameSize))) - goto cleanup; - - SetLastError(0xdeadbeef); - result = pCryptEnumProviderTypesA(index, NULL, 0, &provType, typeName, &typeNameSize); - ok(!result && GetLastError()==ERROR_MORE_DATA, "expected 0/ERROR_MORE_DATA, got %d/%d\n", - result, GetLastError()); - - LocalFree(typeName); - } - - /* loop through the provider types to get the number of provider types - * after loop ends, count should be dwTypeCount + 1 so subtract 1 - * to get actual number of provider types */ - typeCount = 0; - while(pCryptEnumProviderTypesA(typeCount++, NULL, 0, &provType, NULL, &typeNameSize)) - ; - typeCount--; - ok(typeCount==dwTypeCount, "expected %d, got %d\n", dwTypeCount, typeCount); - - /* loop past the actual number of provider types to get the error - * ERROR_NO_MORE_ITEMS */ - for (typeCount = 0; typeCount < dwTypeCount + 1; typeCount++) - result = pCryptEnumProviderTypesA(typeCount, NULL, 0, &provType, NULL, &typeNameSize); - ok(!result && GetLastError()==ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %d\n", - GetLastError()); - - /* check expected versus actual values returned */ - result = pCryptEnumProviderTypesA(index, NULL, 0, &provType, NULL, &typeNameSize); - ok(result && typeNameSize==cbTypeName, "expected %d, got %d\n", cbTypeName, typeNameSize); - if (!(typeName = LocalAlloc(LMEM_ZEROINIT, typeNameSize))) - goto cleanup; - - typeNameSize = 0xdeadbeef; - result = pCryptEnumProviderTypesA(index, NULL, 0, &provType, typeName, &typeNameSize); - ok(result, "expected TRUE, got %d\n", result); - ok(provType==dwProvType, "expected %d, got %d\n", dwProvType, provType); - if (pszTypeName) - ok(!strcmp(pszTypeName, typeName), "expected %s, got %s\n", pszTypeName, typeName); - ok(typeNameSize==cbTypeName, "expected %d, got %d\n", cbTypeName, typeNameSize); - - LocalFree(typeName); -cleanup: - LocalFree(pszTypeName); -} - -static BOOL FindDfltProvRegVals(DWORD dwProvType, DWORD dwFlags, LPSTR *pszProvName, DWORD *pcbProvName) -{ - HKEY hKey; - PSTR keyname; - PSTR ptr; - DWORD user = dwFlags & CRYPT_USER_DEFAULT; - - LPCSTR machinestr = "Software\\Microsoft\\Cryptography\\Defaults\\Provider Types\\Type XXX"; - LPCSTR userstr = "Software\\Microsoft\\Cryptography\\Provider Type XXX"; - - keyname = LocalAlloc(LMEM_ZEROINIT, (user ? strlen(userstr) : strlen(machinestr)) + 1); - if (keyname) - { - user ? strcpy(keyname, userstr) : strcpy(keyname, machinestr); - ptr = keyname + strlen(keyname); - *(--ptr) = (dwProvType % 10) + '0'; - *(--ptr) = ((dwProvType / 10) % 10) + '0'; - *(--ptr) = (dwProvType / 100) + '0'; - } else - return FALSE; - - if (RegOpenKey((dwFlags & CRYPT_USER_DEFAULT) ? HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE ,keyname, &hKey)) - { - LocalFree(keyname); - return FALSE; - } - LocalFree(keyname); - - if (RegQueryValueEx(hKey, "Name", NULL, NULL, (LPBYTE)*pszProvName, pcbProvName)) - { - if (GetLastError() != ERROR_MORE_DATA) - SetLastError(NTE_PROV_TYPE_ENTRY_BAD); - return FALSE; - } - - if (!(*pszProvName = LocalAlloc(LMEM_ZEROINIT, *pcbProvName))) - return FALSE; - - if (RegQueryValueEx(hKey, "Name", NULL, NULL, (LPBYTE)*pszProvName, pcbProvName)) - { - if (GetLastError() != ERROR_MORE_DATA) - SetLastError(NTE_PROV_TYPE_ENTRY_BAD); - return FALSE; - } - - RegCloseKey(hKey); - - return TRUE; -} - -static void test_get_default_provider(void) -{ - /* expected results */ - DWORD dwProvType = PROV_RSA_FULL; - DWORD dwFlags = CRYPT_MACHINE_DEFAULT; - LPSTR pszProvName = NULL; - DWORD cbProvName; - - /* actual results */ - DWORD provType = PROV_RSA_FULL; - DWORD flags = CRYPT_MACHINE_DEFAULT; - LPSTR provName = NULL; - DWORD provNameSize; - DWORD result; - DWORD notNull = 5; - - if(!pCryptGetDefaultProviderA) - { - win_skip("CryptGetDefaultProviderA is not available\n"); - return; - } - - if(!FindDfltProvRegVals(dwProvType, dwFlags, &pszProvName, &cbProvName)) - { - skip("Could not find default provider in registry\n"); - return; - } - - /* check pdwReserved for NULL */ - result = pCryptGetDefaultProviderA(provType, ¬Null, flags, provName, &provNameSize); - ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "expected %i, got %d\n", - ERROR_INVALID_PARAMETER, GetLastError()); - - /* check for invalid flag */ - flags = 0xdeadbeef; - result = pCryptGetDefaultProviderA(provType, NULL, flags, provName, &provNameSize); - ok(!result && GetLastError()==NTE_BAD_FLAGS, "expected %d, got %d\n", - NTE_BAD_FLAGS, GetLastError()); - flags = CRYPT_MACHINE_DEFAULT; - - /* check for invalid prov type */ - provType = 0xdeadbeef; - result = pCryptGetDefaultProviderA(provType, NULL, flags, provName, &provNameSize); - ok(!result && (GetLastError() == NTE_BAD_PROV_TYPE || - GetLastError() == ERROR_INVALID_PARAMETER), - "expected NTE_BAD_PROV_TYPE or ERROR_INVALID_PARAMETER, got %d/%d\n", - result, GetLastError()); - provType = PROV_RSA_FULL; - - SetLastError(0); - - /* alloc provName to half the size required - * cbProvName holds the size required */ - provNameSize = cbProvName / 2; - if (!(provName = LocalAlloc(LMEM_ZEROINIT, provNameSize))) - return; - - result = pCryptGetDefaultProviderA(provType, NULL, flags, provName, &provNameSize); - ok(!result && GetLastError()==ERROR_MORE_DATA, "expected %i, got %d\n", - ERROR_MORE_DATA, GetLastError()); - - LocalFree(provName); - - /* check expected versus actual values returned */ - result = pCryptGetDefaultProviderA(provType, NULL, flags, NULL, &provNameSize); - ok(result && provNameSize==cbProvName, "expected %d, got %d\n", cbProvName, provNameSize); - provNameSize = cbProvName; - - if (!(provName = LocalAlloc(LMEM_ZEROINIT, provNameSize))) - return; - - provNameSize = 0xdeadbeef; - result = pCryptGetDefaultProviderA(provType, NULL, flags, provName, &provNameSize); - ok(result, "expected TRUE, got %d\n", result); - if(pszProvName) - ok(!strcmp(pszProvName, provName), "expected %s, got %s\n", pszProvName, provName); - ok(provNameSize==cbProvName, "expected %d, got %d\n", cbProvName, provNameSize); - - LocalFree(pszProvName); - LocalFree(provName); -} - -static void test_set_provider_ex(void) -{ - DWORD result; - DWORD notNull = 5; - LPSTR curProvName = NULL; - DWORD curlen; - - /* results */ - LPSTR pszProvName = NULL; - DWORD cbProvName; - - if(!pCryptGetDefaultProviderA || !pCryptSetProviderExA) - { - win_skip("CryptGetDefaultProviderA and/or CryptSetProviderExA are not available\n"); - return; - } - - /* store the current one */ - pCryptGetDefaultProviderA(PROV_RSA_FULL, NULL, CRYPT_MACHINE_DEFAULT, NULL, &curlen); - if (!(curProvName = LocalAlloc(LMEM_ZEROINIT, curlen))) - return; - result = pCryptGetDefaultProviderA(PROV_RSA_FULL, NULL, CRYPT_MACHINE_DEFAULT, curProvName, &curlen); - ok(result, "%d\n", GetLastError()); - - /* check pdwReserved for NULL */ - result = pCryptSetProviderExA(MS_DEF_PROV, PROV_RSA_FULL, ¬Null, CRYPT_MACHINE_DEFAULT); - ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "expected %i, got %d\n", - ERROR_INVALID_PARAMETER, GetLastError()); - - /* remove the default provider and then set it to MS_DEF_PROV/PROV_RSA_FULL */ - SetLastError(0xdeadbeef); - result = pCryptSetProviderExA(MS_DEF_PROV, PROV_RSA_FULL, NULL, CRYPT_MACHINE_DEFAULT | CRYPT_DELETE_DEFAULT); - if (!result) - { - ok( GetLastError() == ERROR_ACCESS_DENIED || broken(GetLastError() == ERROR_INVALID_PARAMETER), - "wrong error %u\n", GetLastError() ); - skip("Not enough rights to remove the default provider\n"); - LocalFree(curProvName); - return; - } - - result = pCryptSetProviderExA(MS_DEF_PROV, PROV_RSA_FULL, NULL, CRYPT_MACHINE_DEFAULT); - ok(result, "%d\n", GetLastError()); - - /* call CryptGetDefaultProvider to see if they match */ - result = pCryptGetDefaultProviderA(PROV_RSA_FULL, NULL, CRYPT_MACHINE_DEFAULT, NULL, &cbProvName); - ok(result, "%d\n", GetLastError()); - if (!(pszProvName = LocalAlloc(LMEM_ZEROINIT, cbProvName))) - goto reset; - - result = pCryptGetDefaultProviderA(PROV_RSA_FULL, NULL, CRYPT_MACHINE_DEFAULT, pszProvName, &cbProvName); - ok(result && !strcmp(MS_DEF_PROV, pszProvName), "expected %s, got %s\n", MS_DEF_PROV, pszProvName); - ok(result && cbProvName==(strlen(MS_DEF_PROV) + 1), "expected %i, got %d\n", (lstrlenA(MS_DEF_PROV) + 1), cbProvName); - - LocalFree(pszProvName); - -reset: - /* Set the provider back to it's original */ - result = pCryptSetProviderExA(curProvName, PROV_RSA_FULL, NULL, CRYPT_MACHINE_DEFAULT); - ok(result, "%d\n", GetLastError()); - LocalFree(curProvName); -} - -static void test_machine_guid(void) -{ - char originalGuid[40]; - LONG r; - HKEY key; - DWORD size; - HCRYPTPROV hCryptProv; - BOOL restoreGuid = FALSE, ret; - - r = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Cryptography", - 0, KEY_ALL_ACCESS, &key); - if (r != ERROR_SUCCESS) - { - skip("couldn't open HKLM\\Software\\Microsoft\\Cryptography\n"); - return; - } - /* Cache existing MachineGuid, and delete it */ - size = sizeof(originalGuid); - r = RegQueryValueExA(key, "MachineGuid", NULL, NULL, (BYTE *)originalGuid, - &size); - if (r == ERROR_SUCCESS) - { - restoreGuid = TRUE; - r = RegDeleteValueA(key, "MachineGuid"); - ok(!r, "RegDeleteValueA failed: %d\n", r); - } - else - ok(r == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %d\n", - r); - /* Create and release a provider */ - ret = pCryptAcquireContextA(&hCryptProv, szKeySet, NULL, PROV_RSA_FULL, 0); - ok(ret || broken(!ret && GetLastError() == NTE_KEYSET_ENTRY_BAD /* NT4 */), - "CryptAcquireContextA failed: %08x\n", GetLastError()); - pCryptReleaseContext(hCryptProv, 0); - - if (restoreGuid) - RegSetValueExA(key, "MachineGuid", 0, REG_SZ, (const BYTE *)originalGuid, - strlen(originalGuid)+1); - RegCloseKey(key); -} - -#define key_length 16 - -static const unsigned char key[key_length] = - { 0xbf, 0xf6, 0x83, 0x4b, 0x3e, 0xa3, 0x23, 0xdd, - 0x96, 0x78, 0x70, 0x8e, 0xa1, 0x9d, 0x3b, 0x40 }; - -static void test_rc2_keylen(void) -{ - struct KeyBlob - { - BLOBHEADER header; - DWORD key_size; - BYTE key_data[2048]; - } key_blob; - - HCRYPTPROV provider; - HCRYPTKEY hkey = 0; - BOOL ret; - - SetLastError(0xdeadbeef); - ret = pCryptAcquireContextA(&provider, NULL, NULL, - PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); - ok(ret, "CryptAcquireContext error %u\n", GetLastError()); - if (ret) - { - key_blob.header.bType = PLAINTEXTKEYBLOB; - key_blob.header.bVersion = CUR_BLOB_VERSION; - key_blob.header.reserved = 0; - key_blob.header.aiKeyAlg = CALG_RC2; - key_blob.key_size = sizeof(key); - memcpy(key_blob.key_data, key, key_length); - - /* Importing a 16-byte key works with the default provider. */ - SetLastError(0xdeadbeef); - ret = pCryptImportKey(provider, (BYTE*)&key_blob, - sizeof(BLOBHEADER)+sizeof(DWORD)+key_blob.key_size, - 0, CRYPT_IPSEC_HMAC_KEY, &hkey); - /* CRYPT_IPSEC_HMAC_KEY is not supported on W2K and lower */ - ok(ret || - broken(!ret && GetLastError() == NTE_BAD_FLAGS), - "CryptImportKey error %08x\n", GetLastError()); - - if (ret) - pCryptDestroyKey(hkey); - pCryptReleaseContext(provider, 0); - } - - SetLastError(0xdeadbeef); - ret = pCryptAcquireContextA(&provider, NULL, MS_DEF_PROV, - PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); - ok(ret, "CryptAcquireContext error %08x\n", GetLastError()); - - if (ret) - { - /* Importing a 16-byte key doesn't work with the base provider.. */ - SetLastError(0xdeadbeef); - ret = pCryptImportKey(provider, (BYTE*)&key_blob, - sizeof(BLOBHEADER)+sizeof(DWORD)+key_blob.key_size, - 0, 0, &hkey); - ok(!ret && (GetLastError() == NTE_BAD_DATA || - GetLastError() == NTE_BAD_LEN || /* Win7 */ - GetLastError() == NTE_BAD_TYPE || /* W2K */ - GetLastError() == NTE_PERM), /* Win9x, WinMe and NT4 */ - "unexpected error %08x\n", GetLastError()); - /* but importing an 56-bit (7-byte) key does.. */ - key_blob.key_size = 7; - SetLastError(0xdeadbeef); - ret = pCryptImportKey(provider, (BYTE*)&key_blob, - sizeof(BLOBHEADER)+sizeof(DWORD)+key_blob.key_size, - 0, 0, &hkey); - ok(ret || - broken(!ret && GetLastError() == NTE_BAD_TYPE) || /* W2K */ - broken(!ret && GetLastError() == NTE_PERM), /* Win9x, WinMe and NT4 */ - "CryptAcquireContext error %08x\n", GetLastError()); - if (ret) - pCryptDestroyKey(hkey); - /* as does importing a 16-byte key with the base provider when - * CRYPT_IPSEC_HMAC_KEY is specified. - */ - key_blob.key_size = sizeof(key); - SetLastError(0xdeadbeef); - ret = pCryptImportKey(provider, (BYTE*)&key_blob, - sizeof(BLOBHEADER)+sizeof(DWORD)+key_blob.key_size, - 0, CRYPT_IPSEC_HMAC_KEY, &hkey); - /* CRYPT_IPSEC_HMAC_KEY is not supported on W2K and lower */ - ok(ret || - broken(!ret && GetLastError() == NTE_BAD_FLAGS), - "CryptImportKey error %08x\n", GetLastError()); - if (ret) - pCryptDestroyKey(hkey); - - pCryptReleaseContext(provider, 0); - } - - key_blob.key_size = sizeof(key); - SetLastError(0xdeadbeef); - ret = pCryptAcquireContextA(&provider, NULL, NULL, - PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); - ok(ret, "CryptAcquireContext error %08x\n", GetLastError()); - - if (ret) - { - /* Importing a 16-byte key also works with the default provider when - * CRYPT_IPSEC_HMAC_KEY is specified. - */ - SetLastError(0xdeadbeef); - ret = pCryptImportKey(provider, (BYTE*)&key_blob, - sizeof(BLOBHEADER)+sizeof(DWORD)+key_blob.key_size, - 0, CRYPT_IPSEC_HMAC_KEY, &hkey); - ok(ret || - broken(!ret && GetLastError() == NTE_BAD_FLAGS), - "CryptImportKey error %08x\n", GetLastError()); - if (ret) - pCryptDestroyKey(hkey); - - /* There is no apparent limit to the size of the input key when - * CRYPT_IPSEC_HMAC_KEY is specified. - */ - key_blob.key_size = sizeof(key_blob.key_data); - SetLastError(0xdeadbeef); - ret = pCryptImportKey(provider, (BYTE*)&key_blob, - sizeof(BLOBHEADER)+sizeof(DWORD)+key_blob.key_size, - 0, CRYPT_IPSEC_HMAC_KEY, &hkey); - ok(ret || - broken(!ret && GetLastError() == NTE_BAD_FLAGS), - "CryptImportKey error %08x\n", GetLastError()); - if (ret) - pCryptDestroyKey(hkey); - - pCryptReleaseContext(provider, 0); - } -} - -static void test_SystemFunction036(void) -{ - BOOL ret; - int test; - - if (!pSystemFunction036) - { - win_skip("SystemFunction036 is not available\n"); - return; - } - - ret = pSystemFunction036(NULL, 0); - ok(ret == TRUE, "Expected SystemFunction036 to return TRUE, got %d\n", ret); - - /* Test crashes on Windows. */ - if (0) - { - SetLastError(0xdeadbeef); - ret = pSystemFunction036(NULL, 5); - trace("ret = %d, GetLastError() = %d\n", ret, GetLastError()); - } - - ret = pSystemFunction036(&test, 0); - ok(ret == TRUE, "Expected SystemFunction036 to return TRUE, got %d\n", ret); - - ret = pSystemFunction036(&test, sizeof(int)); - ok(ret == TRUE, "Expected SystemFunction036 to return TRUE, got %d\n", ret); -} - -START_TEST(crypt) -{ - init_function_pointers(); - if (pCryptAcquireContextA && pCryptReleaseContext) - { - test_rc2_keylen(); - init_environment(); - test_acquire_context(); - test_incorrect_api_usage(); - test_verify_sig(); - test_machine_guid(); - clean_up_environment(); - } - - test_enum_providers(); - test_enum_provider_types(); - test_get_default_provider(); - test_set_provider_ex(); - test_SystemFunction036(); -} diff --git a/rostests/winetests/advapi32/crypt_lmhash.c b/rostests/winetests/advapi32/crypt_lmhash.c deleted file mode 100644 index a6e812e54a9..00000000000 --- a/rostests/winetests/advapi32/crypt_lmhash.c +++ /dev/null @@ -1,635 +0,0 @@ -/* - * Unit tests for SystemFunctionXXX (LMHash?) - * - * Copyright 2004 Hans Leidekker - * Copyright 2006 Mike McCormack - * - * 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 "ntstatus.h" -#define WIN32_NO_STATUS -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winternl.h" - -struct ustring { - DWORD Length; - DWORD MaximumLength; - unsigned char *Buffer; -}; - -typedef int (WINAPI *descrypt)(unsigned char *, unsigned char *, unsigned char *); -static NTSTATUS (WINAPI *pSystemFunction001)(const BYTE *, const BYTE *, LPBYTE); -static NTSTATUS (WINAPI *pSystemFunction002)(const BYTE *, const BYTE *, LPBYTE); -static NTSTATUS (WINAPI *pSystemFunction003)(const BYTE *, LPBYTE); -static NTSTATUS (WINAPI *pSystemFunction004)(const struct ustring *, const struct ustring *, struct ustring *); -static NTSTATUS (WINAPI *pSystemFunction005)(const struct ustring *, const struct ustring *, struct ustring *); -static VOID (WINAPI *pSystemFunction006)( PCSTR passwd, PSTR lmhash ); -static NTSTATUS (WINAPI *pSystemFunction008)(const BYTE *, const BYTE *, LPBYTE); -static NTSTATUS (WINAPI *pSystemFunction009)(const BYTE *, const BYTE *, LPBYTE); -static NTSTATUS (WINAPI *pSystemFunction032)(struct ustring *, const struct ustring *); - -/* encrypt two blocks */ -static descrypt pSystemFunction012; -static descrypt pSystemFunction014; -static descrypt pSystemFunction016; -static descrypt pSystemFunction018; -static descrypt pSystemFunction020; -static descrypt pSystemFunction022; - -/* decrypt two blocks */ -static descrypt pSystemFunction013; -static descrypt pSystemFunction015; -static descrypt pSystemFunction017; -static descrypt pSystemFunction019; -static descrypt pSystemFunction021; -static descrypt pSystemFunction023; - -/* encrypt two blocks with a 32bit key */ -static descrypt pSystemFunction024; -static descrypt pSystemFunction025; - -/* decrypt two blocks with a 32bit key */ -static descrypt pSystemFunction026; -static descrypt pSystemFunction027; - -typedef int (WINAPI *memcmpfunc)(unsigned char *, unsigned char *); -static memcmpfunc pSystemFunction030; -static memcmpfunc pSystemFunction031; - -static void test_SystemFunction006(void) -{ - char lmhash[16 + 1]; - - char passwd[] = { 's','e','c','r','e','t', 0, 0, 0, 0, 0, 0, 0, 0 }; - unsigned char expect[] = - { 0x85, 0xf5, 0x28, 0x9f, 0x09, 0xdc, 0xa7, 0xeb, - 0xaa, 0xd3, 0xb4, 0x35, 0xb5, 0x14, 0x04, 0xee }; - - pSystemFunction006( passwd, lmhash ); - - ok( !memcmp( lmhash, expect, sizeof(expect) ), - "lmhash: %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n", - lmhash[0], lmhash[1], lmhash[2], lmhash[3], lmhash[4], lmhash[5], - lmhash[6], lmhash[7], lmhash[8], lmhash[9], lmhash[10], lmhash[11], - lmhash[12], lmhash[13], lmhash[14], lmhash[15] ); -} - -static void test_SystemFunction008(void) -{ - /* example data from http://davenport.sourceforge.net/ntlm.html */ - unsigned char hash[0x40] = { - 0xff, 0x37, 0x50, 0xbc, 0xc2, 0xb2, 0x24, 0x12, - 0xc2, 0x26, 0x5b, 0x23, 0x73, 0x4e, 0x0d, 0xac }; - unsigned char challenge[0x40] = { - 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }; - unsigned char expected[0x18] = { - 0xc3, 0x37, 0xcd, 0x5c, 0xbd, 0x44, 0xfc, 0x97, - 0x82, 0xa6, 0x67, 0xaf, 0x6d, 0x42, 0x7c, 0x6d, - 0xe6, 0x7c, 0x20, 0xc2, 0xd3, 0xe7, 0x7c, 0x56 }; - unsigned char output[0x18]; - NTSTATUS r; - - r = pSystemFunction008(0,0,0); - ok( r == STATUS_UNSUCCESSFUL, "wrong error code\n"); - - r = pSystemFunction008(challenge,0,0); - ok( r == STATUS_UNSUCCESSFUL, "wrong error code\n"); - - r = pSystemFunction008(challenge, hash, 0); - ok( r == STATUS_UNSUCCESSFUL, "wrong error code\n"); - - /* crashes */ - if (0) - { - r = pSystemFunction008(challenge, 0, output); - ok( r == STATUS_UNSUCCESSFUL, "wrong error code\n"); - } - - r = pSystemFunction008(0, 0, output); - ok( r == STATUS_UNSUCCESSFUL, "wrong error code\n"); - - memset(output, 0, sizeof output); - r = pSystemFunction008(challenge, hash, output); - ok( r == STATUS_SUCCESS, "wrong error code\n"); - - ok( !memcmp(output, expected, sizeof expected), "response wrong\n"); -} - -static void test_SystemFunction001(void) -{ - unsigned char key[8] = { 0xff, 0x37, 0x50, 0xbc, 0xc2, 0xb2, 0x24, 0 }; - unsigned char data[8] = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }; - unsigned char expected[8] = { 0xc3, 0x37, 0xcd, 0x5c, 0xbd, 0x44, 0xfc, 0x97 }; - unsigned char output[16]; - NTSTATUS r; - - r = pSystemFunction001(0,0,0); - ok( r == STATUS_UNSUCCESSFUL, "wrong error code\n"); - - memset(output, 0, sizeof output); - - r = pSystemFunction001(data,key,output); - ok( r == STATUS_SUCCESS, "wrong error code\n"); - - ok(!memcmp(output, expected, sizeof expected), "response wrong\n"); -} - -static void test_SystemFunction002(void) -{ - /* reverse of SystemFunction001 */ - unsigned char key[8] = { 0xff, 0x37, 0x50, 0xbc, 0xc2, 0xb2, 0x24, 0 }; - unsigned char expected[8] = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }; - unsigned char data[8] = { 0xc3, 0x37, 0xcd, 0x5c, 0xbd, 0x44, 0xfc, 0x97 }; - unsigned char output[8]; - int r; - - memset(output, 0, sizeof output); - r = pSystemFunction002(data, key, output); - ok(r == STATUS_SUCCESS, "function failed\n"); - ok(!memcmp(output, expected, sizeof expected), "response wrong\n"); -} - -static void test_SystemFunction032(void) -{ - struct ustring key, data; - unsigned char szKey[] = { 'f','o','o',0 }; - unsigned char szData[8] = { 'b','a','r',0 }; - unsigned char expected[] = {0x28, 0xb9, 0xf8, 0xe1}; - int r; - - /* crashes: pSystemFunction032(NULL,NULL); */ - - key.Buffer = szKey; - key.Length = sizeof szKey; - key.MaximumLength = key.Length; - - data.Buffer = szData; - data.Length = 4; - data.MaximumLength = 8; - - r = pSystemFunction032(&data, &key); - ok(r == STATUS_SUCCESS, "function failed\n"); - - ok(!memcmp(expected, data.Buffer, data.Length), "wrong result\n"); -} - -static void test_SystemFunction003(void) -{ - unsigned char output[8], data[8]; - unsigned char key[7] = { 0xff, 0x37, 0x50, 0xbc, 0xc2, 0xb2, 0x24 }; - unsigned char exp1[8] = { 0x9d, 0x21, 0xc8, 0x86, 0x6c, 0x21, 0xcf, 0x43 }; - char exp2[] = "KGS!@#$%"; - int r; - - r = pSystemFunction003(NULL, NULL); - ok(r == STATUS_UNSUCCESSFUL, "function failed\n"); - - r = pSystemFunction003(key, NULL); - ok(r == STATUS_UNSUCCESSFUL, "function failed\n"); - - memset(data, 0, sizeof data); - r = pSystemFunction003(key, data); - ok(r == STATUS_SUCCESS, "function failed\n"); - ok( !memcmp(exp1, data, sizeof data), "decrypted message wrong\n"); - - memset(output, 0, sizeof output); - r = pSystemFunction002(data, key, output); - ok(r == STATUS_SUCCESS, "function failed\n"); - - ok( !memcmp(exp2, output, sizeof output), "decrypted message wrong\n"); -} - -static void test_SystemFunction004(void) -{ - unsigned char inbuf[0x100], keybuf[0x100], resbuf[0x100]; - unsigned char output[8]; - int r; - struct ustring in, key, out; - - /* crash - r = pSystemFunction004(NULL, NULL, NULL); - ok(r == STATUS_UNSUCCESSFUL, "function failed\n"); - */ - - memset(inbuf, 0, sizeof inbuf); - memset(keybuf, 0, sizeof keybuf); - memset(resbuf, 0, sizeof resbuf); - - in.Buffer = NULL; - in.Length = in.MaximumLength = 0; - - key.Buffer = NULL; - key.Length = key.MaximumLength = 0; - - out.Buffer = NULL; - out.Length = out.MaximumLength = 0; - - r = pSystemFunction004(&in, &key, &out); - ok(r == STATUS_INVALID_PARAMETER_2, "function failed\n"); - - key.Buffer = keybuf; - key.Length = 0x100; - key.MaximumLength = 0x100; - - r = pSystemFunction004(&in, &key, &out); - ok(r == STATUS_BUFFER_TOO_SMALL, "function failed\n"); - - in.Buffer = inbuf; - in.Length = 0x0c; - in.MaximumLength = 0; - - /* add two identical blocks... */ - inbuf[0] = 1; - inbuf[1] = 2; - inbuf[2] = 3; - inbuf[3] = 4; - - inbuf[8] = 1; - inbuf[9] = 2; - inbuf[10] = 3; - inbuf[11] = 4; - - /* check that the Length field is really obeyed */ - keybuf[6] = 1; - - key.Buffer = keybuf; - key.Length = 6; - key.MaximumLength = 0; - - keybuf[1] = 0x33; - - out.Buffer = resbuf; - out.Length = 0; - out.MaximumLength = 0x40; - r = pSystemFunction004(&in, &key, &out); - ok(r == STATUS_SUCCESS, "function failed\n"); - - keybuf[6] = 0; - - memset(output, 0, sizeof output); - r = pSystemFunction002(out.Buffer, key.Buffer, output); - ok(r == STATUS_SUCCESS, "function failed\n"); - - ok(((unsigned int*)output)[0] == in.Length, "crypted length wrong\n"); - ok(((unsigned int*)output)[1] == 1, "crypted value wrong\n"); - - memset(output, 0, sizeof output); - r = pSystemFunction002(out.Buffer+8, key.Buffer, output); - ok(r == STATUS_SUCCESS, "function failed\n"); - ok(!memcmp(output, inbuf, sizeof output), "crypted data wrong\n"); - - memset(output, 0, sizeof output); - r = pSystemFunction002(out.Buffer+16, key.Buffer, output); - ok(r == STATUS_SUCCESS, "function failed\n"); - ok(!memcmp(output, inbuf, sizeof output), "crypted data wrong\n"); -} - -static void test_SystemFunction005(void) -{ - char output[0x40], result[0x40]; - int r; - struct ustring in, key, out, res; - static char datastr[] = "twinkle twinkle little star"; - static char keystr[] = "byolnim"; - - in.Buffer = (unsigned char *)datastr; - in.Length = strlen(datastr); - in.MaximumLength = 0; - - key.Buffer = (unsigned char *)keystr; - key.Length = strlen(keystr); - key.MaximumLength = 0; - - out.Buffer = (unsigned char *)output; - out.Length = out.MaximumLength = sizeof output; - - r = pSystemFunction004(&in, &key, &out); - ok(r == STATUS_SUCCESS, "function failed\n"); - - memset(result, 0, sizeof result); - res.Buffer = (unsigned char *)result; - res.Length = 0; - res.MaximumLength = sizeof result; - - r = pSystemFunction005(&out, &key, &res); - ok(r == STATUS_SUCCESS, "function failed\n"); - - r = pSystemFunction005(&out, &key, &res); - ok(r == STATUS_SUCCESS, "function failed\n"); - - ok(res.Length == in.Length, "Length wrong\n"); - ok(!memcmp(res.Buffer, in.Buffer, in.Length), "data wrong\n"); - - out.Length = 0; - out.MaximumLength = 0; - r = pSystemFunction005(&out, &key, &res); - ok(r == STATUS_SUCCESS || - r == STATUS_INVALID_PARAMETER_1, /* Vista */ - "Expected STATUS_SUCCESS or STATUS_INVALID_PARAMETER_1, got %08x\n", r); - - ok(res.Length == in.Length, "Length wrong\n"); - ok(!memcmp(res.Buffer, in.Buffer, in.Length), "data wrong\n"); - - res.MaximumLength = 0; - r = pSystemFunction005(&out, &key, &res); - ok(r == STATUS_BUFFER_TOO_SMALL || - r == STATUS_INVALID_PARAMETER_1, /* Vista */ - "Expected STATUS_BUFFER_TOO_SMALL or STATUS_INVALID_PARAMETER_1, got %08x\n", r); - - key.Length = 1; - r = pSystemFunction005(&out, &key, &res); - ok(r == STATUS_UNKNOWN_REVISION || - r == STATUS_INVALID_PARAMETER_1, /* Vista */ - "Expected STATUS_UNKNOWN_REVISION or STATUS_INVALID_PARAMETER_1, got %08x\n", r); - - key.Length = 0; - r = pSystemFunction005(&out, &key, &res); - ok(r == STATUS_INVALID_PARAMETER_2, "function failed\n"); -} - -static void test_SystemFunction009(void) -{ - unsigned char hash[0x10] = { - 0xff, 0x37, 0x50, 0xbc, 0xc2, 0xb2, 0x24, 0x12, - 0xc2, 0x26, 0x5b, 0x23, 0x73, 0x4e, 0x0d, 0xac }; - unsigned char challenge[8] = { - 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }; - unsigned char expected[0x18] = { - 0xc3, 0x37, 0xcd, 0x5c, 0xbd, 0x44, 0xfc, 0x97, - 0x82, 0xa6, 0x67, 0xaf, 0x6d, 0x42, 0x7c, 0x6d, - 0xe6, 0x7c, 0x20, 0xc2, 0xd3, 0xe7, 0x7c, 0x56 }; - unsigned char output[0x18]; - int r; - - memset(output, 0, sizeof output); - r = pSystemFunction009(challenge, hash, output); - ok( r == STATUS_SUCCESS, "wrong error code\n"); - ok(!memcmp(output, expected, sizeof expected), "response wrong\n"); -} - -static unsigned char des_key[] = { - 0xff, 0x37, 0x50, 0xbc, 0xc2, 0xb2, 0x24, - 0xff, 0x37, 0x50, 0xbc, 0xc2, 0xb2, 0x24, -}; -static unsigned char des_plaintext[] = { - 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0 -}; -static unsigned char des_ciphertext[] = { - 0xc3, 0x37, 0xcd, 0x5c, 0xbd, 0x44, 0xfc, 0x97, - 0xc3, 0x37, 0xcd, 0x5c, 0xbd, 0x44, 0xfc, 0x97, 0 -}; - -/* test functions that encrypt two DES blocks */ -static void test_SystemFunction_encrypt(descrypt func, int num) -{ - unsigned char output[0x11]; - int r; - - if (!func) - { - win_skip("SystemFunction%03d is not available\n", num); - return; - } - - r = func(NULL, NULL, NULL); - ok( r == STATUS_UNSUCCESSFUL, "wrong error code\n"); - - memset(output, 0, sizeof output); - r = func(des_plaintext, des_key, output); - ok( r == STATUS_SUCCESS, "wrong error code\n"); - ok( !memcmp(des_ciphertext, output, sizeof des_ciphertext), "ciphertext wrong (%d)\n", num); -} - -/* test functions that decrypt two DES blocks */ -static void test_SystemFunction_decrypt(descrypt func, int num) -{ - unsigned char output[0x11]; - int r; - - if (!func) - { - win_skip("SystemFunction%03d is not available\n", num); - return; - } - - r = func(NULL, NULL, NULL); - ok( r == STATUS_UNSUCCESSFUL, "wrong error code\n"); - - memset(output, 0, sizeof output); - - r = func(des_ciphertext, des_key, output); - ok( r == STATUS_SUCCESS, "wrong error code\n"); - ok( !memcmp(des_plaintext, output, sizeof des_plaintext), "plaintext wrong (%d)\n", num); -} - -static unsigned char des_ciphertext32[] = { - 0x69, 0x51, 0x35, 0x69, 0x0d, 0x29, 0x24, 0xad, - 0x23, 0x6d, 0xfd, 0x43, 0x0d, 0xd3, 0x25, 0x81, 0 -}; - -static void test_SystemFunction_enc32(descrypt func, int num) -{ - unsigned char key[4], output[0x11]; - int r; - - if (!func) - { - win_skip("SystemFunction%03d is not available\n", num); - return; - } - - memset(output, 0, sizeof output); - - /* two keys are generated using 4 bytes, repeated 4 times ... */ - memcpy(key, "foo", 4); - - r = func(des_plaintext, key, output); - ok( r == STATUS_SUCCESS, "wrong error code (%d)\n", num); - - ok( !memcmp( output, des_ciphertext32, sizeof des_ciphertext32), "ciphertext wrong (%d)\n", num); -} - -static void test_SystemFunction_dec32(descrypt func, int num) -{ - unsigned char key[4], output[0x11]; - int r; - - if (!func) - { - win_skip("SystemFunction%03d is not available\n", num); - return; - } - - memset(output, 0, sizeof output); - - /* two keys are generated using 4 bytes, repeated 4 times ... */ - memcpy(key, "foo", 4); - - r = func(des_ciphertext32, key, output); - ok( r == STATUS_SUCCESS, "wrong error code (%d)\n", num); - - ok( !memcmp( output, des_plaintext, sizeof des_plaintext), "plaintext wrong (%d)\n", num); -} - -static void test_memcmpfunc(memcmpfunc fn) -{ - unsigned char arg1[0x20], arg2[0x20]; - int r; - - if (!fn) - { - win_skip("function is not available\n"); - return; - } - - memset(arg1, 0, sizeof arg1); - memset(arg2, 0, sizeof arg2); - arg1[0x10] = 1; - - r = fn(arg1, arg2); - ok( r == 1, "wrong error code\n"); - - memset(arg1, 1, sizeof arg1); - memset(arg2, 1, sizeof arg2); - arg1[0x10] = 0; - - r = fn(arg1, arg2); - ok( r == 1, "wrong error code\n"); - - memset(arg1, 0, sizeof arg1); - memset(arg2, 1, sizeof arg2); - - r = fn(arg1, arg2); - ok( r == 0, "wrong error code\n"); - - memset(arg1, 1, sizeof arg1); - memset(arg2, 0, sizeof arg2); - - r = fn(arg1, arg2); - ok( r == 0, "wrong error code\n"); -} - -START_TEST(crypt_lmhash) -{ - HMODULE module = GetModuleHandleA("advapi32.dll"); - - pSystemFunction001 = (void *)GetProcAddress( module, "SystemFunction001" ); - if (pSystemFunction001) - test_SystemFunction001(); - else - win_skip("SystemFunction001 is not available\n"); - - pSystemFunction002 = (void *)GetProcAddress( module, "SystemFunction002" ); - if (pSystemFunction002) - test_SystemFunction002(); - else - win_skip("SystemFunction002 is not available\n"); - - pSystemFunction003 = (void *)GetProcAddress( module, "SystemFunction003" ); - if (pSystemFunction003) - test_SystemFunction003(); - else - win_skip("SystemFunction002 is not available\n"); - - pSystemFunction004 = (void *)GetProcAddress( module, "SystemFunction004" ); - if (pSystemFunction004) - test_SystemFunction004(); - else - win_skip("SystemFunction004 is not available\n"); - - pSystemFunction005 = (void *)GetProcAddress( module, "SystemFunction005" ); - if (pSystemFunction005) - test_SystemFunction005(); - else - win_skip("SystemFunction005 is not available\n"); - - pSystemFunction006 = (void *)GetProcAddress( module, "SystemFunction006" ); - if (pSystemFunction006) - test_SystemFunction006(); - else - win_skip("SystemFunction006 is not available\n"); - - pSystemFunction008 = (void *)GetProcAddress( module, "SystemFunction008" ); - if (pSystemFunction008) - test_SystemFunction008(); - else - win_skip("SystemFunction008 is not available\n"); - - pSystemFunction009 = (void *)GetProcAddress( module, "SystemFunction009" ); - if (pSystemFunction009) - test_SystemFunction009(); - else - win_skip("SystemFunction009 is not available\n"); - - pSystemFunction012 = (descrypt) GetProcAddress( module, "SystemFunction012"); - pSystemFunction013 = (descrypt) GetProcAddress( module, "SystemFunction013"); - pSystemFunction014 = (descrypt) GetProcAddress( module, "SystemFunction014"); - pSystemFunction015 = (descrypt) GetProcAddress( module, "SystemFunction015"); - pSystemFunction016 = (descrypt) GetProcAddress( module, "SystemFunction016"); - pSystemFunction017 = (descrypt) GetProcAddress( module, "SystemFunction017"); - pSystemFunction018 = (descrypt) GetProcAddress( module, "SystemFunction018"); - pSystemFunction019 = (descrypt) GetProcAddress( module, "SystemFunction019"); - pSystemFunction020 = (descrypt) GetProcAddress( module, "SystemFunction020"); - pSystemFunction021 = (descrypt) GetProcAddress( module, "SystemFunction021"); - pSystemFunction022 = (descrypt) GetProcAddress( module, "SystemFunction022"); - pSystemFunction023 = (descrypt) GetProcAddress( module, "SystemFunction023"); - - /* these all encrypt two DES blocks */ - test_SystemFunction_encrypt(pSystemFunction012, 12); - test_SystemFunction_encrypt(pSystemFunction014, 14); - test_SystemFunction_encrypt(pSystemFunction016, 16); - test_SystemFunction_encrypt(pSystemFunction018, 18); - test_SystemFunction_encrypt(pSystemFunction020, 20); - test_SystemFunction_encrypt(pSystemFunction022, 22); - - /* these all decrypt two DES blocks */ - test_SystemFunction_decrypt(pSystemFunction013, 13); - test_SystemFunction_decrypt(pSystemFunction015, 15); - test_SystemFunction_decrypt(pSystemFunction017, 17); - test_SystemFunction_decrypt(pSystemFunction019, 19); - test_SystemFunction_decrypt(pSystemFunction021, 21); - test_SystemFunction_decrypt(pSystemFunction023, 23); - - pSystemFunction024 = (descrypt) GetProcAddress( module, "SystemFunction024"); - pSystemFunction025 = (descrypt) GetProcAddress( module, "SystemFunction025"); - pSystemFunction026 = (descrypt) GetProcAddress( module, "SystemFunction026"); - pSystemFunction027 = (descrypt) GetProcAddress( module, "SystemFunction027"); - - /* these encrypt two DES blocks with a short key */ - test_SystemFunction_enc32(pSystemFunction024, 24); - test_SystemFunction_enc32(pSystemFunction026, 26); - - /* these descrypt two DES blocks with a short key */ - test_SystemFunction_dec32(pSystemFunction025, 25); - test_SystemFunction_dec32(pSystemFunction027, 27); - - pSystemFunction030 = (memcmpfunc) GetProcAddress( module, "SystemFunction030" ); - pSystemFunction031 = (memcmpfunc) GetProcAddress( module, "SystemFunction031" ); - - test_memcmpfunc(pSystemFunction030); - test_memcmpfunc(pSystemFunction031); - - pSystemFunction032 = (void *)GetProcAddress( module, "SystemFunction032" ); - if (pSystemFunction032) - test_SystemFunction032(); - else - win_skip("SystemFunction032 is not available\n"); -} diff --git a/rostests/winetests/advapi32/crypt_md4.c b/rostests/winetests/advapi32/crypt_md4.c deleted file mode 100644 index e67becb1f03..00000000000 --- a/rostests/winetests/advapi32/crypt_md4.c +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Unit tests for MD4 functions - * - * Copyright 2004 Hans Leidekker - * - * 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 "ntstatus.h" -#define WIN32_NO_STATUS -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "winternl.h" - -typedef struct -{ - unsigned int buf[4]; - unsigned int i[2]; - unsigned char in[64]; - unsigned char digest[16]; -} MD4_CTX; - -static VOID (WINAPI *pMD4Init)( MD4_CTX *ctx ); -static VOID (WINAPI *pMD4Update)( MD4_CTX *ctx, const unsigned char *src, const int len ); -static VOID (WINAPI *pMD4Final)( MD4_CTX *ctx ); -static int (WINAPI *pSystemFunction007)(const UNICODE_STRING *, LPBYTE); -typedef int (WINAPI *md4hashfunc)(LPVOID, const LPBYTE, LPBYTE); - -static md4hashfunc pSystemFunction010; -static md4hashfunc pSystemFunction011; - -#define ctxcmp( a, b ) memcmp( a, b, FIELD_OFFSET( MD4_CTX, in ) ) - -static void test_md4_ctx(void) -{ - static unsigned char message[] = - "In our Life there's If" - "In our beliefs there's Lie" - "In our business there is Sin" - "In our bodies, there is Die"; - - int size = sizeof(message) - 1; - - MD4_CTX ctx; - MD4_CTX ctx_initialized = - { - { 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476 }, - { 0, 0 } - }; - - MD4_CTX ctx_update1 = - { - { 0x5e592ef7, 0xbdcb1567, 0x2b626d17, 0x7d1198bd }, - { 0x00000338, 0 } - }; - - MD4_CTX ctx_update2 = - { - { 0x05dcfd65, 0xb3711c0d, 0x9e3369c2, 0x903ead11 }, - { 0x00000670, 0 } - }; - - unsigned char expect[16] = - { 0x5f, 0xd3, 0x9b, 0x29, 0x47, 0x53, 0x47, 0xaf, - 0xa5, 0xba, 0x0c, 0x05, 0xff, 0xc0, 0xc7, 0xda }; - - - memset( &ctx, 0, sizeof(ctx) ); - pMD4Init( &ctx ); - ok( !ctxcmp( &ctx, &ctx_initialized ), "invalid initialization\n" ); - - pMD4Update( &ctx, message, size ); - ok( !ctxcmp( &ctx, &ctx_update1 ), "update doesn't work correctly\n" ); - - pMD4Update( &ctx, message, size ); - ok( !ctxcmp( &ctx, &ctx_update2 ), "update doesn't work correctly\n" ); - - pMD4Final( &ctx ); - ok( ctxcmp( &ctx, &ctx_initialized ), "context has changed\n" ); - ok( !memcmp( ctx.digest, expect, sizeof(expect) ), "incorrect result\n" ); - -} - -static void test_SystemFunction007(void) -{ - int r; - UNICODE_STRING str; - BYTE output[0x10]; - BYTE expected[0x10] = { 0x24, 0x0a, 0xf0, 0x9d, 0x84, 0x1c, 0xda, 0xcf, - 0x56, 0xeb, 0x6b, 0x96, 0x55, 0xec, 0xcf, 0x0a }; - WCHAR szFoo[] = {'f','o','o',0 }; - - if (0) - { - /* crashes on Windows */ - r = pSystemFunction007(NULL, NULL); - ok( r == STATUS_UNSUCCESSFUL, "wrong error code\n"); - } - - str.Buffer = szFoo; - str.Length = 4*sizeof(WCHAR); - str.MaximumLength = str.Length; - - memset(output, 0, sizeof output); - r = pSystemFunction007(&str, output); - ok( r == STATUS_SUCCESS, "wrong error code\n"); - - ok(!memcmp(output, expected, sizeof expected), "response wrong\n"); -} - -static void test_md4hashfunc(md4hashfunc func) -{ - unsigned char expected[0x10] = { - 0x48, 0x7c, 0x3f, 0x5e, 0x2b, 0x0d, 0x6a, 0x79, - 0x32, 0x4e, 0xcd, 0xbe, 0x9c, 0x15, 0x16, 0x6f }; - unsigned char in[0x10], output[0x10]; - int r; - - memset(in, 0, sizeof in); - memset(output, 0, sizeof output); - r = func(0, in, output); - ok( r == STATUS_SUCCESS, "wrong error code\n"); - ok( !memcmp(expected, output, sizeof output), "output wrong\n"); -} - -START_TEST(crypt_md4) -{ - HMODULE module; - - module = GetModuleHandleA( "advapi32.dll" ); - - pMD4Init = (void *)GetProcAddress( module, "MD4Init" ); - pMD4Update = (void *)GetProcAddress( module, "MD4Update" ); - pMD4Final = (void *)GetProcAddress( module, "MD4Final" ); - - if (pMD4Init && pMD4Update && pMD4Final) - test_md4_ctx(); - else - win_skip("MD4Init and/or MD4Update and/or MD4Final are not available\n"); - - pSystemFunction007 = (void *)GetProcAddress( module, "SystemFunction007" ); - if (pSystemFunction007) - test_SystemFunction007(); - else - win_skip("SystemFunction007 is not available\n"); - - pSystemFunction010 = (md4hashfunc)GetProcAddress( module, "SystemFunction010" ); - if (pSystemFunction010) - test_md4hashfunc(pSystemFunction010); - else - win_skip("SystemFunction010 is not available\n"); - - pSystemFunction011 = (md4hashfunc)GetProcAddress( module, "SystemFunction011" ); - if (pSystemFunction011) - test_md4hashfunc(pSystemFunction011); - else - win_skip("SystemFunction011 is not available\n"); -} diff --git a/rostests/winetests/advapi32/crypt_md5.c b/rostests/winetests/advapi32/crypt_md5.c deleted file mode 100644 index 4cf88688ea6..00000000000 --- a/rostests/winetests/advapi32/crypt_md5.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Unit tests for MD5 functions - * - * Copyright 2004 Hans Leidekker - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winerror.h" - -typedef struct -{ - unsigned int i[2]; - unsigned int buf[4]; - unsigned char in[64]; - unsigned char digest[16]; -} MD5_CTX; - -static VOID (WINAPI *pMD5Init)( MD5_CTX *ctx ); -static VOID (WINAPI *pMD5Update)( MD5_CTX *ctx, const unsigned char *src, const int len ); -static VOID (WINAPI *pMD5Final)( MD5_CTX *ctx ); - -#define ctxcmp( a, b ) memcmp( a, b, FIELD_OFFSET( MD5_CTX, in ) ) - -static void test_md5_ctx(void) -{ - static unsigned char message[] = - "In our Life there's If" - "In our beliefs there's Lie" - "In our business there is Sin" - "In our bodies, there is Die"; - - int size = sizeof(message) - 1; - HMODULE module; - - MD5_CTX ctx; - MD5_CTX ctx_initialized = - { - { 0, 0 }, - { 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476 } - }; - - MD5_CTX ctx_update1 = - { - { 0x00000338, 0 }, - { 0x068cb64d, 0xb7a05790, 0x426979ee, 0xed67e221 } - }; - - MD5_CTX ctx_update2 = - { - { 0x00000670, 0 }, - { 0x2f7afe58, 0xcc3e9315, 0x709c465c, 0xbf6414c8 } - }; - - unsigned char expect[16] = - { 0x43, 0x03, 0xdd, 0x8c, 0x60, 0xd9, 0x3a, 0x22, - 0x0b, 0x28, 0xd0, 0xb2, 0x65, 0x93, 0xd0, 0x36 }; - - module = GetModuleHandleA("advapi32.dll"); - - pMD5Init = (void *)GetProcAddress( module, "MD5Init" ); - pMD5Update = (void *)GetProcAddress( module, "MD5Update" ); - pMD5Final = (void *)GetProcAddress( module, "MD5Final" ); - - if (!pMD5Init || !pMD5Update || !pMD5Final) - { - win_skip("Needed functions are not available\n"); - return; - } - - memset( &ctx, 0, sizeof(ctx) ); - pMD5Init( &ctx ); - ok( !ctxcmp( &ctx, &ctx_initialized ), "invalid initialization\n" ); - - pMD5Update( &ctx, message, size ); - ok( !ctxcmp( &ctx, &ctx_update1 ), "update doesn't work correctly\n" ); - - pMD5Update( &ctx, message, size ); - ok( !ctxcmp( &ctx, &ctx_update2 ), "update doesn't work correctly\n" ); - - pMD5Final( &ctx ); - ok( ctxcmp( &ctx, &ctx_initialized ), "context has changed\n" ); - ok( !memcmp( ctx.digest, expect, sizeof(expect) ), "incorrect result\n" ); -} - -START_TEST(crypt_md5) -{ - test_md5_ctx(); -} diff --git a/rostests/winetests/advapi32/crypt_sha.c b/rostests/winetests/advapi32/crypt_sha.c deleted file mode 100644 index 2737ee7c0c6..00000000000 --- a/rostests/winetests/advapi32/crypt_sha.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Unit tests for SHA functions - * - * Copyright (c) 2004 Filip Navara - * - * 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 "windef.h" -#include "winbase.h" -#include "winerror.h" - -#include "wine/test.h" - -typedef struct { - ULONG Unknown[6]; - ULONG State[5]; - ULONG Count[2]; - UCHAR Buffer[64]; -} SHA_CTX, *PSHA_CTX; - -static void test_sha_ctx(void) -{ - void (WINAPI *pA_SHAInit)(PSHA_CTX); - void (WINAPI *pA_SHAUpdate)(PSHA_CTX, const unsigned char *, UINT); - void (WINAPI *pA_SHAFinal)(PSHA_CTX, PULONG); - static const unsigned char test_buffer[] = "In our Life there's If" - "In our beliefs there's Lie" - "In our business there is Sin" - "In our bodies, there is Die"; - HMODULE hmod; - SHA_CTX ctx; - ULONG result[5]; - ULONG result_correct[5] = {0xe014f93, 0xe09791ec, 0x6dcf96c8, 0x8e9385fc, 0x1611c1bb}; - - hmod = GetModuleHandleA("advapi32.dll"); - pA_SHAInit = (void *)GetProcAddress(hmod, "A_SHAInit"); - pA_SHAUpdate = (void *)GetProcAddress(hmod, "A_SHAUpdate"); - pA_SHAFinal = (void *)GetProcAddress(hmod, "A_SHAFinal"); - - if (!pA_SHAInit || !pA_SHAUpdate || !pA_SHAFinal) - { - win_skip("A_SHAInit and/or A_SHAUpdate and/or A_SHAFinal are not available\n"); - return; - } - - RtlZeroMemory(&ctx, sizeof(ctx)); - pA_SHAInit(&ctx); - pA_SHAUpdate(&ctx, test_buffer, sizeof(test_buffer)-1); - pA_SHAUpdate(&ctx, test_buffer, sizeof(test_buffer)-1); - pA_SHAFinal(&ctx, result); - ok(!memcmp(result, result_correct, sizeof(result)), "incorrect result\n"); -} - -START_TEST(crypt_sha) -{ - test_sha_ctx(); -} diff --git a/rostests/winetests/advapi32/eventlog.c b/rostests/winetests/advapi32/eventlog.c deleted file mode 100644 index 543b41cbaf8..00000000000 --- a/rostests/winetests/advapi32/eventlog.c +++ /dev/null @@ -1,1152 +0,0 @@ -/* - * Unit tests for Event Logging functions - * - * Copyright (c) 2009 Paul Vriens - * - * 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 "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "winnt.h" -#include "winreg.h" -#include "sddl.h" - -#include "wine/test.h" - -static BOOL (WINAPI *pCreateWellKnownSid)(WELL_KNOWN_SID_TYPE,PSID,PSID,DWORD*); -static BOOL (WINAPI *pGetEventLogInformation)(HANDLE,DWORD,LPVOID,DWORD,LPDWORD); - -static BOOL (WINAPI *pGetComputerNameExA)(COMPUTER_NAME_FORMAT,LPSTR,LPDWORD); -static BOOL (WINAPI *pWow64DisableWow64FsRedirection)(PVOID *); -static BOOL (WINAPI *pWow64RevertWow64FsRedirection)(PVOID); - -static void init_function_pointers(void) -{ - HMODULE hadvapi32 = GetModuleHandleA("advapi32.dll"); - HMODULE hkernel32 = GetModuleHandleA("kernel32.dll"); - - pCreateWellKnownSid = (void*)GetProcAddress(hadvapi32, "CreateWellKnownSid"); - pGetEventLogInformation = (void*)GetProcAddress(hadvapi32, "GetEventLogInformation"); - - pGetComputerNameExA = (void*)GetProcAddress(hkernel32, "GetComputerNameExA"); - pWow64DisableWow64FsRedirection = (void*)GetProcAddress(hkernel32, "Wow64DisableWow64FsRedirection"); - pWow64RevertWow64FsRedirection = (void*)GetProcAddress(hkernel32, "Wow64RevertWow64FsRedirection"); -} - -static void create_backup(const char *filename) -{ - HANDLE handle; - - DeleteFileA(filename); - handle = OpenEventLogA(NULL, "Application"); - BackupEventLogA(handle, filename); - CloseEventLog(handle); - - todo_wine - ok(GetFileAttributesA(filename) != INVALID_FILE_ATTRIBUTES, "Expected a backup file\n"); -} - -static void test_open_close(void) -{ - HANDLE handle; - BOOL ret; - - SetLastError(0xdeadbeef); - ret = CloseEventLog(NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE || - GetLastError() == ERROR_NOACCESS, /* W2K */ - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - handle = OpenEventLogA(NULL, NULL); - ok(handle == NULL, "Didn't expect a handle\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - handle = OpenEventLogA("IDontExist", NULL); - ok(handle == NULL, "Didn't expect a handle\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - handle = OpenEventLogA("IDontExist", "deadbeef"); - ok(handle == NULL, "Didn't expect a handle\n"); - ok(GetLastError() == RPC_S_SERVER_UNAVAILABLE || - GetLastError() == RPC_S_INVALID_NET_ADDR, /* Some Vista and Win7 */ - "Expected RPC_S_SERVER_UNAVAILABLE, got %d\n", GetLastError()); - - /* This one opens the Application log */ - handle = OpenEventLogA(NULL, "deadbeef"); - ok(handle != NULL, "Expected a handle\n"); - ret = CloseEventLog(handle); - ok(ret, "Expected success\n"); - /* Close a second time */ - SetLastError(0xdeadbeef); - ret = CloseEventLog(handle); - todo_wine - { - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - } - - /* Empty servername should be read as local server */ - handle = OpenEventLogA("", "Application"); - ok(handle != NULL, "Expected a handle\n"); - CloseEventLog(handle); - - handle = OpenEventLogA(NULL, "Application"); - ok(handle != NULL, "Expected a handle\n"); - CloseEventLog(handle); -} - -static void test_info(void) -{ - HANDLE handle; - BOOL ret; - DWORD needed; - EVENTLOG_FULL_INFORMATION efi; - - if (!pGetEventLogInformation) - { - /* NT4 */ - win_skip("GetEventLogInformation is not available\n"); - return; - } - SetLastError(0xdeadbeef); - ret = pGetEventLogInformation(NULL, 1, NULL, 0, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_LEVEL, "Expected ERROR_INVALID_LEVEL, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = pGetEventLogInformation(NULL, EVENTLOG_FULL_INFO, NULL, 0, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - - handle = OpenEventLogA(NULL, "Application"); - - SetLastError(0xdeadbeef); - ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, NULL, 0, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == RPC_X_NULL_REF_POINTER, "Expected RPC_X_NULL_REF_POINTER, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, NULL, 0, &needed); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == RPC_X_NULL_REF_POINTER, "Expected RPC_X_NULL_REF_POINTER, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, (LPVOID)&efi, 0, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == RPC_X_NULL_REF_POINTER, "Expected RPC_X_NULL_REF_POINTER, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - needed = 0xdeadbeef; - efi.dwFull = 0xdeadbeef; - ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, (LPVOID)&efi, 0, &needed); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(needed == sizeof(EVENTLOG_FULL_INFORMATION), "Expected sizeof(EVENTLOG_FULL_INFORMATION), got %d\n", needed); - ok(efi.dwFull == 0xdeadbeef, "Expected no change to the dwFull member\n"); - - /* Not that we care, but on success last error is set to ERROR_IO_PENDING */ - efi.dwFull = 0xdeadbeef; - needed *= 2; - ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, (LPVOID)&efi, needed, &needed); - ok(ret, "Expected success\n"); - ok(needed == sizeof(EVENTLOG_FULL_INFORMATION), "Expected sizeof(EVENTLOG_FULL_INFORMATION), got %d\n", needed); - ok(efi.dwFull == 0 || efi.dwFull == 1, "Expected 0 (not full) or 1 (full), got %d\n", efi.dwFull); - - CloseEventLog(handle); -} - -static void test_count(void) -{ - HANDLE handle; - BOOL ret; - DWORD count; - const char backup[] = "backup.evt"; - - SetLastError(0xdeadbeef); - ret = GetNumberOfEventLogRecords(NULL, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - count = 0xdeadbeef; - ret = GetNumberOfEventLogRecords(NULL, &count); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - ok(count == 0xdeadbeef, "Expected count to stay unchanged\n"); - - handle = OpenEventLogA(NULL, "Application"); - - SetLastError(0xdeadbeef); - ret = GetNumberOfEventLogRecords(handle, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - count = 0xdeadbeef; - ret = GetNumberOfEventLogRecords(handle, &count); - ok(ret, "Expected success\n"); - ok(count != 0xdeadbeef, "Expected the number of records\n"); - - CloseEventLog(handle); - - /* Make a backup eventlog to work with */ - create_backup(backup); - - handle = OpenBackupEventLogA(NULL, backup); - todo_wine - ok(handle != NULL, "Expected a handle\n"); - - /* Does GetNumberOfEventLogRecords work with backup eventlogs? */ - count = 0xdeadbeef; - ret = GetNumberOfEventLogRecords(handle, &count); - todo_wine - { - ok(ret, "Expected success\n"); - ok(count != 0xdeadbeef, "Expected the number of records\n"); - } - - CloseEventLog(handle); - DeleteFileA(backup); -} - -static void test_oldest(void) -{ - HANDLE handle; - BOOL ret; - DWORD oldest; - const char backup[] = "backup.evt"; - - SetLastError(0xdeadbeef); - ret = GetOldestEventLogRecord(NULL, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - oldest = 0xdeadbeef; - ret = GetOldestEventLogRecord(NULL, &oldest); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - ok(oldest == 0xdeadbeef, "Expected oldest to stay unchanged\n"); - - handle = OpenEventLogA(NULL, "Application"); - - SetLastError(0xdeadbeef); - ret = GetOldestEventLogRecord(handle, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - oldest = 0xdeadbeef; - ret = GetOldestEventLogRecord(handle, &oldest); - ok(ret, "Expected success\n"); - ok(oldest != 0xdeadbeef, "Expected the number of the oldest record\n"); - - CloseEventLog(handle); - - /* Make a backup eventlog to work with */ - create_backup(backup); - - handle = OpenBackupEventLogA(NULL, backup); - todo_wine - ok(handle != NULL, "Expected a handle\n"); - - /* Does GetOldestEventLogRecord work with backup eventlogs? */ - oldest = 0xdeadbeef; - ret = GetOldestEventLogRecord(handle, &oldest); - todo_wine - { - ok(ret, "Expected success\n"); - ok(oldest != 0xdeadbeef, "Expected the number of the oldest record\n"); - } - - CloseEventLog(handle); - DeleteFileA(backup); -} - -static void test_backup(void) -{ - HANDLE handle; - BOOL ret; - const char backup[] = "backup.evt"; - const char backup2[] = "backup2.evt"; - - SetLastError(0xdeadbeef); - ret = BackupEventLogA(NULL, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = BackupEventLogA(NULL, backup); - ok(!ret, "Expected failure\n"); - ok(GetFileAttributesA(backup) == INVALID_FILE_ATTRIBUTES, "Expected no backup file\n"); - - handle = OpenEventLogA(NULL, "Application"); - - SetLastError(0xdeadbeef); - ret = BackupEventLogA(handle, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - ret = BackupEventLogA(handle, backup); - ok(ret, "Expected success\n"); - todo_wine - ok(GetFileAttributesA(backup) != INVALID_FILE_ATTRIBUTES, "Expected a backup file\n"); - - /* Try to overwrite */ - SetLastError(0xdeadbeef); - ret = BackupEventLogA(handle, backup); - todo_wine - { - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_ALREADY_EXISTS, "Expected ERROR_ALREADY_EXISTS, got %d\n", GetLastError()); - } - - CloseEventLog(handle); - - /* Can we make a backup of a backup? */ - handle = OpenBackupEventLogA(NULL, backup); - todo_wine - ok(handle != NULL, "Expected a handle\n"); - - ret = BackupEventLogA(handle, backup2); - todo_wine - { - ok(ret, "Expected success\n"); - ok(GetFileAttributesA(backup2) != INVALID_FILE_ATTRIBUTES, "Expected a backup file\n"); - } - - CloseEventLog(handle); - DeleteFileA(backup); - DeleteFileA(backup2); -} - -static void test_read(void) -{ - HANDLE handle; - BOOL ret; - DWORD count, toread, read, needed; - void *buf; - - SetLastError(0xdeadbeef); - ret = ReadEventLogA(NULL, 0, 0, NULL, 0, NULL, NULL); - ok(!ret, "Expected failure\n"); - todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - read = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = ReadEventLogA(NULL, 0, 0, NULL, 0, &read, NULL); - ok(!ret, "Expected failure\n"); - ok(read == 0xdeadbeef, "Expected 'read' parameter to remain unchanged\n"); - todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - needed = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = ReadEventLogA(NULL, 0, 0, NULL, 0, NULL, &needed); - ok(!ret, "Expected failure\n"); - ok(needed == 0xdeadbeef, "Expected 'needed' parameter to remain unchanged\n"); - todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* 'read' and 'needed' are only filled when the needed buffer size is passed back or when the call succeeds */ - SetLastError(0xdeadbeef); - ret = ReadEventLogA(NULL, 0, 0, NULL, 0, &read, &needed); - ok(!ret, "Expected failure\n"); - todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = ReadEventLogA(NULL, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, 0, NULL, 0, NULL, NULL); - ok(!ret, "Expected failure\n"); - todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = ReadEventLogA(NULL, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, 0, NULL, 0, &read, &needed); - ok(!ret, "Expected failure\n"); - todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - buf = NULL; - SetLastError(0xdeadbeef); - ret = ReadEventLogA(NULL, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, - 0, buf, sizeof(EVENTLOGRECORD), &read, &needed); - ok(!ret, "Expected failure\n"); - todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - buf = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD)); - SetLastError(0xdeadbeef); - ret = ReadEventLogA(NULL, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, - 0, buf, sizeof(EVENTLOGRECORD), &read, &needed); - ok(!ret, "Expected failure\n"); - todo_wine - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - HeapFree(GetProcessHeap(), 0, buf); - - handle = OpenEventLogA(NULL, "Application"); - - /* Show that we need the proper dwFlags with a (for the rest) proper call */ - buf = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD)); - - SetLastError(0xdeadbeef); - ret = ReadEventLogA(handle, 0, 0, buf, sizeof(EVENTLOGRECORD), &read, &needed); - ok(!ret, "Expected failure\n"); - todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ, 0, buf, sizeof(EVENTLOGRECORD), &read, &needed); - ok(!ret, "Expected failure\n"); - todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = ReadEventLogA(handle, EVENTLOG_SEEK_READ, 0, buf, sizeof(EVENTLOGRECORD), &read, &needed); - ok(!ret, "Expected failure\n"); - todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ | EVENTLOG_BACKWARDS_READ, - 0, buf, sizeof(EVENTLOGRECORD), &read, &needed); - ok(!ret, "Expected failure\n"); - todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = ReadEventLogA(handle, EVENTLOG_SEEK_READ | EVENTLOG_FORWARDS_READ | EVENTLOG_BACKWARDS_READ, - 0, buf, sizeof(EVENTLOGRECORD), &read, &needed); - ok(!ret, "Expected failure\n"); - todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = ReadEventLogA(handle, EVENTLOG_SEEK_READ | EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, - 0, buf, sizeof(EVENTLOGRECORD), &read, &needed); - ok(!ret, "Expected failure\n"); - todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - HeapFree(GetProcessHeap(), 0, buf); - - /* First check if there are any records (in practice only on Wine: FIXME) */ - count = 0; - GetNumberOfEventLogRecords(handle, &count); - if (!count) - { - skip("No records in the 'Application' log\n"); - CloseEventLog(handle); - return; - } - - /* Get the buffer size for the first record */ - buf = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD)); - read = needed = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, - 0, buf, sizeof(EVENTLOGRECORD), &read, &needed); - ok(!ret, "Expected failure\n"); - ok(read == 0, "Expected no bytes read\n"); - ok(needed > sizeof(EVENTLOGRECORD), "Expected the needed buffersize to be bigger than sizeof(EVENTLOGRECORD)\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* Read the first record */ - toread = needed; - buf = HeapReAlloc(GetProcessHeap(), 0, buf, toread); - read = needed = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, 0, buf, toread, &read, &needed); - ok(ret, "Expected success\n"); - ok(read == toread || - broken(read < toread), /* NT4 wants a buffer size way bigger than just 1 record */ - "Expected the requested size to be read\n"); - ok(needed == 0, "Expected no extra bytes to be read\n"); - HeapFree(GetProcessHeap(), 0, buf); - - CloseEventLog(handle); -} - -static void test_openbackup(void) -{ - HANDLE handle, handle2, file; - DWORD written; - const char backup[] = "backup.evt"; - const char text[] = "Just some text"; - - SetLastError(0xdeadbeef); - handle = OpenBackupEventLogA(NULL, NULL); - ok(handle == NULL, "Didn't expect a handle\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - handle = OpenBackupEventLogA(NULL, "idontexist.evt"); - ok(handle == NULL, "Didn't expect a handle\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - handle = OpenBackupEventLogA("IDontExist", NULL); - ok(handle == NULL, "Didn't expect a handle\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - handle = OpenBackupEventLogA("IDontExist", "idontexist.evt"); - ok(handle == NULL, "Didn't expect a handle\n"); - ok(GetLastError() == RPC_S_SERVER_UNAVAILABLE || - GetLastError() == RPC_S_INVALID_NET_ADDR, /* Some Vista and Win7 */ - "Expected RPC_S_SERVER_UNAVAILABLE, got %d\n", GetLastError()); - - /* Make a backup eventlog to work with */ - create_backup(backup); - - /* FIXME: Wine stops here */ - if (GetFileAttributesA(backup) == INVALID_FILE_ATTRIBUTES) - { - skip("We don't have a backup eventlog to work with\n"); - return; - } - - SetLastError(0xdeadbeef); - handle = OpenBackupEventLogA("IDontExist", backup); - ok(handle == NULL, "Didn't expect a handle\n"); - ok(GetLastError() == RPC_S_SERVER_UNAVAILABLE || - GetLastError() == RPC_S_INVALID_NET_ADDR, /* Some Vista and Win7 */ - "Expected RPC_S_SERVER_UNAVAILABLE, got %d\n", GetLastError()); - - /* Empty servername should be read as local server */ - handle = OpenBackupEventLogA("", backup); - ok(handle != NULL, "Expected a handle\n"); - CloseEventLog(handle); - - handle = OpenBackupEventLogA(NULL, backup); - ok(handle != NULL, "Expected a handle\n"); - - /* Can we open that same backup eventlog more than once? */ - handle2 = OpenBackupEventLogA(NULL, backup); - ok(handle2 != NULL, "Expected a handle\n"); - ok(handle2 != handle, "Didn't expect the same handle\n"); - CloseEventLog(handle2); - - CloseEventLog(handle); - DeleteFileA(backup); - - /* Is there any content checking done? */ - file = CreateFileA(backup, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, NULL); - CloseHandle(file); - SetLastError(0xdeadbeef); - handle = OpenBackupEventLogA(NULL, backup); - ok(handle == NULL, "Didn't expect a handle\n"); - ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY || - GetLastError() == ERROR_EVENTLOG_FILE_CORRUPT, /* Vista and Win7 */ - "Expected ERROR_NOT_ENOUGH_MEMORY, got %d\n", GetLastError()); - CloseEventLog(handle); - DeleteFileA(backup); - - file = CreateFileA(backup, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, NULL); - WriteFile(file, text, sizeof(text), &written, NULL); - CloseHandle(file); - SetLastError(0xdeadbeef); - handle = OpenBackupEventLogA(NULL, backup); - ok(handle == NULL, "Didn't expect a handle\n"); - ok(GetLastError() == ERROR_EVENTLOG_FILE_CORRUPT, "Expected ERROR_EVENTLOG_FILE_CORRUPT, got %d\n", GetLastError()); - CloseEventLog(handle); - DeleteFileA(backup); -} - -static void test_clear(void) -{ - HANDLE handle; - BOOL ret; - const char backup[] = "backup.evt"; - const char backup2[] = "backup2.evt"; - - SetLastError(0xdeadbeef); - ret = ClearEventLogA(NULL, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - - /* Make a backup eventlog to work with */ - create_backup(backup); - - SetLastError(0xdeadbeef); - ret = ClearEventLogA(NULL, backup); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - - handle = OpenBackupEventLogA(NULL, backup); - todo_wine - ok(handle != NULL, "Expected a handle\n"); - - /* A real eventlog would fail with ERROR_ALREADY_EXISTS */ - SetLastError(0xdeadbeef); - ret = ClearEventLogA(handle, backup); - ok(!ret, "Expected failure\n"); - /* The eventlog service runs under an account that doesn't have the necessary - * permissions on the users home directory on a default Vista+ system. - */ - ok(GetLastError() == ERROR_INVALID_HANDLE || - GetLastError() == ERROR_ACCESS_DENIED, /* Vista+ */ - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - - /* Show that ClearEventLog only works for real eventlogs. */ - SetLastError(0xdeadbeef); - ret = ClearEventLogA(handle, backup2); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - ok(GetFileAttributesA(backup2) == INVALID_FILE_ATTRIBUTES, "Expected no backup file\n"); - - SetLastError(0xdeadbeef); - ret = ClearEventLogA(handle, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - - CloseEventLog(handle); - todo_wine - ok(DeleteFileA(backup), "Could not delete the backup file\n"); -} - -static const char eventlogsvc[] = "SYSTEM\\CurrentControlSet\\Services\\Eventlog"; -static const char eventlogname[] = "Wine"; -static const char eventsources[][11] = { "WineSrc", "WineSrc1", "WineSrc20", "WineSrc300" }; - -static BOOL create_new_eventlog(void) -{ - HKEY key, eventkey; - BOOL bret = FALSE; - LONG lret; - DWORD i; - - /* First create our eventlog */ - lret = RegOpenKeyA(HKEY_LOCAL_MACHINE, eventlogsvc, &key); - /* FIXME: Wine stops here */ - if (lret != ERROR_SUCCESS) - { - skip("Could not open the EventLog service registry key\n"); - return FALSE; - } - lret = RegCreateKeyA(key, eventlogname, &eventkey); - if (lret != ERROR_SUCCESS) - { - skip("Could not create the eventlog '%s' registry key\n", eventlogname); - goto cleanup; - } - - /* Create some event sources, the registry value 'Sources' is updated automatically */ - for (i = 0; i < sizeof(eventsources)/sizeof(eventsources[0]); i++) - { - HKEY srckey; - - lret = RegCreateKeyA(eventkey, eventsources[i], &srckey); - if (lret != ERROR_SUCCESS) - { - skip("Could not create the eventsource '%s' registry key\n", eventsources[i]); - goto cleanup; - } - RegFlushKey(srckey); - RegCloseKey(srckey); - } - - bret = TRUE; - - /* The flushing of the registry (here and above) gives us some assurance - * that we are not to quickly writing events as 'Sources' could still be - * not updated. - */ - RegFlushKey(eventkey); -cleanup: - RegCloseKey(eventkey); - RegCloseKey(key); - - return bret; -} - -static const char *one_string[] = { "First string" }; -static const char *two_strings[] = { "First string", "Second string" }; -static const struct -{ - const char *evt_src; - WORD evt_type; - WORD evt_cat; - DWORD evt_id; - BOOL evt_sid; - WORD evt_numstrings; - const char **evt_strings; -} read_write [] = -{ - { eventlogname, EVENTLOG_INFORMATION_TYPE, 1, 1, FALSE, 1, one_string }, - { eventsources[0], EVENTLOG_WARNING_TYPE, 1, 2, FALSE, 0, NULL }, - { eventsources[1], EVENTLOG_AUDIT_FAILURE, 1, 3, FALSE, 2, two_strings }, - { eventsources[2], EVENTLOG_ERROR_TYPE, 1, 4, FALSE, 0, NULL }, - { eventsources[3], EVENTLOG_WARNING_TYPE, 1, 5, FALSE, 1, one_string }, - { eventlogname, EVENTLOG_SUCCESS, 2, 6, TRUE, 2, two_strings }, - { eventsources[0], EVENTLOG_AUDIT_FAILURE, 2, 7, TRUE, 0, NULL }, - { eventsources[1], EVENTLOG_AUDIT_SUCCESS, 2, 8, TRUE, 2, two_strings }, - { eventsources[2], EVENTLOG_WARNING_TYPE, 2, 9, TRUE, 0, NULL }, - { eventsources[3], EVENTLOG_ERROR_TYPE, 2, 10, TRUE, 1, one_string } -}; - -static void test_readwrite(void) -{ - HANDLE handle; - PSID user; - DWORD sidsize, count; - BOOL ret, sidavailable; - BOOL on_vista = FALSE; /* Used to indicate Vista, W2K8 or Win7 */ - DWORD i; - char *localcomputer = NULL; - DWORD size; - - if (pCreateWellKnownSid) - { - sidsize = SECURITY_MAX_SID_SIZE; - user = HeapAlloc(GetProcessHeap(), 0, sidsize); - SetLastError(0xdeadbeef); - pCreateWellKnownSid(WinInteractiveSid, NULL, user, &sidsize); - sidavailable = TRUE; - } - else - { - win_skip("Skipping some SID related tests\n"); - sidavailable = FALSE; - user = NULL; - } - - /* Write an event with an incorrect event type. This will fail on Windows 7 - * but succeed on all others, hence it's not part of the struct. - */ - handle = OpenEventLogA(NULL, eventlogname); - if (!handle) - { - /* Intermittently seen on NT4 when tests are run immediately after boot */ - win_skip("Could not get a handle to the eventlog\n"); - goto cleanup; - } - - count = 0xdeadbeef; - GetNumberOfEventLogRecords(handle, &count); - if (count != 0) - { - /* Needed for W2K3 without a service pack */ - win_skip("We most likely opened the Application eventlog\n"); - CloseEventLog(handle); - Sleep(2000); - - handle = OpenEventLogA(NULL, eventlogname); - count = 0xdeadbeef; - GetNumberOfEventLogRecords(handle, &count); - if (count != 0) - { - win_skip("We didn't open our new eventlog\n"); - CloseEventLog(handle); - goto cleanup; - } - } - - SetLastError(0xdeadbeef); - ret = ReportEvent(handle, 0x20, 0, 0, NULL, 0, 0, NULL, NULL); - if (!ret && GetLastError() == ERROR_CRC) - { - win_skip("Win7 fails when using incorrect event types\n"); - ret = ReportEvent(handle, 0, 0, 0, NULL, 0, 0, NULL, NULL); - ok(ret, "Expected success : %d\n", GetLastError()); - } - else - { - void *buf; - DWORD read, needed = 0; - EVENTLOGRECORD *record; - - ok(ret, "Expected success : %d\n", GetLastError()); - - /* Needed to catch earlier Vista (with no ServicePack for example) */ - buf = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD)); - if (!(ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, - 0, buf, sizeof(EVENTLOGRECORD), &read, &needed)) && - GetLastError() == ERROR_INSUFFICIENT_BUFFER) - { - buf = HeapReAlloc(GetProcessHeap(), 0, buf, needed); - ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, - 0, buf, needed, &read, &needed); - } - if (ret) - { - record = (EVENTLOGRECORD *)buf; - - /* Vista and W2K8 return EVENTLOG_SUCCESS, Windows versions before return - * the written eventtype (0x20 in this case). - */ - if (record->EventType == EVENTLOG_SUCCESS) - on_vista = TRUE; - } - HeapFree(GetProcessHeap(), 0, buf); - } - - /* This will clear the eventlog. The record numbering for new - * events however differs on Vista SP1+. Before Vista the first - * event would be numbered 1, on Vista SP1+ it's higher as we already - * had at least one event (more in case of multiple test runs without - * a reboot). - */ - ClearEventLogA(handle, NULL); - CloseEventLog(handle); - - /* Write a bunch of events while using different event sources */ - for (i = 0; i < sizeof(read_write)/sizeof(read_write[0]); i++) - { - DWORD oldest; - BOOL run_sidtests = read_write[i].evt_sid & sidavailable; - - /* We don't need to use RegisterEventSource to report events */ - if (i % 2) - handle = OpenEventLogA(NULL, read_write[i].evt_src); - else - handle = RegisterEventSourceA(NULL, read_write[i].evt_src); - ok(handle != NULL, "Expected a handle\n"); - - SetLastError(0xdeadbeef); - ret = ReportEvent(handle, read_write[i].evt_type, read_write[i].evt_cat, - read_write[i].evt_id, run_sidtests ? user : NULL, - read_write[i].evt_numstrings, 0, read_write[i].evt_strings, NULL); - ok(ret, "Expected ReportEvent success : %d\n", GetLastError()); - - count = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = GetNumberOfEventLogRecords(handle, &count); - ok(ret, "Expected GetNumberOfEventLogRecords success : %d\n", GetLastError()); - ok(count == (i + 1), "Expected %d records, got %d\n", i + 1, count); - - oldest = 0xdeadbeef; - ret = GetOldestEventLogRecord(handle, &oldest); - ok(ret, "Expected GetOldestEventLogRecord success : %d\n", GetLastError()); - ok(oldest == 1 || - (oldest > 1 && oldest != 0xdeadbeef), /* Vista SP1+, W2K8 and Win7 */ - "Expected oldest to be 1 or higher, got %d\n", oldest); - if (oldest > 1 && oldest != 0xdeadbeef) - on_vista = TRUE; - - SetLastError(0xdeadbeef); - if (i % 2) - ret = CloseEventLog(handle); - else - ret = DeregisterEventSource(handle); - ok(ret, "Expected success : %d\n", GetLastError()); - } - - handle = OpenEventLogA(NULL, eventlogname); - count = 0xdeadbeef; - ret = GetNumberOfEventLogRecords(handle, &count); - ok(ret, "Expected success\n"); - ok(count == i, "Expected %d records, got %d\n", i, count); - CloseEventLog(handle); - - if (count == 0) - { - skip("No events were written to the eventlog\n"); - goto cleanup; - } - - /* Report only once */ - if (on_vista) - skip("There is no DWORD alignment enforced for UserSid on Vista, W2K8 or Win7\n"); - - if (on_vista && pGetComputerNameExA) - { - /* New Vista+ behavior */ - size = 0; - SetLastError(0xdeadbeef); - pGetComputerNameExA(ComputerNameDnsFullyQualified, NULL, &size); - localcomputer = HeapAlloc(GetProcessHeap(), 0, size); - pGetComputerNameExA(ComputerNameDnsFullyQualified, localcomputer, &size); - } - else - { - size = MAX_COMPUTERNAME_LENGTH + 1; - localcomputer = HeapAlloc(GetProcessHeap(), 0, size); - GetComputerNameA(localcomputer, &size); - } - - /* Read all events from our created eventlog, one by one */ - handle = OpenEventLogA(NULL, eventlogname); - i = 0; - for (;;) - { - void *buf; - DWORD read, needed; - EVENTLOGRECORD *record; - char *sourcename, *computername; - int k; - char *ptr; - BOOL run_sidtests = read_write[i].evt_sid & sidavailable; - - buf = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD)); - SetLastError(0xdeadbeef); - ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, - 0, buf, sizeof(EVENTLOGRECORD), &read, &needed); - if (!ret && GetLastError() == ERROR_HANDLE_EOF) - { - HeapFree(GetProcessHeap(), 0, buf); - break; - } - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INVALID_PARAMETER, got %d\n",GetLastError()); - - buf = HeapReAlloc(GetProcessHeap(), 0, buf, needed); - ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, - 0, buf, needed, &read, &needed); - ok(ret, "Expected success: %d\n", GetLastError()); - - record = (EVENTLOGRECORD *)buf; - - ok(record->Length == read, - "Expected %d, got %d\n", read, record->Length); - ok(record->Reserved == 0x654c664c, - "Expected 0x654c664c, got %d\n", record->Reserved); - ok(record->RecordNumber == i + 1 || - (on_vista && (record->RecordNumber > i + 1)), - "Expected %d or higher, got %d\n", i + 1, record->RecordNumber); - ok(record->EventID == read_write[i].evt_id, - "Expected %d, got %d\n", read_write[i].evt_id, record->EventID); - ok(record->EventType == read_write[i].evt_type, - "Expected %d, got %d\n", read_write[i].evt_type, record->EventType); - ok(record->NumStrings == read_write[i].evt_numstrings, - "Expected %d, got %d\n", read_write[i].evt_numstrings, record->NumStrings); - ok(record->EventCategory == read_write[i].evt_cat, - "Expected %d, got %d\n", read_write[i].evt_cat, record->EventCategory); - - sourcename = (char *)((BYTE *)buf + sizeof(EVENTLOGRECORD)); - ok(!lstrcmpA(sourcename, read_write[i].evt_src), "Expected '%s', got '%s'\n", - read_write[i].evt_src, sourcename); - - computername = (char *)((BYTE *)buf + sizeof(EVENTLOGRECORD) + lstrlenA(sourcename) + 1); - ok(!lstrcmpiA(computername, localcomputer), "Expected '%s', got '%s'\n", - localcomputer, computername); - - /* Before Vista, UserSid was aligned on a DWORD boundary. Next to that if - * no padding was actually required a 0 DWORD was still used for padding. No - * application should be relying on the padding as we are working with offsets - * anyway. - */ - - if (!on_vista) - { - DWORD calculated_sidoffset = sizeof(EVENTLOGRECORD) + lstrlenA(sourcename) + 1 + lstrlenA(computername) + 1; - - /* We are already DWORD aligned, there should still be some padding */ - if ((((UINT_PTR)buf + calculated_sidoffset) % sizeof(DWORD)) == 0) - ok(*(DWORD *)((BYTE *)buf + calculated_sidoffset) == 0, "Expected 0\n"); - - ok((((UINT_PTR)buf + record->UserSidOffset) % sizeof(DWORD)) == 0, "Expected DWORD alignment\n"); - } - - if (run_sidtests) - { - ok(record->UserSidLength == sidsize, "Expected %d, got %d\n", sidsize, record->UserSidLength); - } - else - { - ok(record->StringOffset == record->UserSidOffset, "Expected offsets to be the same\n"); - ok(record->UserSidLength == 0, "Expected 0, got %d\n", record->UserSidLength); - } - - ok(record->DataLength == 0, "Expected 0, got %d\n", record->DataLength); - - ptr = (char *)((BYTE *)buf + record->StringOffset); - for (k = 0; k < record->NumStrings; k++) - { - ok(!lstrcmpA(ptr, two_strings[k]), "Expected '%s', got '%s'\n", two_strings[k], ptr); - ptr += lstrlenA(ptr) + 1; - } - - ok(record->Length == *(DWORD *)((BYTE *)buf + record->Length - sizeof(DWORD)), - "Expected the closing DWORD to contain the length of the record\n"); - - HeapFree(GetProcessHeap(), 0, buf); - i++; - } - CloseEventLog(handle); - - /* Test clearing a real eventlog */ - handle = OpenEventLogA(NULL, eventlogname); - - SetLastError(0xdeadbeef); - ret = ClearEventLogA(handle, NULL); - ok(ret, "Expected success\n"); - - count = 0xdeadbeef; - ret = GetNumberOfEventLogRecords(handle, &count); - ok(ret, "Expected success\n"); - ok(count == 0, "Expected an empty eventlog, got %d records\n", count); - - CloseEventLog(handle); - -cleanup: - HeapFree(GetProcessHeap(), 0, localcomputer); - HeapFree(GetProcessHeap(), 0, user); -} - -/* Before Vista: - * - * Creating an eventlog on Windows (via the registry) automatically leads - * to creation of a REG_MULTI_SZ named 'Sources'. This value lists all the - * potential event sources for this eventlog. 'Sources' is automatically - * updated when a new key (aka event source) is created. - * - * Although the updating of registry keys is almost instantaneously, we - * check it after some other tests to assure we are not querying the - * registry or file system to quickly. - * - * NT4 and higher: - * - * The eventlog file itself is also automatically created, even before we - * start writing events. - */ -static char eventlogfile[MAX_PATH]; -static void test_autocreation(void) -{ - HKEY key, eventkey; - DWORD type, size; - LONG ret; - int i; - char *p; - char sources[sizeof(eventsources)]; - char sysdir[MAX_PATH]; - void *redir = 0; - - RegOpenKeyA(HKEY_LOCAL_MACHINE, eventlogsvc, &key); - RegOpenKeyA(key, eventlogname, &eventkey); - - size = sizeof(sources); - sources[0] = 0; - ret = RegQueryValueExA(eventkey, "Sources", NULL, &type, (LPBYTE)sources, &size); - if (ret == ERROR_SUCCESS) - { - char sources_verify[sizeof(eventsources)]; - - ok(type == REG_MULTI_SZ, "Expected a REG_MULTI_SZ, got %d\n", type); - - /* Build the expected string */ - memset(sources_verify, 0, sizeof(sources_verify)); - p = sources_verify; - for (i = sizeof(eventsources)/sizeof(eventsources[0]); i > 0; i--) - { - lstrcpyA(p, eventsources[i - 1]); - p += (lstrlenA(eventsources[i - 1]) + 1); - } - lstrcpyA(p, eventlogname); - - ok(!memcmp(sources, sources_verify, size), - "Expected a correct 'Sources' value (size : %d)\n", size); - } - - RegCloseKey(eventkey); - RegCloseKey(key); - - /* The directory that holds the eventlog files could be redirected */ - if (pWow64DisableWow64FsRedirection) - pWow64DisableWow64FsRedirection(&redir); - - /* On Windows we also automatically get an eventlog file */ - GetSystemDirectoryA(sysdir, sizeof(sysdir)); - - /* NT4 - W2K3 */ - lstrcpyA(eventlogfile, sysdir); - lstrcatA(eventlogfile, "\\config\\"); - lstrcatA(eventlogfile, eventlogname); - lstrcatA(eventlogfile, ".evt"); - - if (GetFileAttributesA(eventlogfile) == INVALID_FILE_ATTRIBUTES) - { - /* Vista+ */ - lstrcpyA(eventlogfile, sysdir); - lstrcatA(eventlogfile, "\\winevt\\Logs\\"); - lstrcatA(eventlogfile, eventlogname); - lstrcatA(eventlogfile, ".evtx"); - } - - ok(GetFileAttributesA(eventlogfile) != INVALID_FILE_ATTRIBUTES, - "Expected an eventlog file\n"); - - if (pWow64RevertWow64FsRedirection) - pWow64RevertWow64FsRedirection(redir); -} - -static void cleanup_eventlog(void) -{ - BOOL bret; - LONG lret; - HKEY key; - DWORD i; - char winesvc[MAX_PATH]; - - /* Delete the registry tree */ - lstrcpyA(winesvc, eventlogsvc); - lstrcatA(winesvc, "\\"); - lstrcatA(winesvc, eventlogname); - - RegOpenKeyA(HKEY_LOCAL_MACHINE, winesvc, &key); - for (i = 0; i < sizeof(eventsources)/sizeof(eventsources[0]); i++) - RegDeleteKeyA(key, eventsources[i]); - RegDeleteValueA(key, "Sources"); - RegCloseKey(key); - lret = RegDeleteKeyA(HKEY_LOCAL_MACHINE, winesvc); - todo_wine - ok(lret == ERROR_SUCCESS, "Could not delete the registry tree : %d\n", lret); - - /* A handle to the eventlog is locked by services.exe. We can only - * delete the eventlog file after reboot. - */ - bret = MoveFileExA(eventlogfile, NULL, MOVEFILE_DELAY_UNTIL_REBOOT); - todo_wine - ok(bret, "Expected MoveFileEx to succeed: %d\n", GetLastError()); -} - -START_TEST(eventlog) -{ - SetLastError(0xdeadbeef); - CloseEventLog(NULL); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("Event log functions are not implemented\n"); - return; - } - - init_function_pointers(); - - /* Parameters only */ - test_open_close(); - test_info(); - test_count(); - test_oldest(); - test_backup(); - test_openbackup(); - test_read(); - test_clear(); - - /* Functional tests */ - if (create_new_eventlog()) - { - test_readwrite(); - test_autocreation(); - cleanup_eventlog(); - } -} diff --git a/rostests/winetests/advapi32/lsa.c b/rostests/winetests/advapi32/lsa.c deleted file mode 100644 index e5b84c7526e..00000000000 --- a/rostests/winetests/advapi32/lsa.c +++ /dev/null @@ -1,363 +0,0 @@ -/* - * Unit tests for lsa functions - * - * Copyright (c) 2006 Robert Reif - * - * 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 "ntstatus.h" -#define WIN32_NO_STATUS -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "ntsecapi.h" -#include "sddl.h" -#include "winnls.h" -#include "objbase.h" -#include "initguid.h" -#include "wine/test.h" - -DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); - -static HMODULE hadvapi32; -static NTSTATUS (WINAPI *pLsaClose)(LSA_HANDLE); -static NTSTATUS (WINAPI *pLsaEnumerateAccountRights)(LSA_HANDLE,PSID,PLSA_UNICODE_STRING*,PULONG); -static NTSTATUS (WINAPI *pLsaFreeMemory)(PVOID); -static NTSTATUS (WINAPI *pLsaOpenPolicy)(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,ACCESS_MASK,PLSA_HANDLE); -static NTSTATUS (WINAPI *pLsaQueryInformationPolicy)(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID*); -static BOOL (WINAPI *pConvertSidToStringSidA)(PSID,LPSTR*); -static NTSTATUS (WINAPI *pLsaLookupNames2)(LSA_HANDLE,ULONG,ULONG,PLSA_UNICODE_STRING,PLSA_REFERENCED_DOMAIN_LIST*,PLSA_TRANSLATED_SID2*); - -static BOOL init(void) -{ - hadvapi32 = GetModuleHandle("advapi32.dll"); - - pLsaClose = (void*)GetProcAddress(hadvapi32, "LsaClose"); - pLsaEnumerateAccountRights = (void*)GetProcAddress(hadvapi32, "LsaEnumerateAccountRights"); - pLsaFreeMemory = (void*)GetProcAddress(hadvapi32, "LsaFreeMemory"); - pLsaOpenPolicy = (void*)GetProcAddress(hadvapi32, "LsaOpenPolicy"); - pLsaQueryInformationPolicy = (void*)GetProcAddress(hadvapi32, "LsaQueryInformationPolicy"); - pConvertSidToStringSidA = (void*)GetProcAddress(hadvapi32, "ConvertSidToStringSidA"); - pLsaLookupNames2 = (void*)GetProcAddress(hadvapi32, "LsaLookupNames2"); - - if (pLsaClose && pLsaEnumerateAccountRights && pLsaFreeMemory && pLsaOpenPolicy && pLsaQueryInformationPolicy && pConvertSidToStringSidA) - return TRUE; - - return FALSE; -} - -static void test_lsa(void) -{ - NTSTATUS status; - LSA_HANDLE handle; - LSA_OBJECT_ATTRIBUTES object_attributes; - - ZeroMemory(&object_attributes, sizeof(object_attributes)); - object_attributes.Length = sizeof(object_attributes); - - status = pLsaOpenPolicy( NULL, &object_attributes, POLICY_ALL_ACCESS, &handle); - ok(status == STATUS_SUCCESS || status == STATUS_ACCESS_DENIED, - "LsaOpenPolicy(POLICY_ALL_ACCESS) returned 0x%08x\n", status); - - /* try a more restricted access mask if necessary */ - if (status == STATUS_ACCESS_DENIED) { - trace("LsaOpenPolicy(POLICY_ALL_ACCESS) failed, trying POLICY_VIEW_LOCAL_INFORMATION|POLICY_LOOKUP_NAMES\n"); - status = pLsaOpenPolicy( NULL, &object_attributes, POLICY_VIEW_LOCAL_INFORMATION|POLICY_LOOKUP_NAMES, &handle); - ok(status == STATUS_SUCCESS, "LsaOpenPolicy(POLICY_VIEW_LOCAL_INFORMATION|POLICY_LOOKUP_NAMES) returned 0x%08x\n", status); - } - - if (status == STATUS_SUCCESS) { - PPOLICY_AUDIT_EVENTS_INFO audit_events_info; - PPOLICY_PRIMARY_DOMAIN_INFO primary_domain_info; - PPOLICY_ACCOUNT_DOMAIN_INFO account_domain_info; - PPOLICY_DNS_DOMAIN_INFO dns_domain_info; - HANDLE token; - BOOL ret; - - status = pLsaQueryInformationPolicy(handle, PolicyAuditEventsInformation, (PVOID*)&audit_events_info); - if (status == STATUS_ACCESS_DENIED) - skip("Not enough rights to retrieve PolicyAuditEventsInformation\n"); - else - ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy(PolicyAuditEventsInformation) failed, returned 0x%08x\n", status); - if (status == STATUS_SUCCESS) { - pLsaFreeMemory((LPVOID)audit_events_info); - } - - status = pLsaQueryInformationPolicy(handle, PolicyPrimaryDomainInformation, (PVOID*)&primary_domain_info); - ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy(PolicyPrimaryDomainInformation) failed, returned 0x%08x\n", status); - if (status == STATUS_SUCCESS) { - if (primary_domain_info->Sid) { - LPSTR strsid; - if (pConvertSidToStringSidA(primary_domain_info->Sid, &strsid)) - { - if (primary_domain_info->Name.Buffer) { - LPSTR name = NULL; - UINT len; - len = WideCharToMultiByte( CP_ACP, 0, primary_domain_info->Name.Buffer, -1, NULL, 0, NULL, NULL ); - name = LocalAlloc( 0, len ); - WideCharToMultiByte( CP_ACP, 0, primary_domain_info->Name.Buffer, -1, name, len, NULL, NULL ); - trace(" name: %s sid: %s\n", name, strsid); - LocalFree( name ); - } else - trace(" name: NULL sid: %s\n", strsid); - LocalFree( strsid ); - } - else - trace("invalid sid\n"); - } - else - trace("Running on a standalone system.\n"); - pLsaFreeMemory((LPVOID)primary_domain_info); - } - - status = pLsaQueryInformationPolicy(handle, PolicyAccountDomainInformation, (PVOID*)&account_domain_info); - ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy(PolicyAccountDomainInformation) failed, returned 0x%08x\n", status); - if (status == STATUS_SUCCESS) { - pLsaFreeMemory((LPVOID)account_domain_info); - } - - /* This isn't supported in NT4 */ - status = pLsaQueryInformationPolicy(handle, PolicyDnsDomainInformation, (PVOID*)&dns_domain_info); - ok(status == STATUS_SUCCESS || status == STATUS_INVALID_PARAMETER, - "LsaQueryInformationPolicy(PolicyDnsDomainInformation) failed, returned 0x%08x\n", status); - if (status == STATUS_SUCCESS) { - if (dns_domain_info->Sid || !IsEqualGUID(&dns_domain_info->DomainGuid, &GUID_NULL)) { - LPSTR strsid = NULL; - LPSTR name = NULL; - LPSTR domain = NULL; - LPSTR forest = NULL; - LPSTR guidstr = NULL; - WCHAR guidstrW[64]; - UINT len; - guidstrW[0] = '\0'; - pConvertSidToStringSidA(dns_domain_info->Sid, &strsid); - StringFromGUID2(&dns_domain_info->DomainGuid, guidstrW, sizeof(guidstrW)/sizeof(WCHAR)); - len = WideCharToMultiByte( CP_ACP, 0, guidstrW, -1, NULL, 0, NULL, NULL ); - guidstr = LocalAlloc( 0, len ); - WideCharToMultiByte( CP_ACP, 0, guidstrW, -1, guidstr, len, NULL, NULL ); - if (dns_domain_info->Name.Buffer) { - len = WideCharToMultiByte( CP_ACP, 0, dns_domain_info->Name.Buffer, -1, NULL, 0, NULL, NULL ); - name = LocalAlloc( 0, len ); - WideCharToMultiByte( CP_ACP, 0, dns_domain_info->Name.Buffer, -1, name, len, NULL, NULL ); - } - if (dns_domain_info->DnsDomainName.Buffer) { - len = WideCharToMultiByte( CP_ACP, 0, dns_domain_info->DnsDomainName.Buffer, -1, NULL, 0, NULL, NULL ); - domain = LocalAlloc( 0, len ); - WideCharToMultiByte( CP_ACP, 0, dns_domain_info->DnsDomainName.Buffer, -1, domain, len, NULL, NULL ); - } - if (dns_domain_info->DnsForestName.Buffer) { - len = WideCharToMultiByte( CP_ACP, 0, dns_domain_info->DnsForestName.Buffer, -1, NULL, 0, NULL, NULL ); - forest = LocalAlloc( 0, len ); - WideCharToMultiByte( CP_ACP, 0, dns_domain_info->DnsForestName.Buffer, -1, forest, len, NULL, NULL ); - } - trace(" name: %s domain: %s forest: %s guid: %s sid: %s\n", - name ? name : "NULL", domain ? domain : "NULL", - forest ? forest : "NULL", guidstr, strsid ? strsid : "NULL"); - LocalFree( name ); - LocalFree( forest ); - LocalFree( domain ); - LocalFree( guidstr ); - LocalFree( strsid ); - } - else - trace("Running on a standalone system.\n"); - pLsaFreeMemory((LPVOID)dns_domain_info); - } - - /* We need a valid SID to pass to LsaEnumerateAccountRights */ - ret = OpenProcessToken( GetCurrentProcess(), TOKEN_QUERY, &token ); - ok(ret, "Unable to obtain process token, error %u\n", GetLastError( )); - if (ret) { - char buffer[64]; - DWORD len; - TOKEN_USER *token_user = (TOKEN_USER *) buffer; - ret = GetTokenInformation( token, TokenUser, (LPVOID) token_user, sizeof(buffer), &len ); - ok(ret || GetLastError( ) == ERROR_INSUFFICIENT_BUFFER, "Unable to obtain token information, error %u\n", GetLastError( )); - if (! ret && GetLastError( ) == ERROR_INSUFFICIENT_BUFFER) { - trace("Resizing buffer to %u.\n", len); - token_user = LocalAlloc( 0, len ); - if (token_user != NULL) - ret = GetTokenInformation( token, TokenUser, (LPVOID) token_user, len, &len ); - } - - if (ret) { - PLSA_UNICODE_STRING rights; - ULONG rights_count; - rights = (PLSA_UNICODE_STRING) 0xdeadbeaf; - rights_count = 0xcafecafe; - status = pLsaEnumerateAccountRights(handle, token_user->User.Sid, &rights, &rights_count); - ok(status == STATUS_SUCCESS || status == STATUS_OBJECT_NAME_NOT_FOUND, "Unexpected status 0x%x\n", status); - if (status == STATUS_SUCCESS) - pLsaFreeMemory( rights ); - else - ok(rights == NULL && rights_count == 0, "Expected rights and rights_count to be set to 0 on failure\n"); - } - if (token_user != NULL && token_user != (TOKEN_USER *) buffer) - LocalFree( token_user ); - CloseHandle( token ); - } - - status = pLsaClose(handle); - ok(status == STATUS_SUCCESS, "LsaClose() failed, returned 0x%08x\n", status); - } -} - -static void get_sid_info(PSID psid, LPSTR *user, LPSTR *dom) -{ - static char account[257], domain[257]; - DWORD user_size, dom_size; - SID_NAME_USE use; - BOOL ret; - - *user = account; - *dom = domain; - - user_size = dom_size = 257; - account[0] = domain[0] = 0; - ret = LookupAccountSidA(NULL, psid, account, &user_size, domain, &dom_size, &use); - ok(ret, "LookupAccountSidA failed %u\n", GetLastError()); -} - -static void test_LsaLookupNames2(void) -{ - static const WCHAR n1[] = {'L','O','C','A','L',' ','S','E','R','V','I','C','E'}; - static const WCHAR n2[] = {'N','T',' ','A','U','T','H','O','R','I','T','Y','\\','L','o','c','a','l','S','e','r','v','i','c','e'}; - - NTSTATUS status; - LSA_HANDLE handle; - LSA_OBJECT_ATTRIBUTES attrs; - PLSA_REFERENCED_DOMAIN_LIST domains; - PLSA_TRANSLATED_SID2 sids; - LSA_UNICODE_STRING name[3]; - LPSTR account, sid_dom; - - if (!pLsaLookupNames2) - { - win_skip("LsaLookupNames2 not available\n"); - return; - } - - if (PRIMARYLANGID(LANGIDFROMLCID(GetThreadLocale())) != LANG_ENGLISH) - { - skip("Non-English locale (skipping LsaLookupNames2 tests)\n"); - return; - } - - memset(&attrs, 0, sizeof(attrs)); - attrs.Length = sizeof(attrs); - - status = pLsaOpenPolicy(NULL, &attrs, POLICY_ALL_ACCESS, &handle); - ok(status == STATUS_SUCCESS || status == STATUS_ACCESS_DENIED, - "LsaOpenPolicy(POLICY_ALL_ACCESS) returned 0x%08x\n", status); - - /* try a more restricted access mask if necessary */ - if (status == STATUS_ACCESS_DENIED) - { - trace("LsaOpenPolicy(POLICY_ALL_ACCESS) failed, trying POLICY_VIEW_LOCAL_INFORMATION\n"); - status = pLsaOpenPolicy(NULL, &attrs, POLICY_LOOKUP_NAMES, &handle); - ok(status == STATUS_SUCCESS, "LsaOpenPolicy(POLICY_VIEW_LOCAL_INFORMATION) returned 0x%08x\n", status); - } - if (status != STATUS_SUCCESS) - { - skip("Cannot acquire policy handle\n"); - return; - } - - name[0].Buffer = HeapAlloc(GetProcessHeap(), 0, sizeof(n1)); - name[0].Length = name[0].MaximumLength = sizeof(n1); - memcpy(name[0].Buffer, n1, sizeof(n1)); - - name[1].Buffer = HeapAlloc(GetProcessHeap(), 0, sizeof(n1)); - name[1].Length = name[1].MaximumLength = sizeof(n1) - sizeof(WCHAR); - memcpy(name[1].Buffer, n1, sizeof(n1) - sizeof(WCHAR)); - - name[2].Buffer = HeapAlloc(GetProcessHeap(), 0, sizeof(n2)); - name[2].Length = name[2].MaximumLength = sizeof(n2); - memcpy(name[2].Buffer, n2, sizeof(n2)); - - /* account name only */ - sids = NULL; - domains = NULL; - status = pLsaLookupNames2(handle, 0, 1, &name[0], &domains, &sids); - ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %x)\n", status); - ok(sids[0].Use == SidTypeWellKnownGroup, "expected SidTypeWellKnownGroup, got %u\n", sids[0].Use); - ok(sids[0].Flags == 0, "expected 0, got 0x%08x\n", sids[0].Flags); - ok(domains->Entries == 1, "expected 1, got %u\n", domains->Entries); - get_sid_info(sids[0].Sid, &account, &sid_dom); - ok(!strcmp(account, "LOCAL SERVICE"), "expected \"LOCAL SERVICE\", got \"%s\"\n", account); - ok(!strcmp(sid_dom, "NT AUTHORITY"), "expected \"NT AUTHORITY\", got \"%s\"\n", sid_dom); - pLsaFreeMemory(sids); - pLsaFreeMemory(domains); - - /* unknown account name */ - sids = NULL; - domains = NULL; - status = pLsaLookupNames2(handle, 0, 1, &name[1], &domains, &sids); - ok(status == STATUS_NONE_MAPPED, "expected STATUS_NONE_MAPPED, got %x)\n", status); - ok(sids[0].Use == SidTypeUnknown, "expected SidTypeUnknown, got %u\n", sids[0].Use); - ok(sids[0].Flags == 0, "expected 0, got 0x%08x\n", sids[0].Flags); - ok(domains->Entries == 0, "expected 0, got %u\n", domains->Entries); - pLsaFreeMemory(sids); - pLsaFreeMemory(domains); - - /* account + domain */ - sids = NULL; - domains = NULL; - status = pLsaLookupNames2(handle, 0, 1, &name[2], &domains, &sids); - ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %x)\n", status); - ok(sids[0].Use == SidTypeWellKnownGroup, "expected SidTypeWellKnownGroup, got %u\n", sids[0].Use); - ok(sids[0].Flags == 0, "expected 0, got 0x%08x\n", sids[0].Flags); - ok(domains->Entries == 1, "expected 1, got %u\n", domains->Entries); - get_sid_info(sids[0].Sid, &account, &sid_dom); - ok(!strcmp(account, "LOCAL SERVICE"), "expected \"LOCAL SERVICE\", got \"%s\"\n", account); - ok(!strcmp(sid_dom, "NT AUTHORITY"), "expected \"NT AUTHORITY\", got \"%s\"\n", sid_dom); - pLsaFreeMemory(sids); - pLsaFreeMemory(domains); - - /* all three */ - sids = NULL; - domains = NULL; - status = pLsaLookupNames2(handle, 0, 3, name, &domains, &sids); - ok(status == STATUS_SOME_NOT_MAPPED, "expected STATUS_SOME_NOT_MAPPED, got %x)\n", status); - ok(sids[0].Use == SidTypeWellKnownGroup, "expected SidTypeWellKnownGroup, got %u\n", sids[0].Use); - ok(sids[1].Use == SidTypeUnknown, "expected SidTypeUnknown, got %u\n", sids[0].Use); - ok(sids[2].Use == SidTypeWellKnownGroup, "expected SidTypeWellKnownGroup, got %u\n", sids[0].Use); - ok(sids[0].DomainIndex == 0, "expected 0, got %u\n", sids[0].DomainIndex); - ok(domains->Entries == 1, "expected 1, got %u\n", domains->Entries); - pLsaFreeMemory(sids); - pLsaFreeMemory(domains); - - HeapFree(GetProcessHeap(), 0, name[0].Buffer); - HeapFree(GetProcessHeap(), 0, name[1].Buffer); - HeapFree(GetProcessHeap(), 0, name[2].Buffer); - - status = pLsaClose(handle); - ok(status == STATUS_SUCCESS, "LsaClose() failed, returned 0x%08x\n", status); -} - -START_TEST(lsa) -{ - if (!init()) { - win_skip("Needed functions are not available\n"); - return; - } - - test_lsa(); - test_LsaLookupNames2(); -} diff --git a/rostests/winetests/advapi32/registry.c b/rostests/winetests/advapi32/registry.c deleted file mode 100644 index 1021fc740d4..00000000000 --- a/rostests/winetests/advapi32/registry.c +++ /dev/null @@ -1,2431 +0,0 @@ -/* - * Unit tests for registry functions - * - * Copyright (c) 2002 Alexandre Julliard - * Copyright (c) 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 - * 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 "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winternl.h" -#include "winreg.h" -#include "winsvc.h" -#include "winerror.h" -#include "aclapi.h" - -static HKEY hkey_main; -static DWORD GLE; - -static const char * sTestpath1 = "%LONGSYSTEMVAR%\\subdir1"; -static const char * sTestpath2 = "%FOO%\\subdir1"; - -static DWORD (WINAPI *pRegGetValueA)(HKEY,LPCSTR,LPCSTR,DWORD,LPDWORD,PVOID,LPDWORD); -static DWORD (WINAPI *pRegDeleteTreeA)(HKEY,LPCSTR); -static DWORD (WINAPI *pRegDeleteKeyExA)(HKEY,LPCSTR,REGSAM,DWORD); -static BOOL (WINAPI *pIsWow64Process)(HANDLE,PBOOL); -static NTSTATUS (WINAPI * pNtDeleteKey)(HANDLE); -static NTSTATUS (WINAPI * pRtlFormatCurrentUserKeyPath)(UNICODE_STRING*); -static NTSTATUS (WINAPI * pRtlFreeUnicodeString)(PUNICODE_STRING); - - -/* Debugging functions from wine/libs/wine/debug.c */ - -/* allocate some tmp string space */ -/* FIXME: this is not 100% thread-safe */ -static char *get_temp_buffer( int size ) -{ - static char *list[32]; - static UINT pos; - char *ret; - UINT idx; - - idx = ++pos % (sizeof(list)/sizeof(list[0])); - if (list[idx]) - ret = HeapReAlloc( GetProcessHeap(), 0, list[idx], size ); - else - ret = HeapAlloc( GetProcessHeap(), 0, size ); - if (ret) list[idx] = ret; - return ret; -} - -static const char *wine_debugstr_an( const char *str, int n ) -{ - static const char hex[16] = "0123456789abcdef"; - char *dst, *res; - size_t size; - - if (!((ULONG_PTR)str >> 16)) - { - if (!str) return "(null)"; - res = get_temp_buffer( 6 ); - sprintf( res, "#%04x", LOWORD(str) ); - return res; - } - if (n == -1) n = strlen(str); - if (n < 0) n = 0; - size = 10 + min( 300, n * 4 ); - dst = res = get_temp_buffer( size ); - *dst++ = '"'; - while (n-- > 0 && dst <= res + size - 9) - { - unsigned char c = *str++; - switch (c) - { - case '\n': *dst++ = '\\'; *dst++ = 'n'; break; - case '\r': *dst++ = '\\'; *dst++ = 'r'; break; - case '\t': *dst++ = '\\'; *dst++ = 't'; break; - case '"': *dst++ = '\\'; *dst++ = '"'; break; - case '\\': *dst++ = '\\'; *dst++ = '\\'; break; - default: - if (c >= ' ' && c <= 126) - *dst++ = c; - else - { - *dst++ = '\\'; - *dst++ = 'x'; - *dst++ = hex[(c >> 4) & 0x0f]; - *dst++ = hex[c & 0x0f]; - } - } - } - *dst++ = '"'; - if (n > 0) - { - *dst++ = '.'; - *dst++ = '.'; - *dst++ = '.'; - } - *dst++ = 0; - return res; -} - -#define ADVAPI32_GET_PROC(func) \ - p ## func = (void*)GetProcAddress(hadvapi32, #func) - -static void InitFunctionPtrs(void) -{ - HMODULE hntdll = GetModuleHandleA("ntdll.dll"); - HMODULE hkernel32 = GetModuleHandleA("kernel32.dll"); - HMODULE hadvapi32 = GetModuleHandleA("advapi32.dll"); - - /* This function was introduced with Windows 2003 SP1 */ - ADVAPI32_GET_PROC(RegGetValueA); - ADVAPI32_GET_PROC(RegDeleteTreeA); - ADVAPI32_GET_PROC(RegDeleteKeyExA); - - pIsWow64Process = (void *)GetProcAddress( hkernel32, "IsWow64Process" ); - pRtlFormatCurrentUserKeyPath = (void *)GetProcAddress( hntdll, "RtlFormatCurrentUserKeyPath" ); - pRtlFreeUnicodeString = (void *)GetProcAddress(hntdll, "RtlFreeUnicodeString"); - pNtDeleteKey = (void *)GetProcAddress( hntdll, "NtDeleteKey" ); -} - -/* delete key and all its subkeys */ -static DWORD delete_key( HKEY hkey ) -{ - char name[MAX_PATH]; - DWORD ret; - - while (!(ret = RegEnumKeyA(hkey, 0, name, sizeof(name)))) - { - HKEY tmp; - if (!(ret = RegOpenKeyExA( hkey, name, 0, KEY_ENUMERATE_SUB_KEYS, &tmp ))) - { - ret = delete_key( tmp ); - RegCloseKey( tmp ); - } - if (ret) break; - } - if (ret != ERROR_NO_MORE_ITEMS) return ret; - RegDeleteKeyA( hkey, "" ); - return 0; -} - -static void setup_main_key(void) -{ - if (!RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\Test", &hkey_main )) delete_key( hkey_main ); - - assert (!RegCreateKeyA( HKEY_CURRENT_USER, "Software\\Wine\\Test", &hkey_main )); -} - -#define lok ok_(__FILE__, line) -#define test_hkey_main_Value_A(name, string, full_byte_len) _test_hkey_main_Value_A(__LINE__, name, string, full_byte_len) -static void _test_hkey_main_Value_A(int line, LPCSTR name, LPCSTR string, - DWORD full_byte_len) -{ - DWORD ret, type, cbData; - DWORD str_byte_len; - BYTE* value; - - type=0xdeadbeef; - cbData=0xdeadbeef; - /* When successful RegQueryValueExA() leaves GLE as is, - * so we must reset it to detect unimplemented functions. - */ - SetLastError(0xdeadbeef); - ret = RegQueryValueExA(hkey_main, name, NULL, &type, NULL, &cbData); - GLE = GetLastError(); - lok(ret == ERROR_SUCCESS, "RegQueryValueExA/1 failed: %d, GLE=%d\n", ret, GLE); - /* It is wrong for the Ansi version to not be implemented */ - ok(GLE == 0xdeadbeef, "RegQueryValueExA set GLE = %u\n", GLE); - if(GLE == ERROR_CALL_NOT_IMPLEMENTED) return; - - str_byte_len = (string ? lstrlenA(string) : 0) + 1; - lok(type == REG_SZ, "RegQueryValueExA/1 returned type %d\n", type); - lok(cbData == full_byte_len, "cbData=%d instead of %d or %d\n", cbData, full_byte_len, str_byte_len); - - value = HeapAlloc(GetProcessHeap(), 0, cbData+1); - memset(value, 0xbd, cbData+1); - type=0xdeadbeef; - ret = RegQueryValueExA(hkey_main, name, NULL, &type, value, &cbData); - GLE = GetLastError(); - lok(ret == ERROR_SUCCESS, "RegQueryValueExA/2 failed: %d, GLE=%d\n", ret, GLE); - if (!string) - { - /* When cbData == 0, RegQueryValueExA() should not modify the buffer */ - lok(*value == 0xbd, "RegQueryValueExA overflowed: cbData=%u *value=%02x\n", cbData, *value); - } - else - { - lok(memcmp(value, string, cbData) == 0, "RegQueryValueExA/2 failed: %s/%d != %s/%d\n", - wine_debugstr_an((char*)value, cbData), cbData, - wine_debugstr_an(string, full_byte_len), full_byte_len); - lok(*(value+cbData) == 0xbd, "RegQueryValueExA/2 overflowed at offset %u: %02x != bd\n", cbData, *(value+cbData)); - } - HeapFree(GetProcessHeap(), 0, value); -} - -#define test_hkey_main_Value_W(name, string, full_byte_len) _test_hkey_main_Value_W(__LINE__, name, string, full_byte_len) -static void _test_hkey_main_Value_W(int line, LPCWSTR name, LPCWSTR string, - DWORD full_byte_len) -{ - DWORD ret, type, cbData; - BYTE* value; - - type=0xdeadbeef; - cbData=0xdeadbeef; - /* When successful RegQueryValueExW() leaves GLE as is, - * so we must reset it to detect unimplemented functions. - */ - SetLastError(0xdeadbeef); - ret = RegQueryValueExW(hkey_main, name, NULL, &type, NULL, &cbData); - GLE = GetLastError(); - lok(ret == ERROR_SUCCESS, "RegQueryValueExW/1 failed: %d, GLE=%d\n", ret, GLE); - if(GLE == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("RegQueryValueExW() is not implemented\n"); - return; - } - - lok(type == REG_SZ, "RegQueryValueExW/1 returned type %d\n", type); - lok(cbData == full_byte_len, - "cbData=%d instead of %d\n", cbData, full_byte_len); - - /* Give enough space to overflow by one WCHAR */ - value = HeapAlloc(GetProcessHeap(), 0, cbData+2); - memset(value, 0xbd, cbData+2); - type=0xdeadbeef; - ret = RegQueryValueExW(hkey_main, name, NULL, &type, value, &cbData); - GLE = GetLastError(); - lok(ret == ERROR_SUCCESS, "RegQueryValueExW/2 failed: %d, GLE=%d\n", ret, GLE); - if (string) - { - lok(memcmp(value, string, cbData) == 0, "RegQueryValueExW failed: %s/%d != %s/%d\n", - wine_dbgstr_wn((WCHAR*)value, cbData / sizeof(WCHAR)), cbData, - wine_dbgstr_wn(string, full_byte_len / sizeof(WCHAR)), full_byte_len); - } - /* This implies that when cbData == 0, RegQueryValueExW() should not modify the buffer */ - lok(*(value+cbData) == 0xbd, "RegQueryValueExW/2 overflowed at %u: %02x != bd\n", cbData, *(value+cbData)); - lok(*(value+cbData+1) == 0xbd, "RegQueryValueExW/2 overflowed at %u+1: %02x != bd\n", cbData, *(value+cbData+1)); - HeapFree(GetProcessHeap(), 0, value); -} - -static void test_set_value(void) -{ - DWORD ret; - - static const WCHAR name1W[] = {'C','l','e','a','n','S','i','n','g','l','e','S','t','r','i','n','g', 0}; - static const WCHAR name2W[] = {'S','o','m','e','I','n','t','r','a','Z','e','r','o','e','d','S','t','r','i','n','g', 0}; - static const WCHAR emptyW[] = {0}; - static const WCHAR string1W[] = {'T','h','i','s','N','e','v','e','r','B','r','e','a','k','s', 0}; - static const WCHAR string2W[] = {'T','h','i','s', 0 ,'B','r','e','a','k','s', 0 , 0 ,'A', 0 , 0 , 0 , 'L','o','t', 0 , 0 , 0 , 0, 0}; - static const WCHAR substring2W[] = {'T','h','i','s',0}; - - static const char name1A[] = "CleanSingleString"; - static const char name2A[] = "SomeIntraZeroedString"; - static const char emptyA[] = ""; - static const char string1A[] = "ThisNeverBreaks"; - static const char string2A[] = "This\0Breaks\0\0A\0\0\0Lot\0\0\0\0"; - static const char substring2A[] = "This"; - - if (0) - { - /* Crashes on NT4, Windows 2000 and XP SP1 */ - ret = RegSetValueA(hkey_main, NULL, REG_SZ, NULL, 0); - ok(ret == ERROR_INVALID_PARAMETER, "RegSetValueA should have failed with ERROR_INVALID_PARAMETER instead of %d\n", ret); - } - - ret = RegSetValueA(hkey_main, NULL, REG_SZ, string1A, sizeof(string1A)); - ok(ret == ERROR_SUCCESS, "RegSetValueA failed: %d, GLE=%d\n", ret, GetLastError()); - test_hkey_main_Value_A(NULL, string1A, sizeof(string1A)); - test_hkey_main_Value_W(NULL, string1W, sizeof(string1W)); - - /* RegSetValueA ignores the size passed in */ - ret = RegSetValueA(hkey_main, NULL, REG_SZ, string1A, 4); - ok(ret == ERROR_SUCCESS, "RegSetValueA failed: %d, GLE=%d\n", ret, GetLastError()); - test_hkey_main_Value_A(NULL, string1A, sizeof(string1A)); - test_hkey_main_Value_W(NULL, string1W, sizeof(string1W)); - - /* stops at first null */ - ret = RegSetValueA(hkey_main, NULL, REG_SZ, string2A, sizeof(string2A)); - ok(ret == ERROR_SUCCESS, "RegSetValueA failed: %d, GLE=%d\n", ret, GetLastError()); - test_hkey_main_Value_A(NULL, substring2A, sizeof(substring2A)); - test_hkey_main_Value_W(NULL, substring2W, sizeof(substring2W)); - - /* only REG_SZ is supported on NT*/ - ret = RegSetValueA(hkey_main, NULL, REG_BINARY, string2A, sizeof(string2A)); - ok(ret == ERROR_INVALID_PARAMETER, "got %d (expected ERROR_INVALID_PARAMETER)\n", ret); - - ret = RegSetValueA(hkey_main, NULL, REG_EXPAND_SZ, string2A, sizeof(string2A)); - ok(ret == ERROR_INVALID_PARAMETER, "got %d (expected ERROR_INVALID_PARAMETER)\n", ret); - - ret = RegSetValueA(hkey_main, NULL, REG_MULTI_SZ, string2A, sizeof(string2A)); - ok(ret == ERROR_INVALID_PARAMETER, "got %d (expected ERROR_INVALID_PARAMETER)\n", ret); - - /* Test RegSetValueExA with a 'zero-byte' string (as Office 2003 does). - * Surprisingly enough we're supposed to get zero bytes out of it. - */ - ret = RegSetValueExA(hkey_main, name1A, 0, REG_SZ, (const BYTE *)emptyA, 0); - ok(ret == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%d\n", ret, GetLastError()); - test_hkey_main_Value_A(name1A, NULL, 0); - test_hkey_main_Value_W(name1W, NULL, 0); - - /* test RegSetValueExA with an empty string */ - ret = RegSetValueExA(hkey_main, name1A, 0, REG_SZ, (const BYTE *)emptyA, sizeof(emptyA)); - ok(ret == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%d\n", ret, GetLastError()); - test_hkey_main_Value_A(name1A, emptyA, sizeof(emptyA)); - test_hkey_main_Value_W(name1W, emptyW, sizeof(emptyW)); - - /* test RegSetValueExA with off-by-one size */ - ret = RegSetValueExA(hkey_main, name1A, 0, REG_SZ, (const BYTE *)string1A, sizeof(string1A)-sizeof(string1A[0])); - ok(ret == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%d\n", ret, GetLastError()); - test_hkey_main_Value_A(name1A, string1A, sizeof(string1A)); - test_hkey_main_Value_W(name1W, string1W, sizeof(string1W)); - - /* test RegSetValueExA with normal string */ - ret = RegSetValueExA(hkey_main, name1A, 0, REG_SZ, (const BYTE *)string1A, sizeof(string1A)); - ok(ret == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%d\n", ret, GetLastError()); - test_hkey_main_Value_A(name1A, string1A, sizeof(string1A)); - test_hkey_main_Value_W(name1W, string1W, sizeof(string1W)); - - /* test RegSetValueExA with intrazeroed string */ - ret = RegSetValueExA(hkey_main, name2A, 0, REG_SZ, (const BYTE *)string2A, sizeof(string2A)); - ok(ret == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%d\n", ret, GetLastError()); - test_hkey_main_Value_A(name2A, string2A, sizeof(string2A)); - test_hkey_main_Value_W(name2W, string2W, sizeof(string2W)); - - if (0) - { - /* Crashes on NT4, Windows 2000 and XP SP1 */ - ret = RegSetValueW(hkey_main, NULL, REG_SZ, NULL, 0); - ok(ret == ERROR_INVALID_PARAMETER, "RegSetValueW should have failed with ERROR_INVALID_PARAMETER instead of %d\n", ret); - } - - ret = RegSetValueW(hkey_main, NULL, REG_SZ, string1W, sizeof(string1W)); - ok(ret == ERROR_SUCCESS, "RegSetValueW failed: %d, GLE=%d\n", ret, GetLastError()); - test_hkey_main_Value_A(NULL, string1A, sizeof(string1A)); - test_hkey_main_Value_W(NULL, string1W, sizeof(string1W)); - - /* RegSetValueA ignores the size passed in */ - ret = RegSetValueW(hkey_main, NULL, REG_SZ, string1W, 4 * sizeof(string1W[0])); - ok(ret == ERROR_SUCCESS, "RegSetValueW failed: %d, GLE=%d\n", ret, GetLastError()); - test_hkey_main_Value_A(NULL, string1A, sizeof(string1A)); - test_hkey_main_Value_W(NULL, string1W, sizeof(string1W)); - - /* stops at first null */ - ret = RegSetValueW(hkey_main, NULL, REG_SZ, string2W, sizeof(string2W)); - ok(ret == ERROR_SUCCESS, "RegSetValueW failed: %d, GLE=%d\n", ret, GetLastError()); - test_hkey_main_Value_A(NULL, substring2A, sizeof(substring2A)); - test_hkey_main_Value_W(NULL, substring2W, sizeof(substring2W)); - - /* only REG_SZ is supported */ - ret = RegSetValueW(hkey_main, NULL, REG_BINARY, string2W, sizeof(string2W)); - ok(ret == ERROR_INVALID_PARAMETER, "RegSetValueW should have returned ERROR_INVALID_PARAMETER instead of %d\n", ret); - ret = RegSetValueW(hkey_main, NULL, REG_EXPAND_SZ, string2W, sizeof(string2W)); - ok(ret == ERROR_INVALID_PARAMETER, "RegSetValueW should have returned ERROR_INVALID_PARAMETER instead of %d\n", ret); - ret = RegSetValueW(hkey_main, NULL, REG_MULTI_SZ, string2W, sizeof(string2W)); - ok(ret == ERROR_INVALID_PARAMETER, "RegSetValueW should have returned ERROR_INVALID_PARAMETER instead of %d\n", ret); - - /* test RegSetValueExW with off-by-one size */ - ret = RegSetValueExW(hkey_main, name1W, 0, REG_SZ, (const BYTE *)string1W, sizeof(string1W)-sizeof(string1W[0])); - ok(ret == ERROR_SUCCESS, "RegSetValueExW failed: %d, GLE=%d\n", ret, GetLastError()); - test_hkey_main_Value_A(name1A, string1A, sizeof(string1A)); - test_hkey_main_Value_W(name1W, string1W, sizeof(string1W)); - - /* test RegSetValueExW with normal string */ - ret = RegSetValueExW(hkey_main, name1W, 0, REG_SZ, (const BYTE *)string1W, sizeof(string1W)); - ok(ret == ERROR_SUCCESS, "RegSetValueExW failed: %d, GLE=%d\n", ret, GetLastError()); - test_hkey_main_Value_A(name1A, string1A, sizeof(string1A)); - test_hkey_main_Value_W(name1W, string1W, sizeof(string1W)); - - /* test RegSetValueExW with intrazeroed string */ - ret = RegSetValueExW(hkey_main, name2W, 0, REG_SZ, (const BYTE *)string2W, sizeof(string2W)); - ok(ret == ERROR_SUCCESS, "RegSetValueExW failed: %d, GLE=%d\n", ret, GetLastError()); - test_hkey_main_Value_A(name2A, string2A, sizeof(string2A)); - test_hkey_main_Value_W(name2W, string2W, sizeof(string2W)); -} - -static void create_test_entries(void) -{ - static const DWORD qw[2] = { 0x12345678, 0x87654321 }; - - SetEnvironmentVariableA("LONGSYSTEMVAR", "bar"); - SetEnvironmentVariableA("FOO", "ImARatherLongButIndeedNeededString"); - - ok(!RegSetValueExA(hkey_main,"TP1_EXP_SZ",0,REG_EXPAND_SZ, (const BYTE *)sTestpath1, strlen(sTestpath1)+1), - "RegSetValueExA failed\n"); - ok(!RegSetValueExA(hkey_main,"TP1_SZ",0,REG_SZ, (const BYTE *)sTestpath1, strlen(sTestpath1)+1), - "RegSetValueExA failed\n"); - ok(!RegSetValueExA(hkey_main,"TP1_ZB_SZ",0,REG_SZ, (const BYTE *)"", 0), - "RegSetValueExA failed\n"); - ok(!RegSetValueExA(hkey_main,"TP2_EXP_SZ",0,REG_EXPAND_SZ, (const BYTE *)sTestpath2, strlen(sTestpath2)+1), - "RegSetValueExA failed\n"); - ok(!RegSetValueExA(hkey_main,"DWORD",0,REG_DWORD, (const BYTE *)qw, 4), - "RegSetValueExA failed\n"); - ok(!RegSetValueExA(hkey_main,"BIN32",0,REG_BINARY, (const BYTE *)qw, 4), - "RegSetValueExA failed\n"); - ok(!RegSetValueExA(hkey_main,"BIN64",0,REG_BINARY, (const BYTE *)qw, 8), - "RegSetValueExA failed\n"); -} - -static void test_enum_value(void) -{ - DWORD res; - HKEY test_key; - char value[20], data[20]; - WCHAR valueW[20], dataW[20]; - DWORD val_count, data_count, type; - static const WCHAR foobarW[] = {'f','o','o','b','a','r',0}; - static const WCHAR testW[] = {'T','e','s','t',0}; - static const WCHAR xxxW[] = {'x','x','x','x','x','x','x','x',0}; - - /* create the working key for new 'Test' value */ - res = RegCreateKeyA( hkey_main, "TestKey", &test_key ); - ok( res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", res); - - /* check NULL data with zero length */ - res = RegSetValueExA( test_key, "Test", 0, REG_SZ, NULL, 0 ); - if (GetVersion() & 0x80000000) - ok( res == ERROR_INVALID_PARAMETER, "RegSetValueExA returned %d\n", res ); - else - ok( !res, "RegSetValueExA returned %d\n", res ); - res = RegSetValueExA( test_key, "Test", 0, REG_EXPAND_SZ, NULL, 0 ); - ok( ERROR_SUCCESS == res || ERROR_INVALID_PARAMETER == res, "RegSetValueExA returned %d\n", res ); - res = RegSetValueExA( test_key, "Test", 0, REG_BINARY, NULL, 0 ); - ok( ERROR_SUCCESS == res || ERROR_INVALID_PARAMETER == res, "RegSetValueExA returned %d\n", res ); - - res = RegSetValueExA( test_key, "Test", 0, REG_SZ, (const BYTE *)"foobar", 7 ); - ok( res == 0, "RegSetValueExA failed error %d\n", res ); - - /* overflow both name and data */ - val_count = 2; - data_count = 2; - type = 1234; - strcpy( value, "xxxxxxxxxx" ); - strcpy( data, "xxxxxxxxxx" ); - res = RegEnumValueA( test_key, 0, value, &val_count, NULL, &type, (LPBYTE)data, &data_count ); - ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", res ); - ok( val_count == 2, "val_count set to %d\n", val_count ); - ok( data_count == 7 || broken( data_count == 8 ), "data_count set to %d instead of 7\n", data_count ); - ok( type == REG_SZ, "type %d is not REG_SZ\n", type ); - ok( !strcmp( value, "xxxxxxxxxx" ), "value set to '%s'\n", value ); - ok( !strcmp( data, "xxxxxxxxxx" ), "data set to '%s'\n", data ); - - /* overflow name */ - val_count = 3; - data_count = 20; - type = 1234; - strcpy( value, "xxxxxxxxxx" ); - strcpy( data, "xxxxxxxxxx" ); - res = RegEnumValueA( test_key, 0, value, &val_count, NULL, &type, (LPBYTE)data, &data_count ); - ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", res ); - ok( val_count == 3, "val_count set to %d\n", val_count ); - ok( data_count == 7 || broken( data_count == 8 ), "data_count set to %d instead of 7\n", data_count ); - ok( type == REG_SZ, "type %d is not REG_SZ\n", type ); - /* v5.1.2600.0 (XP Home and Professional) does not touch value or data in this case */ - ok( !strcmp( value, "Te" ) || !strcmp( value, "xxxxxxxxxx" ), - "value set to '%s' instead of 'Te' or 'xxxxxxxxxx'\n", value ); - ok( !strcmp( data, "foobar" ) || !strcmp( data, "xxxxxxx" ) || broken( !strcmp( data, "xxxxxxxx" ) && data_count == 8 ), - "data set to '%s' instead of 'foobar' or 'xxxxxxx'\n", data ); - - /* overflow empty name */ - val_count = 0; - data_count = 20; - type = 1234; - strcpy( value, "xxxxxxxxxx" ); - strcpy( data, "xxxxxxxxxx" ); - res = RegEnumValueA( test_key, 0, value, &val_count, NULL, &type, (LPBYTE)data, &data_count ); - ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", res ); - ok( val_count == 0, "val_count set to %d\n", val_count ); - ok( data_count == 7 || broken( data_count == 8 ), "data_count set to %d instead of 7\n", data_count ); - ok( type == REG_SZ, "type %d is not REG_SZ\n", type ); - ok( !strcmp( value, "xxxxxxxxxx" ), "value set to '%s'\n", value ); - /* v5.1.2600.0 (XP Home and Professional) does not touch data in this case */ - ok( !strcmp( data, "foobar" ) || !strcmp( data, "xxxxxxx" ) || broken( !strcmp( data, "xxxxxxxx" ) && data_count == 8 ), - "data set to '%s' instead of 'foobar' or 'xxxxxxx'\n", data ); - - /* overflow data */ - val_count = 20; - data_count = 2; - type = 1234; - strcpy( value, "xxxxxxxxxx" ); - strcpy( data, "xxxxxxxxxx" ); - res = RegEnumValueA( test_key, 0, value, &val_count, NULL, &type, (LPBYTE)data, &data_count ); - ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", res ); - ok( val_count == 20, "val_count set to %d\n", val_count ); - ok( data_count == 7, "data_count set to %d instead of 7\n", data_count ); - ok( type == REG_SZ, "type %d is not REG_SZ\n", type ); - ok( !strcmp( value, "xxxxxxxxxx" ), "value set to '%s'\n", value ); - ok( !strcmp( data, "xxxxxxxxxx" ), "data set to '%s'\n", data ); - - /* no overflow */ - val_count = 20; - data_count = 20; - type = 1234; - strcpy( value, "xxxxxxxxxx" ); - strcpy( data, "xxxxxxxxxx" ); - res = RegEnumValueA( test_key, 0, value, &val_count, NULL, &type, (LPBYTE)data, &data_count ); - ok( res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", res ); - ok( val_count == 4, "val_count set to %d instead of 4\n", val_count ); - ok( data_count == 7, "data_count set to %d instead of 7\n", data_count ); - ok( type == REG_SZ, "type %d is not REG_SZ\n", type ); - ok( !strcmp( value, "Test" ), "value is '%s' instead of Test\n", value ); - ok( !strcmp( data, "foobar" ), "data is '%s' instead of foobar\n", data ); - - /* Unicode tests */ - - SetLastError(0xdeadbeef); - res = RegSetValueExW( test_key, testW, 0, REG_SZ, (const BYTE *)foobarW, 7*sizeof(WCHAR) ); - if (res==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("RegSetValueExW is not implemented\n"); - goto cleanup; - } - ok( res == 0, "RegSetValueExW failed error %d\n", res ); - - /* overflow both name and data */ - val_count = 2; - data_count = 2; - type = 1234; - memcpy( valueW, xxxW, sizeof(xxxW) ); - memcpy( dataW, xxxW, sizeof(xxxW) ); - res = RegEnumValueW( test_key, 0, valueW, &val_count, NULL, &type, (BYTE*)dataW, &data_count ); - ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", res ); - ok( val_count == 2, "val_count set to %d\n", val_count ); - ok( data_count == 7*sizeof(WCHAR), "data_count set to %d instead of 7*sizeof(WCHAR)\n", data_count ); - ok( type == REG_SZ, "type %d is not REG_SZ\n", type ); - ok( !memcmp( valueW, xxxW, sizeof(xxxW) ), "value modified\n" ); - ok( !memcmp( dataW, xxxW, sizeof(xxxW) ), "data modified\n" ); - - /* overflow name */ - val_count = 3; - data_count = 20; - type = 1234; - memcpy( valueW, xxxW, sizeof(xxxW) ); - memcpy( dataW, xxxW, sizeof(xxxW) ); - res = RegEnumValueW( test_key, 0, valueW, &val_count, NULL, &type, (BYTE*)dataW, &data_count ); - ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", res ); - ok( val_count == 3, "val_count set to %d\n", val_count ); - ok( data_count == 7*sizeof(WCHAR), "data_count set to %d instead of 7*sizeof(WCHAR)\n", data_count ); - ok( type == REG_SZ, "type %d is not REG_SZ\n", type ); - ok( !memcmp( valueW, xxxW, sizeof(xxxW) ), "value modified\n" ); - ok( !memcmp( dataW, xxxW, sizeof(xxxW) ), "data modified\n" ); - - /* overflow data */ - val_count = 20; - data_count = 2; - type = 1234; - memcpy( valueW, xxxW, sizeof(xxxW) ); - memcpy( dataW, xxxW, sizeof(xxxW) ); - res = RegEnumValueW( test_key, 0, valueW, &val_count, NULL, &type, (BYTE*)dataW, &data_count ); - ok( res == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", res ); - ok( val_count == 4, "val_count set to %d instead of 4\n", val_count ); - ok( data_count == 7*sizeof(WCHAR), "data_count set to %d instead of 7*sizeof(WCHAR)\n", data_count ); - ok( type == REG_SZ, "type %d is not REG_SZ\n", type ); - ok( !memcmp( valueW, testW, sizeof(testW) ), "value is not 'Test'\n" ); - ok( !memcmp( dataW, xxxW, sizeof(xxxW) ), "data modified\n" ); - - /* no overflow */ - val_count = 20; - data_count = 20; - type = 1234; - memcpy( valueW, xxxW, sizeof(xxxW) ); - memcpy( dataW, xxxW, sizeof(xxxW) ); - res = RegEnumValueW( test_key, 0, valueW, &val_count, NULL, &type, (BYTE*)dataW, &data_count ); - ok( res == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", res ); - ok( val_count == 4, "val_count set to %d instead of 4\n", val_count ); - ok( data_count == 7*sizeof(WCHAR), "data_count set to %d instead of 7*sizeof(WCHAR)\n", data_count ); - ok( type == REG_SZ, "type %d is not REG_SZ\n", type ); - ok( !memcmp( valueW, testW, sizeof(testW) ), "value is not 'Test'\n" ); - ok( !memcmp( dataW, foobarW, sizeof(foobarW) ), "data is not 'foobar'\n" ); - -cleanup: - RegDeleteKeyA(test_key, ""); - RegCloseKey(test_key); -} - -static void test_query_value_ex(void) -{ - DWORD ret; - DWORD size; - DWORD type; - BYTE buffer[10]; - - ret = RegQueryValueExA(hkey_main, "TP1_SZ", NULL, &type, NULL, &size); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); - ok(size == strlen(sTestpath1) + 1, "(%d,%d)\n", (DWORD)strlen(sTestpath1) + 1, size); - ok(type == REG_SZ, "type %d is not REG_SZ\n", type); - - type = 0xdeadbeef; - size = 0xdeadbeef; - ret = RegQueryValueExA(HKEY_CLASSES_ROOT, "Nonexistent Value", NULL, &type, NULL, &size); - ok(ret == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %d\n", ret); - ok(size == 0, "size should have been set to 0 instead of %d\n", size); - - size = sizeof(buffer); - ret = RegQueryValueExA(HKEY_CLASSES_ROOT, "Nonexistent Value", NULL, &type, buffer, &size); - ok(ret == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %d\n", ret); - ok(size == sizeof(buffer), "size shouldn't have been changed to %d\n", size); - - size = 4; - ret = RegQueryValueExA(hkey_main, "BIN32", NULL, &size, buffer, &size); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); -} - -static void test_get_value(void) -{ - DWORD ret; - DWORD size; - DWORD type; - DWORD dw, qw[2]; - CHAR buf[80]; - CHAR expanded[] = "bar\\subdir1"; - CHAR expanded2[] = "ImARatherLongButIndeedNeededString\\subdir1"; - - if(!pRegGetValueA) - { - win_skip("RegGetValue not available on this platform\n"); - return; - } - - /* Invalid parameter */ - ret = pRegGetValueA(hkey_main, NULL, "DWORD", RRF_RT_REG_DWORD, &type, &dw, NULL); - ok(ret == ERROR_INVALID_PARAMETER, "ret=%d\n", ret); - - /* Query REG_DWORD using RRF_RT_REG_DWORD (ok) */ - size = type = dw = 0xdeadbeef; - ret = pRegGetValueA(hkey_main, NULL, "DWORD", RRF_RT_REG_DWORD, &type, &dw, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); - ok(size == 4, "size=%d\n", size); - ok(type == REG_DWORD, "type=%d\n", type); - ok(dw == 0x12345678, "dw=%d\n", dw); - - /* Query by subkey-name */ - ret = pRegGetValueA(HKEY_CURRENT_USER, "Software\\Wine\\Test", "DWORD", RRF_RT_REG_DWORD, NULL, NULL, NULL); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); - - /* Query REG_DWORD using RRF_RT_REG_BINARY (restricted) */ - size = type = dw = 0xdeadbeef; - ret = pRegGetValueA(hkey_main, NULL, "DWORD", RRF_RT_REG_BINARY, &type, &dw, &size); - ok(ret == ERROR_UNSUPPORTED_TYPE, "ret=%d\n", ret); - /* Although the function failed all values are retrieved */ - ok(size == 4, "size=%d\n", size); - ok(type == REG_DWORD, "type=%d\n", type); - ok(dw == 0x12345678, "dw=%d\n", dw); - - /* Test RRF_ZEROONFAILURE */ - type = dw = 0xdeadbeef; size = 4; - ret = pRegGetValueA(hkey_main, NULL, "DWORD", RRF_RT_REG_SZ|RRF_ZEROONFAILURE, &type, &dw, &size); - ok(ret == ERROR_UNSUPPORTED_TYPE, "ret=%d\n", ret); - /* Again all values are retrieved ... */ - ok(size == 4, "size=%d\n", size); - ok(type == REG_DWORD, "type=%d\n", type); - /* ... except the buffer, which is zeroed out */ - ok(dw == 0, "dw=%d\n", dw); - - /* Test RRF_ZEROONFAILURE with a NULL buffer... */ - type = size = 0xbadbeef; - ret = pRegGetValueA(hkey_main, NULL, "DWORD", RRF_RT_REG_SZ|RRF_ZEROONFAILURE, &type, NULL, &size); - ok(ret == ERROR_UNSUPPORTED_TYPE, "ret=%d\n", ret); - ok(size == 4, "size=%d\n", size); - ok(type == REG_DWORD, "type=%d\n", type); - - /* Query REG_DWORD using RRF_RT_DWORD (ok) */ - size = type = dw = 0xdeadbeef; - ret = pRegGetValueA(hkey_main, NULL, "DWORD", RRF_RT_DWORD, &type, &dw, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); - ok(size == 4, "size=%d\n", size); - ok(type == REG_DWORD, "type=%d\n", type); - ok(dw == 0x12345678, "dw=%d\n", dw); - - /* Query 32-bit REG_BINARY using RRF_RT_DWORD (ok) */ - size = type = dw = 0xdeadbeef; - ret = pRegGetValueA(hkey_main, NULL, "BIN32", RRF_RT_DWORD, &type, &dw, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); - ok(size == 4, "size=%d\n", size); - ok(type == REG_BINARY, "type=%d\n", type); - ok(dw == 0x12345678, "dw=%d\n", dw); - - /* Query 64-bit REG_BINARY using RRF_RT_DWORD (type mismatch) */ - qw[0] = qw[1] = size = type = 0xdeadbeef; - ret = pRegGetValueA(hkey_main, NULL, "BIN64", RRF_RT_DWORD, &type, qw, &size); - ok(ret == ERROR_DATATYPE_MISMATCH, "ret=%d\n", ret); - ok(size == 8, "size=%d\n", size); - ok(type == REG_BINARY, "type=%d\n", type); - ok(qw[0] == 0x12345678 && - qw[1] == 0x87654321, "qw={%d,%d}\n", qw[0], qw[1]); - - /* Query 64-bit REG_BINARY using 32-bit buffer (buffer too small) */ - type = dw = 0xdeadbeef; size = 4; - ret = pRegGetValueA(hkey_main, NULL, "BIN64", RRF_RT_REG_BINARY, &type, &dw, &size); - ok(ret == ERROR_MORE_DATA, "ret=%d\n", ret); - ok(dw == 0xdeadbeef, "dw=%d\n", dw); - ok(size == 8, "size=%d\n", size); - - /* Query 64-bit REG_BINARY using RRF_RT_QWORD (ok) */ - qw[0] = qw[1] = size = type = 0xdeadbeef; - ret = pRegGetValueA(hkey_main, NULL, "BIN64", RRF_RT_QWORD, &type, qw, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); - ok(size == 8, "size=%d\n", size); - ok(type == REG_BINARY, "type=%d\n", type); - ok(qw[0] == 0x12345678 && - qw[1] == 0x87654321, "qw={%d,%d}\n", qw[0], qw[1]); - - /* Query REG_SZ using RRF_RT_REG_SZ (ok) */ - buf[0] = 0; type = 0xdeadbeef; size = sizeof(buf); - ret = pRegGetValueA(hkey_main, NULL, "TP1_SZ", RRF_RT_REG_SZ, &type, buf, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); - ok(size == strlen(sTestpath1)+1, "strlen(sTestpath1)=%d size=%d\n", lstrlenA(sTestpath1), size); - ok(type == REG_SZ, "type=%d\n", type); - ok(!strcmp(sTestpath1, buf), "sTestpath=\"%s\" buf=\"%s\"\n", sTestpath1, buf); - - /* Query REG_SZ using RRF_RT_REG_SZ and no buffer (ok) */ - type = 0xdeadbeef; size = 0; - ret = pRegGetValueA(hkey_main, NULL, "TP1_SZ", RRF_RT_REG_SZ, &type, NULL, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); - /* v5.2.3790.1830 (2003 SP1) returns sTestpath1 length + 2 here. */ - ok(size == strlen(sTestpath1)+1 || broken(size == strlen(sTestpath1)+2), - "strlen(sTestpath1)=%d size=%d\n", lstrlenA(sTestpath1), size); - ok(type == REG_SZ, "type=%d\n", type); - - /* Query REG_SZ using RRF_RT_REG_SZ on a zero-byte value (ok) */ - strcpy(buf, sTestpath1); - type = 0xdeadbeef; - size = sizeof(buf); - ret = pRegGetValueA(hkey_main, NULL, "TP1_ZB_SZ", RRF_RT_REG_SZ, &type, buf, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); - /* v5.2.3790.1830 (2003 SP1) returns sTestpath1 length + 2 here. */ - ok(size == 0 || - size == 1, /* win2k3 */ - "size=%d\n", size); - ok(type == REG_SZ, "type=%d\n", type); - ok(!strcmp(sTestpath1, buf) || - !strcmp(buf, ""), - "Expected \"%s\" or \"\", got \"%s\"\n", sTestpath1, buf); - - /* Query REG_SZ using RRF_RT_REG_SZ|RRF_NOEXPAND (ok) */ - buf[0] = 0; type = 0xdeadbeef; size = sizeof(buf); - ret = pRegGetValueA(hkey_main, NULL, "TP1_SZ", RRF_RT_REG_SZ|RRF_NOEXPAND, &type, buf, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); - ok(size == strlen(sTestpath1)+1, "strlen(sTestpath1)=%d size=%d\n", lstrlenA(sTestpath1), size); - ok(type == REG_SZ, "type=%d\n", type); - ok(!strcmp(sTestpath1, buf), "sTestpath=\"%s\" buf=\"%s\"\n", sTestpath1, buf); - - /* Query REG_EXPAND_SZ using RRF_RT_REG_SZ and no buffer (ok, expands) */ - size = 0; - ret = pRegGetValueA(hkey_main, NULL, "TP2_EXP_SZ", RRF_RT_REG_SZ, NULL, NULL, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); - ok((size == strlen(expanded2)+1) || /* win2k3 SP1 */ - (size == strlen(expanded2)+2) || /* win2k3 SP2 */ - (size == strlen(sTestpath2)+1), - "strlen(expanded2)=%d, strlen(sTestpath2)=%d, size=%d\n", lstrlenA(expanded2), lstrlenA(sTestpath2), size); - - /* Query REG_EXPAND_SZ using RRF_RT_REG_SZ (ok, expands) */ - buf[0] = 0; type = 0xdeadbeef; size = sizeof(buf); - ret = pRegGetValueA(hkey_main, NULL, "TP1_EXP_SZ", RRF_RT_REG_SZ, &type, buf, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); - /* At least v5.2.3790.1830 (2003 SP1) returns the unexpanded sTestpath1 length + 1 here. */ - ok(size == strlen(expanded)+1 || broken(size == strlen(sTestpath1)+1), - "strlen(expanded)=%d, strlen(sTestpath1)=%d, size=%d\n", lstrlenA(expanded), lstrlenA(sTestpath1), size); - ok(type == REG_SZ, "type=%d\n", type); - ok(!strcmp(expanded, buf), "expanded=\"%s\" buf=\"%s\"\n", expanded, buf); - - /* Query REG_EXPAND_SZ using RRF_RT_REG_SZ (ok, expands a lot) */ - buf[0] = 0; type = 0xdeadbeef; size = sizeof(buf); - ret = pRegGetValueA(hkey_main, NULL, "TP2_EXP_SZ", RRF_RT_REG_SZ, &type, buf, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); - /* At least v5.2.3790.1830 (2003 SP1) returns the unexpanded sTestpath2 length + 1 here. */ - ok(size == strlen(expanded2)+1 || broken(size == strlen(sTestpath2)+1), - "strlen(expanded2)=%d, strlen(sTestpath1)=%d, size=%d\n", lstrlenA(expanded2), lstrlenA(sTestpath2), size); - ok(type == REG_SZ, "type=%d\n", type); - ok(!strcmp(expanded2, buf), "expanded2=\"%s\" buf=\"%s\"\n", expanded2, buf); - - /* Query REG_EXPAND_SZ using RRF_RT_REG_EXPAND_SZ|RRF_NOEXPAND (ok, doesn't expand) */ - buf[0] = 0; type = 0xdeadbeef; size = sizeof(buf); - ret = pRegGetValueA(hkey_main, NULL, "TP1_EXP_SZ", RRF_RT_REG_EXPAND_SZ|RRF_NOEXPAND, &type, buf, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); - ok(size == strlen(sTestpath1)+1, "strlen(sTestpath1)=%d size=%d\n", lstrlenA(sTestpath1), size); - ok(type == REG_EXPAND_SZ, "type=%d\n", type); - ok(!strcmp(sTestpath1, buf), "sTestpath=\"%s\" buf=\"%s\"\n", sTestpath1, buf); - - /* Query REG_EXPAND_SZ using RRF_RT_REG_EXPAND_SZ|RRF_NOEXPAND and no buffer (ok, doesn't expand) */ - size = 0xbadbeef; - ret = pRegGetValueA(hkey_main, NULL, "TP1_EXP_SZ", RRF_RT_REG_EXPAND_SZ|RRF_NOEXPAND, NULL, NULL, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); - /* v5.2.3790.1830 (2003 SP1) returns sTestpath1 length + 2 here. */ - ok(size == strlen(sTestpath1)+1 || broken(size == strlen(sTestpath1)+2), - "strlen(sTestpath1)=%d size=%d\n", lstrlenA(sTestpath1), size); - - /* Query REG_EXPAND_SZ using RRF_RT_REG_SZ|RRF_NOEXPAND (type mismatch) */ - ret = pRegGetValueA(hkey_main, NULL, "TP1_EXP_SZ", RRF_RT_REG_SZ|RRF_NOEXPAND, NULL, NULL, NULL); - ok(ret == ERROR_UNSUPPORTED_TYPE, "ret=%d\n", ret); - - /* Query REG_EXPAND_SZ using RRF_RT_REG_EXPAND_SZ (not allowed without RRF_NOEXPAND) */ - ret = pRegGetValueA(hkey_main, NULL, "TP1_EXP_SZ", RRF_RT_REG_EXPAND_SZ, NULL, NULL, NULL); - ok(ret == ERROR_INVALID_PARAMETER, "ret=%d\n", ret); - - /* Query REG_EXPAND_SZ using RRF_RT_ANY */ - buf[0] = 0; type = 0xdeadbeef; size = sizeof(buf); - ret = pRegGetValueA(hkey_main, NULL, "TP1_EXP_SZ", RRF_RT_ANY, &type, buf, &size); - ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); - /* At least v5.2.3790.1830 (2003 SP1) returns the unexpanded sTestpath1 length + 1 here. */ - ok(size == strlen(expanded)+1 || broken(size == strlen(sTestpath1)+1), - "strlen(expanded)=%d, strlen(sTestpath1)=%d, size=%d\n", lstrlenA(expanded), lstrlenA(sTestpath1), size); - ok(type == REG_SZ, "type=%d\n", type); - ok(!strcmp(expanded, buf), "expanded=\"%s\" buf=\"%s\"\n", expanded, buf); -} - -static void test_reg_open_key(void) -{ - DWORD ret = 0; - HKEY hkResult = NULL; - HKEY hkPreserve = NULL; - HKEY hkRoot64 = NULL; - HKEY hkRoot32 = NULL; - BOOL bRet; - SID_IDENTIFIER_AUTHORITY sid_authority = {SECURITY_WORLD_SID_AUTHORITY}; - PSID world_sid; - EXPLICIT_ACCESSA access; - PACL key_acl; - SECURITY_DESCRIPTOR *sd; - - /* successful open */ - ret = RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Test", &hkResult); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); - ok(hkResult != NULL, "expected hkResult != NULL\n"); - hkPreserve = hkResult; - - /* open same key twice */ - ret = RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Test", &hkResult); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); - ok(hkResult != hkPreserve, "expected hkResult != hkPreserve\n"); - ok(hkResult != NULL, "hkResult != NULL\n"); - RegCloseKey(hkResult); - - /* open nonexistent key - * check that hkResult is set to NULL - */ - hkResult = hkPreserve; - ret = RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Nonexistent", &hkResult); - ok(ret == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %d\n", ret); - ok(hkResult == NULL, "expected hkResult == NULL\n"); - - /* open the same nonexistent key again to make sure the key wasn't created */ - hkResult = hkPreserve; - ret = RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Nonexistent", &hkResult); - ok(ret == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %d\n", ret); - ok(hkResult == NULL, "expected hkResult == NULL\n"); - - /* send in NULL lpSubKey - * check that hkResult receives the value of hKey - */ - hkResult = hkPreserve; - ret = RegOpenKeyA(HKEY_CURRENT_USER, NULL, &hkResult); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); - ok(hkResult == HKEY_CURRENT_USER, "expected hkResult == HKEY_CURRENT_USER\n"); - - /* send empty-string in lpSubKey */ - hkResult = hkPreserve; - ret = RegOpenKeyA(HKEY_CURRENT_USER, "", &hkResult); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); - ok(hkResult == HKEY_CURRENT_USER, "expected hkResult == HKEY_CURRENT_USER\n"); - - /* send in NULL lpSubKey and NULL hKey - * hkResult is set to NULL - */ - hkResult = hkPreserve; - ret = RegOpenKeyA(NULL, NULL, &hkResult); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); - ok(hkResult == NULL, "expected hkResult == NULL\n"); - - /* only send NULL hKey - * the value of hkResult remains unchanged - */ - hkResult = hkPreserve; - ret = RegOpenKeyA(NULL, "Software\\Wine\\Test", &hkResult); - ok(ret == ERROR_INVALID_HANDLE || ret == ERROR_BADKEY, /* Windows 95 returns BADKEY */ - "expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got %d\n", ret); - ok(hkResult == hkPreserve, "expected hkResult == hkPreserve\n"); - RegCloseKey(hkResult); - - /* send in NULL hkResult */ - ret = RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Test", NULL); - ok(ret == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", ret); - - ret = RegOpenKeyA(HKEY_CURRENT_USER, NULL, NULL); - ok(ret == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", ret); - - ret = RegOpenKeyA(NULL, NULL, NULL); - ok(ret == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", ret); - - /* beginning backslash character */ - ret = RegOpenKeyA(HKEY_CURRENT_USER, "\\Software\\Wine\\Test", &hkResult); - ok(ret == ERROR_BAD_PATHNAME || /* NT/2k/XP */ - broken(ret == ERROR_SUCCESS), /* wow64 */ - "expected ERROR_BAD_PATHNAME or ERROR_FILE_NOT_FOUND, got %d\n", ret); - if (!ret) RegCloseKey(hkResult); - - hkResult = NULL; - ret = RegOpenKeyExA(HKEY_CLASSES_ROOT, "\\clsid", 0, KEY_QUERY_VALUE, &hkResult); - ok(ret == ERROR_SUCCESS || /* 2k/XP */ - ret == ERROR_BAD_PATHNAME, /* NT */ - "expected ERROR_SUCCESS, ERROR_BAD_PATHNAME or ERROR_FILE_NOT_FOUND, got %d\n", ret); - RegCloseKey(hkResult); - - /* WOW64 flags */ - hkResult = NULL; - ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software", 0, KEY_READ|KEY_WOW64_32KEY, &hkResult); - ok((ret == ERROR_SUCCESS && hkResult != NULL) || broken(ret == ERROR_ACCESS_DENIED /* NT4, win2k */), - "RegOpenKeyEx with KEY_WOW64_32KEY failed (err=%u)\n", ret); - RegCloseKey(hkResult); - - hkResult = NULL; - ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software", 0, KEY_READ|KEY_WOW64_64KEY, &hkResult); - ok((ret == ERROR_SUCCESS && hkResult != NULL) || broken(ret == ERROR_ACCESS_DENIED /* NT4, win2k */), - "RegOpenKeyEx with KEY_WOW64_64KEY failed (err=%u)\n", ret); - RegCloseKey(hkResult); - - /* Try using WOW64 flags when opening a key with a DACL set to verify that - * the registry access check is performed correctly. Redirection isn't - * being tested, so the tests don't care about whether the process is - * running under WOW64. */ - if (!pIsWow64Process) - { - win_skip("WOW64 flags are not recognized\n"); - return; - } - - ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software\\Wine", 0, NULL, 0, - KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &hkRoot32, NULL); - ok(ret == ERROR_SUCCESS && hkRoot32 != NULL, - "RegCreateKeyEx with KEY_WOW64_32KEY failed (err=%u)\n", ret); - - ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software\\Wine", 0, NULL, 0, - KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &hkRoot64, NULL); - ok(ret == ERROR_SUCCESS && hkRoot64 != NULL, - "RegCreateKeyEx with KEY_WOW64_64KEY failed (err=%u)\n", ret); - - bRet = AllocateAndInitializeSid(&sid_authority, 1, SECURITY_WORLD_RID, - 0, 0, 0, 0, 0, 0, 0, &world_sid); - ok(bRet == TRUE, - "Expected AllocateAndInitializeSid to return TRUE, got %d, last error %u\n", bRet, GetLastError()); - - access.grfAccessPermissions = GENERIC_ALL | STANDARD_RIGHTS_ALL; - access.grfAccessMode = SET_ACCESS; - access.grfInheritance = SUB_CONTAINERS_AND_OBJECTS_INHERIT; - access.Trustee.pMultipleTrustee = NULL; - access.Trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE; - access.Trustee.TrusteeForm = TRUSTEE_IS_SID; - access.Trustee.TrusteeType = TRUSTEE_IS_WELL_KNOWN_GROUP; - access.Trustee.ptstrName = (char *)world_sid; - - ret = SetEntriesInAclA(1, &access, NULL, &key_acl); - ok(ret == ERROR_SUCCESS, - "Expected SetEntriesInAclA to return ERROR_SUCCESS, got %u, last error %u\n", ret, GetLastError()); - - sd = HeapAlloc(GetProcessHeap(), 0, SECURITY_DESCRIPTOR_MIN_LENGTH); - bRet = InitializeSecurityDescriptor(sd, SECURITY_DESCRIPTOR_REVISION); - ok(bRet == TRUE, - "Expected InitializeSecurityDescriptor to return TRUE, got %d, last error %u\n", bRet, GetLastError()); - - bRet = SetSecurityDescriptorDacl(sd, TRUE, key_acl, FALSE); - ok(bRet == TRUE, - "Expected SetSecurityDescriptorDacl to return TRUE, got %d, last error %u\n", bRet, GetLastError()); - - /* The "sanctioned" methods of setting a registry ACL aren't implemented in Wine. */ - bRet = SetKernelObjectSecurity(hkRoot64, DACL_SECURITY_INFORMATION, sd); - ok(bRet == TRUE, - "Expected SetKernelObjectSecurity to return TRUE, got %d, last error %u\n", bRet, GetLastError()); - - bRet = SetKernelObjectSecurity(hkRoot32, DACL_SECURITY_INFORMATION, sd); - ok(bRet == TRUE, - "Expected SetKernelObjectSecurity to return TRUE, got %d, last error %u\n", bRet, GetLastError()); - - hkResult = NULL; - ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Wine", 0, KEY_WOW64_64KEY | KEY_READ, &hkResult); - ok(ret == ERROR_SUCCESS && hkResult != NULL, - "RegOpenKeyEx with KEY_WOW64_64KEY failed (err=%u)\n", ret); - RegCloseKey(hkResult); - - hkResult = NULL; - ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Wine", 0, KEY_WOW64_32KEY | KEY_READ, &hkResult); - ok(ret == ERROR_SUCCESS && hkResult != NULL, - "RegOpenKeyEx with KEY_WOW64_32KEY failed (err=%u)\n", ret); - RegCloseKey(hkResult); - - HeapFree(GetProcessHeap(), 0, sd); - LocalFree(key_acl); - FreeSid(world_sid); - RegDeleteKeyA(hkRoot64, ""); - RegCloseKey(hkRoot64); - RegDeleteKeyA(hkRoot32, ""); - RegCloseKey(hkRoot32); -} - -static void test_reg_create_key(void) -{ - LONG ret; - HKEY hkey1, hkey2; - HKEY hkRoot64 = NULL; - HKEY hkRoot32 = NULL; - DWORD dwRet; - BOOL bRet; - SID_IDENTIFIER_AUTHORITY sid_authority = {SECURITY_WORLD_SID_AUTHORITY}; - PSID world_sid; - EXPLICIT_ACCESSA access; - PACL key_acl; - SECURITY_DESCRIPTOR *sd; - - ret = RegCreateKeyExA(hkey_main, "Subkey1", 0, NULL, 0, KEY_NOTIFY, NULL, &hkey1, NULL); - ok(!ret, "RegCreateKeyExA failed with error %d\n", ret); - /* should succeed: all versions of Windows ignore the access rights - * to the parent handle */ - ret = RegCreateKeyExA(hkey1, "Subkey2", 0, NULL, 0, KEY_SET_VALUE, NULL, &hkey2, NULL); - ok(!ret, "RegCreateKeyExA failed with error %d\n", ret); - - /* clean up */ - RegDeleteKey(hkey2, ""); - RegDeleteKey(hkey1, ""); - RegCloseKey(hkey2); - RegCloseKey(hkey1); - - /* test creation of volatile keys */ - ret = RegCreateKeyExA(hkey_main, "Volatile", 0, NULL, REG_OPTION_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey1, NULL); - ok(!ret, "RegCreateKeyExA failed with error %d\n", ret); - ret = RegCreateKeyExA(hkey1, "Subkey2", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hkey2, NULL); - ok(ret == ERROR_CHILD_MUST_BE_VOLATILE, "RegCreateKeyExA failed with error %d\n", ret); - if (!ret) RegCloseKey( hkey2 ); - ret = RegCreateKeyExA(hkey1, "Subkey2", 0, NULL, REG_OPTION_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey2, NULL); - ok(!ret, "RegCreateKeyExA failed with error %d\n", ret); - RegCloseKey(hkey2); - /* should succeed if the key already exists */ - ret = RegCreateKeyExA(hkey1, "Subkey2", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hkey2, NULL); - ok(!ret, "RegCreateKeyExA failed with error %d\n", ret); - - /* clean up */ - RegDeleteKey(hkey2, ""); - RegDeleteKey(hkey1, ""); - RegCloseKey(hkey2); - RegCloseKey(hkey1); - - /* beginning backslash character */ - ret = RegCreateKeyExA(hkey_main, "\\Subkey3", 0, NULL, 0, KEY_NOTIFY, NULL, &hkey1, NULL); - if (!(GetVersion() & 0x80000000)) - ok(ret == ERROR_BAD_PATHNAME, "expected ERROR_BAD_PATHNAME, got %d\n", ret); - else { - ok(!ret, "RegCreateKeyExA failed with error %d\n", ret); - RegDeleteKey(hkey1, NULL); - RegCloseKey(hkey1); - } - - /* WOW64 flags - open an existing key */ - hkey1 = NULL; - ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, KEY_READ|KEY_WOW64_32KEY, NULL, &hkey1, NULL); - ok((ret == ERROR_SUCCESS && hkey1 != NULL) || broken(ret == ERROR_ACCESS_DENIED /* NT4, win2k */), - "RegOpenKeyEx with KEY_WOW64_32KEY failed (err=%u)\n", ret); - RegCloseKey(hkey1); - - hkey1 = NULL; - ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, KEY_READ|KEY_WOW64_64KEY, NULL, &hkey1, NULL); - ok((ret == ERROR_SUCCESS && hkey1 != NULL) || broken(ret == ERROR_ACCESS_DENIED /* NT4, win2k */), - "RegOpenKeyEx with KEY_WOW64_64KEY failed (err=%u)\n", ret); - RegCloseKey(hkey1); - - /* Try using WOW64 flags when opening a key with a DACL set to verify that - * the registry access check is performed correctly. Redirection isn't - * being tested, so the tests don't care about whether the process is - * running under WOW64. */ - if (!pIsWow64Process) - { - win_skip("WOW64 flags are not recognized\n"); - return; - } - - ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software\\Wine", 0, NULL, 0, - KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &hkRoot32, NULL); - ok(ret == ERROR_SUCCESS && hkRoot32 != NULL, - "RegCreateKeyEx with KEY_WOW64_32KEY failed (err=%d)\n", ret); - - ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software\\Wine", 0, NULL, 0, - KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &hkRoot64, NULL); - ok(ret == ERROR_SUCCESS && hkRoot64 != NULL, - "RegCreateKeyEx with KEY_WOW64_64KEY failed (err=%d)\n", ret); - - bRet = AllocateAndInitializeSid(&sid_authority, 1, SECURITY_WORLD_RID, - 0, 0, 0, 0, 0, 0, 0, &world_sid); - ok(bRet == TRUE, - "Expected AllocateAndInitializeSid to return TRUE, got %d, last error %u\n", bRet, GetLastError()); - - access.grfAccessPermissions = GENERIC_ALL | STANDARD_RIGHTS_ALL; - access.grfAccessMode = SET_ACCESS; - access.grfInheritance = SUB_CONTAINERS_AND_OBJECTS_INHERIT; - access.Trustee.pMultipleTrustee = NULL; - access.Trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE; - access.Trustee.TrusteeForm = TRUSTEE_IS_SID; - access.Trustee.TrusteeType = TRUSTEE_IS_WELL_KNOWN_GROUP; - access.Trustee.ptstrName = (char *)world_sid; - - dwRet = SetEntriesInAclA(1, &access, NULL, &key_acl); - ok(ret == ERROR_SUCCESS, - "Expected SetEntriesInAclA to return ERROR_SUCCESS, got %u, last error %u\n", dwRet, GetLastError()); - - sd = HeapAlloc(GetProcessHeap(), 0, SECURITY_DESCRIPTOR_MIN_LENGTH); - bRet = InitializeSecurityDescriptor(sd, SECURITY_DESCRIPTOR_REVISION); - ok(bRet == TRUE, - "Expected InitializeSecurityDescriptor to return TRUE, got %d, last error %u\n", bRet, GetLastError()); - - bRet = SetSecurityDescriptorDacl(sd, TRUE, key_acl, FALSE); - ok(bRet == TRUE, - "Expected SetSecurityDescriptorDacl to return TRUE, got %d, last error %u\n", bRet, GetLastError()); - - /* The "sanctioned" methods of setting a registry ACL aren't implemented in Wine. */ - bRet = SetKernelObjectSecurity(hkRoot64, DACL_SECURITY_INFORMATION, sd); - ok(bRet == TRUE, - "Expected SetKernelObjectSecurity to return TRUE, got %d, last error %u\n", bRet, GetLastError()); - - bRet = SetKernelObjectSecurity(hkRoot32, DACL_SECURITY_INFORMATION, sd); - ok(bRet == TRUE, - "Expected SetKernelObjectSecurity to return TRUE, got %d, last error %u\n", bRet, GetLastError()); - - hkey1 = NULL; - ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software\\Wine", 0, NULL, 0, - KEY_WOW64_64KEY | KEY_READ, NULL, &hkey1, NULL); - ok(ret == ERROR_SUCCESS && hkey1 != NULL, - "RegOpenKeyEx with KEY_WOW64_64KEY failed (err=%u)\n", ret); - RegCloseKey(hkey1); - - hkey1 = NULL; - ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software\\Wine", 0, NULL, 0, - KEY_WOW64_32KEY | KEY_READ, NULL, &hkey1, NULL); - ok(ret == ERROR_SUCCESS && hkey1 != NULL, - "RegOpenKeyEx with KEY_WOW64_32KEY failed (err=%u)\n", ret); - RegCloseKey(hkey1); - - HeapFree(GetProcessHeap(), 0, sd); - LocalFree(key_acl); - FreeSid(world_sid); - RegDeleteKeyA(hkRoot64, ""); - RegCloseKey(hkRoot64); - RegDeleteKeyA(hkRoot32, ""); - RegCloseKey(hkRoot32); -} - -static void test_reg_close_key(void) -{ - DWORD ret = 0; - HKEY hkHandle; - - /* successfully close key - * hkHandle remains changed after call to RegCloseKey - */ - ret = RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Test", &hkHandle); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); - ret = RegCloseKey(hkHandle); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); - - /* try to close the key twice */ - ret = RegCloseKey(hkHandle); /* Windows 95 doesn't mind. */ - ok(ret == ERROR_INVALID_HANDLE || ret == ERROR_SUCCESS, - "expected ERROR_INVALID_HANDLE or ERROR_SUCCESS, got %d\n", ret); - - /* try to close a NULL handle */ - ret = RegCloseKey(NULL); - ok(ret == ERROR_INVALID_HANDLE || ret == ERROR_BADKEY, /* Windows 95 returns BADKEY */ - "expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got %d\n", ret); - - /* Check to see if we didn't potentially close our main handle, which could happen on win98 as - * win98 doesn't give a new handle when the same key is opened. - * Not re-opening will make some next tests fail. - */ - if (hkey_main == hkHandle) - { - trace("The main handle is most likely closed, so re-opening\n"); - RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\Test", &hkey_main ); - } -} - -static void test_reg_delete_key(void) -{ - DWORD ret; - - ret = RegDeleteKey(hkey_main, NULL); - - /* There is a bug in NT4 and W2K that doesn't check if the subkey is NULL. If - * there are also no subkeys available it will delete the key pointed to by hkey_main. - * Not re-creating will make some next tests fail. - */ - if (ret == ERROR_SUCCESS) - { - trace("We are probably running on NT4 or W2K as the main key is deleted," - " re-creating the main key\n"); - setup_main_key(); - } - else - ok(ret == ERROR_INVALID_PARAMETER || - ret == ERROR_ACCESS_DENIED || - ret == ERROR_BADKEY, /* Win95 */ - "ret=%d\n", ret); -} - -static void test_reg_save_key(void) -{ - DWORD ret; - - ret = RegSaveKey(hkey_main, "saved_key", NULL); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); -} - -static void test_reg_load_key(void) -{ - DWORD ret; - HKEY hkHandle; - - ret = RegLoadKey(HKEY_LOCAL_MACHINE, "Test", "saved_key"); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); - - ret = RegOpenKey(HKEY_LOCAL_MACHINE, "Test", &hkHandle); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); - - RegCloseKey(hkHandle); -} - -static void test_reg_unload_key(void) -{ - DWORD ret; - - ret = RegUnLoadKey(HKEY_LOCAL_MACHINE, "Test"); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); - - DeleteFile("saved_key"); - DeleteFile("saved_key.LOG"); -} - -static BOOL set_privileges(LPCSTR privilege, BOOL set) -{ - TOKEN_PRIVILEGES tp; - HANDLE hToken; - LUID luid; - - if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken)) - return FALSE; - - if(!LookupPrivilegeValue(NULL, privilege, &luid)) - { - CloseHandle(hToken); - return FALSE; - } - - tp.PrivilegeCount = 1; - tp.Privileges[0].Luid = luid; - - if (set) - tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; - else - tp.Privileges[0].Attributes = 0; - - AdjustTokenPrivileges(hToken, FALSE, &tp, sizeof(TOKEN_PRIVILEGES), NULL, NULL); - if (GetLastError() != ERROR_SUCCESS) - { - CloseHandle(hToken); - return FALSE; - } - - CloseHandle(hToken); - return TRUE; -} - -/* tests that show that RegConnectRegistry and - OpenSCManager accept computer names without the - \\ prefix (what MSDN says). */ -static void test_regconnectregistry( void) -{ - CHAR compName[MAX_COMPUTERNAME_LENGTH + 1]; - CHAR netwName[MAX_COMPUTERNAME_LENGTH + 3]; /* 2 chars for double backslash */ - DWORD len = sizeof(compName) ; - BOOL ret; - LONG retl; - HKEY hkey; - SC_HANDLE schnd; - - SetLastError(0xdeadbeef); - ret = GetComputerNameA(compName, &len); - ok( ret, "GetComputerName failed err = %d\n", GetLastError()); - if( !ret) return; - - lstrcpyA(netwName, "\\\\"); - lstrcpynA(netwName+2, compName, MAX_COMPUTERNAME_LENGTH + 1); - - retl = RegConnectRegistryA( compName, HKEY_LOCAL_MACHINE, &hkey); - ok( !retl || - retl == ERROR_DLL_INIT_FAILED || - retl == ERROR_BAD_NETPATH, /* some win2k */ - "RegConnectRegistryA failed err = %d\n", retl); - if( !retl) RegCloseKey( hkey); - - retl = RegConnectRegistryA( netwName, HKEY_LOCAL_MACHINE, &hkey); - ok( !retl || - retl == ERROR_DLL_INIT_FAILED || - retl == ERROR_BAD_NETPATH, /* some win2k */ - "RegConnectRegistryA failed err = %d\n", retl); - if( !retl) RegCloseKey( hkey); - - SetLastError(0xdeadbeef); - schnd = OpenSCManagerA( compName, NULL, GENERIC_READ); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("OpenSCManagerA is not implemented\n"); - return; - } - - ok( schnd != NULL, "OpenSCManagerA failed err = %d\n", GetLastError()); - CloseServiceHandle( schnd); - - SetLastError(0xdeadbeef); - schnd = OpenSCManagerA( netwName, NULL, GENERIC_READ); - ok( schnd != NULL, "OpenSCManagerA failed err = %d\n", GetLastError()); - CloseServiceHandle( schnd); - -} - -static void test_reg_query_value(void) -{ - HKEY subkey; - CHAR val[MAX_PATH]; - WCHAR valW[5]; - LONG size, ret; - - static const WCHAR expected[] = {'d','a','t','a',0}; - - ret = RegCreateKeyA(hkey_main, "subkey", &subkey); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - - ret = RegSetValueA(subkey, NULL, REG_SZ, "data", 4); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - - /* try an invalid hkey */ - SetLastError(0xdeadbeef); - size = MAX_PATH; - ret = RegQueryValueA((HKEY)0xcafebabe, "subkey", val, &size); - ok(ret == ERROR_INVALID_HANDLE || - ret == ERROR_BADKEY || /* Windows 98 returns BADKEY */ - ret == ERROR_ACCESS_DENIED, /* non-admin winxp */ - "Expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); - - /* try a NULL hkey */ - SetLastError(0xdeadbeef); - size = MAX_PATH; - ret = RegQueryValueA(NULL, "subkey", val, &size); - ok(ret == ERROR_INVALID_HANDLE || ret == ERROR_BADKEY, /* Windows 98 returns BADKEY */ - "Expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); - - /* try a NULL value */ - size = MAX_PATH; - ret = RegQueryValueA(hkey_main, "subkey", NULL, &size); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ok(size == 5, "Expected 5, got %d\n", size); - - /* try a NULL size */ - SetLastError(0xdeadbeef); - val[0] = '\0'; - ret = RegQueryValueA(hkey_main, "subkey", val, NULL); - ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); - ok(lstrlenA(val) == 0, "Expected val to be untouched, got %s\n", val); - - /* try a NULL value and size */ - ret = RegQueryValueA(hkey_main, "subkey", NULL, NULL); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - - /* try a size too small */ - SetLastError(0xdeadbeef); - val[0] = '\0'; - size = 1; - ret = RegQueryValueA(hkey_main, "subkey", val, &size); - ok(ret == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); - ok(lstrlenA(val) == 0, "Expected val to be untouched, got %s\n", val); - ok(size == 5, "Expected 5, got %d\n", size); - - /* successfully read the value using 'subkey' */ - size = MAX_PATH; - ret = RegQueryValueA(hkey_main, "subkey", val, &size); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ok(!lstrcmpA(val, "data"), "Expected 'data', got '%s'\n", val); - ok(size == 5, "Expected 5, got %d\n", size); - - /* successfully read the value using the subkey key */ - size = MAX_PATH; - ret = RegQueryValueA(subkey, NULL, val, &size); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ok(!lstrcmpA(val, "data"), "Expected 'data', got '%s'\n", val); - ok(size == 5, "Expected 5, got %d\n", size); - - /* unicode - try size too small */ - SetLastError(0xdeadbeef); - valW[0] = '\0'; - size = 0; - ret = RegQueryValueW(subkey, NULL, valW, &size); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("RegQueryValueW is not implemented\n"); - goto cleanup; - } - ok(ret == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); - ok(lstrlenW(valW) == 0, "Expected valW to be untouched\n"); - ok(size == sizeof(expected), "Got wrong size: %d\n", size); - - /* unicode - try size in WCHARS */ - SetLastError(0xdeadbeef); - size = sizeof(valW) / sizeof(WCHAR); - ret = RegQueryValueW(subkey, NULL, valW, &size); - ok(ret == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); - ok(lstrlenW(valW) == 0, "Expected valW to be untouched\n"); - ok(size == sizeof(expected), "Got wrong size: %d\n", size); - - /* unicode - successfully read the value */ - size = sizeof(valW); - ret = RegQueryValueW(subkey, NULL, valW, &size); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ok(!lstrcmpW(valW, expected), "Got wrong value\n"); - ok(size == sizeof(expected), "Got wrong size: %d\n", size); - - /* unicode - set the value without a NULL terminator */ - ret = RegSetValueW(subkey, NULL, REG_SZ, expected, sizeof(expected)-sizeof(WCHAR)); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - - /* unicode - read the unterminated value, value is terminated for us */ - memset(valW, 'a', sizeof(valW)); - size = sizeof(valW); - ret = RegQueryValueW(subkey, NULL, valW, &size); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ok(!lstrcmpW(valW, expected), "Got wrong value\n"); - ok(size == sizeof(expected), "Got wrong size: %d\n", size); - -cleanup: - RegDeleteKeyA(subkey, ""); - RegCloseKey(subkey); -} - -static void test_string_termination(void) -{ - HKEY subkey; - LSTATUS ret; - static const char string[] = "FullString"; - char name[11]; - BYTE buffer[11]; - DWORD insize, outsize, nsize; - - ret = RegCreateKeyA(hkey_main, "string_termination", &subkey); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - - /* Off-by-one RegSetValueExA -> adds a trailing '\0'! */ - insize=sizeof(string)-1; - ret = RegSetValueExA(subkey, "stringtest", 0, REG_SZ, (BYTE*)string, insize); - ok(ret == ERROR_SUCCESS, "RegSetValueExA failed: %d\n", ret); - outsize=insize; - ret = RegQueryValueExA(subkey, "stringtest", NULL, NULL, buffer, &outsize); - ok(ret == ERROR_MORE_DATA, "RegQueryValueExA returned: %d\n", ret); - - /* Off-by-two RegSetValueExA -> no trailing '\0' */ - insize=sizeof(string)-2; - ret = RegSetValueExA(subkey, "stringtest", 0, REG_SZ, (BYTE*)string, insize); - ok(ret == ERROR_SUCCESS, "RegSetValueExA failed: %d\n", ret); - outsize=0; - ret = RegQueryValueExA(subkey, "stringtest", NULL, NULL, NULL, &outsize); - ok(ret == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", ret); - ok(outsize == insize, "wrong size %u != %u\n", outsize, insize); - - /* RegQueryValueExA may return a string with no trailing '\0' */ - outsize=insize; - memset(buffer, 0xbd, sizeof(buffer)); - ret = RegQueryValueExA(subkey, "stringtest", NULL, NULL, buffer, &outsize); - ok(ret == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", ret); - ok(outsize == insize, "wrong size: %u != %u\n", outsize, insize); - ok(memcmp(buffer, string, outsize) == 0, "bad string: %s/%u != %s\n", - wine_debugstr_an((char*)buffer, outsize), outsize, string); - ok(buffer[insize] == 0xbd, "buffer overflow at %u %02x\n", insize, buffer[insize]); - - /* RegQueryValueExA adds a trailing '\0' if there is room */ - outsize=insize+1; - memset(buffer, 0xbd, sizeof(buffer)); - ret = RegQueryValueExA(subkey, "stringtest", NULL, NULL, buffer, &outsize); - ok(ret == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", ret); - ok(outsize == insize, "wrong size: %u != %u\n", outsize, insize); - ok(memcmp(buffer, string, outsize) == 0, "bad string: %s/%u != %s\n", - wine_debugstr_an((char*)buffer, outsize), outsize, string); - ok(buffer[insize] == 0, "buffer overflow at %u %02x\n", insize, buffer[insize]); - - /* RegEnumValueA may return a string with no trailing '\0' */ - outsize=insize; - memset(buffer, 0xbd, sizeof(buffer)); - nsize=sizeof(name); - ret = RegEnumValueA(subkey, 0, name, &nsize, NULL, NULL, buffer, &outsize); - ok(ret == ERROR_SUCCESS, "RegEnumValueA failed: %d\n", ret); - ok(strcmp(name, "stringtest") == 0, "wrong name: %s\n", name); - ok(outsize == insize, "wrong size: %u != %u\n", outsize, insize); - ok(memcmp(buffer, string, outsize) == 0, "bad string: %s/%u != %s\n", - wine_debugstr_an((char*)buffer, outsize), outsize, string); - ok(buffer[insize] == 0xbd, "buffer overflow at %u %02x\n", insize, buffer[insize]); - - /* RegEnumValueA adds a trailing '\0' if there is room */ - outsize=insize+1; - memset(buffer, 0xbd, sizeof(buffer)); - nsize=sizeof(name); - ret = RegEnumValueA(subkey, 0, name, &nsize, NULL, NULL, buffer, &outsize); - ok(ret == ERROR_SUCCESS, "RegEnumValueA failed: %d\n", ret); - ok(strcmp(name, "stringtest") == 0, "wrong name: %s\n", name); - ok(outsize == insize, "wrong size: %u != %u\n", outsize, insize); - ok(memcmp(buffer, string, outsize) == 0, "bad string: %s/%u != %s\n", - wine_debugstr_an((char*)buffer, outsize), outsize, string); - ok(buffer[insize] == 0, "buffer overflow at %u %02x\n", insize, buffer[insize]); - - RegDeleteKeyA(subkey, ""); - RegCloseKey(subkey); -} - -static void test_reg_delete_tree(void) -{ - CHAR buffer[MAX_PATH]; - HKEY subkey, subkey2; - LONG size, ret; - - if(!pRegDeleteTreeA) { - win_skip("Skipping RegDeleteTreeA tests, function not present\n"); - return; - } - - ret = RegCreateKeyA(hkey_main, "subkey", &subkey); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ret = RegCreateKeyA(subkey, "subkey2", &subkey2); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ret = RegSetValueA(subkey, NULL, REG_SZ, "data", 4); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ret = RegSetValueA(subkey2, NULL, REG_SZ, "data2", 5); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ret = RegCloseKey(subkey2); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - - ret = pRegDeleteTreeA(subkey, "subkey2"); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ok(RegOpenKeyA(subkey, "subkey2", &subkey2), - "subkey2 was not deleted\n"); - size = MAX_PATH; - ok(!RegQueryValueA(subkey, NULL, buffer, &size), - "Default value of subkey not longer present\n"); - - ret = RegCreateKeyA(subkey, "subkey2", &subkey2); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ret = RegCloseKey(subkey2); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ret = pRegDeleteTreeA(hkey_main, "subkey\\subkey2"); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ok(RegOpenKeyA(subkey, "subkey2", &subkey2), - "subkey2 was not deleted\n"); - ok(!RegQueryValueA(subkey, NULL, buffer, &size), - "Default value of subkey not longer present\n"); - - ret = RegCreateKeyA(subkey, "subkey2", &subkey2); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ret = RegCloseKey(subkey2); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ret = RegCreateKeyA(subkey, "subkey3", &subkey2); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ret = RegCloseKey(subkey2); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ret = RegSetValueA(subkey, "value", REG_SZ, "data2", 5); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ret = pRegDeleteTreeA(subkey, NULL); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ok(!RegOpenKeyA(hkey_main, "subkey", &subkey), - "subkey was deleted\n"); - ok(RegOpenKeyA(subkey, "subkey2", &subkey2), - "subkey2 was not deleted\n"); - ok(RegOpenKeyA(subkey, "subkey3", &subkey2), - "subkey3 was not deleted\n"); - size = MAX_PATH; - ret = RegQueryValueA(subkey, NULL, buffer, &size); - ok(ret == ERROR_SUCCESS, - "Default value of subkey is not present\n"); - ok(!lstrlenA(buffer), - "Expected length 0 got length %u(%s)\n", lstrlenA(buffer), buffer); - size = MAX_PATH; - ok(RegQueryValueA(subkey, "value", buffer, &size), - "Value is still present\n"); - - ret = pRegDeleteTreeA(hkey_main, "not-here"); - ok(ret == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", ret); -} - -static void test_rw_order(void) -{ - HKEY hKey; - DWORD dw = 0; - static char keyname[] = "test_rw_order"; - char value_buf[2]; - DWORD values, value_len, value_name_max_len; - LSTATUS ret; - - RegDeleteKeyA(HKEY_CURRENT_USER, keyname); - ret = RegCreateKeyA(HKEY_CURRENT_USER, keyname, &hKey); - if(ret != ERROR_SUCCESS) { - skip("Couldn't create key. Skipping.\n"); - return; - } - - ok(!RegSetValueExA(hKey, "A", 0, REG_DWORD, (LPBYTE)&dw, sizeof(dw)), - "RegSetValueExA for value \"A\" failed\n"); - ok(!RegSetValueExA(hKey, "C", 0, REG_DWORD, (LPBYTE)&dw, sizeof(dw)), - "RegSetValueExA for value \"C\" failed\n"); - ok(!RegSetValueExA(hKey, "D", 0, REG_DWORD, (LPBYTE)&dw, sizeof(dw)), - "RegSetValueExA for value \"D\" failed\n"); - ok(!RegSetValueExA(hKey, "B", 0, REG_DWORD, (LPBYTE)&dw, sizeof(dw)), - "RegSetValueExA for value \"B\" failed\n"); - - ok(!RegQueryInfoKeyA(hKey, NULL, NULL, NULL, NULL, NULL, NULL, &values, - &value_name_max_len, NULL, NULL, NULL), "RegQueryInfoKeyA failed\n"); - ok(values == 4, "Expected 4 values, got %u\n", values); - - /* Value enumeration preserves RegSetValueEx call order */ - value_len = 2; - ok(!RegEnumValueA(hKey, 0, value_buf, &value_len, NULL, NULL, NULL, NULL), "RegEnumValueA failed\n"); - ok(strcmp(value_buf, "A") == 0, "Expected name \"A\", got %s\n", value_buf); - value_len = 2; - ok(!RegEnumValueA(hKey, 1, value_buf, &value_len, NULL, NULL, NULL, NULL), "RegEnumValueA failed\n"); - todo_wine ok(strcmp(value_buf, "C") == 0, "Expected name \"C\", got %s\n", value_buf); - value_len = 2; - ok(!RegEnumValueA(hKey, 2, value_buf, &value_len, NULL, NULL, NULL, NULL), "RegEnumValueA failed\n"); - todo_wine ok(strcmp(value_buf, "D") == 0, "Expected name \"D\", got %s\n", value_buf); - value_len = 2; - ok(!RegEnumValueA(hKey, 3, value_buf, &value_len, NULL, NULL, NULL, NULL), "RegEnumValueA failed\n"); - todo_wine ok(strcmp(value_buf, "B") == 0, "Expected name \"B\", got %s\n", value_buf); - - ok(!RegDeleteKey(HKEY_CURRENT_USER, keyname), "Failed to delete key\n"); -} - -static void test_symlinks(void) -{ - static const WCHAR targetW[] = {'\\','S','o','f','t','w','a','r','e','\\','W','i','n','e', - '\\','T','e','s','t','\\','t','a','r','g','e','t',0}; - BYTE buffer[1024]; - UNICODE_STRING target_str; - WCHAR *target; - HKEY key, link; - NTSTATUS status; - DWORD target_len, type, len, dw, err; - - if (!pRtlFormatCurrentUserKeyPath || !pNtDeleteKey) - { - win_skip( "Can't perform symlink tests\n" ); - return; - } - - pRtlFormatCurrentUserKeyPath( &target_str ); - - target_len = target_str.Length + sizeof(targetW); - target = HeapAlloc( GetProcessHeap(), 0, target_len ); - memcpy( target, target_str.Buffer, target_str.Length ); - memcpy( target + target_str.Length/sizeof(WCHAR), targetW, sizeof(targetW) ); - - err = RegCreateKeyExA( hkey_main, "link", 0, NULL, REG_OPTION_CREATE_LINK, - KEY_ALL_ACCESS, NULL, &link, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyEx failed: %u\n", err ); - - /* REG_SZ is not allowed */ - err = RegSetValueExA( link, "SymbolicLinkValue", 0, REG_SZ, (BYTE *)"foobar", sizeof("foobar") ); - ok( err == ERROR_ACCESS_DENIED, "RegSetValueEx wrong error %u\n", err ); - err = RegSetValueExA( link, "SymbolicLinkValue", 0, REG_LINK, - (BYTE *)target, target_len - sizeof(WCHAR) ); - ok( err == ERROR_SUCCESS, "RegSetValueEx failed error %u\n", err ); - /* other values are not allowed */ - err = RegSetValueExA( link, "link", 0, REG_LINK, (BYTE *)target, target_len - sizeof(WCHAR) ); - ok( err == ERROR_ACCESS_DENIED, "RegSetValueEx wrong error %u\n", err ); - - /* try opening the target through the link */ - - err = RegOpenKeyA( hkey_main, "link", &key ); - ok( err == ERROR_FILE_NOT_FOUND, "RegOpenKey wrong error %u\n", err ); - - err = RegCreateKeyExA( hkey_main, "target", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyEx failed error %u\n", err ); - - dw = 0xbeef; - err = RegSetValueExA( key, "value", 0, REG_DWORD, (BYTE *)&dw, sizeof(dw) ); - ok( err == ERROR_SUCCESS, "RegSetValueEx failed error %u\n", err ); - RegCloseKey( key ); - - err = RegOpenKeyA( hkey_main, "link", &key ); - ok( err == ERROR_SUCCESS, "RegOpenKey failed error %u\n", err ); - - len = sizeof(buffer); - err = RegQueryValueExA( key, "value", NULL, &type, buffer, &len ); - ok( err == ERROR_SUCCESS, "RegOpenKey failed error %u\n", err ); - ok( len == sizeof(DWORD), "wrong len %u\n", len ); - - len = sizeof(buffer); - err = RegQueryValueExA( key, "SymbolicLinkValue", NULL, &type, buffer, &len ); - ok( err == ERROR_FILE_NOT_FOUND, "RegQueryValueEx wrong error %u\n", err ); - - /* REG_LINK can be created in non-link keys */ - err = RegSetValueExA( key, "SymbolicLinkValue", 0, REG_LINK, - (BYTE *)target, target_len - sizeof(WCHAR) ); - ok( err == ERROR_SUCCESS, "RegSetValueEx failed error %u\n", err ); - len = sizeof(buffer); - err = RegQueryValueExA( key, "SymbolicLinkValue", NULL, &type, buffer, &len ); - ok( err == ERROR_SUCCESS, "RegQueryValueEx failed error %u\n", err ); - ok( len == target_len - sizeof(WCHAR), "wrong len %u\n", len ); - err = RegDeleteValueA( key, "SymbolicLinkValue" ); - ok( err == ERROR_SUCCESS, "RegDeleteValue failed error %u\n", err ); - - RegCloseKey( key ); - - err = RegCreateKeyExA( hkey_main, "link", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyEx failed error %u\n", err ); - - len = sizeof(buffer); - err = RegQueryValueExA( key, "value", NULL, &type, buffer, &len ); - ok( err == ERROR_SUCCESS, "RegQueryValueEx failed error %u\n", err ); - ok( len == sizeof(DWORD), "wrong len %u\n", len ); - - err = RegQueryValueExA( key, "SymbolicLinkValue", NULL, &type, buffer, &len ); - ok( err == ERROR_FILE_NOT_FOUND, "RegQueryValueEx wrong error %u\n", err ); - RegCloseKey( key ); - - /* now open the symlink itself */ - - err = RegOpenKeyExA( hkey_main, "link", REG_OPTION_OPEN_LINK, KEY_ALL_ACCESS, &key ); - ok( err == ERROR_SUCCESS, "RegOpenKeyEx failed error %u\n", err ); - len = sizeof(buffer); - err = RegQueryValueExA( key, "SymbolicLinkValue", NULL, &type, buffer, &len ); - ok( err == ERROR_SUCCESS, "RegQueryValueEx failed error %u\n", err ); - ok( len == target_len - sizeof(WCHAR), "wrong len %u\n", len ); - RegCloseKey( key ); - - err = RegCreateKeyExA( hkey_main, "link", 0, NULL, REG_OPTION_OPEN_LINK, - KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyEx failed error %u\n", err ); - len = sizeof(buffer); - err = RegQueryValueExA( key, "SymbolicLinkValue", NULL, &type, buffer, &len ); - ok( err == ERROR_SUCCESS, "RegQueryValueEx failed error %u\n", err ); - ok( len == target_len - sizeof(WCHAR), "wrong len %u\n", len ); - RegCloseKey( key ); - - err = RegCreateKeyExA( hkey_main, "link", 0, NULL, REG_OPTION_CREATE_LINK, - KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_ALREADY_EXISTS, "RegCreateKeyEx wrong error %u\n", err ); - - err = RegCreateKeyExA( hkey_main, "link", 0, NULL, REG_OPTION_CREATE_LINK | REG_OPTION_OPEN_LINK, - KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_ALREADY_EXISTS, "RegCreateKeyEx wrong error %u\n", err ); - - err = RegDeleteKey( hkey_main, "target" ); - ok( err == ERROR_SUCCESS, "RegDeleteKey failed error %u\n", err ); - - err = RegDeleteKey( hkey_main, "link" ); - ok( err == ERROR_FILE_NOT_FOUND, "RegDeleteKey wrong error %u\n", err ); - - status = pNtDeleteKey( link ); - ok( !status, "NtDeleteKey failed: 0x%08x\n", status ); - RegCloseKey( link ); - - HeapFree( GetProcessHeap(), 0, target ); - pRtlFreeUnicodeString( &target_str ); -} - -static const DWORD ptr_size = 8 * sizeof(void*); - -static DWORD get_key_value( HKEY root, const char *name, DWORD flags ) -{ - HKEY key; - DWORD err, type, dw, len = sizeof(dw); - - err = RegCreateKeyExA( root, name, 0, NULL, 0, flags | KEY_ALL_ACCESS, NULL, &key, NULL ); - if (err == ERROR_FILE_NOT_FOUND) return 0; - ok( err == ERROR_SUCCESS, "%08x: RegCreateKeyEx failed: %u\n", flags, err ); - - err = RegQueryValueExA( key, "value", NULL, &type, (BYTE *)&dw, &len ); - if (err == ERROR_FILE_NOT_FOUND) - dw = 0; - else - ok( err == ERROR_SUCCESS, "%08x: RegQueryValueEx failed: %u\n", flags, err ); - RegCloseKey( key ); - return dw; -} - -static void _check_key_value( int line, HANDLE root, const char *name, DWORD flags, DWORD expect ) -{ - DWORD dw = get_key_value( root, name, flags ); - ok_(__FILE__,line)( dw == expect, "%08x: wrong value %u/%u\n", flags, dw, expect ); -} -#define check_key_value(root,name,flags,expect) _check_key_value( __LINE__, root, name, flags, expect ) - -static void test_redirection(void) -{ - DWORD err, type, dw, len; - HKEY key, root32, root64, key32, key64; - BOOL is_vista = FALSE; - - if (ptr_size != 64) - { - BOOL is_wow64; - if (!pIsWow64Process || !pIsWow64Process( GetCurrentProcess(), &is_wow64 ) || !is_wow64) - { - skip( "Not on Wow64, no redirection\n" ); - return; - } - } - - err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine", 0, NULL, 0, - KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &root64, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); - - err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine", 0, NULL, 0, - KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &root32, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); - - err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine\\Winetest", 0, NULL, 0, - KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &key64, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); - - err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine\\Winetest", 0, NULL, 0, - KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &key32, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); - - dw = 64; - err = RegSetValueExA( key64, "value", 0, REG_DWORD, (BYTE *)&dw, sizeof(dw) ); - ok( err == ERROR_SUCCESS, "RegSetValueExA failed: %u\n", err ); - - dw = 32; - err = RegSetValueExA( key32, "value", 0, REG_DWORD, (BYTE *)&dw, sizeof(dw) ); - ok( err == ERROR_SUCCESS, "RegSetValueExA failed: %u\n", err ); - - dw = 0; - len = sizeof(dw); - err = RegQueryValueExA( key32, "value", NULL, &type, (BYTE *)&dw, &len ); - ok( err == ERROR_SUCCESS, "RegQueryValueExA failed: %u\n", err ); - ok( dw == 32, "wrong value %u\n", dw ); - - dw = 0; - len = sizeof(dw); - err = RegQueryValueExA( key64, "value", NULL, &type, (BYTE *)&dw, &len ); - ok( err == ERROR_SUCCESS, "RegQueryValueExA failed: %u\n", err ); - ok( dw == 64, "wrong value %u\n", dw ); - - err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, - KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); - - if (ptr_size == 32) - { - /* the Vista mechanism allows opening Wow6432Node from a 32-bit key too */ - /* the new (and simpler) Win7 mechanism doesn't */ - if (get_key_value( key, "Wow6432Node\\Wine\\Winetest", 0 ) == 32) - { - trace( "using Vista-style Wow6432Node handling\n" ); - is_vista = TRUE; - } - check_key_value( key, "Wine\\Winetest", 0, 32 ); - check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); - check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 ); - check_key_value( key, "Wow6432Node\\Wine\\Winetest", 0, is_vista ? 32 : 0 ); - check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 0 ); - check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_32KEY, is_vista ? 32 : 0 ); - } - else - { - if (get_key_value( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY ) == 64) - { - trace( "using Vista-style Wow6432Node handling\n" ); - is_vista = TRUE; - } - check_key_value( key, "Wine\\Winetest", 0, 64 ); - check_key_value( key, "Wow6432Node\\Wine\\Winetest", 0, 32 ); - } - RegCloseKey( key ); - - if (ptr_size == 32) - { - err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, - KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); - dw = get_key_value( key, "Wine\\Winetest", 0 ); - ok( dw == 64 || broken(dw == 32) /* xp64 */, "wrong value %u\n", dw ); - check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, 64 ); - check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 ); - check_key_value( key, "Wow6432Node\\Wine\\Winetest", 0, 32 ); - dw = get_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY ); - ok( dw == 32 || broken(dw == 64) /* xp64 */, "wrong value %u\n", dw ); - check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_32KEY, 32 ); - RegCloseKey( key ); - - err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, - KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); - check_key_value( key, "Wine\\Winetest", 0, 32 ); - check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); - check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 ); - check_key_value( key, "Wow6432Node\\Wine\\Winetest", 0, is_vista ? 32 : 0 ); - check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 0 ); - check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_32KEY, is_vista ? 32 : 0 ); - RegCloseKey( key ); - } - - check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wine\\Winetest", 0, ptr_size ); - check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\Winetest", 0, 32 ); - if (ptr_size == 64) - { - /* KEY_WOW64 flags have no effect on 64-bit */ - check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wine\\Winetest", KEY_WOW64_64KEY, 64 ); - check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wine\\Winetest", KEY_WOW64_32KEY, 32 ); - check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); - check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\Winetest", KEY_WOW64_32KEY, 32 ); - } - else - { - check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wine\\Winetest", KEY_WOW64_64KEY, 64 ); - check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wine\\Winetest", KEY_WOW64_32KEY, 32 ); - check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); - check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\Winetest", KEY_WOW64_32KEY, 32 ); - } - - err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node", 0, NULL, 0, - KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); - check_key_value( key, "Wine\\Winetest", 0, 32 ); - check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); - check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 ); - RegCloseKey( key ); - - if (ptr_size == 32) - { - err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node", 0, NULL, 0, - KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); - dw = get_key_value( key, "Wine\\Winetest", 0 ); - ok( dw == (is_vista ? 64 : 32) || broken(dw == 32) /* xp64 */, "wrong value %u\n", dw ); - check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); - check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 ); - RegCloseKey( key ); - - err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node", 0, NULL, 0, - KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); - check_key_value( key, "Wine\\Winetest", 0, 32 ); - check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); - check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 ); - RegCloseKey( key ); - } - - err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine", 0, NULL, 0, - KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); - check_key_value( key, "Winetest", 0, 32 ); - check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); - check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 ); - RegCloseKey( key ); - - if (ptr_size == 32) - { - err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine", 0, NULL, 0, - KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); - dw = get_key_value( key, "Winetest", 0 ); - ok( dw == 32 || (is_vista && dw == 64), "wrong value %u\n", dw ); - check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); - check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 ); - RegCloseKey( key ); - - err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine", 0, NULL, 0, - KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); - check_key_value( key, "Winetest", 0, 32 ); - check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); - check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 ); - RegCloseKey( key ); - } - - err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine", 0, NULL, 0, - KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); - check_key_value( key, "Winetest", 0, ptr_size ); - check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : ptr_size ); - dw = get_key_value( key, "Winetest", KEY_WOW64_32KEY ); - if (ptr_size == 32) ok( dw == 32, "wrong value %u\n", dw ); - else todo_wine ok( dw == 32, "wrong value %u\n", dw ); - RegCloseKey( key ); - - if (ptr_size == 32) - { - err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine", 0, NULL, 0, - KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); - dw = get_key_value( key, "Winetest", 0 ); - ok( dw == 64 || broken(dw == 32) /* xp64 */, "wrong value %u\n", dw ); - check_key_value( key, "Winetest", KEY_WOW64_64KEY, 64 ); - dw = get_key_value( key, "Winetest", KEY_WOW64_32KEY ); - todo_wine ok( dw == 32, "wrong value %u\n", dw ); - RegCloseKey( key ); - - err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine", 0, NULL, 0, - KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %u\n", err ); - check_key_value( key, "Winetest", 0, 32 ); - check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); - check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 ); - RegCloseKey( key ); - } - - if (pRegDeleteKeyExA) - { - err = pRegDeleteKeyExA( key32, "", KEY_WOW64_32KEY, 0 ); - ok( err == ERROR_SUCCESS, "RegDeleteKey failed: %u\n", err ); - err = pRegDeleteKeyExA( key64, "", KEY_WOW64_64KEY, 0 ); - ok( err == ERROR_SUCCESS, "RegDeleteKey failed: %u\n", err ); - pRegDeleteKeyExA( key64, "", KEY_WOW64_64KEY, 0 ); - pRegDeleteKeyExA( root64, "", KEY_WOW64_64KEY, 0 ); - } - else - { - err = RegDeleteKeyA( key32, "" ); - ok( err == ERROR_SUCCESS, "RegDeleteKey failed: %u\n", err ); - err = RegDeleteKeyA( key64, "" ); - ok( err == ERROR_SUCCESS, "RegDeleteKey failed: %u\n", err ); - RegDeleteKeyA( key64, "" ); - RegDeleteKeyA( root64, "" ); - } - RegCloseKey( key32 ); - RegCloseKey( key64 ); - RegCloseKey( root32 ); - RegCloseKey( root64 ); -} - -static void test_classesroot(void) -{ - HKEY hkey, hklm, hkcr, hkeysub1, hklmsub1, hkcrsub1, hklmsub2, hkcrsub2; - DWORD size = 8; - DWORD type = REG_SZ; - static CHAR buffer[8]; - LONG res; - - /* create a key in the user's classes */ - if (!RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Classes\\WineTestCls", &hkey )) - { - delete_key( hkey ); - RegCloseKey( hkey ); - } - res = RegCreateKeyExA( HKEY_CURRENT_USER, "Software\\Classes\\WineTestCls", 0, NULL, 0, - KEY_QUERY_VALUE|KEY_SET_VALUE, NULL, &hkey, NULL ); - if (res == ERROR_ACCESS_DENIED) - { - skip("not enough privileges to add a user class\n"); - return; - } - - /* try to open that key in hkcr */ - res = RegOpenKeyExA( HKEY_CLASSES_ROOT, "WineTestCls", 0, - KEY_QUERY_VALUE|KEY_SET_VALUE, &hkcr ); - todo_wine ok(res == ERROR_SUCCESS || - broken(res == ERROR_FILE_NOT_FOUND /* WinNT */), - "test key not found in hkcr: %d\n", res); - if (res) - { - skip("HKCR key merging not supported\n"); - delete_key( hkey ); - RegCloseKey( hkey ); - return; - } - - /* set a value in user's classes */ - res = RegSetValueExA(hkey, "val1", 0, REG_SZ, (const BYTE *)"user", sizeof("user")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); - - /* try to find the value in hkcr */ - res = RegQueryValueExA(hkcr, "val1", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", res); - ok(!strcmp( buffer, "user" ), "value set to '%s'\n", buffer ); - - /* modify the value in hkcr */ - res = RegSetValueExA(hkcr, "val1", 0, REG_SZ, (const BYTE *)"hkcr", sizeof("hkcr")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); - - /* check if the value is also modified in user's classes */ - res = RegQueryValueExA(hkey, "val1", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d, GLE=%x\n", res, GetLastError()); - ok(!strcmp( buffer, "hkcr" ), "value set to '%s'\n", buffer ); - - /* set a value in hkcr */ - res = RegSetValueExA(hkcr, "val0", 0, REG_SZ, (const BYTE *)"hkcr", sizeof("hkcr")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); - - /* try to find the value in user's classes */ - res = RegQueryValueExA(hkcr, "val0", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", res); - ok(!strcmp( buffer, "hkcr" ), "value set to '%s'\n", buffer ); - - /* modify the value in user's classes */ - res = RegSetValueExA(hkcr, "val0", 0, REG_SZ, (const BYTE *)"user", sizeof("user")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); - - /* check if the value is also modified in hkcr */ - res = RegQueryValueExA(hkey, "val0", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d, GLE=%x\n", res, GetLastError()); - ok(!strcmp( buffer, "user" ), "value set to '%s'\n", buffer ); - - /* cleanup */ - delete_key( hkey ); - delete_key( hkcr ); - RegCloseKey( hkey ); - RegCloseKey( hkcr ); - - /* create a key in the hklm classes */ - if (!RegOpenKeyA( HKEY_LOCAL_MACHINE, "Software\\Classes\\WineTestCls", &hklm )) - { - delete_key( hklm ); - RegCloseKey( hklm ); - } - res = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Classes\\WineTestCls", 0, NULL, REG_OPTION_NON_VOLATILE, - KEY_ALL_ACCESS, NULL, &hklm, NULL ); - if (res == ERROR_ACCESS_DENIED) - { - skip("not enough privileges to add a system class\n"); - return; - } - - /* try to open that key in hkcr */ - res = RegOpenKeyExA( HKEY_CLASSES_ROOT, "WineTestCls", 0, - KEY_QUERY_VALUE|KEY_SET_VALUE, &hkcr ); - ok(res == ERROR_SUCCESS, - "test key not found in hkcr: %d\n", res); - if (res) - { - delete_key( hklm ); - RegCloseKey( hklm ); - return; - } - - /* set a value in hklm classes */ - res = RegSetValueExA(hklm, "val2", 0, REG_SZ, (const BYTE *)"hklm", sizeof("hklm")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); - - /* try to find the value in hkcr */ - res = RegQueryValueExA(hkcr, "val2", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", res); - ok(!strcmp( buffer, "hklm" ), "value set to '%s'\n", buffer ); - - /* modify the value in hkcr */ - res = RegSetValueExA(hkcr, "val2", 0, REG_SZ, (const BYTE *)"hkcr", sizeof("hkcr")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); - - /* check that the value is not modified in hklm classes */ - res = RegQueryValueExA(hklm, "val2", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d, GLE=%x\n", res, GetLastError()); - ok(!strcmp( buffer, "hklm" ), "value set to '%s'\n", buffer ); - - if (RegCreateKeyExA( HKEY_CURRENT_USER, "Software\\Classes\\WineTestCls", 0, NULL, 0, - KEY_QUERY_VALUE|KEY_SET_VALUE, NULL, &hkey, NULL )) return; - - /* try to open that key in hkcr */ - res = RegOpenKeyExA( HKEY_CLASSES_ROOT, "WineTestCls", 0, - KEY_QUERY_VALUE|KEY_SET_VALUE, &hkcr ); - ok(res == ERROR_SUCCESS, - "test key not found in hkcr: %d\n", res); - - /* set a value in user's classes */ - res = RegSetValueExA(hkey, "val2", 0, REG_SZ, (const BYTE *)"user", sizeof("user")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); - - /* try to find the value in hkcr */ - res = RegQueryValueExA(hkcr, "val2", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", res); - ok(!strcmp( buffer, "user" ), "value set to '%s'\n", buffer ); - - /* modify the value in hklm */ - res = RegSetValueExA(hklm, "val2", 0, REG_SZ, (const BYTE *)"hklm", sizeof("hklm")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); - - /* check that the value is not overwritten in hkcr or user's classes */ - res = RegQueryValueExA(hkcr, "val2", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", res); - ok(!strcmp( buffer, "user" ), "value set to '%s'\n", buffer ); - res = RegQueryValueExA(hkey, "val2", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d, GLE=%x\n", res, GetLastError()); - ok(!strcmp( buffer, "user" ), "value set to '%s'\n", buffer ); - - /* modify the value in hkcr */ - res = RegSetValueExA(hkcr, "val2", 0, REG_SZ, (const BYTE *)"hkcr", sizeof("hkcr")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); - - /* check that the value is overwritten in hklm and user's classes */ - res = RegQueryValueExA(hkcr, "val2", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", res); - ok(!strcmp( buffer, "hkcr" ), "value set to '%s'\n", buffer ); - res = RegQueryValueExA(hkey, "val2", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d, GLE=%x\n", res, GetLastError()); - ok(!strcmp( buffer, "hkcr" ), "value set to '%s'\n", buffer ); - - /* create a subkey in hklm */ - if (RegCreateKeyExA( hklm, "subkey1", 0, NULL, 0, - KEY_QUERY_VALUE|KEY_SET_VALUE, NULL, &hklmsub1, NULL )) return; - /* try to open that subkey in hkcr */ - res = RegOpenKeyExA( hkcr, "subkey1", 0, KEY_QUERY_VALUE|KEY_SET_VALUE, &hkcrsub1 ); - ok(res == ERROR_SUCCESS, "test key not found in hkcr: %d\n", res); - - /* set a value in hklm classes */ - res = RegSetValueExA(hklmsub1, "subval1", 0, REG_SZ, (const BYTE *)"hklm", sizeof("hklm")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); - - /* try to find the value in hkcr */ - res = RegQueryValueExA(hkcrsub1, "subval1", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", res); - ok(!strcmp( buffer, "hklm" ), "value set to '%s'\n", buffer ); - - /* modify the value in hkcr */ - res = RegSetValueExA(hkcrsub1, "subval1", 0, REG_SZ, (const BYTE *)"hkcr", sizeof("hkcr")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); - - /* check that the value is modified in hklm classes */ - res = RegQueryValueExA(hklmsub1, "subval1", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d, GLE=%x\n", res, GetLastError()); - ok(!strcmp( buffer, "hkcr" ), "value set to '%s'\n", buffer ); - - /* create a subkey in user's classes */ - if (RegCreateKeyExA( hkey, "subkey1", 0, NULL, 0, - KEY_QUERY_VALUE|KEY_SET_VALUE, NULL, &hkeysub1, NULL )) return; - - /* set a value in user's classes */ - res = RegSetValueExA(hkeysub1, "subval1", 0, REG_SZ, (const BYTE *)"user", sizeof("user")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); - - /* try to find the value in hkcr */ - res = RegQueryValueExA(hkcrsub1, "subval1", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", res); - ok(!strcmp( buffer, "user" ), "value set to '%s'\n", buffer ); - - /* modify the value in hklm */ - res = RegSetValueExA(hklmsub1, "subval1", 0, REG_SZ, (const BYTE *)"hklm", sizeof("hklm")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); - - /* check that the value is not overwritten in hkcr or user's classes */ - res = RegQueryValueExA(hkcrsub1, "subval1", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", res); - ok(!strcmp( buffer, "user" ), "value set to '%s'\n", buffer ); - res = RegQueryValueExA(hkeysub1, "subval1", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d, GLE=%x\n", res, GetLastError()); - ok(!strcmp( buffer, "user" ), "value set to '%s'\n", buffer ); - - /* modify the value in hkcr */ - res = RegSetValueExA(hkcrsub1, "subval1", 0, REG_SZ, (const BYTE *)"hkcr", sizeof("hkcr")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); - - /* check that the value is not overwritten in hklm, but in user's classes */ - res = RegQueryValueExA(hklmsub1, "subval1", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", res); - ok(!strcmp( buffer, "hklm" ), "value set to '%s'\n", buffer ); - res = RegQueryValueExA(hkeysub1, "subval1", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d, GLE=%x\n", res, GetLastError()); - ok(!strcmp( buffer, "hkcr" ), "value set to '%s'\n", buffer ); - - /* new subkey in hkcr */ - if (RegCreateKeyExA( hkcr, "subkey2", 0, NULL, 0, - KEY_QUERY_VALUE|KEY_SET_VALUE, NULL, &hkcrsub2, NULL )) return; - res = RegSetValueExA(hkcrsub2, "subval1", 0, REG_SZ, (const BYTE *)"hkcr", sizeof("hkcr")); - ok(res == ERROR_SUCCESS, "RegSetValueExA failed: %d, GLE=%x\n", res, GetLastError()); - - /* try to open that new subkey in user's classes and hklm */ - res = RegOpenKeyExA( hkey, "subkey2", 0, KEY_QUERY_VALUE|KEY_SET_VALUE, &hklmsub2 ); - ok(res != ERROR_SUCCESS, "test key found in user's classes: %d\n", res); - hklmsub2 = 0; - res = RegOpenKeyExA( hklm, "subkey2", 0, KEY_QUERY_VALUE|KEY_SET_VALUE, &hklmsub2 ); - ok(res == ERROR_SUCCESS, "test key not found in hklm: %d\n", res); - - /* check that the value is present in hklm */ - res = RegQueryValueExA(hklmsub2, "subval1", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "RegQueryValueExA failed: %d\n", res); - ok(!strcmp( buffer, "hkcr" ), "value set to '%s'\n", buffer ); - - /* final cleanup */ - delete_key( hkey ); - delete_key( hklm ); - delete_key( hkcr ); - delete_key( hkeysub1 ); - delete_key( hklmsub1 ); - delete_key( hkcrsub1 ); - delete_key( hklmsub2 ); - delete_key( hkcrsub2 ); - RegCloseKey( hkey ); - RegCloseKey( hklm ); - RegCloseKey( hkcr ); - RegCloseKey( hkeysub1 ); - RegCloseKey( hklmsub1 ); - RegCloseKey( hkcrsub1 ); - RegCloseKey( hklmsub2 ); - RegCloseKey( hkcrsub2 ); -} - -static void test_deleted_key(void) -{ - HKEY hkey, hkey2; - char value[20]; - DWORD val_count, type; - LONG res; - - /* Open the test key, then delete it while it's open */ - RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\Test", &hkey ); - - delete_key( hkey_main ); - - val_count = sizeof(value); - type = 0; - res = RegEnumValueA( hkey, 0, value, &val_count, NULL, &type, 0, 0 ); - ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %i\n", res); - - res = RegEnumKeyA( hkey, 0, value, sizeof(value) ); - ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %i\n", res); - - val_count = sizeof(value); - type = 0; - res = RegQueryValueExA( hkey, "test", NULL, &type, (BYTE *)value, &val_count ); - ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %i\n", res); - - res = RegSetValueExA( hkey, "test", 0, REG_SZ, (const BYTE*)"value", 6); - ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %i\n", res); - - res = RegOpenKeyA( hkey, "test", &hkey2 ); - ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %i\n", res); - if (res == 0) - RegCloseKey( hkey2 ); - - res = RegCreateKeyA( hkey, "test", &hkey2 ); - ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %i\n", res); - if (res == 0) - RegCloseKey( hkey2 ); - - res = RegFlushKey( hkey ); - ok(res == ERROR_KEY_DELETED, "expect ERROR_KEY_DELETED, got %i\n", res); - - RegCloseKey( hkey ); - - setup_main_key(); -} - -static void test_delete_value(void) -{ - LONG res; - char longname[401]; - - res = RegSetValueExA( hkey_main, "test", 0, REG_SZ, (const BYTE*)"value", 6 ); - ok(res == ERROR_SUCCESS, "expect ERROR_SUCCESS, got %i\n", res); - - res = RegQueryValueExA( hkey_main, "test", NULL, NULL, NULL, NULL); - ok(res == ERROR_SUCCESS, "expect ERROR_SUCCESS, got %i\n", res); - - res = RegDeleteValueA( hkey_main, "test" ); - ok(res == ERROR_SUCCESS, "expect ERROR_SUCCESS, got %i\n", res); - - res = RegQueryValueExA( hkey_main, "test", NULL, NULL, NULL, NULL); - ok(res == ERROR_FILE_NOT_FOUND, "expect ERROR_FILE_NOT_FOUND, got %i\n", res); - - res = RegDeleteValueA( hkey_main, "test" ); - ok(res == ERROR_FILE_NOT_FOUND, "expect ERROR_FILE_NOT_FOUND, got %i\n", res); - - memset(longname, 'a', 400); - longname[400] = 0; - res = RegDeleteValueA( hkey_main, longname ); - ok(res == ERROR_FILE_NOT_FOUND || broken(res == ERROR_MORE_DATA), /* nt4, win2k */ - "expect ERROR_FILE_NOT_FOUND, got %i\n", res); -} - -START_TEST(registry) -{ - /* Load pointers for functions that are not available in all Windows versions */ - InitFunctionPtrs(); - - setup_main_key(); - test_set_value(); - create_test_entries(); - test_enum_value(); - test_query_value_ex(); - test_get_value(); - test_reg_open_key(); - test_reg_create_key(); - test_reg_close_key(); - test_reg_delete_key(); - test_reg_query_value(); - test_string_termination(); - test_symlinks(); - test_redirection(); - test_classesroot(); - - /* SaveKey/LoadKey require the SE_BACKUP_NAME privilege to be set */ - if (set_privileges(SE_BACKUP_NAME, TRUE) && - set_privileges(SE_RESTORE_NAME, TRUE)) - { - test_reg_save_key(); - test_reg_load_key(); - test_reg_unload_key(); - - set_privileges(SE_BACKUP_NAME, FALSE); - set_privileges(SE_RESTORE_NAME, FALSE); - } - - test_reg_delete_tree(); - test_rw_order(); - test_deleted_key(); - test_delete_value(); - - /* cleanup */ - delete_key( hkey_main ); - - test_regconnectregistry(); -} diff --git a/rostests/winetests/advapi32/security.c b/rostests/winetests/advapi32/security.c deleted file mode 100644 index 4cc140277ed..00000000000 --- a/rostests/winetests/advapi32/security.c +++ /dev/null @@ -1,4020 +0,0 @@ -/* - * Unit tests for security functions - * - * Copyright (c) 2004 Mike McCormack - * Copyright (c) 2011 Dmitry Timoshkov - * - * 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 "ntstatus.h" -#define WIN32_NO_STATUS -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "aclapi.h" -#include "winnt.h" -#include "sddl.h" -#include "ntsecapi.h" -#include "lmcons.h" - -#include "wine/test.h" - -/* copied from Wine winternl.h - not included in the Windows SDK */ -typedef enum _OBJECT_INFORMATION_CLASS { - ObjectBasicInformation, - ObjectNameInformation, - ObjectTypeInformation, - ObjectAllInformation, - ObjectDataInformation -} OBJECT_INFORMATION_CLASS, *POBJECT_INFORMATION_CLASS; - -typedef struct _OBJECT_BASIC_INFORMATION { - ULONG Attributes; - ACCESS_MASK GrantedAccess; - ULONG HandleCount; - ULONG PointerCount; - ULONG PagedPoolUsage; - ULONG NonPagedPoolUsage; - ULONG Reserved[3]; - ULONG NameInformationLength; - ULONG TypeInformationLength; - ULONG SecurityDescriptorLength; - LARGE_INTEGER CreateTime; -} OBJECT_BASIC_INFORMATION, *POBJECT_BASIC_INFORMATION; - -#define expect_eq(expr, value, type, format) { type ret = expr; ok((value) == ret, #expr " expected " format " got " format "\n", (value), (ret)); } - -static BOOL (WINAPI *pAddAccessAllowedAceEx)(PACL, DWORD, DWORD, DWORD, PSID); -static BOOL (WINAPI *pAddAccessDeniedAceEx)(PACL, DWORD, DWORD, DWORD, PSID); -static BOOL (WINAPI *pAddAuditAccessAceEx)(PACL, DWORD, DWORD, DWORD, PSID, BOOL, BOOL); -static VOID (WINAPI *pBuildTrusteeWithSidA)( PTRUSTEEA pTrustee, PSID pSid ); -static VOID (WINAPI *pBuildTrusteeWithNameA)( PTRUSTEEA pTrustee, LPSTR pName ); -static VOID (WINAPI *pBuildTrusteeWithObjectsAndNameA)( PTRUSTEEA pTrustee, - POBJECTS_AND_NAME_A pObjName, - SE_OBJECT_TYPE ObjectType, - LPSTR ObjectTypeName, - LPSTR InheritedObjectTypeName, - LPSTR Name ); -static VOID (WINAPI *pBuildTrusteeWithObjectsAndSidA)( PTRUSTEEA pTrustee, - POBJECTS_AND_SID pObjSid, - GUID* pObjectGuid, - GUID* pInheritedObjectGuid, - PSID pSid ); -static LPSTR (WINAPI *pGetTrusteeNameA)( PTRUSTEEA pTrustee ); -static BOOL (WINAPI *pMakeSelfRelativeSD)( PSECURITY_DESCRIPTOR, PSECURITY_DESCRIPTOR, LPDWORD ); -static BOOL (WINAPI *pConvertSidToStringSidA)( PSID pSid, LPSTR *str ); -static BOOL (WINAPI *pConvertStringSidToSidA)( LPCSTR str, PSID pSid ); -static BOOL (WINAPI *pCheckTokenMembership)(HANDLE, PSID, PBOOL); -static BOOL (WINAPI *pConvertStringSecurityDescriptorToSecurityDescriptorA)(LPCSTR, DWORD, - PSECURITY_DESCRIPTOR*, PULONG ); -static BOOL (WINAPI *pConvertStringSecurityDescriptorToSecurityDescriptorW)(LPCWSTR, DWORD, - PSECURITY_DESCRIPTOR*, PULONG ); -static BOOL (WINAPI *pConvertSecurityDescriptorToStringSecurityDescriptorA)(PSECURITY_DESCRIPTOR, DWORD, - SECURITY_INFORMATION, LPSTR *, PULONG ); -static BOOL (WINAPI *pGetFileSecurityA)(LPCSTR, SECURITY_INFORMATION, - PSECURITY_DESCRIPTOR, DWORD, LPDWORD); -static BOOL (WINAPI *pSetFileSecurityA)(LPCSTR, SECURITY_INFORMATION, - PSECURITY_DESCRIPTOR); -static DWORD (WINAPI *pGetNamedSecurityInfoA)(LPSTR, SE_OBJECT_TYPE, SECURITY_INFORMATION, - PSID*, PSID*, PACL*, PACL*, - PSECURITY_DESCRIPTOR*); -static PDWORD (WINAPI *pGetSidSubAuthority)(PSID, DWORD); -static PUCHAR (WINAPI *pGetSidSubAuthorityCount)(PSID); -static BOOL (WINAPI *pIsValidSid)(PSID); -static DWORD (WINAPI *pRtlAdjustPrivilege)(ULONG,BOOLEAN,BOOLEAN,PBOOLEAN); -static BOOL (WINAPI *pCreateWellKnownSid)(WELL_KNOWN_SID_TYPE,PSID,PSID,DWORD*); -static BOOL (WINAPI *pDuplicateTokenEx)(HANDLE,DWORD,LPSECURITY_ATTRIBUTES, - SECURITY_IMPERSONATION_LEVEL,TOKEN_TYPE,PHANDLE); - -static NTSTATUS (WINAPI *pLsaQueryInformationPolicy)(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID*); -static NTSTATUS (WINAPI *pLsaClose)(LSA_HANDLE); -static NTSTATUS (WINAPI *pLsaFreeMemory)(PVOID); -static NTSTATUS (WINAPI *pLsaOpenPolicy)(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,ACCESS_MASK,PLSA_HANDLE); -static NTSTATUS (WINAPI *pNtQueryObject)(HANDLE,OBJECT_INFORMATION_CLASS,PVOID,ULONG,PULONG); -static DWORD (WINAPI *pSetEntriesInAclW)(ULONG, PEXPLICIT_ACCESSW, PACL, PACL*); -static DWORD (WINAPI *pSetEntriesInAclA)(ULONG, PEXPLICIT_ACCESSA, PACL, PACL*); -static BOOL (WINAPI *pSetSecurityDescriptorControl)(PSECURITY_DESCRIPTOR, SECURITY_DESCRIPTOR_CONTROL, - SECURITY_DESCRIPTOR_CONTROL); -static DWORD (WINAPI *pGetSecurityInfo)(HANDLE, SE_OBJECT_TYPE, SECURITY_INFORMATION, - PSID*, PSID*, PACL*, PACL*, PSECURITY_DESCRIPTOR*); -static NTSTATUS (WINAPI *pNtAccessCheck)(PSECURITY_DESCRIPTOR, HANDLE, ACCESS_MASK, PGENERIC_MAPPING, - PPRIVILEGE_SET, PULONG, PULONG, NTSTATUS*); -static BOOL (WINAPI *pCreateRestrictedToken)(HANDLE, DWORD, DWORD, PSID_AND_ATTRIBUTES, DWORD, - PLUID_AND_ATTRIBUTES, DWORD, PSID_AND_ATTRIBUTES, PHANDLE); - -static HMODULE hmod; -static int myARGC; -static char** myARGV; - -struct sidRef -{ - SID_IDENTIFIER_AUTHORITY auth; - const char *refStr; -}; - -static void init(void) -{ - HMODULE hntdll; - - hntdll = GetModuleHandleA("ntdll.dll"); - pNtQueryObject = (void *)GetProcAddress( hntdll, "NtQueryObject" ); - pNtAccessCheck = (void *)GetProcAddress( hntdll, "NtAccessCheck" ); - - hmod = GetModuleHandle("advapi32.dll"); - pAddAccessAllowedAceEx = (void *)GetProcAddress(hmod, "AddAccessAllowedAceEx"); - pAddAccessDeniedAceEx = (void *)GetProcAddress(hmod, "AddAccessDeniedAceEx"); - pAddAuditAccessAceEx = (void *)GetProcAddress(hmod, "AddAuditAccessAceEx"); - pCheckTokenMembership = (void *)GetProcAddress(hmod, "CheckTokenMembership"); - pConvertStringSecurityDescriptorToSecurityDescriptorA = - (void *)GetProcAddress(hmod, "ConvertStringSecurityDescriptorToSecurityDescriptorA" ); - pConvertStringSecurityDescriptorToSecurityDescriptorW = - (void *)GetProcAddress(hmod, "ConvertStringSecurityDescriptorToSecurityDescriptorW" ); - pConvertSecurityDescriptorToStringSecurityDescriptorA = - (void *)GetProcAddress(hmod, "ConvertSecurityDescriptorToStringSecurityDescriptorA" ); - pGetFileSecurityA = (void *)GetProcAddress(hmod, "GetFileSecurityA" ); - pSetFileSecurityA = (void *)GetProcAddress(hmod, "SetFileSecurityA" ); - pCreateWellKnownSid = (void *)GetProcAddress( hmod, "CreateWellKnownSid" ); - pGetNamedSecurityInfoA = (void *)GetProcAddress(hmod, "GetNamedSecurityInfoA"); - pGetSidSubAuthority = (void *)GetProcAddress(hmod, "GetSidSubAuthority"); - pGetSidSubAuthorityCount = (void *)GetProcAddress(hmod, "GetSidSubAuthorityCount"); - pIsValidSid = (void *)GetProcAddress(hmod, "IsValidSid"); - pMakeSelfRelativeSD = (void *)GetProcAddress(hmod, "MakeSelfRelativeSD"); - pSetEntriesInAclW = (void *)GetProcAddress(hmod, "SetEntriesInAclW"); - pSetEntriesInAclA = (void *)GetProcAddress(hmod, "SetEntriesInAclA"); - pSetSecurityDescriptorControl = (void *)GetProcAddress(hmod, "SetSecurityDescriptorControl"); - pGetSecurityInfo = (void *)GetProcAddress(hmod, "GetSecurityInfo"); - pCreateRestrictedToken = (void *)GetProcAddress(hmod, "CreateRestrictedToken"); - - myARGC = winetest_get_mainargs( &myARGV ); -} - -static void test_str_sid(const char *str_sid) -{ - PSID psid; - char *temp; - - if (pConvertStringSidToSidA(str_sid, &psid)) - { - if (pConvertSidToStringSidA(psid, &temp)) - { - trace(" %s: %s\n", str_sid, temp); - LocalFree(temp); - } - LocalFree(psid); - } - else - { - if (GetLastError() != ERROR_INVALID_SID) - trace(" %s: couldn't be converted, returned %d\n", str_sid, GetLastError()); - else - trace(" %s: couldn't be converted\n", str_sid); - } -} - -static void test_sid(void) -{ - struct sidRef refs[] = { - { { {0x00,0x00,0x33,0x44,0x55,0x66} }, "S-1-860116326-1" }, - { { {0x00,0x00,0x01,0x02,0x03,0x04} }, "S-1-16909060-1" }, - { { {0x00,0x00,0x00,0x01,0x02,0x03} }, "S-1-66051-1" }, - { { {0x00,0x00,0x00,0x00,0x01,0x02} }, "S-1-258-1" }, - { { {0x00,0x00,0x00,0x00,0x00,0x02} }, "S-1-2-1" }, - { { {0x00,0x00,0x00,0x00,0x00,0x0c} }, "S-1-12-1" }, - }; - const char noSubAuthStr[] = "S-1-5"; - unsigned int i; - PSID psid = NULL; - SID *pisid; - BOOL r; - LPSTR str = NULL; - - pConvertSidToStringSidA = (void *)GetProcAddress( hmod, "ConvertSidToStringSidA" ); - if( !pConvertSidToStringSidA ) - return; - pConvertStringSidToSidA = (void *)GetProcAddress( hmod, "ConvertStringSidToSidA" ); - if( !pConvertStringSidToSidA ) - return; - - r = pConvertStringSidToSidA( NULL, NULL ); - ok( !r, "expected failure with NULL parameters\n" ); - if( GetLastError() == ERROR_CALL_NOT_IMPLEMENTED ) - return; - ok( GetLastError() == ERROR_INVALID_PARAMETER, - "expected GetLastError() is ERROR_INVALID_PARAMETER, got %d\n", - GetLastError() ); - - r = pConvertStringSidToSidA( refs[0].refStr, NULL ); - ok( !r && GetLastError() == ERROR_INVALID_PARAMETER, - "expected GetLastError() is ERROR_INVALID_PARAMETER, got %d\n", - GetLastError() ); - - r = pConvertStringSidToSidA( NULL, &str ); - ok( !r && GetLastError() == ERROR_INVALID_PARAMETER, - "expected GetLastError() is ERROR_INVALID_PARAMETER, got %d\n", - GetLastError() ); - - r = pConvertStringSidToSidA( noSubAuthStr, &psid ); - ok( !r, - "expected failure with no sub authorities\n" ); - ok( GetLastError() == ERROR_INVALID_SID, - "expected GetLastError() is ERROR_INVALID_SID, got %d\n", - GetLastError() ); - - ok(pConvertStringSidToSidA("S-1-5-21-93476-23408-4576", &psid), "ConvertStringSidToSidA failed\n"); - pisid = psid; - ok(pisid->SubAuthorityCount == 4, "Invalid sub authority count - expected 4, got %d\n", pisid->SubAuthorityCount); - ok(pisid->SubAuthority[0] == 21, "Invalid subauthority 0 - expected 21, got %d\n", pisid->SubAuthority[0]); - ok(pisid->SubAuthority[3] == 4576, "Invalid subauthority 0 - expected 4576, got %d\n", pisid->SubAuthority[3]); - LocalFree(str); - LocalFree(psid); - - for( i = 0; i < sizeof(refs) / sizeof(refs[0]); i++ ) - { - PISID pisid; - - r = AllocateAndInitializeSid( &refs[i].auth, 1,1,0,0,0,0,0,0,0, - &psid ); - ok( r, "failed to allocate sid\n" ); - r = pConvertSidToStringSidA( psid, &str ); - ok( r, "failed to convert sid\n" ); - if (r) - { - ok( !strcmp( str, refs[i].refStr ), - "incorrect sid, expected %s, got %s\n", refs[i].refStr, str ); - LocalFree( str ); - } - if( psid ) - FreeSid( psid ); - - r = pConvertStringSidToSidA( refs[i].refStr, &psid ); - ok( r, "failed to parse sid string\n" ); - pisid = psid; - ok( pisid && - !memcmp( pisid->IdentifierAuthority.Value, refs[i].auth.Value, - sizeof(refs[i].auth) ), - "string sid %s didn't parse to expected value\n" - "(got 0x%04x%08x, expected 0x%04x%08x)\n", - refs[i].refStr, - MAKEWORD( pisid->IdentifierAuthority.Value[1], - pisid->IdentifierAuthority.Value[0] ), - MAKELONG( MAKEWORD( pisid->IdentifierAuthority.Value[5], - pisid->IdentifierAuthority.Value[4] ), - MAKEWORD( pisid->IdentifierAuthority.Value[3], - pisid->IdentifierAuthority.Value[2] ) ), - MAKEWORD( refs[i].auth.Value[1], refs[i].auth.Value[0] ), - MAKELONG( MAKEWORD( refs[i].auth.Value[5], refs[i].auth.Value[4] ), - MAKEWORD( refs[i].auth.Value[3], refs[i].auth.Value[2] ) ) ); - if( psid ) - LocalFree( psid ); - } - - trace("String SIDs:\n"); - test_str_sid("AO"); - test_str_sid("RU"); - test_str_sid("AN"); - test_str_sid("AU"); - test_str_sid("BA"); - test_str_sid("BG"); - test_str_sid("BO"); - test_str_sid("BU"); - test_str_sid("CA"); - test_str_sid("CG"); - test_str_sid("CO"); - test_str_sid("DA"); - test_str_sid("DC"); - test_str_sid("DD"); - test_str_sid("DG"); - test_str_sid("DU"); - test_str_sid("EA"); - test_str_sid("ED"); - test_str_sid("WD"); - test_str_sid("PA"); - test_str_sid("IU"); - test_str_sid("LA"); - test_str_sid("LG"); - test_str_sid("LS"); - test_str_sid("SY"); - test_str_sid("NU"); - test_str_sid("NO"); - test_str_sid("NS"); - test_str_sid("PO"); - test_str_sid("PS"); - test_str_sid("PU"); - test_str_sid("RS"); - test_str_sid("RD"); - test_str_sid("RE"); - test_str_sid("RC"); - test_str_sid("SA"); - test_str_sid("SO"); - test_str_sid("SU"); -} - -static void test_trustee(void) -{ - GUID ObjectType = {0x12345678, 0x1234, 0x5678, {0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88}}; - GUID InheritedObjectType = {0x23456789, 0x2345, 0x6786, {0x2, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99}}; - GUID ZeroGuid; - OBJECTS_AND_NAME_ oan; - OBJECTS_AND_SID oas; - TRUSTEE trustee; - PSID psid; - char szObjectTypeName[] = "ObjectTypeName"; - char szInheritedObjectTypeName[] = "InheritedObjectTypeName"; - char szTrusteeName[] = "szTrusteeName"; - SID_IDENTIFIER_AUTHORITY auth = { {0x11,0x22,0,0,0, 0} }; - - memset( &ZeroGuid, 0x00, sizeof (ZeroGuid) ); - - pBuildTrusteeWithSidA = (void *)GetProcAddress( hmod, "BuildTrusteeWithSidA" ); - pBuildTrusteeWithNameA = (void *)GetProcAddress( hmod, "BuildTrusteeWithNameA" ); - pBuildTrusteeWithObjectsAndNameA = (void *)GetProcAddress (hmod, "BuildTrusteeWithObjectsAndNameA" ); - pBuildTrusteeWithObjectsAndSidA = (void *)GetProcAddress (hmod, "BuildTrusteeWithObjectsAndSidA" ); - pGetTrusteeNameA = (void *)GetProcAddress (hmod, "GetTrusteeNameA" ); - if( !pBuildTrusteeWithSidA || !pBuildTrusteeWithNameA || - !pBuildTrusteeWithObjectsAndNameA || !pBuildTrusteeWithObjectsAndSidA || - !pGetTrusteeNameA ) - return; - - if ( ! AllocateAndInitializeSid( &auth, 1, 42, 0,0,0,0,0,0,0,&psid ) ) - { - trace( "failed to init SID\n" ); - return; - } - - /* test BuildTrusteeWithSidA */ - memset( &trustee, 0xff, sizeof trustee ); - pBuildTrusteeWithSidA( &trustee, psid ); - - ok( trustee.pMultipleTrustee == NULL, "pMultipleTrustee wrong\n"); - ok( trustee.MultipleTrusteeOperation == NO_MULTIPLE_TRUSTEE, - "MultipleTrusteeOperation wrong\n"); - ok( trustee.TrusteeForm == TRUSTEE_IS_SID, "TrusteeForm wrong\n"); - ok( trustee.TrusteeType == TRUSTEE_IS_UNKNOWN, "TrusteeType wrong\n"); - ok( trustee.ptstrName == psid, "ptstrName wrong\n" ); - - /* test BuildTrusteeWithObjectsAndSidA (test 1) */ - memset( &trustee, 0xff, sizeof trustee ); - memset( &oas, 0xff, sizeof(oas) ); - pBuildTrusteeWithObjectsAndSidA(&trustee, &oas, &ObjectType, - &InheritedObjectType, psid); - - ok(trustee.pMultipleTrustee == NULL, "pMultipleTrustee wrong\n"); - ok(trustee.MultipleTrusteeOperation == NO_MULTIPLE_TRUSTEE, "MultipleTrusteeOperation wrong\n"); - ok(trustee.TrusteeForm == TRUSTEE_IS_OBJECTS_AND_SID, "TrusteeForm wrong\n"); - ok(trustee.TrusteeType == TRUSTEE_IS_UNKNOWN, "TrusteeType wrong\n"); - ok(trustee.ptstrName == (LPSTR)&oas, "ptstrName wrong\n"); - - ok(oas.ObjectsPresent == (ACE_OBJECT_TYPE_PRESENT | ACE_INHERITED_OBJECT_TYPE_PRESENT), "ObjectsPresent wrong\n"); - ok(!memcmp(&oas.ObjectTypeGuid, &ObjectType, sizeof(GUID)), "ObjectTypeGuid wrong\n"); - ok(!memcmp(&oas.InheritedObjectTypeGuid, &InheritedObjectType, sizeof(GUID)), "InheritedObjectTypeGuid wrong\n"); - ok(oas.pSid == psid, "pSid wrong\n"); - - /* test GetTrusteeNameA */ - ok(pGetTrusteeNameA(&trustee) == (LPSTR)&oas, "GetTrusteeName returned wrong value\n"); - - /* test BuildTrusteeWithObjectsAndSidA (test 2) */ - memset( &trustee, 0xff, sizeof trustee ); - memset( &oas, 0xff, sizeof(oas) ); - pBuildTrusteeWithObjectsAndSidA(&trustee, &oas, NULL, - &InheritedObjectType, psid); - - ok(trustee.pMultipleTrustee == NULL, "pMultipleTrustee wrong\n"); - ok(trustee.MultipleTrusteeOperation == NO_MULTIPLE_TRUSTEE, "MultipleTrusteeOperation wrong\n"); - ok(trustee.TrusteeForm == TRUSTEE_IS_OBJECTS_AND_SID, "TrusteeForm wrong\n"); - ok(trustee.TrusteeType == TRUSTEE_IS_UNKNOWN, "TrusteeType wrong\n"); - ok(trustee.ptstrName == (LPSTR)&oas, "ptstrName wrong\n"); - - ok(oas.ObjectsPresent == ACE_INHERITED_OBJECT_TYPE_PRESENT, "ObjectsPresent wrong\n"); - ok(!memcmp(&oas.ObjectTypeGuid, &ZeroGuid, sizeof(GUID)), "ObjectTypeGuid wrong\n"); - ok(!memcmp(&oas.InheritedObjectTypeGuid, &InheritedObjectType, sizeof(GUID)), "InheritedObjectTypeGuid wrong\n"); - ok(oas.pSid == psid, "pSid wrong\n"); - - FreeSid( psid ); - - /* test BuildTrusteeWithNameA */ - memset( &trustee, 0xff, sizeof trustee ); - pBuildTrusteeWithNameA( &trustee, szTrusteeName ); - - ok( trustee.pMultipleTrustee == NULL, "pMultipleTrustee wrong\n"); - ok( trustee.MultipleTrusteeOperation == NO_MULTIPLE_TRUSTEE, - "MultipleTrusteeOperation wrong\n"); - ok( trustee.TrusteeForm == TRUSTEE_IS_NAME, "TrusteeForm wrong\n"); - ok( trustee.TrusteeType == TRUSTEE_IS_UNKNOWN, "TrusteeType wrong\n"); - ok( trustee.ptstrName == szTrusteeName, "ptstrName wrong\n" ); - - /* test BuildTrusteeWithObjectsAndNameA (test 1) */ - memset( &trustee, 0xff, sizeof trustee ); - memset( &oan, 0xff, sizeof(oan) ); - pBuildTrusteeWithObjectsAndNameA(&trustee, &oan, SE_KERNEL_OBJECT, szObjectTypeName, - szInheritedObjectTypeName, szTrusteeName); - - ok(trustee.pMultipleTrustee == NULL, "pMultipleTrustee wrong\n"); - ok(trustee.MultipleTrusteeOperation == NO_MULTIPLE_TRUSTEE, "MultipleTrusteeOperation wrong\n"); - ok(trustee.TrusteeForm == TRUSTEE_IS_OBJECTS_AND_NAME, "TrusteeForm wrong\n"); - ok(trustee.TrusteeType == TRUSTEE_IS_UNKNOWN, "TrusteeType wrong\n"); - ok(trustee.ptstrName == (LPTSTR)&oan, "ptstrName wrong\n"); - - ok(oan.ObjectsPresent == (ACE_OBJECT_TYPE_PRESENT | ACE_INHERITED_OBJECT_TYPE_PRESENT), "ObjectsPresent wrong\n"); - ok(oan.ObjectType == SE_KERNEL_OBJECT, "ObjectType wrong\n"); - ok(oan.InheritedObjectTypeName == szInheritedObjectTypeName, "InheritedObjectTypeName wrong\n"); - ok(oan.ptstrName == szTrusteeName, "szTrusteeName wrong\n"); - - /* test GetTrusteeNameA */ - ok(pGetTrusteeNameA(&trustee) == (LPSTR)&oan, "GetTrusteeName returned wrong value\n"); - - /* test BuildTrusteeWithObjectsAndNameA (test 2) */ - memset( &trustee, 0xff, sizeof trustee ); - memset( &oan, 0xff, sizeof(oan) ); - pBuildTrusteeWithObjectsAndNameA(&trustee, &oan, SE_KERNEL_OBJECT, NULL, - szInheritedObjectTypeName, szTrusteeName); - - ok(trustee.pMultipleTrustee == NULL, "pMultipleTrustee wrong\n"); - ok(trustee.MultipleTrusteeOperation == NO_MULTIPLE_TRUSTEE, "MultipleTrusteeOperation wrong\n"); - ok(trustee.TrusteeForm == TRUSTEE_IS_OBJECTS_AND_NAME, "TrusteeForm wrong\n"); - ok(trustee.TrusteeType == TRUSTEE_IS_UNKNOWN, "TrusteeType wrong\n"); - ok(trustee.ptstrName == (LPSTR)&oan, "ptstrName wrong\n"); - - ok(oan.ObjectsPresent == ACE_INHERITED_OBJECT_TYPE_PRESENT, "ObjectsPresent wrong\n"); - ok(oan.ObjectType == SE_KERNEL_OBJECT, "ObjectType wrong\n"); - ok(oan.InheritedObjectTypeName == szInheritedObjectTypeName, "InheritedObjectTypeName wrong\n"); - ok(oan.ptstrName == szTrusteeName, "szTrusteeName wrong\n"); - - /* test BuildTrusteeWithObjectsAndNameA (test 3) */ - memset( &trustee, 0xff, sizeof trustee ); - memset( &oan, 0xff, sizeof(oan) ); - pBuildTrusteeWithObjectsAndNameA(&trustee, &oan, SE_KERNEL_OBJECT, szObjectTypeName, - NULL, szTrusteeName); - - ok(trustee.pMultipleTrustee == NULL, "pMultipleTrustee wrong\n"); - ok(trustee.MultipleTrusteeOperation == NO_MULTIPLE_TRUSTEE, "MultipleTrusteeOperation wrong\n"); - ok(trustee.TrusteeForm == TRUSTEE_IS_OBJECTS_AND_NAME, "TrusteeForm wrong\n"); - ok(trustee.TrusteeType == TRUSTEE_IS_UNKNOWN, "TrusteeType wrong\n"); - ok(trustee.ptstrName == (LPTSTR)&oan, "ptstrName wrong\n"); - - ok(oan.ObjectsPresent == ACE_OBJECT_TYPE_PRESENT, "ObjectsPresent wrong\n"); - ok(oan.ObjectType == SE_KERNEL_OBJECT, "ObjectType wrong\n"); - ok(oan.InheritedObjectTypeName == NULL, "InheritedObjectTypeName wrong\n"); - ok(oan.ptstrName == szTrusteeName, "szTrusteeName wrong\n"); -} - -/* If the first isn't defined, assume none is */ -#ifndef SE_MIN_WELL_KNOWN_PRIVILEGE -#define SE_MIN_WELL_KNOWN_PRIVILEGE 2L -#define SE_CREATE_TOKEN_PRIVILEGE 2L -#define SE_ASSIGNPRIMARYTOKEN_PRIVILEGE 3L -#define SE_LOCK_MEMORY_PRIVILEGE 4L -#define SE_INCREASE_QUOTA_PRIVILEGE 5L -#define SE_MACHINE_ACCOUNT_PRIVILEGE 6L -#define SE_TCB_PRIVILEGE 7L -#define SE_SECURITY_PRIVILEGE 8L -#define SE_TAKE_OWNERSHIP_PRIVILEGE 9L -#define SE_LOAD_DRIVER_PRIVILEGE 10L -#define SE_SYSTEM_PROFILE_PRIVILEGE 11L -#define SE_SYSTEMTIME_PRIVILEGE 12L -#define SE_PROF_SINGLE_PROCESS_PRIVILEGE 13L -#define SE_INC_BASE_PRIORITY_PRIVILEGE 14L -#define SE_CREATE_PAGEFILE_PRIVILEGE 15L -#define SE_CREATE_PERMANENT_PRIVILEGE 16L -#define SE_BACKUP_PRIVILEGE 17L -#define SE_RESTORE_PRIVILEGE 18L -#define SE_SHUTDOWN_PRIVILEGE 19L -#define SE_DEBUG_PRIVILEGE 20L -#define SE_AUDIT_PRIVILEGE 21L -#define SE_SYSTEM_ENVIRONMENT_PRIVILEGE 22L -#define SE_CHANGE_NOTIFY_PRIVILEGE 23L -#define SE_REMOTE_SHUTDOWN_PRIVILEGE 24L -#define SE_UNDOCK_PRIVILEGE 25L -#define SE_SYNC_AGENT_PRIVILEGE 26L -#define SE_ENABLE_DELEGATION_PRIVILEGE 27L -#define SE_MANAGE_VOLUME_PRIVILEGE 28L -#define SE_IMPERSONATE_PRIVILEGE 29L -#define SE_CREATE_GLOBAL_PRIVILEGE 30L -#define SE_MAX_WELL_KNOWN_PRIVILEGE SE_CREATE_GLOBAL_PRIVILEGE -#endif /* ndef SE_MIN_WELL_KNOWN_PRIVILEGE */ - -static void test_allocateLuid(void) -{ - BOOL (WINAPI *pAllocateLocallyUniqueId)(PLUID); - LUID luid1, luid2; - BOOL ret; - - pAllocateLocallyUniqueId = (void*)GetProcAddress(hmod, "AllocateLocallyUniqueId"); - if (!pAllocateLocallyUniqueId) return; - - ret = pAllocateLocallyUniqueId(&luid1); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - return; - - ok(ret, - "AllocateLocallyUniqueId failed: %d\n", GetLastError()); - ret = pAllocateLocallyUniqueId(&luid2); - ok( ret, - "AllocateLocallyUniqueId failed: %d\n", GetLastError()); - ok(luid1.LowPart > SE_MAX_WELL_KNOWN_PRIVILEGE || luid1.HighPart != 0, - "AllocateLocallyUniqueId returned a well-known LUID\n"); - ok(luid1.LowPart != luid2.LowPart || luid1.HighPart != luid2.HighPart, - "AllocateLocallyUniqueId returned non-unique LUIDs\n"); - ret = pAllocateLocallyUniqueId(NULL); - ok( !ret && GetLastError() == ERROR_NOACCESS, - "AllocateLocallyUniqueId(NULL) didn't return ERROR_NOACCESS: %d\n", - GetLastError()); -} - -static void test_lookupPrivilegeName(void) -{ - BOOL (WINAPI *pLookupPrivilegeNameA)(LPCSTR, PLUID, LPSTR, LPDWORD); - char buf[MAX_PATH]; /* arbitrary, seems long enough */ - DWORD cchName = sizeof(buf); - LUID luid = { 0, 0 }; - LONG i; - BOOL ret; - - /* check whether it's available first */ - pLookupPrivilegeNameA = (void*)GetProcAddress(hmod, "LookupPrivilegeNameA"); - if (!pLookupPrivilegeNameA) return; - luid.LowPart = SE_CREATE_TOKEN_PRIVILEGE; - ret = pLookupPrivilegeNameA(NULL, &luid, buf, &cchName); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - return; - - /* check with a short buffer */ - cchName = 0; - luid.LowPart = SE_CREATE_TOKEN_PRIVILEGE; - ret = pLookupPrivilegeNameA(NULL, &luid, NULL, &cchName); - ok( !ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "LookupPrivilegeNameA didn't fail with ERROR_INSUFFICIENT_BUFFER: %d\n", - GetLastError()); - ok(cchName == strlen("SeCreateTokenPrivilege") + 1, - "LookupPrivilegeNameA returned an incorrect required length for\n" - "SeCreateTokenPrivilege (got %d, expected %d)\n", cchName, - lstrlenA("SeCreateTokenPrivilege") + 1); - /* check a known value and its returned length on success */ - cchName = sizeof(buf); - ok(pLookupPrivilegeNameA(NULL, &luid, buf, &cchName) && - cchName == strlen("SeCreateTokenPrivilege"), - "LookupPrivilegeNameA returned an incorrect output length for\n" - "SeCreateTokenPrivilege (got %d, expected %d)\n", cchName, - (int)strlen("SeCreateTokenPrivilege")); - /* check known values */ - for (i = SE_MIN_WELL_KNOWN_PRIVILEGE; i <= SE_MAX_WELL_KNOWN_PRIVILEGE; i++) - { - luid.LowPart = i; - cchName = sizeof(buf); - ret = pLookupPrivilegeNameA(NULL, &luid, buf, &cchName); - ok( ret || GetLastError() == ERROR_NO_SUCH_PRIVILEGE, - "LookupPrivilegeNameA(0.%d) failed: %d\n", i, GetLastError()); - } - /* check a bogus LUID */ - luid.LowPart = 0xdeadbeef; - cchName = sizeof(buf); - ret = pLookupPrivilegeNameA(NULL, &luid, buf, &cchName); - ok( !ret && GetLastError() == ERROR_NO_SUCH_PRIVILEGE, - "LookupPrivilegeNameA didn't fail with ERROR_NO_SUCH_PRIVILEGE: %d\n", - GetLastError()); - /* check on a bogus system */ - luid.LowPart = SE_CREATE_TOKEN_PRIVILEGE; - cchName = sizeof(buf); - ret = pLookupPrivilegeNameA("b0gu5.Nam3", &luid, buf, &cchName); - ok( !ret && (GetLastError() == RPC_S_SERVER_UNAVAILABLE || - GetLastError() == RPC_S_INVALID_NET_ADDR) /* w2k8 */, - "LookupPrivilegeNameA didn't fail with RPC_S_SERVER_UNAVAILABLE or RPC_S_INVALID_NET_ADDR: %d\n", - GetLastError()); -} - -struct NameToLUID -{ - const char *name; - DWORD lowPart; -}; - -static void test_lookupPrivilegeValue(void) -{ - static const struct NameToLUID privs[] = { - { "SeCreateTokenPrivilege", SE_CREATE_TOKEN_PRIVILEGE }, - { "SeAssignPrimaryTokenPrivilege", SE_ASSIGNPRIMARYTOKEN_PRIVILEGE }, - { "SeLockMemoryPrivilege", SE_LOCK_MEMORY_PRIVILEGE }, - { "SeIncreaseQuotaPrivilege", SE_INCREASE_QUOTA_PRIVILEGE }, - { "SeMachineAccountPrivilege", SE_MACHINE_ACCOUNT_PRIVILEGE }, - { "SeTcbPrivilege", SE_TCB_PRIVILEGE }, - { "SeSecurityPrivilege", SE_SECURITY_PRIVILEGE }, - { "SeTakeOwnershipPrivilege", SE_TAKE_OWNERSHIP_PRIVILEGE }, - { "SeLoadDriverPrivilege", SE_LOAD_DRIVER_PRIVILEGE }, - { "SeSystemProfilePrivilege", SE_SYSTEM_PROFILE_PRIVILEGE }, - { "SeSystemtimePrivilege", SE_SYSTEMTIME_PRIVILEGE }, - { "SeProfileSingleProcessPrivilege", SE_PROF_SINGLE_PROCESS_PRIVILEGE }, - { "SeIncreaseBasePriorityPrivilege", SE_INC_BASE_PRIORITY_PRIVILEGE }, - { "SeCreatePagefilePrivilege", SE_CREATE_PAGEFILE_PRIVILEGE }, - { "SeCreatePermanentPrivilege", SE_CREATE_PERMANENT_PRIVILEGE }, - { "SeBackupPrivilege", SE_BACKUP_PRIVILEGE }, - { "SeRestorePrivilege", SE_RESTORE_PRIVILEGE }, - { "SeShutdownPrivilege", SE_SHUTDOWN_PRIVILEGE }, - { "SeDebugPrivilege", SE_DEBUG_PRIVILEGE }, - { "SeAuditPrivilege", SE_AUDIT_PRIVILEGE }, - { "SeSystemEnvironmentPrivilege", SE_SYSTEM_ENVIRONMENT_PRIVILEGE }, - { "SeChangeNotifyPrivilege", SE_CHANGE_NOTIFY_PRIVILEGE }, - { "SeRemoteShutdownPrivilege", SE_REMOTE_SHUTDOWN_PRIVILEGE }, - { "SeUndockPrivilege", SE_UNDOCK_PRIVILEGE }, - { "SeSyncAgentPrivilege", SE_SYNC_AGENT_PRIVILEGE }, - { "SeEnableDelegationPrivilege", SE_ENABLE_DELEGATION_PRIVILEGE }, - { "SeManageVolumePrivilege", SE_MANAGE_VOLUME_PRIVILEGE }, - { "SeImpersonatePrivilege", SE_IMPERSONATE_PRIVILEGE }, - { "SeCreateGlobalPrivilege", SE_CREATE_GLOBAL_PRIVILEGE }, - }; - BOOL (WINAPI *pLookupPrivilegeValueA)(LPCSTR, LPCSTR, PLUID); - unsigned int i; - LUID luid; - BOOL ret; - - /* check whether it's available first */ - pLookupPrivilegeValueA = (void*)GetProcAddress(hmod, "LookupPrivilegeValueA"); - if (!pLookupPrivilegeValueA) return; - ret = pLookupPrivilegeValueA(NULL, "SeCreateTokenPrivilege", &luid); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - return; - - /* check a bogus system name */ - ret = pLookupPrivilegeValueA("b0gu5.Nam3", "SeCreateTokenPrivilege", &luid); - ok( !ret && (GetLastError() == RPC_S_SERVER_UNAVAILABLE || - GetLastError() == RPC_S_INVALID_NET_ADDR) /* w2k8 */, - "LookupPrivilegeValueA didn't fail with RPC_S_SERVER_UNAVAILABLE or RPC_S_INVALID_NET_ADDR: %d\n", - GetLastError()); - /* check a NULL string */ - ret = pLookupPrivilegeValueA(NULL, 0, &luid); - ok( !ret && GetLastError() == ERROR_NO_SUCH_PRIVILEGE, - "LookupPrivilegeValueA didn't fail with ERROR_NO_SUCH_PRIVILEGE: %d\n", - GetLastError()); - /* check a bogus privilege name */ - ret = pLookupPrivilegeValueA(NULL, "SeBogusPrivilege", &luid); - ok( !ret && GetLastError() == ERROR_NO_SUCH_PRIVILEGE, - "LookupPrivilegeValueA didn't fail with ERROR_NO_SUCH_PRIVILEGE: %d\n", - GetLastError()); - /* check case insensitive */ - ret = pLookupPrivilegeValueA(NULL, "sEcREATEtOKENpRIVILEGE", &luid); - ok( ret, - "LookupPrivilegeValueA(NULL, sEcREATEtOKENpRIVILEGE, &luid) failed: %d\n", - GetLastError()); - for (i = 0; i < sizeof(privs) / sizeof(privs[0]); i++) - { - /* Not all privileges are implemented on all Windows versions, so - * don't worry if the call fails - */ - if (pLookupPrivilegeValueA(NULL, privs[i].name, &luid)) - { - ok(luid.LowPart == privs[i].lowPart, - "LookupPrivilegeValueA returned an invalid LUID for %s\n", - privs[i].name); - } - } -} - -static void test_luid(void) -{ - test_allocateLuid(); - test_lookupPrivilegeName(); - test_lookupPrivilegeValue(); -} - -static void test_FileSecurity(void) -{ - char wintmpdir [MAX_PATH]; - char path [MAX_PATH]; - char file [MAX_PATH]; - HANDLE fh, token; - DWORD sdSize, retSize, rc, granted, priv_set_len; - PRIVILEGE_SET priv_set; - BOOL status; - BYTE *sd; - GENERIC_MAPPING mapping = { FILE_READ_DATA, FILE_WRITE_DATA, FILE_EXECUTE, FILE_ALL_ACCESS }; - const SECURITY_INFORMATION request = OWNER_SECURITY_INFORMATION - | GROUP_SECURITY_INFORMATION - | DACL_SECURITY_INFORMATION; - - if (!pGetFileSecurityA) { - win_skip ("GetFileSecurity is not available\n"); - return; - } - - if (!pSetFileSecurityA) { - win_skip ("SetFileSecurity is not available\n"); - return; - } - - if (!GetTempPathA (sizeof (wintmpdir), wintmpdir)) { - win_skip ("GetTempPathA failed\n"); - return; - } - - /* Create a temporary directory and in it a temporary file */ - strcat (strcpy (path, wintmpdir), "rary"); - SetLastError(0xdeadbeef); - rc = CreateDirectoryA (path, NULL); - ok (rc || GetLastError() == ERROR_ALREADY_EXISTS, "CreateDirectoryA " - "failed for '%s' with %d\n", path, GetLastError()); - - strcat (strcpy (file, path), "\\ess"); - SetLastError(0xdeadbeef); - fh = CreateFileA (file, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - ok (fh != INVALID_HANDLE_VALUE, "CreateFileA " - "failed for '%s' with %d\n", file, GetLastError()); - CloseHandle (fh); - - /* For the temporary file ... */ - - /* Get size needed */ - retSize = 0; - SetLastError(0xdeadbeef); - rc = pGetFileSecurityA (file, request, NULL, 0, &retSize); - if (!rc && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) { - win_skip("GetFileSecurityA is not implemented\n"); - goto cleanup; - } - ok (!rc, "GetFileSecurityA " - "was expected to fail for '%s'\n", file); - ok (GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetFileSecurityA " - "returned %d; expected ERROR_INSUFFICIENT_BUFFER\n", GetLastError()); - ok (retSize > sizeof (SECURITY_DESCRIPTOR), "GetFileSecurityA returned size %d\n", retSize); - - sdSize = retSize; - sd = HeapAlloc (GetProcessHeap (), 0, sdSize); - - /* Get security descriptor for real */ - retSize = -1; - SetLastError(0xdeadbeef); - rc = pGetFileSecurityA (file, request, sd, sdSize, &retSize); - ok (rc, "GetFileSecurityA " - "was not expected to fail '%s': %d\n", file, GetLastError()); - ok (retSize == sdSize || - broken(retSize == 0), /* NT4 */ - "GetFileSecurityA returned size %d; expected %d\n", retSize, sdSize); - - /* Use it to set security descriptor */ - SetLastError(0xdeadbeef); - rc = pSetFileSecurityA (file, request, sd); - ok (rc, "SetFileSecurityA " - "was not expected to fail '%s': %d\n", file, GetLastError()); - - HeapFree (GetProcessHeap (), 0, sd); - - /* Repeat for the temporary directory ... */ - - /* Get size needed */ - retSize = 0; - SetLastError(0xdeadbeef); - rc = pGetFileSecurityA (path, request, NULL, 0, &retSize); - ok (!rc, "GetFileSecurityA " - "was expected to fail for '%s'\n", path); - ok (GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetFileSecurityA " - "returned %d; expected ERROR_INSUFFICIENT_BUFFER\n", GetLastError()); - ok (retSize > sizeof (SECURITY_DESCRIPTOR), "GetFileSecurityA returned size %d\n", retSize); - - sdSize = retSize; - sd = HeapAlloc (GetProcessHeap (), 0, sdSize); - - /* Get security descriptor for real */ - retSize = -1; - SetLastError(0xdeadbeef); - rc = pGetFileSecurityA (path, request, sd, sdSize, &retSize); - ok (rc, "GetFileSecurityA " - "was not expected to fail '%s': %d\n", path, GetLastError()); - ok (retSize == sdSize || - broken(retSize == 0), /* NT4 */ - "GetFileSecurityA returned size %d; expected %d\n", retSize, sdSize); - - /* Use it to set security descriptor */ - SetLastError(0xdeadbeef); - rc = pSetFileSecurityA (path, request, sd); - ok (rc, "SetFileSecurityA " - "was not expected to fail '%s': %d\n", path, GetLastError()); - HeapFree (GetProcessHeap (), 0, sd); - - /* Old test */ - strcpy (wintmpdir, "\\Should not exist"); - SetLastError(0xdeadbeef); - rc = pGetFileSecurityA (wintmpdir, OWNER_SECURITY_INFORMATION, NULL, 0, &sdSize); - ok (!rc, "GetFileSecurityA should fail for not existing directories/files\n"); - ok (GetLastError() == ERROR_FILE_NOT_FOUND, - "last error ERROR_FILE_NOT_FOUND expected, got %d\n", GetLastError()); - -cleanup: - /* Remove temporary file and directory */ - DeleteFileA(file); - RemoveDirectoryA(path); - - /* Test file access permissions for a file with FILE_ATTRIBUTE_ARCHIVE */ - SetLastError(0xdeadbeef); - rc = GetTempPath(sizeof(wintmpdir), wintmpdir); - ok(rc, "GetTempPath error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - rc = GetTempFileName(wintmpdir, "tmp", 0, file); - ok(rc, "GetTempFileName error %d\n", GetLastError()); - - rc = GetFileAttributes(file); - rc &= ~FILE_ATTRIBUTE_NOT_CONTENT_INDEXED; - ok(rc == FILE_ATTRIBUTE_ARCHIVE, "expected FILE_ATTRIBUTE_ARCHIVE got %#x\n", rc); - - retSize = 0xdeadbeef; - rc = GetFileSecurity(file, OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|DACL_SECURITY_INFORMATION, - NULL, 0, &sdSize); - ok(!rc, "GetFileSecurity should fail\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "expected ERROR_INSUFFICIENT_BUFFER got %d\n", GetLastError()); - ok(sdSize > sizeof(SECURITY_DESCRIPTOR), "got sd size %d\n", sdSize); - - sd = HeapAlloc(GetProcessHeap (), 0, sdSize); - retSize = 0xdeadbeef; - SetLastError(0xdeadbeef); - rc = GetFileSecurity(file, OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|DACL_SECURITY_INFORMATION, - sd, sdSize, &retSize); - ok(rc, "GetFileSecurity error %d\n", GetLastError()); - ok(retSize == sdSize || broken(retSize == 0) /* NT4 */, "expected %d, got %d\n", sdSize, retSize); - - SetLastError(0xdeadbeef); - rc = OpenThreadToken(GetCurrentThread(), TOKEN_QUERY, TRUE, &token); - ok(!rc, "OpenThreadToken should fail\n"); - ok(GetLastError() == ERROR_NO_TOKEN, "expected ERROR_NO_TOKEN, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - rc = ImpersonateSelf(SecurityIdentification); - ok(rc, "ImpersonateSelf error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - rc = OpenThreadToken(GetCurrentThread(), TOKEN_QUERY, TRUE, &token); - ok(rc, "OpenThreadToken error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - rc = RevertToSelf(); - ok(rc, "RevertToSelf error %d\n", GetLastError()); - - priv_set_len = sizeof(priv_set); - granted = 0xdeadbeef; - status = 0xdeadbeef; - SetLastError(0xdeadbeef); - rc = AccessCheck(sd, token, FILE_READ_DATA, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); - ok(status == 1, "expected 1, got %d\n", status); - ok(granted == FILE_READ_DATA, "expected FILE_READ_DATA, got %#x\n", granted); - - granted = 0xdeadbeef; - status = 0xdeadbeef; - SetLastError(0xdeadbeef); - rc = AccessCheck(sd, token, FILE_WRITE_DATA, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); - ok(status == 1, "expected 1, got %d\n", status); - ok(granted == FILE_WRITE_DATA, "expected FILE_WRITE_DATA, got %#x\n", granted); - - granted = 0xdeadbeef; - status = 0xdeadbeef; - SetLastError(0xdeadbeef); - rc = AccessCheck(sd, token, FILE_EXECUTE, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); - ok(status == 1, "expected 1, got %d\n", status); - ok(granted == FILE_EXECUTE, "expected FILE_EXECUTE, got %#x\n", granted); - - granted = 0xdeadbeef; - status = 0xdeadbeef; - SetLastError(0xdeadbeef); - rc = AccessCheck(sd, token, DELETE, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); - ok(status == 1, "expected 1, got %d\n", status); - ok(granted == DELETE, "expected DELETE, got %#x\n", granted); - - granted = 0xdeadbeef; - status = 0xdeadbeef; - SetLastError(0xdeadbeef); - rc = AccessCheck(sd, token, FILE_DELETE_CHILD, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); - ok(status == 1, "expected 1, got %d\n", status); - ok(granted == FILE_DELETE_CHILD, "expected FILE_DELETE_CHILD, got %#x\n", granted); - - granted = 0xdeadbeef; - status = 0xdeadbeef; - SetLastError(0xdeadbeef); - rc = AccessCheck(sd, token, 0x1ff, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); - ok(status == 1, "expected 1, got %d\n", status); - ok(granted == 0x1ff, "expected 0x1ff, got %#x\n", granted); - - granted = 0xdeadbeef; - status = 0xdeadbeef; - SetLastError(0xdeadbeef); - rc = AccessCheck(sd, token, FILE_ALL_ACCESS, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); - ok(status == 1, "expected 1, got %d\n", status); - ok(granted == FILE_ALL_ACCESS, "expected FILE_ALL_ACCESS, got %#x\n", granted); - - SetLastError(0xdeadbeef); - rc = AccessCheck(sd, token, 0xffffffff, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(!rc, "AccessCheck should fail\n"); - ok(GetLastError() == ERROR_GENERIC_NOT_MAPPED, "expected ERROR_GENERIC_NOT_MAPPED, got %d\n", GetLastError()); - - /* Test file access permissions for a file with FILE_ATTRIBUTE_READONLY */ - SetLastError(0xdeadbeef); - fh = CreateFile(file, FILE_READ_DATA, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_READONLY, 0); - ok(fh != INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); - retSize = 0xdeadbeef; - SetLastError(0xdeadbeef); - rc = WriteFile(fh, "1", 1, &retSize, NULL); - ok(!rc, "WriteFile should fail\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); - ok(retSize == 0, "expected 0, got %d\n", retSize); - CloseHandle(fh); - - rc = GetFileAttributes(file); - rc &= ~FILE_ATTRIBUTE_NOT_CONTENT_INDEXED; -todo_wine - ok(rc == (FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY), - "expected FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY got %#x\n", rc); - - SetLastError(0xdeadbeef); - rc = SetFileAttributes(file, FILE_ATTRIBUTE_ARCHIVE); - ok(rc, "SetFileAttributes error %d\n", GetLastError()); - SetLastError(0xdeadbeef); - rc = DeleteFile(file); - ok(rc, "DeleteFile error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - fh = CreateFile(file, FILE_READ_DATA, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_READONLY, 0); - ok(fh != INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); - retSize = 0xdeadbeef; - SetLastError(0xdeadbeef); - rc = WriteFile(fh, "1", 1, &retSize, NULL); - ok(!rc, "WriteFile should fail\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); - ok(retSize == 0, "expected 0, got %d\n", retSize); - CloseHandle(fh); - - rc = GetFileAttributes(file); - rc &= ~FILE_ATTRIBUTE_NOT_CONTENT_INDEXED; - ok(rc == (FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY), - "expected FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY got %#x\n", rc); - - retSize = 0xdeadbeef; - SetLastError(0xdeadbeef); - rc = GetFileSecurity(file, OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|DACL_SECURITY_INFORMATION, - sd, sdSize, &retSize); - ok(rc, "GetFileSecurity error %d\n", GetLastError()); - ok(retSize == sdSize || broken(retSize == 0) /* NT4 */, "expected %d, got %d\n", sdSize, retSize); - - priv_set_len = sizeof(priv_set); - granted = 0xdeadbeef; - status = 0xdeadbeef; - SetLastError(0xdeadbeef); - rc = AccessCheck(sd, token, FILE_READ_DATA, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); - ok(status == 1, "expected 1, got %d\n", status); - ok(granted == FILE_READ_DATA, "expected FILE_READ_DATA, got %#x\n", granted); - - granted = 0xdeadbeef; - status = 0xdeadbeef; - SetLastError(0xdeadbeef); - rc = AccessCheck(sd, token, FILE_WRITE_DATA, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); -todo_wine { - ok(status == 1, "expected 1, got %d\n", status); - ok(granted == FILE_WRITE_DATA, "expected FILE_WRITE_DATA, got %#x\n", granted); -} - granted = 0xdeadbeef; - status = 0xdeadbeef; - SetLastError(0xdeadbeef); - rc = AccessCheck(sd, token, FILE_EXECUTE, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); - ok(status == 1, "expected 1, got %d\n", status); - ok(granted == FILE_EXECUTE, "expected FILE_EXECUTE, got %#x\n", granted); - - granted = 0xdeadbeef; - status = 0xdeadbeef; - SetLastError(0xdeadbeef); - rc = AccessCheck(sd, token, DELETE, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); -todo_wine { - ok(status == 1, "expected 1, got %d\n", status); - ok(granted == DELETE, "expected DELETE, got %#x\n", granted); -} - granted = 0xdeadbeef; - status = 0xdeadbeef; - SetLastError(0xdeadbeef); - rc = AccessCheck(sd, token, FILE_DELETE_CHILD, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); -todo_wine { - ok(status == 1, "expected 1, got %d\n", status); - ok(granted == FILE_DELETE_CHILD, "expected FILE_DELETE_CHILD, got %#x\n", granted); -} - granted = 0xdeadbeef; - status = 0xdeadbeef; - SetLastError(0xdeadbeef); - rc = AccessCheck(sd, token, 0x1ff, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); -todo_wine { - ok(status == 1, "expected 1, got %d\n", status); - ok(granted == 0x1ff, "expected 0x1ff, got %#x\n", granted); -} - granted = 0xdeadbeef; - status = 0xdeadbeef; - SetLastError(0xdeadbeef); - rc = AccessCheck(sd, token, FILE_ALL_ACCESS, &mapping, &priv_set, &priv_set_len, &granted, &status); - ok(rc, "AccessCheck error %d\n", GetLastError()); -todo_wine { - ok(status == 1, "expected 1, got %d\n", status); - ok(granted == FILE_ALL_ACCESS, "expected FILE_ALL_ACCESS, got %#x\n", granted); -} - SetLastError(0xdeadbeef); - rc = DeleteFile(file); - ok(!rc, "DeleteFile should fail\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); - SetLastError(0xdeadbeef); - rc = SetFileAttributes(file, FILE_ATTRIBUTE_ARCHIVE); - ok(rc, "SetFileAttributes error %d\n", GetLastError()); - SetLastError(0xdeadbeef); - rc = DeleteFile(file); - ok(rc, "DeleteFile error %d\n", GetLastError()); - - CloseHandle(token); - HeapFree(GetProcessHeap(), 0, sd); -} - -static void test_AccessCheck(void) -{ - PSID EveryoneSid = NULL, AdminSid = NULL, UsersSid = NULL; - PACL Acl = NULL; - SECURITY_DESCRIPTOR *SecurityDescriptor = NULL; - SID_IDENTIFIER_AUTHORITY SIDAuthWorld = { SECURITY_WORLD_SID_AUTHORITY }; - SID_IDENTIFIER_AUTHORITY SIDAuthNT = { SECURITY_NT_AUTHORITY }; - GENERIC_MAPPING Mapping = { KEY_READ, KEY_WRITE, KEY_EXECUTE, KEY_ALL_ACCESS }; - ACCESS_MASK Access; - BOOL AccessStatus; - HANDLE Token; - HANDLE ProcessToken; - BOOL ret; - DWORD PrivSetLen; - PRIVILEGE_SET *PrivSet; - BOOL res; - HMODULE NtDllModule; - BOOLEAN Enabled; - DWORD err; - NTSTATUS ntret, ntAccessStatus; - - NtDllModule = GetModuleHandle("ntdll.dll"); - if (!NtDllModule) - { - skip("not running on NT, skipping test\n"); - return; - } - pRtlAdjustPrivilege = (void *)GetProcAddress(NtDllModule, "RtlAdjustPrivilege"); - if (!pRtlAdjustPrivilege) - { - win_skip("missing RtlAdjustPrivilege, skipping test\n"); - return; - } - - Acl = HeapAlloc(GetProcessHeap(), 0, 256); - res = InitializeAcl(Acl, 256, ACL_REVISION); - if(!res && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - skip("ACLs not implemented - skipping tests\n"); - HeapFree(GetProcessHeap(), 0, Acl); - return; - } - ok(res, "InitializeAcl failed with error %d\n", GetLastError()); - - res = AllocateAndInitializeSid( &SIDAuthWorld, 1, SECURITY_WORLD_RID, 0, 0, 0, 0, 0, 0, 0, &EveryoneSid); - ok(res, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); - - res = AllocateAndInitializeSid( &SIDAuthNT, 2, SECURITY_BUILTIN_DOMAIN_RID, - DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &AdminSid); - ok(res, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); - - res = AllocateAndInitializeSid( &SIDAuthNT, 2, SECURITY_BUILTIN_DOMAIN_RID, - DOMAIN_ALIAS_RID_USERS, 0, 0, 0, 0, 0, 0, &UsersSid); - ok(res, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); - - SecurityDescriptor = HeapAlloc(GetProcessHeap(), 0, SECURITY_DESCRIPTOR_MIN_LENGTH); - - res = InitializeSecurityDescriptor(SecurityDescriptor, SECURITY_DESCRIPTOR_REVISION); - ok(res, "InitializeSecurityDescriptor failed with error %d\n", GetLastError()); - - res = SetSecurityDescriptorDacl(SecurityDescriptor, TRUE, Acl, FALSE); - ok(res, "SetSecurityDescriptorDacl failed with error %d\n", GetLastError()); - - PrivSetLen = FIELD_OFFSET(PRIVILEGE_SET, Privilege[16]); - PrivSet = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, PrivSetLen); - PrivSet->PrivilegeCount = 16; - - res = OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE|TOKEN_QUERY, &ProcessToken); - ok(res, "OpenProcessToken failed with error %d\n", GetLastError()); - - pRtlAdjustPrivilege(SE_SECURITY_PRIVILEGE, FALSE, TRUE, &Enabled); - - res = DuplicateToken(ProcessToken, SecurityImpersonation, &Token); - ok(res, "DuplicateToken failed with error %d\n", GetLastError()); - - /* SD without owner/group */ - SetLastError(0xdeadbeef); - Access = AccessStatus = 0x1abe11ed; - ret = AccessCheck(SecurityDescriptor, Token, KEY_QUERY_VALUE, &Mapping, - PrivSet, &PrivSetLen, &Access, &AccessStatus); - err = GetLastError(); - ok(!ret && err == ERROR_INVALID_SECURITY_DESCR, "AccessCheck should have " - "failed with ERROR_INVALID_SECURITY_DESCR, instead of %d\n", err); - ok(Access == 0x1abe11ed && AccessStatus == 0x1abe11ed, - "Access and/or AccessStatus were changed!\n"); - - /* Set owner and group */ - res = SetSecurityDescriptorOwner(SecurityDescriptor, AdminSid, FALSE); - ok(res, "SetSecurityDescriptorOwner failed with error %d\n", GetLastError()); - res = SetSecurityDescriptorGroup(SecurityDescriptor, UsersSid, TRUE); - ok(res, "SetSecurityDescriptorGroup failed with error %d\n", GetLastError()); - - /* Generic access mask */ - SetLastError(0xdeadbeef); - Access = AccessStatus = 0x1abe11ed; - ret = AccessCheck(SecurityDescriptor, Token, GENERIC_READ, &Mapping, - PrivSet, &PrivSetLen, &Access, &AccessStatus); - err = GetLastError(); - ok(!ret && err == ERROR_GENERIC_NOT_MAPPED, "AccessCheck should have failed " - "with ERROR_GENERIC_NOT_MAPPED, instead of %d\n", err); - ok(Access == 0x1abe11ed && AccessStatus == 0x1abe11ed, - "Access and/or AccessStatus were changed!\n"); - - /* Generic access mask - no privilegeset buffer */ - SetLastError(0xdeadbeef); - Access = AccessStatus = 0x1abe11ed; - ret = AccessCheck(SecurityDescriptor, Token, GENERIC_READ, &Mapping, - NULL, &PrivSetLen, &Access, &AccessStatus); - err = GetLastError(); - ok(!ret && err == ERROR_NOACCESS, "AccessCheck should have failed " - "with ERROR_NOACCESS, instead of %d\n", err); - ok(Access == 0x1abe11ed && AccessStatus == 0x1abe11ed, - "Access and/or AccessStatus were changed!\n"); - - /* Generic access mask - no returnlength */ - SetLastError(0xdeadbeef); - Access = AccessStatus = 0x1abe11ed; - ret = AccessCheck(SecurityDescriptor, Token, GENERIC_READ, &Mapping, - PrivSet, NULL, &Access, &AccessStatus); - err = GetLastError(); - ok(!ret && err == ERROR_NOACCESS, "AccessCheck should have failed " - "with ERROR_NOACCESS, instead of %d\n", err); - ok(Access == 0x1abe11ed && AccessStatus == 0x1abe11ed, - "Access and/or AccessStatus were changed!\n"); - - /* Generic access mask - no privilegeset buffer, no returnlength */ - SetLastError(0xdeadbeef); - Access = AccessStatus = 0x1abe11ed; - ret = AccessCheck(SecurityDescriptor, Token, GENERIC_READ, &Mapping, - NULL, NULL, &Access, &AccessStatus); - err = GetLastError(); - ok(!ret && err == ERROR_NOACCESS, "AccessCheck should have failed " - "with ERROR_NOACCESS, instead of %d\n", err); - ok(Access == 0x1abe11ed && AccessStatus == 0x1abe11ed, - "Access and/or AccessStatus were changed!\n"); - - /* sd with no dacl present */ - Access = AccessStatus = 0x1abe11ed; - ret = SetSecurityDescriptorDacl(SecurityDescriptor, FALSE, NULL, FALSE); - ok(ret, "SetSecurityDescriptorDacl failed with error %d\n", GetLastError()); - ret = AccessCheck(SecurityDescriptor, Token, KEY_READ, &Mapping, - PrivSet, &PrivSetLen, &Access, &AccessStatus); - ok(ret, "AccessCheck failed with error %d\n", GetLastError()); - ok(AccessStatus && (Access == KEY_READ), - "AccessCheck failed to grant access with error %d\n", - GetLastError()); - - /* sd with no dacl present - no privilegeset buffer */ - SetLastError(0xdeadbeef); - Access = AccessStatus = 0x1abe11ed; - ret = AccessCheck(SecurityDescriptor, Token, GENERIC_READ, &Mapping, - NULL, &PrivSetLen, &Access, &AccessStatus); - err = GetLastError(); - ok(!ret && err == ERROR_NOACCESS, "AccessCheck should have failed " - "with ERROR_NOACCESS, instead of %d\n", err); - ok(Access == 0x1abe11ed && AccessStatus == 0x1abe11ed, - "Access and/or AccessStatus were changed!\n"); - - if(pNtAccessCheck) - { - /* Generic access mask - no privilegeset buffer */ - SetLastError(0xdeadbeef); - Access = ntAccessStatus = 0x1abe11ed; - ntret = pNtAccessCheck(SecurityDescriptor, Token, GENERIC_READ, &Mapping, - NULL, &PrivSetLen, &Access, &ntAccessStatus); - err = GetLastError(); - ok(ntret == STATUS_ACCESS_VIOLATION, - "NtAccessCheck should have failed with STATUS_ACCESS_VIOLATION, got %x\n", ntret); - ok(err == 0xdeadbeef, - "NtAccessCheck shouldn't set last error, got %d\n", err); - ok(Access == 0x1abe11ed && ntAccessStatus == 0x1abe11ed, - "Access and/or AccessStatus were changed!\n"); - - /* Generic access mask - no returnlength */ - SetLastError(0xdeadbeef); - Access = ntAccessStatus = 0x1abe11ed; - ntret = pNtAccessCheck(SecurityDescriptor, Token, GENERIC_READ, &Mapping, - PrivSet, NULL, &Access, &ntAccessStatus); - err = GetLastError(); - ok(ntret == STATUS_ACCESS_VIOLATION, - "NtAccessCheck should have failed with STATUS_ACCESS_VIOLATION, got %x\n", ntret); - ok(err == 0xdeadbeef, - "NtAccessCheck shouldn't set last error, got %d\n", err); - ok(Access == 0x1abe11ed && ntAccessStatus == 0x1abe11ed, - "Access and/or AccessStatus were changed!\n"); - - /* Generic access mask - no privilegeset buffer, no returnlength */ - SetLastError(0xdeadbeef); - Access = ntAccessStatus = 0x1abe11ed; - ntret = pNtAccessCheck(SecurityDescriptor, Token, GENERIC_READ, &Mapping, - NULL, NULL, &Access, &ntAccessStatus); - err = GetLastError(); - ok(ntret == STATUS_ACCESS_VIOLATION, - "NtAccessCheck should have failed with STATUS_ACCESS_VIOLATION, got %x\n", ntret); - ok(err == 0xdeadbeef, - "NtAccessCheck shouldn't set last error, got %d\n", err); - ok(Access == 0x1abe11ed && ntAccessStatus == 0x1abe11ed, - "Access and/or AccessStatus were changed!\n"); - } - else - win_skip("NtAccessCheck unavailable. Skipping.\n"); - - /* sd with NULL dacl */ - Access = AccessStatus = 0x1abe11ed; - ret = SetSecurityDescriptorDacl(SecurityDescriptor, TRUE, NULL, FALSE); - ok(ret, "SetSecurityDescriptorDacl failed with error %d\n", GetLastError()); - ret = AccessCheck(SecurityDescriptor, Token, KEY_READ, &Mapping, - PrivSet, &PrivSetLen, &Access, &AccessStatus); - ok(ret, "AccessCheck failed with error %d\n", GetLastError()); - ok(AccessStatus && (Access == KEY_READ), - "AccessCheck failed to grant access with error %d\n", - GetLastError()); - - /* sd with blank dacl */ - ret = SetSecurityDescriptorDacl(SecurityDescriptor, TRUE, Acl, FALSE); - ok(ret, "SetSecurityDescriptorDacl failed with error %d\n", GetLastError()); - ret = AccessCheck(SecurityDescriptor, Token, KEY_READ, &Mapping, - PrivSet, &PrivSetLen, &Access, &AccessStatus); - ok(ret, "AccessCheck failed with error %d\n", GetLastError()); - err = GetLastError(); - ok(!AccessStatus && err == ERROR_ACCESS_DENIED, "AccessCheck should have failed " - "with ERROR_ACCESS_DENIED, instead of %d\n", err); - ok(!Access, "Should have failed to grant any access, got 0x%08x\n", Access); - - res = AddAccessAllowedAce(Acl, ACL_REVISION, KEY_READ, EveryoneSid); - ok(res, "AddAccessAllowedAce failed with error %d\n", GetLastError()); - - res = AddAccessDeniedAce(Acl, ACL_REVISION, KEY_SET_VALUE, AdminSid); - ok(res, "AddAccessDeniedAce failed with error %d\n", GetLastError()); - - /* sd with dacl */ - Access = AccessStatus = 0x1abe11ed; - ret = AccessCheck(SecurityDescriptor, Token, KEY_READ, &Mapping, - PrivSet, &PrivSetLen, &Access, &AccessStatus); - ok(ret, "AccessCheck failed with error %d\n", GetLastError()); - ok(AccessStatus && (Access == KEY_READ), - "AccessCheck failed to grant access with error %d\n", - GetLastError()); - - ret = AccessCheck(SecurityDescriptor, Token, MAXIMUM_ALLOWED, &Mapping, - PrivSet, &PrivSetLen, &Access, &AccessStatus); - ok(ret, "AccessCheck failed with error %d\n", GetLastError()); - ok(AccessStatus, - "AccessCheck failed to grant any access with error %d\n", - GetLastError()); - trace("AccessCheck with MAXIMUM_ALLOWED got Access 0x%08x\n", Access); - - /* Access denied by SD */ - SetLastError(0xdeadbeef); - Access = AccessStatus = 0x1abe11ed; - ret = AccessCheck(SecurityDescriptor, Token, KEY_WRITE, &Mapping, - PrivSet, &PrivSetLen, &Access, &AccessStatus); - ok(ret, "AccessCheck failed with error %d\n", GetLastError()); - err = GetLastError(); - ok(!AccessStatus && err == ERROR_ACCESS_DENIED, "AccessCheck should have failed " - "with ERROR_ACCESS_DENIED, instead of %d\n", err); - ok(!Access, "Should have failed to grant any access, got 0x%08x\n", Access); - - SetLastError(0); - PrivSet->PrivilegeCount = 16; - ret = AccessCheck(SecurityDescriptor, Token, ACCESS_SYSTEM_SECURITY, &Mapping, - PrivSet, &PrivSetLen, &Access, &AccessStatus); - ok(ret && !AccessStatus && GetLastError() == ERROR_PRIVILEGE_NOT_HELD, - "AccessCheck should have failed with ERROR_PRIVILEGE_NOT_HELD, instead of %d\n", - GetLastError()); - - ret = ImpersonateLoggedOnUser(Token); - ok(ret, "ImpersonateLoggedOnUser failed with error %d\n", GetLastError()); - ret = pRtlAdjustPrivilege(SE_SECURITY_PRIVILEGE, TRUE, TRUE, &Enabled); - if (!ret) - { - SetLastError(0); - PrivSet->PrivilegeCount = 16; - ret = AccessCheck(SecurityDescriptor, Token, ACCESS_SYSTEM_SECURITY, &Mapping, - PrivSet, &PrivSetLen, &Access, &AccessStatus); - ok(ret && AccessStatus && GetLastError() == 0, - "AccessCheck should have succeeded, error %d\n", - GetLastError()); - ok(Access == ACCESS_SYSTEM_SECURITY, - "Access should be equal to ACCESS_SYSTEM_SECURITY instead of 0x%08x\n", - Access); - } - else - trace("Couldn't get SE_SECURITY_PRIVILEGE (0x%08x), skipping ACCESS_SYSTEM_SECURITY test\n", - ret); - ret = RevertToSelf(); - ok(ret, "RevertToSelf failed with error %d\n", GetLastError()); - - /* test INHERIT_ONLY_ACE */ - ret = InitializeAcl(Acl, 256, ACL_REVISION); - ok(ret, "InitializeAcl failed with error %d\n", GetLastError()); - - /* NT doesn't have AddAccessAllowedAceEx. Skipping this call/test doesn't influence - * the next ones. - */ - if (pAddAccessAllowedAceEx) - { - ret = pAddAccessAllowedAceEx(Acl, ACL_REVISION, INHERIT_ONLY_ACE, KEY_READ, EveryoneSid); - ok(ret, "AddAccessAllowedAceEx failed with error %d\n", GetLastError()); - } - else - win_skip("AddAccessAllowedAceEx is not available\n"); - - ret = AccessCheck(SecurityDescriptor, Token, KEY_READ, &Mapping, - PrivSet, &PrivSetLen, &Access, &AccessStatus); - ok(ret, "AccessCheck failed with error %d\n", GetLastError()); - err = GetLastError(); - ok(!AccessStatus && err == ERROR_ACCESS_DENIED, "AccessCheck should have failed " - "with ERROR_ACCESS_DENIED, instead of %d\n", err); - ok(!Access, "Should have failed to grant any access, got 0x%08x\n", Access); - - CloseHandle(Token); - - res = DuplicateToken(ProcessToken, SecurityAnonymous, &Token); - ok(res, "DuplicateToken failed with error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = AccessCheck(SecurityDescriptor, Token, MAXIMUM_ALLOWED, &Mapping, - PrivSet, &PrivSetLen, &Access, &AccessStatus); - err = GetLastError(); - ok(!ret && err == ERROR_BAD_IMPERSONATION_LEVEL, "AccessCheck should have failed " - "with ERROR_BAD_IMPERSONATION_LEVEL, instead of %d\n", err); - - CloseHandle(Token); - - SetLastError(0xdeadbeef); - ret = AccessCheck(SecurityDescriptor, ProcessToken, KEY_READ, &Mapping, - PrivSet, &PrivSetLen, &Access, &AccessStatus); - err = GetLastError(); - ok(!ret && err == ERROR_NO_IMPERSONATION_TOKEN, "AccessCheck should have failed " - "with ERROR_NO_IMPERSONATION_TOKEN, instead of %d\n", err); - - CloseHandle(ProcessToken); - - if (EveryoneSid) - FreeSid(EveryoneSid); - if (AdminSid) - FreeSid(AdminSid); - if (UsersSid) - FreeSid(UsersSid); - HeapFree(GetProcessHeap(), 0, Acl); - HeapFree(GetProcessHeap(), 0, SecurityDescriptor); - HeapFree(GetProcessHeap(), 0, PrivSet); -} - -/* test GetTokenInformation for the various attributes */ -static void test_token_attr(void) -{ - HANDLE Token, ImpersonationToken; - DWORD Size, Size2; - TOKEN_PRIVILEGES *Privileges; - TOKEN_GROUPS *Groups; - TOKEN_USER *User; - TOKEN_DEFAULT_DACL *Dacl; - BOOL ret; - DWORD i, GLE; - LPSTR SidString; - SECURITY_IMPERSONATION_LEVEL ImpersonationLevel; - ACL *acl; - - /* cygwin-like use case */ - SetLastError(0xdeadbeef); - ret = OpenProcessToken(GetCurrentProcess(), MAXIMUM_ALLOWED, &Token); - if(!ret && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) - { - win_skip("OpenProcessToken is not implemented\n"); - return; - } - ok(ret, "OpenProcessToken failed with error %d\n", GetLastError()); - if (ret) - { - DWORD buf[256]; /* GetTokenInformation wants a dword-aligned buffer */ - Size = sizeof(buf); - ret = GetTokenInformation(Token, TokenUser,(void*)buf, Size, &Size); - ok(ret, "GetTokenInformation failed with error %d\n", GetLastError()); - Size = sizeof(ImpersonationLevel); - ret = GetTokenInformation(Token, TokenImpersonationLevel, &ImpersonationLevel, Size, &Size); - GLE = GetLastError(); - ok(!ret && (GLE == ERROR_INVALID_PARAMETER), "GetTokenInformation(TokenImpersonationLevel) on primary token should have failed with ERROR_INVALID_PARAMETER instead of %d\n", GLE); - CloseHandle(Token); - } - - if(!pConvertSidToStringSidA) - { - win_skip("ConvertSidToStringSidA is not available\n"); - return; - } - - SetLastError(0xdeadbeef); - ret = OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &Token); - ok(ret, "OpenProcessToken failed with error %d\n", GetLastError()); - - /* groups */ - /* insufficient buffer length */ - SetLastError(0xdeadbeef); - Size2 = 0; - ret = GetTokenInformation(Token, TokenGroups, NULL, 0, &Size2); - ok(Size2 > 1, "got %d\n", Size2); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "%d with error %d\n", ret, GetLastError()); - Size2 -= 1; - Groups = HeapAlloc(GetProcessHeap(), 0, Size2); - memset(Groups, 0xcc, Size2); - Size = 0; - ret = GetTokenInformation(Token, TokenGroups, Groups, Size2, &Size); - ok(Size > 1, "got %d\n", Size); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "%d with error %d\n", ret, GetLastError()); - ok(*((BYTE*)Groups) == 0xcc, "buffer altered\n"); - HeapFree(GetProcessHeap(), 0, Groups); - - SetLastError(0xdeadbeef); - ret = GetTokenInformation(Token, TokenGroups, NULL, 0, &Size); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "GetTokenInformation(TokenGroups) %s with error %d\n", - ret ? "succeeded" : "failed", GetLastError()); - Groups = HeapAlloc(GetProcessHeap(), 0, Size); - SetLastError(0xdeadbeef); - ret = GetTokenInformation(Token, TokenGroups, Groups, Size, &Size); - ok(ret, "GetTokenInformation(TokenGroups) failed with error %d\n", GetLastError()); - ok(GetLastError() == 0xdeadbeef, - "GetTokenInformation shouldn't have set last error to %d\n", - GetLastError()); - trace("TokenGroups:\n"); - for (i = 0; i < Groups->GroupCount; i++) - { - DWORD NameLength = 255; - TCHAR Name[255]; - DWORD DomainLength = 255; - TCHAR Domain[255]; - SID_NAME_USE SidNameUse; - Name[0] = '\0'; - Domain[0] = '\0'; - ret = LookupAccountSid(NULL, Groups->Groups[i].Sid, Name, &NameLength, Domain, &DomainLength, &SidNameUse); - if (ret) - { - pConvertSidToStringSidA(Groups->Groups[i].Sid, &SidString); - trace("%s, %s\\%s use: %d attr: 0x%08x\n", SidString, Domain, Name, SidNameUse, Groups->Groups[i].Attributes); - LocalFree(SidString); - } - else trace("attr: 0x%08x LookupAccountSid failed with error %d\n", Groups->Groups[i].Attributes, GetLastError()); - } - HeapFree(GetProcessHeap(), 0, Groups); - - /* user */ - ret = GetTokenInformation(Token, TokenUser, NULL, 0, &Size); - ok(!ret && (GetLastError() == ERROR_INSUFFICIENT_BUFFER), - "GetTokenInformation(TokenUser) failed with error %d\n", GetLastError()); - User = HeapAlloc(GetProcessHeap(), 0, Size); - ret = GetTokenInformation(Token, TokenUser, User, Size, &Size); - ok(ret, - "GetTokenInformation(TokenUser) failed with error %d\n", GetLastError()); - - pConvertSidToStringSidA(User->User.Sid, &SidString); - trace("TokenUser: %s attr: 0x%08x\n", SidString, User->User.Attributes); - LocalFree(SidString); - HeapFree(GetProcessHeap(), 0, User); - - /* privileges */ - ret = GetTokenInformation(Token, TokenPrivileges, NULL, 0, &Size); - ok(!ret && (GetLastError() == ERROR_INSUFFICIENT_BUFFER), - "GetTokenInformation(TokenPrivileges) failed with error %d\n", GetLastError()); - Privileges = HeapAlloc(GetProcessHeap(), 0, Size); - ret = GetTokenInformation(Token, TokenPrivileges, Privileges, Size, &Size); - ok(ret, - "GetTokenInformation(TokenPrivileges) failed with error %d\n", GetLastError()); - trace("TokenPrivileges:\n"); - for (i = 0; i < Privileges->PrivilegeCount; i++) - { - TCHAR Name[256]; - DWORD NameLen = sizeof(Name)/sizeof(Name[0]); - LookupPrivilegeName(NULL, &Privileges->Privileges[i].Luid, Name, &NameLen); - trace("\t%s, 0x%x\n", Name, Privileges->Privileges[i].Attributes); - } - HeapFree(GetProcessHeap(), 0, Privileges); - - ret = DuplicateToken(Token, SecurityAnonymous, &ImpersonationToken); - ok(ret, "DuplicateToken failed with error %d\n", GetLastError()); - - Size = sizeof(ImpersonationLevel); - ret = GetTokenInformation(ImpersonationToken, TokenImpersonationLevel, &ImpersonationLevel, Size, &Size); - ok(ret, "GetTokenInformation(TokenImpersonationLevel) failed with error %d\n", GetLastError()); - ok(ImpersonationLevel == SecurityAnonymous, "ImpersonationLevel should have been SecurityAnonymous instead of %d\n", ImpersonationLevel); - - CloseHandle(ImpersonationToken); - - /* default dacl */ - ret = GetTokenInformation(Token, TokenDefaultDacl, NULL, 0, &Size); - ok(!ret && (GetLastError() == ERROR_INSUFFICIENT_BUFFER), - "GetTokenInformation(TokenDefaultDacl) failed with error %u\n", GetLastError()); - - Dacl = HeapAlloc(GetProcessHeap(), 0, Size); - ret = GetTokenInformation(Token, TokenDefaultDacl, Dacl, Size, &Size); - ok(ret, "GetTokenInformation(TokenDefaultDacl) failed with error %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = SetTokenInformation(Token, TokenDefaultDacl, NULL, 0); - GLE = GetLastError(); - ok(!ret, "SetTokenInformation(TokenDefaultDacl) succeeded\n"); - ok(GLE == ERROR_BAD_LENGTH, "expected ERROR_BAD_LENGTH got %u\n", GLE); - - SetLastError(0xdeadbeef); - ret = SetTokenInformation(Token, TokenDefaultDacl, NULL, Size); - GLE = GetLastError(); - ok(!ret, "SetTokenInformation(TokenDefaultDacl) succeeded\n"); - ok(GLE == ERROR_NOACCESS, "expected ERROR_NOACCESS got %u\n", GLE); - - acl = Dacl->DefaultDacl; - Dacl->DefaultDacl = NULL; - - ret = SetTokenInformation(Token, TokenDefaultDacl, Dacl, Size); - ok(ret, "SetTokenInformation(TokenDefaultDacl) succeeded\n"); - - Size2 = 0; - Dacl->DefaultDacl = (ACL *)0xdeadbeef; - ret = GetTokenInformation(Token, TokenDefaultDacl, Dacl, Size, &Size2); - ok(ret, "GetTokenInformation(TokenDefaultDacl) failed with error %u\n", GetLastError()); - ok(Dacl->DefaultDacl == NULL, "expected NULL, got %p\n", Dacl->DefaultDacl); - ok(Size2 == sizeof(TOKEN_DEFAULT_DACL) || broken(Size2 == 2*sizeof(TOKEN_DEFAULT_DACL)), /* WoW64 */ - "got %u expected sizeof(TOKEN_DEFAULT_DACL)\n", Size2); - - Dacl->DefaultDacl = acl; - ret = SetTokenInformation(Token, TokenDefaultDacl, Dacl, Size); - ok(ret, "SetTokenInformation(TokenDefaultDacl) failed with error %u\n", GetLastError()); - - if (Size2 == sizeof(TOKEN_DEFAULT_DACL)) { - ret = GetTokenInformation(Token, TokenDefaultDacl, Dacl, Size, &Size2); - ok(ret, "GetTokenInformation(TokenDefaultDacl) failed with error %u\n", GetLastError()); - } else - win_skip("TOKEN_DEFAULT_DACL size too small on WoW64\n"); - - HeapFree(GetProcessHeap(), 0, Dacl); - CloseHandle(Token); -} - -typedef union _MAX_SID -{ - SID sid; - char max[SECURITY_MAX_SID_SIZE]; -} MAX_SID; - -static void test_sid_str(PSID * sid) -{ - char *str_sid; - BOOL ret = pConvertSidToStringSidA(sid, &str_sid); - ok(ret, "ConvertSidToStringSidA() failed: %d\n", GetLastError()); - if (ret) - { - char account[MAX_PATH], domain[MAX_PATH]; - SID_NAME_USE use; - DWORD acc_size = MAX_PATH; - DWORD dom_size = MAX_PATH; - ret = LookupAccountSid(NULL, sid, account, &acc_size, domain, &dom_size, &use); - ok(ret || (!ret && (GetLastError() == ERROR_NONE_MAPPED)), - "LookupAccountSid(%s) failed: %d\n", str_sid, GetLastError()); - if (ret) - trace(" %s %s\\%s %d\n", str_sid, domain, account, use); - else if (GetLastError() == ERROR_NONE_MAPPED) - trace(" %s couldn't be mapped\n", str_sid); - LocalFree(str_sid); - } -} - -static const struct well_known_sid_value -{ - BOOL without_domain; - const char *sid_string; -} well_known_sid_values[] = { -/* 0 */ {TRUE, "S-1-0-0"}, {TRUE, "S-1-1-0"}, {TRUE, "S-1-2-0"}, {TRUE, "S-1-3-0"}, -/* 4 */ {TRUE, "S-1-3-1"}, {TRUE, "S-1-3-2"}, {TRUE, "S-1-3-3"}, {TRUE, "S-1-5"}, -/* 8 */ {FALSE, "S-1-5-1"}, {TRUE, "S-1-5-2"}, {TRUE, "S-1-5-3"}, {TRUE, "S-1-5-4"}, -/* 12 */ {TRUE, "S-1-5-6"}, {TRUE, "S-1-5-7"}, {TRUE, "S-1-5-8"}, {TRUE, "S-1-5-9"}, -/* 16 */ {TRUE, "S-1-5-10"}, {TRUE, "S-1-5-11"}, {TRUE, "S-1-5-12"}, {TRUE, "S-1-5-13"}, -/* 20 */ {TRUE, "S-1-5-14"}, {FALSE, NULL}, {TRUE, "S-1-5-18"}, {TRUE, "S-1-5-19"}, -/* 24 */ {TRUE, "S-1-5-20"}, {TRUE, "S-1-5-32"}, -/* 26 */ {FALSE, "S-1-5-32-544"}, {TRUE, "S-1-5-32-545"}, {TRUE, "S-1-5-32-546"}, -/* 29 */ {TRUE, "S-1-5-32-547"}, {TRUE, "S-1-5-32-548"}, {TRUE, "S-1-5-32-549"}, -/* 32 */ {TRUE, "S-1-5-32-550"}, {TRUE, "S-1-5-32-551"}, {TRUE, "S-1-5-32-552"}, -/* 35 */ {TRUE, "S-1-5-32-554"}, {TRUE, "S-1-5-32-555"}, {TRUE, "S-1-5-32-556"}, -/* 38 */ {FALSE, "S-1-5-21-12-23-34-45-56-500"}, {FALSE, "S-1-5-21-12-23-34-45-56-501"}, -/* 40 */ {FALSE, "S-1-5-21-12-23-34-45-56-502"}, {FALSE, "S-1-5-21-12-23-34-45-56-512"}, -/* 42 */ {FALSE, "S-1-5-21-12-23-34-45-56-513"}, {FALSE, "S-1-5-21-12-23-34-45-56-514"}, -/* 44 */ {FALSE, "S-1-5-21-12-23-34-45-56-515"}, {FALSE, "S-1-5-21-12-23-34-45-56-516"}, -/* 46 */ {FALSE, "S-1-5-21-12-23-34-45-56-517"}, {FALSE, "S-1-5-21-12-23-34-45-56-518"}, -/* 48 */ {FALSE, "S-1-5-21-12-23-34-45-56-519"}, {FALSE, "S-1-5-21-12-23-34-45-56-520"}, -/* 50 */ {FALSE, "S-1-5-21-12-23-34-45-56-553"}, -/* Added in Windows Server 2003 */ -/* 51 */ {TRUE, "S-1-5-64-10"}, {TRUE, "S-1-5-64-21"}, {TRUE, "S-1-5-64-14"}, -/* 54 */ {TRUE, "S-1-5-15"}, {TRUE, "S-1-5-1000"}, {FALSE, "S-1-5-32-557"}, -/* 57 */ {TRUE, "S-1-5-32-558"}, {TRUE, "S-1-5-32-559"}, {TRUE, "S-1-5-32-560"}, -/* 60 */ {TRUE, "S-1-5-32-561"}, {TRUE, "S-1-5-32-562"}, -/* Added in Windows Vista: */ -/* 62 */ {TRUE, "S-1-5-32-568"}, -/* 63 */ {TRUE, "S-1-5-17"}, {FALSE, "S-1-5-32-569"}, {TRUE, "S-1-16-0"}, -/* 66 */ {TRUE, "S-1-16-4096"}, {TRUE, "S-1-16-8192"}, {TRUE, "S-1-16-12288"}, -/* 69 */ {TRUE, "S-1-16-16384"}, {TRUE, "S-1-5-33"}, {TRUE, "S-1-3-4"}, -/* 72 */ {FALSE, "S-1-5-21-12-23-34-45-56-571"}, {FALSE, "S-1-5-21-12-23-34-45-56-572"}, -/* 74 */ {TRUE, "S-1-5-22"}, {FALSE, "S-1-5-21-12-23-34-45-56-521"}, {TRUE, "S-1-5-32-573"} -}; - -static void test_CreateWellKnownSid(void) -{ - SID_IDENTIFIER_AUTHORITY ident = { SECURITY_NT_AUTHORITY }; - PSID domainsid, sid; - DWORD size, error; - BOOL ret; - unsigned int i; - - if (!pCreateWellKnownSid) - { - win_skip("CreateWellKnownSid not available\n"); - return; - } - - size = 0; - SetLastError(0xdeadbeef); - ret = pCreateWellKnownSid(WinInteractiveSid, NULL, NULL, &size); - error = GetLastError(); - ok(!ret, "CreateWellKnownSid succeeded\n"); - ok(error == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER, got %u\n", error); - ok(size, "expected size > 0\n"); - - SetLastError(0xdeadbeef); - ret = pCreateWellKnownSid(WinInteractiveSid, NULL, NULL, &size); - error = GetLastError(); - ok(!ret, "CreateWellKnownSid succeeded\n"); - ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error); - - sid = HeapAlloc(GetProcessHeap(), 0, size); - ret = pCreateWellKnownSid(WinInteractiveSid, NULL, sid, &size); - ok(ret, "CreateWellKnownSid failed %u\n", GetLastError()); - HeapFree(GetProcessHeap(), 0, sid); - - /* a domain sid usually have three subauthorities but we test that CreateWellKnownSid doesn't check it */ - AllocateAndInitializeSid(&ident, 6, SECURITY_NT_NON_UNIQUE, 12, 23, 34, 45, 56, 0, 0, &domainsid); - - for (i = 0; i < sizeof(well_known_sid_values)/sizeof(well_known_sid_values[0]); i++) - { - const struct well_known_sid_value *value = &well_known_sid_values[i]; - char sid_buffer[SECURITY_MAX_SID_SIZE]; - LPSTR str; - DWORD cb; - - if (value->sid_string == NULL) - continue; - - if (i > WinAccountRasAndIasServersSid) - { - /* These SIDs aren't implemented by all Windows versions - detect it and break the loop */ - cb = sizeof(sid_buffer); - if (!pCreateWellKnownSid(i, domainsid, sid_buffer, &cb)) - { - skip("Well known SIDs starting from %u are not implemented\n", i); - break; - } - } - - cb = sizeof(sid_buffer); - ok(pCreateWellKnownSid(i, value->without_domain ? NULL : domainsid, sid_buffer, &cb), "Couldn't create well known sid %u\n", i); - expect_eq(GetSidLengthRequired(*GetSidSubAuthorityCount(sid_buffer)), cb, DWORD, "%d"); - ok(IsValidSid(sid_buffer), "The sid is not valid\n"); - ok(pConvertSidToStringSidA(sid_buffer, &str), "Couldn't convert SID to string\n"); - ok(strcmp(str, value->sid_string) == 0, "SID mismatch - expected %s, got %s\n", - value->sid_string, str); - LocalFree(str); - - if (value->without_domain) - { - char buf2[SECURITY_MAX_SID_SIZE]; - cb = sizeof(buf2); - ok(pCreateWellKnownSid(i, domainsid, buf2, &cb), "Couldn't create well known sid %u with optional domain\n", i); - expect_eq(GetSidLengthRequired(*GetSidSubAuthorityCount(sid_buffer)), cb, DWORD, "%d"); - ok(memcmp(buf2, sid_buffer, cb) == 0, "SID create with domain is different than without (%u)\n", i); - } - } - - FreeSid(domainsid); -} - -static void test_LookupAccountSid(void) -{ - SID_IDENTIFIER_AUTHORITY SIDAuthNT = { SECURITY_NT_AUTHORITY }; - CHAR accountA[MAX_PATH], domainA[MAX_PATH], usernameA[MAX_PATH]; - DWORD acc_sizeA, dom_sizeA, user_sizeA; - DWORD real_acc_sizeA, real_dom_sizeA; - WCHAR accountW[MAX_PATH], domainW[MAX_PATH]; - DWORD acc_sizeW, dom_sizeW; - DWORD real_acc_sizeW, real_dom_sizeW; - PSID pUsersSid = NULL; - SID_NAME_USE use; - BOOL ret; - DWORD error, size, cbti = 0; - MAX_SID max_sid; - CHAR *str_sidA; - int i; - HANDLE hToken; - PTOKEN_USER ptiUser = NULL; - - /* native windows crashes if account size, domain size, or name use is NULL */ - - ret = AllocateAndInitializeSid(&SIDAuthNT, 2, SECURITY_BUILTIN_DOMAIN_RID, - DOMAIN_ALIAS_RID_USERS, 0, 0, 0, 0, 0, 0, &pUsersSid); - ok(ret || (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED), - "AllocateAndInitializeSid failed with error %d\n", GetLastError()); - - /* not running on NT so give up */ - if (!ret && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) - return; - - real_acc_sizeA = MAX_PATH; - real_dom_sizeA = MAX_PATH; - ret = LookupAccountSidA(NULL, pUsersSid, accountA, &real_acc_sizeA, domainA, &real_dom_sizeA, &use); - ok(ret, "LookupAccountSidA() Expected TRUE, got FALSE\n"); - - /* try NULL account */ - acc_sizeA = MAX_PATH; - dom_sizeA = MAX_PATH; - ret = LookupAccountSidA(NULL, pUsersSid, NULL, &acc_sizeA, domainA, &dom_sizeA, &use); - ok(ret, "LookupAccountSidA() Expected TRUE, got FALSE\n"); - - /* try NULL domain */ - acc_sizeA = MAX_PATH; - dom_sizeA = MAX_PATH; - ret = LookupAccountSidA(NULL, pUsersSid, accountA, &acc_sizeA, NULL, &dom_sizeA, &use); - ok(ret, "LookupAccountSidA() Expected TRUE, got FALSE\n"); - - /* try a small account buffer */ - acc_sizeA = 1; - dom_sizeA = MAX_PATH; - accountA[0] = 0; - ret = LookupAccountSidA(NULL, pUsersSid, accountA, &acc_sizeA, domainA, &dom_sizeA, &use); - ok(!ret, "LookupAccountSidA() Expected FALSE got TRUE\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "LookupAccountSidA() Expected ERROR_NOT_ENOUGH_MEMORY, got %u\n", GetLastError()); - - /* try a 0 sized account buffer */ - acc_sizeA = 0; - dom_sizeA = MAX_PATH; - accountA[0] = 0; - LookupAccountSidA(NULL, pUsersSid, accountA, &acc_sizeA, domainA, &dom_sizeA, &use); - /* this can fail or succeed depending on OS version but the size will always be returned */ - ok(acc_sizeA == real_acc_sizeA + 1, - "LookupAccountSidA() Expected acc_size = %u, got %u\n", - real_acc_sizeA + 1, acc_sizeA); - - /* try a 0 sized account buffer */ - acc_sizeA = 0; - dom_sizeA = MAX_PATH; - LookupAccountSidA(NULL, pUsersSid, NULL, &acc_sizeA, domainA, &dom_sizeA, &use); - /* this can fail or succeed depending on OS version but the size will always be returned */ - ok(acc_sizeA == real_acc_sizeA + 1, - "LookupAccountSid() Expected acc_size = %u, got %u\n", - real_acc_sizeA + 1, acc_sizeA); - - /* try a small domain buffer */ - dom_sizeA = 1; - acc_sizeA = MAX_PATH; - accountA[0] = 0; - ret = LookupAccountSidA(NULL, pUsersSid, accountA, &acc_sizeA, domainA, &dom_sizeA, &use); - ok(!ret, "LookupAccountSidA() Expected FALSE got TRUE\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "LookupAccountSidA() Expected ERROR_NOT_ENOUGH_MEMORY, got %u\n", GetLastError()); - - /* try a 0 sized domain buffer */ - dom_sizeA = 0; - acc_sizeA = MAX_PATH; - accountA[0] = 0; - LookupAccountSidA(NULL, pUsersSid, accountA, &acc_sizeA, domainA, &dom_sizeA, &use); - /* this can fail or succeed depending on OS version but the size will always be returned */ - ok(dom_sizeA == real_dom_sizeA + 1, - "LookupAccountSidA() Expected dom_size = %u, got %u\n", - real_dom_sizeA + 1, dom_sizeA); - - /* try a 0 sized domain buffer */ - dom_sizeA = 0; - acc_sizeA = MAX_PATH; - LookupAccountSidA(NULL, pUsersSid, accountA, &acc_sizeA, NULL, &dom_sizeA, &use); - /* this can fail or succeed depending on OS version but the size will always be returned */ - ok(dom_sizeA == real_dom_sizeA + 1, - "LookupAccountSidA() Expected dom_size = %u, got %u\n", - real_dom_sizeA + 1, dom_sizeA); - - real_acc_sizeW = MAX_PATH; - real_dom_sizeW = MAX_PATH; - ret = LookupAccountSidW(NULL, pUsersSid, accountW, &real_acc_sizeW, domainW, &real_dom_sizeW, &use); - ok(ret, "LookupAccountSidW() Expected TRUE, got FALSE\n"); - - /* try an invalid system name */ - real_acc_sizeA = MAX_PATH; - real_dom_sizeA = MAX_PATH; - ret = LookupAccountSidA("deepthought", pUsersSid, accountA, &real_acc_sizeA, domainA, &real_dom_sizeA, &use); - ok(!ret, "LookupAccountSidA() Expected FALSE got TRUE\n"); - ok(GetLastError() == RPC_S_SERVER_UNAVAILABLE || GetLastError() == RPC_S_INVALID_NET_ADDR /* Vista */, - "LookupAccountSidA() Expected RPC_S_SERVER_UNAVAILABLE or RPC_S_INVALID_NET_ADDR, got %u\n", GetLastError()); - - /* native windows crashes if domainW or accountW is NULL */ - - /* try a small account buffer */ - acc_sizeW = 1; - dom_sizeW = MAX_PATH; - accountW[0] = 0; - ret = LookupAccountSidW(NULL, pUsersSid, accountW, &acc_sizeW, domainW, &dom_sizeW, &use); - ok(!ret, "LookupAccountSidW() Expected FALSE got TRUE\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "LookupAccountSidW() Expected ERROR_NOT_ENOUGH_MEMORY, got %u\n", GetLastError()); - - /* try a 0 sized account buffer */ - acc_sizeW = 0; - dom_sizeW = MAX_PATH; - accountW[0] = 0; - LookupAccountSidW(NULL, pUsersSid, accountW, &acc_sizeW, domainW, &dom_sizeW, &use); - /* this can fail or succeed depending on OS version but the size will always be returned */ - ok(acc_sizeW == real_acc_sizeW + 1, - "LookupAccountSidW() Expected acc_size = %u, got %u\n", - real_acc_sizeW + 1, acc_sizeW); - - /* try a 0 sized account buffer */ - acc_sizeW = 0; - dom_sizeW = MAX_PATH; - LookupAccountSidW(NULL, pUsersSid, NULL, &acc_sizeW, domainW, &dom_sizeW, &use); - /* this can fail or succeed depending on OS version but the size will always be returned */ - ok(acc_sizeW == real_acc_sizeW + 1, - "LookupAccountSidW() Expected acc_size = %u, got %u\n", - real_acc_sizeW + 1, acc_sizeW); - - /* try a small domain buffer */ - dom_sizeW = 1; - acc_sizeW = MAX_PATH; - accountW[0] = 0; - ret = LookupAccountSidW(NULL, pUsersSid, accountW, &acc_sizeW, domainW, &dom_sizeW, &use); - ok(!ret, "LookupAccountSidW() Expected FALSE got TRUE\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "LookupAccountSidW() Expected ERROR_NOT_ENOUGH_MEMORY, got %u\n", GetLastError()); - - /* try a 0 sized domain buffer */ - dom_sizeW = 0; - acc_sizeW = MAX_PATH; - accountW[0] = 0; - LookupAccountSidW(NULL, pUsersSid, accountW, &acc_sizeW, domainW, &dom_sizeW, &use); - /* this can fail or succeed depending on OS version but the size will always be returned */ - ok(dom_sizeW == real_dom_sizeW + 1, - "LookupAccountSidW() Expected dom_size = %u, got %u\n", - real_dom_sizeW + 1, dom_sizeW); - - /* try a 0 sized domain buffer */ - dom_sizeW = 0; - acc_sizeW = MAX_PATH; - LookupAccountSidW(NULL, pUsersSid, accountW, &acc_sizeW, NULL, &dom_sizeW, &use); - /* this can fail or succeed depending on OS version but the size will always be returned */ - ok(dom_sizeW == real_dom_sizeW + 1, - "LookupAccountSidW() Expected dom_size = %u, got %u\n", - real_dom_sizeW + 1, dom_sizeW); - - acc_sizeW = dom_sizeW = use = 0; - SetLastError(0xdeadbeef); - ret = LookupAccountSidW(NULL, pUsersSid, NULL, &acc_sizeW, NULL, &dom_sizeW, &use); - error = GetLastError(); - ok(!ret, "LookupAccountSidW failed %u\n", GetLastError()); - ok(error == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER, got %u\n", error); - ok(acc_sizeW, "expected non-zero account size\n"); - ok(dom_sizeW, "expected non-zero domain size\n"); - ok(!use, "expected zero use %u\n", use); - - FreeSid(pUsersSid); - - /* Test LookupAccountSid with Sid retrieved from token information. - This assumes this process is running under the account of the current user.*/ - ret = OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY|TOKEN_DUPLICATE, &hToken); - ok(ret, "OpenProcessToken failed with error %d\n", GetLastError()); - ret = GetTokenInformation(hToken, TokenUser, NULL, 0, &cbti); - ok(!ret, "GetTokenInformation failed with error %d\n", GetLastError()); - ptiUser = HeapAlloc(GetProcessHeap(), 0, cbti); - if (GetTokenInformation(hToken, TokenUser, ptiUser, cbti, &cbti)) - { - acc_sizeA = dom_sizeA = MAX_PATH; - ret = LookupAccountSidA(NULL, ptiUser->User.Sid, accountA, &acc_sizeA, domainA, &dom_sizeA, &use); - ok(ret, "LookupAccountSidA() Expected TRUE, got FALSE\n"); - user_sizeA = MAX_PATH; - ret = GetUserNameA(usernameA , &user_sizeA); - ok(ret, "GetUserNameA() Expected TRUE, got FALSE\n"); - ok(lstrcmpA(usernameA, accountA) == 0, "LookupAccountSidA() Expected account name: %s got: %s\n", usernameA, accountA ); - } - HeapFree(GetProcessHeap(), 0, ptiUser); - - if (pCreateWellKnownSid && pConvertSidToStringSidA) - { - trace("Well Known SIDs:\n"); - for (i = 0; i <= 60; i++) - { - size = SECURITY_MAX_SID_SIZE; - if (pCreateWellKnownSid(i, NULL, &max_sid.sid, &size)) - { - if (pConvertSidToStringSidA(&max_sid.sid, &str_sidA)) - { - acc_sizeA = MAX_PATH; - dom_sizeA = MAX_PATH; - if (LookupAccountSidA(NULL, &max_sid.sid, accountA, &acc_sizeA, domainA, &dom_sizeA, &use)) - trace(" %d: %s %s\\%s %d\n", i, str_sidA, domainA, accountA, use); - LocalFree(str_sidA); - } - } - else - { - if (GetLastError() != ERROR_INVALID_PARAMETER) - trace(" CreateWellKnownSid(%d) failed: %d\n", i, GetLastError()); - else - trace(" %d: not supported\n", i); - } - } - - pLsaQueryInformationPolicy = (void *)GetProcAddress( hmod, "LsaQueryInformationPolicy"); - pLsaOpenPolicy = (void *)GetProcAddress( hmod, "LsaOpenPolicy"); - pLsaFreeMemory = (void *)GetProcAddress( hmod, "LsaFreeMemory"); - pLsaClose = (void *)GetProcAddress( hmod, "LsaClose"); - - if (pLsaQueryInformationPolicy && pLsaOpenPolicy && pLsaFreeMemory && pLsaClose) - { - NTSTATUS status; - LSA_HANDLE handle; - LSA_OBJECT_ATTRIBUTES object_attributes; - - ZeroMemory(&object_attributes, sizeof(object_attributes)); - object_attributes.Length = sizeof(object_attributes); - - status = pLsaOpenPolicy( NULL, &object_attributes, POLICY_ALL_ACCESS, &handle); - ok(status == STATUS_SUCCESS || status == STATUS_ACCESS_DENIED, - "LsaOpenPolicy(POLICY_ALL_ACCESS) returned 0x%08x\n", status); - - /* try a more restricted access mask if necessary */ - if (status == STATUS_ACCESS_DENIED) { - trace("LsaOpenPolicy(POLICY_ALL_ACCESS) failed, trying POLICY_VIEW_LOCAL_INFORMATION\n"); - status = pLsaOpenPolicy( NULL, &object_attributes, POLICY_VIEW_LOCAL_INFORMATION, &handle); - ok(status == STATUS_SUCCESS, "LsaOpenPolicy(POLICY_VIEW_LOCAL_INFORMATION) returned 0x%08x\n", status); - } - - if (status == STATUS_SUCCESS) - { - PPOLICY_ACCOUNT_DOMAIN_INFO info; - status = pLsaQueryInformationPolicy(handle, PolicyAccountDomainInformation, (PVOID*)&info); - ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy() failed, returned 0x%08x\n", status); - if (status == STATUS_SUCCESS) - { - ok(info->DomainSid!=0, "LsaQueryInformationPolicy(PolicyAccountDomainInformation) missing SID\n"); - if (info->DomainSid) - { - int count = *GetSidSubAuthorityCount(info->DomainSid); - CopySid(GetSidLengthRequired(count), &max_sid, info->DomainSid); - test_sid_str((PSID)&max_sid.sid); - max_sid.sid.SubAuthority[count] = DOMAIN_USER_RID_ADMIN; - max_sid.sid.SubAuthorityCount = count + 1; - test_sid_str((PSID)&max_sid.sid); - max_sid.sid.SubAuthority[count] = DOMAIN_USER_RID_GUEST; - test_sid_str((PSID)&max_sid.sid); - max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_ADMINS; - test_sid_str((PSID)&max_sid.sid); - max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_USERS; - test_sid_str((PSID)&max_sid.sid); - max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_GUESTS; - test_sid_str((PSID)&max_sid.sid); - max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_COMPUTERS; - test_sid_str((PSID)&max_sid.sid); - max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_CONTROLLERS; - test_sid_str((PSID)&max_sid.sid); - max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_CERT_ADMINS; - test_sid_str((PSID)&max_sid.sid); - max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_SCHEMA_ADMINS; - test_sid_str((PSID)&max_sid.sid); - max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_ENTERPRISE_ADMINS; - test_sid_str((PSID)&max_sid.sid); - max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_POLICY_ADMINS; - test_sid_str((PSID)&max_sid.sid); - max_sid.sid.SubAuthority[count] = DOMAIN_ALIAS_RID_RAS_SERVERS; - test_sid_str((PSID)&max_sid.sid); - max_sid.sid.SubAuthority[count] = 1000; /* first user account */ - test_sid_str((PSID)&max_sid.sid); - } - - pLsaFreeMemory((LPVOID)info); - } - - status = pLsaClose(handle); - ok(status == STATUS_SUCCESS, "LsaClose() failed, returned 0x%08x\n", status); - } - } - } -} - -static BOOL get_sid_info(PSID psid, LPSTR *user, LPSTR *dom) -{ - static CHAR account[UNLEN + 1]; - static CHAR domain[UNLEN + 1]; - DWORD size, dom_size; - SID_NAME_USE use; - - *user = account; - *dom = domain; - - size = dom_size = UNLEN + 1; - account[0] = '\0'; - domain[0] = '\0'; - SetLastError(0xdeadbeef); - return LookupAccountSidA(NULL, psid, account, &size, domain, &dom_size, &use); -} - -static void check_wellknown_name(const char* name, WELL_KNOWN_SID_TYPE result) -{ - SID_IDENTIFIER_AUTHORITY ident = { SECURITY_NT_AUTHORITY }; - PSID domainsid = NULL; - char wk_sid[SECURITY_MAX_SID_SIZE]; - DWORD cb; - - DWORD sid_size, domain_size; - SID_NAME_USE sid_use; - LPSTR domain, account, sid_domain, wk_domain, wk_account; - PSID psid; - BOOL ret ,ret2; - - sid_size = 0; - domain_size = 0; - ret = LookupAccountNameA(NULL, name, NULL, &sid_size, NULL, &domain_size, &sid_use); - ok(!ret, " %s Should have failed to lookup account name\n", name); - psid = HeapAlloc(GetProcessHeap(),0,sid_size); - domain = HeapAlloc(GetProcessHeap(),0,domain_size); - ret = LookupAccountNameA(NULL, name, psid, &sid_size, domain, &domain_size, &sid_use); - - if (!result) - { - ok(!ret, " %s Should have failed to lookup account name\n",name); - goto cleanup; - } - - AllocateAndInitializeSid(&ident, 6, SECURITY_NT_NON_UNIQUE, 12, 23, 34, 45, 56, 0, 0, &domainsid); - cb = sizeof(wk_sid); - if (!pCreateWellKnownSid(result, domainsid, wk_sid, &cb)) - { - win_skip("SID %i is not available on the system\n",result); - goto cleanup; - } - - ret2 = get_sid_info(wk_sid, &wk_account, &wk_domain); - if (!ret2 && GetLastError() == ERROR_NONE_MAPPED) - { - win_skip("CreateWellKnownSid() succeeded but the account '%s' is not present (W2K)\n", name); - goto cleanup; - } - - get_sid_info(psid, &account, &sid_domain); - - ok(ret, "Failed to lookup account name %s\n",name); - ok(sid_size != 0, "sid_size was zero\n"); - - ok(EqualSid(psid,wk_sid),"(%s) Sids fail to match well known sid!\n",name); - - ok(!lstrcmp(account, wk_account), "Expected %s , got %s\n", account, wk_account); - ok(!lstrcmp(domain, wk_domain), "Expected %s, got %s\n", wk_domain, domain); - ok(sid_use == SidTypeWellKnownGroup , "Expected Use (5), got %d\n", sid_use); - -cleanup: - FreeSid(domainsid); - HeapFree(GetProcessHeap(),0,psid); - HeapFree(GetProcessHeap(),0,domain); -} - -static void test_LookupAccountName(void) -{ - DWORD sid_size, domain_size, user_size; - DWORD sid_save, domain_save; - CHAR user_name[UNLEN + 1]; - CHAR computer_name[UNLEN + 1]; - SID_NAME_USE sid_use; - LPSTR domain, account, sid_dom; - PSID psid; - BOOL ret; - - /* native crashes if (assuming all other parameters correct): - * - peUse is NULL - * - Sid is NULL and cbSid is > 0 - * - cbSid or cchReferencedDomainName are NULL - * - ReferencedDomainName is NULL and cchReferencedDomainName is the correct size - */ - - user_size = UNLEN + 1; - SetLastError(0xdeadbeef); - ret = GetUserNameA(user_name, &user_size); - ok(ret, "Failed to get user name : %d\n", GetLastError()); - - /* get sizes */ - sid_size = 0; - domain_size = 0; - sid_use = 0xcafebabe; - SetLastError(0xdeadbeef); - ret = LookupAccountNameA(NULL, user_name, NULL, &sid_size, NULL, &domain_size, &sid_use); - if(!ret && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) - { - win_skip("LookupAccountNameA is not implemented\n"); - return; - } - ok(!ret, "Expected 0, got %d\n", ret); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(sid_size != 0, "Expected non-zero sid size\n"); - ok(domain_size != 0, "Expected non-zero domain size\n"); - ok(sid_use == 0xcafebabe, "Expected 0xcafebabe, got %d\n", sid_use); - - sid_save = sid_size; - domain_save = domain_size; - - psid = HeapAlloc(GetProcessHeap(), 0, sid_size); - domain = HeapAlloc(GetProcessHeap(), 0, domain_size); - - /* try valid account name */ - ret = LookupAccountNameA(NULL, user_name, psid, &sid_size, domain, &domain_size, &sid_use); - get_sid_info(psid, &account, &sid_dom); - ok(ret, "Failed to lookup account name\n"); - ok(sid_size == GetLengthSid(psid), "Expected %d, got %d\n", GetLengthSid(psid), sid_size); - ok(!lstrcmp(account, user_name), "Expected %s, got %s\n", user_name, account); - ok(!lstrcmp(domain, sid_dom), "Expected %s, got %s\n", sid_dom, domain); - ok(domain_size == domain_save - 1, "Expected %d, got %d\n", domain_save - 1, domain_size); - ok(strlen(domain) == domain_size, "Expected %d, got %d\n", lstrlen(domain), domain_size); - ok(sid_use == SidTypeUser, "Expected SidTypeUser (%d), got %d\n", SidTypeUser, sid_use); - domain_size = domain_save; - sid_size = sid_save; - - if (PRIMARYLANGID(GetSystemDefaultLangID()) != LANG_ENGLISH) - { - skip("Non-English locale (test with hardcoded 'Everyone')\n"); - } - else - { - ret = LookupAccountNameA(NULL, "Everyone", psid, &sid_size, domain, &domain_size, &sid_use); - get_sid_info(psid, &account, &sid_dom); - ok(ret, "Failed to lookup account name\n"); - ok(sid_size != 0, "sid_size was zero\n"); - ok(!lstrcmp(account, "Everyone"), "Expected Everyone, got %s\n", account); - ok(!lstrcmp(domain, sid_dom), "Expected %s, got %s\n", sid_dom, domain); - ok(domain_size == 0, "Expected 0, got %d\n", domain_size); - ok(strlen(domain) == domain_size, "Expected %d, got %d\n", lstrlen(domain), domain_size); - ok(sid_use == SidTypeWellKnownGroup, "Expected SidTypeWellKnownGroup (%d), got %d\n", SidTypeWellKnownGroup, sid_use); - domain_size = domain_save; - } - - /* NULL Sid with zero sid size */ - SetLastError(0xdeadbeef); - sid_size = 0; - ret = LookupAccountNameA(NULL, user_name, NULL, &sid_size, domain, &domain_size, &sid_use); - ok(!ret, "Expected 0, got %d\n", ret); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(sid_size == sid_save, "Expected %d, got %d\n", sid_save, sid_size); - ok(domain_size == domain_save, "Expected %d, got %d\n", domain_save, domain_size); - - /* try cchReferencedDomainName - 1 */ - SetLastError(0xdeadbeef); - domain_size--; - ret = LookupAccountNameA(NULL, user_name, NULL, &sid_size, domain, &domain_size, &sid_use); - ok(!ret, "Expected 0, got %d\n", ret); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(sid_size == sid_save, "Expected %d, got %d\n", sid_save, sid_size); - ok(domain_size == domain_save, "Expected %d, got %d\n", domain_save, domain_size); - - /* NULL ReferencedDomainName with zero domain name size */ - SetLastError(0xdeadbeef); - domain_size = 0; - ret = LookupAccountNameA(NULL, user_name, psid, &sid_size, NULL, &domain_size, &sid_use); - ok(!ret, "Expected 0, got %d\n", ret); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(sid_size == sid_save, "Expected %d, got %d\n", sid_save, sid_size); - ok(domain_size == domain_save, "Expected %d, got %d\n", domain_save, domain_size); - - HeapFree(GetProcessHeap(), 0, psid); - HeapFree(GetProcessHeap(), 0, domain); - - /* get sizes for NULL account name */ - sid_size = 0; - domain_size = 0; - sid_use = 0xcafebabe; - SetLastError(0xdeadbeef); - ret = LookupAccountNameA(NULL, NULL, NULL, &sid_size, NULL, &domain_size, &sid_use); - if (!ret && GetLastError() == ERROR_NONE_MAPPED) - win_skip("NULL account name doesn't work on NT4\n"); - else - { - ok(!ret, "Expected 0, got %d\n", ret); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(sid_size != 0, "Expected non-zero sid size\n"); - ok(domain_size != 0, "Expected non-zero domain size\n"); - ok(sid_use == 0xcafebabe, "Expected 0xcafebabe, got %d\n", sid_use); - - psid = HeapAlloc(GetProcessHeap(), 0, sid_size); - domain = HeapAlloc(GetProcessHeap(), 0, domain_size); - - /* try NULL account name */ - ret = LookupAccountNameA(NULL, NULL, psid, &sid_size, domain, &domain_size, &sid_use); - get_sid_info(psid, &account, &sid_dom); - ok(ret, "Failed to lookup account name\n"); - /* Using a fixed string will not work on different locales */ - ok(!lstrcmp(account, domain), - "Got %s for account and %s for domain, these should be the same\n", - account, domain); - ok(sid_use == SidTypeDomain, "Expected SidTypeDomain (%d), got %d\n", SidTypeDomain, sid_use); - - HeapFree(GetProcessHeap(), 0, psid); - HeapFree(GetProcessHeap(), 0, domain); - } - - /* try an invalid account name */ - SetLastError(0xdeadbeef); - sid_size = 0; - domain_size = 0; - ret = LookupAccountNameA(NULL, "oogabooga", NULL, &sid_size, NULL, &domain_size, &sid_use); - ok(!ret, "Expected 0, got %d\n", ret); - ok(GetLastError() == ERROR_NONE_MAPPED || - broken(GetLastError() == ERROR_TRUSTED_RELATIONSHIP_FAILURE), - "Expected ERROR_NONE_MAPPED, got %d\n", GetLastError()); - ok(sid_size == 0, "Expected 0, got %d\n", sid_size); - ok(domain_size == 0, "Expected 0, got %d\n", domain_size); - - /* try an invalid system name */ - SetLastError(0xdeadbeef); - sid_size = 0; - domain_size = 0; - ret = LookupAccountNameA("deepthought", NULL, NULL, &sid_size, NULL, &domain_size, &sid_use); - ok(!ret, "Expected 0, got %d\n", ret); - ok(GetLastError() == RPC_S_SERVER_UNAVAILABLE || GetLastError() == RPC_S_INVALID_NET_ADDR /* Vista */, - "Expected RPC_S_SERVER_UNAVAILABLE or RPC_S_INVALID_NET_ADDR, got %d\n", GetLastError()); - ok(sid_size == 0, "Expected 0, got %d\n", sid_size); - ok(domain_size == 0, "Expected 0, got %d\n", domain_size); - - /* try with the computer name as the account name */ - domain_size = sizeof(computer_name); - GetComputerNameA(computer_name, &domain_size); - sid_size = 0; - domain_size = 0; - ret = LookupAccountNameA(NULL, computer_name, NULL, &sid_size, NULL, &domain_size, &sid_use); - ok(!ret && (GetLastError() == ERROR_INSUFFICIENT_BUFFER || - GetLastError() == ERROR_NONE_MAPPED /* in a domain */ || - broken(GetLastError() == ERROR_TRUSTED_DOMAIN_FAILURE) || - broken(GetLastError() == ERROR_TRUSTED_RELATIONSHIP_FAILURE)), - "LookupAccountNameA failed: %d\n", GetLastError()); - if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) - { - psid = HeapAlloc(GetProcessHeap(), 0, sid_size); - domain = HeapAlloc(GetProcessHeap(), 0, domain_size); - ret = LookupAccountNameA(NULL, computer_name, psid, &sid_size, domain, &domain_size, &sid_use); - ok(ret, "LookupAccountNameA failed: %d\n", GetLastError()); - ok(sid_use == SidTypeDomain || - (sid_use == SidTypeUser && ! strcmp(computer_name, user_name)), "expected SidTypeDomain for %s, got %d\n", computer_name, sid_use); - HeapFree(GetProcessHeap(), 0, domain); - HeapFree(GetProcessHeap(), 0, psid); - } - - /* Well Known names */ - if (!pCreateWellKnownSid) - { - win_skip("CreateWellKnownSid not available\n"); - return; - } - - if (PRIMARYLANGID(GetSystemDefaultLangID()) != LANG_ENGLISH) - { - skip("Non-English locale (skipping well known name creation tests)\n"); - return; - } - - check_wellknown_name("LocalService", WinLocalServiceSid); - check_wellknown_name("Local Service", WinLocalServiceSid); - /* 2 spaces */ - check_wellknown_name("Local Service", 0); - check_wellknown_name("NetworkService", WinNetworkServiceSid); - check_wellknown_name("Network Service", WinNetworkServiceSid); - - /* example of some names where the spaces are not optional */ - check_wellknown_name("Terminal Server User", WinTerminalServerSid); - check_wellknown_name("TerminalServer User", 0); - check_wellknown_name("TerminalServerUser", 0); - check_wellknown_name("Terminal ServerUser", 0); - - check_wellknown_name("enterprise domain controllers",WinEnterpriseControllersSid); - check_wellknown_name("enterprisedomain controllers", 0); - check_wellknown_name("enterprise domaincontrollers", 0); - check_wellknown_name("enterprisedomaincontrollers", 0); - - /* case insensitivity */ - check_wellknown_name("lOCAlServICE", WinLocalServiceSid); - - /* fully qualified account names */ - check_wellknown_name("NT AUTHORITY\\LocalService", WinLocalServiceSid); - check_wellknown_name("nt authority\\Network Service", WinNetworkServiceSid); - check_wellknown_name("nt authority test\\Network Service", 0); - check_wellknown_name("Dummy\\Network Service", 0); - check_wellknown_name("ntauthority\\Network Service", 0); -} - -static void test_security_descriptor(void) -{ - SECURITY_DESCRIPTOR sd; - char buf[8192]; - DWORD size; - BOOL isDefault, isPresent, ret; - PACL pacl; - PSID psid; - - SetLastError(0xdeadbeef); - ret = InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION); - if (ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("InitializeSecurityDescriptor is not implemented\n"); - return; - } - - ok(GetSecurityDescriptorOwner(&sd, &psid, &isDefault), "GetSecurityDescriptorOwner failed\n"); - expect_eq(psid, NULL, PSID, "%p"); - expect_eq(isDefault, FALSE, BOOL, "%d"); - sd.Control |= SE_DACL_PRESENT | SE_SACL_PRESENT; - - SetLastError(0xdeadbeef); - size = 5; - expect_eq(MakeSelfRelativeSD(&sd, buf, &size), FALSE, BOOL, "%d"); - expect_eq(GetLastError(), ERROR_INSUFFICIENT_BUFFER, DWORD, "%u"); - ok(size > 5, "Size not increased\n"); - if (size <= 8192) - { - expect_eq(MakeSelfRelativeSD(&sd, buf, &size), TRUE, BOOL, "%d"); - ok(GetSecurityDescriptorOwner(&sd, &psid, &isDefault), "GetSecurityDescriptorOwner failed\n"); - expect_eq(psid, NULL, PSID, "%p"); - expect_eq(isDefault, FALSE, BOOL, "%d"); - ok(GetSecurityDescriptorGroup(&sd, &psid, &isDefault), "GetSecurityDescriptorGroup failed\n"); - expect_eq(psid, NULL, PSID, "%p"); - expect_eq(isDefault, FALSE, BOOL, "%d"); - ok(GetSecurityDescriptorDacl(&sd, &isPresent, &pacl, &isDefault), "GetSecurityDescriptorDacl failed\n"); - expect_eq(isPresent, TRUE, BOOL, "%d"); - expect_eq(psid, NULL, PSID, "%p"); - expect_eq(isDefault, FALSE, BOOL, "%d"); - ok(GetSecurityDescriptorSacl(&sd, &isPresent, &pacl, &isDefault), "GetSecurityDescriptorSacl failed\n"); - expect_eq(isPresent, TRUE, BOOL, "%d"); - expect_eq(psid, NULL, PSID, "%p"); - expect_eq(isDefault, FALSE, BOOL, "%d"); - } -} - -#define TEST_GRANTED_ACCESS(a,b) test_granted_access(a,b,0,__LINE__) -#define TEST_GRANTED_ACCESS2(a,b,c) test_granted_access(a,b,c,__LINE__) -static void test_granted_access(HANDLE handle, ACCESS_MASK access, - ACCESS_MASK alt, int line) -{ - OBJECT_BASIC_INFORMATION obj_info; - NTSTATUS status; - - if (!pNtQueryObject) - { - skip_(__FILE__, line)("Not NT platform - skipping tests\n"); - return; - } - - status = pNtQueryObject( handle, ObjectBasicInformation, &obj_info, - sizeof(obj_info), NULL ); - ok_(__FILE__, line)(!status, "NtQueryObject with err: %08x\n", status); - if (alt) - ok_(__FILE__, line)(obj_info.GrantedAccess == access || - obj_info.GrantedAccess == alt, "Granted access should be 0x%08x " - "or 0x%08x, instead of 0x%08x\n", access, alt, obj_info.GrantedAccess); - else - ok_(__FILE__, line)(obj_info.GrantedAccess == access, "Granted access should " - "be 0x%08x, instead of 0x%08x\n", access, obj_info.GrantedAccess); -} - -#define CHECK_SET_SECURITY(o,i,e) \ - do{ \ - BOOL res; \ - DWORD err; \ - SetLastError( 0xdeadbeef ); \ - res = SetKernelObjectSecurity( o, i, SecurityDescriptor ); \ - err = GetLastError(); \ - if (e == ERROR_SUCCESS) \ - ok(res, "SetKernelObjectSecurity failed with %d\n", err); \ - else \ - ok(!res && err == e, "SetKernelObjectSecurity should have failed " \ - "with %s, instead of %d\n", #e, err); \ - }while(0) - -static void test_process_security(void) -{ - BOOL res; - PTOKEN_OWNER owner; - PTOKEN_PRIMARY_GROUP group; - PSID AdminSid = NULL, UsersSid = NULL; - PACL Acl = NULL; - SECURITY_DESCRIPTOR *SecurityDescriptor = NULL; - char buffer[MAX_PATH]; - PROCESS_INFORMATION info; - STARTUPINFOA startup; - SECURITY_ATTRIBUTES psa; - HANDLE token, event; - DWORD size; - - Acl = HeapAlloc(GetProcessHeap(), 0, 256); - res = InitializeAcl(Acl, 256, ACL_REVISION); - if (!res && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("ACLs not implemented - skipping tests\n"); - HeapFree(GetProcessHeap(), 0, Acl); - return; - } - ok(res, "InitializeAcl failed with error %d\n", GetLastError()); - - /* get owner from the token we might be running as a user not admin */ - res = OpenProcessToken( GetCurrentProcess(), MAXIMUM_ALLOWED, &token ); - ok(res, "OpenProcessToken failed with error %d\n", GetLastError()); - if (!res) - { - HeapFree(GetProcessHeap(), 0, Acl); - return; - } - - res = GetTokenInformation( token, TokenOwner, NULL, 0, &size ); - ok(!res, "Expected failure, got %d\n", res); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - - owner = HeapAlloc(GetProcessHeap(), 0, size); - res = GetTokenInformation( token, TokenOwner, owner, size, &size ); - ok(res, "GetTokenInformation failed with error %d\n", GetLastError()); - AdminSid = ((TOKEN_OWNER*)owner)->Owner; - - res = GetTokenInformation( token, TokenPrimaryGroup, NULL, 0, &size ); - ok(!res, "Expected failure, got %d\n", res); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - - group = HeapAlloc(GetProcessHeap(), 0, size); - res = GetTokenInformation( token, TokenPrimaryGroup, group, size, &size ); - ok(res, "GetTokenInformation failed with error %d\n", GetLastError()); - UsersSid = ((TOKEN_PRIMARY_GROUP*)group)->PrimaryGroup; - - CloseHandle( token ); - if (!res) - { - HeapFree(GetProcessHeap(), 0, group); - HeapFree(GetProcessHeap(), 0, owner); - HeapFree(GetProcessHeap(), 0, Acl); - return; - } - - res = AddAccessDeniedAce(Acl, ACL_REVISION, PROCESS_VM_READ, AdminSid); - ok(res, "AddAccessDeniedAce failed with error %d\n", GetLastError()); - res = AddAccessAllowedAce(Acl, ACL_REVISION, PROCESS_ALL_ACCESS, AdminSid); - ok(res, "AddAccessAllowedAce failed with error %d\n", GetLastError()); - - SecurityDescriptor = HeapAlloc(GetProcessHeap(), 0, SECURITY_DESCRIPTOR_MIN_LENGTH); - res = InitializeSecurityDescriptor(SecurityDescriptor, SECURITY_DESCRIPTOR_REVISION); - ok(res, "InitializeSecurityDescriptor failed with error %d\n", GetLastError()); - - event = CreateEvent( NULL, TRUE, TRUE, "test_event" ); - ok(event != NULL, "CreateEvent %d\n", GetLastError()); - - SecurityDescriptor->Revision = 0; - CHECK_SET_SECURITY( event, OWNER_SECURITY_INFORMATION, ERROR_UNKNOWN_REVISION ); - SecurityDescriptor->Revision = SECURITY_DESCRIPTOR_REVISION; - - CHECK_SET_SECURITY( event, OWNER_SECURITY_INFORMATION, ERROR_INVALID_SECURITY_DESCR ); - CHECK_SET_SECURITY( event, GROUP_SECURITY_INFORMATION, ERROR_INVALID_SECURITY_DESCR ); - CHECK_SET_SECURITY( event, SACL_SECURITY_INFORMATION, ERROR_ACCESS_DENIED ); - CHECK_SET_SECURITY( event, DACL_SECURITY_INFORMATION, ERROR_SUCCESS ); - /* NULL DACL is valid and means default DACL from token */ - SecurityDescriptor->Control |= SE_DACL_PRESENT; - CHECK_SET_SECURITY( event, DACL_SECURITY_INFORMATION, ERROR_SUCCESS ); - - /* Set owner and group and dacl */ - res = SetSecurityDescriptorOwner(SecurityDescriptor, AdminSid, FALSE); - ok(res, "SetSecurityDescriptorOwner failed with error %d\n", GetLastError()); - CHECK_SET_SECURITY( event, OWNER_SECURITY_INFORMATION, ERROR_SUCCESS ); - res = SetSecurityDescriptorGroup(SecurityDescriptor, UsersSid, FALSE); - ok(res, "SetSecurityDescriptorGroup failed with error %d\n", GetLastError()); - CHECK_SET_SECURITY( event, GROUP_SECURITY_INFORMATION, ERROR_SUCCESS ); - res = SetSecurityDescriptorDacl(SecurityDescriptor, TRUE, Acl, FALSE); - ok(res, "SetSecurityDescriptorDacl failed with error %d\n", GetLastError()); - CHECK_SET_SECURITY( event, DACL_SECURITY_INFORMATION, ERROR_SUCCESS ); - - sprintf(buffer, "%s tests/security.c test", myARGV[0]); - memset(&startup, 0, sizeof(startup)); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW; - startup.wShowWindow = SW_SHOWNORMAL; - - psa.nLength = sizeof(psa); - psa.lpSecurityDescriptor = SecurityDescriptor; - psa.bInheritHandle = TRUE; - - /* Doesn't matter what ACL say we should get full access for ourselves */ - res = CreateProcessA( NULL, buffer, &psa, NULL, FALSE, 0, NULL, NULL, &startup, &info ); - ok(res, "CreateProcess with err:%d\n", GetLastError()); - TEST_GRANTED_ACCESS2( info.hProcess, PROCESS_ALL_ACCESS, - STANDARD_RIGHTS_ALL | SPECIFIC_RIGHTS_ALL ); - winetest_wait_child_process( info.hProcess ); - - CloseHandle( info.hProcess ); - CloseHandle( info.hThread ); - CloseHandle( event ); - HeapFree(GetProcessHeap(), 0, group); - HeapFree(GetProcessHeap(), 0, owner); - HeapFree(GetProcessHeap(), 0, Acl); - HeapFree(GetProcessHeap(), 0, SecurityDescriptor); -} - -static void test_process_security_child(void) -{ - HANDLE handle, handle1; - BOOL ret; - DWORD err; - - handle = OpenProcess( PROCESS_TERMINATE, FALSE, GetCurrentProcessId() ); - ok(handle != NULL, "OpenProcess(PROCESS_TERMINATE) with err:%d\n", GetLastError()); - TEST_GRANTED_ACCESS( handle, PROCESS_TERMINATE ); - - ret = DuplicateHandle( GetCurrentProcess(), handle, GetCurrentProcess(), - &handle1, 0, TRUE, DUPLICATE_SAME_ACCESS ); - ok(ret, "duplicating handle err:%d\n", GetLastError()); - TEST_GRANTED_ACCESS( handle1, PROCESS_TERMINATE ); - - CloseHandle( handle1 ); - - SetLastError( 0xdeadbeef ); - ret = DuplicateHandle( GetCurrentProcess(), handle, GetCurrentProcess(), - &handle1, PROCESS_ALL_ACCESS, TRUE, 0 ); - err = GetLastError(); - todo_wine - ok(!ret && err == ERROR_ACCESS_DENIED, "duplicating handle should have failed " - "with STATUS_ACCESS_DENIED, instead of err:%d\n", err); - - CloseHandle( handle ); - - /* These two should fail - they are denied by ACL */ - handle = OpenProcess( PROCESS_VM_READ, FALSE, GetCurrentProcessId() ); - todo_wine - ok(handle == NULL, "OpenProcess(PROCESS_VM_READ) should have failed\n"); - handle = OpenProcess( PROCESS_ALL_ACCESS, FALSE, GetCurrentProcessId() ); - todo_wine - ok(handle == NULL, "OpenProcess(PROCESS_ALL_ACCESS) should have failed\n"); - - /* Documented privilege elevation */ - ret = DuplicateHandle( GetCurrentProcess(), GetCurrentProcess(), GetCurrentProcess(), - &handle, 0, TRUE, DUPLICATE_SAME_ACCESS ); - ok(ret, "duplicating handle err:%d\n", GetLastError()); - TEST_GRANTED_ACCESS2( handle, PROCESS_ALL_ACCESS, - STANDARD_RIGHTS_ALL | SPECIFIC_RIGHTS_ALL ); - - CloseHandle( handle ); - - /* Same only explicitly asking for all access rights */ - ret = DuplicateHandle( GetCurrentProcess(), GetCurrentProcess(), GetCurrentProcess(), - &handle, PROCESS_ALL_ACCESS, TRUE, 0 ); - ok(ret, "duplicating handle err:%d\n", GetLastError()); - TEST_GRANTED_ACCESS2( handle, PROCESS_ALL_ACCESS, - PROCESS_ALL_ACCESS | PROCESS_QUERY_LIMITED_INFORMATION ); - ret = DuplicateHandle( GetCurrentProcess(), handle, GetCurrentProcess(), - &handle1, PROCESS_VM_READ, TRUE, 0 ); - ok(ret, "duplicating handle err:%d\n", GetLastError()); - TEST_GRANTED_ACCESS( handle1, PROCESS_VM_READ ); - CloseHandle( handle1 ); - CloseHandle( handle ); -} - -static void test_impersonation_level(void) -{ - HANDLE Token, ProcessToken; - HANDLE Token2; - DWORD Size; - TOKEN_PRIVILEGES *Privileges; - TOKEN_USER *User; - PRIVILEGE_SET *PrivilegeSet; - BOOL AccessGranted; - BOOL ret; - HKEY hkey; - DWORD error; - - pDuplicateTokenEx = (void *)GetProcAddress(hmod, "DuplicateTokenEx"); - if( !pDuplicateTokenEx ) { - win_skip("DuplicateTokenEx is not available\n"); - return; - } - SetLastError(0xdeadbeef); - ret = ImpersonateSelf(SecurityAnonymous); - if(!ret && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) - { - win_skip("ImpersonateSelf is not implemented\n"); - return; - } - ok(ret, "ImpersonateSelf(SecurityAnonymous) failed with error %d\n", GetLastError()); - ret = OpenThreadToken(GetCurrentThread(), TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY_SOURCE | TOKEN_IMPERSONATE | TOKEN_ADJUST_DEFAULT, TRUE, &Token); - ok(!ret, "OpenThreadToken should have failed\n"); - error = GetLastError(); - ok(error == ERROR_CANT_OPEN_ANONYMOUS, "OpenThreadToken on anonymous token should have returned ERROR_CANT_OPEN_ANONYMOUS instead of %d\n", error); - /* can't perform access check when opening object against an anonymous impersonation token */ - todo_wine { - error = RegOpenKeyEx(HKEY_CURRENT_USER, "Software", 0, KEY_READ, &hkey); - ok(error == ERROR_INVALID_HANDLE || error == ERROR_CANT_OPEN_ANONYMOUS, - "RegOpenKeyEx should have failed with ERROR_INVALID_HANDLE or ERROR_CANT_OPEN_ANONYMOUS instead of %d\n", error); - } - RevertToSelf(); - - ret = OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE, &ProcessToken); - ok(ret, "OpenProcessToken failed with error %d\n", GetLastError()); - - ret = pDuplicateTokenEx(ProcessToken, - TOKEN_QUERY | TOKEN_DUPLICATE | TOKEN_IMPERSONATE, NULL, - SecurityAnonymous, TokenImpersonation, &Token); - ok(ret, "DuplicateTokenEx failed with error %d\n", GetLastError()); - /* can't increase the impersonation level */ - ret = DuplicateToken(Token, SecurityIdentification, &Token2); - error = GetLastError(); - ok(!ret && error == ERROR_BAD_IMPERSONATION_LEVEL, - "Duplicating a token and increasing the impersonation level should have failed with ERROR_BAD_IMPERSONATION_LEVEL instead of %d\n", error); - /* we can query anything from an anonymous token, including the user */ - ret = GetTokenInformation(Token, TokenUser, NULL, 0, &Size); - error = GetLastError(); - ok(!ret && error == ERROR_INSUFFICIENT_BUFFER, "GetTokenInformation(TokenUser) should have failed with ERROR_INSUFFICIENT_BUFFER instead of %d\n", error); - User = HeapAlloc(GetProcessHeap(), 0, Size); - ret = GetTokenInformation(Token, TokenUser, User, Size, &Size); - ok(ret, "GetTokenInformation(TokenUser) failed with error %d\n", GetLastError()); - HeapFree(GetProcessHeap(), 0, User); - - /* PrivilegeCheck fails with SecurityAnonymous level */ - ret = GetTokenInformation(Token, TokenPrivileges, NULL, 0, &Size); - error = GetLastError(); - ok(!ret && error == ERROR_INSUFFICIENT_BUFFER, "GetTokenInformation(TokenPrivileges) should have failed with ERROR_INSUFFICIENT_BUFFER instead of %d\n", error); - Privileges = HeapAlloc(GetProcessHeap(), 0, Size); - ret = GetTokenInformation(Token, TokenPrivileges, Privileges, Size, &Size); - ok(ret, "GetTokenInformation(TokenPrivileges) failed with error %d\n", GetLastError()); - - PrivilegeSet = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(PRIVILEGE_SET, Privilege[Privileges->PrivilegeCount])); - PrivilegeSet->PrivilegeCount = Privileges->PrivilegeCount; - memcpy(PrivilegeSet->Privilege, Privileges->Privileges, PrivilegeSet->PrivilegeCount * sizeof(PrivilegeSet->Privilege[0])); - PrivilegeSet->Control = PRIVILEGE_SET_ALL_NECESSARY; - HeapFree(GetProcessHeap(), 0, Privileges); - - ret = PrivilegeCheck(Token, PrivilegeSet, &AccessGranted); - error = GetLastError(); - ok(!ret && error == ERROR_BAD_IMPERSONATION_LEVEL, "PrivilegeCheck for SecurityAnonymous token should have failed with ERROR_BAD_IMPERSONATION_LEVEL instead of %d\n", error); - - CloseHandle(Token); - - ret = ImpersonateSelf(SecurityIdentification); - ok(ret, "ImpersonateSelf(SecurityIdentification) failed with error %d\n", GetLastError()); - ret = OpenThreadToken(GetCurrentThread(), TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY_SOURCE | TOKEN_IMPERSONATE | TOKEN_ADJUST_DEFAULT, TRUE, &Token); - ok(ret, "OpenThreadToken failed with error %d\n", GetLastError()); - - /* can't perform access check when opening object against an identification impersonation token */ - error = RegOpenKeyEx(HKEY_CURRENT_USER, "Software", 0, KEY_READ, &hkey); - todo_wine { - ok(error == ERROR_INVALID_HANDLE || error == ERROR_BAD_IMPERSONATION_LEVEL, - "RegOpenKeyEx should have failed with ERROR_INVALID_HANDLE or ERROR_BAD_IMPERSONATION_LEVEL instead of %d\n", error); - } - ret = PrivilegeCheck(Token, PrivilegeSet, &AccessGranted); - ok(ret, "PrivilegeCheck for SecurityIdentification failed with error %d\n", GetLastError()); - CloseHandle(Token); - RevertToSelf(); - - ret = ImpersonateSelf(SecurityImpersonation); - ok(ret, "ImpersonateSelf(SecurityImpersonation) failed with error %d\n", GetLastError()); - ret = OpenThreadToken(GetCurrentThread(), TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY_SOURCE | TOKEN_IMPERSONATE | TOKEN_ADJUST_DEFAULT, TRUE, &Token); - ok(ret, "OpenThreadToken failed with error %d\n", GetLastError()); - error = RegOpenKeyEx(HKEY_CURRENT_USER, "Software", 0, KEY_READ, &hkey); - ok(error == ERROR_SUCCESS, "RegOpenKeyEx should have succeeded instead of failing with %d\n", error); - RegCloseKey(hkey); - ret = PrivilegeCheck(Token, PrivilegeSet, &AccessGranted); - ok(ret, "PrivilegeCheck for SecurityImpersonation failed with error %d\n", GetLastError()); - RevertToSelf(); - - CloseHandle(Token); - CloseHandle(ProcessToken); - - HeapFree(GetProcessHeap(), 0, PrivilegeSet); -} - -static void test_SetEntriesInAclW(void) -{ - DWORD res; - PSID EveryoneSid = NULL, UsersSid = NULL; - PACL OldAcl = NULL, NewAcl; - SID_IDENTIFIER_AUTHORITY SIDAuthWorld = { SECURITY_WORLD_SID_AUTHORITY }; - SID_IDENTIFIER_AUTHORITY SIDAuthNT = { SECURITY_NT_AUTHORITY }; - EXPLICIT_ACCESSW ExplicitAccess; - static const WCHAR wszEveryone[] = {'E','v','e','r','y','o','n','e',0}; - static const WCHAR wszCurrentUser[] = { 'C','U','R','R','E','N','T','_','U','S','E','R','\0'}; - - if (!pSetEntriesInAclW) - { - win_skip("SetEntriesInAclW is not available\n"); - return; - } - - NewAcl = (PACL)0xdeadbeef; - res = pSetEntriesInAclW(0, NULL, NULL, &NewAcl); - if(res == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("SetEntriesInAclW is not implemented\n"); - return; - } - ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); - ok(NewAcl == NULL || - broken(NewAcl != NULL), /* NT4 */ - "NewAcl=%p, expected NULL\n", NewAcl); - LocalFree(NewAcl); - - OldAcl = HeapAlloc(GetProcessHeap(), 0, 256); - res = InitializeAcl(OldAcl, 256, ACL_REVISION); - if(!res && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("ACLs not implemented - skipping tests\n"); - HeapFree(GetProcessHeap(), 0, OldAcl); - return; - } - ok(res, "InitializeAcl failed with error %d\n", GetLastError()); - - res = AllocateAndInitializeSid( &SIDAuthWorld, 1, SECURITY_WORLD_RID, 0, 0, 0, 0, 0, 0, 0, &EveryoneSid); - ok(res, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); - - res = AllocateAndInitializeSid( &SIDAuthNT, 2, SECURITY_BUILTIN_DOMAIN_RID, - DOMAIN_ALIAS_RID_USERS, 0, 0, 0, 0, 0, 0, &UsersSid); - ok(res, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); - - res = AddAccessAllowedAce(OldAcl, ACL_REVISION, KEY_READ, UsersSid); - ok(res, "AddAccessAllowedAce failed with error %d\n", GetLastError()); - - ExplicitAccess.grfAccessPermissions = KEY_WRITE; - ExplicitAccess.grfAccessMode = GRANT_ACCESS; - ExplicitAccess.grfInheritance = NO_INHERITANCE; - ExplicitAccess.Trustee.TrusteeType = TRUSTEE_IS_WELL_KNOWN_GROUP; - ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_SID; - ExplicitAccess.Trustee.ptstrName = EveryoneSid; - ExplicitAccess.Trustee.MultipleTrusteeOperation = 0xDEADBEEF; - ExplicitAccess.Trustee.pMultipleTrustee = (PVOID)0xDEADBEEF; - res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); - ok(NewAcl != NULL, "returned acl was NULL\n"); - LocalFree(NewAcl); - - ExplicitAccess.Trustee.TrusteeType = TRUSTEE_IS_UNKNOWN; - ExplicitAccess.Trustee.pMultipleTrustee = NULL; - ExplicitAccess.Trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE; - res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); - ok(NewAcl != NULL, "returned acl was NULL\n"); - LocalFree(NewAcl); - - if (PRIMARYLANGID(GetSystemDefaultLangID()) != LANG_ENGLISH) - { - skip("Non-English locale (test with hardcoded 'Everyone')\n"); - } - else - { - ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_NAME; - ExplicitAccess.Trustee.ptstrName = (LPWSTR)wszEveryone; - res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); - ok(NewAcl != NULL, "returned acl was NULL\n"); - LocalFree(NewAcl); - - ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_BAD_FORM; - res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_INVALID_PARAMETER || - broken(res == ERROR_NOT_SUPPORTED), /* NT4 */ - "SetEntriesInAclW failed: %u\n", res); - ok(NewAcl == NULL || - broken(NewAcl != NULL), /* NT4 */ - "returned acl wasn't NULL: %p\n", NewAcl); - - ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_NAME; - ExplicitAccess.Trustee.MultipleTrusteeOperation = TRUSTEE_IS_IMPERSONATE; - res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_INVALID_PARAMETER || - broken(res == ERROR_NOT_SUPPORTED), /* NT4 */ - "SetEntriesInAclW failed: %u\n", res); - ok(NewAcl == NULL || - broken(NewAcl != NULL), /* NT4 */ - "returned acl wasn't NULL: %p\n", NewAcl); - - ExplicitAccess.Trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE; - ExplicitAccess.grfAccessMode = SET_ACCESS; - res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); - ok(NewAcl != NULL, "returned acl was NULL\n"); - LocalFree(NewAcl); - } - - ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_NAME; - ExplicitAccess.Trustee.ptstrName = (LPWSTR)wszCurrentUser; - res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); - ok(NewAcl != NULL, "returned acl was NULL\n"); - LocalFree(NewAcl); - - ExplicitAccess.grfAccessMode = REVOKE_ACCESS; - ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_SID; - ExplicitAccess.Trustee.ptstrName = UsersSid; - res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); - ok(NewAcl != NULL, "returned acl was NULL\n"); - LocalFree(NewAcl); - - FreeSid(UsersSid); - FreeSid(EveryoneSid); - HeapFree(GetProcessHeap(), 0, OldAcl); -} - -static void test_SetEntriesInAclA(void) -{ - DWORD res; - PSID EveryoneSid = NULL, UsersSid = NULL; - PACL OldAcl = NULL, NewAcl; - SID_IDENTIFIER_AUTHORITY SIDAuthWorld = { SECURITY_WORLD_SID_AUTHORITY }; - SID_IDENTIFIER_AUTHORITY SIDAuthNT = { SECURITY_NT_AUTHORITY }; - EXPLICIT_ACCESS ExplicitAccess; - static const CHAR szEveryone[] = {'E','v','e','r','y','o','n','e',0}; - static const CHAR szCurrentUser[] = { 'C','U','R','R','E','N','T','_','U','S','E','R','\0'}; - - if (!pSetEntriesInAclA) - { - win_skip("SetEntriesInAclA is not available\n"); - return; - } - - NewAcl = (PACL)0xdeadbeef; - res = pSetEntriesInAclA(0, NULL, NULL, &NewAcl); - if(res == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("SetEntriesInAclA is not implemented\n"); - return; - } - ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %u\n", res); - ok(NewAcl == NULL || - broken(NewAcl != NULL), /* NT4 */ - "NewAcl=%p, expected NULL\n", NewAcl); - LocalFree(NewAcl); - - OldAcl = HeapAlloc(GetProcessHeap(), 0, 256); - res = InitializeAcl(OldAcl, 256, ACL_REVISION); - if(!res && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("ACLs not implemented - skipping tests\n"); - HeapFree(GetProcessHeap(), 0, OldAcl); - return; - } - ok(res, "InitializeAcl failed with error %d\n", GetLastError()); - - res = AllocateAndInitializeSid( &SIDAuthWorld, 1, SECURITY_WORLD_RID, 0, 0, 0, 0, 0, 0, 0, &EveryoneSid); - ok(res, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); - - res = AllocateAndInitializeSid( &SIDAuthNT, 2, SECURITY_BUILTIN_DOMAIN_RID, - DOMAIN_ALIAS_RID_USERS, 0, 0, 0, 0, 0, 0, &UsersSid); - ok(res, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); - - res = AddAccessAllowedAce(OldAcl, ACL_REVISION, KEY_READ, UsersSid); - ok(res, "AddAccessAllowedAce failed with error %d\n", GetLastError()); - - ExplicitAccess.grfAccessPermissions = KEY_WRITE; - ExplicitAccess.grfAccessMode = GRANT_ACCESS; - ExplicitAccess.grfInheritance = NO_INHERITANCE; - ExplicitAccess.Trustee.TrusteeType = TRUSTEE_IS_WELL_KNOWN_GROUP; - ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_SID; - ExplicitAccess.Trustee.ptstrName = EveryoneSid; - ExplicitAccess.Trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE; - ExplicitAccess.Trustee.pMultipleTrustee = NULL; - res = pSetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %u\n", res); - ok(NewAcl != NULL, "returned acl was NULL\n"); - LocalFree(NewAcl); - - ExplicitAccess.Trustee.TrusteeType = TRUSTEE_IS_UNKNOWN; - ExplicitAccess.Trustee.pMultipleTrustee = NULL; - ExplicitAccess.Trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE; - res = pSetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %u\n", res); - ok(NewAcl != NULL, "returned acl was NULL\n"); - LocalFree(NewAcl); - - if (PRIMARYLANGID(GetSystemDefaultLangID()) != LANG_ENGLISH) - { - skip("Non-English locale (test with hardcoded 'Everyone')\n"); - } - else - { - ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_NAME; - ExplicitAccess.Trustee.ptstrName = (LPSTR)szEveryone; - res = pSetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %u\n", res); - ok(NewAcl != NULL, "returned acl was NULL\n"); - LocalFree(NewAcl); - - ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_BAD_FORM; - res = pSetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_INVALID_PARAMETER || - broken(res == ERROR_NOT_SUPPORTED), /* NT4 */ - "SetEntriesInAclA failed: %u\n", res); - ok(NewAcl == NULL || - broken(NewAcl != NULL), /* NT4 */ - "returned acl wasn't NULL: %p\n", NewAcl); - - ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_NAME; - ExplicitAccess.Trustee.MultipleTrusteeOperation = TRUSTEE_IS_IMPERSONATE; - res = pSetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_INVALID_PARAMETER || - broken(res == ERROR_NOT_SUPPORTED), /* NT4 */ - "SetEntriesInAclA failed: %u\n", res); - ok(NewAcl == NULL || - broken(NewAcl != NULL), /* NT4 */ - "returned acl wasn't NULL: %p\n", NewAcl); - - ExplicitAccess.Trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE; - ExplicitAccess.grfAccessMode = SET_ACCESS; - res = pSetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %u\n", res); - ok(NewAcl != NULL, "returned acl was NULL\n"); - LocalFree(NewAcl); - } - - ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_NAME; - ExplicitAccess.Trustee.ptstrName = (LPSTR)szCurrentUser; - res = pSetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %u\n", res); - ok(NewAcl != NULL, "returned acl was NULL\n"); - LocalFree(NewAcl); - - ExplicitAccess.grfAccessMode = REVOKE_ACCESS; - ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_SID; - ExplicitAccess.Trustee.ptstrName = UsersSid; - res = pSetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl); - ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %u\n", res); - ok(NewAcl != NULL, "returned acl was NULL\n"); - LocalFree(NewAcl); - - FreeSid(UsersSid); - FreeSid(EveryoneSid); - HeapFree(GetProcessHeap(), 0, OldAcl); -} - -static void test_GetNamedSecurityInfoA(void) -{ - PSECURITY_DESCRIPTOR pSecDesc; - DWORD revision; - SECURITY_DESCRIPTOR_CONTROL control; - PSID owner; - PSID group; - PACL dacl; - BOOL owner_defaulted; - BOOL group_defaulted; - DWORD error; - BOOL ret, isNT4; - CHAR windows_dir[MAX_PATH]; - - if (!pGetNamedSecurityInfoA) - { - win_skip("GetNamedSecurityInfoA is not available\n"); - return; - } - - ret = GetWindowsDirectoryA(windows_dir, MAX_PATH); - ok(ret, "GetWindowsDirectory failed with error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - error = pGetNamedSecurityInfoA(windows_dir, SE_FILE_OBJECT, - OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|DACL_SECURITY_INFORMATION, - NULL, NULL, NULL, NULL, &pSecDesc); - if (error != ERROR_SUCCESS && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) - { - win_skip("GetNamedSecurityInfoA is not implemented\n"); - return; - } - ok(!error, "GetNamedSecurityInfo failed with error %d\n", error); - - ret = GetSecurityDescriptorControl(pSecDesc, &control, &revision); - ok(ret, "GetSecurityDescriptorControl failed with error %d\n", GetLastError()); - ok((control & (SE_SELF_RELATIVE|SE_DACL_PRESENT)) == (SE_SELF_RELATIVE|SE_DACL_PRESENT) || - broken((control & (SE_SELF_RELATIVE|SE_DACL_PRESENT)) == SE_DACL_PRESENT), /* NT4 */ - "control (0x%x) doesn't have (SE_SELF_RELATIVE|SE_DACL_PRESENT) flags set\n", control); - ok(revision == SECURITY_DESCRIPTOR_REVISION1, "revision was %d instead of 1\n", revision); - - isNT4 = (control & (SE_SELF_RELATIVE|SE_DACL_PRESENT)) == SE_DACL_PRESENT; - - ret = GetSecurityDescriptorOwner(pSecDesc, &owner, &owner_defaulted); - ok(ret, "GetSecurityDescriptorOwner failed with error %d\n", GetLastError()); - ok(owner != NULL, "owner should not be NULL\n"); - - ret = GetSecurityDescriptorGroup(pSecDesc, &group, &group_defaulted); - ok(ret, "GetSecurityDescriptorGroup failed with error %d\n", GetLastError()); - ok(group != NULL, "group should not be NULL\n"); - LocalFree(pSecDesc); - - - /* NULL descriptor tests */ - if(isNT4) - { - win_skip("NT4 does not support GetNamedSecutityInfo with a NULL descriptor\n"); - return; - } - - error = pGetNamedSecurityInfoA(windows_dir, SE_FILE_OBJECT,DACL_SECURITY_INFORMATION, - NULL, NULL, NULL, NULL, NULL); - ok(error==ERROR_INVALID_PARAMETER, "GetNamedSecurityInfo failed with error %d\n", error); - - error = pGetNamedSecurityInfoA(windows_dir, SE_FILE_OBJECT,DACL_SECURITY_INFORMATION, - NULL, NULL, &dacl, NULL, NULL); - ok(!error, "GetNamedSecurityInfo failed with error %d\n", error); - ok(dacl != NULL, "dacl should not be NULL\n"); - - error = pGetNamedSecurityInfoA(windows_dir, SE_FILE_OBJECT,OWNER_SECURITY_INFORMATION, - NULL, NULL, &dacl, NULL, NULL); - ok(error==ERROR_INVALID_PARAMETER, "GetNamedSecurityInfo failed with error %d\n", error); -} - -static void test_ConvertStringSecurityDescriptor(void) -{ - BOOL ret; - PSECURITY_DESCRIPTOR pSD; - static const WCHAR Blank[] = { 0 }; - unsigned int i; - static const struct - { - const char *sidstring; - DWORD revision; - BOOL ret; - DWORD GLE; - DWORD altGLE; - } cssd[] = - { - { "D:(A;;GA;;;WD)", 0xdeadbeef, FALSE, ERROR_UNKNOWN_REVISION }, - /* test ACE string type */ - { "D:(A;;GA;;;WD)", SDDL_REVISION_1, TRUE }, - { "D:(D;;GA;;;WD)", SDDL_REVISION_1, TRUE }, - { "ERROR:(D;;GA;;;WD)", SDDL_REVISION_1, FALSE, ERROR_INVALID_PARAMETER }, - /* test ACE string with spaces */ - { " D:(D;;GA;;;WD)", SDDL_REVISION_1, TRUE }, - { "D: (D;;GA;;;WD)", SDDL_REVISION_1, TRUE }, - { "D:( D;;GA;;;WD)", SDDL_REVISION_1, TRUE }, - { "D:(D ;;GA;;;WD)", SDDL_REVISION_1, FALSE, RPC_S_INVALID_STRING_UUID, ERROR_INVALID_ACL }, /* Vista+ */ - { "D:(D; ;GA;;;WD)", SDDL_REVISION_1, TRUE }, - { "D:(D;; GA;;;WD)", SDDL_REVISION_1, TRUE }, - { "D:(D;;GA ;;;WD)", SDDL_REVISION_1, FALSE, ERROR_INVALID_ACL }, - { "D:(D;;GA; ;;WD)", SDDL_REVISION_1, TRUE }, - { "D:(D;;GA;; ;WD)", SDDL_REVISION_1, TRUE }, - { "D:(D;;GA;;; WD)", SDDL_REVISION_1, TRUE }, - { "D:(D;;GA;;;WD )", SDDL_REVISION_1, TRUE }, - /* test ACE string access rights */ - { "D:(A;;GA;;;WD)", SDDL_REVISION_1, TRUE }, - { "D:(A;;GRGWGX;;;WD)", SDDL_REVISION_1, TRUE }, - { "D:(A;;RCSDWDWO;;;WD)", SDDL_REVISION_1, TRUE }, - { "D:(A;;RPWPCCDCLCSWLODTCR;;;WD)", SDDL_REVISION_1, TRUE }, - { "D:(A;;FAFRFWFX;;;WD)", SDDL_REVISION_1, TRUE }, - { "D:(A;;KAKRKWKX;;;WD)", SDDL_REVISION_1, TRUE }, - { "D:(A;;0xFFFFFFFF;;;WD)", SDDL_REVISION_1, TRUE }, - { "S:(AU;;0xFFFFFFFF;;;WD)", SDDL_REVISION_1, TRUE }, - /* test ACE string access right error case */ - { "D:(A;;ROB;;;WD)", SDDL_REVISION_1, FALSE, ERROR_INVALID_ACL }, - /* test behaviour with empty strings */ - { "", SDDL_REVISION_1, TRUE }, - /* test ACE string SID */ - { "D:(D;;GA;;;S-1-0-0)", SDDL_REVISION_1, TRUE }, - { "D:(D;;GA;;;Nonexistent account)", SDDL_REVISION_1, FALSE, ERROR_INVALID_ACL, ERROR_INVALID_SID } /* W2K */ - }; - - if (!pConvertStringSecurityDescriptorToSecurityDescriptorA) - { - win_skip("ConvertStringSecurityDescriptorToSecurityDescriptor is not available\n"); - return; - } - - for (i = 0; i < sizeof(cssd)/sizeof(cssd[0]); i++) - { - DWORD GLE; - - SetLastError(0xdeadbeef); - ret = pConvertStringSecurityDescriptorToSecurityDescriptorA( - cssd[i].sidstring, cssd[i].revision, &pSD, NULL); - GLE = GetLastError(); - ok(ret == cssd[i].ret, "(%02u) Expected %s (%d)\n", i, cssd[i].ret ? "success" : "failure", GLE); - if (!cssd[i].ret) - ok(GLE == cssd[i].GLE || - (cssd[i].altGLE && GLE == cssd[i].altGLE), - "(%02u) Unexpected last error %d\n", i, GLE); - if (ret) - LocalFree(pSD); - } - - /* test behaviour with NULL parameters */ - SetLastError(0xdeadbeef); - ret = pConvertStringSecurityDescriptorToSecurityDescriptorA( - NULL, 0xdeadbeef, &pSD, NULL); - todo_wine - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "ConvertStringSecurityDescriptorToSecurityDescriptor should have failed with ERROR_INVALID_PARAMETER instead of %d\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ret = pConvertStringSecurityDescriptorToSecurityDescriptorW( - NULL, 0xdeadbeef, &pSD, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "ConvertStringSecurityDescriptorToSecurityDescriptor should have failed with ERROR_INVALID_PARAMETER instead of %d\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ret = pConvertStringSecurityDescriptorToSecurityDescriptorA( - "D:(A;;ROB;;;WD)", 0xdeadbeef, NULL, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "ConvertStringSecurityDescriptorToSecurityDescriptor should have failed with ERROR_INVALID_PARAMETER instead of %d\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ret = pConvertStringSecurityDescriptorToSecurityDescriptorA( - "D:(A;;ROB;;;WD)", SDDL_REVISION_1, NULL, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "ConvertStringSecurityDescriptorToSecurityDescriptor should have failed with ERROR_INVALID_PARAMETER instead of %d\n", - GetLastError()); - - /* test behaviour with empty strings */ - SetLastError(0xdeadbeef); - ret = pConvertStringSecurityDescriptorToSecurityDescriptorW( - Blank, SDDL_REVISION_1, &pSD, NULL); - ok(ret, "ConvertStringSecurityDescriptorToSecurityDescriptor failed with error %d\n", GetLastError()); - LocalFree(pSD); -} - -static void test_ConvertSecurityDescriptorToString(void) -{ - SECURITY_DESCRIPTOR desc; - SECURITY_INFORMATION sec_info = OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|DACL_SECURITY_INFORMATION|SACL_SECURITY_INFORMATION; - LPSTR string; - DWORD size; - PSID psid, psid2; - PACL pacl; - char sid_buf[256]; - char acl_buf[8192]; - ULONG len; - - if (!pConvertSecurityDescriptorToStringSecurityDescriptorA) - { - win_skip("ConvertSecurityDescriptorToStringSecurityDescriptor is not available\n"); - return; - } - if (!pCreateWellKnownSid) - { - win_skip("CreateWellKnownSid is not available\n"); - return; - } - -/* It seems Windows XP adds an extra character to the length of the string for each ACE in an ACL. We - * don't replicate this feature so we only test len >= strlen+1. */ -#define CHECK_RESULT_AND_FREE(exp_str) \ - ok(strcmp(string, (exp_str)) == 0, "String mismatch (expected \"%s\", got \"%s\")\n", (exp_str), string); \ - ok(len >= (strlen(exp_str) + 1), "Length mismatch (expected %d, got %d)\n", lstrlen(exp_str) + 1, len); \ - LocalFree(string); - -#define CHECK_ONE_OF_AND_FREE(exp_str1, exp_str2) \ - ok(strcmp(string, (exp_str1)) == 0 || strcmp(string, (exp_str2)) == 0, "String mismatch (expected\n\"%s\" or\n\"%s\", got\n\"%s\")\n", (exp_str1), (exp_str2), string); \ - ok(len >= (strlen(exp_str1) + 1) || len >= (strlen(exp_str2) + 1), "Length mismatch (expected %d or %d, got %d)\n", lstrlen(exp_str1) + 1, lstrlen(exp_str2) + 1, len); \ - LocalFree(string); - - InitializeSecurityDescriptor(&desc, SECURITY_DESCRIPTOR_REVISION); - ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n"); - CHECK_RESULT_AND_FREE(""); - - size = 4096; - pCreateWellKnownSid(WinLocalSid, NULL, sid_buf, &size); - SetSecurityDescriptorOwner(&desc, sid_buf, FALSE); - ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n"); - CHECK_RESULT_AND_FREE("O:S-1-2-0"); - - SetSecurityDescriptorOwner(&desc, sid_buf, TRUE); - ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n"); - CHECK_RESULT_AND_FREE("O:S-1-2-0"); - - size = sizeof(sid_buf); - pCreateWellKnownSid(WinLocalSystemSid, NULL, sid_buf, &size); - SetSecurityDescriptorOwner(&desc, sid_buf, TRUE); - ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n"); - CHECK_RESULT_AND_FREE("O:SY"); - - pConvertStringSidToSidA("S-1-5-21-93476-23408-4576", &psid); - SetSecurityDescriptorGroup(&desc, psid, TRUE); - ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n"); - CHECK_RESULT_AND_FREE("O:SYG:S-1-5-21-93476-23408-4576"); - - ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, GROUP_SECURITY_INFORMATION, &string, &len), "Conversion failed\n"); - CHECK_RESULT_AND_FREE("G:S-1-5-21-93476-23408-4576"); - - pacl = (PACL)acl_buf; - InitializeAcl(pacl, sizeof(acl_buf), ACL_REVISION); - SetSecurityDescriptorDacl(&desc, TRUE, pacl, TRUE); - ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n"); - CHECK_RESULT_AND_FREE("O:SYG:S-1-5-21-93476-23408-4576D:"); - - SetSecurityDescriptorDacl(&desc, TRUE, pacl, FALSE); - ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n"); - CHECK_RESULT_AND_FREE("O:SYG:S-1-5-21-93476-23408-4576D:"); - - pConvertStringSidToSidA("S-1-5-6", &psid2); - pAddAccessAllowedAceEx(pacl, ACL_REVISION, NO_PROPAGATE_INHERIT_ACE, 0xf0000000, psid2); - ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n"); - CHECK_RESULT_AND_FREE("O:SYG:S-1-5-21-93476-23408-4576D:(A;NP;GAGXGWGR;;;SU)"); - - pAddAccessAllowedAceEx(pacl, ACL_REVISION, INHERIT_ONLY_ACE|INHERITED_ACE, 0x00000003, psid2); - ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n"); - CHECK_RESULT_AND_FREE("O:SYG:S-1-5-21-93476-23408-4576D:(A;NP;GAGXGWGR;;;SU)(A;IOID;CCDC;;;SU)"); - - pAddAccessDeniedAceEx(pacl, ACL_REVISION, OBJECT_INHERIT_ACE|CONTAINER_INHERIT_ACE, 0xffffffff, psid); - ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n"); - CHECK_RESULT_AND_FREE("O:SYG:S-1-5-21-93476-23408-4576D:(A;NP;GAGXGWGR;;;SU)(A;IOID;CCDC;;;SU)(D;OICI;0xffffffff;;;S-1-5-21-93476-23408-4576)"); - - - pacl = (PACL)acl_buf; - InitializeAcl(pacl, sizeof(acl_buf), ACL_REVISION); - SetSecurityDescriptorSacl(&desc, TRUE, pacl, FALSE); - ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n"); - CHECK_RESULT_AND_FREE("O:SYG:S-1-5-21-93476-23408-4576D:S:"); - - /* fails in win2k */ - SetSecurityDescriptorDacl(&desc, TRUE, NULL, FALSE); - pAddAuditAccessAceEx(pacl, ACL_REVISION, VALID_INHERIT_FLAGS, KEY_READ|KEY_WRITE, psid2, TRUE, TRUE); - if (pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, sec_info, &string, &len)) - { - CHECK_ONE_OF_AND_FREE("O:SYG:S-1-5-21-93476-23408-4576D:S:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)", /* XP */ - "O:SYG:S-1-5-21-93476-23408-4576D:NO_ACCESS_CONTROLS:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)" /* Vista */); - } - - /* fails in win2k */ - pAddAuditAccessAceEx(pacl, ACL_REVISION, NO_PROPAGATE_INHERIT_ACE, FILE_GENERIC_READ|FILE_GENERIC_WRITE, psid2, TRUE, FALSE); - if (pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, sec_info, &string, &len)) - { - CHECK_ONE_OF_AND_FREE("O:SYG:S-1-5-21-93476-23408-4576D:S:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)(AU;NPSA;0x12019f;;;SU)", /* XP */ - "O:SYG:S-1-5-21-93476-23408-4576D:NO_ACCESS_CONTROLS:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)(AU;NPSA;0x12019f;;;SU)" /* Vista */); - } - - LocalFree(psid2); - LocalFree(psid); -} - -static void test_SetSecurityDescriptorControl (PSECURITY_DESCRIPTOR sec) -{ - SECURITY_DESCRIPTOR_CONTROL ref; - SECURITY_DESCRIPTOR_CONTROL test; - - SECURITY_DESCRIPTOR_CONTROL const mutable - = SE_DACL_AUTO_INHERIT_REQ | SE_SACL_AUTO_INHERIT_REQ - | SE_DACL_AUTO_INHERITED | SE_SACL_AUTO_INHERITED - | SE_DACL_PROTECTED | SE_SACL_PROTECTED - | 0x00000040 | 0x00000080 /* not defined in winnt.h */ - ; - SECURITY_DESCRIPTOR_CONTROL const immutable - = SE_OWNER_DEFAULTED | SE_GROUP_DEFAULTED - | SE_DACL_PRESENT | SE_DACL_DEFAULTED - | SE_SACL_PRESENT | SE_SACL_DEFAULTED - | SE_RM_CONTROL_VALID | SE_SELF_RELATIVE - ; - - int bit; - DWORD dwRevision; - LPCSTR fmt = "Expected error %s, got %u\n"; - - GetSecurityDescriptorControl (sec, &ref, &dwRevision); - - /* The mutable bits are mutable regardless of the truth of - SE_DACL_PRESENT and/or SE_SACL_PRESENT */ - - /* Check call barfs if any bit-of-interest is immutable */ - for (bit = 0; bit < 16; ++bit) - { - SECURITY_DESCRIPTOR_CONTROL const bitOfInterest = 1 << bit; - SECURITY_DESCRIPTOR_CONTROL setOrClear = ref & bitOfInterest; - - SECURITY_DESCRIPTOR_CONTROL ctrl; - - DWORD dwExpect = (bitOfInterest & immutable) - ? ERROR_INVALID_PARAMETER : 0xbebecaca; - LPCSTR strExpect = (bitOfInterest & immutable) - ? "ERROR_INVALID_PARAMETER" : "0xbebecaca"; - - ctrl = (bitOfInterest & mutable) ? ref + bitOfInterest : ref; - setOrClear ^= bitOfInterest; - SetLastError (0xbebecaca); - pSetSecurityDescriptorControl (sec, bitOfInterest, setOrClear); - ok (GetLastError () == dwExpect, fmt, strExpect, GetLastError ()); - GetSecurityDescriptorControl(sec, &test, &dwRevision); - expect_eq(test, ctrl, int, "%x"); - - setOrClear ^= bitOfInterest; - SetLastError (0xbebecaca); - pSetSecurityDescriptorControl (sec, bitOfInterest, setOrClear); - ok (GetLastError () == dwExpect, fmt, strExpect, GetLastError ()); - GetSecurityDescriptorControl (sec, &test, &dwRevision); - expect_eq(test, ref, int, "%x"); - } - - /* Check call barfs if any bit-to-set is immutable - even when not a bit-of-interest */ - for (bit = 0; bit < 16; ++bit) - { - SECURITY_DESCRIPTOR_CONTROL const bitsOfInterest = mutable; - SECURITY_DESCRIPTOR_CONTROL setOrClear = ref & bitsOfInterest; - - SECURITY_DESCRIPTOR_CONTROL ctrl; - - DWORD dwExpect = ((1 << bit) & immutable) - ? ERROR_INVALID_PARAMETER : 0xbebecaca; - LPCSTR strExpect = ((1 << bit) & immutable) - ? "ERROR_INVALID_PARAMETER" : "0xbebecaca"; - - ctrl = ((1 << bit) & immutable) ? test : ref | mutable; - setOrClear ^= bitsOfInterest; - SetLastError (0xbebecaca); - pSetSecurityDescriptorControl (sec, bitsOfInterest, setOrClear | (1 << bit)); - ok (GetLastError () == dwExpect, fmt, strExpect, GetLastError ()); - GetSecurityDescriptorControl(sec, &test, &dwRevision); - expect_eq(test, ctrl, int, "%x"); - - ctrl = ((1 << bit) & immutable) ? test : ref | (1 << bit); - setOrClear ^= bitsOfInterest; - SetLastError (0xbebecaca); - pSetSecurityDescriptorControl (sec, bitsOfInterest, setOrClear | (1 << bit)); - ok (GetLastError () == dwExpect, fmt, strExpect, GetLastError ()); - GetSecurityDescriptorControl(sec, &test, &dwRevision); - expect_eq(test, ctrl, int, "%x"); - } -} - -static void test_PrivateObjectSecurity(void) -{ - SECURITY_INFORMATION sec_info = OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|DACL_SECURITY_INFORMATION|SACL_SECURITY_INFORMATION; - SECURITY_DESCRIPTOR_CONTROL ctrl; - PSECURITY_DESCRIPTOR sec; - DWORD dwDescSize; - DWORD dwRevision; - DWORD retSize; - LPSTR string; - ULONG len; - PSECURITY_DESCRIPTOR buf; - BOOL ret; - - if (!pConvertStringSecurityDescriptorToSecurityDescriptorA) - { - win_skip("ConvertStringSecurityDescriptorToSecurityDescriptor is not available\n"); - return; - } - - ok(pConvertStringSecurityDescriptorToSecurityDescriptorA( - "O:SY" - "G:S-1-5-21-93476-23408-4576" - "D:(A;NP;GAGXGWGR;;;SU)(A;IOID;CCDC;;;SU)" - "(D;OICI;0xffffffff;;;S-1-5-21-93476-23408-4576)" - "S:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)(AU;NPSA;0x12019f;;;SU)", - SDDL_REVISION_1, &sec, &dwDescSize), "Creating descriptor failed\n"); - - test_SetSecurityDescriptorControl(sec); - - LocalFree(sec); - - ok(pConvertStringSecurityDescriptorToSecurityDescriptorA( - "O:SY" - "G:S-1-5-21-93476-23408-4576", - SDDL_REVISION_1, &sec, &dwDescSize), "Creating descriptor failed\n"); - - test_SetSecurityDescriptorControl(sec); - - LocalFree(sec); - - ok(pConvertStringSecurityDescriptorToSecurityDescriptorA( - "O:SY" - "G:S-1-5-21-93476-23408-4576" - "D:(A;NP;GAGXGWGR;;;SU)(A;IOID;CCDC;;;SU)(D;OICI;0xffffffff;;;S-1-5-21-93476-23408-4576)" - "S:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)(AU;NPSA;0x12019f;;;SU)", SDDL_REVISION_1, &sec, &dwDescSize), "Creating descriptor failed\n"); - buf = HeapAlloc(GetProcessHeap(), 0, dwDescSize); - pSetSecurityDescriptorControl(sec, SE_DACL_PROTECTED, SE_DACL_PROTECTED); - GetSecurityDescriptorControl(sec, &ctrl, &dwRevision); - expect_eq(ctrl, 0x9014, int, "%x"); - - ret = GetPrivateObjectSecurity(sec, GROUP_SECURITY_INFORMATION, buf, dwDescSize, &retSize); - ok(ret, "GetPrivateObjectSecurity failed (err=%u)\n", GetLastError()); - ok(retSize <= dwDescSize, "Buffer too small (%d vs %d)\n", retSize, dwDescSize); - ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(buf, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n"); - CHECK_RESULT_AND_FREE("G:S-1-5-21-93476-23408-4576"); - GetSecurityDescriptorControl(buf, &ctrl, &dwRevision); - expect_eq(ctrl, 0x8000, int, "%x"); - - ret = GetPrivateObjectSecurity(sec, GROUP_SECURITY_INFORMATION|DACL_SECURITY_INFORMATION, buf, dwDescSize, &retSize); - ok(ret, "GetPrivateObjectSecurity failed (err=%u)\n", GetLastError()); - ok(retSize <= dwDescSize, "Buffer too small (%d vs %d)\n", retSize, dwDescSize); - ret = pConvertSecurityDescriptorToStringSecurityDescriptorA(buf, SDDL_REVISION_1, sec_info, &string, &len); - ok(ret, "Conversion failed err=%u\n", GetLastError()); - CHECK_ONE_OF_AND_FREE("G:S-1-5-21-93476-23408-4576D:(A;NP;GAGXGWGR;;;SU)(A;IOID;CCDC;;;SU)(D;OICI;0xffffffff;;;S-1-5-21-93476-23408-4576)", - "G:S-1-5-21-93476-23408-4576D:P(A;NP;GAGXGWGR;;;SU)(A;IOID;CCDC;;;SU)(D;OICI;0xffffffff;;;S-1-5-21-93476-23408-4576)"); /* Win7 */ - GetSecurityDescriptorControl(buf, &ctrl, &dwRevision); - expect_eq(ctrl & (~ SE_DACL_PROTECTED), 0x8004, int, "%x"); - - ret = GetPrivateObjectSecurity(sec, sec_info, buf, dwDescSize, &retSize); - ok(ret, "GetPrivateObjectSecurity failed (err=%u)\n", GetLastError()); - ok(retSize == dwDescSize, "Buffer too small (%d vs %d)\n", retSize, dwDescSize); - ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(buf, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n"); - CHECK_ONE_OF_AND_FREE("O:SY" - "G:S-1-5-21-93476-23408-4576" - "D:(A;NP;GAGXGWGR;;;SU)(A;IOID;CCDC;;;SU)(D;OICI;0xffffffff;;;S-1-5-21-93476-23408-4576)" - "S:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)(AU;NPSA;0x12019f;;;SU)", - "O:SY" - "G:S-1-5-21-93476-23408-4576" - "D:P(A;NP;GAGXGWGR;;;SU)(A;IOID;CCDC;;;SU)(D;OICI;0xffffffff;;;S-1-5-21-93476-23408-4576)" - "S:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)(AU;NPSA;0x12019f;;;SU)"); /* Win7 */ - GetSecurityDescriptorControl(buf, &ctrl, &dwRevision); - expect_eq(ctrl & (~ SE_DACL_PROTECTED), 0x8014, int, "%x"); - - SetLastError(0xdeadbeef); - ok(GetPrivateObjectSecurity(sec, sec_info, buf, 5, &retSize) == FALSE, "GetPrivateObjectSecurity should have failed\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected error ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError()); - - LocalFree(sec); - HeapFree(GetProcessHeap(), 0, buf); -} -#undef CHECK_RESULT_AND_FREE -#undef CHECK_ONE_OF_AND_FREE - -static void test_acls(void) -{ - char buffer[256]; - PACL pAcl = (PACL)buffer; - BOOL ret; - - SetLastError(0xdeadbeef); - ret = InitializeAcl(pAcl, sizeof(ACL) - 1, ACL_REVISION); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("InitializeAcl is not implemented\n"); - return; - } - - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "InitializeAcl with too small a buffer should have failed with ERROR_INSUFFICIENT_BUFFER instead of %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = InitializeAcl(pAcl, 0xffffffff, ACL_REVISION); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "InitializeAcl with too large a buffer should have failed with ERROR_INVALID_PARAMETER instead of %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = InitializeAcl(pAcl, sizeof(buffer), ACL_REVISION1); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "InitializeAcl(ACL_REVISION1) should have failed with ERROR_INVALID_PARAMETER instead of %d\n", GetLastError()); - - ret = InitializeAcl(pAcl, sizeof(buffer), ACL_REVISION2); - ok(ret, "InitializeAcl(ACL_REVISION2) failed with error %d\n", GetLastError()); - - ret = IsValidAcl(pAcl); - ok(ret, "IsValidAcl failed with error %d\n", GetLastError()); - - ret = InitializeAcl(pAcl, sizeof(buffer), ACL_REVISION3); - ok(ret, "InitializeAcl(ACL_REVISION3) failed with error %d\n", GetLastError()); - - ret = IsValidAcl(pAcl); - ok(ret, "IsValidAcl failed with error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = InitializeAcl(pAcl, sizeof(buffer), ACL_REVISION4); - if (GetLastError() != ERROR_INVALID_PARAMETER) - { - ok(ret, "InitializeAcl(ACL_REVISION4) failed with error %d\n", GetLastError()); - - ret = IsValidAcl(pAcl); - ok(ret, "IsValidAcl failed with error %d\n", GetLastError()); - } - else - win_skip("ACL_REVISION4 is not implemented on NT4\n"); - - SetLastError(0xdeadbeef); - ret = InitializeAcl(pAcl, sizeof(buffer), -1); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "InitializeAcl(-1) failed with error %d\n", GetLastError()); -} - -static void test_GetSecurityInfo(void) -{ - HANDLE obj; - PSECURITY_DESCRIPTOR sd; - PSID owner, group; - PACL dacl; - DWORD ret; - - if (!pGetSecurityInfo) - { - win_skip("GetSecurityInfo is not available\n"); - return; - } - - /* Create something. Files have lots of associated security info. */ - obj = CreateFile(myARGV[0], GENERIC_READ, FILE_SHARE_READ, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - if (obj == INVALID_HANDLE_VALUE) - { - skip("Couldn't create an object for GetSecurityInfo test\n"); - return; - } - - ret = pGetSecurityInfo(obj, SE_FILE_OBJECT, - OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, - &owner, &group, &dacl, NULL, &sd); - if (ret == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("GetSecurityInfo is not implemented\n"); - CloseHandle(obj); - return; - } - ok(ret == ERROR_SUCCESS, "GetSecurityInfo returned %d\n", ret); - ok(sd != NULL, "GetSecurityInfo\n"); - ok(owner != NULL, "GetSecurityInfo\n"); - ok(group != NULL, "GetSecurityInfo\n"); - if (dacl != NULL) - ok(IsValidAcl(dacl), "GetSecurityInfo\n"); - else - win_skip("No ACL information returned\n"); - - LocalFree(sd); - - if (!pCreateWellKnownSid) - { - win_skip("NULL parameter test would crash on NT4\n"); - CloseHandle(obj); - return; - } - - /* If we don't ask for the security descriptor, Windows will still give us - the other stuff, leaving us no way to free it. */ - ret = pGetSecurityInfo(obj, SE_FILE_OBJECT, - OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, - &owner, &group, &dacl, NULL, NULL); - ok(ret == ERROR_SUCCESS, "GetSecurityInfo returned %d\n", ret); - ok(owner != NULL, "GetSecurityInfo\n"); - ok(group != NULL, "GetSecurityInfo\n"); - if (dacl != NULL) - ok(IsValidAcl(dacl), "GetSecurityInfo\n"); - else - win_skip("No ACL information returned\n"); - - CloseHandle(obj); -} - -static void test_GetSidSubAuthority(void) -{ - PSID psid = NULL; - - if (!pGetSidSubAuthority || !pConvertStringSidToSidA || !pIsValidSid || !pGetSidSubAuthorityCount) - { - win_skip("Some functions not available\n"); - return; - } - /* Note: on windows passing in an invalid index like -1, lets GetSidSubAuthority return 0x05000000 but - still GetLastError returns ERROR_SUCCESS then. We don't test these unlikely cornercases here for now */ - ok(pConvertStringSidToSidA("S-1-5-21-93476-23408-4576",&psid),"ConvertStringSidToSidA failed\n"); - ok(pIsValidSid(psid),"Sid is not valid\n"); - SetLastError(0xbebecaca); - ok(*pGetSidSubAuthorityCount(psid) == 4,"GetSidSubAuthorityCount gave %d expected 4\n",*pGetSidSubAuthorityCount(psid)); - ok(GetLastError() == 0,"GetLastError returned %d instead of 0\n",GetLastError()); - SetLastError(0xbebecaca); - ok(*pGetSidSubAuthority(psid,0) == 21,"GetSidSubAuthority gave %d expected 21\n",*pGetSidSubAuthority(psid,0)); - ok(GetLastError() == 0,"GetLastError returned %d instead of 0\n",GetLastError()); - SetLastError(0xbebecaca); - ok(*pGetSidSubAuthority(psid,1) == 93476,"GetSidSubAuthority gave %d expected 93476\n",*pGetSidSubAuthority(psid,1)); - ok(GetLastError() == 0,"GetLastError returned %d instead of 0\n",GetLastError()); - SetLastError(0xbebecaca); - ok(pGetSidSubAuthority(psid,4) != NULL,"Expected out of bounds GetSidSubAuthority to return a non-NULL pointer\n"); - ok(GetLastError() == 0,"GetLastError returned %d instead of 0\n",GetLastError()); - LocalFree(psid); -} - -static void test_CheckTokenMembership(void) -{ - PTOKEN_GROUPS token_groups; - DWORD size; - HANDLE process_token, token; - BOOL is_member; - BOOL ret; - DWORD i; - - if (!pCheckTokenMembership) - { - win_skip("CheckTokenMembership is not available\n"); - return; - } - ret = OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE|TOKEN_QUERY, &process_token); - ok(ret, "OpenProcessToken failed with error %d\n", GetLastError()); - - ret = DuplicateToken(process_token, SecurityImpersonation, &token); - ok(ret, "DuplicateToken failed with error %d\n", GetLastError()); - - /* groups */ - ret = GetTokenInformation(token, TokenGroups, NULL, 0, &size); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "GetTokenInformation(TokenGroups) %s with error %d\n", - ret ? "succeeded" : "failed", GetLastError()); - token_groups = HeapAlloc(GetProcessHeap(), 0, size); - ret = GetTokenInformation(token, TokenGroups, token_groups, size, &size); - ok(ret, "GetTokenInformation(TokenGroups) failed with error %d\n", GetLastError()); - - for (i = 0; i < token_groups->GroupCount; i++) - { - if (token_groups->Groups[i].Attributes & SE_GROUP_ENABLED) - break; - } - - if (i == token_groups->GroupCount) - { - HeapFree(GetProcessHeap(), 0, token_groups); - CloseHandle(token); - skip("user not a member of any group\n"); - return; - } - - is_member = FALSE; - ret = pCheckTokenMembership(token, token_groups->Groups[i].Sid, &is_member); - ok(ret, "CheckTokenMembership failed with error %d\n", GetLastError()); - ok(is_member, "CheckTokenMembership should have detected sid as member\n"); - - is_member = FALSE; - ret = pCheckTokenMembership(NULL, token_groups->Groups[i].Sid, &is_member); - ok(ret, "CheckTokenMembership failed with error %d\n", GetLastError()); - ok(is_member, "CheckTokenMembership should have detected sid as member\n"); - - is_member = TRUE; - SetLastError(0xdeadbeef); - ret = pCheckTokenMembership(process_token, token_groups->Groups[i].Sid, &is_member); - ok(!ret && GetLastError() == ERROR_NO_IMPERSONATION_TOKEN, - "CheckTokenMembership with process token %s with error %d\n", - ret ? "succeeded" : "failed", GetLastError()); - ok(!is_member, "CheckTokenMembership should have cleared is_member\n"); - - HeapFree(GetProcessHeap(), 0, token_groups); - CloseHandle(token); - CloseHandle(process_token); -} - -static void test_EqualSid(void) -{ - PSID sid1, sid2; - BOOL ret; - SID_IDENTIFIER_AUTHORITY SIDAuthWorld = { SECURITY_WORLD_SID_AUTHORITY }; - SID_IDENTIFIER_AUTHORITY SIDAuthNT = { SECURITY_NT_AUTHORITY }; - - SetLastError(0xdeadbeef); - ret = AllocateAndInitializeSid(&SIDAuthNT, 2, SECURITY_BUILTIN_DOMAIN_RID, - DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &sid1); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("AllocateAndInitializeSid is not implemented\n"); - return; - } - ok(ret, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); - ok(GetLastError() == 0xdeadbeef, - "AllocateAndInitializeSid shouldn't have set last error to %d\n", - GetLastError()); - - ret = AllocateAndInitializeSid(&SIDAuthWorld, 1, SECURITY_WORLD_RID, - 0, 0, 0, 0, 0, 0, 0, &sid2); - ok(ret, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = EqualSid(sid1, sid2); - ok(!ret, "World and domain admins sids shouldn't have been equal\n"); - ok(GetLastError() == ERROR_SUCCESS || - broken(GetLastError() == 0xdeadbeef), /* NT4 */ - "EqualSid should have set last error to ERROR_SUCCESS instead of %d\n", - GetLastError()); - - SetLastError(0xdeadbeef); - sid2 = FreeSid(sid2); - ok(!sid2, "FreeSid should have returned NULL instead of %p\n", sid2); - ok(GetLastError() == 0xdeadbeef, - "FreeSid shouldn't have set last error to %d\n", - GetLastError()); - - ret = AllocateAndInitializeSid(&SIDAuthNT, 2, SECURITY_BUILTIN_DOMAIN_RID, - DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &sid2); - ok(ret, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = EqualSid(sid1, sid2); - ok(ret, "Same sids should have been equal\n"); - ok(GetLastError() == ERROR_SUCCESS || - broken(GetLastError() == 0xdeadbeef), /* NT4 */ - "EqualSid should have set last error to ERROR_SUCCESS instead of %d\n", - GetLastError()); - - ((SID *)sid2)->Revision = 2; - SetLastError(0xdeadbeef); - ret = EqualSid(sid1, sid2); - ok(!ret, "EqualSid with invalid sid should have returned FALSE\n"); - ok(GetLastError() == ERROR_SUCCESS || - broken(GetLastError() == 0xdeadbeef), /* NT4 */ - "EqualSid should have set last error to ERROR_SUCCESS instead of %d\n", - GetLastError()); - ((SID *)sid2)->Revision = SID_REVISION; - - FreeSid(sid1); - FreeSid(sid2); -} - -static void test_GetUserNameA(void) -{ - char buffer[UNLEN + 1], filler[UNLEN + 1]; - DWORD required_len, buffer_len; - BOOL ret; - - /* Test crashes on Windows. */ - if (0) - { - SetLastError(0xdeadbeef); - GetUserNameA(NULL, NULL); - } - - SetLastError(0xdeadbeef); - required_len = 0; - ret = GetUserNameA(NULL, &required_len); - ok(ret == FALSE, "GetUserNameA returned %d\n", ret); - ok(required_len != 0, "Outputted buffer length was %u\n", required_len); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Last error was %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - required_len = 1; - ret = GetUserNameA(NULL, &required_len); - ok(ret == FALSE, "GetUserNameA returned %d\n", ret); - ok(required_len != 0 && required_len != 1, "Outputted buffer length was %u\n", required_len); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Last error was %u\n", GetLastError()); - - /* Tests crashes on Windows. */ - if (0) - { - SetLastError(0xdeadbeef); - required_len = UNLEN + 1; - GetUserNameA(NULL, &required_len); - - SetLastError(0xdeadbeef); - GetUserNameA(buffer, NULL); - } - - memset(filler, 'x', sizeof(filler)); - - /* Note that GetUserNameA on XP and newer outputs the number of bytes - * required for a Unicode string, which affects a test in the next block. */ - SetLastError(0xdeadbeef); - memcpy(buffer, filler, sizeof(filler)); - required_len = 0; - ret = GetUserNameA(buffer, &required_len); - ok(ret == FALSE, "GetUserNameA returned %d\n", ret); - ok(!memcmp(buffer, filler, sizeof(filler)), "Output buffer was altered\n"); - ok(required_len != 0, "Outputted buffer length was %u\n", required_len); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Last error was %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - memcpy(buffer, filler, sizeof(filler)); - buffer_len = required_len; - ret = GetUserNameA(buffer, &buffer_len); - ok(ret == TRUE, "GetUserNameA returned %d, last error %u\n", ret, GetLastError()); - ok(memcmp(buffer, filler, sizeof(filler)) != 0, "Output buffer was untouched\n"); - ok(buffer_len == required_len || - broken(buffer_len == required_len / sizeof(WCHAR)), /* XP+ */ - "Outputted buffer length was %u\n", buffer_len); - - /* Use the reported buffer size from the last GetUserNameA call and pass - * a length that is one less than the required value. */ - SetLastError(0xdeadbeef); - memcpy(buffer, filler, sizeof(filler)); - buffer_len--; - ret = GetUserNameA(buffer, &buffer_len); - ok(ret == FALSE, "GetUserNameA returned %d\n", ret); - ok(!memcmp(buffer, filler, sizeof(filler)), "Output buffer was untouched\n"); - ok(buffer_len == required_len, "Outputted buffer length was %u\n", buffer_len); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Last error was %u\n", GetLastError()); -} - -static void test_GetUserNameW(void) -{ - WCHAR buffer[UNLEN + 1], filler[UNLEN + 1]; - DWORD required_len, buffer_len; - BOOL ret; - - /* Test crashes on Windows. */ - if (0) - { - SetLastError(0xdeadbeef); - GetUserNameW(NULL, NULL); - } - - SetLastError(0xdeadbeef); - required_len = 0; - ret = GetUserNameW(NULL, &required_len); - ok(ret == FALSE, "GetUserNameW returned %d\n", ret); - ok(required_len != 0, "Outputted buffer length was %u\n", required_len); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Last error was %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - required_len = 1; - ret = GetUserNameW(NULL, &required_len); - ok(ret == FALSE, "GetUserNameW returned %d\n", ret); - ok(required_len != 0 && required_len != 1, "Outputted buffer length was %u\n", required_len); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Last error was %u\n", GetLastError()); - - /* Tests crash on Windows. */ - if (0) - { - SetLastError(0xdeadbeef); - required_len = UNLEN + 1; - GetUserNameW(NULL, &required_len); - - SetLastError(0xdeadbeef); - GetUserNameW(buffer, NULL); - } - - memset(filler, 'x', sizeof(filler)); - - SetLastError(0xdeadbeef); - memcpy(buffer, filler, sizeof(filler)); - required_len = 0; - ret = GetUserNameW(buffer, &required_len); - ok(ret == FALSE, "GetUserNameW returned %d\n", ret); - ok(!memcmp(buffer, filler, sizeof(filler)), "Output buffer was altered\n"); - ok(required_len != 0, "Outputted buffer length was %u\n", required_len); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Last error was %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - memcpy(buffer, filler, sizeof(filler)); - buffer_len = required_len; - ret = GetUserNameW(buffer, &buffer_len); - ok(ret == TRUE, "GetUserNameW returned %d, last error %u\n", ret, GetLastError()); - ok(memcmp(buffer, filler, sizeof(filler)) != 0, "Output buffer was untouched\n"); - ok(buffer_len == required_len, "Outputted buffer length was %u\n", buffer_len); - - /* GetUserNameW on XP and newer writes a truncated portion of the username string to the buffer. */ - SetLastError(0xdeadbeef); - memcpy(buffer, filler, sizeof(filler)); - buffer_len--; - ret = GetUserNameW(buffer, &buffer_len); - ok(ret == FALSE, "GetUserNameW returned %d\n", ret); - ok(!memcmp(buffer, filler, sizeof(filler)) || - broken(memcmp(buffer, filler, sizeof(filler)) != 0), /* XP+ */ - "Output buffer was altered\n"); - ok(buffer_len == required_len, "Outputted buffer length was %u\n", buffer_len); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Last error was %u\n", GetLastError()); -} - -static void test_CreateRestrictedToken(void) -{ - HANDLE process_token, token, r_token; - PTOKEN_GROUPS token_groups, groups2; - SID_AND_ATTRIBUTES sattr; - BOOL is_member; - DWORD size; - BOOL ret; - DWORD i, j; - - if (!pCreateRestrictedToken) - { - win_skip("CreateRestrictedToken is not available\n"); - return; - } - - ret = OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE|TOKEN_QUERY, &process_token); - ok(ret, "got error %d\n", GetLastError()); - - ret = DuplicateTokenEx(process_token, TOKEN_DUPLICATE|TOKEN_ADJUST_GROUPS|TOKEN_QUERY, - NULL, SecurityImpersonation, TokenImpersonation, &token); - ok(ret, "got error %d\n", GetLastError()); - - /* groups */ - ret = GetTokenInformation(token, TokenGroups, NULL, 0, &size); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "got %d with error %d\n", ret, GetLastError()); - token_groups = HeapAlloc(GetProcessHeap(), 0, size); - ret = GetTokenInformation(token, TokenGroups, token_groups, size, &size); - ok(ret, "got error %d\n", GetLastError()); - - for (i = 0; i < token_groups->GroupCount; i++) - { - if (token_groups->Groups[i].Attributes & SE_GROUP_ENABLED) - break; - } - - if (i == token_groups->GroupCount) - { - HeapFree(GetProcessHeap(), 0, token_groups); - CloseHandle(token); - skip("User not a member of any group\n"); - return; - } - - is_member = FALSE; - ret = pCheckTokenMembership(token, token_groups->Groups[i].Sid, &is_member); - ok(ret, "got error %d\n", GetLastError()); - ok(is_member, "not a member\n"); - - /* disable a SID in new token */ - sattr.Sid = token_groups->Groups[i].Sid; - sattr.Attributes = 0; - r_token = NULL; - ret = pCreateRestrictedToken(token, 0, 1, &sattr, 0, NULL, 0, NULL, &r_token); - todo_wine ok(ret, "got error %d\n", GetLastError()); - - if (ret) - { - /* check if a SID is enabled */ - is_member = TRUE; - ret = pCheckTokenMembership(r_token, token_groups->Groups[i].Sid, &is_member); - ok(ret, "got error %d\n", GetLastError()); - ok(!is_member, "not a member\n"); - - ret = GetTokenInformation(r_token, TokenGroups, NULL, 0, &size); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %d with error %d\n", - ret, GetLastError()); - groups2 = HeapAlloc(GetProcessHeap(), 0, size); - ret = GetTokenInformation(r_token, TokenGroups, groups2, size, &size); - ok(ret, "got error %d\n", GetLastError()); - - for (j = 0; j < groups2->GroupCount; j++) - { - if (EqualSid(groups2->Groups[j].Sid, token_groups->Groups[i].Sid)) - break; - } - - ok(groups2->Groups[j].Attributes & SE_GROUP_USE_FOR_DENY_ONLY, - "got wrong attributes\n"); - ok((groups2->Groups[j].Attributes & SE_GROUP_ENABLED) == 0, - "got wrong attributes\n"); - - HeapFree(GetProcessHeap(), 0, groups2); - } - - HeapFree(GetProcessHeap(), 0, token_groups); - CloseHandle(r_token); - CloseHandle(token); - CloseHandle(process_token); -} - -START_TEST(security) -{ - init(); - if (!hmod) return; - - if (myARGC >= 3) - { - test_process_security_child(); - return; - } - test_sid(); - test_trustee(); - test_luid(); - test_CreateWellKnownSid(); - test_FileSecurity(); - test_AccessCheck(); - test_token_attr(); - test_LookupAccountSid(); - test_LookupAccountName(); - test_security_descriptor(); - test_process_security(); - test_impersonation_level(); - test_SetEntriesInAclW(); - test_SetEntriesInAclA(); - test_GetNamedSecurityInfoA(); - test_ConvertStringSecurityDescriptor(); - test_ConvertSecurityDescriptorToString(); - test_PrivateObjectSecurity(); - test_acls(); - test_GetSecurityInfo(); - test_GetSidSubAuthority(); - test_CheckTokenMembership(); - test_EqualSid(); - test_GetUserNameA(); - test_GetUserNameW(); - test_CreateRestrictedToken(); -} diff --git a/rostests/winetests/advapi32/service.c b/rostests/winetests/advapi32/service.c deleted file mode 100644 index aa2c6a1a066..00000000000 --- a/rostests/winetests/advapi32/service.c +++ /dev/null @@ -1,2364 +0,0 @@ -/* - * Unit tests for service functions - * - * Copyright (c) 2007 Paul Vriens - * - * 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 "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "winreg.h" -#include "winsvc.h" -#include "winnls.h" -#include "lmcons.h" -#include "aclapi.h" - -#include "wine/test.h" - -static const CHAR spooler[] = "Spooler"; /* Should be available on all platforms */ -static CHAR selfname[MAX_PATH]; - -static BOOL (WINAPI *pChangeServiceConfig2A)(SC_HANDLE,DWORD,LPVOID); -static BOOL (WINAPI *pEnumServicesStatusExA)(SC_HANDLE, SC_ENUM_TYPE, DWORD, - DWORD, LPBYTE, DWORD, LPDWORD, - LPDWORD, LPDWORD, LPCSTR); -static BOOL (WINAPI *pEnumServicesStatusExW)(SC_HANDLE, SC_ENUM_TYPE, DWORD, - DWORD, LPBYTE, DWORD, LPDWORD, - LPDWORD, LPDWORD, LPCWSTR); -static DWORD (WINAPI *pGetSecurityInfo)(HANDLE, SE_OBJECT_TYPE, SECURITY_INFORMATION, - PSID*, PSID*, PACL*, PACL*, PSECURITY_DESCRIPTOR*); -static BOOL (WINAPI *pQueryServiceConfig2A)(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD); -static BOOL (WINAPI *pQueryServiceConfig2W)(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD); -static BOOL (WINAPI *pQueryServiceStatusEx)(SC_HANDLE, SC_STATUS_TYPE, LPBYTE, - DWORD, LPDWORD); - -static void init_function_pointers(void) -{ - HMODULE hadvapi32 = GetModuleHandleA("advapi32.dll"); - - pChangeServiceConfig2A = (void*)GetProcAddress(hadvapi32, "ChangeServiceConfig2A"); - pEnumServicesStatusExA= (void*)GetProcAddress(hadvapi32, "EnumServicesStatusExA"); - pEnumServicesStatusExW= (void*)GetProcAddress(hadvapi32, "EnumServicesStatusExW"); - pGetSecurityInfo = (void *)GetProcAddress(hadvapi32, "GetSecurityInfo"); - pQueryServiceConfig2A= (void*)GetProcAddress(hadvapi32, "QueryServiceConfig2A"); - pQueryServiceConfig2W= (void*)GetProcAddress(hadvapi32, "QueryServiceConfig2W"); - pQueryServiceStatusEx= (void*)GetProcAddress(hadvapi32, "QueryServiceStatusEx"); -} - -static void test_open_scm(void) -{ - SC_HANDLE scm_handle; - - /* No access rights */ - SetLastError(0xdeadbeef); - scm_handle = OpenSCManagerA(NULL, NULL, 0); - ok(scm_handle != NULL, "Expected success, got error %u\n", GetLastError()); - CloseServiceHandle(scm_handle); - - /* Unknown database name */ - SetLastError(0xdeadbeef); - scm_handle = OpenSCManagerA(NULL, "DoesNotExist", SC_MANAGER_CONNECT); - ok(!scm_handle, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_NAME, "Expected ERROR_INVALID_NAME, got %d\n", GetLastError()); - CloseServiceHandle(scm_handle); /* Just in case */ - - /* MSDN says only ServiceActive is allowed, or NULL */ - SetLastError(0xdeadbeef); - scm_handle = OpenSCManagerA(NULL, SERVICES_FAILED_DATABASEA, SC_MANAGER_CONNECT); - ok(!scm_handle, "Expected failure\n"); - ok(GetLastError() == ERROR_DATABASE_DOES_NOT_EXIST, "Expected ERROR_DATABASE_DOES_NOT_EXIST, got %d\n", GetLastError()); - CloseServiceHandle(scm_handle); /* Just in case */ - - /* Remote unknown host */ - SetLastError(0xdeadbeef); - scm_handle = OpenSCManagerA("DOESNOTEXIST", SERVICES_ACTIVE_DATABASEA, SC_MANAGER_CONNECT); - todo_wine - { - ok(!scm_handle, "Expected failure\n"); - ok(GetLastError() == RPC_S_SERVER_UNAVAILABLE || GetLastError() == RPC_S_INVALID_NET_ADDR /* w2k8 */, - "Expected RPC_S_SERVER_UNAVAILABLE or RPC_S_INVALID_NET_ADDR, got %d\n", GetLastError()); - } - CloseServiceHandle(scm_handle); /* Just in case */ - - /* Proper call with an empty hostname */ - SetLastError(0xdeadbeef); - scm_handle = OpenSCManagerA("", SERVICES_ACTIVE_DATABASEA, SC_MANAGER_CONNECT); - ok(scm_handle != NULL, "Expected success, got error %u\n", GetLastError()); - CloseServiceHandle(scm_handle); - - /* Again a correct one */ - SetLastError(0xdeadbeef); - scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); - ok(scm_handle != NULL, "Expected success, got error %u\n", GetLastError()); - CloseServiceHandle(scm_handle); -} - -static void test_open_svc(void) -{ - SC_HANDLE scm_handle, svc_handle; - CHAR displayname[4096]; - DWORD displaysize; - - /* All NULL (invalid access rights) */ - SetLastError(0xdeadbeef); - svc_handle = OpenServiceA(NULL, NULL, 0); - ok(!svc_handle, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - - /* TODO: Add some tests with invalid handles. These produce errors on Windows but crash on Wine */ - - /* NULL service */ - scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); - SetLastError(0xdeadbeef); - svc_handle = OpenServiceA(scm_handle, NULL, GENERIC_READ); - ok(!svc_handle, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_ADDRESS /* W2K, XP, W2K3, Vista */ || - GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Expected ERROR_INVALID_ADDRESS or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* Nonexistent service */ - scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); - SetLastError(0xdeadbeef); - svc_handle = OpenServiceA(scm_handle, "deadbeef", GENERIC_READ); - ok(!svc_handle, "Expected failure\n"); - ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - CloseServiceHandle(scm_handle); - - /* Proper SCM handle but different access rights */ - scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); - SetLastError(0xdeadbeef); - svc_handle = OpenServiceA(scm_handle, spooler, GENERIC_WRITE); - if (!svc_handle && (GetLastError() == ERROR_ACCESS_DENIED)) - skip("Not enough rights to get a handle to the service\n"); - else - { - ok(svc_handle != NULL, "Expected success, got error %u\n", GetLastError()); - CloseServiceHandle(svc_handle); - } - - /* Test to show we can't open a service with the displayname */ - - /* Retrieve the needed size for the buffer */ - displaysize = 0; - GetServiceDisplayNameA(scm_handle, spooler, NULL, &displaysize); - /* Get the displayname */ - GetServiceDisplayNameA(scm_handle, spooler, displayname, &displaysize); - /* Try to open the service with this displayname, unless the displayname equals - * the servicename as that would defeat the purpose of this test. - */ - if (!lstrcmpi(spooler, displayname)) - { - skip("displayname equals servicename\n"); - CloseServiceHandle(scm_handle); - return; - } - - SetLastError(0xdeadbeef); - svc_handle = OpenServiceA(scm_handle, displayname, GENERIC_READ); - ok(!svc_handle, "Expected failure\n"); - ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - /* Just in case */ - CloseServiceHandle(svc_handle); - - CloseServiceHandle(scm_handle); -} - -static void test_create_delete_svc(void) -{ - SC_HANDLE scm_handle, svc_handle1; - CHAR username[UNLEN + 1], domain[MAX_PATH]; - DWORD user_size = UNLEN + 1; - CHAR account[UNLEN + 3]; - static const CHAR servicename [] = "Winetest"; - static const CHAR pathname [] = "we_dont_care.exe"; - static const CHAR empty [] = ""; - static const CHAR password [] = "secret"; - BOOL spooler_exists = FALSE; - BOOL ret; - CHAR display[4096]; - DWORD display_size = sizeof(display); - - /* Get the username and turn it into an account to be used in some tests */ - GetUserNameA(username, &user_size); - /* Get the domainname to cater for that situation */ - if (GetEnvironmentVariableA("USERDOMAIN", domain, MAX_PATH)) - sprintf(account, "%s\\%s", domain, username); - else - sprintf(account, ".\\%s", username); - - /* All NULL */ - SetLastError(0xdeadbeef); - svc_handle1 = CreateServiceA(NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL); - ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - - scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); - - /* Only a valid handle to the Service Control Manager */ - SetLastError(0xdeadbeef); - svc_handle1 = CreateServiceA(scm_handle, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL); - ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_ADDRESS /* W2K, W2K3, XP, Vista */ || - GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Expected ERROR_INVALID_ADDRESS or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* Now with a servicename */ - SetLastError(0xdeadbeef); - svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL); - ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_ADDRESS /* W2K, W2K3, XP, Vista */ || - GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Expected ERROR_INVALID_ADDRESS or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* Or just a binary name */ - SetLastError(0xdeadbeef); - svc_handle1 = CreateServiceA(scm_handle, NULL, NULL, 0, 0, 0, 0, pathname, NULL, NULL, NULL, NULL, NULL); - ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_ADDRESS /* W2K, W2K3, XP, Vista */ || - GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Expected ERROR_INVALID_ADDRESS or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* Both servicename and binary name (We only have connect rights) */ - SetLastError(0xdeadbeef); - svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, 0, 0, 0, 0, pathname, NULL, NULL, NULL, NULL, NULL); - ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); - - /* They can even be empty at this stage of parameter checking */ - SetLastError(0xdeadbeef); - svc_handle1 = CreateServiceA(scm_handle, empty, NULL, 0, 0, 0, 0, pathname, NULL, NULL, NULL, NULL, NULL); - ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, 0, 0, 0, 0, empty, NULL, NULL, NULL, NULL, NULL); - ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); - - /* Open the Service Control Manager with minimal rights for creation - * (Verified with 'SC_MANAGER_ALL_ACCESS &~ SC_MANAGER_CREATE_SERVICE') - */ - CloseServiceHandle(scm_handle); - SetLastError(0xdeadbeef); - scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CREATE_SERVICE); - if (!scm_handle && (GetLastError() == ERROR_ACCESS_DENIED)) - { - skip("Not enough rights to get a handle to the manager\n"); - return; - } - - /* TODO: It looks like account (ServiceStartName) and (maybe) password are checked at this place */ - - /* Empty strings for servicename and binary name are checked */ - SetLastError(0xdeadbeef); - svc_handle1 = CreateServiceA(scm_handle, empty, NULL, 0, 0, 0, 0, pathname, NULL, NULL, NULL, NULL, NULL); - ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_NAME, "Expected ERROR_INVALID_NAME, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, 0, 0, 0, 0, empty, NULL, NULL, NULL, NULL, NULL); - ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - svc_handle1 = CreateServiceA(scm_handle, empty, NULL, 0, 0, 0, 0, empty, NULL, NULL, NULL, NULL, NULL); - ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_NAME, "Expected ERROR_INVALID_NAME, got %d\n", GetLastError()); - - /* Valid call (as we will see later) except for the empty binary name (to proof it's indeed - * an ERROR_INVALID_PARAMETER) - */ - SetLastError(0xdeadbeef); - svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, 0, SERVICE_WIN32_OWN_PROCESS, - SERVICE_DISABLED, 0, empty, NULL, NULL, NULL, NULL, NULL); - ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* Windows checks if the 'service type', 'access type' and the combination of them are valid, so let's test that */ - - /* Illegal (service-type, which is used as a mask can't have a mix. Except the one with - * SERVICE_INTERACTIVE_PROCESS which will be tested below in a valid call) - */ - SetLastError(0xdeadbeef); - svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, GENERIC_ALL, SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS, - SERVICE_DISABLED, 0, pathname, NULL, NULL, NULL, NULL, NULL); - ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* Illegal (SERVICE_INTERACTIVE_PROCESS is only allowed with SERVICE_WIN32_OWN_PROCESS or SERVICE_WIN32_SHARE_PROCESS) */ - SetLastError(0xdeadbeef); - svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, GENERIC_ALL, SERVICE_FILE_SYSTEM_DRIVER | SERVICE_INTERACTIVE_PROCESS, - SERVICE_DISABLED, 0, pathname, NULL, NULL, NULL, NULL, NULL); - ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* Illegal (this combination is only allowed when the LocalSystem account (ServiceStartName) is used) - * Not having a correct account would have resulted in an ERROR_INVALID_SERVICE_ACCOUNT. - */ - SetLastError(0xdeadbeef); - svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, GENERIC_ALL, SERVICE_WIN32_OWN_PROCESS | SERVICE_INTERACTIVE_PROCESS, - SERVICE_DISABLED, 0, pathname, NULL, NULL, NULL, account, password); - ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_INVALID_SERVICE_ACCOUNT, - "Expected ERROR_INVALID_PARAMETER or ERROR_INVALID_SERVICE_ACCOUNT, got %d\n", GetLastError()); - - /* Illegal (start-type is not a mask and should only be one of the possibilities) - * Remark : 'OR'-ing them could result in a valid possibility (but doesn't make sense as - * it's most likely not the wanted start-type) - */ - SetLastError(0xdeadbeef); - svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, GENERIC_ALL, SERVICE_WIN32_OWN_PROCESS, - SERVICE_AUTO_START | SERVICE_DISABLED, 0, pathname, NULL, NULL, NULL, NULL, NULL); - ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* Illegal (SERVICE_BOOT_START and SERVICE_SYSTEM_START are only allowed for driver services) */ - SetLastError(0xdeadbeef); - svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, 0, SERVICE_WIN32_OWN_PROCESS, - SERVICE_BOOT_START, 0, pathname, NULL, NULL, NULL, NULL, NULL); - ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* Test if ServiceType can be a combined one for drivers */ - SetLastError(0xdeadbeef); - svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, 0, SERVICE_KERNEL_DRIVER | SERVICE_FILE_SYSTEM_DRIVER, - SERVICE_BOOT_START, 0, pathname, NULL, NULL, NULL, NULL, NULL); - ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* The service already exists (check first, just in case) */ - svc_handle1 = OpenServiceA(scm_handle, spooler, GENERIC_READ); - if (svc_handle1) - { - spooler_exists = TRUE; - CloseServiceHandle(svc_handle1); - SetLastError(0xdeadbeef); - svc_handle1 = CreateServiceA(scm_handle, spooler, NULL, 0, SERVICE_WIN32_OWN_PROCESS, - SERVICE_DISABLED, 0, pathname, NULL, NULL, NULL, NULL, NULL); - ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_SERVICE_EXISTS, "Expected ERROR_SERVICE_EXISTS, got %d\n", GetLastError()); - } - else - skip("Spooler service doesn't exist\n"); - - /* To find an existing displayname we check the 'Spooler' service. Although the registry - * doesn't show DisplayName on NT4, this call will return a displayname which is equal - * to the servicename and can't be used as well for a new displayname. - */ - if (spooler_exists) - { - ret = GetServiceDisplayNameA(scm_handle, spooler, display, &display_size); - - if (!ret) - skip("Could not retrieve a displayname for the Spooler service\n"); - else - { - svc_handle1 = CreateServiceA(scm_handle, servicename, display, 0, SERVICE_WIN32_OWN_PROCESS, - SERVICE_DISABLED, 0, pathname, NULL, NULL, NULL, NULL, NULL); - ok(!svc_handle1, "Expected failure\n"); - ok(GetLastError() == ERROR_DUPLICATE_SERVICE_NAME, - "Expected ERROR_DUPLICATE_SERVICE_NAME, got %d\n", GetLastError()); - } - } - else - skip("Could not retrieve a displayname (Spooler service doesn't exist)\n"); - - /* Windows doesn't care about the access rights for creation (which makes - * sense as there is no service yet) as long as there are sufficient - * rights to the manager. - */ - SetLastError(0xdeadbeef); - svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, 0, SERVICE_WIN32_OWN_PROCESS | SERVICE_INTERACTIVE_PROCESS, - SERVICE_DISABLED, 0, pathname, NULL, NULL, NULL, NULL, NULL); - ok(svc_handle1 != NULL, "Could not create the service : %d\n", GetLastError()); - - /* DeleteService however must have proper rights */ - SetLastError(0xdeadbeef); - ret = DeleteService(svc_handle1); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, - "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); - - /* Open the service with minimal rights for deletion. - * (Verified with 'SERVICE_ALL_ACCESS &~ DELETE') - */ - CloseServiceHandle(svc_handle1); - svc_handle1 = OpenServiceA(scm_handle, servicename, DELETE); - - /* Now that we have the proper rights, we should be able to delete */ - SetLastError(0xdeadbeef); - ret = DeleteService(svc_handle1); - ok(ret, "Expected success, got error %u\n", GetLastError()); - - CloseServiceHandle(svc_handle1); - CloseServiceHandle(scm_handle); - - /* Wait a while. One of the following tests also does a CreateService for the - * same servicename and this would result in an ERROR_SERVICE_MARKED_FOR_DELETE - * error if we do this to quick. Vista seems more picky then the others. - */ - Sleep(1000); - - /* And a final NULL check */ - SetLastError(0xdeadbeef); - ret = DeleteService(NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); -} - -static void test_get_displayname(void) -{ - SC_HANDLE scm_handle, svc_handle; - BOOL ret; - CHAR displayname[4096]; - WCHAR displaynameW[2048]; - DWORD displaysize, tempsize, tempsizeW; - static const CHAR deadbeef[] = "Deadbeef"; - static const WCHAR spoolerW[] = {'S','p','o','o','l','e','r',0}; - static const WCHAR deadbeefW[] = {'D','e','a','d','b','e','e','f',0}; - static const WCHAR abcW[] = {'A','B','C',0}; - static const CHAR servicename[] = "Winetest"; - static const CHAR pathname[] = "we_dont_care.exe"; - - /* Having NULL for the size of the buffer will crash on W2K3 */ - - SetLastError(0xdeadbeef); - ret = GetServiceDisplayNameA(NULL, NULL, NULL, &displaysize); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - - scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); - - SetLastError(0xdeadbeef); - ret = GetServiceDisplayNameA(scm_handle, NULL, NULL, &displaysize); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_ADDRESS /* W2K, XP, W2K3, Vista */ || - GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Expected ERROR_INVALID_ADDRESS or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - displaysize = sizeof(displayname); - ret = GetServiceDisplayNameA(scm_handle, NULL, displayname, &displaysize); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_ADDRESS /* W2K, XP, W2K3, Vista */ || - GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Expected ERROR_INVALID_ADDRESS or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* Test for nonexistent service */ - SetLastError(0xdeadbeef); - displaysize = -1; - ret = GetServiceDisplayNameA(scm_handle, deadbeef, NULL, &displaysize); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = GetServiceDisplayNameA(scm_handle, deadbeef, NULL, &displaysize); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - todo_wine ok(displaysize == 1, "Service size expected 1, got %d\n", displaysize); - - displaysize = 15; - strcpy(displayname, "ABC"); - ret = GetServiceDisplayNameA(scm_handle, deadbeef, displayname, &displaysize); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - todo_wine ok(displaysize == 15, "Service size expected 15, got %d\n", displaysize); - ok(displayname[0] == 0, "Service name not empty\n"); - - displaysize = 15; - lstrcpyW( displaynameW, abcW ); - ret = GetServiceDisplayNameW(scm_handle, deadbeefW, displaynameW, &displaysize); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - ok(displaysize == 15, "Service size expected 15, got %d\n", displaysize); - ok(displaynameW[0] == 0, "Service name not empty\n"); - - displaysize = 0; - strcpy(displayname, "ABC"); - ret = GetServiceDisplayNameA(scm_handle, deadbeef, displayname, &displaysize); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - todo_wine ok(displaysize == 1, "Service size expected 1, got %d\n", displaysize); - ok(displayname[0] == 'A', "Service name changed\n"); - - displaysize = 0; - lstrcpyW( displaynameW, abcW ); - ret = GetServiceDisplayNameW(scm_handle, deadbeefW, displaynameW, &displaysize); - ok(!ret, "Expected failure\n"); - ok(displaysize == 2, "Service size expected 2, got %d\n", displaysize); - ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - ok(displaynameW[0] == 'A', "Service name changed\n"); - - displaysize = 1; - strcpy(displayname, "ABC"); - ret = GetServiceDisplayNameA(scm_handle, deadbeef, displayname, &displaysize); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - todo_wine ok(displaysize == 1, "Service size expected 1, got %d\n", displaysize); - ok(displayname[0] == 0, "Service name not empty\n"); - - displaysize = 1; - lstrcpyW( displaynameW, abcW ); - ret = GetServiceDisplayNameW(scm_handle, deadbeefW, displaynameW, &displaysize); - ok(!ret, "Expected failure\n"); - ok(displaysize == 2, "Service size expected 2, got %d\n", displaysize); - ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - ok(displaynameW[0] == 'A', "Service name changed\n"); - - displaysize = 2; - strcpy(displayname, "ABC"); - ret = GetServiceDisplayNameA(scm_handle, deadbeef, displayname, &displaysize); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - todo_wine ok(displaysize == 2, "Service size expected 2, got %d\n", displaysize); - ok(displayname[0] == 0, "Service name not empty\n"); - - displaysize = 2; - lstrcpyW( displaynameW, abcW ); - ret = GetServiceDisplayNameW(scm_handle, deadbeefW, displaynameW, &displaysize); - ok(!ret, "Expected failure\n"); - ok(displaysize == 2, "Service size expected 2, got %d\n", displaysize); - ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - ok(displaynameW[0] == 0, "Service name not empty\n"); - - /* Check if 'Spooler' exists */ - svc_handle = OpenServiceA(scm_handle, spooler, GENERIC_READ); - if (!svc_handle) - { - skip("Spooler service doesn't exist\n"); - CloseServiceHandle(scm_handle); - return; - } - CloseServiceHandle(svc_handle); - - /* Retrieve the needed size for the buffer */ - SetLastError(0xdeadbeef); - displaysize = -1; - ret = GetServiceDisplayNameA(scm_handle, spooler, NULL, &displaysize); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - tempsize = displaysize; - - displaysize = 0; - ret = GetServiceDisplayNameA(scm_handle, spooler, NULL, &displaysize); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(displaysize == tempsize, "Buffer size mismatch (%d vs %d)\n", tempsize, displaysize); - - /* Buffer is too small */ - SetLastError(0xdeadbeef); - displaysize = (tempsize / 2); - ret = GetServiceDisplayNameA(scm_handle, spooler, displayname, &displaysize); - ok(!ret, "Expected failure\n"); - ok(displaysize == tempsize, "Expected the needed buffersize\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - - /* First try with a buffer that should be big enough to hold - * the ANSI string (and terminating character). This succeeds on Windows - * although when asked (see above 2 tests) it will return twice the needed size. - */ - SetLastError(0xdeadbeef); - displaysize = (tempsize / 2) + 1; - ret = GetServiceDisplayNameA(scm_handle, spooler, displayname, &displaysize); - ok(ret, "Expected success, got error %u\n", GetLastError()); - ok(displaysize == ((tempsize / 2) + 1), "Expected no change for the needed buffer size\n"); - - /* Now with the original returned size */ - SetLastError(0xdeadbeef); - displaysize = tempsize; - ret = GetServiceDisplayNameA(scm_handle, spooler, displayname, &displaysize); - ok(ret, "Expected success, got error %u\n", GetLastError()); - ok(displaysize == tempsize, "Expected no change for the needed buffer size\n"); - - /* And with a bigger than needed buffer */ - SetLastError(0xdeadbeef); - displaysize = tempsize * 2; - ret = GetServiceDisplayNameA(scm_handle, spooler, displayname, &displaysize); - ok(ret, "Expected success, got error %u\n", GetLastError()); - /* Test that shows that if the buffersize is enough, it's not changed */ - ok(displaysize == tempsize * 2, "Expected no change for the needed buffer size\n"); - ok(strlen(displayname) == tempsize/2, - "Expected the buffer to be twice the length of the string\n") ; - - /* Do the buffer(size) tests also for GetServiceDisplayNameW */ - SetLastError(0xdeadbeef); - displaysize = -1; - ret = GetServiceDisplayNameW(scm_handle, spoolerW, NULL, &displaysize); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - - /* Buffer is too small */ - SetLastError(0xdeadbeef); - tempsizeW = displaysize; - displaysize = tempsizeW / 2; - ret = GetServiceDisplayNameW(scm_handle, spoolerW, displaynameW, &displaysize); - ok(!ret, "Expected failure\n"); - ok(displaysize == tempsizeW, "Expected the needed buffersize\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - - /* Now with the original returned size */ - SetLastError(0xdeadbeef); - displaysize = tempsizeW; - ret = GetServiceDisplayNameW(scm_handle, spoolerW, displaynameW, &displaysize); - ok(!ret, "Expected failure\n"); - ok(displaysize == tempsizeW, "Expected the needed buffersize\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - - /* And with a bigger than needed buffer */ - SetLastError(0xdeadbeef); - displaysize = tempsizeW + 1; /* This caters for the null terminating character */ - ret = GetServiceDisplayNameW(scm_handle, spoolerW, displaynameW, &displaysize); - ok(ret, "Expected success, got error %u\n", GetLastError()); - ok(displaysize == tempsizeW, "Expected the needed buffersize\n"); - ok(lstrlenW(displaynameW) == displaysize, - "Expected the buffer to be the length of the string\n") ; - ok(tempsize / 2 == tempsizeW, - "Expected the needed buffersize (in bytes) to be the same for the A and W call\n"); - - CloseServiceHandle(scm_handle); - - /* Test for a service without a displayname (which is valid). This should return - * the servicename itself. - */ - SetLastError(0xdeadbeef); - scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CREATE_SERVICE); - if (!scm_handle && (GetLastError() == ERROR_ACCESS_DENIED)) - { - skip("Not enough rights to get a handle to the manager\n"); - return; - } - - SetLastError(0xdeadbeef); - svc_handle = CreateServiceA(scm_handle, servicename, NULL, DELETE, - SERVICE_WIN32_OWN_PROCESS | SERVICE_INTERACTIVE_PROCESS, - SERVICE_DISABLED, 0, pathname, NULL, NULL, NULL, NULL, NULL); - ok(svc_handle != NULL, "Could not create the service : %d\n", GetLastError()); - if (!svc_handle) - { - CloseServiceHandle(scm_handle); - return; - } - - /* Retrieve the needed size for the buffer */ - SetLastError(0xdeadbeef); - displaysize = -1; - ret = GetServiceDisplayNameA(scm_handle, servicename, NULL, &displaysize); - ok(!ret, "Expected failure\n"); - ok(displaysize == strlen(servicename) * 2, - "Expected the displaysize to be twice the size of the servicename\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - - /* Buffer is too small */ - SetLastError(0xdeadbeef); - tempsize = displaysize; - displaysize = (tempsize / 2); - ret = GetServiceDisplayNameA(scm_handle, servicename, displayname, &displaysize); - ok(!ret, "Expected failure\n"); - ok(displaysize == tempsize, "Expected the needed buffersize\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - - /* Get the displayname */ - SetLastError(0xdeadbeef); - ret = GetServiceDisplayNameA(scm_handle, servicename, displayname, &displaysize); - ok(ret, "Expected success, got error %u\n", GetLastError()); - ok(!lstrcmpi(displayname, servicename), - "Expected displayname to be %s, got %s\n", servicename, displayname); - - /* Delete the service */ - ret = DeleteService(svc_handle); - ok(ret, "Expected success (err=%d)\n", GetLastError()); - - CloseServiceHandle(svc_handle); - CloseServiceHandle(scm_handle); - - /* Wait a while. Just in case one of the following tests does a CreateService again */ - Sleep(1000); -} - -static void test_get_servicekeyname(void) -{ - SC_HANDLE scm_handle, svc_handle; - CHAR servicename[4096]; - CHAR displayname[4096]; - WCHAR servicenameW[4096]; - WCHAR displaynameW[4096]; - DWORD servicesize, displaysize, tempsize; - BOOL ret; - static const CHAR deadbeef[] = "Deadbeef"; - static const WCHAR deadbeefW[] = {'D','e','a','d','b','e','e','f',0}; - static const WCHAR abcW[] = {'A','B','C',0}; - - /* Having NULL for the size of the buffer will crash on W2K3 */ - - SetLastError(0xdeadbeef); - ret = GetServiceKeyNameA(NULL, NULL, NULL, &servicesize); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - - scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); - - servicesize = 200; - SetLastError(0xdeadbeef); - ret = GetServiceKeyNameA(scm_handle, NULL, NULL, &servicesize); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_ADDRESS /* W2K, XP, W2K3, Vista */ || - GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Expected ERROR_INVALID_ADDRESS or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - todo_wine ok(servicesize == 1, "Service size expected 1, got %d\n", servicesize); - - /* Valid handle and buffer but no displayname */ - servicesize = 200; - SetLastError(0xdeadbeef); - ret = GetServiceKeyNameA(scm_handle, NULL, servicename, &servicesize); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_ADDRESS /* W2K, XP, W2K3, Vista */ || - GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Expected ERROR_INVALID_ADDRESS or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - todo_wine ok(servicesize == 200, "Service size expected 1, got %d\n", servicesize); - - /* Test for nonexistent displayname */ - SetLastError(0xdeadbeef); - ret = GetServiceKeyNameA(scm_handle, deadbeef, NULL, &servicesize); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - todo_wine ok(servicesize == 1, "Service size expected 1, got %d\n", servicesize); - - servicesize = 15; - strcpy(servicename, "ABC"); - ret = GetServiceKeyNameA(scm_handle, deadbeef, servicename, &servicesize); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - todo_wine ok(servicesize == 15, "Service size expected 15, got %d\n", servicesize); - ok(servicename[0] == 0, "Service name not empty\n"); - - servicesize = 15; - lstrcpyW( servicenameW, abcW ); - ret = GetServiceKeyNameW(scm_handle, deadbeefW, servicenameW, &servicesize); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - ok(servicesize == 15, "Service size expected 15, got %d\n", servicesize); - ok(servicenameW[0] == 0, "Service name not empty\n"); - - servicesize = 0; - strcpy(servicename, "ABC"); - ret = GetServiceKeyNameA(scm_handle, deadbeef, servicename, &servicesize); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - todo_wine ok(servicesize == 1, "Service size expected 1, got %d\n", servicesize); - ok(servicename[0] == 'A', "Service name changed\n"); - - servicesize = 0; - lstrcpyW( servicenameW, abcW ); - ret = GetServiceKeyNameW(scm_handle, deadbeefW, servicenameW, &servicesize); - ok(!ret, "Expected failure\n"); - ok(servicesize == 2, "Service size expected 2, got %d\n", servicesize); - ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - ok(servicenameW[0] == 'A', "Service name changed\n"); - - servicesize = 1; - strcpy(servicename, "ABC"); - ret = GetServiceKeyNameA(scm_handle, deadbeef, servicename, &servicesize); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - todo_wine ok(servicesize == 1, "Service size expected 1, got %d\n", servicesize); - ok(servicename[0] == 0, "Service name not empty\n"); - - servicesize = 1; - lstrcpyW( servicenameW, abcW ); - ret = GetServiceKeyNameW(scm_handle, deadbeefW, servicenameW, &servicesize); - ok(!ret, "Expected failure\n"); - ok(servicesize == 2, "Service size expected 2, got %d\n", servicesize); - ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - ok(servicenameW[0] == 'A', "Service name changed\n"); - - servicesize = 2; - strcpy(servicename, "ABC"); - ret = GetServiceKeyNameA(scm_handle, deadbeef, servicename, &servicesize); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - todo_wine ok(servicesize == 2, "Service size expected 2, got %d\n", servicesize); - ok(servicename[0] == 0, "Service name not empty\n"); - - servicesize = 2; - lstrcpyW( servicenameW, abcW ); - ret = GetServiceKeyNameW(scm_handle, deadbeefW, servicenameW, &servicesize); - ok(!ret, "Expected failure\n"); - ok(servicesize == 2, "Service size expected 2, got %d\n", servicesize); - ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - ok(servicenameW[0] == 0, "Service name not empty\n"); - - /* Check if 'Spooler' exists */ - svc_handle = OpenServiceA(scm_handle, spooler, GENERIC_READ); - if (!svc_handle) - { - skip("Spooler service doesn't exist\n"); - CloseServiceHandle(scm_handle); - return; - } - CloseServiceHandle(svc_handle); - - /* Get the displayname for the 'Spooler' service */ - GetServiceDisplayNameA(scm_handle, spooler, NULL, &displaysize); - GetServiceDisplayNameA(scm_handle, spooler, displayname, &displaysize); - - /* Retrieve the needed size for the buffer */ - SetLastError(0xdeadbeef); - servicesize = 0; - ret = GetServiceKeyNameA(scm_handle, displayname, NULL, &servicesize); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - - /* Valid call with the correct buffersize */ - SetLastError(0xdeadbeef); - tempsize = servicesize; - servicesize *= 2; - ret = GetServiceKeyNameA(scm_handle, displayname, servicename, &servicesize); - ok(ret, "Expected success, got error %u\n", GetLastError()); - if (ret) - { - ok(strlen(servicename) == tempsize/2, - "Expected the buffer to be twice the length of the string\n") ; - ok(!lstrcmpi(servicename, spooler), "Expected %s, got %s\n", spooler, servicename); - ok(servicesize == (tempsize * 2), - "Expected servicesize not to change if buffer not insufficient\n") ; - } - - MultiByteToWideChar(CP_ACP, 0, displayname, -1, displaynameW, sizeof(displaynameW)/2); - SetLastError(0xdeadbeef); - servicesize *= 2; - ret = GetServiceKeyNameW(scm_handle, displaynameW, servicenameW, &servicesize); - ok(ret, "Expected success, got error %u\n", GetLastError()); - if (ret) - { - ok(strlen(servicename) == tempsize/2, - "Expected the buffer to be twice the length of the string\n") ; - ok(servicesize == lstrlenW(servicenameW), - "Expected servicesize not to change if buffer not insufficient\n") ; - } - - SetLastError(0xdeadbeef); - servicesize = 3; - ret = GetServiceKeyNameW(scm_handle, displaynameW, servicenameW, &servicesize); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(servicenameW[0] == 0, "Buffer not empty\n"); - - CloseServiceHandle(scm_handle); -} - -static void test_query_svc(void) -{ - SC_HANDLE scm_handle, svc_handle; - BOOL ret; - SERVICE_STATUS status; - SERVICE_STATUS_PROCESS *statusproc; - DWORD bufsize, needed; - - /* All NULL or wrong */ - SetLastError(0xdeadbeef); - ret = QueryServiceStatus(NULL, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - - scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); - - /* Check if 'Spooler' exists. - * Open with not enough rights to query the status. - */ - svc_handle = OpenServiceA(scm_handle, spooler, STANDARD_RIGHTS_READ); - if (!svc_handle) - { - skip("Spooler service doesn't exist\n"); - CloseServiceHandle(scm_handle); - return; - } - - SetLastError(0xdeadbeef); - ret = QueryServiceStatus(svc_handle, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_ADDRESS || - GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Unexpected last error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = QueryServiceStatus(svc_handle, &status); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, - "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); - - /* Open the service with just enough rights. - * (Verified with 'SERVICE_ALL_ACCESS &~ SERVICE_QUERY_STATUS') - */ - CloseServiceHandle(svc_handle); - svc_handle = OpenServiceA(scm_handle, spooler, SERVICE_QUERY_STATUS); - - SetLastError(0xdeadbeef); - ret = QueryServiceStatus(svc_handle, &status); - ok(ret, "Expected success, got error %u\n", GetLastError()); - - CloseServiceHandle(svc_handle); - - /* More or less the same tests for QueryServiceStatusEx */ - if (!pQueryServiceStatusEx) - { - win_skip( "QueryServiceStatusEx not available\n" ); - CloseServiceHandle(scm_handle); - return; - } - - /* Open service with not enough rights to query the status */ - svc_handle = OpenServiceA(scm_handle, spooler, STANDARD_RIGHTS_READ); - - /* All NULL or wrong, this proves that info level is checked first */ - SetLastError(0xdeadbeef); - ret = pQueryServiceStatusEx(NULL, 1, NULL, 0, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_LEVEL, - "Expected ERROR_INVALID_LEVEL, got %d\n", GetLastError()); - - /* Passing a NULL parameter for the needed buffer size - * will crash on anything but NT4. - */ - - /* Only info level is correct. It looks like the buffer/size is checked second */ - SetLastError(0xdeadbeef); - ret = pQueryServiceStatusEx(NULL, SC_STATUS_PROCESS_INFO, NULL, 0, &needed); - /* NT4 checks the handle first */ - if (GetLastError() != ERROR_INVALID_HANDLE) - { - ok(!ret, "Expected failure\n"); - ok(needed == sizeof(SERVICE_STATUS_PROCESS), - "Needed buffersize is wrong : %d\n", needed); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - } - - /* Pass a correct buffer and buffersize but a NULL handle */ - statusproc = HeapAlloc(GetProcessHeap(), 0, sizeof(SERVICE_STATUS_PROCESS)); - bufsize = needed; - SetLastError(0xdeadbeef); - ret = pQueryServiceStatusEx(NULL, SC_STATUS_PROCESS_INFO, (BYTE*)statusproc, bufsize, &needed); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - HeapFree(GetProcessHeap(), 0, statusproc); - - /* Correct handle and info level */ - SetLastError(0xdeadbeef); - ret = pQueryServiceStatusEx(svc_handle, SC_STATUS_PROCESS_INFO, NULL, 0, &needed); - /* NT4 doesn't return the needed size */ - if (GetLastError() != ERROR_INVALID_PARAMETER) - { - ok(!ret, "Expected failure\n"); - ok(needed == sizeof(SERVICE_STATUS_PROCESS), - "Needed buffersize is wrong : %d\n", needed); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - } - - /* All parameters are OK but we don't have enough rights */ - statusproc = HeapAlloc(GetProcessHeap(), 0, sizeof(SERVICE_STATUS_PROCESS)); - bufsize = sizeof(SERVICE_STATUS_PROCESS); - SetLastError(0xdeadbeef); - ret = pQueryServiceStatusEx(svc_handle, SC_STATUS_PROCESS_INFO, (BYTE*)statusproc, bufsize, &needed); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, - "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); - HeapFree(GetProcessHeap(), 0, statusproc); - - /* Open the service with just enough rights. */ - CloseServiceHandle(svc_handle); - svc_handle = OpenServiceA(scm_handle, spooler, SERVICE_QUERY_STATUS); - - /* Everything should be fine now. */ - statusproc = HeapAlloc(GetProcessHeap(), 0, sizeof(SERVICE_STATUS_PROCESS)); - bufsize = sizeof(SERVICE_STATUS_PROCESS); - SetLastError(0xdeadbeef); - ret = pQueryServiceStatusEx(svc_handle, SC_STATUS_PROCESS_INFO, (BYTE*)statusproc, bufsize, &needed); - ok(ret, "Expected success, got error %u\n", GetLastError()); - if (statusproc->dwCurrentState == SERVICE_RUNNING) - ok(statusproc->dwProcessId != 0, - "Expect a process id for this running service\n"); - else - ok(statusproc->dwProcessId == 0, - "Expect no process id for this stopped service\n"); - - /* same call with null needed pointer */ - SetLastError(0xdeadbeef); - ret = pQueryServiceStatusEx(svc_handle, SC_STATUS_PROCESS_INFO, (BYTE*)statusproc, bufsize, NULL); - ok(!ret, "Expected failure\n"); - ok(broken(GetLastError() == ERROR_INVALID_PARAMETER) /* NT4 */ || - GetLastError() == ERROR_INVALID_ADDRESS, "got %d\n", GetLastError()); - - HeapFree(GetProcessHeap(), 0, statusproc); - - CloseServiceHandle(svc_handle); - CloseServiceHandle(scm_handle); -} - -static void test_enum_svc(void) -{ - SC_HANDLE scm_handle; - BOOL ret; - DWORD bufsize, needed, returned, resume; - DWORD neededW, returnedW; - DWORD tempneeded, tempreturned, missing; - DWORD servicecountactive, servicecountinactive; - ENUM_SERVICE_STATUS *services; - ENUM_SERVICE_STATUSW *servicesW; - ENUM_SERVICE_STATUS_PROCESS *exservices; - UINT i; - - /* All NULL or wrong */ - SetLastError(0xdeadbeef); - ret = EnumServicesStatusA(NULL, 1, 0, NULL, 0, NULL, NULL, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = EnumServicesStatusW(NULL, 1, 0, NULL, 0, NULL, NULL, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - - /* Open the service control manager with not enough rights at first */ - scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); - - /* Valid handle but rest is still NULL or wrong */ - SetLastError(0xdeadbeef); - ret = EnumServicesStatusA(scm_handle, 1, 0, NULL, 0, NULL, NULL, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_ADDRESS || - GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Unexpected last error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = EnumServicesStatusW(scm_handle, 1, 0, NULL, 0, NULL, NULL, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_ADDRESS || - GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Unexpected last error %d\n", GetLastError()); - - /* Don't specify the two required pointers */ - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = EnumServicesStatusA(scm_handle, 0, 0, NULL, 0, NULL, &returned, NULL); - ok(!ret, "Expected failure\n"); - ok(returned == 0xdeadbeef, "Expected no change to the number of services variable\n"); - ok(GetLastError() == ERROR_INVALID_ADDRESS || - GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Unexpected last error %d\n", GetLastError()); - - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = EnumServicesStatusW(scm_handle, 0, 0, NULL, 0, NULL, &returned, NULL); - ok(!ret, "Expected failure\n"); - ok(returned == 0xdeadbeef, "Expected no change to the number of services variable\n"); - ok(GetLastError() == ERROR_INVALID_ADDRESS || - GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Unexpected last error %d\n", GetLastError()); - - /* Don't specify the two required pointers */ - needed = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = EnumServicesStatusA(scm_handle, 0, 0, NULL, 0, &needed, NULL, NULL); - ok(!ret, "Expected failure\n"); - ok(needed == 0xdeadbeef || broken(needed != 0xdeadbeef), /* nt4 */ - "Expected no change to the needed buffer variable\n"); - ok(GetLastError() == ERROR_INVALID_ADDRESS || - GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Unexpected last error %d\n", GetLastError()); - - needed = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = EnumServicesStatusW(scm_handle, 0, 0, NULL, 0, &needed, NULL, NULL); - ok(!ret, "Expected failure\n"); - ok(needed == 0xdeadbeef || broken(needed != 0xdeadbeef), /* nt4 */ - "Expected no change to the needed buffer variable\n"); - ok(GetLastError() == ERROR_INVALID_ADDRESS || - GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Unexpected last error %d\n", GetLastError()); - - /* No valid servicetype and servicestate */ - needed = 0xdeadbeef; - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = EnumServicesStatusA(scm_handle, 0, 0, NULL, 0, &needed, &returned, NULL); - ok(!ret, "Expected failure\n"); - ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); - ok(returned == 0, "Expected number of services to be set to 0, got %d\n", returned); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - needed = 0xdeadbeef; - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = EnumServicesStatusW(scm_handle, 0, 0, NULL, 0, &needed, &returned, NULL); - ok(!ret, "Expected failure\n"); - ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); - ok(returned == 0 || broken(returned != 0), /* nt4 */ - "Expected number of services to be set to 0, got %d\n", returned); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* No valid servicestate */ - needed = 0xdeadbeef; - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, 0, NULL, 0, &needed, &returned, NULL); - ok(!ret, "Expected failure\n"); - ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); - ok(returned == 0, "Expected number of services to be set to 0, got %d\n", returned); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - needed = 0xdeadbeef; - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = EnumServicesStatusW(scm_handle, SERVICE_WIN32, 0, NULL, 0, &needed, &returned, NULL); - ok(!ret, "Expected failure\n"); - ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); - ok(returned == 0 || broken(returned != 0), /* nt4 */ - "Expected number of services to be set to 0, got %d\n", returned); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* No valid servicetype */ - needed = 0xdeadbeef; - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = EnumServicesStatusA(scm_handle, 0, SERVICE_STATE_ALL, NULL, 0, &needed, &returned, NULL); - ok(!ret, "Expected failure\n"); - ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); - ok(returned == 0, "Expected number of services to be set to 0, got %d\n", returned); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - needed = 0xdeadbeef; - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = EnumServicesStatusW(scm_handle, 0, SERVICE_STATE_ALL, NULL, 0, &needed, &returned, NULL); - ok(!ret, "Expected failure\n"); - ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); - ok(returned == 0 || broken(returned != 0), /* nt4 */ - "Expected number of services to be set to 0, got %d\n", returned); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* All parameters are correct but our access rights are wrong */ - needed = 0xdeadbeef; - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, NULL, 0, &needed, &returned, NULL); - ok(!ret, "Expected failure\n"); - ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); - ok(returned == 0, "Expected number of services to be set to 0, got %d\n", returned); - ok(GetLastError() == ERROR_ACCESS_DENIED, - "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); - - needed = 0xdeadbeef; - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = EnumServicesStatusW(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, NULL, 0, &needed, &returned, NULL); - ok(!ret, "Expected failure\n"); - ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); - ok(returned == 0 || broken(returned != 0), /* nt4 */ - "Expected number of services to be set to 0, got %d\n", returned); - ok(GetLastError() == ERROR_ACCESS_DENIED, - "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); - - /* Open the service control manager with the needed rights */ - CloseServiceHandle(scm_handle); - scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_ENUMERATE_SERVICE); - - /* All parameters are correct. Request the needed buffer size */ - needed = 0xdeadbeef; - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, NULL, 0, &needed, &returned, NULL); - ok(!ret, "Expected failure\n"); - ok(needed != 0xdeadbeef && needed > 0, "Expected the needed buffer size for this one service\n"); - ok(returned == 0, "Expected no service returned, got %d\n", returned); - ok(GetLastError() == ERROR_MORE_DATA, - "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); - - /* Test to show we get the same needed buffer size for the W-call */ - neededW = 0xdeadbeef; - returnedW = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = EnumServicesStatusW(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, NULL, 0, &neededW, &returnedW, NULL); - ok(!ret, "Expected failure\n"); - ok(neededW != 0xdeadbeef && neededW > 0, "Expected the needed buffer size for this one service\n"); - ok(neededW == needed, "Expected needed buffersize to be the same for A- and W-calls\n"); - ok(returnedW == 0, "Expected no service returned, got %d\n", returnedW); - ok(GetLastError() == ERROR_MORE_DATA, - "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); - - /* Store the needed bytes */ - tempneeded = needed; - - /* Allocate the correct needed bytes */ - services = HeapAlloc(GetProcessHeap(), 0, needed); - bufsize = needed; - needed = 0xdeadbeef; - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, - services, bufsize, &needed, &returned, NULL); - ok(ret, "Expected success, got error %u\n", GetLastError()); - ok(needed == 0, "Expected needed buffer to be 0 as we are done\n"); - ok(returned != 0xdeadbeef && returned > 0, "Expected some returned services\n"); - HeapFree(GetProcessHeap(), 0, services); - - /* Store the number of returned services */ - tempreturned = returned; - - servicesW = HeapAlloc(GetProcessHeap(), 0, neededW); - bufsize = neededW; - neededW = 0xdeadbeef; - returnedW = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = EnumServicesStatusW(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, - servicesW, bufsize, &neededW, &returnedW, NULL); - ok(ret, "Expected success, got error %u\n", GetLastError()); - ok(neededW == 0, "Expected needed buffer to be 0 as we are done\n"); - ok(returnedW != 0xdeadbeef && returnedW > 0, "Expected some returned services\n"); - HeapFree(GetProcessHeap(), 0, servicesW); - - /* Allocate less than the needed bytes and don't specify a resume handle */ - services = HeapAlloc(GetProcessHeap(), 0, tempneeded); - bufsize = (tempreturned - 1) * sizeof(ENUM_SERVICE_STATUS); - needed = 0xdeadbeef; - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, - services, bufsize, &needed, &returned, NULL); - ok(!ret, "Expected failure\n"); - ok(needed != 0xdeadbeef && needed > 0, "Expected the needed buffer size for this one service\n"); - ok(returned < tempreturned, "Expected fewer services to be returned\n"); - ok(GetLastError() == ERROR_MORE_DATA, - "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); - - /* Allocate less than the needed bytes, this time with a correct resume handle */ - bufsize = (tempreturned - 1) * sizeof(ENUM_SERVICE_STATUS); - needed = 0xdeadbeef; - returned = 0xdeadbeef; - resume = 0; - SetLastError(0xdeadbeef); - ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, - services, bufsize, &needed, &returned, &resume); - ok(!ret, "Expected failure\n"); - ok(needed != 0xdeadbeef && needed > 0, "Expected the needed buffer size for this one service\n"); - ok(returned < tempreturned, "Expected fewer services to be returned\n"); - todo_wine ok(resume, "Expected a resume handle\n"); - ok(GetLastError() == ERROR_MORE_DATA, - "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); - - /* Fetch the missing services but pass a bigger buffer size */ - missing = tempreturned - returned; - bufsize = tempneeded; - needed = 0xdeadbeef; - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, - services, bufsize, &needed, &returned, &resume); - ok(ret, "Expected success, got error %u\n", GetLastError()); - ok(needed == 0, "Expected needed buffer to be 0 as we are done\n"); - ok(returned == missing, "Expected %u services to be returned\n", missing); - ok(resume == 0, "Expected the resume handle to be 0\n"); - HeapFree(GetProcessHeap(), 0, services); - - /* See if things add up */ - - /* Vista only shows the drivers with a state of SERVICE_RUNNING as active - * and doesn't count the others as inactive. This means that Vista could - * show a total that is greater than the sum of active and inactive - * drivers. - * The number of active and inactive drivers is greatly influenced by the - * time when tests are run, immediately after boot or later for example. - * - * Both reasons make calculations for drivers not so useful - */ - - /* Get the number of active win32 services */ - EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_ACTIVE, NULL, 0, - &needed, &returned, NULL); - services = HeapAlloc(GetProcessHeap(), 0, needed); - EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_ACTIVE, services, - needed, &needed, &returned, NULL); - HeapFree(GetProcessHeap(), 0, services); - - servicecountactive = returned; - - /* Get the number of inactive win32 services */ - EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_INACTIVE, NULL, 0, - &needed, &returned, NULL); - services = HeapAlloc(GetProcessHeap(), 0, needed); - EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_INACTIVE, services, - needed, &needed, &returned, NULL); - HeapFree(GetProcessHeap(), 0, services); - - servicecountinactive = returned; - - /* Get the number of win32 services */ - EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, NULL, 0, - &needed, &returned, NULL); - services = HeapAlloc(GetProcessHeap(), 0, needed); - EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, services, - needed, &needed, &returned, NULL); - HeapFree(GetProcessHeap(), 0, services); - - /* Check if total is the same as active and inactive win32 services */ - ok(returned == (servicecountactive + servicecountinactive), - "Something wrong in the calculation\n"); - - /* Get all drivers and services - * - * Fetch the status of the last call as failing could make the following tests crash - * on Wine (we don't return anything yet). - */ - EnumServicesStatusA(scm_handle, SERVICE_DRIVER | SERVICE_WIN32, SERVICE_STATE_ALL, - NULL, 0, &needed, &returned, NULL); - services = HeapAlloc(GetProcessHeap(), 0, needed); - ret = EnumServicesStatusA(scm_handle, SERVICE_DRIVER | SERVICE_WIN32, SERVICE_STATE_ALL, - services, needed, &needed, &returned, NULL); - - /* Loop through all those returned drivers and services */ - for (i = 0; ret && i < returned; i++) - { - SERVICE_STATUS status = services[i].ServiceStatus; - - /* lpServiceName and lpDisplayName should always be filled */ - ok(lstrlenA(services[i].lpServiceName) > 0, "Expected a service name\n"); - ok(lstrlenA(services[i].lpDisplayName) > 0, "Expected a display name\n"); - - /* Decrement the counters to see if the functions calls return the same - * numbers as the contents of these structures. - */ - if (status.dwServiceType & (SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS)) - { - if (status.dwCurrentState == SERVICE_STOPPED) - servicecountinactive--; - else - servicecountactive--; - } - } - HeapFree(GetProcessHeap(), 0, services); - - ok(servicecountactive == 0, "Active services mismatch %u\n", servicecountactive); - ok(servicecountinactive == 0, "Inactive services mismatch %u\n", servicecountinactive); - - CloseServiceHandle(scm_handle); - - /* More or less the same for EnumServicesStatusExA */ - if (!pEnumServicesStatusExA) - { - win_skip( "EnumServicesStatusExA not available\n" ); - return; - } - - /* All NULL or wrong */ - SetLastError(0xdeadbeef); - ret = pEnumServicesStatusExA(NULL, 1, 0, 0, NULL, 0, NULL, NULL, NULL, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_LEVEL, - "Expected ERROR_INVALID_LEVEL, got %d\n", GetLastError()); - - /* All NULL or wrong, just the info level is correct */ - SetLastError(0xdeadbeef); - ret = pEnumServicesStatusExA(NULL, 0, 0, 0, NULL, 0, NULL, NULL, NULL, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - - /* Open the service control manager with not enough rights at first */ - scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); - - /* Valid handle and info level but rest is still NULL or wrong */ - SetLastError(0xdeadbeef); - ret = pEnumServicesStatusExA(scm_handle, 0, 0, 0, NULL, 0, NULL, NULL, NULL, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_ADDRESS || - GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Unexpected last error %d\n", GetLastError()); - - /* Don't specify the two required pointers */ - needed = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = pEnumServicesStatusExA(scm_handle, 0, 0, 0, NULL, 0, &needed, NULL, NULL, NULL); - ok(!ret, "Expected failure\n"); - ok(needed == 0xdeadbeef || broken(needed != 0xdeadbeef), /* nt4 */ - "Expected no change to the needed buffer variable\n"); - ok(GetLastError() == ERROR_INVALID_ADDRESS || - GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Unexpected last error %d\n", GetLastError()); - - /* Don't specify the two required pointers */ - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = pEnumServicesStatusExA(scm_handle, 0, 0, 0, NULL, 0, NULL, &returned, NULL, NULL); - ok(!ret, "Expected failure\n"); - ok(returned == 0xdeadbeef, "Expected no change to the number of services variable\n"); - ok(GetLastError() == ERROR_INVALID_ADDRESS || - GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Unexpected last error %d\n", GetLastError()); - - /* No valid servicetype and servicestate */ - needed = 0xdeadbeef; - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = pEnumServicesStatusExA(scm_handle, 0, 0, 0, NULL, 0, &needed, &returned, NULL, NULL); - ok(!ret, "Expected failure\n"); - ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); - ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* No valid servicestate */ - needed = 0xdeadbeef; - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, 0, NULL, 0, - &needed, &returned, NULL, NULL); - ok(!ret, "Expected failure\n"); - ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); - ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* No valid servicetype */ - needed = 0xdeadbeef; - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = pEnumServicesStatusExA(scm_handle, 0, 0, SERVICE_STATE_ALL, NULL, 0, - &needed, &returned, NULL, NULL); - ok(!ret, "Expected failure\n"); - ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); - ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* No valid servicetype and servicestate and unknown service group */ - needed = 0xdeadbeef; - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = pEnumServicesStatusExA(scm_handle, 0, 0, 0, NULL, 0, &needed, - &returned, NULL, "deadbeef_group"); - ok(!ret, "Expected failure\n"); - ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); - ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* All parameters are correct but our access rights are wrong */ - needed = 0xdeadbeef; - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, - NULL, 0, &needed, &returned, NULL, NULL); - ok(!ret, "Expected failure\n"); - ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); - ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); - ok(GetLastError() == ERROR_ACCESS_DENIED, - "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); - - /* All parameters are correct, access rights are wrong but the - * group name won't be checked yet. - */ - needed = 0xdeadbeef; - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, - NULL, 0, &needed, &returned, NULL, "deadbeef_group"); - ok(!ret, "Expected failure\n"); - ok(needed == 0 || broken(needed != 0), /* nt4 */ - "Expected needed buffer size to be set to 0, got %d\n", needed); - ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); - ok(GetLastError() == ERROR_ACCESS_DENIED, - "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); - - /* Open the service control manager with the needed rights */ - CloseServiceHandle(scm_handle); - scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_ENUMERATE_SERVICE); - - /* All parameters are correct and the group will be checked */ - needed = 0xdeadbeef; - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, - NULL, 0, &needed, &returned, NULL, "deadbeef_group"); - ok(!ret, "Expected failure\n"); - ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); - ok(needed == 0, "Expected needed buffer size to be set to 0, got %d\n", needed); - ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, - "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); - - /* TODO: Create a test that makes sure we enumerate all services that don't - * belong to a group. (specifying ""). - */ - - /* All parameters are correct. Request the needed buffer size */ - needed = 0xdeadbeef; - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, - NULL, 0, &needed, &returned, NULL, NULL); - ok(!ret, "Expected failure\n"); - ok(returned == 0, "Expected no service returned, got %d\n", returned); - ok(needed != 0xdeadbeef && needed > 0, "Expected the needed buffer size\n"); - ok(GetLastError() == ERROR_MORE_DATA, - "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); - - /* Test to show we get the same needed buffer size for the W-call */ - neededW = 0xdeadbeef; - ret = pEnumServicesStatusExW(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, - NULL, 0, &neededW, &returnedW, NULL, NULL); - ok(!ret, "Expected failure\n"); - ok(neededW == needed, "Expected needed buffersize to be the same for A- and W-calls\n"); - - /* Store the needed bytes */ - tempneeded = needed; - - /* Allocate the correct needed bytes */ - exservices = HeapAlloc(GetProcessHeap(), 0, needed); - bufsize = needed; - needed = 0xdeadbeef; - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, - (BYTE*)exservices, bufsize, &needed, &returned, NULL, NULL); - ok(ret, "Expected success, got error %u\n", GetLastError()); - ok(needed == 0, "Expected needed buffer to be 0 as we are done\n"); - ok(returned == tempreturned, "Expected the same number of service from this function\n"); - HeapFree(GetProcessHeap(), 0, exservices); - - /* Store the number of returned services */ - tempreturned = returned; - - /* Allocate less than the needed bytes and don't specify a resume handle */ - exservices = HeapAlloc(GetProcessHeap(), 0, tempneeded); - bufsize = (tempreturned - 1) * sizeof(ENUM_SERVICE_STATUS); - needed = 0xdeadbeef; - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, - (BYTE*)exservices, bufsize, &needed, &returned, NULL, NULL); - ok(!ret, "Expected failure\n"); - ok(needed != 0xdeadbeef && needed > 0, "Expected the needed buffer size\n"); - ok(returned < tempreturned, "Expected fewer services to be returned\n"); - ok(GetLastError() == ERROR_MORE_DATA, - "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); - - /* Allocate less than the needed bytes, this time with a correct resume handle */ - bufsize = (tempreturned - 1) * sizeof(ENUM_SERVICE_STATUS); - needed = 0xdeadbeef; - returned = 0xdeadbeef; - resume = 0; - SetLastError(0xdeadbeef); - ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, - (BYTE*)exservices, bufsize, &needed, &returned, &resume, NULL); - ok(!ret, "Expected failure\n"); - ok(needed != 0xdeadbeef && needed > 0, "Expected the needed buffer size\n"); - ok(returned < tempreturned, "Expected fewer services to be returned\n"); - todo_wine ok(resume, "Expected a resume handle\n"); - ok(GetLastError() == ERROR_MORE_DATA, - "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); - - /* Fetch that last service but pass a bigger buffer size */ - missing = tempreturned - returned; - bufsize = tempneeded; - needed = 0xdeadbeef; - returned = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, - (BYTE*)exservices, bufsize, &needed, &returned, &resume, NULL); - ok(ret, "Expected success, got error %u\n", GetLastError()); - ok(needed == 0, "Expected needed buffer to be 0 as we are done\n"); - ok(returned == missing, "Expected %u services to be returned\n", missing); - ok(resume == 0, "Expected the resume handle to be 0\n"); - HeapFree(GetProcessHeap(), 0, exservices); - - /* See if things add up */ - - /* Get the number of active win32 services */ - pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_ACTIVE, - NULL, 0, &needed, &returned, NULL, NULL); - exservices = HeapAlloc(GetProcessHeap(), 0, needed); - pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_ACTIVE, - (BYTE*)exservices, needed, &needed, &returned, NULL, NULL); - HeapFree(GetProcessHeap(), 0, exservices); - - servicecountactive = returned; - - /* Get the number of inactive win32 services */ - pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_INACTIVE, - NULL, 0, &needed, &returned, NULL, NULL); - exservices = HeapAlloc(GetProcessHeap(), 0, needed); - pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_INACTIVE, - (BYTE*)exservices, needed, &needed, &returned, NULL, NULL); - HeapFree(GetProcessHeap(), 0, exservices); - - servicecountinactive = returned; - - /* Get the number of win32 services */ - pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, - NULL, 0, &needed, &returned, NULL, NULL); - exservices = HeapAlloc(GetProcessHeap(), 0, needed); - pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, - (BYTE*)exservices, needed, &needed, &returned, NULL, NULL); - HeapFree(GetProcessHeap(), 0, exservices); - - /* Check if total is the same as active and inactive win32 services */ - ok(returned == (servicecountactive + servicecountinactive), - "Something wrong in the calculation\n"); - - /* Get all drivers and services */ - ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32 | SERVICE_DRIVER, - SERVICE_STATE_ALL, NULL, 0, &needed, &returned, NULL, NULL); - ok(!ret, "Expected failure\n"); - exservices = HeapAlloc(GetProcessHeap(), 0, needed); - ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32 | SERVICE_DRIVER, - SERVICE_STATE_ALL, (BYTE*)exservices, needed, &needed, &returned, NULL, NULL); - ok(ret, "Expected success %u\n", GetLastError()); - - /* Loop through all those returned drivers and services */ - for (i = 0; i < returned; i++) - { - SERVICE_STATUS_PROCESS status = exservices[i].ServiceStatusProcess; - - /* lpServiceName and lpDisplayName should always be filled */ - ok(lstrlenA(exservices[i].lpServiceName) > 0, "Expected a service name\n"); - ok(lstrlenA(exservices[i].lpDisplayName) > 0, "Expected a display name\n"); - - /* Decrement the counters to see if the functions calls return the - * same numbers as the contents of these structures. - * Check some process id specifics. - */ - if (status.dwServiceType & (SERVICE_FILE_SYSTEM_DRIVER | SERVICE_KERNEL_DRIVER)) - { - /* We shouldn't have a process id for drivers */ - ok(status.dwProcessId == 0, - "This driver shouldn't have an associated process id\n"); - } - - if (status.dwServiceType & (SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS)) - { - if (status.dwCurrentState != SERVICE_STOPPED) - { - /* We expect a process id for every running service */ - ok(status.dwProcessId > 0, "Expected a process id for this running service (%s)\n", - exservices[i].lpServiceName); - - servicecountactive--; - } - else - { - /* We shouldn't have a process id for inactive services */ - ok(status.dwProcessId == 0, "Service %s state %u shouldn't have an associated process id\n", - exservices[i].lpServiceName, status.dwCurrentState); - - servicecountinactive--; - } - } - } - HeapFree(GetProcessHeap(), 0, exservices); - - ok(servicecountactive == 0, "Active services mismatch %u\n", servicecountactive); - ok(servicecountinactive == 0, "Inactive services mismatch %u\n", servicecountinactive); - - CloseServiceHandle(scm_handle); -} - -static void test_close(void) -{ - SC_HANDLE handle; - BOOL ret; - - /* NULL handle */ - SetLastError(0xdeadbeef); - ret = CloseServiceHandle(NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - - /* TODO: Add some tests with invalid handles. These produce errors on Windows but crash on Wine */ - - /* Proper call */ - handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); - SetLastError(0xdeadbeef); - ret = CloseServiceHandle(handle); - ok(ret, "Expected success got error %u\n", GetLastError()); -} - -static void test_sequence(void) -{ - SC_HANDLE scm_handle, svc_handle; - BOOL ret; - QUERY_SERVICE_CONFIGA *config; - DWORD given, needed; - static const CHAR servicename [] = "Winetest"; - static const CHAR displayname [] = "Winetest dummy service"; - static const CHAR displayname2[] = "Winetest dummy service (2)"; - static const CHAR pathname [] = "we_dont_care.exe"; - static const CHAR dependencies[] = "Master1\0Master2\0+MasterGroup1\0"; - static const CHAR password [] = ""; - static const CHAR empty [] = ""; - static const CHAR localsystem [] = "LocalSystem"; - - SetLastError(0xdeadbeef); - scm_handle = OpenSCManagerA(NULL, NULL, GENERIC_ALL); - - if (!scm_handle && (GetLastError() == ERROR_ACCESS_DENIED)) - { - skip("Not enough rights to get a handle to the manager\n"); - return; - } - else - ok(scm_handle != NULL, "Could not get a handle to the manager: %d\n", GetLastError()); - - if (!scm_handle) return; - - /* Create a dummy service */ - SetLastError(0xdeadbeef); - svc_handle = CreateServiceA(scm_handle, servicename, displayname, GENERIC_ALL, - SERVICE_INTERACTIVE_PROCESS | SERVICE_WIN32_OWN_PROCESS, SERVICE_DISABLED, SERVICE_ERROR_IGNORE, - pathname, NULL, NULL, dependencies, NULL, password); - - if (!svc_handle && (GetLastError() == ERROR_SERVICE_EXISTS)) - { - /* We try and open the service and do the rest of the tests. Some could - * fail if the tests were changed between these runs. - */ - trace("Deletion probably didn't work last time\n"); - SetLastError(0xdeadbeef); - svc_handle = OpenServiceA(scm_handle, servicename, GENERIC_ALL); - if (!svc_handle && (GetLastError() == ERROR_ACCESS_DENIED)) - { - skip("Not enough rights to open the service\n"); - CloseServiceHandle(scm_handle); - return; - } - ok(svc_handle != NULL, "Could not open the service : %d\n", GetLastError()); - } - else if (!svc_handle && (GetLastError() == ERROR_ACCESS_DENIED)) - { - skip("Not enough rights to create the service\n"); - CloseServiceHandle(scm_handle); - return; - } - else - { - ok(svc_handle != NULL, "Could not create the service : %d\n", GetLastError()); - if ((svc_handle != NULL) && (pGetSecurityInfo != NULL)) - { - PSID sidOwner, sidGroup; - PACL dacl, sacl; - PSECURITY_DESCRIPTOR pSD; - HRESULT retval = pGetSecurityInfo(svc_handle,SE_SERVICE,DACL_SECURITY_INFORMATION,&sidOwner,&sidGroup,&dacl,&sacl,&pSD); - todo_wine ok(ERROR_SUCCESS == retval, "Expected GetSecurityInfo to succeed: result %d\n",retval); - } - } - - if (!svc_handle) return; - - /* TODO: - * Before we do a QueryServiceConfig we should check the registry. This will make sure - * that the correct keys are used. - */ - - /* Request the size for the buffer */ - SetLastError(0xdeadbeef); - ret = QueryServiceConfigA(svc_handle, NULL, 0, &needed); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - - config = HeapAlloc(GetProcessHeap(), 0, needed); - given = needed; - SetLastError(0xdeadbeef); - ret = QueryServiceConfigA(svc_handle, config, given, &needed); - ok(ret, "Expected success, got error %u\n", GetLastError()); - - ok(config->lpBinaryPathName && config->lpLoadOrderGroup && config->lpDependencies && config->lpServiceStartName && - config->lpDisplayName, "Expected all string struct members to be non-NULL\n"); - ok(config->dwServiceType == (SERVICE_INTERACTIVE_PROCESS | SERVICE_WIN32_OWN_PROCESS), - "Expected SERVICE_INTERACTIVE_PROCESS | SERVICE_WIN32_OWN_PROCESS, got %d\n", config->dwServiceType); - ok(config->dwStartType == SERVICE_DISABLED, "Expected SERVICE_DISABLED, got %d\n", config->dwStartType); - ok(config->dwErrorControl == SERVICE_ERROR_IGNORE, "Expected SERVICE_ERROR_IGNORE, got %d\n", config->dwErrorControl); - ok(!strcmp(config->lpBinaryPathName, pathname), "Expected '%s', got '%s'\n", pathname, config->lpBinaryPathName); - ok(!strcmp(config->lpLoadOrderGroup, empty), "Expected an empty string, got '%s'\n", config->lpLoadOrderGroup); - ok(config->dwTagId == 0, "Expected 0, got %d\n", config->dwTagId); - /* TODO: Show the double 0 terminated string */ - todo_wine - { - ok(!memcmp(config->lpDependencies, dependencies, sizeof(dependencies)), "Wrong string\n"); - } - ok(!strcmp(config->lpServiceStartName, localsystem), "Expected 'LocalSystem', got '%s'\n", config->lpServiceStartName); - ok(!strcmp(config->lpDisplayName, displayname), "Expected '%s', got '%s'\n", displayname, config->lpDisplayName); - - ret = ChangeServiceConfigA(svc_handle, SERVICE_NO_CHANGE, SERVICE_NO_CHANGE, SERVICE_ERROR_NORMAL, NULL, "TestGroup2", - NULL, NULL, NULL, NULL, displayname2); - ok(ret, "ChangeServiceConfig failed (err=%d)\n", GetLastError()); - - QueryServiceConfigA(svc_handle, NULL, 0, &needed); - config = HeapReAlloc(GetProcessHeap(), 0, config, needed); - ok(QueryServiceConfigA(svc_handle, config, needed, &needed), "QueryServiceConfig failed\n"); - ok(config->lpBinaryPathName && config->lpLoadOrderGroup && config->lpDependencies && config->lpServiceStartName && - config->lpDisplayName, "Expected all string struct members to be non-NULL\n"); - ok(config->dwServiceType == (SERVICE_INTERACTIVE_PROCESS | SERVICE_WIN32_OWN_PROCESS), - "Expected SERVICE_INTERACTIVE_PROCESS | SERVICE_WIN32_OWN_PROCESS, got %d\n", config->dwServiceType); - ok(config->dwStartType == SERVICE_DISABLED, "Expected SERVICE_DISABLED, got %d\n", config->dwStartType); - ok(config->dwErrorControl == SERVICE_ERROR_NORMAL, "Expected SERVICE_ERROR_NORMAL, got %d\n", config->dwErrorControl); - ok(!strcmp(config->lpBinaryPathName, pathname), "Expected '%s', got '%s'\n", pathname, config->lpBinaryPathName); - ok(!strcmp(config->lpLoadOrderGroup, "TestGroup2"), "Expected 'TestGroup2', got '%s'\n", config->lpLoadOrderGroup); - ok(config->dwTagId == 0, "Expected 0, got %d\n", config->dwTagId); - ok(!strcmp(config->lpServiceStartName, localsystem), "Expected 'LocalSystem', got '%s'\n", config->lpServiceStartName); - ok(!strcmp(config->lpDisplayName, displayname2), "Expected '%s', got '%s'\n", displayname2, config->lpDisplayName); - - SetLastError(0xdeadbeef); - ret = DeleteService(svc_handle); - ok(ret, "Expected success, got error %u\n", GetLastError()); - CloseServiceHandle(svc_handle); - - /* Wait a while. The following test does a CreateService again */ - Sleep(1000); - - CloseServiceHandle(scm_handle); - HeapFree(GetProcessHeap(), 0, config); -} - -static void test_queryconfig2(void) -{ - SC_HANDLE scm_handle, svc_handle; - BOOL ret; - DWORD expected, needed; - BYTE buffer[MAX_PATH]; - LPSERVICE_DESCRIPTIONA pConfig = (LPSERVICE_DESCRIPTIONA)buffer; - static const CHAR servicename [] = "Winetest"; - static const CHAR displayname [] = "Winetest dummy service"; - static const CHAR pathname [] = "we_dont_care.exe"; - static const CHAR dependencies[] = "Master1\0Master2\0+MasterGroup1\0"; - static const CHAR password [] = ""; - static const CHAR description [] = "Description"; - - if(!pQueryServiceConfig2A) - { - win_skip("function QueryServiceConfig2A not present\n"); - return; - } - - SetLastError(0xdeadbeef); - scm_handle = OpenSCManagerA(NULL, NULL, GENERIC_ALL); - - if (!scm_handle) - { - if(GetLastError() == ERROR_ACCESS_DENIED) - skip("Not enough rights to get a handle to the manager\n"); - else - ok(FALSE, "Could not get a handle to the manager: %d\n", GetLastError()); - return; - } - - /* Create a dummy service */ - SetLastError(0xdeadbeef); - svc_handle = CreateServiceA(scm_handle, servicename, displayname, GENERIC_ALL, - SERVICE_INTERACTIVE_PROCESS | SERVICE_WIN32_OWN_PROCESS, SERVICE_DISABLED, SERVICE_ERROR_IGNORE, - pathname, NULL, NULL, dependencies, NULL, password); - - if (!svc_handle) - { - if(GetLastError() == ERROR_SERVICE_EXISTS) - { - /* We try and open the service and do the rest of the tests. Some could - * fail if the tests were changed between these runs. - */ - trace("Deletion probably didn't work last time\n"); - SetLastError(0xdeadbeef); - svc_handle = OpenServiceA(scm_handle, servicename, GENERIC_ALL); - if (!svc_handle) - { - if(GetLastError() == ERROR_ACCESS_DENIED) - skip("Not enough rights to open the service\n"); - else - ok(FALSE, "Could not open the service : %d\n", GetLastError()); - CloseServiceHandle(scm_handle); - return; - } - } - if (GetLastError() == ERROR_ACCESS_DENIED) - { - skip("Not enough rights to create the service\n"); - CloseServiceHandle(scm_handle); - return; - } - ok(svc_handle != NULL, "Could not create the service : %d\n", GetLastError()); - if (!svc_handle) - { - CloseServiceHandle(scm_handle); - return; - } - } - SetLastError(0xdeadbeef); - ret = pQueryServiceConfig2A(svc_handle,0xfff0,buffer,sizeof(SERVICE_DESCRIPTIONA),&needed); - ok(!ret, "expected QueryServiceConfig2A to fail\n"); - ok(ERROR_INVALID_LEVEL == GetLastError(), "expected error ERROR_INVALID_LEVEL, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = pQueryServiceConfig2A(svc_handle,0xfff0,buffer,sizeof(SERVICE_DESCRIPTIONA),NULL); - ok(!ret, "expected QueryServiceConfig2A to fail\n"); - ok(ERROR_INVALID_LEVEL == GetLastError(), "expected error ERROR_INVALID_LEVEL, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = pQueryServiceConfig2A(svc_handle, SERVICE_CONFIG_DESCRIPTION,buffer,sizeof(SERVICE_DESCRIPTIONA),NULL); - ok(!ret, "expected QueryServiceConfig2A to fail\n"); - ok(ERROR_INVALID_ADDRESS == GetLastError(), "expected error ERROR_INVALID_ADDRESS, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = pQueryServiceConfig2A(svc_handle, SERVICE_CONFIG_DESCRIPTION,NULL,sizeof(SERVICE_DESCRIPTIONA),&needed); - ok(!ret, "expected QueryServiceConfig2A to fail\n"); - ok((ERROR_INVALID_ADDRESS == GetLastError()) || (ERROR_INSUFFICIENT_BUFFER == GetLastError()), - "expected error ERROR_INVALID_ADDRESS or ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = pQueryServiceConfig2A(svc_handle, SERVICE_CONFIG_DESCRIPTION,NULL,sizeof(SERVICE_DESCRIPTIONA),NULL); - ok(!ret, "expected QueryServiceConfig2A to fail\n"); - ok(ERROR_INVALID_ADDRESS == GetLastError(), "expected error ERROR_INVALID_ADDRESS, got %d\n", GetLastError()); - - needed = 0; - SetLastError(0xdeadbeef); - ret = pQueryServiceConfig2A(svc_handle, SERVICE_CONFIG_DESCRIPTION,buffer,sizeof(SERVICE_DESCRIPTIONA)-1,&needed); - ok(!ret, "expected QueryServiceConfig2A to fail\n"); - ok(ERROR_INSUFFICIENT_BUFFER == GetLastError(), "expected error ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(needed == sizeof(SERVICE_DESCRIPTIONA), "got %d\n", needed); - - needed = 0; - pConfig->lpDescription = (LPSTR)0xdeadbeef; - ret = pQueryServiceConfig2A(svc_handle, SERVICE_CONFIG_DESCRIPTION,buffer,sizeof(SERVICE_DESCRIPTIONA),&needed); - ok(ret, "expected QueryServiceConfig2A to succeed\n"); - ok(needed == sizeof(SERVICE_DESCRIPTIONA), "got %d\n", needed); - ok(!pConfig->lpDescription, "expected lpDescription to be NULL, got %p\n", pConfig->lpDescription); - - SetLastError(0xdeadbeef); - needed = 0; - ret = pQueryServiceConfig2A(svc_handle, SERVICE_CONFIG_DESCRIPTION,NULL,0,&needed); - ok(!ret, "expected QueryServiceConfig2A to fail\n"); - ok(ERROR_INSUFFICIENT_BUFFER == GetLastError(), "expected error ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(needed == sizeof(SERVICE_DESCRIPTIONA), "got %d\n", needed); - - if(!pChangeServiceConfig2A) - { - win_skip("function ChangeServiceConfig2A not present\n"); - goto cleanup; - } - - pConfig->lpDescription = (LPSTR) description; - ret = pChangeServiceConfig2A(svc_handle, SERVICE_CONFIG_DESCRIPTION,buffer); - ok(ret, "ChangeServiceConfig2A failed\n"); - if (!ret) { - goto cleanup; - } - - SetLastError(0xdeadbeef); - needed = 0; - expected = sizeof(SERVICE_DESCRIPTIONA) + sizeof(description) * sizeof(WCHAR); /* !! */ - ret = pQueryServiceConfig2A(svc_handle, SERVICE_CONFIG_DESCRIPTION,buffer,sizeof(SERVICE_DESCRIPTIONA),&needed); - ok(!ret, "expected QueryServiceConfig2A to fail\n"); - ok(ERROR_INSUFFICIENT_BUFFER == GetLastError(), "expected error ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(needed == expected, "expected needed to be %d, got %d\n", expected, needed); - - SetLastError(0xdeadbeef); - ret = pQueryServiceConfig2A(svc_handle, SERVICE_CONFIG_DESCRIPTION,buffer,needed-1,&needed); - ok(!ret, "expected QueryServiceConfig2A to fail\n"); - ok(ERROR_INSUFFICIENT_BUFFER == GetLastError(), "expected error ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = pQueryServiceConfig2A(svc_handle, SERVICE_CONFIG_DESCRIPTION,buffer,needed,&needed); - ok(ret, "expected QueryServiceConfig2A to succeed\n"); - ok(pConfig->lpDescription && !strcmp(description,pConfig->lpDescription), - "expected lpDescription to be %s, got %s\n",description ,pConfig->lpDescription); - - SetLastError(0xdeadbeef); - ret = pQueryServiceConfig2A(svc_handle, SERVICE_CONFIG_DESCRIPTION,buffer, needed + 1,&needed); - ok(ret, "expected QueryServiceConfig2A to succeed\n"); - ok(pConfig->lpDescription && !strcmp(description,pConfig->lpDescription), - "expected lpDescription to be %s, got %s\n",description ,pConfig->lpDescription); - - if(!pQueryServiceConfig2W) - { - win_skip("function QueryServiceConfig2W not present\n"); - goto cleanup; - } - SetLastError(0xdeadbeef); - needed = 0; - expected = sizeof(SERVICE_DESCRIPTIONW) + sizeof(WCHAR) * sizeof(description); - ret = pQueryServiceConfig2W(svc_handle, SERVICE_CONFIG_DESCRIPTION,NULL,0,&needed); - ok(!ret, "expected QueryServiceConfig2W to fail\n"); - ok(ERROR_INSUFFICIENT_BUFFER == GetLastError(), "expected error ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(needed == expected, "expected needed to be %d, got %d\n", expected, needed); - - SetLastError(0xdeadbeef); - ret = pQueryServiceConfig2W(svc_handle, SERVICE_CONFIG_DESCRIPTION,buffer, needed,&needed); - ok(ret, "expected QueryServiceConfig2W to succeed\n"); - -cleanup: - DeleteService(svc_handle); - - CloseServiceHandle(svc_handle); - - /* Wait a while. The following test does a CreateService again */ - Sleep(1000); - - CloseServiceHandle(scm_handle); -} - -static DWORD try_start_stop(SC_HANDLE svc_handle, const char* name, DWORD is_nt4) -{ - BOOL ret; - DWORD le1, le2; - SERVICE_STATUS status; - - ret = StartServiceA(svc_handle, 0, NULL); - le1 = GetLastError(); - ok(!ret, "%s: StartServiceA() should have failed\n", name); - - if (pQueryServiceStatusEx) - { - DWORD needed; - SERVICE_STATUS_PROCESS statusproc; - - ret = pQueryServiceStatusEx(svc_handle, SC_STATUS_PROCESS_INFO, (BYTE*)&statusproc, sizeof(statusproc), &needed); - ok(ret, "%s: QueryServiceStatusEx() failed le=%u\n", name, GetLastError()); - ok(statusproc.dwCurrentState == SERVICE_STOPPED, "%s: should be stopped state=%x\n", name, statusproc.dwCurrentState); - ok(statusproc.dwProcessId == 0, "%s: ProcessId should be 0 instead of %x\n", name, statusproc.dwProcessId); - } - - ret = StartServiceA(svc_handle, 0, NULL); - le2 = GetLastError(); - ok(!ret, "%s: StartServiceA() should have failed\n", name); - ok(le2 == le1, "%s: the second try should yield the same error: %u != %u\n", name, le1, le2); - - status.dwCurrentState = 0xdeadbeef; - ret = ControlService(svc_handle, SERVICE_CONTROL_STOP, &status); - le2 = GetLastError(); - ok(!ret, "%s: ControlService() should have failed\n", name); - ok(le2 == ERROR_SERVICE_NOT_ACTIVE, "%s: %d != ERROR_SERVICE_NOT_ACTIVE\n", name, le2); - ok(status.dwCurrentState == SERVICE_STOPPED || - broken(is_nt4), /* NT4 returns a random value */ - "%s: should be stopped state=%x\n", name, status.dwCurrentState); - - return le1; -} - -static void test_start_stop(void) -{ - BOOL ret; - SC_HANDLE scm_handle, svc_handle; - DWORD le, is_nt4; - static const char servicename[] = "Winetest"; - char cmd[MAX_PATH+20]; - const char* displayname; - - SetLastError(0xdeadbeef); - scm_handle = OpenSCManagerA(NULL, NULL, GENERIC_ALL); - if (!scm_handle) - { - if(GetLastError() == ERROR_ACCESS_DENIED) - skip("Not enough rights to get a handle to the manager\n"); - else - ok(FALSE, "Could not get a handle to the manager: %d\n", GetLastError()); - return; - } - - /* Detect NT4 */ - svc_handle = OpenServiceA(scm_handle, NULL, GENERIC_READ); - is_nt4=(svc_handle == NULL && GetLastError() == ERROR_INVALID_PARAMETER); - - /* Do some cleanup in case a previous run crashed */ - svc_handle = OpenServiceA(scm_handle, servicename, GENERIC_ALL); - if (svc_handle) - { - DeleteService(svc_handle); - CloseServiceHandle(svc_handle); - } - - /* Create a dummy disabled service */ - sprintf(cmd, "\"%s\" service exit", selfname); - displayname = "Winetest Disabled Service"; - svc_handle = CreateServiceA(scm_handle, servicename, displayname, - GENERIC_ALL, SERVICE_INTERACTIVE_PROCESS | SERVICE_WIN32_OWN_PROCESS, - SERVICE_DISABLED, SERVICE_ERROR_IGNORE, cmd, NULL, - NULL, NULL, NULL, NULL); - if (!svc_handle) - { - if(GetLastError() == ERROR_ACCESS_DENIED) - skip("Not enough rights to create the service\n"); - else - ok(FALSE, "Could not create the service: %d\n", GetLastError()); - goto cleanup; - } - le = try_start_stop(svc_handle, displayname, is_nt4); - ok(le == ERROR_SERVICE_DISABLED, "%d != ERROR_SERVICE_DISABLED\n", le); - - /* Then one with a bad path */ - displayname = "Winetest Bad Path"; - ret = ChangeServiceConfigA(svc_handle, SERVICE_NO_CHANGE, SERVICE_DEMAND_START, SERVICE_NO_CHANGE, "c:\\no_such_file.exe", NULL, NULL, NULL, NULL, NULL, displayname); - ok(ret, "ChangeServiceConfig() failed le=%u\n", GetLastError()); - try_start_stop(svc_handle, displayname, is_nt4); - - if (is_nt4) - { - /* NT4 does not detect when a service fails to start and uses an - * insanely long timeout: 120s. So skip the rest of the tests. - */ - win_skip("Skip some service start/stop tests on NT4\n"); - goto cleanup; - } - - if (!winetest_interactive) - { - skip("reactos bug 6646: Skipping service start timeout tests!\n"); - goto cleanup; - } - - /* Again with a process that exits right away */ - displayname = "Winetest Exit Service"; - ret = ChangeServiceConfigA(svc_handle, SERVICE_NO_CHANGE, SERVICE_NO_CHANGE, SERVICE_NO_CHANGE, cmd, NULL, NULL, NULL, NULL, NULL, displayname); - ok(ret, "ChangeServiceConfig() failed le=%u\n", GetLastError()); - le = try_start_stop(svc_handle, displayname, is_nt4); - ok(le == ERROR_SERVICE_REQUEST_TIMEOUT, "%d != ERROR_SERVICE_REQUEST_TIMEOUT\n", le); - - /* And finally with a service that plays dead, forcing a timeout. - * This time we will put no quotes. That should work too, even if there are - * spaces in the path. - */ - sprintf(cmd, "%s service sleep", selfname); - displayname = "Winetest Sleep Service"; - ret = ChangeServiceConfigA(svc_handle, SERVICE_NO_CHANGE, SERVICE_NO_CHANGE, SERVICE_NO_CHANGE, cmd, NULL, NULL, NULL, NULL, NULL, displayname); - ok(ret, "ChangeServiceConfig() failed le=%u\n", GetLastError()); - - le = try_start_stop(svc_handle, displayname, is_nt4); - ok(le == ERROR_SERVICE_REQUEST_TIMEOUT, "%d != ERROR_SERVICE_REQUEST_TIMEOUT\n", le); - -cleanup: - if (svc_handle) - { - DeleteService(svc_handle); - CloseServiceHandle(svc_handle); - } - - /* Wait a while. The following test does a CreateService again */ - Sleep(1000); - - CloseServiceHandle(scm_handle); -} - -static void test_refcount(void) -{ - SC_HANDLE scm_handle, svc_handle1, svc_handle2, svc_handle3, svc_handle4, svc_handle5; - static const CHAR servicename [] = "Winetest"; - static const CHAR pathname [] = "we_dont_care.exe"; - BOOL ret; - - /* Get a handle to the Service Control Manager */ - SetLastError(0xdeadbeef); - scm_handle = OpenSCManagerA(NULL, NULL, GENERIC_ALL); - if (!scm_handle && (GetLastError() == ERROR_ACCESS_DENIED)) - { - skip("Not enough rights to get a handle to the manager\n"); - return; - } - - /* Create a service */ - svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, GENERIC_ALL, - SERVICE_WIN32_OWN_PROCESS | SERVICE_INTERACTIVE_PROCESS, - SERVICE_DISABLED, 0, pathname, NULL, NULL, NULL, NULL, NULL); - ok(svc_handle1 != NULL, "Expected success, got error %u\n", GetLastError()); - - /* Get a handle to this new service */ - svc_handle2 = OpenServiceA(scm_handle, servicename, GENERIC_READ); - ok(svc_handle2 != NULL, "Expected success, got error %u\n", GetLastError()); - - /* Get another handle to this new service */ - svc_handle3 = OpenServiceA(scm_handle, servicename, GENERIC_READ); - ok(svc_handle3 != NULL, "Expected success, got error %u\n", GetLastError()); - - /* Check if we can close the handle to the Service Control Manager */ - ret = CloseServiceHandle(scm_handle); - ok(ret, "Expected success (err=%d)\n", GetLastError()); - - /* Get a new handle to the Service Control Manager */ - scm_handle = OpenSCManagerA(NULL, NULL, GENERIC_ALL); - ok(scm_handle != NULL, "Expected success, got error %u\n", GetLastError()); - - /* Get a handle to this new service */ - svc_handle4 = OpenServiceA(scm_handle, servicename, GENERIC_ALL); - ok(svc_handle4 != NULL, "Expected success, got error %u\n", GetLastError()); - - /* Delete the service */ - ret = DeleteService(svc_handle4); - ok(ret, "Expected success (err=%d)\n", GetLastError()); - - /* We cannot create the same service again as it's still marked as 'being deleted'. - * The reason is that we still have 4 open handles to this service even though we - * closed the handle to the Service Control Manager in between. - */ - SetLastError(0xdeadbeef); - svc_handle5 = CreateServiceA(scm_handle, servicename, NULL, GENERIC_ALL, - SERVICE_WIN32_OWN_PROCESS | SERVICE_INTERACTIVE_PROCESS, - SERVICE_DISABLED, 0, pathname, NULL, NULL, NULL, NULL, NULL); - todo_wine - { - ok(!svc_handle5, "Expected failure\n"); - ok(GetLastError() == ERROR_SERVICE_MARKED_FOR_DELETE, - "Expected ERROR_SERVICE_MARKED_FOR_DELETE, got %d\n", GetLastError()); - } - - /* FIXME: Remove this when Wine is fixed */ - if (svc_handle5) - { - DeleteService(svc_handle5); - CloseServiceHandle(svc_handle5); - } - - /* Close all the handles to the service and try again */ - ret = CloseServiceHandle(svc_handle4); - ok(ret, "Expected success (err=%d)\n", GetLastError()); - ret = CloseServiceHandle(svc_handle3); - ok(ret, "Expected success (err=%d)\n", GetLastError()); - ret = CloseServiceHandle(svc_handle2); - ok(ret, "Expected success (err=%d)\n", GetLastError()); - ret = CloseServiceHandle(svc_handle1); - ok(ret, "Expected success (err=%d)\n", GetLastError()); - - /* Wait a while. Doing a CreateService too soon will result again - * in an ERROR_SERVICE_MARKED_FOR_DELETE error. - */ - Sleep(1000); - - /* We succeed now as all handles are closed (tested this also with a long SLeep() */ - svc_handle5 = CreateServiceA(scm_handle, servicename, NULL, GENERIC_ALL, - SERVICE_WIN32_OWN_PROCESS | SERVICE_INTERACTIVE_PROCESS, - SERVICE_DISABLED, 0, pathname, NULL, NULL, NULL, NULL, NULL); - ok(svc_handle5 != NULL, "Expected success, got error %u\n", GetLastError()); - - /* Delete the service */ - ret = DeleteService(svc_handle5); - ok(ret, "Expected success (err=%d)\n", GetLastError()); - - /* Wait a while. Just in case one of the following tests does a CreateService again */ - Sleep(1000); - - CloseServiceHandle(svc_handle5); - CloseServiceHandle(scm_handle); -} - -START_TEST(service) -{ - SC_HANDLE scm_handle; - int myARGC; - char** myARGV; - - myARGC = winetest_get_mainargs(&myARGV); - GetFullPathNameA(myARGV[0], sizeof(selfname), selfname, NULL); - if (myARGC >= 3) - { - if (strcmp(myARGV[2], "sleep") == 0) - /* Cause a service startup timeout */ - Sleep(90000); - /* then, or if myARGV[2] == "exit", just exit */ - return; - } - - /* Bail out if we are on win98 */ - SetLastError(0xdeadbeef); - scm_handle = OpenSCManagerA(NULL, NULL, GENERIC_ALL); - - if (!scm_handle && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) - { - win_skip("OpenSCManagerA is not implemented, we are most likely on win9x\n"); - return; - } - CloseServiceHandle(scm_handle); - - init_function_pointers(); - - /* First some parameter checking */ - test_open_scm(); - test_open_svc(); - test_create_delete_svc(); - test_get_displayname(); - test_get_servicekeyname(); - test_query_svc(); - test_enum_svc(); - test_close(); - /* Test the creation, querying and deletion of a service */ - test_sequence(); - test_queryconfig2(); - test_start_stop(); - /* The main reason for this test is to check if any refcounting is used - * and what the rules are - */ - test_refcount(); -} diff --git a/rostests/winetests/advapi32/testlist.c b/rostests/winetests/advapi32/testlist.c deleted file mode 100644 index 9722479c9be..00000000000 --- a/rostests/winetests/advapi32/testlist.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_cred(void); -extern void func_crypt(void); -extern void func_crypt_lmhash(void); -extern void func_crypt_md4(void); -extern void func_crypt_md5(void); -extern void func_crypt_sha(void); -extern void func_eventlog(void); -extern void func_lsa(void); -extern void func_registry(void); -extern void func_security(void); -extern void func_service(void); - -const struct test winetest_testlist[] = -{ - { "cred", func_cred }, - { "crypt", func_crypt }, - { "crypt_lmhash", func_crypt_lmhash }, - { "crypt_md4", func_crypt_md4 }, - { "crypt_md5", func_crypt_md5 }, - { "crypt_sha", func_crypt_sha }, - { "eventlog", func_eventlog }, - { "lsa", func_lsa }, - { "registry", func_registry }, - { "security", func_security }, - { "service", func_service }, - { 0, 0 } -}; diff --git a/rostests/winetests/advpack/CMakeLists.txt b/rostests/winetests/advpack/CMakeLists.txt deleted file mode 100644 index f3c53cdab4e..00000000000 --- a/rostests/winetests/advpack/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - advpack.c - files.c - install.c - testlist.c) - -add_executable(advpack_winetest ${SOURCE}) - -target_link_libraries(advpack_winetest wine) - -set_module_type(advpack_winetest win32cui) -add_importlibs(advpack_winetest cabinet advapi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET advpack_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/advpack/advpack.c b/rostests/winetests/advpack/advpack.c deleted file mode 100644 index 3ead0f25c4b..00000000000 --- a/rostests/winetests/advpack/advpack.c +++ /dev/null @@ -1,679 +0,0 @@ -/* - * Unit tests for advpack.dll - * - * Copyright (C) 2005 Robert Reif - * Copyright (C) 2005 Sami Aario - * - * 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 "wine/test.h" - -/* defines for the TranslateInfString/Ex tests */ -#define TEST_STRING1 "\\Application Name" -#define TEST_STRING2 "%49001%\\Application Name" - -/* defines for the SetPerUserSecValues tests */ -#define GUID_KEY "SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\guid" -#define REG_VAL_EXISTS(key, value) !RegQueryValueEx(key, value, NULL, NULL, NULL, NULL) -#define OPEN_GUID_KEY() !RegOpenKey(HKEY_LOCAL_MACHINE, GUID_KEY, &guid) - -static HMODULE hAdvPack; -static HRESULT (WINAPI *pCloseINFEngine)(HINF); -static HRESULT (WINAPI *pDelNode)(LPCSTR,DWORD); -static HRESULT (WINAPI *pGetVersionFromFile)(LPCSTR,LPDWORD,LPDWORD,BOOL); -static HRESULT (WINAPI *pOpenINFEngine)(PCSTR,PCSTR,DWORD,HINF*,PVOID); -static HRESULT (WINAPI *pSetPerUserSecValues)(PPERUSERSECTION pPerUser); -static HRESULT (WINAPI *pTranslateInfString)(LPCSTR,LPCSTR,LPCSTR,LPCSTR,LPSTR,DWORD,LPDWORD,LPVOID); -static HRESULT (WINAPI *pTranslateInfStringEx)(HINF,PCSTR,PCSTR,PCSTR,PSTR,DWORD,PDWORD,PVOID); - -static CHAR inf_file[MAX_PATH]; -static CHAR PROG_FILES_ROOT[MAX_PATH]; -static CHAR PROG_FILES[MAX_PATH]; -static CHAR APP_PATH[MAX_PATH]; -static DWORD APP_PATH_LEN; - -static void get_progfiles_dir(void) -{ - HKEY hkey; - DWORD size = MAX_PATH; - - RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion", &hkey); - RegQueryValueExA(hkey, "ProgramFilesDir", NULL, NULL, (LPBYTE)PROG_FILES_ROOT, &size); - RegCloseKey(hkey); - - lstrcpyA(PROG_FILES, PROG_FILES_ROOT + 3); /* skip C:\ */ - lstrcpyA(APP_PATH, PROG_FILES_ROOT); - lstrcatA(APP_PATH, TEST_STRING1); - APP_PATH_LEN = lstrlenA(APP_PATH) + 1; -} - -static BOOL init_function_pointers(void) -{ - hAdvPack = LoadLibraryA("advpack.dll"); - - if (!hAdvPack) - return FALSE; - - pCloseINFEngine = (void*)GetProcAddress(hAdvPack, "CloseINFEngine"); - pDelNode = (void *)GetProcAddress(hAdvPack, "DelNode"); - pGetVersionFromFile = (void *)GetProcAddress(hAdvPack, "GetVersionFromFile"); - pOpenINFEngine = (void*)GetProcAddress(hAdvPack, "OpenINFEngine"); - pSetPerUserSecValues = (void*)GetProcAddress(hAdvPack, "SetPerUserSecValues"); - pTranslateInfString = (void *)GetProcAddress(hAdvPack, "TranslateInfString"); - pTranslateInfStringEx = (void*)GetProcAddress(hAdvPack, "TranslateInfStringEx"); - - if (!pCloseINFEngine || !pDelNode || !pGetVersionFromFile || - !pOpenINFEngine || !pSetPerUserSecValues || !pTranslateInfString) - { - win_skip("Needed functions are not available\n"); - FreeLibrary(hAdvPack); - return FALSE; - } - - return TRUE; -} - -static void version_test(void) -{ - HRESULT hr; - DWORD major, minor; - - major = minor = 0; - hr = pGetVersionFromFile("kernel32.dll", &major, &minor, FALSE); - ok (hr == S_OK, "GetVersionFromFileEx(kernel32.dll) failed, returned " - "0x%08x\n", hr); - trace("kernel32.dll Language ID: 0x%08x, Codepage ID: 0x%08x\n", - major, minor); - - major = minor = 0; - hr = pGetVersionFromFile("kernel32.dll", &major, &minor, TRUE); - ok (hr == S_OK, "GetVersionFromFileEx(kernel32.dll) failed, returned " - "0x%08x\n", hr); - trace("kernel32.dll version: %d.%d.%d.%d\n", HIWORD(major), LOWORD(major), - HIWORD(minor), LOWORD(minor)); - - major = minor = 0; - hr = pGetVersionFromFile("advpack.dll", &major, &minor, FALSE); - ok (hr == S_OK, "GetVersionFromFileEx(advpack.dll) failed, returned " - "0x%08x\n", hr); - trace("advpack.dll Language ID: 0x%08x, Codepage ID: 0x%08x\n", - major, minor); - - major = minor = 0; - hr = pGetVersionFromFile("advpack.dll", &major, &minor, TRUE); - ok (hr == S_OK, "GetVersionFromFileEx(advpack.dll) failed, returned " - "0x%08x\n", hr); - trace("advpack.dll version: %d.%d.%d.%d\n", HIWORD(major), LOWORD(major), - HIWORD(minor), LOWORD(minor)); -} - -static void delnode_test(void) -{ - HRESULT hr; - HANDLE hn; - CHAR currDir[MAX_PATH]; - int currDirLen; - - /* Native DelNode apparently does not support relative paths, so we use - absolute paths for testing */ - currDirLen = GetCurrentDirectoryA(sizeof(currDir) / sizeof(CHAR), currDir); - assert(currDirLen > 0 && currDirLen < sizeof(currDir) / sizeof(CHAR)); - - if(currDir[currDirLen - 1] == '\\') - currDir[--currDirLen] = 0; - - /* Simple tests; these should fail. */ - hr = pDelNode(NULL, 0); - ok (hr == E_FAIL, "DelNode called with NULL pathname should return E_FAIL\n"); - hr = pDelNode("", 0); - ok (hr == E_FAIL, "DelNode called with empty pathname should return E_FAIL\n"); - - /* Test deletion of a file. */ - hn = CreateFile("DelNodeTestFile1", GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - assert(hn != INVALID_HANDLE_VALUE); - CloseHandle(hn); - hr = pDelNode(lstrcat(currDir, "\\DelNodeTestFile1"), 0); - ok (hr == S_OK, "DelNode failed deleting a single file\n"); - currDir[currDirLen] = '\0'; - - /* Test deletion of an empty directory. */ - CreateDirectoryA("DelNodeTestDir", NULL); - hr = pDelNode(lstrcat(currDir, "\\DelNodeTestDir"), 0); - ok (hr == S_OK, "DelNode failed deleting an empty directory\n"); - currDir[currDirLen] = '\0'; - - /* Test deletion of a directory containing one file. */ - CreateDirectoryA("DelNodeTestDir", NULL); - hn = CreateFile("DelNodeTestDir\\DelNodeTestFile1", GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - assert(hn != INVALID_HANDLE_VALUE); - CloseHandle(hn); - hr = pDelNode(lstrcat(currDir, "\\DelNodeTestDir"), 0); - ok (hr == S_OK, "DelNode failed deleting a directory containing one file\n"); - currDir[currDirLen] = '\0'; - - /* Test deletion of a directory containing multiple files. */ - CreateDirectoryA("DelNodeTestDir", NULL); - hn = CreateFile("DelNodeTestDir\\DelNodeTestFile1", GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - assert(hn != INVALID_HANDLE_VALUE); - CloseHandle(hn); - hn = CreateFile("DelNodeTestDir\\DelNodeTestFile2", GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - assert(hn != INVALID_HANDLE_VALUE); - CloseHandle(hn); - hn = CreateFile("DelNodeTestDir\\DelNodeTestFile3", GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - assert(hn != INVALID_HANDLE_VALUE); - CloseHandle(hn); - hr = pDelNode(lstrcat(currDir, "\\DelNodeTestDir"), 0); - ok (hr == S_OK, "DelNode failed deleting a directory containing multiple files\n"); - currDir[currDirLen] = '\0'; -} - -static void append_str(char **str, const char *data, ...) -{ - va_list valist; - - va_start(valist, data); - vsprintf(*str, data, valist); - *str += strlen(*str); - va_end(valist); -} - -static void create_inf_file(void) -{ - char data[1024]; - char *ptr = data; - DWORD dwNumberOfBytesWritten; - HANDLE hf = CreateFile(inf_file, GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - - append_str(&ptr, "[Version]\n"); - append_str(&ptr, "Signature=\"$Chicago$\"\n"); - append_str(&ptr, "[CustInstDestSection]\n"); - append_str(&ptr, "49001=ProgramFilesDir\n"); - append_str(&ptr, "49010=DestA,1\n"); - append_str(&ptr, "49020=DestB\n"); - append_str(&ptr, "49030=DestC\n"); - append_str(&ptr, "[ProgramFilesDir]\n"); - append_str(&ptr, "HKLM,\"Software\\Microsoft\\Windows\\CurrentVersion\","); - append_str(&ptr, "\"ProgramFilesDir\",,\"%%24%%\\%%LProgramF%%\"\n"); - append_str(&ptr, "[section]\n"); - append_str(&ptr, "NotACustomDestination=Version\n"); - append_str(&ptr, "CustomDestination=CustInstDestSection\n"); - append_str(&ptr, "[Options.NTx86]\n"); - append_str(&ptr, "49001=ProgramFilesDir\n"); - append_str(&ptr, "InstallDir=%%49001%%\\%%DefaultAppPath%%\n"); - append_str(&ptr, "Result1=%%49010%%\n"); - append_str(&ptr, "Result2=%%49020%%\n"); - append_str(&ptr, "Result3=%%49030%%\n"); - append_str(&ptr, "CustomHDestination=CustInstDestSection\n"); - append_str(&ptr, "[Strings]\n"); - append_str(&ptr, "DefaultAppPath=\"Application Name\"\n"); - append_str(&ptr, "LProgramF=\"%s\"\n", PROG_FILES); - append_str(&ptr, "[DestA]\n"); - append_str(&ptr, "HKLM,\"Software\\Garbage\",\"ProgramFilesDir\",,'%%24%%\\%%LProgramF%%'\n"); - append_str(&ptr, "[DestB]\n"); - append_str(&ptr, "'HKLM','Software\\Microsoft\\Windows\\CurrentVersion',"); - append_str(&ptr, "'ProgramFilesDir',,\"%%24%%\"\n"); - append_str(&ptr, "[DestC]\n"); - append_str(&ptr, "HKLM,\"Software\\Garbage\",\"ProgramFilesDir\",,'%%24%%'\n"); - - WriteFile(hf, data, ptr - data, &dwNumberOfBytesWritten, NULL); - CloseHandle(hf); -} - -static void translateinfstring_test(void) -{ - HRESULT hr; - char buffer[MAX_PATH]; - DWORD dwSize; - - create_inf_file(); - - /* pass in a couple invalid parameters */ - hr = pTranslateInfString(NULL, NULL, NULL, NULL, buffer, MAX_PATH, &dwSize, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08x\n", (UINT)hr); - - /* try to open an inf file that doesn't exist */ - hr = pTranslateInfString("c:\\a.inf", "Options.NTx86", "Options.NTx86", - "InstallDir", buffer, MAX_PATH, &dwSize, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || hr == E_INVALIDARG || - hr == HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND), - "Expected E_INVALIDARG, 0x80070002 or 0x8007007e, got 0x%08x\n", (UINT)hr); - - if(hr == HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND)) - { - win_skip("WinNT 3.51 detected. Skipping tests for TranslateInfString()\n"); - return; - } - - /* try a nonexistent section */ - buffer[0] = 0; - hr = pTranslateInfString(inf_file, "idontexist", "Options.NTx86", - "InstallDir", buffer, MAX_PATH, &dwSize, NULL); - if (hr == E_ACCESSDENIED) - { - skip("TranslateInfString is broken\n"); - return; - } - ok(hr == S_OK, "Expected S_OK, got 0x%08x\n", (UINT)hr); - ok(!strcmp(buffer, TEST_STRING2), "Expected %s, got %s\n", TEST_STRING2, buffer); - ok(dwSize == 25, "Expected size 25, got %d\n", dwSize); - - buffer[0] = 0; - /* try other nonexistent section */ - hr = pTranslateInfString(inf_file, "Options.NTx86", "idontexist", - "InstallDir", buffer, MAX_PATH, &dwSize, NULL); - ok(hr == SPAPI_E_LINE_NOT_FOUND || hr == E_INVALIDARG, - "Expected SPAPI_E_LINE_NOT_FOUND or E_INVALIDARG, got 0x%08x\n", (UINT)hr); - - buffer[0] = 0; - /* try nonexistent key */ - hr = pTranslateInfString(inf_file, "Options.NTx86", "Options.NTx86", - "notvalid", buffer, MAX_PATH, &dwSize, NULL); - ok(hr == SPAPI_E_LINE_NOT_FOUND || hr == E_INVALIDARG, - "Expected SPAPI_E_LINE_NOT_FOUND or E_INVALIDARG, got 0x%08x\n", (UINT)hr); - - buffer[0] = 0; - /* test the behavior of pszInstallSection */ - hr = pTranslateInfString(inf_file, "section", "Options.NTx86", - "InstallDir", buffer, MAX_PATH, &dwSize, NULL); - ok(hr == ERROR_SUCCESS || hr == E_FAIL, - "Expected ERROR_SUCCESS or E_FAIL, got 0x%08x\n", (UINT)hr); - - if(hr == ERROR_SUCCESS) - { - ok(!strcmp(buffer, APP_PATH), "Expected '%s', got '%s'\n", APP_PATH, buffer); - ok(dwSize == APP_PATH_LEN, "Expected size %d, got %d\n", APP_PATH_LEN, dwSize); - } - - buffer[0] = 0; - /* try without a pszInstallSection */ - hr = pTranslateInfString(inf_file, NULL, "Options.NTx86", - "InstallDir", buffer, MAX_PATH, &dwSize, NULL); - ok(hr == S_OK, "Expected S_OK, got 0x%08x\n", (UINT)hr); - todo_wine - { - ok(!strcmp(buffer, TEST_STRING2), "Expected %s, got %s\n", TEST_STRING2, buffer); - ok(dwSize == 25, "Expected size 25, got %d\n", dwSize); - } - - DeleteFile("c:\\a.inf"); - DeleteFile(inf_file); -} - -static void translateinfstringex_test(void) -{ - HINF hinf; - HRESULT hr; - char buffer[MAX_PATH]; - DWORD size = MAX_PATH; - - hr = pOpenINFEngine(inf_file, NULL, 0, &hinf, NULL); - if (hr == E_UNEXPECTED) - { - win_skip("Skipping tests on win9x because of brokenness\n"); - return; - } - - create_inf_file(); - - /* need to see if there are any flags */ - - /* try a NULL filename */ - hr = pOpenINFEngine(NULL, "Options.NTx86", 0, &hinf, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - - /* try an empty filename */ - hr = pOpenINFEngine("", "Options.NTx86", 0, &hinf, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) /* NT+ */ || - hr == HRESULT_FROM_WIN32(E_UNEXPECTED) /* 9x */, - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND or E_UNEXPECTED), got %08x\n", hr); - - /* try a NULL hinf */ - hr = pOpenINFEngine(inf_file, "Options.NTx86", 0, NULL, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - - /* open the INF without the Install section specified */ - hr = pOpenINFEngine(inf_file, NULL, 0, &hinf, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - /* try a NULL hinf */ - hr = pTranslateInfStringEx(NULL, inf_file, "Options.NTx86", "InstallDir", - buffer, size, &size, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - - /* try a NULL filename */ - hr = pTranslateInfStringEx(hinf, NULL, "Options.NTx86", "InstallDir", - buffer, size, &size, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - - /* try an empty filename */ - memset(buffer, 'a', 25); - buffer[24] = '\0'; - size = MAX_PATH; - hr = pTranslateInfStringEx(hinf, "", "Options.NTx86", "InstallDir", - buffer, size, &size, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - todo_wine - { - ok(!strcmp(buffer, TEST_STRING2), "Expected %s, got %s\n", TEST_STRING2, buffer); - ok(size == 25, "Expected size 25, got %d\n", size); - } - - /* try a NULL translate section */ - hr = pTranslateInfStringEx(hinf, inf_file, NULL, "InstallDir", - buffer, size, &size, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - - /* try an empty translate section */ - hr = pTranslateInfStringEx(hinf, inf_file, "", "InstallDir", - buffer, size, &size, NULL); - ok(hr == SPAPI_E_LINE_NOT_FOUND, "Expected SPAPI_E_LINE_NOT_FOUND, got %08x\n", hr); - - /* try a NULL translate key */ - hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", NULL, - buffer, size, &size, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - - /* try an empty translate key */ - hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "", - buffer, size, &size, NULL); - ok(hr == SPAPI_E_LINE_NOT_FOUND, "Expected SPAPI_E_LINE_NOT_FOUND, got %08x\n", hr); - - /* successfully translate the string */ - memset(buffer, 'a', 25); - buffer[24] = '\0'; - size = MAX_PATH; - hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "InstallDir", - buffer, size, &size, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - todo_wine - { - ok(!strcmp(buffer, TEST_STRING2), "Expected %s, got %s\n", TEST_STRING2, buffer); - ok(size == 25, "Expected size 25, got %d\n", size); - } - - /* try a NULL hinf */ - hr = pCloseINFEngine(NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - - /* successfully close the hinf */ - hr = pCloseINFEngine(hinf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - /* open the inf with the install section */ - hr = pOpenINFEngine(inf_file, "section", 0, &hinf, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - /* translate the string with the install section specified */ - memset(buffer, 'a', APP_PATH_LEN); - buffer[APP_PATH_LEN - 1] = '\0'; - size = MAX_PATH; - hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "InstallDir", - buffer, size, &size, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!strcmp(buffer, APP_PATH), "Expected %s, got %s\n", APP_PATH, buffer); - ok(size == APP_PATH_LEN, "Expected size %d, got %d\n", APP_PATH_LEN, size); - - /* Single quote test (Note size includes null on return from call) */ - memset(buffer, 'a', APP_PATH_LEN); - buffer[APP_PATH_LEN - 1] = '\0'; - size = MAX_PATH; - hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "Result1", - buffer, size, &size, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpi(buffer, PROG_FILES_ROOT), - "Expected %s, got %s\n", PROG_FILES_ROOT, buffer); - ok(size == lstrlenA(PROG_FILES_ROOT)+1, "Expected size %d, got %d\n", - lstrlenA(PROG_FILES_ROOT)+1, size); - - memset(buffer, 'a', APP_PATH_LEN); - buffer[APP_PATH_LEN - 1] = '\0'; - size = MAX_PATH; - hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "Result2", - buffer, size, &size, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpi(buffer, PROG_FILES_ROOT), - "Expected %s, got %s\n", PROG_FILES_ROOT, buffer); - ok(size == lstrlenA(PROG_FILES_ROOT)+1, "Expected size %d, got %d\n", - lstrlenA(PROG_FILES_ROOT)+1, size); - - { - char drive[MAX_PATH]; - lstrcpy(drive, PROG_FILES_ROOT); - drive[3] = 0x00; /* Just keep the system drive plus '\' */ - - memset(buffer, 'a', APP_PATH_LEN); - buffer[APP_PATH_LEN - 1] = '\0'; - size = MAX_PATH; - hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "Result3", - buffer, size, &size, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpi(buffer, drive), - "Expected %s, got %s\n", drive, buffer); - ok(size == lstrlenA(drive)+1, "Expected size %d, got %d\n", - lstrlenA(drive)+1, size); - } - - /* close the INF again */ - hr = pCloseINFEngine(hinf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - DeleteFileA(inf_file); - - /* Create another .inf file which is just here to trigger a wine bug */ - { - char data[1024]; - char *ptr = data; - DWORD dwNumberOfBytesWritten; - HANDLE hf = CreateFile(inf_file, GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - - append_str(&ptr, "[Version]\n"); - append_str(&ptr, "Signature=\"$Chicago$\"\n"); - append_str(&ptr, "[section]\n"); - append_str(&ptr, "NotACustomDestination=Version\n"); - append_str(&ptr, "CustomDestination=CustInstDestSection\n"); - append_str(&ptr, "[CustInstDestSection]\n"); - append_str(&ptr, "49010=DestA,1\n"); - append_str(&ptr, "49020=DestB\n"); - append_str(&ptr, "49030=DestC\n"); - append_str(&ptr, "49040=DestD\n"); - append_str(&ptr, "[Options.NTx86]\n"); - append_str(&ptr, "Result2=%%49030%%\n"); - append_str(&ptr, "[DestA]\n"); - append_str(&ptr, "HKLM,\"Software\\Garbage\",\"ProgramFilesDir\",,'%%24%%'\n"); - /* The point of this test is to have HKCU just before the quoted HKLM */ - append_str(&ptr, "[DestB]\n"); - append_str(&ptr, "HKCU,\"Software\\Garbage\",\"ProgramFilesDir\",,'%%24%%'\n"); - append_str(&ptr, "[DestC]\n"); - append_str(&ptr, "'HKLM','Software\\Microsoft\\Windows\\CurrentVersion',"); - append_str(&ptr, "'ProgramFilesDir',,\"%%24%%\"\n"); - append_str(&ptr, "[DestD]\n"); - append_str(&ptr, "HKLM,\"Software\\Garbage\",\"ProgramFilesDir\",,'%%24%%'\n"); - - WriteFile(hf, data, ptr - data, &dwNumberOfBytesWritten, NULL); - CloseHandle(hf); - } - - /* open the inf with the install section */ - hr = pOpenINFEngine(inf_file, "section", 0, &hinf, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - /* Single quote test (Note size includes null on return from call) */ - memset(buffer, 'a', APP_PATH_LEN); - buffer[APP_PATH_LEN - 1] = '\0'; - size = MAX_PATH; - hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "Result2", - buffer, size, &size, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpi(buffer, PROG_FILES_ROOT), - "Expected %s, got %s\n", PROG_FILES_ROOT, buffer); - ok(size == lstrlenA(PROG_FILES_ROOT)+1, "Expected size %d, got %d\n", - lstrlenA(PROG_FILES_ROOT)+1, size); - - /* close the INF again */ - hr = pCloseINFEngine(hinf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - DeleteFileA(inf_file); -} - -static BOOL check_reg_str(HKEY hkey, LPCSTR name, LPCSTR value) -{ - DWORD size = MAX_PATH; - char check[MAX_PATH]; - - if (RegQueryValueEx(hkey, name, NULL, NULL, (LPBYTE)check, &size)) - return FALSE; - - return !lstrcmp(check, value); -} - -static BOOL check_reg_dword(HKEY hkey, LPCSTR name, DWORD value) -{ - DWORD size = sizeof(DWORD); - DWORD check; - - if (RegQueryValueEx(hkey, name, NULL, NULL, (LPBYTE)&check, &size)) - return FALSE; - - return (check == value); -} - -static void setperusersecvalues_test(void) -{ - PERUSERSECTION peruser; - HRESULT hr; - HKEY guid; - - lstrcpy(peruser.szDispName, "displayname"); - lstrcpy(peruser.szLocale, "locale"); - lstrcpy(peruser.szStub, "stub"); - lstrcpy(peruser.szVersion, "1,1,1,1"); - lstrcpy(peruser.szCompID, "compid"); - peruser.dwIsInstalled = 1; - peruser.bRollback = FALSE; - - /* try a NULL pPerUser */ - if (0) - { - /* This crashes on systems with IE7 */ - hr = pSetPerUserSecValues(NULL); - todo_wine - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); - ok(!OPEN_GUID_KEY(), "Expected guid key to not exist\n"); - } - - /* at the very least, szGUID must be valid */ - peruser.szGUID[0] = '\0'; - hr = pSetPerUserSecValues(&peruser); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); - ok(!OPEN_GUID_KEY(), "Expected guid key to not exist\n"); - - /* set initial values */ - lstrcpy(peruser.szGUID, "guid"); - hr = pSetPerUserSecValues(&peruser); - if (hr == E_FAIL) - { - skip("SetPerUserSecValues is broken\n"); - return; - } - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(OPEN_GUID_KEY(), "Expected guid key to exist\n"); - ok(check_reg_str(guid, NULL, "displayname"), "Expected displayname\n"); - ok(check_reg_str(guid, "ComponentID", "compid"), "Expected compid\n"); - ok(check_reg_str(guid, "Locale", "locale"), "Expected locale\n"); - ok(check_reg_str(guid, "StubPath", "stub"), "Expected stub\n"); - ok(check_reg_str(guid, "Version", "1,1,1,1"), "Expected 1,1,1,1\n"); - ok(check_reg_dword(guid, "IsInstalled", 1), "Expected 1\n"); - ok(!REG_VAL_EXISTS(guid, "OldDisplayName"), "Expected OldDisplayName to not exist\n"); - ok(!REG_VAL_EXISTS(guid, "OldLocale"), "Expected OldLocale to not exist\n"); - ok(!REG_VAL_EXISTS(guid, "OldStubPath"), "Expected OldStubPath to not exist\n"); - ok(!REG_VAL_EXISTS(guid, "OldVersion"), "Expected OldVersion to not exist\n"); - ok(!REG_VAL_EXISTS(guid, "RealStubPath"), "Expected RealStubPath to not exist\n"); - - /* raise the version, but bRollback is FALSE, so vals not saved */ - lstrcpy(peruser.szVersion, "2,1,1,1"); - hr = pSetPerUserSecValues(&peruser); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(check_reg_str(guid, NULL, "displayname"), "Expected displayname\n"); - ok(check_reg_str(guid, "ComponentID", "compid"), "Expected compid\n"); - ok(check_reg_str(guid, "Locale", "locale"), "Expected locale\n"); - ok(check_reg_str(guid, "StubPath", "stub"), "Expected stub\n"); - ok(check_reg_str(guid, "Version", "2,1,1,1"), "Expected 2,1,1,1\n"); - ok(check_reg_dword(guid, "IsInstalled", 1), "Expected 1\n"); - ok(!REG_VAL_EXISTS(guid, "OldDisplayName"), "Expected OldDisplayName to not exist\n"); - ok(!REG_VAL_EXISTS(guid, "OldLocale"), "Expected OldLocale to not exist\n"); - ok(!REG_VAL_EXISTS(guid, "OldStubPath"), "Expected OldStubPath to not exist\n"); - ok(!REG_VAL_EXISTS(guid, "OldVersion"), "Expected OldVersion to not exist\n"); - ok(!REG_VAL_EXISTS(guid, "RealStubPath"), "Expected RealStubPath to not exist\n"); - - /* raise the version again, bRollback is TRUE so vals are saved */ - peruser.bRollback = TRUE; - lstrcpy(peruser.szVersion, "3,1,1,1"); - hr = pSetPerUserSecValues(&peruser); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(check_reg_str(guid, NULL, "displayname"), "Expected displayname\n"); - ok(check_reg_str(guid, "ComponentID", "compid"), "Expected compid\n"); - ok(check_reg_str(guid, "Locale", "locale"), "Expected locale\n"); - ok(check_reg_dword(guid, "IsInstalled", 1), "Expected 1\n"); - ok(check_reg_str(guid, "Version", "3,1,1,1"), "Expected 3,1,1,1\n"); - todo_wine - { - ok(check_reg_str(guid, "OldDisplayName", "displayname"), "Expected displayname\n"); - ok(check_reg_str(guid, "OldLocale", "locale"), "Expected locale\n"); - ok(check_reg_str(guid, "RealStubPath", "stub"), "Expected stub\n"); - ok(check_reg_str(guid, "OldStubPath", "stub"), "Expected stub\n"); - ok(check_reg_str(guid, "OldVersion", "2,1,1,1"), "Expected 2,1,1,1\n"); - ok(check_reg_str(guid, "StubPath", - "rundll32.exe advpack.dll,UserInstStubWrapper guid"), - "Expected real stub\n"); - } - - RegDeleteKey(HKEY_LOCAL_MACHINE, GUID_KEY); -} - -START_TEST(advpack) -{ - if (!init_function_pointers()) - return; - - /* Make sure we create the temporary file in a directory - * were we have enough rights - */ - GetTempPath(MAX_PATH, inf_file); - lstrcat(inf_file,"test.inf"); - - get_progfiles_dir(); - - version_test(); - delnode_test(); - setperusersecvalues_test(); - translateinfstring_test(); - translateinfstringex_test(); - - FreeLibrary(hAdvPack); -} diff --git a/rostests/winetests/advpack/advpack.rbuild b/rostests/winetests/advpack/advpack.rbuild deleted file mode 100644 index cc1868832df..00000000000 --- a/rostests/winetests/advpack/advpack.rbuild +++ /dev/null @@ -1,16 +0,0 @@ - - - - - . - - advpack.c - files.c - install.c - testlist.c - wine - cabinet - advapi32 - ntdll - - diff --git a/rostests/winetests/advpack/files.c b/rostests/winetests/advpack/files.c deleted file mode 100644 index 5c6ea8de1f2..00000000000 --- a/rostests/winetests/advpack/files.c +++ /dev/null @@ -1,558 +0,0 @@ -/* - * Unit tests for advpack.dll file functions - * - * Copyright (C) 2006 James Hawkins - * - * 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/test.h" - -/* make the max size large so there is only one cab file */ -#define MEDIA_SIZE 999999999 -#define FOLDER_THRESHOLD 900000 - -/* function pointers */ -HMODULE hAdvPack; -static HRESULT (WINAPI *pAddDelBackupEntry)(LPCSTR, LPCSTR, LPCSTR, DWORD); -static HRESULT (WINAPI *pExtractFiles)(LPCSTR, LPCSTR, DWORD, LPCSTR, LPVOID, DWORD); -static HRESULT (WINAPI *pAdvInstallFile)(HWND,LPCSTR,LPCSTR,LPCSTR,LPCSTR,DWORD,DWORD); - -CHAR CURR_DIR[MAX_PATH]; - -static void init_function_pointers(void) -{ - hAdvPack = LoadLibraryA("advpack.dll"); - - if (hAdvPack) - { - pAddDelBackupEntry = (void *)GetProcAddress(hAdvPack, "AddDelBackupEntry"); - pExtractFiles = (void *)GetProcAddress(hAdvPack, "ExtractFiles"); - pAdvInstallFile = (void*)GetProcAddress(hAdvPack, "AdvInstallFile"); - } -} - -/* creates a file with the specified name for tests */ -static void createTestFile(const CHAR *name) -{ - HANDLE file; - DWORD written; - - file = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "Failure to open file %s\n", name); - WriteFile(file, name, strlen(name), &written, NULL); - WriteFile(file, "\n", strlen("\n"), &written, NULL); - CloseHandle(file); -} - -static void create_test_files(void) -{ - createTestFile("a.txt"); - createTestFile("b.txt"); - CreateDirectoryA("testdir", NULL); - createTestFile("testdir\\c.txt"); - createTestFile("testdir\\d.txt"); - CreateDirectoryA("dest", NULL); -} - -static void delete_test_files(void) -{ - DeleteFileA("a.txt"); - DeleteFileA("b.txt"); - DeleteFileA("testdir\\c.txt"); - DeleteFileA("testdir\\d.txt"); - RemoveDirectoryA("testdir"); - RemoveDirectoryA("dest"); - - DeleteFileA("extract.cab"); -} - -static BOOL check_ini_file_attr(LPSTR filename) -{ - BOOL ret; - DWORD expected = FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_READONLY; - DWORD attr = GetFileAttributesA(filename); - - ret = (attr & expected) && (attr != INVALID_FILE_ATTRIBUTES); - SetFileAttributesA(filename, FILE_ATTRIBUTE_NORMAL); - - return ret; -} - -static void test_AddDelBackupEntry(void) -{ - BOOL ret; - HRESULT res; - CHAR path[MAX_PATH]; - CHAR windir[MAX_PATH]; - - lstrcpyA(path, CURR_DIR); - lstrcatA(path, "\\backup\\basename.INI"); - - /* native AddDelBackupEntry crashes if lpcszBaseName is NULL */ - - /* try a NULL file list */ - res = pAddDelBackupEntry(NULL, "backup", "basename", AADBE_ADD_ENTRY); - ok(res == S_OK, "Expected S_OK, got %d\n", res); - ok(!DeleteFileA(path), "Expected path to not exist\n"); - - lstrcpyA(path, CURR_DIR); - lstrcatA(path, "\\backup\\.INI"); - - /* try an empty base name */ - res = pAddDelBackupEntry("one\0two\0three\0", "backup", "", AADBE_ADD_ENTRY); - ok(res == S_OK, "Expected S_OK, got %d\n", res); - ok(!DeleteFileA(path), "Expected path to not exist\n"); - - lstrcpyA(path, CURR_DIR); - lstrcatA(path, "\\basename.INI"); - - /* try an invalid flag */ - res = pAddDelBackupEntry("one\0two\0three\0", NULL, "basename", 0); - ok(res == S_OK, "Expected S_OK, got %d\n", res); - ok(!DeleteFileA(path), "Expected path to not exist\n"); - - lstrcpyA(path, "c:\\basename.INI"); - - /* create the INF file */ - res = pAddDelBackupEntry("one\0two\0three\0", "c:\\", "basename", AADBE_ADD_ENTRY); - ok(res == S_OK, "Expected S_OK, got %d\n", res); - if (GetFileAttributes(path) != INVALID_FILE_ATTRIBUTES) - { - ok(check_ini_file_attr(path), "Expected ini file to be hidden\n"); - ok(DeleteFileA(path), "Expected path to exist\n"); - } - else - win_skip("Test file could not be created\n"); - - lstrcpyA(path, CURR_DIR); - lstrcatA(path, "\\backup\\basename.INI"); - - /* try to create the INI file in a nonexistent directory */ - RemoveDirectoryA("backup"); - res = pAddDelBackupEntry("one\0two\0three\0", "backup", "basename", AADBE_ADD_ENTRY); - ok(res == S_OK, "Expected S_OK, got %d\n", res); - ok(!check_ini_file_attr(path), "Expected ini file to not be hidden\n"); - ok(!DeleteFileA(path), "Expected path to not exist\n"); - - /* try an existent, relative backup directory */ - CreateDirectoryA("backup", NULL); - res = pAddDelBackupEntry("one\0two\0three\0", "backup", "basename", AADBE_ADD_ENTRY); - ok(res == S_OK, "Expected S_OK, got %d\n", res); - ok(check_ini_file_attr(path), "Expected ini file to be hidden\n"); - ok(DeleteFileA(path), "Expected path to exist\n"); - RemoveDirectoryA("backup"); - - GetWindowsDirectoryA(windir, sizeof(windir)); - sprintf(path, "%s\\basename.INI", windir); - - /* try a NULL backup dir, INI is created in the windows directory */ - res = pAddDelBackupEntry("one\0two\0three\0", NULL, "basename", AADBE_ADD_ENTRY); - ok(res == S_OK, "Expected S_OK, got %d\n", res); - - /* remove the entries with AADBE_DEL_ENTRY */ - SetFileAttributesA(path, FILE_ATTRIBUTE_NORMAL); - res = pAddDelBackupEntry("one\0three\0", NULL, "basename", AADBE_DEL_ENTRY); - SetFileAttributesA(path, FILE_ATTRIBUTE_NORMAL); - ok(res == S_OK, "Expected S_OK, got %d\n", res); - ret = DeleteFileA(path); - ok(ret == TRUE || - broken(ret == FALSE), /* win98 */ - "Expected path to exist\n"); -} - -/* the FCI callbacks */ - -static void * CDECL mem_alloc(ULONG cb) -{ - return HeapAlloc(GetProcessHeap(), 0, cb); -} - -static void CDECL mem_free(void *memory) -{ - HeapFree(GetProcessHeap(), 0, memory); -} - -static BOOL CDECL get_next_cabinet(PCCAB pccab, ULONG cbPrevCab, void *pv) -{ - return TRUE; -} - -static LONG CDECL progress(UINT typeStatus, ULONG cb1, ULONG cb2, void *pv) -{ - return 0; -} - -static int CDECL file_placed(PCCAB pccab, char *pszFile, LONG cbFile, - BOOL fContinuation, void *pv) -{ - return 0; -} - -static INT_PTR CDECL fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv) -{ - HANDLE handle; - DWORD dwAccess = 0; - DWORD dwShareMode = 0; - DWORD dwCreateDisposition = OPEN_EXISTING; - - dwAccess = GENERIC_READ | GENERIC_WRITE; - /* FILE_SHARE_DELETE is not supported by Windows Me/98/95 */ - dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE; - - if (GetFileAttributesA(pszFile) != INVALID_FILE_ATTRIBUTES) - dwCreateDisposition = OPEN_EXISTING; - else - dwCreateDisposition = CREATE_NEW; - - handle = CreateFileA(pszFile, dwAccess, dwShareMode, NULL, - dwCreateDisposition, 0, NULL); - - ok(handle != INVALID_HANDLE_VALUE, "Failed to CreateFile %s\n", pszFile); - - return (INT_PTR)handle; -} - -static UINT CDECL fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) -{ - HANDLE handle = (HANDLE)hf; - DWORD dwRead; - BOOL res; - - res = ReadFile(handle, memory, cb, &dwRead, NULL); - ok(res, "Failed to ReadFile\n"); - - return dwRead; -} - -static UINT CDECL fci_write(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) -{ - HANDLE handle = (HANDLE)hf; - DWORD dwWritten; - BOOL res; - - res = WriteFile(handle, memory, cb, &dwWritten, NULL); - ok(res, "Failed to WriteFile\n"); - - return dwWritten; -} - -static int CDECL fci_close(INT_PTR hf, int *err, void *pv) -{ - HANDLE handle = (HANDLE)hf; - ok(CloseHandle(handle), "Failed to CloseHandle\n"); - - return 0; -} - -static LONG CDECL fci_seek(INT_PTR hf, LONG dist, int seektype, int *err, void *pv) -{ - HANDLE handle = (HANDLE)hf; - DWORD ret; - - ret = SetFilePointer(handle, dist, NULL, seektype); - ok(ret != INVALID_SET_FILE_POINTER, "Failed to SetFilePointer\n"); - - return ret; -} - -static int CDECL fci_delete(char *pszFile, int *err, void *pv) -{ - BOOL ret = DeleteFileA(pszFile); - ok(ret, "Failed to DeleteFile %s\n", pszFile); - - return 0; -} - -static BOOL CDECL get_temp_file(char *pszTempName, int cbTempName, void *pv) -{ - LPSTR tempname; - - tempname = HeapAlloc(GetProcessHeap(), 0, MAX_PATH); - GetTempFileNameA(".", "xx", 0, tempname); - - if (tempname && (strlen(tempname) < (unsigned)cbTempName)) - { - lstrcpyA(pszTempName, tempname); - HeapFree(GetProcessHeap(), 0, tempname); - return TRUE; - } - - HeapFree(GetProcessHeap(), 0, tempname); - - return FALSE; -} - -static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime, - USHORT *pattribs, int *err, void *pv) -{ - BY_HANDLE_FILE_INFORMATION finfo; - FILETIME filetime; - HANDLE handle; - DWORD attrs; - BOOL res; - - handle = CreateFile(pszName, GENERIC_READ, FILE_SHARE_READ, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL); - - ok(handle != INVALID_HANDLE_VALUE, "Failed to CreateFile %s\n", pszName); - - res = GetFileInformationByHandle(handle, &finfo); - ok(res, "Expected GetFileInformationByHandle to succeed\n"); - - FileTimeToLocalFileTime(&finfo.ftLastWriteTime, &filetime); - FileTimeToDosDateTime(&filetime, pdate, ptime); - - attrs = GetFileAttributes(pszName); - ok(attrs != INVALID_FILE_ATTRIBUTES, "Failed to GetFileAttributes\n"); - - return (INT_PTR)handle; -} - -static void add_file(HFCI hfci, char *file) -{ - char path[MAX_PATH]; - BOOL res; - - lstrcpyA(path, CURR_DIR); - lstrcatA(path, "\\"); - lstrcatA(path, file); - - res = FCIAddFile(hfci, path, file, FALSE, get_next_cabinet, progress, - get_open_info, tcompTYPE_MSZIP); - ok(res, "Expected FCIAddFile to succeed\n"); -} - -static void set_cab_parameters(PCCAB pCabParams) -{ - ZeroMemory(pCabParams, sizeof(CCAB)); - - pCabParams->cb = MEDIA_SIZE; - pCabParams->cbFolderThresh = FOLDER_THRESHOLD; - pCabParams->setID = 0xbeef; - lstrcpyA(pCabParams->szCabPath, CURR_DIR); - lstrcatA(pCabParams->szCabPath, "\\"); - lstrcpyA(pCabParams->szCab, "extract.cab"); -} - -static void create_cab_file(void) -{ - CCAB cabParams; - HFCI hfci; - ERF erf; - static CHAR a_txt[] = "a.txt", - b_txt[] = "b.txt", - testdir_c_txt[] = "testdir\\c.txt", - testdir_d_txt[] = "testdir\\d.txt"; - BOOL res; - - set_cab_parameters(&cabParams); - - hfci = FCICreate(&erf, file_placed, mem_alloc, mem_free, fci_open, - fci_read, fci_write, fci_close, fci_seek, fci_delete, - get_temp_file, &cabParams, NULL); - - ok(hfci != NULL, "Failed to create an FCI context\n"); - - add_file(hfci, a_txt); - add_file(hfci, b_txt); - add_file(hfci, testdir_c_txt); - add_file(hfci, testdir_d_txt); - - res = FCIFlushCabinet(hfci, FALSE, get_next_cabinet, progress); - ok(res, "Failed to flush the cabinet\n"); - - res = FCIDestroy(hfci); - ok(res, "Failed to destroy the cabinet\n"); -} - -static void test_ExtractFiles(void) -{ - HRESULT hr; - char destFolder[MAX_PATH]; - - lstrcpyA(destFolder, CURR_DIR); - lstrcatA(destFolder, "\\"); - lstrcatA(destFolder, "dest"); - - /* try NULL cab file */ - hr = pExtractFiles(NULL, destFolder, 0, NULL, NULL, 0); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr); - ok(RemoveDirectoryA("dest"), "Expected dest to exist\n"); - - /* try NULL destination */ - hr = pExtractFiles("extract.cab", NULL, 0, NULL, NULL, 0); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr); - ok(!RemoveDirectoryA("dest"), "Expected dest to not exist\n"); - - /* extract all files in the cab to nonexistent destination directory */ - hr = pExtractFiles("extract.cab", destFolder, 0, NULL, NULL, 0); - ok(hr == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) || - hr == E_FAIL, /* win95 */ - "Expected %08x or %08x, got %08x\n", E_FAIL, - HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), hr); - ok(!DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to not exist\n"); - ok(!DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to not exist\n"); - ok(!RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to not exist\n"); - ok(!RemoveDirectoryA("dest"), "Expected dest to not exist\n"); - - /* extract all files in the cab to the destination directory */ - CreateDirectoryA("dest", NULL); - hr = pExtractFiles("extract.cab", destFolder, 0, NULL, NULL, 0); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); - ok(DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to exist\n"); - ok(DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to exist\n"); - ok(DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n"); - ok(DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to exist\n"); - ok(RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to exist\n"); - - /* extract all files to a relative destination directory */ - hr = pExtractFiles("extract.cab", "dest", 0, NULL, NULL, 0); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); - ok(DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to exist\n"); - ok(DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to exist\n"); - ok(DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n"); - ok(DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to exist\n"); - ok(RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to exist\n"); - - /* only extract two of the files from the cab */ - hr = pExtractFiles("extract.cab", "dest", 0, "a.txt:testdir\\c.txt", NULL, 0); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); - ok(DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to exist\n"); - ok(DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n"); - ok(RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to exist\n"); - ok(!DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to not exist\n"); - ok(!DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to not exist\n"); - - /* use valid chars before and after file list */ - hr = pExtractFiles("extract.cab", "dest", 0, " :\t: a.txt:testdir\\c.txt \t:", NULL, 0); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); - ok(DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to exist\n"); - ok(DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n"); - ok(RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to exist\n"); - ok(!DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to not exist\n"); - ok(!DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to not exist\n"); - - /* use invalid chars before and after file list */ - hr = pExtractFiles("extract.cab", "dest", 0, " +-\\ a.txt:testdir\\c.txt a_:", NULL, 0); - ok(hr == E_FAIL, "Expected E_FAIL, got %d\n", hr); - ok(!DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to not exist\n"); - ok(!DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to not exist\n"); - ok(!RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to not exist\n"); - - /* try an empty file list */ - hr = pExtractFiles("extract.cab", "dest", 0, "", NULL, 0); - ok(hr == E_FAIL, "Expected E_FAIL, got %d\n", hr); - ok(!DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to not exist\n"); - ok(!RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to not exist\n"); - - /* try a nonexistent file in the file list */ - hr = pExtractFiles("extract.cab", "dest", 0, "a.txt:idontexist:testdir\\c.txt", NULL, 0); - ok(hr == E_FAIL, "Expected E_FAIL, got %d\n", hr); - ok(!DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to not exist\n"); - ok(!DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to not exist\n"); - ok(!RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to not exist\n"); -} - -static void test_AdvInstallFile(void) -{ - HRESULT hr; - HMODULE hmod; - char CURR_DIR[MAX_PATH]; - char destFolder[MAX_PATH]; - - hmod = LoadLibrary("setupapi.dll"); - if (!hmod) - { - skip("setupapi.dll not present\n"); - return; - } - - FreeLibrary(hmod); - - GetCurrentDirectoryA(MAX_PATH, CURR_DIR); - - lstrcpyA(destFolder, CURR_DIR); - lstrcatA(destFolder, "\\"); - lstrcatA(destFolder, "dest"); - - createTestFile("source.txt"); - - /* try invalid source directory */ - hr = pAdvInstallFile(NULL, NULL, "source.txt", destFolder, "destination.txt", 0, 0); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr); - ok(!DeleteFileA("dest\\destination.txt"), "Expected dest\\destination.txt to not exist\n"); - - /* try invalid source file */ - hr = pAdvInstallFile(NULL, CURR_DIR, NULL, destFolder, "destination.txt", 0, 0); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr); - ok(!DeleteFileA("dest\\destination.txt"), "Expected dest\\destination.txt to not exist\n"); - - /* try invalid destination directory */ - hr = pAdvInstallFile(NULL, CURR_DIR, "source.txt", NULL, "destination.txt", 0, 0); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr); - ok(!DeleteFileA("dest\\destination.txt"), "Expected dest\\destination.txt to not exist\n"); - - /* try copying to nonexistent destination directory */ - hr = pAdvInstallFile(NULL, CURR_DIR, "source.txt", destFolder, "destination.txt", 0, 0); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); - ok(DeleteFileA("dest\\destination.txt"), "Expected dest\\destination.txt to exist\n"); - - /* native windows screws up if the source file doesn't exist */ - - /* test AIF_NOOVERWRITE behavior, asks the user to overwrite if AIF_QUIET is not specified */ - createTestFile("dest\\destination.txt"); - hr = pAdvInstallFile(NULL, CURR_DIR, "source.txt", destFolder, - "destination.txt", AIF_NOOVERWRITE | AIF_QUIET, 0); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); - ok(DeleteFileA("dest\\destination.txt"), "Expected dest\\destination.txt to exist\n"); - ok(RemoveDirectoryA("dest"), "Expected dest to exist\n"); - - DeleteFileA("source.txt"); -} - -START_TEST(files) -{ - DWORD len; - char temp_path[MAX_PATH], prev_path[MAX_PATH]; - - init_function_pointers(); - - GetCurrentDirectoryA(MAX_PATH, prev_path); - GetTempPath(MAX_PATH, temp_path); - SetCurrentDirectoryA(temp_path); - - lstrcpyA(CURR_DIR, temp_path); - len = lstrlenA(CURR_DIR); - - if(len && (CURR_DIR[len - 1] == '\\')) - CURR_DIR[len - 1] = 0; - - create_test_files(); - create_cab_file(); - - test_AddDelBackupEntry(); - test_ExtractFiles(); - test_AdvInstallFile(); - - delete_test_files(); - - FreeLibrary(hAdvPack); - SetCurrentDirectoryA(prev_path); -} diff --git a/rostests/winetests/advpack/install.c b/rostests/winetests/advpack/install.c deleted file mode 100644 index 3b0954fcf23..00000000000 --- a/rostests/winetests/advpack/install.c +++ /dev/null @@ -1,292 +0,0 @@ -/* - * Unit tests for advpack.dll install functions - * - * Copyright (C) 2006 James Hawkins - * - * 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 "wine/test.h" - -static HMODULE hAdvPack; -/* function pointers */ -static HRESULT (WINAPI *pRunSetupCommand)(HWND, LPCSTR, LPCSTR, LPCSTR, LPCSTR, HANDLE*, DWORD, LPVOID); -static HRESULT (WINAPI *pLaunchINFSection)(HWND, HINSTANCE, LPSTR, INT); -static HRESULT (WINAPI *pLaunchINFSectionEx)(HWND, HINSTANCE, LPSTR, INT); - -static char CURR_DIR[MAX_PATH]; - -static BOOL init_function_pointers(void) -{ - hAdvPack = LoadLibraryA("advpack.dll"); - if (!hAdvPack) - return FALSE; - - pRunSetupCommand = (void *)GetProcAddress(hAdvPack, "RunSetupCommand"); - pLaunchINFSection = (void *)GetProcAddress(hAdvPack, "LaunchINFSection"); - pLaunchINFSectionEx = (void *)GetProcAddress(hAdvPack, "LaunchINFSectionEx"); - - if (!pRunSetupCommand || !pLaunchINFSection || !pLaunchINFSectionEx) - return FALSE; - - return TRUE; -} - -static BOOL is_spapi_err(DWORD err) -{ - const DWORD SPAPI_PREFIX = 0x800F0000L; - const DWORD SPAPI_MASK = 0xFFFF0000L; - - return (((err & SPAPI_MASK) ^ SPAPI_PREFIX) == 0); -} - -static void create_inf_file(LPCSTR filename) -{ - DWORD dwNumberOfBytesWritten; - HANDLE hf = CreateFile(filename, GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - - static const char data[] = - "[Version]\n" - "Signature=\"$Chicago$\"\n" - "AdvancedINF=2.5\n" - "[DefaultInstall]\n" - "CheckAdminRights=1\n"; - - WriteFile(hf, data, sizeof(data) - 1, &dwNumberOfBytesWritten, NULL); - CloseHandle(hf); -} - -static void test_RunSetupCommand(void) -{ - HRESULT hr; - HANDLE hexe; - char path[MAX_PATH]; - char dir[MAX_PATH]; - char systemdir[MAX_PATH]; - - GetSystemDirectoryA(systemdir, sizeof(systemdir)); - - /* try an invalid cmd name */ - hr = pRunSetupCommand(NULL, NULL, "Install", "Dir", "Title", NULL, 0, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr); - - /* try an invalid directory */ - hr = pRunSetupCommand(NULL, "winver.exe", "Install", NULL, "Title", NULL, 0, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr); - - /* try to run a nonexistent exe */ - hexe = (HANDLE)0xdeadbeef; - hr = pRunSetupCommand(NULL, "idontexist.exe", "Install", systemdir, "Title", &hexe, 0, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr); - ok(hexe == NULL, "Expcted hexe to be NULL\n"); - ok(!TerminateProcess(hexe, 0), "Expected TerminateProcess to fail\n"); - - /* try a bad directory */ - hexe = (HANDLE)0xdeadbeef; - hr = pRunSetupCommand(NULL, "winver.exe", "Install", "non\\existent\\directory", "Title", &hexe, 0, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_DIRECTORY), - "Expected HRESULT_FROM_WIN32(ERROR_DIRECTORY), got %d\n", hr); - ok(hexe == NULL, "Expcted hexe to be NULL\n"); - ok(!TerminateProcess(hexe, 0), "Expected TerminateProcess to fail\n"); - - /* try to run an exe with the RSC_FLAG_INF flag */ - hexe = (HANDLE)0xdeadbeef; - hr = pRunSetupCommand(NULL, "winver.exe", "Install", systemdir, "Title", &hexe, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(is_spapi_err(hr) || - hr == E_FAIL, /* win9x */ - "Expected a setupapi error or E_FAIL, got %d\n", hr); - ok(hexe == (HANDLE)0xdeadbeef, "Expected hexe to be 0xdeadbeef\n"); - ok(!TerminateProcess(hexe, 0), "Expected TerminateProcess to fail\n"); - - /* run winver.exe */ - hexe = (HANDLE)0xdeadbeef; - hr = pRunSetupCommand(NULL, "winver.exe", "Install", systemdir, "Title", &hexe, 0, NULL); - ok(hr == S_ASYNCHRONOUS, "Expected S_ASYNCHRONOUS, got %d\n", hr); - ok(hexe != NULL, "Expected hexe to be non-NULL\n"); - ok(TerminateProcess(hexe, 0), "Expected TerminateProcess to succeed\n"); - - CreateDirectoryA("one", NULL); - create_inf_file("one\\test.inf"); - - /* try a full path to the INF, with working dir provided */ - lstrcpy(path, CURR_DIR); - lstrcat(path, "\\one\\test.inf"); - lstrcpy(dir, CURR_DIR); - lstrcat(dir, "\\one"); - hr = pRunSetupCommand(NULL, path, "DefaultInstall", dir, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", hr); - - /* try a full path to the INF, NULL working dir */ - hr = pRunSetupCommand(NULL, path, "DefaultInstall", NULL, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), - "Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %d\n", hr); - - /* try a full path to the INF, empty working dir */ - hr = pRunSetupCommand(NULL, path, "DefaultInstall", "", "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", hr); - - /* try a relative path to the INF, with working dir provided */ - hr = pRunSetupCommand(NULL, "one\\test.inf", "DefaultInstall", dir, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == ERROR_SUCCESS || - hr == E_FAIL, /* win9x */ - "Expected ERROR_SUCCESS, got %d\n", hr); - - /* try a relative path to the INF, NULL working dir */ - hr = pRunSetupCommand(NULL, "one\\test.inf", "DefaultInstall", NULL, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), - "Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %d\n", hr); - - /* try a relative path to the INF, empty working dir */ - hr = pRunSetupCommand(NULL, "one\\test.inf", "DefaultInstall", "", "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == ERROR_SUCCESS || - hr == E_FAIL, /* win9x */ - "Expected ERROR_SUCCESS or E_FAIL, got %d\n", hr); - - /* try only the INF filename, with working dir provided */ - hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", dir, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || - hr == E_FAIL, /* win9x */ - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) or E_FAIL, got %d\n", hr); - - /* try only the INF filename, NULL working dir */ - hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", NULL, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), - "Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %d\n", hr); - - /* try only the INF filename, empty working dir */ - hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", "", "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || - hr == E_FAIL, /* win9x */ - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) or E_FAIL, got %d\n", hr); - - DeleteFileA("one\\test.inf"); - RemoveDirectoryA("one"); - - create_inf_file("test.inf"); - - /* try INF file in the current directory, working directory provided */ - hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", CURR_DIR, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || - hr == E_FAIL, /* win9x */ - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) or E_FAIL, got %d\n", hr); - - /* try INF file in the current directory, NULL working directory */ - hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", NULL, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), - "Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %d\n", hr); - - /* try INF file in the current directory, empty working directory */ - hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", CURR_DIR, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || - hr == E_FAIL, /* win9x */ - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) or E_FAIL, got %d\n", hr); -} - -static void test_LaunchINFSection(void) -{ - HRESULT hr; - char cmdline[MAX_PATH]; - static char file[] = "test.inf,DefaultInstall,4,0"; - - /* The 'No UI' flag seems to have no effect whatsoever on Windows. - * So only do this test in interactive mode. - */ - if (winetest_interactive) - { - /* try an invalid cmdline */ - hr = pLaunchINFSection(NULL, NULL, NULL, 0); - ok(hr == 1, "Expected 1, got %d\n", hr); - } - - CreateDirectoryA("one", NULL); - create_inf_file("one\\test.inf"); - - /* try a full path to the INF */ - lstrcpy(cmdline, CURR_DIR); - lstrcat(cmdline, "\\"); - lstrcat(cmdline, "one\\test.inf,DefaultInstall,,4"); - hr = pLaunchINFSection(NULL, NULL, cmdline, 0); - ok(hr == 0, "Expected 0, got %d\n", hr); - - DeleteFileA("one\\test.inf"); - RemoveDirectoryA("one"); - - create_inf_file("test.inf"); - - /* try just the INF filename */ - hr = pLaunchINFSection(NULL, NULL, file, 0); - ok(hr == 0, "Expected 0, got %d\n", hr); - - DeleteFileA("test.inf"); -} - -static void test_LaunchINFSectionEx(void) -{ - HRESULT hr; - char cmdline[MAX_PATH]; - - create_inf_file("test.inf"); - - /* try an invalid CAB filename with an absolute INF name */ - lstrcpy(cmdline, CURR_DIR); - lstrcat(cmdline, "\\"); - lstrcat(cmdline, "test.inf,DefaultInstall,c:imacab.cab,4"); - hr = pLaunchINFSectionEx(NULL, NULL, cmdline, 0); - ok(hr == 0, "Expected 0, got %d\n", hr); - - /* The 'No UI' flag seems to have no effect whatsoever on Windows. - * So only do this test in interactive mode. - */ - if (winetest_interactive) - { - /* try an invalid CAB filename with a relative INF name */ - lstrcpy(cmdline, "test.inf,DefaultInstall,c:imacab.cab,4"); - hr = pLaunchINFSectionEx(NULL, NULL, cmdline, 0); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr); - } - - DeleteFileA("test.inf"); -} - -START_TEST(install) -{ - DWORD len; - char temp_path[MAX_PATH], prev_path[MAX_PATH]; - - if (!init_function_pointers()) - return; - - GetCurrentDirectoryA(MAX_PATH, prev_path); - GetTempPath(MAX_PATH, temp_path); - SetCurrentDirectoryA(temp_path); - - lstrcpyA(CURR_DIR, temp_path); - len = lstrlenA(CURR_DIR); - - if(len && (CURR_DIR[len - 1] == '\\')) - CURR_DIR[len - 1] = 0; - - test_RunSetupCommand(); - test_LaunchINFSection(); - test_LaunchINFSectionEx(); - - FreeLibrary(hAdvPack); - SetCurrentDirectoryA(prev_path); -} diff --git a/rostests/winetests/advpack/testlist.c b/rostests/winetests/advpack/testlist.c deleted file mode 100644 index 3999a51fceb..00000000000 --- a/rostests/winetests/advpack/testlist.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_advpack(void); -extern void func_files(void); -extern void func_install(void); - -const struct test winetest_testlist[] = -{ - { "advpack", func_advpack }, - { "files", func_files }, - { "install", func_install }, - { 0, 0 } -}; diff --git a/rostests/winetests/amstream/CMakeLists.txt b/rostests/winetests/amstream/CMakeLists.txt deleted file mode 100644 index 4c1082cd403..00000000000 --- a/rostests/winetests/amstream/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ - -add_definitions(-D_DLL -D__USE_CRTIMP) -add_executable(amstream_winetest amstream.c testlist.c) -target_link_libraries(amstream_winetest wine uuid) -set_module_type(amstream_winetest win32cui) -add_importlibs(amstream_winetest ole32 user32 ddraw msvcrt kernel32 ntdll) -add_dependencies(amstream_winetest dxsdk) -add_cd_file(TARGET amstream_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/amstream/amstream.c b/rostests/winetests/amstream/amstream.c deleted file mode 100644 index f59bc060d78..00000000000 --- a/rostests/winetests/amstream/amstream.c +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Unit tests for MultiMedia Stream functions - * - * Copyright (C) 2009 Christian Costa - * - * 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 COBJMACROS - -#include "wine/test.h" -#include "initguid.h" -#include "amstream.h" - -#define FILE_LEN 9 -static const char fileA[FILE_LEN] = "test.avi"; - -IAMMultiMediaStream* pams; -IDirectDraw7* pdd7 = NULL; -IDirectDrawSurface7* pdds7 = NULL; - -static int create_ammultimediastream(void) -{ - return S_OK == CoCreateInstance( - &CLSID_AMMultiMediaStream, NULL, CLSCTX_INPROC_SERVER, &IID_IAMMultiMediaStream, (LPVOID*)&pams); -} - -static void release_ammultimediastream(void) -{ - IAMMultiMediaStream_Release(pams); -} - -static int create_directdraw(void) -{ - HRESULT hr; - IDirectDraw* pdd = NULL; - DDSURFACEDESC2 ddsd; - - hr = DirectDrawCreate(NULL, &pdd, NULL); - ok(hr==DD_OK, "DirectDrawCreate returned: %x\n", hr); - if (hr != DD_OK) - goto error; - - hr = IDirectDraw_QueryInterface(pdd, &IID_IDirectDraw7, (LPVOID*)&pdd7); - ok(hr==DD_OK, "QueryInterface returned: %x\n", hr); - if (hr != DD_OK) goto error; - - hr = IDirectDraw7_SetCooperativeLevel(pdd7, GetDesktopWindow(), DDSCL_NORMAL); - ok(hr==DD_OK, "SetCooperativeLevel returned: %x\n", hr); - - ZeroMemory(&ddsd, sizeof(ddsd)); - ddsd.dwSize = sizeof(ddsd); - ddsd.dwFlags = DDSD_CAPS; - ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; - hr = IDirectDraw7_CreateSurface(pdd7, &ddsd, &pdds7, NULL); - ok(hr==DD_OK, "CreateSurface returned: %x\n", hr); - - return TRUE; - -error: - if (pdds7) - IDirectDrawSurface7_Release(pdds7); - if (pdd7) - IDirectDraw7_Release(pdd7); - if (pdd) - IDirectDraw_Release(pdd); - - return FALSE; -} - -static void release_directdraw(void) -{ - IDirectDrawSurface7_Release(pdds7); - IDirectDraw7_Release(pdd7); -} - -static void test_openfile(void) -{ - HANDLE h; - HRESULT hr; - WCHAR fileW[FILE_LEN]; - IGraphBuilder* pgraph; - - if (!create_ammultimediastream()) - return; - - h = CreateFileA(fileA, 0, 0, NULL, OPEN_EXISTING, 0, NULL); - if (h == INVALID_HANDLE_VALUE) { - release_ammultimediastream(); - return; - } - - MultiByteToWideChar(CP_ACP, 0, fileA, -1, fileW, FILE_LEN); - - hr = IAMMultiMediaStream_GetFilterGraph(pams, &pgraph); - ok(hr==S_OK, "IAMMultiMediaStream_GetFilterGraph returned: %x\n", hr); - ok(pgraph==NULL, "Filtergraph should not be created yet\n"); - - if (pgraph) - IGraphBuilder_Release(pgraph); - - hr = IAMMultiMediaStream_OpenFile(pams, fileW, 0); - ok(hr==S_OK, "IAMMultiMediaStream_OpenFile returned: %x\n", hr); - - hr = IAMMultiMediaStream_GetFilterGraph(pams, &pgraph); - ok(hr==S_OK, "IAMMultiMediaStream_GetFilterGraph returned: %x\n", hr); - ok(pgraph!=NULL, "Filtergraph should be created\n"); - - if (pgraph) - IGraphBuilder_Release(pgraph); - - release_ammultimediastream(); -} - -static void renderfile(const char * fileA) -{ - HRESULT hr; - WCHAR fileW[FILE_LEN]; - IMediaStream *pvidstream = NULL; - IDirectDrawMediaStream *pddstream = NULL; - IDirectDrawStreamSample *pddsample = NULL; - - if (!create_directdraw()) - return; - - MultiByteToWideChar(CP_ACP, 0, fileA, -1, fileW, FILE_LEN); - - hr = IAMMultiMediaStream_Initialize(pams, STREAMTYPE_READ, 0, NULL); - ok(hr==S_OK, "IAMMultiMediaStream_Initialize returned: %x\n", hr); - - hr = IAMMultiMediaStream_AddMediaStream(pams, (IUnknown*)pdd7, &MSPID_PrimaryVideo, 0, NULL); - ok(hr==S_OK, "IAMMultiMediaStream_AddMediaStream returned: %x\n", hr); - - hr = IAMMultiMediaStream_AddMediaStream(pams, NULL, &MSPID_PrimaryAudio, AMMSF_ADDDEFAULTRENDERER, NULL); - ok(hr==S_OK, "IAMMultiMediaStream_AddMediaStream returned: %x\n", hr); - - hr = IAMMultiMediaStream_OpenFile(pams, fileW, 0); - ok(hr==S_OK, "IAMMultiMediaStream_OpenFile returned: %x\n", hr); - - hr = IAMMultiMediaStream_GetMediaStream(pams, &MSPID_PrimaryVideo, &pvidstream); - ok(hr==S_OK, "IAMMultiMediaStream_GetMediaStream returned: %x\n", hr); - if (FAILED(hr)) goto error; - - hr = IMediaStream_QueryInterface(pvidstream, &IID_IDirectDrawMediaStream, (LPVOID*)&pddstream); - ok(hr==S_OK, "IMediaStream_QueryInterface returned: %x\n", hr); - if (FAILED(hr)) goto error; - - hr = IDirectDrawMediaStream_CreateSample(pddstream, NULL, NULL, 0, &pddsample); - todo_wine ok(hr==S_OK, "IDirectDrawMediaStream_CreateSample returned: %x\n", hr); - -error: - if (pddsample) - IDirectDrawMediaSample_Release(pddsample); - if (pddstream) - IDirectDrawMediaStream_Release(pddstream); - if (pvidstream) - IMediaStream_Release(pvidstream); - - release_directdraw(); -} - -static void test_render(void) -{ - HANDLE h; - - if (!create_ammultimediastream()) - return; - - h = CreateFileA(fileA, 0, 0, NULL, OPEN_EXISTING, 0, NULL); - if (h != INVALID_HANDLE_VALUE) { - CloseHandle(h); - renderfile(fileA); - } - - release_ammultimediastream(); -} - -START_TEST(amstream) -{ - CoInitializeEx(NULL, COINIT_MULTITHREADED); - test_openfile(); - test_render(); - CoUninitialize(); -} diff --git a/rostests/winetests/amstream/amstream.rbuild b/rostests/winetests/amstream/amstream.rbuild deleted file mode 100644 index 27305d62dce..00000000000 --- a/rostests/winetests/amstream/amstream.rbuild +++ /dev/null @@ -1,15 +0,0 @@ - - - - - . - wine - ole32 - user32 - uuid - ntdll - ddraw - amstream.c - testlist.c - - diff --git a/rostests/winetests/amstream/testlist.c b/rostests/winetests/amstream/testlist.c deleted file mode 100644 index e0d0fd31862..00000000000 --- a/rostests/winetests/amstream/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_amstream(void); - -const struct test winetest_testlist[] = -{ - { "amstream", func_amstream }, - { 0, 0 } -}; diff --git a/rostests/winetests/atl/CMakeLists.txt b/rostests/winetests/atl/CMakeLists.txt deleted file mode 100644 index 2bf8a126de8..00000000000 --- a/rostests/winetests/atl/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ - -add_definitions(-D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - atl_ax.c - module.c - testlist.c) - -add_executable(atl_winetest ${SOURCE}) - -target_link_libraries(atl_winetest wine uuid) - -set_module_type(atl_winetest win32cui) -add_importlibs(atl_winetest ole32 user32 atl msvcrt kernel32 ntdll) -add_cd_file(TARGET atl_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/atl/atl.rbuild b/rostests/winetests/atl/atl.rbuild deleted file mode 100644 index b158bd5ac2c..00000000000 --- a/rostests/winetests/atl/atl.rbuild +++ /dev/null @@ -1,16 +0,0 @@ - - - - - . - wine - ole32 - user32 - uuid - ntdll - atl - atl_ax.c - module.c - testlist.c - - diff --git a/rostests/winetests/atl/atl_ax.c b/rostests/winetests/atl/atl_ax.c deleted file mode 100644 index 8b9966c26df..00000000000 --- a/rostests/winetests/atl/atl_ax.c +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Unit tests for Active Template Library ActiveX functions - * - * Copyright 2010 Andrew Nguyen - * - * 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 - -#define COBJMACROS - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -HRESULT WINAPI AtlAxAttachControl(IUnknown *, HWND, IUnknown **); - -static ATOM register_class(void) -{ - WNDCLASSA wndclassA; - - wndclassA.style = 0; - wndclassA.lpfnWndProc = DefWindowProc; - wndclassA.cbClsExtra = 0; - wndclassA.cbWndExtra = 0; - wndclassA.hInstance = GetModuleHandleA(NULL); - wndclassA.hIcon = NULL; - wndclassA.hCursor = LoadCursorA(NULL, IDC_ARROW); - wndclassA.hbrBackground = (HBRUSH)(COLOR_BTNFACE+1); - wndclassA.lpszMenuName = NULL; - wndclassA.lpszClassName = "WineAtlTestClass"; - - return RegisterClassA(&wndclassA); -} - -static void test_AtlAxAttachControl(void) -{ - HWND hwnd = CreateWindowA("WineAtlTestClass", "Wine ATL Test Window", 0, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - CW_USEDEFAULT, NULL, NULL, NULL, NULL); - HRESULT hr; - IUnknown *pObj, *pContainer; - - hr = AtlAxAttachControl(NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08x\n", hr); - - pContainer = (IUnknown *)0xdeadbeef; - hr = AtlAxAttachControl(NULL, NULL, &pContainer); - ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08x\n", hr); - ok(pContainer == (IUnknown *)0xdeadbeef, - "Expected the output container pointer to be untouched, got %p\n", pContainer); - - hr = AtlAxAttachControl(NULL, hwnd, NULL); - ok(hr == E_INVALIDARG, "Expected AtlAxAttachControl to return E_INVALIDARG, got 0x%08x\n", hr); - - hr = CoCreateInstance(&CLSID_WebBrowser, NULL, CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER, - &IID_IOleObject, (void **)&pObj); - ok(hr == S_OK, "Expected CoCreateInstance to return S_OK, got 0x%08x\n", hr); - - if (FAILED(hr)) - { - skip("Couldn't obtain a test IOleObject instance\n"); - return; - } - - hr = AtlAxAttachControl(pObj, NULL, NULL); - todo_wine - ok(hr == S_FALSE, "Expected AtlAxAttachControl to return S_FALSE, got 0x%08x\n", hr); - - pContainer = (IUnknown *)0xdeadbeef; - hr = AtlAxAttachControl(pObj, NULL, &pContainer); - todo_wine - ok(hr == S_FALSE, "Expected AtlAxAttachControl to return S_FALSE, got 0x%08x\n", hr); - ok(pContainer != (IUnknown *)0xdeadbeef && - pContainer != NULL, - "Expected the output container pointer to be initialized to non-NULL, got %p\n", pContainer); - - if (pContainer != (IUnknown *)0xdeadbeef && pContainer != NULL) - IUnknown_Release(pContainer); - - hr = AtlAxAttachControl(pObj, hwnd, NULL); - ok(hr == S_OK, "Expected AtlAxAttachControl to return S_OK, got 0x%08x\n", hr); - - IUnknown_Release(pObj); - - DestroyWindow(hwnd); -} - -START_TEST(atl_ax) -{ - if (!register_class()) - return; - - CoInitialize(NULL); - - test_AtlAxAttachControl(); - - CoUninitialize(); -} diff --git a/rostests/winetests/atl/module.c b/rostests/winetests/atl/module.c deleted file mode 100644 index 294d87b8629..00000000000 --- a/rostests/winetests/atl/module.c +++ /dev/null @@ -1,104 +0,0 @@ -/* - * ATL test program - * - * Copyright 2010 Marcus Meissner - * - * - * 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 - -#define COBJMACROS - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -struct _ATL_OBJMAP_ENTRYW; -struct _AtlCreateWndData; -struct _ATL_TERMFUNC_ELEM; - -struct _ATL_MODULEW -{ - UINT cbSize; - HINSTANCE m_hInst; - HINSTANCE m_hInstResource; - HINSTANCE m_hInstTypeLib; - struct _ATL_OBJMAP_ENTRYW* m_pObjMap; - LONG m_nLockCnt; - HANDLE m_hHeap; - union - { - CRITICAL_SECTION m_csTypeInfoHolder; - CRITICAL_SECTION m_csStaticDataInit; - } u; - CRITICAL_SECTION m_csWindowCreate; - CRITICAL_SECTION m_csObjMap; - - DWORD dwAtlBuildVer; - struct _AtlCreateWndData* m_pCreateWndList; - BOOL m_bDestroyHeap; - GUID* pguidVer; - DWORD m_dwHeaps; - HANDLE* m_phHeaps; - int m_nHeap; - struct _ATL_TERMFUNC_ELEM* m_pTermFuncs; -}; - -HRESULT WINAPI AtlModuleInit(struct _ATL_MODULEW* pM, struct _ATL_OBJMAP_ENTRYW* p, HINSTANCE h); - -#define MAXSIZE 512 -static void test_StructSize(void) -{ - struct _ATL_MODULEW *tst; - HRESULT hres; - int i; - - tst = HeapAlloc (GetProcessHeap(),HEAP_ZERO_MEMORY,MAXSIZE); - - for (i=0;icbSize = i; - hres = AtlModuleInit(tst, NULL, NULL); - - switch (i) { - case FIELD_OFFSET( struct _ATL_MODULEW, dwAtlBuildVer ): - case sizeof(struct _ATL_MODULEW): -#ifdef _WIN64 - case sizeof(struct _ATL_MODULEW) + sizeof(void *): -#endif - ok (hres == S_OK, "AtlModuleInit with %d failed (0x%x).\n", i, (int)hres); - break; - default: - ok (FAILED(hres), "AtlModuleInit with %d succeeded? (0x%x).\n", i, (int)hres); - break; - } - } -} - -START_TEST(module) -{ - test_StructSize(); -} diff --git a/rostests/winetests/atl/testlist.c b/rostests/winetests/atl/testlist.c deleted file mode 100644 index aa47da7c3f1..00000000000 --- a/rostests/winetests/atl/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_module(void); - -const struct test winetest_testlist[] = -{ - { "module", func_module }, - { 0, 0 } -}; diff --git a/rostests/winetests/avifil32/CMakeLists.txt b/rostests/winetests/avifil32/CMakeLists.txt deleted file mode 100644 index 0b8b6f45a9e..00000000000 --- a/rostests/winetests/avifil32/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ - -add_definitions(-D_DLL -D__USE_CRTIMP) -add_executable(avifil32_winetest api.c testlist.c) -target_link_libraries(avifil32_winetest wine) -set_module_type(avifil32_winetest win32cui) -add_importlibs(avifil32_winetest avifil32 msvcrt kernel32) -add_cd_file(TARGET avifil32_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/avifil32/api.c b/rostests/winetests/avifil32/api.c deleted file mode 100644 index fe295bfb1af..00000000000 --- a/rostests/winetests/avifil32/api.c +++ /dev/null @@ -1,461 +0,0 @@ -/* - * Unit test suite for AVI Functions - * - * Copyright 2008 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 - -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "wingdi.h" -#include "vfw.h" -#include "wine/test.h" - -/* ########################### */ - -static const CHAR winetest0[] = "winetest0"; -static const CHAR winetest1[] = "winetest1"; -static const CHAR testfilename[] = "wine_avifil32_test.avi"; - -/* ########################### */ - -static const DWORD deffh[] = /* file_header */ -{ - FOURCC_RIFF, 0x34c6 /* length */, formtypeAVI, - FOURCC_LIST, 0x1ac /* length */, - listtypeAVIHEADER, ckidAVIMAINHDR, sizeof(MainAVIHeader), -}; - -static const MainAVIHeader defmah = -{ - 0x00008256, /* dwMicroSecPerFrame */ - 0x000080e8, /* dwMaxBytesPerSec */ - 0x00000000, /* dwPaddingGranularity */ - 0x00000910, /* dwFlags */ - 1, /* dwTotalFrames */ - 0, /* dwInitialFrames */ - 2, /* dwStreams */ - 0x00100000, /* dwSuggestedBufferSize*/ - 8, /* dwWidth */ - 6, /* dwHeight */ - { 0, 0, 0, 0 } /* dwReserved[4] */ -}; - -static const AVIStreamHeader defash0 = -{ - streamtypeVIDEO, /* fccType */ - 0x30323449, /* fccHandler */ - 0x00000000, /* dwFlags */ - 0, /* wPriority */ - 0, /* wLanguage */ - 0, /* dwInitialFrames */ - 0x000003e9, /* dwScale */ - 0x00007530, /* dwRate */ - 0, /* dwStart */ - 1, /* dwLength */ - 0x00100000, /* dwSuggestedBufferSize*/ - 0xffffffff, /* dwQuality */ - 0, /* dwSampleSize */ - { 0, 0, 0, 0 } /* short left right top bottom */ -}; - -static const AVIStreamHeader defash1 = -{ - /* AVIStreamHeader */ - streamtypeAUDIO, /* fccType */ - 1, /* fccHandler */ - 0, /* dwFlags */ - 0, /* wPriority */ - 0, /* wLanguage */ - 0, /* dwInitialFrames */ - 1, /* dwScale */ - 0x00002b11, /* dwRate */ - 0, /* dwStart */ - 0x00000665, /* dwLength */ - 0x00003000, /* dwSuggestedBufferSize*/ - 0xffffffff, /* dwQuality */ - 2, /* dwSampleSize */ - { 0, 0, 0, 0 } /* short left right top bottom */ -}; - -static const PCMWAVEFORMAT defpcmwf = -{ - { - 1, /* wFormatTag */ - 2, /* nChannels */ - 11025, /* nSamplesPerSec */ - 22050, /* nAvgBytesPerSec */ - 2, /* nBlockAlign */ - }, - 8, /* wBitsPerSample */ -}; - -typedef struct common_avi_headers { - DWORD fh[sizeof(deffh)]; - MainAVIHeader mah; - AVIStreamHeader ash0; - AVIStreamHeader ash1; - PCMWAVEFORMAT pcmwf; -} COMMON_AVI_HEADERS; - -/* Extra data needed to get the VFW API to load the file */ -/* DWORD deffh */ -/* MainAVIHeader mah */ -static const DWORD streamlist[] = -{ - FOURCC_LIST, 0xd4 /* length */, - listtypeSTREAMHEADER, ckidSTREAMHEADER, 0x38 /* length */, -}; -/* AVIStreamHeader ash0 */ -static const DWORD videostreamformat[] = -{ - ckidSTREAMFORMAT, 0x28 /* length */, - 0x00000028, 0x00000008, 0x00000006, 0x00180001, - 0x30323449, 0x00000090, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, -}; -static const DWORD padding1[] = -{ - ckidAVIPADDING, 0xc /* length */, - 0x00000004, 0x00000000, 0x63643030 -}; -static const DWORD videopropheader[] = -{ - 0x70727076, 0x44 /* length */, - 0x00000000, 0x00000000, - 0x0000001e, 0x00000008, 0x00000006, 0x00100009, - 0x00000008, 0x00000006, 0x00000001, 0x00000006, - 0x00000008, 0x00000006, 0x00000008, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, - FOURCC_LIST, 0x70 /* length */, - listtypeSTREAMHEADER, ckidSTREAMHEADER, 0x38 /* length */, -}; -/* AVIStreamHeader ash1 */ -static const DWORD audiostreamformat_pre[] = -{ - ckidSTREAMFORMAT, sizeof(PCMWAVEFORMAT) /* length */, -}; -/* PCMWAVEFORMAT pcmwf */ -static DWORD data[] = -{ - ckidAVIPADDING, 0xc /* length */, - 0x00000004, 0x00000000, 0x62773130, - ckidAVIPADDING, 0xc /* length */, - 0x6c6d646f, 0x686c6d64, 0x000000f8, - FOURCC_LIST, 0x18 /* length */, - 0x4f464e49, - 0x54465349, 0xc /* length */, - 0x6676614c, 0x332e3235, 0x00302e37, - ckidAVIPADDING, 0x4 /* length */, - 0, - FOURCC_LIST, 0xd1b /* length */, listtypeAVIMOVIE, - 0, 0 -}; - -/* ########################### */ - -static void test_AVISaveOptions(void) -{ - AVICOMPRESSOPTIONS options[2]; - LPAVICOMPRESSOPTIONS poptions[2]; - PAVISTREAM streams[2] = {NULL, NULL}; - HRESULT hres; - DWORD res; - LONG lres; - - poptions[0] = &options[0]; - poptions[1] = &options[1]; - ZeroMemory(options, sizeof(options)); - - SetLastError(0xdeadbeef); - hres = CreateEditableStream(&streams[0], NULL); - ok(hres == AVIERR_OK, "0: got 0x%x and %p (expected AVIERR_OK)\n", hres, streams[0]); - - SetLastError(0xdeadbeef); - hres = CreateEditableStream(&streams[1], NULL); - ok(hres == AVIERR_OK, "1: got 0x%x and %p (expected AVIERR_OK)\n", hres, streams[1]); - - SetLastError(0xdeadbeef); - hres = EditStreamSetNameA(streams[0], winetest0); - todo_wine ok(hres == AVIERR_OK, "0: got 0x%x (expected AVIERR_OK)\n", hres); - - SetLastError(0xdeadbeef); - hres = EditStreamSetNameA(streams[1], winetest1); - todo_wine ok(hres == AVIERR_OK, "1: got 0x%x (expected AVIERR_OK)\n", hres); - - if (winetest_interactive) { - SetLastError(0xdeadbeef); - res = AVISaveOptions(0, ICMF_CHOOSE_DATARATE |ICMF_CHOOSE_KEYFRAME | ICMF_CHOOSE_ALLCOMPRESSORS, - 2, streams, poptions); - trace("got %u with 0x%x/%u\n", res, GetLastError(), GetLastError()); - } - - SetLastError(0xdeadbeef); - lres = AVISaveOptionsFree(2, poptions); - ok(lres == AVIERR_OK, "got 0x%x with 0x%x/%u\n", lres, GetLastError(), GetLastError()); - - SetLastError(0xdeadbeef); - res = AVIStreamRelease(streams[0]); - ok(res == 0, "0: got refcount %u (expected 0)\n", res); - - SetLastError(0xdeadbeef); - res = AVIStreamRelease(streams[1]); - ok(res == 0, "1: got refcount %u (expected 0)\n", res); - -} - -/* ########################### */ - -static void init_test_struct(COMMON_AVI_HEADERS *cah) -{ - memcpy(cah->fh, deffh, sizeof(deffh)); - cah->mah = defmah; - cah->ash0 = defash0; - cah->ash1 = defash1; - cah->pcmwf = defpcmwf; -} - -static void create_avi_file(const COMMON_AVI_HEADERS *cah, char *filename) -{ - HANDLE hFile; - DWORD written; - - hFile = CreateFile(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - - ok(hFile != INVALID_HANDLE_VALUE, "Couldn't create file\n"); - - WriteFile(hFile, &cah->fh, sizeof(deffh), &written, NULL); - WriteFile(hFile, &cah->mah, sizeof(MainAVIHeader), &written, NULL); - WriteFile(hFile, streamlist, sizeof(streamlist), &written, NULL); - WriteFile(hFile, &cah->ash0, 0x38, &written, NULL); - WriteFile(hFile, videostreamformat, sizeof(videostreamformat), &written, NULL); - WriteFile(hFile, padding1, sizeof(padding1), &written, NULL); - WriteFile(hFile, videopropheader, sizeof(videopropheader), &written, NULL); - WriteFile(hFile, &cah->ash1, 0x38, &written, NULL); - WriteFile(hFile, audiostreamformat_pre, sizeof(audiostreamformat_pre), &written, NULL); - WriteFile(hFile, &cah->pcmwf, sizeof(PCMWAVEFORMAT), &written, NULL); - WriteFile(hFile, data, sizeof(data), &written, NULL); - - CloseHandle(hFile); -} - -static void test_default_data(void) -{ - COMMON_AVI_HEADERS cah; - char filename[MAX_PATH]; - PAVIFILE pFile; - int res; - LONG lSize; - PAVISTREAM pStream0; - PAVISTREAM pStream1; - AVISTREAMINFO asi0; - AVISTREAMINFO asi1; - WAVEFORMATEX wfx; - - GetTempPath(MAX_PATH, filename); - strcpy(filename+strlen(filename), testfilename); - - init_test_struct(&cah); - create_avi_file(&cah, filename); - - res = AVIFileOpen(&pFile, filename, OF_SHARE_DENY_WRITE, 0L); - ok(res != AVIERR_BADFORMAT, "Unable to open file: error1=%u\n", AVIERR_BADFORMAT); - ok(res != AVIERR_MEMORY, "Unable to open file: error2=%u\n", AVIERR_MEMORY); - ok(res != AVIERR_FILEREAD, "Unable to open file: error3=%u\n", AVIERR_FILEREAD); - ok(res != AVIERR_FILEOPEN, "Unable to open file: error4=%u\n", AVIERR_FILEOPEN); - ok(res != REGDB_E_CLASSNOTREG, "Unable to open file: error5=%u\n", REGDB_E_CLASSNOTREG); - ok(res == 0, "Unable to open file: error=%u\n", res); - - res = AVIFileGetStream(pFile, &pStream0, 0, 0); - ok(res == 0, "Unable to open video stream: error=%u\n", res); - - res = AVIFileGetStream(pFile, &pStream1, 0, 1); - ok(res == 0, "Unable to open audio stream: error=%u\n", res); - - res = AVIStreamInfo(pStream0, &asi0, sizeof(AVISTREAMINFO)); - ok(res == 0, "Unable to read stream info: error=%u\n", res); - - res = AVIStreamInfo(pStream1, &asi1, sizeof(AVISTREAMINFO)); - ok(res == 0, "Unable to read stream info: error=%u\n", res); - - res = AVIStreamReadFormat(pStream0, AVIStreamStart(pStream1), NULL, &lSize); - ok(res == 0, "Unable to read format size: error=%u\n", res); - - res = AVIStreamReadFormat(pStream1, AVIStreamStart(pStream1), &wfx, &lSize); - ok(res == 0, "Unable to read format: error=%u\n", res); - - ok(asi0.fccType == streamtypeVIDEO, "got 0x%x (expected streamtypeVIDEO)\n", asi0.fccType); - ok(asi0.fccHandler == 0x30323449, "got 0x%x (expected 0x30323449)\n", asi0.fccHandler); - ok(asi0.dwFlags == 0, "got %u (expected 0)\n", asi0.dwFlags); - ok(asi0.wPriority == 0, "got %u (expected 0)\n", asi0.wPriority); - ok(asi0.wLanguage == 0, "got %u (expected 0)\n", asi0.wLanguage); - ok(asi0.dwScale == 1001, "got %u (expected 1001)\n", asi0.dwScale); - ok(asi0.dwRate == 30000, "got %u (expected 30000)\n", asi0.dwRate); - ok(asi0.dwStart == 0, "got %u (expected 0)\n", asi0.dwStart); - ok(asi0.dwLength == 1, "got %u (expected 1)\n", asi0.dwLength); - ok(asi0.dwInitialFrames == 0, "got %u (expected 0)\n", asi0.dwInitialFrames); - ok(asi0.dwSuggestedBufferSize == 0, "got %u (expected 0)\n", asi0.dwSuggestedBufferSize); - ok(asi0.dwQuality == 0xffffffff, "got 0x%x (expected 0xffffffff)\n", asi0.dwQuality); - ok(asi0.dwSampleSize == 0, "got %u (expected 0)\n", asi0.dwSampleSize); - ok(asi0.rcFrame.left == 0, "got %u (expected 0)\n", asi0.rcFrame.left); - ok(asi0.rcFrame.top == 0, "got %u (expected 0)\n", asi0.rcFrame.top); - ok(asi0.rcFrame.right == 8, "got %u (expected 8)\n", asi0.rcFrame.right); /* these are based on the values in the mah and not */ - ok(asi0.rcFrame.bottom == 6, "got %u (expected 6)\n", asi0.rcFrame.bottom);/* on the ones in the ash which are 0 here */ - ok(asi0.dwEditCount == 0, "got %u (expected 0)\n", asi0.dwEditCount); - ok(asi0.dwFormatChangeCount == 0, "got %u (expected 0)\n", asi0.dwFormatChangeCount); - - ok(asi1.fccType == streamtypeAUDIO, "got 0x%x (expected streamtypeVIDEO)\n", asi1.fccType); - ok(asi1.fccHandler == 0x1, "got 0x%x (expected 0x1)\n", asi1.fccHandler); - ok(asi1.dwFlags == 0, "got %u (expected 0)\n", asi1.dwFlags); - ok(asi1.wPriority == 0, "got %u (expected 0)\n", asi1.wPriority); - ok(asi1.wLanguage == 0, "got %u (expected 0)\n", asi1.wLanguage); - ok(asi1.dwScale == 1, "got %u (expected 1)\n", asi1.dwScale); - ok(asi1.dwRate == 11025, "got %u (expected 11025)\n", asi1.dwRate); - ok(asi1.dwStart == 0, "got %u (expected 0)\n", asi1.dwStart); - ok(asi1.dwLength == 1637, "got %u (expected 1637)\n", asi1.dwLength); - ok(asi1.dwInitialFrames == 0, "got %u (expected 0)\n", asi1.dwInitialFrames); - ok(asi1.dwSuggestedBufferSize == 0, "got %u (expected 0)\n", asi1.dwSuggestedBufferSize); - ok(asi1.dwQuality == 0xffffffff, "got 0x%x (expected 0xffffffff)\n", asi1.dwQuality); - ok(asi1.dwSampleSize == 2, "got %u (expected 2)\n", asi1.dwSampleSize); - ok(asi1.rcFrame.left == 0, "got %u (expected 0)\n", asi1.rcFrame.left); - ok(asi1.rcFrame.top == 0, "got %u (expected 0)\n", asi1.rcFrame.top); - ok(asi1.rcFrame.right == 0, "got %u (expected 0)\n", asi1.rcFrame.right); - ok(asi1.rcFrame.bottom == 0, "got %u (expected 0)\n", asi1.rcFrame.bottom); - ok(asi1.dwEditCount == 0, "got %u (expected 0)\n", asi1.dwEditCount); - ok(asi1.dwFormatChangeCount == 0, "got %u (expected 0)\n", asi1.dwFormatChangeCount); - - ok(wfx.wFormatTag == 1, "got %u (expected 1)\n",wfx.wFormatTag); - ok(wfx.nChannels == 2, "got %u (expected 2)\n",wfx.nChannels); - ok(wfx.wFormatTag == 1, "got %u (expected 1)\n",wfx.wFormatTag); - ok(wfx.nSamplesPerSec == 11025, "got %u (expected 11025)\n",wfx.nSamplesPerSec); - ok(wfx.nAvgBytesPerSec == 22050, "got %u (expected 22050)\n",wfx.nAvgBytesPerSec); - ok(wfx.nBlockAlign == 2, "got %u (expected 2)\n",wfx.nBlockAlign); - - AVIStreamRelease(pStream0); - AVIStreamRelease(pStream1); - AVIFileRelease(pFile); - ok(DeleteFile(filename) !=0, "Deleting file %s failed\n", filename); -} - -static void test_amh_corruption(void) -{ - COMMON_AVI_HEADERS cah; - char filename[MAX_PATH]; - PAVIFILE pFile; - int res; - - GetTempPath(MAX_PATH, filename); - strcpy(filename+strlen(filename), testfilename); - - /* Make sure only AVI files with the proper headers will be loaded */ - init_test_struct(&cah); - cah.fh[3] = mmioFOURCC('A', 'V', 'i', ' '); - - create_avi_file(&cah, filename); - res = AVIFileOpen(&pFile, filename, OF_SHARE_DENY_WRITE, 0L); - ok(res != 0, "Able to open file: error=%u\n", res); - - ok(DeleteFile(filename) !=0, "Deleting file %s failed\n", filename); -} - -static void test_ash1_corruption(void) -{ - COMMON_AVI_HEADERS cah; - char filename[MAX_PATH]; - PAVIFILE pFile; - int res; - PAVISTREAM pStream1; - AVISTREAMINFO asi1; - - GetTempPath(MAX_PATH, filename); - strcpy(filename+strlen(filename), testfilename); - - /* Corrupt the sample size in the audio stream header */ - init_test_struct(&cah); - cah.ash1.dwSampleSize = 0xdeadbeef; - - create_avi_file(&cah, filename); - - res = AVIFileOpen(&pFile, filename, OF_SHARE_DENY_WRITE, 0L); - ok(res == 0, "Unable to open file: error=%u\n", res); - - res = AVIFileGetStream(pFile, &pStream1, 0, 1); - ok(res == 0, "Unable to open audio stream: error=%u\n", res); - - res = AVIStreamInfo(pStream1, &asi1, sizeof(AVISTREAMINFO)); - ok(res == 0, "Unable to read stream info: error=%u\n", res); - - /* The result will still be 2, because the value is dynamically replaced with the nBlockAlign - value from the stream format header. The next test will prove this */ - ok(asi1.dwSampleSize == 2, "got %u (expected 2)\n", asi1.dwSampleSize); - - AVIStreamRelease(pStream1); - AVIFileRelease(pFile); - ok(DeleteFile(filename) !=0, "Deleting file %s failed\n", filename); -} - -static void test_ash1_corruption2(void) -{ - COMMON_AVI_HEADERS cah; - char filename[MAX_PATH]; - PAVIFILE pFile; - int res; - PAVISTREAM pStream1; - AVISTREAMINFO asi1; - - GetTempPath(MAX_PATH, filename); - strcpy(filename+strlen(filename), testfilename); - - /* Corrupt the block alignment in the audio format header */ - init_test_struct(&cah); - cah.pcmwf.wf.nBlockAlign = 0xdead; - - create_avi_file(&cah, filename); - - res = AVIFileOpen(&pFile, filename, OF_SHARE_DENY_WRITE, 0L); - ok(res == 0, "Unable to open file: error=%u\n", res); - - res = AVIFileGetStream(pFile, &pStream1, 0, 1); - ok(res == 0, "Unable to open audio stream: error=%u\n", res); - - ok(AVIStreamInfo(pStream1, &asi1, sizeof(AVISTREAMINFO)) == 0, "Unable to read stream info\n"); - - /* The result will also be the corrupt value, as explained above. */ - ok(asi1.dwSampleSize == 0xdead, "got 0x%x (expected 0xdead)\n", asi1.dwSampleSize); - - AVIStreamRelease(pStream1); - AVIFileRelease(pFile); - ok(DeleteFile(filename) !=0, "Deleting file %s failed\n", filename); -} - -/* ########################### */ - -START_TEST(api) -{ - - AVIFileInit(); - test_AVISaveOptions(); - test_default_data(); - test_amh_corruption(); - test_ash1_corruption(); - test_ash1_corruption2(); - AVIFileExit(); - -} diff --git a/rostests/winetests/avifil32/avifil32.rbuild b/rostests/winetests/avifil32/avifil32.rbuild deleted file mode 100644 index 5c7e070e3dc..00000000000 --- a/rostests/winetests/avifil32/avifil32.rbuild +++ /dev/null @@ -1,11 +0,0 @@ - - - - - . - avifil32 - wine - api.c - testlist.c - - diff --git a/rostests/winetests/avifil32/testlist.c b/rostests/winetests/avifil32/testlist.c deleted file mode 100644 index 4215c4a8157..00000000000 --- a/rostests/winetests/avifil32/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_api(void); - -const struct test winetest_testlist[] = -{ - { "api", func_api }, - { 0, 0 } -}; diff --git a/rostests/winetests/browseui/CMakeLists.txt b/rostests/winetests/browseui/CMakeLists.txt deleted file mode 100644 index 9dfafd08e68..00000000000 --- a/rostests/winetests/browseui/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(browseui_winetest autocomplete.c testlist.c) -target_link_libraries(browseui_winetest wine uuid) -set_module_type(browseui_winetest win32cui) -add_importlibs(browseui_winetest user32 ole32 msvcrt kernel32 ntdll) -add_cd_file(TARGET browseui_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/browseui/autocomplete.c b/rostests/winetests/browseui/autocomplete.c deleted file mode 100644 index e56c599c9d5..00000000000 --- a/rostests/winetests/browseui/autocomplete.c +++ /dev/null @@ -1,342 +0,0 @@ -/* Unit tests for autocomplete - * - * Copyright 2007 Mikolaj Zalewski - * - * 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 - -#include "wine/test.h" - -#define stop_on_error(exp) \ -{ \ - HRESULT res = (exp); \ - if (FAILED(res)) \ - { \ - ok(FALSE, #exp " failed: %x\n", res); \ - return; \ - } \ -} - -#define ole_ok(exp) \ -{ \ - HRESULT res = (exp); \ - if (res != S_OK) \ - ok(FALSE, #exp " failed: %x\n", res); \ -} - -static LPWSTR strdup_AtoW(LPCSTR str) -{ - int size = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); - LPWSTR wstr = CoTaskMemAlloc((size + 1)*sizeof(WCHAR)); - MultiByteToWideChar(CP_ACP, 0, str, -1, wstr, size+1); - return wstr; -} - -typedef struct -{ - IEnumString IEnumString_iface; - IACList IACList_iface; - LONG ref; - HRESULT expret; - INT expcount; - INT pos; - INT limit; - const char **data; -} TestACL; - -extern IEnumStringVtbl TestACLVtbl; -extern IACListVtbl TestACL_ACListVtbl; - -static inline TestACL *impl_from_IEnumString(IEnumString *iface) -{ - return CONTAINING_RECORD(iface, TestACL, IEnumString_iface); -} - -static TestACL *impl_from_IACList(IACList *iface) -{ - return CONTAINING_RECORD(iface, TestACL, IACList_iface); -} - -static TestACL *TestACL_Constructor(int limit, const char **strings) -{ - TestACL *This = CoTaskMemAlloc(sizeof(TestACL)); - ZeroMemory(This, sizeof(*This)); - This->IEnumString_iface.lpVtbl = &TestACLVtbl; - This->IACList_iface.lpVtbl = &TestACL_ACListVtbl; - This->ref = 1; - This->expret = S_OK; - This->limit = limit; - This->data = strings; - return This; -} - -static ULONG STDMETHODCALLTYPE TestACL_AddRef(IEnumString *iface) -{ - TestACL *This = impl_from_IEnumString(iface); - trace("ACL(%p): addref (%d)\n", This, This->ref+1); - return InterlockedIncrement(&This->ref); -} - -static ULONG STDMETHODCALLTYPE TestACL_Release(IEnumString *iface) -{ - TestACL *This = impl_from_IEnumString(iface); - ULONG res; - - res = InterlockedDecrement(&This->ref); - trace("ACL(%p): release (%d)\n", This, res); - return res; -} - -static HRESULT STDMETHODCALLTYPE TestACL_QueryInterface(IEnumString *iface, REFIID iid, LPVOID *ppvOut) -{ - TestACL *This = impl_from_IEnumString(iface); - *ppvOut = NULL; - if (IsEqualGUID(iid, &IID_IUnknown) || IsEqualGUID(iid, &IID_IEnumString)) - { - *ppvOut = iface; - } - else if (IsEqualGUID(iid, &IID_IACList)) - { - *ppvOut = &This->IACList_iface; - } - - if (*ppvOut) - { - iface->lpVtbl->AddRef(iface); - return S_OK; - } - -#if 0 /* IID_IEnumACString not defined yet in wine */ - if (!IsEqualGUID(iid, &IID_IEnumACString)) - trace("unknown interface queried\n"); -#endif - return E_NOINTERFACE; -} - -static HRESULT STDMETHODCALLTYPE TestACL_Next(IEnumString *iface, ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched) -{ - TestACL *This = impl_from_IEnumString(iface); - ULONG i; - - trace("ACL(%p): read %d item(s)\n", This, celt); - for (i = 0; i < celt; i++) - { - if (This->pos >= This->limit) - break; - rgelt[i] = strdup_AtoW(This->data[This->pos]); - This->pos++; - } - - if (pceltFetched) - *pceltFetched = i; - if (i == celt) - return S_OK; - return S_FALSE; -} - -static HRESULT STDMETHODCALLTYPE TestACL_Skip(IEnumString *iface, ULONG celt) -{ - ok(FALSE, "Unexpected call to TestACL_Skip\n"); - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE TestACL_Clone(IEnumString *iface, IEnumString **out) -{ - ok(FALSE, "Unexpected call to TestACL_Clone\n"); - return E_OUTOFMEMORY; -} - -static HRESULT STDMETHODCALLTYPE TestACL_Reset(IEnumString *iface) -{ - TestACL *This = impl_from_IEnumString(iface); - trace("ACL(%p): Reset\n", This); - This->pos = 0; - return S_OK; -} - -static HRESULT STDMETHODCALLTYPE TestACL_Expand(IACList *iface, LPCOLESTR str) -{ - TestACL *This = impl_from_IACList(iface); - trace("ACL(%p): Expand\n", This); - This->expcount++; - return This->expret; -} - -IEnumStringVtbl TestACLVtbl = -{ - TestACL_QueryInterface, - TestACL_AddRef, - TestACL_Release, - - TestACL_Next, - TestACL_Skip, - TestACL_Reset, - TestACL_Clone -}; - -static ULONG STDMETHODCALLTYPE TestACL_ACList_AddRef(IACList *iface) -{ - TestACL *This = impl_from_IACList(iface); - return TestACL_AddRef(&This->IEnumString_iface); -} - -static ULONG STDMETHODCALLTYPE TestACL_ACList_Release(IACList *iface) -{ - TestACL *This = impl_from_IACList(iface); - return TestACL_Release(&This->IEnumString_iface); -} - -static HRESULT STDMETHODCALLTYPE TestACL_ACList_QueryInterface(IACList *iface, REFIID iid, LPVOID *ppvout) -{ - TestACL *This = impl_from_IACList(iface); - return TestACL_QueryInterface(&This->IEnumString_iface, iid, ppvout); -} - -IACListVtbl TestACL_ACListVtbl = -{ - TestACL_ACList_QueryInterface, - TestACL_ACList_AddRef, - TestACL_ACList_Release, - - TestACL_Expand -}; - -#define expect_str(obj, str) \ -{ \ - ole_ok(obj->lpVtbl->Next(obj, 1, &wstr, &i)); \ - ok(i == 1, "Expected i == 1, got %d\n", i); \ - ok(str[0] == wstr[0], "String mismatch\n"); \ - CoTaskMemFree(wstr); \ -} - -#define expect_end(obj) \ - ok(obj->lpVtbl->Next(obj, 1, &wstr, &i) == S_FALSE, "Unexpected return from Next\n"); - -static void test_ACLMulti(void) -{ - const char *strings1[] = {"a", "c", "e"}; - const char *strings2[] = {"a", "b", "d"}; - WCHAR exp[] = {'A','B','C',0}; - IEnumString *obj; - TestACL *acl1, *acl2; - IACList *acl; - IObjMgr *mgr; - LPWSTR wstr; - LPWSTR wstrtab[15]; - LPVOID tmp; - UINT i; - - stop_on_error(CoCreateInstance(&CLSID_ACLMulti, NULL, CLSCTX_INPROC, &IID_IEnumString, (LPVOID *)&obj)); - stop_on_error(obj->lpVtbl->QueryInterface(obj, &IID_IACList, (LPVOID *)&acl)); - ok(obj->lpVtbl->QueryInterface(obj, &IID_IACList2, &tmp) == E_NOINTERFACE, - "Unexpected interface IACList2 in ACLMulti\n"); - stop_on_error(obj->lpVtbl->QueryInterface(obj, &IID_IObjMgr, (LPVOID *)&mgr)); -#if 0 /* IID_IEnumACString not defined yet in wine */ - ole_ok(obj->lpVtbl->QueryInterface(obj, &IID_IEnumACString, &unk)); - if (unk != NULL) - unk->lpVtbl->Release(unk); -#endif - - ok(obj->lpVtbl->Next(obj, 1, (LPOLESTR *)&tmp, &i) == S_FALSE, "Unexpected return from Next\n"); - ok(i == 0, "Unexpected fetched value %d\n", i); - ok(obj->lpVtbl->Next(obj, 44, (LPOLESTR *)&tmp, &i) == S_FALSE, "Unexpected return from Next\n"); - ok(obj->lpVtbl->Skip(obj, 1) == E_NOTIMPL, "Unexpected return from Skip\n"); - ok(obj->lpVtbl->Clone(obj, (IEnumString **)&tmp) == E_OUTOFMEMORY, "Unexpected return from Clone\n"); - ole_ok(acl->lpVtbl->Expand(acl, exp)); - - acl1 = TestACL_Constructor(3, strings1); - acl2 = TestACL_Constructor(3, strings2); - stop_on_error(mgr->lpVtbl->Append(mgr, (IUnknown *)&acl1->IACList_iface)); - stop_on_error(mgr->lpVtbl->Append(mgr, (IUnknown *)&acl2->IACList_iface)); - ok(mgr->lpVtbl->Append(mgr, NULL) == E_FAIL, "Unexpected return from Append\n"); - expect_str(obj, "a"); - expect_str(obj, "c"); - expect_str(obj, "e"); - expect_str(obj, "a"); - expect_str(obj, "b"); - expect_str(obj, "d"); - expect_end(obj); - - ole_ok(obj->lpVtbl->Reset(obj)); - ok(acl1->pos == 0, "acl1 not reset\n"); - ok(acl2->pos == 0, "acl2 not reset\n"); - - ole_ok(acl->lpVtbl->Expand(acl, exp)); - ok(acl1->expcount == 1, "expcount - expected 1, got %d\n", acl1->expcount); - ok(acl2->expcount == 0 /* XP */ || acl2->expcount == 1 /* Vista */, - "expcount - expected 0 or 1, got %d\n", acl2->expcount); - - ole_ok(obj->lpVtbl->Next(obj, 15, wstrtab, &i)); - ok(i == 1, "Expected i == 1, got %d\n", i); - CoTaskMemFree(wstrtab[0]); - ole_ok(obj->lpVtbl->Next(obj, 15, wstrtab, &i)); - CoTaskMemFree(wstrtab[0]); - ole_ok(obj->lpVtbl->Next(obj, 15, wstrtab, &i)); - CoTaskMemFree(wstrtab[0]); - ole_ok(obj->lpVtbl->Next(obj, 15, wstrtab, &i)); - CoTaskMemFree(wstrtab[0]); - ole_ok(acl->lpVtbl->Expand(acl, exp)); - ok(acl1->expcount == 2, "expcount - expected 1, got %d\n", acl1->expcount); - ok(acl2->expcount == 0 /* XP */ || acl2->expcount == 2 /* Vista */, - "expcount - expected 0 or 2, got %d\n", acl2->expcount); - acl1->expret = S_FALSE; - ole_ok(acl->lpVtbl->Expand(acl, exp)); - ok(acl1->expcount == 3, "expcount - expected 1, got %d\n", acl1->expcount); - ok(acl2->expcount == 1 /* XP */ || acl2->expcount == 3 /* Vista */, - "expcount - expected 0 or 3, got %d\n", acl2->expcount); - acl1->expret = E_NOTIMPL; - ole_ok(acl->lpVtbl->Expand(acl, exp)); - ok(acl1->expcount == 4, "expcount - expected 1, got %d\n", acl1->expcount); - ok(acl2->expcount == 2 /* XP */ || acl2->expcount == 4 /* Vista */, - "expcount - expected 0 or 4, got %d\n", acl2->expcount); - acl2->expret = E_OUTOFMEMORY; - ok(acl->lpVtbl->Expand(acl, exp) == E_OUTOFMEMORY, "Unexpected Expand return\n"); - acl2->expret = E_FAIL; - ok(acl->lpVtbl->Expand(acl, exp) == E_FAIL, "Unexpected Expand return\n"); - - stop_on_error(mgr->lpVtbl->Remove(mgr, (IUnknown *)&acl1->IACList_iface)); - ok(acl1->ref == 1, "acl1 not released\n"); - expect_end(obj); - obj->lpVtbl->Reset(obj); - expect_str(obj, "a"); - expect_str(obj, "b"); - expect_str(obj, "d"); - expect_end(obj); - - obj->lpVtbl->Release(obj); - acl->lpVtbl->Release(acl); - ok(mgr->lpVtbl->Release(mgr) == 0, "Unexpected references\n"); - ok(acl1->ref == 1, "acl1 not released\n"); - ok(acl2->ref == 1, "acl2 not released\n"); - - CoTaskMemFree(acl1); - CoTaskMemFree(acl2); -} - -START_TEST(autocomplete) -{ - CoInitialize(NULL); - test_ACLMulti(); - CoUninitialize(); -} diff --git a/rostests/winetests/browseui/browseui.rbuild b/rostests/winetests/browseui/browseui.rbuild deleted file mode 100644 index 12d5649fc37..00000000000 --- a/rostests/winetests/browseui/browseui.rbuild +++ /dev/null @@ -1,15 +0,0 @@ - - - - - . - - wine - ole32 - user32 - uuid - ntdll - autocomplete.c - testlist.c - - diff --git a/rostests/winetests/browseui/testlist.c b/rostests/winetests/browseui/testlist.c deleted file mode 100644 index 89bfdebb386..00000000000 --- a/rostests/winetests/browseui/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_autocomplete(void); - -const struct test winetest_testlist[] = -{ - { "autocomplete", func_autocomplete }, - { 0, 0 } -}; diff --git a/rostests/winetests/cabinet/CMakeLists.txt b/rostests/winetests/cabinet/CMakeLists.txt deleted file mode 100644 index 9a80c8b9f6a..00000000000 --- a/rostests/winetests/cabinet/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(cabinet_winetest extract.c fdi.c testlist.c) -target_link_libraries(cabinet_winetest wine) -set_module_type(cabinet_winetest win32cui) -add_importlibs(cabinet_winetest cabinet msvcrt kernel32 ntdll) -add_cd_file(TARGET cabinet_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/cabinet/cabinet.rbuild b/rostests/winetests/cabinet/cabinet.rbuild deleted file mode 100644 index 727c66b9c9f..00000000000 --- a/rostests/winetests/cabinet/cabinet.rbuild +++ /dev/null @@ -1,14 +0,0 @@ - - - - - . - - extract.c - fdi.c - testlist.c - wine - cabinet - ntdll - - diff --git a/rostests/winetests/cabinet/extract.c b/rostests/winetests/cabinet/extract.c deleted file mode 100644 index 29fd1c7353a..00000000000 --- a/rostests/winetests/cabinet/extract.c +++ /dev/null @@ -1,721 +0,0 @@ -/* - * Unit tests for cabinet.dll extract functions - * - * Copyright (C) 2006 James Hawkins - * - * 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 "fci.h" -#include "fdi.h" -#include "wine/test.h" - -/* make the max size large so there is only one cab file */ -#define MEDIA_SIZE 999999999 -#define FOLDER_THRESHOLD 900000 - -/* The following definitions were copied from dlls/cabinet/cabinet.h - * because they are undocumented in windows. - */ - -/* SESSION Operation */ -#define EXTRACT_FILLFILELIST 0x00000001 -#define EXTRACT_EXTRACTFILES 0x00000002 - -struct FILELIST{ - LPSTR FileName; - struct FILELIST *next; - BOOL DoExtract; -}; - -typedef struct { - INT FileSize; - ERF Error; - struct FILELIST *FileList; - INT FileCount; - INT Operation; - CHAR Destination[MAX_PATH]; - CHAR CurrentFile[MAX_PATH]; - CHAR Reserved[MAX_PATH]; - struct FILELIST *FilterList; -} SESSION; - -/* function pointers */ -HMODULE hCabinet; -static HRESULT (WINAPI *pExtract)(SESSION*, LPCSTR); - -CHAR CURR_DIR[MAX_PATH]; - -static void init_function_pointers(void) -{ - hCabinet = GetModuleHandleA("cabinet.dll"); - - pExtract = (void *)GetProcAddress(hCabinet, "Extract"); -} - -/* creates a file with the specified name for tests */ -static void createTestFile(const CHAR *name) -{ - HANDLE file; - DWORD written; - - file = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "Failure to open file %s\n", name); - WriteFile(file, name, strlen(name), &written, NULL); - WriteFile(file, "\n", strlen("\n"), &written, NULL); - CloseHandle(file); -} - -static void create_test_files(void) -{ - int len; - - GetCurrentDirectoryA(MAX_PATH, CURR_DIR); - len = lstrlenA(CURR_DIR); - - if(len && (CURR_DIR[len-1] == '\\')) - CURR_DIR[len-1] = 0; - - createTestFile("a.txt"); - createTestFile("b.txt"); - CreateDirectoryA("testdir", NULL); - createTestFile("testdir\\c.txt"); - createTestFile("testdir\\d.txt"); - CreateDirectoryA("dest", NULL); -} - -static void delete_test_files(void) -{ - DeleteFileA("a.txt"); - DeleteFileA("b.txt"); - DeleteFileA("testdir\\c.txt"); - DeleteFileA("testdir\\d.txt"); - RemoveDirectoryA("testdir"); - - DeleteFileA("extract.cab"); -} - -/* the FCI callbacks */ - -static void * CDECL mem_alloc(ULONG cb) -{ - return HeapAlloc(GetProcessHeap(), 0, cb); -} - -static void CDECL mem_free(void *memory) -{ - HeapFree(GetProcessHeap(), 0, memory); -} - -static BOOL CDECL get_next_cabinet(PCCAB pccab, ULONG cbPrevCab, void *pv) -{ - return TRUE; -} - -static LONG CDECL progress(UINT typeStatus, ULONG cb1, ULONG cb2, void *pv) -{ - return 0; -} - -static int CDECL file_placed(PCCAB pccab, char *pszFile, LONG cbFile, - BOOL fContinuation, void *pv) -{ - return 0; -} - -static INT_PTR CDECL fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv) -{ - HANDLE handle; - DWORD dwAccess = 0; - DWORD dwShareMode = 0; - DWORD dwCreateDisposition = OPEN_EXISTING; - - dwAccess = GENERIC_READ | GENERIC_WRITE; - /* FILE_SHARE_DELETE is not supported by Windows Me/98/95 */ - dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE; - - if (GetFileAttributesA(pszFile) != INVALID_FILE_ATTRIBUTES) - dwCreateDisposition = OPEN_EXISTING; - else - dwCreateDisposition = CREATE_NEW; - - handle = CreateFileA(pszFile, dwAccess, dwShareMode, NULL, - dwCreateDisposition, 0, NULL); - - ok(handle != INVALID_HANDLE_VALUE, "Failed to CreateFile %s\n", pszFile); - - return (INT_PTR)handle; -} - -static UINT CDECL fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) -{ - HANDLE handle = (HANDLE)hf; - DWORD dwRead; - BOOL res; - - res = ReadFile(handle, memory, cb, &dwRead, NULL); - ok(res, "Failed to ReadFile\n"); - - return dwRead; -} - -static UINT CDECL fci_write(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) -{ - HANDLE handle = (HANDLE)hf; - DWORD dwWritten; - BOOL res; - - res = WriteFile(handle, memory, cb, &dwWritten, NULL); - ok(res, "Failed to WriteFile\n"); - - return dwWritten; -} - -static int CDECL fci_close(INT_PTR hf, int *err, void *pv) -{ - HANDLE handle = (HANDLE)hf; - ok(CloseHandle(handle), "Failed to CloseHandle\n"); - - return 0; -} - -static LONG CDECL fci_seek(INT_PTR hf, LONG dist, int seektype, int *err, void *pv) -{ - HANDLE handle = (HANDLE)hf; - DWORD ret; - - ret = SetFilePointer(handle, dist, NULL, seektype); - ok(ret != INVALID_SET_FILE_POINTER, "Failed to SetFilePointer\n"); - - return ret; -} - -static int CDECL fci_delete(char *pszFile, int *err, void *pv) -{ - BOOL ret = DeleteFileA(pszFile); - ok(ret, "Failed to DeleteFile %s\n", pszFile); - - return 0; -} - -static BOOL CDECL get_temp_file(char *pszTempName, int cbTempName, void *pv) -{ - LPSTR tempname; - - tempname = HeapAlloc(GetProcessHeap(), 0, MAX_PATH); - GetTempFileNameA(".", "xx", 0, tempname); - - if (tempname && (strlen(tempname) < (unsigned)cbTempName)) - { - lstrcpyA(pszTempName, tempname); - HeapFree(GetProcessHeap(), 0, tempname); - return TRUE; - } - - HeapFree(GetProcessHeap(), 0, tempname); - - return FALSE; -} - -static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime, - USHORT *pattribs, int *err, void *pv) -{ - BY_HANDLE_FILE_INFORMATION finfo; - FILETIME filetime; - HANDLE handle; - DWORD attrs; - BOOL res; - - handle = CreateFile(pszName, GENERIC_READ, FILE_SHARE_READ, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL); - - ok(handle != INVALID_HANDLE_VALUE, "Failed to CreateFile %s\n", pszName); - - res = GetFileInformationByHandle(handle, &finfo); - ok(res, "Expected GetFileInformationByHandle to succeed\n"); - - FileTimeToLocalFileTime(&finfo.ftLastWriteTime, &filetime); - FileTimeToDosDateTime(&filetime, pdate, ptime); - - attrs = GetFileAttributes(pszName); - ok(attrs != INVALID_FILE_ATTRIBUTES, "Failed to GetFileAttributes\n"); - - return (INT_PTR)handle; -} - -static void add_file(HFCI hfci, char *file) -{ - char path[MAX_PATH]; - BOOL res; - - lstrcpyA(path, CURR_DIR); - lstrcatA(path, "\\"); - lstrcatA(path, file); - - res = FCIAddFile(hfci, path, file, FALSE, get_next_cabinet, progress, - get_open_info, tcompTYPE_MSZIP); - ok(res, "Expected FCIAddFile to succeed\n"); -} - -static void set_cab_parameters(PCCAB pCabParams) -{ - ZeroMemory(pCabParams, sizeof(CCAB)); - - pCabParams->cb = MEDIA_SIZE; - pCabParams->cbFolderThresh = FOLDER_THRESHOLD; - pCabParams->setID = 0xbeef; - lstrcpyA(pCabParams->szCabPath, CURR_DIR); - lstrcatA(pCabParams->szCabPath, "\\"); - lstrcpyA(pCabParams->szCab, "extract.cab"); -} - -static void create_cab_file(void) -{ - CCAB cabParams; - HFCI hfci; - ERF erf; - static CHAR a_txt[] = "a.txt", - b_txt[] = "b.txt", - testdir_c_txt[] = "testdir\\c.txt", - testdir_d_txt[] = "testdir\\d.txt"; - BOOL res; - - set_cab_parameters(&cabParams); - - hfci = FCICreate(&erf, file_placed, mem_alloc, mem_free, fci_open, - fci_read, fci_write, fci_close, fci_seek, fci_delete, - get_temp_file, &cabParams, NULL); - - ok(hfci != NULL, "Failed to create an FCI context\n"); - - add_file(hfci, a_txt); - add_file(hfci, b_txt); - add_file(hfci, testdir_c_txt); - add_file(hfci, testdir_d_txt); - - res = FCIFlushCabinet(hfci, FALSE, get_next_cabinet, progress); - ok(res, "Failed to flush the cabinet\n"); - - res = FCIDestroy(hfci); - ok(res, "Failed to destroy the cabinet\n"); -} - -static BOOL check_list(struct FILELIST **node, const char *filename, BOOL do_extract) -{ - if (!*node) - return FALSE; - - if (lstrcmpA((*node)->FileName, filename)) - return FALSE; - - if ((*node)->DoExtract != do_extract) - return FALSE; - - *node = (*node)->next; - return TRUE; -} - -static void free_file_node(struct FILELIST *node) -{ - HeapFree(GetProcessHeap(), 0, node->FileName); - HeapFree(GetProcessHeap(), 0, node); -} - -static void free_file_list(SESSION* session) -{ - struct FILELIST *next, *curr = session->FileList; - - while (curr) - { - next = curr->next; - free_file_node(curr); - curr = next; - } - - session->FileList = NULL; -} - -static void test_Extract(void) -{ - SESSION session; - HRESULT res; - struct FILELIST *node; - - /* native windows crashes if - * - invalid parameters are sent in - * - you call EXTRACT_EXTRACTFILES without calling - * EXTRACT_FILLFILELIST first or at the same time - */ - - /* try to extract all files */ - ZeroMemory(&session, sizeof(SESSION)); - lstrcpyA(session.Destination, "dest"); - session.Operation = EXTRACT_FILLFILELIST | EXTRACT_EXTRACTFILES; - res = pExtract(&session, "extract.cab"); - node = session.FileList; - ok(res == S_OK, "Expected S_OK, got %d\n", res); - ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); - ok(session.Error.erfOper == FDIERROR_NONE, - "Expected FDIERROR_NONE, got %d\n", session.Error.erfOper); - ok(session.Error.erfType == 0, "Expected 0, got %d\n", session.Error.erfType); - ok(session.Error.fError == FALSE, "Expected FALSE, got %d\n", session.Error.fError); - ok(session.FileCount == 4, "Expected 4, got %d\n", session.FileCount); - ok(session.Operation == (EXTRACT_FILLFILELIST | EXTRACT_EXTRACTFILES), - "Expected EXTRACT_FILLFILELIST | EXTRACT_EXTRACTFILES, got %d\n", session.Operation); - ok(!lstrcmpA(session.Destination, "dest"), "Expected dest, got %s\n", session.Destination); - ok(!lstrcmpA(session.CurrentFile, "dest\\testdir\\d.txt"), - "Expected dest\\testdir\\d.txt, got %s\n", session.CurrentFile); - ok(!*session.Reserved, "Expected empty string, got %s\n", session.Reserved); - ok(!session.FilterList, "Expected empty filter list\n"); - ok(DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to exist\n"); - ok(DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to exist\n"); - ok(DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n"); - ok(DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to exist\n"); - ok(RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to exist\n"); - ok(check_list(&node, "testdir\\d.txt", FALSE), "list entry wrong\n"); - ok(check_list(&node, "testdir\\c.txt", FALSE), "list entry wrong\n"); - ok(check_list(&node, "b.txt", FALSE), "list entry wrong\n"); - ok(check_list(&node, "a.txt", FALSE), "list entry wrong\n"); - free_file_list(&session); - - /* try fill file list operation */ - ZeroMemory(&session, sizeof(SESSION)); - lstrcpyA(session.Destination, "dest"); - session.Operation = EXTRACT_FILLFILELIST; - res = pExtract(&session, "extract.cab"); - node = session.FileList; - ok(res == S_OK, "Expected S_OK, got %d\n", res); - ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); - ok(session.Error.erfOper == FDIERROR_NONE, - "Expected FDIERROR_NONE, got %d\n", session.Error.erfOper); - ok(session.Error.erfType == 0, "Expected 0, got %d\n", session.Error.erfType); - ok(session.Error.fError == FALSE, "Expected FALSE, got %d\n", session.Error.fError); - ok(session.FileCount == 4, "Expected 4, got %d\n", session.FileCount); - ok(session.Operation == EXTRACT_FILLFILELIST, - "Expected EXTRACT_FILLFILELIST, got %d\n", session.Operation); - ok(!lstrcmpA(session.Destination, "dest"), "Expected dest, got %s\n", session.Destination); - ok(!lstrcmpA(session.CurrentFile, "dest\\testdir\\d.txt"), - "Expected dest\\testdir\\d.txt, got %s\n", session.CurrentFile); - ok(!*session.Reserved, "Expected empty string, got %s\n", session.Reserved); - ok(!session.FilterList, "Expected empty filter list\n"); - ok(!DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to not exist\n"); - ok(!DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to not exist\n"); - ok(check_list(&node, "testdir\\d.txt", TRUE), "list entry wrong\n"); - ok(check_list(&node, "testdir\\c.txt", TRUE), "list entry wrong\n"); - ok(check_list(&node, "b.txt", TRUE), "list entry wrong\n"); - ok(check_list(&node, "a.txt", TRUE), "list entry wrong\n"); - - /* try extract files operation once file list is filled */ - session.Operation = EXTRACT_EXTRACTFILES; - res = pExtract(&session, "extract.cab"); - node = session.FileList; - ok(res == S_OK, "Expected S_OK, got %d\n", res); - ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); - ok(session.Error.erfOper == FDIERROR_NONE, - "Expected FDIERROR_NONE, got %d\n", session.Error.erfOper); - ok(session.Error.erfType == 0, "Expected 0, got %d\n", session.Error.erfType); - ok(session.Error.fError == FALSE, "Expected FALSE, got %d\n", session.Error.fError); - ok(session.FileCount == 4, "Expected 4, got %d\n", session.FileCount); - ok(session.Operation == EXTRACT_EXTRACTFILES, - "Expected EXTRACT_EXTRACTFILES, got %d\n", session.Operation); - ok(!lstrcmpA(session.Destination, "dest"), "Expected dest, got %s\n", session.Destination); - ok(!lstrcmpA(session.CurrentFile, "dest\\testdir\\d.txt"), - "Expected dest\\testdir\\d.txt, got %s\n", session.CurrentFile); - ok(!*session.Reserved, "Expected empty string, got %s\n", session.Reserved); - ok(!session.FilterList, "Expected empty filter list\n"); - ok(DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to exist\n"); - ok(DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to exist\n"); - ok(DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n"); - ok(DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to exist\n"); - ok(RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to exist\n"); - ok(RemoveDirectoryA("dest"), "Expected dest to exist\n"); - ok(check_list(&node, "testdir\\d.txt", FALSE), "list entry wrong\n"); - ok(check_list(&node, "testdir\\c.txt", FALSE), "list entry wrong\n"); - ok(check_list(&node, "b.txt", FALSE), "list entry wrong\n"); - ok(check_list(&node, "a.txt", FALSE), "list entry wrong\n"); - - /* Extract does not extract files if the dest dir does not exist */ - res = pExtract(&session, "extract.cab"); - node = session.FileList; - ok(res == S_OK, "Expected S_OK, got %d\n", res); - ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); - ok(session.Error.erfOper == FDIERROR_NONE, - "Expected FDIERROR_NONE, got %d\n", session.Error.erfOper); - ok(session.Error.erfType == 0, "Expected 0, got %d\n", session.Error.erfType); - ok(session.Error.fError == FALSE, "Expected FALSE, got %d\n", session.Error.fError); - ok(session.FileCount == 4, "Expected 4, got %d\n", session.FileCount); - ok(session.Operation == EXTRACT_EXTRACTFILES, - "Expected EXTRACT_EXTRACTFILES, got %d\n", session.Operation); - ok(!lstrcmpA(session.Destination, "dest"), "Expected dest, got %s\n", session.Destination); - ok(!lstrcmpA(session.CurrentFile, "dest\\testdir\\d.txt"), - "Expected dest\\testdir\\d.txt, got %s\n", session.CurrentFile); - ok(!*session.Reserved, "Expected empty string, got %s\n", session.Reserved); - ok(!session.FilterList, "Expected empty filter list\n"); - ok(!DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to not exist\n"); - ok(!DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to not exist\n"); - ok(!DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to not exist\n"); - ok(!DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to not exist\n"); - ok(check_list(&node, "testdir\\d.txt", FALSE), "list entry wrong\n"); - ok(check_list(&node, "testdir\\c.txt", FALSE), "list entry wrong\n"); - ok(check_list(&node, "b.txt", FALSE), "list entry wrong\n"); - ok(check_list(&node, "a.txt", FALSE), "list entry wrong\n"); - - /* remove two of the files in the list */ - node = session.FileList->next; - session.FileList->next = session.FileList->next->next; - free_file_node(node); - free_file_node(session.FileList->next->next); - session.FileList->next->next = NULL; - session.FilterList = NULL; - CreateDirectoryA("dest", NULL); - res = pExtract(&session, "extract.cab"); - node = session.FileList; - ok(res == S_OK, "Expected S_OK, got %d\n", res); - ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); - ok(session.Error.erfOper == FDIERROR_NONE, - "Expected FDIERROR_NONE, got %d\n", session.Error.erfOper); - ok(session.Error.erfType == 0, "Expected 0, got %d\n", session.Error.erfType); - ok(session.Error.fError == FALSE, "Expected FALSE, got %d\n", session.Error.fError); - ok(session.FileCount == 4, "Expected 4, got %d\n", session.FileCount); - ok(session.Operation == EXTRACT_EXTRACTFILES, - "Expected EXTRACT_EXTRACTFILES, got %d\n", session.Operation); - ok(!lstrcmpA(session.Destination, "dest"), "Expected dest, got %s\n", session.Destination); - ok(!lstrcmpA(session.CurrentFile, "dest\\testdir\\d.txt"), - "Expected dest\\testdir\\d.txt, got %s\n", session.CurrentFile); - ok(!*session.Reserved, "Expected empty string, got %s\n", session.Reserved); - ok(!session.FilterList, "Expected empty filter list\n"); - ok(DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to exist\n"); - ok(DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n"); - ok(!DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to not exist\n"); - ok(!DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to not exist\n"); - ok(check_list(&node, "testdir\\d.txt", FALSE), "list entry wrong\n"); - ok(!check_list(&node, "testdir\\c.txt", FALSE), "list entry wrong\n"); - ok(check_list(&node, "b.txt", FALSE), "list entry wrong\n"); - ok(!check_list(&node, "a.txt", FALSE), "list entry wrong\n"); - free_file_list(&session); - - session.Operation = EXTRACT_FILLFILELIST; - session.FileList = NULL; - res = pExtract(&session, "extract.cab"); - node = session.FileList; - ok(res == S_OK, "Expected S_OK, got %d\n", res); - ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); - ok(session.Error.erfOper == FDIERROR_NONE, - "Expected FDIERROR_NONE, got %d\n", session.Error.erfOper); - ok(session.Error.erfType == 0, "Expected 0, got %d\n", session.Error.erfType); - ok(session.Error.fError == FALSE, "Expected FALSE, got %d\n", session.Error.fError); - ok(session.FileCount == 8, "Expected 8, got %d\n", session.FileCount); - ok(session.Operation == EXTRACT_FILLFILELIST, - "Expected EXTRACT_FILLFILELIST, got %d\n", session.Operation); - ok(!lstrcmpA(session.Destination, "dest"), "Expected dest, got %s\n", session.Destination); - ok(!lstrcmpA(session.CurrentFile, "dest\\testdir\\d.txt"), - "Expected dest\\testdir\\d.txt, got %s\n", session.CurrentFile); - ok(!*session.Reserved, "Expected empty string, got %s\n", session.Reserved); - ok(!session.FilterList, "Expected empty filter list\n"); - ok(!DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to not exist\n"); - ok(!DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to not exist\n"); - ok(!DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to not exist\n"); - ok(!DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to not exist\n"); - ok(check_list(&node, "testdir\\d.txt", TRUE), "list entry wrong\n"); - ok(!check_list(&node, "testdir\\c.txt", FALSE), "list entry wrong\n"); - ok(!check_list(&node, "b.txt", FALSE), "list entry wrong\n"); - ok(!check_list(&node, "a.txt", FALSE), "list entry wrong\n"); - - session.Operation = 0; - res = pExtract(&session, "extract.cab"); - node = session.FileList; - ok(res == S_OK, "Expected S_OK, got %d\n", res); - ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); - ok(session.Error.erfOper == FDIERROR_NONE, - "Expected FDIERROR_NONE, got %d\n", session.Error.erfOper); - ok(session.Error.erfType == 0, "Expected 0, got %d\n", session.Error.erfType); - ok(session.Error.fError == FALSE, "Expected FALSE, got %d\n", session.Error.fError); - ok(session.FileCount == 8, "Expected 8, got %d\n", session.FileCount); - ok(session.Operation == 0, "Expected 0, got %d\n", session.Operation); - ok(!lstrcmpA(session.Destination, "dest"), "Expected dest, got %s\n", session.Destination); - ok(!lstrcmpA(session.CurrentFile, "dest\\testdir\\d.txt"), - "Expected dest\\testdir\\d.txt, got %s\n", session.CurrentFile); - ok(!*session.Reserved, "Expected empty string, got %s\n", session.Reserved); - ok(!session.FilterList, "Expected empty filter list\n"); - ok(!DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to exist\n"); - ok(!DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n"); - ok(!DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to exist\n"); - ok(!DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to exist\n"); - ok(check_list(&node, "testdir\\d.txt", TRUE), "list entry wrong\n"); - ok(check_list(&node, "testdir\\c.txt", TRUE), "list entry wrong\n"); - ok(check_list(&node, "b.txt", TRUE), "list entry wrong\n"); - ok(check_list(&node, "a.txt", TRUE), "list entry wrong\n"); - - session.Operation = 0; - session.FilterList = session.FileList; - res = pExtract(&session, "extract.cab"); - node = session.FileList; - ok(res == S_OK, "Expected S_OK, got %d\n", res); - ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); - ok(session.Error.erfOper == FDIERROR_NONE, - "Expected FDIERROR_NONE, got %d\n", session.Error.erfOper); - ok(session.Error.erfType == 0, "Expected 0, got %d\n", session.Error.erfType); - ok(session.Error.fError == FALSE, "Expected FALSE, got %d\n", session.Error.fError); - ok(session.FileCount == 8, "Expected 8, got %d\n", session.FileCount); - ok(session.Operation == 0, "Expected 0, got %d\n", session.Operation); - ok(!lstrcmpA(session.Destination, "dest"), "Expected dest, got %s\n", session.Destination); - ok(!lstrcmpA(session.CurrentFile, "dest\\testdir\\d.txt"), - "Expected dest\\testdir\\d.txt, got %s\n", session.CurrentFile); - ok(!*session.Reserved, "Expected empty string, got %s\n", session.Reserved); - ok(DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to exist\n"); - ok(DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n"); - ok(DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to exist\n"); - ok(DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to exist\n"); - ok(check_list(&node, "testdir\\d.txt", FALSE), "list entry wrong\n"); - ok(check_list(&node, "testdir\\c.txt", FALSE), "list entry wrong\n"); - ok(check_list(&node, "b.txt", FALSE), "list entry wrong\n"); - ok(check_list(&node, "a.txt", FALSE), "list entry wrong\n"); - node = session.FilterList; - ok(check_list(&node, "testdir\\d.txt", FALSE), "list entry wrong\n"); - ok(check_list(&node, "testdir\\c.txt", FALSE), "list entry wrong\n"); - ok(check_list(&node, "b.txt", FALSE), "list entry wrong\n"); - ok(check_list(&node, "a.txt", FALSE), "list entry wrong\n"); - free_file_list(&session); - - /* cabinet does not exist */ - ZeroMemory(&session, sizeof(SESSION)); - lstrcpyA(session.Destination, "dest"); - session.Operation = EXTRACT_FILLFILELIST | EXTRACT_EXTRACTFILES; - res = pExtract(&session, "nonexistent.cab"); - node = session.FileList; - ok(res == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x\n", res); - ok(session.Error.erfOper == FDIERROR_CABINET_NOT_FOUND, - "Expected FDIERROR_CABINET_NOT_FOUND, got %d\n", session.Error.erfOper); - ok(session.FileSize == 0, "Expected 0, got %d\n", session.FileSize); - ok(session.Error.erfType == 0, "Expected 0, got %d\n", session.Error.erfType); - ok(session.Error.fError == TRUE, "Expected TRUE, got %d\n", session.Error.fError); - ok(session.FileCount == 0, "Expected 0, got %d\n", session.FileCount); - ok(session.Operation == (EXTRACT_FILLFILELIST | EXTRACT_EXTRACTFILES), - "Expected EXTRACT_FILLFILELIST | EXTRACT_EXTRACTFILES, got %d\n", session.Operation); - ok(!lstrcmpA(session.Destination, "dest"), "Expected dest, got %s\n", session.Destination); - ok(!*session.CurrentFile, "Expected empty string, got %s\n", session.CurrentFile); - ok(!*session.Reserved, "Expected empty string, got %s\n", session.Reserved); - ok(!session.FilterList, "Expected empty filter list\n"); - ok(!DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to not exist\n"); - ok(!DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to not exist\n"); - ok(!DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to not exist\n"); - ok(!DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to not exist\n"); - ok(!check_list(&node, "testdir\\d.txt", FALSE), "list entry should not exist\n"); - ok(!check_list(&node, "testdir\\c.txt", FALSE), "list entry should not exist\n"); - ok(!check_list(&node, "b.txt", FALSE), "list entry should not exist\n"); - ok(!check_list(&node, "a.txt", FALSE), "list entry should not exist\n"); - free_file_list(&session); - - /* first file exists */ - createTestFile("dest\\a.txt"); - SetFileAttributes("dest\\a.txt", FILE_ATTRIBUTE_READONLY); - ZeroMemory(&session, sizeof(SESSION)); - lstrcpyA(session.Destination, "dest"); - session.Operation = EXTRACT_FILLFILELIST | EXTRACT_EXTRACTFILES; - res = pExtract(&session, "extract.cab"); - node = session.FileList; - todo_wine - { - ok(res == HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED) || res == E_FAIL, - "Expected HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED) or E_FAIL, got %08x\n", res); - ok(session.FileSize == 6, "Expected 6, got %d\n", session.FileSize); - ok(session.Error.erfOper == FDIERROR_USER_ABORT, - "Expected FDIERROR_USER_ABORT, got %d\n", session.Error.erfOper); - ok(session.Error.fError == TRUE, "Expected TRUE, got %d\n", session.Error.fError); - ok(session.FileCount == 1, "Expected 1, got %d\n", session.FileCount); - ok(!lstrcmpA(session.CurrentFile, "dest\\a.txt"), - "Expected dest\\a.txt, got %s\n", session.CurrentFile); - } - ok(session.Error.erfType == 0, "Expected 0, got %d\n", session.Error.erfType); - ok(session.Operation == (EXTRACT_FILLFILELIST | EXTRACT_EXTRACTFILES), - "Expected EXTRACT_FILLFILELIST | EXTRACT_EXTRACTFILES, got %d\n", session.Operation); - ok(!lstrcmpA(session.Destination, "dest"), "Expected dest, got %s\n", session.Destination); - ok(!*session.Reserved, "Expected empty string, got %s\n", session.Reserved); - ok(!session.FilterList, "Expected empty filter list\n"); - ok(!DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to not exist\n"); - todo_wine - { - ok(!DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to not exist\n"); - ok(!DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to not exist\n"); - ok(!DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to not exist\n"); - ok(!check_list(&node, "testdir\\d.txt", FALSE), "list entry should not exist\n"); - ok(!check_list(&node, "testdir\\c.txt", FALSE), "list entry should not exist\n"); - ok(!check_list(&node, "b.txt", FALSE), "list entry should not exist\n"); - } - ok(!check_list(&node, "a.txt", FALSE), "list entry should not exist\n"); - free_file_list(&session); - - SetFileAttributesA("dest\\a.txt", FILE_ATTRIBUTE_NORMAL); - DeleteFileA("dest\\a.txt"); - - /* third file exists */ - createTestFile("dest\\testdir\\c.txt"); - SetFileAttributes("dest\\testdir\\c.txt", FILE_ATTRIBUTE_READONLY); - ZeroMemory(&session, sizeof(SESSION)); - lstrcpyA(session.Destination, "dest"); - session.Operation = EXTRACT_FILLFILELIST | EXTRACT_EXTRACTFILES; - res = pExtract(&session, "extract.cab"); - node = session.FileList; - todo_wine - { - ok(res == HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED) || res == E_FAIL, - "Expected HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED) or E_FAIL, got %08x\n", res); - ok(session.FileSize == 26, "Expected 26, got %d\n", session.FileSize); - ok(session.Error.erfOper == FDIERROR_USER_ABORT, - "Expected FDIERROR_USER_ABORT, got %d\n", session.Error.erfOper); - ok(session.Error.fError == TRUE, "Expected TRUE, got %d\n", session.Error.fError); - ok(session.FileCount == 3, "Expected 3, got %d\n", session.FileCount); - ok(!lstrcmpA(session.CurrentFile, "dest\\testdir\\c.txt"), - "Expected dest\\c.txt, got %s\n", session.CurrentFile); - } - ok(session.Error.erfType == 0, "Expected 0, got %d\n", session.Error.erfType); - ok(session.Operation == (EXTRACT_FILLFILELIST | EXTRACT_EXTRACTFILES), - "Expected EXTRACT_FILLFILELIST | EXTRACT_EXTRACTFILES, got %d\n", session.Operation); - ok(!lstrcmpA(session.Destination, "dest"), "Expected dest, got %s\n", session.Destination); - ok(!*session.Reserved, "Expected empty string, got %s\n", session.Reserved); - ok(!session.FilterList, "Expected empty filter list\n"); - ok(DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to exist\n"); - ok(DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to exist\n"); - ok(!DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to not exist\n"); - todo_wine - { - ok(!DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to not exist\n"); - ok(!check_list(&node, "testdir\\d.txt", FALSE), "list entry should not exist\n"); - } - ok(!check_list(&node, "testdir\\c.txt", FALSE), "list entry wrong\n"); - ok(!check_list(&node, "b.txt", FALSE), "list entry wrong\n"); - ok(!check_list(&node, "a.txt", TRUE), "list entry wrong\n"); - free_file_list(&session); - - SetFileAttributesA("dest\\testdir\\c.txt", FILE_ATTRIBUTE_NORMAL); - DeleteFileA("dest\\testdir\\c.txt"); - - ok(RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to exist\n"); - ok(RemoveDirectoryA("dest"), "Expected dest to exist\n"); -} - -START_TEST(extract) -{ - init_function_pointers(); - create_test_files(); - create_cab_file(); - - test_Extract(); - - delete_test_files(); -} diff --git a/rostests/winetests/cabinet/fdi.c b/rostests/winetests/cabinet/fdi.c deleted file mode 100644 index 5d470fade4c..00000000000 --- a/rostests/winetests/cabinet/fdi.c +++ /dev/null @@ -1,670 +0,0 @@ -/* - * Unit tests for the File Decompression Interface - * - * Copyright (C) 2006 James Hawkins - * - * 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 "fci.h" -#include "fdi.h" -#include "wine/test.h" - -/* make the max size large so there is only one cab file */ -#define MEDIA_SIZE 999999999 -#define FOLDER_THRESHOLD 900000 - -CHAR CURR_DIR[MAX_PATH]; - -/* FDI callbacks */ - -static void * CDECL fdi_alloc(ULONG cb) -{ - return HeapAlloc(GetProcessHeap(), 0, cb); -} - -static void * CDECL fdi_alloc_bad(ULONG cb) -{ - return NULL; -} - -static void CDECL fdi_free(void *pv) -{ - HeapFree(GetProcessHeap(), 0, pv); -} - -static INT_PTR CDECL fdi_open(char *pszFile, int oflag, int pmode) -{ - HANDLE handle; - handle = CreateFileA(pszFile, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, - OPEN_EXISTING, 0, NULL ); - if (handle == INVALID_HANDLE_VALUE) - return 0; - return (INT_PTR) handle; -} - -static UINT CDECL fdi_read(INT_PTR hf, void *pv, UINT cb) -{ - HANDLE handle = (HANDLE) hf; - DWORD dwRead; - if (ReadFile(handle, pv, cb, &dwRead, NULL)) - return dwRead; - return 0; -} - -static UINT CDECL fdi_write(INT_PTR hf, void *pv, UINT cb) -{ - HANDLE handle = (HANDLE) hf; - DWORD dwWritten; - if (WriteFile(handle, pv, cb, &dwWritten, NULL)) - return dwWritten; - return 0; -} - -static int CDECL fdi_close(INT_PTR hf) -{ - HANDLE handle = (HANDLE) hf; - return CloseHandle(handle) ? 0 : -1; -} - -static LONG CDECL fdi_seek(INT_PTR hf, LONG dist, int seektype) -{ - HANDLE handle = (HANDLE) hf; - return SetFilePointer(handle, dist, NULL, seektype); -} - -static void test_FDICreate(void) -{ - HFDI hfdi; - ERF erf; - - /* native crashes if pfnalloc is NULL */ - - /* FDICreate does not crash with a NULL pfnfree, - * but FDIDestroy will crash when it tries to access it. - */ - if (0) - { - SetLastError(0xdeadbeef); - erf.erfOper = 0xcafefeed; - erf.erfType = 0xdeadbabe; - erf.fError = 0xdecaface; - hfdi = FDICreate(fdi_alloc, NULL, fdi_open, fdi_read, - fdi_write, fdi_close, fdi_seek, - cpuUNKNOWN, &erf); - ok(hfdi != NULL, "Expected non-NULL context\n"); - ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); - ok(erf.erfOper == 0xcafefeed, "Expected 0xcafefeed, got %d\n", erf.erfOper); - ok(erf.erfType == 0xdeadbabe, "Expected 0xdeadbabe, got %d\n", erf.erfType); - ok(erf.fError == 0xdecaface, "Expected 0xdecaface, got %d\n", erf.fError); - - FDIDestroy(hfdi); - } - - SetLastError(0xdeadbeef); - erf.erfOper = 0xcafefeed; - erf.erfType = 0xdeadbabe; - erf.fError = 0xdecaface; - hfdi = FDICreate(fdi_alloc, fdi_free, NULL, fdi_read, - fdi_write, fdi_close, fdi_seek, - cpuUNKNOWN, &erf); - ok(hfdi != NULL, "Expected non-NULL context\n"); - ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); - ok((erf.erfOper == 0xcafefeed || erf.erfOper == 0 /* Vista */), "Expected 0xcafefeed or 0, got %d\n", erf.erfOper); - ok((erf.erfType == 0xdeadbabe || erf.erfType == 0 /* Vista */), "Expected 0xdeadbabe or 0, got %d\n", erf.erfType); - ok((erf.fError == 0xdecaface || erf.fError == 0 /* Vista */), "Expected 0xdecaface or 0, got %d\n", erf.fError); - - FDIDestroy(hfdi); - - SetLastError(0xdeadbeef); - erf.erfOper = 0xcafefeed; - erf.erfType = 0xdeadbabe; - erf.fError = 0xdecaface; - hfdi = FDICreate(fdi_alloc, fdi_free, fdi_open, NULL, - fdi_write, fdi_close, fdi_seek, - cpuUNKNOWN, &erf); - ok(hfdi != NULL, "Expected non-NULL context\n"); - ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); - ok((erf.erfOper == 0xcafefeed || erf.erfOper == 0 /* Vista */), "Expected 0xcafefeed or 0, got %d\n", erf.erfOper); - ok((erf.erfType == 0xdeadbabe || erf.erfType == 0 /* Vista */), "Expected 0xdeadbabe or 0, got %d\n", erf.erfType); - ok((erf.fError == 0xdecaface || erf.fError == 0 /* Vista */), "Expected 0xdecaface or 0, got %d\n", erf.fError); - - FDIDestroy(hfdi); - - SetLastError(0xdeadbeef); - erf.erfOper = 0xcafefeed; - erf.erfType = 0xdeadbabe; - erf.fError = 0xdecaface; - hfdi = FDICreate(fdi_alloc, fdi_free, fdi_open, fdi_read, - NULL, fdi_close, fdi_seek, - cpuUNKNOWN, &erf); - ok(hfdi != NULL, "Expected non-NULL context\n"); - ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); - ok((erf.erfOper == 0xcafefeed || erf.erfOper == 0 /* Vista */), "Expected 0xcafefeed or 0, got %d\n", erf.erfOper); - ok((erf.erfType == 0xdeadbabe || erf.erfType == 0 /* Vista */), "Expected 0xdeadbabe or 0, got %d\n", erf.erfType); - ok((erf.fError == 0xdecaface || erf.fError == 0 /* Vista */), "Expected 0xdecaface or 0, got %d\n", erf.fError); - - FDIDestroy(hfdi); - - SetLastError(0xdeadbeef); - erf.erfOper = 0xcafefeed; - erf.erfType = 0xdeadbabe; - erf.fError = 0xdecaface; - hfdi = FDICreate(fdi_alloc, fdi_free, fdi_open, fdi_read, - fdi_write, NULL, fdi_seek, - cpuUNKNOWN, &erf); - ok(hfdi != NULL, "Expected non-NULL context\n"); - ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); - ok((erf.erfOper == 0xcafefeed || erf.erfOper == 0 /* Vista */), "Expected 0xcafefeed or 0, got %d\n", erf.erfOper); - ok((erf.erfType == 0xdeadbabe || erf.erfType == 0 /* Vista */), "Expected 0xdeadbabe or 0, got %d\n", erf.erfType); - ok((erf.fError == 0xdecaface || erf.fError == 0 /* Vista */), "Expected 0xdecaface or 0, got %d\n", erf.fError); - - FDIDestroy(hfdi); - - SetLastError(0xdeadbeef); - erf.erfOper = 0xcafefeed; - erf.erfType = 0xdeadbabe; - erf.fError = 0xdecaface; - hfdi = FDICreate(fdi_alloc, fdi_free, fdi_open, fdi_read, - fdi_write, fdi_close, NULL, - cpuUNKNOWN, &erf); - ok(hfdi != NULL, "Expected non-NULL context\n"); - ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); - ok((erf.erfOper == 0xcafefeed || erf.erfOper == 0 /* Vista */), "Expected 0xcafefeed or 0, got %d\n", erf.erfOper); - ok((erf.erfType == 0xdeadbabe || erf.erfType == 0 /* Vista */), "Expected 0xdeadbabe or 0, got %d\n", erf.erfType); - ok((erf.fError == 0xdecaface || erf.fError == 0 /* Vista */), "Expected 0xdecaface or 0, got %d\n", erf.fError); - - FDIDestroy(hfdi); - - SetLastError(0xdeadbeef); - erf.erfOper = 0xcafefeed; - erf.erfType = 0xdeadbabe; - erf.fError = 0xdecaface; - hfdi = FDICreate(fdi_alloc, fdi_free, fdi_open, fdi_read, - fdi_write, fdi_close, fdi_seek, - cpuUNKNOWN, NULL); - /* XP sets hfdi to a non-NULL value, but Vista sets it to NULL! */ - ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); - /* NULL is passed to FDICreate instead of &erf, so don't retest the erf member values. */ - - FDIDestroy(hfdi); - - /* bad cpu type */ - SetLastError(0xdeadbeef); - erf.erfOper = 0xcafefeed; - erf.erfType = 0xdeadbabe; - erf.fError = 0xdecaface; - hfdi = FDICreate(fdi_alloc, fdi_free, fdi_open, fdi_read, - fdi_write, fdi_close, fdi_seek, - 0xcafebabe, &erf); - ok(hfdi != NULL, "Expected non-NULL context\n"); - ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); - ok((erf.erfOper == 0xcafefeed || erf.erfOper == 0 /* Vista */), "Expected 0xcafefeed or 0, got %d\n", erf.erfOper); - ok((erf.erfType == 0xdeadbabe || erf.erfType == 0 /* Vista */), "Expected 0xdeadbabe or 0, got %d\n", erf.erfType); - ok((erf.fError == 0xdecaface || erf.fError == 0 /* Vista */), "Expected 0xdecaface or 0, got %d\n", erf.fError); - - FDIDestroy(hfdi); - - /* pfnalloc fails */ - SetLastError(0xdeadbeef); - erf.erfOper = 0xcafefeed; - erf.erfType = 0xdeadbabe; - erf.fError = 0xdecaface; - hfdi = FDICreate(fdi_alloc_bad, fdi_free, fdi_open, fdi_read, - fdi_write, fdi_close, fdi_seek, - cpuUNKNOWN, &erf); - ok(hfdi == NULL, "Expected NULL context, got %p\n", hfdi); - ok(erf.erfOper == FDIERROR_ALLOC_FAIL, - "Expected FDIERROR_ALLOC_FAIL, got %d\n", erf.erfOper); - ok(erf.fError == TRUE, "Expected TRUE, got %d\n", erf.fError); - todo_wine - { - ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); - ok(erf.erfType == 0, "Expected 0, got %d\n", erf.erfType); - } -} - -static void test_FDIDestroy(void) -{ - HFDI hfdi; - ERF erf; - BOOL ret; - - /* native crashes if hfdi is NULL or invalid */ - - hfdi = FDICreate(fdi_alloc, fdi_free, fdi_open, fdi_read, - fdi_write, fdi_close, fdi_seek, - cpuUNKNOWN, &erf); - ok(hfdi != NULL, "Expected non-NULL context\n"); - - /* successfully destroy hfdi */ - ret = FDIDestroy(hfdi); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - /* native crashes if you try to destroy hfdi twice */ - if (0) - { - /* try to destroy hfdi again */ - ret = FDIDestroy(hfdi); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - } -} - -static void createTestFile(const CHAR *name) -{ - HANDLE file; - DWORD written; - - file = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "Failure to open file %s\n", name); - WriteFile(file, name, strlen(name), &written, NULL); - WriteFile(file, "\n", strlen("\n"), &written, NULL); - CloseHandle(file); -} - -static void create_test_files(void) -{ - DWORD len; - - len = GetCurrentDirectoryA(MAX_PATH, CURR_DIR); - - if(len && (CURR_DIR[len-1] == '\\')) - CURR_DIR[len-1] = 0; - - createTestFile("a.txt"); - createTestFile("b.txt"); - CreateDirectoryA("testdir", NULL); - createTestFile("testdir\\c.txt"); - createTestFile("testdir\\d.txt"); -} - -static void delete_test_files(void) -{ - DeleteFileA("a.txt"); - DeleteFileA("b.txt"); - DeleteFileA("testdir\\c.txt"); - DeleteFileA("testdir\\d.txt"); - RemoveDirectoryA("testdir"); - - DeleteFileA("extract.cab"); -} - -/* FCI callbacks */ - -static void * CDECL mem_alloc(ULONG cb) -{ - return HeapAlloc(GetProcessHeap(), 0, cb); -} - -static void CDECL mem_free(void *memory) -{ - HeapFree(GetProcessHeap(), 0, memory); -} - -static BOOL CDECL get_next_cabinet(PCCAB pccab, ULONG cbPrevCab, void *pv) -{ - return TRUE; -} - -static LONG CDECL progress(UINT typeStatus, ULONG cb1, ULONG cb2, void *pv) -{ - return 0; -} - -static int CDECL file_placed(PCCAB pccab, char *pszFile, LONG cbFile, - BOOL fContinuation, void *pv) -{ - return 0; -} - -static INT_PTR CDECL fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv) -{ - HANDLE handle; - DWORD dwAccess = 0; - DWORD dwShareMode = 0; - DWORD dwCreateDisposition = OPEN_EXISTING; - - dwAccess = GENERIC_READ | GENERIC_WRITE; - /* FILE_SHARE_DELETE is not supported by Windows Me/98/95 */ - dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE; - - if (GetFileAttributesA(pszFile) != INVALID_FILE_ATTRIBUTES) - dwCreateDisposition = OPEN_EXISTING; - else - dwCreateDisposition = CREATE_NEW; - - handle = CreateFileA(pszFile, dwAccess, dwShareMode, NULL, - dwCreateDisposition, 0, NULL); - - ok(handle != INVALID_HANDLE_VALUE, "Failed to CreateFile %s\n", pszFile); - - return (INT_PTR)handle; -} - -static UINT CDECL fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) -{ - HANDLE handle = (HANDLE)hf; - DWORD dwRead; - BOOL res; - - res = ReadFile(handle, memory, cb, &dwRead, NULL); - ok(res, "Failed to ReadFile\n"); - - return dwRead; -} - -static UINT CDECL fci_write(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) -{ - HANDLE handle = (HANDLE)hf; - DWORD dwWritten; - BOOL res; - - res = WriteFile(handle, memory, cb, &dwWritten, NULL); - ok(res, "Failed to WriteFile\n"); - - return dwWritten; -} - -static int CDECL fci_close(INT_PTR hf, int *err, void *pv) -{ - HANDLE handle = (HANDLE)hf; - ok(CloseHandle(handle), "Failed to CloseHandle\n"); - - return 0; -} - -static LONG CDECL fci_seek(INT_PTR hf, LONG dist, int seektype, int *err, void *pv) -{ - HANDLE handle = (HANDLE)hf; - DWORD ret; - - ret = SetFilePointer(handle, dist, NULL, seektype); - ok(ret != INVALID_SET_FILE_POINTER, "Failed to SetFilePointer\n"); - - return ret; -} - -static int CDECL fci_delete(char *pszFile, int *err, void *pv) -{ - BOOL ret = DeleteFileA(pszFile); - ok(ret, "Failed to DeleteFile %s\n", pszFile); - - return 0; -} - -static BOOL CDECL get_temp_file(char *pszTempName, int cbTempName, void *pv) -{ - LPSTR tempname; - - tempname = HeapAlloc(GetProcessHeap(), 0, MAX_PATH); - GetTempFileNameA(".", "xx", 0, tempname); - - if (tempname && (strlen(tempname) < (unsigned)cbTempName)) - { - lstrcpyA(pszTempName, tempname); - HeapFree(GetProcessHeap(), 0, tempname); - return TRUE; - } - - HeapFree(GetProcessHeap(), 0, tempname); - - return FALSE; -} - -static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime, - USHORT *pattribs, int *err, void *pv) -{ - BY_HANDLE_FILE_INFORMATION finfo; - FILETIME filetime; - HANDLE handle; - DWORD attrs; - BOOL res; - - handle = CreateFile(pszName, GENERIC_READ, FILE_SHARE_READ, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL); - - ok(handle != INVALID_HANDLE_VALUE, "Failed to CreateFile %s\n", pszName); - - res = GetFileInformationByHandle(handle, &finfo); - ok(res, "Expected GetFileInformationByHandle to succeed\n"); - - FileTimeToLocalFileTime(&finfo.ftLastWriteTime, &filetime); - FileTimeToDosDateTime(&filetime, pdate, ptime); - - attrs = GetFileAttributes(pszName); - ok(attrs != INVALID_FILE_ATTRIBUTES, "Failed to GetFileAttributes\n"); - /* fixme: should convert attrs to *pattribs, make sure - * have a test that catches the fact that we don't? - */ - - return (INT_PTR)handle; -} - -static void add_file(HFCI hfci, char *file) -{ - char path[MAX_PATH]; - BOOL res; - - lstrcpyA(path, CURR_DIR); - lstrcatA(path, "\\"); - lstrcatA(path, file); - - res = FCIAddFile(hfci, path, file, FALSE, get_next_cabinet, progress, - get_open_info, tcompTYPE_MSZIP); - ok(res, "Expected FCIAddFile to succeed\n"); -} - -static void set_cab_parameters(PCCAB pCabParams) -{ - ZeroMemory(pCabParams, sizeof(CCAB)); - - pCabParams->cb = MEDIA_SIZE; - pCabParams->cbFolderThresh = FOLDER_THRESHOLD; - pCabParams->setID = 0xbeef; - lstrcpyA(pCabParams->szCabPath, CURR_DIR); - lstrcatA(pCabParams->szCabPath, "\\"); - lstrcpyA(pCabParams->szCab, "extract.cab"); -} - -static void create_cab_file(void) -{ - CCAB cabParams; - HFCI hfci; - ERF erf; - static CHAR a_txt[] = "a.txt", - b_txt[] = "b.txt", - testdir_c_txt[] = "testdir\\c.txt", - testdir_d_txt[] = "testdir\\d.txt"; - BOOL res; - - set_cab_parameters(&cabParams); - - hfci = FCICreate(&erf, file_placed, mem_alloc, mem_free, fci_open, - fci_read, fci_write, fci_close, fci_seek, fci_delete, - get_temp_file, &cabParams, NULL); - - ok(hfci != NULL, "Failed to create an FCI context\n"); - - add_file(hfci, a_txt); - add_file(hfci, b_txt); - add_file(hfci, testdir_c_txt); - add_file(hfci, testdir_d_txt); - - res = FCIFlushCabinet(hfci, FALSE, get_next_cabinet, progress); - ok(res, "Failed to flush the cabinet\n"); - - res = FCIDestroy(hfci); - ok(res, "Failed to destroy the cabinet\n"); -} - -static void test_FDIIsCabinet(void) -{ - ERF erf; - BOOL ret; - HFDI hfdi; - INT_PTR fd; - FDICABINETINFO cabinfo; - char temp[] = "temp.txt"; - char extract[] = "extract.cab"; - - create_test_files(); - create_cab_file(); - - hfdi = FDICreate(fdi_alloc, fdi_free, fdi_open, fdi_read, - fdi_write, fdi_close, fdi_seek, - cpuUNKNOWN, &erf); - ok(hfdi != NULL, "Expected non-NULL context\n"); - - /* native crashes if hfdi or cabinfo are NULL or invalid */ - - /* invalid file handle */ - ZeroMemory(&cabinfo, sizeof(FDICABINETINFO)); - SetLastError(0xdeadbeef); - ret = FDIIsCabinet(hfdi, -1, &cabinfo); - ok(ret == FALSE, "Expected FALSE, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - ok(cabinfo.cbCabinet == 0, "Expected 0, got %d\n", cabinfo.cbCabinet); - ok(cabinfo.cFiles == 0, "Expected 0, got %d\n", cabinfo.cFiles); - ok(cabinfo.cFolders == 0, "Expected 0, got %d\n", cabinfo.cFolders); - ok(cabinfo.iCabinet == 0, "Expected 0, got %d\n", cabinfo.iCabinet); - ok(cabinfo.setID == 0, "Expected 0, got %d\n", cabinfo.setID); - - createTestFile("temp.txt"); - fd = fdi_open(temp, 0, 0); - - /* file handle doesn't point to a cabinet */ - ZeroMemory(&cabinfo, sizeof(FDICABINETINFO)); - SetLastError(0xdeadbeef); - ret = FDIIsCabinet(hfdi, fd, &cabinfo); - ok(ret == FALSE, "Expected FALSE, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); - ok(cabinfo.cbCabinet == 0, "Expected 0, got %d\n", cabinfo.cbCabinet); - ok(cabinfo.cFiles == 0, "Expected 0, got %d\n", cabinfo.cFiles); - ok(cabinfo.cFolders == 0, "Expected 0, got %d\n", cabinfo.cFolders); - ok(cabinfo.iCabinet == 0, "Expected 0, got %d\n", cabinfo.iCabinet); - ok(cabinfo.setID == 0, "Expected 0, got %d\n", cabinfo.setID); - - fdi_close(fd); - DeleteFileA("temp.txt"); - - /* try a real cab */ - fd = fdi_open(extract, 0, 0); - ZeroMemory(&cabinfo, sizeof(FDICABINETINFO)); - SetLastError(0xdeadbeef); - ret = FDIIsCabinet(hfdi, fd, &cabinfo); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); - ok(cabinfo.cFiles == 4, "Expected 4, got %d\n", cabinfo.cFiles); - ok(cabinfo.cFolders == 1, "Expected 1, got %d\n", cabinfo.cFolders); - ok(cabinfo.setID == 0xbeef, "Expected 0xbeef, got %d\n", cabinfo.setID); - todo_wine - { - ok(cabinfo.cbCabinet == 182, "Expected 182, got %d\n", cabinfo.cbCabinet); - ok(cabinfo.iCabinet == 0, "Expected 0, got %d\n", cabinfo.iCabinet); - } - - fdi_close(fd); - FDIDestroy(hfdi); - delete_test_files(); -} - - -static INT_PTR __cdecl CopyProgress(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin) -{ - return 0; -} - -static void test_FDICopy(void) -{ - CCAB cabParams; - HFDI hfdi; - HFCI hfci; - ERF erf; - BOOL ret; - char name[] = "extract.cab"; - char path[MAX_PATH + 1]; - - set_cab_parameters(&cabParams); - - hfci = FCICreate(&erf, file_placed, mem_alloc, mem_free, fci_open, - fci_read, fci_write, fci_close, fci_seek, - fci_delete, get_temp_file, &cabParams, NULL); - - ret = FCIFlushCabinet(hfci, FALSE, get_next_cabinet, progress); - ok(ret, "Failed to flush the cabinet\n"); - - FCIDestroy(hfci); - - lstrcpyA(path, CURR_DIR); - - /* path doesn't have a trailing backslash */ - if (lstrlenA(path) > 2) - { - hfdi = FDICreate(fdi_alloc, fdi_free, fdi_open, fdi_read, - fdi_write, fdi_close, fdi_seek, - cpuUNKNOWN, &erf); - - SetLastError(0xdeadbeef); - ret = FDICopy(hfdi, name, path, 0, CopyProgress, NULL, 0); - ok(ret == FALSE, "Expected FALSE, got %d\n", ret); - todo_wine - { - ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - } - - FDIDestroy(hfdi); - } - else - skip("Running on a root drive directory.\n"); - - lstrcatA(path, "\\"); - - hfdi = FDICreate(fdi_alloc, fdi_free, fdi_open, fdi_read, - fdi_write, fdi_close, fdi_seek, - cpuUNKNOWN, &erf); - - /* cabinet with no files or folders */ - SetLastError(0xdeadbeef); - ret = FDICopy(hfdi, name, path, 0, CopyProgress, NULL, 0); - todo_wine - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(GetLastError() == 0, "Expected 0f, got %d\n", GetLastError()); - - FDIDestroy(hfdi); - - DeleteFileA(name); -} - - -START_TEST(fdi) -{ - test_FDICreate(); - test_FDIDestroy(); - test_FDIIsCabinet(); - test_FDICopy(); -} diff --git a/rostests/winetests/cabinet/testlist.c b/rostests/winetests/cabinet/testlist.c deleted file mode 100644 index 992cd35d4ef..00000000000 --- a/rostests/winetests/cabinet/testlist.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_extract(void); -extern void func_fdi(void); - -const struct test winetest_testlist[] = -{ - { "extract", func_extract }, - { "fdi", func_fdi }, - { 0, 0 } -}; diff --git a/rostests/winetests/comcat/CMakeLists.txt b/rostests/winetests/comcat/CMakeLists.txt deleted file mode 100644 index e92825bed81..00000000000 --- a/rostests/winetests/comcat/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(comcat_winetest comcat.c testlist.c) -target_link_libraries(comcat_winetest wine uuid) -set_module_type(comcat_winetest win32cui) -add_importlibs(comcat_winetest ole32 advapi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET comcat_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/comcat/comcat.c b/rostests/winetests/comcat/comcat.c deleted file mode 100644 index 029d2e30ab3..00000000000 --- a/rostests/winetests/comcat/comcat.c +++ /dev/null @@ -1,133 +0,0 @@ -/* - * tests for comcat functions - * - * Copyright 2006 Aric Stewart 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 - */ - -#define COBJMACROS - -#include -#include -#include - -#include "objbase.h" -#include "comcat.h" - -#include "wine/test.h" - -#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr) - -static BOOL register_testentry(void) -{ - HKEY hkey = 0, hkey2 = 0; - DWORD ret; - - ret = RegCreateKeyA(HKEY_CLASSES_ROOT,"CLSID\\{deadcafe-beed-bead-dead-cafebeaddead}", &hkey); - if (!ret) ret = RegSetValueA(hkey,NULL,REG_SZ,"ComCat Test key",16); - if (!ret) ret = RegCreateKeyA(hkey, - "Implemented Categories\\{deadcafe-0000-0000-0000-000000000000}", - &hkey2); - RegCloseKey(hkey); - RegCloseKey(hkey2); - return !ret; -} - -static void unregister_testentry(void) -{ - RegDeleteKeyA(HKEY_CLASSES_ROOT, - "CLSID\\{deadcafe-beed-bead-dead-cafebeaddead}\\Implemented Categories\\{deadcafe-0000-0000-0000-000000000000}"); - RegDeleteKeyA(HKEY_CLASSES_ROOT, - "CLSID\\{deadcafe-beed-bead-dead-cafebeaddead}\\Implemented Categories"); - RegDeleteKeyA(HKEY_CLASSES_ROOT, - "CLSID\\{deadcafe-beed-bead-dead-cafebeaddead}"); -} - -static void do_enum(void) -{ - HRESULT hr; - REFCLSID rclsid = &CLSID_StdComponentCategoriesMgr; - ICatInformation *pICat = (ICatInformation*)0xdeadbeef; - GUID the_guid[1]; - GUID the_cat[1]; - GUID wanted_guid; - ULONG fetched = -1; - - static WCHAR szCatID[] = { - '{', - 'd','e','a','d','c','a','f','e', - '-','0','0','0','0','-','0','0','0','0', - '-','0','0','0','0', - '-','0','0','0','0','0','0','0','0','0','0','0','0', - '}',0}; - static WCHAR szGuid[] = { - '{', - 'd','e','a','d','c','a','f','e','-', - 'b','e','e','d','-', - 'b','e','a','d','-', - 'd','e','a','d','-', - 'c','a','f','e','b','e','a','d','d','e','a','d', - '}',0}; - - IEnumCLSID *pIEnum =(IEnumCLSID*)0xdeadcafe; - - CLSIDFromString(szCatID,the_cat); - CLSIDFromString(szGuid,&wanted_guid); - - OleInitialize(NULL); - - hr = CoCreateInstance(rclsid,NULL,CLSCTX_INPROC_SERVER, - &IID_ICatInformation, (void **)&pICat); - ok_ole_success(hr, "CoCreateInstance"); - - hr = ICatInformation_EnumClassesOfCategories(pICat, -1, NULL, -1, NULL, - &pIEnum); - ok_ole_success(hr,"ICatInformation_EnumClassesOfCategories"); - - IEnumGUID_Release(pIEnum); - - hr = ICatInformation_EnumClassesOfCategories(pICat, 1, the_cat, -1, NULL, - &pIEnum); - ok_ole_success(hr,"ICatInformation_EnumClassesOfCategories"); - - hr = IEnumGUID_Next(pIEnum,1,the_guid, &fetched); - ok (fetched == 0,"Fetched wrong number of guids %u\n",fetched); - IEnumGUID_Release(pIEnum); - - if (register_testentry()) - { - hr = ICatInformation_EnumClassesOfCategories(pICat, 1, the_cat, -1, NULL, &pIEnum); - ok_ole_success(hr,"ICatInformation_EnumClassesOfCategories"); - - hr = IEnumGUID_Next(pIEnum,1,the_guid, &fetched); - ok (fetched == 1,"Fetched wrong number of guids %u\n",fetched); - ok (IsEqualGUID(the_guid,&wanted_guid),"Guids do not match\n"); - - IEnumGUID_Release(pIEnum); - unregister_testentry(); - } - else skip( "Could not register the test category\n" ); - - ICatInformation_Release(pICat); - - OleUninitialize(); -} - - -START_TEST(comcat) -{ - do_enum(); -} diff --git a/rostests/winetests/comcat/comcat.rbuild b/rostests/winetests/comcat/comcat.rbuild deleted file mode 100644 index f6f98c32876..00000000000 --- a/rostests/winetests/comcat/comcat.rbuild +++ /dev/null @@ -1,15 +0,0 @@ - - - - - . - - comcat.c - testlist.c - wine - ole32 - advapi32 - uuid - ntdll - - diff --git a/rostests/winetests/comcat/testlist.c b/rostests/winetests/comcat/testlist.c deleted file mode 100644 index ba94e96b2a6..00000000000 --- a/rostests/winetests/comcat/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_comcat(void); - -const struct test winetest_testlist[] = -{ - { "comcat", func_comcat }, - { 0, 0 } -}; diff --git a/rostests/winetests/comctl32/CMakeLists.txt b/rostests/winetests/comctl32/CMakeLists.txt deleted file mode 100644 index 72dd0a5bb13..00000000000 --- a/rostests/winetests/comctl32/CMakeLists.txt +++ /dev/null @@ -1,49 +0,0 @@ - -add_definitions(-D__ROS_LONG64__) - -remove_definitions(-D_WIN32_WINNT=0x502) -add_definitions(-D_WIN32_WINNT=0x600) - -remove_definitions(-D_WIN32_IE=0x600) -add_definitions(-D_WIN32_IE=0x500) - -set_rc_compiler() - -list(APPEND SOURCE - comboex.c - datetime.c - dpa.c - header.c - imagelist.c - ipaddress.c - listview.c - misc.c - monthcal.c - mru.c - progress.c - propsheet.c - rebar.c - status.c - subclass.c - tab.c - toolbar.c - tooltips.c - trackbar.c - treeview.c - updown.c - testlist.c - rsrc.rc) - -add_executable(comctl32_winetest ${SOURCE}) -target_link_libraries(comctl32_winetest wine) - -if(MSVC) - target_link_libraries(comctl32_winetest uuid) -else() - add_target_compile_flags(comctl32_winetest "-Wno-format") - allow_warnings(comctl32_winetest) -endif() - -set_module_type(comctl32_winetest win32cui) -add_importlibs(comctl32_winetest comctl32 ole32 user32 gdi32 advapi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET comctl32_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/comctl32/bmp128x15.bmp b/rostests/winetests/comctl32/bmp128x15.bmp deleted file mode 100644 index 85061b45f38..00000000000 Binary files a/rostests/winetests/comctl32/bmp128x15.bmp and /dev/null differ diff --git a/rostests/winetests/comctl32/bmp80x15.bmp b/rostests/winetests/comctl32/bmp80x15.bmp deleted file mode 100644 index c524d71b9a6..00000000000 Binary files a/rostests/winetests/comctl32/bmp80x15.bmp and /dev/null differ diff --git a/rostests/winetests/comctl32/comboex.c b/rostests/winetests/comctl32/comboex.c deleted file mode 100644 index f9a42dfe604..00000000000 --- a/rostests/winetests/comctl32/comboex.c +++ /dev/null @@ -1,534 +0,0 @@ -/* Unit test suite for comboex control. - * - * Copyright 2005 Jason Edmeades - * - * 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 "wine/test.h" -#include "msg.h" - -#define EDITBOX_SEQ_INDEX 0 -#define NUM_MSG_SEQUENCES 1 - -#define EDITBOX_ID 0 - -#define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got) - -static struct msg_sequence *sequences[NUM_MSG_SEQUENCES]; - -static HWND hComboExParentWnd; -static HINSTANCE hMainHinst; -static const char ComboExTestClass[] = "ComboExTestClass"; - -static BOOL (WINAPI *pSetWindowSubclass)(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR); - -#define MAX_CHARS 100 -static char *textBuffer = NULL; - -static HWND createComboEx(DWORD style) { - return CreateWindowExA(0, WC_COMBOBOXEXA, NULL, style, 0, 0, 300, 300, - hComboExParentWnd, NULL, hMainHinst, NULL); -} - -static LONG addItem(HWND cbex, int idx, LPTSTR text) { - COMBOBOXEXITEM cbexItem; - memset(&cbexItem, 0x00, sizeof(cbexItem)); - cbexItem.mask = CBEIF_TEXT; - cbexItem.iItem = idx; - cbexItem.pszText = text; - cbexItem.cchTextMax = 0; - return SendMessage(cbex, CBEM_INSERTITEM, 0, (LPARAM)&cbexItem); -} - -static LONG setItem(HWND cbex, int idx, LPTSTR text) { - COMBOBOXEXITEM cbexItem; - memset(&cbexItem, 0x00, sizeof(cbexItem)); - cbexItem.mask = CBEIF_TEXT; - cbexItem.iItem = idx; - cbexItem.pszText = text; - cbexItem.cchTextMax = 0; - return SendMessage(cbex, CBEM_SETITEM, 0, (LPARAM)&cbexItem); -} - -static LONG delItem(HWND cbex, int idx) { - return SendMessage(cbex, CBEM_DELETEITEM, idx, 0); -} - -static LONG getItem(HWND cbex, int idx, COMBOBOXEXITEM *cbItem) { - memset(cbItem, 0x00, sizeof(COMBOBOXEXITEM)); - cbItem->mask = CBEIF_TEXT; - cbItem->pszText = textBuffer; - cbItem->iItem = idx; - cbItem->cchTextMax = 100; - return SendMessage(cbex, CBEM_GETITEM, 0, (LPARAM)cbItem); -} - -static LRESULT WINAPI editbox_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - WNDPROC oldproc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA); - static LONG defwndproc_counter = 0; - LRESULT ret; - struct message msg; - - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - msg.id = EDITBOX_ID; - - if (message != WM_PAINT && - message != WM_ERASEBKGND && - message != WM_NCPAINT && - message != WM_NCHITTEST && - message != WM_GETTEXT && - message != WM_GETICON && - message != WM_DEVICECHANGE) - { - add_message(sequences, EDITBOX_SEQ_INDEX, &msg); - } - - defwndproc_counter++; - ret = CallWindowProcA(oldproc, hwnd, message, wParam, lParam); - defwndproc_counter--; - return ret; -} - -static HWND subclass_editbox(HWND hwndComboEx) -{ - WNDPROC oldproc; - HWND hwnd; - - hwnd = (HWND)SendMessage(hwndComboEx, CBEM_GETEDITCONTROL, 0, 0); - oldproc = (WNDPROC)SetWindowLongPtrA(hwnd, GWLP_WNDPROC, - (LONG_PTR)editbox_subclass_proc); - SetWindowLongPtrA(hwnd, GWLP_USERDATA, (LONG_PTR)oldproc); - - return hwnd; -} - -static void test_comboboxex(void) { - HWND myHwnd = 0; - LONG res = -1; - COMBOBOXEXITEM cbexItem; - static TCHAR first_item[] = {'F','i','r','s','t',' ','I','t','e','m',0}, - second_item[] = {'S','e','c','o','n','d',' ','I','t','e','m',0}, - third_item[] = {'T','h','i','r','d',' ','I','t','e','m',0}, - middle_item[] = {'B','e','t','w','e','e','n',' ','F','i','r','s','t',' ','a','n','d',' ', - 'S','e','c','o','n','d',' ','I','t','e','m','s',0}, - replacement_item[] = {'B','e','t','w','e','e','n',' ','F','i','r','s','t',' ','a','n','d',' ', - 'S','e','c','o','n','d',' ','I','t','e','m','s',0}, - out_of_range_item[] = {'O','u','t',' ','o','f',' ','R','a','n','g','e',' ','I','t','e','m',0}; - - /* Allocate space for result */ - textBuffer = HeapAlloc(GetProcessHeap(), 0, MAX_CHARS); - - /* Basic comboboxex test */ - myHwnd = createComboEx(WS_BORDER | WS_VISIBLE | WS_CHILD | CBS_DROPDOWN); - - /* Add items onto the end of the combobox */ - res = addItem(myHwnd, -1, first_item); - ok(res == 0, "Adding simple item failed (%d)\n", res); - res = addItem(myHwnd, -1, second_item); - ok(res == 1, "Adding simple item failed (%d)\n", res); - res = addItem(myHwnd, 2, third_item); - ok(res == 2, "Adding simple item failed (%d)\n", res); - res = addItem(myHwnd, 1, middle_item); - ok(res == 1, "Inserting simple item failed (%d)\n", res); - - /* Add an item completely out of range */ - res = addItem(myHwnd, 99, out_of_range_item); - ok(res == -1, "Adding using out of range index worked unexpectedly (%d)\n", res); - res = addItem(myHwnd, 5, out_of_range_item); - ok(res == -1, "Adding using out of range index worked unexpectedly (%d)\n", res); - /* Removed: Causes traps on Windows XP - res = addItem(myHwnd, -2, "Out Of Range Item"); - ok(res == -1, "Adding out of range worked unexpectedly (%ld)\n", res); - */ - - /* Get an item completely out of range */ - res = getItem(myHwnd, 99, &cbexItem); - ok(res == 0, "Getting item using out of range index worked unexpectedly (%d, %s)\n", res, cbexItem.pszText); - res = getItem(myHwnd, 4, &cbexItem); - ok(res == 0, "Getting item using out of range index worked unexpectedly (%d, %s)\n", res, cbexItem.pszText); - res = getItem(myHwnd, -2, &cbexItem); - ok(res == 0, "Getting item using out of range index worked unexpectedly (%d, %s)\n", res, cbexItem.pszText); - - /* Get an item in range */ - res = getItem(myHwnd, 0, &cbexItem); - ok(res != 0, "Getting item using valid index failed unexpectedly (%d)\n", res); - ok(strcmp(first_item, cbexItem.pszText) == 0, "Getting item returned wrong string (%s)\n", cbexItem.pszText); - - res = getItem(myHwnd, 1, &cbexItem); - ok(res != 0, "Getting item using valid index failed unexpectedly (%d)\n", res); - ok(strcmp(middle_item, cbexItem.pszText) == 0, "Getting item returned wrong string (%s)\n", cbexItem.pszText); - - res = getItem(myHwnd, 2, &cbexItem); - ok(res != 0, "Getting item using valid index failed unexpectedly (%d)\n", res); - ok(strcmp(second_item, cbexItem.pszText) == 0, "Getting item returned wrong string (%s)\n", cbexItem.pszText); - - res = getItem(myHwnd, 3, &cbexItem); - ok(res != 0, "Getting item using valid index failed unexpectedly (%d)\n", res); - ok(strcmp(third_item, cbexItem.pszText) == 0, "Getting item returned wrong string (%s)\n", cbexItem.pszText); - - /* Set an item completely out of range */ - res = setItem(myHwnd, 99, replacement_item); - ok(res == 0, "Setting item using out of range index worked unexpectedly (%d)\n", res); - res = setItem(myHwnd, 4, replacement_item); - ok(res == 0, "Setting item using out of range index worked unexpectedly (%d)\n", res); - res = setItem(myHwnd, -2, replacement_item); - ok(res == 0, "Setting item using out of range index worked unexpectedly (%d)\n", res); - - /* Set an item in range */ - res = setItem(myHwnd, 0, replacement_item); - ok(res != 0, "Setting first item failed (%d)\n", res); - res = setItem(myHwnd, 3, replacement_item); - ok(res != 0, "Setting last item failed (%d)\n", res); - - /* Remove items completely out of range (4 items in control at this point) */ - res = delItem(myHwnd, -1); - ok(res == CB_ERR, "Deleting using out of range index worked unexpectedly (%d)\n", res); - res = delItem(myHwnd, 4); - ok(res == CB_ERR, "Deleting using out of range index worked unexpectedly (%d)\n", res); - - /* Remove items in range (4 items in control at this point) */ - res = delItem(myHwnd, 3); - ok(res == 3, "Deleting using out of range index failed (%d)\n", res); - res = delItem(myHwnd, 0); - ok(res == 2, "Deleting using out of range index failed (%d)\n", res); - res = delItem(myHwnd, 0); - ok(res == 1, "Deleting using out of range index failed (%d)\n", res); - res = delItem(myHwnd, 0); - ok(res == 0, "Deleting using out of range index failed (%d)\n", res); - - /* Remove from an empty box */ - res = delItem(myHwnd, 0); - ok(res == CB_ERR, "Deleting using out of range index worked unexpectedly (%d)\n", res); - - - /* Cleanup */ - HeapFree(GetProcessHeap(), 0, textBuffer); - DestroyWindow(myHwnd); -} - -static void test_WM_LBUTTONDOWN(void) -{ - HWND hComboEx, hCombo, hEdit, hList; - COMBOBOXINFO cbInfo; - UINT x, y, item_height; - LRESULT result; - int i, idx; - RECT rect; - WCHAR buffer[3]; - static const UINT choices[] = {8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72}; - static const WCHAR stringFormat[] = {'%','2','d','\0'}; - BOOL (WINAPI *pGetComboBoxInfo)(HWND, PCOMBOBOXINFO); - - pGetComboBoxInfo = (void*)GetProcAddress(GetModuleHandleA("user32.dll"), "GetComboBoxInfo"); - if (!pGetComboBoxInfo){ - win_skip("GetComboBoxInfo is not available\n"); - return; - } - - hComboEx = CreateWindowExA(0, WC_COMBOBOXEXA, NULL, - WS_VISIBLE|WS_CHILD|CBS_DROPDOWN, 0, 0, 200, 150, - hComboExParentWnd, NULL, hMainHinst, NULL); - - for (i = 0; i < sizeof(choices)/sizeof(UINT); i++){ - COMBOBOXEXITEMW cbexItem; - wsprintfW(buffer, stringFormat, choices[i]); - - memset(&cbexItem, 0x00, sizeof(cbexItem)); - cbexItem.mask = CBEIF_TEXT; - cbexItem.iItem = i; - cbexItem.pszText = buffer; - cbexItem.cchTextMax = 0; - ok(SendMessageW(hComboEx, CBEM_INSERTITEMW, 0, (LPARAM)&cbexItem) >= 0, - "Failed to add item %d\n", i); - } - - hCombo = (HWND)SendMessage(hComboEx, CBEM_GETCOMBOCONTROL, 0, 0); - hEdit = (HWND)SendMessage(hComboEx, CBEM_GETEDITCONTROL, 0, 0); - - cbInfo.cbSize = sizeof(COMBOBOXINFO); - result = pGetComboBoxInfo(hCombo, &cbInfo); - ok(result, "Failed to get combobox info structure. LastError=%d\n", - GetLastError()); - hList = cbInfo.hwndList; - - trace("hWnd=%p, hComboEx=%p, hCombo=%p, hList=%p, hEdit=%p\n", - hComboExParentWnd, hComboEx, hCombo, hList, hEdit); - ok(GetFocus() == hComboExParentWnd, - "Focus not on Main Window, instead on %p\n", GetFocus()); - - /* Click on the button to drop down the list */ - x = cbInfo.rcButton.left + (cbInfo.rcButton.right-cbInfo.rcButton.left)/2; - y = cbInfo.rcButton.top + (cbInfo.rcButton.bottom-cbInfo.rcButton.top)/2; - result = SendMessage(hCombo, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y)); - ok(result, "WM_LBUTTONDOWN was not processed. LastError=%d\n", - GetLastError()); - ok(GetFocus() == hCombo || - broken(GetFocus() != hCombo), /* win98 */ - "Focus not on ComboBoxEx's ComboBox Control, instead on %p\n", - GetFocus()); - ok(SendMessage(hComboEx, CB_GETDROPPEDSTATE, 0, 0), - "The dropdown list should have appeared after clicking the button.\n"); - idx = SendMessage(hCombo, CB_GETTOPINDEX, 0, 0); - ok(idx == 0, "For TopIndex expected %d, got %d\n", 0, idx); - - result = SendMessage(hCombo, WM_LBUTTONUP, 0, MAKELPARAM(x, y)); - ok(result, "WM_LBUTTONUP was not processed. LastError=%d\n", - GetLastError()); - ok(GetFocus() == hCombo || - broken(GetFocus() != hCombo), /* win98 */ - "Focus not on ComboBoxEx's ComboBox Control, instead on %p\n", - GetFocus()); - - /* Click on the 5th item in the list */ - item_height = SendMessage(hCombo, CB_GETITEMHEIGHT, 0, 0); - ok(GetClientRect(hList, &rect), "Failed to get list's client rect.\n"); - x = rect.left + (rect.right-rect.left)/2; - y = item_height/2 + item_height*4; - result = SendMessage(hList, WM_MOUSEMOVE, 0, MAKELPARAM(x, y)); - ok(!result, "WM_MOUSEMOVE was not processed. LastError=%d\n", - GetLastError()); - ok(GetFocus() == hCombo || - broken(GetFocus() != hCombo), /* win98 */ - "Focus not on ComboBoxEx's ComboBox Control, instead on %p\n", - GetFocus()); - - result = SendMessage(hList, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y)); - ok(!result, "WM_LBUTTONDOWN was not processed. LastError=%d\n", - GetLastError()); - ok(GetFocus() == hCombo || - broken(GetFocus() != hCombo), /* win98 */ - "Focus not on ComboBoxEx's ComboBox Control, instead on %p\n", - GetFocus()); - ok(SendMessage(hComboEx, CB_GETDROPPEDSTATE, 0, 0), - "The dropdown list should still be visible.\n"); - - result = SendMessage(hList, WM_LBUTTONUP, 0, MAKELPARAM(x, y)); - ok(!result, "WM_LBUTTONUP was not processed. LastError=%d\n", - GetLastError()); - todo_wine ok(GetFocus() == hEdit || - broken(GetFocus() == hCombo), /* win98 */ - "Focus not on ComboBoxEx's Edit Control, instead on %p\n", - GetFocus()); - - result = SendMessage(hCombo, CB_GETDROPPEDSTATE, 0, 0); - ok(!result || - broken(result != 0), /* win98 */ - "The dropdown list should have been rolled up.\n"); - idx = SendMessage(hComboEx, CB_GETCURSEL, 0, 0); - ok(idx == 4 || - broken(idx == -1), /* win98 */ - "Current Selection: expected %d, got %d\n", 4, idx); - - DestroyWindow(hComboEx); -} - -static void test_CB_GETLBTEXT(void) -{ - HWND hCombo; - CHAR buff[1]; - COMBOBOXEXITEMA item; - LRESULT ret; - - hCombo = createComboEx(WS_BORDER | WS_VISIBLE | WS_CHILD | CBS_DROPDOWN); - - /* set text to null */ - addItem(hCombo, 0, NULL); - - buff[0] = 'a'; - item.mask = CBEIF_TEXT; - item.iItem = 0; - item.pszText = buff; - item.cchTextMax = 1; - ret = SendMessage(hCombo, CBEM_GETITEMA, 0, (LPARAM)&item); - ok(ret != 0, "CBEM_GETITEM failed\n"); - ok(buff[0] == 0, "\n"); - - ret = SendMessage(hCombo, CB_GETLBTEXTLEN, 0, 0); - ok(ret == 0, "Expected zero length\n"); - - ret = SendMessage(hCombo, CB_GETLBTEXTLEN, 0, 0); - ok(ret == 0, "Expected zero length\n"); - - buff[0] = 'a'; - ret = SendMessage(hCombo, CB_GETLBTEXT, 0, (LPARAM)buff); - ok(ret == 0, "Expected zero length\n"); - ok(buff[0] == 0, "Expected null terminator as a string, got %s\n", buff); - - DestroyWindow(hCombo); -} - -static LRESULT CALLBACK ComboExTestWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch(msg) { - - case WM_DESTROY: - PostQuitMessage(0); - break; - - default: - return DefWindowProcA(hWnd, msg, wParam, lParam); - } - - return 0L; -} - -static int init(void) -{ - HMODULE hComctl32; - BOOL (WINAPI *pInitCommonControlsEx)(const INITCOMMONCONTROLSEX*); - WNDCLASSA wc; - INITCOMMONCONTROLSEX iccex; - - hComctl32 = GetModuleHandleA("comctl32.dll"); - pInitCommonControlsEx = (void*)GetProcAddress(hComctl32, "InitCommonControlsEx"); - if (!pInitCommonControlsEx) - { - win_skip("InitCommonControlsEx() is missing. Skipping the tests\n"); - return 0; - } - iccex.dwSize = sizeof(iccex); - iccex.dwICC = ICC_USEREX_CLASSES; - pInitCommonControlsEx(&iccex); - - pSetWindowSubclass = (void*)GetProcAddress(hComctl32, (LPSTR)410); - - wc.style = CS_HREDRAW | CS_VREDRAW; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = GetModuleHandleA(NULL); - wc.hIcon = NULL; - wc.hCursor = LoadCursorA(NULL, IDC_ARROW); - wc.hbrBackground = GetSysColorBrush(COLOR_WINDOW); - wc.lpszMenuName = NULL; - wc.lpszClassName = ComboExTestClass; - wc.lpfnWndProc = ComboExTestWndProc; - RegisterClassA(&wc); - - hComboExParentWnd = CreateWindowExA(0, ComboExTestClass, "ComboEx test", WS_OVERLAPPEDWINDOW|WS_VISIBLE, - CW_USEDEFAULT, CW_USEDEFAULT, 680, 260, NULL, NULL, GetModuleHandleA(NULL), 0); - assert(hComboExParentWnd != NULL); - - hMainHinst = GetModuleHandleA(NULL); - return 1; -} - -static void cleanup(void) -{ - MSG msg; - - PostMessageA(hComboExParentWnd, WM_CLOSE, 0, 0); - while (GetMessageA(&msg,0,0,0)) { - TranslateMessage(&msg); - DispatchMessageA(&msg); - } - - DestroyWindow(hComboExParentWnd); - UnregisterClassA(ComboExTestClass, GetModuleHandleA(NULL)); -} - -static void test_comboboxex_subclass(void) -{ - HWND hComboEx, hCombo, hEdit; - - hComboEx = createComboEx(WS_BORDER | WS_VISIBLE | WS_CHILD | CBS_DROPDOWN); - - hCombo = (HWND)SendMessage(hComboEx, CBEM_GETCOMBOCONTROL, 0, 0); - ok(hCombo != NULL, "Failed to get internal combo\n"); - hEdit = (HWND)SendMessage(hComboEx, CBEM_GETEDITCONTROL, 0, 0); - ok(hEdit != NULL, "Failed to get internal edit\n"); - - if (pSetWindowSubclass) - { - ok(GetPropA(hCombo, "CC32SubclassInfo") != NULL, "Expected CC32SubclassInfo property\n"); - ok(GetPropA(hEdit, "CC32SubclassInfo") != NULL, "Expected CC32SubclassInfo property\n"); - } - - DestroyWindow(hComboEx); -} - -static const struct message test_setitem_edit_seq[] = { - { WM_SETTEXT, sent|id, 0, 0, EDITBOX_ID }, - { EM_SETSEL, sent|id|wparam|lparam, 0, 0, EDITBOX_ID }, - { EM_SETSEL, sent|id|wparam|lparam, 0, -1, EDITBOX_ID }, - { 0 } -}; - -static void test_get_set_item(void) -{ - char textA[] = "test"; - HWND hComboEx; - COMBOBOXEXITEMA item; - BOOL ret; - - hComboEx = createComboEx(WS_BORDER | WS_VISIBLE | WS_CHILD | CBS_DROPDOWN); - - subclass_editbox(hComboEx); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - memset(&item, 0, sizeof(item)); - item.mask = CBEIF_TEXT; - item.pszText = textA; - item.iItem = -1; - ret = SendMessage(hComboEx, CBEM_SETITEMA, 0, (LPARAM)&item); - expect(TRUE, ret); - - ok_sequence(sequences, EDITBOX_SEQ_INDEX, test_setitem_edit_seq, "set item data for edit", FALSE); - - /* get/set lParam */ - item.mask = CBEIF_LPARAM; - item.iItem = -1; - item.lParam = 0xdeadbeef; - ret = SendMessage(hComboEx, CBEM_GETITEMA, 0, (LPARAM)&item); - expect(TRUE, ret); - ok(item.lParam == 0, "Expected zero, got %ld\n", item.lParam); - - item.lParam = 0xdeadbeef; - ret = SendMessage(hComboEx, CBEM_SETITEMA, 0, (LPARAM)&item); - expect(TRUE, ret); - - item.lParam = 0; - ret = SendMessage(hComboEx, CBEM_GETITEMA, 0, (LPARAM)&item); - expect(TRUE, ret); - ok(item.lParam == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", item.lParam); - - DestroyWindow(hComboEx); -} - -START_TEST(comboex) -{ - if (!init()) - return; - - init_msg_sequences(sequences, NUM_MSG_SEQUENCES); - - test_comboboxex(); - test_WM_LBUTTONDOWN(); - test_CB_GETLBTEXT(); - test_comboboxex_subclass(); - test_get_set_item(); - - cleanup(); -} diff --git a/rostests/winetests/comctl32/comctl32.rbuild b/rostests/winetests/comctl32/comctl32.rbuild deleted file mode 100644 index d1e44b5de16..00000000000 --- a/rostests/winetests/comctl32/comctl32.rbuild +++ /dev/null @@ -1,40 +0,0 @@ - - - - - . - - 0x0600 - 0x0500 - comboex.c - datetime.c - dpa.c - header.c - imagelist.c - ipaddress.c - listview.c - misc.c - monthcal.c - mru.c - progress.c - propsheet.c - rebar.c - status.c - subclass.c - tab.c - toolbar.c - tooltips.c - trackbar.c - treeview.c - updown.c - rsrc.rc - testlist.c - wine - comctl32 - ole32 - user32 - gdi32 - advapi32 - ntdll - - diff --git a/rostests/winetests/comctl32/datetime.c b/rostests/winetests/comctl32/datetime.c deleted file mode 100644 index a97ab342dae..00000000000 --- a/rostests/winetests/comctl32/datetime.c +++ /dev/null @@ -1,733 +0,0 @@ -/* Unit test suite for datetime control. -* -* Copyright 2007 Kanit Therdsteerasukdi -* -* 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 "wine/test.h" -#include "msg.h" - -#define expect(EXPECTED, GOT) ok((GOT)==(EXPECTED), "Expected %d, got %ld\n", (EXPECTED), (GOT)) - -#define expect_unsuccess(EXPECTED, GOT) ok((GOT)==(EXPECTED), "Expected %d(unsuccessful), got %ld(successful)\n", (EXPECTED), (GOT)) - -#define NUM_MSG_SEQUENCES 1 -#define DATETIME_SEQ_INDEX 0 - -static struct msg_sequence *sequences[NUM_MSG_SEQUENCES]; - -static const struct message test_dtm_set_format_seq[] = { - { DTM_SETFORMATA, sent|wparam|lparam, 0, 0 }, - { DTM_SETFORMATA, sent|wparam, 0 }, - { 0 } -}; - -static const struct message test_dtm_set_and_get_mccolor_seq[] = { - { DTM_SETMCCOLOR, sent|wparam|lparam, MCSC_BACKGROUND, 0 }, - { DTM_SETMCCOLOR, sent|wparam|lparam, MCSC_BACKGROUND, RGB(255, 255, 255) }, - { DTM_SETMCCOLOR, sent|wparam|lparam, MCSC_BACKGROUND, RGB(100, 180, 220) }, - { DTM_GETMCCOLOR, sent|wparam|lparam, MCSC_BACKGROUND, 0 }, - { DTM_SETMCCOLOR, sent|wparam|lparam, MCSC_MONTHBK, 0 }, - { DTM_SETMCCOLOR, sent|wparam|lparam, MCSC_MONTHBK, RGB(255, 255, 255) }, - { DTM_SETMCCOLOR, sent|wparam|lparam, MCSC_MONTHBK, RGB(100, 180, 220) }, - { DTM_GETMCCOLOR, sent|wparam|lparam, MCSC_MONTHBK, 0 }, - { DTM_SETMCCOLOR, sent|wparam|lparam, MCSC_TEXT, 0 }, - { DTM_SETMCCOLOR, sent|wparam|lparam, MCSC_TEXT, RGB(255, 255, 255) }, - { DTM_SETMCCOLOR, sent|wparam|lparam, MCSC_TEXT, RGB(100, 180, 220) }, - { DTM_GETMCCOLOR, sent|wparam|lparam, MCSC_TEXT, 0 }, - { DTM_SETMCCOLOR, sent|wparam|lparam, MCSC_TITLEBK, 0 }, - { DTM_SETMCCOLOR, sent|wparam|lparam, MCSC_TITLEBK, RGB(255, 255, 255) }, - { DTM_SETMCCOLOR, sent|wparam|lparam, MCSC_TITLEBK, RGB(100, 180, 220) }, - { DTM_GETMCCOLOR, sent|wparam|lparam, MCSC_TITLEBK, 0 }, - { DTM_SETMCCOLOR, sent|wparam|lparam, MCSC_TITLETEXT, 0 }, - { DTM_SETMCCOLOR, sent|wparam|lparam, MCSC_TITLETEXT, RGB(255, 255, 255) }, - { DTM_SETMCCOLOR, sent|wparam|lparam, MCSC_TITLETEXT, RGB(100, 180, 220) }, - { DTM_GETMCCOLOR, sent|wparam|lparam, MCSC_TITLETEXT, 0 }, - { DTM_SETMCCOLOR, sent|wparam|lparam, MCSC_TRAILINGTEXT, 0 }, - { DTM_SETMCCOLOR, sent|wparam|lparam, MCSC_TRAILINGTEXT, RGB(255, 255, 255) }, - { DTM_SETMCCOLOR, sent|wparam|lparam, MCSC_TRAILINGTEXT, RGB(100, 180, 220) }, - { DTM_GETMCCOLOR, sent|wparam|lparam, MCSC_TRAILINGTEXT, 0 }, - { 0 } -}; - -static const struct message test_dtm_set_and_get_mcfont_seq[] = { - { DTM_SETMCFONT, sent|lparam, 0, 1 }, - { DTM_GETMCFONT, sent|wparam|lparam, 0, 0 }, - { 0 } -}; - -static const struct message test_dtm_get_monthcal_seq[] = { - { DTM_GETMONTHCAL, sent|wparam|lparam, 0, 0 }, - { 0 } -}; - -static const struct message test_dtm_set_and_get_range_seq[] = { - { DTM_SETRANGE, sent|wparam, GDTR_MIN }, - { DTM_GETRANGE, sent|wparam, 0 }, - { DTM_SETRANGE, sent|wparam, GDTR_MAX }, - { DTM_SETRANGE, sent|wparam, GDTR_MAX }, - { DTM_GETRANGE, sent|wparam, 0 }, - { DTM_SETRANGE, sent|wparam, GDTR_MIN }, - { DTM_SETRANGE, sent|wparam, GDTR_MIN | GDTR_MAX }, - { DTM_SETRANGE, sent|wparam, GDTR_MIN | GDTR_MAX }, - { DTM_GETRANGE, sent|wparam, 0 }, - { DTM_SETRANGE, sent|wparam, GDTR_MIN | GDTR_MAX }, - { DTM_GETRANGE, sent|wparam, 0 }, - { DTM_SETRANGE, sent|wparam, GDTR_MIN | GDTR_MAX }, - { DTM_GETRANGE, sent|wparam, 0 }, - { 0 } -}; - -static const struct message test_dtm_set_range_swap_min_max_seq[] = { - { DTM_SETSYSTEMTIME, sent|wparam, 0 }, - { DTM_GETSYSTEMTIME, sent|wparam, 0 }, - { DTM_SETRANGE, sent|wparam, GDTR_MIN | GDTR_MAX }, - { DTM_GETRANGE, sent|wparam, 0 }, - { DTM_SETSYSTEMTIME, sent|wparam, 0 }, - { DTM_GETSYSTEMTIME, sent|wparam, 0 }, - { DTM_SETRANGE, sent|wparam, GDTR_MIN | GDTR_MAX }, - { DTM_GETRANGE, sent|wparam, 0 }, - { DTM_SETRANGE, sent|wparam, GDTR_MIN | GDTR_MAX }, - { DTM_GETRANGE, sent|wparam, 0 }, - { DTM_SETRANGE, sent|wparam, GDTR_MIN | GDTR_MAX }, - { DTM_GETRANGE, sent|wparam, 0 }, - { 0 } -}; - -static const struct message test_dtm_set_and_get_system_time_seq[] = { - { DTM_SETSYSTEMTIME, sent|wparam, GDT_NONE }, - { DTM_GETSYSTEMTIME, sent|wparam, 0 }, - { DTM_SETSYSTEMTIME, sent|wparam, 0 }, - { DTM_SETSYSTEMTIME, sent|wparam, 0 }, - { DTM_SETSYSTEMTIME, sent|wparam, 0 }, - { DTM_GETSYSTEMTIME, sent|wparam, 0 }, - { DTM_SETSYSTEMTIME, sent|wparam, 0 }, - { 0 } -}; - -static LRESULT WINAPI datetime_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - WNDPROC oldproc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA); - static LONG defwndproc_counter = 0; - LRESULT ret; - struct message msg; - - trace("datetime: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); - - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - add_message(sequences, DATETIME_SEQ_INDEX, &msg); - - defwndproc_counter++; - ret = CallWindowProcA(oldproc, hwnd, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static HWND create_datetime_control(DWORD style) -{ - WNDPROC oldproc; - HWND hWndDateTime = NULL; - - hWndDateTime = CreateWindowEx(0, - DATETIMEPICK_CLASS, - NULL, - style, - 0,50,300,120, - NULL, - NULL, - NULL, - NULL); - - if (!hWndDateTime) return NULL; - - oldproc = (WNDPROC)SetWindowLongPtrA(hWndDateTime, GWLP_WNDPROC, - (LONG_PTR)datetime_subclass_proc); - SetWindowLongPtrA(hWndDateTime, GWLP_USERDATA, (LONG_PTR)oldproc); - - return hWndDateTime; -} - -static void test_dtm_set_format(void) -{ - HWND hWnd; - CHAR txt[256]; - SYSTEMTIME systime; - LRESULT r; - - hWnd = create_datetime_control(DTS_SHOWNONE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - r = SendMessage(hWnd, DTM_SETFORMAT, 0, 0); - expect(1, r); - - r = SendMessage(hWnd, DTM_SETFORMAT, 0, - (LPARAM)"'Today is: 'hh':'m':'s dddd MMM dd', 'yyyy"); - expect(1, r); - - ok_sequence(sequences, DATETIME_SEQ_INDEX, test_dtm_set_format_seq, "test_dtm_set_format", FALSE); - - r = SendMessage(hWnd, DTM_SETFORMAT, 0, - (LPARAM)"'hh' hh"); - expect(1, r); - ZeroMemory(&systime, sizeof(systime)); - systime.wYear = 2000; - systime.wMonth = systime.wDay = 1; - r = SendMessage(hWnd, DTM_SETSYSTEMTIME, 0, (LPARAM)&systime); - expect(1, r); - GetWindowText(hWnd, txt, 256); - ok(strcmp(txt, "hh 12") == 0, "String mismatch (\"%s\" vs \"hh 12\")\n", txt); - - DestroyWindow(hWnd); -} - -static void test_mccolor_types(HWND hWndDateTime, int mccolor_type, const char* mccolor_name) -{ - LRESULT r; - COLORREF theColor, prevColor; - - theColor=RGB(0,0,0); - r = SendMessage(hWndDateTime, DTM_SETMCCOLOR, mccolor_type, theColor); - ok(r != -1, "%s: Set RGB(0,0,0): Expected COLORREF of previous value, got %ld\n", mccolor_name, r); - prevColor=theColor; - theColor=RGB(255,255,255); - r = SendMessage(hWndDateTime, DTM_SETMCCOLOR, mccolor_type, theColor); - ok(r==prevColor, "%s: Set RGB(255,255,255): Expected COLORREF of previous value, got %ld\n", mccolor_name, r); - prevColor=theColor; - theColor=RGB(100,180,220); - r = SendMessage(hWndDateTime, DTM_SETMCCOLOR, mccolor_type, theColor); - ok(r==prevColor, "%s: Set RGB(100,180,220): Expected COLORREF of previous value, got %ld\n", mccolor_name, r); - r = SendMessage(hWndDateTime, DTM_GETMCCOLOR, mccolor_type, 0); - ok(r==theColor, "%s: GETMCCOLOR: Expected %d, got %ld\n", mccolor_name, theColor, r); -} - -static void test_dtm_set_and_get_mccolor(void) -{ - HWND hWnd; - - hWnd = create_datetime_control(DTS_SHOWNONE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - test_mccolor_types(hWnd, MCSC_BACKGROUND, "MCSC_BACKGROUND"); - test_mccolor_types(hWnd, MCSC_MONTHBK, "MCSC_MONTHBK"); - test_mccolor_types(hWnd, MCSC_TEXT, "MCSC_TEXT"); - test_mccolor_types(hWnd, MCSC_TITLEBK, "MCSC_TITLEBK"); - test_mccolor_types(hWnd, MCSC_TITLETEXT, "MCSC_TITLETEXT"); - test_mccolor_types(hWnd, MCSC_TRAILINGTEXT, "MCSC_TRAILINGTEXT"); - - ok_sequence(sequences, DATETIME_SEQ_INDEX, test_dtm_set_and_get_mccolor_seq, "test_dtm_set_and_get_mccolor", FALSE); - - DestroyWindow(hWnd); -} - -static void test_dtm_set_and_get_mcfont(void) -{ - HFONT hFontOrig, hFontNew; - HWND hWnd; - - hWnd = create_datetime_control(DTS_SHOWNONE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - hFontOrig = GetStockObject(DEFAULT_GUI_FONT); - SendMessage(hWnd, DTM_SETMCFONT, (WPARAM)hFontOrig, TRUE); - hFontNew = (HFONT)SendMessage(hWnd, DTM_GETMCFONT, 0, 0); - ok(hFontOrig == hFontNew, "Expected hFontOrig==hFontNew, hFontOrig=%p, hFontNew=%p\n", hFontOrig, hFontNew); - - ok_sequence(sequences, DATETIME_SEQ_INDEX, test_dtm_set_and_get_mcfont_seq, "test_dtm_set_and_get_mcfont", FALSE); - DestroyWindow(hWnd); -} - -static void test_dtm_get_monthcal(void) -{ - LRESULT r; - HWND hWnd; - - hWnd = create_datetime_control(DTS_SHOWNONE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - todo_wine { - r = SendMessage(hWnd, DTM_GETMONTHCAL, 0, 0); - ok(r == 0, "Expected NULL(no child month calendar control), got %ld\n", r); - } - - ok_sequence(sequences, DATETIME_SEQ_INDEX, test_dtm_get_monthcal_seq, "test_dtm_get_monthcal", FALSE); - DestroyWindow(hWnd); -} - -static void fill_systime_struct(SYSTEMTIME *st, int year, int month, int dayofweek, int day, int hour, int minute, int second, int milliseconds) -{ - st->wYear = year; - st->wMonth = month; - st->wDayOfWeek = dayofweek; - st->wDay = day; - st->wHour = hour; - st->wMinute = minute; - st->wSecond = second; - st->wMilliseconds = milliseconds; -} - -static LPARAM compare_systime_date(SYSTEMTIME *st1, SYSTEMTIME *st2) -{ - return (st1->wYear == st2->wYear) - && (st1->wMonth == st2->wMonth) - && (st1->wDayOfWeek == st2->wDayOfWeek) - && (st1->wDay == st2->wDay); -} - -static LPARAM compare_systime_time(SYSTEMTIME *st1, SYSTEMTIME *st2) -{ - return (st1->wHour == st2->wHour) - && (st1->wMinute == st2->wMinute) - && (st1->wSecond == st2->wSecond) - && (st1->wMilliseconds == st2->wMilliseconds); -} - -static LPARAM compare_systime(SYSTEMTIME *st1, SYSTEMTIME *st2) -{ - if(!compare_systime_date(st1, st2)) - return 0; - - return compare_systime_time(st1, st2); -} - -#define expect_systime(ST1, ST2) ok(compare_systime((ST1), (ST2))==1, "ST1 != ST2\n") -#define expect_systime_date(ST1, ST2) ok(compare_systime_date((ST1), (ST2))==1, "ST1.date != ST2.date\n") -#define expect_systime_time(ST1, ST2) ok(compare_systime_time((ST1), (ST2))==1, "ST1.time != ST2.time\n") - -static void test_dtm_set_and_get_range(void) -{ - LRESULT r; - SYSTEMTIME st[2]; - SYSTEMTIME getSt[2]; - HWND hWnd; - - hWnd = create_datetime_control(DTS_SHOWNONE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* initialize st[0] to lowest possible value */ - fill_systime_struct(&st[0], 1601, 1, 0, 1, 0, 0, 0, 0); - /* initialize st[1] to all invalid numbers */ - fill_systime_struct(&st[1], 0, 0, 7, 0, 24, 60, 60, 1000); - - r = SendMessage(hWnd, DTM_SETRANGE, GDTR_MIN, (LPARAM)st); - expect(1, r); - r = SendMessage(hWnd, DTM_GETRANGE, 0, (LPARAM)getSt); - ok(r == GDTR_MIN, "Expected %x, not %x(GDTR_MAX) or %x(GDTR_MIN | GDTR_MAX), got %lx\n", GDTR_MIN, GDTR_MAX, GDTR_MIN | GDTR_MAX, r); - expect_systime(&st[0], &getSt[0]); - - r = SendMessage(hWnd, DTM_SETRANGE, GDTR_MAX, (LPARAM)st); - expect_unsuccess(0, r); - - /* set st[0] to all invalid numbers */ - fill_systime_struct(&st[0], 0, 0, 7, 0, 24, 60, 60, 1000); - /* set st[1] to highest possible value */ - fill_systime_struct(&st[1], 30827, 12, 6, 31, 23, 59, 59, 999); - - r = SendMessage(hWnd, DTM_SETRANGE, GDTR_MAX, (LPARAM)st); - expect(1, r); - r = SendMessage(hWnd, DTM_GETRANGE, 0, (LPARAM)getSt); - todo_wine { - ok(r == GDTR_MAX, "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MIN | GDTR_MAX), got %lx\n", GDTR_MAX, GDTR_MIN, GDTR_MIN | GDTR_MAX, r); - } - expect_systime(&st[1], &getSt[1]); - - r = SendMessage(hWnd, DTM_SETRANGE, GDTR_MIN, (LPARAM)st); - expect_unsuccess(0, r); - r = SendMessage(hWnd, DTM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st); - expect_unsuccess(0, r); - - /* set st[0] to highest possible value */ - fill_systime_struct(&st[0], 30827, 12, 6, 31, 23, 59, 59, 999); - - r = SendMessage(hWnd, DTM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st); - expect(1, r); - r = SendMessage(hWnd, DTM_GETRANGE, 0, (LPARAM)getSt); - ok(r == (GDTR_MIN | GDTR_MAX), "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MAX), got %lx\n", (GDTR_MIN | GDTR_MAX), GDTR_MIN, GDTR_MAX, r); - expect_systime(&st[0], &getSt[0]); - expect_systime(&st[1], &getSt[1]); - - /* initialize st[0] to lowest possible value */ - fill_systime_struct(&st[0], 1601, 1, 0, 1, 0, 0, 0, 0); - /* set st[1] to highest possible value */ - fill_systime_struct(&st[1], 30827, 12, 6, 31, 23, 59, 59, 999); - - r = SendMessage(hWnd, DTM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st); - expect(1, r); - r = SendMessage(hWnd, DTM_GETRANGE, 0, (LPARAM)getSt); - ok(r == (GDTR_MIN | GDTR_MAX), "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MAX), got %lx\n", (GDTR_MIN | GDTR_MAX), GDTR_MIN, GDTR_MAX, r); - expect_systime(&st[0], &getSt[0]); - expect_systime(&st[1], &getSt[1]); - - /* set st[0] to value higher than minimum */ - fill_systime_struct(&st[0], 1980, 1, 3, 23, 14, 34, 37, 465); - /* set st[1] to value lower than maximum */ - fill_systime_struct(&st[1], 2007, 3, 2, 31, 23, 59, 59, 999); - - r = SendMessage(hWnd, DTM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st); - expect(1, r); - r = SendMessage(hWnd, DTM_GETRANGE, 0, (LPARAM)getSt); - ok(r == (GDTR_MIN | GDTR_MAX), "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MAX), got %lx\n", (GDTR_MIN | GDTR_MAX), GDTR_MIN, GDTR_MAX, r); - expect_systime(&st[0], &getSt[0]); - expect_systime(&st[1], &getSt[1]); - - ok_sequence(sequences, DATETIME_SEQ_INDEX, test_dtm_set_and_get_range_seq, "test_dtm_set_and_get_range", FALSE); - - DestroyWindow(hWnd); -} - -/* when maxmax, min and max values should be swapped by DTM_SETRANGE - automatically */ - r = SendMessage(hWnd, DTM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st); - expect(1, r); - r = SendMessage(hWnd, DTM_GETRANGE, 0, (LPARAM)getSt); - ok(r == (GDTR_MIN | GDTR_MAX), "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MAX), got %lx\n", (GDTR_MIN | GDTR_MAX), GDTR_MIN, GDTR_MAX, r); - todo_wine { - ok(compare_systime(&st[0], &getSt[0]) == 1 || - broken(compare_systime(&st[0], &getSt[1]) == 1), /* comctl32 version <= 5.80 */ - "ST1 != ST2\n"); - - ok(compare_systime(&st[1], &getSt[1]) == 1 || - broken(compare_systime(&st[1], &getSt[0]) == 1), /* comctl32 version <= 5.80 */ - "ST1 != ST2\n"); - } - - fill_systime_struct(&st[0], 1980, 1, 3, 23, 14, 34, 37, 465); - - r = SendMessage(hWnd, DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM)&st[0]); - expect(1, r); - r = SendMessage(hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM)&getSt[0]); - ok(r == GDT_VALID, "Expected %d, not %d(GDT_NONE) or %d(GDT_ERROR), got %ld\n", GDT_VALID, GDT_NONE, GDT_ERROR, r); - /* the time part seems to not change after swapping the min and max values - and doing DTM_SETSYSTEMTIME */ - expect_systime_date(&st[0], &getSt[0]); - todo_wine { - ok(compare_systime_time(&origSt, &getSt[0]) == 1 || - broken(compare_systime_time(&st[0], &getSt[0]) == 1), /* comctl32 version <= 5.80 */ - "ST1.time != ST2.time\n"); - } - - /* set st[0] to value higher than minimum */ - fill_systime_struct(&st[0], 1980, 1, 3, 23, 14, 34, 37, 465); - /* set st[1] to value lower than maximum */ - fill_systime_struct(&st[1], 2007, 3, 2, 31, 23, 59, 59, 999); - - r = SendMessage(hWnd, DTM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st); - expect(1, r); - /* for some reason after we swapped the min and max values before, - whenever we do a DTM_SETRANGE, the DTM_GETRANGE will return the values - swapped*/ - r = SendMessage(hWnd, DTM_GETRANGE, 0, (LPARAM)getSt); - ok(r == (GDTR_MIN | GDTR_MAX), "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MAX), got %lx\n", (GDTR_MIN | GDTR_MAX), GDTR_MIN, GDTR_MAX, r); - todo_wine { - ok(compare_systime(&st[0], &getSt[1]) == 1 || - broken(compare_systime(&st[0], &getSt[0]) == 1), /* comctl32 version <= 5.80 */ - "ST1 != ST2\n"); - - ok(compare_systime(&st[1], &getSt[0]) == 1 || - broken(compare_systime(&st[1], &getSt[1]) == 1), /* comctl32 version <= 5.80 */ - "ST1 != ST2\n"); - } - - /* set st[0] to value higher than st[1] */ - fill_systime_struct(&st[0], 2007, 3, 2, 31, 23, 59, 59, 999); - fill_systime_struct(&st[1], 1980, 1, 3, 23, 14, 34, 37, 465); - - /* set min>max again, so that the return values of DTM_GETRANGE are no - longer swapped the next time we do a DTM SETRANGE and DTM_GETRANGE*/ - r = SendMessage(hWnd, DTM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st); - expect(1, r); - r = SendMessage(hWnd, DTM_GETRANGE, 0, (LPARAM)getSt); - ok(r == (GDTR_MIN | GDTR_MAX), "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MAX), got %lx\n", (GDTR_MIN | GDTR_MAX), GDTR_MIN, GDTR_MAX, r); - expect_systime(&st[0], &getSt[1]); - expect_systime(&st[1], &getSt[0]); - - /* initialize st[0] to lowest possible value */ - fill_systime_struct(&st[0], 1601, 1, 0, 1, 0, 0, 0, 0); - /* set st[1] to highest possible value */ - fill_systime_struct(&st[1], 30827, 12, 6, 31, 23, 59, 59, 999); - - r = SendMessage(hWnd, DTM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st); - expect(1, r); - r = SendMessage(hWnd, DTM_GETRANGE, 0, (LPARAM)getSt); - ok(r == (GDTR_MIN | GDTR_MAX), "Expected %x, not %x(GDTR_MIN) or %x(GDTR_MAX), got %lx\n", (GDTR_MIN | GDTR_MAX), GDTR_MIN, GDTR_MAX, r); - expect_systime(&st[0], &getSt[0]); - expect_systime(&st[1], &getSt[1]); - - ok_sequence(sequences, DATETIME_SEQ_INDEX, test_dtm_set_range_swap_min_max_seq, "test_dtm_set_range_swap_min_max", FALSE); - - DestroyWindow(hWnd); -} - -static void test_dtm_set_and_get_system_time(void) -{ - LRESULT r; - SYSTEMTIME st, getSt, ref; - HWND hWnd, hWndDateTime_test_gdt_none; - - hWndDateTime_test_gdt_none = create_datetime_control(0); - - ok(hWndDateTime_test_gdt_none!=NULL, "Expected non NULL, got %p\n", hWndDateTime_test_gdt_none); - if(hWndDateTime_test_gdt_none) { - r = SendMessage(hWndDateTime_test_gdt_none, DTM_SETSYSTEMTIME, GDT_NONE, (LPARAM)&st); - expect(0, r); - } - else { - skip("hWndDateTime_test_gdt_none is NULL\n"); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - return; - } - - DestroyWindow(hWndDateTime_test_gdt_none); - - hWnd = create_datetime_control(DTS_SHOWNONE); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - r = SendMessage(hWnd, DTM_SETSYSTEMTIME, GDT_NONE, (LPARAM)&st); - expect(1, r); - r = SendMessage(hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM)&getSt); - ok(r == GDT_NONE, "Expected %d, not %d(GDT_VALID) or %d(GDT_ERROR), got %ld\n", GDT_NONE, GDT_VALID, GDT_ERROR, r); - - /* set st to lowest possible value */ - fill_systime_struct(&st, 1601, 1, 0, 1, 0, 0, 0, 0); - - r = SendMessage(hWnd, DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM)&st); - expect(1, r); - - /* set st to highest possible value */ - fill_systime_struct(&st, 30827, 12, 6, 31, 23, 59, 59, 999); - - r = SendMessage(hWnd, DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM)&st); - expect(1, r); - - /* set st to value between min and max */ - fill_systime_struct(&st, 1980, 1, 3, 23, 14, 34, 37, 465); - - r = SendMessage(hWnd, DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM)&st); - expect(1, r); - r = SendMessage(hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM)&getSt); - ok(r == GDT_VALID, "Expected %d, not %d(GDT_NONE) or %d(GDT_ERROR), got %ld\n", GDT_VALID, GDT_NONE, GDT_ERROR, r); - expect_systime(&st, &getSt); - - /* set st to invalid value */ - fill_systime_struct(&st, 0, 0, 7, 0, 24, 60, 60, 1000); - - r = SendMessage(hWnd, DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM)&st); - expect_unsuccess(0, r); - - ok_sequence(sequences, DATETIME_SEQ_INDEX, test_dtm_set_and_get_system_time_seq, "test_dtm_set_and_get_system_time", FALSE); - - /* set to some valid value */ - GetSystemTime(&ref); - r = SendMessage(hWnd, DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM)&ref); - expect(1, r); - r = SendMessage(hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM)&getSt); - expect(GDT_VALID, r); - expect_systime(&ref, &getSt); - - /* year invalid */ - st = ref; - st.wYear = 0; - r = SendMessage(hWnd, DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM)&st); - todo_wine expect(1, r); - r = SendMessage(hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM)&getSt); - expect(GDT_VALID, r); - expect_systime(&ref, &getSt); - /* month invalid */ - st = ref; - st.wMonth = 13; - r = SendMessage(hWnd, DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM)&st); - expect(0, r); - r = SendMessage(hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM)&getSt); - expect(GDT_VALID, r); - expect_systime(&ref, &getSt); - /* day invalid */ - st = ref; - st.wDay = 32; - r = SendMessage(hWnd, DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM)&st); - expect(0, r); - r = SendMessage(hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM)&getSt); - expect(GDT_VALID, r); - expect_systime(&ref, &getSt); - /* day of week isn't validated */ - st = ref; - st.wDayOfWeek = 10; - r = SendMessage(hWnd, DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM)&st); - expect(1, r); - r = SendMessage(hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM)&getSt); - expect(GDT_VALID, r); - expect_systime(&ref, &getSt); - /* hour invalid */ - st = ref; - st.wHour = 25; - r = SendMessage(hWnd, DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM)&st); - expect(0, r); - r = SendMessage(hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM)&getSt); - expect(GDT_VALID, r); - expect_systime(&ref, &getSt); - /* minute invalid */ - st = ref; - st.wMinute = 60; - r = SendMessage(hWnd, DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM)&st); - expect(0, r); - r = SendMessage(hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM)&getSt); - expect(GDT_VALID, r); - expect_systime(&ref, &getSt); - /* sec invalid */ - st = ref; - st.wSecond = 60; - r = SendMessage(hWnd, DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM)&st); - expect(0, r); - r = SendMessage(hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM)&getSt); - expect(GDT_VALID, r); - expect_systime(&ref, &getSt); - /* msec invalid */ - st = ref; - st.wMilliseconds = 1000; - r = SendMessage(hWnd, DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM)&st); - expect(0, r); - r = SendMessage(hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM)&getSt); - expect(GDT_VALID, r); - expect_systime(&ref, &getSt); - - /* day of week should be calculated automatically, - actual day of week for this date is 4 */ - fill_systime_struct(&st, 2009, 10, 1, 1, 0, 0, 10, 200); - r = SendMessage(hWnd, DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM)&st); - expect(1, r); - r = SendMessage(hWnd, DTM_GETSYSTEMTIME, 0, (LPARAM)&getSt); - expect(GDT_VALID, r); - /* 01.10.2009 is Thursday */ - expect(4, (LRESULT)getSt.wDayOfWeek); - st.wDayOfWeek = 4; - expect_systime(&st, &getSt); - - DestroyWindow(hWnd); -} - -static void test_wm_set_get_text(void) -{ - static const CHAR a_str[] = "a"; - char buff[16], time[16]; - HWND hWnd; - LRESULT ret; - - hWnd = create_datetime_control(0); - - ret = SendMessage(hWnd, WM_SETTEXT, 0, (LPARAM)a_str); - ok(CB_ERR == ret || - broken(0 == ret) || /* comctl32 <= 4.72 */ - broken(1 == ret), /* comctl32 <= 4.70 */ - "Expected CB_ERR, got %ld\n", ret); - - buff[0] = 0; - ret = SendMessage(hWnd, WM_GETTEXT, sizeof(buff), (LPARAM)buff); - ok(strcmp(buff, a_str) != 0, "Expected text not to change, got %s\n", buff); - - GetDateFormat(LOCALE_USER_DEFAULT, 0, NULL, NULL, time, sizeof(time)); - ok(!strcmp(buff, time), "Expected %s, got %s\n", time, buff); - - DestroyWindow(hWnd); -} - -static void test_dts_shownone(void) -{ - HWND hwnd; - DWORD style; - - /* it isn't allowed to change DTS_SHOWNONE after creation */ - hwnd = create_datetime_control(0); - style = GetWindowLong(hwnd, GWL_STYLE); - SetWindowLong(hwnd, GWL_STYLE, style | DTS_SHOWNONE); - style = GetWindowLong(hwnd, GWL_STYLE); - ok(!(style & DTS_SHOWNONE), "Expected DTS_SHOWNONE not to be set\n"); - DestroyWindow(hwnd); - - hwnd = create_datetime_control(DTS_SHOWNONE); - style = GetWindowLong(hwnd, GWL_STYLE); - SetWindowLong(hwnd, GWL_STYLE, style & ~DTS_SHOWNONE); - style = GetWindowLong(hwnd, GWL_STYLE); - ok(style & DTS_SHOWNONE, "Expected DTS_SHOWNONE to be set\n"); - DestroyWindow(hwnd); -} - -START_TEST(datetime) -{ - HMODULE hComctl32; - BOOL (WINAPI *pInitCommonControlsEx)(const INITCOMMONCONTROLSEX*); - INITCOMMONCONTROLSEX iccex; - - hComctl32 = GetModuleHandleA("comctl32.dll"); - pInitCommonControlsEx = (void*)GetProcAddress(hComctl32, "InitCommonControlsEx"); - if (!pInitCommonControlsEx) - { - skip("InitCommonControlsEx() is missing. Skipping the tests\n"); - return; - } - iccex.dwSize = sizeof(iccex); - iccex.dwICC = ICC_DATE_CLASSES; - pInitCommonControlsEx(&iccex); - - init_msg_sequences(sequences, NUM_MSG_SEQUENCES); - - test_dtm_set_format(); - test_dtm_set_and_get_mccolor(); - test_dtm_set_and_get_mcfont(); - test_dtm_get_monthcal(); - test_dtm_set_and_get_range(); - test_dtm_set_range_swap_min_max(); - test_dtm_set_and_get_system_time(); - test_wm_set_get_text(); - test_dts_shownone(); -} diff --git a/rostests/winetests/comctl32/dpa.c b/rostests/winetests/comctl32/dpa.c deleted file mode 100644 index 419c1b14d0e..00000000000 --- a/rostests/winetests/comctl32/dpa.c +++ /dev/null @@ -1,761 +0,0 @@ -/* - * Unit tests for DPA functions - * - * Copyright 2003 Uwe Bonnes - * Copyright 2005 Felix Nawothnig - * - * 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 - -#include - -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "commctrl.h" -#include "objidl.h" - -#include "wine/test.h" - -#define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got) - -typedef struct _STREAMDATA -{ - DWORD dwSize; - DWORD dwData2; - DWORD dwItems; -} STREAMDATA, *PSTREAMDATA; - -static HDPA (WINAPI *pDPA_Clone)(const HDPA,const HDPA); -static HDPA (WINAPI *pDPA_Create)(INT); -static HDPA (WINAPI *pDPA_CreateEx)(INT,HANDLE); -static PVOID (WINAPI *pDPA_DeleteAllPtrs)(const HDPA); -static PVOID (WINAPI *pDPA_DeletePtr)(const HDPA,INT); -static BOOL (WINAPI *pDPA_Destroy)(const HDPA); -static VOID (WINAPI *pDPA_DestroyCallback)(HDPA,PFNDPAENUMCALLBACK,PVOID); -static VOID (WINAPI *pDPA_EnumCallback)(HDPA,PFNDPAENUMCALLBACK,PVOID); -static INT (WINAPI *pDPA_GetPtr)(const HDPA,INT); -static INT (WINAPI *pDPA_GetPtrIndex)(const HDPA,PVOID); -static BOOL (WINAPI *pDPA_Grow)(HDPA,INT); -static INT (WINAPI *pDPA_InsertPtr)(const HDPA,INT,PVOID); -static HRESULT (WINAPI *pDPA_LoadStream)(HDPA*,PFNDPASTREAM,IStream*,LPVOID); -static BOOL (WINAPI *pDPA_Merge)(const HDPA,const HDPA,DWORD,PFNDPACOMPARE,PFNDPAMERGE,LPARAM); -static HRESULT (WINAPI *pDPA_SaveStream)(HDPA,PFNDPASTREAM,IStream*,LPVOID); -static INT (WINAPI *pDPA_Search)(HDPA,PVOID,INT,PFNDPACOMPARE,LPARAM,UINT); -static BOOL (WINAPI *pDPA_SetPtr)(const HDPA,INT,PVOID); -static BOOL (WINAPI *pDPA_Sort)(const HDPA,PFNDPACOMPARE,LPARAM); - -#define COMCTL32_GET_PROC(func, ord) \ - ((p ## func = (PVOID)GetProcAddress(hcomctl32,(LPCSTR)ord)) ? 1 \ - : (trace( #func " not exported\n"), 0)) - -static BOOL InitFunctionPtrs(HMODULE hcomctl32) -{ - /* 4.00+ */ - if(COMCTL32_GET_PROC(DPA_Clone, 331) && - COMCTL32_GET_PROC(DPA_Create, 328) && - COMCTL32_GET_PROC(DPA_CreateEx, 340) && - COMCTL32_GET_PROC(DPA_DeleteAllPtrs, 337) && - COMCTL32_GET_PROC(DPA_DeletePtr, 336) && - COMCTL32_GET_PROC(DPA_Destroy, 329) && - COMCTL32_GET_PROC(DPA_GetPtr, 332) && - COMCTL32_GET_PROC(DPA_GetPtrIndex, 333) && - COMCTL32_GET_PROC(DPA_Grow, 330) && - COMCTL32_GET_PROC(DPA_InsertPtr, 334) && - COMCTL32_GET_PROC(DPA_Search, 339) && - COMCTL32_GET_PROC(DPA_SetPtr, 335) && - COMCTL32_GET_PROC(DPA_Sort, 338)) - { - /* 4.71+ */ - COMCTL32_GET_PROC(DPA_DestroyCallback, 386) && - COMCTL32_GET_PROC(DPA_EnumCallback, 385) && - COMCTL32_GET_PROC(DPA_LoadStream, 9) && - COMCTL32_GET_PROC(DPA_Merge, 11) && - COMCTL32_GET_PROC(DPA_SaveStream, 10); - - return TRUE; - } - - return FALSE; -} - -/* Callbacks */ -static INT CALLBACK CB_CmpLT(PVOID p1, PVOID p2, LPARAM lp) -{ - ok(lp == 0xdeadbeef, "lp=%ld\n", lp); - return p1 < p2 ? -1 : p1 > p2 ? 1 : 0; -} - -static INT CALLBACK CB_CmpGT(PVOID p1, PVOID p2, LPARAM lp) -{ - ok(lp == 0xdeadbeef, "lp=%ld\n", lp); - return p1 > p2 ? -1 : p1 < p2 ? 1 : 0; -} - -/* merge callback messages counter - DPAMM_MERGE 1 - DPAMM_DELETE 2 - DPAMM_INSERT 3 */ -static INT nMessages[4]; - -static PVOID CALLBACK CB_MergeInsertSrc(UINT op, PVOID p1, PVOID p2, LPARAM lp) -{ - nMessages[op]++; - ok(lp == 0xdeadbeef, "lp=%ld\n", lp); - return p1; -} - -static PVOID CALLBACK CB_MergeDeleteOddSrc(UINT op, PVOID p1, PVOID p2, LPARAM lp) -{ - nMessages[op]++; - ok(lp == 0xdeadbeef, "lp=%ld\n", lp); - return ((PCHAR)p2)+1; -} - -static INT nEnum; - -static INT CALLBACK CB_EnumFirstThree(PVOID pItem, PVOID lp) -{ - INT i; - - i = pDPA_GetPtrIndex(lp, pItem); - ok(i == nEnum, "i=%d nEnum=%d\n", i, nEnum); - nEnum++; - pDPA_SetPtr(lp, i, (PVOID)7); - return pItem != (PVOID)3; -} - -static HRESULT CALLBACK CB_Save(DPASTREAMINFO *pInfo, IStream *pStm, LPVOID lp) -{ - HRESULT hRes; - - ok(lp == (LPVOID)0xdeadbeef, "lp=%p\n", lp); - hRes = IStream_Write(pStm, &pInfo->iPos, sizeof(INT), NULL); - expect(S_OK, hRes); - hRes = IStream_Write(pStm, &pInfo->pvItem, sizeof(PVOID), NULL); - expect(S_OK, hRes); - return S_OK; -} - -static HRESULT CALLBACK CB_Load(DPASTREAMINFO *pInfo, IStream *pStm, LPVOID lp) -{ - HRESULT hRes; - INT iOldPos; - - iOldPos = pInfo->iPos; - ok(lp == (LPVOID)0xdeadbeef, "lp=%p\n", lp); - hRes = IStream_Read(pStm, &pInfo->iPos, sizeof(INT), NULL); - expect(S_OK, hRes); - ok(pInfo->iPos == iOldPos, "iPos=%d iOldPos=%d\n", pInfo->iPos, iOldPos); - hRes = IStream_Read(pStm, &pInfo->pvItem, sizeof(PVOID), NULL); - expect(S_OK, hRes); - return S_OK; -} - -static BOOL CheckDPA(HDPA dpa, DWORD dwIn, PDWORD pdwOut) -{ - DWORD dwOut = 0; - INT i; - - for(i = 0; i < 8;) - { - ULONG_PTR ulItem = (ULONG_PTR)pDPA_GetPtr(dpa, i++); - if(!ulItem) break; - dwOut = dwOut << 4 | (ulItem & 0xf); - } - - *pdwOut = dwOut; - - if(dwOut != dwIn) - { - pDPA_DeleteAllPtrs(dpa); - - do - { - pDPA_InsertPtr(dpa, 0, (PVOID)(ULONG_PTR)(dwIn & 0xf)); - dwIn >>= 4; - } - while(dwIn); - - return FALSE; - } - - return TRUE; -} - -static void test_dpa(void) -{ - SYSTEM_INFO si; - HANDLE hHeap; - HDPA dpa, dpa2, dpa3; - INT ret, i; - PVOID p; - DWORD dw, dw2, dw3; - BOOL rc; - - GetSystemInfo(&si); - hHeap = HeapCreate(0, 1, 2); - ok(hHeap != NULL, "error=%d\n", GetLastError()); - dpa3 = pDPA_CreateEx(0, hHeap); - ok(dpa3 != NULL, "\n"); - ret = pDPA_Grow(dpa3, si.dwPageSize + 1); - ok(!ret && GetLastError() == ERROR_NOT_ENOUGH_MEMORY, - "ret=%d error=%d\n", ret, GetLastError()); - - dpa = pDPA_Create(0); - ok(dpa != NULL, "\n"); - - /* Set item with out of bound index */ - ok(pDPA_SetPtr(dpa, 1, (PVOID)6), "\n"); - /* Fill the created gap */ - ok(pDPA_SetPtr(dpa, 0, (PVOID)5), "\n"); - rc=CheckDPA(dpa, 0x56, &dw); - ok(rc, "dw=0x%x\n", dw); - - /* Prepend item */ - ret = pDPA_InsertPtr(dpa, 1, (PVOID)1); - ok(ret == 1, "ret=%d\n", ret); - /* Append item using correct index */ - ret = pDPA_InsertPtr(dpa, 3, (PVOID)3); - ok(ret == 3, "ret=%d\n", ret); - /* Append item using out of bound index */ - ret = pDPA_InsertPtr(dpa, 5, (PVOID)2); - ok(ret == 4, "ret=%d\n", ret); - /* Append item using DPA_APPEND */ - ret = pDPA_InsertPtr(dpa, DPA_APPEND, (PVOID)4); - ok(ret == 5, "ret=%d\n", ret); - - rc=CheckDPA(dpa, 0x516324, &dw); - ok(rc, "dw=0x%x\n", dw); - - for(i = 1; i <= 6; i++) - { - INT j, k; - k = pDPA_GetPtrIndex(dpa, (PVOID)(INT_PTR)i); - /* Linear searches should work on unsorted DPAs */ - j = pDPA_Search(dpa, (PVOID)(INT_PTR)i, 0, CB_CmpLT, 0xdeadbeef, 0); - ok(j == k, "j=%d k=%d\n", j, k); - } - - /* Sort DPA */ - ok(pDPA_Sort(dpa, CB_CmpGT, 0xdeadbeef), "\n"); - rc=CheckDPA(dpa, 0x654321, &dw); - ok(rc, "dw=0x%x\n", dw); - - /* Clone into a new DPA */ - dpa2 = pDPA_Clone(dpa, NULL); - ok(dpa2 != NULL, "\n"); - /* The old data should have been preserved */ - rc=CheckDPA(dpa2, 0x654321, &dw2); - ok(rc, "dw=0x%x\n", dw2); - ok(pDPA_Sort(dpa, CB_CmpLT, 0xdeadbeef), "\n"); - - /* Test if the DPA itself was really copied */ - rc=CheckDPA(dpa, 0x123456, &dw); - ok(rc, "dw=0x%x\n", dw ); - rc=CheckDPA(dpa2, 0x654321, &dw2); - ok(rc, "dw2=0x%x\n", dw2); - - /* Clone into an old DPA */ - p = NULL; SetLastError(ERROR_SUCCESS); - p = pDPA_Clone(dpa, dpa3); - ok(p == dpa3, "p=%p\n", p); - rc=CheckDPA(dpa3, 0x123456, &dw3); - ok(rc, "dw3=0x%x\n", dw3); - - for(i = 1; i <= 6; i++) - { - INT j; - - /* The array is in order so ptr == index+1 */ - j = pDPA_GetPtrIndex(dpa, (PVOID)(INT_PTR)i); - ok(j+1 == i, "j=%d i=%d\n", j, i); - j = pDPA_Search(dpa, (PVOID)(INT_PTR)i, 0, CB_CmpLT, 0xdeadbeef, DPAS_SORTED); - ok(j+1 == i, "j=%d i=%d\n", j, i); - - /* Linear searches respect iStart ... */ - j = pDPA_Search(dpa, (PVOID)(INT_PTR)i, i+1, CB_CmpLT, 0xdeadbeef, 0); - ok(j == DPA_ERR, "j=%d\n", j); - /* ... but for a binary search it's ignored */ - j = pDPA_Search(dpa, (PVOID)(INT_PTR)i, i+1, CB_CmpLT, 0xdeadbeef, DPAS_SORTED); - ok(j+1 == i, "j=%d i=%d\n", j, i); - } - - /* Try to get the index of a nonexistent item */ - i = pDPA_GetPtrIndex(dpa, (PVOID)7); - ok(i == DPA_ERR, "i=%d\n", i); - - /* Try to delete out of bound indexes */ - p = pDPA_DeletePtr(dpa, -1); - ok(p == NULL, "p=%p\n", p); - p = pDPA_DeletePtr(dpa, 6); - ok(p == NULL, "p=%p\n", p); - - /* Delete the third item */ - p = pDPA_DeletePtr(dpa, 2); - ok(p == (PVOID)3, "p=%p\n", p); - rc=CheckDPA(dpa, 0x12456, &dw); - ok(rc, "dw=0x%x\n", dw); - - /* Check where to re-insert the deleted item */ - i = pDPA_Search(dpa, (PVOID)3, 0, - CB_CmpLT, 0xdeadbeef, DPAS_SORTED|DPAS_INSERTAFTER); - ok(i == 2, "i=%d\n", i); - /* DPAS_INSERTBEFORE works just like DPAS_INSERTAFTER */ - i = pDPA_Search(dpa, (PVOID)3, 0, - CB_CmpLT, 0xdeadbeef, DPAS_SORTED|DPAS_INSERTBEFORE); - ok(i == 2, "i=%d\n", i); - /* without DPAS_INSERTBEFORE/AFTER */ - i = pDPA_Search(dpa, (PVOID)3, 0, - CB_CmpLT, 0xdeadbeef, DPAS_SORTED); - ok(i == -1, "i=%d\n", i); - - /* Re-insert the item */ - ret = pDPA_InsertPtr(dpa, 2, (PVOID)3); - ok(ret == 2, "ret=%d i=%d\n", ret, 2); - rc=CheckDPA(dpa, 0x123456, &dw); - ok(rc, "dw=0x%x\n", dw); - - /* When doing a binary search while claiming reverse order all indexes - * should be bogus */ - for(i = 0; i < 6; i++) - { - INT j = pDPA_Search(dpa, (PVOID)(INT_PTR)i, 0, CB_CmpGT, 0xdeadbeef, - DPAS_SORTED|DPAS_INSERTBEFORE); - ok(j != i, "i=%d\n", i); - } - - /* Setting item with huge index should work */ - ok(pDPA_SetPtr(dpa2, 0x12345, (PVOID)0xdeadbeef), "\n"); - ret = pDPA_GetPtrIndex(dpa2, (PVOID)0xdeadbeef); - ok(ret == 0x12345, "ret=%d\n", ret); - - pDPA_DeleteAllPtrs(dpa2); - rc=CheckDPA(dpa2, 0, &dw2); - ok(rc, "dw2=0x%x\n", dw2); - - pDPA_Destroy(dpa); - pDPA_Destroy(dpa2); - pDPA_Destroy(dpa3); -} - -static void test_DPA_Merge(void) -{ - HDPA dpa, dpa2, dpa3; - INT ret, i; - DWORD dw; - BOOL rc; - - if(!pDPA_Merge) - { - win_skip("DPA_Merge() not available\n"); - return; - } - - dpa = pDPA_Create(0); - dpa2 = pDPA_Create(0); - dpa3 = pDPA_Create(0); - - ret = pDPA_InsertPtr(dpa, 0, (PVOID)1); - ok(ret == 0, "ret=%d\n", ret); - ret = pDPA_InsertPtr(dpa, 1, (PVOID)3); - ok(ret == 1, "ret=%d\n", ret); - ret = pDPA_InsertPtr(dpa, 2, (PVOID)5); - ok(ret == 2, "ret=%d\n", ret); - - rc = CheckDPA(dpa, 0x135, &dw); - ok(rc, "dw=0x%x\n", dw); - - for (i = 0; i < 6; i++) - { - ret = pDPA_InsertPtr(dpa2, i, (PVOID)(INT_PTR)(6-i)); - ok(ret == i, "ret=%d\n", ret); - ret = pDPA_InsertPtr(dpa3, i, (PVOID)(INT_PTR)(i+1)); - ok(ret == i, "ret=%d\n", ret); - } - - rc = CheckDPA(dpa2, 0x654321, &dw); - ok(rc, "dw=0x%x\n", dw); - rc = CheckDPA(dpa3, 0x123456, &dw); - ok(rc, "dw=0x%x\n", dw); - - /* Delete all odd entries from dpa2 */ - memset(nMessages, 0, sizeof(nMessages)); - pDPA_Merge(dpa2, dpa, DPAM_INTERSECT, - CB_CmpLT, CB_MergeDeleteOddSrc, 0xdeadbeef); - rc = CheckDPA(dpa2, 0x246, &dw); - ok(rc, "dw=0x%x\n", dw); - - expect(3, nMessages[DPAMM_MERGE]); - expect(3, nMessages[DPAMM_DELETE]); - expect(0, nMessages[DPAMM_INSERT]); - - for (i = 0; i < 6; i++) - { - ret = pDPA_InsertPtr(dpa2, i, (PVOID)(INT_PTR)(6-i)); - ok(ret == i, "ret=%d\n", ret); - } - - /* DPAM_INTERSECT - returning source while merging */ - memset(nMessages, 0, sizeof(nMessages)); - pDPA_Merge(dpa2, dpa, DPAM_INTERSECT, - CB_CmpLT, CB_MergeInsertSrc, 0xdeadbeef); - rc = CheckDPA(dpa2, 0x135, &dw); - ok(rc, "dw=0x%x\n", dw); - - expect(3, nMessages[DPAMM_MERGE]); - expect(6, nMessages[DPAMM_DELETE]); - expect(0, nMessages[DPAMM_INSERT]); - - /* DPAM_UNION */ - pDPA_DeleteAllPtrs(dpa); - pDPA_InsertPtr(dpa, 0, (PVOID)1); - pDPA_InsertPtr(dpa, 1, (PVOID)3); - pDPA_InsertPtr(dpa, 2, (PVOID)5); - pDPA_DeleteAllPtrs(dpa2); - pDPA_InsertPtr(dpa2, 0, (PVOID)2); - pDPA_InsertPtr(dpa2, 1, (PVOID)4); - pDPA_InsertPtr(dpa2, 2, (PVOID)6); - - memset(nMessages, 0, sizeof(nMessages)); - pDPA_Merge(dpa2, dpa, DPAM_UNION, - CB_CmpLT, CB_MergeInsertSrc, 0xdeadbeef); - rc = CheckDPA(dpa2, 0x123456, &dw); - ok(rc || - broken(!rc && dw == 0x23456), /* 4.7x */ - "dw=0x%x\n", dw); - - expect(0, nMessages[DPAMM_MERGE]); - expect(0, nMessages[DPAMM_DELETE]); - ok(nMessages[DPAMM_INSERT] == 3 || - broken(nMessages[DPAMM_INSERT] == 2), /* 4.7x */ - "Expected 3, got %d\n", nMessages[DPAMM_INSERT]); - - /* Merge dpa3 into dpa2 and dpa */ - memset(nMessages, 0, sizeof(nMessages)); - pDPA_Merge(dpa, dpa3, DPAM_UNION|DPAM_SORTED, - CB_CmpLT, CB_MergeInsertSrc, 0xdeadbeef); - expect(3, nMessages[DPAMM_MERGE]); - expect(0, nMessages[DPAMM_DELETE]); - expect(3, nMessages[DPAMM_INSERT]); - - - pDPA_DeleteAllPtrs(dpa2); - pDPA_InsertPtr(dpa2, 0, (PVOID)2); - pDPA_InsertPtr(dpa2, 1, (PVOID)4); - pDPA_InsertPtr(dpa2, 2, (PVOID)6); - - memset(nMessages, 0, sizeof(nMessages)); - pDPA_Merge(dpa2, dpa3, DPAM_UNION|DPAM_SORTED, - CB_CmpLT, CB_MergeInsertSrc, 0xdeadbeef); - expect(3, nMessages[DPAMM_MERGE]); - expect(0, nMessages[DPAMM_DELETE]); - ok(nMessages[DPAMM_INSERT] == 3 || - broken(nMessages[DPAMM_INSERT] == 2), /* 4.7x */ - "Expected 3, got %d\n", nMessages[DPAMM_INSERT]); - - rc = CheckDPA(dpa, 0x123456, &dw); - ok(rc, "dw=0x%x\n", dw); - rc = CheckDPA(dpa2, 0x123456, &dw); - ok(rc || - broken(!rc), /* win98 */ - "dw=0x%x\n", dw); - rc = CheckDPA(dpa3, 0x123456, &dw); - ok(rc, "dw=0x%x\n", dw); - - pDPA_Destroy(dpa); - pDPA_Destroy(dpa2); - pDPA_Destroy(dpa3); -} - -static void test_DPA_EnumCallback(void) -{ - HDPA dpa; - BOOL rc; - DWORD dw; - INT i, ret; - - if(!pDPA_EnumCallback) - { - win_skip("DPA_EnumCallback() not available\n"); - return; - } - - dpa = pDPA_Create(0); - - for (i = 0; i < 6; i++) - { - ret = pDPA_InsertPtr(dpa, i, (PVOID)(INT_PTR)(i+1)); - ok(ret == i, "ret=%d\n", ret); - } - - rc = CheckDPA(dpa, 0x123456, &dw); - ok(rc, "dw=0x%x\n", dw); - - nEnum = 0; - /* test callback sets first 3 items to 7 */ - pDPA_EnumCallback(dpa, CB_EnumFirstThree, dpa); - rc = CheckDPA(dpa, 0x777456, &dw); - ok(rc, "dw=0x%x\n", dw); - ok(nEnum == 3, "nEnum=%d\n", nEnum); - - pDPA_Destroy(dpa); -} - -static void test_DPA_DestroyCallback(void) -{ - HDPA dpa; - INT i, ret; - - if(!pDPA_DestroyCallback) - { - win_skip("DPA_DestroyCallback() not available\n"); - return; - } - - dpa = pDPA_Create(0); - - for (i = 0; i < 3; i++) - { - ret = pDPA_InsertPtr(dpa, i, (PVOID)(INT_PTR)(i+1)); - ok(ret == i, "ret=%d\n", ret); - } - - nEnum = 0; - pDPA_DestroyCallback(dpa, CB_EnumFirstThree, dpa); - ok(nEnum == 3, "nEnum=%d\n", nEnum); -} - -static void test_DPA_LoadStream(void) -{ - static const WCHAR szStg[] = { 'S','t','g',0 }; - IStorage* pStg = NULL; - IStream* pStm = NULL; - LARGE_INTEGER li; - ULARGE_INTEGER uli; - DWORD dwMode; - HRESULT hRes; - STREAMDATA header; - ULONG written, ret; - HDPA dpa; - - if(!pDPA_LoadStream) - { - win_skip("DPA_LoadStream() not available. Skipping stream tests.\n"); - return; - } - - hRes = CoInitialize(NULL); - if (hRes != S_OK) - { - ok(0, "hResult: %d\n", hRes); - return; - } - - dwMode = STGM_DIRECT|STGM_CREATE|STGM_READWRITE|STGM_SHARE_EXCLUSIVE; - hRes = StgCreateDocfile(NULL, dwMode|STGM_DELETEONRELEASE, 0, &pStg); - expect(S_OK, hRes); - - hRes = IStorage_CreateStream(pStg, szStg, dwMode, 0, 0, &pStm); - expect(S_OK, hRes); - - /* write less than header size */ - li.QuadPart = 0; - hRes = IStream_Seek(pStm, li, STREAM_SEEK_SET, NULL); - expect(S_OK, hRes); - - memset(&header, 0, sizeof(header)); - written = 0; - uli.QuadPart = sizeof(header)-1; - hRes = IStream_SetSize(pStm, uli); - expect(S_OK, hRes); - hRes = IStream_Write(pStm, &header, sizeof(header)-1, &written); - expect(S_OK, hRes); - written -= sizeof(header)-1; - expect(0, written); - - li.QuadPart = 0; - hRes = IStream_Seek(pStm, li, STREAM_SEEK_SET, NULL); - expect(S_OK, hRes); - - hRes = pDPA_LoadStream(&dpa, CB_Load, pStm, NULL); - expect(E_FAIL, hRes); - - /* check stream position after header read failed */ - li.QuadPart = 0; - uli.QuadPart = 1; - hRes = IStream_Seek(pStm, li, STREAM_SEEK_CUR, &uli); - expect(S_OK, hRes); - ok(uli.QuadPart == 0, "Expected to position reset\n"); - - /* write valid header for empty DPA */ - header.dwSize = sizeof(header); - header.dwData2 = 1; - header.dwItems = 0; - written = 0; - - li.QuadPart = 0; - hRes = IStream_Seek(pStm, li, STREAM_SEEK_SET, NULL); - expect(S_OK, hRes); - - uli.QuadPart = sizeof(header); - hRes = IStream_SetSize(pStm, uli); - expect(S_OK, hRes); - - hRes = IStream_Write(pStm, &header, sizeof(header), &written); - expect(S_OK, hRes); - written -= sizeof(header); - expect(0, written); - - li.QuadPart = 0; - hRes = IStream_Seek(pStm, li, STREAM_SEEK_SET, NULL); - expect(S_OK, hRes); - - dpa = NULL; - hRes = pDPA_LoadStream(&dpa, CB_Load, pStm, NULL); - expect(S_OK, hRes); - DPA_Destroy(dpa); - - /* try with altered dwData2 field */ - header.dwSize = sizeof(header); - header.dwData2 = 2; - header.dwItems = 0; - - li.QuadPart = 0; - hRes = IStream_Seek(pStm, li, STREAM_SEEK_SET, NULL); - expect(S_OK, hRes); - hRes = IStream_Write(pStm, &header, sizeof(header), &written); - expect(S_OK, hRes); - written -= sizeof(header); - expect(0, written); - - li.QuadPart = 0; - hRes = IStream_Seek(pStm, li, STREAM_SEEK_SET, NULL); - expect(S_OK, hRes); - - hRes = pDPA_LoadStream(&dpa, CB_Load, pStm, (void*)0xdeadbeef); - expect(E_FAIL, hRes); - - ret = IStream_Release(pStm); - ok(!ret, "ret=%d\n", ret); - - ret = IStorage_Release(pStg); - ok(!ret, "ret=%d\n", ret); - - CoUninitialize(); -} - -static void test_DPA_SaveStream(void) -{ - HDPA dpa; - static const WCHAR szStg[] = { 'S','t','g',0 }; - IStorage* pStg = NULL; - IStream* pStm = NULL; - DWORD dwMode, dw; - HRESULT hRes; - ULONG ret; - INT i; - BOOL rc; - LARGE_INTEGER liZero; - - if(!pDPA_SaveStream) - { - win_skip("DPA_SaveStream() not available. Skipping stream tests.\n"); - return; - } - - hRes = CoInitialize(NULL); - if (hRes != S_OK) - { - ok(0, "hResult: %d\n", hRes); - return; - } - - dwMode = STGM_DIRECT|STGM_CREATE|STGM_READWRITE|STGM_SHARE_EXCLUSIVE; - hRes = StgCreateDocfile(NULL, dwMode|STGM_DELETEONRELEASE, 0, &pStg); - expect(S_OK, hRes); - - hRes = IStorage_CreateStream(pStg, szStg, dwMode, 0, 0, &pStm); - expect(S_OK, hRes); - - dpa = pDPA_Create(0); - - /* simple parameter check */ - hRes = pDPA_SaveStream(dpa, NULL, pStm, NULL); - ok(hRes == E_INVALIDARG || - broken(hRes == S_OK) /* XP and below */, "Wrong result, %d\n", hRes); -if (0) { - /* crashes on XP */ - hRes = pDPA_SaveStream(NULL, CB_Save, pStm, NULL); - expect(E_INVALIDARG, hRes); - - hRes = pDPA_SaveStream(dpa, CB_Save, NULL, NULL); - expect(E_INVALIDARG, hRes); -} - - /* saving/loading */ - for (i = 0; i < 6; i++) - { - ret = pDPA_InsertPtr(dpa, i, (PVOID)(INT_PTR)(i+1)); - ok(ret == i, "ret=%d\n", ret); - } - - liZero.QuadPart = 0; - hRes = IStream_Seek(pStm, liZero, STREAM_SEEK_SET, NULL); - expect(S_OK, hRes); - - hRes = pDPA_SaveStream(dpa, CB_Save, pStm, (void*)0xdeadbeef); - expect(S_OK, hRes); - pDPA_Destroy(dpa); - - liZero.QuadPart = 0; - hRes = IStream_Seek(pStm, liZero, STREAM_SEEK_SET, NULL); - expect(S_OK, hRes); - hRes = pDPA_LoadStream(&dpa, CB_Load, pStm, (void*)0xdeadbeef); - expect(S_OK, hRes); - rc = CheckDPA(dpa, 0x123456, &dw); - ok(rc, "dw=0x%x\n", dw); - pDPA_Destroy(dpa); - - ret = IStream_Release(pStm); - ok(!ret, "ret=%d\n", ret); - - ret = IStorage_Release(pStg); - ok(!ret, "ret=%d\n", ret); - - CoUninitialize(); -} - -START_TEST(dpa) -{ - HMODULE hcomctl32; - - hcomctl32 = GetModuleHandleA("comctl32.dll"); - - if(!InitFunctionPtrs(hcomctl32)) - { - win_skip("Needed functions are not available\n"); - return; - } - - test_dpa(); - test_DPA_Merge(); - test_DPA_EnumCallback(); - test_DPA_DestroyCallback(); - test_DPA_LoadStream(); - test_DPA_SaveStream(); -} diff --git a/rostests/winetests/comctl32/header.c b/rostests/winetests/comctl32/header.c deleted file mode 100644 index d9b4a7329ff..00000000000 --- a/rostests/winetests/comctl32/header.c +++ /dev/null @@ -1,1875 +0,0 @@ -/* Unit test suite for header control. - * - * Copyright 2005 Vijay Kiran Kamuju - * Copyright 2007 Shanren Zhou - * - * 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 "wine/test.h" -#include "v6util.h" -#include "msg.h" - -typedef struct tagEXPECTEDNOTIFY -{ - INT iCode; - BOOL fUnicode; - HDITEMA hdItem; -} EXPECTEDNOTIFY; - -typedef LRESULT (*CUSTOMDRAWPROC)(int n, NMCUSTOMDRAW *nm); - -static CUSTOMDRAWPROC g_CustomDrawProc; -static int g_CustomDrawCount; -static DRAWITEMSTRUCT g_DrawItem; -static BOOL g_DrawItemReceived; -static DWORD g_customheight; - -static EXPECTEDNOTIFY expectedNotify[10]; -static INT nExpectedNotify = 0; -static INT nReceivedNotify = 0; -static INT unexpectedNotify[10]; -static INT nUnexpectedNotify = 0; - -static HWND hHeaderParentWnd; -static HWND hWndHeader; -#define MAX_CHARS 100 - -#define compare(val, exp, fmt) ok((val) == (exp), #val " value: " fmt ", expected: " fmt "\n", (val), (exp)) - -#define expect(expected, got) ok(expected == got, "expected %d, got %d\n", expected,got) - -#define NUM_MSG_SEQUENCES 2 -#define PARENT_SEQ_INDEX 0 -#define HEADER_SEQ_INDEX 1 - -static struct msg_sequence *sequences[NUM_MSG_SEQUENCES]; - -static const struct message create_parent_wnd_seq[] = { - { WM_GETMINMAXINFO, sent }, - { WM_NCCREATE, sent }, - { WM_NCCALCSIZE, sent|wparam, 0 }, - { WM_CREATE, sent }, - { 0 } -}; - -static const struct message add_header_to_parent_seq_interactive[] = { - { WM_NOTIFYFORMAT, sent|lparam, 0, NF_QUERY }, - { WM_QUERYUISTATE, sent }, - { WM_PARENTNOTIFY, sent|wparam, 1 }, - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam, 0 }, - { WM_ACTIVATEAPP, sent|wparam, 1 }, - { WM_NCACTIVATE, sent|wparam, 1 }, - { WM_ACTIVATE, sent|wparam, 1 }, - { WM_IME_SETCONTEXT, sent|defwinproc|wparam, 1 }, - { WM_IME_NOTIFY, sent|defwinproc|wparam, 2 }, - { WM_SETFOCUS, sent|defwinproc|wparam, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, 0 }, - { WM_SIZE, sent|wparam, 0 }, - { WM_MOVE, sent|wparam, 0 }, - { 0 } -}; - -static const struct message add_header_to_parent_seq[] = { - { WM_NOTIFYFORMAT, sent|lparam, 0, NF_QUERY }, - { WM_QUERYUISTATE, sent|optional }, - { WM_PARENTNOTIFY, sent }, - { 0 } -}; - -static const struct message insertItem_seq[] = { - { HDM_INSERTITEM, sent|wparam, 0 }, - { HDM_INSERTITEM, sent|wparam, 1 }, - { HDM_INSERTITEM, sent|wparam, 2 }, - { HDM_INSERTITEM, sent|wparam, 3 }, - { 0 } -}; - -static const struct message getItem_seq[] = { - { HDM_GETITEM, sent|wparam, 3 }, - { HDM_GETITEM, sent|wparam, 0 }, - { 0 } -}; - - -static const struct message deleteItem_getItemCount_seq[] = { - { HDM_DELETEITEM, sent|wparam, 3 }, - { HDM_GETITEMCOUNT, sent }, - { HDM_DELETEITEM, sent|wparam, 3 }, - { HDM_GETITEMCOUNT, sent }, - { HDM_DELETEITEM, sent|wparam, 2 }, - { HDM_GETITEMCOUNT, sent }, - { 0 } -}; - -static const struct message orderArray_seq[] = { - { HDM_SETORDERARRAY, sent|wparam, 2 }, - { HDM_GETORDERARRAY, sent|wparam, 2 }, - { 0 } -}; - -static const struct message setItem_seq[] = { - { HDM_SETITEM, sent|wparam, 0 }, - { HDM_SETITEM, sent|wparam, 1 }, - { 0 } -}; - -static const struct message getItemRect_seq[] = { - { HDM_GETITEMRECT, sent|wparam, 1 }, - { HDM_GETITEMRECT, sent|wparam, 0 }, - { HDM_GETITEMRECT, sent|wparam, 10 }, - { 0 } -}; - -static const struct message layout_seq[] = { - { HDM_LAYOUT, sent }, - { 0 } -}; - -static const struct message orderToIndex_seq[] = { - { HDM_ORDERTOINDEX, sent|wparam, 1 }, - { 0 } -}; - -static const struct message hittest_seq[] = { - { HDM_HITTEST, sent }, - { HDM_HITTEST, sent }, - { HDM_HITTEST, sent }, - { 0 } -}; - -static const struct message setHotDivider_seq_interactive[] = { - { HDM_SETHOTDIVIDER, sent|wparam, TRUE }, - { WM_PAINT, sent|defwinproc}, - { WM_NCPAINT, sent|defwinproc}, - { WM_ERASEBKGND, sent|defwinproc}, - { HDM_SETHOTDIVIDER, sent|wparam|lparam, FALSE, 100 }, - { WM_PAINT, sent|defwinproc}, - { HDM_SETHOTDIVIDER, sent|wparam|lparam, FALSE, 1}, - { WM_PAINT, sent|defwinproc}, - { 0 } -}; - -static const struct message setHotDivider_seq_noninteractive[] = { - { HDM_SETHOTDIVIDER, sent|wparam, TRUE }, - { HDM_SETHOTDIVIDER, sent|wparam|lparam, FALSE, 100 }, - { HDM_SETHOTDIVIDER, sent|wparam|lparam, FALSE, 1}, - { 0 } -}; - -static const struct message imageMessages_seq[] = { - { HDM_SETIMAGELIST, sent }, - { HDM_GETIMAGELIST, sent }, - { HDM_CREATEDRAGIMAGE, sent }, - { 0 } -}; - -static const struct message filterMessages_seq_interactive[] = { - { HDM_SETFILTERCHANGETIMEOUT, sent|wparam|lparam, 1, 100 }, - { HDM_CLEARFILTER, sent|wparam|lparam, 0, 1 }, - { HDM_EDITFILTER, sent|wparam|lparam, 1, 0 }, - { WM_PARENTNOTIFY, sent|wparam|defwinproc, WM_CREATE }, - { WM_CTLCOLOREDIT, sent|defwinproc }, - { WM_COMMAND, sent|defwinproc }, - { 0 } -}; - -static const struct message filterMessages_seq_noninteractive[] = { - { HDM_SETFILTERCHANGETIMEOUT, sent|wparam|lparam, 1, 100 }, - { HDM_CLEARFILTER, sent|wparam|lparam, 0, 1 }, - { HDM_EDITFILTER, sent|wparam|lparam, 1, 0 }, - { WM_PARENTNOTIFY, sent|wparam|defwinproc|optional, WM_CREATE }, - { WM_COMMAND, sent|defwinproc|optional }, - { 0 } -}; - -static const struct message unicodeformatMessages_seq[] = { - { HDM_SETUNICODEFORMAT, sent|wparam, TRUE }, - { HDM_GETUNICODEFORMAT, sent }, - { 0 } -}; - -static const struct message bitmapmarginMessages_seq[] = { - { HDM_GETBITMAPMARGIN, sent }, - { 0 } -}; - - -static void expect_notify(INT iCode, BOOL fUnicode, HDITEMA *lpItem) -{ - assert(nExpectedNotify < 10); - expectedNotify[nExpectedNotify].iCode = iCode; - expectedNotify[nExpectedNotify].fUnicode = fUnicode; - expectedNotify[nExpectedNotify].hdItem = *lpItem; - nExpectedNotify++; -} - -static void dont_expect_notify(INT iCode) -{ - assert(nUnexpectedNotify < 10); - unexpectedNotify[nUnexpectedNotify++] = iCode; -} - -static BOOL notifies_received(void) -{ - BOOL fRet = (nExpectedNotify == nReceivedNotify); - nExpectedNotify = nReceivedNotify = 0; - nUnexpectedNotify = 0; - return fRet; -} - -static LONG addItem(HWND hdex, int idx, LPSTR text) -{ - HDITEMA hdItem; - hdItem.mask = HDI_TEXT | HDI_WIDTH; - hdItem.cxy = 100; - hdItem.pszText = text; - hdItem.cchTextMax = 0; - return SendMessage(hdex, HDM_INSERTITEMA, idx, (LPARAM)&hdItem); -} - -static LONG setItem(HWND hdex, int idx, LPSTR text, BOOL fCheckNotifies) -{ - LONG ret; - HDITEMA hdexItem; - hdexItem.mask = HDI_TEXT; - hdexItem.pszText = text; - hdexItem.cchTextMax = 0; - if (fCheckNotifies) - { - expect_notify(HDN_ITEMCHANGINGA, FALSE, &hdexItem); - expect_notify(HDN_ITEMCHANGEDA, FALSE, &hdexItem); - } - ret = SendMessage(hdex, HDM_SETITEMA, idx, (LPARAM)&hdexItem); - if (fCheckNotifies) - ok(notifies_received(), "setItem(): not all expected notifies were received\n"); - return ret; -} - -static LONG setItemUnicodeNotify(HWND hdex, int idx, LPSTR text, LPWSTR wText) -{ - LONG ret; - HDITEMA hdexItem; - HDITEMW hdexNotify; - hdexItem.mask = HDI_TEXT; - hdexItem.pszText = text; - hdexItem.cchTextMax = 0; - - hdexNotify.mask = HDI_TEXT; - hdexNotify.pszText = wText; - - expect_notify(HDN_ITEMCHANGINGW, TRUE, (HDITEMA*)&hdexNotify); - expect_notify(HDN_ITEMCHANGEDW, TRUE, (HDITEMA*)&hdexNotify); - ret = SendMessage(hdex, HDM_SETITEMA, idx, (LPARAM)&hdexItem); - ok(notifies_received(), "setItemUnicodeNotify(): not all expected notifies were received\n"); - return ret; -} - -static LONG delItem(HWND hdex, int idx) -{ - return SendMessage(hdex, HDM_DELETEITEM, idx, 0); -} - -static LONG getItemCount(HWND hdex) -{ - return SendMessage(hdex, HDM_GETITEMCOUNT, 0, 0); -} - -static LONG getItem(HWND hdex, int idx, LPSTR textBuffer) -{ - HDITEMA hdItem; - hdItem.mask = HDI_TEXT; - hdItem.pszText = textBuffer; - hdItem.cchTextMax = MAX_CHARS; - return SendMessage(hdex, HDM_GETITEMA, idx, (LPARAM)&hdItem); -} - -static void addReadDelItem(HWND hdex, HDITEMA *phdiCreate, int maskRead, HDITEMA *phdiRead) -{ - ok(SendMessage(hdex, HDM_INSERTITEMA, 0, (LPARAM)phdiCreate)!=-1, "Adding item failed\n"); - ZeroMemory(phdiRead, sizeof(HDITEMA)); - phdiRead->mask = maskRead; - ok(SendMessage(hdex, HDM_GETITEMA, 0, (LPARAM)phdiRead)!=0, "Getting item data failed\n"); - ok(SendMessage(hdex, HDM_DELETEITEM, 0, 0)!=0, "Deleting item failed\n"); -} - -static HWND create_header_control (void) -{ - HWND handle; - HDLAYOUT hlayout; - RECT rectwin; - WINDOWPOS winpos; - - handle = CreateWindowEx(0, WC_HEADER, NULL, - WS_CHILD|WS_BORDER|WS_VISIBLE|HDS_BUTTONS|HDS_HORZ, - 0, 0, 0, 0, - hHeaderParentWnd, NULL, NULL, NULL); - assert(handle); - - if (winetest_interactive) - ShowWindow (hHeaderParentWnd, SW_SHOW); - - GetClientRect(hHeaderParentWnd,&rectwin); - hlayout.prc = &rectwin; - hlayout.pwpos = &winpos; - SendMessageA(handle,HDM_LAYOUT,0,(LPARAM) &hlayout); - SetWindowPos(handle, winpos.hwndInsertAfter, winpos.x, winpos.y, - winpos.cx, winpos.cy, 0); - - return handle; -} - -static void compare_items(INT iCode, HDITEMA *hdi1, HDITEMA *hdi2, BOOL fUnicode) -{ - ok(hdi1->mask == hdi2->mask, "Notify %d mask mismatch (%08x != %08x)\n", iCode, hdi1->mask, hdi2->mask); - if (hdi1->mask & HDI_WIDTH) - { - ok(hdi1->cxy == hdi2->cxy, "Notify %d cxy mismatch (%08x != %08x)\n", iCode, hdi1->cxy, hdi2->cxy); - } - if (hdi1->mask & HDI_TEXT) - { - if (hdi1->pszText == LPSTR_TEXTCALLBACKA) - { - ok(hdi1->pszText == LPSTR_TEXTCALLBACKA, "Notify %d - only one item is LPSTR_TEXTCALLBACK\n", iCode); - } - else - if (fUnicode) - { - char buf1[260]; - char buf2[260]; - WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)hdi1->pszText, -1, buf1, 260, NULL, NULL); - WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)hdi2->pszText, -1, buf2, 260, NULL, NULL); - ok(lstrcmpW((LPWSTR)hdi1->pszText, (LPWSTR)hdi2->pszText)==0, - "Notify %d text mismatch (L\"%s\" vs L\"%s\")\n", - iCode, buf1, buf2); - } - else - { - ok(strcmp(hdi1->pszText, hdi2->pszText)==0, - "Notify %d text mismatch (\"%s\" vs \"%s\")\n", - iCode, hdi1->pszText, hdi2->pszText); - } - } -} - -static char pszFirstItem[] = "First Item"; -static char pszSecondItem[] = "Second Item"; -static char pszThirdItem[] = "Third Item"; -static char pszFourthItem[] = "Fourth Item"; -static char pszReplaceItem[] = "Replace Item"; -static char pszOutOfRangeItem[] = "Out Of Range Item"; - -static char *str_items[] = - {pszFirstItem, pszSecondItem, pszThirdItem, pszFourthItem, pszReplaceItem, pszOutOfRangeItem}; - -static char pszUniTestA[] = "TST"; -static WCHAR pszUniTestW[] = {'T','S','T',0}; - - -#define TEST_GET_ITEM(i,c)\ -{ res = getItem(hWndHeader, i, buffer);\ - ok(res != 0, "Getting item[%d] using valid index failed unexpectedly (%d)\n", i, res);\ - ok(strcmp(str_items[c], buffer) == 0, "Getting item[%d] returned \"%s\" expecting \"%s\"\n", i, buffer, str_items[c]);\ -} - -#define TEST_GET_ITEMCOUNT(i)\ -{ res = getItemCount(hWndHeader);\ - ok(res == i, "Got Item Count as %d\n", res);\ -} - -static LRESULT WINAPI header_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - WNDPROC oldproc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA); - static LONG defwndproc_counter = 0; - LRESULT ret; - struct message msg; - - trace("header: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - add_message(sequences, HEADER_SEQ_INDEX, &msg); - - defwndproc_counter++; - ret = CallWindowProcA(oldproc, hwnd, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - static LONG defwndproc_counter = 0; - LRESULT ret; - struct message msg; - - /* do not log painting messages */ - if (message != WM_PAINT && - message != WM_ERASEBKGND && - message != WM_NCPAINT && - message != WM_NCHITTEST && - message != WM_GETTEXT && - message != WM_GETICON && - message != WM_DEVICECHANGE) - - { - trace("parent: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); - - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - add_message(sequences, PARENT_SEQ_INDEX, &msg); - } - - defwndproc_counter++; - ret = DefWindowProcA(hwnd, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static BOOL register_parent_wnd_class(void) -{ - WNDCLASSA cls; - - cls.style = 0; - cls.lpfnWndProc = parent_wnd_proc; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(NULL); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "Header test parent class"; - return RegisterClassA(&cls); -} - -static HWND create_custom_parent_window(void) -{ - if (!register_parent_wnd_class()) - return NULL; - - return CreateWindowExA(0, "Header test parent class", "Header Message Sequence Testing", - WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, - 672+2*GetSystemMetrics(SM_CXSIZEFRAME), - 226+GetSystemMetrics(SM_CYCAPTION)+2*GetSystemMetrics(SM_CYSIZEFRAME), - NULL, NULL, GetModuleHandleA(NULL), 0); -} - -static HWND create_custom_header_control(HWND hParent, BOOL preloadHeaderItems) -{ - WNDPROC oldproc; - HWND childHandle; - HDLAYOUT hlayout; - RECT rectwin; - WINDOWPOS winpos; - int retVal; - int loopcnt; - static char firstHeaderItem[] = "Name"; - static char secondHeaderItem[] = "Size"; - static char *items[] = {secondHeaderItem, firstHeaderItem}; - HDITEM hdItem; - hdItem.mask = HDI_TEXT | HDI_WIDTH | HDI_FORMAT; - hdItem.fmt = HDF_LEFT; - hdItem.cxy = 80; - hdItem.cchTextMax = 260; - - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - childHandle = CreateWindowEx(0, WC_HEADER, NULL, - WS_CHILD|WS_BORDER|WS_VISIBLE|HDS_BUTTONS|HDS_HORZ, - 0, 0, 0, 0, - hParent, NULL, NULL, NULL); - assert(childHandle); - if (preloadHeaderItems) - { - for ( loopcnt = 0 ; loopcnt < 2 ; loopcnt++ ) - { - hdItem.pszText = items[loopcnt]; - retVal = SendMessage(childHandle, HDM_INSERTITEM, loopcnt, (LPARAM) &hdItem); - ok(retVal == loopcnt, "Adding item %d failed with return value %d\n", ( loopcnt + 1 ), retVal); - } - } - - if (winetest_interactive) - ShowWindow (hParent, SW_SHOW); - - GetClientRect(hParent,&rectwin); - hlayout.prc = &rectwin; - hlayout.pwpos = &winpos; - SendMessageA(childHandle,HDM_LAYOUT,0,(LPARAM) &hlayout); - SetWindowPos(childHandle, winpos.hwndInsertAfter, winpos.x, winpos.y, - winpos.cx, winpos.cy, 0); - - oldproc = (WNDPROC)SetWindowLongPtrA(childHandle, GWLP_WNDPROC, - (LONG_PTR)header_subclass_proc); - SetWindowLongPtrA(childHandle, GWLP_USERDATA, (LONG_PTR)oldproc); - return childHandle; -} - -static void check_auto_format(void) -{ - HDITEMA hdiCreate; - HDITEMA hdiRead; - static CHAR text[] = "Test"; - ZeroMemory(&hdiCreate, sizeof(HDITEMA)); - - /* Windows implicitly sets some format bits in INSERTITEM */ - - /* HDF_STRING is automatically set and cleared for no text */ - hdiCreate.mask = HDI_TEXT|HDI_WIDTH|HDI_FORMAT; - hdiCreate.pszText = text; - hdiCreate.cxy = 100; - hdiCreate.fmt=HDF_CENTER; - addReadDelItem(hWndHeader, &hdiCreate, HDI_FORMAT, &hdiRead); - ok(hdiRead.fmt == (HDF_STRING|HDF_CENTER), "HDF_STRING not set automatically (fmt=%x)\n", hdiRead.fmt); - - hdiCreate.mask = HDI_WIDTH|HDI_FORMAT; - hdiCreate.pszText = text; - hdiCreate.fmt = HDF_CENTER|HDF_STRING; - addReadDelItem(hWndHeader, &hdiCreate, HDI_FORMAT, &hdiRead); - ok(hdiRead.fmt == (HDF_CENTER), "HDF_STRING should be automatically cleared (fmt=%x)\n", hdiRead.fmt); - - /* HDF_BITMAP is automatically set and cleared for a NULL bitmap or no bitmap */ - hdiCreate.mask = HDI_BITMAP|HDI_WIDTH|HDI_FORMAT; - hdiCreate.hbm = CreateBitmap(16, 16, 1, 8, NULL); - hdiCreate.fmt = HDF_CENTER; - addReadDelItem(hWndHeader, &hdiCreate, HDI_FORMAT, &hdiRead); - ok(hdiRead.fmt == (HDF_BITMAP|HDF_CENTER), "HDF_BITMAP not set automatically (fmt=%x)\n", hdiRead.fmt); - DeleteObject(hdiCreate.hbm); - - hdiCreate.hbm = NULL; - hdiCreate.fmt = HDF_CENTER|HDF_BITMAP; - addReadDelItem(hWndHeader, &hdiCreate, HDI_FORMAT, &hdiRead); - ok(hdiRead.fmt == HDF_CENTER, "HDF_BITMAP not cleared automatically for NULL bitmap (fmt=%x)\n", hdiRead.fmt); - - hdiCreate.mask = HDI_WIDTH|HDI_FORMAT; - hdiCreate.fmt = HDF_CENTER|HDF_BITMAP; - addReadDelItem(hWndHeader, &hdiCreate, HDI_FORMAT, &hdiRead); - ok(hdiRead.fmt == HDF_CENTER, "HDF_BITMAP not cleared automatically for no bitmap (fmt=%x)\n", hdiRead.fmt); - - /* HDF_IMAGE is automatically set but not cleared */ - hdiCreate.mask = HDI_IMAGE|HDI_WIDTH|HDI_FORMAT; - hdiCreate.iImage = 17; - addReadDelItem(hWndHeader, &hdiCreate, HDI_FORMAT, &hdiRead); - ok(hdiRead.fmt == (HDF_IMAGE|HDF_CENTER), "HDF_IMAGE not set automatically (fmt=%x)\n", hdiRead.fmt); - - hdiCreate.mask = HDI_WIDTH|HDI_FORMAT; - hdiCreate.fmt = HDF_CENTER|HDF_IMAGE; - hdiCreate.iImage = 0; - addReadDelItem(hWndHeader, &hdiCreate, HDI_FORMAT, &hdiRead); - ok(hdiRead.fmt == (HDF_CENTER|HDF_IMAGE), "HDF_IMAGE shouldn't be cleared automatically (fmt=%x)\n", hdiRead.fmt); -} - -static void check_auto_fields(void) -{ - HDITEMA hdiCreate; - HDITEMA hdiRead; - static CHAR text[] = "Test"; - LONG res; - - /* Windows stores the format, width, lparam even if they are not in the item's mask */ - ZeroMemory(&hdiCreate, sizeof(HDITEMA)); - hdiCreate.mask = HDI_TEXT; - hdiCreate.cxy = 100; - hdiCreate.pszText = text; - addReadDelItem(hWndHeader, &hdiCreate, HDI_WIDTH, &hdiRead); - TEST_GET_ITEMCOUNT(6); - ok(hdiRead.cxy == hdiCreate.cxy, "cxy should be automatically set\n"); - - ZeroMemory(&hdiCreate, sizeof(HDITEMA)); - hdiCreate.mask = HDI_TEXT; - hdiCreate.pszText = text; - hdiCreate.lParam = 0x12345678; - addReadDelItem(hWndHeader, &hdiCreate, HDI_LPARAM, &hdiRead); - TEST_GET_ITEMCOUNT(6); - ok(hdiRead.lParam == hdiCreate.lParam, "lParam should be automatically set\n"); - - ZeroMemory(&hdiCreate, sizeof(HDITEMA)); - hdiCreate.mask = HDI_TEXT; - hdiCreate.pszText = text; - hdiCreate.fmt = HDF_STRING|HDF_CENTER; - addReadDelItem(hWndHeader, &hdiCreate, HDI_FORMAT, &hdiRead); - TEST_GET_ITEMCOUNT(6); - ok(hdiRead.fmt == hdiCreate.fmt, "fmt should be automatically set\n"); - - /* others fields are not set */ - ZeroMemory(&hdiCreate, sizeof(HDITEMA)); - hdiCreate.mask = HDI_TEXT; - hdiCreate.pszText = text; - hdiCreate.hbm = CreateBitmap(16, 16, 1, 8, NULL); - addReadDelItem(hWndHeader, &hdiCreate, HDI_BITMAP, &hdiRead); - TEST_GET_ITEMCOUNT(6); - ok(hdiRead.hbm == NULL, "hbm should not be automatically set\n"); - DeleteObject(hdiCreate.hbm); - - ZeroMemory(&hdiCreate, sizeof(HDITEMA)); - hdiCreate.mask = HDI_IMAGE; - hdiCreate.iImage = 17; - hdiCreate.pszText = text; - addReadDelItem(hWndHeader, &hdiCreate, HDI_TEXT, &hdiRead); - TEST_GET_ITEMCOUNT(6); - ok(hdiRead.pszText==NULL, "pszText shouldn't be automatically set\n"); - - /* field from comctl >4.0 not tested as the system probably won't touch them */ -} - -static void check_mask(void) -{ - HDITEMA hdi; - static CHAR text[] = "ABC"; - LRESULT ret; - - /* don't create items if the mask is zero */ - ZeroMemory(&hdi, sizeof(hdi)); - hdi.mask = 0; - hdi.cxy = 200; - hdi.pszText = text; - hdi.fmt = 0; - hdi.iOrder = 0; - hdi.lParam = 17; - hdi.cchTextMax = 260; - ret = SendMessage(hWndHeader, HDM_INSERTITEM, 0, (LPARAM)&hdi); - ok(ret == -1, "Creating an item with a zero mask should have failed\n"); - if (ret != -1) SendMessage(hWndHeader, HDM_DELETEITEM, 0, 0); - - /* with a non-zero mask creation will succeed */ - ZeroMemory(&hdi, sizeof(hdi)); - hdi.mask = HDI_LPARAM; - ret = SendMessage(hWndHeader, HDM_INSERTITEM, 0, (LPARAM)&hdi); - ok(ret != -1, "Adding item with non-zero mask failed\n"); - if (ret != -1) - SendMessage(hWndHeader, HDM_DELETEITEM, 0, 0); - - /* in SETITEM if the mask contains a unknown bit, it is ignored */ - ZeroMemory(&hdi, sizeof(hdi)); - hdi.mask = 0x08000000 | HDI_LPARAM | HDI_IMAGE; - hdi.lParam = 133; - hdi.iImage = 17; - ret = SendMessage(hWndHeader, HDM_INSERTITEM, 0, (LPARAM)&hdi); - ok(ret != -1, "Adding item failed\n"); - - if (ret != -1) - { - /* check result */ - ZeroMemory(&hdi, sizeof(hdi)); - hdi.mask = HDI_LPARAM | HDI_IMAGE; - SendMessage(hWndHeader, HDM_GETITEM, 0, (LPARAM)&hdi); - ok(hdi.lParam == 133, "comctl32 4.0 field not set\n"); - ok(hdi.iImage == 17, "comctl32 >4.0 field not set\n"); - - /* but in GETITEM if an unknown bit is set, comctl32 uses only version 4.0 fields */ - ZeroMemory(&hdi, sizeof(hdi)); - hdi.mask = 0x08000000 | HDI_LPARAM | HDI_IMAGE; - SendMessage(hWndHeader, HDM_GETITEM, 0, (LPARAM)&hdi); - ok(hdi.lParam == 133, "comctl32 4.0 field not read\n"); - ok(hdi.iImage == 0, "comctl32 >4.0 field shouldn't be read\n"); - - SendMessage(hWndHeader, HDM_DELETEITEM, 0, 0); - } -} - -static void test_header_control (void) -{ - LONG res; - static char buffer[MAX_CHARS]; - int i; - - hWndHeader = create_header_control (); - - for (i = 3; i >= 0; i--) - { - TEST_GET_ITEMCOUNT(3-i); - res = addItem(hWndHeader, 0, str_items[i]); - ok(res == 0, "Adding simple item failed (%d)\n", res); - } - - TEST_GET_ITEMCOUNT(4); - res = addItem(hWndHeader, 99, str_items[i+1]); - ok(res != -1, "Adding Out of Range item should fail with -1 got (%d)\n", res); - TEST_GET_ITEMCOUNT(5); - res = addItem(hWndHeader, 5, str_items[i+1]); - ok(res != -1, "Adding Out of Range item should fail with -1 got (%d)\n", res); - TEST_GET_ITEMCOUNT(6); - - for (i = 0; i < 4; i++) { TEST_GET_ITEM(i,i); TEST_GET_ITEMCOUNT(6); } - - res=getItem(hWndHeader, 99, buffer); - ok(res == 0, "Getting Out of Range item should fail with 0 (%d), got %s\n", res,buffer); - res=getItem(hWndHeader, 5, buffer); - ok(res == 1, "Getting Out of Range item should fail with 1 (%d), got %s\n", res,buffer); - res=getItem(hWndHeader, -2, buffer); - ok(res == 0, "Getting Out of Range item should fail with 0 (%d), got %s\n", res,buffer); - - if (winetest_interactive) - { - UpdateWindow(hHeaderParentWnd); - UpdateWindow(hWndHeader); - } - - TEST_GET_ITEMCOUNT(6); - res=setItem(hWndHeader, 99, str_items[5], FALSE); - ok(res == 0, "Setting Out of Range item should fail with 0 (%d)\n", res); - res=setItem(hWndHeader, 5, str_items[5], TRUE); - ok(res == 1, "Setting Out of Range item should fail with 1 (%d)\n", res); - res=setItem(hWndHeader, -2, str_items[5], FALSE); - ok(res == 0, "Setting Out of Range item should fail with 0 (%d)\n", res); - TEST_GET_ITEMCOUNT(6); - - for (i = 0; i < 4; i++) - { - res = setItem(hWndHeader, i, str_items[4], TRUE); - ok(res != 0, "Setting %d item failed (%d)\n", i+1, res); - TEST_GET_ITEM(i, 4); - TEST_GET_ITEMCOUNT(6); - } - - SendMessageA(hWndHeader, HDM_SETUNICODEFORMAT, TRUE, 0); - setItemUnicodeNotify(hWndHeader, 3, pszUniTestA, pszUniTestW); - SendMessageA(hWndHeader, WM_NOTIFYFORMAT, (WPARAM)hHeaderParentWnd, NF_REQUERY); - setItem(hWndHeader, 3, str_items[4], TRUE); - - dont_expect_notify(HDN_GETDISPINFOA); - dont_expect_notify(HDN_GETDISPINFOW); - addItem(hWndHeader, 0, LPSTR_TEXTCALLBACKA); - setItem(hWndHeader, 0, str_items[4], TRUE); - /* unexpected notifies cleared by notifies_received in setItem */ - dont_expect_notify(HDN_GETDISPINFOA); - dont_expect_notify(HDN_GETDISPINFOW); - setItem(hWndHeader, 0, LPSTR_TEXTCALLBACKA, TRUE); - /* unexpected notifies cleared by notifies_received in setItem */ - delItem(hWndHeader, 0); - - check_auto_format(); - TEST_GET_ITEMCOUNT(6); - check_auto_fields(); - TEST_GET_ITEMCOUNT(6); - check_mask(); - TEST_GET_ITEMCOUNT(6); - - res = delItem(hWndHeader, 5); - ok(res == 1, "Deleting Out of Range item should fail with 1 (%d)\n", res); - res = delItem(hWndHeader, -2); - ok(res == 0, "Deleting Out of Range item should fail with 0 (%d)\n", res); - TEST_GET_ITEMCOUNT(5); - - res = delItem(hWndHeader, 3); - ok(res != 0, "Deleting using out of range index failed (%d)\n", res); - TEST_GET_ITEMCOUNT(4); - res = delItem(hWndHeader, 0); - ok(res != 0, "Deleting using out of range index failed (%d)\n", res); - TEST_GET_ITEMCOUNT(3); - res = delItem(hWndHeader, 0); - ok(res != 0, "Deleting using out of range index failed (%d)\n", res); - TEST_GET_ITEMCOUNT(2); - res = delItem(hWndHeader, 0); - ok(res != 0, "Deleting using out of range index failed (%d)\n", res); - TEST_GET_ITEMCOUNT(1); - - DestroyWindow(hWndHeader); -} - -static void test_hdm_getitemrect(HWND hParent) -{ - - HWND hChild; - RECT rect; - int retVal; - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - hChild = create_custom_header_control(hParent, TRUE); - ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq, - "adder header control to parent", FALSE); - - retVal = SendMessage(hChild, HDM_GETITEMRECT, 1, (LPARAM) &rect); - ok(retVal == TRUE, "Getting item rect should TRUE, got %d\n", retVal); - /* check bounding rectangle information of 2nd header item */ - expect(80, rect.left); - expect(0, rect.top); - expect(160, rect.right); - expect(g_customheight, rect.bottom); - - retVal = SendMessage(hChild, HDM_GETITEMRECT, 0, (LPARAM) &rect); - - ok(retVal == TRUE, "Getting item rect should TRUE, got %d\n", retVal); - /* check bounding rectangle information of 1st header item */ - expect(0, rect.left); - expect(0, rect.top); - - expect(80, rect.right); - expect(g_customheight, rect.bottom); - - retVal = SendMessage(hChild, HDM_GETITEMRECT, 10, (LPARAM) &rect); - ok(retVal == 0, "Getting rect of nonexistent item should return 0, got %d\n", retVal); - - ok_sequence(sequences, HEADER_SEQ_INDEX, getItemRect_seq, "getItemRect sequence testing", FALSE); - DestroyWindow(hChild); -} - -static void test_hdm_layout(HWND hParent) -{ - HWND hChild; - int retVal; - RECT rect; - HDLAYOUT hdLayout; - WINDOWPOS windowPos; - hdLayout.prc = ▭ - hdLayout.pwpos = &windowPos; - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - hChild = create_custom_header_control(hParent, TRUE); - ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq, - "adder header control to parent", FALSE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - retVal = SendMessage(hChild, HDM_LAYOUT, 0, (LPARAM) &hdLayout); - expect(TRUE, retVal); - - ok_sequence(sequences, HEADER_SEQ_INDEX, layout_seq, "layout sequence testing", FALSE); - - DestroyWindow(hChild); -} - -static void test_hdm_ordertoindex(HWND hParent) -{ - HWND hChild; - int retVal; - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - hChild = create_custom_header_control(hParent, TRUE); - ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq, - "adder header control to parent", FALSE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - retVal = SendMessage(hChild, HDM_ORDERTOINDEX, 1, 0); - expect(1, retVal); - - ok_sequence(sequences, HEADER_SEQ_INDEX, orderToIndex_seq, "orderToIndex sequence testing", FALSE); - DestroyWindow(hChild); -} - -static void test_hdm_hittest(HWND hParent) -{ - HWND hChild; - int retVal; - POINT pt; - HDHITTESTINFO hdHitTestInfo; - const int firstItemRightBoundary = 80; - const int secondItemRightBoundary = 160; - const int bottomBoundary = g_customheight; - - pt.x = firstItemRightBoundary - 1; - pt.y = bottomBoundary - 1; - hdHitTestInfo.pt = pt; - - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - hChild = create_custom_header_control(hParent, TRUE); - ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq, - "adder header control to parent", FALSE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - retVal = SendMessage(hChild, HDM_HITTEST, 0, (LPARAM) &hdHitTestInfo); - expect(0, retVal); - expect(0, hdHitTestInfo.iItem); - expect(HHT_ONDIVIDER, hdHitTestInfo.flags); - - pt.x = secondItemRightBoundary - 1; - pt.y = bottomBoundary - 1; - hdHitTestInfo.pt = pt; - retVal = SendMessage(hChild, HDM_HITTEST, 1, (LPARAM) &hdHitTestInfo); - expect(1, retVal); - expect(1, hdHitTestInfo.iItem); - expect(HHT_ONDIVIDER, hdHitTestInfo.flags); - - pt.x = secondItemRightBoundary; - pt.y = bottomBoundary + 1; - hdHitTestInfo.pt = pt; - retVal = SendMessage(hChild, HDM_HITTEST, 0, (LPARAM) &hdHitTestInfo); - expect(-1, retVal); - expect(-1, hdHitTestInfo.iItem); - expect(HHT_BELOW, hdHitTestInfo.flags); - - ok_sequence(sequences, HEADER_SEQ_INDEX, hittest_seq, "hittest sequence testing", FALSE); - - DestroyWindow(hChild); -} - -static void test_hdm_sethotdivider(HWND hParent) -{ - HWND hChild; - int retVal; - /* low word: x coordinate = 5 - * high word: y coordinate = 5 - */ - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - hChild = create_custom_header_control(hParent, TRUE); - ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq, - "adder header control to parent", FALSE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - retVal = SendMessage(hChild, HDM_SETHOTDIVIDER, TRUE, MAKELPARAM(5, 5)); - expect(0, retVal); - - retVal = SendMessage(hChild, HDM_SETHOTDIVIDER, FALSE, 100); - expect(100, retVal); - retVal = SendMessage(hChild, HDM_SETHOTDIVIDER, FALSE, 1); - expect(1, retVal); - if (winetest_interactive) - ok_sequence(sequences, HEADER_SEQ_INDEX, setHotDivider_seq_interactive, - "setHotDivider sequence testing", TRUE); - else - ok_sequence(sequences, HEADER_SEQ_INDEX, setHotDivider_seq_noninteractive, - "setHotDivider sequence testing", FALSE); - - DestroyWindow(hChild); -} - -static void test_hdm_imageMessages(HWND hParent) -{ - HIMAGELIST hImageList = ImageList_Create (4, 4, 0, 1, 0); - HIMAGELIST hIml; - HWND hChild; - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - hChild = create_custom_header_control(hParent, TRUE); - ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq, - "adder header control to parent", FALSE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - hIml = (HIMAGELIST) SendMessage(hChild, HDM_SETIMAGELIST, 0, (LPARAM) hImageList); - ok(hIml == NULL, "Expected NULL, got %p\n", hIml); - - hIml = (HIMAGELIST) SendMessage(hChild, HDM_GETIMAGELIST, 0, 0); - ok(hIml != NULL, "Expected non-NULL handle, got %p\n", hIml); - - hIml = (HIMAGELIST) SendMessage(hChild, HDM_CREATEDRAGIMAGE, 0, 0); - ok(hIml != NULL, "Expected non-NULL handle, got %p\n", hIml); - ImageList_Destroy(hIml); - - ok_sequence(sequences, HEADER_SEQ_INDEX, imageMessages_seq, "imageMessages sequence testing", FALSE); - - DestroyWindow(hChild); -} - -static void test_hdm_filterMessages(HWND hParent) -{ - HWND hChild; - int retVal, timeout; - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - hChild = create_custom_header_control(hParent, TRUE); - assert(hChild); - ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq, - "adder header control to parent", FALSE); - - timeout = SendMessage(hChild, HDM_SETFILTERCHANGETIMEOUT, 1, 100); - SendMessage(hChild, HDM_SETFILTERCHANGETIMEOUT, 1, timeout); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* msdn incorrectly states that return value - * is the index of the filter control being - * modified. The sendMessage here should - * return previous filter timeout value - */ - - retVal = SendMessage(hChild, HDM_SETFILTERCHANGETIMEOUT, 1, 100); - expect(timeout, retVal); - - todo_wine - { - retVal = SendMessage(hChild, HDM_CLEARFILTER, 0, 1); - if (retVal == 0) - win_skip("HDM_CLEARFILTER needs 5.80\n"); - else - expect(1, retVal); - - retVal = SendMessage(hChild, HDM_EDITFILTER, 1, 0); - if (retVal == 0) - win_skip("HDM_EDITFILTER needs 5.80\n"); - else - expect(1, retVal); - } - if (winetest_interactive) - ok_sequence(sequences, HEADER_SEQ_INDEX, filterMessages_seq_interactive, - "filterMessages sequence testing", TRUE); - else - ok_sequence(sequences, HEADER_SEQ_INDEX, filterMessages_seq_noninteractive, - "filterMessages sequence testing", FALSE); - /* Some Win9x versions don't send a WM_KILLFOCUS. - * Set the focus explicitly to the parent to avoid a crash. - */ - SetFocus(hParent); - DestroyWindow(hChild); - -} - -static void test_hdm_unicodeformatMessages(HWND hParent) -{ - HWND hChild; - int retVal; - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - hChild = create_custom_header_control(hParent, TRUE); - ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq, - "adder header control to parent", FALSE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - retVal = SendMessage(hChild, HDM_SETUNICODEFORMAT, TRUE, 0); - expect(0, retVal); - retVal = SendMessage(hChild, HDM_GETUNICODEFORMAT, 0, 0); - expect(1, retVal); - - ok_sequence(sequences, HEADER_SEQ_INDEX, unicodeformatMessages_seq, - "unicodeformatMessages sequence testing", FALSE); - DestroyWindow(hChild); -} - -static void test_hdm_bitmapmarginMessages(HWND hParent) -{ - HWND hChild; - int retVal; - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - hChild = create_custom_header_control(hParent, TRUE); - ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq, - "adder header control to parent", FALSE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - retVal = SendMessage(hChild, HDM_GETBITMAPMARGIN, 0, 0); - if (retVal == 0) - win_skip("HDM_GETBITMAPMARGIN needs 5.80\n"); - else - expect(6, retVal); - - ok_sequence(sequences, HEADER_SEQ_INDEX, bitmapmarginMessages_seq, - "bitmapmarginMessages sequence testing", FALSE); - DestroyWindow(hChild); -} - -static void test_hdm_index_messages(HWND hParent) -{ - HWND hChild; - int retVal; - int loopcnt; - int strcmpResult; - int iSize; - static const int lpiarray[2] = {1, 0}; - static int lpiarrayReceived[2]; - static char firstHeaderItem[] = "Name"; - static char secondHeaderItem[] = "Size"; - static char thirdHeaderItem[] = "Type"; - static char fourthHeaderItem[] = "Date Modified"; - static char *items[] = {firstHeaderItem, secondHeaderItem, thirdHeaderItem, fourthHeaderItem}; - RECT rect; - HDITEM hdItem; - hdItem.mask = HDI_TEXT | HDI_WIDTH | HDI_FORMAT; - hdItem.fmt = HDF_LEFT; - hdItem.cxy = 80; - hdItem.cchTextMax = 260; - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - hChild = create_custom_header_control(hParent, FALSE); - if (winetest_interactive) - ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq_interactive, - "adder header control to parent", TRUE); - else - ok_sequence(sequences, PARENT_SEQ_INDEX, add_header_to_parent_seq, - "adder header control to parent", FALSE); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - for ( loopcnt = 0 ; loopcnt < 4 ; loopcnt++ ) - { - hdItem.pszText = items[loopcnt]; - retVal = SendMessage(hChild, HDM_INSERTITEM, loopcnt, (LPARAM) &hdItem); - ok(retVal == loopcnt, "Adding item %d failed with return value %d\n", ( loopcnt + 1 ), retVal); - } - ok_sequence(sequences, HEADER_SEQ_INDEX, insertItem_seq, "insertItem sequence testing", FALSE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - retVal = SendMessage(hChild, HDM_DELETEITEM, 3, (LPARAM) &hdItem); - ok(retVal == TRUE, "Deleting item 3 should return TRUE, got %d\n", retVal); - retVal = SendMessage(hChild, HDM_GETITEMCOUNT, 0, 0); - ok(retVal == 3, "Getting item count should return 3, got %d\n", retVal); - - retVal = SendMessage(hChild, HDM_DELETEITEM, 3, (LPARAM) &hdItem); - ok(retVal == FALSE, "Deleting already-deleted item should return FALSE, got %d\n", retVal); - retVal = SendMessage(hChild, HDM_GETITEMCOUNT, 0, 0); - ok(retVal == 3, "Getting item count should return 3, got %d\n", retVal); - - retVal = SendMessage(hChild, HDM_DELETEITEM, 2, (LPARAM) &hdItem); - ok(retVal == TRUE, "Deleting item 2 should return TRUE, got %d\n", retVal); - retVal = SendMessage(hChild, HDM_GETITEMCOUNT, 0, 0); - ok(retVal == 2, "Getting item count should return 2, got %d\n", retVal); - - ok_sequence(sequences, HEADER_SEQ_INDEX, deleteItem_getItemCount_seq, - "deleteItem_getItemCount sequence testing", FALSE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - retVal = SendMessage(hChild, HDM_GETITEM, 3, (LPARAM) &hdItem); - ok(retVal == FALSE, "Getting already-deleted item should return FALSE, got %d\n", retVal); - - retVal = SendMessage(hChild, HDM_GETITEM, 0, (LPARAM) &hdItem); - ok(retVal == TRUE, "Getting the 1st header item should return TRUE, got %d\n", retVal); - - ok_sequence(sequences, HEADER_SEQ_INDEX, getItem_seq, "getItem sequence testing", FALSE); - - /* check if the item is the right one */ - strcmpResult = strcmp(hdItem.pszText, firstHeaderItem); - expect(0, strcmpResult); - expect(80, hdItem.cxy); - - iSize = SendMessage(hChild, HDM_GETITEMCOUNT, 0, 0); - - /* item should be updated just after accepting new array */ - ShowWindow(hChild, SW_HIDE); - retVal = SendMessage(hChild, HDM_SETORDERARRAY, iSize, (LPARAM) lpiarray); - expect(TRUE, retVal); - rect.left = 0; - retVal = SendMessage(hChild, HDM_GETITEMRECT, 0, (LPARAM) &rect); - expect(TRUE, retVal); - ok(rect.left != 0, "Expected updated rectangle\n"); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - retVal = SendMessage(hChild, HDM_SETORDERARRAY, iSize, (LPARAM) lpiarray); - ok(retVal == TRUE, "Setting header items order should return TRUE, got %d\n", retVal); - - retVal = SendMessage(hChild, HDM_GETORDERARRAY, iSize, (LPARAM) lpiarrayReceived); - ok(retVal == TRUE, "Getting header items order should return TRUE, got %d\n", retVal); - - ok_sequence(sequences, HEADER_SEQ_INDEX, orderArray_seq, "set_get_orderArray sequence testing", FALSE); - - /* check if the array order is set correctly and the size of the array is correct. */ - expect(2, iSize); - expect(lpiarray[0], lpiarrayReceived[0]); - expect(lpiarray[1], lpiarrayReceived[1]); - - hdItem.mask = HDI_FORMAT; - hdItem.fmt = HDF_CENTER | HDF_STRING; - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - retVal = SendMessage(hChild, HDM_SETITEM, 0, (LPARAM) &hdItem); - ok(retVal == TRUE, "Aligning 1st header item to center should return TRUE, got %d\n", retVal); - hdItem.fmt = HDF_RIGHT | HDF_STRING; - retVal = SendMessage(hChild, HDM_SETITEM, 1, (LPARAM) &hdItem); - ok(retVal == TRUE, "Aligning 2nd header item to right should return TRUE, got %d\n", retVal); - - ok_sequence(sequences, HEADER_SEQ_INDEX, setItem_seq, "setItem sequence testing", FALSE); - DestroyWindow(hChild); -} - -static void test_hdf_fixedwidth(HWND hParent) -{ - HWND hChild; - HDITEM hdItem; - DWORD ret; - RECT rect; - HDHITTESTINFO ht; - - hChild = create_custom_header_control(hParent, FALSE); - - hdItem.mask = HDI_WIDTH | HDI_FORMAT; - hdItem.fmt = HDF_FIXEDWIDTH; - hdItem.cxy = 80; - - ret = SendMessage(hChild, HDM_INSERTITEM, 0, (LPARAM)&hdItem); - expect(0, ret); - - /* try to change width */ - rect.right = rect.bottom = 0; - SendMessage(hChild, HDM_GETITEMRECT, 0, (LPARAM)&rect); - ok(rect.right != 0, "Expected not zero width\n"); - ok(rect.bottom != 0, "Expected not zero height\n"); - - SendMessage(hChild, WM_LBUTTONDOWN, 0, MAKELPARAM(rect.right, rect.bottom / 2)); - SendMessage(hChild, WM_MOUSEMOVE, 0, MAKELPARAM(rect.right + 20, rect.bottom / 2)); - SendMessage(hChild, WM_LBUTTONUP, 0, MAKELPARAM(rect.right + 20, rect.bottom / 2)); - - SendMessage(hChild, HDM_GETITEMRECT, 0, (LPARAM)&rect); - - if (hdItem.cxy != rect.right) - { - win_skip("HDF_FIXEDWIDTH format not supported\n"); - DestroyWindow(hChild); - return; - } - - /* try to adjust with message */ - hdItem.mask = HDI_WIDTH; - hdItem.cxy = 90; - - ret = SendMessage(hChild, HDM_SETITEM, 0, (LPARAM)&hdItem); - expect(TRUE, ret); - - rect.right = 0; - SendMessage(hChild, HDM_GETITEMRECT, 0, (LPARAM)&rect); - expect(90, rect.right); - - /* hittesting doesn't report ondivider flag for HDF_FIXEDWIDTH */ - ht.pt.x = rect.right - 1; - ht.pt.y = rect.bottom / 2; - SendMessage(hChild, HDM_HITTEST, 0, (LPARAM)&ht); - expect(HHT_ONHEADER, ht.flags); - - /* try to adjust with message */ - hdItem.mask = HDI_FORMAT; - hdItem.fmt = 0; - - ret = SendMessage(hChild, HDM_SETITEM, 0, (LPARAM)&hdItem); - expect(TRUE, ret); - - ht.pt.x = 90; - ht.pt.y = rect.bottom / 2; - SendMessage(hChild, HDM_HITTEST, 0, (LPARAM)&ht); - expect(HHT_ONDIVIDER, ht.flags); - - DestroyWindow(hChild); -} - -static void test_hds_nosizing(HWND hParent) -{ - HWND hChild; - HDITEM hdItem; - DWORD ret; - RECT rect; - HDHITTESTINFO ht; - - hChild = create_custom_header_control(hParent, FALSE); - - memset(&hdItem, 0, sizeof(hdItem)); - hdItem.mask = HDI_WIDTH; - hdItem.cxy = 80; - - ret = SendMessage(hChild, HDM_INSERTITEM, 0, (LPARAM)&hdItem); - expect(0, ret); - - /* HDS_NOSIZING only blocks hittesting */ - ret = GetWindowLong(hChild, GWL_STYLE); - SetWindowLong(hChild, GWL_STYLE, ret | HDS_NOSIZING); - - /* try to change width with mouse gestures */ - rect.right = rect.bottom = 0; - SendMessage(hChild, HDM_GETITEMRECT, 0, (LPARAM)&rect); - ok(rect.right != 0, "Expected not zero width\n"); - ok(rect.bottom != 0, "Expected not zero height\n"); - - SendMessage(hChild, WM_LBUTTONDOWN, 0, MAKELPARAM(rect.right, rect.bottom / 2)); - SendMessage(hChild, WM_MOUSEMOVE, 0, MAKELPARAM(rect.right + 20, rect.bottom / 2)); - SendMessage(hChild, WM_LBUTTONUP, 0, MAKELPARAM(rect.right + 20, rect.bottom / 2)); - - SendMessage(hChild, HDM_GETITEMRECT, 0, (LPARAM)&rect); - - if (hdItem.cxy != rect.right) - { - win_skip("HDS_NOSIZING style not supported\n"); - DestroyWindow(hChild); - return; - } - - /* this style doesn't set HDF_FIXEDWIDTH for items */ - hdItem.mask = HDI_FORMAT; - ret = SendMessage(hChild, HDM_GETITEM, 0, (LPARAM)&hdItem); - expect(TRUE, ret); - ok(!(hdItem.fmt & HDF_FIXEDWIDTH), "Unexpected HDF_FIXEDWIDTH\n"); - - /* try to adjust with message */ - hdItem.mask = HDI_WIDTH; - hdItem.cxy = 90; - - ret = SendMessage(hChild, HDM_SETITEM, 0, (LPARAM)&hdItem); - expect(TRUE, ret); - - rect.right = 0; - SendMessage(hChild, HDM_GETITEMRECT, 0, (LPARAM)&rect); - expect(90, rect.right); - - /* hittesting doesn't report ondivider flags for HDS_NOSIZING */ - ht.pt.x = rect.right - 1; - ht.pt.y = rect.bottom / 2; - SendMessage(hChild, HDM_HITTEST, 0, (LPARAM)&ht); - expect(HHT_ONHEADER, ht.flags); - - /* try to adjust with message */ - ret = GetWindowLong(hChild, GWL_STYLE); - SetWindowLong(hChild, GWL_STYLE, ret & ~HDS_NOSIZING); - - ht.pt.x = 90; - ht.pt.y = rect.bottom / 2; - SendMessage(hChild, HDM_HITTEST, 0, (LPARAM)&ht); - expect(HHT_ONDIVIDER, ht.flags); - - DestroyWindow(hChild); -} - -#define TEST_NMCUSTOMDRAW(draw_stage, item_spec, lparam, _left, _top, _right, _bottom) \ - ok(nm->dwDrawStage == draw_stage, "Invalid dwDrawStage %d vs %d\n", draw_stage, nm->dwDrawStage); \ - if (item_spec != -1) \ - ok(nm->dwItemSpec == item_spec, "Invalid dwItemSpec %d vs %ld\n", item_spec, nm->dwItemSpec); \ - ok(nm->lItemlParam == lparam, "Invalid lItemlParam %d vs %ld\n", lparam, nm->lItemlParam); \ - ok((nm->rc.top == _top && nm->rc.bottom == _bottom && nm->rc.left == _left && nm->rc.right == _right) || \ - broken(draw_stage != CDDS_ITEMPREPAINT), /* comctl32 < 5.80 */ \ - "Invalid rect (%d,%d) (%d,%d) vs (%d,%d) (%d,%d)\n", _left, _top, _right, _bottom, \ - nm->rc.left, nm->rc.top, nm->rc.right, nm->rc.bottom); - -static LRESULT customdraw_1(int n, NMCUSTOMDRAW *nm) -{ - if (nm == NULL) { /* test ended */ - ok(n==1, "NM_CUSTOMDRAW messages: %d, expected: 1\n", n); - return 0; - } - - switch (n) - { - case 0: - /* don't test dwItemSpec - it's 0 no comctl5 but 1308756 on comctl6 */ - TEST_NMCUSTOMDRAW(CDDS_PREPAINT, -1, 0, 0, 0, 670, g_customheight); - return 0; - } - - ok(FALSE, "To many custom draw messages (n=%d, nm->dwDrawStage=%d)\n", n, nm->dwDrawStage); - return -1; -} - -static LRESULT customdraw_2(int n, NMCUSTOMDRAW *nm) -{ - if (nm == NULL) { /* test ended */ - ok(n==4, "NM_CUSTOMDRAW messages: %d, expected: 4\n", n); - return 0; - } - - switch (n) - { - case 0: - TEST_NMCUSTOMDRAW(CDDS_PREPAINT, -1, 0, 0, 0, 670, g_customheight); - return CDRF_NOTIFYITEMDRAW; - case 1: - TEST_NMCUSTOMDRAW(CDDS_ITEMPREPAINT, 0, 0, 0, 0, 50, g_customheight); - return 0; - case 2: - TEST_NMCUSTOMDRAW(CDDS_ITEMPREPAINT, 1, 5, 50, 0, 150, g_customheight); - return 0; - case 3: - TEST_NMCUSTOMDRAW(CDDS_ITEMPREPAINT, 2, 10, 150, 0, 300, g_customheight); - return 0; - } - - ok(FALSE, "To many custom draw messages (n=%d, nm->dwDrawStage=%d)\n", n, nm->dwDrawStage); - return 0; -} - -static LRESULT customdraw_3(int n, NMCUSTOMDRAW *nm) -{ - if (nm == NULL) { /* test ended */ - ok(n==5, "NM_CUSTOMDRAW messages: %d, expected: 5\n", n); - return 0; - } - - switch (n) - { - case 0: - TEST_NMCUSTOMDRAW(CDDS_PREPAINT, -1, 0, 0, 0, 670, g_customheight); - return CDRF_NOTIFYITEMDRAW|CDRF_NOTIFYPOSTERASE|CDRF_NOTIFYPOSTPAINT|CDRF_SKIPDEFAULT; - case 1: - TEST_NMCUSTOMDRAW(CDDS_ITEMPREPAINT, 0, 0, 0, 0, 50, g_customheight); - return 0; - case 2: - TEST_NMCUSTOMDRAW(CDDS_ITEMPREPAINT, 1, 5, 50, 0, 150, g_customheight); - return 0; - case 3: - TEST_NMCUSTOMDRAW(CDDS_ITEMPREPAINT, 2, 10, 150, 0, 300, g_customheight); - return 0; - case 4: - TEST_NMCUSTOMDRAW(CDDS_POSTPAINT, -1, 0, 0, 0, 670, g_customheight); - return 0; - } - - ok(FALSE, "To many custom draw messages (n=%d, nm->dwDrawStage=%d)\n", n, nm->dwDrawStage); - return 0; -} - - -static LRESULT customdraw_4(int n, NMCUSTOMDRAW *nm) -{ - if (nm == NULL) { /* test ended */ - ok(n==4, "NM_CUSTOMDRAW messages: %d, expected: 4\n", n); - return 0; - } - - switch (n) - { - case 0: - TEST_NMCUSTOMDRAW(CDDS_PREPAINT, -1, 0, 0, 0, 670, g_customheight); - return CDRF_NOTIFYITEMDRAW|CDRF_NOTIFYPOSTPAINT; - case 1: - TEST_NMCUSTOMDRAW(CDDS_ITEMPREPAINT, 0, 0, 0, 0, 50, g_customheight); - return 0; - case 2: - TEST_NMCUSTOMDRAW(CDDS_ITEMPREPAINT, 2, 10, 150, 0, 300, g_customheight); - return 0; - case 3: - TEST_NMCUSTOMDRAW(CDDS_POSTPAINT, -1, 0, 0, 0, 670, g_customheight); - return 0; - } - - ok(FALSE, "To many custom draw messages (n=%d, nm->dwDrawStage=%d)\n", n, nm->dwDrawStage); - return 0; -} - -static void run_customdraw_scenario(CUSTOMDRAWPROC proc) -{ - g_CustomDrawProc = proc; - g_CustomDrawCount = 0; - InvalidateRect(hWndHeader, NULL, TRUE); - UpdateWindow(hWndHeader); - proc(g_CustomDrawCount, NULL); - g_CustomDrawProc = NULL; -} - -static void test_customdraw(void) -{ - int i; - HDITEM item; - RECT rect; - CHAR name[] = "Test"; - hWndHeader = create_header_control(); - GetClientRect(hWndHeader, &rect); - ok(rect.right - rect.left == 670 && rect.bottom - rect.top == g_customheight, - "Tests will fail as header size is %dx%d instead of 670x%d\n", - rect.right - rect.left, rect.bottom - rect.top, g_customheight); - - for (i = 0; i < 3; i++) - { - ZeroMemory(&item, sizeof(item)); - item.mask = HDI_TEXT|HDI_WIDTH; - item.cxy = 50*(i+1); - item.pszText = name; - item.lParam = i*5; - SendMessage(hWndHeader, HDM_INSERTITEM, i, (LPARAM)&item); - } - - run_customdraw_scenario(customdraw_1); - run_customdraw_scenario(customdraw_2); - run_customdraw_scenario(customdraw_3); - - ZeroMemory(&item, sizeof(item)); - item.mask = HDI_FORMAT; - item.fmt = HDF_OWNERDRAW; - SendMessage(hWndHeader, HDM_SETITEM, 1, (LPARAM)&item); - g_DrawItem.CtlID = 0; - g_DrawItem.CtlType = ODT_HEADER; - g_DrawItem.hwndItem = hWndHeader; - g_DrawItem.itemID = 1; - g_DrawItem.itemState = 0; - SendMessage(hWndHeader, HDM_GETITEMRECT, 1, (LPARAM)&g_DrawItem.rcItem); - run_customdraw_scenario(customdraw_4); - ok(g_DrawItemReceived, "WM_DRAWITEM not received\n"); - DestroyWindow(hWndHeader); - hWndHeader = NULL; - g_DrawItem.CtlType = 0; - g_DrawItemReceived = FALSE; -} - -static void check_order(const int expected_id[], const int expected_order[], - int count, const char *type) -{ - int i; - HDITEMA hdi; - - ok(getItemCount(hWndHeader) == count, "Invalid item count in order tests\n"); - for (i = 0; i < count; i++) - { - hdi.mask = HDI_LPARAM|HDI_ORDER; - SendMessage(hWndHeader, HDM_GETITEMA, i, (LPARAM)&hdi); - ok(hdi.lParam == expected_id[i], - "Invalid item ids after '%s'- item %d has lParam %d\n", type, i, (int)hdi.lParam); - ok(hdi.iOrder == expected_order[i], - "Invalid item order after '%s'- item %d has iOrder %d\n", type, i, hdi.iOrder); - } -} - -static void test_header_order (void) -{ - const int rand1[] = {0, 1, 1, 0, 4}; - const int rand2[] = {4, 5, 6, 7, 4}; - const int rand3[] = {5, 5, 1, 6, 1}; - const int rand4[] = {1, 5, 2, 7, 6, 1, 4, 2, 3, 2}; - const int rand5[] = {7, 8, 5, 6, 7, 2, 1, 9, 10, 10}; - const int rand6[] = {2, 8, 3, 4, 0}; - - const int ids1[] = {3, 0, 2, 1, 4}; - const int ord1[] = {0, 1, 2, 3, 4}; - const int ids2[] = {3, 9, 7, 0, 2, 1, 4, 8, 6, 5}; - const int ord2[] = {0, 4, 7, 1, 2, 3, 9, 8, 6, 5}; - const int ord3[] = {0, 3, 9, 2, 1, 8, 7, 6, 5, 4}; - const int ids4[] = {9, 0, 1, 8, 6}; - const int ord4[] = {1, 0, 4, 3, 2}; - - char buffer[20]; - HDITEMA hdi; - int i; - - hWndHeader = create_header_control(); - - ZeroMemory(&hdi, sizeof(HDITEMA)); - hdi.mask = HDI_TEXT | HDI_LPARAM; - hdi.pszText = buffer; - strcpy(buffer, "test"); - - for (i = 0; i < 5; i++) - { - hdi.lParam = i; - SendMessage(hWndHeader, HDM_INSERTITEMA, rand1[i], (LPARAM)&hdi); - rand(); - } - check_order(ids1, ord1, 5, "insert without iOrder"); - - hdi.mask |= HDI_ORDER; - for (i = 0; i < 5; i++) - { - hdi.lParam = i + 5; - hdi.iOrder = rand2[i]; - SendMessage(hWndHeader, HDM_INSERTITEMA, rand3[i], (LPARAM)&hdi); - rand(); rand(); - } - check_order(ids2, ord2, 10, "insert with order"); - - hdi.mask = HDI_ORDER; - for (i=0; i<10; i++) - { - hdi.iOrder = rand5[i]; - SendMessage(hWndHeader, HDM_SETITEMA, rand4[i], (LPARAM)&hdi); - rand(); rand(); - } - check_order(ids2, ord3, 10, "setitems changing order"); - - for (i=0; i<5; i++) - SendMessage(hWndHeader, HDM_DELETEITEM, rand6[i], 0); - check_order(ids4, ord4, 5, "deleteitem"); - - DestroyWindow(hWndHeader); -} - -static LRESULT CALLBACK HeaderTestWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - DRAWITEMSTRUCT *di; - switch(msg) { - - case WM_NOTIFY: - { - NMHEADERA *hdr = (NMHEADER *)lParam; - EXPECTEDNOTIFY *expected; - int i; - - if (hdr->hdr.code == NM_CUSTOMDRAW) - if (g_CustomDrawProc) - return g_CustomDrawProc(g_CustomDrawCount++, (NMCUSTOMDRAW*)hdr); - - for (i=0; ihdr.code != unexpectedNotify[i], "Received invalid notify %d\n", hdr->hdr.code); - - if (nReceivedNotify >= nExpectedNotify || hdr->hdr.hwndFrom != hWndHeader ) - break; - - expected = &expectedNotify[nReceivedNotify]; - if (hdr->hdr.code != expected->iCode) - break; - - nReceivedNotify++; - compare_items(hdr->hdr.code, &expected->hdItem, hdr->pitem, expected->fUnicode); - break; - } - - case WM_DRAWITEM: - di = (DRAWITEMSTRUCT *)lParam; - ok(g_DrawItem.CtlType != 0, "Unexpected WM_DRAWITEM\n"); - if (g_DrawItem.CtlType == 0) return 0; - g_DrawItemReceived = TRUE; - compare(di->CtlType, g_DrawItem.CtlType, "%d"); - compare(di->CtlID, g_DrawItem.CtlID, "%d"); - compare(di->hwndItem, g_DrawItem.hwndItem, "%p"); - compare(di->itemID, g_DrawItem.itemID, "%d"); - compare(di->itemState, g_DrawItem.itemState, "%d"); - compare(di->rcItem.left, g_DrawItem.rcItem.left, "%d"); - compare(di->rcItem.top, g_DrawItem.rcItem.top, "%d"); - compare(di->rcItem.right, g_DrawItem.rcItem.right, "%d"); - compare(di->rcItem.bottom, g_DrawItem.rcItem.bottom, "%d"); - break; - - case WM_DESTROY: - PostQuitMessage(0); - break; - - default: - return DefWindowProcA(hWnd, msg, wParam, lParam); - } - - return 0L; -} - -static int init(void) -{ - HMODULE hComctl32; - BOOL (WINAPI *pInitCommonControlsEx)(const INITCOMMONCONTROLSEX*); - WNDCLASSA wc; - INITCOMMONCONTROLSEX iccex; - TEXTMETRICA tm; - HFONT hOldFont; - HDC hdc; - - hComctl32 = GetModuleHandleA("comctl32.dll"); - pInitCommonControlsEx = (void*)GetProcAddress(hComctl32, "InitCommonControlsEx"); - if (!pInitCommonControlsEx) - { - skip("InitCommonControlsEx() is missing. Skipping the tests\n"); - return 0; - } - - iccex.dwSize = sizeof(iccex); - iccex.dwICC = ICC_USEREX_CLASSES; - pInitCommonControlsEx(&iccex); - - wc.style = CS_HREDRAW | CS_VREDRAW; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = GetModuleHandleA(NULL); - wc.hIcon = NULL; - wc.hCursor = LoadCursorA(NULL, IDC_ARROW); - wc.hbrBackground = GetSysColorBrush(COLOR_WINDOW); - wc.lpszMenuName = NULL; - wc.lpszClassName = "HeaderTestClass"; - wc.lpfnWndProc = HeaderTestWndProc; - RegisterClassA(&wc); - - /* The height of the header control depends on the height of the system font. - The height of the system font is dpi dependent */ - hdc = GetDC(0); - hOldFont = SelectObject(hdc, GetStockObject(SYSTEM_FONT)); - GetTextMetricsA(hdc, &tm); - /* 2 dot extra space are needed for the border */ - g_customheight = tm.tmHeight + 2; - trace("customdraw height: %d (dpi: %d)\n", g_customheight, GetDeviceCaps(hdc, LOGPIXELSY)); - SelectObject(hdc, hOldFont); - ReleaseDC(0, hdc); - - hHeaderParentWnd = CreateWindowExA(0, "HeaderTestClass", "Header test", WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, 672+2*GetSystemMetrics(SM_CXSIZEFRAME), - 226+GetSystemMetrics(SM_CYCAPTION)+2*GetSystemMetrics(SM_CYSIZEFRAME), - NULL, NULL, GetModuleHandleA(NULL), 0); - assert(hHeaderParentWnd != NULL); - ShowWindow(hHeaderParentWnd, SW_SHOW); - return 1; -} - -/* maximum 8 items allowed */ -static void check_orderarray(HWND hwnd, DWORD start, DWORD set, DWORD expected, - int todo, int line) -{ - int count, i; - INT order[8]; - DWORD ret, array = 0; - - count = SendMessage(hwnd, HDM_GETITEMCOUNT, 0, 0); - - /* initial order */ - for(i = 1; i<=count; i++) - order[i-1] = start>>(4*(count-i)) & 0xf; - - ret = SendMessage(hwnd, HDM_SETORDERARRAY, count, (LPARAM)order); - ok_(__FILE__, line)(ret, "Expected HDM_SETORDERARAY to succeed, got %d\n", ret); - - /* new order */ - for(i = 1; i<=count; i++) - order[i-1] = set>>(4*(count-i)) & 0xf; - ret = SendMessage(hwnd, HDM_SETORDERARRAY, count, (LPARAM)order); - ok_(__FILE__, line)(ret, "Expected HDM_SETORDERARAY to succeed, got %d\n", ret); - - /* check actual order */ - ret = SendMessage(hwnd, HDM_GETORDERARRAY, count, (LPARAM)order); - ok_(__FILE__, line)(ret, "Expected HDM_GETORDERARAY to succeed, got %d\n", ret); - for(i = 1; i<=count; i++) - array |= order[i-1]<<(4*(count-i)); - - if (todo) { - todo_wine - ok_(__FILE__, line)(array == expected, "Expected %x, got %x\n", expected, array); - } - else - ok_(__FILE__, line)(array == expected, "Expected %x, got %x\n", expected, array); -} - -static void test_hdm_orderarray(void) -{ - HWND hwnd; - INT order[5]; - DWORD ret; - - hwnd = create_header_control(); - - /* three items */ - addItem(hwnd, 0, NULL); - addItem(hwnd, 1, NULL); - addItem(hwnd, 2, NULL); - - ret = SendMessage(hwnd, HDM_GETORDERARRAY, 3, (LPARAM)order); - if (!ret) - { - win_skip("HDM_GETORDERARRAY not implemented.\n"); - DestroyWindow(hwnd); - return; - } - - expect(0, order[0]); - expect(1, order[1]); - expect(2, order[2]); - -if (0) -{ - /* null pointer, crashes native */ - ret = SendMessage(hwnd, HDM_SETORDERARRAY, 3, 0); - expect(FALSE, ret); -} - /* count out of limits */ - ret = SendMessage(hwnd, HDM_SETORDERARRAY, 5, (LPARAM)order); - expect(FALSE, ret); - /* count out of limits */ - ret = SendMessage(hwnd, HDM_SETORDERARRAY, 2, (LPARAM)order); - expect(FALSE, ret); - - /* try with out of range item index */ - /* (0,1,2)->(1,0,3) => (1,0,2) */ - check_orderarray(hwnd, 0x120, 0x103, 0x102, FALSE, __LINE__); - /* (1,0,2)->(3,0,1) => (0,2,1) */ - check_orderarray(hwnd, 0x102, 0x301, 0x021, TRUE, __LINE__); - /* (0,2,1)->(2,3,1) => (2,0,1) */ - check_orderarray(hwnd, 0x021, 0x231, 0x201, FALSE, __LINE__); - - /* (0,1,2)->(0,2,2) => (0,1,2) */ - check_orderarray(hwnd, 0x012, 0x022, 0x012, FALSE, __LINE__); - - addItem(hwnd, 3, NULL); - - /* (0,1,2,3)->(0,1,2,2) => (0,1,3,2) */ - check_orderarray(hwnd, 0x0123, 0x0122, 0x0132, FALSE, __LINE__); - /* (0,1,2,3)->(0,1,3,3) => (0,1,2,3) */ - check_orderarray(hwnd, 0x0123, 0x0133, 0x0123, FALSE, __LINE__); - /* (0,1,2,3)->(0,4,2,3) => (0,1,2,3) */ - check_orderarray(hwnd, 0x0123, 0x0423, 0x0123, FALSE, __LINE__); - /* (0,1,2,3)->(4,0,1,2) => (0,1,3,2) */ - check_orderarray(hwnd, 0x0123, 0x4012, 0x0132, TRUE, __LINE__); - /* (0,1,3,2)->(4,0,1,4) => (0,3,1,2) */ - check_orderarray(hwnd, 0x0132, 0x4014, 0x0312, TRUE, __LINE__); - /* (0,1,2,3)->(4,1,0,2) => (1,0,3,2) */ - check_orderarray(hwnd, 0x0123, 0x4102, 0x1032, TRUE, __LINE__); - /* (0,1,2,3)->(0,1,4,2) => (0,1,2,3) */ - check_orderarray(hwnd, 0x0123, 0x0142, 0x0132, FALSE, __LINE__); - /* (0,1,2,3)->(4,4,4,4) => (0,1,2,3) */ - check_orderarray(hwnd, 0x0123, 0x4444, 0x0123, FALSE, __LINE__); - /* (0,1,2,3)->(4,4,1,2) => (0,1,3,2) */ - check_orderarray(hwnd, 0x0123, 0x4412, 0x0132, TRUE, __LINE__); - /* (0,1,2,3)->(4,4,4,1) => (0,2,3,1) */ - check_orderarray(hwnd, 0x0123, 0x4441, 0x0231, TRUE, __LINE__); - /* (0,1,2,3)->(1,4,4,4) => (1,0,2,3) */ - check_orderarray(hwnd, 0x0123, 0x1444, 0x1023, FALSE, __LINE__); - /* (0,1,2,3)->(4,2,4,1) => (0,2,3,1) */ - check_orderarray(hwnd, 0x0123, 0x4241, 0x0231, FALSE, __LINE__); - /* (0,1,2,3)->(4,2,0,1) => (2,0,3,1) */ - check_orderarray(hwnd, 0x0123, 0x4201, 0x2031, TRUE, __LINE__); - /* (3,2,1,0)->(4,2,0,1) => (3,2,0,1) */ - check_orderarray(hwnd, 0x3210, 0x4201, 0x3201, FALSE, __LINE__); - - DestroyWindow(hwnd); -} - -START_TEST(header) -{ - HWND parent_hwnd; - ULONG_PTR ctx_cookie; - HANDLE hCtx; - HWND hwnd; - - if (!init()) - return; - - test_header_control(); - test_header_order(); - test_hdm_orderarray(); - test_customdraw(); - - DestroyWindow(hHeaderParentWnd); - - init_msg_sequences(sequences, NUM_MSG_SEQUENCES); - parent_hwnd = create_custom_parent_window(); - ok_sequence(sequences, PARENT_SEQ_INDEX, create_parent_wnd_seq, "create parent windows", FALSE); - - test_hdm_index_messages(parent_hwnd); - test_hdm_getitemrect(parent_hwnd); - test_hdm_hittest(parent_hwnd); - test_hdm_layout(parent_hwnd); - test_hdm_ordertoindex(parent_hwnd); - test_hdm_sethotdivider(parent_hwnd); - test_hdm_imageMessages(parent_hwnd); - test_hdm_filterMessages(parent_hwnd); - test_hdm_unicodeformatMessages(parent_hwnd); - test_hdm_bitmapmarginMessages(parent_hwnd); - - if (!load_v6_module(&ctx_cookie, &hCtx)) - { - DestroyWindow(parent_hwnd); - return; - } - - /* this is a XP SP3 failure workaround */ - hwnd = CreateWindowExA(0, WC_HEADER, NULL, - WS_CHILD|WS_BORDER|WS_VISIBLE|HDS_BUTTONS|HDS_HORZ, - 0, 0, 100, 100, - parent_hwnd, NULL, GetModuleHandleA(NULL), NULL); - - if (!IsWindow(hwnd)) - { - win_skip("FIXME: failed to create Header window.\n"); - unload_v6_module(ctx_cookie, hCtx); - DestroyWindow(parent_hwnd); - return; - } - else - DestroyWindow(hwnd); - - /* comctl32 version 6 tests start here */ - test_hdf_fixedwidth(parent_hwnd); - test_hds_nosizing(parent_hwnd); - - unload_v6_module(ctx_cookie, hCtx); - - DestroyWindow(parent_hwnd); -} diff --git a/rostests/winetests/comctl32/imagelist.c b/rostests/winetests/comctl32/imagelist.c deleted file mode 100644 index 5398201d708..00000000000 --- a/rostests/winetests/comctl32/imagelist.c +++ /dev/null @@ -1,1785 +0,0 @@ -/* - * Unit test suite for imagelist control. - * - * Copyright 2004 Michael Stefaniuc - * Copyright 2002 Mike McCormack for CodeWeavers - * Copyright 2007 Dmitry Timoshkov - * Copyright 2009 Owen Rudge 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 - */ - -#define COBJMACROS -#define CONST_VTABLE - -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "objbase.h" -#include "commctrl.h" /* must be included after objbase.h to get ImageList_Write */ -#include "initguid.h" -#include "commoncontrols.h" -#include "shellapi.h" - -#include "wine/test.h" -#include "v6util.h" - -#undef VISIBLE - -#ifdef VISIBLE -#define WAIT Sleep (1000) -#define REDRAW(hwnd) RedrawWindow (hwnd, NULL, 0, RDW_UPDATENOW) -#else -#define WAIT -#define REDRAW(hwnd) -#endif - -#define IMAGELIST_MAGIC (('L' << 8) | 'I') - -#include "pshpack2.h" -/* Header used by ImageList_Read() and ImageList_Write() */ -typedef struct _ILHEAD -{ - USHORT usMagic; - USHORT usVersion; - WORD cCurImage; - WORD cMaxImage; - WORD cGrow; - WORD cx; - WORD cy; - COLORREF bkcolor; - WORD flags; - SHORT ovls[4]; -} ILHEAD; -#include "poppack.h" - -static HIMAGELIST (WINAPI *pImageList_Create)(int, int, UINT, int, int); -static int (WINAPI *pImageList_Add)(HIMAGELIST, HBITMAP, HBITMAP); -static BOOL (WINAPI *pImageList_DrawIndirect)(IMAGELISTDRAWPARAMS*); -static BOOL (WINAPI *pImageList_SetImageCount)(HIMAGELIST,UINT); -static HRESULT (WINAPI *pImageList_CoCreateInstance)(REFCLSID,const IUnknown *, - REFIID,void **); -static HRESULT (WINAPI *pHIMAGELIST_QueryInterface)(HIMAGELIST,REFIID,void **); - -static HINSTANCE hinst; - -/* These macros build cursor/bitmap data in 4x4 pixel blocks */ -#define B(x,y) ((x?0xf0:0)|(y?0xf:0)) -#define ROW1(a,b,c,d,e,f,g,h) B(a,b),B(c,d),B(e,f),B(g,h) -#define ROW32(a,b,c,d,e,f,g,h) ROW1(a,b,c,d,e,f,g,h), ROW1(a,b,c,d,e,f,g,h), \ - ROW1(a,b,c,d,e,f,g,h), ROW1(a,b,c,d,e,f,g,h) -#define ROW2(a,b,c,d,e,f,g,h,i,j,k,l) ROW1(a,b,c,d,e,f,g,h),B(i,j),B(k,l) -#define ROW48(a,b,c,d,e,f,g,h,i,j,k,l) ROW2(a,b,c,d,e,f,g,h,i,j,k,l), \ - ROW2(a,b,c,d,e,f,g,h,i,j,k,l), ROW2(a,b,c,d,e,f,g,h,i,j,k,l), \ - ROW2(a,b,c,d,e,f,g,h,i,j,k,l) - -static const BYTE empty_bits[48*48/8]; - -static const BYTE icon_bits[32*32/8] = -{ - ROW32(0,0,0,0,0,0,0,0), - ROW32(0,0,1,1,1,1,0,0), - ROW32(0,1,1,1,1,1,1,0), - ROW32(0,1,1,0,0,1,1,0), - ROW32(0,1,1,0,0,1,1,0), - ROW32(0,1,1,1,1,1,1,0), - ROW32(0,0,1,1,1,1,0,0), - ROW32(0,0,0,0,0,0,0,0) -}; - -static const BYTE bitmap_bits[48*48/8] = -{ - ROW48(0,0,0,0,0,0,0,0,0,0,0,0), - ROW48(0,1,1,1,1,1,1,1,1,1,1,0), - ROW48(0,1,1,0,0,0,0,0,0,1,1,0), - ROW48(0,1,0,0,0,0,0,0,1,0,1,0), - ROW48(0,1,0,0,0,0,0,1,0,0,1,0), - ROW48(0,1,0,0,0,0,1,0,0,0,1,0), - ROW48(0,1,0,0,0,1,0,0,0,0,1,0), - ROW48(0,1,0,0,1,0,0,0,0,0,1,0), - ROW48(0,1,0,1,0,0,0,0,0,0,1,0), - ROW48(0,1,1,0,0,0,0,0,0,1,1,0), - ROW48(0,1,1,1,1,1,1,1,1,1,1,0), - ROW48(0,0,0,0,0,0,0,0,0,0,0,0) -}; - -static HIMAGELIST createImageList(int cx, int cy) -{ - /* Create an ImageList and put an image into it */ - HIMAGELIST himl = ImageList_Create(cx, cy, ILC_COLOR, 1, 1); - HBITMAP hbm = CreateBitmap(48, 48, 1, 1, bitmap_bits); - ImageList_Add(himl, hbm, NULL); - DeleteObject(hbm); - return himl; -} - -static HWND create_a_window(void) -{ - char className[] = "bmwnd"; - char winName[] = "Test Bitmap"; - HWND hWnd; - static int registered = 0; - - if (!registered) - { - WNDCLASSA cls; - - cls.style = CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS; - cls.lpfnWndProc = DefWindowProcA; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = 0; - cls.hIcon = LoadIconA (0, IDI_APPLICATION); - cls.hCursor = LoadCursorA (0, IDC_ARROW); - cls.hbrBackground = GetStockObject (WHITE_BRUSH); - cls.lpszMenuName = 0; - cls.lpszClassName = className; - - RegisterClassA (&cls); - registered = 1; - } - - /* Setup window */ - hWnd = CreateWindowA (className, winName, - WS_OVERLAPPEDWINDOW , - CW_USEDEFAULT, CW_USEDEFAULT, 300, 300, 0, - 0, hinst, 0); - -#ifdef VISIBLE - ShowWindow (hWnd, SW_SHOW); -#endif - REDRAW(hWnd); - WAIT; - - return hWnd; -} - -static HDC show_image(HWND hwnd, HIMAGELIST himl, int idx, int size, - LPCSTR loc, BOOL clear) -{ - HDC hdc = NULL; -#ifdef VISIBLE - if (!himl) return NULL; - - SetWindowText(hwnd, loc); - hdc = GetDC(hwnd); - ImageList_Draw(himl, idx, hdc, 0, 0, ILD_TRANSPARENT); - - REDRAW(hwnd); - WAIT; - - if (clear) - { - BitBlt(hdc, 0, 0, size, size, hdc, size+1, size+1, SRCCOPY); - ReleaseDC(hwnd, hdc); - hdc = NULL; - } -#endif /* VISIBLE */ - return hdc; -} - -/* Useful for checking differences */ -#if 0 -static void dump_bits(const BYTE *p, const BYTE *q, int size) -{ - int i, j; - - size /= 8; - - for (i = 0; i < size * 2; i++) - { - printf("|"); - for (j = 0; j < size; j++) - printf("%c%c", p[j] & 0xf0 ? 'X' : ' ', p[j] & 0xf ? 'X' : ' '); - printf(" -- "); - for (j = 0; j < size; j++) - printf("%c%c", q[j] & 0xf0 ? 'X' : ' ', q[j] & 0xf ? 'X' : ' '); - printf("|\n"); - p += size * 4; - q += size * 4; - } - printf("\n"); -} -#endif - -static void check_bits(HWND hwnd, HIMAGELIST himl, int idx, int size, - const BYTE *checkbits, LPCSTR loc) -{ -#ifdef VISIBLE - BYTE bits[100*100/8]; - COLORREF c; - HDC hdc; - int x, y, i = -1; - - if (!himl) return; - - memset(bits, 0, sizeof(bits)); - hdc = show_image(hwnd, himl, idx, size, loc, FALSE); - - c = GetPixel(hdc, 0, 0); - - for (y = 0; y < size; y ++) - { - for (x = 0; x < size; x++) - { - if (!(x & 0x7)) i++; - if (GetPixel(hdc, x, y) != c) bits[i] |= (0x80 >> (x & 0x7)); - } - } - - BitBlt(hdc, 0, 0, size, size, hdc, size+1, size+1, SRCCOPY); - ReleaseDC(hwnd, hdc); - - ok (memcmp(bits, checkbits, (size * size)/8) == 0, - "%s: bits different\n", loc); - if (memcmp(bits, checkbits, (size * size)/8)) - dump_bits(bits, checkbits, size); -#endif /* VISIBLE */ -} - -static void testHotspot (void) -{ - struct hotspot { - int dx; - int dy; - }; - -#define SIZEX1 47 -#define SIZEY1 31 -#define SIZEX2 11 -#define SIZEY2 17 -#define HOTSPOTS_MAX 4 /* Number of entries in hotspots */ - static const struct hotspot hotspots[HOTSPOTS_MAX] = { - { 10, 7 }, - { SIZEX1, SIZEY1 }, - { -9, -8 }, - { -7, 35 } - }; - int i, j, ret; - HIMAGELIST himl1 = createImageList(SIZEX1, SIZEY1); - HIMAGELIST himl2 = createImageList(SIZEX2, SIZEY2); - HWND hwnd = create_a_window(); - - - for (i = 0; i < HOTSPOTS_MAX; i++) { - for (j = 0; j < HOTSPOTS_MAX; j++) { - int dx1 = hotspots[i].dx; - int dy1 = hotspots[i].dy; - int dx2 = hotspots[j].dx; - int dy2 = hotspots[j].dy; - int correctx, correcty, newx, newy; - char loc[256]; - HIMAGELIST himlNew; - POINT ppt; - - ret = ImageList_BeginDrag(himl1, 0, dx1, dy1); - ok(ret != 0, "BeginDrag failed for { %d, %d }\n", dx1, dy1); - sprintf(loc, "BeginDrag (%d,%d)\n", i, j); - show_image(hwnd, himl1, 0, max(SIZEX1, SIZEY1), loc, TRUE); - - /* check merging the dragged image with a second image */ - ret = ImageList_SetDragCursorImage(himl2, 0, dx2, dy2); - ok(ret != 0, "SetDragCursorImage failed for {%d, %d}{%d, %d}\n", - dx1, dy1, dx2, dy2); - sprintf(loc, "SetDragCursorImage (%d,%d)\n", i, j); - show_image(hwnd, himl2, 0, max(SIZEX2, SIZEY2), loc, TRUE); - - /* check new hotspot, it should be the same like the old one */ - himlNew = ImageList_GetDragImage(NULL, &ppt); - ok(ppt.x == dx1 && ppt.y == dy1, - "Expected drag hotspot [%d,%d] got [%d,%d]\n", - dx1, dy1, ppt.x, ppt.y); - /* check size of new dragged image */ - ImageList_GetIconSize(himlNew, &newx, &newy); - correctx = max(SIZEX1, max(SIZEX2 + dx2, SIZEX1 - dx2)); - correcty = max(SIZEY1, max(SIZEY2 + dy2, SIZEY1 - dy2)); - ok(newx == correctx && newy == correcty, - "Expected drag image size [%d,%d] got [%d,%d]\n", - correctx, correcty, newx, newy); - sprintf(loc, "GetDragImage (%d,%d)\n", i, j); - show_image(hwnd, himlNew, 0, max(correctx, correcty), loc, TRUE); - ImageList_EndDrag(); - } - } -#undef SIZEX1 -#undef SIZEY1 -#undef SIZEX2 -#undef SIZEY2 -#undef HOTSPOTS_MAX - ImageList_Destroy(himl2); - ImageList_Destroy(himl1); - DestroyWindow(hwnd); -} - -static BOOL DoTest1(void) -{ - HIMAGELIST himl ; - - HICON hicon1 ; - HICON hicon2 ; - HICON hicon3 ; - - /* create an imagelist to play with */ - himl = ImageList_Create(84, 84, ILC_COLOR16, 0, 3); - ok(himl!=0,"failed to create imagelist\n"); - - /* load the icons to add to the image list */ - hicon1 = CreateIcon(hinst, 32, 32, 1, 1, icon_bits, icon_bits); - ok(hicon1 != 0, "no hicon1\n"); - hicon2 = CreateIcon(hinst, 32, 32, 1, 1, icon_bits, icon_bits); - ok(hicon2 != 0, "no hicon2\n"); - hicon3 = CreateIcon(hinst, 32, 32, 1, 1, icon_bits, icon_bits); - ok(hicon3 != 0, "no hicon3\n"); - - /* remove when nothing exists */ - ok(!ImageList_Remove(himl,0),"removed nonexistent icon\n"); - /* removing everything from an empty imagelist should succeed */ - ok(ImageList_RemoveAll(himl),"removed nonexistent icon\n"); - - /* add three */ - ok(0==ImageList_AddIcon(himl, hicon1),"failed to add icon1\n"); - ok(1==ImageList_AddIcon(himl, hicon2),"failed to add icon2\n"); - ok(2==ImageList_AddIcon(himl, hicon3),"failed to add icon3\n"); - - /* remove an index out of range */ - ok(!ImageList_Remove(himl,4711),"removed nonexistent icon\n"); - - /* remove three */ - ok(ImageList_Remove(himl,0),"can't remove 0\n"); - ok(ImageList_Remove(himl,0),"can't remove 0\n"); - ok(ImageList_Remove(himl,0),"can't remove 0\n"); - - /* remove one extra */ - ok(!ImageList_Remove(himl,0),"removed nonexistent icon\n"); - - /* check SetImageCount/GetImageCount */ - if (pImageList_SetImageCount) - { - ok(pImageList_SetImageCount(himl, 3), "couldn't increase image count\n"); - ok(ImageList_GetImageCount(himl) == 3, "invalid image count after increase\n"); - ok(pImageList_SetImageCount(himl, 1), "couldn't decrease image count\n"); - ok(ImageList_GetImageCount(himl) == 1, "invalid image count after decrease to 1\n"); - ok(pImageList_SetImageCount(himl, 0), "couldn't decrease image count\n"); - ok(ImageList_GetImageCount(himl) == 0, "invalid image count after decrease to 0\n"); - } - else - { - skip("skipped ImageList_SetImageCount tests\n"); - } - - /* destroy it */ - ok(ImageList_Destroy(himl),"destroy imagelist failed\n"); - - ok(DestroyIcon(hicon1),"icon 1 wasn't deleted\n"); - ok(DestroyIcon(hicon2),"icon 2 wasn't deleted\n"); - ok(DestroyIcon(hicon3),"icon 3 wasn't deleted\n"); - - return TRUE; -} - -static BOOL DoTest2(void) -{ - HIMAGELIST himl ; - - HICON hicon1 ; - HICON hicon2 ; - HICON hicon3 ; - - /* create an imagelist to play with */ - himl = ImageList_Create(84, 84, ILC_COLOR16, 0, 3); - ok(himl!=0,"failed to create imagelist\n"); - - /* load the icons to add to the image list */ - hicon1 = CreateIcon(hinst, 32, 32, 1, 1, icon_bits, icon_bits); - ok(hicon1 != 0, "no hicon1\n"); - hicon2 = CreateIcon(hinst, 32, 32, 1, 1, icon_bits, icon_bits); - ok(hicon2 != 0, "no hicon2\n"); - hicon3 = CreateIcon(hinst, 32, 32, 1, 1, icon_bits, icon_bits); - ok(hicon3 != 0, "no hicon3\n"); - - /* add three */ - ok(0==ImageList_AddIcon(himl, hicon1),"failed to add icon1\n"); - ok(1==ImageList_AddIcon(himl, hicon2),"failed to add icon2\n"); - ok(2==ImageList_AddIcon(himl, hicon3),"failed to add icon3\n"); - - /* destroy it */ - ok(ImageList_Destroy(himl),"destroy imagelist failed\n"); - - ok(DestroyIcon(hicon1),"icon 1 wasn't deleted\n"); - ok(DestroyIcon(hicon2),"icon 2 wasn't deleted\n"); - ok(DestroyIcon(hicon3),"icon 3 wasn't deleted\n"); - - return TRUE; -} - -static BOOL DoTest3(void) -{ - HIMAGELIST himl; - - HBITMAP hbm1; - HBITMAP hbm2; - HBITMAP hbm3; - - IMAGELISTDRAWPARAMS imldp; - HDC hdc; - HWND hwndfortest; - - if (!pImageList_DrawIndirect) - { - win_skip("ImageList_DrawIndirect not available, skipping test\n"); - return TRUE; - } - - hwndfortest = create_a_window(); - hdc = GetDC(hwndfortest); - ok(hdc!=NULL, "couldn't get DC\n"); - - /* create an imagelist to play with */ - himl = ImageList_Create(48, 48, ILC_COLOR16, 0, 3); - ok(himl!=0,"failed to create imagelist\n"); - - /* load the icons to add to the image list */ - hbm1 = CreateBitmap(48, 48, 1, 1, bitmap_bits); - ok(hbm1 != 0, "no bitmap 1\n"); - hbm2 = CreateBitmap(48, 48, 1, 1, bitmap_bits); - ok(hbm2 != 0, "no bitmap 2\n"); - hbm3 = CreateBitmap(48, 48, 1, 1, bitmap_bits); - ok(hbm3 != 0, "no bitmap 3\n"); - - /* add three */ - ok(0==ImageList_Add(himl, hbm1, 0),"failed to add bitmap 1\n"); - ok(1==ImageList_Add(himl, hbm2, 0),"failed to add bitmap 2\n"); - - if (pImageList_SetImageCount) - { - ok(pImageList_SetImageCount(himl,3),"Setimage count failed\n"); - /*ok(2==ImageList_Add(himl, hbm3, NULL),"failed to add bitmap 3\n"); */ - ok(ImageList_Replace(himl, 2, hbm3, 0),"failed to replace bitmap 3\n"); - } - - memset(&imldp, 0, sizeof (imldp)); - ok(!pImageList_DrawIndirect(&imldp), "zero data succeeded!\n"); - imldp.cbSize = sizeof (imldp); - ok(!pImageList_DrawIndirect(&imldp), "zero hdc succeeded!\n"); - imldp.hdcDst = hdc; - ok(!pImageList_DrawIndirect(&imldp),"zero himl succeeded!\n"); - imldp.himl = himl; - if (!pImageList_DrawIndirect(&imldp)) - { - /* Earlier versions of native comctl32 use a smaller structure */ - imldp.cbSize -= 3 * sizeof(DWORD); - ok(pImageList_DrawIndirect(&imldp),"DrawIndirect should succeed\n"); - } - REDRAW(hwndfortest); - WAIT; - - imldp.fStyle = SRCCOPY; - imldp.rgbBk = CLR_DEFAULT; - imldp.rgbFg = CLR_DEFAULT; - imldp.y = 100; - imldp.x = 100; - ok(pImageList_DrawIndirect(&imldp),"should succeed\n"); - imldp.i ++; - ok(pImageList_DrawIndirect(&imldp),"should succeed\n"); - imldp.i ++; - ok(pImageList_DrawIndirect(&imldp),"should succeed\n"); - imldp.i ++; - ok(!pImageList_DrawIndirect(&imldp),"should fail\n"); - - /* remove three */ - ok(ImageList_Remove(himl, 0), "removing 1st bitmap\n"); - ok(ImageList_Remove(himl, 0), "removing 2nd bitmap\n"); - ok(ImageList_Remove(himl, 0), "removing 3rd bitmap\n"); - - /* destroy it */ - ok(ImageList_Destroy(himl),"destroy imagelist failed\n"); - - /* bitmaps should not be deleted by the imagelist */ - ok(DeleteObject(hbm1),"bitmap 1 can't be deleted\n"); - ok(DeleteObject(hbm2),"bitmap 2 can't be deleted\n"); - ok(DeleteObject(hbm3),"bitmap 3 can't be deleted\n"); - - ReleaseDC(hwndfortest, hdc); - DestroyWindow(hwndfortest); - - return TRUE; -} - -static void testMerge(void) -{ - HIMAGELIST himl1, himl2, hmerge; - HICON hicon1; - HWND hwnd = create_a_window(); - - himl1 = ImageList_Create(32,32,0,0,3); - ok(himl1 != NULL,"failed to create himl1\n"); - - himl2 = ImageList_Create(32,32,0,0,3); - ok(himl2 != NULL,"failed to create himl2\n"); - - hicon1 = CreateIcon(hinst, 32, 32, 1, 1, icon_bits, icon_bits); - ok(hicon1 != NULL, "failed to create hicon1\n"); - - if (!himl1 || !himl2 || !hicon1) - return; - - ok(0==ImageList_AddIcon(himl2, hicon1),"add icon1 to himl2 failed\n"); - check_bits(hwnd, himl2, 0, 32, icon_bits, "add icon1 to himl2"); - - /* If himl1 has no images, merge still succeeds */ - hmerge = ImageList_Merge(himl1, -1, himl2, 0, 0, 0); - ok(hmerge != NULL, "merge himl1,-1 failed\n"); - check_bits(hwnd, hmerge, 0, 32, empty_bits, "merge himl1,-1"); - if (hmerge) ImageList_Destroy(hmerge); - - hmerge = ImageList_Merge(himl1, 0, himl2, 0, 0, 0); - ok(hmerge != NULL,"merge himl1,0 failed\n"); - check_bits(hwnd, hmerge, 0, 32, empty_bits, "merge himl1,0"); - if (hmerge) ImageList_Destroy(hmerge); - - /* Same happens if himl2 is empty */ - ImageList_Destroy(himl2); - himl2 = ImageList_Create(32,32,0,0,3); - ok(himl2 != NULL,"failed to recreate himl2\n"); - if (!himl2) - return; - - hmerge = ImageList_Merge(himl1, -1, himl2, -1, 0, 0); - ok(hmerge != NULL, "merge himl2,-1 failed\n"); - check_bits(hwnd, hmerge, 0, 32, empty_bits, "merge himl2,-1"); - if (hmerge) ImageList_Destroy(hmerge); - - hmerge = ImageList_Merge(himl1, -1, himl2, 0, 0, 0); - ok(hmerge != NULL, "merge himl2,0 failed\n"); - check_bits(hwnd, hmerge, 0, 32, empty_bits, "merge himl2,0"); - if (hmerge) ImageList_Destroy(hmerge); - - /* Now try merging an image with itself */ - ok(0==ImageList_AddIcon(himl2, hicon1),"re-add icon1 to himl2 failed\n"); - - hmerge = ImageList_Merge(himl2, 0, himl2, 0, 0, 0); - ok(hmerge != NULL, "merge himl2 with itself failed\n"); - check_bits(hwnd, hmerge, 0, 32, empty_bits, "merge himl2 with itself"); - if (hmerge) ImageList_Destroy(hmerge); - - /* Try merging 2 different image lists */ - ok(0==ImageList_AddIcon(himl1, hicon1),"add icon1 to himl1 failed\n"); - - hmerge = ImageList_Merge(himl1, 0, himl2, 0, 0, 0); - ok(hmerge != NULL, "merge himl1 with himl2 failed\n"); - check_bits(hwnd, hmerge, 0, 32, empty_bits, "merge himl1 with himl2"); - if (hmerge) ImageList_Destroy(hmerge); - - hmerge = ImageList_Merge(himl1, 0, himl2, 0, 8, 16); - ok(hmerge != NULL, "merge himl1 with himl2 8,16 failed\n"); - check_bits(hwnd, hmerge, 0, 32, empty_bits, "merge himl1 with himl2, 8,16"); - if (hmerge) ImageList_Destroy(hmerge); - - ImageList_Destroy(himl1); - ImageList_Destroy(himl2); - DestroyIcon(hicon1); - DestroyWindow(hwnd); -} - -/*********************** imagelist storage test ***************************/ - -#define BMP_CX 48 - -struct my_IStream -{ - IStream is; - char *iml_data; /* written imagelist data */ - ULONG iml_data_size; -}; - -static HRESULT STDMETHODCALLTYPE Test_Stream_QueryInterface( - IStream* This, - REFIID riid, - void** ppvObject) -{ - assert(0); - return E_NOTIMPL; -} - -static ULONG STDMETHODCALLTYPE Test_Stream_AddRef( - IStream* This) -{ - assert(0); - return 2; -} - -static ULONG STDMETHODCALLTYPE Test_Stream_Release( - IStream* This) -{ - assert(0); - return 1; -} - -static HRESULT STDMETHODCALLTYPE Test_Stream_Read( - IStream* This, - void* pv, - ULONG cb, - ULONG* pcbRead) -{ - assert(0); - return E_NOTIMPL; -} - -static BOOL allocate_storage(struct my_IStream *my_is, ULONG add) -{ - my_is->iml_data_size += add; - - if (!my_is->iml_data) - my_is->iml_data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, my_is->iml_data_size); - else - my_is->iml_data = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, my_is->iml_data, my_is->iml_data_size); - - return my_is->iml_data ? TRUE : FALSE; -} - -static HRESULT STDMETHODCALLTYPE Test_Stream_Write( - IStream* This, - const void* pv, - ULONG cb, - ULONG* pcbWritten) -{ - struct my_IStream *my_is = (struct my_IStream *)This; - ULONG current_iml_data_size = my_is->iml_data_size; - - if (!allocate_storage(my_is, cb)) return E_FAIL; - - memcpy(my_is->iml_data + current_iml_data_size, pv, cb); - if (pcbWritten) *pcbWritten = cb; - - return S_OK; -} - -static HRESULT STDMETHODCALLTYPE Test_Stream_Seek( - IStream* This, - LARGE_INTEGER dlibMove, - DWORD dwOrigin, - ULARGE_INTEGER* plibNewPosition) -{ - assert(0); - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE Test_Stream_SetSize( - IStream* This, - ULARGE_INTEGER libNewSize) -{ - assert(0); - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE Test_Stream_CopyTo( - IStream* This, - IStream* pstm, - ULARGE_INTEGER cb, - ULARGE_INTEGER* pcbRead, - ULARGE_INTEGER* pcbWritten) -{ - assert(0); - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE Test_Stream_Commit( - IStream* This, - DWORD grfCommitFlags) -{ - assert(0); - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE Test_Stream_Revert( - IStream* This) -{ - assert(0); - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE Test_Stream_LockRegion( - IStream* This, - ULARGE_INTEGER libOffset, - ULARGE_INTEGER cb, - DWORD dwLockType) -{ - assert(0); - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE Test_Stream_UnlockRegion( - IStream* This, - ULARGE_INTEGER libOffset, - ULARGE_INTEGER cb, - DWORD dwLockType) -{ - assert(0); - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE Test_Stream_Stat( - IStream* This, - STATSTG* pstatstg, - DWORD grfStatFlag) -{ - assert(0); - return E_NOTIMPL; -} - -static HRESULT STDMETHODCALLTYPE Test_Stream_Clone( - IStream* This, - IStream** ppstm) -{ - assert(0); - return E_NOTIMPL; -} - -static const IStreamVtbl Test_Stream_Vtbl = -{ - Test_Stream_QueryInterface, - Test_Stream_AddRef, - Test_Stream_Release, - Test_Stream_Read, - Test_Stream_Write, - Test_Stream_Seek, - Test_Stream_SetSize, - Test_Stream_CopyTo, - Test_Stream_Commit, - Test_Stream_Revert, - Test_Stream_LockRegion, - Test_Stream_UnlockRegion, - Test_Stream_Stat, - Test_Stream_Clone -}; - -static struct my_IStream Test_Stream = { { &Test_Stream_Vtbl }, 0, 0 }; - -static INT DIB_GetWidthBytes( int width, int bpp ) -{ - int words; - - switch (bpp) - { - case 1: words = (width + 31) / 32; break; - case 4: words = (width + 7) / 8; break; - case 8: words = (width + 3) / 4; break; - case 15: - case 16: words = (width + 1) / 2; break; - case 24: words = (width * 3 + 3)/4; break; - case 32: words = width; break; - - default: - words=0; - trace("Unknown depth %d, please report.\n", bpp ); - assert(0); - break; - } - return 4 * words; -} - -static void check_bitmap_data(const char *bm_data, ULONG bm_data_size, - INT width, INT height, INT bpp, - const char *comment) -{ - const BITMAPFILEHEADER *bmfh = (const BITMAPFILEHEADER *)bm_data; - const BITMAPINFOHEADER *bmih = (const BITMAPINFOHEADER *)(bm_data + sizeof(*bmfh)); - ULONG hdr_size, image_size; - - hdr_size = sizeof(*bmfh) + sizeof(*bmih); - if (bmih->biBitCount <= 8) hdr_size += (1 << bpp) * sizeof(RGBQUAD); - - ok(bmfh->bfType == (('M' << 8) | 'B'), "wrong bfType 0x%02x\n", bmfh->bfType); - ok(bmfh->bfSize == hdr_size, "wrong bfSize 0x%02x\n", bmfh->bfSize); - ok(bmfh->bfReserved1 == 0, "wrong bfReserved1 0x%02x\n", bmfh->bfReserved1); - ok(bmfh->bfReserved2 == 0, "wrong bfReserved2 0x%02x\n", bmfh->bfReserved2); - ok(bmfh->bfOffBits == hdr_size, "wrong bfOffBits 0x%02x\n", bmfh->bfOffBits); - - ok(bmih->biSize == sizeof(*bmih), "wrong biSize %d\n", bmih->biSize); - ok(bmih->biWidth == width, "wrong biWidth %d (expected %d)\n", bmih->biWidth, width); - ok(bmih->biHeight == height, "wrong biHeight %d (expected %d)\n", bmih->biHeight, height); - ok(bmih->biPlanes == 1, "wrong biPlanes %d\n", bmih->biPlanes); - ok(bmih->biBitCount == bpp, "wrong biBitCount %d\n", bmih->biBitCount); - - image_size = DIB_GetWidthBytes(bmih->biWidth, bmih->biBitCount) * bmih->biHeight; - ok(bmih->biSizeImage == image_size, "wrong biSizeImage %u\n", bmih->biSizeImage); -#if 0 -{ - char fname[256]; - FILE *f; - sprintf(fname, "bmp_%s.bmp", comment); - f = fopen(fname, "wb"); - fwrite(bm_data, 1, bm_data_size, f); - fclose(f); -} -#endif -} - -static void check_ilhead_data(const char *ilh_data, INT cx, INT cy, INT cur, INT max, INT grow) -{ - const ILHEAD *ilh = (const ILHEAD *)ilh_data; - - ok(ilh->usMagic == IMAGELIST_MAGIC, "wrong usMagic %4x (expected %02x)\n", ilh->usMagic, IMAGELIST_MAGIC); - ok(ilh->usVersion == 0x101, "wrong usVersion %x (expected 0x101)\n", ilh->usVersion); - ok(ilh->cCurImage == cur, "wrong cCurImage %d (expected %d)\n", ilh->cCurImage, cur); - ok(ilh->cMaxImage == max, "wrong cMaxImage %d (expected %d)\n", ilh->cMaxImage, max); - ok(ilh->cGrow == grow, "wrong cGrow %d (expected %d)\n", ilh->cGrow, grow); - ok(ilh->cx == cx, "wrong cx %d (expected %d)\n", ilh->cx, cx); - ok(ilh->cy == cy, "wrong cy %d (expected %d)\n", ilh->cy, cy); - ok(ilh->bkcolor == CLR_NONE, "wrong bkcolor %x\n", ilh->bkcolor); - ok(ilh->flags == ILC_COLOR24, "wrong flags %04x\n", ilh->flags); - ok(ilh->ovls[0] == -1 || - ilh->ovls[0] == 0, /* win95 */ - "wrong ovls[0] %04x\n", ilh->ovls[0]); - ok(ilh->ovls[1] == -1 || - ilh->ovls[1] == 0, /* win95 */ - "wrong ovls[1] %04x\n", ilh->ovls[1]); - ok(ilh->ovls[2] == -1 || - ilh->ovls[2] == 0, /* win95 */ - "wrong ovls[2] %04x\n", ilh->ovls[2]); - ok(ilh->ovls[3] == -1 || - ilh->ovls[3] == 0, /* win95 */ - "wrong ovls[3] %04x\n", ilh->ovls[3]); -} - -static HBITMAP create_bitmap(INT cx, INT cy, COLORREF color, const char *comment) -{ - HDC hdc; - char bmibuf[sizeof(BITMAPINFO) + 256 * sizeof(RGBQUAD)]; - BITMAPINFO *bmi = (BITMAPINFO *)bmibuf; - HBITMAP hbmp, hbmp_old; - HBRUSH hbrush; - RECT rc = { 0, 0, cx, cy }; - - hdc = CreateCompatibleDC(0); - - memset(bmi, 0, sizeof(*bmi)); - bmi->bmiHeader.biSize = sizeof(bmi->bmiHeader); - bmi->bmiHeader.biHeight = cx; - bmi->bmiHeader.biWidth = cy; - bmi->bmiHeader.biBitCount = 24; - bmi->bmiHeader.biPlanes = 1; - bmi->bmiHeader.biCompression = BI_RGB; - hbmp = CreateDIBSection(hdc, bmi, DIB_RGB_COLORS, NULL, NULL, 0); - - hbmp_old = SelectObject(hdc, hbmp); - - hbrush = CreateSolidBrush(color); - FillRect(hdc, &rc, hbrush); - DeleteObject(hbrush); - - DrawText(hdc, comment, -1, &rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE); - - SelectObject(hdc, hbmp_old); - DeleteDC(hdc); - - return hbmp; -} - -#define iml_clear_stream_data() \ - HeapFree(GetProcessHeap(), 0, Test_Stream.iml_data); \ - Test_Stream.iml_data = NULL; \ - Test_Stream.iml_data_size = 0; - -static void check_iml_data(HIMAGELIST himl, INT cx, INT cy, INT cur, INT max, INT grow, - INT width, INT height, INT bpp, const char *comment) -{ - INT ret, cxx, cyy; - - trace("%s\n", comment); - - ret = ImageList_GetImageCount(himl); - ok(ret == cur, "expected image count %d got %d\n", cur, ret); - - ret = ImageList_GetIconSize(himl, &cxx, &cyy); - ok(ret, "ImageList_GetIconSize failed\n"); - ok(cxx == cx, "wrong cx %d (expected %d)\n", cxx, cx); - ok(cyy == cy, "wrong cy %d (expected %d)\n", cyy, cy); - - iml_clear_stream_data(); - ret = ImageList_Write(himl, &Test_Stream.is); - ok(ret, "ImageList_Write failed\n"); - - ok(Test_Stream.iml_data != 0, "ImageList_Write didn't write any data\n"); - ok(Test_Stream.iml_data_size > sizeof(ILHEAD), "ImageList_Write wrote not enough data\n"); - - check_ilhead_data(Test_Stream.iml_data, cx, cy, cur, max, grow); - check_bitmap_data(Test_Stream.iml_data + sizeof(ILHEAD), - Test_Stream.iml_data_size - sizeof(ILHEAD), - width, height, bpp, comment); -} - -static void image_list_init(HIMAGELIST himl) -{ - HBITMAP hbm; - char comment[16]; - INT n = 1, i; - static const struct test_data - { - BYTE grey; - INT cx, cy, cur, max, grow, width, height, bpp; - const char *comment; - } td[] = - { - { 255, BMP_CX, BMP_CX, 1, 2, 4, BMP_CX * 4, BMP_CX * 1, 24, "total 1" }, - { 170, BMP_CX, BMP_CX, 2, 7, 4, BMP_CX * 4, BMP_CX * 2, 24, "total 2" }, - { 85, BMP_CX, BMP_CX, 3, 7, 4, BMP_CX * 4, BMP_CX * 2, 24, "total 3" }, - { 0, BMP_CX, BMP_CX, 4, 7, 4, BMP_CX * 4, BMP_CX * 2, 24, "total 4" }, - { 0, BMP_CX, BMP_CX, 5, 7, 4, BMP_CX * 4, BMP_CX * 2, 24, "total 5" }, - { 85, BMP_CX, BMP_CX, 6, 7, 4, BMP_CX * 4, BMP_CX * 2, 24, "total 6" }, - { 170, BMP_CX, BMP_CX, 7, 12, 4, BMP_CX * 4, BMP_CX * 3, 24, "total 7" }, - { 255, BMP_CX, BMP_CX, 8, 12, 4, BMP_CX * 4, BMP_CX * 3, 24, "total 8" }, - { 255, BMP_CX, BMP_CX, 9, 12, 4, BMP_CX * 4, BMP_CX * 3, 24, "total 9" }, - { 170, BMP_CX, BMP_CX, 10, 12, 4, BMP_CX * 4, BMP_CX * 3, 24, "total 10" }, - { 85, BMP_CX, BMP_CX, 11, 12, 4, BMP_CX * 4, BMP_CX * 3, 24, "total 11" }, - { 0, BMP_CX, BMP_CX, 12, 17, 4, BMP_CX * 4, BMP_CX * 5, 24, "total 12" }, - { 0, BMP_CX, BMP_CX, 13, 17, 4, BMP_CX * 4, BMP_CX * 5, 24, "total 13" }, - { 85, BMP_CX, BMP_CX, 14, 17, 4, BMP_CX * 4, BMP_CX * 5, 24, "total 14" }, - { 170, BMP_CX, BMP_CX, 15, 17, 4, BMP_CX * 4, BMP_CX * 5, 24, "total 15" }, - { 255, BMP_CX, BMP_CX, 16, 17, 4, BMP_CX * 4, BMP_CX * 5, 24, "total 16" }, - { 255, BMP_CX, BMP_CX, 17, 22, 4, BMP_CX * 4, BMP_CX * 6, 24, "total 17" }, - { 170, BMP_CX, BMP_CX, 18, 22, 4, BMP_CX * 4, BMP_CX * 6, 24, "total 18" }, - { 85, BMP_CX, BMP_CX, 19, 22, 4, BMP_CX * 4, BMP_CX * 6, 24, "total 19" }, - { 0, BMP_CX, BMP_CX, 20, 22, 4, BMP_CX * 4, BMP_CX * 6, 24, "total 20" }, - { 0, BMP_CX, BMP_CX, 21, 22, 4, BMP_CX * 4, BMP_CX * 6, 24, "total 21" }, - { 85, BMP_CX, BMP_CX, 22, 27, 4, BMP_CX * 4, BMP_CX * 7, 24, "total 22" }, - { 170, BMP_CX, BMP_CX, 23, 27, 4, BMP_CX * 4, BMP_CX * 7, 24, "total 23" }, - { 255, BMP_CX, BMP_CX, 24, 27, 4, BMP_CX * 4, BMP_CX * 7, 24, "total 24" } - }; - - check_iml_data(himl, BMP_CX, BMP_CX, 0, 2, 4, BMP_CX * 4, BMP_CX * 1, 24, "total 0"); - -#define add_bitmap(grey) \ - sprintf(comment, "%d", n++); \ - hbm = create_bitmap(BMP_CX, BMP_CX, RGB((grey),(grey),(grey)), comment); \ - ImageList_Add(himl, hbm, NULL); \ - DeleteObject(hbm); - - for (i = 0; i < sizeof(td)/sizeof(td[0]); i++) - { - add_bitmap(td[i].grey); - check_iml_data(himl, td[i].cx, td[i].cy, td[i].cur, td[i].max, td[i].grow, - td[i].width, td[i].height, td[i].bpp, td[i].comment); - } -#undef add_bitmap -} - -static void test_imagelist_storage(void) -{ - HIMAGELIST himl; - HBITMAP hbm; - INT ret; - - himl = ImageList_Create(BMP_CX, BMP_CX, ILC_COLOR24, 1, 1); - ok(himl != 0, "ImageList_Create failed\n"); - - check_iml_data(himl, BMP_CX, BMP_CX, 0, 2, 4, BMP_CX * 4, BMP_CX * 1, 24, "empty"); - - image_list_init(himl); - check_iml_data(himl, BMP_CX, BMP_CX, 24, 27, 4, BMP_CX * 4, BMP_CX * 7, 24, "orig"); - - ret = ImageList_Remove(himl, 4); - ok(ret, "ImageList_Remove failed\n"); - check_iml_data(himl, BMP_CX, BMP_CX, 23, 27, 4, BMP_CX * 4, BMP_CX * 7, 24, "1"); - - ret = ImageList_Remove(himl, 5); - ok(ret, "ImageList_Remove failed\n"); - check_iml_data(himl, BMP_CX, BMP_CX, 22, 27, 4, BMP_CX * 4, BMP_CX * 7, 24, "2"); - - ret = ImageList_Remove(himl, 6); - ok(ret, "ImageList_Remove failed\n"); - check_iml_data(himl, BMP_CX, BMP_CX, 21, 27, 4, BMP_CX * 4, BMP_CX * 7, 24, "3"); - - ret = ImageList_Remove(himl, 7); - ok(ret, "ImageList_Remove failed\n"); - check_iml_data(himl, BMP_CX, BMP_CX, 20, 27, 4, BMP_CX * 4, BMP_CX * 7, 24, "4"); - - ret = ImageList_Remove(himl, -2); - ok(!ret, "ImageList_Remove(-2) should fail\n"); - check_iml_data(himl, BMP_CX, BMP_CX, 20, 27, 4, BMP_CX * 4, BMP_CX * 7, 24, "5"); - - ret = ImageList_Remove(himl, 20); - ok(!ret, "ImageList_Remove(20) should fail\n"); - check_iml_data(himl, BMP_CX, BMP_CX, 20, 27, 4, BMP_CX * 4, BMP_CX * 7, 24, "6"); - - ret = ImageList_Remove(himl, -1); - ok(ret, "ImageList_Remove(-1) failed\n"); - check_iml_data(himl, BMP_CX, BMP_CX, 0, 4, 4, BMP_CX * 4, BMP_CX * 1, 24, "7"); - - ret = ImageList_Destroy(himl); - ok(ret, "ImageList_Destroy failed\n"); - - iml_clear_stream_data(); - - /* test ImageList_Create storage allocation */ - - himl = ImageList_Create(BMP_CX, BMP_CX, ILC_COLOR24, 0, 32); - ok(himl != 0, "ImageList_Create failed\n"); - check_iml_data(himl, BMP_CX, BMP_CX, 0, 1, 32, BMP_CX * 4, BMP_CX * 1, 24, "init 0 grow 32"); - hbm = create_bitmap(BMP_CX * 9, BMP_CX, 0, "9"); - ret = ImageList_Add(himl, hbm, NULL); - ok(ret == 0, "ImageList_Add returned %d, expected 0\n", ret); - check_iml_data(himl, BMP_CX, BMP_CX, 1, 34, 32, BMP_CX * 4, BMP_CX * 9, 24, "add 1 x 9"); - DeleteObject(hbm); - ret = ImageList_Destroy(himl); - ok(ret, "ImageList_Destroy failed\n"); - iml_clear_stream_data(); - - himl = ImageList_Create(BMP_CX, BMP_CX, ILC_COLOR24, 4, 4); - ok(himl != 0, "ImageList_Create failed\n"); - check_iml_data(himl, BMP_CX, BMP_CX, 0, 5, 4, BMP_CX * 4, BMP_CX * 2, 24, "init 4 grow 4"); - hbm = create_bitmap(BMP_CX, BMP_CX * 9, 0, "9"); - ret = ImageList_Add(himl, hbm, NULL); - ok(ret == 0, "ImageList_Add returned %d, expected 0\n", ret); - check_iml_data(himl, BMP_CX, BMP_CX, 9, 15, 4, BMP_CX * 4, BMP_CX * 4, 24, "add 9 x 1"); - ret = ImageList_Add(himl, hbm, NULL); - ok(ret == 9, "ImageList_Add returned %d, expected 9\n", ret); - check_iml_data(himl, BMP_CX, BMP_CX, 18, 25, 4, BMP_CX * 4, BMP_CX * 7, 24, "add 9 x 1"); - DeleteObject(hbm); - ret = ImageList_Destroy(himl); - ok(ret, "ImageList_Destroy failed\n"); - iml_clear_stream_data(); - - himl = ImageList_Create(BMP_CX, BMP_CX, ILC_COLOR24, 207, 209); - ok(himl != 0, "ImageList_Create failed\n"); - check_iml_data(himl, BMP_CX, BMP_CX, 0, 208, 212, BMP_CX * 4, BMP_CX * 52, 24, "init 207 grow 209"); - ret = ImageList_Destroy(himl); - ok(ret, "ImageList_Destroy failed\n"); - iml_clear_stream_data(); - - himl = ImageList_Create(BMP_CX, BMP_CX, ILC_COLOR24, 209, 207); - ok(himl != 0, "ImageList_Create failed\n"); - check_iml_data(himl, BMP_CX, BMP_CX, 0, 210, 208, BMP_CX * 4, BMP_CX * 53, 24, "init 209 grow 207"); - ret = ImageList_Destroy(himl); - ok(ret, "ImageList_Destroy failed\n"); - iml_clear_stream_data(); - - himl = ImageList_Create(BMP_CX, BMP_CX, ILC_COLOR24, 14, 4); - ok(himl != 0, "ImageList_Create failed\n"); - check_iml_data(himl, BMP_CX, BMP_CX, 0, 15, 4, BMP_CX * 4, BMP_CX * 4, 24, "init 14 grow 4"); - ret = ImageList_Destroy(himl); - ok(ret, "ImageList_Destroy failed\n"); - iml_clear_stream_data(); - - himl = ImageList_Create(BMP_CX, BMP_CX, ILC_COLOR24, 5, 9); - ok(himl != 0, "ImageList_Create failed\n"); - check_iml_data(himl, BMP_CX, BMP_CX, 0, 6, 12, BMP_CX * 4, BMP_CX * 2, 24, "init 5 grow 9"); - ret = ImageList_Destroy(himl); - ok(ret, "ImageList_Destroy failed\n"); - iml_clear_stream_data(); - - himl = ImageList_Create(BMP_CX, BMP_CX, ILC_COLOR24, 9, 5); - ok(himl != 0, "ImageList_Create failed\n"); - check_iml_data(himl, BMP_CX, BMP_CX, 0, 10, 8, BMP_CX * 4, BMP_CX * 3, 24, "init 9 grow 5"); - ret = ImageList_Destroy(himl); - ok(ret, "ImageList_Destroy failed\n"); - iml_clear_stream_data(); - - himl = ImageList_Create(BMP_CX, BMP_CX, ILC_COLOR24, 2, 4); - ok(himl != 0, "ImageList_Create failed\n"); - check_iml_data(himl, BMP_CX, BMP_CX, 0, 3, 4, BMP_CX * 4, BMP_CX * 1, 24, "init 2 grow 4"); - ret = ImageList_Destroy(himl); - ok(ret, "ImageList_Destroy failed\n"); - iml_clear_stream_data(); - - himl = ImageList_Create(BMP_CX, BMP_CX, ILC_COLOR24, 4, 2); - ok(himl != 0, "ImageList_Create failed\n"); - check_iml_data(himl, BMP_CX, BMP_CX, 0, 5, 4, BMP_CX * 4, BMP_CX * 2, 24, "init 4 grow 2"); - ret = ImageList_Destroy(himl); - ok(ret, "ImageList_Destroy failed\n"); - iml_clear_stream_data(); -} - -static void test_shell_imagelist(void) -{ - BOOL (WINAPI *pSHGetImageList)(INT, REFIID, void**); - IImageList *iml = NULL; - HMODULE hShell32; - HRESULT hr; - int out = 0; - RECT rect; - int cx, cy; - - /* Try to load function from shell32 */ - hShell32 = LoadLibrary("shell32.dll"); - pSHGetImageList = (void*)GetProcAddress(hShell32, (LPCSTR) 727); - - if (!pSHGetImageList) - { - win_skip("SHGetImageList not available, skipping test\n"); - return; - } - - /* Get system image list */ - hr = (pSHGetImageList)(SHIL_SYSSMALL, &IID_IImageList, (void**)&iml); - - ok(SUCCEEDED(hr), "SHGetImageList failed, hr=%x\n", hr); - - if (hr != S_OK) - return; - - IImageList_GetImageCount(iml, &out); - ok(out > 0, "IImageList_GetImageCount returned out <= 0\n"); - - /* Fetch the small icon size */ - cx = GetSystemMetrics(SM_CXSMICON); - cy = GetSystemMetrics(SM_CYSMICON); - - /* Check icon size matches */ - IImageList_GetImageRect(iml, 0, &rect); - ok(((rect.right == cx) && (rect.bottom == cy)), - "IImageList_GetImageRect returned r:%d,b:%d\n", - rect.right, rect.bottom); - - IImageList_Release(iml); - FreeLibrary(hShell32); -} - -static HBITMAP create_test_bitmap(HDC hdc, int bpp, UINT32 pixel1, UINT32 pixel2) -{ - HBITMAP hBitmap; - UINT32 *buffer = NULL; - BITMAPINFO bitmapInfo = {{sizeof(BITMAPINFOHEADER), 2, 1, 1, bpp, BI_RGB, - 0, 0, 0, 0, 0}}; - - hBitmap = CreateDIBSection(hdc, &bitmapInfo, DIB_RGB_COLORS, (void**)&buffer, NULL, 0); - ok(hBitmap != NULL && buffer != NULL, "CreateDIBSection failed.\n"); - - if(!hBitmap || !buffer) - { - DeleteObject(hBitmap); - return NULL; - } - - buffer[0] = pixel1; - buffer[1] = pixel2; - - return hBitmap; -} - -static BOOL colour_match(UINT32 x, UINT32 y) -{ - const INT32 tolerance = 8; - - const INT32 dr = abs((INT32)(x & 0x000000FF) - (INT32)(y & 0x000000FF)); - const INT32 dg = abs((INT32)((x & 0x0000FF00) >> 8) - (INT32)((y & 0x0000FF00) >> 8)); - const INT32 db = abs((INT32)((x & 0x00FF0000) >> 16) - (INT32)((y & 0x00FF0000) >> 16)); - - return (dr <= tolerance && dg <= tolerance && db <= tolerance); -} - -static void check_ImageList_DrawIndirect(IMAGELISTDRAWPARAMS *ildp, UINT32 *bits, - UINT32 expected, int line) -{ - bits[0] = 0x00FFFFFF; - pImageList_DrawIndirect(ildp); - ok(colour_match(bits[0], expected), - "ImageList_DrawIndirect: Pixel %08X, Expected a close match to %08X from line %d\n", - bits[0] & 0x00FFFFFF, expected, line); -} - - -static void check_ImageList_DrawIndirect_fStyle(HDC hdc, HIMAGELIST himl, UINT32 *bits, int i, - UINT fStyle, UINT32 expected, int line) -{ - IMAGELISTDRAWPARAMS ildp = {sizeof(IMAGELISTDRAWPARAMS), himl, i, hdc, - 0, 0, 0, 0, 0, 0, CLR_NONE, CLR_NONE, fStyle, 0, ILS_NORMAL, 0, 0x00000000}; - check_ImageList_DrawIndirect(&ildp, bits, expected, line); -} - -static void check_ImageList_DrawIndirect_ILD_ROP(HDC hdc, HIMAGELIST himl, UINT32 *bits, int i, - DWORD dwRop, UINT32 expected, int line) -{ - IMAGELISTDRAWPARAMS ildp = {sizeof(IMAGELISTDRAWPARAMS), himl, i, hdc, - 0, 0, 0, 0, 0, 0, CLR_NONE, CLR_NONE, ILD_IMAGE | ILD_ROP, dwRop, ILS_NORMAL, 0, 0x00000000}; - check_ImageList_DrawIndirect(&ildp, bits, expected, line); -} - -static void check_ImageList_DrawIndirect_fState(HDC hdc, HIMAGELIST himl, UINT32 *bits, int i, UINT fStyle, - UINT fState, DWORD Frame, UINT32 expected, int line) -{ - IMAGELISTDRAWPARAMS ildp = {sizeof(IMAGELISTDRAWPARAMS), himl, i, hdc, - 0, 0, 0, 0, 0, 0, CLR_NONE, CLR_NONE, fStyle, 0, fState, Frame, 0x00000000}; - check_ImageList_DrawIndirect(&ildp, bits, expected, line); -} - -static void check_ImageList_DrawIndirect_broken(HDC hdc, HIMAGELIST himl, UINT32 *bits, int i, - UINT fStyle, UINT fState, DWORD Frame, UINT32 expected, - UINT32 broken_expected, int line) -{ - IMAGELISTDRAWPARAMS ildp = {sizeof(IMAGELISTDRAWPARAMS), himl, i, hdc, - 0, 0, 0, 0, 0, 0, CLR_NONE, CLR_NONE, fStyle, 0, fState, Frame, 0x00000000}; - bits[0] = 0x00FFFFFF; - pImageList_DrawIndirect(&ildp); - ok(colour_match(bits[0], expected) || - broken(colour_match(bits[0], broken_expected)), - "ImageList_DrawIndirect: Pixel %08X, Expected a close match to %08X from line %d\n", - bits[0] & 0x00FFFFFF, expected, line); -} - -static void test_ImageList_DrawIndirect(void) -{ - HIMAGELIST himl = NULL; - int ret; - HDC hdcDst = NULL; - HBITMAP hbmOld = NULL, hbmDst = NULL; - HBITMAP hbmMask = NULL, hbmInverseMask = NULL; - HBITMAP hbmImage = NULL, hbmAlphaImage = NULL, hbmTransparentImage = NULL; - int iImage = -1, iAlphaImage = -1, iTransparentImage = -1; - UINT32 *bits = 0; - UINT32 maskBits = 0x00000000, inverseMaskBits = 0xFFFFFFFF; - - BITMAPINFO bitmapInfo = {{sizeof(BITMAPINFOHEADER), 2, 1, 1, 32, BI_RGB, - 0, 0, 0, 0, 0}}; - - hdcDst = CreateCompatibleDC(0); - ok(hdcDst != 0, "CreateCompatibleDC(0) failed to return a valid DC\n"); - if (!hdcDst) - return; - - hbmMask = CreateBitmap(2, 1, 1, 1, &maskBits); - ok(hbmMask != 0, "CreateBitmap failed\n"); - if(!hbmMask) goto cleanup; - - hbmInverseMask = CreateBitmap(2, 1, 1, 1, &inverseMaskBits); - ok(hbmInverseMask != 0, "CreateBitmap failed\n"); - if(!hbmInverseMask) goto cleanup; - - himl = pImageList_Create(2, 1, ILC_COLOR32, 0, 1); - ok(himl != 0, "ImageList_Create failed\n"); - if(!himl) goto cleanup; - - /* Add a no-alpha image */ - hbmImage = create_test_bitmap(hdcDst, 32, 0x00ABCDEF, 0x00ABCDEF); - if(!hbmImage) goto cleanup; - - iImage = pImageList_Add(himl, hbmImage, hbmMask); - ok(iImage != -1, "ImageList_Add failed\n"); - if(iImage == -1) goto cleanup; - - /* Add an alpha image */ - hbmAlphaImage = create_test_bitmap(hdcDst, 32, 0x89ABCDEF, 0x89ABCDEF); - if(!hbmAlphaImage) goto cleanup; - - iAlphaImage = pImageList_Add(himl, hbmAlphaImage, hbmMask); - ok(iAlphaImage != -1, "ImageList_Add failed\n"); - if(iAlphaImage == -1) goto cleanup; - - /* Add a transparent alpha image */ - hbmTransparentImage = create_test_bitmap(hdcDst, 32, 0x00ABCDEF, 0x89ABCDEF); - if(!hbmTransparentImage) goto cleanup; - - iTransparentImage = pImageList_Add(himl, hbmTransparentImage, hbmMask); - ok(iTransparentImage != -1, "ImageList_Add failed\n"); - if(iTransparentImage == -1) goto cleanup; - - /* 32-bit Tests */ - bitmapInfo.bmiHeader.biBitCount = 32; - hbmDst = CreateDIBSection(hdcDst, &bitmapInfo, DIB_RGB_COLORS, (void**)&bits, NULL, 0); - ok (hbmDst && bits, "CreateDIBSection failed to return a valid bitmap and buffer\n"); - if (!hbmDst || !bits) - goto cleanup; - hbmOld = SelectObject(hdcDst, hbmDst); - - check_ImageList_DrawIndirect_fStyle(hdcDst, himl, bits, iImage, ILD_NORMAL, 0x00ABCDEF, __LINE__); - check_ImageList_DrawIndirect_fStyle(hdcDst, himl, bits, iImage, ILD_TRANSPARENT, 0x00ABCDEF, __LINE__); - todo_wine check_ImageList_DrawIndirect_broken(hdcDst, himl, bits, iAlphaImage, ILD_BLEND25, ILS_NORMAL, 0, 0x00E8F1FA, 0x00D4D9DD, __LINE__); - todo_wine check_ImageList_DrawIndirect_broken(hdcDst, himl, bits, iAlphaImage, ILD_BLEND50, ILS_NORMAL, 0, 0x00E8F1FA, 0x00B4BDC4, __LINE__); - check_ImageList_DrawIndirect_fStyle(hdcDst, himl, bits, iImage, ILD_MASK, 0x00ABCDEF, __LINE__); - check_ImageList_DrawIndirect_fStyle(hdcDst, himl, bits, iImage, ILD_IMAGE, 0x00ABCDEF, __LINE__); - check_ImageList_DrawIndirect_fStyle(hdcDst, himl, bits, iImage, ILD_PRESERVEALPHA, 0x00ABCDEF, __LINE__); - - check_ImageList_DrawIndirect_fStyle(hdcDst, himl, bits, iAlphaImage, ILD_NORMAL, 0x00D3E5F7, __LINE__); - check_ImageList_DrawIndirect_fStyle(hdcDst, himl, bits, iAlphaImage, ILD_TRANSPARENT, 0x00D3E5F7, __LINE__); - todo_wine - { - check_ImageList_DrawIndirect_broken(hdcDst, himl, bits, iAlphaImage, ILD_BLEND25, ILS_NORMAL, 0, 0x00E8F1FA, 0x009DA8B1, __LINE__); - check_ImageList_DrawIndirect_broken(hdcDst, himl, bits, iAlphaImage, ILD_BLEND50, ILS_NORMAL, 0, 0x00E8F1FA, 0x008C99A3, __LINE__); - - } - check_ImageList_DrawIndirect_fStyle(hdcDst, himl, bits, iAlphaImage, ILD_MASK, 0x00D3E5F7, __LINE__); - check_ImageList_DrawIndirect_fStyle(hdcDst, himl, bits, iAlphaImage, ILD_IMAGE, 0x00D3E5F7, __LINE__); - todo_wine check_ImageList_DrawIndirect_fStyle(hdcDst, himl, bits, iAlphaImage, ILD_PRESERVEALPHA, 0x005D6F81, __LINE__); - - check_ImageList_DrawIndirect_fStyle(hdcDst, himl, bits, iTransparentImage, ILD_NORMAL, 0x00FFFFFF, __LINE__); - - check_ImageList_DrawIndirect_ILD_ROP(hdcDst, himl, bits, iImage, SRCCOPY, 0x00ABCDEF, __LINE__); - check_ImageList_DrawIndirect_ILD_ROP(hdcDst, himl, bits, iImage, SRCINVERT, 0x00543210, __LINE__); - - /* ILD_ROP is ignored when the image has an alpha channel */ - check_ImageList_DrawIndirect_ILD_ROP(hdcDst, himl, bits, iAlphaImage, SRCCOPY, 0x00D3E5F7, __LINE__); - check_ImageList_DrawIndirect_ILD_ROP(hdcDst, himl, bits, iAlphaImage, SRCINVERT, 0x00D3E5F7, __LINE__); - - todo_wine check_ImageList_DrawIndirect_fState(hdcDst, himl, bits, iImage, ILD_NORMAL, ILS_SATURATE, 0, 0x00CCCCCC, __LINE__); - todo_wine check_ImageList_DrawIndirect_broken(hdcDst, himl, bits, iAlphaImage, ILD_NORMAL, ILS_SATURATE, 0, 0x00AFAFAF, 0x00F0F0F0, __LINE__); - - check_ImageList_DrawIndirect_fState(hdcDst, himl, bits, iImage, ILD_NORMAL, ILS_GLOW, 0, 0x00ABCDEF, __LINE__); - check_ImageList_DrawIndirect_fState(hdcDst, himl, bits, iImage, ILD_NORMAL, ILS_SHADOW, 0, 0x00ABCDEF, __LINE__); - - check_ImageList_DrawIndirect_fState(hdcDst, himl, bits, iImage, ILD_NORMAL, ILS_ALPHA, 127, 0x00D5E6F7, __LINE__); - check_ImageList_DrawIndirect_broken(hdcDst, himl, bits, iAlphaImage, ILD_NORMAL, ILS_ALPHA, 127, 0x00E9F2FB, 0x00AEB7C0, __LINE__); - todo_wine check_ImageList_DrawIndirect_broken(hdcDst, himl, bits, iAlphaImage, ILD_NORMAL, ILS_NORMAL, 127, 0x00E9F2FB, 0x00D3E5F7, __LINE__); - -cleanup: - - if(hbmOld) - SelectObject(hdcDst, hbmOld); - if(hbmDst) - DeleteObject(hbmDst); - - if(hdcDst) - DeleteDC(hdcDst); - - if(hbmMask) - DeleteObject(hbmMask); - if(hbmInverseMask) - DeleteObject(hbmInverseMask); - - if(hbmImage) - DeleteObject(hbmImage); - if(hbmAlphaImage) - DeleteObject(hbmAlphaImage); - if(hbmTransparentImage) - DeleteObject(hbmTransparentImage); - - if(himl) - { - ret = ImageList_Destroy(himl); - ok(ret, "ImageList_Destroy failed\n"); - } -} - -static void test_iimagelist(void) -{ - IImageList *imgl; - HIMAGELIST himl; - HRESULT hr; - ULONG ret; - - if (!pHIMAGELIST_QueryInterface) - { - win_skip("XP imagelist functions not available\n"); - return; - } - - /* test reference counting on destruction */ - imgl = (IImageList*)createImageList(32, 32); - ret = IUnknown_AddRef(imgl); - ok(ret == 2, "Expected 2, got %d\n", ret); - ret = ImageList_Destroy((HIMAGELIST)imgl); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ret = ImageList_Destroy((HIMAGELIST)imgl); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ret = ImageList_Destroy((HIMAGELIST)imgl); - ok(ret == FALSE, "Expected FALSE, got %d\n", ret); - - imgl = (IImageList*)createImageList(32, 32); - ret = IUnknown_AddRef(imgl); - ok(ret == 2, "Expected 2, got %d\n", ret); - ret = ImageList_Destroy((HIMAGELIST)imgl); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ret = IImageList_Release(imgl); - ok(ret == 0, "Expected 0, got %d\n", ret); - ret = ImageList_Destroy((HIMAGELIST)imgl); - ok(ret == FALSE, "Expected FALSE, got %d\n", ret); - - if (!pImageList_CoCreateInstance) - { - win_skip("Vista imagelist functions not available\n"); - return; - } - - hr = pImageList_CoCreateInstance(&CLSID_ImageList, NULL, &IID_IImageList, (void **) &imgl); - ok(SUCCEEDED(hr), "ImageList_CoCreateInstance failed, hr=%x\n", hr); - - if (hr == S_OK) - IImageList_Release(imgl); - - himl = createImageList(32, 32); - - if (!himl) - return; - - hr = (pHIMAGELIST_QueryInterface)(himl, &IID_IImageList, (void **) &imgl); - ok(SUCCEEDED(hr), "HIMAGELIST_QueryInterface failed, hr=%x\n", hr); - - if (hr == S_OK) - IImageList_Release(imgl); - - ImageList_Destroy(himl); -} - -static void testHotspot_v6(void) -{ - struct hotspot { - int dx; - int dy; - }; - -#define SIZEX1 47 -#define SIZEY1 31 -#define SIZEX2 11 -#define SIZEY2 17 -#define HOTSPOTS_MAX 4 /* Number of entries in hotspots */ - static const struct hotspot hotspots[HOTSPOTS_MAX] = { - { 10, 7 }, - { SIZEX1, SIZEY1 }, - { -9, -8 }, - { -7, 35 } - }; - int i, j; - HIMAGELIST himl1 = createImageList(SIZEX1, SIZEY1); - HIMAGELIST himl2 = createImageList(SIZEX2, SIZEY2); - IImageList *imgl1, *imgl2; - HRESULT hr; - - /* cast to IImageList */ - imgl1 = (IImageList *) himl1; - imgl2 = (IImageList *) himl2; - - for (i = 0; i < HOTSPOTS_MAX; i++) { - for (j = 0; j < HOTSPOTS_MAX; j++) { - int dx1 = hotspots[i].dx; - int dy1 = hotspots[i].dy; - int dx2 = hotspots[j].dx; - int dy2 = hotspots[j].dy; - int correctx, correcty, newx, newy; - char loc[256]; - IImageList *imglNew; - POINT ppt; - - hr = IImageList_BeginDrag(imgl1, 0, dx1, dy1); - ok(SUCCEEDED(hr), "BeginDrag failed for { %d, %d }\n", dx1, dy1); - sprintf(loc, "BeginDrag (%d,%d)\n", i, j); - - /* check merging the dragged image with a second image */ - hr = IImageList_SetDragCursorImage(imgl2, (IUnknown *) imgl2, 0, dx2, dy2); - ok(SUCCEEDED(hr), "SetDragCursorImage failed for {%d, %d}{%d, %d}\n", - dx1, dy1, dx2, dy2); - sprintf(loc, "SetDragCursorImage (%d,%d)\n", i, j); - - /* check new hotspot, it should be the same like the old one */ - hr = IImageList_GetDragImage(imgl2, NULL, &ppt, &IID_IImageList, (PVOID *) &imglNew); - ok(SUCCEEDED(hr), "GetDragImage failed\n"); - ok(ppt.x == dx1 && ppt.y == dy1, - "Expected drag hotspot [%d,%d] got [%d,%d]\n", - dx1, dy1, ppt.x, ppt.y); - /* check size of new dragged image */ - IImageList_GetIconSize(imglNew, &newx, &newy); - correctx = max(SIZEX1, max(SIZEX2 + dx2, SIZEX1 - dx2)); - correcty = max(SIZEY1, max(SIZEY2 + dy2, SIZEY1 - dy2)); - ok(newx == correctx && newy == correcty, - "Expected drag image size [%d,%d] got [%d,%d]\n", - correctx, correcty, newx, newy); - sprintf(loc, "GetDragImage (%d,%d)\n", i, j); - IImageList_EndDrag(imgl2); - } - } -#undef SIZEX1 -#undef SIZEY1 -#undef SIZEX2 -#undef SIZEY2 -#undef HOTSPOTS_MAX - IImageList_Release(imgl2); - IImageList_Release(imgl1); -} - -static void DoTest1_v6(void) -{ - IImageList *imgl; - HIMAGELIST himl; - HRESULT hr; - - HICON hicon1; - HICON hicon2; - HICON hicon3; - - int ret = 0; - - /* create an imagelist to play with */ - himl = ImageList_Create(84, 84, ILC_COLOR16, 0, 3); - ok(himl != 0,"failed to create imagelist\n"); - - imgl = (IImageList *) himl; - - /* load the icons to add to the image list */ - hicon1 = CreateIcon(hinst, 32, 32, 1, 1, icon_bits, icon_bits); - ok(hicon1 != 0, "no hicon1\n"); - hicon2 = CreateIcon(hinst, 32, 32, 1, 1, icon_bits, icon_bits); - ok(hicon2 != 0, "no hicon2\n"); - hicon3 = CreateIcon(hinst, 32, 32, 1, 1, icon_bits, icon_bits); - ok(hicon3 != 0, "no hicon3\n"); - - /* remove when nothing exists */ - hr = IImageList_Remove(imgl, 0); - ok(!(SUCCEEDED(hr)), "removed nonexistent icon\n"); - - /* removing everything from an empty imagelist should succeed */ - hr = IImageList_Remove(imgl, -1); - ok(SUCCEEDED(hr), "removed nonexistent icon\n"); - - /* add three */ - ok(SUCCEEDED(IImageList_ReplaceIcon(imgl, -1, hicon1, &ret)) && (ret == 0),"failed to add icon1\n"); - ok(SUCCEEDED(IImageList_ReplaceIcon(imgl, -1, hicon2, &ret)) && (ret == 1),"failed to add icon2\n"); - ok(SUCCEEDED(IImageList_ReplaceIcon(imgl, -1, hicon3, &ret)) && (ret == 2),"failed to add icon3\n"); - - /* remove an index out of range */ - ok(FAILED(IImageList_Remove(imgl, 4711)),"removed nonexistent icon\n"); - - /* remove three */ - ok(SUCCEEDED(IImageList_Remove(imgl,0)),"can't remove 0\n"); - ok(SUCCEEDED(IImageList_Remove(imgl,0)),"can't remove 0\n"); - ok(SUCCEEDED(IImageList_Remove(imgl,0)),"can't remove 0\n"); - - /* remove one extra */ - ok(FAILED(IImageList_Remove(imgl, 0)),"removed nonexistent icon\n"); - - /* check SetImageCount/GetImageCount */ - ok(SUCCEEDED(IImageList_SetImageCount(imgl, 3)), "couldn't increase image count\n"); - ok(SUCCEEDED(IImageList_GetImageCount(imgl, &ret)) && (ret == 3), "invalid image count after increase\n"); - ok(SUCCEEDED(IImageList_SetImageCount(imgl, 1)), "couldn't decrease image count\n"); - ok(SUCCEEDED(IImageList_GetImageCount(imgl, &ret)) && (ret == 1), "invalid image count after decrease to 1\n"); - ok(SUCCEEDED(IImageList_SetImageCount(imgl, 0)), "couldn't decrease image count\n"); - ok(SUCCEEDED(IImageList_GetImageCount(imgl, &ret)) && (ret == 0), "invalid image count after decrease to 0\n"); - - /* destroy it */ - ok(SUCCEEDED(IImageList_Release(imgl)),"release imagelist failed\n"); - - ok(DestroyIcon(hicon1),"icon 1 wasn't deleted\n"); - ok(DestroyIcon(hicon2),"icon 2 wasn't deleted\n"); - ok(DestroyIcon(hicon3),"icon 3 wasn't deleted\n"); -} - -static void DoTest3_v6(void) -{ - IImageList *imgl; - HIMAGELIST himl; - - HBITMAP hbm1; - HBITMAP hbm2; - HBITMAP hbm3; - - IMAGELISTDRAWPARAMS imldp; - HWND hwndfortest; - HDC hdc; - int ret; - - hwndfortest = create_a_window(); - hdc = GetDC(hwndfortest); - ok(hdc!=NULL, "couldn't get DC\n"); - - /* create an imagelist to play with */ - himl = ImageList_Create(48, 48, ILC_COLOR16, 0, 3); - ok(himl!=0,"failed to create imagelist\n"); - - imgl = (IImageList *) himl; - - /* load the icons to add to the image list */ - hbm1 = CreateBitmap(48, 48, 1, 1, bitmap_bits); - ok(hbm1 != 0, "no bitmap 1\n"); - hbm2 = CreateBitmap(48, 48, 1, 1, bitmap_bits); - ok(hbm2 != 0, "no bitmap 2\n"); - hbm3 = CreateBitmap(48, 48, 1, 1, bitmap_bits); - ok(hbm3 != 0, "no bitmap 3\n"); - - /* add three */ - ok(SUCCEEDED(IImageList_Add(imgl, hbm1, 0, &ret)) && (ret == 0), "failed to add bitmap 1\n"); - ok(SUCCEEDED(IImageList_Add(imgl, hbm2, 0, &ret)) && (ret == 1), "failed to add bitmap 2\n"); - - ok(SUCCEEDED(IImageList_SetImageCount(imgl, 3)), "Setimage count failed\n"); - ok(SUCCEEDED(IImageList_Replace(imgl, 2, hbm3, 0)), "failed to replace bitmap 3\n"); - - memset(&imldp, 0, sizeof (imldp)); - ok(FAILED(IImageList_Draw(imgl, &imldp)), "zero data succeeded!\n"); - - imldp.cbSize = sizeof (imldp); - imldp.hdcDst = hdc; - imldp.himl = himl; - - if (FAILED(IImageList_Draw(imgl, &imldp))) - { - /* Earlier versions of native comctl32 use a smaller structure */ - imldp.cbSize -= 3 * sizeof(DWORD); - ok(SUCCEEDED(IImageList_Draw(imgl, &imldp)), "should succeed\n"); - } - - REDRAW(hwndfortest); - WAIT; - - imldp.fStyle = SRCCOPY; - imldp.rgbBk = CLR_DEFAULT; - imldp.rgbFg = CLR_DEFAULT; - imldp.y = 100; - imldp.x = 100; - ok(SUCCEEDED(IImageList_Draw(imgl, &imldp)), "should succeed\n"); - imldp.i ++; - ok(SUCCEEDED(IImageList_Draw(imgl, &imldp)), "should succeed\n"); - imldp.i ++; - ok(SUCCEEDED(IImageList_Draw(imgl, &imldp)), "should succeed\n"); - imldp.i ++; - ok(FAILED(IImageList_Draw(imgl, &imldp)), "should fail\n"); - - /* remove three */ - ok(SUCCEEDED(IImageList_Remove(imgl, 0)), "removing 1st bitmap\n"); - ok(SUCCEEDED(IImageList_Remove(imgl, 0)), "removing 2nd bitmap\n"); - ok(SUCCEEDED(IImageList_Remove(imgl, 0)), "removing 3rd bitmap\n"); - - /* destroy it */ - ok(SUCCEEDED(IImageList_Release(imgl)), "release imagelist failed\n"); - - /* bitmaps should not be deleted by the imagelist */ - ok(DeleteObject(hbm1),"bitmap 1 can't be deleted\n"); - ok(DeleteObject(hbm2),"bitmap 2 can't be deleted\n"); - ok(DeleteObject(hbm3),"bitmap 3 can't be deleted\n"); - - ReleaseDC(hwndfortest, hdc); - DestroyWindow(hwndfortest); -} - -static void testMerge_v6(void) -{ - HIMAGELIST himl1, himl2; - IImageList *imgl1, *imgl2, *merge; - HICON hicon1; - HWND hwnd = create_a_window(); - HRESULT hr; - int ret; - - himl1 = ImageList_Create(32,32,0,0,3); - ok(himl1 != NULL,"failed to create himl1\n"); - - himl2 = ImageList_Create(32,32,0,0,3); - ok(himl2 != NULL,"failed to create himl2\n"); - - hicon1 = CreateIcon(hinst, 32, 32, 1, 1, icon_bits, icon_bits); - ok(hicon1 != NULL, "failed to create hicon1\n"); - - if (!himl1 || !himl2 || !hicon1) - return; - - /* cast to IImageList */ - imgl1 = (IImageList *) himl1; - imgl2 = (IImageList *) himl2; - - ok(SUCCEEDED(IImageList_ReplaceIcon(imgl2, -1, hicon1, &ret)) && (ret == 0),"add icon1 to himl2 failed\n"); - - /* If himl1 has no images, merge still succeeds */ - hr = IImageList_Merge(imgl1, -1, (IUnknown *) imgl2, 0, 0, 0, &IID_IImageList, (void **) &merge); - ok(SUCCEEDED(hr), "merge himl1,-1 failed\n"); - if (SUCCEEDED(hr)) IImageList_Release(merge); - - hr = IImageList_Merge(imgl1, 0, (IUnknown *) imgl2, 0, 0, 0, &IID_IImageList, (void **) &merge); - ok(SUCCEEDED(hr), "merge himl1,0 failed\n"); - if (SUCCEEDED(hr)) IImageList_Release(merge); - - /* Same happens if himl2 is empty */ - IImageList_Release(imgl2); - himl2 = ImageList_Create(32,32,0,0,3); - ok(himl2 != NULL,"failed to recreate himl2\n"); - - imgl2 = (IImageList *) himl2; - - hr = IImageList_Merge(imgl1, -1, (IUnknown *) imgl2, -1, 0, 0, &IID_IImageList, (void **) &merge); - ok(SUCCEEDED(hr), "merge himl2,-1 failed\n"); - if (SUCCEEDED(hr)) IImageList_Release(merge); - - hr = IImageList_Merge(imgl1, -1, (IUnknown *) imgl2, 0, 0, 0, &IID_IImageList, (void **) &merge); - ok(SUCCEEDED(hr), "merge himl2,0 failed\n"); - if (SUCCEEDED(hr)) IImageList_Release(merge); - - /* Now try merging an image with itself */ - ok(SUCCEEDED(IImageList_ReplaceIcon(imgl2, -1, hicon1, &ret)) && (ret == 0),"re-add icon1 to himl2 failed\n"); - - hr = IImageList_Merge(imgl2, 0, (IUnknown *) imgl2, 0, 0, 0, &IID_IImageList, (void **) &merge); - ok(SUCCEEDED(hr), "merge himl2 with itself failed\n"); - if (SUCCEEDED(hr)) IImageList_Release(merge); - - /* Try merging 2 different image lists */ - ok(SUCCEEDED(IImageList_ReplaceIcon(imgl1, -1, hicon1, &ret)) && (ret == 0),"add icon1 to himl1 failed\n"); - - hr = IImageList_Merge(imgl1, 0, (IUnknown *) imgl2, 0, 0, 0, &IID_IImageList, (void **) &merge); - ok(SUCCEEDED(hr), "merge himl1 with himl2 failed\n"); - if (SUCCEEDED(hr)) IImageList_Release(merge); - - hr = IImageList_Merge(imgl1, 0, (IUnknown *) imgl2, 0, 8, 16, &IID_IImageList, (void **) &merge); - ok(SUCCEEDED(hr), "merge himl1 with himl2 8,16 failed\n"); - if (SUCCEEDED(hr)) IImageList_Release(merge); - - IImageList_Release(imgl1); - IImageList_Release(imgl2); - - DestroyIcon(hicon1); - DestroyWindow(hwnd); -} - -START_TEST(imagelist) -{ - ULONG_PTR ctx_cookie; - HANDLE hCtx; - - HMODULE hComCtl32 = GetModuleHandle("comctl32.dll"); - pImageList_Create = NULL; /* These are not needed for non-v6.0 tests*/ - pImageList_Add = NULL; - pImageList_DrawIndirect = (void*)GetProcAddress(hComCtl32, "ImageList_DrawIndirect"); - pImageList_SetImageCount = (void*)GetProcAddress(hComCtl32, "ImageList_SetImageCount"); - - hinst = GetModuleHandleA(NULL); - - InitCommonControls(); - - testHotspot(); - DoTest1(); - DoTest2(); - DoTest3(); - testMerge(); - test_imagelist_storage(); - - FreeLibrary(hComCtl32); - - /* Now perform v6 tests */ - - if (!load_v6_module(&ctx_cookie, &hCtx)) - return; - - /* Reload comctl32 */ - hComCtl32 = LoadLibraryA("comctl32.dll"); - pImageList_Create = (void*)GetProcAddress(hComCtl32, "ImageList_Create"); - pImageList_Add = (void*)GetProcAddress(hComCtl32, "ImageList_Add"); - pImageList_DrawIndirect = (void*)GetProcAddress(hComCtl32, "ImageList_DrawIndirect"); - pImageList_SetImageCount = (void*)GetProcAddress(hComCtl32, "ImageList_SetImageCount"); - pImageList_CoCreateInstance = (void*)GetProcAddress(hComCtl32, "ImageList_CoCreateInstance"); - pHIMAGELIST_QueryInterface = (void*)GetProcAddress(hComCtl32, "HIMAGELIST_QueryInterface"); - - CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - /* Do v6.0 tests */ - test_ImageList_DrawIndirect(); - test_shell_imagelist(); - test_iimagelist(); - - testHotspot_v6(); - DoTest1_v6(); - DoTest3_v6(); - testMerge_v6(); - - CoUninitialize(); - - unload_v6_module(ctx_cookie, hCtx); -} diff --git a/rostests/winetests/comctl32/ipaddress.c b/rostests/winetests/comctl32/ipaddress.c deleted file mode 100644 index 85f92b1d582..00000000000 --- a/rostests/winetests/comctl32/ipaddress.c +++ /dev/null @@ -1,93 +0,0 @@ -/* Unit test suite for IP Address control. - * - * Copyright 2009 Nikolay Sivov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - - -#include -#include -#include - -#include "wine/test.h" - -#define expect(expected, got) ok(expected == got, "expected %d, got %d\n", expected,got) - -static HWND create_ipaddress_control (void) -{ - HWND handle; - - handle = CreateWindowEx(0, WC_IPADDRESS, NULL, - WS_BORDER|WS_VISIBLE, 0, 0, 0, 0, - NULL, NULL, NULL, NULL); - return handle; -} - -static void test_get_set_text(void) -{ - HWND hwnd; - CHAR ip[16]; - INT r; - - hwnd = create_ipaddress_control(); - if (!hwnd) - { - win_skip("IPAddress control not implemented\n"); - return; - } - - /* check text just after creation */ - r = GetWindowText(hwnd, ip, sizeof(ip)/sizeof(CHAR)); - expect(7, r); - ok(strcmp(ip, "0.0.0.0") == 0, "Expected null IP address, got %s\n", ip); - - SendMessage(hwnd, IPM_SETADDRESS, 0, MAKEIPADDRESS(127, 0, 0, 1)); - r = GetWindowText(hwnd, ip, sizeof(ip)/sizeof(CHAR)); - expect(9, r); - ok(strcmp(ip, "127.0.0.1") == 0, "Expected 127.0.0.1, got %s\n", ip); - - DestroyWindow(hwnd); -} - -static int init(void) -{ - HMODULE hComctl32; - BOOL (WINAPI *pInitCommonControlsEx)(const INITCOMMONCONTROLSEX*); - INITCOMMONCONTROLSEX iccex; - - hComctl32 = GetModuleHandleA("comctl32.dll"); - pInitCommonControlsEx = (void*)GetProcAddress(hComctl32, "InitCommonControlsEx"); - if (!pInitCommonControlsEx) - { - win_skip("InitCommonControlsEx() is missing.\n"); - return 0; - } - - iccex.dwSize = sizeof(iccex); - /* W2K and below need ICC_INTERNET_CLASSES for the IP Address Control */ - iccex.dwICC = ICC_INTERNET_CLASSES; - pInitCommonControlsEx(&iccex); - - return 1; -} - -START_TEST(ipaddress) -{ - if (!init()) - return; - - test_get_set_text(); -} diff --git a/rostests/winetests/comctl32/listview.c b/rostests/winetests/comctl32/listview.c deleted file mode 100644 index 6ef82bb359a..00000000000 --- a/rostests/winetests/comctl32/listview.c +++ /dev/null @@ -1,4614 +0,0 @@ -/* - * ListView tests - * - * Copyright 2006 Mike McCormack for CodeWeavers - * Copyright 2007 George Gov - * Copyright 2009 Nikolay Sivov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include -#include -#include - -#include "wine/test.h" -#include "v6util.h" -#include "msg.h" - -#define PARENT_SEQ_INDEX 0 -#define PARENT_FULL_SEQ_INDEX 1 -#define LISTVIEW_SEQ_INDEX 2 -#define EDITBOX_SEQ_INDEX 3 -#define COMBINED_SEQ_INDEX 4 -#define NUM_MSG_SEQUENCES 5 - -#define LISTVIEW_ID 0 -#define HEADER_ID 1 - -#define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got) -#define expect2(expected1, expected2, got1, got2) ok(expected1 == got1 && expected2 == got2, \ - "expected (%d,%d), got (%d,%d)\n", expected1, expected2, got1, got2) - -static const WCHAR testparentclassW[] = - {'L','i','s','t','v','i','e','w',' ','t','e','s','t',' ','p','a','r','e','n','t','W', 0}; - -static HWND hwndparent, hwndparentW; -/* prevents edit box creation, LVN_BEGINLABELEDIT return value */ -static BOOL blockEdit; -/* return nonzero on NM_HOVER */ -static BOOL g_block_hover; -/* dumps LVN_ITEMCHANGED message data */ -static BOOL g_dump_itemchanged; -/* format reported to control: - -1 falls to defproc, anything else returned */ -static INT notifyFormat; -/* indicates we're running < 5.80 version */ -static BOOL g_is_below_5; -/* item data passed to LVN_GETDISPINFOA */ -static LVITEMA g_itema; - -static HWND subclass_editbox(HWND hwndListview); - -static struct msg_sequence *sequences[NUM_MSG_SEQUENCES]; - -static const struct message create_ownerdrawfixed_parent_seq[] = { - { WM_NOTIFYFORMAT, sent }, - { WM_QUERYUISTATE, sent|optional }, /* Win2K and higher */ - { WM_MEASUREITEM, sent }, - { WM_PARENTNOTIFY, sent }, - { 0 } -}; - -static const struct message redraw_listview_seq[] = { - { WM_PAINT, sent|id, 0, 0, LISTVIEW_ID }, - { WM_PAINT, sent|id, 0, 0, HEADER_ID }, - { WM_NCPAINT, sent|id|defwinproc, 0, 0, HEADER_ID }, - { WM_ERASEBKGND, sent|id|defwinproc|optional, 0, 0, HEADER_ID }, - { WM_NOTIFY, sent|id|defwinproc, 0, 0, LISTVIEW_ID }, - { WM_NCPAINT, sent|id|defwinproc, 0, 0, LISTVIEW_ID }, - { WM_ERASEBKGND, sent|id|defwinproc|optional, 0, 0, LISTVIEW_ID }, - { 0 } -}; - -static const struct message listview_icon_spacing_seq[] = { - { LVM_SETICONSPACING, sent|lparam, 0, MAKELPARAM(20, 30) }, - { LVM_SETICONSPACING, sent|lparam, 0, MAKELPARAM(25, 35) }, - { LVM_SETICONSPACING, sent|lparam, 0, MAKELPARAM(-1, -1) }, - { 0 } -}; - -static const struct message listview_color_seq[] = { - { LVM_SETBKCOLOR, sent|lparam, 0, RGB(0,0,0) }, - { LVM_GETBKCOLOR, sent }, - { LVM_SETTEXTCOLOR, sent|lparam, 0, RGB(0,0,0) }, - { LVM_GETTEXTCOLOR, sent }, - { LVM_SETTEXTBKCOLOR, sent|lparam, 0, RGB(0,0,0) }, - { LVM_GETTEXTBKCOLOR, sent }, - - { LVM_SETBKCOLOR, sent|lparam, 0, RGB(100,50,200) }, - { LVM_GETBKCOLOR, sent }, - { LVM_SETTEXTCOLOR, sent|lparam, 0, RGB(100,50,200) }, - { LVM_GETTEXTCOLOR, sent }, - { LVM_SETTEXTBKCOLOR, sent|lparam, 0, RGB(100,50,200) }, - { LVM_GETTEXTBKCOLOR, sent }, - - { LVM_SETBKCOLOR, sent|lparam, 0, CLR_NONE }, - { LVM_GETBKCOLOR, sent }, - { LVM_SETTEXTCOLOR, sent|lparam, 0, CLR_NONE }, - { LVM_GETTEXTCOLOR, sent }, - { LVM_SETTEXTBKCOLOR, sent|lparam, 0, CLR_NONE }, - { LVM_GETTEXTBKCOLOR, sent }, - - { LVM_SETBKCOLOR, sent|lparam, 0, RGB(255,255,255) }, - { LVM_GETBKCOLOR, sent }, - { LVM_SETTEXTCOLOR, sent|lparam, 0, RGB(255,255,255) }, - { LVM_GETTEXTCOLOR, sent }, - { LVM_SETTEXTBKCOLOR, sent|lparam, 0, RGB(255,255,255) }, - { LVM_GETTEXTBKCOLOR, sent }, - { 0 } -}; - -static const struct message listview_item_count_seq[] = { - { LVM_GETITEMCOUNT, sent }, - { LVM_INSERTITEM, sent }, - { LVM_INSERTITEM, sent }, - { LVM_INSERTITEM, sent }, - { LVM_GETITEMCOUNT, sent }, - { LVM_DELETEITEM, sent|wparam, 2 }, - { WM_NCPAINT, sent|optional }, - { WM_ERASEBKGND, sent|optional }, - { LVM_GETITEMCOUNT, sent }, - { LVM_DELETEALLITEMS, sent }, - { LVM_GETITEMCOUNT, sent }, - { LVM_INSERTITEM, sent }, - { LVM_INSERTITEM, sent }, - { LVM_GETITEMCOUNT, sent }, - { LVM_INSERTITEM, sent }, - { LVM_GETITEMCOUNT, sent }, - { 0 } -}; - -static const struct message listview_itempos_seq[] = { - { LVM_INSERTITEM, sent }, - { LVM_INSERTITEM, sent }, - { LVM_INSERTITEM, sent }, - { LVM_SETITEMPOSITION, sent|wparam|lparam, 1, MAKELPARAM(10,5) }, - { WM_NCPAINT, sent|optional }, - { WM_ERASEBKGND, sent|optional }, - { LVM_GETITEMPOSITION, sent|wparam, 1 }, - { LVM_SETITEMPOSITION, sent|wparam|lparam, 2, MAKELPARAM(0,0) }, - { LVM_GETITEMPOSITION, sent|wparam, 2 }, - { LVM_SETITEMPOSITION, sent|wparam|lparam, 0, MAKELPARAM(20,20) }, - { LVM_GETITEMPOSITION, sent|wparam, 0 }, - { 0 } -}; - -static const struct message listview_ownerdata_switchto_seq[] = { - { WM_STYLECHANGING, sent }, - { WM_STYLECHANGED, sent }, - { 0 } -}; - -static const struct message listview_getorderarray_seq[] = { - { LVM_GETCOLUMNORDERARRAY, sent|id|wparam, 2, 0, LISTVIEW_ID }, - { HDM_GETORDERARRAY, sent|id|wparam, 2, 0, HEADER_ID }, - { 0 } -}; - -static const struct message empty_seq[] = { - { 0 } -}; - -static const struct message forward_erasebkgnd_parent_seq[] = { - { WM_ERASEBKGND, sent }, - { 0 } -}; - -static const struct message ownderdata_select_focus_parent_seq[] = { - { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGED }, - { WM_NOTIFY, sent|id, 0, 0, LVN_GETDISPINFOA }, - { WM_NOTIFY, sent|id|optional, 0, 0, LVN_GETDISPINFOA }, /* version 4.7x */ - { 0 } -}; - -static const struct message ownerdata_setstate_all_parent_seq[] = { - { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGED }, - { 0 } -}; - -static const struct message ownerdata_defocus_all_parent_seq[] = { - { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGED }, - { WM_NOTIFY, sent|id, 0, 0, LVN_GETDISPINFOA }, - { WM_NOTIFY, sent|id|optional, 0, 0, LVN_GETDISPINFOA }, - { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGED }, - { 0 } -}; - -static const struct message ownerdata_deselect_all_parent_seq[] = { - { WM_NOTIFY, sent|id, 0, 0, LVN_ODCACHEHINT }, - { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGED }, - { 0 } -}; - -static const struct message select_all_parent_seq[] = { - { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGING }, - { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGED }, - - { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGING }, - { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGED }, - - { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGING }, - { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGED }, - - { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGING }, - { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGED }, - - { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGING }, - { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGED }, - { 0 } -}; - -static const struct message textcallback_set_again_parent_seq[] = { - { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGING }, - { WM_NOTIFY, sent|id, 0, 0, LVN_ITEMCHANGED }, - { 0 } -}; - -static const struct message single_getdispinfo_parent_seq[] = { - { WM_NOTIFY, sent|id, 0, 0, LVN_GETDISPINFOA }, - { 0 } -}; - -static const struct message getitemposition_seq1[] = { - { LVM_GETITEMPOSITION, sent|id, 0, 0, LISTVIEW_ID }, - { 0 } -}; - -static const struct message getitemposition_seq2[] = { - { LVM_GETITEMPOSITION, sent|id, 0, 0, LISTVIEW_ID }, - { HDM_GETITEMRECT, sent|id, 0, 0, HEADER_ID }, - { 0 } -}; - -static const struct message editbox_create_pos[] = { - /* sequence sent after LVN_BEGINLABELEDIT */ - /* next two are 4.7x specific */ - { WM_WINDOWPOSCHANGING, sent }, - { WM_WINDOWPOSCHANGED, sent|optional }, - - { WM_WINDOWPOSCHANGING, sent|optional }, - { WM_NCCALCSIZE, sent }, - { WM_WINDOWPOSCHANGED, sent }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|defwinproc }, - /* the rest is todo, skipped in 4.7x */ - { WM_WINDOWPOSCHANGING, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|optional }, - { 0 } -}; - -static const struct message scroll_parent_seq[] = { - { WM_NOTIFY, sent|id, 0, 0, LVN_BEGINSCROLL }, - { WM_NOTIFY, sent|id, 0, 0, LVN_ENDSCROLL }, - { 0 } -}; - -static const struct message setredraw_seq[] = { - { WM_SETREDRAW, sent|id|wparam, FALSE, 0, LISTVIEW_ID }, - { 0 } -}; - -static const struct message lvs_ex_transparentbkgnd_seq[] = { - { WM_PRINTCLIENT, sent|lparam, 0, PRF_ERASEBKGND }, - { 0 } -}; - -static const struct message edit_end_nochange[] = { - { WM_NOTIFY, sent|id, 0, 0, LVN_ENDLABELEDITA }, - { WM_NOTIFY, sent|id, 0, 0, NM_CUSTOMDRAW }, /* todo */ - { WM_NOTIFY, sent|id, 0, 0, NM_SETFOCUS }, - { 0 } -}; - -static const struct message hover_parent[] = { - { WM_GETDLGCODE, sent }, /* todo_wine */ - { WM_NOTIFY, sent|id, 0, 0, NM_HOVER }, - { 0 } -}; - -static const struct message listview_destroy[] = { - { 0x0090, sent|optional }, /* Vista */ - { WM_PARENTNOTIFY, sent }, - { WM_SHOWWINDOW, sent }, - { WM_WINDOWPOSCHANGING, sent }, - { WM_WINDOWPOSCHANGED, sent|optional }, - { WM_DESTROY, sent }, - { WM_NOTIFY, sent|id, 0, 0, LVN_DELETEALLITEMS }, - { WM_NCDESTROY, sent }, - { 0 } -}; - -static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - static LONG defwndproc_counter = 0; - LRESULT ret; - struct message msg; - - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - if (message == WM_NOTIFY && lParam) msg.id = ((NMHDR*)lParam)->code; - - /* log system messages, except for painting */ - if (message < WM_USER && - message != WM_PAINT && - message != WM_ERASEBKGND && - message != WM_NCPAINT && - message != WM_NCHITTEST && - message != WM_GETTEXT && - message != WM_GETICON && - message != WM_DEVICECHANGE) - { - trace("parent: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); - - add_message(sequences, PARENT_SEQ_INDEX, &msg); - add_message(sequences, COMBINED_SEQ_INDEX, &msg); - } - add_message(sequences, PARENT_FULL_SEQ_INDEX, &msg); - - switch (message) - { - case WM_NOTIFY: - { - switch (((NMHDR*)lParam)->code) - { - case LVN_BEGINLABELEDIT: - /* subclass edit box */ - if (!blockEdit) - subclass_editbox(((NMHDR*)lParam)->hwndFrom); - - return blockEdit; - - case LVN_ENDLABELEDIT: - { - /* always accept new item text */ - NMLVDISPINFO *di = (NMLVDISPINFO*)lParam; - trace("LVN_ENDLABELEDIT: text=%s\n", di->item.pszText); - return TRUE; - } - case LVN_BEGINSCROLL: - case LVN_ENDSCROLL: - { - NMLVSCROLL *pScroll = (NMLVSCROLL*)lParam; - - trace("LVN_%sSCROLL: (%d,%d)\n", pScroll->hdr.code == LVN_BEGINSCROLL ? - "BEGIN" : "END", pScroll->dx, pScroll->dy); - } - break; - case LVN_ITEMCHANGED: - if (g_dump_itemchanged) - { - NMLISTVIEW *nmlv = (NMLISTVIEW*)lParam; - trace("LVN_ITEMCHANGED: item=%d,new=%x,old=%x,changed=%x\n", - nmlv->iItem, nmlv->uNewState, nmlv->uOldState, nmlv->uChanged); - } - break; - case LVN_GETDISPINFOA: - { - NMLVDISPINFOA *dispinfo = (NMLVDISPINFOA*)lParam; - g_itema = dispinfo->item; - } - break; - case NM_HOVER: - if (g_block_hover) return 1; - break; - } - break; - } - case WM_NOTIFYFORMAT: - { - /* force to return format */ - if (lParam == NF_QUERY && notifyFormat != -1) return notifyFormat; - break; - } - } - - defwndproc_counter++; - ret = DefWindowProcA(hwnd, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static BOOL register_parent_wnd_class(BOOL Unicode) -{ - WNDCLASSA clsA; - WNDCLASSW clsW; - - if (Unicode) - { - clsW.style = 0; - clsW.lpfnWndProc = parent_wnd_proc; - clsW.cbClsExtra = 0; - clsW.cbWndExtra = 0; - clsW.hInstance = GetModuleHandleW(NULL); - clsW.hIcon = 0; - clsW.hCursor = LoadCursorA(0, IDC_ARROW); - clsW.hbrBackground = GetStockObject(WHITE_BRUSH); - clsW.lpszMenuName = NULL; - clsW.lpszClassName = testparentclassW; - } - else - { - clsA.style = 0; - clsA.lpfnWndProc = parent_wnd_proc; - clsA.cbClsExtra = 0; - clsA.cbWndExtra = 0; - clsA.hInstance = GetModuleHandleA(NULL); - clsA.hIcon = 0; - clsA.hCursor = LoadCursorA(0, IDC_ARROW); - clsA.hbrBackground = GetStockObject(WHITE_BRUSH); - clsA.lpszMenuName = NULL; - clsA.lpszClassName = "Listview test parent class"; - } - - return Unicode ? RegisterClassW(&clsW) : RegisterClassA(&clsA); -} - -static HWND create_parent_window(BOOL Unicode) -{ - static const WCHAR nameW[] = {'t','e','s','t','p','a','r','e','n','t','n','a','m','e','W',0}; - HWND hwnd; - - if (!register_parent_wnd_class(Unicode)) - return NULL; - - blockEdit = FALSE; - notifyFormat = -1; - - if (Unicode) - hwnd = CreateWindowExW(0, testparentclassW, nameW, - WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | - WS_MAXIMIZEBOX | WS_VISIBLE, - 0, 0, 100, 100, - GetDesktopWindow(), NULL, GetModuleHandleW(NULL), NULL); - else - hwnd = CreateWindowExA(0, "Listview test parent class", - "Listview test parent window", - WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | - WS_MAXIMIZEBOX | WS_VISIBLE, - 0, 0, 100, 100, - GetDesktopWindow(), NULL, GetModuleHandleA(NULL), NULL); - SetWindowPos( hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE ); - return hwnd; -} - -static LRESULT WINAPI listview_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - WNDPROC oldproc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA); - static LONG defwndproc_counter = 0; - LRESULT ret; - struct message msg; - - trace("listview: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); - - /* some debug output for style changing */ - if ((message == WM_STYLECHANGING || - message == WM_STYLECHANGED) && lParam) - { - STYLESTRUCT *style = (STYLESTRUCT*)lParam; - trace("\told style: 0x%08x, new style: 0x%08x\n", style->styleOld, style->styleNew); - } - - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - msg.id = LISTVIEW_ID; - add_message(sequences, LISTVIEW_SEQ_INDEX, &msg); - add_message(sequences, COMBINED_SEQ_INDEX, &msg); - - defwndproc_counter++; - ret = CallWindowProcA(oldproc, hwnd, message, wParam, lParam); - defwndproc_counter--; - return ret; -} - -static HWND create_listview_control(DWORD style) -{ - WNDPROC oldproc; - HWND hwnd; - RECT rect; - - GetClientRect(hwndparent, &rect); - hwnd = CreateWindowExA(0, WC_LISTVIEW, "foo", - WS_CHILD | WS_BORDER | WS_VISIBLE | style, - 0, 0, rect.right, rect.bottom, - hwndparent, NULL, GetModuleHandleA(NULL), NULL); - ok(hwnd != NULL, "gle=%d\n", GetLastError()); - - if (!hwnd) return NULL; - - oldproc = (WNDPROC)SetWindowLongPtrA(hwnd, GWLP_WNDPROC, - (LONG_PTR)listview_subclass_proc); - SetWindowLongPtrA(hwnd, GWLP_USERDATA, (LONG_PTR)oldproc); - - return hwnd; -} - -/* unicode listview window with specified parent */ -static HWND create_listview_controlW(DWORD style, HWND parent) -{ - WNDPROC oldproc; - HWND hwnd; - RECT rect; - static const WCHAR nameW[] = {'f','o','o',0}; - - GetClientRect(parent, &rect); - hwnd = CreateWindowExW(0, WC_LISTVIEWW, nameW, - WS_CHILD | WS_BORDER | WS_VISIBLE | style, - 0, 0, rect.right, rect.bottom, - parent, NULL, GetModuleHandleW(NULL), NULL); - ok(hwnd != NULL, "gle=%d\n", GetLastError()); - - if (!hwnd) return NULL; - - oldproc = (WNDPROC)SetWindowLongPtrW(hwnd, GWLP_WNDPROC, - (LONG_PTR)listview_subclass_proc); - SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR)oldproc); - - return hwnd; -} - -static LRESULT WINAPI header_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - WNDPROC oldproc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA); - static LONG defwndproc_counter = 0; - LRESULT ret; - struct message msg; - - trace("header: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); - - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - msg.id = HEADER_ID; - add_message(sequences, LISTVIEW_SEQ_INDEX, &msg); - - defwndproc_counter++; - ret = CallWindowProcA(oldproc, hwnd, message, wParam, lParam); - defwndproc_counter--; - return ret; -} - -static HWND subclass_header(HWND hwndListview) -{ - WNDPROC oldproc; - HWND hwnd; - - hwnd = ListView_GetHeader(hwndListview); - oldproc = (WNDPROC)SetWindowLongPtrA(hwnd, GWLP_WNDPROC, - (LONG_PTR)header_subclass_proc); - SetWindowLongPtrA(hwnd, GWLP_USERDATA, (LONG_PTR)oldproc); - - return hwnd; -} - -static LRESULT WINAPI editbox_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - WNDPROC oldproc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA); - static LONG defwndproc_counter = 0; - LRESULT ret; - struct message msg; - - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - - /* all we need is sizing */ - if (message == WM_WINDOWPOSCHANGING || - message == WM_NCCALCSIZE || - message == WM_WINDOWPOSCHANGED || - message == WM_MOVE || - message == WM_SIZE) - { - add_message(sequences, EDITBOX_SEQ_INDEX, &msg); - } - - defwndproc_counter++; - ret = CallWindowProcA(oldproc, hwnd, message, wParam, lParam); - defwndproc_counter--; - return ret; -} - -static HWND subclass_editbox(HWND hwndListview) -{ - WNDPROC oldproc; - HWND hwnd; - - hwnd = (HWND)SendMessage(hwndListview, LVM_GETEDITCONTROL, 0, 0); - oldproc = (WNDPROC)SetWindowLongPtrA(hwnd, GWLP_WNDPROC, - (LONG_PTR)editbox_subclass_proc); - SetWindowLongPtrA(hwnd, GWLP_USERDATA, (LONG_PTR)oldproc); - - return hwnd; -} - -/* Performs a single LVM_HITTEST test */ -static void test_lvm_hittest_(HWND hwnd, INT x, INT y, INT item, UINT flags, UINT broken_flags, - BOOL todo_item, BOOL todo_flags, int line) -{ - LVHITTESTINFO lpht; - DWORD ret; - - lpht.pt.x = x; - lpht.pt.y = y; - lpht.iSubItem = 10; - - trace("hittesting pt=(%d,%d)\n", lpht.pt.x, lpht.pt.y); - ret = SendMessage(hwnd, LVM_HITTEST, 0, (LPARAM)&lpht); - - if (todo_item) - { - todo_wine - { - ok_(__FILE__, line)(ret == item, "Expected %d retval, got %d\n", item, ret); - ok_(__FILE__, line)(lpht.iItem == item, "Expected %d item, got %d\n", item, lpht.iItem); - ok_(__FILE__, line)(lpht.iSubItem == 10, "Expected subitem not overwrited\n"); - } - } - else - { - ok_(__FILE__, line)(ret == item, "Expected %d retval, got %d\n", item, ret); - ok_(__FILE__, line)(lpht.iItem == item, "Expected %d item, got %d\n", item, lpht.iItem); - ok_(__FILE__, line)(lpht.iSubItem == 10, "Expected subitem not overwrited\n"); - } - - if (todo_flags) - { - todo_wine - ok_(__FILE__, line)(lpht.flags == flags, "Expected flags 0x%x, got 0x%x\n", flags, lpht.flags); - } - else if (broken_flags) - ok_(__FILE__, line)(lpht.flags == flags || broken(lpht.flags == broken_flags), - "Expected flags %x, got %x\n", flags, lpht.flags); - else - ok_(__FILE__, line)(lpht.flags == flags, "Expected flags 0x%x, got 0x%x\n", flags, lpht.flags); -} - -#define test_lvm_hittest(a,b,c,d,e,f,g,h) test_lvm_hittest_(a,b,c,d,e,f,g,h,__LINE__) - -/* Performs a single LVM_SUBITEMHITTEST test */ -static void test_lvm_subitemhittest_(HWND hwnd, INT x, INT y, INT item, INT subitem, UINT flags, - BOOL todo_item, BOOL todo_subitem, BOOL todo_flags, int line) -{ - LVHITTESTINFO lpht; - DWORD ret; - - lpht.pt.x = x; - lpht.pt.y = y; - - trace("subhittesting pt=(%d,%d)\n", lpht.pt.x, lpht.pt.y); - ret = SendMessage(hwnd, LVM_SUBITEMHITTEST, 0, (LPARAM)&lpht); - - if (todo_item) - { - todo_wine - { - ok_(__FILE__, line)(ret == item, "Expected %d retval, got %d\n", item, ret); - ok_(__FILE__, line)(lpht.iItem == item, "Expected %d item, got %d\n", item, lpht.iItem); - } - } - else - { - ok_(__FILE__, line)(ret == item, "Expected %d retval, got %d\n", item, ret); - ok_(__FILE__, line)(lpht.iItem == item, "Expected %d item, got %d\n", item, lpht.iItem); - } - - if (todo_subitem) - { - todo_wine - ok_(__FILE__, line)(lpht.iSubItem == subitem, "Expected subitem %d, got %d\n", subitem, lpht.iSubItem); - } - else - ok_(__FILE__, line)(lpht.iSubItem == subitem, "Expected subitem %d, got %d\n", subitem, lpht.iSubItem); - - if (todo_flags) - { - todo_wine - ok_(__FILE__, line)(lpht.flags == flags, "Expected flags 0x%x, got 0x%x\n", flags, lpht.flags); - } - else - ok_(__FILE__, line)(lpht.flags == flags, "Expected flags 0x%x, got 0x%x\n", flags, lpht.flags); -} - -#define test_lvm_subitemhittest(a,b,c,d,e,f,g,h,i) test_lvm_subitemhittest_(a,b,c,d,e,f,g,h,i,__LINE__) - -static void test_images(void) -{ - HWND hwnd; - DWORD r; - LVITEM item; - HIMAGELIST himl; - HBITMAP hbmp; - RECT r1, r2; - static CHAR hello[] = "hello"; - - himl = ImageList_Create(40, 40, 0, 4, 4); - ok(himl != NULL, "failed to create imagelist\n"); - - hbmp = CreateBitmap(40, 40, 1, 1, NULL); - ok(hbmp != NULL, "failed to create bitmap\n"); - - r = ImageList_Add(himl, hbmp, 0); - ok(r == 0, "should be zero\n"); - - hwnd = CreateWindowEx(0, "SysListView32", "foo", LVS_OWNERDRAWFIXED, - 10, 10, 100, 200, hwndparent, NULL, NULL, NULL); - ok(hwnd != NULL, "failed to create listview window\n"); - - r = SendMessage(hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, - LVS_EX_UNDERLINEHOT | LVS_EX_FLATSB | LVS_EX_ONECLICKACTIVATE); - - ok(r == 0, "should return zero\n"); - - r = SendMessage(hwnd, LVM_SETIMAGELIST, 0, (LPARAM)himl); - ok(r == 0, "should return zero\n"); - - r = SendMessage(hwnd, LVM_SETICONSPACING, 0, MAKELONG(100,50)); - /* returns dimensions */ - - r = SendMessage(hwnd, LVM_GETITEMCOUNT, 0, 0); - ok(r == 0, "should be zero items\n"); - - item.mask = LVIF_IMAGE | LVIF_TEXT; - item.iItem = 0; - item.iSubItem = 1; - item.iImage = 0; - item.pszText = 0; - r = SendMessage(hwnd, LVM_INSERTITEM, 0, (LPARAM) &item); - ok(r == -1, "should fail\n"); - - item.iSubItem = 0; - item.pszText = hello; - r = SendMessage(hwnd, LVM_INSERTITEM, 0, (LPARAM) &item); - ok(r == 0, "should not fail\n"); - - memset(&r1, 0, sizeof r1); - r1.left = LVIR_ICON; - r = SendMessage(hwnd, LVM_GETITEMRECT, 0, (LPARAM) &r1); - - r = SendMessage(hwnd, LVM_DELETEALLITEMS, 0, 0); - ok(r == TRUE, "should not fail\n"); - - item.iSubItem = 0; - item.pszText = hello; - r = SendMessage(hwnd, LVM_INSERTITEM, 0, (LPARAM) &item); - ok(r == 0, "should not fail\n"); - - memset(&r2, 0, sizeof r2); - r2.left = LVIR_ICON; - r = SendMessage(hwnd, LVM_GETITEMRECT, 0, (LPARAM) &r2); - - ok(!memcmp(&r1, &r2, sizeof r1), "rectangle should be the same\n"); - - DestroyWindow(hwnd); -} - -static void test_checkboxes(void) -{ - HWND hwnd; - LVITEMA item; - DWORD r; - static CHAR text[] = "Text", - text2[] = "Text2", - text3[] = "Text3"; - - hwnd = CreateWindowEx(0, "SysListView32", "foo", LVS_REPORT, - 10, 10, 100, 200, hwndparent, NULL, NULL, NULL); - ok(hwnd != NULL, "failed to create listview window\n"); - - /* first without LVS_EX_CHECKBOXES set and an item and check that state is preserved */ - item.mask = LVIF_TEXT | LVIF_STATE; - item.stateMask = 0xffff; - item.state = 0xfccc; - item.iItem = 0; - item.iSubItem = 0; - item.pszText = text; - r = SendMessage(hwnd, LVM_INSERTITEMA, 0, (LPARAM) &item); - ok(r == 0, "ret %d\n", r); - - item.iItem = 0; - item.mask = LVIF_STATE; - item.stateMask = 0xffff; - r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); - ok(item.state == 0xfccc, "state %x\n", item.state); - - /* Don't set LVIF_STATE */ - item.mask = LVIF_TEXT; - item.stateMask = 0xffff; - item.state = 0xfccc; - item.iItem = 1; - item.iSubItem = 0; - item.pszText = text; - r = SendMessage(hwnd, LVM_INSERTITEMA, 0, (LPARAM) &item); - ok(r == 1, "ret %d\n", r); - - item.iItem = 1; - item.mask = LVIF_STATE; - item.stateMask = 0xffff; - r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); - ok(item.state == 0, "state %x\n", item.state); - - r = SendMessage(hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_CHECKBOXES, LVS_EX_CHECKBOXES); - ok(r == 0, "should return zero\n"); - - /* Having turned on checkboxes, check that all existing items are set to 0x1000 (unchecked) */ - item.iItem = 0; - item.mask = LVIF_STATE; - item.stateMask = 0xffff; - r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); - if (item.state != 0x1ccc) - { - win_skip("LVS_EX_CHECKBOXES style is unavailable. Skipping.\n"); - DestroyWindow(hwnd); - return; - } - - /* Now add an item without specifying a state and check that its state goes to 0x1000 */ - item.iItem = 2; - item.mask = LVIF_TEXT; - item.state = 0; - item.pszText = text2; - r = SendMessage(hwnd, LVM_INSERTITEMA, 0, (LPARAM) &item); - ok(r == 2, "ret %d\n", r); - - item.iItem = 2; - item.mask = LVIF_STATE; - item.stateMask = 0xffff; - r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); - ok(item.state == 0x1000, "state %x\n", item.state); - - /* Add a further item this time specifying a state and still its state goes to 0x1000 */ - item.iItem = 3; - item.mask = LVIF_TEXT | LVIF_STATE; - item.stateMask = 0xffff; - item.state = 0x2aaa; - item.pszText = text3; - r = SendMessage(hwnd, LVM_INSERTITEMA, 0, (LPARAM) &item); - ok(r == 3, "ret %d\n", r); - - item.iItem = 3; - item.mask = LVIF_STATE; - item.stateMask = 0xffff; - r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); - ok(item.state == 0x1aaa, "state %x\n", item.state); - - /* Set an item's state to checked */ - item.iItem = 3; - item.mask = LVIF_STATE; - item.stateMask = 0xf000; - item.state = 0x2000; - r = SendMessage(hwnd, LVM_SETITEMA, 0, (LPARAM) &item); - - item.iItem = 3; - item.mask = LVIF_STATE; - item.stateMask = 0xffff; - r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); - ok(item.state == 0x2aaa, "state %x\n", item.state); - - /* Check that only the bits we asked for are returned, - * and that all the others are set to zero - */ - item.iItem = 3; - item.mask = LVIF_STATE; - item.stateMask = 0xf000; - item.state = 0xffff; - r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); - ok(item.state == 0x2000, "state %x\n", item.state); - - /* Set the style again and check that doesn't change an item's state */ - r = SendMessage(hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_CHECKBOXES, LVS_EX_CHECKBOXES); - ok(r == LVS_EX_CHECKBOXES, "ret %x\n", r); - - item.iItem = 3; - item.mask = LVIF_STATE; - item.stateMask = 0xffff; - r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); - ok(item.state == 0x2aaa, "state %x\n", item.state); - - /* Unsetting the checkbox extended style doesn't change an item's state */ - r = SendMessage(hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_CHECKBOXES, 0); - ok(r == LVS_EX_CHECKBOXES, "ret %x\n", r); - - item.iItem = 3; - item.mask = LVIF_STATE; - item.stateMask = 0xffff; - r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); - ok(item.state == 0x2aaa, "state %x\n", item.state); - - /* Now setting the style again will change an item's state */ - r = SendMessage(hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_CHECKBOXES, LVS_EX_CHECKBOXES); - ok(r == 0, "ret %x\n", r); - - item.iItem = 3; - item.mask = LVIF_STATE; - item.stateMask = 0xffff; - r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); - ok(item.state == 0x1aaa, "state %x\n", item.state); - - /* Toggle checkbox tests (bug 9934) */ - memset (&item, 0xcc, sizeof(item)); - item.mask = LVIF_STATE; - item.iItem = 3; - item.iSubItem = 0; - item.state = LVIS_FOCUSED; - item.stateMask = LVIS_FOCUSED; - r = SendMessage(hwnd, LVM_SETITEM, 0, (LPARAM) &item); - expect(1, r); - - item.iItem = 3; - item.mask = LVIF_STATE; - item.stateMask = 0xffff; - r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); - ok(item.state == 0x1aab, "state %x\n", item.state); - - r = SendMessage(hwnd, WM_KEYDOWN, VK_SPACE, 0); - expect(0, r); - r = SendMessage(hwnd, WM_KEYUP, VK_SPACE, 0); - expect(0, r); - - item.iItem = 3; - item.mask = LVIF_STATE; - item.stateMask = 0xffff; - r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); - ok(item.state == 0x2aab, "state %x\n", item.state); - - r = SendMessage(hwnd, WM_KEYDOWN, VK_SPACE, 0); - expect(0, r); - r = SendMessage(hwnd, WM_KEYUP, VK_SPACE, 0); - expect(0, r); - - item.iItem = 3; - item.mask = LVIF_STATE; - item.stateMask = 0xffff; - r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); - ok(item.state == 0x1aab, "state %x\n", item.state); - - DestroyWindow(hwnd); -} - -static void insert_column(HWND hwnd, int idx) -{ - LVCOLUMN column; - DWORD rc; - - memset(&column, 0xcc, sizeof(column)); - column.mask = LVCF_SUBITEM; - column.iSubItem = idx; - - rc = ListView_InsertColumn(hwnd, idx, &column); - expect(idx, rc); -} - -static void insert_item(HWND hwnd, int idx) -{ - static CHAR text[] = "foo"; - - LVITEMA item; - DWORD rc; - - memset(&item, 0xcc, sizeof (item)); - item.mask = LVIF_TEXT; - item.iItem = idx; - item.iSubItem = 0; - item.pszText = text; - - rc = ListView_InsertItem(hwnd, &item); - expect(idx, rc); -} - -static void test_items(void) -{ - const LPARAM lparamTest = 0x42; - HWND hwnd; - LVITEMA item; - DWORD r; - static CHAR text[] = "Text"; - - hwnd = CreateWindowEx(0, "SysListView32", "foo", LVS_REPORT, - 10, 10, 100, 200, hwndparent, NULL, NULL, NULL); - ok(hwnd != NULL, "failed to create listview window\n"); - - /* - * Test setting/getting item params - */ - - /* Set up two columns */ - insert_column(hwnd, 0); - insert_column(hwnd, 1); - - /* LVIS_SELECTED with zero stateMask */ - /* set */ - memset (&item, 0, sizeof (item)); - item.mask = LVIF_STATE; - item.state = LVIS_SELECTED; - item.stateMask = 0; - item.iItem = 0; - item.iSubItem = 0; - r = SendMessage(hwnd, LVM_INSERTITEMA, 0, (LPARAM) &item); - ok(r == 0, "ret %d\n", r); - /* get */ - memset (&item, 0xcc, sizeof (item)); - item.mask = LVIF_STATE; - item.stateMask = LVIS_SELECTED; - item.state = 0; - item.iItem = 0; - item.iSubItem = 0; - r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); - ok(r != 0, "ret %d\n", r); - ok(item.state & LVIS_SELECTED, "Expected LVIS_SELECTED\n"); - SendMessage(hwnd, LVM_DELETEITEM, 0, 0); - - /* LVIS_SELECTED with zero stateMask */ - /* set */ - memset (&item, 0, sizeof (item)); - item.mask = LVIF_STATE; - item.state = LVIS_FOCUSED; - item.stateMask = 0; - item.iItem = 0; - item.iSubItem = 0; - r = SendMessage(hwnd, LVM_INSERTITEMA, 0, (LPARAM) &item); - ok(r == 0, "ret %d\n", r); - /* get */ - memset (&item, 0xcc, sizeof (item)); - item.mask = LVIF_STATE; - item.stateMask = LVIS_FOCUSED; - item.state = 0; - item.iItem = 0; - item.iSubItem = 0; - r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); - ok(r != 0, "ret %d\n", r); - ok(item.state & LVIS_FOCUSED, "Expected LVIS_FOCUSED\n"); - SendMessage(hwnd, LVM_DELETEITEM, 0, 0); - - /* LVIS_CUT with LVIS_FOCUSED stateMask */ - /* set */ - memset (&item, 0, sizeof (item)); - item.mask = LVIF_STATE; - item.state = LVIS_CUT; - item.stateMask = LVIS_FOCUSED; - item.iItem = 0; - item.iSubItem = 0; - r = SendMessage(hwnd, LVM_INSERTITEMA, 0, (LPARAM) &item); - ok(r == 0, "ret %d\n", r); - /* get */ - memset (&item, 0xcc, sizeof (item)); - item.mask = LVIF_STATE; - item.stateMask = LVIS_CUT; - item.state = 0; - item.iItem = 0; - item.iSubItem = 0; - r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); - ok(r != 0, "ret %d\n", r); - ok(item.state & LVIS_CUT, "Expected LVIS_CUT\n"); - SendMessage(hwnd, LVM_DELETEITEM, 0, 0); - - /* Insert an item with just a param */ - memset (&item, 0xcc, sizeof (item)); - item.mask = LVIF_PARAM; - item.iItem = 0; - item.iSubItem = 0; - item.lParam = lparamTest; - r = SendMessage(hwnd, LVM_INSERTITEMA, 0, (LPARAM) &item); - ok(r == 0, "ret %d\n", r); - - /* Test getting of the param */ - memset (&item, 0xcc, sizeof (item)); - item.mask = LVIF_PARAM; - item.iItem = 0; - item.iSubItem = 0; - r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); - ok(r != 0, "ret %d\n", r); - ok(item.lParam == lparamTest, "got lParam %lx, expected %lx\n", item.lParam, lparamTest); - - /* Set up a subitem */ - memset (&item, 0xcc, sizeof (item)); - item.mask = LVIF_TEXT; - item.iItem = 0; - item.iSubItem = 1; - item.pszText = text; - r = SendMessage(hwnd, LVM_SETITEMA, 0, (LPARAM) &item); - ok(r != 0, "ret %d\n", r); - - /* Query param from subitem: returns main item param */ - memset (&item, 0xcc, sizeof (item)); - item.mask = LVIF_PARAM; - item.iItem = 0; - item.iSubItem = 1; - r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); - ok(r != 0, "ret %d\n", r); - ok(item.lParam == lparamTest, "got lParam %lx, expected %lx\n", item.lParam, lparamTest); - - /* Set up param on first subitem: no effect */ - memset (&item, 0xcc, sizeof (item)); - item.mask = LVIF_PARAM; - item.iItem = 0; - item.iSubItem = 1; - item.lParam = lparamTest+1; - r = SendMessage(hwnd, LVM_SETITEMA, 0, (LPARAM) &item); - ok(r == 0, "ret %d\n", r); - - /* Query param from subitem again: should still return main item param */ - memset (&item, 0xcc, sizeof (item)); - item.mask = LVIF_PARAM; - item.iItem = 0; - item.iSubItem = 1; - r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); - ok(r != 0, "ret %d\n", r); - ok(item.lParam == lparamTest, "got lParam %lx, expected %lx\n", item.lParam, lparamTest); - - /**** Some tests of state highlighting ****/ - memset (&item, 0xcc, sizeof (item)); - item.mask = LVIF_STATE; - item.iItem = 0; - item.iSubItem = 0; - item.state = LVIS_SELECTED; - item.stateMask = LVIS_SELECTED | LVIS_DROPHILITED; - r = SendMessage(hwnd, LVM_SETITEM, 0, (LPARAM) &item); - ok(r != 0, "ret %d\n", r); - item.iSubItem = 1; - item.state = LVIS_DROPHILITED; - r = SendMessage(hwnd, LVM_SETITEM, 0, (LPARAM) &item); - ok(r != 0, "ret %d\n", r); - - memset (&item, 0xcc, sizeof (item)); - item.mask = LVIF_STATE; - item.iItem = 0; - item.iSubItem = 0; - item.stateMask = -1; - r = SendMessage(hwnd, LVM_GETITEM, 0, (LPARAM) &item); - ok(r != 0, "ret %d\n", r); - ok(item.state == LVIS_SELECTED, "got state %x, expected %x\n", item.state, LVIS_SELECTED); - item.iSubItem = 1; - r = SendMessage(hwnd, LVM_GETITEM, 0, (LPARAM) &item); - ok(r != 0, "ret %d\n", r); - todo_wine ok(item.state == LVIS_DROPHILITED, "got state %x, expected %x\n", item.state, LVIS_DROPHILITED); - - /* some notnull but meaningless masks */ - memset (&item, 0, sizeof(item)); - item.mask = LVIF_NORECOMPUTE; - item.iItem = 0; - item.iSubItem = 0; - r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); - ok(r != 0, "ret %d\n", r); - memset (&item, 0, sizeof(item)); - item.mask = LVIF_DI_SETITEM; - item.iItem = 0; - item.iSubItem = 0; - r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM) &item); - ok(r != 0, "ret %d\n", r); - - /* set text to callback value already having it */ - r = SendMessage(hwnd, LVM_DELETEALLITEMS, 0, 0); - expect(TRUE, r); - memset (&item, 0, sizeof (item)); - item.mask = LVIF_TEXT; - item.pszText = LPSTR_TEXTCALLBACK; - item.iItem = 0; - r = SendMessage(hwnd, LVM_INSERTITEMA, 0, (LPARAM) &item); - ok(r == 0, "ret %d\n", r); - memset (&item, 0, sizeof (item)); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - item.pszText = LPSTR_TEXTCALLBACK; - r = SendMessage(hwnd, LVM_SETITEMTEXT, 0 , (LPARAM) &item); - expect(TRUE, r); - - ok_sequence(sequences, PARENT_SEQ_INDEX, textcallback_set_again_parent_seq, - "check callback text comparison rule", FALSE); - - DestroyWindow(hwnd); -} - -static void test_columns(void) -{ - HWND hwnd; - LVCOLUMNA column; - LVITEMA item; - INT order[2]; - CHAR buff[5]; - DWORD rc; - - hwnd = CreateWindowExA(0, "SysListView32", "foo", LVS_REPORT, - 10, 10, 100, 200, hwndparent, NULL, NULL, NULL); - ok(hwnd != NULL, "failed to create listview window\n"); - - /* Add a column with no mask */ - memset(&column, 0xcc, sizeof(column)); - column.mask = 0; - rc = SendMessageA(hwnd, LVM_INSERTCOLUMNA, 0, (LPARAM)&column); - ok(rc == 0, "Inserting column with no mask failed with %d\n", rc); - - /* Check its width */ - rc = SendMessageA(hwnd, LVM_GETCOLUMNWIDTH, 0, 0); - ok(rc == 10 || broken(rc == 0) /* win9x */, - "Inserting column with no mask failed to set width to 10 with %d\n", rc); - - DestroyWindow(hwnd); - - /* LVM_GETCOLUMNORDERARRAY */ - hwnd = create_listview_control(LVS_REPORT); - subclass_header(hwnd); - - memset(&column, 0, sizeof(column)); - column.mask = LVCF_WIDTH; - column.cx = 100; - rc = SendMessageA(hwnd, LVM_INSERTCOLUMNA, 0, (LPARAM)&column); - ok(rc == 0, "Inserting column failed with %d\n", rc); - - column.cx = 200; - rc = SendMessageA(hwnd, LVM_INSERTCOLUMNA, 1, (LPARAM)&column); - ok(rc == 1, "Inserting column failed with %d\n", rc); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - rc = SendMessageA(hwnd, LVM_GETCOLUMNORDERARRAY, 2, (LPARAM)&order); - ok(rc == 1, "Expected LVM_GETCOLUMNORDERARRAY to succeed\n"); - ok(order[0] == 0, "Expected order 0, got %d\n", order[0]); - ok(order[1] == 1, "Expected order 1, got %d\n", order[1]); - - ok_sequence(sequences, LISTVIEW_SEQ_INDEX, listview_getorderarray_seq, "get order array", FALSE); - - /* after column added subitem is considered as present */ - insert_item(hwnd, 0); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - item.pszText = buff; - item.cchTextMax = sizeof(buff); - item.iItem = 0; - item.iSubItem = 1; - item.mask = LVIF_TEXT; - memset(&g_itema, 0, sizeof(g_itema)); - rc = SendMessageA(hwnd, LVM_GETITEMA, 0, (LPARAM)&item); - ok(rc == 1, "got %d\n", rc); - ok(g_itema.iSubItem == 1, "got %d\n", g_itema.iSubItem); - - ok_sequence(sequences, PARENT_SEQ_INDEX, single_getdispinfo_parent_seq, - "get subitem text after column added", FALSE); - - DestroyWindow(hwnd); -} - -/* test setting imagelist between WM_NCCREATE and WM_CREATE */ -static WNDPROC listviewWndProc; -static HIMAGELIST test_create_imagelist; - -static LRESULT CALLBACK create_test_wndproc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - LRESULT ret; - - if (uMsg == WM_CREATE) - { - LPCREATESTRUCT lpcs = (LPCREATESTRUCT)lParam; - lpcs->style |= LVS_REPORT; - } - ret = CallWindowProc(listviewWndProc, hwnd, uMsg, wParam, lParam); - if (uMsg == WM_CREATE) SendMessage(hwnd, LVM_SETIMAGELIST, 0, (LPARAM)test_create_imagelist); - return ret; -} - -static void test_create(void) -{ - HWND hList; - HWND hHeader; - LONG_PTR ret; - LONG r; - LVCOLUMNA col; - RECT rect; - WNDCLASSEX cls; - DWORD style; - - cls.cbSize = sizeof(WNDCLASSEX); - ok(GetClassInfoEx(GetModuleHandle(NULL), "SysListView32", &cls), "GetClassInfoEx failed\n"); - listviewWndProc = cls.lpfnWndProc; - cls.lpfnWndProc = create_test_wndproc; - cls.lpszClassName = "MyListView32"; - ok(RegisterClassEx(&cls), "RegisterClassEx failed\n"); - - test_create_imagelist = ImageList_Create(16, 16, 0, 5, 10); - hList = CreateWindow("MyListView32", "Test", WS_VISIBLE, 0, 0, 100, 100, NULL, NULL, GetModuleHandle(NULL), 0); - ok((HIMAGELIST)SendMessage(hList, LVM_GETIMAGELIST, 0, 0) == test_create_imagelist, "Image list not obtained\n"); - hHeader = (HWND)SendMessage(hList, LVM_GETHEADER, 0, 0); - - if (!IsWindow(hHeader)) - { - /* version 4.0 */ - win_skip("LVM_GETHEADER not implemented. Skipping.\n"); - DestroyWindow(hList); - return; - } - - ok(IsWindow(hHeader) && IsWindowVisible(hHeader), "Listview not in report mode\n"); - ok(hHeader == GetDlgItem(hList, 0), "Expected header as dialog item\n"); - DestroyWindow(hList); - - /* header isn't created on LVS_ICON and LVS_LIST styles */ - hList = CreateWindow("SysListView32", "Test", WS_VISIBLE, 0, 0, 100, 100, NULL, NULL, - GetModuleHandle(NULL), 0); - hHeader = (HWND)SendMessage(hList, LVM_GETHEADER, 0, 0); - ok(!IsWindow(hHeader), "Header shouldn't be created\n"); - ok(NULL == GetDlgItem(hList, 0), "NULL dialog item expected\n"); - /* insert column */ - memset(&col, 0, sizeof(LVCOLUMNA)); - col.mask = LVCF_WIDTH; - col.cx = 100; - r = SendMessage(hList, LVM_INSERTCOLUMN, 0, (LPARAM)&col); - ok(r == 0, "Expected 0 column's inserted\n"); - hHeader = (HWND)SendMessage(hList, LVM_GETHEADER, 0, 0); - ok(IsWindow(hHeader), "Header should be created\n"); - ok(hHeader == GetDlgItem(hList, 0), "Expected header as dialog item\n"); - style = GetWindowLong(hHeader, GWL_STYLE); - ok(!(style & HDS_HIDDEN), "Not expected HDS_HIDDEN\n"); - DestroyWindow(hList); - - hList = CreateWindow("SysListView32", "Test", WS_VISIBLE|LVS_LIST, 0, 0, 100, 100, NULL, NULL, - GetModuleHandle(NULL), 0); - hHeader = (HWND)SendMessage(hList, LVM_GETHEADER, 0, 0); - ok(!IsWindow(hHeader), "Header shouldn't be created\n"); - ok(NULL == GetDlgItem(hList, 0), "NULL dialog item expected\n"); - /* insert column */ - memset(&col, 0, sizeof(LVCOLUMNA)); - col.mask = LVCF_WIDTH; - col.cx = 100; - r = SendMessage(hList, LVM_INSERTCOLUMN, 0, (LPARAM)&col); - ok(r == 0, "Expected 0 column's inserted\n"); - hHeader = (HWND)SendMessage(hList, LVM_GETHEADER, 0, 0); - ok(IsWindow(hHeader), "Header should be created\n"); - ok(hHeader == GetDlgItem(hList, 0), "Expected header as dialog item\n"); - DestroyWindow(hList); - - /* try to switch LVS_ICON -> LVS_REPORT and back LVS_ICON -> LVS_REPORT */ - hList = CreateWindow("SysListView32", "Test", WS_VISIBLE, 0, 0, 100, 100, NULL, NULL, - GetModuleHandle(NULL), 0); - ret = SetWindowLongPtr(hList, GWL_STYLE, GetWindowLongPtr(hList, GWL_STYLE) | LVS_REPORT); - ok(ret & WS_VISIBLE, "Style wrong, should have WS_VISIBLE\n"); - hHeader = (HWND)SendMessage(hList, LVM_GETHEADER, 0, 0); - ok(IsWindow(hHeader), "Header should be created\n"); - ret = SetWindowLongPtr(hList, GWL_STYLE, GetWindowLong(hList, GWL_STYLE) & ~LVS_REPORT); - ok((ret & WS_VISIBLE) && (ret & LVS_REPORT), "Style wrong, should have WS_VISIBLE|LVS_REPORT\n"); - hHeader = (HWND)SendMessage(hList, LVM_GETHEADER, 0, 0); - ok(IsWindow(hHeader), "Header should be created\n"); - ok(hHeader == GetDlgItem(hList, 0), "Expected header as dialog item\n"); - DestroyWindow(hList); - - /* try to switch LVS_LIST -> LVS_REPORT and back LVS_LIST -> LVS_REPORT */ - hList = CreateWindow("SysListView32", "Test", WS_VISIBLE|LVS_LIST, 0, 0, 100, 100, NULL, NULL, - GetModuleHandle(NULL), 0); - ret = SetWindowLongPtr(hList, GWL_STYLE, - (GetWindowLongPtr(hList, GWL_STYLE) & ~LVS_LIST) | LVS_REPORT); - ok(((ret & WS_VISIBLE) && (ret & LVS_LIST)), "Style wrong, should have WS_VISIBLE|LVS_LIST\n"); - hHeader = (HWND)SendMessage(hList, LVM_GETHEADER, 0, 0); - ok(IsWindow(hHeader), "Header should be created\n"); - ok(hHeader == GetDlgItem(hList, 0), "Expected header as dialog item\n"); - ret = SetWindowLongPtr(hList, GWL_STYLE, - (GetWindowLongPtr(hList, GWL_STYLE) & ~LVS_REPORT) | LVS_LIST); - ok(((ret & WS_VISIBLE) && (ret & LVS_REPORT)), "Style wrong, should have WS_VISIBLE|LVS_REPORT\n"); - hHeader = (HWND)SendMessage(hList, LVM_GETHEADER, 0, 0); - ok(IsWindow(hHeader), "Header should be created\n"); - ok(hHeader == GetDlgItem(hList, 0), "Expected header as dialog item\n"); - DestroyWindow(hList); - - /* LVS_REPORT without WS_VISIBLE */ - hList = CreateWindow("SysListView32", "Test", LVS_REPORT, 0, 0, 100, 100, NULL, NULL, - GetModuleHandle(NULL), 0); - hHeader = (HWND)SendMessage(hList, LVM_GETHEADER, 0, 0); - ok(!IsWindow(hHeader), "Header shouldn't be created\n"); - ok(NULL == GetDlgItem(hList, 0), "NULL dialog item expected\n"); - /* insert column */ - memset(&col, 0, sizeof(LVCOLUMNA)); - col.mask = LVCF_WIDTH; - col.cx = 100; - r = SendMessage(hList, LVM_INSERTCOLUMN, 0, (LPARAM)&col); - ok(r == 0, "Expected 0 column's inserted\n"); - hHeader = (HWND)SendMessage(hList, LVM_GETHEADER, 0, 0); - ok(IsWindow(hHeader), "Header should be created\n"); - ok(hHeader == GetDlgItem(hList, 0), "Expected header as dialog item\n"); - DestroyWindow(hList); - - /* LVS_REPORT without WS_VISIBLE, try to show it */ - hList = CreateWindow("SysListView32", "Test", LVS_REPORT, 0, 0, 100, 100, NULL, NULL, - GetModuleHandle(NULL), 0); - hHeader = (HWND)SendMessage(hList, LVM_GETHEADER, 0, 0); - ok(!IsWindow(hHeader), "Header shouldn't be created\n"); - ok(NULL == GetDlgItem(hList, 0), "NULL dialog item expected\n"); - ShowWindow(hList, SW_SHOW); - hHeader = (HWND)SendMessage(hList, LVM_GETHEADER, 0, 0); - ok(IsWindow(hHeader), "Header should be created\n"); - ok(hHeader == GetDlgItem(hList, 0), "Expected header as dialog item\n"); - DestroyWindow(hList); - - /* LVS_REPORT with LVS_NOCOLUMNHEADER */ - hList = CreateWindow("SysListView32", "Test", LVS_REPORT|LVS_NOCOLUMNHEADER|WS_VISIBLE, - 0, 0, 100, 100, NULL, NULL, GetModuleHandle(NULL), 0); - hHeader = (HWND)SendMessage(hList, LVM_GETHEADER, 0, 0); - ok(IsWindow(hHeader), "Header should be created\n"); - ok(hHeader == GetDlgItem(hList, 0), "Expected header as dialog item\n"); - /* HDS_DRAGDROP set by default */ - ok(GetWindowLongPtr(hHeader, GWL_STYLE) & HDS_DRAGDROP, "Expected header to have HDS_DRAGDROP\n"); - DestroyWindow(hList); - - /* setting LVS_EX_HEADERDRAGDROP creates header */ - hList = CreateWindow("SysListView32", "Test", LVS_REPORT, 0, 0, 100, 100, NULL, NULL, - GetModuleHandle(NULL), 0); - hHeader = (HWND)SendMessage(hList, LVM_GETHEADER, 0, 0); - ok(!IsWindow(hHeader), "Header shouldn't be created\n"); - ok(NULL == GetDlgItem(hList, 0), "NULL dialog item expected\n"); - SendMessage(hList, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_HEADERDRAGDROP); - hHeader = (HWND)SendMessage(hList, LVM_GETHEADER, 0, 0); - ok(IsWindow(hHeader) || - broken(!IsWindow(hHeader)), /* 4.7x common controls */ - "Header should be created\n"); - ok(hHeader == GetDlgItem(hList, 0), "Expected header as dialog item\n"); - DestroyWindow(hList); - - /* not report style accepts LVS_EX_HEADERDRAGDROP too */ - hList = create_listview_control(LVS_ICON); - SendMessage(hList, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_HEADERDRAGDROP); - r = SendMessage(hList, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0); - ok(r & LVS_EX_HEADERDRAGDROP, "Expected LVS_EX_HEADERDRAGDROP to be set\n"); - DestroyWindow(hList); - - /* requesting header info with LVM_GETSUBITEMRECT doesn't create it */ - hList = CreateWindow("SysListView32", "Test", LVS_REPORT, 0, 0, 100, 100, NULL, NULL, - GetModuleHandle(NULL), 0); - ok(!IsWindow(hHeader), "Header shouldn't be created\n"); - ok(NULL == GetDlgItem(hList, 0), "NULL dialog item expected\n"); - - rect.left = LVIR_BOUNDS; - rect.top = 1; - rect.right = rect.bottom = -10; - r = SendMessage(hList, LVM_GETSUBITEMRECT, -1, (LPARAM)&rect); - ok(r != 0, "Expected not-null LRESULT\n"); - - hHeader = (HWND)SendMessage(hList, LVM_GETHEADER, 0, 0); - ok(!IsWindow(hHeader), "Header shouldn't be created\n"); - ok(NULL == GetDlgItem(hList, 0), "NULL dialog item expected\n"); - - DestroyWindow(hList); - - /* WM_MEASUREITEM should be sent when created with LVS_OWNERDRAWFIXED */ - flush_sequences(sequences, NUM_MSG_SEQUENCES); - hList = create_listview_control(LVS_OWNERDRAWFIXED | LVS_REPORT); - ok_sequence(sequences, PARENT_SEQ_INDEX, create_ownerdrawfixed_parent_seq, - "created with LVS_OWNERDRAWFIXED|LVS_REPORT - parent seq", FALSE); - DestroyWindow(hList); -} - -static void test_redraw(void) -{ - HWND hwnd; - HDC hdc; - BOOL res; - DWORD r; - - hwnd = create_listview_control(LVS_REPORT); - subclass_header(hwnd); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - trace("invalidate & update\n"); - InvalidateRect(hwnd, NULL, TRUE); - UpdateWindow(hwnd); - ok_sequence(sequences, LISTVIEW_SEQ_INDEX, redraw_listview_seq, "redraw listview", FALSE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* forward WM_ERASEBKGND to parent on CLR_NONE background color */ - /* 1. Without backbuffer */ - res = ListView_SetBkColor(hwnd, CLR_NONE); - expect(TRUE, res); - - hdc = GetWindowDC(hwndparent); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - r = SendMessageA(hwnd, WM_ERASEBKGND, (WPARAM)hdc, 0); - ok(r != 0, "Expected not zero result\n"); - ok_sequence(sequences, PARENT_FULL_SEQ_INDEX, forward_erasebkgnd_parent_seq, - "forward WM_ERASEBKGND on CLR_NONE", FALSE); - - res = ListView_SetBkColor(hwnd, CLR_DEFAULT); - expect(TRUE, res); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - r = SendMessageA(hwnd, WM_ERASEBKGND, (WPARAM)hdc, 0); - ok(r != 0, "Expected not zero result\n"); - ok_sequence(sequences, PARENT_FULL_SEQ_INDEX, empty_seq, - "don't forward WM_ERASEBKGND on non-CLR_NONE", FALSE); - - /* 2. With backbuffer */ - SendMessageA(hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_DOUBLEBUFFER, - LVS_EX_DOUBLEBUFFER); - res = ListView_SetBkColor(hwnd, CLR_NONE); - expect(TRUE, res); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - r = SendMessageA(hwnd, WM_ERASEBKGND, (WPARAM)hdc, 0); - ok(r != 0, "Expected not zero result\n"); - ok_sequence(sequences, PARENT_FULL_SEQ_INDEX, forward_erasebkgnd_parent_seq, - "forward WM_ERASEBKGND on CLR_NONE", FALSE); - - res = ListView_SetBkColor(hwnd, CLR_DEFAULT); - expect(TRUE, res); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - r = SendMessageA(hwnd, WM_ERASEBKGND, (WPARAM)hdc, 0); - todo_wine ok(r != 0, "Expected not zero result\n"); - ok_sequence(sequences, PARENT_FULL_SEQ_INDEX, empty_seq, - "don't forward WM_ERASEBKGND on non-CLR_NONE", FALSE); - - ReleaseDC(hwndparent, hdc); - - DestroyWindow(hwnd); -} - -static LRESULT WINAPI cd_wndproc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) -{ - COLORREF clr, c0ffee = RGB(0xc0, 0xff, 0xee); - - if(msg == WM_NOTIFY) { - NMHDR *nmhdr = (PVOID)lp; - if(nmhdr->code == NM_CUSTOMDRAW) { - NMLVCUSTOMDRAW *nmlvcd = (PVOID)nmhdr; - trace("NMCUSTOMDRAW (0x%.8x)\n", nmlvcd->nmcd.dwDrawStage); - switch(nmlvcd->nmcd.dwDrawStage) { - case CDDS_PREPAINT: - SetBkColor(nmlvcd->nmcd.hdc, c0ffee); - return CDRF_NOTIFYITEMDRAW; - case CDDS_ITEMPREPAINT: - nmlvcd->clrTextBk = CLR_DEFAULT; - return CDRF_NOTIFYSUBITEMDRAW; - case CDDS_ITEMPREPAINT | CDDS_SUBITEM: - clr = GetBkColor(nmlvcd->nmcd.hdc); - todo_wine ok(clr == c0ffee, "clr=%.8x\n", clr); - return CDRF_NOTIFYPOSTPAINT; - case CDDS_ITEMPOSTPAINT | CDDS_SUBITEM: - clr = GetBkColor(nmlvcd->nmcd.hdc); - todo_wine ok(clr == c0ffee, "clr=%.8x\n", clr); - return CDRF_DODEFAULT; - } - return CDRF_DODEFAULT; - } - } - - return DefWindowProcA(hwnd, msg, wp, lp); -} - -static void test_customdraw(void) -{ - HWND hwnd; - WNDPROC oldwndproc; - - hwnd = create_listview_control(LVS_REPORT); - - insert_column(hwnd, 0); - insert_column(hwnd, 1); - insert_item(hwnd, 0); - - oldwndproc = (WNDPROC)SetWindowLongPtr(hwndparent, GWLP_WNDPROC, - (LONG_PTR)cd_wndproc); - - InvalidateRect(hwnd, NULL, TRUE); - UpdateWindow(hwnd); - - SetWindowLongPtr(hwndparent, GWLP_WNDPROC, (LONG_PTR)oldwndproc); - - DestroyWindow(hwnd); -} - -static void test_icon_spacing(void) -{ - /* LVM_SETICONSPACING */ - /* note: LVM_SETICONSPACING returns the previous icon spacing if successful */ - - HWND hwnd; - WORD w, h; - DWORD r; - - hwnd = create_listview_control(LVS_ICON); - ok(hwnd != NULL, "failed to create a listview window\n"); - - r = SendMessage(hwnd, WM_NOTIFYFORMAT, (WPARAM)hwndparent, NF_REQUERY); - expect(NFR_ANSI, r); - - /* reset the icon spacing to defaults */ - SendMessage(hwnd, LVM_SETICONSPACING, 0, MAKELPARAM(-1, -1)); - - /* now we can request what the defaults are */ - r = SendMessage(hwnd, LVM_SETICONSPACING, 0, MAKELPARAM(-1, -1)); - w = LOWORD(r); - h = HIWORD(r); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - trace("test icon spacing\n"); - - r = SendMessage(hwnd, LVM_SETICONSPACING, 0, MAKELPARAM(20, 30)); - ok(r == MAKELONG(w, h) || - broken(r == MAKELONG(w, w)), /* win98 */ - "Expected %d, got %d\n", MAKELONG(w, h), r); - - r = SendMessage(hwnd, LVM_SETICONSPACING, 0, MAKELPARAM(25, 35)); - if (r == 0) - { - /* version 4.0 */ - win_skip("LVM_SETICONSPACING unimplemented. Skipping.\n"); - DestroyWindow(hwnd); - return; - } - expect(MAKELONG(20,30), r); - - r = SendMessage(hwnd, LVM_SETICONSPACING, 0, MAKELPARAM(-1,-1)); - expect(MAKELONG(25,35), r); - - ok_sequence(sequences, LISTVIEW_SEQ_INDEX, listview_icon_spacing_seq, "test icon spacing seq", FALSE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - DestroyWindow(hwnd); -} - -static void test_color(void) -{ - /* SETBKCOLOR/GETBKCOLOR, SETTEXTCOLOR/GETTEXTCOLOR, SETTEXTBKCOLOR/GETTEXTBKCOLOR */ - - HWND hwnd; - DWORD r; - int i; - - COLORREF color; - COLORREF colors[4] = {RGB(0,0,0), RGB(100,50,200), CLR_NONE, RGB(255,255,255)}; - - hwnd = create_listview_control(LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - trace("test color seq\n"); - for (i = 0; i < 4; i++) - { - color = colors[i]; - - r = SendMessage(hwnd, LVM_SETBKCOLOR, 0, color); - expect(TRUE, r); - r = SendMessage(hwnd, LVM_GETBKCOLOR, 0, color); - expect(color, r); - - r = SendMessage(hwnd, LVM_SETTEXTCOLOR, 0, color); - expect (TRUE, r); - r = SendMessage(hwnd, LVM_GETTEXTCOLOR, 0, color); - expect(color, r); - - r = SendMessage(hwnd, LVM_SETTEXTBKCOLOR, 0, color); - expect(TRUE, r); - r = SendMessage(hwnd, LVM_GETTEXTBKCOLOR, 0, color); - expect(color, r); - } - - ok_sequence(sequences, LISTVIEW_SEQ_INDEX, listview_color_seq, "test color seq", FALSE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - DestroyWindow(hwnd); -} - -static void test_item_count(void) -{ - /* LVM_INSERTITEM, LVM_DELETEITEM, LVM_DELETEALLITEMS, LVM_GETITEMCOUNT */ - - HWND hwnd; - DWORD r; - HDC hdc; - HFONT hOldFont; - TEXTMETRICA tm; - RECT rect; - INT height; - - LVITEM item0; - LVITEM item1; - LVITEM item2; - static CHAR item0text[] = "item0"; - static CHAR item1text[] = "item1"; - static CHAR item2text[] = "item2"; - - hwnd = create_listview_control(LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - - /* resize in dpiaware manner to fit all 3 items added */ - hdc = GetDC(0); - hOldFont = SelectObject(hdc, GetStockObject(SYSTEM_FONT)); - GetTextMetricsA(hdc, &tm); - /* 2 extra pixels for bounds and header border */ - height = tm.tmHeight + 2; - SelectObject(hdc, hOldFont); - ReleaseDC(0, hdc); - - GetWindowRect(hwnd, &rect); - /* 3 items + 1 header + 1 to be sure */ - MoveWindow(hwnd, 0, 0, rect.right - rect.left, 5 * height, FALSE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - trace("test item count\n"); - - r = SendMessage(hwnd, LVM_GETITEMCOUNT, 0, 0); - expect(0, r); - - /* [item0] */ - item0.mask = LVIF_TEXT; - item0.iItem = 0; - item0.iSubItem = 0; - item0.pszText = item0text; - r = SendMessage(hwnd, LVM_INSERTITEM, 0, (LPARAM) &item0); - expect(0, r); - - /* [item0, item1] */ - item1.mask = LVIF_TEXT; - item1.iItem = 1; - item1.iSubItem = 0; - item1.pszText = item1text; - r = SendMessage(hwnd, LVM_INSERTITEM, 0, (LPARAM) &item1); - expect(1, r); - - /* [item0, item1, item2] */ - item2.mask = LVIF_TEXT; - item2.iItem = 2; - item2.iSubItem = 0; - item2.pszText = item2text; - r = SendMessage(hwnd, LVM_INSERTITEM, 0, (LPARAM) &item2); - expect(2, r); - - r = SendMessage(hwnd, LVM_GETITEMCOUNT, 0, 0); - expect(3, r); - - /* [item0, item1] */ - r = SendMessage(hwnd, LVM_DELETEITEM, 2, 0); - expect(TRUE, r); - - r = SendMessage(hwnd, LVM_GETITEMCOUNT, 0, 0); - expect(2, r); - - /* [] */ - r = SendMessage(hwnd, LVM_DELETEALLITEMS, 0, 0); - expect(TRUE, r); - - r = SendMessage(hwnd, LVM_GETITEMCOUNT, 0, 0); - expect(0, r); - - /* [item0] */ - r = SendMessage(hwnd, LVM_INSERTITEM, 0, (LPARAM) &item1); - expect(0, r); - - /* [item0, item1] */ - r = SendMessage(hwnd, LVM_INSERTITEM, 0, (LPARAM) &item1); - expect(1, r); - - r = SendMessage(hwnd, LVM_GETITEMCOUNT, 0, 0); - expect(2, r); - - /* [item0, item1, item2] */ - r = SendMessage(hwnd, LVM_INSERTITEM, 0, (LPARAM) &item2); - expect(2, r); - - r = SendMessage(hwnd, LVM_GETITEMCOUNT, 0, 0); - expect(3, r); - - ok_sequence(sequences, LISTVIEW_SEQ_INDEX, listview_item_count_seq, "test item count seq", FALSE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - DestroyWindow(hwnd); -} - -static void test_item_position(void) -{ - /* LVM_SETITEMPOSITION/LVM_GETITEMPOSITION */ - - HWND hwnd; - DWORD r; - POINT position; - - LVITEM item0; - LVITEM item1; - LVITEM item2; - static CHAR item0text[] = "item0"; - static CHAR item1text[] = "item1"; - static CHAR item2text[] = "item2"; - - hwnd = create_listview_control(LVS_ICON); - ok(hwnd != NULL, "failed to create a listview window\n"); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - trace("test item position\n"); - - /* [item0] */ - item0.mask = LVIF_TEXT; - item0.iItem = 0; - item0.iSubItem = 0; - item0.pszText = item0text; - r = SendMessage(hwnd, LVM_INSERTITEM, 0, (LPARAM) &item0); - expect(0, r); - - /* [item0, item1] */ - item1.mask = LVIF_TEXT; - item1.iItem = 1; - item1.iSubItem = 0; - item1.pszText = item1text; - r = SendMessage(hwnd, LVM_INSERTITEM, 0, (LPARAM) &item1); - expect(1, r); - - /* [item0, item1, item2] */ - item2.mask = LVIF_TEXT; - item2.iItem = 2; - item2.iSubItem = 0; - item2.pszText = item2text; - r = SendMessage(hwnd, LVM_INSERTITEM, 0, (LPARAM) &item2); - expect(2, r); - - r = SendMessage(hwnd, LVM_SETITEMPOSITION, 1, MAKELPARAM(10,5)); - expect(TRUE, r); - r = SendMessage(hwnd, LVM_GETITEMPOSITION, 1, (LPARAM) &position); - expect(TRUE, r); - expect2(10, 5, position.x, position.y); - - r = SendMessage(hwnd, LVM_SETITEMPOSITION, 2, MAKELPARAM(0,0)); - expect(TRUE, r); - r = SendMessage(hwnd, LVM_GETITEMPOSITION, 2, (LPARAM) &position); - expect(TRUE, r); - expect2(0, 0, position.x, position.y); - - r = SendMessage(hwnd, LVM_SETITEMPOSITION, 0, MAKELPARAM(20,20)); - expect(TRUE, r); - r = SendMessage(hwnd, LVM_GETITEMPOSITION, 0, (LPARAM) &position); - expect(TRUE, r); - expect2(20, 20, position.x, position.y); - - ok_sequence(sequences, LISTVIEW_SEQ_INDEX, listview_itempos_seq, "test item position seq", TRUE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - DestroyWindow(hwnd); -} - -static void test_getorigin(void) -{ - /* LVM_GETORIGIN */ - - HWND hwnd; - DWORD r; - POINT position; - - position.x = position.y = 0; - - hwnd = create_listview_control(LVS_ICON); - ok(hwnd != NULL, "failed to create a listview window\n"); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - trace("test get origin results\n"); - r = SendMessage(hwnd, LVM_GETORIGIN, 0, (LPARAM)&position); - expect(TRUE, r); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - DestroyWindow(hwnd); - - hwnd = create_listview_control(LVS_SMALLICON); - ok(hwnd != NULL, "failed to create a listview window\n"); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - trace("test get origin results\n"); - r = SendMessage(hwnd, LVM_GETORIGIN, 0, (LPARAM)&position); - expect(TRUE, r); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - DestroyWindow(hwnd); - - hwnd = create_listview_control(LVS_LIST); - ok(hwnd != NULL, "failed to create a listview window\n"); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - trace("test get origin results\n"); - r = SendMessage(hwnd, LVM_GETORIGIN, 0, (LPARAM)&position); - expect(FALSE, r); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - DestroyWindow(hwnd); - - hwnd = create_listview_control(LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - trace("test get origin results\n"); - r = SendMessage(hwnd, LVM_GETORIGIN, 0, (LPARAM)&position); - expect(FALSE, r); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - DestroyWindow(hwnd); - -} - -static void test_multiselect(void) -{ - typedef struct t_select_task - { - const char *descr; - int initPos; - int loopVK; - int count; - int result; - } select_task; - - HWND hwnd; - DWORD r; - int i,j,item_count,selected_count; - static const int items=5; - BYTE kstate[256]; - select_task task; - LONG_PTR style; - LVITEMA item; - - static struct t_select_task task_list[] = { - { "using VK_DOWN", 0, VK_DOWN, -1, -1 }, - { "using VK_UP", -1, VK_UP, -1, -1 }, - { "using VK_END", 0, VK_END, 1, -1 }, - { "using VK_HOME", -1, VK_HOME, 1, -1 } - }; - - - hwnd = create_listview_control(LVS_REPORT); - - for (i=0;i rect2.top, "expected not zero height\n"); -} - - arr[0] = 1; arr[1] = 0; arr[2] = 2; - r = SendMessage(hwnd, LVM_SETCOLUMNORDERARRAY, 3, (LPARAM)arr); - expect(TRUE, r); - - rect.left = LVIR_BOUNDS; - rect.top = 0; - rect.right = rect.bottom = -1; - r = SendMessage(hwnd, LVM_GETSUBITEMRECT, 0, (LPARAM)&rect); - ok(r == TRUE, "got %d\n", r); - expect(0, rect.left); - expect(600, rect.right); - - rect.left = LVIR_BOUNDS; - rect.top = 1; - rect.right = rect.bottom = -1; - r = SendMessage(hwnd, LVM_GETSUBITEMRECT, 0, (LPARAM)&rect); - ok(r == TRUE, "got %d\n", r); - expect(0, rect.left); - expect(200, rect.right); - - rect2.left = LVIR_BOUNDS; - rect2.top = 1; - rect2.right = rect2.bottom = -1; - r = SendMessage(hwnd, LVM_GETSUBITEMRECT, 1, (LPARAM)&rect2); - ok(r == TRUE, "got %d\n", r); - expect(0, rect2.left); - expect(200, rect2.right); - /* items are of the same height */ - ok(rect2.top > 0, "expected positive item height\n"); - expect(rect.bottom, rect2.top); - expect(rect.bottom * 2 - rect.top, rect2.bottom); - - rect.left = LVIR_BOUNDS; - rect.top = 2; - rect.right = rect.bottom = -1; - r = SendMessage(hwnd, LVM_GETSUBITEMRECT, 0, (LPARAM)&rect); - ok(r == TRUE, "got %d\n", r); - expect(300, rect.left); - expect(600, rect.right); - - DestroyWindow(hwnd); - - /* try it for non LVS_REPORT style */ - hwnd = CreateWindow("SysListView32", "Test", LVS_ICON, 0, 0, 100, 100, NULL, NULL, - GetModuleHandle(NULL), 0); - rect.left = LVIR_BOUNDS; - rect.top = 1; - rect.right = rect.bottom = -10; - r = SendMessage(hwnd, LVM_GETSUBITEMRECT, -1, (LPARAM)&rect); - ok(r == 0, "Expected not-null LRESULT\n"); - /* rect is unchanged */ - expect(0, rect.left); - expect(-10, rect.right); - expect(1, rect.top); - expect(-10, rect.bottom); - DestroyWindow(hwnd); -} - -/* comparison callback for test_sorting */ -static INT WINAPI test_CallBackCompare(LPARAM first, LPARAM second, LPARAM lParam) -{ - if (first == second) return 0; - return (first > second ? 1 : -1); -} - -static void test_sorting(void) -{ - HWND hwnd; - LVITEMA item = {0}; - DWORD r; - LONG_PTR style; - static CHAR names[][5] = {"A", "B", "C", "D", "0"}; - CHAR buff[10]; - - hwnd = create_listview_control(LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - - /* insert some items */ - item.mask = LVIF_PARAM | LVIF_STATE; - item.state = LVIS_SELECTED; - item.iItem = 0; - item.iSubItem = 0; - item.lParam = 3; - r = SendMessage(hwnd, LVM_INSERTITEM, 0, (LPARAM) &item); - expect(0, r); - - item.mask = LVIF_PARAM; - item.iItem = 1; - item.iSubItem = 0; - item.lParam = 2; - r = SendMessage(hwnd, LVM_INSERTITEM, 0, (LPARAM) &item); - expect(1, r); - - item.mask = LVIF_STATE | LVIF_PARAM; - item.state = LVIS_SELECTED; - item.iItem = 2; - item.iSubItem = 0; - item.lParam = 4; - r = SendMessage(hwnd, LVM_INSERTITEM, 0, (LPARAM) &item); - expect(2, r); - - r = SendMessage(hwnd, LVM_GETSELECTIONMARK, 0, 0); - expect(-1, r); - - r = SendMessage(hwnd, LVM_GETSELECTEDCOUNT, 0, 0); - expect(2, r); - - r = SendMessage(hwnd, LVM_SORTITEMS, 0, (LPARAM)test_CallBackCompare); - expect(TRUE, r); - - r = SendMessage(hwnd, LVM_GETSELECTEDCOUNT, 0, 0); - expect(2, r); - r = SendMessage(hwnd, LVM_GETSELECTIONMARK, 0, 0); - expect(-1, r); - r = SendMessage(hwnd, LVM_GETITEMSTATE, 0, LVIS_SELECTED); - expect(0, r); - r = SendMessage(hwnd, LVM_GETITEMSTATE, 1, LVIS_SELECTED); - expect(LVIS_SELECTED, r); - r = SendMessage(hwnd, LVM_GETITEMSTATE, 2, LVIS_SELECTED); - expect(LVIS_SELECTED, r); - - DestroyWindow(hwnd); - - /* switch to LVS_SORTASCENDING when some items added */ - hwnd = create_listview_control(LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - - item.mask = LVIF_TEXT; - item.iItem = 0; - item.iSubItem = 0; - item.pszText = names[1]; - r = SendMessage(hwnd, LVM_INSERTITEM, 0, (LPARAM) &item); - expect(0, r); - - item.mask = LVIF_TEXT; - item.iItem = 1; - item.iSubItem = 0; - item.pszText = names[2]; - r = SendMessage(hwnd, LVM_INSERTITEM, 0, (LPARAM) &item); - expect(1, r); - - item.mask = LVIF_TEXT; - item.iItem = 2; - item.iSubItem = 0; - item.pszText = names[0]; - r = SendMessage(hwnd, LVM_INSERTITEM, 0, (LPARAM) &item); - expect(2, r); - - style = GetWindowLongPtrA(hwnd, GWL_STYLE); - SetWindowLongPtrA(hwnd, GWL_STYLE, style | LVS_SORTASCENDING); - style = GetWindowLongPtrA(hwnd, GWL_STYLE); - ok(style & LVS_SORTASCENDING, "Expected LVS_SORTASCENDING to be set\n"); - - /* no sorting performed when switched to LVS_SORTASCENDING */ - item.mask = LVIF_TEXT; - item.iItem = 0; - item.pszText = buff; - item.cchTextMax = sizeof(buff); - r = SendMessage(hwnd, LVM_GETITEM, 0, (LPARAM) &item); - expect(TRUE, r); - ok(lstrcmp(buff, names[1]) == 0, "Expected '%s', got '%s'\n", names[1], buff); - - item.iItem = 1; - r = SendMessage(hwnd, LVM_GETITEM, 0, (LPARAM) &item); - expect(TRUE, r); - ok(lstrcmp(buff, names[2]) == 0, "Expected '%s', got '%s'\n", names[2], buff); - - item.iItem = 2; - r = SendMessage(hwnd, LVM_GETITEM, 0, (LPARAM) &item); - expect(TRUE, r); - ok(lstrcmp(buff, names[0]) == 0, "Expected '%s', got '%s'\n", names[0], buff); - - /* adding new item doesn't resort list */ - item.mask = LVIF_TEXT; - item.iItem = 3; - item.iSubItem = 0; - item.pszText = names[3]; - r = SendMessage(hwnd, LVM_INSERTITEM, 0, (LPARAM) &item); - expect(3, r); - - item.mask = LVIF_TEXT; - item.iItem = 0; - item.pszText = buff; - item.cchTextMax = sizeof(buff); - r = SendMessage(hwnd, LVM_GETITEM, 0, (LPARAM) &item); - expect(TRUE, r); - ok(lstrcmp(buff, names[1]) == 0, "Expected '%s', got '%s'\n", names[1], buff); - - item.iItem = 1; - r = SendMessage(hwnd, LVM_GETITEM, 0, (LPARAM) &item); - expect(TRUE, r); - ok(lstrcmp(buff, names[2]) == 0, "Expected '%s', got '%s'\n", names[2], buff); - - item.iItem = 2; - r = SendMessage(hwnd, LVM_GETITEM, 0, (LPARAM) &item); - expect(TRUE, r); - ok(lstrcmp(buff, names[0]) == 0, "Expected '%s', got '%s'\n", names[0], buff); - - item.iItem = 3; - r = SendMessage(hwnd, LVM_GETITEM, 0, (LPARAM) &item); - expect(TRUE, r); - ok(lstrcmp(buff, names[3]) == 0, "Expected '%s', got '%s'\n", names[3], buff); - - /* corner case - item should be placed at first position */ - item.mask = LVIF_TEXT; - item.iItem = 4; - item.iSubItem = 0; - item.pszText = names[4]; - r = SendMessage(hwnd, LVM_INSERTITEM, 0, (LPARAM) &item); - expect(0, r); - - item.iItem = 0; - item.pszText = buff; - item.cchTextMax = sizeof(buff); - r = SendMessage(hwnd, LVM_GETITEM, 0, (LPARAM) &item); - expect(TRUE, r); - ok(lstrcmp(buff, names[4]) == 0, "Expected '%s', got '%s'\n", names[4], buff); - - item.iItem = 1; - item.pszText = buff; - item.cchTextMax = sizeof(buff); - r = SendMessage(hwnd, LVM_GETITEM, 0, (LPARAM) &item); - expect(TRUE, r); - ok(lstrcmp(buff, names[1]) == 0, "Expected '%s', got '%s'\n", names[1], buff); - - item.iItem = 2; - r = SendMessage(hwnd, LVM_GETITEM, 0, (LPARAM) &item); - expect(TRUE, r); - ok(lstrcmp(buff, names[2]) == 0, "Expected '%s', got '%s'\n", names[2], buff); - - item.iItem = 3; - r = SendMessage(hwnd, LVM_GETITEM, 0, (LPARAM) &item); - expect(TRUE, r); - ok(lstrcmp(buff, names[0]) == 0, "Expected '%s', got '%s'\n", names[0], buff); - - item.iItem = 4; - r = SendMessage(hwnd, LVM_GETITEM, 0, (LPARAM) &item); - expect(TRUE, r); - ok(lstrcmp(buff, names[3]) == 0, "Expected '%s', got '%s'\n", names[3], buff); - - DestroyWindow(hwnd); -} - -static void test_ownerdata(void) -{ - HWND hwnd; - LONG_PTR style, ret; - DWORD res; - LVITEMA item; - - /* it isn't possible to set LVS_OWNERDATA after creation */ - if (g_is_below_5) - { - win_skip("set LVS_OWNERDATA after creation leads to crash on < 5.80\n"); - } - else - { - hwnd = create_listview_control(LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - style = GetWindowLongPtrA(hwnd, GWL_STYLE); - ok(!(style & LVS_OWNERDATA) && style, "LVS_OWNERDATA isn't expected\n"); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - ret = SetWindowLongPtrA(hwnd, GWL_STYLE, style | LVS_OWNERDATA); - ok(ret == style, "Expected set GWL_STYLE to succeed\n"); - ok_sequence(sequences, LISTVIEW_SEQ_INDEX, listview_ownerdata_switchto_seq, - "try to switch to LVS_OWNERDATA seq", FALSE); - - style = GetWindowLongPtrA(hwnd, GWL_STYLE); - ok(!(style & LVS_OWNERDATA), "LVS_OWNERDATA isn't expected\n"); - DestroyWindow(hwnd); - } - - /* try to set LVS_OWNERDATA after creation just having it */ - hwnd = create_listview_control(LVS_OWNERDATA | LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - style = GetWindowLongPtrA(hwnd, GWL_STYLE); - ok(style & LVS_OWNERDATA, "LVS_OWNERDATA is expected\n"); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - ret = SetWindowLongPtrA(hwnd, GWL_STYLE, style | LVS_OWNERDATA); - ok(ret == style, "Expected set GWL_STYLE to succeed\n"); - ok_sequence(sequences, LISTVIEW_SEQ_INDEX, listview_ownerdata_switchto_seq, - "try to switch to LVS_OWNERDATA seq", FALSE); - DestroyWindow(hwnd); - - /* try to remove LVS_OWNERDATA after creation just having it */ - if (g_is_below_5) - { - win_skip("remove LVS_OWNERDATA after creation leads to crash on < 5.80\n"); - } - else - { - hwnd = create_listview_control(LVS_OWNERDATA | LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - style = GetWindowLongPtrA(hwnd, GWL_STYLE); - ok(style & LVS_OWNERDATA, "LVS_OWNERDATA is expected\n"); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - ret = SetWindowLongPtrA(hwnd, GWL_STYLE, style & ~LVS_OWNERDATA); - ok(ret == style, "Expected set GWL_STYLE to succeed\n"); - ok_sequence(sequences, LISTVIEW_SEQ_INDEX, listview_ownerdata_switchto_seq, - "try to switch to LVS_OWNERDATA seq", FALSE); - style = GetWindowLongPtrA(hwnd, GWL_STYLE); - ok(style & LVS_OWNERDATA, "LVS_OWNERDATA is expected\n"); - DestroyWindow(hwnd); - } - - /* try select an item */ - hwnd = create_listview_control(LVS_OWNERDATA | LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - res = SendMessageA(hwnd, LVM_SETITEMCOUNT, 1, 0); - ok(res != 0, "Expected LVM_SETITEMCOUNT to succeed\n"); - res = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0); - expect(0, res); - memset(&item, 0, sizeof(item)); - item.stateMask = LVIS_SELECTED; - item.state = LVIS_SELECTED; - res = SendMessageA(hwnd, LVM_SETITEMSTATE, 0, (LPARAM)&item); - expect(TRUE, res); - res = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0); - expect(1, res); - res = SendMessageA(hwnd, LVM_GETITEMCOUNT, 0, 0); - expect(1, res); - DestroyWindow(hwnd); - - /* LVM_SETITEM is unsupported on LVS_OWNERDATA */ - hwnd = create_listview_control(LVS_OWNERDATA | LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - res = SendMessageA(hwnd, LVM_SETITEMCOUNT, 1, 0); - ok(res != 0, "Expected LVM_SETITEMCOUNT to succeed\n"); - res = SendMessageA(hwnd, LVM_GETITEMCOUNT, 0, 0); - expect(1, res); - memset(&item, 0, sizeof(item)); - item.mask = LVIF_STATE; - item.iItem = 0; - item.stateMask = LVIS_SELECTED; - item.state = LVIS_SELECTED; - res = SendMessageA(hwnd, LVM_SETITEM, 0, (LPARAM)&item); - expect(FALSE, res); - DestroyWindow(hwnd); - - /* check notifications after focused/selected changed */ - hwnd = create_listview_control(LVS_OWNERDATA | LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - res = SendMessageA(hwnd, LVM_SETITEMCOUNT, 20, 0); - ok(res != 0, "Expected LVM_SETITEMCOUNT to succeed\n"); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - memset(&item, 0, sizeof(item)); - item.stateMask = LVIS_SELECTED; - item.state = LVIS_SELECTED; - res = SendMessageA(hwnd, LVM_SETITEMSTATE, 0, (LPARAM)&item); - expect(TRUE, res); - - ok_sequence(sequences, PARENT_SEQ_INDEX, ownderdata_select_focus_parent_seq, - "ownerdata select notification", TRUE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - memset(&item, 0, sizeof(item)); - item.stateMask = LVIS_FOCUSED; - item.state = LVIS_FOCUSED; - res = SendMessageA(hwnd, LVM_SETITEMSTATE, 0, (LPARAM)&item); - expect(TRUE, res); - - ok_sequence(sequences, PARENT_SEQ_INDEX, ownderdata_select_focus_parent_seq, - "ownerdata focus notification", TRUE); - - /* select all, check notifications */ - item.stateMask = LVIS_SELECTED; - item.state = 0; - res = SendMessageA(hwnd, LVM_SETITEMSTATE, -1, (LPARAM)&item); - expect(TRUE, res); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - item.stateMask = LVIS_SELECTED; - item.state = LVIS_SELECTED; - - g_dump_itemchanged = TRUE; - res = SendMessageA(hwnd, LVM_SETITEMSTATE, -1, (LPARAM)&item); - expect(TRUE, res); - g_dump_itemchanged = FALSE; - - ok_sequence(sequences, PARENT_SEQ_INDEX, ownerdata_setstate_all_parent_seq, - "ownerdata select all notification", TRUE); - - /* select all again, note that all items are selected already */ - flush_sequences(sequences, NUM_MSG_SEQUENCES); - item.stateMask = LVIS_SELECTED; - item.state = LVIS_SELECTED; - g_dump_itemchanged = TRUE; - res = SendMessageA(hwnd, LVM_SETITEMSTATE, -1, (LPARAM)&item); - expect(TRUE, res); - g_dump_itemchanged = FALSE; - ok_sequence(sequences, PARENT_SEQ_INDEX, ownerdata_setstate_all_parent_seq, - "ownerdata select all notification", TRUE); - /* deselect all */ - flush_sequences(sequences, NUM_MSG_SEQUENCES); - item.stateMask = LVIS_SELECTED; - item.state = 0; - g_dump_itemchanged = TRUE; - res = SendMessageA(hwnd, LVM_SETITEMSTATE, -1, (LPARAM)&item); - expect(TRUE, res); - g_dump_itemchanged = FALSE; - ok_sequence(sequences, PARENT_SEQ_INDEX, ownerdata_deselect_all_parent_seq, - "ownerdata deselect all notification", TRUE); - - /* select one, then deselect all */ - item.stateMask = LVIS_SELECTED; - item.state = LVIS_SELECTED; - res = SendMessageA(hwnd, LVM_SETITEMSTATE, 0, (LPARAM)&item); - expect(TRUE, res); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - item.stateMask = LVIS_SELECTED; - item.state = 0; - g_dump_itemchanged = TRUE; - res = SendMessageA(hwnd, LVM_SETITEMSTATE, -1, (LPARAM)&item); - expect(TRUE, res); - g_dump_itemchanged = FALSE; - ok_sequence(sequences, PARENT_SEQ_INDEX, ownerdata_deselect_all_parent_seq, - "ownerdata select all notification", TRUE); - - /* remove focused, try to focus all */ - item.stateMask = LVIS_FOCUSED; - item.state = LVIS_FOCUSED; - res = SendMessageA(hwnd, LVM_SETITEMSTATE, 0, (LPARAM)&item); - expect(TRUE, res); - item.stateMask = LVIS_FOCUSED; - item.state = 0; - res = SendMessageA(hwnd, LVM_SETITEMSTATE, -1, (LPARAM)&item); - expect(TRUE, res); - item.stateMask = LVIS_FOCUSED; - res = SendMessageA(hwnd, LVM_GETITEMSTATE, 0, LVIS_FOCUSED); - expect(0, res); - /* setting all to focused returns failure value */ - flush_sequences(sequences, NUM_MSG_SEQUENCES); - item.stateMask = LVIS_FOCUSED; - item.state = LVIS_FOCUSED; - g_dump_itemchanged = TRUE; - res = SendMessageA(hwnd, LVM_SETITEMSTATE, -1, (LPARAM)&item); - expect(FALSE, res); - g_dump_itemchanged = FALSE; - ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, - "ownerdata focus all notification", FALSE); - /* focus single item, remove all */ - item.stateMask = LVIS_FOCUSED; - item.state = LVIS_FOCUSED; - res = SendMessage(hwnd, LVM_SETITEMSTATE, 0, (LPARAM)&item); - expect(TRUE, res); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - item.stateMask = LVIS_FOCUSED; - item.state = 0; - g_dump_itemchanged = TRUE; - res = SendMessageA(hwnd, LVM_SETITEMSTATE, -1, (LPARAM)&item); - expect(TRUE, res); - g_dump_itemchanged = FALSE; - ok_sequence(sequences, PARENT_SEQ_INDEX, ownerdata_defocus_all_parent_seq, - "ownerdata remove focus all notification", TRUE); - /* set all cut */ - flush_sequences(sequences, NUM_MSG_SEQUENCES); - item.stateMask = LVIS_CUT; - item.state = LVIS_CUT; - g_dump_itemchanged = TRUE; - res = SendMessageA(hwnd, LVM_SETITEMSTATE, -1, (LPARAM)&item); - expect(TRUE, res); - g_dump_itemchanged = FALSE; - ok_sequence(sequences, PARENT_SEQ_INDEX, ownerdata_setstate_all_parent_seq, - "ownerdata cut all notification", TRUE); - /* all marked cut, try again */ - flush_sequences(sequences, NUM_MSG_SEQUENCES); - item.stateMask = LVIS_CUT; - item.state = LVIS_CUT; - g_dump_itemchanged = TRUE; - res = SendMessageA(hwnd, LVM_SETITEMSTATE, -1, (LPARAM)&item); - expect(TRUE, res); - g_dump_itemchanged = FALSE; - ok_sequence(sequences, PARENT_SEQ_INDEX, ownerdata_setstate_all_parent_seq, - "ownerdata cut all notification #2", TRUE); - - DestroyWindow(hwnd); - - /* check notifications on LVM_GETITEM */ - /* zero callback mask */ - hwnd = create_listview_control(LVS_OWNERDATA | LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - res = SendMessageA(hwnd, LVM_SETITEMCOUNT, 1, 0); - ok(res != 0, "Expected LVM_SETITEMCOUNT to succeed\n"); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - memset(&item, 0, sizeof(item)); - item.stateMask = LVIS_SELECTED; - item.mask = LVIF_STATE; - res = SendMessageA(hwnd, LVM_GETITEMA, 0, (LPARAM)&item); - expect(TRUE, res); - - ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, - "ownerdata getitem selected state 1", FALSE); - - /* non zero callback mask but not we asking for */ - res = SendMessageA(hwnd, LVM_SETCALLBACKMASK, LVIS_OVERLAYMASK, 0); - expect(TRUE, res); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - memset(&item, 0, sizeof(item)); - item.stateMask = LVIS_SELECTED; - item.mask = LVIF_STATE; - res = SendMessageA(hwnd, LVM_GETITEMA, 0, (LPARAM)&item); - expect(TRUE, res); - - ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, - "ownerdata getitem selected state 2", FALSE); - - /* LVIS_OVERLAYMASK callback mask, asking for index */ - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - memset(&item, 0, sizeof(item)); - item.stateMask = LVIS_OVERLAYMASK; - item.mask = LVIF_STATE; - res = SendMessageA(hwnd, LVM_GETITEMA, 0, (LPARAM)&item); - expect(TRUE, res); - - ok_sequence(sequences, PARENT_SEQ_INDEX, single_getdispinfo_parent_seq, - "ownerdata getitem selected state 2", FALSE); - - DestroyWindow(hwnd); - - /* LVS_SORTASCENDING/LVS_SORTDESCENDING aren't compatible with LVS_OWNERDATA */ - hwnd = create_listview_control(LVS_OWNERDATA | LVS_SORTASCENDING | LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - style = GetWindowLongPtrA(hwnd, GWL_STYLE); - ok(style & LVS_OWNERDATA, "Expected LVS_OWNERDATA\n"); - ok(style & LVS_SORTASCENDING, "Expected LVS_SORTASCENDING to be set\n"); - SetWindowLongPtrA(hwnd, GWL_STYLE, style & ~LVS_SORTASCENDING); - style = GetWindowLongPtrA(hwnd, GWL_STYLE); - ok(!(style & LVS_SORTASCENDING), "Expected LVS_SORTASCENDING not set\n"); - DestroyWindow(hwnd); - /* apparently it's allowed to switch these style on after creation */ - hwnd = create_listview_control(LVS_OWNERDATA | LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - style = GetWindowLongPtrA(hwnd, GWL_STYLE); - ok(style & LVS_OWNERDATA, "Expected LVS_OWNERDATA\n"); - SetWindowLongPtrA(hwnd, GWL_STYLE, style | LVS_SORTASCENDING); - style = GetWindowLongPtrA(hwnd, GWL_STYLE); - ok(style & LVS_SORTASCENDING, "Expected LVS_SORTASCENDING to be set\n"); - DestroyWindow(hwnd); - - hwnd = create_listview_control(LVS_OWNERDATA | LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - style = GetWindowLongPtrA(hwnd, GWL_STYLE); - ok(style & LVS_OWNERDATA, "Expected LVS_OWNERDATA\n"); - SetWindowLongPtrA(hwnd, GWL_STYLE, style | LVS_SORTDESCENDING); - style = GetWindowLongPtrA(hwnd, GWL_STYLE); - ok(style & LVS_SORTDESCENDING, "Expected LVS_SORTDESCENDING to be set\n"); - DestroyWindow(hwnd); -} - -static void test_norecompute(void) -{ - static CHAR testA[] = "test"; - CHAR buff[10]; - LVITEMA item; - HWND hwnd; - DWORD res; - - /* self containing control */ - hwnd = create_listview_control(LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - memset(&item, 0, sizeof(item)); - item.mask = LVIF_TEXT | LVIF_STATE; - item.iItem = 0; - item.stateMask = LVIS_SELECTED; - item.state = LVIS_SELECTED; - item.pszText = testA; - res = SendMessageA(hwnd, LVM_INSERTITEM, 0, (LPARAM)&item); - expect(0, res); - /* retrieve with LVIF_NORECOMPUTE */ - item.mask = LVIF_TEXT | LVIF_NORECOMPUTE; - item.iItem = 0; - item.pszText = buff; - item.cchTextMax = sizeof(buff)/sizeof(CHAR); - res = SendMessageA(hwnd, LVM_GETITEM, 0, (LPARAM)&item); - expect(TRUE, res); - ok(lstrcmp(buff, testA) == 0, "Expected (%s), got (%s)\n", testA, buff); - - item.mask = LVIF_TEXT; - item.iItem = 1; - item.pszText = LPSTR_TEXTCALLBACK; - res = SendMessageA(hwnd, LVM_INSERTITEM, 0, (LPARAM)&item); - expect(1, res); - - item.mask = LVIF_TEXT | LVIF_NORECOMPUTE; - item.iItem = 1; - item.pszText = buff; - item.cchTextMax = sizeof(buff)/sizeof(CHAR); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - res = SendMessageA(hwnd, LVM_GETITEM, 0, (LPARAM)&item); - expect(TRUE, res); - ok(item.pszText == LPSTR_TEXTCALLBACK, "Expected (%p), got (%p)\n", - LPSTR_TEXTCALLBACK, (VOID*)item.pszText); - ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "retrieve with LVIF_NORECOMPUTE seq", FALSE); - - DestroyWindow(hwnd); - - /* LVS_OWNERDATA */ - hwnd = create_listview_control(LVS_OWNERDATA | LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - - item.mask = LVIF_STATE; - item.stateMask = LVIS_SELECTED; - item.state = LVIS_SELECTED; - item.iItem = 0; - res = SendMessageA(hwnd, LVM_INSERTITEM, 0, (LPARAM)&item); - expect(0, res); - - item.mask = LVIF_TEXT | LVIF_NORECOMPUTE; - item.iItem = 0; - item.pszText = buff; - item.cchTextMax = sizeof(buff)/sizeof(CHAR); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - res = SendMessageA(hwnd, LVM_GETITEM, 0, (LPARAM)&item); - expect(TRUE, res); - ok(item.pszText == LPSTR_TEXTCALLBACK, "Expected (%p), got (%p)\n", - LPSTR_TEXTCALLBACK, (VOID*)item.pszText); - ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "retrieve with LVIF_NORECOMPUTE seq 2", FALSE); - - DestroyWindow(hwnd); -} - -static void test_nosortheader(void) -{ - HWND hwnd, header; - LONG_PTR style; - - hwnd = create_listview_control(LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - - header = (HWND)SendMessageA(hwnd, LVM_GETHEADER, 0, 0); - ok(IsWindow(header), "header expected\n"); - - style = GetWindowLongPtr(header, GWL_STYLE); - ok(style & HDS_BUTTONS, "expected header to have HDS_BUTTONS\n"); - - style = GetWindowLongPtr(hwnd, GWL_STYLE); - SetWindowLongPtr(hwnd, GWL_STYLE, style | LVS_NOSORTHEADER); - /* HDS_BUTTONS retained */ - style = GetWindowLongPtr(header, GWL_STYLE); - ok(style & HDS_BUTTONS, "expected header to retain HDS_BUTTONS\n"); - - DestroyWindow(hwnd); - - /* create with LVS_NOSORTHEADER */ - hwnd = create_listview_control(LVS_NOSORTHEADER | LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - - header = (HWND)SendMessageA(hwnd, LVM_GETHEADER, 0, 0); - ok(IsWindow(header), "header expected\n"); - - style = GetWindowLongPtr(header, GWL_STYLE); - ok(!(style & HDS_BUTTONS), "expected header to have no HDS_BUTTONS\n"); - - style = GetWindowLongPtr(hwnd, GWL_STYLE); - SetWindowLongPtr(hwnd, GWL_STYLE, style & ~LVS_NOSORTHEADER); - /* not changed here */ - style = GetWindowLongPtr(header, GWL_STYLE); - ok(!(style & HDS_BUTTONS), "expected header to have no HDS_BUTTONS\n"); - - DestroyWindow(hwnd); -} - -static void test_setredraw(void) -{ - HWND hwnd; - DWORD_PTR style; - DWORD ret; - HDC hdc; - RECT rect; - - hwnd = create_listview_control(LVS_OWNERDATA | LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - - /* Passing WM_SETREDRAW to DefWinProc removes WS_VISIBLE. - ListView seems to handle it internally without DefWinProc */ - - /* default value first */ - ret = SendMessage(hwnd, WM_SETREDRAW, TRUE, 0); - expect(0, ret); - /* disable */ - style = GetWindowLongPtr(hwnd, GWL_STYLE); - ok(style & WS_VISIBLE, "Expected WS_VISIBLE to be set\n"); - ret = SendMessage(hwnd, WM_SETREDRAW, FALSE, 0); - expect(0, ret); - style = GetWindowLongPtr(hwnd, GWL_STYLE); - ok(style & WS_VISIBLE, "Expected WS_VISIBLE to be set\n"); - ret = SendMessage(hwnd, WM_SETREDRAW, TRUE, 0); - expect(0, ret); - - /* check update rect after redrawing */ - ret = SendMessage(hwnd, WM_SETREDRAW, FALSE, 0); - expect(0, ret); - InvalidateRect(hwnd, NULL, FALSE); - RedrawWindow(hwnd, NULL, NULL, RDW_UPDATENOW); - rect.right = rect.bottom = 1; - GetUpdateRect(hwnd, &rect, FALSE); - expect(0, rect.right); - expect(0, rect.bottom); - - /* WM_ERASEBKGND */ - hdc = GetWindowDC(hwndparent); - ret = SendMessage(hwnd, WM_ERASEBKGND, (WPARAM)hdc, 0); - expect(TRUE, ret); - ret = SendMessage(hwnd, WM_SETREDRAW, FALSE, 0); - expect(0, ret); - ret = SendMessage(hwnd, WM_ERASEBKGND, (WPARAM)hdc, 0); - expect(TRUE, ret); - ret = SendMessage(hwnd, WM_SETREDRAW, TRUE, 0); - expect(0, ret); - ReleaseDC(hwndparent, hdc); - - /* check notification messages to show that repainting is disabled */ - ret = SendMessage(hwnd, LVM_SETITEMCOUNT, 1, 0); - expect(TRUE, ret); - ret = SendMessage(hwnd, WM_SETREDRAW, FALSE, 0); - expect(0, ret); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - InvalidateRect(hwnd, NULL, TRUE); - UpdateWindow(hwnd); - ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, - "redraw after WM_SETREDRAW (FALSE)", FALSE); - - ret = SendMessage(hwnd, LVM_SETBKCOLOR, 0, CLR_NONE); - expect(TRUE, ret); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - InvalidateRect(hwnd, NULL, TRUE); - UpdateWindow(hwnd); - ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, - "redraw after WM_SETREDRAW (FALSE) with CLR_NONE bkgnd", FALSE); - - /* message isn't forwarded to header */ - subclass_header(hwnd); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - ret = SendMessage(hwnd, WM_SETREDRAW, FALSE, 0); - expect(0, ret); - ok_sequence(sequences, LISTVIEW_SEQ_INDEX, setredraw_seq, - "WM_SETREDRAW: not forwarded to header", FALSE); - - DestroyWindow(hwnd); -} - -static void test_hittest(void) -{ - HWND hwnd; - DWORD r; - RECT bounds; - LVITEMA item; - static CHAR text[] = "1234567890ABCDEFGHIJKLMNOPQRST"; - POINT pos; - INT x, y; - HIMAGELIST himl, himl2; - HBITMAP hbmp; - - hwnd = create_listview_control(LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - - /* LVS_REPORT with a single subitem (2 columns) */ - insert_column(hwnd, 0); - insert_column(hwnd, 1); - insert_item(hwnd, 0); - - item.iSubItem = 0; - /* the only purpose of that line is to be as long as a half item rect */ - item.pszText = text; - r = SendMessage(hwnd, LVM_SETITEMTEXT, 0, (LPARAM)&item); - expect(TRUE, r); - - r = SendMessage(hwnd, LVM_SETCOLUMNWIDTH, 0, MAKELPARAM(100, 0)); - expect(TRUE, r); - r = SendMessage(hwnd, LVM_SETCOLUMNWIDTH, 1, MAKELPARAM(100, 0)); - expect(TRUE, r); - - memset(&bounds, 0, sizeof(bounds)); - bounds.left = LVIR_BOUNDS; - r = SendMessage(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&bounds); - ok(bounds.bottom - bounds.top > 0, "Expected non zero item height\n"); - ok(bounds.right - bounds.left > 0, "Expected non zero item width\n"); - r = SendMessage(hwnd, LVM_GETITEMPOSITION, 0, (LPARAM)&pos); - expect(TRUE, r); - - /* LVS_EX_FULLROWSELECT not set, no icons attached */ - - /* outside columns by x position - valid is [0, 199] */ - x = -1; - y = pos.y + (bounds.bottom - bounds.top) / 2; - test_lvm_hittest(hwnd, x, y, -1, LVHT_TOLEFT, 0, FALSE, FALSE); - test_lvm_subitemhittest(hwnd, x, y, -1, -1, LVHT_NOWHERE, FALSE, FALSE, FALSE); - - x = pos.x + 50; /* column half width */ - y = pos.y + (bounds.bottom - bounds.top) / 2; - test_lvm_hittest(hwnd, x, y, 0, LVHT_ONITEMLABEL, 0, FALSE, FALSE); - test_lvm_subitemhittest(hwnd, x, y, 0, 0, LVHT_ONITEMLABEL, FALSE, FALSE, FALSE); - x = pos.x + 150; /* outside column */ - y = pos.y + (bounds.bottom - bounds.top) / 2; - test_lvm_hittest(hwnd, x, y, -1, LVHT_TORIGHT, 0, FALSE, FALSE); - test_lvm_subitemhittest(hwnd, x, y, 0, 1, LVHT_ONITEMLABEL, FALSE, FALSE, FALSE); - y = (bounds.bottom - bounds.top) / 2; - test_lvm_hittest(hwnd, x, y, -1, LVHT_TORIGHT, 0, FALSE, TRUE); - test_lvm_subitemhittest(hwnd, x, y, 0, 1, LVHT_ONITEMLABEL, FALSE, FALSE, FALSE); - /* outside possible client rectangle (to right) */ - x = pos.x + 500; - y = pos.y + (bounds.bottom - bounds.top) / 2; - test_lvm_hittest(hwnd, x, y, -1, LVHT_TORIGHT, 0, FALSE, FALSE); - test_lvm_subitemhittest(hwnd, x, y, -1, -1, LVHT_NOWHERE, FALSE, FALSE, FALSE); - y = (bounds.bottom - bounds.top) / 2; - test_lvm_hittest(hwnd, x, y, -1, LVHT_TORIGHT, 0, FALSE, TRUE); - test_lvm_subitemhittest(hwnd, x, y, -1, -1, LVHT_NOWHERE, FALSE, FALSE, FALSE); - /* subitem returned with -1 item too */ - x = pos.x + 150; - y = -10; - test_lvm_subitemhittest(hwnd, x, y, -1, 1, LVHT_NOWHERE, FALSE, FALSE, FALSE); - /* parent client area is 100x100 by default */ - MoveWindow(hwnd, 0, 0, 300, 100, FALSE); - x = pos.x + 150; /* outside column */ - y = pos.y + (bounds.bottom - bounds.top) / 2; - test_lvm_hittest(hwnd, x, y, -1, LVHT_NOWHERE, 0, FALSE, FALSE); - test_lvm_subitemhittest(hwnd, x, y, 0, 1, LVHT_ONITEMLABEL, FALSE, FALSE, FALSE); - y = (bounds.bottom - bounds.top) / 2; - test_lvm_hittest(hwnd, x, y, -1, LVHT_NOWHERE, 0, FALSE, TRUE); - test_lvm_subitemhittest(hwnd, x, y, 0, 1, LVHT_ONITEMLABEL, FALSE, FALSE, FALSE); - /* the same with LVS_EX_FULLROWSELECT */ - SendMessage(hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT); - x = pos.x + 150; /* outside column */ - y = pos.y + (bounds.bottom - bounds.top) / 2; - test_lvm_hittest(hwnd, x, y, 0, LVHT_ONITEM, LVHT_ONITEMLABEL, FALSE, FALSE); - test_lvm_subitemhittest(hwnd, x, y, 0, 1, LVHT_ONITEMLABEL, FALSE, FALSE, FALSE); - y = (bounds.bottom - bounds.top) / 2; - test_lvm_subitemhittest(hwnd, x, y, 0, 1, LVHT_ONITEMLABEL, FALSE, FALSE, FALSE); - MoveWindow(hwnd, 0, 0, 100, 100, FALSE); - x = pos.x + 150; /* outside column */ - y = pos.y + (bounds.bottom - bounds.top) / 2; - test_lvm_hittest(hwnd, x, y, -1, LVHT_TORIGHT, 0, FALSE, FALSE); - test_lvm_subitemhittest(hwnd, x, y, 0, 1, LVHT_ONITEMLABEL, FALSE, FALSE, FALSE); - y = (bounds.bottom - bounds.top) / 2; - test_lvm_hittest(hwnd, x, y, -1, LVHT_TORIGHT, 0, FALSE, TRUE); - test_lvm_subitemhittest(hwnd, x, y, 0, 1, LVHT_ONITEMLABEL, FALSE, FALSE, FALSE); - /* outside possible client rectangle (to right) */ - x = pos.x + 500; - y = pos.y + (bounds.bottom - bounds.top) / 2; - test_lvm_hittest(hwnd, x, y, -1, LVHT_TORIGHT, 0, FALSE, FALSE); - test_lvm_subitemhittest(hwnd, x, y, -1, -1, LVHT_NOWHERE, FALSE, FALSE, FALSE); - y = (bounds.bottom - bounds.top) / 2; - test_lvm_hittest(hwnd, x, y, -1, LVHT_TORIGHT, 0, FALSE, TRUE); - test_lvm_subitemhittest(hwnd, x, y, -1, -1, LVHT_NOWHERE, FALSE, FALSE, FALSE); - /* try with icons, state icons index is 1 based so at least 2 bitmaps needed */ - himl = ImageList_Create(16, 16, 0, 4, 4); - ok(himl != NULL, "failed to create imagelist\n"); - hbmp = CreateBitmap(16, 16, 1, 1, NULL); - ok(hbmp != NULL, "failed to create bitmap\n"); - r = ImageList_Add(himl, hbmp, 0); - ok(r == 0, "should be zero\n"); - hbmp = CreateBitmap(16, 16, 1, 1, NULL); - ok(hbmp != NULL, "failed to create bitmap\n"); - r = ImageList_Add(himl, hbmp, 0); - ok(r == 1, "should be one\n"); - - r = SendMessage(hwnd, LVM_SETIMAGELIST, LVSIL_STATE, (LPARAM)himl); - ok(r == 0, "should return zero\n"); - - item.mask = LVIF_IMAGE; - item.iImage = 0; - item.iItem = 0; - item.iSubItem = 0; - r = SendMessage(hwnd, LVM_SETITEM, 0, (LPARAM)&item); - expect(TRUE, r); - /* on state icon */ - x = pos.x + 8; - y = pos.y + (bounds.bottom - bounds.top) / 2; - test_lvm_hittest(hwnd, x, y, 0, LVHT_ONITEMSTATEICON, 0, FALSE, FALSE); - test_lvm_subitemhittest(hwnd, x, y, 0, 0, LVHT_ONITEMSTATEICON, FALSE, FALSE, FALSE); - y = (bounds.bottom - bounds.top) / 2; - test_lvm_subitemhittest(hwnd, x, y, 0, 0, LVHT_ONITEMSTATEICON, FALSE, FALSE, FALSE); - - /* state icons indices are 1 based, check with valid index */ - item.mask = LVIF_STATE; - item.state = INDEXTOSTATEIMAGEMASK(1); - item.stateMask = LVIS_STATEIMAGEMASK; - item.iItem = 0; - item.iSubItem = 0; - r = SendMessage(hwnd, LVM_SETITEM, 0, (LPARAM)&item); - expect(TRUE, r); - /* on state icon */ - x = pos.x + 8; - y = pos.y + (bounds.bottom - bounds.top) / 2; - test_lvm_hittest(hwnd, x, y, 0, LVHT_ONITEMSTATEICON, 0, FALSE, FALSE); - test_lvm_subitemhittest(hwnd, x, y, 0, 0, LVHT_ONITEMSTATEICON, FALSE, FALSE, FALSE); - y = (bounds.bottom - bounds.top) / 2; - test_lvm_subitemhittest(hwnd, x, y, 0, 0, LVHT_ONITEMSTATEICON, FALSE, FALSE, FALSE); - - himl2 = (HIMAGELIST)SendMessage(hwnd, LVM_SETIMAGELIST, LVSIL_STATE, 0); - ok(himl2 == himl, "should return handle\n"); - - r = SendMessage(hwnd, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM)himl); - ok(r == 0, "should return zero\n"); - /* on item icon */ - x = pos.x + 8; - y = pos.y + (bounds.bottom - bounds.top) / 2; - test_lvm_hittest(hwnd, x, y, 0, LVHT_ONITEMICON, 0, FALSE, FALSE); - test_lvm_subitemhittest(hwnd, x, y, 0, 0, LVHT_ONITEMICON, FALSE, FALSE, FALSE); - y = (bounds.bottom - bounds.top) / 2; - test_lvm_subitemhittest(hwnd, x, y, 0, 0, LVHT_ONITEMICON, FALSE, FALSE, FALSE); - - DestroyWindow(hwnd); -} - -static void test_getviewrect(void) -{ - HWND hwnd; - DWORD r; - RECT rect; - LVITEMA item; - - hwnd = create_listview_control(LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - - /* empty */ - r = SendMessage(hwnd, LVM_GETVIEWRECT, 0, (LPARAM)&rect); - expect(TRUE, r); - - insert_column(hwnd, 0); - insert_column(hwnd, 1); - - memset(&item, 0, sizeof(item)); - item.iItem = 0; - item.iSubItem = 0; - SendMessage(hwnd, LVM_INSERTITEMA, 0, (LPARAM)&item); - - r = SendMessage(hwnd, LVM_SETCOLUMNWIDTH, 0, MAKELPARAM(100, 0)); - expect(TRUE, r); - r = SendMessage(hwnd, LVM_SETCOLUMNWIDTH, 1, MAKELPARAM(120, 0)); - expect(TRUE, r); - - rect.left = rect.right = rect.top = rect.bottom = -1; - r = SendMessage(hwnd, LVM_GETVIEWRECT, 0, (LPARAM)&rect); - expect(TRUE, r); - /* left is set to (2e31-1) - XP SP2 */ - expect(0, rect.right); - expect(0, rect.top); - expect(0, rect.bottom); - - /* switch to LVS_ICON */ - SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd, GWL_STYLE) & ~LVS_REPORT); - - rect.left = rect.right = rect.top = rect.bottom = -1; - r = SendMessage(hwnd, LVM_GETVIEWRECT, 0, (LPARAM)&rect); - expect(TRUE, r); - expect(0, rect.left); - expect(0, rect.top); - /* precise value differs for 2k, XP and Vista */ - ok(rect.bottom > 0, "Expected positive bottom value, got %d\n", rect.bottom); - ok(rect.right > 0, "Expected positive right value, got %d\n", rect.right); - - DestroyWindow(hwnd); -} - -static void test_getitemposition(void) -{ - HWND hwnd, header; - DWORD r; - POINT pt; - RECT rect; - - hwnd = create_listview_control(LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - header = subclass_header(hwnd); - - /* LVS_REPORT, single item, no columns added */ - insert_item(hwnd, 0); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - pt.x = pt.y = -1; - r = SendMessage(hwnd, LVM_GETITEMPOSITION, 0, (LPARAM)&pt); - expect(TRUE, r); - ok_sequence(sequences, LISTVIEW_SEQ_INDEX, getitemposition_seq1, "get item position 1", FALSE); - - /* LVS_REPORT, single item, single column */ - insert_column(hwnd, 0); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - pt.x = pt.y = -1; - r = SendMessage(hwnd, LVM_GETITEMPOSITION, 0, (LPARAM)&pt); - expect(TRUE, r); - ok_sequence(sequences, LISTVIEW_SEQ_INDEX, getitemposition_seq2, "get item position 2", TRUE); - - memset(&rect, 0, sizeof(rect)); - SendMessage(header, HDM_GETITEMRECT, 0, (LPARAM)&rect); - /* some padding? */ - expect(2, pt.x); - /* offset by header height */ - expect(rect.bottom - rect.top, pt.y); - - DestroyWindow(hwnd); -} - -static void test_columnscreation(void) -{ - HWND hwnd, header; - DWORD r; - - hwnd = create_listview_control(LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - - insert_item(hwnd, 0); - - /* headers columns aren't created automatically */ - header = (HWND)SendMessage(hwnd, LVM_GETHEADER, 0, 0); - ok(IsWindow(header), "Expected header handle\n"); - r = SendMessage(header, HDM_GETITEMCOUNT, 0, 0); - expect(0, r); - - DestroyWindow(hwnd); -} - -static void test_getitemrect(void) -{ - HWND hwnd; - HIMAGELIST himl; - HBITMAP hbm; - RECT rect; - DWORD r; - LVITEMA item; - LVCOLUMNA col; - INT order[2]; - POINT pt; - - /* rectangle isn't empty for empty text items */ - hwnd = create_listview_control(LVS_LIST); - memset(&item, 0, sizeof(item)); - item.mask = 0; - item.iItem = 0; - r = SendMessage(hwnd, LVM_INSERTITEMA, 0, (LPARAM)&item); - expect(0, r); - rect.left = LVIR_LABEL; - SendMessage(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); - expect(0, rect.left); - expect(0, rect.top); - todo_wine expect(96, rect.right); - DestroyWindow(hwnd); - - hwnd = create_listview_control(LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - - /* empty item */ - memset(&item, 0, sizeof(item)); - item.iItem = 0; - item.iSubItem = 0; - r = SendMessage(hwnd, LVM_INSERTITEMA, 0, (LPARAM)&item); - expect(0, r); - - rect.left = LVIR_BOUNDS; - rect.right = rect.top = rect.bottom = -1; - r = SendMessage(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); - expect(TRUE, r); - - /* zero width rectangle with no padding */ - expect(0, rect.left); - expect(0, rect.right); - - insert_column(hwnd, 0); - insert_column(hwnd, 1); - - col.mask = LVCF_WIDTH; - col.cx = 50; - r = SendMessage(hwnd, LVM_SETCOLUMN, 0, (LPARAM)&col); - expect(TRUE, r); - - col.mask = LVCF_WIDTH; - col.cx = 100; - r = SendMessage(hwnd, LVM_SETCOLUMN, 1, (LPARAM)&col); - expect(TRUE, r); - - rect.left = LVIR_BOUNDS; - rect.right = rect.top = rect.bottom = -1; - r = SendMessage(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); - expect(TRUE, r); - - /* still no left padding */ - expect(0, rect.left); - expect(150, rect.right); - - rect.left = LVIR_SELECTBOUNDS; - rect.right = rect.top = rect.bottom = -1; - r = SendMessage(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); - expect(TRUE, r); - /* padding */ - expect(2, rect.left); - - rect.left = LVIR_LABEL; - rect.right = rect.top = rect.bottom = -1; - r = SendMessage(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); - expect(TRUE, r); - /* padding, column width */ - expect(2, rect.left); - expect(50, rect.right); - - /* no icons attached */ - rect.left = LVIR_ICON; - rect.right = rect.top = rect.bottom = -1; - r = SendMessage(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); - expect(TRUE, r); - /* padding */ - expect(2, rect.left); - expect(2, rect.right); - - /* change order */ - order[0] = 1; order[1] = 0; - r = SendMessage(hwnd, LVM_SETCOLUMNORDERARRAY, 2, (LPARAM)&order); - expect(TRUE, r); - pt.x = -1; - r = SendMessage(hwnd, LVM_GETITEMPOSITION, 0, (LPARAM)&pt); - expect(TRUE, r); - /* 1 indexed column width + padding */ - expect(102, pt.x); - /* rect is at zero too */ - rect.left = LVIR_BOUNDS; - rect.right = rect.top = rect.bottom = -1; - r = SendMessage(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); - expect(TRUE, r); - expect(0, rect.left); - /* just width sum */ - expect(150, rect.right); - - rect.left = LVIR_SELECTBOUNDS; - rect.right = rect.top = rect.bottom = -1; - r = SendMessage(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); - expect(TRUE, r); - /* column width + padding */ - expect(102, rect.left); - - /* back to initial order */ - order[0] = 0; order[1] = 1; - r = SendMessage(hwnd, LVM_SETCOLUMNORDERARRAY, 2, (LPARAM)&order); - expect(TRUE, r); - - /* state icons */ - himl = ImageList_Create(16, 16, 0, 2, 2); - ok(himl != NULL, "failed to create imagelist\n"); - hbm = CreateBitmap(16, 16, 1, 1, NULL); - ok(hbm != NULL, "failed to create bitmap\n"); - r = ImageList_Add(himl, hbm, 0); - ok(r == 0, "should be zero\n"); - hbm = CreateBitmap(16, 16, 1, 1, NULL); - ok(hbm != NULL, "failed to create bitmap\n"); - r = ImageList_Add(himl, hbm, 0); - ok(r == 1, "should be one\n"); - - r = SendMessage(hwnd, LVM_SETIMAGELIST, LVSIL_STATE, (LPARAM)himl); - ok(r == 0, "should return zero\n"); - - item.mask = LVIF_STATE; - item.state = INDEXTOSTATEIMAGEMASK(1); - item.stateMask = LVIS_STATEIMAGEMASK; - item.iItem = 0; - item.iSubItem = 0; - r = SendMessage(hwnd, LVM_SETITEM, 0, (LPARAM)&item); - expect(TRUE, r); - - /* icon bounds */ - rect.left = LVIR_ICON; - rect.right = rect.top = rect.bottom = -1; - r = SendMessage(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); - expect(TRUE, r); - /* padding + stateicon width */ - expect(18, rect.left); - expect(18, rect.right); - /* label bounds */ - rect.left = LVIR_LABEL; - rect.right = rect.top = rect.bottom = -1; - r = SendMessage(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); - expect(TRUE, r); - /* padding + stateicon width -> column width */ - expect(18, rect.left); - expect(50, rect.right); - - r = SendMessage(hwnd, LVM_SETIMAGELIST, LVSIL_STATE, 0); - ok(r != 0, "should return current list handle\n"); - - r = SendMessage(hwnd, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM)himl); - ok(r == 0, "should return zero\n"); - - item.mask = LVIF_STATE | LVIF_IMAGE; - item.iImage = 1; - item.state = 0; - item.stateMask = ~0; - item.iItem = 0; - item.iSubItem = 0; - r = SendMessage(hwnd, LVM_SETITEM, 0, (LPARAM)&item); - expect(TRUE, r); - - /* icon bounds */ - rect.left = LVIR_ICON; - rect.right = rect.top = rect.bottom = -1; - r = SendMessage(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); - expect(TRUE, r); - /* padding, icon width */ - expect(2, rect.left); - expect(18, rect.right); - /* label bounds */ - rect.left = LVIR_LABEL; - rect.right = rect.top = rect.bottom = -1; - r = SendMessage(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); - expect(TRUE, r); - /* padding + icon width -> column width */ - expect(18, rect.left); - expect(50, rect.right); - - /* select bounds */ - rect.left = LVIR_SELECTBOUNDS; - rect.right = rect.top = rect.bottom = -1; - r = SendMessage(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); - expect(TRUE, r); - /* padding, column width */ - expect(2, rect.left); - expect(50, rect.right); - - /* try with indentation */ - item.mask = LVIF_INDENT; - item.iIndent = 1; - item.iItem = 0; - item.iSubItem = 0; - r = SendMessage(hwnd, LVM_SETITEM, 0, (LPARAM)&item); - expect(TRUE, r); - - /* bounds */ - rect.left = LVIR_BOUNDS; - rect.right = rect.top = rect.bottom = -1; - r = SendMessage(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); - expect(TRUE, r); - /* padding + 1 icon width, column width */ - expect(0, rect.left); - expect(150, rect.right); - - /* select bounds */ - rect.left = LVIR_SELECTBOUNDS; - rect.right = rect.top = rect.bottom = -1; - r = SendMessage(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); - expect(TRUE, r); - /* padding + 1 icon width, column width */ - expect(2 + 16, rect.left); - expect(50, rect.right); - - /* label bounds */ - rect.left = LVIR_LABEL; - rect.right = rect.top = rect.bottom = -1; - r = SendMessage(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); - expect(TRUE, r); - /* padding + 2 icon widths, column width */ - expect(2 + 16*2, rect.left); - expect(50, rect.right); - - /* icon bounds */ - rect.left = LVIR_ICON; - rect.right = rect.top = rect.bottom = -1; - r = SendMessage(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&rect); - expect(TRUE, r); - /* padding + 1 icon width indentation, icon width */ - expect(2 + 16, rect.left); - expect(34, rect.right); - - DestroyWindow(hwnd); -} - -static void test_editbox(void) -{ - static CHAR testitemA[] = "testitem"; - static CHAR testitem1A[] = "testitem_quitelongname"; - static CHAR buffer[25]; - HWND hwnd, hwndedit, hwndedit2, header; - LVITEMA item; - DWORD r; - - hwnd = create_listview_control(LVS_EDITLABELS | LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - - insert_column(hwnd, 0); - - memset(&item, 0, sizeof(item)); - item.mask = LVIF_TEXT; - item.pszText = testitemA; - item.iItem = 0; - item.iSubItem = 0; - r = SendMessage(hwnd, LVM_INSERTITEMA, 0, (LPARAM)&item); - expect(0, r); - - /* test notifications without edit created */ - flush_sequences(sequences, NUM_MSG_SEQUENCES); - r = SendMessage(hwnd, WM_COMMAND, MAKEWPARAM(0, EN_SETFOCUS), (LPARAM)0xdeadbeef); - expect(0, r); - ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, - "edit box WM_COMMAND (EN_SETFOCUS), no edit created", FALSE); - /* same thing but with valid window */ - hwndedit = CreateWindowA("Edit", "Test edit", WS_VISIBLE | WS_CHILD, 0, 0, 20, - 10, hwnd, (HMENU)1, (HINSTANCE)GetWindowLongPtrA(hwnd, GWLP_HINSTANCE), 0); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - r = SendMessage(hwnd, WM_COMMAND, MAKEWPARAM(0, EN_SETFOCUS), (LPARAM)hwndedit); - expect(0, r); - ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, - "edit box WM_COMMAND (EN_SETFOCUS), no edit created #2", FALSE); - DestroyWindow(hwndedit); - - /* setting focus is necessary */ - SetFocus(hwnd); - hwndedit = (HWND)SendMessage(hwnd, LVM_EDITLABEL, 0, 0); - ok(IsWindow(hwndedit), "Expected Edit window to be created\n"); - - /* test children Z-order after Edit box created */ - header = (HWND)SendMessageA(hwnd, LVM_GETHEADER, 0, 0); - ok(IsWindow(header), "Expected header to be created\n"); - ok(GetTopWindow(hwnd) == header, "Expected header to be on top\n"); - ok(GetNextWindow(header, GW_HWNDNEXT) == hwndedit, "got %p\n", GetNextWindow(header, GW_HWNDNEXT)); - - /* modify initial string */ - r = SendMessage(hwndedit, WM_SETTEXT, 0, (LPARAM)testitem1A); - expect(TRUE, r); - - /* edit window is resized and repositioned, - check again for Z-order - it should be preserved */ - ok(GetTopWindow(hwnd) == header, "Expected header to be on top\n"); - ok(GetNextWindow(header, GW_HWNDNEXT) == hwndedit, "got %p\n", GetNextWindow(header, GW_HWNDNEXT)); - - /* return focus to listview */ - SetFocus(hwnd); - - memset(&item, 0, sizeof(item)); - item.mask = LVIF_TEXT; - item.pszText = buffer; - item.cchTextMax = sizeof(buffer); - item.iItem = 0; - item.iSubItem = 0; - r = SendMessage(hwnd, LVM_GETITEMA, 0, (LPARAM)&item); - expect(TRUE, r); - - ok(strcmp(buffer, testitem1A) == 0, "Expected item text to change\n"); - - /* send LVM_EDITLABEL on already created edit */ - SetFocus(hwnd); - hwndedit = (HWND)SendMessage(hwnd, LVM_EDITLABEL, 0, 0); - ok(IsWindow(hwndedit), "Expected Edit window to be created\n"); - /* focus will be set to edit */ - ok(GetFocus() == hwndedit, "Expected Edit window to be focused\n"); - hwndedit2 = (HWND)SendMessage(hwnd, LVM_EDITLABEL, 0, 0); - ok(IsWindow(hwndedit2), "Expected Edit window to be created\n"); - - /* creating label disabled when control isn't focused */ - SetFocus(0); - hwndedit = (HWND)SendMessage(hwnd, LVM_EDITLABEL, 0, 0); - todo_wine ok(hwndedit == NULL, "Expected Edit window not to be created\n"); - - /* check EN_KILLFOCUS handling */ - memset(&item, 0, sizeof(item)); - item.pszText = testitemA; - item.iItem = 0; - item.iSubItem = 0; - r = SendMessage(hwnd, LVM_SETITEMTEXTA, 0, (LPARAM)&item); - expect(TRUE, r); - - SetFocus(hwnd); - hwndedit = (HWND)SendMessage(hwnd, LVM_EDITLABEL, 0, 0); - ok(IsWindow(hwndedit), "Expected Edit window to be created\n"); - /* modify edit and notify control that it lost focus */ - r = SendMessage(hwndedit, WM_SETTEXT, 0, (LPARAM)testitem1A); - expect(TRUE, r); - r = SendMessage(hwnd, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), (LPARAM)hwndedit); - expect(0, r); - memset(&item, 0, sizeof(item)); - item.pszText = buffer; - item.cchTextMax = sizeof(buffer); - item.iItem = 0; - item.iSubItem = 0; - r = SendMessage(hwnd, LVM_GETITEMTEXTA, 0, (LPARAM)&item); - expect(lstrlen(item.pszText), r); - ok(strcmp(buffer, testitem1A) == 0, "Expected item text to change\n"); - ok(!IsWindow(hwndedit), "Expected Edit window to be freed\n"); - /* end edit without saving */ - SetFocus(hwnd); - hwndedit = (HWND)SendMessage(hwnd, LVM_EDITLABEL, 0, 0); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - r = SendMessage(hwndedit, WM_KEYDOWN, VK_ESCAPE, 0); - expect(0, r); - ok_sequence(sequences, PARENT_SEQ_INDEX, edit_end_nochange, - "edit box - end edit, no change, escape", TRUE); - /* end edit with saving */ - SetFocus(hwnd); - hwndedit = (HWND)SendMessage(hwnd, LVM_EDITLABEL, 0, 0); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - r = SendMessage(hwndedit, WM_KEYDOWN, VK_RETURN, 0); - expect(0, r); - ok_sequence(sequences, PARENT_SEQ_INDEX, edit_end_nochange, - "edit box - end edit, no change, return", TRUE); - - memset(&item, 0, sizeof(item)); - item.pszText = buffer; - item.cchTextMax = sizeof(buffer); - item.iItem = 0; - item.iSubItem = 0; - r = SendMessage(hwnd, LVM_GETITEMTEXTA, 0, (LPARAM)&item); - expect(lstrlen(item.pszText), r); - ok(strcmp(buffer, testitem1A) == 0, "Expected item text to change\n"); - - /* LVM_EDITLABEL with -1 destroys current edit */ - hwndedit = (HWND)SendMessage(hwnd, LVM_GETEDITCONTROL, 0, 0); - ok(hwndedit == NULL, "Expected Edit window not to be created\n"); - /* no edit present */ - hwndedit = (HWND)SendMessage(hwnd, LVM_EDITLABEL, -1, 0); - ok(hwndedit == NULL, "Expected Edit window not to be created\n"); - hwndedit = (HWND)SendMessage(hwnd, LVM_EDITLABEL, 0, 0); - ok(IsWindow(hwndedit), "Expected Edit window to be created\n"); - /* edit present */ - ok(GetFocus() == hwndedit, "Expected Edit to be focused\n"); - hwndedit2 = (HWND)SendMessage(hwnd, LVM_EDITLABEL, -1, 0); - ok(hwndedit2 == NULL, "Expected Edit window not to be created\n"); - ok(!IsWindow(hwndedit), "Expected Edit window to be destroyed\n"); - ok(GetFocus() == hwnd, "Expected List to be focused\n"); - /* check another negative value */ - hwndedit = (HWND)SendMessage(hwnd, LVM_EDITLABEL, 0, 0); - ok(IsWindow(hwndedit), "Expected Edit window to be created\n"); - ok(GetFocus() == hwndedit, "Expected Edit to be focused\n"); - hwndedit2 = (HWND)SendMessage(hwnd, LVM_EDITLABEL, -2, 0); - ok(hwndedit2 == NULL, "Expected Edit window not to be created\n"); - ok(!IsWindow(hwndedit), "Expected Edit window to be destroyed\n"); - ok(GetFocus() == hwnd, "Expected List to be focused\n"); - /* and value greater than max item index */ - hwndedit = (HWND)SendMessage(hwnd, LVM_EDITLABEL, 0, 0); - ok(IsWindow(hwndedit), "Expected Edit window to be created\n"); - ok(GetFocus() == hwndedit, "Expected Edit to be focused\n"); - r = SendMessage(hwnd, LVM_GETITEMCOUNT, 0, 0); - hwndedit2 = (HWND)SendMessage(hwnd, LVM_EDITLABEL, r, 0); - ok(hwndedit2 == NULL, "Expected Edit window not to be created\n"); - ok(!IsWindow(hwndedit), "Expected Edit window to be destroyed\n"); - ok(GetFocus() == hwnd, "Expected List to be focused\n"); - - /* messaging tests */ - SetFocus(hwnd); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - blockEdit = FALSE; - hwndedit = (HWND)SendMessage(hwnd, LVM_EDITLABEL, 0, 0); - ok(IsWindow(hwndedit), "Expected Edit window to be created\n"); - /* testing only sizing messages */ - ok_sequence(sequences, EDITBOX_SEQ_INDEX, editbox_create_pos, - "edit box create - sizing", FALSE); - - /* WM_COMMAND with EN_KILLFOCUS isn't forwared to parent */ - SetFocus(hwnd); - hwndedit = (HWND)SendMessage(hwnd, LVM_EDITLABEL, 0, 0); - ok(IsWindow(hwndedit), "Expected Edit window to be created\n"); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - r = SendMessage(hwnd, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), (LPARAM)hwndedit); - expect(0, r); - ok_sequence(sequences, PARENT_SEQ_INDEX, edit_end_nochange, - "edit box WM_COMMAND (EN_KILLFOCUS)", TRUE); - - DestroyWindow(hwnd); -} - -static void test_notifyformat(void) -{ - HWND hwnd, header; - DWORD r; - - hwnd = create_listview_control(LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - - /* CCM_GETUNICODEFORMAT == LVM_GETUNICODEFORMAT, - CCM_SETUNICODEFORMAT == LVM_SETUNICODEFORMAT */ - r = SendMessage(hwnd, LVM_GETUNICODEFORMAT, 0, 0); - expect(0, r); - r = SendMessage(hwnd, WM_NOTIFYFORMAT, 0, NF_QUERY); - /* set */ - r = SendMessage(hwnd, LVM_SETUNICODEFORMAT, 1, 0); - expect(0, r); - r = SendMessage(hwnd, LVM_GETUNICODEFORMAT, 0, 0); - if (r == 1) - { - r = SendMessage(hwnd, LVM_SETUNICODEFORMAT, 0, 0); - expect(1, r); - r = SendMessage(hwnd, LVM_GETUNICODEFORMAT, 0, 0); - expect(0, r); - } - else - { - win_skip("LVM_GETUNICODEFORMAT is unsupported\n"); - DestroyWindow(hwnd); - return; - } - - DestroyWindow(hwnd); - - /* test failure in parent WM_NOTIFYFORMAT */ - notifyFormat = 0; - hwnd = create_listview_control(LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - header = (HWND)SendMessage(hwnd, LVM_GETHEADER, 0, 0); - ok(IsWindow(header), "expected header to be created\n"); - r = SendMessage(hwnd, LVM_GETUNICODEFORMAT, 0, 0); - expect(0, r); - r = SendMessage(header, HDM_GETUNICODEFORMAT, 0, 0); - ok( r == 1 || broken(r == 0), /* win9x */ "Expected 1, got %d\n", r ); - r = SendMessage(hwnd, WM_NOTIFYFORMAT, 0, NF_QUERY); - ok(r != 0, "Expected valid format\n"); - - notifyFormat = NFR_UNICODE; - r = SendMessage(hwnd, WM_NOTIFYFORMAT, 0, NF_REQUERY); - expect(NFR_UNICODE, r); - r = SendMessage(hwnd, LVM_GETUNICODEFORMAT, 0, 0); - expect(1, r); - r = SendMessage(header, HDM_GETUNICODEFORMAT, 0, 0); - ok( r == 1 || broken(r == 0), /* win9x */ "Expected 1, got %d\n", r ); - - notifyFormat = NFR_ANSI; - r = SendMessage(hwnd, WM_NOTIFYFORMAT, 0, NF_REQUERY); - expect(NFR_ANSI, r); - r = SendMessage(hwnd, LVM_GETUNICODEFORMAT, 0, 0); - expect(0, r); - r = SendMessage(header, HDM_GETUNICODEFORMAT, 0, 0); - ok( r == 1 || broken(r == 0), /* win9x */ "Expected 1, got %d\n", r ); - - DestroyWindow(hwnd); - - /* try different unicode window combination and defaults */ - if (!GetModuleHandleW(NULL)) - { - win_skip("Additional notify format tests are incompatible with Win9x\n"); - return; - } - - hwndparentW = create_parent_window(TRUE); - ok(IsWindow(hwndparentW), "Unicode parent creation failed\n"); - if (!IsWindow(hwndparentW)) return; - - notifyFormat = -1; - hwnd = create_listview_controlW(LVS_REPORT, hwndparentW); - ok(hwnd != NULL, "failed to create a listview window\n"); - header = (HWND)SendMessage(hwnd, LVM_GETHEADER, 0, 0); - ok(IsWindow(header), "expected header to be created\n"); - r = SendMessageW(hwnd, LVM_GETUNICODEFORMAT, 0, 0); - expect(1, r); - r = SendMessage(header, HDM_GETUNICODEFORMAT, 0, 0); - expect(1, r); - DestroyWindow(hwnd); - /* receiving error code defaulting to ansi */ - notifyFormat = 0; - hwnd = create_listview_controlW(LVS_REPORT, hwndparentW); - ok(hwnd != NULL, "failed to create a listview window\n"); - header = (HWND)SendMessage(hwnd, LVM_GETHEADER, 0, 0); - ok(IsWindow(header), "expected header to be created\n"); - r = SendMessageW(hwnd, LVM_GETUNICODEFORMAT, 0, 0); - expect(0, r); - r = SendMessage(header, HDM_GETUNICODEFORMAT, 0, 0); - expect(1, r); - DestroyWindow(hwnd); - /* receiving ansi code from unicode window, use it */ - notifyFormat = NFR_ANSI; - hwnd = create_listview_controlW(LVS_REPORT, hwndparentW); - ok(hwnd != NULL, "failed to create a listview window\n"); - header = (HWND)SendMessage(hwnd, LVM_GETHEADER, 0, 0); - ok(IsWindow(header), "expected header to be created\n"); - r = SendMessageW(hwnd, LVM_GETUNICODEFORMAT, 0, 0); - expect(0, r); - r = SendMessage(header, HDM_GETUNICODEFORMAT, 0, 0); - expect(1, r); - DestroyWindow(hwnd); - /* unicode listview with ansi parent window */ - notifyFormat = -1; - hwnd = create_listview_controlW(LVS_REPORT, hwndparent); - ok(hwnd != NULL, "failed to create a listview window\n"); - header = (HWND)SendMessage(hwnd, LVM_GETHEADER, 0, 0); - ok(IsWindow(header), "expected header to be created\n"); - r = SendMessageW(hwnd, LVM_GETUNICODEFORMAT, 0, 0); - expect(0, r); - r = SendMessage(header, HDM_GETUNICODEFORMAT, 0, 0); - expect(1, r); - DestroyWindow(hwnd); - /* unicode listview with ansi parent window, return error code */ - notifyFormat = 0; - hwnd = create_listview_controlW(LVS_REPORT, hwndparent); - ok(hwnd != NULL, "failed to create a listview window\n"); - header = (HWND)SendMessage(hwnd, LVM_GETHEADER, 0, 0); - ok(IsWindow(header), "expected header to be created\n"); - r = SendMessageW(hwnd, LVM_GETUNICODEFORMAT, 0, 0); - expect(0, r); - r = SendMessage(header, HDM_GETUNICODEFORMAT, 0, 0); - expect(1, r); - DestroyWindow(hwnd); - - DestroyWindow(hwndparentW); -} - -static void test_indentation(void) -{ - HWND hwnd; - LVITEMA item; - DWORD r; - - hwnd = create_listview_control(LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - - memset(&item, 0, sizeof(item)); - item.mask = LVIF_INDENT; - item.iItem = 0; - item.iIndent = I_INDENTCALLBACK; - r = SendMessage(hwnd, LVM_INSERTITEMA, 0, (LPARAM)&item); - expect(0, r); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - item.iItem = 0; - item.mask = LVIF_INDENT; - r = SendMessage(hwnd, LVM_GETITEM, 0, (LPARAM)&item); - expect(TRUE, r); - - ok_sequence(sequences, PARENT_SEQ_INDEX, single_getdispinfo_parent_seq, - "get indent dispinfo", FALSE); - - DestroyWindow(hwnd); -} - -static INT CALLBACK DummyCompareEx(LPARAM first, LPARAM second, LPARAM param) -{ - return 0; -} - -static BOOL is_below_comctl_5(void) -{ - HWND hwnd; - BOOL ret; - - hwnd = create_listview_control(LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - insert_item(hwnd, 0); - - ret = SendMessage(hwnd, LVM_SORTITEMSEX, 0, (LPARAM)&DummyCompareEx); - - DestroyWindow(hwnd); - - return !ret; -} - -static void test_get_set_view(void) -{ - HWND hwnd; - DWORD ret; - DWORD_PTR style; - - /* test style->view mapping */ - hwnd = create_listview_control(LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - - ret = SendMessage(hwnd, LVM_GETVIEW, 0, 0); - expect(LV_VIEW_DETAILS, ret); - - style = GetWindowLongPtr(hwnd, GWL_STYLE); - /* LVS_ICON == 0 */ - SetWindowLongPtr(hwnd, GWL_STYLE, style & ~LVS_REPORT); - ret = SendMessage(hwnd, LVM_GETVIEW, 0, 0); - expect(LV_VIEW_ICON, ret); - - style = GetWindowLongPtr(hwnd, GWL_STYLE); - SetWindowLongPtr(hwnd, GWL_STYLE, style | LVS_SMALLICON); - ret = SendMessage(hwnd, LVM_GETVIEW, 0, 0); - expect(LV_VIEW_SMALLICON, ret); - - style = GetWindowLongPtr(hwnd, GWL_STYLE); - SetWindowLongPtr(hwnd, GWL_STYLE, (style & ~LVS_SMALLICON) | LVS_LIST); - ret = SendMessage(hwnd, LVM_GETVIEW, 0, 0); - expect(LV_VIEW_LIST, ret); - - /* switching view doesn't touch window style */ - ret = SendMessage(hwnd, LVM_SETVIEW, LV_VIEW_DETAILS, 0); - expect(1, ret); - style = GetWindowLongPtr(hwnd, GWL_STYLE); - ok(style & LVS_LIST, "Expected style to be preserved\n"); - ret = SendMessage(hwnd, LVM_SETVIEW, LV_VIEW_ICON, 0); - expect(1, ret); - style = GetWindowLongPtr(hwnd, GWL_STYLE); - ok(style & LVS_LIST, "Expected style to be preserved\n"); - ret = SendMessage(hwnd, LVM_SETVIEW, LV_VIEW_SMALLICON, 0); - expect(1, ret); - style = GetWindowLongPtr(hwnd, GWL_STYLE); - ok(style & LVS_LIST, "Expected style to be preserved\n"); - - DestroyWindow(hwnd); -} - -static void test_canceleditlabel(void) -{ - HWND hwnd, hwndedit; - DWORD ret; - CHAR buff[10]; - LVITEMA itema; - static CHAR test[] = "test"; - static const CHAR test1[] = "test1"; - - hwnd = create_listview_control(LVS_EDITLABELS | LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - - insert_item(hwnd, 0); - - /* try without edit created */ - flush_sequences(sequences, NUM_MSG_SEQUENCES); - ret = SendMessage(hwnd, LVM_CANCELEDITLABEL, 0, 0); - expect(TRUE, ret); - ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, - "cancel edit label without edit", FALSE); - - /* cancel without data change */ - SetFocus(hwnd); - hwndedit = (HWND)SendMessage(hwnd, LVM_EDITLABEL, 0, 0); - ok(IsWindow(hwndedit), "Expected edit control to be created\n"); - ret = SendMessage(hwnd, LVM_CANCELEDITLABEL, 0, 0); - expect(TRUE, ret); - ok(!IsWindow(hwndedit), "Expected edit control to be destroyed\n"); - - /* cancel after data change */ - memset(&itema, 0, sizeof(itema)); - itema.pszText = test; - ret = SendMessage(hwnd, LVM_SETITEMTEXT, 0, (LPARAM)&itema); - expect(TRUE, ret); - SetFocus(hwnd); - hwndedit = (HWND)SendMessage(hwnd, LVM_EDITLABEL, 0, 0); - ok(IsWindow(hwndedit), "Expected edit control to be created\n"); - ret = SetWindowText(hwndedit, test1); - ok(ret != 0, "Expected edit text to change\n"); - ret = SendMessage(hwnd, LVM_CANCELEDITLABEL, 0, 0); - expect(TRUE, ret); - ok(!IsWindow(hwndedit), "Expected edit control to be destroyed\n"); - memset(&itema, 0, sizeof(itema)); - itema.pszText = buff; - itema.cchTextMax = sizeof(buff)/sizeof(CHAR); - ret = SendMessage(hwnd, LVM_GETITEMTEXT, 0, (LPARAM)&itema); - expect(5, ret); - ok(strcmp(buff, test1) == 0, "Expected label text not to change\n"); - - DestroyWindow(hwnd); -} - -static void test_mapidindex(void) -{ - HWND hwnd; - DWORD ret; - - /* LVM_MAPINDEXTOID unsupported with LVS_OWNERDATA */ - hwnd = create_listview_control(LVS_OWNERDATA | LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - insert_item(hwnd, 0); - ret = SendMessage(hwnd, LVM_MAPINDEXTOID, 0, 0); - expect(-1, ret); - DestroyWindow(hwnd); - - hwnd = create_listview_control(LVS_REPORT); - ok(hwnd != NULL, "failed to create a listview window\n"); - - /* LVM_MAPINDEXTOID with invalid index */ - ret = SendMessage(hwnd, LVM_MAPINDEXTOID, 0, 0); - expect(-1, ret); - - insert_item(hwnd, 0); - insert_item(hwnd, 1); - - ret = SendMessage(hwnd, LVM_MAPINDEXTOID, -1, 0); - expect(-1, ret); - ret = SendMessage(hwnd, LVM_MAPINDEXTOID, 2, 0); - expect(-1, ret); - - ret = SendMessage(hwnd, LVM_MAPINDEXTOID, 0, 0); - expect(0, ret); - ret = SendMessage(hwnd, LVM_MAPINDEXTOID, 1, 0); - expect(1, ret); - /* remove 0 indexed item, id retained */ - SendMessage(hwnd, LVM_DELETEITEM, 0, 0); - ret = SendMessage(hwnd, LVM_MAPINDEXTOID, 0, 0); - expect(1, ret); - /* new id starts from previous value */ - insert_item(hwnd, 1); - ret = SendMessage(hwnd, LVM_MAPINDEXTOID, 1, 0); - expect(2, ret); - - /* get index by id */ - ret = SendMessage(hwnd, LVM_MAPIDTOINDEX, -1, 0); - expect(-1, ret); - ret = SendMessage(hwnd, LVM_MAPIDTOINDEX, 0, 0); - expect(-1, ret); - ret = SendMessage(hwnd, LVM_MAPIDTOINDEX, 1, 0); - expect(0, ret); - ret = SendMessage(hwnd, LVM_MAPIDTOINDEX, 2, 0); - expect(1, ret); - - DestroyWindow(hwnd); -} - -static void test_getitemspacing(void) -{ - HWND hwnd; - DWORD ret; - INT cx, cy; - HIMAGELIST himl; - HBITMAP hbmp; - LVITEMA itema; - - cx = GetSystemMetrics(SM_CXICONSPACING) - GetSystemMetrics(SM_CXICON); - cy = GetSystemMetrics(SM_CYICONSPACING) - GetSystemMetrics(SM_CYICON); - - /* LVS_ICON */ - hwnd = create_listview_control(LVS_ICON); - ret = SendMessage(hwnd, LVM_GETITEMSPACING, FALSE, 0); -todo_wine { - expect(cx, LOWORD(ret)); - expect(cy, HIWORD(ret)); -} - /* now try with icons */ - himl = ImageList_Create(40, 40, 0, 4, 4); - ok(himl != NULL, "failed to create imagelist\n"); - hbmp = CreateBitmap(40, 40, 1, 1, NULL); - ok(hbmp != NULL, "failed to create bitmap\n"); - ret = ImageList_Add(himl, hbmp, 0); - expect(0, ret); - ret = SendMessage(hwnd, LVM_SETIMAGELIST, 0, (LPARAM)himl); - expect(0, ret); - - itema.mask = LVIF_IMAGE; - itema.iImage = 0; - itema.iItem = 0; - itema.iSubItem = 0; - ret = SendMessage(hwnd, LVM_INSERTITEM, 0, (LPARAM)&itema); - expect(0, ret); - ret = SendMessage(hwnd, LVM_GETITEMSPACING, FALSE, 0); -todo_wine { - /* spacing + icon size returned */ - expect(cx + 40, LOWORD(ret)); - expect(cy + 40, HIWORD(ret)); -} - DestroyWindow(hwnd); - /* LVS_SMALLICON */ - hwnd = create_listview_control(LVS_SMALLICON); - ret = SendMessage(hwnd, LVM_GETITEMSPACING, FALSE, 0); -todo_wine { - expect(cx, LOWORD(ret)); - expect(cy, HIWORD(ret)); -} - DestroyWindow(hwnd); - /* LVS_REPORT */ - hwnd = create_listview_control(LVS_REPORT); - ret = SendMessage(hwnd, LVM_GETITEMSPACING, FALSE, 0); -todo_wine { - expect(cx, LOWORD(ret)); - expect(cy, HIWORD(ret)); -} - DestroyWindow(hwnd); - /* LVS_LIST */ - hwnd = create_listview_control(LVS_LIST); - ret = SendMessage(hwnd, LVM_GETITEMSPACING, FALSE, 0); -todo_wine { - expect(cx, LOWORD(ret)); - expect(cy, HIWORD(ret)); -} - DestroyWindow(hwnd); -} - -static void test_getcolumnwidth(void) -{ - HWND hwnd; - DWORD ret; - DWORD_PTR style; - LVCOLUMNA col; - LVITEMA itema; - - /* default column width */ - hwnd = create_listview_control(LVS_ICON); - ret = SendMessage(hwnd, LVM_GETCOLUMNWIDTH, 0, 0); - expect(0, ret); - style = GetWindowLong(hwnd, GWL_STYLE); - SetWindowLong(hwnd, GWL_STYLE, style | LVS_LIST); - ret = SendMessage(hwnd, LVM_GETCOLUMNWIDTH, 0, 0); - todo_wine expect(8, ret); - style = GetWindowLong(hwnd, GWL_STYLE) & ~LVS_LIST; - SetWindowLong(hwnd, GWL_STYLE, style | LVS_REPORT); - col.mask = 0; - ret = SendMessage(hwnd, LVM_INSERTCOLUMNA, 0, (LPARAM)&col); - expect(0, ret); - ret = SendMessage(hwnd, LVM_GETCOLUMNWIDTH, 0, 0); - expect(10, ret); - DestroyWindow(hwnd); - - /* default column width with item added */ - hwnd = create_listview_control(LVS_LIST); - memset(&itema, 0, sizeof(itema)); - SendMessage(hwnd, LVM_INSERTITEMA, 0, (LPARAM)&itema); - ret = SendMessage(hwnd, LVM_GETCOLUMNWIDTH, 0, 0); - todo_wine expect(96, ret); - DestroyWindow(hwnd); -} - -static void test_scrollnotify(void) -{ - HWND hwnd; - DWORD ret; - - hwnd = create_listview_control(LVS_REPORT); - - insert_column(hwnd, 0); - insert_column(hwnd, 1); - insert_item(hwnd, 0); - - /* make it scrollable - resize */ - ret = SendMessage(hwnd, LVM_SETCOLUMNWIDTH, 0, MAKELPARAM(100, 0)); - expect(TRUE, ret); - ret = SendMessage(hwnd, LVM_SETCOLUMNWIDTH, 1, MAKELPARAM(100, 0)); - expect(TRUE, ret); - - /* try with dummy call */ - flush_sequences(sequences, NUM_MSG_SEQUENCES); - ret = SendMessage(hwnd, LVM_SCROLL, 0, 0); - expect(TRUE, ret); - ok_sequence(sequences, PARENT_SEQ_INDEX, scroll_parent_seq, - "scroll notify 1", TRUE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - ret = SendMessage(hwnd, LVM_SCROLL, 1, 0); - expect(TRUE, ret); - ok_sequence(sequences, PARENT_SEQ_INDEX, scroll_parent_seq, - "scroll notify 2", TRUE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - ret = SendMessage(hwnd, LVM_SCROLL, 1, 1); - expect(TRUE, ret); - ok_sequence(sequences, PARENT_SEQ_INDEX, scroll_parent_seq, - "scroll notify 3", TRUE); - - DestroyWindow(hwnd); -} - -static void test_LVS_EX_TRANSPARENTBKGND(void) -{ - HWND hwnd; - DWORD ret; - HDC hdc; - - hwnd = create_listview_control(LVS_REPORT); - - ret = SendMessage(hwnd, LVM_SETBKCOLOR, 0, RGB(0, 0, 0)); - expect(TRUE, ret); - - SendMessage(hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_TRANSPARENTBKGND, - LVS_EX_TRANSPARENTBKGND); - - ret = SendMessage(hwnd, LVM_GETBKCOLOR, 0, 0); - if (ret != CLR_NONE) - { - win_skip("LVS_EX_TRANSPARENTBKGND unsupported\n"); - DestroyWindow(hwnd); - return; - } - - /* try to set some back color and check this style bit */ - ret = SendMessage(hwnd, LVM_SETBKCOLOR, 0, RGB(0, 0, 0)); - expect(TRUE, ret); - ret = SendMessage(hwnd, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0); - ok(!(ret & LVS_EX_TRANSPARENTBKGND), "Expected LVS_EX_TRANSPARENTBKGND to unset\n"); - - /* now test what this style actually does */ - SendMessage(hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_TRANSPARENTBKGND, - LVS_EX_TRANSPARENTBKGND); - - hdc = GetWindowDC(hwndparent); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - SendMessageA(hwnd, WM_ERASEBKGND, (WPARAM)hdc, 0); - ok_sequence(sequences, PARENT_SEQ_INDEX, lvs_ex_transparentbkgnd_seq, - "LVS_EX_TRANSPARENTBKGND parent", FALSE); - - ReleaseDC(hwndparent, hdc); - - DestroyWindow(hwnd); -} - -static void test_approximate_viewrect(void) -{ - HWND hwnd; - DWORD ret; - HIMAGELIST himl; - HBITMAP hbmp; - LVITEMA itema; - static CHAR test[] = "abracadabra, a very long item label"; - - hwnd = create_listview_control(LVS_ICON); - himl = ImageList_Create(40, 40, 0, 4, 4); - ok(himl != NULL, "failed to create imagelist\n"); - hbmp = CreateBitmap(40, 40, 1, 1, NULL); - ok(hbmp != NULL, "failed to create bitmap\n"); - ret = ImageList_Add(himl, hbmp, 0); - expect(0, ret); - ret = SendMessage(hwnd, LVM_SETIMAGELIST, 0, (LPARAM)himl); - expect(0, ret); - - itema.mask = LVIF_IMAGE; - itema.iImage = 0; - itema.iItem = 0; - itema.iSubItem = 0; - ret = SendMessage(hwnd, LVM_INSERTITEM, 0, (LPARAM)&itema); - expect(0, ret); - - ret = SendMessage(hwnd, LVM_SETICONSPACING, 0, MAKELPARAM(75, 75)); - if (ret == 0) - { - /* version 4.0 */ - win_skip("LVM_SETICONSPACING unimplemented. Skipping.\n"); - return; - } - - ret = SendMessage(hwnd, LVM_APPROXIMATEVIEWRECT, 11, MAKELPARAM(100,100)); - ok(MAKELONG(77,827)==ret,"Incorrect Approximate rect\n"); - - ret = SendMessage(hwnd, LVM_SETICONSPACING, 0, MAKELPARAM(50, 50)); - ret = SendMessage(hwnd, LVM_APPROXIMATEVIEWRECT, 11, MAKELPARAM(100,100)); - ok(MAKELONG(102,302)==ret,"Incorrect Approximate rect\n"); - - ret = SendMessage(hwnd, LVM_APPROXIMATEVIEWRECT, -1, MAKELPARAM(100,100)); - ok(MAKELONG(52,52)==ret,"Incorrect Approximate rect\n"); - - itema.pszText = test; - ret = SendMessage(hwnd, LVM_SETITEMTEXT, 0, (LPARAM)&itema); - expect(TRUE, ret); - ret = SendMessage(hwnd, LVM_APPROXIMATEVIEWRECT, -1, MAKELPARAM(100,100)); - ok(MAKELONG(52,52)==ret,"Incorrect Approximate rect\n"); - - ret = SendMessage(hwnd, LVM_APPROXIMATEVIEWRECT, 0, MAKELPARAM(100,100)); - ok(MAKELONG(52,2)==ret,"Incorrect Approximate rect\n"); - ret = SendMessage(hwnd, LVM_APPROXIMATEVIEWRECT, 1, MAKELPARAM(100,100)); - ok(MAKELONG(52,52)==ret,"Incorrect Approximate rect\n"); - ret = SendMessage(hwnd, LVM_APPROXIMATEVIEWRECT, 2, MAKELPARAM(100,100)); - ok(MAKELONG(102,52)==ret,"Incorrect Approximate rect\n"); - ret = SendMessage(hwnd, LVM_APPROXIMATEVIEWRECT, 3, MAKELPARAM(100,100)); - ok(MAKELONG(102,102)==ret,"Incorrect Approximate rect\n"); - ret = SendMessage(hwnd, LVM_APPROXIMATEVIEWRECT, 4, MAKELPARAM(100,100)); - ok(MAKELONG(102,102)==ret,"Incorrect Approximate rect\n"); - ret = SendMessage(hwnd, LVM_APPROXIMATEVIEWRECT, 5, MAKELPARAM(100,100)); - ok(MAKELONG(102,152)==ret,"Incorrect Approximate rect\n"); - ret = SendMessage(hwnd, LVM_APPROXIMATEVIEWRECT, 6, MAKELPARAM(100,100)); - ok(MAKELONG(102,152)==ret,"Incorrect Approximate rect\n"); - ret = SendMessage(hwnd, LVM_APPROXIMATEVIEWRECT, 7, MAKELPARAM(160,100)); - ok(MAKELONG(152,152)==ret,"Incorrect Approximate rect\n"); - - DestroyWindow(hwnd); -} - -static void test_finditem(void) -{ - LVFINDINFOA fi; - static char f[5]; - HWND hwnd; - DWORD r; - - hwnd = create_listview_control(LVS_REPORT); - insert_item(hwnd, 0); - - memset(&fi, 0, sizeof(fi)); - - /* full string search, inserted text was "foo" */ - strcpy(f, "foo"); - fi.flags = LVFI_STRING; - fi.psz = f; - r = SendMessage(hwnd, LVM_FINDITEMA, -1, (LPARAM)&fi); - expect(0, r); - /* partial string search, inserted text was "foo" */ - strcpy(f, "fo"); - fi.flags = LVFI_STRING | LVFI_PARTIAL; - fi.psz = f; - r = SendMessage(hwnd, LVM_FINDITEMA, -1, (LPARAM)&fi); - expect(0, r); - /* partial string search, part after start char */ - strcpy(f, "oo"); - fi.flags = LVFI_STRING | LVFI_PARTIAL; - fi.psz = f; - r = SendMessage(hwnd, LVM_FINDITEMA, -1, (LPARAM)&fi); - expect(-1, r); - - /* try with LVFI_SUBSTRING */ - strcpy(f, "fo"); - fi.flags = LVFI_SUBSTRING; - fi.psz = f; - r = SendMessage(hwnd, LVM_FINDITEMA, -1, (LPARAM)&fi); - if (r == -1) - { - win_skip("LVFI_SUBSTRING not supported\n"); - DestroyWindow(hwnd); - return; - } - expect(0, r); - strcpy(f, "f"); - fi.flags = LVFI_SUBSTRING; - fi.psz = f; - r = SendMessage(hwnd, LVM_FINDITEMA, -1, (LPARAM)&fi); - expect(0, r); - strcpy(f, "o"); - fi.flags = LVFI_SUBSTRING; - fi.psz = f; - r = SendMessage(hwnd, LVM_FINDITEMA, -1, (LPARAM)&fi); - expect(-1, r); - - strcpy(f, "f"); - fi.flags = LVFI_SUBSTRING | LVFI_STRING; - fi.psz = f; - r = SendMessage(hwnd, LVM_FINDITEMA, -1, (LPARAM)&fi); - expect(0, r); - - DestroyWindow(hwnd); -} - -static void test_LVS_EX_HEADERINALLVIEWS(void) -{ - HWND hwnd, header; - DWORD style; - - hwnd = create_listview_control(LVS_ICON); - - SendMessage(hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_HEADERINALLVIEWS, - LVS_EX_HEADERINALLVIEWS); - - header = (HWND)SendMessage(hwnd, LVM_GETHEADER, 0, 0); - if (!IsWindow(header)) - { - win_skip("LVS_EX_HEADERINALLVIEWS unsupported\n"); - DestroyWindow(hwnd); - return; - } - - /* LVS_NOCOLUMNHEADER works as before */ - style = GetWindowLongA(hwnd, GWL_STYLE); - SetWindowLongW(hwnd, GWL_STYLE, style | LVS_NOCOLUMNHEADER); - style = GetWindowLongA(header, GWL_STYLE); - ok(style & HDS_HIDDEN, "Expected HDS_HIDDEN\n"); - style = GetWindowLongA(hwnd, GWL_STYLE); - SetWindowLongW(hwnd, GWL_STYLE, style & ~LVS_NOCOLUMNHEADER); - style = GetWindowLongA(header, GWL_STYLE); - ok(!(style & HDS_HIDDEN), "Expected HDS_HIDDEN to be unset\n"); - - /* try to remove style */ - SendMessage(hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_HEADERINALLVIEWS, 0); - header = (HWND)SendMessage(hwnd, LVM_GETHEADER, 0, 0); - ok(IsWindow(header), "Expected header to be created\n"); - style = GetWindowLongA(header, GWL_STYLE); - ok(!(style & HDS_HIDDEN), "HDS_HIDDEN not expected\n"); - - DestroyWindow(hwnd); - - /* check other styles */ - hwnd = create_listview_control(LVS_LIST); - SendMessage(hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_HEADERINALLVIEWS, - LVS_EX_HEADERINALLVIEWS); - header = (HWND)SendMessage(hwnd, LVM_GETHEADER, 0, 0); - ok(IsWindow(header), "Expected header to be created\n"); - DestroyWindow(hwnd); - - hwnd = create_listview_control(LVS_SMALLICON); - SendMessage(hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_HEADERINALLVIEWS, - LVS_EX_HEADERINALLVIEWS); - header = (HWND)SendMessage(hwnd, LVM_GETHEADER, 0, 0); - ok(IsWindow(header), "Expected header to be created\n"); - DestroyWindow(hwnd); - - hwnd = create_listview_control(LVS_REPORT); - SendMessage(hwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_HEADERINALLVIEWS, - LVS_EX_HEADERINALLVIEWS); - header = (HWND)SendMessage(hwnd, LVM_GETHEADER, 0, 0); - ok(IsWindow(header), "Expected header to be created\n"); - DestroyWindow(hwnd); -} - -static void test_hover(void) -{ - HWND hwnd; - DWORD r; - - hwnd = create_listview_control(LVS_ICON); - - /* test WM_MOUSEHOVER forwarding */ - flush_sequences(sequences, NUM_MSG_SEQUENCES); - r = SendMessage(hwnd, WM_MOUSEHOVER, 0, 0); - expect(0, r); - ok_sequence(sequences, PARENT_SEQ_INDEX, hover_parent, "NM_HOVER allow test", TRUE); - g_block_hover = TRUE; - flush_sequences(sequences, NUM_MSG_SEQUENCES); - r = SendMessage(hwnd, WM_MOUSEHOVER, 0, 0); - expect(0, r); - ok_sequence(sequences, PARENT_SEQ_INDEX, hover_parent, "NM_HOVER block test", TRUE); - g_block_hover = FALSE; - - r = SendMessage(hwnd, LVM_SETHOVERTIME, 0, 500); - expect(HOVER_DEFAULT, r); - r = SendMessage(hwnd, LVM_GETHOVERTIME, 0, 0); - expect(500, r); - - DestroyWindow(hwnd); -} - -static void test_destroynotify(void) -{ - HWND hwnd; - - hwnd = create_listview_control(LVS_REPORT); - ok(hwnd != NULL, "failed to create listview window\n"); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - DestroyWindow(hwnd); - ok_sequence(sequences, COMBINED_SEQ_INDEX, listview_destroy, "check destroy order", FALSE); -} - -static void test_header_notification(void) -{ - HWND list, header; - HDITEMA item; - NMHEADER nmh; - LVCOLUMNA col; - LRESULT ret; - - list = create_listview_control(LVS_REPORT); - ok(list != 0, "failed to create listview window\n"); - - memset(&col, 0, sizeof(col)); - col.mask = LVCF_WIDTH; - col.cx = 100; - ret = SendMessage(list, LVM_INSERTCOLUMNA, 0, (LPARAM)&col); - ok(!ret, "expected 0, got %ld\n", ret); - - header = subclass_header(list); - - ret = SendMessage(header, HDM_GETITEMCOUNT, 0, 0); - ok(ret == 1, "expected header item count 1, got %ld\n", ret); - - memset(&item, 0, sizeof(item)); - item.mask = HDI_WIDTH; - ret = SendMessage(header, HDM_GETITEMA, 0, (LPARAM)&item); - ok(ret, "HDM_GETITEM failed\n"); - ok(item.cxy == 100, "expected 100, got %d\n", item.cxy); - - nmh.hdr.hwndFrom = header; - nmh.hdr.idFrom = GetWindowLongPtr(header, GWLP_ID); - nmh.hdr.code = HDN_ITEMCHANGEDA; - nmh.iItem = 0; - nmh.iButton = 0; - item.mask = HDI_WIDTH; - item.cxy = 50; - nmh.pitem = &item; - ret = SendMessage(list, WM_NOTIFY, 0, (LPARAM)&nmh); - ok(!ret, "WM_NOTIFY/HDN_ITEMCHANGED failed\n"); - - DestroyWindow(list); -} - -static void test_createdragimage(void) -{ - HIMAGELIST himl; - POINT pt; - HWND list; - - list = create_listview_control(LVS_ICON); - ok(list != 0, "failed to create listview window\n"); - - insert_item(list, 0); - - /* NULL point */ - himl = (HIMAGELIST)SendMessageA(list, LVM_CREATEDRAGIMAGE, 0, 0); - ok(himl == NULL, "got %p\n", himl); - - himl = (HIMAGELIST)SendMessageA(list, LVM_CREATEDRAGIMAGE, 0, (LPARAM)&pt); - ok(himl != NULL, "got %p\n", himl); - ImageList_Destroy(himl); - - DestroyWindow(list); -} - -START_TEST(listview) -{ - HMODULE hComctl32; - BOOL (WINAPI *pInitCommonControlsEx)(const INITCOMMONCONTROLSEX*); - - ULONG_PTR ctx_cookie; - HANDLE hCtx; - HWND hwnd; - - hComctl32 = GetModuleHandleA("comctl32.dll"); - pInitCommonControlsEx = (void*)GetProcAddress(hComctl32, "InitCommonControlsEx"); - if (pInitCommonControlsEx) - { - INITCOMMONCONTROLSEX iccex; - iccex.dwSize = sizeof(iccex); - iccex.dwICC = ICC_LISTVIEW_CLASSES; - pInitCommonControlsEx(&iccex); - } - else - InitCommonControls(); - - init_msg_sequences(sequences, NUM_MSG_SEQUENCES); - - hwndparent = create_parent_window(FALSE); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - g_is_below_5 = is_below_comctl_5(); - - test_header_notification(); - test_images(); - test_checkboxes(); - test_items(); - test_create(); - test_redraw(); - test_customdraw(); - test_icon_spacing(); - test_color(); - test_item_count(); - test_item_position(); - test_columns(); - test_getorigin(); - test_multiselect(); - test_getitemrect(); - test_subitem_rect(); - test_sorting(); - test_ownerdata(); - test_norecompute(); - test_nosortheader(); - test_setredraw(); - test_hittest(); - test_getviewrect(); - test_getitemposition(); - test_columnscreation(); - test_editbox(); - test_notifyformat(); - test_indentation(); - test_getitemspacing(); - test_getcolumnwidth(); - test_approximate_viewrect(); - test_finditem(); - test_hover(); - test_destroynotify(); - test_createdragimage(); - - if (!load_v6_module(&ctx_cookie, &hCtx)) - { - DestroyWindow(hwndparent); - return; - } - - /* this is a XP SP3 failure workaround */ - hwnd = CreateWindowExA(0, WC_LISTVIEW, "foo", - WS_CHILD | WS_BORDER | WS_VISIBLE | LVS_REPORT, - 0, 0, 100, 100, - hwndparent, NULL, GetModuleHandleA(NULL), NULL); - if (!IsWindow(hwnd)) - { - win_skip("FIXME: failed to create ListView window.\n"); - unload_v6_module(ctx_cookie, hCtx); - DestroyWindow(hwndparent); - return; - } - else - DestroyWindow(hwnd); - - /* comctl32 version 6 tests start here */ - test_get_set_view(); - test_canceleditlabel(); - test_mapidindex(); - test_scrollnotify(); - test_LVS_EX_TRANSPARENTBKGND(); - test_LVS_EX_HEADERINALLVIEWS(); - - unload_v6_module(ctx_cookie, hCtx); - - DestroyWindow(hwndparent); -} diff --git a/rostests/winetests/comctl32/misc.c b/rostests/winetests/comctl32/misc.c deleted file mode 100644 index 8f83260db17..00000000000 --- a/rostests/winetests/comctl32/misc.c +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Misc tests - * - * Copyright 2006 Paul Vriens - * - * 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 "wine/test.h" - -static PVOID (WINAPI * pAlloc)(LONG); -static PVOID (WINAPI * pReAlloc)(PVOID, LONG); -static BOOL (WINAPI * pFree)(PVOID); -static LONG (WINAPI * pGetSize)(PVOID); - -static INT (WINAPI * pStr_GetPtrA)(LPCSTR, LPSTR, INT); -static BOOL (WINAPI * pStr_SetPtrA)(LPSTR, LPCSTR); -static INT (WINAPI * pStr_GetPtrW)(LPCWSTR, LPWSTR, INT); -static BOOL (WINAPI * pStr_SetPtrW)(LPWSTR, LPCWSTR); - -static HMODULE hComctl32 = 0; - -#define COMCTL32_GET_PROC(ordinal, func) \ - p ## func = (void*)GetProcAddress(hComctl32, (LPSTR)ordinal); \ - if(!p ## func) { \ - trace("GetProcAddress(%d)(%s) failed\n", ordinal, #func); \ - FreeLibrary(hComctl32); \ - } - -static BOOL InitFunctionPtrs(void) -{ - hComctl32 = LoadLibraryA("comctl32.dll"); - - if(!hComctl32) - { - trace("Could not load comctl32.dll\n"); - return FALSE; - } - - COMCTL32_GET_PROC(71, Alloc); - COMCTL32_GET_PROC(72, ReAlloc); - COMCTL32_GET_PROC(73, Free); - COMCTL32_GET_PROC(74, GetSize); - - COMCTL32_GET_PROC(233, Str_GetPtrA) - COMCTL32_GET_PROC(234, Str_SetPtrA) - COMCTL32_GET_PROC(235, Str_GetPtrW) - COMCTL32_GET_PROC(236, Str_SetPtrW) - - return TRUE; -} - -static void test_GetPtrAW(void) -{ - if (pStr_GetPtrA) - { - static const char source[] = "Just a source string"; - static const char desttest[] = "Just a destination string"; - static char dest[MAX_PATH]; - int sourcelen; - int destsize = MAX_PATH; - int count = -1; - - sourcelen = strlen(source) + 1; - - count = pStr_GetPtrA(NULL, NULL, 0); - ok (count == 0, "Expected count to be 0, it was %d\n", count); - - if (0) - { - /* Crashes on W98, NT4, W2K, XP, W2K3 - * Our implementation also crashes and we should probably leave - * it like that. - */ - count = -1; - count = pStr_GetPtrA(NULL, NULL, destsize); - trace("count : %d\n", count); - } - - count = 0; - count = pStr_GetPtrA(source, NULL, 0); - ok (count == sourcelen || - broken(count == sourcelen - 1), /* win9x */ - "Expected count to be %d, it was %d\n", sourcelen, count); - - count = 0; - strcpy(dest, desttest); - count = pStr_GetPtrA(source, dest, 0); - ok (count == sourcelen || - broken(count == 0), /* win9x */ - "Expected count to be %d, it was %d\n", sourcelen, count); - ok (!lstrcmp(dest, desttest) || - broken(!lstrcmp(dest, "")), /* Win7 */ - "Expected destination to not have changed\n"); - - count = 0; - count = pStr_GetPtrA(source, NULL, destsize); - ok (count == sourcelen || - broken(count == sourcelen - 1), /* win9x */ - "Expected count to be %d, it was %d\n", sourcelen, count); - - count = 0; - count = pStr_GetPtrA(source, dest, destsize); - ok (count == sourcelen || - broken(count == sourcelen - 1), /* win9x */ - "Expected count to be %d, it was %d\n", sourcelen, count); - ok (!lstrcmp(source, dest), "Expected source and destination to be the same\n"); - - count = -1; - strcpy(dest, desttest); - count = pStr_GetPtrA(NULL, dest, destsize); - ok (count == 0, "Expected count to be 0, it was %d\n", count); - ok (dest[0] == '\0', "Expected destination to be cut-off and 0 terminated\n"); - - count = 0; - destsize = 15; - count = pStr_GetPtrA(source, dest, destsize); - ok (count == 15 || - broken(count == 14), /* win9x */ - "Expected count to be 15, it was %d\n", count); - ok (!memcmp(source, dest, 14), "Expected first part of source and destination to be the same\n"); - ok (dest[14] == '\0', "Expected destination to be cut-off and 0 terminated\n"); - } -} - -static void test_Alloc(void) -{ - PCHAR p; - BOOL res; - DWORD size, min; - - /* allocate size 0 */ - p = pAlloc(0); - ok(p != NULL, "Expected non-NULL ptr\n"); - - /* get the minimum size */ - min = pGetSize(p); - - /* free the block */ - res = pFree(p); - ok(res == TRUE, "Expected TRUE, got %d\n", res); - - /* allocate size 1 */ - p = pAlloc(1); - ok(p != NULL, "Expected non-NULL ptr\n"); - - /* get the allocated size */ - size = pGetSize(p); - ok(size == 1 || - broken(size == min), /* win9x */ - "Expected 1, got %d\n", size); - - /* reallocate the block */ - p = pReAlloc(p, 2); - ok(p != NULL, "Expected non-NULL ptr\n"); - - /* get the new size */ - size = pGetSize(p); - ok(size == 2 || - broken(size == min), /* win9x */ - "Expected 2, got %d\n", size); - - /* free the block */ - res = pFree(p); - ok(res == TRUE, "Expected TRUE, got %d\n", res); - - /* free a NULL ptr */ - res = pFree(NULL); - ok(res == TRUE || - broken(res == FALSE), /* win9x */ - "Expected TRUE, got %d\n", res); - - /* reallocate a NULL ptr */ - p = pReAlloc(NULL, 2); - ok(p != NULL, "Expectd non-NULL ptr\n"); - - res = pFree(p); - ok(res == TRUE, "Expected TRUE, got %d\n", res); -} - -START_TEST(misc) -{ - if(!InitFunctionPtrs()) - return; - - test_GetPtrAW(); - test_Alloc(); - - FreeLibrary(hComctl32); -} diff --git a/rostests/winetests/comctl32/monthcal.c b/rostests/winetests/comctl32/monthcal.c deleted file mode 100644 index 30f682ff815..00000000000 --- a/rostests/winetests/comctl32/monthcal.c +++ /dev/null @@ -1,1725 +0,0 @@ -/* - * comctl32 month calendar unit tests - * - * Copyright (C) 2006 Vitaliy Margolen - * Copyright (C) 2007 Farshad Agah - * - * 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 "windef.h" -#include "winbase.h" -#include "winuser.h" - -#include "commctrl.h" - -#include "wine/test.h" -#include -#include -#include "msg.h" - -#define expect(expected, got) ok(expected == got, "Expected %d, got %d\n", expected, got); -#define expect_hex(expected, got) ok(expected == got, "Expected %x, got %x\n", expected, got); - -#define NUM_MSG_SEQUENCES 2 -#define PARENT_SEQ_INDEX 0 -#define MONTHCAL_SEQ_INDEX 1 - -static struct msg_sequence *sequences[NUM_MSG_SEQUENCES]; - -static HWND parent_wnd; - -static const struct message create_parent_window_seq[] = { - { WM_GETMINMAXINFO, sent }, - { WM_NCCREATE, sent }, - { WM_NCCALCSIZE, sent|wparam, 0 }, - { WM_CREATE, sent }, - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, 0 }, - { WM_QUERYNEWPALETTE, sent|optional }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, 0 }, - { WM_WINDOWPOSCHANGED, sent|optional }, - { WM_ACTIVATEAPP, sent|wparam, 1 }, - { WM_NCACTIVATE, sent }, - { WM_ACTIVATE, sent|wparam, 1 }, - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { WM_IME_NOTIFY, sent|defwinproc|optional }, - { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, - /* Win9x adds SWP_NOZORDER below */ - { WM_WINDOWPOSCHANGED, sent, /*|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE*/ }, - { WM_NCCALCSIZE, sent|wparam|optional, 1 }, - { WM_SIZE, sent }, - { WM_MOVE, sent }, - { 0 } -}; - -static const struct message create_monthcal_control_seq[] = { - { WM_NOTIFYFORMAT, sent|lparam, 0, NF_QUERY }, - { WM_QUERYUISTATE, sent|optional }, - { WM_GETFONT, sent }, - { WM_PARENTNOTIFY, sent|wparam, WM_CREATE}, - { 0 } -}; - -static const struct message create_monthcal_multi_sel_style_seq[] = { - { WM_NOTIFYFORMAT, sent|lparam, 0, NF_QUERY }, - { WM_QUERYUISTATE, sent|optional }, - { WM_GETFONT, sent }, - { WM_PARENTNOTIFY, sent }, - { 0 } -}; - -static const struct message monthcal_color_seq[] = { - { MCM_GETCOLOR, sent|wparam|lparam, MCSC_BACKGROUND, 0}, - { MCM_SETCOLOR, sent|wparam|lparam, MCSC_BACKGROUND, RGB(0,0,0)}, - { MCM_GETCOLOR, sent|wparam|lparam, MCSC_BACKGROUND, 0}, - { MCM_SETCOLOR, sent|wparam|lparam, MCSC_BACKGROUND, RGB(255,255,255)}, - { MCM_GETCOLOR, sent|wparam|lparam, MCSC_BACKGROUND, 0}, - - { MCM_GETCOLOR, sent|wparam|lparam, MCSC_MONTHBK, 0}, - { MCM_SETCOLOR, sent|wparam|lparam, MCSC_MONTHBK, RGB(0,0,0)}, - { MCM_GETCOLOR, sent|wparam|lparam, MCSC_MONTHBK, 0}, - { MCM_SETCOLOR, sent|wparam|lparam, MCSC_MONTHBK, RGB(255,255,255)}, - { MCM_GETCOLOR, sent|wparam|lparam, MCSC_MONTHBK, 0}, - - { MCM_GETCOLOR, sent|wparam|lparam, MCSC_TEXT, 0}, - { MCM_SETCOLOR, sent|wparam|lparam, MCSC_TEXT, RGB(0,0,0)}, - { MCM_GETCOLOR, sent|wparam|lparam, MCSC_TEXT, 0}, - { MCM_SETCOLOR, sent|wparam|lparam, MCSC_TEXT, RGB(255,255,255)}, - { MCM_GETCOLOR, sent|wparam|lparam, MCSC_TEXT, 0}, - - { MCM_GETCOLOR, sent|wparam|lparam, MCSC_TITLEBK, 0}, - { MCM_SETCOLOR, sent|wparam|lparam, MCSC_TITLEBK, RGB(0,0,0)}, - { MCM_GETCOLOR, sent|wparam|lparam, MCSC_TITLEBK, 0}, - { MCM_SETCOLOR, sent|wparam|lparam, MCSC_TITLEBK, RGB(255,255,255)}, - { MCM_GETCOLOR, sent|wparam|lparam, MCSC_TITLEBK, 0}, - - { MCM_GETCOLOR, sent|wparam|lparam, MCSC_TITLETEXT, 0}, - { MCM_SETCOLOR, sent|wparam|lparam, MCSC_TITLETEXT, RGB(0,0,0)}, - { MCM_GETCOLOR, sent|wparam|lparam, MCSC_TITLETEXT, 0}, - { MCM_SETCOLOR, sent|wparam|lparam, MCSC_TITLETEXT, RGB(255,255,255)}, - { MCM_GETCOLOR, sent|wparam|lparam, MCSC_TITLETEXT, 0}, - - { MCM_GETCOLOR, sent|wparam|lparam, MCSC_TRAILINGTEXT, 0}, - { MCM_SETCOLOR, sent|wparam|lparam, MCSC_TRAILINGTEXT, RGB(0,0,0)}, - { MCM_GETCOLOR, sent|wparam|lparam, MCSC_TRAILINGTEXT, 0}, - { MCM_SETCOLOR, sent|wparam|lparam, MCSC_TRAILINGTEXT, RGB(255,255,255)}, - { MCM_GETCOLOR, sent|wparam|lparam, MCSC_TRAILINGTEXT, 0}, - { 0 } -}; - -static const struct message monthcal_curr_date_seq[] = { - { MCM_SETCURSEL, sent|wparam, 0}, - { WM_PAINT, sent|wparam|lparam|defwinproc, 0, 0}, - { MCM_SETCURSEL, sent|wparam, 0}, - { MCM_SETCURSEL, sent|wparam, 0}, - { MCM_GETCURSEL, sent|wparam, 0}, - { MCM_GETCURSEL, sent|wparam|lparam, 0, 0}, - { 0 } -}; - -static const struct message monthcal_first_day_seq[] = { - { MCM_GETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 0}, - - { MCM_SETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, -5}, - { MCM_GETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 0}, - - { MCM_SETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, -4}, - { MCM_GETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 0}, - - { MCM_SETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, -3}, - { MCM_GETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 0}, - - { MCM_SETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, -2}, - { MCM_GETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 0}, - - { MCM_SETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, -1}, - { MCM_GETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 0}, - - { MCM_SETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 0}, - { MCM_GETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 0}, - - { MCM_SETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 1}, - { MCM_GETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 0}, - - { MCM_SETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 2}, - { MCM_GETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 0}, - - { MCM_SETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 3}, - { MCM_GETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 0}, - - { MCM_SETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 4}, - { MCM_GETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 0}, - - { MCM_SETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 5}, - { MCM_GETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 0}, - - { MCM_SETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 6}, - { MCM_GETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 0}, - - { MCM_SETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 7}, - { MCM_GETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 0}, - - { MCM_SETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 8}, - { MCM_GETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 0}, - - { MCM_SETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 9}, - { MCM_GETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 0}, - - { MCM_SETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 10}, - { MCM_GETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 0}, - - { MCM_SETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 11}, - { MCM_GETFIRSTDAYOFWEEK, sent|wparam|lparam, 0, 0}, - { 0 } -}; - -static const struct message monthcal_unicode_seq[] = { - { MCM_GETUNICODEFORMAT, sent|wparam|lparam, 0, 0}, - { MCM_SETUNICODEFORMAT, sent|wparam|lparam, 1, 0}, - { MCM_GETUNICODEFORMAT, sent|wparam|lparam, 0, 0}, - { MCM_SETUNICODEFORMAT, sent|wparam|lparam, 0, 0}, - { MCM_GETUNICODEFORMAT, sent|wparam|lparam, 0, 0}, - { MCM_SETUNICODEFORMAT, sent|wparam|lparam, 1, 0}, - { 0 } -}; - -static const struct message monthcal_hit_test_seq[] = { - { MCM_SETCURSEL, sent|wparam, 0}, - { WM_PAINT, sent|wparam|lparam|defwinproc, 0, 0}, - { MCM_HITTEST, sent|wparam, 0}, - { MCM_HITTEST, sent|wparam, 0}, - { MCM_HITTEST, sent|wparam, 0}, - { MCM_HITTEST, sent|wparam, 0}, - { MCM_HITTEST, sent|wparam, 0}, - { MCM_HITTEST, sent|wparam, 0}, - { MCM_HITTEST, sent|wparam, 0}, - { MCM_HITTEST, sent|wparam, 0}, - { MCM_HITTEST, sent|wparam, 0}, - { MCM_HITTEST, sent|wparam, 0}, - { 0 } -}; - -static const struct message monthcal_todaylink_seq[] = { - { MCM_HITTEST, sent|wparam, 0}, - { MCM_SETTODAY, sent|wparam, 0}, - { WM_PAINT, sent|wparam|lparam|defwinproc, 0, 0}, - { MCM_GETTODAY, sent|wparam, 0}, - { WM_LBUTTONDOWN, sent|wparam, MK_LBUTTON}, - { WM_CAPTURECHANGED, sent|wparam|lparam|defwinproc, 0, 0}, - { WM_PAINT, sent|wparam|lparam|defwinproc, 0, 0}, - { MCM_GETCURSEL, sent|wparam, 0}, - { 0 } -}; - -static const struct message monthcal_today_seq[] = { - { MCM_SETTODAY, sent|wparam, 0}, - { WM_PAINT, sent|wparam|lparam|defwinproc, 0, 0}, - { MCM_GETTODAY, sent|wparam, 0}, - { MCM_SETTODAY, sent|wparam, 0}, - { WM_PAINT, sent|wparam|lparam|defwinproc, 0, 0}, - { MCM_GETTODAY, sent|wparam, 0}, - { 0 } -}; - -static const struct message monthcal_scroll_seq[] = { - { MCM_SETMONTHDELTA, sent|wparam|lparam, 2, 0}, - { MCM_SETMONTHDELTA, sent|wparam|lparam, 3, 0}, - { MCM_GETMONTHDELTA, sent|wparam|lparam, 0, 0}, - { MCM_SETMONTHDELTA, sent|wparam|lparam, 12, 0}, - { MCM_GETMONTHDELTA, sent|wparam|lparam, 0, 0}, - { MCM_SETMONTHDELTA, sent|wparam|lparam, 15, 0}, - { MCM_GETMONTHDELTA, sent|wparam|lparam, 0, 0}, - { MCM_SETMONTHDELTA, sent|wparam|lparam, -5, 0}, - { MCM_GETMONTHDELTA, sent|wparam|lparam, 0, 0}, - { 0 } -}; - -static const struct message monthcal_monthrange_seq[] = { - { MCM_GETMONTHRANGE, sent|wparam, GMR_VISIBLE}, - { MCM_GETMONTHRANGE, sent|wparam, GMR_DAYSTATE}, - { 0 } -}; - -static const struct message monthcal_max_sel_day_seq[] = { - { MCM_SETMAXSELCOUNT, sent|wparam|lparam, 5, 0}, - { MCM_GETMAXSELCOUNT, sent|wparam|lparam, 0, 0}, - { MCM_SETMAXSELCOUNT, sent|wparam|lparam, 15, 0}, - { MCM_GETMAXSELCOUNT, sent|wparam|lparam, 0, 0}, - { MCM_SETMAXSELCOUNT, sent|wparam|lparam, -1, 0}, - { MCM_GETMAXSELCOUNT, sent|wparam|lparam, 0, 0}, - { 0 } -}; - -/* expected message sequence for parent*/ -static const struct message destroy_monthcal_parent_msgs_seq[] = { - { WM_PARENTNOTIFY, sent|wparam, WM_DESTROY}, - { 0 } -}; - -/* expected message sequence for child*/ -static const struct message destroy_monthcal_child_msgs_seq[] = { - { 0x0090, sent|optional }, /* Vista */ - { WM_SHOWWINDOW, sent|wparam|lparam, 0, 0}, - { WM_WINDOWPOSCHANGING, sent|wparam, 0}, - { WM_WINDOWPOSCHANGED, sent|wparam, 0}, - { WM_DESTROY, sent|wparam|lparam, 0, 0}, - { WM_NCDESTROY, sent|wparam|lparam, 0, 0}, - { 0 } -}; - -static const struct message destroy_monthcal_multi_sel_style_seq[] = { - { 0x0090, sent|optional }, /* Vista */ - { WM_SHOWWINDOW, sent|wparam|lparam, 0, 0}, - { WM_WINDOWPOSCHANGING, sent|wparam, 0}, - { WM_WINDOWPOSCHANGED, sent|wparam, 0}, - { WM_DESTROY, sent|wparam|lparam, 0, 0}, - { WM_NCDESTROY, sent|wparam|lparam, 0, 0}, - { 0 } -}; - -/* expected message sequence for parent window*/ -static const struct message destroy_parent_seq[] = { - { 0x0090, sent|optional }, /* Vista */ - { WM_WINDOWPOSCHANGING, sent|wparam, 0}, - { WM_WINDOWPOSCHANGED, sent|wparam, 0}, - { WM_IME_SETCONTEXT, sent|wparam|optional, 0}, - { WM_IME_NOTIFY, sent|wparam|lparam|defwinproc|optional, 1, 0}, - { WM_NCACTIVATE, sent|wparam|optional, 0}, - { WM_ACTIVATE, sent|wparam|optional, 0}, - { WM_NCACTIVATE, sent|wparam|lparam|optional, 0, 0}, - { WM_ACTIVATE, sent|wparam|lparam|optional, 0, 0}, - { WM_ACTIVATEAPP, sent|wparam|optional, 0}, - { WM_KILLFOCUS, sent|wparam|lparam|optional, 0, 0}, - { WM_IME_SETCONTEXT, sent|wparam|optional, 0}, - { WM_IME_NOTIFY, sent|wparam|lparam|defwinproc|optional, 1, 0}, - { WM_DESTROY, sent|wparam|lparam, 0, 0}, - { WM_NCDESTROY, sent|wparam|lparam, 0, 0}, - { 0 } -}; - -static void test_monthcal(void) -{ - HWND hwnd; - SYSTEMTIME st[2], st1[2], today; - int res, month_range; - DWORD limits; - - hwnd = CreateWindowA(MONTHCAL_CLASSA, "MonthCal", WS_POPUP | WS_VISIBLE, CW_USEDEFAULT, - 0, 300, 300, 0, 0, NULL, NULL); - ok(hwnd != NULL, "Failed to create MonthCal\n"); - - /* test range just after creation */ - memset(&st, 0xcc, sizeof(st)); - limits = SendMessage(hwnd, MCM_GETRANGE, 0, (LPARAM)st); - ok(limits == 0 || - broken(limits == GDTR_MIN), /* comctl32 <= 4.70 */ - "No limits should be set (%d)\n", limits); - if (limits == GDTR_MIN) - { - win_skip("comctl32 <= 4.70 is broken\n"); - DestroyWindow(hwnd); - return; - } - - ok(0 == st[0].wYear || - broken(1752 == st[0].wYear), /* comctl32 <= 4.72 */ - "Expected 0, got %d\n", st[0].wYear); - ok(0 == st[0].wMonth || - broken(9 == st[0].wMonth), /* comctl32 <= 4.72 */ - "Expected 0, got %d\n", st[0].wMonth); - ok(0 == st[0].wDay || - broken(14 == st[0].wDay), /* comctl32 <= 4.72 */ - "Expected 0, got %d\n", st[0].wDay); - expect(0, st[0].wDayOfWeek); - expect(0, st[0].wHour); - expect(0, st[0].wMinute); - expect(0, st[0].wSecond); - expect(0, st[0].wMilliseconds); - - expect(0, st[1].wYear); - expect(0, st[1].wMonth); - expect(0, st[1].wDay); - expect(0, st[1].wDayOfWeek); - expect(0, st[1].wHour); - expect(0, st[1].wMinute); - expect(0, st[1].wSecond); - expect(0, st[1].wMilliseconds); - - GetSystemTime(&st[0]); - st[1] = st[0]; - - SendMessage(hwnd, MCM_GETTODAY, 0, (LPARAM)&today); - - /* Invalid date/time */ - st[0].wYear = 2000; - /* Time should not matter */ - st[1].wHour = st[1].wMinute = st[1].wSecond = 70; - st[1].wMilliseconds = 1200; - ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Failed to set MAX limit\n"); - /* invalid timestamp is written back with today data and msecs untouched */ - expect(today.wHour, st[1].wHour); - expect(today.wMinute, st[1].wMinute); - expect(today.wSecond, st[1].wSecond); - expect(1200, st[1].wMilliseconds); - - ok(SendMessage(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == GDTR_MAX, "No limits should be set\n"); - ok(st1[0].wYear != 2000, "Lower limit changed\n"); - /* invalid timestamp should be replaced with today data, except msecs */ - expect(today.wHour, st1[1].wHour); - expect(today.wMinute, st1[1].wMinute); - expect(today.wSecond, st1[1].wSecond); - expect(1200, st1[1].wMilliseconds); - - /* Invalid date/time with invalid milliseconds only */ - GetSystemTime(&st[0]); - st[1] = st[0]; - /* Time should not matter */ - st[1].wMilliseconds = 1200; - ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Failed to set MAX limit\n"); - /* invalid milliseconds field doesn't lead to invalid timestamp */ - expect(st[0].wHour, st[1].wHour); - expect(st[0].wMinute, st[1].wMinute); - expect(st[0].wSecond, st[1].wSecond); - expect(1200, st[1].wMilliseconds); - - GetSystemTime(&st[0]); - - st[1].wMonth = 0; - ok(!SendMessage(hwnd, MCM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st), "Should have failed to set limits\n"); - ok(SendMessage(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == GDTR_MAX, "No limits should be set\n"); - ok(st1[0].wYear != 2000, "Lower limit changed\n"); - ok(!SendMessage(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Should have failed to set MAX limit\n"); - ok(SendMessage(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == GDTR_MAX, "No limits should be set\n"); - ok(st1[0].wYear != 2000, "Lower limit changed\n"); - - GetSystemTime(&st[0]); - st[0].wDay = 20; - st[0].wMonth = 5; - st[1] = st[0]; - - month_range = SendMessage(hwnd, MCM_GETMONTHRANGE, GMR_VISIBLE, (LPARAM)st1); - st[1].wMonth--; - ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st), "Failed to set both min and max limits\n"); - res = SendMessage(hwnd, MCM_GETMONTHRANGE, GMR_VISIBLE, (LPARAM)st1); - ok(res == month_range, "Invalid month range (%d)\n", res); - ok(SendMessage(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == (GDTR_MIN|GDTR_MAX), "Limits should be set\n"); - - st[1].wMonth += 2; - ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st), "Failed to set both min and max limits\n"); - res = SendMessage(hwnd, MCM_GETMONTHRANGE, GMR_VISIBLE, (LPARAM)st1); - ok(res == month_range, "Invalid month range (%d)\n", res); - - st[1].wYear --; - ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st), "Failed to set both min and max limits\n"); - st[1].wYear += 1; - ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st), "Failed to set both min and max limits\n"); - - st[1].wMonth -= 3; - ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Failed to set max limit\n"); - ok(SendMessage(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == GDTR_MAX, "Only MAX limit should be set\n"); - st[1].wMonth += 4; - ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Failed to set max limit\n"); - st[1].wYear -= 3; - ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Failed to set max limit\n"); - st[1].wYear += 4; - ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Failed to set max limit\n"); - ok(SendMessage(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == GDTR_MAX, "Only MAX limit should be set\n"); - - /* set both limits, then set max < min */ - GetSystemTime(&st[0]); - st[1] = st[0]; - st[1].wYear++; - ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MIN|GDTR_MAX, (LPARAM)st), "Failed to set limits\n"); - ok(SendMessage(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == (GDTR_MIN|GDTR_MAX), "Min limit expected\n"); - st[1].wYear -= 2; - ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Failed to set limits\n"); - ok(SendMessage(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == GDTR_MAX, "Max limit expected\n"); - - expect(0, st1[0].wYear); - expect(0, st1[0].wMonth); - expect(0, st1[0].wDay); - expect(0, st1[0].wDayOfWeek); - expect(0, st1[0].wHour); - expect(0, st1[0].wMinute); - expect(0, st1[0].wSecond); - expect(0, st1[0].wMilliseconds); - - expect(st[1].wYear, st1[1].wYear); - expect(st[1].wMonth, st1[1].wMonth); - expect(st[1].wDay, st1[1].wDay); - expect(st[1].wDayOfWeek, st1[1].wDayOfWeek); - expect(st[1].wHour, st1[1].wHour); - expect(st[1].wMinute, st1[1].wMinute); - expect(st[1].wSecond, st1[1].wSecond); - expect(st[1].wMilliseconds, st1[1].wMilliseconds); - - st[1] = st[0]; - st[1].wYear++; - ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MIN|GDTR_MAX, (LPARAM)st), "Failed to set limits\n"); - ok(SendMessage(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == (GDTR_MIN|GDTR_MAX), "Min limit expected\n"); - st[0].wYear++; /* start == end now */ - ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MIN, (LPARAM)st), "Failed to set limits\n"); - ok(SendMessage(hwnd, MCM_GETRANGE, 0, (LPARAM)st1) == GDTR_MIN, "Min limit expected\n"); - - expect(st[0].wYear, st1[0].wYear); - expect(st[0].wMonth, st1[0].wMonth); - expect(st[0].wDay, st1[0].wDay); - expect(st[0].wDayOfWeek, st1[0].wDayOfWeek); - expect(st[0].wHour, st1[0].wHour); - expect(st[0].wMinute, st1[0].wMinute); - expect(st[0].wSecond, st1[0].wSecond); - expect(st[0].wMilliseconds, st1[0].wMilliseconds); - - expect(0, st1[1].wYear); - expect(0, st1[1].wMonth); - expect(0, st1[1].wDay); - expect(0, st1[1].wDayOfWeek); - expect(0, st1[1].wHour); - expect(0, st1[1].wMinute); - expect(0, st1[1].wSecond); - expect(0, st1[1].wMilliseconds); - - DestroyWindow(hwnd); -} - -static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - static LONG defwndproc_counter = 0; - LRESULT ret; - struct message msg; - - /* log system messages, except for painting */ - if (message < WM_USER && - message != WM_PAINT && - message != WM_ERASEBKGND && - message != WM_NCPAINT && - message != WM_NCHITTEST && - message != WM_GETTEXT && - message != WM_GETICON && - message != WM_DEVICECHANGE) - { - trace("parent: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); - - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - add_message(sequences, PARENT_SEQ_INDEX, &msg); - } - - defwndproc_counter++; - ret = DefWindowProcA(hwnd, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static BOOL register_parent_wnd_class(void) -{ - WNDCLASSA cls; - - cls.style = 0; - cls.lpfnWndProc = parent_wnd_proc; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(NULL); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "Month-Cal test parent class"; - return RegisterClassA(&cls); -} - -static HWND create_parent_window(void) -{ - HWND hwnd; - - InitCommonControls(); - - /* flush message sequences, so we can check the new sequence by the end of function */ - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - if (!register_parent_wnd_class()) - return NULL; - - hwnd = CreateWindowEx(0, "Month-Cal test parent class", - "Month-Cal test parent window", - WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | - WS_MAXIMIZEBOX | WS_VISIBLE, - 0, 0, 500, 500, - GetDesktopWindow(), NULL, GetModuleHandleA(NULL), NULL); - - assert(hwnd); - - /* check for message sequences */ - ok_sequence(sequences, PARENT_SEQ_INDEX, create_parent_window_seq, "create parent window", FALSE); - - return hwnd; -} - -static LRESULT WINAPI monthcal_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - WNDPROC oldproc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA); - static LONG defwndproc_counter = 0; - LRESULT ret; - struct message msg; - - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - add_message(sequences, MONTHCAL_SEQ_INDEX, &msg); - - /* some debug output for style changing */ - if ((message == WM_STYLECHANGING || - message == WM_STYLECHANGED) && lParam) - { - STYLESTRUCT *style = (STYLESTRUCT*)lParam; - trace("\told style: 0x%08x, new style: 0x%08x\n", style->styleOld, style->styleNew); - } - - defwndproc_counter++; - ret = CallWindowProcA(oldproc, hwnd, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static HWND create_monthcal_control(DWORD style) -{ - WNDPROC oldproc; - HWND hwnd; - - hwnd = CreateWindowEx(0, - MONTHCAL_CLASS, - "", - WS_CHILD | WS_BORDER | WS_VISIBLE | style, - 0, 0, 300, 400, - parent_wnd, NULL, GetModuleHandleA(NULL), NULL); - - if (!hwnd) return NULL; - - oldproc = (WNDPROC)SetWindowLongPtrA(hwnd, GWLP_WNDPROC, - (LONG_PTR)monthcal_subclass_proc); - SetWindowLongPtrA(hwnd, GWLP_USERDATA, (LONG_PTR)oldproc); - - SendMessage(hwnd, WM_SETFONT, (WPARAM)GetStockObject(SYSTEM_FONT), 0); - - return hwnd; -} - - -/* Setter and Getters Tests */ - -static void test_monthcal_color(void) -{ - int res, temp; - HWND hwnd; - - hwnd = create_monthcal_control(0); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* Setter and Getters for color*/ - temp = SendMessage(hwnd, MCM_GETCOLOR, MCSC_BACKGROUND, 0); - res = SendMessage(hwnd, MCM_SETCOLOR, MCSC_BACKGROUND, RGB(0,0,0)); - expect(temp, res); - temp = SendMessage(hwnd, MCM_GETCOLOR, MCSC_BACKGROUND, 0); - expect(RGB(0,0,0), temp); - res = SendMessage(hwnd, MCM_SETCOLOR, MCSC_BACKGROUND, RGB(255,255,255)); - expect(temp, res); - temp = SendMessage(hwnd, MCM_GETCOLOR, MCSC_BACKGROUND, 0); - expect(RGB(255,255,255), temp); - - temp = SendMessage(hwnd, MCM_GETCOLOR, MCSC_MONTHBK, 0); - res = SendMessage(hwnd, MCM_SETCOLOR, MCSC_MONTHBK, RGB(0,0,0)); - expect(temp, res); - temp = SendMessage(hwnd, MCM_GETCOLOR, MCSC_MONTHBK, 0); - expect(RGB(0,0,0), temp); - res = SendMessage(hwnd, MCM_SETCOLOR, MCSC_MONTHBK, RGB(255,255,255)); - expect(temp, res); - temp = SendMessage(hwnd, MCM_GETCOLOR, MCSC_MONTHBK, 0); - expect(RGB(255,255,255), temp); - - temp = SendMessage(hwnd, MCM_GETCOLOR, MCSC_TEXT, 0); - res = SendMessage(hwnd, MCM_SETCOLOR, MCSC_TEXT, RGB(0,0,0)); - expect(temp, res); - temp = SendMessage(hwnd, MCM_GETCOLOR, MCSC_TEXT, 0); - expect(RGB(0,0,0), temp); - res = SendMessage(hwnd, MCM_SETCOLOR, MCSC_TEXT, RGB(255,255,255)); - expect(temp, res); - temp = SendMessage(hwnd, MCM_GETCOLOR, MCSC_TEXT, 0); - expect(RGB(255,255,255), temp); - - temp = SendMessage(hwnd, MCM_GETCOLOR, MCSC_TITLEBK, 0); - res = SendMessage(hwnd, MCM_SETCOLOR, MCSC_TITLEBK, RGB(0,0,0)); - expect(temp, res); - temp = SendMessage(hwnd, MCM_GETCOLOR, MCSC_TITLEBK, 0); - expect(RGB(0,0,0), temp); - res = SendMessage(hwnd, MCM_SETCOLOR, MCSC_TITLEBK, RGB(255,255,255)); - expect(temp, res); - temp = SendMessage(hwnd, MCM_GETCOLOR, MCSC_TITLEBK, 0); - expect(RGB(255,255,255), temp); - - temp = SendMessage(hwnd, MCM_GETCOLOR, MCSC_TITLETEXT, 0); - res = SendMessage(hwnd, MCM_SETCOLOR, MCSC_TITLETEXT, RGB(0,0,0)); - expect(temp, res); - temp = SendMessage(hwnd, MCM_GETCOLOR, MCSC_TITLETEXT, 0); - expect(RGB(0,0,0), temp); - res = SendMessage(hwnd, MCM_SETCOLOR, MCSC_TITLETEXT, RGB(255,255,255)); - expect(temp, res); - temp = SendMessage(hwnd, MCM_GETCOLOR, MCSC_TITLETEXT, 0); - expect(RGB(255,255,255), temp); - - temp = SendMessage(hwnd, MCM_GETCOLOR, MCSC_TRAILINGTEXT, 0); - res = SendMessage(hwnd, MCM_SETCOLOR, MCSC_TRAILINGTEXT, RGB(0,0,0)); - expect(temp, res); - temp = SendMessage(hwnd, MCM_GETCOLOR, MCSC_TRAILINGTEXT, 0); - expect(RGB(0,0,0), temp); - res = SendMessage(hwnd, MCM_SETCOLOR, MCSC_TRAILINGTEXT, RGB(255,255,255)); - expect(temp, res); - temp = SendMessage(hwnd, MCM_GETCOLOR, MCSC_TRAILINGTEXT, 0); - expect(RGB(255,255,255), temp); - - ok_sequence(sequences, MONTHCAL_SEQ_INDEX, monthcal_color_seq, "monthcal color", FALSE); - - DestroyWindow(hwnd); -} - -static void test_monthcal_currdate(void) -{ - SYSTEMTIME st_original, st_new, st_test; - int res; - HWND hwnd; - - hwnd = create_monthcal_control(0); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* Setter and Getters for current date selected */ - st_original.wYear = 2000; - st_original.wMonth = 11; - st_original.wDay = 28; - st_original.wHour = 11; - st_original.wMinute = 59; - st_original.wSecond = 30; - st_original.wMilliseconds = 0; - st_original.wDayOfWeek = 0; - - st_new = st_test = st_original; - - /* Should not validate the time */ - res = SendMessage(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st_test); - expect(1,res); - - /* Overflow matters, check for wDay */ - st_test.wDay += 4; - res = SendMessage(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st_test); - expect(0,res); - - /* correct wDay before checking for wMonth */ - st_test.wDay -= 4; - expect(st_original.wDay, st_test.wDay); - - /* Overflow matters, check for wMonth */ - st_test.wMonth += 4; - res = SendMessage(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st_test); - expect(0,res); - - /* checking if gets the information right, modify st_new */ - st_new.wYear += 4; - st_new.wMonth += 4; - st_new.wDay += 4; - st_new.wHour += 4; - st_new.wMinute += 4; - st_new.wSecond += 4; - - res = SendMessage(hwnd, MCM_GETCURSEL, 0, (LPARAM)&st_new); - expect(1, res); - - /* st_new change to st_origin, above settings with overflow */ - /* should not change the current settings */ - expect(st_original.wYear, st_new.wYear); - expect(st_original.wMonth, st_new.wMonth); - expect(st_original.wDay, st_new.wDay); - ok(st_original.wHour == st_new.wHour || - broken(0 == st_new.wHour), /* comctl32 <= 4.70 */ - "Expected %d, got %d\n", st_original.wHour, st_new.wHour); - ok(st_original.wMinute == st_new.wMinute || - broken(0 == st_new.wMinute), /* comctl32 <= 4.70 */ - "Expected %d, got %d\n", st_original.wMinute, st_new.wMinute); - ok(st_original.wSecond == st_new.wSecond || - broken(0 == st_new.wSecond), /* comctl32 <= 4.70 */ - "Expected %d, got %d\n", st_original.wSecond, st_new.wSecond); - - /* lparam cannot be NULL */ - res = SendMessage(hwnd, MCM_GETCURSEL, 0, 0); - expect(0, res); - - ok_sequence(sequences, MONTHCAL_SEQ_INDEX, monthcal_curr_date_seq, "monthcal currDate", TRUE); - - /* December, 31, 9999 is the maximum allowed date */ - memset(&st_new, 0, sizeof(st_new)); - st_new.wYear = 9999; - st_new.wMonth = 12; - st_new.wDay = 31; - res = SendMessage(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st_new); - expect(1, res); - memset(&st_test, 0, sizeof(st_test)); - res = SendMessage(hwnd, MCM_GETCURSEL, 0, (LPARAM)&st_test); - expect(1, res); - expect(st_new.wYear, st_test.wYear); - expect(st_new.wMonth, st_test.wMonth); - expect(st_new.wDay, st_test.wDay); - expect(st_new.wHour, st_test.wHour); - expect(st_new.wMinute, st_test.wMinute); - expect(st_new.wSecond, st_test.wSecond); - /* try one day later */ - st_original = st_new; - st_new.wYear = 10000; - st_new.wMonth = 1; - st_new.wDay = 1; - res = SendMessage(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st_new); - ok(0 == res || - broken(1 == res), /* comctl32 <= 4.72 */ - "Expected 0, got %d\n", res); - if (0 == res) - { - memset(&st_test, 0, sizeof(st_test)); - res = SendMessage(hwnd, MCM_GETCURSEL, 0, (LPARAM)&st_test); - expect(1, res); - expect(st_original.wYear, st_test.wYear); - expect(st_original.wMonth, st_test.wMonth); - expect(st_original.wDay, st_test.wDay); - expect(st_original.wHour, st_test.wHour); - expect(st_original.wMinute, st_test.wMinute); - expect(st_original.wSecond, st_test.wSecond); - } - - /* setting selection equal to current reports success even if out range */ - memset(&st_new, 0, sizeof(st_new)); - st_new.wYear = 2009; - st_new.wDay = 5; - st_new.wMonth = 10; - res = SendMessage(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st_new); - expect(1, res); - memset(&st_test, 0, sizeof(st_test)); - st_test.wYear = 2009; - st_test.wDay = 6; - st_test.wMonth = 10; - res = SendMessage(hwnd, MCM_SETRANGE, GDTR_MIN, (LPARAM)&st_test); - expect(1, res); - /* set to current again */ - res = SendMessage(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st_new); - expect(1, res); - - DestroyWindow(hwnd); -} - -static void test_monthcal_firstDay(void) -{ - int res, fday, i, prev; - CHAR b[128]; - LCID lcid = LOCALE_USER_DEFAULT; - HWND hwnd; - - hwnd = create_monthcal_control(0); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* Setter and Getters for first day of week */ - /* check for locale first day */ - if(GetLocaleInfoA(lcid, LOCALE_IFIRSTDAYOFWEEK, b, 128)){ - fday = atoi(b); - trace("fday: %d\n", fday); - res = SendMessage(hwnd, MCM_GETFIRSTDAYOFWEEK, 0, 0); - expect(fday, res); - prev = fday; - - /* checking for the values that actually will be stored as */ - /* current first day when we set a new value */ - for (i = -5; i < 12; i++){ - res = SendMessage(hwnd, MCM_SETFIRSTDAYOFWEEK, 0, i); - expect(prev, res); - res = SendMessage(hwnd, MCM_GETFIRSTDAYOFWEEK, 0, 0); - prev = res; - - if (i == -1){ - expect(MAKELONG(fday, FALSE), res); - }else if (i >= 7){ - /* out of range sets max first day of week, locale is ignored */ - expect(MAKELONG(6, TRUE), res); - }else{ - expect(MAKELONG(i, TRUE), res); - } - } - - ok_sequence(sequences, MONTHCAL_SEQ_INDEX, monthcal_first_day_seq, "monthcal firstDay", FALSE); - - }else{ - skip("Cannot retrieve first day of the week\n"); - } - - DestroyWindow(hwnd); -} - -static void test_monthcal_unicode(void) -{ - int res, temp; - HWND hwnd; - - hwnd = create_monthcal_control(0); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* Setter and Getters for Unicode format */ - - /* getting the current settings */ - temp = SendMessage(hwnd, MCM_GETUNICODEFORMAT, 0, 0); - - /* setting to 1, should return previous settings */ - res = SendMessage(hwnd, MCM_SETUNICODEFORMAT, 1, 0); - expect(temp, res); - - /* current setting is 1, so, should return 1 */ - res = SendMessage(hwnd, MCM_GETUNICODEFORMAT, 0, 0); - ok(1 == res || - broken(0 == res), /* comctl32 <= 4.70 */ - "Expected 1, got %d\n", res); - - /* setting to 0, should return previous settings */ - res = SendMessage(hwnd, MCM_SETUNICODEFORMAT, 0, 0); - ok(1 == res || - broken(0 == res), /* comctl32 <= 4.70 */ - "Expected 1, got %d\n", res); - - /* current setting is 0, so, it should return 0 */ - res = SendMessage(hwnd, MCM_GETUNICODEFORMAT, 0, 0); - expect(0, res); - - /* should return previous settings */ - res = SendMessage(hwnd, MCM_SETUNICODEFORMAT, 1, 0); - expect(0, res); - - ok_sequence(sequences, MONTHCAL_SEQ_INDEX, monthcal_unicode_seq, "monthcal unicode", FALSE); - - DestroyWindow(hwnd); -} - -static void test_monthcal_hittest(void) -{ - typedef struct hittest_test - { - UINT ht; - int todo; - } hittest_test_t; - - static const hittest_test_t title_hits[] = { - /* Start is the same everywhere */ - { MCHT_TITLE, 0 }, - { MCHT_TITLEBTNPREV, 0 }, - /* The middle piece is only tested for presence of items */ - /* End is the same everywhere */ - { MCHT_TITLEBTNNEXT, 0 }, - { MCHT_TITLE, 0 }, - { MCHT_NOWHERE, 1 } - }; - - MCHITTESTINFO mchit; - UINT res, old_res; - SYSTEMTIME st; - LONG x; - UINT title_index; - HWND hwnd; - RECT r; - char yearmonth[80], *locale_month, *locale_year; - int month_count, year_count; - BOOL in_the_middle; - - memset(&mchit, 0, sizeof(MCHITTESTINFO)); - - hwnd = create_monthcal_control(0); - - /* test with invalid structure size */ - mchit.cbSize = MCHITTESTINFO_V1_SIZE - 1; - mchit.pt.x = 0; - mchit.pt.y = 0; - res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit); - expect(0, mchit.pt.x); - expect(0, mchit.pt.y); - expect(-1, res); - expect(0, mchit.uHit); - /* test with invalid pointer */ - res = SendMessage(hwnd, MCM_HITTEST, 0, 0); - expect(-1, res); - - /* resize control to display single Calendar */ - res = SendMessage(hwnd, MCM_GETMINREQRECT, 0, (LPARAM)&r); - if (res == 0) - { - win_skip("Message MCM_GETMINREQRECT unsupported. Skipping.\n"); - DestroyWindow(hwnd); - return; - } - MoveWindow(hwnd, 0, 0, r.right, r.bottom, FALSE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - st.wYear = 2007; - st.wMonth = 4; - st.wDay = 11; - st.wHour = 1; - st.wMinute = 0; - st.wSecond = 0; - st.wMilliseconds = 0; - st.wDayOfWeek = 0; - - res = SendMessage(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st); - expect(1,res); - - /* (0, 0) is the top left of the control - title */ - mchit.cbSize = MCHITTESTINFO_V1_SIZE; - mchit.pt.x = 0; - mchit.pt.y = 0; - res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit); - expect(0, mchit.pt.x); - expect(0, mchit.pt.y); - expect(mchit.uHit, res); - expect_hex(MCHT_TITLE, res); - - /* bottom right of the control and should not be active */ - mchit.pt.x = r.right; - mchit.pt.y = r.bottom; - res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit); - expect(r.right, mchit.pt.x); - expect(r.bottom, mchit.pt.y); - expect(mchit.uHit, res); - todo_wine expect_hex(MCHT_NOWHERE, res); - - /* completely out of the control, should not be active */ - mchit.pt.x = 2 * r.right; - mchit.pt.y = 2 * r.bottom; - res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit); - expect(2 * r.right, mchit.pt.x); - expect(2 * r.bottom, mchit.pt.y); - expect(mchit.uHit, res); - todo_wine expect_hex(MCHT_NOWHERE, res); - - /* in active area - day of the week */ - mchit.pt.x = r.right / 2; - mchit.pt.y = r.bottom / 2; - res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit); - expect(r.right / 2, mchit.pt.x); - expect(r.bottom / 2, mchit.pt.y); - expect(mchit.uHit, res); - expect_hex(MCHT_CALENDARDATE, res); - - /* in active area - day of the week #2 */ - mchit.pt.x = r.right / 14; /* half of first day rect */ - mchit.pt.y = r.bottom / 2; - res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit); - expect(r.right / 14, mchit.pt.x); - expect(r.bottom / 2, mchit.pt.y); - expect(mchit.uHit, res); - expect_hex(MCHT_CALENDARDATE, res); - - /* in active area - date from prev month */ - mchit.pt.x = r.right / 14; /* half of first day rect */ - mchit.pt.y = 6 * r.bottom / 19; - res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit); - expect(r.right / 14, mchit.pt.x); - expect(6 * r.bottom / 19, mchit.pt.y); - expect(mchit.uHit, res); - expect_hex(MCHT_CALENDARDATEPREV, res); - -#if 0 - /* (125, 115) is in active area - date from this month */ - mchit.pt.x = 125; - mchit.pt.y = 115; - res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit); - expect(125, mchit.pt.x); - expect(115, mchit.pt.y); - expect(mchit.uHit, res); - expect(MCHT_CALENDARDATE, res); -#endif - - /* in active area - date from next month */ - mchit.pt.x = 11 * r.right / 14; - mchit.pt.y = 16 * r.bottom / 19; - res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit); - expect(11 * r.right / 14, mchit.pt.x); - expect(16 * r.bottom / 19, mchit.pt.y); - expect(mchit.uHit, res); - expect_hex(MCHT_CALENDARDATENEXT, res); - - /* in active area - today link */ - mchit.pt.x = r.right / 14; - mchit.pt.y = 18 * r.bottom / 19; - res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit); - expect(r.right / 14, mchit.pt.x); - expect(18 * r.bottom / 19, mchit.pt.y); - expect(mchit.uHit, res); - expect_hex(MCHT_TODAYLINK, res); - - /* in active area - today link */ - mchit.pt.x = r.right / 2; - mchit.pt.y = 18 * r.bottom / 19; - res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit); - expect(r.right / 2, mchit.pt.x); - expect(18 * r.bottom / 19, mchit.pt.y); - expect(mchit.uHit, res); - expect_hex(MCHT_TODAYLINK, res); - - /* in active area - today link */ - mchit.pt.x = r.right / 10; - mchit.pt.y = 18 * r.bottom / 19; - res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit); - expect(r.right / 10, mchit.pt.x); - expect(18 * r.bottom / 19, mchit.pt.y); - expect(mchit.uHit, res); - expect_hex(MCHT_TODAYLINK, res); - - ok_sequence(sequences, MONTHCAL_SEQ_INDEX, monthcal_hit_test_seq, "monthcal hit test", TRUE); - - /* The horizontal position of title bar elements depends on locale (y pos - is constant), so we sample across a horizontal line and make sure we - find all elements. */ - - /* Get the format of the title */ - GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SYEARMONTH, yearmonth, 80); - /* Find out if we have a month and/or year */ - locale_year = strstr(yearmonth, "y"); - locale_month = strstr(yearmonth, "M"); - - mchit.pt.x = 0; - mchit.pt.y = (5/2) * r.bottom / 19; - title_index = 0; - old_res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit); - expect_hex(title_hits[title_index].ht, old_res); - - in_the_middle = FALSE; - month_count = year_count = 0; - for (x = 0; x < r.right; x++){ - mchit.pt.x = x; - res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit); - expect(x, mchit.pt.x); - expect((5/2) * r.bottom / 19, mchit.pt.y); - expect(mchit.uHit, res); - if (res != old_res) { - - if (old_res == MCHT_TITLEBTNPREV) - in_the_middle = TRUE; - - if (res == MCHT_TITLEBTNNEXT) - in_the_middle = FALSE; - - if (in_the_middle) { - if (res == MCHT_TITLEMONTH) - month_count++; - else if (res == MCHT_TITLEYEAR) - year_count++; - } else { - title_index++; - - if (sizeof(title_hits) / sizeof(title_hits[0]) <= title_index) - break; - - if (title_hits[title_index].todo) { - todo_wine - ok(title_hits[title_index].ht == res, "Expected %x, got %x, pos %d\n", - title_hits[title_index].ht, res, x); - } else { - ok(title_hits[title_index].ht == res, "Expected %x, got %x, pos %d\n", - title_hits[title_index].ht, res, x); - } - } - old_res = res; - } - } - - /* There are some limits, even if LOCALE_SYEARMONTH contains rubbish - * or no month/year indicators at all */ - if (locale_month) - todo_wine ok(month_count == 1, "Expected 1 month item, got %d\n", month_count); - else - ok(month_count <= 1, "Too many month items: %d\n", month_count); - - if (locale_year) - todo_wine ok(year_count == 1, "Expected 1 year item, got %d\n", year_count); - else - ok(year_count <= 1, "Too many year items: %d\n", year_count); - - todo_wine ok(month_count + year_count >= 1, "Not enough month and year items\n"); - - ok(r.right <= x && title_index + 1 == sizeof(title_hits) / sizeof(title_hits[0]), - "Wrong title layout\n"); - - DestroyWindow(hwnd); -} - -static void test_monthcal_todaylink(void) -{ - MCHITTESTINFO mchit; - SYSTEMTIME st_test, st_new; - UINT res; - HWND hwnd; - RECT r; - - memset(&mchit, 0, sizeof(MCHITTESTINFO)); - - hwnd = create_monthcal_control(0); - - res = SendMessage(hwnd, MCM_GETMINREQRECT, 0, (LPARAM)&r); - MoveWindow(hwnd, 0, 0, r.right, r.bottom, FALSE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* hit active area - today link */ - mchit.cbSize = MCHITTESTINFO_V1_SIZE; - mchit.pt.x = r.right / 14; - mchit.pt.y = 18 * r.bottom / 19; - res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit); - expect(r.right / 14, mchit.pt.x); - expect(18 * r.bottom / 19, mchit.pt.y); - expect(mchit.uHit, res); - expect(MCHT_TODAYLINK, res); - - st_test.wDay = 1; - st_test.wMonth = 1; - st_test.wYear = 2005; - - SendMessage(hwnd, MCM_SETTODAY, 0, (LPARAM)&st_test); - - memset(&st_new, 0, sizeof(st_new)); - res = SendMessage(hwnd, MCM_GETTODAY, 0, (LPARAM)&st_new); - expect(1, res); - expect(1, st_new.wDay); - expect(1, st_new.wMonth); - expect(2005, st_new.wYear); - - res = SendMessage(hwnd, WM_LBUTTONDOWN, MK_LBUTTON, MAKELONG(mchit.pt.x, mchit.pt.y)); - expect(0, res); - - memset(&st_new, 0, sizeof(st_new)); - res = SendMessage(hwnd, MCM_GETCURSEL, 0, (LPARAM)&st_new); - expect(1, res); - expect(1, st_new.wDay); - expect(1, st_new.wMonth); - expect(2005, st_new.wYear); - - ok_sequence(sequences, MONTHCAL_SEQ_INDEX, monthcal_todaylink_seq, "monthcal hit test", TRUE); - - DestroyWindow(hwnd); -} - -static void test_monthcal_today(void) -{ - SYSTEMTIME st_test, st_new; - int res; - HWND hwnd; - - hwnd = create_monthcal_control(0); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* Setter and Getters for "today" information */ - - /* check for overflow, should be ok */ - memset(&st_test, 0, sizeof(st_test)); - st_test.wDay = 38; - st_test.wMonth = 38; - - st_new.wDay = 27; - st_new.wMonth = 27; - - SendMessage(hwnd, MCM_SETTODAY, 0, (LPARAM)&st_test); - - res = SendMessage(hwnd, MCM_GETTODAY, 0, (LPARAM)&st_new); - expect(1, res); - - /* st_test should not change */ - expect(38, st_test.wDay); - expect(38, st_test.wMonth); - - /* st_new should change, overflow does not matter */ - expect(38, st_new.wDay); - expect(38, st_new.wMonth); - - /* check for zero, should be ok*/ - st_test.wDay = 0; - st_test.wMonth = 0; - - SendMessage(hwnd, MCM_SETTODAY, 0, (LPARAM)&st_test); - - res = SendMessage(hwnd, MCM_GETTODAY, 0, (LPARAM)&st_new); - expect(1, res); - - /* st_test should not change */ - expect(0, st_test.wDay); - expect(0, st_test.wMonth); - - /* st_new should change to zero*/ - expect(0, st_new.wDay); - expect(0, st_new.wMonth); - - ok_sequence(sequences, MONTHCAL_SEQ_INDEX, monthcal_today_seq, "monthcal today", TRUE); - - DestroyWindow(hwnd); -} - -static void test_monthcal_scroll(void) -{ - int res; - HWND hwnd; - - hwnd = create_monthcal_control(0); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* Setter and Getters for scroll rate */ - res = SendMessage(hwnd, MCM_SETMONTHDELTA, 2, 0); - expect(0, res); - - res = SendMessage(hwnd, MCM_SETMONTHDELTA, 3, 0); - expect(2, res); - res = SendMessage(hwnd, MCM_GETMONTHDELTA, 0, 0); - expect(3, res); - - res = SendMessage(hwnd, MCM_SETMONTHDELTA, 12, 0); - expect(3, res); - res = SendMessage(hwnd, MCM_GETMONTHDELTA, 0, 0); - expect(12, res); - - res = SendMessage(hwnd, MCM_SETMONTHDELTA, 15, 0); - expect(12, res); - res = SendMessage(hwnd, MCM_GETMONTHDELTA, 0, 0); - expect(15, res); - - res = SendMessage(hwnd, MCM_SETMONTHDELTA, -5, 0); - expect(15, res); - res = SendMessage(hwnd, MCM_GETMONTHDELTA, 0, 0); - expect(-5, res); - - ok_sequence(sequences, MONTHCAL_SEQ_INDEX, monthcal_scroll_seq, "monthcal scroll", FALSE); - - DestroyWindow(hwnd); -} - -static void test_monthcal_monthrange(void) -{ - int res; - SYSTEMTIME st_visible[2], st_daystate[2], st; - HWND hwnd; - RECT r; - - hwnd = create_monthcal_control(0); - - st_visible[0].wYear = 0; - st_visible[0].wMonth = 0; - st_visible[0].wDay = 0; - st_daystate[1] = st_daystate[0] = st_visible[1] = st_visible[0]; - - st.wYear = 2000; - st.wMonth = 11; - st.wDay = 28; - st.wHour = 11; - st.wMinute = 59; - st.wSecond = 30; - st.wMilliseconds = 0; - st.wDayOfWeek = 0; - - res = SendMessage(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st); - expect(1,res); - - /* to be locale independent */ - SendMessage(hwnd, MCM_SETFIRSTDAYOFWEEK, 0, (LPARAM)6); - - res = SendMessage(hwnd, MCM_GETMINREQRECT, 0, (LPARAM)&r); - expect(TRUE, res); - /* resize control to display two Calendars */ - MoveWindow(hwnd, 0, 0, r.right, (5/2)*r.bottom, FALSE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - res = SendMessage(hwnd, MCM_GETMONTHRANGE, GMR_VISIBLE, (LPARAM)st_visible); - todo_wine { - expect(2, res); - } - expect(2000, st_visible[0].wYear); - expect(11, st_visible[0].wMonth); - expect(1, st_visible[0].wDay); - expect(2000, st_visible[1].wYear); - - todo_wine { - expect(12, st_visible[1].wMonth); - expect(31, st_visible[1].wDay); - } - res = SendMessage(hwnd, MCM_GETMONTHRANGE, GMR_DAYSTATE, (LPARAM)st_daystate); - todo_wine { - expect(4, res); - } - expect(2000, st_daystate[0].wYear); - expect(10, st_daystate[0].wMonth); - expect(29, st_daystate[0].wDay); - - todo_wine { - expect(2001, st_daystate[1].wYear); - expect(1, st_daystate[1].wMonth); - expect(6, st_daystate[1].wDay); - } - - ok_sequence(sequences, MONTHCAL_SEQ_INDEX, monthcal_monthrange_seq, "monthcal monthrange", FALSE); - - /* resize control to display single Calendar */ - MoveWindow(hwnd, 0, 0, r.right, r.bottom, FALSE); - - memset(&st, 0, sizeof(st)); - st.wMonth = 9; - st.wYear = 1752; - st.wDay = 14; - - res = SendMessage(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st); - expect(1, res); - - /* September 1752 has 19 days */ - res = SendMessage(hwnd, MCM_GETMONTHRANGE, GMR_VISIBLE, (LPARAM)st_visible); - expect(1, res); - - expect(1752, st_visible[0].wYear); - expect(9, st_visible[0].wMonth); - ok(14 == st_visible[0].wDay || - broken(1 == st_visible[0].wDay), /* comctl32 <= 4.72 */ - "Expected 14, got %d\n", st_visible[0].wDay); - - expect(1752, st_visible[1].wYear); - expect(9, st_visible[1].wMonth); - expect(19, st_visible[1].wDay); - - DestroyWindow(hwnd); -} - -static void test_monthcal_maxselday(void) -{ - int res; - HWND hwnd; - DWORD style; - - hwnd = create_monthcal_control(0); - /* if no style specified default to 1 */ - res = SendMessage(hwnd, MCM_GETMAXSELCOUNT, 0, 0); - expect(1, res); - res = SendMessage(hwnd, MCM_SETMAXSELCOUNT, 5, 0); - expect(0, res); - res = SendMessage(hwnd, MCM_GETMAXSELCOUNT, 0, 0); - expect(1, res); - - /* try to set style */ - style = GetWindowLong(hwnd, GWL_STYLE); - SetWindowLong(hwnd, GWL_STYLE, style | MCS_MULTISELECT); - style = GetWindowLong(hwnd, GWL_STYLE); - ok(!(style & MCS_MULTISELECT), "Expected MCS_MULTISELECT not to be set\n"); - DestroyWindow(hwnd); - - hwnd = create_monthcal_control(MCS_MULTISELECT); - /* try to remove style */ - style = GetWindowLong(hwnd, GWL_STYLE); - SetWindowLong(hwnd, GWL_STYLE, style & ~MCS_MULTISELECT); - style = GetWindowLong(hwnd, GWL_STYLE); - ok(style & MCS_MULTISELECT, "Expected MCS_MULTISELECT to be set\n"); - DestroyWindow(hwnd); - - hwnd = create_monthcal_control(MCS_MULTISELECT); - - /* default width is a week */ - res = SendMessage(hwnd, MCM_GETMAXSELCOUNT, 0, 0); - expect(7, res); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* Setter and Getters for max selected days */ - res = SendMessage(hwnd, MCM_SETMAXSELCOUNT, 5, 0); - expect(1, res); - res = SendMessage(hwnd, MCM_GETMAXSELCOUNT, 0, 0); - expect(5, res); - - res = SendMessage(hwnd, MCM_SETMAXSELCOUNT, 15, 0); - expect(1, res); - res = SendMessage(hwnd, MCM_GETMAXSELCOUNT, 0, 0); - expect(15, res); - - /* test invalid value */ - res = SendMessage(hwnd, MCM_SETMAXSELCOUNT, -1, 0); - expect(0, res); - res = SendMessage(hwnd, MCM_GETMAXSELCOUNT, 0, 0); - expect(15, res); - - ok_sequence(sequences, MONTHCAL_SEQ_INDEX, monthcal_max_sel_day_seq, "monthcal MaxSelDay", FALSE); - - /* zero value is invalid too */ - res = SendMessage(hwnd, MCM_SETMAXSELCOUNT, 0, 0); - expect(0, res); - res = SendMessage(hwnd, MCM_GETMAXSELCOUNT, 0, 0); - expect(15, res); - - DestroyWindow(hwnd); -} - -static void test_monthcal_size(void) -{ - int res; - RECT r1, r2; - HFONT hFont1, hFont2; - LOGFONTA logfont; - HWND hwnd; - - hwnd = create_monthcal_control(0); - - lstrcpyA(logfont.lfFaceName, "Arial"); - memset(&logfont, 0, sizeof(logfont)); - logfont.lfHeight = 12; - hFont1 = CreateFontIndirectA(&logfont); - - logfont.lfHeight = 24; - hFont2 = CreateFontIndirectA(&logfont); - - /* initialize to a font we can compare against */ - SendMessage(hwnd, WM_SETFONT, (WPARAM)hFont1, 0); - res = SendMessage(hwnd, MCM_GETMINREQRECT, 0, (LPARAM)&r1); - ok(res, "SendMessage(MCM_GETMINREQRECT) failed\n"); - - /* check that setting a larger font results in an larger rect */ - SendMessage(hwnd, WM_SETFONT, (WPARAM)hFont2, 0); - res = SendMessage(hwnd, MCM_GETMINREQRECT, 0, (LPARAM)&r2); - ok(res, "SendMessage(MCM_GETMINREQRECT) failed\n"); - - OffsetRect(&r1, -r1.left, -r1.top); - OffsetRect(&r2, -r2.left, -r2.top); - - ok(r1.bottom < r2.bottom, "Failed to get larger rect with larger font\n"); - - DestroyWindow(hwnd); -} - -static void test_monthcal_create(void) -{ - HWND hwnd; - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - hwnd = create_monthcal_control(0); - ok_sequence(sequences, PARENT_SEQ_INDEX, create_monthcal_control_seq, "create monthcal control", TRUE); - - DestroyWindow(hwnd); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - hwnd = create_monthcal_control(MCS_MULTISELECT); - ok_sequence(sequences, PARENT_SEQ_INDEX, create_monthcal_multi_sel_style_seq, "create monthcal (multi sel style)", TRUE); - DestroyWindow(hwnd); -} - -static void test_monthcal_destroy(void) -{ - HWND hwnd; - - hwnd = create_monthcal_control(0); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - DestroyWindow(hwnd); - ok_sequence(sequences, PARENT_SEQ_INDEX, destroy_monthcal_parent_msgs_seq, "Destroy monthcal (parent msg)", FALSE); - ok_sequence(sequences, MONTHCAL_SEQ_INDEX, destroy_monthcal_child_msgs_seq, "Destroy monthcal (child msg)", FALSE); - - /* MCS_MULTISELECT */ - hwnd = create_monthcal_control(MCS_MULTISELECT); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - DestroyWindow(hwnd); - ok_sequence(sequences, MONTHCAL_SEQ_INDEX, destroy_monthcal_multi_sel_style_seq, "Destroy monthcal (multi sel style)", FALSE); -} - -static void test_monthcal_selrange(void) -{ - HWND hwnd; - SYSTEMTIME st, range[2], range2[2]; - BOOL ret, old_comctl32 = FALSE; - - hwnd = create_monthcal_control(MCS_MULTISELECT); - - /* just after creation selection should start and end today */ - ret = SendMessage(hwnd, MCM_GETTODAY, 0, (LPARAM)&st); - expect(TRUE, ret); - - memset(range, 0xcc, sizeof(range)); - ret = SendMessage(hwnd, MCM_GETSELRANGE, 0, (LPARAM)range); - expect(TRUE, ret); - expect(st.wYear, range[0].wYear); - expect(st.wMonth, range[0].wMonth); - expect(st.wDay, range[0].wDay); - if (range[0].wDayOfWeek != st.wDayOfWeek) - { - win_skip("comctl32 <= 4.70 doesn't set some values\n"); - old_comctl32 = TRUE; - } - else - { - expect(st.wDayOfWeek, range[0].wDayOfWeek); - expect(st.wHour, range[0].wHour); - expect(st.wMinute, range[0].wMinute); - expect(st.wSecond, range[0].wSecond); - expect(st.wMilliseconds, range[0].wMilliseconds); - } - - expect(st.wYear, range[1].wYear); - expect(st.wMonth, range[1].wMonth); - expect(st.wDay, range[1].wDay); - if (!old_comctl32) - { - expect(st.wDayOfWeek, range[1].wDayOfWeek); - expect(st.wHour, range[1].wHour); - expect(st.wMinute, range[1].wMinute); - expect(st.wSecond, range[1].wSecond); - expect(st.wMilliseconds, range[1].wMilliseconds); - } - - /* bounds are swapped if min > max */ - memset(&range[0], 0, sizeof(range[0])); - range[0].wYear = 2009; - range[0].wMonth = 10; - range[0].wDay = 5; - range[1] = range[0]; - range[1].wDay = 3; - - ret = SendMessage(hwnd, MCM_SETSELRANGE, 0, (LPARAM)range); - expect(TRUE, ret); - - ret = SendMessage(hwnd, MCM_GETSELRANGE, 0, (LPARAM)range2); - expect(TRUE, ret); - - expect(range[1].wYear, range2[0].wYear); - expect(range[1].wMonth, range2[0].wMonth); - expect(range[1].wDay, range2[0].wDay); - expect(6, range2[0].wDayOfWeek); - expect(range[1].wHour, range2[0].wHour); - expect(range[1].wMinute, range2[0].wMinute); - expect(range[1].wSecond, range2[0].wSecond); - expect(range[1].wMilliseconds, range2[0].wMilliseconds); - - expect(range[0].wYear, range2[1].wYear); - expect(range[0].wMonth, range2[1].wMonth); - expect(range[0].wDay, range2[1].wDay); - expect(1, range2[1].wDayOfWeek); - expect(range[0].wHour, range2[1].wHour); - expect(range[0].wMinute, range2[1].wMinute); - expect(range[0].wSecond, range2[1].wSecond); - expect(range[0].wMilliseconds, range2[1].wMilliseconds); - - /* try with range larger than maximum configured */ - memset(&range[0], 0, sizeof(range[0])); - range[0].wYear = 2009; - range[0].wMonth = 10; - range[0].wDay = 1; - range[1] = range[0]; - - ret = SendMessage(hwnd, MCM_SETSELRANGE, 0, (LPARAM)range); - expect(TRUE, ret); - - range[1] = range[0]; - /* default max. range is 7 days */ - range[1].wDay = 8; - - ret = SendMessage(hwnd, MCM_SETSELRANGE, 0, (LPARAM)range); - expect(FALSE, ret); - - ret = SendMessage(hwnd, MCM_GETSELRANGE, 0, (LPARAM)range2); - expect(TRUE, ret); - - expect(range[0].wYear, range2[0].wYear); - expect(range[0].wMonth, range2[0].wMonth); - expect(range[0].wDay, range2[0].wDay); - expect(range[0].wYear, range2[1].wYear); - expect(range[0].wMonth, range2[1].wMonth); - expect(range[0].wDay, range2[1].wDay); - - DestroyWindow(hwnd); -} - -static void test_killfocus(void) -{ - HWND hwnd; - DWORD style; - - hwnd = create_monthcal_control(0); - - /* make parent invisible */ - style = GetWindowLong(parent_wnd, GWL_STYLE); - SetWindowLong(parent_wnd, GWL_STYLE, style &~ WS_VISIBLE); - - SendMessage(hwnd, WM_KILLFOCUS, (WPARAM)GetDesktopWindow(), 0); - - style = GetWindowLong(hwnd, GWL_STYLE); - ok(style & WS_VISIBLE, "Expected WS_VISIBLE to be set\n"); - - style = GetWindowLong(parent_wnd, GWL_STYLE); - SetWindowLong(parent_wnd, GWL_STYLE, style | WS_VISIBLE); - - DestroyWindow(hwnd); -} - -START_TEST(monthcal) -{ - HMODULE hComctl32; - BOOL (WINAPI *pInitCommonControlsEx)(const INITCOMMONCONTROLSEX*); - INITCOMMONCONTROLSEX iccex; - - hComctl32 = GetModuleHandleA("comctl32.dll"); - pInitCommonControlsEx = (void*)GetProcAddress(hComctl32, "InitCommonControlsEx"); - if (!pInitCommonControlsEx) - { - skip("InitCommonControlsEx() is missing. Skipping the tests\n"); - return; - } - iccex.dwSize = sizeof(iccex); - iccex.dwICC = ICC_DATE_CLASSES; - pInitCommonControlsEx(&iccex); - - test_monthcal(); - - init_msg_sequences(sequences, NUM_MSG_SEQUENCES); - - parent_wnd = create_parent_window(); - - test_monthcal_create(); - test_monthcal_destroy(); - test_monthcal_color(); - test_monthcal_currdate(); - test_monthcal_firstDay(); - test_monthcal_unicode(); - test_monthcal_today(); - test_monthcal_scroll(); - test_monthcal_monthrange(); - test_monthcal_hittest(); - test_monthcal_todaylink(); - test_monthcal_size(); - test_monthcal_maxselday(); - test_monthcal_selrange(); - test_killfocus(); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - DestroyWindow(parent_wnd); - ok_sequence(sequences, PARENT_SEQ_INDEX, destroy_parent_seq, "Destroy parent window", FALSE); -} diff --git a/rostests/winetests/comctl32/mru.c b/rostests/winetests/comctl32/mru.c deleted file mode 100644 index 24fcff56d68..00000000000 --- a/rostests/winetests/comctl32/mru.c +++ /dev/null @@ -1,527 +0,0 @@ -/* - * comctl32 MRU unit tests - * - * Copyright (C) 2004 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 "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winnls.h" -#include "winreg.h" -#include "commctrl.h" -#include "shlwapi.h" - -#include "wine/test.h" - -/* Keys for testing MRU functions */ -#define REG_TEST_BASEKEYA "Software\\Wine" -#define REG_TEST_BASESUBKEYA "Test" -#define REG_TEST_KEYA REG_TEST_BASEKEYA "\\" REG_TEST_BASESUBKEYA -#define REG_TEST_SUBKEYA "MRUTest" -#define REG_TEST_FULLKEY REG_TEST_KEYA "\\" REG_TEST_SUBKEYA - -/* Undocumented MRU structures & functions */ -typedef struct tagCREATEMRULISTA -{ - DWORD cbSize; - DWORD nMaxItems; - DWORD dwFlags; - HKEY hKey; - LPCSTR lpszSubKey; - PROC lpfnCompare; -} CREATEMRULISTA, *LPCREATEMRULISTA; - -#define MRUF_STRING_LIST 0 -#define MRUF_BINARY_LIST 1 -#define MRUF_DELAYED_SAVE 2 - -#define LIST_SIZE 3 /* Max entries for each mru */ - -static CREATEMRULISTA mruA = -{ - sizeof(CREATEMRULISTA), - LIST_SIZE, - 0, - NULL, - REG_TEST_SUBKEYA, - NULL -}; - -static HMODULE hComctl32; -static HANDLE (WINAPI *pCreateMRUListA)(LPCREATEMRULISTA); -static void (WINAPI *pFreeMRUList)(HANDLE); -static INT (WINAPI *pAddMRUStringA)(HANDLE,LPCSTR); -static INT (WINAPI *pEnumMRUList)(HANDLE,INT,LPVOID,DWORD); -static INT (WINAPI *pEnumMRUListW)(HANDLE,INT,LPVOID,DWORD); -static HANDLE (WINAPI *pCreateMRUListLazyA)(LPCREATEMRULISTA, DWORD, DWORD, DWORD); -static INT (WINAPI *pFindMRUData)(HANDLE, LPCVOID, DWORD, LPINT); -static INT (WINAPI *pAddMRUData)(HANDLE, LPCVOID, DWORD); -/* -static INT (WINAPI *pFindMRUStringA)(HANDLE,LPCSTR,LPINT); -*/ - - -static void InitPointers(void) -{ - pCreateMRUListA = (void*)GetProcAddress(hComctl32,(LPCSTR)151); - pFreeMRUList = (void*)GetProcAddress(hComctl32,(LPCSTR)152); - pAddMRUStringA = (void*)GetProcAddress(hComctl32,(LPCSTR)153); - pEnumMRUList = (void*)GetProcAddress(hComctl32,(LPCSTR)154); - pCreateMRUListLazyA = (void*)GetProcAddress(hComctl32,(LPCSTR)157); - pAddMRUData = (void*)GetProcAddress(hComctl32,(LPCSTR)167); - pFindMRUData = (void*)GetProcAddress(hComctl32,(LPCSTR)169); - pEnumMRUListW = (void*)GetProcAddress(hComctl32,(LPCSTR)403); -} - -/* Based on RegDeleteTreeW from dlls/advapi32/registry.c */ -static LSTATUS mru_RegDeleteTreeA(HKEY hKey, LPCSTR lpszSubKey) -{ - LONG ret; - DWORD dwMaxSubkeyLen, dwMaxValueLen; - DWORD dwMaxLen, dwSize; - CHAR szNameBuf[MAX_PATH], *lpszName = szNameBuf; - HKEY hSubKey = hKey; - - if(lpszSubKey) - { - ret = RegOpenKeyExA(hKey, lpszSubKey, 0, KEY_READ, &hSubKey); - if (ret) return ret; - } - - /* Get highest length for keys, values */ - ret = RegQueryInfoKeyA(hSubKey, NULL, NULL, NULL, NULL, - &dwMaxSubkeyLen, NULL, NULL, &dwMaxValueLen, NULL, NULL, NULL); - if (ret) goto cleanup; - - dwMaxSubkeyLen++; - dwMaxValueLen++; - dwMaxLen = max(dwMaxSubkeyLen, dwMaxValueLen); - if (dwMaxLen > sizeof(szNameBuf)/sizeof(CHAR)) - { - /* Name too big: alloc a buffer for it */ - if (!(lpszName = HeapAlloc( GetProcessHeap(), 0, dwMaxLen*sizeof(CHAR)))) - { - ret = ERROR_NOT_ENOUGH_MEMORY; - goto cleanup; - } - } - - - /* Recursively delete all the subkeys */ - while (TRUE) - { - dwSize = dwMaxLen; - if (RegEnumKeyExA(hSubKey, 0, lpszName, &dwSize, NULL, - NULL, NULL, NULL)) break; - - ret = mru_RegDeleteTreeA(hSubKey, lpszName); - if (ret) goto cleanup; - } - - if (lpszSubKey) - ret = RegDeleteKeyA(hKey, lpszSubKey); - else - while (TRUE) - { - dwSize = dwMaxLen; - if (RegEnumValueA(hKey, 0, lpszName, &dwSize, - NULL, NULL, NULL, NULL)) break; - - ret = RegDeleteValueA(hKey, lpszName); - if (ret) goto cleanup; - } - -cleanup: - /* Free buffer if allocated */ - if (lpszName != szNameBuf) - HeapFree( GetProcessHeap(), 0, lpszName); - if(lpszSubKey) - RegCloseKey(hSubKey); - return ret; -} - -static BOOL create_reg_entries(void) -{ - HKEY hKey = NULL; - - ok(!RegCreateKeyA(HKEY_CURRENT_USER, REG_TEST_FULLKEY, &hKey), - "Couldn't create test key \"%s\"\n", REG_TEST_KEYA); - if (!hKey) return FALSE; - RegCloseKey(hKey); - return TRUE; -} - -static void delete_reg_entries(void) -{ - HKEY hKey; - - if (RegOpenKeyExA(HKEY_CURRENT_USER, REG_TEST_BASEKEYA, 0, KEY_ALL_ACCESS, - &hKey)) - return; - mru_RegDeleteTreeA(hKey, REG_TEST_BASESUBKEYA); - RegCloseKey(hKey); -} - -static void check_reg_entries(const char *mrulist, const char**items) -{ - char buff[128]; - HKEY hKey = NULL; - DWORD type, size, ret; - unsigned int i; - - ok(!RegOpenKeyA(HKEY_CURRENT_USER, REG_TEST_FULLKEY, &hKey), - "Couldn't open test key \"%s\"\n", REG_TEST_FULLKEY); - if (!hKey) return; - - type = REG_SZ; - size = sizeof(buff); - buff[0] = '\0'; - ret = RegQueryValueExA(hKey, "MRUList", NULL, &type, (LPBYTE)buff, &size); - - ok(!ret && buff[0], "Checking MRU: got %d from RegQueryValueExW\n", ret); - if(ret || !buff[0]) return; - - ok(strcmp(buff, mrulist) == 0, "Checking MRU: Expected list %s, got %s\n", - mrulist, buff); - if(strcmp(buff, mrulist)) return; - - for (i = 0; i < strlen(mrulist); i++) - { - char name[2]; - name[0] = mrulist[i]; - name[1] = '\0'; - type = REG_SZ; - size = sizeof(buff); - buff[0] = '\0'; - ret = RegQueryValueExA(hKey, name, NULL, &type, (LPBYTE)buff, &size); - ok(!ret && buff[0], - "Checking MRU item %d ('%c'): got %d from RegQueryValueExW\n", - i, mrulist[i], ret); - if(ret || !buff[0]) return; - ok(!strcmp(buff, items[mrulist[i]-'a']), - "Checking MRU item %d ('%c'): expected \"%s\", got \"%s\"\n", - i, mrulist[i], buff, items[mrulist[i] - 'a']); - } -} - -static INT CALLBACK cmp_mru_strA(LPCVOID data1, LPCVOID data2) -{ - return lstrcmpiA(data1, data2); -} - -static HANDLE create_mruA(HKEY hKey, DWORD flags, PROC cmp) -{ - mruA.dwFlags = flags; - mruA.lpfnCompare = cmp; - mruA.hKey = hKey; - - SetLastError(0); - return pCreateMRUListA(&mruA); -} - -static void test_MRUListA(void) -{ - const char *checks[LIST_SIZE+1]; - HANDLE hMRU; - HKEY hKey; - INT iRet; - - if (!pCreateMRUListA || !pFreeMRUList || !pAddMRUStringA || !pEnumMRUList) - { - skip("MRU entry points not found\n"); - return; - } - - if (0) - { - /* Create (NULL) - crashes native */ - hMRU = pCreateMRUListA(NULL); - } - - /* Create (size too small) */ - mruA.cbSize = sizeof(mruA) - 2; - hMRU = create_mruA(NULL, MRUF_STRING_LIST, (PROC)cmp_mru_strA); - ok (!hMRU && !GetLastError(), - "CreateMRUListA(too small) expected NULL,0 got %p,%d\n", - hMRU, GetLastError()); - mruA.cbSize = sizeof(mruA); - - /* Create (size too big) */ - mruA.cbSize = sizeof(mruA) + 2; - hMRU = create_mruA(NULL, MRUF_STRING_LIST, (PROC)cmp_mru_strA); - ok (!hMRU && !GetLastError(), - "CreateMRUListA(too big) expected NULL,0 got %p,%d\n", - hMRU, GetLastError()); - mruA.cbSize = sizeof(mruA); - - /* Create (NULL hKey) */ - hMRU = create_mruA(NULL, MRUF_STRING_LIST, (PROC)cmp_mru_strA); - ok (!hMRU && !GetLastError(), - "CreateMRUListA(NULL key) expected NULL,0 got %p,%d\n", - hMRU, GetLastError()); - - /* Create (NULL name) */ - mruA.lpszSubKey = NULL; - hMRU = create_mruA(NULL, MRUF_STRING_LIST, (PROC)cmp_mru_strA); - ok (!hMRU && !GetLastError(), - "CreateMRUListA(NULL name) expected NULL,0 got %p,%d\n", - hMRU, GetLastError()); - mruA.lpszSubKey = REG_TEST_SUBKEYA; - - /* Create a string MRU */ - ok(!RegCreateKeyA(HKEY_CURRENT_USER, REG_TEST_KEYA, &hKey), - "Couldn't create test key \"%s\"\n", REG_TEST_KEYA); - if (!hKey) - return; - hMRU = create_mruA(hKey, MRUF_STRING_LIST, (PROC)cmp_mru_strA); - ok(hMRU && !GetLastError(), - "CreateMRUListA(string) expected non-NULL,0 got %p,%d\n", - hMRU, GetLastError()); - - if (hMRU) - { - char buffer[255]; - checks[0] = "Test 1"; - checks[1] = "Test 2"; - checks[2] = "Test 3"; - checks[3] = "Test 4"; - - /* Add (NULL list) */ - SetLastError(0); - iRet = pAddMRUStringA(NULL, checks[0]); - ok(iRet == -1 && !GetLastError(), - "AddMRUStringA(NULL list) expected -1,0 got %d,%d\n", - iRet, GetLastError()); - - /* Add (NULL string) */ - if (0) - { - /* Some native versions crash when passed NULL or fail to SetLastError() */ - SetLastError(0); - iRet = pAddMRUStringA(hMRU, NULL); - ok(iRet == 0 && GetLastError() == ERROR_INVALID_PARAMETER, - "AddMRUStringA(NULL str) expected 0,ERROR_INVALID_PARAMETER got %d,%d\n", - iRet, GetLastError()); - } - - /* Add 3 strings. Check the registry is correct after each add */ - SetLastError(0); - iRet = pAddMRUStringA(hMRU, checks[0]); - ok(iRet == 0 && !GetLastError(), - "AddMRUStringA(1) expected 0,0 got %d,%d\n", - iRet, GetLastError()); - check_reg_entries("a", checks); - - SetLastError(0); - iRet = pAddMRUStringA(hMRU, checks[1]); - ok(iRet == 1 && !GetLastError(), - "AddMRUStringA(2) expected 1,0 got %d,%d\n", - iRet, GetLastError()); - check_reg_entries("ba", checks); - - SetLastError(0); - iRet = pAddMRUStringA(hMRU, checks[2]); - ok(iRet == 2 && !GetLastError(), - "AddMRUStringA(2) expected 2,0 got %d,%d\n", - iRet, GetLastError()); - check_reg_entries("cba", checks); - - /* Add a duplicate of the 2nd string - it should move to the front, - * but keep the same index in the registry. - */ - SetLastError(0); - iRet = pAddMRUStringA(hMRU, checks[1]); - ok(iRet == 1 && !GetLastError(), - "AddMRUStringA(re-add 1) expected 1,0 got %d,%d\n", - iRet, GetLastError()); - check_reg_entries("bca", checks); - - /* Add a new string - replaces the oldest string + moves to the front */ - SetLastError(0); - iRet = pAddMRUStringA(hMRU, checks[3]); - ok(iRet == 0 && !GetLastError(), - "AddMRUStringA(add new) expected 0,0 got %d,%d\n", - iRet, GetLastError()); - checks[0] = checks[3]; - check_reg_entries("abc", checks); - - /* NULL buffer = get list size */ - iRet = pEnumMRUList(hMRU, 0, NULL, 0); - ok(iRet == 3 || iRet == -1 /* Vista */, "EnumMRUList expected %d or -1, got %d\n", LIST_SIZE, iRet); - - /* negative item pos = get list size */ - iRet = pEnumMRUList(hMRU, -1, NULL, 0); - ok(iRet == 3 || iRet == -1 /* Vista */, "EnumMRUList expected %d or -1, got %d\n", LIST_SIZE, iRet); - - /* negative item pos = get list size */ - iRet = pEnumMRUList(hMRU, -5, NULL, 0); - ok(iRet == 3 || iRet == -1 /* Vista */, "EnumMRUList expected %d or -1, got %d\n", LIST_SIZE, iRet); - - /* negative item pos = get list size */ - iRet = pEnumMRUList(hMRU, -1, buffer, 255); - ok(iRet == 3, "EnumMRUList expected %d, got %d\n", LIST_SIZE, iRet); - - /* negative item pos = get list size */ - iRet = pEnumMRUList(hMRU, -5, buffer, 255); - ok(iRet == 3, "EnumMRUList expected %d, got %d\n", LIST_SIZE, iRet); - - /* check entry 0 */ - buffer[0] = 0; - iRet = pEnumMRUList(hMRU, 0, buffer, 255); - ok(iRet == lstrlen(checks[3]), "EnumMRUList expected %d, got %d\n", lstrlen(checks[3]), iRet); - ok(strcmp(buffer, checks[3]) == 0, "EnumMRUList expected %s, got %s\n", checks[3], buffer); - - /* check entry 0 with a too small buffer */ - buffer[0] = 0; /* overwritten with 'T' */ - buffer[1] = 'A'; /* overwritten with 0 */ - buffer[2] = 'A'; /* unchanged */ - buffer[3] = 0; /* unchanged */ - iRet = pEnumMRUList(hMRU, 0, buffer, 2); - ok(iRet == lstrlen(checks[3]), "EnumMRUList expected %d, got %d\n", lstrlen(checks[3]), iRet); - ok(strcmp(buffer, "T") == 0, "EnumMRUList expected %s, got %s\n", "T", buffer); - /* make sure space after buffer has old values */ - ok(buffer[2] == 'A', "EnumMRUList expected %02x, got %02x\n", 'A', buffer[2]); - - /* check entry 1 */ - buffer[0] = 0; - iRet = pEnumMRUList(hMRU, 1, buffer, 255); - ok(iRet == lstrlen(checks[1]), "EnumMRUList expected %d, got %d\n", lstrlen(checks[1]), iRet); - ok(strcmp(buffer, checks[1]) == 0, "EnumMRUList expected %s, got %s\n", checks[1], buffer); - - /* check entry 2 */ - buffer[0] = 0; - iRet = pEnumMRUList(hMRU, 2, buffer, 255); - ok(iRet == lstrlen(checks[2]), "EnumMRUList expected %d, got %d\n", lstrlen(checks[2]), iRet); - ok(strcmp(buffer, checks[2]) == 0, "EnumMRUList expected %s, got %s\n", checks[2], buffer); - - /* check out of bounds entry 3 */ - strcpy(buffer, "dummy"); - iRet = pEnumMRUList(hMRU, 3, buffer, 255); - ok(iRet == -1, "EnumMRUList expected %d, got %d\n", -1, iRet); - ok(strcmp(buffer, "dummy") == 0, "EnumMRUList expected unchanged buffer %s, got %s\n", "dummy", buffer); - - /* Finished with this MRU */ - pFreeMRUList(hMRU); - } - - /* FreeMRUList(NULL) crashes on Win98 OSR0 */ -} - -static void test_CreateMRUListLazyA(void) -{ - HANDLE hMRU; - HKEY hKey; - CREATEMRULISTA listA = { 0 }; - - if (!pCreateMRUListLazyA || !pFreeMRUList) - { - win_skip("CreateMRUListLazyA or FreeMRUList entry points not found\n"); - return; - } - - /* wrong size */ - listA.cbSize = sizeof(listA) + 1; - hMRU = pCreateMRUListLazyA(&listA, 0, 0, 0); - ok(hMRU == NULL, "Expected NULL handle, got %p\n", hMRU); - listA.cbSize = 4; - hMRU = pCreateMRUListLazyA(&listA, 0, 0, 0); - ok(hMRU == NULL, "Expected NULL handle, got %p\n", hMRU); - /* NULL hKey */ - listA.cbSize = sizeof(listA); - listA.hKey = NULL; - hMRU = pCreateMRUListLazyA(&listA, 0, 0, 0); - ok(hMRU == NULL, "Expected NULL handle, got %p\n", hMRU); - /* NULL subkey */ - ok(!RegCreateKeyA(HKEY_CURRENT_USER, REG_TEST_KEYA, &hKey), - "Couldn't create test key \"%s\"\n", REG_TEST_KEYA); - listA.cbSize = sizeof(listA); - listA.hKey = hKey; - listA.lpszSubKey = NULL; - hMRU = pCreateMRUListLazyA(&listA, 0, 0, 0); - ok(hMRU == NULL || broken(hMRU != NULL), /* Win9x */ - "Expected NULL handle, got %p\n", hMRU); - if (hMRU) pFreeMRUList(hMRU); -} - -static void test_EnumMRUList(void) -{ - if (!pEnumMRUList || !pEnumMRUListW) - { - win_skip("EnumMRUListA/EnumMRUListW entry point not found\n"); - return; - } - - /* NULL handle */ - if (0) - { - /* crashes on NT4, passed on Win2k, XP, 2k3, Vista, 2k8 */ - pEnumMRUList(NULL, 0, NULL, 0); - pEnumMRUListW(NULL, 0, NULL, 0); - } -} - -static void test_FindMRUData(void) -{ - INT iRet; - - if (!pFindMRUData) - { - win_skip("FindMRUData entry point not found\n"); - return; - } - - /* NULL handle */ - iRet = pFindMRUData(NULL, NULL, 0, NULL); - ok(iRet == -1, "FindMRUData expected -1, got %d\n", iRet); -} - -static void test_AddMRUData(void) -{ - INT iRet; - - if (!pAddMRUData) - { - win_skip("AddMRUData entry point not found\n"); - return; - } - - /* NULL handle */ - iRet = pFindMRUData(NULL, NULL, 0, NULL); - ok(iRet == -1, "AddMRUData expected -1, got %d\n", iRet); -} - -START_TEST(mru) -{ - hComctl32 = GetModuleHandleA("comctl32.dll"); - - delete_reg_entries(); - if (!create_reg_entries()) - return; - - InitPointers(); - - test_MRUListA(); - test_CreateMRUListLazyA(); - test_EnumMRUList(); - test_FindMRUData(); - test_AddMRUData(); - - delete_reg_entries(); -} diff --git a/rostests/winetests/comctl32/msg.h b/rostests/winetests/comctl32/msg.h deleted file mode 100644 index 361ccdbf598..00000000000 --- a/rostests/winetests/comctl32/msg.h +++ /dev/null @@ -1,294 +0,0 @@ -/* Message Sequence Testing Code - * - * Copyright (C) 2007 James Hawkins - * Copyright (C) 2007 Lei Zhang - * - * 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 "wine/test.h" - -/* undocumented SWP flags - from SDK 3.1 */ -#define SWP_NOCLIENTSIZE 0x0800 -#define SWP_NOCLIENTMOVE 0x1000 - -typedef enum -{ - sent = 0x1, - posted = 0x2, - parent = 0x4, - wparam = 0x8, - lparam = 0x10, - defwinproc = 0x20, - beginpaint = 0x40, - optional = 0x80, - hook = 0x100, - winevent_hook =0x200, - id = 0x400 -} msg_flags_t; - -struct message -{ - UINT message; /* the WM_* code */ - msg_flags_t flags; /* message props */ - WPARAM wParam; /* expected value of wParam */ - LPARAM lParam; /* expected value of lParam */ - UINT id; /* extra message data: id of the window, - notify code etc. */ -}; - -struct msg_sequence -{ - int count; - int size; - struct message *sequence; -}; - -static void add_message(struct msg_sequence **seq, int sequence_index, - const struct message *msg) -{ - struct msg_sequence *msg_seq = seq[sequence_index]; - - if (!msg_seq->sequence) - { - msg_seq->size = 10; - msg_seq->sequence = HeapAlloc(GetProcessHeap(), 0, - msg_seq->size * sizeof (struct message)); - } - - if (msg_seq->count == msg_seq->size) - { - msg_seq->size *= 2; - msg_seq->sequence = HeapReAlloc(GetProcessHeap(), 0, - msg_seq->sequence, - msg_seq->size * sizeof (struct message)); - } - - assert(msg_seq->sequence); - - msg_seq->sequence[msg_seq->count].message = msg->message; - msg_seq->sequence[msg_seq->count].flags = msg->flags; - msg_seq->sequence[msg_seq->count].wParam = msg->wParam; - msg_seq->sequence[msg_seq->count].lParam = msg->lParam; - msg_seq->sequence[msg_seq->count].id = msg->id; - - msg_seq->count++; -} - -static void flush_sequence(struct msg_sequence **seg, int sequence_index) -{ - struct msg_sequence *msg_seq = seg[sequence_index]; - HeapFree(GetProcessHeap(), 0, msg_seq->sequence); - msg_seq->sequence = NULL; - msg_seq->count = msg_seq->size = 0; -} - -static void flush_sequences(struct msg_sequence **seq, int n) -{ - int i; - - for (i = 0; i < n; i++) - flush_sequence(seq, i); -} - -static void ok_sequence_(struct msg_sequence **seq, int sequence_index, - const struct message *expected, const char *context, int todo, - const char *file, int line) -{ - struct msg_sequence *msg_seq = seq[sequence_index]; - static const struct message end_of_sequence = {0, 0, 0, 0}; - const struct message *actual, *sequence; - int failcount = 0; - - add_message(seq, sequence_index, &end_of_sequence); - - sequence = msg_seq->sequence; - actual = sequence; - - while (expected->message && actual->message) - { - trace_( file, line)("expected %04x - actual %04x\n", expected->message, actual->message); - - if (expected->message == actual->message) - { - if (expected->flags & wparam) - { - if (expected->wParam != actual->wParam && todo) - { - todo_wine - { - failcount++; - ok_(file, line) (FALSE, - "%s: in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n", - context, expected->message, expected->wParam, actual->wParam); - } - } - else - { - ok_(file, line) (expected->wParam == actual->wParam, - "%s: in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n", - context, expected->message, expected->wParam, actual->wParam); - } - } - - if (expected->flags & lparam) - { - if (expected->lParam != actual->lParam && todo) - { - todo_wine - { - failcount++; - ok_(file, line) (FALSE, - "%s: in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n", - context, expected->message, expected->lParam, actual->lParam); - } - } - else - { - ok_(file, line) (expected->lParam == actual->lParam, - "%s: in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n", - context, expected->message, expected->lParam, actual->lParam); - } - } - - if (expected->flags & id) - { - if (expected->id != actual->id && expected->flags & optional) - { - expected++; - continue; - } - if (expected->id != actual->id && todo) - { - todo_wine - { - failcount++; - ok_(file, line) (FALSE, - "%s: in msg 0x%04x expecting id 0x%x got 0x%x\n", - context, expected->message, expected->id, actual->id); - } - } - else - { - ok_(file, line) (expected->id == actual->id, - "%s: in msg 0x%04x expecting id 0x%x got 0x%x\n", - context, expected->message, expected->id, actual->id); - } - } - - if ((expected->flags & defwinproc) != (actual->flags & defwinproc) && todo) - { - todo_wine - { - failcount++; - ok_(file, line) (FALSE, - "%s: the msg 0x%04x should %shave been sent by DefWindowProc\n", - context, expected->message, (expected->flags & defwinproc) ? "" : "NOT "); - } - } - else - { - ok_(file, line) ((expected->flags & defwinproc) == (actual->flags & defwinproc), - "%s: the msg 0x%04x should %shave been sent by DefWindowProc\n", - context, expected->message, (expected->flags & defwinproc) ? "" : "NOT "); - } - - ok_(file, line) ((expected->flags & beginpaint) == (actual->flags & beginpaint), - "%s: the msg 0x%04x should %shave been sent by BeginPaint\n", - context, expected->message, (expected->flags & beginpaint) ? "" : "NOT "); - ok_(file, line) ((expected->flags & (sent|posted)) == (actual->flags & (sent|posted)), - "%s: the msg 0x%04x should have been %s\n", - context, expected->message, (expected->flags & posted) ? "posted" : "sent"); - ok_(file, line) ((expected->flags & parent) == (actual->flags & parent), - "%s: the msg 0x%04x was expected in %s\n", - context, expected->message, (expected->flags & parent) ? "parent" : "child"); - ok_(file, line) ((expected->flags & hook) == (actual->flags & hook), - "%s: the msg 0x%04x should have been sent by a hook\n", - context, expected->message); - ok_(file, line) ((expected->flags & winevent_hook) == (actual->flags & winevent_hook), - "%s: the msg 0x%04x should have been sent by a winevent hook\n", - context, expected->message); - expected++; - actual++; - } - else if (expected->flags & optional) - expected++; - else if (todo) - { - failcount++; - todo_wine - { - ok_(file, line) (FALSE, "%s: the msg 0x%04x was expected, but got msg 0x%04x instead\n", - context, expected->message, actual->message); - } - - flush_sequence(seq, sequence_index); - return; - } - else - { - ok_(file, line) (FALSE, "%s: the msg 0x%04x was expected, but got msg 0x%04x instead\n", - context, expected->message, actual->message); - expected++; - actual++; - } - } - - /* skip all optional trailing messages */ - while (expected->message && ((expected->flags & optional))) - expected++; - - if (todo) - { - todo_wine - { - if (expected->message || actual->message) - { - failcount++; - ok_(file, line) (FALSE, "%s: the msg sequence is not complete: expected %04x - actual %04x\n", - context, expected->message, actual->message); - } - } - } - else if (expected->message || actual->message) - { - ok_(file, line) (FALSE, "%s: the msg sequence is not complete: expected %04x - actual %04x\n", - context, expected->message, actual->message); - } - - if(todo && !failcount) /* succeeded yet marked todo */ - { - todo_wine - { - ok_(file, line)(TRUE, "%s: marked \"todo_wine\" but succeeds\n", context); - } - } - - flush_sequence(seq, sequence_index); -} - -#define ok_sequence(seq, index, exp, contx, todo) \ - ok_sequence_(seq, index, (exp), (contx), (todo), __FILE__, __LINE__) - - -static void init_msg_sequences(struct msg_sequence **seq, int n) -{ - int i; - - for (i = 0; i < n; i++) - seq[i] = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct msg_sequence)); -} diff --git a/rostests/winetests/comctl32/progress.c b/rostests/winetests/comctl32/progress.c deleted file mode 100644 index 3083e8ba2e5..00000000000 --- a/rostests/winetests/comctl32/progress.c +++ /dev/null @@ -1,235 +0,0 @@ -/* Unit tests for the progress bar control. - * - * Copyright 2005 Michael Kaufmann - * - * 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 "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "commctrl.h" - -#include "wine/test.h" - - -static HWND hProgressParentWnd, hProgressWnd; -static const char progressTestClass[] = "ProgressBarTestClass"; - - -/* try to make sure pending X events have been processed before continuing */ -static void flush_events(void) -{ - MSG msg; - int diff = 100; - DWORD time = GetTickCount() + diff; - - while (diff > 0) - { - if (MsgWaitForMultipleObjects( 0, NULL, FALSE, min(10,diff), QS_ALLINPUT ) == WAIT_TIMEOUT) break; - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg ); - diff = time - GetTickCount(); - } -} - -static LRESULT CALLBACK ProgressTestWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch(msg) { - - case WM_DESTROY: - PostQuitMessage(0); - break; - - default: - return DefWindowProcA(hWnd, msg, wParam, lParam); - } - - return 0L; -} - -static WNDPROC progress_wndproc; -static BOOL erased; -static RECT last_paint_rect; - -static LRESULT CALLBACK ProgressSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - if (msg == WM_PAINT) - { - GetUpdateRect(hWnd, &last_paint_rect, FALSE); - } - else if (msg == WM_ERASEBKGND) - { - erased = TRUE; - } - return CallWindowProc(progress_wndproc, hWnd, msg, wParam, lParam); -} - - -static void update_window(HWND hWnd) -{ - UpdateWindow(hWnd); - ok(!GetUpdateRect(hWnd, NULL, FALSE), "GetUpdateRect must return zero after UpdateWindow\n"); -} - - -static void init(void) -{ - HMODULE hComctl32; - BOOL (WINAPI *pInitCommonControlsEx)(const INITCOMMONCONTROLSEX*); - WNDCLASSA wc; - RECT rect; - - hComctl32 = GetModuleHandleA("comctl32.dll"); - pInitCommonControlsEx = (void*)GetProcAddress(hComctl32, "InitCommonControlsEx"); - if (pInitCommonControlsEx) - { - INITCOMMONCONTROLSEX iccex; - iccex.dwSize = sizeof(iccex); - iccex.dwICC = ICC_PROGRESS_CLASS; - pInitCommonControlsEx(&iccex); - } - else - InitCommonControls(); - - wc.style = CS_HREDRAW | CS_VREDRAW; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = GetModuleHandleA(NULL); - wc.hIcon = NULL; - wc.hCursor = LoadCursorA(NULL, IDC_ARROW); - wc.hbrBackground = GetSysColorBrush(COLOR_WINDOW); - wc.lpszMenuName = NULL; - wc.lpszClassName = progressTestClass; - wc.lpfnWndProc = ProgressTestWndProc; - RegisterClassA(&wc); - - rect.left = 0; - rect.top = 0; - rect.right = 400; - rect.bottom = 20; - assert(AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, FALSE)); - - hProgressParentWnd = CreateWindowExA(0, progressTestClass, "Progress Bar Test", WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, rect.right - rect.left, rect.bottom - rect.top, NULL, NULL, GetModuleHandleA(NULL), 0); - assert(hProgressParentWnd != NULL); - - GetClientRect(hProgressParentWnd, &rect); - hProgressWnd = CreateWindowEx(0, PROGRESS_CLASS, "", WS_CHILD | WS_VISIBLE, - 0, 0, rect.right, rect.bottom, hProgressParentWnd, NULL, GetModuleHandleA(NULL), 0); - assert(hProgressWnd != NULL); - progress_wndproc = (WNDPROC)SetWindowLongPtr(hProgressWnd, GWLP_WNDPROC, (LPARAM)ProgressSubclassProc); - - ShowWindow(hProgressParentWnd, SW_SHOWNORMAL); - ok(GetUpdateRect(hProgressParentWnd, NULL, FALSE), "GetUpdateRect: There should be a region that needs to be updated\n"); - flush_events(); - update_window(hProgressParentWnd); -} - - -static void cleanup(void) -{ - MSG msg; - - PostMessageA(hProgressParentWnd, WM_CLOSE, 0, 0); - while (GetMessageA(&msg,0,0,0)) { - TranslateMessage(&msg); - DispatchMessageA(&msg); - } - - UnregisterClassA(progressTestClass, GetModuleHandleA(NULL)); -} - - -/* - * Tests if a progress bar repaints itself immediately when it receives - * some specific messages. - */ -static void test_redraw(void) -{ - RECT client_rect; - LRESULT ret; - - SendMessageA(hProgressWnd, PBM_SETRANGE, 0, MAKELPARAM(0, 100)); - SendMessageA(hProgressWnd, PBM_SETPOS, 10, 0); - SendMessageA(hProgressWnd, PBM_SETSTEP, 20, 0); - update_window(hProgressWnd); - - /* PBM_SETPOS */ - ok(SendMessageA(hProgressWnd, PBM_SETPOS, 50, 0) == 10, "PBM_SETPOS must return the previous position\n"); - ok(!GetUpdateRect(hProgressWnd, NULL, FALSE), "PBM_SETPOS: The progress bar should be redrawn immediately\n"); - - /* PBM_DELTAPOS */ - ok(SendMessageA(hProgressWnd, PBM_DELTAPOS, 15, 0) == 50, "PBM_DELTAPOS must return the previous position\n"); - ok(!GetUpdateRect(hProgressWnd, NULL, FALSE), "PBM_DELTAPOS: The progress bar should be redrawn immediately\n"); - - /* PBM_SETPOS */ - ok(SendMessageA(hProgressWnd, PBM_SETPOS, 80, 0) == 65, "PBM_SETPOS must return the previous position\n"); - ok(!GetUpdateRect(hProgressWnd, NULL, FALSE), "PBM_SETPOS: The progress bar should be redrawn immediately\n"); - - /* PBM_STEPIT */ - ok(SendMessageA(hProgressWnd, PBM_STEPIT, 0, 0) == 80, "PBM_STEPIT must return the previous position\n"); - ok(!GetUpdateRect(hProgressWnd, NULL, FALSE), "PBM_STEPIT: The progress bar should be redrawn immediately\n"); - ret = SendMessageA(hProgressWnd, PBM_GETPOS, 0, 0); - if (ret == 0) - win_skip("PBM_GETPOS needs comctl32 > 4.70\n"); - else - ok(ret == 100, "PBM_GETPOS returned a wrong position : %d\n", (UINT)ret); - - /* PBM_SETRANGE and PBM_SETRANGE32: - Usually the progress bar doesn't repaint itself immediately. If the - position is not in the new range, it does. - Don't test this, it may change in future Windows versions. */ - - SendMessage(hProgressWnd, PBM_SETPOS, 0, 0); - update_window(hProgressWnd); - - /* increase to 10 - no background erase required */ - erased = FALSE; - SetRectEmpty(&last_paint_rect); - SendMessage(hProgressWnd, PBM_SETPOS, 10, 0); - GetClientRect(hProgressWnd, &client_rect); - ok(EqualRect(&last_paint_rect, &client_rect), - "last_paint_rect was { %d, %d, %d, %d } instead of { %d, %d, %d, %d }\n", - last_paint_rect.left, last_paint_rect.top, last_paint_rect.right, last_paint_rect.bottom, - client_rect.left, client_rect.top, client_rect.right, client_rect.bottom); - update_window(hProgressWnd); - ok(!erased, "Progress bar shouldn't have erased the background\n"); - - /* decrease to 0 - background erase will be required */ - erased = FALSE; - SetRectEmpty(&last_paint_rect); - SendMessage(hProgressWnd, PBM_SETPOS, 0, 0); - GetClientRect(hProgressWnd, &client_rect); - ok(EqualRect(&last_paint_rect, &client_rect), - "last_paint_rect was { %d, %d, %d, %d } instead of { %d, %d, %d, %d }\n", - last_paint_rect.left, last_paint_rect.top, last_paint_rect.right, last_paint_rect.bottom, - client_rect.left, client_rect.top, client_rect.right, client_rect.bottom); - update_window(hProgressWnd); - ok(erased, "Progress bar should have erased the background\n"); -} - - -START_TEST(progress) -{ - init(); - - test_redraw(); - - cleanup(); -} diff --git a/rostests/winetests/comctl32/propsheet.c b/rostests/winetests/comctl32/propsheet.c deleted file mode 100644 index bfbaaa0e7bd..00000000000 --- a/rostests/winetests/comctl32/propsheet.c +++ /dev/null @@ -1,536 +0,0 @@ -/* Unit test suite for property sheet control. - * - * Copyright 2006 Huw Davies - * Copyright 2009 Jan de Mooij - * - * 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 "resources.h" - -#include "wine/test.h" - -static HWND parent; -static HWND sheethwnd; - -static LONG active_page = -1; - -#define IDC_APPLY_BUTTON 12321 - -static int CALLBACK sheet_callback(HWND hwnd, UINT msg, LPARAM lparam) -{ - switch(msg) - { - case PSCB_INITIALIZED: - { - char caption[256]; - GetWindowTextA(hwnd, caption, sizeof(caption)); - ok(!strcmp(caption,"test caption"), "caption: %s\n", caption); - sheethwnd = hwnd; - return 0; - } - } - return 0; -} - -static INT_PTR CALLBACK page_dlg_proc(HWND hwnd, UINT msg, WPARAM wparam, - LPARAM lparam) -{ - switch(msg) - { - case WM_INITDIALOG: - { - HWND sheet = GetParent(hwnd); - char caption[256]; - GetWindowTextA(sheet, caption, sizeof(caption)); - ok(!strcmp(caption,"test caption"), "caption: %s\n", caption); - return TRUE; - } - - case WM_NOTIFY: - { - NMHDR *nmhdr = (NMHDR *)lparam; - switch(nmhdr->code) - { - case PSN_APPLY: - return TRUE; - default: - return FALSE; - } - } - case WM_NCDESTROY: - ok(!SendMessageA(sheethwnd, PSM_INDEXTOHWND, 400, 0),"Should always be 0\n"); - return TRUE; - - default: - return FALSE; - } -} - -static void test_title(void) -{ - HPROPSHEETPAGE hpsp[1]; - PROPSHEETPAGEA psp; - PROPSHEETHEADERA psh; - HWND hdlg; - - memset(&psp, 0, sizeof(psp)); - psp.dwSize = sizeof(psp); - psp.dwFlags = 0; - psp.hInstance = GetModuleHandleA(NULL); - U(psp).pszTemplate = "prop_page1"; - U2(psp).pszIcon = NULL; - psp.pfnDlgProc = page_dlg_proc; - psp.lParam = 0; - - hpsp[0] = CreatePropertySheetPageA(&psp); - - memset(&psh, 0, sizeof(psh)); - psh.dwSize = sizeof(psh); - psh.dwFlags = PSH_MODELESS | PSH_USECALLBACK; - psh.pszCaption = "test caption"; - psh.nPages = 1; - psh.hwndParent = GetDesktopWindow(); - U3(psh).phpage = hpsp; - psh.pfnCallback = sheet_callback; - - hdlg = (HWND)PropertySheetA(&psh); - if (hdlg == INVALID_HANDLE_VALUE) - { - win_skip("comctl32 4.70 needs dwSize adjustment\n"); - psh.dwSize = sizeof(psh) - sizeof(HBITMAP) - sizeof(HPALETTE) - sizeof(HBITMAP); - hdlg = (HWND)PropertySheetA(&psh); - } - DestroyWindow(hdlg); -} - -static void test_nopage(void) -{ - HPROPSHEETPAGE hpsp[1]; - PROPSHEETPAGEA psp; - PROPSHEETHEADERA psh; - HWND hdlg; - - memset(&psp, 0, sizeof(psp)); - psp.dwSize = sizeof(psp); - psp.dwFlags = 0; - psp.hInstance = GetModuleHandleA(NULL); - U(psp).pszTemplate = "prop_page1"; - U2(psp).pszIcon = NULL; - psp.pfnDlgProc = page_dlg_proc; - psp.lParam = 0; - - hpsp[0] = CreatePropertySheetPageA(&psp); - - memset(&psh, 0, sizeof(psh)); - psh.dwSize = sizeof(psh); - psh.dwFlags = PSH_MODELESS | PSH_USECALLBACK; - psh.pszCaption = "test caption"; - psh.nPages = 1; - psh.hwndParent = GetDesktopWindow(); - U3(psh).phpage = hpsp; - psh.pfnCallback = sheet_callback; - - hdlg = (HWND)PropertySheetA(&psh); - if (hdlg == INVALID_HANDLE_VALUE) - { - win_skip("comctl32 4.70 needs dwSize adjustment\n"); - psh.dwSize = sizeof(psh) - sizeof(HBITMAP) - sizeof(HPALETTE) - sizeof(HBITMAP); - hdlg = (HWND)PropertySheetA(&psh); - } - ShowWindow(hdlg,SW_NORMAL); - SendMessage(hdlg, PSM_REMOVEPAGE, 0, 0); - RedrawWindow(hdlg,NULL,NULL,RDW_UPDATENOW|RDW_ERASENOW); - DestroyWindow(hdlg); -} - -static int CALLBACK disableowner_callback(HWND hwnd, UINT msg, LPARAM lparam) -{ - switch(msg) - { - case PSCB_INITIALIZED: - { - ok(IsWindowEnabled(parent) == 0, "parent window should be disabled\n"); - PostQuitMessage(0); - return FALSE; - } - } - return FALSE; -} - -static void register_parent_wnd_class(void) -{ - WNDCLASSA cls; - - cls.style = 0; - cls.lpfnWndProc = DefWindowProcA; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(NULL); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "parent class"; - RegisterClassA(&cls); -} - -static void test_disableowner(void) -{ - HPROPSHEETPAGE hpsp[1]; - PROPSHEETPAGEA psp; - PROPSHEETHEADERA psh; - INT_PTR p; - - register_parent_wnd_class(); - parent = CreateWindowA("parent class", "", WS_CAPTION | WS_SYSMENU | WS_VISIBLE, 100, 100, 100, 100, GetDesktopWindow(), NULL, GetModuleHandleA(NULL), 0); - - memset(&psp, 0, sizeof(psp)); - psp.dwSize = sizeof(psp); - psp.dwFlags = 0; - psp.hInstance = GetModuleHandleA(NULL); - U(psp).pszTemplate = "prop_page1"; - U2(psp).pszIcon = NULL; - psp.pfnDlgProc = NULL; - psp.lParam = 0; - - hpsp[0] = CreatePropertySheetPageA(&psp); - - memset(&psh, 0, sizeof(psh)); - psh.dwSize = sizeof(psh); - psh.dwFlags = PSH_USECALLBACK; - psh.pszCaption = "test caption"; - psh.nPages = 1; - psh.hwndParent = parent; - U3(psh).phpage = hpsp; - psh.pfnCallback = disableowner_callback; - - p = PropertySheetA(&psh); - todo_wine - ok(p == 0, "Expected 0, got %ld\n", p); - ok(IsWindowEnabled(parent) != 0, "parent window should be enabled\n"); - DestroyWindow(parent); -} - -static INT_PTR CALLBACK nav_page_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - switch(msg){ - case WM_NOTIFY: - { - LPNMHDR hdr = (LPNMHDR)lparam; - switch(hdr->code){ - case PSN_SETACTIVE: - active_page = PropSheet_HwndToIndex(hdr->hwndFrom, hwnd); - return TRUE; - case PSN_KILLACTIVE: - /* prevent navigation away from the fourth page */ - if(active_page == 3){ - SetWindowLongPtr(hwnd, DWLP_MSGRESULT, TRUE); - return TRUE; - } - } - break; - } - } - return FALSE; -} - -static void test_wiznavigation(void) -{ - HPROPSHEETPAGE hpsp[4]; - PROPSHEETPAGEA psp[4]; - PROPSHEETHEADERA psh; - HWND hdlg, control; - LONG_PTR controlID; - LRESULT defidres; - BOOL hwndtoindex_supported = TRUE; - const INT nextID = 12324; - const INT backID = 12323; - - /* create the property sheet pages */ - memset(psp, 0, sizeof(PROPSHEETPAGEA) * 4); - - psp[0].dwSize = sizeof(PROPSHEETPAGEA); - psp[0].hInstance = GetModuleHandleA(NULL); - U(psp[0]).pszTemplate = MAKEINTRESOURCE(IDD_PROP_PAGE_INTRO); - psp[0].pfnDlgProc = nav_page_proc; - hpsp[0] = CreatePropertySheetPageA(&psp[0]); - - psp[1].dwSize = sizeof(PROPSHEETPAGEA); - psp[1].hInstance = GetModuleHandleA(NULL); - U(psp[1]).pszTemplate = MAKEINTRESOURCE(IDD_PROP_PAGE_EDIT); - psp[1].pfnDlgProc = nav_page_proc; - hpsp[1] = CreatePropertySheetPageA(&psp[1]); - - psp[2].dwSize = sizeof(PROPSHEETPAGEA); - psp[2].hInstance = GetModuleHandleA(NULL); - U(psp[2]).pszTemplate = MAKEINTRESOURCE(IDD_PROP_PAGE_RADIO); - psp[2].pfnDlgProc = nav_page_proc; - hpsp[2] = CreatePropertySheetPageA(&psp[2]); - - psp[3].dwSize = sizeof(PROPSHEETPAGEA); - psp[3].hInstance = GetModuleHandleA(NULL); - U(psp[3]).pszTemplate = MAKEINTRESOURCE(IDD_PROP_PAGE_EXIT); - psp[3].pfnDlgProc = nav_page_proc; - hpsp[3] = CreatePropertySheetPageA(&psp[3]); - - /* set up the property sheet dialog */ - memset(&psh, 0, sizeof(psh)); - psh.dwSize = sizeof(psh); - psh.dwFlags = PSH_MODELESS | PSH_WIZARD; - psh.pszCaption = "A Wizard"; - psh.nPages = 4; - psh.hwndParent = GetDesktopWindow(); - U3(psh).phpage = hpsp; - hdlg = (HWND)PropertySheetA(&psh); - if (hdlg == INVALID_HANDLE_VALUE) - { - win_skip("comctl32 4.70 needs dwSize adjustment\n"); - psh.dwSize = sizeof(psh) - sizeof(HBITMAP) - sizeof(HPALETTE) - sizeof(HBITMAP); - hdlg = (HWND)PropertySheetA(&psh); - } - - ok(active_page == 0, "Active page should be 0. Is: %d\n", active_page); - - control = GetFocus(); - controlID = GetWindowLongPtr(control, GWLP_ID); - ok(controlID == nextID, "Focus should have been set to the Next button. Expected: %d, Found: %ld\n", nextID, controlID); - - /* simulate pressing the Next button */ - SendMessage(hdlg, PSM_PRESSBUTTON, PSBTN_NEXT, 0); - if (!active_page) hwndtoindex_supported = FALSE; - if (hwndtoindex_supported) - ok(active_page == 1, "Active page should be 1 after pressing Next. Is: %d\n", active_page); - - control = GetFocus(); - controlID = GetWindowLongPtr(control, GWLP_ID); - ok(controlID == IDC_PS_EDIT1, "Focus should be set to the first item on the second page. Expected: %d, Found: %ld\n", IDC_PS_EDIT1, controlID); - - defidres = SendMessage(hdlg, DM_GETDEFID, 0, 0); - ok(defidres == MAKELRESULT(nextID, DC_HASDEFID), "Expected default button ID to be %d, is %d\n", nextID, LOWORD(defidres)); - - /* set the focus to the second edit box on this page */ - SetFocus(GetNextDlgTabItem(hdlg, control, FALSE)); - - /* press next again */ - SendMessage(hdlg, PSM_PRESSBUTTON, PSBTN_NEXT, 0); - if (hwndtoindex_supported) - ok(active_page == 2, "Active page should be 2 after pressing Next. Is: %d\n", active_page); - - control = GetFocus(); - controlID = GetWindowLongPtr(control, GWLP_ID); - ok(controlID == IDC_PS_RADIO1, "Focus should have been set to item on third page. Expected: %d, Found %ld\n", IDC_PS_RADIO1, controlID); - - /* back button */ - SendMessage(hdlg, PSM_PRESSBUTTON, PSBTN_BACK, 0); - if (hwndtoindex_supported) - ok(active_page == 1, "Active page should be 1 after pressing Back. Is: %d\n", active_page); - - control = GetFocus(); - controlID = GetWindowLongPtr(control, GWLP_ID); - ok(controlID == IDC_PS_EDIT1, "Focus should have been set to the first item on second page. Expected: %d, Found %ld\n", IDC_PS_EDIT1, controlID); - - defidres = SendMessage(hdlg, DM_GETDEFID, 0, 0); - ok(defidres == MAKELRESULT(backID, DC_HASDEFID), "Expected default button ID to be %d, is %d\n", backID, LOWORD(defidres)); - - /* press next twice */ - SendMessage(hdlg, PSM_PRESSBUTTON, PSBTN_NEXT, 0); - if (hwndtoindex_supported) - ok(active_page == 2, "Active page should be 2 after pressing Next. Is: %d\n", active_page); - SendMessage(hdlg, PSM_PRESSBUTTON, PSBTN_NEXT, 0); - if (hwndtoindex_supported) - ok(active_page == 3, "Active page should be 3 after pressing Next. Is: %d\n", active_page); - else - active_page = 3; - - control = GetFocus(); - controlID = GetWindowLongPtr(control, GWLP_ID); - ok(controlID == nextID, "Focus should have been set to the Next button. Expected: %d, Found: %ld\n", nextID, controlID); - - /* try to navigate away, but shouldn't be able to */ - SendMessage(hdlg, PSM_PRESSBUTTON, PSBTN_BACK, 0); - ok(active_page == 3, "Active page should still be 3 after pressing Back. Is: %d\n", active_page); - - defidres = SendMessage(hdlg, DM_GETDEFID, 0, 0); - ok(defidres == MAKELRESULT(nextID, DC_HASDEFID), "Expected default button ID to be %d, is %d\n", nextID, LOWORD(defidres)); - - DestroyWindow(hdlg); -} - -static void test_buttons(void) -{ - HPROPSHEETPAGE hpsp[1]; - PROPSHEETPAGEA psp; - PROPSHEETHEADERA psh; - HWND hdlg; - HWND button; - RECT rc; - int prevRight, top; - - memset(&psp, 0, sizeof(psp)); - psp.dwSize = sizeof(psp); - psp.dwFlags = 0; - psp.hInstance = GetModuleHandleA(NULL); - U(psp).pszTemplate = "prop_page1"; - U2(psp).pszIcon = NULL; - psp.pfnDlgProc = page_dlg_proc; - psp.lParam = 0; - - hpsp[0] = CreatePropertySheetPageA(&psp); - - memset(&psh, 0, sizeof(psh)); - psh.dwSize = sizeof(psh); - psh.dwFlags = PSH_MODELESS | PSH_USECALLBACK; - psh.pszCaption = "test caption"; - psh.nPages = 1; - psh.hwndParent = GetDesktopWindow(); - U3(psh).phpage = hpsp; - psh.pfnCallback = sheet_callback; - - hdlg = (HWND)PropertySheetA(&psh); - if (hdlg == INVALID_HANDLE_VALUE) - { - win_skip("comctl32 4.70 needs dwSize adjustment\n"); - psh.dwSize = sizeof(psh) - sizeof(HBITMAP) - sizeof(HPALETTE) - sizeof(HBITMAP); - hdlg = (HWND)PropertySheetA(&psh); - } - - /* OK button */ - button = GetDlgItem(hdlg, IDOK); - GetWindowRect(button, &rc); - prevRight = rc.right; - top = rc.top; - - /* Cancel button */ - button = GetDlgItem(hdlg, IDCANCEL); - GetWindowRect(button, &rc); - ok(rc.top == top, "Cancel button should have same top as OK button\n"); - ok(rc.left > prevRight, "Cancel button should be to the right of OK button\n"); - prevRight = rc.right; - - button = GetDlgItem(hdlg, IDC_APPLY_BUTTON); - GetWindowRect(button, &rc); - ok(rc.top == top, "Apply button should have same top as OK button\n"); - ok(rc.left > prevRight, "Apply button should be to the right of Cancel button\n"); - prevRight = rc.right; - - button = GetDlgItem(hdlg, IDHELP); - GetWindowRect(button, &rc); - ok(rc.top == top, "Help button should have same top as OK button\n"); - ok(rc.left > prevRight, "Help button should be to the right of Apply button\n"); - - DestroyWindow(hdlg); -} - -static BOOL add_button_has_been_pressed; - -static INT_PTR CALLBACK -page_with_custom_default_button_dlg_proc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) -{ - switch (msg) - { - case WM_COMMAND: - switch(LOWORD(wparam)) - { - case IDC_PS_PUSHBUTTON1: - switch(HIWORD(wparam)) - { - case BN_CLICKED: - add_button_has_been_pressed = TRUE; - return TRUE; - } - break; - } - break; - } - return FALSE; -} - -static void test_custom_default_button(void) -{ - HWND hdlg; - PROPSHEETPAGEA psp[1]; - PROPSHEETHEADERA psh; - MSG msg; - LRESULT result; - - psp[0].dwSize = sizeof (PROPSHEETPAGEA); - psp[0].dwFlags = PSP_USETITLE; - psp[0].hInstance = GetModuleHandleA(NULL); - U(psp[0]).pszTemplate = MAKEINTRESOURCE(IDD_PROP_PAGE_WITH_CUSTOM_DEFAULT_BUTTON); - U2(psp[0]).pszIcon = NULL; - psp[0].pfnDlgProc = page_with_custom_default_button_dlg_proc; - psp[0].pszTitle = "Page1"; - psp[0].lParam = 0; - - psh.dwSize = sizeof (PROPSHEETHEADERA); - psh.dwFlags = PSH_PROPSHEETPAGE | PSH_MODELESS; - psh.hwndParent = GetDesktopWindow(); - psh.hInstance = GetModuleHandleA(NULL); - U(psh).pszIcon = NULL; - psh.pszCaption = "PropertySheet1"; - psh.nPages = 1; - U3(psh).ppsp = psp; - U2(psh).nStartPage = 0; - - /* The goal of the test is to make sure that the Add button is pressed - * when the ENTER key is pressed and a different control, a combobox, - * has the keyboard focus. */ - add_button_has_been_pressed = FALSE; - - /* Create the modeless property sheet. */ - hdlg = (HWND)PropertySheetA(&psh); - ok(hdlg != INVALID_HANDLE_VALUE, "Cannot create the property sheet\n"); - - /* Set the Add button as the default button. */ - SendMessage(hdlg, DM_SETDEFID, (WPARAM)IDC_PS_PUSHBUTTON1, 0); - - /* Make sure the default button is the Add button. */ - result = SendMessage(hdlg, DM_GETDEFID, 0, 0); - ok(DC_HASDEFID == HIWORD(result), "The property sheet does not have a default button\n"); - ok(IDC_PS_PUSHBUTTON1 == LOWORD(result), "The default button is not the Add button\n"); - - /* At this point, the combobox should have keyboard focus, so we press ENTER. - * Pull the lever, Kronk! */ - keybd_event(VK_RETURN, 0, 0, 0); - - /* Process all the messages in the queue for this thread. */ - while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) - { - if (!PropSheet_IsDialogMessage(hdlg, &msg)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } - - todo_wine - ok(add_button_has_been_pressed, "The Add button has not been pressed!\n"); - - DestroyWindow(hdlg); -} - -START_TEST(propsheet) -{ - test_title(); - test_nopage(); - test_disableowner(); - test_wiznavigation(); - test_buttons(); - test_custom_default_button(); -} diff --git a/rostests/winetests/comctl32/rebar.c b/rostests/winetests/comctl32/rebar.c deleted file mode 100644 index d5f27b926a4..00000000000 --- a/rostests/winetests/comctl32/rebar.c +++ /dev/null @@ -1,1001 +0,0 @@ -/* Unit tests for rebar. - * - * Copyright 2007 Mikolaj Zalewski - * - * 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 - */ - -/* make sure the structures work with a comctl32 v5.x */ -#define _WIN32_WINNT 0x500 -#define _WIN32_IE 0x500 - -#include -#include - -#include -#include -#include - -#include "wine/test.h" - -RECT height_change_notify_rect; -static HWND hMainWnd; - - -#define check_rect(name, val, exp) ok(val.top == exp.top && val.bottom == exp.bottom && \ - val.left == exp.left && val.right == exp.right, "invalid rect (" name ") (%d,%d) (%d,%d) - expected (%d,%d) (%d,%d)\n", \ - val.left, val.top, val.right, val.bottom, exp.left, exp.top, exp.right, exp.bottom); - -#define check_rect_no_top(name, val, exp) { \ - ok((val.bottom - val.top == exp.bottom - exp.top) && \ - val.left == exp.left && val.right == exp.right, "invalid rect (" name ") (%d,%d) (%d,%d) - expected (%d,%d) (%d,%d), ignoring top\n", \ - val.left, val.top, val.right, val.bottom, exp.left, exp.top, exp.right, exp.bottom); \ - } - -#define compare(val, exp, format) ok((val) == (exp), #val " value " format " expected " format "\n", (val), (exp)); - -#define expect_eq(expr, value, type, format) { type ret = expr; ok((value) == ret, #expr " expected " format " got " format "\n", (value), (ret)); } - -static INT CALLBACK is_font_installed_proc(const LOGFONT *elf, const TEXTMETRIC *ntm, DWORD type, LPARAM lParam) -{ - return 0; -} - -static BOOL is_font_installed(const char *name) -{ - HDC hdc = GetDC(0); - BOOL ret = FALSE; - - if(!EnumFontFamiliesA(hdc, name, is_font_installed_proc, 0)) - ret = TRUE; - - ReleaseDC(0, hdc); - return ret; -} - -static HWND create_rebar_control(void) -{ - HWND hwnd; - - hwnd = CreateWindow(REBARCLASSNAME, NULL, WS_CHILD | WS_VISIBLE, 0, 0, 0, 0, - hMainWnd, (HMENU)17, GetModuleHandle(NULL), NULL); - ok(hwnd != NULL, "Failed to create Rebar\n"); - - SendMessageA(hwnd, WM_SETFONT, (WPARAM)GetStockObject(SYSTEM_FONT), 0); - - return hwnd; -} - -static HWND build_toolbar(int nr, HWND hParent) -{ - TBBUTTON btns[8]; - HWND hToolbar = CreateWindowEx(0, TOOLBARCLASSNAME, NULL, WS_CHILD | WS_VISIBLE | CCS_NORESIZE, 0, 0, 0, 0, - hParent, (HMENU)5, GetModuleHandle(NULL), NULL); - int iBitmapId = 0; - int i; - - ok(hToolbar != NULL, "Toolbar creation problem\n"); - ok(SendMessage(hToolbar, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0) == 0, "TB_BUTTONSTRUCTSIZE failed\n"); - ok(SendMessage(hToolbar, TB_AUTOSIZE, 0, 0) == 0, "TB_AUTOSIZE failed\n"); - ok(SendMessage(hToolbar, WM_SETFONT, (WPARAM)GetStockObject(SYSTEM_FONT), 0)==1, "WM_SETFONT\n"); - - for (i=0; i<5+nr; i++) - { - btns[i].iBitmap = i; - btns[i].idCommand = i; - btns[i].fsStyle = BTNS_BUTTON; - btns[i].fsState = TBSTATE_ENABLED; - btns[i].iString = 0; - } - - switch (nr) - { - case 0: iBitmapId = IDB_HIST_SMALL_COLOR; break; - case 1: iBitmapId = IDB_VIEW_SMALL_COLOR; break; - case 2: iBitmapId = IDB_STD_SMALL_COLOR; break; - } - ok(SendMessage(hToolbar, TB_LOADIMAGES, iBitmapId, (LPARAM)HINST_COMMCTRL) == 0, "TB_LOADIMAGES failed\n"); - ok(SendMessage(hToolbar, TB_ADDBUTTONS, 5+nr, (LPARAM)btns), "TB_ADDBUTTONS failed\n"); - return hToolbar; -} - -static LRESULT CALLBACK MyWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch (msg) - { - case WM_NOTIFY: - { - NMHDR *lpnm = (NMHDR *)lParam; - if (lpnm->code == RBN_HEIGHTCHANGE) - GetClientRect(lpnm->hwndFrom, &height_change_notify_rect); - } - break; - } - return DefWindowProcA(hWnd, msg, wParam, lParam); -} - -#if 0 /* use this to generate more tests*/ - -static void dump_sizes(HWND hRebar) -{ - SIZE sz; - RECT r; - int count; - int i, h; - - GetClientRect(hRebar, &r); - count = SendMessageA(hRebar, RB_GETROWCOUNT, 0, 0); - printf(" { {%d, %d, %d, %d}, %d, %d, {", r.left, r.top, r.right, r.bottom, - SendMessageA(hRebar, RB_GETBARHEIGHT, 0, 0), count); - if (count == 0) - printf("0, "); - for (i = 0; i < count; i++) /* rows */ - printf("%d, ", SendMessageA(hRebar, RB_GETROWHEIGHT, i, 0)); - printf("}, "); - - count = SendMessageA(hRebar, RB_GETBANDCOUNT, 0, 0); - printf("%d, {", count); - if (count == 0) - printf("{{0, 0, 0, 0}, 0, 0},"); - for (i=0; ircClient); \ - count = SendMessage(hRebar, RB_GETROWCOUNT, 0, 0); \ - compare(count, res->nRows, "%d"); \ - for (i=0; inRows); i++) { \ - int height = SendMessageA(hRebar, RB_GETROWHEIGHT, 0, 0);\ - ok(height == res->cyRowHeights[i], "Height mismatch for row %d - %d vs %d\n", i, res->cyRowHeights[i], height); \ - } \ - count = SendMessage(hRebar, RB_GETBANDCOUNT, 0, 0); \ - compare(count, res->nBands, "%d"); \ - for (i=0; inBands); i++) { \ - ok(SendMessageA(hRebar, RB_GETRECT, i, (LPARAM)&rc) == 1, "RB_GETRECT\n"); \ - if (!(res->bands[i].fStyle & RBBS_HIDDEN)) \ - check_rect("band", rc, res->bands[i].rc); \ - rbi.cbSize = REBARBANDINFOA_V6_SIZE; \ - rbi.fMask = RBBIM_STYLE | RBBIM_SIZE; \ - ok(SendMessageA(hRebar, RB_GETBANDINFO, i, (LPARAM)&rbi) == 1, "RB_GETBANDINFO\n"); \ - compare(rbi.fStyle, res->bands[i].fStyle, "%x"); \ - compare(rbi.cx, res->bands[i].cx, "%d"); \ - } \ - rbsize_numtests++; \ - } - -#define check_sizes() check_sizes_todo(0) - -#endif - -static void add_band_w(HWND hRebar, LPCSTR lpszText, int cxMinChild, int cx, int cxIdeal) -{ - CHAR buffer[MAX_PATH]; - REBARBANDINFOA rbi; - - if (lpszText != NULL) - strcpy(buffer, lpszText); - rbi.cbSize = REBARBANDINFOA_V6_SIZE; - rbi.fMask = RBBIM_SIZE | RBBIM_CHILDSIZE | RBBIM_CHILD | RBBIM_IDEALSIZE | RBBIM_TEXT; - rbi.cx = cx; - rbi.cxMinChild = cxMinChild; - rbi.cxIdeal = cxIdeal; - rbi.cyMinChild = 20; - rbi.hwndChild = build_toolbar(1, hRebar); - rbi.lpText = (lpszText ? buffer : NULL); - SendMessage(hRebar, RB_INSERTBAND, -1, (LPARAM)&rbi); -} - -static void test_layout(void) -{ - HWND hRebar; - REBARBANDINFO rbi; - HIMAGELIST himl; - REBARINFO ri; - - hRebar = create_rebar_control(); - check_sizes(); - rbi.cbSize = REBARBANDINFOA_V6_SIZE; - rbi.fMask = RBBIM_SIZE | RBBIM_CHILDSIZE | RBBIM_CHILD; - rbi.cx = 200; - rbi.cxMinChild = 100; - rbi.cyMinChild = 30; - rbi.hwndChild = NULL; - SendMessageA(hRebar, RB_INSERTBAND, -1, (LPARAM)&rbi); - check_sizes(); - - rbi.fMask |= RBBIM_STYLE; - rbi.fStyle = RBBS_CHILDEDGE; - SendMessageA(hRebar, RB_INSERTBAND, -1, (LPARAM)&rbi); - check_sizes(); - - rbi.fStyle = 0; - rbi.cx = 200; - rbi.cxMinChild = 30; - rbi.cyMinChild = 30; - rbi.hwndChild = build_toolbar(0, hRebar); - SendMessageA(hRebar, RB_INSERTBAND, -1, (LPARAM)&rbi); - check_sizes(); - - rbi.fStyle = RBBS_CHILDEDGE; - rbi.cx = 68; - rbi.hwndChild = build_toolbar(0, hRebar); - SendMessageA(hRebar, RB_INSERTBAND, -1, (LPARAM)&rbi); - check_sizes(); - - SetWindowLong(hRebar, GWL_STYLE, GetWindowLong(hRebar, GWL_STYLE) | RBS_BANDBORDERS); - check_sizes(); /* a style change won't start a relayout */ - rbi.fMask = RBBIM_SIZE; - rbi.cx = 66; - SendMessageA(hRebar, RB_SETBANDINFO, 3, (LPARAM)&rbi); - check_sizes(); /* here it will be relayouted */ - - /* this will force a new row */ - rbi.fMask = RBBIM_SIZE | RBBIM_CHILDSIZE | RBBIM_CHILD; - rbi.cx = 200; - rbi.cxMinChild = 400; - rbi.cyMinChild = 30; - rbi.hwndChild = build_toolbar(0, hRebar); - SendMessageA(hRebar, RB_INSERTBAND, 1, (LPARAM)&rbi); - check_sizes(); - - rbi.fMask = RBBIM_STYLE; - rbi.fStyle = RBBS_HIDDEN; - SendMessageA(hRebar, RB_SETBANDINFO, 2, (LPARAM)&rbi); - check_sizes(); - - SendMessageA(hRebar, RB_DELETEBAND, 2, 0); - check_sizes(); - SendMessageA(hRebar, RB_DELETEBAND, 0, 0); - check_sizes(); - SendMessageA(hRebar, RB_DELETEBAND, 1, 0); - check_sizes(); - - DestroyWindow(hRebar); - - hRebar = create_rebar_control(); - add_band_w(hRebar, "ABC", 70, 40, 100); - add_band_w(hRebar, NULL, 40, 70, 100); - add_band_w(hRebar, NULL, 170, 240, 100); - add_band_w(hRebar, "MMMMMMM", 60, 60, 100); - add_band_w(hRebar, NULL, 200, 200, 100); - check_sizes(); - SendMessageA(hRebar, RB_MAXIMIZEBAND, 1, TRUE); - check_sizes(); - SendMessageA(hRebar, RB_MAXIMIZEBAND, 1, TRUE); - check_sizes(); - SendMessageA(hRebar, RB_MAXIMIZEBAND, 2, FALSE); - check_sizes(); - SendMessageA(hRebar, RB_MINIMIZEBAND, 2, 0); - check_sizes(); - SendMessageA(hRebar, RB_MINIMIZEBAND, 0, 0); - check_sizes(); - - /* an image will increase the band height */ - himl = ImageList_LoadImage(LoadLibrary("comctl32"), MAKEINTRESOURCE(121), 24, 2, CLR_NONE, IMAGE_BITMAP, LR_DEFAULTCOLOR); - ri.cbSize = sizeof(ri); - ri.fMask = RBIM_IMAGELIST; - ri.himl = himl; - ok(SendMessage(hRebar, RB_SETBARINFO, 0, (LPARAM)&ri), "RB_SETBARINFO failed\n"); - rbi.fMask = RBBIM_IMAGE; - rbi.iImage = 1; - SendMessage(hRebar, RB_SETBANDINFO, 1, (LPARAM)&rbi); - check_sizes(); - - /* after removing it everything is back to normal*/ - rbi.iImage = -1; - SendMessage(hRebar, RB_SETBANDINFO, 1, (LPARAM)&rbi); - check_sizes(); - - /* Only -1 means that the image is not present. Other invalid values increase the height */ - rbi.iImage = -2; - SendMessage(hRebar, RB_SETBANDINFO, 1, (LPARAM)&rbi); - check_sizes(); - - DestroyWindow(hRebar); - - /* VARHEIGHT resizing test on a horizontal rebar */ - hRebar = create_rebar_control(); - SetWindowLong(hRebar, GWL_STYLE, GetWindowLong(hRebar, GWL_STYLE) | RBS_AUTOSIZE); - check_sizes(); - rbi.fMask = RBBIM_CHILD | RBBIM_CHILDSIZE | RBBIM_SIZE | RBBIM_STYLE; - rbi.fStyle = RBBS_VARIABLEHEIGHT; - rbi.cxMinChild = 50; - rbi.cyMinChild = 10; - rbi.cyIntegral = 11; - rbi.cyChild = 70; - rbi.cyMaxChild = 200; - rbi.cx = 90; - rbi.hwndChild = build_toolbar(0, hRebar); - SendMessageA(hRebar, RB_INSERTBAND, -1, (LPARAM)&rbi); - - rbi.cyChild = 50; - rbi.hwndChild = build_toolbar(0, hRebar); - SendMessageA(hRebar, RB_INSERTBAND, -1, (LPARAM)&rbi); - - rbi.cyMinChild = 40; - rbi.cyChild = 50; - rbi.cyIntegral = 5; - rbi.hwndChild = build_toolbar(0, hRebar); - SendMessageA(hRebar, RB_INSERTBAND, -1, (LPARAM)&rbi); - check_sizes(); - - DestroyWindow(hRebar); - - /* VARHEIGHT resizing on a vertical rebar */ - hRebar = create_rebar_control(); - SetWindowLong(hRebar, GWL_STYLE, GetWindowLong(hRebar, GWL_STYLE) | CCS_VERT | RBS_AUTOSIZE); - check_sizes(); - rbi.fMask = RBBIM_CHILD | RBBIM_CHILDSIZE | RBBIM_SIZE | RBBIM_STYLE; - rbi.fStyle = RBBS_VARIABLEHEIGHT; - rbi.cxMinChild = 50; - rbi.cyMinChild = 10; - rbi.cyIntegral = 11; - rbi.cyChild = 70; - rbi.cyMaxChild = 90; - rbi.cx = 90; - rbi.hwndChild = build_toolbar(0, hRebar); - SendMessageA(hRebar, RB_INSERTBAND, -1, (LPARAM)&rbi); - check_sizes(); - - rbi.cyChild = 50; - rbi.hwndChild = build_toolbar(0, hRebar); - SendMessageA(hRebar, RB_INSERTBAND, -1, (LPARAM)&rbi); - check_sizes(); - - rbi.cyMinChild = 40; - rbi.cyChild = 50; - rbi.cyIntegral = 5; - rbi.hwndChild = build_toolbar(0, hRebar); - SendMessageA(hRebar, RB_INSERTBAND, -1, (LPARAM)&rbi); - check_sizes(); - - DestroyWindow(hRebar); - ImageList_Destroy(himl); -} - -#if 0 /* use this to generate more tests */ - -static void dump_client(HWND hRebar) -{ - RECT r; - BOOL notify; - GetWindowRect(hRebar, &r); - MapWindowPoints(HWND_DESKTOP, hMainWnd, &r, 2); - if (height_change_notify_rect.top != -1) - { - RECT rcClient; - GetClientRect(hRebar, &rcClient); - assert(EqualRect(&rcClient, &height_change_notify_rect)); - notify = TRUE; - } - else - notify = FALSE; - printf(" {{%d, %d, %d, %d}, %d, %s},\n", r.left, r.top, r.right, r.bottom, SendMessage(hRebar, RB_GETROWCOUNT, 0, 0), - notify ? "TRUE" : "FALSE"); - SetRect(&height_change_notify_rect, -1, -1, -1, -1); -} - -#define comment(fmt, arg1) printf("/* " fmt " */\n", arg1); -#define check_client() dump_client(hRebar) - -#else - -typedef struct { - RECT rc; - INT iNumRows; - BOOL heightNotify; -} rbresize_test_result_t; - -rbresize_test_result_t resize_results[] = { -/* style 00000001 */ - {{0, 2, 672, 2}, 0, FALSE}, - {{0, 2, 672, 22}, 1, TRUE}, - {{0, 2, 672, 22}, 1, FALSE}, - {{0, 2, 672, 22}, 1, FALSE}, - {{0, 2, 672, 22}, 1, FALSE}, - {{0, 2, 672, 22}, 0, FALSE}, -/* style 00000041 */ - {{0, 0, 672, 0}, 0, FALSE}, - {{0, 0, 672, 20}, 1, TRUE}, - {{0, 0, 672, 20}, 1, FALSE}, - {{0, 0, 672, 20}, 1, FALSE}, - {{0, 0, 672, 20}, 1, FALSE}, - {{0, 0, 672, 20}, 0, FALSE}, -/* style 00000003 */ - {{0, 226, 672, 226}, 0, FALSE}, - {{0, 206, 672, 226}, 1, TRUE}, - {{0, 206, 672, 226}, 1, FALSE}, - {{0, 206, 672, 226}, 1, FALSE}, - {{0, 206, 672, 226}, 1, FALSE}, - {{0, 206, 672, 226}, 0, FALSE}, -/* style 00000043 */ - {{0, 226, 672, 226}, 0, FALSE}, - {{0, 206, 672, 226}, 1, TRUE}, - {{0, 206, 672, 226}, 1, FALSE}, - {{0, 206, 672, 226}, 1, FALSE}, - {{0, 206, 672, 226}, 1, FALSE}, - {{0, 206, 672, 226}, 0, FALSE}, -/* style 00000080 */ - {{2, 0, 2, 226}, 0, FALSE}, - {{2, 0, 22, 226}, 1, TRUE}, - {{2, 0, 22, 226}, 1, FALSE}, - {{2, 0, 22, 226}, 1, FALSE}, - {{2, 0, 22, 226}, 1, FALSE}, - {{2, 0, 22, 226}, 0, FALSE}, -/* style 00000083 */ - {{672, 0, 672, 226}, 0, FALSE}, - {{652, 0, 672, 226}, 1, TRUE}, - {{652, 0, 672, 226}, 1, FALSE}, - {{652, 0, 672, 226}, 1, FALSE}, - {{652, 0, 672, 226}, 1, FALSE}, - {{652, 0, 672, 226}, 0, FALSE}, -/* style 00000008 */ - {{10, 11, 510, 11}, 0, FALSE}, - {{10, 15, 510, 35}, 1, TRUE}, - {{10, 17, 510, 37}, 1, FALSE}, - {{10, 14, 110, 54}, 2, TRUE}, - {{0, 4, 0, 44}, 2, FALSE}, - {{0, 6, 0, 46}, 2, FALSE}, - {{0, 8, 0, 48}, 2, FALSE}, - {{0, 12, 0, 32}, 1, TRUE}, - {{0, 4, 100, 24}, 0, FALSE}, -/* style 00000048 */ - {{10, 5, 510, 5}, 0, FALSE}, - {{10, 5, 510, 25}, 1, TRUE}, - {{10, 5, 510, 25}, 1, FALSE}, - {{10, 10, 110, 50}, 2, TRUE}, - {{0, 0, 0, 40}, 2, FALSE}, - {{0, 0, 0, 40}, 2, FALSE}, - {{0, 0, 0, 40}, 2, FALSE}, - {{0, 0, 0, 20}, 1, TRUE}, - {{0, 0, 100, 20}, 0, FALSE}, -/* style 00000004 */ - {{10, 5, 510, 20}, 0, FALSE}, - {{10, 5, 510, 20}, 1, TRUE}, - {{10, 10, 110, 110}, 2, TRUE}, - {{0, 0, 0, 0}, 2, FALSE}, - {{0, 0, 0, 0}, 2, FALSE}, - {{0, 0, 0, 0}, 2, FALSE}, - {{0, 0, 0, 0}, 1, TRUE}, - {{0, 0, 100, 100}, 0, FALSE}, -/* style 00000002 */ - {{0, 5, 672, 5}, 0, FALSE}, - {{0, 5, 672, 25}, 1, TRUE}, - {{0, 10, 672, 30}, 1, FALSE}, - {{0, 0, 672, 20}, 1, FALSE}, - {{0, 0, 672, 20}, 1, FALSE}, - {{0, 0, 672, 20}, 0, FALSE}, -/* style 00000082 */ - {{10, 0, 10, 226}, 0, FALSE}, - {{10, 0, 30, 226}, 1, TRUE}, - {{10, 0, 30, 226}, 1, FALSE}, - {{0, 0, 20, 226}, 1, FALSE}, - {{0, 0, 20, 226}, 1, FALSE}, - {{0, 0, 20, 226}, 0, FALSE}, -/* style 00800001 */ - {{-2, 0, 674, 4}, 0, FALSE}, - {{-2, 0, 674, 24}, 1, TRUE}, - {{-2, 0, 674, 24}, 1, FALSE}, - {{-2, 0, 674, 24}, 1, FALSE}, - {{-2, 0, 674, 24}, 1, FALSE}, - {{-2, 0, 674, 24}, 0, FALSE}, -/* style 00800048 */ - {{10, 5, 510, 9}, 0, FALSE}, - {{10, 5, 510, 29}, 1, TRUE}, - {{10, 5, 510, 29}, 1, FALSE}, - {{10, 10, 110, 54}, 2, TRUE}, - {{0, 0, 0, 44}, 2, FALSE}, - {{0, 0, 0, 44}, 2, FALSE}, - {{0, 0, 0, 44}, 2, FALSE}, - {{0, 0, 0, 24}, 1, TRUE}, - {{0, 0, 100, 24}, 0, FALSE}, -/* style 00800004 */ - {{10, 5, 510, 20}, 0, FALSE}, - {{10, 5, 510, 20}, 1, TRUE}, - {{10, 10, 110, 110}, 2, TRUE}, - {{0, 0, 0, 0}, 2, FALSE}, - {{0, 0, 0, 0}, 2, FALSE}, - {{0, 0, 0, 0}, 2, FALSE}, - {{0, 0, 0, 0}, 1, TRUE}, - {{0, 0, 100, 100}, 0, FALSE}, -/* style 00800002 */ - {{-2, 5, 674, 9}, 0, FALSE}, - {{-2, 5, 674, 29}, 1, TRUE}, - {{-2, 10, 674, 34}, 1, FALSE}, - {{-2, 0, 674, 24}, 1, FALSE}, - {{-2, 0, 674, 24}, 1, FALSE}, - {{-2, 0, 674, 24}, 0, FALSE}, -}; - -static int resize_numtests = 0; - -#define comment(fmt, arg1) -#define check_client() { \ - RECT r; \ - rbresize_test_result_t *res = &resize_results[resize_numtests++]; \ - assert(resize_numtests <= sizeof(resize_results)/sizeof(resize_results[0])); \ - GetWindowRect(hRebar, &r); \ - MapWindowPoints(HWND_DESKTOP, hMainWnd, (LPPOINT)&r, 2); \ - if ((dwStyles[i] & (CCS_NOPARENTALIGN|CCS_NODIVIDER)) == CCS_NOPARENTALIGN) {\ - check_rect_no_top("client", r, res->rc); /* the top coordinate changes after every layout and is very implementation-dependent */ \ - } else { \ - check_rect("client", r, res->rc); \ - } \ - expect_eq((int)SendMessage(hRebar, RB_GETROWCOUNT, 0, 0), res->iNumRows, int, "%d"); \ - if (res->heightNotify) { \ - RECT rcClient; \ - GetClientRect(hRebar, &rcClient); \ - check_rect("notify", height_change_notify_rect, rcClient); \ - } else ok(height_change_notify_rect.top == -1, "Unexpected RBN_HEIGHTCHANGE received\n"); \ - SetRect(&height_change_notify_rect, -1, -1, -1, -1); \ - } - -#endif - -static void test_resize(void) -{ - DWORD dwStyles[] = {CCS_TOP, CCS_TOP | CCS_NODIVIDER, CCS_BOTTOM, CCS_BOTTOM | CCS_NODIVIDER, CCS_VERT, CCS_RIGHT, - CCS_NOPARENTALIGN, CCS_NOPARENTALIGN | CCS_NODIVIDER, CCS_NORESIZE, CCS_NOMOVEY, CCS_NOMOVEY | CCS_VERT, - CCS_TOP | WS_BORDER, CCS_NOPARENTALIGN | CCS_NODIVIDER | WS_BORDER, CCS_NORESIZE | WS_BORDER, - CCS_NOMOVEY | WS_BORDER}; - - const int styles_count = sizeof(dwStyles) / sizeof(dwStyles[0]); - int i; - - for (i = 0; i < styles_count; i++) - { - HWND hRebar; - - comment("style %08x", dwStyles[i]); - SetRect(&height_change_notify_rect, -1, -1, -1, -1); - hRebar = CreateWindow(REBARCLASSNAME, "A", dwStyles[i] | WS_CHILD | WS_VISIBLE, 10, 5, 500, 15, hMainWnd, NULL, GetModuleHandle(NULL), 0); - check_client(); - add_band_w(hRebar, NULL, 70, 100, 0); - if (dwStyles[i] & CCS_NOPARENTALIGN) /* the window drifts downward for CCS_NOPARENTALIGN without CCS_NODIVIDER */ - check_client(); - add_band_w(hRebar, NULL, 70, 100, 0); - check_client(); - MoveWindow(hRebar, 10, 10, 100, 100, TRUE); - check_client(); - MoveWindow(hRebar, 0, 0, 0, 0, TRUE); - check_client(); - /* try to fool the rebar by sending invalid width/height - won't work */ - if (dwStyles[i] & (CCS_NORESIZE | CCS_NOPARENTALIGN)) - { - WINDOWPOS pos; - pos.hwnd = hRebar; - pos.hwndInsertAfter = NULL; - pos.cx = 500; - pos.cy = 500; - pos.x = 10; - pos.y = 10; - pos.flags = 0; - SendMessage(hRebar, WM_WINDOWPOSCHANGING, 0, (LPARAM)&pos); - SendMessage(hRebar, WM_WINDOWPOSCHANGED, 0, (LPARAM)&pos); - check_client(); - SendMessage(hRebar, WM_SIZE, SIZE_RESTORED, MAKELONG(500, 500)); - check_client(); - } - SendMessage(hRebar, RB_DELETEBAND, 0, 0); - check_client(); - SendMessage(hRebar, RB_DELETEBAND, 0, 0); - MoveWindow(hRebar, 0, 0, 100, 100, TRUE); - check_client(); - DestroyWindow(hRebar); - } -} - -static void expect_band_content(HWND hRebar, UINT uBand, INT fStyle, COLORREF clrFore, - COLORREF clrBack, LPCSTR lpText, int iImage, HWND hwndChild, - INT cxMinChild, INT cyMinChild, INT cx, HBITMAP hbmBack, INT wID, - INT cyChild, INT cyMaxChild, INT cyIntegral, INT cxIdeal, LPARAM lParam, - INT cxHeader, INT cxHeader_broken) -{ - CHAR buf[MAX_PATH] = "abc"; - REBARBANDINFOA rb; - - memset(&rb, 0xdd, sizeof(rb)); - rb.cbSize = REBARBANDINFOA_V6_SIZE; - rb.fMask = RBBIM_BACKGROUND | RBBIM_CHILD | RBBIM_CHILDSIZE | RBBIM_COLORS - | RBBIM_HEADERSIZE | RBBIM_ID | RBBIM_IDEALSIZE | RBBIM_IMAGE | RBBIM_LPARAM - | RBBIM_SIZE | RBBIM_STYLE | RBBIM_TEXT; - rb.lpText = buf; - rb.cch = MAX_PATH; - ok(SendMessageA(hRebar, RB_GETBANDINFOA, uBand, (LPARAM)&rb), "RB_GETBANDINFO failed\n"); - expect_eq(rb.fStyle, fStyle, int, "%x"); - expect_eq(rb.clrFore, clrFore, COLORREF, "%x"); - expect_eq(rb.clrBack, clrBack, COLORREF, "%x"); - expect_eq(strcmp(rb.lpText, lpText), 0, int, "%d"); - expect_eq(rb.iImage, iImage, int, "%x"); - expect_eq(rb.hwndChild, hwndChild, HWND, "%p"); - expect_eq(rb.cxMinChild, cxMinChild, int, "%d"); - expect_eq(rb.cyMinChild, cyMinChild, int, "%d"); - expect_eq(rb.cx, cx, int, "%d"); - expect_eq(rb.hbmBack, hbmBack, HBITMAP, "%p"); - expect_eq(rb.wID, wID, int, "%d"); - /* the values of cyChild, cyMaxChild and cyIntegral can't be read unless the band is RBBS_VARIABLEHEIGHT */ - expect_eq(rb.cyChild, cyChild, int, "%x"); - expect_eq(rb.cyMaxChild, cyMaxChild, int, "%x"); - expect_eq(rb.cyIntegral, cyIntegral, int, "%x"); - expect_eq(rb.cxIdeal, cxIdeal, int, "%d"); - expect_eq(rb.lParam, lParam, LPARAM, "%ld"); - ok( rb.cxHeader == cxHeader || broken(rb.cxHeader == cxHeader_broken), - "expected %d for %d\n", cxHeader, rb.cxHeader ); -} - -static void test_bandinfo(void) -{ - REBARBANDINFOA rb; - CHAR szABC[] = "ABC"; - CHAR szABCD[] = "ABCD"; - HWND hRebar; - - hRebar = create_rebar_control(); - rb.cbSize = REBARBANDINFOA_V6_SIZE; - rb.fMask = 0; - if (!SendMessageA(hRebar, RB_INSERTBANDA, 0, (LPARAM)&rb)) - { - win_skip( "V6 info not supported\n" ); - DestroyWindow(hRebar); - return; - } - expect_band_content(hRebar, 0, 0, 0, GetSysColor(COLOR_3DFACE), "", -1, NULL, 0, 0, 0, NULL, 0, 0xdddddddd, 0xdddddddd, 0xdddddddd, 0, 0, 0, -1); - - rb.fMask = RBBIM_CHILDSIZE; - rb.cxMinChild = 15; - rb.cyMinChild = 20; - rb.cyChild = 30; - rb.cyMaxChild = 20; - rb.cyIntegral = 10; - ok(SendMessageA(hRebar, RB_SETBANDINFOA, 0, (LPARAM)&rb), "RB_SETBANDINFO failed\n"); - expect_band_content(hRebar, 0, 0, 0, GetSysColor(COLOR_3DFACE), "", -1, NULL, 15, 20, 0, NULL, 0, 0xdddddddd, 0xdddddddd, 0xdddddddd, 0, 0, 0, -1); - - rb.fMask = RBBIM_TEXT; - rb.lpText = szABC; - ok(SendMessageA(hRebar, RB_SETBANDINFOA, 0, (LPARAM)&rb), "RB_SETBANDINFO failed\n"); - expect_band_content(hRebar, 0, 0, 0, GetSysColor(COLOR_3DFACE), "ABC", -1, NULL, 15, 20, 0, NULL, 0, 0xdddddddd, 0xdddddddd, 0xdddddddd, 0, 0, 35, -1); - - rb.cbSize = REBARBANDINFOA_V6_SIZE; - rb.fMask = 0; - ok(SendMessageA(hRebar, RB_INSERTBANDA, 1, (LPARAM)&rb), "RB_INSERTBAND failed\n"); - expect_band_content(hRebar, 1, 0, 0, GetSysColor(COLOR_3DFACE), "", -1, NULL, 0, 0, 0, NULL, 0, 0xdddddddd, 0xdddddddd, 0xdddddddd, 0, 0, 9, -1); - expect_band_content(hRebar, 0, 0, 0, GetSysColor(COLOR_3DFACE), "ABC", -1, NULL, 15, 20, 0, NULL, 0, 0xdddddddd, 0xdddddddd, 0xdddddddd, 0, 0, 40, -1); - - rb.fMask = RBBIM_HEADERSIZE; - rb.cxHeader = 50; - ok(SendMessageA(hRebar, RB_SETBANDINFOA, 0, (LPARAM)&rb), "RB_SETBANDINFO failed\n"); - expect_band_content(hRebar, 0, 0x40000000, 0, GetSysColor(COLOR_3DFACE), "ABC", -1, NULL, 15, 20, 0, NULL, 0, 0xdddddddd, 0xdddddddd, 0xdddddddd, 0, 0, 50, -1); - - rb.cxHeader = 5; - ok(SendMessageA(hRebar, RB_SETBANDINFOA, 0, (LPARAM)&rb), "RB_SETBANDINFO failed\n"); - expect_band_content(hRebar, 0, 0x40000000, 0, GetSysColor(COLOR_3DFACE), "ABC", -1, NULL, 15, 20, 0, NULL, 0, 0xdddddddd, 0xdddddddd, 0xdddddddd, 0, 0, 5, -1); - - rb.fMask = RBBIM_TEXT; - rb.lpText = szABCD; - ok(SendMessageA(hRebar, RB_SETBANDINFOA, 0, (LPARAM)&rb), "RB_SETBANDINFO failed\n"); - expect_band_content(hRebar, 0, 0x40000000, 0, GetSysColor(COLOR_3DFACE), "ABCD", -1, NULL, 15, 20, 0, NULL, 0, 0xdddddddd, 0xdddddddd, 0xdddddddd, 0, 0, 5, -1); - rb.fMask = RBBIM_STYLE | RBBIM_TEXT; - rb.fStyle = RBBS_VARIABLEHEIGHT; - rb.lpText = szABC; - ok(SendMessageA(hRebar, RB_SETBANDINFOA, 0, (LPARAM)&rb), "RB_SETBANDINFO failed\n"); - expect_band_content(hRebar, 0, RBBS_VARIABLEHEIGHT, 0, GetSysColor(COLOR_3DFACE), "ABC", -1, NULL, 15, 20, 0, NULL, 0, 20, 0x7fffffff, 0, 0, 0, 40, 5); - - DestroyWindow(hRebar); -} - -static void test_colors(void) -{ - COLORSCHEME scheme; - COLORREF clr; - BOOL ret; - HWND hRebar; - REBARBANDINFOA bi; - - hRebar = create_rebar_control(); - - /* test default colors */ - clr = SendMessage(hRebar, RB_GETTEXTCOLOR, 0, 0); - compare(clr, CLR_NONE, "%x"); - clr = SendMessage(hRebar, RB_GETBKCOLOR, 0, 0); - compare(clr, CLR_NONE, "%x"); - - scheme.dwSize = sizeof(scheme); - scheme.clrBtnHighlight = 0; - scheme.clrBtnShadow = 0; - ret = SendMessage(hRebar, RB_GETCOLORSCHEME, 0, (LPARAM)&scheme); - if (ret) - { - compare(scheme.clrBtnHighlight, CLR_DEFAULT, "%x"); - compare(scheme.clrBtnShadow, CLR_DEFAULT, "%x"); - } - else - skip("RB_GETCOLORSCHEME not supported\n"); - - /* check default band colors */ - add_band_w(hRebar, "", 0, 10, 10); - bi.cbSize = REBARBANDINFOA_V6_SIZE; - bi.fMask = RBBIM_COLORS; - bi.clrFore = bi.clrBack = 0xc0ffe; - ret = SendMessage(hRebar, RB_GETBANDINFO, 0, (LPARAM)&bi); - ok(ret, "RB_GETBANDINFO failed\n"); - compare(bi.clrFore, RGB(0, 0, 0), "%x"); - compare(bi.clrBack, GetSysColor(COLOR_3DFACE), "%x"); - - SendMessage(hRebar, RB_SETTEXTCOLOR, 0, RGB(255, 0, 0)); - bi.clrFore = bi.clrBack = 0xc0ffe; - ret = SendMessage(hRebar, RB_GETBANDINFO, 0, (LPARAM)&bi); - ok(ret, "RB_GETBANDINFO failed\n"); - compare(bi.clrFore, RGB(0, 0, 0), "%x"); - - DestroyWindow(hRebar); -} - - -static BOOL register_parent_wnd_class(void) -{ - WNDCLASSA wc; - - wc.style = CS_HREDRAW | CS_VREDRAW; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = GetModuleHandleA(NULL); - wc.hIcon = NULL; - wc.hCursor = LoadCursorA(NULL, IDC_IBEAM); - wc.hbrBackground = GetSysColorBrush(COLOR_WINDOW); - wc.lpszMenuName = NULL; - wc.lpszClassName = "MyTestWnd"; - wc.lpfnWndProc = MyWndProc; - - return RegisterClassA(&wc); -} - -static HWND create_parent_window(void) -{ - HWND hwnd; - - if (!register_parent_wnd_class()) return NULL; - - hwnd = CreateWindowExA(0, "MyTestWnd", "Blah", WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, 672+2*GetSystemMetrics(SM_CXSIZEFRAME), - 226+GetSystemMetrics(SM_CYCAPTION)+2*GetSystemMetrics(SM_CYSIZEFRAME), - NULL, NULL, GetModuleHandleA(NULL), 0); - - ShowWindow(hwnd, SW_SHOW); - return hwnd; -} - -static void test_showband(void) -{ - HWND hRebar; - REBARBANDINFOA rbi; - BOOL ret; - - hRebar = create_rebar_control(); - - /* no bands */ - ret = SendMessageA(hRebar, RB_SHOWBAND, 0, TRUE); - ok(ret == FALSE, "got %d\n", ret); - - rbi.cbSize = REBARBANDINFOA_V6_SIZE; - rbi.fMask = RBBIM_SIZE | RBBIM_CHILDSIZE | RBBIM_CHILD; - rbi.cx = 200; - rbi.cxMinChild = 100; - rbi.cyMinChild = 30; - rbi.hwndChild = NULL; - SendMessageA(hRebar, RB_INSERTBAND, -1, (LPARAM)&rbi); - - /* index out of range */ - ret = SendMessageA(hRebar, RB_SHOWBAND, 1, TRUE); - ok(ret == FALSE, "got %d\n", ret); - - ret = SendMessageA(hRebar, RB_SHOWBAND, 0, TRUE); - ok(ret == TRUE, "got %d\n", ret); - - DestroyWindow(hRebar); -} - -START_TEST(rebar) -{ - HMODULE hComctl32; - BOOL (WINAPI *pInitCommonControlsEx)(const INITCOMMONCONTROLSEX*); - INITCOMMONCONTROLSEX iccex; - MSG msg; - - /* LoadLibrary is needed. This file has no references to functions in comctl32 */ - hComctl32 = LoadLibraryA("comctl32.dll"); - pInitCommonControlsEx = (void*)GetProcAddress(hComctl32, "InitCommonControlsEx"); - if (!pInitCommonControlsEx) - { - win_skip("InitCommonControlsEx() is missing. Skipping the tests\n"); - return; - } - iccex.dwSize = sizeof(iccex); - iccex.dwICC = ICC_COOL_CLASSES; - pInitCommonControlsEx(&iccex); - - hMainWnd = create_parent_window(); - - test_bandinfo(); - test_colors(); - test_showband(); - - if(!is_font_installed("System") || !is_font_installed("Tahoma")) - { - skip("Missing System or Tahoma font\n"); - goto out; - } - - test_layout(); - test_resize(); - -out: - PostQuitMessage(0); - while(GetMessageA(&msg,0,0,0)) { - TranslateMessage(&msg); - DispatchMessageA(&msg); - } - DestroyWindow(hMainWnd); - - FreeLibrary(hComctl32); -} diff --git a/rostests/winetests/comctl32/resources.h b/rostests/winetests/comctl32/resources.h deleted file mode 100644 index beabce5bcee..00000000000 --- a/rostests/winetests/comctl32/resources.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Resource IDs - * - * Copyright 2006 Mikolaj Zalewski - * - * 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_COMCTL32_TEST_RESOURCES_H -#define __WINE_COMCTL32_TEST_RESOURCES_H - -#define IDB_BITMAP_128x15 10 -#define IDB_BITMAP_80x15 11 - -#define IDS_TBADD1 16 -#define IDS_TBADD2 17 -#define IDS_TBADD3 18 -#define IDS_TBADD4 19 -#define IDS_TBADD5 20 -#define IDS_TBADD7 22 - -#define IDD_PROP_PAGE_INTRO 30 -#define IDD_PROP_PAGE_EDIT 31 -#define IDD_PROP_PAGE_RADIO 32 -#define IDD_PROP_PAGE_EXIT 33 - -#define IDD_PROP_PAGE_WITH_CUSTOM_DEFAULT_BUTTON 34 - -#define IDC_PS_EDIT1 1000 -#define IDC_PS_EDIT2 1001 -#define IDC_PS_RADIO1 1010 -#define IDC_PS_RADIO2 1011 - -#define IDC_PS_COMBO1 1020 -#define IDC_PS_PUSHBUTTON1 1021 - -#endif /* __WINE_COMCTL32_TEST_RESOURCES_H */ diff --git a/rostests/winetests/comctl32/rsrc.rc b/rostests/winetests/comctl32/rsrc.rc deleted file mode 100644 index c817acd9f58..00000000000 --- a/rostests/winetests/comctl32/rsrc.rc +++ /dev/null @@ -1,89 +0,0 @@ -/* Resources for the common control unit test suite. - * - * Copyright 2006 Huw Davies - * Copyright 2006 Mikolaj Zalewski - * - * 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 "windef.h" -#include "winuser.h" -#include "resources.h" - -PROP_PAGE1 DIALOG LOADONCALL MOVEABLE DISCARDABLE 5, 43, 227, 215 -STYLE WS_POPUP | WS_CAPTION | WS_CLIPSIBLINGS | WS_VISIBLE -CAPTION "Page1" -FONT 8, "MS Shell Dlg" -{ - LTEXT "Test", -1, 10, 6, 100, 8 -} - -IDD_PROP_PAGE_INTRO DIALOG LOADONCALL MOVEABLE DISCARDABLE 5, 43, 227, 215 -STYLE WS_POPUP | WS_CAPTION | WS_CLIPSIBLINGS | WS_VISIBLE -CAPTION "Edit Control Page" -FONT 8, "MS Shell Dlg" -{ - LTEXT "This is a test property sheet!", -1, 10, 6, 100, 8 -} - -IDD_PROP_PAGE_EDIT DIALOG LOADONCALL MOVEABLE DISCARDABLE 5, 43, 227, 215 -STYLE WS_POPUP | WS_CAPTION | WS_CLIPSIBLINGS | WS_VISIBLE -CAPTION "Edit Control Page" -FONT 8, "MS Shell Dlg" -{ - EDITTEXT IDC_PS_EDIT1, 5, 5, 150, 140, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_MULTILINE - EDITTEXT IDC_PS_EDIT2, 5, 160, 150, 28, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_MULTILINE -} - -IDD_PROP_PAGE_RADIO DIALOG LOADONCALL MOVEABLE DISCARDABLE 5, 43, 227, 215 -STYLE WS_POPUP | WS_CAPTION | WS_CLIPSIBLINGS | WS_VISIBLE -CAPTION "Edit Control Page" -FONT 8, "MS Shell Dlg" -{ - CONTROL "Radio1", IDC_PS_RADIO1, "Button", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 20, 20, 39, 10 - CONTROL "Radio2", IDC_PS_RADIO2, "Button", BS_AUTORADIOBUTTON, 20, 40, 39, 10 -} - -IDD_PROP_PAGE_EXIT DIALOG LOADONCALL MOVEABLE DISCARDABLE 5, 43, 227, 215 -STYLE WS_POPUP | WS_CAPTION | WS_CLIPSIBLINGS | WS_VISIBLE -CAPTION "Edit Control Page" -FONT 8, "MS Shell Dlg" -{ - LTEXT "This has been a test property sheet!", -1, 10, 6, 170, 8 -} - -STRINGTABLE -{ - IDS_TBADD1 "abc" - IDS_TBADD2 "|p|q|r" - IDS_TBADD3 "*p*q*" - IDS_TBADD4 "#p#q##" - IDS_TBADD5 "|p||q|r|" - IDS_TBADD7 "abracadabra" -} - -/* @makedep: bmp128x15.bmp */ -IDB_BITMAP_128x15 BITMAP bmp128x15.bmp - -/* @makedep: bmp80x15.bmp */ -IDB_BITMAP_80x15 BITMAP bmp80x15.bmp - -IDD_PROP_PAGE_WITH_CUSTOM_DEFAULT_BUTTON DIALOG DISCARDABLE 5, 43, 227, 215 -STYLE WS_CHILD | WS_DISABLED -FONT 8, "MS Shell Dlg" -{ - COMBOBOX IDC_PS_COMBO1, 16, 68, 140, 14, CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "Add", IDC_PS_PUSHBUTTON1, 164, 68, 40, 13 -} diff --git a/rostests/winetests/comctl32/status.c b/rostests/winetests/comctl32/status.c deleted file mode 100644 index 839b138bb40..00000000000 --- a/rostests/winetests/comctl32/status.c +++ /dev/null @@ -1,594 +0,0 @@ -/* Unit test suite for status control. - * - * Copyright 2007 Google (Lei Zhang) - * Copyright 2007 Alex Arazi - * - * 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 "wine/test.h" - -#define SUBCLASS_NAME "MyStatusBar" - -#define expect(expected,got) ok (expected == got,"Expected %d, got %d\n",expected,got) -#define expect_rect(_left,_top,_right,_bottom,got) do { \ - RECT exp = {abs(got.left - _left), abs(got.top - _top), \ - abs(got.right - _right), abs(got.bottom - _bottom)}; \ - ok(exp.left <= 2 && exp.top <= 2 && exp.right <= 2 && exp.bottom <= 2, \ - "Expected rect {%d,%d, %d,%d}, got {%d,%d, %d,%d}\n", \ - _left, _top, _right, _bottom, \ - (got).left, (got).top, (got).right, (got).bottom); } while (0) - -static HINSTANCE hinst; -static WNDPROC g_status_wndproc; -static RECT g_rcCreated; -static HWND g_hMainWnd; -static int g_wmsize_count = 0; -static DWORD g_ysize; -static DWORD g_dpisize; -static int g_wmdrawitm_ctr; -static WNDPROC g_wndproc_saved; - -static HWND create_status_control(DWORD style, DWORD exstyle) -{ - HWND hWndStatus; - - /* make the control */ - hWndStatus = CreateWindowEx(exstyle, STATUSCLASSNAME, NULL, style, - /* placement */ - 0, 0, 300, 20, - /* parent, etc */ - NULL, NULL, hinst, NULL); - assert (hWndStatus); - return hWndStatus; -} - -static LRESULT WINAPI create_test_wndproc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - LRESULT ret; - - if (msg == WM_CREATE) - { - CREATESTRUCT *cs = (CREATESTRUCT *)lParam; - ret = CallWindowProc(g_status_wndproc, hwnd, msg, wParam, lParam); - GetWindowRect(hwnd, &g_rcCreated); - MapWindowPoints(HWND_DESKTOP, g_hMainWnd, (LPPOINT)&g_rcCreated, 2); - ok(cs->x == g_rcCreated.left, "CREATESTRUCT.x modified\n"); - ok(cs->y == g_rcCreated.top, "CREATESTRUCT.y modified\n"); - } else if (msg == WM_SIZE) - { - g_wmsize_count++; - ret = CallWindowProc(g_status_wndproc, hwnd, msg, wParam, lParam); - } - else - ret = CallWindowProc(g_status_wndproc, hwnd, msg, wParam, lParam); - - return ret; -} - -static void register_subclass(void) -{ - WNDCLASSEX cls; - - cls.cbSize = sizeof(WNDCLASSEX); - GetClassInfoEx(NULL, STATUSCLASSNAME, &cls); - g_status_wndproc = cls.lpfnWndProc; - cls.lpfnWndProc = create_test_wndproc; - cls.lpszClassName = SUBCLASS_NAME; - cls.hInstance = NULL; - ok(RegisterClassEx(&cls), "RegisterClassEx failed\n"); -} - -static void test_create(void) -{ - RECT rc; - HWND hwnd; - - ok((hwnd = CreateWindowA(SUBCLASS_NAME, "", WS_CHILD|WS_VISIBLE|SBARS_SIZEGRIP, 0, 0, 100, 100, - g_hMainWnd, NULL, NULL, 0)) != NULL, "CreateWindowA failed\n"); - MapWindowPoints(HWND_DESKTOP, g_hMainWnd, (LPPOINT)&rc, 2); - GetWindowRect(hwnd, &rc); - MapWindowPoints(HWND_DESKTOP, g_hMainWnd, (LPPOINT)&rc, 2); - expect_rect(0, 0, 100, 100, g_rcCreated); - expect(0, rc.left); - expect(672, rc.right); - expect(226, rc.bottom); - /* we don't check rc.top as this may depend on user font settings */ - DestroyWindow(hwnd); -} - -static int CALLBACK check_height_font_enumproc(ENUMLOGFONTEX *enumlf, NEWTEXTMETRICEX *ntm, DWORD type, LPARAM lParam) -{ - HWND hwndStatus = (HWND)lParam; - HDC hdc = GetDC(NULL); - static const int sizes[] = { 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, - 20, 22, 28, 36, 48, 72}; - DWORD i; - DWORD y; - LPSTR facename = (CHAR *)enumlf->elfFullName; - - /* on win9x, enumlf->elfFullName is only valid for truetype fonts */ - if (type != TRUETYPE_FONTTYPE) - facename = enumlf->elfLogFont.lfFaceName; - - for (i = 0; i < sizeof(sizes)/sizeof(sizes[0]); i++) - { - HFONT hFont; - TEXTMETRIC tm; - HFONT hCtrlFont; - HFONT hOldFont; - RECT rcCtrl; - - enumlf->elfLogFont.lfHeight = sizes[i]; - hFont = CreateFontIndirect(&enumlf->elfLogFont); - hCtrlFont = (HFONT)SendMessage(hwndStatus, WM_SETFONT, (WPARAM)hFont, TRUE); - hOldFont = SelectObject(hdc, hFont); - - GetClientRect(hwndStatus, &rcCtrl); - GetTextMetrics(hdc, &tm); - y = tm.tmHeight + (tm.tmInternalLeading ? tm.tmInternalLeading : 2) + 4; - - ok( (rcCtrl.bottom == max(y, g_ysize)) || (rcCtrl.bottom == max(y, g_dpisize)), - "got %d (expected %d or %d) for %s #%d\n", - rcCtrl.bottom, max(y, g_ysize), max(y, g_dpisize), facename, sizes[i]); - - SelectObject(hdc, hOldFont); - SendMessage(hwndStatus, WM_SETFONT, (WPARAM)hCtrlFont, TRUE); - DeleteObject(hFont); - } - ReleaseDC(NULL, hdc); - return 1; -} - -static int CALLBACK check_height_family_enumproc(ENUMLOGFONTEX *enumlf, NEWTEXTMETRICEX *ntm, DWORD type, LPARAM lParam) -{ - HDC hdc = GetDC(NULL); - enumlf->elfLogFont.lfHeight = 0; - EnumFontFamiliesEx(hdc, &enumlf->elfLogFont, (FONTENUMPROC)check_height_font_enumproc, lParam, 0); - ReleaseDC(NULL, hdc); - return 1; -} - -static void test_height(void) -{ - LOGFONT lf; - HFONT hFont, hFontSm; - RECT rc1, rc2; - HWND hwndStatus = CreateWindow(SUBCLASS_NAME, NULL, WS_CHILD|WS_VISIBLE, - 0, 0, 300, 20, g_hMainWnd, NULL, NULL, NULL); - HDC hdc; - - GetClientRect(hwndStatus, &rc1); - hFont = CreateFont(32, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, ANSI_CHARSET, - OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FF_DONTCARE, "Tahoma"); - - g_wmsize_count = 0; - SendMessage(hwndStatus, WM_SETFONT, (WPARAM)hFont, TRUE); - if (!g_wmsize_count) - { - skip("Status control not resized in win95, skipping broken tests.\n"); - return; - } - ok(g_wmsize_count > 0, "WM_SETFONT should issue WM_SIZE\n"); - - GetClientRect(hwndStatus, &rc2); - expect_rect(0, 0, 672, 42, rc2); /* GetTextMetrics returns invalid tmInternalLeading for this font */ - - g_wmsize_count = 0; - SendMessage(hwndStatus, WM_SETFONT, (WPARAM)hFont, TRUE); - ok(g_wmsize_count > 0, "WM_SETFONT should issue WM_SIZE\n"); - - GetClientRect(hwndStatus, &rc2); - expect_rect(0, 0, 672, 42, rc2); - - /* minheight < fontsize - no effects*/ - SendMessage(hwndStatus, SB_SETMINHEIGHT, 12, 0); - SendMessage(hwndStatus, WM_SIZE, 0, 0); - GetClientRect(hwndStatus, &rc2); - expect_rect(0, 0, 672, 42, rc2); - - /* minheight > fontsize - has an effect after WM_SIZE */ - SendMessage(hwndStatus, SB_SETMINHEIGHT, 60, 0); - GetClientRect(hwndStatus, &rc2); - expect_rect(0, 0, 672, 42, rc2); - SendMessage(hwndStatus, WM_SIZE, 0, 0); - GetClientRect(hwndStatus, &rc2); - expect_rect(0, 0, 672, 62, rc2); - - /* font changed to smaller than minheight - has an effect */ - SendMessage(hwndStatus, SB_SETMINHEIGHT, 30, 0); - expect_rect(0, 0, 672, 62, rc2); - SendMessage(hwndStatus, WM_SIZE, 0, 0); - GetClientRect(hwndStatus, &rc2); - expect_rect(0, 0, 672, 42, rc2); - hFontSm = CreateFont(9, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, ANSI_CHARSET, - OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FF_DONTCARE, "Tahoma"); - SendMessage(hwndStatus, WM_SETFONT, (WPARAM)hFontSm, TRUE); - GetClientRect(hwndStatus, &rc2); - expect_rect(0, 0, 672, 32, rc2); - - /* test the height formula */ - ZeroMemory(&lf, sizeof(lf)); - SendMessage(hwndStatus, SB_SETMINHEIGHT, 0, 0); - hdc = GetDC(NULL); - - /* used only for some fonts (tahoma as example) */ - g_ysize = GetSystemMetrics(SM_CYSIZE) + 2; - if (g_ysize & 1) g_ysize--; /* The min height is always even */ - - g_dpisize = MulDiv(18, GetDeviceCaps(hdc, LOGPIXELSY), 96) + 2; - if (g_dpisize & 1) g_dpisize--; /* The min height is always even */ - - - trace("dpi=%d (min height: %d or %d) SM_CYSIZE: %d\n", - GetDeviceCaps(hdc, LOGPIXELSY), g_ysize, g_dpisize, - GetSystemMetrics(SM_CYSIZE)); - - EnumFontFamiliesEx(hdc, &lf, (FONTENUMPROC)check_height_family_enumproc, (LPARAM)hwndStatus, 0); - ReleaseDC(NULL, hdc); - - DestroyWindow(hwndStatus); - DeleteObject(hFont); - DeleteObject(hFontSm); -} - -static void test_status_control(void) -{ - HWND hWndStatus; - int r; - int nParts[] = {50, 150, -1}; - int checkParts[] = {0, 0, 0}; - int borders[] = {0, 0, 0}; - RECT rc; - CHAR charArray[20]; - HICON hIcon; - char ch; - char chstr[10] = "Inval id"; - - hWndStatus = create_status_control(WS_VISIBLE, 0); - - /* Divide into parts and set text */ - r = SendMessage(hWndStatus, SB_SETPARTS, 3, (LPARAM)nParts); - expect(TRUE,r); - r = SendMessage(hWndStatus, SB_SETTEXT, 0, (LPARAM)"First"); - expect(TRUE,r); - r = SendMessage(hWndStatus, SB_SETTEXT, 1, (LPARAM)"Second"); - expect(TRUE,r); - r = SendMessage(hWndStatus, SB_SETTEXT, 2, (LPARAM)"Third"); - expect(TRUE,r); - - /* Get RECT Information */ - r = SendMessage(hWndStatus, SB_GETRECT, 0, (LPARAM)&rc); - expect(TRUE,r); - expect(2,rc.top); - /* The rc.bottom test is system dependent - expect(22,rc.bottom); */ - expect(0,rc.left); - expect(50,rc.right); - r = SendMessage(hWndStatus, SB_GETRECT, -1, (LPARAM)&rc); - expect(FALSE,r); - r = SendMessage(hWndStatus, SB_GETRECT, 3, (LPARAM)&rc); - expect(FALSE,r); - /* Get text length and text */ - r = SendMessage(hWndStatus, SB_GETTEXTLENGTH, 2, 0); - expect(5,LOWORD(r)); - expect(0,HIWORD(r)); - r = SendMessage(hWndStatus, SB_GETTEXT, 2, (LPARAM) charArray); - ok(strcmp(charArray,"Third") == 0, "Expected Third, got %s\n", charArray); - expect(5,LOWORD(r)); - expect(0,HIWORD(r)); - - /* Get parts and borders */ - r = SendMessage(hWndStatus, SB_GETPARTS, 3, (LPARAM)checkParts); - ok(r == 3, "Expected 3, got %d\n", r); - expect(50,checkParts[0]); - expect(150,checkParts[1]); - expect(-1,checkParts[2]); - r = SendMessage(hWndStatus, SB_GETBORDERS, 0, (LPARAM)borders); - ok(r == TRUE, "Expected TRUE, got %d\n", r); - expect(0,borders[0]); - expect(2,borders[1]); - expect(2,borders[2]); - - /* Test resetting text with different characters */ - r = SendMessage(hWndStatus, SB_SETTEXT, 0, (LPARAM)"First@Again"); - expect(TRUE,r); - r = SendMessage(hWndStatus, SB_SETTEXT, 1, (LPARAM)"Invalid\tChars\\7\7"); - expect(TRUE,r); - r = SendMessage(hWndStatus, SB_SETTEXT, 2, (LPARAM)"InvalidChars\\n\n"); - expect(TRUE,r); - - /* Get text again */ - r = SendMessage(hWndStatus, SB_GETTEXT, 0, (LPARAM) charArray); - ok(strcmp(charArray,"First@Again") == 0, "Expected First@Again, got %s\n", charArray); - expect(11,LOWORD(r)); - expect(0,HIWORD(r)); - r = SendMessage(hWndStatus, SB_GETTEXT, 1, (LPARAM) charArray); - ok(strcmp(charArray,"Invalid\tChars\\7 ") == 0, "Expected Invalid\tChars\\7 , got %s\n", charArray); - - expect(16,LOWORD(r)); - expect(0,HIWORD(r)); - r = SendMessage(hWndStatus, SB_GETTEXT, 2, (LPARAM) charArray); - ok(strcmp(charArray,"InvalidChars\\n ") == 0, "Expected InvalidChars\\n , got %s\n", charArray); - - expect(15,LOWORD(r)); - expect(0,HIWORD(r)); - - /* test more nonprintable chars */ - for(ch = 0x00; ch < 0x7F; ch++) { - chstr[5] = ch; - r = SendMessage(hWndStatus, SB_SETTEXT, 0, (LPARAM)chstr); - expect(TRUE,r); - r = SendMessage(hWndStatus, SB_GETTEXT, 0, (LPARAM)charArray); - /* substitution with single space */ - if (ch > 0x00 && ch < 0x20 && ch != '\t') - chstr[5] = ' '; - ok(strcmp(charArray, chstr) == 0, "Expected %s, got %s\n", chstr, charArray); - } - - /* Set background color */ - r = SendMessage(hWndStatus, SB_SETBKCOLOR , 0, RGB(255,0,0)); - ok(r == CLR_DEFAULT || - broken(r == 0), /* win95 */ - "Expected %d, got %d\n", CLR_DEFAULT, r); - r = SendMessage(hWndStatus, SB_SETBKCOLOR , 0, CLR_DEFAULT); - ok(r == RGB(255,0,0) || - broken(r == 0), /* win95 */ - "Expected %d, got %d\n", RGB(255,0,0), r); - - /* Add an icon to the status bar */ - hIcon = LoadIcon(NULL, IDI_QUESTION); - r = SendMessage(hWndStatus, SB_SETICON, 1, 0); - ok(r != 0 || - broken(r == 0), /* win95 */ - "Expected non-zero, got %d\n", r); - r = SendMessage(hWndStatus, SB_SETICON, 1, (LPARAM) hIcon); - ok(r != 0 || - broken(r == 0), /* win95 */ - "Expected non-zero, got %d\n", r); - r = SendMessage(hWndStatus, SB_SETICON, 1, 0); - ok(r != 0 || - broken(r == 0), /* win95 */ - "Expected non-zero, got %d\n", r); - - /* Set the Unicode format */ - r = SendMessage(hWndStatus, SB_SETUNICODEFORMAT, FALSE, 0); - r = SendMessage(hWndStatus, SB_GETUNICODEFORMAT, 0, 0); - expect(FALSE,r); - r = SendMessage(hWndStatus, SB_SETUNICODEFORMAT, TRUE, 0); - expect(FALSE,r); - r = SendMessage(hWndStatus, SB_GETUNICODEFORMAT, 0, 0); - ok(r == TRUE || - broken(r == FALSE), /* win95 */ - "Expected TRUE, got %d\n", r); - - /* Reset number of parts */ - r = SendMessage(hWndStatus, SB_SETPARTS, 2, (LPARAM)nParts); - expect(TRUE,r); - - /* Set the minimum height and get rectangle information again */ - SendMessage(hWndStatus, SB_SETMINHEIGHT, 50, 0); - r = SendMessage(hWndStatus, WM_SIZE, 0, 0); - expect(0,r); - r = SendMessage(hWndStatus, SB_GETRECT, 0, (LPARAM)&rc); - expect(TRUE,r); - expect(2,rc.top); - /* The rc.bottom test is system dependent - expect(22,rc.bottom); */ - expect(0,rc.left); - expect(50,rc.right); - r = SendMessage(hWndStatus, SB_GETRECT, -1, (LPARAM)&rc); - expect(FALSE,r); - r = SendMessage(hWndStatus, SB_GETRECT, 3, (LPARAM)&rc); - expect(FALSE,r); - - /* Set the ToolTip text */ - todo_wine - { - SendMessage(hWndStatus, SB_SETTIPTEXT, 0,(LPARAM) "Tooltip Text"); - lstrcpyA(charArray, "apple"); - SendMessage(hWndStatus, SB_GETTIPTEXT, MAKEWPARAM (0, 20),(LPARAM) charArray); - ok(strcmp(charArray,"Tooltip Text") == 0 || - broken(!strcmp(charArray, "apple")), /* win95 */ - "Expected Tooltip Text, got %s\n", charArray); - } - - /* Make simple */ - SendMessage(hWndStatus, SB_SIMPLE, TRUE, 0); - r = SendMessage(hWndStatus, SB_ISSIMPLE, 0, 0); - ok(r == TRUE || - broken(r == FALSE), /* win95 */ - "Expected TRUE, got %d\n", r); - - DestroyWindow(hWndStatus); -} - -static LRESULT WINAPI ownerdraw_test_wndproc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - LRESULT ret; - if (msg == WM_DRAWITEM) - g_wmdrawitm_ctr++; - ret = CallWindowProc(g_wndproc_saved, hwnd, msg, wParam, lParam); - return ret; -} - -static void test_status_ownerdraw(void) -{ - HWND hWndStatus; - int r; - const char* statustext = "STATUS TEXT"; - LONG oldstyle; - - /* subclass the main window and make sure it is visible */ - g_wndproc_saved = (WNDPROC) SetWindowLongPtr( g_hMainWnd, GWLP_WNDPROC, - (LONG_PTR)ownerdraw_test_wndproc ); - ok( g_wndproc_saved != 0, "failed to set the WndProc\n"); - SetWindowPos( g_hMainWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE); - oldstyle = GetWindowLong( g_hMainWnd, GWL_STYLE); - SetWindowLong( g_hMainWnd, GWL_STYLE, oldstyle | WS_VISIBLE); - /* create a status child window */ - ok((hWndStatus = CreateWindowA(SUBCLASS_NAME, "", WS_CHILD|WS_VISIBLE, 0, 0, 100, 100, - g_hMainWnd, NULL, NULL, 0)) != NULL, "CreateWindowA failed\n"); - /* set text */ - g_wmdrawitm_ctr = 0; - r = SendMessage(hWndStatus, SB_SETTEXT, 0, (LPARAM)statustext); - ok( r == TRUE, "Sendmessage returned %d, expected 1\n", r); - ok( 0 == g_wmdrawitm_ctr, "got %d drawitem messages expected none\n", g_wmdrawitm_ctr); - /* set same text, with ownerdraw flag */ - g_wmdrawitm_ctr = 0; - r = SendMessage(hWndStatus, SB_SETTEXT, SBT_OWNERDRAW, (LPARAM)statustext); - ok( r == TRUE, "Sendmessage returned %d, expected 1\n", r); - ok( 1 == g_wmdrawitm_ctr, "got %d drawitem messages expected 1\n", g_wmdrawitm_ctr); - /* ;and again */ - g_wmdrawitm_ctr = 0; - r = SendMessage(hWndStatus, SB_SETTEXT, SBT_OWNERDRAW, (LPARAM)statustext); - ok( r == TRUE, "Sendmessage returned %d, expected 1\n", r); - ok( 1 == g_wmdrawitm_ctr, "got %d drawitem messages expected 1\n", g_wmdrawitm_ctr); - /* clean up */ - DestroyWindow(hWndStatus); - SetWindowLong( g_hMainWnd, GWL_STYLE, oldstyle); - SetWindowLongPtr( g_hMainWnd, GWLP_WNDPROC, (LONG_PTR)g_wndproc_saved ); -} - -static void test_gettext(void) -{ - HWND hwndStatus = CreateWindow(SUBCLASS_NAME, NULL, WS_CHILD|WS_VISIBLE, - 0, 0, 300, 20, g_hMainWnd, NULL, NULL, NULL); - char buf[5]; - int r; - - r = SendMessage(hwndStatus, SB_SETTEXT, 0, (LPARAM)"Text"); - expect(TRUE, r); - r = SendMessage(hwndStatus, WM_GETTEXTLENGTH, 0, 0); - expect(4, r); - /* A size of 0 returns the length of the text */ - r = SendMessage(hwndStatus, WM_GETTEXT, 0, 0); - expect(4, r); - /* A size of 1 only stores the NULL terminator */ - buf[0] = 0xa; - r = SendMessage(hwndStatus, WM_GETTEXT, 1, (LPARAM)buf); - ok( r == 0 || broken(r == 4), "Expected 0 got %d\n", r ); - if (!r) ok(!buf[0], "expected empty buffer\n"); - /* A size of 2 returns a length 1 */ - r = SendMessage(hwndStatus, WM_GETTEXT, 2, (LPARAM)buf); - ok( r == 1 || broken(r == 4), "Expected 1 got %d\n", r ); - r = SendMessage(hwndStatus, WM_GETTEXT, sizeof(buf), (LPARAM)buf); - expect(4, r); - ok(!strcmp(buf, "Text"), "expected Text, got %s\n", buf); - DestroyWindow(hwndStatus); -} - -/* Notify events to parent */ -static BOOL g_got_dblclk; -static BOOL g_got_click; -static BOOL g_got_rdblclk; -static BOOL g_got_rclick; - -/* Messages to parent */ -static BOOL g_got_contextmenu; - -static LRESULT WINAPI test_notify_parent_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch(msg) - { - case WM_NOTIFY: - { - NMHDR *hdr = ((LPNMHDR)lParam); - switch(hdr->code) - { - case NM_DBLCLK: g_got_dblclk = TRUE; break; - case NM_CLICK: g_got_click = TRUE; break; - case NM_RDBLCLK: g_got_rdblclk = TRUE; break; - case NM_RCLICK: g_got_rclick = TRUE; break; - } - - /* Return zero to indicate default processing */ - return 0; - } - - case WM_CONTEXTMENU: g_got_contextmenu = TRUE; return 0; - - default: - return( DefWindowProcA(hwnd, msg, wParam, lParam)); - } - - return 0; -} - -/* Test that WM_NOTIFY messages from the status control works correctly */ -static void test_notify(void) -{ - HWND hwndParent; - HWND hwndStatus; - ATOM atom; - WNDCLASSA wclass = {0}; - wclass.lpszClassName = "TestNotifyParentClass"; - wclass.lpfnWndProc = test_notify_parent_proc; - atom = RegisterClassA(&wclass); - ok(atom, "RegisterClass failed\n"); - - /* create parent */ - hwndParent = CreateWindow(wclass.lpszClassName, "parent", WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, 0, 300, 20, NULL, NULL, NULL, NULL); - ok(hwndParent != NULL, "Parent creation failed!\n"); - - /* create status bar */ - hwndStatus = CreateWindow(STATUSCLASSNAME, NULL, WS_VISIBLE | WS_CHILD, - 0, 0, 300, 20, hwndParent, NULL, NULL, NULL); - ok(hwndStatus != NULL, "Status creation failed!\n"); - - /* Send various mouse event, and check that we get them */ - g_got_dblclk = FALSE; - SendMessage(hwndStatus, WM_LBUTTONDBLCLK, 0, 0); - ok(g_got_dblclk, "WM_LBUTTONDBLCLK was not processed correctly!\n"); - g_got_rdblclk = FALSE; - SendMessage(hwndStatus, WM_RBUTTONDBLCLK, 0, 0); - ok(g_got_rdblclk, "WM_RBUTTONDBLCLK was not processed correctly!\n"); - g_got_click = FALSE; - SendMessage(hwndStatus, WM_LBUTTONUP, 0, 0); - ok(g_got_click, "WM_LBUTTONUP was not processed correctly!\n"); - - /* For R-UP, check that we also get the context menu from the default processing */ - g_got_contextmenu = FALSE; - g_got_rclick = FALSE; - SendMessage(hwndStatus, WM_RBUTTONUP, 0, 0); - ok(g_got_rclick, "WM_RBUTTONUP was not processed correctly!\n"); - ok(g_got_contextmenu, "WM_RBUTTONUP did not activate the context menu!\n"); -} - -START_TEST(status) -{ - hinst = GetModuleHandleA(NULL); - - g_hMainWnd = CreateWindowExA(0, "static", "", WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, 672+2*GetSystemMetrics(SM_CXSIZEFRAME), - 226+GetSystemMetrics(SM_CYCAPTION)+2*GetSystemMetrics(SM_CYSIZEFRAME), - NULL, NULL, GetModuleHandleA(NULL), 0); - - InitCommonControls(); - - register_subclass(); - - test_status_control(); - test_create(); - test_height(); - test_status_ownerdraw(); - test_gettext(); - test_notify(); -} diff --git a/rostests/winetests/comctl32/subclass.c b/rostests/winetests/comctl32/subclass.c deleted file mode 100644 index 8511275c8f9..00000000000 --- a/rostests/winetests/comctl32/subclass.c +++ /dev/null @@ -1,329 +0,0 @@ -/* Unit tests for subclassed windows. - * - * Copyright 2004 Kevin Koltzau - * - * 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 _WIN32_WINNT 0x0501 /* For SetWindowSubclass/etc */ - -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "commctrl.h" - -#include "wine/test.h" - -static BOOL (WINAPI *pSetWindowSubclass)(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR); -static BOOL (WINAPI *pRemoveWindowSubclass)(HWND, SUBCLASSPROC, UINT_PTR); -static LRESULT (WINAPI *pDefSubclassProc)(HWND, UINT, WPARAM, LPARAM); - -#define SEND_NEST 0x01 -#define DELETE_SELF 0x02 -#define DELETE_PREV 0x04 - -struct message { - int procnum; /* WndProc id message is expected from */ - WPARAM wParam; /* expected value of wParam */ -}; - -static int sequence_cnt, sequence_size; -static struct message* sequence; - -static const struct message Sub_BasicTest[] = { - { 2, 1 }, - { 1, 1 }, - { 2, 2 }, - { 1, 2 }, - { 0 } -}; - -static const struct message Sub_DeletedTest[] = { - { 2, 1 }, - { 1, 1 }, - { 0 } -}; - -static const struct message Sub_AfterDeletedTest[] = { - { 1, 1 }, - { 0 } -}; - -static const struct message Sub_OldAfterNewTest[] = { - { 3, 1 }, - { 2, 1 }, - { 1, 1 }, - { 3, 2 }, - { 2, 2 }, - { 1, 2 }, - { 0 } -}; - -static const struct message Sub_MixTest[] = { - { 3, 1 }, - { 4, 1 }, - { 2, 1 }, - { 1, 1 }, - { 0 } -}; - -static const struct message Sub_MixAndNestTest[] = { - { 3, 1 }, - { 4, 1 }, - { 3, 2 }, - { 4, 2 }, - { 2, 2 }, - { 1, 2 }, - { 2, 1 }, - { 1, 1 }, - { 0 } -}; - -static const struct message Sub_MixNestDelTest[] = { - { 3, 1 }, - { 4, 1 }, - { 3, 2 }, - { 2, 2 }, - { 1, 2 }, - { 2, 1 }, - { 1, 1 }, - { 0 } -}; - -static const struct message Sub_MixDelPrevTest[] = { - { 3, 1 }, - { 5, 1 }, - { 2, 1 }, - { 1, 1 }, - { 0 } -}; - -static void add_message(const struct message *msg) -{ - if (!sequence) - { - sequence_size = 10; - sequence = HeapAlloc( GetProcessHeap(), 0, sequence_size * sizeof (struct message) ); - } - if (sequence_cnt == sequence_size) - { - sequence_size *= 2; - sequence = HeapReAlloc( GetProcessHeap(), 0, sequence, sequence_size * sizeof (struct message) ); - } - assert(sequence); - - sequence[sequence_cnt].wParam = msg->wParam; - sequence[sequence_cnt].procnum = msg->procnum; - - sequence_cnt++; -} - -static void flush_sequence(void) -{ - HeapFree(GetProcessHeap(), 0, sequence); - sequence = 0; - sequence_cnt = sequence_size = 0; -} - -static void ok_sequence(const struct message *expected, const char *context) -{ - static const struct message end_of_sequence = { 0, 0 }; - const struct message *actual; - - add_message(&end_of_sequence); - - actual = sequence; - - while(expected->procnum && actual->procnum) - { - ok(expected->procnum == actual->procnum, - "%s: the procnum %d was expected, but got procnum %d instead\n", - context, expected->procnum, actual->procnum); - ok(expected->wParam == actual->wParam, - "%s: in procnum %d expecting wParam 0x%lx got 0x%lx\n", - context, expected->procnum, expected->wParam, actual->wParam); - expected++; - actual++; - } - ok(!expected->procnum, "Received fewer messages than expected\n"); - ok(!actual->procnum, "Received more messages than expected\n"); - flush_sequence(); -} - -static LRESULT WINAPI WndProc1(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - struct message msg; - - if(message == WM_USER) { - msg.wParam = wParam; - msg.procnum = 1; - add_message(&msg); - } - return DefWindowProc(hwnd, message, wParam, lParam); -} - - -static WNDPROC origProc3; -static LRESULT WINAPI WndProc3(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - struct message msg; - - if(message == WM_USER) { - msg.wParam = wParam; - msg.procnum = 3; - add_message(&msg); - } - return CallWindowProc(origProc3, hwnd, message, wParam, lParam); -} - -static LRESULT WINAPI WndProcSub(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, UINT_PTR uldSubclass, DWORD_PTR dwRefData) -{ - struct message msg; - - if(message == WM_USER) { - msg.wParam = wParam; - msg.procnum = uldSubclass; - add_message(&msg); - - if(lParam) { - if(dwRefData & DELETE_SELF) { - pRemoveWindowSubclass(hwnd, WndProcSub, uldSubclass); - pRemoveWindowSubclass(hwnd, WndProcSub, uldSubclass); - } - if(dwRefData & DELETE_PREV) - pRemoveWindowSubclass(hwnd, WndProcSub, uldSubclass-1); - if(dwRefData & SEND_NEST) - SendMessage(hwnd, WM_USER, wParam+1, 0); - } - } - return pDefSubclassProc(hwnd, message, wParam, lParam); -} - -static void test_subclass(void) -{ - HWND hwnd = CreateWindowExA(0, "TestSubclass", "Test subclass", WS_OVERLAPPEDWINDOW, - 100, 100, 200, 200, 0, 0, 0, NULL); - assert(hwnd); - - pSetWindowSubclass(hwnd, WndProcSub, 2, 0); - SendMessage(hwnd, WM_USER, 1, 0); - SendMessage(hwnd, WM_USER, 2, 0); - ok_sequence(Sub_BasicTest, "Basic"); - - pSetWindowSubclass(hwnd, WndProcSub, 2, DELETE_SELF); - SendMessage(hwnd, WM_USER, 1, 1); - ok_sequence(Sub_DeletedTest, "Deleted"); - - SendMessage(hwnd, WM_USER, 1, 0); - ok_sequence(Sub_AfterDeletedTest, "After Deleted"); - - pSetWindowSubclass(hwnd, WndProcSub, 2, 0); - origProc3 = (WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)WndProc3); - SendMessage(hwnd, WM_USER, 1, 0); - SendMessage(hwnd, WM_USER, 2, 0); - ok_sequence(Sub_OldAfterNewTest, "Old after New"); - - pSetWindowSubclass(hwnd, WndProcSub, 4, 0); - SendMessage(hwnd, WM_USER, 1, 0); - ok_sequence(Sub_MixTest, "Mix"); - - /* Now the fun starts */ - pSetWindowSubclass(hwnd, WndProcSub, 4, SEND_NEST); - SendMessage(hwnd, WM_USER, 1, 1); - ok_sequence(Sub_MixAndNestTest, "Mix and nest"); - - pSetWindowSubclass(hwnd, WndProcSub, 4, SEND_NEST | DELETE_SELF); - SendMessage(hwnd, WM_USER, 1, 1); - ok_sequence(Sub_MixNestDelTest, "Mix, nest, del"); - - pSetWindowSubclass(hwnd, WndProcSub, 4, 0); - pSetWindowSubclass(hwnd, WndProcSub, 5, DELETE_PREV); - SendMessage(hwnd, WM_USER, 1, 1); - ok_sequence(Sub_MixDelPrevTest, "Mix and del prev"); - - DestroyWindow(hwnd); -} - -static BOOL RegisterWindowClasses(void) -{ - WNDCLASSA cls; - - cls.style = 0; - cls.lpfnWndProc = WndProc1; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(0); - cls.hIcon = 0; - cls.hCursor = NULL; - cls.hbrBackground = NULL; - cls.lpszMenuName = NULL; - cls.lpszClassName = "TestSubclass"; - if(!RegisterClassA(&cls)) return FALSE; - - return TRUE; -} - -static int init_function_pointers(void) -{ - HMODULE hmod; - void *ptr; - - hmod = GetModuleHandleA("comctl32.dll"); - assert(hmod); - - /* Functions have to be loaded by ordinal. Only XP and W2K3 export - * them by name. - */ -#define MAKEFUNC_ORD(f, ord) (p##f = (void*)GetProcAddress(hmod, (LPSTR)(ord))) - MAKEFUNC_ORD(SetWindowSubclass, 410); - MAKEFUNC_ORD(RemoveWindowSubclass, 412); - MAKEFUNC_ORD(DefSubclassProc, 413); -#undef MAKEFUNC_ORD - - if(!pSetWindowSubclass || !pRemoveWindowSubclass || !pDefSubclassProc) - { - win_skip("SetWindowSubclass and friends are not available\n"); - return 0; - } - - /* test named exports */ - ptr = GetProcAddress(hmod, "SetWindowSubclass"); - ok(broken(ptr == 0) || ptr != 0, "expected named export for SetWindowSubclass\n"); - if(ptr) - { -#define TESTNAMED(f) \ - ptr = (void*)GetProcAddress(hmod, #f); \ - ok(ptr != 0, "expected named export for " #f "\n"); - TESTNAMED(RemoveWindowSubclass); - TESTNAMED(DefSubclassProc); - /* GetWindowSubclass exported for V6 only */ -#undef TESTNAMED - } - - return 1; -} - -START_TEST(subclass) -{ - if(!init_function_pointers()) return; - - if(!RegisterWindowClasses()) assert(0); - - test_subclass(); -} diff --git a/rostests/winetests/comctl32/tab.c b/rostests/winetests/comctl32/tab.c deleted file mode 100644 index 6774d51a1a5..00000000000 --- a/rostests/winetests/comctl32/tab.c +++ /dev/null @@ -1,1245 +0,0 @@ -/* Unit test suite for tab control. - * - * Copyright 2003 Vitaliy Margolen - * Copyright 2007 Hagop Hagopian - * - * 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/test.h" -#include "msg.h" - -#define DEFAULT_MIN_TAB_WIDTH 54 -#define TAB_PADDING_X 6 -#define EXTRA_ICON_PADDING 3 -#define MAX_TABLEN 32 - -#define NUM_MSG_SEQUENCES 2 -#define PARENT_SEQ_INDEX 0 -#define TAB_SEQ_INDEX 1 - -#define expect(expected, got) ok ( expected == got, "Expected %d, got %d\n", expected, got) -#define expect_str(expected, got)\ - ok ( strcmp(expected, got) == 0, "Expected '%s', got '%s'\n", expected, got) - -#define TabWidthPadded(padd_x, num) (DEFAULT_MIN_TAB_WIDTH - (TAB_PADDING_X - (padd_x)) * num) - -#define TabCheckSetSize(hwnd, SetWidth, SetHeight, ExpWidth, ExpHeight, Msg)\ - SendMessage (hwnd, TCM_SETITEMSIZE, 0,\ - (LPARAM) MAKELPARAM((SetWidth >= 0) ? SetWidth:0, (SetHeight >= 0) ? SetHeight:0));\ - if (winetest_interactive) RedrawWindow (hwnd, NULL, 0, RDW_UPDATENOW);\ - CheckSize(hwnd, ExpWidth, ExpHeight, Msg); - -#define CheckSize(hwnd,width,height,msg)\ - SendMessage (hwnd, TCM_GETITEMRECT, 0, (LPARAM) &rTab);\ - if ((width >= 0) && (height < 0))\ - ok (width == rTab.right - rTab.left, "%s: Expected width [%d] got [%d]\n",\ - msg, (int)width, rTab.right - rTab.left);\ - else if ((height >= 0) && (width < 0))\ - ok (height == rTab.bottom - rTab.top, "%s: Expected height [%d] got [%d]\n",\ - msg, (int)height, rTab.bottom - rTab.top);\ - else\ - ok ((width == rTab.right - rTab.left) &&\ - (height == rTab.bottom - rTab.top ),\ - "%s: Expected [%d,%d] got [%d,%d]\n", msg, (int)width, (int)height,\ - rTab.right - rTab.left, rTab.bottom - rTab.top); - -static HFONT hFont = 0; - -static struct msg_sequence *sequences[NUM_MSG_SEQUENCES]; - -static const struct message create_parent_wnd_seq[] = { - { WM_GETMINMAXINFO, sent }, - { WM_NCCREATE, sent }, - { WM_NCCALCSIZE, sent|wparam, 0 }, - { WM_CREATE, sent }, - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam, 0 }, - { WM_ACTIVATEAPP, sent|wparam, 1 }, - { WM_NCACTIVATE, sent|wparam, 1 }, - { WM_ACTIVATE, sent|wparam, 1 }, - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { WM_IME_NOTIFY, sent|defwinproc|optional }, - { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, - /* Win9x adds SWP_NOZORDER below */ - { WM_WINDOWPOSCHANGED, sent}, - { WM_NCCALCSIZE, sent|wparam|optional, 1 }, - { WM_SIZE, sent }, - { WM_MOVE, sent }, - { 0 } -}; - -static const struct message add_tab_to_parent[] = { - { TCM_INSERTITEMA, sent }, - { TCM_INSERTITEMA, sent|optional }, - { WM_NOTIFYFORMAT, sent|defwinproc }, - { WM_QUERYUISTATE, sent|wparam|lparam|defwinproc|optional, 0, 0 }, - { WM_PARENTNOTIFY, sent|defwinproc }, - { TCM_INSERTITEMA, sent }, - { TCM_INSERTITEMA, sent }, - { TCM_INSERTITEMA, sent }, - { TCM_INSERTITEMA, sent|optional }, - { 0 } -}; - -static const struct message add_tab_to_parent_interactive[] = { - { TCM_INSERTITEMA, sent }, - { TCM_INSERTITEMA, sent }, - { WM_NOTIFYFORMAT, sent|defwinproc }, - { WM_QUERYUISTATE, sent|wparam|lparam|defwinproc, 0, 0 }, - { WM_PARENTNOTIFY, sent|defwinproc }, - { TCM_INSERTITEMA, sent }, - { TCM_INSERTITEMA, sent }, - { TCM_INSERTITEMA, sent }, - { WM_SHOWWINDOW, sent}, - { WM_WINDOWPOSCHANGING, sent}, - { WM_WINDOWPOSCHANGING, sent}, - { WM_NCACTIVATE, sent}, - { WM_ACTIVATE, sent}, - { WM_IME_SETCONTEXT, sent|defwinproc|optional}, - { WM_IME_NOTIFY, sent|defwinproc|optional}, - { WM_SETFOCUS, sent|defwinproc}, - { WM_WINDOWPOSCHANGED, sent}, - { WM_SIZE, sent}, - { WM_MOVE, sent}, - { 0 } -}; - -static const struct message add_tab_control_parent_seq[] = { - { WM_NOTIFYFORMAT, sent }, - { WM_QUERYUISTATE, sent|wparam|lparam|optional, 0, 0 }, - { 0 } -}; - -static const struct message add_tab_control_parent_seq_interactive[] = { - { WM_NOTIFYFORMAT, sent }, - { WM_QUERYUISTATE, sent|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|optional}, - { WM_NCACTIVATE, sent}, - { WM_ACTIVATE, sent}, - { WM_WINDOWPOSCHANGING, sent|optional}, - { WM_KILLFOCUS, sent}, - { WM_IME_SETCONTEXT, sent|optional}, - { WM_IME_NOTIFY, sent|optional}, - { 0 } -}; - -static const struct message empty_sequence[] = { - { 0 } -}; - -static const struct message set_min_tab_width_seq[] = { - { TCM_SETMINTABWIDTH, sent|wparam, 0 }, - { TCM_SETMINTABWIDTH, sent|wparam, 0 }, - { 0 } -}; - -static const struct message get_item_count_seq[] = { - { TCM_GETITEMCOUNT, sent|wparam|lparam, 0, 0 }, - { 0 } -}; - -static const struct message get_row_count_seq[] = { - { TCM_GETROWCOUNT, sent|wparam|lparam, 0, 0 }, - { 0 } -}; - -static const struct message get_item_rect_seq[] = { - { TCM_GETITEMRECT, sent }, - { TCM_GETITEMRECT, sent }, - { 0 } -}; - -static const struct message getset_cur_focus_seq[] = { - { TCM_SETCURFOCUS, sent|lparam, 0 }, - { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, - { TCM_SETCURFOCUS, sent|lparam, 0 }, - { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, - { TCM_SETCURSEL, sent|lparam, 0 }, - { TCM_SETCURFOCUS, sent|lparam, 0 }, - { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, - { 0 } -}; - -static const struct message getset_cur_sel_seq[] = { - { TCM_SETCURSEL, sent|lparam, 0 }, - { TCM_GETCURSEL, sent|wparam|lparam, 0, 0 }, - { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, - { TCM_SETCURSEL, sent|lparam, 0 }, - { TCM_GETCURSEL, sent|wparam|lparam, 0, 0 }, - { TCM_SETCURSEL, sent|lparam, 0 }, - { TCM_SETCURSEL, sent|lparam, 0 }, - { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, - { 0 } -}; - -static const struct message getset_extended_style_seq[] = { - { TCM_GETEXTENDEDSTYLE, sent|wparam|lparam, 0, 0 }, - { TCM_SETEXTENDEDSTYLE, sent }, - { TCM_GETEXTENDEDSTYLE, sent|wparam|lparam, 0, 0 }, - { TCM_SETEXTENDEDSTYLE, sent }, - { TCM_GETEXTENDEDSTYLE, sent|wparam|lparam, 0, 0 }, - { 0 } -}; - -static const struct message getset_unicode_format_seq[] = { - { CCM_SETUNICODEFORMAT, sent|lparam, 0 }, - { CCM_GETUNICODEFORMAT, sent|wparam|lparam, 0, 0 }, - { CCM_SETUNICODEFORMAT, sent|lparam, 0 }, - { CCM_GETUNICODEFORMAT, sent|wparam|lparam, 0, 0 }, - { CCM_SETUNICODEFORMAT, sent|lparam, 0 }, - { 0 } -}; - -static const struct message getset_item_seq[] = { - { TCM_SETITEMA, sent }, - { TCM_GETITEMA, sent }, - { TCM_GETITEMA, sent }, - { 0 } -}; - -static const struct message getset_tooltip_seq[] = { - { WM_NOTIFYFORMAT, sent|optional }, - { WM_QUERYUISTATE, sent|wparam|lparam|optional, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam, 0 }, - { WM_NOTIFYFORMAT, sent|optional }, - { TCM_SETTOOLTIPS, sent|lparam, 0 }, - { TCM_GETTOOLTIPS, sent|wparam|lparam, 0, 0 }, - { TCM_SETTOOLTIPS, sent|lparam, 0 }, - { TCM_GETTOOLTIPS, sent|wparam|lparam, 0, 0 }, - { 0 } -}; - -static const struct message getset_tooltip_parent_seq[] = { - { WM_WINDOWPOSCHANGING, sent|wparam, 0 }, - { 0 } -}; - -static const struct message insert_focus_seq[] = { - { TCM_GETITEMCOUNT, sent|wparam|lparam, 0, 0 }, - { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, - { TCM_INSERTITEM, sent|wparam, 1 }, - { WM_NOTIFYFORMAT, sent|defwinproc|optional }, - { WM_QUERYUISTATE, sent|defwinproc|optional }, - { WM_PARENTNOTIFY, sent|defwinproc|optional }, - { TCM_GETITEMCOUNT, sent|wparam|lparam, 0, 0 }, - { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, - { TCM_INSERTITEM, sent|wparam, 2 }, - { WM_NOTIFYFORMAT, sent|defwinproc|optional }, - { WM_QUERYUISTATE, sent|defwinproc|optional, }, - { WM_PARENTNOTIFY, sent|defwinproc|optional }, - { TCM_GETITEMCOUNT, sent|wparam|lparam, 0, 0 }, - { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, - { TCM_SETCURFOCUS, sent|wparam|lparam, -1, 0 }, - { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, - { TCM_INSERTITEM, sent|wparam, 3 }, - { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, - { 0 } -}; - -static const struct message delete_focus_seq[] = { - { TCM_GETITEMCOUNT, sent|wparam|lparam, 0, 0 }, - { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, - { TCM_DELETEITEM, sent|wparam|lparam, 1, 0 }, - { TCM_GETITEMCOUNT, sent|wparam|lparam, 0, 0 }, - { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, - { TCM_SETCURFOCUS, sent|wparam|lparam, -1, 0 }, - { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, - { TCM_DELETEITEM, sent|wparam|lparam, 0, 0 }, - { TCM_GETITEMCOUNT, sent|wparam|lparam, 0, 0 }, - { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, - { 0 } -}; - - -static HWND -create_tabcontrol (DWORD style, DWORD mask) -{ - HWND handle; - TCITEM tcNewTab; - static char text1[] = "Tab 1", - text2[] = "Wide Tab 2", - text3[] = "T 3"; - - handle = CreateWindow ( - WC_TABCONTROLA, - "TestTab", - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | TCS_FOCUSNEVER | style, - 10, 10, 300, 100, - NULL, NULL, NULL, 0); - - assert (handle); - - SetWindowLong(handle, GWL_STYLE, WS_CLIPSIBLINGS | WS_CLIPCHILDREN | TCS_FOCUSNEVER | style); - SendMessage (handle, WM_SETFONT, 0, (LPARAM) hFont); - - tcNewTab.mask = mask; - tcNewTab.pszText = text1; - tcNewTab.iImage = 0; - SendMessage (handle, TCM_INSERTITEM, 0, (LPARAM) &tcNewTab); - tcNewTab.pszText = text2; - tcNewTab.iImage = 1; - SendMessage (handle, TCM_INSERTITEM, 1, (LPARAM) &tcNewTab); - tcNewTab.pszText = text3; - tcNewTab.iImage = 2; - SendMessage (handle, TCM_INSERTITEM, 2, (LPARAM) &tcNewTab); - - if (winetest_interactive) - { - ShowWindow (handle, SW_SHOW); - RedrawWindow (handle, NULL, 0, RDW_UPDATENOW); - Sleep (1000); - } - - return handle; -} - -static LRESULT WINAPI parentWindowProcess(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - static LONG defwndproc_counter = 0; - LRESULT ret; - struct message msg; - - /* do not log painting messages */ - if (message != WM_PAINT && - message != WM_ERASEBKGND && - message != WM_NCPAINT && - message != WM_NCHITTEST && - message != WM_GETTEXT && - message != WM_GETICON && - message != WM_DEVICECHANGE) - { - trace("parent: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); - - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - add_message(sequences, PARENT_SEQ_INDEX, &msg); - } - - defwndproc_counter++; - ret = DefWindowProcA(hwnd, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static BOOL registerParentWindowClass(void) -{ - WNDCLASSA cls; - - cls.style = 0; - cls.lpfnWndProc = parentWindowProcess; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(NULL); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "Tab test parent class"; - return RegisterClassA(&cls); -} - -static HWND createParentWindow(void) -{ - if (!registerParentWindowClass()) - return NULL; - - return CreateWindowEx(0, "Tab test parent class", - "Tab test parent window", - WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | - WS_MAXIMIZEBOX | WS_VISIBLE, - 0, 0, 100, 100, - GetDesktopWindow(), NULL, GetModuleHandleA(NULL), NULL); -} - -static LRESULT WINAPI tabSubclassProcess(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - WNDPROC oldproc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA); - static LONG defwndproc_counter = 0; - LRESULT ret; - struct message msg; - - /* do not log painting messages */ - if (message != WM_PAINT && - message != WM_ERASEBKGND && - message != WM_NCPAINT && - message != WM_NCHITTEST && - message != WM_GETTEXT && - message != WM_GETICON && - message != WM_DEVICECHANGE) - { - trace("tab: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); - - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - add_message(sequences, TAB_SEQ_INDEX, &msg); - } - - defwndproc_counter++; - ret = CallWindowProcA(oldproc, hwnd, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static HWND createFilledTabControl(HWND parent_wnd, DWORD style, DWORD mask, INT nTabs) -{ - HWND tabHandle; - TCITEM tcNewTab; - WNDPROC oldproc; - RECT rect; - INT i; - - GetClientRect(parent_wnd, &rect); - - tabHandle = CreateWindow ( - WC_TABCONTROLA, - "TestTab", - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | TCS_FOCUSNEVER | style, - 0, 0, rect.right, rect.bottom, - parent_wnd, NULL, NULL, 0); - - assert(tabHandle); - - oldproc = (WNDPROC)SetWindowLongPtrA(tabHandle, GWLP_WNDPROC, (LONG_PTR)tabSubclassProcess); - SetWindowLongPtrA(tabHandle, GWLP_USERDATA, (LONG_PTR)oldproc); - - tcNewTab.mask = mask; - - for (i = 0; i < nTabs; i++) - { - char tabName[MAX_TABLEN]; - - sprintf(tabName, "Tab %d", i+1); - tcNewTab.pszText = tabName; - tcNewTab.iImage = i; - SendMessage (tabHandle, TCM_INSERTITEM, i, (LPARAM) &tcNewTab); - } - - if (winetest_interactive) - { - ShowWindow (tabHandle, SW_SHOW); - RedrawWindow (tabHandle, NULL, 0, RDW_UPDATENOW); - Sleep (1000); - } - - return tabHandle; -} - -static HWND create_tooltip (HWND hTab, char toolTipText[]) -{ - HWND hwndTT; - - TOOLINFO ti; - LPTSTR lptstr = toolTipText; - RECT rect; - - /* Creating a tooltip window*/ - hwndTT = CreateWindowEx( - WS_EX_TOPMOST, - TOOLTIPS_CLASS, - NULL, - WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - hTab, NULL, 0, NULL); - - SetWindowPos( - hwndTT, - HWND_TOPMOST, - 0, 0, 0, 0, - SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); - - GetClientRect (hTab, &rect); - - /* Initialize members of toolinfo*/ - ti.cbSize = sizeof(TOOLINFO); - ti.uFlags = TTF_SUBCLASS; - ti.hwnd = hTab; - ti.hinst = 0; - ti.uId = 0; - ti.lpszText = lptstr; - - ti.rect = rect; - - /* Add toolinfo structure to the tooltip control */ - SendMessage(hwndTT, TTM_ADDTOOL, 0, (LPARAM) &ti); - - return hwndTT; -} - -static void test_tab(INT nMinTabWidth) -{ - HWND hwTab; - RECT rTab; - HIMAGELIST himl = ImageList_Create(21, 21, ILC_COLOR, 3, 4); - SIZE size; - HDC hdc; - HFONT hOldFont; - INT i, dpi, exp; - - hwTab = create_tabcontrol(TCS_FIXEDWIDTH, TCIF_TEXT|TCIF_IMAGE); - SendMessage(hwTab, TCM_SETMINTABWIDTH, 0, nMinTabWidth); - /* Get System default MinTabWidth */ - if (nMinTabWidth < 0) - nMinTabWidth = SendMessage(hwTab, TCM_SETMINTABWIDTH, 0, nMinTabWidth); - - hdc = GetDC(hwTab); - dpi = GetDeviceCaps(hdc, LOGPIXELSX); - hOldFont = SelectObject(hdc, (HFONT)SendMessage(hwTab, WM_GETFONT, 0, 0)); - GetTextExtentPoint32A(hdc, "Tab 1", strlen("Tab 1"), &size); - trace("Tab1 text size: size.cx=%d size.cy=%d\n", size.cx, size.cy); - SelectObject(hdc, hOldFont); - ReleaseDC(hwTab, hdc); - - trace (" TCS_FIXEDWIDTH tabs no icon...\n"); - CheckSize(hwTab, dpi, -1, "default width"); - TabCheckSetSize(hwTab, 50, 20, 50, 20, "set size"); - TabCheckSetSize(hwTab, 0, 1, 0, 1, "min size"); - - SendMessage(hwTab, TCM_SETIMAGELIST, 0, (LPARAM)himl); - - trace (" TCS_FIXEDWIDTH tabs with icon...\n"); - TabCheckSetSize(hwTab, 50, 30, 50, 30, "set size > icon"); - TabCheckSetSize(hwTab, 20, 20, 25, 20, "set size < icon"); - TabCheckSetSize(hwTab, 0, 1, 25, 1, "min size"); - - DestroyWindow (hwTab); - - hwTab = create_tabcontrol(TCS_FIXEDWIDTH | TCS_BUTTONS, TCIF_TEXT|TCIF_IMAGE); - SendMessage(hwTab, TCM_SETMINTABWIDTH, 0, nMinTabWidth); - - hdc = GetDC(hwTab); - dpi = GetDeviceCaps(hdc, LOGPIXELSX); - ReleaseDC(hwTab, hdc); - trace (" TCS_FIXEDWIDTH buttons no icon...\n"); - CheckSize(hwTab, dpi, -1, "default width"); - TabCheckSetSize(hwTab, 20, 20, 20, 20, "set size 1"); - TabCheckSetSize(hwTab, 10, 50, 10, 50, "set size 2"); - TabCheckSetSize(hwTab, 0, 1, 0, 1, "min size"); - - SendMessage(hwTab, TCM_SETIMAGELIST, 0, (LPARAM)himl); - - trace (" TCS_FIXEDWIDTH buttons with icon...\n"); - TabCheckSetSize(hwTab, 50, 30, 50, 30, "set size > icon"); - TabCheckSetSize(hwTab, 20, 20, 25, 20, "set size < icon"); - TabCheckSetSize(hwTab, 0, 1, 25, 1, "min size"); - SendMessage(hwTab, TCM_SETPADDING, 0, MAKELPARAM(4,4)); - TabCheckSetSize(hwTab, 0, 1, 25, 1, "set padding, min size"); - - DestroyWindow (hwTab); - - hwTab = create_tabcontrol(TCS_FIXEDWIDTH | TCS_BOTTOM, TCIF_TEXT|TCIF_IMAGE); - SendMessage(hwTab, TCM_SETMINTABWIDTH, 0, nMinTabWidth); - - hdc = GetDC(hwTab); - dpi = GetDeviceCaps(hdc, LOGPIXELSX); - ReleaseDC(hwTab, hdc); - trace (" TCS_FIXEDWIDTH | TCS_BOTTOM tabs...\n"); - CheckSize(hwTab, dpi, -1, "no icon, default width"); - - TabCheckSetSize(hwTab, 20, 20, 20, 20, "no icon, set size 1"); - TabCheckSetSize(hwTab, 10, 50, 10, 50, "no icon, set size 2"); - TabCheckSetSize(hwTab, 0, 1, 0, 1, "no icon, min size"); - - SendMessage(hwTab, TCM_SETIMAGELIST, 0, (LPARAM)himl); - - TabCheckSetSize(hwTab, 50, 30, 50, 30, "with icon, set size > icon"); - TabCheckSetSize(hwTab, 20, 20, 25, 20, "with icon, set size < icon"); - TabCheckSetSize(hwTab, 0, 1, 25, 1, "with icon, min size"); - SendMessage(hwTab, TCM_SETPADDING, 0, MAKELPARAM(4,4)); - TabCheckSetSize(hwTab, 0, 1, 25, 1, "set padding, min size"); - - DestroyWindow (hwTab); - - hwTab = create_tabcontrol(0, TCIF_TEXT|TCIF_IMAGE); - SendMessage(hwTab, TCM_SETMINTABWIDTH, 0, nMinTabWidth); - - trace (" non fixed width, with text...\n"); - exp = max(size.cx +TAB_PADDING_X*2, (nMinTabWidth < 0) ? DEFAULT_MIN_TAB_WIDTH : nMinTabWidth); - SendMessage( hwTab, TCM_GETITEMRECT, 0, (LPARAM)&rTab ); - ok( rTab.right - rTab.left == exp || broken(rTab.right - rTab.left == DEFAULT_MIN_TAB_WIDTH), - "no icon, default width: Expected width [%d] got [%d]\n", exp, rTab.right - rTab.left ); - - for (i=0; i<8; i++) - { - INT nTabWidth = (nMinTabWidth < 0) ? TabWidthPadded(i, 2) : nMinTabWidth; - - SendMessage(hwTab, TCM_SETIMAGELIST, 0, 0); - SendMessage(hwTab, TCM_SETPADDING, 0, MAKELPARAM(i,i)); - - TabCheckSetSize(hwTab, 50, 20, max(size.cx + i*2, nTabWidth), 20, "no icon, set size"); - TabCheckSetSize(hwTab, 0, 1, max(size.cx + i*2, nTabWidth), 1, "no icon, min size"); - - SendMessage(hwTab, TCM_SETIMAGELIST, 0, (LPARAM)himl); - nTabWidth = (nMinTabWidth < 0) ? TabWidthPadded(i, 3) : nMinTabWidth; - - TabCheckSetSize(hwTab, 50, 30, max(size.cx + 21 + i*3, nTabWidth), 30, "with icon, set size > icon"); - TabCheckSetSize(hwTab, 20, 20, max(size.cx + 21 + i*3, nTabWidth), 20, "with icon, set size < icon"); - TabCheckSetSize(hwTab, 0, 1, max(size.cx + 21 + i*3, nTabWidth), 1, "with icon, min size"); - } - DestroyWindow (hwTab); - - hwTab = create_tabcontrol(0, TCIF_IMAGE); - SendMessage(hwTab, TCM_SETMINTABWIDTH, 0, nMinTabWidth); - - trace (" non fixed width, no text...\n"); - exp = (nMinTabWidth < 0) ? DEFAULT_MIN_TAB_WIDTH : nMinTabWidth; - SendMessage( hwTab, TCM_GETITEMRECT, 0, (LPARAM)&rTab ); - ok( rTab.right - rTab.left == exp || broken(rTab.right - rTab.left == DEFAULT_MIN_TAB_WIDTH), - "no icon, default width: Expected width [%d] got [%d]\n", exp, rTab.right - rTab.left ); - - for (i=0; i<8; i++) - { - INT nTabWidth = (nMinTabWidth < 0) ? TabWidthPadded(i, 2) : nMinTabWidth; - - SendMessage(hwTab, TCM_SETIMAGELIST, 0, 0); - SendMessage(hwTab, TCM_SETPADDING, 0, MAKELPARAM(i,i)); - - TabCheckSetSize(hwTab, 50, 20, nTabWidth, 20, "no icon, set size"); - TabCheckSetSize(hwTab, 0, 1, nTabWidth, 1, "no icon, min size"); - - SendMessage(hwTab, TCM_SETIMAGELIST, 0, (LPARAM)himl); - if (i > 1 && nMinTabWidth > 0 && nMinTabWidth < DEFAULT_MIN_TAB_WIDTH) - nTabWidth += EXTRA_ICON_PADDING *(i-1); - - TabCheckSetSize(hwTab, 50, 30, nTabWidth, 30, "with icon, set size > icon"); - TabCheckSetSize(hwTab, 20, 20, nTabWidth, 20, "with icon, set size < icon"); - TabCheckSetSize(hwTab, 0, 1, nTabWidth, 1, "with icon, min size"); - } - - DestroyWindow (hwTab); - - ImageList_Destroy(himl); - DeleteObject(hFont); -} - -static void test_curfocus(HWND parent_wnd, INT nTabs) -{ - INT focusIndex; - HWND hTab; - - hTab = createFilledTabControl(parent_wnd, TCS_FIXEDWIDTH, TCIF_TEXT|TCIF_IMAGE, nTabs); - ok(hTab != NULL, "Failed to create tab control\n"); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* Testing CurFocus with largest appropriate value */ - SendMessage(hTab, TCM_SETCURFOCUS, nTabs-1, 0); - focusIndex = SendMessage(hTab, TCM_GETCURFOCUS, 0, 0); - expect(nTabs-1, focusIndex); - - /* Testing CurFocus with negative value */ - SendMessage(hTab, TCM_SETCURFOCUS, -10, 0); - focusIndex = SendMessage(hTab, TCM_GETCURFOCUS, 0, 0); - expect(-1, focusIndex); - - /* Testing CurFocus with value larger than number of tabs */ - focusIndex = SendMessage(hTab, TCM_SETCURSEL, 1, 0); - expect(-1, focusIndex); - - SendMessage(hTab, TCM_SETCURFOCUS, nTabs+1, 0); - focusIndex = SendMessage(hTab, TCM_GETCURFOCUS, 0, 0); - expect(1, focusIndex); - - ok_sequence(sequences, TAB_SEQ_INDEX, getset_cur_focus_seq, "Getset curFoc test sequence", FALSE); - - DestroyWindow(hTab); -} - -static void test_cursel(HWND parent_wnd, INT nTabs) -{ - INT selectionIndex; - INT focusIndex; - TCITEM tcItem; - HWND hTab; - - hTab = createFilledTabControl(parent_wnd, TCS_FIXEDWIDTH, TCIF_TEXT|TCIF_IMAGE, nTabs); - ok(hTab != NULL, "Failed to create tab control\n"); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* Testing CurSel with largest appropriate value */ - selectionIndex = SendMessage(hTab, TCM_SETCURSEL, nTabs-1, 0); - expect(0, selectionIndex); - selectionIndex = SendMessage(hTab, TCM_GETCURSEL, 0, 0); - expect(nTabs-1, selectionIndex); - - /* Focus should switch with selection */ - focusIndex = SendMessage(hTab, TCM_GETCURFOCUS, 0, 0); - expect(nTabs-1, focusIndex); - - /* Testing CurSel with negative value */ - SendMessage(hTab, TCM_SETCURSEL, -10, 0); - selectionIndex = SendMessage(hTab, TCM_GETCURSEL, 0, 0); - expect(-1, selectionIndex); - - /* Testing CurSel with value larger than number of tabs */ - selectionIndex = SendMessage(hTab, TCM_SETCURSEL, 1, 0); - expect(-1, selectionIndex); - - selectionIndex = SendMessage(hTab, TCM_SETCURSEL, nTabs+1, 0); - expect(-1, selectionIndex); - selectionIndex = SendMessage(hTab, TCM_GETCURFOCUS, 0, 0); - expect(1, selectionIndex); - - ok_sequence(sequences, TAB_SEQ_INDEX, getset_cur_sel_seq, "Getset curSel test sequence", FALSE); - ok_sequence(sequences, PARENT_SEQ_INDEX, empty_sequence, "Getset curSel test parent sequence", FALSE); - - /* selected item should have TCIS_BUTTONPRESSED state - It doesn't depend on button state */ - memset(&tcItem, 0, sizeof(TCITEM)); - tcItem.mask = TCIF_STATE; - tcItem.dwStateMask = TCIS_BUTTONPRESSED; - selectionIndex = SendMessage(hTab, TCM_GETCURSEL, 0, 0); - SendMessage(hTab, TCM_GETITEM, selectionIndex, (LPARAM) &tcItem); - ok (tcItem.dwState & TCIS_BUTTONPRESSED || broken(tcItem.dwState == 0), /* older comctl32 */ - "Selected item should have TCIS_BUTTONPRESSED\n"); - - DestroyWindow(hTab); -} - -static void test_extendedstyle(HWND parent_wnd, INT nTabs) -{ - DWORD prevExtendedStyle; - DWORD extendedStyle; - HWND hTab; - - hTab = createFilledTabControl(parent_wnd, TCS_FIXEDWIDTH, TCIF_TEXT|TCIF_IMAGE, nTabs); - ok(hTab != NULL, "Failed to create tab control\n"); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* Testing Flat Separators */ - extendedStyle = SendMessage(hTab, TCM_GETEXTENDEDSTYLE, 0, 0); - prevExtendedStyle = SendMessage(hTab, TCM_SETEXTENDEDSTYLE, 0, TCS_EX_FLATSEPARATORS); - expect(extendedStyle, prevExtendedStyle); - - extendedStyle = SendMessage(hTab, TCM_GETEXTENDEDSTYLE, 0, 0); - expect(TCS_EX_FLATSEPARATORS, extendedStyle); - - /* Testing Register Drop */ - prevExtendedStyle = SendMessage(hTab, TCM_SETEXTENDEDSTYLE, 0, TCS_EX_REGISTERDROP); - expect(extendedStyle, prevExtendedStyle); - - extendedStyle = SendMessage(hTab, TCM_GETEXTENDEDSTYLE, 0, 0); - todo_wine{ - expect(TCS_EX_REGISTERDROP, extendedStyle); - } - - ok_sequence(sequences, TAB_SEQ_INDEX, getset_extended_style_seq, "Getset extendedStyle test sequence", FALSE); - ok_sequence(sequences, PARENT_SEQ_INDEX, empty_sequence, "Getset extendedStyle test parent sequence", FALSE); - - DestroyWindow(hTab); -} - -static void test_unicodeformat(HWND parent_wnd, INT nTabs) -{ - INT unicodeFormat; - HWND hTab; - - hTab = createFilledTabControl(parent_wnd, TCS_FIXEDWIDTH, TCIF_TEXT|TCIF_IMAGE, nTabs); - ok(hTab != NULL, "Failed to create tab control\n"); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - unicodeFormat = SendMessage(hTab, TCM_SETUNICODEFORMAT, TRUE, 0); - todo_wine{ - expect(0, unicodeFormat); - } - unicodeFormat = SendMessage(hTab, TCM_GETUNICODEFORMAT, 0, 0); - expect(1, unicodeFormat); - - unicodeFormat = SendMessage(hTab, TCM_SETUNICODEFORMAT, FALSE, 0); - expect(1, unicodeFormat); - unicodeFormat = SendMessage(hTab, TCM_GETUNICODEFORMAT, 0, 0); - expect(0, unicodeFormat); - - unicodeFormat = SendMessage(hTab, TCM_SETUNICODEFORMAT, TRUE, 0); - expect(0, unicodeFormat); - - ok_sequence(sequences, TAB_SEQ_INDEX, getset_unicode_format_seq, "Getset unicodeFormat test sequence", FALSE); - ok_sequence(sequences, PARENT_SEQ_INDEX, empty_sequence, "Getset unicodeFormat test parent sequence", FALSE); - - DestroyWindow(hTab); -} - -static void test_getset_item(HWND parent_wnd, INT nTabs) -{ - TCITEM tcItem; - DWORD ret; - char szText[32] = "New Label"; - HWND hTab; - - hTab = createFilledTabControl(parent_wnd, TCS_FIXEDWIDTH, TCIF_TEXT|TCIF_IMAGE, nTabs); - ok(hTab != NULL, "Failed to create tab control\n"); - - /* passing invalid index should result in initialization to zero - for members mentioned in mask requested */ - - /* valid range here is [0,4] */ - memset(&tcItem, 0xcc, sizeof(tcItem)); - tcItem.mask = TCIF_PARAM; - ret = SendMessage(hTab, TCM_GETITEM, 5, (LPARAM)&tcItem); - expect(FALSE, ret); - ok(tcItem.lParam == 0, "Expected zero lParam, got %lu\n", tcItem.lParam); - - memset(&tcItem, 0xcc, sizeof(tcItem)); - tcItem.mask = TCIF_IMAGE; - ret = SendMessage(hTab, TCM_GETITEM, 5, (LPARAM)&tcItem); - expect(FALSE, ret); - expect(0, tcItem.iImage); - - memset(&tcItem, 0xcc, sizeof(tcItem)); - tcItem.mask = TCIF_TEXT; - tcItem.pszText = szText; - szText[0] = 'a'; - ret = SendMessage(hTab, TCM_GETITEM, 5, (LPARAM)&tcItem); - expect(FALSE, ret); - expect('a', szText[0]); - - memset(&tcItem, 0xcc, sizeof(tcItem)); - tcItem.mask = TCIF_STATE; - tcItem.dwStateMask = 0; - tcItem.dwState = TCIS_BUTTONPRESSED; - ret = SendMessage(hTab, TCM_GETITEM, 5, (LPARAM)&tcItem); - expect(FALSE, ret); - ok(tcItem.dwState == 0, "Expected zero dwState, got %u\n", tcItem.dwState); - - memset(&tcItem, 0xcc, sizeof(tcItem)); - tcItem.mask = TCIF_STATE; - tcItem.dwStateMask = TCIS_BUTTONPRESSED; - tcItem.dwState = TCIS_BUTTONPRESSED; - ret = SendMessage(hTab, TCM_GETITEM, 5, (LPARAM)&tcItem); - expect(FALSE, ret); - ok(tcItem.dwState == 0, "Expected zero dwState\n"); - - /* check with negative index to be sure */ - memset(&tcItem, 0xcc, sizeof(tcItem)); - tcItem.mask = TCIF_PARAM; - ret = SendMessage(hTab, TCM_GETITEM, -1, (LPARAM)&tcItem); - expect(FALSE, ret); - ok(tcItem.lParam == 0, "Expected zero lParam, got %lu\n", tcItem.lParam); - - memset(&tcItem, 0xcc, sizeof(tcItem)); - tcItem.mask = TCIF_PARAM; - ret = SendMessage(hTab, TCM_GETITEM, -2, (LPARAM)&tcItem); - expect(FALSE, ret); - ok(tcItem.lParam == 0, "Expected zero lParam, got %lu\n", tcItem.lParam); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - tcItem.mask = TCIF_TEXT; - tcItem.pszText = &szText[0]; - tcItem.cchTextMax = sizeof(szText); - - strcpy(szText, "New Label"); - ok ( SendMessage(hTab, TCM_SETITEM, 0, (LPARAM) &tcItem), "Setting new item failed.\n"); - ok ( SendMessage(hTab, TCM_GETITEM, 0, (LPARAM) &tcItem), "Getting item failed.\n"); - expect_str("New Label", tcItem.pszText); - - ok ( SendMessage(hTab, TCM_GETITEM, 1, (LPARAM) &tcItem), "Getting item failed.\n"); - expect_str("Tab 2", tcItem.pszText); - - ok_sequence(sequences, TAB_SEQ_INDEX, getset_item_seq, "Getset item test sequence", FALSE); - ok_sequence(sequences, PARENT_SEQ_INDEX, empty_sequence, "Getset item test parent sequence", FALSE); - - /* TCIS_BUTTONPRESSED doesn't depend on tab style */ - memset(&tcItem, 0, sizeof(tcItem)); - tcItem.mask = TCIF_STATE; - tcItem.dwStateMask = TCIS_BUTTONPRESSED; - tcItem.dwState = TCIS_BUTTONPRESSED; - ok ( SendMessage(hTab, TCM_SETITEM, 0, (LPARAM) &tcItem), "Setting new item failed.\n"); - tcItem.dwState = 0; - ok ( SendMessage(hTab, TCM_GETITEM, 0, (LPARAM) &tcItem), "Getting item failed.\n"); - if (tcItem.dwState) - { - ok (tcItem.dwState == TCIS_BUTTONPRESSED, "TCIS_BUTTONPRESSED should be set.\n"); - /* next highlight item, test that dwStateMask actually masks */ - tcItem.mask = TCIF_STATE; - tcItem.dwStateMask = TCIS_HIGHLIGHTED; - tcItem.dwState = TCIS_HIGHLIGHTED; - ok ( SendMessage(hTab, TCM_SETITEM, 0, (LPARAM) &tcItem), "Setting new item failed.\n"); - tcItem.dwState = 0; - ok ( SendMessage(hTab, TCM_GETITEM, 0, (LPARAM) &tcItem), "Getting item failed.\n"); - ok (tcItem.dwState == TCIS_HIGHLIGHTED, "TCIS_HIGHLIGHTED should be set.\n"); - tcItem.mask = TCIF_STATE; - tcItem.dwStateMask = TCIS_BUTTONPRESSED; - tcItem.dwState = 0; - ok ( SendMessage(hTab, TCM_GETITEM, 0, (LPARAM) &tcItem), "Getting item failed.\n"); - ok (tcItem.dwState == TCIS_BUTTONPRESSED, "TCIS_BUTTONPRESSED should be set.\n"); - } - else win_skip( "Item state mask not supported\n" ); - - DestroyWindow(hTab); -} - -static void test_getset_tooltips(HWND parent_wnd, INT nTabs) -{ - HWND hTab, toolTip; - char toolTipText[32] = "ToolTip Text Test"; - - hTab = createFilledTabControl(parent_wnd, TCS_FIXEDWIDTH, TCIF_TEXT|TCIF_IMAGE, nTabs); - ok(hTab != NULL, "Failed to create tab control\n"); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - toolTip = create_tooltip(hTab, toolTipText); - SendMessage(hTab, TCM_SETTOOLTIPS, (LPARAM) toolTip, 0); - ok (toolTip == (HWND) SendMessage(hTab,TCM_GETTOOLTIPS,0,0), "ToolTip was set incorrectly.\n"); - - SendMessage(hTab, TCM_SETTOOLTIPS, 0, 0); - ok (NULL == (HWND) SendMessage(hTab,TCM_GETTOOLTIPS,0,0), "ToolTip was set incorrectly.\n"); - - ok_sequence(sequences, TAB_SEQ_INDEX, getset_tooltip_seq, "Getset tooltip test sequence", TRUE); - ok_sequence(sequences, PARENT_SEQ_INDEX, getset_tooltip_parent_seq, "Getset tooltip test parent sequence", TRUE); - - DestroyWindow(hTab); -} - -static void test_misc(HWND parent_wnd, INT nTabs) -{ - HWND hTab; - RECT rTab; - INT nTabsRetrieved; - INT rowCount; - INT dpi; - HDC hdc; - - ok(parent_wnd != NULL, "no parent window!\n"); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - hTab = createFilledTabControl(parent_wnd, TCS_FIXEDWIDTH, TCIF_TEXT|TCIF_IMAGE, nTabs); - ok(hTab != NULL, "Failed to create tab control\n"); - - if(!winetest_interactive) - ok_sequence(sequences, TAB_SEQ_INDEX, add_tab_to_parent, - "Tab sequence, after adding tab control to parent", TRUE); - else - ok_sequence(sequences, TAB_SEQ_INDEX, add_tab_to_parent_interactive, - "Tab sequence, after adding tab control to parent", TRUE); - - if(!winetest_interactive) - ok_sequence(sequences, PARENT_SEQ_INDEX, add_tab_control_parent_seq, - "Parent after sequence, adding tab control to parent", TRUE); - else - ok_sequence(sequences, PARENT_SEQ_INDEX, add_tab_control_parent_seq_interactive, - "Parent after sequence, adding tab control to parent", TRUE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - ok(SendMessage(hTab, TCM_SETMINTABWIDTH, 0, -1) > 0,"TCM_SETMINTABWIDTH returned < 0\n"); - ok_sequence(sequences, PARENT_SEQ_INDEX, empty_sequence, "Set minTabWidth test parent sequence", FALSE); - - /* Testing GetItemCount */ - flush_sequences(sequences, NUM_MSG_SEQUENCES); - nTabsRetrieved = SendMessage(hTab, TCM_GETITEMCOUNT, 0, 0); - expect(nTabs, nTabsRetrieved); - ok_sequence(sequences, TAB_SEQ_INDEX, get_item_count_seq, "Get itemCount test sequence", FALSE); - ok_sequence(sequences, PARENT_SEQ_INDEX, empty_sequence, "Getset itemCount test parent sequence", FALSE); - - /* Testing GetRowCount */ - flush_sequences(sequences, NUM_MSG_SEQUENCES); - rowCount = SendMessage(hTab, TCM_GETROWCOUNT, 0, 0); - expect(1, rowCount); - ok_sequence(sequences, TAB_SEQ_INDEX, get_row_count_seq, "Get rowCount test sequence", FALSE); - ok_sequence(sequences, PARENT_SEQ_INDEX, empty_sequence, "Get rowCount test parent sequence", FALSE); - - /* Testing GetItemRect */ - flush_sequences(sequences, NUM_MSG_SEQUENCES); - ok(SendMessage(hTab, TCM_GETITEMRECT, 0, (LPARAM) &rTab), "GetItemRect failed.\n"); - - hdc = GetDC(hTab); - dpi = GetDeviceCaps(hdc, LOGPIXELSX); - ReleaseDC(hTab, hdc); - CheckSize(hTab, dpi, -1 , "Default Width"); - ok_sequence(sequences, TAB_SEQ_INDEX, get_item_rect_seq, "Get itemRect test sequence", FALSE); - ok_sequence(sequences, PARENT_SEQ_INDEX, empty_sequence, "Get itemRect test parent sequence", FALSE); - - DestroyWindow(hTab); -} - -static void test_adjustrect(HWND parent_wnd) -{ - HWND hTab; - INT r; - - ok(parent_wnd != NULL, "no parent window!\n"); - - hTab = createFilledTabControl(parent_wnd, TCS_FIXEDWIDTH, 0, 0); - ok(hTab != NULL, "Failed to create tab control\n"); - - r = SendMessage(hTab, TCM_ADJUSTRECT, FALSE, 0); - expect(-1, r); - - r = SendMessage(hTab, TCM_ADJUSTRECT, TRUE, 0); - expect(-1, r); -} - -static void test_insert_focus(HWND parent_wnd) -{ - HWND hTab; - INT nTabsRetrieved; - INT r; - TCITEM tcNewTab; - DWORD mask = TCIF_TEXT|TCIF_IMAGE; - static char tabName[] = "TAB"; - tcNewTab.mask = mask; - tcNewTab.pszText = tabName; - - ok(parent_wnd != NULL, "no parent window!\n"); - - hTab = createFilledTabControl(parent_wnd, TCS_FIXEDWIDTH, mask, 0); - ok(hTab != NULL, "Failed to create tab control\n"); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - nTabsRetrieved = SendMessage(hTab, TCM_GETITEMCOUNT, 0, 0); - expect(0, nTabsRetrieved); - - r = SendMessage(hTab, TCM_GETCURFOCUS, 0, 0); - expect(-1, r); - - tcNewTab.iImage = 1; - r = SendMessage(hTab, TCM_INSERTITEM, 1, (LPARAM) &tcNewTab); - expect(0, r); - - nTabsRetrieved = SendMessage(hTab, TCM_GETITEMCOUNT, 0, 0); - expect(1, nTabsRetrieved); - - r = SendMessage(hTab, TCM_GETCURFOCUS, 0, 0); - expect(0, r); - - tcNewTab.iImage = 2; - r = SendMessage(hTab, TCM_INSERTITEM, 2, (LPARAM) &tcNewTab); - expect(1, r); - - nTabsRetrieved = SendMessage(hTab, TCM_GETITEMCOUNT, 0, 0); - expect(2, nTabsRetrieved); - - r = SendMessage(hTab, TCM_GETCURFOCUS, 0, 0); - expect(0, r); - - r = SendMessage(hTab, TCM_SETCURFOCUS, -1, 0); - expect(0, r); - - r = SendMessage(hTab, TCM_GETCURFOCUS, 0, 0); - expect(-1, r); - - tcNewTab.iImage = 3; - r = SendMessage(hTab, TCM_INSERTITEM, 3, (LPARAM) &tcNewTab); - expect(2, r); - - r = SendMessage(hTab, TCM_GETCURFOCUS, 0, 0); - expect(2, r); - - ok_sequence(sequences, TAB_SEQ_INDEX, insert_focus_seq, "insert_focus test sequence", FALSE); - ok_sequence(sequences, PARENT_SEQ_INDEX, empty_sequence, "insert_focus parent test sequence", TRUE); - - DestroyWindow(hTab); -} - -static void test_delete_focus(HWND parent_wnd) -{ - HWND hTab; - INT nTabsRetrieved; - INT r; - - ok(parent_wnd != NULL, "no parent window!\n"); - - hTab = createFilledTabControl(parent_wnd, TCS_FIXEDWIDTH, TCIF_TEXT|TCIF_IMAGE, 2); - ok(hTab != NULL, "Failed to create tab control\n"); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - nTabsRetrieved = SendMessage(hTab, TCM_GETITEMCOUNT, 0, 0); - expect(2, nTabsRetrieved); - - r = SendMessage(hTab, TCM_GETCURFOCUS, 0, 0); - expect(0, r); - - r = SendMessage(hTab, TCM_DELETEITEM, 1, 0); - expect(1, r); - - nTabsRetrieved = SendMessage(hTab, TCM_GETITEMCOUNT, 0, 0); - expect(1, nTabsRetrieved); - - r = SendMessage(hTab, TCM_GETCURFOCUS, 0, 0); - expect(0, r); - - r = SendMessage(hTab, TCM_SETCURFOCUS, -1, 0); - expect(0, r); - - r = SendMessage(hTab, TCM_GETCURFOCUS, 0, 0); - expect(-1, r); - - r = SendMessage(hTab, TCM_DELETEITEM, 0, 0); - expect(1, r); - - nTabsRetrieved = SendMessage(hTab, TCM_GETITEMCOUNT, 0, 0); - expect(0, nTabsRetrieved); - - r = SendMessage(hTab, TCM_GETCURFOCUS, 0, 0); - expect(-1, r); - - ok_sequence(sequences, TAB_SEQ_INDEX, delete_focus_seq, "delete_focus test sequence", FALSE); - ok_sequence(sequences, PARENT_SEQ_INDEX, empty_sequence, "delete_focus parent test sequence", TRUE); - - DestroyWindow(hTab); -} - -static void test_removeimage(HWND parent_wnd) -{ - static const BYTE bits[32]; - HWND hwTab; - INT i; - TCITEM item; - HICON hicon; - HIMAGELIST himl = ImageList_Create(16, 16, ILC_COLOR, 3, 4); - - hicon = CreateIcon(NULL, 16, 16, 1, 1, bits, bits); - ImageList_AddIcon(himl, hicon); - ImageList_AddIcon(himl, hicon); - ImageList_AddIcon(himl, hicon); - - hwTab = create_tabcontrol(TCS_FIXEDWIDTH, TCIF_TEXT|TCIF_IMAGE); - SendMessage(hwTab, TCM_SETIMAGELIST, 0, (LPARAM)himl); - - memset(&item, 0, sizeof(TCITEM)); - item.mask = TCIF_IMAGE; - - for(i = 0; i < 3; i++) { - SendMessage(hwTab, TCM_GETITEM, i, (LPARAM)&item); - expect(i, item.iImage); - } - - /* remove image middle image */ - SendMessage(hwTab, TCM_REMOVEIMAGE, 1, 0); - expect(2, ImageList_GetImageCount(himl)); - item.iImage = -1; - SendMessage(hwTab, TCM_GETITEM, 0, (LPARAM)&item); - expect(0, item.iImage); - item.iImage = 0; - SendMessage(hwTab, TCM_GETITEM, 1, (LPARAM)&item); - expect(-1, item.iImage); - item.iImage = 0; - SendMessage(hwTab, TCM_GETITEM, 2, (LPARAM)&item); - expect(1, item.iImage); - /* remove first image */ - SendMessage(hwTab, TCM_REMOVEIMAGE, 0, 0); - expect(1, ImageList_GetImageCount(himl)); - item.iImage = 0; - SendMessage(hwTab, TCM_GETITEM, 0, (LPARAM)&item); - expect(-1, item.iImage); - item.iImage = 0; - SendMessage(hwTab, TCM_GETITEM, 1, (LPARAM)&item); - expect(-1, item.iImage); - item.iImage = -1; - SendMessage(hwTab, TCM_GETITEM, 2, (LPARAM)&item); - expect(0, item.iImage); - /* remove the last one */ - SendMessage(hwTab, TCM_REMOVEIMAGE, 0, 0); - expect(0, ImageList_GetImageCount(himl)); - for(i = 0; i < 3; i++) { - item.iImage = 0; - SendMessage(hwTab, TCM_GETITEM, i, (LPARAM)&item); - expect(-1, item.iImage); - } - - DestroyWindow(hwTab); - ImageList_Destroy(himl); - DestroyIcon(hicon); -} - -static void test_delete_selection(HWND parent_wnd) -{ - HWND hTab; - DWORD ret; - - hTab = createFilledTabControl(parent_wnd, TCS_FIXEDWIDTH, TCIF_TEXT|TCIF_IMAGE, 4); - ok(hTab != NULL, "Failed to create tab control\n"); - - ret = SendMessage(hTab, TCM_SETCURSEL, 3, 0); - expect(0, ret); - ret = SendMessage(hTab, TCM_GETCURSEL, 0, 0); - expect(3, ret); - /* delete selected item - selection goes to -1 */ - ret = SendMessage(hTab, TCM_DELETEITEM, 3, 0); - expect(TRUE, ret); - - ret = SendMessage(hTab, TCM_GETCURSEL, 0, 0); - expect(-1, ret); - - DestroyWindow(hTab); -} - -START_TEST(tab) -{ - HWND parent_wnd; - LOGFONTA logfont; - - lstrcpyA(logfont.lfFaceName, "Arial"); - memset(&logfont, 0, sizeof(logfont)); - logfont.lfHeight = -12; - logfont.lfWeight = FW_NORMAL; - logfont.lfCharSet = ANSI_CHARSET; - hFont = CreateFontIndirectA(&logfont); - - InitCommonControls(); - - trace ("Testing with default MinWidth\n"); - test_tab(-1); - trace ("Testing with MinWidth set to -3\n"); - test_tab(-3); - trace ("Testing with MinWidth set to 24\n"); - test_tab(24); - trace ("Testing with MinWidth set to 54\n"); - test_tab(54); - trace ("Testing with MinWidth set to 94\n"); - test_tab(94); - - init_msg_sequences(sequences, NUM_MSG_SEQUENCES); - - parent_wnd = createParentWindow(); - ok(parent_wnd != NULL, "Failed to create parent window!\n"); - - test_curfocus(parent_wnd, 5); - test_cursel(parent_wnd, 5); - test_extendedstyle(parent_wnd, 5); - test_unicodeformat(parent_wnd, 5); - test_getset_item(parent_wnd, 5); - test_getset_tooltips(parent_wnd, 5); - test_misc(parent_wnd, 5); - - test_adjustrect(parent_wnd); - - test_insert_focus(parent_wnd); - test_delete_focus(parent_wnd); - test_delete_selection(parent_wnd); - test_removeimage(parent_wnd); - - DestroyWindow(parent_wnd); -} diff --git a/rostests/winetests/comctl32/testlist.c b/rostests/winetests/comctl32/testlist.c deleted file mode 100644 index 1789e5c4812..00000000000 --- a/rostests/winetests/comctl32/testlist.c +++ /dev/null @@ -1,55 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_comboex(void); -extern void func_datetime(void); -extern void func_dpa(void); -extern void func_header(void); -extern void func_imagelist(void); -extern void func_listview(void); -extern void func_misc(void); -extern void func_monthcal(void); -extern void func_mru(void); -extern void func_progress(void); -extern void func_propsheet(void); -extern void func_rebar(void); -extern void func_status(void); -extern void func_subclass(void); -extern void func_tab(void); -extern void func_toolbar(void); -extern void func_tooltips(void); -extern void func_trackbar(void); -extern void func_treeview(void); -extern void func_updown(void); -extern void func_ipaddress(void); - -const struct test winetest_testlist[] = -{ - { "comboex", func_comboex }, - { "datetime", func_datetime }, - { "dpa", func_dpa }, - { "header", func_header }, - { "imagelist", func_imagelist }, - { "listview", func_listview }, - { "misc", func_misc }, - { "monthcal", func_monthcal }, - { "mru", func_mru }, - { "progress", func_progress }, - { "propsheet", func_propsheet }, - { "rebar", func_rebar }, - { "status", func_status }, - { "subclass", func_subclass }, - { "tab", func_tab }, - { "toolbar", func_toolbar }, - { "tooltips", func_tooltips }, - { "trackbar", func_trackbar }, - { "treeview", func_treeview }, - { "updown", func_updown }, - { "ipaddress", func_ipaddress }, - { 0, 0 } -}; diff --git a/rostests/winetests/comctl32/toolbar.c b/rostests/winetests/comctl32/toolbar.c deleted file mode 100644 index 8311df575ec..00000000000 --- a/rostests/winetests/comctl32/toolbar.c +++ /dev/null @@ -1,1492 +0,0 @@ -/* Unit tests for toolbar. - * - * Copyright 2005 Krzysztof Foltman - * Copyright 2007 Mikolaj Zalewski - * - * 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 "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winnls.h" -#include "winreg.h" -#include "commctrl.h" - -#include "resources.h" - -#include "wine/test.h" - -#include "msg.h" - -#define PARENT_SEQ_INDEX 0 -#define NUM_MSG_SEQUENCES 1 - -static struct msg_sequence *sequences[NUM_MSG_SEQUENCES]; - -static HWND hMainWnd; -static BOOL g_fBlockHotItemChange; -static BOOL g_fReceivedHotItemChange; -static BOOL g_fExpectedHotItemOld; -static BOOL g_fExpectedHotItemNew; -static DWORD g_dwExpectedDispInfoMask; -static BOOL g_ResetDispTextPtr; - -static const struct message ttgetdispinfo_parent_seq[] = { - { WM_NOTIFY, sent|id, 0, 0, TBN_GETINFOTIPA }, - /* next line is todo, currently TTN_GETDISPINFOW is raised here */ - { WM_NOTIFY, sent|id, 0, 0, TTN_GETDISPINFOA }, - { 0 } -}; - -#define expect(EXPECTED,GOT) ok((GOT)==(EXPECTED), "Expected %d, got %d\n", (EXPECTED), (GOT)) - -#define check_rect(name, val, exp) ok(val.top == exp.top && val.bottom == exp.bottom && \ - val.left == exp.left && val.right == exp.right, "invalid rect (" name ") (%d,%d) (%d,%d) - expected (%d,%d) (%d,%d)\n", \ - val.left, val.top, val.right, val.bottom, exp.left, exp.top, exp.right, exp.bottom); - -#define compare(val, exp, format) ok((val) == (exp), #val " value " format " expected " format "\n", (val), (exp)); - -static void MakeButton(TBBUTTON *p, int idCommand, int fsStyle, int nString) { - p->iBitmap = -2; - p->idCommand = idCommand; - p->fsState = TBSTATE_ENABLED; - p->fsStyle = fsStyle; - p->iString = nString; -} - -static LRESULT parent_wnd_notify(LPARAM lParam) -{ - NMHDR *hdr = (NMHDR *)lParam; - NMTBHOTITEM *nmhi; - NMTBDISPINFO *nmdisp; - switch (hdr->code) - { - case TBN_HOTITEMCHANGE: - nmhi = (NMTBHOTITEM *)lParam; - g_fReceivedHotItemChange = TRUE; - if (g_fExpectedHotItemOld != g_fExpectedHotItemNew) - { - compare(nmhi->idOld, g_fExpectedHotItemOld, "%d"); - compare(nmhi->idNew, g_fExpectedHotItemNew, "%d"); - } - if (g_fBlockHotItemChange) - return 1; - break; - - case TBN_GETDISPINFOA: - ok(FALSE, "TBN_GETDISPINFOA received\n"); - break; - - case TBN_GETINFOTIPA: - { - NMTBGETINFOTIPA *tbgit = (NMTBGETINFOTIPA*)lParam; - - if (g_ResetDispTextPtr) - { - tbgit->pszText = NULL; - return 0; - } - break; - } - case TBN_GETDISPINFOW: - nmdisp = (NMTBDISPINFOA *)lParam; - - compare(nmdisp->dwMask, g_dwExpectedDispInfoMask, "%x"); - ok(nmdisp->pszText == NULL, "pszText is not NULL\n"); - break; - } - return 0; -} - -static LRESULT CALLBACK parent_wnd_proc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - static LONG defwndproc_counter = 0; - struct message msg; - LRESULT ret; - - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - if (message == WM_NOTIFY && lParam) msg.id = ((NMHDR*)lParam)->code; - - /* log system messages, except for painting */ - if (message < WM_USER && - message != WM_PAINT && - message != WM_ERASEBKGND && - message != WM_NCPAINT && - message != WM_NCHITTEST && - message != WM_GETTEXT && - message != WM_GETICON && - message != WM_DEVICECHANGE) - { - trace("parent: %p, %04x, %08lx, %08lx\n", hWnd, message, wParam, lParam); - add_message(sequences, PARENT_SEQ_INDEX, &msg); - } - - switch (message) - { - case WM_NOTIFY: - return parent_wnd_notify(lParam); - } - - defwndproc_counter++; - ret = DefWindowProcA(hWnd, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static void basic_test(void) -{ - TBBUTTON buttons[9]; - HWND hToolbar; - int i; - for (i=0; i<9; i++) - MakeButton(buttons+i, 1000+i, TBSTYLE_CHECKGROUP, 0); - MakeButton(buttons+3, 1003, TBSTYLE_SEP|TBSTYLE_GROUP, 0); - MakeButton(buttons+6, 1006, TBSTYLE_SEP, 0); - - hToolbar = CreateToolbarEx(hMainWnd, - WS_VISIBLE | WS_CLIPCHILDREN | CCS_TOP | - WS_CHILD | TBSTYLE_LIST, - 100, - 0, NULL, 0, - buttons, sizeof(buttons)/sizeof(buttons[0]), - 0, 0, 20, 16, sizeof(TBBUTTON)); - ok(hToolbar != NULL, "Toolbar creation\n"); - SendMessage(hToolbar, TB_ADDSTRINGA, 0, (LPARAM)"test\000"); - - /* test for exclusion working inside a separator-separated :-) group */ - SendMessage(hToolbar, TB_CHECKBUTTON, 1000, 1); /* press A1 */ - ok(SendMessage(hToolbar, TB_ISBUTTONCHECKED, 1000, 0), "A1 pressed\n"); - ok(!SendMessage(hToolbar, TB_ISBUTTONCHECKED, 1001, 0), "A2 not pressed\n"); - - SendMessage(hToolbar, TB_CHECKBUTTON, 1004, 1); /* press A5, release A1 */ - ok(SendMessage(hToolbar, TB_ISBUTTONCHECKED, 1004, 0), "A5 pressed\n"); - ok(!SendMessage(hToolbar, TB_ISBUTTONCHECKED, 1000, 0), "A1 not pressed anymore\n"); - - SendMessage(hToolbar, TB_CHECKBUTTON, 1005, 1); /* press A6, release A5 */ - ok(SendMessage(hToolbar, TB_ISBUTTONCHECKED, 1005, 0), "A6 pressed\n"); - ok(!SendMessage(hToolbar, TB_ISBUTTONCHECKED, 1004, 0), "A5 not pressed anymore\n"); - - /* test for inter-group crosstalk, ie. two radio groups interfering with each other */ - SendMessage(hToolbar, TB_CHECKBUTTON, 1007, 1); /* press B2 */ - ok(SendMessage(hToolbar, TB_ISBUTTONCHECKED, 1005, 0), "A6 still pressed, no inter-group crosstalk\n"); - ok(!SendMessage(hToolbar, TB_ISBUTTONCHECKED, 1000, 0), "A1 still not pressed\n"); - ok(SendMessage(hToolbar, TB_ISBUTTONCHECKED, 1007, 0), "B2 pressed\n"); - - SendMessage(hToolbar, TB_CHECKBUTTON, 1000, 1); /* press A1 and ensure B group didn't suffer */ - ok(!SendMessage(hToolbar, TB_ISBUTTONCHECKED, 1005, 0), "A6 not pressed anymore\n"); - ok(SendMessage(hToolbar, TB_ISBUTTONCHECKED, 1000, 0), "A1 pressed\n"); - ok(SendMessage(hToolbar, TB_ISBUTTONCHECKED, 1007, 0), "B2 still pressed\n"); - - SendMessage(hToolbar, TB_CHECKBUTTON, 1008, 1); /* press B3, and ensure A group didn't suffer */ - ok(!SendMessage(hToolbar, TB_ISBUTTONCHECKED, 1005, 0), "A6 pressed\n"); - ok(SendMessage(hToolbar, TB_ISBUTTONCHECKED, 1000, 0), "A1 pressed\n"); - ok(!SendMessage(hToolbar, TB_ISBUTTONCHECKED, 1007, 0), "B2 not pressed\n"); - ok(SendMessage(hToolbar, TB_ISBUTTONCHECKED, 1008, 0), "B3 pressed\n"); - - /* tests with invalid index */ - compare(SendMessage(hToolbar, TB_ISBUTTONCHECKED, 0xdeadbeef, 0), -1L, "%ld"); - compare(SendMessage(hToolbar, TB_ISBUTTONPRESSED, 0xdeadbeef, 0), -1L, "%ld"); - compare(SendMessage(hToolbar, TB_ISBUTTONENABLED, 0xdeadbeef, 0), -1L, "%ld"); - compare(SendMessage(hToolbar, TB_ISBUTTONINDETERMINATE, 0xdeadbeef, 0), -1L, "%ld"); - compare(SendMessage(hToolbar, TB_ISBUTTONHIGHLIGHTED, 0xdeadbeef, 0), -1L, "%ld"); - compare(SendMessage(hToolbar, TB_ISBUTTONHIDDEN, 0xdeadbeef, 0), -1L, "%ld"); - - DestroyWindow(hToolbar); -} - -static void rebuild_toolbar(HWND *hToolbar) -{ - if (*hToolbar) - DestroyWindow(*hToolbar); - *hToolbar = CreateWindowEx(0, TOOLBARCLASSNAME, NULL, WS_CHILD | WS_VISIBLE, 0, 0, 0, 0, - hMainWnd, (HMENU)5, GetModuleHandle(NULL), NULL); - ok(*hToolbar != NULL, "Toolbar creation problem\n"); - ok(SendMessage(*hToolbar, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0) == 0, "TB_BUTTONSTRUCTSIZE failed\n"); - ok(SendMessage(*hToolbar, TB_AUTOSIZE, 0, 0) == 0, "TB_AUTOSIZE failed\n"); - ok(SendMessage(*hToolbar, WM_SETFONT, (WPARAM)GetStockObject(SYSTEM_FONT), 0)==1, "WM_SETFONT\n"); -} - -static void rebuild_toolbar_with_buttons(HWND *hToolbar) -{ - TBBUTTON buttons[5]; - rebuild_toolbar(hToolbar); - - ZeroMemory(&buttons, sizeof(buttons)); - buttons[0].idCommand = 1; - buttons[0].fsStyle = BTNS_BUTTON; - buttons[0].fsState = TBSTATE_ENABLED; - buttons[0].iString = -1; - buttons[1].idCommand = 3; - buttons[1].fsStyle = BTNS_BUTTON; - buttons[1].fsState = TBSTATE_ENABLED; - buttons[1].iString = -1; - buttons[2].idCommand = 5; - buttons[2].fsStyle = BTNS_SEP; - buttons[2].fsState = TBSTATE_ENABLED; - buttons[2].iString = -1; - buttons[3].idCommand = 7; - buttons[3].fsStyle = BTNS_BUTTON; - buttons[3].fsState = TBSTATE_ENABLED; - buttons[3].iString = -1; - buttons[4].idCommand = 9; - buttons[4].fsStyle = BTNS_BUTTON; - buttons[4].fsState = 0; /* disabled */ - buttons[4].iString = -1; - ok(SendMessage(*hToolbar, TB_ADDBUTTONS, 5, (LPARAM)buttons) == 1, "TB_ADDBUTTONS failed\n"); - ok(SendMessage(*hToolbar, TB_AUTOSIZE, 0, 0) == 0, "TB_AUTOSIZE failed\n"); -} - -static void add_128x15_bitmap(HWND hToolbar, int nCmds) -{ - TBADDBITMAP bmp128; - bmp128.hInst = GetModuleHandle(NULL); - bmp128.nID = IDB_BITMAP_128x15; - ok(SendMessageA(hToolbar, TB_ADDBITMAP, nCmds, (LPARAM)&bmp128) == 0, "TB_ADDBITMAP - unexpected return\n"); -} - -#define CHECK_IMAGELIST(count, dx, dy) { \ - int cx, cy; \ - HIMAGELIST himl = (HIMAGELIST)SendMessageA(hToolbar, TB_GETIMAGELIST, 0, 0); \ - ok(himl != NULL, "No image list\n"); \ - if (himl != NULL) {\ - ok(ImageList_GetImageCount(himl) == count, "Images count mismatch - %d vs %d\n", count, ImageList_GetImageCount(himl)); \ - ImageList_GetIconSize(himl, &cx, &cy); \ - ok(cx == dx && cy == dy, "Icon size mismatch - %dx%d vs %dx%d\n", dx, dy, cx, cy); \ - } \ -} - -static void test_add_bitmap(void) -{ - HWND hToolbar = NULL; - TBADDBITMAP bmp128; - TBADDBITMAP bmp80; - TBADDBITMAP stdsmall; - TBADDBITMAP addbmp; - HIMAGELIST himl; - INT ret; - - /* empty 128x15 bitmap */ - bmp128.hInst = GetModuleHandle(NULL); - bmp128.nID = IDB_BITMAP_128x15; - - /* empty 80x15 bitmap */ - bmp80.hInst = GetModuleHandle(NULL); - bmp80.nID = IDB_BITMAP_80x15; - - /* standard bitmap - 240x15 pixels */ - stdsmall.hInst = HINST_COMMCTRL; - stdsmall.nID = IDB_STD_SMALL_COLOR; - - rebuild_toolbar(&hToolbar); - ok(SendMessageA(hToolbar, TB_ADDBITMAP, 8, (LPARAM)&bmp128) == 0, "TB_ADDBITMAP - unexpected return\n"); - CHECK_IMAGELIST(8, 16, 16); - - /* adding more bitmaps */ - ok(SendMessageA(hToolbar, TB_ADDBITMAP, 5, (LPARAM)&bmp80) == 8, "TB_ADDBITMAP - unexpected return\n"); - CHECK_IMAGELIST(13, 16, 16); - /* adding the same bitmap will simply return the index of the already loaded block */ - ret = SendMessageA(hToolbar, TB_ADDBITMAP, 8, (LPARAM)&bmp128); - ok(ret == 0, "TB_ADDBITMAP - unexpected return %d\n", ret); - CHECK_IMAGELIST(13, 16, 16); - ret = SendMessageA(hToolbar, TB_ADDBITMAP, 5, (LPARAM)&bmp80); - ok(ret == 8, "TB_ADDBITMAP - unexpected return %d\n", ret); - CHECK_IMAGELIST(13, 16, 16); - /* even if we increase the wParam */ - ret = SendMessageA(hToolbar, TB_ADDBITMAP, 55, (LPARAM)&bmp80); - ok(ret == 8, "TB_ADDBITMAP - unexpected return %d\n", ret); - CHECK_IMAGELIST(13, 16, 16); - - /* when the wParam is smaller than the bitmaps count but non-zero, all the bitmaps will be added*/ - rebuild_toolbar(&hToolbar); - ok(SendMessageA(hToolbar, TB_ADDBITMAP, 3, (LPARAM)&bmp128) == 0, "TB_ADDBITMAP - unexpected return\n"); - CHECK_IMAGELIST(8, 16, 16); - ret = SendMessageA(hToolbar, TB_ADDBITMAP, 5, (LPARAM)&bmp80); - ok(ret == 3, "TB_ADDBITMAP - unexpected return %d\n", ret); - /* the returned value is misleading - id 8 is the id of the first icon from bmp80 */ - CHECK_IMAGELIST(13, 16, 16); - - /* the same for negative wParam */ - rebuild_toolbar(&hToolbar); - ret = SendMessageA(hToolbar, TB_ADDBITMAP, -143, (LPARAM)&bmp128); - ok(ret == 0, "TB_ADDBITMAP - unexpected return %d\n", ret); - CHECK_IMAGELIST(8, 16, 16); - ret = SendMessageA(hToolbar, TB_ADDBITMAP, 1, (LPARAM)&bmp80); - ok(ret == -143, "TB_ADDBITMAP - unexpected return %d\n", ret); - CHECK_IMAGELIST(13, 16, 16); - - /* for zero only one bitmap will be added */ - rebuild_toolbar(&hToolbar); - ret = SendMessageA(hToolbar, TB_ADDBITMAP, 0, (LPARAM)&bmp80); - ok(ret == 0, "TB_ADDBITMAP - unexpected return %d\n", ret); - CHECK_IMAGELIST(1, 16, 16); - - /* if wParam is larger than the amount of icons, the list is grown */ - rebuild_toolbar(&hToolbar); - ok(SendMessageA(hToolbar, TB_ADDBITMAP, 100, (LPARAM)&bmp80) == 0, "TB_ADDBITMAP - unexpected return\n"); - CHECK_IMAGELIST(100, 16, 16); - ret = SendMessageA(hToolbar, TB_ADDBITMAP, 100, (LPARAM)&bmp128); - ok(ret == 100, "TB_ADDBITMAP - unexpected return %d\n", ret); - CHECK_IMAGELIST(200, 16, 16); - - /* adding built-in items - the wParam is ignored */ - rebuild_toolbar(&hToolbar); - ok(SendMessageA(hToolbar, TB_ADDBITMAP, 5, (LPARAM)&bmp80) == 0, "TB_ADDBITMAP - unexpected return\n"); - CHECK_IMAGELIST(5, 16, 16); - ok(SendMessageA(hToolbar, TB_ADDBITMAP, 0, (LPARAM)&stdsmall) == 5, "TB_ADDBITMAP - unexpected return\n"); - CHECK_IMAGELIST(20, 16, 16); - ok(SendMessageA(hToolbar, TB_ADDBITMAP, 5, (LPARAM)&bmp128) == 20, "TB_ADDBITMAP - unexpected return\n"); - CHECK_IMAGELIST(28, 16, 16); - - /* when we increase the bitmap size, less icons will be created */ - rebuild_toolbar(&hToolbar); - ok(SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELONG(20, 20)) == TRUE, "TB_SETBITMAPSIZE failed\n"); - ok(SendMessageA(hToolbar, TB_ADDBITMAP, 1, (LPARAM)&bmp128) == 0, "TB_ADDBITMAP - unexpected return\n"); - CHECK_IMAGELIST(6, 20, 20); - ret = SendMessageA(hToolbar, TB_ADDBITMAP, 1, (LPARAM)&bmp80); - ok(ret == 1, "TB_ADDBITMAP - unexpected return %d\n", ret); - CHECK_IMAGELIST(10, 20, 20); - /* the icons can be resized - an UpdateWindow is needed as this probably happens during WM_PAINT */ - ok(SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELONG(8, 8)) == TRUE, "TB_SETBITMAPSIZE failed\n"); - UpdateWindow(hToolbar); - CHECK_IMAGELIST(26, 8, 8); - /* loading a standard bitmaps automatically resizes the icons */ - ok(SendMessageA(hToolbar, TB_ADDBITMAP, 1, (LPARAM)&stdsmall) == 2, "TB_ADDBITMAP - unexpected return\n"); - UpdateWindow(hToolbar); - CHECK_IMAGELIST(28, 16, 16); - - /* two more SETBITMAPSIZE tests */ - rebuild_toolbar(&hToolbar); - ok(SendMessageA(hToolbar, TB_ADDBITMAP, 100, (LPARAM)&bmp128) == 0, "TB_ADDBITMAP - unexpected return\n"); - CHECK_IMAGELIST(100, 16, 16); - ok(SendMessageA(hToolbar, TB_ADDBITMAP, 100, (LPARAM)&bmp80) == 100, "TB_ADDBITMAP - unexpected return\n"); - CHECK_IMAGELIST(200, 16, 16); - ok(SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELONG(8, 8)) == TRUE, "TB_SETBITMAPSIZE failed\n"); - UpdateWindow(hToolbar); - CHECK_IMAGELIST(200, 8, 8); - ok(SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELONG(30, 30)) == TRUE, "TB_SETBITMAPSIZE failed\n"); - UpdateWindow(hToolbar); - CHECK_IMAGELIST(200, 30, 30); - rebuild_toolbar(&hToolbar); - ok(SendMessageA(hToolbar, TB_ADDBITMAP, 5, (LPARAM)&bmp128) == 0, "TB_ADDBITMAP - unexpected return\n"); - CHECK_IMAGELIST(8, 16, 16); - ok(SendMessageA(hToolbar, TB_ADDBITMAP, 3, (LPARAM)&bmp80) == 5, "TB_ADDBITMAP - unexpected return\n"); - CHECK_IMAGELIST(13, 16, 16); - ok(SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELONG(30, 30)) == TRUE, "TB_SETBITMAPSIZE failed\n"); - UpdateWindow(hToolbar); - CHECK_IMAGELIST(8, 30, 30); - /* when the width or height is zero, set it to 1 */ - ok(SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELONG(0, 0)) == TRUE, "TB_SETBITMAPSIZE failed\n"); - UpdateWindow(hToolbar); - CHECK_IMAGELIST(208, 1, 1); - ok(SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELONG(0, 5)) == TRUE, "TB_SETBITMAPSIZE failed\n"); - UpdateWindow(hToolbar); - CHECK_IMAGELIST(208, 1, 5); - ok(SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELONG(5, 0)) == TRUE, "TB_SETBITMAPSIZE failed\n"); - UpdateWindow(hToolbar); - CHECK_IMAGELIST(41, 5, 1); - - /* the control can add bitmaps to an existing image list */ - rebuild_toolbar(&hToolbar); - himl = ImageList_LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_BITMAP_80x15), 20, 2, CLR_NONE, IMAGE_BITMAP, LR_DEFAULTCOLOR); - ok(himl != NULL, "failed to create imagelist\n"); - ok(SendMessageA(hToolbar, TB_SETIMAGELIST, 0, (LPARAM)himl) == 0, "TB_SETIMAGELIST failed\n"); - CHECK_IMAGELIST(4, 20, 15); - ok(SendMessageA(hToolbar, TB_ADDBITMAP, 1, (LPARAM)&bmp128) == 0, "TB_ADDBITMAP - unexpected return\n"); - CHECK_IMAGELIST(10, 20, 15); - /* however TB_SETBITMAPSIZE/add std bitmap won't change the image size (the button size does change) */ - ok(SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELONG(8, 8)) == TRUE, "TB_SETBITMAPSIZE failed\n"); - UpdateWindow(hToolbar); - compare((int)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(15, 14), "%x"); - CHECK_IMAGELIST(10, 20, 15); - ok(SendMessageA(hToolbar, TB_ADDBITMAP, 0, (LPARAM)&stdsmall) == 1, "TB_SETBITMAPSIZE failed\n"); - UpdateWindow(hToolbar); - compare((int)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(23, 22), "%x"); - CHECK_IMAGELIST(22, 20, 15); - - /* check standard bitmaps */ - addbmp.hInst = HINST_COMMCTRL; - addbmp.nID = IDB_STD_SMALL_COLOR; - rebuild_toolbar(&hToolbar); - ImageList_Destroy(himl); - - ok(SendMessageA(hToolbar, TB_ADDBITMAP, 1, (LPARAM)&addbmp) == 0, "TB_ADDBITMAP - unexpected return\n"); - CHECK_IMAGELIST(15, 16, 16); - compare((int)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(23, 22), "%x"); - addbmp.nID = IDB_STD_LARGE_COLOR; - rebuild_toolbar(&hToolbar); - ok(SendMessageA(hToolbar, TB_ADDBITMAP, 1, (LPARAM)&addbmp) == 0, "TB_ADDBITMAP - unexpected return\n"); - CHECK_IMAGELIST(15, 24, 24); - compare((int)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(31, 30), "%x"); - - addbmp.nID = IDB_VIEW_SMALL_COLOR; - rebuild_toolbar(&hToolbar); - ok(SendMessageA(hToolbar, TB_ADDBITMAP, 1, (LPARAM)&addbmp) == 0, "TB_ADDBITMAP - unexpected return\n"); - CHECK_IMAGELIST(12, 16, 16); - addbmp.nID = IDB_VIEW_LARGE_COLOR; - rebuild_toolbar(&hToolbar); - ok(SendMessageA(hToolbar, TB_ADDBITMAP, 1, (LPARAM)&addbmp) == 0, "TB_ADDBITMAP - unexpected return\n"); - CHECK_IMAGELIST(12, 24, 24); - - addbmp.nID = IDB_HIST_SMALL_COLOR; - rebuild_toolbar(&hToolbar); - ok(SendMessageA(hToolbar, TB_ADDBITMAP, 1, (LPARAM)&addbmp) == 0, "TB_ADDBITMAP - unexpected return\n"); - CHECK_IMAGELIST(5, 16, 16); - addbmp.nID = IDB_HIST_LARGE_COLOR; - rebuild_toolbar(&hToolbar); - ok(SendMessageA(hToolbar, TB_ADDBITMAP, 1, (LPARAM)&addbmp) == 0, "TB_ADDBITMAP - unexpected return\n"); - CHECK_IMAGELIST(5, 24, 24); - - - DestroyWindow(hToolbar); -} - -#define CHECK_STRING_TABLE(count, tab) { \ - INT _i; \ - CHAR _buf[260]; \ - for (_i = 0; _i < (count); _i++) {\ - ret = SendMessageA(hToolbar, TB_GETSTRING, MAKEWPARAM(260, _i), (LPARAM)_buf); \ - ok(ret >= 0, "TB_GETSTRING - unexpected return %d while checking string %d\n", ret, _i); \ - if (ret >= 0) \ - ok(strcmp(_buf, (tab)[_i]) == 0, "Invalid string #%d - '%s' vs '%s'\n", _i, (tab)[_i], _buf); \ - } \ - ok(SendMessageA(hToolbar, TB_GETSTRING, MAKEWPARAM(260, (count)), (LPARAM)_buf) == -1, \ - "Too many strings in table\n"); \ - } - -static void test_add_string(void) -{ - LPCSTR test1 = "a\0b\0"; - LPCSTR test2 = "|a|b||\0"; - LPCSTR ret1[] = {"a", "b"}; - LPCSTR ret2[] = {"a", "b", "|a|b||"}; - LPCSTR ret3[] = {"a", "b", "|a|b||", "p", "q"}; - LPCSTR ret4[] = {"a", "b", "|a|b||", "p", "q", "p"}; - LPCSTR ret5[] = {"a", "b", "|a|b||", "p", "q", "p", "p", "q"}; - LPCSTR ret6[] = {"a", "b", "|a|b||", "p", "q", "p", "p", "q", "p", "", "q"}; - LPCSTR ret7[] = {"a", "b", "|a|b||", "p", "q", "p", "p", "q", "p", "", "q", "br", "c", "d"}; - HWND hToolbar = NULL; - TBBUTTON button; - int ret; - CHAR buf[260]; - - rebuild_toolbar(&hToolbar); - ret = SendMessageA(hToolbar, TB_ADDSTRINGA, 0, (LPARAM)test1); - ok(ret == 0, "TB_ADDSTRINGA - unexpected return %d\n", ret); - ret = SendMessageA(hToolbar, TB_GETSTRING, MAKEWPARAM(260, 1), (LPARAM)buf); - if (ret == 0) - { - win_skip("TB_GETSTRING needs 5.80\n"); - return; - } - CHECK_STRING_TABLE(2, ret1); - ret = SendMessageA(hToolbar, TB_ADDSTRINGA, 0, (LPARAM)test2); - ok(ret == 2, "TB_ADDSTRINGA - unexpected return %d\n", ret); - CHECK_STRING_TABLE(3, ret2); - - ret = SendMessageA(hToolbar, TB_ADDSTRINGA, (WPARAM)GetModuleHandle(NULL), IDS_TBADD1); - ok(ret == 3, "TB_ADDSTRINGA - unexpected return %d\n", ret); - CHECK_STRING_TABLE(3, ret2); - ret = SendMessageA(hToolbar, TB_ADDSTRINGA, (WPARAM)GetModuleHandle(NULL), IDS_TBADD2); - ok(ret == 3, "TB_ADDSTRINGA - unexpected return %d\n", ret); - CHECK_STRING_TABLE(5, ret3); - ret = SendMessageA(hToolbar, TB_ADDSTRINGA, (WPARAM)GetModuleHandle(NULL), IDS_TBADD3); - ok(ret == 5, "TB_ADDSTRINGA - unexpected return %d\n", ret); - CHECK_STRING_TABLE(6, ret4); - ret = SendMessageA(hToolbar, TB_ADDSTRINGA, (WPARAM)GetModuleHandle(NULL), IDS_TBADD4); - ok(ret == 6, "TB_ADDSTRINGA - unexpected return %d\n", ret); - CHECK_STRING_TABLE(8, ret5); - ret = SendMessageA(hToolbar, TB_ADDSTRINGA, (WPARAM)GetModuleHandle(NULL), IDS_TBADD5); - ok(ret == 8, "TB_ADDSTRINGA - unexpected return %d\n", ret); - CHECK_STRING_TABLE(11, ret6); - ret = SendMessageA(hToolbar, TB_ADDSTRINGA, (WPARAM)GetModuleHandle(NULL), IDS_TBADD7); - ok(ret == 11, "TB_ADDSTRINGA - unexpected return %d\n", ret); - CHECK_STRING_TABLE(14, ret7); - - ZeroMemory(&button, sizeof(button)); - button.iString = (UINT_PTR)"Test"; - SendMessageA(hToolbar, TB_INSERTBUTTONA, 0, (LPARAM)&button); - CHECK_STRING_TABLE(14, ret7); - SendMessageA(hToolbar, TB_ADDBUTTONSA, 1, (LPARAM)&button); - CHECK_STRING_TABLE(14, ret7); - - DestroyWindow(hToolbar); -} - -static void expect_hot_notify(int idold, int idnew) -{ - g_fExpectedHotItemOld = idold; - g_fExpectedHotItemNew = idnew; - g_fReceivedHotItemChange = FALSE; -} - -#define check_hot_notify() \ - ok(g_fReceivedHotItemChange, "TBN_HOTITEMCHANGE not received\n"); \ - g_fExpectedHotItemOld = g_fExpectedHotItemNew = 0; - -static void test_hotitem(void) -{ - HWND hToolbar = NULL; - TBBUTTONINFO tbinfo; - LRESULT ret; - - g_fBlockHotItemChange = FALSE; - - rebuild_toolbar_with_buttons(&hToolbar); - /* set TBSTYLE_FLAT. comctl5 allows hot items only for such toolbars. - * comctl6 doesn't have this requirement even when theme == NULL */ - SetWindowLong(hToolbar, GWL_STYLE, TBSTYLE_FLAT | GetWindowLong(hToolbar, GWL_STYLE)); - ret = SendMessage(hToolbar, TB_GETHOTITEM, 0, 0); - ok(ret == -1, "Hot item: %ld, expected -1\n", ret); - ret = SendMessage(hToolbar, TB_SETHOTITEM, 1, 0); - ok(ret == -1, "TB_SETHOTITEM returned %ld, expected -1\n", ret); - ret = SendMessage(hToolbar, TB_GETHOTITEM, 0, 0); - ok(ret == 1, "Hot item: %ld, expected 1\n", ret); - ret = SendMessage(hToolbar, TB_SETHOTITEM, 2, 0); - ok(ret == 1, "TB_SETHOTITEM returned %ld, expected 1\n", ret); - - ret = SendMessage(hToolbar, TB_SETHOTITEM, 0xbeef, 0); - ok(ret == 2, "TB_SETHOTITEM returned %ld, expected 2\n", ret); - ret = SendMessage(hToolbar, TB_GETHOTITEM, 0, 0); - ok(ret == 2, "Hot item: %lx, expected 2\n", ret); - ret = SendMessage(hToolbar, TB_SETHOTITEM, -0xbeef, 0); - ok(ret == 2, "TB_SETHOTITEM returned %ld, expected 2\n", ret); - ret = SendMessage(hToolbar, TB_GETHOTITEM, 0, 0); - ok(ret == -1, "Hot item: %lx, expected -1\n", ret); - - expect_hot_notify(0, 7); - ret = SendMessage(hToolbar, TB_SETHOTITEM, 3, 0); - ok(ret == -1, "TB_SETHOTITEM returned %ld, expected -1\n", ret); - check_hot_notify(); - ret = SendMessage(hToolbar, TB_GETHOTITEM, 0, 0); - ok(ret == 3, "Hot item: %lx, expected 3\n", ret); - g_fBlockHotItemChange = TRUE; - ret = SendMessage(hToolbar, TB_SETHOTITEM, 2, 0); - ok(ret == 3, "TB_SETHOTITEM returned %ld, expected 2\n", ret); - ret = SendMessage(hToolbar, TB_GETHOTITEM, 0, 0); - ok(ret == 3, "Hot item: %lx, expected 3\n", ret); - g_fBlockHotItemChange = FALSE; - - g_fReceivedHotItemChange = FALSE; - ret = SendMessage(hToolbar, TB_SETHOTITEM, 0xbeaf, 0); - ok(ret == 3, "TB_SETHOTITEM returned %ld, expected 3\n", ret); - ok(g_fReceivedHotItemChange == FALSE, "TBN_HOTITEMCHANGE received for invalid parameter\n"); - - g_fReceivedHotItemChange = FALSE; - ret = SendMessage(hToolbar, TB_SETHOTITEM, 3, 0); - ok(ret == 3, "TB_SETHOTITEM returned %ld, expected 3\n", ret); - ok(g_fReceivedHotItemChange == FALSE, "TBN_HOTITEMCHANGE received after a duplication\n"); - - expect_hot_notify(7, 0); - ret = SendMessage(hToolbar, TB_SETHOTITEM, -0xbeaf, 0); - ok(ret == 3, "TB_SETHOTITEM returned %ld, expected 3\n", ret); - check_hot_notify(); - SendMessage(hToolbar, TB_SETHOTITEM, 3, 0); - - /* setting disabled buttons will generate a notify with the button id but no button will be hot */ - expect_hot_notify(7, 9); - ret = SendMessage(hToolbar, TB_SETHOTITEM, 4, 0); - ok(ret == 3, "TB_SETHOTITEM returned %ld, expected 3\n", ret); - check_hot_notify(); - ret = SendMessage(hToolbar, TB_GETHOTITEM, 0, 0); - ok(ret == -1, "Hot item: %lx, expected -1\n", ret); - /* enabling the button won't change that */ - SendMessage(hToolbar, TB_ENABLEBUTTON, 9, TRUE); - ret = SendMessage(hToolbar, TB_GETHOTITEM, 0, 0); - ok(ret == -1, "TB_SETHOTITEM returned %ld, expected -1\n", ret); - - /* disabling a hot button works */ - ret = SendMessage(hToolbar, TB_SETHOTITEM, 3, 0); - ok(ret == -1, "TB_SETHOTITEM returned %ld, expected -1\n", ret); - g_fReceivedHotItemChange = FALSE; - SendMessage(hToolbar, TB_ENABLEBUTTON, 7, FALSE); - ret = SendMessage(hToolbar, TB_GETHOTITEM, 0, 0); - ok(ret == 3, "TB_SETHOTITEM returned %ld, expected 3\n", ret); - ok(g_fReceivedHotItemChange == FALSE, "Unexpected TBN_HOTITEMCHANGE\n"); - - SendMessage(hToolbar, TB_SETHOTITEM, 1, 0); - tbinfo.cbSize = sizeof(TBBUTTONINFO); - tbinfo.dwMask = TBIF_STATE; - tbinfo.fsState = 0; /* disabled */ - g_fReceivedHotItemChange = FALSE; - ok(SendMessage(hToolbar, TB_SETBUTTONINFO, 1, (LPARAM)&tbinfo) == TRUE, "TB_SETBUTTONINFO failed\n"); - ret = SendMessage(hToolbar, TB_GETHOTITEM, 0, 0); - ok(ret == 1, "TB_SETHOTITEM returned %ld, expected 1\n", ret); - ok(g_fReceivedHotItemChange == FALSE, "Unexpected TBN_HOTITEMCHANGE\n"); - - DestroyWindow(hToolbar); -} - -#if 0 /* use this to generate more tests*/ - -static void dump_sizes(HWND hToolbar) -{ - SIZE sz; - RECT r; - int count = SendMessage(hToolbar, TB_BUTTONCOUNT, 0, 0); - int i; - - GetClientRect(hToolbar, &r); - SendMessageA(hToolbar, TB_GETMAXSIZE, 0, &sz); - printf(" { {%d, %d, %d, %d}, {%d, %d}, %d, {", r.left, r.top, r.right, r.bottom, - sz.cx, sz.cy, count); - for (i=0; ircClient);*/ \ - buttonCount = SendMessage(hToolbar, TB_BUTTONCOUNT, 0, 0); \ - compare(buttonCount, res->nButtons, "%d"); \ - for (i=0; inButtons); i++) { \ - ok(SendMessageA(hToolbar, TB_GETITEMRECT, i, (LPARAM)&rc) == 1, "TB_GETITEMRECT\n"); \ - if (broken(tbsize_alt_numtests < sizeof(tbsize_alt_results)/sizeof(tbsize_alt_results[0]) && \ - memcmp(&rc, &tbsize_alt_results[tbsize_alt_numtests].rcButton, sizeof(RECT)) == 0)) { \ - win_skip("Alternate rect found\n"); \ - tbsize_alt_numtests++; \ - } else if (!(mask&1)) { \ - check_rect("button", rc, res->rcButtons[i]); \ - } else {\ - todo_wine { check_rect("button", rc, res->rcButtons[i]); } \ - } \ - mask >>= 1; \ - } \ - tbsize_numtests++; \ - } - -#define check_sizes() check_sizes_todo(0) - -#endif - -static TBBUTTON buttons1[] = { - {0, 10, TBSTATE_WRAP|TBSTATE_ENABLED, 0, {0, }, 0, -1}, - {0, 11, 0, 0, {0, }, 0, -1}, -}; -static TBBUTTON buttons2[] = { - {0, 20, TBSTATE_ENABLED, 0, {0, }, 0, -1}, - {0, 21, TBSTATE_ENABLED, 0, {0, }, 0, -1}, -}; -static TBBUTTON buttons3[] = { - {0, 30, TBSTATE_ENABLED, 0, {0, }, 0, 0}, - {0, 31, TBSTATE_ENABLED, 0, {0, }, 0, 1}, - {0, 32, TBSTATE_ENABLED, BTNS_AUTOSIZE, {0, }, 0, 1}, - {0, 33, TBSTATE_ENABLED, BTNS_AUTOSIZE, {0, }, 0, (UINT_PTR)"Tst"} -}; - -static void test_sizes(void) -{ - HWND hToolbar = NULL; - HIMAGELIST himl, himl2; - TBBUTTONINFO tbinfo; - int style; - int i; - - rebuild_toolbar_with_buttons(&hToolbar); - style = GetWindowLong(hToolbar, GWL_STYLE); - ok(style == (WS_CHILD|WS_VISIBLE|CCS_TOP), "Invalid style %x\n", style); - check_sizes(); - /* the TBSTATE_WRAP makes a second row */ - SendMessageA(hToolbar, TB_ADDBUTTONS, 2, (LPARAM)buttons1); - check_sizes(); - SendMessageA(hToolbar, TB_AUTOSIZE, 0, 0); - check_sizes(); - /* after setting the TBSTYLE_WRAPABLE the TBSTATE_WRAP is ignored */ - SetWindowLong(hToolbar, GWL_STYLE, style|TBSTYLE_WRAPABLE); - check_sizes(); - /* adding new buttons with TBSTYLE_WRAPABLE doesn't add a new row */ - SendMessageA(hToolbar, TB_ADDBUTTONS, 2, (LPARAM)buttons1); - check_sizes(); - /* only after adding enough buttons the bar will be wrapped on a - * separator and then on the first button */ - for (i=0; i<15; i++) - SendMessageA(hToolbar, TB_ADDBUTTONS, 2, (LPARAM)buttons1); - check_sizes_todo(0x4); - - rebuild_toolbar_with_buttons(&hToolbar); - SendMessageA(hToolbar, TB_ADDBUTTONS, 2, (LPARAM)buttons1); - /* setting the buttons vertical will only change the window client size */ - SetWindowLong(hToolbar, GWL_STYLE, style | CCS_VERT); - SendMessage(hToolbar, TB_AUTOSIZE, 0, 0); - check_sizes_todo(0x3c); - /* with a TBSTYLE_WRAPABLE a wrapping will occur on the separator */ - SetWindowLong(hToolbar, GWL_STYLE, style | TBSTYLE_WRAPABLE | CCS_VERT); - SendMessage(hToolbar, TB_AUTOSIZE, 0, 0); - check_sizes_todo(0x7c); - - rebuild_toolbar_with_buttons(&hToolbar); - SendMessageA(hToolbar, TB_ADDBUTTONS, 2, (LPARAM)buttons1); - /* a TB_SETBITMAPSIZE changes button sizes*/ - SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELONG(24, 24)); - check_sizes(); - - /* setting a TBSTYLE_FLAT doesn't change anything - even after a TB_AUTOSIZE */ - SetWindowLong(hToolbar, GWL_STYLE, style | TBSTYLE_FLAT); - SendMessageA(hToolbar, TB_AUTOSIZE, 0, 0); - check_sizes(); - /* but after a TB_SETBITMAPSIZE the top margins is changed */ - SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELONG(20, 20)); - SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELONG(24, 24)); - check_sizes(); - /* some vertical toolbar sizes */ - SetWindowLong(hToolbar, GWL_STYLE, style | TBSTYLE_FLAT | TBSTYLE_WRAPABLE | CCS_VERT); - check_sizes_todo(0x7c); - - rebuild_toolbar_with_buttons(&hToolbar); - SetWindowLong(hToolbar, GWL_STYLE, style | TBSTYLE_FLAT); - /* newly added buttons will be use the previous margin */ - SendMessageA(hToolbar, TB_ADDBUTTONS, 2, (LPARAM)buttons2); - check_sizes(); - /* TB_SETBUTTONSIZE can't be used to reduce the size of a button below the default */ - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(23, 22), "Unexpected button size\n"); - ok(SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELONG(22, 21))==1, "TB_SETBUTTONSIZE\n"); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(23, 22), "Unexpected button size\n"); - ok(SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELONG(5, 100))==1, "TB_SETBUTTONSIZE\n"); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(23, 100), "Unexpected button size\n"); - ok(SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELONG(3, 3))==1, "TB_SETBUTTONSIZE\n"); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(23, 22), "Unexpected button size\n"); - ok(SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELONG(5, 100))==1, "TB_SETBUTTONSIZE\n"); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(23, 100), "Unexpected button size\n"); - check_sizes(); - /* add some buttons with non-default sizes */ - SendMessageA(hToolbar, TB_ADDBUTTONS, 2, (LPARAM)buttons2); - SendMessageA(hToolbar, TB_INSERTBUTTON, -1, (LPARAM)&buttons2[0]); - check_sizes(); - SendMessageA(hToolbar, TB_ADDBUTTONS, 1, (LPARAM)&buttons3[0]); - /* TB_ADDSTRING resets the size */ - SendMessageA(hToolbar, TB_ADDSTRING, 0, (LPARAM)"A\0MMMMMMMMMMMMM\0"); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(23, 39), "Unexpected button size\n"); - check_sizes(); - /* TB_SETBUTTONSIZE can be used to crop the text */ - SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELONG(3, 3)); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(23, 22), "Unexpected button size\n"); - check_sizes(); - /* the default size is bitmap size + padding */ - SendMessageA(hToolbar, TB_SETPADDING, 0, MAKELONG(1, 1)); - SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELONG(3, 3)); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(17, 17), "Unexpected button size\n"); - SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELONG(3, 3)); - SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELONG(3, 3)); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(4, 4), "Unexpected button size\n"); - - rebuild_toolbar(&hToolbar); - /* sending a TB_SETBITMAPSIZE with the same sizes is enough to make the button smaller */ - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(23, 22), "Unexpected button size\n"); - SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELONG(16, 15)); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(23, 21), "Unexpected button size\n"); - /* -1 in TB_SETBITMAPSIZE is a special code meaning that the coordinate shouldn't be changed */ - add_128x15_bitmap(hToolbar, 16); - ok(SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELONG(14, -1)), "TB_SETBITMAPSIZE failed\n"); - compare((int)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(21, 21), "%x"); - ok(SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELONG(-1, 12)), "TB_SETBITMAPSIZE failed\n"); - compare((int)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(21, 18), "%x"); - ok(SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELONG(-1, -1)), "TB_SETBITMAPSIZE failed\n"); - compare((int)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(21, 18), "%x"); - /* check the imagelist */ - InvalidateRect(hToolbar, NULL, TRUE); - UpdateWindow(hToolbar); - CHECK_IMAGELIST(16, 14, 12); - - rebuild_toolbar(&hToolbar); - SendMessageA(hToolbar, TB_ADDSTRINGA, 0, (LPARAM)"A\0MMMMMMMMMMMMM\0"); - /* the height is increased after a TB_ADDSTRING */ - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(23, 39), "Unexpected button size\n"); - SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELONG(100, 100)); - /* if a string is in the pool, even adding a button without a string resets the size */ - SendMessageA(hToolbar, TB_ADDBUTTONS, 1, (LPARAM)&buttons2[0]); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(23, 22), "Unexpected button size\n"); - SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELONG(100, 100)); - /* an BTNS_AUTOSIZE button is also considered when computing the new size */ - SendMessageA(hToolbar, TB_ADDBUTTONS, 1, (LPARAM)&buttons3[2]); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(163, 39), "Unexpected button size\n"); - SendMessageA(hToolbar, TB_ADDBUTTONS, 1, (LPARAM)&buttons3[0]); - check_sizes(); - /* delete button doesn't change the buttons size */ - SendMessageA(hToolbar, TB_DELETEBUTTON, 2, 0); - SendMessageA(hToolbar, TB_DELETEBUTTON, 1, 0); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(163, 39), "Unexpected button size\n"); - /* TB_INSERTBUTTONS will */ - SendMessageA(hToolbar, TB_INSERTBUTTON, 1, (LPARAM)&buttons2[0]); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(23, 22), "Unexpected button size\n"); - - /* TB_HIDEBUTTON and TB_MOVEBUTTON doesn't force a recalc */ - SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELONG(100, 100)); - ok(SendMessageA(hToolbar, TB_MOVEBUTTON, 0, 1), "TB_MOVEBUTTON failed\n"); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(100, 100), "Unexpected button size\n"); - ok(SendMessageA(hToolbar, TB_HIDEBUTTON, 20, TRUE), "TB_HIDEBUTTON failed\n"); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(100, 100), "Unexpected button size\n"); - /* however changing the hidden flag with TB_SETSTATE does */ - ok(SendMessageA(hToolbar, TB_SETSTATE, 20, TBSTATE_ENABLED|TBSTATE_HIDDEN), "TB_SETSTATE failed\n"); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(100, 100), "Unexpected button size\n"); - ok(SendMessageA(hToolbar, TB_SETSTATE, 20, TBSTATE_ENABLED), "TB_SETSTATE failed\n"); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(23, 22), "Unexpected button size\n"); - - /* TB_SETIMAGELIST always changes the height but the width only if necessary */ - SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELONG(100, 100)); - himl = ImageList_LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_BITMAP_80x15), 20, 2, CLR_NONE, IMAGE_BITMAP, LR_DEFAULTCOLOR); - ok(SendMessageA(hToolbar, TB_SETIMAGELIST, 0, (LPARAM)himl) == 0, "TB_SETIMAGELIST failed\n"); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(100, 21), "Unexpected button size\n"); - SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELONG(100, 100)); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(100, 100), "Unexpected button size\n"); - /* But there are no update when we change imagelist, and image sizes are the same */ - himl2 = ImageList_LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_BITMAP_128x15), 20, 2, CLR_NONE, IMAGE_BITMAP, LR_DEFAULTCOLOR); - ok(SendMessageA(hToolbar, TB_SETIMAGELIST, 0, (LRESULT)himl2) == (LRESULT)himl, "TB_SETIMAGELIST failed\n"); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(100, 100), "Unexpected button size\n"); - SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELONG(1, 1)); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(27, 21), "Unexpected button size\n"); - ok(SendMessageA(hToolbar, TB_SETIMAGELIST, 0, 0) == (LRESULT)himl2, "TB_SETIMAGELIST failed\n"); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(27, 7), "Unexpected button size\n"); - SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELONG(1, 1)); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(8, 7), "Unexpected button size\n"); - ok(SendMessageA(hToolbar, TB_SETIMAGELIST, 0, (LPARAM)himl) == 0, "TB_SETIMAGELIST failed\n"); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(27, 21), "Unexpected button size\n"); - /* the text is taken into account */ - SendMessageA(hToolbar, TB_ADDSTRINGA, 0, (LPARAM)"A\0MMMMMMMMMMMMM\0"); - SendMessageA(hToolbar, TB_ADDBUTTONS, 4, (LPARAM)buttons3); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(163, 38), "Unexpected button size\n"); - ok(SendMessageA(hToolbar, TB_SETIMAGELIST, 0, 0) == (LRESULT)himl, "TB_SETIMAGELIST failed\n"); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(163, 24), "Unexpected button size\n"); - /* the style change also comes into effect */ - check_sizes(); - SetWindowLong(hToolbar, GWL_STYLE, GetWindowLong(hToolbar, GWL_STYLE) | TBSTYLE_FLAT); - ok(SendMessageA(hToolbar, TB_SETIMAGELIST, 0, (LPARAM)himl) == 0, "TB_SETIMAGELIST failed\n"); - check_sizes_todo(0x30); /* some small problems with BTNS_AUTOSIZE button sizes */ - - rebuild_toolbar(&hToolbar); - ImageList_Destroy(himl); - ImageList_Destroy(himl2); - - SendMessageA(hToolbar, TB_ADDBUTTONS, 1, (LPARAM)&buttons3[3]); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(27, 39), "Unexpected button size\n"); - SendMessageA(hToolbar, TB_DELETEBUTTON, 0, 0); - ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(27, 39), "Unexpected button size\n"); - - rebuild_toolbar(&hToolbar); - - ok(SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELPARAM(32, 32)) == 1, "TB_SETBITMAPSIZE failed\n"); - ok(SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELPARAM(100, 100)) == 1, "TB_SETBUTTONSIZE failed\n"); - ok(SendMessageA(hToolbar, TB_ADDBUTTONS, 1, (LPARAM)&buttons2[0]) == 1, "TB_ADDBUTTONS failed\n"); - ok(SendMessageA(hToolbar, TB_ADDBUTTONS, 1, (LPARAM)&buttons3[2]) == 1, "TB_ADDBUTTONS failed\n"); - ok(SendMessageA(hToolbar, TB_ADDBUTTONS, 1, (LPARAM)&buttons3[0]) == 1, "TB_ADDBUTTONS failed\n"); - SendMessageA(hToolbar, TB_AUTOSIZE, 0, 0 ); - check_sizes(); - - rebuild_toolbar(&hToolbar); - SetWindowLong(hToolbar, GWL_STYLE, TBSTYLE_LIST | GetWindowLong(hToolbar, GWL_STYLE)); - ok(SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELPARAM(32, 32)) == 1, "TB_SETBITMAPSIZE failed\n"); - ok(SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELPARAM(100, 100)) == 1, "TB_SETBUTTONSIZE failed\n"); - ok(SendMessageA(hToolbar, TB_ADDBUTTONS, 1, (LPARAM)&buttons2[0]) == 1, "TB_ADDBUTTONS failed\n"); - ok(SendMessageA(hToolbar, TB_ADDBUTTONS, 1, (LPARAM)&buttons3[2]) == 1, "TB_ADDBUTTONS failed\n"); - ok(SendMessageA(hToolbar, TB_ADDBUTTONS, 1, (LPARAM)&buttons3[3]) == 1, "TB_ADDBUTTONS failed\n"); - SendMessageA(hToolbar, TB_AUTOSIZE, 0, 0 ); - check_sizes_todo(0xff); - - rebuild_toolbar(&hToolbar); - SetWindowLong(hToolbar, GWL_STYLE, TBSTYLE_LIST | GetWindowLong(hToolbar, GWL_STYLE)); - ok(SendMessageA(hToolbar, TB_SETBITMAPSIZE, 0, MAKELPARAM(32, 32)) == 1, "TB_SETBITMAPSIZE failed\n"); - ok(SendMessageA(hToolbar, TB_SETBUTTONSIZE, 0, MAKELPARAM(100, 100)) == 1, "TB_SETBUTTONSIZE failed\n"); - ok(SendMessageA(hToolbar, TB_ADDBUTTONS, 1, (LPARAM)&buttons3[3]) == 1, "TB_ADDBUTTONS failed\n"); - SendMessageA(hToolbar, TB_AUTOSIZE, 0, 0 ); - check_sizes(); - - rebuild_toolbar(&hToolbar); - SetWindowLong(hToolbar, GWL_STYLE, TBSTYLE_WRAPABLE | GetWindowLong(hToolbar, GWL_STYLE)); - ok(SendMessageA(hToolbar, TB_ADDBUTTONS, 1, (LPARAM)&buttons3[3]) == 1, "TB_ADDBUTTONS failed\n"); - ok(SendMessageA(hToolbar, TB_ADDBUTTONS, 1, (LPARAM)&buttons3[3]) == 1, "TB_ADDBUTTONS failed\n"); - tbinfo.cx = 672; - tbinfo.cbSize = sizeof(TBBUTTONINFO); - tbinfo.dwMask = TBIF_SIZE | TBIF_BYINDEX; - if (SendMessageA(hToolbar, TB_SETBUTTONINFO, 0, (LPARAM)&tbinfo)) - { - ok(SendMessageA(hToolbar, TB_SETBUTTONINFO, 1, (LPARAM)&tbinfo) != 0, "TB_SETBUTTONINFO failed\n"); - SendMessageA(hToolbar, TB_AUTOSIZE, 0, 0); - check_sizes(); - } - else /* TBIF_BYINDEX probably not supported, confirm that this was the reason for the failure */ - { - tbinfo.dwMask = TBIF_SIZE; - ok(SendMessageA(hToolbar, TB_SETBUTTONINFO, 33, (LPARAM)&tbinfo) != 0, "TB_SETBUTTONINFO failed\n"); - } - - DestroyWindow(hToolbar); -} - -/* Toolbar control has two ways of reacting to a change. We call them a - * relayout and recalc. A recalc forces a recompute of values like button size - * and top margin (the latter in comctl32 -#include -#include - -#include "wine/test.h" - -#define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got) - -static void test_create_tooltip(void) -{ - HWND parent, hwnd; - DWORD style, exp_style; - - parent = CreateWindowEx(0, "static", NULL, WS_POPUP, - 0, 0, 0, 0, - NULL, NULL, NULL, 0); - assert(parent); - - hwnd = CreateWindowEx(0, TOOLTIPS_CLASS, NULL, 0x7fffffff | WS_POPUP, - 10, 10, 300, 100, - parent, NULL, NULL, 0); - assert(hwnd); - - style = GetWindowLong(hwnd, GWL_STYLE); - trace("style = %08x\n", style); - exp_style = 0x7fffffff | WS_POPUP; - exp_style &= ~(WS_CHILD | WS_MAXIMIZE | WS_BORDER | WS_DLGFRAME); - ok(style == exp_style || broken(style == (exp_style | WS_BORDER)), /* nt4 */ - "wrong style %08x/%08x\n", style, exp_style); - - DestroyWindow(hwnd); - - hwnd = CreateWindowEx(0, TOOLTIPS_CLASS, NULL, 0, - 10, 10, 300, 100, - parent, NULL, NULL, 0); - assert(hwnd); - - style = GetWindowLong(hwnd, GWL_STYLE); - trace("style = %08x\n", style); - ok(style == (WS_POPUP | WS_CLIPSIBLINGS | WS_BORDER), - "wrong style %08x\n", style); - - DestroyWindow(hwnd); - - DestroyWindow(parent); -} - -/* try to make sure pending X events have been processed before continuing */ -static void flush_events(int waitTime) -{ - MSG msg; - int diff = waitTime; - DWORD time = GetTickCount() + waitTime; - - while (diff > 0) - { - if (MsgWaitForMultipleObjects( 0, NULL, FALSE, min(100,diff), QS_ALLEVENTS) == WAIT_TIMEOUT) break; - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg ); - diff = time - GetTickCount(); - } -} - -static int CD_Stages; -static LRESULT CD_Result; -static HWND g_hwnd; - -#define TEST_CDDS_PREPAINT 0x00000001 -#define TEST_CDDS_POSTPAINT 0x00000002 -#define TEST_CDDS_PREERASE 0x00000004 -#define TEST_CDDS_POSTERASE 0x00000008 -#define TEST_CDDS_ITEMPREPAINT 0x00000010 -#define TEST_CDDS_ITEMPOSTPAINT 0x00000020 -#define TEST_CDDS_ITEMPREERASE 0x00000040 -#define TEST_CDDS_ITEMPOSTERASE 0x00000080 -#define TEST_CDDS_SUBITEM 0x00000100 - -static LRESULT CALLBACK CustomDrawWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch(msg) { - - case WM_DESTROY: - PostQuitMessage(0); - break; - - case WM_NOTIFY: - if (((NMHDR *)lParam)->code == NM_CUSTOMDRAW) { - NMTTCUSTOMDRAW *ttcd = (NMTTCUSTOMDRAW*) lParam; - ok(ttcd->nmcd.hdr.hwndFrom == g_hwnd, "Unexpected hwnd source %p (%p)\n", - ttcd->nmcd.hdr.hwndFrom, g_hwnd); - ok(ttcd->nmcd.hdr.idFrom == 0x1234ABCD, "Unexpected id %x\n", (int)ttcd->nmcd.hdr.idFrom); - - switch (ttcd->nmcd.dwDrawStage) { - case CDDS_PREPAINT : CD_Stages |= TEST_CDDS_PREPAINT; break; - case CDDS_POSTPAINT : CD_Stages |= TEST_CDDS_POSTPAINT; break; - case CDDS_PREERASE : CD_Stages |= TEST_CDDS_PREERASE; break; - case CDDS_POSTERASE : CD_Stages |= TEST_CDDS_POSTERASE; break; - case CDDS_ITEMPREPAINT : CD_Stages |= TEST_CDDS_ITEMPREPAINT; break; - case CDDS_ITEMPOSTPAINT: CD_Stages |= TEST_CDDS_ITEMPOSTPAINT; break; - case CDDS_ITEMPREERASE : CD_Stages |= TEST_CDDS_ITEMPREERASE; break; - case CDDS_ITEMPOSTERASE: CD_Stages |= TEST_CDDS_ITEMPOSTERASE; break; - case CDDS_SUBITEM : CD_Stages |= TEST_CDDS_SUBITEM; break; - default: CD_Stages = -1; - } - - if (ttcd->nmcd.dwDrawStage == CDDS_PREPAINT) return CD_Result; - } - /* drop through */ - - default: - return DefWindowProcA(hWnd, msg, wParam, lParam); - } - - return 0L; -} - -static void test_customdraw(void) { - static struct { - LRESULT FirstReturnValue; - int ExpectedCalls; - } expectedResults[] = { - /* Valid notification responses */ - {CDRF_DODEFAULT, TEST_CDDS_PREPAINT}, - {CDRF_SKIPDEFAULT, TEST_CDDS_PREPAINT}, - {CDRF_NOTIFYPOSTPAINT, TEST_CDDS_PREPAINT | TEST_CDDS_POSTPAINT}, - - /* Invalid notification responses */ - {CDRF_NOTIFYITEMDRAW, TEST_CDDS_PREPAINT}, - {CDRF_NOTIFYPOSTERASE, TEST_CDDS_PREPAINT}, - {CDRF_NEWFONT, TEST_CDDS_PREPAINT} - }; - - int iterationNumber; - WNDCLASSA wc; - LRESULT lResult; - - /* Create a class to use the custom draw wndproc */ - wc.style = CS_HREDRAW | CS_VREDRAW; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = GetModuleHandleA(NULL); - wc.hIcon = NULL; - wc.hCursor = LoadCursorA(NULL, IDC_ARROW); - wc.hbrBackground = GetSysColorBrush(COLOR_WINDOW); - wc.lpszMenuName = NULL; - wc.lpszClassName = "CustomDrawClass"; - wc.lpfnWndProc = CustomDrawWndProc; - RegisterClass(&wc); - - for (iterationNumber = 0; - iterationNumber < sizeof(expectedResults)/sizeof(expectedResults[0]); - iterationNumber++) { - - HWND parent, hwndTip; - RECT rect; - TOOLINFO toolInfo = { 0 }; - - /* Create a main window */ - parent = CreateWindowEx(0, "CustomDrawClass", NULL, - WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | - WS_MAXIMIZEBOX | WS_VISIBLE, - 50, 50, - 300, 300, - NULL, NULL, NULL, 0); - ok(parent != NULL, "Creation of main window failed\n"); - - /* Make it show */ - ShowWindow(parent, SW_SHOWNORMAL); - flush_events(100); - - /* Create Tooltip */ - hwndTip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, - NULL, TTS_NOPREFIX | TTS_ALWAYSTIP, - CW_USEDEFAULT, CW_USEDEFAULT, - CW_USEDEFAULT, CW_USEDEFAULT, - parent, NULL, GetModuleHandleA(NULL), 0); - ok(hwndTip != NULL, "Creation of tooltip window failed\n"); - - /* Set up parms for the wndproc to handle */ - CD_Stages = 0; - CD_Result = expectedResults[iterationNumber].FirstReturnValue; - g_hwnd = hwndTip; - - /* Make it topmost, as per the MSDN */ - SetWindowPos(hwndTip, HWND_TOPMOST, 0, 0, 0, 0, - SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); - - /* Create a tool */ - toolInfo.cbSize = TTTOOLINFO_V1_SIZE; - toolInfo.hwnd = parent; - toolInfo.hinst = GetModuleHandleA(NULL); - toolInfo.uFlags = TTF_SUBCLASS; - toolInfo.uId = 0x1234ABCD; - toolInfo.lpszText = (LPSTR)"This is a test tooltip"; - toolInfo.lParam = 0xdeadbeef; - GetClientRect (parent, &toolInfo.rect); - lResult = SendMessage(hwndTip, TTM_ADDTOOL, 0, (LPARAM)&toolInfo); - ok(lResult, "Adding the tool to the tooltip failed\n"); - - /* Make tooltip appear quickly */ - SendMessage(hwndTip, TTM_SETDELAYTIME, TTDT_INITIAL, MAKELPARAM(1,0)); - - /* Put cursor inside window, tooltip will appear immediately */ - GetWindowRect( parent, &rect ); - SetCursorPos( (rect.left + rect.right) / 2, (rect.top + rect.bottom) / 2 ); - flush_events(200); - - if (CD_Stages) - { - /* Check CustomDraw results */ - ok(CD_Stages == expectedResults[iterationNumber].ExpectedCalls || - broken(CD_Stages == (expectedResults[iterationNumber].ExpectedCalls & ~TEST_CDDS_POSTPAINT)), /* nt4 */ - "CustomDraw run %d stages %x, expected %x\n", iterationNumber, CD_Stages, - expectedResults[iterationNumber].ExpectedCalls); - } - - /* Clean up */ - DestroyWindow(hwndTip); - DestroyWindow(parent); - } - - -} - -static const CHAR testcallbackA[] = "callback"; - -static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - if (message == WM_NOTIFY && lParam) - { - NMTTDISPINFOA *ttnmdi = (NMTTDISPINFOA*)lParam; - - if (ttnmdi->hdr.code == TTN_GETDISPINFOA) - lstrcpy(ttnmdi->lpszText, testcallbackA); - } - - return DefWindowProcA(hwnd, message, wParam, lParam); -} - -static BOOL register_parent_wnd_class(void) -{ - WNDCLASSA cls; - - cls.style = 0; - cls.lpfnWndProc = parent_wnd_proc; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(NULL); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "Tooltips test parent class"; - return RegisterClassA(&cls); -} - -static HWND create_parent_window(void) -{ - if (!register_parent_wnd_class()) - return NULL; - - return CreateWindowEx(0, "Tooltips test parent class", - "Tooltips test parent window", - WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | - WS_MAXIMIZEBOX | WS_VISIBLE, - 0, 0, 100, 100, - GetDesktopWindow(), NULL, GetModuleHandleA(NULL), NULL); -} - -static void test_gettext(void) -{ - HWND hwnd, notify; - TTTOOLINFOA toolinfoA; - TTTOOLINFOW toolinfoW; - LRESULT r; - CHAR bufA[10] = ""; - WCHAR bufW[10] = { 0 }; - static const CHAR testtipA[] = "testtip"; - - notify = create_parent_window(); - ok(notify != NULL, "Expected notification window to be created\n"); - - /* For bug 14790 - lpszText is NULL */ - hwnd = CreateWindowExA(0, TOOLTIPS_CLASSA, NULL, 0, - 10, 10, 300, 100, - NULL, NULL, NULL, 0); - assert(hwnd); - - /* use sizeof(TTTOOLINFOA) instead of TTTOOLINFOA_V1_SIZE so that adding it fails on Win9x */ - /* otherwise it crashes on the NULL lpszText */ - toolinfoA.cbSize = sizeof(TTTOOLINFOA); - toolinfoA.hwnd = NULL; - toolinfoA.hinst = GetModuleHandleA(NULL); - toolinfoA.uFlags = 0; - toolinfoA.uId = 0x1234ABCD; - toolinfoA.lpszText = NULL; - toolinfoA.lParam = 0xdeadbeef; - GetClientRect(hwnd, &toolinfoA.rect); - r = SendMessageA(hwnd, TTM_ADDTOOL, 0, (LPARAM)&toolinfoA); - if (r) - { - toolinfoA.hwnd = NULL; - toolinfoA.uId = 0x1234ABCD; - toolinfoA.lpszText = bufA; - SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA); - ok(strcmp(toolinfoA.lpszText, "") == 0, "lpszText should be an empty string\n"); - } - else - { - win_skip( "Old comctl32, not testing NULL text\n" ); - DestroyWindow( hwnd ); - return; - } - - /* add another tool with text */ - toolinfoA.cbSize = sizeof(TTTOOLINFOA); - toolinfoA.hwnd = NULL; - toolinfoA.hinst = GetModuleHandleA(NULL); - toolinfoA.uFlags = 0; - toolinfoA.uId = 0x1235ABCD; - strcpy(bufA, testtipA); - toolinfoA.lpszText = bufA; - toolinfoA.lParam = 0xdeadbeef; - GetClientRect(hwnd, &toolinfoA.rect); - r = SendMessageA(hwnd, TTM_ADDTOOL, 0, (LPARAM)&toolinfoA); - ok(r, "Adding the tool to the tooltip failed\n"); - if (r) - { - DWORD length; - - length = SendMessage(hwnd, WM_GETTEXTLENGTH, 0, 0); - ok(length == 0, "Expected 0, got %d\n", length); - - toolinfoA.hwnd = NULL; - toolinfoA.uId = 0x1235ABCD; - toolinfoA.lpszText = bufA; - SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA); - ok(strcmp(toolinfoA.lpszText, testtipA) == 0, "lpszText should be an empty string\n"); - - length = SendMessage(hwnd, WM_GETTEXTLENGTH, 0, 0); - ok(length == 0, "Expected 0, got %d\n", length); - } - - /* add another with callback text */ - toolinfoA.cbSize = sizeof(TTTOOLINFOA); - toolinfoA.hwnd = notify; - toolinfoA.hinst = GetModuleHandleA(NULL); - toolinfoA.uFlags = 0; - toolinfoA.uId = 0x1236ABCD; - toolinfoA.lpszText = LPSTR_TEXTCALLBACKA; - toolinfoA.lParam = 0xdeadbeef; - GetClientRect(hwnd, &toolinfoA.rect); - r = SendMessageA(hwnd, TTM_ADDTOOL, 0, (LPARAM)&toolinfoA); - ok(r, "Adding the tool to the tooltip failed\n"); - if (r) - { - toolinfoA.hwnd = notify; - toolinfoA.uId = 0x1236ABCD; - toolinfoA.lpszText = bufA; - SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA); - ok(strcmp(toolinfoA.lpszText, testcallbackA) == 0, - "lpszText should be an (%s) string\n", testcallbackA); - } - - DestroyWindow(hwnd); - DestroyWindow(notify); - - SetLastError(0xdeadbeef); - hwnd = CreateWindowExW(0, TOOLTIPS_CLASSW, NULL, 0, - 10, 10, 300, 100, - NULL, NULL, NULL, 0); - - if (!hwnd && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) { - win_skip("CreateWindowExW is not implemented\n"); - return; - } - - assert(hwnd); - - toolinfoW.cbSize = sizeof(TTTOOLINFOW); - toolinfoW.hwnd = NULL; - toolinfoW.hinst = GetModuleHandleA(NULL); - toolinfoW.uFlags = 0; - toolinfoW.uId = 0x1234ABCD; - toolinfoW.lpszText = NULL; - toolinfoW.lParam = 0xdeadbeef; - GetClientRect(hwnd, &toolinfoW.rect); - r = SendMessageW(hwnd, TTM_ADDTOOL, 0, (LPARAM)&toolinfoW); - ok(r, "Adding the tool to the tooltip failed\n"); - - if (0) /* crashes on NT4 */ - { - toolinfoW.hwnd = NULL; - toolinfoW.uId = 0x1234ABCD; - toolinfoW.lpszText = bufW; - SendMessageW(hwnd, TTM_GETTEXTW, 0, (LPARAM)&toolinfoW); - ok(toolinfoW.lpszText[0] == 0, "lpszText should be an empty string\n"); - } - - DestroyWindow(hwnd); -} - -static void test_ttm_gettoolinfo(void) -{ - TTTOOLINFOA ti; - TTTOOLINFOW tiW; - HWND hwnd; - DWORD r; - - hwnd = CreateWindowExA(0, TOOLTIPS_CLASSA, NULL, 0, - 10, 10, 300, 100, - NULL, NULL, NULL, 0); - - ti.cbSize = TTTOOLINFOA_V2_SIZE; - ti.hwnd = NULL; - ti.hinst = GetModuleHandleA(NULL); - ti.uFlags = 0; - ti.uId = 0x1234ABCD; - ti.lpszText = NULL; - ti.lParam = 0xdeadbeef; - GetClientRect(hwnd, &ti.rect); - r = SendMessageA(hwnd, TTM_ADDTOOLA, 0, (LPARAM)&ti); - ok(r, "Adding the tool to the tooltip failed\n"); - - ti.cbSize = TTTOOLINFOA_V2_SIZE; - ti.lParam = 0xaaaaaaaa; - r = SendMessageA(hwnd, TTM_GETTOOLINFOA, 0, (LPARAM)&ti); - ok(r, "Getting tooltip info failed\n"); - ok(0xdeadbeef == ti.lParam || - broken(0xdeadbeef != ti.lParam), /* comctl32 < 5.81 */ - "Expected 0xdeadbeef, got %lx\n", ti.lParam); - - tiW.cbSize = TTTOOLINFOW_V2_SIZE; - tiW.hwnd = NULL; - tiW.uId = 0x1234ABCD; - tiW.lParam = 0xaaaaaaaa; - r = SendMessageA(hwnd, TTM_GETTOOLINFOW, 0, (LPARAM)&tiW); - ok(r, "Getting tooltip info failed\n"); - ok(0xdeadbeef == tiW.lParam || - broken(0xdeadbeef != tiW.lParam), /* comctl32 < 5.81 */ - "Expected 0xdeadbeef, got %lx\n", tiW.lParam); - - ti.cbSize = TTTOOLINFOA_V2_SIZE; - ti.uId = 0x1234ABCD; - ti.lParam = 0xaaaaaaaa; - SendMessageA(hwnd, TTM_SETTOOLINFOA, 0, (LPARAM)&ti); - - ti.cbSize = TTTOOLINFOA_V2_SIZE; - ti.lParam = 0xdeadbeef; - r = SendMessageA(hwnd, TTM_GETTOOLINFOA, 0, (LPARAM)&ti); - ok(r, "Getting tooltip info failed\n"); - ok(0xaaaaaaaa == ti.lParam || - broken(0xaaaaaaaa != ti.lParam), /* comctl32 < 5.81 */ - "Expected 0xaaaaaaaa, got %lx\n", ti.lParam); - - DestroyWindow(hwnd); - - /* 1. test size parameter validation rules (ansi messages) */ - hwnd = CreateWindowExA(0, TOOLTIPS_CLASSA, NULL, 0, - 10, 10, 300, 100, - NULL, NULL, NULL, 0); - - ti.cbSize = TTTOOLINFOA_V1_SIZE - 1; - ti.hwnd = NULL; - ti.hinst = GetModuleHandleA(NULL); - ti.uFlags = 0; - ti.uId = 0x1234ABCD; - ti.lpszText = NULL; - ti.lParam = 0xdeadbeef; - GetClientRect(hwnd, &ti.rect); - r = SendMessage(hwnd, TTM_ADDTOOLA, 0, (LPARAM)&ti); - ok(r, "Adding the tool to the tooltip failed\n"); - r = SendMessage(hwnd, TTM_GETTOOLCOUNT, 0, 0); - expect(1, r); - - ti.cbSize = TTTOOLINFOA_V1_SIZE - 1; - ti.hwnd = NULL; - ti.uId = 0x1234ABCD; - SendMessage(hwnd, TTM_DELTOOLA, 0, (LPARAM)&ti); - r = SendMessage(hwnd, TTM_GETTOOLCOUNT, 0, 0); - expect(0, r); - - ti.cbSize = TTTOOLINFOA_V2_SIZE - 1; - ti.hwnd = NULL; - ti.hinst = GetModuleHandleA(NULL); - ti.uFlags = 0; - ti.uId = 0x1234ABCD; - ti.lpszText = NULL; - ti.lParam = 0xdeadbeef; - GetClientRect(hwnd, &ti.rect); - r = SendMessage(hwnd, TTM_ADDTOOLA, 0, (LPARAM)&ti); - ok(r, "Adding the tool to the tooltip failed\n"); - r = SendMessage(hwnd, TTM_GETTOOLCOUNT, 0, 0); - expect(1, r); - - ti.cbSize = TTTOOLINFOA_V2_SIZE - 1; - ti.hwnd = NULL; - ti.uId = 0x1234ABCD; - SendMessage(hwnd, TTM_DELTOOLA, 0, (LPARAM)&ti); - r = SendMessage(hwnd, TTM_GETTOOLCOUNT, 0, 0); - expect(0, r); - - ti.cbSize = TTTOOLINFOA_V2_SIZE + 1; - ti.hwnd = NULL; - ti.hinst = GetModuleHandleA(NULL); - ti.uFlags = 0; - ti.uId = 0x1234ABCD; - ti.lpszText = NULL; - ti.lParam = 0xdeadbeef; - GetClientRect(hwnd, &ti.rect); - r = SendMessage(hwnd, TTM_ADDTOOLA, 0, (LPARAM)&ti); - ok(r, "Adding the tool to the tooltip failed\n"); - r = SendMessage(hwnd, TTM_GETTOOLCOUNT, 0, 0); - expect(1, r); - - ti.cbSize = TTTOOLINFOA_V2_SIZE + 1; - ti.hwnd = NULL; - ti.uId = 0x1234ABCD; - SendMessage(hwnd, TTM_DELTOOLA, 0, (LPARAM)&ti); - r = SendMessage(hwnd, TTM_GETTOOLCOUNT, 0, 0); - expect(0, r); - - DestroyWindow(hwnd); - - /* 2. test size parameter validation rules (w-messages) */ - hwnd = CreateWindowExW(0, TOOLTIPS_CLASSW, NULL, 0, - 10, 10, 300, 100, - NULL, NULL, NULL, 0); - if(!hwnd) - { - win_skip("CreateWindowExW() not supported. Skipping.\n"); - return; - } - - tiW.cbSize = TTTOOLINFOW_V1_SIZE - 1; - tiW.hwnd = NULL; - tiW.hinst = GetModuleHandleA(NULL); - tiW.uFlags = 0; - tiW.uId = 0x1234ABCD; - tiW.lpszText = NULL; - tiW.lParam = 0xdeadbeef; - GetClientRect(hwnd, &tiW.rect); - r = SendMessageW(hwnd, TTM_ADDTOOLW, 0, (LPARAM)&tiW); - ok(r, "Adding the tool to the tooltip failed\n"); - r = SendMessageW(hwnd, TTM_GETTOOLCOUNT, 0, 0); - expect(1, r); - - tiW.cbSize = TTTOOLINFOW_V1_SIZE - 1; - tiW.hwnd = NULL; - tiW.uId = 0x1234ABCD; - SendMessageW(hwnd, TTM_DELTOOLW, 0, (LPARAM)&tiW); - r = SendMessageW(hwnd, TTM_GETTOOLCOUNT, 0, 0); - expect(0, r); - - tiW.cbSize = TTTOOLINFOW_V2_SIZE - 1; - tiW.hwnd = NULL; - tiW.hinst = GetModuleHandleA(NULL); - tiW.uFlags = 0; - tiW.uId = 0x1234ABCD; - tiW.lpszText = NULL; - tiW.lParam = 0xdeadbeef; - GetClientRect(hwnd, &tiW.rect); - r = SendMessageW(hwnd, TTM_ADDTOOLW, 0, (LPARAM)&tiW); - ok(r, "Adding the tool to the tooltip failed\n"); - r = SendMessageW(hwnd, TTM_GETTOOLCOUNT, 0, 0); - expect(1, r); - - tiW.cbSize = TTTOOLINFOW_V2_SIZE - 1; - tiW.hwnd = NULL; - tiW.uId = 0x1234ABCD; - SendMessageW(hwnd, TTM_DELTOOLW, 0, (LPARAM)&tiW); - r = SendMessageW(hwnd, TTM_GETTOOLCOUNT, 0, 0); - expect(0, r); - - tiW.cbSize = TTTOOLINFOW_V2_SIZE + 1; - tiW.hwnd = NULL; - tiW.hinst = GetModuleHandleA(NULL); - tiW.uFlags = 0; - tiW.uId = 0x1234ABCD; - tiW.lpszText = NULL; - tiW.lParam = 0xdeadbeef; - GetClientRect(hwnd, &tiW.rect); - r = SendMessageW(hwnd, TTM_ADDTOOLA, 0, (LPARAM)&tiW); - ok(r, "Adding the tool to the tooltip failed\n"); - r = SendMessageW(hwnd, TTM_GETTOOLCOUNT, 0, 0); - expect(1, r); - /* looks like TTM_DELTOOLW doesn't work with invalid size */ - tiW.cbSize = TTTOOLINFOW_V2_SIZE + 1; - tiW.hwnd = NULL; - tiW.uId = 0x1234ABCD; - SendMessageW(hwnd, TTM_DELTOOLW, 0, (LPARAM)&tiW); - r = SendMessageW(hwnd, TTM_GETTOOLCOUNT, 0, 0); - expect(1, r); - - tiW.cbSize = TTTOOLINFOW_V2_SIZE; - tiW.hwnd = NULL; - tiW.uId = 0x1234ABCD; - SendMessageW(hwnd, TTM_DELTOOLW, 0, (LPARAM)&tiW); - r = SendMessageW(hwnd, TTM_GETTOOLCOUNT, 0, 0); - expect(0, r); - - DestroyWindow(hwnd); -} - -START_TEST(tooltips) -{ - InitCommonControls(); - - test_create_tooltip(); - test_customdraw(); - test_gettext(); - test_ttm_gettoolinfo(); -} diff --git a/rostests/winetests/comctl32/trackbar.c b/rostests/winetests/comctl32/trackbar.c deleted file mode 100644 index 68261d833fb..00000000000 --- a/rostests/winetests/comctl32/trackbar.c +++ /dev/null @@ -1,1038 +0,0 @@ -/* Unit tests for the track bar control. - * - * Copyright 2007 Keith Stevens - * - * 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/test.h" -#include "msg.h" - -#define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got) -#define NUM_MSG_SEQUENCE 2 -#define PARENT_SEQ_INDEX 0 -#define TRACKBAR_SEQ_INDEX 1 - -HWND hWndParent; - -static struct msg_sequence *sequences[NUM_MSG_SEQUENCE]; - -static const struct message create_trackbar_wnd_seq[] = { - {0} -}; - -static const struct message parent_empty_test_seq[] = { - {0} -}; - -static const struct message parent_create_trackbar_wnd_seq[] = { - { WM_NOTIFYFORMAT, sent}, - { WM_QUERYUISTATE, sent|optional}, - { WM_WINDOWPOSCHANGING, sent}, - { WM_NCACTIVATE, sent}, - { PBT_APMRESUMECRITICAL, sent}, - { WM_WINDOWPOSCHANGING, sent}, - { PBT_APMRESUMESTANDBY, sent}, - { WM_IME_SETCONTEXT, sent|optional}, - { WM_IME_NOTIFY, sent|optional}, - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - {0} -}; - -static const struct message parent_new_window_test_seq[] = { - { WM_QUERYNEWPALETTE, sent|optional }, - { WM_WINDOWPOSCHANGING, sent|optional}, - { WM_NCACTIVATE, sent|optional}, - { PBT_APMRESUMECRITICAL, sent|optional}, - { WM_IME_SETCONTEXT, sent|defwinproc|optional}, - { WM_IME_NOTIFY, sent|defwinproc|optional}, - { WM_SETFOCUS, sent|defwinproc|optional}, - { WM_NOTIFYFORMAT, sent}, - { WM_QUERYUISTATE, sent|optional}, - {0} -}; - -static const struct message buddy_window_test_seq[] = { - { TBM_GETBUDDY, sent|wparam, TRUE}, - { TBM_SETBUDDY, sent|wparam, FALSE}, - { WM_PAINT, sent|defwinproc}, - { TBM_SETBUDDY, sent|wparam, FALSE}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETBUDDY, sent|wparam, TRUE}, - { TBM_SETBUDDY, sent|wparam, TRUE}, - { WM_PAINT, sent|defwinproc}, - { TBM_SETBUDDY, sent|wparam, TRUE}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETBUDDY, sent|wparam, FALSE}, - { TBM_GETBUDDY, sent|wparam, TRUE}, - {0} -}; - -static const struct message parent_buddy_window_test_seq[] = { - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - {0} -}; - -static const struct message line_size_test_seq[] = { - { TBM_SETLINESIZE, sent|lparam, 0, 10}, - { TBM_SETLINESIZE, sent|lparam, 0, 4}, - { TBM_GETLINESIZE, sent}, - {0} -}; - -static const struct message page_size_test_seq[] = { - { TBM_SETPAGESIZE, sent|lparam, 0, 10}, - { TBM_SETPAGESIZE, sent|lparam, 0, -1}, - { TBM_GETPAGESIZE, sent}, - {0} -}; - -static const struct message position_test_seq[] = { - { TBM_SETPOS, sent|wparam|lparam, TRUE, -1}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETPOS, sent}, - { TBM_SETPOS, sent|wparam|lparam, TRUE, 5}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETPOS, sent}, - { TBM_SETPOS, sent|wparam|lparam, TRUE, 5}, - { TBM_SETPOS, sent|wparam|lparam, TRUE, 1000}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETPOS, sent}, - { TBM_SETPOS, sent|wparam|lparam, FALSE, 20}, - { TBM_GETPOS, sent}, - { TBM_SETPOS, sent|wparam|lparam, TRUE, 20}, - { TBM_GETPOS, sent}, - {0} -}; - -static const struct message parent_position_test_seq[] = { - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - {0} -}; - -static const struct message range_test_seq[] = { - { TBM_SETRANGE, sent|wparam|lparam, TRUE, MAKELONG(0, 10)}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETRANGEMAX, sent}, - { TBM_GETRANGEMIN, sent}, - { TBM_SETRANGE, sent|wparam|lparam, TRUE, MAKELONG(-1, 1000)}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETRANGEMAX, sent}, - { TBM_GETRANGEMIN, sent}, - { TBM_SETRANGE, sent|wparam|lparam, TRUE, MAKELONG(10, 0)}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETRANGEMAX, sent}, - { TBM_GETRANGEMIN, sent}, - { TBM_SETRANGE, sent|wparam|lparam, FALSE, MAKELONG(0, 10)}, - { TBM_GETRANGEMAX, sent}, - { TBM_GETRANGEMIN, sent}, - { TBM_SETRANGEMAX, sent|wparam|lparam, TRUE, 10}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETRANGEMAX, sent}, - { TBM_SETRANGEMAX, sent|wparam|lparam, TRUE, -1}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETRANGEMAX, sent}, - { TBM_SETRANGEMAX, sent|wparam|lparam, FALSE, 10}, - { TBM_GETRANGEMAX, sent}, - { TBM_SETRANGEMIN, sent|wparam|lparam, TRUE, 0}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETRANGEMIN, sent}, - { TBM_SETRANGEMIN, sent|wparam|lparam, TRUE, 10}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETRANGEMIN, sent}, - { TBM_SETRANGEMIN, sent|wparam|lparam, TRUE, -10}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETRANGEMIN, sent}, - { TBM_SETRANGEMIN, sent|wparam|lparam, FALSE, 5}, - { TBM_GETRANGEMIN, sent}, - { TBM_GETRANGEMAX, sent}, - { TBM_GETRANGEMIN, sent}, - {0} -}; - -static const struct message parent_range_test_seq[] = { - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - {0} -}; - -static const struct message selection_test_seq[] = { - { TBM_SETSEL, sent|wparam|lparam, TRUE, MAKELONG(0, 10)}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETSELEND, sent}, - { TBM_GETSELSTART, sent}, - { TBM_SETSEL, sent|wparam|lparam, TRUE, MAKELONG(5, 20)}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETSELEND, sent}, - { TBM_GETSELSTART, sent}, - { TBM_SETSEL, sent|wparam|lparam, FALSE, MAKELONG(5, 10)}, - { TBM_GETSELEND, sent}, - { TBM_GETSELSTART, sent}, - { TBM_SETSELEND, sent|wparam|lparam, TRUE, 10}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETSELEND, sent}, - { TBM_SETSELEND, sent|wparam|lparam, TRUE, 20}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETSELEND, sent}, - { TBM_SETSELEND, sent|wparam|lparam, TRUE, 4}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETSELEND, sent}, - { TBM_SETSELEND, sent|wparam|lparam, FALSE, 2}, - { TBM_GETSELEND, sent}, - { TBM_GETSELEND, sent}, - { TBM_SETSELSTART, sent|wparam|lparam, TRUE, 5}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETSELSTART, sent}, - { TBM_SETSELSTART, sent|wparam|lparam, TRUE, 0}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETSELSTART, sent}, - { TBM_SETSELSTART, sent|wparam|lparam, TRUE, 20}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETSELSTART, sent}, - { TBM_SETSELSTART, sent|wparam|lparam, FALSE, 8}, - { TBM_GETSELSTART, sent}, - { TBM_GETSELSTART, sent}, - {0} -}; - -static const struct message parent_selection_test_seq[] = { - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - {0} -}; - -static const struct message tic_settings_test_seq[] = { - { TBM_SETTIC, sent|lparam, 0, 0}, - { TBM_SETTIC, sent|lparam, 0, 5}, - { TBM_SETTIC, sent|lparam, 0, 10}, - { TBM_SETTIC, sent|lparam, 0, 20}, - { TBM_SETRANGE, sent|wparam|lparam, TRUE, MAKELONG(0,10)}, - { WM_PAINT, sent|defwinproc}, - { TBM_SETTICFREQ, sent|wparam, 2}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETNUMTICS, sent}, - { TBM_SETTICFREQ, sent|wparam, 5}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETNUMTICS, sent}, - { TBM_SETTICFREQ, sent|wparam, 15}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETNUMTICS, sent}, - { TBM_GETNUMTICS, sent}, - {0} -}; - -static const struct message parent_tic_settings_test_seq[] = { - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - {0} -}; - -static const struct message thumb_length_test_seq[] = { - { TBM_SETTHUMBLENGTH, sent|wparam|lparam, 15, 0}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETTHUMBLENGTH, sent}, - { TBM_SETTHUMBLENGTH, sent|wparam|lparam, 20, 0}, - { WM_PAINT, sent|defwinproc}, - { TBM_GETTHUMBLENGTH, sent}, - { TBM_GETTHUMBLENGTH, sent}, - {0} -}; - -static const struct message parent_thumb_length_test_seq[] = { - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - { WM_CTLCOLORSTATIC, sent}, - { WM_NOTIFY, sent}, - {0} -}; - -static const struct message tic_placement_test_seq[] = { - { TBM_GETPTICS, sent}, - { TBM_GETTIC, sent|wparam, 0}, - { TBM_GETTIC, sent|wparam, 2}, - { TBM_GETTIC, sent|wparam, 4}, - { TBM_GETTICPOS, sent|wparam, 0}, - { TBM_GETTICPOS, sent|wparam, 2}, - {0} -}; - -static const struct message tool_tips_test_seq[] = { - { TBM_SETTIPSIDE, sent|wparam, TBTS_TOP}, - { TBM_SETTIPSIDE, sent|wparam, TBTS_LEFT}, - { TBM_SETTIPSIDE, sent|wparam, TBTS_BOTTOM}, - { TBM_SETTIPSIDE, sent|wparam, TBTS_RIGHT}, - { TBM_SETTOOLTIPS, sent}, - { TBM_GETTOOLTIPS, sent}, - { TBM_SETTOOLTIPS, sent}, - { TBM_GETTOOLTIPS, sent}, - { TBM_SETTOOLTIPS, sent}, - { TBM_GETTOOLTIPS, sent}, - { TBM_GETTOOLTIPS, sent}, - {0} -}; - -static const struct message unicode_test_seq[] = { - { TBM_SETUNICODEFORMAT, sent|wparam, TRUE}, - { TBM_SETUNICODEFORMAT, sent|wparam, FALSE}, - { TBM_GETUNICODEFORMAT, sent}, - {0} -}; - -static const struct message ignore_selection_test_seq[] = { - { TBM_SETSEL, sent|wparam|lparam, TRUE, MAKELONG(0,10)}, - { TBM_GETSELEND, sent}, - { TBM_GETSELSTART, sent}, - { TBM_SETSEL, sent|wparam|lparam, FALSE, MAKELONG(0,10)}, - { TBM_GETSELEND, sent}, - { TBM_GETSELSTART, sent}, - { TBM_SETSELEND, sent|wparam|lparam, TRUE,0}, - { TBM_GETSELEND, sent}, - { TBM_SETSELEND, sent|wparam|lparam, TRUE, 10}, - { TBM_GETSELEND, sent}, - { TBM_SETSELEND, sent|wparam|lparam, FALSE,0}, - { TBM_GETSELEND, sent}, - { TBM_SETSELSTART, sent|wparam|lparam, TRUE,0}, - { TBM_GETSELSTART, sent}, - { TBM_SETSELSTART, sent|wparam|lparam, TRUE, 10}, - { TBM_GETSELSTART, sent}, - { TBM_SETSELSTART, sent|wparam|lparam, FALSE,0}, - { TBM_GETSELSTART, sent}, - {0} -}; - -static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam){ - static LONG defwndproc_counter = 0; - LRESULT ret; - struct message msg; - - /* log system messages, except for painting */ - if (message < WM_USER && - message != WM_PAINT && - message != WM_ERASEBKGND && - message != WM_NCPAINT && - message != WM_NCHITTEST && - message != WM_GETTEXT && - message != WM_GETICON && - message != WM_DEVICECHANGE) - { - trace("parent: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); - - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - add_message(sequences, PARENT_SEQ_INDEX, &msg); - } - - defwndproc_counter++; - ret = DefWindowProcA(hwnd, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static BOOL register_parent_wnd_class(void){ - WNDCLASSA cls; - - cls.style = 0; - cls.lpfnWndProc = parent_wnd_proc; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(NULL); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "Trackbar test parent class"; - return RegisterClassA(&cls); -} - -static HWND create_parent_window(void){ - if (!register_parent_wnd_class()) - return NULL; - - return CreateWindowEx(0, "Trackbar test parent class", - "Trackbar test parent window", - WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | - WS_MAXIMIZEBOX | WS_VISIBLE, - 0, 0, 100, 100, - GetDesktopWindow(), NULL, GetModuleHandleA(NULL), NULL); -} - -static LRESULT WINAPI trackbar_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam){ - WNDPROC oldproc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA); - static LONG defwndproc_counter = 0; - LRESULT ret; - struct message msg; - - trace("trackbar: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); - - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - add_message(sequences, TRACKBAR_SEQ_INDEX, &msg); - - defwndproc_counter++; - ret = CallWindowProcA(oldproc, hwnd, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static HWND create_trackbar(DWORD style, HWND parent){ - HWND hWndTrack; - WNDPROC oldproc; - RECT rect; - - GetClientRect(parent, &rect); - hWndTrack = CreateWindowEx( - 0, TRACKBAR_CLASS,"Trackbar Control", style, - rect.right,rect.bottom, 100, 50, - parent, NULL,GetModuleHandleA(NULL) ,NULL); - - if (!hWndTrack) return NULL; - - oldproc = (WNDPROC)SetWindowLongPtrA(hWndTrack, GWLP_WNDPROC, (LONG_PTR)trackbar_subclass_proc); - SetWindowLongPtrA(hWndTrack, GWLP_USERDATA, (LONG_PTR)oldproc); - - return hWndTrack; -} - -/* test functions for setters, getters, and sequences */ - -static void test_trackbar_buddy(HWND hWndTrackbar){ - HWND hWndLeftBuddy; - HWND hWndRightBuddy; - HWND hWndCurrentBuddy; - HWND rTest; - - flush_sequences(sequences, NUM_MSG_SEQUENCE); - - hWndLeftBuddy = CreateWindowEx(0, STATUSCLASSNAME, NULL, 0, - 0,0,300,20, NULL, NULL, NULL, NULL); - ok(hWndLeftBuddy != NULL, "Expected non NULL value\n"); - - if (hWndLeftBuddy != NULL){ - hWndCurrentBuddy = (HWND) SendMessage(hWndTrackbar, TBM_GETBUDDY, TRUE, 0); - rTest = (HWND) SendMessage(hWndTrackbar, TBM_SETBUDDY, FALSE, (LPARAM) hWndLeftBuddy); - ok(rTest == hWndCurrentBuddy, "Expected hWndCurrentBuddy\n"); - rTest = (HWND) SendMessage(hWndTrackbar, TBM_SETBUDDY, FALSE, (LPARAM) hWndLeftBuddy); - ok(rTest == hWndLeftBuddy, "Expected hWndLeftBuddy\n"); - } else - skip ("left buddy control not present?\n"); - - hWndRightBuddy = CreateWindowEx(0, STATUSCLASSNAME, NULL, 0, - 0,0,300,20,NULL,NULL, NULL, NULL); - - ok(hWndRightBuddy != NULL, "expected non NULL value\n"); - - /* test TBM_SETBUDDY */ - if (hWndRightBuddy != NULL){ - hWndCurrentBuddy = (HWND) SendMessage(hWndTrackbar, TBM_GETBUDDY, TRUE, 0); - rTest = (HWND) SendMessage(hWndTrackbar, TBM_SETBUDDY, TRUE, (LPARAM) hWndRightBuddy); - ok(rTest == hWndCurrentBuddy, "Expected hWndCurrentBuddy\n"); - rTest = (HWND) SendMessage(hWndTrackbar, TBM_SETBUDDY, TRUE, (LPARAM) hWndRightBuddy); - ok(rTest == hWndRightBuddy, "Expected hWndRightbuddy\n"); - } else - skip("Right buddy control not present?\n"); - - /* test TBM_GETBUDDY */ - if (hWndLeftBuddy != NULL){ - rTest = (HWND) SendMessage(hWndTrackbar, TBM_GETBUDDY, FALSE, 0); - ok(rTest == hWndLeftBuddy, "Expected hWndLeftBuddy\n"); - DestroyWindow(hWndLeftBuddy); - } - if (hWndRightBuddy != NULL){ - rTest = (HWND) SendMessage(hWndTrackbar, TBM_GETBUDDY, TRUE,0); - ok(rTest == hWndRightBuddy, "Expected hWndRightBuddy\n"); - DestroyWindow(hWndRightBuddy); - } - - ok_sequence(sequences, TRACKBAR_SEQ_INDEX, buddy_window_test_seq, "buddy test sequence", TRUE); - ok_sequence(sequences, PARENT_SEQ_INDEX, parent_buddy_window_test_seq, "parent buddy test seq", TRUE); - -} - -static void test_line_size(HWND hWndTrackbar){ - int r; - - flush_sequences(sequences, NUM_MSG_SEQUENCE); - - /* test TBM_SETLINESIZE */ - r = SendMessage(hWndTrackbar, TBM_SETLINESIZE, 0, 10); - r = SendMessage(hWndTrackbar, TBM_SETLINESIZE, 0, 4); - expect(10, r); - - /* test TBM_GETLINESIZE */ - r = SendMessage(hWndTrackbar, TBM_GETLINESIZE, 0,0); - expect(4, r); - - ok_sequence(sequences, TRACKBAR_SEQ_INDEX, line_size_test_seq, "linesize test sequence", FALSE); - ok_sequence(sequences, PARENT_SEQ_INDEX, parent_empty_test_seq, "parent line test sequence", FALSE); -} - - -static void test_page_size(HWND hWndTrackbar){ - int r; - - flush_sequences(sequences, NUM_MSG_SEQUENCE); - - /* test TBM_SETPAGESIZE */ - r = SendMessage(hWndTrackbar, TBM_SETPAGESIZE, 0, 10); - expect(20, r); - r = SendMessage(hWndTrackbar, TBM_SETPAGESIZE, 0, -1); - expect(10, r); - - /* test TBM_GETPAGESIZE */ - r = SendMessage(hWndTrackbar, TBM_GETPAGESIZE, 0,0); - expect(20, r); - - ok_sequence(sequences, TRACKBAR_SEQ_INDEX, page_size_test_seq, "page size test sequence", FALSE); - ok_sequence(sequences, PARENT_SEQ_INDEX, parent_empty_test_seq, "parent page size test sequence", FALSE); - - /* check for zero page size */ - r = SendMessage(hWndTrackbar, TBM_SETPAGESIZE, 0, 0); - expect(20, r); - r = SendMessage(hWndTrackbar, TBM_GETPAGESIZE, 0, 0); - expect(0, r); - /* revert to default */ - r = SendMessage(hWndTrackbar, TBM_SETPAGESIZE, 0, -1); - expect(0, r); - r = SendMessage(hWndTrackbar, TBM_GETPAGESIZE, 0, 0); - expect(20, r); - /* < -1 */ - r = SendMessage(hWndTrackbar, TBM_SETPAGESIZE, 0, -2); - expect(20, r); - r = SendMessage(hWndTrackbar, TBM_GETPAGESIZE, 0, 0); - expect(-2, r); -} - -static void test_position(HWND hWndTrackbar){ - int r; - - flush_sequences(sequences, NUM_MSG_SEQUENCE); - /* test TBM_SETPOS */ - SendMessage(hWndTrackbar, TBM_SETPOS, TRUE, -1); - r = SendMessage(hWndTrackbar, TBM_GETPOS, 0, 0); - expect(0, r); - SendMessage(hWndTrackbar, TBM_SETPOS, TRUE, 5); - r = SendMessage(hWndTrackbar, TBM_GETPOS, 0,0); - expect(5, r); - SendMessage(hWndTrackbar, TBM_SETPOS, TRUE, 5); - SendMessage(hWndTrackbar, TBM_SETPOS, TRUE, 1000); - r = SendMessage(hWndTrackbar, TBM_GETPOS, 0,0); - expect(100, r); - SendMessage(hWndTrackbar, TBM_SETPOS, FALSE, 20); - r = SendMessage(hWndTrackbar, TBM_GETPOS, 0,0); - expect(20, r); - SendMessage(hWndTrackbar, TBM_SETPOS, TRUE, 20); - - /* test TBM_GETPOS */ - r = SendMessage(hWndTrackbar, TBM_GETPOS, 0,0); - expect(20, r); - - ok_sequence(sequences, TRACKBAR_SEQ_INDEX, position_test_seq, "position test sequence", TRUE); - ok_sequence(sequences, PARENT_SEQ_INDEX, parent_position_test_seq, "parent position test sequence", TRUE); -} - -static void test_range(HWND hWndTrackbar){ - int r; - - flush_sequences(sequences, NUM_MSG_SEQUENCE); - /* test TBM_SETRANGE */ - SendMessage(hWndTrackbar, TBM_SETRANGE, TRUE, MAKELONG(0, 10)); - r = SendMessage(hWndTrackbar, TBM_GETRANGEMAX, 0,0); - expect(10, r); - r = SendMessage(hWndTrackbar, TBM_GETRANGEMIN, 0,0); - expect(0, r); - SendMessage(hWndTrackbar, TBM_SETRANGE, TRUE, MAKELONG(-1, 1000)); - r = SendMessage(hWndTrackbar, TBM_GETRANGEMAX, 0,0); - expect(1000, r); - r = SendMessage(hWndTrackbar, TBM_GETRANGEMIN, 0,0); - expect(-1, r); - SendMessage(hWndTrackbar, TBM_SETRANGE, TRUE, MAKELONG(10, 0)); - r = SendMessage(hWndTrackbar, TBM_GETRANGEMAX, 0,0); - expect(0, r); - r = SendMessage(hWndTrackbar, TBM_GETRANGEMIN, 0,0); - expect(10, r); - SendMessage(hWndTrackbar, TBM_SETRANGE, FALSE, MAKELONG(0,10)); - r = SendMessage(hWndTrackbar, TBM_GETRANGEMAX, 0,0); - expect(10, r); - r = SendMessage(hWndTrackbar, TBM_GETRANGEMIN, 0,0); - expect(0, r); - - /*test TBM_SETRANGEMAX */ - SendMessage(hWndTrackbar, TBM_SETRANGEMAX, TRUE, 10); - r = SendMessage(hWndTrackbar, TBM_GETRANGEMAX, 0,0); - expect(10, r); - SendMessage(hWndTrackbar, TBM_SETRANGEMAX, TRUE, -1); - r = SendMessage(hWndTrackbar, TBM_GETRANGEMAX, 0,0); - expect(-1, r); - SendMessage(hWndTrackbar, TBM_SETRANGEMAX, FALSE, 10); - r = SendMessage(hWndTrackbar, TBM_GETRANGEMAX, 0,0); - expect(10, r); - - /* testing TBM_SETRANGEMIN */ - SendMessage(hWndTrackbar, TBM_SETRANGEMIN, TRUE, 0); - r = SendMessage(hWndTrackbar, TBM_GETRANGEMIN, 0,0); - expect(0, r); - SendMessage(hWndTrackbar, TBM_SETRANGEMIN, TRUE, 10); - r = SendMessage(hWndTrackbar, TBM_GETRANGEMIN, 0,0); - expect(10, r); - SendMessage(hWndTrackbar, TBM_SETRANGEMIN, TRUE, -10); - r = SendMessage(hWndTrackbar, TBM_GETRANGEMIN, 0,0); - expect(-10, r); - SendMessage(hWndTrackbar, TBM_SETRANGEMIN, FALSE, 5); - r = SendMessage(hWndTrackbar, TBM_GETRANGEMIN, 0,0); - expect(5, r); - - /* test TBM_GETRANGEMAX */ - r = SendMessage(hWndTrackbar, TBM_GETRANGEMAX, 0,0); - expect(10, r); - - /* test TBM_GETRANGEMIN */ - r = SendMessage(hWndTrackbar, TBM_GETRANGEMIN, 0,0); - expect(5, r); - - ok_sequence(sequences, TRACKBAR_SEQ_INDEX, range_test_seq, "range test sequence", TRUE); - ok_sequence(sequences, PARENT_SEQ_INDEX, parent_range_test_seq, "parent range test sequence", TRUE); -} - -static void test_selection(HWND hWndTrackbar){ - int r; - - flush_sequences(sequences, NUM_MSG_SEQUENCE); - /* test TBM_SETSEL */ - SendMessage(hWndTrackbar, TBM_SETSEL, TRUE, MAKELONG(0,10)); - r = SendMessage(hWndTrackbar, TBM_GETSELEND, 0,0); - expect(10, r); - r = SendMessage(hWndTrackbar, TBM_GETSELSTART, 0,0); - expect(5, r); - SendMessage(hWndTrackbar, TBM_SETSEL, TRUE, MAKELONG(5, 20)); - r = SendMessage(hWndTrackbar, TBM_GETSELEND, 0,0); - expect(10, r); - r = SendMessage(hWndTrackbar, TBM_GETSELSTART, 0,0); - expect(5, r); - SendMessage(hWndTrackbar, TBM_SETSEL, FALSE, MAKELONG(5, 10)); - r = SendMessage(hWndTrackbar, TBM_GETSELEND, 0,0); - expect(10, r); - r = SendMessage(hWndTrackbar, TBM_GETSELSTART, 0,0); - expect(5, r); - - /* test TBM_SETSELEND */ - SendMessage(hWndTrackbar, TBM_SETSELEND, TRUE, 10); - r = SendMessage(hWndTrackbar, TBM_GETSELEND, 0,0); - expect(10, r); - SendMessage(hWndTrackbar, TBM_SETSELEND, TRUE, 20); - r = SendMessage(hWndTrackbar, TBM_GETSELEND, 0,0); - expect(10, r); - SendMessage(hWndTrackbar, TBM_SETSELEND, TRUE, 4); - r = SendMessage(hWndTrackbar, TBM_GETSELEND, 0,0); - expect(4, r); - SendMessage(hWndTrackbar, TBM_SETSELEND, FALSE, 2); - r = SendMessage(hWndTrackbar, TBM_GETSELEND, 0,0); - expect(2, r); - - /* test TBM_GETSELEND */ - r = SendMessage(hWndTrackbar, TBM_GETSELEND, 0,0); - expect(2, r); - - /* testing TBM_SETSELSTART */ - SendMessage(hWndTrackbar, TBM_SETSELSTART, TRUE, 5); - r = SendMessage(hWndTrackbar, TBM_GETSELSTART, 0,0); - expect(5, r); - SendMessage(hWndTrackbar, TBM_SETSELSTART, TRUE, 0); - r = SendMessage(hWndTrackbar, TBM_GETSELSTART, 0,0); - expect(5, r); - SendMessage(hWndTrackbar, TBM_SETSELSTART, TRUE, 20); - r = SendMessage(hWndTrackbar, TBM_GETSELSTART, 0,0); - expect(20, r); - SendMessage(hWndTrackbar, TBM_SETSELSTART, FALSE, 8); - r = SendMessage(hWndTrackbar, TBM_GETSELSTART, 0,0); - expect(8, r); - - /* test TBM_GETSELSTART */ - r = SendMessage(hWndTrackbar, TBM_GETSELSTART, 0,0); - expect(8, r); - - ok_sequence(sequences, TRACKBAR_SEQ_INDEX, selection_test_seq, "selection test sequence", TRUE); - ok_sequence(sequences, PARENT_SEQ_INDEX, parent_selection_test_seq, "parent selection test seqence", TRUE); -} - -static void test_thumb_length(HWND hWndTrackbar){ - int r; - - flush_sequences(sequences, NUM_MSG_SEQUENCE); - /* testing TBM_SETTHUMBLENGTH */ - SendMessage(hWndTrackbar, TBM_SETTHUMBLENGTH, 15, 0); - r = SendMessage(hWndTrackbar, TBM_GETTHUMBLENGTH, 0,0); - expect(15, r); - SendMessage(hWndTrackbar, TBM_SETTHUMBLENGTH, 20, 0); - r = SendMessage(hWndTrackbar, TBM_GETTHUMBLENGTH, 0,0); - expect(20, r); - - /* test TBM_GETTHUMBLENGTH */ - r = SendMessage(hWndTrackbar, TBM_GETTHUMBLENGTH, 0,0); - expect(20, r); - - ok_sequence(sequences, TRACKBAR_SEQ_INDEX, thumb_length_test_seq, "thumb length test sequence", TRUE); - ok_sequence(sequences, PARENT_SEQ_INDEX, parent_thumb_length_test_seq, "parent thumb lenth test sequence", TRUE); -} - -static void test_tic_settings(HWND hWndTrackbar){ - int r; - - /* testing TBM_SETTIC */ - /* Set tics at 5 and 10 */ - /* 0 and 20 are out of range and should not be set */ - r = SendMessage(hWndTrackbar, TBM_GETRANGEMAX, 0, 0); - expect(10, r); - r = SendMessage(hWndTrackbar, TBM_GETRANGEMIN, 0, 0); - expect(5, r); - - flush_sequences(sequences, NUM_MSG_SEQUENCE); - r = SendMessage(hWndTrackbar, TBM_SETTIC, 0, 0); - ok(r == FALSE, "Expected FALSE, got %d\n", r); - r = SendMessage(hWndTrackbar, TBM_SETTIC, 0, 5); - ok(r == TRUE, "Expected TRUE, got %d\n", r); - r = SendMessage(hWndTrackbar, TBM_SETTIC, 0, 10); - ok(r == TRUE, "Expected TRUE, got %d\n", r); - - r = SendMessage(hWndTrackbar, TBM_SETTIC, 0, 20); - ok(r == FALSE, "Expected False, got %d\n", r); - - /* test TBM_SETTICFREQ */ - SendMessage(hWndTrackbar, TBM_SETRANGE, TRUE, MAKELONG(0, 10)); - SendMessage(hWndTrackbar, TBM_SETTICFREQ, 2, 0); - r = SendMessage(hWndTrackbar, TBM_GETNUMTICS, 0, 0); - expect(6, r); - SendMessage(hWndTrackbar, TBM_SETTICFREQ, 5, 0); - r = SendMessage(hWndTrackbar, TBM_GETNUMTICS, 0, 0); - expect(3, r); - SendMessage(hWndTrackbar, TBM_SETTICFREQ, 15, 0); - r = SendMessage(hWndTrackbar, TBM_GETNUMTICS, 0, 0); - expect(2, r); - - /* test TBM_GETNUMTICS */ - /* since TIC FREQ is 15, there should be only 2 tics now */ - r = SendMessage(hWndTrackbar, TBM_GETNUMTICS, 0, 0); - expect(2, r); - - ok_sequence(sequences, TRACKBAR_SEQ_INDEX, tic_settings_test_seq, "tic settings test sequence", TRUE); - ok_sequence(sequences, PARENT_SEQ_INDEX, parent_tic_settings_test_seq, "parent tic settings test sequence", TRUE); - - /* range [0,0], freq = 1 */ - SendMessage(hWndTrackbar, TBM_SETRANGEMAX, TRUE, 0); - SendMessage(hWndTrackbar, TBM_SETRANGEMIN, TRUE, 0); - SendMessage(hWndTrackbar, TBM_SETTICFREQ, 1, 0); - r = SendMessage(hWndTrackbar, TBM_GETNUMTICS, 0, 0); - expect(2, r); - /* range [0,1], freq = 1 */ - SendMessage(hWndTrackbar, TBM_SETRANGEMAX, TRUE, 1); - SendMessage(hWndTrackbar, TBM_SETRANGEMIN, TRUE, 0); - SendMessage(hWndTrackbar, TBM_SETTICFREQ, 1, 0); - r = SendMessage(hWndTrackbar, TBM_GETNUMTICS, 0, 0); - expect(2, r); - /* range [0,2], freq = 1 */ - SendMessage(hWndTrackbar, TBM_SETRANGEMAX, TRUE, 2); - SendMessage(hWndTrackbar, TBM_SETRANGEMIN, TRUE, 0); - SendMessage(hWndTrackbar, TBM_SETTICFREQ, 1, 0); - r = SendMessage(hWndTrackbar, TBM_GETNUMTICS, 0, 0); - expect(3, r); -} - -static void test_tic_placement(HWND hWndTrackbar){ - int r; - DWORD *rPTics; - DWORD numtics; - - SendMessage(hWndTrackbar, TBM_SETRANGE, TRUE, MAKELONG(1, 6)); - SendMessage(hWndTrackbar, TBM_SETTICFREQ, 1, 0); - - numtics = SendMessage(hWndTrackbar, TBM_GETNUMTICS, 0, 0); - ok(numtics == 6, "Expected 6, got %d\n", numtics); - - flush_sequences(sequences, NUM_MSG_SEQUENCE); - /* test TBM_GETPTICS */ - rPTics = (DWORD *) SendMessage(hWndTrackbar, TBM_GETPTICS, 0,0); - expect(2, rPTics[0]); - expect(3, rPTics[1]); - expect(4, rPTics[2]); - expect(5, rPTics[3]); - - /* test TBM_GETTIC */ - r = SendMessage(hWndTrackbar, TBM_GETTIC, 0,0); - expect(2, r); - r = SendMessage(hWndTrackbar, TBM_GETTIC, 2,0); - expect(4, r); - r = SendMessage(hWndTrackbar, TBM_GETTIC, 4,0); - expect(-1, r); - - /* test TBM_GETTICPIC */ - r = SendMessage(hWndTrackbar, TBM_GETTICPOS, 0, 0); - ok(r > 0, "Expected r > 0, got %d\n", r); - r = SendMessage(hWndTrackbar, TBM_GETTICPOS, 2, 0); - ok(r > 0, "Expected r > 0, got %d\n", r); - - ok_sequence(sequences, TRACKBAR_SEQ_INDEX, tic_placement_test_seq, "get tic placement test sequence", FALSE); - ok_sequence(sequences, PARENT_SEQ_INDEX, parent_empty_test_seq, "parent get tic placement test sequence", FALSE); -} - - -static void test_tool_tips(HWND hWndTrackbar){ - int r; - HWND hWndTooltip; - HWND rTest; - - flush_sequences(sequences, NUM_MSG_SEQUENCE); - /* testing TBM_SETTIPSIDE */ - r = SendMessage(hWndTrackbar, TBM_SETTIPSIDE, TBTS_TOP, 0); - expect(TBTS_TOP, r); - r = SendMessage(hWndTrackbar, TBM_SETTIPSIDE, TBTS_LEFT, 0); - expect(TBTS_TOP, r); - r = SendMessage(hWndTrackbar, TBM_SETTIPSIDE, TBTS_BOTTOM, 0); - expect(TBTS_LEFT, r); - r = SendMessage(hWndTrackbar, TBM_SETTIPSIDE, TBTS_RIGHT, 0); - expect(TBTS_BOTTOM, r); - - /* testing TBM_SETTOOLTIPS */ - hWndTooltip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, NULL, 0, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - NULL, NULL, NULL, NULL); - - ok(hWndTooltip != NULL, "Expected non NULL value\n"); - if (hWndTooltip != NULL){ - SendMessage(hWndTrackbar, TBM_SETTOOLTIPS, (LPARAM) hWndTooltip, 0); - rTest = (HWND) SendMessage(hWndTrackbar, TBM_GETTOOLTIPS, 0,0); - ok(rTest == hWndTooltip, "Expected hWndToolTip, got\n"); - SendMessage(hWndTrackbar, TBM_SETTOOLTIPS, 0, 0); - rTest = (HWND) SendMessage(hWndTrackbar, TBM_GETTOOLTIPS, 0,0); - ok(rTest == NULL, "Expected NULL\n"); - SendMessage(hWndTrackbar, TBM_SETTOOLTIPS, (LPARAM) hWndTooltip, 5); - rTest = (HWND) SendMessage(hWndTrackbar, TBM_GETTOOLTIPS, 0,0); - ok(rTest == hWndTooltip, "Expected hWndTooltip, got\n"); - } else - skip("tool tip control not present?\n"); - - /* test TBM_GETTOOLTIPS */ - rTest = (HWND) SendMessage(hWndTrackbar, TBM_GETTOOLTIPS, 0,0); - ok(rTest == hWndTooltip, "Expected hWndTooltip\n"); - - ok_sequence(sequences, TRACKBAR_SEQ_INDEX, tool_tips_test_seq, "tool tips test sequence", FALSE); - ok_sequence(sequences, PARENT_SEQ_INDEX, parent_empty_test_seq, "parent tool tips test sequence", FALSE); -} - - -static void test_unicode(HWND hWndTrackbar){ - int r; - - flush_sequences(sequences, NUM_MSG_SEQUENCE); - /* testing TBM_SETUNICODEFORMAT */ - r = SendMessage(hWndTrackbar, TBM_SETUNICODEFORMAT, TRUE, 0); - ok(r == FALSE, "Expected FALSE, got %d\n",r); - r = SendMessage(hWndTrackbar, TBM_SETUNICODEFORMAT, FALSE, 0); - ok(r == TRUE, "Expected TRUE, got %d\n",r); - - /* test TBM_GETUNICODEFORMAT */ - r = SendMessage(hWndTrackbar, TBM_GETUNICODEFORMAT, 0,0); - ok(r == FALSE, "Expected FALSE, got %d\n",r); - - ok_sequence(sequences, TRACKBAR_SEQ_INDEX, unicode_test_seq, "unicode test sequence", FALSE); - ok_sequence(sequences, PARENT_SEQ_INDEX, parent_empty_test_seq, "parent unicode test sequence", FALSE); -} - -static void test_ignore_selection(HWND hWndTrackbar){ - int r; - - flush_sequences(sequences, NUM_MSG_SEQUENCE); - /* test TBM_SETSEL ensure that it is ignored */ - SendMessage(hWndTrackbar, TBM_SETSEL, TRUE, MAKELONG(0,10)); - r = SendMessage(hWndTrackbar, TBM_GETSELEND, 0,0); - expect(0, r); - r = SendMessage(hWndTrackbar, TBM_GETSELSTART, 0,0); - expect(0, r); - SendMessage(hWndTrackbar, TBM_SETSEL, FALSE, MAKELONG(0,10)); - r = SendMessage(hWndTrackbar, TBM_GETSELEND, 0,0); - expect(0, r); - r = SendMessage(hWndTrackbar, TBM_GETSELSTART, 0,0); - expect(0, r); - - /* test TBM_SETSELEND, ensure that it is ignored */ - SendMessage(hWndTrackbar, TBM_SETSELEND, TRUE, 0); - r = SendMessage(hWndTrackbar, TBM_GETSELEND, 0,0); - expect(0, r); - SendMessage(hWndTrackbar, TBM_SETSELEND, TRUE, 10); - r = SendMessage(hWndTrackbar, TBM_GETSELEND, 0,0); - expect(0,r); - SendMessage(hWndTrackbar, TBM_SETSELEND, FALSE, 0); - r = SendMessage(hWndTrackbar, TBM_GETSELEND, 0,0); - expect(0, r); - - /* test TBM_SETSELSTART, ensure that it is ignored */ - SendMessage(hWndTrackbar, TBM_SETSELSTART, TRUE, 0); - r = SendMessage(hWndTrackbar, TBM_GETSELSTART, 0,0); - expect(0, r); - SendMessage(hWndTrackbar, TBM_SETSELSTART, TRUE, 10); - r = SendMessage(hWndTrackbar, TBM_GETSELSTART, 0,0); - expect(0,r); - SendMessage(hWndTrackbar, TBM_SETSELSTART, FALSE, 0); - r = SendMessage(hWndTrackbar, TBM_GETSELSTART, 0,0); - expect(0, r); - - ok_sequence(sequences, TRACKBAR_SEQ_INDEX, ignore_selection_test_seq, "ignore selection setting test sequence", FALSE); - ok_sequence(sequences, PARENT_SEQ_INDEX, parent_empty_test_seq, "parent ignore selection setting test sequence", FALSE); -} - -static void test_initial_state(void) -{ - HWND hWnd; - DWORD ret; - - hWnd = create_trackbar(0, hWndParent); - - ret = SendMessage(hWnd, TBM_GETNUMTICS, 0, 0); - expect(2, ret); - ret = SendMessage(hWnd, TBM_GETTIC, 0, 0); - expect(-1, ret); - ret = SendMessage(hWnd, TBM_GETTICPOS, 0, 0); - expect(-1, ret); - - DestroyWindow(hWnd); -} - -START_TEST(trackbar) -{ - DWORD style = WS_VISIBLE | TBS_TOOLTIPS | TBS_ENABLESELRANGE | TBS_FIXEDLENGTH | TBS_AUTOTICKS; - HWND hWndTrackbar; - - init_msg_sequences(sequences, NUM_MSG_SEQUENCE); - InitCommonControls(); - - /* create parent window */ - hWndParent = create_parent_window(); - ok(hWndParent != NULL, "Failed to create parent Window!\n"); - - if(!hWndParent){ - skip("parent window not present\n"); - return; - } - - flush_sequences(sequences, NUM_MSG_SEQUENCE); - - /* create trackbar with set styles */ - hWndTrackbar = create_trackbar(style, hWndParent); - - ok(hWndTrackbar != NULL, "Expected non NULL value\n"); - - if (!hWndTrackbar){ - skip("trackbar control not present?\n"); - return; - } - - ok_sequence(sequences, TRACKBAR_SEQ_INDEX, create_trackbar_wnd_seq, "create Trackbar Window", FALSE); - ok_sequence(sequences, PARENT_SEQ_INDEX, parent_create_trackbar_wnd_seq, "parent trackbar window", TRUE); - flush_sequences(sequences, NUM_MSG_SEQUENCE); - - /* TEST OF ALL SETTER and GETTER MESSAGES with required styles turned on*/ - test_trackbar_buddy(hWndTrackbar); - test_line_size(hWndTrackbar); - test_page_size(hWndTrackbar); - test_position(hWndTrackbar); - test_range(hWndTrackbar); - test_selection(hWndTrackbar); - test_thumb_length(hWndTrackbar); - test_tic_settings(hWndTrackbar); - test_tic_placement(hWndTrackbar); - test_tool_tips(hWndTrackbar); - test_unicode(hWndTrackbar); - - flush_sequences(sequences, NUM_MSG_SEQUENCE); - DestroyWindow(hWndTrackbar); - - /* test getters and setters without styles set */ - hWndTrackbar = create_trackbar(0, hWndParent); - - ok(hWndTrackbar != NULL, "Expected non NULL value\n"); - - if (!hWndTrackbar){ - skip("trackbar control not present?\n"); - return; - } - - ok_sequence(sequences, PARENT_SEQ_INDEX, parent_new_window_test_seq, "new trackbar window test sequence", TRUE); - - test_ignore_selection(hWndTrackbar); - - DestroyWindow(hWndTrackbar); - - test_initial_state(); - - DestroyWindow(hWndParent); -} diff --git a/rostests/winetests/comctl32/treeview.c b/rostests/winetests/comctl32/treeview.c deleted file mode 100644 index 320deba0e0e..00000000000 --- a/rostests/winetests/comctl32/treeview.c +++ /dev/null @@ -1,1262 +0,0 @@ -/* Unit tests for treeview. - * - * Copyright 2005 Krzysztof Foltman - * Copyright 2007 Christopher James Peterson - * - * 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 "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winnls.h" -#include "winreg.h" -#include "commctrl.h" - -#include "wine/test.h" -#include "msg.h" - -const char *TEST_CALLBACK_TEXT = "callback_text"; - -#define NUM_MSG_SEQUENCES 2 -#define TREEVIEW_SEQ_INDEX 0 -#define PARENT_SEQ_INDEX 1 - -#define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got) - -static struct msg_sequence *sequences[NUM_MSG_SEQUENCES]; - -static const struct message FillRootSeq[] = { - { TVM_INSERTITEM, sent }, - { TVM_INSERTITEM, sent }, - { 0 } -}; - -static const struct message rootnone_select_seq[] = { - { TVM_SELECTITEM, sent|wparam, 9 }, - { TVM_SELECTITEM, sent|wparam, 9 }, - { TVM_SELECTITEM, sent|wparam, 9 }, - { TVM_SELECTITEM, sent|wparam, 9 }, - { TVM_SELECTITEM, sent|wparam, 9 }, - { TVM_SELECTITEM, sent|wparam, 9 }, - { 0 } -}; - -static const struct message rootchild_select_seq[] = { - { TVM_SELECTITEM, sent|wparam, 9 }, - { TVM_SELECTITEM, sent|wparam, 9 }, - { TVM_SELECTITEM, sent|wparam, 9 }, - { TVM_SELECTITEM, sent|wparam, 9 }, - { TVM_SELECTITEM, sent|wparam, 9 }, - { TVM_SELECTITEM, sent|wparam, 9 }, - { 0 } -}; - -static const struct message getitemtext_seq[] = { - { TVM_INSERTITEM, sent }, - { TVM_GETITEM, sent }, - { TVM_DELETEITEM, sent }, - { 0 } -}; - -static const struct message focus_seq[] = { - { TVM_INSERTITEM, sent }, - { TVM_INSERTITEM, sent }, - { TVM_SELECTITEM, sent|wparam, 9 }, - /* The following end up out of order in wine */ - { WM_WINDOWPOSCHANGING, sent|defwinproc }, - { WM_NCCALCSIZE, sent|wparam|defwinproc, TRUE }, - { WM_WINDOWPOSCHANGED, sent|defwinproc }, - { WM_SIZE, sent|defwinproc }, - { WM_PAINT, sent|defwinproc }, - { WM_NCPAINT, sent|wparam|defwinproc, 1 }, - { WM_ERASEBKGND, sent|defwinproc }, - { TVM_EDITLABEL, sent }, - { WM_COMMAND, sent|wparam|defwinproc, MAKEWPARAM(0, EN_UPDATE) }, - { WM_COMMAND, sent|wparam|defwinproc, MAKEWPARAM(0, EN_CHANGE) }, - { WM_PARENTNOTIFY, sent|wparam|defwinproc, MAKEWPARAM(WM_CREATE, 0) }, - { WM_KILLFOCUS, sent|defwinproc }, - { WM_PAINT, sent|defwinproc }, - { WM_IME_SETCONTEXT, sent|defwinproc|optional }, - { WM_COMMAND, sent|wparam|defwinproc, MAKEWPARAM(0, EN_SETFOCUS) }, - { WM_ERASEBKGND, sent|defwinproc|optional }, - { WM_CTLCOLOREDIT, sent|defwinproc|optional }, - { WM_CTLCOLOREDIT, sent|defwinproc|optional }, - { 0 } -}; - -static const struct message test_get_set_bkcolor_seq[] = { - { TVM_GETBKCOLOR, sent|wparam|lparam, 0, 0 }, - { TVM_SETBKCOLOR, sent|wparam|lparam, 0, 0 }, - { TVM_GETBKCOLOR, sent|wparam|lparam, 0, 0 }, - { TVM_SETBKCOLOR, sent|wparam|lparam, 0, 0x00ffffff }, - { TVM_GETBKCOLOR, sent|wparam|lparam, 0, 0 }, - { TVM_SETBKCOLOR, sent|wparam|lparam, 0, -1 }, - { 0 } -}; - -static const struct message test_get_set_imagelist_seq[] = { - { TVM_SETIMAGELIST, sent|wparam|lparam, 0, 0 }, - { TVM_GETIMAGELIST, sent|wparam|lparam, 0, 0 }, - { 0 } -}; - -static const struct message test_get_set_indent_seq[] = { - { TVM_SETINDENT, sent|wparam|lparam, 0, 0 }, - { TVM_GETINDENT, sent|wparam|lparam, 0, 0 }, - /* The actual amount to indent is dependent on the system for this message */ - { TVM_SETINDENT, sent }, - { TVM_GETINDENT, sent|wparam|lparam, 0, 0 }, - { 0 } -}; - -static const struct message test_get_set_insertmarkcolor_seq[] = { - { TVM_SETINSERTMARKCOLOR, sent|wparam|lparam, 0, 0 }, - { TVM_GETINSERTMARKCOLOR, sent|wparam|lparam, 0, 0 }, - { 0 } -}; - -static const struct message test_get_set_item_seq[] = { - { TVM_GETITEM, sent }, - { TVM_SETITEM, sent }, - { TVM_GETITEM, sent }, - { TVM_SETITEM, sent }, - { 0 } -}; - -static const struct message test_get_set_itemheight_seq[] = { - { TVM_GETITEMHEIGHT, sent|wparam|lparam, 0, 0 }, - { TVM_SETITEMHEIGHT, sent|wparam|lparam, -1, 0 }, - { TVM_GETITEMHEIGHT, sent|wparam|lparam, 0, 0 }, - { TVM_SETITEMHEIGHT, sent|lparam, 0xcccccccc, 0 }, - { TVM_GETITEMHEIGHT, sent|wparam|lparam|optional, 0, 0 }, - { TVM_SETITEMHEIGHT, sent|wparam|lparam|optional, 9, 0 }, - { TVM_GETITEMHEIGHT, sent|wparam|lparam, 0, 0 }, - { 0 } -}; - -static const struct message test_get_set_scrolltime_seq[] = { - { TVM_SETSCROLLTIME, sent|wparam|lparam, 20, 0 }, - { TVM_GETSCROLLTIME, sent|wparam|lparam, 0, 0 }, - { 0 } -}; - -static const struct message test_get_set_textcolor_seq[] = { - { TVM_GETTEXTCOLOR, sent|wparam|lparam, 0, 0 }, - { TVM_SETTEXTCOLOR, sent|wparam|lparam, 0, 0 }, - { TVM_GETTEXTCOLOR, sent|wparam|lparam, 0, 0 }, - { TVM_SETTEXTCOLOR, sent|wparam|lparam, 0, RGB(255, 255, 255) }, - { TVM_GETTEXTCOLOR, sent|wparam|lparam, 0, 0 }, - { TVM_SETTEXTCOLOR, sent|wparam|lparam, 0, CLR_NONE }, - { 0 } -}; - -static const struct message test_get_set_tooltips_seq[] = { - { WM_KILLFOCUS, sent }, - { WM_IME_SETCONTEXT, sent|optional }, - { WM_IME_NOTIFY, sent|optional }, - { TVM_SETTOOLTIPS, sent|wparam|lparam, 0, 0 }, - { TVM_GETTOOLTIPS, sent|wparam|lparam, 0, 0 }, - { 0 } -}; - -static const struct message test_get_set_unicodeformat_seq[] = { - { TVM_SETUNICODEFORMAT, sent|wparam|lparam, TRUE, 0 }, - { TVM_GETUNICODEFORMAT, sent|wparam|lparam, 0, 0 }, - { TVM_SETUNICODEFORMAT, sent|wparam|lparam, 0, 0 }, - { TVM_GETUNICODEFORMAT, sent|wparam|lparam, 0, 0 }, - { TVM_SETUNICODEFORMAT, sent|wparam|lparam, 0, 0 }, - { 0 } -}; - -static const struct message parent_expand_seq[] = { - { WM_NOTIFY, sent|id, 0, 0, TVN_ITEMEXPANDING }, - { WM_NOTIFY, sent|id, 0, 0, TVN_ITEMEXPANDED }, - { 0 } -}; - -static const struct message empty_seq[] = { - { 0 } -}; - -static HWND hMainWnd; - -static HTREEITEM hRoot, hChild; - -static int pos = 0; -static char sequence[256]; - -static void Clear(void) -{ - pos = 0; - sequence[0] = '\0'; -} - -static void AddItem(char ch) -{ - sequence[pos++] = ch; - sequence[pos] = '\0'; -} - -static void IdentifyItem(HTREEITEM hItem) -{ - if (hItem == hRoot) { - AddItem('R'); - return; - } - if (hItem == hChild) { - AddItem('C'); - return; - } - if (hItem == NULL) { - AddItem('n'); - return; - } - AddItem('?'); -} - -/* This function hooks in and records all messages to the treeview control */ -static LRESULT WINAPI TreeviewWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - static LONG defwndproc_counter = 0; - LRESULT ret; - struct message msg; - WNDPROC lpOldProc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA); - - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - add_message(sequences, TREEVIEW_SEQ_INDEX, &msg); - - defwndproc_counter++; - ret = CallWindowProcA(lpOldProc, hwnd, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static HWND create_treeview_control(void) -{ - WNDPROC pOldWndProc; - HWND hTree; - - hTree = CreateWindowExA(WS_EX_CLIENTEDGE, WC_TREEVIEWA, NULL, WS_CHILD|WS_VISIBLE| - TVS_LINESATROOT|TVS_HASLINES|TVS_HASBUTTONS|TVS_EDITLABELS, - 0, 0, 120, 100, hMainWnd, (HMENU)100, GetModuleHandleA(0), 0); - - SetFocus(hTree); - - /* Record the old WNDPROC so we can call it after recording the messages */ - pOldWndProc = (WNDPROC)SetWindowLongPtrA(hTree, GWLP_WNDPROC, (LONG_PTR)TreeviewWndProc); - SetWindowLongPtrA(hTree, GWLP_USERDATA, (LONG_PTR)pOldWndProc); - - return hTree; -} - -static void fill_tree(HWND hTree) -{ - TVINSERTSTRUCTA ins; - static CHAR root[] = "Root", - child[] = "Child"; - - ins.hParent = TVI_ROOT; - ins.hInsertAfter = TVI_ROOT; - U(ins).item.mask = TVIF_TEXT; - U(ins).item.pszText = root; - hRoot = TreeView_InsertItem(hTree, &ins); - - ins.hParent = hRoot; - ins.hInsertAfter = TVI_FIRST; - U(ins).item.mask = TVIF_TEXT; - U(ins).item.pszText = child; - hChild = TreeView_InsertItem(hTree, &ins); -} - -static void test_fillroot(void) -{ - TVITEM tvi; - HWND hTree; - - hTree = create_treeview_control(); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - fill_tree(hTree); - - Clear(); - AddItem('A'); - assert(hRoot); - AddItem('B'); - assert(hChild); - AddItem('.'); - ok_sequence(sequences, TREEVIEW_SEQ_INDEX, FillRootSeq, "FillRoot", FALSE); - ok(!strcmp(sequence, "AB."), "Item creation\n"); - - /* UMLPad 1.15 depends on this being not -1 (I_IMAGECALLBACK) */ - tvi.hItem = hRoot; - tvi.mask = TVIF_IMAGE | TVIF_SELECTEDIMAGE; - SendMessage( hTree, TVM_GETITEM, 0, (LPARAM)&tvi ); - ok(tvi.iImage == 0, "tvi.iImage=%d\n", tvi.iImage); - ok(tvi.iSelectedImage == 0, "tvi.iSelectedImage=%d\n", tvi.iSelectedImage); - - DestroyWindow(hTree); -} - -static void test_callback(void) -{ - HTREEITEM hRoot; - HTREEITEM hItem1, hItem2; - TVINSERTSTRUCTA ins; - TVITEM tvi; - CHAR test_string[] = "Test_string"; - CHAR buf[128]; - LRESULT ret; - HWND hTree; - - hTree = create_treeview_control(); - fill_tree(hTree); - - ret = TreeView_DeleteAllItems(hTree); - ok(ret == TRUE, "ret\n"); - ins.hParent = TVI_ROOT; - ins.hInsertAfter = TVI_ROOT; - U(ins).item.mask = TVIF_TEXT; - U(ins).item.pszText = LPSTR_TEXTCALLBACK; - hRoot = TreeView_InsertItem(hTree, &ins); - assert(hRoot); - - tvi.hItem = hRoot; - tvi.mask = TVIF_TEXT; - tvi.pszText = buf; - tvi.cchTextMax = sizeof(buf)/sizeof(buf[0]); - ret = TreeView_GetItem(hTree, &tvi); - ok(ret == 1, "ret\n"); - ok(strcmp(tvi.pszText, TEST_CALLBACK_TEXT) == 0, "Callback item text mismatch %s vs %s\n", - tvi.pszText, TEST_CALLBACK_TEXT); - - ins.hParent = hRoot; - ins.hInsertAfter = TVI_FIRST; - U(ins).item.mask = TVIF_TEXT; - U(ins).item.pszText = test_string; - hItem1 = TreeView_InsertItem(hTree, &ins); - assert(hItem1); - - tvi.hItem = hItem1; - ret = TreeView_GetItem(hTree, &tvi); - ok(ret == TRUE, "ret\n"); - ok(strcmp(tvi.pszText, test_string) == 0, "Item text mismatch %s vs %s\n", - tvi.pszText, test_string); - - /* undocumented: pszText of NULL also means LPSTR_CALLBACK: */ - tvi.pszText = NULL; - ret = TreeView_SetItem(hTree, &tvi); - ok(ret == 1, "Expected SetItem return 1, got %ld\n", ret); - tvi.pszText = buf; - ret = TreeView_GetItem(hTree, &tvi); - ok(ret == TRUE, "Expected GetItem return TRUE, got %ld\n", ret); - ok(strcmp(tvi.pszText, TEST_CALLBACK_TEXT) == 0, "Item text mismatch %s vs %s\n", - tvi.pszText, TEST_CALLBACK_TEXT); - - U(ins).item.pszText = NULL; - hItem2 = TreeView_InsertItem(hTree, &ins); - assert(hItem2); - tvi.hItem = hItem2; - memset(buf, 0, sizeof(buf)); - ret = TreeView_GetItem(hTree, &tvi); - ok(ret == TRUE, "Expected GetItem return TRUE, got %ld\n", ret); - ok(strcmp(tvi.pszText, TEST_CALLBACK_TEXT) == 0, "Item text mismatch %s vs %s\n", - tvi.pszText, TEST_CALLBACK_TEXT); - - DestroyWindow(hTree); -} - -static void test_select(void) -{ - BOOL r; - HWND hTree; - - hTree = create_treeview_control(); - fill_tree(hTree); - - /* root-none select tests */ - flush_sequences(sequences, NUM_MSG_SEQUENCES); - r = TreeView_SelectItem(hTree, NULL); - expect(TRUE, r); - Clear(); - AddItem('1'); - r = TreeView_SelectItem(hTree, hRoot); - expect(TRUE, r); - AddItem('2'); - r = TreeView_SelectItem(hTree, hRoot); - expect(TRUE, r); - AddItem('3'); - r = TreeView_SelectItem(hTree, NULL); - expect(TRUE, r); - AddItem('4'); - r = TreeView_SelectItem(hTree, NULL); - expect(TRUE, r); - AddItem('5'); - r = TreeView_SelectItem(hTree, hRoot); - expect(TRUE, r); - AddItem('.'); - ok(!strcmp(sequence, "1(nR)nR23(Rn)Rn45(nR)nR."), "root-none select test\n"); - ok_sequence(sequences, TREEVIEW_SEQ_INDEX, rootnone_select_seq, - "root-none select seq", FALSE); - - /* root-child select tests */ - flush_sequences(sequences, NUM_MSG_SEQUENCES); - r = TreeView_SelectItem(hTree, NULL); - expect(TRUE, r); - - Clear(); - AddItem('1'); - r = TreeView_SelectItem(hTree, hRoot); - expect(TRUE, r); - AddItem('2'); - r = TreeView_SelectItem(hTree, hRoot); - expect(TRUE, r); - AddItem('3'); - r = TreeView_SelectItem(hTree, hChild); - expect(TRUE, r); - AddItem('4'); - r = TreeView_SelectItem(hTree, hChild); - expect(TRUE, r); - AddItem('5'); - r = TreeView_SelectItem(hTree, hRoot); - expect(TRUE, r); - AddItem('.'); - ok(!strcmp(sequence, "1(nR)nR23(RC)RC45(CR)CR."), "root-child select test\n"); - ok_sequence(sequences, TREEVIEW_SEQ_INDEX, rootchild_select_seq, - "root-child select seq", FALSE); - - DestroyWindow(hTree); -} - -static void test_getitemtext(void) -{ - TVINSERTSTRUCTA ins; - HTREEITEM hChild; - TVITEM tvi; - HWND hTree; - - CHAR szBuffer[80] = "Blah"; - int nBufferSize = sizeof(szBuffer)/sizeof(CHAR); - - hTree = create_treeview_control(); - fill_tree(hTree); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* add an item without TVIF_TEXT mask and pszText == NULL */ - ins.hParent = hRoot; - ins.hInsertAfter = TVI_ROOT; - U(ins).item.mask = 0; - U(ins).item.pszText = NULL; - U(ins).item.cchTextMax = 0; - hChild = TreeView_InsertItem(hTree, &ins); - assert(hChild); - - /* retrieve it with TVIF_TEXT mask */ - tvi.hItem = hChild; - tvi.mask = TVIF_TEXT; - tvi.cchTextMax = nBufferSize; - tvi.pszText = szBuffer; - - SendMessageA( hTree, TVM_GETITEM, 0, (LPARAM)&tvi ); - ok(!strcmp(szBuffer, ""), "szBuffer=\"%s\", expected \"\"\n", szBuffer); - ok(SendMessageA(hTree, TVM_DELETEITEM, 0, (LPARAM)hChild), "DeleteItem failed\n"); - ok_sequence(sequences, TREEVIEW_SEQ_INDEX, getitemtext_seq, "get item text seq", FALSE); - - DestroyWindow(hTree); -} - -static void test_focus(void) -{ - TVINSERTSTRUCTA ins; - static CHAR child1[] = "Edit", - child2[] = "A really long string"; - HTREEITEM hChild1, hChild2; - HWND hTree; - HWND hEdit; - - hTree = create_treeview_control(); - fill_tree(hTree); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* This test verifies that when a label is being edited, scrolling - * the treeview does not cause the label to lose focus. To test - * this, first some additional entries are added to generate - * scrollbars. - */ - ins.hParent = hRoot; - ins.hInsertAfter = hChild; - U(ins).item.mask = TVIF_TEXT; - U(ins).item.pszText = child1; - hChild1 = TreeView_InsertItem(hTree, &ins); - assert(hChild1); - ins.hInsertAfter = hChild1; - U(ins).item.mask = TVIF_TEXT; - U(ins).item.pszText = child2; - hChild2 = TreeView_InsertItem(hTree, &ins); - assert(hChild2); - - ShowWindow(hMainWnd,SW_SHOW); - SendMessageA(hTree, TVM_SELECTITEM, TVGN_CARET, (LPARAM)hChild); - hEdit = TreeView_EditLabel(hTree, hChild); - ScrollWindowEx(hTree, -10, 0, NULL, NULL, NULL, NULL, SW_SCROLLCHILDREN); - ok(GetFocus() == hEdit, "Edit control should have focus\n"); - ok_sequence(sequences, TREEVIEW_SEQ_INDEX, focus_seq, "focus test", TRUE); - - DestroyWindow(hTree); -} - -static void test_get_set_bkcolor(void) -{ - COLORREF crColor = RGB(0,0,0); - HWND hTree; - - hTree = create_treeview_control(); - fill_tree(hTree); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* If the value is -1, the control is using the system color for the background color. */ - crColor = (COLORREF)SendMessage( hTree, TVM_GETBKCOLOR, 0, 0 ); - ok(crColor == -1, "Default background color reported as 0x%.8x\n", crColor); - - /* Test for black background */ - SendMessage( hTree, TVM_SETBKCOLOR, 0, RGB(0,0,0) ); - crColor = (COLORREF)SendMessage( hTree, TVM_GETBKCOLOR, 0, 0 ); - ok(crColor == RGB(0,0,0), "Black background color reported as 0x%.8x\n", crColor); - - /* Test for white background */ - SendMessage( hTree, TVM_SETBKCOLOR, 0, RGB(255,255,255) ); - crColor = (COLORREF)SendMessage( hTree, TVM_GETBKCOLOR, 0, 0 ); - ok(crColor == RGB(255,255,255), "White background color reported as 0x%.8x\n", crColor); - - /* Reset the default background */ - SendMessage( hTree, TVM_SETBKCOLOR, 0, -1 ); - - ok_sequence(sequences, TREEVIEW_SEQ_INDEX, test_get_set_bkcolor_seq, - "test get set bkcolor", FALSE); - - DestroyWindow(hTree); -} - -static void test_get_set_imagelist(void) -{ - HIMAGELIST hImageList = NULL; - HWND hTree; - - hTree = create_treeview_control(); - fill_tree(hTree); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* Test a NULL HIMAGELIST */ - SendMessage( hTree, TVM_SETIMAGELIST, TVSIL_NORMAL, (LPARAM)hImageList ); - hImageList = (HIMAGELIST)SendMessage( hTree, TVM_GETIMAGELIST, TVSIL_NORMAL, 0 ); - ok(hImageList == NULL, "NULL image list, reported as 0x%p, expected 0.\n", hImageList); - - /* TODO: Test an actual image list */ - - ok_sequence(sequences, TREEVIEW_SEQ_INDEX, test_get_set_imagelist_seq, - "test get imagelist", FALSE); - - DestroyWindow(hTree); -} - -static void test_get_set_indent(void) -{ - int ulIndent = -1; - int ulMinIndent = -1; - int ulMoreThanTwiceMin = -1; - HWND hTree; - - hTree = create_treeview_control(); - fill_tree(hTree); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* Finding the minimum indent */ - SendMessage( hTree, TVM_SETINDENT, 0, 0 ); - ulMinIndent = (int)SendMessage( hTree, TVM_GETINDENT, 0, 0 ); - - /* Checking an indent that is more than twice the default indent */ - ulMoreThanTwiceMin = 2*ulMinIndent+1; - SendMessage( hTree, TVM_SETINDENT, ulMoreThanTwiceMin, 0 ); - ulIndent = (DWORD)SendMessage( hTree, TVM_GETINDENT, 0, 0 ); - ok(ulIndent == ulMoreThanTwiceMin, "Indent reported as %d, expected %d\n", ulIndent, ulMoreThanTwiceMin); - - ok_sequence(sequences, TREEVIEW_SEQ_INDEX, test_get_set_indent_seq, - "test get set indent", FALSE); - - DestroyWindow(hTree); -} - -static void test_get_set_insertmark(void) -{ - COLORREF crColor = RGB(0,0,0); - HWND hTree; - - hTree = create_treeview_control(); - fill_tree(hTree); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - SendMessage( hTree, TVM_SETINSERTMARKCOLOR, 0, crColor ); - crColor = (COLORREF)SendMessage( hTree, TVM_GETINSERTMARKCOLOR, 0, 0 ); - ok(crColor == RGB(0,0,0), "Insert mark color reported as 0x%.8x, expected 0x00000000\n", crColor); - - ok_sequence(sequences, TREEVIEW_SEQ_INDEX, test_get_set_insertmarkcolor_seq, - "test get set insertmark color", FALSE); - - DestroyWindow(hTree); -} - -static void test_get_set_item(void) -{ - TVITEM tviRoot = {0}; - int nBufferSize = 80; - char szBuffer[80] = {0}; - HWND hTree; - - hTree = create_treeview_control(); - fill_tree(hTree); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* Test the root item */ - tviRoot.hItem = hRoot; - tviRoot.mask = TVIF_TEXT; - tviRoot.cchTextMax = nBufferSize; - tviRoot.pszText = szBuffer; - SendMessage( hTree, TVM_GETITEM, 0, (LPARAM)&tviRoot ); - ok(!strcmp("Root", szBuffer), "GetItem: szBuffer=\"%s\", expected \"Root\"\n", szBuffer); - - /* Change the root text */ - strncpy(szBuffer, "Testing123", nBufferSize); - SendMessage( hTree, TVM_SETITEM, 0, (LPARAM)&tviRoot ); - memset(szBuffer, 0, nBufferSize); - SendMessage( hTree, TVM_GETITEM, 0, (LPARAM)&tviRoot ); - ok(!strcmp("Testing123", szBuffer), "GetItem: szBuffer=\"%s\", expected \"Testing123\"\n", szBuffer); - - /* Reset the root text */ - memset(szBuffer, 0, nBufferSize); - strncpy(szBuffer, "Root", nBufferSize); - SendMessage( hTree, TVM_SETITEM, 0, (LPARAM)&tviRoot ); - - ok_sequence(sequences, TREEVIEW_SEQ_INDEX, test_get_set_item_seq, - "test get set item", FALSE); - - DestroyWindow(hTree); -} - -static void test_get_set_itemheight(void) -{ - int ulOldHeight = 0; - int ulNewHeight = 0; - HWND hTree; - - hTree = create_treeview_control(); - fill_tree(hTree); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* Assuming default height to begin with */ - ulOldHeight = (int) SendMessage( hTree, TVM_GETITEMHEIGHT, 0, 0 ); - - /* Explicitly setting and getting the default height */ - SendMessage( hTree, TVM_SETITEMHEIGHT, -1, 0 ); - ulNewHeight = (int) SendMessage( hTree, TVM_GETITEMHEIGHT, 0, 0 ); - ok(ulNewHeight == ulOldHeight, "Default height not set properly, reported %d, expected %d\n", ulNewHeight, ulOldHeight); - - /* Explicitly setting and getting the height of twice the normal */ - SendMessage( hTree, TVM_SETITEMHEIGHT, 2*ulOldHeight, 0 ); - ulNewHeight = (int) SendMessage( hTree, TVM_GETITEMHEIGHT, 0, 0 ); - ok(ulNewHeight == 2*ulOldHeight, "New height not set properly, reported %d, expected %d\n", ulNewHeight, 2*ulOldHeight); - - /* Assuming tree doesn't have TVS_NONEVENHEIGHT set, so a set of 9 will round down to 8 */ - SendMessage( hTree, TVM_SETITEMHEIGHT, 9, 0 ); - ulNewHeight = (int) SendMessage( hTree, TVM_GETITEMHEIGHT, 0, 0 ); - ok(ulNewHeight == 8, "Uneven height not set properly, reported %d, expected %d\n", ulNewHeight, 8); - - ok_sequence(sequences, TREEVIEW_SEQ_INDEX, test_get_set_itemheight_seq, - "test get set item height", FALSE); - - DestroyWindow(hTree); -} - -static void test_get_set_scrolltime(void) -{ - int ulExpectedTime = 20; - int ulTime = 0; - HWND hTree; - - hTree = create_treeview_control(); - fill_tree(hTree); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - SendMessage( hTree, TVM_SETSCROLLTIME, ulExpectedTime, 0 ); - ulTime = (int)SendMessage( hTree, TVM_GETSCROLLTIME, 0, 0 ); - ok(ulTime == ulExpectedTime, "Scroll time reported as %d, expected %d\n", ulTime, ulExpectedTime); - - ok_sequence(sequences, TREEVIEW_SEQ_INDEX, test_get_set_scrolltime_seq, - "test get set scroll time", FALSE); - - DestroyWindow(hTree); -} - -static void test_get_set_textcolor(void) -{ - /* If the value is -1, the control is using the system color for the text color. */ - COLORREF crColor = RGB(0,0,0); - HWND hTree; - - hTree = create_treeview_control(); - fill_tree(hTree); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - crColor = (COLORREF)SendMessage( hTree, TVM_GETTEXTCOLOR, 0, 0 ); - ok(crColor == -1, "Default text color reported as 0x%.8x\n", crColor); - - /* Test for black text */ - SendMessage( hTree, TVM_SETTEXTCOLOR, 0, RGB(0,0,0) ); - crColor = (COLORREF)SendMessage( hTree, TVM_GETTEXTCOLOR, 0, 0 ); - ok(crColor == RGB(0,0,0), "Black text color reported as 0x%.8x\n", crColor); - - /* Test for white text */ - SendMessage( hTree, TVM_SETTEXTCOLOR, 0, RGB(255,255,255) ); - crColor = (COLORREF)SendMessage( hTree, TVM_GETTEXTCOLOR, 0, 0 ); - ok(crColor == RGB(255,255,255), "White text color reported as 0x%.8x\n", crColor); - - /* Reset the default text color */ - SendMessage( hTree, TVM_SETTEXTCOLOR, 0, CLR_NONE ); - - ok_sequence(sequences, TREEVIEW_SEQ_INDEX, test_get_set_textcolor_seq, - "test get set text color", FALSE); - - DestroyWindow(hTree); -} - -static void test_get_set_tooltips(void) -{ - HWND hwndLastToolTip = NULL; - HWND hPopupTreeView; - HWND hTree; - - hTree = create_treeview_control(); - fill_tree(hTree); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* show even WS_POPUP treeview don't send NM_TOOLTIPSCREATED */ - hPopupTreeView = CreateWindow(WC_TREEVIEW, NULL, WS_POPUP|WS_VISIBLE, 0, 0, 100, 100, hMainWnd, NULL, NULL, NULL); - DestroyWindow(hPopupTreeView); - - /* Testing setting a NULL ToolTip */ - SendMessage( hTree, TVM_SETTOOLTIPS, 0, 0 ); - hwndLastToolTip = (HWND)SendMessage( hTree, TVM_GETTOOLTIPS, 0, 0 ); - ok(hwndLastToolTip == NULL, "NULL tool tip, reported as 0x%p, expected 0.\n", hwndLastToolTip); - - ok_sequence(sequences, TREEVIEW_SEQ_INDEX, test_get_set_tooltips_seq, - "test get set tooltips", TRUE); - - /* TODO: Add a test of an actual tooltip */ - DestroyWindow(hTree); -} - -static void test_get_set_unicodeformat(void) -{ - BOOL bPreviousSetting = 0; - BOOL bNewSetting = 0; - HWND hTree; - - hTree = create_treeview_control(); - fill_tree(hTree); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* Set to Unicode */ - bPreviousSetting = (BOOL)SendMessage( hTree, TVM_SETUNICODEFORMAT, 1, 0 ); - bNewSetting = (BOOL)SendMessage( hTree, TVM_GETUNICODEFORMAT, 0, 0 ); - ok(bNewSetting == 1, "Unicode setting did not work.\n"); - - /* Set to ANSI */ - SendMessage( hTree, TVM_SETUNICODEFORMAT, 0, 0 ); - bNewSetting = (BOOL)SendMessage( hTree, TVM_GETUNICODEFORMAT, 0, 0 ); - ok(bNewSetting == 0, "ANSI setting did not work.\n"); - - /* Revert to original setting */ - SendMessage( hTree, TVM_SETUNICODEFORMAT, bPreviousSetting, 0 ); - - ok_sequence(sequences, TREEVIEW_SEQ_INDEX, test_get_set_unicodeformat_seq, - "test get set unicode format", FALSE); - - DestroyWindow(hTree); -} - -static TVITEMA g_item_expanding, g_item_expanded; -static BOOL g_get_from_expand; -static BOOL g_get_rect_in_expand; - -static LRESULT CALLBACK parent_wnd_proc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - static LONG defwndproc_counter = 0; - struct message msg; - LRESULT ret; - RECT rect; - HTREEITEM visibleItem; - - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - if (message == WM_NOTIFY && lParam) msg.id = ((NMHDR*)lParam)->code; - - /* log system messages, except for painting */ - if (message < WM_USER && - message != WM_PAINT && - message != WM_ERASEBKGND && - message != WM_NCPAINT && - message != WM_NCHITTEST && - message != WM_GETTEXT && - message != WM_GETICON && - message != WM_DEVICECHANGE) - { - trace("parent: %p, %04x, %08lx, %08lx\n", hWnd, message, wParam, lParam); - add_message(sequences, PARENT_SEQ_INDEX, &msg); - } - - switch(message) { - case WM_NOTIFY: - { - NMHDR *pHdr = (NMHDR *)lParam; - - ok(pHdr->code != NM_TOOLTIPSCREATED, "Treeview should not send NM_TOOLTIPSCREATED\n"); - if (pHdr->idFrom == 100) - { - NMTREEVIEWA *pTreeView = (LPNMTREEVIEWA) lParam; - switch(pHdr->code) - { - case TVN_SELCHANGINGA: - AddItem('('); - IdentifyItem(pTreeView->itemOld.hItem); - IdentifyItem(pTreeView->itemNew.hItem); - break; - case TVN_SELCHANGEDA: - AddItem(')'); - IdentifyItem(pTreeView->itemOld.hItem); - IdentifyItem(pTreeView->itemNew.hItem); - break; - case TVN_GETDISPINFOA: { - NMTVDISPINFOA *disp = (NMTVDISPINFOA *)lParam; - if (disp->item.mask & TVIF_TEXT) { - lstrcpyn(disp->item.pszText, TEST_CALLBACK_TEXT, disp->item.cchTextMax); - } - break; - } - case TVN_ENDLABELEDIT: return TRUE; - case TVN_ITEMEXPANDING: - ok(pTreeView->itemNew.mask == - (TVIF_HANDLE | TVIF_SELECTEDIMAGE | TVIF_IMAGE | TVIF_PARAM | TVIF_STATE), - "got wrong mask %x\n", pTreeView->itemNew.mask); - ok((pTreeView->itemNew.state & TVIS_EXPANDED) == 0, - "got wrong state %x\n", pTreeView->itemNew.state); - ok(pTreeView->itemOld.mask == 0, - "got wrong mask %x\n", pTreeView->itemOld.mask); - - if (g_get_from_expand) - { - g_item_expanding.mask = TVIF_STATE; - g_item_expanding.hItem = hRoot; - ret = SendMessageA(pHdr->hwndFrom, TVM_GETITEMA, 0, (LPARAM)&g_item_expanding); - ok(ret == TRUE, "got %lu\n", ret); - } - break; - case TVN_ITEMEXPANDED: - ok(pTreeView->itemNew.mask & TVIF_STATE, "got wrong mask %x\n", pTreeView->itemNew.mask); - ok(pTreeView->itemNew.state & (TVIS_EXPANDED|TVIS_EXPANDEDONCE), - "got wrong mask %x\n", pTreeView->itemNew.mask); - ok(pTreeView->itemOld.mask == 0, - "got wrong mask %x\n", pTreeView->itemOld.mask); - - if (g_get_from_expand) - { - g_item_expanded.mask = TVIF_STATE; - g_item_expanded.hItem = hRoot; - ret = SendMessageA(pHdr->hwndFrom, TVM_GETITEMA, 0, (LPARAM)&g_item_expanded); - ok(ret == TRUE, "got %lu\n", ret); - } - if (g_get_rect_in_expand) { - visibleItem = TreeView_GetNextItem(pHdr->hwndFrom, NULL, TVGN_FIRSTVISIBLE); - ok(pTreeView->itemNew.hItem == visibleItem, "expanded item == first visible item\n"); - *(HTREEITEM*)&rect = visibleItem; - ok(SendMessage(pHdr->hwndFrom, TVM_GETITEMRECT, TRUE, (LPARAM)&rect), "Failed to get rect for first visible item.\n"); - visibleItem = TreeView_GetNextItem(pHdr->hwndFrom, visibleItem, TVGN_NEXTVISIBLE); - *(HTREEITEM*)&rect = visibleItem; - ok(visibleItem != NULL, "There must be a visible item after the first visisble item.\n"); - todo_wine - ok(SendMessage(pHdr->hwndFrom, TVM_GETITEMRECT, TRUE, (LPARAM)&rect), "Failed to get rect for second visible item.\n"); - } - break; - } - } - } - - case WM_DESTROY: - PostQuitMessage(0); - break; - } - - defwndproc_counter++; - ret = DefWindowProcA(hWnd, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static void test_expandinvisible(void) -{ - static CHAR nodeText[][5] = {"0", "1", "2", "3", "4"}; - TVINSERTSTRUCTA ins; - HTREEITEM node[5]; - RECT dummyRect; - BOOL nodeVisible; - LRESULT ret; - HWND hTree; - - hTree = create_treeview_control(); - - /* The test builds the following tree and expands then node 1, while node 0 is collapsed. - * - * 0 - * |- 1 - * | |- 2 - * | |- 3 - * |- 4 - * - */ - - ret = TreeView_DeleteAllItems(hTree); - ok(ret == TRUE, "ret\n"); - ins.hParent = TVI_ROOT; - ins.hInsertAfter = TVI_ROOT; - U(ins).item.mask = TVIF_TEXT; - U(ins).item.pszText = nodeText[0]; - node[0] = TreeView_InsertItem(hTree, &ins); - assert(node[0]); - - ins.hInsertAfter = TVI_LAST; - U(ins).item.mask = TVIF_TEXT; - ins.hParent = node[0]; - - U(ins).item.pszText = nodeText[1]; - node[1] = TreeView_InsertItem(hTree, &ins); - assert(node[1]); - U(ins).item.pszText = nodeText[4]; - node[4] = TreeView_InsertItem(hTree, &ins); - assert(node[4]); - - ins.hParent = node[1]; - - U(ins).item.pszText = nodeText[2]; - node[2] = TreeView_InsertItem(hTree, &ins); - assert(node[2]); - U(ins).item.pszText = nodeText[3]; - node[3] = TreeView_InsertItem(hTree, &ins); - assert(node[3]); - - - nodeVisible = TreeView_GetItemRect(hTree, node[1], &dummyRect, FALSE); - ok(!nodeVisible, "Node 1 should not be visible.\n"); - nodeVisible = TreeView_GetItemRect(hTree, node[2], &dummyRect, FALSE); - ok(!nodeVisible, "Node 2 should not be visible.\n"); - nodeVisible = TreeView_GetItemRect(hTree, node[3], &dummyRect, FALSE); - ok(!nodeVisible, "Node 3 should not be visible.\n"); - nodeVisible = TreeView_GetItemRect(hTree, node[4], &dummyRect, FALSE); - ok(!nodeVisible, "Node 4 should not be visible.\n"); - - ok(TreeView_Expand(hTree, node[1], TVE_EXPAND), "Expand of node 1 failed.\n"); - - nodeVisible = TreeView_GetItemRect(hTree, node[1], &dummyRect, FALSE); - ok(!nodeVisible, "Node 1 should not be visible.\n"); - nodeVisible = TreeView_GetItemRect(hTree, node[2], &dummyRect, FALSE); - ok(!nodeVisible, "Node 2 should not be visible.\n"); - nodeVisible = TreeView_GetItemRect(hTree, node[3], &dummyRect, FALSE); - ok(!nodeVisible, "Node 3 should not be visible.\n"); - nodeVisible = TreeView_GetItemRect(hTree, node[4], &dummyRect, FALSE); - ok(!nodeVisible, "Node 4 should not be visible.\n"); - - DestroyWindow(hTree); -} - -static void test_itemedit(void) -{ - DWORD r; - HWND edit; - TVITEMA item; - CHAR buff[2]; - HWND hTree; - - hTree = create_treeview_control(); - fill_tree(hTree); - - /* try with null item */ - edit = (HWND)SendMessage(hTree, TVM_EDITLABEL, 0, 0); - ok(!IsWindow(edit), "Expected valid handle\n"); - - /* trigger edit */ - edit = (HWND)SendMessage(hTree, TVM_EDITLABEL, 0, (LPARAM)hRoot); - ok(IsWindow(edit), "Expected valid handle\n"); - /* item shouldn't be selected automatically after TVM_EDITLABEL */ - r = SendMessage(hTree, TVM_GETITEMSTATE, (WPARAM)hRoot, TVIS_SELECTED); - expect(0, r); - /* try to cancel with wrong edit handle */ - r = SendMessage(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), 0); - expect(0, r); - ok(IsWindow(edit), "Expected edit control to be valid\n"); - r = SendMessage(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), (LPARAM)edit); - expect(0, r); - ok(!IsWindow(edit), "Expected edit control to be destroyed\n"); - /* try to cancel without creating edit */ - r = SendMessage(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), 0); - expect(0, r); - - /* try to cancel with wrong (not null) handle */ - edit = (HWND)SendMessage(hTree, TVM_EDITLABEL, 0, (LPARAM)hRoot); - ok(IsWindow(edit), "Expected valid handle\n"); - r = SendMessage(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), (LPARAM)hTree); - expect(0, r); - ok(IsWindow(edit), "Expected edit control to be valid\n"); - r = SendMessage(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), (LPARAM)edit); - expect(0, r); - - /* remove selection after starting edit */ - r = TreeView_SelectItem(hTree, hRoot); - expect(TRUE, r); - edit = (HWND)SendMessage(hTree, TVM_EDITLABEL, 0, (LPARAM)hRoot); - ok(IsWindow(edit), "Expected valid handle\n"); - r = TreeView_SelectItem(hTree, NULL); - expect(TRUE, r); - /* alter text */ - strncpy(buff, "x", sizeof(buff)/sizeof(CHAR)); - r = SendMessage(edit, WM_SETTEXT, 0, (LPARAM)buff); - expect(TRUE, r); - r = SendMessage(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), (LPARAM)edit); - expect(0, r); - ok(!IsWindow(edit), "Expected edit control to be destroyed\n"); - /* check that text is saved */ - item.mask = TVIF_TEXT; - item.hItem = hRoot; - item.pszText = buff; - item.cchTextMax = sizeof(buff)/sizeof(CHAR); - r = SendMessage(hTree, TVM_GETITEM, 0, (LPARAM)&item); - expect(TRUE, r); - ok(!strcmp("x", buff), "Expected item text to change\n"); - - DestroyWindow(hTree); -} - -static void test_treeview_classinfo(void) -{ - WNDCLASSA cls; - - memset(&cls, 0, sizeof(cls)); - GetClassInfo(GetModuleHandleA("comctl32.dll"), WC_TREEVIEWA, &cls); - ok(cls.hbrBackground == NULL, "Expected NULL background brush, got %p\n", cls.hbrBackground); - ok(cls.style == (CS_GLOBALCLASS | CS_DBLCLKS), "Expected got %x\n", cls.style); - expect(0, cls.cbClsExtra); -} - -static void test_get_linecolor(void) -{ - COLORREF clr; - HWND hTree; - - hTree = create_treeview_control(); - - /* newly created control has default color */ - clr = (COLORREF)SendMessage(hTree, TVM_GETLINECOLOR, 0, 0); - if (clr == 0) - win_skip("TVM_GETLINECOLOR is not supported on comctl32 < 5.80\n"); - else - expect(CLR_DEFAULT, clr); - - DestroyWindow(hTree); -} - -static void test_get_insertmarkcolor(void) -{ - COLORREF clr; - HWND hTree; - - hTree = create_treeview_control(); - - /* newly created control has default color */ - clr = (COLORREF)SendMessage(hTree, TVM_GETINSERTMARKCOLOR, 0, 0); - if (clr == 0) - win_skip("TVM_GETINSERTMARKCOLOR is not supported on comctl32 < 5.80\n"); - else - expect(CLR_DEFAULT, clr); - - DestroyWindow(hTree); -} - -static void test_expandnotify(void) -{ - HWND hTree; - BOOL ret; - TVITEMA item; - - hTree = create_treeview_control(); - fill_tree(hTree); - - item.hItem = hRoot; - item.mask = TVIF_STATE; - - item.state = TVIS_EXPANDED; - ret = SendMessageA(hTree, TVM_GETITEMA, 0, (LPARAM)&item); - ok(ret == TRUE, "got %d\n", ret); - ok((item.state & TVIS_EXPANDED) == 0, "expected collapsed\n"); - - /* preselect root node here */ - ret = SendMessageA(hTree, TVM_SELECTITEM, TVGN_CARET, (LPARAM)hRoot); - ok(ret == TRUE, "got %d\n", ret); - - g_get_from_expand = TRUE; - /* expand */ - flush_sequences(sequences, NUM_MSG_SEQUENCES); - g_item_expanding.state = 0xdeadbeef; - g_item_expanded.state = 0xdeadbeef; - ret = SendMessageA(hTree, TVM_EXPAND, TVE_EXPAND, (LPARAM)hRoot); - ok(ret == TRUE, "got %d\n", ret); - ok(g_item_expanding.state == TVIS_SELECTED, "got state on TVN_ITEMEXPANDING 0x%08x\n", - g_item_expanding.state); - ok(g_item_expanded.state == (TVIS_SELECTED|TVIS_EXPANDED), "got state on TVN_ITEMEXPANDED 0x%08x\n", - g_item_expanded.state); - ok_sequence(sequences, PARENT_SEQ_INDEX, parent_expand_seq, "expand notifications", FALSE); - g_get_from_expand = FALSE; - - /* check that it's expanded */ - item.state = TVIS_EXPANDED; - ret = SendMessageA(hTree, TVM_GETITEMA, 0, (LPARAM)&item); - ok(ret == TRUE, "got %d\n", ret); - ok((item.state & TVIS_EXPANDED) == TVIS_EXPANDED, "expected expanded\n"); - - /* collapse */ - flush_sequences(sequences, NUM_MSG_SEQUENCES); - ret = SendMessageA(hTree, TVM_EXPAND, TVE_COLLAPSE, (LPARAM)hRoot); - ok(ret == TRUE, "got %d\n", ret); - item.state = TVIS_EXPANDED; - ret = SendMessageA(hTree, TVM_GETITEMA, 0, (LPARAM)&item); - ok(ret == TRUE, "got %d\n", ret); - ok((item.state & TVIS_EXPANDED) == 0, "expected collapsed\n"); - /* all next collapse/expand attempts won't produce any notifications, - the only way is to reset with all children removed */ - ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "collapse after expand notifications", FALSE); - - DestroyWindow(hTree); -} - -static void test_rect_retrieval_after_expand_with_select(void) { - BOOL ret; - HWND hTree; - hTree = create_treeview_control(); - fill_tree(hTree); - g_get_rect_in_expand = TRUE; - ret = TreeView_Select(hTree, hChild, TVGN_CARET); - g_get_rect_in_expand = FALSE; - ok(ret,"TreeView_Select should return true\n"); -} - -START_TEST(treeview) -{ - HMODULE hComctl32; - BOOL (WINAPI *pInitCommonControlsEx)(const INITCOMMONCONTROLSEX*); - WNDCLASSA wc; - MSG msg; - - hComctl32 = GetModuleHandleA("comctl32.dll"); - pInitCommonControlsEx = (void*)GetProcAddress(hComctl32, "InitCommonControlsEx"); - if (pInitCommonControlsEx) - { - INITCOMMONCONTROLSEX iccex; - iccex.dwSize = sizeof(iccex); - iccex.dwICC = ICC_TREEVIEW_CLASSES; - pInitCommonControlsEx(&iccex); - } - else - InitCommonControls(); - - init_msg_sequences(sequences, NUM_MSG_SEQUENCES); - - wc.style = CS_HREDRAW | CS_VREDRAW; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = GetModuleHandleA(NULL); - wc.hIcon = NULL; - wc.hCursor = LoadCursorA(NULL, IDC_IBEAM); - wc.hbrBackground = GetSysColorBrush(COLOR_WINDOW); - wc.lpszMenuName = NULL; - wc.lpszClassName = "MyTestWnd"; - wc.lpfnWndProc = parent_wnd_proc; - RegisterClassA(&wc); - - hMainWnd = CreateWindowExA(0, "MyTestWnd", "Blah", WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, 130, 105, NULL, NULL, GetModuleHandleA(NULL), 0); - - ok(hMainWnd != NULL, "Failed to create parent window. Tests aborted.\n"); - if (!hMainWnd) return; - - test_fillroot(); - test_select(); - test_getitemtext(); - test_focus(); - test_get_set_bkcolor(); - test_get_set_imagelist(); - test_get_set_indent(); - test_get_set_insertmark(); - test_get_set_item(); - test_get_set_itemheight(); - test_get_set_scrolltime(); - test_get_set_textcolor(); - test_get_linecolor(); - test_get_insertmarkcolor(); - test_get_set_tooltips(); - test_get_set_unicodeformat(); - test_callback(); - test_expandinvisible(); - test_itemedit(); - test_treeview_classinfo(); - test_expandnotify(); - test_rect_retrieval_after_expand_with_select(); - - PostMessageA(hMainWnd, WM_CLOSE, 0, 0); - while(GetMessageA(&msg,0,0,0)) { - TranslateMessage(&msg); - DispatchMessageA(&msg); - } -} diff --git a/rostests/winetests/comctl32/updown.c b/rostests/winetests/comctl32/updown.c deleted file mode 100644 index 859b3a0a988..00000000000 --- a/rostests/winetests/comctl32/updown.c +++ /dev/null @@ -1,786 +0,0 @@ -/* Unit tests for the up-down control - * - * Copyright 2005 C. Scott Ananian - * Copyright (C) 2007 James Hawkins - * Copyright (C) 2007 Leslie Choong - * - * 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 - */ - -/* TO TEST: - * - send click messages to the up-down control, check the current position - * - up-down control automatically positions itself next to its buddy window - * - up-down control sets the caption of the buddy window - * - test CreateUpDownControl API - * - check UDS_AUTOBUDDY style, up-down control selects previous window in z-order - * - check UDM_SETBUDDY message - * - check UDM_GETBUDDY message - * - up-down control and buddy control must have the same parent - * - up-down control notifies its parent window when its position changes with UDN_DELTAPOS + WM_VSCROLL or WM_HSCROLL - * - check UDS_ALIGN[LEFT,RIGHT]...check that width of buddy window is decreased - * - check that UDS_SETBUDDYINT sets the caption of the buddy window when it is changed - * - check that the thousands operator is set for large numbers - * - check that the thousands operator is not set with UDS_NOTHOUSANDS - * - check UDS_ARROWKEYS, control subclasses the buddy window so that it processes the keys when it has focus - * - check UDS_HORZ - * - check changing past min/max values - * - check UDS_WRAP wraps values past min/max, incrementing past upper value wraps position to lower value - * - can change control's position, min/max pos, radix - * - check UDM_GETPOS, for up-down control with a buddy window, position is the caption of the buddy window, so change the - * caption of the buddy window then call UDM_GETPOS - * - check UDM_SETRANGE, max can be less than min, so clicking the up arrow decreases the current position - * - more stuff to test - */ - -#include -#include -#include -#include - -#include "wine/test.h" -#include "msg.h" - -#define expect(EXPECTED,GOT) ok((GOT)==(EXPECTED), "Expected %d, got %d\n", (EXPECTED), (GOT)) - -#define NUM_MSG_SEQUENCES 3 -#define PARENT_SEQ_INDEX 0 -#define EDIT_SEQ_INDEX 1 -#define UPDOWN_SEQ_INDEX 2 - -#define UPDOWN_ID 0 -#define BUDDY_ID 1 - -static HWND parent_wnd, g_edit; - -static BOOL (WINAPI *pSetWindowSubclass)(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR); - -static struct msg_sequence *sequences[NUM_MSG_SEQUENCES]; - -static const struct message add_updown_with_edit_seq[] = { - { WM_WINDOWPOSCHANGING, sent }, - { WM_NCCALCSIZE, sent|wparam, TRUE }, - { WM_WINDOWPOSCHANGED, sent }, - { WM_SIZE, sent|wparam|defwinproc, SIZE_RESTORED /*, MAKELONG(91, 75) exact size depends on font */ }, - { 0 } -}; - -static const struct message add_updown_to_parent_seq[] = { - { WM_NOTIFYFORMAT, sent|lparam, 0, NF_QUERY }, - { WM_QUERYUISTATE, sent|optional }, - { WM_PARENTNOTIFY, sent|wparam, MAKELONG(WM_CREATE, WM_CREATE) }, - { 0 } -}; - -static const struct message get_edit_text_seq[] = { - { WM_GETTEXT, sent }, - { 0 } -}; - -static const struct message test_updown_pos_seq[] = { - { UDM_SETRANGE, sent|lparam, 0, MAKELONG(100,0) }, - { UDM_GETRANGE, sent}, - { UDM_SETPOS, sent|lparam, 0, 5}, - { UDM_GETPOS, sent}, - { UDM_SETPOS, sent|lparam, 0, 0}, - { UDM_GETPOS, sent}, - { UDM_SETPOS, sent|lparam, 0, MAKELONG(-1,0)}, - { UDM_GETPOS, sent}, - { UDM_SETPOS, sent|lparam, 0, 100}, - { UDM_GETPOS, sent}, - { UDM_SETPOS, sent|lparam, 0, 101}, - { UDM_GETPOS, sent}, - { 0 } -}; - -static const struct message test_updown_pos32_seq[] = { - { UDM_SETRANGE32, sent|lparam, 0, 1000 }, - { UDM_GETRANGE32, sent}, /* Cannot check wparam and lparam as they are ptrs */ - { UDM_SETPOS32, sent|lparam, 0, 500 }, - { UDM_GETPOS32, sent}, - { UDM_SETPOS32, sent|lparam, 0, 0 }, - { UDM_GETPOS32, sent}, - { UDM_SETPOS32, sent|lparam, 0, -1 }, - { UDM_GETPOS32, sent}, - { UDM_SETPOS32, sent|lparam, 0, 1000 }, - { UDM_GETPOS32, sent}, - { UDM_SETPOS32, sent|lparam, 0, 1001 }, - { UDM_GETPOS32, sent}, - { 0 } -}; - -static const struct message test_updown_buddy_seq[] = { - { UDM_GETBUDDY, sent }, - { UDM_SETBUDDY, sent }, - { WM_STYLECHANGING, sent|defwinproc }, - { WM_STYLECHANGED, sent|defwinproc }, - { WM_STYLECHANGING, sent|defwinproc }, - { WM_STYLECHANGED, sent|defwinproc }, - { WM_WINDOWPOSCHANGING, sent|defwinproc }, - { WM_NCCALCSIZE, sent|wparam|optional|defwinproc, 1 }, - { WM_WINDOWPOSCHANGED, sent|defwinproc }, - { WM_MOVE, sent|defwinproc }, - { UDM_GETBUDDY, sent }, - { 0 } -}; - -static const struct message test_updown_base_seq[] = { - { UDM_SETBASE, sent|wparam, 10 }, - { UDM_GETBASE, sent }, - { UDM_SETBASE, sent|wparam, 80 }, - { UDM_GETBASE, sent }, - { UDM_SETBASE, sent|wparam, 16 }, - { UDM_GETBASE, sent }, - { UDM_SETBASE, sent|wparam, 80 }, - { UDM_GETBASE, sent }, - { UDM_SETBASE, sent|wparam, 10 }, - { UDM_GETBASE, sent }, - { 0 } -}; - -static const struct message test_updown_unicode_seq[] = { - { UDM_SETUNICODEFORMAT, sent|wparam, 0 }, - { UDM_GETUNICODEFORMAT, sent }, - { UDM_SETUNICODEFORMAT, sent|wparam, 1 }, - { UDM_GETUNICODEFORMAT, sent }, - { UDM_SETUNICODEFORMAT, sent|wparam, 0 }, - { UDM_GETUNICODEFORMAT, sent }, - { 0 } -}; - -static const struct message test_updown_pos_nochange_seq[] = { - { WM_GETTEXT, sent|id, 0, 0, BUDDY_ID }, - { 0 } -}; - -static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - static LONG defwndproc_counter = 0; - LRESULT ret; - struct message msg; - - /* log system messages, except for painting */ - if (message < WM_USER && - message != WM_PAINT && - message != WM_ERASEBKGND && - message != WM_NCPAINT && - message != WM_NCHITTEST && - message != WM_GETTEXT && - message != WM_GETICON && - message != WM_DEVICECHANGE) - { - trace("parent: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); - - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - add_message(sequences, PARENT_SEQ_INDEX, &msg); - } - - defwndproc_counter++; - ret = DefWindowProcA(hwnd, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static BOOL register_parent_wnd_class(void) -{ - WNDCLASSA cls; - - cls.style = 0; - cls.lpfnWndProc = parent_wnd_proc; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(NULL); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "Up-Down test parent class"; - return RegisterClassA(&cls); -} - -static HWND create_parent_window(void) -{ - if (!register_parent_wnd_class()) - return NULL; - - return CreateWindowEx(0, "Up-Down test parent class", - "Up-Down test parent window", - WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | - WS_MAXIMIZEBOX | WS_VISIBLE, - 0, 0, 100, 100, - GetDesktopWindow(), NULL, GetModuleHandleA(NULL), NULL); -} - -static LRESULT WINAPI edit_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - WNDPROC oldproc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA); - static LONG defwndproc_counter = 0; - LRESULT ret; - struct message msg; - - trace("edit: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); - - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - msg.id = BUDDY_ID; - add_message(sequences, EDIT_SEQ_INDEX, &msg); - - defwndproc_counter++; - ret = CallWindowProcA(oldproc, hwnd, message, wParam, lParam); - defwndproc_counter--; - return ret; -} - -static HWND create_edit_control(void) -{ - WNDPROC oldproc; - HWND hwnd; - RECT rect; - - GetClientRect(parent_wnd, &rect); - hwnd = CreateWindowExA(0, WC_EDITA, NULL, WS_CHILD | WS_BORDER | WS_VISIBLE, - 0, 0, rect.right, rect.bottom, - parent_wnd, NULL, GetModuleHandleA(NULL), NULL); - if (!hwnd) return NULL; - - oldproc = (WNDPROC)SetWindowLongPtrA(hwnd, GWLP_WNDPROC, - (LONG_PTR)edit_subclass_proc); - SetWindowLongPtrA(hwnd, GWLP_USERDATA, (LONG_PTR)oldproc); - - return hwnd; -} - -static LRESULT WINAPI updown_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - WNDPROC oldproc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA); - static LONG defwndproc_counter = 0; - LRESULT ret; - struct message msg; - - trace("updown: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); - - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - msg.id = UPDOWN_ID; - add_message(sequences, UPDOWN_SEQ_INDEX, &msg); - - defwndproc_counter++; - ret = CallWindowProcA(oldproc, hwnd, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static HWND create_updown_control(DWORD style, HWND buddy) -{ - WNDPROC oldproc; - HWND updown; - RECT rect; - - GetClientRect(parent_wnd, &rect); - updown = CreateUpDownControl(WS_CHILD | WS_BORDER | WS_VISIBLE | style, - 0, 0, rect.right, rect.bottom, parent_wnd, 1, GetModuleHandleA(NULL), buddy, - 100, 0, 50); - if (!updown) return NULL; - - oldproc = (WNDPROC)SetWindowLongPtrA(updown, GWLP_WNDPROC, - (LONG_PTR)updown_subclass_proc); - SetWindowLongPtrA(updown, GWLP_USERDATA, (LONG_PTR)oldproc); - - return updown; -} - -static void test_updown_pos(void) -{ - HWND updown; - int r; - - updown = create_updown_control(UDS_ALIGNRIGHT, g_edit); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* Set Range from 0 to 100 */ - SendMessage(updown, UDM_SETRANGE, 0 , MAKELONG(100,0) ); - r = SendMessage(updown, UDM_GETRANGE, 0,0); - expect(100,LOWORD(r)); - expect(0,HIWORD(r)); - - /* Set the position to 5, return is not checked as it was set before func call */ - SendMessage(updown, UDM_SETPOS, 0 , MAKELONG(5,0) ); - /* Since UDM_SETBUDDYINT was not set at creation HIWORD(r) will always be 1 as a return from UDM_GETPOS */ - /* Get the position, which should be 5 */ - r = SendMessage(updown, UDM_GETPOS, 0 , 0 ); - expect(5,LOWORD(r)); - expect(1,HIWORD(r)); - - /* Set the position to 0, return should be 5 */ - r = SendMessage(updown, UDM_SETPOS, 0 , MAKELONG(0,0) ); - expect(5,r); - /* Get the position, which should be 0 */ - r = SendMessage(updown, UDM_GETPOS, 0 , 0 ); - expect(0,LOWORD(r)); - expect(1,HIWORD(r)); - - /* Set the position to -1, return should be 0 */ - r = SendMessage(updown, UDM_SETPOS, 0 , MAKELONG(-1,0) ); - expect(0,r); - /* Get the position, which should be 0 */ - r = SendMessage(updown, UDM_GETPOS, 0 , 0 ); - expect(0,LOWORD(r)); - expect(1,HIWORD(r)); - - /* Set the position to 100, return should be 0 */ - r = SendMessage(updown, UDM_SETPOS, 0 , MAKELONG(100,0) ); - expect(0,r); - /* Get the position, which should be 100 */ - r = SendMessage(updown, UDM_GETPOS, 0 , 0 ); - expect(100,LOWORD(r)); - expect(1,HIWORD(r)); - - /* Set the position to 101, return should be 100 */ - r = SendMessage(updown, UDM_SETPOS, 0 , MAKELONG(101,0) ); - expect(100,r); - /* Get the position, which should be 100 */ - r = SendMessage(updown, UDM_GETPOS, 0 , 0 ); - expect(100,LOWORD(r)); - expect(1,HIWORD(r)); - - ok_sequence(sequences, UPDOWN_SEQ_INDEX, test_updown_pos_seq , "test updown pos", FALSE); - - DestroyWindow(updown); - - /* there's no attempt to update buddy Edit if text didn't change */ - SetWindowTextA(g_edit, "50"); - updown = create_updown_control(UDS_ALIGNRIGHT | UDS_SETBUDDYINT, g_edit); - - /* test sequence only on 5.8x versions */ - r = SendMessage(updown, UDM_GETPOS32, 0, 0); - if (r) - { - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - r = SendMessage(updown, UDM_SETPOS, 0, 50); - expect(50,r); - - ok_sequence(sequences, EDIT_SEQ_INDEX, test_updown_pos_nochange_seq, - "test updown pos, no change", FALSE); - } - - DestroyWindow(updown); -} - -static void test_updown_pos32(void) -{ - HWND updown; - int r; - int low, high; - - updown = create_updown_control(UDS_ALIGNRIGHT, g_edit); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* Set the position to 0 to 1000 */ - SendMessage(updown, UDM_SETRANGE32, 0 , 1000 ); - - low = high = -1; - r = SendMessage(updown, UDM_GETRANGE32, (WPARAM) &low , (LPARAM) &high ); - if (low == -1) - { - win_skip("UDM_SETRANGE32/UDM_GETRANGE32 not available\n"); - DestroyWindow(updown); - return; - } - - expect(0,low); - expect(1000,high); - - /* Set position to 500 */ - r = SendMessage(updown, UDM_SETPOS32, 0 , 500 ); - if (!r) - { - win_skip("UDM_SETPOS32 and UDM_GETPOS32 need 5.80\n"); - DestroyWindow(updown); - return; - } - expect(50,r); - - /* Since UDM_SETBUDDYINT was not set at creation bRet will always be true as a return from UDM_GETPOS32 */ - - r = SendMessage(updown, UDM_GETPOS32, 0 , (LPARAM) &high ); - expect(500,r); - expect(1,high); - - /* Set position to 0, return should be 500 */ - r = SendMessage(updown, UDM_SETPOS32, 0 , 0 ); - expect(500,r); - r = SendMessage(updown, UDM_GETPOS32, 0 , (LPARAM) &high ); - expect(0,r); - expect(1,high); - - /* Set position to -1 which should become 0, return should be 0 */ - r = SendMessage(updown, UDM_SETPOS32, 0 , -1 ); - expect(0,r); - r = SendMessage(updown, UDM_GETPOS32, 0 , (LPARAM) &high ); - expect(0,r); - expect(1,high); - - /* Set position to 1000, return should be 0 */ - r = SendMessage(updown, UDM_SETPOS32, 0 , 1000 ); - expect(0,r); - r = SendMessage(updown, UDM_GETPOS32, 0 , (LPARAM) &high ); - expect(1000,r); - expect(1,high); - - /* Set position to 1001 which should become 1000, return should be 1000 */ - r = SendMessage(updown, UDM_SETPOS32, 0 , 1001 ); - expect(1000,r); - r = SendMessage(updown, UDM_GETPOS32, 0 , (LPARAM) &high ); - expect(1000,r); - expect(1,high); - - ok_sequence(sequences, UPDOWN_SEQ_INDEX, test_updown_pos32_seq, "test updown pos32", FALSE); - - DestroyWindow(updown); - - /* there's no attempt to update buddy Edit if text didn't change */ - SetWindowTextA(g_edit, "50"); - updown = create_updown_control(UDS_ALIGNRIGHT | UDS_SETBUDDYINT, g_edit); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - r = SendMessage(updown, UDM_SETPOS32, 0, 50); - expect(50,r); - ok_sequence(sequences, EDIT_SEQ_INDEX, test_updown_pos_nochange_seq, - "test updown pos, no change", FALSE); - - DestroyWindow(updown); -} - -static void test_updown_buddy(void) -{ - HWND updown, buddyReturn, buddy; - WNDPROC proc; - DWORD style; - - updown = create_updown_control(UDS_ALIGNRIGHT, g_edit); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - buddyReturn = (HWND)SendMessage(updown, UDM_GETBUDDY, 0 , 0 ); - ok(buddyReturn == g_edit, "Expected edit handle\n"); - - buddyReturn = (HWND)SendMessage(updown, UDM_SETBUDDY, (WPARAM) g_edit, 0); - ok(buddyReturn == g_edit, "Expected edit handle\n"); - - buddyReturn = (HWND)SendMessage(updown, UDM_GETBUDDY, 0 , 0 ); - ok(buddyReturn == g_edit, "Expected edit handle\n"); - - ok_sequence(sequences, UPDOWN_SEQ_INDEX, test_updown_buddy_seq, "test updown buddy", TRUE); - ok_sequence(sequences, EDIT_SEQ_INDEX, add_updown_with_edit_seq, "test updown buddy_edit", FALSE); - - DestroyWindow(updown); - - buddy = create_edit_control(); - proc = (WNDPROC)GetWindowLongPtrA(buddy, GWLP_WNDPROC); - - updown= create_updown_control(UDS_ALIGNRIGHT, buddy); - ok(proc == (WNDPROC)GetWindowLongPtrA(buddy, GWLP_WNDPROC), "No subclassing expected\n"); - - style = GetWindowLongA(updown, GWL_STYLE); - SetWindowLongA(updown, GWL_STYLE, style | UDS_ARROWKEYS); - style = GetWindowLongA(updown, GWL_STYLE); - ok(style & UDS_ARROWKEYS, "Expected UDS_ARROWKEYS\n"); - /* no subclass if UDS_ARROWKEYS set after creation */ - ok(proc == (WNDPROC)GetWindowLongPtrA(buddy, GWLP_WNDPROC), "No subclassing expected\n"); - - DestroyWindow(updown); - - updown= create_updown_control(UDS_ALIGNRIGHT | UDS_ARROWKEYS, buddy); - ok(proc != (WNDPROC)GetWindowLongPtrA(buddy, GWLP_WNDPROC), "Subclassing expected\n"); - - if (pSetWindowSubclass) - { - /* updown uses subclass helpers for buddy on >5.8x systems */ - ok(GetPropA(buddy, "CC32SubclassInfo") != NULL, "Expected CC32SubclassInfo property\n"); - } - - DestroyWindow(updown); - - DestroyWindow(buddy); -} - -static void test_updown_base(void) -{ - HWND updown; - int r; - CHAR text[10]; - - updown = create_updown_control(UDS_ALIGNRIGHT, g_edit); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - SendMessage(updown, UDM_SETBASE, 10 , 0); - r = SendMessage(updown, UDM_GETBASE, 0 , 0); - expect(10,r); - - /* Set base to an invalid value, should return 0 and stay at 10 */ - r = SendMessage(updown, UDM_SETBASE, 80 , 0); - expect(0,r); - r = SendMessage(updown, UDM_GETBASE, 0 , 0); - expect(10,r); - - /* Set base to 16 now, should get 16 as the return */ - r = SendMessage(updown, UDM_SETBASE, 16 , 0); - expect(10,r); - r = SendMessage(updown, UDM_GETBASE, 0 , 0); - expect(16,r); - - /* Set base to an invalid value, should return 0 and stay at 16 */ - r = SendMessage(updown, UDM_SETBASE, 80 , 0); - expect(0,r); - r = SendMessage(updown, UDM_GETBASE, 0 , 0); - expect(16,r); - - /* Set base back to 10, return should be 16 */ - r = SendMessage(updown, UDM_SETBASE, 10 , 0); - expect(16,r); - r = SendMessage(updown, UDM_GETBASE, 0 , 0); - expect(10,r); - - ok_sequence(sequences, UPDOWN_SEQ_INDEX, test_updown_base_seq, "test updown base", FALSE); - - DestroyWindow(updown); - - /* switch base with buddy attached */ - updown = create_updown_control(UDS_SETBUDDYINT | UDS_ALIGNRIGHT, g_edit); - - r = SendMessage(updown, UDM_SETPOS, 0, 10); - expect(50, r); - - GetWindowTextA(g_edit, text, sizeof(text)/sizeof(CHAR)); - ok(lstrcmpA(text, "10") == 0, "Expected '10', got '%s'\n", text); - - r = SendMessage(updown, UDM_SETBASE, 16, 0); - expect(10, r); - - GetWindowTextA(g_edit, text, sizeof(text)/sizeof(CHAR)); - /* FIXME: currently hex output isn't properly formatted, but for this - test only change from initial text matters */ - ok(lstrcmpA(text, "10") != 0, "Expected '0x000A', got '%s'\n", text); - - DestroyWindow(updown); -} - -static void test_updown_unicode(void) -{ - HWND updown; - int r; - - updown = create_updown_control(UDS_ALIGNRIGHT, g_edit); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - /* Set it to ANSI, don't check return as we don't know previous state */ - SendMessage(updown, UDM_SETUNICODEFORMAT, 0 , 0); - r = SendMessage(updown, UDM_GETUNICODEFORMAT, 0 , 0); - expect(0,r); - - /* Now set it to Unicode format */ - r = SendMessage(updown, UDM_SETUNICODEFORMAT, 1 , 0); - expect(0,r); - r = SendMessage(updown, UDM_GETUNICODEFORMAT, 0 , 0); - if (!r) - { - win_skip("UDM_SETUNICODEFORMAT not available\n"); - DestroyWindow(updown); - return; - } - expect(1,r); - - /* And now set it back to ANSI */ - r = SendMessage(updown, UDM_SETUNICODEFORMAT, 0 , 0); - expect(1,r); - r = SendMessage(updown, UDM_GETUNICODEFORMAT, 0 , 0); - expect(0,r); - - ok_sequence(sequences, UPDOWN_SEQ_INDEX, test_updown_unicode_seq, "test updown unicode", FALSE); - - DestroyWindow(updown); -} - -static void test_updown_create(void) -{ - CHAR text[MAX_PATH]; - HWND updown; - RECT r; - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - updown = create_updown_control(UDS_ALIGNRIGHT, g_edit); - ok(updown != NULL, "Failed to create updown control\n"); - ok_sequence(sequences, PARENT_SEQ_INDEX, add_updown_to_parent_seq, "add updown control to parent", TRUE); - ok_sequence(sequences, EDIT_SEQ_INDEX, add_updown_with_edit_seq, "add updown control with edit", FALSE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - GetWindowTextA(g_edit, text, MAX_PATH); - ok(lstrlenA(text) == 0, "Expected empty string\n"); - ok_sequence(sequences, EDIT_SEQ_INDEX, get_edit_text_seq, "get edit text", FALSE); - - DestroyWindow(updown); - - /* create with zero width */ - updown = CreateWindowA (UPDOWN_CLASSA, 0, WS_CHILD | WS_BORDER | WS_VISIBLE, 0, 0, 0, 0, - parent_wnd, (HMENU)(DWORD_PTR)1, GetModuleHandleA(NULL), 0); - ok(updown != NULL, "Failed to create updown control\n"); - r.right = 0; - GetClientRect(updown, &r); - ok(r.right > 0, "Expected default width, got %d\n", r.right); - DestroyWindow(updown); - /* create with really small width */ - updown = CreateWindowA (UPDOWN_CLASSA, 0, WS_CHILD | WS_BORDER | WS_VISIBLE, 0, 0, 2, 0, - parent_wnd, (HMENU)(DWORD_PTR)1, GetModuleHandleA(NULL), 0); - ok(updown != NULL, "Failed to create updown control\n"); - r.right = 0; - GetClientRect(updown, &r); - ok(r.right != 2 && r.right > 0, "Expected default width, got %d\n", r.right); - DestroyWindow(updown); - /* create with width greater than default */ - updown = CreateWindowA (UPDOWN_CLASSA, 0, WS_CHILD | WS_BORDER | WS_VISIBLE, 0, 0, 100, 0, - parent_wnd, (HMENU)(DWORD_PTR)1, GetModuleHandleA(NULL), 0); - ok(updown != NULL, "Failed to create updown control\n"); - r.right = 0; - GetClientRect(updown, &r); - ok(r.right < 100 && r.right > 0, "Expected default width, got %d\n", r.right); - DestroyWindow(updown); - /* create with zero height, UDS_HORZ */ - updown = CreateWindowA (UPDOWN_CLASSA, 0, UDS_HORZ | WS_CHILD | WS_BORDER | WS_VISIBLE, 0, 0, 0, 0, - parent_wnd, (HMENU)(DWORD_PTR)1, GetModuleHandleA(NULL), 0); - ok(updown != NULL, "Failed to create updown control\n"); - r.bottom = 0; - GetClientRect(updown, &r); - ok(r.bottom == 0, "Expected zero height, got %d\n", r.bottom); - DestroyWindow(updown); - /* create with really small height, UDS_HORZ */ - updown = CreateWindowA (UPDOWN_CLASSA, 0, UDS_HORZ | WS_CHILD | WS_BORDER | WS_VISIBLE, 0, 0, 0, 2, - parent_wnd, (HMENU)(DWORD_PTR)1, GetModuleHandleA(NULL), 0); - ok(updown != NULL, "Failed to create updown control\n"); - r.bottom = 0; - GetClientRect(updown, &r); - ok(r.bottom == 0, "Expected zero height, got %d\n", r.bottom); - DestroyWindow(updown); - /* create with height greater than default, UDS_HORZ */ - updown = CreateWindowA (UPDOWN_CLASSA, 0, UDS_HORZ | WS_CHILD | WS_BORDER | WS_VISIBLE, 0, 0, 0, 100, - parent_wnd, (HMENU)(DWORD_PTR)1, GetModuleHandleA(NULL), 0); - ok(updown != NULL, "Failed to create updown control\n"); - r.bottom = 0; - GetClientRect(updown, &r); - ok(r.bottom < 100 && r.bottom > 0, "Expected default height, got %d\n", r.bottom); - DestroyWindow(updown); -} - -static void test_UDS_SETBUDDYINT(void) -{ - HWND updown; - DWORD style, ret; - CHAR text[10]; - - /* cleanup buddy */ - text[0] = '\0'; - SetWindowTextA(g_edit, text); - - /* creating without UDS_SETBUDDYINT */ - updown = create_updown_control(UDS_ALIGNRIGHT, g_edit); - /* try to set UDS_SETBUDDYINT after creation */ - style = GetWindowLongA(updown, GWL_STYLE); - SetWindowLongA(updown, GWL_STYLE, style | UDS_SETBUDDYINT); - style = GetWindowLongA(updown, GWL_STYLE); - ok(style & UDS_SETBUDDYINT, "Expected UDS_SETBUDDY to be set\n"); - SendMessage(updown, UDM_SETPOS, 0, 20); - GetWindowTextA(g_edit, text, sizeof(text)/sizeof(CHAR)); - ok(lstrlenA(text) == 0, "Expected empty string\n"); - DestroyWindow(updown); - - /* creating with UDS_SETBUDDYINT */ - updown = create_updown_control(UDS_SETBUDDYINT | UDS_ALIGNRIGHT, g_edit); - GetWindowTextA(g_edit, text, sizeof(text)/sizeof(CHAR)); - /* 50 is initial value here */ - ok(lstrcmpA(text, "50") == 0, "Expected '50', got '%s'\n", text); - /* now remove style flag */ - style = GetWindowLongA(updown, GWL_STYLE); - SetWindowLongA(updown, GWL_STYLE, style & ~UDS_SETBUDDYINT); - SendMessage(updown, UDM_SETPOS, 0, 20); - GetWindowTextA(g_edit, text, sizeof(text)/sizeof(CHAR)); - ok(lstrcmpA(text, "20") == 0, "Expected '20', got '%s'\n", text); - /* set edit text directly, check position */ - strcpy(text, "10"); - SetWindowTextA(g_edit, text); - ret = SendMessageA(updown, UDM_GETPOS, 0, 0); - expect(10, ret); - strcpy(text, "11"); - SetWindowTextA(g_edit, text); - ret = SendMessageA(updown, UDM_GETPOS, 0, 0); - expect(11, LOWORD(ret)); - expect(0, HIWORD(ret)); - /* set to invalid value */ - strcpy(text, "21st"); - SetWindowTextA(g_edit, text); - ret = SendMessageA(updown, UDM_GETPOS, 0, 0); - expect(11, LOWORD(ret)); - expect(TRUE, HIWORD(ret)); - /* set style back */ - style = GetWindowLongA(updown, GWL_STYLE); - SetWindowLongA(updown, GWL_STYLE, style | UDS_SETBUDDYINT); - SendMessage(updown, UDM_SETPOS, 0, 30); - GetWindowTextA(g_edit, text, sizeof(text)/sizeof(CHAR)); - ok(lstrcmpA(text, "30") == 0, "Expected '30', got '%s'\n", text); - DestroyWindow(updown); -} - -START_TEST(updown) -{ - HMODULE mod = GetModuleHandleA("comctl32.dll"); - - pSetWindowSubclass = (void*)GetProcAddress(mod, (LPSTR)410); - - InitCommonControls(); - init_msg_sequences(sequences, NUM_MSG_SEQUENCES); - - parent_wnd = create_parent_window(); - ok(parent_wnd != NULL, "Failed to create parent window!\n"); - g_edit = create_edit_control(); - ok(g_edit != NULL, "Failed to create edit control\n"); - - test_updown_create(); - test_updown_pos(); - test_updown_pos32(); - test_updown_buddy(); - test_updown_base(); - test_updown_unicode(); - test_UDS_SETBUDDYINT(); - - DestroyWindow(g_edit); - DestroyWindow(parent_wnd); -} diff --git a/rostests/winetests/comctl32/v6util.h b/rostests/winetests/comctl32/v6util.h deleted file mode 100644 index 848e95b9225..00000000000 --- a/rostests/winetests/comctl32/v6util.h +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Utility routines for comctl32 v6 tests - * - * Copyright 2006 Mike McCormack for CodeWeavers - * Copyright 2007 George Gov - * Copyright 2009 Owen Rudge 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 - */ - -#define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got) - -#ifdef __i386__ -#define ARCH "x86" -#elif defined __x86_64__ -#define ARCH "amd64" -#else -#define ARCH "none" -#endif - -static const CHAR manifest_name[] = "cc6.manifest"; - -static const CHAR manifest[] = - "\n" - "\n" - " \n" - "Wine comctl32 test suite\n" - "\n" - " \n" - " \n" - "\n" - "\n" - "\n"; - -static void unload_v6_module(ULONG_PTR cookie, HANDLE hCtx) -{ - HANDLE hKernel32; - BOOL (WINAPI *pDeactivateActCtx)(DWORD, ULONG_PTR); - VOID (WINAPI *pReleaseActCtx)(HANDLE); - - hKernel32 = GetModuleHandleA("kernel32.dll"); - pDeactivateActCtx = (void*)GetProcAddress(hKernel32, "DeactivateActCtx"); - pReleaseActCtx = (void*)GetProcAddress(hKernel32, "ReleaseActCtx"); - if (!pDeactivateActCtx || !pReleaseActCtx) - { - win_skip("Activation contexts unsupported\n"); - return; - } - - pDeactivateActCtx(0, cookie); - pReleaseActCtx(hCtx); - - DeleteFileA(manifest_name); -} - -static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx) -{ - HANDLE hKernel32; - HANDLE (WINAPI *pCreateActCtxA)(ACTCTXA*); - BOOL (WINAPI *pActivateActCtx)(HANDLE, ULONG_PTR*); - - ACTCTXA ctx; - BOOL ret; - HANDLE file; - DWORD written; - - hKernel32 = GetModuleHandleA("kernel32.dll"); - pCreateActCtxA = (void*)GetProcAddress(hKernel32, "CreateActCtxA"); - pActivateActCtx = (void*)GetProcAddress(hKernel32, "ActivateActCtx"); - if (!(pCreateActCtxA && pActivateActCtx)) - { - win_skip("Activation contexts unsupported. No version 6 tests possible.\n"); - return FALSE; - } - - /* create manifest */ - file = CreateFileA( manifest_name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL ); - if (file != INVALID_HANDLE_VALUE) - { - ret = (WriteFile( file, manifest, sizeof(manifest)-1, &written, NULL ) && - written == sizeof(manifest)-1); - CloseHandle( file ); - if (!ret) - { - DeleteFileA( manifest_name ); - skip("Failed to fill manifest file. Skipping comctl32 V6 tests.\n"); - return FALSE; - } - else - trace("created %s\n", manifest_name); - } - else - { - skip("Failed to create manifest file. Skipping comctl32 V6 tests.\n"); - return FALSE; - } - - memset(&ctx, 0, sizeof(ctx)); - ctx.cbSize = sizeof(ctx); - ctx.lpSource = manifest_name; - - *hCtx = pCreateActCtxA(&ctx); - ok(*hCtx != 0, "Expected context handle\n"); - - ret = pActivateActCtx(*hCtx, pcookie); - expect(TRUE, ret); - - if (!ret) - { - win_skip("A problem during context activation occurred.\n"); - DeleteFileA(manifest_name); - } - - return ret; -} - -#undef expect -#undef ARCH diff --git a/rostests/winetests/comdlg32/CMakeLists.txt b/rostests/winetests/comdlg32/CMakeLists.txt deleted file mode 100644 index f392cd46bd8..00000000000 --- a/rostests/winetests/comdlg32/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ - -add_definitions(-D__ROS_LONG64__) - -list(APPEND SOURCE - filedlg.c - fontdlg.c - printdlg.c - testlist.c - rsrc.rc) - -add_executable(comdlg32_winetest ${SOURCE}) -target_link_libraries(comdlg32_winetest wine) - -if(MSVC) - target_link_libraries(comdlg32_winetest uuid) -endif() - -set_module_type(comdlg32_winetest win32cui) -add_importlibs(comdlg32_winetest comdlg32 winspool user32 gdi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET comdlg32_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/comdlg32/comdlg32.rbuild b/rostests/winetests/comdlg32/comdlg32.rbuild deleted file mode 100644 index 2d5dec28046..00000000000 --- a/rostests/winetests/comdlg32/comdlg32.rbuild +++ /dev/null @@ -1,19 +0,0 @@ - - - - - . - - filedlg.c - fontdlg.c - printdlg.c - testlist.c - rsrc.rc - wine - comdlg32 - winspool - user32 - gdi32 - ntdll - - diff --git a/rostests/winetests/comdlg32/filedlg.c b/rostests/winetests/comdlg32/filedlg.c deleted file mode 100644 index 71f7d2a2595..00000000000 --- a/rostests/winetests/comdlg32/filedlg.c +++ /dev/null @@ -1,996 +0,0 @@ -/* - * Unit test suite for comdlg32 API functions: file dialogs - * - * Copyright 2007 Google (Lei Zhang) - * - * 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 "initguid.h" -#include "shlguid.h" -#define COBJMACROS -#include "shobjidl.h" - -/* ##### */ - -static int resizesupported = TRUE; - -static void toolbarcheck( HWND hDlg) -{ - /* test toolbar properties */ - /* bug #10532 */ - int maxtextrows; - HWND ctrl; - DWORD ret; - char classname[20]; - - for( ctrl = GetWindow( hDlg, GW_CHILD); - ctrl ; ctrl = GetWindow( ctrl, GW_HWNDNEXT)) { - GetClassName( ctrl, classname, 10); - classname[7] = '\0'; - if( !strcmp( classname, "Toolbar")) break; - } - ok( ctrl != NULL, "could not get the toolbar control\n"); - ret = SendMessage( ctrl, TB_ADDSTRING, 0, (LPARAM)"winetestwinetest\0\0"); - ok( ret == 0, "addstring returned %d (expected 0)\n", ret); - maxtextrows = SendMessage( ctrl, TB_GETTEXTROWS, 0, 0); - ok( maxtextrows == 0 || broken(maxtextrows == 1), /* Win2k and below */ - "Get(Max)TextRows returned %d (expected 0)\n", maxtextrows); -} - - -static UINT_PTR CALLBACK OFNHookProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - LPNMHDR nmh; - - if( msg == WM_NOTIFY) - { - nmh = (LPNMHDR) lParam; - if( nmh->code == CDN_INITDONE) - { - PostMessage( GetParent(hDlg), WM_COMMAND, IDCANCEL, FALSE); - } else if (nmh->code == CDN_FOLDERCHANGE ) - { - char buf[1024]; - int ret; - - memset(buf, 0x66, sizeof(buf)); - ret = SendMessage( GetParent(hDlg), CDM_GETFOLDERIDLIST, 5, (LPARAM)buf); - ok(ret > 0, "CMD_GETFOLDERIDLIST not implemented\n"); - if (ret > 5) - ok(buf[0] == 0x66 && buf[1] == 0x66, "CMD_GETFOLDERIDLIST: The buffer was touched on failure\n"); - toolbarcheck( GetParent(hDlg)); - } - } - - return 0; -} - -/* bug 6829 */ -static void test_DialogCancel(void) -{ - OPENFILENAMEA ofn; - BOOL result; - char szFileName[MAX_PATH] = ""; - char szInitialDir[MAX_PATH]; - - GetWindowsDirectory(szInitialDir, MAX_PATH); - - ZeroMemory(&ofn, sizeof(ofn)); - - ofn.lStructSize = sizeof(ofn); - ofn.hwndOwner = NULL; - ofn.lpstrFilter = "Text Files (*.txt)\0*.txt\0All Files (*.*)\0*.*\0"; - ofn.lpstrFile = szFileName; - ofn.nMaxFile = MAX_PATH; - ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_ENABLEHOOK; - ofn.lpstrDefExt = "txt"; - ofn.lpfnHook = OFNHookProc; - ofn.lpstrInitialDir = szInitialDir; - - PrintDlgA(NULL); - ok(CDERR_INITIALIZATION == CommDlgExtendedError(), - "expected CDERR_INITIALIZATION, got %d\n", CommDlgExtendedError()); - - result = GetOpenFileNameA(&ofn); - ok(0 == result, "expected 0, got %d\n", result); - ok(0 == CommDlgExtendedError(), "expected 0, got %d\n", - CommDlgExtendedError()); - - PrintDlgA(NULL); - ok(CDERR_INITIALIZATION == CommDlgExtendedError(), - "expected CDERR_INITIALIZATION, got %d\n", CommDlgExtendedError()); - - result = GetSaveFileNameA(&ofn); - ok(0 == result, "expected 0, got %d\n", result); - ok(0 == CommDlgExtendedError(), "expected 0, got %d\n", - CommDlgExtendedError()); - - PrintDlgA(NULL); - ok(CDERR_INITIALIZATION == CommDlgExtendedError(), - "expected CDERR_INITIALIZATION, got %d\n", CommDlgExtendedError()); - - /* Before passing the ofn to Unicode functions, remove the ANSI strings */ - ofn.lpstrFilter = NULL; - ofn.lpstrInitialDir = NULL; - ofn.lpstrDefExt = NULL; - - PrintDlgA(NULL); - ok(CDERR_INITIALIZATION == CommDlgExtendedError(), - "expected CDERR_INITIALIZATION, got %d\n", CommDlgExtendedError()); - - SetLastError(0xdeadbeef); - result = GetOpenFileNameW((LPOPENFILENAMEW) &ofn); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - win_skip("GetOpenFileNameW is not implemented\n"); - else - { - ok(0 == result, "expected 0, got %d\n", result); - ok(0 == CommDlgExtendedError() || - broken(CDERR_INITIALIZATION == CommDlgExtendedError()), /* win9x */ - "expected 0, got %d\n", CommDlgExtendedError()); - } - - SetLastError(0xdeadbeef); - result = GetSaveFileNameW((LPOPENFILENAMEW) &ofn); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - win_skip("GetSaveFileNameW is not implemented\n"); - else - { - ok(0 == result, "expected 0, got %d\n", result); - ok(0 == CommDlgExtendedError() || - broken(CDERR_INITIALIZATION == CommDlgExtendedError()), /* win9x */ - "expected 0, got %d\n", CommDlgExtendedError()); - } -} - -static UINT_PTR CALLBACK create_view_window2_hook(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - if (msg == WM_NOTIFY) - { - if (((LPNMHDR)lParam)->code == CDN_FOLDERCHANGE) - { - IShellBrowser *shell_browser = (IShellBrowser *)SendMessage(GetParent(dlg), WM_USER + 7 /* WM_GETISHELLBROWSER */, 0, 0); - IShellView *shell_view = NULL; - IShellView2 *shell_view2 = NULL; - SV2CVW2_PARAMS view_params; - FOLDERSETTINGS folder_settings; - HRESULT hr; - RECT rect = {0, 0, 0, 0}; - - hr = IShellBrowser_QueryActiveShellView(shell_browser, &shell_view); - ok(SUCCEEDED(hr), "QueryActiveShellView returned %#x\n", hr); - if (FAILED(hr)) goto cleanup; - - hr = IShellView_QueryInterface(shell_view, &IID_IShellView2, (void **)&shell_view2); - if (hr == E_NOINTERFACE) - { - win_skip("IShellView2 not supported\n"); - goto cleanup; - } - ok(SUCCEEDED(hr), "QueryInterface returned %#x\n", hr); - if (FAILED(hr)) goto cleanup; - - hr = IShellView2_DestroyViewWindow(shell_view2); - ok(SUCCEEDED(hr), "DestroyViewWindow returned %#x\n", hr); - - folder_settings.ViewMode = FVM_LIST; - folder_settings.fFlags = 0; - - view_params.cbSize = sizeof(view_params); - view_params.psvPrev = NULL; - view_params.pfs = &folder_settings; - view_params.psbOwner = shell_browser; - view_params.prcView = ▭ - view_params.pvid = NULL; - view_params.hwndView = NULL; - - hr = IShellView2_CreateViewWindow2(shell_view2, &view_params); - if (hr == E_FAIL) - { - win_skip("CreateViewWindow2 is broken on Vista/W2K8\n"); - goto cleanup; - } - ok(SUCCEEDED(hr), "CreateViewWindow2 returned %#x\n", hr); - if (FAILED(hr)) goto cleanup; - - hr = IShellView2_GetCurrentInfo(shell_view2, &folder_settings); - ok(SUCCEEDED(hr), "GetCurrentInfo returned %#x\n", hr); - ok(folder_settings.ViewMode == FVM_LIST, - "view mode is %d, expected FVM_LIST\n", - folder_settings.ViewMode); - - hr = IShellView2_DestroyViewWindow(shell_view2); - ok(SUCCEEDED(hr), "DestroyViewWindow returned %#x\n", hr); - - /* XP and W2K3 need this. On Win9x and W2K the call to DestroyWindow() fails and has - * no side effects. NT4 doesn't get here. (FIXME: Vista doesn't get here yet). - */ - DestroyWindow(view_params.hwndView); - - view_params.pvid = &VID_Details; - hr = IShellView2_CreateViewWindow2(shell_view2, &view_params); - ok(SUCCEEDED(hr), "CreateViewWindow2 returned %#x\n", hr); - if (FAILED(hr)) goto cleanup; - - hr = IShellView2_GetCurrentInfo(shell_view2, &folder_settings); - ok(SUCCEEDED(hr), "GetCurrentInfo returned %#x\n", hr); - ok(folder_settings.ViewMode == FVM_DETAILS || - broken(folder_settings.ViewMode == FVM_LIST), /* Win9x */ - "view mode is %d, expected FVM_DETAILS\n", - folder_settings.ViewMode); - -cleanup: - if (shell_view2) IShellView2_Release(shell_view2); - if (shell_view) IShellView_Release(shell_view); - PostMessage(GetParent(dlg), WM_COMMAND, IDCANCEL, 0); - } - } - return 0; -} - -static LONG_PTR WINAPI template_hook(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - if (msg == WM_INITDIALOG) - { - HWND p,cb; - INT sel; - p = GetParent(dlg); - ok(p!=NULL, "Failed to get parent of template\n"); - cb = GetDlgItem(p,0x470); - ok(cb!=NULL, "Failed to get filter combobox\n"); - sel = SendMessage(cb, CB_GETCURSEL, 0, 0); - ok (sel != -1, "Failed to get selection from filter listbox\n"); - } - if (msg == WM_NOTIFY) - { - if (((LPNMHDR)lParam)->code == CDN_FOLDERCHANGE) - PostMessage(GetParent(dlg), WM_COMMAND, IDCANCEL, 0); - } - return 0; -} - -static void test_create_view_window2(void) -{ - OPENFILENAMEA ofn = {0}; - char filename[1024] = {0}; - DWORD ret; - - ofn.lStructSize = sizeof(ofn); - ofn.lpstrFile = filename; - ofn.nMaxFile = 1024; - ofn.lpfnHook = create_view_window2_hook; - ofn.Flags = OFN_ENABLEHOOK | OFN_EXPLORER; - ret = GetOpenFileNameA(&ofn); - ok(!ret, "GetOpenFileNameA returned %#x\n", ret); - ret = CommDlgExtendedError(); - ok(!ret, "CommDlgExtendedError returned %#x\n", ret); -} - -static void test_create_view_template(void) -{ - OPENFILENAMEA ofn = {0}; - char filename[1024] = {0}; - DWORD ret; - - ofn.lStructSize = sizeof(ofn); - ofn.lpstrFile = filename; - ofn.nMaxFile = 1024; - ofn.lpfnHook = (LPOFNHOOKPROC)template_hook; - ofn.Flags = OFN_ENABLEHOOK | OFN_EXPLORER| OFN_ENABLETEMPLATE; - ofn.hInstance = GetModuleHandleA(NULL); - ofn.lpTemplateName = "template1"; - ofn.lpstrFilter="text\0*.txt\0All\0*\0\0"; - ret = GetOpenFileNameA(&ofn); - ok(!ret, "GetOpenFileNameA returned %#x\n", ret); - ret = CommDlgExtendedError(); - ok(!ret, "CommDlgExtendedError returned %#x\n", ret); -} - -/* test cases for resizing of the file dialog */ -struct { - DWORD flags; - int resize_folderchange;/* change in CDN_FOLDERCHANGE handler */ - int resize_timer1; /* change in first WM_TIMER handler */ - int resize_check; /* expected change (in second WM_TIMER handler) */ - BOOL todo; /* mark that test todo_wine */ - BOOL testcontrols; /* test resizing and moving of the controls */ -} resize_testcases[] = { - { 0 , 10, 10, 20,FALSE,FALSE}, /* 0 */ - { 0 ,-10,-10,-20,FALSE,FALSE}, - { OFN_ENABLESIZING , 0, 0, 0,FALSE,FALSE}, - { OFN_ENABLESIZING , 0,-10, 0,FALSE,FALSE}, - { OFN_ENABLESIZING , 0, 10, 10,FALSE, TRUE}, - { OFN_ENABLESIZING ,-10, 0, 10,FALSE,FALSE}, /* 5 */ - { OFN_ENABLESIZING , 10, 0, 10,FALSE,FALSE}, - { OFN_ENABLESIZING , 0, 10, 20,FALSE,FALSE}, - /* mark the end */ - { 0xffffffff } -}; - -static LONG_PTR WINAPI resize_template_hook(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - static RECT initrc, rc; - static int index, count; - static int gotSWP_bottom, gotShowWindow; - HWND parent = GetParent( dlg); - int resize; -#define MAXNRCTRLS 30 - static RECT ctrlrcs[MAXNRCTRLS]; - static int ctrlids[MAXNRCTRLS]; - static HWND ctrls[MAXNRCTRLS]; - static int nrctrls; - - switch( msg) - { - case WM_INITDIALOG: - { - DWORD style; - - index = ((OPENFILENAME*)lParam)->lCustData; - count = 0; - gotSWP_bottom = gotShowWindow = 0; - /* test style */ - style = GetWindowLong( parent, GWL_STYLE); - if( resize_testcases[index].flags & OFN_ENABLESIZING) - if( !(style & WS_SIZEBOX)) { - win_skip( "OFN_ENABLESIZING flag not supported.\n"); - resizesupported = FALSE; - PostMessage( parent, WM_COMMAND, IDCANCEL, 0); - } else - ok( style & WS_SIZEBOX, - "testid %d: dialog should have a WS_SIZEBOX style.\n", index); - else - ok( !(style & WS_SIZEBOX), - "testid %d: dialog should not have a WS_SIZEBOX style.\n", index); - break; - } - case WM_NOTIFY: - { - if(( (LPNMHDR)lParam)->code == CDN_FOLDERCHANGE){ - GetWindowRect( parent, &initrc); - if( (resize = resize_testcases[index].resize_folderchange)){ - MoveWindow( parent, initrc.left,initrc.top, initrc.right - initrc.left + resize, - initrc.bottom - initrc.top + resize, TRUE); - } - SetTimer( dlg, 0, 100, 0); - } - break; - } - case WM_TIMER: - { - if( count == 0){ - /* store the control rectangles */ - if( resize_testcases[index].testcontrols) { - HWND ctrl; - int i; - for( i = 0, ctrl = GetWindow( parent, GW_CHILD); - i < MAXNRCTRLS && ctrl; - i++, ctrl = GetWindow( ctrl, GW_HWNDNEXT)) { - ctrlids[i] = GetDlgCtrlID( ctrl); - GetWindowRect( ctrl, &ctrlrcs[i]); - MapWindowPoints( NULL, parent, (LPPOINT) &ctrlrcs[i], 2); - ctrls[i] = ctrl; - } - nrctrls = i; - } - if( (resize = resize_testcases[index].resize_timer1)){ - GetWindowRect( parent, &rc); - MoveWindow( parent, rc.left,rc.top, rc.right - rc.left + resize, - rc.bottom - rc.top + resize, TRUE); - } - } else if( count == 1){ - resize = resize_testcases[index].resize_check; - GetWindowRect( parent, &rc); - if( resize_testcases[index].todo){ - todo_wine { - ok( resize == rc.right - rc.left - initrc.right + initrc.left, - "testid %d size-x change %d expected %d\n", index, - rc.right - rc.left - initrc.right + initrc.left, resize); - ok( resize == rc.bottom - rc.top - initrc.bottom + initrc.top, - "testid %d size-y change %d expected %d\n", index, - rc.bottom - rc.top - initrc.bottom + initrc.top, resize); - } - }else{ - ok( resize == rc.right - rc.left - initrc.right + initrc.left, - "testid %d size-x change %d expected %d\n", index, - rc.right - rc.left - initrc.right + initrc.left, resize); - ok( resize == rc.bottom - rc.top - initrc.bottom + initrc.top, - "testid %d size-y change %d expected %d\n", index, - rc.bottom - rc.top - initrc.bottom + initrc.top, resize); - } - if( resize_testcases[index].testcontrols) { - int i; - RECT rc; - for( i = 0; i < nrctrls; i++) { - GetWindowRect( ctrls[i], &rc); - MapWindowPoints( NULL, parent, (LPPOINT) &rc, 2); - switch( ctrlids[i]){ - -/* test if RECT R1, moved and sized result in R2 */ -#define TESTRECTS( R1, R2, Mx, My, Sx, Sy) \ - ((R1).left + (Mx) ==(R2).left \ - &&(R1).top + (My) ==(R2).top \ - &&(R1).right + (Mx) + (Sx) == (R2).right \ - &&(R1).bottom + (My) + (Sy) ==(R2).bottom) - - /* sized horizontal and moved vertical */ - case cmb1: - case edt1: - ok( TESTRECTS( ctrlrcs[i], rc, 0, 10, 10, 0) || - broken(TESTRECTS( ctrlrcs[i], rc, 0, 10, 0, 0)),/*win98*/ - "control id %03x should have sized horizontally and moved vertically, before %d,%d-%d,%d after %d,%d-%d,%d\n", - ctrlids[i], ctrlrcs[i].left, ctrlrcs[i].top, - ctrlrcs[i].right, ctrlrcs[i].bottom, - rc.left, rc.top, rc.right, rc.bottom); - break; - /* sized horizontal and vertical */ - case lst2: - ok( TESTRECTS( ctrlrcs[i], rc, 0, 0, 10, 10), - "control id %03x should have sized horizontally and vertically, before %d,%d-%d,%d after %d,%d-%d,%d\n", - ctrlids[i], ctrlrcs[i].left, ctrlrcs[i].top, - ctrlrcs[i].right, ctrlrcs[i].bottom, - rc.left, rc.top, rc.right, rc.bottom); - break; - /* moved horizontal and vertical */ - case IDCANCEL: - case pshHelp: - ok( TESTRECTS( ctrlrcs[i], rc, 10, 10, 0, 0) || - broken(TESTRECTS( ctrlrcs[i], rc, 0, 10, 0, 0)),/*win98*/ - "control id %03x should have moved horizontally and vertically, before %d,%d-%d,%d after %d,%d-%d,%d\n", - ctrlids[i], ctrlrcs[i].left, ctrlrcs[i].top, - ctrlrcs[i].right, ctrlrcs[i].bottom, - rc.left, rc.top, rc.right, rc.bottom); - break; - /* moved vertically */ - case chx1: - case stc2: - case stc3: - ok( TESTRECTS( ctrlrcs[i], rc, 0, 10, 0, 0), - "control id %03x should have moved vertically, before %d,%d-%d,%d after %d,%d-%d,%d\n", - ctrlids[i], ctrlrcs[i].left, ctrlrcs[i].top, - ctrlrcs[i].right, ctrlrcs[i].bottom, - rc.left, rc.top, rc.right, rc.bottom); - break; - /* resized horizontal */ - case cmb2: /* aka IDC_LOOKIN */ - ok( TESTRECTS( ctrlrcs[i], rc, 0, 0, 10, 0)|| - TESTRECTS( ctrlrcs[i], rc, 0, 0, 0, 0), /* Vista and higher */ - "control id %03x should have resized horizontally, before %d,%d-%d,%d after %d,%d-%d,%d\n", - ctrlids[i], ctrlrcs[i].left, ctrlrcs[i].top, - ctrlrcs[i].right, ctrlrcs[i].bottom, - rc.left, rc.top, rc.right, rc.bottom); - break; - /* non moving non sizing controls */ - case stc4: - ok( TESTRECTS( rc, ctrlrcs[i], 0, 0, 0, 0), - "control id %03x was moved/resized, before %d,%d-%d,%d after %d,%d-%d,%d\n", - ctrlids[i], ctrlrcs[i].left, ctrlrcs[i].top, - ctrlrcs[i].right, ctrlrcs[i].bottom, - rc.left, rc.top, rc.right, rc.bottom); - break; - /* todo_wine: non moving non sizing controls */ - case lst1: -todo_wine - ok( TESTRECTS( rc, ctrlrcs[i], 0, 0, 0, 0), - "control id %03x was moved/resized, before %d,%d-%d,%d after %d,%d-%d,%d\n", - ctrlids[i], ctrlrcs[i].left, ctrlrcs[i].top, - ctrlrcs[i].right, ctrlrcs[i].bottom, - rc.left, rc.top, rc.right, rc.bottom); - break; - /* don't test: id is not unique */ - case IDOK: - case stc1: - case 0: - case -1: - break; - default: - trace("untested control id %03x before %d,%d-%d,%d after %d,%d-%d,%d\n", - ctrlids[i], ctrlrcs[i].left, ctrlrcs[i].top, - ctrlrcs[i].right, ctrlrcs[i].bottom, - rc.left, rc.top, rc.right, rc.bottom); -#undef TESTRECTS -#undef MAXNRCTRLS - } - } - } - KillTimer( dlg, 0); - PostMessage( parent, WM_COMMAND, IDCANCEL, 0); - } - count++; - } - break; - case WM_WINDOWPOSCHANGING: - { - WINDOWPOS *pwp = (WINDOWPOS *)lParam; - if( !index && pwp->hwndInsertAfter == HWND_BOTTOM){ - gotSWP_bottom = 1; - ok( gotShowWindow == 0, "The WM_WINDOWPOSCHANGING message came after a WM_SHOWWINDOW message\n"); - } - } - break; - case WM_SHOWWINDOW: - { - if( !index){ - gotShowWindow = 1; - ok( gotSWP_bottom == 1, "No WM_WINDOWPOSCHANGING message came before a WM_SHOWWINDOW message\n"); - } - } - break; - } - return 0; -} - -static void test_resize(void) -{ - OPENFILENAME ofn = { sizeof(OPENFILENAME)}; - char filename[1024] = {0}; - DWORD ret; - int i; - - ofn.lpstrFile = filename; - ofn.nMaxFile = 1024; - ofn.lpfnHook = (LPOFNHOOKPROC) resize_template_hook; - ofn.hInstance = GetModuleHandle(NULL); - ofn.lpTemplateName = "template_sz"; - for( i = 0; resize_testcases[i].flags != 0xffffffff; i++) { - ofn.lCustData = i; - ofn.Flags = resize_testcases[i].flags | - OFN_ENABLEHOOK | OFN_EXPLORER| OFN_ENABLETEMPLATE | OFN_SHOWHELP ; - ret = GetOpenFileName(&ofn); - ok(!ret, "GetOpenFileName returned %#x\n", ret); - ret = CommDlgExtendedError(); - ok(!ret, "CommDlgExtendedError returned %#x\n", ret); - } -} - -/* test cases for control message IDOK */ -/* Show case for bug #19079 */ -static struct { - int retval; /* return code of the message handler */ - BOOL setmsgresult; /* set the result in the DWLP_MSGRESULT */ - BOOL usemsgokstr; /* use the FILEOKSTRING message instead of WM_NOTIFY:CDN_FILEOK */ - BOOL do_subclass; /* subclass the dialog hook procedure */ - BOOL expclose; /* is the dialog expected to close ? */ - BOOL actclose; /* has the dialog actually closed ? */ -} ok_testcases[] = { - { 0, FALSE, FALSE, FALSE, TRUE}, - { 0, TRUE, FALSE, FALSE, TRUE}, - { 0, FALSE, FALSE, TRUE, TRUE}, - { 0, TRUE, FALSE, TRUE, TRUE}, - { 1, FALSE, FALSE, FALSE, TRUE}, - { 1, TRUE, FALSE, FALSE, FALSE}, - { 1, FALSE, FALSE, TRUE, FALSE}, - { 1, TRUE, FALSE, TRUE, FALSE}, - /* FILEOKSTRING tests */ - { 1, TRUE, TRUE, FALSE, FALSE}, - { 1, FALSE, TRUE, TRUE, FALSE}, - /* mark the end */ - { -1 } -}; - -/* test_ok_wndproc can be used as hook procedure or a subclass - * window proc for the file dialog */ -static LONG_PTR WINAPI test_ok_wndproc(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - HWND parent = GetParent( dlg); - static int index; - static UINT msgFILEOKSTRING; - if (msg == WM_INITDIALOG) - { - index = ((OPENFILENAME*)lParam)->lCustData; - ok_testcases[index].actclose = TRUE; - msgFILEOKSTRING = RegisterWindowMessageA( FILEOKSTRING); - } - if( msg == WM_NOTIFY) { - if(((LPNMHDR)lParam)->code == CDN_FOLDERCHANGE) { - SetTimer( dlg, 0, 100, 0); - PostMessage( parent, WM_COMMAND, IDOK, 0); - return FALSE; - } else if(((LPNMHDR)lParam)->code == CDN_FILEOK) { - if( ok_testcases[index].usemsgokstr) - return FALSE; - if( ok_testcases[index].setmsgresult) - SetWindowLongPtrA( dlg, DWLP_MSGRESULT, ok_testcases[index].retval); - return ok_testcases[index].retval; - } - } - if( msg == msgFILEOKSTRING) { - if( !ok_testcases[index].usemsgokstr) - return FALSE; - if( ok_testcases[index].setmsgresult) - SetWindowLongPtrA( dlg, DWLP_MSGRESULT, ok_testcases[index].retval); - return ok_testcases[index].retval; - } - if( msg == WM_TIMER) { - /* the dialog did not close automatically */ - ok_testcases[index].actclose = FALSE; - KillTimer( dlg, 0); - PostMessage( parent, WM_COMMAND, IDCANCEL, 0); - return FALSE; - } - if( ok_testcases[index].do_subclass) - return DefWindowProc( dlg, msg, wParam, lParam); - return FALSE; -} - -static LONG_PTR WINAPI ok_template_hook(HWND dlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - if (msg == WM_SETFONT) - SetWindowLongPtrA( dlg, GWLP_WNDPROC, (LONG_PTR) test_ok_wndproc); - return FALSE; -} - -static void test_ok(void) -{ - OPENFILENAME ofn = { sizeof(OPENFILENAME)}; - char filename[1024] = {0}; - char tmpfilename[ MAX_PATH]; - char curdir[MAX_PATH]; - int i; - DWORD ret; - - ok(GetCurrentDirectoryA(sizeof(curdir), curdir) != 0, "Failed to get current dir err %d\n", GetLastError()); - if (!GetTempFileNameA(".", "txt", 0, tmpfilename)) { - skip("Failed to create a temporary file name\n"); - return; - } - ofn.lpstrFile = filename; - ofn.nMaxFile = 1024; - ofn.hInstance = GetModuleHandle(NULL); - ofn.lpTemplateName = "template1"; - ofn.Flags = OFN_ENABLEHOOK | OFN_EXPLORER| OFN_ENABLETEMPLATE ; - for( i = 0; ok_testcases[i].retval != -1; i++) { - strcpy( filename, tmpfilename); - ofn.lCustData = i; - ofn.lpfnHook = ok_testcases[i].do_subclass - ? (LPOFNHOOKPROC) ok_template_hook - : (LPOFNHOOKPROC) test_ok_wndproc; - ret = GetOpenFileNameA(&ofn); - ok( ok_testcases[i].expclose == ok_testcases[i].actclose, - "testid %d: Open File dialog should %shave closed.\n", i, - ok_testcases[i].expclose ? "" : "NOT "); - ok(ret == ok_testcases[i].expclose, "testid %d: GetOpenFileName returned %#x\n", i, ret); - ret = CommDlgExtendedError(); - ok(!ret, "CommDlgExtendedError returned %#x\n", ret); - ok(SetCurrentDirectoryA(curdir), "Failed to restore current dir err %d\n", GetLastError()); - } - ret = DeleteFileA( tmpfilename); - ok( ret, "Failed to delete temporary file %s err %d\n", tmpfilename, GetLastError()); -} - -/* test arranging with a custom template */ -typedef struct { - int x, y; /* left, top coordinates */ - int cx, cy; /* width and height */ -} posz; -static struct { - int nrcontrols; /* 0: no controls, 1: just the stc32 control 2: with button */ - posz poszDlg; - posz poszStc32; - posz poszBtn; - DWORD ofnflags; -} arrange_tests[] = { - /* do not change the first two cases: used to get the uncustomized sizes */ - { 0, {0},{0},{0},0 }, - { 0, {0},{0},{0}, OFN_SHOWHELP}, - /* two tests with just a subdialog, no controls */ - { 0, {0, 0, 316, 76},{0},{0},0 }, - { 0, {0, 0, 100, 76},{0},{0}, OFN_SHOWHELP}, - /* now with a control with id stc32 */ - { 1, {0, 0, 316, 76} ,{0, 0, 204, 76,},{0},0 }, /* bug #17748*/ - { 1, {0, 0, 316, 76} ,{0, 0, 204, 76,},{0}, OFN_SHOWHELP}, /* bug #17748*/ - /* tests with size of the stc32 control higher or wider then the standard dialog */ - { 1, {0, 0, 316, 170} ,{0, 0, 204, 170,},{0},0 }, - { 1, {0, 0, 316, 165} ,{0, 0, 411, 165,},{0}, OFN_SHOWHELP }, - /* move the stc32 control around */ - { 1, {0, 0, 300, 100} ,{73, 17, 50, 50,},{0},0 }, - /* add control */ - { 2, {0, 0, 280, 100} ,{0, 0, 50, 50,},{300,20,30,30},0 }, - /* enable resizing should make the dialog bigger */ - { 0, {0},{0},{0}, OFN_SHOWHELP|OFN_ENABLESIZING}, - /* mark the end */ - { -1 } -}; - -static LONG_PTR WINAPI template_hook_arrange(HWND dlgChild, UINT msg, WPARAM wParam, LPARAM lParam) -{ - static int index, fixhelp; - static posz posz0[2]; - static RECT clrcParent, clrcChild, rcStc32; - static HWND hwndStc32; - HWND dlgParent; - - dlgParent = GetParent( dlgChild); - if (msg == WM_INITDIALOG) { - index = ((OPENFILENAME*)lParam)->lCustData; - /* get the positions before rearrangement */ - GetClientRect( dlgParent, &clrcParent); - GetClientRect( dlgChild, &clrcChild); - hwndStc32 = GetDlgItem( dlgChild, stc32); - if( hwndStc32) GetWindowRect( hwndStc32, &rcStc32); - } - if (msg == WM_NOTIFY && ((LPNMHDR)lParam)->code == CDN_FOLDERCHANGE) { - RECT wrcParent; - - GetWindowRect( dlgParent, &wrcParent); - /* the fist two "tests" just save the dialogs position, with and without - * help button */ - if( index == 0) { - posz0[0].x = wrcParent.left; - posz0[0].y = wrcParent.top; - posz0[0].cx = wrcParent.right - wrcParent.left; - posz0[0].cy = wrcParent.bottom - wrcParent.top; - } else if( index == 1) { - posz0[1].x = wrcParent.left; - posz0[1].y = wrcParent.top; - posz0[1].cx = wrcParent.right - wrcParent.left; - posz0[1].cy = wrcParent.bottom - wrcParent.top; - fixhelp = posz0[1].cy - posz0[0].cy; - } else { - /* the real tests */ - int withhelp; - int expectx, expecty; - DWORD style; - - withhelp = (arrange_tests[index].ofnflags & OFN_SHOWHELP) != 0; - GetWindowRect( dlgParent, &wrcParent); - if( !hwndStc32) { - /* case with no custom subitem with stc32: - * default to all custom controls below the standard */ - expecty = posz0[withhelp].cy + clrcChild.bottom; - expectx = posz0[withhelp].cx; - } else { - /* special case: there is a control with id stc32 */ - /* expected height */ - expecty = posz0[withhelp].cy; - if( rcStc32.bottom - rcStc32.top > clrcParent.bottom) { - expecty += clrcChild.bottom - clrcParent.bottom; - if( !withhelp) expecty += fixhelp; - } - else - expecty += clrcChild.bottom - ( rcStc32.bottom - rcStc32.top) ; - /* expected width */ - expectx = posz0[withhelp].cx; - if( rcStc32.right - rcStc32.left > clrcParent.right) { - expectx += clrcChild.right - clrcParent.right; - } - else - expectx += clrcChild.right - ( rcStc32.right - rcStc32.left) ; - } - style = GetWindowLong( dlgParent, GWL_STYLE); - if( !(style & WS_SIZEBOX)) { - /* without the OFN_ENABLESIZING flag */ - ok( wrcParent.bottom - wrcParent.top == expecty, - "Wrong height of dialog %d, expected %d\n", - wrcParent.bottom - wrcParent.top, expecty); - ok( wrcParent.right - wrcParent.left == expectx, - "Wrong width of dialog %d, expected %d\n", - wrcParent.right - wrcParent.left, expectx); - } else todo_wine { - /* with the OFN_ENABLESIZING flag */ - ok( wrcParent.bottom - wrcParent.top > expecty, - "Wrong height of dialog %d, expected more than %d\n", - wrcParent.bottom - wrcParent.top, expecty); - ok( wrcParent.right - wrcParent.left > expectx, - "Wrong width of dialog %d, expected more than %d\n", - wrcParent.right - wrcParent.left, expectx); - } - - } - PostMessage( dlgParent, WM_COMMAND, IDCANCEL, 0); - } - return 0; -} - -static void test_arrange(void) -{ - OPENFILENAMEA ofn = {0}; - char filename[1024] = {0}; - DWORD ret; - HRSRC hRes; - HANDLE hDlgTmpl; - LPBYTE pv; - DLGTEMPLATE *template; - DLGITEMTEMPLATE *itemtemplateStc32, *itemtemplateBtn; - int i; - - /* load subdialog template into memory */ - hRes = FindResource( GetModuleHandle(NULL), "template_stc32", (LPSTR)RT_DIALOG); - hDlgTmpl = LoadResource( GetModuleHandle(NULL), hRes ); - /* get pointers to the structures for the dialog and the controls */ - pv = LockResource( hDlgTmpl ); - template = (DLGTEMPLATE*)pv; - if( template->x != 11111) { - win_skip("could not find the dialog template\n"); - return; - } - /* skip dialog template, menu, class and title */ - pv += sizeof(DLGTEMPLATE); - pv += 3 * sizeof(WORD); - /* skip font info */ - while( *(WORD*)pv) - pv += sizeof(WORD); - pv += sizeof(WORD); - /* align on 32 bit boundaries */ - pv = (LPBYTE)(((UINT_PTR)pv + 3 ) & ~3); - itemtemplateStc32 = (DLGITEMTEMPLATE*)pv; - if( itemtemplateStc32->x != 22222) { - win_skip("could not find the first item template\n"); - return; - } - /* skip itemtemplate, class, title and creation data */ - pv += sizeof(DLGITEMTEMPLATE); - pv += 4 * sizeof(WORD); - /* align on 32 bit boundaries */ - pv = (LPBYTE)(((UINT_PTR)pv + 3 ) & ~3); - itemtemplateBtn = (DLGITEMTEMPLATE*)pv; - if( itemtemplateBtn->x != 12345) { - win_skip("could not find the second item template\n"); - return; - } - - ofn.lStructSize = sizeof(ofn); - ofn.lpstrFile = filename; - ofn.nMaxFile = 1024; - ofn.lpfnHook = (LPOFNHOOKPROC)template_hook_arrange; - ofn.hInstance = hDlgTmpl; - ofn.lpstrFilter="text\0*.txt\0All\0*\0\0"; - for( i = 0; arrange_tests[i].nrcontrols != -1; i++) { - ofn.lCustData = i; - ofn.Flags = OFN_ENABLEHOOK | OFN_EXPLORER| OFN_ENABLETEMPLATEHANDLE | OFN_HIDEREADONLY | - arrange_tests[i].ofnflags; - template->cdit = arrange_tests[i].nrcontrols; - template->x = arrange_tests[i].poszDlg.x; - template->y = arrange_tests[i].poszDlg.y; - template->cx = arrange_tests[i].poszDlg.cx; - template->cy = arrange_tests[i].poszDlg.cy; - itemtemplateStc32->x = arrange_tests[i].poszStc32.x; - itemtemplateStc32->y = arrange_tests[i].poszStc32.y; - itemtemplateStc32->cx = arrange_tests[i].poszStc32.cx; - itemtemplateStc32->cy = arrange_tests[i].poszStc32.cy; - itemtemplateBtn->x = arrange_tests[i].poszBtn.x; - itemtemplateBtn->y = arrange_tests[i].poszBtn.y; - itemtemplateBtn->cx = arrange_tests[i].poszBtn.cx; - itemtemplateBtn->cy = arrange_tests[i].poszBtn.cy; - ret = GetOpenFileNameA(&ofn); - ok(!ret, "GetOpenFileNameA returned %#x\n", ret); - ret = CommDlgExtendedError(); - ok(!ret, "CommDlgExtendedError returned %#x\n", ret); - } -} - -static CHAR SYSDIR[MAX_PATH]; - -static UINT_PTR CALLBACK path_hook_proc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - LPNMHDR nmh; - - if( msg == WM_NOTIFY) - { - nmh = (LPNMHDR) lParam; - if( nmh->code == CDN_INITDONE) - { - PostMessage( GetParent(hDlg), WM_COMMAND, IDCANCEL, FALSE); - } - else if ( nmh->code == CDN_FOLDERCHANGE) - { - char buf[1024]; - int ret; - - memset(buf, 0x66, sizeof(buf)); - ret = SendMessageA( GetParent(hDlg), CDM_GETFOLDERPATH, sizeof(buf), (LPARAM)buf); - ok(!lstrcmpiA(SYSDIR, buf), "Expected '%s', got '%s'\n", SYSDIR, buf); - ok(lstrlenA(SYSDIR) + 1 == ret, "Expected %d, got %d\n", lstrlenA(SYSDIR) + 1, ret); - } - } - - return 0; -} - -static void test_getfolderpath(void) -{ - OPENFILENAMEA ofn; - BOOL result; - char szFileName[MAX_PATH] = ""; - char szInitialDir[MAX_PATH]; - - /* We need to pick a different directory as the other tests because of new - * Windows 7 behavior. - */ - GetSystemDirectory(szInitialDir, MAX_PATH); - lstrcpyA(SYSDIR, szInitialDir); - - ZeroMemory(&ofn, sizeof(ofn)); - - ofn.lStructSize = sizeof(ofn); - ofn.hwndOwner = NULL; - ofn.lpstrFilter = "Text Files (*.txt)\0*.txt\0All Files (*.*)\0*.*\0"; - ofn.lpstrFile = szFileName; - ofn.nMaxFile = MAX_PATH; - ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_ENABLEHOOK; - ofn.lpstrDefExt = "txt"; - ofn.lpfnHook = path_hook_proc; - ofn.lpstrInitialDir = szInitialDir; - - result = GetOpenFileNameA(&ofn); - ok(0 == result, "expected 0, got %d\n", result); - ok(0 == CommDlgExtendedError(), "expected 0, got %d\n", - CommDlgExtendedError()); - - result = GetSaveFileNameA(&ofn); - ok(0 == result, "expected 0, got %d\n", result); - ok(0 == CommDlgExtendedError(), "expected 0, got %d\n", - CommDlgExtendedError()); -} - -static void test_resizable2(void) -{ - OPENFILENAMEA ofn = {0}; - char filename[1024] = "pls press Enter if sizable, Esc otherwise"; - DWORD ret; - - /* interactive because there is no hook function */ - if( !winetest_interactive) { - skip( "some interactive resizable dialog tests (set WINETEST_INTERACTIVE=1)\n"); - return; - } - ofn.lStructSize = sizeof(ofn); - ofn.lpstrFile = filename; - ofn.nMaxFile = 1024; - ofn.lpfnHook = NULL; - ofn.hInstance = GetModuleHandleA(NULL); - ofn.lpTemplateName = "template1"; - ofn.Flags = OFN_EXPLORER; -#define ISSIZABLE 1 - ret = GetOpenFileNameA(&ofn); - ok( ret == ISSIZABLE, "File Dialog should have been sizable\n"); - ret = CommDlgExtendedError(); - ok(!ret, "CommDlgExtendedError returned %#x\n", ret); - ofn.Flags = OFN_EXPLORER | OFN_ENABLETEMPLATE; - ret = GetOpenFileNameA(&ofn); - ok( ret != ISSIZABLE, "File Dialog should NOT have been sizable\n"); - ret = CommDlgExtendedError(); - ok(!ret, "CommDlgExtendedError returned %#x\n", ret); - ofn.Flags = OFN_EXPLORER | OFN_ENABLETEMPLATEHANDLE; - ofn.hInstance = LoadResource( GetModuleHandle(NULL), FindResource( GetModuleHandle(NULL), "template1", (LPSTR)RT_DIALOG)); - ofn.lpTemplateName = NULL; - ret = GetOpenFileNameA(&ofn); - ok( ret != ISSIZABLE, "File Dialog should NOT have been sizable\n"); - ret = CommDlgExtendedError(); - ok(!ret, "CommDlgExtendedError returned %#x\n", ret); - ofn.Flags = OFN_EXPLORER | OFN_ENABLEHOOK; - ret = GetOpenFileNameA(&ofn); - ok( ret != ISSIZABLE, "File Dialog should NOT have been sizable\n"); - ret = CommDlgExtendedError(); - ok(!ret, "CommDlgExtendedError returned %#x\n", ret); -#undef ISSIZABLE -} - -START_TEST(filedlg) -{ - test_DialogCancel(); - test_create_view_window2(); - test_create_view_template(); - test_arrange(); - test_resize(); - test_ok(); - test_getfolderpath(); - if( resizesupported) test_resizable2(); -} diff --git a/rostests/winetests/comdlg32/fontdlg.c b/rostests/winetests/comdlg32/fontdlg.c deleted file mode 100644 index 57c1d908214..00000000000 --- a/rostests/winetests/comdlg32/fontdlg.c +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Unit test suite for comdlg32 API functions: font dialogs - * - * Copyright 2009 Vincent Povirk 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 - -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "wingdi.h" -#include "winspool.h" -#include "winuser.h" -#include "objbase.h" - -#include "commdlg.h" - -#include "wine/test.h" - -static int get_dpiy(void) -{ - HDC hdc; - int result; - - hdc = GetDC(0); - result = GetDeviceCaps(hdc, LOGPIXELSY); - ReleaseDC(0, hdc); - - return result; -} - -static HDC get_printer_ic(void) -{ - PRINTER_INFO_2A *info; - DWORD info_size, num_printers=0; - BOOL ret; - HDC result=NULL; - - EnumPrintersA(PRINTER_ENUM_LOCAL, NULL, 2, NULL, 0, &info_size, &num_printers); - - if (info_size == 0) - return NULL; - - info = HeapAlloc(GetProcessHeap(), 0, info_size); - - ret = EnumPrintersA(PRINTER_ENUM_LOCAL, NULL, 2, (LPBYTE)info, info_size, &info_size, &num_printers); - - if (ret) - result = CreateICA(info->pDriverName, info->pPrinterName, NULL, NULL); - - HeapFree(GetProcessHeap(), 0, info); - - return result; -} - -static UINT_PTR CALLBACK CFHookProcOK(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) -{ - switch (msg) - { - case WM_INITDIALOG: - PostMessageA(hdlg, WM_COMMAND, IDOK, FALSE); - return 0; - default: - return 0; - } -} - -static void test_ChooseFontA(void) -{ - LOGFONTA lfa; - CHOOSEFONTA cfa; - BOOL ret; - int dpiy = get_dpiy(); - int expected_pointsize, expected_lfheight; - HDC printer_ic; - - memset(&lfa, 0, sizeof(LOGFONTA)); - lfa.lfHeight = -16; - lfa.lfWeight = FW_NORMAL; - strcpy(lfa.lfFaceName, "Symbol"); - - memset(&cfa, 0, sizeof(CHOOSEFONTA)); - cfa.lStructSize = sizeof(cfa); - cfa.lpLogFont = &lfa; - cfa.Flags = CF_ENABLEHOOK|CF_INITTOLOGFONTSTRUCT|CF_SCREENFONTS; - cfa.lpfnHook = CFHookProcOK; - - ret = ChooseFontA(&cfa); - - expected_pointsize = MulDiv(16, 72, dpiy) * 10; - expected_lfheight = -MulDiv(expected_pointsize, dpiy, 720); - - ok(ret == TRUE, "ChooseFontA returned FALSE\n"); - ok(cfa.iPointSize == expected_pointsize, "Expected %i, got %i\n", expected_pointsize, cfa.iPointSize); - ok(lfa.lfHeight == expected_lfheight, "Expected %i, got %i\n", expected_lfheight, lfa.lfHeight); - ok(lfa.lfWeight == FW_NORMAL, "Expected FW_NORMAL, got %i\n", lfa.lfWeight); - ok(strcmp(lfa.lfFaceName, "Symbol") == 0, "Expected Symbol, got %s\n", lfa.lfFaceName); - - printer_ic = get_printer_ic(); - if (!printer_ic) - skip("can't get a DC for a local printer\n"); - else - { - memset(&lfa, 0, sizeof(LOGFONTA)); - lfa.lfHeight = -16; - lfa.lfWeight = FW_NORMAL; - strcpy(lfa.lfFaceName, "Symbol"); - - memset(&cfa, 0, sizeof(CHOOSEFONTA)); - cfa.lStructSize = sizeof(cfa); - cfa.lpLogFont = &lfa; - cfa.Flags = CF_ENABLEHOOK|CF_INITTOLOGFONTSTRUCT|CF_PRINTERFONTS; - cfa.hDC = printer_ic; - cfa.lpfnHook = CFHookProcOK; - - ret = ChooseFontA(&cfa); - - expected_pointsize = MulDiv(16, 72, dpiy) * 10; - expected_lfheight = -MulDiv(expected_pointsize, dpiy, 720); - - ok(ret == TRUE, "ChooseFontA returned FALSE\n"); - ok(cfa.iPointSize == expected_pointsize, "Expected %i, got %i\n", expected_pointsize, cfa.iPointSize); - ok(lfa.lfHeight == expected_lfheight, "Expected %i, got %i\n", expected_lfheight, lfa.lfHeight); - ok(lfa.lfWeight == FW_NORMAL, "Expected FW_NORMAL, got %i\n", lfa.lfWeight); - ok(strcmp(lfa.lfFaceName, "Symbol") == 0, "Expected Symbol, got %s\n", lfa.lfFaceName); - - DeleteDC(printer_ic); - } -} - -START_TEST(fontdlg) -{ - test_ChooseFontA(); -} diff --git a/rostests/winetests/comdlg32/printdlg.c b/rostests/winetests/comdlg32/printdlg.c deleted file mode 100644 index f021b019299..00000000000 --- a/rostests/winetests/comdlg32/printdlg.c +++ /dev/null @@ -1,396 +0,0 @@ -/* - * Unit test suite for comdlg32 API functions: printer dialogs - * - * Copyright 2006-2007 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 - -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "wingdi.h" -#include "winuser.h" -#include "objbase.h" - -#include "cderr.h" -#include "commdlg.h" - -#include "wine/test.h" - -/* ########################### */ - -static HMODULE hcomdlg32; -static HRESULT (WINAPI * pPrintDlgExA)(LPPRINTDLGEXA); -static HRESULT (WINAPI * pPrintDlgExW)(LPPRINTDLGEXW); - -/* ########################### */ - -static const CHAR emptyA[] = ""; -static const CHAR PrinterPortsA[] = "PrinterPorts"; - -/* ########################### */ - -static LPCSTR load_functions(void) -{ - LPCSTR ptr; - - ptr = "comdlg32.dll"; - hcomdlg32 = GetModuleHandleA(ptr); - - ptr = "PrintDlgExA"; - pPrintDlgExA = (void *) GetProcAddress(hcomdlg32, ptr); - if (!pPrintDlgExA) return ptr; - - ptr = "PrintDlgExW"; - pPrintDlgExW = (void *) GetProcAddress(hcomdlg32, ptr); - if (!pPrintDlgExW) return ptr; - - return NULL; - -} - -/* ########################### */ - -static void test_PageSetupDlgA(void) -{ - LPPAGESETUPDLGA pDlg; - DWORD res; - - pDlg = HeapAlloc(GetProcessHeap(), 0, (sizeof(PAGESETUPDLGA)) * 2); - if (!pDlg) return; - - SetLastError(0xdeadbeef); - res = PageSetupDlgA(NULL); - ok( !res && (CommDlgExtendedError() == CDERR_INITIALIZATION), - "returned %u with %u and 0x%x (expected '0' and " - "CDERR_INITIALIZATION)\n", res, GetLastError(), CommDlgExtendedError()); - - ZeroMemory(pDlg, sizeof(PAGESETUPDLGA)); - pDlg->lStructSize = sizeof(PAGESETUPDLGA) -1; - SetLastError(0xdeadbeef); - res = PageSetupDlgA(pDlg); - ok( !res && (CommDlgExtendedError() == CDERR_STRUCTSIZE), - "returned %u with %u and 0x%x (expected '0' and " - "CDERR_STRUCTSIZE)\n", res, GetLastError(), CommDlgExtendedError()); - - ZeroMemory(pDlg, sizeof(PAGESETUPDLGA)); - pDlg->lStructSize = sizeof(PAGESETUPDLGA) +1; - pDlg->Flags = PSD_RETURNDEFAULT; - SetLastError(0xdeadbeef); - res = PageSetupDlgA(pDlg); - ok( !res && (CommDlgExtendedError() == CDERR_STRUCTSIZE), - "returned %u with %u and 0x%x (expected '0' and CDERR_STRUCTSIZE)\n", - res, GetLastError(), CommDlgExtendedError()); - - - ZeroMemory(pDlg, sizeof(PAGESETUPDLGA)); - pDlg->lStructSize = sizeof(PAGESETUPDLGA); - pDlg->Flags = PSD_RETURNDEFAULT | PSD_NOWARNING; - SetLastError(0xdeadbeef); - res = PageSetupDlgA(pDlg); - ok( res || (CommDlgExtendedError() == PDERR_NODEFAULTPRN), - "returned %u with %u and 0x%x (expected '!= 0' or '0' and " - "PDERR_NODEFAULTPRN)\n", res, GetLastError(), CommDlgExtendedError()); - - if (!res && (CommDlgExtendedError() == PDERR_NODEFAULTPRN)) { - skip("No printer configured.\n"); - HeapFree(GetProcessHeap(), 0, pDlg); - return; - } - - ok( pDlg->hDevMode && pDlg->hDevNames, - "got %p and %p (expected '!= NULL' for both)\n", - pDlg->hDevMode, pDlg->hDevNames); - - GlobalFree(pDlg->hDevMode); - GlobalFree(pDlg->hDevNames); - - HeapFree(GetProcessHeap(), 0, pDlg); - -} - -/* ########################### */ - -static void test_PrintDlgA(void) -{ - DWORD res; - LPPRINTDLGA pDlg; - DEVNAMES *pDevNames; - LPCSTR driver; - LPCSTR device; - LPCSTR port; - CHAR buffer[MAX_PATH]; - LPSTR ptr; - - - pDlg = HeapAlloc(GetProcessHeap(), 0, (sizeof(PRINTDLGA)) * 2); - if (!pDlg) return; - - - /* will crash with unpatched wine */ - SetLastError(0xdeadbeef); - res = PrintDlgA(NULL); - ok( !res && (CommDlgExtendedError() == CDERR_INITIALIZATION), - "returned %d with 0x%x and 0x%x (expected '0' and " - "CDERR_INITIALIZATION)\n", res, GetLastError(), CommDlgExtendedError()); - - ZeroMemory(pDlg, sizeof(PRINTDLGA)); - pDlg->lStructSize = sizeof(PRINTDLGA) - 1; - SetLastError(0xdeadbeef); - res = PrintDlgA(pDlg); - ok( !res && (CommDlgExtendedError() == CDERR_STRUCTSIZE), - "returned %d with 0x%x and 0x%x (expected '0' and " - "CDERR_STRUCTSIZE)\n", res, GetLastError(), CommDlgExtendedError()); - - ZeroMemory(pDlg, sizeof(PRINTDLGA)); - pDlg->lStructSize = sizeof(PRINTDLGA) + 1; - pDlg->Flags = PD_RETURNDEFAULT; - SetLastError(0xdeadbeef); - res = PrintDlgA(pDlg); - ok( !res && (CommDlgExtendedError() == CDERR_STRUCTSIZE), - "returned %u with %u and 0x%x (expected '0' and " - "CDERR_STRUCTSIZE)\n", res, GetLastError(), CommDlgExtendedError()); - - - ZeroMemory(pDlg, sizeof(PRINTDLGA)); - pDlg->lStructSize = sizeof(PRINTDLGA); - pDlg->Flags = PD_RETURNDEFAULT; - SetLastError(0xdeadbeef); - res = PrintDlgA(pDlg); - ok( res || (CommDlgExtendedError() == PDERR_NODEFAULTPRN), - "returned %d with 0x%x and 0x%x (expected '!= 0' or '0' and " - "PDERR_NODEFAULTPRN)\n", res, GetLastError(), CommDlgExtendedError()); - - if (!res && (CommDlgExtendedError() == PDERR_NODEFAULTPRN)) { - skip("No printer configured.\n"); - HeapFree(GetProcessHeap(), 0, pDlg); - return; - } - - ok(pDlg->hDevNames != NULL, "(expected '!= NULL')\n"); - pDevNames = GlobalLock(pDlg->hDevNames); - ok(pDevNames != NULL, "(expected '!= NULL')\n"); - - if (pDevNames) { - ok(pDevNames->wDriverOffset, "(expected '!= 0' for wDriverOffset)\n"); - ok(pDevNames->wDeviceOffset, "(expected '!= 0' for wDeviceOffset)\n"); - ok(pDevNames->wOutputOffset, "(expected '!= 0' for wOutputOffset)\n"); - ok(pDevNames->wDefault == DN_DEFAULTPRN, "got 0x%x (expected DN_DEFAULTPRN)\n", pDevNames->wDefault); - - driver = (LPCSTR)pDevNames + pDevNames->wDriverOffset; - device = (LPCSTR)pDevNames + pDevNames->wDeviceOffset; - port = (LPCSTR)pDevNames + pDevNames->wOutputOffset; - trace("driver '%s' device '%s' port '%s'\n", driver, device, port); - - /* The Driver Entry does not include a Path */ - ptr = strrchr(driver, '\\'); - todo_wine { - ok( ptr == NULL, "got %p for '%s' (expected NULL for a simple name)\n", ptr, driver); - } - - /* The Driver Entry does not have an extension (fixed to ".drv") */ - ptr = strrchr(driver, '.'); - todo_wine { - ok( ptr == NULL, "got %p for '%s' (expected NULL for no extension)\n", ptr, driver); - } - - - buffer[0] = '\0'; - SetLastError(0xdeadbeef); - res = GetProfileStringA(PrinterPortsA, device, emptyA, buffer, sizeof(buffer)); - ptr = strchr(buffer, ','); - ok( (res > 1) && (ptr != NULL), - "got %u with %u and %p for '%s' (expected '>1' and '!= NULL')\n", - res, GetLastError(), ptr, buffer); - - if (ptr) ptr[0] = '\0'; - todo_wine { - ok( lstrcmpiA(driver, buffer) == 0, - "got driver '%s' (expected '%s')\n", driver, buffer); - } - - } - - GlobalUnlock(pDlg->hDevNames); - - GlobalFree(pDlg->hDevMode); - GlobalFree(pDlg->hDevNames); - HeapFree(GetProcessHeap(), 0, pDlg); - -} - -/* ########################### */ - -static void test_PrintDlgExW(void) -{ - LPPRINTDLGEXW pDlg; - HRESULT res; - - /* Set CommDlgExtendedError != 0 */ - PrintDlg(NULL); - SetLastError(0xdeadbeef); - res = pPrintDlgExW(NULL); - if(res == E_NOTIMPL) - { - win_skip("PrintDlgExW returns not implemented\n"); - return; - } - ok( (res == E_INVALIDARG), - "got 0x%x with %u and %u (expected 'E_INVALIDARG')\n", - res, GetLastError(), CommDlgExtendedError()); - - - pDlg = HeapAlloc(GetProcessHeap(), 0, (sizeof(PRINTDLGEXW)) + 8); - if (!pDlg) return; - - /* lStructSize must be exact */ - ZeroMemory(pDlg, sizeof(PRINTDLGEXW)); - pDlg->lStructSize = sizeof(PRINTDLGEXW) - 1; - PrintDlg(NULL); - SetLastError(0xdeadbeef); - res = pPrintDlgExW(pDlg); - ok( (res == E_INVALIDARG), - "got 0x%x with %u and %u (expected 'E_INVALIDARG')\n", - res, GetLastError(), CommDlgExtendedError()); - - - ZeroMemory(pDlg, sizeof(PRINTDLGEXW)); - pDlg->lStructSize = sizeof(PRINTDLGEXW) + 1; - PrintDlg(NULL); - SetLastError(0xdeadbeef); - res = pPrintDlgExW(pDlg); - ok( (res == E_INVALIDARG), - "got 0x%x with %u and %u (expected 'E_INVALIDARG')\n", - res, GetLastError(), CommDlgExtendedError()); - - - ZeroMemory(pDlg, sizeof(PRINTDLGEXW)); - pDlg->lStructSize = sizeof(PRINTDLGEXW); - SetLastError(0xdeadbeef); - res = pPrintDlgExW(pDlg); - ok( (res == E_HANDLE), - "got 0x%x with %u and %u (expected 'E_HANDLE')\n", - res, GetLastError(), CommDlgExtendedError()); - - - HeapFree(GetProcessHeap(), 0, pDlg); - return; - -} - -static BOOL abort_proc_called = FALSE; -static BOOL CALLBACK abort_proc(HDC hdc, int error) { return abort_proc_called = TRUE; } -static void test_abort_proc(void) -{ - HDC print_dc; - RECT rect = {0, 0, 100, 100}; - DOCINFOA doc_info = {0}; - PRINTDLGA pd = {0}; - char filename[MAX_PATH]; - int job_id; - - if (!GetTempFileNameA(".", "prn", 0, filename)) - { - skip("Failed to create a temporary file name\n"); - return; - } - - pd.lStructSize = sizeof(pd); - pd.Flags = PD_RETURNDEFAULT | PD_ALLPAGES | PD_RETURNDC | PD_PRINTTOFILE; - pd.nFromPage = 1; - pd.nToPage = 1; - pd.nCopies = 1; - - if (!PrintDlgA(&pd)) - { - skip("No default printer available.\n"); - ok(DeleteFileA(filename), "Failed to delete temporary file\n"); - return; - } - GlobalFree(pd.hDevMode); - GlobalFree(pd.hDevNames); - - ok(pd.hDC != NULL, "PrintDlg didn't return a DC.\n"); - if (!(print_dc = pd.hDC)) - { - ok(DeleteFileA(filename), "Failed to delete temporary file\n"); - return; - } - - ok(SetAbortProc(print_dc, abort_proc) > 0, "SetAbortProc failed\n"); - ok(!abort_proc_called, "AbortProc got called unexpectedly by SetAbortProc.\n"); - abort_proc_called = FALSE; - - doc_info.cbSize = sizeof(doc_info); - doc_info.lpszDocName = "Some document"; - doc_info.lpszOutput = filename; - - job_id = StartDocA(print_dc, &doc_info); - - ok(job_id > 0 || - GetLastError() == ERROR_SPL_NO_STARTDOC, /* Vista can fail with this error when using the XPS driver */ - "StartDocA failed ret %d gle %d\n", job_id, GetLastError()); - - if(job_id <= 0) - { - skip("StartDoc failed\n"); - goto end; - } - - /* StartDoc may or may not call abort proc */ - - abort_proc_called = FALSE; - ok(StartPage(print_dc) > 0, "StartPage failed\n"); - ok(!abort_proc_called, "AbortProc got called unexpectedly by StartPage.\n"); - abort_proc_called = FALSE; - - /* following functions sometimes call abort proc too */ - ok(FillRect(print_dc, &rect, (HBRUSH)(COLOR_BACKGROUND + 1)), "FillRect failed\n"); - ok(EndPage(print_dc) > 0, "EndPage failed\n"); - ok(EndDoc(print_dc) > 0, "EndDoc failed\n"); - - abort_proc_called = FALSE; - ok(DeleteDC(print_dc), "DeleteDC failed\n"); - ok(!abort_proc_called, "AbortProc got called unexpectedly by DeleteDC.\n"); - abort_proc_called = FALSE; - -end: - ok(DeleteFileA(filename), "Failed to delete temporary file\n"); -} - -/* ########################### */ - -START_TEST(printdlg) -{ - LPCSTR ptr; - - ptr = load_functions(); - - test_PageSetupDlgA(); - test_PrintDlgA(); - test_abort_proc(); - - /* PrintDlgEx not present before w2k */ - if (ptr) { - win_skip("%s\n", ptr); - return; - } - - test_PrintDlgExW(); -} diff --git a/rostests/winetests/comdlg32/rsrc.rc b/rostests/winetests/comdlg32/rsrc.rc deleted file mode 100644 index 65e7972ffa4..00000000000 --- a/rostests/winetests/comdlg32/rsrc.rc +++ /dev/null @@ -1,59 +0,0 @@ -/* Resources for the common dialog unit test suite. - * - * Copyright 2008 CodeWeavers, Aric Stewart - * - * 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 "windef.h" -#include "winuser.h" - -TEMPLATE1 DIALOG LOADONCALL MOVEABLE DISCARDABLE 5, 43, 227, 215 -STYLE WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS -FONT 8, "MS Shell Dlg" -{ - LTEXT "Path:",-1,28,4,36,8 - LTEXT "Text1",-1,4,16,20,40 - LTEXT "Selected:",-1,32,49,40,8 - EDITTEXT 55,74,47,200,12,ES_AUTOHSCROLL - LTEXT "Text2",-1,232,20,65,8 - LTEXT "",-1,28,16,204,31 - EDITTEXT 56,65,2,200,12,ES_AUTOHSCROLL -} - -/* Used by the resize file dialog tests. - * Keep this template small or get failures - * resizing on small desk tops. - * This will work with 640x480 pixels - */ -TEMPLATE_SZ DIALOG LOADONCALL MOVEABLE DISCARDABLE 5, 43, 300, 40 -STYLE WS_CHILD | WS_CLIPSIBLINGS -FONT 8, "MS Shell Dlg" -{ - LTEXT "Path:",-1,28,4,36,8 - LTEXT "Text1",-1,4,16,20,40 - LTEXT "Text2",-1,232,20,65,8 - LTEXT "",-1,28,16,204,31 - EDITTEXT 56,65,2,200,12,ES_AUTOHSCROLL -} - -/* note: the test program will modify coordinates and nr of controls in this template */ -TEMPLATE_STC32 DIALOG LOADONCALL MOVEABLE DISCARDABLE 11111, 0, 316, 76 -STYLE WS_CHILD | WS_CLIPSIBLINGS -FONT 8, "MS Shell Dlg" -{ - LTEXT "", 1119, 22222, 0, 204, 76 - PUSHBUTTON "TEST", -1, 12345, 0, 20, 20 -} diff --git a/rostests/winetests/comdlg32/testlist.c b/rostests/winetests/comdlg32/testlist.c deleted file mode 100644 index 339b3525ac5..00000000000 --- a/rostests/winetests/comdlg32/testlist.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_filedlg(void); -extern void func_printdlg(void); - -const struct test winetest_testlist[] = -{ - { "filedlg", func_filedlg }, - { "printdlg", func_printdlg }, - { 0, 0 } -}; diff --git a/rostests/winetests/credui/CMakeLists.txt b/rostests/winetests/credui/CMakeLists.txt deleted file mode 100644 index e0836bf43d1..00000000000 --- a/rostests/winetests/credui/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(credui_winetest credui.c testlist.c) -target_link_libraries(credui_winetest wine) -set_module_type(credui_winetest win32cui) -add_importlibs(credui_winetest credui msvcrt kernel32 ntdll) -add_cd_file(TARGET credui_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/credui/credui.c b/rostests/winetests/credui/credui.c deleted file mode 100644 index 969b096a766..00000000000 --- a/rostests/winetests/credui/credui.c +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Credentials User Interface Tests - * - * Copyright 2007 Robert Shearman 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 - -#include "windef.h" -#include "winbase.h" -#include "wincred.h" - -#include "wine/test.h" - -static void test_CredUIPromptForCredentials(void) -{ - static const WCHAR wszServerName[] = {'W','i','n','e','T','e','s','t',0}; - DWORD ret; - WCHAR username[256]; - WCHAR password[256]; - CREDUI_INFOW credui_info; - BOOL save = FALSE; - - credui_info.cbSize = sizeof(credui_info); - credui_info.hwndParent = NULL; - credui_info.pszMessageText = NULL; - credui_info.hbmBanner = NULL; - - ret = CredUIConfirmCredentialsW(NULL, TRUE); - ok(ret == ERROR_INVALID_PARAMETER /* 2003 + */ || ret == ERROR_NOT_FOUND /* XP */, - "CredUIConfirmCredentials should have returned ERROR_INVALID_PARAMETER or ERROR_NOT_FOUND instead of %d\n", ret); - - ret = CredUIConfirmCredentialsW(wszServerName, TRUE); - ok(ret == ERROR_NOT_FOUND, "CredUIConfirmCredentials should have returned ERROR_NOT_FOUND instead of %d\n", ret); - - username[0] = '\0'; - password[0] = '\0'; - ret = CredUIPromptForCredentialsW(NULL, NULL, NULL, 0, username, - sizeof(username)/sizeof(username[0]), - password, sizeof(password)/sizeof(password[0]), - NULL, CREDUI_FLAGS_ALWAYS_SHOW_UI); - ok(ret == ERROR_INVALID_FLAGS, "CredUIPromptForCredentials should have returned ERROR_INVALID_FLAGS instead of %d\n", ret); - - ret = CredUIPromptForCredentialsW(NULL, NULL, NULL, 0, username, - sizeof(username)/sizeof(username[0]), - password, sizeof(password)/sizeof(password[0]), - NULL, CREDUI_FLAGS_ALWAYS_SHOW_UI | CREDUI_FLAGS_GENERIC_CREDENTIALS); - ok(ret == ERROR_INVALID_PARAMETER, "CredUIPromptForCredentials should have returned ERROR_INVALID_PARAMETER instead of %d\n", ret); - - ret = CredUIPromptForCredentialsW(NULL, wszServerName, NULL, 0, username, - sizeof(username)/sizeof(username[0]), - password, sizeof(password)/sizeof(password[0]), - NULL, CREDUI_FLAGS_SHOW_SAVE_CHECK_BOX); - ok(ret == ERROR_INVALID_PARAMETER, "CredUIPromptForCredentials should have returned ERROR_INVALID_FLAGS instead of %d\n", ret); - - if (winetest_interactive) - { - static const WCHAR wszCaption1[] = {'C','R','E','D','U','I','_','F','L','A','G','S','_','E','X','P','E','C','T','_','C','O','N','F','I','R','M','A','T','I','O','N',0}; - static const WCHAR wszCaption2[] = {'C','R','E','D','U','I','_','F','L','A','G','S','_','I','N','C','O','R','R','E','C','T','_','P','A','S','S','W','O','R','D','|', - 'C','R','E','D','U','I','_','F','L','A','G','S','_','E','X','P','E','C','T','_','C','O','N','F','I','R','M','A','T','I','O','N',0}; - static const WCHAR wszCaption3[] = {'C','R','E','D','U','I','_','F','L','A','G','S','_','D','O','_','N','O','T','_','P','E','R','S','I','S','T','|', - 'C','R','E','D','U','I','_','F','L','A','G','S','_','E','X','P','E','C','T','_','C','O','N','F','I','R','M','A','T','I','O','N',0}; - static const WCHAR wszCaption4[] = {'C','R','E','D','U','I','_','F','L','A','G','S','_','P','E','R','S','I','S','T','|', - 'C','R','E','D','U','I','_','F','L','A','G','S','_','E','X','P','E','C','T','_','C','O','N','F','I','R','M','A','T','I','O','N',0}; - - ret = CredUIPromptForCredentialsW(NULL, wszServerName, NULL, 0, username, - sizeof(username)/sizeof(username[0]), - password, sizeof(password)/sizeof(password[0]), - &save, CREDUI_FLAGS_EXPECT_CONFIRMATION); - ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %d\n", ret); - if (ret == ERROR_SUCCESS) - ret = CredUIConfirmCredentialsW(wszServerName, FALSE); - - credui_info.pszCaptionText = wszCaption1; - ret = CredUIPromptForCredentialsW(&credui_info, wszServerName, NULL, - ERROR_ACCESS_DENIED, - username, sizeof(username)/sizeof(username[0]), - password, sizeof(password)/sizeof(password[0]), - &save, CREDUI_FLAGS_EXPECT_CONFIRMATION); - ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %d\n", ret); - if (ret == ERROR_SUCCESS) - ret = CredUIConfirmCredentialsW(wszServerName, FALSE); - - credui_info.pszCaptionText = wszCaption2; - ret = CredUIPromptForCredentialsW(&credui_info, wszServerName, NULL, 0, - username, sizeof(username)/sizeof(username[0]), - password, sizeof(password)/sizeof(password[0]), - NULL, CREDUI_FLAGS_INCORRECT_PASSWORD|CREDUI_FLAGS_EXPECT_CONFIRMATION); - ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %d\n", ret); - if (ret == ERROR_SUCCESS) - ret = CredUIConfirmCredentialsW(wszServerName, FALSE); - - save = TRUE; - credui_info.pszCaptionText = wszCaption3; - ret = CredUIPromptForCredentialsW(&credui_info, wszServerName, NULL, 0, - username, sizeof(username)/sizeof(username[0]), - password, sizeof(password)/sizeof(password[0]), - &save, CREDUI_FLAGS_DO_NOT_PERSIST|CREDUI_FLAGS_EXPECT_CONFIRMATION); - ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %d\n", ret); - ok(save, "save flag should have been untouched\n"); - - save = FALSE; - credui_info.pszCaptionText = wszCaption4; - ret = CredUIPromptForCredentialsW(&credui_info, wszServerName, NULL, 0, - username, sizeof(username)/sizeof(username[0]), - password, sizeof(password)/sizeof(password[0]), - &save, CREDUI_FLAGS_PERSIST|CREDUI_FLAGS_EXPECT_CONFIRMATION); - ok(ret == ERROR_SUCCESS || ret == ERROR_CANCELLED, "CredUIPromptForCredentials failed with error %d\n", ret); - ok(!save, "save flag should have been untouched\n"); - if (ret == ERROR_SUCCESS) - ret = CredUIConfirmCredentialsW(wszServerName, FALSE); - } -} - -START_TEST(credui) -{ - test_CredUIPromptForCredentials(); -} diff --git a/rostests/winetests/credui/credui.rbuild b/rostests/winetests/credui/credui.rbuild deleted file mode 100644 index 90863a6492d..00000000000 --- a/rostests/winetests/credui/credui.rbuild +++ /dev/null @@ -1,9 +0,0 @@ - - . - - credui.c - testlist.c - wine - credui - ntdll - diff --git a/rostests/winetests/credui/testlist.c b/rostests/winetests/credui/testlist.c deleted file mode 100644 index 838ca5037d0..00000000000 --- a/rostests/winetests/credui/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_credui(void); - -const struct test winetest_testlist[] = -{ - { "credui", func_credui }, - { 0, 0 } -}; diff --git a/rostests/winetests/crypt32/CMakeLists.txt b/rostests/winetests/crypt32/CMakeLists.txt deleted file mode 100644 index c1c55f1dc26..00000000000 --- a/rostests/winetests/crypt32/CMakeLists.txt +++ /dev/null @@ -1,28 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - base64.c - cert.c - chain.c - crl.c - ctl.c - encode.c - main.c - message.c - msg.c - object.c - oid.c - protectdata.c - sip.c - store.c - str.c - testlist.c) - -add_executable(crypt32_winetest ${SOURCE}) -target_link_libraries(crypt32_winetest wine) -set_module_type(crypt32_winetest win32cui) -add_importlibs(crypt32_winetest crypt32 advapi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET crypt32_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/crypt32/base64.c b/rostests/winetests/crypt32/base64.c deleted file mode 100644 index 5a260edfd6e..00000000000 --- a/rostests/winetests/crypt32/base64.c +++ /dev/null @@ -1,458 +0,0 @@ -/* - * Unit test suite for crypt32.dll's CryptStringToBinary and CryptBinaryToString - * functions. - * - * Copyright 2006 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 - */ -#include -#include -#include -#include -#include -#include - -#include "wine/test.h" - -#define CERT_HEADER "-----BEGIN CERTIFICATE-----\r\n" -#define CERT_TRAILER "-----END CERTIFICATE-----\r\n" -#define CERT_REQUEST_HEADER "-----BEGIN NEW CERTIFICATE REQUEST-----\r\n" -#define CERT_REQUEST_TRAILER "-----END NEW CERTIFICATE REQUEST-----\r\n" -#define X509_HEADER "-----BEGIN X509 CRL-----\r\n" -#define X509_TRAILER "-----END X509 CRL-----\r\n" -#define CERT_HEADER_NOCR "-----BEGIN CERTIFICATE-----\n" -#define CERT_TRAILER_NOCR "-----END CERTIFICATE-----\n" -#define CERT_REQUEST_HEADER_NOCR "-----BEGIN NEW CERTIFICATE REQUEST-----\n" -#define CERT_REQUEST_TRAILER_NOCR "-----END NEW CERTIFICATE REQUEST-----\n" -#define X509_HEADER_NOCR "-----BEGIN X509 CRL-----\n" -#define X509_TRAILER_NOCR "-----END X509 CRL-----\n" - -typedef BOOL (WINAPI *CryptBinaryToStringAFunc)(const BYTE *pbBinary, - DWORD cbBinary, DWORD dwFlags, LPSTR pszString, DWORD *pcchString); -typedef BOOL (WINAPI *CryptStringToBinaryAFunc)(LPCSTR pszString, - DWORD cchString, DWORD dwFlags, BYTE *pbBinary, DWORD *pcbBinary, - DWORD *pdwSkip, DWORD *pdwFlags); - -CryptBinaryToStringAFunc pCryptBinaryToStringA; -CryptStringToBinaryAFunc pCryptStringToBinaryA; - -struct BinTests -{ - const BYTE *toEncode; - DWORD toEncodeLen; - const char *base64; -}; - -static const BYTE toEncode1[] = { 0 }; -static const BYTE toEncode2[] = { 1,2 }; -static const BYTE toEncode3[] = { 1,2,3 }; -static const BYTE toEncode4[] = - "abcdefghijlkmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890" - "abcdefghijlkmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890" - "abcdefghijlkmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890"; - -struct BinTests tests[] = { - { toEncode1, sizeof(toEncode1), "AA==\r\n", }, - { toEncode2, sizeof(toEncode2), "AQI=\r\n", }, - /* { toEncode3, sizeof(toEncode3), "AQID\r\n", }, This test fails on Vista. */ - { toEncode4, sizeof(toEncode4), - "YWJjZGVmZ2hpamxrbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5MEFCQ0RFRkdISUpL\r\n" - "TE1OT1BRUlNUVVZXWFlaMDEyMzQ1Njc4OTBhYmNkZWZnaGlqbGttbm9wcXJzdHV2\r\n" - "d3h5ejAxMjM0NTY3ODkwQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVowMTIzNDU2\r\n" - "Nzg5MGFiY2RlZmdoaWpsa21ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OTBBQkNERUZH\r\n" - "SElKS0xNTk9QUVJTVFVWV1hZWjAxMjM0NTY3ODkwAA==\r\n" }, -}; - -struct BinTests testsNoCR[] = { - { toEncode1, sizeof(toEncode1), "AA==\n", }, - { toEncode2, sizeof(toEncode2), "AQI=\n", }, - /* { toEncode3, sizeof(toEncode3), "AQID\n", }, This test fails on Vista. */ - { toEncode4, sizeof(toEncode4), - "YWJjZGVmZ2hpamxrbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5MEFCQ0RFRkdISUpL\n" - "TE1OT1BRUlNUVVZXWFlaMDEyMzQ1Njc4OTBhYmNkZWZnaGlqbGttbm9wcXJzdHV2\n" - "d3h5ejAxMjM0NTY3ODkwQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVowMTIzNDU2\n" - "Nzg5MGFiY2RlZmdoaWpsa21ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OTBBQkNERUZH\n" - "SElKS0xNTk9QUVJTVFVWV1hZWjAxMjM0NTY3ODkwAA==\n" }, -}; - -static void encodeAndCompareBase64_A(const BYTE *toEncode, DWORD toEncodeLen, - DWORD format, const char *expected, const char *header, const char *trailer) -{ - DWORD strLen = 0; - LPSTR str = NULL; - BOOL ret; - - ret = pCryptBinaryToStringA(toEncode, toEncodeLen, format, NULL, &strLen); - ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError()); - str = HeapAlloc(GetProcessHeap(), 0, strLen); - if (str) - { - DWORD strLen2 = strLen; - LPCSTR ptr = str; - - ret = pCryptBinaryToStringA(toEncode, toEncodeLen, format, str, - &strLen2); - ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError()); - ok(strLen2 == strLen - 1, "Expected length %d, got %d\n", - strLen - 1, strLen); - if (header) - { - ok(!strncmp(header, ptr, strlen(header)), - "Expected header %s, got %s\n", header, ptr); - ptr += strlen(header); - } - ok(!strncmp(expected, ptr, strlen(expected)), - "Expected %s, got %s\n", expected, ptr); - ptr += strlen(expected); - if (trailer) - { - ok(!strncmp(trailer, ptr, strlen(trailer)), - "Expected trailer %s, got %s\n", trailer, ptr); - ptr += strlen(trailer); - } - HeapFree(GetProcessHeap(), 0, str); - } -} - -static void testBinaryToStringA(void) -{ - BOOL ret; - DWORD strLen = 0, i; - - ret = pCryptBinaryToStringA(NULL, 0, 0, NULL, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - ret = pCryptBinaryToStringA(NULL, 0, 0, NULL, &strLen); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) - { - DWORD strLen = 0; - LPSTR str = NULL; - BOOL ret; - - ret = pCryptBinaryToStringA(tests[i].toEncode, tests[i].toEncodeLen, - CRYPT_STRING_BINARY, NULL, &strLen); - ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError()); - str = HeapAlloc(GetProcessHeap(), 0, strLen); - if (str) - { - DWORD strLen2 = strLen; - - ret = pCryptBinaryToStringA(tests[i].toEncode, tests[i].toEncodeLen, - CRYPT_STRING_BINARY, str, &strLen2); - ok(strLen == strLen2, "Expected length %d, got %d\n", strLen, - strLen2); - ok(!memcmp(str, tests[i].toEncode, tests[i].toEncodeLen), - "Unexpected value\n"); - HeapFree(GetProcessHeap(), 0, str); - } - encodeAndCompareBase64_A(tests[i].toEncode, tests[i].toEncodeLen, - CRYPT_STRING_BASE64, tests[i].base64, NULL, NULL); - encodeAndCompareBase64_A(tests[i].toEncode, tests[i].toEncodeLen, - CRYPT_STRING_BASE64HEADER, tests[i].base64, CERT_HEADER, - CERT_TRAILER); - encodeAndCompareBase64_A(tests[i].toEncode, tests[i].toEncodeLen, - CRYPT_STRING_BASE64REQUESTHEADER, tests[i].base64, - CERT_REQUEST_HEADER, CERT_REQUEST_TRAILER); - encodeAndCompareBase64_A(tests[i].toEncode, tests[i].toEncodeLen, - CRYPT_STRING_BASE64X509CRLHEADER, tests[i].base64, X509_HEADER, - X509_TRAILER); - } - for (i = 0; i < sizeof(testsNoCR) / sizeof(testsNoCR[0]); i++) - { - DWORD strLen = 0; - LPSTR str = NULL; - BOOL ret; - - ret = pCryptBinaryToStringA(testsNoCR[i].toEncode, - testsNoCR[i].toEncodeLen, CRYPT_STRING_BINARY | CRYPT_STRING_NOCR, - NULL, &strLen); - ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError()); - str = HeapAlloc(GetProcessHeap(), 0, strLen); - if (str) - { - DWORD strLen2 = strLen; - - ret = pCryptBinaryToStringA(testsNoCR[i].toEncode, - testsNoCR[i].toEncodeLen, CRYPT_STRING_BINARY | CRYPT_STRING_NOCR, - str, &strLen2); - ok(strLen == strLen2, "Expected length %d, got %d\n", strLen, - strLen2); - ok(!memcmp(str, testsNoCR[i].toEncode, testsNoCR[i].toEncodeLen), - "Unexpected value\n"); - HeapFree(GetProcessHeap(), 0, str); - } - encodeAndCompareBase64_A(testsNoCR[i].toEncode, - testsNoCR[i].toEncodeLen, CRYPT_STRING_BASE64 | CRYPT_STRING_NOCR, - testsNoCR[i].base64, NULL, NULL); - encodeAndCompareBase64_A(testsNoCR[i].toEncode, - testsNoCR[i].toEncodeLen, - CRYPT_STRING_BASE64HEADER | CRYPT_STRING_NOCR, testsNoCR[i].base64, - CERT_HEADER_NOCR, CERT_TRAILER_NOCR); - encodeAndCompareBase64_A(testsNoCR[i].toEncode, - testsNoCR[i].toEncodeLen, - CRYPT_STRING_BASE64REQUESTHEADER | CRYPT_STRING_NOCR, - testsNoCR[i].base64, CERT_REQUEST_HEADER_NOCR, - CERT_REQUEST_TRAILER_NOCR); - encodeAndCompareBase64_A(testsNoCR[i].toEncode, - testsNoCR[i].toEncodeLen, - CRYPT_STRING_BASE64X509CRLHEADER | CRYPT_STRING_NOCR, - testsNoCR[i].base64, X509_HEADER_NOCR, X509_TRAILER_NOCR); - } -} - -static void decodeAndCompareBase64_A(LPCSTR toDecode, LPCSTR header, - LPCSTR trailer, DWORD useFormat, DWORD expectedFormat, const BYTE *expected, - DWORD expectedLen) -{ - static const char garbage[] = "garbage\r\n"; - LPSTR str; - DWORD len = strlen(toDecode) + strlen(garbage) + 1; - - if (header) - len += strlen(header); - if (trailer) - len += strlen(trailer); - str = HeapAlloc(GetProcessHeap(), 0, len); - if (str) - { - LPBYTE buf; - DWORD bufLen = 0; - BOOL ret; - - if (header) - strcpy(str, header); - else - *str = 0; - strcat(str, toDecode); - if (trailer) - strcat(str, trailer); - ret = pCryptStringToBinaryA(str, 0, useFormat, NULL, &bufLen, NULL, - NULL); - ok(ret, "CryptStringToBinaryA failed: %d\n", GetLastError()); - buf = HeapAlloc(GetProcessHeap(), 0, bufLen); - if (buf) - { - DWORD skipped, usedFormat; - - /* check as normal, make sure last two parameters are optional */ - ret = pCryptStringToBinaryA(str, 0, useFormat, buf, &bufLen, NULL, - NULL); - ok(ret, "CryptStringToBinaryA failed: %d\n", GetLastError()); - ok(bufLen == expectedLen, - "Expected length %d, got %d\n", expectedLen, bufLen); - ok(!memcmp(buf, expected, bufLen), "Unexpected value\n"); - /* check last two params */ - ret = pCryptStringToBinaryA(str, 0, useFormat, buf, &bufLen, - &skipped, &usedFormat); - ok(ret, "CryptStringToBinaryA failed: %d\n", GetLastError()); - ok(skipped == 0, "Expected skipped 0, got %d\n", skipped); - ok(usedFormat == expectedFormat, "Expected format %d, got %d\n", - expectedFormat, usedFormat); - HeapFree(GetProcessHeap(), 0, buf); - } - - /* Check again, but with garbage up front */ - strcpy(str, garbage); - if (header) - strcat(str, header); - strcat(str, toDecode); - if (trailer) - strcat(str, trailer); - ret = pCryptStringToBinaryA(str, 0, useFormat, NULL, &bufLen, NULL, - NULL); - /* expect failure with no header, and success with one */ - if (header) - ok(ret, "CryptStringToBinaryA failed: %d\n", GetLastError()); - else - ok(!ret && GetLastError() == ERROR_INVALID_DATA, - "Expected !ret and last error ERROR_INVALID_DATA, got ret=%d, error=%d\n", ret, GetLastError()); - if (ret) - { - buf = HeapAlloc(GetProcessHeap(), 0, bufLen); - if (buf) - { - DWORD skipped, usedFormat; - - ret = pCryptStringToBinaryA(str, 0, useFormat, buf, &bufLen, - &skipped, &usedFormat); - ok(skipped == strlen(garbage), - "Expected %d characters of \"%s\" skipped when trying format %08x, got %d (used format is %08x)\n", - lstrlenA(garbage), str, useFormat, skipped, usedFormat); - HeapFree(GetProcessHeap(), 0, buf); - } - } - HeapFree(GetProcessHeap(), 0, str); - } -} - -struct BadString -{ - const char *str; - DWORD format; -}; - -struct BadString badStrings[] = { - { "A\r\nA\r\n=\r\n=\r\n", CRYPT_STRING_BASE64 }, - { "AA\r\n=\r\n=\r\n", CRYPT_STRING_BASE64 }, - { "AA=\r\n=\r\n", CRYPT_STRING_BASE64 }, - { "-----BEGIN X509 CRL-----\r\nAA==\r\n", CRYPT_STRING_BASE64X509CRLHEADER }, -}; - -static void testStringToBinaryA(void) -{ - BOOL ret; - DWORD bufLen = 0, i; - - ret = pCryptStringToBinaryA(NULL, 0, 0, NULL, NULL, NULL, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - ret = pCryptStringToBinaryA(NULL, 0, 0, NULL, &bufLen, NULL, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - /* Bogus format */ - ret = pCryptStringToBinaryA(tests[0].base64, 0, 0, NULL, &bufLen, NULL, - NULL); - ok(!ret && GetLastError() == ERROR_INVALID_DATA, - "Expected ERROR_INVALID_DATA, got %d\n", GetLastError()); - /* Decoding doesn't expect the NOCR flag to be specified */ - ret = pCryptStringToBinaryA(tests[0].base64, 1, - CRYPT_STRING_BASE64 | CRYPT_STRING_NOCR, NULL, &bufLen, NULL, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_DATA, - "Expected ERROR_INVALID_DATA, got %d\n", GetLastError()); - /* Bad strings */ - for (i = 0; i < sizeof(badStrings) / sizeof(badStrings[0]); i++) - { - bufLen = 0; - ret = pCryptStringToBinaryA(badStrings[i].str, 0, badStrings[i].format, - NULL, &bufLen, NULL, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_DATA, - "Expected ERROR_INVALID_DATA, got %d\n", GetLastError()); - } - /* Good strings */ - for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) - { - bufLen = 0; - /* Bogus length--oddly enough, that succeeds, even though it's not - * properly padded. - */ - ret = pCryptStringToBinaryA(tests[i].base64, 1, CRYPT_STRING_BASE64, - NULL, &bufLen, NULL, NULL); - todo_wine ok(ret, "CryptStringToBinaryA failed: %d\n", GetLastError()); - /* Check with the precise format */ - decodeAndCompareBase64_A(tests[i].base64, NULL, NULL, - CRYPT_STRING_BASE64, CRYPT_STRING_BASE64, tests[i].toEncode, - tests[i].toEncodeLen); - decodeAndCompareBase64_A(tests[i].base64, CERT_HEADER, CERT_TRAILER, - CRYPT_STRING_BASE64HEADER, CRYPT_STRING_BASE64HEADER, - tests[i].toEncode, tests[i].toEncodeLen); - decodeAndCompareBase64_A(tests[i].base64, CERT_REQUEST_HEADER, - CERT_REQUEST_TRAILER, CRYPT_STRING_BASE64REQUESTHEADER, - CRYPT_STRING_BASE64REQUESTHEADER, tests[i].toEncode, - tests[i].toEncodeLen); - decodeAndCompareBase64_A(tests[i].base64, X509_HEADER, X509_TRAILER, - CRYPT_STRING_BASE64X509CRLHEADER, CRYPT_STRING_BASE64X509CRLHEADER, - tests[i].toEncode, tests[i].toEncodeLen); - /* And check with the "any" formats */ - decodeAndCompareBase64_A(tests[i].base64, NULL, NULL, - CRYPT_STRING_BASE64_ANY, CRYPT_STRING_BASE64, tests[i].toEncode, - tests[i].toEncodeLen); - /* Don't check with no header and the string_any format, that'll - * always succeed. - */ - decodeAndCompareBase64_A(tests[i].base64, CERT_HEADER, CERT_TRAILER, - CRYPT_STRING_BASE64_ANY, CRYPT_STRING_BASE64HEADER, tests[i].toEncode, - tests[i].toEncodeLen); - decodeAndCompareBase64_A(tests[i].base64, CERT_HEADER, CERT_TRAILER, - CRYPT_STRING_ANY, CRYPT_STRING_BASE64HEADER, tests[i].toEncode, - tests[i].toEncodeLen); - /* oddly, these seem to decode using the wrong format - decodeAndCompareBase64_A(tests[i].base64, CERT_REQUEST_HEADER, - CERT_REQUEST_TRAILER, CRYPT_STRING_BASE64_ANY, - CRYPT_STRING_BASE64REQUESTHEADER, tests[i].toEncode, - tests[i].toEncodeLen); - decodeAndCompareBase64_A(tests[i].base64, CERT_REQUEST_HEADER, - CERT_REQUEST_TRAILER, CRYPT_STRING_ANY, - CRYPT_STRING_BASE64REQUESTHEADER, tests[i].toEncode, - tests[i].toEncodeLen); - decodeAndCompareBase64_A(tests[i].base64, X509_HEADER, X509_TRAILER, - CRYPT_STRING_BASE64_ANY, CRYPT_STRING_BASE64X509CRLHEADER, - tests[i].toEncode, tests[i].toEncodeLen); - decodeAndCompareBase64_A(tests[i].base64, X509_HEADER, X509_TRAILER, - CRYPT_STRING_ANY, CRYPT_STRING_BASE64X509CRLHEADER, tests[i].toEncode, - tests[i].toEncodeLen); - */ - } - /* And again, with no CR--decoding handles this automatically */ - for (i = 0; i < sizeof(testsNoCR) / sizeof(testsNoCR[0]); i++) - { - bufLen = 0; - /* Bogus length--oddly enough, that succeeds, even though it's not - * properly padded. - */ - ret = pCryptStringToBinaryA(testsNoCR[i].base64, 1, CRYPT_STRING_BASE64, - NULL, &bufLen, NULL, NULL); - todo_wine ok(ret, "CryptStringToBinaryA failed: %d\n", GetLastError()); - /* Check with the precise format */ - decodeAndCompareBase64_A(testsNoCR[i].base64, NULL, NULL, - CRYPT_STRING_BASE64, CRYPT_STRING_BASE64, testsNoCR[i].toEncode, - testsNoCR[i].toEncodeLen); - decodeAndCompareBase64_A(testsNoCR[i].base64, CERT_HEADER, CERT_TRAILER, - CRYPT_STRING_BASE64HEADER, CRYPT_STRING_BASE64HEADER, - testsNoCR[i].toEncode, testsNoCR[i].toEncodeLen); - decodeAndCompareBase64_A(testsNoCR[i].base64, CERT_REQUEST_HEADER, - CERT_REQUEST_TRAILER, CRYPT_STRING_BASE64REQUESTHEADER, - CRYPT_STRING_BASE64REQUESTHEADER, testsNoCR[i].toEncode, - testsNoCR[i].toEncodeLen); - decodeAndCompareBase64_A(testsNoCR[i].base64, X509_HEADER, X509_TRAILER, - CRYPT_STRING_BASE64X509CRLHEADER, CRYPT_STRING_BASE64X509CRLHEADER, - testsNoCR[i].toEncode, testsNoCR[i].toEncodeLen); - /* And check with the "any" formats */ - decodeAndCompareBase64_A(testsNoCR[i].base64, NULL, NULL, - CRYPT_STRING_BASE64_ANY, CRYPT_STRING_BASE64, testsNoCR[i].toEncode, - testsNoCR[i].toEncodeLen); - /* Don't check with no header and the string_any format, that'll - * always succeed. - */ - decodeAndCompareBase64_A(testsNoCR[i].base64, CERT_HEADER, CERT_TRAILER, - CRYPT_STRING_BASE64_ANY, CRYPT_STRING_BASE64HEADER, - testsNoCR[i].toEncode, testsNoCR[i].toEncodeLen); - decodeAndCompareBase64_A(testsNoCR[i].base64, CERT_HEADER, CERT_TRAILER, - CRYPT_STRING_ANY, CRYPT_STRING_BASE64HEADER, testsNoCR[i].toEncode, - testsNoCR[i].toEncodeLen); - } -} - -START_TEST(base64) -{ - HMODULE lib = GetModuleHandleA("crypt32"); - - pCryptBinaryToStringA = (CryptBinaryToStringAFunc)GetProcAddress(lib, - "CryptBinaryToStringA"); - pCryptStringToBinaryA = (CryptStringToBinaryAFunc)GetProcAddress(lib, - "CryptStringToBinaryA"); - - if (pCryptBinaryToStringA) - testBinaryToStringA(); - else - win_skip("CryptBinaryToStringA is not available\n"); - - if (pCryptStringToBinaryA) - testStringToBinaryA(); - else - win_skip("CryptStringToBinaryA is not available\n"); -} diff --git a/rostests/winetests/crypt32/cert.c b/rostests/winetests/crypt32/cert.c deleted file mode 100644 index d3b362c8a34..00000000000 --- a/rostests/winetests/crypt32/cert.c +++ /dev/null @@ -1,3644 +0,0 @@ -/* - * crypt32 cert functions tests - * - * Copyright 2005-2006 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 - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "wine/test.h" - -static BOOL (WINAPI *pCertAddStoreToCollection)(HCERTSTORE,HCERTSTORE,DWORD,DWORD); -static PCCERT_CONTEXT (WINAPI *pCertCreateSelfSignCertificate)(HCRYPTPROV_OR_NCRYPT_KEY_HANDLE,PCERT_NAME_BLOB,DWORD,PCRYPT_KEY_PROV_INFO,PCRYPT_ALGORITHM_IDENTIFIER,PSYSTEMTIME,PSYSTEMTIME,PCERT_EXTENSIONS); -static BOOL (WINAPI *pCertGetValidUsages)(DWORD,PCCERT_CONTEXT*,int*,LPSTR*,DWORD*); -static BOOL (WINAPI *pCryptAcquireCertificatePrivateKey)(PCCERT_CONTEXT,DWORD,void*,HCRYPTPROV_OR_NCRYPT_KEY_HANDLE*,DWORD*,BOOL*); -static BOOL (WINAPI *pCryptEncodeObjectEx)(DWORD,LPCSTR,const void*,DWORD,PCRYPT_ENCODE_PARA,void*,DWORD*); -static BOOL (WINAPI * pCryptVerifyCertificateSignatureEx) - (HCRYPTPROV, DWORD, DWORD, void *, DWORD, void *, DWORD, void *); - -static BOOL (WINAPI * pCryptAcquireContextA) - (HCRYPTPROV *, LPCSTR, LPCSTR, DWORD, DWORD); - -static void init_function_pointers(void) -{ - HMODULE hCrypt32 = GetModuleHandleA("crypt32.dll"); - HMODULE hAdvapi32 = GetModuleHandleA("advapi32.dll"); - -#define GET_PROC(dll, func) \ - p ## func = (void *)GetProcAddress(dll, #func); \ - if(!p ## func) \ - trace("GetProcAddress(%s) failed\n", #func); - - GET_PROC(hCrypt32, CertAddStoreToCollection) - GET_PROC(hCrypt32, CertCreateSelfSignCertificate) - GET_PROC(hCrypt32, CertGetValidUsages) - GET_PROC(hCrypt32, CryptAcquireCertificatePrivateKey) - GET_PROC(hCrypt32, CryptEncodeObjectEx) - GET_PROC(hCrypt32, CryptVerifyCertificateSignatureEx) - - GET_PROC(hAdvapi32, CryptAcquireContextA) - -#undef GET_PROC -} - -static BYTE subjectName[] = { 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, - 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, - 0x6e, 0x67, 0x00 }; -static BYTE serialNum[] = { 1 }; -static const BYTE bigCert[] = { 0x30, 0x7a, 0x02, 0x01, 0x01, 0x30, 0x02, 0x06, - 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, - 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x22, - 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, - 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, - 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, - 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, 0x01, - 0x00, 0xa3, 0x16, 0x30, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, - 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x01 }; -static BYTE bigCertHash[] = { 0x6e, 0x30, 0x90, 0x71, 0x5f, 0xd9, 0x23, - 0x56, 0xeb, 0xae, 0x25, 0x40, 0xe6, 0x22, 0xda, 0x19, 0x26, 0x02, 0xa6, 0x08 }; - -static const BYTE bigCertWithDifferentSubject[] = { 0x30, 0x7a, 0x02, 0x01, 0x02, - 0x30, 0x02, 0x06, 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, - 0x04, 0x03, 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, - 0x00, 0x30, 0x22, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, - 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x15, - 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x41, 0x6c, - 0x65, 0x78, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, 0x06, - 0x00, 0x03, 0x01, 0x00, 0xa3, 0x16, 0x30, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, - 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, - 0x01, 0x01 }; -static const BYTE bigCertWithDifferentIssuer[] = { 0x30, 0x7a, 0x02, 0x01, - 0x01, 0x30, 0x02, 0x06, 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, - 0x55, 0x04, 0x03, 0x13, 0x0a, 0x41, 0x6c, 0x65, 0x78, 0x20, 0x4c, 0x61, 0x6e, - 0x67, 0x00, 0x30, 0x22, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, - 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, - 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, - 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, - 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, - 0x06, 0x00, 0x03, 0x01, 0x00, 0xa3, 0x16, 0x30, 0x14, 0x30, 0x12, 0x06, 0x03, - 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, - 0x02, 0x01, 0x01 }; - -static BYTE subjectName2[] = { 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, - 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x41, 0x6c, 0x65, 0x78, 0x20, 0x4c, 0x61, - 0x6e, 0x67, 0x00 }; -static const BYTE bigCert2[] = { 0x30, 0x7a, 0x02, 0x01, 0x01, 0x30, 0x02, 0x06, - 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, - 0x0a, 0x41, 0x6c, 0x65, 0x78, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x22, - 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, - 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, - 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x41, 0x6c, 0x65, 0x78, 0x20, - 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, 0x01, - 0x00, 0xa3, 0x16, 0x30, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, - 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x01 }; -static const BYTE bigCert2WithDifferentSerial[] = { 0x30, 0x7a, 0x02, 0x01, - 0x02, 0x30, 0x02, 0x06, 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, - 0x55, 0x04, 0x03, 0x13, 0x0a, 0x41, 0x6c, 0x65, 0x78, 0x20, 0x4c, 0x61, 0x6e, - 0x67, 0x00, 0x30, 0x22, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, - 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, - 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, - 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x41, - 0x6c, 0x65, 0x78, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, - 0x06, 0x00, 0x03, 0x01, 0x00, 0xa3, 0x16, 0x30, 0x14, 0x30, 0x12, 0x06, 0x03, - 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, - 0x02, 0x01, 0x01 }; -static BYTE bigCert2Hash[] = { 0x4a, 0x7f, 0x32, 0x1f, 0xcf, 0x3b, 0xc0, - 0x87, 0x48, 0x2b, 0xa1, 0x86, 0x54, 0x18, 0xe4, 0x3a, 0x0e, 0x53, 0x7e, 0x2b }; - -static const BYTE certWithUsage[] = { 0x30, 0x81, 0x93, 0x02, 0x01, 0x01, 0x30, - 0x02, 0x06, 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, - 0x03, 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, - 0x30, 0x22, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, - 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x15, 0x31, - 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, 0x75, 0x61, - 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, - 0x03, 0x01, 0x00, 0xa3, 0x2f, 0x30, 0x2d, 0x30, 0x2b, 0x06, 0x03, 0x55, 0x1d, - 0x25, 0x01, 0x01, 0xff, 0x04, 0x21, 0x30, 0x1f, 0x06, 0x08, 0x2b, 0x06, 0x01, - 0x05, 0x05, 0x07, 0x03, 0x03, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, - 0x03, 0x02, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01 }; - -static void testAddCert(void) -{ - HCERTSTORE store; - HCERTSTORE collection; - PCCERT_CONTEXT context; - PCCERT_CONTEXT copyContext; - BOOL ret; - - store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(store != NULL, "CertOpenStore failed: %d\n", GetLastError()); - if (!store) - return; - - /* Weird--bad add disposition leads to an access violation in Windows. - * Both tests crash on some win9x boxes. - */ - if (0) - { - ret = CertAddEncodedCertificateToStore(0, X509_ASN_ENCODING, bigCert, - sizeof(bigCert), 0, NULL); - ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || - GetLastError() == E_INVALIDARG), - "Expected STATUS_ACCESS_VIOLATION or E_INVALIDARG, got %08x\n", - GetLastError()); - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - bigCert, sizeof(bigCert), 0, NULL); - ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || - GetLastError() == E_INVALIDARG), - "Expected STATUS_ACCESS_VIOLATION or E_INVALIDARG, got %08x\n", - GetLastError()); - } - - /* Weird--can add a cert to the NULL store (does this have special - * meaning?) - */ - context = NULL; - ret = CertAddEncodedCertificateToStore(0, X509_ASN_ENCODING, bigCert, - sizeof(bigCert), CERT_STORE_ADD_ALWAYS, &context); - ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* win98 */), - "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); - if (context) - CertFreeCertificateContext(context); - if (!ret && GetLastError() == OSS_DATA_ERROR) - { - skip("bigCert can't be decoded, skipping tests\n"); - return; - } - - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", - GetLastError()); - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - bigCert2, sizeof(bigCert2), CERT_STORE_ADD_NEW, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", - GetLastError()); - /* This has the same name as bigCert, so finding isn't done by name */ - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - certWithUsage, sizeof(certWithUsage), CERT_STORE_ADD_NEW, &context); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", - GetLastError()); - ok(context != NULL, "Expected a context\n"); - if (context) - { - CRYPT_DATA_BLOB hash = { sizeof(bigCert2Hash), bigCert2Hash }; - - /* Duplicate (AddRef) the context so we can still use it after - * deleting it from the store. - */ - CertDuplicateCertificateContext(context); - CertDeleteCertificateFromStore(context); - /* Set the same hash as bigCert2, and try to readd it */ - ret = CertSetCertificateContextProperty(context, CERT_HASH_PROP_ID, - 0, &hash); - ok(ret, "CertSetCertificateContextProperty failed: %08x\n", - GetLastError()); - ret = CertAddCertificateContextToStore(store, context, - CERT_STORE_ADD_NEW, NULL); - /* The failure is a bit odd (CRYPT_E_ASN1_BADTAG), so just check - * that it fails. - */ - ok(!ret, "Expected failure\n"); - CertFreeCertificateContext(context); - } - context = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert2, - sizeof(bigCert2)); - ok(context != NULL, "Expected a context\n"); - if (context) - { - /* Try to readd bigCert2 to the store */ - ret = CertAddCertificateContextToStore(store, context, - CERT_STORE_ADD_NEW, NULL); - ok(!ret && GetLastError() == CRYPT_E_EXISTS, - "Expected CRYPT_E_EXISTS, got %08x\n", GetLastError()); - CertFreeCertificateContext(context); - } - - /* Adding a cert with the same issuer name and serial number (but - * different subject) as an existing cert succeeds. - */ - context = NULL; - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - bigCert2WithDifferentSerial, sizeof(bigCert2WithDifferentSerial), - CERT_STORE_ADD_NEW, &context); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", - GetLastError()); - if (context) - CertDeleteCertificateFromStore(context); - - /* Adding a cert with the same subject name and serial number (but - * different issuer) as an existing cert succeeds. - */ - context = NULL; - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - bigCertWithDifferentSubject, sizeof(bigCertWithDifferentSubject), - CERT_STORE_ADD_NEW, &context); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", - GetLastError()); - if (context) - CertDeleteCertificateFromStore(context); - - /* Adding a cert with the same issuer name and serial number (but - * different otherwise) as an existing cert succeeds. - */ - context = NULL; - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - bigCertWithDifferentIssuer, sizeof(bigCertWithDifferentIssuer), - CERT_STORE_ADD_NEW, &context); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", - GetLastError()); - if (context) - CertDeleteCertificateFromStore(context); - - collection = CertOpenStore(CERT_STORE_PROV_COLLECTION, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(collection != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - if (collection && pCertAddStoreToCollection) - { - /* Add store to the collection, but disable updates */ - pCertAddStoreToCollection(collection, store, 0, 0); - - context = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert2, - sizeof(bigCert2)); - ok(context != NULL, "Expected a context\n"); - if (context) - { - /* Try to readd bigCert2 to the collection */ - ret = CertAddCertificateContextToStore(collection, context, - CERT_STORE_ADD_NEW, NULL); - ok(!ret && GetLastError() == CRYPT_E_EXISTS, - "Expected CRYPT_E_EXISTS, got %08x\n", GetLastError()); - /* Replacing an existing certificate context is allowed, even - * though updates to the collection aren't.. - */ - ret = CertAddCertificateContextToStore(collection, context, - CERT_STORE_ADD_REPLACE_EXISTING, NULL); - ok(ret, "CertAddCertificateContextToStore failed: %08x\n", - GetLastError()); - /* use the existing certificate and ask for a copy of the context*/ - copyContext = NULL; - ret = CertAddCertificateContextToStore(collection, context, - CERT_STORE_ADD_USE_EXISTING, ©Context); - ok(ret, "CertAddCertificateContextToStore failed: %08x\n", - GetLastError()); - ok(copyContext != NULL, "Expected on output a non NULL copyContext\n"); - if (copyContext) - CertFreeCertificateContext(copyContext); - /* but adding a new certificate isn't allowed. */ - ret = CertAddCertificateContextToStore(collection, context, - CERT_STORE_ADD_ALWAYS, NULL); - ok(!ret && GetLastError() == E_ACCESSDENIED, - "Expected E_ACCESSDENIED, got %08x\n", GetLastError()); - CertFreeCertificateContext(context); - } - - CertCloseStore(collection, 0); - } - - CertCloseStore(store, 0); -} - -static void checkHash(const BYTE *data, DWORD dataLen, ALG_ID algID, - PCCERT_CONTEXT context, DWORD propID) -{ - BYTE hash[20] = { 0 }, hashProperty[20]; - BOOL ret; - DWORD size; - DWORD dwSizeWithNull; - - memset(hash, 0, sizeof(hash)); - memset(hashProperty, 0, sizeof(hashProperty)); - size = sizeof(hash); - ret = CryptHashCertificate(0, algID, 0, data, dataLen, hash, &size); - ok(ret, "CryptHashCertificate failed: %08x\n", GetLastError()); - ret = CertGetCertificateContextProperty(context, propID, NULL, - &dwSizeWithNull); - ok(ret, "algID %08x, propID %d: CertGetCertificateContextProperty failed: %08x\n", - algID, propID, GetLastError()); - ret = CertGetCertificateContextProperty(context, propID, hashProperty, - &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", - GetLastError()); - ok(!memcmp(hash, hashProperty, size), "Unexpected hash for property %d\n", - propID); - ok(size == dwSizeWithNull, "Unexpected length of hash for property: received %d instead of %d\n", - dwSizeWithNull,size); -} - -static CHAR cspNameA[] = "WineCryptTemp"; -static WCHAR cspNameW[] = { 'W','i','n','e','C','r','y','p','t','T','e','m','p',0 }; -static const BYTE v1CertWithPubKey[] = { -0x30,0x81,0x95,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30, -0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61, -0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31, -0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31, -0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11, -0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x00,0x30,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x01,0x01,0x05,0x00,0x03,0x11,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07, -0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0xa3,0x16,0x30,0x14,0x30,0x12,0x06, -0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02, -0x01,0x01 }; -static const BYTE v1CertWithSubjectKeyId[] = { -0x30,0x7b,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30,0x11, -0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30, -0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11,0x06, -0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67, -0x00,0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00,0xa3,0x17,0x30,0x15,0x30, -0x13,0x06,0x03,0x55,0x1d,0x0e,0x04,0x0c,0x04,0x0a,0x4a,0x75,0x61,0x6e,0x20, -0x4c,0x61,0x6e,0x67,0x00 }; -static const BYTE subjectKeyId[] = { -0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00 }; -static const BYTE selfSignedCert[] = { - 0x30, 0x82, 0x01, 0x1f, 0x30, 0x81, 0xce, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, - 0x10, 0xeb, 0x0d, 0x57, 0x2a, 0x9c, 0x09, 0xba, 0xa4, 0x4a, 0xb7, 0x25, 0x49, - 0xd9, 0x3e, 0xb5, 0x73, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02, 0x1d, - 0x05, 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, - 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, - 0x1e, 0x17, 0x0d, 0x30, 0x36, 0x30, 0x36, 0x32, 0x39, 0x30, 0x35, 0x30, 0x30, - 0x34, 0x36, 0x5a, 0x17, 0x0d, 0x30, 0x37, 0x30, 0x36, 0x32, 0x39, 0x31, 0x31, - 0x30, 0x30, 0x34, 0x36, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, - 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, - 0x67, 0x00, 0x30, 0x5c, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, - 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x4b, 0x00, 0x30, 0x48, 0x02, 0x41, - 0x00, 0xe2, 0x54, 0x3a, 0xa7, 0x83, 0xb1, 0x27, 0x14, 0x3e, 0x59, 0xbb, 0xb4, - 0x53, 0xe6, 0x1f, 0xe7, 0x5d, 0xf1, 0x21, 0x68, 0xad, 0x85, 0x53, 0xdb, 0x6b, - 0x1e, 0xeb, 0x65, 0x97, 0x03, 0x86, 0x60, 0xde, 0xf3, 0x6c, 0x38, 0x75, 0xe0, - 0x4c, 0x61, 0xbb, 0xbc, 0x62, 0x17, 0xa9, 0xcd, 0x79, 0x3f, 0x21, 0x4e, 0x96, - 0xcb, 0x0e, 0xdc, 0x61, 0x94, 0x30, 0x18, 0x10, 0x6b, 0xd0, 0x1c, 0x10, 0x79, - 0x02, 0x03, 0x01, 0x00, 0x01, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02, - 0x1d, 0x05, 0x00, 0x03, 0x41, 0x00, 0x25, 0x90, 0x53, 0x34, 0xd9, 0x56, 0x41, - 0x5e, 0xdb, 0x7e, 0x01, 0x36, 0xec, 0x27, 0x61, 0x5e, 0xb7, 0x4d, 0x90, 0x66, - 0xa2, 0xe1, 0x9d, 0x58, 0x76, 0xd4, 0x9c, 0xba, 0x2c, 0x84, 0xc6, 0x83, 0x7a, - 0x22, 0x0d, 0x03, 0x69, 0x32, 0x1a, 0x6d, 0xcb, 0x0c, 0x15, 0xb3, 0x6b, 0xc7, - 0x0a, 0x8c, 0xb4, 0x5c, 0x34, 0x78, 0xe0, 0x3c, 0x9c, 0xe9, 0xf3, 0x30, 0x9f, - 0xa8, 0x76, 0x57, 0x92, 0x36 }; -static const BYTE selfSignedSignatureHash[] = { 0x07,0x5a,0x3e,0xfd,0x0d,0xf6, - 0x88,0xeb,0x00,0x64,0xbd,0xc9,0xd6,0xea,0x0a,0x7c,0xcc,0x24,0xdb,0x5d }; - -static void testCertProperties(void) -{ - PCCERT_CONTEXT context = CertCreateCertificateContext(X509_ASN_ENCODING, - bigCert, sizeof(bigCert)); - DWORD propID, numProps, access, size; - BOOL ret; - BYTE hash[20] = { 0 }, hashProperty[20]; - CRYPT_DATA_BLOB blob; - CERT_KEY_CONTEXT keyContext; - - ok(context != NULL || broken(GetLastError() == OSS_DATA_ERROR /* win98 */), - "CertCreateCertificateContext failed: %08x\n", GetLastError()); - if (!context) - return; - - /* This crashes - propID = CertEnumCertificateContextProperties(NULL, 0); - */ - - propID = 0; - numProps = 0; - do { - propID = CertEnumCertificateContextProperties(context, propID); - if (propID) - numProps++; - } while (propID != 0); - ok(numProps == 0, "Expected 0 properties, got %d\n", numProps); - - /* Tests with a NULL cert context. Prop ID 0 fails.. */ - ret = CertSetCertificateContextProperty(NULL, 0, 0, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* while this just crashes. - ret = CertSetCertificateContextProperty(NULL, - CERT_KEY_PROV_HANDLE_PROP_ID, 0, NULL); - */ - - ret = CertSetCertificateContextProperty(context, 0, 0, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* Can't set the cert property directly, this crashes. - ret = CertSetCertificateContextProperty(context, - CERT_CERT_PROP_ID, 0, bigCert2); - */ - - /* These all crash. - ret = CertGetCertificateContextProperty(context, - CERT_ACCESS_STATE_PROP_ID, 0, NULL); - ret = CertGetCertificateContextProperty(context, CERT_HASH_PROP_ID, - NULL, NULL); - ret = CertGetCertificateContextProperty(context, CERT_HASH_PROP_ID, - hashProperty, NULL); - */ - /* A missing prop */ - size = 0; - ret = CertGetCertificateContextProperty(context, - CERT_KEY_PROV_INFO_PROP_ID, NULL, &size); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - /* And, an implicit property */ - size = sizeof(access); - ret = CertGetCertificateContextProperty(context, - CERT_ACCESS_STATE_PROP_ID, &access, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", - GetLastError()); - ok(!(access & CERT_ACCESS_STATE_WRITE_PERSIST_FLAG), - "Didn't expect a persisted cert\n"); - /* Trying to set this "read only" property crashes. - access |= CERT_ACCESS_STATE_WRITE_PERSIST_FLAG; - ret = CertSetCertificateContextProperty(context, - CERT_ACCESS_STATE_PROP_ID, 0, &access); - */ - - /* Can I set the hash to an invalid hash? */ - blob.pbData = hash; - blob.cbData = sizeof(hash); - ret = CertSetCertificateContextProperty(context, CERT_HASH_PROP_ID, 0, - &blob); - ok(ret, "CertSetCertificateContextProperty failed: %08x\n", - GetLastError()); - size = sizeof(hashProperty); - ret = CertGetCertificateContextProperty(context, CERT_HASH_PROP_ID, - hashProperty, &size); - ok(!memcmp(hashProperty, hash, sizeof(hash)), "Unexpected hash\n"); - /* Delete the (bogus) hash, and get the real one */ - ret = CertSetCertificateContextProperty(context, CERT_HASH_PROP_ID, 0, - NULL); - ok(ret, "CertSetCertificateContextProperty failed: %08x\n", - GetLastError()); - checkHash(bigCert, sizeof(bigCert), CALG_SHA1, context, - CERT_HASH_PROP_ID); - - /* Now that the hash property is set, we should get one property when - * enumerating. - */ - propID = 0; - numProps = 0; - do { - propID = CertEnumCertificateContextProperties(context, propID); - if (propID) - numProps++; - } while (propID != 0); - ok(numProps == 1, "Expected 1 properties, got %d\n", numProps); - - /* Check a few other implicit properties */ - checkHash(bigCert, sizeof(bigCert), CALG_MD5, context, - CERT_MD5_HASH_PROP_ID); - - /* Getting the signature hash fails with this bogus certificate */ - size = 0; - ret = CertGetCertificateContextProperty(context, - CERT_SIGNATURE_HASH_PROP_ID, NULL, &size); - ok(!ret && - (GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == CRYPT_E_NOT_FOUND || - GetLastError() == OSS_DATA_ERROR), /* win9x */ - "Expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError()); - - /* Test key contexts and handles and such */ - size = 0; - ret = CertGetCertificateContextProperty(context, CERT_KEY_CONTEXT_PROP_ID, - NULL, &size); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - size = sizeof(CERT_KEY_CONTEXT); - ret = CertGetCertificateContextProperty(context, CERT_KEY_CONTEXT_PROP_ID, - NULL, &size); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - ret = CertGetCertificateContextProperty(context, CERT_KEY_CONTEXT_PROP_ID, - &keyContext, &size); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - /* Key context with an invalid size */ - keyContext.cbSize = 0; - ret = CertSetCertificateContextProperty(context, CERT_KEY_CONTEXT_PROP_ID, - 0, &keyContext); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - size = sizeof(keyContext); - ret = CertGetCertificateContextProperty(context, CERT_KEY_CONTEXT_PROP_ID, - &keyContext, &size); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - keyContext.cbSize = sizeof(keyContext); - keyContext.hCryptProv = 0; - keyContext.dwKeySpec = AT_SIGNATURE; - ret = CertSetCertificateContextProperty(context, CERT_KEY_CONTEXT_PROP_ID, - 0, &keyContext); - ok(ret, "CertSetCertificateContextProperty failed: %08x\n", GetLastError()); - /* Now that that's set, the key prov handle property is also gettable. - */ - size = sizeof(keyContext.hCryptProv); - ret = CertGetCertificateContextProperty(context, - CERT_KEY_PROV_HANDLE_PROP_ID, &keyContext.hCryptProv, &size); - ok(ret, "Expected to get the CERT_KEY_PROV_HANDLE_PROP_ID, got %08x\n", - GetLastError()); - /* Remove the key prov handle property.. */ - ret = CertSetCertificateContextProperty(context, - CERT_KEY_PROV_HANDLE_PROP_ID, 0, NULL); - ok(ret, "CertSetCertificateContextProperty failed: %08x\n", - GetLastError()); - /* and the key context's CSP is set to NULL. */ - size = sizeof(keyContext); - ret = CertGetCertificateContextProperty(context, - CERT_KEY_CONTEXT_PROP_ID, &keyContext, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", - GetLastError()); - ok(keyContext.hCryptProv == 0, "Expected no hCryptProv\n"); - - /* According to MSDN the subject key id can be stored as a property, - * as a subject key extension, or as the SHA1 hash of the public key, - * but this cert has none of them: - */ - ret = CertGetCertificateContextProperty(context, - CERT_KEY_IDENTIFIER_PROP_ID, NULL, &size); - ok(!ret && GetLastError() == ERROR_INVALID_DATA, - "Expected ERROR_INVALID_DATA, got %08x\n", GetLastError()); - CertFreeCertificateContext(context); - /* This cert does have a public key, but its subject key identifier still - * isn't available: */ - context = CertCreateCertificateContext(X509_ASN_ENCODING, - v1CertWithPubKey, sizeof(v1CertWithPubKey)); - ret = CertGetCertificateContextProperty(context, - CERT_KEY_IDENTIFIER_PROP_ID, NULL, &size); - ok(!ret && GetLastError() == ERROR_INVALID_DATA, - "Expected ERROR_INVALID_DATA, got %08x\n", GetLastError()); - CertFreeCertificateContext(context); - /* This cert with a subject key extension can have its key identifier - * property retrieved: - */ - context = CertCreateCertificateContext(X509_ASN_ENCODING, - v1CertWithSubjectKeyId, sizeof(v1CertWithSubjectKeyId)); - ret = CertGetCertificateContextProperty(context, - CERT_KEY_IDENTIFIER_PROP_ID, NULL, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", GetLastError()); - if (ret) - { - LPBYTE buf = HeapAlloc(GetProcessHeap(), 0, size); - - if (buf) - { - ret = CertGetCertificateContextProperty(context, - CERT_KEY_IDENTIFIER_PROP_ID, buf, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", - GetLastError()); - ok(!memcmp(buf, subjectKeyId, size), "Unexpected subject key id\n"); - HeapFree(GetProcessHeap(), 0, buf); - } - } - CertFreeCertificateContext(context); - - context = CertCreateCertificateContext(X509_ASN_ENCODING, - selfSignedCert, sizeof(selfSignedCert)); - /* Getting the signature hash of a valid (self-signed) cert succeeds */ - size = 0; - ret = CertGetCertificateContextProperty(context, - CERT_SIGNATURE_HASH_PROP_ID, NULL, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", GetLastError()); - ok(size == sizeof(selfSignedSignatureHash), "unexpected size %d\n", size); - ret = CertGetCertificateContextProperty(context, - CERT_SIGNATURE_HASH_PROP_ID, hashProperty, &size); - if (ret) - ok(!memcmp(hashProperty, selfSignedSignatureHash, size), - "unexpected value\n"); - CertFreeCertificateContext(context); -} - -static void testDupCert(void) -{ - HCERTSTORE store; - PCCERT_CONTEXT context, dupContext; - BOOL ret; - - store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(store != NULL, "CertOpenStore failed: %d\n", GetLastError()); - if (!store) - return; - - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, &context); - ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* win98 */), - "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); - if (!ret && GetLastError() == OSS_DATA_ERROR) - { - skip("bigCert can't be decoded, skipping tests\n"); - return; - } - ok(context != NULL, "Expected a valid cert context\n"); - if (context) - { - ok(context->cbCertEncoded == sizeof(bigCert), - "Wrong cert size %d\n", context->cbCertEncoded); - ok(!memcmp(context->pbCertEncoded, bigCert, sizeof(bigCert)), - "Unexpected encoded cert in context\n"); - ok(context->hCertStore == store, "Unexpected store\n"); - - dupContext = CertDuplicateCertificateContext(context); - ok(dupContext != NULL, "Expected valid duplicate\n"); - /* Not only is it a duplicate, it's identical: the address is the - * same. - */ - ok(dupContext == context, "Expected identical context addresses\n"); - CertFreeCertificateContext(dupContext); - CertFreeCertificateContext(context); - } - CertCloseStore(store, 0); - - SetLastError(0xdeadbeef); - context = CertDuplicateCertificateContext(NULL); - ok(context == NULL, "Expected context to be NULL\n"); -} - -static BYTE subjectName3[] = { 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, - 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x52, 0x6f, 0x62, 0x20, 0x20, 0x4c, 0x61, - 0x6e, 0x67, 0x00 }; -static const BYTE iTunesCert0[] = { -0x30,0x82,0x03,0xc4,0x30,0x82,0x03,0x2d,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x47,0xbf,0x19,0x95,0xdf,0x8d,0x52,0x46,0x43,0xf7,0xdb,0x6d,0x48,0x0d,0x31, -0xa4,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x81,0x8b,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02, -0x5a,0x41,0x31,0x15,0x30,0x13,0x06,0x03,0x55,0x04,0x08,0x13,0x0c,0x57,0x65, -0x73,0x74,0x65,0x72,0x6e,0x20,0x43,0x61,0x70,0x65,0x31,0x14,0x30,0x12,0x06, -0x03,0x55,0x04,0x07,0x13,0x0b,0x44,0x75,0x72,0x62,0x61,0x6e,0x76,0x69,0x6c, -0x6c,0x65,0x31,0x0f,0x30,0x0d,0x06,0x03,0x55,0x04,0x0a,0x13,0x06,0x54,0x68, -0x61,0x77,0x74,0x65,0x31,0x1d,0x30,0x1b,0x06,0x03,0x55,0x04,0x0b,0x13,0x14, -0x54,0x68,0x61,0x77,0x74,0x65,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63, -0x61,0x74,0x69,0x6f,0x6e,0x31,0x1f,0x30,0x1d,0x06,0x03,0x55,0x04,0x03,0x13, -0x16,0x54,0x68,0x61,0x77,0x74,0x65,0x20,0x54,0x69,0x6d,0x65,0x73,0x74,0x61, -0x6d,0x70,0x69,0x6e,0x67,0x20,0x43,0x41,0x30,0x1e,0x17,0x0d,0x30,0x33,0x31, -0x32,0x30,0x34,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x31,0x33,0x31, -0x32,0x30,0x33,0x32,0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x53,0x31,0x0b,0x30, -0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x17,0x30,0x15,0x06, -0x03,0x55,0x04,0x0a,0x13,0x0e,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x2c, -0x20,0x49,0x6e,0x63,0x2e,0x31,0x2b,0x30,0x29,0x06,0x03,0x55,0x04,0x03,0x13, -0x22,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x20,0x54,0x69,0x6d,0x65,0x20, -0x53,0x74,0x61,0x6d,0x70,0x69,0x6e,0x67,0x20,0x53,0x65,0x72,0x76,0x69,0x63, -0x65,0x73,0x20,0x43,0x41,0x30,0x82,0x01,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0f,0x00,0x30, -0x82,0x01,0x0a,0x02,0x82,0x01,0x01,0x00,0xa9,0xca,0xb2,0xa4,0xcc,0xcd,0x20, -0xaf,0x0a,0x7d,0x89,0xac,0x87,0x75,0xf0,0xb4,0x4e,0xf1,0xdf,0xc1,0x0f,0xbf, -0x67,0x61,0xbd,0xa3,0x64,0x1c,0xda,0xbb,0xf9,0xca,0x33,0xab,0x84,0x30,0x89, -0x58,0x7e,0x8c,0xdb,0x6b,0xdd,0x36,0x9e,0x0f,0xbf,0xd1,0xec,0x78,0xf2,0x77, -0xa6,0x7e,0x6f,0x3c,0xbf,0x93,0xaf,0x0d,0xba,0x68,0xf4,0x6c,0x94,0xca,0xbd, -0x52,0x2d,0xab,0x48,0x3d,0xf5,0xb6,0xd5,0x5d,0x5f,0x1b,0x02,0x9f,0xfa,0x2f, -0x6b,0x1e,0xa4,0xf7,0xa3,0x9a,0xa6,0x1a,0xc8,0x02,0xe1,0x7f,0x4c,0x52,0xe3, -0x0e,0x60,0xec,0x40,0x1c,0x7e,0xb9,0x0d,0xde,0x3f,0xc7,0xb4,0xdf,0x87,0xbd, -0x5f,0x7a,0x6a,0x31,0x2e,0x03,0x99,0x81,0x13,0xa8,0x47,0x20,0xce,0x31,0x73, -0x0d,0x57,0x2d,0xcd,0x78,0x34,0x33,0x95,0x12,0x99,0x12,0xb9,0xde,0x68,0x2f, -0xaa,0xe6,0xe3,0xc2,0x8a,0x8c,0x2a,0xc3,0x8b,0x21,0x87,0x66,0xbd,0x83,0x58, -0x57,0x6f,0x75,0xbf,0x3c,0xaa,0x26,0x87,0x5d,0xca,0x10,0x15,0x3c,0x9f,0x84, -0xea,0x54,0xc1,0x0a,0x6e,0xc4,0xfe,0xc5,0x4a,0xdd,0xb9,0x07,0x11,0x97,0x22, -0x7c,0xdb,0x3e,0x27,0xd1,0x1e,0x78,0xec,0x9f,0x31,0xc9,0xf1,0xe6,0x22,0x19, -0xdb,0xc4,0xb3,0x47,0x43,0x9a,0x1a,0x5f,0xa0,0x1e,0x90,0xe4,0x5e,0xf5,0xee, -0x7c,0xf1,0x7d,0xab,0x62,0x01,0x8f,0xf5,0x4d,0x0b,0xde,0xd0,0x22,0x56,0xa8, -0x95,0xcd,0xae,0x88,0x76,0xae,0xee,0xba,0x0d,0xf3,0xe4,0x4d,0xd9,0xa0,0xfb, -0x68,0xa0,0xae,0x14,0x3b,0xb3,0x87,0xc1,0xbb,0x02,0x03,0x01,0x00,0x01,0xa3, -0x81,0xdb,0x30,0x81,0xd8,0x30,0x34,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07, -0x01,0x01,0x04,0x28,0x30,0x26,0x30,0x24,0x06,0x08,0x2b,0x06,0x01,0x05,0x05, -0x07,0x30,0x01,0x86,0x18,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6f,0x63,0x73, -0x70,0x2e,0x76,0x65,0x72,0x69,0x73,0x69,0x67,0x6e,0x2e,0x63,0x6f,0x6d,0x30, -0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01, -0xff,0x02,0x01,0x00,0x30,0x41,0x06,0x03,0x55,0x1d,0x1f,0x04,0x3a,0x30,0x38, -0x30,0x36,0xa0,0x34,0xa0,0x32,0x86,0x30,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f, -0x63,0x72,0x6c,0x2e,0x76,0x65,0x72,0x69,0x73,0x69,0x67,0x6e,0x2e,0x63,0x6f, -0x6d,0x2f,0x54,0x68,0x61,0x77,0x74,0x65,0x54,0x69,0x6d,0x65,0x73,0x74,0x61, -0x6d,0x70,0x69,0x6e,0x67,0x43,0x41,0x2e,0x63,0x72,0x6c,0x30,0x13,0x06,0x03, -0x55,0x1d,0x25,0x04,0x0c,0x30,0x0a,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07, -0x03,0x08,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,0xff,0x04,0x04,0x03, -0x02,0x01,0x06,0x30,0x24,0x06,0x03,0x55,0x1d,0x11,0x04,0x1d,0x30,0x1b,0xa4, -0x19,0x30,0x17,0x31,0x15,0x30,0x13,0x06,0x03,0x55,0x04,0x03,0x13,0x0c,0x54, -0x53,0x41,0x32,0x30,0x34,0x38,0x2d,0x31,0x2d,0x35,0x33,0x30,0x0d,0x06,0x09, -0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00, -0x4a,0x6b,0xf9,0xea,0x58,0xc2,0x44,0x1c,0x31,0x89,0x79,0x99,0x2b,0x96,0xbf, -0x82,0xac,0x01,0xd6,0x1c,0x4c,0xcd,0xb0,0x8a,0x58,0x6e,0xdf,0x08,0x29,0xa3, -0x5e,0xc8,0xca,0x93,0x13,0xe7,0x04,0x52,0x0d,0xef,0x47,0x27,0x2f,0x00,0x38, -0xb0,0xe4,0xc9,0x93,0x4e,0x9a,0xd4,0x22,0x62,0x15,0xf7,0x3f,0x37,0x21,0x4f, -0x70,0x31,0x80,0xf1,0x8b,0x38,0x87,0xb3,0xe8,0xe8,0x97,0x00,0xfe,0xcf,0x55, -0x96,0x4e,0x24,0xd2,0xa9,0x27,0x4e,0x7a,0xae,0xb7,0x61,0x41,0xf3,0x2a,0xce, -0xe7,0xc9,0xd9,0x5e,0xdd,0xbb,0x2b,0x85,0x3e,0xb5,0x9d,0xb5,0xd9,0xe1,0x57, -0xff,0xbe,0xb4,0xc5,0x7e,0xf5,0xcf,0x0c,0x9e,0xf0,0x97,0xfe,0x2b,0xd3,0x3b, -0x52,0x1b,0x1b,0x38,0x27,0xf7,0x3f,0x4a }; -static const BYTE iTunesCert1[] = { -0x30,0x82,0x03,0xff,0x30,0x82,0x02,0xe7,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x0d,0xe9,0x2b,0xf0,0xd4,0xd8,0x29,0x88,0x18,0x32,0x05,0x09,0x5e,0x9a,0x76, -0x88,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x53,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55, -0x53,0x31,0x17,0x30,0x15,0x06,0x03,0x55,0x04,0x0a,0x13,0x0e,0x56,0x65,0x72, -0x69,0x53,0x69,0x67,0x6e,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x2b,0x30,0x29, -0x06,0x03,0x55,0x04,0x03,0x13,0x22,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e, -0x20,0x54,0x69,0x6d,0x65,0x20,0x53,0x74,0x61,0x6d,0x70,0x69,0x6e,0x67,0x20, -0x53,0x65,0x72,0x76,0x69,0x63,0x65,0x73,0x20,0x43,0x41,0x30,0x1e,0x17,0x0d, -0x30,0x33,0x31,0x32,0x30,0x34,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d, -0x30,0x38,0x31,0x32,0x30,0x33,0x32,0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x57, -0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x17, -0x30,0x15,0x06,0x03,0x55,0x04,0x0a,0x13,0x0e,0x56,0x65,0x72,0x69,0x53,0x69, -0x67,0x6e,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x2f,0x30,0x2d,0x06,0x03,0x55, -0x04,0x03,0x13,0x26,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x20,0x54,0x69, -0x6d,0x65,0x20,0x53,0x74,0x61,0x6d,0x70,0x69,0x6e,0x67,0x20,0x53,0x65,0x72, -0x76,0x69,0x63,0x65,0x73,0x20,0x53,0x69,0x67,0x6e,0x65,0x72,0x30,0x82,0x01, -0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05, -0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01,0x0a,0x02,0x82,0x01,0x01,0x00, -0xb2,0x50,0x28,0x48,0xdd,0xd3,0x68,0x7a,0x84,0x18,0x44,0x66,0x75,0x5d,0x7e, -0xc4,0xb8,0x9f,0x63,0x26,0xff,0x3d,0x43,0x9c,0x7c,0x11,0x38,0x10,0x25,0x55, -0x73,0xd9,0x75,0x27,0x69,0xfd,0x4e,0xb9,0x20,0x5c,0xd3,0x0a,0xf9,0xa0,0x1b, -0x2a,0xed,0x55,0x56,0x21,0x61,0xd8,0x1e,0xdb,0xe4,0xbc,0x33,0x6b,0xc7,0xef, -0xdd,0xa3,0x37,0x65,0x8e,0x1b,0x93,0x0c,0xb6,0x53,0x1e,0x5c,0x7c,0x66,0x35, -0x5f,0x05,0x8a,0x45,0xfe,0x76,0x4e,0xdf,0x53,0x80,0xa2,0x81,0x20,0x9d,0xae, -0x88,0x5c,0xa2,0x08,0xf7,0xe5,0x30,0xf9,0xee,0x22,0x37,0x4c,0x42,0x0a,0xce, -0xdf,0xc6,0x1f,0xc4,0xd6,0x55,0xe9,0x81,0x3f,0xb5,0x52,0xa3,0x2c,0xaa,0x01, -0x7a,0xf2,0xa2,0xaa,0x8d,0x35,0xfe,0x9f,0xe6,0x5d,0x6a,0x05,0x9f,0x3d,0x6b, -0xe3,0xbf,0x96,0xc0,0xfe,0xcc,0x60,0xf9,0x40,0xe7,0x07,0xa0,0x44,0xeb,0x81, -0x51,0x6e,0xa5,0x2a,0xf2,0xb6,0x8a,0x10,0x28,0xed,0x8f,0xdc,0x06,0xa0,0x86, -0x50,0x9a,0x7b,0x4a,0x08,0x0d,0x30,0x1d,0xca,0x10,0x9e,0x6b,0xf7,0xe9,0x58, -0xae,0x04,0xa9,0x40,0x99,0xb2,0x28,0xe8,0x8f,0x16,0xac,0x3c,0xe3,0x53,0x6f, -0x4b,0xd3,0x35,0x9d,0xb5,0x6f,0x64,0x1d,0xb3,0x96,0x2c,0xbb,0x3d,0xe7,0x79, -0xeb,0x6d,0x7a,0xf9,0x16,0xe6,0x26,0xad,0xaf,0xef,0x99,0x53,0xb7,0x40,0x2c, -0x95,0xb8,0x79,0xaa,0xfe,0xd4,0x52,0xab,0x29,0x74,0x7e,0x42,0xec,0x39,0x1e, -0xa2,0x6a,0x16,0xe6,0x59,0xbb,0x24,0x68,0xd8,0x00,0x80,0x43,0x10,0x87,0x80, -0x6b,0x02,0x03,0x01,0x00,0x01,0xa3,0x81,0xca,0x30,0x81,0xc7,0x30,0x34,0x06, -0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x01,0x01,0x04,0x28,0x30,0x26,0x30,0x24, -0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x86,0x18,0x68,0x74,0x74, -0x70,0x3a,0x2f,0x2f,0x6f,0x63,0x73,0x70,0x2e,0x76,0x65,0x72,0x69,0x73,0x69, -0x67,0x6e,0x2e,0x63,0x6f,0x6d,0x30,0x0c,0x06,0x03,0x55,0x1d,0x13,0x01,0x01, -0xff,0x04,0x02,0x30,0x00,0x30,0x33,0x06,0x03,0x55,0x1d,0x1f,0x04,0x2c,0x30, -0x2a,0x30,0x28,0xa0,0x26,0xa0,0x24,0x86,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f, -0x2f,0x63,0x72,0x6c,0x2e,0x76,0x65,0x72,0x69,0x73,0x69,0x67,0x6e,0x2e,0x63, -0x6f,0x6d,0x2f,0x74,0x73,0x73,0x2d,0x63,0x61,0x2e,0x63,0x72,0x6c,0x30,0x16, -0x06,0x03,0x55,0x1d,0x25,0x01,0x01,0xff,0x04,0x0c,0x30,0x0a,0x06,0x08,0x2b, -0x06,0x01,0x05,0x05,0x07,0x03,0x08,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01, -0x01,0xff,0x04,0x04,0x03,0x02,0x06,0xc0,0x30,0x24,0x06,0x03,0x55,0x1d,0x11, -0x04,0x1d,0x30,0x1b,0xa4,0x19,0x30,0x17,0x31,0x15,0x30,0x13,0x06,0x03,0x55, -0x04,0x03,0x13,0x0c,0x54,0x53,0x41,0x32,0x30,0x34,0x38,0x2d,0x31,0x2d,0x35, -0x34,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x03,0x82,0x01,0x01,0x00,0x87,0x78,0x70,0xda,0x4e,0x52,0x01,0x20,0x5b, -0xe0,0x79,0xc9,0x82,0x30,0xc4,0xfd,0xb9,0x19,0x96,0xbd,0x91,0x00,0xc3,0xbd, -0xcd,0xcd,0xc6,0xf4,0x0e,0xd8,0xff,0xf9,0x4d,0xc0,0x33,0x62,0x30,0x11,0xc5, -0xf5,0x74,0x1b,0xd4,0x92,0xde,0x5f,0x9c,0x20,0x13,0xb1,0x7c,0x45,0xbe,0x50, -0xcd,0x83,0xe7,0x80,0x17,0x83,0xa7,0x27,0x93,0x67,0x13,0x46,0xfb,0xca,0xb8, -0x98,0x41,0x03,0xcc,0x9b,0x51,0x5b,0x05,0x8b,0x7f,0xa8,0x6f,0xf3,0x1b,0x50, -0x1b,0x24,0x2e,0xf2,0x69,0x8d,0x6c,0x22,0xf7,0xbb,0xca,0x16,0x95,0xed,0x0c, -0x74,0xc0,0x68,0x77,0xd9,0xeb,0x99,0x62,0x87,0xc1,0x73,0x90,0xf8,0x89,0x74, -0x7a,0x23,0xab,0xa3,0x98,0x7b,0x97,0xb1,0xf7,0x8f,0x29,0x71,0x4d,0x2e,0x75, -0x1b,0x48,0x41,0xda,0xf0,0xb5,0x0d,0x20,0x54,0xd6,0x77,0xa0,0x97,0x82,0x63, -0x69,0xfd,0x09,0xcf,0x8a,0xf0,0x75,0xbb,0x09,0x9b,0xd9,0xf9,0x11,0x55,0x26, -0x9a,0x61,0x32,0xbe,0x7a,0x02,0xb0,0x7b,0x86,0xbe,0xa2,0xc3,0x8b,0x22,0x2c, -0x78,0xd1,0x35,0x76,0xbc,0x92,0x73,0x5c,0xf9,0xb9,0xe6,0x4c,0x15,0x0a,0x23, -0xcc,0xe4,0xd2,0xd4,0x34,0x2e,0x49,0x40,0x15,0x3c,0x0f,0x60,0x7a,0x24,0xc6, -0xa5,0x66,0xef,0x96,0xcf,0x70,0xeb,0x3e,0xe7,0xf4,0x0d,0x7e,0xdc,0xd1,0x7c, -0xa3,0x76,0x71,0x69,0xc1,0x9c,0x4f,0x47,0x30,0x35,0x21,0xb1,0xa2,0xaf,0x1a, -0x62,0x3c,0x2b,0xd9,0x8e,0xaa,0x2a,0x07,0x7b,0xd8,0x18,0xb3,0x5c,0x7b,0xe2, -0x9d,0xa5,0x6f,0xfe,0x3c,0x89,0xad }; -static const BYTE iTunesCert2[] = { -0x30,0x82,0x04,0xbf,0x30,0x82,0x04,0x28,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x41,0x91,0xa1,0x5a,0x39,0x78,0xdf,0xcf,0x49,0x65,0x66,0x38,0x1d,0x4c,0x75, -0xc2,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x5f,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55, -0x53,0x31,0x17,0x30,0x15,0x06,0x03,0x55,0x04,0x0a,0x13,0x0e,0x56,0x65,0x72, -0x69,0x53,0x69,0x67,0x6e,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x37,0x30,0x35, -0x06,0x03,0x55,0x04,0x0b,0x13,0x2e,0x43,0x6c,0x61,0x73,0x73,0x20,0x33,0x20, -0x50,0x75,0x62,0x6c,0x69,0x63,0x20,0x50,0x72,0x69,0x6d,0x61,0x72,0x79,0x20, -0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x41, -0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x30,0x1e,0x17,0x0d,0x30,0x34,0x30, -0x37,0x31,0x36,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x31,0x34,0x30, -0x37,0x31,0x35,0x32,0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x81,0xb4,0x31,0x0b, -0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x17,0x30,0x15, -0x06,0x03,0x55,0x04,0x0a,0x13,0x0e,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e, -0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x1f,0x30,0x1d,0x06,0x03,0x55,0x04,0x0b, -0x13,0x16,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x20,0x54,0x72,0x75,0x73, -0x74,0x20,0x4e,0x65,0x74,0x77,0x6f,0x72,0x6b,0x31,0x3b,0x30,0x39,0x06,0x03, -0x55,0x04,0x0b,0x13,0x32,0x54,0x65,0x72,0x6d,0x73,0x20,0x6f,0x66,0x20,0x75, -0x73,0x65,0x20,0x61,0x74,0x20,0x68,0x74,0x74,0x70,0x73,0x3a,0x2f,0x2f,0x77, -0x77,0x77,0x2e,0x76,0x65,0x72,0x69,0x73,0x69,0x67,0x6e,0x2e,0x63,0x6f,0x6d, -0x2f,0x72,0x70,0x61,0x20,0x28,0x63,0x29,0x30,0x34,0x31,0x2e,0x30,0x2c,0x06, -0x03,0x55,0x04,0x03,0x13,0x25,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x20, -0x43,0x6c,0x61,0x73,0x73,0x20,0x33,0x20,0x43,0x6f,0x64,0x65,0x20,0x53,0x69, -0x67,0x6e,0x69,0x6e,0x67,0x20,0x32,0x30,0x30,0x34,0x20,0x43,0x41,0x30,0x82, -0x01,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01, -0x05,0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01,0x0a,0x02,0x82,0x01,0x01, -0x00,0xbe,0xbc,0xee,0xbc,0x7e,0xef,0x83,0xeb,0xe0,0x37,0x4f,0xfb,0x03,0x10, -0x38,0xbe,0x08,0xd2,0x8c,0x7d,0x9d,0xfa,0x92,0x7f,0x19,0x0c,0xc2,0x6b,0xee, -0x42,0x52,0x8c,0xde,0xd3,0x1c,0x48,0x13,0x25,0xea,0xc1,0x63,0x7a,0xf9,0x51, -0x65,0xee,0xd3,0xaa,0x3b,0xf5,0xf0,0x94,0x9c,0x2b,0xfb,0xf2,0x66,0xd4,0x24, -0xda,0xf7,0xf5,0x9f,0x6e,0x19,0x39,0x36,0xbc,0xd0,0xa3,0x76,0x08,0x1e,0x22, -0x27,0x24,0x6c,0x38,0x91,0x27,0xe2,0x84,0x49,0xae,0x1b,0x8a,0xa1,0xfd,0x25, -0x82,0x2c,0x10,0x30,0xe8,0x71,0xab,0x28,0xe8,0x77,0x4a,0x51,0xf1,0xec,0xcd, -0xf8,0xf0,0x54,0xd4,0x6f,0xc0,0xe3,0x6d,0x0a,0x8f,0xd9,0xd8,0x64,0x8d,0x63, -0xb2,0x2d,0x4e,0x27,0xf6,0x85,0x0e,0xfe,0x6d,0xe3,0x29,0x99,0xe2,0x85,0x47, -0x7c,0x2d,0x86,0x7f,0xe8,0x57,0x8f,0xad,0x67,0xc2,0x33,0x32,0x91,0x13,0x20, -0xfc,0xa9,0x23,0x14,0x9a,0x6d,0xc2,0x84,0x4b,0x76,0x68,0x04,0xd5,0x71,0x2c, -0x5d,0x21,0xfa,0x88,0x0d,0x26,0xfd,0x1f,0x2d,0x91,0x2b,0xe7,0x01,0x55,0x4d, -0xf2,0x6d,0x35,0x28,0x82,0xdf,0xd9,0x6b,0x5c,0xb6,0xd6,0xd9,0xaa,0x81,0xfd, -0x5f,0xcd,0x83,0xba,0x63,0x9d,0xd0,0x22,0xfc,0xa9,0x3b,0x42,0x69,0xb2,0x8e, -0x3a,0xb5,0xbc,0xb4,0x9e,0x0f,0x5e,0xc4,0xea,0x2c,0x82,0x8b,0x28,0xfd,0x53, -0x08,0x96,0xdd,0xb5,0x01,0x20,0xd1,0xf9,0xa5,0x18,0xe7,0xc0,0xee,0x51,0x70, -0x37,0xe1,0xb6,0x05,0x48,0x52,0x48,0x6f,0x38,0xea,0xc3,0xe8,0x6c,0x7b,0x44, -0x84,0xbb,0x02,0x03,0x01,0x00,0x01,0xa3,0x82,0x01,0xa0,0x30,0x82,0x01,0x9c, -0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01, -0x01,0xff,0x02,0x01,0x00,0x30,0x44,0x06,0x03,0x55,0x1d,0x20,0x04,0x3d,0x30, -0x3b,0x30,0x39,0x06,0x0b,0x60,0x86,0x48,0x01,0x86,0xf8,0x45,0x01,0x07,0x17, -0x03,0x30,0x2a,0x30,0x28,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x02,0x01, -0x16,0x1c,0x68,0x74,0x74,0x70,0x73,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x76, -0x65,0x72,0x69,0x73,0x69,0x67,0x6e,0x2e,0x63,0x6f,0x6d,0x2f,0x72,0x70,0x61, -0x30,0x31,0x06,0x03,0x55,0x1d,0x1f,0x04,0x2a,0x30,0x28,0x30,0x26,0xa0,0x24, -0xa0,0x22,0x86,0x20,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x63,0x72,0x6c,0x2e, -0x76,0x65,0x72,0x69,0x73,0x69,0x67,0x6e,0x2e,0x63,0x6f,0x6d,0x2f,0x70,0x63, -0x61,0x33,0x2e,0x63,0x72,0x6c,0x30,0x1d,0x06,0x03,0x55,0x1d,0x25,0x04,0x16, -0x30,0x14,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x03,0x02,0x06,0x08,0x2b, -0x06,0x01,0x05,0x05,0x07,0x03,0x03,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01, -0x01,0xff,0x04,0x04,0x03,0x02,0x01,0x06,0x30,0x11,0x06,0x09,0x60,0x86,0x48, -0x01,0x86,0xf8,0x42,0x01,0x01,0x04,0x04,0x03,0x02,0x00,0x01,0x30,0x29,0x06, -0x03,0x55,0x1d,0x11,0x04,0x22,0x30,0x20,0xa4,0x1e,0x30,0x1c,0x31,0x1a,0x30, -0x18,0x06,0x03,0x55,0x04,0x03,0x13,0x11,0x43,0x6c,0x61,0x73,0x73,0x33,0x43, -0x41,0x32,0x30,0x34,0x38,0x2d,0x31,0x2d,0x34,0x33,0x30,0x1d,0x06,0x03,0x55, -0x1d,0x0e,0x04,0x16,0x04,0x14,0x08,0xf5,0x51,0xe8,0xfb,0xfe,0x3d,0x3d,0x64, -0x36,0x7c,0x68,0xcf,0x5b,0x78,0xa8,0xdf,0xb9,0xc5,0x37,0x30,0x81,0x80,0x06, -0x03,0x55,0x1d,0x23,0x04,0x79,0x30,0x77,0xa1,0x63,0xa4,0x61,0x30,0x5f,0x31, -0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x17,0x30, -0x15,0x06,0x03,0x55,0x04,0x0a,0x13,0x0e,0x56,0x65,0x72,0x69,0x53,0x69,0x67, -0x6e,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x37,0x30,0x35,0x06,0x03,0x55,0x04, -0x0b,0x13,0x2e,0x43,0x6c,0x61,0x73,0x73,0x20,0x33,0x20,0x50,0x75,0x62,0x6c, -0x69,0x63,0x20,0x50,0x72,0x69,0x6d,0x61,0x72,0x79,0x20,0x43,0x65,0x72,0x74, -0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x41,0x75,0x74,0x68,0x6f, -0x72,0x69,0x74,0x79,0x82,0x10,0x70,0xba,0xe4,0x1d,0x10,0xd9,0x29,0x34,0xb6, -0x38,0xca,0x7b,0x03,0xcc,0xba,0xbf,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86, -0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0xae,0x3a,0x17,0xb8, -0x4a,0x7b,0x55,0xfa,0x64,0x55,0xec,0x40,0xa4,0xed,0x49,0x41,0x90,0x99,0x9c, -0x89,0xbc,0xaf,0x2e,0x1d,0xca,0x78,0x23,0xf9,0x1c,0x19,0x0f,0x7f,0xeb,0x68, -0xbc,0x32,0xd9,0x88,0x38,0xde,0xdc,0x3f,0xd3,0x89,0xb4,0x3f,0xb1,0x82,0x96, -0xf1,0xa4,0x5a,0xba,0xed,0x2e,0x26,0xd3,0xde,0x7c,0x01,0x6e,0x00,0x0a,0x00, -0xa4,0x06,0x92,0x11,0x48,0x09,0x40,0xf9,0x1c,0x18,0x79,0x67,0x23,0x24,0xe0, -0xbb,0xd5,0xe1,0x50,0xae,0x1b,0xf5,0x0e,0xdd,0xe0,0x2e,0x81,0xcd,0x80,0xa3, -0x6c,0x52,0x4f,0x91,0x75,0x55,0x8a,0xba,0x22,0xf2,0xd2,0xea,0x41,0x75,0x88, -0x2f,0x63,0x55,0x7d,0x1e,0x54,0x5a,0x95,0x59,0xca,0xd9,0x34,0x81,0xc0,0x5f, -0x5e,0xf6,0x7a,0xb5 }; -static const BYTE iTunesCert3[] = { -0x30,0x82,0x04,0xf1,0x30,0x82,0x03,0xd9,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x0f,0x1a,0xa0,0xe0,0x9b,0x9b,0x61,0xa6,0xb6,0xfe,0x40,0xd2,0xdf,0x6a,0xf6, -0x8d,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x81,0xb4,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02, -0x55,0x53,0x31,0x17,0x30,0x15,0x06,0x03,0x55,0x04,0x0a,0x13,0x0e,0x56,0x65, -0x72,0x69,0x53,0x69,0x67,0x6e,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x1f,0x30, -0x1d,0x06,0x03,0x55,0x04,0x0b,0x13,0x16,0x56,0x65,0x72,0x69,0x53,0x69,0x67, -0x6e,0x20,0x54,0x72,0x75,0x73,0x74,0x20,0x4e,0x65,0x74,0x77,0x6f,0x72,0x6b, -0x31,0x3b,0x30,0x39,0x06,0x03,0x55,0x04,0x0b,0x13,0x32,0x54,0x65,0x72,0x6d, -0x73,0x20,0x6f,0x66,0x20,0x75,0x73,0x65,0x20,0x61,0x74,0x20,0x68,0x74,0x74, -0x70,0x73,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x76,0x65,0x72,0x69,0x73,0x69, -0x67,0x6e,0x2e,0x63,0x6f,0x6d,0x2f,0x72,0x70,0x61,0x20,0x28,0x63,0x29,0x30, -0x34,0x31,0x2e,0x30,0x2c,0x06,0x03,0x55,0x04,0x03,0x13,0x25,0x56,0x65,0x72, -0x69,0x53,0x69,0x67,0x6e,0x20,0x43,0x6c,0x61,0x73,0x73,0x20,0x33,0x20,0x43, -0x6f,0x64,0x65,0x20,0x53,0x69,0x67,0x6e,0x69,0x6e,0x67,0x20,0x32,0x30,0x30, -0x34,0x20,0x43,0x41,0x30,0x1e,0x17,0x0d,0x30,0x36,0x30,0x31,0x31,0x37,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x38,0x30,0x31,0x32,0x32,0x32, -0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x81,0xb4,0x31,0x0b,0x30,0x09,0x06,0x03, -0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04, -0x08,0x13,0x0a,0x43,0x61,0x6c,0x69,0x66,0x6f,0x72,0x6e,0x69,0x61,0x31,0x12, -0x30,0x10,0x06,0x03,0x55,0x04,0x07,0x13,0x09,0x43,0x75,0x70,0x65,0x72,0x74, -0x69,0x6e,0x6f,0x31,0x1d,0x30,0x1b,0x06,0x03,0x55,0x04,0x0a,0x14,0x14,0x41, -0x70,0x70,0x6c,0x65,0x20,0x43,0x6f,0x6d,0x70,0x75,0x74,0x65,0x72,0x2c,0x20, -0x49,0x6e,0x63,0x2e,0x31,0x3e,0x30,0x3c,0x06,0x03,0x55,0x04,0x0b,0x13,0x35, -0x44,0x69,0x67,0x69,0x74,0x61,0x6c,0x20,0x49,0x44,0x20,0x43,0x6c,0x61,0x73, -0x73,0x20,0x33,0x20,0x2d,0x20,0x4d,0x69,0x63,0x72,0x6f,0x73,0x6f,0x66,0x74, -0x20,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x20,0x56,0x61,0x6c,0x69,0x64, -0x61,0x74,0x69,0x6f,0x6e,0x20,0x76,0x32,0x31,0x1d,0x30,0x1b,0x06,0x03,0x55, -0x04,0x03,0x14,0x14,0x41,0x70,0x70,0x6c,0x65,0x20,0x43,0x6f,0x6d,0x70,0x75, -0x74,0x65,0x72,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x30,0x81,0x9f,0x30,0x0d,0x06, -0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d, -0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xd3,0xab,0x3b,0x7f,0xec,0x48,0x84, -0xce,0xa8,0x1a,0x12,0xf3,0x3c,0x87,0xcb,0x24,0x58,0x96,0x02,0x87,0x66,0x49, -0xeb,0x89,0xee,0x79,0x44,0x70,0x8d,0xe7,0xd4,0x1f,0x30,0x92,0xc0,0x9c,0x35, -0x78,0xc0,0xaf,0x1c,0xb6,0x28,0xd3,0xe0,0xe0,0x9d,0xd3,0x49,0x76,0x73,0x57, -0x19,0x4d,0x8d,0x70,0x85,0x64,0x4d,0x1d,0xc6,0x02,0x3e,0xe5,0x2c,0x66,0x07, -0xd2,0x27,0x4b,0xd6,0xc8,0x3c,0x93,0xb6,0x15,0x0c,0xde,0x5b,0xd7,0x93,0xdd, -0xbe,0x85,0x62,0x34,0x17,0x8a,0x05,0x60,0xf0,0x8a,0x1c,0x5a,0x40,0x21,0x8d, -0x51,0x6c,0xb0,0x62,0xd8,0xb5,0xd4,0xf9,0xb1,0xd0,0x58,0x7a,0x7a,0x82,0x55, -0xb3,0xf9,0x53,0x71,0xde,0xd2,0xc9,0x37,0x8c,0xf6,0x5a,0x1f,0x2d,0xcd,0x7c, -0x67,0x02,0x03,0x01,0x00,0x01,0xa3,0x82,0x01,0x7f,0x30,0x82,0x01,0x7b,0x30, -0x09,0x06,0x03,0x55,0x1d,0x13,0x04,0x02,0x30,0x00,0x30,0x0e,0x06,0x03,0x55, -0x1d,0x0f,0x01,0x01,0xff,0x04,0x04,0x03,0x02,0x07,0x80,0x30,0x40,0x06,0x03, -0x55,0x1d,0x1f,0x04,0x39,0x30,0x37,0x30,0x35,0xa0,0x33,0xa0,0x31,0x86,0x2f, -0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x43,0x53,0x43,0x33,0x2d,0x32,0x30,0x30, -0x34,0x2d,0x63,0x72,0x6c,0x2e,0x76,0x65,0x72,0x69,0x73,0x69,0x67,0x6e,0x2e, -0x63,0x6f,0x6d,0x2f,0x43,0x53,0x43,0x33,0x2d,0x32,0x30,0x30,0x34,0x2e,0x63, -0x72,0x6c,0x30,0x44,0x06,0x03,0x55,0x1d,0x20,0x04,0x3d,0x30,0x3b,0x30,0x39, -0x06,0x0b,0x60,0x86,0x48,0x01,0x86,0xf8,0x45,0x01,0x07,0x17,0x03,0x30,0x2a, -0x30,0x28,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x02,0x01,0x16,0x1c,0x68, -0x74,0x74,0x70,0x73,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x76,0x65,0x72,0x69, -0x73,0x69,0x67,0x6e,0x2e,0x63,0x6f,0x6d,0x2f,0x72,0x70,0x61,0x30,0x13,0x06, -0x03,0x55,0x1d,0x25,0x04,0x0c,0x30,0x0a,0x06,0x08,0x2b,0x06,0x01,0x05,0x05, -0x07,0x03,0x03,0x30,0x75,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x01,0x01, -0x04,0x69,0x30,0x67,0x30,0x24,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x30, -0x01,0x86,0x18,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6f,0x63,0x73,0x70,0x2e, -0x76,0x65,0x72,0x69,0x73,0x69,0x67,0x6e,0x2e,0x63,0x6f,0x6d,0x30,0x3f,0x06, -0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x30,0x02,0x86,0x33,0x68,0x74,0x74,0x70, -0x3a,0x2f,0x2f,0x43,0x53,0x43,0x33,0x2d,0x32,0x30,0x30,0x34,0x2d,0x61,0x69, -0x61,0x2e,0x76,0x65,0x72,0x69,0x73,0x69,0x67,0x6e,0x2e,0x63,0x6f,0x6d,0x2f, -0x43,0x53,0x43,0x33,0x2d,0x32,0x30,0x30,0x34,0x2d,0x61,0x69,0x61,0x2e,0x63, -0x65,0x72,0x30,0x1f,0x06,0x03,0x55,0x1d,0x23,0x04,0x18,0x30,0x16,0x80,0x14, -0x08,0xf5,0x51,0xe8,0xfb,0xfe,0x3d,0x3d,0x64,0x36,0x7c,0x68,0xcf,0x5b,0x78, -0xa8,0xdf,0xb9,0xc5,0x37,0x30,0x11,0x06,0x09,0x60,0x86,0x48,0x01,0x86,0xf8, -0x42,0x01,0x01,0x04,0x04,0x03,0x02,0x04,0x10,0x30,0x16,0x06,0x0a,0x2b,0x06, -0x01,0x04,0x01,0x82,0x37,0x02,0x01,0x1b,0x04,0x08,0x30,0x06,0x01,0x01,0x00, -0x01,0x01,0xff,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01, -0x05,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x6a,0xa6,0x06,0xd0,0x33,0x18,0x64, -0xe2,0x69,0x82,0xee,0x6e,0x36,0x9e,0x9d,0x9a,0x0e,0x18,0xa8,0xac,0x9d,0x10, -0xed,0x01,0x3c,0xb9,0x61,0x04,0x62,0xf3,0x85,0x8f,0xcc,0x4f,0x2c,0x66,0x35, -0x54,0x25,0x45,0x8d,0x95,0x1c,0xd2,0x33,0xbe,0x2e,0xdd,0x7f,0x74,0xaf,0x03, -0x7b,0x86,0x63,0xb0,0xc9,0xe6,0xbd,0xc7,0x8e,0xde,0x03,0x18,0x98,0x82,0xc3, -0xbb,0xf8,0x15,0x99,0x1a,0xa9,0xdd,0xb9,0x5d,0xb9,0xbd,0x53,0x95,0x25,0x76, -0xfb,0x5c,0x53,0x90,0xea,0x01,0x0a,0xa0,0xb1,0xbf,0x09,0x1b,0x97,0x8f,0x40, -0xfa,0x85,0x12,0x74,0x01,0xdb,0xf6,0xdb,0x09,0xd6,0x5f,0x4f,0xd7,0x17,0xb4, -0xbf,0x9e,0x2f,0x86,0x52,0x5d,0x70,0x24,0x52,0x32,0x1e,0xa5,0x1d,0x39,0x8b, -0x66,0xf6,0xba,0x9b,0x69,0x8e,0x12,0x60,0xdb,0xb6,0xcf,0xe6,0x0d,0xd6,0x1c, -0x8f,0xd4,0x5b,0x4b,0x00,0xde,0x21,0x93,0xfb,0x6e,0xc7,0x3d,0xb4,0x66,0x0d, -0x29,0x0c,0x4e,0xe9,0x3f,0x94,0xd6,0xd6,0xdc,0xec,0xf8,0x53,0x3b,0x62,0xd5, -0x97,0x50,0x53,0x84,0x17,0xfe,0xe2,0xed,0x4c,0x23,0x0a,0x49,0xce,0x5b,0xe9, -0x70,0x31,0xc1,0x04,0x02,0x02,0x6c,0xb8,0x52,0xcd,0xc7,0x4e,0x70,0xb4,0x13, -0xd7,0xe0,0x92,0xba,0x44,0x1a,0x10,0x4c,0x6e,0x45,0xc6,0x86,0x04,0xc6,0x64, -0xd3,0x9c,0x6e,0xc1,0x9c,0xac,0x74,0x3d,0x77,0x06,0x5e,0x28,0x28,0x5c,0xf5, -0xe0,0x9c,0x19,0xd8,0xba,0x74,0x81,0x2d,0x67,0x77,0x93,0x8d,0xbf,0xd2,0x52, -0x00,0xe6,0xa5,0x38,0x4e,0x2e,0x73,0x66,0x7a }; -static BYTE iTunesIssuer[] = { -0x30,0x81,0xb4,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06, -0x13,0x02,0x55,0x53,0x31,0x17,0x30,0x15,0x06,0x03,0x55,0x04, -0x0a,0x13,0x0e,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x2c, -0x20,0x49,0x6e,0x63,0x2e,0x31,0x1f,0x30,0x1d,0x06,0x03,0x55, -0x04,0x0b,0x13,0x16,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e, -0x20,0x54,0x72,0x75,0x73,0x74,0x20,0x4e,0x65,0x74,0x77,0x6f, -0x72,0x6b,0x31,0x3b,0x30,0x39,0x06,0x03,0x55,0x04,0x0b,0x13, -0x32,0x54,0x65,0x72,0x6d,0x73,0x20,0x6f,0x66,0x20,0x75,0x73, -0x65,0x20,0x61,0x74,0x20,0x68,0x74,0x74,0x70,0x73,0x3a,0x2f, -0x2f,0x77,0x77,0x77,0x2e,0x76,0x65,0x72,0x69,0x73,0x69,0x67, -0x6e,0x2e,0x63,0x6f,0x6d,0x2f,0x72,0x70,0x61,0x20,0x28,0x63, -0x29,0x30,0x34,0x31,0x2e,0x30,0x2c,0x06,0x03,0x55,0x04,0x03, -0x13,0x25,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x20,0x43, -0x6c,0x61,0x73,0x73,0x20,0x33,0x20,0x43,0x6f,0x64,0x65,0x20, -0x53,0x69,0x67,0x6e,0x69,0x6e,0x67,0x20,0x32,0x30,0x30,0x34, -0x20,0x43,0x41 }; -static BYTE iTunesSerialNum[] = { -0x8d,0xf6,0x6a,0xdf,0xd2,0x40,0xfe,0xb6,0xa6,0x61,0x9b,0x9b, -0xe0,0xa0,0x1a,0x0f }; - -static void testFindCert(void) -{ - HCERTSTORE store; - PCCERT_CONTEXT context = NULL, subject; - BOOL ret; - CERT_INFO certInfo = { 0 }; - CRYPT_HASH_BLOB blob; - BYTE otherSerialNumber[] = { 2 }; - DWORD count; - static const WCHAR juan[] = { 'j','u','a','n',0 }; - static const WCHAR lang[] = { 'L','A','N','G',0 }; - static const WCHAR malcolm[] = { 'm','a','l','c','o','l','m',0 }; - - store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(store != NULL, "CertOpenStore failed: %d\n", GetLastError()); - if (!store) - return; - - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - bigCert, sizeof(bigCert), CERT_STORE_ADD_NEW, NULL); - ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* win98 */), - "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); - if (!ret && GetLastError() == OSS_DATA_ERROR) - { - skip("bigCert can't be decoded, skipping tests\n"); - return; - } - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - bigCert2, sizeof(bigCert2), CERT_STORE_ADD_NEW, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", - GetLastError()); - /* This has the same name as bigCert */ - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - certWithUsage, sizeof(certWithUsage), CERT_STORE_ADD_NEW, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", - GetLastError()); - - /* Crashes - context = CertFindCertificateInStore(NULL, 0, 0, 0, NULL, NULL); - */ - - /* Check first cert's there, by issuer */ - certInfo.Subject.pbData = subjectName; - certInfo.Subject.cbData = sizeof(subjectName); - certInfo.SerialNumber.pbData = serialNum; - certInfo.SerialNumber.cbData = sizeof(serialNum); - context = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, - CERT_FIND_ISSUER_NAME, &certInfo.Subject, NULL); - ok(context != NULL, "CertFindCertificateInStore failed: %08x\n", - GetLastError()); - if (context) - { - context = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, - CERT_FIND_ISSUER_NAME, &certInfo.Subject, context); - ok(context != NULL, "Expected more than one cert\n"); - if (context) - { - context = CertFindCertificateInStore(store, X509_ASN_ENCODING, - 0, CERT_FIND_ISSUER_NAME, &certInfo.Subject, context); - ok(context == NULL, "Expected precisely two certs\n"); - } - } - - /* Check second cert's there as well, by subject name */ - certInfo.Subject.pbData = subjectName2; - certInfo.Subject.cbData = sizeof(subjectName2); - context = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, - CERT_FIND_SUBJECT_NAME, &certInfo.Subject, NULL); - ok(context != NULL, "CertFindCertificateInStore failed: %08x\n", - GetLastError()); - if (context) - { - context = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, - CERT_FIND_SUBJECT_NAME, &certInfo.Subject, context); - ok(context == NULL, "Expected one cert only\n"); - } - - /* Strange but true: searching for the subject cert requires you to set - * the issuer, not the subject - */ - context = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, - CERT_FIND_SUBJECT_CERT, &certInfo, NULL); - ok(context == NULL, "Expected no certificate\n"); - certInfo.Subject.pbData = NULL; - certInfo.Subject.cbData = 0; - certInfo.Issuer.pbData = subjectName2; - certInfo.Issuer.cbData = sizeof(subjectName2); - context = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, - CERT_FIND_SUBJECT_CERT, &certInfo, NULL); - ok(context != NULL, "CertFindCertificateInStore failed: %08x\n", - GetLastError()); - if (context) - { - context = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, - CERT_FIND_SUBJECT_CERT, &certInfo, context); - ok(context == NULL, "Expected one cert only\n"); - } - /* A non-matching serial number will not match. */ - certInfo.SerialNumber.pbData = otherSerialNumber; - certInfo.SerialNumber.cbData = sizeof(otherSerialNumber); - context = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, - CERT_FIND_SUBJECT_CERT, &certInfo, NULL); - ok(context == NULL, "Expected no match\n"); - /* No serial number will not match */ - certInfo.SerialNumber.cbData = 0; - context = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, - CERT_FIND_SUBJECT_CERT, &certInfo, NULL); - ok(context == NULL, "Expected no match\n"); - /* A serial number still won't match if the name doesn't */ - certInfo.SerialNumber.pbData = serialNum; - certInfo.SerialNumber.cbData = sizeof(serialNum); - certInfo.Issuer.pbData = subjectName3; - certInfo.Issuer.cbData = sizeof(subjectName3); - context = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, - CERT_FIND_SUBJECT_CERT, &certInfo, NULL); - ok(context == NULL, "Expected no match\n"); - - /* The nice thing about hashes, they're unique */ - blob.pbData = bigCertHash; - blob.cbData = sizeof(bigCertHash); - context = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, - CERT_FIND_SHA1_HASH, &blob, NULL); - ok(context != NULL, "CertFindCertificateInStore failed: %08x\n", - GetLastError()); - if (context) - { - context = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, - CERT_FIND_SHA1_HASH, &certInfo.Subject, context); - ok(context == NULL, "Expected one cert only\n"); - } - - /* Searching for NULL string matches any context. */ - count = 0; - context = NULL; - do { - context = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, - CERT_FIND_ISSUER_STR, NULL, context); - if (context) - count++; - } while (context); - ok(count == 3, "expected 3 contexts\n"); - count = 0; - context = NULL; - do { - context = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, - CERT_FIND_ISSUER_STR, juan, context); - if (context) - count++; - } while (context); - ok(count == 2, "expected 2 contexts\n"); - count = 0; - context = NULL; - do { - context = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, - CERT_FIND_ISSUER_STR, lang, context); - if (context) - count++; - } while (context); - ok(count == 3, "expected 3 contexts\n"); - SetLastError(0xdeadbeef); - context = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, - CERT_FIND_ISSUER_STR, malcolm, NULL); - ok(!context, "expected no certs\n"); - ok(GetLastError() == CRYPT_E_NOT_FOUND, - "expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - - CertCloseStore(store, 0); - - /* Another subject cert search, using iTunes's certs */ - store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - iTunesCert0, sizeof(iTunesCert0), CERT_STORE_ADD_NEW, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", - GetLastError()); - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - iTunesCert1, sizeof(iTunesCert1), CERT_STORE_ADD_NEW, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", - GetLastError()); - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - iTunesCert2, sizeof(iTunesCert2), CERT_STORE_ADD_NEW, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", - GetLastError()); - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - iTunesCert3, sizeof(iTunesCert3), CERT_STORE_ADD_NEW, &subject); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", - GetLastError()); - - /* The certInfo's issuer does not match any subject, but the serial - * number does match a cert whose issuer matches certInfo's issuer. - * This yields a match. - */ - certInfo.SerialNumber.cbData = sizeof(iTunesSerialNum); - certInfo.SerialNumber.pbData = iTunesSerialNum; - certInfo.Issuer.cbData = sizeof(iTunesIssuer); - certInfo.Issuer.pbData = iTunesIssuer; - context = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, - CERT_FIND_SUBJECT_CERT, &certInfo, NULL); - ok(context != NULL, "Expected a match\n"); - if (context) - { - ret = CertCompareCertificateName(context->dwCertEncodingType, - &certInfo.Issuer, &context->pCertInfo->Subject); - ok(!ret, "Expected subject name not to match\n"); - ret = CertCompareCertificateName(context->dwCertEncodingType, - &certInfo.Issuer, &context->pCertInfo->Issuer); - ok(ret, "Expected issuer name to match\n"); - ret = CertCompareIntegerBlob(&certInfo.SerialNumber, - &context->pCertInfo->SerialNumber); - ok(ret, "Expected serial number to match\n"); - context = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, - CERT_FIND_SUBJECT_CERT, &certInfo, context); - ok(context == NULL, "Expected one cert only\n"); - } - - context = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, - CERT_FIND_ISSUER_OF, subject, NULL); - ok(context != NULL, "Expected an issuer\n"); - if (context) - { - PCCERT_CONTEXT none = CertFindCertificateInStore(store, - X509_ASN_ENCODING, 0, CERT_FIND_ISSUER_OF, context, NULL); - - ok(!none, "Expected no parent of issuer\n"); - CertFreeCertificateContext(context); - } - CertFreeCertificateContext(subject); - CertCloseStore(store, 0); -} - -static void testGetSubjectCert(void) -{ - HCERTSTORE store; - PCCERT_CONTEXT context1, context2; - CERT_INFO info = { 0 }; - BOOL ret; - - store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(store != NULL, "CertOpenStore failed: %d\n", GetLastError()); - if (!store) - return; - - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* win98 */), - "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); - if (!ret && GetLastError() == OSS_DATA_ERROR) - { - skip("bigCert can't be decoded, skipping tests\n"); - return; - } - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - bigCert2, sizeof(bigCert2), CERT_STORE_ADD_NEW, &context1); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", - GetLastError()); - ok(context1 != NULL, "Expected a context\n"); - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - certWithUsage, sizeof(certWithUsage), CERT_STORE_ADD_NEW, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", - GetLastError()); - - context2 = CertGetSubjectCertificateFromStore(store, X509_ASN_ENCODING, - NULL); - ok(!context2 && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - context2 = CertGetSubjectCertificateFromStore(store, X509_ASN_ENCODING, - &info); - ok(!context2 && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - info.SerialNumber.cbData = sizeof(serialNum); - info.SerialNumber.pbData = serialNum; - context2 = CertGetSubjectCertificateFromStore(store, X509_ASN_ENCODING, - &info); - ok(!context2 && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - info.Issuer.cbData = sizeof(subjectName2); - info.Issuer.pbData = subjectName2; - context2 = CertGetSubjectCertificateFromStore(store, X509_ASN_ENCODING, - &info); - ok(context2 != NULL, - "CertGetSubjectCertificateFromStore failed: %08x\n", GetLastError()); - /* Not only should this find a context, but it should be the same - * (same address) as context1. - */ - ok(context1 == context2, "Expected identical context addresses\n"); - CertFreeCertificateContext(context2); - - CertFreeCertificateContext(context1); - CertCloseStore(store, 0); -} - -/* This expires in 1970 or so */ -static const BYTE expiredCert[] = { 0x30, 0x82, 0x01, 0x33, 0x30, 0x81, 0xe2, - 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0xc4, 0xd7, 0x7f, 0x0e, 0x6f, 0xa6, - 0x8c, 0xaa, 0x47, 0x47, 0x40, 0xe7, 0xb7, 0x0b, 0x4a, 0x7f, 0x30, 0x09, 0x06, - 0x05, 0x2b, 0x0e, 0x03, 0x02, 0x1d, 0x05, 0x00, 0x30, 0x1f, 0x31, 0x1d, 0x30, - 0x1b, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x14, 0x61, 0x72, 0x69, 0x63, 0x40, - 0x63, 0x6f, 0x64, 0x65, 0x77, 0x65, 0x61, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x63, - 0x6f, 0x6d, 0x30, 0x1e, 0x17, 0x0d, 0x36, 0x39, 0x30, 0x31, 0x30, 0x31, 0x30, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x17, 0x0d, 0x37, 0x30, 0x30, 0x31, 0x30, - 0x31, 0x30, 0x36, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x1f, 0x31, 0x1d, 0x30, - 0x1b, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x14, 0x61, 0x72, 0x69, 0x63, 0x40, - 0x63, 0x6f, 0x64, 0x65, 0x77, 0x65, 0x61, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x63, - 0x6f, 0x6d, 0x30, 0x5c, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, - 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x4b, 0x00, 0x30, 0x48, 0x02, 0x41, - 0x00, 0xa1, 0xaf, 0x4a, 0xea, 0xa7, 0x83, 0x57, 0xc0, 0x37, 0x33, 0x7e, 0x29, - 0x5e, 0x0d, 0xfc, 0x44, 0x74, 0x3a, 0x1d, 0xc3, 0x1b, 0x1d, 0x96, 0xed, 0x4e, - 0xf4, 0x1b, 0x98, 0xec, 0x69, 0x1b, 0x04, 0xea, 0x25, 0xcf, 0xb3, 0x2a, 0xf5, - 0xd9, 0x22, 0xd9, 0x8d, 0x08, 0x39, 0x81, 0xc6, 0xe0, 0x4f, 0x12, 0x37, 0x2a, - 0x3f, 0x80, 0xa6, 0x6c, 0x67, 0x43, 0x3a, 0xdd, 0x95, 0x0c, 0xbb, 0x2f, 0x6b, - 0x02, 0x03, 0x01, 0x00, 0x01, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02, - 0x1d, 0x05, 0x00, 0x03, 0x41, 0x00, 0x8f, 0xa2, 0x5b, 0xd6, 0xdf, 0x34, 0xd0, - 0xa2, 0xa7, 0x47, 0xf1, 0x13, 0x79, 0xd3, 0xf3, 0x39, 0xbd, 0x4e, 0x2b, 0xa3, - 0xf4, 0x63, 0x37, 0xac, 0x5a, 0x0c, 0x5e, 0x4d, 0x0d, 0x54, 0x87, 0x4f, 0x31, - 0xfb, 0xa0, 0xce, 0x8f, 0x9a, 0x2f, 0x4d, 0x48, 0xc6, 0x84, 0x8d, 0xf5, 0x70, - 0x74, 0x17, 0xa5, 0xf3, 0x66, 0x47, 0x06, 0xd6, 0x64, 0x45, 0xbc, 0x52, 0xef, - 0x49, 0xe5, 0xf9, 0x65, 0xf3 }; - -/* This expires in 2036 or so */ -static const BYTE childOfExpired[] = { 0x30, 0x81, 0xcc, 0x30, 0x78, 0xa0, - 0x03, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, - 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x05, 0x05, 0x00, 0x30, 0x1f, 0x31, 0x1d, - 0x30, 0x1b, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x14, 0x61, 0x72, 0x69, 0x63, - 0x40, 0x63, 0x6f, 0x64, 0x65, 0x77, 0x65, 0x61, 0x76, 0x65, 0x72, 0x73, 0x2e, - 0x63, 0x6f, 0x6d, 0x30, 0x1e, 0x17, 0x0d, 0x30, 0x36, 0x30, 0x35, 0x30, 0x35, - 0x31, 0x37, 0x31, 0x32, 0x34, 0x39, 0x5a, 0x17, 0x0d, 0x33, 0x36, 0x30, 0x35, - 0x30, 0x35, 0x31, 0x37, 0x31, 0x32, 0x34, 0x39, 0x5a, 0x30, 0x15, 0x31, 0x13, - 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, - 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, - 0x01, 0x00, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, - 0x01, 0x05, 0x05, 0x00, 0x03, 0x41, 0x00, 0x20, 0x3b, 0xdb, 0x4d, 0x67, 0x50, - 0xec, 0x73, 0x9d, 0xf9, 0x85, 0x5d, 0x18, 0xe9, 0xb4, 0x98, 0xe3, 0x31, 0xb7, - 0x03, 0x0b, 0xc0, 0x39, 0x93, 0x56, 0x81, 0x0a, 0xfc, 0x78, 0xa8, 0x29, 0x42, - 0x5f, 0x69, 0xfb, 0xbc, 0x5b, 0xf2, 0xa6, 0x2a, 0xbe, 0x91, 0x2c, 0xfc, 0x89, - 0x69, 0x15, 0x18, 0x58, 0xe5, 0x02, 0x75, 0xf7, 0x2a, 0xb6, 0xa9, 0xfb, 0x47, - 0x6a, 0x6e, 0x0a, 0x9b, 0xe9, 0xdc }; -/* chain10_0 -+ - * +-> chain7_1 - * chain10_1 -+ - * A chain with two issuers, only one of whose dates is valid. - */ -static const BYTE chain10_0[] = { -0x30,0x82,0x01,0x9b,0x30,0x82,0x01,0x08,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x4a,0x30,0x3a,0x42,0xa2,0x5a,0xb3,0x93,0x4d,0x94,0x06,0xad,0x6d,0x1c,0x34, -0xe6,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31, -0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31, -0x30,0x1e,0x17,0x0d,0x30,0x36,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x17,0x0d,0x30,0x36,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35, -0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05, -0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82, -0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34, -0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7, -0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91, -0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5, -0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd, -0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c, -0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35, -0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01, -0x00,0x01,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x03,0x81, -0x81,0x00,0x85,0x6e,0x35,0x2f,0x2c,0x51,0x4f,0xd6,0x2a,0xe4,0x9e,0xd0,0x4b, -0xe6,0x90,0xfd,0xf7,0x20,0xad,0x76,0x3f,0x93,0xea,0x7f,0x0d,0x1f,0xb3,0x8e, -0xfd,0xe0,0xe1,0xd6,0xd7,0x9c,0x7d,0x46,0x6b,0x15,0x5c,0xe6,0xc9,0x62,0x3b, -0x70,0x4a,0x4b,0xb2,0x82,0xe3,0x55,0x0c,0xc4,0x90,0x44,0x06,0x6c,0x86,0x1c, -0x6d,0x47,0x12,0xda,0x33,0x95,0x5d,0x98,0x43,0xcb,0x7c,0xfa,0x2b,0xee,0xc4, -0x2d,0xc8,0x95,0x33,0x89,0x08,0x3f,0x9f,0x87,0xea,0x20,0x04,0xaf,0x58,0x4b, -0x9d,0xc0,0x7c,0x0a,0x1b,0x05,0x31,0x3b,0xbb,0x13,0x58,0x2e,0x3f,0x61,0x6b, -0x10,0xb4,0xeb,0xb9,0x1a,0x30,0xfd,0xea,0xca,0x29,0x99,0x5f,0x42,0x2b,0x00, -0xb0,0x08,0xc3,0xf0,0xb6,0xd6,0x6b,0xf9,0x35,0x95 }; -static const BYTE chain10_1[] = { -0x30,0x82,0x01,0x9b,0x30,0x82,0x01,0x08,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0xbf,0x99,0x4f,0x14,0x03,0x77,0x44,0xb8,0x49,0x02,0x70,0xa1,0xb8,0x9c,0xa7, -0x24,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31, -0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31, -0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35, -0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05, -0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82, -0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34, -0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7, -0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91, -0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5, -0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd, -0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c, -0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35, -0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01, -0x00,0x01,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x03,0x81, -0x81,0x00,0xa8,0xec,0x8c,0x34,0xe7,0x2c,0xdf,0x75,0x87,0xc4,0xf7,0xda,0x71, -0x72,0x29,0xb2,0x48,0xa8,0x2a,0xec,0x7b,0x7d,0x19,0xb9,0x5f,0x1d,0xd9,0x91, -0x2b,0xc4,0x28,0x7e,0xd6,0xb5,0x91,0x69,0xa5,0x8a,0x1a,0x1f,0x97,0x98,0x46, -0x9d,0xdf,0x12,0xf6,0x45,0x62,0xad,0x60,0xb6,0xba,0xb0,0xfd,0xf5,0x9f,0xc6, -0x98,0x05,0x4f,0x4d,0x48,0xdc,0xee,0x69,0xbe,0xb8,0xc4,0xc4,0xd7,0x1b,0xb1, -0x1f,0x64,0xd6,0x45,0xa7,0xdb,0xb3,0x87,0x63,0x0f,0x54,0xe1,0x3a,0x6b,0x57, -0x36,0xd7,0x68,0x65,0xcf,0xda,0x57,0x8d,0xcd,0x84,0x75,0x47,0x26,0x2c,0xef, -0x1e,0x8f,0xc7,0x3b,0xee,0x5d,0x03,0xa6,0xdf,0x3a,0x20,0xb2,0xcc,0xc9,0x09, -0x2c,0xfe,0x2b,0x79,0xb0,0xca,0x2c,0x9a,0x81,0x6b }; -static const BYTE chain7_1[] = { -0x30,0x82,0x01,0x93,0x30,0x81,0xfd,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,0x01, -0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00, -0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65, -0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30, -0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33, -0x35,0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04, -0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09, -0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00, -0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,0x33, -0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,0xdc, -0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,0x48, -0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,0x47, -0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,0x05, -0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,0x6a, -0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,0x85, -0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,0xd3, -0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,0xa3, -0x02,0x03,0x01,0x00,0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x9f,0x69,0xfd,0x26,0xd5,0x4b, -0xe0,0xab,0x12,0x21,0xb9,0xfc,0xf7,0xe0,0x0c,0x09,0x94,0xad,0x27,0xd7,0x9d, -0xa3,0xcc,0x46,0x2a,0x25,0x9a,0x24,0xa7,0x31,0x58,0x78,0xf5,0xfc,0x30,0xe1, -0x6d,0xfd,0x59,0xab,0xbe,0x69,0xa0,0xea,0xe3,0x7d,0x7a,0x7b,0xe5,0x85,0xeb, -0x86,0x6a,0x84,0x3c,0x96,0x01,0x1a,0x70,0xa7,0xb8,0xcb,0xf2,0x11,0xe7,0x52, -0x9c,0x58,0x2d,0xac,0x63,0xce,0x72,0x4b,0xad,0x62,0xa8,0x1d,0x75,0x96,0xe2, -0x27,0xf5,0x6f,0xba,0x91,0xf8,0xf1,0xb0,0xbf,0x90,0x24,0x6d,0xba,0x5d,0xd7, -0x39,0x63,0x3b,0x7c,0x04,0x5d,0x89,0x9d,0x1c,0xf2,0xf7,0xcc,0xdf,0x6e,0x8a, -0x43,0xa9,0xdd,0x86,0x05,0xa2,0xf3,0x22,0x2d,0x1e,0x70,0xa1,0x59,0xd7,0xa5, -0x94,0x7d }; - -static void testGetIssuerCert(void) -{ - BOOL ret; - PCCERT_CONTEXT parent, child, cert1, cert2; - DWORD flags = 0xffffffff; - HCERTSTORE store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - expiredCert, sizeof(expiredCert), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", - GetLastError()); - - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - childOfExpired, sizeof(childOfExpired), CERT_STORE_ADD_ALWAYS, &child); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", - GetLastError()); - - /* These crash: - parent = CertGetIssuerCertificateFromStore(NULL, NULL, NULL, NULL); - parent = CertGetIssuerCertificateFromStore(store, NULL, NULL, NULL); - */ - parent = CertGetIssuerCertificateFromStore(NULL, NULL, NULL, &flags); - ok(!parent && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - parent = CertGetIssuerCertificateFromStore(store, NULL, NULL, &flags); - ok(!parent && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - parent = CertGetIssuerCertificateFromStore(store, child, NULL, &flags); - ok(!parent && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* Confusing: the caller cannot set either of the - * CERT_STORE_NO_*_FLAGs, as these are not checks, - * they're results: - */ - flags = CERT_STORE_NO_CRL_FLAG | CERT_STORE_NO_ISSUER_FLAG; - parent = CertGetIssuerCertificateFromStore(store, child, NULL, &flags); - ok(!parent && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* Perform no checks */ - flags = 0; - parent = CertGetIssuerCertificateFromStore(store, child, NULL, &flags); - ok(parent != NULL, "CertGetIssuerCertificateFromStore failed: %08x\n", - GetLastError()); - if (parent) - CertFreeCertificateContext(parent); - /* Check revocation and signature only */ - flags = CERT_STORE_REVOCATION_FLAG | CERT_STORE_SIGNATURE_FLAG; - parent = CertGetIssuerCertificateFromStore(store, child, NULL, &flags); - ok(parent != NULL, "CertGetIssuerCertificateFromStore failed: %08x\n", - GetLastError()); - /* Confusing: CERT_STORE_REVOCATION_FLAG succeeds when there is no CRL by - * setting CERT_STORE_NO_CRL_FLAG. - */ - ok(flags == (CERT_STORE_REVOCATION_FLAG | CERT_STORE_NO_CRL_FLAG), - "Expected CERT_STORE_REVOCATION_FLAG | CERT_STORE_NO_CRL_FLAG, got %08x\n", - flags); - if (parent) - CertFreeCertificateContext(parent); - /* Checking time validity is not productive, because while most Windows - * versions return 0 (time valid) because the child is not expired, - * Windows 2003 SP1 returns that it is expired. Thus the range of - * possibilities is covered, and a test verifies nothing. - */ - - CertFreeCertificateContext(child); - CertCloseStore(store, 0); - - flags = 0; - store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - /* With only the child certificate, no issuer will be found */ - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - chain7_1, sizeof(chain7_1), CERT_STORE_ADD_ALWAYS, &child); - parent = CertGetIssuerCertificateFromStore(store, child, NULL, &flags); - ok(parent == NULL, "Expected no issuer\n"); - /* Adding an issuer allows one (and only one) issuer to be found */ - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - chain10_1, sizeof(chain10_1), CERT_STORE_ADD_ALWAYS, &cert1); - parent = CertGetIssuerCertificateFromStore(store, child, NULL, &flags); - ok(parent == cert1, "Expected cert1 to be the issuer\n"); - parent = CertGetIssuerCertificateFromStore(store, child, parent, &flags); - ok(parent == NULL, "Expected only one issuer\n"); - /* Adding a second issuer allows two issuers to be found - and the second - * issuer is found before the first, implying certs are added to the head - * of a list. - */ - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - chain10_0, sizeof(chain10_0), CERT_STORE_ADD_ALWAYS, &cert2); - parent = CertGetIssuerCertificateFromStore(store, child, NULL, &flags); - ok(parent == cert2, "Expected cert2 to be the first issuer\n"); - parent = CertGetIssuerCertificateFromStore(store, child, parent, &flags); - ok(parent == cert1, "Expected cert1 to be the second issuer\n"); - parent = CertGetIssuerCertificateFromStore(store, child, parent, &flags); - ok(parent == NULL, "Expected no more than two issuers\n"); - CertFreeCertificateContext(child); - CertFreeCertificateContext(cert1); - CertFreeCertificateContext(cert2); - CertCloseStore(store, 0); - - /* Repeat the test, reversing the order in which issuers are added, - * to show it's order-dependent. - */ - store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - /* With only the child certificate, no issuer will be found */ - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - chain7_1, sizeof(chain7_1), CERT_STORE_ADD_ALWAYS, &child); - parent = CertGetIssuerCertificateFromStore(store, child, NULL, &flags); - ok(parent == NULL, "Expected no issuer\n"); - /* Adding an issuer allows one (and only one) issuer to be found */ - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - chain10_0, sizeof(chain10_0), CERT_STORE_ADD_ALWAYS, &cert1); - parent = CertGetIssuerCertificateFromStore(store, child, NULL, &flags); - ok(parent == cert1, "Expected cert1 to be the issuer\n"); - parent = CertGetIssuerCertificateFromStore(store, child, parent, &flags); - ok(parent == NULL, "Expected only one issuer\n"); - /* Adding a second issuer allows two issuers to be found - and the second - * issuer is found before the first, implying certs are added to the head - * of a list. - */ - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - chain10_1, sizeof(chain10_1), CERT_STORE_ADD_ALWAYS, &cert2); - parent = CertGetIssuerCertificateFromStore(store, child, NULL, &flags); - ok(parent == cert2, "Expected cert2 to be the first issuer\n"); - parent = CertGetIssuerCertificateFromStore(store, child, parent, &flags); - ok(parent == cert1, "Expected cert1 to be the second issuer\n"); - parent = CertGetIssuerCertificateFromStore(store, child, parent, &flags); - ok(parent == NULL, "Expected no more than two issuers\n"); - CertFreeCertificateContext(child); - CertFreeCertificateContext(cert1); - CertFreeCertificateContext(cert2); - CertCloseStore(store, 0); -} - -static void testCryptHashCert(void) -{ - static const BYTE emptyHash[] = { 0xda, 0x39, 0xa3, 0xee, 0x5e, 0x6b, 0x4b, - 0x0d, 0x32, 0x55, 0xbf, 0xef, 0x95, 0x60, 0x18, 0x90, 0xaf, 0xd8, 0x07, - 0x09 }; - static const BYTE knownHash[] = { 0xae, 0x9d, 0xbf, 0x6d, 0xf5, 0x46, 0xee, - 0x8b, 0xc5, 0x7a, 0x13, 0xba, 0xc2, 0xb1, 0x04, 0xf2, 0xbf, 0x52, 0xa8, - 0xa2 }; - static const BYTE toHash[] = "abcdefghijklmnopqrstuvwxyz0123456789.,;!?:"; - BOOL ret; - BYTE hash[20]; - DWORD hashLen = sizeof(hash); - - /* NULL buffer and nonzero length crashes - ret = CryptHashCertificate(0, 0, 0, NULL, size, hash, &hashLen); - empty hash length also crashes - ret = CryptHashCertificate(0, 0, 0, buf, size, hash, NULL); - */ - /* Test empty hash */ - ret = CryptHashCertificate(0, 0, 0, toHash, sizeof(toHash), NULL, - &hashLen); - ok(ret, "CryptHashCertificate failed: %08x\n", GetLastError()); - ok(hashLen == sizeof(hash), "Got unexpected size of hash %d\n", hashLen); - /* Test with empty buffer */ - ret = CryptHashCertificate(0, 0, 0, NULL, 0, hash, &hashLen); - ok(ret, "CryptHashCertificate failed: %08x\n", GetLastError()); - ok(!memcmp(hash, emptyHash, sizeof(emptyHash)), - "Unexpected hash of nothing\n"); - /* Test a known value */ - ret = CryptHashCertificate(0, 0, 0, toHash, sizeof(toHash), hash, - &hashLen); - ok(ret, "CryptHashCertificate failed: %08x\n", GetLastError()); - ok(!memcmp(hash, knownHash, sizeof(knownHash)), "Unexpected hash\n"); -} - -static void verifySig(HCRYPTPROV csp, const BYTE *toSign, size_t toSignLen, - const BYTE *sig, unsigned int sigLen) -{ - HCRYPTHASH hash; - BOOL ret = CryptCreateHash(csp, CALG_SHA1, 0, 0, &hash); - - ok(ret, "CryptCreateHash failed: %08x\n", GetLastError()); - if (ret) - { - BYTE mySig[64]; - DWORD mySigSize = sizeof(mySig); - - ret = CryptHashData(hash, toSign, toSignLen, 0); - ok(ret, "CryptHashData failed: %08x\n", GetLastError()); - /* use the A variant so the test can run on Win9x */ - ret = CryptSignHashA(hash, AT_SIGNATURE, NULL, 0, mySig, &mySigSize); - ok(ret, "CryptSignHash failed: %08x\n", GetLastError()); - if (ret) - { - ok(mySigSize == sigLen, "Expected sig length %d, got %d\n", - sigLen, mySigSize); - ok(!memcmp(mySig, sig, sigLen), "Unexpected signature\n"); - } - CryptDestroyHash(hash); - } -} - -/* Tests signing the certificate described by toBeSigned with the CSP passed in, - * using the algorithm with OID sigOID. The CSP is assumed to be empty, and a - * keyset named AT_SIGNATURE will be added to it. The signature will be stored - * in sig. sigLen should be at least 64 bytes. - */ -static void testSignCert(HCRYPTPROV csp, const CRYPT_DATA_BLOB *toBeSigned, - LPCSTR sigOID, BYTE *sig, DWORD *sigLen) -{ - BOOL ret; - DWORD size = 0; - CRYPT_ALGORITHM_IDENTIFIER algoID = { NULL, { 0, NULL } }; - HCRYPTKEY key; - - /* These all crash - ret = CryptSignCertificate(0, 0, 0, NULL, 0, NULL, NULL, NULL, NULL); - ret = CryptSignCertificate(0, 0, 0, NULL, 0, NULL, NULL, NULL, &size); - ret = CryptSignCertificate(0, 0, 0, toBeSigned->pbData, toBeSigned->cbData, - NULL, NULL, NULL, &size); - */ - ret = CryptSignCertificate(0, 0, 0, toBeSigned->pbData, toBeSigned->cbData, - &algoID, NULL, NULL, &size); - ok(!ret && GetLastError() == NTE_BAD_ALGID, - "Expected NTE_BAD_ALGID, got %08x\n", GetLastError()); - algoID.pszObjId = (LPSTR)sigOID; - ret = CryptSignCertificate(0, 0, 0, toBeSigned->pbData, toBeSigned->cbData, - &algoID, NULL, NULL, &size); - ok(!ret && - (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == NTE_BAD_ALGID), - "Expected ERROR_INVALID_PARAMETER or NTE_BAD_ALGID, got %08x\n", - GetLastError()); - ret = CryptSignCertificate(0, AT_SIGNATURE, 0, toBeSigned->pbData, - toBeSigned->cbData, &algoID, NULL, NULL, &size); - ok(!ret && - (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == NTE_BAD_ALGID), - "Expected ERROR_INVALID_PARAMETER or NTE_BAD_ALGID, got %08x\n", - GetLastError()); - - /* No keys exist in the new CSP yet.. */ - ret = CryptSignCertificate(csp, AT_SIGNATURE, 0, toBeSigned->pbData, - toBeSigned->cbData, &algoID, NULL, NULL, &size); - ok(!ret && (GetLastError() == NTE_BAD_KEYSET || GetLastError() == - NTE_NO_KEY), "Expected NTE_BAD_KEYSET or NTE_NO_KEY, got %08x\n", - GetLastError()); - ret = CryptGenKey(csp, AT_SIGNATURE, 0, &key); - ok(ret, "CryptGenKey failed: %08x\n", GetLastError()); - if (ret) - { - ret = CryptSignCertificate(csp, AT_SIGNATURE, 0, toBeSigned->pbData, - toBeSigned->cbData, &algoID, NULL, NULL, &size); - ok(ret, "CryptSignCertificate failed: %08x\n", GetLastError()); - ok(size <= *sigLen, "Expected size <= %d, got %d\n", *sigLen, size); - if (ret) - { - ret = CryptSignCertificate(csp, AT_SIGNATURE, 0, toBeSigned->pbData, - toBeSigned->cbData, &algoID, NULL, sig, &size); - ok(ret, "CryptSignCertificate failed: %08x\n", GetLastError()); - if (ret) - { - *sigLen = size; - verifySig(csp, toBeSigned->pbData, toBeSigned->cbData, sig, - size); - } - } - CryptDestroyKey(key); - } -} - -static void testVerifyCertSig(HCRYPTPROV csp, const CRYPT_DATA_BLOB *toBeSigned, - LPCSTR sigOID, const BYTE *sig, DWORD sigLen) -{ - CERT_SIGNED_CONTENT_INFO info; - LPBYTE cert = NULL; - DWORD size = 0; - BOOL ret; - - if (!pCryptVerifyCertificateSignatureEx) - { - win_skip("no CryptVerifyCertificateSignatureEx support\n"); - return; - } - if (!pCryptEncodeObjectEx) - { - win_skip("no CryptEncodeObjectEx support\n"); - return; - } - ret = pCryptVerifyCertificateSignatureEx(0, 0, 0, NULL, 0, NULL, 0, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - ret = pCryptVerifyCertificateSignatureEx(csp, 0, 0, NULL, 0, NULL, 0, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - ret = pCryptVerifyCertificateSignatureEx(csp, X509_ASN_ENCODING, 0, NULL, 0, - NULL, 0, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* This crashes - ret = pCryptVerifyCertificateSignatureEx(csp, X509_ASN_ENCODING, - CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB, NULL, 0, NULL, 0, NULL); - */ - info.ToBeSigned.cbData = toBeSigned->cbData; - info.ToBeSigned.pbData = toBeSigned->pbData; - info.SignatureAlgorithm.pszObjId = (LPSTR)sigOID; - info.SignatureAlgorithm.Parameters.cbData = 0; - info.Signature.cbData = sigLen; - info.Signature.pbData = (BYTE *)sig; - info.Signature.cUnusedBits = 0; - ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, X509_CERT, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &cert, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (cert) - { - CRYPT_DATA_BLOB certBlob = { 0, NULL }; - PCERT_PUBLIC_KEY_INFO pubKeyInfo = NULL; - - ret = pCryptVerifyCertificateSignatureEx(csp, X509_ASN_ENCODING, - CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB, &certBlob, 0, NULL, 0, NULL); - ok(!ret && GetLastError() == CRYPT_E_ASN1_EOD, - "Expected CRYPT_E_ASN1_EOD, got %08x\n", GetLastError()); - certBlob.cbData = 1; - certBlob.pbData = (void *)0xdeadbeef; - ret = pCryptVerifyCertificateSignatureEx(csp, X509_ASN_ENCODING, - CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB, &certBlob, 0, NULL, 0, NULL); - ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || - GetLastError() == CRYPT_E_ASN1_EOD /* Win9x */ || - GetLastError() == CRYPT_E_ASN1_BADTAG /* Win98 */), - "Expected STATUS_ACCESS_VIOLATION, CRYPT_E_ASN1_EOD, OR CRYPT_E_ASN1_BADTAG, got %08x\n", - GetLastError()); - - certBlob.cbData = size; - certBlob.pbData = cert; - ret = pCryptVerifyCertificateSignatureEx(csp, X509_ASN_ENCODING, - CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB, &certBlob, 0, NULL, 0, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - ret = pCryptVerifyCertificateSignatureEx(csp, X509_ASN_ENCODING, - CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB, &certBlob, - CRYPT_VERIFY_CERT_SIGN_ISSUER_NULL, NULL, 0, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* This crashes - ret = pCryptVerifyCertificateSignatureEx(csp, X509_ASN_ENCODING, - CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB, &certBlob, - CRYPT_VERIFY_CERT_SIGN_ISSUER_PUBKEY, NULL, 0, NULL); - */ - CryptExportPublicKeyInfoEx(csp, AT_SIGNATURE, X509_ASN_ENCODING, - (LPSTR)sigOID, 0, NULL, NULL, &size); - pubKeyInfo = HeapAlloc(GetProcessHeap(), 0, size); - if (pubKeyInfo) - { - ret = CryptExportPublicKeyInfoEx(csp, AT_SIGNATURE, - X509_ASN_ENCODING, (LPSTR)sigOID, 0, NULL, pubKeyInfo, &size); - ok(ret, "CryptExportKey failed: %08x\n", GetLastError()); - if (ret) - { - ret = pCryptVerifyCertificateSignatureEx(csp, X509_ASN_ENCODING, - CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB, &certBlob, - CRYPT_VERIFY_CERT_SIGN_ISSUER_PUBKEY, pubKeyInfo, 0, NULL); - ok(ret, "CryptVerifyCertificateSignatureEx failed: %08x\n", - GetLastError()); - } - HeapFree(GetProcessHeap(), 0, pubKeyInfo); - } - LocalFree(cert); - } -} - -static BYTE emptyCert[] = { 0x30, 0x00 }; - -static void testCertSigs(void) -{ - HCRYPTPROV csp; - CRYPT_DATA_BLOB toBeSigned = { sizeof(emptyCert), emptyCert }; - BOOL ret; - BYTE sig[64]; - DWORD sigSize = sizeof(sig); - - /* Just in case a previous run failed, delete this thing */ - pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, - CRYPT_DELETEKEYSET); - ret = pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, - CRYPT_NEWKEYSET); - ok(ret, "CryptAcquireContext failed: %08x\n", GetLastError()); - - testSignCert(csp, &toBeSigned, szOID_RSA_SHA1RSA, sig, &sigSize); - testVerifyCertSig(csp, &toBeSigned, szOID_RSA_SHA1RSA, sig, sigSize); - - CryptReleaseContext(csp, 0); - ret = pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, - CRYPT_DELETEKEYSET); -} - -static const BYTE md5SignedEmptyCert[] = { -0x30,0x56,0x30,0x33,0x02,0x00,0x30,0x02,0x06,0x00,0x30,0x22,0x18,0x0f,0x31,0x36, -0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31, -0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x07, -0x30,0x02,0x06,0x00,0x03,0x01,0x00,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7, -0x0d,0x02,0x05,0x05,0x00,0x03,0x11,0x00,0xfb,0x0f,0x66,0x82,0x66,0xd9,0xe5,0xf8, -0xd8,0xa2,0x55,0x2b,0xe1,0xa5,0xd9,0x04 }; -static const BYTE md5SignedEmptyCertNoNull[] = { -0x30,0x54,0x30,0x33,0x02,0x00,0x30,0x02,0x06,0x00,0x30,0x22,0x18,0x0f,0x31,0x36, -0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31, -0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x07, -0x30,0x02,0x06,0x00,0x03,0x01,0x00,0x30,0x0a,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7, -0x0d,0x02,0x05,0x03,0x11,0x00,0x04,0xd9,0xa5,0xe1,0x2b,0x55,0xa2,0xd8,0xf8,0xe5, -0xd9,0x66,0x82,0x66,0x0f,0xfb }; - -static void testSignAndEncodeCert(void) -{ - static char oid_rsa_md5rsa[] = szOID_RSA_MD5RSA; - static char oid_rsa_md5[] = szOID_RSA_MD5; - BOOL ret; - DWORD size; - CRYPT_ALGORITHM_IDENTIFIER algID = { 0 }; - CERT_INFO info = { 0 }; - - /* Crash - ret = CryptSignAndEncodeCertificate(0, 0, 0, NULL, NULL, NULL, NULL, NULL, - NULL); - ret = CryptSignAndEncodeCertificate(0, 0, 0, NULL, NULL, NULL, NULL, NULL, - &size); - */ - ret = CryptSignAndEncodeCertificate(0, 0, 0, NULL, NULL, &algID, NULL, NULL, - &size); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - ret = CryptSignAndEncodeCertificate(0, 0, X509_ASN_ENCODING, NULL, NULL, - &algID, NULL, NULL, &size); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - ret = CryptSignAndEncodeCertificate(0, 0, 0, X509_CERT_TO_BE_SIGNED, NULL, - &algID, NULL, NULL, &size); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - /* Crashes on some win9x boxes */ - if (0) - { - ret = CryptSignAndEncodeCertificate(0, 0, X509_ASN_ENCODING, - X509_CERT_TO_BE_SIGNED, NULL, &algID, NULL, NULL, &size); - ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); - } - /* Crashes - ret = CryptSignAndEncodeCertificate(0, 0, X509_ASN_ENCODING, - X509_CERT_TO_BE_SIGNED, &info, NULL, NULL, NULL, &size); - */ - ret = CryptSignAndEncodeCertificate(0, 0, X509_ASN_ENCODING, - X509_CERT_TO_BE_SIGNED, &info, &algID, NULL, NULL, &size); - ok(!ret && - (GetLastError() == NTE_BAD_ALGID || - GetLastError() == OSS_BAD_PTR), /* win9x */ - "Expected NTE_BAD_ALGID, got %08x\n", GetLastError()); - algID.pszObjId = oid_rsa_md5rsa; - ret = CryptSignAndEncodeCertificate(0, 0, X509_ASN_ENCODING, - X509_CERT_TO_BE_SIGNED, &info, &algID, NULL, NULL, &size); - ok(!ret && - (GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == NTE_BAD_ALGID || - GetLastError() == OSS_BAD_PTR), /* Win9x */ - "Expected ERROR_INVALID_PARAMETER or NTE_BAD_ALGID, got %08x\n", - GetLastError()); - algID.pszObjId = oid_rsa_md5; - ret = CryptSignAndEncodeCertificate(0, 0, X509_ASN_ENCODING, - X509_CERT_TO_BE_SIGNED, &info, &algID, NULL, NULL, &size); - /* oid_rsa_md5 not present in some win2k */ - if (ret) - { - LPBYTE buf = HeapAlloc(GetProcessHeap(), 0, size); - - if (buf) - { - ret = CryptSignAndEncodeCertificate(0, 0, X509_ASN_ENCODING, - X509_CERT_TO_BE_SIGNED, &info, &algID, NULL, buf, &size); - ok(ret, "CryptSignAndEncodeCertificate failed: %08x\n", - GetLastError()); - /* Tricky: because the NULL parameters may either be omitted or - * included as an asn.1-encoded NULL (0x05,0x00), two different - * values are allowed. - */ - ok(size == sizeof(md5SignedEmptyCert) || - size == sizeof(md5SignedEmptyCertNoNull), "Unexpected size %d\n", - size); - if (size == sizeof(md5SignedEmptyCert)) - ok(!memcmp(buf, md5SignedEmptyCert, size), - "Unexpected value\n"); - else if (size == sizeof(md5SignedEmptyCertNoNull)) - ok(!memcmp(buf, md5SignedEmptyCertNoNull, size), - "Unexpected value\n"); - HeapFree(GetProcessHeap(), 0, buf); - } - } -} - -static void testCreateSelfSignCert(void) -{ - PCCERT_CONTEXT context; - CERT_NAME_BLOB name = { sizeof(subjectName), subjectName }; - HCRYPTPROV csp; - BOOL ret; - HCRYPTKEY key; - CRYPT_KEY_PROV_INFO info; - - if (!pCertCreateSelfSignCertificate) - { - win_skip("CertCreateSelfSignCertificate() is not available\n"); - return; - } - - /* This crashes: - context = pCertCreateSelfSignCertificate(0, NULL, 0, NULL, NULL, NULL, NULL, - NULL); - * Calling this with no first parameter creates a new key container, which - * lasts beyond the test, so I don't test that. Nb: the generated key - * name is a GUID. - context = pCertCreateSelfSignCertificate(0, &name, 0, NULL, NULL, NULL, NULL, - NULL); - */ - - /* Acquire a CSP */ - pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, - CRYPT_DELETEKEYSET); - ret = pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, - CRYPT_NEWKEYSET); - ok(ret, "CryptAcquireContext failed: %08x\n", GetLastError()); - - context = pCertCreateSelfSignCertificate(csp, &name, 0, NULL, NULL, NULL, - NULL, NULL); - ok(!context && GetLastError() == NTE_NO_KEY, - "Expected NTE_NO_KEY, got %08x\n", GetLastError()); - ret = CryptGenKey(csp, AT_SIGNATURE, 0, &key); - ok(ret, "CryptGenKey failed: %08x\n", GetLastError()); - if (ret) - { - context = pCertCreateSelfSignCertificate(csp, &name, 0, NULL, NULL, NULL, - NULL, NULL); - ok(context != NULL, "CertCreateSelfSignCertificate failed: %08x\n", - GetLastError()); - if (context) - { - DWORD size = 0; - PCRYPT_KEY_PROV_INFO info; - - /* The context must have a key provider info property */ - ret = CertGetCertificateContextProperty(context, - CERT_KEY_PROV_INFO_PROP_ID, NULL, &size); - ok(ret && size, "Expected non-zero key provider info\n"); - if (size) - { - info = HeapAlloc(GetProcessHeap(), 0, size); - if (info) - { - ret = CertGetCertificateContextProperty(context, - CERT_KEY_PROV_INFO_PROP_ID, info, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", - GetLastError()); - if (ret) - { - /* Sanity-check the key provider */ - ok(!lstrcmpW(info->pwszContainerName, cspNameW), - "Unexpected key container\n"); - ok(!lstrcmpW(info->pwszProvName, MS_DEF_PROV_W), - "Unexpected provider\n"); - ok(info->dwKeySpec == AT_SIGNATURE, - "Expected AT_SIGNATURE, got %d\n", info->dwKeySpec); - } - HeapFree(GetProcessHeap(), 0, info); - } - } - - CertFreeCertificateContext(context); - } - - CryptDestroyKey(key); - } - - CryptReleaseContext(csp, 0); - ret = pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, - CRYPT_DELETEKEYSET); - - /* do the same test with AT_KEYEXCHANGE and key info*/ - memset(&info,0,sizeof(info)); - info.dwProvType = PROV_RSA_FULL; - info.dwKeySpec = AT_KEYEXCHANGE; - info.pwszProvName = (LPWSTR) MS_DEF_PROV_W; - info.pwszContainerName = cspNameW; - context = pCertCreateSelfSignCertificate(0, &name, 0, &info, NULL, NULL, - NULL, NULL); - ok(context != NULL, "CertCreateSelfSignCertificate failed: %08x\n", - GetLastError()); - if (context) - { - DWORD size = 0; - PCRYPT_KEY_PROV_INFO info; - - /* The context must have a key provider info property */ - ret = CertGetCertificateContextProperty(context, - CERT_KEY_PROV_INFO_PROP_ID, NULL, &size); - ok(ret && size, "Expected non-zero key provider info\n"); - if (size) - { - info = HeapAlloc(GetProcessHeap(), 0, size); - if (info) - { - ret = CertGetCertificateContextProperty(context, - CERT_KEY_PROV_INFO_PROP_ID, info, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", - GetLastError()); - if (ret) - { - /* Sanity-check the key provider */ - ok(!lstrcmpW(info->pwszContainerName, cspNameW), - "Unexpected key container\n"); - ok(!lstrcmpW(info->pwszProvName, MS_DEF_PROV_W), - "Unexpected provider\n"); - ok(info->dwKeySpec == AT_KEYEXCHANGE, - "Expected AT_KEYEXCHANGE, got %d\n", info->dwKeySpec); - } - HeapFree(GetProcessHeap(), 0, info); - } - } - - CertFreeCertificateContext(context); - } - - pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, - CRYPT_DELETEKEYSET); -} - -static void testIntendedKeyUsage(void) -{ - BOOL ret; - CERT_INFO info = { 0 }; - static char oid_key_usage[] = szOID_KEY_USAGE; - /* A couple "key usages". Really they're just encoded bits which aren't - * necessarily restricted to the defined key usage values. - */ - static BYTE usage1[] = { 0x03,0x03,0x00,0xff,0xff }; - static BYTE usage2[] = { 0x03,0x03,0x01,0xff,0xfe }; - static const BYTE expected_usage1[] = { 0xff,0xff,0x00,0x00 }; - static const BYTE expected_usage2[] = { 0xff,0xfe,0x00,0x00 }; - CERT_EXTENSION ext = { oid_key_usage, TRUE, { sizeof(usage1), usage1 } }; - BYTE usage_bytes[4]; - - if (0) - { - /* Crash */ - ret = CertGetIntendedKeyUsage(0, NULL, NULL, 0); - } - ret = CertGetIntendedKeyUsage(0, &info, NULL, 0); - ok(!ret, "expected failure\n"); - ret = CertGetIntendedKeyUsage(0, &info, usage_bytes, sizeof(usage_bytes)); - ok(!ret, "expected failure\n"); - ret = CertGetIntendedKeyUsage(X509_ASN_ENCODING, &info, NULL, 0); - ok(!ret, "expected failure\n"); - ret = CertGetIntendedKeyUsage(X509_ASN_ENCODING, &info, usage_bytes, - sizeof(usage_bytes)); - info.cExtension = 1; - info.rgExtension = &ext; - ret = CertGetIntendedKeyUsage(X509_ASN_ENCODING, &info, NULL, 0); - ok(!ret, "expected failure\n"); - /* The unused bytes are filled with 0. */ - ret = CertGetIntendedKeyUsage(X509_ASN_ENCODING, &info, usage_bytes, - sizeof(usage_bytes)); - ok(ret, "CertGetIntendedKeyUsage failed: %08x\n", GetLastError()); - ok(!memcmp(usage_bytes, expected_usage1, sizeof(expected_usage1)), - "unexpected value\n"); - /* The usage bytes are copied in big-endian order. */ - ext.Value.cbData = sizeof(usage2); - ext.Value.pbData = usage2; - ret = CertGetIntendedKeyUsage(X509_ASN_ENCODING, &info, usage_bytes, - sizeof(usage_bytes)); - ok(ret, "CertGetIntendedKeyUsage failed: %08x\n", GetLastError()); - ok(!memcmp(usage_bytes, expected_usage2, sizeof(expected_usage2)), - "unexpected value\n"); -} - -static const LPCSTR keyUsages[] = { szOID_PKIX_KP_CODE_SIGNING, - szOID_PKIX_KP_CLIENT_AUTH, szOID_RSA_RSA }; - -static void testKeyUsage(void) -{ - BOOL ret; - PCCERT_CONTEXT context; - DWORD size; - - /* Test base cases */ - ret = CertGetEnhancedKeyUsage(NULL, 0, NULL, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); - size = 1; - ret = CertGetEnhancedKeyUsage(NULL, 0, NULL, &size); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); - size = 0; - ret = CertGetEnhancedKeyUsage(NULL, 0, NULL, &size); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); - /* These crash - ret = CertSetEnhancedKeyUsage(NULL, NULL); - usage.cUsageIdentifier = 0; - ret = CertSetEnhancedKeyUsage(NULL, &usage); - */ - /* Test with a cert with no enhanced key usage extension */ - context = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, - sizeof(bigCert)); - ok(context != NULL, "CertCreateCertificateContext failed: %08x\n", - GetLastError()); - if (context) - { - static const char oid[] = "1.2.3.4"; - BYTE buf[sizeof(CERT_ENHKEY_USAGE) + 2 * (sizeof(LPSTR) + sizeof(oid))]; - PCERT_ENHKEY_USAGE pUsage = (PCERT_ENHKEY_USAGE)buf; - - ret = CertGetEnhancedKeyUsage(context, 0, NULL, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); - size = 1; - ret = CertGetEnhancedKeyUsage(context, 0, NULL, &size); - if (ret) - { - /* Windows 2000, ME, or later: even though it succeeded, we expect - * CRYPT_E_NOT_FOUND, which indicates there is no enhanced key - * usage set for this cert (which implies it's valid for all uses.) - */ - ok(GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - ok(size == sizeof(CERT_ENHKEY_USAGE), "Wrong size %d\n", size); - ret = CertGetEnhancedKeyUsage(context, 0, pUsage, &size); - ok(ret, "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - ok(pUsage->cUsageIdentifier == 0, "Expected 0 usages, got %d\n", - pUsage->cUsageIdentifier); - } - else - { - /* Windows NT, 95, or 98: it fails, and the last error is - * CRYPT_E_NOT_FOUND. - */ - ok(GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - } - /* I can add a usage identifier when no key usage has been set */ - ret = CertAddEnhancedKeyUsageIdentifier(context, oid); - ok(ret, "CertAddEnhancedKeyUsageIdentifier failed: %08x\n", - GetLastError()); - size = sizeof(buf); - ret = CertGetEnhancedKeyUsage(context, - CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG, pUsage, &size); - ok(ret && GetLastError() == 0, - "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - ok(pUsage->cUsageIdentifier == 1, "Expected 1 usage, got %d\n", - pUsage->cUsageIdentifier); - if (pUsage->cUsageIdentifier) - ok(!strcmp(pUsage->rgpszUsageIdentifier[0], oid), - "Expected %s, got %s\n", oid, pUsage->rgpszUsageIdentifier[0]); - /* Now set an empty key usage */ - pUsage->cUsageIdentifier = 0; - ret = CertSetEnhancedKeyUsage(context, pUsage); - ok(ret, "CertSetEnhancedKeyUsage failed: %08x\n", GetLastError()); - /* Shouldn't find it in the cert */ - size = sizeof(buf); - ret = CertGetEnhancedKeyUsage(context, - CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG, pUsage, &size); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - /* Should find it as an extended property */ - ret = CertGetEnhancedKeyUsage(context, - CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG, pUsage, &size); - ok(ret && GetLastError() == 0, - "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - ok(pUsage->cUsageIdentifier == 0, "Expected 0 usages, got %d\n", - pUsage->cUsageIdentifier); - /* Should find it as either */ - ret = CertGetEnhancedKeyUsage(context, 0, pUsage, &size); - ok(ret && GetLastError() == 0, - "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - ok(pUsage->cUsageIdentifier == 0, "Expected 0 usages, got %d\n", - pUsage->cUsageIdentifier); - /* Add a usage identifier */ - ret = CertAddEnhancedKeyUsageIdentifier(context, oid); - ok(ret, "CertAddEnhancedKeyUsageIdentifier failed: %08x\n", - GetLastError()); - size = sizeof(buf); - ret = CertGetEnhancedKeyUsage(context, 0, pUsage, &size); - ok(ret && GetLastError() == 0, - "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - ok(pUsage->cUsageIdentifier == 1, "Expected 1 identifier, got %d\n", - pUsage->cUsageIdentifier); - if (pUsage->cUsageIdentifier) - ok(!strcmp(pUsage->rgpszUsageIdentifier[0], oid), - "Expected %s, got %s\n", oid, pUsage->rgpszUsageIdentifier[0]); - /* Re-adding the same usage identifier succeeds, though it only adds - * a duplicate usage identifier on versions prior to Vista - */ - ret = CertAddEnhancedKeyUsageIdentifier(context, oid); - ok(ret, "CertAddEnhancedKeyUsageIdentifier failed: %08x\n", - GetLastError()); - size = sizeof(buf); - ret = CertGetEnhancedKeyUsage(context, 0, pUsage, &size); - ok(ret && GetLastError() == 0, - "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - ok(pUsage->cUsageIdentifier == 1 || pUsage->cUsageIdentifier == 2, - "Expected 1 or 2 identifiers, got %d\n", pUsage->cUsageIdentifier); - if (pUsage->cUsageIdentifier) - ok(!strcmp(pUsage->rgpszUsageIdentifier[0], oid), - "Expected %s, got %s\n", oid, pUsage->rgpszUsageIdentifier[0]); - if (pUsage->cUsageIdentifier >= 2) - ok(!strcmp(pUsage->rgpszUsageIdentifier[1], oid), - "Expected %s, got %s\n", oid, pUsage->rgpszUsageIdentifier[1]); - /* Now set a NULL extended property--this deletes the property. */ - ret = CertSetEnhancedKeyUsage(context, NULL); - ok(ret, "CertSetEnhancedKeyUsage failed: %08x\n", GetLastError()); - SetLastError(0xbaadcafe); - size = sizeof(buf); - ret = CertGetEnhancedKeyUsage(context, 0, pUsage, &size); - ok(GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - - CertFreeCertificateContext(context); - } - /* Now test with a cert with an enhanced key usage extension */ - context = CertCreateCertificateContext(X509_ASN_ENCODING, certWithUsage, - sizeof(certWithUsage)); - ok(context != NULL, "CertCreateCertificateContext failed: %08x\n", - GetLastError()); - if (context) - { - LPBYTE buf = NULL; - DWORD bufSize = 0, i; - - /* The size may depend on what flags are used to query it, so I - * realloc the buffer for each test. - */ - ret = CertGetEnhancedKeyUsage(context, - CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG, NULL, &bufSize); - ok(ret, "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - buf = HeapAlloc(GetProcessHeap(), 0, bufSize); - if (buf) - { - PCERT_ENHKEY_USAGE pUsage = (PCERT_ENHKEY_USAGE)buf; - - /* Should find it in the cert */ - size = bufSize; - ret = CertGetEnhancedKeyUsage(context, - CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG, pUsage, &size); - ok(ret && GetLastError() == 0, - "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - ok(pUsage->cUsageIdentifier == 3, "Expected 3 usages, got %d\n", - pUsage->cUsageIdentifier); - for (i = 0; i < pUsage->cUsageIdentifier; i++) - ok(!strcmp(pUsage->rgpszUsageIdentifier[i], keyUsages[i]), - "Expected %s, got %s\n", keyUsages[i], - pUsage->rgpszUsageIdentifier[i]); - HeapFree(GetProcessHeap(), 0, buf); - } - ret = CertGetEnhancedKeyUsage(context, 0, NULL, &bufSize); - ok(ret, "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - buf = HeapAlloc(GetProcessHeap(), 0, bufSize); - if (buf) - { - PCERT_ENHKEY_USAGE pUsage = (PCERT_ENHKEY_USAGE)buf; - - /* Should find it as either */ - size = bufSize; - ret = CertGetEnhancedKeyUsage(context, 0, pUsage, &size); - /* In Windows, GetLastError returns CRYPT_E_NOT_FOUND not found - * here, even though the return is successful and the usage id - * count is positive. I don't enforce that here. - */ - ok(ret, - "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - ok(pUsage->cUsageIdentifier == 3, "Expected 3 usages, got %d\n", - pUsage->cUsageIdentifier); - for (i = 0; i < pUsage->cUsageIdentifier; i++) - ok(!strcmp(pUsage->rgpszUsageIdentifier[i], keyUsages[i]), - "Expected %s, got %s\n", keyUsages[i], - pUsage->rgpszUsageIdentifier[i]); - HeapFree(GetProcessHeap(), 0, buf); - } - /* Shouldn't find it as an extended property */ - ret = CertGetEnhancedKeyUsage(context, - CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG, NULL, &size); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - /* Adding a usage identifier overrides the cert's usage!? */ - ret = CertAddEnhancedKeyUsageIdentifier(context, szOID_RSA_RSA); - ok(ret, "CertAddEnhancedKeyUsageIdentifier failed: %08x\n", - GetLastError()); - ret = CertGetEnhancedKeyUsage(context, 0, NULL, &bufSize); - ok(ret, "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - buf = HeapAlloc(GetProcessHeap(), 0, bufSize); - if (buf) - { - PCERT_ENHKEY_USAGE pUsage = (PCERT_ENHKEY_USAGE)buf; - - /* Should find it as either */ - size = bufSize; - ret = CertGetEnhancedKeyUsage(context, 0, pUsage, &size); - ok(ret, - "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - ok(pUsage->cUsageIdentifier == 1, "Expected 1 usage, got %d\n", - pUsage->cUsageIdentifier); - ok(!strcmp(pUsage->rgpszUsageIdentifier[0], szOID_RSA_RSA), - "Expected %s, got %s\n", szOID_RSA_RSA, - pUsage->rgpszUsageIdentifier[0]); - HeapFree(GetProcessHeap(), 0, buf); - } - /* But querying the cert directly returns its usage */ - ret = CertGetEnhancedKeyUsage(context, - CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG, NULL, &bufSize); - ok(ret, "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - buf = HeapAlloc(GetProcessHeap(), 0, bufSize); - if (buf) - { - PCERT_ENHKEY_USAGE pUsage = (PCERT_ENHKEY_USAGE)buf; - - size = bufSize; - ret = CertGetEnhancedKeyUsage(context, - CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG, pUsage, &size); - ok(ret, - "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - ok(pUsage->cUsageIdentifier == 3, "Expected 3 usages, got %d\n", - pUsage->cUsageIdentifier); - for (i = 0; i < pUsage->cUsageIdentifier; i++) - ok(!strcmp(pUsage->rgpszUsageIdentifier[i], keyUsages[i]), - "Expected %s, got %s\n", keyUsages[i], - pUsage->rgpszUsageIdentifier[i]); - HeapFree(GetProcessHeap(), 0, buf); - } - /* And removing the only usage identifier in the extended property - * results in the cert's key usage being found. - */ - ret = CertRemoveEnhancedKeyUsageIdentifier(context, szOID_RSA_RSA); - ok(ret, "CertRemoveEnhancedKeyUsage failed: %08x\n", GetLastError()); - ret = CertGetEnhancedKeyUsage(context, 0, NULL, &bufSize); - ok(ret, "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - buf = HeapAlloc(GetProcessHeap(), 0, bufSize); - if (buf) - { - PCERT_ENHKEY_USAGE pUsage = (PCERT_ENHKEY_USAGE)buf; - - /* Should find it as either */ - size = bufSize; - ret = CertGetEnhancedKeyUsage(context, 0, pUsage, &size); - ok(ret, - "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - ok(pUsage->cUsageIdentifier == 3, "Expected 3 usages, got %d\n", - pUsage->cUsageIdentifier); - for (i = 0; i < pUsage->cUsageIdentifier; i++) - ok(!strcmp(pUsage->rgpszUsageIdentifier[i], keyUsages[i]), - "Expected %s, got %s\n", keyUsages[i], - pUsage->rgpszUsageIdentifier[i]); - HeapFree(GetProcessHeap(), 0, buf); - } - - CertFreeCertificateContext(context); - } -} - -static const BYTE cert2WithUsage[] = { -0x30,0x81,0x89,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30, -0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61, -0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31, -0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31, -0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11, -0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x00,0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00,0xa3,0x25,0x30,0x23, -0x30,0x21,0x06,0x03,0x55,0x1d,0x25,0x01,0x01,0xff,0x04,0x17,0x30,0x15,0x06, -0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x03,0x02,0x06,0x09,0x2a,0x86,0x48,0x86, -0xf7,0x0d,0x01,0x01,0x01 }; - -static void testGetValidUsages(void) -{ - static const LPCSTR expectedOIDs[] = { - "1.3.6.1.5.5.7.3.3", - "1.3.6.1.5.5.7.3.2", - "1.2.840.113549.1.1.1", - }; - static const LPCSTR expectedOIDs2[] = { - "1.3.6.1.5.5.7.3.2", - "1.2.840.113549.1.1.1", - }; - BOOL ret; - int numOIDs; - DWORD size; - LPSTR *oids = NULL; - PCCERT_CONTEXT contexts[3]; - - if (!pCertGetValidUsages) - { - win_skip("CertGetValidUsages() is not available\n"); - return; - } - - /* Crash - ret = pCertGetValidUsages(0, NULL, NULL, NULL, NULL); - ret = pCertGetValidUsages(0, NULL, NULL, NULL, &size); - */ - contexts[0] = NULL; - numOIDs = size = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = pCertGetValidUsages(1, &contexts[0], &numOIDs, NULL, &size); - ok(ret, "CertGetValidUsages failed: %d\n", GetLastError()); - ok(numOIDs == -1, "Expected -1, got %d\n", numOIDs); - ok(size == 0, "Expected size 0, got %d\n", size); - contexts[0] = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, - sizeof(bigCert)); - contexts[1] = CertCreateCertificateContext(X509_ASN_ENCODING, certWithUsage, - sizeof(certWithUsage)); - contexts[2] = CertCreateCertificateContext(X509_ASN_ENCODING, - cert2WithUsage, sizeof(cert2WithUsage)); - numOIDs = size = 0xdeadbeef; - ret = pCertGetValidUsages(0, NULL, &numOIDs, NULL, &size); - ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError()); - ok(numOIDs == -1, "Expected -1, got %d\n", numOIDs); - ok(size == 0, "Expected size 0, got %d\n", size); - numOIDs = size = 0xdeadbeef; - ret = pCertGetValidUsages(1, contexts, &numOIDs, NULL, &size); - ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError()); - ok(numOIDs == -1, "Expected -1, got %d\n", numOIDs); - ok(size == 0, "Expected size 0, got %d\n", size); - ret = pCertGetValidUsages(1, &contexts[1], &numOIDs, NULL, &size); - ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError()); - ok(numOIDs == 3, "Expected 3, got %d\n", numOIDs); - ok(size, "Expected non-zero size\n"); - oids = HeapAlloc(GetProcessHeap(), 0, size); - if (oids) - { - int i; - DWORD smallSize = 1; - - SetLastError(0xdeadbeef); - ret = pCertGetValidUsages(1, &contexts[1], &numOIDs, oids, &smallSize); - ok(!ret && GetLastError() == ERROR_MORE_DATA, - "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); - ret = pCertGetValidUsages(1, &contexts[1], &numOIDs, oids, &size); - ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError()); - for (i = 0; i < numOIDs; i++) - ok(!lstrcmpA(oids[i], expectedOIDs[i]), "unexpected OID %s\n", - oids[i]); - HeapFree(GetProcessHeap(), 0, oids); - } - numOIDs = size = 0xdeadbeef; - /* Oddly enough, this crashes when the number of contexts is not 1: - ret = pCertGetValidUsages(2, contexts, &numOIDs, NULL, &size); - * but setting size to 0 allows it to succeed: - */ - size = 0; - ret = pCertGetValidUsages(2, contexts, &numOIDs, NULL, &size); - ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError()); - ok(numOIDs == 3, "Expected 3, got %d\n", numOIDs); - ok(size, "Expected non-zero size\n"); - oids = HeapAlloc(GetProcessHeap(), 0, size); - if (oids) - { - int i; - - ret = pCertGetValidUsages(1, &contexts[1], &numOIDs, oids, &size); - ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError()); - for (i = 0; i < numOIDs; i++) - ok(!lstrcmpA(oids[i], expectedOIDs[i]), "unexpected OID %s\n", - oids[i]); - HeapFree(GetProcessHeap(), 0, oids); - } - numOIDs = 0xdeadbeef; - size = 0; - ret = pCertGetValidUsages(1, &contexts[2], &numOIDs, NULL, &size); - ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError()); - ok(numOIDs == 2, "Expected 2, got %d\n", numOIDs); - ok(size, "Expected non-zero size\n"); - oids = HeapAlloc(GetProcessHeap(), 0, size); - if (oids) - { - int i; - - ret = pCertGetValidUsages(1, &contexts[2], &numOIDs, oids, &size); - ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError()); - for (i = 0; i < numOIDs; i++) - ok(!lstrcmpA(oids[i], expectedOIDs2[i]), "unexpected OID %s\n", - oids[i]); - HeapFree(GetProcessHeap(), 0, oids); - } - numOIDs = 0xdeadbeef; - size = 0; - ret = pCertGetValidUsages(3, contexts, &numOIDs, NULL, &size); - ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError()); - ok(numOIDs == 2, "Expected 2, got %d\n", numOIDs); - ok(size, "Expected non-zero size\n"); - oids = HeapAlloc(GetProcessHeap(), 0, size); - if (oids) - { - int i; - - ret = pCertGetValidUsages(3, contexts, &numOIDs, oids, &size); - ok(ret, "CertGetValidUsages failed: %08x\n", GetLastError()); - for (i = 0; i < numOIDs; i++) - ok(!lstrcmpA(oids[i], expectedOIDs2[i]), "unexpected OID %s\n", - oids[i]); - HeapFree(GetProcessHeap(), 0, oids); - } - CertFreeCertificateContext(contexts[0]); - CertFreeCertificateContext(contexts[1]); - CertFreeCertificateContext(contexts[2]); -} - -static BYTE cn[] = { -0x30,0x14,0x31,0x12,0x30,0x10,0x06,0x03,0x55,0x04,0x03,0x13,0x09,0x4a,0x75, -0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67 }; -static BYTE cnWithLeadingSpace[] = { -0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x20,0x4a, -0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67 }; -static BYTE cnWithTrailingSpace[] = { -0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75, -0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x20 }; -static BYTE cnWithIntermediateSpace[] = { -0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75, -0x61,0x6e,0x20,0x20,0x4c,0x61,0x6e,0x67 }; -static BYTE cnThenO[] = { -0x30,0x2d,0x31,0x2b,0x30,0x10,0x06,0x03,0x55,0x04,0x03,0x13,0x09,0x4a,0x75, -0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x30,0x17,0x06,0x03,0x55,0x04,0x0a,0x13, -0x10,0x54,0x68,0x65,0x20,0x57,0x69,0x6e,0x65,0x20,0x50,0x72,0x6f,0x6a,0x65, -0x63,0x74 }; -static BYTE oThenCN[] = { -0x30,0x2d,0x31,0x2b,0x30,0x10,0x06,0x03,0x55,0x04,0x0a,0x13,0x09,0x4a,0x75, -0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x30,0x17,0x06,0x03,0x55,0x04,0x03,0x13, -0x10,0x54,0x68,0x65,0x20,0x57,0x69,0x6e,0x65,0x20,0x50,0x72,0x6f,0x6a,0x65, -0x63,0x74 }; - -static void testCompareCertName(void) -{ - static BYTE bogus[] = { 1, 2, 3, 4 }; - static BYTE bogusPrime[] = { 0, 1, 2, 3, 4 }; - static BYTE emptyPrime[] = { 0x30, 0x00, 0x01 }; - BOOL ret; - CERT_NAME_BLOB blob1, blob2; - - /* crashes - ret = CertCompareCertificateName(0, NULL, NULL); - */ - /* An empty name checks against itself.. */ - blob1.pbData = emptyCert; - blob1.cbData = sizeof(emptyCert); - ret = CertCompareCertificateName(0, &blob1, &blob1); - ok(ret, "CertCompareCertificateName failed: %08x\n", GetLastError()); - /* It doesn't have to be a valid encoded name.. */ - blob1.pbData = bogus; - blob1.cbData = sizeof(bogus); - ret = CertCompareCertificateName(0, &blob1, &blob1); - ok(ret, "CertCompareCertificateName failed: %08x\n", GetLastError()); - /* Leading zeroes matter.. */ - blob2.pbData = bogusPrime; - blob2.cbData = sizeof(bogusPrime); - ret = CertCompareCertificateName(0, &blob1, &blob2); - ok(!ret, "Expected failure\n"); - /* As do trailing extra bytes. */ - blob2.pbData = emptyPrime; - blob2.cbData = sizeof(emptyPrime); - ret = CertCompareCertificateName(0, &blob1, &blob2); - ok(!ret, "Expected failure\n"); - /* Tests to show that CertCompareCertificateName doesn't decode the name - * to remove spaces, or to do an order-independent comparison. - */ - /* Compare CN="Juan Lang" with CN=" Juan Lang" */ - blob1.pbData = cn; - blob1.cbData = sizeof(cn); - blob2.pbData = cnWithLeadingSpace; - blob2.cbData = sizeof(cnWithLeadingSpace); - ret = CertCompareCertificateName(0, &blob1, &blob2); - ok(!ret, "Expected failure\n"); - ret = CertCompareCertificateName(X509_ASN_ENCODING, &blob1, &blob2); - ok(!ret, "Expected failure\n"); - /* Compare CN="Juan Lang" with CN="Juan Lang " */ - blob2.pbData = cnWithTrailingSpace; - blob2.cbData = sizeof(cnWithTrailingSpace); - ret = CertCompareCertificateName(0, &blob1, &blob2); - ok(!ret, "Expected failure\n"); - ret = CertCompareCertificateName(X509_ASN_ENCODING, &blob1, &blob2); - ok(!ret, "Expected failure\n"); - /* Compare CN="Juan Lang" with CN="Juan Lang" */ - blob2.pbData = cnWithIntermediateSpace; - blob2.cbData = sizeof(cnWithIntermediateSpace); - ret = CertCompareCertificateName(0, &blob1, &blob2); - ok(!ret, "Expected failure\n"); - ret = CertCompareCertificateName(X509_ASN_ENCODING, &blob1, &blob2); - ok(!ret, "Expected failure\n"); - /* Compare 'CN="Juan Lang", O="The Wine Project"' with - * 'O="The Wine Project", CN="Juan Lang"' - */ - blob1.pbData = cnThenO; - blob1.cbData = sizeof(cnThenO); - blob2.pbData = oThenCN; - blob2.cbData = sizeof(oThenCN); - ret = CertCompareCertificateName(0, &blob1, &blob2); - ok(!ret, "Expected failure\n"); - ret = CertCompareCertificateName(X509_ASN_ENCODING, &blob1, &blob2); - ok(!ret, "Expected failure\n"); -} - -static void testIsRDNAttrsInCertificateName(void) -{ - static char oid_1_2_3[] = "1.2.3"; - static char oid_common_name[] = szOID_COMMON_NAME; - static char oid_organization[] = szOID_ORGANIZATION_NAME; - static char juan[] = "Juan Lang"; - static char juan_with_leading_space[] = " Juan Lang"; - static char juan_with_intermediate_space[] = "Juan Lang"; - static char juan_with_trailing_space[] = "Juan Lang "; - static char juan_lower_case[] = "juan lang"; - static WCHAR juanW[] = { 'J','u','a','n',' ','L','a','n','g',0 }; - static char the_wine_project[] = "The Wine Project"; - BOOL ret; - CERT_NAME_BLOB name; - CERT_RDN_ATTR attr[2]; - CERT_RDN rdn = { 0, NULL }; - - name.cbData = sizeof(cn); - name.pbData = cn; - if (0) - { - /* Crash */ - ret = CertIsRDNAttrsInCertificateName(0, 0, NULL, NULL); - ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, - NULL); - } - SetLastError(0xdeadbeef); - ret = CertIsRDNAttrsInCertificateName(0, 0, &name, NULL); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - ok(ret, "CertIsRDNAttrsInCertificateName failed: %08x\n", GetLastError()); - attr[0].pszObjId = oid_1_2_3; - rdn.rgRDNAttr = attr; - rdn.cRDNAttr = 1; - SetLastError(0xdeadbeef); - ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); - attr[0].pszObjId = oid_common_name; - attr[0].dwValueType = CERT_RDN_PRINTABLE_STRING; - attr[0].Value.cbData = strlen(juan); - attr[0].Value.pbData = (BYTE *)juan; - ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - ok(ret, "CertIsRDNAttrsInCertificateName failed: %08x\n", GetLastError()); - /* Again, spaces are not removed for name comparison. */ - attr[0].Value.cbData = strlen(juan_with_leading_space); - attr[0].Value.pbData = (BYTE *)juan_with_leading_space; - SetLastError(0xdeadbeef); - ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); - attr[0].Value.cbData = strlen(juan_with_intermediate_space); - attr[0].Value.pbData = (BYTE *)juan_with_intermediate_space; - SetLastError(0xdeadbeef); - ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); - attr[0].Value.cbData = strlen(juan_with_trailing_space); - attr[0].Value.pbData = (BYTE *)juan_with_trailing_space; - SetLastError(0xdeadbeef); - ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); - /* The lower case name isn't matched unless a case insensitive match is - * specified. - */ - attr[0].Value.cbData = strlen(juan_lower_case); - attr[0].Value.pbData = (BYTE *)juan_lower_case; - SetLastError(0xdeadbeef); - ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); - ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, - CERT_CASE_INSENSITIVE_IS_RDN_ATTRS_FLAG, &name, &rdn); - ok(ret || - broken(!ret && GetLastError() == CRYPT_E_NO_MATCH), /* Older crypt32 */ - "CertIsRDNAttrsInCertificateName failed: %08x\n", GetLastError()); - /* The values don't match unless they have the same RDN type */ - attr[0].dwValueType = CERT_RDN_UNICODE_STRING; - attr[0].Value.cbData = lstrlenW(juanW) * sizeof(WCHAR); - attr[0].Value.pbData = (BYTE *)juanW; - SetLastError(0xdeadbeef); - ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, - CERT_UNICODE_IS_RDN_ATTRS_FLAG, &name, &rdn); - ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); - attr[0].dwValueType = CERT_RDN_IA5_STRING; - attr[0].Value.cbData = strlen(juan); - attr[0].Value.pbData = (BYTE *)juan; - SetLastError(0xdeadbeef); - ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); - /* All attributes must be present */ - attr[0].dwValueType = CERT_RDN_PRINTABLE_STRING; - attr[0].Value.cbData = strlen(juan); - attr[0].Value.pbData = (BYTE *)juan; - attr[1].pszObjId = oid_organization; - attr[1].dwValueType = CERT_RDN_PRINTABLE_STRING; - attr[1].Value.cbData = strlen(the_wine_project); - attr[1].Value.pbData = (BYTE *)the_wine_project; - rdn.cRDNAttr = 2; - SetLastError(0xdeadbeef); - ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); - /* Order also matters */ - name.pbData = cnThenO; - name.cbData = sizeof(cnThenO); - ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - ok(ret, "CertIsRDNAttrsInCertificateName failed: %08x\n", GetLastError()); - name.pbData = oThenCN; - name.cbData = sizeof(oThenCN); - SetLastError(0xdeadbeef); - ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); -} - -static BYTE int1[] = { 0x88, 0xff, 0xff, 0xff }; -static BYTE int2[] = { 0x88, 0xff }; -static BYTE int3[] = { 0x23, 0xff }; -static BYTE int4[] = { 0x7f, 0x00 }; -static BYTE int5[] = { 0x7f }; -static BYTE int6[] = { 0x80, 0x00, 0x00, 0x00 }; -static BYTE int7[] = { 0x80, 0x00 }; - -static struct IntBlobTest -{ - CRYPT_INTEGER_BLOB blob1; - CRYPT_INTEGER_BLOB blob2; - BOOL areEqual; -} intBlobs[] = { - { { sizeof(int1), int1 }, { sizeof(int2), int2 }, TRUE }, - { { sizeof(int3), int3 }, { sizeof(int3), int3 }, TRUE }, - { { sizeof(int4), int4 }, { sizeof(int5), int5 }, TRUE }, - { { sizeof(int6), int6 }, { sizeof(int7), int7 }, TRUE }, - { { sizeof(int1), int1 }, { sizeof(int7), int7 }, FALSE }, -}; - -static void testCompareIntegerBlob(void) -{ - DWORD i; - BOOL ret; - - for (i = 0; i < sizeof(intBlobs) / sizeof(intBlobs[0]); i++) - { - ret = CertCompareIntegerBlob(&intBlobs[i].blob1, &intBlobs[i].blob2); - ok(ret == intBlobs[i].areEqual, - "%d: expected blobs %s compare\n", i, intBlobs[i].areEqual ? - "to" : "not to"); - } -} - -static void testComparePublicKeyInfo(void) -{ - BOOL ret; - CERT_PUBLIC_KEY_INFO info1 = { { 0 } }, info2 = { { 0 } }; - static CHAR oid_rsa_rsa[] = szOID_RSA_RSA; - static CHAR oid_rsa_sha1rsa[] = szOID_RSA_SHA1RSA; - static CHAR oid_x957_dsa[] = szOID_X957_DSA; - static BYTE bits1[] = { 1, 0 }; - static BYTE bits2[] = { 0 }; - static BYTE bits3[] = { 1 }; - static BYTE bits4[] = { 0x30,8, 2,1,0x81, 2,3,1,0,1 }; - static BYTE bits5[] = { 0x30,9, 2,2,0,0x81, 2,3,1,0,1 }; - static BYTE bits6[] = { 0x30,9, 2,2,0,0x82, 2,3,1,0,1 }; - - /* crashes - ret = CertComparePublicKeyInfo(0, NULL, NULL); - */ - /* Empty public keys compare */ - ret = CertComparePublicKeyInfo(0, &info1, &info2); - ok(ret, "CertComparePublicKeyInfo failed: %08x\n", GetLastError()); - /* Different OIDs appear to compare */ - info1.Algorithm.pszObjId = oid_rsa_rsa; - info2.Algorithm.pszObjId = oid_rsa_sha1rsa; - ret = CertComparePublicKeyInfo(0, &info1, &info2); - ok(ret, "CertComparePublicKeyInfo failed: %08x\n", GetLastError()); - info2.Algorithm.pszObjId = oid_x957_dsa; - ret = CertComparePublicKeyInfo(0, &info1, &info2); - ok(ret, "CertComparePublicKeyInfo failed: %08x\n", GetLastError()); - info1.PublicKey.cbData = sizeof(bits1); - info1.PublicKey.pbData = bits1; - info1.PublicKey.cUnusedBits = 0; - info2.PublicKey.cbData = sizeof(bits1); - info2.PublicKey.pbData = bits1; - info2.PublicKey.cUnusedBits = 0; - ret = CertComparePublicKeyInfo(0, &info1, &info2); - ok(ret, "CertComparePublicKeyInfo failed: %08x\n", GetLastError()); - info2.Algorithm.pszObjId = oid_rsa_rsa; - info1.PublicKey.cbData = sizeof(bits4); - info1.PublicKey.pbData = bits4; - info1.PublicKey.cUnusedBits = 0; - info2.PublicKey.cbData = sizeof(bits5); - info2.PublicKey.pbData = bits5; - info2.PublicKey.cUnusedBits = 0; - ret = CertComparePublicKeyInfo(0, &info1, &info2); - ok(!ret, "CertComparePublicKeyInfo: as raw binary: keys should be unequal\n"); - ret = CertComparePublicKeyInfo(X509_ASN_ENCODING, &info1, &info2); - ok(ret || - broken(!ret), /* win9x */ - "CertComparePublicKeyInfo: as ASN.1 encoded: keys should be equal\n"); - info1.PublicKey.cUnusedBits = 1; - info2.PublicKey.cUnusedBits = 5; - ret = CertComparePublicKeyInfo(X509_ASN_ENCODING, &info1, &info2); - ok(ret || - broken(!ret), /* win9x */ - "CertComparePublicKeyInfo: ASN.1 encoding should ignore cUnusedBits\n"); - info1.PublicKey.cUnusedBits = 0; - info2.PublicKey.cUnusedBits = 0; - info1.PublicKey.cbData--; /* kill one byte, make ASN.1 encoded data invalid */ - ret = CertComparePublicKeyInfo(X509_ASN_ENCODING, &info1, &info2); - ok(!ret, "CertComparePublicKeyInfo: comparing bad ASN.1 encoded key should fail\n"); - /* Even though they compare in their used bits, these do not compare */ - info1.PublicKey.cbData = sizeof(bits2); - info1.PublicKey.pbData = bits2; - info1.PublicKey.cUnusedBits = 0; - info2.PublicKey.cbData = sizeof(bits3); - info2.PublicKey.pbData = bits3; - info2.PublicKey.cUnusedBits = 1; - ret = CertComparePublicKeyInfo(0, &info1, &info2); - /* Simple (non-comparing) case */ - ok(!ret, "Expected keys not to compare\n"); - info2.PublicKey.cbData = sizeof(bits1); - info2.PublicKey.pbData = bits1; - info2.PublicKey.cUnusedBits = 0; - ret = CertComparePublicKeyInfo(0, &info1, &info2); - ok(!ret, "Expected keys not to compare\n"); - /* ASN.1 encoded non-comparing case */ - info1.PublicKey.cbData = sizeof(bits5); - info1.PublicKey.pbData = bits5; - info1.PublicKey.cUnusedBits = 0; - info2.PublicKey.cbData = sizeof(bits6); - info2.PublicKey.pbData = bits6; - info2.PublicKey.cUnusedBits = 0; - ret = CertComparePublicKeyInfo(X509_ASN_ENCODING, &info1, &info2); - ok(!ret, "CertComparePublicKeyInfo: different keys should be unequal\n"); -} - -static void testHashPublicKeyInfo(void) -{ - BOOL ret; - CERT_PUBLIC_KEY_INFO info = { { 0 } }; - DWORD len; - - /* Crash - ret = CryptHashPublicKeyInfo(0, 0, 0, 0, NULL, NULL, NULL); - ret = CryptHashPublicKeyInfo(0, 0, 0, 0, &info, NULL, NULL); - */ - ret = CryptHashPublicKeyInfo(0, 0, 0, 0, NULL, NULL, &len); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - /* Crashes on some win9x boxes */ - if (0) - { - ret = CryptHashPublicKeyInfo(0, 0, 0, X509_ASN_ENCODING, NULL, NULL, &len); - ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); - } - ret = CryptHashPublicKeyInfo(0, 0, 0, X509_ASN_ENCODING, &info, NULL, &len); - ok(ret || - broken(!ret), /* win9x */ - "CryptHashPublicKeyInfo failed: %08x\n", GetLastError()); - if (ret) - { - ok(len == 16, "Expected hash size 16, got %d\n", len); - if (len == 16) - { - static const BYTE emptyHash[] = { 0xb8,0x51,0x3a,0x31,0x0e,0x9f,0x40, - 0x36,0x9c,0x92,0x45,0x1b,0x9d,0xc8,0xf9,0xf6 }; - BYTE buf[16]; - - ret = CryptHashPublicKeyInfo(0, 0, 0, X509_ASN_ENCODING, &info, buf, - &len); - ok(ret, "CryptHashPublicKeyInfo failed: %08x\n", GetLastError()); - ok(!memcmp(buf, emptyHash, len), "Unexpected hash\n"); - } - } -} - -static const BYTE md5SignedEmptyCertHash[] = { 0xfb,0x0f,0x66,0x82,0x66,0xd9, - 0xe5,0xf8,0xd8,0xa2,0x55,0x2b,0xe1,0xa5,0xd9,0x04 }; - -static void testHashToBeSigned(void) -{ - BOOL ret; - DWORD size; - BYTE hash[16]; - - /* Crash */ - if (0) - { - ret = CryptHashToBeSigned(0, 0, NULL, 0, NULL, NULL); - } - SetLastError(0xdeadbeef); - ret = CryptHashToBeSigned(0, 0, NULL, 0, NULL, &size); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptHashToBeSigned(0, X509_ASN_ENCODING, NULL, 0, NULL, &size); - ok(!ret && - (GetLastError() == CRYPT_E_ASN1_EOD || - GetLastError() == OSS_BAD_ARG), /* win9x */ - "expected CRYPT_E_ASN1_EOD, got %08x\n", GetLastError()); - /* Can't sign anything: has to be asn.1 encoded, at least */ - SetLastError(0xdeadbeef); - ret = CryptHashToBeSigned(0, X509_ASN_ENCODING, int1, sizeof(int1), - NULL, &size); - ok(!ret && - (GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == OSS_MORE_INPUT), /* win9x */ - "expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError()); - /* Can't be empty, either */ - SetLastError(0xdeadbeef); - ret = CryptHashToBeSigned(0, X509_ASN_ENCODING, emptyCert, - sizeof(emptyCert), NULL, &size); - ok(!ret && - (GetLastError() == CRYPT_E_ASN1_CORRUPT || - GetLastError() == OSS_DATA_ERROR), /* win9x */ - "expected CRYPT_E_ASN1_CORRUPT, got %08x\n", GetLastError()); - /* Signing a cert works */ - ret = CryptHashToBeSigned(0, X509_ASN_ENCODING, md5SignedEmptyCert, - sizeof(md5SignedEmptyCert), NULL, &size); - ok(ret || - broken(!ret), /* win9x */ - "CryptHashToBeSigned failed: %08x\n", GetLastError()); - if (ret) - { - ok(size == sizeof(md5SignedEmptyCertHash), "unexpected size %d\n", size); - } - - ret = CryptHashToBeSigned(0, X509_ASN_ENCODING, md5SignedEmptyCert, - sizeof(md5SignedEmptyCert), hash, &size); - ok(!memcmp(hash, md5SignedEmptyCertHash, size), "unexpected value\n"); -} - -static void testCompareCert(void) -{ - CERT_INFO info1 = { 0 }, info2 = { 0 }; - BOOL ret; - - /* Crashes - ret = CertCompareCertificate(X509_ASN_ENCODING, NULL, NULL); - */ - - /* Certs with the same issuer and serial number are equal, even if they - * differ in other respects (like subject). - */ - info1.SerialNumber.pbData = serialNum; - info1.SerialNumber.cbData = sizeof(serialNum); - info1.Issuer.pbData = subjectName; - info1.Issuer.cbData = sizeof(subjectName); - info1.Subject.pbData = subjectName2; - info1.Subject.cbData = sizeof(subjectName2); - info2.SerialNumber.pbData = serialNum; - info2.SerialNumber.cbData = sizeof(serialNum); - info2.Issuer.pbData = subjectName; - info2.Issuer.cbData = sizeof(subjectName); - info2.Subject.pbData = subjectName; - info2.Subject.cbData = sizeof(subjectName); - ret = CertCompareCertificate(X509_ASN_ENCODING, &info1, &info2); - ok(ret, "Expected certs to be equal\n"); - - info2.Issuer.pbData = subjectName2; - info2.Issuer.cbData = sizeof(subjectName2); - ret = CertCompareCertificate(X509_ASN_ENCODING, &info1, &info2); - ok(!ret, "Expected certs not to be equal\n"); -} - -static void testVerifySubjectCert(void) -{ - BOOL ret; - DWORD flags; - PCCERT_CONTEXT context1, context2; - - /* Crashes - ret = CertVerifySubjectCertificateContext(NULL, NULL, NULL); - */ - flags = 0; - ret = CertVerifySubjectCertificateContext(NULL, NULL, &flags); - ok(ret, "CertVerifySubjectCertificateContext failed; %08x\n", - GetLastError()); - flags = CERT_STORE_NO_CRL_FLAG; - ret = CertVerifySubjectCertificateContext(NULL, NULL, &flags); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - - flags = 0; - context1 = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, - sizeof(bigCert)); - ret = CertVerifySubjectCertificateContext(NULL, context1, &flags); - ok(ret, "CertVerifySubjectCertificateContext failed; %08x\n", - GetLastError()); - ret = CertVerifySubjectCertificateContext(context1, NULL, &flags); - ok(ret, "CertVerifySubjectCertificateContext failed; %08x\n", - GetLastError()); - ret = CertVerifySubjectCertificateContext(context1, context1, &flags); - ok(ret, "CertVerifySubjectCertificateContext failed; %08x\n", - GetLastError()); - - context2 = CertCreateCertificateContext(X509_ASN_ENCODING, - bigCertWithDifferentSubject, sizeof(bigCertWithDifferentSubject)); - SetLastError(0xdeadbeef); - ret = CertVerifySubjectCertificateContext(context1, context2, &flags); - ok(ret, "CertVerifySubjectCertificateContext failed; %08x\n", - GetLastError()); - flags = CERT_STORE_REVOCATION_FLAG; - ret = CertVerifySubjectCertificateContext(context1, context2, &flags); - ok(ret, "CertVerifySubjectCertificateContext failed; %08x\n", - GetLastError()); - ok(flags == (CERT_STORE_REVOCATION_FLAG | CERT_STORE_NO_CRL_FLAG), - "Expected CERT_STORE_REVOCATION_FLAG | CERT_STORE_NO_CRL_FLAG, got %08x\n", - flags); - flags = CERT_STORE_SIGNATURE_FLAG; - ret = CertVerifySubjectCertificateContext(context1, context2, &flags); - ok(ret, "CertVerifySubjectCertificateContext failed; %08x\n", - GetLastError()); - ok(flags == CERT_STORE_SIGNATURE_FLAG, - "Expected CERT_STORE_SIGNATURE_FLAG, got %08x\n", flags); - CertFreeCertificateContext(context2); - - CertFreeCertificateContext(context1); -} - -static const BYTE rootWithKeySignAndCRLSign[] = { -0x30,0x82,0x01,0xdf,0x30,0x82,0x01,0x4c,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x5b,0xc7,0x0b,0x27,0x99,0xbb,0x2e,0x99,0x47,0x9d,0x45,0x4e,0x7c,0x1a,0xca, -0xe8,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31, -0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31, -0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35, -0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05, -0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82, -0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34, -0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7, -0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91, -0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5, -0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd, -0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c, -0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35, -0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01, -0x00,0x01,0xa3,0x42,0x30,0x40,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01, -0xff,0x04,0x04,0x03,0x02,0x00,0x06,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01, -0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x1d,0x06,0x03,0x55,0x1d, -0x0e,0x04,0x16,0x04,0x14,0x14,0x8c,0x16,0xbb,0xbe,0x70,0xa2,0x28,0x89,0xa0, -0x58,0xff,0x98,0xbd,0xa8,0x24,0x2b,0x8a,0xe9,0x9a,0x30,0x09,0x06,0x05,0x2b, -0x0e,0x03,0x02,0x1d,0x05,0x00,0x03,0x81,0x81,0x00,0x74,0xcb,0x21,0xfd,0x2d, -0x25,0xdc,0xa5,0xaa,0xa1,0x26,0xdc,0x8b,0x40,0x11,0x64,0xae,0x5c,0x71,0x3c, -0x28,0xbc,0xf9,0xb3,0xcb,0xa5,0x94,0xb2,0x8d,0x4c,0x23,0x2b,0x9b,0xde,0x2c, -0x4c,0x30,0x04,0xc6,0x88,0x10,0x2f,0x53,0xfd,0x6c,0x82,0xf1,0x13,0xfb,0xda, -0x27,0x75,0x25,0x48,0xe4,0x72,0x09,0x2a,0xee,0xb4,0x1e,0xc9,0x55,0xf5,0xf7, -0x82,0x91,0xd8,0x4b,0xe4,0x3a,0xfe,0x97,0x87,0xdf,0xfb,0x15,0x5a,0x12,0x3e, -0x12,0xe6,0xad,0x40,0x0b,0xcf,0xee,0x1a,0x44,0xe0,0x83,0xb2,0x67,0x94,0xd4, -0x2e,0x7c,0xf2,0x06,0x9d,0xb3,0x3b,0x7e,0x2f,0xda,0x25,0x66,0x7e,0xa7,0x1f, -0x45,0xd4,0xf5,0xe3,0xdf,0x2a,0xf1,0x18,0x28,0x20,0xb5,0xf8,0xf5,0x8d,0x7a, -0x2e,0x84,0xee }; -static const BYTE eeCert[] = { -0x30,0x82,0x01,0xb9,0x30,0x82,0x01,0x22,0xa0,0x03,0x02,0x01,0x02,0x02,0x01, -0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43, -0x65,0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55, -0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06, -0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d, -0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5, -0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6, -0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7, -0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b, -0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b, -0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc, -0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85, -0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2, -0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72, -0xa3,0x02,0x03,0x01,0x00,0x01,0xa3,0x23,0x30,0x21,0x30,0x1f,0x06,0x03,0x55, -0x1d,0x23,0x04,0x18,0x30,0x18,0x80,0x14,0x14,0x8c,0x16,0xbb,0xbe,0x70,0xa2, -0x28,0x89,0xa0,0x58,0xff,0x98,0xbd,0xa8,0x24,0x2b,0x8a,0xe9,0x9a,0x30,0x0d, -0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81, -0x81,0x00,0x8a,0x49,0xa9,0x86,0x5e,0xc9,0x33,0x7e,0xfd,0xab,0x64,0x1f,0x6d, -0x00,0xd7,0x9b,0xec,0xd1,0x5b,0x38,0xcc,0xd6,0xf3,0xf2,0xb4,0x75,0x70,0x00, -0x82,0x9d,0x37,0x58,0xe1,0xcd,0x2c,0x61,0xb3,0x28,0xe7,0x8a,0x00,0xbe,0x6e, -0xca,0xe8,0x55,0xd5,0xad,0x3a,0xea,0xaf,0x13,0x20,0x1c,0x44,0xfc,0xb4,0xf9, -0x29,0x2b,0xdc,0x8a,0x2d,0x1b,0x27,0x9e,0xb9,0x3b,0x4a,0x71,0x9d,0x47,0x7d, -0xf7,0x92,0x6b,0x21,0x7f,0xfa,0x88,0x79,0x94,0x33,0xf6,0xdd,0x92,0x04,0x92, -0xd6,0x5e,0x0a,0x74,0xf2,0x85,0xa6,0xd5,0x3c,0x28,0xc0,0x89,0x5d,0xda,0xf3, -0xa6,0x01,0xc2,0xe9,0xa3,0xc1,0xb7,0x21,0x08,0xba,0x18,0x07,0x45,0xeb,0x77, -0x7d,0xcd,0xc6,0xe7,0x2a,0x7b,0x46,0xd2,0x3d,0xb5 }; -static const BYTE rootSignedCRL[] = { -0x30,0x82,0x01,0x1f,0x30,0x81,0x89,0x02,0x01,0x01,0x30,0x0d,0x06,0x09,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x30,0x10,0x31,0x0e,0x30, -0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31,0x17,0x0d, -0x30,0x37,0x30,0x39,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d, -0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x14, -0x30,0x12,0x02,0x01,0x01,0x17,0x0d,0x30,0x37,0x30,0x39,0x30,0x31,0x30,0x30, -0x30,0x30,0x30,0x30,0x5a,0xa0,0x2f,0x30,0x2d,0x30,0x0a,0x06,0x03,0x55,0x1d, -0x14,0x04,0x03,0x02,0x01,0x01,0x30,0x1f,0x06,0x03,0x55,0x1d,0x23,0x04,0x18, -0x30,0x18,0x80,0x14,0x14,0x8c,0x16,0xbb,0xbe,0x70,0xa2,0x28,0x89,0xa0,0x58, -0xff,0x98,0xbd,0xa8,0x24,0x2b,0x8a,0xe9,0x9a,0x30,0x0d,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0xa3,0xcf, -0x17,0x5d,0x7a,0x08,0xab,0x11,0x1a,0xbd,0x5c,0xde,0x9a,0x22,0x92,0x38,0xe6, -0x96,0xcc,0xb1,0xc5,0x42,0x86,0xa6,0xae,0xad,0xa3,0x1a,0x2b,0xa0,0xb0,0x65, -0xaa,0x9c,0xd7,0x2d,0x44,0x8c,0xae,0x61,0xc7,0x30,0x17,0x89,0x84,0x3b,0x4a, -0x8f,0x17,0x08,0x06,0x37,0x1c,0xf7,0x2d,0x4e,0x47,0x07,0x61,0x50,0xd9,0x06, -0xd1,0x46,0xed,0x0a,0xbb,0xc3,0x9b,0x36,0x0b,0xa7,0x27,0x2f,0x2b,0x55,0xce, -0x2a,0xa5,0x60,0xc6,0x53,0x28,0xe8,0xee,0xad,0x0e,0x2b,0xe8,0xd7,0x5f,0xc9, -0xa5,0xed,0xf9,0x77,0xb0,0x3c,0x81,0xcf,0xcc,0x49,0xb2,0x1a,0xc3,0xfd,0x34, -0xd5,0xbc,0xb0,0xd5,0xa5,0x9c,0x1b,0x72,0xc3,0x0f,0xa3,0xe3,0x3c,0xf0,0xc3, -0x91,0xe8,0x93,0x4f,0xd4,0x2f }; - -static void testVerifyRevocation(void) -{ - BOOL ret; - CERT_REVOCATION_STATUS status = { 0 }; - PCCERT_CONTEXT certs[2]; - CERT_REVOCATION_PARA revPara = { sizeof(revPara), 0 }; - - /* Crash - ret = CertVerifyRevocation(0, 0, 0, NULL, 0, NULL, NULL); - */ - SetLastError(0xdeadbeef); - ret = CertVerifyRevocation(0, 0, 0, NULL, 0, NULL, &status); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - status.cbSize = sizeof(status); - ret = CertVerifyRevocation(0, 0, 0, NULL, 0, NULL, &status); - ok(ret, "CertVerifyRevocation failed: %08x\n", GetLastError()); - ret = CertVerifyRevocation(0, 2, 0, NULL, 0, NULL, &status); - ok(ret, "CertVerifyRevocation failed: %08x\n", GetLastError()); - ret = CertVerifyRevocation(2, 0, 0, NULL, 0, NULL, &status); - ok(ret, "CertVerifyRevocation failed: %08x\n", GetLastError()); - certs[0] = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, - sizeof(bigCert)); - SetLastError(0xdeadbeef); - ret = CertVerifyRevocation(0, 0, 1, (void **)certs, 0, NULL, &status); - ok(!ret && GetLastError() == CRYPT_E_NO_REVOCATION_DLL, - "Expected CRYPT_E_NO_REVOCATION_DLL, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CertVerifyRevocation(0, 2, 1, (void **)certs, 0, NULL, &status); - ok(!ret && GetLastError() == CRYPT_E_NO_REVOCATION_DLL, - "Expected CRYPT_E_NO_REVOCATION_DLL, got %08x\n", GetLastError()); - - CertFreeCertificateContext(certs[0]); - - certs[0] = CertCreateCertificateContext(X509_ASN_ENCODING, - rootWithKeySignAndCRLSign, sizeof(rootWithKeySignAndCRLSign)); - certs[1] = CertCreateCertificateContext(X509_ASN_ENCODING, - eeCert, sizeof(eeCert)); - /* The root cert itself can't be checked for revocation */ - SetLastError(0xdeadbeef); - ret = CertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, - 1, (void **)certs, 0, NULL, &status); - ok(!ret && GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", GetLastError()); - ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", status.dwError); - ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex); - /* Neither can the end cert */ - SetLastError(0xdeadbeef); - ret = CertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, - 1, (void **)&certs[1], 0, NULL, &status); - ok(!ret && (GetLastError() == CRYPT_E_NO_REVOCATION_CHECK /* Win9x */ || - GetLastError() == CRYPT_E_REVOCATION_OFFLINE), - "expected CRYPT_E_NO_REVOCATION_CHECK or CRYPT_E_REVOCATION_OFFLINE, got %08x\n", - GetLastError()); - ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK /* Win9x */ || - status.dwError == CRYPT_E_REVOCATION_OFFLINE, - "expected CRYPT_E_NO_REVOCATION_CHECK or CRYPT_E_REVOCATION_OFFLINE, got %08x\n", - status.dwError); - ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex); - /* Both certs together can't, either (they're not CRLs) */ - SetLastError(0xdeadbeef); - ret = CertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, - 2, (void **)certs, 0, NULL, &status); - ok(!ret && (GetLastError() == CRYPT_E_NO_REVOCATION_CHECK || - GetLastError() == CRYPT_E_REVOCATION_OFFLINE /* WinME */), - "expected CRYPT_E_NO_REVOCATION_CHECK or CRYPT_E_REVOCATION_OFFLINE, got %08x\n", - GetLastError()); - ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK || - status.dwError == CRYPT_E_REVOCATION_OFFLINE /* WinME */, - "expected CRYPT_E_NO_REVOCATION_CHECK or CRYPT_E_REVOCATION_OFFLINE, got %08x\n", - status.dwError); - ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex); - ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex); - /* Now add a CRL to the hCrlStore */ - revPara.hCrlStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - CertAddEncodedCRLToStore(revPara.hCrlStore, X509_ASN_ENCODING, - rootSignedCRL, sizeof(rootSignedCRL), CERT_STORE_ADD_ALWAYS, NULL); - SetLastError(0xdeadbeef); - ret = CertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, - 2, (void **)certs, 0, &revPara, &status); - ok(!ret && (GetLastError() == CRYPT_E_NO_REVOCATION_CHECK || - GetLastError() == CRYPT_E_REVOCATION_OFFLINE /* WinME */), - "expected CRYPT_E_NO_REVOCATION_CHECK or CRYPT_E_REVOCATION_OFFLINE, got %08x\n", - GetLastError()); - ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK || - status.dwError == CRYPT_E_REVOCATION_OFFLINE /* WinME */, - "expected CRYPT_E_NO_REVOCATION_CHECK or CRYPT_E_REVOCATION_OFFLINE, got %08x\n", - status.dwError); - ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex); - /* Specifying CERT_VERIFY_REV_CHAIN_FLAG doesn't change things either */ - SetLastError(0xdeadbeef); - ret = CertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, - 2, (void **)certs, CERT_VERIFY_REV_CHAIN_FLAG, &revPara, &status); - ok(!ret && GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", GetLastError()); - ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", status.dwError); - ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex); - /* Again, specifying the issuer cert: no change */ - revPara.pIssuerCert = certs[0]; - SetLastError(0xdeadbeef); - ret = CertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, - 1, (void **)&certs[1], 0, &revPara, &status); - /* Win2k thinks the cert is revoked, and it is, except the CRL is out of - * date, hence the revocation status should be unknown. - */ - ok(!ret && (GetLastError() == CRYPT_E_NO_REVOCATION_CHECK || - broken(GetLastError() == CRYPT_E_REVOKED /* Win2k */)), - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", GetLastError()); - ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK || - broken(status.dwError == CRYPT_E_REVOKED /* Win2k */), - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", status.dwError); - ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex); - CertCloseStore(revPara.hCrlStore, 0); - CertFreeCertificateContext(certs[1]); - CertFreeCertificateContext(certs[0]); -} - -static BYTE privKey[] = { - 0x07, 0x02, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x52, 0x53, 0x41, 0x32, 0x00, - 0x02, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x79, 0x10, 0x1c, 0xd0, 0x6b, 0x10, - 0x18, 0x30, 0x94, 0x61, 0xdc, 0x0e, 0xcb, 0x96, 0x4e, 0x21, 0x3f, 0x79, 0xcd, - 0xa9, 0x17, 0x62, 0xbc, 0xbb, 0x61, 0x4c, 0xe0, 0x75, 0x38, 0x6c, 0xf3, 0xde, - 0x60, 0x86, 0x03, 0x97, 0x65, 0xeb, 0x1e, 0x6b, 0xdb, 0x53, 0x85, 0xad, 0x68, - 0x21, 0xf1, 0x5d, 0xe7, 0x1f, 0xe6, 0x53, 0xb4, 0xbb, 0x59, 0x3e, 0x14, 0x27, - 0xb1, 0x83, 0xa7, 0x3a, 0x54, 0xe2, 0x8f, 0x65, 0x8e, 0x6a, 0x4a, 0xcf, 0x3b, - 0x1f, 0x65, 0xff, 0xfe, 0xf1, 0x31, 0x3a, 0x37, 0x7a, 0x8b, 0xcb, 0xc6, 0xd4, - 0x98, 0x50, 0x36, 0x67, 0xe4, 0xa1, 0xe8, 0x7e, 0x8a, 0xc5, 0x23, 0xf2, 0x77, - 0xf5, 0x37, 0x61, 0x49, 0x72, 0x59, 0xe8, 0x3d, 0xf7, 0x60, 0xb2, 0x77, 0xca, - 0x78, 0x54, 0x6d, 0x65, 0x9e, 0x03, 0x97, 0x1b, 0x61, 0xbd, 0x0c, 0xd8, 0x06, - 0x63, 0xe2, 0xc5, 0x48, 0xef, 0xb3, 0xe2, 0x6e, 0x98, 0x7d, 0xbd, 0x4e, 0x72, - 0x91, 0xdb, 0x31, 0x57, 0xe3, 0x65, 0x3a, 0x49, 0xca, 0xec, 0xd2, 0x02, 0x4e, - 0x22, 0x7e, 0x72, 0x8e, 0xf9, 0x79, 0x84, 0x82, 0xdf, 0x7b, 0x92, 0x2d, 0xaf, - 0xc9, 0xe4, 0x33, 0xef, 0x89, 0x5c, 0x66, 0x99, 0xd8, 0x80, 0x81, 0x47, 0x2b, - 0xb1, 0x66, 0x02, 0x84, 0x59, 0x7b, 0xc3, 0xbe, 0x98, 0x45, 0x4a, 0x3d, 0xdd, - 0xea, 0x2b, 0xdf, 0x4e, 0xb4, 0x24, 0x6b, 0xec, 0xe7, 0xd9, 0x0c, 0x45, 0xb8, - 0xbe, 0xca, 0x69, 0x37, 0x92, 0x4c, 0x38, 0x6b, 0x96, 0x6d, 0xcd, 0x86, 0x67, - 0x5c, 0xea, 0x54, 0x94, 0xa4, 0xca, 0xa4, 0x02, 0xa5, 0x21, 0x4d, 0xae, 0x40, - 0x8f, 0x9d, 0x51, 0x83, 0xf2, 0x3f, 0x33, 0xc1, 0x72, 0xb4, 0x1d, 0x94, 0x6e, - 0x7d, 0xe4, 0x27, 0x3f, 0xea, 0xff, 0xe5, 0x9b, 0xa7, 0x5e, 0x55, 0x8e, 0x0d, - 0x69, 0x1c, 0x7a, 0xff, 0x81, 0x9d, 0x53, 0x52, 0x97, 0x9a, 0x76, 0x79, 0xda, - 0x93, 0x32, 0x16, 0xec, 0x69, 0x51, 0x1a, 0x4e, 0xc3, 0xf1, 0x72, 0x80, 0x78, - 0x5e, 0x66, 0x4a, 0x8d, 0x85, 0x2f, 0x3f, 0xb2, 0xa7 }; - -static const BYTE exportedPublicKeyBlob[] = { -0x06,0x02,0x00,0x00,0x00,0xa4,0x00,0x00,0x52,0x53,0x41,0x31,0x00,0x02,0x00,0x00, -0x01,0x00,0x01,0x00,0x79,0x10,0x1c,0xd0,0x6b,0x10,0x18,0x30,0x94,0x61,0xdc,0x0e, -0xcb,0x96,0x4e,0x21,0x3f,0x79,0xcd,0xa9,0x17,0x62,0xbc,0xbb,0x61,0x4c,0xe0,0x75, -0x38,0x6c,0xf3,0xde,0x60,0x86,0x03,0x97,0x65,0xeb,0x1e,0x6b,0xdb,0x53,0x85,0xad, -0x68,0x21,0xf1,0x5d,0xe7,0x1f,0xe6,0x53,0xb4,0xbb,0x59,0x3e,0x14,0x27,0xb1,0x83, -0xa7,0x3a,0x54,0xe2 }; - -static const BYTE asnEncodedPublicKey[] = { -0x30,0x48,0x02,0x41,0x00,0xe2,0x54,0x3a,0xa7,0x83,0xb1,0x27,0x14,0x3e,0x59,0xbb, -0xb4,0x53,0xe6,0x1f,0xe7,0x5d,0xf1,0x21,0x68,0xad,0x85,0x53,0xdb,0x6b,0x1e,0xeb, -0x65,0x97,0x03,0x86,0x60,0xde,0xf3,0x6c,0x38,0x75,0xe0,0x4c,0x61,0xbb,0xbc,0x62, -0x17,0xa9,0xcd,0x79,0x3f,0x21,0x4e,0x96,0xcb,0x0e,0xdc,0x61,0x94,0x30,0x18,0x10, -0x6b,0xd0,0x1c,0x10,0x79,0x02,0x03,0x01,0x00,0x01 }; - -static void testAcquireCertPrivateKey(void) -{ - BOOL ret; - PCCERT_CONTEXT cert; - HCRYPTPROV csp; - DWORD size, keySpec; - BOOL callerFree; - CRYPT_KEY_PROV_INFO keyProvInfo; - HCRYPTKEY key; - WCHAR ms_def_prov_w[MAX_PATH]; - - if (!pCryptAcquireCertificatePrivateKey) - { - win_skip("CryptAcquireCertificatePrivateKey() is not available\n"); - return; - } - - lstrcpyW(ms_def_prov_w, MS_DEF_PROV_W); - - keyProvInfo.pwszContainerName = cspNameW; - keyProvInfo.pwszProvName = ms_def_prov_w; - keyProvInfo.dwProvType = PROV_RSA_FULL; - keyProvInfo.dwFlags = 0; - keyProvInfo.cProvParam = 0; - keyProvInfo.rgProvParam = NULL; - keyProvInfo.dwKeySpec = AT_SIGNATURE; - - pCryptAcquireContextA(NULL, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, - CRYPT_DELETEKEYSET); - - cert = CertCreateCertificateContext(X509_ASN_ENCODING, selfSignedCert, - sizeof(selfSignedCert)); - - /* Crash - ret = pCryptAcquireCertificatePrivateKey(NULL, 0, NULL, NULL, NULL, NULL); - ret = pCryptAcquireCertificatePrivateKey(NULL, 0, NULL, NULL, NULL, - &callerFree); - ret = pCryptAcquireCertificatePrivateKey(NULL, 0, NULL, NULL, &keySpec, - NULL); - ret = pCryptAcquireCertificatePrivateKey(NULL, 0, NULL, &csp, NULL, NULL); - ret = pCryptAcquireCertificatePrivateKey(NULL, 0, NULL, &csp, &keySpec, - &callerFree); - ret = pCryptAcquireCertificatePrivateKey(cert, 0, NULL, NULL, NULL, NULL); - */ - - /* Missing private key */ - ret = pCryptAcquireCertificatePrivateKey(cert, 0, NULL, &csp, NULL, NULL); - ok(!ret && GetLastError() == CRYPT_E_NO_KEY_PROPERTY, - "Expected CRYPT_E_NO_KEY_PROPERTY, got %08x\n", GetLastError()); - ret = pCryptAcquireCertificatePrivateKey(cert, 0, NULL, &csp, &keySpec, - &callerFree); - ok(!ret && GetLastError() == CRYPT_E_NO_KEY_PROPERTY, - "Expected CRYPT_E_NO_KEY_PROPERTY, got %08x\n", GetLastError()); - CertSetCertificateContextProperty(cert, CERT_KEY_PROV_INFO_PROP_ID, 0, - &keyProvInfo); - ret = pCryptAcquireCertificatePrivateKey(cert, 0, NULL, &csp, &keySpec, - &callerFree); - ok(!ret && GetLastError() == CRYPT_E_NO_KEY_PROPERTY, - "Expected CRYPT_E_NO_KEY_PROPERTY, got %08x\n", GetLastError()); - - pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, - CRYPT_NEWKEYSET); - ret = CryptImportKey(csp, privKey, sizeof(privKey), 0, 0, &key); - ok(ret, "CryptImportKey failed: %08x\n", GetLastError()); - if (ret) - { - HCRYPTPROV certCSP; - DWORD size; - CERT_KEY_CONTEXT keyContext; - - /* Don't cache provider */ - ret = pCryptAcquireCertificatePrivateKey(cert, 0, NULL, &certCSP, - &keySpec, &callerFree); - ok(ret || - broken(!ret), /* win95 */ - "CryptAcquireCertificatePrivateKey failed: %08x\n", - GetLastError()); - if (ret) - { - ok(callerFree, "Expected callerFree to be TRUE\n"); - CryptReleaseContext(certCSP, 0); - } - - ret = pCryptAcquireCertificatePrivateKey(cert, 0, NULL, &certCSP, - NULL, NULL); - ok(ret || - broken(!ret), /* win95 */ - "CryptAcquireCertificatePrivateKey failed: %08x\n", - GetLastError()); - CryptReleaseContext(certCSP, 0); - - /* Use the key prov info's caching (there shouldn't be any) */ - ret = pCryptAcquireCertificatePrivateKey(cert, - CRYPT_ACQUIRE_USE_PROV_INFO_FLAG, NULL, &certCSP, &keySpec, - &callerFree); - ok(ret || - broken(!ret), /* win95 */ - "CryptAcquireCertificatePrivateKey failed: %08x\n", - GetLastError()); - if (ret) - { - ok(callerFree, "Expected callerFree to be TRUE\n"); - CryptReleaseContext(certCSP, 0); - } - - /* Cache it (and check that it's cached) */ - ret = pCryptAcquireCertificatePrivateKey(cert, - CRYPT_ACQUIRE_CACHE_FLAG, NULL, &certCSP, &keySpec, &callerFree); - ok(ret || - broken(!ret), /* win95 */ - "CryptAcquireCertificatePrivateKey failed: %08x\n", - GetLastError()); - ok(!callerFree, "Expected callerFree to be FALSE\n"); - size = sizeof(keyContext); - ret = CertGetCertificateContextProperty(cert, CERT_KEY_CONTEXT_PROP_ID, - &keyContext, &size); - ok(ret || - broken(!ret), /* win95 */ - "CertGetCertificateContextProperty failed: %08x\n", - GetLastError()); - - /* Remove the cached provider */ - CryptReleaseContext(keyContext.hCryptProv, 0); - CertSetCertificateContextProperty(cert, CERT_KEY_CONTEXT_PROP_ID, 0, - NULL); - /* Allow caching via the key prov info */ - keyProvInfo.dwFlags = CERT_SET_KEY_CONTEXT_PROP_ID; - CertSetCertificateContextProperty(cert, CERT_KEY_PROV_INFO_PROP_ID, 0, - &keyProvInfo); - /* Now use the key prov info's caching */ - ret = pCryptAcquireCertificatePrivateKey(cert, - CRYPT_ACQUIRE_USE_PROV_INFO_FLAG, NULL, &certCSP, &keySpec, - &callerFree); - ok(ret || - broken(!ret), /* win95 */ - "CryptAcquireCertificatePrivateKey failed: %08x\n", - GetLastError()); - ok(!callerFree, "Expected callerFree to be FALSE\n"); - size = sizeof(keyContext); - ret = CertGetCertificateContextProperty(cert, CERT_KEY_CONTEXT_PROP_ID, - &keyContext, &size); - ok(ret || - broken(!ret), /* win95 */ - "CertGetCertificateContextProperty failed: %08x\n", - GetLastError()); - CryptReleaseContext(certCSP, 0); - - CryptDestroyKey(key); - } - - /* Some sanity-checking on public key exporting */ - ret = CryptImportPublicKeyInfo(csp, X509_ASN_ENCODING, - &cert->pCertInfo->SubjectPublicKeyInfo, &key); - ok(ret, "CryptImportPublicKeyInfo failed: %08x\n", GetLastError()); - if (ret) - { - ret = CryptExportKey(key, 0, PUBLICKEYBLOB, 0, NULL, &size); - ok(ret, "CryptExportKey failed: %08x\n", GetLastError()); - if (ret) - { - LPBYTE buf = HeapAlloc(GetProcessHeap(), 0, size), encodedKey; - - ret = CryptExportKey(key, 0, PUBLICKEYBLOB, 0, buf, &size); - ok(ret, "CryptExportKey failed: %08x\n", GetLastError()); - ok(size == sizeof(exportedPublicKeyBlob), "Unexpected size %d\n", - size); - ok(!memcmp(buf, exportedPublicKeyBlob, size), "Unexpected value\n"); - ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, RSA_CSP_PUBLICKEYBLOB, - buf, CRYPT_ENCODE_ALLOC_FLAG, NULL, &encodedKey, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(size == sizeof(asnEncodedPublicKey), "Unexpected size %d\n", - size); - ok(!memcmp(encodedKey, asnEncodedPublicKey, size), - "Unexpected value\n"); - LocalFree(encodedKey); - } - HeapFree(GetProcessHeap(), 0, buf); - } - CryptDestroyKey(key); - } - ret = CryptExportPublicKeyInfoEx(csp, AT_SIGNATURE, X509_ASN_ENCODING, - NULL, 0, NULL, NULL, &size); - ok(ret, "CryptExportPublicKeyInfoEx failed: %08x\n", GetLastError()); - if (ret) - { - PCERT_PUBLIC_KEY_INFO info = HeapAlloc(GetProcessHeap(), 0, size); - - ret = CryptExportPublicKeyInfoEx(csp, AT_SIGNATURE, X509_ASN_ENCODING, - NULL, 0, NULL, info, &size); - ok(ret, "CryptExportPublicKeyInfoEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(info->PublicKey.cbData == sizeof(asnEncodedPublicKey), - "Unexpected size %d\n", info->PublicKey.cbData); - ok(!memcmp(info->PublicKey.pbData, asnEncodedPublicKey, - info->PublicKey.cbData), "Unexpected value\n"); - } - HeapFree(GetProcessHeap(), 0, info); - } - - CryptReleaseContext(csp, 0); - pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, - CRYPT_DELETEKEYSET); - - CertFreeCertificateContext(cert); -} - -static void testGetPublicKeyLength(void) -{ - static char oid_rsa_rsa[] = szOID_RSA_RSA; - static char oid_rsa_dh[] = szOID_RSA_DH; - static char bogusOID[] = "1.2.3"; - DWORD ret; - CERT_PUBLIC_KEY_INFO info = { { 0 } }; - BYTE bogusKey[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; - BYTE key[] = { 0x30,0x0f,0x02,0x08,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07, - 0x02,0x03,0x01,0x00,0x01 }; - - /* Crashes - ret = CertGetPublicKeyLength(0, NULL); - */ - /* With an empty public key info */ - SetLastError(0xdeadbeef); - ret = CertGetPublicKeyLength(0, &info); - ok(ret == 0 && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected length 0 and ERROR_FILE_NOT_FOUND, got length %d, %08x\n", - ret, GetLastError()); - SetLastError(0xdeadbeef); - ret = CertGetPublicKeyLength(X509_ASN_ENCODING, &info); - ok(ret == 0 && - (GetLastError() == CRYPT_E_ASN1_EOD || - GetLastError() == OSS_BAD_ARG), /* win9x */ - "Expected length 0 and CRYPT_E_ASN1_EOD, got length %d, %08x\n", - ret, GetLastError()); - /* With a nearly-empty public key info */ - info.Algorithm.pszObjId = oid_rsa_rsa; - SetLastError(0xdeadbeef); - ret = CertGetPublicKeyLength(0, &info); - ok(ret == 0 && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected length 0 and ERROR_FILE_NOT_FOUND, got length %d, %08x\n", - ret, GetLastError()); - SetLastError(0xdeadbeef); - ret = CertGetPublicKeyLength(X509_ASN_ENCODING, &info); - ok(ret == 0 && - (GetLastError() == CRYPT_E_ASN1_EOD || - GetLastError() == OSS_BAD_ARG), /* win9x */ - "Expected length 0 and CRYPT_E_ASN1_EOD, got length %d, %08x\n", - ret, GetLastError()); - /* With a bogus key */ - info.PublicKey.cbData = sizeof(bogusKey); - info.PublicKey.pbData = bogusKey; - SetLastError(0xdeadbeef); - ret = CertGetPublicKeyLength(0, &info); - ok(ret == 0 && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected length 0 and ERROR_FILE_NOT_FOUND, got length %d, %08x\n", - ret, GetLastError()); - SetLastError(0xdeadbeef); - ret = CertGetPublicKeyLength(X509_ASN_ENCODING, &info); - ok(ret == 0 && - (GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == OSS_PDU_MISMATCH), /* win9x */ - "Expected length 0 and CRYPT_E_ASN1_BADTAGTAG, got length %d, %08x\n", - ret, GetLastError()); - /* With a believable RSA key but a bogus OID */ - info.Algorithm.pszObjId = bogusOID; - info.PublicKey.cbData = sizeof(key); - info.PublicKey.pbData = key; - SetLastError(0xdeadbeef); - ret = CertGetPublicKeyLength(0, &info); - ok(ret == 0 && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected length 0 and ERROR_FILE_NOT_FOUND, got length %d, %08x\n", - ret, GetLastError()); - SetLastError(0xdeadbeef); - ret = CertGetPublicKeyLength(X509_ASN_ENCODING, &info); - ok(ret == 56 || broken(ret == 0 && GetLastError() == NTE_BAD_LEN) /* Win7 */, - "Expected length 56, got %d\n", ret); - /* An RSA key with the DH OID */ - info.Algorithm.pszObjId = oid_rsa_dh; - SetLastError(0xdeadbeef); - ret = CertGetPublicKeyLength(X509_ASN_ENCODING, &info); - ok(ret == 0 && - (GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == E_INVALIDARG), /* win9x */ - "Expected length 0 and CRYPT_E_ASN1_BADTAG, got length %d, %08x\n", - ret, GetLastError()); - /* With the RSA OID */ - info.Algorithm.pszObjId = oid_rsa_rsa; - SetLastError(0xdeadbeef); - ret = CertGetPublicKeyLength(X509_ASN_ENCODING, &info); - ok(ret == 56 || broken(ret == 0 && GetLastError() == NTE_BAD_LEN) /* Win7 */, - "Expected length 56, got %d\n", ret); - /* With the RSA OID and a message encoding */ - info.Algorithm.pszObjId = oid_rsa_rsa; - SetLastError(0xdeadbeef); - ret = CertGetPublicKeyLength(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, &info); - ok(ret == 56 || broken(ret == 0 && GetLastError() == NTE_BAD_LEN) /* Win7 */, - "Expected length 56, got %d\n", ret); -} - -START_TEST(cert) -{ - init_function_pointers(); - - testAddCert(); - testCertProperties(); - testDupCert(); - testFindCert(); - testGetSubjectCert(); - testGetIssuerCert(); - - testCryptHashCert(); - testCertSigs(); - testSignAndEncodeCert(); - testCreateSelfSignCert(); - testIntendedKeyUsage(); - testKeyUsage(); - testGetValidUsages(); - testCompareCertName(); - testCompareIntegerBlob(); - testComparePublicKeyInfo(); - testHashPublicKeyInfo(); - testHashToBeSigned(); - testCompareCert(); - testVerifySubjectCert(); - testVerifyRevocation(); - testAcquireCertPrivateKey(); - testGetPublicKeyLength(); - testIsRDNAttrsInCertificateName(); -} diff --git a/rostests/winetests/crypt32/chain.c b/rostests/winetests/crypt32/chain.c deleted file mode 100644 index a59a95a0bb1..00000000000 --- a/rostests/winetests/crypt32/chain.c +++ /dev/null @@ -1,4307 +0,0 @@ -/* - * crypt32 certificate chain functions tests - * - * Copyright 2006 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 - */ -#include -#include -#include -#include -#include -#include -#include - -#include "wine/test.h" - -static const BYTE selfSignedCert[] = { - 0x30, 0x82, 0x01, 0x1f, 0x30, 0x81, 0xce, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, - 0x10, 0xeb, 0x0d, 0x57, 0x2a, 0x9c, 0x09, 0xba, 0xa4, 0x4a, 0xb7, 0x25, 0x49, - 0xd9, 0x3e, 0xb5, 0x73, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02, 0x1d, - 0x05, 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, - 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, - 0x1e, 0x17, 0x0d, 0x30, 0x36, 0x30, 0x36, 0x32, 0x39, 0x30, 0x35, 0x30, 0x30, - 0x34, 0x36, 0x5a, 0x17, 0x0d, 0x30, 0x37, 0x30, 0x36, 0x32, 0x39, 0x31, 0x31, - 0x30, 0x30, 0x34, 0x36, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, - 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, - 0x67, 0x00, 0x30, 0x5c, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, - 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x4b, 0x00, 0x30, 0x48, 0x02, 0x41, - 0x00, 0xe2, 0x54, 0x3a, 0xa7, 0x83, 0xb1, 0x27, 0x14, 0x3e, 0x59, 0xbb, 0xb4, - 0x53, 0xe6, 0x1f, 0xe7, 0x5d, 0xf1, 0x21, 0x68, 0xad, 0x85, 0x53, 0xdb, 0x6b, - 0x1e, 0xeb, 0x65, 0x97, 0x03, 0x86, 0x60, 0xde, 0xf3, 0x6c, 0x38, 0x75, 0xe0, - 0x4c, 0x61, 0xbb, 0xbc, 0x62, 0x17, 0xa9, 0xcd, 0x79, 0x3f, 0x21, 0x4e, 0x96, - 0xcb, 0x0e, 0xdc, 0x61, 0x94, 0x30, 0x18, 0x10, 0x6b, 0xd0, 0x1c, 0x10, 0x79, - 0x02, 0x03, 0x01, 0x00, 0x01, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02, - 0x1d, 0x05, 0x00, 0x03, 0x41, 0x00, 0x25, 0x90, 0x53, 0x34, 0xd9, 0x56, 0x41, - 0x5e, 0xdb, 0x7e, 0x01, 0x36, 0xec, 0x27, 0x61, 0x5e, 0xb7, 0x4d, 0x90, 0x66, - 0xa2, 0xe1, 0x9d, 0x58, 0x76, 0xd4, 0x9c, 0xba, 0x2c, 0x84, 0xc6, 0x83, 0x7a, - 0x22, 0x0d, 0x03, 0x69, 0x32, 0x1a, 0x6d, 0xcb, 0x0c, 0x15, 0xb3, 0x6b, 0xc7, - 0x0a, 0x8c, 0xb4, 0x5c, 0x34, 0x78, 0xe0, 0x3c, 0x9c, 0xe9, 0xf3, 0x30, 0x9f, - 0xa8, 0x76, 0x57, 0x92, 0x36 }; - -static BOOL (WINAPI *pCertCreateCertificateChainEngine)(PCERT_CHAIN_ENGINE_CONFIG,HCERTCHAINENGINE*); -static BOOL (WINAPI *pCertGetCertificateChain)(HCERTCHAINENGINE,PCCERT_CONTEXT,LPFILETIME,HCERTSTORE,PCERT_CHAIN_PARA,DWORD,LPVOID,PCCERT_CHAIN_CONTEXT*); -static VOID (WINAPI *pCertFreeCertificateChain)(PCCERT_CHAIN_CONTEXT); -static VOID (WINAPI *pCertFreeCertificateChainEngine)(HCERTCHAINENGINE); -static BOOL (WINAPI *pCertVerifyCertificateChainPolicy)(LPCSTR,PCCERT_CHAIN_CONTEXT,PCERT_CHAIN_POLICY_PARA,PCERT_CHAIN_POLICY_STATUS); - -#define IS_INTOID(x) (((ULONG_PTR)(x) >> 16) == 0) - -typedef struct _CERT_CHAIN_ENGINE_CONFIG_NO_EXCLUSIVE_ROOT -{ - DWORD cbSize; - HCERTSTORE hRestrictedRoot; - HCERTSTORE hRestrictedTrust; - HCERTSTORE hRestrictedOther; - DWORD cAdditionalStore; - HCERTSTORE *rghAdditionalStore; - DWORD dwFlags; - DWORD dwUrlRetrievalTimeout; - DWORD MaximumCachedCertificates; - DWORD CycleDetectionModulus; -} CERT_CHAIN_ENGINE_CONFIG_NO_EXCLUSIVE_ROOT; - -static void testCreateCertChainEngine(void) -{ - BOOL ret; - CERT_CHAIN_ENGINE_CONFIG_NO_EXCLUSIVE_ROOT config = { 0 }; - CERT_CHAIN_ENGINE_CONFIG *pConfig = (CERT_CHAIN_ENGINE_CONFIG *)&config; - HCERTCHAINENGINE engine; - HCERTSTORE store; - - if (!pCertCreateCertificateChainEngine || !pCertFreeCertificateChainEngine) - { - win_skip("Cert*CertificateChainEngine() functions are not available\n"); - return; - } - - /* Crash - ret = pCertCreateCertificateChainEngine(NULL, NULL); - ret = pCertCreateCertificateChainEngine(NULL, &engine); - ret = pCertCreateCertificateChainEngine(pConfig, NULL); - */ - ret = pCertCreateCertificateChainEngine(pConfig, &engine); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* Crashes - config.cbSize = sizeof(config); - ret = pCertCreateCertificateChainEngine(pConfig, NULL); - */ - config.cbSize = sizeof(config); - ret = pCertCreateCertificateChainEngine(pConfig, &engine); - ok(ret, "CertCreateCertificateChainEngine failed: %08x\n", GetLastError()); - pCertFreeCertificateChainEngine(engine); - config.dwFlags = 0xff000000; - ret = pCertCreateCertificateChainEngine(pConfig, &engine); - ok(ret, "CertCreateCertificateChainEngine failed: %08x\n", GetLastError()); - pCertFreeCertificateChainEngine(engine); - - /* Creating a cert with no root certs at all is allowed.. */ - store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - config.hRestrictedRoot = store; - ret = pCertCreateCertificateChainEngine(pConfig, &engine); - ok(ret, "CertCreateCertificateChainEngine failed: %08x\n", GetLastError()); - pCertFreeCertificateChainEngine(engine); - - /* but creating one with a restricted root with a cert that isn't a member - * of the Root store isn't allowed. - */ - CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, selfSignedCert, - sizeof(selfSignedCert), CERT_STORE_ADD_ALWAYS, NULL); - ret = pCertCreateCertificateChainEngine(pConfig, &engine); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - - CertCloseStore(store, 0); -} - -static const BYTE bigCert[] = { 0x30, 0x7a, 0x02, 0x01, 0x01, 0x30, 0x02, 0x06, - 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, - 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x22, - 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, - 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, - 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, - 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, 0x01, - 0x00, 0xa3, 0x16, 0x30, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, - 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x01 }; -static const BYTE iTunesCert0[] = { -0x30,0x82,0x04,0xbf,0x30,0x82,0x04,0x28,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x41,0x91,0xa1,0x5a,0x39,0x78,0xdf,0xcf,0x49,0x65,0x66,0x38,0x1d,0x4c,0x75, -0xc2,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x5f,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55, -0x53,0x31,0x17,0x30,0x15,0x06,0x03,0x55,0x04,0x0a,0x13,0x0e,0x56,0x65,0x72, -0x69,0x53,0x69,0x67,0x6e,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x37,0x30,0x35, -0x06,0x03,0x55,0x04,0x0b,0x13,0x2e,0x43,0x6c,0x61,0x73,0x73,0x20,0x33,0x20, -0x50,0x75,0x62,0x6c,0x69,0x63,0x20,0x50,0x72,0x69,0x6d,0x61,0x72,0x79,0x20, -0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x41, -0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x30,0x1e,0x17,0x0d,0x30,0x34,0x30, -0x37,0x31,0x36,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x31,0x34,0x30, -0x37,0x31,0x35,0x32,0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x81,0xb4,0x31,0x0b, -0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x17,0x30,0x15, -0x06,0x03,0x55,0x04,0x0a,0x13,0x0e,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e, -0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x1f,0x30,0x1d,0x06,0x03,0x55,0x04,0x0b, -0x13,0x16,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x20,0x54,0x72,0x75,0x73, -0x74,0x20,0x4e,0x65,0x74,0x77,0x6f,0x72,0x6b,0x31,0x3b,0x30,0x39,0x06,0x03, -0x55,0x04,0x0b,0x13,0x32,0x54,0x65,0x72,0x6d,0x73,0x20,0x6f,0x66,0x20,0x75, -0x73,0x65,0x20,0x61,0x74,0x20,0x68,0x74,0x74,0x70,0x73,0x3a,0x2f,0x2f,0x77, -0x77,0x77,0x2e,0x76,0x65,0x72,0x69,0x73,0x69,0x67,0x6e,0x2e,0x63,0x6f,0x6d, -0x2f,0x72,0x70,0x61,0x20,0x28,0x63,0x29,0x30,0x34,0x31,0x2e,0x30,0x2c,0x06, -0x03,0x55,0x04,0x03,0x13,0x25,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x20, -0x43,0x6c,0x61,0x73,0x73,0x20,0x33,0x20,0x43,0x6f,0x64,0x65,0x20,0x53,0x69, -0x67,0x6e,0x69,0x6e,0x67,0x20,0x32,0x30,0x30,0x34,0x20,0x43,0x41,0x30,0x82, -0x01,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01, -0x05,0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01,0x0a,0x02,0x82,0x01,0x01, -0x00,0xbe,0xbc,0xee,0xbc,0x7e,0xef,0x83,0xeb,0xe0,0x37,0x4f,0xfb,0x03,0x10, -0x38,0xbe,0x08,0xd2,0x8c,0x7d,0x9d,0xfa,0x92,0x7f,0x19,0x0c,0xc2,0x6b,0xee, -0x42,0x52,0x8c,0xde,0xd3,0x1c,0x48,0x13,0x25,0xea,0xc1,0x63,0x7a,0xf9,0x51, -0x65,0xee,0xd3,0xaa,0x3b,0xf5,0xf0,0x94,0x9c,0x2b,0xfb,0xf2,0x66,0xd4,0x24, -0xda,0xf7,0xf5,0x9f,0x6e,0x19,0x39,0x36,0xbc,0xd0,0xa3,0x76,0x08,0x1e,0x22, -0x27,0x24,0x6c,0x38,0x91,0x27,0xe2,0x84,0x49,0xae,0x1b,0x8a,0xa1,0xfd,0x25, -0x82,0x2c,0x10,0x30,0xe8,0x71,0xab,0x28,0xe8,0x77,0x4a,0x51,0xf1,0xec,0xcd, -0xf8,0xf0,0x54,0xd4,0x6f,0xc0,0xe3,0x6d,0x0a,0x8f,0xd9,0xd8,0x64,0x8d,0x63, -0xb2,0x2d,0x4e,0x27,0xf6,0x85,0x0e,0xfe,0x6d,0xe3,0x29,0x99,0xe2,0x85,0x47, -0x7c,0x2d,0x86,0x7f,0xe8,0x57,0x8f,0xad,0x67,0xc2,0x33,0x32,0x91,0x13,0x20, -0xfc,0xa9,0x23,0x14,0x9a,0x6d,0xc2,0x84,0x4b,0x76,0x68,0x04,0xd5,0x71,0x2c, -0x5d,0x21,0xfa,0x88,0x0d,0x26,0xfd,0x1f,0x2d,0x91,0x2b,0xe7,0x01,0x55,0x4d, -0xf2,0x6d,0x35,0x28,0x82,0xdf,0xd9,0x6b,0x5c,0xb6,0xd6,0xd9,0xaa,0x81,0xfd, -0x5f,0xcd,0x83,0xba,0x63,0x9d,0xd0,0x22,0xfc,0xa9,0x3b,0x42,0x69,0xb2,0x8e, -0x3a,0xb5,0xbc,0xb4,0x9e,0x0f,0x5e,0xc4,0xea,0x2c,0x82,0x8b,0x28,0xfd,0x53, -0x08,0x96,0xdd,0xb5,0x01,0x20,0xd1,0xf9,0xa5,0x18,0xe7,0xc0,0xee,0x51,0x70, -0x37,0xe1,0xb6,0x05,0x48,0x52,0x48,0x6f,0x38,0xea,0xc3,0xe8,0x6c,0x7b,0x44, -0x84,0xbb,0x02,0x03,0x01,0x00,0x01,0xa3,0x82,0x01,0xa0,0x30,0x82,0x01,0x9c, -0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01, -0x01,0xff,0x02,0x01,0x00,0x30,0x44,0x06,0x03,0x55,0x1d,0x20,0x04,0x3d,0x30, -0x3b,0x30,0x39,0x06,0x0b,0x60,0x86,0x48,0x01,0x86,0xf8,0x45,0x01,0x07,0x17, -0x03,0x30,0x2a,0x30,0x28,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x02,0x01, -0x16,0x1c,0x68,0x74,0x74,0x70,0x73,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x76, -0x65,0x72,0x69,0x73,0x69,0x67,0x6e,0x2e,0x63,0x6f,0x6d,0x2f,0x72,0x70,0x61, -0x30,0x31,0x06,0x03,0x55,0x1d,0x1f,0x04,0x2a,0x30,0x28,0x30,0x26,0xa0,0x24, -0xa0,0x22,0x86,0x20,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x63,0x72,0x6c,0x2e, -0x76,0x65,0x72,0x69,0x73,0x69,0x67,0x6e,0x2e,0x63,0x6f,0x6d,0x2f,0x70,0x63, -0x61,0x33,0x2e,0x63,0x72,0x6c,0x30,0x1d,0x06,0x03,0x55,0x1d,0x25,0x04,0x16, -0x30,0x14,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x03,0x02,0x06,0x08,0x2b, -0x06,0x01,0x05,0x05,0x07,0x03,0x03,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01, -0x01,0xff,0x04,0x04,0x03,0x02,0x01,0x06,0x30,0x11,0x06,0x09,0x60,0x86,0x48, -0x01,0x86,0xf8,0x42,0x01,0x01,0x04,0x04,0x03,0x02,0x00,0x01,0x30,0x29,0x06, -0x03,0x55,0x1d,0x11,0x04,0x22,0x30,0x20,0xa4,0x1e,0x30,0x1c,0x31,0x1a,0x30, -0x18,0x06,0x03,0x55,0x04,0x03,0x13,0x11,0x43,0x6c,0x61,0x73,0x73,0x33,0x43, -0x41,0x32,0x30,0x34,0x38,0x2d,0x31,0x2d,0x34,0x33,0x30,0x1d,0x06,0x03,0x55, -0x1d,0x0e,0x04,0x16,0x04,0x14,0x08,0xf5,0x51,0xe8,0xfb,0xfe,0x3d,0x3d,0x64, -0x36,0x7c,0x68,0xcf,0x5b,0x78,0xa8,0xdf,0xb9,0xc5,0x37,0x30,0x81,0x80,0x06, -0x03,0x55,0x1d,0x23,0x04,0x79,0x30,0x77,0xa1,0x63,0xa4,0x61,0x30,0x5f,0x31, -0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x17,0x30, -0x15,0x06,0x03,0x55,0x04,0x0a,0x13,0x0e,0x56,0x65,0x72,0x69,0x53,0x69,0x67, -0x6e,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x37,0x30,0x35,0x06,0x03,0x55,0x04, -0x0b,0x13,0x2e,0x43,0x6c,0x61,0x73,0x73,0x20,0x33,0x20,0x50,0x75,0x62,0x6c, -0x69,0x63,0x20,0x50,0x72,0x69,0x6d,0x61,0x72,0x79,0x20,0x43,0x65,0x72,0x74, -0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x41,0x75,0x74,0x68,0x6f, -0x72,0x69,0x74,0x79,0x82,0x10,0x70,0xba,0xe4,0x1d,0x10,0xd9,0x29,0x34,0xb6, -0x38,0xca,0x7b,0x03,0xcc,0xba,0xbf,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86, -0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0xae,0x3a,0x17,0xb8, -0x4a,0x7b,0x55,0xfa,0x64,0x55,0xec,0x40,0xa4,0xed,0x49,0x41,0x90,0x99,0x9c, -0x89,0xbc,0xaf,0x2e,0x1d,0xca,0x78,0x23,0xf9,0x1c,0x19,0x0f,0x7f,0xeb,0x68, -0xbc,0x32,0xd9,0x88,0x38,0xde,0xdc,0x3f,0xd3,0x89,0xb4,0x3f,0xb1,0x82,0x96, -0xf1,0xa4,0x5a,0xba,0xed,0x2e,0x26,0xd3,0xde,0x7c,0x01,0x6e,0x00,0x0a,0x00, -0xa4,0x06,0x92,0x11,0x48,0x09,0x40,0xf9,0x1c,0x18,0x79,0x67,0x23,0x24,0xe0, -0xbb,0xd5,0xe1,0x50,0xae,0x1b,0xf5,0x0e,0xdd,0xe0,0x2e,0x81,0xcd,0x80,0xa3, -0x6c,0x52,0x4f,0x91,0x75,0x55,0x8a,0xba,0x22,0xf2,0xd2,0xea,0x41,0x75,0x88, -0x2f,0x63,0x55,0x7d,0x1e,0x54,0x5a,0x95,0x59,0xca,0xd9,0x34,0x81,0xc0,0x5f, -0x5e,0xf6,0x7a,0xb5 }; -static const BYTE iTunesCert1[] = { -0x30,0x82,0x04,0xf1,0x30,0x82,0x03,0xd9,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x0f,0x1a,0xa0,0xe0,0x9b,0x9b,0x61,0xa6,0xb6,0xfe,0x40,0xd2,0xdf,0x6a,0xf6, -0x8d,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x81,0xb4,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02, -0x55,0x53,0x31,0x17,0x30,0x15,0x06,0x03,0x55,0x04,0x0a,0x13,0x0e,0x56,0x65, -0x72,0x69,0x53,0x69,0x67,0x6e,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x1f,0x30, -0x1d,0x06,0x03,0x55,0x04,0x0b,0x13,0x16,0x56,0x65,0x72,0x69,0x53,0x69,0x67, -0x6e,0x20,0x54,0x72,0x75,0x73,0x74,0x20,0x4e,0x65,0x74,0x77,0x6f,0x72,0x6b, -0x31,0x3b,0x30,0x39,0x06,0x03,0x55,0x04,0x0b,0x13,0x32,0x54,0x65,0x72,0x6d, -0x73,0x20,0x6f,0x66,0x20,0x75,0x73,0x65,0x20,0x61,0x74,0x20,0x68,0x74,0x74, -0x70,0x73,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x76,0x65,0x72,0x69,0x73,0x69, -0x67,0x6e,0x2e,0x63,0x6f,0x6d,0x2f,0x72,0x70,0x61,0x20,0x28,0x63,0x29,0x30, -0x34,0x31,0x2e,0x30,0x2c,0x06,0x03,0x55,0x04,0x03,0x13,0x25,0x56,0x65,0x72, -0x69,0x53,0x69,0x67,0x6e,0x20,0x43,0x6c,0x61,0x73,0x73,0x20,0x33,0x20,0x43, -0x6f,0x64,0x65,0x20,0x53,0x69,0x67,0x6e,0x69,0x6e,0x67,0x20,0x32,0x30,0x30, -0x34,0x20,0x43,0x41,0x30,0x1e,0x17,0x0d,0x30,0x36,0x30,0x31,0x31,0x37,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x38,0x30,0x31,0x32,0x32,0x32, -0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x81,0xb4,0x31,0x0b,0x30,0x09,0x06,0x03, -0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04, -0x08,0x13,0x0a,0x43,0x61,0x6c,0x69,0x66,0x6f,0x72,0x6e,0x69,0x61,0x31,0x12, -0x30,0x10,0x06,0x03,0x55,0x04,0x07,0x13,0x09,0x43,0x75,0x70,0x65,0x72,0x74, -0x69,0x6e,0x6f,0x31,0x1d,0x30,0x1b,0x06,0x03,0x55,0x04,0x0a,0x14,0x14,0x41, -0x70,0x70,0x6c,0x65,0x20,0x43,0x6f,0x6d,0x70,0x75,0x74,0x65,0x72,0x2c,0x20, -0x49,0x6e,0x63,0x2e,0x31,0x3e,0x30,0x3c,0x06,0x03,0x55,0x04,0x0b,0x13,0x35, -0x44,0x69,0x67,0x69,0x74,0x61,0x6c,0x20,0x49,0x44,0x20,0x43,0x6c,0x61,0x73, -0x73,0x20,0x33,0x20,0x2d,0x20,0x4d,0x69,0x63,0x72,0x6f,0x73,0x6f,0x66,0x74, -0x20,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x20,0x56,0x61,0x6c,0x69,0x64, -0x61,0x74,0x69,0x6f,0x6e,0x20,0x76,0x32,0x31,0x1d,0x30,0x1b,0x06,0x03,0x55, -0x04,0x03,0x14,0x14,0x41,0x70,0x70,0x6c,0x65,0x20,0x43,0x6f,0x6d,0x70,0x75, -0x74,0x65,0x72,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x30,0x81,0x9f,0x30,0x0d,0x06, -0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d, -0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xd3,0xab,0x3b,0x7f,0xec,0x48,0x84, -0xce,0xa8,0x1a,0x12,0xf3,0x3c,0x87,0xcb,0x24,0x58,0x96,0x02,0x87,0x66,0x49, -0xeb,0x89,0xee,0x79,0x44,0x70,0x8d,0xe7,0xd4,0x1f,0x30,0x92,0xc0,0x9c,0x35, -0x78,0xc0,0xaf,0x1c,0xb6,0x28,0xd3,0xe0,0xe0,0x9d,0xd3,0x49,0x76,0x73,0x57, -0x19,0x4d,0x8d,0x70,0x85,0x64,0x4d,0x1d,0xc6,0x02,0x3e,0xe5,0x2c,0x66,0x07, -0xd2,0x27,0x4b,0xd6,0xc8,0x3c,0x93,0xb6,0x15,0x0c,0xde,0x5b,0xd7,0x93,0xdd, -0xbe,0x85,0x62,0x34,0x17,0x8a,0x05,0x60,0xf0,0x8a,0x1c,0x5a,0x40,0x21,0x8d, -0x51,0x6c,0xb0,0x62,0xd8,0xb5,0xd4,0xf9,0xb1,0xd0,0x58,0x7a,0x7a,0x82,0x55, -0xb3,0xf9,0x53,0x71,0xde,0xd2,0xc9,0x37,0x8c,0xf6,0x5a,0x1f,0x2d,0xcd,0x7c, -0x67,0x02,0x03,0x01,0x00,0x01,0xa3,0x82,0x01,0x7f,0x30,0x82,0x01,0x7b,0x30, -0x09,0x06,0x03,0x55,0x1d,0x13,0x04,0x02,0x30,0x00,0x30,0x0e,0x06,0x03,0x55, -0x1d,0x0f,0x01,0x01,0xff,0x04,0x04,0x03,0x02,0x07,0x80,0x30,0x40,0x06,0x03, -0x55,0x1d,0x1f,0x04,0x39,0x30,0x37,0x30,0x35,0xa0,0x33,0xa0,0x31,0x86,0x2f, -0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x43,0x53,0x43,0x33,0x2d,0x32,0x30,0x30, -0x34,0x2d,0x63,0x72,0x6c,0x2e,0x76,0x65,0x72,0x69,0x73,0x69,0x67,0x6e,0x2e, -0x63,0x6f,0x6d,0x2f,0x43,0x53,0x43,0x33,0x2d,0x32,0x30,0x30,0x34,0x2e,0x63, -0x72,0x6c,0x30,0x44,0x06,0x03,0x55,0x1d,0x20,0x04,0x3d,0x30,0x3b,0x30,0x39, -0x06,0x0b,0x60,0x86,0x48,0x01,0x86,0xf8,0x45,0x01,0x07,0x17,0x03,0x30,0x2a, -0x30,0x28,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x02,0x01,0x16,0x1c,0x68, -0x74,0x74,0x70,0x73,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x76,0x65,0x72,0x69, -0x73,0x69,0x67,0x6e,0x2e,0x63,0x6f,0x6d,0x2f,0x72,0x70,0x61,0x30,0x13,0x06, -0x03,0x55,0x1d,0x25,0x04,0x0c,0x30,0x0a,0x06,0x08,0x2b,0x06,0x01,0x05,0x05, -0x07,0x03,0x03,0x30,0x75,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x01,0x01, -0x04,0x69,0x30,0x67,0x30,0x24,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x30, -0x01,0x86,0x18,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6f,0x63,0x73,0x70,0x2e, -0x76,0x65,0x72,0x69,0x73,0x69,0x67,0x6e,0x2e,0x63,0x6f,0x6d,0x30,0x3f,0x06, -0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x30,0x02,0x86,0x33,0x68,0x74,0x74,0x70, -0x3a,0x2f,0x2f,0x43,0x53,0x43,0x33,0x2d,0x32,0x30,0x30,0x34,0x2d,0x61,0x69, -0x61,0x2e,0x76,0x65,0x72,0x69,0x73,0x69,0x67,0x6e,0x2e,0x63,0x6f,0x6d,0x2f, -0x43,0x53,0x43,0x33,0x2d,0x32,0x30,0x30,0x34,0x2d,0x61,0x69,0x61,0x2e,0x63, -0x65,0x72,0x30,0x1f,0x06,0x03,0x55,0x1d,0x23,0x04,0x18,0x30,0x16,0x80,0x14, -0x08,0xf5,0x51,0xe8,0xfb,0xfe,0x3d,0x3d,0x64,0x36,0x7c,0x68,0xcf,0x5b,0x78, -0xa8,0xdf,0xb9,0xc5,0x37,0x30,0x11,0x06,0x09,0x60,0x86,0x48,0x01,0x86,0xf8, -0x42,0x01,0x01,0x04,0x04,0x03,0x02,0x04,0x10,0x30,0x16,0x06,0x0a,0x2b,0x06, -0x01,0x04,0x01,0x82,0x37,0x02,0x01,0x1b,0x04,0x08,0x30,0x06,0x01,0x01,0x00, -0x01,0x01,0xff,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01, -0x05,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x6a,0xa6,0x06,0xd0,0x33,0x18,0x64, -0xe2,0x69,0x82,0xee,0x6e,0x36,0x9e,0x9d,0x9a,0x0e,0x18,0xa8,0xac,0x9d,0x10, -0xed,0x01,0x3c,0xb9,0x61,0x04,0x62,0xf3,0x85,0x8f,0xcc,0x4f,0x2c,0x66,0x35, -0x54,0x25,0x45,0x8d,0x95,0x1c,0xd2,0x33,0xbe,0x2e,0xdd,0x7f,0x74,0xaf,0x03, -0x7b,0x86,0x63,0xb0,0xc9,0xe6,0xbd,0xc7,0x8e,0xde,0x03,0x18,0x98,0x82,0xc3, -0xbb,0xf8,0x15,0x99,0x1a,0xa9,0xdd,0xb9,0x5d,0xb9,0xbd,0x53,0x95,0x25,0x76, -0xfb,0x5c,0x53,0x90,0xea,0x01,0x0a,0xa0,0xb1,0xbf,0x09,0x1b,0x97,0x8f,0x40, -0xfa,0x85,0x12,0x74,0x01,0xdb,0xf6,0xdb,0x09,0xd6,0x5f,0x4f,0xd7,0x17,0xb4, -0xbf,0x9e,0x2f,0x86,0x52,0x5d,0x70,0x24,0x52,0x32,0x1e,0xa5,0x1d,0x39,0x8b, -0x66,0xf6,0xba,0x9b,0x69,0x8e,0x12,0x60,0xdb,0xb6,0xcf,0xe6,0x0d,0xd6,0x1c, -0x8f,0xd4,0x5b,0x4b,0x00,0xde,0x21,0x93,0xfb,0x6e,0xc7,0x3d,0xb4,0x66,0x0d, -0x29,0x0c,0x4e,0xe9,0x3f,0x94,0xd6,0xd6,0xdc,0xec,0xf8,0x53,0x3b,0x62,0xd5, -0x97,0x50,0x53,0x84,0x17,0xfe,0xe2,0xed,0x4c,0x23,0x0a,0x49,0xce,0x5b,0xe9, -0x70,0x31,0xc1,0x04,0x02,0x02,0x6c,0xb8,0x52,0xcd,0xc7,0x4e,0x70,0xb4,0x13, -0xd7,0xe0,0x92,0xba,0x44,0x1a,0x10,0x4c,0x6e,0x45,0xc6,0x86,0x04,0xc6,0x64, -0xd3,0x9c,0x6e,0xc1,0x9c,0xac,0x74,0x3d,0x77,0x06,0x5e,0x28,0x28,0x5c,0xf5, -0xe0,0x9c,0x19,0xd8,0xba,0x74,0x81,0x2d,0x67,0x77,0x93,0x8d,0xbf,0xd2,0x52, -0x00,0xe6,0xa5,0x38,0x4e,0x2e,0x73,0x66,0x7a }; -static const BYTE verisignCA[] = { -0x30,0x82,0x02,0x3c,0x30,0x82,0x01,0xa5,0x02,0x10,0x70,0xba,0xe4,0x1d,0x10, -0xd9,0x29,0x34,0xb6,0x38,0xca,0x7b,0x03,0xcc,0xba,0xbf,0x30,0x0d,0x06,0x09, -0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x02,0x05,0x00,0x30,0x5f,0x31,0x0b, -0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x17,0x30,0x15, -0x06,0x03,0x55,0x04,0x0a,0x13,0x0e,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e, -0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x37,0x30,0x35,0x06,0x03,0x55,0x04,0x0b, -0x13,0x2e,0x43,0x6c,0x61,0x73,0x73,0x20,0x33,0x20,0x50,0x75,0x62,0x6c,0x69, -0x63,0x20,0x50,0x72,0x69,0x6d,0x61,0x72,0x79,0x20,0x43,0x65,0x72,0x74,0x69, -0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x41,0x75,0x74,0x68,0x6f,0x72, -0x69,0x74,0x79,0x30,0x1e,0x17,0x0d,0x39,0x36,0x30,0x31,0x32,0x39,0x30,0x30, -0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x32,0x38,0x30,0x38,0x30,0x31,0x32,0x33, -0x35,0x39,0x35,0x39,0x5a,0x30,0x5f,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04, -0x06,0x13,0x02,0x55,0x53,0x31,0x17,0x30,0x15,0x06,0x03,0x55,0x04,0x0a,0x13, -0x0e,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x2c,0x20,0x49,0x6e,0x63,0x2e, -0x31,0x37,0x30,0x35,0x06,0x03,0x55,0x04,0x0b,0x13,0x2e,0x43,0x6c,0x61,0x73, -0x73,0x20,0x33,0x20,0x50,0x75,0x62,0x6c,0x69,0x63,0x20,0x50,0x72,0x69,0x6d, -0x61,0x72,0x79,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69, -0x6f,0x6e,0x20,0x41,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x30,0x81,0x9f, -0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00, -0x03,0x81,0x8d,0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xc9,0x5c,0x59,0x9e, -0xf2,0x1b,0x8a,0x01,0x14,0xb4,0x10,0xdf,0x04,0x40,0xdb,0xe3,0x57,0xaf,0x6a, -0x45,0x40,0x8f,0x84,0x0c,0x0b,0xd1,0x33,0xd9,0xd9,0x11,0xcf,0xee,0x02,0x58, -0x1f,0x25,0xf7,0x2a,0xa8,0x44,0x05,0xaa,0xec,0x03,0x1f,0x78,0x7f,0x9e,0x93, -0xb9,0x9a,0x00,0xaa,0x23,0x7d,0xd6,0xac,0x85,0xa2,0x63,0x45,0xc7,0x72,0x27, -0xcc,0xf4,0x4c,0xc6,0x75,0x71,0xd2,0x39,0xef,0x4f,0x42,0xf0,0x75,0xdf,0x0a, -0x90,0xc6,0x8e,0x20,0x6f,0x98,0x0f,0xf8,0xac,0x23,0x5f,0x70,0x29,0x36,0xa4, -0xc9,0x86,0xe7,0xb1,0x9a,0x20,0xcb,0x53,0xa5,0x85,0xe7,0x3d,0xbe,0x7d,0x9a, -0xfe,0x24,0x45,0x33,0xdc,0x76,0x15,0xed,0x0f,0xa2,0x71,0x64,0x4c,0x65,0x2e, -0x81,0x68,0x45,0xa7,0x02,0x03,0x01,0x00,0x01,0x30,0x0d,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x01,0x02,0x05,0x00,0x03,0x81,0x81,0x00,0xbb,0x4c, -0x12,0x2b,0xcf,0x2c,0x26,0x00,0x4f,0x14,0x13,0xdd,0xa6,0xfb,0xfc,0x0a,0x11, -0x84,0x8c,0xf3,0x28,0x1c,0x67,0x92,0x2f,0x7c,0xb6,0xc5,0xfa,0xdf,0xf0,0xe8, -0x95,0xbc,0x1d,0x8f,0x6c,0x2c,0xa8,0x51,0xcc,0x73,0xd8,0xa4,0xc0,0x53,0xf0, -0x4e,0xd6,0x26,0xc0,0x76,0x01,0x57,0x81,0x92,0x5e,0x21,0xf1,0xd1,0xb1,0xff, -0xe7,0xd0,0x21,0x58,0xcd,0x69,0x17,0xe3,0x44,0x1c,0x9c,0x19,0x44,0x39,0x89, -0x5c,0xdc,0x9c,0x00,0x0f,0x56,0x8d,0x02,0x99,0xed,0xa2,0x90,0x45,0x4c,0xe4, -0xbb,0x10,0xa4,0x3d,0xf0,0x32,0x03,0x0e,0xf1,0xce,0xf8,0xe8,0xc9,0x51,0x8c, -0xe6,0x62,0x9f,0xe6,0x9f,0xc0,0x7d,0xb7,0x72,0x9c,0xc9,0x36,0x3a,0x6b,0x9f, -0x4e,0xa8,0xff,0x64,0x0d,0x64 }; -/* www.google.com's cert */ -static const BYTE google[] = { -0x30,0x82,0x03,0x21,0x30,0x82,0x02,0x8a,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x01,0x2a,0x39,0x76,0x0d,0x3f,0x4f,0xc9,0x0b,0xe7,0xbd,0x2b,0xcf,0x95,0x2e, -0x7a,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x4c,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x5a, -0x41,0x31,0x25,0x30,0x23,0x06,0x03,0x55,0x04,0x0a,0x13,0x1c,0x54,0x68,0x61, -0x77,0x74,0x65,0x20,0x43,0x6f,0x6e,0x73,0x75,0x6c,0x74,0x69,0x6e,0x67,0x20, -0x28,0x50,0x74,0x79,0x29,0x20,0x4c,0x74,0x64,0x2e,0x31,0x16,0x30,0x14,0x06, -0x03,0x55,0x04,0x03,0x13,0x0d,0x54,0x68,0x61,0x77,0x74,0x65,0x20,0x53,0x47, -0x43,0x20,0x43,0x41,0x30,0x1e,0x17,0x0d,0x30,0x39,0x30,0x33,0x32,0x37,0x32, -0x32,0x32,0x30,0x30,0x37,0x5a,0x17,0x0d,0x31,0x30,0x30,0x33,0x32,0x37,0x32, -0x32,0x32,0x30,0x30,0x37,0x5a,0x30,0x68,0x31,0x0b,0x30,0x09,0x06,0x03,0x55, -0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x08, -0x13,0x0a,0x43,0x61,0x6c,0x69,0x66,0x6f,0x72,0x6e,0x69,0x61,0x31,0x16,0x30, -0x14,0x06,0x03,0x55,0x04,0x07,0x13,0x0d,0x4d,0x6f,0x75,0x6e,0x74,0x61,0x69, -0x6e,0x20,0x56,0x69,0x65,0x77,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x0a, -0x13,0x0a,0x47,0x6f,0x6f,0x67,0x6c,0x65,0x20,0x49,0x6e,0x63,0x31,0x17,0x30, -0x15,0x06,0x03,0x55,0x04,0x03,0x13,0x0e,0x77,0x77,0x77,0x2e,0x67,0x6f,0x6f, -0x67,0x6c,0x65,0x2e,0x63,0x6f,0x6d,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30, -0x81,0x89,0x02,0x81,0x81,0x00,0xd6,0xb9,0xe1,0xad,0xb8,0x61,0x0b,0x1f,0x4e, -0xb6,0x3c,0x09,0x3d,0xab,0xe8,0xe3,0x2b,0xb6,0xe8,0xa4,0x3a,0x78,0x2f,0xd3, -0x51,0x20,0x22,0x45,0x95,0xd8,0x00,0x91,0x33,0x9a,0xa7,0xa2,0x48,0xea,0x30, -0x57,0x26,0x97,0x66,0xc7,0x5a,0xef,0xf1,0x9b,0x0c,0x3f,0xe1,0xb9,0x7f,0x7b, -0xc3,0xc7,0xcc,0xaf,0x9c,0xd0,0x1f,0x3c,0x81,0x15,0x10,0x58,0xfc,0x06,0xb3, -0xbf,0xbc,0x9c,0x02,0xb9,0x51,0xdc,0xfb,0xa6,0xb9,0x17,0x42,0xe6,0x46,0xe7, -0x22,0xcf,0x6c,0x27,0x10,0xfe,0x54,0xe6,0x92,0x6c,0x0c,0x60,0x76,0x9a,0xce, -0xf8,0x7f,0xac,0xb8,0x5a,0x08,0x4a,0xdc,0xb1,0x64,0xbd,0xa0,0x74,0x41,0xb2, -0xac,0x8f,0x86,0x9d,0x1a,0xde,0x58,0x09,0xfd,0x6c,0x0a,0x25,0xe0,0x79,0x02, -0x03,0x01,0x00,0x01,0xa3,0x81,0xe7,0x30,0x81,0xe4,0x30,0x28,0x06,0x03,0x55, -0x1d,0x25,0x04,0x21,0x30,0x1f,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x03, -0x01,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x03,0x02,0x06,0x09,0x60,0x86, -0x48,0x01,0x86,0xf8,0x42,0x04,0x01,0x30,0x36,0x06,0x03,0x55,0x1d,0x1f,0x04, -0x2f,0x30,0x2d,0x30,0x2b,0xa0,0x29,0xa0,0x27,0x86,0x25,0x68,0x74,0x74,0x70, -0x3a,0x2f,0x2f,0x63,0x72,0x6c,0x2e,0x74,0x68,0x61,0x77,0x74,0x65,0x2e,0x63, -0x6f,0x6d,0x2f,0x54,0x68,0x61,0x77,0x74,0x65,0x53,0x47,0x43,0x43,0x41,0x2e, -0x63,0x72,0x6c,0x30,0x72,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x01,0x01, -0x04,0x66,0x30,0x64,0x30,0x22,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x30, -0x01,0x86,0x16,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6f,0x63,0x73,0x70,0x2e, -0x74,0x68,0x61,0x77,0x74,0x65,0x2e,0x63,0x6f,0x6d,0x30,0x3e,0x06,0x08,0x2b, -0x06,0x01,0x05,0x05,0x07,0x30,0x02,0x86,0x32,0x68,0x74,0x74,0x70,0x3a,0x2f, -0x2f,0x77,0x77,0x77,0x2e,0x74,0x68,0x61,0x77,0x74,0x65,0x2e,0x63,0x6f,0x6d, -0x2f,0x72,0x65,0x70,0x6f,0x73,0x69,0x74,0x6f,0x72,0x79,0x2f,0x54,0x68,0x61, -0x77,0x74,0x65,0x5f,0x53,0x47,0x43,0x5f,0x43,0x41,0x2e,0x63,0x72,0x74,0x30, -0x0c,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x02,0x30,0x00,0x30,0x0d, -0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81, -0x81,0x00,0x39,0xb6,0xfb,0x11,0xbc,0x33,0x2c,0xc3,0x90,0x48,0xe3,0x6e,0xc3, -0x9b,0x38,0xb1,0x42,0xd1,0x00,0x09,0x58,0x63,0xa0,0xe1,0x98,0x1c,0x85,0xf2, -0xef,0x10,0x1d,0x60,0x4e,0x51,0x09,0x62,0xf5,0x05,0xbd,0x9d,0x4f,0x87,0x6c, -0x98,0x72,0x07,0x80,0xc3,0x59,0x48,0x14,0xe2,0xd6,0xef,0xd0,0x8f,0x33,0x6a, -0x68,0x31,0xfa,0xb7,0xbb,0x85,0xcc,0xf7,0xc7,0x47,0x7b,0x67,0x93,0x3c,0xc3, -0x16,0x51,0x9b,0x6f,0x87,0x20,0xfd,0x67,0x4c,0x2b,0xea,0x6a,0x49,0xdb,0x11, -0xd1,0xbd,0xd7,0x95,0x22,0x43,0x7a,0x06,0x7b,0x4e,0xf6,0x37,0x8e,0xa2,0xb9, -0xcf,0x1f,0xa5,0xd2,0xbd,0x3b,0x04,0x97,0x39,0xb3,0x0f,0xfa,0x38,0xb5,0xaf, -0x55,0x20,0x88,0x60,0x93,0xf2,0xde,0xdb,0xff,0xdf }; -static const BYTE thawte_sgc_ca[] = { -0x30,0x82,0x03,0x23,0x30,0x82,0x02,0x8c,0xa0,0x03,0x02,0x01,0x02,0x02,0x04, -0x30,0x00,0x00,0x02,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x01,0x05,0x05,0x00,0x30,0x5f,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06, -0x13,0x02,0x55,0x53,0x31,0x17,0x30,0x15,0x06,0x03,0x55,0x04,0x0a,0x13,0x0e, -0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31, -0x37,0x30,0x35,0x06,0x03,0x55,0x04,0x0b,0x13,0x2e,0x43,0x6c,0x61,0x73,0x73, -0x20,0x33,0x20,0x50,0x75,0x62,0x6c,0x69,0x63,0x20,0x50,0x72,0x69,0x6d,0x61, -0x72,0x79,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f, -0x6e,0x20,0x41,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x30,0x1e,0x17,0x0d, -0x30,0x34,0x30,0x35,0x31,0x33,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d, -0x31,0x34,0x30,0x35,0x31,0x32,0x32,0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x4c, -0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x5a,0x41,0x31,0x25, -0x30,0x23,0x06,0x03,0x55,0x04,0x0a,0x13,0x1c,0x54,0x68,0x61,0x77,0x74,0x65, -0x20,0x43,0x6f,0x6e,0x73,0x75,0x6c,0x74,0x69,0x6e,0x67,0x20,0x28,0x50,0x74, -0x79,0x29,0x20,0x4c,0x74,0x64,0x2e,0x31,0x16,0x30,0x14,0x06,0x03,0x55,0x04, -0x03,0x13,0x0d,0x54,0x68,0x61,0x77,0x74,0x65,0x20,0x53,0x47,0x43,0x20,0x43, -0x41,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00, -0xd4,0xd3,0x67,0xd0,0x8d,0x15,0x7f,0xae,0xcd,0x31,0xfe,0x7d,0x1d,0x91,0xa1, -0x3f,0x0b,0x71,0x3c,0xac,0xcc,0xc8,0x64,0xfb,0x63,0xfc,0x32,0x4b,0x07,0x94, -0xbd,0x6f,0x80,0xba,0x2f,0xe1,0x04,0x93,0xc0,0x33,0xfc,0x09,0x33,0x23,0xe9, -0x0b,0x74,0x2b,0x71,0xc4,0x03,0xc6,0xd2,0xcd,0xe2,0x2f,0xf5,0x09,0x63,0xcd, -0xff,0x48,0xa5,0x00,0xbf,0xe0,0xe7,0xf3,0x88,0xb7,0x2d,0x32,0xde,0x98,0x36, -0xe6,0x0a,0xad,0x00,0x7b,0xc4,0x64,0x4a,0x3b,0x84,0x75,0x03,0xf2,0x70,0x92, -0x7d,0x0e,0x62,0xf5,0x21,0xab,0x69,0x36,0x84,0x31,0x75,0x90,0xf8,0xbf,0xc7, -0x6c,0x88,0x1b,0x06,0x95,0x7c,0xc9,0xe5,0xa8,0xde,0x75,0xa1,0x2c,0x7a,0x68, -0xdf,0xd5,0xca,0x1c,0x87,0x58,0x60,0x19,0x02,0x03,0x01,0x00,0x01,0xa3,0x81, -0xfe,0x30,0x81,0xfb,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04, -0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x00,0x30,0x0b,0x06,0x03,0x55,0x1d, -0x0f,0x04,0x04,0x03,0x02,0x01,0x06,0x30,0x11,0x06,0x09,0x60,0x86,0x48,0x01, -0x86,0xf8,0x42,0x01,0x01,0x04,0x04,0x03,0x02,0x01,0x06,0x30,0x28,0x06,0x03, -0x55,0x1d,0x11,0x04,0x21,0x30,0x1f,0xa4,0x1d,0x30,0x1b,0x31,0x19,0x30,0x17, -0x06,0x03,0x55,0x04,0x03,0x13,0x10,0x50,0x72,0x69,0x76,0x61,0x74,0x65,0x4c, -0x61,0x62,0x65,0x6c,0x33,0x2d,0x31,0x35,0x30,0x31,0x06,0x03,0x55,0x1d,0x1f, -0x04,0x2a,0x30,0x28,0x30,0x26,0xa0,0x24,0xa0,0x22,0x86,0x20,0x68,0x74,0x74, -0x70,0x3a,0x2f,0x2f,0x63,0x72,0x6c,0x2e,0x76,0x65,0x72,0x69,0x73,0x69,0x67, -0x6e,0x2e,0x63,0x6f,0x6d,0x2f,0x70,0x63,0x61,0x33,0x2e,0x63,0x72,0x6c,0x30, -0x32,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x01,0x01,0x04,0x26,0x30,0x24, -0x30,0x22,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x86,0x16,0x68, -0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6f,0x63,0x73,0x70,0x2e,0x74,0x68,0x61,0x77, -0x74,0x65,0x2e,0x63,0x6f,0x6d,0x30,0x34,0x06,0x03,0x55,0x1d,0x25,0x04,0x2d, -0x30,0x2b,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x03,0x01,0x06,0x08,0x2b, -0x06,0x01,0x05,0x05,0x07,0x03,0x02,0x06,0x09,0x60,0x86,0x48,0x01,0x86,0xf8, -0x42,0x04,0x01,0x06,0x0a,0x60,0x86,0x48,0x01,0x86,0xf8,0x45,0x01,0x08,0x01, -0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00, -0x03,0x81,0x81,0x00,0x55,0xac,0x63,0xea,0xde,0xa1,0xdd,0xd2,0x90,0x5f,0x9f, -0x0b,0xce,0x76,0xbe,0x13,0x51,0x8f,0x93,0xd9,0x05,0x2b,0xc8,0x1b,0x77,0x4b, -0xad,0x69,0x50,0xa1,0xee,0xde,0xdc,0xfd,0xdb,0x07,0xe9,0xe8,0x39,0x94,0xdc, -0xab,0x72,0x79,0x2f,0x06,0xbf,0xab,0x81,0x70,0xc4,0xa8,0xed,0xea,0x53,0x34, -0xed,0xef,0x1e,0x53,0xd9,0x06,0xc7,0x56,0x2b,0xd1,0x5c,0xf4,0xd1,0x8a,0x8e, -0xb4,0x2b,0xb1,0x37,0x90,0x48,0x08,0x42,0x25,0xc5,0x3e,0x8a,0xcb,0x7f,0xeb, -0x6f,0x04,0xd1,0x6d,0xc5,0x74,0xa2,0xf7,0xa2,0x7c,0x7b,0x60,0x3c,0x77,0xcd, -0x0e,0xce,0x48,0x02,0x7f,0x01,0x2f,0xb6,0x9b,0x37,0xe0,0x2a,0x2a,0x36,0xdc, -0xd5,0x85,0xd6,0xac,0xe5,0x3f,0x54,0x6f,0x96,0x1e,0x05,0xaf }; -/* global_sign_root -> global_sign_ca -> openssl_org: - * "*.openssl.org"'s certificate - */ -static const BYTE global_sign_root[] = { -0x30,0x82,0x04,0x6e,0x30,0x82,0x03,0x56,0xa0,0x03,0x02,0x01,0x02,0x02,0x0b,0x04, -0x00,0x00,0x00,0x00,0x01,0x12,0x56,0xad,0x62,0x04,0x30,0x0d,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x30,0x57,0x31,0x0b,0x30,0x09,0x06, -0x03,0x55,0x04,0x06,0x13,0x02,0x42,0x45,0x31,0x19,0x30,0x17,0x06,0x03,0x55,0x04, -0x0a,0x13,0x10,0x47,0x6c,0x6f,0x62,0x61,0x6c,0x53,0x69,0x67,0x6e,0x20,0x6e,0x76, -0x2d,0x73,0x61,0x31,0x10,0x30,0x0e,0x06,0x03,0x55,0x04,0x0b,0x13,0x07,0x52,0x6f, -0x6f,0x74,0x20,0x43,0x41,0x31,0x1b,0x30,0x19,0x06,0x03,0x55,0x04,0x03,0x13,0x12, -0x47,0x6c,0x6f,0x62,0x61,0x6c,0x53,0x69,0x67,0x6e,0x20,0x52,0x6f,0x6f,0x74,0x20, -0x43,0x41,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x34,0x31,0x30,0x30,0x30, -0x30,0x30,0x5a,0x17,0x0d,0x31,0x34,0x30,0x31,0x32,0x37,0x31,0x31,0x30,0x30,0x30, -0x30,0x5a,0x30,0x71,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x42, -0x45,0x31,0x1d,0x30,0x1b,0x06,0x03,0x55,0x04,0x0b,0x13,0x14,0x44,0x6f,0x6d,0x61, -0x69,0x6e,0x20,0x56,0x61,0x6c,0x69,0x64,0x61,0x74,0x69,0x6f,0x6e,0x20,0x43,0x41, -0x31,0x19,0x30,0x17,0x06,0x03,0x55,0x04,0x0a,0x13,0x10,0x47,0x6c,0x6f,0x62,0x61, -0x6c,0x53,0x69,0x67,0x6e,0x20,0x6e,0x76,0x2d,0x73,0x61,0x31,0x28,0x30,0x26,0x06, -0x03,0x55,0x04,0x03,0x13,0x1f,0x47,0x6c,0x6f,0x62,0x61,0x6c,0x53,0x69,0x67,0x6e, -0x20,0x44,0x6f,0x6d,0x61,0x69,0x6e,0x20,0x56,0x61,0x6c,0x69,0x64,0x61,0x74,0x69, -0x6f,0x6e,0x20,0x43,0x41,0x30,0x82,0x01,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01, -0x0a,0x02,0x82,0x01,0x01,0x00,0xb4,0x9f,0x49,0xe6,0xb3,0x9f,0x01,0x55,0x36,0xd0, -0x36,0x95,0x6c,0xcb,0x16,0x5a,0x6c,0x72,0xb5,0xe2,0x9d,0xe2,0xfa,0x39,0xe9,0x0a, -0xdc,0x73,0x5c,0xa0,0x3b,0x76,0x6d,0x05,0x28,0x93,0x0d,0xa5,0x42,0xf3,0xe8,0xcb, -0xee,0xd3,0x33,0x1a,0x13,0x27,0x0a,0xdf,0x5c,0xd1,0x54,0x62,0x6a,0x9a,0x17,0x36, -0xd6,0x3c,0x58,0x87,0x1e,0xb2,0x66,0x1f,0x55,0x69,0x2b,0x89,0x56,0x47,0xb4,0xc2, -0x50,0x0c,0xe5,0x5d,0xc1,0xfd,0x29,0x1b,0x66,0x73,0x43,0xf4,0x6f,0xd1,0x14,0x4f, -0x2a,0x6d,0x48,0x52,0x3a,0xf5,0xe4,0x90,0x3f,0xde,0xb2,0xf4,0x10,0xd5,0xf9,0xfa, -0xac,0x96,0x0d,0x10,0x32,0x23,0xd2,0xd3,0x51,0xa7,0x95,0x85,0x50,0xfa,0x0f,0x29, -0x9d,0xa7,0x88,0x4e,0x0d,0x31,0x9b,0x44,0x41,0x8e,0x41,0x2f,0x6e,0x9a,0x1a,0xb4, -0xb6,0xa5,0x59,0xf1,0x49,0x59,0x09,0x7e,0x7e,0x49,0xd3,0x69,0x33,0x4b,0x00,0x92, -0xc5,0x1b,0x42,0x20,0x69,0xf8,0x64,0xdf,0xd8,0xa7,0x44,0xd1,0x90,0x5e,0xfd,0x39, -0xad,0x6b,0x7d,0xfe,0xd5,0x8b,0xa4,0x01,0x64,0xf6,0xa7,0xb4,0x20,0x84,0xcc,0x05, -0x2f,0x27,0xee,0x1e,0xd5,0x24,0x96,0xae,0x84,0x43,0xa4,0x3e,0x43,0xf3,0x3b,0x99, -0xd7,0xf9,0xf2,0xde,0x3d,0x19,0xed,0xd0,0x65,0xf1,0x49,0xca,0x48,0xd2,0x38,0x7d, -0xc6,0x48,0xd7,0x72,0x61,0xb8,0xc6,0xc2,0x67,0x0a,0xd8,0x65,0x5a,0xfd,0x5b,0xf3, -0xc5,0xfd,0xbe,0x8c,0x69,0xcf,0x99,0x20,0xb6,0xea,0xec,0x39,0x80,0xe9,0x66,0xa8, -0xee,0x3d,0x9d,0x46,0x7b,0x87,0x02,0x03,0x01,0x00,0x01,0xa3,0x82,0x01,0x1f,0x30, -0x82,0x01,0x1b,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,0xff,0x04,0x04,0x03, -0x02,0x01,0x06,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30, -0x06,0x01,0x01,0xff,0x02,0x01,0x00,0x30,0x4b,0x06,0x03,0x55,0x1d,0x20,0x04,0x44, -0x30,0x42,0x30,0x40,0x06,0x09,0x2b,0x06,0x01,0x04,0x01,0xa0,0x32,0x01,0x0a,0x30, -0x33,0x30,0x31,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x02,0x01,0x16,0x25,0x68, -0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x67,0x6c,0x6f,0x62,0x61,0x6c, -0x73,0x69,0x67,0x6e,0x2e,0x6e,0x65,0x74,0x2f,0x72,0x65,0x70,0x6f,0x73,0x69,0x74, -0x6f,0x72,0x79,0x2f,0x30,0x1d,0x06,0x03,0x55,0x1d,0x0e,0x04,0x16,0x04,0x14,0x36, -0x12,0x4e,0x9e,0x71,0xc4,0x26,0x41,0xf1,0xfa,0xf1,0x29,0x4c,0xbf,0x17,0xa4,0x53, -0x28,0xb6,0xeb,0x30,0x33,0x06,0x03,0x55,0x1d,0x1f,0x04,0x2c,0x30,0x2a,0x30,0x28, -0xa0,0x26,0xa0,0x24,0x86,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x63,0x72,0x6c, -0x2e,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x73,0x69,0x67,0x6e,0x2e,0x6e,0x65,0x74,0x2f, -0x72,0x6f,0x6f,0x74,0x2e,0x63,0x72,0x6c,0x30,0x11,0x06,0x09,0x60,0x86,0x48,0x01, -0x86,0xf8,0x42,0x01,0x01,0x04,0x04,0x03,0x02,0x02,0x04,0x30,0x20,0x06,0x03,0x55, -0x1d,0x25,0x04,0x19,0x30,0x17,0x06,0x0a,0x2b,0x06,0x01,0x04,0x01,0x82,0x37,0x0a, -0x03,0x03,0x06,0x09,0x60,0x86,0x48,0x01,0x86,0xf8,0x42,0x04,0x01,0x30,0x1f,0x06, -0x03,0x55,0x1d,0x23,0x04,0x18,0x30,0x16,0x80,0x14,0x60,0x7b,0x66,0x1a,0x45,0x0d, -0x97,0xca,0x89,0x50,0x2f,0x7d,0x04,0xcd,0x34,0xa8,0xff,0xfc,0xfd,0x4b,0x30,0x0d, -0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x82,0x01, -0x01,0x00,0xc3,0x25,0x79,0x4a,0xfa,0xcd,0x26,0x6f,0x40,0x6a,0xb8,0x94,0x1b,0xe6, -0xa0,0xe1,0x6b,0xd2,0x31,0x9a,0x3f,0x89,0xfb,0xc5,0x0a,0x22,0x75,0x7a,0xfd,0xbb, -0x40,0x34,0x9c,0xbc,0x9e,0x85,0x49,0x59,0x7a,0x95,0xcc,0x0d,0x2d,0x44,0x0b,0xc7, -0xcb,0x15,0x10,0x1e,0xd2,0xdc,0xe3,0x78,0xea,0x5f,0xf5,0x35,0x51,0xa6,0xc8,0x3f, -0x39,0x90,0x15,0x9e,0x5f,0x15,0xc9,0xb7,0x8f,0x5d,0x6b,0x63,0x99,0x68,0xe1,0x6e, -0x5c,0xfc,0x9d,0x37,0x33,0x0a,0xae,0x87,0x70,0x4a,0xa2,0xe3,0xab,0x26,0x7d,0x73, -0x07,0xe4,0xf7,0x0a,0xaa,0x75,0x8f,0xa6,0xee,0x9b,0x04,0xd1,0x05,0x43,0x74,0x1a, -0xba,0xd4,0xc2,0x9d,0x7f,0xb7,0xa0,0x6c,0xed,0x16,0x9a,0x67,0x40,0x56,0xab,0x83, -0x9f,0x4c,0x9c,0xeb,0x28,0x34,0x1f,0x8d,0xe6,0x5a,0x0f,0x69,0x40,0xd9,0xa9,0x9e, -0x6a,0xf9,0x89,0x7f,0xd0,0xf8,0x8c,0xb3,0x48,0x2e,0x0b,0x4f,0xf1,0xf9,0xcf,0xf5, -0x0e,0x11,0x02,0x0c,0x89,0x16,0x73,0x53,0x5d,0x2c,0xd3,0xef,0xde,0x5f,0x0b,0x25, -0xba,0xd5,0x4e,0x8f,0x85,0x90,0x3f,0x88,0x93,0x79,0xa5,0x20,0xac,0xff,0xb0,0x8a, -0xcb,0xcb,0xa5,0x55,0x78,0x83,0x39,0x41,0x32,0xaa,0x5d,0x25,0x93,0xa7,0xea,0xee, -0x18,0x72,0xb5,0xe2,0x1d,0x7f,0x08,0x74,0x11,0xb6,0x01,0x27,0x4e,0x96,0xcf,0xa8, -0xf0,0x2a,0xf9,0x52,0xac,0x24,0x1a,0x19,0x9e,0x9f,0x6c,0x52,0x7c,0x8b,0x3a,0xa6, -0x54,0xde,0xc1,0xc7,0x21,0x7d,0x3a,0xd3,0xbc,0x1a,0xa8,0x6d,0xf2,0xbf,0xdf,0x76, -0xca,0x03 -}; -static const BYTE global_sign_ca[] = { -0x30,0x82,0x04,0x6e,0x30,0x82,0x03,0x56,0xa0,0x03,0x02,0x01,0x02,0x02,0x0b,0x04, -0x00,0x00,0x00,0x00,0x01,0x12,0x56,0xad,0x62,0x04,0x30,0x0d,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x30,0x57,0x31,0x0b,0x30,0x09,0x06, -0x03,0x55,0x04,0x06,0x13,0x02,0x42,0x45,0x31,0x19,0x30,0x17,0x06,0x03,0x55,0x04, -0x0a,0x13,0x10,0x47,0x6c,0x6f,0x62,0x61,0x6c,0x53,0x69,0x67,0x6e,0x20,0x6e,0x76, -0x2d,0x73,0x61,0x31,0x10,0x30,0x0e,0x06,0x03,0x55,0x04,0x0b,0x13,0x07,0x52,0x6f, -0x6f,0x74,0x20,0x43,0x41,0x31,0x1b,0x30,0x19,0x06,0x03,0x55,0x04,0x03,0x13,0x12, -0x47,0x6c,0x6f,0x62,0x61,0x6c,0x53,0x69,0x67,0x6e,0x20,0x52,0x6f,0x6f,0x74,0x20, -0x43,0x41,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x34,0x31,0x30,0x30,0x30, -0x30,0x30,0x5a,0x17,0x0d,0x31,0x34,0x30,0x31,0x32,0x37,0x31,0x31,0x30,0x30,0x30, -0x30,0x5a,0x30,0x71,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x42, -0x45,0x31,0x1d,0x30,0x1b,0x06,0x03,0x55,0x04,0x0b,0x13,0x14,0x44,0x6f,0x6d,0x61, -0x69,0x6e,0x20,0x56,0x61,0x6c,0x69,0x64,0x61,0x74,0x69,0x6f,0x6e,0x20,0x43,0x41, -0x31,0x19,0x30,0x17,0x06,0x03,0x55,0x04,0x0a,0x13,0x10,0x47,0x6c,0x6f,0x62,0x61, -0x6c,0x53,0x69,0x67,0x6e,0x20,0x6e,0x76,0x2d,0x73,0x61,0x31,0x28,0x30,0x26,0x06, -0x03,0x55,0x04,0x03,0x13,0x1f,0x47,0x6c,0x6f,0x62,0x61,0x6c,0x53,0x69,0x67,0x6e, -0x20,0x44,0x6f,0x6d,0x61,0x69,0x6e,0x20,0x56,0x61,0x6c,0x69,0x64,0x61,0x74,0x69, -0x6f,0x6e,0x20,0x43,0x41,0x30,0x82,0x01,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01, -0x0a,0x02,0x82,0x01,0x01,0x00,0xb4,0x9f,0x49,0xe6,0xb3,0x9f,0x01,0x55,0x36,0xd0, -0x36,0x95,0x6c,0xcb,0x16,0x5a,0x6c,0x72,0xb5,0xe2,0x9d,0xe2,0xfa,0x39,0xe9,0x0a, -0xdc,0x73,0x5c,0xa0,0x3b,0x76,0x6d,0x05,0x28,0x93,0x0d,0xa5,0x42,0xf3,0xe8,0xcb, -0xee,0xd3,0x33,0x1a,0x13,0x27,0x0a,0xdf,0x5c,0xd1,0x54,0x62,0x6a,0x9a,0x17,0x36, -0xd6,0x3c,0x58,0x87,0x1e,0xb2,0x66,0x1f,0x55,0x69,0x2b,0x89,0x56,0x47,0xb4,0xc2, -0x50,0x0c,0xe5,0x5d,0xc1,0xfd,0x29,0x1b,0x66,0x73,0x43,0xf4,0x6f,0xd1,0x14,0x4f, -0x2a,0x6d,0x48,0x52,0x3a,0xf5,0xe4,0x90,0x3f,0xde,0xb2,0xf4,0x10,0xd5,0xf9,0xfa, -0xac,0x96,0x0d,0x10,0x32,0x23,0xd2,0xd3,0x51,0xa7,0x95,0x85,0x50,0xfa,0x0f,0x29, -0x9d,0xa7,0x88,0x4e,0x0d,0x31,0x9b,0x44,0x41,0x8e,0x41,0x2f,0x6e,0x9a,0x1a,0xb4, -0xb6,0xa5,0x59,0xf1,0x49,0x59,0x09,0x7e,0x7e,0x49,0xd3,0x69,0x33,0x4b,0x00,0x92, -0xc5,0x1b,0x42,0x20,0x69,0xf8,0x64,0xdf,0xd8,0xa7,0x44,0xd1,0x90,0x5e,0xfd,0x39, -0xad,0x6b,0x7d,0xfe,0xd5,0x8b,0xa4,0x01,0x64,0xf6,0xa7,0xb4,0x20,0x84,0xcc,0x05, -0x2f,0x27,0xee,0x1e,0xd5,0x24,0x96,0xae,0x84,0x43,0xa4,0x3e,0x43,0xf3,0x3b,0x99, -0xd7,0xf9,0xf2,0xde,0x3d,0x19,0xed,0xd0,0x65,0xf1,0x49,0xca,0x48,0xd2,0x38,0x7d, -0xc6,0x48,0xd7,0x72,0x61,0xb8,0xc6,0xc2,0x67,0x0a,0xd8,0x65,0x5a,0xfd,0x5b,0xf3, -0xc5,0xfd,0xbe,0x8c,0x69,0xcf,0x99,0x20,0xb6,0xea,0xec,0x39,0x80,0xe9,0x66,0xa8, -0xee,0x3d,0x9d,0x46,0x7b,0x87,0x02,0x03,0x01,0x00,0x01,0xa3,0x82,0x01,0x1f,0x30, -0x82,0x01,0x1b,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,0xff,0x04,0x04,0x03, -0x02,0x01,0x06,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30, -0x06,0x01,0x01,0xff,0x02,0x01,0x00,0x30,0x4b,0x06,0x03,0x55,0x1d,0x20,0x04,0x44, -0x30,0x42,0x30,0x40,0x06,0x09,0x2b,0x06,0x01,0x04,0x01,0xa0,0x32,0x01,0x0a,0x30, -0x33,0x30,0x31,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x02,0x01,0x16,0x25,0x68, -0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x67,0x6c,0x6f,0x62,0x61,0x6c, -0x73,0x69,0x67,0x6e,0x2e,0x6e,0x65,0x74,0x2f,0x72,0x65,0x70,0x6f,0x73,0x69,0x74, -0x6f,0x72,0x79,0x2f,0x30,0x1d,0x06,0x03,0x55,0x1d,0x0e,0x04,0x16,0x04,0x14,0x36, -0x12,0x4e,0x9e,0x71,0xc4,0x26,0x41,0xf1,0xfa,0xf1,0x29,0x4c,0xbf,0x17,0xa4,0x53, -0x28,0xb6,0xeb,0x30,0x33,0x06,0x03,0x55,0x1d,0x1f,0x04,0x2c,0x30,0x2a,0x30,0x28, -0xa0,0x26,0xa0,0x24,0x86,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x63,0x72,0x6c, -0x2e,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x73,0x69,0x67,0x6e,0x2e,0x6e,0x65,0x74,0x2f, -0x72,0x6f,0x6f,0x74,0x2e,0x63,0x72,0x6c,0x30,0x11,0x06,0x09,0x60,0x86,0x48,0x01, -0x86,0xf8,0x42,0x01,0x01,0x04,0x04,0x03,0x02,0x02,0x04,0x30,0x20,0x06,0x03,0x55, -0x1d,0x25,0x04,0x19,0x30,0x17,0x06,0x0a,0x2b,0x06,0x01,0x04,0x01,0x82,0x37,0x0a, -0x03,0x03,0x06,0x09,0x60,0x86,0x48,0x01,0x86,0xf8,0x42,0x04,0x01,0x30,0x1f,0x06, -0x03,0x55,0x1d,0x23,0x04,0x18,0x30,0x16,0x80,0x14,0x60,0x7b,0x66,0x1a,0x45,0x0d, -0x97,0xca,0x89,0x50,0x2f,0x7d,0x04,0xcd,0x34,0xa8,0xff,0xfc,0xfd,0x4b,0x30,0x0d, -0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x82,0x01, -0x01,0x00,0xc3,0x25,0x79,0x4a,0xfa,0xcd,0x26,0x6f,0x40,0x6a,0xb8,0x94,0x1b,0xe6, -0xa0,0xe1,0x6b,0xd2,0x31,0x9a,0x3f,0x89,0xfb,0xc5,0x0a,0x22,0x75,0x7a,0xfd,0xbb, -0x40,0x34,0x9c,0xbc,0x9e,0x85,0x49,0x59,0x7a,0x95,0xcc,0x0d,0x2d,0x44,0x0b,0xc7, -0xcb,0x15,0x10,0x1e,0xd2,0xdc,0xe3,0x78,0xea,0x5f,0xf5,0x35,0x51,0xa6,0xc8,0x3f, -0x39,0x90,0x15,0x9e,0x5f,0x15,0xc9,0xb7,0x8f,0x5d,0x6b,0x63,0x99,0x68,0xe1,0x6e, -0x5c,0xfc,0x9d,0x37,0x33,0x0a,0xae,0x87,0x70,0x4a,0xa2,0xe3,0xab,0x26,0x7d,0x73, -0x07,0xe4,0xf7,0x0a,0xaa,0x75,0x8f,0xa6,0xee,0x9b,0x04,0xd1,0x05,0x43,0x74,0x1a, -0xba,0xd4,0xc2,0x9d,0x7f,0xb7,0xa0,0x6c,0xed,0x16,0x9a,0x67,0x40,0x56,0xab,0x83, -0x9f,0x4c,0x9c,0xeb,0x28,0x34,0x1f,0x8d,0xe6,0x5a,0x0f,0x69,0x40,0xd9,0xa9,0x9e, -0x6a,0xf9,0x89,0x7f,0xd0,0xf8,0x8c,0xb3,0x48,0x2e,0x0b,0x4f,0xf1,0xf9,0xcf,0xf5, -0x0e,0x11,0x02,0x0c,0x89,0x16,0x73,0x53,0x5d,0x2c,0xd3,0xef,0xde,0x5f,0x0b,0x25, -0xba,0xd5,0x4e,0x8f,0x85,0x90,0x3f,0x88,0x93,0x79,0xa5,0x20,0xac,0xff,0xb0,0x8a, -0xcb,0xcb,0xa5,0x55,0x78,0x83,0x39,0x41,0x32,0xaa,0x5d,0x25,0x93,0xa7,0xea,0xee, -0x18,0x72,0xb5,0xe2,0x1d,0x7f,0x08,0x74,0x11,0xb6,0x01,0x27,0x4e,0x96,0xcf,0xa8, -0xf0,0x2a,0xf9,0x52,0xac,0x24,0x1a,0x19,0x9e,0x9f,0x6c,0x52,0x7c,0x8b,0x3a,0xa6, -0x54,0xde,0xc1,0xc7,0x21,0x7d,0x3a,0xd3,0xbc,0x1a,0xa8,0x6d,0xf2,0xbf,0xdf,0x76, -0xca,0x03 -}; -static const BYTE openssl_org[] = { -0x30,0x82,0x04,0xc8,0x30,0x82,0x03,0xb0,0xa0,0x03,0x02,0x01,0x02,0x02,0x0b,0x01, -0x00,0x00,0x00,0x00,0x01,0x1c,0x57,0x8e,0x3a,0xeb,0x30,0x0d,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x30,0x71,0x31,0x0b,0x30,0x09,0x06, -0x03,0x55,0x04,0x06,0x13,0x02,0x42,0x45,0x31,0x1d,0x30,0x1b,0x06,0x03,0x55,0x04, -0x0b,0x13,0x14,0x44,0x6f,0x6d,0x61,0x69,0x6e,0x20,0x56,0x61,0x6c,0x69,0x64,0x61, -0x74,0x69,0x6f,0x6e,0x20,0x43,0x41,0x31,0x19,0x30,0x17,0x06,0x03,0x55,0x04,0x0a, -0x13,0x10,0x47,0x6c,0x6f,0x62,0x61,0x6c,0x53,0x69,0x67,0x6e,0x20,0x6e,0x76,0x2d, -0x73,0x61,0x31,0x28,0x30,0x26,0x06,0x03,0x55,0x04,0x03,0x13,0x1f,0x47,0x6c,0x6f, -0x62,0x61,0x6c,0x53,0x69,0x67,0x6e,0x20,0x44,0x6f,0x6d,0x61,0x69,0x6e,0x20,0x56, -0x61,0x6c,0x69,0x64,0x61,0x74,0x69,0x6f,0x6e,0x20,0x43,0x41,0x30,0x1e,0x17,0x0d, -0x30,0x38,0x30,0x39,0x31,0x32,0x31,0x37,0x31,0x34,0x31,0x31,0x5a,0x17,0x0d,0x31, -0x31,0x30,0x39,0x31,0x33,0x31,0x37,0x31,0x34,0x30,0x36,0x5a,0x30,0x60,0x31,0x0b, -0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x47,0x42,0x31,0x21,0x30,0x1f,0x06, -0x03,0x55,0x04,0x0b,0x13,0x18,0x44,0x6f,0x6d,0x61,0x69,0x6e,0x20,0x43,0x6f,0x6e, -0x74,0x72,0x6f,0x6c,0x20,0x56,0x61,0x6c,0x69,0x64,0x61,0x74,0x65,0x64,0x31,0x16, -0x30,0x14,0x06,0x03,0x55,0x04,0x0a,0x14,0x0d,0x2a,0x2e,0x6f,0x70,0x65,0x6e,0x73, -0x73,0x6c,0x2e,0x6f,0x72,0x67,0x31,0x16,0x30,0x14,0x06,0x03,0x55,0x04,0x03,0x14, -0x0d,0x2a,0x2e,0x6f,0x70,0x65,0x6e,0x73,0x73,0x6c,0x2e,0x6f,0x72,0x67,0x30,0x82, -0x01,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05, -0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01,0x0a,0x02,0x82,0x01,0x01,0x00,0xb9, -0x23,0x4e,0x1d,0xb5,0xef,0x87,0xb2,0xce,0x43,0x75,0x6a,0xc3,0x11,0x1c,0xd2,0xf7, -0x32,0xf3,0xf7,0x92,0x9b,0xed,0xe6,0x86,0xc3,0xb7,0x93,0x93,0x5e,0x7d,0x32,0x6a, -0x2b,0x03,0xb7,0x2a,0xc8,0x80,0x98,0x91,0x41,0x40,0x08,0xac,0xde,0xa6,0x7a,0x7c, -0x4f,0x44,0x8b,0x9c,0xd8,0xd3,0x87,0x71,0xf2,0x4e,0x3e,0x54,0xd7,0xa4,0x11,0x81, -0xb7,0x71,0x68,0x87,0xc1,0xc9,0xaf,0x2a,0xfa,0xb2,0x74,0xa3,0x70,0xa1,0x4d,0x19, -0x06,0x8d,0x1c,0x95,0x04,0x14,0x9c,0x8f,0x1f,0xf0,0x98,0xc1,0xc0,0x70,0xfa,0xb1, -0x10,0x1d,0x77,0xda,0x80,0x14,0x53,0xa5,0x5c,0xbe,0x05,0x9a,0x43,0xf4,0x54,0xf3, -0x70,0xf4,0x71,0x39,0xea,0x50,0x9c,0xe6,0xa8,0xd0,0x78,0xa6,0x30,0x1e,0x6d,0x4d, -0x22,0x10,0xdd,0x15,0x2d,0x50,0x00,0x5d,0xd9,0xc9,0xd2,0xa6,0xb9,0xdb,0x7f,0xad, -0xd8,0xeb,0xef,0x65,0x1f,0xce,0xbb,0x8d,0x4e,0x51,0x95,0x84,0x6e,0x95,0x16,0xef, -0x0b,0xf0,0x7b,0xff,0x2d,0x6c,0x1b,0x81,0x6c,0xca,0xe0,0x25,0x3d,0x2a,0x5c,0x6f, -0xad,0xce,0x4b,0x5c,0x46,0x7c,0xb1,0xa9,0xf4,0xea,0x72,0x02,0xa1,0xcc,0x87,0x63, -0x85,0x19,0x52,0x01,0x23,0x04,0x8e,0x2a,0xb4,0x94,0xde,0x6d,0x69,0x13,0x65,0x0b, -0x70,0x5f,0x92,0x1a,0x44,0x68,0x41,0xcd,0x80,0xef,0xc9,0xe9,0x83,0xd8,0x1e,0x95, -0x86,0xc7,0x1a,0x51,0xaf,0x3d,0xaa,0xca,0x97,0x19,0xe0,0xb4,0x69,0x87,0x75,0xe1, -0x09,0x9a,0x53,0xcd,0xf5,0x43,0xcf,0x2b,0x1d,0xe7,0x81,0x20,0x1e,0x97,0x25,0x02, -0x03,0x01,0x00,0x01,0xa3,0x82,0x01,0x70,0x30,0x82,0x01,0x6c,0x30,0x1f,0x06,0x03, -0x55,0x1d,0x23,0x04,0x18,0x30,0x16,0x80,0x14,0x36,0x12,0x4e,0x9e,0x71,0xc4,0x26, -0x41,0xf1,0xfa,0xf1,0x29,0x4c,0xbf,0x17,0xa4,0x53,0x28,0xb6,0xeb,0x30,0x49,0x06, -0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x01,0x01,0x04,0x3d,0x30,0x3b,0x30,0x39,0x06, -0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x30,0x02,0x86,0x2d,0x68,0x74,0x74,0x70,0x3a, -0x2f,0x2f,0x73,0x65,0x63,0x75,0x72,0x65,0x2e,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x73, -0x69,0x67,0x6e,0x2e,0x6e,0x65,0x74,0x2f,0x63,0x61,0x63,0x65,0x72,0x74,0x2f,0x64, -0x76,0x68,0x65,0x31,0x2e,0x63,0x72,0x74,0x30,0x39,0x06,0x03,0x55,0x1d,0x1f,0x04, -0x32,0x30,0x30,0x30,0x2e,0xa0,0x2c,0xa0,0x2a,0x86,0x28,0x68,0x74,0x74,0x70,0x3a, -0x2f,0x2f,0x63,0x72,0x6c,0x2e,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x73,0x69,0x67,0x6e, -0x2e,0x6e,0x65,0x74,0x2f,0x44,0x6f,0x6d,0x61,0x69,0x6e,0x56,0x61,0x6c,0x31,0x2e, -0x63,0x72,0x6c,0x30,0x1d,0x06,0x03,0x55,0x1d,0x0e,0x04,0x16,0x04,0x14,0xec,0x81, -0x7d,0x47,0xa8,0xc0,0x19,0xa7,0xbc,0x6b,0x52,0x5e,0xb6,0x90,0xfb,0x17,0xae,0x7f, -0x41,0x8f,0x30,0x09,0x06,0x03,0x55,0x1d,0x13,0x04,0x02,0x30,0x00,0x30,0x0e,0x06, -0x03,0x55,0x1d,0x0f,0x01,0x01,0xff,0x04,0x04,0x03,0x02,0x04,0xf0,0x30,0x29,0x06, -0x03,0x55,0x1d,0x25,0x04,0x22,0x30,0x20,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07, -0x03,0x01,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x03,0x02,0x06,0x0a,0x2b,0x06, -0x01,0x04,0x01,0x82,0x37,0x0a,0x03,0x03,0x30,0x4b,0x06,0x03,0x55,0x1d,0x20,0x04, -0x44,0x30,0x42,0x30,0x40,0x06,0x09,0x2b,0x06,0x01,0x04,0x01,0xa0,0x32,0x01,0x0a, -0x30,0x33,0x30,0x31,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x02,0x01,0x16,0x25, -0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x67,0x6c,0x6f,0x62,0x61, -0x6c,0x73,0x69,0x67,0x6e,0x2e,0x6e,0x65,0x74,0x2f,0x72,0x65,0x70,0x6f,0x73,0x69, -0x74,0x6f,0x72,0x79,0x2f,0x30,0x11,0x06,0x09,0x60,0x86,0x48,0x01,0x86,0xf8,0x42, -0x01,0x01,0x04,0x04,0x03,0x02,0x06,0xc0,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86, -0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x2b,0x22,0xdd,0xa3, -0x1a,0xf9,0x12,0xee,0x77,0xbf,0x34,0xdd,0xbf,0x57,0x98,0x72,0xb3,0x05,0x8d,0x49, -0xa4,0x5d,0x55,0xec,0x08,0xf4,0x70,0xb9,0x83,0xaf,0x57,0xb2,0x0f,0x54,0x12,0xc5, -0xf4,0x0e,0x6e,0xd9,0xe4,0xd4,0x7c,0x6a,0x11,0x4a,0xd7,0xc3,0x46,0x42,0x7e,0x13, -0x4c,0x39,0x1b,0xe3,0x53,0xb1,0x8b,0x8a,0xd7,0xa2,0x74,0xcb,0x18,0x0a,0x40,0x50, -0xbe,0xbe,0x86,0x81,0xa9,0x8e,0x23,0x0b,0xa0,0x38,0x02,0x1c,0x55,0x57,0xfd,0xf7, -0x98,0x43,0x7f,0x6e,0xe9,0x26,0xc5,0x64,0x7d,0x8a,0x42,0xfb,0x67,0xbd,0x93,0x39, -0x75,0x49,0xcd,0x26,0x20,0x71,0xb4,0x65,0xca,0x04,0x15,0xfb,0x1a,0xcb,0x80,0x2e, -0x20,0x43,0x81,0x3e,0x58,0x7f,0x3f,0x2c,0x93,0x92,0x06,0x96,0x69,0xb0,0x49,0x4c, -0xd1,0xa8,0x53,0x9b,0x41,0x55,0x13,0x75,0xc3,0x51,0xe8,0x16,0x3d,0x3e,0x6f,0xbd, -0xb7,0x0c,0x49,0x48,0x64,0x97,0xb4,0x14,0x89,0x57,0x62,0x75,0x32,0x31,0xda,0x94, -0x82,0xf8,0xb3,0xc6,0x02,0x20,0x5e,0x0e,0x00,0x87,0x9c,0x0f,0x34,0x65,0xda,0xf2, -0x47,0x78,0x18,0xf5,0xd5,0xea,0xf3,0x93,0x4e,0x60,0xd6,0x6b,0x7a,0xe8,0x88,0xd7, -0x69,0x41,0xaa,0x10,0x56,0xd7,0x16,0x14,0xde,0xc9,0x1c,0xb6,0xb6,0x10,0xab,0x6b, -0x97,0xbd,0x6a,0xa9,0xb7,0x67,0xd7,0x96,0xeb,0x52,0x12,0x9e,0x9a,0x69,0xaf,0x38, -0x53,0x4d,0x99,0xd8,0x84,0xea,0x54,0xba,0x89,0x67,0xff,0x40,0x66,0x0d,0x53,0x99, -0xb6,0x65,0xba,0xf3,0x8a,0x01,0x3d,0xd0,0xf1,0x21,0x5f,0xdd -}; -/* entrust_ca -> aaa_certificate_services -> cs_stanford_edu: - * cs.stanford.edu's chain, also valid for www.cs.stanford.edu - */ -static const BYTE entrust_ca[] = { -0x30,0x82,0x04,0xd8,0x30,0x82,0x04,0x41,0xa0,0x03,0x02,0x01,0x02,0x02,0x04,0x37, -0x4a,0xd2,0x43,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05, -0x05,0x00,0x30,0x81,0xc3,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02, -0x55,0x53,0x31,0x14,0x30,0x12,0x06,0x03,0x55,0x04,0x0a,0x13,0x0b,0x45,0x6e,0x74, -0x72,0x75,0x73,0x74,0x2e,0x6e,0x65,0x74,0x31,0x3b,0x30,0x39,0x06,0x03,0x55,0x04, -0x0b,0x13,0x32,0x77,0x77,0x77,0x2e,0x65,0x6e,0x74,0x72,0x75,0x73,0x74,0x2e,0x6e, -0x65,0x74,0x2f,0x43,0x50,0x53,0x20,0x69,0x6e,0x63,0x6f,0x72,0x70,0x2e,0x20,0x62, -0x79,0x20,0x72,0x65,0x66,0x2e,0x20,0x28,0x6c,0x69,0x6d,0x69,0x74,0x73,0x20,0x6c, -0x69,0x61,0x62,0x2e,0x29,0x31,0x25,0x30,0x23,0x06,0x03,0x55,0x04,0x0b,0x13,0x1c, -0x28,0x63,0x29,0x20,0x31,0x39,0x39,0x39,0x20,0x45,0x6e,0x74,0x72,0x75,0x73,0x74, -0x2e,0x6e,0x65,0x74,0x20,0x4c,0x69,0x6d,0x69,0x74,0x65,0x64,0x31,0x3a,0x30,0x38, -0x06,0x03,0x55,0x04,0x03,0x13,0x31,0x45,0x6e,0x74,0x72,0x75,0x73,0x74,0x2e,0x6e, -0x65,0x74,0x20,0x53,0x65,0x63,0x75,0x72,0x65,0x20,0x53,0x65,0x72,0x76,0x65,0x72, -0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x41, -0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x30,0x1e,0x17,0x0d,0x39,0x39,0x30,0x35, -0x32,0x35,0x31,0x36,0x30,0x39,0x34,0x30,0x5a,0x17,0x0d,0x31,0x39,0x30,0x35,0x32, -0x35,0x31,0x36,0x33,0x39,0x34,0x30,0x5a,0x30,0x81,0xc3,0x31,0x0b,0x30,0x09,0x06, -0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x14,0x30,0x12,0x06,0x03,0x55,0x04, -0x0a,0x13,0x0b,0x45,0x6e,0x74,0x72,0x75,0x73,0x74,0x2e,0x6e,0x65,0x74,0x31,0x3b, -0x30,0x39,0x06,0x03,0x55,0x04,0x0b,0x13,0x32,0x77,0x77,0x77,0x2e,0x65,0x6e,0x74, -0x72,0x75,0x73,0x74,0x2e,0x6e,0x65,0x74,0x2f,0x43,0x50,0x53,0x20,0x69,0x6e,0x63, -0x6f,0x72,0x70,0x2e,0x20,0x62,0x79,0x20,0x72,0x65,0x66,0x2e,0x20,0x28,0x6c,0x69, -0x6d,0x69,0x74,0x73,0x20,0x6c,0x69,0x61,0x62,0x2e,0x29,0x31,0x25,0x30,0x23,0x06, -0x03,0x55,0x04,0x0b,0x13,0x1c,0x28,0x63,0x29,0x20,0x31,0x39,0x39,0x39,0x20,0x45, -0x6e,0x74,0x72,0x75,0x73,0x74,0x2e,0x6e,0x65,0x74,0x20,0x4c,0x69,0x6d,0x69,0x74, -0x65,0x64,0x31,0x3a,0x30,0x38,0x06,0x03,0x55,0x04,0x03,0x13,0x31,0x45,0x6e,0x74, -0x72,0x75,0x73,0x74,0x2e,0x6e,0x65,0x74,0x20,0x53,0x65,0x63,0x75,0x72,0x65,0x20, -0x53,0x65,0x72,0x76,0x65,0x72,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61, -0x74,0x69,0x6f,0x6e,0x20,0x41,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x30,0x81, -0x9d,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00, -0x03,0x81,0x8b,0x00,0x30,0x81,0x87,0x02,0x81,0x81,0x00,0xcd,0x28,0x83,0x34,0x54, -0x1b,0x89,0xf3,0x0f,0xaf,0x37,0x91,0x31,0xff,0xaf,0x31,0x60,0xc9,0xa8,0xe8,0xb2, -0x10,0x68,0xed,0x9f,0xe7,0x93,0x36,0xf1,0x0a,0x64,0xbb,0x47,0xf5,0x04,0x17,0x3f, -0x23,0x47,0x4d,0xc5,0x27,0x19,0x81,0x26,0x0c,0x54,0x72,0x0d,0x88,0x2d,0xd9,0x1f, -0x9a,0x12,0x9f,0xbc,0xb3,0x71,0xd3,0x80,0x19,0x3f,0x47,0x66,0x7b,0x8c,0x35,0x28, -0xd2,0xb9,0x0a,0xdf,0x24,0xda,0x9c,0xd6,0x50,0x79,0x81,0x7a,0x5a,0xd3,0x37,0xf7, -0xc2,0x4a,0xd8,0x29,0x92,0x26,0x64,0xd1,0xe4,0x98,0x6c,0x3a,0x00,0x8a,0xf5,0x34, -0x9b,0x65,0xf8,0xed,0xe3,0x10,0xff,0xfd,0xb8,0x49,0x58,0xdc,0xa0,0xde,0x82,0x39, -0x6b,0x81,0xb1,0x16,0x19,0x61,0xb9,0x54,0xb6,0xe6,0x43,0x02,0x01,0x03,0xa3,0x82, -0x01,0xd7,0x30,0x82,0x01,0xd3,0x30,0x11,0x06,0x09,0x60,0x86,0x48,0x01,0x86,0xf8, -0x42,0x01,0x01,0x04,0x04,0x03,0x02,0x00,0x07,0x30,0x82,0x01,0x19,0x06,0x03,0x55, -0x1d,0x1f,0x04,0x82,0x01,0x10,0x30,0x82,0x01,0x0c,0x30,0x81,0xde,0xa0,0x81,0xdb, -0xa0,0x81,0xd8,0xa4,0x81,0xd5,0x30,0x81,0xd2,0x31,0x0b,0x30,0x09,0x06,0x03,0x55, -0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x14,0x30,0x12,0x06,0x03,0x55,0x04,0x0a,0x13, -0x0b,0x45,0x6e,0x74,0x72,0x75,0x73,0x74,0x2e,0x6e,0x65,0x74,0x31,0x3b,0x30,0x39, -0x06,0x03,0x55,0x04,0x0b,0x13,0x32,0x77,0x77,0x77,0x2e,0x65,0x6e,0x74,0x72,0x75, -0x73,0x74,0x2e,0x6e,0x65,0x74,0x2f,0x43,0x50,0x53,0x20,0x69,0x6e,0x63,0x6f,0x72, -0x70,0x2e,0x20,0x62,0x79,0x20,0x72,0x65,0x66,0x2e,0x20,0x28,0x6c,0x69,0x6d,0x69, -0x74,0x73,0x20,0x6c,0x69,0x61,0x62,0x2e,0x29,0x31,0x25,0x30,0x23,0x06,0x03,0x55, -0x04,0x0b,0x13,0x1c,0x28,0x63,0x29,0x20,0x31,0x39,0x39,0x39,0x20,0x45,0x6e,0x74, -0x72,0x75,0x73,0x74,0x2e,0x6e,0x65,0x74,0x20,0x4c,0x69,0x6d,0x69,0x74,0x65,0x64, -0x31,0x3a,0x30,0x38,0x06,0x03,0x55,0x04,0x03,0x13,0x31,0x45,0x6e,0x74,0x72,0x75, -0x73,0x74,0x2e,0x6e,0x65,0x74,0x20,0x53,0x65,0x63,0x75,0x72,0x65,0x20,0x53,0x65, -0x72,0x76,0x65,0x72,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69, -0x6f,0x6e,0x20,0x41,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x31,0x0d,0x30,0x0b, -0x06,0x03,0x55,0x04,0x03,0x13,0x04,0x43,0x52,0x4c,0x31,0x30,0x29,0xa0,0x27,0xa0, -0x25,0x86,0x23,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x65,0x6e, -0x74,0x72,0x75,0x73,0x74,0x2e,0x6e,0x65,0x74,0x2f,0x43,0x52,0x4c,0x2f,0x6e,0x65, -0x74,0x31,0x2e,0x63,0x72,0x6c,0x30,0x2b,0x06,0x03,0x55,0x1d,0x10,0x04,0x24,0x30, -0x22,0x80,0x0f,0x31,0x39,0x39,0x39,0x30,0x35,0x32,0x35,0x31,0x36,0x30,0x39,0x34, -0x30,0x5a,0x81,0x0f,0x32,0x30,0x31,0x39,0x30,0x35,0x32,0x35,0x31,0x36,0x30,0x39, -0x34,0x30,0x5a,0x30,0x0b,0x06,0x03,0x55,0x1d,0x0f,0x04,0x04,0x03,0x02,0x01,0x06, -0x30,0x1f,0x06,0x03,0x55,0x1d,0x23,0x04,0x18,0x30,0x16,0x80,0x14,0xf0,0x17,0x62, -0x13,0x55,0x3d,0xb3,0xff,0x0a,0x00,0x6b,0xfb,0x50,0x84,0x97,0xf3,0xed,0x62,0xd0, -0x1a,0x30,0x1d,0x06,0x03,0x55,0x1d,0x0e,0x04,0x16,0x04,0x14,0xf0,0x17,0x62,0x13, -0x55,0x3d,0xb3,0xff,0x0a,0x00,0x6b,0xfb,0x50,0x84,0x97,0xf3,0xed,0x62,0xd0,0x1a, -0x30,0x0c,0x06,0x03,0x55,0x1d,0x13,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x19, -0x06,0x09,0x2a,0x86,0x48,0x86,0xf6,0x7d,0x07,0x41,0x00,0x04,0x0c,0x30,0x0a,0x1b, -0x04,0x56,0x34,0x2e,0x30,0x03,0x02,0x04,0x90,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x90,0xdc,0x30,0x02, -0xfa,0x64,0x74,0xc2,0xa7,0x0a,0xa5,0x7c,0x21,0x8d,0x34,0x17,0xa8,0xfb,0x47,0x0e, -0xff,0x25,0x7c,0x8d,0x13,0x0a,0xfb,0xe4,0x98,0xb5,0xef,0x8c,0xf8,0xc5,0x10,0x0d, -0xf7,0x92,0xbe,0xf1,0xc3,0xd5,0xd5,0x95,0x6a,0x04,0xbb,0x2c,0xce,0x26,0x36,0x65, -0xc8,0x31,0xc6,0xe7,0xee,0x3f,0xe3,0x57,0x75,0x84,0x7a,0x11,0xef,0x46,0x4f,0x18, -0xf4,0xd3,0x98,0xbb,0xa8,0x87,0x32,0xba,0x72,0xf6,0x3c,0xe2,0x3d,0x9f,0xd7,0x1d, -0xd9,0xc3,0x60,0x43,0x8c,0x58,0x0e,0x22,0x96,0x2f,0x62,0xa3,0x2c,0x1f,0xba,0xad, -0x05,0xef,0xab,0x32,0x78,0x87,0xa0,0x54,0x73,0x19,0xb5,0x5c,0x05,0xf9,0x52,0x3e, -0x6d,0x2d,0x45,0x0b,0xf7,0x0a,0x93,0xea,0xed,0x06,0xf9,0xb2 -}; -static const BYTE aaa_certificate_services[] = { -0x30,0x82,0x04,0xf9,0x30,0x82,0x04,0x62,0xa0,0x03,0x02,0x01,0x02,0x02,0x04,0x42, -0x86,0xf2,0x3d,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05, -0x05,0x00,0x30,0x81,0xc3,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02, -0x55,0x53,0x31,0x14,0x30,0x12,0x06,0x03,0x55,0x04,0x0a,0x13,0x0b,0x45,0x6e,0x74, -0x72,0x75,0x73,0x74,0x2e,0x6e,0x65,0x74,0x31,0x3b,0x30,0x39,0x06,0x03,0x55,0x04, -0x0b,0x13,0x32,0x77,0x77,0x77,0x2e,0x65,0x6e,0x74,0x72,0x75,0x73,0x74,0x2e,0x6e, -0x65,0x74,0x2f,0x43,0x50,0x53,0x20,0x69,0x6e,0x63,0x6f,0x72,0x70,0x2e,0x20,0x62, -0x79,0x20,0x72,0x65,0x66,0x2e,0x20,0x28,0x6c,0x69,0x6d,0x69,0x74,0x73,0x20,0x6c, -0x69,0x61,0x62,0x2e,0x29,0x31,0x25,0x30,0x23,0x06,0x03,0x55,0x04,0x0b,0x13,0x1c, -0x28,0x63,0x29,0x20,0x31,0x39,0x39,0x39,0x20,0x45,0x6e,0x74,0x72,0x75,0x73,0x74, -0x2e,0x6e,0x65,0x74,0x20,0x4c,0x69,0x6d,0x69,0x74,0x65,0x64,0x31,0x3a,0x30,0x38, -0x06,0x03,0x55,0x04,0x03,0x13,0x31,0x45,0x6e,0x74,0x72,0x75,0x73,0x74,0x2e,0x6e, -0x65,0x74,0x20,0x53,0x65,0x63,0x75,0x72,0x65,0x20,0x53,0x65,0x72,0x76,0x65,0x72, -0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x41, -0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x30,0x1e,0x17,0x0d,0x30,0x36,0x31,0x30, -0x31,0x39,0x31,0x34,0x33,0x39,0x35,0x31,0x5a,0x17,0x0d,0x31,0x32,0x31,0x30,0x31, -0x39,0x31,0x35,0x30,0x39,0x35,0x31,0x5a,0x30,0x7b,0x31,0x0b,0x30,0x09,0x06,0x03, -0x55,0x04,0x06,0x13,0x02,0x47,0x42,0x31,0x1b,0x30,0x19,0x06,0x03,0x55,0x04,0x08, -0x13,0x12,0x47,0x72,0x65,0x61,0x74,0x65,0x72,0x20,0x4d,0x61,0x6e,0x63,0x68,0x65, -0x73,0x74,0x65,0x72,0x31,0x10,0x30,0x0e,0x06,0x03,0x55,0x04,0x07,0x13,0x07,0x53, -0x61,0x6c,0x66,0x6f,0x72,0x64,0x31,0x1a,0x30,0x18,0x06,0x03,0x55,0x04,0x0a,0x13, -0x11,0x43,0x6f,0x6d,0x6f,0x64,0x6f,0x20,0x43,0x41,0x20,0x4c,0x69,0x6d,0x69,0x74, -0x65,0x64,0x31,0x21,0x30,0x1f,0x06,0x03,0x55,0x04,0x03,0x13,0x18,0x41,0x41,0x41, -0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x65,0x20,0x53,0x65,0x72, -0x76,0x69,0x63,0x65,0x73,0x30,0x82,0x01,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01, -0x0a,0x02,0x82,0x01,0x01,0x00,0xb0,0x4e,0x2e,0xd1,0x3f,0x51,0x8f,0x37,0x99,0x5d, -0x76,0x6c,0xf8,0xe1,0x23,0x02,0x93,0x44,0x2b,0x4c,0x88,0xf2,0x50,0x04,0x90,0xc6, -0xd7,0xca,0xd7,0x40,0xfe,0xcd,0x17,0xda,0x94,0x6b,0x73,0xf0,0x3d,0x0a,0x9b,0x23, -0xdd,0x98,0x18,0x07,0x62,0xa8,0x6e,0x11,0x99,0x78,0x3d,0x72,0x90,0x14,0x96,0x71, -0xfe,0xfa,0x8f,0xf5,0x03,0x84,0x8e,0xfb,0x85,0xa5,0xc5,0xe4,0xf7,0xed,0xe4,0x78, -0xbe,0xdf,0xaa,0xc7,0x9c,0xc7,0x9f,0xdf,0x21,0xdf,0x7d,0xcf,0x60,0xd4,0x70,0xbb, -0xd4,0xca,0xa6,0x5b,0xb9,0xd7,0x0e,0x6e,0x94,0x55,0x76,0x2d,0x19,0x8c,0x95,0x3a, -0x26,0x2e,0x91,0x67,0x93,0x67,0x27,0xfe,0x94,0x0a,0x48,0x62,0x9d,0x8f,0x98,0xe1, -0x25,0x63,0x4b,0xbe,0x2b,0x92,0x36,0x4f,0x11,0x48,0x39,0x66,0xe1,0xb1,0x1c,0x26, -0x35,0x56,0xe9,0x3d,0xdb,0x8e,0xff,0x1f,0x6e,0x24,0x63,0x0f,0x75,0x75,0x53,0x17, -0x48,0x5c,0x30,0x8f,0xd0,0x04,0xba,0x5e,0xc3,0xe9,0xdb,0x2f,0x1d,0x18,0x06,0x16, -0x71,0xff,0x8a,0xf6,0x99,0xc1,0x79,0x5f,0x82,0xed,0xd8,0xa0,0x2f,0x46,0x06,0xa4, -0xeb,0x29,0xe6,0x8e,0xfd,0x52,0x8d,0xbd,0x83,0x57,0xd0,0x2f,0x71,0x15,0x0e,0xcc, -0x0b,0xf6,0x8e,0xfa,0xab,0x0e,0xfa,0xa0,0xac,0x68,0x97,0xad,0xfd,0x59,0xfc,0x19, -0x13,0x33,0x7b,0x0b,0x83,0x6a,0x90,0x63,0x55,0x26,0xe7,0x78,0x05,0x8a,0xb8,0x1c, -0xef,0x75,0xc1,0xc2,0x27,0x9f,0x4e,0x97,0x04,0x29,0xd0,0x97,0xc1,0x41,0xd8,0xbc, -0x0f,0x13,0xdc,0xa2,0x58,0xb9,0x02,0x03,0x01,0x00,0x01,0xa3,0x82,0x01,0xbb,0x30, -0x82,0x01,0xb7,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30, -0x06,0x01,0x01,0xff,0x02,0x01,0x00,0x30,0x1d,0x06,0x03,0x55,0x1d,0x25,0x04,0x16, -0x30,0x14,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x03,0x01,0x06,0x08,0x2b,0x06, -0x01,0x05,0x05,0x07,0x03,0x02,0x30,0x1d,0x06,0x03,0x55,0x1d,0x0e,0x04,0x16,0x04, -0x14,0x30,0x43,0xdc,0x64,0xcd,0x19,0x5c,0xa9,0xf3,0x19,0xd2,0x37,0x09,0x96,0x91, -0x9e,0x0c,0xe8,0xd6,0x3d,0x30,0x82,0x01,0x18,0x06,0x03,0x55,0x1d,0x1f,0x04,0x82, -0x01,0x0f,0x30,0x82,0x01,0x0b,0x30,0x28,0xa0,0x26,0xa0,0x24,0x86,0x22,0x68,0x74, -0x74,0x70,0x3a,0x2f,0x2f,0x63,0x72,0x6c,0x2e,0x65,0x6e,0x74,0x72,0x75,0x73,0x74, -0x2e,0x6e,0x65,0x74,0x2f,0x73,0x65,0x72,0x76,0x65,0x72,0x31,0x2e,0x63,0x72,0x6c, -0x30,0x81,0xde,0xa0,0x81,0xdb,0xa0,0x81,0xd8,0xa4,0x81,0xd5,0x30,0x81,0xd2,0x31, -0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x14,0x30,0x12, -0x06,0x03,0x55,0x04,0x0a,0x13,0x0b,0x45,0x6e,0x74,0x72,0x75,0x73,0x74,0x2e,0x6e, -0x65,0x74,0x31,0x3b,0x30,0x39,0x06,0x03,0x55,0x04,0x0b,0x13,0x32,0x77,0x77,0x77, -0x2e,0x65,0x6e,0x74,0x72,0x75,0x73,0x74,0x2e,0x6e,0x65,0x74,0x2f,0x43,0x50,0x53, -0x20,0x69,0x6e,0x63,0x6f,0x72,0x70,0x2e,0x20,0x62,0x79,0x20,0x72,0x65,0x66,0x2e, -0x20,0x28,0x6c,0x69,0x6d,0x69,0x74,0x73,0x20,0x6c,0x69,0x61,0x62,0x2e,0x29,0x31, -0x25,0x30,0x23,0x06,0x03,0x55,0x04,0x0b,0x13,0x1c,0x28,0x63,0x29,0x20,0x31,0x39, -0x39,0x39,0x20,0x45,0x6e,0x74,0x72,0x75,0x73,0x74,0x2e,0x6e,0x65,0x74,0x20,0x4c, -0x69,0x6d,0x69,0x74,0x65,0x64,0x31,0x3a,0x30,0x38,0x06,0x03,0x55,0x04,0x03,0x13, -0x31,0x45,0x6e,0x74,0x72,0x75,0x73,0x74,0x2e,0x6e,0x65,0x74,0x20,0x53,0x65,0x63, -0x75,0x72,0x65,0x20,0x53,0x65,0x72,0x76,0x65,0x72,0x20,0x43,0x65,0x72,0x74,0x69, -0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x41,0x75,0x74,0x68,0x6f,0x72,0x69, -0x74,0x79,0x31,0x0d,0x30,0x0b,0x06,0x03,0x55,0x04,0x03,0x13,0x04,0x43,0x52,0x4c, -0x31,0x30,0x0b,0x06,0x03,0x55,0x1d,0x0f,0x04,0x04,0x03,0x02,0x01,0x06,0x30,0x1f, -0x06,0x03,0x55,0x1d,0x23,0x04,0x18,0x30,0x16,0x80,0x14,0xf0,0x17,0x62,0x13,0x55, -0x3d,0xb3,0xff,0x0a,0x00,0x6b,0xfb,0x50,0x84,0x97,0xf3,0xed,0x62,0xd0,0x1a,0x30, -0x19,0x06,0x09,0x2a,0x86,0x48,0x86,0xf6,0x7d,0x07,0x41,0x00,0x04,0x0c,0x30,0x0a, -0x1b,0x04,0x56,0x37,0x2e,0x31,0x03,0x02,0x00,0x81,0x30,0x0d,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x54,0x80,0x38, -0xb7,0xb0,0x67,0x2a,0xdd,0xe0,0x10,0xd9,0x0b,0x16,0x65,0xf3,0x96,0x6f,0x41,0x30, -0x3e,0xdf,0xde,0xbb,0xf8,0x5a,0x36,0x51,0x31,0xd7,0x2f,0x0f,0xfa,0x5d,0x23,0x96, -0x98,0xaa,0x45,0xa0,0x18,0x0a,0x82,0x9a,0x11,0x36,0x63,0x58,0x50,0x50,0xa5,0xc1, -0xc3,0x2a,0x3e,0x1d,0xe1,0x6d,0xf6,0x7e,0x3d,0x4a,0xd3,0x99,0xce,0xfe,0xa8,0xaf, -0x0b,0x45,0xc2,0xdb,0xc2,0xb8,0xe9,0x49,0xc5,0xa1,0x62,0xed,0x75,0x66,0xe6,0xde, -0x8b,0x5b,0x73,0x70,0xfa,0x9c,0x4b,0x90,0x51,0x13,0xd7,0x48,0x98,0xc6,0x54,0x12, -0xd4,0xee,0x89,0xc7,0xc9,0xcf,0x00,0x37,0xe7,0xb3,0xd3,0x65,0x8b,0x2c,0xe7,0xf8, -0x3f,0xf1,0x0b,0xe3,0x7a,0x06,0xf9,0x29,0x7e,0xcf,0xb9,0x14,0x76 -}; -static const BYTE cs_stanford_edu[] = { -0x30,0x82,0x05,0x4b,0x30,0x82,0x04,0x33,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,0x48, -0xdb,0xe2,0x6b,0x07,0xd2,0x79,0x67,0x28,0x23,0xaa,0xaf,0x71,0x4b,0xff,0xc9,0x30, -0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x30,0x7b, -0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x47,0x42,0x31,0x1b,0x30, -0x19,0x06,0x03,0x55,0x04,0x08,0x13,0x12,0x47,0x72,0x65,0x61,0x74,0x65,0x72,0x20, -0x4d,0x61,0x6e,0x63,0x68,0x65,0x73,0x74,0x65,0x72,0x31,0x10,0x30,0x0e,0x06,0x03, -0x55,0x04,0x07,0x13,0x07,0x53,0x61,0x6c,0x66,0x6f,0x72,0x64,0x31,0x1a,0x30,0x18, -0x06,0x03,0x55,0x04,0x0a,0x13,0x11,0x43,0x6f,0x6d,0x6f,0x64,0x6f,0x20,0x43,0x41, -0x20,0x4c,0x69,0x6d,0x69,0x74,0x65,0x64,0x31,0x21,0x30,0x1f,0x06,0x03,0x55,0x04, -0x03,0x13,0x18,0x41,0x41,0x41,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61, -0x74,0x65,0x20,0x53,0x65,0x72,0x76,0x69,0x63,0x65,0x73,0x30,0x1e,0x17,0x0d,0x30, -0x39,0x30,0x37,0x31,0x37,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x31,0x32, -0x30,0x37,0x31,0x36,0x32,0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x82,0x01,0x15,0x31, -0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x43,0x41,0x31,0x0e,0x30,0x0c, -0x06,0x03,0x55,0x04,0x11,0x13,0x05,0x39,0x34,0x33,0x30,0x35,0x31,0x14,0x30,0x12, -0x06,0x03,0x55,0x04,0x08,0x13,0x0b,0x53,0x61,0x6e,0x74,0x61,0x20,0x43,0x6c,0x61, -0x72,0x61,0x31,0x12,0x30,0x10,0x06,0x03,0x55,0x04,0x07,0x13,0x09,0x50,0x61,0x6c, -0x6f,0x20,0x41,0x6c,0x74,0x6f,0x31,0x17,0x30,0x15,0x06,0x03,0x55,0x04,0x09,0x13, -0x0e,0x50,0x6f,0x6c,0x79,0x61,0x20,0x48,0x61,0x6c,0x6c,0x20,0x32,0x35,0x31,0x31, -0x1c,0x30,0x1a,0x06,0x03,0x55,0x04,0x0a,0x13,0x13,0x53,0x74,0x61,0x6e,0x66,0x6f, -0x72,0x64,0x20,0x55,0x6e,0x69,0x76,0x65,0x72,0x73,0x69,0x74,0x79,0x31,0x24,0x30, -0x22,0x06,0x03,0x55,0x04,0x0b,0x13,0x1b,0x43,0x6f,0x6d,0x70,0x75,0x74,0x65,0x72, -0x20,0x53,0x63,0x69,0x65,0x6e,0x63,0x65,0x20,0x44,0x65,0x70,0x61,0x72,0x74,0x6d, -0x65,0x6e,0x74,0x31,0x39,0x30,0x37,0x06,0x03,0x55,0x04,0x0b,0x13,0x30,0x49,0x73, -0x73,0x75,0x65,0x64,0x20,0x74,0x68,0x72,0x6f,0x75,0x67,0x68,0x20,0x53,0x74,0x61, -0x6e,0x66,0x6f,0x72,0x64,0x20,0x55,0x6e,0x69,0x76,0x65,0x72,0x73,0x69,0x74,0x79, -0x20,0x45,0x2d,0x50,0x4b,0x49,0x20,0x4d,0x61,0x6e,0x61,0x67,0x65,0x72,0x31,0x1a, -0x30,0x18,0x06,0x03,0x55,0x04,0x0b,0x13,0x11,0x43,0x6f,0x6d,0x6f,0x64,0x6f,0x20, -0x49,0x6e,0x73,0x74,0x61,0x6e,0x74,0x53,0x53,0x4c,0x31,0x18,0x30,0x16,0x06,0x03, -0x55,0x04,0x03,0x13,0x0f,0x63,0x73,0x2e,0x73,0x74,0x61,0x6e,0x66,0x6f,0x72,0x64, -0x2e,0x65,0x64,0x75,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7, -0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,0x02,0x81,0x81, -0x00,0xc6,0x3a,0x6d,0xf1,0x1e,0xe4,0x69,0xb8,0x32,0xab,0xdb,0xab,0x97,0xe6,0x48, -0xfb,0xba,0xbb,0xce,0xbf,0x34,0x51,0x1b,0xbb,0x17,0x4d,0xac,0x7f,0x46,0xa7,0xe4, -0xbd,0x95,0xb5,0xd1,0x02,0x01,0xcf,0x33,0x94,0xe3,0x42,0xfe,0x50,0x9b,0x20,0xb7, -0x3e,0x49,0x28,0xba,0x34,0x61,0x35,0xa7,0x34,0x44,0x31,0x8b,0xe9,0x6e,0x35,0xd8, -0x36,0xd7,0xd4,0x2e,0x35,0xe1,0x49,0xe7,0x71,0x1f,0x39,0xbf,0x30,0xc4,0x77,0x1b, -0xdf,0xe5,0x12,0x26,0x98,0xf0,0xb1,0x8b,0x3c,0x8f,0x2d,0x18,0x27,0x57,0x62,0x5b, -0x61,0xe0,0xba,0xb0,0xdb,0x43,0xdb,0x71,0x9e,0x43,0x4d,0xc9,0xca,0x35,0x8d,0x32, -0xb4,0x1d,0x26,0x79,0xea,0x6e,0xb2,0x9b,0xb9,0x5a,0x3a,0xd3,0x54,0x09,0xcf,0xbe, -0xf5,0x02,0x03,0x01,0x00,0x01,0xa3,0x82,0x01,0xb1,0x30,0x82,0x01,0xad,0x30,0x1f, -0x06,0x03,0x55,0x1d,0x23,0x04,0x18,0x30,0x16,0x80,0x14,0x30,0x43,0xdc,0x64,0xcd, -0x19,0x5c,0xa9,0xf3,0x19,0xd2,0x37,0x09,0x96,0x91,0x9e,0x0c,0xe8,0xd6,0x3d,0x30, -0x1d,0x06,0x03,0x55,0x1d,0x0e,0x04,0x16,0x04,0x14,0x40,0x81,0x69,0xb7,0x41,0xa2, -0xee,0x6d,0x86,0xd0,0x85,0xb8,0x98,0xfd,0x83,0xb8,0xde,0xe9,0xa4,0x36,0x30,0x0e, -0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,0xff,0x04,0x04,0x03,0x02,0x05,0xa0,0x30,0x0c, -0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x02,0x30,0x00,0x30,0x1d,0x06,0x03, -0x55,0x1d,0x25,0x04,0x16,0x30,0x14,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x03, -0x01,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x03,0x02,0x30,0x46,0x06,0x03,0x55, -0x1d,0x20,0x04,0x3f,0x30,0x3d,0x30,0x3b,0x06,0x0c,0x2b,0x06,0x01,0x04,0x01,0xb2, -0x31,0x01,0x02,0x01,0x03,0x04,0x30,0x2b,0x30,0x29,0x06,0x08,0x2b,0x06,0x01,0x05, -0x05,0x07,0x02,0x01,0x16,0x1d,0x68,0x74,0x74,0x70,0x73,0x3a,0x2f,0x2f,0x73,0x65, -0x63,0x75,0x72,0x65,0x2e,0x63,0x6f,0x6d,0x6f,0x64,0x6f,0x2e,0x6e,0x65,0x74,0x2f, -0x43,0x50,0x53,0x30,0x7f,0x06,0x03,0x55,0x1d,0x1f,0x04,0x78,0x30,0x76,0x30,0x3a, -0xa0,0x38,0xa0,0x36,0x86,0x34,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x63,0x72,0x6c, -0x2e,0x63,0x6f,0x6d,0x6f,0x64,0x6f,0x63,0x61,0x2e,0x63,0x6f,0x6d,0x2f,0x41,0x41, -0x41,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x65,0x53,0x65,0x72,0x76, -0x69,0x63,0x65,0x73,0x5f,0x32,0x2e,0x63,0x72,0x6c,0x30,0x38,0xa0,0x36,0xa0,0x34, -0x86,0x32,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x63,0x72,0x6c,0x2e,0x63,0x6f,0x6d, -0x6f,0x64,0x6f,0x2e,0x6e,0x65,0x74,0x2f,0x41,0x41,0x41,0x43,0x65,0x72,0x74,0x69, -0x66,0x69,0x63,0x61,0x74,0x65,0x53,0x65,0x72,0x76,0x69,0x63,0x65,0x73,0x5f,0x32, -0x2e,0x63,0x72,0x6c,0x30,0x34,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x01,0x01, -0x04,0x28,0x30,0x26,0x30,0x24,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x30,0x01, -0x86,0x18,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6f,0x63,0x73,0x70,0x2e,0x63,0x6f, -0x6d,0x6f,0x64,0x6f,0x63,0x61,0x2e,0x63,0x6f,0x6d,0x30,0x2f,0x06,0x03,0x55,0x1d, -0x11,0x04,0x28,0x30,0x26,0x82,0x0f,0x63,0x73,0x2e,0x73,0x74,0x61,0x6e,0x66,0x6f, -0x72,0x64,0x2e,0x65,0x64,0x75,0x82,0x13,0x77,0x77,0x77,0x2e,0x63,0x73,0x2e,0x73, -0x74,0x61,0x6e,0x66,0x6f,0x72,0x64,0x2e,0x65,0x64,0x75,0x30,0x0d,0x06,0x09,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x48, -0xe7,0x62,0x8a,0x27,0x72,0x28,0xb1,0x7f,0x7a,0x64,0x92,0xab,0xf9,0x23,0xb3,0xfa, -0x4c,0x3e,0x82,0xe2,0x90,0x20,0x34,0xef,0x6c,0xe7,0x2b,0x2f,0x10,0xc5,0x51,0x2c, -0x33,0xea,0x42,0x11,0xa8,0x79,0x1f,0xe1,0x93,0xc2,0xcf,0xde,0x90,0x49,0xe9,0x2f, -0x1d,0xf3,0x76,0xba,0xc5,0xbe,0x5a,0x69,0xd1,0xb6,0xa5,0xeb,0x8c,0x30,0x27,0xc4, -0x7f,0x07,0x05,0x05,0xa5,0x5c,0x4a,0xd8,0x0b,0x3b,0xdd,0x4e,0x2a,0xc8,0x44,0x40, -0xe7,0xf3,0x7f,0x94,0x73,0x2a,0x51,0x4f,0x89,0x68,0x3f,0xa4,0xd2,0xf4,0xb4,0x86, -0xba,0x0d,0x00,0x21,0xc4,0x0b,0xa6,0xe9,0x47,0x22,0x82,0x49,0xc1,0x87,0x38,0x4f, -0xd5,0x12,0x4f,0xe3,0xb4,0x08,0x49,0xd4,0x15,0xd7,0xb0,0xaa,0xd0,0xae,0xb4,0x9a, -0x9f,0x57,0xb0,0x4b,0x88,0x1d,0x5c,0xb5,0xec,0x66,0x11,0x3e,0x6c,0x11,0x85,0x66, -0x9f,0x71,0xd0,0xc0,0xbd,0x0b,0xbe,0x1a,0x35,0x6f,0x9a,0x9f,0x51,0xf2,0x3b,0xab, -0x1e,0x80,0xc1,0x9c,0x16,0xf7,0xb7,0x0c,0x1e,0xef,0x5f,0xb1,0x4a,0xbf,0x3a,0xfe, -0x48,0x99,0x7c,0x45,0x45,0x35,0x49,0xe1,0x32,0xec,0x55,0x0b,0x19,0xce,0x32,0x71, -0x0c,0x76,0x5a,0xcf,0x26,0x67,0x0d,0x72,0x95,0x32,0x3e,0x6a,0x74,0xf6,0xb1,0xb3, -0xc6,0x64,0x2b,0x20,0xe5,0x96,0x3b,0x7b,0x65,0xa2,0xeb,0xc4,0xff,0x52,0xb5,0x0b, -0x7b,0x47,0x37,0x08,0xdf,0xf7,0xcf,0x08,0x6b,0x9d,0x7c,0xee,0x35,0xdb,0x01,0xf1, -0xa1,0xfa,0x43,0x10,0xd0,0xb6,0x1c,0xfa,0x2a,0x3a,0xc8,0x24,0xab,0x49,0x30 -}; - -/* chain0_0 -> chain0_1: - * A simple, valid chain - */ -static const BYTE chain0_0[] = { -0x30,0x82,0x01,0xc2,0x30,0x82,0x01,0x2d,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x73,0x87,0xdb,0x32,0x3a,0x6c,0x89,0x74,0x0f,0xda,0x07,0xd4,0x6a,0x2c,0x81, -0x59,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30, -0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72, -0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30, -0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35, -0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03, -0x13,0x05,0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82, -0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34, -0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7, -0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91, -0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5, -0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd, -0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c, -0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35, -0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01, -0x00,0x01,0xa3,0x23,0x30,0x21,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01, -0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01, -0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x0b,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x82,0xcd,0x5c,0x0a, -0x9d,0x0d,0x3f,0xd1,0xd8,0x74,0xfc,0x52,0x65,0x11,0x76,0x10,0x62,0xb0,0x9a, -0xc5,0x54,0x66,0xae,0xfa,0xd5,0x66,0x36,0xcb,0x1e,0xe7,0xad,0xb9,0xfa,0x2e, -0xbb,0xb9,0x0b,0x4b,0xbf,0xe7,0x26,0x75,0x2c,0xae,0x2d,0x14,0x84,0x92,0xae, -0x56,0xdf,0x55,0x56,0xf3,0xa6,0xc5,0x21,0xa8,0x5e,0xce,0x7a,0x9d,0xff,0x7f, -0x10,0xd9,0xc3,0x05,0x52,0x86,0xdc,0x9b,0x46,0xe7,0x69,0xfb,0x1e,0xf0,0x68, -0x7d,0x34,0xd7,0xf3,0x56,0xe3,0x0a,0xf3,0xe4,0xdc,0x0f,0xd6,0x4d,0xa8,0xc5, -0xb5,0x5b,0xbf,0x0b,0x5d,0xe7,0x76,0xa1,0x56,0xc1,0xa7,0x55,0xa0,0x88,0x7f, -0x57,0x8e,0x64,0xda,0x6f,0xaa,0x9c,0xca,0x47,0xf3,0x37,0x08,0x4b,0x9a,0xdc, -0xbc,0x65,0x4d,0x9a }; -static const BYTE chain0_1[] = { -0x30,0x82,0x01,0x98,0x30,0x82,0x01,0x01,0xa0,0x03,0x02,0x01,0x02,0x02,0x01, -0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43, -0x65,0x72,0x74,0x31,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x31,0x31,0x32, -0x32,0x31,0x38,0x35,0x32,0x30,0x37,0x5a,0x18,0x0f,0x31,0x36,0x32,0x38,0x30, -0x38,0x32,0x36,0x30,0x35,0x32,0x30,0x35,0x37,0x5a,0x30,0x10,0x31,0x0e,0x30, -0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81, -0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05, -0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda, -0xc5,0x4b,0x3f,0xe5,0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33, -0xba,0xff,0xb4,0xc6,0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c, -0xce,0x30,0xc5,0xa7,0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60, -0x16,0xde,0xc6,0x8b,0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32, -0x3b,0xb9,0xcf,0x6b,0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f, -0xb7,0x82,0x40,0xfc,0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44, -0xcb,0x53,0xac,0x85,0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc, -0x8b,0xa2,0x23,0xb2,0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38, -0xcf,0x49,0x98,0x72,0xa3,0x02,0x03,0x01,0x00,0x01,0x30,0x0d,0x06,0x09,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x3c, -0x90,0x45,0x5b,0x81,0x25,0x9d,0x7a,0x10,0x9f,0x15,0x25,0x03,0x52,0x78,0x09, -0x6f,0x62,0x66,0x78,0x01,0x69,0x6a,0x7f,0x19,0x02,0x18,0xd8,0xc0,0x89,0x2f, -0x0f,0x47,0xa7,0x17,0xc2,0xd7,0xe2,0x81,0x7e,0xea,0x54,0xd4,0xe6,0xcc,0x8f, -0x88,0x1a,0xee,0x28,0x42,0x6c,0x77,0xf5,0xec,0x8c,0x05,0xa5,0x7f,0xee,0x2e, -0x0b,0xbc,0xde,0xb0,0x71,0x2c,0x83,0x32,0xcb,0x49,0x00,0x46,0x03,0x95,0x58, -0x6c,0x57,0x0c,0x5a,0x69,0x3c,0xfa,0xbf,0x46,0x7a,0x4d,0xd0,0x23,0x77,0x23, -0xac,0x1d,0x33,0xb7,0x87,0xb4,0xc6,0x6b,0x52,0xa1,0xed,0x9a,0xb8,0x8e,0x1a, -0xcb,0xc3,0xd3,0x50,0xe0,0x0d,0x12,0x5d,0x0e,0x84,0x52,0xa5,0x12,0x76,0x6b, -0xbf,0xb8,0xbe,0x51,0xc0,0xa6,0xae }; -/* chain0_0 -> chain1_1: - * A chain whose signature is bad - */ -static const BYTE chain1_1[] = { -0x30,0x82,0x01,0x98,0x30,0x82,0x01,0x01,0xa0,0x03,0x02,0x01,0x02,0x02,0x01, -0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43, -0x65,0x72,0x74,0x31,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x31,0x31,0x32, -0x32,0x31,0x38,0x35,0x32,0x30,0x37,0x5a,0x18,0x0f,0x31,0x36,0x32,0x38,0x30, -0x38,0x32,0x36,0x30,0x35,0x32,0x30,0x35,0x37,0x5a,0x30,0x10,0x31,0x0e,0x30, -0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81, -0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05, -0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xad,0x7e,0xca, -0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82,0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d, -0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34,0x9e,0x07,0x78,0x08,0x11,0x12,0x2d, -0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7,0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25, -0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91,0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12, -0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5,0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76, -0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd,0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe, -0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c,0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37, -0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35,0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1, -0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01,0x00,0x01,0x30,0x0d,0x06,0x09,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0xad, -0x16,0xaa,0x77,0xab,0xd5,0x1a,0x6c,0x90,0x5d,0x4e,0x61,0x49,0x89,0x6e,0x9f, -0x03,0x7b,0x4a,0x49,0xb1,0x46,0x75,0xf3,0x69,0xeb,0x96,0x13,0x3c,0x35,0xb5, -0x37,0x3b,0xc2,0x84,0x5c,0xe5,0x7c,0x46,0xf6,0x6b,0xc7,0x4e,0x72,0x91,0xf4, -0xde,0xc5,0x66,0x0f,0x2d,0x39,0xc6,0x9e,0x8e,0x25,0x4d,0x3f,0x7b,0x45,0xe1, -0xc6,0x1a,0x7e,0x28,0x83,0xf8,0x87,0x30,0x4e,0xa5,0xfd,0x32,0x7a,0xed,0x53, -0x10,0x3b,0x14,0xe5,0xf1,0x32,0x77,0xf1,0x29,0x72,0x98,0x2b,0xa3,0x17,0xd6, -0x8c,0x65,0xaa,0x3b,0x6d,0xab,0xb3,0xbe,0xfa,0x72,0x38,0xf7,0xd0,0xb6,0x0f, -0x5c,0x0d,0xec,0x17,0x43,0x2a,0xfd,0xc1,0x01,0x43,0x98,0xd3,0x1b,0x84,0x3e, -0x32,0xcf,0xda,0x1d,0xc2,0xc9,0x61 }; -/* chain2_0 -> chain0_1: - * A chain whose time nesting is invalid. - */ -static const BYTE chain2_0[] = { -0x30,0x82,0x01,0xc2,0x30,0x82,0x01,0x2d,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x11,0x58,0x73,0x34,0x62,0x2b,0xa5,0xa5,0x54,0x4a,0x14,0x48,0x3c,0x90,0x4e, -0x86,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30, -0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72, -0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x36,0x30,0x31,0x30,0x31,0x30,0x30,0x30, -0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x36,0x31,0x32,0x33,0x31,0x32,0x33,0x35, -0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03, -0x13,0x05,0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82, -0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34, -0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7, -0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91, -0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5, -0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd, -0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c, -0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35, -0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01, -0x00,0x01,0xa3,0x23,0x30,0x21,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01, -0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01, -0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x0b,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x88,0x44,0x83,0xfc, -0x38,0xa4,0x6e,0x53,0x24,0x8f,0xac,0xcf,0xc0,0xb9,0xaa,0xdc,0x5f,0x30,0xf3, -0xc3,0x5c,0xd5,0x10,0x4e,0xb7,0x30,0x24,0x80,0xb3,0x5e,0xcb,0x6a,0xec,0x88, -0xa6,0x02,0xbd,0x37,0x97,0xcc,0x60,0x04,0x03,0xdd,0xfa,0xb0,0x4e,0xd6,0x00, -0x22,0x41,0xaa,0x2b,0x3c,0x3e,0x1f,0xcd,0xe3,0xf0,0x88,0x84,0x1c,0x00,0xc4, -0x97,0x69,0x3d,0x40,0x6d,0x33,0x8c,0xb7,0xb4,0x41,0xf3,0x28,0x00,0xa8,0xa1, -0x81,0x76,0x50,0x69,0xb2,0x2c,0xc4,0x56,0xab,0x2b,0x4a,0x77,0x41,0x3e,0x6c, -0x78,0x0b,0xf9,0x6c,0x86,0x84,0x1a,0x5a,0x0e,0x8c,0x12,0x59,0xbd,0x74,0xf3, -0xb9,0x91,0xa1,0x70,0x91,0xf3,0xe8,0x8d,0x78,0x42,0xc3,0x4f,0xfa,0xef,0xe7, -0xca,0x09,0x5c,0x18 }; -/* chain3_0 -> chain0_1: - * A chain whose root cannot be a CA. - */ -static const BYTE chain3_0[] = { -0x30,0x82,0x01,0xad,0x30,0x82,0x01,0x1a,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x63,0x73,0xee,0x45,0x59,0x76,0x1a,0x9e,0x47,0xf1,0xfb,0xf0,0x42,0x44,0x26, -0xeb,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31, -0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31, -0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35, -0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05, -0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82, -0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34, -0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7, -0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91, -0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5, -0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd, -0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c, -0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35, -0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01, -0x00,0x01,0xa3,0x10,0x30,0x0e,0x30,0x0c,0x06,0x03,0x55,0x1d,0x13,0x01,0x01, -0xff,0x04,0x02,0x30,0x00,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05, -0x00,0x03,0x81,0x81,0x00,0x53,0xb7,0xa9,0x90,0xe0,0x88,0x36,0xc0,0x2d,0xb1, -0xa3,0x97,0xff,0x16,0x62,0x29,0xa2,0xfd,0x92,0x90,0xb7,0x8d,0xd9,0xdf,0x57, -0x94,0x5a,0xce,0x36,0x5c,0x95,0x24,0xab,0x4f,0x63,0x55,0xa7,0xea,0x8b,0xaf, -0xd9,0x41,0x6a,0x2f,0xd8,0x9e,0x1c,0x2d,0xc0,0x11,0x52,0x09,0x4b,0x31,0x1f, -0x5e,0x8f,0x4b,0xbf,0x20,0x73,0x2d,0x04,0x11,0x56,0x6d,0xb1,0xbe,0xb4,0x5d, -0x70,0x6b,0xb2,0xd0,0xd3,0xf5,0x5d,0x60,0x08,0x65,0x2c,0xe3,0x78,0x5a,0x05, -0x36,0xe1,0xf1,0x67,0x3a,0x25,0xf3,0x47,0x83,0xce,0x4f,0xb0,0x74,0x7a,0x35, -0xa0,0x7f,0x70,0x64,0x8a,0x14,0x66,0x03,0xf6,0xae,0xdf,0x1b,0xf5,0x80,0x87, -0x06,0x39,0x76,0x70,0x7b,0xd2,0x83,0xe9,0xce,0x1f,0xf8,0x66,0xc1 }; -/* chain4_0 -> chain4_1 -> chain4_2: - * A chain whose path length constraint is violated. - */ -static const BYTE chain4_0[] = { -0x30,0x82,0x01,0xc5,0x30,0x82,0x01,0x30,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x01,0xcd,0x67,0x9e,0xec,0xae,0x1e,0x69,0x16,0x3f,0x92,0x8a,0xed,0x6d,0x57, -0xac,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30, -0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72, -0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30, -0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35, -0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03, -0x13,0x05,0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82, -0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34, -0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7, -0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91, -0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5, -0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd, -0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c, -0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35, -0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01, -0x00,0x01,0xa3,0x26,0x30,0x24,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01, -0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01, -0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x00,0x30,0x0b,0x06, -0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x70, -0x60,0x8d,0x5f,0x29,0x8e,0x6b,0x48,0x79,0xaa,0xd1,0x7a,0xbb,0x6c,0x7c,0x54, -0x11,0x55,0x08,0xb9,0x2e,0x5e,0x53,0xd6,0x9b,0xb9,0xe4,0xc8,0x0e,0x48,0xe7, -0x20,0x9e,0xbd,0x7c,0x55,0xb8,0xf1,0x69,0x0c,0x08,0xd6,0x32,0x32,0xd9,0x05, -0x81,0x8a,0x33,0x4c,0x57,0x20,0xae,0xe8,0xde,0x61,0x63,0x85,0xc8,0xe1,0x1d, -0xef,0x4b,0xa4,0x42,0x4e,0x0a,0x25,0x48,0x2b,0xc2,0x06,0x79,0x90,0x45,0x90, -0x94,0x3d,0xb0,0x36,0xe6,0x60,0xe6,0xd2,0x1a,0x11,0x01,0x4b,0xaf,0x23,0x4d, -0x62,0x6b,0xdc,0x3a,0xae,0x61,0x93,0xce,0x7b,0xae,0x21,0xfe,0x42,0xd8,0x86, -0x36,0x19,0x00,0x18,0x13,0x4d,0xf9,0xd1,0x94,0xa2,0xb7,0xbd,0xb0,0x5c,0x9b, -0x5c,0x03,0xf5,0x86,0x85,0x07,0x1c }; -static const BYTE chain4_1[] = { -0x30,0x82,0x01,0xb3,0x30,0x82,0x01,0x1e,0xa0,0x03,0x02,0x01,0x02,0x02,0x01, -0x01,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30, -0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72, -0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30, -0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35, -0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03, -0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,0x33,0x0e,0x67,0x5f, -0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,0xdc,0xb6,0x17,0x8e, -0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,0x48,0x9f,0x6e,0xfe, -0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,0x47,0xd1,0x57,0x71, -0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,0x05,0x72,0xa7,0x87, -0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,0x6a,0x80,0x83,0x68, -0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,0x85,0xb5,0x46,0x36, -0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,0xd3,0x51,0x9a,0x22, -0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,0xa3,0x02,0x03,0x01, -0x00,0x01,0xa3,0x23,0x30,0x21,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01, -0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01, -0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x0b,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x26,0x56,0x31,0x53, -0x65,0xe3,0xd8,0x59,0xc8,0x6f,0xa3,0x5b,0x8a,0x11,0x53,0xde,0x8d,0x6f,0x6d, -0x8c,0xe1,0x79,0x25,0xb2,0xbf,0xc6,0x3b,0xa1,0x8b,0x6b,0xcd,0x99,0xcf,0x0c, -0x6f,0xaa,0xbc,0xd0,0x3d,0xb2,0xf8,0x1c,0x6f,0xb0,0x84,0x7b,0xb1,0x88,0xec, -0xd6,0x77,0xbe,0xb1,0x0b,0x8c,0x18,0x85,0xb7,0x38,0x81,0x12,0xc9,0xc7,0x4a, -0xf6,0x83,0xc4,0xd9,0xae,0xb6,0x1d,0xbb,0xd2,0x08,0x01,0x4a,0xe1,0xdc,0x8f, -0x67,0xa9,0xed,0xe2,0x3f,0x96,0xf6,0x72,0x7e,0x4a,0x63,0x46,0xc4,0x82,0x89, -0x0a,0x81,0xc8,0x3a,0x9c,0xe7,0x23,0x5f,0x8d,0xd9,0x6c,0xb2,0x5d,0x9a,0x40, -0x04,0x04,0xd5,0x4a,0x29,0x57,0xbd,0x18,0xd8,0xca,0x1f,0xf7,0xf8,0x23,0x07, -0x4b,0x03,0xa3,0xd9 }; -static const BYTE chain4_2[] = { -0x30,0x82,0x01,0x98,0x30,0x82,0x01,0x01,0xa0,0x03,0x02,0x01,0x02,0x02,0x01, -0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43, -0x65,0x72,0x74,0x32,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x31,0x31,0x32, -0x32,0x31,0x38,0x35,0x32,0x30,0x37,0x5a,0x18,0x0f,0x31,0x36,0x32,0x38,0x30, -0x38,0x32,0x36,0x30,0x35,0x32,0x30,0x35,0x37,0x5a,0x30,0x10,0x31,0x0e,0x30, -0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x33,0x30,0x81, -0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05, -0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xc3,0x31,0x35, -0xc3,0x9d,0x8a,0x87,0x20,0xc6,0x32,0xe9,0xb1,0xf6,0x8f,0xf9,0x05,0x73,0x1d, -0xa7,0xde,0xab,0x15,0x8a,0x9c,0x7f,0x11,0x7e,0x77,0xa0,0x42,0x80,0xf4,0x79, -0xda,0x98,0x7b,0x00,0xfa,0x8f,0x0c,0xd0,0xeb,0x8a,0x80,0xed,0x07,0xfc,0x64, -0x71,0x03,0xc1,0xd6,0x2f,0x9b,0xde,0x42,0x63,0xd9,0x79,0xea,0xdd,0x10,0xe8, -0x68,0xc8,0x69,0x4f,0x4a,0x39,0x23,0x87,0xca,0xd1,0xc9,0x77,0x14,0x30,0x85, -0x9e,0xf7,0x79,0xf9,0x07,0xb7,0x7c,0x55,0xcb,0xa7,0xd5,0xb8,0x44,0xb5,0x20, -0xb5,0x01,0x5c,0xa2,0xd1,0xd5,0xad,0x0f,0x87,0xaf,0x37,0xd1,0x39,0x0c,0x0d, -0xd5,0xde,0x26,0x7a,0xed,0xf9,0x2a,0xb1,0x60,0x65,0x2d,0x08,0x24,0x51,0x1d, -0xb0,0x0a,0xb5,0x13,0xc7,0x02,0x03,0x01,0x00,0x01,0x30,0x0d,0x06,0x09,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0xaa, -0x0e,0x17,0x8d,0x5b,0xca,0x11,0xda,0x5a,0xb5,0xd4,0xe8,0x63,0xce,0xa5,0x67, -0x11,0x2f,0xf8,0xb8,0x9f,0x89,0x46,0x7d,0x20,0x94,0x5f,0x0d,0x02,0x7e,0x5e, -0x8c,0x33,0xfc,0x24,0x56,0x08,0xe6,0xf1,0x4d,0x29,0xd5,0xef,0x03,0xe3,0x9a, -0xc6,0xcd,0x6e,0xe3,0xe6,0x45,0xaa,0xce,0x5a,0x2f,0x37,0x6c,0x07,0xd2,0x28, -0x63,0x8e,0x55,0x8a,0xad,0xe3,0x8a,0x58,0x3d,0x24,0x09,0x1e,0x9a,0x7d,0x5f, -0x05,0xc4,0x51,0x18,0x17,0x46,0x33,0x4d,0x72,0x05,0xc2,0x02,0xb6,0x05,0x22, -0x23,0xcc,0xf9,0x1f,0x87,0x6c,0x4a,0x3d,0x6f,0xdb,0x59,0xf6,0x79,0x81,0x02, -0x45,0x9f,0xc8,0xc3,0xf0,0x90,0x82,0xaf,0x58,0x80,0x18,0xea,0x73,0x50,0x29, -0x71,0x8d,0xc1,0x9e,0x53,0x19,0x5a }; -/* chain5_0 -> chain5_1: - * A chain whose name constraints aren't met. - */ -static const BYTE chain5_0[] = { -0x30,0x82,0x01,0xe0,0x30,0x82,0x01,0x4b,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0xed,0xb8,0x3b,0xf2,0x95,0xe6,0x8e,0xdf,0x75,0x6a,0x22,0xbc,0xca,0x51,0xb6, -0x83,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30, -0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72, -0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30, -0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35, -0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03, -0x13,0x05,0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82, -0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34, -0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7, -0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91, -0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5, -0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd, -0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c, -0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35, -0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01, -0x00,0x01,0xa3,0x41,0x30,0x3f,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01, -0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01, -0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x1c,0x06,0x03,0x55,0x1d, -0x1e,0x01,0x01,0xff,0x04,0x12,0x30,0x10,0xa0,0x0e,0x30,0x0c,0x82,0x0a,0x77, -0x69,0x6e,0x65,0x68,0x71,0x2e,0x6f,0x72,0x67,0x30,0x0b,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x7f,0x98,0xd1,0x58, -0x70,0x36,0x2c,0x08,0x63,0x2c,0xf9,0xe0,0x16,0xda,0x59,0xd9,0x1b,0xa5,0xba, -0xe0,0xec,0xd9,0x0a,0x1b,0x78,0xd0,0xea,0x49,0xc7,0x01,0x06,0x78,0xe5,0xb3, -0x81,0x5a,0x53,0x3d,0x9b,0x0d,0xaf,0xc8,0x04,0x57,0x15,0xee,0xfd,0x05,0x80, -0x72,0x8a,0x54,0x51,0x6a,0x15,0xdc,0xbf,0xfc,0xe3,0x04,0xe4,0x6f,0x20,0xb2, -0xfd,0xa6,0x32,0x4c,0xbc,0x1b,0x60,0xf7,0xc3,0x9c,0x5f,0x17,0x94,0xc7,0xdf, -0x9f,0xae,0xdb,0x72,0x8a,0x98,0x28,0x9d,0x26,0x1f,0x14,0x76,0xb1,0x8e,0x26, -0xf6,0x97,0x96,0x57,0x14,0x9e,0x44,0x13,0xef,0x85,0xc1,0x6f,0x38,0xda,0xf2, -0x3a,0xf6,0xad,0x0b,0x35,0xcf,0xea,0xb0,0x5a,0x9c,0x36,0x80,0x45,0x1f,0x88, -0x2f,0xff,0xb4,0xb5 }; -static const BYTE chain5_1[] = { -0x30,0x82,0x01,0xb2,0x30,0x82,0x01,0x1b,0xa0,0x03,0x02,0x01,0x02,0x02,0x01, -0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43, -0x65,0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32, -0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55, -0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06, -0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d, -0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5, -0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6, -0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7, -0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b, -0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b, -0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc, -0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85, -0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2, -0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72, -0xa3,0x02,0x03,0x01,0x00,0x01,0xa3,0x1c,0x30,0x1a,0x30,0x18,0x06,0x03,0x55, -0x1d,0x07,0x01,0x01,0xff,0x04,0x0e,0x30,0x0c,0x82,0x0a,0x77,0x69,0x6e,0x65, -0x68,0x71,0x2e,0x63,0x6f,0x6d,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7, -0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x08,0x08,0xf5,0x1c,0xca, -0x3b,0x5a,0xd7,0x45,0xac,0x29,0x5c,0x10,0x9d,0xb0,0x4a,0xdb,0x36,0x0b,0x39, -0x14,0x87,0x3d,0x06,0xe8,0x0d,0x54,0xa7,0xb9,0x50,0x14,0x29,0x05,0xd2,0x75, -0xe4,0x88,0xd8,0x8e,0x7e,0xab,0x61,0xba,0x3c,0xb2,0x4f,0x8f,0xfd,0x00,0x6b, -0x94,0x69,0xf0,0x13,0x40,0x7d,0x4e,0x7c,0xac,0xf0,0x1b,0x07,0x2c,0x96,0x46, -0xf6,0x38,0x38,0xc6,0x65,0x2c,0x02,0x28,0x62,0x6f,0x7d,0xf9,0x4d,0xff,0xb1, -0x38,0x0e,0xce,0x89,0x0e,0xdd,0x22,0x51,0xd2,0x6b,0x0e,0x80,0x3c,0xa6,0x0c, -0xe7,0x8b,0x3b,0x2a,0x2f,0x46,0xed,0xda,0x96,0x1a,0xc1,0x5c,0xfe,0xe0,0xef, -0xdb,0xe0,0x11,0xc4,0x56,0x12,0xe2,0x4b,0x84,0xde,0xaf,0x7f,0x3c,0x9f,0xcb, -0xb6,0xac,0x92 }; -/* chain0_0 -> chain4_1: - * A chain whose end certificate is a CA. - */ -/* chain0_0 -> chain 7_1: - * A chain with a bad critical extension. - */ -static const BYTE chain7_1[] = { -0x30,0x82,0x01,0x93,0x30,0x81,0xfd,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,0x01, -0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00, -0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65, -0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30, -0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33, -0x35,0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04, -0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09, -0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00, -0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,0x33, -0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,0xdc, -0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,0x48, -0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,0x47, -0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,0x05, -0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,0x6a, -0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,0x85, -0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,0xd3, -0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,0xa3, -0x02,0x03,0x01,0x00,0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x9f,0x69,0xfd,0x26,0xd5,0x4b, -0xe0,0xab,0x12,0x21,0xb9,0xfc,0xf7,0xe0,0x0c,0x09,0x94,0xad,0x27,0xd7,0x9d, -0xa3,0xcc,0x46,0x2a,0x25,0x9a,0x24,0xa7,0x31,0x58,0x78,0xf5,0xfc,0x30,0xe1, -0x6d,0xfd,0x59,0xab,0xbe,0x69,0xa0,0xea,0xe3,0x7d,0x7a,0x7b,0xe5,0x85,0xeb, -0x86,0x6a,0x84,0x3c,0x96,0x01,0x1a,0x70,0xa7,0xb8,0xcb,0xf2,0x11,0xe7,0x52, -0x9c,0x58,0x2d,0xac,0x63,0xce,0x72,0x4b,0xad,0x62,0xa8,0x1d,0x75,0x96,0xe2, -0x27,0xf5,0x6f,0xba,0x91,0xf8,0xf1,0xb0,0xbf,0x90,0x24,0x6d,0xba,0x5d,0xd7, -0x39,0x63,0x3b,0x7c,0x04,0x5d,0x89,0x9d,0x1c,0xf2,0xf7,0xcc,0xdf,0x6e,0x8a, -0x43,0xa9,0xdd,0x86,0x05,0xa2,0xf3,0x22,0x2d,0x1e,0x70,0xa1,0x59,0xd7,0xa5, -0x94,0x7d }; -/* chain8_0 -> chain8_1 -> chain8_2: - * A chain whose root cert validity time doesn't overlap the end cert's - * validity time. - */ -static const BYTE chain8_0[] = { -0x30,0x82,0x01,0xc2,0x30,0x82,0x01,0x2d,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x76,0x09,0xeb,0xc1,0x06,0x61,0x69,0x50,0x0e,0x0c,0xaf,0xc9,0x0a,0x6b,0x93, -0x50,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30, -0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72, -0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30, -0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x30,0x36,0x30,0x31,0x30,0x30,0x30, -0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03, -0x13,0x05,0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82, -0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34, -0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7, -0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91, -0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5, -0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd, -0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c, -0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35, -0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01, -0x00,0x01,0xa3,0x23,0x30,0x21,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01, -0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01, -0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x0b,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x87,0x74,0x4a,0xb7, -0xbe,0xd4,0x21,0xa5,0x5f,0x51,0xd6,0xea,0x89,0x4c,0x68,0x16,0x38,0x09,0x49, -0xf5,0xef,0xac,0x0c,0x59,0x27,0xa3,0x0f,0x8f,0xb9,0x21,0x35,0x91,0xef,0x15, -0x91,0xe2,0xac,0xf2,0xad,0xfe,0x05,0x9a,0x9f,0x24,0x81,0x75,0x69,0x57,0x51, -0xe3,0x2f,0x29,0xad,0x55,0x8b,0xc7,0x25,0xbe,0xcd,0x38,0xa7,0xff,0xdb,0xb0, -0x85,0x4e,0x8d,0x56,0x5a,0x79,0xf7,0x7a,0xfb,0x64,0x3d,0x4e,0x04,0x34,0xf7, -0x2f,0x7f,0xe3,0x21,0xee,0x8d,0xd3,0xb0,0x26,0x7d,0xb8,0xc3,0xb6,0x0f,0xe2, -0x3f,0xb6,0x8a,0x53,0x27,0xc0,0xe1,0xfb,0xd8,0xea,0xfe,0xed,0x80,0x51,0xb6, -0x46,0x59,0x65,0x6c,0x34,0x01,0xcc,0x2e,0x50,0xc7,0x4e,0x37,0x83,0x54,0x3f, -0x7b,0xa2,0x1d,0x3a }; -static const BYTE chain8_1[] = { -0x30,0x82,0x01,0x93,0x30,0x81,0xfd,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,0x01, -0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00, -0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65, -0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30,0x30, -0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30,0x30, -0x30,0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04, -0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09, -0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00, -0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,0x33, -0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,0xdc, -0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,0x48, -0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,0x47, -0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,0x05, -0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,0x6a, -0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,0x85, -0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,0xd3, -0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,0xa3, -0x02,0x03,0x01,0x00,0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x22,0xf1,0x66,0x00,0x79,0xd2, -0xe6,0xb2,0xb2,0xf7,0x2f,0x98,0x92,0x7d,0x73,0xc3,0x6c,0x5c,0x77,0x20,0xe3, -0xbf,0x3e,0xe0,0xb3,0x5c,0x68,0xb4,0x9b,0x3a,0x41,0xae,0x94,0xa0,0x80,0x3a, -0xfe,0x5d,0x7a,0x56,0x87,0x85,0x44,0x45,0xcf,0xa6,0xd3,0x10,0xe7,0x73,0x41, -0xf2,0x7f,0x88,0x85,0x91,0x8e,0xe6,0xec,0xe2,0xce,0x08,0xbc,0xa5,0x76,0xe5, -0x4d,0x1d,0xb7,0x70,0x31,0xdd,0xc9,0x9a,0x15,0x32,0x11,0x5a,0x4e,0x62,0xc8, -0xd1,0xf8,0xec,0x46,0x39,0x5b,0xe7,0x67,0x1f,0x58,0xe8,0xa1,0xa0,0x5b,0xf7, -0x8a,0x6d,0x5f,0x91,0x18,0xd4,0x90,0x85,0xff,0x30,0xc7,0xca,0x9c,0xc6,0x92, -0xb0,0xca,0x16,0xc4,0xa4,0xc0,0xd6,0xe8,0xff,0x15,0x19,0xd1,0x30,0x61,0xf3, -0xef,0x9f }; -static const BYTE chain8_2[] = { -0x30,0x82,0x01,0x93,0x30,0x81,0xfd,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,0x01, -0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00, -0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65, -0x72,0x74,0x32,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x39,0x30,0x31,0x30,0x30, -0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33, -0x35,0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04, -0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x33,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09, -0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00, -0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xc3,0x31,0x35,0xc3,0x9d,0x8a,0x87,0x20, -0xc6,0x32,0xe9,0xb1,0xf6,0x8f,0xf9,0x05,0x73,0x1d,0xa7,0xde,0xab,0x15,0x8a, -0x9c,0x7f,0x11,0x7e,0x77,0xa0,0x42,0x80,0xf4,0x79,0xda,0x98,0x7b,0x00,0xfa, -0x8f,0x0c,0xd0,0xeb,0x8a,0x80,0xed,0x07,0xfc,0x64,0x71,0x03,0xc1,0xd6,0x2f, -0x9b,0xde,0x42,0x63,0xd9,0x79,0xea,0xdd,0x10,0xe8,0x68,0xc8,0x69,0x4f,0x4a, -0x39,0x23,0x87,0xca,0xd1,0xc9,0x77,0x14,0x30,0x85,0x9e,0xf7,0x79,0xf9,0x07, -0xb7,0x7c,0x55,0xcb,0xa7,0xd5,0xb8,0x44,0xb5,0x20,0xb5,0x01,0x5c,0xa2,0xd1, -0xd5,0xad,0x0f,0x87,0xaf,0x37,0xd1,0x39,0x0c,0x0d,0xd5,0xde,0x26,0x7a,0xed, -0xf9,0x2a,0xb1,0x60,0x65,0x2d,0x08,0x24,0x51,0x1d,0xb0,0x0a,0xb5,0x13,0xc7, -0x02,0x03,0x01,0x00,0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x33,0x95,0x73,0x7c,0x7c,0xb0, -0xbb,0x2b,0xe0,0xc4,0x12,0xf0,0x26,0x85,0x97,0x0c,0x81,0xde,0xc5,0x52,0x04, -0xcb,0xee,0x11,0x9a,0x2e,0xa2,0xc4,0x76,0xd5,0x57,0xd1,0x2f,0x2d,0x6f,0x42, -0xbf,0x23,0x85,0x59,0x5c,0x96,0x8d,0xef,0xbc,0xb6,0xf5,0xd3,0x66,0x99,0x54, -0x95,0x09,0x28,0x0b,0x4f,0x05,0x5f,0x61,0x20,0xa8,0x0d,0x46,0x9a,0xab,0x29, -0x97,0x6b,0xa3,0xcd,0xd7,0x5a,0xda,0xaa,0x8e,0xad,0x5a,0x66,0x58,0xf6,0x63, -0x76,0x10,0xdc,0xb0,0xee,0x3f,0x82,0x6d,0x29,0xb9,0xcb,0x99,0x15,0xbb,0xb9, -0x74,0x73,0x00,0x14,0x74,0x79,0xad,0x89,0x73,0xaa,0xa2,0x0e,0x52,0xe8,0x28, -0x69,0xe6,0x8c,0x1e,0xce,0x3a,0x6d,0x85,0x33,0x1e,0x21,0xa3,0x42,0x61,0x3a, -0xeb,0x25 }; -/* chain9_0 -> chain7_1: - * A cyclic chain. - */ -static const BYTE chain9_0[] = { -0x30,0x82,0x01,0x93,0x30,0x81,0xfd,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,0x01, -0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00, -0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65, -0x72,0x74,0x32,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30, -0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33, -0x35,0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04, -0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09, -0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00, -0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a, -0xca,0x50,0x82,0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde, -0xc5,0xc3,0x34,0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14, -0x03,0x7a,0xe7,0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f, -0xc1,0x33,0x91,0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98, -0x1b,0x99,0xc5,0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06, -0x49,0xba,0xcd,0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45, -0x72,0xb6,0x1c,0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5, -0x1f,0x2f,0x35,0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f, -0x02,0x03,0x01,0x00,0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x2c,0xf5,0x25,0xaa,0xb4,0x63, -0x5a,0x5d,0xae,0x7b,0x42,0x79,0xbc,0x41,0x2f,0x8a,0x2a,0x70,0x9f,0x8e,0xb2, -0x14,0x1b,0x6f,0xb2,0xf3,0x3e,0xab,0x06,0x9c,0xa8,0x92,0x43,0xc4,0x57,0x63, -0xa4,0xee,0x83,0x04,0xab,0xa5,0x2c,0xd9,0x90,0xed,0xc9,0x4d,0xa8,0x7b,0xca, -0x3b,0x5f,0xdf,0x46,0xe1,0x3b,0x7f,0x72,0xb7,0x92,0x82,0xe6,0x05,0xc3,0x64, -0x38,0xfb,0x86,0x13,0xeb,0x19,0xb6,0x16,0x82,0x63,0x84,0x13,0x04,0x38,0x51, -0x4c,0x89,0x12,0xf1,0x13,0x46,0x75,0x4e,0x99,0x46,0xcb,0xc6,0x76,0x9f,0x97, -0x9c,0xda,0x63,0x01,0x6a,0x71,0x68,0xc4,0x21,0x67,0xa6,0x51,0x19,0x5e,0xc7, -0x8c,0x8d,0x63,0x5c,0xbe,0x04,0x8f,0xad,0xea,0xa5,0xcd,0xc3,0xd6,0x6b,0xc7, -0xb5,0x56 }; -/* chain0_0 -+ - * +-> chain7_1 - * chain10_1 -+ - * A chain with two issuers, only one of whose dates is valid. - */ -static const BYTE chain10_1[] = { -0x30,0x82,0x01,0x9b,0x30,0x82,0x01,0x08,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0xbf,0x99,0x4f,0x14,0x03,0x77,0x44,0xb8,0x49,0x02,0x70,0xa1,0xb8,0x9c,0xa7, -0x24,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31, -0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31, -0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35, -0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05, -0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82, -0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34, -0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7, -0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91, -0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5, -0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd, -0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c, -0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35, -0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01, -0x00,0x01,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x03,0x81, -0x81,0x00,0xa8,0xec,0x8c,0x34,0xe7,0x2c,0xdf,0x75,0x87,0xc4,0xf7,0xda,0x71, -0x72,0x29,0xb2,0x48,0xa8,0x2a,0xec,0x7b,0x7d,0x19,0xb9,0x5f,0x1d,0xd9,0x91, -0x2b,0xc4,0x28,0x7e,0xd6,0xb5,0x91,0x69,0xa5,0x8a,0x1a,0x1f,0x97,0x98,0x46, -0x9d,0xdf,0x12,0xf6,0x45,0x62,0xad,0x60,0xb6,0xba,0xb0,0xfd,0xf5,0x9f,0xc6, -0x98,0x05,0x4f,0x4d,0x48,0xdc,0xee,0x69,0xbe,0xb8,0xc4,0xc4,0xd7,0x1b,0xb1, -0x1f,0x64,0xd6,0x45,0xa7,0xdb,0xb3,0x87,0x63,0x0f,0x54,0xe1,0x3a,0x6b,0x57, -0x36,0xd7,0x68,0x65,0xcf,0xda,0x57,0x8d,0xcd,0x84,0x75,0x47,0x26,0x2c,0xef, -0x1e,0x8f,0xc7,0x3b,0xee,0x5d,0x03,0xa6,0xdf,0x3a,0x20,0xb2,0xcc,0xc9,0x09, -0x2c,0xfe,0x2b,0x79,0xb0,0xca,0x2c,0x9a,0x81,0x6b }; -/* chain0_0 -+ - * +-> chain7_1 - * chain11_1 -+ - * A chain with two issuers, only one of whose public keys matches the - * signature. - */ -static const BYTE chain11_1[] = { -0x30,0x82,0x01,0x9b,0x30,0x82,0x01,0x08,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x72,0x41,0xa2,0x53,0xd2,0x33,0x0b,0xac,0x4a,0x30,0xfe,0x0a,0xe0,0x2e,0xd4, -0x03,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31, -0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31, -0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35, -0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05, -0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xc3,0x31,0x35,0xc3,0x9d,0x8a,0x87,0x20,0xc6,0x32,0xe9, -0xb1,0xf6,0x8f,0xf9,0x05,0x73,0x1d,0xa7,0xde,0xab,0x15,0x8a,0x9c,0x7f,0x11, -0x7e,0x77,0xa0,0x42,0x80,0xf4,0x79,0xda,0x98,0x7b,0x00,0xfa,0x8f,0x0c,0xd0, -0xeb,0x8a,0x80,0xed,0x07,0xfc,0x64,0x71,0x03,0xc1,0xd6,0x2f,0x9b,0xde,0x42, -0x63,0xd9,0x79,0xea,0xdd,0x10,0xe8,0x68,0xc8,0x69,0x4f,0x4a,0x39,0x23,0x87, -0xca,0xd1,0xc9,0x77,0x14,0x30,0x85,0x9e,0xf7,0x79,0xf9,0x07,0xb7,0x7c,0x55, -0xcb,0xa7,0xd5,0xb8,0x44,0xb5,0x20,0xb5,0x01,0x5c,0xa2,0xd1,0xd5,0xad,0x0f, -0x87,0xaf,0x37,0xd1,0x39,0x0c,0x0d,0xd5,0xde,0x26,0x7a,0xed,0xf9,0x2a,0xb1, -0x60,0x65,0x2d,0x08,0x24,0x51,0x1d,0xb0,0x0a,0xb5,0x13,0xc7,0x02,0x03,0x01, -0x00,0x01,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x03,0x81, -0x81,0x00,0x51,0x17,0xfb,0x2a,0x69,0x31,0x36,0xa7,0x37,0x2c,0x1f,0x38,0xee, -0xe3,0xf1,0xae,0x63,0x61,0xac,0x63,0x13,0xc2,0x3b,0x29,0xca,0xb1,0x8e,0x27, -0x41,0xfa,0xb3,0x7d,0x42,0xbe,0xf0,0x9c,0xe0,0xc7,0x69,0xba,0x80,0xf4,0x87, -0x7c,0x6f,0x77,0x70,0x6b,0x77,0x7d,0x5c,0x58,0x95,0x07,0xbd,0xac,0xe2,0x5d, -0x65,0x12,0xb0,0xae,0xf4,0x01,0x14,0x01,0xba,0xf9,0xa0,0x32,0x10,0xea,0x09, -0x12,0xcf,0xf1,0xbc,0x37,0xc9,0x42,0xc3,0x8c,0x9e,0xa2,0xc3,0x5e,0x2e,0x56, -0xe9,0xa7,0xd8,0x1c,0x1c,0x8c,0x1c,0x2f,0xd8,0xfb,0x67,0x44,0xd4,0xa3,0x79, -0x6d,0x53,0x17,0x56,0x3c,0x3e,0xd0,0x67,0x36,0x0c,0x8b,0x77,0xab,0x40,0xc7, -0x27,0xd9,0x44,0x69,0x13,0xeb,0x09,0xec,0x06,0xe2 }; -/* chain12_0 -> chain7_1: - * A chain whose root has an invalid signature. - */ -static const BYTE chain12_0[] = { -0x30,0x82,0x01,0xc2,0x30,0x82,0x01,0x2d,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x73,0x87,0xdb,0x32,0x3a,0x6c,0x89,0x74,0x0f,0xda,0x07,0xd4,0x6a,0x2c,0x81, -0x59,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30, -0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72, -0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30, -0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35, -0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03, -0x13,0x05,0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82, -0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34, -0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7, -0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91, -0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5, -0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd, -0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c, -0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35, -0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01, -0x00,0x01,0xa3,0x23,0x30,0x21,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01, -0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01, -0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x0b,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x82,0xcd,0x5c,0x0a, -0x9d,0x0d,0x3f,0xd1,0xd8,0x74,0xfc,0x52,0x65,0x11,0x76,0x10,0x62,0xb0,0x9a, -0xc5,0x54,0x66,0xae,0xfa,0xd5,0x66,0x36,0xcb,0x1e,0xe7,0xad,0xb9,0xfa,0x2e, -0xbb,0xb9,0x0b,0x4b,0xbf,0xe7,0x26,0x75,0x2c,0xae,0x2d,0x14,0x84,0x92,0xae, -0x56,0xdf,0x55,0x56,0xf3,0xa6,0xc5,0x21,0xa8,0x5e,0xce,0x7a,0x9d,0xff,0x7f, -0x10,0xd9,0xc3,0x05,0x52,0x86,0xdc,0x9b,0x46,0xe7,0x69,0xfb,0x1e,0xf0,0x68, -0x7d,0x34,0xd7,0xf3,0x56,0xe3,0x0a,0xf3,0xe4,0xdc,0x0f,0xd6,0x4d,0xa8,0xc5, -0xb5,0x5b,0xbf,0x0b,0x5d,0xe7,0x76,0xa1,0x56,0xc1,0xa7,0x55,0xa0,0x88,0x7f, -0x57,0x8e,0x64,0xda,0x6f,0xaa,0x9c,0xca,0x47,0xf3,0x37,0x08,0x4b,0x9a,0xdc, -0xbc,0x65,0x4d,0xff }; -/* chain0_0 -> chain13_1: - * A chain whose time validity nesting is invalid. - */ -static const BYTE chain13_1[] = { -0x30,0x82,0x01,0x93,0x30,0x81,0xfd,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,0x01, -0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00, -0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65, -0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x36,0x30,0x31,0x30,0x31,0x30,0x30, -0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33, -0x35,0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04, -0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09, -0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00, -0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,0x33, -0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,0xdc, -0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,0x48, -0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,0x47, -0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,0x05, -0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,0x6a, -0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,0x85, -0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,0xd3, -0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,0xa3, -0x02,0x03,0x01,0x00,0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x85,0xc9,0xc5,0x08,0x0b,0xb1, -0xff,0x58,0x8f,0xee,0x66,0x5f,0xa3,0x77,0x63,0x9f,0xd1,0x53,0x03,0xdc,0xf6, -0x59,0x08,0x02,0x1f,0xdc,0x52,0x5a,0x52,0x38,0xa4,0x0b,0x83,0x12,0x19,0xd6, -0xb5,0xb8,0x81,0x17,0xcd,0x10,0x5d,0x96,0x16,0x9d,0x51,0x5b,0xf9,0x31,0x3e, -0x36,0xac,0x30,0xd5,0xd6,0xa0,0x30,0x5c,0x9c,0xcb,0xe1,0x02,0xfd,0x73,0xc3, -0xa1,0x58,0xfe,0x12,0xb0,0xa6,0xbd,0x11,0x86,0xdb,0x20,0x17,0x29,0x1e,0x09, -0x63,0x4d,0x28,0xe4,0x55,0x2d,0xa1,0x78,0xde,0x28,0x0b,0x1b,0x35,0x40,0x4c, -0xf1,0xb0,0x6e,0x82,0x34,0x2b,0x7f,0x3b,0x2e,0x27,0x6b,0xf7,0xde,0x73,0x9a, -0x98,0xac,0x79,0x33,0x1a,0xdd,0x03,0x95,0x60,0x8a,0x08,0xba,0xcb,0x8a,0xbf, -0xea,0xe3 }; -/* chain14_0 -> chain14_1: - * A chain whose root is allowed to sign certificates. - */ -static const BYTE chain14_0[] = { -0x30,0x82,0x01,0xc2,0x30,0x82,0x01,0x2d,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0xe0,0x3a,0xae,0xb4,0x23,0x65,0x59,0x5c,0x05,0x85,0x76,0x8b,0x8e,0x7f,0xa4, -0x12,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30, -0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72, -0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30, -0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35, -0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03, -0x13,0x05,0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82, -0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34, -0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7, -0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91, -0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5, -0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd, -0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c, -0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35, -0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01, -0x00,0x01,0xa3,0x23,0x30,0x21,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01, -0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01, -0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x0b,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x10,0xb9,0x5c,0x13, -0x7f,0xe9,0xf3,0x45,0xfb,0x40,0xa2,0x2b,0xe6,0x99,0x5e,0x74,0x9a,0x0b,0x15, -0xa0,0x16,0xf2,0xff,0x6e,0xfa,0x92,0x78,0x4f,0x05,0x02,0xbd,0x70,0x4f,0x28, -0x6f,0x43,0xc7,0xaa,0xaf,0xb6,0xd1,0x60,0x77,0xc6,0x8a,0x58,0x85,0xf0,0xac, -0x04,0x90,0x4a,0x06,0xf0,0x17,0x88,0x12,0x90,0x22,0x65,0x98,0xb1,0x67,0x93, -0x8a,0xe6,0x2d,0x54,0x79,0x99,0xd3,0x8c,0xe7,0x86,0xf4,0xec,0x08,0xae,0x18, -0xa3,0xa9,0x23,0x7b,0x4f,0x8d,0xde,0xe6,0xf9,0x11,0x92,0xcf,0xe0,0x45,0xc3, -0x42,0x72,0x43,0x64,0x07,0x8b,0x7f,0x28,0x11,0x0a,0xea,0xf2,0xbd,0x24,0x1b, -0x93,0x5c,0x6f,0xed,0x67,0xae,0xee,0x7e,0x40,0x88,0x8b,0x28,0x2c,0xe7,0xee, -0xec,0x34,0xe0,0x7b }; -static const BYTE chain14_1[] = { -0x30,0x82,0x01,0x8d,0x30,0x81,0xf9,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,0x01, -0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30,0x10, -0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74, -0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30, -0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39, -0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13, -0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,0x02, -0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,0x33,0x0e,0x67,0x5f,0x48, -0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,0xdc,0xb6,0x17,0x8e,0x20, -0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,0x48,0x9f,0x6e,0xfe,0xb8, -0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,0x47,0xd1,0x57,0x71,0x3c, -0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,0x05,0x72,0xa7,0x87,0x8e, -0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,0x6a,0x80,0x83,0x68,0x28, -0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,0x85,0xb5,0x46,0x36,0x98, -0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,0xd3,0x51,0x9a,0x22,0x4a, -0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,0xa3,0x02,0x03,0x01,0x00, -0x01,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03, -0x81,0x81,0x00,0x63,0x67,0x7f,0x82,0x91,0xe2,0x42,0x45,0x98,0xbc,0xe5,0x03, -0x6c,0x7d,0xc9,0xab,0xdb,0x95,0xc4,0x96,0x86,0xfd,0xcf,0xe6,0x32,0x4a,0x0b, -0x7c,0x5b,0x76,0x39,0x71,0x26,0x54,0x60,0x1d,0xce,0x4f,0x29,0x22,0x9a,0xb7, -0x7d,0x8d,0xfa,0x2c,0x99,0x0d,0xa6,0xa4,0x2e,0xd3,0xf6,0x3e,0xaf,0xea,0x89, -0xa0,0x16,0x40,0x0f,0xf1,0x50,0xaa,0x98,0xdc,0xc2,0x69,0x90,0x6f,0xc6,0x4a, -0xee,0x26,0x9e,0x5e,0x7d,0x4b,0x06,0x65,0x54,0x15,0x67,0x9e,0xe5,0x1d,0x1c, -0x6f,0x0c,0x6e,0x84,0x29,0xf9,0x12,0xe9,0x71,0xdd,0xaf,0x9a,0x3d,0x2a,0xc1, -0x60,0xeb,0x27,0xed,0x7c,0xbf,0xc4,0x84,0x17,0xa5,0xa6,0x41,0x29,0x13,0x8d, -0x6c,0xdd,0x7c,0x3d,0x01,0x03,0xf8,0x70,0x97,0x3c,0x45 }; -/* chain15_0 -> chain14_1: - * A chain whose root is not allowed to sign certificates. - */ -static const BYTE chain15_0[] = { -0x30,0x82,0x01,0xc2,0x30,0x82,0x01,0x2d,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x10,0xb3,0x62,0xed,0xed,0x4a,0x92,0xda,0x74,0x62,0x74,0x48,0x99,0xa5,0xe9, -0x0d,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30, -0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72, -0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30, -0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35, -0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03, -0x13,0x05,0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82, -0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34, -0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7, -0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91, -0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5, -0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd, -0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c, -0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35, -0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01, -0x00,0x01,0xa3,0x23,0x30,0x21,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01, -0xff,0x04,0x04,0x03,0x02,0x00,0x00,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01, -0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x0b,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x51,0x48,0x43,0xc9, -0xe3,0xb4,0xbc,0xc1,0x1d,0x98,0x14,0x69,0xd9,0xec,0x83,0x4d,0x07,0x70,0x58, -0xe9,0x45,0x88,0xe5,0x11,0x4a,0xf0,0x58,0x2d,0x8d,0x08,0x35,0x76,0x0e,0x42, -0x9f,0x62,0xda,0xf9,0x71,0x51,0x58,0xc7,0xd3,0x7e,0x88,0x6a,0x92,0xd2,0xfe, -0x86,0x4f,0xa2,0x17,0xe3,0xdd,0x9b,0x55,0xe0,0xdc,0xa7,0xe7,0x08,0xe0,0x0a, -0xa6,0xf3,0x09,0x17,0x63,0x10,0x89,0xe6,0x07,0x00,0x8e,0x2c,0x44,0x79,0x3e, -0x6c,0x51,0x9a,0xa3,0x59,0x17,0x8b,0x90,0xa8,0x82,0x64,0x09,0x77,0x95,0x55, -0xd6,0x38,0x43,0x8c,0x66,0xe6,0x7b,0xb9,0xf4,0xe1,0x7b,0x86,0x9b,0x8e,0xe3, -0x56,0xc9,0x62,0x62,0x6e,0x3d,0x4d,0x67,0x8d,0x5e,0x20,0xe5,0xd0,0xfa,0xaa, -0xbe,0x91,0xa8,0xf1 }; -/* chain0_0 -> chain16_1: - * A chain whose end cert has a name constraints extension saying it can't - * be a CA, and which also has a key usage extension allowing it to sign - * certs. - */ -static const BYTE chain16_1[] = { -0x30,0x82,0x01,0xb0,0x30,0x82,0x01,0x1b,0xa0,0x03,0x02,0x01,0x02,0x02,0x01, -0x01,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30, -0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72, -0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30, -0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35, -0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03, -0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,0x33,0x0e,0x67,0x5f, -0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,0xdc,0xb6,0x17,0x8e, -0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,0x48,0x9f,0x6e,0xfe, -0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,0x47,0xd1,0x57,0x71, -0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,0x05,0x72,0xa7,0x87, -0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,0x6a,0x80,0x83,0x68, -0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,0x85,0xb5,0x46,0x36, -0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,0xd3,0x51,0x9a,0x22, -0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,0xa3,0x02,0x03,0x01, -0x00,0x01,0xa3,0x20,0x30,0x1e,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01, -0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0c,0x06,0x03,0x55,0x1d,0x13,0x01, -0x01,0xff,0x04,0x02,0x30,0x00,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7, -0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x47,0xdb,0xb4,0x95,0xb1,0xe2,0x5c, -0x03,0x3b,0x28,0x16,0x6b,0xed,0xe9,0x38,0xeb,0x74,0xe6,0xde,0xc5,0xaf,0x93, -0xad,0x2e,0xaa,0x29,0x14,0x21,0xae,0xe9,0x7d,0x46,0x18,0x05,0x67,0xad,0x2d, -0xaa,0xfa,0xf8,0x41,0xc8,0x8c,0xde,0xe0,0xd7,0x3e,0x9a,0x89,0x58,0x71,0x73, -0x57,0xc1,0xd9,0x42,0x51,0xfb,0xaa,0xb8,0x50,0x98,0x9b,0x87,0xb1,0x14,0xa2, -0x23,0xa7,0xfc,0x51,0x23,0x97,0x9f,0xef,0x06,0x83,0x63,0x91,0x14,0xc3,0xbe, -0xaa,0xc8,0x7c,0x03,0x0e,0x41,0x5a,0x23,0x9c,0x1d,0x32,0x3a,0xa5,0xf1,0x6a, -0x56,0x6c,0x36,0xe3,0x3d,0xa1,0xac,0x8e,0x1a,0x75,0x30,0x1c,0xd8,0xbc,0xae, -0x3e,0x4a,0x1a,0x05,0xf4,0x09,0x24,0xb2,0x89,0x75,0xa4,0x28,0x78,0x6b,0xfa, -0xcc }; -/* chain0_0 -> chain17_1 -> chain17_2: - * A root cert, an intermediate cert that's a CA and allowed to sign a cert, - * and an end cert. - */ -static const BYTE chain17_1[] = { -0x30,0x82,0x01,0xb3,0x30,0x82,0x01,0x1e,0xa0,0x03,0x02,0x01,0x02,0x02,0x01, -0x01,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30, -0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72, -0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30, -0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35, -0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03, -0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,0x33,0x0e,0x67,0x5f, -0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,0xdc,0xb6,0x17,0x8e, -0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,0x48,0x9f,0x6e,0xfe, -0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,0x47,0xd1,0x57,0x71, -0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,0x05,0x72,0xa7,0x87, -0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,0x6a,0x80,0x83,0x68, -0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,0x85,0xb5,0x46,0x36, -0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,0xd3,0x51,0x9a,0x22, -0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,0xa3,0x02,0x03,0x01, -0x00,0x01,0xa3,0x23,0x30,0x21,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01, -0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01, -0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x0b,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x26,0x56,0x31,0x53, -0x65,0xe3,0xd8,0x59,0xc8,0x6f,0xa3,0x5b,0x8a,0x11,0x53,0xde,0x8d,0x6f,0x6d, -0x8c,0xe1,0x79,0x25,0xb2,0xbf,0xc6,0x3b,0xa1,0x8b,0x6b,0xcd,0x99,0xcf,0x0c, -0x6f,0xaa,0xbc,0xd0,0x3d,0xb2,0xf8,0x1c,0x6f,0xb0,0x84,0x7b,0xb1,0x88,0xec, -0xd6,0x77,0xbe,0xb1,0x0b,0x8c,0x18,0x85,0xb7,0x38,0x81,0x12,0xc9,0xc7,0x4a, -0xf6,0x83,0xc4,0xd9,0xae,0xb6,0x1d,0xbb,0xd2,0x08,0x01,0x4a,0xe1,0xdc,0x8f, -0x67,0xa9,0xed,0xe2,0x3f,0x96,0xf6,0x72,0x7e,0x4a,0x63,0x46,0xc4,0x82,0x89, -0x0a,0x81,0xc8,0x3a,0x9c,0xe7,0x23,0x5f,0x8d,0xd9,0x6c,0xb2,0x5d,0x9a,0x40, -0x04,0x04,0xd5,0x4a,0x29,0x57,0xbd,0x18,0xd8,0xca,0x1f,0xf7,0xf8,0x23,0x07, -0x4b,0x03,0xa3,0xd9 }; -static const BYTE chain17_2[] = { -0x30,0x82,0x01,0x8d,0x30,0x81,0xf9,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,0x01, -0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30,0x10, -0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74, -0x32,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30, -0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39, -0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13, -0x05,0x43,0x65,0x72,0x74,0x33,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,0x02, -0x81,0x81,0x00,0xc3,0x31,0x35,0xc3,0x9d,0x8a,0x87,0x20,0xc6,0x32,0xe9,0xb1, -0xf6,0x8f,0xf9,0x05,0x73,0x1d,0xa7,0xde,0xab,0x15,0x8a,0x9c,0x7f,0x11,0x7e, -0x77,0xa0,0x42,0x80,0xf4,0x79,0xda,0x98,0x7b,0x00,0xfa,0x8f,0x0c,0xd0,0xeb, -0x8a,0x80,0xed,0x07,0xfc,0x64,0x71,0x03,0xc1,0xd6,0x2f,0x9b,0xde,0x42,0x63, -0xd9,0x79,0xea,0xdd,0x10,0xe8,0x68,0xc8,0x69,0x4f,0x4a,0x39,0x23,0x87,0xca, -0xd1,0xc9,0x77,0x14,0x30,0x85,0x9e,0xf7,0x79,0xf9,0x07,0xb7,0x7c,0x55,0xcb, -0xa7,0xd5,0xb8,0x44,0xb5,0x20,0xb5,0x01,0x5c,0xa2,0xd1,0xd5,0xad,0x0f,0x87, -0xaf,0x37,0xd1,0x39,0x0c,0x0d,0xd5,0xde,0x26,0x7a,0xed,0xf9,0x2a,0xb1,0x60, -0x65,0x2d,0x08,0x24,0x51,0x1d,0xb0,0x0a,0xb5,0x13,0xc7,0x02,0x03,0x01,0x00, -0x01,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03, -0x81,0x81,0x00,0x5c,0xb5,0x55,0xd7,0x2c,0x70,0xc5,0x6e,0xc0,0x8e,0x30,0x1f, -0xf2,0x8e,0x55,0xd6,0xf6,0x95,0xa4,0x51,0xd8,0xf0,0x39,0x98,0x12,0x57,0xa7, -0x6d,0x0c,0xfd,0xcb,0x25,0xf1,0xc4,0x73,0x85,0x78,0x82,0x15,0x12,0x08,0xb6, -0x05,0x85,0x4f,0x5a,0x59,0x1f,0x03,0xdf,0x04,0xef,0xc2,0xb0,0xee,0xd7,0x73, -0x09,0xca,0xbb,0xfb,0xd8,0xec,0x8b,0x39,0x01,0x14,0xc9,0x03,0xc9,0x08,0x4d, -0x97,0xc7,0xf2,0x0b,0x54,0x67,0xf7,0x7c,0xc6,0xee,0x74,0xd5,0xa2,0x10,0x3e, -0xd9,0x3a,0x7a,0x9d,0xeb,0xeb,0xd8,0x8e,0x43,0x74,0xc3,0xa5,0x3b,0x1a,0x4b, -0x8a,0xbc,0x6a,0x2c,0x15,0x4b,0x72,0x0b,0xac,0xa4,0x1a,0x97,0x80,0xf8,0xb1, -0xd3,0xd7,0x1a,0xf3,0xf5,0x9f,0x7c,0x4c,0x7d,0x7c,0xc7 }; -/* chain0_0 -> chain18_1 -> chain18_2: - * A root, an intermediate CA not allowed to sign certs, and an end cert. - */ -static const BYTE chain18_1[] = { -0x30,0x82,0x01,0xb3,0x30,0x82,0x01,0x1e,0xa0,0x03,0x02,0x01,0x02,0x02,0x01, -0x01,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30, -0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72, -0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30, -0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35, -0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03, -0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,0x33,0x0e,0x67,0x5f, -0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,0xdc,0xb6,0x17,0x8e, -0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,0x48,0x9f,0x6e,0xfe, -0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,0x47,0xd1,0x57,0x71, -0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,0x05,0x72,0xa7,0x87, -0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,0x6a,0x80,0x83,0x68, -0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,0x85,0xb5,0x46,0x36, -0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,0xd3,0x51,0x9a,0x22, -0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,0xa3,0x02,0x03,0x01, -0x00,0x01,0xa3,0x23,0x30,0x21,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01, -0xff,0x04,0x04,0x03,0x02,0x00,0x00,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01, -0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x0b,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x2c,0x49,0x9f,0xc2, -0xce,0xf5,0x0d,0x59,0xaa,0xff,0xa0,0x72,0xa7,0xcf,0x4c,0x35,0xc5,0x5e,0x1b, -0x32,0xe6,0x46,0x53,0x3e,0x70,0xe6,0xbc,0xa2,0x37,0xe0,0x9d,0x41,0x40,0x12, -0x9e,0x81,0x2b,0xd9,0x46,0x3a,0xdc,0xd7,0x37,0xc4,0xbf,0x0f,0x0c,0xf8,0x74, -0x7a,0xf9,0x92,0x2d,0xf8,0xfe,0xec,0x17,0xfb,0x38,0x4f,0x83,0x02,0x6f,0x49, -0xb4,0xad,0xb2,0x84,0x41,0x13,0x71,0x32,0xee,0x34,0x8d,0xea,0x2b,0x64,0x9b, -0x26,0x76,0xe9,0xcc,0xdf,0x73,0xe0,0x84,0xc1,0x8b,0xea,0xfc,0x8c,0x18,0x93, -0xfd,0xa3,0x5f,0x8f,0xde,0x05,0x11,0x88,0x62,0x0b,0x03,0x35,0x1a,0xef,0x65, -0x82,0x06,0xc8,0xa5,0xf6,0xd2,0x1e,0x46,0xc2,0x86,0xe7,0x26,0x8e,0x9e,0x10, -0x33,0xe2,0x89,0x93 }; -static const BYTE chain18_2[] = { -0x30,0x82,0x01,0x8d,0x30,0x81,0xf9,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,0x01, -0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30,0x10, -0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74, -0x32,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30, -0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39, -0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13, -0x05,0x43,0x65,0x72,0x74,0x33,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,0x02, -0x81,0x81,0x00,0xc3,0x31,0x35,0xc3,0x9d,0x8a,0x87,0x20,0xc6,0x32,0xe9,0xb1, -0xf6,0x8f,0xf9,0x05,0x73,0x1d,0xa7,0xde,0xab,0x15,0x8a,0x9c,0x7f,0x11,0x7e, -0x77,0xa0,0x42,0x80,0xf4,0x79,0xda,0x98,0x7b,0x00,0xfa,0x8f,0x0c,0xd0,0xeb, -0x8a,0x80,0xed,0x07,0xfc,0x64,0x71,0x03,0xc1,0xd6,0x2f,0x9b,0xde,0x42,0x63, -0xd9,0x79,0xea,0xdd,0x10,0xe8,0x68,0xc8,0x69,0x4f,0x4a,0x39,0x23,0x87,0xca, -0xd1,0xc9,0x77,0x14,0x30,0x85,0x9e,0xf7,0x79,0xf9,0x07,0xb7,0x7c,0x55,0xcb, -0xa7,0xd5,0xb8,0x44,0xb5,0x20,0xb5,0x01,0x5c,0xa2,0xd1,0xd5,0xad,0x0f,0x87, -0xaf,0x37,0xd1,0x39,0x0c,0x0d,0xd5,0xde,0x26,0x7a,0xed,0xf9,0x2a,0xb1,0x60, -0x65,0x2d,0x08,0x24,0x51,0x1d,0xb0,0x0a,0xb5,0x13,0xc7,0x02,0x03,0x01,0x00, -0x01,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03, -0x81,0x81,0x00,0x5c,0xb5,0x55,0xd7,0x2c,0x70,0xc5,0x6e,0xc0,0x8e,0x30,0x1f, -0xf2,0x8e,0x55,0xd6,0xf6,0x95,0xa4,0x51,0xd8,0xf0,0x39,0x98,0x12,0x57,0xa7, -0x6d,0x0c,0xfd,0xcb,0x25,0xf1,0xc4,0x73,0x85,0x78,0x82,0x15,0x12,0x08,0xb6, -0x05,0x85,0x4f,0x5a,0x59,0x1f,0x03,0xdf,0x04,0xef,0xc2,0xb0,0xee,0xd7,0x73, -0x09,0xca,0xbb,0xfb,0xd8,0xec,0x8b,0x39,0x01,0x14,0xc9,0x03,0xc9,0x08,0x4d, -0x97,0xc7,0xf2,0x0b,0x54,0x67,0xf7,0x7c,0xc6,0xee,0x74,0xd5,0xa2,0x10,0x3e, -0xd9,0x3a,0x7a,0x9d,0xeb,0xeb,0xd8,0x8e,0x43,0x74,0xc3,0xa5,0x3b,0x1a,0x4b, -0x8a,0xbc,0x6a,0x2c,0x15,0x4b,0x72,0x0b,0xac,0xa4,0x1a,0x97,0x80,0xf8,0xb1, -0xd3,0xd7,0x1a,0xf3,0xf5,0x9f,0x7c,0x4c,0x7d,0x7c,0xc7 }; -/* A chain which allows a.com, where the end cert is issued to a.com */ -static const BYTE chain19_0[] = { -0x30,0x82,0x01,0xd9,0x30,0x82,0x01,0x46,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x22,0xf4,0xa5,0xbe,0xe7,0x5f,0x91,0x89,0x4b,0x10,0x5c,0x86,0x89,0x94,0x36, -0xab,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31, -0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31, -0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35, -0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05, -0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82, -0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34, -0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7, -0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91, -0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5, -0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd, -0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c, -0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35, -0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01, -0x00,0x01,0xa3,0x3c,0x30,0x3a,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01, -0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01, -0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x17,0x06,0x03,0x55,0x1d, -0x1e,0x01,0x01,0xff,0x04,0x0d,0x30,0x0b,0xa0,0x09,0x30,0x07,0x82,0x05,0x61, -0x2e,0x63,0x6f,0x6d,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00, -0x03,0x81,0x81,0x00,0x19,0x84,0xa8,0xed,0x39,0xb3,0xc0,0x7e,0xc1,0x50,0x50, -0xb7,0x4c,0xf2,0xf4,0x16,0xc8,0x2a,0x00,0xc9,0x9e,0x0a,0x77,0x7f,0x65,0xb0, -0xe9,0x46,0x88,0x39,0x03,0xd9,0xcc,0x83,0x27,0x22,0xd3,0xec,0x98,0xb3,0x0d, -0xf6,0x85,0xe2,0x3f,0x82,0x02,0x96,0xd2,0x9f,0x17,0xcb,0x7c,0x06,0xbb,0xe5, -0x58,0x0d,0x9e,0xc3,0x01,0xcd,0xba,0xee,0x26,0x7d,0xc6,0x2b,0x50,0xa7,0xf3, -0x9e,0x28,0x87,0xa8,0x9a,0x8b,0x1c,0x73,0x79,0x3e,0xed,0xa0,0xcf,0x70,0xf0, -0x53,0x89,0x1f,0xbf,0x0d,0x6b,0x30,0xb1,0x5e,0x16,0x6d,0x57,0x81,0xe9,0xad, -0x63,0xe5,0x03,0x50,0x99,0x3d,0xb3,0xad,0x1d,0x9c,0x6b,0x32,0xea,0xc3,0x7f, -0x54,0x22,0x89,0x69,0xbf,0x73,0xdc,0x87,0xff,0x4b,0xf1,0xf6 }; -static const BYTE chain19_1[] = { -0x30,0x82,0x01,0xaa,0x30,0x82,0x01,0x13,0xa0,0x03,0x02,0x01,0x02,0x02,0x01, -0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43, -0x65,0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55, -0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06, -0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d, -0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5, -0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6, -0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7, -0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b, -0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b, -0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc, -0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85, -0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2, -0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72, -0xa3,0x02,0x03,0x01,0x00,0x01,0xa3,0x14,0x30,0x12,0x30,0x10,0x06,0x03,0x55, -0x1d,0x07,0x04,0x09,0x30,0x07,0x82,0x05,0x61,0x2e,0x63,0x6f,0x6d,0x30,0x0d, -0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81, -0x81,0x00,0x8e,0x1d,0xf5,0xac,0x59,0x8e,0x39,0x7a,0x4d,0x79,0x79,0x68,0xa9, -0x13,0x25,0xbf,0x71,0x62,0x73,0x55,0xb0,0x22,0xcb,0x8a,0x22,0xa2,0x4f,0xa3, -0xfc,0x22,0xa3,0x2c,0x4c,0xe3,0x95,0xc6,0x97,0xe1,0x97,0xf1,0xee,0xb0,0xb4, -0xac,0x7a,0x80,0xe3,0xdd,0x02,0x5a,0x42,0x30,0xe7,0x27,0x0e,0x69,0xff,0x6b, -0xb2,0x83,0x7a,0x4f,0xc7,0xaa,0x05,0x95,0xb5,0x18,0x5f,0xa8,0x29,0x97,0x3b, -0xf2,0xb8,0x35,0x06,0x1b,0xfe,0xfa,0xa8,0x91,0xc7,0xb7,0x1b,0x8b,0xaa,0xd5, -0x23,0x88,0x7f,0xd9,0x88,0x45,0xee,0xd4,0xb9,0xcd,0x36,0xd4,0x5a,0x28,0x86, -0x0d,0x92,0x5d,0xcb,0x8c,0xf1,0xd9,0xfb,0xcc,0xa4,0x65,0xda,0x8d,0x6e,0xfd, -0x99,0xed,0xf1,0xc6,0x45,0xdf,0x5b,0x1f,0xf5,0xa0 }; -/* A chain which allows a.com, where the end cert is issued to b.com */ -static const BYTE chain20_0[] = { -0x30,0x82,0x01,0xd9,0x30,0x82,0x01,0x46,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x5e,0xf5,0xbf,0x5a,0x8d,0x92,0xd9,0x8e,0x46,0x09,0xbf,0x50,0x27,0x2f,0xc1, -0x4b,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31, -0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31, -0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35, -0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05, -0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82, -0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34, -0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7, -0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91, -0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5, -0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd, -0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c, -0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35, -0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01, -0x00,0x01,0xa3,0x3c,0x30,0x3a,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01, -0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01, -0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x17,0x06,0x03,0x55,0x1d, -0x1e,0x01,0x01,0xff,0x04,0x0d,0x30,0x0b,0xa0,0x09,0x30,0x07,0x82,0x05,0x61, -0x2e,0x63,0x6f,0x6d,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00, -0x03,0x81,0x81,0x00,0x4e,0xd8,0x55,0xa5,0x18,0xa8,0xc3,0xc4,0xa2,0xed,0x11, -0xff,0x12,0x78,0xbe,0xa5,0xaf,0x6c,0x9f,0xa5,0x94,0x46,0xd3,0x74,0x8e,0x44, -0x45,0x9f,0xf2,0xf9,0x0b,0xbe,0x28,0x08,0xf2,0x28,0x4a,0xd5,0x00,0x71,0xb2, -0xa5,0x01,0x3b,0x86,0xd6,0x8f,0xb8,0x9a,0xbc,0x8e,0xe4,0x33,0x9e,0xc2,0x5d, -0xcc,0x5c,0x24,0x90,0x52,0xbc,0xe6,0x83,0x38,0x77,0xd6,0x25,0x1b,0xfa,0x37, -0xc1,0xf6,0x22,0xa7,0xff,0xc6,0x4b,0x16,0x73,0xf5,0xca,0x04,0xad,0xa5,0x71, -0xff,0x15,0x5b,0x34,0x84,0xd4,0x45,0xce,0xfb,0xd1,0x76,0x13,0x2f,0x53,0x3e, -0x82,0xba,0x2f,0x53,0x82,0x48,0xcb,0x3a,0x77,0xd4,0xb0,0x0f,0xb5,0x38,0x68, -0x73,0x3f,0x49,0x60,0x0f,0x61,0x58,0xae,0x25,0xd8,0xe6,0x73 }; -static const BYTE chain20_1[] = { -0x30,0x82,0x01,0xaa,0x30,0x82,0x01,0x13,0xa0,0x03,0x02,0x01,0x02,0x02,0x01, -0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43, -0x65,0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55, -0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06, -0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d, -0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5, -0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6, -0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7, -0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b, -0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b, -0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc, -0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85, -0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2, -0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72, -0xa3,0x02,0x03,0x01,0x00,0x01,0xa3,0x14,0x30,0x12,0x30,0x10,0x06,0x03,0x55, -0x1d,0x07,0x04,0x09,0x30,0x07,0x82,0x05,0x62,0x2e,0x63,0x6f,0x6d,0x30,0x0d, -0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81, -0x81,0x00,0x17,0xbb,0xec,0x37,0x4c,0xaf,0x0f,0xb0,0x57,0x04,0x01,0x67,0x69, -0x77,0xe4,0x73,0xc4,0x12,0x0a,0xa5,0xfe,0x0c,0x8b,0x89,0x90,0x98,0x0d,0x3b, -0x37,0xbe,0xe7,0x7e,0xba,0x84,0x27,0x5f,0xed,0x40,0xc9,0x57,0x91,0x6b,0x72, -0xe3,0x4c,0xfa,0x9f,0x6d,0xd5,0xe6,0xf8,0x33,0xa1,0x6e,0xbd,0x5f,0x8d,0xfb, -0x8f,0xe6,0xe1,0x6a,0x64,0x51,0x1e,0x3b,0x04,0xe4,0x3b,0xa2,0x49,0x15,0x23, -0x35,0x17,0x61,0x4a,0xa6,0x03,0xee,0xa2,0xa6,0x4f,0x42,0x13,0x75,0x14,0xd3, -0x87,0x3b,0x71,0x6a,0x2f,0x11,0xcd,0xe6,0xd0,0x63,0xce,0x62,0x8c,0xd9,0x64, -0xc0,0xaa,0x53,0x4e,0x5e,0xa2,0x4c,0x6e,0xd0,0x13,0x49,0x2e,0xdf,0x81,0x3a, -0x3c,0x67,0xcf,0x4e,0xde,0x95,0x14,0x74,0xa8,0x31 }; -/* A chain which allows A.com, where the end cert is issued to a.COM */ -static const BYTE chain21_0[] = { -0x30,0x82,0x01,0xd9,0x30,0x82,0x01,0x46,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x66,0xaf,0x57,0xcc,0x4b,0x41,0xd1,0x96,0x40,0xef,0xa4,0xc9,0xe0,0x96,0xad, -0x5c,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31, -0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31, -0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35, -0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05, -0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82, -0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34, -0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7, -0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91, -0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5, -0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd, -0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c, -0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35, -0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01, -0x00,0x01,0xa3,0x3c,0x30,0x3a,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01, -0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01, -0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x17,0x06,0x03,0x55,0x1d, -0x1e,0x01,0x01,0xff,0x04,0x0d,0x30,0x0b,0xa0,0x09,0x30,0x07,0x82,0x05,0x41, -0x2e,0x63,0x6f,0x6d,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00, -0x03,0x81,0x81,0x00,0x66,0x0e,0x8e,0x3d,0x1b,0xe8,0x51,0x2d,0x5f,0xfa,0xf5, -0x01,0xb1,0xf8,0x8e,0x65,0xf6,0xcf,0x63,0x40,0x27,0x20,0x41,0xfc,0xa2,0x97, -0x14,0x8d,0x46,0x33,0x3b,0x79,0xc7,0x3d,0xc8,0x1d,0xb3,0xf1,0xf3,0x52,0xfb, -0x76,0x55,0x00,0xb9,0x4d,0x89,0x4c,0xfd,0xa9,0xcc,0xa0,0x96,0x86,0x15,0x40, -0xfc,0xd2,0x5b,0x60,0xca,0x9c,0x00,0xf8,0x02,0x6a,0x56,0x1c,0x79,0x94,0x01, -0x8a,0x60,0x44,0x1a,0x2f,0x34,0x94,0xb6,0xfb,0x00,0xa7,0xd1,0x47,0xd8,0x8f, -0xf7,0xf5,0xfc,0xfd,0xeb,0xf7,0xa1,0xab,0xa7,0x38,0x13,0x16,0x50,0x04,0x8e, -0xf2,0x17,0x45,0xac,0x10,0x83,0x08,0x1c,0x0d,0xe9,0xa9,0xea,0x4e,0x0e,0x06, -0x09,0xca,0xb3,0x54,0xd1,0x44,0x10,0x47,0xac,0xaf,0xbc,0xbb }; -static const BYTE chain21_1[] = { -0x30,0x82,0x01,0xaa,0x30,0x82,0x01,0x13,0xa0,0x03,0x02,0x01,0x02,0x02,0x01, -0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43, -0x65,0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55, -0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06, -0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d, -0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5, -0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6, -0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7, -0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b, -0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b, -0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc, -0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85, -0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2, -0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72, -0xa3,0x02,0x03,0x01,0x00,0x01,0xa3,0x14,0x30,0x12,0x30,0x10,0x06,0x03,0x55, -0x1d,0x07,0x04,0x09,0x30,0x07,0x82,0x05,0x61,0x2e,0x43,0x4f,0x4d,0x30,0x0d, -0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81, -0x81,0x00,0x65,0xd5,0xaa,0x17,0x1f,0xa8,0xda,0x62,0x04,0x9d,0xf5,0xe0,0x82, -0xe4,0xed,0xc6,0x1b,0x54,0x8f,0xb7,0x46,0xac,0xcd,0xaf,0xaa,0xe3,0xd8,0x4a, -0x8b,0xd9,0xe6,0x87,0x4f,0x8c,0xa6,0x86,0x97,0x75,0x08,0x42,0xf1,0xed,0x3e, -0x70,0x99,0x13,0xf2,0x00,0xf8,0xcc,0xf4,0x55,0x36,0xf5,0x29,0x97,0x47,0x71, -0xb8,0x40,0x8d,0x47,0x03,0xe2,0x66,0x3c,0x00,0x01,0xcc,0xa7,0x39,0xf7,0xf9, -0x76,0xfc,0x14,0x31,0x1f,0x6f,0xf0,0x87,0xe0,0x43,0x8b,0xad,0x98,0xa2,0xe3, -0xfe,0x49,0xa3,0x1e,0x57,0x34,0xe8,0x61,0x97,0x23,0xc8,0x03,0x05,0xa4,0x2f, -0xab,0x49,0x97,0xff,0x3f,0xbf,0x6c,0x08,0x2c,0x6b,0x4d,0x6a,0x54,0x62,0x2e, -0x16,0x83,0xac,0xdd,0x21,0x8f,0xe7,0x71,0x12,0x5f }; -/* A chain which allows A.com, where the end cert is issued to b.COM */ -static const BYTE chain22_0[] = { -0x30,0x82,0x01,0xd9,0x30,0x82,0x01,0x46,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x75,0xff,0x32,0x4c,0x24,0xbb,0x4e,0xb9,0x45,0x70,0xc3,0x4a,0xe1,0xfd,0xdb, -0xdc,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31, -0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31, -0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35, -0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05, -0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82, -0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34, -0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7, -0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91, -0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5, -0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd, -0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c, -0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35, -0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01, -0x00,0x01,0xa3,0x3c,0x30,0x3a,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01, -0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01, -0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x17,0x06,0x03,0x55,0x1d, -0x1e,0x01,0x01,0xff,0x04,0x0d,0x30,0x0b,0xa0,0x09,0x30,0x07,0x82,0x05,0x41, -0x2e,0x63,0x6f,0x6d,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00, -0x03,0x81,0x81,0x00,0x43,0x9b,0xcf,0x0d,0x31,0x9a,0x33,0x9d,0x7a,0xf8,0x2b, -0x5a,0x6f,0x52,0x68,0x25,0x7e,0x14,0x04,0xb1,0x88,0x90,0xa3,0xa8,0x4e,0xa8, -0x0c,0xc2,0x06,0x35,0x6c,0xb9,0x07,0x9a,0x28,0xd0,0x54,0xad,0x5f,0xc7,0x5e, -0xbf,0x1d,0xde,0x3d,0x76,0x6d,0x32,0x6c,0xc2,0x95,0x26,0x8e,0x6a,0xc5,0xfd, -0x45,0x47,0x3a,0x2e,0x81,0x47,0x37,0xf9,0xe3,0xdb,0x57,0xd5,0x24,0xe9,0x10, -0x91,0x55,0xbf,0x48,0xaa,0x27,0x7a,0x32,0xc8,0x96,0xbc,0xd8,0x9d,0xb5,0x03, -0x6e,0x64,0x50,0xa6,0x9d,0xc2,0xd9,0xdb,0x67,0x8d,0xad,0x76,0x82,0x75,0x42, -0x78,0x38,0x3c,0x31,0x55,0x1e,0x8f,0xbb,0x18,0xc9,0xf3,0xa4,0x49,0xc7,0x24, -0x1a,0x9b,0xef,0x61,0x03,0x75,0xb7,0x2b,0x8b,0xd4,0x50,0x8b }; -static const BYTE chain22_1[] = { -0x30,0x82,0x01,0xaa,0x30,0x82,0x01,0x13,0xa0,0x03,0x02,0x01,0x02,0x02,0x01, -0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43, -0x65,0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55, -0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06, -0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d, -0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5, -0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6, -0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7, -0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b, -0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b, -0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc, -0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85, -0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2, -0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72, -0xa3,0x02,0x03,0x01,0x00,0x01,0xa3,0x14,0x30,0x12,0x30,0x10,0x06,0x03,0x55, -0x1d,0x07,0x04,0x09,0x30,0x07,0x82,0x05,0x62,0x2e,0x43,0x4f,0x4d,0x30,0x0d, -0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81, -0x81,0x00,0x4b,0x4c,0x2f,0x68,0xd2,0x64,0x82,0x7d,0x95,0x1d,0xd0,0x2b,0xa4, -0xab,0xc3,0x9d,0xd8,0xc1,0x0f,0xaa,0x3e,0xc6,0xa3,0x11,0x9a,0xc6,0x58,0x40, -0x49,0xcc,0x92,0x8e,0xd4,0x0d,0x20,0x81,0x65,0x59,0xca,0x7d,0x54,0xce,0xd4, -0x43,0x95,0xb5,0xc3,0x8c,0x79,0x01,0xc6,0x17,0xf8,0x04,0x13,0xf7,0x7c,0xf7, -0x7f,0xd7,0xc6,0x62,0x2c,0x21,0x0d,0xab,0x79,0x82,0xd7,0x70,0x9f,0x38,0xba, -0x5f,0x2f,0xb4,0xfd,0xe8,0x62,0x40,0xe3,0x69,0xe7,0xc4,0xe5,0x5a,0xc1,0x71, -0xc0,0x9a,0xdc,0xcc,0xa6,0x0e,0x5e,0x84,0x27,0x70,0xc3,0x47,0x98,0x72,0x89, -0xf9,0x7c,0xe4,0x15,0x4b,0x4c,0xec,0x56,0x1b,0xbf,0x6c,0xf1,0xf7,0x5a,0x76, -0x80,0x1f,0x43,0x7c,0xae,0xdb,0xb3,0x49,0xbc,0xcb }; -/* A chain which allows *.com, where the end cert is issued to foo.com */ -static const BYTE chain23_0[] = { -0x30,0x82,0x01,0xd9,0x30,0x82,0x01,0x46,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x70,0x29,0x25,0xb2,0x21,0xd9,0x44,0x8a,0x4b,0x9d,0xf3,0x4e,0x6b,0xdb,0x7c, -0xa7,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31, -0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31, -0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35, -0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05, -0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82, -0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34, -0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7, -0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91, -0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5, -0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd, -0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c, -0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35, -0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01, -0x00,0x01,0xa3,0x3c,0x30,0x3a,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01, -0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01, -0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x17,0x06,0x03,0x55,0x1d, -0x1e,0x01,0x01,0xff,0x04,0x0d,0x30,0x0b,0xa0,0x09,0x30,0x07,0x82,0x05,0x2a, -0x2e,0x63,0x6f,0x6d,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00, -0x03,0x81,0x81,0x00,0x39,0x5b,0xf7,0xc9,0x4e,0xac,0x65,0x8b,0x56,0xf4,0xaf, -0x23,0xaa,0x1b,0x95,0x0a,0x6e,0x62,0xa8,0x39,0xa0,0xc7,0x86,0x6f,0xb2,0xac, -0x45,0xb6,0x99,0x21,0x66,0x48,0x1a,0x7d,0xe9,0xa9,0xfe,0x5c,0xc6,0xa7,0x25, -0x89,0x66,0x84,0xc4,0x8e,0x05,0x3b,0x53,0xcf,0xee,0x78,0x88,0x85,0xf1,0x8f, -0xce,0x6e,0x72,0xc6,0x0c,0x06,0x3d,0xa6,0x12,0xad,0x0a,0x07,0xbb,0x16,0x2f, -0x0c,0x96,0x0c,0x78,0x31,0xfa,0x93,0x5a,0x2d,0x8d,0x02,0xf5,0xb0,0x1c,0x83, -0x53,0x14,0xc6,0xa6,0x29,0xa6,0xfe,0xb1,0xc0,0x65,0x72,0x47,0xe9,0xf6,0x01, -0x09,0xa4,0xff,0xd2,0x60,0x87,0x81,0xc1,0xb4,0xe7,0xe8,0x3e,0x9a,0xba,0x25, -0xb2,0x36,0x50,0xc4,0xf8,0xb1,0x94,0x07,0xba,0xdd,0x6a,0x95 }; -static const BYTE chain23_1[] = { -0x30,0x82,0x01,0xac,0x30,0x82,0x01,0x15,0xa0,0x03,0x02,0x01,0x02,0x02,0x01, -0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43, -0x65,0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55, -0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06, -0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d, -0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5, -0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6, -0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7, -0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b, -0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b, -0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc, -0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85, -0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2, -0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72, -0xa3,0x02,0x03,0x01,0x00,0x01,0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03,0x55, -0x1d,0x07,0x04,0x0b,0x30,0x09,0x82,0x07,0x66,0x6f,0x6f,0x2e,0x63,0x6f,0x6d, -0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00, -0x03,0x81,0x81,0x00,0xa5,0xc0,0xf6,0xb1,0x63,0x3a,0x23,0xc5,0xb0,0x07,0xb4, -0x83,0xcf,0x36,0xb4,0xfe,0x3c,0xcb,0xa6,0x6b,0xed,0xf7,0x4c,0x25,0x9f,0x2d, -0x88,0xcd,0x8a,0xe4,0x88,0xe3,0x33,0xbb,0x50,0x54,0xee,0xc9,0xad,0xed,0x8b, -0xec,0x1e,0x64,0x36,0xe8,0xb5,0x51,0xca,0xd3,0xa5,0xb9,0x7a,0x2d,0x4b,0xe7, -0xe8,0xc9,0xa5,0x1d,0x49,0xa1,0x31,0x0f,0x50,0x46,0xb0,0x0f,0xd0,0xf6,0xad, -0x51,0x18,0x93,0x25,0x8f,0x4f,0x57,0x12,0x72,0x1e,0xa7,0x44,0x37,0x9f,0xf2, -0xc0,0x28,0xe8,0xbe,0xb8,0x75,0x42,0xef,0x1d,0x7a,0xca,0x87,0x0c,0x11,0x25, -0xeb,0xab,0xcf,0xe0,0xe1,0x12,0x38,0xf6,0x68,0x31,0xfb,0x16,0xcb,0xef,0x67, -0x8c,0x4b,0x6b,0xfd,0x69,0xba,0x0b,0x69,0xee,0x74,0xe0,0x73 }; -/* A chain which allows *.com, where the end cert is issued to foo.bar.com */ -static const BYTE chain24_0[] = { -0x30,0x82,0x01,0xd9,0x30,0x82,0x01,0x46,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x57,0xa6,0x19,0xe0,0x2a,0x65,0x89,0x8d,0x4c,0xd9,0x58,0x8f,0xd0,0xe5,0x5a, -0x02,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31, -0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31, -0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35, -0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05, -0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82, -0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34, -0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7, -0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91, -0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5, -0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd, -0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c, -0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35, -0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01, -0x00,0x01,0xa3,0x3c,0x30,0x3a,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01, -0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01, -0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x17,0x06,0x03,0x55,0x1d, -0x1e,0x01,0x01,0xff,0x04,0x0d,0x30,0x0b,0xa0,0x09,0x30,0x07,0x82,0x05,0x2a, -0x2e,0x63,0x6f,0x6d,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00, -0x03,0x81,0x81,0x00,0x44,0xec,0x96,0x0c,0x82,0x70,0xd6,0x4f,0xa0,0xa0,0x9e, -0x6f,0xfc,0x93,0xcb,0xbb,0x9b,0xb7,0x34,0xf9,0x9c,0x00,0x00,0x7e,0x11,0xeb, -0x38,0x85,0x8d,0xc9,0xc5,0x69,0x05,0x8e,0xcd,0x82,0x6c,0xe4,0xe5,0xb8,0x63, -0xa6,0x8b,0xe5,0x17,0x9e,0x24,0x67,0x34,0xdd,0x4c,0x62,0xdd,0x08,0xfe,0xdc, -0x90,0xe1,0x8e,0x02,0xfe,0xe9,0xc4,0x19,0xfc,0x7d,0xef,0x24,0xcc,0x99,0x9f, -0x11,0x81,0x6a,0x4d,0x46,0xc8,0x48,0x73,0xc8,0x52,0x89,0xab,0xc7,0x0d,0x9b, -0x77,0xc0,0xbc,0xb5,0x57,0x51,0x2e,0x64,0xad,0x98,0x39,0xd3,0x6d,0xe9,0xe1, -0x58,0x32,0x01,0xfa,0xc7,0xa9,0x89,0x58,0x86,0x3c,0x34,0xc3,0x90,0xd6,0xed, -0x4a,0xdc,0x23,0x66,0xc5,0xab,0x76,0xb9,0x47,0xc8,0x00,0x4c }; -static const BYTE chain24_1[] = { -0x30,0x82,0x01,0xb0,0x30,0x82,0x01,0x19,0xa0,0x03,0x02,0x01,0x02,0x02,0x01, -0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43, -0x65,0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55, -0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06, -0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d, -0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5, -0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6, -0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7, -0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b, -0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b, -0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc, -0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85, -0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2, -0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72, -0xa3,0x02,0x03,0x01,0x00,0x01,0xa3,0x1a,0x30,0x18,0x30,0x16,0x06,0x03,0x55, -0x1d,0x07,0x04,0x0f,0x30,0x0d,0x82,0x0b,0x66,0x6f,0x6f,0x2e,0x62,0x61,0x72, -0x2e,0x63,0x6f,0x6d,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x28,0x64,0x0b,0xad,0x9f,0x12,0xd4, -0x77,0xbe,0x1d,0x20,0x3b,0x69,0x74,0xce,0x91,0x69,0xbe,0x3f,0x76,0x1d,0xe7, -0x81,0x92,0x2b,0xdc,0xbb,0xf9,0xd9,0xba,0xf0,0xba,0x58,0x4a,0x9b,0x47,0x59, -0x34,0xf7,0x19,0xb5,0x15,0x31,0x35,0x4a,0x6d,0x7b,0x91,0x3d,0xc2,0x6c,0x8f, -0x58,0x27,0x0f,0x79,0x96,0x57,0xee,0x4e,0x66,0x3e,0xfa,0x5c,0x22,0xb9,0x57, -0xbf,0x8e,0x7e,0xce,0x98,0x62,0x28,0xb1,0x39,0x0e,0x2d,0x7b,0x5d,0x23,0x70, -0xf0,0x4a,0x63,0x11,0x66,0x80,0xf9,0x99,0x53,0x80,0xda,0x87,0x87,0xf7,0x3c, -0x44,0x76,0x66,0x26,0xa7,0x05,0x3c,0x68,0x66,0x1c,0x07,0x4d,0xcf,0x54,0xaa, -0x5d,0xba,0x7a,0x8f,0x06,0xa7,0x1e,0x86,0xf1,0x5a,0x4b,0x50,0x16,0xad,0x9f, -0x89 }; -/* A chain which allows f*.com, where the end cert is issued to foo.com */ -static const BYTE chain25_0[] = { -0x30,0x82,0x01,0xda,0x30,0x82,0x01,0x47,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x58,0x61,0x5e,0xb3,0x52,0x48,0xc2,0xa7,0x4a,0xa4,0x70,0x8a,0x64,0x96,0xac, -0xc6,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31, -0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31, -0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35, -0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05, -0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82, -0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34, -0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7, -0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91, -0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5, -0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd, -0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c, -0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35, -0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01, -0x00,0x01,0xa3,0x3d,0x30,0x3b,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01, -0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01, -0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x18,0x06,0x03,0x55,0x1d, -0x1e,0x01,0x01,0xff,0x04,0x0e,0x30,0x0c,0xa0,0x0a,0x30,0x08,0x82,0x06,0x66, -0x2a,0x2e,0x63,0x6f,0x6d,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05, -0x00,0x03,0x81,0x81,0x00,0x18,0xb1,0xb1,0x84,0x3c,0x55,0x29,0xfc,0xd0,0xa7, -0xcd,0x40,0x88,0x9b,0x35,0x9a,0x14,0xa1,0x34,0xd7,0x20,0xd9,0xfb,0x52,0x2f, -0xba,0x6c,0x19,0x5c,0xdc,0x0b,0x0b,0xa5,0x21,0xf9,0x0f,0x98,0x23,0xb6,0xcd, -0x36,0x3f,0xed,0xeb,0xf3,0x10,0xbf,0x62,0x33,0xbb,0xb1,0x94,0x79,0x45,0xe4, -0x42,0x2b,0x9e,0x32,0x53,0x18,0x19,0x59,0x4d,0xc9,0x2d,0x65,0xa4,0xcb,0xd4, -0x0b,0x90,0x2a,0xfe,0xea,0x7f,0x10,0xa9,0xb7,0x65,0xf8,0xc3,0xad,0x26,0x4c, -0x29,0x45,0x60,0xce,0x6a,0x63,0x3e,0xa4,0x6f,0x47,0xaf,0x96,0xea,0xc4,0x35, -0xb0,0x83,0xd7,0x52,0xa9,0x1a,0xd0,0x9a,0x6d,0xac,0xcf,0x6a,0xa6,0xe8,0x8e, -0x52,0x61,0x34,0x95,0xd2,0x22,0x83,0x1f,0x86,0x15,0xa0,0x91,0x2b }; -static const BYTE chain25_1[] = { -0x30,0x82,0x01,0xac,0x30,0x82,0x01,0x15,0xa0,0x03,0x02,0x01,0x02,0x02,0x01, -0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43, -0x65,0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55, -0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06, -0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d, -0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5, -0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6, -0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7, -0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b, -0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b, -0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc, -0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85, -0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2, -0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72, -0xa3,0x02,0x03,0x01,0x00,0x01,0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03,0x55, -0x1d,0x07,0x04,0x0b,0x30,0x09,0x82,0x07,0x66,0x6f,0x6f,0x2e,0x63,0x6f,0x6d, -0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00, -0x03,0x81,0x81,0x00,0xa5,0xc0,0xf6,0xb1,0x63,0x3a,0x23,0xc5,0xb0,0x07,0xb4, -0x83,0xcf,0x36,0xb4,0xfe,0x3c,0xcb,0xa6,0x6b,0xed,0xf7,0x4c,0x25,0x9f,0x2d, -0x88,0xcd,0x8a,0xe4,0x88,0xe3,0x33,0xbb,0x50,0x54,0xee,0xc9,0xad,0xed,0x8b, -0xec,0x1e,0x64,0x36,0xe8,0xb5,0x51,0xca,0xd3,0xa5,0xb9,0x7a,0x2d,0x4b,0xe7, -0xe8,0xc9,0xa5,0x1d,0x49,0xa1,0x31,0x0f,0x50,0x46,0xb0,0x0f,0xd0,0xf6,0xad, -0x51,0x18,0x93,0x25,0x8f,0x4f,0x57,0x12,0x72,0x1e,0xa7,0x44,0x37,0x9f,0xf2, -0xc0,0x28,0xe8,0xbe,0xb8,0x75,0x42,0xef,0x1d,0x7a,0xca,0x87,0x0c,0x11,0x25, -0xeb,0xab,0xcf,0xe0,0xe1,0x12,0x38,0xf6,0x68,0x31,0xfb,0x16,0xcb,0xef,0x67, -0x8c,0x4b,0x6b,0xfd,0x69,0xba,0x0b,0x69,0xee,0x74,0xe0,0x73 }; -/* A chain which allows f*.com, where the end cert is issued to bar.com */ -static const BYTE chain26_0[] = { -0x30,0x82,0x01,0xda,0x30,0x82,0x01,0x47,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x6f,0x9d,0x2b,0x8a,0x6d,0xf2,0xd4,0x9f,0x42,0xea,0x3d,0x16,0xe8,0xa5,0x80, -0x7e,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31, -0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31, -0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35, -0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05, -0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82, -0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34, -0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7, -0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91, -0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5, -0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd, -0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c, -0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35, -0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01, -0x00,0x01,0xa3,0x3d,0x30,0x3b,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01, -0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01, -0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x18,0x06,0x03,0x55,0x1d, -0x1e,0x01,0x01,0xff,0x04,0x0e,0x30,0x0c,0xa0,0x0a,0x30,0x08,0x82,0x06,0x66, -0x2a,0x2e,0x63,0x6f,0x6d,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05, -0x00,0x03,0x81,0x81,0x00,0x6c,0x34,0x75,0x37,0xd9,0x65,0x9e,0x20,0x05,0x67, -0x16,0x2e,0xc9,0x53,0xc1,0x69,0x53,0xd6,0x00,0x2c,0x92,0x53,0x91,0xa2,0x2a, -0x94,0x2c,0xfa,0x6f,0xc1,0x7e,0xee,0x3c,0x22,0x06,0xcc,0xd1,0xdc,0xd7,0x21, -0x6a,0xf2,0xd3,0x1b,0xaf,0x34,0x20,0x97,0x0f,0xa1,0xec,0x7f,0x72,0x22,0xf2, -0x98,0x5d,0xf4,0x0b,0x83,0x23,0xa7,0x73,0xb2,0xde,0x12,0x56,0xc9,0x11,0xa6, -0x5d,0xbc,0x32,0x79,0x41,0x8b,0xe6,0x8c,0x9c,0xf9,0x78,0xd2,0x20,0x96,0x27, -0x85,0x41,0xc1,0xb8,0x8a,0x74,0x1e,0xbb,0x27,0xc1,0xf7,0xaf,0xe8,0x1c,0x21, -0xe4,0x10,0x64,0x6a,0xdf,0x79,0x30,0x29,0x0e,0x5a,0x04,0x48,0x18,0xdd,0xb0, -0xaa,0x43,0x08,0x71,0x2e,0x49,0x9f,0x9b,0xc1,0x1a,0xcc,0x5f,0xee }; -static const BYTE chain26_1[] = { -0x30,0x82,0x01,0xac,0x30,0x82,0x01,0x15,0xa0,0x03,0x02,0x01,0x02,0x02,0x01, -0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43, -0x65,0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55, -0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06, -0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d, -0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5, -0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6, -0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7, -0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b, -0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b, -0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc, -0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85, -0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2, -0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72, -0xa3,0x02,0x03,0x01,0x00,0x01,0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03,0x55, -0x1d,0x07,0x04,0x0b,0x30,0x09,0x82,0x07,0x62,0x61,0x72,0x2e,0x63,0x6f,0x6d, -0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00, -0x03,0x81,0x81,0x00,0x47,0xa6,0x37,0x73,0x4f,0x19,0xf9,0xaf,0xa9,0xb5,0xa8, -0x41,0x99,0x31,0xa5,0xaa,0x0d,0x6c,0xb8,0x9d,0xe6,0xf6,0x59,0x4d,0xd8,0x12, -0x76,0xcc,0x0b,0xaa,0x2f,0x08,0x1c,0x75,0x54,0x5a,0xae,0x09,0x39,0x25,0xfc, -0x44,0xa1,0x00,0x24,0x5c,0xec,0x20,0x04,0xc7,0xe9,0x14,0xb0,0x71,0x4a,0x33, -0x41,0x7f,0x1d,0x47,0xe5,0x7c,0xe4,0x86,0xb1,0xeb,0xa4,0x9d,0x2a,0x89,0xeb, -0x1d,0x15,0xd6,0x42,0x39,0xe4,0x05,0x26,0xbf,0xc2,0x09,0x6c,0x5c,0xd1,0x56, -0xfd,0x18,0x42,0xd3,0xd5,0x7c,0x52,0xa8,0x4a,0x77,0xe8,0xc0,0x53,0x2b,0xa6, -0x01,0xf9,0x90,0x68,0x60,0x3f,0xcb,0xb8,0x24,0x16,0x0b,0x69,0x4b,0xd9,0xf8, -0x2c,0x92,0xed,0x89,0xa5,0xff,0x71,0xc5,0xed,0xe8,0xbc,0x70 }; -/* A chain which allows foo.com, where the end cert is issued to - * foo.com\0baddie - */ -static const BYTE chain27_0[] = { -0x30,0x82,0x01,0xdb,0x30,0x82,0x01,0x48,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x3d,0xd2,0x79,0xf1,0xa7,0x1a,0xac,0xb2,0x43,0x5e,0x53,0x67,0xc9,0xa1,0x8c, -0x53,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31, -0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31, -0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35, -0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05, -0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82, -0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34, -0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7, -0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91, -0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5, -0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd, -0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c, -0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35, -0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01, -0x00,0x01,0xa3,0x3e,0x30,0x3c,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01, -0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01, -0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x19,0x06,0x03,0x55,0x1d, -0x1e,0x01,0x01,0xff,0x04,0x0f,0x30,0x0d,0xa0,0x0b,0x30,0x09,0x82,0x07,0x66, -0x6f,0x6f,0x2e,0x63,0x6f,0x6d,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d, -0x05,0x00,0x03,0x81,0x81,0x00,0x18,0x5d,0xb0,0x42,0x96,0xf7,0x96,0x7b,0x23, -0x46,0xa9,0xf4,0x99,0x57,0x27,0x8e,0x24,0xae,0x29,0xb8,0x04,0xe3,0x1b,0x64, -0x22,0x8e,0x20,0xf1,0x45,0xb8,0x84,0x38,0x41,0x99,0x73,0xb2,0xbc,0xd9,0xcb, -0x9d,0x9f,0xf4,0x86,0xed,0x21,0x34,0x42,0x21,0xf4,0x8f,0xa7,0xcf,0x19,0xe5, -0xd3,0x4f,0x7c,0x4f,0xc7,0x9e,0x91,0x3a,0x16,0x0b,0x61,0x9e,0xfa,0x08,0x1b, -0x01,0xc0,0x19,0xeb,0xe8,0xd4,0x5a,0xe9,0xe0,0x71,0x04,0xaa,0x88,0x93,0x10, -0x3e,0xc5,0x23,0xbe,0x0b,0xab,0xa9,0x07,0x46,0x4d,0x4b,0xf2,0x95,0xeb,0x69, -0xf2,0x70,0x33,0x5c,0xf7,0xd1,0xa9,0x5b,0xd2,0x84,0x10,0xa6,0x00,0xbe,0xb5, -0xd4,0xe7,0xa3,0x54,0x63,0x3c,0xca,0xb0,0xbf,0x96,0xd1,0x6f,0x64,0xaf }; -static const BYTE chain27_1[] = { -0x30,0x82,0x01,0xb3,0x30,0x82,0x01,0x1c,0xa0,0x03,0x02,0x01,0x02,0x02,0x01, -0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43, -0x65,0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55, -0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06, -0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d, -0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5, -0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6, -0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7, -0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b, -0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b, -0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc, -0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85, -0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2, -0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72, -0xa3,0x02,0x03,0x01,0x00,0x01,0xa3,0x1d,0x30,0x1b,0x30,0x19,0x06,0x03,0x55, -0x1d,0x07,0x04,0x12,0x30,0x10,0x82,0x0e,0x66,0x6f,0x6f,0x2e,0x63,0x6f,0x6d, -0x00,0x62,0x61,0x64,0x64,0x69,0x65,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86, -0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x6f,0x06,0xc6,0xd0, -0xa1,0x8c,0xc6,0xed,0x33,0x04,0xf6,0x64,0x81,0xa1,0x0f,0x79,0x4d,0x9a,0xbd, -0xc0,0x8f,0x18,0xc2,0xb8,0x82,0xb9,0x70,0x6f,0xbe,0xaa,0xbb,0x43,0x95,0x79, -0x58,0xec,0xdf,0x94,0x8b,0x4d,0xe1,0xee,0x56,0xc4,0x57,0x7c,0xff,0xde,0x5f, -0x52,0xf9,0x3a,0x9e,0x33,0x99,0x6e,0xdf,0xf2,0xce,0x40,0xc7,0xd8,0xb5,0x86, -0xae,0xb7,0x52,0x8b,0xc5,0x62,0x17,0xce,0x03,0x06,0x29,0x5a,0xf6,0x5a,0x9a, -0x8e,0xb7,0xe3,0xb2,0xcd,0x3f,0xa7,0x61,0x2b,0xba,0xe6,0x68,0xa8,0x92,0x8a, -0xe5,0x32,0xe0,0x49,0xd4,0x42,0xc0,0x1a,0x92,0x72,0xb0,0x66,0x48,0x84,0x74, -0xd3,0x25,0xe3,0x66,0x2f,0x30,0xea,0x40,0x72,0x82,0xc4,0xc5,0x4a,0x4e,0xcc, -0x32,0xbc,0x36,0xa4 }; -/* A chain which allows foo.*.com, where the end cert is issued to foo.bar.com. - */ -static const BYTE chain28_0[] = { -0x30,0x82,0x01,0xdd,0x30,0x82,0x01,0x4a,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x72,0x7f,0x98,0xcd,0x99,0xa6,0x5f,0x89,0x4a,0x5c,0xd2,0x15,0xd0,0x68,0x25, -0xc8,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31, -0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31, -0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35, -0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05, -0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82, -0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34, -0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7, -0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91, -0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5, -0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd, -0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c, -0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35, -0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01, -0x00,0x01,0xa3,0x40,0x30,0x3e,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01, -0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01, -0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x1b,0x06,0x03,0x55,0x1d, -0x1e,0x01,0x01,0xff,0x04,0x11,0x30,0x0f,0xa0,0x0d,0x30,0x0b,0x82,0x09,0x66, -0x6f,0x6f,0x2e,0x2a,0x2e,0x63,0x6f,0x6d,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03, -0x02,0x1d,0x05,0x00,0x03,0x81,0x81,0x00,0x01,0x9a,0x8c,0x75,0x20,0x9f,0x91, -0xe9,0xde,0x28,0x3c,0x7a,0xd9,0xf1,0x2d,0xa3,0x0d,0x66,0x9f,0xd8,0x2a,0xb0, -0xb5,0x19,0x9a,0x29,0xc7,0xd5,0xe5,0xf6,0x75,0xee,0x06,0xe4,0xd2,0x71,0x77, -0x7e,0xbc,0x1a,0x5f,0xbe,0x28,0xba,0x6e,0x50,0x8e,0xe6,0xd9,0xd5,0x5a,0x21, -0xa6,0x29,0xff,0xb0,0xc7,0xfe,0x06,0xb6,0xde,0x51,0x5b,0xab,0xe4,0xbb,0xbf, -0xaa,0x03,0xa9,0xfe,0x71,0xb8,0x3f,0x65,0xe2,0x2c,0xa9,0x31,0x18,0x6d,0xe6, -0x54,0xd0,0x90,0x6b,0x7b,0x3a,0x9a,0x45,0xa9,0x1b,0x05,0x2e,0xca,0xd7,0x5f, -0x79,0x3d,0x1c,0xbf,0xdb,0xce,0x23,0x5d,0x0a,0x9b,0xb4,0x91,0xfe,0xd4,0x94, -0x92,0x76,0x36,0xae,0x03,0xb8,0x30,0x13,0x58,0x69,0x71,0xea,0xc2,0xbc,0x31, -0x83 }; -static const BYTE chain28_1[] = { -0x30,0x82,0x01,0xb0,0x30,0x82,0x01,0x19,0xa0,0x03,0x02,0x01,0x02,0x02,0x01, -0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43, -0x65,0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55, -0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06, -0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d, -0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5, -0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6, -0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7, -0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b, -0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b, -0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc, -0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85, -0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2, -0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72, -0xa3,0x02,0x03,0x01,0x00,0x01,0xa3,0x1a,0x30,0x18,0x30,0x16,0x06,0x03,0x55, -0x1d,0x07,0x04,0x0f,0x30,0x0d,0x82,0x0b,0x66,0x6f,0x6f,0x2e,0x62,0x61,0x72, -0x2e,0x63,0x6f,0x6d,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x28,0x64,0x0b,0xad,0x9f,0x12,0xd4, -0x77,0xbe,0x1d,0x20,0x3b,0x69,0x74,0xce,0x91,0x69,0xbe,0x3f,0x76,0x1d,0xe7, -0x81,0x92,0x2b,0xdc,0xbb,0xf9,0xd9,0xba,0xf0,0xba,0x58,0x4a,0x9b,0x47,0x59, -0x34,0xf7,0x19,0xb5,0x15,0x31,0x35,0x4a,0x6d,0x7b,0x91,0x3d,0xc2,0x6c,0x8f, -0x58,0x27,0x0f,0x79,0x96,0x57,0xee,0x4e,0x66,0x3e,0xfa,0x5c,0x22,0xb9,0x57, -0xbf,0x8e,0x7e,0xce,0x98,0x62,0x28,0xb1,0x39,0x0e,0x2d,0x7b,0x5d,0x23,0x70, -0xf0,0x4a,0x63,0x11,0x66,0x80,0xf9,0x99,0x53,0x80,0xda,0x87,0x87,0xf7,0x3c, -0x44,0x76,0x66,0x26,0xa7,0x05,0x3c,0x68,0x66,0x1c,0x07,0x4d,0xcf,0x54,0xaa, -0x5d,0xba,0x7a,0x8f,0x06,0xa7,0x1e,0x86,0xf1,0x5a,0x4b,0x50,0x16,0xad,0x9f, -0x89 }; -/* A chain whose end certificate is issued to *.winehq.org. */ -static const BYTE chain29_1[] = { -0x30,0x82,0x01,0xab,0x30,0x82,0x01,0x16,0xa0,0x03,0x02,0x01,0x02,0x02,0x01, -0x01,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30, -0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72, -0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30,0x30,0x30, -0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30,0x30,0x30, -0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03, -0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,0x33,0x0e,0x67,0x5f, -0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,0xdc,0xb6,0x17,0x8e, -0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,0x48,0x9f,0x6e,0xfe, -0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,0x47,0xd1,0x57,0x71, -0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,0x05,0x72,0xa7,0x87, -0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,0x6a,0x80,0x83,0x68, -0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,0x85,0xb5,0x46,0x36, -0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,0xd3,0x51,0x9a,0x22, -0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,0xa3,0x02,0x03,0x01, -0x00,0x01,0xa3,0x1b,0x30,0x19,0x30,0x17,0x06,0x03,0x55,0x1d,0x07,0x04,0x10, -0x30,0x0e,0x82,0x0c,0x2a,0x2e,0x77,0x69,0x6e,0x65,0x68,0x71,0x2e,0x6f,0x72, -0x67,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03, -0x81,0x81,0x00,0x65,0xbf,0xfa,0xf7,0xc3,0x09,0x70,0x25,0x8a,0x46,0x69,0xf6, -0xdc,0x07,0x1e,0x30,0xc9,0xe4,0x58,0x89,0x65,0x3a,0xa8,0xda,0xbd,0x17,0xf8, -0x1d,0x0d,0x7d,0x47,0xb1,0xb2,0xda,0x17,0x9f,0xf6,0x47,0xe0,0xe4,0x4a,0xeb, -0x02,0xc9,0x2e,0x69,0x1c,0x57,0x2a,0x80,0xc9,0x01,0x77,0x7b,0x27,0xff,0x2f, -0xaf,0xdf,0xf3,0x65,0x12,0xd8,0x7d,0xc2,0xbf,0x1b,0x1d,0x18,0x96,0x5c,0xf6, -0xba,0x43,0xc5,0x43,0x57,0xc0,0xdd,0x97,0x95,0xfb,0x1c,0xad,0x64,0x0f,0x61, -0x3a,0xe9,0x27,0xa4,0x57,0x27,0x34,0xa7,0x42,0xde,0x78,0x1a,0x71,0x80,0x23, -0xd6,0xd7,0x22,0xf0,0x24,0x0d,0x71,0xf1,0x2b,0xd0,0xd8,0x76,0x3d,0xef,0x4c, -0xce,0x1c,0x3b,0x83,0x1b,0x63,0x10,0x6c,0x63,0xe5,0x69 }; - -typedef struct _CONST_DATA_BLOB -{ - DWORD cbData; - const BYTE *pbData; -} CONST_DATA_BLOB; - -typedef struct _CONST_BLOB_ARRAY -{ - DWORD cBlob; - CONST_DATA_BLOB *rgBlob; -} CONST_BLOB_ARRAY; - -#define TODO_CHAIN 1 -#define TODO_ERROR 2 -#define TODO_INFO 4 -#define TODO_ELEMENTS 8 -#define TODO_CHAINS 16 -#define TODO_POLICY 32 - -/* Gets a certificate chain built from a store containing all the certs in - * certArray, where the last certificate in the chain is expected to be the - * end certificate (the one from which the chain is built.) - */ -static PCCERT_CHAIN_CONTEXT getChain(HCERTCHAINENGINE engine, - const CONST_BLOB_ARRAY *certArray, DWORD flags, BOOL includeStore, - LPSYSTEMTIME checkTime, DWORD todo, DWORD testIndex) -{ - HCERTSTORE store; - PCCERT_CHAIN_CONTEXT chain = NULL; - - store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - if (store) - { - BOOL ret; - PCCERT_CONTEXT endCert; - - if (certArray->cBlob > 1) - { - DWORD i; - - for (i = 0, ret = TRUE; ret && i < certArray->cBlob - 1; i++) - { - ret = CertAddEncodedCertificateToStore(store, - X509_ASN_ENCODING, certArray->rgBlob[i].pbData, - certArray->rgBlob[i].cbData, CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "Chain %d: adding cert %d failed: %08x\n", - testIndex, i, GetLastError()); - } - } - ret = CertAddEncodedCertificateToStore(store, - X509_ASN_ENCODING, certArray->rgBlob[certArray->cBlob - 1].pbData, - certArray->rgBlob[certArray->cBlob - 1].cbData, CERT_STORE_ADD_ALWAYS, - &endCert); - ok(ret, "Chain %d: adding end cert failed: %08x\n", - testIndex, GetLastError()); - if (ret) - { - /* FIXME: allow caller to specify usage matches? */ - CERT_CHAIN_PARA chainPara = { sizeof(chainPara), { 0 } }; - FILETIME fileTime; - - SystemTimeToFileTime(checkTime, &fileTime); - ret = pCertGetCertificateChain(engine, endCert, &fileTime, - includeStore ? store : NULL, &chainPara, flags, NULL, &chain); - if (todo & TODO_CHAIN) - todo_wine ok(ret, "Chain %d: CertGetCertificateChain failed: %08x\n", - testIndex, GetLastError()); - else - ok(ret, "Chain %d: CertGetCertificateChain failed: %08x\n", - testIndex, GetLastError()); - CertFreeCertificateContext(endCert); - } - CertCloseStore(store, 0); - } - return chain; -} - -typedef struct _SimpleChainStatusCheck -{ - DWORD cElement; - const CERT_TRUST_STATUS *rgElementStatus; -} SimpleChainStatusCheck; - -static void checkElementStatus(const CERT_TRUST_STATUS *expected, - const CERT_TRUST_STATUS *got, const CERT_TRUST_STATUS *ignore, - DWORD todo, DWORD testIndex, DWORD chainIndex, DWORD elementIndex) -{ - if (got->dwErrorStatus == expected->dwErrorStatus) - ok(got->dwErrorStatus == expected->dwErrorStatus, - "Chain %d, element [%d,%d]: expected error %08x, got %08x\n", - testIndex, chainIndex, elementIndex, expected->dwErrorStatus, - got->dwErrorStatus); - else if (todo & TODO_ERROR) - todo_wine - ok(got->dwErrorStatus == expected->dwErrorStatus || - broken((got->dwErrorStatus & ~ignore->dwErrorStatus) == - (expected->dwErrorStatus & ~ignore->dwErrorStatus)), - "Chain %d, element [%d,%d]: expected error %08x, got %08x\n", - testIndex, chainIndex, elementIndex, expected->dwErrorStatus, - got->dwErrorStatus); - else - ok(got->dwErrorStatus == expected->dwErrorStatus || - broken((got->dwErrorStatus & ~ignore->dwErrorStatus) == - (expected->dwErrorStatus & ~ignore->dwErrorStatus)), - "Chain %d, element [%d,%d]: expected error %08x, got %08x. %08x is " - "expected if no valid Verisign root certificate is available.\n", - testIndex, chainIndex, elementIndex, expected->dwErrorStatus, - got->dwErrorStatus, CERT_TRUST_IS_UNTRUSTED_ROOT); - if (got->dwInfoStatus == expected->dwInfoStatus) - ok(got->dwInfoStatus == expected->dwInfoStatus, - "Chain %d, element [%d,%d]: expected info %08x, got %08x\n", - testIndex, chainIndex, elementIndex, expected->dwInfoStatus, - got->dwInfoStatus); - else if (todo & TODO_INFO) - todo_wine - ok(got->dwInfoStatus == expected->dwInfoStatus || - broken((got->dwInfoStatus & ~ignore->dwInfoStatus) == - (expected->dwInfoStatus & ~ignore->dwInfoStatus)), - "Chain %d, element [%d,%d]: expected info %08x, got %08x\n", - testIndex, chainIndex, elementIndex, expected->dwInfoStatus, - got->dwInfoStatus); - else - ok(got->dwInfoStatus == expected->dwInfoStatus || - broken((got->dwInfoStatus & ~ignore->dwInfoStatus) == - (expected->dwInfoStatus & ~ignore->dwInfoStatus)), - "Chain %d, element [%d,%d]: expected info %08x, got %08x\n", - testIndex, chainIndex, elementIndex, expected->dwInfoStatus, - got->dwInfoStatus); -} - -static void checkSimpleChainStatus(const CERT_SIMPLE_CHAIN *simpleChain, - const SimpleChainStatusCheck *simpleChainStatus, - const CERT_TRUST_STATUS *ignore, DWORD todo, DWORD testIndex, DWORD chainIndex) -{ - if (todo & TODO_ELEMENTS) - todo_wine ok(simpleChain->cElement == simpleChainStatus->cElement, - "Chain %d: expected %d elements, got %d\n", testIndex, - simpleChainStatus->cElement, simpleChain->cElement); - else - ok(simpleChain->cElement == simpleChainStatus->cElement, - "Chain %d: expected %d elements, got %d\n", testIndex, - simpleChainStatus->cElement, simpleChain->cElement); - if (simpleChain->cElement == simpleChainStatus->cElement) - { - DWORD i; - - for (i = 0; i < simpleChain->cElement; i++) - checkElementStatus(&simpleChainStatus->rgElementStatus[i], - &simpleChain->rgpElement[i]->TrustStatus, ignore, todo, testIndex, - chainIndex, i); - } -} - -typedef struct _ChainStatusCheck -{ - CERT_TRUST_STATUS statusToIgnore; - CERT_TRUST_STATUS status; - DWORD cChain; - const SimpleChainStatusCheck *rgChainStatus; -} ChainStatusCheck; - -static void checkChainStatus(PCCERT_CHAIN_CONTEXT chain, - const ChainStatusCheck *chainStatus, DWORD todo, DWORD testIndex) -{ - ok(chain->cChain == chainStatus->cChain, - "Chain %d: expected %d simple chains, got %d\n", testIndex, - chainStatus->cChain, chain->cChain); - if (todo & TODO_ERROR && - chain->TrustStatus.dwErrorStatus != chainStatus->status.dwErrorStatus) - todo_wine ok(chain->TrustStatus.dwErrorStatus == - chainStatus->status.dwErrorStatus || - broken((chain->TrustStatus.dwErrorStatus & - ~chainStatus->statusToIgnore.dwErrorStatus) == - (chainStatus->status.dwErrorStatus & - ~chainStatus->statusToIgnore.dwErrorStatus)), - "Chain %d: expected error %08x, got %08x\n", - testIndex, chainStatus->status.dwErrorStatus, - chain->TrustStatus.dwErrorStatus); - else - ok(chain->TrustStatus.dwErrorStatus == - chainStatus->status.dwErrorStatus || - broken((chain->TrustStatus.dwErrorStatus & - ~chainStatus->statusToIgnore.dwErrorStatus) == - (chainStatus->status.dwErrorStatus & - ~chainStatus->statusToIgnore.dwErrorStatus)), - "Chain %d: expected error %08x, got %08x. %08x is expected if no valid " - "Verisign root certificate is available.\n", - testIndex, chainStatus->status.dwErrorStatus, - chain->TrustStatus.dwErrorStatus, CERT_TRUST_IS_UNTRUSTED_ROOT); - if (todo & TODO_INFO && - chain->TrustStatus.dwInfoStatus != chainStatus->status.dwInfoStatus) - todo_wine ok(chain->TrustStatus.dwInfoStatus == - chainStatus->status.dwInfoStatus || - broken((chain->TrustStatus.dwInfoStatus & - ~chainStatus->statusToIgnore.dwInfoStatus) == - (chainStatus->status.dwInfoStatus & - ~chainStatus->statusToIgnore.dwInfoStatus)), - "Chain %d: expected info %08x, got %08x\n", - testIndex, chainStatus->status.dwInfoStatus, - chain->TrustStatus.dwInfoStatus); - else - ok(chain->TrustStatus.dwInfoStatus == - chainStatus->status.dwInfoStatus || - broken((chain->TrustStatus.dwInfoStatus & - ~chainStatus->statusToIgnore.dwInfoStatus) == - (chainStatus->status.dwInfoStatus & - ~chainStatus->statusToIgnore.dwInfoStatus)), - "Chain %d: expected info %08x, got %08x\n", - testIndex, chainStatus->status.dwInfoStatus, - chain->TrustStatus.dwInfoStatus); - if (chain->cChain == chainStatus->cChain) - { - DWORD i; - - for (i = 0; i < chain->cChain; i++) - checkSimpleChainStatus(chain->rgpChain[i], - &chainStatus->rgChainStatus[i], &chainStatus->statusToIgnore, - todo, testIndex, i); - } -} - -typedef struct _ChainCheck -{ - CONST_BLOB_ARRAY certs; - ChainStatusCheck status; - DWORD todo; -} ChainCheck; - -static CONST_DATA_BLOB chain0[] = { - { sizeof(chain0_0), chain0_0 }, - { sizeof(chain0_1), chain0_1 }, -}; -static const CERT_TRUST_STATUS elementStatus0[] = { - { CERT_TRUST_IS_NOT_TIME_VALID, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT, - CERT_TRUST_HAS_NAME_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED }, -}; -static const SimpleChainStatusCheck simpleStatus0[] = { - { sizeof(elementStatus0) / sizeof(elementStatus0[0]), elementStatus0 }, -}; -static CONST_DATA_BLOB chain1[] = { - { sizeof(chain0_0), chain0_0 }, - { sizeof(chain1_1), chain1_1 }, -}; -static const CERT_TRUST_STATUS elementStatus1[] = { - { CERT_TRUST_IS_NOT_TIME_VALID | CERT_TRUST_IS_NOT_SIGNATURE_VALID, - CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT, - CERT_TRUST_HAS_NAME_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED }, -}; -static const SimpleChainStatusCheck simpleStatus1[] = { - { sizeof(elementStatus1) / sizeof(elementStatus1[0]), elementStatus1 }, -}; -static CONST_DATA_BLOB chain2[] = { - { sizeof(chain2_0), chain2_0 }, - { sizeof(chain0_1), chain0_1 }, -}; -static const CERT_TRUST_STATUS elementStatus2[] = { - { CERT_TRUST_IS_NOT_TIME_VALID, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_NOT_TIME_VALID | CERT_TRUST_IS_UNTRUSTED_ROOT, - CERT_TRUST_HAS_NAME_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED }, -}; -static const SimpleChainStatusCheck simpleStatus2[] = { - { sizeof(elementStatus2) / sizeof(elementStatus2[0]), elementStatus2 }, -}; -static CONST_DATA_BLOB chain3[] = { - { sizeof(chain3_0), chain3_0 }, - { sizeof(chain0_1), chain0_1 }, -}; -static const CERT_TRUST_STATUS elementStatus3[] = { - { CERT_TRUST_IS_NOT_TIME_VALID, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_INVALID_BASIC_CONSTRAINTS | CERT_TRUST_IS_UNTRUSTED_ROOT, - CERT_TRUST_HAS_NAME_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED }, -}; -static const SimpleChainStatusCheck simpleStatus3[] = { - { sizeof(elementStatus3) / sizeof(elementStatus3[0]), elementStatus3 }, -}; -static CONST_DATA_BLOB chain4[] = { - { sizeof(chain4_0), chain4_0 }, - { sizeof(chain4_1), chain4_1 }, - { sizeof(chain4_2), chain4_2 }, -}; -static const CERT_TRUST_STATUS elementStatus4[] = { - { CERT_TRUST_IS_NOT_TIME_VALID, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_INVALID_BASIC_CONSTRAINTS, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_INVALID_BASIC_CONSTRAINTS | CERT_TRUST_IS_UNTRUSTED_ROOT, - CERT_TRUST_HAS_NAME_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED }, -}; -static const SimpleChainStatusCheck simpleStatus4[] = { - { sizeof(elementStatus4) / sizeof(elementStatus4[0]), elementStatus4 }, -}; -static CONST_DATA_BLOB chain5[] = { - { sizeof(chain5_0), chain5_0 }, - { sizeof(chain5_1), chain5_1 }, -}; -static const CERT_TRUST_STATUS elementStatus5[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT | - CERT_TRUST_IS_UNTRUSTED_ROOT, - CERT_TRUST_HAS_NAME_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED }, -}; -static const SimpleChainStatusCheck simpleStatus5[] = { - { sizeof(elementStatus5) / sizeof(elementStatus5[0]), elementStatus5 }, -}; -static CONST_DATA_BLOB chain6[] = { - { sizeof(chain0_0), chain0_0 }, - { sizeof(chain4_1), chain4_1 }, -}; -static const CERT_TRUST_STATUS elementStatus6[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT, - CERT_TRUST_HAS_NAME_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED }, -}; -static const SimpleChainStatusCheck simpleStatus6[] = { - { sizeof(elementStatus6) / sizeof(elementStatus6[0]), elementStatus6 }, -}; -static CONST_DATA_BLOB chain7[] = { - { sizeof(chain0_0), chain0_0 }, - { sizeof(chain7_1), chain7_1 }, -}; -static const CERT_TRUST_STATUS elementStatus7[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT, - CERT_TRUST_HAS_NAME_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED }, -}; -static const SimpleChainStatusCheck simpleStatus7[] = { - { sizeof(elementStatus7) / sizeof(elementStatus7[0]), elementStatus7 }, -}; -static CONST_DATA_BLOB chain8[] = { - { sizeof(chain8_0), chain8_0 }, - { sizeof(chain8_1), chain8_1 }, - { sizeof(chain8_2), chain8_2 }, -}; -static const CERT_TRUST_STATUS elementStatus8[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_INVALID_BASIC_CONSTRAINTS, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_IS_NOT_TIME_VALID, - CERT_TRUST_HAS_NAME_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED }, -}; -static const SimpleChainStatusCheck simpleStatus8[] = { - { sizeof(elementStatus8) / sizeof(elementStatus8[0]), elementStatus8 }, -}; -static CONST_DATA_BLOB chain9[] = { - { sizeof(chain9_0), chain9_0 }, - { sizeof(chain7_1), chain7_1 }, -}; -static const CERT_TRUST_STATUS elementStatus9[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_INVALID_BASIC_CONSTRAINTS, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_INVALID_BASIC_CONSTRAINTS | CERT_TRUST_IS_CYCLIC, - CERT_TRUST_HAS_NAME_MATCH_ISSUER }, -}; -static const SimpleChainStatusCheck simpleStatus9[] = { - { sizeof(elementStatus9) / sizeof(elementStatus9[0]), elementStatus9 }, -}; -static CONST_DATA_BLOB chain10[] = { - { sizeof(chain0_0), chain0_0 }, - { sizeof(chain10_1), chain10_1 }, - { sizeof(chain7_1), chain7_1 }, -}; -static const CERT_TRUST_STATUS elementStatus10[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT, - CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER }, -}; -static const SimpleChainStatusCheck simpleStatus10[] = { - { sizeof(elementStatus10) / sizeof(elementStatus10[0]), elementStatus10 }, -}; -static CONST_DATA_BLOB chain11[] = { - { sizeof(chain0_0), chain0_0 }, - { sizeof(chain11_1), chain11_1 }, - { sizeof(chain7_1), chain7_1 }, -}; -static CONST_DATA_BLOB chain12[] = { - { sizeof(chain12_0), chain12_0 }, - { sizeof(chain7_1), chain7_1 }, -}; -static const CERT_TRUST_STATUS elementStatus12[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_NOT_SIGNATURE_VALID | CERT_TRUST_IS_UNTRUSTED_ROOT, - CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER }, -}; -static const SimpleChainStatusCheck simpleStatus12[] = { - { sizeof(elementStatus12) / sizeof(elementStatus12[0]), elementStatus12 }, -}; -static CONST_DATA_BLOB chain13[] = { - { sizeof(chain0_0), chain0_0 }, - { sizeof(chain13_1), chain13_1 }, -}; -static const CERT_TRUST_STATUS elementStatus13[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT, - CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER }, -}; -static const SimpleChainStatusCheck simpleStatus13[] = { - { sizeof(elementStatus13) / sizeof(elementStatus13[0]), elementStatus13 }, -}; -static CONST_DATA_BLOB chain14[] = { - { sizeof(chain14_0), chain14_0 }, - { sizeof(chain14_1), chain14_1 }, -}; -static const CERT_TRUST_STATUS elementStatus14[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT, - CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER }, -}; -static const SimpleChainStatusCheck simpleStatus14[] = { - { sizeof(elementStatus14) / sizeof(elementStatus14[0]), elementStatus14 }, -}; -static CONST_DATA_BLOB chain15[] = { - { sizeof(chain15_0), chain15_0 }, - { sizeof(chain14_1), chain14_1 }, -}; -static const CERT_TRUST_STATUS elementStatus15[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_IS_NOT_VALID_FOR_USAGE, - CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER }, -}; -static const SimpleChainStatusCheck simpleStatus15[] = { - { sizeof(elementStatus15) / sizeof(elementStatus15[0]), elementStatus15 }, -}; -static CONST_DATA_BLOB chain16[] = { - { sizeof(chain0_0), chain0_0 }, - { sizeof(chain16_1), chain16_1 }, -}; -static const CERT_TRUST_STATUS elementStatus16[] = { - { CERT_TRUST_NO_ERROR | CERT_TRUST_IS_NOT_VALID_FOR_USAGE, - CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT, - CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER }, -}; -static const SimpleChainStatusCheck simpleStatus16[] = { - { sizeof(elementStatus16) / sizeof(elementStatus16[0]), elementStatus16 }, -}; -static CONST_DATA_BLOB chain17[] = { - { sizeof(chain0_0), chain0_0 }, - { sizeof(chain17_1), chain17_1 }, - { sizeof(chain17_2), chain17_2 }, -}; -static const CERT_TRUST_STATUS elementStatus17[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT, - CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER }, -}; -static const SimpleChainStatusCheck simpleStatus17[] = { - { sizeof(elementStatus17) / sizeof(elementStatus17[0]), elementStatus17 }, -}; -static CONST_DATA_BLOB chain18[] = { - { sizeof(chain0_0), chain0_0 }, - { sizeof(chain18_1), chain18_1 }, - { sizeof(chain18_2), chain18_2 }, -}; -static const CERT_TRUST_STATUS elementStatus18[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_NOT_VALID_FOR_USAGE, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT, - CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER }, -}; -static const SimpleChainStatusCheck simpleStatus18[] = { - { sizeof(elementStatus18) / sizeof(elementStatus18[0]), elementStatus18 }, -}; -static CONST_DATA_BLOB chain19[] = { - { sizeof(chain19_0), chain19_0 }, - { sizeof(chain19_1), chain19_1 }, -}; -static const CERT_TRUST_STATUS elementStatus19[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT, - CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER | - CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS }, -}; -static const SimpleChainStatusCheck simpleStatus19[] = { - { sizeof(elementStatus19) / sizeof(elementStatus19[0]), elementStatus19 }, -}; -static CONST_DATA_BLOB chain20[] = { - { sizeof(chain20_0), chain20_0 }, - { sizeof(chain20_1), chain20_1 }, -}; -static const CERT_TRUST_STATUS elementStatus20[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, - CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER }, -}; -static const SimpleChainStatusCheck simpleStatus20[] = { - { sizeof(elementStatus20) / sizeof(elementStatus20[0]), elementStatus20 }, -}; -static CONST_DATA_BLOB chain21[] = { - { sizeof(chain21_0), chain21_0 }, - { sizeof(chain21_1), chain21_1 }, -}; -static const CERT_TRUST_STATUS elementStatus21[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT, - CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER | - CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS }, -}; -static const SimpleChainStatusCheck simpleStatus21[] = { - { sizeof(elementStatus21) / sizeof(elementStatus21[0]), elementStatus21 }, -}; -static CONST_DATA_BLOB chain22[] = { - { sizeof(chain22_0), chain22_0 }, - { sizeof(chain22_1), chain22_1 }, -}; -static const CERT_TRUST_STATUS elementStatus22[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, - CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER }, -}; -static const SimpleChainStatusCheck simpleStatus22[] = { - { sizeof(elementStatus22) / sizeof(elementStatus22[0]), elementStatus22 }, -}; -static CONST_DATA_BLOB chain23[] = { - { sizeof(chain23_0), chain23_0 }, - { sizeof(chain23_1), chain23_1 }, -}; -static const CERT_TRUST_STATUS elementStatus23[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, - CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER }, -}; -static const SimpleChainStatusCheck simpleStatus23[] = { - { sizeof(elementStatus23) / sizeof(elementStatus23[0]), elementStatus23 }, -}; -static CONST_DATA_BLOB chain24[] = { - { sizeof(chain24_0), chain24_0 }, - { sizeof(chain24_1), chain24_1 }, -}; -static const CERT_TRUST_STATUS elementStatus24[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, - CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER }, -}; -static const SimpleChainStatusCheck simpleStatus24[] = { - { sizeof(elementStatus24) / sizeof(elementStatus24[0]), elementStatus24 }, -}; -static CONST_DATA_BLOB chain25[] = { - { sizeof(chain25_0), chain25_0 }, - { sizeof(chain25_1), chain25_1 }, -}; -static const CERT_TRUST_STATUS elementStatus25[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, - CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER }, -}; -static const SimpleChainStatusCheck simpleStatus25[] = { - { sizeof(elementStatus25) / sizeof(elementStatus25[0]), elementStatus25 }, -}; -static CONST_DATA_BLOB chain26[] = { - { sizeof(chain26_0), chain26_0 }, - { sizeof(chain26_1), chain26_1 }, -}; -static const CERT_TRUST_STATUS elementStatus26[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, - CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER }, -}; -static const SimpleChainStatusCheck simpleStatus26[] = { - { sizeof(elementStatus26) / sizeof(elementStatus26[0]), elementStatus26 }, -}; -static CONST_DATA_BLOB chain27[] = { - { sizeof(chain27_0), chain27_0 }, - { sizeof(chain27_1), chain27_1 }, -}; -static const CERT_TRUST_STATUS elementStatus27[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_INVALID_NAME_CONSTRAINTS | - CERT_TRUST_INVALID_EXTENSION, - CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER }, -}; -static const SimpleChainStatusCheck simpleStatus27[] = { - { sizeof(elementStatus27) / sizeof(elementStatus27[0]), elementStatus27 }, -}; -static const CERT_TRUST_STATUS elementStatus27Broken[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT, - CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER | - CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS }, -}; -static const SimpleChainStatusCheck simpleStatus27Broken[] = { - { sizeof(elementStatus27Broken) / sizeof(elementStatus27Broken[0]), - elementStatus27Broken }, -}; -static CONST_DATA_BLOB chain28[] = { - { sizeof(chain28_0), chain28_0 }, - { sizeof(chain28_1), chain28_1 }, -}; -static const CERT_TRUST_STATUS elementStatus28[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, - CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER }, -}; -static const SimpleChainStatusCheck simpleStatus28[] = { - { sizeof(elementStatus28) / sizeof(elementStatus28[0]), elementStatus28 }, -}; -static CONST_DATA_BLOB chain29[] = { - { sizeof(chain0_0), chain0_0 }, - { sizeof(chain29_1), chain29_1 }, -}; -static const CERT_TRUST_STATUS elementStatus29[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, - CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER }, -}; -static const SimpleChainStatusCheck simpleStatus29[] = { - { sizeof(elementStatus29) / sizeof(elementStatus29[0]), elementStatus29 }, -}; -static CONST_DATA_BLOB selfSignedChain[] = { - { sizeof(selfSignedCert), selfSignedCert } -}; -static const CERT_TRUST_STATUS selfSignedElementStatus[] = { - { CERT_TRUST_IS_NOT_TIME_VALID | CERT_TRUST_IS_UNTRUSTED_ROOT, - CERT_TRUST_HAS_NAME_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED }, -}; -static const SimpleChainStatusCheck selfSignedSimpleStatus[] = { - { sizeof(selfSignedElementStatus) / sizeof(selfSignedElementStatus[0]), - selfSignedElementStatus }, -}; -static CONST_DATA_BLOB iTunesChain[] = { - { sizeof(verisignCA), verisignCA }, - { sizeof(iTunesCert0), iTunesCert0 }, - { sizeof(iTunesCert1), iTunesCert1 }, -}; -static const CERT_TRUST_STATUS iTunesElementStatus[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_KEY_MATCH_ISSUER }, - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_EXACT_MATCH_ISSUER }, - { CERT_TRUST_NO_ERROR, - CERT_TRUST_HAS_NAME_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED}, -}; -static const SimpleChainStatusCheck iTunesSimpleStatus[] = { - { sizeof(iTunesElementStatus) / sizeof(iTunesElementStatus[0]), - iTunesElementStatus }, -}; -static CONST_DATA_BLOB googleChain[] = { - { sizeof(verisignCA), verisignCA }, - { sizeof(thawte_sgc_ca), thawte_sgc_ca }, - { sizeof(google), google }, -}; -/* The Google cert is only valid from 3/27/2009 to 3/27/2010, so with the date - * tested (October 2007) it's not time valid. - */ -static const CERT_TRUST_STATUS googleElementStatus[] = { - { CERT_TRUST_IS_NOT_TIME_VALID, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, - { CERT_TRUST_NO_ERROR, - CERT_TRUST_HAS_NAME_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED}, -}; -static const SimpleChainStatusCheck googleSimpleStatus[] = { - { sizeof(googleElementStatus) / sizeof(googleElementStatus[0]), - googleElementStatus }, -}; -/* The openssl cert is only valid from 9/12/2008 to 9/13/2012, so with the date - * tested (October 2007) it's not time valid. - */ -static CONST_DATA_BLOB opensslChain[] = { - { sizeof(global_sign_root), global_sign_root }, - { sizeof(global_sign_ca), global_sign_ca }, - { sizeof(openssl_org), openssl_org }, -}; -static const CERT_TRUST_STATUS opensslElementStatus[] = { - { CERT_TRUST_IS_NOT_TIME_VALID, CERT_TRUST_HAS_KEY_MATCH_ISSUER }, - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_KEY_MATCH_ISSUER }, - { CERT_TRUST_NO_ERROR, - CERT_TRUST_HAS_NAME_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED}, -}; -static const SimpleChainStatusCheck opensslSimpleStatus[] = { - { sizeof(opensslElementStatus) / sizeof(opensslElementStatus[0]), - opensslElementStatus }, -}; -/* entrust_ca -> aaa_certificate_services -> cs_stanford_edu */ -/* cs.stanford.edu's cert is only valid from 7/16/2009 to 7/16/2012, so with - * the date tested (October 2007) it's not time valid. - */ -static CONST_DATA_BLOB stanfordChain[] = { - { sizeof(entrust_ca), entrust_ca }, - { sizeof(aaa_certificate_services), aaa_certificate_services }, - { sizeof(cs_stanford_edu), cs_stanford_edu }, -}; -static const CERT_TRUST_STATUS stanfordElementStatus[] = { - { CERT_TRUST_IS_NOT_TIME_VALID, CERT_TRUST_HAS_KEY_MATCH_ISSUER }, - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_KEY_MATCH_ISSUER }, - { CERT_TRUST_NO_ERROR, - CERT_TRUST_HAS_KEY_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED}, -}; -static const SimpleChainStatusCheck stanfordSimpleStatus[] = { - { sizeof(stanfordElementStatus) / sizeof(stanfordElementStatus[0]), - stanfordElementStatus }, -}; -static ChainCheck chainCheck[] = { - /* Windows XP erroneously sets CERT_TRUST_HAS_PREFERRED_ISSUER on all - * elements, so ignore it. - * Windows 98/NT4 also set CERT_TRUST_IS_NOT_TIME_NESTED on chains they - * shouldn't, so ignore those too. - */ - { { sizeof(chain0) / sizeof(chain0[0]), chain0 }, - { { CERT_TRUST_IS_NOT_TIME_NESTED, CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_IS_NOT_TIME_VALID, 0 }, - 1, simpleStatus0 }, 0 }, - { { sizeof(chain1) / sizeof(chain1[0]), chain1 }, - { { CERT_TRUST_IS_NOT_TIME_NESTED, CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_IS_NOT_SIGNATURE_VALID | - CERT_TRUST_IS_NOT_TIME_VALID, 0 }, - 1, simpleStatus1 }, 0 }, - { { sizeof(chain2) / sizeof(chain2[0]), chain2 }, - { { CERT_TRUST_IS_NOT_TIME_NESTED, CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_IS_NOT_TIME_VALID, 0 }, - 1, simpleStatus2 }, 0 }, - /* Earlier versions of Windows incorrectly don't set - * CERT_TRUST_INVALID_BASIC_CONSTRAINTS on this chain. - */ - { { sizeof(chain3) / sizeof(chain3[0]), chain3 }, - { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_INVALID_BASIC_CONSTRAINTS, - CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_INVALID_BASIC_CONSTRAINTS | CERT_TRUST_IS_UNTRUSTED_ROOT | - CERT_TRUST_IS_NOT_TIME_VALID, 0 }, - 1, simpleStatus3 }, 0 }, - /* Earlier versions of Windows incorrectly don't set - * CERT_TRUST_INVALID_BASIC_CONSTRAINTS on this chain. - */ - { { sizeof(chain4) / sizeof(chain4[0]), chain4 }, - { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_INVALID_BASIC_CONSTRAINTS, - CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_INVALID_BASIC_CONSTRAINTS | CERT_TRUST_IS_UNTRUSTED_ROOT | - CERT_TRUST_IS_NOT_TIME_VALID, 0 }, - 1, simpleStatus4 }, 0 }, - /* Windows versions prior to Vista/2008 incorrectly set - * CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT on this chain, so ignore it. - * Similarly, some older versions of Windows incorrectly set - * CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, ignore that too. - */ - { { sizeof(chain5) / sizeof(chain5[0]), chain5 }, - { { CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT | - CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, - CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT | - CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus5 }, 0 }, - { { sizeof(chain6) / sizeof(chain6[0]), chain6 }, - { { 0, CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus6 }, 0 }, - { { sizeof(chain7) / sizeof(chain7[0]), chain7 }, - { { 0, CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus7 }, 0 }, - /* Earlier versions of Windows incorrectly don't set - * CERT_TRUST_INVALID_BASIC_CONSTRAINTS on this chain. - */ - { { sizeof(chain8) / sizeof(chain8[0]), chain8 }, - { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_INVALID_BASIC_CONSTRAINTS, - CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_INVALID_BASIC_CONSTRAINTS | CERT_TRUST_IS_UNTRUSTED_ROOT | - CERT_TRUST_IS_NOT_TIME_VALID, 0 }, - 1, simpleStatus8 }, 0 }, - /* Earlier versions of Windows incorrectly don't set - * CERT_TRUST_INVALID_BASIC_CONSTRAINTS on this chain. - */ - { { sizeof(chain9) / sizeof(chain9[0]), chain9 }, - { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_INVALID_BASIC_CONSTRAINTS, - CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_PARTIAL_CHAIN | - CERT_TRUST_INVALID_BASIC_CONSTRAINTS | CERT_TRUST_IS_CYCLIC, 0 }, - 1, simpleStatus9 }, 0 }, - { { sizeof(chain10) / sizeof(chain10[0]), chain10 }, - { { 0, CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus10 }, 0 }, - { { sizeof(chain11) / sizeof(chain11[0]), chain11 }, - { { 0, CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus10 }, 0 }, - { { sizeof(chain12) / sizeof(chain12[0]), chain12 }, - { { 0, CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_IS_NOT_SIGNATURE_VALID, 0 }, - 1, simpleStatus12 }, 0 }, - { { sizeof(chain13) / sizeof(chain13[0]), chain13 }, - { { CERT_TRUST_IS_NOT_TIME_NESTED, CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus13 }, - 0 }, - { { sizeof(chain14) / sizeof(chain14[0]), chain14 }, - { { CERT_TRUST_IS_NOT_TIME_NESTED, CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus14 }, - 0 }, - /* Earlier versions of crypt32 incorrectly do not complain that the end cert's - * key usage is invalid, so ignore that error. - */ - { { sizeof(chain15) / sizeof(chain15[0]), chain15 }, - { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE, - CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_IS_NOT_VALID_FOR_USAGE, 0 }, - 1, simpleStatus15 }, - 0 }, - { { sizeof(chain16) / sizeof(chain16[0]), chain16 }, - { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE, - CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_IS_NOT_VALID_FOR_USAGE, 0 }, - 1, simpleStatus16 }, - 0 }, - { { sizeof(chain17) / sizeof(chain17[0]), chain17 }, - { { CERT_TRUST_IS_NOT_TIME_NESTED, CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus17 }, - 0 }, - { { sizeof(chain18) / sizeof(chain18[0]), chain18 }, - { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE, - CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_IS_NOT_VALID_FOR_USAGE, 0 }, - 1, simpleStatus18 }, - 0 }, - /* Older versions of crypt32 set CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT - * even though the constraint and alt name match. - * They also do not set CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS, since they - * incorrectly find a name constraint error. - */ - { { sizeof(chain19) / sizeof(chain19[0]), chain19 }, - { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE | - CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT, - CERT_TRUST_HAS_PREFERRED_ISSUER | CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS - }, - { CERT_TRUST_IS_UNTRUSTED_ROOT, CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS }, - 1, simpleStatus19 }, - 0 }, - /* Older versions of crypt32 do not set - * CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, though they should. So - * ignore it (on Windows) but require it (on Wine.) - */ - { { sizeof(chain20) / sizeof(chain20[0]), chain20 }, - { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE | - CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT | - CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, - CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | - CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, 0 }, - 1, simpleStatus20 }, - 0 }, - { { sizeof(chain21) / sizeof(chain21[0]), chain21 }, - { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE | - CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT, - CERT_TRUST_HAS_PREFERRED_ISSUER | CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS - }, - { CERT_TRUST_IS_UNTRUSTED_ROOT, CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS }, - 1, simpleStatus21 }, - 0 }, - { { sizeof(chain22) / sizeof(chain22[0]), chain22 }, - { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE | - CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT | - CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, - CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | - CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, 0 }, - 1, simpleStatus22 }, - 0 }, - { { sizeof(chain23) / sizeof(chain23[0]), chain23 }, - { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE | - CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT | - CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, - CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | - CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, 0 }, - 1, simpleStatus23 }, - 0 }, - { { sizeof(chain24) / sizeof(chain24[0]), chain24 }, - { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE | - CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT | - CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, - CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | - CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, 0 }, - 1, simpleStatus24 }, - 0 }, - { { sizeof(chain25) / sizeof(chain25[0]), chain25 }, - { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE | - CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT | - CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, - CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | - CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, 0 }, - 1, simpleStatus25 }, - 0 }, - { { sizeof(chain26) / sizeof(chain26[0]), chain26 }, - { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE | - CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT | - CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, - CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | - CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, 0 }, - 1, simpleStatus26 }, - 0 }, - /* chain27 is handled separately elsewhere */ - { { sizeof(chain28) / sizeof(chain28[0]), chain28 }, - { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE | - CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT | - CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, - CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | - CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, 0 }, - 1, simpleStatus28 }, - 0 }, - /* chain29 is handled separately elsewhere */ - { { sizeof(selfSignedChain) / sizeof(selfSignedChain[0]), selfSignedChain }, - { { 0, CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_NOT_TIME_VALID | CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, - 1, selfSignedSimpleStatus }, 0 }, - /* The iTunes chain may or may not have its root trusted, so ignore the - * error - */ - { { sizeof(iTunesChain) / sizeof(iTunesChain[0]), iTunesChain }, - { { CERT_TRUST_IS_UNTRUSTED_ROOT, CERT_TRUST_HAS_PREFERRED_ISSUER }, - { 0, 0 }, - 1, iTunesSimpleStatus }, 0 }, - /* The google chain may or may not have its root trusted, so ignore the error - */ - { { sizeof(googleChain) / sizeof(googleChain[0]), googleChain }, - { { CERT_TRUST_IS_UNTRUSTED_ROOT, CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_NOT_TIME_VALID, 0 }, - 1, googleSimpleStatus }, 0 }, - /* The openssl chain may or may not have its root trusted, so ignore the error - */ - { { sizeof(opensslChain) / sizeof(opensslChain[0]), opensslChain }, - { { CERT_TRUST_IS_UNTRUSTED_ROOT, CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_NOT_TIME_VALID, 0 }, - 1, opensslSimpleStatus }, 0 }, - /* The stanford chain may or may not have its root trusted, so ignore the error - */ - { { sizeof(stanfordChain) / sizeof(stanfordChain[0]), stanfordChain }, - { { CERT_TRUST_IS_UNTRUSTED_ROOT, CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_NOT_TIME_VALID, 0 }, - 1, stanfordSimpleStatus }, TODO_INFO }, -}; - -static const CERT_TRUST_STATUS elementStatus8NoStore[] = { - { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER }, -}; -static const SimpleChainStatusCheck simpleStatus8NoStore[] = { - { sizeof(elementStatus8NoStore) / sizeof(elementStatus8NoStore[0]), - elementStatus8NoStore }, -}; -static ChainCheck chainCheckNoStore[] = { - { { sizeof(selfSignedChain) / sizeof(selfSignedChain[0]), selfSignedChain }, - { { 0, CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_NOT_TIME_VALID | CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, - 1, selfSignedSimpleStatus }, - 0 }, - { { sizeof(chain8) / sizeof(chain8[0]), chain8 }, - { { 0, CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_PARTIAL_CHAIN, 0 }, - 1, simpleStatus8NoStore }, - 0 }, -}; - -/* Chain27 checks a certificate with a subject alternate name containing an - * embedded NULL. Newer crypt32 versions fail to decode such alternate names, - * correctly prohibiting them. Older crypt32 versions do not. Rather than - * ignoring the expected error bits, check each version separately depending - * on the chain's error status. - */ -static ChainCheck chainCheckEmbeddedNull = { - { sizeof(chain27) / sizeof(chain27[0]), chain27 }, - { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE, - CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_INVALID_NAME_CONSTRAINTS | - CERT_TRUST_INVALID_EXTENSION, 0 }, - 1, simpleStatus27 }, - 0 }; -static ChainCheck chainCheckEmbeddedNullBroken = { - { sizeof(chain27) / sizeof(chain27[0]), chain27 }, - { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE | - CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT, - CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS | CERT_TRUST_HAS_PREFERRED_ISSUER }, - { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT, - CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS }, - 1, simpleStatus27Broken }, - 0 }; - -/* Wednesday, Oct 1, 2007 */ -static SYSTEMTIME oct2007 = { 2007, 10, 1, 1, 0, 0, 0, 0 }; -/* Wednesday, Oct 28, 2009 */ -static SYSTEMTIME oct2009 = { 2009, 10, 3, 28, 0, 0, 0, 0 }; - -static void testGetCertChain(void) -{ - BOOL ret; - PCCERT_CONTEXT cert; - CERT_CHAIN_PARA para = { 0 }; - PCCERT_CHAIN_CONTEXT chain; - FILETIME fileTime; - DWORD i; - HCERTSTORE store; - static char one_two_three[] = "1.2.3"; - static char oid_server_auth[] = szOID_PKIX_KP_SERVER_AUTH; - LPSTR oids[2]; - - /* Basic parameter checks */ - if (0) - { - /* Crash on Vista */ - ret = pCertGetCertificateChain(NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - } - ret = pCertGetCertificateChain(NULL, NULL, NULL, NULL, NULL, 0, NULL, - &chain); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* Crash - ret = pCertGetCertificateChain(NULL, NULL, NULL, NULL, ¶, 0, NULL, NULL); - ret = pCertGetCertificateChain(NULL, NULL, NULL, NULL, ¶, 0, NULL, - &chain); - */ - cert = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, - sizeof(bigCert)); - if (0) - { - /* Crash on Vista */ - ret = pCertGetCertificateChain(NULL, cert, NULL, NULL, NULL, 0, NULL, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - } - /* Crash - ret = pCertGetCertificateChain(NULL, cert, NULL, NULL, ¶, 0, NULL, NULL); - */ - - /* Tests with an invalid cert (one whose signature is bad) */ - SetLastError(0xdeadbeef); - ret = pCertGetCertificateChain(NULL, cert, NULL, NULL, ¶, 0, NULL, - &chain); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_DATA || - GetLastError() == CRYPT_E_ASN1_BADTAG /* Vista */, - "Expected ERROR_INVALID_DATA or CRYPT_E_ASN1_BADTAG, got %d\n", GetLastError()); - para.cbSize = sizeof(para); - SetLastError(0xdeadbeef); - ret = pCertGetCertificateChain(NULL, cert, NULL, NULL, ¶, 0, NULL, - &chain); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_DATA || - GetLastError() == CRYPT_E_ASN1_BADTAG /* Vista */, - "Expected ERROR_INVALID_DATA or CRYPT_E_ASN1_BADTAG, got %d\n", GetLastError()); - - para.cbSize = 0; - SetLastError(0xdeadbeef); - ret = pCertGetCertificateChain(NULL, cert, NULL, NULL, ¶, 0, NULL, - &chain); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_DATA || - GetLastError() == CRYPT_E_ASN1_BADTAG, /* Vista and higher */ - "Expected ERROR_INVALID_DATA or CRYPT_E_ASN1_BADTAG, got %d\n", GetLastError()); - - CertFreeCertificateContext(cert); - - /* Test usage match with Google's cert */ - store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - verisignCA, sizeof(verisignCA), CERT_STORE_ADD_ALWAYS, NULL); - CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - thawte_sgc_ca, sizeof(thawte_sgc_ca), CERT_STORE_ADD_ALWAYS, NULL); - cert = CertCreateCertificateContext(X509_ASN_ENCODING, - google, sizeof(google)); - SystemTimeToFileTime(&oct2009, &fileTime); - memset(¶, 0, sizeof(para)); - para.cbSize = sizeof(para); - oids[0] = one_two_three; - para.RequestedUsage.dwType = USAGE_MATCH_TYPE_AND; - para.RequestedUsage.Usage.rgpszUsageIdentifier = oids; - para.RequestedUsage.Usage.cUsageIdentifier = 1; - ret = pCertGetCertificateChain(NULL, cert, &fileTime, store, ¶, - 0, NULL, &chain); - ok(ret, "CertGetCertificateChain failed: %08x\n", GetLastError()); - if (ret) - { - ok(chain->TrustStatus.dwErrorStatus & CERT_TRUST_IS_NOT_VALID_FOR_USAGE, - "expected CERT_TRUST_IS_NOT_VALID_FOR_USAGE\n"); - CertFreeCertificateChain(chain); - } - oids[0] = oid_server_auth; - ret = pCertGetCertificateChain(NULL, cert, &fileTime, store, ¶, - 0, NULL, &chain); - ok(ret, "CertGetCertificateChain failed: %08x\n", GetLastError()); - if (ret) - { - ok(!(chain->TrustStatus.dwErrorStatus & - CERT_TRUST_IS_NOT_VALID_FOR_USAGE), - "didn't expect CERT_TRUST_IS_NOT_VALID_FOR_USAGE\n"); - CertFreeCertificateChain(chain); - } - oids[1] = one_two_three; - para.RequestedUsage.Usage.cUsageIdentifier = 2; - para.RequestedUsage.dwType = USAGE_MATCH_TYPE_AND; - ret = pCertGetCertificateChain(NULL, cert, &fileTime, store, ¶, - 0, NULL, &chain); - ok(ret, "CertGetCertificateChain failed: %08x\n", GetLastError()); - if (ret) - { - ok(chain->TrustStatus.dwErrorStatus & CERT_TRUST_IS_NOT_VALID_FOR_USAGE, - "expected CERT_TRUST_IS_NOT_VALID_FOR_USAGE\n"); - CertFreeCertificateChain(chain); - } - para.RequestedUsage.dwType = USAGE_MATCH_TYPE_OR; - ret = pCertGetCertificateChain(NULL, cert, &fileTime, store, ¶, - 0, NULL, &chain); - ok(ret, "CertGetCertificateChain failed: %08x\n", GetLastError()); - if (ret) - { - ok(!(chain->TrustStatus.dwErrorStatus & - CERT_TRUST_IS_NOT_VALID_FOR_USAGE), - "didn't expect CERT_TRUST_IS_NOT_VALID_FOR_USAGE\n"); - CertFreeCertificateChain(chain); - } - CertCloseStore(store, 0); - CertFreeCertificateContext(cert); - - for (i = 0; i < sizeof(chainCheck) / sizeof(chainCheck[0]); i++) - { - chain = getChain(NULL, &chainCheck[i].certs, 0, TRUE, &oct2007, - chainCheck[i].todo, i); - if (chain) - { - checkChainStatus(chain, &chainCheck[i].status, chainCheck[i].todo, - i); - pCertFreeCertificateChain(chain); - } - } - for (i = 0; i < sizeof(chainCheckNoStore) / sizeof(chainCheckNoStore[0]); - i++) - { - chain = getChain(NULL, &chainCheckNoStore[i].certs, 0, FALSE, &oct2007, - chainCheckNoStore[i].todo, i); - if (chain) - { - checkChainStatus(chain, &chainCheckNoStore[i].status, - chainCheckNoStore[i].todo, i); - pCertFreeCertificateChain(chain); - } - } - chain = getChain(NULL, &chainCheckEmbeddedNull.certs, 0, TRUE, &oct2007, - chainCheckEmbeddedNull.todo, 0); - if (chain) - { - ok(chain->TrustStatus.dwErrorStatus == - chainCheckEmbeddedNull.status.status.dwErrorStatus || - broken((chain->TrustStatus.dwErrorStatus & - ~chainCheckEmbeddedNullBroken.status.statusToIgnore.dwErrorStatus) == - (chainCheckEmbeddedNullBroken.status.status.dwErrorStatus & - ~chainCheckEmbeddedNullBroken.status.statusToIgnore.dwErrorStatus)), - "unexpected chain error status %08x\n", - chain->TrustStatus.dwErrorStatus); - if (chainCheckEmbeddedNull.status.status.dwErrorStatus == - chain->TrustStatus.dwErrorStatus) - checkChainStatus(chain, &chainCheckEmbeddedNull.status, - chainCheckEmbeddedNull.todo, 0); - else - checkChainStatus(chain, &chainCheckEmbeddedNullBroken.status, - chainCheckEmbeddedNullBroken.todo, 0); - pCertFreeCertificateChain(chain); - } -} - -static void test_CERT_CHAIN_PARA_cbSize(void) -{ - BOOL ret; - PCCERT_CONTEXT cert; - CERT_CHAIN_PARA para = { 0 }; - PCCERT_CHAIN_CONTEXT chain; - HCERTSTORE store; - DWORD i; - - store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - - ret = CertAddEncodedCertificateToStore(store, - X509_ASN_ENCODING, chain0_0, sizeof(chain0_0), - CERT_STORE_ADD_ALWAYS, NULL); - ret = CertAddEncodedCertificateToStore(store, - X509_ASN_ENCODING, chain0_1, sizeof(chain0_1), - CERT_STORE_ADD_ALWAYS, &cert); - - for (i = 0; i < sizeof(CERT_CHAIN_PARA) + 2; i++) - { - FILETIME fileTime; - - SystemTimeToFileTime(&oct2007, &fileTime); - - para.cbSize = i; - ret = pCertGetCertificateChain(NULL, cert, &fileTime, - NULL, ¶, 0, NULL, &chain); - ok(ret, "CertGetCertificateChain failed %u\n", GetLastError()); - pCertFreeCertificateChain(chain); - } - - CertFreeCertificateContext(cert); - CertCloseStore(store, 0); -} - -typedef struct _ChainPolicyCheck -{ - CONST_BLOB_ARRAY certs; - CERT_CHAIN_POLICY_STATUS status; - const CERT_CHAIN_POLICY_STATUS *brokenStatus; - DWORD todo; -} ChainPolicyCheck; - -static const ChainPolicyCheck basePolicyCheck[] = { - { { sizeof(chain0) / sizeof(chain0[0]), chain0 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain1) / sizeof(chain1[0]), chain1 }, - { 0, TRUST_E_CERT_SIGNATURE, 0, 0, NULL }, NULL, 0 }, - { { sizeof(chain2) / sizeof(chain2[0]), chain2 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain3) / sizeof(chain3[0]), chain3 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain4) / sizeof(chain4[0]), chain4 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 2, NULL }, NULL, 0 }, - { { sizeof(chain5) / sizeof(chain5[0]), chain5 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain6) / sizeof(chain6[0]), chain6 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain7) / sizeof(chain7[0]), chain7 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain8) / sizeof(chain8[0]), chain8 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 2, NULL }, NULL, 0 }, - { { sizeof(chain9) / sizeof(chain9[0]), chain9 }, - { 0, CERT_E_CHAINING, 0, -1, NULL }, NULL, 0 }, - { { sizeof(chain10) / sizeof(chain10[0]), chain10 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain11) / sizeof(chain11[0]), chain11 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain12) / sizeof(chain12[0]), chain12 }, - { 0, TRUST_E_CERT_SIGNATURE, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain13) / sizeof(chain13[0]), chain13 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain14) / sizeof(chain14[0]), chain14 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain15) / sizeof(chain15[0]), chain15 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain16) / sizeof(chain16[0]), chain16 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain17) / sizeof(chain17[0]), chain17 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 2, NULL }, NULL, 0 }, - { { sizeof(chain18) / sizeof(chain18[0]), chain18 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 2, NULL }, NULL, 0 }, - { { sizeof(selfSignedChain) / sizeof(selfSignedChain[0]), selfSignedChain }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 0, NULL }, NULL, 0 }, -}; - -static const ChainPolicyCheck sslPolicyCheck[] = { - { { sizeof(chain0) / sizeof(chain0[0]), chain0 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain1) / sizeof(chain1[0]), chain1 }, - { 0, TRUST_E_CERT_SIGNATURE, 0, 0, NULL }, NULL, 0 }, - { { sizeof(chain2) / sizeof(chain2[0]), chain2 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain3) / sizeof(chain3[0]), chain3 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain4) / sizeof(chain4[0]), chain4 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 2, NULL }, NULL, 0 }, - { { sizeof(chain5) / sizeof(chain5[0]), chain5 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain6) / sizeof(chain6[0]), chain6 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain7) / sizeof(chain7[0]), chain7 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain8) / sizeof(chain8[0]), chain8 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 2, NULL }, NULL, 0 }, - { { sizeof(chain9) / sizeof(chain9[0]), chain9 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, -1, NULL }, NULL, 0 }, - { { sizeof(chain10) / sizeof(chain10[0]), chain10 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain11) / sizeof(chain11[0]), chain11 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain12) / sizeof(chain12[0]), chain12 }, - { 0, TRUST_E_CERT_SIGNATURE, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain13) / sizeof(chain13[0]), chain13 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain14) / sizeof(chain14[0]), chain14 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain15) / sizeof(chain15[0]), chain15 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain16) / sizeof(chain16[0]), chain16 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain17) / sizeof(chain17[0]), chain17 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 2, NULL }, NULL, 0 }, - { { sizeof(chain18) / sizeof(chain18[0]), chain18 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 2, NULL }, NULL, 0 }, - { { sizeof(selfSignedChain) / sizeof(selfSignedChain[0]), selfSignedChain }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 0, NULL }, NULL, 0 }, -}; - -static const ChainPolicyCheck googlePolicyCheckWithMatchingNameExpired = { - { sizeof(googleChain) / sizeof(googleChain[0]), googleChain }, - { 0, CERT_E_EXPIRED, 0, 0, NULL}, NULL, 0 -}; - -static const ChainPolicyCheck googlePolicyCheckWithMatchingName = { - { sizeof(googleChain) / sizeof(googleChain[0]), googleChain }, - { 0, 0, -1, -1, NULL}, NULL, 0 -}; - -/* Windows NT 4 has a different error code when the name doesn't match. */ -static const CERT_CHAIN_POLICY_STATUS noMatchingNameBrokenStatus = - { 0, CERT_E_ROLE, 0, 0, NULL }; - -static const ChainPolicyCheck iTunesPolicyCheckWithoutMatchingName = { - { sizeof(iTunesChain) / sizeof(iTunesChain[0]), iTunesChain }, - { 0, CERT_E_CN_NO_MATCH, 0, 0, NULL}, &noMatchingNameBrokenStatus, 0 -}; - -static const ChainPolicyCheck opensslPolicyCheckWithMatchingName = { - { sizeof(opensslChain) / sizeof(opensslChain[0]), opensslChain }, - { 0, 0, -1, -1, NULL}, NULL, 0 -}; - -static const ChainPolicyCheck opensslPolicyCheckWithoutMatchingName = { - { sizeof(opensslChain) / sizeof(opensslChain[0]), opensslChain }, - { 0, CERT_E_CN_NO_MATCH, 0, 0, NULL}, NULL, 0 -}; - -static const ChainPolicyCheck winehqPolicyCheckWithMatchingName = { - { sizeof(chain29) / sizeof(chain29[0]), chain29 }, - { 0, 0, -1, -1, NULL}, NULL, 0 -}; - -static const ChainPolicyCheck winehqPolicyCheckWithoutMatchingName = { - { sizeof(chain29) / sizeof(chain29[0]), chain29 }, - { 0, CERT_E_CN_NO_MATCH, 0, 0, NULL}, NULL, 0 -}; - -static const ChainPolicyCheck stanfordPolicyCheckWithMatchingName = { - { sizeof(stanfordChain) / sizeof(stanfordChain[0]), stanfordChain }, - { 0, 0, -1, -1, NULL}, NULL, 0 -}; - -static const ChainPolicyCheck stanfordPolicyCheckWithoutMatchingName = { - { sizeof(stanfordChain) / sizeof(stanfordChain[0]), stanfordChain }, - { 0, CERT_E_CN_NO_MATCH, 0, 0, NULL}, NULL, 0 -}; - -static const ChainPolicyCheck authenticodePolicyCheck[] = { - { { sizeof(chain0) / sizeof(chain0[0]), chain0 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain1) / sizeof(chain1[0]), chain1 }, - { 0, TRUST_E_CERT_SIGNATURE, 0, 0, NULL }, NULL, 0 }, - { { sizeof(chain2) / sizeof(chain2[0]), chain2 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain3) / sizeof(chain3[0]), chain3 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain4) / sizeof(chain4[0]), chain4 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 2, NULL }, NULL, 0 }, - { { sizeof(chain5) / sizeof(chain5[0]), chain5 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain6) / sizeof(chain6[0]), chain6 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain7) / sizeof(chain7[0]), chain7 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain8) / sizeof(chain8[0]), chain8 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 2, NULL }, NULL, 0 }, - { { sizeof(chain9) / sizeof(chain9[0]), chain9 }, - { 0, CERT_E_CHAINING, 0, -1, NULL }, NULL, 0 }, - { { sizeof(chain10) / sizeof(chain10[0]), chain10 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain11) / sizeof(chain11[0]), chain11 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain12) / sizeof(chain12[0]), chain12 }, - { 0, TRUST_E_CERT_SIGNATURE, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain13) / sizeof(chain13[0]), chain13 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain14) / sizeof(chain14[0]), chain14 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain15) / sizeof(chain15[0]), chain15 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain16) / sizeof(chain16[0]), chain16 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain17) / sizeof(chain17[0]), chain17 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 2, NULL }, NULL, 0 }, - { { sizeof(chain18) / sizeof(chain18[0]), chain18 }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 2, NULL }, NULL, 0 }, - { { sizeof(selfSignedChain) / sizeof(selfSignedChain[0]), selfSignedChain }, - { 0, CERT_E_UNTRUSTEDROOT, 0, 0, NULL }, NULL, 0 }, -}; - -/* On some older systems, the element index is set to 2 rather than 1 for - * chain 4, because they do not catch the basic constraints error in the - * chain, which occurs at element 1. - */ -static const CERT_CHAIN_POLICY_STATUS chain4BrokenStatus = - { 0, TRUST_E_BASIC_CONSTRAINTS, 0, 2, NULL }; - -static const ChainPolicyCheck basicConstraintsPolicyCheck[] = { - { { sizeof(chain0) / sizeof(chain0[0]), chain0 }, - { 0, 0, -1, -1, NULL }, NULL, 0 }, - { { sizeof(chain1) / sizeof(chain1[0]), chain1 }, - { 0, 0, -1, -1, NULL }, NULL, 0 }, - { { sizeof(chain2) / sizeof(chain2[0]), chain2 }, - { 0, 0, -1, -1, NULL }, NULL, 0 }, - { { sizeof(chain3) / sizeof(chain3[0]), chain3 }, - { 0, TRUST_E_BASIC_CONSTRAINTS, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain4) / sizeof(chain4[0]), chain4 }, - { 0, TRUST_E_BASIC_CONSTRAINTS, 0, 1, NULL }, &chain4BrokenStatus, 0 }, - { { sizeof(chain5) / sizeof(chain5[0]), chain5 }, - { 0, 0, -1, -1, NULL }, NULL, 0 }, - { { sizeof(chain6) / sizeof(chain6[0]), chain6 }, - { 0, 0, -1, -1, NULL }, NULL, 0 }, - { { sizeof(chain7) / sizeof(chain7[0]), chain7 }, - { 0, 0, -1, -1, NULL }, NULL, 0 }, - { { sizeof(chain8) / sizeof(chain8[0]), chain8 }, - { 0, TRUST_E_BASIC_CONSTRAINTS, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain9) / sizeof(chain9[0]), chain9 }, - { 0, TRUST_E_BASIC_CONSTRAINTS, 0, 1, NULL }, NULL, 0 }, - { { sizeof(chain10) / sizeof(chain10[0]), chain10 }, - { 0, 0, -1, -1, NULL }, NULL, 0 }, - { { sizeof(chain11) / sizeof(chain11[0]), chain11 }, - { 0, 0, -1, -1, NULL }, NULL, 0 }, - { { sizeof(chain12) / sizeof(chain12[0]), chain12 }, - { 0, 0, -1, -1, NULL }, NULL, 0 }, - { { sizeof(chain13) / sizeof(chain13[0]), chain13 }, - { 0, 0, -1, -1, NULL }, NULL, 0 }, - { { sizeof(chain14) / sizeof(chain14[0]), chain14 }, - { 0, 0, -1, -1, NULL }, NULL, 0 }, - { { sizeof(chain15) / sizeof(chain15[0]), chain15 }, - { 0, 0, -1, -1, NULL }, NULL, 0 }, - { { sizeof(chain16) / sizeof(chain16[0]), chain16 }, - { 0, 0, -1, -1, NULL }, NULL, 0 }, - { { sizeof(chain17) / sizeof(chain17[0]), chain17 }, - { 0, 0, -1, -1, NULL }, NULL, 0 }, - { { sizeof(chain18) / sizeof(chain18[0]), chain18 }, - { 0, 0, -1, -1, NULL }, NULL, 0 }, - { { sizeof(selfSignedChain) / sizeof(selfSignedChain[0]), selfSignedChain }, - { 0, 0, -1, -1, NULL }, NULL, 0 }, -}; - -static const char *num_to_str(WORD num) -{ - static char buf[6]; - - sprintf(buf, "#%04X", num); - return buf; -} - -static void checkChainPolicyStatus(LPCSTR policy, HCERTCHAINENGINE engine, - const ChainPolicyCheck *check, DWORD testIndex, SYSTEMTIME *sysTime, - PCERT_CHAIN_POLICY_PARA para) -{ - PCCERT_CHAIN_CONTEXT chain = getChain(engine, &check->certs, 0, TRUE, - sysTime, check->todo, testIndex); - - if (chain) - { - CERT_CHAIN_POLICY_STATUS policyStatus = { 0 }; - BOOL ret = pCertVerifyCertificateChainPolicy(policy, chain, para, - &policyStatus); - - if (check->todo & TODO_POLICY) - todo_wine ok(ret, - "%s[%d]: CertVerifyCertificateChainPolicy failed: %08x\n", - IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy, - testIndex, GetLastError()); - else - { - if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) - { - skip("%d: missing policy %s, skipping test\n", testIndex, - IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy); - pCertFreeCertificateChain(chain); - return; - } - ok(ret, "%s[%d]: CertVerifyCertificateChainPolicy failed: %08x\n", - IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy, testIndex, - GetLastError()); - } - if (ret) - { - if (check->todo & TODO_ERROR) - todo_wine ok(policyStatus.dwError == check->status.dwError || - broken(policyStatus.dwError == CERT_TRUST_NO_ERROR) || - (check->brokenStatus && broken(policyStatus.dwError == - check->brokenStatus->dwError)), - "%s[%d]: expected %08x, got %08x\n", - IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy, - testIndex, check->status.dwError, policyStatus.dwError); - else - ok(policyStatus.dwError == check->status.dwError || - broken(policyStatus.dwError == CERT_TRUST_NO_ERROR) || - (check->brokenStatus && broken(policyStatus.dwError == - check->brokenStatus->dwError)), - "%s[%d]: expected %08x, got %08x\n", - IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy, - testIndex, check->status.dwError, policyStatus.dwError); - if (policyStatus.dwError != check->status.dwError) - { - skip("%s[%d]: error %08x doesn't match expected %08x, not checking indexes\n", - IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy, - testIndex, policyStatus.dwError, check->status.dwError); - pCertFreeCertificateChain(chain); - return; - } - if (check->todo & TODO_CHAINS) - todo_wine ok(policyStatus.lChainIndex == - check->status.lChainIndex || - (check->brokenStatus && broken(policyStatus.lChainIndex == - check->brokenStatus->lChainIndex)), - "%s[%d]: expected %d, got %d\n", - IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy, - testIndex, check->status.lChainIndex, - policyStatus.lChainIndex); - else - ok(policyStatus.lChainIndex == check->status.lChainIndex || - (check->brokenStatus && broken(policyStatus.lChainIndex == - check->brokenStatus->lChainIndex)), - "%s[%d]: expected %d, got %d\n", - IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy, - testIndex, - check->status.lChainIndex, policyStatus.lChainIndex); - if (check->todo & TODO_ELEMENTS) - todo_wine ok(policyStatus.lElementIndex == - check->status.lElementIndex || - (check->brokenStatus && broken(policyStatus.lElementIndex == - check->brokenStatus->lElementIndex)), - "%s[%d]: expected %d, got %d\n", - IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy, - testIndex, - check->status.lElementIndex, policyStatus.lElementIndex); - else - ok(policyStatus.lElementIndex == check->status.lElementIndex || - (check->brokenStatus && broken(policyStatus.lElementIndex == - check->brokenStatus->lElementIndex)), - "%s[%d]: expected %d, got %d\n", - IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy, - testIndex, - check->status.lElementIndex, policyStatus.lElementIndex); - } - pCertFreeCertificateChain(chain); - } -} - -static void check_ssl_policy(void) -{ - DWORD i; - CERT_CHAIN_POLICY_PARA policyPara = { 0 }; - SSL_EXTRA_CERT_CHAIN_POLICY_PARA sslPolicyPara = { { 0 } }; - WCHAR winehq[] = { 'w','i','n','e','h','q','.','o','r','g',0 }; - WCHAR google_dot_com[] = { 'w','w','w','.','g','o','o','g','l','e','.', - 'c','o','m',0 }; - WCHAR a_dot_openssl_dot_org[] = { 'a','.','o','p','e','n','s','s','l','.', - 'o','r','g',0 }; - WCHAR openssl_dot_org[] = { 'o','p','e','n','s','s','l','.','o','r','g',0 }; - WCHAR fopenssl_dot_org[] = { 'f','o','p','e','n','s','s','l','.', - 'o','r','g',0 }; - WCHAR a_dot_b_dot_openssl_dot_org[] = { 'a','.','b','.', - 'o','p','e','n','s','s','l','.','o','r','g',0 }; - WCHAR cs_dot_stanford_dot_edu[] = { 'c','s','.', - 's','t','a','n','f','o','r','d','.','e','d','u',0 }; - WCHAR www_dot_cs_dot_stanford_dot_edu[] = { 'w','w','w','.','c','s','.', - 's','t','a','n','f','o','r','d','.','e','d','u',0 }; - WCHAR a_dot_cs_dot_stanford_dot_edu[] = { 'a','.','c','s','.', - 's','t','a','n','f','o','r','d','.','e','d','u',0 }; - WCHAR test_dot_winehq_dot_org[] = { 't','e','s','t','.', - 'w','i','n','e','h','q','.','o','r','g',0 }; - WCHAR a_dot_b_dot_winehq_dot_org[] = { 'a','.','b','.', - 'w','i','n','e','h','q','.','o','r','g',0 }; - HCERTSTORE testRoot; - CERT_CHAIN_ENGINE_CONFIG engineConfig = { sizeof(engineConfig), 0 }; - HCERTCHAINENGINE engine; - - /* Check ssl policy with no parameter */ - for (i = 0; - i < sizeof(sslPolicyCheck) / sizeof(sslPolicyCheck[0]); i++) - checkChainPolicyStatus(CERT_CHAIN_POLICY_SSL, NULL, &sslPolicyCheck[i], - i, &oct2007, NULL); - /* Check again with a policy parameter that specifies nothing */ - for (i = 0; - i < sizeof(sslPolicyCheck) / sizeof(sslPolicyCheck[0]); i++) - checkChainPolicyStatus(CERT_CHAIN_POLICY_SSL, NULL, &sslPolicyCheck[i], - i, &oct2007, &policyPara); - /* Check yet again, but specify an empty SSL_EXTRA_CERT_CHAIN_POLICY_PARA - * argument. - */ - policyPara.pvExtraPolicyPara = &sslPolicyPara; - for (i = 0; - i < sizeof(sslPolicyCheck) / sizeof(sslPolicyCheck[0]); i++) - checkChainPolicyStatus(CERT_CHAIN_POLICY_SSL, NULL, &sslPolicyCheck[i], - i, &oct2007, &policyPara); - /* And again, but specify the auth type as a client */ - sslPolicyPara.dwAuthType = AUTHTYPE_CLIENT; - for (i = 0; - i < sizeof(sslPolicyCheck) / sizeof(sslPolicyCheck[0]); i++) - checkChainPolicyStatus(CERT_CHAIN_POLICY_SSL, NULL, &sslPolicyCheck[i], - i, &oct2007, &policyPara); - /* And again, but specify the auth type as a server */ - sslPolicyPara.dwAuthType = AUTHTYPE_SERVER; - for (i = 0; - i < sizeof(sslPolicyCheck) / sizeof(sslPolicyCheck[0]); i++) - checkChainPolicyStatus(CERT_CHAIN_POLICY_SSL, NULL, &sslPolicyCheck[i], - i, &oct2007, &policyPara); - /* And again authenticating a client, but specify the size of the policy - * parameter. - */ - U(sslPolicyPara).cbSize = sizeof(sslPolicyCheck); - sslPolicyPara.dwAuthType = AUTHTYPE_CLIENT; - for (i = 0; - i < sizeof(sslPolicyCheck) / sizeof(sslPolicyCheck[0]); i++) - checkChainPolicyStatus(CERT_CHAIN_POLICY_SSL, NULL, &sslPolicyCheck[i], - i, &oct2007, &policyPara); - /* One more time authenticating a client, but specify winehq.org as the - * server name. - */ - sslPolicyPara.pwszServerName = winehq; - for (i = 0; - i < sizeof(sslPolicyCheck) / sizeof(sslPolicyCheck[0]); i++) - checkChainPolicyStatus(CERT_CHAIN_POLICY_SSL, NULL, &sslPolicyCheck[i], - i, &oct2007, &policyPara); - /* And again authenticating a server, still specifying winehq.org as the - * server name. - */ - sslPolicyPara.dwAuthType = AUTHTYPE_SERVER; - for (i = 0; - i < sizeof(sslPolicyCheck) / sizeof(sslPolicyCheck[0]); i++) - checkChainPolicyStatus(CERT_CHAIN_POLICY_SSL, NULL, &sslPolicyCheck[i], - i, &oct2007, &policyPara); - /* And again authenticating a server, this time specifying the size of the - * policy param. - */ - policyPara.cbSize = sizeof(policyPara); - for (i = 0; - i < sizeof(sslPolicyCheck) / sizeof(sslPolicyCheck[0]); i++) - checkChainPolicyStatus(CERT_CHAIN_POLICY_SSL, NULL, &sslPolicyCheck[i], - i, &oct2007, &policyPara); - /* Yet again, but checking the iTunes chain, which contains a name - * extension. - */ - checkChainPolicyStatus(CERT_CHAIN_POLICY_SSL, NULL, - &iTunesPolicyCheckWithoutMatchingName, 0, &oct2007, &policyPara); - /* And again, but checking the Google chain at a bad date */ - sslPolicyPara.pwszServerName = google_dot_com; - checkChainPolicyStatus(CERT_CHAIN_POLICY_SSL, NULL, - &googlePolicyCheckWithMatchingNameExpired, 0, &oct2007, &policyPara); - /* And again, but checking the Google chain at a good date */ - sslPolicyPara.pwszServerName = google_dot_com; - checkChainPolicyStatus(CERT_CHAIN_POLICY_SSL, NULL, - &googlePolicyCheckWithMatchingName, 0, &oct2009, &policyPara); - /* Check again with the openssl cert, which has a wildcard in its name, - * with various combinations of matching and non-matching names. - * With "a.openssl.org": match - */ - sslPolicyPara.pwszServerName = a_dot_openssl_dot_org; - checkChainPolicyStatus(CERT_CHAIN_POLICY_SSL, NULL, - &opensslPolicyCheckWithMatchingName, 0, &oct2009, &policyPara); - /* With "openssl.org": no match */ - sslPolicyPara.pwszServerName = openssl_dot_org; - checkChainPolicyStatus(CERT_CHAIN_POLICY_SSL, NULL, - &opensslPolicyCheckWithoutMatchingName, 0, &oct2009, &policyPara); - /* With "fopenssl.org": no match */ - sslPolicyPara.pwszServerName = fopenssl_dot_org; - checkChainPolicyStatus(CERT_CHAIN_POLICY_SSL, NULL, - &opensslPolicyCheckWithoutMatchingName, 0, &oct2009, &policyPara); - /* with "a.b.openssl.org": no match */ - sslPolicyPara.pwszServerName = a_dot_b_dot_openssl_dot_org; - checkChainPolicyStatus(CERT_CHAIN_POLICY_SSL, NULL, - &opensslPolicyCheckWithoutMatchingName, 0, &oct2009, &policyPara); - /* Check again with the cs.stanford.edu, which has both cs.stanford.edu - * and www.cs.stanford.edu in its subject alternative name. - * With "cs.stanford.edu": match - */ - sslPolicyPara.pwszServerName = cs_dot_stanford_dot_edu; - checkChainPolicyStatus(CERT_CHAIN_POLICY_SSL, NULL, - &stanfordPolicyCheckWithMatchingName, 0, &oct2009, &policyPara); - /* With "www.cs.stanford.edu": match */ - sslPolicyPara.pwszServerName = www_dot_cs_dot_stanford_dot_edu; - checkChainPolicyStatus(CERT_CHAIN_POLICY_SSL, NULL, - &stanfordPolicyCheckWithMatchingName, 0, &oct2009, &policyPara); - /* With "a.cs.stanford.edu": no match */ - sslPolicyPara.pwszServerName = a_dot_cs_dot_stanford_dot_edu; - checkChainPolicyStatus(CERT_CHAIN_POLICY_SSL, NULL, - &stanfordPolicyCheckWithoutMatchingName, 0, &oct2009, &policyPara); - /* Check chain29, which has a wildcard in its subject alternative name, - * but not in its distinguished name. - * Step 1: create a chain engine that trusts chain29's root. - */ - testRoot = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - CertAddEncodedCertificateToStore(testRoot, X509_ASN_ENCODING, chain0_0, - sizeof(chain0_0), CERT_STORE_ADD_ALWAYS, NULL); - engineConfig.hExclusiveRoot = testRoot; - if (!CertCreateCertificateChainEngine(&engineConfig, &engine)) - { - skip("Couldn't create chain engine\n"); - return; - } - /* With "winehq.org": no match */ - sslPolicyPara.pwszServerName = winehq; - checkChainPolicyStatus(CERT_CHAIN_POLICY_SSL, engine, - &winehqPolicyCheckWithoutMatchingName, 0, &oct2007, &policyPara); - /* With "test.winehq.org": match */ - sslPolicyPara.pwszServerName = test_dot_winehq_dot_org; - checkChainPolicyStatus(CERT_CHAIN_POLICY_SSL, engine, - &winehqPolicyCheckWithMatchingName, 0, &oct2007, &policyPara); - /* With "a.b.winehq.org": no match */ - sslPolicyPara.pwszServerName = a_dot_b_dot_winehq_dot_org; - checkChainPolicyStatus(CERT_CHAIN_POLICY_SSL, engine, - &winehqPolicyCheckWithoutMatchingName, 0, &oct2007, &policyPara); - CertFreeCertificateChainEngine(engine); - CertCloseStore(testRoot, 0); -} - -static void testVerifyCertChainPolicy(void) -{ - BOOL ret; - PCCERT_CONTEXT cert; - CERT_CHAIN_PARA chainPara = { sizeof(CERT_CHAIN_PARA), { 0 } }; - PCCERT_CHAIN_CONTEXT chain; - CERT_CHAIN_POLICY_STATUS policyStatus = { 0 }; - CERT_CHAIN_POLICY_PARA policyPara = { 0 }; - DWORD i; - - if (!pCertVerifyCertificateChainPolicy) - { - win_skip("CertVerifyCertificateChainPolicy() is not available\n"); - return; - } - - /* Crash - ret = pCertVerifyCertificateChainPolicy(NULL, NULL, NULL, NULL); - ret = pCertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_BASE, NULL, NULL, - NULL); - ret = pCertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_BASE, NULL, - &chainPara, NULL); - */ - SetLastError(0xdeadbeef); - ret = pCertVerifyCertificateChainPolicy(NULL, NULL, NULL, &policyStatus); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - /* Crashes - ret = pCertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_BASE, NULL, NULL, - &policyStatus); - */ - cert = CertCreateCertificateContext(X509_ASN_ENCODING, selfSignedCert, - sizeof(selfSignedCert)); - pCertGetCertificateChain(NULL, cert, NULL, NULL, &chainPara, 0, NULL, - &chain); - /* Crash - ret = pCertVerifyCertificateChainPolicy(NULL, chain, NULL, NULL); - ret = pCertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_BASE, chain, NULL, - NULL); - ret = pCertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_BASE, chain, - &chainPara, NULL); - */ - /* Size of policy status is apparently ignored, as is pChainPolicyPara */ - ret = pCertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_BASE, chain, NULL, - &policyStatus); - ok(ret, "CertVerifyCertificateChainPolicy failed: %08x\n", GetLastError()); - ok(policyStatus.dwError == CERT_E_UNTRUSTEDROOT, - "Expected CERT_E_UNTRUSTEDROOT, got %08x\n", policyStatus.dwError); - ok(policyStatus.lChainIndex == 0 && policyStatus.lElementIndex == 0, - "Expected both indexes 0, got %d, %d\n", policyStatus.lChainIndex, - policyStatus.lElementIndex); - ret = pCertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_BASE, chain, - &policyPara, &policyStatus); - ok(ret, "CertVerifyCertificateChainPolicy failed: %08x\n", GetLastError()); - ok(policyStatus.dwError == CERT_E_UNTRUSTEDROOT, - "Expected CERT_E_UNTRUSTEDROOT, got %08x\n", policyStatus.dwError); - ok(policyStatus.lChainIndex == 0 && policyStatus.lElementIndex == 0, - "Expected both indexes 0, got %d, %d\n", policyStatus.lChainIndex, - policyStatus.lElementIndex); - pCertFreeCertificateChain(chain); - CertFreeCertificateContext(cert); - - for (i = 0; - i < sizeof(basePolicyCheck) / sizeof(basePolicyCheck[0]); i++) - checkChainPolicyStatus(CERT_CHAIN_POLICY_BASE, NULL, - &basePolicyCheck[i], i, &oct2007, NULL); - check_ssl_policy(); - /* The authenticode policy doesn't seem to check anything beyond the base - * policy. It might check for chains signed by the MS test cert, but none - * of these chains is. - */ - for (i = 0; i < - sizeof(authenticodePolicyCheck) / sizeof(authenticodePolicyCheck[0]); i++) - checkChainPolicyStatus(CERT_CHAIN_POLICY_AUTHENTICODE, NULL, - &authenticodePolicyCheck[i], i, &oct2007, NULL); - for (i = 0; i < - sizeof(basicConstraintsPolicyCheck) / sizeof(basicConstraintsPolicyCheck[0]); - i++) - checkChainPolicyStatus(CERT_CHAIN_POLICY_BASIC_CONSTRAINTS, NULL, - &basicConstraintsPolicyCheck[i], i, &oct2007, NULL); -} - -START_TEST(chain) -{ - HMODULE hCrypt32 = GetModuleHandleA("crypt32.dll"); - pCertCreateCertificateChainEngine = (void*)GetProcAddress(hCrypt32, "CertCreateCertificateChainEngine"); - pCertGetCertificateChain = (void*)GetProcAddress(hCrypt32, "CertGetCertificateChain"); - pCertFreeCertificateChain = (void*)GetProcAddress(hCrypt32, "CertFreeCertificateChain"); - pCertFreeCertificateChainEngine = (void*)GetProcAddress(hCrypt32, "CertFreeCertificateChainEngine"); - pCertVerifyCertificateChainPolicy = (void*)GetProcAddress(hCrypt32, "CertVerifyCertificateChainPolicy"); - - testCreateCertChainEngine(); - if (!pCertGetCertificateChain) - { - win_skip("CertGetCertificateChain() is not available\n"); - } - else - { - testVerifyCertChainPolicy(); - testGetCertChain(); - test_CERT_CHAIN_PARA_cbSize(); - } -} diff --git a/rostests/winetests/crypt32/crl.c b/rostests/winetests/crypt32/crl.c deleted file mode 100644 index bb622198aa7..00000000000 --- a/rostests/winetests/crypt32/crl.c +++ /dev/null @@ -1,1189 +0,0 @@ -/* - * crypt32 CRL functions tests - * - * Copyright 2005-2006 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 - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "wine/test.h" - - -static const BYTE bigCert[] = { 0x30, 0x7a, 0x02, 0x01, 0x01, 0x30, 0x02, 0x06, - 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, - 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x22, - 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, - 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, - 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, - 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, 0x01, - 0x00, 0xa3, 0x16, 0x30, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, - 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x01 }; -static const BYTE bigCert2[] = { 0x30, 0x7a, 0x02, 0x01, 0x01, 0x30, 0x02, 0x06, - 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, - 0x0a, 0x41, 0x6c, 0x65, 0x78, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x22, - 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, - 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, - 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x41, 0x6c, 0x65, 0x78, 0x20, - 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, 0x01, - 0x00, 0xa3, 0x16, 0x30, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, - 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x01 }; -static const BYTE bigCertWithDifferentIssuer[] = { 0x30, 0x7a, 0x02, 0x01, - 0x01, 0x30, 0x02, 0x06, 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, - 0x55, 0x04, 0x03, 0x13, 0x0a, 0x41, 0x6c, 0x65, 0x78, 0x20, 0x4c, 0x61, 0x6e, - 0x67, 0x00, 0x30, 0x22, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, - 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, - 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, - 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, - 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, - 0x06, 0x00, 0x03, 0x01, 0x00, 0xa3, 0x16, 0x30, 0x14, 0x30, 0x12, 0x06, 0x03, - 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, - 0x02, 0x01, 0x01 }; -static const BYTE CRL[] = { 0x30, 0x2c, 0x30, 0x02, 0x06, 0x00, - 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, - 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x18, 0x0f, 0x31, - 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x5a }; -static const BYTE newerCRL[] = { 0x30, 0x2a, 0x30, 0x02, 0x06, 0x00, 0x30, - 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, - 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x17, 0x0d, 0x30, 0x36, - 0x30, 0x35, 0x31, 0x36, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a }; -static const BYTE signedCRL[] = { 0x30, 0x45, 0x30, 0x2c, 0x30, 0x02, 0x06, - 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, - 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x18, 0x0f, - 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x5a, 0x30, 0x02, 0x06, 0x00, 0x03, 0x11, 0x00, 0x0f, 0x0e, 0x0d, 0x0c, - 0x0b, 0x0a, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00 }; - -static BOOL (WINAPI *pCertFindCertificateInCRL)(PCCERT_CONTEXT,PCCRL_CONTEXT,DWORD,void*,PCRL_ENTRY*); -static PCCRL_CONTEXT (WINAPI *pCertFindCRLInStore)(HCERTSTORE,DWORD,DWORD,DWORD,const void*,PCCRL_CONTEXT); -static BOOL (WINAPI *pCertIsValidCRLForCertificate)(PCCERT_CONTEXT, PCCRL_CONTEXT, DWORD, void*); - -static void init_function_pointers(void) -{ - HMODULE hdll = GetModuleHandleA("crypt32.dll"); - pCertFindCertificateInCRL = (void*)GetProcAddress(hdll, "CertFindCertificateInCRL"); - pCertFindCRLInStore = (void*)GetProcAddress(hdll, "CertFindCRLInStore"); - pCertIsValidCRLForCertificate = (void*)GetProcAddress(hdll, "CertIsValidCRLForCertificate"); -} - -static void testCreateCRL(void) -{ - PCCRL_CONTEXT context; - DWORD GLE; - - context = CertCreateCRLContext(0, NULL, 0); - ok(!context && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - context = CertCreateCRLContext(X509_ASN_ENCODING, NULL, 0); - GLE = GetLastError(); - ok(!context && (GLE == CRYPT_E_ASN1_EOD || GLE == OSS_MORE_INPUT), - "Expected CRYPT_E_ASN1_EOD or OSS_MORE_INPUT, got %08x\n", GLE); - context = CertCreateCRLContext(X509_ASN_ENCODING, bigCert, sizeof(bigCert)); - GLE = GetLastError(); - ok(!context, "Expected failure\n"); - context = CertCreateCRLContext(X509_ASN_ENCODING, signedCRL, - sizeof(signedCRL) - 1); - ok(!context, "Expected failure\n"); - context = CertCreateCRLContext(X509_ASN_ENCODING, signedCRL, - sizeof(signedCRL)); - ok(context != NULL, "CertCreateCRLContext failed: %08x\n", GetLastError()); - if (context) - CertFreeCRLContext(context); - context = CertCreateCRLContext(X509_ASN_ENCODING, CRL, sizeof(CRL)); - ok(context != NULL, "CertCreateCRLContext failed: %08x\n", GetLastError()); - if (context) - CertFreeCRLContext(context); -} - -static void testDupCRL(void) -{ - PCCRL_CONTEXT context, dupContext; - - context = CertDuplicateCRLContext(NULL); - ok(context == NULL, "expected NULL\n"); - context = CertCreateCRLContext(X509_ASN_ENCODING, signedCRL, - sizeof(signedCRL)); - dupContext = CertDuplicateCRLContext(context); - ok(dupContext != NULL, "expected a context\n"); - ok(dupContext == context, "expected identical context addresses\n"); - CertFreeCRLContext(dupContext); - CertFreeCRLContext(context); -} - -static void testAddCRL(void) -{ - HCERTSTORE store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - PCCRL_CONTEXT context; - BOOL ret; - DWORD GLE; - - if (!store) return; - - /* Bad CRL encoding type */ - ret = CertAddEncodedCRLToStore(0, 0, NULL, 0, 0, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - ret = CertAddEncodedCRLToStore(store, 0, NULL, 0, 0, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - ret = CertAddEncodedCRLToStore(0, 0, signedCRL, sizeof(signedCRL), 0, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - ret = CertAddEncodedCRLToStore(store, 0, signedCRL, sizeof(signedCRL), 0, - NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - ret = CertAddEncodedCRLToStore(0, 0, signedCRL, sizeof(signedCRL), - CERT_STORE_ADD_ALWAYS, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - ret = CertAddEncodedCRLToStore(store, 0, signedCRL, sizeof(signedCRL), - CERT_STORE_ADD_ALWAYS, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - - /* No CRL */ - ret = CertAddEncodedCRLToStore(0, X509_ASN_ENCODING, NULL, 0, 0, NULL); - GLE = GetLastError(); - ok(!ret && (GLE == CRYPT_E_ASN1_EOD || GLE == OSS_MORE_INPUT), - "Expected CRYPT_E_ASN1_EOD or OSS_MORE_INPUT, got %08x\n", GLE); - ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, NULL, 0, 0, NULL); - GLE = GetLastError(); - ok(!ret && (GLE == CRYPT_E_ASN1_EOD || GLE == OSS_MORE_INPUT), - "Expected CRYPT_E_ASN1_EOD or OSS_MORE_INPUT, got %08x\n", GLE); - - /* Weird--bad add disposition leads to an access violation in Windows. - * Both tests crash on some win9x boxes. - */ - if (0) - { - ret = CertAddEncodedCRLToStore(0, X509_ASN_ENCODING, signedCRL, - sizeof(signedCRL), 0, NULL); - ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || - GetLastError() == E_INVALIDARG /* Vista */), - "Expected STATUS_ACCESS_VIOLATION or E_INVALIDARG, got %08x\n", GetLastError()); - ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, signedCRL, - sizeof(signedCRL), 0, NULL); - ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || - GetLastError() == E_INVALIDARG /* Vista */), - "Expected STATUS_ACCESS_VIOLATION or E_INVALIDARG, got %08x\n", GetLastError()); - } - - /* Weird--can add a CRL to the NULL store (does this have special meaning?) - */ - context = NULL; - ret = CertAddEncodedCRLToStore(0, X509_ASN_ENCODING, signedCRL, - sizeof(signedCRL), CERT_STORE_ADD_ALWAYS, &context); - ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError()); - if (context) - CertFreeCRLContext(context); - - /* Normal cases: a "signed" CRL is okay.. */ - ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, signedCRL, - sizeof(signedCRL), CERT_STORE_ADD_ALWAYS, NULL); - /* and an unsigned one is too. */ - ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, CRL, sizeof(CRL), - CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError()); - - ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, newerCRL, - sizeof(newerCRL), CERT_STORE_ADD_NEW, NULL); - ok(!ret && GetLastError() == CRYPT_E_EXISTS, - "Expected CRYPT_E_EXISTS, got %08x\n", GetLastError()); - - /* This should replace (one of) the existing CRL(s). */ - ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, newerCRL, - sizeof(newerCRL), CERT_STORE_ADD_NEWER, NULL); - ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError()); - - CertCloseStore(store, 0); -} - -static const BYTE v1CRLWithIssuerAndEntry[] = { 0x30, 0x44, 0x30, 0x02, 0x06, - 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, - 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x18, 0x0f, - 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x5a, 0x30, 0x16, 0x30, 0x14, 0x02, 0x01, 0x01, 0x18, 0x0f, 0x31, 0x36, - 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a }; -static const BYTE v2CRLWithIssuingDistPoint[] = { -0x30,0x70,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30,0x11, -0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x00,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30, -0x30,0x30,0x30,0x5a,0x30,0x16,0x30,0x14,0x02,0x01,0x01,0x18,0x0f,0x31,0x36, -0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0xa0,0x27, -0x30,0x25,0x30,0x23,0x06,0x03,0x55,0x1d,0x1c,0x01,0x01,0xff,0x04,0x19,0x30, -0x17,0xa0,0x15,0xa0,0x13,0x86,0x11,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77, -0x69,0x6e,0x65,0x68,0x71,0x2e,0x6f,0x72,0x67 }; -static const BYTE verisignCRL[] = { 0x30, 0x82, 0x01, 0xb1, 0x30, 0x82, 0x01, - 0x1a, 0x02, 0x01, 0x01, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, - 0x0d, 0x01, 0x01, 0x02, 0x05, 0x00, 0x30, 0x61, 0x31, 0x11, 0x30, 0x0f, 0x06, - 0x03, 0x55, 0x04, 0x07, 0x13, 0x08, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x31, 0x17, 0x30, 0x15, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x0e, 0x56, - 0x65, 0x72, 0x69, 0x53, 0x69, 0x67, 0x6e, 0x2c, 0x20, 0x49, 0x6e, 0x63, 0x2e, - 0x31, 0x33, 0x30, 0x31, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x2a, 0x56, 0x65, - 0x72, 0x69, 0x53, 0x69, 0x67, 0x6e, 0x20, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x72, - 0x63, 0x69, 0x61, 0x6c, 0x20, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, - 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x20, 0x43, - 0x41, 0x17, 0x0d, 0x30, 0x31, 0x30, 0x33, 0x32, 0x34, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x5a, 0x17, 0x0d, 0x30, 0x34, 0x30, 0x31, 0x30, 0x37, 0x32, 0x33, - 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x69, 0x30, 0x21, 0x02, 0x10, 0x1b, 0x51, - 0x90, 0xf7, 0x37, 0x24, 0x39, 0x9c, 0x92, 0x54, 0xcd, 0x42, 0x46, 0x37, 0x99, - 0x6a, 0x17, 0x0d, 0x30, 0x31, 0x30, 0x31, 0x33, 0x30, 0x30, 0x30, 0x30, 0x31, - 0x32, 0x34, 0x5a, 0x30, 0x21, 0x02, 0x10, 0x75, 0x0e, 0x40, 0xff, 0x97, 0xf0, - 0x47, 0xed, 0xf5, 0x56, 0xc7, 0x08, 0x4e, 0xb1, 0xab, 0xfd, 0x17, 0x0d, 0x30, - 0x31, 0x30, 0x31, 0x33, 0x31, 0x30, 0x30, 0x30, 0x30, 0x34, 0x39, 0x5a, 0x30, - 0x21, 0x02, 0x10, 0x77, 0xe6, 0x5a, 0x43, 0x59, 0x93, 0x5d, 0x5f, 0x7a, 0x75, - 0x80, 0x1a, 0xcd, 0xad, 0xc2, 0x22, 0x17, 0x0d, 0x30, 0x30, 0x30, 0x38, 0x33, - 0x31, 0x30, 0x30, 0x30, 0x30, 0x35, 0x36, 0x5a, 0xa0, 0x1a, 0x30, 0x18, 0x30, - 0x09, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0b, 0x06, - 0x03, 0x55, 0x1d, 0x0f, 0x04, 0x04, 0x03, 0x02, 0x05, 0xa0, 0x30, 0x0d, 0x06, - 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x02, 0x05, 0x00, 0x03, - 0x81, 0x81, 0x00, 0x18, 0x2c, 0xe8, 0xfc, 0x16, 0x6d, 0x91, 0x4a, 0x3d, 0x88, - 0x54, 0x48, 0x5d, 0xb8, 0x11, 0xbf, 0x64, 0xbb, 0xf9, 0xda, 0x59, 0x19, 0xdd, - 0x0e, 0x65, 0xab, 0xc0, 0x0c, 0xfa, 0x67, 0x7e, 0x21, 0x1e, 0x83, 0x0e, 0xcf, - 0x9b, 0x89, 0x8a, 0xcf, 0x0c, 0x4b, 0xc1, 0x39, 0x9d, 0xe7, 0x6a, 0xac, 0x46, - 0x74, 0x6a, 0x91, 0x62, 0x22, 0x0d, 0xc4, 0x08, 0xbd, 0xf5, 0x0a, 0x90, 0x7f, - 0x06, 0x21, 0x3d, 0x7e, 0xa7, 0xaa, 0x5e, 0xcd, 0x22, 0x15, 0xe6, 0x0c, 0x75, - 0x8e, 0x6e, 0xad, 0xf1, 0x84, 0xe4, 0x22, 0xb4, 0x30, 0x6f, 0xfb, 0x64, 0x8f, - 0xd7, 0x80, 0x43, 0xf5, 0x19, 0x18, 0x66, 0x1d, 0x72, 0xa3, 0xe3, 0x94, 0x82, - 0x28, 0x52, 0xa0, 0x06, 0x4e, 0xb1, 0xc8, 0x92, 0x0c, 0x97, 0xbe, 0x15, 0x07, - 0xab, 0x7a, 0xc9, 0xea, 0x08, 0x67, 0x43, 0x4d, 0x51, 0x63, 0x3b, 0x9c, 0x9c, - 0xcd }; -static const BYTE verisignCommercialSoftPubCA[] = { -0x30,0x82,0x02,0x40,0x30,0x82,0x01,0xa9,0x02,0x10,0x03,0xc7,0x8f,0x37,0xdb,0x92, -0x28,0xdf,0x3c,0xbb,0x1a,0xad,0x82,0xfa,0x67,0x10,0x30,0x0d,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x01,0x02,0x05,0x00,0x30,0x61,0x31,0x11,0x30,0x0f,0x06, -0x03,0x55,0x04,0x07,0x13,0x08,0x49,0x6e,0x74,0x65,0x72,0x6e,0x65,0x74,0x31,0x17, -0x30,0x15,0x06,0x03,0x55,0x04,0x0a,0x13,0x0e,0x56,0x65,0x72,0x69,0x53,0x69,0x67, -0x6e,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x33,0x30,0x31,0x06,0x03,0x55,0x04,0x0b, -0x13,0x2a,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x20,0x43,0x6f,0x6d,0x6d,0x65, -0x72,0x63,0x69,0x61,0x6c,0x20,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x20,0x50, -0x75,0x62,0x6c,0x69,0x73,0x68,0x65,0x72,0x73,0x20,0x43,0x41,0x30,0x1e,0x17,0x0d, -0x39,0x36,0x30,0x34,0x30,0x39,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30, -0x34,0x30,0x31,0x30,0x37,0x32,0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x61,0x31,0x11, -0x30,0x0f,0x06,0x03,0x55,0x04,0x07,0x13,0x08,0x49,0x6e,0x74,0x65,0x72,0x6e,0x65, -0x74,0x31,0x17,0x30,0x15,0x06,0x03,0x55,0x04,0x0a,0x13,0x0e,0x56,0x65,0x72,0x69, -0x53,0x69,0x67,0x6e,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x33,0x30,0x31,0x06,0x03, -0x55,0x04,0x0b,0x13,0x2a,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x20,0x43,0x6f, -0x6d,0x6d,0x65,0x72,0x63,0x69,0x61,0x6c,0x20,0x53,0x6f,0x66,0x74,0x77,0x61,0x72, -0x65,0x20,0x50,0x75,0x62,0x6c,0x69,0x73,0x68,0x65,0x72,0x73,0x20,0x43,0x41,0x30, -0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05, -0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xc3,0xd3,0x69,0x65, -0x52,0x01,0x94,0x54,0xab,0x28,0xc6,0x62,0x18,0xb3,0x54,0x55,0xc5,0x44,0x87,0x45, -0x4a,0x3b,0xc2,0x7e,0xd8,0xd3,0xd7,0xc8,0x80,0x86,0x8d,0xd8,0x0c,0xf1,0x16,0x9c, -0xcc,0x6b,0xa9,0x29,0xb2,0x8f,0x76,0x73,0x92,0xc8,0xc5,0x62,0xa6,0x3c,0xed,0x1e, -0x05,0x75,0xf0,0x13,0x00,0x6c,0x14,0x4d,0xd4,0x98,0x90,0x07,0xbe,0x69,0x73,0x81, -0xb8,0x62,0x4e,0x31,0x1e,0xd1,0xfc,0xc9,0x0c,0xeb,0x7d,0x90,0xbf,0xae,0xb4,0x47, -0x51,0xec,0x6f,0xce,0x64,0x35,0x02,0xd6,0x7d,0x67,0x05,0x77,0xe2,0x8f,0xd9,0x51, -0xd7,0xfb,0x97,0x19,0xbc,0x3e,0xd7,0x77,0x81,0xc6,0x43,0xdd,0xf2,0xdd,0xdf,0xca, -0xa3,0x83,0x8b,0xcb,0x41,0xc1,0x3d,0x22,0x48,0x48,0xa6,0x19,0x02,0x03,0x01,0x00, -0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x02,0x05,0x00, -0x03,0x81,0x81,0x00,0xb5,0xbc,0xb0,0x75,0x6a,0x89,0xa2,0x86,0xbd,0x64,0x78,0xc3, -0xa7,0x32,0x75,0x72,0x11,0xaa,0x26,0x02,0x17,0x60,0x30,0x4c,0xe3,0x48,0x34,0x19, -0xb9,0x52,0x4a,0x51,0x18,0x80,0xfe,0x53,0x2d,0x7b,0xd5,0x31,0x8c,0xc5,0x65,0x99, -0x41,0x41,0x2f,0xf2,0xae,0x63,0x7a,0xe8,0x73,0x99,0x15,0x90,0x1a,0x1f,0x7a,0x8b, -0x41,0xd0,0x8e,0x3a,0xd0,0xcd,0x38,0x34,0x44,0xd0,0x75,0xf8,0xea,0x71,0xc4,0x81, -0x19,0x38,0x17,0x35,0x4a,0xae,0xc5,0x3e,0x32,0xe6,0x21,0xb8,0x05,0xc0,0x93,0xe1, -0xc7,0x38,0x5c,0xd8,0xf7,0x93,0x38,0x64,0x90,0xed,0x54,0xce,0xca,0xd3,0xd3,0xd0, -0x5f,0xef,0x04,0x9b,0xde,0x02,0x82,0xdd,0x88,0x29,0xb1,0xc3,0x4f,0xa5,0xcd,0x71, -0x64,0x31,0x3c,0x3c -}; -static const BYTE rootWithKeySignAndCRLSign[] = { -0x30,0x82,0x01,0xdf,0x30,0x82,0x01,0x4c,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x5b,0xc7,0x0b,0x27,0x99,0xbb,0x2e,0x99,0x47,0x9d,0x45,0x4e,0x7c,0x1a,0xca, -0xe8,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31, -0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31, -0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35, -0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05, -0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82, -0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34, -0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7, -0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91, -0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5, -0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd, -0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c, -0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35, -0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01, -0x00,0x01,0xa3,0x42,0x30,0x40,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01, -0xff,0x04,0x04,0x03,0x02,0x00,0x06,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01, -0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x1d,0x06,0x03,0x55,0x1d, -0x0e,0x04,0x16,0x04,0x14,0x14,0x8c,0x16,0xbb,0xbe,0x70,0xa2,0x28,0x89,0xa0, -0x58,0xff,0x98,0xbd,0xa8,0x24,0x2b,0x8a,0xe9,0x9a,0x30,0x09,0x06,0x05,0x2b, -0x0e,0x03,0x02,0x1d,0x05,0x00,0x03,0x81,0x81,0x00,0x74,0xcb,0x21,0xfd,0x2d, -0x25,0xdc,0xa5,0xaa,0xa1,0x26,0xdc,0x8b,0x40,0x11,0x64,0xae,0x5c,0x71,0x3c, -0x28,0xbc,0xf9,0xb3,0xcb,0xa5,0x94,0xb2,0x8d,0x4c,0x23,0x2b,0x9b,0xde,0x2c, -0x4c,0x30,0x04,0xc6,0x88,0x10,0x2f,0x53,0xfd,0x6c,0x82,0xf1,0x13,0xfb,0xda, -0x27,0x75,0x25,0x48,0xe4,0x72,0x09,0x2a,0xee,0xb4,0x1e,0xc9,0x55,0xf5,0xf7, -0x82,0x91,0xd8,0x4b,0xe4,0x3a,0xfe,0x97,0x87,0xdf,0xfb,0x15,0x5a,0x12,0x3e, -0x12,0xe6,0xad,0x40,0x0b,0xcf,0xee,0x1a,0x44,0xe0,0x83,0xb2,0x67,0x94,0xd4, -0x2e,0x7c,0xf2,0x06,0x9d,0xb3,0x3b,0x7e,0x2f,0xda,0x25,0x66,0x7e,0xa7,0x1f, -0x45,0xd4,0xf5,0xe3,0xdf,0x2a,0xf1,0x18,0x28,0x20,0xb5,0xf8,0xf5,0x8d,0x7a, -0x2e,0x84,0xee }; -static const BYTE eeCert[] = { -0x30,0x82,0x01,0x93,0x30,0x81,0xfd,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,0x01, -0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00, -0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65, -0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30,0x30, -0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30,0x30, -0x30,0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04, -0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09, -0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00, -0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,0x33, -0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,0xdc, -0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,0x48, -0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,0x47, -0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,0x05, -0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,0x6a, -0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,0x85, -0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,0xd3, -0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,0xa3, -0x02,0x03,0x01,0x00,0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x22,0xf1,0x66,0x00,0x79,0xd2, -0xe6,0xb2,0xb2,0xf7,0x2f,0x98,0x92,0x7d,0x73,0xc3,0x6c,0x5c,0x77,0x20,0xe3, -0xbf,0x3e,0xe0,0xb3,0x5c,0x68,0xb4,0x9b,0x3a,0x41,0xae,0x94,0xa0,0x80,0x3a, -0xfe,0x5d,0x7a,0x56,0x87,0x85,0x44,0x45,0xcf,0xa6,0xd3,0x10,0xe7,0x73,0x41, -0xf2,0x7f,0x88,0x85,0x91,0x8e,0xe6,0xec,0xe2,0xce,0x08,0xbc,0xa5,0x76,0xe5, -0x4d,0x1d,0xb7,0x70,0x31,0xdd,0xc9,0x9a,0x15,0x32,0x11,0x5a,0x4e,0x62,0xc8, -0xd1,0xf8,0xec,0x46,0x39,0x5b,0xe7,0x67,0x1f,0x58,0xe8,0xa1,0xa0,0x5b,0xf7, -0x8a,0x6d,0x5f,0x91,0x18,0xd4,0x90,0x85,0xff,0x30,0xc7,0xca,0x9c,0xc6,0x92, -0xb0,0xca,0x16,0xc4,0xa4,0xc0,0xd6,0xe8,0xff,0x15,0x19,0xd1,0x30,0x61,0xf3, -0xef,0x9f }; -static const BYTE rootSignedCRL[] = { -0x30,0x82,0x01,0x1d,0x30,0x81,0x87,0x02,0x01,0x01,0x30,0x0d,0x06,0x09,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x30,0x10,0x31,0x0e,0x30, -0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31,0x17,0x0d, -0x30,0x37,0x30,0x39,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d, -0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x14, -0x30,0x12,0x02,0x01,0x01,0x17,0x0d,0x30,0x37,0x30,0x39,0x30,0x31,0x30,0x30, -0x30,0x30,0x30,0x30,0x5a,0xa0,0x2d,0x30,0x2b,0x30,0x0a,0x06,0x03,0x55,0x1d, -0x14,0x04,0x03,0x02,0x01,0x01,0x30,0x1d,0x06,0x03,0x55,0x1d,0x23,0x04,0x16, -0x04,0x14,0x14,0x8c,0x16,0xbb,0xbe,0x70,0xa2,0x28,0x89,0xa0,0x58,0xff,0x98, -0xbd,0xa8,0x24,0x2b,0x8a,0xe9,0x9a,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86, -0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x9b,0x2b,0x99,0x0d, -0x16,0x83,0x93,0x54,0x29,0x3a,0xa6,0x53,0x5d,0xf8,0xa6,0x73,0x9f,0x2a,0x45, -0x39,0x91,0xff,0x91,0x1c,0x27,0x06,0xe8,0xdb,0x72,0x3f,0x66,0x89,0x15,0x68, -0x55,0xd5,0x49,0x63,0xa6,0x00,0xe9,0x66,0x9c,0x97,0xf9,0xb3,0xb3,0x2b,0x1b, -0xc7,0x79,0x46,0xa8,0xd8,0x2b,0x78,0x27,0xa0,0x70,0x02,0x81,0xc6,0x40,0xb3, -0x76,0x32,0x65,0x4c,0xf8,0xff,0x1d,0x41,0x6e,0x16,0x09,0xa2,0x8a,0x7b,0x0c, -0xd0,0xa6,0x9b,0x61,0xa3,0x7c,0x02,0x91,0x79,0xdf,0x6a,0x5e,0x88,0x95,0x66, -0x33,0x17,0xcb,0x5a,0xd2,0xdc,0x89,0x05,0x62,0x97,0x60,0x73,0x7b,0x2c,0x1a, -0x90,0x20,0x73,0x24,0x9f,0x45,0x22,0x4b,0xc1,0x33,0xd1,0xda,0xd8,0x7e,0x1b, -0x3d,0x74,0xd6,0x3b }; - -static void testFindCRL(void) -{ - HCERTSTORE store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - PCCRL_CONTEXT context; - PCCERT_CONTEXT cert, endCert, rootCert; - CRL_FIND_ISSUED_FOR_PARA issuedForPara = { NULL, NULL }; - DWORD count, revoked_count; - BOOL ret; - - if (!store) return; - if (!pCertFindCRLInStore) - { - win_skip("CertFindCRLInStore() is not available\n"); - return; - } - - ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, signedCRL, - sizeof(signedCRL), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError()); - - /* Crashes - context = pCertFindCRLInStore(NULL, 0, 0, 0, NULL, NULL); - */ - - /* Find any context */ - context = pCertFindCRLInStore(store, 0, 0, CRL_FIND_ANY, NULL, NULL); - ok(context != NULL, "Expected a context\n"); - if (context) - CertFreeCRLContext(context); - /* Bogus flags are ignored */ - context = pCertFindCRLInStore(store, 0, 1234, CRL_FIND_ANY, NULL, NULL); - ok(context != NULL, "Expected a context\n"); - if (context) - CertFreeCRLContext(context); - /* CRL encoding type is ignored too */ - context = pCertFindCRLInStore(store, 1234, 0, CRL_FIND_ANY, NULL, NULL); - ok(context != NULL, "Expected a context\n"); - if (context) - CertFreeCRLContext(context); - - /* This appears to match any cert */ - context = pCertFindCRLInStore(store, 0, 0, CRL_FIND_ISSUED_BY, NULL, NULL); - ok(context != NULL, "Expected a context\n"); - if (context) - CertFreeCRLContext(context); - - /* Try to match an issuer that isn't in the store */ - cert = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert2, - sizeof(bigCert2)); - ok(cert != NULL, "CertCreateCertificateContext failed: %08x\n", - GetLastError()); - context = pCertFindCRLInStore(store, 0, 0, CRL_FIND_ISSUED_BY, cert, NULL); - ok(context == NULL, "Expected no matching context\n"); - CertFreeCertificateContext(cert); - - /* Match an issuer that is in the store */ - cert = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, - sizeof(bigCert)); - ok(cert != NULL, "CertCreateCertificateContext failed: %08x\n", - GetLastError()); - context = pCertFindCRLInStore(store, 0, 0, CRL_FIND_ISSUED_BY, cert, NULL); - ok(context != NULL, "Expected a context\n"); - if (context) - CertFreeCRLContext(context); - - /* Try various find flags */ - context = pCertFindCRLInStore(store, 0, CRL_FIND_ISSUED_BY_SIGNATURE_FLAG, - CRL_FIND_ISSUED_BY, cert, NULL); - ok(!context || broken(context != NULL /* Win9x */), "unexpected context\n"); - /* The CRL doesn't have an AKI extension, so it matches any cert */ - context = pCertFindCRLInStore(store, 0, CRL_FIND_ISSUED_BY_AKI_FLAG, - CRL_FIND_ISSUED_BY, cert, NULL); - ok(context != NULL, "Expected a context\n"); - if (context) - CertFreeCRLContext(context); - - if (0) - { - /* Crash or return NULL/STATUS_ACCESS_VIOLATION */ - context = pCertFindCRLInStore(store, 0, 0, CRL_FIND_ISSUED_FOR, NULL, - NULL); - context = pCertFindCRLInStore(store, 0, 0, CRL_FIND_ISSUED_FOR, - &issuedForPara, NULL); - } - /* Test whether the cert matches the CRL in the store */ - issuedForPara.pSubjectCert = cert; - issuedForPara.pIssuerCert = cert; - context = pCertFindCRLInStore(store, 0, 0, CRL_FIND_ISSUED_FOR, - &issuedForPara, NULL); - ok(context != NULL || broken(!context /* Win9x, NT4 */), - "Expected a context\n"); - if (context) - { - ok(context->cbCrlEncoded == sizeof(signedCRL), - "unexpected CRL size %d\n", context->cbCrlEncoded); - ok(!memcmp(context->pbCrlEncoded, signedCRL, context->cbCrlEncoded), - "unexpected CRL data\n"); - CertFreeCRLContext(context); - } - - ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, - v1CRLWithIssuerAndEntry, sizeof(v1CRLWithIssuerAndEntry), - CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError()); - ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, - v2CRLWithIssuingDistPoint, sizeof(v2CRLWithIssuingDistPoint), - CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError()); - ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, - verisignCRL, sizeof(verisignCRL), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError()); - issuedForPara.pSubjectCert = cert; - issuedForPara.pIssuerCert = cert; - context = NULL; - count = revoked_count = 0; - do { - context = pCertFindCRLInStore(store, 0, 0, CRL_FIND_ISSUED_FOR, - &issuedForPara, context); - if (context) - { - PCRL_ENTRY entry; - - count++; - if (CertFindCertificateInCRL(cert, context, 0, NULL, &entry) && - entry) - revoked_count++; - } - } while (context); - /* signedCRL, v1CRLWithIssuerAndEntry, and v2CRLWithIssuingDistPoint all - * match cert's issuer, but verisignCRL does not, so the expected count - * is 0. - */ - ok(count == 3 || broken(count == 0 /* NT4, Win9x */), - "expected 3 matching CRLs, got %d\n", count); - /* Only v1CRLWithIssuerAndEntry and v2CRLWithIssuingDistPoint contain - * entries, so the count of CRL entries that match cert is 2. - */ - ok(revoked_count == 2 || broken(revoked_count == 0 /* NT4, Win9x */), - "expected 2 matching CRL entries, got %d\n", revoked_count); - - CertFreeCertificateContext(cert); - - /* Try again with a cert that doesn't match any CRLs in the store */ - cert = CertCreateCertificateContext(X509_ASN_ENCODING, - bigCertWithDifferentIssuer, sizeof(bigCertWithDifferentIssuer)); - ok(cert != NULL, "CertCreateCertificateContext failed: %08x\n", - GetLastError()); - issuedForPara.pSubjectCert = cert; - issuedForPara.pIssuerCert = cert; - context = NULL; - count = revoked_count = 0; - do { - context = pCertFindCRLInStore(store, 0, 0, CRL_FIND_ISSUED_FOR, - &issuedForPara, context); - if (context) - { - PCRL_ENTRY entry; - - count++; - if (CertFindCertificateInCRL(cert, context, 0, NULL, &entry) && - entry) - revoked_count++; - } - } while (context); - ok(count == 0, "expected 0 matching CRLs, got %d\n", count); - ok(revoked_count == 0, "expected 0 matching CRL entries, got %d\n", - revoked_count); - CertFreeCertificateContext(cert); - - /* Test again with a real certificate and CRL. The certificate wasn't - * revoked, but its issuer does have a CRL. - */ - cert = CertCreateCertificateContext(X509_ASN_ENCODING, - verisignCommercialSoftPubCA, sizeof(verisignCommercialSoftPubCA)); - ok(cert != NULL, "CertCreateCertificateContext failed: %08x\n", - GetLastError()); - issuedForPara.pIssuerCert = cert; - issuedForPara.pSubjectCert = cert; - context = NULL; - count = revoked_count = 0; - do { - context = pCertFindCRLInStore(store, 0, 0, CRL_FIND_ISSUED_FOR, - &issuedForPara, context); - if (context) - { - PCRL_ENTRY entry; - - count++; - if (CertFindCertificateInCRL(cert, context, 0, NULL, &entry) && - entry) - revoked_count++; - } - } while (context); - ok(count == 1 || broken(count == 0 /* Win9x, NT4 */), - "expected 1 matching CRLs, got %d\n", count); - ok(revoked_count == 0, "expected 0 matching CRL entries, got %d\n", - revoked_count); - CertFreeCertificateContext(cert); - - CertCloseStore(store, 0); - - /* This test uses a synthesized chain (rootWithKeySignAndCRLSign -> - * eeCert) whose end certificate is in the CRL. - */ - store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - /* Add a CRL for the end certificate */ - CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, - rootSignedCRL, sizeof(rootSignedCRL), CERT_STORE_ADD_ALWAYS, NULL); - /* Add another CRL unrelated to the tested chain */ - CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, - verisignCRL, sizeof(verisignCRL), CERT_STORE_ADD_ALWAYS, NULL); - endCert = CertCreateCertificateContext(X509_ASN_ENCODING, - eeCert, sizeof(eeCert)); - rootCert = CertCreateCertificateContext(X509_ASN_ENCODING, - rootWithKeySignAndCRLSign, sizeof(rootWithKeySignAndCRLSign)); - issuedForPara.pSubjectCert = endCert; - issuedForPara.pIssuerCert = rootCert; - context = NULL; - count = revoked_count = 0; - do { - context = pCertFindCRLInStore(store, 0, 0, CRL_FIND_ISSUED_FOR, - &issuedForPara, context); - if (context) - { - PCRL_ENTRY entry; - - count++; - if (CertFindCertificateInCRL(endCert, context, 0, NULL, &entry) && - entry) - revoked_count++; - } - } while (context); - ok(count == 1 || broken(count == 0 /* Win9x, NT4 */), - "expected 1 matching CRLs, got %d\n", count); - ok(revoked_count == 1 || broken(revoked_count == 0 /* Win9x, NT4 */), - "expected 1 matching CRL entries, got %d\n", revoked_count); - - /* Test CRL_FIND_ISSUED_BY flags */ - count = revoked_count = 0; - do { - context = pCertFindCRLInStore(store, 0, 0, CRL_FIND_ISSUED_BY, - endCert, context); - if (context) - { - PCRL_ENTRY entry; - - count++; - if (CertFindCertificateInCRL(endCert, context, 0, NULL, &entry) && - entry) - revoked_count++; - } - } while (context); - ok(count == 0, "expected 0 matching CRLs, got %d\n", count); - ok(revoked_count == 0, "expected 0 matching CRL entries, got %d\n", - revoked_count); - count = revoked_count = 0; - do { - context = pCertFindCRLInStore(store, 0, 0, CRL_FIND_ISSUED_BY, - rootCert, context); - if (context) - { - PCRL_ENTRY entry; - - count++; - if (CertFindCertificateInCRL(endCert, context, 0, NULL, &entry) && - entry) - revoked_count++; - } - } while (context); - ok(count == 1, "expected 1 matching CRLs, got %d\n", count); - ok(revoked_count == 1, "expected 1 matching CRL entries, got %d\n", - revoked_count); - count = revoked_count = 0; - do { - context = pCertFindCRLInStore(store, 0, CRL_FIND_ISSUED_BY_AKI_FLAG, - CRL_FIND_ISSUED_BY, endCert, context); - if (context) - { - PCRL_ENTRY entry; - - count++; - if (CertFindCertificateInCRL(endCert, context, 0, NULL, &entry) && - entry) - revoked_count++; - } - } while (context); - ok(count == 0, "expected 0 matching CRLs, got %d\n", count); - ok(revoked_count == 0, "expected 0 matching CRL entries, got %d\n", - revoked_count); - count = revoked_count = 0; - do { - context = pCertFindCRLInStore(store, 0, CRL_FIND_ISSUED_BY_AKI_FLAG, - CRL_FIND_ISSUED_BY, rootCert, context); - if (context) - { - PCRL_ENTRY entry; - - count++; - if (CertFindCertificateInCRL(rootCert, context, 0, NULL, &entry) && - entry) - revoked_count++; - } - } while (context); - ok(count == 0 || broken(count == 1 /* Win9x */), - "expected 0 matching CRLs, got %d\n", count); - ok(revoked_count == 0, "expected 0 matching CRL entries, got %d\n", - revoked_count); - count = revoked_count = 0; - do { - context = pCertFindCRLInStore(store, 0, - CRL_FIND_ISSUED_BY_SIGNATURE_FLAG, CRL_FIND_ISSUED_BY, endCert, - context); - if (context) - { - PCRL_ENTRY entry; - - count++; - if (CertFindCertificateInCRL(endCert, context, 0, NULL, &entry) && - entry) - revoked_count++; - } - } while (context); - ok(count == 0, "expected 0 matching CRLs, got %d\n", count); - ok(revoked_count == 0, "expected 0 matching CRL entries, got %d\n", - revoked_count); - count = revoked_count = 0; - do { - context = pCertFindCRLInStore(store, 0, - CRL_FIND_ISSUED_BY_SIGNATURE_FLAG, CRL_FIND_ISSUED_BY, rootCert, - context); - if (context) - { - PCRL_ENTRY entry; - - count++; - if (CertFindCertificateInCRL(endCert, context, 0, NULL, &entry) && - entry) - revoked_count++; - } - } while (context); - ok(count == 1, "expected 1 matching CRLs, got %d\n", count); - ok(revoked_count == 1, "expected 1 matching CRL entries, got %d\n", - revoked_count); - CertFreeCertificateContext(rootCert); - CertFreeCertificateContext(endCert); - - CertCloseStore(store, 0); -} - -static void testGetCRLFromStore(void) -{ - HCERTSTORE store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - PCCRL_CONTEXT context; - PCCERT_CONTEXT cert; - DWORD flags; - BOOL ret; - - if (!store) return; - - /* Crash - context = CertGetCRLFromStore(NULL, NULL, NULL, NULL); - context = CertGetCRLFromStore(store, NULL, NULL, NULL); - */ - - /* Bogus flags */ - flags = 0xffffffff; - context = CertGetCRLFromStore(store, NULL, NULL, &flags); - ok(!context && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - - /* Test an empty store */ - flags = 0; - context = CertGetCRLFromStore(store, NULL, NULL, &flags); - ok(context == NULL && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - - ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, signedCRL, - sizeof(signedCRL), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError()); - - /* NULL matches any CRL */ - flags = 0; - context = CertGetCRLFromStore(store, NULL, NULL, &flags); - ok(context != NULL, "Expected a context\n"); - CertFreeCRLContext(context); - - /* This cert's issuer isn't in */ - cert = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert2, - sizeof(bigCert2)); - ok(cert != NULL, "CertCreateCertificateContext failed: %08x\n", - GetLastError()); - context = CertGetCRLFromStore(store, cert, NULL, &flags); - ok(context == NULL && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - CertFreeCertificateContext(cert); - - /* But this one is */ - cert = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, - sizeof(bigCert)); - ok(cert != NULL, "CertCreateCertificateContext failed: %08x\n", - GetLastError()); - context = CertGetCRLFromStore(store, cert, NULL, &flags); - ok(context != NULL, "Expected a context\n"); - CertFreeCRLContext(context); - CertFreeCertificateContext(cert); - - CertCloseStore(store, 0); -} - -static void checkCRLHash(const BYTE *data, DWORD dataLen, ALG_ID algID, - PCCRL_CONTEXT context, DWORD propID) -{ - BYTE hash[20] = { 0 }, hashProperty[20]; - BOOL ret; - DWORD size; - - memset(hash, 0, sizeof(hash)); - memset(hashProperty, 0, sizeof(hashProperty)); - size = sizeof(hash); - ret = CryptHashCertificate(0, algID, 0, data, dataLen, hash, &size); - ok(ret, "CryptHashCertificate failed: %08x\n", GetLastError()); - ret = CertGetCRLContextProperty(context, propID, hashProperty, &size); - ok(ret, "CertGetCRLContextProperty failed: %08x\n", GetLastError()); - ok(!memcmp(hash, hashProperty, size), "Unexpected hash for property %d\n", - propID); -} - -static void testCRLProperties(void) -{ - PCCRL_CONTEXT context = CertCreateCRLContext(X509_ASN_ENCODING, - CRL, sizeof(CRL)); - - ok(context != NULL, "CertCreateCRLContext failed: %08x\n", GetLastError()); - if (context) - { - DWORD propID, numProps, access, size; - BOOL ret; - BYTE hash[20] = { 0 }, hashProperty[20]; - CRYPT_DATA_BLOB blob; - - /* This crashes - propID = CertEnumCRLContextProperties(NULL, 0); - */ - - propID = 0; - numProps = 0; - do { - propID = CertEnumCRLContextProperties(context, propID); - if (propID) - numProps++; - } while (propID != 0); - ok(numProps == 0, "Expected 0 properties, got %d\n", numProps); - - /* Tests with a NULL cert context. Prop ID 0 fails.. */ - ret = CertSetCRLContextProperty(NULL, 0, 0, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* while this just crashes. - ret = CertSetCRLContextProperty(NULL, CERT_KEY_PROV_HANDLE_PROP_ID, 0, - NULL); - */ - - ret = CertSetCRLContextProperty(context, 0, 0, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* Can't set the cert property directly, this crashes. - ret = CertSetCRLContextProperty(context, CERT_CRL_PROP_ID, 0, CRL); - */ - - /* These all crash. - ret = CertGetCRLContextProperty(context, CERT_ACCESS_STATE_PROP_ID, 0, - NULL); - ret = CertGetCRLContextProperty(context, CERT_HASH_PROP_ID, NULL, NULL); - ret = CertGetCRLContextProperty(context, CERT_HASH_PROP_ID, - hashProperty, NULL); - */ - /* A missing prop */ - size = 0; - ret = CertGetCRLContextProperty(context, CERT_KEY_PROV_INFO_PROP_ID, - NULL, &size); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - /* And, an implicit property */ - ret = CertGetCRLContextProperty(context, CERT_ACCESS_STATE_PROP_ID, - NULL, &size); - ok(ret, "CertGetCRLContextProperty failed: %08x\n", GetLastError()); - ret = CertGetCRLContextProperty(context, CERT_ACCESS_STATE_PROP_ID, - &access, &size); - ok(ret, "CertGetCRLContextProperty failed: %08x\n", GetLastError()); - ok(!(access & CERT_ACCESS_STATE_WRITE_PERSIST_FLAG), - "Didn't expect a persisted crl\n"); - /* Trying to set this "read only" property crashes. - access |= CERT_ACCESS_STATE_WRITE_PERSIST_FLAG; - ret = CertSetCRLContextProperty(context, CERT_ACCESS_STATE_PROP_ID, 0, - &access); - */ - - /* Can I set the hash to an invalid hash? */ - blob.pbData = hash; - blob.cbData = sizeof(hash); - ret = CertSetCRLContextProperty(context, CERT_HASH_PROP_ID, 0, &blob); - ok(ret, "CertSetCRLContextProperty failed: %08x\n", - GetLastError()); - size = sizeof(hashProperty); - ret = CertGetCRLContextProperty(context, CERT_HASH_PROP_ID, - hashProperty, &size); - ok(!memcmp(hashProperty, hash, sizeof(hash)), "Unexpected hash\n"); - /* Delete the (bogus) hash, and get the real one */ - ret = CertSetCRLContextProperty(context, CERT_HASH_PROP_ID, 0, NULL); - ok(ret, "CertSetCRLContextProperty failed: %08x\n", GetLastError()); - checkCRLHash(CRL, sizeof(CRL), CALG_SHA1, context, CERT_HASH_PROP_ID); - - /* Now that the hash property is set, we should get one property when - * enumerating. - */ - propID = 0; - numProps = 0; - do { - propID = CertEnumCRLContextProperties(context, propID); - if (propID) - numProps++; - } while (propID != 0); - ok(numProps == 1, "Expected 1 properties, got %d\n", numProps); - - /* Check a few other implicit properties */ - checkCRLHash(CRL, sizeof(CRL), CALG_MD5, context, - CERT_MD5_HASH_PROP_ID); - - CertFreeCRLContext(context); - } -} - -static const BYTE bigCertWithCRLDistPoints[] = { -0x30,0x81,0xa5,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30, -0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61, -0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31, -0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31, -0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11, -0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x00,0x30,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x01,0x01,0x05,0x00,0x03,0x11,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07, -0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0xa3,0x26,0x30,0x24,0x30,0x22,0x06, -0x03,0x55,0x1d,0x1f,0x04,0x1b,0x30,0x19,0x30,0x17,0xa0,0x15,0xa0,0x13,0x86, -0x11,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x69,0x6e,0x65,0x68,0x71,0x2e, -0x6f,0x72,0x67 }; - -static void testIsValidCRLForCert(void) -{ - BOOL ret; - PCCERT_CONTEXT cert1, cert2, cert3; - PCCRL_CONTEXT crl; - HCERTSTORE store; - - if(!pCertIsValidCRLForCertificate) return; - - crl = CertCreateCRLContext(X509_ASN_ENCODING, v1CRLWithIssuerAndEntry, - sizeof(v1CRLWithIssuerAndEntry)); - ok(crl != NULL, "CertCreateCRLContext failed: %08x\n", GetLastError()); - cert1 = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, - sizeof(bigCert)); - ok(cert1 != NULL, "CertCreateCertificateContext failed: %08x\n", - GetLastError()); - - /* Crash - ret = CertIsValidCRLForCertificate(NULL, NULL, 0, NULL); - ret = CertIsValidCRLForCertificate(cert1, NULL, 0, NULL); - */ - - /* Curiously, any CRL is valid for the NULL certificate */ - ret = pCertIsValidCRLForCertificate(NULL, crl, 0, NULL); - ok(ret, "CertIsValidCRLForCertificate failed: %08x\n", GetLastError()); - - /* Same issuer for both cert and CRL, this CRL is valid for that cert */ - ret = pCertIsValidCRLForCertificate(cert1, crl, 0, NULL); - ok(ret, "CertIsValidCRLForCertificate failed: %08x\n", GetLastError()); - - cert2 = CertCreateCertificateContext(X509_ASN_ENCODING, - bigCertWithDifferentIssuer, sizeof(bigCertWithDifferentIssuer)); - ok(cert2 != NULL, "CertCreateCertificateContext failed: %08x\n", - GetLastError()); - - /* Yet more curious: different issuers for these, yet the CRL is valid for - * that cert. According to MSDN, the relevant bit to check is whether the - * CRL has a CRL_ISSUING_DIST_POINT extension. - */ - ret = pCertIsValidCRLForCertificate(cert2, crl, 0, NULL); - ok(ret, "CertIsValidCRLForCertificate failed: %08x\n", GetLastError()); - - CertFreeCRLContext(crl); - - /* With a CRL_ISSUING_DIST_POINT in the CRL, it returns FALSE, since the - * cert doesn't have the same extension in it. - */ - crl = CertCreateCRLContext(X509_ASN_ENCODING, v2CRLWithIssuingDistPoint, - sizeof(v2CRLWithIssuingDistPoint)); - ok(crl != NULL, "CertCreateCRLContext failed: %08x\n", GetLastError()); - - ret = pCertIsValidCRLForCertificate(cert1, crl, 0, NULL); - ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); - ret = pCertIsValidCRLForCertificate(cert2, crl, 0, NULL); - ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); - - /* With a CRL_ISSUING_DIST_POINT in the CRL, it matches the cert containing - * a CRL_DIST_POINTS_INFO extension. - */ - cert3 = CertCreateCertificateContext(X509_ASN_ENCODING, - bigCertWithCRLDistPoints, sizeof(bigCertWithCRLDistPoints)); - ok(cert3 != NULL, "CertCreateCertificateContext failed: %08x\n", - GetLastError()); - ret = pCertIsValidCRLForCertificate(cert3, crl, 0, NULL); - ok(ret, "CertIsValidCRLForCertificate failed: %08x\n", GetLastError()); - - CertFreeCRLContext(crl); - - /* And again, with a real CRL, the CRL is valid for all three certs. */ - crl = CertCreateCRLContext(X509_ASN_ENCODING, verisignCRL, - sizeof(verisignCRL)); - ok(crl != NULL, "CertCreateCRLContext failed: %08x\n", GetLastError()); - - ret = pCertIsValidCRLForCertificate(cert1, crl, 0, NULL); - ok(ret, "CertIsValidCRLForCertificate failed: %08x\n", GetLastError()); - ret = pCertIsValidCRLForCertificate(cert2, crl, 0, NULL); - ok(ret, "CertIsValidCRLForCertificate failed: %08x\n", GetLastError()); - ret = pCertIsValidCRLForCertificate(cert3, crl, 0, NULL); - ok(ret, "CertIsValidCRLForCertificate failed: %08x\n", GetLastError()); - - CertFreeCRLContext(crl); - - /* One last test: a CRL in a different store than the cert is also valid - * for the cert. - */ - store = CertOpenStore(CERT_STORE_PROV_MEMORY, X509_ASN_ENCODING, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - - ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, verisignCRL, - sizeof(verisignCRL), CERT_STORE_ADD_ALWAYS, &crl); - ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError()); - - ret = pCertIsValidCRLForCertificate(cert1, crl, 0, NULL); - ok(ret, "CertIsValidCRLForCertificate failed: %08x\n", GetLastError()); - ret = pCertIsValidCRLForCertificate(cert2, crl, 0, NULL); - ok(ret, "CertIsValidCRLForCertificate failed: %08x\n", GetLastError()); - ret = pCertIsValidCRLForCertificate(cert3, crl, 0, NULL); - ok(ret, "CertIsValidCRLForCertificate failed: %08x\n", GetLastError()); - - CertFreeCRLContext(crl); - - CertCloseStore(store, 0); - - CertFreeCertificateContext(cert3); - CertFreeCertificateContext(cert2); - CertFreeCertificateContext(cert1); -} - -static const BYTE crlWithDifferentIssuer[] = { - 0x30,0x47,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30,0x11, - 0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x41,0x6c,0x65,0x78,0x20,0x4c,0x61,0x6e, - 0x67,0x00,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30, - 0x30,0x30,0x30,0x5a,0x30,0x16,0x30,0x14,0x02,0x01,0x01,0x18,0x0f,0x31,0x36, - 0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a }; - -static void testFindCertInCRL(void) -{ - BOOL ret; - PCCERT_CONTEXT cert; - PCCRL_CONTEXT crl; - PCRL_ENTRY entry; - - if (!pCertFindCertificateInCRL) - { - win_skip("CertFindCertificateInCRL() is not available\n"); - return; - } - - cert = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, - sizeof(bigCert)); - ok(cert != NULL, "CertCreateCertificateContext failed: %08x\n", - GetLastError()); - - /* Crash - ret = pCertFindCertificateInCRL(NULL, NULL, 0, NULL, NULL); - ret = pCertFindCertificateInCRL(NULL, crl, 0, NULL, NULL); - ret = pCertFindCertificateInCRL(cert, NULL, 0, NULL, NULL); - ret = pCertFindCertificateInCRL(cert, crl, 0, NULL, NULL); - ret = pCertFindCertificateInCRL(NULL, NULL, 0, NULL, &entry); - ret = pCertFindCertificateInCRL(NULL, crl, 0, NULL, &entry); - ret = pCertFindCertificateInCRL(cert, NULL, 0, NULL, &entry); - */ - - crl = CertCreateCRLContext(X509_ASN_ENCODING, verisignCRL, - sizeof(verisignCRL)); - ret = pCertFindCertificateInCRL(cert, crl, 0, NULL, &entry); - ok(ret, "CertFindCertificateInCRL failed: %08x\n", GetLastError()); - ok(entry == NULL, "Expected not to find an entry in CRL\n"); - CertFreeCRLContext(crl); - - crl = CertCreateCRLContext(X509_ASN_ENCODING, v1CRLWithIssuerAndEntry, - sizeof(v1CRLWithIssuerAndEntry)); - ret = pCertFindCertificateInCRL(cert, crl, 0, NULL, &entry); - ok(ret, "CertFindCertificateInCRL failed: %08x\n", GetLastError()); - ok(entry != NULL, "Expected to find an entry in CRL\n"); - CertFreeCRLContext(crl); - - /* Entry found even though CRL issuer doesn't match cert issuer */ - crl = CertCreateCRLContext(X509_ASN_ENCODING, crlWithDifferentIssuer, - sizeof(crlWithDifferentIssuer)); - ret = pCertFindCertificateInCRL(cert, crl, 0, NULL, &entry); - ok(ret, "CertFindCertificateInCRL failed: %08x\n", GetLastError()); - ok(entry != NULL, "Expected to find an entry in CRL\n"); - CertFreeCRLContext(crl); - - CertFreeCertificateContext(cert); -} - -static void testVerifyCRLRevocation(void) -{ - BOOL ret; - PCCERT_CONTEXT cert; - PCCRL_CONTEXT crl; - - ret = CertVerifyCRLRevocation(0, NULL, 0, NULL); - ok(ret, "CertVerifyCRLRevocation failed: %08x\n", GetLastError()); - ret = CertVerifyCRLRevocation(X509_ASN_ENCODING, NULL, 0, NULL); - ok(ret, "CertVerifyCRLRevocation failed: %08x\n", GetLastError()); - - cert = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, - sizeof(bigCert)); - - /* Check against no CRL */ - ret = CertVerifyCRLRevocation(0, cert->pCertInfo, 0, NULL); - ok(ret, "CertVerifyCRLRevocation failed: %08x\n", GetLastError()); - ret = CertVerifyCRLRevocation(X509_ASN_ENCODING, cert->pCertInfo, 0, NULL); - ok(ret, "CertVerifyCRLRevocation failed: %08x\n", GetLastError()); - - /* Check against CRL with entry for the cert */ - crl = CertCreateCRLContext(X509_ASN_ENCODING, v1CRLWithIssuerAndEntry, - sizeof(v1CRLWithIssuerAndEntry)); - ret = CertVerifyCRLRevocation(0, cert->pCertInfo, 1, - (PCRL_INFO *)&crl->pCrlInfo); - ok(!ret, "CertVerifyCRLRevocation should have been revoked\n"); - ret = CertVerifyCRLRevocation(X509_ASN_ENCODING, cert->pCertInfo, 1, - (PCRL_INFO *)&crl->pCrlInfo); - ok(!ret, "CertVerifyCRLRevocation should have been revoked\n"); - CertFreeCRLContext(crl); - - /* Check against CRL with different issuer and entry for the cert */ - crl = CertCreateCRLContext(X509_ASN_ENCODING, crlWithDifferentIssuer, - sizeof(crlWithDifferentIssuer)); - ok(crl != NULL, "CertCreateCRLContext failed: %08x\n", GetLastError()); - ret = CertVerifyCRLRevocation(X509_ASN_ENCODING, cert->pCertInfo, 1, - (PCRL_INFO *)&crl->pCrlInfo); - ok(!ret, "CertVerifyCRLRevocation should have been revoked\n"); - CertFreeCRLContext(crl); - - /* Check against CRL without entry for the cert */ - crl = CertCreateCRLContext(X509_ASN_ENCODING, verisignCRL, - sizeof(verisignCRL)); - ret = CertVerifyCRLRevocation(0, cert->pCertInfo, 1, - (PCRL_INFO *)&crl->pCrlInfo); - ok(ret, "CertVerifyCRLRevocation failed: %08x\n", GetLastError()); - ret = CertVerifyCRLRevocation(X509_ASN_ENCODING, cert->pCertInfo, 1, - (PCRL_INFO *)&crl->pCrlInfo); - ok(ret, "CertVerifyCRLRevocation failed: %08x\n", GetLastError()); - CertFreeCRLContext(crl); - - CertFreeCertificateContext(cert); -} - -START_TEST(crl) -{ - init_function_pointers(); - - testCreateCRL(); - testDupCRL(); - testAddCRL(); - testFindCRL(); - testGetCRLFromStore(); - - testCRLProperties(); - - testIsValidCRLForCert(); - testFindCertInCRL(); - testVerifyCRLRevocation(); -} diff --git a/rostests/winetests/crypt32/crypt32.rbuild b/rostests/winetests/crypt32/crypt32.rbuild deleted file mode 100644 index 91374248284..00000000000 --- a/rostests/winetests/crypt32/crypt32.rbuild +++ /dev/null @@ -1,28 +0,0 @@ - - - - - . - - base64.c - cert.c - chain.c - crl.c - ctl.c - encode.c - main.c - message.c - msg.c - object.c - oid.c - protectdata.c - sip.c - store.c - str.c - testlist.c - wine - crypt32 - advapi32 - ntdll - - diff --git a/rostests/winetests/crypt32/ctl.c b/rostests/winetests/crypt32/ctl.c deleted file mode 100644 index 8ee26526289..00000000000 --- a/rostests/winetests/crypt32/ctl.c +++ /dev/null @@ -1,465 +0,0 @@ -/* - * crypt32 CTL functions tests - * - * Copyright 2008 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 - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "wine/test.h" - -static const BYTE emptyCTL[] = { -0x30,0x17,0x30,0x00,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x02,0x06,0x00 }; -static const BYTE ctlWithOneEntry[] = { -0x30,0x2a,0x30,0x00,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x02,0x06,0x00,0x30,0x11,0x30,0x0f,0x04, -0x01,0x01,0x31,0x0a,0x30,0x08,0x06,0x02,0x2a,0x03,0x31,0x02,0x30,0x00 }; -static const BYTE signedCTL[] = { -0x30,0x81,0xc7,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0, -0x81,0xb9,0x30,0x81,0xb6,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x28,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x1b,0x04,0x19,0x30,0x17,0x30,0x00, -0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x30,0x02,0x06,0x00,0x31,0x77,0x30,0x75,0x02,0x01,0x01,0x30,0x1a, -0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75, -0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08, -0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x04,0x06,0x00,0x05, -0x00,0x04,0x40,0xca,0xd8,0x32,0xd1,0xbd,0x97,0x61,0x54,0xd6,0x80,0xcf,0x0d, -0xbd,0xa2,0x42,0xc7,0xca,0x37,0x91,0x7d,0x9d,0xac,0x8c,0xdf,0x05,0x8a,0x39, -0xc6,0x07,0xc1,0x37,0xe6,0xb9,0xd1,0x0d,0x26,0xec,0xa5,0xb0,0x8a,0x51,0x26, -0x2b,0x4f,0x73,0x44,0x86,0x83,0x5e,0x2b,0x6e,0xcc,0xf8,0x1b,0x85,0x53,0xe9, -0x7a,0x80,0x8f,0x6b,0x42,0x19,0x93 }; -static const BYTE signedCTLWithSubjectAlgorithm[] = { -0x30,0x81,0xd1,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0, -0x81,0xc3,0x30,0x81,0xc0,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x32,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x25,0x04,0x23,0x30,0x21,0x30,0x00, -0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05, -0x00,0x31,0x77,0x30,0x75,0x02,0x01,0x01,0x30,0x1a,0x30,0x15,0x31,0x13,0x30, -0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61, -0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7, -0x0d,0x02,0x05,0x05,0x00,0x30,0x04,0x06,0x00,0x05,0x00,0x04,0x40,0xca,0x7a, -0xfa,0xbf,0x44,0x36,0xfd,0xb2,0x84,0x70,0x0f,0xf5,0x66,0xcb,0x68,0xdb,0x45, -0x74,0xa1,0xed,0xe3,0x30,0x4a,0x11,0xd2,0x7b,0xf5,0xa9,0x68,0x8d,0x36,0xe8, -0x79,0xff,0xa2,0xf2,0x4c,0x8a,0xa9,0x65,0x03,0xf8,0x77,0xa5,0x01,0xd3,0x46, -0x8a,0xcc,0x93,0x36,0x30,0xe1,0xa4,0x47,0x70,0x3d,0xb3,0x97,0xfc,0x6d,0x24, -0xe9,0xf9 }; -static const BYTE signedCTLWithCTLInnerContent[] = { -0x30,0x82,0x01,0x0f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02, -0xa0,0x82,0x01,0x00,0x30,0x81,0xfd,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06, -0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x30,0x06,0x09, -0x2b,0x06,0x01,0x04,0x01,0x82,0x37,0x0a,0x01,0xa0,0x23,0x30,0x21,0x30,0x00, -0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05, -0x00,0x31,0x81,0xb5,0x30,0x81,0xb2,0x02,0x01,0x01,0x30,0x1a,0x30,0x15,0x31, -0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20, -0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0xa0,0x3b,0x30,0x18,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x09,0x03,0x31,0x0b,0x06,0x09,0x2b,0x06,0x01,0x04, -0x01,0x82,0x37,0x0a,0x01,0x30,0x1f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x01,0x09,0x04,0x31,0x12,0x04,0x10,0x54,0x71,0xbc,0xe1,0x56,0x31,0xa2,0xf9, -0x65,0x70,0x34,0xf8,0xe2,0xe9,0xb4,0xf4,0x30,0x04,0x06,0x00,0x05,0x00,0x04, -0x40,0x2f,0x1b,0x9f,0x5a,0x4a,0x15,0x73,0xfa,0xb1,0x93,0x3d,0x09,0x52,0xdf, -0x6b,0x98,0x4b,0x13,0x5e,0xe7,0xbf,0x65,0xf4,0x9c,0xc2,0xb1,0x77,0x09,0xb1, -0x66,0x4d,0x72,0x0d,0xb1,0x1a,0x50,0x20,0xe0,0x57,0xa2,0x39,0xc7,0xcd,0x7f, -0x8e,0xe7,0x5f,0x76,0x2b,0xd1,0x6a,0x82,0xb3,0x30,0x25,0x61,0xf6,0x25,0x23, -0x57,0x6c,0x0b,0x47,0xb8 }; -static const BYTE signedCTLWithCTLInnerContentAndBadSig[] = { -0x30,0x82,0x01,0x0f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02, -0xa0,0x82,0x01,0x00,0x30,0x81,0xfd,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06, -0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x30,0x06,0x09, -0x2b,0x06,0x01,0x04,0x01,0x82,0x37,0x0a,0x01,0xa0,0x23,0x30,0x21,0x30,0x00, -0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05, -0x00,0x31,0x81,0xb5,0x30,0x81,0xb2,0x02,0x01,0x01,0x30,0x1a,0x30,0x15,0x31, -0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20, -0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0xa0,0x3b,0x30,0x18,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x09,0x03,0x31,0x0b,0x06,0x09,0x2b,0x06,0x01,0x04, -0x01,0x82,0x37,0x0a,0x01,0x30,0x1f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x01,0x09,0x04,0x31,0x12,0x04,0x10,0x54,0x71,0xbc,0xe1,0x56,0x31,0xa2,0xf9, -0x65,0x70,0x34,0xf8,0xe2,0xe9,0xb4,0xf4,0x30,0x04,0x06,0x00,0x05,0x00,0x04, -0x40,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff }; - -static void testCreateCTL(void) -{ - PCCTL_CONTEXT ctl; - - SetLastError(0xdeadbeef); - ctl = CertCreateCTLContext(0, NULL, 0); - ok(!ctl && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ctl = CertCreateCTLContext(X509_ASN_ENCODING, NULL, 0); - ok(!ctl && - (GetLastError() == ERROR_INVALID_DATA || - GetLastError() == OSS_MORE_INPUT), /* win9x */ - "expected ERROR_INVALID_DATA, got %d (0x%08x)\n", GetLastError(), - GetLastError()); - /* An empty CTL can't be created.. */ - SetLastError(0xdeadbeef); - ctl = CertCreateCTLContext(X509_ASN_ENCODING, emptyCTL, sizeof(emptyCTL)); - ok(!ctl && - (GetLastError() == ERROR_INVALID_DATA || - GetLastError() == OSS_DATA_ERROR), /* win9x */ - "expected ERROR_INVALID_DATA, got %d (0x%08x)\n", GetLastError(), - GetLastError()); - /* Nor can any of these "signed" CTLs whose inner content OID isn't - * szOID_CTL. - */ - SetLastError(0xdeadbeef); - ctl = CertCreateCTLContext(X509_ASN_ENCODING, signedCTL, sizeof(signedCTL)); - ok(!ctl && - (GetLastError() == ERROR_INVALID_DATA || - GetLastError() == CRYPT_E_UNEXPECTED_MSG_TYPE /* win9x */ || - GetLastError() == ERROR_SUCCESS /* some win98 */), - "expected ERROR_INVALID_DATA, CRYPT_E_UNEXPECTED_MSG_TYPE, or ERROR_SUCCESS, got %d (0x%08x)\n", GetLastError(), - GetLastError()); - SetLastError(0xdeadbeef); - ctl = CertCreateCTLContext(X509_ASN_ENCODING, ctlWithOneEntry, - sizeof(ctlWithOneEntry)); - ok(!ctl && - (GetLastError() == ERROR_INVALID_DATA || - GetLastError() == CRYPT_E_UNEXPECTED_MSG_TYPE /* win9x */ || - GetLastError() == OSS_DATA_ERROR /* some win98 */ || - GetLastError() == ERROR_SUCCESS /* some win98 */), - "expected ERROR_INVALID_DATA, CRYPT_E_UNEXPECTED_MSG_TYPE, OSS_DATA_ERROR, or ERROR_SUCCESS, got %d (0x%08x)\n", GetLastError(), - GetLastError()); - SetLastError(0xdeadbeef); - ctl = CertCreateCTLContext(X509_ASN_ENCODING, - signedCTLWithSubjectAlgorithm, sizeof(signedCTLWithSubjectAlgorithm)); - ok(!ctl && - (GetLastError() == ERROR_INVALID_DATA || - GetLastError() == CRYPT_E_UNEXPECTED_MSG_TYPE /* win9x */ || - GetLastError() == ERROR_SUCCESS /* some win98 */), - "expected ERROR_INVALID_DATA, got %d (0x%08x)\n", GetLastError(), - GetLastError()); - /* This signed CTL with the appropriate inner content type can be decoded. - */ - ctl = CertCreateCTLContext(X509_ASN_ENCODING, - signedCTLWithCTLInnerContent, sizeof(signedCTLWithCTLInnerContent)); - ok(ctl != NULL, "CertCreateCTLContext failed: %08x\n", GetLastError()); - if (ctl) - { - /* Even though the CTL was decoded with X509_ASN_ENCODING, the - * message encoding type is included in the CTL's encoding type. - */ - ok(ctl->dwMsgAndCertEncodingType == - (X509_ASN_ENCODING | PKCS_7_ASN_ENCODING), - "expected X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, got %08x\n", - ctl->dwMsgAndCertEncodingType); - CertFreeCTLContext(ctl); - } - /* This CTL with a bad signature can also be decoded, so the sig isn't - * checked when loading the CTL. - */ - ctl = CertCreateCTLContext(X509_ASN_ENCODING, - signedCTLWithCTLInnerContentAndBadSig, - sizeof(signedCTLWithCTLInnerContentAndBadSig)); - ok(ctl != NULL, "CertCreateCTLContext failed: %08x\n", GetLastError()); - if (ctl) - CertFreeCTLContext(ctl); -} - -static void testDupCTL(void) -{ - PCCTL_CONTEXT context, dupContext; - - context = CertDuplicateCTLContext(NULL); - ok(context == NULL, "expected NULL\n"); - context = CertCreateCTLContext(X509_ASN_ENCODING, - signedCTLWithCTLInnerContent, sizeof(signedCTLWithCTLInnerContent)); - dupContext = CertDuplicateCTLContext(context); - ok(dupContext != NULL, "expected a context\n"); - ok(dupContext == context, "expected identical context addresses\n"); - CertFreeCTLContext(dupContext); - CertFreeCTLContext(context); -} - -static void checkHash(const BYTE *data, DWORD dataLen, ALG_ID algID, - PCCTL_CONTEXT context, DWORD propID) -{ - BYTE hash[20] = { 0 }, hashProperty[20]; - BOOL ret; - DWORD size; - - memset(hash, 0, sizeof(hash)); - memset(hashProperty, 0, sizeof(hashProperty)); - size = sizeof(hash); - ret = CryptHashCertificate(0, algID, 0, data, dataLen, hash, &size); - ret = CertGetCTLContextProperty(context, propID, hashProperty, &size); - ok(ret, "CertGetCTLContextProperty failed: %08x\n", GetLastError()); - if (ret) - ok(!memcmp(hash, hashProperty, size), - "Unexpected hash for property %d\n", propID); -} - -static void testCTLProperties(void) -{ - PCCTL_CONTEXT ctl; - BOOL ret; - DWORD propID, numProps, access, size; - - ctl = CertCreateCTLContext(X509_ASN_ENCODING, - signedCTLWithCTLInnerContent, sizeof(signedCTLWithCTLInnerContent)); - if (!ctl) - { - skip("CertCreateCTLContext failed: %08x\n", GetLastError()); - return; - } - - /* No properties as yet */ - propID = 0; - numProps = 0; - do { - propID = CertEnumCTLContextProperties(ctl, propID); - if (propID) - numProps++; - } while (propID != 0); - ok(numProps == 0, "Expected 0 properties, got %d\n", numProps); - - /* An implicit property */ - ret = CertGetCTLContextProperty(ctl, CERT_ACCESS_STATE_PROP_ID, NULL, - &size); - ok(ret || broken(GetLastError() == CRYPT_E_NOT_FOUND /* some win98 */), - "CertGetCTLContextProperty failed: %08x\n", GetLastError()); - ret = CertGetCTLContextProperty(ctl, CERT_ACCESS_STATE_PROP_ID, &access, - &size); - ok(ret || broken(GetLastError() == CRYPT_E_NOT_FOUND /* some win98 */), - "CertGetCTLContextProperty failed: %08x\n", GetLastError()); - if (ret) - ok(!(access & CERT_ACCESS_STATE_WRITE_PERSIST_FLAG), - "Didn't expect a persisted cert\n"); - - checkHash(signedCTLWithCTLInnerContent, - sizeof(signedCTLWithCTLInnerContent), CALG_SHA1, ctl, CERT_HASH_PROP_ID); - - /* Now that the hash property is set, we should get one property when - * enumerating. - */ - propID = 0; - numProps = 0; - do { - propID = CertEnumCTLContextProperties(ctl, propID); - if (propID) - numProps++; - } while (propID != 0); - ok(numProps == 1, "Expected 1 properties, got %d\n", numProps); - - checkHash(signedCTLWithCTLInnerContent, - sizeof(signedCTLWithCTLInnerContent), CALG_MD5, ctl, - CERT_MD5_HASH_PROP_ID); - - CertFreeCTLContext(ctl); -} - -static const BYTE signedCTLWithUsage[] = { -0x30,0x82,0x01,0x0f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02, -0xa0,0x82,0x01,0x00,0x30,0x81,0xfd,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06, -0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x30,0x06,0x09, -0x2b,0x06,0x01,0x04,0x01,0x82,0x37,0x0a,0x01,0xa0,0x23,0x30,0x21,0x30,0x0a, -0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x18,0x0f,0x31,0x36,0x30, -0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x02,0x06, -0x00,0x31,0x81,0xb5,0x30,0x81,0xb2,0x02,0x01,0x01,0x30,0x1a,0x30,0x15,0x31, -0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20, -0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0xa0,0x3b,0x30,0x18,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x09,0x03,0x31,0x0b,0x06,0x09,0x2b,0x06,0x01,0x04, -0x01,0x82,0x37,0x0a,0x01,0x30,0x1f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x01,0x09,0x04,0x31,0x12,0x04,0x10,0xc4,0x3e,0x7e,0xc8,0xf9,0x85,0xf3,0x27, -0x7d,0xc0,0x38,0xb2,0x7f,0xc7,0x76,0x85,0x30,0x04,0x06,0x00,0x05,0x00,0x04, -0x40,0x90,0x33,0x1b,0xb4,0x88,0x35,0xe6,0xf7,0x7f,0x93,0x05,0xc9,0x1a,0x0e, -0x8f,0x21,0xc0,0xaa,0xb3,0xab,0x3e,0x4a,0xa6,0x63,0x74,0xfd,0xef,0x11,0xbd, -0x67,0x3a,0x1b,0x07,0x4b,0x88,0x59,0x31,0xd5,0x08,0xf9,0x09,0x2f,0x0b,0x85, -0x62,0x5a,0x67,0x3b,0x62,0x7e,0x81,0x31,0xea,0xa4,0x36,0x5f,0x9a,0x92,0xb6, -0x66,0xa5,0x00,0x60,0x96 }; -static const BYTE signedCTLWithListID1[] = { -0x30,0x82,0x01,0x07,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02, -0xa0,0x81,0xf9,0x30,0x81,0xf6,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08, -0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x29,0x06,0x09,0x2b, -0x06,0x01,0x04,0x01,0x82,0x37,0x0a,0x01,0xa0,0x1c,0x30,0x1a,0x30,0x00,0x04, -0x01,0x01,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30, -0x30,0x30,0x30,0x5a,0x30,0x02,0x06,0x00,0x31,0x81,0xb5,0x30,0x81,0xb2,0x02, -0x01,0x01,0x30,0x1a,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03, -0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01, -0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0xa0, -0x3b,0x30,0x18,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x09,0x03,0x31, -0x0b,0x06,0x09,0x2b,0x06,0x01,0x04,0x01,0x82,0x37,0x0a,0x01,0x30,0x1f,0x06, -0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x09,0x04,0x31,0x12,0x04,0x10,0xbc, -0x13,0xde,0x17,0xc7,0x7c,0x67,0x5b,0xf9,0xa9,0x7c,0xb0,0xd9,0xf2,0x84,0xd5, -0x30,0x04,0x06,0x00,0x05,0x00,0x04,0x40,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }; -static const BYTE signedCTLWithListID2[] = { -0x30,0x82,0x01,0x07,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02, -0xa0,0x81,0xf9,0x30,0x81,0xf6,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08, -0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x29,0x06,0x09,0x2b, -0x06,0x01,0x04,0x01,0x82,0x37,0x0a,0x01,0xa0,0x1c,0x30,0x1a,0x30,0x00,0x04, -0x01,0x02,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30, -0x30,0x30,0x30,0x5a,0x30,0x02,0x06,0x00,0x31,0x81,0xb5,0x30,0x81,0xb2,0x02, -0x01,0x01,0x30,0x1a,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03, -0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01, -0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0xa0, -0x3b,0x30,0x18,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x09,0x03,0x31, -0x0b,0x06,0x09,0x2b,0x06,0x01,0x04,0x01,0x82,0x37,0x0a,0x01,0x30,0x1f,0x06, -0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x09,0x04,0x31,0x12,0x04,0x10,0x60, -0x6b,0x10,0xb6,0xb8,0x74,0xb8,0xf3,0x79,0xd5,0x42,0x15,0x4a,0x60,0x93,0x1f, -0x30,0x04,0x06,0x00,0x05,0x00,0x04,0x40,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff }; - -static void testAddCTLToStore(void) -{ - HCERTSTORE store; - BOOL ret; - DWORD numCTLs, expectedCTLs; - PCCTL_CONTEXT ctl; - - store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - /* Add two CTLs */ - ret = CertAddEncodedCTLToStore(store, X509_ASN_ENCODING, - signedCTLWithCTLInnerContent, sizeof(signedCTLWithCTLInnerContent), - CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCTLToStore failed: %08x\n", GetLastError()); - ret = CertAddEncodedCTLToStore(store, X509_ASN_ENCODING, - signedCTLWithCTLInnerContentAndBadSig, - sizeof(signedCTLWithCTLInnerContentAndBadSig), CERT_STORE_ADD_ALWAYS, - NULL); - ok(ret, "CertAddEncodedCTLToStore failed: %08x\n", GetLastError()); - /* Check that two exist */ - numCTLs = 0; - ctl = NULL; - do { - ctl = CertEnumCTLsInStore(store, ctl); - if (ctl) - numCTLs++; - } while (ctl); - ok(numCTLs == 2, "expected 2 CTLs, got %d\n", numCTLs); - CertCloseStore(store, 0); - - store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - /* Add the two CTLs again. They're identical except for the signature.. */ - ret = CertAddEncodedCTLToStore(store, X509_ASN_ENCODING, - signedCTLWithCTLInnerContent, sizeof(signedCTLWithCTLInnerContent), - CERT_STORE_ADD_NEW, NULL); - ok(ret, "CertAddEncodedCTLToStore failed: %08x\n", GetLastError()); - /* so adding the second CTL fails. */ - SetLastError(0xdeadbeef); - ret = CertAddEncodedCTLToStore(store, X509_ASN_ENCODING, - signedCTLWithCTLInnerContentAndBadSig, - sizeof(signedCTLWithCTLInnerContentAndBadSig), CERT_STORE_ADD_NEW, - NULL); - if (ret) - { - /* win9x */ - ok(GetLastError() == CRYPT_E_NOT_FOUND || - GetLastError() == OSS_DATA_ERROR /* some win98 */, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - } - else - { - ok(!ret && (GetLastError() == CRYPT_E_EXISTS || - GetLastError() == OSS_DATA_ERROR), - "expected CRYPT_E_EXISTS or OSS_DATA_ERROR, got %d %08x\n", ret, - GetLastError()); - } - CertCloseStore(store, 0); - - store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - /* Add two CTLs. These two have different usages, so they're considered - * different. - */ - ret = CertAddEncodedCTLToStore(store, X509_ASN_ENCODING, - signedCTLWithCTLInnerContent, sizeof(signedCTLWithCTLInnerContent), - CERT_STORE_ADD_NEW, NULL); - ok(ret, "CertAddEncodedCTLToStore failed: %08x\n", GetLastError()); - expectedCTLs = 1; - ret = CertAddEncodedCTLToStore(store, X509_ASN_ENCODING, - signedCTLWithUsage, sizeof(signedCTLWithUsage), CERT_STORE_ADD_NEW, - NULL); - ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* some win98 */), - "CertAddEncodedCTLToStore failed: %08x\n", GetLastError()); - if (ret) - expectedCTLs++; - /* Check that two exist */ - numCTLs = 0; - ctl = NULL; - do { - ctl = CertEnumCTLsInStore(store, ctl); - if (ctl) - numCTLs++; - } while (ctl); - ok(numCTLs == expectedCTLs, "expected %d CTLs, got %d\n", expectedCTLs, - numCTLs); - CertCloseStore(store, 0); - - store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - /* Add two CTLs. Now they have the same (empty) usages and different list - * IDs, so they're different. - */ - ret = CertAddEncodedCTLToStore(store, X509_ASN_ENCODING, - signedCTLWithListID1, sizeof(signedCTLWithListID1), CERT_STORE_ADD_NEW, - NULL); - if (!ret) - { - skip("adding a CTL with an empty usage not supported\n"); - return; - } - ok(ret, "CertAddEncodedCTLToStore failed: %08x\n", GetLastError()); - ret = CertAddEncodedCTLToStore(store, X509_ASN_ENCODING, - signedCTLWithListID2, sizeof(signedCTLWithListID2), CERT_STORE_ADD_NEW, - NULL); - ok(ret, "CertAddEncodedCTLToStore failed: %08x\n", GetLastError()); - /* Check that two exist */ - numCTLs = 0; - ctl = NULL; - do { - ctl = CertEnumCTLsInStore(store, ctl); - if (ctl) - numCTLs++; - } while (ctl); - ok(numCTLs == 2, "expected 2 CTLs, got %d\n", numCTLs); - CertCloseStore(store, 0); -} - -START_TEST(ctl) -{ - testCreateCTL(); - testDupCTL(); - testCTLProperties(); - testAddCTLToStore(); -} diff --git a/rostests/winetests/crypt32/encode.c b/rostests/winetests/crypt32/encode.c deleted file mode 100644 index cc59a59e6a5..00000000000 --- a/rostests/winetests/crypt32/encode.c +++ /dev/null @@ -1,8069 +0,0 @@ -/* - * Unit test suite for crypt32.dll's CryptEncodeObjectEx/CryptDecodeObjectEx - * - * Copyright 2005 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 - */ -#include -#include -#include -#include -#include -#include - -#include "wine/test.h" - - -static BOOL (WINAPI *pCryptDecodeObjectEx)(DWORD,LPCSTR,const BYTE*,DWORD,DWORD,PCRYPT_DECODE_PARA,void*,DWORD*); -static BOOL (WINAPI *pCryptEncodeObjectEx)(DWORD,LPCSTR,const void*,DWORD,PCRYPT_ENCODE_PARA,void*,DWORD*); - -struct encodedInt -{ - int val; - const BYTE *encoded; -}; - -static const BYTE bin1[] = {0x02,0x01,0x01}; -static const BYTE bin2[] = {0x02,0x01,0x7f}; -static const BYTE bin3[] = {0x02,0x02,0x00,0x80}; -static const BYTE bin4[] = {0x02,0x02,0x01,0x00}; -static const BYTE bin5[] = {0x02,0x01,0x80}; -static const BYTE bin6[] = {0x02,0x02,0xff,0x7f}; -static const BYTE bin7[] = {0x02,0x04,0xba,0xdd,0xf0,0x0d}; - -static const struct encodedInt ints[] = { - { 1, bin1 }, - { 127, bin2 }, - { 128, bin3 }, - { 256, bin4 }, - { -128, bin5 }, - { -129, bin6 }, - { 0xbaddf00d, bin7 }, -}; - -struct encodedBigInt -{ - const BYTE *val; - const BYTE *encoded; - const BYTE *decoded; -}; - -static const BYTE bin8[] = {0xff,0xff,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0}; -static const BYTE bin9[] = {0x02,0x0a,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,0xff,0xff,0}; -static const BYTE bin10[] = {0xff,0xff,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0}; - -static const BYTE bin11[] = {0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,0xff,0xff,0xff,0}; -static const BYTE bin12[] = {0x02,0x09,0xff,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0}; -static const BYTE bin13[] = {0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,0xff,0}; - -static const struct encodedBigInt bigInts[] = { - { bin8, bin9, bin10 }, - { bin11, bin12, bin13 }, -}; - -static const BYTE bin14[] = {0xff,0xff,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0}; -static const BYTE bin15[] = {0x02,0x0a,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,0xff,0xff,0}; -static const BYTE bin16[] = {0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,0xff,0xff,0xff,0}; -static const BYTE bin17[] = {0x02,0x0c,0x00,0xff,0xff,0xff,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0}; - -/* Decoded is the same as original, so don't bother storing a separate copy */ -static const struct encodedBigInt bigUInts[] = { - { bin14, bin15, NULL }, - { bin16, bin17, NULL }, -}; - -static void test_encodeInt(DWORD dwEncoding) -{ - DWORD bufSize = 0; - int i; - BOOL ret; - CRYPT_INTEGER_BLOB blob; - BYTE *buf = NULL; - - /* CryptEncodeObjectEx with NULL bufSize crashes.. - ret = pCryptEncodeObjectEx(3, X509_INTEGER, &ints[0].val, 0, NULL, NULL, - NULL); - */ - /* check bogus encoding */ - ret = pCryptEncodeObjectEx(0, X509_INTEGER, &ints[0].val, 0, NULL, NULL, - &bufSize); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - if (0) - { - /* check with NULL integer buffer. Windows XP incorrectly returns an - * NTSTATUS (crashes on win9x). - */ - ret = pCryptEncodeObjectEx(dwEncoding, X509_INTEGER, NULL, 0, NULL, NULL, - &bufSize); - ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); - } - for (i = 0; i < sizeof(ints) / sizeof(ints[0]); i++) - { - /* encode as normal integer */ - ret = pCryptEncodeObjectEx(dwEncoding, X509_INTEGER, &ints[i].val, 0, - NULL, NULL, &bufSize); - ok(ret, "Expected success, got %d\n", GetLastError()); - ret = pCryptEncodeObjectEx(dwEncoding, X509_INTEGER, &ints[i].val, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %d\n", GetLastError()); - if (buf) - { - ok(buf[0] == 2, "Got unexpected type %d for integer (expected 2)\n", - buf[0]); - ok(buf[1] == ints[i].encoded[1], "Got length %d, expected %d\n", - buf[1], ints[i].encoded[1]); - ok(!memcmp(buf + 1, ints[i].encoded + 1, ints[i].encoded[1] + 1), - "Encoded value of 0x%08x didn't match expected\n", ints[i].val); - LocalFree(buf); - } - /* encode as multibyte integer */ - blob.cbData = sizeof(ints[i].val); - blob.pbData = (BYTE *)&ints[i].val; - ret = pCryptEncodeObjectEx(dwEncoding, X509_MULTI_BYTE_INTEGER, &blob, - 0, NULL, NULL, &bufSize); - ok(ret, "Expected success, got %d\n", GetLastError()); - ret = pCryptEncodeObjectEx(dwEncoding, X509_MULTI_BYTE_INTEGER, &blob, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %d\n", GetLastError()); - if (buf) - { - ok(buf[0] == 2, "Got unexpected type %d for integer (expected 2)\n", - buf[0]); - ok(buf[1] == ints[i].encoded[1], "Got length %d, expected %d\n", - buf[1], ints[i].encoded[1]); - ok(!memcmp(buf + 1, ints[i].encoded + 1, ints[i].encoded[1] + 1), - "Encoded value of 0x%08x didn't match expected\n", ints[i].val); - LocalFree(buf); - } - } - /* encode a couple bigger ints, just to show it's little-endian and leading - * sign bytes are dropped - */ - for (i = 0; i < sizeof(bigInts) / sizeof(bigInts[0]); i++) - { - blob.cbData = strlen((const char*)bigInts[i].val); - blob.pbData = (BYTE *)bigInts[i].val; - ret = pCryptEncodeObjectEx(dwEncoding, X509_MULTI_BYTE_INTEGER, &blob, - 0, NULL, NULL, &bufSize); - ok(ret, "Expected success, got %d\n", GetLastError()); - ret = pCryptEncodeObjectEx(dwEncoding, X509_MULTI_BYTE_INTEGER, &blob, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %d\n", GetLastError()); - if (buf) - { - ok(buf[0] == 2, "Got unexpected type %d for integer (expected 2)\n", - buf[0]); - ok(buf[1] == bigInts[i].encoded[1], "Got length %d, expected %d\n", - buf[1], bigInts[i].encoded[1]); - ok(!memcmp(buf + 1, bigInts[i].encoded + 1, - bigInts[i].encoded[1] + 1), - "Encoded value didn't match expected\n"); - LocalFree(buf); - } - } - /* and, encode some uints */ - for (i = 0; i < sizeof(bigUInts) / sizeof(bigUInts[0]); i++) - { - blob.cbData = strlen((const char*)bigUInts[i].val); - blob.pbData = (BYTE*)bigUInts[i].val; - ret = pCryptEncodeObjectEx(dwEncoding, X509_MULTI_BYTE_UINT, &blob, - 0, NULL, NULL, &bufSize); - ok(ret, "Expected success, got %d\n", GetLastError()); - ret = pCryptEncodeObjectEx(dwEncoding, X509_MULTI_BYTE_UINT, &blob, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %d\n", GetLastError()); - if (buf) - { - ok(buf[0] == 2, "Got unexpected type %d for integer (expected 2)\n", - buf[0]); - ok(buf[1] == bigUInts[i].encoded[1], "Got length %d, expected %d\n", - buf[1], bigUInts[i].encoded[1]); - ok(!memcmp(buf + 1, bigUInts[i].encoded + 1, - bigUInts[i].encoded[1] + 1), - "Encoded value didn't match expected\n"); - LocalFree(buf); - } - } -} - -static void test_decodeInt(DWORD dwEncoding) -{ - static const BYTE bigInt[] = { 2, 5, 0xff, 0xfe, 0xff, 0xfe, 0xff }; - static const BYTE testStr[] = { 0x16, 4, 't', 'e', 's', 't' }; - static const BYTE longForm[] = { 2, 0x81, 0x01, 0x01 }; - static const BYTE bigBogus[] = { 0x02, 0x84, 0x01, 0xff, 0xff, 0xf9 }; - static const BYTE extraBytes[] = { 2, 1, 1, 0, 0, 0, 0 }; - BYTE *buf = NULL; - DWORD bufSize = 0; - int i; - BOOL ret; - - /* CryptDecodeObjectEx with NULL bufSize crashes.. - ret = pCryptDecodeObjectEx(3, X509_INTEGER, &ints[0].encoded, - ints[0].encoded[1] + 2, 0, NULL, NULL, NULL); - */ - /* check bogus encoding */ - ret = pCryptDecodeObjectEx(3, X509_INTEGER, (BYTE *)&ints[0].encoded, - ints[0].encoded[1] + 2, 0, NULL, NULL, &bufSize); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - /* check with NULL integer buffer */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_INTEGER, NULL, 0, 0, NULL, NULL, - &bufSize); - ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD || - GetLastError() == OSS_BAD_ARG /* Win9x */), - "Expected CRYPT_E_ASN1_EOD or OSS_BAD_ARG, got %08x\n", GetLastError()); - /* check with a valid, but too large, integer */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_INTEGER, bigInt, bigInt[1] + 2, - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok((!ret && GetLastError() == CRYPT_E_ASN1_LARGE) || - broken(ret) /* Win9x */, - "Expected CRYPT_E_ASN1_LARGE, got %d\n", GetLastError()); - /* check with a DER-encoded string */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_INTEGER, testStr, testStr[1] + 2, - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == OSS_PDU_MISMATCH /* Win9x */ ), - "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH, got %08x\n", - GetLastError()); - for (i = 0; i < sizeof(ints) / sizeof(ints[0]); i++) - { - /* When the output buffer is NULL, this always succeeds */ - SetLastError(0xdeadbeef); - ret = pCryptDecodeObjectEx(dwEncoding, X509_INTEGER, - ints[i].encoded, ints[i].encoded[1] + 2, 0, NULL, NULL, - &bufSize); - ok(ret && GetLastError() == NOERROR, - "Expected success and NOERROR, got %d\n", GetLastError()); - ret = pCryptDecodeObjectEx(dwEncoding, X509_INTEGER, - ints[i].encoded, ints[i].encoded[1] + 2, - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %d\n", GetLastError()); - ok(bufSize == sizeof(int), "Wrong size %d\n", bufSize); - ok(buf != NULL, "Expected allocated buffer\n"); - if (buf) - { - ok(!memcmp(buf, &ints[i].val, bufSize), "Expected %d, got %d\n", - ints[i].val, *(int *)buf); - LocalFree(buf); - } - } - for (i = 0; i < sizeof(bigInts) / sizeof(bigInts[0]); i++) - { - ret = pCryptDecodeObjectEx(dwEncoding, X509_MULTI_BYTE_INTEGER, - bigInts[i].encoded, bigInts[i].encoded[1] + 2, 0, NULL, NULL, - &bufSize); - ok(ret && GetLastError() == NOERROR, - "Expected success and NOERROR, got %d\n", GetLastError()); - ret = pCryptDecodeObjectEx(dwEncoding, X509_MULTI_BYTE_INTEGER, - bigInts[i].encoded, bigInts[i].encoded[1] + 2, - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %d\n", GetLastError()); - ok(bufSize >= sizeof(CRYPT_INTEGER_BLOB), "Wrong size %d\n", bufSize); - ok(buf != NULL, "Expected allocated buffer\n"); - if (buf) - { - CRYPT_INTEGER_BLOB *blob = (CRYPT_INTEGER_BLOB *)buf; - - ok(blob->cbData == strlen((const char*)bigInts[i].decoded), - "Expected len %d, got %d\n", lstrlenA((const char*)bigInts[i].decoded), - blob->cbData); - ok(!memcmp(blob->pbData, bigInts[i].decoded, blob->cbData), - "Unexpected value\n"); - LocalFree(buf); - } - } - for (i = 0; i < sizeof(bigUInts) / sizeof(bigUInts[0]); i++) - { - ret = pCryptDecodeObjectEx(dwEncoding, X509_MULTI_BYTE_UINT, - bigUInts[i].encoded, bigUInts[i].encoded[1] + 2, 0, NULL, NULL, - &bufSize); - ok(ret && GetLastError() == NOERROR, - "Expected success and NOERROR, got %d\n", GetLastError()); - ret = pCryptDecodeObjectEx(dwEncoding, X509_MULTI_BYTE_UINT, - bigUInts[i].encoded, bigUInts[i].encoded[1] + 2, - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %d\n", GetLastError()); - ok(bufSize >= sizeof(CRYPT_INTEGER_BLOB), "Wrong size %d\n", bufSize); - ok(buf != NULL, "Expected allocated buffer\n"); - if (buf) - { - CRYPT_INTEGER_BLOB *blob = (CRYPT_INTEGER_BLOB *)buf; - - ok(blob->cbData == strlen((const char*)bigUInts[i].val), - "Expected len %d, got %d\n", lstrlenA((const char*)bigUInts[i].val), - blob->cbData); - ok(!memcmp(blob->pbData, bigUInts[i].val, blob->cbData), - "Unexpected value\n"); - LocalFree(buf); - } - } - /* Decode the value 1 with long-form length */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_MULTI_BYTE_INTEGER, longForm, - sizeof(longForm), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(*(int *)buf == 1, "Expected 1, got %d\n", *(int *)buf); - LocalFree(buf); - } - /* check with extra bytes at the end */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_INTEGER, extraBytes, - sizeof(extraBytes), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(*(int *)buf == 1, "Expected 1, got %d\n", *(int *)buf); - LocalFree(buf); - } - /* Try to decode some bogus large items */ - /* The buffer size is smaller than the encoded length, so this should fail - * with CRYPT_E_ASN1_EOD if it's being decoded. - * Under XP it fails with CRYPT_E_ASN1_LARGE, which means there's a limit - * on the size decoded, but in ME it fails with CRYPT_E_ASN1_EOD or crashes. - * So this test unfortunately isn't useful. - ret = pCryptDecodeObjectEx(dwEncoding, X509_MULTI_BYTE_INTEGER, tooBig, - 0x7fffffff, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(!ret && GetLastError() == CRYPT_E_ASN1_LARGE, - "Expected CRYPT_E_ASN1_LARGE, got %08x\n", GetLastError()); - */ - /* This will try to decode the buffer and overflow it, check that it's - * caught. - */ - if (0) - { - /* a large buffer isn't guaranteed to crash, it depends on memory allocation order */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_MULTI_BYTE_INTEGER, bigBogus, - 0x01ffffff, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); - } -} - -static const BYTE bin18[] = {0x0a,0x01,0x01}; -static const BYTE bin19[] = {0x0a,0x05,0x00,0xff,0xff,0xff,0x80}; - -/* These are always encoded unsigned, and aren't constrained to be any - * particular value - */ -static const struct encodedInt enums[] = { - { 1, bin18 }, - { -128, bin19 }, -}; - -/* X509_CRL_REASON_CODE is also an enumerated type, but it's #defined to - * X509_ENUMERATED. - */ -static const LPCSTR enumeratedTypes[] = { X509_ENUMERATED, - szOID_CRL_REASON_CODE }; - -static void test_encodeEnumerated(DWORD dwEncoding) -{ - DWORD i, j; - - for (i = 0; i < sizeof(enumeratedTypes) / sizeof(enumeratedTypes[0]); i++) - { - for (j = 0; j < sizeof(enums) / sizeof(enums[0]); j++) - { - BOOL ret; - BYTE *buf = NULL; - DWORD bufSize = 0; - - ret = pCryptEncodeObjectEx(dwEncoding, enumeratedTypes[i], - &enums[j].val, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, - &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %d\n", GetLastError()); - if (buf) - { - ok(buf[0] == 0xa, - "Got unexpected type %d for enumerated (expected 0xa)\n", - buf[0]); - ok(buf[1] == enums[j].encoded[1], - "Got length %d, expected %d\n", buf[1], enums[j].encoded[1]); - ok(!memcmp(buf + 1, enums[j].encoded + 1, - enums[j].encoded[1] + 1), - "Encoded value of 0x%08x didn't match expected\n", - enums[j].val); - LocalFree(buf); - } - } - } -} - -static void test_decodeEnumerated(DWORD dwEncoding) -{ - DWORD i, j; - - for (i = 0; i < sizeof(enumeratedTypes) / sizeof(enumeratedTypes[0]); i++) - { - for (j = 0; j < sizeof(enums) / sizeof(enums[0]); j++) - { - BOOL ret; - DWORD bufSize = sizeof(int); - int val; - - ret = pCryptDecodeObjectEx(dwEncoding, enumeratedTypes[i], - enums[j].encoded, enums[j].encoded[1] + 2, 0, NULL, - &val, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - ok(bufSize == sizeof(int), - "Got unexpected size %d for enumerated\n", bufSize); - ok(val == enums[j].val, "Unexpected value %d, expected %d\n", - val, enums[j].val); - } - } -} - -struct encodedFiletime -{ - SYSTEMTIME sysTime; - const BYTE *encodedTime; -}; - -static void testTimeEncoding(DWORD dwEncoding, LPCSTR structType, - const struct encodedFiletime *time) -{ - FILETIME ft = { 0 }; - BYTE *buf = NULL; - DWORD bufSize = 0; - BOOL ret; - - ret = SystemTimeToFileTime(&time->sysTime, &ft); - ok(ret, "SystemTimeToFileTime failed: %d\n", GetLastError()); - ret = pCryptEncodeObjectEx(dwEncoding, structType, &ft, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - /* years other than 1950-2050 are not allowed for encodings other than - * X509_CHOICE_OF_TIME. - */ - if (structType == X509_CHOICE_OF_TIME || - (time->sysTime.wYear >= 1950 && time->sysTime.wYear <= 2050)) - { - ok(ret, "CryptEncodeObjectEx failed: %d (0x%08x)\n", GetLastError(), - GetLastError()); - ok(buf != NULL, "Expected an allocated buffer\n"); - if (buf) - { - ok(buf[0] == time->encodedTime[0], - "Expected type 0x%02x, got 0x%02x\n", time->encodedTime[0], - buf[0]); - ok(buf[1] == time->encodedTime[1], "Expected %d bytes, got %d\n", - time->encodedTime[1], bufSize); - ok(!memcmp(time->encodedTime + 2, buf + 2, time->encodedTime[1]), - "Got unexpected value for time encoding\n"); - LocalFree(buf); - } - } - else - ok((!ret && GetLastError() == CRYPT_E_BAD_ENCODE) || - broken(GetLastError() == ERROR_SUCCESS), - "Expected CRYPT_E_BAD_ENCODE, got 0x%08x\n", GetLastError()); -} - -static const char *printSystemTime(const SYSTEMTIME *st) -{ - static char buf[25]; - - sprintf(buf, "%02d-%02d-%04d %02d:%02d:%02d.%03d", st->wMonth, st->wDay, - st->wYear, st->wHour, st->wMinute, st->wSecond, st->wMilliseconds); - return buf; -} - -static const char *printFileTime(const FILETIME *ft) -{ - static char buf[25]; - SYSTEMTIME st; - - FileTimeToSystemTime(ft, &st); - sprintf(buf, "%02d-%02d-%04d %02d:%02d:%02d.%03d", st.wMonth, st.wDay, - st.wYear, st.wHour, st.wMinute, st.wSecond, st.wMilliseconds); - return buf; -} - -static void compareTime(const SYSTEMTIME *expected, const FILETIME *got) -{ - SYSTEMTIME st; - - FileTimeToSystemTime(got, &st); - ok((expected->wYear == st.wYear && - expected->wMonth == st.wMonth && - expected->wDay == st.wDay && - expected->wHour == st.wHour && - expected->wMinute == st.wMinute && - expected->wSecond == st.wSecond && - abs(expected->wMilliseconds - st.wMilliseconds) <= 1) || - /* Some Windows systems only seem to be accurate in their time decoding to - * within about an hour. - */ - broken(expected->wYear == st.wYear && - expected->wMonth == st.wMonth && - expected->wDay == st.wDay && - abs(expected->wHour - st.wHour) <= 1), - "Got unexpected value for time decoding:\nexpected %s, got %s\n", - printSystemTime(expected), printFileTime(got)); -} - -static void testTimeDecoding(DWORD dwEncoding, LPCSTR structType, - const struct encodedFiletime *time) -{ - FILETIME ft = { 0 }; - DWORD size = sizeof(ft); - BOOL ret; - - ret = pCryptDecodeObjectEx(dwEncoding, structType, time->encodedTime, - time->encodedTime[1] + 2, 0, NULL, &ft, &size); - /* years other than 1950-2050 are not allowed for encodings other than - * X509_CHOICE_OF_TIME. - */ - if (structType == X509_CHOICE_OF_TIME || - (time->sysTime.wYear >= 1950 && time->sysTime.wYear <= 2050)) - { - ok(ret || broken(GetLastError() == OSS_DATA_ERROR), - "CryptDecodeObjectEx failed: %d (0x%08x)\n", GetLastError(), - GetLastError()); - if (ret) - compareTime(&time->sysTime, &ft); - } - else - ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == OSS_PDU_MISMATCH /* Win9x */ ), - "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH, got %08x\n", - GetLastError()); -} - -static const BYTE bin20[] = { - 0x17,0x0d,'0','5','0','6','0','6','1','6','1','0','0','0','Z'}; -static const BYTE bin21[] = { - 0x18,0x0f,'1','9','4','5','0','6','0','6','1','6','1','0','0','0','Z'}; -static const BYTE bin22[] = { - 0x18,0x0f,'2','1','4','5','0','6','0','6','1','6','1','0','0','0','Z'}; - -static const struct encodedFiletime times[] = { - { { 2005, 6, 1, 6, 16, 10, 0, 0 }, bin20 }, - { { 1945, 6, 1, 6, 16, 10, 0, 0 }, bin21 }, - { { 2145, 6, 1, 6, 16, 10, 0, 0 }, bin22 }, -}; - -static void test_encodeFiletime(DWORD dwEncoding) -{ - DWORD i; - - for (i = 0; i < sizeof(times) / sizeof(times[0]); i++) - { - testTimeEncoding(dwEncoding, X509_CHOICE_OF_TIME, ×[i]); - testTimeEncoding(dwEncoding, PKCS_UTC_TIME, ×[i]); - testTimeEncoding(dwEncoding, szOID_RSA_signingTime, ×[i]); - } -} - -static const BYTE bin23[] = { - 0x18,0x13,'1','9','4','5','0','6','0','6','1','6','1','0','0','0','.','0','0','0','Z'}; -static const BYTE bin24[] = { - 0x18,0x13,'1','9','4','5','0','6','0','6','1','6','1','0','0','0','.','9','9','9','Z'}; -static const BYTE bin25[] = { - 0x18,0x13,'1','9','4','5','0','6','0','6','1','6','1','0','0','0','+','0','1','0','0'}; -static const BYTE bin26[] = { - 0x18,0x13,'1','9','4','5','0','6','0','6','1','6','1','0','0','0','-','0','1','0','0'}; -static const BYTE bin27[] = { - 0x18,0x13,'1','9','4','5','0','6','0','6','1','6','1','0','0','0','-','0','1','1','5'}; -static const BYTE bin28[] = { - 0x18,0x0a,'2','1','4','5','0','6','0','6','1','6'}; -static const BYTE bin29[] = { - 0x17,0x0a,'4','5','0','6','0','6','1','6','1','0'}; -static const BYTE bin30[] = { - 0x17,0x0b,'4','5','0','6','0','6','1','6','1','0','Z'}; -static const BYTE bin31[] = { - 0x17,0x0d,'4','5','0','6','0','6','1','6','1','0','+','0','1'}; -static const BYTE bin32[] = { - 0x17,0x0d,'4','5','0','6','0','6','1','6','1','0','-','0','1'}; -static const BYTE bin33[] = { - 0x17,0x0f,'4','5','0','6','0','6','1','6','1','0','+','0','1','0','0'}; -static const BYTE bin34[] = { - 0x17,0x0f,'4','5','0','6','0','6','1','6','1','0','-','0','1','0','0'}; -static const BYTE bin35[] = { - 0x17,0x08, '4','5','0','6','0','6','1','6'}; -static const BYTE bin36[] = { - 0x18,0x0f, 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','Z'}; -static const BYTE bin37[] = { - 0x18,0x04, '2','1','4','5'}; -static const BYTE bin38[] = { - 0x18,0x08, '2','1','4','5','0','6','0','6'}; - -static void test_decodeFiletime(DWORD dwEncoding) -{ - static const struct encodedFiletime otherTimes[] = { - { { 1945, 6, 1, 6, 16, 10, 0, 0 }, bin23 }, - { { 1945, 6, 1, 6, 16, 10, 0, 999 }, bin24 }, - { { 1945, 6, 1, 6, 17, 10, 0, 0 }, bin25 }, - { { 1945, 6, 1, 6, 15, 10, 0, 0 }, bin26 }, - { { 1945, 6, 1, 6, 14, 55, 0, 0 }, bin27 }, - { { 2145, 6, 1, 6, 16, 0, 0, 0 }, bin28 }, - { { 2045, 6, 1, 6, 16, 10, 0, 0 }, bin29 }, - { { 2045, 6, 1, 6, 16, 10, 0, 0 }, bin30 }, - { { 2045, 6, 1, 6, 17, 10, 0, 0 }, bin31 }, - { { 2045, 6, 1, 6, 15, 10, 0, 0 }, bin32 }, - { { 2045, 6, 1, 6, 17, 10, 0, 0 }, bin33 }, - { { 2045, 6, 1, 6, 15, 10, 0, 0 }, bin34 }, - }; - /* An oddball case that succeeds in Windows, but doesn't seem correct - { { 2145, 6, 1, 2, 11, 31, 0, 0 }, "\x18" "\x13" "21450606161000-9999" }, - */ - static const unsigned char *bogusTimes[] = { - /* oddly, this succeeds on Windows, with year 2765 - "\x18" "\x0f" "21r50606161000Z", - */ - bin35, - bin36, - bin37, - bin38, - }; - DWORD i, size; - FILETIME ft1 = { 0 }, ft2 = { 0 }; - BOOL ret; - - /* Check bogus length with non-NULL buffer */ - ret = SystemTimeToFileTime(×[0].sysTime, &ft1); - ok(ret, "SystemTimeToFileTime failed: %d\n", GetLastError()); - size = 1; - ret = pCryptDecodeObjectEx(dwEncoding, X509_CHOICE_OF_TIME, - times[0].encodedTime, times[0].encodedTime[1] + 2, 0, NULL, &ft2, &size); - ok(!ret && GetLastError() == ERROR_MORE_DATA, - "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); - /* Normal tests */ - for (i = 0; i < sizeof(times) / sizeof(times[0]); i++) - { - testTimeDecoding(dwEncoding, X509_CHOICE_OF_TIME, ×[i]); - testTimeDecoding(dwEncoding, PKCS_UTC_TIME, ×[i]); - testTimeDecoding(dwEncoding, szOID_RSA_signingTime, ×[i]); - } - for (i = 0; i < sizeof(otherTimes) / sizeof(otherTimes[0]); i++) - { - testTimeDecoding(dwEncoding, X509_CHOICE_OF_TIME, &otherTimes[i]); - testTimeDecoding(dwEncoding, PKCS_UTC_TIME, &otherTimes[i]); - testTimeDecoding(dwEncoding, szOID_RSA_signingTime, &otherTimes[i]); - } - for (i = 0; i < sizeof(bogusTimes) / sizeof(bogusTimes[0]); i++) - { - size = sizeof(ft1); - ret = pCryptDecodeObjectEx(dwEncoding, X509_CHOICE_OF_TIME, - bogusTimes[i], bogusTimes[i][1] + 2, 0, NULL, &ft1, &size); - ok((!ret && (GetLastError() == CRYPT_E_ASN1_CORRUPT || - GetLastError() == OSS_DATA_ERROR /* Win9x */)) || - broken(ret), /* Win9x and NT4 for bin38 */ - "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n", - GetLastError()); - } -} - -static const char commonName[] = "Juan Lang"; -static const char surName[] = "Lang"; - -static const BYTE emptySequence[] = { 0x30, 0 }; -static const BYTE emptyRDNs[] = { 0x30, 0x02, 0x31, 0 }; -static const BYTE twoRDNs[] = { - 0x30,0x23,0x31,0x21,0x30,0x0c,0x06,0x03,0x55,0x04,0x04, - 0x13,0x05,0x4c,0x61,0x6e,0x67,0x00,0x30,0x11,0x06,0x03,0x55,0x04,0x03, - 0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0}; -static const BYTE encodedTwoRDNs[] = { -0x30,0x2e,0x31,0x2c,0x30,0x2a,0x06,0x03,0x55,0x04,0x03,0x30,0x23,0x31,0x21, -0x30,0x0c,0x06,0x03,0x55,0x04,0x04,0x13,0x05,0x4c,0x61,0x6e,0x67,0x00,0x30, -0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61, -0x6e,0x67,0x00, -}; - -static const BYTE us[] = { 0x55, 0x53 }; -static const BYTE minnesota[] = { 0x4d, 0x69, 0x6e, 0x6e, 0x65, 0x73, 0x6f, - 0x74, 0x61 }; -static const BYTE minneapolis[] = { 0x4d, 0x69, 0x6e, 0x6e, 0x65, 0x61, 0x70, - 0x6f, 0x6c, 0x69, 0x73 }; -static const BYTE codeweavers[] = { 0x43, 0x6f, 0x64, 0x65, 0x57, 0x65, 0x61, - 0x76, 0x65, 0x72, 0x73 }; -static const BYTE wine[] = { 0x57, 0x69, 0x6e, 0x65, 0x20, 0x44, 0x65, 0x76, - 0x65, 0x6c, 0x6f, 0x70, 0x6d, 0x65, 0x6e, 0x74 }; -static const BYTE localhostAttr[] = { 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, - 0x73, 0x74 }; -static const BYTE aric[] = { 0x61, 0x72, 0x69, 0x63, 0x40, 0x63, 0x6f, 0x64, - 0x65, 0x77, 0x65, 0x61, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d }; - -#define RDNA(arr) oid_ ## arr, CERT_RDN_PRINTABLE_STRING, { sizeof(arr), (LPBYTE)arr } -#define RDNIA5(arr) oid_ ## arr, CERT_RDN_IA5_STRING, { sizeof(arr), (LPBYTE)arr } - -static CHAR oid_us[] = "2.5.4.6", - oid_minnesota[] = "2.5.4.8", - oid_minneapolis[] = "2.5.4.7", - oid_codeweavers[] = "2.5.4.10", - oid_wine[] = "2.5.4.11", - oid_localhostAttr[] = "2.5.4.3", - oid_aric[] = "1.2.840.113549.1.9.1"; -static CERT_RDN_ATTR rdnAttrs[] = { { RDNA(us) }, - { RDNA(minnesota) }, - { RDNA(minneapolis) }, - { RDNA(codeweavers) }, - { RDNA(wine) }, - { RDNA(localhostAttr) }, - { RDNIA5(aric) } }; -static CERT_RDN_ATTR decodedRdnAttrs[] = { { RDNA(us) }, - { RDNA(localhostAttr) }, - { RDNA(minnesota) }, - { RDNA(minneapolis) }, - { RDNA(codeweavers) }, - { RDNA(wine) }, - { RDNIA5(aric) } }; - -#undef RDNIA5 -#undef RDNA - -static const BYTE encodedRDNAttrs[] = { -0x30,0x81,0x96,0x31,0x81,0x93,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55, -0x53,0x30,0x10,0x06,0x03,0x55,0x04,0x03,0x13,0x09,0x6c,0x6f,0x63,0x61,0x6c,0x68, -0x6f,0x73,0x74,0x30,0x10,0x06,0x03,0x55,0x04,0x08,0x13,0x09,0x4d,0x69,0x6e,0x6e, -0x65,0x73,0x6f,0x74,0x61,0x30,0x12,0x06,0x03,0x55,0x04,0x07,0x13,0x0b,0x4d,0x69, -0x6e,0x6e,0x65,0x61,0x70,0x6f,0x6c,0x69,0x73,0x30,0x12,0x06,0x03,0x55,0x04,0x0a, -0x13,0x0b,0x43,0x6f,0x64,0x65,0x57,0x65,0x61,0x76,0x65,0x72,0x73,0x30,0x17,0x06, -0x03,0x55,0x04,0x0b,0x13,0x10,0x57,0x69,0x6e,0x65,0x20,0x44,0x65,0x76,0x65,0x6c, -0x6f,0x70,0x6d,0x65,0x6e,0x74,0x30,0x21,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x01,0x09,0x01,0x16,0x14,0x61,0x72,0x69,0x63,0x40,0x63,0x6f,0x64,0x65,0x77,0x65, -0x61,0x76,0x65,0x72,0x73,0x2e,0x63,0x6f,0x6d -}; - -static void test_encodeName(DWORD dwEncoding) -{ - CERT_RDN_ATTR attrs[2]; - CERT_RDN rdn; - CERT_NAME_INFO info; - static CHAR oid_common_name[] = szOID_COMMON_NAME, - oid_sur_name[] = szOID_SUR_NAME; - BYTE *buf = NULL; - DWORD size = 0; - BOOL ret; - - if (0) - { - /* Test with NULL pvStructInfo (crashes on win9x) */ - ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME, NULL, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); - } - /* Test with empty CERT_NAME_INFO */ - info.cRDN = 0; - info.rgRDN = NULL; - ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(!memcmp(buf, emptySequence, sizeof(emptySequence)), - "Got unexpected encoding for empty name\n"); - LocalFree(buf); - } - if (0) - { - /* Test with bogus CERT_RDN (crashes on win9x) */ - info.cRDN = 1; - ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); - } - /* Test with empty CERT_RDN */ - rdn.cRDNAttr = 0; - rdn.rgRDNAttr = NULL; - info.cRDN = 1; - info.rgRDN = &rdn; - ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(!memcmp(buf, emptyRDNs, sizeof(emptyRDNs)), - "Got unexpected encoding for empty RDN array\n"); - LocalFree(buf); - } - if (0) - { - /* Test with bogus attr array (crashes on win9x) */ - rdn.cRDNAttr = 1; - rdn.rgRDNAttr = NULL; - ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); - } - /* oddly, a bogus OID is accepted by Windows XP; not testing. - attrs[0].pszObjId = "bogus"; - attrs[0].dwValueType = CERT_RDN_PRINTABLE_STRING; - attrs[0].Value.cbData = sizeof(commonName); - attrs[0].Value.pbData = commonName; - rdn.cRDNAttr = 1; - rdn.rgRDNAttr = attrs; - ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret, "Expected failure, got success\n"); - */ - /* Check with two CERT_RDN_ATTRs. Note DER encoding forces the order of - * the encoded attributes to be swapped. - */ - attrs[0].pszObjId = oid_common_name; - attrs[0].dwValueType = CERT_RDN_PRINTABLE_STRING; - attrs[0].Value.cbData = sizeof(commonName); - attrs[0].Value.pbData = (BYTE *)commonName; - attrs[1].pszObjId = oid_sur_name; - attrs[1].dwValueType = CERT_RDN_PRINTABLE_STRING; - attrs[1].Value.cbData = sizeof(surName); - attrs[1].Value.pbData = (BYTE *)surName; - rdn.cRDNAttr = 2; - rdn.rgRDNAttr = attrs; - ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(!memcmp(buf, twoRDNs, sizeof(twoRDNs)), - "Got unexpected encoding for two RDN array\n"); - LocalFree(buf); - } - /* A name can be "encoded" with previously encoded RDN attrs. */ - attrs[0].dwValueType = CERT_RDN_ENCODED_BLOB; - attrs[0].Value.pbData = (LPBYTE)twoRDNs; - attrs[0].Value.cbData = sizeof(twoRDNs); - rdn.cRDNAttr = 1; - ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(encodedTwoRDNs), "Unexpected size %d\n", size); - ok(!memcmp(buf, encodedTwoRDNs, size), - "Unexpected value for re-endoded two RDN array\n"); - LocalFree(buf); - } - /* CERT_RDN_ANY_TYPE is too vague for X509_NAMEs, check the return */ - rdn.cRDNAttr = 1; - attrs[0].dwValueType = CERT_RDN_ANY_TYPE; - ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* Test a more complex name */ - rdn.cRDNAttr = sizeof(rdnAttrs) / sizeof(rdnAttrs[0]); - rdn.rgRDNAttr = rdnAttrs; - info.cRDN = 1; - info.rgRDN = &rdn; - buf = NULL; - size = 0; - ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, X509_NAME, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(size == sizeof(encodedRDNAttrs), "Wrong size %d\n", size); - ok(!memcmp(buf, encodedRDNAttrs, size), "Unexpected value\n"); - LocalFree(buf); - } -} - -static WCHAR commonNameW[] = { 'J','u','a','n',' ','L','a','n','g',0 }; -static WCHAR surNameW[] = { 'L','a','n','g',0 }; - -static const BYTE twoRDNsNoNull[] = { - 0x30,0x21,0x31,0x1f,0x30,0x0b,0x06,0x03,0x55,0x04,0x04,0x13,0x04,0x4c,0x61, - 0x6e,0x67,0x30,0x10,0x06,0x03,0x55,0x04,0x03,0x13,0x09,0x4a,0x75,0x61,0x6e, - 0x20,0x4c,0x61,0x6e,0x67 }; -static const BYTE anyType[] = { - 0x30,0x2f,0x31,0x2d,0x30,0x2b,0x06,0x03,0x55,0x04,0x03,0x1e,0x24,0x23,0x30, - 0x21,0x31,0x0c,0x30,0x03,0x06,0x04,0x55,0x13,0x04,0x4c,0x05,0x6e,0x61,0x00, - 0x67,0x11,0x30,0x03,0x06,0x04,0x55,0x13,0x03,0x4a,0x0a,0x61,0x75,0x20,0x6e, - 0x61,0x4c,0x67,0x6e }; - -static void test_encodeUnicodeName(DWORD dwEncoding) -{ - CERT_RDN_ATTR attrs[2]; - CERT_RDN rdn; - CERT_NAME_INFO info; - static CHAR oid_common_name[] = szOID_COMMON_NAME, - oid_sur_name[] = szOID_SUR_NAME; - BYTE *buf = NULL; - DWORD size = 0; - BOOL ret; - - if (0) - { - /* Test with NULL pvStructInfo (crashes on win9x) */ - ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME, NULL, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); - } - /* Test with empty CERT_NAME_INFO */ - info.cRDN = 0; - info.rgRDN = NULL; - ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(!memcmp(buf, emptySequence, sizeof(emptySequence)), - "Got unexpected encoding for empty name\n"); - LocalFree(buf); - } - /* Check with one CERT_RDN_ATTR, that has an invalid character for the - * encoding (the NULL). - */ - attrs[0].pszObjId = oid_common_name; - attrs[0].dwValueType = CERT_RDN_PRINTABLE_STRING; - attrs[0].Value.cbData = sizeof(commonNameW); - attrs[0].Value.pbData = (BYTE *)commonNameW; - rdn.cRDNAttr = 1; - rdn.rgRDNAttr = attrs; - info.cRDN = 1; - info.rgRDN = &rdn; - ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == CRYPT_E_INVALID_PRINTABLE_STRING, - "Expected CRYPT_E_INVALID_PRINTABLE_STRING, got %08x\n", GetLastError()); - ok(size == 9, "Unexpected error index %08x\n", size); - /* Check with two NULL-terminated CERT_RDN_ATTRs. Note DER encoding - * forces the order of the encoded attributes to be swapped. - */ - attrs[0].pszObjId = oid_common_name; - attrs[0].dwValueType = CERT_RDN_PRINTABLE_STRING; - attrs[0].Value.cbData = 0; - attrs[0].Value.pbData = (BYTE *)commonNameW; - attrs[1].pszObjId = oid_sur_name; - attrs[1].dwValueType = CERT_RDN_PRINTABLE_STRING; - attrs[1].Value.cbData = 0; - attrs[1].Value.pbData = (BYTE *)surNameW; - rdn.cRDNAttr = 2; - rdn.rgRDNAttr = attrs; - info.cRDN = 1; - info.rgRDN = &rdn; - ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(!memcmp(buf, twoRDNsNoNull, sizeof(twoRDNsNoNull)), - "Got unexpected encoding for two RDN array\n"); - LocalFree(buf); - } - /* A name can be "encoded" with previously encoded RDN attrs. */ - attrs[0].dwValueType = CERT_RDN_ENCODED_BLOB; - attrs[0].Value.pbData = (LPBYTE)twoRDNs; - attrs[0].Value.cbData = sizeof(twoRDNs); - rdn.cRDNAttr = 1; - ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(encodedTwoRDNs), "Unexpected size %d\n", size); - ok(!memcmp(buf, encodedTwoRDNs, size), - "Unexpected value for re-endoded two RDN array\n"); - LocalFree(buf); - } - /* Unicode names infer the type for CERT_RDN_ANY_TYPE */ - rdn.cRDNAttr = 1; - attrs[0].dwValueType = CERT_RDN_ANY_TYPE; - ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - todo_wine ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(anyType), "Unexpected size %d\n", size); - ok(!memcmp(buf, anyType, size), "Unexpected value\n"); - LocalFree(buf); - } -} - -static void compareNameValues(const CERT_NAME_VALUE *expected, - const CERT_NAME_VALUE *got) -{ - if (expected->dwValueType == CERT_RDN_UTF8_STRING && - got->dwValueType == CERT_RDN_ENCODED_BLOB) - { - win_skip("Can't handle CERT_RDN_UTF8_STRING\n"); - return; - } - - ok(got->dwValueType == expected->dwValueType, - "Expected string type %d, got %d\n", expected->dwValueType, - got->dwValueType); - ok(got->Value.cbData == expected->Value.cbData, - "String type %d: unexpected data size, got %d, expected %d\n", - expected->dwValueType, got->Value.cbData, expected->Value.cbData); - if (got->Value.cbData && got->Value.pbData) - ok(!memcmp(got->Value.pbData, expected->Value.pbData, - min(got->Value.cbData, expected->Value.cbData)), - "String type %d: unexpected value\n", expected->dwValueType); -} - -static void compareRDNAttrs(const CERT_RDN_ATTR *expected, - const CERT_RDN_ATTR *got) -{ - if (expected->pszObjId && strlen(expected->pszObjId)) - { - ok(got->pszObjId != NULL, "Expected OID %s, got NULL\n", - expected->pszObjId); - if (got->pszObjId) - { - ok(!strcmp(got->pszObjId, expected->pszObjId), - "Got unexpected OID %s, expected %s\n", got->pszObjId, - expected->pszObjId); - } - } - compareNameValues((const CERT_NAME_VALUE *)&expected->dwValueType, - (const CERT_NAME_VALUE *)&got->dwValueType); -} - -static void compareRDNs(const CERT_RDN *expected, const CERT_RDN *got) -{ - ok(got->cRDNAttr == expected->cRDNAttr, - "Expected %d RDN attrs, got %d\n", expected->cRDNAttr, got->cRDNAttr); - if (got->cRDNAttr) - { - DWORD i; - - for (i = 0; i < got->cRDNAttr; i++) - compareRDNAttrs(&expected->rgRDNAttr[i], &got->rgRDNAttr[i]); - } -} - -static void compareNames(const CERT_NAME_INFO *expected, - const CERT_NAME_INFO *got) -{ - ok(got->cRDN == expected->cRDN, "Expected %d RDNs, got %d\n", - expected->cRDN, got->cRDN); - if (got->cRDN) - { - DWORD i; - - for (i = 0; i < got->cRDN; i++) - compareRDNs(&expected->rgRDN[i], &got->rgRDN[i]); - } -} - -static const BYTE emptyIndefiniteSequence[] = { 0x30,0x80,0x00,0x00 }; -static const BYTE twoRDNsExtraBytes[] = { - 0x30,0x23,0x31,0x21,0x30,0x0c,0x06,0x03,0x55,0x04,0x04, - 0x13,0x05,0x4c,0x61,0x6e,0x67,0x00,0x30,0x11,0x06,0x03,0x55,0x04,0x03, - 0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0,0,0,0,0,0}; - -static void test_decodeName(DWORD dwEncoding) -{ - BYTE *buf = NULL; - DWORD bufSize = 0; - BOOL ret; - CERT_RDN rdn; - CERT_NAME_INFO info = { 1, &rdn }; - - /* test empty name */ - bufSize = 0; - ret = pCryptDecodeObjectEx(dwEncoding, X509_NAME, emptySequence, - emptySequence[1] + 2, - CRYPT_DECODE_ALLOC_FLAG | CRYPT_DECODE_SHARE_OID_STRING_FLAG, NULL, - &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - /* Interestingly, in Windows, if cRDN is 0, rgRGN may not be NULL. My - * decoder works the same way, so only test the count. - */ - if (buf) - { - ok(bufSize == sizeof(CERT_NAME_INFO), "Wrong bufSize %d\n", bufSize); - ok(((CERT_NAME_INFO *)buf)->cRDN == 0, - "Expected 0 RDNs in empty info, got %d\n", - ((CERT_NAME_INFO *)buf)->cRDN); - LocalFree(buf); - } - /* test empty name with indefinite-length encoding */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_NAME, emptyIndefiniteSequence, - sizeof(emptyIndefiniteSequence), CRYPT_DECODE_ALLOC_FLAG, NULL, - &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(bufSize == sizeof(CERT_NAME_INFO), "Wrong bufSize %d\n", bufSize); - ok(((CERT_NAME_INFO *)buf)->cRDN == 0, - "Expected 0 RDNs in empty info, got %d\n", - ((CERT_NAME_INFO *)buf)->cRDN); - LocalFree(buf); - } - /* test empty RDN */ - bufSize = 0; - ret = pCryptDecodeObjectEx(dwEncoding, X509_NAME, emptyRDNs, - emptyRDNs[1] + 2, - CRYPT_DECODE_ALLOC_FLAG | CRYPT_DECODE_SHARE_OID_STRING_FLAG, NULL, - &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CERT_NAME_INFO *info = (CERT_NAME_INFO *)buf; - - ok(bufSize == sizeof(CERT_NAME_INFO) + sizeof(CERT_RDN) && - info->cRDN == 1 && info->rgRDN && info->rgRDN[0].cRDNAttr == 0, - "Got unexpected value for empty RDN\n"); - LocalFree(buf); - } - /* test two RDN attrs */ - bufSize = 0; - ret = pCryptDecodeObjectEx(dwEncoding, X509_NAME, twoRDNs, - twoRDNs[1] + 2, - CRYPT_DECODE_ALLOC_FLAG | CRYPT_DECODE_SHARE_OID_STRING_FLAG, NULL, - &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - static CHAR oid_sur_name[] = szOID_SUR_NAME, - oid_common_name[] = szOID_COMMON_NAME; - - CERT_RDN_ATTR attrs[] = { - { oid_sur_name, CERT_RDN_PRINTABLE_STRING, { sizeof(surName), - (BYTE *)surName } }, - { oid_common_name, CERT_RDN_PRINTABLE_STRING, { sizeof(commonName), - (BYTE *)commonName } }, - }; - - rdn.cRDNAttr = sizeof(attrs) / sizeof(attrs[0]); - rdn.rgRDNAttr = attrs; - compareNames(&info, (CERT_NAME_INFO *)buf); - LocalFree(buf); - } - /* test that two RDN attrs with extra bytes succeeds */ - bufSize = 0; - ret = pCryptDecodeObjectEx(dwEncoding, X509_NAME, twoRDNsExtraBytes, - sizeof(twoRDNsExtraBytes), 0, NULL, NULL, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - /* And, a slightly more complicated name */ - buf = NULL; - bufSize = 0; - ret = pCryptDecodeObjectEx(X509_ASN_ENCODING, X509_NAME, encodedRDNAttrs, - sizeof(encodedRDNAttrs), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - rdn.cRDNAttr = sizeof(decodedRdnAttrs) / sizeof(decodedRdnAttrs[0]); - rdn.rgRDNAttr = decodedRdnAttrs; - compareNames(&info, (CERT_NAME_INFO *)buf); - LocalFree(buf); - } -} - -static void test_decodeUnicodeName(DWORD dwEncoding) -{ - BYTE *buf = NULL; - DWORD bufSize = 0; - BOOL ret; - CERT_RDN rdn; - CERT_NAME_INFO info = { 1, &rdn }; - - /* test empty name */ - bufSize = 0; - ret = pCryptDecodeObjectEx(dwEncoding, X509_UNICODE_NAME, emptySequence, - emptySequence[1] + 2, - CRYPT_DECODE_ALLOC_FLAG | CRYPT_DECODE_SHARE_OID_STRING_FLAG, NULL, - &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(bufSize == sizeof(CERT_NAME_INFO), - "Got wrong bufSize %d\n", bufSize); - ok(((CERT_NAME_INFO *)buf)->cRDN == 0, - "Expected 0 RDNs in empty info, got %d\n", - ((CERT_NAME_INFO *)buf)->cRDN); - LocalFree(buf); - } - /* test empty RDN */ - bufSize = 0; - ret = pCryptDecodeObjectEx(dwEncoding, X509_UNICODE_NAME, emptyRDNs, - emptyRDNs[1] + 2, - CRYPT_DECODE_ALLOC_FLAG | CRYPT_DECODE_SHARE_OID_STRING_FLAG, NULL, - &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CERT_NAME_INFO *info = (CERT_NAME_INFO *)buf; - - ok(bufSize == sizeof(CERT_NAME_INFO) + sizeof(CERT_RDN) && - info->cRDN == 1 && info->rgRDN && info->rgRDN[0].cRDNAttr == 0, - "Got unexpected value for empty RDN\n"); - LocalFree(buf); - } - /* test two RDN attrs */ - bufSize = 0; - ret = pCryptDecodeObjectEx(dwEncoding, X509_UNICODE_NAME, twoRDNsNoNull, - sizeof(twoRDNsNoNull), - CRYPT_DECODE_ALLOC_FLAG | CRYPT_DECODE_SHARE_OID_STRING_FLAG, NULL, - &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - static CHAR oid_sur_name[] = szOID_SUR_NAME, - oid_common_name[] = szOID_COMMON_NAME; - - CERT_RDN_ATTR attrs[] = { - { oid_sur_name, CERT_RDN_PRINTABLE_STRING, - { lstrlenW(surNameW) * sizeof(WCHAR), (BYTE *)surNameW } }, - { oid_common_name, CERT_RDN_PRINTABLE_STRING, - { lstrlenW(commonNameW) * sizeof(WCHAR), (BYTE *)commonNameW } }, - }; - - rdn.cRDNAttr = sizeof(attrs) / sizeof(attrs[0]); - rdn.rgRDNAttr = attrs; - compareNames(&info, (CERT_NAME_INFO *)buf); - LocalFree(buf); - } -} - -struct EncodedNameValue -{ - CERT_NAME_VALUE value; - const BYTE *encoded; - DWORD encodedSize; -}; - -static const char bogusIA5[] = "\x80"; -static const char bogusPrintable[] = "~"; -static const char bogusNumeric[] = "A"; -static const BYTE bin42[] = { 0x16,0x02,0x80,0x00 }; -static const BYTE bin43[] = { 0x13,0x02,0x7e,0x00 }; -static const BYTE bin44[] = { 0x12,0x02,0x41,0x00 }; -static BYTE octetCommonNameValue[] = { - 0x04,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00 }; -static BYTE numericCommonNameValue[] = { - 0x12,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00 }; -static BYTE printableCommonNameValue[] = { - 0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00 }; -static BYTE t61CommonNameValue[] = { - 0x14,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00 }; -static BYTE videotexCommonNameValue[] = { - 0x15,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00 }; -static BYTE ia5CommonNameValue[] = { - 0x16,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00 }; -static BYTE graphicCommonNameValue[] = { - 0x19,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00 }; -static BYTE visibleCommonNameValue[] = { - 0x1a,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00 }; -static BYTE generalCommonNameValue[] = { - 0x1b,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00 }; -static BYTE bmpCommonNameValue[] = { - 0x1e,0x14,0x00,0x4a,0x00,0x75,0x00,0x61,0x00,0x6e,0x00,0x20,0x00,0x4c,0x00, - 0x61,0x00,0x6e,0x00,0x67,0x00,0x00 }; -static BYTE utf8CommonNameValue[] = { - 0x0c,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00 }; -static char embedded_null[] = "foo\0com"; -static BYTE ia5EmbeddedNull[] = { - 0x16,0x07,0x66,0x6f,0x6f,0x00,0x63,0x6f,0x6d }; - -static struct EncodedNameValue nameValues[] = { - { { CERT_RDN_OCTET_STRING, { sizeof(commonName), (BYTE *)commonName } }, - octetCommonNameValue, sizeof(octetCommonNameValue) }, - { { CERT_RDN_NUMERIC_STRING, { sizeof(commonName), (BYTE *)commonName } }, - numericCommonNameValue, sizeof(numericCommonNameValue) }, - { { CERT_RDN_PRINTABLE_STRING, { sizeof(commonName), (BYTE *)commonName } }, - printableCommonNameValue, sizeof(printableCommonNameValue) }, - { { CERT_RDN_T61_STRING, { sizeof(commonName), (BYTE *)commonName } }, - t61CommonNameValue, sizeof(t61CommonNameValue) }, - { { CERT_RDN_VIDEOTEX_STRING, { sizeof(commonName), (BYTE *)commonName } }, - videotexCommonNameValue, sizeof(videotexCommonNameValue) }, - { { CERT_RDN_IA5_STRING, { sizeof(commonName), (BYTE *)commonName } }, - ia5CommonNameValue, sizeof(ia5CommonNameValue) }, - { { CERT_RDN_GRAPHIC_STRING, { sizeof(commonName), (BYTE *)commonName } }, - graphicCommonNameValue, sizeof(graphicCommonNameValue) }, - { { CERT_RDN_VISIBLE_STRING, { sizeof(commonName), (BYTE *)commonName } }, - visibleCommonNameValue, sizeof(visibleCommonNameValue) }, - { { CERT_RDN_GENERAL_STRING, { sizeof(commonName), (BYTE *)commonName } }, - generalCommonNameValue, sizeof(generalCommonNameValue) }, - { { CERT_RDN_BMP_STRING, { sizeof(commonNameW), (BYTE *)commonNameW } }, - bmpCommonNameValue, sizeof(bmpCommonNameValue) }, - { { CERT_RDN_UTF8_STRING, { sizeof(commonNameW), (BYTE *)commonNameW } }, - utf8CommonNameValue, sizeof(utf8CommonNameValue) }, - /* The following tests succeed under Windows, but really should fail, - * they contain characters that are illegal for the encoding. I'm - * including them to justify my lazy encoding. - */ - { { CERT_RDN_IA5_STRING, { sizeof(bogusIA5), (BYTE *)bogusIA5 } }, bin42, - sizeof(bin42) }, - { { CERT_RDN_PRINTABLE_STRING, { sizeof(bogusPrintable), - (BYTE *)bogusPrintable } }, bin43, sizeof(bin43) }, - { { CERT_RDN_NUMERIC_STRING, { sizeof(bogusNumeric), (BYTE *)bogusNumeric } }, - bin44, sizeof(bin44) }, -}; -/* This is kept separate, because the decoding doesn't return to the original - * value. - */ -static struct EncodedNameValue embeddedNullNameValue = { - { CERT_RDN_IA5_STRING, { sizeof(embedded_null) - 1, (BYTE *)embedded_null } }, - ia5EmbeddedNull, sizeof(ia5EmbeddedNull) }; - -static void test_encodeNameValue(DWORD dwEncoding) -{ - BYTE *buf = NULL; - DWORD size = 0, i; - BOOL ret; - CERT_NAME_VALUE value = { 0, { 0, NULL } }; - - value.dwValueType = CERT_RDN_ENCODED_BLOB; - value.Value.pbData = printableCommonNameValue; - value.Value.cbData = sizeof(printableCommonNameValue); - ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME_VALUE, &value, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(printableCommonNameValue), "Unexpected size %d\n", - size); - ok(!memcmp(buf, printableCommonNameValue, size), - "Unexpected encoding\n"); - LocalFree(buf); - } - for (i = 0; i < sizeof(nameValues) / sizeof(nameValues[0]); i++) - { - ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME_VALUE, - &nameValues[i].value, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret || broken(GetLastError() == OSS_PDU_MISMATCH) /* NT4/Win9x */, - "Type %d: CryptEncodeObjectEx failed: %08x\n", - nameValues[i].value.dwValueType, GetLastError()); - if (ret) - { - ok(size == nameValues[i].encodedSize, - "Expected size %d, got %d\n", nameValues[i].encodedSize, size); - ok(!memcmp(buf, nameValues[i].encoded, size), - "Got unexpected encoding\n"); - LocalFree(buf); - } - } - ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME_VALUE, - &embeddedNullNameValue.value, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret || broken(GetLastError() == OSS_PDU_MISMATCH) /* NT4/Win9x */, - "Type %d: CryptEncodeObjectEx failed: %08x\n", - embeddedNullNameValue.value.dwValueType, GetLastError()); - if (ret) - { - ok(size == embeddedNullNameValue.encodedSize, - "Expected size %d, got %d\n", embeddedNullNameValue.encodedSize, size); - ok(!memcmp(buf, embeddedNullNameValue.encoded, size), - "Got unexpected encoding\n"); - LocalFree(buf); - } -} - -static void test_decodeNameValue(DWORD dwEncoding) -{ - int i; - BYTE *buf = NULL; - DWORD bufSize = 0; - BOOL ret; - - for (i = 0; i < sizeof(nameValues) / sizeof(nameValues[0]); i++) - { - ret = pCryptDecodeObjectEx(dwEncoding, X509_NAME_VALUE, - nameValues[i].encoded, nameValues[i].encoded[1] + 2, - CRYPT_DECODE_ALLOC_FLAG | CRYPT_DECODE_SHARE_OID_STRING_FLAG, NULL, - &buf, &bufSize); - ok(ret, "Value type %d: CryptDecodeObjectEx failed: %08x\n", - nameValues[i].value.dwValueType, GetLastError()); - if (ret) - { - compareNameValues(&nameValues[i].value, - (const CERT_NAME_VALUE *)buf); - LocalFree(buf); - } - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_NAME_VALUE, - embeddedNullNameValue.encoded, embeddedNullNameValue.encodedSize, - CRYPT_DECODE_ALLOC_FLAG | CRYPT_DECODE_SHARE_OID_STRING_FLAG, NULL, - &buf, &bufSize); - /* Some Windows versions disallow name values with embedded NULLs, so - * either success or failure is acceptable. - */ - if (ret) - { - CERT_NAME_VALUE rdnEncodedValue = { CERT_RDN_ENCODED_BLOB, - { sizeof(ia5EmbeddedNull), ia5EmbeddedNull } }; - CERT_NAME_VALUE embeddedNullValue = { CERT_RDN_IA5_STRING, - { sizeof(embedded_null) - 1, (BYTE *)embedded_null } }; - const CERT_NAME_VALUE *got = (const CERT_NAME_VALUE *)buf, - *expected = NULL; - - /* Some Windows versions decode name values with embedded NULLs, - * others leave them encoded, even with the same version of crypt32. - * Accept either. - */ - ok(got->dwValueType == CERT_RDN_ENCODED_BLOB || - got->dwValueType == CERT_RDN_IA5_STRING, - "Expected CERT_RDN_ENCODED_BLOB or CERT_RDN_IA5_STRING, got %d\n", - got->dwValueType); - if (got->dwValueType == CERT_RDN_ENCODED_BLOB) - expected = &rdnEncodedValue; - else if (got->dwValueType == CERT_RDN_IA5_STRING) - expected = &embeddedNullValue; - if (expected) - { - ok(got->Value.cbData == expected->Value.cbData, - "String type %d: unexpected data size, got %d, expected %d\n", - got->dwValueType, got->Value.cbData, expected->Value.cbData); - if (got->Value.cbData && got->Value.pbData) - ok(!memcmp(got->Value.pbData, expected->Value.pbData, - min(got->Value.cbData, expected->Value.cbData)), - "String type %d: unexpected value\n", expected->dwValueType); - } - LocalFree(buf); - } -} - -static const BYTE emptyURL[] = { 0x30, 0x02, 0x86, 0x00 }; -static const BYTE emptyURLExtraBytes[] = { 0x30, 0x02, 0x86, 0x00, 0, 0, 0 }; -static const WCHAR url[] = { 'h','t','t','p',':','/','/','w','i','n','e', - 'h','q','.','o','r','g',0 }; -static const BYTE encodedURL[] = { 0x30, 0x13, 0x86, 0x11, 0x68, 0x74, - 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x69, 0x6e, 0x65, 0x68, 0x71, 0x2e, - 0x6f, 0x72, 0x67 }; -static const WCHAR nihongoURL[] = { 'h','t','t','p',':','/','/',0x226f, - 0x575b, 0 }; -static const WCHAR dnsName[] = { 'w','i','n','e','h','q','.','o','r','g',0 }; -static const BYTE encodedDnsName[] = { 0x30, 0x0c, 0x82, 0x0a, 0x77, 0x69, - 0x6e, 0x65, 0x68, 0x71, 0x2e, 0x6f, 0x72, 0x67 }; -static const BYTE localhost[] = { 127, 0, 0, 1 }; -static const BYTE encodedIPAddr[] = { 0x30, 0x06, 0x87, 0x04, 0x7f, 0x00, 0x00, - 0x01 }; -static const unsigned char encodedCommonName[] = { - 0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,'J','u','a','n',' ','L','a','n','g',0}; -static const BYTE encodedOidName[] = { 0x30,0x04,0x88,0x02,0x2a,0x03 }; -static const BYTE encodedDirectoryName[] = { -0x30,0x19,0xa4,0x17,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03, -0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00 }; - -static void test_encodeAltName(DWORD dwEncoding) -{ - CERT_ALT_NAME_INFO info = { 0 }; - CERT_ALT_NAME_ENTRY entry = { 0 }; - BYTE *buf = NULL; - DWORD size = 0; - BOOL ret; - char oid[] = "1.2.3"; - - /* Test with empty info */ - ret = pCryptEncodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (buf) - { - ok(size == sizeof(emptySequence), "Wrong size %d\n", size); - ok(!memcmp(buf, emptySequence, size), "Unexpected value\n"); - LocalFree(buf); - } - /* Test with an empty entry */ - info.cAltEntry = 1; - info.rgAltEntry = &entry; - ret = pCryptEncodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* Test with an empty pointer */ - entry.dwAltNameChoice = CERT_ALT_NAME_URL; - ret = pCryptEncodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (buf) - { - ok(size == sizeof(emptyURL), "Wrong size %d\n", size); - ok(!memcmp(buf, emptyURL, size), "Unexpected value\n"); - LocalFree(buf); - } - /* Test with a real URL */ - U(entry).pwszURL = (LPWSTR)url; - ret = pCryptEncodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (buf) - { - ok(size == sizeof(encodedURL), "Wrong size %d\n", size); - ok(!memcmp(buf, encodedURL, size), "Unexpected value\n"); - LocalFree(buf); - } - /* Now with the URL containing an invalid IA5 char */ - U(entry).pwszURL = (LPWSTR)nihongoURL; - ret = pCryptEncodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == CRYPT_E_INVALID_IA5_STRING, - "Expected CRYPT_E_INVALID_IA5_STRING, got %08x\n", GetLastError()); - /* The first invalid character is at index 7 */ - ok(GET_CERT_ALT_NAME_VALUE_ERR_INDEX(size) == 7, - "Expected invalid char at index 7, got %d\n", - GET_CERT_ALT_NAME_VALUE_ERR_INDEX(size)); - /* Now with the URL missing a scheme */ - U(entry).pwszURL = (LPWSTR)dnsName; - ret = pCryptEncodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - /* This succeeds, but it shouldn't, so don't worry about conforming */ - LocalFree(buf); - } - /* Now with a DNS name */ - entry.dwAltNameChoice = CERT_ALT_NAME_DNS_NAME; - ret = pCryptEncodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(encodedDnsName), "Wrong size %d\n", size); - ok(!memcmp(buf, encodedDnsName, size), "Unexpected value\n"); - LocalFree(buf); - } - /* Test with an IP address */ - entry.dwAltNameChoice = CERT_ALT_NAME_IP_ADDRESS; - U(entry).IPAddress.cbData = sizeof(localhost); - U(entry).IPAddress.pbData = (LPBYTE)localhost; - ret = pCryptEncodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (buf) - { - ok(size == sizeof(encodedIPAddr), "Wrong size %d\n", size); - ok(!memcmp(buf, encodedIPAddr, size), "Unexpected value\n"); - LocalFree(buf); - } - /* Test with OID */ - entry.dwAltNameChoice = CERT_ALT_NAME_REGISTERED_ID; - U(entry).pszRegisteredID = oid; - ret = pCryptEncodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (buf) - { - ok(size == sizeof(encodedOidName), "Wrong size %d\n", size); - ok(!memcmp(buf, encodedOidName, size), "Unexpected value\n"); - LocalFree(buf); - } - /* Test with directory name */ - entry.dwAltNameChoice = CERT_ALT_NAME_DIRECTORY_NAME; - U(entry).DirectoryName.cbData = sizeof(encodedCommonName); - U(entry).DirectoryName.pbData = (LPBYTE)encodedCommonName; - ret = pCryptEncodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (buf) - { - ok(size == sizeof(encodedDirectoryName), "Wrong size %d\n", size); - ok(!memcmp(buf, encodedDirectoryName, size), "Unexpected value\n"); - LocalFree(buf); - } -} - -static void test_decodeAltName(DWORD dwEncoding) -{ - static const BYTE unimplementedType[] = { 0x30, 0x06, 0x85, 0x04, 0x7f, - 0x00, 0x00, 0x01 }; - static const BYTE bogusType[] = { 0x30, 0x06, 0x89, 0x04, 0x7f, 0x00, 0x00, - 0x01 }; - static const BYTE dns_embedded_null[] = { 0x30,0x10,0x82,0x0e,0x66,0x6f, - 0x6f,0x2e,0x63,0x6f,0x6d,0x00,0x62,0x61,0x64,0x64,0x69,0x65 }; - static const BYTE dns_embedded_bell[] = { 0x30,0x10,0x82,0x0e,0x66,0x6f, - 0x6f,0x2e,0x63,0x6f,0x6d,0x07,0x62,0x61,0x64,0x64,0x69,0x65 }; - static const BYTE url_embedded_null[] = { 0x30,0x10,0x86,0x0e,0x66,0x6f, - 0x6f,0x2e,0x63,0x6f,0x6d,0x00,0x62,0x61,0x64,0x64,0x69,0x65 }; - BOOL ret; - BYTE *buf = NULL; - DWORD bufSize = 0; - CERT_ALT_NAME_INFO *info; - - /* Test some bogus ones first */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, - unimplementedType, sizeof(unimplementedType), CRYPT_DECODE_ALLOC_FLAG, - NULL, &buf, &bufSize); - ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == OSS_DATA_ERROR /* Win9x */), - "Expected CRYPT_E_ASN1_BADTAG or OSS_DATA_ERROR, got %08x\n", - GetLastError()); - ret = pCryptDecodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, - bogusType, sizeof(bogusType), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, - &bufSize); - ok(!ret && (GetLastError() == CRYPT_E_ASN1_CORRUPT || - GetLastError() == OSS_DATA_ERROR /* Win9x */), - "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n", - GetLastError()); - /* Now expected cases */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, emptySequence, - emptySequence[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - info = (CERT_ALT_NAME_INFO *)buf; - - ok(info->cAltEntry == 0, "Expected 0 entries, got %d\n", - info->cAltEntry); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, emptyURL, - emptyURL[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - info = (CERT_ALT_NAME_INFO *)buf; - - ok(info->cAltEntry == 1, "Expected 1 entries, got %d\n", - info->cAltEntry); - ok(info->rgAltEntry[0].dwAltNameChoice == CERT_ALT_NAME_URL, - "Expected CERT_ALT_NAME_URL, got %d\n", - info->rgAltEntry[0].dwAltNameChoice); - ok(U(info->rgAltEntry[0]).pwszURL == NULL || !*U(info->rgAltEntry[0]).pwszURL, - "Expected empty URL\n"); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, - emptyURLExtraBytes, sizeof(emptyURLExtraBytes), 0, NULL, NULL, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - ret = pCryptDecodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, encodedURL, - encodedURL[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - info = (CERT_ALT_NAME_INFO *)buf; - - ok(info->cAltEntry == 1, "Expected 1 entries, got %d\n", - info->cAltEntry); - ok(info->rgAltEntry[0].dwAltNameChoice == CERT_ALT_NAME_URL, - "Expected CERT_ALT_NAME_URL, got %d\n", - info->rgAltEntry[0].dwAltNameChoice); - ok(!lstrcmpW(U(info->rgAltEntry[0]).pwszURL, url), "Unexpected URL\n"); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, encodedDnsName, - encodedDnsName[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - info = (CERT_ALT_NAME_INFO *)buf; - - ok(info->cAltEntry == 1, "Expected 1 entries, got %d\n", - info->cAltEntry); - ok(info->rgAltEntry[0].dwAltNameChoice == CERT_ALT_NAME_DNS_NAME, - "Expected CERT_ALT_NAME_DNS_NAME, got %d\n", - info->rgAltEntry[0].dwAltNameChoice); - ok(!lstrcmpW(U(info->rgAltEntry[0]).pwszDNSName, dnsName), - "Unexpected DNS name\n"); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, encodedIPAddr, - encodedIPAddr[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - info = (CERT_ALT_NAME_INFO *)buf; - - ok(info->cAltEntry == 1, "Expected 1 entries, got %d\n", - info->cAltEntry); - ok(info->rgAltEntry[0].dwAltNameChoice == CERT_ALT_NAME_IP_ADDRESS, - "Expected CERT_ALT_NAME_IP_ADDRESS, got %d\n", - info->rgAltEntry[0].dwAltNameChoice); - ok(U(info->rgAltEntry[0]).IPAddress.cbData == sizeof(localhost), - "Unexpected IP address length %d\n", - U(info->rgAltEntry[0]).IPAddress.cbData); - ok(!memcmp(U(info->rgAltEntry[0]).IPAddress.pbData, localhost, - sizeof(localhost)), "Unexpected IP address value\n"); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, encodedOidName, - sizeof(encodedOidName), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - info = (CERT_ALT_NAME_INFO *)buf; - - ok(info->cAltEntry == 1, "Expected 1 entries, got %d\n", - info->cAltEntry); - ok(info->rgAltEntry[0].dwAltNameChoice == CERT_ALT_NAME_REGISTERED_ID, - "Expected CERT_ALT_NAME_REGISTERED_ID, got %d\n", - info->rgAltEntry[0].dwAltNameChoice); - ok(!strcmp(U(info->rgAltEntry[0]).pszRegisteredID, "1.2.3"), - "Expected OID 1.2.3, got %s\n", U(info->rgAltEntry[0]).pszRegisteredID); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, - encodedDirectoryName, sizeof(encodedDirectoryName), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - info = (CERT_ALT_NAME_INFO *)buf; - - ok(info->cAltEntry == 1, "Expected 1 entries, got %d\n", - info->cAltEntry); - ok(info->rgAltEntry[0].dwAltNameChoice == CERT_ALT_NAME_DIRECTORY_NAME, - "Expected CERT_ALT_NAME_DIRECTORY_NAME, got %d\n", - info->rgAltEntry[0].dwAltNameChoice); - ok(U(info->rgAltEntry[0]).DirectoryName.cbData == - sizeof(encodedCommonName), "Unexpected directory name length %d\n", - U(info->rgAltEntry[0]).DirectoryName.cbData); - ok(!memcmp(U(info->rgAltEntry[0]).DirectoryName.pbData, - encodedCommonName, sizeof(encodedCommonName)), - "Unexpected directory name value\n"); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, - dns_embedded_null, sizeof(dns_embedded_null), CRYPT_DECODE_ALLOC_FLAG, - NULL, &buf, &bufSize); - /* Fails on WinXP with CRYPT_E_ASN1_RULE. I'm not too concerned about the - * particular failure, just that it doesn't decode. - * It succeeds on (broken) Windows versions that haven't addressed - * embedded NULLs in alternate names. - */ - ok(!ret || broken(ret), "expected failure\n"); - /* An embedded bell character is allowed, however. */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, - dns_embedded_bell, sizeof(dns_embedded_bell), CRYPT_DECODE_ALLOC_FLAG, - NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - info = (CERT_ALT_NAME_INFO *)buf; - - ok(info->cAltEntry == 1, "Expected 1 entries, got %d\n", - info->cAltEntry); - ok(info->rgAltEntry[0].dwAltNameChoice == CERT_ALT_NAME_DNS_NAME, - "Expected CERT_ALT_NAME_DNS_NAME, got %d\n", - info->rgAltEntry[0].dwAltNameChoice); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, - url_embedded_null, sizeof(dns_embedded_null), CRYPT_DECODE_ALLOC_FLAG, - NULL, &buf, &bufSize); - /* Again, fails on WinXP with CRYPT_E_ASN1_RULE. I'm not too concerned - * about the particular failure, just that it doesn't decode. - * It succeeds on (broken) Windows versions that haven't addressed - * embedded NULLs in alternate names. - */ - ok(!ret || broken(ret), "expected failure\n"); -} - -struct UnicodeExpectedError -{ - DWORD valueType; - LPCWSTR str; - DWORD errorIndex; - DWORD error; -}; - -static const WCHAR oneW[] = { '1',0 }; -static const WCHAR aW[] = { 'a',0 }; -static const WCHAR quoteW[] = { '"', 0 }; - -static struct UnicodeExpectedError unicodeErrors[] = { - { CERT_RDN_ANY_TYPE, oneW, 0, CRYPT_E_NOT_CHAR_STRING }, - { CERT_RDN_ENCODED_BLOB, oneW, 0, CRYPT_E_NOT_CHAR_STRING }, - { CERT_RDN_OCTET_STRING, oneW, 0, CRYPT_E_NOT_CHAR_STRING }, - { CERT_RDN_NUMERIC_STRING, aW, 0, CRYPT_E_INVALID_NUMERIC_STRING }, - { CERT_RDN_PRINTABLE_STRING, quoteW, 0, CRYPT_E_INVALID_PRINTABLE_STRING }, - { CERT_RDN_IA5_STRING, nihongoURL, 7, CRYPT_E_INVALID_IA5_STRING }, -}; - -struct UnicodeExpectedResult -{ - DWORD valueType; - LPCWSTR str; - CRYPT_DATA_BLOB encoded; -}; - -static BYTE oneNumeric[] = { 0x12, 0x01, 0x31 }; -static BYTE onePrintable[] = { 0x13, 0x01, 0x31 }; -static BYTE oneTeletex[] = { 0x14, 0x01, 0x31 }; -static BYTE oneVideotex[] = { 0x15, 0x01, 0x31 }; -static BYTE oneIA5[] = { 0x16, 0x01, 0x31 }; -static BYTE oneGraphic[] = { 0x19, 0x01, 0x31 }; -static BYTE oneVisible[] = { 0x1a, 0x01, 0x31 }; -static BYTE oneUniversal[] = { 0x1c, 0x04, 0x00, 0x00, 0x00, 0x31 }; -static BYTE oneGeneral[] = { 0x1b, 0x01, 0x31 }; -static BYTE oneBMP[] = { 0x1e, 0x02, 0x00, 0x31 }; -static BYTE oneUTF8[] = { 0x0c, 0x01, 0x31 }; -static BYTE nihongoT61[] = { 0x14,0x09,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6f, - 0x5b }; -static BYTE nihongoGeneral[] = { 0x1b,0x09,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f, - 0x6f,0x5b }; -static BYTE nihongoBMP[] = { 0x1e,0x12,0x00,0x68,0x00,0x74,0x00,0x74,0x00,0x70, - 0x00,0x3a,0x00,0x2f,0x00,0x2f,0x22,0x6f,0x57,0x5b }; -static BYTE nihongoUTF8[] = { 0x0c,0x0d,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f, - 0xe2,0x89,0xaf,0xe5,0x9d,0x9b }; - -static struct UnicodeExpectedResult unicodeResults[] = { - { CERT_RDN_NUMERIC_STRING, oneW, { sizeof(oneNumeric), oneNumeric } }, - { CERT_RDN_PRINTABLE_STRING, oneW, { sizeof(onePrintable), onePrintable } }, - { CERT_RDN_TELETEX_STRING, oneW, { sizeof(oneTeletex), oneTeletex } }, - { CERT_RDN_VIDEOTEX_STRING, oneW, { sizeof(oneVideotex), oneVideotex } }, - { CERT_RDN_IA5_STRING, oneW, { sizeof(oneIA5), oneIA5 } }, - { CERT_RDN_GRAPHIC_STRING, oneW, { sizeof(oneGraphic), oneGraphic } }, - { CERT_RDN_VISIBLE_STRING, oneW, { sizeof(oneVisible), oneVisible } }, - { CERT_RDN_UNIVERSAL_STRING, oneW, { sizeof(oneUniversal), oneUniversal } }, - { CERT_RDN_GENERAL_STRING, oneW, { sizeof(oneGeneral), oneGeneral } }, - { CERT_RDN_BMP_STRING, oneW, { sizeof(oneBMP), oneBMP } }, - { CERT_RDN_UTF8_STRING, oneW, { sizeof(oneUTF8), oneUTF8 } }, - { CERT_RDN_BMP_STRING, nihongoURL, { sizeof(nihongoBMP), nihongoBMP } }, - { CERT_RDN_UTF8_STRING, nihongoURL, { sizeof(nihongoUTF8), nihongoUTF8 } }, -}; - -static struct UnicodeExpectedResult unicodeWeirdness[] = { - { CERT_RDN_TELETEX_STRING, nihongoURL, { sizeof(nihongoT61), nihongoT61 } }, - { CERT_RDN_GENERAL_STRING, nihongoURL, { sizeof(nihongoGeneral), nihongoGeneral } }, -}; - -static void test_encodeUnicodeNameValue(DWORD dwEncoding) -{ - BYTE *buf = NULL; - DWORD size = 0, i; - BOOL ret; - CERT_NAME_VALUE value; - - if (0) - { - /* Crashes on win9x */ - ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME_VALUE, NULL, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); - } - /* Have to have a string of some sort */ - value.dwValueType = 0; /* aka CERT_RDN_ANY_TYPE */ - value.Value.pbData = NULL; - value.Value.cbData = 0; - ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME_VALUE, &value, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == CRYPT_E_NOT_CHAR_STRING, - "Expected CRYPT_E_NOT_CHAR_STRING, got %08x\n", GetLastError()); - value.dwValueType = CERT_RDN_ENCODED_BLOB; - ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME_VALUE, &value, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == CRYPT_E_NOT_CHAR_STRING, - "Expected CRYPT_E_NOT_CHAR_STRING, got %08x\n", GetLastError()); - value.dwValueType = CERT_RDN_ANY_TYPE; - value.Value.pbData = (LPBYTE)oneW; - ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME_VALUE, &value, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == CRYPT_E_NOT_CHAR_STRING, - "Expected CRYPT_E_NOT_CHAR_STRING, got %08x\n", GetLastError()); - value.Value.cbData = sizeof(oneW); - ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME_VALUE, &value, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == CRYPT_E_NOT_CHAR_STRING, - "Expected CRYPT_E_NOT_CHAR_STRING, got %08x\n", GetLastError()); - /* An encoded string with specified length isn't good enough either */ - value.dwValueType = CERT_RDN_ENCODED_BLOB; - value.Value.pbData = oneUniversal; - value.Value.cbData = sizeof(oneUniversal); - ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME_VALUE, &value, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == CRYPT_E_NOT_CHAR_STRING, - "Expected CRYPT_E_NOT_CHAR_STRING, got %08x\n", GetLastError()); - /* More failure checking */ - value.Value.cbData = 0; - for (i = 0; i < sizeof(unicodeErrors) / sizeof(unicodeErrors[0]); i++) - { - value.Value.pbData = (LPBYTE)unicodeErrors[i].str; - value.dwValueType = unicodeErrors[i].valueType; - ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME_VALUE, &value, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == unicodeErrors[i].error, - "Value type %d: expected %08x, got %08x\n", value.dwValueType, - unicodeErrors[i].error, GetLastError()); - ok(size == unicodeErrors[i].errorIndex, - "Expected error index %d, got %d\n", unicodeErrors[i].errorIndex, - size); - } - /* cbData can be zero if the string is NULL-terminated */ - value.Value.cbData = 0; - for (i = 0; i < sizeof(unicodeResults) / sizeof(unicodeResults[0]); i++) - { - value.Value.pbData = (LPBYTE)unicodeResults[i].str; - value.dwValueType = unicodeResults[i].valueType; - ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME_VALUE, &value, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret || broken(GetLastError() == OSS_PDU_MISMATCH /* Win9x */), - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == unicodeResults[i].encoded.cbData, - "Value type %d: expected size %d, got %d\n", - value.dwValueType, unicodeResults[i].encoded.cbData, size); - ok(!memcmp(unicodeResults[i].encoded.pbData, buf, size), - "Value type %d: unexpected value\n", value.dwValueType); - LocalFree(buf); - } - } - /* These "encode," but they do so by truncating each unicode character - * rather than properly encoding it. Kept separate from the proper results, - * because the encoded forms won't decode to their original strings. - */ - for (i = 0; i < sizeof(unicodeWeirdness) / sizeof(unicodeWeirdness[0]); i++) - { - value.Value.pbData = (LPBYTE)unicodeWeirdness[i].str; - value.dwValueType = unicodeWeirdness[i].valueType; - ret = pCryptEncodeObjectEx(dwEncoding, X509_UNICODE_NAME_VALUE, &value, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == unicodeWeirdness[i].encoded.cbData, - "Value type %d: expected size %d, got %d\n", - value.dwValueType, unicodeWeirdness[i].encoded.cbData, size); - ok(!memcmp(unicodeWeirdness[i].encoded.pbData, buf, size), - "Value type %d: unexpected value\n", value.dwValueType); - LocalFree(buf); - } - } -} - -static 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; -} - -static void test_decodeUnicodeNameValue(DWORD dwEncoding) -{ - DWORD i; - - for (i = 0; i < sizeof(unicodeResults) / sizeof(unicodeResults[0]); i++) - { - BYTE *buf = NULL; - BOOL ret; - DWORD size = 0; - - ret = pCryptDecodeObjectEx(dwEncoding, X509_UNICODE_NAME_VALUE, - unicodeResults[i].encoded.pbData, unicodeResults[i].encoded.cbData, - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret || broken(GetLastError() == CRYPT_E_NOT_CHAR_STRING /* Win9x */), - "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret && buf) - { - PCERT_NAME_VALUE value = (PCERT_NAME_VALUE)buf; - - ok(value->dwValueType == unicodeResults[i].valueType, - "Expected value type %d, got %d\n", unicodeResults[i].valueType, - value->dwValueType); - ok(!strncmpW((LPWSTR)value->Value.pbData, unicodeResults[i].str, - value->Value.cbData / sizeof(WCHAR)), - "Unexpected decoded value for index %d (value type %d)\n", i, - unicodeResults[i].valueType); - LocalFree(buf); - } - } -} - -struct encodedOctets -{ - const BYTE *val; - const BYTE *encoded; -}; - -static const unsigned char bin46[] = { 'h','i',0 }; -static const unsigned char bin47[] = { 0x04,0x02,'h','i',0 }; -static const unsigned char bin48[] = { - 's','o','m','e','l','o','n','g',0xff,'s','t','r','i','n','g',0 }; -static const unsigned char bin49[] = { - 0x04,0x0f,'s','o','m','e','l','o','n','g',0xff,'s','t','r','i','n','g',0 }; -static const unsigned char bin50[] = { 0 }; -static const unsigned char bin51[] = { 0x04,0x00,0 }; - -static const struct encodedOctets octets[] = { - { bin46, bin47 }, - { bin48, bin49 }, - { bin50, bin51 }, -}; - -static void test_encodeOctets(DWORD dwEncoding) -{ - CRYPT_DATA_BLOB blob; - DWORD i; - - for (i = 0; i < sizeof(octets) / sizeof(octets[0]); i++) - { - BYTE *buf = NULL; - BOOL ret; - DWORD bufSize = 0; - - blob.cbData = strlen((const char*)octets[i].val); - blob.pbData = (BYTE*)octets[i].val; - ret = pCryptEncodeObjectEx(dwEncoding, X509_OCTET_STRING, &blob, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %d\n", GetLastError()); - if (buf) - { - ok(buf[0] == 4, - "Got unexpected type %d for octet string (expected 4)\n", buf[0]); - ok(buf[1] == octets[i].encoded[1], "Got length %d, expected %d\n", - buf[1], octets[i].encoded[1]); - ok(!memcmp(buf + 1, octets[i].encoded + 1, - octets[i].encoded[1] + 1), "Got unexpected value\n"); - LocalFree(buf); - } - } -} - -static void test_decodeOctets(DWORD dwEncoding) -{ - DWORD i; - - for (i = 0; i < sizeof(octets) / sizeof(octets[0]); i++) - { - BYTE *buf = NULL; - BOOL ret; - DWORD bufSize = 0; - - ret = pCryptDecodeObjectEx(dwEncoding, X509_OCTET_STRING, - octets[i].encoded, octets[i].encoded[1] + 2, - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - ok(bufSize >= sizeof(CRYPT_DATA_BLOB) + octets[i].encoded[1], - "Expected size >= %d, got %d\n", - (int)sizeof(CRYPT_DATA_BLOB) + octets[i].encoded[1], bufSize); - ok(buf != NULL, "Expected allocated buffer\n"); - if (buf) - { - CRYPT_DATA_BLOB *blob = (CRYPT_DATA_BLOB *)buf; - - if (blob->cbData) - ok(!memcmp(blob->pbData, octets[i].val, blob->cbData), - "Unexpected value\n"); - LocalFree(buf); - } - } -} - -static const BYTE bytesToEncode[] = { 0xff, 0xff }; - -struct encodedBits -{ - DWORD cUnusedBits; - const BYTE *encoded; - DWORD cbDecoded; - const BYTE *decoded; -}; - -static const unsigned char bin52[] = { 0x03,0x03,0x00,0xff,0xff }; -static const unsigned char bin53[] = { 0xff,0xff }; -static const unsigned char bin54[] = { 0x03,0x03,0x01,0xff,0xfe }; -static const unsigned char bin55[] = { 0xff,0xfe }; -static const unsigned char bin56[] = { 0x03,0x02,0x01,0xfe }; -static const unsigned char bin57[] = { 0xfe }; -static const unsigned char bin58[] = { 0x03,0x01,0x00 }; - -static const struct encodedBits bits[] = { - /* normal test cases */ - { 0, bin52, 2, bin53 }, - { 1, bin54, 2, bin55 }, - /* strange test case, showing cUnusedBits >= 8 is allowed */ - { 9, bin56, 1, bin57 }, -}; - -static void test_encodeBits(DWORD dwEncoding) -{ - DWORD i; - - for (i = 0; i < sizeof(bits) / sizeof(bits[0]); i++) - { - CRYPT_BIT_BLOB blob; - BOOL ret; - BYTE *buf = NULL; - DWORD bufSize = 0; - - blob.cbData = sizeof(bytesToEncode); - blob.pbData = (BYTE *)bytesToEncode; - blob.cUnusedBits = bits[i].cUnusedBits; - ret = pCryptEncodeObjectEx(dwEncoding, X509_BITS, &blob, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(bufSize == bits[i].encoded[1] + 2, - "%d: Got unexpected size %d, expected %d\n", i, bufSize, - bits[i].encoded[1] + 2); - ok(!memcmp(buf, bits[i].encoded, bits[i].encoded[1] + 2), - "%d: Unexpected value\n", i); - LocalFree(buf); - } - } -} - -static void test_decodeBits(DWORD dwEncoding) -{ - static const BYTE ber[] = "\x03\x02\x01\xff"; - static const BYTE berDecoded = 0xfe; - DWORD i; - BOOL ret; - BYTE *buf = NULL; - DWORD bufSize = 0; - - /* normal cases */ - for (i = 0; i < sizeof(bits) / sizeof(bits[0]); i++) - { - ret = pCryptDecodeObjectEx(dwEncoding, X509_BITS, bits[i].encoded, - bits[i].encoded[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, - &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CRYPT_BIT_BLOB *blob; - - ok(bufSize >= sizeof(CRYPT_BIT_BLOB) + bits[i].cbDecoded, - "Got unexpected size %d\n", bufSize); - blob = (CRYPT_BIT_BLOB *)buf; - ok(blob->cbData == bits[i].cbDecoded, - "Got unexpected length %d, expected %d\n", blob->cbData, - bits[i].cbDecoded); - if (blob->cbData && bits[i].cbDecoded) - ok(!memcmp(blob->pbData, bits[i].decoded, bits[i].cbDecoded), - "Unexpected value\n"); - LocalFree(buf); - } - } - /* special case: check that something that's valid in BER but not in DER - * decodes successfully - */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_BITS, ber, ber[1] + 2, - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CRYPT_BIT_BLOB *blob; - - ok(bufSize >= sizeof(CRYPT_BIT_BLOB) + sizeof(berDecoded), - "Got unexpected size %d\n", bufSize); - blob = (CRYPT_BIT_BLOB *)buf; - ok(blob->cbData == sizeof(berDecoded), - "Got unexpected length %d\n", blob->cbData); - if (blob->cbData) - ok(*blob->pbData == berDecoded, "Unexpected value\n"); - LocalFree(buf); - } -} - -struct Constraints2 -{ - CERT_BASIC_CONSTRAINTS2_INFO info; - const BYTE *encoded; -}; - -static const unsigned char bin59[] = { 0x30,0x00 }; -static const unsigned char bin60[] = { 0x30,0x03,0x01,0x01,0xff }; -static const unsigned char bin61[] = { 0x30,0x03,0x02,0x01,0x00 }; -static const unsigned char bin62[] = { 0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01 }; -static const struct Constraints2 constraints2[] = { - /* empty constraints */ - { { FALSE, FALSE, 0}, bin59 }, - /* can be a CA */ - { { TRUE, FALSE, 0}, bin60 }, - /* has path length constraints set (MSDN implies fCA needs to be TRUE as well, - * but that's not the case - */ - { { FALSE, TRUE, 0}, bin61 }, - /* can be a CA and has path length constraints set */ - { { TRUE, TRUE, 1}, bin62 }, -}; - -static const BYTE emptyConstraint[] = { 0x30, 0x03, 0x03, 0x01, 0x00 }; -static const BYTE encodedDomainName[] = { 0x30, 0x2b, 0x31, 0x29, 0x30, 0x11, - 0x06, 0x0a, 0x09, 0x92, 0x26, 0x89, 0x93, 0xf2, 0x2c, 0x64, 0x01, 0x19, 0x16, - 0x03, 0x6f, 0x72, 0x67, 0x30, 0x14, 0x06, 0x0a, 0x09, 0x92, 0x26, 0x89, 0x93, - 0xf2, 0x2c, 0x64, 0x01, 0x19, 0x16, 0x06, 0x77, 0x69, 0x6e, 0x65, 0x68, 0x71 }; -static const BYTE constraintWithDomainName[] = { 0x30, 0x32, 0x03, 0x01, 0x00, - 0x30, 0x2d, 0x30, 0x2b, 0x31, 0x29, 0x30, 0x11, 0x06, 0x0a, 0x09, 0x92, 0x26, - 0x89, 0x93, 0xf2, 0x2c, 0x64, 0x01, 0x19, 0x16, 0x03, 0x6f, 0x72, 0x67, 0x30, - 0x14, 0x06, 0x0a, 0x09, 0x92, 0x26, 0x89, 0x93, 0xf2, 0x2c, 0x64, 0x01, 0x19, - 0x16, 0x06, 0x77, 0x69, 0x6e, 0x65, 0x68, 0x71 }; - -static void test_encodeBasicConstraints(DWORD dwEncoding) -{ - DWORD i, bufSize = 0; - CERT_BASIC_CONSTRAINTS_INFO info = { { 0 } }; - CERT_NAME_BLOB nameBlob = { sizeof(encodedDomainName), - (LPBYTE)encodedDomainName }; - BOOL ret; - BYTE *buf = NULL; - - /* First test with the simpler info2 */ - for (i = 0; i < sizeof(constraints2) / sizeof(constraints2[0]); i++) - { - ret = pCryptEncodeObjectEx(dwEncoding, X509_BASIC_CONSTRAINTS2, - &constraints2[i].info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, - &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(bufSize == constraints2[i].encoded[1] + 2, - "Expected %d bytes, got %d\n", constraints2[i].encoded[1] + 2, - bufSize); - ok(!memcmp(buf, constraints2[i].encoded, - constraints2[i].encoded[1] + 2), "Unexpected value\n"); - LocalFree(buf); - } - } - /* Now test with more complex basic constraints */ - info.SubjectType.cbData = 0; - info.fPathLenConstraint = FALSE; - info.cSubtreesConstraint = 0; - ret = pCryptEncodeObjectEx(dwEncoding, X509_BASIC_CONSTRAINTS, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret || GetLastError() == OSS_BAD_PTR /* Win9x */, - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(bufSize == sizeof(emptyConstraint), "Wrong size %d\n", bufSize); - ok(!memcmp(buf, emptyConstraint, sizeof(emptyConstraint)), - "Unexpected value\n"); - LocalFree(buf); - } - /* None of the certs I examined had any subtree constraint, but I test one - * anyway just in case. - */ - info.cSubtreesConstraint = 1; - info.rgSubtreesConstraint = &nameBlob; - ret = pCryptEncodeObjectEx(dwEncoding, X509_BASIC_CONSTRAINTS, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret || GetLastError() == OSS_BAD_PTR /* Win9x */, - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(bufSize == sizeof(constraintWithDomainName), "Wrong size %d\n", bufSize); - ok(!memcmp(buf, constraintWithDomainName, - sizeof(constraintWithDomainName)), "Unexpected value\n"); - LocalFree(buf); - } - /* FIXME: test encoding with subject type. */ -} - -static const unsigned char bin63[] = { 0x30,0x06,0x01,0x01,0x01,0x02,0x01,0x01 }; - -static void test_decodeBasicConstraints(DWORD dwEncoding) -{ - static const BYTE inverted[] = { 0x30, 0x06, 0x02, 0x01, 0x01, 0x01, 0x01, - 0xff }; - static const struct Constraints2 badBool = { { TRUE, TRUE, 1 }, bin63 }; - DWORD i; - BOOL ret; - BYTE *buf = NULL; - DWORD bufSize = 0; - - /* First test with simpler info2 */ - for (i = 0; i < sizeof(constraints2) / sizeof(constraints2[0]); i++) - { - ret = pCryptDecodeObjectEx(dwEncoding, X509_BASIC_CONSTRAINTS2, - constraints2[i].encoded, constraints2[i].encoded[1] + 2, - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed for item %d: %08x\n", i, - GetLastError()); - if (buf) - { - CERT_BASIC_CONSTRAINTS2_INFO *info = - (CERT_BASIC_CONSTRAINTS2_INFO *)buf; - - ok(!memcmp(info, &constraints2[i].info, sizeof(*info)), - "Unexpected value for item %d\n", i); - LocalFree(buf); - } - } - /* Check with the order of encoded elements inverted */ - buf = (PBYTE)1; - ret = pCryptDecodeObjectEx(dwEncoding, X509_BASIC_CONSTRAINTS2, - inverted, inverted[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, - &bufSize); - ok(!ret && (GetLastError() == CRYPT_E_ASN1_CORRUPT || - GetLastError() == OSS_DATA_ERROR /* Win9x */), - "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n", - GetLastError()); - ok(!buf, "Expected buf to be set to NULL\n"); - /* Check with a non-DER bool */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_BASIC_CONSTRAINTS2, - badBool.encoded, badBool.encoded[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, - &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CERT_BASIC_CONSTRAINTS2_INFO *info = - (CERT_BASIC_CONSTRAINTS2_INFO *)buf; - - ok(!memcmp(info, &badBool.info, sizeof(*info)), "Unexpected value\n"); - LocalFree(buf); - } - /* Check with a non-basic constraints value */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_BASIC_CONSTRAINTS2, - encodedCommonName, encodedCommonName[1] + 2, - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(!ret && (GetLastError() == CRYPT_E_ASN1_CORRUPT || - GetLastError() == OSS_DATA_ERROR /* Win9x */), - "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n", - GetLastError()); - /* Now check with the more complex CERT_BASIC_CONSTRAINTS_INFO */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_BASIC_CONSTRAINTS, - emptyConstraint, sizeof(emptyConstraint), CRYPT_DECODE_ALLOC_FLAG, NULL, - &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CERT_BASIC_CONSTRAINTS_INFO *info = (CERT_BASIC_CONSTRAINTS_INFO *)buf; - - ok(info->SubjectType.cbData == 0, "Expected no subject type\n"); - ok(!info->fPathLenConstraint, "Expected no path length constraint\n"); - ok(info->cSubtreesConstraint == 0, "Expected no subtree constraints\n"); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_BASIC_CONSTRAINTS, - constraintWithDomainName, sizeof(constraintWithDomainName), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CERT_BASIC_CONSTRAINTS_INFO *info = (CERT_BASIC_CONSTRAINTS_INFO *)buf; - - ok(info->SubjectType.cbData == 0, "Expected no subject type\n"); - ok(!info->fPathLenConstraint, "Expected no path length constraint\n"); - ok(info->cSubtreesConstraint == 1, "Expected a subtree constraint\n"); - if (info->cSubtreesConstraint && info->rgSubtreesConstraint) - { - ok(info->rgSubtreesConstraint[0].cbData == - sizeof(encodedDomainName), "Wrong size %d\n", - info->rgSubtreesConstraint[0].cbData); - ok(!memcmp(info->rgSubtreesConstraint[0].pbData, encodedDomainName, - sizeof(encodedDomainName)), "Unexpected value\n"); - } - LocalFree(buf); - } -} - -/* These are terrible public keys of course, I'm just testing encoding */ -static const BYTE modulus1[] = { 0,0,0,1,1,1,1,1 }; -static const BYTE modulus2[] = { 1,1,1,1,1,0,0,0 }; -static const BYTE modulus3[] = { 0x80,1,1,1,1,0,0,0 }; -static const BYTE modulus4[] = { 1,1,1,1,1,0,0,0x80 }; -static const BYTE mod1_encoded[] = { 0x30,0x0f,0x02,0x08,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x02,0x03,0x01,0x00,0x01 }; -static const BYTE mod2_encoded[] = { 0x30,0x0c,0x02,0x05,0x01,0x01,0x01,0x01,0x01,0x02,0x03,0x01,0x00,0x01 }; -static const BYTE mod3_encoded[] = { 0x30,0x0c,0x02,0x05,0x01,0x01,0x01,0x01,0x80,0x02,0x03,0x01,0x00,0x01 }; -static const BYTE mod4_encoded[] = { 0x30,0x10,0x02,0x09,0x00,0x80,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x02,0x03,0x01,0x00,0x01 }; - -struct EncodedRSAPubKey -{ - const BYTE *modulus; - size_t modulusLen; - const BYTE *encoded; - size_t decodedModulusLen; -}; - -struct EncodedRSAPubKey rsaPubKeys[] = { - { modulus1, sizeof(modulus1), mod1_encoded, sizeof(modulus1) }, - { modulus2, sizeof(modulus2), mod2_encoded, 5 }, - { modulus3, sizeof(modulus3), mod3_encoded, 5 }, - { modulus4, sizeof(modulus4), mod4_encoded, 8 }, -}; - -static void test_encodeRsaPublicKey(DWORD dwEncoding) -{ - BYTE toEncode[sizeof(BLOBHEADER) + sizeof(RSAPUBKEY) + sizeof(modulus1)]; - BLOBHEADER *hdr = (BLOBHEADER *)toEncode; - RSAPUBKEY *rsaPubKey = (RSAPUBKEY *)(toEncode + sizeof(BLOBHEADER)); - BOOL ret; - BYTE *buf = NULL; - DWORD bufSize = 0, i; - - /* Try with a bogus blob type */ - hdr->bType = 2; - hdr->bVersion = CUR_BLOB_VERSION; - hdr->reserved = 0; - hdr->aiKeyAlg = CALG_RSA_KEYX; - rsaPubKey->magic = 0x31415352; - rsaPubKey->bitlen = sizeof(modulus1) * 8; - rsaPubKey->pubexp = 65537; - memcpy(toEncode + sizeof(BLOBHEADER) + sizeof(RSAPUBKEY), modulus1, - sizeof(modulus1)); - - ret = pCryptEncodeObjectEx(dwEncoding, RSA_CSP_PUBLICKEYBLOB, - toEncode, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* Now with a bogus reserved field */ - hdr->bType = PUBLICKEYBLOB; - hdr->reserved = 1; - ret = pCryptEncodeObjectEx(dwEncoding, RSA_CSP_PUBLICKEYBLOB, - toEncode, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - if (buf) - { - ok(bufSize == rsaPubKeys[0].encoded[1] + 2, - "Expected size %d, got %d\n", rsaPubKeys[0].encoded[1] + 2, bufSize); - ok(!memcmp(buf, rsaPubKeys[0].encoded, bufSize), "Unexpected value\n"); - LocalFree(buf); - } - /* Now with a bogus blob version */ - hdr->reserved = 0; - hdr->bVersion = 0; - ret = pCryptEncodeObjectEx(dwEncoding, RSA_CSP_PUBLICKEYBLOB, - toEncode, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - if (buf) - { - ok(bufSize == rsaPubKeys[0].encoded[1] + 2, - "Expected size %d, got %d\n", rsaPubKeys[0].encoded[1] + 2, bufSize); - ok(!memcmp(buf, rsaPubKeys[0].encoded, bufSize), "Unexpected value\n"); - LocalFree(buf); - } - /* And with a bogus alg ID */ - hdr->bVersion = CUR_BLOB_VERSION; - hdr->aiKeyAlg = CALG_DES; - ret = pCryptEncodeObjectEx(dwEncoding, RSA_CSP_PUBLICKEYBLOB, - toEncode, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - if (buf) - { - ok(bufSize == rsaPubKeys[0].encoded[1] + 2, - "Expected size %d, got %d\n", rsaPubKeys[0].encoded[1] + 2, bufSize); - ok(!memcmp(buf, rsaPubKeys[0].encoded, bufSize), "Unexpected value\n"); - LocalFree(buf); - } - /* Check a couple of RSA-related OIDs */ - hdr->aiKeyAlg = CALG_RSA_KEYX; - ret = pCryptEncodeObjectEx(dwEncoding, szOID_RSA_RSA, - toEncode, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - ret = pCryptEncodeObjectEx(dwEncoding, szOID_RSA_SHA1RSA, - toEncode, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - /* Finally, all valid */ - hdr->aiKeyAlg = CALG_RSA_KEYX; - for (i = 0; i < sizeof(rsaPubKeys) / sizeof(rsaPubKeys[0]); i++) - { - memcpy(toEncode + sizeof(BLOBHEADER) + sizeof(RSAPUBKEY), - rsaPubKeys[i].modulus, rsaPubKeys[i].modulusLen); - ret = pCryptEncodeObjectEx(dwEncoding, RSA_CSP_PUBLICKEYBLOB, - toEncode, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(bufSize == rsaPubKeys[i].encoded[1] + 2, - "Expected size %d, got %d\n", rsaPubKeys[i].encoded[1] + 2, - bufSize); - ok(!memcmp(buf, rsaPubKeys[i].encoded, bufSize), - "Unexpected value\n"); - LocalFree(buf); - } - } -} - -static void test_decodeRsaPublicKey(DWORD dwEncoding) -{ - DWORD i; - LPBYTE buf = NULL; - DWORD bufSize = 0; - BOOL ret; - - /* Try with a bad length */ - ret = pCryptDecodeObjectEx(dwEncoding, RSA_CSP_PUBLICKEYBLOB, - rsaPubKeys[0].encoded, rsaPubKeys[0].encoded[1], - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD || - GetLastError() == OSS_MORE_INPUT /* Win9x/NT4 */), - "Expected CRYPT_E_ASN1_EOD or OSS_MORE_INPUT, got %08x\n", - GetLastError()); - /* Try with a couple of RSA-related OIDs */ - ret = pCryptDecodeObjectEx(dwEncoding, szOID_RSA_RSA, - rsaPubKeys[0].encoded, rsaPubKeys[0].encoded[1] + 2, - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - ret = pCryptDecodeObjectEx(dwEncoding, szOID_RSA_SHA1RSA, - rsaPubKeys[0].encoded, rsaPubKeys[0].encoded[1] + 2, - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - /* Now try success cases */ - for (i = 0; i < sizeof(rsaPubKeys) / sizeof(rsaPubKeys[0]); i++) - { - bufSize = 0; - ret = pCryptDecodeObjectEx(dwEncoding, RSA_CSP_PUBLICKEYBLOB, - rsaPubKeys[i].encoded, rsaPubKeys[i].encoded[1] + 2, - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - BLOBHEADER *hdr = (BLOBHEADER *)buf; - RSAPUBKEY *rsaPubKey = (RSAPUBKEY *)(buf + sizeof(BLOBHEADER)); - - ok(bufSize >= sizeof(BLOBHEADER) + sizeof(RSAPUBKEY) + - rsaPubKeys[i].decodedModulusLen, - "Wrong size %d\n", bufSize); - ok(hdr->bType == PUBLICKEYBLOB, - "Expected type PUBLICKEYBLOB (%d), got %d\n", PUBLICKEYBLOB, - hdr->bType); - ok(hdr->bVersion == CUR_BLOB_VERSION, - "Expected version CUR_BLOB_VERSION (%d), got %d\n", - CUR_BLOB_VERSION, hdr->bVersion); - ok(hdr->reserved == 0, "Expected reserved 0, got %d\n", - hdr->reserved); - ok(hdr->aiKeyAlg == CALG_RSA_KEYX, - "Expected CALG_RSA_KEYX, got %08x\n", hdr->aiKeyAlg); - ok(rsaPubKey->magic == 0x31415352, - "Expected magic RSA1, got %08x\n", rsaPubKey->magic); - ok(rsaPubKey->bitlen == rsaPubKeys[i].decodedModulusLen * 8, - "Wrong bit len %d\n", rsaPubKey->bitlen); - ok(rsaPubKey->pubexp == 65537, "Expected pubexp 65537, got %d\n", - rsaPubKey->pubexp); - ok(!memcmp(buf + sizeof(BLOBHEADER) + sizeof(RSAPUBKEY), - rsaPubKeys[i].modulus, rsaPubKeys[i].decodedModulusLen), - "Unexpected modulus\n"); - LocalFree(buf); - } - } -} - -static const BYTE intSequence[] = { 0x30, 0x1b, 0x02, 0x01, 0x01, 0x02, 0x01, - 0x7f, 0x02, 0x02, 0x00, 0x80, 0x02, 0x02, 0x01, 0x00, 0x02, 0x01, 0x80, 0x02, - 0x02, 0xff, 0x7f, 0x02, 0x04, 0xba, 0xdd, 0xf0, 0x0d }; - -static const BYTE mixedSequence[] = { 0x30, 0x27, 0x17, 0x0d, 0x30, 0x35, 0x30, - 0x36, 0x30, 0x36, 0x31, 0x36, 0x31, 0x30, 0x30, 0x30, 0x5a, 0x02, 0x01, 0x7f, - 0x02, 0x02, 0x00, 0x80, 0x02, 0x02, 0x01, 0x00, 0x02, 0x01, 0x80, 0x02, 0x02, - 0xff, 0x7f, 0x02, 0x04, 0xba, 0xdd, 0xf0, 0x0d }; - -static void test_encodeSequenceOfAny(DWORD dwEncoding) -{ - CRYPT_DER_BLOB blobs[sizeof(ints) / sizeof(ints[0])]; - CRYPT_SEQUENCE_OF_ANY seq; - DWORD i; - BOOL ret; - BYTE *buf = NULL; - DWORD bufSize = 0; - - /* Encode a homogeneous sequence */ - for (i = 0; i < sizeof(ints) / sizeof(ints[0]); i++) - { - blobs[i].cbData = ints[i].encoded[1] + 2; - blobs[i].pbData = (BYTE *)ints[i].encoded; - } - seq.cValue = sizeof(ints) / sizeof(ints[0]); - seq.rgValue = blobs; - - ret = pCryptEncodeObjectEx(dwEncoding, X509_SEQUENCE_OF_ANY, &seq, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(bufSize == sizeof(intSequence), "Wrong size %d\n", bufSize); - ok(!memcmp(buf, intSequence, intSequence[1] + 2), "Unexpected value\n"); - LocalFree(buf); - } - /* Change the type of the first element in the sequence, and give it - * another go - */ - blobs[0].cbData = times[0].encodedTime[1] + 2; - blobs[0].pbData = (BYTE *)times[0].encodedTime; - ret = pCryptEncodeObjectEx(dwEncoding, X509_SEQUENCE_OF_ANY, &seq, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(bufSize == sizeof(mixedSequence), "Wrong size %d\n", bufSize); - ok(!memcmp(buf, mixedSequence, mixedSequence[1] + 2), - "Unexpected value\n"); - LocalFree(buf); - } -} - -static void test_decodeSequenceOfAny(DWORD dwEncoding) -{ - BOOL ret; - BYTE *buf = NULL; - DWORD bufSize = 0; - - ret = pCryptDecodeObjectEx(dwEncoding, X509_SEQUENCE_OF_ANY, intSequence, - intSequence[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CRYPT_SEQUENCE_OF_ANY *seq = (CRYPT_SEQUENCE_OF_ANY *)buf; - DWORD i; - - ok(seq->cValue == sizeof(ints) / sizeof(ints[0]), - "Wrong elements %d\n", seq->cValue); - for (i = 0; i < min(seq->cValue, sizeof(ints) / sizeof(ints[0])); i++) - { - ok(seq->rgValue[i].cbData == ints[i].encoded[1] + 2, - "Expected %d bytes, got %d\n", ints[i].encoded[1] + 2, - seq->rgValue[i].cbData); - ok(!memcmp(seq->rgValue[i].pbData, ints[i].encoded, - ints[i].encoded[1] + 2), "Unexpected value\n"); - } - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_SEQUENCE_OF_ANY, mixedSequence, - mixedSequence[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, - &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CRYPT_SEQUENCE_OF_ANY *seq = (CRYPT_SEQUENCE_OF_ANY *)buf; - - ok(seq->cValue == sizeof(ints) / sizeof(ints[0]), - "Wrong elements %d\n", seq->cValue); - /* Just check the first element since it's all that changed */ - ok(seq->rgValue[0].cbData == times[0].encodedTime[1] + 2, - "Expected %d bytes, got %d\n", times[0].encodedTime[1] + 2, - seq->rgValue[0].cbData); - ok(!memcmp(seq->rgValue[0].pbData, times[0].encodedTime, - times[0].encodedTime[1] + 2), "Unexpected value\n"); - LocalFree(buf); - } -} - -struct encodedExtensions -{ - CERT_EXTENSIONS exts; - const BYTE *encoded; -}; - -static BYTE crit_ext_data[] = { 0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01 }; -static BYTE noncrit_ext_data[] = { 0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01 }; -static CHAR oid_basic_constraints2[] = szOID_BASIC_CONSTRAINTS2; -static CERT_EXTENSION criticalExt = - { oid_basic_constraints2, TRUE, { 8, crit_ext_data } }; -static CERT_EXTENSION nonCriticalExt = - { oid_basic_constraints2, FALSE, { 8, noncrit_ext_data } }; -static CHAR oid_short[] = "1.1"; -static CERT_EXTENSION extWithShortOid = - { oid_short, FALSE, { 0, NULL } }; - -static const BYTE ext0[] = { 0x30,0x00 }; -static const BYTE ext1[] = { 0x30,0x14,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01, - 0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01 }; -static const BYTE ext2[] = { 0x30,0x11,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x04, - 0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01 }; -static const BYTE ext3[] = { 0x30,0x07,0x30,0x05,0x06,0x01,0x29,0x04,0x00 }; - -static const struct encodedExtensions exts[] = { - { { 0, NULL }, ext0 }, - { { 1, &criticalExt }, ext1 }, - { { 1, &nonCriticalExt }, ext2 }, - { { 1, &extWithShortOid }, ext3 } -}; - -static void test_encodeExtensions(DWORD dwEncoding) -{ - DWORD i; - - for (i = 0; i < sizeof(exts) / sizeof(exts[i]); i++) - { - BOOL ret; - BYTE *buf = NULL; - DWORD bufSize = 0; - - ret = pCryptEncodeObjectEx(dwEncoding, X509_EXTENSIONS, &exts[i].exts, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(bufSize == exts[i].encoded[1] + 2, - "Expected %d bytes, got %d\n", exts[i].encoded[1] + 2, bufSize); - ok(!memcmp(buf, exts[i].encoded, exts[i].encoded[1] + 2), - "Unexpected value\n"); - LocalFree(buf); - } - } -} - -static void test_decodeExtensions(DWORD dwEncoding) -{ - DWORD i; - - for (i = 0; i < sizeof(exts) / sizeof(exts[i]); i++) - { - BOOL ret; - BYTE *buf = NULL; - DWORD bufSize = 0; - - ret = pCryptDecodeObjectEx(dwEncoding, X509_EXTENSIONS, - exts[i].encoded, exts[i].encoded[1] + 2, CRYPT_DECODE_ALLOC_FLAG, - NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CERT_EXTENSIONS *ext = (CERT_EXTENSIONS *)buf; - DWORD j; - - ok(ext->cExtension == exts[i].exts.cExtension, - "Expected %d extensions, see %d\n", exts[i].exts.cExtension, - ext->cExtension); - for (j = 0; j < min(ext->cExtension, exts[i].exts.cExtension); j++) - { - ok(!strcmp(ext->rgExtension[j].pszObjId, - exts[i].exts.rgExtension[j].pszObjId), - "Expected OID %s, got %s\n", - exts[i].exts.rgExtension[j].pszObjId, - ext->rgExtension[j].pszObjId); - ok(!memcmp(ext->rgExtension[j].Value.pbData, - exts[i].exts.rgExtension[j].Value.pbData, - exts[i].exts.rgExtension[j].Value.cbData), - "Unexpected value\n"); - } - LocalFree(buf); - } - } -} - -/* MS encodes public key info with a NULL if the algorithm identifier's - * parameters are empty. However, when encoding an algorithm in a CERT_INFO, - * it encodes them by omitting the algorithm parameters. It accepts either - * form for decoding. - */ -struct encodedPublicKey -{ - CERT_PUBLIC_KEY_INFO info; - const BYTE *encoded; - const BYTE *encodedNoNull; - CERT_PUBLIC_KEY_INFO decoded; -}; - -static const BYTE aKey[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, - 0xe, 0xf }; -static const BYTE params[] = { 0x02, 0x01, 0x01 }; - -static const unsigned char bin64[] = { - 0x30,0x0b,0x30,0x06,0x06,0x02,0x2a,0x03,0x05,0x00,0x03,0x01,0x00}; -static const unsigned char bin65[] = { - 0x30,0x09,0x30,0x04,0x06,0x02,0x2a,0x03,0x03,0x01,0x00}; -static const unsigned char bin66[] = { - 0x30,0x0f,0x30,0x0a,0x06,0x06,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x05,0x00,0x03,0x01,0x00}; -static const unsigned char bin67[] = { - 0x30,0x0d,0x30,0x08,0x06,0x06,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x03,0x01,0x00}; -static const unsigned char bin68[] = { - 0x30,0x1f,0x30,0x0a,0x06,0x06,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x05,0x00,0x03,0x11,0x00,0x00,0x01, - 0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f}; -static const unsigned char bin69[] = { - 0x30,0x1d,0x30,0x08,0x06,0x06,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x03,0x11,0x00,0x00,0x01, - 0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f}; -static const unsigned char bin70[] = { - 0x30,0x20,0x30,0x0b,0x06,0x06,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x01,0x01, - 0x03,0x11,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e, - 0x0f}; -static const unsigned char bin71[] = { - 0x30,0x20,0x30,0x0b,0x06,0x06,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x01,0x01, - 0x03,0x11,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e, - 0x0f}; -static unsigned char bin72[] = { 0x05,0x00}; - -static CHAR oid_bogus[] = "1.2.3", - oid_rsa[] = szOID_RSA; - -static const struct encodedPublicKey pubKeys[] = { - /* with a bogus OID */ - { { { oid_bogus, { 0, NULL } }, { 0, NULL, 0 } }, - bin64, bin65, - { { oid_bogus, { 2, bin72 } }, { 0, NULL, 0 } } }, - /* some normal keys */ - { { { oid_rsa, { 0, NULL } }, { 0, NULL, 0} }, - bin66, bin67, - { { oid_rsa, { 2, bin72 } }, { 0, NULL, 0 } } }, - { { { oid_rsa, { 0, NULL } }, { sizeof(aKey), (BYTE *)aKey, 0} }, - bin68, bin69, - { { oid_rsa, { 2, bin72 } }, { sizeof(aKey), (BYTE *)aKey, 0} } }, - /* with add'l parameters--note they must be DER-encoded */ - { { { oid_rsa, { sizeof(params), (BYTE *)params } }, { sizeof(aKey), - (BYTE *)aKey, 0 } }, - bin70, bin71, - { { oid_rsa, { sizeof(params), (BYTE *)params } }, { sizeof(aKey), - (BYTE *)aKey, 0 } } }, -}; - -static void test_encodePublicKeyInfo(DWORD dwEncoding) -{ - DWORD i; - - for (i = 0; i < sizeof(pubKeys) / sizeof(pubKeys[0]); i++) - { - BOOL ret; - BYTE *buf = NULL; - DWORD bufSize = 0; - - ret = pCryptEncodeObjectEx(dwEncoding, X509_PUBLIC_KEY_INFO, - &pubKeys[i].info, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, - &bufSize); - ok(ret || GetLastError() == OSS_BAD_PTR /* Win9x */, - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(bufSize == pubKeys[i].encoded[1] + 2, - "Expected %d bytes, got %d\n", pubKeys[i].encoded[1] + 2, bufSize); - if (bufSize == pubKeys[i].encoded[1] + 2) - ok(!memcmp(buf, pubKeys[i].encoded, pubKeys[i].encoded[1] + 2), - "Unexpected value\n"); - LocalFree(buf); - } - } -} - -static void comparePublicKeyInfo(const CERT_PUBLIC_KEY_INFO *expected, - const CERT_PUBLIC_KEY_INFO *got) -{ - ok(!strcmp(expected->Algorithm.pszObjId, got->Algorithm.pszObjId), - "Expected OID %s, got %s\n", expected->Algorithm.pszObjId, - got->Algorithm.pszObjId); - ok(expected->Algorithm.Parameters.cbData == - got->Algorithm.Parameters.cbData, - "Expected parameters of %d bytes, got %d\n", - expected->Algorithm.Parameters.cbData, got->Algorithm.Parameters.cbData); - if (expected->Algorithm.Parameters.cbData) - ok(!memcmp(expected->Algorithm.Parameters.pbData, - got->Algorithm.Parameters.pbData, got->Algorithm.Parameters.cbData), - "Unexpected algorithm parameters\n"); - ok(expected->PublicKey.cbData == got->PublicKey.cbData, - "Expected public key of %d bytes, got %d\n", - expected->PublicKey.cbData, got->PublicKey.cbData); - if (expected->PublicKey.cbData) - ok(!memcmp(expected->PublicKey.pbData, got->PublicKey.pbData, - got->PublicKey.cbData), "Unexpected public key value\n"); -} - -static void test_decodePublicKeyInfo(DWORD dwEncoding) -{ - static const BYTE bogusPubKeyInfo[] = { 0x30, 0x22, 0x30, 0x0d, 0x06, 0x06, - 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, - 0x11, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, - 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f }; - DWORD i; - BOOL ret; - BYTE *buf = NULL; - DWORD bufSize = 0; - - for (i = 0; i < sizeof(pubKeys) / sizeof(pubKeys[0]); i++) - { - /* The NULL form decodes to the decoded member */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_PUBLIC_KEY_INFO, - pubKeys[i].encoded, pubKeys[i].encoded[1] + 2, CRYPT_DECODE_ALLOC_FLAG, - NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - comparePublicKeyInfo(&pubKeys[i].decoded, - (CERT_PUBLIC_KEY_INFO *)buf); - LocalFree(buf); - } - /* The non-NULL form decodes to the original */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_PUBLIC_KEY_INFO, - pubKeys[i].encodedNoNull, pubKeys[i].encodedNoNull[1] + 2, - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - comparePublicKeyInfo(&pubKeys[i].info, (CERT_PUBLIC_KEY_INFO *)buf); - LocalFree(buf); - } - } - /* Test with bogus (not valid DER) parameters */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_PUBLIC_KEY_INFO, - bogusPubKeyInfo, bogusPubKeyInfo[1] + 2, CRYPT_DECODE_ALLOC_FLAG, - NULL, &buf, &bufSize); - ok(!ret && (GetLastError() == CRYPT_E_ASN1_CORRUPT || - GetLastError() == OSS_DATA_ERROR /* Win9x */), - "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n", - GetLastError()); -} - -static const BYTE v1Cert[] = { 0x30, 0x33, 0x02, 0x00, 0x30, 0x02, 0x06, 0x00, - 0x30, 0x22, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, - 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x07, 0x30, - 0x02, 0x06, 0x00, 0x03, 0x01, 0x00 }; -static const BYTE v2Cert[] = { 0x30, 0x38, 0xa0, 0x03, 0x02, 0x01, 0x01, 0x02, - 0x00, 0x30, 0x02, 0x06, 0x00, 0x30, 0x22, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, - 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, - 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x5a, 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, 0x01, 0x00 }; -static const BYTE v3Cert[] = { 0x30, 0x38, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, - 0x00, 0x30, 0x02, 0x06, 0x00, 0x30, 0x22, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, - 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, - 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x5a, 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, 0x01, 0x00 }; -static const BYTE v4Cert[] = { -0x30,0x38,0xa0,0x03,0x02,0x01,0x03,0x02,0x00,0x30,0x02,0x06,0x00,0x30,0x22, -0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30, -0x30,0x30,0x30,0x5a,0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00 }; -static const BYTE v1CertWithConstraints[] = { 0x30, 0x4b, 0x02, 0x00, 0x30, - 0x02, 0x06, 0x00, 0x30, 0x22, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, - 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, - 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, - 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, 0x01, 0x00, 0xa3, 0x16, 0x30, 0x14, - 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x08, 0x30, - 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x01 }; -static const BYTE v1CertWithSerial[] = { 0x30, 0x4c, 0x02, 0x01, 0x01, 0x30, - 0x02, 0x06, 0x00, 0x30, 0x22, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, - 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, - 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, - 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, 0x01, 0x00, 0xa3, 0x16, 0x30, 0x14, - 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x08, 0x30, - 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x01 }; -static const BYTE bigCert[] = { 0x30, 0x7a, 0x02, 0x01, 0x01, 0x30, 0x02, 0x06, - 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, - 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x22, - 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, - 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, - 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, - 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, 0x01, - 0x00, 0xa3, 0x16, 0x30, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, - 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x01 }; -static const BYTE v1CertWithPubKey[] = { -0x30,0x81,0x95,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30, -0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61, -0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31, -0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31, -0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11, -0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x00,0x30,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x01,0x01,0x05,0x00,0x03,0x11,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07, -0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0xa3,0x16,0x30,0x14,0x30,0x12,0x06, -0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02, -0x01,0x01 }; -static const BYTE v1CertWithPubKeyNoNull[] = { -0x30,0x81,0x93,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30, -0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61, -0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31, -0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31, -0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11, -0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x00,0x30,0x20,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x01,0x01,0x03,0x11,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09, -0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03,0x55, -0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01 }; -static const BYTE v1CertWithSubjectKeyId[] = { -0x30,0x7b,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30,0x11, -0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30, -0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11,0x06, -0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67, -0x00,0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00,0xa3,0x17,0x30,0x15,0x30, -0x13,0x06,0x03,0x55,0x1d,0x0e,0x04,0x0c,0x04,0x0a,0x4a,0x75,0x61,0x6e,0x20, -0x4c,0x61,0x6e,0x67,0x00 }; -static const BYTE v1CertWithIssuerUniqueId[] = { -0x30,0x38,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x22,0x18,0x0f,0x31,0x36, -0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f, -0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a, -0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00,0x81,0x02,0x00,0x01 }; -static const BYTE v1CertWithSubjectIssuerSerialAndIssuerUniqueId[] = { -0x30,0x81,0x99,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30, -0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61, -0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31, -0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31, -0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11, -0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x00,0x30,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x01,0x01,0x05,0x00,0x03,0x11,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07, -0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x81,0x02,0x00,0x01,0xa3,0x16,0x30, -0x14,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06, -0x01,0x01,0xff,0x02,0x01,0x01 }; -static const BYTE v1CertWithSubjectIssuerSerialAndIssuerUniqueIdNoNull[] = { -0x30,0x81,0x97,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30, -0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61, -0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31, -0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31, -0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11, -0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x00,0x30,0x20,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x01,0x01,0x03,0x11,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09, -0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x81,0x02,0x00,0x01,0xa3,0x16,0x30,0x14,0x30, -0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01, -0xff,0x02,0x01,0x01 }; - -static const BYTE serialNum[] = { 0x01 }; - -static void test_encodeCertToBeSigned(DWORD dwEncoding) -{ - BOOL ret; - BYTE *buf = NULL; - DWORD size = 0; - CERT_INFO info = { 0 }; - static char oid_rsa_rsa[] = szOID_RSA_RSA; - static char oid_subject_key_identifier[] = szOID_SUBJECT_KEY_IDENTIFIER; - CERT_EXTENSION ext; - - if (0) - { - /* Test with NULL pvStructInfo (crashes on win9x) */ - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, NULL, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); - } - /* Test with a V1 cert */ - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret || GetLastError() == OSS_BAD_PTR /* Win9x */, - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == v1Cert[1] + 2, "Expected size %d, got %d\n", - v1Cert[1] + 2, size); - ok(!memcmp(buf, v1Cert, size), "Got unexpected value\n"); - LocalFree(buf); - } - /* Test v2 cert */ - info.dwVersion = CERT_V2; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret || GetLastError() == OSS_BAD_PTR /* Win9x */, - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(v2Cert), "Wrong size %d\n", size); - ok(!memcmp(buf, v2Cert, size), "Got unexpected value\n"); - LocalFree(buf); - } - /* Test v3 cert */ - info.dwVersion = CERT_V3; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret || GetLastError() == OSS_BAD_PTR /* Win9x */, - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(v3Cert), "Wrong size %d\n", size); - ok(!memcmp(buf, v3Cert, size), "Got unexpected value\n"); - LocalFree(buf); - } - /* A v4 cert? */ - info.dwVersion = 3; /* Not a typo, CERT_V3 is 2 */ - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (buf) - { - ok(size == sizeof(v4Cert), "Wrong size %d\n", size); - ok(!memcmp(buf, v4Cert, size), "Unexpected value\n"); - LocalFree(buf); - } - /* see if a V1 cert can have basic constraints set (RFC3280 says no, but - * API doesn't prevent it) - */ - info.dwVersion = CERT_V1; - info.cExtension = 1; - info.rgExtension = &criticalExt; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret || GetLastError() == OSS_BAD_PTR /* Win9x */, - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(v1CertWithConstraints), "Wrong size %d\n", size); - ok(!memcmp(buf, v1CertWithConstraints, size), "Got unexpected value\n"); - LocalFree(buf); - } - /* test v1 cert with a serial number */ - info.SerialNumber.cbData = sizeof(serialNum); - info.SerialNumber.pbData = (BYTE *)serialNum; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (buf) - { - ok(size == sizeof(v1CertWithSerial), "Wrong size %d\n", size); - ok(!memcmp(buf, v1CertWithSerial, size), "Got unexpected value\n"); - LocalFree(buf); - } - /* Test v1 cert with an issuer name, serial number, and issuer unique id */ - info.dwVersion = CERT_V1; - info.cExtension = 0; - info.IssuerUniqueId.cbData = sizeof(serialNum); - info.IssuerUniqueId.pbData = (BYTE *)serialNum; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret || broken(GetLastError() == OSS_BAD_PTR /* Win98 */), - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(v1CertWithIssuerUniqueId), "Wrong size %d\n", size); - ok(!memcmp(buf, v1CertWithIssuerUniqueId, size), - "Got unexpected value\n"); - LocalFree(buf); - } - /* Test v1 cert with an issuer name, a subject name, and a serial number */ - info.IssuerUniqueId.cbData = 0; - info.IssuerUniqueId.pbData = NULL; - info.cExtension = 1; - info.rgExtension = &criticalExt; - info.Issuer.cbData = sizeof(encodedCommonName); - info.Issuer.pbData = (BYTE *)encodedCommonName; - info.Subject.cbData = sizeof(encodedCommonName); - info.Subject.pbData = (BYTE *)encodedCommonName; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (buf) - { - ok(size == sizeof(bigCert), "Wrong size %d\n", size); - ok(!memcmp(buf, bigCert, size), "Got unexpected value\n"); - LocalFree(buf); - } - /* Add a public key */ - info.SubjectPublicKeyInfo.Algorithm.pszObjId = oid_rsa_rsa; - info.SubjectPublicKeyInfo.PublicKey.cbData = sizeof(aKey); - info.SubjectPublicKeyInfo.PublicKey.pbData = (LPBYTE)aKey; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (buf) - { - ok(size == sizeof(v1CertWithPubKey) || - size == sizeof(v1CertWithPubKeyNoNull), "Wrong size %d\n", size); - if (size == sizeof(v1CertWithPubKey)) - ok(!memcmp(buf, v1CertWithPubKey, size), "Got unexpected value\n"); - else if (size == sizeof(v1CertWithPubKeyNoNull)) - ok(!memcmp(buf, v1CertWithPubKeyNoNull, size), - "Got unexpected value\n"); - LocalFree(buf); - } - /* Again add an issuer unique id */ - info.IssuerUniqueId.cbData = sizeof(serialNum); - info.IssuerUniqueId.pbData = (BYTE *)serialNum; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(v1CertWithSubjectIssuerSerialAndIssuerUniqueId) || - size == sizeof(v1CertWithSubjectIssuerSerialAndIssuerUniqueIdNoNull), - "Wrong size %d\n", size); - if (size == sizeof(v1CertWithSubjectIssuerSerialAndIssuerUniqueId)) - ok(!memcmp(buf, v1CertWithSubjectIssuerSerialAndIssuerUniqueId, - size), "unexpected value\n"); - else if (size == - sizeof(v1CertWithSubjectIssuerSerialAndIssuerUniqueIdNoNull)) - ok(!memcmp(buf, - v1CertWithSubjectIssuerSerialAndIssuerUniqueIdNoNull, size), - "unexpected value\n"); - LocalFree(buf); - } - /* Remove the public key, and add a subject key identifier extension */ - info.IssuerUniqueId.cbData = 0; - info.IssuerUniqueId.pbData = NULL; - info.SubjectPublicKeyInfo.Algorithm.pszObjId = NULL; - info.SubjectPublicKeyInfo.PublicKey.cbData = 0; - info.SubjectPublicKeyInfo.PublicKey.pbData = NULL; - ext.pszObjId = oid_subject_key_identifier; - ext.fCritical = FALSE; - ext.Value.cbData = sizeof(octetCommonNameValue); - ext.Value.pbData = octetCommonNameValue; - info.cExtension = 1; - info.rgExtension = &ext; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (buf) - { - ok(size == sizeof(v1CertWithSubjectKeyId), "Wrong size %d\n", size); - ok(!memcmp(buf, v1CertWithSubjectKeyId, size), "Unexpected value\n"); - LocalFree(buf); - } -} - -static void test_decodeCertToBeSigned(DWORD dwEncoding) -{ - static const BYTE *corruptCerts[] = { v1Cert, v2Cert, v3Cert, v4Cert, - v1CertWithConstraints, v1CertWithSerial, v1CertWithIssuerUniqueId }; - BOOL ret; - BYTE *buf = NULL; - DWORD size = 0, i; - - /* Test with NULL pbEncoded */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, NULL, 0, - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD || - GetLastError() == OSS_BAD_ARG /* Win9x */), - "Expected CRYPT_E_ASN1_EOD or OSS_BAD_ARG, got %08x\n", GetLastError()); - if (0) - { - /* Crashes on win9x */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, NULL, 1, - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); - } - /* The following certs all fail with CRYPT_E_ASN1_CORRUPT or - * CRYPT_E_ASN1_BADTAG, because at a minimum a cert must have a non-zero - * serial number, an issuer, a subject, and a public key. - */ - for (i = 0; i < sizeof(corruptCerts) / sizeof(corruptCerts[0]); i++) - { - ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, - corruptCerts[i], corruptCerts[i][1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, - &buf, &size); - ok(!ret, "Expected failure\n"); - } - /* The following succeeds, even though v1 certs are not allowed to have - * extensions. - */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, - v1CertWithSubjectKeyId, sizeof(v1CertWithSubjectKeyId), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - CERT_INFO *info = (CERT_INFO *)buf; - - ok(size >= sizeof(CERT_INFO), "Wrong size %d\n", size); - ok(info->dwVersion == CERT_V1, "expected CERT_V1, got %d\n", - info->dwVersion); - ok(info->cExtension == 1, "expected 1 extension, got %d\n", - info->cExtension); - LocalFree(buf); - } - /* The following also succeeds, even though V1 certs are not allowed to - * have issuer unique ids. - */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, - v1CertWithSubjectIssuerSerialAndIssuerUniqueId, - sizeof(v1CertWithSubjectIssuerSerialAndIssuerUniqueId), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - CERT_INFO *info = (CERT_INFO *)buf; - - ok(size >= sizeof(CERT_INFO), "Wrong size %d\n", size); - ok(info->dwVersion == CERT_V1, "expected CERT_V1, got %d\n", - info->dwVersion); - ok(info->IssuerUniqueId.cbData == sizeof(serialNum), - "unexpected issuer unique id size %d\n", info->IssuerUniqueId.cbData); - ok(!memcmp(info->IssuerUniqueId.pbData, serialNum, sizeof(serialNum)), - "unexpected issuer unique id value\n"); - LocalFree(buf); - } - /* Now check with serial number, subject and issuer specified */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, bigCert, - sizeof(bigCert), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CERT_INFO *info = (CERT_INFO *)buf; - - ok(size >= sizeof(CERT_INFO), "Wrong size %d\n", size); - ok(info->SerialNumber.cbData == 1, - "Expected serial number size 1, got %d\n", info->SerialNumber.cbData); - ok(*info->SerialNumber.pbData == *serialNum, - "Expected serial number %d, got %d\n", *serialNum, - *info->SerialNumber.pbData); - ok(info->Issuer.cbData == sizeof(encodedCommonName), - "Wrong size %d\n", info->Issuer.cbData); - ok(!memcmp(info->Issuer.pbData, encodedCommonName, info->Issuer.cbData), - "Unexpected issuer\n"); - ok(info->Subject.cbData == sizeof(encodedCommonName), - "Wrong size %d\n", info->Subject.cbData); - ok(!memcmp(info->Subject.pbData, encodedCommonName, - info->Subject.cbData), "Unexpected subject\n"); - LocalFree(buf); - } - /* Check again with pub key specified */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, - v1CertWithPubKey, sizeof(v1CertWithPubKey), CRYPT_DECODE_ALLOC_FLAG, NULL, - &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CERT_INFO *info = (CERT_INFO *)buf; - - ok(size >= sizeof(CERT_INFO), "Wrong size %d\n", size); - ok(info->SerialNumber.cbData == 1, - "Expected serial number size 1, got %d\n", info->SerialNumber.cbData); - ok(*info->SerialNumber.pbData == *serialNum, - "Expected serial number %d, got %d\n", *serialNum, - *info->SerialNumber.pbData); - ok(info->Issuer.cbData == sizeof(encodedCommonName), - "Wrong size %d\n", info->Issuer.cbData); - ok(!memcmp(info->Issuer.pbData, encodedCommonName, info->Issuer.cbData), - "Unexpected issuer\n"); - ok(info->Subject.cbData == sizeof(encodedCommonName), - "Wrong size %d\n", info->Subject.cbData); - ok(!memcmp(info->Subject.pbData, encodedCommonName, - info->Subject.cbData), "Unexpected subject\n"); - ok(!strcmp(info->SubjectPublicKeyInfo.Algorithm.pszObjId, - szOID_RSA_RSA), "Expected szOID_RSA_RSA, got %s\n", - info->SubjectPublicKeyInfo.Algorithm.pszObjId); - ok(info->SubjectPublicKeyInfo.PublicKey.cbData == sizeof(aKey), - "Wrong size %d\n", info->SubjectPublicKeyInfo.PublicKey.cbData); - ok(!memcmp(info->SubjectPublicKeyInfo.PublicKey.pbData, aKey, - sizeof(aKey)), "Unexpected public key\n"); - LocalFree(buf); - } -} - -static const BYTE hash[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, - 0xe, 0xf }; - -static const BYTE signedBigCert[] = { - 0x30, 0x81, 0x93, 0x30, 0x7a, 0x02, 0x01, 0x01, 0x30, 0x02, 0x06, 0x00, 0x30, - 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, - 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x22, 0x18, 0x0f, - 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, - 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, - 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, 0x01, 0x00, 0xa3, - 0x16, 0x30, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, - 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x01, 0x30, 0x02, 0x06, - 0x00, 0x03, 0x11, 0x00, 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07, - 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00 }; - -static void test_encodeCert(DWORD dwEncoding) -{ - /* Note the SignatureAlgorithm must match that in the encoded cert. Note - * also that bigCert is a NULL-terminated string, so don't count its - * last byte (otherwise the signed cert won't decode.) - */ - CERT_SIGNED_CONTENT_INFO info = { { sizeof(bigCert), (BYTE *)bigCert }, - { NULL, { 0, NULL } }, { sizeof(hash), (BYTE *)hash, 0 } }; - BOOL ret; - BYTE *buf = NULL; - DWORD bufSize = 0; - - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &bufSize); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(bufSize == sizeof(signedBigCert), "Wrong size %d\n", bufSize); - ok(!memcmp(buf, signedBigCert, bufSize), "Unexpected cert\n"); - LocalFree(buf); - } -} - -static void test_decodeCert(DWORD dwEncoding) -{ - BOOL ret; - BYTE *buf = NULL; - DWORD size = 0; - - ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT, signedBigCert, - sizeof(signedBigCert), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CERT_SIGNED_CONTENT_INFO *info = (CERT_SIGNED_CONTENT_INFO *)buf; - - ok(info->ToBeSigned.cbData == sizeof(bigCert), - "Wrong cert size %d\n", info->ToBeSigned.cbData); - ok(!memcmp(info->ToBeSigned.pbData, bigCert, info->ToBeSigned.cbData), - "Unexpected cert\n"); - ok(info->Signature.cbData == sizeof(hash), - "Wrong signature size %d\n", info->Signature.cbData); - ok(!memcmp(info->Signature.pbData, hash, info->Signature.cbData), - "Unexpected signature\n"); - LocalFree(buf); - } - /* A signed cert decodes as a CERT_INFO too */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, signedBigCert, - sizeof(signedBigCert), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CERT_INFO *info = (CERT_INFO *)buf; - - ok(size >= sizeof(CERT_INFO), "Wrong size %d\n", size); - ok(info->SerialNumber.cbData == 1, - "Expected serial number size 1, got %d\n", info->SerialNumber.cbData); - ok(*info->SerialNumber.pbData == *serialNum, - "Expected serial number %d, got %d\n", *serialNum, - *info->SerialNumber.pbData); - ok(info->Issuer.cbData == sizeof(encodedCommonName), - "Wrong size %d\n", info->Issuer.cbData); - ok(!memcmp(info->Issuer.pbData, encodedCommonName, info->Issuer.cbData), - "Unexpected issuer\n"); - ok(info->Subject.cbData == sizeof(encodedCommonName), - "Wrong size %d\n", info->Subject.cbData); - ok(!memcmp(info->Subject.pbData, encodedCommonName, - info->Subject.cbData), "Unexpected subject\n"); - LocalFree(buf); - } -} - -static const BYTE emptyDistPoint[] = { 0x30, 0x02, 0x30, 0x00 }; -static const BYTE distPointWithUrl[] = { 0x30, 0x19, 0x30, 0x17, 0xa0, 0x15, - 0xa0, 0x13, 0x86, 0x11, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x69, - 0x6e, 0x65, 0x68, 0x71, 0x2e, 0x6f, 0x72, 0x67 }; -static const BYTE distPointWithReason[] = { 0x30, 0x06, 0x30, 0x04, 0x81, 0x02, - 0x00, 0x03 }; -static const BYTE distPointWithIssuer[] = { 0x30, 0x17, 0x30, 0x15, 0xa2, 0x13, - 0x86, 0x11, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x69, 0x6e, 0x65, - 0x68, 0x71, 0x2e, 0x6f, 0x72, 0x67 }; -static const BYTE distPointWithUrlAndIssuer[] = { 0x30, 0x2e, 0x30, 0x2c, 0xa0, - 0x15, 0xa0, 0x13, 0x86, 0x11, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, - 0x69, 0x6e, 0x65, 0x68, 0x71, 0x2e, 0x6f, 0x72, 0x67, 0xa2, 0x13, 0x86, 0x11, - 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x69, 0x6e, 0x65, 0x68, 0x71, - 0x2e, 0x6f, 0x72, 0x67 }; -static const BYTE crlReason = CRL_REASON_KEY_COMPROMISE | - CRL_REASON_AFFILIATION_CHANGED; - -static void test_encodeCRLDistPoints(DWORD dwEncoding) -{ - CRL_DIST_POINTS_INFO info = { 0 }; - CRL_DIST_POINT point = { { 0 } }; - CERT_ALT_NAME_ENTRY entry = { 0 }; - BOOL ret; - BYTE *buf = NULL; - DWORD size = 0; - - /* Test with an empty info */ - ret = pCryptEncodeObjectEx(dwEncoding, X509_CRL_DIST_POINTS, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* Test with one empty dist point */ - info.cDistPoint = 1; - info.rgDistPoint = &point; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CRL_DIST_POINTS, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(emptyDistPoint), "Wrong size %d\n", size); - ok(!memcmp(buf, emptyDistPoint, size), "Unexpected value\n"); - LocalFree(buf); - } - /* A dist point with an invalid name */ - point.DistPointName.dwDistPointNameChoice = CRL_DIST_POINT_FULL_NAME; - entry.dwAltNameChoice = CERT_ALT_NAME_URL; - U(entry).pwszURL = (LPWSTR)nihongoURL; - U(point.DistPointName).FullName.cAltEntry = 1; - U(point.DistPointName).FullName.rgAltEntry = &entry; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CRL_DIST_POINTS, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == CRYPT_E_INVALID_IA5_STRING, - "Expected CRYPT_E_INVALID_IA5_STRING, got %08x\n", GetLastError()); - /* The first invalid character is at index 7 */ - ok(GET_CERT_ALT_NAME_VALUE_ERR_INDEX(size) == 7, - "Expected invalid char at index 7, got %d\n", - GET_CERT_ALT_NAME_VALUE_ERR_INDEX(size)); - /* A dist point with (just) a valid name */ - U(entry).pwszURL = (LPWSTR)url; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CRL_DIST_POINTS, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(distPointWithUrl), "Wrong size %d\n", size); - ok(!memcmp(buf, distPointWithUrl, size), "Unexpected value\n"); - LocalFree(buf); - } - /* A dist point with (just) reason flags */ - point.DistPointName.dwDistPointNameChoice = CRL_DIST_POINT_NO_NAME; - point.ReasonFlags.cbData = sizeof(crlReason); - point.ReasonFlags.pbData = (LPBYTE)&crlReason; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CRL_DIST_POINTS, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(distPointWithReason), "Wrong size %d\n", size); - ok(!memcmp(buf, distPointWithReason, size), "Unexpected value\n"); - LocalFree(buf); - } - /* A dist point with just an issuer */ - point.ReasonFlags.cbData = 0; - point.CRLIssuer.cAltEntry = 1; - point.CRLIssuer.rgAltEntry = &entry; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CRL_DIST_POINTS, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(distPointWithIssuer), "Wrong size %d\n", size); - ok(!memcmp(buf, distPointWithIssuer, size), "Unexpected value\n"); - LocalFree(buf); - } - /* A dist point with both a name and an issuer */ - point.DistPointName.dwDistPointNameChoice = CRL_DIST_POINT_FULL_NAME; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CRL_DIST_POINTS, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(distPointWithUrlAndIssuer), - "Wrong size %d\n", size); - ok(!memcmp(buf, distPointWithUrlAndIssuer, size), "Unexpected value\n"); - LocalFree(buf); - } -} - -static void test_decodeCRLDistPoints(DWORD dwEncoding) -{ - BOOL ret; - BYTE *buf = NULL; - DWORD size = 0; - PCRL_DIST_POINTS_INFO info; - PCRL_DIST_POINT point; - PCERT_ALT_NAME_ENTRY entry; - - ret = pCryptDecodeObjectEx(dwEncoding, X509_CRL_DIST_POINTS, - emptyDistPoint, emptyDistPoint[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, - &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - info = (PCRL_DIST_POINTS_INFO)buf; - ok(size >= sizeof(CRL_DIST_POINTS_INFO) + sizeof(CRL_DIST_POINT), - "Wrong size %d\n", size); - ok(info->cDistPoint == 1, "Expected 1 dist points, got %d\n", - info->cDistPoint); - point = info->rgDistPoint; - ok(point->DistPointName.dwDistPointNameChoice == CRL_DIST_POINT_NO_NAME, - "Expected CRL_DIST_POINT_NO_NAME, got %d\n", - point->DistPointName.dwDistPointNameChoice); - ok(point->ReasonFlags.cbData == 0, "Expected no reason\n"); - ok(point->CRLIssuer.cAltEntry == 0, "Expected no issuer\n"); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_CRL_DIST_POINTS, - distPointWithUrl, distPointWithUrl[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, - &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - info = (PCRL_DIST_POINTS_INFO)buf; - ok(size >= sizeof(CRL_DIST_POINTS_INFO) + sizeof(CRL_DIST_POINT), - "Wrong size %d\n", size); - ok(info->cDistPoint == 1, "Expected 1 dist points, got %d\n", - info->cDistPoint); - point = info->rgDistPoint; - ok(point->DistPointName.dwDistPointNameChoice == - CRL_DIST_POINT_FULL_NAME, - "Expected CRL_DIST_POINT_FULL_NAME, got %d\n", - point->DistPointName.dwDistPointNameChoice); - ok(U(point->DistPointName).FullName.cAltEntry == 1, - "Expected 1 name entry, got %d\n", - U(point->DistPointName).FullName.cAltEntry); - entry = U(point->DistPointName).FullName.rgAltEntry; - ok(entry->dwAltNameChoice == CERT_ALT_NAME_URL, - "Expected CERT_ALT_NAME_URL, got %d\n", entry->dwAltNameChoice); - ok(!lstrcmpW(U(*entry).pwszURL, url), "Unexpected name\n"); - ok(point->ReasonFlags.cbData == 0, "Expected no reason\n"); - ok(point->CRLIssuer.cAltEntry == 0, "Expected no issuer\n"); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_CRL_DIST_POINTS, - distPointWithReason, distPointWithReason[1] + 2, CRYPT_DECODE_ALLOC_FLAG, - NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - info = (PCRL_DIST_POINTS_INFO)buf; - ok(size >= sizeof(CRL_DIST_POINTS_INFO) + sizeof(CRL_DIST_POINT), - "Wrong size %d\n", size); - ok(info->cDistPoint == 1, "Expected 1 dist points, got %d\n", - info->cDistPoint); - point = info->rgDistPoint; - ok(point->DistPointName.dwDistPointNameChoice == - CRL_DIST_POINT_NO_NAME, - "Expected CRL_DIST_POINT_NO_NAME, got %d\n", - point->DistPointName.dwDistPointNameChoice); - ok(point->ReasonFlags.cbData == sizeof(crlReason), - "Expected reason length\n"); - ok(!memcmp(point->ReasonFlags.pbData, &crlReason, sizeof(crlReason)), - "Unexpected reason\n"); - ok(point->CRLIssuer.cAltEntry == 0, "Expected no issuer\n"); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_CRL_DIST_POINTS, - distPointWithUrlAndIssuer, distPointWithUrlAndIssuer[1] + 2, - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - info = (PCRL_DIST_POINTS_INFO)buf; - ok(size >= sizeof(CRL_DIST_POINTS_INFO) + sizeof(CRL_DIST_POINT), - "Wrong size %d\n", size); - ok(info->cDistPoint == 1, "Expected 1 dist points, got %d\n", - info->cDistPoint); - point = info->rgDistPoint; - ok(point->DistPointName.dwDistPointNameChoice == - CRL_DIST_POINT_FULL_NAME, - "Expected CRL_DIST_POINT_FULL_NAME, got %d\n", - point->DistPointName.dwDistPointNameChoice); - ok(U(point->DistPointName).FullName.cAltEntry == 1, - "Expected 1 name entry, got %d\n", - U(point->DistPointName).FullName.cAltEntry); - entry = U(point->DistPointName).FullName.rgAltEntry; - ok(entry->dwAltNameChoice == CERT_ALT_NAME_URL, - "Expected CERT_ALT_NAME_URL, got %d\n", entry->dwAltNameChoice); - ok(!lstrcmpW(U(*entry).pwszURL, url), "Unexpected name\n"); - ok(point->ReasonFlags.cbData == 0, "Expected no reason\n"); - ok(point->CRLIssuer.cAltEntry == 1, - "Expected 1 issuer entry, got %d\n", point->CRLIssuer.cAltEntry); - entry = point->CRLIssuer.rgAltEntry; - ok(entry->dwAltNameChoice == CERT_ALT_NAME_URL, - "Expected CERT_ALT_NAME_URL, got %d\n", entry->dwAltNameChoice); - ok(!lstrcmpW(U(*entry).pwszURL, url), "Unexpected name\n"); - LocalFree(buf); - } -} - -static const BYTE badFlagsIDP[] = { 0x30,0x06,0x81,0x01,0xff,0x82,0x01,0xff }; -static const BYTE emptyNameIDP[] = { 0x30,0x04,0xa0,0x02,0xa0,0x00 }; -static const BYTE urlIDP[] = { 0x30,0x17,0xa0,0x15,0xa0,0x13,0x86,0x11,0x68, - 0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x69,0x6e,0x65,0x68,0x71,0x2e,0x6f,0x72, - 0x67 }; - -static void test_encodeCRLIssuingDistPoint(DWORD dwEncoding) -{ - BOOL ret; - BYTE *buf = NULL; - DWORD size = 0; - CRL_ISSUING_DIST_POINT point = { { 0 } }; - CERT_ALT_NAME_ENTRY entry; - - ret = pCryptEncodeObjectEx(dwEncoding, X509_ISSUING_DIST_POINT, NULL, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) - { - skip("no X509_ISSUING_DIST_POINT encode support\n"); - return; - } - ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); - ret = pCryptEncodeObjectEx(dwEncoding, X509_ISSUING_DIST_POINT, &point, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(emptySequence), "Unexpected size %d\n", size); - ok(!memcmp(buf, emptySequence, size), "Unexpected value\n"); - LocalFree(buf); - } - /* nonsensical flags */ - point.fOnlyContainsUserCerts = TRUE; - point.fOnlyContainsCACerts = TRUE; - ret = pCryptEncodeObjectEx(dwEncoding, X509_ISSUING_DIST_POINT, &point, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(badFlagsIDP), "Unexpected size %d\n", size); - ok(!memcmp(buf, badFlagsIDP, size), "Unexpected value\n"); - LocalFree(buf); - } - /* unimplemented name type */ - point.fOnlyContainsCACerts = point.fOnlyContainsUserCerts = FALSE; - point.DistPointName.dwDistPointNameChoice = CRL_DIST_POINT_ISSUER_RDN_NAME; - ret = pCryptEncodeObjectEx(dwEncoding, X509_ISSUING_DIST_POINT, &point, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* empty name */ - point.DistPointName.dwDistPointNameChoice = CRL_DIST_POINT_FULL_NAME; - U(point.DistPointName).FullName.cAltEntry = 0; - ret = pCryptEncodeObjectEx(dwEncoding, X509_ISSUING_DIST_POINT, &point, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(emptyNameIDP), "Unexpected size %d\n", size); - ok(!memcmp(buf, emptyNameIDP, size), "Unexpected value\n"); - LocalFree(buf); - } - /* name with URL entry */ - entry.dwAltNameChoice = CERT_ALT_NAME_URL; - U(entry).pwszURL = (LPWSTR)url; - U(point.DistPointName).FullName.cAltEntry = 1; - U(point.DistPointName).FullName.rgAltEntry = &entry; - ret = pCryptEncodeObjectEx(dwEncoding, X509_ISSUING_DIST_POINT, &point, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(urlIDP), "Unexpected size %d\n", size); - ok(!memcmp(buf, urlIDP, size), "Unexpected value\n"); - LocalFree(buf); - } -} - -static void compareAltNameEntry(const CERT_ALT_NAME_ENTRY *expected, - const CERT_ALT_NAME_ENTRY *got) -{ - ok(expected->dwAltNameChoice == got->dwAltNameChoice, - "Expected name choice %d, got %d\n", expected->dwAltNameChoice, - got->dwAltNameChoice); - if (expected->dwAltNameChoice == got->dwAltNameChoice) - { - switch (got->dwAltNameChoice) - { - case CERT_ALT_NAME_RFC822_NAME: - case CERT_ALT_NAME_DNS_NAME: - case CERT_ALT_NAME_EDI_PARTY_NAME: - case CERT_ALT_NAME_URL: - case CERT_ALT_NAME_REGISTERED_ID: - ok((!U(*expected).pwszURL && !U(*got).pwszURL) || - (!U(*expected).pwszURL && !lstrlenW(U(*got).pwszURL)) || - (!U(*got).pwszURL && !lstrlenW(U(*expected).pwszURL)) || - !lstrcmpW(U(*expected).pwszURL, U(*got).pwszURL), - "Unexpected name\n"); - break; - case CERT_ALT_NAME_X400_ADDRESS: - case CERT_ALT_NAME_DIRECTORY_NAME: - case CERT_ALT_NAME_IP_ADDRESS: - ok(U(*got).IPAddress.cbData == U(*expected).IPAddress.cbData, - "Unexpected IP address length %d\n", U(*got).IPAddress.cbData); - ok(!memcmp(U(*got).IPAddress.pbData, U(*got).IPAddress.pbData, - U(*got).IPAddress.cbData), "Unexpected value\n"); - break; - } - } -} - -static void compareAltNameInfo(const CERT_ALT_NAME_INFO *expected, - const CERT_ALT_NAME_INFO *got) -{ - DWORD i; - - ok(expected->cAltEntry == got->cAltEntry, "Expected %d entries, got %d\n", - expected->cAltEntry, got->cAltEntry); - for (i = 0; i < min(expected->cAltEntry, got->cAltEntry); i++) - compareAltNameEntry(&expected->rgAltEntry[i], &got->rgAltEntry[i]); -} - -static void compareDistPointName(const CRL_DIST_POINT_NAME *expected, - const CRL_DIST_POINT_NAME *got) -{ - ok(got->dwDistPointNameChoice == expected->dwDistPointNameChoice, - "Unexpected name choice %d\n", got->dwDistPointNameChoice); - if (got->dwDistPointNameChoice == CRL_DIST_POINT_FULL_NAME) - compareAltNameInfo(&(U(*expected).FullName), &(U(*got).FullName)); -} - -static void compareCRLIssuingDistPoints(const CRL_ISSUING_DIST_POINT *expected, - const CRL_ISSUING_DIST_POINT *got) -{ - compareDistPointName(&expected->DistPointName, &got->DistPointName); - ok(got->fOnlyContainsUserCerts == expected->fOnlyContainsUserCerts, - "Unexpected fOnlyContainsUserCerts\n"); - ok(got->fOnlyContainsCACerts == expected->fOnlyContainsCACerts, - "Unexpected fOnlyContainsCACerts\n"); - ok(got->OnlySomeReasonFlags.cbData == expected->OnlySomeReasonFlags.cbData, - "Unexpected reason flags\n"); - ok(got->fIndirectCRL == expected->fIndirectCRL, - "Unexpected fIndirectCRL\n"); -} - -static void test_decodeCRLIssuingDistPoint(DWORD dwEncoding) -{ - BOOL ret; - BYTE *buf = NULL; - DWORD size = 0; - CRL_ISSUING_DIST_POINT point = { { 0 } }; - - ret = pCryptDecodeObjectEx(dwEncoding, X509_ISSUING_DIST_POINT, - emptySequence, emptySequence[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, - &buf, &size); - if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) - { - skip("no X509_ISSUING_DIST_POINT decode support\n"); - return; - } - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - compareCRLIssuingDistPoints(&point, (PCRL_ISSUING_DIST_POINT)buf); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_ISSUING_DIST_POINT, - badFlagsIDP, badFlagsIDP[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, - &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - point.fOnlyContainsUserCerts = point.fOnlyContainsCACerts = TRUE; - compareCRLIssuingDistPoints(&point, (PCRL_ISSUING_DIST_POINT)buf); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_ISSUING_DIST_POINT, - emptyNameIDP, emptyNameIDP[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, - &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - point.fOnlyContainsCACerts = point.fOnlyContainsUserCerts = FALSE; - point.DistPointName.dwDistPointNameChoice = CRL_DIST_POINT_FULL_NAME; - U(point.DistPointName).FullName.cAltEntry = 0; - compareCRLIssuingDistPoints(&point, (PCRL_ISSUING_DIST_POINT)buf); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_ISSUING_DIST_POINT, - urlIDP, urlIDP[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - CERT_ALT_NAME_ENTRY entry; - - entry.dwAltNameChoice = CERT_ALT_NAME_URL; - U(entry).pwszURL = (LPWSTR)url; - U(point.DistPointName).FullName.cAltEntry = 1; - U(point.DistPointName).FullName.rgAltEntry = &entry; - compareCRLIssuingDistPoints(&point, (PCRL_ISSUING_DIST_POINT)buf); - LocalFree(buf); - } -} - -static const BYTE v1CRL[] = { 0x30, 0x15, 0x30, 0x02, 0x06, 0x00, 0x18, 0x0f, - 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x5a }; -static const BYTE v2CRL[] = { 0x30, 0x18, 0x02, 0x01, 0x01, 0x30, 0x02, 0x06, - 0x00, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x30, 0x5a }; -static const BYTE v1CRLWithIssuer[] = { 0x30, 0x2c, 0x30, 0x02, 0x06, 0x00, - 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, - 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x18, 0x0f, 0x31, - 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x5a }; -static const BYTE v1CRLWithIssuerAndEmptyEntry[] = { 0x30, 0x43, 0x30, 0x02, - 0x06, 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, - 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x18, - 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x5a, 0x30, 0x15, 0x30, 0x13, 0x02, 0x00, 0x18, 0x0f, 0x31, 0x36, - 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a }; -static const BYTE v1CRLWithIssuerAndEntry[] = { 0x30, 0x44, 0x30, 0x02, 0x06, - 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, - 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x18, 0x0f, - 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x5a, 0x30, 0x16, 0x30, 0x14, 0x02, 0x01, 0x01, 0x18, 0x0f, 0x31, 0x36, - 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a }; -static const BYTE v1CRLWithEntryExt[] = { 0x30,0x5a,0x30,0x02,0x06,0x00,0x30, - 0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61, - 0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31, - 0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x2c,0x30,0x2a,0x02,0x01, - 0x01,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30, - 0x30,0x30,0x5a,0x30,0x14,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff, - 0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01 }; -static const BYTE v1CRLWithExt[] = { 0x30,0x5c,0x30,0x02,0x06,0x00,0x30,0x15, - 0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e, - 0x20,0x4c,0x61,0x6e,0x67,0x00,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30, - 0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x16,0x30,0x14,0x02,0x01,0x01, - 0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, - 0x30,0x5a,0xa0,0x16,0x30,0x14,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01, - 0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01 }; -static const BYTE v2CRLWithExt[] = { 0x30,0x5c,0x02,0x01,0x01,0x30,0x02,0x06, - 0x00,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a, - 0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x18,0x0f,0x31,0x36,0x30,0x31, - 0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x16,0x30,0x14, - 0x02,0x01,0x01,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30, - 0x30,0x30,0x30,0x30,0x5a,0xa0,0x13,0x30,0x11,0x30,0x0f,0x06,0x03,0x55,0x1d, - 0x13,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01 }; - -static void test_encodeCRLToBeSigned(DWORD dwEncoding) -{ - BOOL ret; - BYTE *buf = NULL; - DWORD size = 0; - CRL_INFO info = { 0 }; - CRL_ENTRY entry = { { 0 }, { 0 }, 0, 0 }; - - /* Test with a V1 CRL */ - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* Win9x */), - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(v1CRL), "Wrong size %d\n", size); - ok(!memcmp(buf, v1CRL, size), "Got unexpected value\n"); - LocalFree(buf); - } - /* Test v2 CRL */ - info.dwVersion = CRL_V2; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* Win9x */), - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == v2CRL[1] + 2, "Expected size %d, got %d\n", - v2CRL[1] + 2, size); - ok(!memcmp(buf, v2CRL, size), "Got unexpected value\n"); - LocalFree(buf); - } - /* v1 CRL with a name */ - info.dwVersion = CRL_V1; - info.Issuer.cbData = sizeof(encodedCommonName); - info.Issuer.pbData = (BYTE *)encodedCommonName; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(v1CRLWithIssuer), "Wrong size %d\n", size); - ok(!memcmp(buf, v1CRLWithIssuer, size), "Got unexpected value\n"); - LocalFree(buf); - } - if (0) - { - /* v1 CRL with a name and a NULL entry pointer (crashes on win9x) */ - info.cCRLEntry = 1; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); - } - /* now set an empty entry */ - info.cCRLEntry = 1; - info.rgCRLEntry = &entry; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (buf) - { - ok(size == sizeof(v1CRLWithIssuerAndEmptyEntry), - "Wrong size %d\n", size); - ok(!memcmp(buf, v1CRLWithIssuerAndEmptyEntry, size), - "Got unexpected value\n"); - LocalFree(buf); - } - /* an entry with a serial number */ - entry.SerialNumber.cbData = sizeof(serialNum); - entry.SerialNumber.pbData = (BYTE *)serialNum; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (buf) - { - ok(size == sizeof(v1CRLWithIssuerAndEntry), - "Wrong size %d\n", size); - ok(!memcmp(buf, v1CRLWithIssuerAndEntry, size), - "Got unexpected value\n"); - LocalFree(buf); - } - /* an entry with an extension */ - entry.cExtension = 1; - entry.rgExtension = &criticalExt; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(v1CRLWithEntryExt), "Wrong size %d\n", size); - ok(!memcmp(buf, v1CRLWithEntryExt, size), "Got unexpected value\n"); - LocalFree(buf); - } - /* a CRL with an extension */ - entry.cExtension = 0; - info.cExtension = 1; - info.rgExtension = &criticalExt; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(v1CRLWithExt), "Wrong size %d\n", size); - ok(!memcmp(buf, v1CRLWithExt, size), "Got unexpected value\n"); - LocalFree(buf); - } - /* a v2 CRL with an extension, this time non-critical */ - info.dwVersion = CRL_V2; - info.rgExtension = &nonCriticalExt; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(v2CRLWithExt), "Wrong size %d\n", size); - ok(!memcmp(buf, v2CRLWithExt, size), "Got unexpected value\n"); - LocalFree(buf); - } -} - -static const BYTE verisignCRL[] = { 0x30, 0x82, 0x01, 0xb1, 0x30, 0x82, 0x01, - 0x1a, 0x02, 0x01, 0x01, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, - 0x0d, 0x01, 0x01, 0x02, 0x05, 0x00, 0x30, 0x61, 0x31, 0x11, 0x30, 0x0f, 0x06, - 0x03, 0x55, 0x04, 0x07, 0x13, 0x08, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x31, 0x17, 0x30, 0x15, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x0e, 0x56, - 0x65, 0x72, 0x69, 0x53, 0x69, 0x67, 0x6e, 0x2c, 0x20, 0x49, 0x6e, 0x63, 0x2e, - 0x31, 0x33, 0x30, 0x31, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x2a, 0x56, 0x65, - 0x72, 0x69, 0x53, 0x69, 0x67, 0x6e, 0x20, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x72, - 0x63, 0x69, 0x61, 0x6c, 0x20, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, - 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x20, 0x43, - 0x41, 0x17, 0x0d, 0x30, 0x31, 0x30, 0x33, 0x32, 0x34, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x5a, 0x17, 0x0d, 0x30, 0x34, 0x30, 0x31, 0x30, 0x37, 0x32, 0x33, - 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x69, 0x30, 0x21, 0x02, 0x10, 0x1b, 0x51, - 0x90, 0xf7, 0x37, 0x24, 0x39, 0x9c, 0x92, 0x54, 0xcd, 0x42, 0x46, 0x37, 0x99, - 0x6a, 0x17, 0x0d, 0x30, 0x31, 0x30, 0x31, 0x33, 0x30, 0x30, 0x30, 0x30, 0x31, - 0x32, 0x34, 0x5a, 0x30, 0x21, 0x02, 0x10, 0x75, 0x0e, 0x40, 0xff, 0x97, 0xf0, - 0x47, 0xed, 0xf5, 0x56, 0xc7, 0x08, 0x4e, 0xb1, 0xab, 0xfd, 0x17, 0x0d, 0x30, - 0x31, 0x30, 0x31, 0x33, 0x31, 0x30, 0x30, 0x30, 0x30, 0x34, 0x39, 0x5a, 0x30, - 0x21, 0x02, 0x10, 0x77, 0xe6, 0x5a, 0x43, 0x59, 0x93, 0x5d, 0x5f, 0x7a, 0x75, - 0x80, 0x1a, 0xcd, 0xad, 0xc2, 0x22, 0x17, 0x0d, 0x30, 0x30, 0x30, 0x38, 0x33, - 0x31, 0x30, 0x30, 0x30, 0x30, 0x35, 0x36, 0x5a, 0xa0, 0x1a, 0x30, 0x18, 0x30, - 0x09, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0b, 0x06, - 0x03, 0x55, 0x1d, 0x0f, 0x04, 0x04, 0x03, 0x02, 0x05, 0xa0, 0x30, 0x0d, 0x06, - 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x02, 0x05, 0x00, 0x03, - 0x81, 0x81, 0x00, 0x18, 0x2c, 0xe8, 0xfc, 0x16, 0x6d, 0x91, 0x4a, 0x3d, 0x88, - 0x54, 0x48, 0x5d, 0xb8, 0x11, 0xbf, 0x64, 0xbb, 0xf9, 0xda, 0x59, 0x19, 0xdd, - 0x0e, 0x65, 0xab, 0xc0, 0x0c, 0xfa, 0x67, 0x7e, 0x21, 0x1e, 0x83, 0x0e, 0xcf, - 0x9b, 0x89, 0x8a, 0xcf, 0x0c, 0x4b, 0xc1, 0x39, 0x9d, 0xe7, 0x6a, 0xac, 0x46, - 0x74, 0x6a, 0x91, 0x62, 0x22, 0x0d, 0xc4, 0x08, 0xbd, 0xf5, 0x0a, 0x90, 0x7f, - 0x06, 0x21, 0x3d, 0x7e, 0xa7, 0xaa, 0x5e, 0xcd, 0x22, 0x15, 0xe6, 0x0c, 0x75, - 0x8e, 0x6e, 0xad, 0xf1, 0x84, 0xe4, 0x22, 0xb4, 0x30, 0x6f, 0xfb, 0x64, 0x8f, - 0xd7, 0x80, 0x43, 0xf5, 0x19, 0x18, 0x66, 0x1d, 0x72, 0xa3, 0xe3, 0x94, 0x82, - 0x28, 0x52, 0xa0, 0x06, 0x4e, 0xb1, 0xc8, 0x92, 0x0c, 0x97, 0xbe, 0x15, 0x07, - 0xab, 0x7a, 0xc9, 0xea, 0x08, 0x67, 0x43, 0x4d, 0x51, 0x63, 0x3b, 0x9c, 0x9c, - 0xcd }; -static const BYTE verisignCRLWithLotsOfEntries[] = { -0x30,0x82,0x1d,0xbd,0x30,0x82,0x1d,0x26,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x01,0x04,0x05,0x00,0x30,0x61,0x31,0x11,0x30,0x0f,0x06, -0x03,0x55,0x04,0x07,0x13,0x08,0x49,0x6e,0x74,0x65,0x72,0x6e,0x65,0x74,0x31, -0x17,0x30,0x15,0x06,0x03,0x55,0x04,0x0a,0x13,0x0e,0x56,0x65,0x72,0x69,0x53, -0x69,0x67,0x6e,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x33,0x30,0x31,0x06,0x03, -0x55,0x04,0x0b,0x13,0x2a,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x20,0x43, -0x6f,0x6d,0x6d,0x65,0x72,0x63,0x69,0x61,0x6c,0x20,0x53,0x6f,0x66,0x74,0x77, -0x61,0x72,0x65,0x20,0x50,0x75,0x62,0x6c,0x69,0x73,0x68,0x65,0x72,0x73,0x20, -0x43,0x41,0x17,0x0d,0x30,0x34,0x30,0x33,0x33,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x17,0x0d,0x30,0x34,0x30,0x35,0x33,0x31,0x32,0x33,0x35,0x39,0x35, -0x39,0x5a,0x30,0x82,0x1c,0x92,0x30,0x21,0x02,0x10,0x01,0x22,0xb8,0xb2,0xf3, -0x76,0x42,0xcc,0x48,0x71,0xb6,0x11,0xbf,0xd1,0xcf,0xda,0x17,0x0d,0x30,0x32, -0x30,0x34,0x31,0x35,0x31,0x35,0x34,0x30,0x32,0x34,0x5a,0x30,0x21,0x02,0x10, -0x01,0x83,0x93,0xfb,0x96,0xde,0x1d,0x89,0x4e,0xc3,0x47,0x9c,0xe1,0x60,0x13, -0x63,0x17,0x0d,0x30,0x32,0x30,0x35,0x30,0x39,0x31,0x33,0x35,0x37,0x35,0x38, -0x5a,0x30,0x21,0x02,0x10,0x01,0xdc,0xdb,0x63,0xd4,0xc9,0x9f,0x31,0xb8,0x16, -0xf9,0x2c,0xf5,0xb1,0x08,0x8e,0x17,0x0d,0x30,0x32,0x30,0x34,0x31,0x38,0x31, -0x37,0x34,0x36,0x31,0x34,0x5a,0x30,0x21,0x02,0x10,0x02,0x1a,0xa6,0xaf,0x94, -0x71,0xf0,0x07,0x6e,0xf1,0x17,0xe4,0xd4,0x17,0x82,0xdb,0x17,0x0d,0x30,0x32, -0x30,0x37,0x31,0x39,0x32,0x31,0x32,0x38,0x33,0x31,0x5a,0x30,0x21,0x02,0x10, -0x02,0x4c,0xe8,0x9d,0xfd,0x5f,0x77,0x4d,0x4b,0xf5,0x79,0x8b,0xb1,0x08,0x67, -0xac,0x17,0x0d,0x30,0x32,0x30,0x32,0x31,0x32,0x30,0x36,0x31,0x36,0x35,0x30, -0x5a,0x30,0x21,0x02,0x10,0x02,0x59,0xae,0x6c,0x4c,0x21,0xf1,0x59,0x49,0x87, -0xb0,0x95,0xf9,0x65,0xf3,0x20,0x17,0x0d,0x30,0x33,0x30,0x36,0x31,0x39,0x30, -0x38,0x30,0x34,0x34,0x37,0x5a,0x30,0x21,0x02,0x10,0x03,0x3c,0x41,0x0e,0x2f, -0x42,0x5c,0x32,0x2c,0xb1,0x35,0xfe,0xe7,0x61,0x97,0xa5,0x17,0x0d,0x30,0x32, -0x30,0x34,0x32,0x34,0x31,0x39,0x34,0x37,0x30,0x32,0x5a,0x30,0x21,0x02,0x10, -0x03,0x4e,0x68,0xfa,0x8b,0xb2,0x8e,0xb9,0x72,0xea,0x72,0xe5,0x3b,0x15,0xac, -0x8b,0x17,0x0d,0x30,0x32,0x30,0x39,0x32,0x36,0x32,0x31,0x35,0x31,0x35,0x31, -0x5a,0x30,0x21,0x02,0x10,0x03,0xc9,0xa8,0xe3,0x48,0xb0,0x5f,0xcf,0x08,0xee, -0xb9,0x93,0xf9,0xe9,0xaf,0x0c,0x17,0x0d,0x30,0x32,0x30,0x34,0x31,0x38,0x31, -0x33,0x34,0x39,0x32,0x32,0x5a,0x30,0x21,0x02,0x10,0x04,0x9b,0x23,0x6a,0x37, -0x5c,0x06,0x98,0x0a,0x31,0xc8,0x86,0xdc,0x3a,0x95,0xcc,0x17,0x0d,0x30,0x32, -0x31,0x30,0x30,0x31,0x32,0x32,0x31,0x30,0x35,0x36,0x5a,0x30,0x21,0x02,0x10, -0x06,0x08,0xba,0xc7,0xac,0xf8,0x5a,0x7c,0xa1,0xf4,0x25,0x85,0xbb,0x4e,0x8c, -0x4f,0x17,0x0d,0x30,0x33,0x30,0x31,0x30,0x33,0x30,0x37,0x35,0x37,0x31,0x34, -0x5a,0x30,0x21,0x02,0x10,0x07,0x66,0x22,0x4a,0x4a,0x9d,0xff,0x6e,0xb5,0x11, -0x0b,0xa9,0x94,0xfc,0x68,0x20,0x17,0x0d,0x30,0x32,0x30,0x38,0x32,0x32,0x30, -0x31,0x34,0x30,0x31,0x32,0x5a,0x30,0x21,0x02,0x10,0x07,0x8f,0xa1,0x4d,0xb5, -0xfc,0x0c,0xc6,0x42,0x72,0x88,0x37,0x76,0x29,0x44,0x31,0x17,0x0d,0x30,0x32, -0x30,0x33,0x31,0x35,0x32,0x30,0x31,0x39,0x34,0x39,0x5a,0x30,0x21,0x02,0x10, -0x07,0xb9,0xd9,0x42,0x19,0x81,0xc4,0xfd,0x49,0x4f,0x72,0xce,0xf2,0xf8,0x6d, -0x76,0x17,0x0d,0x30,0x32,0x30,0x32,0x31,0x35,0x31,0x35,0x33,0x37,0x31,0x39, -0x5a,0x30,0x21,0x02,0x10,0x08,0x6e,0xf9,0x6c,0x7f,0xbf,0xbc,0xc8,0x86,0x70, -0x62,0x3f,0xe9,0xc4,0x2f,0x2b,0x17,0x0d,0x30,0x32,0x31,0x31,0x32,0x38,0x30, -0x30,0x32,0x38,0x31,0x34,0x5a,0x30,0x21,0x02,0x10,0x09,0x08,0xe4,0xaa,0xf5, -0x2d,0x2b,0xc0,0x15,0x9e,0x00,0x8b,0x3f,0x97,0x93,0xf9,0x17,0x0d,0x30,0x33, -0x30,0x32,0x31,0x32,0x32,0x32,0x30,0x30,0x32,0x33,0x5a,0x30,0x21,0x02,0x10, -0x09,0x13,0x0a,0x4f,0x0f,0x88,0xe5,0x50,0x05,0xc3,0x5f,0xf4,0xff,0x15,0x39, -0xdd,0x17,0x0d,0x30,0x32,0x30,0x33,0x30,0x36,0x30,0x38,0x31,0x31,0x33,0x30, -0x5a,0x30,0x21,0x02,0x10,0x09,0x8d,0xdd,0x37,0xda,0xe7,0x84,0x03,0x9d,0x98, -0x96,0xf8,0x88,0x3a,0x55,0xca,0x17,0x0d,0x30,0x32,0x30,0x32,0x32,0x31,0x32, -0x33,0x33,0x35,0x32,0x36,0x5a,0x30,0x21,0x02,0x10,0x0a,0x35,0x0c,0xd7,0xf4, -0x53,0xe6,0xc1,0x4e,0xf2,0x2a,0xd3,0xce,0xf8,0x7c,0xe7,0x17,0x0d,0x30,0x32, -0x30,0x38,0x30,0x32,0x32,0x32,0x32,0x34,0x32,0x38,0x5a,0x30,0x21,0x02,0x10, -0x0b,0x9c,0xb8,0xf8,0xfb,0x35,0x38,0xf2,0x91,0xfd,0xa1,0xe9,0x69,0x4a,0xb1, -0x24,0x17,0x0d,0x30,0x33,0x30,0x34,0x30,0x38,0x30,0x31,0x30,0x32,0x32,0x32, -0x5a,0x30,0x21,0x02,0x10,0x0c,0x2f,0x7f,0x32,0x15,0xe0,0x2f,0x74,0xfa,0x05, -0x22,0x67,0xbc,0x8a,0x2d,0xd0,0x17,0x0d,0x30,0x32,0x30,0x32,0x32,0x36,0x31, -0x39,0x30,0x37,0x35,0x34,0x5a,0x30,0x21,0x02,0x10,0x0c,0x32,0x5b,0x78,0x32, -0xc6,0x7c,0xd8,0xdd,0x25,0x91,0x22,0x4d,0x84,0x0a,0x94,0x17,0x0d,0x30,0x32, -0x30,0x33,0x31,0x38,0x31,0x32,0x33,0x39,0x30,0x33,0x5a,0x30,0x21,0x02,0x10, -0x0d,0x76,0x36,0xb9,0x1c,0x72,0xb7,0x9d,0xdf,0xa5,0x35,0x82,0xc5,0xa8,0xf7, -0xbb,0x17,0x0d,0x30,0x32,0x30,0x38,0x32,0x37,0x32,0x31,0x34,0x32,0x31,0x31, -0x5a,0x30,0x21,0x02,0x10,0x0f,0x28,0x79,0x98,0x56,0xb8,0xa5,0x5e,0xeb,0x79, -0x5f,0x1b,0xed,0x0b,0x86,0x76,0x17,0x0d,0x30,0x32,0x30,0x33,0x31,0x33,0x30, -0x31,0x31,0x30,0x34,0x37,0x5a,0x30,0x21,0x02,0x10,0x0f,0x80,0x3c,0x24,0xf4, -0x62,0x27,0x24,0xbe,0x6a,0x74,0x9c,0x18,0x8e,0x4b,0x3b,0x17,0x0d,0x30,0x32, -0x31,0x31,0x32,0x30,0x31,0x37,0x31,0x31,0x33,0x35,0x5a,0x30,0x21,0x02,0x10, -0x0f,0xf2,0xa7,0x8c,0x80,0x9c,0xbe,0x2f,0xc8,0xa9,0xeb,0xfe,0x94,0x86,0x5a, -0x5c,0x17,0x0d,0x30,0x32,0x30,0x36,0x32,0x30,0x31,0x39,0x35,0x38,0x34,0x35, -0x5a,0x30,0x21,0x02,0x10,0x10,0x45,0x13,0x35,0x45,0xf3,0xc6,0x02,0x8d,0x8d, -0x18,0xb1,0xc4,0x0a,0x7a,0x18,0x17,0x0d,0x30,0x32,0x30,0x34,0x32,0x36,0x31, -0x37,0x33,0x32,0x35,0x39,0x5a,0x30,0x21,0x02,0x10,0x10,0x79,0xb1,0x71,0x1b, -0x26,0x98,0x92,0x08,0x1e,0x3c,0xe4,0x8b,0x29,0x37,0xf9,0x17,0x0d,0x30,0x32, -0x30,0x33,0x32,0x38,0x31,0x36,0x33,0x32,0x35,0x35,0x5a,0x30,0x21,0x02,0x10, -0x11,0x38,0x80,0x77,0xcb,0x6b,0xe5,0xd6,0xa7,0xf2,0x99,0xa1,0xc8,0xe9,0x40, -0x25,0x17,0x0d,0x30,0x32,0x30,0x34,0x31,0x39,0x31,0x32,0x32,0x34,0x31,0x37, -0x5a,0x30,0x21,0x02,0x10,0x11,0x7a,0xc3,0x82,0xfe,0x74,0x36,0x11,0x21,0xd6, -0x92,0x86,0x09,0xdf,0xe6,0xf3,0x17,0x0d,0x30,0x32,0x30,0x32,0x31,0x39,0x31, -0x35,0x31,0x31,0x33,0x36,0x5a,0x30,0x21,0x02,0x10,0x11,0xab,0x8e,0x21,0x28, -0x7f,0x6d,0xf2,0xc1,0xc8,0x40,0x3e,0xa5,0xde,0x98,0xd3,0x17,0x0d,0x30,0x32, -0x30,0x35,0x30,0x32,0x31,0x38,0x34,0x34,0x33,0x31,0x5a,0x30,0x21,0x02,0x10, -0x12,0x3c,0x38,0xae,0x3f,0x64,0x53,0x3a,0xf7,0xbc,0x6c,0x27,0xe2,0x9c,0x65, -0x75,0x17,0x0d,0x30,0x32,0x30,0x32,0x31,0x33,0x32,0x33,0x30,0x38,0x35,0x39, -0x5a,0x30,0x21,0x02,0x10,0x12,0x88,0xb6,0x6c,0x9b,0xcf,0xe7,0x50,0x92,0xd2, -0x87,0x63,0x8f,0xb7,0xa6,0xe3,0x17,0x0d,0x30,0x32,0x30,0x37,0x30,0x32,0x32, -0x30,0x35,0x35,0x30,0x33,0x5a,0x30,0x21,0x02,0x10,0x12,0x95,0x4e,0xb6,0x8f, -0x3a,0x19,0x6a,0x16,0x73,0x4f,0x6e,0x15,0xba,0xa5,0xe7,0x17,0x0d,0x30,0x32, -0x30,0x36,0x31,0x37,0x31,0x38,0x35,0x36,0x30,0x31,0x5a,0x30,0x21,0x02,0x10, -0x13,0x37,0x0b,0x41,0x8c,0x31,0x43,0x1c,0x27,0xaa,0xe1,0x83,0x0f,0x99,0x21, -0xcd,0x17,0x0d,0x30,0x32,0x30,0x37,0x32,0x32,0x31,0x32,0x31,0x37,0x31,0x36, -0x5a,0x30,0x21,0x02,0x10,0x14,0x7a,0x29,0x0a,0x09,0x38,0xf4,0x53,0x28,0x33, -0x6f,0x37,0x07,0x23,0x12,0x10,0x17,0x0d,0x30,0x32,0x30,0x32,0x32,0x32,0x30, -0x32,0x30,0x30,0x31,0x34,0x5a,0x30,0x21,0x02,0x10,0x15,0x04,0x81,0x1e,0xe2, -0x6f,0xf0,0xd8,0xdd,0x12,0x55,0x05,0x66,0x51,0x6e,0x1a,0x17,0x0d,0x30,0x32, -0x30,0x33,0x31,0x33,0x31,0x30,0x35,0x33,0x30,0x38,0x5a,0x30,0x21,0x02,0x10, -0x15,0x30,0x0d,0x8a,0xbd,0x0e,0x89,0x0e,0x66,0x4f,0x49,0x93,0xa2,0x8f,0xbc, -0x2e,0x17,0x0d,0x30,0x32,0x30,0x34,0x30,0x34,0x30,0x36,0x34,0x32,0x32,0x33, -0x5a,0x30,0x21,0x02,0x10,0x16,0xbe,0x64,0xd6,0x4f,0x90,0xf4,0xf7,0x2b,0xc8, -0xca,0x67,0x5c,0x82,0x13,0xe8,0x17,0x0d,0x30,0x32,0x30,0x36,0x30,0x36,0x31, -0x39,0x30,0x39,0x30,0x37,0x5a,0x30,0x21,0x02,0x10,0x18,0x51,0x9c,0xe4,0x48, -0x62,0x06,0xfe,0xb8,0x2d,0x93,0xb7,0xc9,0xc9,0x1b,0x4e,0x17,0x0d,0x30,0x32, -0x30,0x34,0x31,0x37,0x30,0x35,0x30,0x30,0x34,0x34,0x5a,0x30,0x21,0x02,0x10, -0x19,0x82,0xdb,0x39,0x74,0x00,0x38,0x36,0x59,0xf6,0xcc,0xc1,0x23,0x8d,0x40, -0xe9,0x17,0x0d,0x30,0x32,0x30,0x33,0x30,0x36,0x30,0x37,0x35,0x34,0x35,0x34, -0x5a,0x30,0x21,0x02,0x10,0x1b,0x51,0x90,0xf7,0x37,0x24,0x39,0x9c,0x92,0x54, -0xcd,0x42,0x46,0x37,0x99,0x6a,0x17,0x0d,0x30,0x31,0x30,0x31,0x33,0x30,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x21,0x02,0x10,0x1b,0xe4,0xb2,0xbb,0xb6, -0x74,0x5d,0x6b,0x8b,0x04,0xb6,0xa0,0x1b,0x35,0xeb,0x29,0x17,0x0d,0x30,0x32, -0x30,0x39,0x32,0x35,0x32,0x30,0x31,0x34,0x35,0x36,0x5a,0x30,0x21,0x02,0x10, -0x1c,0x1d,0xd5,0x2a,0xf6,0xaa,0xfd,0xbb,0x47,0xc2,0x73,0x36,0xcf,0x53,0xbd, -0x81,0x17,0x0d,0x30,0x32,0x30,0x32,0x31,0x33,0x31,0x39,0x30,0x33,0x34,0x32, -0x5a,0x30,0x21,0x02,0x10,0x1c,0xb0,0x5a,0x1f,0xfd,0xa6,0x98,0xf6,0x46,0xf9, -0x32,0x10,0x9e,0xef,0x52,0x8e,0x17,0x0d,0x30,0x32,0x30,0x36,0x32,0x37,0x31, -0x33,0x30,0x33,0x32,0x32,0x5a,0x30,0x21,0x02,0x10,0x1d,0x01,0xfc,0xa7,0xdd, -0xb4,0x0c,0x64,0xbd,0x65,0x45,0xe6,0xbf,0x1c,0x7e,0x90,0x17,0x0d,0x30,0x32, -0x30,0x32,0x32,0x31,0x30,0x34,0x32,0x30,0x30,0x36,0x5a,0x30,0x21,0x02,0x10, -0x1e,0x4d,0xc9,0xc6,0x6e,0x57,0xda,0x8a,0x07,0x97,0x70,0xfa,0xee,0x9c,0xc5, -0x58,0x17,0x0d,0x30,0x32,0x30,0x32,0x31,0x39,0x32,0x32,0x33,0x34,0x32,0x31, -0x5a,0x30,0x21,0x02,0x10,0x1e,0xbb,0x9b,0x28,0x61,0x50,0x7f,0x12,0x30,0xfb, -0x02,0xb5,0xe1,0xb0,0x7e,0x9d,0x17,0x0d,0x30,0x32,0x30,0x33,0x30,0x36,0x30, -0x30,0x30,0x34,0x32,0x30,0x5a,0x30,0x21,0x02,0x10,0x1f,0x5a,0x64,0xc9,0xa5, -0x51,0x8c,0xe2,0x2d,0x50,0x83,0xc2,0x4c,0x7c,0xe7,0x85,0x17,0x0d,0x30,0x32, -0x30,0x38,0x32,0x34,0x30,0x36,0x33,0x31,0x32,0x38,0x5a,0x30,0x21,0x02,0x10, -0x1f,0xc2,0x4e,0xd0,0xac,0x52,0xd3,0x39,0x18,0x6d,0xd0,0x0f,0x23,0xd7,0x45, -0x72,0x17,0x0d,0x30,0x32,0x30,0x32,0x32,0x38,0x31,0x39,0x31,0x35,0x34,0x32, -0x5a,0x30,0x20,0x02,0x0f,0x24,0x60,0x7a,0x8e,0x0e,0x86,0xa4,0x88,0x68,0xaf, -0xd9,0x0c,0x6b,0xba,0xff,0x17,0x0d,0x30,0x32,0x30,0x32,0x32,0x38,0x30,0x35, -0x31,0x38,0x32,0x34,0x5a,0x30,0x21,0x02,0x10,0x20,0x41,0x73,0xbb,0x72,0x88, -0x6e,0x4b,0x1c,0xb6,0x70,0x02,0x67,0xaa,0x3b,0x3d,0x17,0x0d,0x30,0x32,0x30, -0x39,0x30,0x33,0x31,0x37,0x30,0x36,0x32,0x31,0x5a,0x30,0x21,0x02,0x10,0x20, -0x6e,0x0d,0xdc,0x8c,0xa4,0xac,0xf7,0x08,0x77,0x5c,0x80,0xf9,0xa3,0x68,0x92, -0x17,0x0d,0x30,0x32,0x30,0x34,0x31,0x30,0x32,0x30,0x35,0x37,0x31,0x36,0x5a, -0x30,0x21,0x02,0x10,0x21,0xe4,0x6b,0x98,0x47,0x91,0xe6,0x02,0xdf,0xb2,0x45, -0xbc,0x31,0x37,0xa0,0x7c,0x17,0x0d,0x30,0x32,0x30,0x33,0x30,0x38,0x32,0x33, -0x32,0x33,0x31,0x33,0x5a,0x30,0x21,0x02,0x10,0x22,0x00,0x95,0x70,0x79,0xf9, -0x9c,0x34,0x91,0xbb,0x84,0xb9,0x91,0xde,0x22,0x55,0x17,0x0d,0x30,0x32,0x30, -0x32,0x31,0x33,0x30,0x36,0x35,0x39,0x33,0x39,0x5a,0x30,0x21,0x02,0x10,0x22, -0xf9,0x67,0x4f,0xcd,0x29,0xc6,0xdc,0xc8,0x22,0x6e,0xe9,0x0a,0xa1,0x48,0x5a, -0x17,0x0d,0x30,0x32,0x30,0x34,0x30,0x33,0x30,0x30,0x34,0x33,0x32,0x36,0x5a, -0x30,0x21,0x02,0x10,0x24,0xa3,0xa7,0xd0,0xb8,0x1d,0x1c,0xf7,0xe6,0x1f,0x6e, -0xba,0xc9,0x98,0x59,0xed,0x17,0x0d,0x30,0x33,0x30,0x37,0x32,0x34,0x32,0x30, -0x35,0x38,0x30,0x32,0x5a,0x30,0x21,0x02,0x10,0x24,0xef,0x89,0xa1,0x30,0x4f, -0x51,0x63,0xfe,0xdb,0xdb,0x64,0x6e,0x4c,0x5a,0x81,0x17,0x0d,0x30,0x32,0x30, -0x37,0x30,0x33,0x30,0x39,0x32,0x31,0x31,0x37,0x5a,0x30,0x21,0x02,0x10,0x25, -0x08,0xe5,0xac,0xdd,0x6f,0x74,0x44,0x51,0x1a,0xf5,0xdb,0xf8,0xba,0x25,0xe0, -0x17,0x0d,0x30,0x32,0x30,0x34,0x30,0x39,0x30,0x34,0x31,0x36,0x32,0x32,0x5a, -0x30,0x21,0x02,0x10,0x25,0x81,0xe8,0x18,0x60,0x88,0xbc,0x1a,0xe9,0x14,0x84, -0xed,0xd4,0x62,0xf5,0x47,0x17,0x0d,0x30,0x32,0x30,0x38,0x32,0x33,0x30,0x31, -0x35,0x37,0x31,0x39,0x5a,0x30,0x21,0x02,0x10,0x26,0xe5,0x5c,0xab,0x16,0xec, -0x61,0x38,0x49,0x2c,0xd2,0xb1,0x48,0x89,0xd5,0x47,0x17,0x0d,0x30,0x32,0x30, -0x33,0x31,0x33,0x31,0x38,0x30,0x30,0x33,0x38,0x5a,0x30,0x21,0x02,0x10,0x27, -0xbe,0xda,0x7f,0x4f,0x1f,0x6c,0x76,0x09,0xc0,0x9a,0xaf,0xd4,0x68,0xe2,0x16, -0x17,0x0d,0x30,0x32,0x30,0x35,0x31,0x30,0x31,0x38,0x33,0x32,0x33,0x30,0x5a, -0x30,0x21,0x02,0x10,0x28,0x89,0xd0,0xb3,0xb5,0xc4,0x56,0x36,0x9b,0x3e,0x81, -0x1a,0x21,0x56,0xaa,0x42,0x17,0x0d,0x30,0x32,0x31,0x31,0x30,0x34,0x31,0x31, -0x30,0x33,0x30,0x38,0x5a,0x30,0x21,0x02,0x10,0x28,0xab,0x93,0x06,0xb1,0x1e, -0x05,0xe0,0xe1,0x25,0x75,0xc7,0x74,0xcb,0x55,0xa6,0x17,0x0d,0x30,0x33,0x30, -0x31,0x32,0x34,0x31,0x39,0x34,0x38,0x32,0x33,0x5a,0x30,0x21,0x02,0x10,0x29, -0xe9,0x3b,0x44,0x8d,0xc3,0x4b,0x80,0x17,0xda,0xe4,0x1c,0x43,0x96,0x83,0x59, -0x17,0x0d,0x30,0x32,0x30,0x36,0x30,0x37,0x32,0x31,0x34,0x33,0x33,0x39,0x5a, -0x30,0x21,0x02,0x10,0x2a,0x08,0x64,0x2b,0x48,0xe2,0x17,0x89,0x6a,0x0c,0xf9, -0x7e,0x10,0x66,0x8f,0xe7,0x17,0x0d,0x30,0x32,0x30,0x38,0x31,0x39,0x31,0x38, -0x33,0x35,0x32,0x39,0x5a,0x30,0x21,0x02,0x10,0x2a,0x44,0xee,0x91,0x5d,0xe3, -0xa5,0x2b,0x09,0xf3,0x56,0x59,0xe0,0x8f,0x25,0x22,0x17,0x0d,0x30,0x32,0x30, -0x32,0x32,0x31,0x31,0x39,0x33,0x31,0x32,0x34,0x5a,0x30,0x21,0x02,0x10,0x2a, -0x8b,0x4e,0xa5,0xb6,0x06,0xc8,0x48,0x3b,0x0e,0x71,0x1e,0x6b,0xf4,0x16,0xc1, -0x17,0x0d,0x30,0x32,0x30,0x34,0x33,0x30,0x30,0x39,0x32,0x31,0x31,0x38,0x5a, -0x30,0x21,0x02,0x10,0x2b,0x03,0xfc,0x2f,0xc2,0x8e,0x38,0x29,0x6f,0xa1,0x0f, -0xe9,0x47,0x1b,0x35,0xd7,0x17,0x0d,0x30,0x32,0x31,0x31,0x31,0x34,0x32,0x30, -0x31,0x38,0x33,0x33,0x5a,0x30,0x21,0x02,0x10,0x2c,0x48,0xf7,0xd6,0xd5,0x71, -0xc0,0xd1,0xbd,0x6a,0x00,0x65,0x1d,0x2d,0xa9,0xdd,0x17,0x0d,0x30,0x32,0x30, -0x33,0x30,0x36,0x31,0x37,0x32,0x30,0x34,0x33,0x5a,0x30,0x21,0x02,0x10,0x2c, -0xbf,0x84,0x1d,0xe4,0x58,0x32,0x79,0x32,0x10,0x37,0xde,0xd7,0x94,0xff,0x85, -0x17,0x0d,0x30,0x32,0x30,0x32,0x32,0x32,0x31,0x39,0x30,0x32,0x32,0x35,0x5a, -0x30,0x21,0x02,0x10,0x2d,0x03,0x54,0x35,0x54,0x45,0x2c,0x6d,0x39,0xf0,0x1b, -0x74,0x68,0xde,0xcf,0x93,0x17,0x0d,0x30,0x32,0x30,0x39,0x32,0x33,0x31,0x33, -0x32,0x33,0x33,0x37,0x5a,0x30,0x21,0x02,0x10,0x2d,0x24,0x94,0x34,0x19,0x92, -0xb1,0xf2,0x37,0x9d,0x6e,0xc5,0x35,0x93,0xdd,0xf0,0x17,0x0d,0x30,0x32,0x30, -0x33,0x31,0x35,0x31,0x37,0x31,0x37,0x32,0x37,0x5a,0x30,0x21,0x02,0x10,0x2d, -0x47,0x24,0x61,0x87,0x91,0xba,0x2e,0xf2,0xf7,0x92,0x21,0xf3,0x1b,0x8b,0x1e, -0x17,0x0d,0x30,0x32,0x30,0x35,0x31,0x34,0x32,0x33,0x30,0x38,0x32,0x32,0x5a, -0x30,0x21,0x02,0x10,0x2d,0x84,0xc2,0xb1,0x01,0xa1,0x3a,0x6f,0xb0,0x30,0x13, -0x76,0x5a,0x69,0xec,0x41,0x17,0x0d,0x30,0x32,0x30,0x37,0x31,0x35,0x31,0x37, -0x32,0x39,0x32,0x33,0x5a,0x30,0x21,0x02,0x10,0x2d,0xd5,0x26,0xc3,0xcd,0x01, -0xce,0xfd,0x67,0xb8,0x08,0xac,0x5a,0x70,0xc4,0x34,0x17,0x0d,0x30,0x32,0x30, -0x32,0x32,0x37,0x30,0x34,0x34,0x36,0x31,0x34,0x5a,0x30,0x21,0x02,0x10,0x2e, -0x2b,0x0a,0x94,0x4d,0xf1,0xa4,0x37,0xb7,0xa3,0x9b,0x4b,0x96,0x26,0xa8,0xe3, -0x17,0x0d,0x30,0x33,0x30,0x31,0x30,0x39,0x30,0x36,0x32,0x38,0x32,0x38,0x5a, -0x30,0x21,0x02,0x10,0x2e,0x31,0x30,0xc1,0x2e,0x16,0x31,0xd9,0x2b,0x0a,0x70, -0xca,0x3f,0x31,0x73,0x62,0x17,0x0d,0x30,0x33,0x30,0x31,0x32,0x39,0x30,0x31, -0x34,0x39,0x32,0x37,0x5a,0x30,0x21,0x02,0x10,0x2e,0xbd,0x6d,0xdf,0xce,0x20, -0x6f,0xe7,0xa8,0xf4,0xf3,0x25,0x9c,0xc3,0xc1,0x12,0x17,0x0d,0x30,0x32,0x30, -0x39,0x32,0x30,0x31,0x33,0x35,0x34,0x34,0x32,0x5a,0x30,0x21,0x02,0x10,0x2f, -0x56,0x16,0x22,0xba,0x87,0xd5,0xfd,0xff,0xe6,0xb0,0xdd,0x3c,0x08,0x26,0x2c, -0x17,0x0d,0x30,0x32,0x30,0x33,0x31,0x33,0x31,0x37,0x35,0x33,0x31,0x31,0x5a, -0x30,0x21,0x02,0x10,0x30,0x3e,0x77,0x7b,0xec,0xcb,0x89,0x2c,0x15,0x55,0x7f, -0x20,0xf2,0x33,0xc1,0x1e,0x17,0x0d,0x30,0x32,0x30,0x32,0x32,0x31,0x32,0x33, -0x35,0x30,0x34,0x39,0x5a,0x30,0x21,0x02,0x10,0x30,0x59,0x6c,0xaa,0x5f,0xd3, -0xac,0x50,0x86,0x2c,0xc4,0xfa,0x3c,0x48,0x50,0xd1,0x17,0x0d,0x30,0x32,0x30, -0x32,0x32,0x31,0x30,0x34,0x31,0x39,0x33,0x35,0x5a,0x30,0x21,0x02,0x10,0x30, -0xce,0x9a,0xf1,0xfa,0x17,0xfa,0xf5,0x4c,0xbc,0x52,0x8a,0xf4,0x26,0x2b,0x7b, -0x17,0x0d,0x30,0x32,0x30,0x33,0x30,0x31,0x31,0x39,0x31,0x32,0x33,0x39,0x5a, -0x30,0x21,0x02,0x10,0x31,0x16,0x4a,0x6a,0x2e,0x6d,0x34,0x4d,0xd2,0x40,0xf0, -0x5f,0x47,0xe6,0x5b,0x47,0x17,0x0d,0x30,0x32,0x30,0x32,0x31,0x32,0x31,0x37, -0x33,0x38,0x35,0x32,0x5a,0x30,0x21,0x02,0x10,0x31,0xdb,0x97,0x5b,0x06,0x63, -0x0b,0xd8,0xfe,0x06,0xb3,0xf5,0xf9,0x64,0x0a,0x59,0x17,0x0d,0x30,0x32,0x30, -0x32,0x31,0x32,0x31,0x35,0x35,0x39,0x32,0x33,0x5a,0x30,0x21,0x02,0x10,0x32, -0xbc,0xeb,0x0c,0xca,0x65,0x06,0x3f,0xa4,0xd5,0x4a,0x56,0x46,0x7c,0x22,0x09, -0x17,0x0d,0x30,0x32,0x30,0x38,0x31,0x36,0x30,0x37,0x33,0x33,0x35,0x35,0x5a, -0x30,0x21,0x02,0x10,0x33,0x17,0xef,0xe1,0x89,0xec,0x11,0x25,0x15,0x8f,0x3b, -0x67,0x7a,0x64,0x0b,0x50,0x17,0x0d,0x30,0x32,0x30,0x39,0x31,0x38,0x31,0x37, -0x30,0x33,0x34,0x36,0x5a,0x30,0x21,0x02,0x10,0x34,0x24,0xa0,0xd2,0x00,0x61, -0xeb,0xd3,0x9a,0xa7,0x2a,0x66,0xb4,0x82,0x23,0x77,0x17,0x0d,0x30,0x32,0x30, -0x33,0x31,0x35,0x32,0x32,0x34,0x33,0x33,0x39,0x5a,0x30,0x21,0x02,0x10,0x34, -0xa8,0x16,0x67,0xa5,0x1b,0xa3,0x31,0x11,0x5e,0x26,0xc8,0x3f,0x21,0x38,0xbe, -0x17,0x0d,0x30,0x32,0x30,0x33,0x32,0x31,0x32,0x31,0x31,0x36,0x32,0x31,0x5a, -0x30,0x21,0x02,0x10,0x36,0x3a,0xbe,0x05,0x55,0x52,0x93,0x4f,0x32,0x5f,0x30, -0x63,0xc0,0xd4,0x50,0xdf,0x17,0x0d,0x30,0x32,0x30,0x33,0x30,0x38,0x31,0x31, -0x34,0x36,0x31,0x34,0x5a,0x30,0x21,0x02,0x10,0x37,0x19,0xcc,0xa5,0x9d,0x85, -0x05,0x56,0xe1,0x63,0x42,0x4b,0x0d,0x3c,0xbf,0xd6,0x17,0x0d,0x30,0x33,0x30, -0x31,0x30,0x38,0x31,0x38,0x35,0x38,0x32,0x34,0x5a,0x30,0x21,0x02,0x10,0x37, -0x2f,0xfd,0x2b,0xec,0x4d,0x94,0x35,0x51,0xf4,0x07,0x2a,0xf5,0x0b,0x97,0xc4, -0x17,0x0d,0x30,0x32,0x30,0x32,0x31,0x33,0x31,0x39,0x31,0x38,0x30,0x31,0x5a, -0x30,0x21,0x02,0x10,0x37,0x83,0xf5,0x1e,0x7e,0xf4,0x5f,0xad,0x1f,0x0c,0x55, -0x86,0x30,0x02,0x54,0xc1,0x17,0x0d,0x30,0x33,0x30,0x31,0x30,0x38,0x32,0x30, -0x30,0x33,0x34,0x34,0x5a,0x30,0x21,0x02,0x10,0x38,0x32,0x3e,0x50,0x2b,0x36, -0x93,0x01,0x32,0x0a,0x59,0x8c,0xce,0xad,0xa0,0xeb,0x17,0x0d,0x30,0x32,0x30, -0x34,0x33,0x30,0x32,0x31,0x32,0x34,0x30,0x38,0x5a,0x30,0x21,0x02,0x10,0x3a, -0x62,0xd8,0x64,0xd3,0x85,0xd5,0x61,0x1d,0x9d,0x3f,0x61,0x25,0xe9,0x3a,0x1d, -0x17,0x0d,0x30,0x32,0x30,0x36,0x31,0x37,0x31,0x35,0x31,0x39,0x31,0x36,0x5a, -0x30,0x21,0x02,0x10,0x3a,0x97,0x36,0xb1,0x26,0x14,0x73,0x50,0xa3,0xcc,0x3f, -0xd0,0x3b,0x83,0x99,0xc9,0x17,0x0d,0x30,0x32,0x30,0x39,0x31,0x31,0x30,0x33, -0x32,0x39,0x33,0x30,0x5a,0x30,0x21,0x02,0x10,0x3b,0x87,0x3e,0x20,0xbe,0x97, -0xff,0xa7,0x6b,0x2b,0x5f,0xff,0x9a,0x7f,0x4c,0x95,0x17,0x0d,0x30,0x32,0x30, -0x37,0x30,0x33,0x30,0x30,0x33,0x31,0x34,0x37,0x5a,0x30,0x21,0x02,0x10,0x3b, -0xba,0xe5,0xf2,0x23,0x99,0xc6,0xd7,0xae,0xe2,0x98,0x0d,0xa4,0x13,0x5c,0xd4, -0x17,0x0d,0x30,0x32,0x30,0x35,0x32,0x34,0x31,0x39,0x32,0x38,0x34,0x35,0x5a, -0x30,0x21,0x02,0x10,0x3b,0xc2,0x7c,0xf0,0xbd,0xd2,0x9a,0x6f,0x97,0xdd,0x76, -0xbc,0xa9,0x6c,0x45,0x0d,0x17,0x0d,0x30,0x32,0x30,0x33,0x30,0x38,0x31,0x30, -0x34,0x32,0x30,0x33,0x5a,0x30,0x21,0x02,0x10,0x3b,0xc5,0xda,0x41,0x64,0x7a, -0x37,0x8e,0x9f,0x7f,0x1f,0x9b,0x25,0x0a,0xb4,0xda,0x17,0x0d,0x30,0x32,0x30, -0x33,0x30,0x36,0x31,0x33,0x32,0x34,0x34,0x38,0x5a,0x30,0x21,0x02,0x10,0x3c, -0x1b,0xf1,0x9a,0x48,0xb0,0xb8,0xa0,0x45,0xd5,0x8f,0x0f,0x57,0x90,0xc2,0xcd, -0x17,0x0d,0x30,0x32,0x30,0x33,0x31,0x38,0x30,0x36,0x34,0x33,0x32,0x33,0x5a, -0x30,0x21,0x02,0x10,0x3d,0x15,0x48,0x80,0xb4,0xfe,0x51,0x7e,0xed,0x46,0xae, -0x51,0xfd,0x47,0x73,0xde,0x17,0x0d,0x30,0x32,0x30,0x38,0x32,0x37,0x30,0x39, -0x32,0x30,0x30,0x38,0x5a,0x30,0x21,0x02,0x10,0x3d,0x61,0x4e,0x87,0xea,0x39, -0x02,0xf3,0x1e,0x3e,0x56,0x5c,0x0e,0x3b,0xa7,0xe3,0x17,0x0d,0x30,0x32,0x31, -0x30,0x32,0x39,0x31,0x39,0x35,0x34,0x31,0x32,0x5a,0x30,0x21,0x02,0x10,0x3d, -0xdd,0x61,0x92,0x82,0x69,0x6b,0x01,0x79,0x0e,0xef,0x96,0x12,0xa3,0x76,0x80, -0x17,0x0d,0x30,0x32,0x30,0x35,0x30,0x31,0x32,0x32,0x32,0x34,0x31,0x36,0x5a, -0x30,0x21,0x02,0x10,0x3e,0x0e,0x14,0x71,0x55,0xf3,0x48,0x09,0x1b,0x56,0x3b, -0x91,0x7a,0x7d,0xec,0xc9,0x17,0x0d,0x30,0x32,0x30,0x33,0x31,0x31,0x32,0x31, -0x34,0x35,0x35,0x31,0x5a,0x30,0x21,0x02,0x10,0x3e,0x23,0x00,0x1f,0x9b,0xbd, -0xe8,0xb1,0xf0,0x06,0x67,0xa6,0x70,0x42,0x2e,0xc3,0x17,0x0d,0x30,0x32,0x30, -0x38,0x30,0x38,0x31,0x32,0x32,0x31,0x33,0x32,0x5a,0x30,0x21,0x02,0x10,0x41, -0x91,0x1a,0x8c,0xde,0x2d,0xb3,0xeb,0x79,0x1d,0xc7,0x99,0x99,0xbe,0x0c,0x0e, -0x17,0x0d,0x30,0x32,0x30,0x32,0x32,0x35,0x31,0x39,0x31,0x38,0x35,0x34,0x5a, -0x30,0x21,0x02,0x10,0x41,0xa8,0xd7,0x9c,0x10,0x5e,0x5a,0xac,0x16,0x7f,0x93, -0xaa,0xd1,0x83,0x34,0x55,0x17,0x0d,0x30,0x32,0x30,0x34,0x31,0x30,0x31,0x32, -0x35,0x33,0x34,0x30,0x5a,0x30,0x21,0x02,0x10,0x42,0x88,0x96,0xb0,0x7b,0x28, -0xa2,0xfa,0x2f,0x91,0x73,0x58,0xa7,0x1e,0x53,0x7c,0x17,0x0d,0x30,0x33,0x30, -0x33,0x30,0x31,0x30,0x39,0x34,0x33,0x33,0x31,0x5a,0x30,0x21,0x02,0x10,0x42, -0x93,0x2f,0xd2,0x54,0xd3,0x94,0xd0,0x41,0x6a,0x2e,0x33,0x8b,0x81,0xb4,0x3c, -0x17,0x0d,0x30,0x32,0x30,0x38,0x30,0x38,0x30,0x30,0x34,0x38,0x34,0x36,0x5a, -0x30,0x21,0x02,0x10,0x44,0x24,0xdd,0xba,0x85,0xfd,0x3e,0xb2,0xb8,0x17,0x74, -0xfd,0x9d,0x5c,0x0c,0xbd,0x17,0x0d,0x30,0x32,0x30,0x39,0x32,0x31,0x31,0x36, -0x30,0x39,0x31,0x32,0x5a,0x30,0x21,0x02,0x10,0x45,0x02,0x18,0x7d,0x39,0x9c, -0xb9,0x14,0xfb,0x10,0x37,0x96,0xf4,0xc1,0xdd,0x2f,0x17,0x0d,0x30,0x32,0x30, -0x32,0x31,0x31,0x31,0x31,0x31,0x31,0x30,0x36,0x5a,0x30,0x21,0x02,0x10,0x45, -0x16,0xbc,0x31,0x0b,0x4e,0x87,0x0a,0xcc,0xe3,0xd5,0x14,0x16,0x33,0x11,0x83, -0x17,0x0d,0x30,0x32,0x30,0x34,0x30,0x32,0x30,0x32,0x32,0x30,0x31,0x37,0x5a, -0x30,0x21,0x02,0x10,0x46,0x16,0x36,0xde,0x3f,0xef,0x8c,0xfa,0x67,0x53,0x12, -0xcc,0x76,0x63,0xd6,0xdd,0x17,0x0d,0x30,0x32,0x30,0x32,0x31,0x34,0x31,0x36, -0x35,0x39,0x34,0x33,0x5a,0x30,0x21,0x02,0x10,0x46,0x5f,0x85,0xa3,0xa4,0x98, -0x3c,0x40,0x63,0xf6,0x1c,0xf7,0xc2,0xbe,0xfd,0x0e,0x17,0x0d,0x30,0x32,0x30, -0x34,0x30,0x39,0x31,0x35,0x33,0x30,0x30,0x35,0x5a,0x30,0x21,0x02,0x10,0x47, -0x20,0xc2,0xd8,0x85,0x85,0x54,0x39,0xcd,0xf2,0x10,0xf0,0xa7,0x88,0x52,0x75, -0x17,0x0d,0x30,0x32,0x30,0x39,0x31,0x30,0x32,0x32,0x32,0x35,0x32,0x37,0x5a, -0x30,0x21,0x02,0x10,0x47,0x42,0x6e,0xa2,0xab,0xc5,0x33,0x5d,0x50,0x44,0x0b, -0x88,0x97,0x84,0x59,0x4c,0x17,0x0d,0x30,0x32,0x30,0x33,0x30,0x35,0x31,0x34, -0x30,0x35,0x31,0x39,0x5a,0x30,0x21,0x02,0x10,0x49,0x20,0x3f,0xa8,0x6e,0x81, -0xc8,0x3b,0x26,0x05,0xf4,0xa7,0x9b,0x5a,0x81,0x60,0x17,0x0d,0x30,0x32,0x30, -0x37,0x31,0x31,0x31,0x37,0x35,0x30,0x34,0x38,0x5a,0x30,0x21,0x02,0x10,0x49, -0x8b,0x6f,0x05,0xfb,0xcb,0xf4,0x5a,0xaf,0x09,0x47,0xb1,0x04,0xc5,0xe3,0x51, -0x17,0x0d,0x30,0x32,0x30,0x34,0x31,0x32,0x31,0x37,0x34,0x38,0x30,0x38,0x5a, -0x30,0x21,0x02,0x10,0x49,0xb2,0xc3,0x7a,0xbf,0x75,0x2a,0xb3,0x13,0xae,0x53, -0xc6,0xcb,0x45,0x5a,0x3e,0x17,0x0d,0x30,0x32,0x31,0x31,0x31,0x35,0x32,0x31, -0x33,0x35,0x33,0x37,0x5a,0x30,0x21,0x02,0x10,0x4b,0xca,0xc3,0xab,0x0a,0xc5, -0xcd,0x90,0xa2,0xbe,0x43,0xfe,0xdd,0x06,0xe1,0x45,0x17,0x0d,0x30,0x32,0x30, -0x37,0x32,0x30,0x31,0x37,0x33,0x32,0x31,0x32,0x5a,0x30,0x21,0x02,0x10,0x4c, -0x00,0xcc,0x73,0xd5,0x74,0x61,0x62,0x92,0x52,0xff,0xde,0x5b,0xc1,0x55,0xbd, -0x17,0x0d,0x30,0x32,0x30,0x38,0x32,0x36,0x31,0x34,0x30,0x31,0x35,0x31,0x5a, -0x30,0x21,0x02,0x10,0x4c,0x59,0xc1,0xc3,0x56,0x40,0x27,0xd4,0x22,0x0e,0x37, -0xf6,0x5f,0x26,0x50,0xc5,0x17,0x0d,0x30,0x32,0x30,0x32,0x32,0x36,0x30,0x39, -0x35,0x37,0x34,0x34,0x5a,0x30,0x21,0x02,0x10,0x4c,0xca,0x12,0x59,0x46,0xf9, -0x2b,0xc6,0x7d,0x33,0x78,0x40,0x2c,0x3b,0x7a,0x0c,0x17,0x0d,0x30,0x32,0x30, -0x35,0x33,0x30,0x32,0x30,0x32,0x34,0x35,0x38,0x5a,0x30,0x21,0x02,0x10,0x4d, -0x57,0x51,0x35,0x9b,0xe5,0x41,0x2c,0x69,0x66,0xc7,0x21,0xec,0xc6,0x29,0x32, -0x17,0x0d,0x30,0x32,0x30,0x39,0x32,0x36,0x30,0x34,0x33,0x35,0x35,0x36,0x5a, -0x30,0x21,0x02,0x10,0x4e,0x85,0xab,0x9e,0x17,0x54,0xe7,0x42,0x0f,0x8c,0xa1, -0x65,0x96,0x88,0x53,0x54,0x17,0x0d,0x30,0x32,0x30,0x33,0x32,0x38,0x30,0x30, -0x31,0x38,0x35,0x33,0x5a,0x30,0x21,0x02,0x10,0x50,0x3d,0xed,0xac,0x21,0x86, -0x66,0x5d,0xa5,0x1a,0x13,0xee,0xfc,0xa7,0x0b,0xc6,0x17,0x0d,0x30,0x32,0x30, -0x32,0x31,0x38,0x31,0x33,0x35,0x35,0x34,0x39,0x5a,0x30,0x21,0x02,0x10,0x50, -0xa3,0x81,0x9c,0xcb,0x22,0xe4,0x0f,0x80,0xcb,0x7a,0xec,0x35,0xf8,0x73,0x82, -0x17,0x0d,0x30,0x32,0x31,0x30,0x30,0x35,0x31,0x36,0x35,0x39,0x35,0x39,0x5a, -0x30,0x21,0x02,0x10,0x51,0x28,0x73,0x26,0x17,0xcf,0x10,0x6e,0xeb,0x4a,0x03, -0x74,0xa3,0x35,0xe5,0x60,0x17,0x0d,0x30,0x33,0x30,0x36,0x31,0x33,0x31,0x30, -0x30,0x39,0x32,0x39,0x5a,0x30,0x21,0x02,0x10,0x51,0x52,0xff,0xdc,0x69,0x6b, -0x1f,0x1f,0xff,0x7c,0xb1,0x7f,0x03,0x90,0xa9,0x6b,0x17,0x0d,0x30,0x32,0x30, -0x36,0x31,0x34,0x31,0x36,0x30,0x34,0x30,0x32,0x5a,0x30,0x21,0x02,0x10,0x52, -0xd9,0x53,0x69,0x9f,0xec,0xab,0xdd,0x5d,0x2a,0x2f,0xaa,0x57,0x86,0xb9,0x1f, -0x17,0x0d,0x30,0x32,0x30,0x38,0x33,0x30,0x32,0x33,0x34,0x36,0x34,0x33,0x5a, -0x30,0x21,0x02,0x10,0x54,0x46,0xa8,0x8f,0x69,0x2e,0x02,0xf4,0xb4,0xb2,0x69, -0xda,0xbd,0x40,0x02,0xe0,0x17,0x0d,0x30,0x32,0x30,0x33,0x32,0x36,0x30,0x31, -0x35,0x36,0x35,0x38,0x5a,0x30,0x21,0x02,0x10,0x54,0xb5,0x81,0x73,0xb5,0x7c, -0x6d,0xba,0x5c,0x99,0x0d,0xff,0x0a,0x4d,0xee,0xef,0x17,0x0d,0x30,0x32,0x30, -0x37,0x32,0x34,0x31,0x36,0x33,0x39,0x35,0x31,0x5a,0x30,0x21,0x02,0x10,0x57, -0x91,0x41,0x20,0x9f,0x57,0x6f,0x42,0x53,0x4e,0x19,0xcc,0xe4,0xc8,0x52,0x4a, -0x17,0x0d,0x30,0x32,0x30,0x35,0x32,0x38,0x32,0x33,0x32,0x34,0x30,0x30,0x5a, -0x30,0x21,0x02,0x10,0x57,0xc6,0xdc,0xa0,0xed,0xbf,0x77,0xdd,0x7e,0x18,0x68, -0x83,0x57,0x0c,0x2a,0x4f,0x17,0x0d,0x30,0x32,0x30,0x35,0x32,0x31,0x31,0x34, -0x30,0x36,0x31,0x31,0x5a,0x30,0x21,0x02,0x10,0x57,0xed,0xe2,0x5b,0xe2,0x62, -0x3f,0x98,0xe1,0xf5,0x4d,0x30,0xa4,0x0e,0xdf,0xdf,0x17,0x0d,0x30,0x32,0x30, -0x36,0x30,0x39,0x30,0x31,0x34,0x37,0x31,0x38,0x5a,0x30,0x21,0x02,0x10,0x58, -0x47,0xd9,0xbd,0x83,0x1a,0x63,0x6f,0xb7,0x63,0x7f,0x4a,0x56,0x5e,0x8e,0x4d, -0x17,0x0d,0x30,0x32,0x30,0x34,0x31,0x35,0x31,0x37,0x32,0x33,0x30,0x33,0x5a, -0x30,0x21,0x02,0x10,0x58,0xc6,0x62,0x99,0x80,0xe6,0x0c,0x4f,0x00,0x8b,0x25, -0x38,0x93,0xe6,0x18,0x10,0x17,0x0d,0x30,0x32,0x30,0x36,0x30,0x36,0x30,0x37, -0x30,0x39,0x34,0x37,0x5a,0x30,0x21,0x02,0x10,0x59,0x52,0x09,0x0e,0x99,0xf3, -0xa9,0xe5,0x2f,0xed,0xa9,0xb2,0xd8,0x61,0xe7,0xea,0x17,0x0d,0x30,0x32,0x30, -0x36,0x32,0x36,0x31,0x34,0x31,0x38,0x33,0x36,0x5a,0x30,0x21,0x02,0x10,0x59, -0x5c,0xaa,0xfb,0xbe,0xfb,0x73,0xd1,0xf4,0xab,0xc8,0xe3,0x3d,0x01,0x04,0xdd, -0x17,0x0d,0x30,0x32,0x30,0x39,0x32,0x37,0x32,0x32,0x32,0x30,0x31,0x30,0x5a, -0x30,0x21,0x02,0x10,0x59,0x97,0x59,0xa7,0x3d,0xb0,0xd9,0x7e,0xff,0x2a,0xcb, -0x31,0xcc,0x66,0xf3,0x85,0x17,0x0d,0x30,0x32,0x30,0x38,0x32,0x32,0x30,0x30, -0x35,0x35,0x35,0x38,0x5a,0x30,0x21,0x02,0x10,0x59,0xdd,0x45,0x36,0x61,0xd9, -0x3e,0xe9,0xff,0xbd,0xad,0x2e,0xbf,0x9a,0x5d,0x98,0x17,0x0d,0x30,0x32,0x30, -0x37,0x30,0x32,0x32,0x30,0x34,0x30,0x30,0x33,0x5a,0x30,0x21,0x02,0x10,0x5a, -0x4b,0x48,0x18,0xa9,0x2a,0x9c,0xd5,0x91,0x2f,0x4f,0xa4,0xf8,0xb3,0x1b,0x4d, -0x17,0x0d,0x30,0x32,0x30,0x34,0x30,0x34,0x32,0x33,0x33,0x33,0x31,0x32,0x5a, -0x30,0x21,0x02,0x10,0x5a,0xdf,0x32,0x0d,0x64,0xeb,0x9b,0xd2,0x11,0xe2,0x58, -0x50,0xbe,0x93,0x0c,0x65,0x17,0x0d,0x30,0x32,0x30,0x34,0x30,0x35,0x31,0x37, -0x30,0x37,0x32,0x31,0x5a,0x30,0x21,0x02,0x10,0x5b,0x23,0xbf,0xbb,0xc4,0xb3, -0xf4,0x02,0xe9,0xcb,0x10,0x9e,0xee,0xa5,0x3f,0xcd,0x17,0x0d,0x30,0x32,0x30, -0x33,0x32,0x39,0x31,0x36,0x32,0x36,0x35,0x39,0x5a,0x30,0x21,0x02,0x10,0x5b, -0x51,0xbc,0x38,0xbf,0xaf,0x9f,0x27,0xa9,0xc7,0xed,0x25,0xd0,0x8d,0xec,0x2e, -0x17,0x0d,0x30,0x32,0x30,0x33,0x30,0x38,0x31,0x30,0x32,0x35,0x32,0x30,0x5a, -0x30,0x21,0x02,0x10,0x5c,0x29,0x7f,0x46,0x61,0xdd,0x47,0x90,0x82,0x91,0xbd, -0x79,0x22,0x6a,0x98,0x38,0x17,0x0d,0x30,0x32,0x31,0x31,0x30,0x38,0x31,0x35, -0x35,0x34,0x32,0x36,0x5a,0x30,0x21,0x02,0x10,0x5e,0x38,0xf7,0x5b,0x00,0xf1, -0xef,0x1c,0xb6,0xff,0xd5,0x5c,0x74,0xfb,0x95,0x5d,0x17,0x0d,0x30,0x32,0x31, -0x31,0x32,0x33,0x30,0x31,0x34,0x39,0x32,0x39,0x5a,0x30,0x21,0x02,0x10,0x5e, -0x88,0xbe,0xb6,0xb4,0xb2,0xaa,0xb0,0x92,0xf3,0xf6,0xc2,0xbc,0x72,0x21,0xca, -0x17,0x0d,0x30,0x32,0x30,0x32,0x31,0x34,0x30,0x37,0x31,0x32,0x31,0x30,0x5a, -0x30,0x21,0x02,0x10,0x5f,0x59,0xa0,0xbb,0xaf,0x26,0xc8,0xc1,0xb4,0x04,0x3a, -0xbb,0xfc,0x4c,0x75,0xa5,0x17,0x0d,0x30,0x32,0x30,0x34,0x31,0x36,0x31,0x35, -0x35,0x31,0x32,0x33,0x5a,0x30,0x21,0x02,0x10,0x5f,0x81,0x08,0x0f,0xa0,0xcd, -0x44,0x73,0x23,0x58,0x8e,0x49,0x9f,0xb5,0x08,0x35,0x17,0x0d,0x30,0x32,0x30, -0x36,0x31,0x39,0x31,0x34,0x31,0x37,0x34,0x33,0x5a,0x30,0x21,0x02,0x10,0x5f, -0xba,0x1f,0x8f,0xb2,0x23,0x56,0xdd,0xbc,0xa6,0x72,0xb0,0x99,0x13,0xb5,0xb2, -0x17,0x0d,0x30,0x32,0x30,0x35,0x30,0x36,0x30,0x38,0x34,0x37,0x31,0x30,0x5a, -0x30,0x21,0x02,0x10,0x60,0x09,0xd5,0xb7,0x6b,0xf1,0x16,0x4a,0xfa,0xd0,0xa5, -0x4c,0x8e,0xdd,0x02,0xcb,0x17,0x0d,0x30,0x32,0x30,0x36,0x31,0x37,0x31,0x36, -0x31,0x32,0x32,0x39,0x5a,0x30,0x21,0x02,0x10,0x60,0x1d,0x19,0xd8,0x55,0xd5, -0x14,0xd5,0xff,0x03,0x0d,0xad,0x5c,0x07,0x4c,0xe7,0x17,0x0d,0x30,0x32,0x30, -0x37,0x31,0x35,0x32,0x33,0x30,0x31,0x31,0x31,0x5a,0x30,0x21,0x02,0x10,0x60, -0x24,0x67,0xc3,0x0b,0xad,0x53,0x8f,0xce,0x89,0x05,0xb5,0x87,0xaf,0x7c,0xe4, -0x17,0x0d,0x30,0x32,0x31,0x30,0x30,0x38,0x32,0x30,0x33,0x38,0x35,0x32,0x5a, -0x30,0x21,0x02,0x10,0x60,0x5c,0xf3,0x3d,0x22,0x23,0x39,0x3f,0xe6,0x21,0x09, -0xfd,0xdd,0x77,0xc2,0x8f,0x17,0x0d,0x30,0x32,0x30,0x37,0x30,0x32,0x31,0x37, -0x32,0x37,0x35,0x38,0x5a,0x30,0x21,0x02,0x10,0x60,0xa2,0x5e,0xbf,0x07,0x83, -0xa3,0x18,0x56,0x18,0x48,0x63,0xa7,0xfd,0xc7,0x63,0x17,0x0d,0x30,0x32,0x30, -0x35,0x30,0x39,0x31,0x39,0x35,0x32,0x32,0x37,0x5a,0x30,0x21,0x02,0x10,0x60, -0xc2,0xad,0xa8,0x0e,0xf9,0x9a,0x66,0x5d,0xa2,0x75,0x04,0x5e,0x5c,0x71,0xc2, -0x17,0x0d,0x30,0x32,0x31,0x31,0x31,0x32,0x31,0x33,0x33,0x36,0x31,0x37,0x5a, -0x30,0x21,0x02,0x10,0x60,0xdb,0x1d,0x37,0x34,0xf6,0x02,0x9d,0x68,0x1b,0x70, -0xf1,0x13,0x00,0x2f,0x80,0x17,0x0d,0x30,0x32,0x30,0x32,0x32,0x38,0x30,0x39, -0x35,0x35,0x33,0x33,0x5a,0x30,0x21,0x02,0x10,0x61,0xf0,0x38,0xea,0xbc,0x17, -0x0d,0x11,0xd2,0x89,0xee,0x87,0x50,0x57,0xa0,0xed,0x17,0x0d,0x30,0x33,0x30, -0x31,0x32,0x39,0x31,0x37,0x34,0x31,0x34,0x34,0x5a,0x30,0x21,0x02,0x10,0x61, -0xfa,0x9b,0xeb,0x58,0xf9,0xe5,0xa5,0x9e,0x79,0xa8,0x3d,0x79,0xac,0x35,0x97, -0x17,0x0d,0x30,0x32,0x31,0x30,0x31,0x30,0x32,0x30,0x31,0x36,0x33,0x37,0x5a, -0x30,0x21,0x02,0x10,0x62,0x44,0x57,0x24,0x41,0xc0,0x89,0x3f,0x5b,0xd2,0xbd, -0xe7,0x2f,0x75,0x41,0xfa,0x17,0x0d,0x30,0x32,0x30,0x38,0x30,0x38,0x31,0x38, -0x33,0x30,0x31,0x35,0x5a,0x30,0x21,0x02,0x10,0x62,0x51,0x3a,0x2d,0x8d,0x82, -0x39,0x65,0xfe,0xf6,0x8a,0xc8,0x4e,0x29,0x91,0xfd,0x17,0x0d,0x30,0x32,0x30, -0x39,0x32,0x36,0x30,0x30,0x35,0x34,0x33,0x34,0x5a,0x30,0x21,0x02,0x10,0x62, -0x52,0x49,0x49,0xf2,0x51,0x67,0x7a,0xe2,0xee,0xc9,0x0c,0x23,0x11,0x3d,0xb2, -0x17,0x0d,0x30,0x32,0x30,0x34,0x31,0x37,0x31,0x38,0x30,0x36,0x35,0x35,0x5a, -0x30,0x21,0x02,0x10,0x63,0x52,0xbd,0xdc,0xb7,0xbf,0xbb,0x90,0x6c,0x82,0xee, -0xb5,0xa3,0x9f,0xd8,0xc9,0x17,0x0d,0x30,0x32,0x30,0x32,0x32,0x31,0x31,0x36, -0x33,0x30,0x35,0x38,0x5a,0x30,0x21,0x02,0x10,0x63,0x5e,0x6b,0xe9,0xea,0x3d, -0xd6,0x3b,0xc3,0x4d,0x09,0xc3,0x13,0xdb,0xdd,0xbc,0x17,0x0d,0x30,0x33,0x30, -0x36,0x30,0x32,0x31,0x34,0x34,0x37,0x33,0x36,0x5a,0x30,0x21,0x02,0x10,0x63, -0xda,0x0b,0xd5,0x13,0x1e,0x98,0x83,0x32,0xa2,0x3a,0x4b,0xdf,0x8c,0x89,0x86, -0x17,0x0d,0x30,0x32,0x30,0x39,0x32,0x35,0x30,0x38,0x30,0x38,0x31,0x33,0x5a, -0x30,0x21,0x02,0x10,0x64,0xfe,0xf0,0x1a,0x3a,0xed,0x89,0xf8,0xb5,0x34,0xd3, -0x1e,0x0f,0xce,0x0d,0xce,0x17,0x0d,0x30,0x32,0x30,0x34,0x30,0x38,0x32,0x31, -0x30,0x36,0x32,0x34,0x5a,0x30,0x21,0x02,0x10,0x65,0xa7,0x49,0xd8,0x37,0x22, -0x4b,0x4a,0xe5,0xcf,0xa3,0xfe,0xd6,0x3b,0xc0,0x67,0x17,0x0d,0x30,0x32,0x31, -0x32,0x30,0x34,0x31,0x37,0x31,0x34,0x31,0x36,0x5a,0x30,0x21,0x02,0x10,0x65, -0xc9,0x9e,0x47,0x76,0x98,0x0d,0x9e,0x57,0xe4,0xae,0xc5,0x1c,0x3e,0xf2,0xe7, -0x17,0x0d,0x30,0x32,0x30,0x39,0x32,0x33,0x31,0x34,0x30,0x38,0x31,0x38,0x5a, -0x30,0x21,0x02,0x10,0x65,0xe0,0x7b,0xc5,0x74,0xe4,0xab,0x01,0x4f,0xa3,0x5e, -0xd6,0xeb,0xcd,0xd5,0x69,0x17,0x0d,0x30,0x32,0x30,0x34,0x30,0x33,0x31,0x37, -0x32,0x34,0x30,0x36,0x5a,0x30,0x21,0x02,0x10,0x66,0x51,0xb7,0xe5,0x62,0xb7, -0xe3,0x31,0xc0,0xee,0xf2,0xe8,0xfe,0x84,0x6a,0x4e,0x17,0x0d,0x30,0x32,0x30, -0x39,0x30,0x36,0x31,0x33,0x32,0x33,0x33,0x33,0x5a,0x30,0x21,0x02,0x10,0x67, -0x7c,0x76,0xac,0x66,0x5a,0x6b,0x41,0x5c,0x07,0x83,0x02,0xd6,0xd9,0x63,0xc0, -0x17,0x0d,0x30,0x32,0x30,0x32,0x31,0x38,0x31,0x33,0x35,0x35,0x31,0x30,0x5a, -0x30,0x21,0x02,0x10,0x68,0x67,0xde,0xb3,0xaa,0x20,0xcf,0x4b,0x34,0xa5,0xe0, -0xc8,0xc0,0xc5,0xc9,0xa4,0x17,0x0d,0x30,0x32,0x30,0x33,0x31,0x32,0x30,0x31, -0x30,0x39,0x32,0x36,0x5a,0x30,0x21,0x02,0x10,0x69,0x23,0x34,0x5d,0x75,0x04, -0xdc,0x99,0xbd,0xce,0x8d,0x21,0xb4,0x6b,0x10,0xfc,0x17,0x0d,0x30,0x32,0x30, -0x39,0x30,0x33,0x31,0x33,0x31,0x39,0x32,0x30,0x5a,0x30,0x21,0x02,0x10,0x69, -0x9f,0x20,0x31,0xd1,0x3f,0xfa,0x1e,0x70,0x2e,0x37,0xd5,0x9a,0x8c,0x0a,0x16, -0x17,0x0d,0x30,0x32,0x30,0x32,0x32,0x30,0x30,0x39,0x30,0x31,0x33,0x35,0x5a, -0x30,0x21,0x02,0x10,0x6a,0x94,0xd6,0x25,0xd0,0x67,0xe4,0x4d,0x79,0x2b,0xc6, -0xd5,0xc9,0x4a,0x7f,0xc6,0x17,0x0d,0x30,0x32,0x30,0x32,0x31,0x31,0x31,0x39, -0x31,0x35,0x34,0x30,0x5a,0x30,0x21,0x02,0x10,0x6b,0x5c,0xa4,0x45,0x5b,0xe9, -0xcf,0xe7,0x3b,0x29,0xb1,0x32,0xd7,0xa1,0x04,0x3d,0x17,0x0d,0x30,0x32,0x31, -0x30,0x31,0x38,0x31,0x35,0x34,0x33,0x34,0x38,0x5a,0x30,0x21,0x02,0x10,0x6b, -0xc0,0x7d,0x4f,0x18,0xfe,0xb7,0x07,0xe8,0x56,0x9a,0x6c,0x40,0x0f,0x36,0x53, -0x17,0x0d,0x30,0x32,0x30,0x39,0x32,0x36,0x32,0x31,0x30,0x31,0x32,0x36,0x5a, -0x30,0x21,0x02,0x10,0x6b,0xe1,0xdd,0x36,0x3b,0xec,0xe0,0xa9,0xf5,0x92,0x7e, -0x33,0xbf,0xed,0x48,0x46,0x17,0x0d,0x30,0x32,0x30,0x34,0x31,0x37,0x31,0x34, -0x34,0x32,0x33,0x31,0x5a,0x30,0x21,0x02,0x10,0x6c,0xac,0xeb,0x37,0x2b,0x6a, -0x42,0xe2,0xca,0xc8,0xd2,0xda,0xb8,0xb9,0x82,0x6a,0x17,0x0d,0x30,0x32,0x30, -0x33,0x30,0x31,0x31,0x34,0x32,0x38,0x33,0x34,0x5a,0x30,0x21,0x02,0x10,0x6d, -0x98,0x1b,0xb4,0x76,0xd1,0x62,0x59,0xa1,0x3c,0xee,0xd2,0x21,0xd8,0xdf,0x4c, -0x17,0x0d,0x30,0x32,0x30,0x35,0x31,0x34,0x31,0x37,0x35,0x36,0x31,0x32,0x5a, -0x30,0x21,0x02,0x10,0x6d,0xdd,0x0b,0x5a,0x3c,0x9c,0xab,0xd3,0x3b,0xd9,0x16, -0xec,0x69,0x74,0xfb,0x9a,0x17,0x0d,0x30,0x32,0x30,0x32,0x32,0x32,0x31,0x32, -0x32,0x36,0x33,0x38,0x5a,0x30,0x21,0x02,0x10,0x6e,0xde,0xfd,0x89,0x36,0xae, -0xa0,0x41,0x8d,0x5c,0xec,0x2e,0x90,0x31,0xf8,0x9a,0x17,0x0d,0x30,0x32,0x30, -0x34,0x30,0x38,0x32,0x32,0x33,0x36,0x31,0x32,0x5a,0x30,0x21,0x02,0x10,0x6f, -0xb2,0x6b,0x4c,0x48,0xca,0xfe,0xe6,0x69,0x9a,0x06,0x63,0xc4,0x32,0x96,0xc1, -0x17,0x0d,0x30,0x33,0x30,0x31,0x31,0x37,0x31,0x37,0x32,0x37,0x32,0x35,0x5a, -0x30,0x21,0x02,0x10,0x70,0x0b,0xe1,0xee,0x44,0x89,0x51,0x52,0x65,0x27,0x2c, -0x2d,0x34,0x7c,0xe0,0x8d,0x17,0x0d,0x30,0x32,0x30,0x39,0x31,0x38,0x30,0x30, -0x33,0x36,0x30,0x30,0x5a,0x30,0x21,0x02,0x10,0x70,0x2d,0xc0,0xa6,0xb8,0xa5, -0xa0,0xda,0x48,0x59,0xb3,0x96,0x34,0x80,0xc8,0x25,0x17,0x0d,0x30,0x32,0x30, -0x38,0x33,0x30,0x31,0x34,0x30,0x31,0x30,0x31,0x5a,0x30,0x21,0x02,0x10,0x70, -0xe1,0xd9,0x92,0xcd,0x76,0x42,0x63,0x51,0x6e,0xcd,0x8c,0x09,0x29,0x17,0x48, -0x17,0x0d,0x30,0x32,0x30,0x35,0x31,0x37,0x31,0x31,0x31,0x30,0x34,0x31,0x5a, -0x30,0x21,0x02,0x10,0x72,0x38,0xe4,0x91,0x6a,0x7a,0x8a,0xf3,0xbf,0xf0,0xd8, -0xe0,0xa4,0x70,0x8d,0xa8,0x17,0x0d,0x30,0x32,0x30,0x33,0x30,0x34,0x31,0x39, -0x30,0x36,0x34,0x30,0x5a,0x30,0x21,0x02,0x10,0x72,0x97,0xa1,0xd8,0x9c,0x3b, -0x00,0xc2,0xc4,0x26,0x2d,0x06,0x2b,0x29,0x76,0x4e,0x17,0x0d,0x30,0x32,0x30, -0x36,0x31,0x38,0x31,0x35,0x30,0x39,0x34,0x37,0x5a,0x30,0x21,0x02,0x10,0x72, -0xd2,0x23,0x9b,0xf2,0x33,0xe9,0x7c,0xcf,0xb6,0xa9,0x41,0xd5,0x0e,0x5c,0x39, -0x17,0x0d,0x30,0x33,0x30,0x34,0x30,0x39,0x31,0x37,0x30,0x32,0x32,0x39,0x5a, -0x30,0x21,0x02,0x10,0x74,0x5c,0x9c,0xf9,0xaa,0xc3,0xfa,0x94,0x3c,0x25,0x39, -0x65,0x44,0x95,0x13,0xf1,0x17,0x0d,0x30,0x32,0x30,0x37,0x30,0x39,0x32,0x33, -0x35,0x33,0x32,0x30,0x5a,0x30,0x21,0x02,0x10,0x74,0x98,0x7f,0x68,0xad,0x17, -0x92,0x93,0xf2,0x65,0x94,0x0c,0x33,0xe6,0xbd,0x49,0x17,0x0d,0x30,0x32,0x30, -0x34,0x32,0x33,0x30,0x37,0x34,0x34,0x31,0x38,0x5a,0x30,0x21,0x02,0x10,0x75, -0x0e,0x40,0xff,0x97,0xf0,0x47,0xed,0xf5,0x56,0xc7,0x08,0x4e,0xb1,0xab,0xfd, -0x17,0x0d,0x30,0x31,0x30,0x31,0x33,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a, -0x30,0x21,0x02,0x10,0x75,0x26,0x51,0x59,0x65,0xb7,0x33,0x32,0x5f,0xe6,0xcd, -0xaa,0x30,0x65,0x78,0xe0,0x17,0x0d,0x30,0x32,0x30,0x35,0x31,0x36,0x31,0x38, -0x32,0x34,0x35,0x36,0x5a,0x30,0x21,0x02,0x10,0x76,0x13,0x6f,0xbf,0xc8,0xde, -0xd9,0x36,0x30,0x39,0xcc,0x85,0x8f,0x00,0x2f,0x19,0x17,0x0d,0x30,0x32,0x30, -0x33,0x31,0x34,0x30,0x39,0x34,0x38,0x32,0x34,0x5a,0x30,0x21,0x02,0x10,0x76, -0x52,0x78,0x89,0x44,0xfa,0xc1,0xb3,0xd7,0xc9,0x4c,0xb3,0x32,0x95,0xaf,0x03, -0x17,0x0d,0x30,0x32,0x31,0x31,0x31,0x34,0x31,0x39,0x31,0x35,0x34,0x33,0x5a, -0x30,0x21,0x02,0x10,0x77,0x5d,0x4c,0x40,0xd9,0x8d,0xfa,0xc8,0x9a,0x24,0x8d, -0x47,0x10,0x90,0x4a,0x0a,0x17,0x0d,0x30,0x32,0x30,0x35,0x30,0x39,0x30,0x31, -0x31,0x33,0x30,0x32,0x5a,0x30,0x21,0x02,0x10,0x77,0xe6,0x5a,0x43,0x59,0x93, -0x5d,0x5f,0x7a,0x75,0x80,0x1a,0xcd,0xad,0xc2,0x22,0x17,0x0d,0x30,0x30,0x30, -0x38,0x33,0x31,0x31,0x38,0x32,0x32,0x35,0x30,0x5a,0x30,0x21,0x02,0x10,0x78, -0x19,0xf1,0xb6,0x87,0x83,0xaf,0xdf,0x60,0x8d,0x9a,0x64,0x0d,0xec,0xe0,0x51, -0x17,0x0d,0x30,0x32,0x30,0x35,0x32,0x30,0x31,0x37,0x32,0x38,0x31,0x36,0x5a, -0x30,0x21,0x02,0x10,0x78,0x64,0x65,0x8f,0x82,0x79,0xdb,0xa5,0x1c,0x47,0x10, -0x1d,0x72,0x23,0x66,0x52,0x17,0x0d,0x30,0x33,0x30,0x31,0x32,0x34,0x31,0x38, -0x34,0x35,0x34,0x37,0x5a,0x30,0x21,0x02,0x10,0x78,0x64,0xe1,0xc0,0x69,0x8f, -0x3a,0xc7,0x8b,0x23,0xe3,0x29,0xb1,0xee,0xa9,0x41,0x17,0x0d,0x30,0x32,0x30, -0x35,0x30,0x38,0x31,0x37,0x34,0x36,0x32,0x36,0x5a,0x30,0x21,0x02,0x10,0x78, -0x79,0x89,0x61,0x12,0x67,0x64,0x14,0xfd,0x08,0xcc,0xb3,0x05,0x55,0xc0,0x67, -0x17,0x0d,0x30,0x32,0x30,0x34,0x30,0x32,0x31,0x33,0x31,0x38,0x35,0x33,0x5a, -0x30,0x21,0x02,0x10,0x78,0x8a,0x56,0x22,0x08,0xce,0x42,0xee,0xd1,0xa3,0x79, -0x10,0x14,0xfd,0x3a,0x36,0x17,0x0d,0x30,0x33,0x30,0x32,0x30,0x35,0x31,0x36, -0x35,0x33,0x32,0x39,0x5a,0x30,0x21,0x02,0x10,0x7a,0xa0,0x6c,0xba,0x33,0x02, -0xac,0x5f,0xf5,0x0b,0xb6,0x77,0x61,0xef,0x77,0x09,0x17,0x0d,0x30,0x32,0x30, -0x32,0x32,0x38,0x31,0x37,0x35,0x35,0x31,0x31,0x5a,0x30,0x21,0x02,0x10,0x7b, -0x91,0x33,0x66,0x6c,0xf0,0xd4,0xe3,0x9d,0xf6,0x88,0x29,0x9b,0xf7,0xd0,0xea, -0x17,0x0d,0x30,0x32,0x31,0x31,0x32,0x30,0x32,0x32,0x31,0x36,0x34,0x39,0x5a, -0x30,0x21,0x02,0x10,0x7c,0xef,0xf2,0x0a,0x08,0xae,0x10,0x57,0x1e,0xde,0xdc, -0xd6,0x63,0x76,0xb0,0x5d,0x17,0x0d,0x30,0x32,0x30,0x32,0x32,0x36,0x31,0x30, -0x32,0x32,0x33,0x30,0x5a,0x30,0x21,0x02,0x10,0x7f,0x76,0xef,0x69,0xeb,0xf5, -0x3f,0x53,0x2e,0xaa,0xa5,0xed,0xde,0xc0,0xb4,0x06,0x17,0x0d,0x30,0x32,0x30, -0x35,0x30,0x31,0x30,0x33,0x33,0x33,0x30,0x37,0x5a,0x30,0x21,0x02,0x10,0x7f, -0xcb,0x6b,0x99,0x91,0xd0,0x76,0xe1,0x3c,0x0e,0x67,0x15,0xc4,0xd4,0x4d,0x7b, -0x17,0x0d,0x30,0x32,0x30,0x34,0x31,0x30,0x32,0x31,0x31,0x38,0x34,0x30,0x5a, -0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x04,0x05,0x00, -0x03,0x81,0x81,0x00,0x5c,0xb9,0xb3,0xbe,0xd3,0xd6,0x73,0xa3,0xfe,0x4a,0xb2, -0x21,0x80,0xea,0xaa,0x05,0x61,0x14,0x1d,0x67,0xb1,0xdf,0xa6,0xf9,0x42,0x08, -0x0d,0x59,0x62,0x9c,0x11,0x5f,0x0e,0x92,0xc5,0xc6,0xae,0x74,0x64,0xc7,0x84, -0x3e,0x64,0x43,0xd2,0xec,0xbb,0xe1,0x9b,0x52,0x74,0x57,0xcf,0x96,0xef,0x68, -0x02,0x7a,0x7b,0x36,0xb7,0xc6,0x9a,0x5f,0xca,0x9c,0x37,0x47,0xc8,0x3a,0x5c, -0x34,0x35,0x3b,0x4b,0xca,0x20,0x77,0x44,0x68,0x07,0x02,0x34,0x46,0xaa,0x0f, -0xd0,0x4d,0xd9,0x47,0xf4,0xb3,0x2d,0xb1,0x44,0xa5,0x69,0xa9,0x85,0x13,0x43, -0xcd,0xcc,0x1d,0x9a,0xe6,0x2d,0xfd,0x9f,0xdc,0x2f,0x83,0xbb,0x8c,0xe2,0x8c, -0x61,0xc0,0x99,0x16,0x71,0x05,0xb6,0x25,0x14,0x64,0x4f,0x30 }; - -static void test_decodeCRLToBeSigned(DWORD dwEncoding) -{ - static const BYTE *corruptCRLs[] = { v1CRL, v2CRL }; - BOOL ret; - BYTE *buf = NULL; - DWORD size = 0, i; - - for (i = 0; i < sizeof(corruptCRLs) / sizeof(corruptCRLs[0]); i++) - { - ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, - corruptCRLs[i], corruptCRLs[i][1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, - &buf, &size); - ok(!ret && (GetLastError() == CRYPT_E_ASN1_CORRUPT || - GetLastError() == OSS_DATA_ERROR /* Win9x */), - "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n", - GetLastError()); - } - /* at a minimum, a CRL must contain an issuer: */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, - v1CRLWithIssuer, v1CRLWithIssuer[1] + 2, CRYPT_DECODE_ALLOC_FLAG, NULL, - &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CRL_INFO *info = (CRL_INFO *)buf; - - ok(size >= sizeof(CRL_INFO), "Wrong size %d\n", size); - ok(info->cCRLEntry == 0, "Expected 0 CRL entries, got %d\n", - info->cCRLEntry); - ok(info->Issuer.cbData == sizeof(encodedCommonName), - "Wrong issuer size %d\n", info->Issuer.cbData); - ok(!memcmp(info->Issuer.pbData, encodedCommonName, info->Issuer.cbData), - "Unexpected issuer\n"); - LocalFree(buf); - } - /* check decoding with an empty CRL entry */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, - v1CRLWithIssuerAndEmptyEntry, v1CRLWithIssuerAndEmptyEntry[1] + 2, - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && (GetLastError() == CRYPT_E_ASN1_CORRUPT || - GetLastError() == OSS_DATA_ERROR /* Win9x */), - "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n", - GetLastError()); - /* with a real CRL entry */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, - v1CRLWithIssuerAndEntry, v1CRLWithIssuerAndEntry[1] + 2, - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CRL_INFO *info = (CRL_INFO *)buf; - CRL_ENTRY *entry; - - ok(size >= sizeof(CRL_INFO), "Wrong size %d\n", size); - ok(info->cCRLEntry == 1, "Expected 1 CRL entries, got %d\n", - info->cCRLEntry); - ok(info->rgCRLEntry != NULL, "Expected a valid CRL entry array\n"); - entry = info->rgCRLEntry; - ok(entry->SerialNumber.cbData == 1, - "Expected serial number size 1, got %d\n", - entry->SerialNumber.cbData); - ok(*entry->SerialNumber.pbData == *serialNum, - "Expected serial number %d, got %d\n", *serialNum, - *entry->SerialNumber.pbData); - ok(info->Issuer.cbData == sizeof(encodedCommonName), - "Wrong issuer size %d\n", info->Issuer.cbData); - ok(!memcmp(info->Issuer.pbData, encodedCommonName, info->Issuer.cbData), - "Unexpected issuer\n"); - LocalFree(buf); - } - /* a real CRL from verisign that has extensions */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, - verisignCRL, sizeof(verisignCRL), CRYPT_DECODE_ALLOC_FLAG, - NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CRL_INFO *info = (CRL_INFO *)buf; - - ok(size >= sizeof(CRL_INFO), "Wrong size %d\n", size); - ok(info->cCRLEntry == 3, "Expected 3 CRL entries, got %d\n", - info->cCRLEntry); - ok(info->rgCRLEntry != NULL, "Expected a valid CRL entry array\n"); - ok(info->cExtension == 2, "Expected 2 extensions, got %d\n", - info->cExtension); - LocalFree(buf); - } - /* another real CRL from verisign that has lots of entries */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, - verisignCRLWithLotsOfEntries, sizeof(verisignCRLWithLotsOfEntries), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CRL_INFO *info = (CRL_INFO *)buf; - - ok(size >= sizeof(CRL_INFO), "Got size %d\n", size); - ok(info->cCRLEntry == 209, "Expected 209 CRL entries, got %d\n", - info->cCRLEntry); - ok(info->cExtension == 0, "Expected 0 extensions, got %d\n", - info->cExtension); - LocalFree(buf); - } - /* and finally, with an extension */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, - v1CRLWithExt, sizeof(v1CRLWithExt), CRYPT_DECODE_ALLOC_FLAG, - NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CRL_INFO *info = (CRL_INFO *)buf; - CRL_ENTRY *entry; - - ok(size >= sizeof(CRL_INFO), "Wrong size %d\n", size); - ok(info->cCRLEntry == 1, "Expected 1 CRL entries, got %d\n", - info->cCRLEntry); - ok(info->rgCRLEntry != NULL, "Expected a valid CRL entry array\n"); - entry = info->rgCRLEntry; - ok(entry->SerialNumber.cbData == 1, - "Expected serial number size 1, got %d\n", - entry->SerialNumber.cbData); - ok(*entry->SerialNumber.pbData == *serialNum, - "Expected serial number %d, got %d\n", *serialNum, - *entry->SerialNumber.pbData); - ok(info->Issuer.cbData == sizeof(encodedCommonName), - "Wrong issuer size %d\n", info->Issuer.cbData); - ok(!memcmp(info->Issuer.pbData, encodedCommonName, info->Issuer.cbData), - "Unexpected issuer\n"); - ok(info->cExtension == 1, "Expected 1 extensions, got %d\n", - info->cExtension); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_CRL_TO_BE_SIGNED, - v2CRLWithExt, sizeof(v2CRLWithExt), CRYPT_DECODE_ALLOC_FLAG, - NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CRL_INFO *info = (CRL_INFO *)buf; - - ok(info->cExtension == 1, "Expected 1 extensions, got %d\n", - info->cExtension); - LocalFree(buf); - } -} - -static const LPCSTR keyUsages[] = { szOID_PKIX_KP_CODE_SIGNING, - szOID_PKIX_KP_CLIENT_AUTH, szOID_RSA_RSA }; -static const BYTE encodedUsage[] = { - 0x30, 0x1f, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x03, - 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x02, 0x06, 0x09, - 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01 }; - -static void test_encodeEnhancedKeyUsage(DWORD dwEncoding) -{ - BOOL ret; - BYTE *buf = NULL; - DWORD size = 0; - CERT_ENHKEY_USAGE usage; - - /* Test with empty usage */ - usage.cUsageIdentifier = 0; - ret = pCryptEncodeObjectEx(dwEncoding, X509_ENHANCED_KEY_USAGE, &usage, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(emptySequence), "Wrong size %d\n", size); - ok(!memcmp(buf, emptySequence, size), "Got unexpected value\n"); - LocalFree(buf); - } - /* Test with a few usages */ - usage.cUsageIdentifier = sizeof(keyUsages) / sizeof(keyUsages[0]); - usage.rgpszUsageIdentifier = (LPSTR *)keyUsages; - ret = pCryptEncodeObjectEx(dwEncoding, X509_ENHANCED_KEY_USAGE, &usage, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(encodedUsage), "Wrong size %d\n", size); - ok(!memcmp(buf, encodedUsage, size), "Got unexpected value\n"); - LocalFree(buf); - } -} - -static void test_decodeEnhancedKeyUsage(DWORD dwEncoding) -{ - BOOL ret; - LPBYTE buf = NULL; - DWORD size = 0; - - ret = pCryptDecodeObjectEx(dwEncoding, X509_ENHANCED_KEY_USAGE, - emptySequence, sizeof(emptySequence), CRYPT_DECODE_ALLOC_FLAG, NULL, - &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CERT_ENHKEY_USAGE *usage = (CERT_ENHKEY_USAGE *)buf; - - ok(size >= sizeof(CERT_ENHKEY_USAGE), - "Wrong size %d\n", size); - ok(usage->cUsageIdentifier == 0, "Expected 0 CRL entries, got %d\n", - usage->cUsageIdentifier); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_ENHANCED_KEY_USAGE, - encodedUsage, sizeof(encodedUsage), CRYPT_DECODE_ALLOC_FLAG, NULL, - &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CERT_ENHKEY_USAGE *usage = (CERT_ENHKEY_USAGE *)buf; - DWORD i; - - ok(size >= sizeof(CERT_ENHKEY_USAGE), - "Wrong size %d\n", size); - ok(usage->cUsageIdentifier == sizeof(keyUsages) / sizeof(keyUsages[0]), - "Wrong CRL entries count %d\n", usage->cUsageIdentifier); - for (i = 0; i < usage->cUsageIdentifier; i++) - ok(!strcmp(usage->rgpszUsageIdentifier[i], keyUsages[i]), - "Expected OID %s, got %s\n", keyUsages[i], - usage->rgpszUsageIdentifier[i]); - LocalFree(buf); - } -} - -static BYTE keyId[] = { 1,2,3,4 }; -static const BYTE authorityKeyIdWithId[] = { - 0x30,0x06,0x80,0x04,0x01,0x02,0x03,0x04 }; -static const BYTE authorityKeyIdWithIssuer[] = { 0x30,0x19,0xa1,0x17,0x30,0x15, - 0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e, - 0x20,0x4c,0x61,0x6e,0x67,0x00 }; -static const BYTE authorityKeyIdWithSerial[] = { 0x30,0x03,0x82,0x01,0x01 }; - -static void test_encodeAuthorityKeyId(DWORD dwEncoding) -{ - CERT_AUTHORITY_KEY_ID_INFO info = { { 0 } }; - BOOL ret; - BYTE *buf = NULL; - DWORD size = 0; - - /* Test with empty id */ - ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(emptySequence), "Unexpected size %d\n", size); - ok(!memcmp(buf, emptySequence, size), "Unexpected value\n"); - LocalFree(buf); - } - /* With just a key id */ - info.KeyId.cbData = sizeof(keyId); - info.KeyId.pbData = keyId; - ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(authorityKeyIdWithId), "Unexpected size %d\n", size); - ok(!memcmp(buf, authorityKeyIdWithId, size), "Unexpected value\n"); - LocalFree(buf); - } - /* With just an issuer */ - info.KeyId.cbData = 0; - info.CertIssuer.cbData = sizeof(encodedCommonName); - info.CertIssuer.pbData = (BYTE *)encodedCommonName; - ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(authorityKeyIdWithIssuer), "Unexpected size %d\n", - size); - ok(!memcmp(buf, authorityKeyIdWithIssuer, size), "Unexpected value\n"); - LocalFree(buf); - } - /* With just a serial number */ - info.CertIssuer.cbData = 0; - info.CertSerialNumber.cbData = sizeof(serialNum); - info.CertSerialNumber.pbData = (BYTE *)serialNum; - ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(authorityKeyIdWithSerial), "Unexpected size %d\n", - size); - ok(!memcmp(buf, authorityKeyIdWithSerial, size), "Unexpected value\n"); - LocalFree(buf); - } -} - -static void test_decodeAuthorityKeyId(DWORD dwEncoding) -{ - BOOL ret; - LPBYTE buf = NULL; - DWORD size = 0; - - ret = pCryptDecodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID, - emptySequence, sizeof(emptySequence), CRYPT_DECODE_ALLOC_FLAG, NULL, - &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CERT_AUTHORITY_KEY_ID_INFO *info = (CERT_AUTHORITY_KEY_ID_INFO *)buf; - - ok(size >= sizeof(CERT_AUTHORITY_KEY_ID_INFO), "Unexpected size %d\n", - size); - ok(info->KeyId.cbData == 0, "Expected no key id\n"); - ok(info->CertIssuer.cbData == 0, "Expected no issuer name\n"); - ok(info->CertSerialNumber.cbData == 0, "Expected no serial number\n"); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID, - authorityKeyIdWithId, sizeof(authorityKeyIdWithId), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CERT_AUTHORITY_KEY_ID_INFO *info = (CERT_AUTHORITY_KEY_ID_INFO *)buf; - - ok(size >= sizeof(CERT_AUTHORITY_KEY_ID_INFO), "Unexpected size %d\n", - size); - ok(info->KeyId.cbData == sizeof(keyId), "Unexpected key id len\n"); - ok(!memcmp(info->KeyId.pbData, keyId, sizeof(keyId)), - "Unexpected key id\n"); - ok(info->CertIssuer.cbData == 0, "Expected no issuer name\n"); - ok(info->CertSerialNumber.cbData == 0, "Expected no serial number\n"); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID, - authorityKeyIdWithIssuer, sizeof(authorityKeyIdWithIssuer), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CERT_AUTHORITY_KEY_ID_INFO *info = (CERT_AUTHORITY_KEY_ID_INFO *)buf; - - ok(size >= sizeof(CERT_AUTHORITY_KEY_ID_INFO), "Unexpected size %d\n", - size); - ok(info->KeyId.cbData == 0, "Expected no key id\n"); - ok(info->CertIssuer.cbData == sizeof(encodedCommonName), - "Unexpected issuer len\n"); - ok(!memcmp(info->CertIssuer.pbData, encodedCommonName, - sizeof(encodedCommonName)), "Unexpected issuer\n"); - ok(info->CertSerialNumber.cbData == 0, "Expected no serial number\n"); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID, - authorityKeyIdWithSerial, sizeof(authorityKeyIdWithSerial), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CERT_AUTHORITY_KEY_ID_INFO *info = (CERT_AUTHORITY_KEY_ID_INFO *)buf; - - ok(size >= sizeof(CERT_AUTHORITY_KEY_ID_INFO), "Unexpected size %d\n", - size); - ok(info->KeyId.cbData == 0, "Expected no key id\n"); - ok(info->CertIssuer.cbData == 0, "Expected no issuer name\n"); - ok(info->CertSerialNumber.cbData == sizeof(serialNum), - "Unexpected serial number len\n"); - ok(!memcmp(info->CertSerialNumber.pbData, serialNum, sizeof(serialNum)), - "Unexpected serial number\n"); - LocalFree(buf); - } -} - -static const BYTE authorityKeyIdWithIssuerUrl[] = { 0x30,0x15,0xa1,0x13,0x86, - 0x11,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x69,0x6e,0x65,0x68,0x71,0x2e, - 0x6f,0x72,0x67 }; - -static void test_encodeAuthorityKeyId2(DWORD dwEncoding) -{ - CERT_AUTHORITY_KEY_ID2_INFO info = { { 0 } }; - CERT_ALT_NAME_ENTRY entry = { 0 }; - BOOL ret; - BYTE *buf = NULL; - DWORD size = 0; - - /* Test with empty id */ - ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID2, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(emptySequence), "Unexpected size %d\n", size); - ok(!memcmp(buf, emptySequence, size), "Unexpected value\n"); - LocalFree(buf); - } - /* With just a key id */ - info.KeyId.cbData = sizeof(keyId); - info.KeyId.pbData = keyId; - ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID2, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(authorityKeyIdWithId), "Unexpected size %d\n", - size); - ok(!memcmp(buf, authorityKeyIdWithId, size), "Unexpected value\n"); - LocalFree(buf); - } - /* With a bogus issuer name */ - info.KeyId.cbData = 0; - info.AuthorityCertIssuer.cAltEntry = 1; - info.AuthorityCertIssuer.rgAltEntry = &entry; - ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID2, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* With an issuer name */ - entry.dwAltNameChoice = CERT_ALT_NAME_URL; - U(entry).pwszURL = (LPWSTR)url; - ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID2, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(authorityKeyIdWithIssuerUrl), "Unexpected size %d\n", - size); - ok(!memcmp(buf, authorityKeyIdWithIssuerUrl, size), - "Unexpected value\n"); - LocalFree(buf); - } - /* With just a serial number */ - info.AuthorityCertIssuer.cAltEntry = 0; - info.AuthorityCertSerialNumber.cbData = sizeof(serialNum); - info.AuthorityCertSerialNumber.pbData = (BYTE *)serialNum; - ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID2, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(authorityKeyIdWithSerial), "Unexpected size %d\n", - size); - ok(!memcmp(buf, authorityKeyIdWithSerial, size), "Unexpected value\n"); - LocalFree(buf); - } -} - -static void test_decodeAuthorityKeyId2(DWORD dwEncoding) -{ - BOOL ret; - LPBYTE buf = NULL; - DWORD size = 0; - - ret = pCryptDecodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID2, - emptySequence, sizeof(emptySequence), CRYPT_DECODE_ALLOC_FLAG, NULL, - &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CERT_AUTHORITY_KEY_ID2_INFO *info = (CERT_AUTHORITY_KEY_ID2_INFO *)buf; - - ok(size >= sizeof(CERT_AUTHORITY_KEY_ID2_INFO), "Unexpected size %d\n", - size); - ok(info->KeyId.cbData == 0, "Expected no key id\n"); - ok(info->AuthorityCertIssuer.cAltEntry == 0, - "Expected no issuer name entries\n"); - ok(info->AuthorityCertSerialNumber.cbData == 0, - "Expected no serial number\n"); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID2, - authorityKeyIdWithId, sizeof(authorityKeyIdWithId), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CERT_AUTHORITY_KEY_ID2_INFO *info = (CERT_AUTHORITY_KEY_ID2_INFO *)buf; - - ok(size >= sizeof(CERT_AUTHORITY_KEY_ID2_INFO), "Unexpected size %d\n", - size); - ok(info->KeyId.cbData == sizeof(keyId), "Unexpected key id len\n"); - ok(!memcmp(info->KeyId.pbData, keyId, sizeof(keyId)), - "Unexpected key id\n"); - ok(info->AuthorityCertIssuer.cAltEntry == 0, - "Expected no issuer name entries\n"); - ok(info->AuthorityCertSerialNumber.cbData == 0, - "Expected no serial number\n"); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID2, - authorityKeyIdWithIssuerUrl, sizeof(authorityKeyIdWithIssuerUrl), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CERT_AUTHORITY_KEY_ID2_INFO *info = (CERT_AUTHORITY_KEY_ID2_INFO *)buf; - - ok(size >= sizeof(CERT_AUTHORITY_KEY_ID2_INFO), "Unexpected size %d\n", - size); - ok(info->KeyId.cbData == 0, "Expected no key id\n"); - ok(info->AuthorityCertIssuer.cAltEntry == 1, - "Expected 1 issuer entry, got %d\n", - info->AuthorityCertIssuer.cAltEntry); - ok(info->AuthorityCertIssuer.rgAltEntry[0].dwAltNameChoice == - CERT_ALT_NAME_URL, "Expected CERT_ALT_NAME_URL, got %d\n", - info->AuthorityCertIssuer.rgAltEntry[0].dwAltNameChoice); - ok(!lstrcmpW(U(info->AuthorityCertIssuer.rgAltEntry[0]).pwszURL, - url), "Unexpected URL\n"); - ok(info->AuthorityCertSerialNumber.cbData == 0, - "Expected no serial number\n"); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_AUTHORITY_KEY_ID2, - authorityKeyIdWithSerial, sizeof(authorityKeyIdWithSerial), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - CERT_AUTHORITY_KEY_ID2_INFO *info = (CERT_AUTHORITY_KEY_ID2_INFO *)buf; - - ok(size >= sizeof(CERT_AUTHORITY_KEY_ID2_INFO), "Unexpected size %d\n", - size); - ok(info->KeyId.cbData == 0, "Expected no key id\n"); - ok(info->AuthorityCertIssuer.cAltEntry == 0, - "Expected no issuer name entries\n"); - ok(info->AuthorityCertSerialNumber.cbData == sizeof(serialNum), - "Unexpected serial number len\n"); - ok(!memcmp(info->AuthorityCertSerialNumber.pbData, serialNum, - sizeof(serialNum)), "Unexpected serial number\n"); - LocalFree(buf); - } -} - -static const BYTE authorityInfoAccessWithUrl[] = { -0x30,0x19,0x30,0x17,0x06,0x02,0x2a,0x03,0x86,0x11,0x68,0x74,0x74,0x70,0x3a, -0x2f,0x2f,0x77,0x69,0x6e,0x65,0x68,0x71,0x2e,0x6f,0x72,0x67 }; -static const BYTE authorityInfoAccessWithUrlAndIPAddr[] = { -0x30,0x29,0x30,0x17,0x06,0x02,0x2a,0x03,0x86,0x11,0x68,0x74,0x74,0x70,0x3a, -0x2f,0x2f,0x77,0x69,0x6e,0x65,0x68,0x71,0x2e,0x6f,0x72,0x67,0x30,0x0e,0x06, -0x02,0x2d,0x06,0x87,0x08,0x30,0x06,0x87,0x04,0x7f,0x00,0x00,0x01 }; - -static void test_encodeAuthorityInfoAccess(DWORD dwEncoding) -{ - static char oid1[] = "1.2.3"; - static char oid2[] = "1.5.6"; - BOOL ret; - BYTE *buf = NULL; - DWORD size = 0; - CERT_ACCESS_DESCRIPTION accessDescription[2]; - CERT_AUTHORITY_INFO_ACCESS aia; - - memset(accessDescription, 0, sizeof(accessDescription)); - aia.cAccDescr = 0; - aia.rgAccDescr = NULL; - /* Having no access descriptions is allowed */ - ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_INFO_ACCESS, &aia, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(emptySequence), "unexpected size %d\n", size); - ok(!memcmp(buf, emptySequence, size), "unexpected value\n"); - LocalFree(buf); - buf = NULL; - } - /* It can't have an empty access method */ - aia.cAccDescr = 1; - aia.rgAccDescr = accessDescription; - ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_INFO_ACCESS, &aia, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && (GetLastError() == E_INVALIDARG || - GetLastError() == OSS_LIMITED /* Win9x */), - "expected E_INVALIDARG or OSS_LIMITED, got %08x\n", GetLastError()); - /* It can't have an empty location */ - accessDescription[0].pszAccessMethod = oid1; - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_INFO_ACCESS, &aia, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - accessDescription[0].AccessLocation.dwAltNameChoice = CERT_ALT_NAME_URL; - U(accessDescription[0].AccessLocation).pwszURL = (LPWSTR)url; - ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_INFO_ACCESS, &aia, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(authorityInfoAccessWithUrl), "unexpected size %d\n", - size); - ok(!memcmp(buf, authorityInfoAccessWithUrl, size), - "unexpected value\n"); - LocalFree(buf); - buf = NULL; - } - accessDescription[1].pszAccessMethod = oid2; - accessDescription[1].AccessLocation.dwAltNameChoice = - CERT_ALT_NAME_IP_ADDRESS; - U(accessDescription[1].AccessLocation).IPAddress.cbData = - sizeof(encodedIPAddr); - U(accessDescription[1].AccessLocation).IPAddress.pbData = - (LPBYTE)encodedIPAddr; - aia.cAccDescr = 2; - ret = pCryptEncodeObjectEx(dwEncoding, X509_AUTHORITY_INFO_ACCESS, &aia, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(authorityInfoAccessWithUrlAndIPAddr), - "unexpected size %d\n", size); - ok(!memcmp(buf, authorityInfoAccessWithUrlAndIPAddr, size), - "unexpected value\n"); - LocalFree(buf); - buf = NULL; - } -} - -static void compareAuthorityInfoAccess(LPCSTR header, - const CERT_AUTHORITY_INFO_ACCESS *expected, - const CERT_AUTHORITY_INFO_ACCESS *got) -{ - DWORD i; - - ok(expected->cAccDescr == got->cAccDescr, - "%s: expected %d access descriptions, got %d\n", header, - expected->cAccDescr, got->cAccDescr); - for (i = 0; i < expected->cAccDescr; i++) - { - ok(!strcmp(expected->rgAccDescr[i].pszAccessMethod, - got->rgAccDescr[i].pszAccessMethod), "%s[%d]: expected %s, got %s\n", - header, i, expected->rgAccDescr[i].pszAccessMethod, - got->rgAccDescr[i].pszAccessMethod); - compareAltNameEntry(&expected->rgAccDescr[i].AccessLocation, - &got->rgAccDescr[i].AccessLocation); - } -} - -static void test_decodeAuthorityInfoAccess(DWORD dwEncoding) -{ - static char oid1[] = "1.2.3"; - static char oid2[] = "1.5.6"; - BOOL ret; - LPBYTE buf = NULL; - DWORD size = 0; - - ret = pCryptDecodeObjectEx(dwEncoding, X509_AUTHORITY_INFO_ACCESS, - emptySequence, sizeof(emptySequence), CRYPT_DECODE_ALLOC_FLAG, NULL, - &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - CERT_AUTHORITY_INFO_ACCESS aia = { 0, NULL }; - - compareAuthorityInfoAccess("empty AIA", &aia, - (CERT_AUTHORITY_INFO_ACCESS *)buf); - LocalFree(buf); - buf = NULL; - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_AUTHORITY_INFO_ACCESS, - authorityInfoAccessWithUrl, sizeof(authorityInfoAccessWithUrl), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - CERT_ACCESS_DESCRIPTION accessDescription; - CERT_AUTHORITY_INFO_ACCESS aia; - - accessDescription.pszAccessMethod = oid1; - accessDescription.AccessLocation.dwAltNameChoice = CERT_ALT_NAME_URL; - U(accessDescription.AccessLocation).pwszURL = (LPWSTR)url; - aia.cAccDescr = 1; - aia.rgAccDescr = &accessDescription; - compareAuthorityInfoAccess("AIA with URL", &aia, - (CERT_AUTHORITY_INFO_ACCESS *)buf); - LocalFree(buf); - buf = NULL; - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_AUTHORITY_INFO_ACCESS, - authorityInfoAccessWithUrlAndIPAddr, - sizeof(authorityInfoAccessWithUrlAndIPAddr), CRYPT_DECODE_ALLOC_FLAG, - NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - CERT_ACCESS_DESCRIPTION accessDescription[2]; - CERT_AUTHORITY_INFO_ACCESS aia; - - accessDescription[0].pszAccessMethod = oid1; - accessDescription[0].AccessLocation.dwAltNameChoice = CERT_ALT_NAME_URL; - U(accessDescription[0].AccessLocation).pwszURL = (LPWSTR)url; - accessDescription[1].pszAccessMethod = oid2; - accessDescription[1].AccessLocation.dwAltNameChoice = - CERT_ALT_NAME_IP_ADDRESS; - U(accessDescription[1].AccessLocation).IPAddress.cbData = - sizeof(encodedIPAddr); - U(accessDescription[1].AccessLocation).IPAddress.pbData = - (LPBYTE)encodedIPAddr; - aia.cAccDescr = 2; - aia.rgAccDescr = accessDescription; - compareAuthorityInfoAccess("AIA with URL and IP addr", &aia, - (CERT_AUTHORITY_INFO_ACCESS *)buf); - LocalFree(buf); - buf = NULL; - } -} - -static const BYTE emptyCTL[] = { -0x30,0x17,0x30,0x00,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x02,0x06,0x00 }; -static const BYTE emptyCTLWithVersion1[] = { -0x30,0x1a,0x02,0x01,0x01,0x30,0x00,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31, -0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x02,0x06,0x00 }; -static const BYTE ctlWithUsageIdentifier[] = { -0x30,0x1b,0x30,0x04,0x06,0x02,0x2a,0x03,0x18,0x0f,0x31,0x36,0x30,0x31,0x30, -0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x02,0x06,0x00 }; -static const BYTE ctlWithListIdentifier[] = { -0x30,0x1a,0x30,0x00,0x04,0x01,0x01,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31, -0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x02,0x06,0x00 }; -static const BYTE ctlWithSequenceNumber[] = { -0x30,0x1a,0x30,0x00,0x02,0x01,0x01,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31, -0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x02,0x06,0x00 }; -static const BYTE ctlWithThisUpdate[] = { -0x30,0x15,0x30,0x00,0x17,0x0d,0x30,0x35,0x30,0x36,0x30,0x36,0x31,0x36,0x31, -0x30,0x30,0x30,0x5a,0x30,0x02,0x06,0x00 }; -static const BYTE ctlWithThisAndNextUpdate[] = { -0x30,0x24,0x30,0x00,0x17,0x0d,0x30,0x35,0x30,0x36,0x30,0x36,0x31,0x36,0x31, -0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x35,0x30,0x36,0x30,0x36,0x31,0x36,0x31, -0x30,0x30,0x30,0x5a,0x30,0x02,0x06,0x00 }; -static const BYTE ctlWithAlgId[] = { -0x30,0x1b,0x30,0x00,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x06,0x06,0x02,0x2d,0x06,0x05,0x00 }; -static const BYTE ctlWithBogusEntry[] = { -0x30,0x29,0x30,0x00,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x02,0x06,0x00,0x30,0x10,0x30,0x0e,0x04, -0x01,0x01,0x31,0x09,0x30,0x07,0x06,0x02,0x2a,0x03,0x31,0x01,0x01 }; -static const BYTE ctlWithOneEntry[] = { -0x30,0x2a,0x30,0x00,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x02,0x06,0x00,0x30,0x11,0x30,0x0f,0x04, -0x01,0x01,0x31,0x0a,0x30,0x08,0x06,0x02,0x2a,0x03,0x31,0x02,0x30,0x00 }; -static const BYTE ctlWithTwoEntries[] = { -0x30,0x41,0x30,0x00,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x02,0x06,0x00,0x30,0x28,0x30,0x0f,0x04, -0x01,0x01,0x31,0x0a,0x30,0x08,0x06,0x02,0x2a,0x03,0x31,0x02,0x30,0x00,0x30, -0x15,0x04,0x01,0x01,0x31,0x10,0x30,0x0e,0x06,0x02,0x2d,0x06,0x31,0x08,0x30, -0x06,0x87,0x04,0x7f,0x00,0x00,0x01 }; - -static void test_encodeCTL(DWORD dwEncoding) -{ - static char oid1[] = "1.2.3"; - static char oid2[] = "1.5.6"; - char *pOid1 = oid1; - BOOL ret; - BYTE *buf = NULL; - DWORD size = 0; - CTL_INFO info; - SYSTEMTIME thisUpdate = { 2005, 6, 1, 6, 16, 10, 0, 0 }; - CTL_ENTRY ctlEntry[2]; - CRYPT_ATTRIBUTE attr1, attr2; - CRYPT_ATTR_BLOB value1, value2; - - memset(&info, 0, sizeof(info)); - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CTL, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(emptyCTL), "unexpected size %d\n", size); - ok(!memcmp(buf, emptyCTL, size), "unexpected value\n"); - LocalFree(buf); - buf = NULL; - } - info.dwVersion = 1; - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CTL, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(emptyCTLWithVersion1), "unexpected size %d\n", size); - ok(!memcmp(buf, emptyCTLWithVersion1, size), "unexpected value\n"); - LocalFree(buf); - buf = NULL; - } - info.dwVersion = 0; - info.SubjectUsage.cUsageIdentifier = 1; - info.SubjectUsage.rgpszUsageIdentifier = &pOid1; - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CTL, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(ctlWithUsageIdentifier), "unexpected size %d\n", - size); - ok(!memcmp(buf, ctlWithUsageIdentifier, size), "unexpected value\n"); - LocalFree(buf); - buf = NULL; - } - info.SubjectUsage.cUsageIdentifier = 0; - info.ListIdentifier.cbData = sizeof(serialNum); - info.ListIdentifier.pbData = (LPBYTE)serialNum; - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CTL, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(ctlWithListIdentifier), "unexpected size %d\n", size); - ok(!memcmp(buf, ctlWithListIdentifier, size), "unexpected value\n"); - LocalFree(buf); - buf = NULL; - } - info.ListIdentifier.cbData = 0; - info.SequenceNumber.cbData = sizeof(serialNum); - info.SequenceNumber.pbData = (LPBYTE)serialNum; - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CTL, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(ctlWithSequenceNumber), "unexpected size %d\n", - size); - ok(!memcmp(buf, ctlWithSequenceNumber, size), "unexpected value\n"); - LocalFree(buf); - buf = NULL; - } - info.SequenceNumber.cbData = 0; - SystemTimeToFileTime(&thisUpdate, &info.ThisUpdate); - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CTL, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(ctlWithThisUpdate), "unexpected size %d\n", size); - ok(!memcmp(buf, ctlWithThisUpdate, size), "unexpected value\n"); - LocalFree(buf); - buf = NULL; - } - SystemTimeToFileTime(&thisUpdate, &info.NextUpdate); - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CTL, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(ctlWithThisAndNextUpdate), "unexpected size %d\n", - size); - ok(!memcmp(buf, ctlWithThisAndNextUpdate, size), "unexpected value\n"); - LocalFree(buf); - buf = NULL; - } - info.ThisUpdate.dwLowDateTime = info.ThisUpdate.dwHighDateTime = 0; - info.NextUpdate.dwLowDateTime = info.NextUpdate.dwHighDateTime = 0; - info.SubjectAlgorithm.pszObjId = oid2; - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CTL, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(ctlWithAlgId), "unexpected size %d\n", size); - ok(!memcmp(buf, ctlWithAlgId, size), "unexpected value\n"); - LocalFree(buf); - buf = NULL; - } - /* The value is supposed to be asn.1 encoded, so this'll fail to decode - * (see tests below) but it'll encode fine. - */ - info.SubjectAlgorithm.pszObjId = NULL; - value1.cbData = sizeof(serialNum); - value1.pbData = (LPBYTE)serialNum; - attr1.pszObjId = oid1; - attr1.cValue = 1; - attr1.rgValue = &value1; - ctlEntry[0].SubjectIdentifier.cbData = sizeof(serialNum); - ctlEntry[0].SubjectIdentifier.pbData = (LPBYTE)serialNum; - ctlEntry[0].cAttribute = 1; - ctlEntry[0].rgAttribute = &attr1; - info.cCTLEntry = 1; - info.rgCTLEntry = ctlEntry; - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CTL, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(ctlWithBogusEntry), "unexpected size %d\n", size); - ok(!memcmp(buf, ctlWithBogusEntry, size), "unexpected value\n"); - LocalFree(buf); - buf = NULL; - } - value1.cbData = sizeof(emptySequence); - value1.pbData = (LPBYTE)emptySequence; - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CTL, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(ctlWithOneEntry), "unexpected size %d\n", size); - ok(!memcmp(buf, ctlWithOneEntry, size), "unexpected value\n"); - LocalFree(buf); - buf = NULL; - } - value2.cbData = sizeof(encodedIPAddr); - value2.pbData = (LPBYTE)encodedIPAddr; - attr2.pszObjId = oid2; - attr2.cValue = 1; - attr2.rgValue = &value2; - ctlEntry[1].SubjectIdentifier.cbData = sizeof(serialNum); - ctlEntry[1].SubjectIdentifier.pbData = (LPBYTE)serialNum; - ctlEntry[1].cAttribute = 1; - ctlEntry[1].rgAttribute = &attr2; - info.cCTLEntry = 2; - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CTL, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(ctlWithTwoEntries), "unexpected size %d\n", size); - ok(!memcmp(buf, ctlWithTwoEntries, size), "unexpected value\n"); - LocalFree(buf); - buf = NULL; - } -} - -static void compareCTLInfo(LPCSTR header, const CTL_INFO *expected, - const CTL_INFO *got) -{ - DWORD i, j, k; - - ok(expected->dwVersion == got->dwVersion, - "%s: expected version %d, got %d\n", header, expected->dwVersion, - got->dwVersion); - ok(expected->SubjectUsage.cUsageIdentifier == - got->SubjectUsage.cUsageIdentifier, - "%s: expected %d usage identifiers, got %d\n", header, - expected->SubjectUsage.cUsageIdentifier, - got->SubjectUsage.cUsageIdentifier); - for (i = 0; i < expected->SubjectUsage.cUsageIdentifier; i++) - ok(!strcmp(expected->SubjectUsage.rgpszUsageIdentifier[i], - got->SubjectUsage.rgpszUsageIdentifier[i]), - "%s[%d]: expected %s, got %s\n", header, i, - expected->SubjectUsage.rgpszUsageIdentifier[i], - got->SubjectUsage.rgpszUsageIdentifier[i]); - ok(expected->ListIdentifier.cbData == got->ListIdentifier.cbData, - "%s: expected list identifier of %d bytes, got %d\n", header, - expected->ListIdentifier.cbData, got->ListIdentifier.cbData); - if (expected->ListIdentifier.cbData) - ok(!memcmp(expected->ListIdentifier.pbData, got->ListIdentifier.pbData, - expected->ListIdentifier.cbData), - "%s: unexpected list identifier value\n", header); - ok(expected->SequenceNumber.cbData == got->SequenceNumber.cbData, - "%s: expected sequence number of %d bytes, got %d\n", header, - expected->SequenceNumber.cbData, got->SequenceNumber.cbData); - if (expected->SequenceNumber.cbData) - ok(!memcmp(expected->SequenceNumber.pbData, got->SequenceNumber.pbData, - expected->SequenceNumber.cbData), - "%s: unexpected sequence number value\n", header); - ok(!memcmp(&expected->ThisUpdate, &got->ThisUpdate, sizeof(FILETIME)), - "%s: expected this update = (%d, %d), got (%d, %d)\n", header, - expected->ThisUpdate.dwLowDateTime, expected->ThisUpdate.dwHighDateTime, - got->ThisUpdate.dwLowDateTime, got->ThisUpdate.dwHighDateTime); - ok(!memcmp(&expected->NextUpdate, &got->NextUpdate, sizeof(FILETIME)), - "%s: expected next update = (%d, %d), got (%d, %d)\n", header, - expected->NextUpdate.dwLowDateTime, expected->NextUpdate.dwHighDateTime, - got->NextUpdate.dwLowDateTime, got->NextUpdate.dwHighDateTime); - if (expected->SubjectAlgorithm.pszObjId && - *expected->SubjectAlgorithm.pszObjId && !got->SubjectAlgorithm.pszObjId) - ok(0, "%s: expected subject algorithm %s, got NULL\n", header, - expected->SubjectAlgorithm.pszObjId); - if (expected->SubjectAlgorithm.pszObjId && got->SubjectAlgorithm.pszObjId) - ok(!strcmp(expected->SubjectAlgorithm.pszObjId, - got->SubjectAlgorithm.pszObjId), - "%s: expected subject algorithm %s, got %s\n", header, - expected->SubjectAlgorithm.pszObjId, got->SubjectAlgorithm.pszObjId); - ok(expected->SubjectAlgorithm.Parameters.cbData == - got->SubjectAlgorithm.Parameters.cbData, - "%s: expected subject algorithm parameters of %d bytes, got %d\n", header, - expected->SubjectAlgorithm.Parameters.cbData, - got->SubjectAlgorithm.Parameters.cbData); - if (expected->SubjectAlgorithm.Parameters.cbData) - ok(!memcmp(expected->SubjectAlgorithm.Parameters.pbData, - got->SubjectAlgorithm.Parameters.pbData, - expected->SubjectAlgorithm.Parameters.cbData), - "%s: unexpected subject algorithm parameter value\n", header); - ok(expected->cCTLEntry == got->cCTLEntry, - "%s: expected %d CTL entries, got %d\n", header, expected->cCTLEntry, - got->cCTLEntry); - for (i = 0; i < expected->cCTLEntry; i++) - { - ok(expected->rgCTLEntry[i].SubjectIdentifier.cbData == - got->rgCTLEntry[i].SubjectIdentifier.cbData, - "%s[%d]: expected subject identifier of %d bytes, got %d\n", - header, i, expected->rgCTLEntry[i].SubjectIdentifier.cbData, - got->rgCTLEntry[i].SubjectIdentifier.cbData); - if (expected->rgCTLEntry[i].SubjectIdentifier.cbData) - ok(!memcmp(expected->rgCTLEntry[i].SubjectIdentifier.pbData, - got->rgCTLEntry[i].SubjectIdentifier.pbData, - expected->rgCTLEntry[i].SubjectIdentifier.cbData), - "%s[%d]: unexpected subject identifier value\n", - header, i); - for (j = 0; j < expected->rgCTLEntry[i].cAttribute; j++) - { - ok(!strcmp(expected->rgCTLEntry[i].rgAttribute[j].pszObjId, - got->rgCTLEntry[i].rgAttribute[j].pszObjId), - "%s[%d][%d]: expected attribute OID %s, got %s\n", header, i, j, - expected->rgCTLEntry[i].rgAttribute[j].pszObjId, - got->rgCTLEntry[i].rgAttribute[j].pszObjId); - for (k = 0; k < expected->rgCTLEntry[i].rgAttribute[j].cValue; k++) - { - ok(expected->rgCTLEntry[i].rgAttribute[j].rgValue[k].cbData == - got->rgCTLEntry[i].rgAttribute[j].rgValue[k].cbData, - "%s[%d][%d][%d]: expected value of %d bytes, got %d\n", - header, i, j, k, - expected->rgCTLEntry[i].rgAttribute[j].rgValue[k].cbData, - got->rgCTLEntry[i].rgAttribute[j].rgValue[k].cbData); - if (expected->rgCTLEntry[i].rgAttribute[j].rgValue[k].cbData) - ok(!memcmp( - expected->rgCTLEntry[i].rgAttribute[j].rgValue[k].pbData, - got->rgCTLEntry[i].rgAttribute[j].rgValue[k].pbData, - expected->rgCTLEntry[i].rgAttribute[j].rgValue[k].cbData), - "%s[%d][%d][%d]: unexpected value\n", - header, i, j, k); - } - } - } - ok(expected->cExtension == got->cExtension, - "%s: expected %d extensions, got %d\n", header, expected->cExtension, - got->cExtension); - for (i = 0; i < expected->cExtension; i++) - { - ok(!strcmp(expected->rgExtension[i].pszObjId, - got->rgExtension[i].pszObjId), "%s[%d]: expected %s, got %s\n", - header, i, expected->rgExtension[i].pszObjId, - got->rgExtension[i].pszObjId); - ok(expected->rgExtension[i].fCritical == got->rgExtension[i].fCritical, - "%s[%d]: expected fCritical = %d, got %d\n", header, i, - expected->rgExtension[i].fCritical, got->rgExtension[i].fCritical); - ok(expected->rgExtension[i].Value.cbData == - got->rgExtension[i].Value.cbData, - "%s[%d]: expected extension value to have %d bytes, got %d\n", - header, i, expected->rgExtension[i].Value.cbData, - got->rgExtension[i].Value.cbData); - if (expected->rgExtension[i].Value.cbData) - ok(!memcmp(expected->rgExtension[i].Value.pbData, - got->rgExtension[i].Value.pbData, - expected->rgExtension[i].Value.cbData), - "%s[%d]: unexpected extension value\n", header, i); - } -} - -static const BYTE signedCTL[] = { -0x30,0x81,0xc7,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0, -0x81,0xb9,0x30,0x81,0xb6,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x28,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x1b,0x04,0x19,0x30,0x17,0x30,0x00, -0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x30,0x02,0x06,0x00,0x31,0x77,0x30,0x75,0x02,0x01,0x01,0x30,0x1a, -0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75, -0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08, -0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x04,0x06,0x00,0x05, -0x00,0x04,0x40,0xca,0xd8,0x32,0xd1,0xbd,0x97,0x61,0x54,0xd6,0x80,0xcf,0x0d, -0xbd,0xa2,0x42,0xc7,0xca,0x37,0x91,0x7d,0x9d,0xac,0x8c,0xdf,0x05,0x8a,0x39, -0xc6,0x07,0xc1,0x37,0xe6,0xb9,0xd1,0x0d,0x26,0xec,0xa5,0xb0,0x8a,0x51,0x26, -0x2b,0x4f,0x73,0x44,0x86,0x83,0x5e,0x2b,0x6e,0xcc,0xf8,0x1b,0x85,0x53,0xe9, -0x7a,0x80,0x8f,0x6b,0x42,0x19,0x93 }; -static const BYTE signedCTLWithCTLInnerContent[] = { -0x30,0x82,0x01,0x0f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02, -0xa0,0x82,0x01,0x00,0x30,0x81,0xfd,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06, -0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x30,0x06,0x09, -0x2b,0x06,0x01,0x04,0x01,0x82,0x37,0x0a,0x01,0xa0,0x23,0x30,0x21,0x30,0x00, -0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05, -0x00,0x31,0x81,0xb5,0x30,0x81,0xb2,0x02,0x01,0x01,0x30,0x1a,0x30,0x15,0x31, -0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20, -0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0xa0,0x3b,0x30,0x18,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x09,0x03,0x31,0x0b,0x06,0x09,0x2b,0x06,0x01,0x04, -0x01,0x82,0x37,0x0a,0x01,0x30,0x1f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x01,0x09,0x04,0x31,0x12,0x04,0x10,0x54,0x71,0xbc,0xe1,0x56,0x31,0xa2,0xf9, -0x65,0x70,0x34,0xf8,0xe2,0xe9,0xb4,0xf4,0x30,0x04,0x06,0x00,0x05,0x00,0x04, -0x40,0x2f,0x1b,0x9f,0x5a,0x4a,0x15,0x73,0xfa,0xb1,0x93,0x3d,0x09,0x52,0xdf, -0x6b,0x98,0x4b,0x13,0x5e,0xe7,0xbf,0x65,0xf4,0x9c,0xc2,0xb1,0x77,0x09,0xb1, -0x66,0x4d,0x72,0x0d,0xb1,0x1a,0x50,0x20,0xe0,0x57,0xa2,0x39,0xc7,0xcd,0x7f, -0x8e,0xe7,0x5f,0x76,0x2b,0xd1,0x6a,0x82,0xb3,0x30,0x25,0x61,0xf6,0x25,0x23, -0x57,0x6c,0x0b,0x47,0xb8 }; - -static void test_decodeCTL(DWORD dwEncoding) -{ - static char oid1[] = "1.2.3"; - static char oid2[] = "1.5.6"; - static BYTE nullData[] = { 5,0 }; - char *pOid1 = oid1; - BOOL ret; - BYTE *buf = NULL; - DWORD size = 0; - CTL_INFO info; - SYSTEMTIME thisUpdate = { 2005, 6, 1, 6, 16, 10, 0, 0 }; - CTL_ENTRY ctlEntry[2]; - CRYPT_ATTRIBUTE attr1, attr2; - CRYPT_ATTR_BLOB value1, value2; - - memset(&info, 0, sizeof(info)); - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, emptyCTL, sizeof(emptyCTL), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - compareCTLInfo("empty CTL", &info, (CTL_INFO *)buf); - LocalFree(buf); - buf = NULL; - } - info.dwVersion = 1; - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, emptyCTLWithVersion1, - sizeof(emptyCTLWithVersion1), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, - &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - compareCTLInfo("v1 CTL", &info, (CTL_INFO *)buf); - LocalFree(buf); - buf = NULL; - } - info.dwVersion = 0; - info.SubjectUsage.cUsageIdentifier = 1; - info.SubjectUsage.rgpszUsageIdentifier = &pOid1; - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, ctlWithUsageIdentifier, - sizeof(ctlWithUsageIdentifier), CRYPT_DECODE_ALLOC_FLAG, NULL, - &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - compareCTLInfo("CTL with usage identifier", &info, (CTL_INFO *)buf); - LocalFree(buf); - buf = NULL; - } - info.SubjectUsage.cUsageIdentifier = 0; - info.ListIdentifier.cbData = sizeof(serialNum); - info.ListIdentifier.pbData = (LPBYTE)serialNum; - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, ctlWithListIdentifier, - sizeof(ctlWithListIdentifier), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - compareCTLInfo("CTL with list identifier", &info, (CTL_INFO *)buf); - LocalFree(buf); - buf = NULL; - } - info.ListIdentifier.cbData = 0; - info.SequenceNumber.cbData = sizeof(serialNum); - info.SequenceNumber.pbData = (LPBYTE)serialNum; - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, ctlWithSequenceNumber, - sizeof(ctlWithSequenceNumber), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - compareCTLInfo("CTL with sequence number", &info, (CTL_INFO *)buf); - LocalFree(buf); - buf = NULL; - } - info.SequenceNumber.cbData = 0; - SystemTimeToFileTime(&thisUpdate, &info.ThisUpdate); - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, ctlWithThisUpdate, - sizeof(ctlWithThisUpdate), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - compareCTLInfo("CTL with this update", &info, (CTL_INFO *)buf); - LocalFree(buf); - buf = NULL; - } - SystemTimeToFileTime(&thisUpdate, &info.NextUpdate); - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, ctlWithThisAndNextUpdate, - sizeof(ctlWithThisAndNextUpdate), CRYPT_DECODE_ALLOC_FLAG, NULL, - &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - compareCTLInfo("CTL with this and next update", &info, (CTL_INFO *)buf); - LocalFree(buf); - buf = NULL; - } - info.ThisUpdate.dwLowDateTime = info.ThisUpdate.dwHighDateTime = 0; - info.NextUpdate.dwLowDateTime = info.NextUpdate.dwHighDateTime = 0; - info.SubjectAlgorithm.pszObjId = oid2; - info.SubjectAlgorithm.Parameters.cbData = sizeof(nullData); - info.SubjectAlgorithm.Parameters.pbData = nullData; - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, ctlWithAlgId, - sizeof(ctlWithAlgId), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - compareCTLInfo("CTL with algorithm identifier", &info, (CTL_INFO *)buf); - LocalFree(buf); - buf = NULL; - } - SetLastError(0xdeadbeef); - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, ctlWithBogusEntry, - sizeof(ctlWithBogusEntry), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && - (GetLastError() == CRYPT_E_ASN1_EOD || - GetLastError() == CRYPT_E_ASN1_CORRUPT || - GetLastError() == OSS_MORE_INPUT), /* Win9x */ - "expected CRYPT_E_ASN1_EOD or CRYPT_E_ASN1_CORRUPT, got %08x\n", - GetLastError()); - info.SubjectAlgorithm.Parameters.cbData = 0; - info.ThisUpdate.dwLowDateTime = info.ThisUpdate.dwHighDateTime = 0; - info.NextUpdate.dwLowDateTime = info.NextUpdate.dwHighDateTime = 0; - info.SubjectAlgorithm.pszObjId = oid2; - info.SubjectAlgorithm.pszObjId = NULL; - value1.cbData = sizeof(emptySequence); - value1.pbData = (LPBYTE)emptySequence; - attr1.pszObjId = oid1; - attr1.cValue = 1; - attr1.rgValue = &value1; - ctlEntry[0].SubjectIdentifier.cbData = sizeof(serialNum); - ctlEntry[0].SubjectIdentifier.pbData = (LPBYTE)serialNum; - ctlEntry[0].cAttribute = 1; - ctlEntry[0].rgAttribute = &attr1; - info.cCTLEntry = 1; - info.rgCTLEntry = ctlEntry; - SetLastError(0xdeadbeef); - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, ctlWithOneEntry, - sizeof(ctlWithOneEntry), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - compareCTLInfo("CTL with one entry", &info, (CTL_INFO *)buf); - LocalFree(buf); - buf = NULL; - } - value2.cbData = sizeof(encodedIPAddr); - value2.pbData = (LPBYTE)encodedIPAddr; - attr2.pszObjId = oid2; - attr2.cValue = 1; - attr2.rgValue = &value2; - ctlEntry[1].SubjectIdentifier.cbData = sizeof(serialNum); - ctlEntry[1].SubjectIdentifier.pbData = (LPBYTE)serialNum; - ctlEntry[1].cAttribute = 1; - ctlEntry[1].rgAttribute = &attr2; - info.cCTLEntry = 2; - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, ctlWithTwoEntries, - sizeof(ctlWithTwoEntries), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - compareCTLInfo("CTL with two entries", &info, (CTL_INFO *)buf); - LocalFree(buf); - buf = NULL; - } - /* A signed CTL isn't decodable, even if the inner content is a CTL */ - SetLastError(0xdeadbeef); - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, signedCTL, - sizeof(signedCTL), CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == OSS_DATA_ERROR /* Win9x */), - "expected CRYPT_E_ASN1_BADTAG or OSS_DATA_ERROR, got %08x\n", - GetLastError()); - SetLastError(0xdeadbeef); - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CTL, - signedCTLWithCTLInnerContent, sizeof(signedCTLWithCTLInnerContent), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == OSS_DATA_ERROR /* Win9x */), - "expected CRYPT_E_ASN1_BADTAG or OSS_DATA_ERROR, got %08x\n", - GetLastError()); -} - -static const BYTE emptyPKCSContentInfo[] = { 0x30,0x04,0x06,0x02,0x2a,0x03 }; -static const BYTE emptyPKCSContentInfoExtraBytes[] = { 0x30,0x04,0x06,0x02,0x2a, - 0x03,0,0,0,0,0,0 }; -static const BYTE bogusPKCSContentInfo[] = { 0x30,0x07,0x06,0x02,0x2a,0x03, - 0xa0,0x01,0x01 }; -static const BYTE intPKCSContentInfo[] = { 0x30,0x09,0x06,0x02,0x2a,0x03,0xa0, - 0x03,0x02,0x01,0x01 }; -static BYTE bogusDER[] = { 1 }; - -static void test_encodePKCSContentInfo(DWORD dwEncoding) -{ - BOOL ret; - BYTE *buf = NULL; - DWORD size = 0; - CRYPT_CONTENT_INFO info = { 0 }; - char oid1[] = "1.2.3"; - - if (0) - { - /* Crashes on win9x */ - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CONTENT_INFO, NULL, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %x\n", GetLastError()); - } - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CONTENT_INFO, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && (GetLastError() == E_INVALIDARG || - GetLastError() == OSS_LIMITED /* Win9x */), - "Expected E_INVALIDARG or OSS_LIMITED, got %x\n", GetLastError()); - info.pszObjId = oid1; - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CONTENT_INFO, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(emptyPKCSContentInfo), "Unexpected size %d\n", size); - ok(!memcmp(buf, emptyPKCSContentInfo, size), "Unexpected value\n"); - LocalFree(buf); - } - info.Content.pbData = bogusDER; - info.Content.cbData = sizeof(bogusDER); - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CONTENT_INFO, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed; %x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(bogusPKCSContentInfo), "Unexpected size %d\n", size); - ok(!memcmp(buf, bogusPKCSContentInfo, size), "Unexpected value\n"); - LocalFree(buf); - } - info.Content.pbData = (BYTE *)ints[0].encoded; - info.Content.cbData = ints[0].encoded[1] + 2; - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_CONTENT_INFO, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (buf) - { - ok(size == sizeof(intPKCSContentInfo), "Unexpected size %d\n", size); - ok(!memcmp(buf, intPKCSContentInfo, size), "Unexpected value\n"); - LocalFree(buf); - } -} - -static const BYTE indefiniteSignedPKCSContent[] = { -0x30,0x80,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0,0x80, -0x30,0x80,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86, -0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x80,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7, -0x0d,0x01,0x07,0x01,0xa0,0x80,0x24,0x80,0x04,0x04,0x01,0x02,0x03,0x04,0x04, -0x04,0x01,0x02,0x03,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x81,0xd2,0x30, -0x81,0xcf,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30,0x11, -0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30, -0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11,0x06, -0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67, -0x00,0x30,0x5c,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01, -0x01,0x05,0x00,0x03,0x4b,0x00,0x30,0x48,0x02,0x41,0x00,0xe2,0x54,0x3a,0xa7, -0x83,0xb1,0x27,0x14,0x3e,0x59,0xbb,0xb4,0x53,0xe6,0x1f,0xe7,0x5d,0xf1,0x21, -0x68,0xad,0x85,0x53,0xdb,0x6b,0x1e,0xeb,0x65,0x97,0x03,0x86,0x60,0xde,0xf3, -0x6c,0x38,0x75,0xe0,0x4c,0x61,0xbb,0xbc,0x62,0x17,0xa9,0xcd,0x79,0x3f,0x21, -0x4e,0x96,0xcb,0x0e,0xdc,0x61,0x94,0x30,0x18,0x10,0x6b,0xd0,0x1c,0x10,0x79, -0x02,0x03,0x01,0x00,0x01,0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03,0x55,0x1d, -0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01,0x31, -0x77,0x30,0x75,0x02,0x01,0x01,0x30,0x1a,0x30,0x15,0x31,0x13,0x30,0x11,0x06, -0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67, -0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02, -0x05,0x05,0x00,0x30,0x04,0x06,0x00,0x05,0x00,0x04,0x40,0x57,0xba,0xe0,0xad, -0xfe,0x36,0x8d,0xb3,0x88,0xa2,0x8d,0x84,0x82,0x52,0x09,0x09,0xd9,0xf0,0xb8, -0x04,0xfa,0xb5,0x51,0x0b,0x2b,0x2e,0xd5,0x72,0x3e,0x3d,0x13,0x8a,0x51,0xc3, -0x71,0x65,0x9a,0x52,0xf2,0x8f,0xb2,0x5b,0x39,0x28,0xb3,0x29,0x36,0xa5,0x8d, -0xe3,0x55,0x71,0x91,0xf9,0x2a,0xd1,0xb8,0xaa,0x52,0xb8,0x22,0x3a,0xeb,0x61, -0x00,0x00,0x00,0x00,0x00,0x00 }; - -static void test_decodePKCSContentInfo(DWORD dwEncoding) -{ - BOOL ret; - LPBYTE buf = NULL; - DWORD size = 0; - CRYPT_CONTENT_INFO *info; - - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CONTENT_INFO, - emptyPKCSContentInfo, sizeof(emptyPKCSContentInfo), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - info = (CRYPT_CONTENT_INFO *)buf; - - ok(!strcmp(info->pszObjId, "1.2.3"), "Expected 1.2.3, got %s\n", - info->pszObjId); - ok(info->Content.cbData == 0, "Expected no data, got %d\n", - info->Content.cbData); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CONTENT_INFO, - emptyPKCSContentInfoExtraBytes, sizeof(emptyPKCSContentInfoExtraBytes), - 0, NULL, NULL, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CONTENT_INFO, - bogusPKCSContentInfo, sizeof(bogusPKCSContentInfo), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - /* Native fails with CRYPT_E_ASN1_EOD, accept also CRYPT_E_ASN1_CORRUPT as - * I doubt an app depends on that. - */ - ok((!ret && (GetLastError() == CRYPT_E_ASN1_EOD || - GetLastError() == CRYPT_E_ASN1_CORRUPT)) || broken(ret), - "Expected CRYPT_E_ASN1_EOD or CRYPT_E_ASN1_CORRUPT, got %x\n", - GetLastError()); - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CONTENT_INFO, - intPKCSContentInfo, sizeof(intPKCSContentInfo), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - info = (CRYPT_CONTENT_INFO *)buf; - - ok(!strcmp(info->pszObjId, "1.2.3"), "Expected 1.2.3, got %s\n", - info->pszObjId); - ok(info->Content.cbData == ints[0].encoded[1] + 2, - "Unexpected size %d\n", info->Content.cbData); - ok(!memcmp(info->Content.pbData, ints[0].encoded, - info->Content.cbData), "Unexpected value\n"); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_CONTENT_INFO, - indefiniteSignedPKCSContent, sizeof(indefiniteSignedPKCSContent), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - info = (CRYPT_CONTENT_INFO *)buf; - - ok(!strcmp(info->pszObjId, szOID_RSA_signedData), - "Expected %s, got %s\n", szOID_RSA_signedData, info->pszObjId); - ok(info->Content.cbData == 392, "Expected 392, got %d\n", - info->Content.cbData); - LocalFree(buf); - } -} - -static const BYTE emptyPKCSAttr[] = { 0x30,0x06,0x06,0x02,0x2a,0x03,0x31, - 0x00 }; -static const BYTE bogusPKCSAttr[] = { 0x30,0x07,0x06,0x02,0x2a,0x03,0x31,0x01, - 0x01 }; -static const BYTE intPKCSAttr[] = { 0x30,0x09,0x06,0x02,0x2a,0x03,0x31,0x03, - 0x02,0x01,0x01 }; - -static void test_encodePKCSAttribute(DWORD dwEncoding) -{ - CRYPT_ATTRIBUTE attr = { 0 }; - BOOL ret; - LPBYTE buf = NULL; - DWORD size = 0; - CRYPT_ATTR_BLOB blob; - char oid[] = "1.2.3"; - - if (0) - { - /* Crashes on win9x */ - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_ATTRIBUTE, NULL, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %x\n", GetLastError()); - } - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_ATTRIBUTE, &attr, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && (GetLastError() == E_INVALIDARG || - GetLastError() == OSS_LIMITED /* Win9x */), - "Expected E_INVALIDARG or OSS_LIMITED, got %x\n", GetLastError()); - attr.pszObjId = oid; - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_ATTRIBUTE, &attr, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(emptyPKCSAttr), "Unexpected size %d\n", size); - ok(!memcmp(buf, emptyPKCSAttr, size), "Unexpected value\n"); - LocalFree(buf); - } - blob.cbData = sizeof(bogusDER); - blob.pbData = bogusDER; - attr.cValue = 1; - attr.rgValue = &blob; - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_ATTRIBUTE, &attr, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(bogusPKCSAttr), "Unexpected size %d\n", size); - ok(!memcmp(buf, bogusPKCSAttr, size), "Unexpected value\n"); - LocalFree(buf); - } - blob.pbData = (BYTE *)ints[0].encoded; - blob.cbData = ints[0].encoded[1] + 2; - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_ATTRIBUTE, &attr, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (buf) - { - ok(size == sizeof(intPKCSAttr), "Unexpected size %d\n", size); - ok(!memcmp(buf, intPKCSAttr, size), "Unexpected value\n"); - LocalFree(buf); - } -} - -static void test_decodePKCSAttribute(DWORD dwEncoding) -{ - BOOL ret; - LPBYTE buf = NULL; - DWORD size = 0; - CRYPT_ATTRIBUTE *attr; - - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_ATTRIBUTE, - emptyPKCSAttr, sizeof(emptyPKCSAttr), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - attr = (CRYPT_ATTRIBUTE *)buf; - - ok(!strcmp(attr->pszObjId, "1.2.3"), "Expected 1.2.3, got %s\n", - attr->pszObjId); - ok(attr->cValue == 0, "Expected no value, got %d\n", attr->cValue); - LocalFree(buf); - } - SetLastError(0xdeadbeef); - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_ATTRIBUTE, - bogusPKCSAttr, sizeof(bogusPKCSAttr), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - /* Native fails with CRYPT_E_ASN1_EOD, accept also CRYPT_E_ASN1_CORRUPT as - * I doubt an app depends on that. - */ - ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD || - GetLastError() == CRYPT_E_ASN1_CORRUPT || - GetLastError() == OSS_MORE_INPUT /* Win9x */), - "Expected CRYPT_E_ASN1_EOD, CRYPT_E_ASN1_CORRUPT, or OSS_MORE_INPUT, got %x\n", - GetLastError()); - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_ATTRIBUTE, - intPKCSAttr, sizeof(intPKCSAttr), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - attr = (CRYPT_ATTRIBUTE *)buf; - - ok(!strcmp(attr->pszObjId, "1.2.3"), "Expected 1.2.3, got %s\n", - attr->pszObjId); - ok(attr->cValue == 1, "Expected 1 value, got %d\n", attr->cValue); - ok(attr->rgValue[0].cbData == ints[0].encoded[1] + 2, - "Unexpected size %d\n", attr->rgValue[0].cbData); - ok(!memcmp(attr->rgValue[0].pbData, ints[0].encoded, - attr->rgValue[0].cbData), "Unexpected value\n"); - LocalFree(buf); - } -} - -static const BYTE emptyPKCSAttributes[] = { 0x31,0x00 }; -static const BYTE singlePKCSAttributes[] = { 0x31,0x08,0x30,0x06,0x06,0x02, - 0x2a,0x03,0x31,0x00 }; -static const BYTE doublePKCSAttributes[] = { 0x31,0x13,0x30,0x06,0x06,0x02, - 0x2a,0x03,0x31,0x00,0x30,0x09,0x06,0x02,0x2d,0x06,0x31,0x03,0x02,0x01,0x01 }; - -static void test_encodePKCSAttributes(DWORD dwEncoding) -{ - CRYPT_ATTRIBUTES attributes = { 0 }; - CRYPT_ATTRIBUTE attr[2] = { { 0 } }; - CRYPT_ATTR_BLOB blob; - BOOL ret; - LPBYTE buf = NULL; - DWORD size = 0; - char oid1[] = "1.2.3", oid2[] = "1.5.6"; - - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_ATTRIBUTES, &attributes, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(emptyPKCSAttributes), "Unexpected size %d\n", size); - ok(!memcmp(buf, emptyPKCSAttributes, size), "Unexpected value\n"); - LocalFree(buf); - } - attributes.cAttr = 1; - attributes.rgAttr = attr; - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_ATTRIBUTES, &attributes, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && (GetLastError() == E_INVALIDARG || - GetLastError() == OSS_LIMITED /* Win9x */), - "Expected E_INVALIDARG or OSS_LIMITED, got %08x\n", GetLastError()); - attr[0].pszObjId = oid1; - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_ATTRIBUTES, &attributes, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (buf) - { - ok(size == sizeof(singlePKCSAttributes), "Unexpected size %d\n", size); - ok(!memcmp(buf, singlePKCSAttributes, size), "Unexpected value\n"); - LocalFree(buf); - } - attr[1].pszObjId = oid2; - attr[1].cValue = 1; - attr[1].rgValue = &blob; - blob.pbData = (BYTE *)ints[0].encoded; - blob.cbData = ints[0].encoded[1] + 2; - attributes.cAttr = 2; - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_ATTRIBUTES, &attributes, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(doublePKCSAttributes), "Unexpected size %d\n", size); - ok(!memcmp(buf, doublePKCSAttributes, size), "Unexpected value\n"); - LocalFree(buf); - } -} - -static void test_decodePKCSAttributes(DWORD dwEncoding) -{ - BOOL ret; - LPBYTE buf = NULL; - DWORD size = 0; - CRYPT_ATTRIBUTES *attributes; - - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_ATTRIBUTES, - emptyPKCSAttributes, sizeof(emptyPKCSAttributes), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - attributes = (CRYPT_ATTRIBUTES *)buf; - ok(attributes->cAttr == 0, "Expected no attributes, got %d\n", - attributes->cAttr); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_ATTRIBUTES, - singlePKCSAttributes, sizeof(singlePKCSAttributes), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - attributes = (CRYPT_ATTRIBUTES *)buf; - ok(attributes->cAttr == 1, "Expected 1 attribute, got %d\n", - attributes->cAttr); - ok(!strcmp(attributes->rgAttr[0].pszObjId, "1.2.3"), - "Expected 1.2.3, got %s\n", attributes->rgAttr[0].pszObjId); - ok(attributes->rgAttr[0].cValue == 0, - "Expected no attributes, got %d\n", attributes->rgAttr[0].cValue); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_ATTRIBUTES, - doublePKCSAttributes, sizeof(doublePKCSAttributes), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - attributes = (CRYPT_ATTRIBUTES *)buf; - ok(attributes->cAttr == 2, "Expected 2 attributes, got %d\n", - attributes->cAttr); - ok(!strcmp(attributes->rgAttr[0].pszObjId, "1.2.3"), - "Expected 1.2.3, got %s\n", attributes->rgAttr[0].pszObjId); - ok(attributes->rgAttr[0].cValue == 0, - "Expected no attributes, got %d\n", attributes->rgAttr[0].cValue); - ok(!strcmp(attributes->rgAttr[1].pszObjId, "1.5.6"), - "Expected 1.5.6, got %s\n", attributes->rgAttr[1].pszObjId); - ok(attributes->rgAttr[1].cValue == 1, - "Expected 1 attribute, got %d\n", attributes->rgAttr[1].cValue); - ok(attributes->rgAttr[1].rgValue[0].cbData == ints[0].encoded[1] + 2, - "Unexpected size %d\n", attributes->rgAttr[1].rgValue[0].cbData); - ok(!memcmp(attributes->rgAttr[1].rgValue[0].pbData, ints[0].encoded, - attributes->rgAttr[1].rgValue[0].cbData), "Unexpected value\n"); - LocalFree(buf); - } -} - -static const BYTE singleCapability[] = { -0x30,0x06,0x30,0x04,0x06,0x02,0x2d,0x06 }; -static const BYTE twoCapabilities[] = { -0x30,0x0c,0x30,0x04,0x06,0x02,0x2d,0x06,0x30,0x04,0x06,0x02,0x2a,0x03 }; -static const BYTE singleCapabilitywithNULL[] = { -0x30,0x08,0x30,0x06,0x06,0x02,0x2d,0x06,0x05,0x00 }; - -static void test_encodePKCSSMimeCapabilities(DWORD dwEncoding) -{ - static char oid1[] = "1.5.6", oid2[] = "1.2.3"; - BOOL ret; - LPBYTE buf = NULL; - DWORD size = 0; - CRYPT_SMIME_CAPABILITY capability[2]; - CRYPT_SMIME_CAPABILITIES capabilities; - - /* An empty capabilities is allowed */ - capabilities.cCapability = 0; - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_SMIME_CAPABILITIES, - &capabilities, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(emptySequence), "unexpected size %d\n", size); - ok(!memcmp(buf, emptySequence, size), "unexpected value\n"); - LocalFree(buf); - } - /* A non-empty capabilities with an empty capability (lacking an OID) is - * not allowed - */ - capability[0].pszObjId = NULL; - capability[0].Parameters.cbData = 0; - capabilities.cCapability = 1; - capabilities.rgCapability = capability; - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_SMIME_CAPABILITIES, - &capabilities, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && (GetLastError() == E_INVALIDARG || - GetLastError() == OSS_LIMITED /* Win9x */), - "Expected E_INVALIDARG or OSS_LIMITED, got %08x\n", GetLastError()); - capability[0].pszObjId = oid1; - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_SMIME_CAPABILITIES, - &capabilities, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(singleCapability), "unexpected size %d\n", size); - ok(!memcmp(buf, singleCapability, size), "unexpected value\n"); - LocalFree(buf); - } - capability[1].pszObjId = oid2; - capability[1].Parameters.cbData = 0; - capabilities.cCapability = 2; - ret = pCryptEncodeObjectEx(dwEncoding, PKCS_SMIME_CAPABILITIES, - &capabilities, CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(twoCapabilities), "unexpected size %d\n", size); - ok(!memcmp(buf, twoCapabilities, size), "unexpected value\n"); - LocalFree(buf); - } -} - -static void compareSMimeCapabilities(LPCSTR header, - const CRYPT_SMIME_CAPABILITIES *expected, const CRYPT_SMIME_CAPABILITIES *got) -{ - DWORD i; - - ok(got->cCapability == expected->cCapability, - "%s: expected %d capabilities, got %d\n", header, expected->cCapability, - got->cCapability); - for (i = 0; i < expected->cCapability; i++) - { - ok(!strcmp(expected->rgCapability[i].pszObjId, - got->rgCapability[i].pszObjId), "%s[%d]: expected %s, got %s\n", - header, i, expected->rgCapability[i].pszObjId, - got->rgCapability[i].pszObjId); - ok(expected->rgCapability[i].Parameters.cbData == - got->rgCapability[i].Parameters.cbData, - "%s[%d]: expected %d bytes, got %d\n", header, i, - expected->rgCapability[i].Parameters.cbData, - got->rgCapability[i].Parameters.cbData); - if (expected->rgCapability[i].Parameters.cbData) - ok(!memcmp(expected->rgCapability[i].Parameters.pbData, - got->rgCapability[i].Parameters.pbData, - expected->rgCapability[i].Parameters.cbData), - "%s[%d]: unexpected value\n", header, i); - } -} - -static void test_decodePKCSSMimeCapabilities(DWORD dwEncoding) -{ - static char oid1[] = "1.5.6", oid2[] = "1.2.3"; - BOOL ret; - DWORD size = 0; - CRYPT_SMIME_CAPABILITY capability[2]; - CRYPT_SMIME_CAPABILITIES capabilities, *ptr; - - SetLastError(0xdeadbeef); - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_SMIME_CAPABILITIES, - emptySequence, sizeof(emptySequence), - CRYPT_DECODE_ALLOC_FLAG, NULL, &ptr, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - capabilities.cCapability = 0; - compareSMimeCapabilities("empty capabilities", &capabilities, ptr); - LocalFree(ptr); - } - SetLastError(0xdeadbeef); - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_SMIME_CAPABILITIES, - singleCapability, sizeof(singleCapability), CRYPT_DECODE_ALLOC_FLAG, NULL, - &ptr, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - capability[0].pszObjId = oid1; - capability[0].Parameters.cbData = 0; - capabilities.cCapability = 1; - capabilities.rgCapability = capability; - compareSMimeCapabilities("single capability", &capabilities, ptr); - LocalFree(ptr); - } - SetLastError(0xdeadbeef); - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_SMIME_CAPABILITIES, - singleCapabilitywithNULL, sizeof(singleCapabilitywithNULL), - CRYPT_DECODE_ALLOC_FLAG, NULL, &ptr, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - BYTE NULLparam[] = {0x05, 0x00}; - capability[0].pszObjId = oid1; - capability[0].Parameters.cbData = 2; - capability[0].Parameters.pbData = NULLparam; - capabilities.cCapability = 1; - capabilities.rgCapability = capability; - compareSMimeCapabilities("single capability with NULL", &capabilities, - ptr); - LocalFree(ptr); - } - SetLastError(0xdeadbeef); - ret = pCryptDecodeObjectEx(dwEncoding, PKCS_SMIME_CAPABILITIES, - twoCapabilities, sizeof(twoCapabilities), CRYPT_DECODE_ALLOC_FLAG, NULL, - &ptr, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - capability[0].Parameters.cbData = 0; - capability[1].pszObjId = oid2; - capability[1].Parameters.cbData = 0; - capabilities.cCapability = 2; - compareSMimeCapabilities("two capabilities", &capabilities, ptr); - LocalFree(ptr); - } -} - -static BYTE encodedCommonNameNoNull[] = { 0x30,0x14,0x31,0x12,0x30,0x10, - 0x06,0x03,0x55,0x04,0x03,0x13,0x09,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, - 0x67 }; -static const BYTE minimalPKCSSigner[] = { - 0x30,0x2b,0x02,0x01,0x00,0x30,0x18,0x30,0x14,0x31,0x12,0x30,0x10,0x06,0x03, - 0x55,0x04,0x03,0x13,0x09,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x02, - 0x00,0x30,0x04,0x06,0x00,0x05,0x00,0x30,0x04,0x06,0x00,0x05,0x00,0x04,0x00 }; -static const BYTE PKCSSignerWithSerial[] = { - 0x30,0x2c,0x02,0x01,0x00,0x30,0x19,0x30,0x14,0x31,0x12,0x30,0x10,0x06,0x03, - 0x55,0x04,0x03,0x13,0x09,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x02, - 0x01,0x01,0x30,0x04,0x06,0x00,0x05,0x00,0x30,0x04,0x06,0x00,0x05,0x00,0x04, - 0x00 }; -static const BYTE PKCSSignerWithHashAlgo[] = { - 0x30,0x2e,0x02,0x01,0x00,0x30,0x19,0x30,0x14,0x31,0x12,0x30,0x10,0x06,0x03, - 0x55,0x04,0x03,0x13,0x09,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x02, - 0x01,0x01,0x30,0x06,0x06,0x02,0x2a,0x03,0x05,0x00,0x30,0x04,0x06,0x00,0x05, - 0x00,0x04,0x00 }; -static const BYTE PKCSSignerWithHashAndEncryptionAlgo[] = { - 0x30,0x30,0x02,0x01,0x00,0x30,0x19,0x30,0x14,0x31,0x12,0x30,0x10,0x06,0x03, - 0x55,0x04,0x03,0x13,0x09,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x02, - 0x01,0x01,0x30,0x06,0x06,0x02,0x2a,0x03,0x05,0x00,0x30,0x06,0x06,0x02,0x2d, - 0x06,0x05,0x00,0x04,0x00 }; -static const BYTE PKCSSignerWithHash[] = { - 0x30,0x40,0x02,0x01,0x00,0x30,0x19,0x30,0x14,0x31,0x12,0x30,0x10,0x06,0x03, - 0x55,0x04,0x03,0x13,0x09,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x02, - 0x01,0x01,0x30,0x06,0x06,0x02,0x2a,0x03,0x05,0x00,0x30,0x06,0x06,0x02,0x2d, - 0x06,0x05,0x00,0x04,0x10,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09, - 0x0a,0x0b,0x0c,0x0d,0x0e,0x0f }; -static const BYTE PKCSSignerWithAuthAttr[] = { -0x30,0x62,0x02,0x01,0x00,0x30,0x19,0x30,0x14,0x31,0x12,0x30,0x10,0x06,0x03, -0x55,0x04,0x03,0x13,0x09,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x02, -0x01,0x01,0x30,0x06,0x06,0x02,0x2a,0x03,0x05,0x00,0xa0,0x20,0x30,0x1e,0x06, -0x03,0x55,0x04,0x03,0x31,0x17,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55, -0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30, -0x06,0x06,0x02,0x2d,0x06,0x05,0x00,0x04,0x10,0x00,0x01,0x02,0x03,0x04,0x05, -0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f }; - -static void test_encodePKCSSignerInfo(DWORD dwEncoding) -{ - static char oid1[] = "1.2.3", oid2[] = "1.5.6"; - BOOL ret; - LPBYTE buf = NULL; - DWORD size = 0; - CMSG_SIGNER_INFO info = { 0 }; - char oid_common_name[] = szOID_COMMON_NAME; - CRYPT_ATTR_BLOB commonName = { sizeof(encodedCommonName), - (LPBYTE)encodedCommonName }; - CRYPT_ATTRIBUTE attr = { oid_common_name, 1, &commonName }; - - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, PKCS7_SIGNER_INFO, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) - { - skip("no PKCS7_SIGNER_INFO encode support\n"); - return; - } - ok(!ret && (GetLastError() == E_INVALIDARG || - GetLastError() == OSS_LIMITED /* Win9x */), - "Expected E_INVALIDARG or OSS_LIMITED, got %08x\n", GetLastError()); - /* To be encoded, a signer must have an issuer at least, and the encoding - * must include PKCS_7_ASN_ENCODING. (That isn't enough to be decoded, - * see decoding tests.) - */ - info.Issuer.cbData = sizeof(encodedCommonNameNoNull); - info.Issuer.pbData = encodedCommonNameNoNull; - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, PKCS7_SIGNER_INFO, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (!(dwEncoding & PKCS_7_ASN_ENCODING)) - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - else - { - ok(ret || broken(GetLastError() == OSS_LIMITED /* Win9x */), - "CryptEncodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(minimalPKCSSigner), "Unexpected size %d\n", size); - if (size == sizeof(minimalPKCSSigner)) - ok(!memcmp(buf, minimalPKCSSigner, size), "Unexpected value\n"); - else - ok(0, "Unexpected value\n"); - LocalFree(buf); - } - } - info.SerialNumber.cbData = sizeof(serialNum); - info.SerialNumber.pbData = (BYTE *)serialNum; - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, PKCS7_SIGNER_INFO, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (!(dwEncoding & PKCS_7_ASN_ENCODING)) - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - else - { - ok(ret || broken(GetLastError() == OSS_LIMITED /* Win9x */), - "CryptEncodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(PKCSSignerWithSerial), "Unexpected size %d\n", - size); - if (size == sizeof(PKCSSignerWithSerial)) - ok(!memcmp(buf, PKCSSignerWithSerial, size), - "Unexpected value\n"); - else - ok(0, "Unexpected value\n"); - LocalFree(buf); - } - } - info.HashAlgorithm.pszObjId = oid1; - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, PKCS7_SIGNER_INFO, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (!(dwEncoding & PKCS_7_ASN_ENCODING)) - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - else - { - ok(ret || broken(GetLastError() == OSS_LIMITED /* Win9x */), - "CryptEncodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(PKCSSignerWithHashAlgo), "Unexpected size %d\n", - size); - if (size == sizeof(PKCSSignerWithHashAlgo)) - ok(!memcmp(buf, PKCSSignerWithHashAlgo, size), - "Unexpected value\n"); - else - ok(0, "Unexpected value\n"); - LocalFree(buf); - } - } - info.HashEncryptionAlgorithm.pszObjId = oid2; - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, PKCS7_SIGNER_INFO, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (!(dwEncoding & PKCS_7_ASN_ENCODING)) - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - else - { - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(PKCSSignerWithHashAndEncryptionAlgo), - "Unexpected size %d\n", size); - if (size == sizeof(PKCSSignerWithHashAndEncryptionAlgo)) - ok(!memcmp(buf, PKCSSignerWithHashAndEncryptionAlgo, size), - "Unexpected value\n"); - else - ok(0, "Unexpected value\n"); - LocalFree(buf); - } - } - info.EncryptedHash.cbData = sizeof(hash); - info.EncryptedHash.pbData = (BYTE *)hash; - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, PKCS7_SIGNER_INFO, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (!(dwEncoding & PKCS_7_ASN_ENCODING)) - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - else - { - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(PKCSSignerWithHash), "Unexpected size %d\n", - size); - if (size == sizeof(PKCSSignerWithHash)) - ok(!memcmp(buf, PKCSSignerWithHash, size), - "Unexpected value\n"); - else - ok(0, "Unexpected value\n"); - LocalFree(buf); - } - } - info.AuthAttrs.cAttr = 1; - info.AuthAttrs.rgAttr = &attr; - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, PKCS7_SIGNER_INFO, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (!(dwEncoding & PKCS_7_ASN_ENCODING)) - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - else - { - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(PKCSSignerWithAuthAttr), "Unexpected size %d\n", - size); - if (size == sizeof(PKCSSignerWithAuthAttr)) - ok(!memcmp(buf, PKCSSignerWithAuthAttr, size), - "Unexpected value\n"); - else - ok(0, "Unexpected value\n"); - LocalFree(buf); - } - } -} - -static void test_decodePKCSSignerInfo(DWORD dwEncoding) -{ - BOOL ret; - LPBYTE buf = NULL; - DWORD size = 0; - CMSG_SIGNER_INFO *info; - - /* A PKCS signer can't be decoded without a serial number. */ - SetLastError(0xdeadbeef); - ret = pCryptDecodeObjectEx(dwEncoding, PKCS7_SIGNER_INFO, - minimalPKCSSigner, sizeof(minimalPKCSSigner), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && (GetLastError() == CRYPT_E_ASN1_CORRUPT || - GetLastError() == OSS_DATA_ERROR /* Win9x */), - "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %x\n", - GetLastError()); - ret = pCryptDecodeObjectEx(dwEncoding, PKCS7_SIGNER_INFO, - PKCSSignerWithSerial, sizeof(PKCSSignerWithSerial), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret || broken(GetLastError() == OSS_DATA_ERROR), - "CryptDecodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - info = (CMSG_SIGNER_INFO *)buf; - ok(info->dwVersion == 0, "Expected version 0, got %d\n", - info->dwVersion); - ok(info->Issuer.cbData == sizeof(encodedCommonNameNoNull), - "Unexpected size %d\n", info->Issuer.cbData); - ok(!memcmp(info->Issuer.pbData, encodedCommonNameNoNull, - info->Issuer.cbData), "Unexpected value\n"); - ok(info->SerialNumber.cbData == sizeof(serialNum), - "Unexpected size %d\n", info->SerialNumber.cbData); - ok(!memcmp(info->SerialNumber.pbData, serialNum, sizeof(serialNum)), - "Unexpected value\n"); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, PKCS7_SIGNER_INFO, - PKCSSignerWithHashAlgo, sizeof(PKCSSignerWithHashAlgo), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - if (buf) - { - info = (CMSG_SIGNER_INFO *)buf; - ok(info->dwVersion == 0, "Expected version 0, got %d\n", - info->dwVersion); - ok(info->Issuer.cbData == sizeof(encodedCommonNameNoNull), - "Unexpected size %d\n", info->Issuer.cbData); - ok(!memcmp(info->Issuer.pbData, encodedCommonNameNoNull, - info->Issuer.cbData), "Unexpected value\n"); - ok(info->SerialNumber.cbData == sizeof(serialNum), - "Unexpected size %d\n", info->SerialNumber.cbData); - ok(!memcmp(info->SerialNumber.pbData, serialNum, sizeof(serialNum)), - "Unexpected value\n"); - ok(!strcmp(info->HashAlgorithm.pszObjId, "1.2.3"), - "Expected 1.2.3, got %s\n", info->HashAlgorithm.pszObjId); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, PKCS7_SIGNER_INFO, - PKCSSignerWithHashAndEncryptionAlgo, - sizeof(PKCSSignerWithHashAndEncryptionAlgo), CRYPT_DECODE_ALLOC_FLAG, - NULL, &buf, &size); - if (buf) - { - info = (CMSG_SIGNER_INFO *)buf; - ok(info->dwVersion == 0, "Expected version 0, got %d\n", - info->dwVersion); - ok(info->Issuer.cbData == sizeof(encodedCommonNameNoNull), - "Unexpected size %d\n", info->Issuer.cbData); - ok(!memcmp(info->Issuer.pbData, encodedCommonNameNoNull, - info->Issuer.cbData), "Unexpected value\n"); - ok(info->SerialNumber.cbData == sizeof(serialNum), - "Unexpected size %d\n", info->SerialNumber.cbData); - ok(!memcmp(info->SerialNumber.pbData, serialNum, sizeof(serialNum)), - "Unexpected value\n"); - ok(!strcmp(info->HashAlgorithm.pszObjId, "1.2.3"), - "Expected 1.2.3, got %s\n", info->HashAlgorithm.pszObjId); - ok(!strcmp(info->HashEncryptionAlgorithm.pszObjId, "1.5.6"), - "Expected 1.5.6, got %s\n", info->HashEncryptionAlgorithm.pszObjId); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, PKCS7_SIGNER_INFO, - PKCSSignerWithHash, sizeof(PKCSSignerWithHash), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - if (buf) - { - info = (CMSG_SIGNER_INFO *)buf; - ok(info->dwVersion == 0, "Expected version 0, got %d\n", - info->dwVersion); - ok(info->Issuer.cbData == sizeof(encodedCommonNameNoNull), - "Unexpected size %d\n", info->Issuer.cbData); - ok(!memcmp(info->Issuer.pbData, encodedCommonNameNoNull, - info->Issuer.cbData), "Unexpected value\n"); - ok(info->SerialNumber.cbData == sizeof(serialNum), - "Unexpected size %d\n", info->SerialNumber.cbData); - ok(!memcmp(info->SerialNumber.pbData, serialNum, sizeof(serialNum)), - "Unexpected value\n"); - ok(!strcmp(info->HashAlgorithm.pszObjId, "1.2.3"), - "Expected 1.2.3, got %s\n", info->HashAlgorithm.pszObjId); - ok(!strcmp(info->HashEncryptionAlgorithm.pszObjId, "1.5.6"), - "Expected 1.5.6, got %s\n", info->HashEncryptionAlgorithm.pszObjId); - ok(info->EncryptedHash.cbData == sizeof(hash), "Unexpected size %d\n", - info->EncryptedHash.cbData); - ok(!memcmp(info->EncryptedHash.pbData, hash, sizeof(hash)), - "Unexpected value\n"); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, PKCS7_SIGNER_INFO, - PKCSSignerWithAuthAttr, sizeof(PKCSSignerWithAuthAttr), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - if (buf) - { - info = (CMSG_SIGNER_INFO *)buf; - ok(info->AuthAttrs.cAttr == 1, "Expected 1 attribute, got %d\n", - info->AuthAttrs.cAttr); - ok(!strcmp(info->AuthAttrs.rgAttr[0].pszObjId, szOID_COMMON_NAME), - "Expected %s, got %s\n", szOID_COMMON_NAME, - info->AuthAttrs.rgAttr[0].pszObjId); - ok(info->AuthAttrs.rgAttr[0].cValue == 1, "Expected 1 value, got %d\n", - info->AuthAttrs.rgAttr[0].cValue); - ok(info->AuthAttrs.rgAttr[0].rgValue[0].cbData == - sizeof(encodedCommonName), "Unexpected size %d\n", - info->AuthAttrs.rgAttr[0].rgValue[0].cbData); - ok(!memcmp(info->AuthAttrs.rgAttr[0].rgValue[0].pbData, - encodedCommonName, sizeof(encodedCommonName)), "Unexpected value\n"); - LocalFree(buf); - } -} - -static const BYTE CMSSignerWithKeyId[] = { -0x30,0x14,0x02,0x01,0x00,0x80,0x01,0x01,0x30,0x04,0x06,0x00,0x05,0x00,0x30, -0x04,0x06,0x00,0x05,0x00,0x04,0x00 }; - -static void test_encodeCMSSignerInfo(DWORD dwEncoding) -{ - BOOL ret; - LPBYTE buf = NULL; - DWORD size = 0; - CMSG_CMS_SIGNER_INFO info = { 0 }; - static char oid1[] = "1.2.3", oid2[] = "1.5.6"; - - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, CMS_SIGNER_INFO, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret, "Expected failure, got %d\n", ret); - if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) - { - skip("no CMS_SIGNER_INFO encode support\n"); - return; - } - ok(GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - info.SignerId.dwIdChoice = CERT_ID_ISSUER_SERIAL_NUMBER; - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, CMS_SIGNER_INFO, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret, "Expected failure, got %d\n", ret); - if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) - { - skip("no CMS_SIGNER_INFO encode support\n"); - return; - } - ok(GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* To be encoded, a signer must have a valid cert ID, where a valid ID may - * be a key id or a issuer serial number with at least the issuer set, and - * the encoding must include PKCS_7_ASN_ENCODING. - * (That isn't enough to be decoded, see decoding tests.) - */ - U(info.SignerId).IssuerSerialNumber.Issuer.cbData = - sizeof(encodedCommonNameNoNull); - U(info.SignerId).IssuerSerialNumber.Issuer.pbData = encodedCommonNameNoNull; - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, CMS_SIGNER_INFO, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (!(dwEncoding & PKCS_7_ASN_ENCODING)) - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - else - { - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(minimalPKCSSigner), "Unexpected size %d\n", size); - ok(!memcmp(buf, minimalPKCSSigner, size), "Unexpected value\n"); - LocalFree(buf); - } - } - U(info.SignerId).IssuerSerialNumber.SerialNumber.cbData = sizeof(serialNum); - U(info.SignerId).IssuerSerialNumber.SerialNumber.pbData = (BYTE *)serialNum; - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, CMS_SIGNER_INFO, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (!(dwEncoding & PKCS_7_ASN_ENCODING)) - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - else - { - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(PKCSSignerWithSerial), "Unexpected size %d\n", - size); - ok(!memcmp(buf, PKCSSignerWithSerial, size), "Unexpected value\n"); - LocalFree(buf); - } - } - info.SignerId.dwIdChoice = CERT_ID_KEY_IDENTIFIER; - U(info.SignerId).KeyId.cbData = sizeof(serialNum); - U(info.SignerId).KeyId.pbData = (BYTE *)serialNum; - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, CMS_SIGNER_INFO, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (!(dwEncoding & PKCS_7_ASN_ENCODING)) - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - else - { - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(CMSSignerWithKeyId), "Unexpected size %d\n", - size); - ok(!memcmp(buf, CMSSignerWithKeyId, size), "Unexpected value\n"); - LocalFree(buf); - } - } - /* While a CERT_ID can have a hash type, that's not allowed in CMS, where - * only the IssuerAndSerialNumber and SubjectKeyIdentifier types are allowed - * (see RFC 3852, section 5.3.) - */ - info.SignerId.dwIdChoice = CERT_ID_SHA1_HASH; - U(info.SignerId).HashId.cbData = sizeof(hash); - U(info.SignerId).HashId.pbData = (BYTE *)hash; - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, CMS_SIGNER_INFO, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* Now with a hash algo */ - info.SignerId.dwIdChoice = CERT_ID_ISSUER_SERIAL_NUMBER; - U(info.SignerId).IssuerSerialNumber.Issuer.cbData = - sizeof(encodedCommonNameNoNull); - U(info.SignerId).IssuerSerialNumber.Issuer.pbData = encodedCommonNameNoNull; - info.HashAlgorithm.pszObjId = oid1; - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, CMS_SIGNER_INFO, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (!(dwEncoding & PKCS_7_ASN_ENCODING)) - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - else - { - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(PKCSSignerWithHashAlgo), "Unexpected size %d\n", - size); - ok(!memcmp(buf, PKCSSignerWithHashAlgo, size), - "Unexpected value\n"); - LocalFree(buf); - } - } - info.HashEncryptionAlgorithm.pszObjId = oid2; - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, CMS_SIGNER_INFO, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (!(dwEncoding & PKCS_7_ASN_ENCODING)) - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - else - { - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(PKCSSignerWithHashAndEncryptionAlgo), - "Unexpected size %d\n", size); - ok(!memcmp(buf, PKCSSignerWithHashAndEncryptionAlgo, size), - "Unexpected value\n"); - LocalFree(buf); - } - } - info.EncryptedHash.cbData = sizeof(hash); - info.EncryptedHash.pbData = (BYTE *)hash; - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, CMS_SIGNER_INFO, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (!(dwEncoding & PKCS_7_ASN_ENCODING)) - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - else - { - ok(ret, "CryptEncodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - ok(size == sizeof(PKCSSignerWithHash), "Unexpected size %d\n", - size); - ok(!memcmp(buf, PKCSSignerWithHash, size), "Unexpected value\n"); - LocalFree(buf); - } - } -} - -static void test_decodeCMSSignerInfo(DWORD dwEncoding) -{ - BOOL ret; - LPBYTE buf = NULL; - DWORD size = 0; - CMSG_CMS_SIGNER_INFO *info; - static char oid1[] = "1.2.3", oid2[] = "1.5.6"; - - /* A CMS signer can't be decoded without a serial number. */ - SetLastError(0xdeadbeef); - ret = pCryptDecodeObjectEx(dwEncoding, CMS_SIGNER_INFO, - minimalPKCSSigner, sizeof(minimalPKCSSigner), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret, "expected failure\n"); - if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) - { - skip("no CMS_SIGNER_INFO decode support\n"); - return; - } - ok(GetLastError() == CRYPT_E_ASN1_CORRUPT, - "Expected CRYPT_E_ASN1_CORRUPT, got %x\n", GetLastError()); - ret = pCryptDecodeObjectEx(dwEncoding, CMS_SIGNER_INFO, - PKCSSignerWithSerial, sizeof(PKCSSignerWithSerial), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - info = (CMSG_CMS_SIGNER_INFO *)buf; - ok(info->dwVersion == 0, "Expected version 0, got %d\n", - info->dwVersion); - ok(info->SignerId.dwIdChoice == CERT_ID_ISSUER_SERIAL_NUMBER, - "Expected CERT_ID_ISSUER_SERIAL_NUMBER, got %d\n", - info->SignerId.dwIdChoice); - ok(U(info->SignerId).IssuerSerialNumber.Issuer.cbData == - sizeof(encodedCommonNameNoNull), "Unexpected size %d\n", - U(info->SignerId).IssuerSerialNumber.Issuer.cbData); - ok(!memcmp(U(info->SignerId).IssuerSerialNumber.Issuer.pbData, - encodedCommonNameNoNull, - U(info->SignerId).IssuerSerialNumber.Issuer.cbData), - "Unexpected value\n"); - ok(U(info->SignerId).IssuerSerialNumber.SerialNumber.cbData == - sizeof(serialNum), "Unexpected size %d\n", - U(info->SignerId).IssuerSerialNumber.SerialNumber.cbData); - ok(!memcmp(U(info->SignerId).IssuerSerialNumber.SerialNumber.pbData, - serialNum, sizeof(serialNum)), "Unexpected value\n"); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, CMS_SIGNER_INFO, - PKCSSignerWithHashAlgo, sizeof(PKCSSignerWithHashAlgo), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - info = (CMSG_CMS_SIGNER_INFO *)buf; - ok(info->dwVersion == 0, "Expected version 0, got %d\n", - info->dwVersion); - ok(info->SignerId.dwIdChoice == CERT_ID_ISSUER_SERIAL_NUMBER, - "Expected CERT_ID_ISSUER_SERIAL_NUMBER, got %d\n", - info->SignerId.dwIdChoice); - ok(U(info->SignerId).IssuerSerialNumber.Issuer.cbData == - sizeof(encodedCommonNameNoNull), "Unexpected size %d\n", - U(info->SignerId).IssuerSerialNumber.Issuer.cbData); - ok(!memcmp(U(info->SignerId).IssuerSerialNumber.Issuer.pbData, - encodedCommonNameNoNull, - U(info->SignerId).IssuerSerialNumber.Issuer.cbData), - "Unexpected value\n"); - ok(U(info->SignerId).IssuerSerialNumber.SerialNumber.cbData == - sizeof(serialNum), "Unexpected size %d\n", - U(info->SignerId).IssuerSerialNumber.SerialNumber.cbData); - ok(!memcmp(U(info->SignerId).IssuerSerialNumber.SerialNumber.pbData, - serialNum, sizeof(serialNum)), "Unexpected value\n"); - ok(!strcmp(info->HashAlgorithm.pszObjId, oid1), - "Expected %s, got %s\n", oid1, info->HashAlgorithm.pszObjId); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, CMS_SIGNER_INFO, - PKCSSignerWithHashAndEncryptionAlgo, - sizeof(PKCSSignerWithHashAndEncryptionAlgo), CRYPT_DECODE_ALLOC_FLAG, - NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - info = (CMSG_CMS_SIGNER_INFO *)buf; - ok(info->dwVersion == 0, "Expected version 0, got %d\n", - info->dwVersion); - ok(info->SignerId.dwIdChoice == CERT_ID_ISSUER_SERIAL_NUMBER, - "Expected CERT_ID_ISSUER_SERIAL_NUMBER, got %d\n", - info->SignerId.dwIdChoice); - ok(U(info->SignerId).IssuerSerialNumber.Issuer.cbData == - sizeof(encodedCommonNameNoNull), "Unexpected size %d\n", - U(info->SignerId).IssuerSerialNumber.Issuer.cbData); - ok(!memcmp(U(info->SignerId).IssuerSerialNumber.Issuer.pbData, - encodedCommonNameNoNull, - U(info->SignerId).IssuerSerialNumber.Issuer.cbData), - "Unexpected value\n"); - ok(U(info->SignerId).IssuerSerialNumber.SerialNumber.cbData == - sizeof(serialNum), "Unexpected size %d\n", - U(info->SignerId).IssuerSerialNumber.SerialNumber.cbData); - ok(!memcmp(U(info->SignerId).IssuerSerialNumber.SerialNumber.pbData, - serialNum, sizeof(serialNum)), "Unexpected value\n"); - ok(!strcmp(info->HashAlgorithm.pszObjId, oid1), - "Expected %s, got %s\n", oid1, info->HashAlgorithm.pszObjId); - ok(!strcmp(info->HashEncryptionAlgorithm.pszObjId, oid2), - "Expected %s, got %s\n", oid2, info->HashEncryptionAlgorithm.pszObjId); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, CMS_SIGNER_INFO, - PKCSSignerWithHash, sizeof(PKCSSignerWithHash), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - info = (CMSG_CMS_SIGNER_INFO *)buf; - ok(info->dwVersion == 0, "Expected version 0, got %d\n", - info->dwVersion); - ok(info->SignerId.dwIdChoice == CERT_ID_ISSUER_SERIAL_NUMBER, - "Expected CERT_ID_ISSUER_SERIAL_NUMBER, got %d\n", - info->SignerId.dwIdChoice); - ok(U(info->SignerId).IssuerSerialNumber.Issuer.cbData == - sizeof(encodedCommonNameNoNull), "Unexpected size %d\n", - U(info->SignerId).IssuerSerialNumber.Issuer.cbData); - ok(!memcmp(U(info->SignerId).IssuerSerialNumber.Issuer.pbData, - encodedCommonNameNoNull, - U(info->SignerId).IssuerSerialNumber.Issuer.cbData), - "Unexpected value\n"); - ok(U(info->SignerId).IssuerSerialNumber.SerialNumber.cbData == - sizeof(serialNum), "Unexpected size %d\n", - U(info->SignerId).IssuerSerialNumber.SerialNumber.cbData); - ok(!memcmp(U(info->SignerId).IssuerSerialNumber.SerialNumber.pbData, - serialNum, sizeof(serialNum)), "Unexpected value\n"); - ok(!strcmp(info->HashAlgorithm.pszObjId, oid1), - "Expected %s, got %s\n", oid1, info->HashAlgorithm.pszObjId); - ok(!strcmp(info->HashEncryptionAlgorithm.pszObjId, oid2), - "Expected %s, got %s\n", oid2, info->HashEncryptionAlgorithm.pszObjId); - ok(info->EncryptedHash.cbData == sizeof(hash), "Unexpected size %d\n", - info->EncryptedHash.cbData); - ok(!memcmp(info->EncryptedHash.pbData, hash, sizeof(hash)), - "Unexpected value\n"); - LocalFree(buf); - } - ret = pCryptDecodeObjectEx(dwEncoding, CMS_SIGNER_INFO, - CMSSignerWithKeyId, sizeof(CMSSignerWithKeyId), - CRYPT_DECODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptDecodeObjectEx failed: %x\n", GetLastError()); - if (buf) - { - info = (CMSG_CMS_SIGNER_INFO *)buf; - ok(info->dwVersion == 0, "Expected version 0, got %d\n", - info->dwVersion); - ok(info->SignerId.dwIdChoice == CERT_ID_KEY_IDENTIFIER, - "Expected CERT_ID_KEY_IDENTIFIER, got %d\n", - info->SignerId.dwIdChoice); - ok(U(info->SignerId).KeyId.cbData == sizeof(serialNum), - "Unexpected size %d\n", U(info->SignerId).KeyId.cbData); - ok(!memcmp(U(info->SignerId).KeyId.pbData, serialNum, sizeof(serialNum)), - "Unexpected value\n"); - LocalFree(buf); - } -} - -static BYTE emptyDNSPermittedConstraints[] = { -0x30,0x06,0xa0,0x04,0x30,0x02,0x82,0x00 }; -static BYTE emptyDNSExcludedConstraints[] = { -0x30,0x06,0xa1,0x04,0x30,0x02,0x82,0x00 }; -static BYTE DNSExcludedConstraints[] = { -0x30,0x17,0xa1,0x15,0x30,0x13,0x82,0x11,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f, -0x77,0x69,0x6e,0x65,0x68,0x71,0x2e,0x6f,0x72,0x67 }; -static BYTE permittedAndExcludedConstraints[] = { -0x30,0x25,0xa0,0x0c,0x30,0x0a,0x87,0x08,0x30,0x06,0x87,0x04,0x7f,0x00,0x00, -0x01,0xa1,0x15,0x30,0x13,0x82,0x11,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77, -0x69,0x6e,0x65,0x68,0x71,0x2e,0x6f,0x72,0x67 }; -static BYTE permittedAndExcludedWithMinConstraints[] = { -0x30,0x28,0xa0,0x0f,0x30,0x0d,0x87,0x08,0x30,0x06,0x87,0x04,0x7f,0x00,0x00, -0x01,0x80,0x01,0x05,0xa1,0x15,0x30,0x13,0x82,0x11,0x68,0x74,0x74,0x70,0x3a, -0x2f,0x2f,0x77,0x69,0x6e,0x65,0x68,0x71,0x2e,0x6f,0x72,0x67 }; -static BYTE permittedAndExcludedWithMinMaxConstraints[] = { -0x30,0x2b,0xa0,0x12,0x30,0x10,0x87,0x08,0x30,0x06,0x87,0x04,0x7f,0x00,0x00, -0x01,0x80,0x01,0x05,0x81,0x01,0x03,0xa1,0x15,0x30,0x13,0x82,0x11,0x68,0x74, -0x74,0x70,0x3a,0x2f,0x2f,0x77,0x69,0x6e,0x65,0x68,0x71,0x2e,0x6f,0x72,0x67 }; - -static void test_encodeNameConstraints(DWORD dwEncoding) -{ - BOOL ret; - CERT_NAME_CONSTRAINTS_INFO constraints = { 0 }; - CERT_GENERAL_SUBTREE permitted = { { 0 } }; - CERT_GENERAL_SUBTREE excluded = { { 0 } }; - LPBYTE buf; - DWORD size; - - ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME_CONSTRAINTS, &constraints, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) - { - skip("no X509_NAME_CONSTRAINTS encode support\n"); - return; - } - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(size == sizeof(emptySequence), "Unexpected size\n"); - ok(!memcmp(buf, emptySequence, size), "Unexpected value\n"); - LocalFree(buf); - } - constraints.cPermittedSubtree = 1; - constraints.rgPermittedSubtree = &permitted; - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME_CONSTRAINTS, &constraints, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - permitted.Base.dwAltNameChoice = CERT_ALT_NAME_DNS_NAME; - ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME_CONSTRAINTS, &constraints, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(size == sizeof(emptyDNSPermittedConstraints), "Unexpected size\n"); - ok(!memcmp(buf, emptyDNSPermittedConstraints, size), - "Unexpected value\n"); - LocalFree(buf); - } - constraints.cPermittedSubtree = 0; - constraints.cExcludedSubtree = 1; - constraints.rgExcludedSubtree = &excluded; - excluded.Base.dwAltNameChoice = CERT_ALT_NAME_DNS_NAME; - ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME_CONSTRAINTS, &constraints, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(size == sizeof(emptyDNSExcludedConstraints), "Unexpected size\n"); - ok(!memcmp(buf, emptyDNSExcludedConstraints, size), - "Unexpected value\n"); - LocalFree(buf); - } - U(excluded.Base).pwszURL = (LPWSTR)url; - ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME_CONSTRAINTS, &constraints, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(size == sizeof(DNSExcludedConstraints), "Unexpected size\n"); - ok(!memcmp(buf, DNSExcludedConstraints, size), - "Unexpected value\n"); - LocalFree(buf); - } - permitted.Base.dwAltNameChoice = CERT_ALT_NAME_IP_ADDRESS; - U(permitted.Base).IPAddress.cbData = sizeof(encodedIPAddr); - U(permitted.Base).IPAddress.pbData = (LPBYTE)encodedIPAddr; - constraints.cPermittedSubtree = 1; - ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME_CONSTRAINTS, &constraints, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(size == sizeof(permittedAndExcludedConstraints), - "Unexpected size\n"); - ok(!memcmp(buf, permittedAndExcludedConstraints, size), - "Unexpected value\n"); - LocalFree(buf); - } - permitted.dwMinimum = 5; - ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME_CONSTRAINTS, &constraints, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(size == sizeof(permittedAndExcludedWithMinConstraints), - "Unexpected size\n"); - ok(!memcmp(buf, permittedAndExcludedWithMinConstraints, size), - "Unexpected value\n"); - LocalFree(buf); - } - permitted.fMaximum = TRUE; - permitted.dwMaximum = 3; - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME_CONSTRAINTS, &constraints, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(size == sizeof(permittedAndExcludedWithMinMaxConstraints), - "Unexpected size\n"); - ok(!memcmp(buf, permittedAndExcludedWithMinMaxConstraints, size), - "Unexpected value\n"); - LocalFree(buf); - } -} - -struct EncodedNameConstraints -{ - CRYPT_DATA_BLOB encoded; - CERT_NAME_CONSTRAINTS_INFO constraints; -}; - -static CERT_GENERAL_SUBTREE emptyDNSSubtree = { - { CERT_ALT_NAME_DNS_NAME, { 0 } }, 0 }; -static CERT_GENERAL_SUBTREE DNSSubtree = { - { CERT_ALT_NAME_DNS_NAME, { 0 } }, 0 }; -static CERT_GENERAL_SUBTREE IPAddressSubtree = { - { CERT_ALT_NAME_IP_ADDRESS, { 0 } }, 0 }; -static CERT_GENERAL_SUBTREE IPAddressWithMinSubtree = { - { CERT_ALT_NAME_IP_ADDRESS, { 0 } }, 5, 0 }; -static CERT_GENERAL_SUBTREE IPAddressWithMinMaxSubtree = { - { CERT_ALT_NAME_IP_ADDRESS, { 0 } }, 5, TRUE, 3 }; - -struct EncodedNameConstraints encodedNameConstraints[] = { - { { sizeof(emptySequence), (LPBYTE)emptySequence }, { 0 } }, - { { sizeof(emptyDNSPermittedConstraints), emptyDNSPermittedConstraints }, - { 1, &emptyDNSSubtree, 0, NULL } }, - { { sizeof(emptyDNSExcludedConstraints), emptyDNSExcludedConstraints }, - { 0, NULL, 1, &emptyDNSSubtree } }, - { { sizeof(DNSExcludedConstraints), DNSExcludedConstraints }, - { 0, NULL, 1, &DNSSubtree } }, - { { sizeof(permittedAndExcludedConstraints), permittedAndExcludedConstraints }, - { 1, &IPAddressSubtree, 1, &DNSSubtree } }, - { { sizeof(permittedAndExcludedWithMinConstraints), - permittedAndExcludedWithMinConstraints }, - { 1, &IPAddressWithMinSubtree, 1, &DNSSubtree } }, - { { sizeof(permittedAndExcludedWithMinMaxConstraints), - permittedAndExcludedWithMinMaxConstraints }, - { 1, &IPAddressWithMinMaxSubtree, 1, &DNSSubtree } }, -}; - -static void test_decodeNameConstraints(DWORD dwEncoding) -{ - BOOL ret; - DWORD i; - CERT_NAME_CONSTRAINTS_INFO *constraints; - - U(DNSSubtree.Base).pwszURL = (LPWSTR)url; - U(IPAddressSubtree.Base).IPAddress.cbData = sizeof(encodedIPAddr); - U(IPAddressSubtree.Base).IPAddress.pbData = (LPBYTE)encodedIPAddr; - U(IPAddressWithMinSubtree.Base).IPAddress.cbData = sizeof(encodedIPAddr); - U(IPAddressWithMinSubtree.Base).IPAddress.pbData = (LPBYTE)encodedIPAddr; - U(IPAddressWithMinMaxSubtree.Base).IPAddress.cbData = sizeof(encodedIPAddr); - U(IPAddressWithMinMaxSubtree.Base).IPAddress.pbData = (LPBYTE)encodedIPAddr; - for (i = 0; - i < sizeof(encodedNameConstraints) / sizeof(encodedNameConstraints[0]); - i++) - { - DWORD size; - - ret = pCryptDecodeObjectEx(dwEncoding, X509_NAME_CONSTRAINTS, - encodedNameConstraints[i].encoded.pbData, - encodedNameConstraints[i].encoded.cbData, - CRYPT_DECODE_ALLOC_FLAG, NULL, &constraints, &size); - if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) - { - skip("no X509_NAME_CONSTRAINTS decode support\n"); - return; - } - ok(ret, "%d: CryptDecodeObjectEx failed: %08x\n", i, GetLastError()); - if (ret) - { - DWORD j; - - if (constraints->cPermittedSubtree != - encodedNameConstraints[i].constraints.cPermittedSubtree) - fprintf(stderr, "%d: expected %d permitted, got %d\n", i, - encodedNameConstraints[i].constraints.cPermittedSubtree, - constraints->cPermittedSubtree); - if (constraints->cPermittedSubtree == - encodedNameConstraints[i].constraints.cPermittedSubtree) - { - for (j = 0; j < constraints->cPermittedSubtree; j++) - { - compareAltNameEntry(&constraints->rgPermittedSubtree[j].Base, - &encodedNameConstraints[i].constraints.rgPermittedSubtree[j].Base); - } - } - if (constraints->cExcludedSubtree != - encodedNameConstraints[i].constraints.cExcludedSubtree) - fprintf(stderr, "%d: expected %d excluded, got %d\n", i, - encodedNameConstraints[i].constraints.cExcludedSubtree, - constraints->cExcludedSubtree); - if (constraints->cExcludedSubtree == - encodedNameConstraints[i].constraints.cExcludedSubtree) - { - for (j = 0; j < constraints->cExcludedSubtree; j++) - { - compareAltNameEntry(&constraints->rgExcludedSubtree[j].Base, - &encodedNameConstraints[i].constraints.rgExcludedSubtree[j].Base); - } - } - LocalFree(constraints); - } - } -} - -static WCHAR noticeText[] = { 'T','h','i','s',' ','i','s',' ','a',' ', - 'n','o','t','i','c','e',0 }; -static const BYTE noticeWithDisplayText[] = { - 0x30,0x22,0x1e,0x20,0x00,0x54,0x00,0x68,0x00,0x69,0x00,0x73,0x00,0x20,0x00, - 0x69,0x00,0x73,0x00,0x20,0x00,0x61,0x00,0x20,0x00,0x6e,0x00,0x6f,0x00,0x74, - 0x00,0x69,0x00,0x63,0x00,0x65 -}; -static char org[] = "Wine"; -static int noticeNumbers[] = { 2,3 }; -static BYTE noticeWithReference[] = { - 0x30,0x32,0x30,0x0e,0x16,0x04,0x57,0x69,0x6e,0x65,0x30,0x06,0x02,0x01,0x02, - 0x02,0x01,0x03,0x1e,0x20,0x00,0x54,0x00,0x68,0x00,0x69,0x00,0x73,0x00,0x20, - 0x00,0x69,0x00,0x73,0x00,0x20,0x00,0x61,0x00,0x20,0x00,0x6e,0x00,0x6f,0x00, - 0x74,0x00,0x69,0x00,0x63,0x00,0x65 -}; - -static void test_encodePolicyQualifierUserNotice(DWORD dwEncoding) -{ - BOOL ret; - LPBYTE buf; - DWORD size; - CERT_POLICY_QUALIFIER_USER_NOTICE notice; - CERT_POLICY_QUALIFIER_NOTICE_REFERENCE reference; - - memset(¬ice, 0, sizeof(notice)); - ret = pCryptEncodeObjectEx(dwEncoding, - X509_PKIX_POLICY_QUALIFIER_USERNOTICE, ¬ice, CRYPT_ENCODE_ALLOC_FLAG, - NULL, &buf, &size); - if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) - { - skip("no X509_PKIX_POLICY_QUALIFIER_USERNOTICE encode support\n"); - return; - } - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(sizeof(emptySequence) == size, "unexpected size %d\n", size); - ok(!memcmp(buf, emptySequence, size), "unexpected value\n"); - LocalFree(buf); - } - notice.pszDisplayText = noticeText; - ret = pCryptEncodeObjectEx(dwEncoding, - X509_PKIX_POLICY_QUALIFIER_USERNOTICE, ¬ice, CRYPT_ENCODE_ALLOC_FLAG, - NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(sizeof(noticeWithDisplayText) == size, "unexpected size %d\n", size); - ok(!memcmp(buf, noticeWithDisplayText, size), "unexpected value\n"); - LocalFree(buf); - } - reference.pszOrganization = org; - reference.cNoticeNumbers = 2; - reference.rgNoticeNumbers = noticeNumbers; - notice.pNoticeReference = &reference; - ret = pCryptEncodeObjectEx(dwEncoding, - X509_PKIX_POLICY_QUALIFIER_USERNOTICE, ¬ice, CRYPT_ENCODE_ALLOC_FLAG, - NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(sizeof(noticeWithReference) == size, "unexpected size %d\n", size); - ok(!memcmp(buf, noticeWithReference, size), "unexpected value\n"); - LocalFree(buf); - } -} - -static void test_decodePolicyQualifierUserNotice(DWORD dwEncoding) -{ - BOOL ret; - CERT_POLICY_QUALIFIER_USER_NOTICE *notice; - DWORD size; - - ret = pCryptDecodeObjectEx(dwEncoding, - X509_PKIX_POLICY_QUALIFIER_USERNOTICE, - emptySequence, sizeof(emptySequence), CRYPT_DECODE_ALLOC_FLAG, NULL, - ¬ice, &size); - if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) - { - skip("no X509_PKIX_POLICY_QUALIFIER_USERNOTICE decode support\n"); - return; - } - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(notice->pszDisplayText == NULL, "unexpected display text\n"); - ok(notice->pNoticeReference == NULL, "unexpected notice reference\n"); - LocalFree(notice); - } - ret = pCryptDecodeObjectEx(dwEncoding, - X509_PKIX_POLICY_QUALIFIER_USERNOTICE, - noticeWithDisplayText, sizeof(noticeWithDisplayText), - CRYPT_DECODE_ALLOC_FLAG, NULL, ¬ice, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(!lstrcmpW(notice->pszDisplayText, noticeText), - "unexpected display text\n"); - ok(notice->pNoticeReference == NULL, "unexpected notice reference\n"); - LocalFree(notice); - } - ret = pCryptDecodeObjectEx(dwEncoding, - X509_PKIX_POLICY_QUALIFIER_USERNOTICE, - noticeWithReference, sizeof(noticeWithReference), - CRYPT_DECODE_ALLOC_FLAG, NULL, ¬ice, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(!lstrcmpW(notice->pszDisplayText, noticeText), - "unexpected display text\n"); - ok(notice->pNoticeReference != NULL, "expected a notice reference\n"); - if (notice->pNoticeReference) - { - ok(!strcmp(notice->pNoticeReference->pszOrganization, org), - "unexpected organization %s\n", - notice->pNoticeReference->pszOrganization); - ok(notice->pNoticeReference->cNoticeNumbers == 2, - "expected 2 notice numbers, got %d\n", - notice->pNoticeReference->cNoticeNumbers); - ok(notice->pNoticeReference->rgNoticeNumbers[0] == noticeNumbers[0], - "unexpected notice number %d\n", - notice->pNoticeReference->rgNoticeNumbers[0]); - ok(notice->pNoticeReference->rgNoticeNumbers[1] == noticeNumbers[1], - "unexpected notice number %d\n", - notice->pNoticeReference->rgNoticeNumbers[1]); - } - LocalFree(notice); - } -} - -static char oid_any_policy[] = "2.5.29.32.0"; -static const BYTE policiesWithAnyPolicy[] = { - 0x30,0x08,0x30,0x06,0x06,0x04,0x55,0x1d,0x20,0x00 -}; -static char oid1[] = "1.2.3"; -static char oid_user_notice[] = "1.3.6.1.5.5.7.2.2"; -static const BYTE twoPolicies[] = { - 0x30,0x50,0x30,0x06,0x06,0x04,0x55,0x1d,0x20,0x00,0x30,0x46,0x06,0x02,0x2a, - 0x03,0x30,0x40,0x30,0x3e,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x02,0x02, - 0x30,0x32,0x30,0x0e,0x16,0x04,0x57,0x69,0x6e,0x65,0x30,0x06,0x02,0x01,0x02, - 0x02,0x01,0x03,0x1e,0x20,0x00,0x54,0x00,0x68,0x00,0x69,0x00,0x73,0x00,0x20, - 0x00,0x69,0x00,0x73,0x00,0x20,0x00,0x61,0x00,0x20,0x00,0x6e,0x00,0x6f,0x00, - 0x74,0x00,0x69,0x00,0x63,0x00,0x65 -}; - -static void test_encodeCertPolicies(DWORD dwEncoding) -{ - BOOL ret; - CERT_POLICIES_INFO info; - CERT_POLICY_INFO policy[2]; - CERT_POLICY_QUALIFIER_INFO qualifier; - LPBYTE buf; - DWORD size; - - memset(&info, 0, sizeof(info)); - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_POLICIES, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(sizeof(emptySequence) == size, "unexpected size %d\n", size); - ok(!memcmp(buf, emptySequence, size), "unexpected value\n"); - LocalFree(buf); - } - memset(policy, 0, sizeof(policy)); - info.cPolicyInfo = 1; - info.rgPolicyInfo = policy; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_POLICIES, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && (GetLastError() == E_INVALIDARG || - GetLastError() == OSS_LIMITED /* Win9x/NT4 */), - "expected E_INVALIDARG or OSS_LIMITED, got %08x\n", GetLastError()); - policy[0].pszPolicyIdentifier = oid_any_policy; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_POLICIES, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(sizeof(policiesWithAnyPolicy) == size, "unexpected size %d\n", size); - ok(!memcmp(buf, policiesWithAnyPolicy, size), "unexpected value\n"); - LocalFree(buf); - } - policy[1].pszPolicyIdentifier = oid1; - memset(&qualifier, 0, sizeof(qualifier)); - qualifier.pszPolicyQualifierId = oid_user_notice; - qualifier.Qualifier.cbData = sizeof(noticeWithReference); - qualifier.Qualifier.pbData = noticeWithReference; - policy[1].cPolicyQualifier = 1; - policy[1].rgPolicyQualifier = &qualifier; - info.cPolicyInfo = 2; - ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_POLICIES, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(sizeof(twoPolicies) == size, "unexpected size %d\n", size); - ok(!memcmp(buf, twoPolicies, size), "unexpected value\n"); - LocalFree(buf); - } -} - -static void test_decodeCertPolicies(DWORD dwEncoding) -{ - BOOL ret; - CERT_POLICIES_INFO *info; - DWORD size; - - ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_POLICIES, - emptySequence, sizeof(emptySequence), CRYPT_DECODE_ALLOC_FLAG, NULL, - &info, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(info->cPolicyInfo == 0, "unexpected policy info %d\n", - info->cPolicyInfo); - LocalFree(info); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_POLICIES, - policiesWithAnyPolicy, sizeof(policiesWithAnyPolicy), - CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(info->cPolicyInfo == 1, "unexpected policy info %d\n", - info->cPolicyInfo); - ok(!strcmp(info->rgPolicyInfo[0].pszPolicyIdentifier, oid_any_policy), - "unexpected policy id %s\n", - info->rgPolicyInfo[0].pszPolicyIdentifier); - ok(info->rgPolicyInfo[0].cPolicyQualifier == 0, - "unexpected policy qualifier count %d\n", - info->rgPolicyInfo[0].cPolicyQualifier); - LocalFree(info); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_CERT_POLICIES, - twoPolicies, sizeof(twoPolicies), - CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(info->cPolicyInfo == 2, "unexpected policy info %d\n", - info->cPolicyInfo); - ok(!strcmp(info->rgPolicyInfo[0].pszPolicyIdentifier, oid_any_policy), - "unexpected policy id %s\n", - info->rgPolicyInfo[0].pszPolicyIdentifier); - ok(info->rgPolicyInfo[0].cPolicyQualifier == 0, - "unexpected policy qualifier count %d\n", - info->rgPolicyInfo[0].cPolicyQualifier); - ok(!strcmp(info->rgPolicyInfo[1].pszPolicyIdentifier, oid1), - "unexpected policy id %s\n", - info->rgPolicyInfo[1].pszPolicyIdentifier); - ok(info->rgPolicyInfo[1].cPolicyQualifier == 1, - "unexpected policy qualifier count %d\n", - info->rgPolicyInfo[1].cPolicyQualifier); - ok(!strcmp( - info->rgPolicyInfo[1].rgPolicyQualifier[0].pszPolicyQualifierId, - oid_user_notice), "unexpected policy qualifier id %s\n", - info->rgPolicyInfo[1].rgPolicyQualifier[0].pszPolicyQualifierId); - ok(info->rgPolicyInfo[1].rgPolicyQualifier[0].Qualifier.cbData == - sizeof(noticeWithReference), "unexpected qualifier size %d\n", - info->rgPolicyInfo[1].rgPolicyQualifier[0].Qualifier.cbData); - ok(!memcmp( - info->rgPolicyInfo[1].rgPolicyQualifier[0].Qualifier.pbData, - noticeWithReference, sizeof(noticeWithReference)), - "unexpected qualifier value\n"); - LocalFree(info); - } -} - -static const BYTE policyMappingWithOneMapping[] = { -0x30,0x0a,0x30,0x08,0x06,0x02,0x2a,0x03,0x06,0x02,0x53,0x04 }; -static const BYTE policyMappingWithTwoMappings[] = { -0x30,0x14,0x30,0x08,0x06,0x02,0x2a,0x03,0x06,0x02,0x53,0x04,0x30,0x08,0x06, -0x02,0x2b,0x04,0x06,0x02,0x55,0x06 }; -static const LPCSTR mappingOids[] = { X509_POLICY_MAPPINGS, - szOID_POLICY_MAPPINGS, szOID_LEGACY_POLICY_MAPPINGS }; - -static void test_encodeCertPolicyMappings(DWORD dwEncoding) -{ - static char oid2[] = "2.3.4"; - static char oid3[] = "1.3.4"; - static char oid4[] = "2.5.6"; - BOOL ret; - CERT_POLICY_MAPPINGS_INFO info = { 0 }; - CERT_POLICY_MAPPING mapping[2]; - LPBYTE buf; - DWORD size, i; - - /* Each of the mapping OIDs is equivalent, so check with all of them */ - for (i = 0; i < sizeof(mappingOids) / sizeof(mappingOids[0]); i++) - { - memset(&info, 0, sizeof(info)); - ret = pCryptEncodeObjectEx(dwEncoding, mappingOids[i], &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret || broken(GetLastError() == ERROR_FILE_NOT_FOUND), - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) - { - win_skip("no policy mappings support\n"); - return; - } - if (ret) - { - ok(size == sizeof(emptySequence), "unexpected size %d\n", size); - ok(!memcmp(buf, emptySequence, sizeof(emptySequence)), - "unexpected value\n"); - LocalFree(buf); - } - mapping[0].pszIssuerDomainPolicy = NULL; - mapping[0].pszSubjectDomainPolicy = NULL; - info.cPolicyMapping = 1; - info.rgPolicyMapping = mapping; - SetLastError(0xdeadbeef); - ret = pCryptEncodeObjectEx(dwEncoding, mappingOids[i], &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - mapping[0].pszIssuerDomainPolicy = oid1; - mapping[0].pszSubjectDomainPolicy = oid2; - ret = pCryptEncodeObjectEx(dwEncoding, mappingOids[i], &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(size == sizeof(policyMappingWithOneMapping), - "unexpected size %d\n", size); - ok(!memcmp(buf, policyMappingWithOneMapping, size), - "unexpected value\n"); - LocalFree(buf); - } - mapping[1].pszIssuerDomainPolicy = oid3; - mapping[1].pszSubjectDomainPolicy = oid4; - info.cPolicyMapping = 2; - ret = pCryptEncodeObjectEx(dwEncoding, mappingOids[i], &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(size == sizeof(policyMappingWithTwoMappings), - "unexpected size %d\n", size); - ok(!memcmp(buf, policyMappingWithTwoMappings, size), - "unexpected value\n"); - LocalFree(buf); - } - } -} - -static void test_decodeCertPolicyMappings(DWORD dwEncoding) -{ - DWORD size, i; - CERT_POLICY_MAPPINGS_INFO *info; - BOOL ret; - - /* Each of the mapping OIDs is equivalent, so check with all of them */ - for (i = 0; i < sizeof(mappingOids) / sizeof(mappingOids[0]); i++) - { - ret = pCryptDecodeObjectEx(dwEncoding, mappingOids[i], - emptySequence, sizeof(emptySequence), CRYPT_DECODE_ALLOC_FLAG, NULL, - &info, &size); - ok(ret || broken(GetLastError() == ERROR_FILE_NOT_FOUND), - "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) - { - win_skip("no policy mappings support\n"); - return; - } - if (ret) - { - ok(info->cPolicyMapping == 0, - "expected 0 policy mappings, got %d\n", info->cPolicyMapping); - LocalFree(info); - } - ret = pCryptDecodeObjectEx(dwEncoding, mappingOids[i], - policyMappingWithOneMapping, sizeof(policyMappingWithOneMapping), - CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(info->cPolicyMapping == 1, - "expected 1 policy mappings, got %d\n", info->cPolicyMapping); - ok(!strcmp(info->rgPolicyMapping[0].pszIssuerDomainPolicy, "1.2.3"), - "unexpected issuer policy %s\n", - info->rgPolicyMapping[0].pszIssuerDomainPolicy); - ok(!strcmp(info->rgPolicyMapping[0].pszSubjectDomainPolicy, - "2.3.4"), "unexpected subject policy %s\n", - info->rgPolicyMapping[0].pszSubjectDomainPolicy); - LocalFree(info); - } - ret = pCryptDecodeObjectEx(dwEncoding, mappingOids[i], - policyMappingWithTwoMappings, sizeof(policyMappingWithTwoMappings), - CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(info->cPolicyMapping == 2, - "expected 2 policy mappings, got %d\n", info->cPolicyMapping); - ok(!strcmp(info->rgPolicyMapping[0].pszIssuerDomainPolicy, "1.2.3"), - "unexpected issuer policy %s\n", - info->rgPolicyMapping[0].pszIssuerDomainPolicy); - ok(!strcmp(info->rgPolicyMapping[0].pszSubjectDomainPolicy, - "2.3.4"), "unexpected subject policy %s\n", - info->rgPolicyMapping[0].pszSubjectDomainPolicy); - ok(!strcmp(info->rgPolicyMapping[1].pszIssuerDomainPolicy, "1.3.4"), - "unexpected issuer policy %s\n", - info->rgPolicyMapping[1].pszIssuerDomainPolicy); - ok(!strcmp(info->rgPolicyMapping[1].pszSubjectDomainPolicy, - "2.5.6"), "unexpected subject policy %s\n", - info->rgPolicyMapping[1].pszSubjectDomainPolicy); - LocalFree(info); - } - } -} - -static const BYTE policyConstraintsWithRequireExplicit[] = { -0x30,0x03,0x80,0x01,0x00 }; -static const BYTE policyConstraintsWithInhibitMapping[] = { -0x30,0x03,0x81,0x01,0x01 }; -static const BYTE policyConstraintsWithBoth[] = { -0x30,0x06,0x80,0x01,0x01,0x81,0x01,0x01 }; - -static void test_encodeCertPolicyConstraints(DWORD dwEncoding) -{ - CERT_POLICY_CONSTRAINTS_INFO info = { 0 }; - LPBYTE buf; - DWORD size; - BOOL ret; - - /* Even though RFC 5280 explicitly states CAs must not issue empty - * policy constraints (section 4.2.1.11), the API doesn't prevent it. - */ - ret = pCryptEncodeObjectEx(dwEncoding, X509_POLICY_CONSTRAINTS, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret || broken(GetLastError() == ERROR_FILE_NOT_FOUND), - "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) - { - win_skip("no policy constraints support\n"); - return; - } - if (ret) - { - ok(size == sizeof(emptySequence), "unexpected size %d\n", size); - ok(!memcmp(buf, emptySequence, sizeof(emptySequence)), - "unexpected value\n"); - LocalFree(buf); - } - /* If fRequireExplicitPolicy is set but dwRequireExplicitPolicySkipCerts - * is not, then a skip of 0 is encoded. - */ - info.fRequireExplicitPolicy = TRUE; - ret = pCryptEncodeObjectEx(dwEncoding, X509_POLICY_CONSTRAINTS, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(size == sizeof(policyConstraintsWithRequireExplicit), - "unexpected size %d\n", size); - ok(!memcmp(buf, policyConstraintsWithRequireExplicit, - sizeof(policyConstraintsWithRequireExplicit)), "unexpected value\n"); - LocalFree(buf); - } - /* With inhibit policy mapping */ - info.fRequireExplicitPolicy = FALSE; - info.dwRequireExplicitPolicySkipCerts = 0; - info.fInhibitPolicyMapping = TRUE; - info.dwInhibitPolicyMappingSkipCerts = 1; - ret = pCryptEncodeObjectEx(dwEncoding, X509_POLICY_CONSTRAINTS, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(size == sizeof(policyConstraintsWithInhibitMapping), - "unexpected size %d\n", size); - ok(!memcmp(buf, policyConstraintsWithInhibitMapping, - sizeof(policyConstraintsWithInhibitMapping)), "unexpected value\n"); - LocalFree(buf); - } - /* And with both */ - info.fRequireExplicitPolicy = TRUE; - info.dwRequireExplicitPolicySkipCerts = 1; - ret = pCryptEncodeObjectEx(dwEncoding, X509_POLICY_CONSTRAINTS, &info, - CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); - ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(size == sizeof(policyConstraintsWithBoth), "unexpected size %d\n", - size); - ok(!memcmp(buf, policyConstraintsWithBoth, - sizeof(policyConstraintsWithBoth)), "unexpected value\n"); - LocalFree(buf); - } -} - -static void test_decodeCertPolicyConstraints(DWORD dwEncoding) -{ - CERT_POLICY_CONSTRAINTS_INFO *info; - DWORD size; - BOOL ret; - - /* Again, even though CAs must not issue such constraints, they can be - * decoded. - */ - ret = pCryptDecodeObjectEx(dwEncoding, X509_POLICY_CONSTRAINTS, - emptySequence, sizeof(emptySequence), CRYPT_DECODE_ALLOC_FLAG, NULL, - &info, &size); - ok(ret || broken(GetLastError() == ERROR_FILE_NOT_FOUND), - "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) - { - win_skip("no policy mappings support\n"); - return; - } - if (ret) - { - ok(!info->fRequireExplicitPolicy, - "expected require explicit = FALSE\n"); - ok(!info->fInhibitPolicyMapping, - "expected implicit mapping = FALSE\n"); - LocalFree(info); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_POLICY_CONSTRAINTS, - policyConstraintsWithRequireExplicit, - sizeof(policyConstraintsWithRequireExplicit), CRYPT_DECODE_ALLOC_FLAG, - NULL, &info, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(info->fRequireExplicitPolicy, - "expected require explicit = TRUE\n"); - ok(info->dwRequireExplicitPolicySkipCerts == 0, "expected 0, got %d\n", - info->dwRequireExplicitPolicySkipCerts); - ok(!info->fInhibitPolicyMapping, - "expected implicit mapping = FALSE\n"); - LocalFree(info); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_POLICY_CONSTRAINTS, - policyConstraintsWithInhibitMapping, - sizeof(policyConstraintsWithInhibitMapping), CRYPT_DECODE_ALLOC_FLAG, - NULL, &info, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(!info->fRequireExplicitPolicy, - "expected require explicit = FALSE\n"); - ok(info->fInhibitPolicyMapping, - "expected implicit mapping = TRUE\n"); - ok(info->dwInhibitPolicyMappingSkipCerts == 1, "expected 1, got %d\n", - info->dwInhibitPolicyMappingSkipCerts); - LocalFree(info); - } - ret = pCryptDecodeObjectEx(dwEncoding, X509_POLICY_CONSTRAINTS, - policyConstraintsWithBoth, sizeof(policyConstraintsWithBoth), - CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size); - ok(ret, "CryptDecodeObjectEx failed: %08x\n", GetLastError()); - if (ret) - { - ok(info->fRequireExplicitPolicy, - "expected require explicit = TRUE\n"); - ok(info->dwRequireExplicitPolicySkipCerts == 1, "expected 1, got %d\n", - info->dwRequireExplicitPolicySkipCerts); - ok(info->fInhibitPolicyMapping, - "expected implicit mapping = TRUE\n"); - ok(info->dwInhibitPolicyMappingSkipCerts == 1, "expected 1, got %d\n", - info->dwInhibitPolicyMappingSkipCerts); - LocalFree(info); - } -} - -/* Free *pInfo with HeapFree */ -static void testExportPublicKey(HCRYPTPROV csp, PCERT_PUBLIC_KEY_INFO *pInfo) -{ - BOOL ret; - DWORD size = 0; - HCRYPTKEY key; - - /* This crashes - ret = CryptExportPublicKeyInfoEx(0, 0, 0, NULL, 0, NULL, NULL, NULL); - */ - ret = CryptExportPublicKeyInfoEx(0, 0, 0, NULL, 0, NULL, NULL, &size); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); - ret = CryptExportPublicKeyInfoEx(0, AT_SIGNATURE, 0, NULL, 0, NULL, NULL, - &size); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); - ret = CryptExportPublicKeyInfoEx(0, 0, X509_ASN_ENCODING, NULL, 0, NULL, - NULL, &size); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); - ret = CryptExportPublicKeyInfoEx(0, AT_SIGNATURE, X509_ASN_ENCODING, NULL, - 0, NULL, NULL, &size); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); - /* Test with no key */ - ret = CryptExportPublicKeyInfoEx(csp, AT_SIGNATURE, X509_ASN_ENCODING, NULL, - 0, NULL, NULL, &size); - ok(!ret && GetLastError() == NTE_NO_KEY, "Expected NTE_NO_KEY, got %08x\n", - GetLastError()); - ret = CryptGenKey(csp, AT_SIGNATURE, 0, &key); - ok(ret, "CryptGenKey failed: %08x\n", GetLastError()); - if (ret) - { - ret = CryptExportPublicKeyInfoEx(csp, AT_SIGNATURE, X509_ASN_ENCODING, - NULL, 0, NULL, NULL, &size); - ok(ret, "CryptExportPublicKeyInfoEx failed: %08x\n", GetLastError()); - *pInfo = HeapAlloc(GetProcessHeap(), 0, size); - if (*pInfo) - { - ret = CryptExportPublicKeyInfoEx(csp, AT_SIGNATURE, - X509_ASN_ENCODING, NULL, 0, NULL, *pInfo, &size); - ok(ret, "CryptExportPublicKeyInfoEx failed: %08x\n", - GetLastError()); - if (ret) - { - /* By default (we passed NULL as the OID) the OID is - * szOID_RSA_RSA. - */ - ok(!strcmp((*pInfo)->Algorithm.pszObjId, szOID_RSA_RSA), - "Expected %s, got %s\n", szOID_RSA_RSA, - (*pInfo)->Algorithm.pszObjId); - } - } - } - CryptDestroyKey(key); -} - -static const BYTE expiredCert[] = { 0x30, 0x82, 0x01, 0x33, 0x30, 0x81, 0xe2, - 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0xc4, 0xd7, 0x7f, 0x0e, 0x6f, 0xa6, - 0x8c, 0xaa, 0x47, 0x47, 0x40, 0xe7, 0xb7, 0x0b, 0x4a, 0x7f, 0x30, 0x09, 0x06, - 0x05, 0x2b, 0x0e, 0x03, 0x02, 0x1d, 0x05, 0x00, 0x30, 0x1f, 0x31, 0x1d, 0x30, - 0x1b, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x14, 0x61, 0x72, 0x69, 0x63, 0x40, - 0x63, 0x6f, 0x64, 0x65, 0x77, 0x65, 0x61, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x63, - 0x6f, 0x6d, 0x30, 0x1e, 0x17, 0x0d, 0x36, 0x39, 0x30, 0x31, 0x30, 0x31, 0x30, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x17, 0x0d, 0x37, 0x30, 0x30, 0x31, 0x30, - 0x31, 0x30, 0x36, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x1f, 0x31, 0x1d, 0x30, - 0x1b, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x14, 0x61, 0x72, 0x69, 0x63, 0x40, - 0x63, 0x6f, 0x64, 0x65, 0x77, 0x65, 0x61, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x63, - 0x6f, 0x6d, 0x30, 0x5c, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, - 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x4b, 0x00, 0x30, 0x48, 0x02, 0x41, - 0x00, 0xa1, 0xaf, 0x4a, 0xea, 0xa7, 0x83, 0x57, 0xc0, 0x37, 0x33, 0x7e, 0x29, - 0x5e, 0x0d, 0xfc, 0x44, 0x74, 0x3a, 0x1d, 0xc3, 0x1b, 0x1d, 0x96, 0xed, 0x4e, - 0xf4, 0x1b, 0x98, 0xec, 0x69, 0x1b, 0x04, 0xea, 0x25, 0xcf, 0xb3, 0x2a, 0xf5, - 0xd9, 0x22, 0xd9, 0x8d, 0x08, 0x39, 0x81, 0xc6, 0xe0, 0x4f, 0x12, 0x37, 0x2a, - 0x3f, 0x80, 0xa6, 0x6c, 0x67, 0x43, 0x3a, 0xdd, 0x95, 0x0c, 0xbb, 0x2f, 0x6b, - 0x02, 0x03, 0x01, 0x00, 0x01, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02, - 0x1d, 0x05, 0x00, 0x03, 0x41, 0x00, 0x8f, 0xa2, 0x5b, 0xd6, 0xdf, 0x34, 0xd0, - 0xa2, 0xa7, 0x47, 0xf1, 0x13, 0x79, 0xd3, 0xf3, 0x39, 0xbd, 0x4e, 0x2b, 0xa3, - 0xf4, 0x63, 0x37, 0xac, 0x5a, 0x0c, 0x5e, 0x4d, 0x0d, 0x54, 0x87, 0x4f, 0x31, - 0xfb, 0xa0, 0xce, 0x8f, 0x9a, 0x2f, 0x4d, 0x48, 0xc6, 0x84, 0x8d, 0xf5, 0x70, - 0x74, 0x17, 0xa5, 0xf3, 0x66, 0x47, 0x06, 0xd6, 0x64, 0x45, 0xbc, 0x52, 0xef, - 0x49, 0xe5, 0xf9, 0x65, 0xf3 }; - -static void testImportPublicKey(HCRYPTPROV csp, PCERT_PUBLIC_KEY_INFO info) -{ - BOOL ret; - HCRYPTKEY key; - PCCERT_CONTEXT context; - DWORD dwSize; - ALG_ID ai; - - /* These crash - ret = CryptImportPublicKeyInfoEx(0, 0, NULL, 0, 0, NULL, NULL); - ret = CryptImportPublicKeyInfoEx(0, 0, NULL, 0, 0, NULL, &key); - ret = CryptImportPublicKeyInfoEx(0, 0, info, 0, 0, NULL, NULL); - ret = CryptImportPublicKeyInfoEx(csp, X509_ASN_ENCODING, info, 0, 0, NULL, - NULL); - */ - ret = CryptImportPublicKeyInfoEx(0, 0, info, 0, 0, NULL, &key); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - ret = CryptImportPublicKeyInfoEx(csp, 0, info, 0, 0, NULL, &key); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - ret = CryptImportPublicKeyInfoEx(0, X509_ASN_ENCODING, info, 0, 0, NULL, - &key); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); - - /* Export key with standard algorithm (CALG_RSA_KEYX) */ - ret = CryptImportPublicKeyInfoEx(csp, X509_ASN_ENCODING, info, 0, 0, NULL, - &key); - ok(ret, "CryptImportPublicKeyInfoEx failed: %08x\n", GetLastError()); - - dwSize = sizeof(ai); - CryptGetKeyParam(key, KP_ALGID, (LPVOID)&ai, &dwSize, 0); - ok(ret, "CryptGetKeyParam failed: %08x\n", GetLastError()); - if(ret) - { - ok(dwSize == sizeof(ai), "CryptGetKeyParam returned size %d\n",dwSize); - ok(ai == CALG_RSA_KEYX, "Default ALG_ID is %04x (expected CALG_RSA_KEYX)\n", ai); - } - - CryptDestroyKey(key); - - /* Repeat with forced algorithm */ - ret = CryptImportPublicKeyInfoEx(csp, X509_ASN_ENCODING, info, CALG_RSA_SIGN, 0, NULL, - &key); - ok(ret, "CryptImportPublicKeyInfoEx failed: %08x\n", GetLastError()); - - dwSize = sizeof(ai); - CryptGetKeyParam(key, KP_ALGID, (LPVOID)&ai, &dwSize, 0); - ok(ret, "CryptGetKeyParam failed: %08x\n", GetLastError()); - if(ret) - { - ok(dwSize == sizeof(ai), "CryptGetKeyParam returned size %d\n",dwSize); - ok(ai == CALG_RSA_SIGN, "ALG_ID is %04x (expected CALG_RSA_SIGN)\n", ai); - } - - CryptDestroyKey(key); - - /* Test importing a public key from a certificate context */ - context = CertCreateCertificateContext(X509_ASN_ENCODING, expiredCert, - sizeof(expiredCert)); - ok(context != NULL, "CertCreateCertificateContext failed: %08x\n", - GetLastError()); - if (context) - { - ok(!strcmp(szOID_RSA_RSA, - context->pCertInfo->SubjectPublicKeyInfo.Algorithm.pszObjId), - "Expected %s, got %s\n", szOID_RSA_RSA, - context->pCertInfo->SubjectPublicKeyInfo.Algorithm.pszObjId); - ret = CryptImportPublicKeyInfoEx(csp, X509_ASN_ENCODING, - &context->pCertInfo->SubjectPublicKeyInfo, 0, 0, NULL, &key); - ok(ret, "CryptImportPublicKeyInfoEx failed: %08x\n", GetLastError()); - CryptDestroyKey(key); - CertFreeCertificateContext(context); - } -} - -static const char cspName[] = "WineCryptTemp"; - -static void testPortPublicKeyInfo(void) -{ - HCRYPTPROV csp; - BOOL ret; - PCERT_PUBLIC_KEY_INFO info = NULL; - - /* Just in case a previous run failed, delete this thing */ - CryptAcquireContextA(&csp, cspName, MS_DEF_PROV, PROV_RSA_FULL, - CRYPT_DELETEKEYSET); - ret = CryptAcquireContextA(&csp, cspName, MS_DEF_PROV, PROV_RSA_FULL, - CRYPT_NEWKEYSET); - ok(ret,"CryptAcquireContextA failed\n"); - - testExportPublicKey(csp, &info); - testImportPublicKey(csp, info); - - HeapFree(GetProcessHeap(), 0, info); - CryptReleaseContext(csp, 0); - ret = CryptAcquireContextA(&csp, cspName, MS_DEF_PROV, PROV_RSA_FULL, - CRYPT_DELETEKEYSET); - ok(ret,"CryptAcquireContextA failed\n"); -} - -START_TEST(encode) -{ - static const DWORD encodings[] = { X509_ASN_ENCODING, PKCS_7_ASN_ENCODING, - X509_ASN_ENCODING | PKCS_7_ASN_ENCODING }; - HMODULE hCrypt32; - DWORD i; - - hCrypt32 = GetModuleHandleA("crypt32.dll"); - pCryptDecodeObjectEx = (void*)GetProcAddress(hCrypt32, "CryptDecodeObjectEx"); - pCryptEncodeObjectEx = (void*)GetProcAddress(hCrypt32, "CryptEncodeObjectEx"); - if (!pCryptDecodeObjectEx || !pCryptEncodeObjectEx) - { - win_skip("CryptDecodeObjectEx() is not available\n"); - return; - } - - for (i = 0; i < sizeof(encodings) / sizeof(encodings[0]); i++) - { - test_encodeInt(encodings[i]); - test_decodeInt(encodings[i]); - test_encodeEnumerated(encodings[i]); - test_decodeEnumerated(encodings[i]); - test_encodeFiletime(encodings[i]); - test_decodeFiletime(encodings[i]); - test_encodeName(encodings[i]); - test_decodeName(encodings[i]); - test_encodeUnicodeName(encodings[i]); - test_decodeUnicodeName(encodings[i]); - test_encodeNameValue(encodings[i]); - test_decodeNameValue(encodings[i]); - test_encodeUnicodeNameValue(encodings[i]); - test_decodeUnicodeNameValue(encodings[i]); - test_encodeAltName(encodings[i]); - test_decodeAltName(encodings[i]); - test_encodeOctets(encodings[i]); - test_decodeOctets(encodings[i]); - test_encodeBits(encodings[i]); - test_decodeBits(encodings[i]); - test_encodeBasicConstraints(encodings[i]); - test_decodeBasicConstraints(encodings[i]); - test_encodeRsaPublicKey(encodings[i]); - test_decodeRsaPublicKey(encodings[i]); - test_encodeSequenceOfAny(encodings[i]); - test_decodeSequenceOfAny(encodings[i]); - test_encodeExtensions(encodings[i]); - test_decodeExtensions(encodings[i]); - test_encodePublicKeyInfo(encodings[i]); - test_decodePublicKeyInfo(encodings[i]); - test_encodeCertToBeSigned(encodings[i]); - test_decodeCertToBeSigned(encodings[i]); - test_encodeCert(encodings[i]); - test_decodeCert(encodings[i]); - test_encodeCRLDistPoints(encodings[i]); - test_decodeCRLDistPoints(encodings[i]); - test_encodeCRLIssuingDistPoint(encodings[i]); - test_decodeCRLIssuingDistPoint(encodings[i]); - test_encodeCRLToBeSigned(encodings[i]); - test_decodeCRLToBeSigned(encodings[i]); - test_encodeEnhancedKeyUsage(encodings[i]); - test_decodeEnhancedKeyUsage(encodings[i]); - test_encodeAuthorityKeyId(encodings[i]); - test_decodeAuthorityKeyId(encodings[i]); - test_encodeAuthorityKeyId2(encodings[i]); - test_decodeAuthorityKeyId2(encodings[i]); - test_encodeAuthorityInfoAccess(encodings[i]); - test_decodeAuthorityInfoAccess(encodings[i]); - test_encodeCTL(encodings[i]); - test_decodeCTL(encodings[i]); - test_encodePKCSContentInfo(encodings[i]); - test_decodePKCSContentInfo(encodings[i]); - test_encodePKCSAttribute(encodings[i]); - test_decodePKCSAttribute(encodings[i]); - test_encodePKCSAttributes(encodings[i]); - test_decodePKCSAttributes(encodings[i]); - test_encodePKCSSMimeCapabilities(encodings[i]); - test_decodePKCSSMimeCapabilities(encodings[i]); - test_encodePKCSSignerInfo(encodings[i]); - test_decodePKCSSignerInfo(encodings[i]); - test_encodeCMSSignerInfo(encodings[i]); - test_decodeCMSSignerInfo(encodings[i]); - test_encodeNameConstraints(encodings[i]); - test_decodeNameConstraints(encodings[i]); - test_encodePolicyQualifierUserNotice(encodings[i]); - test_decodePolicyQualifierUserNotice(encodings[i]); - test_encodeCertPolicies(encodings[i]); - test_decodeCertPolicies(encodings[i]); - test_encodeCertPolicyMappings(encodings[i]); - test_decodeCertPolicyMappings(encodings[i]); - test_encodeCertPolicyConstraints(encodings[i]); - test_decodeCertPolicyConstraints(encodings[i]); - } - testPortPublicKeyInfo(); -} diff --git a/rostests/winetests/crypt32/main.c b/rostests/winetests/crypt32/main.c deleted file mode 100644 index 7c11e8e2ee3..00000000000 --- a/rostests/winetests/crypt32/main.c +++ /dev/null @@ -1,496 +0,0 @@ -/* - * Miscellaneous crypt32 tests - * - * Copyright 2005 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 - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "wine/test.h" - -HMODULE hCrypt; - -static void test_findAttribute(void) -{ - PCRYPT_ATTRIBUTE ret; - BYTE blobbin[] = {0x02,0x01,0x01}; - static CHAR oid[] = "1.2.3"; - CRYPT_ATTR_BLOB blobs[] = { { sizeof blobbin, blobbin }, }; - CRYPT_ATTRIBUTE attr = { oid, sizeof(blobs) / sizeof(blobs[0]), blobs }; - - /* returns NULL, last error not set */ - SetLastError(0xdeadbeef); - ret = CertFindAttribute(NULL, 0, NULL); - ok(ret == NULL, "Expected failure\n"); - ok(GetLastError() == 0xdeadbeef, "Last error was set to %08x\n", - GetLastError()); - if (0) - { - /* crashes */ - SetLastError(0xdeadbeef); - ret = CertFindAttribute(NULL, 1, NULL); - /* returns NULL, last error is ERROR_INVALID_PARAMETER - * crashes on Vista - */ - SetLastError(0xdeadbeef); - ret = CertFindAttribute(NULL, 1, &attr); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d (%08x)\n", GetLastError(), - GetLastError()); - } - /* returns NULL, last error not set */ - SetLastError(0xdeadbeef); - ret = CertFindAttribute("bogus", 1, &attr); - ok(ret == NULL, "Expected failure\n"); - ok(GetLastError() == 0xdeadbeef, "Last error was set to %08x\n", - GetLastError()); - /* returns NULL, last error not set */ - SetLastError(0xdeadbeef); - ret = CertFindAttribute("1.2.4", 1, &attr); - ok(ret == NULL, "Expected failure\n"); - ok(GetLastError() == 0xdeadbeef, "Last error was set to %08x\n", - GetLastError()); - /* succeeds, last error not set */ - SetLastError(0xdeadbeef); - ret = CertFindAttribute("1.2.3", 1, &attr); - ok(ret != NULL, "CertFindAttribute failed: %08x\n", GetLastError()); -} - -static void test_findExtension(void) -{ - PCERT_EXTENSION ret; - static CHAR oid[] = "1.2.3"; - BYTE blobbin[] = {0x02,0x01,0x01}; - CERT_EXTENSION ext = { oid, TRUE, { sizeof blobbin, blobbin } }; - - /* returns NULL, last error not set */ - SetLastError(0xdeadbeef); - ret = CertFindExtension(NULL, 0, NULL); - ok(ret == NULL, "Expected failure\n"); - ok(GetLastError() == 0xdeadbeef, "Last error was set to %08x\n", - GetLastError()); - if (0) - { - /* crashes */ - SetLastError(0xdeadbeef); - ret = CertFindExtension(NULL, 1, NULL); - /* returns NULL, last error is ERROR_INVALID_PARAMETER - * crashes on Vista - */ - SetLastError(0xdeadbeef); - ret = CertFindExtension(NULL, 1, &ext); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d (%08x)\n", GetLastError(), - GetLastError()); - } - /* returns NULL, last error not set */ - SetLastError(0xdeadbeef); - ret = CertFindExtension("bogus", 1, &ext); - ok(ret == NULL, "Expected failure\n"); - ok(GetLastError() == 0xdeadbeef, "Last error was set to %08x\n", - GetLastError()); - /* returns NULL, last error not set */ - SetLastError(0xdeadbeef); - ret = CertFindExtension("1.2.4", 1, &ext); - ok(ret == NULL, "Expected failure\n"); - ok(GetLastError() == 0xdeadbeef, "Last error was set to %08x\n", - GetLastError()); - /* succeeds, last error not set */ - SetLastError(0xdeadbeef); - ret = CertFindExtension("1.2.3", 1, &ext); - ok(ret != NULL, "CertFindExtension failed: %08x\n", GetLastError()); -} - -static void test_findRDNAttr(void) -{ - PCERT_RDN_ATTR ret; - static CHAR oid[] = "1.2.3"; - BYTE bin[] = { 0x16,0x09,'J','u','a','n',' ','L','a','n','g' }; - CERT_RDN_ATTR attrs[] = { - { oid, CERT_RDN_IA5_STRING, { sizeof bin, bin } }, - }; - CERT_RDN rdns[] = { - { sizeof(attrs) / sizeof(attrs[0]), attrs }, - }; - CERT_NAME_INFO nameInfo = { sizeof(rdns) / sizeof(rdns[0]), rdns }; - - if (0) - { - /* crashes */ - SetLastError(0xdeadbeef); - ret = CertFindRDNAttr(NULL, NULL); - /* returns NULL, last error is ERROR_INVALID_PARAMETER - * crashes on Vista - */ - SetLastError(0xdeadbeef); - ret = CertFindRDNAttr(NULL, &nameInfo); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d (%08x)\n", GetLastError(), - GetLastError()); - } - /* returns NULL, last error not set */ - SetLastError(0xdeadbeef); - ret = CertFindRDNAttr("bogus", &nameInfo); - ok(ret == NULL, "Expected failure\n"); - ok(GetLastError() == 0xdeadbeef, "Last error was set to %08x\n", - GetLastError()); - /* returns NULL, last error not set */ - SetLastError(0xdeadbeef); - ret = CertFindRDNAttr("1.2.4", &nameInfo); - ok(ret == NULL, "Expected failure\n"); - ok(GetLastError() == 0xdeadbeef, "Last error was set to %08x\n", - GetLastError()); - /* succeeds, last error not set */ - SetLastError(0xdeadbeef); - ret = CertFindRDNAttr("1.2.3", &nameInfo); - ok(ret != NULL, "CertFindRDNAttr failed: %08x\n", GetLastError()); -} - -static void test_verifyTimeValidity(void) -{ - SYSTEMTIME sysTime; - FILETIME fileTime; - CERT_INFO info = { 0 }; - LONG ret; - - GetSystemTime(&sysTime); - SystemTimeToFileTime(&sysTime, &fileTime); - /* crashes - ret = CertVerifyTimeValidity(NULL, NULL); - ret = CertVerifyTimeValidity(&fileTime, NULL); - */ - /* Check with 0 NotBefore and NotAfter */ - ret = CertVerifyTimeValidity(&fileTime, &info); - ok(ret == 1, "Expected 1, got %d\n", ret); - memcpy(&info.NotAfter, &fileTime, sizeof(info.NotAfter)); - /* Check with NotAfter equal to comparison time */ - ret = CertVerifyTimeValidity(&fileTime, &info); - ok(ret == 0, "Expected 0, got %d\n", ret); - /* Check with NotBefore after comparison time */ - memcpy(&info.NotBefore, &fileTime, sizeof(info.NotBefore)); - info.NotBefore.dwLowDateTime += 5000; - ret = CertVerifyTimeValidity(&fileTime, &info); - ok(ret == -1, "Expected -1, got %d\n", ret); -} - -static void test_cryptAllocate(void) -{ - LPVOID buf; - - buf = CryptMemAlloc(0); - ok(buf != NULL, "CryptMemAlloc failed: %08x\n", GetLastError()); - CryptMemFree(buf); - /* CryptMemRealloc(NULL, 0) fails pre-Vista */ - buf = CryptMemAlloc(0); - buf = CryptMemRealloc(buf, 1); - ok(buf != NULL, "CryptMemRealloc failed: %08x\n", GetLastError()); - CryptMemFree(buf); -} - -typedef DWORD (WINAPI *I_CryptAllocTlsFunc)(void); -typedef LPVOID (WINAPI *I_CryptDetachTlsFunc)(DWORD dwTlsIndex); -typedef LPVOID (WINAPI *I_CryptGetTlsFunc)(DWORD dwTlsIndex); -typedef BOOL (WINAPI *I_CryptSetTlsFunc)(DWORD dwTlsIndex, LPVOID lpTlsValue); -typedef BOOL (WINAPI *I_CryptFreeTlsFunc)(DWORD dwTlsIndex, DWORD unknown); - -static I_CryptAllocTlsFunc pI_CryptAllocTls; -static I_CryptDetachTlsFunc pI_CryptDetachTls; -static I_CryptGetTlsFunc pI_CryptGetTls; -static I_CryptSetTlsFunc pI_CryptSetTls; -static I_CryptFreeTlsFunc pI_CryptFreeTls; - -static void test_cryptTls(void) -{ - DWORD index; - BOOL ret; - - pI_CryptAllocTls = (I_CryptAllocTlsFunc)GetProcAddress(hCrypt, - "I_CryptAllocTls"); - pI_CryptDetachTls = (I_CryptDetachTlsFunc)GetProcAddress(hCrypt, - "I_CryptDetachTls"); - pI_CryptGetTls = (I_CryptGetTlsFunc)GetProcAddress(hCrypt, - "I_CryptGetTls"); - pI_CryptSetTls = (I_CryptSetTlsFunc)GetProcAddress(hCrypt, - "I_CryptSetTls"); - pI_CryptFreeTls = (I_CryptFreeTlsFunc)GetProcAddress(hCrypt, - "I_CryptFreeTls"); - - /* One normal pass */ - index = pI_CryptAllocTls(); - ok(index, "I_CryptAllocTls failed: %08x\n", GetLastError()); - if (index) - { - LPVOID ptr; - - ptr = pI_CryptGetTls(index); - ok(!ptr, "Expected NULL\n"); - ret = pI_CryptSetTls(index, (LPVOID)0xdeadbeef); - ok(ret, "I_CryptSetTls failed: %08x\n", GetLastError()); - ptr = pI_CryptGetTls(index); - ok(ptr == (LPVOID)0xdeadbeef, "Expected 0xdeadbeef, got %p\n", ptr); - /* This crashes - ret = pI_CryptFreeTls(index, 1); - */ - ret = pI_CryptFreeTls(index, 0); - ok(ret, "I_CryptFreeTls failed: %08x\n", GetLastError()); - ret = pI_CryptFreeTls(index, 0); - ok(!ret, "I_CryptFreeTls succeeded\n"); - ok(GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - } - /* Similar pass, check I_CryptDetachTls */ - index = pI_CryptAllocTls(); - ok(index, "I_CryptAllocTls failed: %08x\n", GetLastError()); - if (index) - { - LPVOID ptr; - - ptr = pI_CryptGetTls(index); - ok(!ptr, "Expected NULL\n"); - ret = pI_CryptSetTls(index, (LPVOID)0xdeadbeef); - ok(ret, "I_CryptSetTls failed: %08x\n", GetLastError()); - ptr = pI_CryptGetTls(index); - ok(ptr == (LPVOID)0xdeadbeef, "Expected 0xdeadbeef, got %p\n", ptr); - ptr = pI_CryptDetachTls(index); - ok(ptr == (LPVOID)0xdeadbeef, "Expected 0xdeadbeef, got %p\n", ptr); - ptr = pI_CryptGetTls(index); - ok(!ptr, "Expected NULL\n"); - } -} - -typedef BOOL (WINAPI *I_CryptReadTrustedPublisherDWORDValueFromRegistryFunc) - (LPCWSTR, DWORD *); - -static void test_readTrustedPublisherDWORD(void) -{ - I_CryptReadTrustedPublisherDWORDValueFromRegistryFunc pReadDWORD; - - pReadDWORD = - (I_CryptReadTrustedPublisherDWORDValueFromRegistryFunc)GetProcAddress( - hCrypt, "I_CryptReadTrustedPublisherDWORDValueFromRegistry"); - if (pReadDWORD) - { - static const WCHAR safer[] = { - 'S','o','f','t','w','a','r','e','\\', - 'P','o','l','i','c','i','e','s','\\', - 'M','i','c','r','o','s','o','f','t','\\','S','y','s','t','e','m', - 'C','e','r','t','i','f','i','c','a','t','e','s','\\', - 'T','r','u','s','t','e','d','P','u','b','l','i','s','h','e','r', - '\\','S','a','f','e','r',0 }; - static const WCHAR authenticodeFlags[] = { 'A','u','t','h','e','n', - 't','i','c','o','d','e','F','l','a','g','s',0 }; - BOOL ret, exists = FALSE; - DWORD size, readFlags = 0, returnedFlags; - HKEY key; - LONG rc; - - rc = RegOpenKeyW(HKEY_LOCAL_MACHINE, safer, &key); - if (rc == ERROR_SUCCESS) - { - size = sizeof(readFlags); - rc = RegQueryValueExW(key, authenticodeFlags, NULL, NULL, - (LPBYTE)&readFlags, &size); - if (rc == ERROR_SUCCESS) - exists = TRUE; - } - returnedFlags = 0xdeadbeef; - ret = pReadDWORD(authenticodeFlags, &returnedFlags); - ok(ret == exists, "Unexpected return value\n"); - ok(readFlags == returnedFlags, - "Expected flags %08x, got %08x\n", readFlags, returnedFlags); - } -} - -typedef HCRYPTPROV (WINAPI *I_CryptGetDefaultCryptProvFunc)(DWORD w); - -static void test_getDefaultCryptProv(void) -{ - I_CryptGetDefaultCryptProvFunc pI_CryptGetDefaultCryptProv; - HCRYPTPROV prov; - - pI_CryptGetDefaultCryptProv = (I_CryptGetDefaultCryptProvFunc) - GetProcAddress(hCrypt, "I_CryptGetDefaultCryptProv"); - if (!pI_CryptGetDefaultCryptProv) return; - - prov = pI_CryptGetDefaultCryptProv(0xdeadbeef); - ok(prov == 0 && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - prov = pI_CryptGetDefaultCryptProv(PROV_RSA_FULL); - ok(prov == 0 && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - prov = pI_CryptGetDefaultCryptProv(1); - ok(prov == 0 && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - prov = pI_CryptGetDefaultCryptProv(0); - ok(prov != 0, "I_CryptGetDefaultCryptProv failed: %08x\n", GetLastError()); - CryptReleaseContext(prov, 0); -} - -typedef int (WINAPI *I_CryptInstallOssGlobal)(DWORD,DWORD,DWORD); - -static void test_CryptInstallOssGlobal(void) -{ - int ret,i; - I_CryptInstallOssGlobal pI_CryptInstallOssGlobal; - - pI_CryptInstallOssGlobal= (I_CryptInstallOssGlobal)GetProcAddress(hCrypt,"I_CryptInstallOssGlobal"); - /* passing in some random values to I_CryptInstallOssGlobal, it always returns 9 the first time, then 10, 11 etc.*/ - for(i=0;i<30;i++) - { - ret = pI_CryptInstallOssGlobal(rand(),rand(),rand()); - ok((9+i) == ret || - ret == 0, /* Vista */ - "Expected %d or 0, got %d\n",(9+i),ret); - } -} - -static BOOL (WINAPI *pCryptFormatObject)(DWORD dwEncoding, DWORD dwFormatType, - DWORD dwFormatStrType, void *pFormatStruct, LPCSTR lpszStructType, - const BYTE *pbEncoded, DWORD dwEncoded, void *pbFormat, DWORD *pcbFormat); - -static const BYTE encodedInt[] = { 0x02,0x01,0x01 }; -static const WCHAR encodedIntStr[] = { '0','2',' ','0','1',' ','0','1',0 }; -static const BYTE encodedBigInt[] = { 0x02,0x1f,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 }; -static const WCHAR encodedBigIntStr[] = { '0','2',' ','1','f',' ','0','1',' ', - '0','2',' ','0','3',' ','0','4',' ','0','5',' ','0','6',' ','0','7',' ','0', - '8',' ','0','9',' ','0','a',' ','0','b',' ','0','c',' ','0','d',' ','0','e', - ' ','0','f',' ','1','0',' ','1','1',' ','1','2',' ','1','3',' ','1','4',' ', - '1','5',' ','1','6',' ','1','7',' ','1','8',' ','1','9',' ','1','a',' ','1', - 'b',' ','1','c',' ','1','d',' ','1','e',' ','1','f',0 }; - -static void test_format_object(void) -{ - BOOL ret; - DWORD size; - LPWSTR str; - - pCryptFormatObject = (void *)GetProcAddress(hCrypt, "CryptFormatObject"); - if (!pCryptFormatObject) - { - skip("No CryptFormatObject\n"); - return; - } - /* Crash */ - if (0) - { - ret = pCryptFormatObject(0, 0, 0, NULL, NULL, NULL, 0, NULL, NULL); - } - /* When called with any but the default encoding, it fails to find a - * formatting function. - */ - SetLastError(0xdeadbeef); - ret = pCryptFormatObject(0, 0, 0, NULL, NULL, NULL, 0, NULL, &size); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - /* When called with the default encoding type for any undefined struct type - * (including none), it succeeds: the default encoding is a hex string - * encoding. - */ - SetLastError(0xdeadbeef); - ret = pCryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, NULL, NULL, 0, - NULL, &size); - ok(ret, "CryptFormatObject failed: %d\n", GetLastError()); - if (ret) - { - if (size == 0 && GetLastError() == ERROR_FILE_NOT_FOUND) - { - win_skip("CryptFormatObject has no default implementation\n"); - return; - } - ok(size == sizeof(WCHAR), "unexpected size %d\n", size); - str = HeapAlloc(GetProcessHeap(), 0, size); - SetLastError(0xdeadbeef); - size = 0; - ret = pCryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, NULL, NULL, 0, - str, &size); - ok(!ret && GetLastError() == ERROR_MORE_DATA, - "expected ERROR_MORE_DATA, got %d\n", GetLastError()); - size = sizeof(WCHAR); - ret = pCryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, NULL, NULL, 0, - str, &size); - ok(ret, "CryptFormatObject failed: %d\n", GetLastError()); - ok(!str[0], "expected empty string\n"); - HeapFree(GetProcessHeap(), 0, str); - } - ret = pCryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, NULL, encodedInt, - sizeof(encodedInt), NULL, &size); - ok(ret, "CryptFormatObject failed: %d\n", GetLastError()); - if (ret) - { - str = HeapAlloc(GetProcessHeap(), 0, size); - ret = pCryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, NULL, - encodedInt, sizeof(encodedInt), str, &size); - ok(ret, "CryptFormatObject failed: %d\n", GetLastError()); - ok(!lstrcmpW(str, encodedIntStr), "unexpected format string\n"); - HeapFree(GetProcessHeap(), 0, str); - } - ret = pCryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, NULL, - encodedBigInt, sizeof(encodedBigInt), NULL, &size); - ok(ret, "CryptFormatObject failed: %d\n", GetLastError()); - if (ret) - { - str = HeapAlloc(GetProcessHeap(), 0, size); - ret = pCryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, NULL, - encodedBigInt, sizeof(encodedBigInt), str, &size); - ok(ret, "CryptFormatObject failed: %d\n", GetLastError()); - ok(!lstrcmpiW(str, encodedBigIntStr), "unexpected format string\n"); - HeapFree(GetProcessHeap(), 0, str); - } - /* When called with the default encoding type for any undefined struct - * type but CRYPT_FORMAT_STR_NO_HEX specified, it fails to find a - * formatting function. - */ - SetLastError(0xdeadbeef); - ret = pCryptFormatObject(X509_ASN_ENCODING, 0, CRYPT_FORMAT_STR_NO_HEX, - NULL, NULL, NULL, 0, NULL, &size); - ok(!ret, "CryptFormatObject succeeded\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND || - GetLastError() == 0xdeadbeef, /* Vista, W2K8 */ - "expected ERROR_FILE_NOT_FOUND or no change, got %d\n", GetLastError()); - /* When called to format an AUTHORITY_KEY_ID2_INFO, it fails when no - * data are given. - */ - SetLastError(0xdeadbeef); - ret = pCryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, - szOID_AUTHORITY_KEY_IDENTIFIER2, NULL, 0, NULL, &size); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %d\n", GetLastError()); -} - -START_TEST(main) -{ - hCrypt = GetModuleHandleA("crypt32.dll"); - - test_findAttribute(); - test_findExtension(); - test_findRDNAttr(); - test_verifyTimeValidity(); - test_cryptAllocate(); - test_cryptTls(); - test_readTrustedPublisherDWORD(); - test_getDefaultCryptProv(); - test_CryptInstallOssGlobal(); - test_format_object(); -} diff --git a/rostests/winetests/crypt32/message.c b/rostests/winetests/crypt32/message.c deleted file mode 100644 index fa8df0e5951..00000000000 --- a/rostests/winetests/crypt32/message.c +++ /dev/null @@ -1,721 +0,0 @@ -/* - * Unit test suite for crypt32.dll's Crypt*Message functions - * - * Copyright 2007-2008 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 - */ - -#include -#include -#include -#include -#include -#include - -#include "wine/test.h" - -static const BYTE dataEmptyBareContent[] = { 0x04,0x00 }; -static const BYTE dataEmptyContent[] = { -0x30,0x0f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x02, -0x04,0x00 }; -static const BYTE signedEmptyBareContent[] = { -0x30,0x50,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86, -0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x02,0x06,0x00,0x31,0x37,0x30,0x35,0x02, -0x01,0x01,0x30,0x1a,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03, -0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01, -0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30, -0x04,0x06,0x00,0x05,0x00,0x04,0x00 }; -static const BYTE signedEmptyContent[] = { -0x30,0x5f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0,0x52, -0x30,0x50,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86, -0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x02,0x06,0x00,0x31,0x37,0x30,0x35,0x02, -0x01,0x01,0x30,0x1a,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03, -0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01, -0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30, -0x04,0x06,0x00,0x05,0x00,0x04,0x00 }; - -static void test_msg_get_signer_count(void) -{ - LONG count; - - SetLastError(0xdeadbeef); - count = CryptGetMessageSignerCount(0, NULL, 0); - ok(count == -1, "Expected -1, got %d\n", count); - ok(GetLastError() == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", - GetLastError()); - SetLastError(0xdeadbeef); - count = CryptGetMessageSignerCount(PKCS_7_ASN_ENCODING, NULL, 0); - ok(count == -1, "Expected -1, got %d\n", count); - ok(GetLastError() == CRYPT_E_ASN1_EOD || - GetLastError() == OSS_BAD_ARG, /* win9x */ - "Expected CRYPT_E_ASN1_EOD, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - count = CryptGetMessageSignerCount(PKCS_7_ASN_ENCODING, - dataEmptyBareContent, sizeof(dataEmptyBareContent)); - ok(count == -1, "Expected -1, got %d\n", count); - ok(GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == OSS_PDU_MISMATCH, /* win9x */ - "Expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - count = CryptGetMessageSignerCount(PKCS_7_ASN_ENCODING, - dataEmptyContent, sizeof(dataEmptyContent)); - ok(count == -1, "Expected -1, got %d\n", count); - ok(GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - count = CryptGetMessageSignerCount(PKCS_7_ASN_ENCODING, - signedEmptyBareContent, sizeof(signedEmptyBareContent)); - ok(count == -1, "Expected -1, got %d\n", count); - ok(GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == OSS_DATA_ERROR, /* win9x */ - "Expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError()); - count = CryptGetMessageSignerCount(PKCS_7_ASN_ENCODING, - signedEmptyContent, sizeof(signedEmptyContent)); - ok(count == 1 || - broken(count == -1), /* win9x */ - "Expected 1, got %d\n", count); -} - -static BYTE detachedHashContent[] = { -0x30,0x3f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x05,0xa0,0x32, -0x30,0x30,0x02,0x01,0x00,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x02,0x05,0x05,0x00,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x07,0x01,0x04,0x10,0x08,0xd6,0xc0,0x5a,0x21,0x51,0x2a,0x79,0xa1,0xdf,0xeb, -0x9d,0x2a,0x8f,0x26,0x2f }; -static const BYTE msgData[] = { 1, 2, 3, 4 }; - -static void test_verify_detached_message_hash(void) -{ - BOOL ret; - CRYPT_HASH_MESSAGE_PARA para; - DWORD size, hashSize; - const BYTE *pMsgData = msgData; - BYTE hash[16]; - - if (0) - { - ret = CryptVerifyDetachedMessageHash(NULL, NULL, 0, 0, NULL, NULL, NULL, - NULL); - } - memset(¶, 0, sizeof(para)); - SetLastError(0xdeadbeef); - ret = CryptVerifyDetachedMessageHash(¶, NULL, 0, 0, NULL, NULL, NULL, - NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - para.cbSize = sizeof(para); - SetLastError(0xdeadbeef); - ret = CryptVerifyDetachedMessageHash(¶, NULL, 0, 0, NULL, NULL, NULL, - NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - para.dwMsgEncodingType = PKCS_7_ASN_ENCODING; - SetLastError(0xdeadbeef); - ret = CryptVerifyDetachedMessageHash(¶, NULL, 0, 0, NULL, NULL, NULL, - NULL); - ok(!ret && - (GetLastError() == CRYPT_E_ASN1_EOD || - GetLastError() == OSS_BAD_ARG), /* win9x */ - "expected CRYPT_E_ASN1_EOD, got %08x\n", GetLastError()); - para.dwMsgEncodingType = X509_ASN_ENCODING; - SetLastError(0xdeadbeef); - ret = CryptVerifyDetachedMessageHash(¶, NULL, 0, 0, NULL, NULL, NULL, - NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - para.dwMsgEncodingType = X509_ASN_ENCODING | PKCS_7_ASN_ENCODING; - SetLastError(0xdeadbeef); - ret = CryptVerifyDetachedMessageHash(¶, NULL, 0, 0, NULL, NULL, NULL, - NULL); - ok(!ret && - (GetLastError() == CRYPT_E_ASN1_EOD || - GetLastError() == OSS_BAD_ARG), /* win9x */ - "expected CRYPT_E_ASN1_EOD, got %08x\n", GetLastError()); - /* Curiously, passing no data to hash succeeds.. */ - ret = CryptVerifyDetachedMessageHash(¶, detachedHashContent, - sizeof(detachedHashContent), 0, NULL, NULL, NULL, NULL); - todo_wine - ok(ret, "CryptVerifyDetachedMessageHash failed: %08x\n", GetLastError()); - /* as does passing the actual content of the message to hash.. */ - size = sizeof(msgData); - pMsgData = msgData; - ret = CryptVerifyDetachedMessageHash(¶, detachedHashContent, - sizeof(detachedHashContent), 1, &pMsgData, &size, NULL, NULL); - ok(ret, "CryptVerifyDetachedMessageHash failed: %08x\n", GetLastError()); - /* while passing data to hash that isn't the content of the message fails. - */ - size = sizeof(detachedHashContent); - pMsgData = detachedHashContent; - SetLastError(0xdeadbeef); - ret = CryptVerifyDetachedMessageHash(¶, detachedHashContent, - sizeof(detachedHashContent), 1, &pMsgData, &size, NULL, NULL); - ok(!ret && GetLastError() == CRYPT_E_HASH_VALUE, - "expected CRYPT_E_HASH_VALUE, got %08x\n", GetLastError()); - /* Getting the size of the hash while passing no hash data causes the - * hash to be checked (and fail.) - */ - SetLastError(0xdeadbeef); - ret = CryptVerifyDetachedMessageHash(¶, detachedHashContent, - sizeof(detachedHashContent), 0, NULL, NULL, NULL, &hashSize); - ok(!ret && GetLastError() == CRYPT_E_HASH_VALUE, - "expected CRYPT_E_HASH_VALUE, got %08x\n", GetLastError()); - size = sizeof(msgData); - pMsgData = msgData; - ret = CryptVerifyDetachedMessageHash(¶, detachedHashContent, - sizeof(detachedHashContent), 1, &pMsgData, &size, NULL, &hashSize); - ok(ret, "CryptVerifyDetachedMessageHash failed: %08x\n", GetLastError()); - ok(hashSize == sizeof(hash), "unexpected size %d\n", hashSize); - hashSize = 1; - SetLastError(0xdeadbeef); - ret = CryptVerifyDetachedMessageHash(¶, detachedHashContent, - sizeof(detachedHashContent), 1, &pMsgData, &size, hash, &hashSize); - ok(!ret && GetLastError() == ERROR_MORE_DATA, - "expected ERROR_MORE_DATA, got %08x\n", GetLastError()); - hashSize = sizeof(hash); - ret = CryptVerifyDetachedMessageHash(¶, detachedHashContent, - sizeof(detachedHashContent), 1, &pMsgData, &size, hash, &hashSize); - ok(ret, "CryptVerifyDetachedMessageHash failed: %08x\n", GetLastError()); -} - -static BYTE hashContent[] = { -0x30,0x47,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x05,0xa0,0x3a, -0x30,0x38,0x02,0x01,0x00,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x02,0x05,0x05,0x00,0x30,0x13,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x07,0x01,0xa0,0x06,0x04,0x04,0x01,0x02,0x03,0x04,0x04,0x10,0x08,0xd6,0xc0, -0x5a,0x21,0x51,0x2a,0x79,0xa1,0xdf,0xeb,0x9d,0x2a,0x8f,0x26,0x2f }; - -static void test_verify_message_hash(void) -{ - BOOL ret; - CRYPT_HASH_MESSAGE_PARA para; - DWORD size; - BYTE *buf = NULL; - - memset(¶, 0, sizeof(para)); - /* Crash */ - if (0) - ret = CryptVerifyMessageHash(NULL, NULL, 0, NULL, NULL, NULL, NULL); - SetLastError(0xdeadbeef); - ret = CryptVerifyMessageHash(¶, NULL, 0, NULL, NULL, NULL, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - para.cbSize = sizeof(para); - SetLastError(0xdeadbeef); - ret = CryptVerifyMessageHash(¶, NULL, 0, NULL, NULL, NULL, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - para.dwMsgEncodingType = PKCS_7_ASN_ENCODING; - SetLastError(0xdeadbeef); - ret = CryptVerifyMessageHash(¶, NULL, 0, NULL, NULL, NULL, NULL); - ok(!ret, "Expected 0, got %d\n", ret); - ok(GetLastError() == CRYPT_E_ASN1_EOD || - GetLastError() == OSS_BAD_ARG, /* win98 */ - "Expected CRYPT_E_ASN1_EOD or OSS_BAD_ARG, got %08x\n", GetLastError()); - /* Verifying the hash of a detached message succeeds? */ - ret = CryptVerifyMessageHash(¶, detachedHashContent, - sizeof(detachedHashContent), NULL, NULL, NULL, NULL); - todo_wine - ok(ret, "CryptVerifyMessageHash failed: %08x\n", GetLastError()); - /* As does verifying the hash of a regular message. */ - ret = CryptVerifyMessageHash(¶, hashContent, sizeof(hashContent), - NULL, NULL, NULL, NULL); - ok(ret, "CryptVerifyMessageHash failed: %08x\n", GetLastError()); - ret = CryptVerifyMessageHash(¶, hashContent, sizeof(hashContent), - NULL, &size, NULL, NULL); - ok(ret, "CryptVerifyMessageHash failed: %08x\n", GetLastError()); - if (ret) - buf = CryptMemAlloc(size); - if (buf) - { - size = 1; - ret = CryptVerifyMessageHash(¶, hashContent, sizeof(hashContent), - buf, &size, NULL, NULL); - ok(!ret && GetLastError() == ERROR_MORE_DATA, - "expected ERROR_MORE_DATA, got %08x\n", GetLastError()); - ret = CryptVerifyMessageHash(¶, hashContent, sizeof(hashContent), - buf, &size, NULL, NULL); - ok(ret, "CryptVerifyMessageHash failed: %08x\n", GetLastError()); - ok(size == sizeof(msgData), "unexpected size %d\n", size); - ok(!memcmp(buf, msgData, size), "unexpected value\n"); - CryptMemFree(buf); - } -} - -static const BYTE signedWithCertContent[] = { -0x30,0x82,0x01,0x32,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02, -0xa0,0x82,0x01,0x23,0x30,0x82,0x01,0x1f,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c, -0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x13,0x06, -0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x06,0x04,0x04,0x01, -0x02,0x03,0x04,0xa0,0x7c,0x30,0x7a,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30, -0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61, -0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31, -0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36, -0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15, -0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e, -0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00, -0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04, -0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01,0x31,0x77,0x30,0x75,0x02,0x01, -0x01,0x30,0x1a,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13, -0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30, -0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x04, -0x06,0x00,0x05,0x00,0x04,0x40,0x81,0xa6,0x70,0xb3,0xef,0x59,0xd1,0x66,0xd1, -0x9b,0xc0,0x9a,0xb6,0x9a,0x5e,0x6d,0x6f,0x6d,0x0d,0x59,0xa9,0xaa,0x6e,0xe9, -0x2c,0xa0,0x1e,0xee,0xc2,0x60,0xbc,0x59,0xbe,0x3f,0x63,0x06,0x8d,0xc9,0x11, -0x1d,0x23,0x64,0x92,0xef,0x2e,0xfc,0x57,0x29,0xa4,0xaf,0xe0,0xee,0x93,0x19, -0x39,0x51,0xe4,0x44,0xb8,0x0b,0x28,0xf4,0xa8,0x0d }; -static const BYTE signedContent[] = { -0x30,0x81,0xb2,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0, -0x81,0xa4,0x30,0x81,0xa1,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x13,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x06,0x04,0x04,0x01,0x02,0x03,0x04, -0x31,0x77,0x30,0x75,0x02,0x01,0x01,0x30,0x1a,0x30,0x15,0x31,0x13,0x30,0x11, -0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x02,0x05,0x05,0x00,0x30,0x04,0x06,0x00,0x05,0x00,0x04,0x40,0x81,0xa6,0x70, -0xb3,0xef,0x59,0xd1,0x66,0xd1,0x9b,0xc0,0x9a,0xb6,0x9a,0x5e,0x6d,0x6f,0x6d, -0x0d,0x59,0xa9,0xaa,0x6e,0xe9,0x2c,0xa0,0x1e,0xee,0xc2,0x60,0xbc,0x59,0xbe, -0x3f,0x63,0x06,0x8d,0xc9,0x11,0x1d,0x23,0x64,0x92,0xef,0x2e,0xfc,0x57,0x29, -0xa4,0xaf,0xe0,0xee,0x93,0x19,0x39,0x51,0xe4,0x44,0xb8,0x0b,0x28,0xf4,0xa8, -0x0d }; -static const BYTE detachedSignedContent[] = { -0x30,0x81,0xaa,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0, -0x81,0x9c,0x30,0x81,0x99,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x0b,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0x31,0x77,0x30,0x75,0x02,0x01,0x01,0x30, -0x1a,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a, -0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06, -0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x04,0x06,0x00, -0x05,0x00,0x04,0x40,0x81,0xa6,0x70,0xb3,0xef,0x59,0xd1,0x66,0xd1,0x9b,0xc0, -0x9a,0xb6,0x9a,0x5e,0x6d,0x6f,0x6d,0x0d,0x59,0xa9,0xaa,0x6e,0xe9,0x2c,0xa0, -0x1e,0xee,0xc2,0x60,0xbc,0x59,0xbe,0x3f,0x63,0x06,0x8d,0xc9,0x11,0x1d,0x23, -0x64,0x92,0xef,0x2e,0xfc,0x57,0x29,0xa4,0xaf,0xe0,0xee,0x93,0x19,0x39,0x51, -0xe4,0x44,0xb8,0x0b,0x28,0xf4,0xa8,0x0d }; -static const BYTE v1CertWithValidPubKey[] = { -0x30,0x81,0xcf,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30, -0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61, -0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31, -0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31, -0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11, -0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x00,0x30,0x5c,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x01,0x01,0x05,0x00,0x03,0x4b,0x00,0x30,0x48,0x02,0x41,0x00,0xe2,0x54,0x3a, -0xa7,0x83,0xb1,0x27,0x14,0x3e,0x59,0xbb,0xb4,0x53,0xe6,0x1f,0xe7,0x5d,0xf1, -0x21,0x68,0xad,0x85,0x53,0xdb,0x6b,0x1e,0xeb,0x65,0x97,0x03,0x86,0x60,0xde, -0xf3,0x6c,0x38,0x75,0xe0,0x4c,0x61,0xbb,0xbc,0x62,0x17,0xa9,0xcd,0x79,0x3f, -0x21,0x4e,0x96,0xcb,0x0e,0xdc,0x61,0x94,0x30,0x18,0x10,0x6b,0xd0,0x1c,0x10, -0x79,0x02,0x03,0x01,0x00,0x01,0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03,0x55, -0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01 }; - -static PCCERT_CONTEXT WINAPI msg_get_signer_callback(void *pvArg, - DWORD certEncodingType, PCERT_INFO signerId, HCERTSTORE store) -{ - return CertCreateCertificateContext(X509_ASN_ENCODING, - v1CertWithValidPubKey, sizeof(v1CertWithValidPubKey)); -} - -static void test_verify_detached_message_signature(void) -{ - CRYPT_VERIFY_MESSAGE_PARA para; - BOOL ret; - const BYTE *pContent; - DWORD cbContent; - - memset(¶, 0, sizeof(para)); - SetLastError(0xdeadbeef); - ret = CryptVerifyDetachedMessageSignature(NULL, 0, NULL, 0, 0, NULL, - NULL, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptVerifyDetachedMessageSignature(¶, 0, NULL, 0, 0, NULL, - NULL, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - para.cbSize = sizeof(para); - SetLastError(0xdeadbeef); - ret = CryptVerifyDetachedMessageSignature(¶, 0, NULL, 0, 0, NULL, - NULL, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - para.dwMsgAndCertEncodingType = X509_ASN_ENCODING; - SetLastError(0xdeadbeef); - ret = CryptVerifyDetachedMessageSignature(¶, 0, NULL, 0, 0, NULL, - NULL, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - para.dwMsgAndCertEncodingType = PKCS_7_ASN_ENCODING; - SetLastError(0xdeadbeef); - ret = CryptVerifyDetachedMessageSignature(¶, 0, NULL, 0, 0, NULL, - NULL, NULL); - ok(!ret, "Expected 0, got %d\n", ret); - ok(GetLastError() == CRYPT_E_ASN1_EOD || - GetLastError() == OSS_BAD_ARG, /* win98 */ - "Expected CRYPT_E_ASN1_EOD or OSS_BAD_ARG, got %08x\n", GetLastError()); - /* None of these messages contains a cert in the message itself, so the - * default callback isn't able to verify their signature. - */ - SetLastError(0xdeadbeef); - ret = CryptVerifyDetachedMessageSignature(¶, 0, signedWithCertContent, - sizeof(signedWithCertContent), 0, NULL, NULL, NULL); - ok(!ret, "Expected 0, got %d\n", ret); - todo_wine - ok(GetLastError() == CRYPT_E_NOT_FOUND || - GetLastError() == OSS_DATA_ERROR, /* win98 */ - "Expected CRYPT_E_NOT_FOUND or OSS_DATA_ERROR, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptVerifyDetachedMessageSignature(¶, 0, signedContent, - sizeof(signedContent), 0, NULL, NULL, NULL); - ok(!ret, "Expected 0, got %d\n", ret); - ok(GetLastError() == CRYPT_E_NOT_FOUND || - GetLastError() == OSS_DATA_ERROR, /* win98 */ - "Expected CRYPT_E_NOT_FOUND or OSS_DATA_ERROR, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptVerifyDetachedMessageSignature(¶, 0, detachedSignedContent, - sizeof(detachedSignedContent), 0, NULL, NULL, NULL); - ok(!ret, "Expected 0, got %d\n", ret); - ok(GetLastError() == CRYPT_E_NOT_FOUND || - GetLastError() == OSS_DATA_ERROR, /* win98 */ - "Expected CRYPT_E_NOT_FOUND or OSS_DATA_ERROR, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - pContent = msgData; - cbContent = sizeof(msgData); - ret = CryptVerifyDetachedMessageSignature(¶, 0, detachedSignedContent, - sizeof(detachedSignedContent), 1, &pContent, &cbContent, NULL); - ok(!ret, "Expected 0, got %d\n", ret); - ok(GetLastError() == CRYPT_E_NOT_FOUND || - GetLastError() == OSS_DATA_ERROR, /* win98 */ - "Expected CRYPT_E_NOT_FOUND or OSS_DATA_ERROR, got %08x\n", GetLastError()); - /* Passing the correct callback results in success */ - para.pfnGetSignerCertificate = msg_get_signer_callback; - ret = CryptVerifyDetachedMessageSignature(¶, 0, detachedSignedContent, - sizeof(detachedSignedContent), 1, &pContent, &cbContent, NULL); - ok(ret || - broken(!ret), /* win98 */ - "CryptVerifyDetachedMessageSignature failed: %08x\n", - GetLastError()); - /* Not passing the correct data to be signed results in the signature not - * matching. - */ - SetLastError(0xdeadbeef); - ret = CryptVerifyDetachedMessageSignature(¶, 0, detachedSignedContent, - sizeof(detachedSignedContent), 0, NULL, NULL, NULL); - ok(!ret, "Expected 0, got %d\n", ret); - ok(GetLastError() == NTE_BAD_SIGNATURE || - GetLastError() == OSS_DATA_ERROR, /* win98 */ - "Expected NTE_BAD_SIGNATURE or OSS_DATA_ERROR, got %08x\n", GetLastError()); -} - -static const BYTE signedWithCertEmptyContent[] = { -0x30,0x81,0xdf,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0, -0x81,0xd1,0x30,0x81,0xce,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x02,0x06,0x00,0xa0,0x7c, -0x30,0x7a,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30,0x11, -0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30, -0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11,0x06, -0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67, -0x00,0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00,0xa3,0x16,0x30,0x14,0x30, -0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01, -0xff,0x02,0x01,0x01,0x31,0x37,0x30,0x35,0x02,0x01,0x01,0x30,0x1a,0x30,0x15, -0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e, -0x20,0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x04,0x06,0x00,0x05,0x00,0x04, -0x00 }; -static const BYTE signedWithCertWithPubKeyContent[] = { -0x30,0x81,0xfc,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0, -0x81,0xee,0x30,0x81,0xeb,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x02,0x06,0x00,0xa0,0x81, -0x98,0x30,0x81,0x95,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13, -0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c, -0x61,0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30, -0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30, -0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30, -0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61, -0x6e,0x67,0x00,0x30,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x01,0x01,0x01,0x05,0x00,0x03,0x11,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06, -0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0xa3,0x16,0x30,0x14,0x30,0x12, -0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff, -0x02,0x01,0x01,0x31,0x37,0x30,0x35,0x02,0x01,0x01,0x30,0x1a,0x30,0x15,0x31, -0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20, -0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x04,0x06,0x00,0x05,0x00,0x04,0x00 }; - -static void test_verify_message_signature(void) -{ - BOOL ret; - CRYPT_VERIFY_MESSAGE_PARA para = { 0 }; - PCCERT_CONTEXT cert; - DWORD cbDecoded; - - SetLastError(0xdeadbeef); - ret = CryptVerifyMessageSignature(NULL, 0, NULL, 0, NULL, 0, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptVerifyMessageSignature(¶, 0, NULL, 0, NULL, 0, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - para.cbSize = sizeof(para); - SetLastError(0xdeadbeef); - ret = CryptVerifyMessageSignature(¶, 0, NULL, 0, NULL, 0, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - para.cbSize = 0; - para.dwMsgAndCertEncodingType = PKCS_7_ASN_ENCODING; - SetLastError(0xdeadbeef); - ret = CryptVerifyMessageSignature(¶, 0, NULL, 0, NULL, 0, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - para.cbSize = sizeof(para); - SetLastError(0xdeadbeef); - ret = CryptVerifyMessageSignature(¶, 0, NULL, 0, NULL, 0, NULL); - ok(!ret && - (GetLastError() == CRYPT_E_ASN1_EOD || - GetLastError() == OSS_BAD_ARG), /* win9x */ - "Expected CRYPT_E_ASN1_EOD, got %08x\n", GetLastError()); - /* Check whether cert is set on error */ - cert = (PCCERT_CONTEXT)0xdeadbeef; - ret = CryptVerifyMessageSignature(¶, 0, NULL, 0, NULL, 0, &cert); - ok(cert == NULL, "Expected NULL cert\n"); - /* Check whether cbDecoded is set on error */ - cbDecoded = 0xdeadbeef; - ret = CryptVerifyMessageSignature(¶, 0, NULL, 0, NULL, &cbDecoded, - NULL); - ok(!cbDecoded, "Expected 0\n"); - SetLastError(0xdeadbeef); - ret = CryptVerifyMessageSignature(¶, 0, dataEmptyBareContent, - sizeof(dataEmptyBareContent), NULL, 0, NULL); - ok(GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == OSS_PDU_MISMATCH, /* win9x */ - "Expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptVerifyMessageSignature(¶, 0, dataEmptyContent, - sizeof(dataEmptyContent), NULL, 0, NULL); - ok(!ret && GetLastError() == CRYPT_E_UNEXPECTED_MSG_TYPE, - "Expected CRYPT_E_UNEXPECTED_MSG_TYPE, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptVerifyMessageSignature(¶, 0, signedEmptyBareContent, - sizeof(signedEmptyBareContent), NULL, 0, NULL); - ok(!ret && - (GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == OSS_DATA_ERROR), /* win9x */ - "Expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptVerifyMessageSignature(¶, 0, signedEmptyContent, - sizeof(signedEmptyContent), NULL, 0, NULL); - ok(!ret && - (GetLastError() == CRYPT_E_NOT_FOUND || - GetLastError() == OSS_DATA_ERROR), /* win9x */ - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptVerifyMessageSignature(¶, 0, signedContent, - sizeof(signedContent), NULL, 0, NULL); - ok(!ret && - (GetLastError() == CRYPT_E_NOT_FOUND || - GetLastError() == OSS_DATA_ERROR), /* win9x */ - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - /* FIXME: Windows fails with CRYPT_E_NOT_FOUND for these messages, but - * their signer certs have invalid public keys that fail to decode. In - * Wine therefore the failure is an ASN error. Need some messages with - * valid public keys and invalid signatures to check against. - */ - ret = CryptVerifyMessageSignature(¶, 0, signedWithCertEmptyContent, - sizeof(signedWithCertEmptyContent), NULL, 0, NULL); - ok(!ret, "Expected failure\n"); - ret = CryptVerifyMessageSignature(¶, 0, signedWithCertContent, - sizeof(signedWithCertContent), NULL, 0, NULL); - ok(!ret, "Expected failure\n"); - ret = CryptVerifyMessageSignature(¶, 0, signedWithCertWithPubKeyContent, - sizeof(signedWithCertWithPubKeyContent), NULL, 0, NULL); - ok(!ret, "Expected failure\n"); -} - -static const BYTE detachedHashBlob[] = { -0x30,0x3f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x05,0xa0,0x32, -0x30,0x30,0x02,0x01,0x00,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x02,0x05,0x05,0x00,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x07,0x01,0x04,0x10,0x2d,0x1b,0xbc,0x1f,0xc7,0xab,0x36,0x8d,0xdb,0x95,0xe6, -0x24,0xb9,0x66,0x7c,0x21 }; -static const BYTE hashBlob[] = { -0x30,0x47,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x05,0xa0,0x3a, -0x30,0x38,0x02,0x01,0x00,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x02,0x05,0x05,0x00,0x30,0x13,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x07,0x01,0xa0,0x06,0x04,0x04,0xde,0xad,0xbe,0xef,0x04,0x10,0x2f,0x24,0x92, -0x30,0xa8,0xe7,0xc2,0xbf,0x60,0x05,0xcc,0xd2,0x67,0x92,0x59,0xec }; -static const BYTE hashVal[] = { -0x2d,0x1b,0xbc,0x1f,0xc7,0xab,0x36,0x8d,0xdb,0x95,0xe6,0x24,0xb9,0x66,0x7c, -0x21 }; - -static void test_hash_message(void) -{ - BOOL ret; - CRYPT_HASH_MESSAGE_PARA para; - static const BYTE blob1[] = { 0xde, 0xad, 0xbe, 0xef }; - static const BYTE blob2[] = { 0xba, 0xad, 0xf0, 0x0d }; - const BYTE *toHash[] = { blob1, blob2 }; - DWORD hashSize[] = { sizeof(blob1), sizeof(blob2) }; - DWORD hashedBlobSize, computedHashSize; - static char oid_rsa_md5[] = szOID_RSA_MD5; - LPBYTE hashedBlob, computedHash; - - /* Crash - ret = CryptHashMessage(NULL, FALSE, 0, NULL, 0, NULL, NULL, NULL, NULL); - */ - memset(¶, 0, sizeof(para)); - SetLastError(0xdeadbeef); - ret = CryptHashMessage(¶, FALSE, 0, NULL, NULL, NULL, NULL, NULL, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got 0x%08x\n", GetLastError()); - para.cbSize = sizeof(para); - /* Not quite sure what "success" means in this case, but it does succeed */ - SetLastError(0xdeadbeef); - ret = CryptHashMessage(¶, FALSE, 0, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError()); - /* With a bogus encoding type it "succeeds" */ - para.dwMsgEncodingType = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = CryptHashMessage(¶, FALSE, 0, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError()); - /* According to MSDN, the third parameter (cToBeHashed) must be 1 if the - * second parameter (fDetached) is FALSE, but again it "succeeds." - */ - SetLastError(0xdeadbeef); - ret = CryptHashMessage(¶, FALSE, 2, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError()); - /* Even passing parameters to hash results in "success." */ - SetLastError(0xdeadbeef); - ret = CryptHashMessage(¶, FALSE, 2, toHash, hashSize, NULL, NULL, NULL, - NULL); - /* Try again with a valid encoding type */ - para.dwMsgEncodingType = PKCS_7_ASN_ENCODING; - SetLastError(0xdeadbeef); - ret = CryptHashMessage(¶, FALSE, 2, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError()); - /* And with valid data to hash */ - SetLastError(0xdeadbeef); - ret = CryptHashMessage(¶, FALSE, 2, toHash, hashSize, NULL, NULL, NULL, - NULL); - ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError()); - /* But requesting the size of the hashed blob and indicating there's data - * to hash results in a crash - */ - if (0) - { - ret = CryptHashMessage(¶, FALSE, 2, NULL, NULL, NULL, - &hashedBlobSize, NULL, NULL); - } - /* Passing a valid pointer for the data to hash fails, as the hash - * algorithm is finally checked. - */ - SetLastError(0xdeadbeef); - ret = CryptHashMessage(¶, FALSE, 2, toHash, hashSize, NULL, - &hashedBlobSize, NULL, NULL); - ok(!ret && - (GetLastError() == CRYPT_E_UNKNOWN_ALGO || - GetLastError() == CRYPT_E_OID_FORMAT), /* Vista */ - "expected CRYPT_E_UNKNOWN_ALGO or CRYPT_E_OID_FORMAT, got 0x%08x (%d)\n", - GetLastError(), GetLastError()); - para.HashAlgorithm.pszObjId = oid_rsa_md5; - /* With a valid hash algorithm, this succeeds, even though fDetached is - * FALSE. - */ - SetLastError(0xdeadbeef); - ret = CryptHashMessage(¶, FALSE, 2, toHash, hashSize, NULL, - &hashedBlobSize, NULL, NULL); - todo_wine - ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError()); - if (ret) - { - /* Actually attempting to get the hashed data fails, perhaps because - * detached is FALSE. - */ - hashedBlob = HeapAlloc(GetProcessHeap(), 0, hashedBlobSize); - SetLastError(0xdeadbeef); - ret = CryptHashMessage(¶, FALSE, 2, toHash, hashSize, hashedBlob, - &hashedBlobSize, NULL, NULL); - ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "expected CRYPT_E_MSG_ERROR, got 0x%08x (%d)\n", GetLastError(), - GetLastError()); - HeapFree(GetProcessHeap(), 0, hashedBlob); - } - /* Repeating tests with fDetached = TRUE results in success */ - SetLastError(0xdeadbeef); - ret = CryptHashMessage(¶, TRUE, 2, toHash, hashSize, NULL, - &hashedBlobSize, NULL, NULL); - ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError()); - if (ret) - { - hashedBlob = HeapAlloc(GetProcessHeap(), 0, hashedBlobSize); - SetLastError(0xdeadbeef); - ret = CryptHashMessage(¶, TRUE, 2, toHash, hashSize, hashedBlob, - &hashedBlobSize, NULL, NULL); - ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError()); - ok(hashedBlobSize == sizeof(detachedHashBlob), - "unexpected size of detached blob %d\n", hashedBlobSize); - ok(!memcmp(hashedBlob, detachedHashBlob, hashedBlobSize), - "unexpected detached blob value\n"); - HeapFree(GetProcessHeap(), 0, hashedBlob); - } - /* Hashing a single item with fDetached = FALSE also succeeds */ - SetLastError(0xdeadbeef); - ret = CryptHashMessage(¶, FALSE, 1, toHash, hashSize, NULL, - &hashedBlobSize, NULL, NULL); - ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError()); - if (ret) - { - hashedBlob = HeapAlloc(GetProcessHeap(), 0, hashedBlobSize); - ret = CryptHashMessage(¶, FALSE, 1, toHash, hashSize, hashedBlob, - &hashedBlobSize, NULL, NULL); - ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError()); - ok(hashedBlobSize == sizeof(hashBlob), - "unexpected size of detached blob %d\n", hashedBlobSize); - ok(!memcmp(hashedBlob, hashBlob, hashedBlobSize), - "unexpected detached blob value\n"); - HeapFree(GetProcessHeap(), 0, hashedBlob); - } - /* Check the computed hash value too. You don't need to get the encoded - * blob to get it. - */ - computedHashSize = 0xdeadbeef; - ret = CryptHashMessage(¶, TRUE, 2, toHash, hashSize, NULL, - &hashedBlobSize, NULL, &computedHashSize); - ok(ret, "CryptHashMessage failed: 0x%08x\n", GetLastError()); - ok(computedHashSize == 16, "expected hash size of 16, got %d\n", - computedHashSize); - if (ret) - { - computedHash = HeapAlloc(GetProcessHeap(), 0, computedHashSize); - SetLastError(0xdeadbeef); - ret = CryptHashMessage(¶, TRUE, 2, toHash, hashSize, NULL, - &hashedBlobSize, computedHash, &computedHashSize); - ok(computedHashSize == sizeof(hashVal), - "unexpected size of hash value %d\n", computedHashSize); - ok(!memcmp(computedHash, hashVal, computedHashSize), - "unexpected value\n"); - HeapFree(GetProcessHeap(), 0, computedHash); - } -} - -START_TEST(message) -{ - test_msg_get_signer_count(); - test_verify_detached_message_hash(); - test_verify_message_hash(); - test_verify_detached_message_signature(); - test_verify_message_signature(); - test_hash_message(); -} diff --git a/rostests/winetests/crypt32/msg.c b/rostests/winetests/crypt32/msg.c deleted file mode 100644 index 39662ebe8f2..00000000000 --- a/rostests/winetests/crypt32/msg.c +++ /dev/null @@ -1,3198 +0,0 @@ -/* - * Unit test suite for crypt32.dll's CryptMsg functions - * - * Copyright 2007 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 - */ - -#include -#include -#include -#include -#include -#define CMSG_SIGNER_ENCODE_INFO_HAS_CMS_FIELDS -#define CMSG_SIGNED_ENCODE_INFO_HAS_CMS_FIELDS -#include - -#include "wine/test.h" - -static BOOL have_nt = TRUE; -static BOOL old_crypt32 = FALSE; -static char oid_rsa_md5[] = szOID_RSA_MD5; - -static BOOL (WINAPI * pCryptAcquireContextA) - (HCRYPTPROV *, LPCSTR, LPCSTR, DWORD, DWORD); -static BOOL (WINAPI * pCryptAcquireContextW) - (HCRYPTPROV *, LPCWSTR, LPCWSTR, DWORD, DWORD); - -static void init_function_pointers(void) -{ - HMODULE hAdvapi32 = GetModuleHandleA("advapi32.dll"); - -#define GET_PROC(dll, func) \ - p ## func = (void *)GetProcAddress(dll, #func); \ - if(!p ## func) \ - trace("GetProcAddress(%s) failed\n", #func); - - GET_PROC(hAdvapi32, CryptAcquireContextA) - GET_PROC(hAdvapi32, CryptAcquireContextW) - -#undef GET_PROC -} - -static void test_msg_open_to_encode(void) -{ - HCRYPTMSG msg; - - /* Crash - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_ENVELOPED, NULL, - NULL, NULL); - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, NULL, NULL, - NULL); - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, NULL, NULL, - NULL); - */ - - /* Bad encodings */ - SetLastError(0xdeadbeef); - msg = CryptMsgOpenToEncode(0, 0, 0, NULL, NULL, NULL); - ok(!msg && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %x\n", GetLastError()); - SetLastError(0xdeadbeef); - msg = CryptMsgOpenToEncode(X509_ASN_ENCODING, 0, 0, NULL, NULL, NULL); - ok(!msg && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %x\n", GetLastError()); - - /* Bad message types */ - SetLastError(0xdeadbeef); - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, 0, NULL, NULL, NULL); - ok(!msg && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %x\n", GetLastError()); - SetLastError(0xdeadbeef); - msg = CryptMsgOpenToEncode(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, 0, 0, - NULL, NULL, NULL); - ok(!msg && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %x\n", GetLastError()); - SetLastError(0xdeadbeef); - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, - CMSG_SIGNED_AND_ENVELOPED, NULL, NULL, NULL); - ok(!msg && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %x\n", GetLastError()); - SetLastError(0xdeadbeef); - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_ENCRYPTED, NULL, - NULL, NULL); - ok(!msg && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %x\n", GetLastError()); -} - -static void test_msg_open_to_decode(void) -{ - HCRYPTMSG msg; - CMSG_STREAM_INFO streamInfo = { 0 }; - - SetLastError(0xdeadbeef); - msg = CryptMsgOpenToDecode(0, 0, 0, 0, NULL, NULL); - ok(!msg && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %x\n", GetLastError()); - - /* Bad encodings */ - SetLastError(0xdeadbeef); - msg = CryptMsgOpenToDecode(X509_ASN_ENCODING, 0, 0, 0, NULL, NULL); - ok(!msg && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %x\n", GetLastError()); - SetLastError(0xdeadbeef); - msg = CryptMsgOpenToDecode(X509_ASN_ENCODING, 0, CMSG_DATA, 0, NULL, NULL); - ok(!msg && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %x\n", GetLastError()); - - /* The message type can be explicit... */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, 0, NULL, - NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); - CryptMsgClose(msg); - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_ENVELOPED, 0, NULL, - NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); - CryptMsgClose(msg); - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, 0, NULL, - NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); - CryptMsgClose(msg); - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, 0, NULL, - NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); - CryptMsgClose(msg); - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, - CMSG_SIGNED_AND_ENVELOPED, 0, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); - CryptMsgClose(msg); - /* or implicit.. */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); - CryptMsgClose(msg); - /* or even invalid. */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_ENCRYPTED, 0, NULL, - NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); - CryptMsgClose(msg); - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 1000, 0, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); - CryptMsgClose(msg); - - /* And even though the stream info parameter "must be set to NULL" for - * CMSG_HASHED, it's still accepted. - */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, 0, NULL, - &streamInfo); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); - CryptMsgClose(msg); -} - -static void test_msg_get_param(void) -{ - BOOL ret; - HCRYPTMSG msg; - DWORD size, i, value; - CMSG_SIGNED_ENCODE_INFO signInfo = { sizeof(signInfo), 0 }; - CMSG_SIGNER_ENCODE_INFO signer = { sizeof(signer), 0 }; - - /* Crash - ret = CryptMsgGetParam(NULL, 0, 0, NULL, NULL); - ret = CryptMsgGetParam(NULL, 0, 0, NULL, &size); - ret = CryptMsgGetParam(msg, 0, 0, NULL, NULL); - */ - - /* Decoded messages */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); - /* For decoded messages, the type is always available */ - size = 0; - ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %x\n", GetLastError()); - size = sizeof(value); - ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %x\n", GetLastError()); - /* For this (empty) message, the type isn't set */ - ok(value == 0, "Expected type 0, got %d\n", value); - CryptMsgClose(msg); - - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, 0, NULL, - NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); - /* For explicitly typed messages, the type is known. */ - size = sizeof(value); - ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %x\n", GetLastError()); - ok(value == CMSG_DATA, "Expected CMSG_DATA, got %d\n", value); - for (i = CMSG_CONTENT_PARAM; !old_crypt32 && (i <= CMSG_CMS_SIGNER_INFO_PARAM); i++) - { - size = 0; - ret = CryptMsgGetParam(msg, i, 0, NULL, &size); - ok(!ret, "Parameter %d: expected failure\n", i); - } - CryptMsgClose(msg); - - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_ENVELOPED, 0, NULL, - NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); - size = sizeof(value); - ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %x\n", GetLastError()); - ok(value == CMSG_ENVELOPED, "Expected CMSG_ENVELOPED, got %d\n", value); - for (i = CMSG_CONTENT_PARAM; !old_crypt32 && (i <= CMSG_CMS_SIGNER_INFO_PARAM); i++) - { - size = 0; - ret = CryptMsgGetParam(msg, i, 0, NULL, &size); - ok(!ret, "Parameter %d: expected failure\n", i); - } - CryptMsgClose(msg); - - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, 0, NULL, - NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); - size = sizeof(value); - ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %x\n", GetLastError()); - ok(value == CMSG_HASHED, "Expected CMSG_HASHED, got %d\n", value); - for (i = CMSG_CONTENT_PARAM; !old_crypt32 && (i <= CMSG_CMS_SIGNER_INFO_PARAM); i++) - { - size = 0; - ret = CryptMsgGetParam(msg, i, 0, NULL, &size); - ok(!ret, "Parameter %d: expected failure\n", i); - } - CryptMsgClose(msg); - - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, 0, NULL, - NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); - size = sizeof(value); - ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %x\n", GetLastError()); - ok(value == CMSG_SIGNED, "Expected CMSG_SIGNED, got %d\n", value); - for (i = CMSG_CONTENT_PARAM; !old_crypt32 && (i <= CMSG_CMS_SIGNER_INFO_PARAM); i++) - { - size = 0; - ret = CryptMsgGetParam(msg, i, 0, NULL, &size); - ok(!ret, "Parameter %d: expected failure\n", i); - } - CryptMsgClose(msg); - - /* Explicitly typed messages get their types set, even if they're invalid */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_ENCRYPTED, 0, NULL, - NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); - size = sizeof(value); - ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %x\n", GetLastError()); - ok(value == CMSG_ENCRYPTED, "Expected CMSG_ENCRYPTED, got %d\n", value); - CryptMsgClose(msg); - - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 1000, 0, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToDecode failed: %x\n", GetLastError()); - size = sizeof(value); - ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %x\n", GetLastError()); - ok(value == 1000, "Expected 1000, got %d\n", value); - CryptMsgClose(msg); -} - -static void test_msg_close(void) -{ - BOOL ret; - HCRYPTMSG msg; - - /* NULL succeeds.. */ - ret = CryptMsgClose(NULL); - ok(ret, "CryptMsgClose failed: %x\n", GetLastError()); - /* but an arbitrary pointer crashes. */ - if (0) - ret = CryptMsgClose((HCRYPTMSG)1); - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, NULL, NULL, - NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - ret = CryptMsgClose(msg); - ok(ret, "CryptMsgClose failed: %x\n", GetLastError()); -} - -static void check_param(LPCSTR test, HCRYPTMSG msg, DWORD param, - const BYTE *expected, DWORD expectedSize) -{ - DWORD size; - LPBYTE buf; - BOOL ret; - - size = 0xdeadbeef; - ret = CryptMsgGetParam(msg, param, 0, NULL, &size); - ok(ret || broken(GetLastError() == OSS_LIMITED /* Win9x */ || - GetLastError() == CRYPT_E_INVALID_MSG_TYPE /* Win9x, for some params */), - "%s: CryptMsgGetParam failed: %08x\n", test, GetLastError()); - if (!ret) - { - win_skip("parameter %d not supported, skipping tests\n", param); - return; - } - buf = HeapAlloc(GetProcessHeap(), 0, size); - ret = CryptMsgGetParam(msg, param, 0, buf, &size); - ok(ret, "%s: CryptMsgGetParam failed: %08x\n", test, GetLastError()); - ok(size == expectedSize, "%s: expected size %d, got %d\n", test, - expectedSize, size); - if (size == expectedSize && size) - ok(!memcmp(buf, expected, size), "%s: unexpected data\n", test); - HeapFree(GetProcessHeap(), 0, buf); -} - -static void test_data_msg_open(void) -{ - HCRYPTMSG msg; - CMSG_HASHED_ENCODE_INFO hashInfo = { 0 }; - CMSG_STREAM_INFO streamInfo = { 0 }; - char oid[] = "1.2.3"; - - /* The data message type takes no additional info */ - SetLastError(0xdeadbeef); - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, &hashInfo, - NULL, NULL); - ok(!msg && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %x\n", GetLastError()); - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, NULL, NULL, - NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - CryptMsgClose(msg); - - /* An empty stream info is allowed. */ - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, NULL, NULL, - &streamInfo); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - CryptMsgClose(msg); - - /* Passing a bogus inner OID succeeds for a non-streamed message.. */ - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, NULL, oid, - NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - CryptMsgClose(msg); - /* and still succeeds when CMSG_DETACHED_FLAG is passed.. */ - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, - CMSG_DATA, NULL, oid, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - CryptMsgClose(msg); - /* and when a stream info is given, even though you're not supposed to be - * able to use anything but szOID_RSA_data when streaming is being used. - */ - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, - CMSG_DATA, NULL, oid, &streamInfo); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - CryptMsgClose(msg); -} - -static const BYTE msgData[] = { 1, 2, 3, 4 }; - -static BOOL WINAPI nop_stream_output(const void *pvArg, BYTE *pb, DWORD cb, - BOOL final) -{ - return TRUE; -} - -static void test_data_msg_update(void) -{ - HCRYPTMSG msg; - BOOL ret; - CMSG_STREAM_INFO streamInfo = { 0 }; - - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, NULL, NULL, - NULL); - /* Can't update a message that wasn't opened detached with final = FALSE */ - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, NULL, 0, FALSE); - ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "Expected CRYPT_E_MSG_ERROR, got %x\n", GetLastError()); - /* Updating it with final = TRUE succeeds */ - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - /* Any subsequent update will fail, as the last was final */ - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "Expected CRYPT_E_MSG_ERROR, got %x\n", GetLastError()); - CryptMsgClose(msg); - - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, NULL, NULL, - NULL); - /* Can't update a message with no data */ - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - /* This test returns FALSE on XP and earlier but TRUE on Vista, so can't be tested. - * GetLastError is either E_INVALIDARG (NT) or unset (9x/Vista), so it doesn't - * make sense to test this. - */ - - /* Curiously, a valid update will now fail as well, presumably because of - * the last (invalid, but final) update. - */ - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "Expected CRYPT_E_MSG_ERROR, got %x\n", GetLastError()); - CryptMsgClose(msg); - - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, - CMSG_DATA, NULL, NULL, NULL); - if (have_nt) - { - /* Doesn't appear to be able to update CMSG-DATA with non-final updates. - * On Win9x, this sometimes succeeds, sometimes fails with - * GetLastError() == 0, so it's not worth checking there. - */ - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, NULL, 0, FALSE); - ok(!ret && - (GetLastError() == E_INVALIDARG || - broken(GetLastError() == ERROR_SUCCESS)), /* Older NT4 */ - "Expected E_INVALIDARG, got %x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); - ok(!ret && - (GetLastError() == E_INVALIDARG || - broken(GetLastError() == ERROR_SUCCESS)), /* Older NT4 */ - "Expected E_INVALIDARG, got %x\n", GetLastError()); - } - else - skip("not updating CMSG_DATA with a non-final update\n"); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - CryptMsgClose(msg); - - if (!old_crypt32) - { - /* Calling update after opening with an empty stream info (with a bogus - * output function) yields an error: - */ - /* Crashes on some Win9x */ - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, NULL, NULL, - &streamInfo); - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); - ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || - GetLastError() == STATUS_ILLEGAL_INSTRUCTION /* WinME */), - "Expected STATUS_ACCESS_VIOLATION or STATUS_ILLEGAL_INSTRUCTION, got %x\n", - GetLastError()); - CryptMsgClose(msg); - } - /* Calling update with a valid output function succeeds, even if the data - * exceeds the size specified in the stream info. - */ - streamInfo.pfnStreamOutput = nop_stream_output; - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, NULL, NULL, - &streamInfo); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - CryptMsgClose(msg); -} - -static void test_data_msg_get_param(void) -{ - HCRYPTMSG msg; - DWORD size; - BOOL ret; - CMSG_STREAM_INFO streamInfo = { 0, nop_stream_output, NULL }; - - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, NULL, NULL, - NULL); - - /* Content and bare content are always gettable when not streaming */ - size = 0; - ret = CryptMsgGetParam(msg, CMSG_CONTENT_PARAM, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - size = 0; - ret = CryptMsgGetParam(msg, CMSG_BARE_CONTENT_PARAM, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - /* But for this type of message, the signer and hash aren't applicable, - * and the type isn't available. - */ - size = 0; - SetLastError(0xdeadbeef); - ret = CryptMsgGetParam(msg, CMSG_ENCODED_SIGNER, 0, NULL, &size); - ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptMsgGetParam(msg, CMSG_COMPUTED_HASH_PARAM, 0, NULL, &size); - ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %x\n", GetLastError()); - ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, NULL, &size); - ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %x\n", GetLastError()); - CryptMsgClose(msg); - - /* Can't get content or bare content when streaming */ - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, NULL, - NULL, &streamInfo); - SetLastError(0xdeadbeef); - ret = CryptMsgGetParam(msg, CMSG_BARE_CONTENT_PARAM, 0, NULL, &size); - ok((!ret && GetLastError() == E_INVALIDARG) || broken(ret /* Win9x */), - "Expected E_INVALIDARG, got %x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptMsgGetParam(msg, CMSG_CONTENT_PARAM, 0, NULL, &size); - ok((!ret && GetLastError() == E_INVALIDARG) || broken(ret /* Win9x */), - "Expected E_INVALIDARG, got %x\n", GetLastError()); - CryptMsgClose(msg); -} - -static const BYTE dataEmptyBareContent[] = { 0x04,0x00 }; -static const BYTE dataEmptyContent[] = { -0x30,0x0f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x02, -0x04,0x00 }; -static const BYTE dataBareContent[] = { 0x04,0x04,0x01,0x02,0x03,0x04 }; -static const BYTE dataContent[] = { -0x30,0x13,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x06, -0x04,0x04,0x01,0x02,0x03,0x04 }; - -struct update_accum -{ - DWORD cUpdates; - CRYPT_DATA_BLOB *updates; -}; - -static BOOL WINAPI accumulating_stream_output(const void *pvArg, BYTE *pb, - DWORD cb, BOOL final) -{ - struct update_accum *accum = (struct update_accum *)pvArg; - BOOL ret = FALSE; - - if (accum->cUpdates) - accum->updates = CryptMemRealloc(accum->updates, - (accum->cUpdates + 1) * sizeof(CRYPT_DATA_BLOB)); - else - accum->updates = CryptMemAlloc(sizeof(CRYPT_DATA_BLOB)); - if (accum->updates) - { - CRYPT_DATA_BLOB *blob = &accum->updates[accum->cUpdates]; - - blob->pbData = CryptMemAlloc(cb); - if (blob->pbData) - { - memcpy(blob->pbData, pb, cb); - blob->cbData = cb; - ret = TRUE; - } - accum->cUpdates++; - } - return ret; -} - -/* The updates of a (bogus) definite-length encoded message */ -static BYTE u1[] = { 0x30,0x0f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, - 0x07,0x01,0xa0,0x02,0x04,0x00 }; -static BYTE u2[] = { 0x01,0x02,0x03,0x04 }; -static CRYPT_DATA_BLOB b1[] = { - { sizeof(u1), u1 }, - { sizeof(u2), u2 }, - { sizeof(u2), u2 }, -}; -static const struct update_accum a1 = { sizeof(b1) / sizeof(b1[0]), b1 }; -/* The updates of a definite-length encoded message */ -static BYTE u3[] = { 0x30,0x13,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, - 0x07,0x01,0xa0,0x06,0x04,0x04 }; -static CRYPT_DATA_BLOB b2[] = { - { sizeof(u3), u3 }, - { sizeof(u2), u2 }, -}; -static const struct update_accum a2 = { sizeof(b2) / sizeof(b2[0]), b2 }; -/* The updates of an indefinite-length encoded message */ -static BYTE u4[] = { 0x30,0x80,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, - 0x07,0x01,0xa0,0x80,0x24,0x80 }; -static BYTE u5[] = { 0x04,0x04 }; -static BYTE u6[] = { 0x00,0x00,0x00,0x00,0x00,0x00 }; -static CRYPT_DATA_BLOB b3[] = { - { sizeof(u4), u4 }, - { sizeof(u5), u5 }, - { sizeof(u2), u2 }, - { sizeof(u5), u5 }, - { sizeof(u2), u2 }, - { sizeof(u6), u6 }, -}; -static const struct update_accum a3 = { sizeof(b3) / sizeof(b3[0]), b3 }; - -static void check_updates(LPCSTR header, const struct update_accum *expected, - const struct update_accum *got) -{ - DWORD i; - - ok(expected->cUpdates == got->cUpdates, - "%s: expected %d updates, got %d\n", header, expected->cUpdates, - got->cUpdates); - if (expected->cUpdates == got->cUpdates) - for (i = 0; i < min(expected->cUpdates, got->cUpdates); i++) - { - ok(expected->updates[i].cbData == got->updates[i].cbData, - "%s, update %d: expected %d bytes, got %d\n", header, i, - expected->updates[i].cbData, got->updates[i].cbData); - if (expected->updates[i].cbData && expected->updates[i].cbData == - got->updates[i].cbData) - ok(!memcmp(expected->updates[i].pbData, got->updates[i].pbData, - got->updates[i].cbData), "%s, update %d: unexpected value\n", - header, i); - } -} - -/* Frees the updates stored in accum */ -static void free_updates(struct update_accum *accum) -{ - DWORD i; - - for (i = 0; i < accum->cUpdates; i++) - CryptMemFree(accum->updates[i].pbData); - CryptMemFree(accum->updates); - accum->updates = NULL; - accum->cUpdates = 0; -} - -static void test_data_msg_encoding(void) -{ - HCRYPTMSG msg; - BOOL ret; - static char oid[] = "1.2.3"; - struct update_accum accum = { 0, NULL }; - CMSG_STREAM_INFO streamInfo = { 0, accumulating_stream_output, &accum }; - - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, NULL, NULL, - NULL); - check_param("data empty bare content", msg, CMSG_BARE_CONTENT_PARAM, - dataEmptyBareContent, sizeof(dataEmptyBareContent)); - check_param("data empty content", msg, CMSG_CONTENT_PARAM, dataEmptyContent, - sizeof(dataEmptyContent)); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - check_param("data bare content", msg, CMSG_BARE_CONTENT_PARAM, - dataBareContent, sizeof(dataBareContent)); - check_param("data content", msg, CMSG_CONTENT_PARAM, dataContent, - sizeof(dataContent)); - CryptMsgClose(msg); - /* Same test, but with CMSG_BARE_CONTENT_FLAG set */ - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, CMSG_BARE_CONTENT_FLAG, - CMSG_DATA, NULL, NULL, NULL); - check_param("data empty bare content", msg, CMSG_BARE_CONTENT_PARAM, - dataEmptyBareContent, sizeof(dataEmptyBareContent)); - check_param("data empty content", msg, CMSG_CONTENT_PARAM, dataEmptyContent, - sizeof(dataEmptyContent)); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - check_param("data bare content", msg, CMSG_BARE_CONTENT_PARAM, - dataBareContent, sizeof(dataBareContent)); - check_param("data content", msg, CMSG_CONTENT_PARAM, dataContent, - sizeof(dataContent)); - CryptMsgClose(msg); - /* The inner OID is apparently ignored */ - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, NULL, oid, - NULL); - check_param("data bogus oid bare content", msg, CMSG_BARE_CONTENT_PARAM, - dataEmptyBareContent, sizeof(dataEmptyBareContent)); - check_param("data bogus oid content", msg, CMSG_CONTENT_PARAM, - dataEmptyContent, sizeof(dataEmptyContent)); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - check_param("data bare content", msg, CMSG_BARE_CONTENT_PARAM, - dataBareContent, sizeof(dataBareContent)); - check_param("data content", msg, CMSG_CONTENT_PARAM, dataContent, - sizeof(dataContent)); - CryptMsgClose(msg); - /* A streaming message is DER encoded if the length is not 0xffffffff, but - * curiously, updates aren't validated to make sure they don't exceed the - * stated length. (The resulting output will of course fail to decode.) - */ - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, NULL, - NULL, &streamInfo); - CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); - CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - CryptMsgClose(msg); - check_updates("bogus data message with definite length", &a1, &accum); - free_updates(&accum); - /* A valid definite-length encoding: */ - streamInfo.cbContent = sizeof(msgData); - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, NULL, - NULL, &streamInfo); - CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - CryptMsgClose(msg); - check_updates("data message with definite length", &a2, &accum); - free_updates(&accum); - /* An indefinite-length encoding: */ - streamInfo.cbContent = 0xffffffff; - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, NULL, - NULL, &streamInfo); - CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); - CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - CryptMsgClose(msg); - check_updates("data message with indefinite length", &a3, &accum); - free_updates(&accum); -} - -static void test_data_msg(void) -{ - test_data_msg_open(); - test_data_msg_update(); - test_data_msg_get_param(); - test_data_msg_encoding(); -} - -static void test_hash_msg_open(void) -{ - HCRYPTMSG msg; - CMSG_HASHED_ENCODE_INFO hashInfo = { 0 }; - CMSG_STREAM_INFO streamInfo = { 0, nop_stream_output, NULL }; - - SetLastError(0xdeadbeef); - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, &hashInfo, - NULL, NULL); - ok(!msg && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %x\n", GetLastError()); - hashInfo.cbSize = sizeof(hashInfo); - SetLastError(0xdeadbeef); - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, &hashInfo, - NULL, NULL); - ok(!msg && GetLastError() == CRYPT_E_UNKNOWN_ALGO, - "Expected CRYPT_E_UNKNOWN_ALGO, got %x\n", GetLastError()); - hashInfo.HashAlgorithm.pszObjId = oid_rsa_md5; - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, &hashInfo, - NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - CryptMsgClose(msg); - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, - CMSG_HASHED, &hashInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - CryptMsgClose(msg); - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, - CMSG_HASHED, &hashInfo, NULL, &streamInfo); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - CryptMsgClose(msg); -} - -static void test_hash_msg_update(void) -{ - HCRYPTMSG msg; - BOOL ret; - CMSG_HASHED_ENCODE_INFO hashInfo = { sizeof(hashInfo), 0, - { oid_rsa_md5, { 0, NULL } }, NULL }; - CMSG_STREAM_INFO streamInfo = { 0, nop_stream_output, NULL }; - - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, - CMSG_HASHED, &hashInfo, NULL, NULL); - /* Detached hashed messages opened in non-streaming mode allow non-final - * updates.. - */ - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - /* including non-final updates with no data.. */ - ret = CryptMsgUpdate(msg, NULL, 0, FALSE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - /* and final updates with no data. */ - ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - /* But no updates are allowed after the final update. */ - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, NULL, 0, FALSE); - ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "Expected CRYPT_E_MSG_ERROR, got %x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "Expected CRYPT_E_MSG_ERROR, got %x\n", GetLastError()); - CryptMsgClose(msg); - /* Non-detached messages, in contrast, don't allow non-final updates in - * non-streaming mode. - */ - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, &hashInfo, - NULL, NULL); - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); - ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "Expected CRYPT_E_MSG_ERROR, got %x\n", GetLastError()); - /* Final updates (including empty ones) are allowed. */ - ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - CryptMsgClose(msg); - /* And, of course, streaming mode allows non-final updates */ - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, &hashInfo, - NULL, &streamInfo); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - CryptMsgClose(msg); - /* Setting pfnStreamOutput to NULL results in no error. (In what appears - * to be a bug, it isn't actually used - see encoding tests.) - */ - streamInfo.pfnStreamOutput = NULL; - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, &hashInfo, - NULL, &streamInfo); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); - CryptMsgClose(msg); -} - -static const BYTE emptyHashParam[] = { -0xd4,0x1d,0x8c,0xd9,0x8f,0x00,0xb2,0x04,0xe9,0x80,0x09,0x98,0xec,0xf8,0x42, -0x7e }; - -static void test_hash_msg_get_param(void) -{ - HCRYPTMSG msg; - BOOL ret; - CMSG_HASHED_ENCODE_INFO hashInfo = { sizeof(hashInfo), 0, - { oid_rsa_md5, { 0, NULL } }, NULL }; - DWORD size, value; - CMSG_STREAM_INFO streamInfo = { 0, nop_stream_output, NULL }; - BYTE buf[16]; - - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, &hashInfo, - NULL, NULL); - /* Content and bare content are always gettable for non-streamed messages */ - size = 0; - ret = CryptMsgGetParam(msg, CMSG_CONTENT_PARAM, 0, NULL, &size); - ok(ret || broken(GetLastError() == OSS_LIMITED /* Win9x */), - "CryptMsgGetParam failed: %08x\n", GetLastError()); - size = 0; - ret = CryptMsgGetParam(msg, CMSG_BARE_CONTENT_PARAM, 0, NULL, &size); - ok(ret || broken(GetLastError() == OSS_LIMITED /* Win9x */), - "CryptMsgGetParam failed: %08x\n", GetLastError()); - /* For an encoded hash message, the hash data aren't available */ - SetLastError(0xdeadbeef); - ret = CryptMsgGetParam(msg, CMSG_HASH_DATA_PARAM, 0, NULL, &size); - ok(!ret && (GetLastError() == CRYPT_E_INVALID_MSG_TYPE || - GetLastError() == OSS_LIMITED /* Win9x */), - "Expected CRYPT_E_INVALID_MSG_TYPE or OSS_LIMITED, got %08x\n", - GetLastError()); - /* The hash is also available. */ - size = 0; - ret = CryptMsgGetParam(msg, CMSG_COMPUTED_HASH_PARAM, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - ok(size == sizeof(buf), "Unexpected size %d\n", size); - ret = CryptMsgGetParam(msg, CMSG_COMPUTED_HASH_PARAM, 0, buf, &size); - if (size == sizeof(buf)) - ok(!memcmp(buf, emptyHashParam, size), "Unexpected value\n"); - /* By getting the hash, further updates are not allowed */ - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(!ret && - (GetLastError() == NTE_BAD_HASH_STATE /* NT */ || - GetLastError() == NTE_BAD_ALGID /* 9x */ || - GetLastError() == CRYPT_E_MSG_ERROR /* Vista */ || - broken(GetLastError() == ERROR_SUCCESS) /* Some Win9x */), - "Expected NTE_BAD_HASH_STATE or NTE_BAD_ALGID or CRYPT_E_MSG_ERROR, got 0x%x\n", GetLastError()); - - /* Even after a final update, the hash data aren't available */ - SetLastError(0xdeadbeef); - ret = CryptMsgGetParam(msg, CMSG_HASH_DATA_PARAM, 0, NULL, &size); - ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); - /* The version is also available, and should be zero for this message. */ - size = 0; - ret = CryptMsgGetParam(msg, CMSG_VERSION_PARAM, 0, NULL, &size); - ok(ret || broken(GetLastError() == CRYPT_E_INVALID_MSG_TYPE /* Win9x */), - "CryptMsgGetParam failed: %08x\n", GetLastError()); - size = sizeof(value); - ret = CryptMsgGetParam(msg, CMSG_VERSION_PARAM, 0, &value, &size); - ok(ret || broken(GetLastError() == CRYPT_E_INVALID_MSG_TYPE /* Win9x */), - "CryptMsgGetParam failed: %08x\n", GetLastError()); - if (ret) - ok(value == 0, "Expected version 0, got %d\n", value); - /* As usual, the type isn't available. */ - ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, NULL, &size); - ok(!ret, "Expected failure\n"); - CryptMsgClose(msg); - - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, &hashInfo, - NULL, &streamInfo); - /* Streamed messages don't allow you to get the content or bare content. */ - SetLastError(0xdeadbeef); - ret = CryptMsgGetParam(msg, CMSG_CONTENT_PARAM, 0, NULL, &size); - ok(!ret && (GetLastError() == E_INVALIDARG || - GetLastError() == OSS_LIMITED /* Win9x */), - "Expected E_INVALIDARG or OSS_LIMITED, got %x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptMsgGetParam(msg, CMSG_BARE_CONTENT_PARAM, 0, NULL, &size); - ok(!ret && (GetLastError() == E_INVALIDARG || - GetLastError() == OSS_LIMITED /* Win9x */), - "Expected E_INVALIDARG or OSS_LIMITED, got %x\n", GetLastError()); - /* The hash is still available. */ - size = 0; - ret = CryptMsgGetParam(msg, CMSG_COMPUTED_HASH_PARAM, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - ok(size == sizeof(buf), "Unexpected size %d\n", size); - ret = CryptMsgGetParam(msg, CMSG_COMPUTED_HASH_PARAM, 0, buf, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - if (size == sizeof(buf)) - ok(!memcmp(buf, emptyHashParam, size), "Unexpected value\n"); - /* After updating the hash, further updates aren't allowed on streamed - * messages either. - */ - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(!ret && - (GetLastError() == NTE_BAD_HASH_STATE /* NT */ || - GetLastError() == NTE_BAD_ALGID /* 9x */ || - GetLastError() == CRYPT_E_MSG_ERROR /* Vista */ || - broken(GetLastError() == ERROR_SUCCESS) /* Some Win9x */), - "Expected NTE_BAD_HASH_STATE or NTE_BAD_ALGID or CRYPT_E_MSG_ERROR, got 0x%x\n", GetLastError()); - - CryptMsgClose(msg); -} - -static const BYTE hashEmptyBareContent[] = { -0x30,0x17,0x02,0x01,0x00,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x02,0x05,0x05,0x00,0x30,0x02,0x06,0x00,0x04,0x00 }; -static const BYTE hashEmptyContent[] = { -0x30,0x26,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x05,0xa0,0x19, -0x30,0x17,0x02,0x01,0x00,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x02,0x05,0x05,0x00,0x30,0x02,0x06,0x00,0x04,0x00 }; -static const BYTE hashBareContent[] = { -0x30,0x38,0x02,0x01,0x00,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x02,0x05,0x05,0x00,0x30,0x13,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x07,0x01,0xa0,0x06,0x04,0x04,0x01,0x02,0x03,0x04,0x04,0x10,0x08,0xd6,0xc0, -0x5a,0x21,0x51,0x2a,0x79,0xa1,0xdf,0xeb,0x9d,0x2a,0x8f,0x26,0x2f }; -static const BYTE hashContent[] = { -0x30,0x47,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x05,0xa0,0x3a, -0x30,0x38,0x02,0x01,0x00,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x02,0x05,0x05,0x00,0x30,0x13,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x07,0x01,0xa0,0x06,0x04,0x04,0x01,0x02,0x03,0x04,0x04,0x10,0x08,0xd6,0xc0, -0x5a,0x21,0x51,0x2a,0x79,0xa1,0xdf,0xeb,0x9d,0x2a,0x8f,0x26,0x2f }; - -static const BYTE detachedHashNonFinalBareContent[] = { -0x30,0x20,0x02,0x01,0x00,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x02,0x05,0x05,0x00,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x07,0x01,0x04,0x00 }; -static const BYTE detachedHashNonFinalContent[] = { -0x30,0x2f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x05,0xa0,0x22, -0x30,0x20,0x02,0x01,0x00,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x02,0x05,0x05,0x00,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x07,0x01,0x04,0x00 }; -static const BYTE detachedHashBareContent[] = { -0x30,0x30,0x02,0x01,0x00,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x02,0x05,0x05,0x00,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x07,0x01,0x04,0x10,0x08,0xd6,0xc0,0x5a,0x21,0x51,0x2a,0x79,0xa1,0xdf,0xeb, -0x9d,0x2a,0x8f,0x26,0x2f }; -static const BYTE detachedHashContent[] = { -0x30,0x3f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x05,0xa0,0x32, -0x30,0x30,0x02,0x01,0x00,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x02,0x05,0x05,0x00,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x07,0x01,0x04,0x10,0x08,0xd6,0xc0,0x5a,0x21,0x51,0x2a,0x79,0xa1,0xdf,0xeb, -0x9d,0x2a,0x8f,0x26,0x2f }; - -static void test_hash_msg_encoding(void) -{ - HCRYPTMSG msg; - CMSG_HASHED_ENCODE_INFO hashInfo = { sizeof(hashInfo), 0 }; - BOOL ret; - struct update_accum accum = { 0, NULL }, empty_accum = { 0, NULL }; - CMSG_STREAM_INFO streamInfo = { 0, accumulating_stream_output, &accum }; - - hashInfo.HashAlgorithm.pszObjId = oid_rsa_md5; - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, &hashInfo, - NULL, NULL); - check_param("hash empty bare content", msg, CMSG_BARE_CONTENT_PARAM, - hashEmptyBareContent, sizeof(hashEmptyBareContent)); - check_param("hash empty content", msg, CMSG_CONTENT_PARAM, - hashEmptyContent, sizeof(hashEmptyContent)); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - check_param("hash bare content", msg, CMSG_BARE_CONTENT_PARAM, - hashBareContent, sizeof(hashBareContent)); - check_param("hash content", msg, CMSG_CONTENT_PARAM, - hashContent, sizeof(hashContent)); - CryptMsgClose(msg); - /* Same test, but with CMSG_BARE_CONTENT_FLAG set */ - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, CMSG_BARE_CONTENT_FLAG, - CMSG_HASHED, &hashInfo, NULL, NULL); - check_param("hash empty bare content", msg, CMSG_BARE_CONTENT_PARAM, - hashEmptyBareContent, sizeof(hashEmptyBareContent)); - check_param("hash empty content", msg, CMSG_CONTENT_PARAM, - hashEmptyContent, sizeof(hashEmptyContent)); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - check_param("hash bare content", msg, CMSG_BARE_CONTENT_PARAM, - hashBareContent, sizeof(hashBareContent)); - check_param("hash content", msg, CMSG_CONTENT_PARAM, - hashContent, sizeof(hashContent)); - CryptMsgClose(msg); - /* Same test, but with CMSG_DETACHED_FLAG set */ - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, - CMSG_HASHED, &hashInfo, NULL, NULL); - check_param("detached hash empty bare content", msg, - CMSG_BARE_CONTENT_PARAM, hashEmptyBareContent, - sizeof(hashEmptyBareContent)); - check_param("detached hash empty content", msg, CMSG_CONTENT_PARAM, - hashEmptyContent, sizeof(hashEmptyContent)); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - check_param("detached hash not final bare content", msg, - CMSG_BARE_CONTENT_PARAM, detachedHashNonFinalBareContent, - sizeof(detachedHashNonFinalBareContent)); - check_param("detached hash not final content", msg, CMSG_CONTENT_PARAM, - detachedHashNonFinalContent, sizeof(detachedHashNonFinalContent)); - ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); - check_param("detached hash bare content", msg, CMSG_BARE_CONTENT_PARAM, - detachedHashBareContent, sizeof(detachedHashBareContent)); - check_param("detached hash content", msg, CMSG_CONTENT_PARAM, - detachedHashContent, sizeof(detachedHashContent)); - check_param("detached hash bare content", msg, CMSG_BARE_CONTENT_PARAM, - detachedHashBareContent, sizeof(detachedHashBareContent)); - check_param("detached hash content", msg, CMSG_CONTENT_PARAM, - detachedHashContent, sizeof(detachedHashContent)); - CryptMsgClose(msg); - /* In what appears to be a bug, streamed updates to hash messages don't - * call the output function. - */ - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, &hashInfo, - NULL, &streamInfo); - ret = CryptMsgUpdate(msg, NULL, 0, FALSE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - CryptMsgClose(msg); - check_updates("empty hash message", &empty_accum, &accum); - free_updates(&accum); - - streamInfo.cbContent = sizeof(msgData); - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, &hashInfo, - NULL, &streamInfo); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - CryptMsgClose(msg); - check_updates("hash message", &empty_accum, &accum); - free_updates(&accum); - - streamInfo.cbContent = sizeof(msgData); - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, - CMSG_HASHED, &hashInfo, NULL, &streamInfo); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - CryptMsgClose(msg); - check_updates("detached hash message", &empty_accum, &accum); - free_updates(&accum); -} - -static void test_hash_msg(void) -{ - test_hash_msg_open(); - test_hash_msg_update(); - test_hash_msg_get_param(); - test_hash_msg_encoding(); -} - -static const CHAR cspNameA[] = { 'W','i','n','e','C','r','y','p','t','T','e', - 'm','p',0 }; -static const WCHAR cspNameW[] = { 'W','i','n','e','C','r','y','p','t','T','e', - 'm','p',0 }; -static BYTE serialNum[] = { 1 }; -static BYTE encodedCommonName[] = { 0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03, - 0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00 }; - -static void test_signed_msg_open(void) -{ - HCRYPTMSG msg; - BOOL ret; - CMSG_SIGNED_ENCODE_INFO signInfo = { 0 }; - CMSG_SIGNER_ENCODE_INFO signer = { sizeof(signer), 0 }; - CERT_INFO certInfo = { 0 }; - - SetLastError(0xdeadbeef); - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, - NULL, NULL); - ok(!msg && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %x\n", GetLastError()); - signInfo.cbSize = sizeof(signInfo); - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, - NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - CryptMsgClose(msg); - - signInfo.cSigners = 1; - signInfo.rgSigners = &signer; - /* With signer.pCertInfo unset, attempting to open this message this - * crashes. - */ - signer.pCertInfo = &certInfo; - /* The cert info must contain a serial number and an issuer. */ - SetLastError(0xdeadbeef); - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, - NULL, NULL); - /* NT: E_INVALIDARG, 9x: unchanged or CRYPT_E_UNKNOWN_ALGO */ - ok(!msg && (GetLastError() == E_INVALIDARG || GetLastError() == 0xdeadbeef - || GetLastError() == CRYPT_E_UNKNOWN_ALGO), - "Expected E_INVALIDARG or 0xdeadbeef or CRYPT_E_UNKNOWN_ALGO, got 0x%x\n", - GetLastError()); - - certInfo.SerialNumber.cbData = sizeof(serialNum); - certInfo.SerialNumber.pbData = serialNum; - SetLastError(0xdeadbeef); - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, - NULL, NULL); - /* NT: E_INVALIDARG, 9x: unchanged or CRYPT_E_UNKNOWN_ALGO */ - ok(!msg && (GetLastError() == E_INVALIDARG || GetLastError() == 0xdeadbeef - || GetLastError() == CRYPT_E_UNKNOWN_ALGO), - "Expected E_INVALIDARG or 0xdeadbeef or CRYPT_E_UNKNOWN_ALGO, got 0x%x\n", - GetLastError()); - - certInfo.Issuer.cbData = sizeof(encodedCommonName); - certInfo.Issuer.pbData = encodedCommonName; - SetLastError(0xdeadbeef); - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, - NULL, NULL); - ok(!msg && (GetLastError() == E_INVALIDARG || - GetLastError() == CRYPT_E_UNKNOWN_ALGO), - "Expected E_INVALIDARG or CRYPT_E_UNKNOWN_ALGO, got %x\n", GetLastError()); - - /* The signer's hCryptProv must be set to something. Whether it's usable - * or not will be checked after the hash algorithm is checked (see next - * test.) - */ - signer.hCryptProv = 1; - SetLastError(0xdeadbeef); - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, - NULL, NULL); - ok(!msg && GetLastError() == CRYPT_E_UNKNOWN_ALGO, - "Expected CRYPT_E_UNKNOWN_ALGO, got %x\n", GetLastError()); - /* The signer's hash algorithm must also be set. */ - signer.HashAlgorithm.pszObjId = oid_rsa_md5; - SetLastError(0xdeadbeef); - /* Crashes in advapi32 in wine, don't do it */ - if (0) { - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, - &signInfo, NULL, NULL); - ok(!msg && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); - } - /* The signer's hCryptProv must also be valid. */ - ret = pCryptAcquireContextA(&signer.hCryptProv, cspNameA, NULL, - PROV_RSA_FULL, CRYPT_NEWKEYSET); - if (!ret && GetLastError() == NTE_EXISTS) { - ret = pCryptAcquireContextA(&signer.hCryptProv, cspNameA, NULL, - PROV_RSA_FULL, 0); - } - ok(ret, "CryptAcquireContext failed: 0x%x\n", GetLastError()); - - if (ret) { - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, - NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - CryptMsgClose(msg); - } - - /* pCertInfo must still be set, but can be empty if the SignerId's issuer - * and serial number are set. - */ - certInfo.Issuer.cbData = 0; - certInfo.SerialNumber.cbData = 0; - signer.SignerId.dwIdChoice = CERT_ID_ISSUER_SERIAL_NUMBER; - U(signer.SignerId).IssuerSerialNumber.Issuer.cbData = - sizeof(encodedCommonName); - U(signer.SignerId).IssuerSerialNumber.Issuer.pbData = encodedCommonName; - U(signer.SignerId).IssuerSerialNumber.SerialNumber.cbData = - sizeof(serialNum); - U(signer.SignerId).IssuerSerialNumber.SerialNumber.pbData = serialNum; - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, - NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - CryptMsgClose(msg); - - CryptReleaseContext(signer.hCryptProv, 0); - pCryptAcquireContextA(&signer.hCryptProv, cspNameA, MS_DEF_PROV_A, - PROV_RSA_FULL, CRYPT_DELETEKEYSET); -} - -static const BYTE privKey[] = { - 0x07, 0x02, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x52, 0x53, 0x41, 0x32, 0x00, - 0x02, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x79, 0x10, 0x1c, 0xd0, 0x6b, 0x10, - 0x18, 0x30, 0x94, 0x61, 0xdc, 0x0e, 0xcb, 0x96, 0x4e, 0x21, 0x3f, 0x79, 0xcd, - 0xa9, 0x17, 0x62, 0xbc, 0xbb, 0x61, 0x4c, 0xe0, 0x75, 0x38, 0x6c, 0xf3, 0xde, - 0x60, 0x86, 0x03, 0x97, 0x65, 0xeb, 0x1e, 0x6b, 0xdb, 0x53, 0x85, 0xad, 0x68, - 0x21, 0xf1, 0x5d, 0xe7, 0x1f, 0xe6, 0x53, 0xb4, 0xbb, 0x59, 0x3e, 0x14, 0x27, - 0xb1, 0x83, 0xa7, 0x3a, 0x54, 0xe2, 0x8f, 0x65, 0x8e, 0x6a, 0x4a, 0xcf, 0x3b, - 0x1f, 0x65, 0xff, 0xfe, 0xf1, 0x31, 0x3a, 0x37, 0x7a, 0x8b, 0xcb, 0xc6, 0xd4, - 0x98, 0x50, 0x36, 0x67, 0xe4, 0xa1, 0xe8, 0x7e, 0x8a, 0xc5, 0x23, 0xf2, 0x77, - 0xf5, 0x37, 0x61, 0x49, 0x72, 0x59, 0xe8, 0x3d, 0xf7, 0x60, 0xb2, 0x77, 0xca, - 0x78, 0x54, 0x6d, 0x65, 0x9e, 0x03, 0x97, 0x1b, 0x61, 0xbd, 0x0c, 0xd8, 0x06, - 0x63, 0xe2, 0xc5, 0x48, 0xef, 0xb3, 0xe2, 0x6e, 0x98, 0x7d, 0xbd, 0x4e, 0x72, - 0x91, 0xdb, 0x31, 0x57, 0xe3, 0x65, 0x3a, 0x49, 0xca, 0xec, 0xd2, 0x02, 0x4e, - 0x22, 0x7e, 0x72, 0x8e, 0xf9, 0x79, 0x84, 0x82, 0xdf, 0x7b, 0x92, 0x2d, 0xaf, - 0xc9, 0xe4, 0x33, 0xef, 0x89, 0x5c, 0x66, 0x99, 0xd8, 0x80, 0x81, 0x47, 0x2b, - 0xb1, 0x66, 0x02, 0x84, 0x59, 0x7b, 0xc3, 0xbe, 0x98, 0x45, 0x4a, 0x3d, 0xdd, - 0xea, 0x2b, 0xdf, 0x4e, 0xb4, 0x24, 0x6b, 0xec, 0xe7, 0xd9, 0x0c, 0x45, 0xb8, - 0xbe, 0xca, 0x69, 0x37, 0x92, 0x4c, 0x38, 0x6b, 0x96, 0x6d, 0xcd, 0x86, 0x67, - 0x5c, 0xea, 0x54, 0x94, 0xa4, 0xca, 0xa4, 0x02, 0xa5, 0x21, 0x4d, 0xae, 0x40, - 0x8f, 0x9d, 0x51, 0x83, 0xf2, 0x3f, 0x33, 0xc1, 0x72, 0xb4, 0x1d, 0x94, 0x6e, - 0x7d, 0xe4, 0x27, 0x3f, 0xea, 0xff, 0xe5, 0x9b, 0xa7, 0x5e, 0x55, 0x8e, 0x0d, - 0x69, 0x1c, 0x7a, 0xff, 0x81, 0x9d, 0x53, 0x52, 0x97, 0x9a, 0x76, 0x79, 0xda, - 0x93, 0x32, 0x16, 0xec, 0x69, 0x51, 0x1a, 0x4e, 0xc3, 0xf1, 0x72, 0x80, 0x78, - 0x5e, 0x66, 0x4a, 0x8d, 0x85, 0x2f, 0x3f, 0xb2, 0xa7 }; -static BYTE pubKey[] = { -0x30,0x48,0x02,0x41,0x00,0xe2,0x54,0x3a,0xa7,0x83,0xb1,0x27,0x14,0x3e,0x59, -0xbb,0xb4,0x53,0xe6,0x1f,0xe7,0x5d,0xf1,0x21,0x68,0xad,0x85,0x53,0xdb,0x6b, -0x1e,0xeb,0x65,0x97,0x03,0x86,0x60,0xde,0xf3,0x6c,0x38,0x75,0xe0,0x4c,0x61, -0xbb,0xbc,0x62,0x17,0xa9,0xcd,0x79,0x3f,0x21,0x4e,0x96,0xcb,0x0e,0xdc,0x61, -0x94,0x30,0x18,0x10,0x6b,0xd0,0x1c,0x10,0x79,0x02,0x03,0x01,0x00,0x01 }; - -static void test_signed_msg_update(void) -{ - HCRYPTMSG msg; - BOOL ret; - CMSG_SIGNED_ENCODE_INFO signInfo = { sizeof(signInfo), 0 }; - CMSG_SIGNER_ENCODE_INFO signer = { sizeof(signer), 0 }; - CERT_INFO certInfo = { 0 }; - HCRYPTKEY key; - - certInfo.SerialNumber.cbData = sizeof(serialNum); - certInfo.SerialNumber.pbData = serialNum; - certInfo.Issuer.cbData = sizeof(encodedCommonName); - certInfo.Issuer.pbData = encodedCommonName; - signer.pCertInfo = &certInfo; - signer.HashAlgorithm.pszObjId = oid_rsa_md5; - signInfo.cSigners = 1; - signInfo.rgSigners = &signer; - - ret = pCryptAcquireContextA(&signer.hCryptProv, cspNameA, NULL, - PROV_RSA_FULL, CRYPT_NEWKEYSET); - if (!ret && GetLastError() == NTE_EXISTS) { - ret = pCryptAcquireContextA(&signer.hCryptProv, cspNameA, NULL, - PROV_RSA_FULL, 0); - } - ok(ret, "CryptAcquireContext failed: 0x%x\n", GetLastError()); - - if (!ret) { - skip("No context for tests\n"); - return; - } - - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, - CMSG_DETACHED_FLAG, CMSG_SIGNED, &signInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - /* Detached CMSG_SIGNED allows non-final updates. */ - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - /* Detached CMSG_SIGNED also allows non-final updates with no data. */ - ret = CryptMsgUpdate(msg, NULL, 0, FALSE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - /* The final update requires a private key in the hCryptProv, in order to - * generate the signature. - */ - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(!ret && - (GetLastError() == NTE_BAD_KEYSET || - GetLastError() == NTE_NO_KEY || - broken(GetLastError() == ERROR_SUCCESS)), /* Some Win9x */ - "Expected NTE_BAD_KEYSET or NTE_NO_KEY, got %x\n", GetLastError()); - ret = CryptImportKey(signer.hCryptProv, privKey, sizeof(privKey), - 0, 0, &key); - ok(ret, "CryptImportKey failed: %08x\n", GetLastError()); - /* The final update should be able to succeed now that a key exists, but - * the previous (invalid) final update prevents it. - */ - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "Expected CRYPT_E_MSG_ERROR, got %x\n", GetLastError()); - CryptMsgClose(msg); - - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, - CMSG_DETACHED_FLAG, CMSG_SIGNED, &signInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - /* Detached CMSG_SIGNED allows non-final updates. */ - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - /* Detached CMSG_SIGNED also allows non-final updates with no data. */ - ret = CryptMsgUpdate(msg, NULL, 0, FALSE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - /* Now that the private key exists, the final update can succeed (even - * with no data.) - */ - ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - /* But no updates are allowed after the final update. */ - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, NULL, 0, FALSE); - ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "Expected CRYPT_E_MSG_ERROR, got %x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "Expected CRYPT_E_MSG_ERROR, got %x\n", GetLastError()); - CryptMsgClose(msg); - - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, - NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - /* Non-detached messages don't allow non-final updates.. */ - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); - ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "Expected CRYPT_E_MSG_ERROR, got %x\n", GetLastError()); - /* but they do allow final ones. */ - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); - CryptMsgClose(msg); - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, - NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - /* They also allow final updates with no data. */ - ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); - CryptMsgClose(msg); - - CryptDestroyKey(key); - CryptReleaseContext(signer.hCryptProv, 0); - pCryptAcquireContextA(&signer.hCryptProv, cspNameA, NULL, PROV_RSA_FULL, - CRYPT_DELETEKEYSET); -} - -static const BYTE signedEmptyBareContent[] = { -0x30,0x50,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86, -0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x02,0x06,0x00,0x31,0x37,0x30,0x35,0x02, -0x01,0x01,0x30,0x1a,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03, -0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01, -0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30, -0x04,0x06,0x00,0x05,0x00,0x04,0x00 }; -static const BYTE signedEmptyContent[] = { -0x30,0x5f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0,0x52, -0x30,0x50,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86, -0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x02,0x06,0x00,0x31,0x37,0x30,0x35,0x02, -0x01,0x01,0x30,0x1a,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03, -0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01, -0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30, -0x04,0x06,0x00,0x05,0x00,0x04,0x00 }; -static const BYTE detachedSignedBareContent[] = { -0x30,0x81,0x99,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86, -0xf7,0x0d,0x01,0x07,0x01,0x31,0x77,0x30,0x75,0x02,0x01,0x01,0x30,0x1a,0x30, -0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61, -0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x04,0x06,0x00,0x05,0x00, -0x04,0x40,0x81,0xa6,0x70,0xb3,0xef,0x59,0xd1,0x66,0xd1,0x9b,0xc0,0x9a,0xb6, -0x9a,0x5e,0x6d,0x6f,0x6d,0x0d,0x59,0xa9,0xaa,0x6e,0xe9,0x2c,0xa0,0x1e,0xee, -0xc2,0x60,0xbc,0x59,0xbe,0x3f,0x63,0x06,0x8d,0xc9,0x11,0x1d,0x23,0x64,0x92, -0xef,0x2e,0xfc,0x57,0x29,0xa4,0xaf,0xe0,0xee,0x93,0x19,0x39,0x51,0xe4,0x44, -0xb8,0x0b,0x28,0xf4,0xa8,0x0d }; -static const BYTE detachedSignedContent[] = { -0x30,0x81,0xaa,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0, -0x81,0x9c,0x30,0x81,0x99,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x0b,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0x31,0x77,0x30,0x75,0x02,0x01,0x01,0x30, -0x1a,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a, -0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06, -0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x04,0x06,0x00, -0x05,0x00,0x04,0x40,0x81,0xa6,0x70,0xb3,0xef,0x59,0xd1,0x66,0xd1,0x9b,0xc0, -0x9a,0xb6,0x9a,0x5e,0x6d,0x6f,0x6d,0x0d,0x59,0xa9,0xaa,0x6e,0xe9,0x2c,0xa0, -0x1e,0xee,0xc2,0x60,0xbc,0x59,0xbe,0x3f,0x63,0x06,0x8d,0xc9,0x11,0x1d,0x23, -0x64,0x92,0xef,0x2e,0xfc,0x57,0x29,0xa4,0xaf,0xe0,0xee,0x93,0x19,0x39,0x51, -0xe4,0x44,0xb8,0x0b,0x28,0xf4,0xa8,0x0d }; -static const BYTE signedBareContent[] = { -0x30,0x81,0xa1,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x13,0x06,0x09,0x2a,0x86,0x48,0x86, -0xf7,0x0d,0x01,0x07,0x01,0xa0,0x06,0x04,0x04,0x01,0x02,0x03,0x04,0x31,0x77, -0x30,0x75,0x02,0x01,0x01,0x30,0x1a,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03, -0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00, -0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05, -0x05,0x00,0x30,0x04,0x06,0x00,0x05,0x00,0x04,0x40,0x81,0xa6,0x70,0xb3,0xef, -0x59,0xd1,0x66,0xd1,0x9b,0xc0,0x9a,0xb6,0x9a,0x5e,0x6d,0x6f,0x6d,0x0d,0x59, -0xa9,0xaa,0x6e,0xe9,0x2c,0xa0,0x1e,0xee,0xc2,0x60,0xbc,0x59,0xbe,0x3f,0x63, -0x06,0x8d,0xc9,0x11,0x1d,0x23,0x64,0x92,0xef,0x2e,0xfc,0x57,0x29,0xa4,0xaf, -0xe0,0xee,0x93,0x19,0x39,0x51,0xe4,0x44,0xb8,0x0b,0x28,0xf4,0xa8,0x0d }; -static const BYTE signedContent[] = { -0x30,0x81,0xb2,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0, -0x81,0xa4,0x30,0x81,0xa1,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x13,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x06,0x04,0x04,0x01,0x02,0x03,0x04, -0x31,0x77,0x30,0x75,0x02,0x01,0x01,0x30,0x1a,0x30,0x15,0x31,0x13,0x30,0x11, -0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x02,0x05,0x05,0x00,0x30,0x04,0x06,0x00,0x05,0x00,0x04,0x40,0x81,0xa6,0x70, -0xb3,0xef,0x59,0xd1,0x66,0xd1,0x9b,0xc0,0x9a,0xb6,0x9a,0x5e,0x6d,0x6f,0x6d, -0x0d,0x59,0xa9,0xaa,0x6e,0xe9,0x2c,0xa0,0x1e,0xee,0xc2,0x60,0xbc,0x59,0xbe, -0x3f,0x63,0x06,0x8d,0xc9,0x11,0x1d,0x23,0x64,0x92,0xef,0x2e,0xfc,0x57,0x29, -0xa4,0xaf,0xe0,0xee,0x93,0x19,0x39,0x51,0xe4,0x44,0xb8,0x0b,0x28,0xf4,0xa8, -0x0d }; -static const BYTE signedHash[] = { -0x08,0xd6,0xc0,0x5a,0x21,0x51,0x2a,0x79,0xa1,0xdf,0xeb,0x9d,0x2a,0x8f,0x26, -0x2f }; -static const BYTE signedKeyIdEmptyContent[] = { -0x30,0x46,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0,0x39, -0x30,0x37,0x02,0x01,0x03,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86, -0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x02,0x06,0x00,0x31,0x1e,0x30,0x1c,0x02, -0x01,0x03,0x80,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x02,0x05,0x05,0x00,0x30,0x04,0x06,0x00,0x05,0x00,0x04,0x00 }; -static const BYTE signedEncodedSigner[] = { -0x30,0x75,0x02,0x01,0x01,0x30,0x1a,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03, -0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00, -0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05, -0x05,0x00,0x30,0x04,0x06,0x00,0x05,0x00,0x04,0x40,0x81,0xa6,0x70,0xb3,0xef, -0x59,0xd1,0x66,0xd1,0x9b,0xc0,0x9a,0xb6,0x9a,0x5e,0x6d,0x6f,0x6d,0x0d,0x59, -0xa9,0xaa,0x6e,0xe9,0x2c,0xa0,0x1e,0xee,0xc2,0x60,0xbc,0x59,0xbe,0x3f,0x63, -0x06,0x8d,0xc9,0x11,0x1d,0x23,0x64,0x92,0xef,0x2e,0xfc,0x57,0x29,0xa4,0xaf, -0xe0,0xee,0x93,0x19,0x39,0x51,0xe4,0x44,0xb8,0x0b,0x28,0xf4,0xa8,0x0d }; -static const BYTE signedWithAuthAttrsBareContent[] = { -0x30,0x82,0x01,0x00,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x13,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x06,0x04,0x04,0x01,0x02,0x03,0x04,0x31, -0x81,0xd5,0x30,0x81,0xd2,0x02,0x01,0x01,0x30,0x1a,0x30,0x15,0x31,0x13,0x30, -0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61, -0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7, -0x0d,0x02,0x05,0x05,0x00,0xa0,0x5b,0x30,0x18,0x06,0x09,0x2a,0x86,0x48,0x86, -0xf7,0x0d,0x01,0x09,0x03,0x31,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x01,0x07,0x01,0x30,0x1e,0x06,0x03,0x55,0x04,0x03,0x31,0x17,0x30,0x15,0x31, -0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20, -0x4c,0x61,0x6e,0x67,0x00,0x30,0x1f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x01,0x09,0x04,0x31,0x12,0x04,0x10,0x08,0xd6,0xc0,0x5a,0x21,0x51,0x2a,0x79, -0xa1,0xdf,0xeb,0x9d,0x2a,0x8f,0x26,0x2f,0x30,0x04,0x06,0x00,0x05,0x00,0x04, -0x40,0xbf,0x65,0xde,0x7a,0x3e,0xa2,0x19,0x59,0xc3,0xc7,0x02,0x53,0xc9,0x72, -0xcd,0x74,0x96,0x70,0x0b,0x3b,0xcf,0x8b,0xd9,0x17,0x5c,0xc5,0xd1,0x83,0x41, -0x32,0x93,0xa6,0xf3,0x52,0x83,0x94,0xa9,0x6b,0x0a,0x92,0xcf,0xaf,0x12,0xfa, -0x40,0x53,0x12,0x84,0x03,0xab,0x10,0xa2,0x3d,0xe6,0x9f,0x5a,0xbf,0xc5,0xb8, -0xff,0xc6,0x33,0x63,0x34 }; -static BYTE cert[] = { -0x30,0x7a,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30,0x11, -0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30, -0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11,0x06, -0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67, -0x00,0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00,0xa3,0x16,0x30,0x14,0x30, -0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01, -0xff,0x02,0x01,0x01 }; -static BYTE v1CertWithPubKey[] = { -0x30,0x81,0x95,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30, -0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61, -0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31, -0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31, -0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11, -0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x00,0x30,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x01,0x01,0x05,0x00,0x03,0x11,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07, -0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0xa3,0x16,0x30,0x14,0x30,0x12,0x06, -0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02, -0x01,0x01 }; -static const BYTE signedWithCertEmptyBareContent[] = { -0x30,0x81,0xce,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x02,0x06,0x00,0xa0,0x7c,0x30,0x7a, -0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03, -0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00, -0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30, -0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55, -0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30, -0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00,0xa3,0x16,0x30,0x14,0x30,0x12,0x06, -0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02, -0x01,0x01,0x31,0x37,0x30,0x35,0x02,0x01,0x01,0x30,0x1a,0x30,0x15,0x31,0x13, -0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c, -0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86, -0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x04,0x06,0x00,0x05,0x00,0x04,0x00 }; -static const BYTE signedWithCertBareContent[] = { -0x30,0x82,0x01,0x1f,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x13,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x06,0x04,0x04,0x01,0x02,0x03,0x04,0xa0, -0x7c,0x30,0x7a,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30, -0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61, -0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31, -0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31, -0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11, -0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x00,0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00,0xa3,0x16,0x30,0x14, -0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01, -0x01,0xff,0x02,0x01,0x01,0x31,0x77,0x30,0x75,0x02,0x01,0x01,0x30,0x1a,0x30, -0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61, -0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x04,0x06,0x00,0x05,0x00, -0x04,0x40,0x81,0xa6,0x70,0xb3,0xef,0x59,0xd1,0x66,0xd1,0x9b,0xc0,0x9a,0xb6, -0x9a,0x5e,0x6d,0x6f,0x6d,0x0d,0x59,0xa9,0xaa,0x6e,0xe9,0x2c,0xa0,0x1e,0xee, -0xc2,0x60,0xbc,0x59,0xbe,0x3f,0x63,0x06,0x8d,0xc9,0x11,0x1d,0x23,0x64,0x92, -0xef,0x2e,0xfc,0x57,0x29,0xa4,0xaf,0xe0,0xee,0x93,0x19,0x39,0x51,0xe4,0x44, -0xb8,0x0b,0x28,0xf4,0xa8,0x0d }; -static BYTE crl[] = { 0x30,0x2c,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30, -0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61, -0x6e,0x67,0x00,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30, -0x30,0x30,0x30,0x30,0x5a }; -static const BYTE signedWithCrlEmptyBareContent[] = { -0x30,0x81,0x80,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x02,0x06,0x00,0xa1,0x2e,0x30,0x2c, -0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03, -0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x18,0x0f,0x31, -0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x31, -0x37,0x30,0x35,0x02,0x01,0x01,0x30,0x1a,0x30,0x15,0x31,0x13,0x30,0x11,0x06, -0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67, -0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02, -0x05,0x05,0x00,0x30,0x04,0x06,0x00,0x05,0x00,0x04,0x00 }; -static const BYTE signedWithCrlBareContent[] = { -0x30,0x81,0xd1,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x13,0x06,0x09,0x2a,0x86,0x48,0x86, -0xf7,0x0d,0x01,0x07,0x01,0xa0,0x06,0x04,0x04,0x01,0x02,0x03,0x04,0xa1,0x2e, -0x30,0x2c,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55, -0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x18, -0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30, -0x5a,0x31,0x77,0x30,0x75,0x02,0x01,0x01,0x30,0x1a,0x30,0x15,0x31,0x13,0x30, -0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61, -0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7, -0x0d,0x02,0x05,0x05,0x00,0x30,0x04,0x06,0x00,0x05,0x00,0x04,0x40,0x81,0xa6, -0x70,0xb3,0xef,0x59,0xd1,0x66,0xd1,0x9b,0xc0,0x9a,0xb6,0x9a,0x5e,0x6d,0x6f, -0x6d,0x0d,0x59,0xa9,0xaa,0x6e,0xe9,0x2c,0xa0,0x1e,0xee,0xc2,0x60,0xbc,0x59, -0xbe,0x3f,0x63,0x06,0x8d,0xc9,0x11,0x1d,0x23,0x64,0x92,0xef,0x2e,0xfc,0x57, -0x29,0xa4,0xaf,0xe0,0xee,0x93,0x19,0x39,0x51,0xe4,0x44,0xb8,0x0b,0x28,0xf4, -0xa8,0x0d }; -static const BYTE signedWithCertAndCrlEmptyBareContent[] = { -0x30,0x81,0xfe,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x02,0x06,0x00,0xa0,0x7c,0x30,0x7a, -0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03, -0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00, -0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30, -0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55, -0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30, -0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00,0xa3,0x16,0x30,0x14,0x30,0x12,0x06, -0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02, -0x01,0x01,0xa1,0x2e,0x30,0x2c,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30, -0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61, -0x6e,0x67,0x00,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30, -0x30,0x30,0x30,0x30,0x5a,0x31,0x37,0x30,0x35,0x02,0x01,0x01,0x30,0x1a,0x30, -0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61, -0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x04,0x06,0x00,0x05,0x00, -0x04,0x00 }; -static const BYTE signedWithCertAndCrlBareContent[] = { -0x30,0x82,0x01,0x4f,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x13,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x06,0x04,0x04,0x01,0x02,0x03,0x04,0xa0, -0x7c,0x30,0x7a,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30, -0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61, -0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31, -0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31, -0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11, -0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x00,0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00,0xa3,0x16,0x30,0x14, -0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01, -0x01,0xff,0x02,0x01,0x01,0xa1,0x2e,0x30,0x2c,0x30,0x02,0x06,0x00,0x30,0x15, -0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e, -0x20,0x4c,0x61,0x6e,0x67,0x00,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30, -0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x31,0x77,0x30,0x75,0x02,0x01,0x01, -0x30,0x1a,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a, -0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c, -0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x04,0x06, -0x00,0x05,0x00,0x04,0x40,0x81,0xa6,0x70,0xb3,0xef,0x59,0xd1,0x66,0xd1,0x9b, -0xc0,0x9a,0xb6,0x9a,0x5e,0x6d,0x6f,0x6d,0x0d,0x59,0xa9,0xaa,0x6e,0xe9,0x2c, -0xa0,0x1e,0xee,0xc2,0x60,0xbc,0x59,0xbe,0x3f,0x63,0x06,0x8d,0xc9,0x11,0x1d, -0x23,0x64,0x92,0xef,0x2e,0xfc,0x57,0x29,0xa4,0xaf,0xe0,0xee,0x93,0x19,0x39, -0x51,0xe4,0x44,0xb8,0x0b,0x28,0xf4,0xa8,0x0d }; -static const BYTE signedWithCertWithPubKeyBareContent[] = { -0x30,0x81,0xeb,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x02,0x06,0x00,0xa0,0x81,0x98,0x30, -0x81,0x95,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30,0x11, -0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30, -0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11,0x06, -0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67, -0x00,0x30,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01, -0x01,0x05,0x00,0x03,0x11,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08, -0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03, -0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01, -0x01,0x31,0x37,0x30,0x35,0x02,0x01,0x01,0x30,0x1a,0x30,0x15,0x31,0x13,0x30, -0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61, -0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7, -0x0d,0x02,0x05,0x05,0x00,0x30,0x04,0x06,0x00,0x05,0x00,0x04,0x00 }; -static BYTE v1CertWithValidPubKey[] = { -0x30,0x81,0xcf,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30, -0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61, -0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31, -0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31, -0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11, -0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x00,0x30,0x5c,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x01,0x01,0x05,0x00,0x03,0x4b,0x00,0x30,0x48,0x02,0x41,0x00,0xe2,0x54,0x3a, -0xa7,0x83,0xb1,0x27,0x14,0x3e,0x59,0xbb,0xb4,0x53,0xe6,0x1f,0xe7,0x5d,0xf1, -0x21,0x68,0xad,0x85,0x53,0xdb,0x6b,0x1e,0xeb,0x65,0x97,0x03,0x86,0x60,0xde, -0xf3,0x6c,0x38,0x75,0xe0,0x4c,0x61,0xbb,0xbc,0x62,0x17,0xa9,0xcd,0x79,0x3f, -0x21,0x4e,0x96,0xcb,0x0e,0xdc,0x61,0x94,0x30,0x18,0x10,0x6b,0xd0,0x1c,0x10, -0x79,0x02,0x03,0x01,0x00,0x01,0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03,0x55, -0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01 }; -static const BYTE signedWithCertWithValidPubKeyEmptyContent[] = { -0x30,0x82,0x01,0x38,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02, -0xa0,0x82,0x01,0x29,0x30,0x82,0x01,0x25,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c, -0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x02,0x06, -0x00,0xa0,0x81,0xd2,0x30,0x81,0xcf,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30, -0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61, -0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31, -0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36, -0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15, -0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e, -0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x5c,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x4b,0x00,0x30,0x48,0x02,0x41, -0x00,0xe2,0x54,0x3a,0xa7,0x83,0xb1,0x27,0x14,0x3e,0x59,0xbb,0xb4,0x53,0xe6, -0x1f,0xe7,0x5d,0xf1,0x21,0x68,0xad,0x85,0x53,0xdb,0x6b,0x1e,0xeb,0x65,0x97, -0x03,0x86,0x60,0xde,0xf3,0x6c,0x38,0x75,0xe0,0x4c,0x61,0xbb,0xbc,0x62,0x17, -0xa9,0xcd,0x79,0x3f,0x21,0x4e,0x96,0xcb,0x0e,0xdc,0x61,0x94,0x30,0x18,0x10, -0x6b,0xd0,0x1c,0x10,0x79,0x02,0x03,0x01,0x00,0x01,0xa3,0x16,0x30,0x14,0x30, -0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01, -0xff,0x02,0x01,0x01,0x31,0x37,0x30,0x35,0x02,0x01,0x01,0x30,0x1a,0x30,0x15, -0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e, -0x20,0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x04,0x06,0x00,0x05,0x00,0x04, -0x00 }; -static const BYTE signedWithCertWithValidPubKeyContent[] = { -0x30,0x82,0x01,0x89,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02, -0xa0,0x82,0x01,0x7a,0x30,0x82,0x01,0x76,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c, -0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x13,0x06, -0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x06,0x04,0x04,0x01, -0x02,0x03,0x04,0xa0,0x81,0xd2,0x30,0x81,0xcf,0x02,0x01,0x01,0x30,0x02,0x06, -0x00,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a, -0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36, -0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f, -0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a, -0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75, -0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x5c,0x30,0x0d,0x06,0x09,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x4b,0x00,0x30,0x48, -0x02,0x41,0x00,0xe2,0x54,0x3a,0xa7,0x83,0xb1,0x27,0x14,0x3e,0x59,0xbb,0xb4, -0x53,0xe6,0x1f,0xe7,0x5d,0xf1,0x21,0x68,0xad,0x85,0x53,0xdb,0x6b,0x1e,0xeb, -0x65,0x97,0x03,0x86,0x60,0xde,0xf3,0x6c,0x38,0x75,0xe0,0x4c,0x61,0xbb,0xbc, -0x62,0x17,0xa9,0xcd,0x79,0x3f,0x21,0x4e,0x96,0xcb,0x0e,0xdc,0x61,0x94,0x30, -0x18,0x10,0x6b,0xd0,0x1c,0x10,0x79,0x02,0x03,0x01,0x00,0x01,0xa3,0x16,0x30, -0x14,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06, -0x01,0x01,0xff,0x02,0x01,0x01,0x31,0x77,0x30,0x75,0x02,0x01,0x01,0x30,0x1a, -0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75, -0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08, -0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x04,0x06,0x00,0x05, -0x00,0x04,0x40,0x81,0xa6,0x70,0xb3,0xef,0x59,0xd1,0x66,0xd1,0x9b,0xc0,0x9a, -0xb6,0x9a,0x5e,0x6d,0x6f,0x6d,0x0d,0x59,0xa9,0xaa,0x6e,0xe9,0x2c,0xa0,0x1e, -0xee,0xc2,0x60,0xbc,0x59,0xbe,0x3f,0x63,0x06,0x8d,0xc9,0x11,0x1d,0x23,0x64, -0x92,0xef,0x2e,0xfc,0x57,0x29,0xa4,0xaf,0xe0,0xee,0x93,0x19,0x39,0x51,0xe4, -0x44,0xb8,0x0b,0x28,0xf4,0xa8,0x0d }; - -static void test_signed_msg_encoding(void) -{ - HCRYPTMSG msg; - CMSG_SIGNED_ENCODE_INFO signInfo = { sizeof(signInfo), 0 }; - CMSG_SIGNER_ENCODE_INFO signer = { sizeof(signer), 0 }; - CERT_INFO certInfo = { 0 }; - CERT_BLOB encodedCert = { sizeof(cert), cert }; - CRL_BLOB encodedCrl = { sizeof(crl), crl }; - char oid_common_name[] = szOID_COMMON_NAME; - CRYPT_ATTR_BLOB commonName = { sizeof(encodedCommonName), - encodedCommonName }; - CRYPT_ATTRIBUTE attr = { oid_common_name, 1, &commonName }; - BOOL ret; - HCRYPTKEY key; - DWORD size; - - certInfo.SerialNumber.cbData = sizeof(serialNum); - certInfo.SerialNumber.pbData = serialNum; - certInfo.Issuer.cbData = sizeof(encodedCommonName); - certInfo.Issuer.pbData = encodedCommonName; - signer.pCertInfo = &certInfo; - signer.HashAlgorithm.pszObjId = oid_rsa_md5; - signInfo.cSigners = 1; - signInfo.rgSigners = &signer; - - ret = pCryptAcquireContextA(&signer.hCryptProv, cspNameA, NULL, - PROV_RSA_FULL, CRYPT_NEWKEYSET); - if (!ret && GetLastError() == NTE_EXISTS) { - ret = pCryptAcquireContextA(&signer.hCryptProv, cspNameA, NULL, - PROV_RSA_FULL, 0); - } - ok(ret, "CryptAcquireContext failed: 0x%x\n", GetLastError()); - - if (!ret) { - skip("No context for tests\n"); - return; - } - - ret = CryptImportKey(signer.hCryptProv, privKey, sizeof(privKey), - 0, 0, &key); - ok(ret, "CryptImportKey failed: %08x\n", GetLastError()); - - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, - CMSG_DETACHED_FLAG, CMSG_SIGNED, &signInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - - check_param("detached signed empty bare content", msg, - CMSG_BARE_CONTENT_PARAM, signedEmptyBareContent, - sizeof(signedEmptyBareContent)); - check_param("detached signed empty content", msg, CMSG_CONTENT_PARAM, - signedEmptyContent, sizeof(signedEmptyContent)); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - check_param("detached signed hash", msg, CMSG_COMPUTED_HASH_PARAM, - signedHash, sizeof(signedHash)); - check_param("detached signed bare content", msg, CMSG_BARE_CONTENT_PARAM, - detachedSignedBareContent, sizeof(detachedSignedBareContent)); - check_param("detached signed content", msg, CMSG_CONTENT_PARAM, - detachedSignedContent, sizeof(detachedSignedContent)); - SetLastError(0xdeadbeef); - ret = CryptMsgGetParam(msg, CMSG_COMPUTED_HASH_PARAM, 1, NULL, &size); - ok(!ret && (GetLastError() == CRYPT_E_INVALID_INDEX || - broken(GetLastError() == CRYPT_E_INVALID_MSG_TYPE /* Win9x */)), - "Expected CRYPT_E_INVALID_INDEX, got %x\n", GetLastError()); - check_param("detached signed encoded signer", msg, CMSG_ENCODED_SIGNER, - signedEncodedSigner, sizeof(signedEncodedSigner)); - - CryptMsgClose(msg); - - certInfo.SerialNumber.cbData = 0; - certInfo.Issuer.cbData = 0; - signer.SignerId.dwIdChoice = CERT_ID_KEY_IDENTIFIER; - U(signer.SignerId).KeyId.cbData = sizeof(serialNum); - U(signer.SignerId).KeyId.pbData = serialNum; - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, - NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - check_param("signed key id empty content", msg, CMSG_CONTENT_PARAM, - signedKeyIdEmptyContent, sizeof(signedKeyIdEmptyContent)); - CryptMsgClose(msg); - - certInfo.SerialNumber.cbData = sizeof(serialNum); - certInfo.SerialNumber.pbData = serialNum; - certInfo.Issuer.cbData = sizeof(encodedCommonName); - certInfo.Issuer.pbData = encodedCommonName; - signer.SignerId.dwIdChoice = 0; - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, - NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - - check_param("signed empty bare content", msg, CMSG_BARE_CONTENT_PARAM, - signedEmptyBareContent, sizeof(signedEmptyBareContent)); - check_param("signed empty content", msg, CMSG_CONTENT_PARAM, - signedEmptyContent, sizeof(signedEmptyContent)); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - check_param("signed bare content", msg, CMSG_BARE_CONTENT_PARAM, - signedBareContent, sizeof(signedBareContent)); - check_param("signed content", msg, CMSG_CONTENT_PARAM, - signedContent, sizeof(signedContent)); - - CryptMsgClose(msg); - - signer.cAuthAttr = 1; - signer.rgAuthAttr = &attr; - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, - NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - - CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - check_param("signed with auth attrs bare content", msg, - CMSG_BARE_CONTENT_PARAM, signedWithAuthAttrsBareContent, - sizeof(signedWithAuthAttrsBareContent)); - - CryptMsgClose(msg); - - signer.cAuthAttr = 0; - signInfo.rgCertEncoded = &encodedCert; - signInfo.cCertEncoded = 1; - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, - NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - - check_param("signed with cert empty bare content", msg, - CMSG_BARE_CONTENT_PARAM, signedWithCertEmptyBareContent, - sizeof(signedWithCertEmptyBareContent)); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - check_param("signed with cert bare content", msg, CMSG_BARE_CONTENT_PARAM, - signedWithCertBareContent, sizeof(signedWithCertBareContent)); - - CryptMsgClose(msg); - - signInfo.cCertEncoded = 0; - signInfo.rgCrlEncoded = &encodedCrl; - signInfo.cCrlEncoded = 1; - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, - NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - - check_param("signed with crl empty bare content", msg, - CMSG_BARE_CONTENT_PARAM, signedWithCrlEmptyBareContent, - sizeof(signedWithCrlEmptyBareContent)); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - check_param("signed with crl bare content", msg, CMSG_BARE_CONTENT_PARAM, - signedWithCrlBareContent, sizeof(signedWithCrlBareContent)); - - CryptMsgClose(msg); - - signInfo.cCertEncoded = 1; - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, - NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - - check_param("signed with cert and crl empty bare content", msg, - CMSG_BARE_CONTENT_PARAM, signedWithCertAndCrlEmptyBareContent, - sizeof(signedWithCertAndCrlEmptyBareContent)); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - check_param("signed with cert and crl bare content", msg, - CMSG_BARE_CONTENT_PARAM, signedWithCertAndCrlBareContent, - sizeof(signedWithCertAndCrlBareContent)); - - CryptMsgClose(msg); - - /* Test with a cert with a (bogus) public key */ - signInfo.cCrlEncoded = 0; - encodedCert.cbData = sizeof(v1CertWithPubKey); - encodedCert.pbData = v1CertWithPubKey; - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, - NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - check_param("signedWithCertWithPubKeyBareContent", msg, - CMSG_BARE_CONTENT_PARAM, signedWithCertWithPubKeyBareContent, - sizeof(signedWithCertWithPubKeyBareContent)); - CryptMsgClose(msg); - - encodedCert.cbData = sizeof(v1CertWithValidPubKey); - encodedCert.pbData = v1CertWithValidPubKey; - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, - NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - check_param("signedWithCertWithValidPubKeyEmptyContent", msg, - CMSG_CONTENT_PARAM, signedWithCertWithValidPubKeyEmptyContent, - sizeof(signedWithCertWithValidPubKeyEmptyContent)); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - check_param("signedWithCertWithValidPubKeyContent", msg, - CMSG_CONTENT_PARAM, signedWithCertWithValidPubKeyContent, - sizeof(signedWithCertWithValidPubKeyContent)); - CryptMsgClose(msg); - - CryptDestroyKey(key); - CryptReleaseContext(signer.hCryptProv, 0); - pCryptAcquireContextA(&signer.hCryptProv, cspNameA, NULL, PROV_RSA_FULL, - CRYPT_DELETEKEYSET); -} - -static void test_signed_msg_get_param(void) -{ - BOOL ret; - HCRYPTMSG msg; - DWORD size, value = 0; - CMSG_SIGNED_ENCODE_INFO signInfo = { sizeof(signInfo), 0 }; - CMSG_SIGNER_ENCODE_INFO signer = { sizeof(signer), 0 }; - CERT_INFO certInfo = { 0 }; - - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, - NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - - /* Content and bare content are always gettable */ - size = 0; - ret = CryptMsgGetParam(msg, CMSG_CONTENT_PARAM, 0, NULL, &size); - ok(ret || broken(!ret /* Win9x */), "CryptMsgGetParam failed: %08x\n", - GetLastError()); - if (!ret) - { - skip("message parameters are broken, skipping tests\n"); - return; - } - size = 0; - ret = CryptMsgGetParam(msg, CMSG_BARE_CONTENT_PARAM, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - /* For "signed" messages, so is the version. */ - size = 0; - ret = CryptMsgGetParam(msg, CMSG_VERSION_PARAM, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - size = sizeof(value); - ret = CryptMsgGetParam(msg, CMSG_VERSION_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - ok(value == CMSG_SIGNED_DATA_V1, "Expected version 1, got %d\n", value); - /* But for this message, with no signers, the hash and signer aren't - * available. - */ - size = 0; - SetLastError(0xdeadbeef); - ret = CryptMsgGetParam(msg, CMSG_ENCODED_SIGNER, 0, NULL, &size); - ok(!ret && GetLastError() == CRYPT_E_INVALID_INDEX, - "Expected CRYPT_E_INVALID_INDEX, got %x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptMsgGetParam(msg, CMSG_COMPUTED_HASH_PARAM, 0, NULL, &size); - ok(!ret && GetLastError() == CRYPT_E_INVALID_INDEX, - "Expected CRYPT_E_INVALID_INDEX, got %x\n", GetLastError()); - /* As usual, the type isn't available. */ - ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, NULL, &size); - ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %x\n", GetLastError()); - - CryptMsgClose(msg); - - certInfo.SerialNumber.cbData = sizeof(serialNum); - certInfo.SerialNumber.pbData = serialNum; - certInfo.Issuer.cbData = sizeof(encodedCommonName); - certInfo.Issuer.pbData = encodedCommonName; - signer.pCertInfo = &certInfo; - signer.HashAlgorithm.pszObjId = oid_rsa_md5; - signInfo.cSigners = 1; - signInfo.rgSigners = &signer; - - ret = pCryptAcquireContextA(&signer.hCryptProv, cspNameA, NULL, - PROV_RSA_FULL, CRYPT_NEWKEYSET); - if (!ret && GetLastError() == NTE_EXISTS) { - ret = pCryptAcquireContextA(&signer.hCryptProv, cspNameA, NULL, - PROV_RSA_FULL, 0); - } - ok(ret, "CryptAcquireContext failed: 0x%x\n", GetLastError()); - - if (!ret) { - skip("No context for tests\n"); - return; - } - - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, - NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - - /* This message, with one signer, has the hash and signer for index 0 - * available, but not for other indexes. - */ - size = 0; - ret = CryptMsgGetParam(msg, CMSG_ENCODED_SIGNER, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %x\n", GetLastError()); - ret = CryptMsgGetParam(msg, CMSG_COMPUTED_HASH_PARAM, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %x\n", GetLastError()); - size = 0; - SetLastError(0xdeadbeef); - ret = CryptMsgGetParam(msg, CMSG_ENCODED_SIGNER, 1, NULL, &size); - ok(!ret && GetLastError() == CRYPT_E_INVALID_INDEX, - "Expected CRYPT_E_INVALID_INDEX, got %x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptMsgGetParam(msg, CMSG_COMPUTED_HASH_PARAM, 1, NULL, &size); - ok(!ret && GetLastError() == CRYPT_E_INVALID_INDEX, - "Expected CRYPT_E_INVALID_INDEX, got %x\n", GetLastError()); - /* As usual, the type isn't available. */ - ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, NULL, &size); - ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %x\n", GetLastError()); - - CryptMsgClose(msg); - - /* Opening the message using the CMS fields.. */ - certInfo.SerialNumber.cbData = 0; - certInfo.Issuer.cbData = 0; - signer.SignerId.dwIdChoice = CERT_ID_ISSUER_SERIAL_NUMBER; - U(signer.SignerId).IssuerSerialNumber.Issuer.cbData = - sizeof(encodedCommonName); - U(signer.SignerId).IssuerSerialNumber.Issuer.pbData = encodedCommonName; - U(signer.SignerId).IssuerSerialNumber.SerialNumber.cbData = - sizeof(serialNum); - U(signer.SignerId).IssuerSerialNumber.SerialNumber.pbData = serialNum; - ret = pCryptAcquireContextA(&signer.hCryptProv, cspNameA, NULL, - PROV_RSA_FULL, CRYPT_NEWKEYSET); - if (!ret && GetLastError() == NTE_EXISTS) - ret = pCryptAcquireContextA(&signer.hCryptProv, cspNameA, NULL, - PROV_RSA_FULL, 0); - ok(ret, "CryptAcquireContextA failed: %x\n", GetLastError()); - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, - CMSG_CRYPT_RELEASE_CONTEXT_FLAG, CMSG_SIGNED, &signInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - /* still results in the version being 1 when the issuer and serial number - * are used and no additional CMS fields are used. - */ - size = sizeof(value); - ret = CryptMsgGetParam(msg, CMSG_VERSION_PARAM, 0, &value, &size); - ok(ret || broken(GetLastError() == CRYPT_E_INVALID_MSG_TYPE), - "CryptMsgGetParam failed: %08x\n", GetLastError()); - if (ret) - ok(value == CMSG_SIGNED_DATA_V1, "expected version 1, got %d\n", value); - /* Apparently the encoded signer can be retrieved.. */ - ret = CryptMsgGetParam(msg, CMSG_ENCODED_SIGNER, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - /* but the signer info, CMS signer info, and cert ID can't be. */ - SetLastError(0xdeadbeef); - ret = CryptMsgGetParam(msg, CMSG_SIGNER_INFO_PARAM, 0, NULL, &size); - ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptMsgGetParam(msg, CMSG_CMS_SIGNER_INFO_PARAM, 0, NULL, &size); - ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptMsgGetParam(msg, CMSG_SIGNER_CERT_ID_PARAM, 0, NULL, &size); - ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); - CryptMsgClose(msg); - - /* Using the KeyId field of the SignerId results in the version becoming - * the CMS version. - */ - signer.SignerId.dwIdChoice = CERT_ID_KEY_IDENTIFIER; - U(signer.SignerId).KeyId.cbData = sizeof(serialNum); - U(signer.SignerId).KeyId.pbData = serialNum; - ret = pCryptAcquireContextA(&signer.hCryptProv, cspNameA, NULL, - PROV_RSA_FULL, CRYPT_NEWKEYSET); - if (!ret && GetLastError() == NTE_EXISTS) - ret = pCryptAcquireContextA(&signer.hCryptProv, cspNameA, NULL, - PROV_RSA_FULL, 0); - ok(ret, "CryptAcquireContextA failed: %x\n", GetLastError()); - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, - CMSG_CRYPT_RELEASE_CONTEXT_FLAG, CMSG_SIGNED, &signInfo, NULL, NULL); - ok(msg != NULL, "CryptMsgOpenToEncode failed: %x\n", GetLastError()); - size = sizeof(value); - ret = CryptMsgGetParam(msg, CMSG_VERSION_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - if (ret) - ok(value == CMSG_SIGNED_DATA_V3, "expected version 3, got %d\n", value); - /* Even for a CMS message, the signer can be retrieved.. */ - ret = CryptMsgGetParam(msg, CMSG_ENCODED_SIGNER, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - /* but the signer info, CMS signer info, and cert ID can't be. */ - SetLastError(0xdeadbeef); - ret = CryptMsgGetParam(msg, CMSG_SIGNER_INFO_PARAM, 0, NULL, &size); - ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptMsgGetParam(msg, CMSG_CMS_SIGNER_INFO_PARAM, 0, NULL, &size); - ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptMsgGetParam(msg, CMSG_SIGNER_CERT_ID_PARAM, 0, NULL, &size); - ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); - CryptMsgClose(msg); - - CryptReleaseContext(signer.hCryptProv, 0); - pCryptAcquireContextA(&signer.hCryptProv, cspNameA, MS_DEF_PROV_A, - PROV_RSA_FULL, CRYPT_DELETEKEYSET); -} - -static void test_signed_msg(void) -{ - test_signed_msg_open(); - test_signed_msg_update(); - test_signed_msg_encoding(); - test_signed_msg_get_param(); -} - -static CRYPT_DATA_BLOB b4 = { 0, NULL }; -static const struct update_accum a4 = { 1, &b4 }; - -static const BYTE bogusOIDContent[] = { -0x30,0x0f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x07,0xa0,0x02, -0x04,0x00 }; -static const BYTE bogusHashContent[] = { -0x30,0x47,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x05,0xa0,0x3a, -0x30,0x38,0x02,0x01,0x00,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x02,0x05,0x05,0x00,0x30,0x13,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x07,0x01,0xa0,0x06,0x04,0x04,0x01,0x02,0x03,0x04,0x04,0x10,0x00,0xd6,0xc0, -0x5a,0x21,0x51,0x2a,0x79,0xa1,0xdf,0xeb,0x9d,0x2a,0x8f,0x26,0x2f }; - -static void test_decode_msg_update(void) -{ - HCRYPTMSG msg; - BOOL ret; - CMSG_STREAM_INFO streamInfo = { 0 }; - DWORD i; - struct update_accum accum = { 0, NULL }; - - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - /* Update with a full message in a final update */ - ret = CryptMsgUpdate(msg, dataEmptyContent, sizeof(dataEmptyContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - /* Can't update after a final update */ - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, dataEmptyContent, sizeof(dataEmptyContent), TRUE); - ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "Expected CRYPT_E_MSG_ERROR, got %x\n", GetLastError()); - CryptMsgClose(msg); - - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - /* Can't send a non-final update without streaming */ - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, dataEmptyContent, sizeof(dataEmptyContent), - FALSE); - ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "Expected CRYPT_E_MSG_ERROR, got %x\n", GetLastError()); - /* A subsequent final update succeeds */ - ret = CryptMsgUpdate(msg, dataEmptyContent, sizeof(dataEmptyContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - CryptMsgClose(msg); - - if (!old_crypt32) - { - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, &streamInfo); - /* Updating a message that has a NULL stream callback fails */ - SetLastError(0xdeadbeef); - /* Crashes on some Win9x */ - ret = CryptMsgUpdate(msg, dataEmptyContent, sizeof(dataEmptyContent), - FALSE); - todo_wine - ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || - GetLastError() == STATUS_ILLEGAL_INSTRUCTION /* WinME */), - "Expected STATUS_ACCESS_VIOLATION or STATUS_ILLEGAL_INSTRUCTION, got %x\n", - GetLastError()); - /* Changing the callback pointer after the fact yields the same error (so - * the message must copy the stream info, not just store a pointer to it) - */ - streamInfo.pfnStreamOutput = nop_stream_output; - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, dataEmptyContent, sizeof(dataEmptyContent), - FALSE); - todo_wine - ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || - GetLastError() == STATUS_ILLEGAL_INSTRUCTION /* WinME */), - "Expected STATUS_ACCESS_VIOLATION or STATUS_ILLEGAL_INSTRUCTION, got %x\n", - GetLastError()); - CryptMsgClose(msg); - } - - /* Empty non-final updates are allowed when streaming.. */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, &streamInfo); - ret = CryptMsgUpdate(msg, NULL, 0, FALSE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - /* but final updates aren't when not enough data has been received. */ - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - todo_wine - ok(!ret && GetLastError() == CRYPT_E_STREAM_INSUFFICIENT_DATA, - "Expected CRYPT_E_STREAM_INSUFFICIENT_DATA, got %x\n", GetLastError()); - CryptMsgClose(msg); - - /* Updating the message byte by byte is legal */ - streamInfo.pfnStreamOutput = accumulating_stream_output; - streamInfo.pvArg = &accum; - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, &streamInfo); - for (i = 0, ret = TRUE; ret && i < sizeof(dataEmptyContent); i++) - ret = CryptMsgUpdate(msg, &dataEmptyContent[i], 1, FALSE); - ok(ret, "CryptMsgUpdate failed on byte %d: %x\n", i, GetLastError()); - ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(ret, "CryptMsgUpdate failed on byte %d: %x\n", i, GetLastError()); - CryptMsgClose(msg); - todo_wine - check_updates("byte-by-byte empty content", &a4, &accum); - free_updates(&accum); - - /* Decoding bogus content fails in non-streaming mode.. */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == OSS_PDU_MISMATCH /* Win9x */), - "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH, got %x\n", - GetLastError()); - CryptMsgClose(msg); - /* and as the final update in streaming mode.. */ - streamInfo.pfnStreamOutput = nop_stream_output; - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, &streamInfo); - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == OSS_PDU_MISMATCH /* Win9x */), - "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH, got %x\n", - GetLastError()); - CryptMsgClose(msg); - /* and even as a non-final update in streaming mode. */ - streamInfo.pfnStreamOutput = nop_stream_output; - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, &streamInfo); - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); - todo_wine - ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == OSS_PDU_MISMATCH /* Win9x */), - "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH, got %x\n", - GetLastError()); - CryptMsgClose(msg); - - /* An empty message can be opened with undetermined type.. */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - ret = CryptMsgUpdate(msg, dataEmptyContent, sizeof(dataEmptyContent), - TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - CryptMsgClose(msg); - /* but decoding it as an explicitly typed message fails. */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, 0, NULL, - NULL); - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, dataEmptyContent, sizeof(dataEmptyContent), - TRUE); - ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == OSS_PDU_MISMATCH /* Win9x */), - "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH, got %x\n", - GetLastError()); - CryptMsgClose(msg); - /* On the other hand, decoding the bare content of an empty message fails - * with unspecified type.. - */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, dataEmptyBareContent, - sizeof(dataEmptyBareContent), TRUE); - ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == OSS_PDU_MISMATCH /* Win9x */), - "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH, got %x\n", - GetLastError()); - CryptMsgClose(msg); - /* but succeeds with explicit type. */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, 0, NULL, - NULL); - ret = CryptMsgUpdate(msg, dataEmptyBareContent, - sizeof(dataEmptyBareContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - CryptMsgClose(msg); - - /* Decoding valid content with an unsupported OID fails */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, bogusOIDContent, sizeof(bogusOIDContent), TRUE); - ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %x\n", GetLastError()); - CryptMsgClose(msg); - - /* Similarly, opening an empty hash with unspecified type succeeds.. */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, hashEmptyContent, sizeof(hashEmptyContent), TRUE); - ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* Win9x */), - "CryptMsgUpdate failed: %08x\n", GetLastError()); - CryptMsgClose(msg); - /* while with specified type it fails. */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, 0, NULL, - NULL); - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, hashEmptyContent, sizeof(hashEmptyContent), TRUE); - ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == OSS_PDU_MISMATCH /* some Win9x */ || - GetLastError() == OSS_DATA_ERROR /* some Win9x */), - "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH or OSS_DATA_ERROR, got %x\n", - GetLastError()); - CryptMsgClose(msg); - /* On the other hand, decoding the bare content of an empty hash message - * fails with unspecified type.. - */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, hashEmptyBareContent, - sizeof(hashEmptyBareContent), TRUE); - ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == OSS_PDU_MISMATCH /* some Win9x */ || - GetLastError() == OSS_DATA_ERROR /* some Win9x */), - "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH or OSS_DATA_ERROR, got %x\n", - GetLastError()); - CryptMsgClose(msg); - /* but succeeds with explicit type. */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, 0, NULL, - NULL); - ret = CryptMsgUpdate(msg, hashEmptyBareContent, - sizeof(hashEmptyBareContent), TRUE); - ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* win9x */), - "CryptMsgUpdate failed: %x\n", GetLastError()); - CryptMsgClose(msg); - - /* And again, opening a (non-empty) hash message with unspecified type - * succeeds.. - */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, hashContent, sizeof(hashContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); - CryptMsgClose(msg); - /* while with specified type it fails.. */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, 0, NULL, - NULL); - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, hashContent, sizeof(hashContent), TRUE); - ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == OSS_PDU_MISMATCH /* some Win9x */ || - GetLastError() == OSS_DATA_ERROR /* some Win9x */), - "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH or OSS_DATA_ERROR, got %x\n", - GetLastError()); - CryptMsgClose(msg); - /* and decoding the bare content of a non-empty hash message fails with - * unspecified type.. - */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, hashBareContent, sizeof(hashBareContent), TRUE); - ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == OSS_PDU_MISMATCH /* some Win9x */ || - GetLastError() == OSS_DATA_ERROR /* some Win9x */), - "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH or OSS_DATA_ERROR, got %x\n", - GetLastError()); - CryptMsgClose(msg); - /* but succeeds with explicit type. */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, 0, NULL, - NULL); - ret = CryptMsgUpdate(msg, hashBareContent, sizeof(hashBareContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); - CryptMsgClose(msg); - - /* Opening a (non-empty) hash message with unspecified type and a bogus - * hash value succeeds.. - */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, bogusHashContent, sizeof(bogusHashContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); - CryptMsgClose(msg); - - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - ret = CryptMsgUpdate(msg, signedContent, sizeof(signedContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); - CryptMsgClose(msg); - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, signedWithCertAndCrlBareContent, - sizeof(signedWithCertAndCrlBareContent), TRUE); - ok(!ret && (GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == OSS_DATA_ERROR /* Win9x */), - "Expected CRYPT_E_ASN1_BADTAG or OSS_DATA_ERROR, got %08x\n", - GetLastError()); - CryptMsgClose(msg); - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, 0, NULL, - NULL); - ret = CryptMsgUpdate(msg, signedWithCertAndCrlBareContent, - sizeof(signedWithCertAndCrlBareContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); - CryptMsgClose(msg); - - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, 0, 0, - NULL, NULL); - /* The first update succeeds.. */ - ret = CryptMsgUpdate(msg, detachedSignedContent, - sizeof(detachedSignedContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); - /* as does a second (probably to update the detached portion).. */ - ret = CryptMsgUpdate(msg, detachedSignedContent, - sizeof(detachedSignedContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); - /* while a third fails. */ - ret = CryptMsgUpdate(msg, detachedSignedContent, - sizeof(detachedSignedContent), TRUE); - ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "expected CRYPT_E_MSG_ERROR, got %08x\n", GetLastError()); - CryptMsgClose(msg); - - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, 0, 0, NULL, &streamInfo); - ret = CryptMsgUpdate(msg, detachedSignedContent, sizeof(detachedSignedContent), FALSE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); - ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); - ret = CryptMsgUpdate(msg, detachedSignedContent, sizeof(detachedSignedContent), FALSE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); - ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); - - ret = CryptMsgUpdate(msg, detachedSignedContent, sizeof(detachedSignedContent), TRUE); - ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, - "expected CRYPT_E_MSG_ERROR, got %08x\n", GetLastError()); - CryptMsgClose(msg); -} - -static const BYTE hashParam[] = { 0x08,0xd6,0xc0,0x5a,0x21,0x51,0x2a,0x79,0xa1, - 0xdf,0xeb,0x9d,0x2a,0x8f,0x26,0x2f }; - -static void compare_signer_info(const CMSG_SIGNER_INFO *got, - const CMSG_SIGNER_INFO *expected) -{ - ok(got->dwVersion == expected->dwVersion, "Expected version %d, got %d\n", - expected->dwVersion, got->dwVersion); - ok(got->Issuer.cbData == expected->Issuer.cbData, - "Expected issuer size %d, got %d\n", expected->Issuer.cbData, - got->Issuer.cbData); - ok(!memcmp(got->Issuer.pbData, got->Issuer.pbData, got->Issuer.cbData), - "Unexpected issuer\n"); - ok(got->SerialNumber.cbData == expected->SerialNumber.cbData, - "Expected serial number size %d, got %d\n", expected->SerialNumber.cbData, - got->SerialNumber.cbData); - ok(!memcmp(got->SerialNumber.pbData, got->SerialNumber.pbData, - got->SerialNumber.cbData), "Unexpected serial number\n"); - /* FIXME: check more things */ -} - -static void compare_cms_signer_info(const CMSG_CMS_SIGNER_INFO *got, - const CMSG_CMS_SIGNER_INFO *expected) -{ - ok(got->dwVersion == expected->dwVersion, "Expected version %d, got %d\n", - expected->dwVersion, got->dwVersion); - ok(got->SignerId.dwIdChoice == expected->SignerId.dwIdChoice, - "Expected id choice %d, got %d\n", expected->SignerId.dwIdChoice, - got->SignerId.dwIdChoice); - if (got->SignerId.dwIdChoice == expected->SignerId.dwIdChoice) - { - if (got->SignerId.dwIdChoice == CERT_ID_ISSUER_SERIAL_NUMBER) - { - ok(U(got->SignerId).IssuerSerialNumber.Issuer.cbData == - U(expected->SignerId).IssuerSerialNumber.Issuer.cbData, - "Expected issuer size %d, got %d\n", - U(expected->SignerId).IssuerSerialNumber.Issuer.cbData, - U(got->SignerId).IssuerSerialNumber.Issuer.cbData); - ok(!memcmp(U(got->SignerId).IssuerSerialNumber.Issuer.pbData, - U(expected->SignerId).IssuerSerialNumber.Issuer.pbData, - U(got->SignerId).IssuerSerialNumber.Issuer.cbData), - "Unexpected issuer\n"); - ok(U(got->SignerId).IssuerSerialNumber.SerialNumber.cbData == - U(expected->SignerId).IssuerSerialNumber.SerialNumber.cbData, - "Expected serial number size %d, got %d\n", - U(expected->SignerId).IssuerSerialNumber.SerialNumber.cbData, - U(got->SignerId).IssuerSerialNumber.SerialNumber.cbData); - ok(!memcmp(U(got->SignerId).IssuerSerialNumber.SerialNumber.pbData, - U(expected->SignerId).IssuerSerialNumber.SerialNumber.pbData, - U(got->SignerId).IssuerSerialNumber.SerialNumber.cbData), - "Unexpected serial number\n"); - } - else - { - ok(U(got->SignerId).KeyId.cbData == U(expected->SignerId).KeyId.cbData, - "expected key id size %d, got %d\n", - U(expected->SignerId).KeyId.cbData, U(got->SignerId).KeyId.cbData); - ok(!memcmp(U(expected->SignerId).KeyId.pbData, - U(got->SignerId).KeyId.pbData, U(got->SignerId).KeyId.cbData), - "unexpected key id\n"); - } - } - /* FIXME: check more things */ -} - -static const BYTE signedWithCertAndCrlComputedHash[] = { -0x08,0xd6,0xc0,0x5a,0x21,0x51,0x2a,0x79,0xa1,0xdf,0xeb,0x9d,0x2a,0x8f,0x26, -0x2f }; -static BYTE keyIdIssuer[] = { -0x30,0x13,0x31,0x11,0x30,0x0f,0x06,0x0a,0x2b,0x06,0x01,0x04,0x01,0x82,0x37, -0x0a,0x07,0x01,0x04,0x01,0x01 }; - -static void test_decode_msg_get_param(void) -{ - HCRYPTMSG msg; - BOOL ret; - DWORD size = 0, value; - LPBYTE buf; - - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - SetLastError(0xdeadbeef); - ret = CryptMsgGetParam(msg, CMSG_CONTENT_PARAM, 0, NULL, &size); - ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %x\n", GetLastError()); - ret = CryptMsgUpdate(msg, dataContent, sizeof(dataContent), TRUE); - check_param("data content", msg, CMSG_CONTENT_PARAM, msgData, - sizeof(msgData)); - CryptMsgClose(msg); - - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - ret = CryptMsgUpdate(msg, hashEmptyContent, sizeof(hashEmptyContent), TRUE); - if (ret) - { - /* Crashes on some Win9x */ - check_param("empty hash content", msg, CMSG_CONTENT_PARAM, NULL, 0); - check_param("empty hash hash data", msg, CMSG_HASH_DATA_PARAM, NULL, 0); - check_param("empty hash computed hash", msg, CMSG_COMPUTED_HASH_PARAM, - emptyHashParam, sizeof(emptyHashParam)); - } - CryptMsgClose(msg); - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - ret = CryptMsgUpdate(msg, hashContent, sizeof(hashContent), TRUE); - check_param("hash content", msg, CMSG_CONTENT_PARAM, msgData, - sizeof(msgData)); - check_param("hash hash data", msg, CMSG_HASH_DATA_PARAM, hashParam, - sizeof(hashParam)); - check_param("hash computed hash", msg, CMSG_COMPUTED_HASH_PARAM, - hashParam, sizeof(hashParam)); - /* Curiously, on NT-like systems, getting the hash of index 1 succeeds, - * even though there's only one hash. - */ - ret = CryptMsgGetParam(msg, CMSG_COMPUTED_HASH_PARAM, 1, NULL, &size); - ok(ret || GetLastError() == OSS_DATA_ERROR /* Win9x */, - "CryptMsgGetParam failed: %08x\n", GetLastError()); - if (ret) - buf = CryptMemAlloc(size); - else - buf = NULL; - if (buf) - { - ret = CryptMsgGetParam(msg, CMSG_COMPUTED_HASH_PARAM, 1, buf, &size); - ok(size == sizeof(hashParam), "Unexpected size %d\n", size); - ok(!memcmp(buf, hashParam, size), "Unexpected value\n"); - CryptMemFree(buf); - } - check_param("hash inner OID", msg, CMSG_INNER_CONTENT_TYPE_PARAM, - (const BYTE *)szOID_RSA_data, strlen(szOID_RSA_data) + 1); - value = CMSG_HASHED_DATA_V0; - check_param("hash version", msg, CMSG_VERSION_PARAM, (const BYTE *)&value, - sizeof(value)); - CryptMsgClose(msg); - - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - ret = CryptMsgUpdate(msg, signedContent, sizeof(signedContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); - check_param("signed content", msg, CMSG_CONTENT_PARAM, msgData, - sizeof(msgData)); - check_param("inner content", msg, CMSG_INNER_CONTENT_TYPE_PARAM, - (const BYTE *)szOID_RSA_data, strlen(szOID_RSA_data) + 1); - size = sizeof(value); - value = 2112; - ret = CryptMsgGetParam(msg, CMSG_SIGNER_COUNT_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - ok(value == 1, "Expected 1 signer, got %d\n", value); - size = 0; - ret = CryptMsgGetParam(msg, CMSG_SIGNER_INFO_PARAM, 0, NULL, &size); - ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* Win9x */), - "CryptMsgGetParam failed: %08x\n", GetLastError()); - if (ret) - buf = CryptMemAlloc(size); - else - buf = NULL; - if (buf) - { - CMSG_SIGNER_INFO signer = { 0 }; - - signer.dwVersion = 1; - signer.Issuer.cbData = sizeof(encodedCommonName); - signer.Issuer.pbData = encodedCommonName; - signer.SerialNumber.cbData = sizeof(serialNum); - signer.SerialNumber.pbData = serialNum; - signer.HashAlgorithm.pszObjId = oid_rsa_md5; - CryptMsgGetParam(msg, CMSG_SIGNER_INFO_PARAM, 0, buf, &size); - compare_signer_info((CMSG_SIGNER_INFO *)buf, &signer); - CryptMemFree(buf); - } - /* Getting the CMS signer info of a PKCS7 message is possible. */ - size = 0; - ret = CryptMsgGetParam(msg, CMSG_CMS_SIGNER_INFO_PARAM, 0, NULL, &size); - ok(ret || broken(GetLastError() == CRYPT_E_INVALID_MSG_TYPE /* Win9x */), - "CryptMsgGetParam failed: %08x\n", GetLastError()); - if (ret) - buf = CryptMemAlloc(size); - else - buf = NULL; - if (buf) - { - CMSG_CMS_SIGNER_INFO signer = { 0 }; - - signer.dwVersion = 1; - signer.SignerId.dwIdChoice = CERT_ID_ISSUER_SERIAL_NUMBER; - U(signer.SignerId).IssuerSerialNumber.Issuer.cbData = - sizeof(encodedCommonName); - U(signer.SignerId).IssuerSerialNumber.Issuer.pbData = encodedCommonName; - U(signer.SignerId).IssuerSerialNumber.SerialNumber.cbData = - sizeof(serialNum); - U(signer.SignerId).IssuerSerialNumber.SerialNumber.pbData = serialNum; - signer.HashAlgorithm.pszObjId = oid_rsa_md5; - CryptMsgGetParam(msg, CMSG_CMS_SIGNER_INFO_PARAM, 0, buf, &size); - compare_cms_signer_info((CMSG_CMS_SIGNER_INFO *)buf, &signer); - CryptMemFree(buf); - } - /* index is ignored when getting signer count */ - size = sizeof(value); - ret = CryptMsgGetParam(msg, CMSG_SIGNER_COUNT_PARAM, 1, &value, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - ok(value == 1, "Expected 1 signer, got %d\n", value); - ret = CryptMsgGetParam(msg, CMSG_CERT_COUNT_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - ok(value == 0, "Expected 0 certs, got %d\n", value); - ret = CryptMsgGetParam(msg, CMSG_CRL_COUNT_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - ok(value == 0, "Expected 0 CRLs, got %d\n", value); - CryptMsgClose(msg); - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, 0, NULL, - NULL); - ret = CryptMsgUpdate(msg, signedWithCertAndCrlBareContent, - sizeof(signedWithCertAndCrlBareContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); - ret = CryptMsgGetParam(msg, CMSG_CERT_COUNT_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - ok(value == 1, "Expected 1 cert, got %d\n", value); - check_param("cert", msg, CMSG_CERT_PARAM, cert, sizeof(cert)); - ret = CryptMsgGetParam(msg, CMSG_CRL_COUNT_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - ok(value == 1, "Expected 1 CRL, got %d\n", value); - check_param("crl", msg, CMSG_CRL_PARAM, crl, sizeof(crl)); - check_param("signed with cert and CRL computed hash", msg, - CMSG_COMPUTED_HASH_PARAM, signedWithCertAndCrlComputedHash, - sizeof(signedWithCertAndCrlComputedHash)); - CryptMsgClose(msg); - - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - ret = CryptMsgUpdate(msg, signedKeyIdEmptyContent, - sizeof(signedKeyIdEmptyContent), TRUE); - if (!ret && GetLastError() == OSS_DATA_ERROR) - { - CryptMsgClose(msg); - win_skip("Subsequent tests crash on some Win9x\n"); - return; - } - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); - size = sizeof(value); - ret = CryptMsgGetParam(msg, CMSG_SIGNER_COUNT_PARAM, 0, &value, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - ok(value == 1, "Expected 1 signer, got %d\n", value); - /* Getting the regular (non-CMS) signer info from a CMS message is also - * possible.. - */ - size = 0; - ret = CryptMsgGetParam(msg, CMSG_SIGNER_INFO_PARAM, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - if (ret) - buf = CryptMemAlloc(size); - else - buf = NULL; - if (buf) - { - CMSG_SIGNER_INFO signer; - BYTE zero = 0; - - /* and here's the little oddity: for a CMS message using the key id - * variant of a SignerId, retrieving the CMSG_SIGNER_INFO param yields - * a signer with a zero (not empty) serial number, and whose issuer is - * an RDN with OID szOID_KEYID_RDN, value type CERT_RDN_OCTET_STRING, - * and value of the key id. - */ - signer.dwVersion = CMSG_SIGNED_DATA_V3; - signer.Issuer.cbData = sizeof(keyIdIssuer); - signer.Issuer.pbData = keyIdIssuer; - signer.SerialNumber.cbData = 1; - signer.SerialNumber.pbData = &zero; - CryptMsgGetParam(msg, CMSG_SIGNER_INFO_PARAM, 0, buf, &size); - compare_signer_info((CMSG_SIGNER_INFO *)buf, &signer); - CryptMemFree(buf); - } - size = 0; - ret = CryptMsgGetParam(msg, CMSG_CMS_SIGNER_INFO_PARAM, 0, NULL, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - if (ret) - buf = CryptMemAlloc(size); - else - buf = NULL; - if (buf) - { - CMSG_CMS_SIGNER_INFO signer = { 0 }; - - signer.dwVersion = CMSG_SIGNED_DATA_V3; - signer.SignerId.dwIdChoice = CERT_ID_KEY_IDENTIFIER; - U(signer.SignerId).KeyId.cbData = sizeof(serialNum); - U(signer.SignerId).KeyId.pbData = serialNum; - signer.HashAlgorithm.pszObjId = oid_rsa_md5; - CryptMsgGetParam(msg, CMSG_CMS_SIGNER_INFO_PARAM, 0, buf, &size); - compare_cms_signer_info((CMSG_CMS_SIGNER_INFO *)buf, &signer); - CryptMemFree(buf); - } - CryptMsgClose(msg); -} - -static void test_decode_msg(void) -{ - test_decode_msg_update(); - test_decode_msg_get_param(); -} - -static BYTE aKey[] = { 0,1,2,3,4,5,6,7,8,9,0xa,0xb,0xc,0xd,0xe,0xf }; -/* aKey encoded as a X509_PUBLIC_KEY_INFO */ -static BYTE encodedPubKey[] = { -0x30,0x1f,0x30,0x0a,0x06,0x06,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x05,0x00,0x03, -0x11,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c, -0x0d,0x0e,0x0f }; -/* a weird modulus encoded as RSA_CSP_PUBLICKEYBLOB */ -static BYTE mod_encoded[] = { - 0x30,0x10,0x02,0x09,0x00,0x80,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x02,0x03, - 0x01,0x00,0x01 }; - -static void test_msg_control(void) -{ - static char oid_rsa_rsa[] = szOID_RSA_RSA; - BOOL ret; - HCRYPTMSG msg; - DWORD i; - CERT_INFO certInfo = { 0 }; - CMSG_HASHED_ENCODE_INFO hashInfo = { 0 }; - CMSG_SIGNED_ENCODE_INFO signInfo = { sizeof(signInfo), 0 }; - CMSG_CTRL_DECRYPT_PARA decryptPara = { sizeof(decryptPara), 0 }; - - /* Crashes - ret = CryptMsgControl(NULL, 0, 0, NULL); - */ - - /* Data encode messages don't allow any sort of control.. */ - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_DATA, NULL, NULL, - NULL); - /* either with no prior update.. */ - for (i = 1; !old_crypt32 && (i <= CMSG_CTRL_ADD_CMS_SIGNER_INFO); i++) - { - SetLastError(0xdeadbeef); - ret = CryptMsgControl(msg, 0, i, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - } - ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - /* or after an update. */ - for (i = 1; !old_crypt32 && (i <= CMSG_CTRL_ADD_CMS_SIGNER_INFO); i++) - { - SetLastError(0xdeadbeef); - ret = CryptMsgControl(msg, 0, i, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - } - CryptMsgClose(msg); - - /* Hash encode messages don't allow any sort of control.. */ - hashInfo.cbSize = sizeof(hashInfo); - hashInfo.HashAlgorithm.pszObjId = oid_rsa_md5; - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, &hashInfo, - NULL, NULL); - /* either with no prior update.. */ - for (i = 1; !old_crypt32 && (i <= CMSG_CTRL_ADD_CMS_SIGNER_INFO); i++) - { - SetLastError(0xdeadbeef); - ret = CryptMsgControl(msg, 0, i, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - } - ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - /* or after an update. */ - for (i = 1; !old_crypt32 && (i <= CMSG_CTRL_ADD_CMS_SIGNER_INFO); i++) - { - SetLastError(0xdeadbeef); - ret = CryptMsgControl(msg, 0, i, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - } - CryptMsgClose(msg); - - /* Signed encode messages likewise don't allow any sort of control.. */ - signInfo.cbSize = sizeof(signInfo); - msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, &signInfo, - NULL, NULL); - /* either before an update.. */ - for (i = 1; !old_crypt32 && (i <= CMSG_CTRL_ADD_CMS_SIGNER_INFO); i++) - { - SetLastError(0xdeadbeef); - ret = CryptMsgControl(msg, 0, i, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - } - ret = CryptMsgUpdate(msg, NULL, 0, TRUE); - /* or after an update. */ - for (i = 1; !old_crypt32 && (i <= CMSG_CTRL_ADD_CMS_SIGNER_INFO); i++) - { - SetLastError(0xdeadbeef); - ret = CryptMsgControl(msg, 0, i, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - } - CryptMsgClose(msg); - - /* Decode messages behave a bit differently. */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - /* Bad control type */ - SetLastError(0xdeadbeef); - ret = CryptMsgControl(msg, 0, 0, NULL); - ok(!ret && GetLastError() == CRYPT_E_CONTROL_TYPE, - "Expected CRYPT_E_CONTROL_TYPE, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptMsgControl(msg, 1, 0, NULL); - ok(!ret && GetLastError() == CRYPT_E_CONTROL_TYPE, - "Expected CRYPT_E_CONTROL_TYPE, got %08x\n", GetLastError()); - /* Can't verify the hash of an indeterminate-type message */ - SetLastError(0xdeadbeef); - ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_HASH, NULL); - ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); - /* Crashes - ret = CryptMsgControl(msg, 0, CMSG_CTRL_DECRYPT, NULL); - */ - /* Can't decrypt an indeterminate-type message */ - ret = CryptMsgControl(msg, 0, CMSG_CTRL_DECRYPT, &decryptPara); - ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); - CryptMsgClose(msg); - - if (!old_crypt32) - { - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, 0, NULL, - NULL); - /* Can't verify the hash of an empty message */ - SetLastError(0xdeadbeef); - /* Crashes on some Win9x */ - ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_HASH, NULL); - todo_wine - ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); - /* Crashes - ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_SIGNATURE, NULL); - */ - /* Can't verify the signature of a hash message */ - ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_SIGNATURE, &certInfo); - ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); - CryptMsgUpdate(msg, hashEmptyBareContent, sizeof(hashEmptyBareContent), - TRUE); - /* Oddly enough, this fails, crashes on some Win9x */ - ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_HASH, NULL); - ok(!ret, "Expected failure\n"); - CryptMsgClose(msg); - } - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, 0, NULL, - NULL); - CryptMsgUpdate(msg, hashBareContent, sizeof(hashBareContent), TRUE); - ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_HASH, NULL); - ok(ret, "CryptMsgControl failed: %08x\n", GetLastError()); - /* Can't decrypt an indeterminate-type message */ - SetLastError(0xdeadbeef); - ret = CryptMsgControl(msg, 0, CMSG_CTRL_DECRYPT, &decryptPara); - ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); - CryptMsgClose(msg); - - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, 0, 0, - NULL, NULL); - /* Can't verify the hash of a detached message before it's been updated. */ - SetLastError(0xdeadbeef); - ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_HASH, NULL); - ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); - ret = CryptMsgUpdate(msg, detachedHashContent, sizeof(detachedHashContent), - TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); - /* Still can't verify the hash of a detached message with the content - * of the detached hash given.. - */ - SetLastError(0xdeadbeef); - ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_HASH, NULL); - ok(!ret && GetLastError() == CRYPT_E_HASH_VALUE, - "Expected CRYPT_E_HASH_VALUE, got %08x\n", GetLastError()); - /* and giving the content of the message after attempting to verify the - * hash fails. - */ - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - todo_wine - ok(!ret && - (GetLastError() == NTE_BAD_HASH_STATE || - GetLastError() == NTE_BAD_ALGID || /* Win9x */ - GetLastError() == CRYPT_E_MSG_ERROR), /* Vista */ - "Expected NTE_BAD_HASH_STATE or NTE_BAD_ALGID or CRYPT_E_MSG_ERROR, " - "got %08x\n", GetLastError()); - CryptMsgClose(msg); - - /* Finally, verifying the hash of a detached message in the correct order: - * 1. Update with the detached hash message - * 2. Update with the content of the message - * 3. Verifying the hash of the message - * succeeds. - */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, 0, 0, - NULL, NULL); - ret = CryptMsgUpdate(msg, detachedHashContent, sizeof(detachedHashContent), - TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_HASH, NULL); - ok(ret, "CryptMsgControl failed: %08x\n", GetLastError()); - CryptMsgClose(msg); - - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, 0, NULL, - NULL); - /* Can't verify the hash of a signed message */ - SetLastError(0xdeadbeef); - ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_HASH, NULL); - ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); - /* Can't decrypt a signed message */ - SetLastError(0xdeadbeef); - ret = CryptMsgControl(msg, 0, CMSG_CTRL_DECRYPT, &decryptPara); - ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); - /* Crash - ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_SIGNATURE, NULL); - ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_SIGNATURE, &certInfo); - */ - CryptMsgUpdate(msg, signedWithCertBareContent, - sizeof(signedWithCertBareContent), TRUE); - /* With an empty cert info, the signer can't be found in the message (and - * the signature can't be verified. - */ - SetLastError(0xdeadbeef); - ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_SIGNATURE, &certInfo); - ok(!ret && (GetLastError() == CRYPT_E_SIGNER_NOT_FOUND || - GetLastError() == OSS_DATA_ERROR /* Win9x */), - "Expected CRYPT_E_SIGNER_NOT_FOUND or OSS_DATA_ERROR, got %08x\n", - GetLastError()); - /* The cert info is expected to have an issuer, serial number, and public - * key info set. - */ - certInfo.SerialNumber.cbData = sizeof(serialNum); - certInfo.SerialNumber.pbData = serialNum; - certInfo.Issuer.cbData = sizeof(encodedCommonName); - certInfo.Issuer.pbData = encodedCommonName; - SetLastError(0xdeadbeef); - ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_SIGNATURE, &certInfo); - ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD || - GetLastError() == OSS_DATA_ERROR /* Win9x */), - "Expected CRYPT_E_ASN1_EOD or OSS_DATA_ERROR, got %08x\n", GetLastError()); - CryptMsgClose(msg); - /* This cert has a public key, but it's not in a usable form */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, 0, NULL, - NULL); - ret = CryptMsgUpdate(msg, signedWithCertWithPubKeyBareContent, - sizeof(signedWithCertWithPubKeyBareContent), TRUE); - if (ret) - { - /* Crashes on some Win9x */ - /* Again, cert info needs to have a public key set */ - SetLastError(0xdeadbeef); - ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_SIGNATURE, &certInfo); - ok(!ret && - (GetLastError() == CRYPT_E_ASN1_EOD || - GetLastError() == TRUST_E_NOSIGNATURE /* Vista */), - "Expected CRYPT_E_ASN1_EOD or TRUST_E_NOSIGNATURE, got %08x\n", GetLastError()); - /* The public key is supposed to be in encoded form.. */ - certInfo.SubjectPublicKeyInfo.Algorithm.pszObjId = oid_rsa_rsa; - certInfo.SubjectPublicKeyInfo.PublicKey.cbData = sizeof(aKey); - certInfo.SubjectPublicKeyInfo.PublicKey.pbData = aKey; - SetLastError(0xdeadbeef); - ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_SIGNATURE, &certInfo); - ok(!ret && - (GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == TRUST_E_NOSIGNATURE /* Vista */), - "Expected CRYPT_E_ASN1_BADTAG or TRUST_E_NOSIGNATURE, got %08x\n", GetLastError()); - /* but not as a X509_PUBLIC_KEY_INFO.. */ - certInfo.SubjectPublicKeyInfo.Algorithm.pszObjId = NULL; - certInfo.SubjectPublicKeyInfo.PublicKey.cbData = sizeof(encodedPubKey); - certInfo.SubjectPublicKeyInfo.PublicKey.pbData = encodedPubKey; - SetLastError(0xdeadbeef); - ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_SIGNATURE, &certInfo); - ok(!ret && - (GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == TRUST_E_NOSIGNATURE /* Vista */), - "Expected CRYPT_E_ASN1_BADTAG or TRUST_E_NOSIGNATURE, got %08x\n", GetLastError()); - /* This decodes successfully, but it doesn't match any key in the message */ - certInfo.SubjectPublicKeyInfo.PublicKey.cbData = sizeof(mod_encoded); - certInfo.SubjectPublicKeyInfo.PublicKey.pbData = mod_encoded; - SetLastError(0xdeadbeef); - ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_SIGNATURE, &certInfo); - /* In Wine's rsaenh, this fails to decode because the key length is too - * small. Not sure if that's a bug in rsaenh, so leaving todo_wine for - * now. - */ - todo_wine - ok(!ret && - (GetLastError() == NTE_BAD_SIGNATURE || - GetLastError() == TRUST_E_NOSIGNATURE /* Vista */), - "Expected NTE_BAD_SIGNATURE or TRUST_E_NOSIGNATURE, got %08x\n", GetLastError()); - } - CryptMsgClose(msg); - /* A message with no data doesn't have a valid signature */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - ret = CryptMsgUpdate(msg, signedWithCertWithValidPubKeyEmptyContent, - sizeof(signedWithCertWithValidPubKeyEmptyContent), TRUE); - if (ret) - { - certInfo.SubjectPublicKeyInfo.Algorithm.pszObjId = oid_rsa_rsa; - certInfo.SubjectPublicKeyInfo.PublicKey.cbData = sizeof(pubKey); - certInfo.SubjectPublicKeyInfo.PublicKey.pbData = pubKey; - SetLastError(0xdeadbeef); - /* Crashes on some Win9x */ - ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_SIGNATURE, &certInfo); - ok(!ret && - (GetLastError() == NTE_BAD_SIGNATURE || - GetLastError() == TRUST_E_NOSIGNATURE /* Vista */), - "Expected NTE_BAD_SIGNATURE or TRUST_E_NOSIGNATURE, got %08x\n", GetLastError()); - } - CryptMsgClose(msg); - /* Finally, this succeeds */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - CryptMsgUpdate(msg, signedWithCertWithValidPubKeyContent, - sizeof(signedWithCertWithValidPubKeyContent), TRUE); - ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_SIGNATURE, &certInfo); - ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* Win9x */), - "CryptMsgControl failed: %08x\n", GetLastError()); - CryptMsgClose(msg); - - /* Test verifying signature of a detached signed message */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, 0, 0, - NULL, NULL); - ret = CryptMsgUpdate(msg, detachedSignedContent, - sizeof(detachedSignedContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); - /* Can't verify the sig without having updated the data */ - SetLastError(0xdeadbeef); - ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_SIGNATURE, &certInfo); - ok(!ret && (GetLastError() == NTE_BAD_SIGNATURE || - GetLastError() == OSS_DATA_ERROR /* Win9x */), - "expected NTE_BAD_SIGNATURE or OSS_DATA_ERROR, got %08x\n", - GetLastError()); - /* Now that the signature's been checked, can't do the final update */ - SetLastError(0xdeadbeef); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - todo_wine - ok((!ret && - (GetLastError() == NTE_BAD_HASH_STATE || - GetLastError() == NTE_BAD_ALGID || /* Win9x */ - GetLastError() == CRYPT_E_MSG_ERROR)) || /* Vista */ - broken(ret), /* Win9x */ - "expected NTE_BAD_HASH_STATE or NTE_BAD_ALGID or CRYPT_E_MSG_ERROR, " - "got %08x\n", GetLastError()); - CryptMsgClose(msg); - /* Updating with the detached portion of the message and the data of the - * the message allows the sig to be verified. - */ - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, 0, 0, - NULL, NULL); - ret = CryptMsgUpdate(msg, detachedSignedContent, - sizeof(detachedSignedContent), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); - ret = CryptMsgControl(msg, 0, CMSG_CTRL_VERIFY_SIGNATURE, &certInfo); - ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* Win9x */), - "CryptMsgControl failed: %08x\n", GetLastError()); - CryptMsgClose(msg); -} - -/* win9x has much less parameter checks and will crash on many tests - * this code is from test_signed_msg_update() - */ -static BOOL detect_nt(void) -{ - BOOL ret; - CMSG_SIGNER_ENCODE_INFO signer = { sizeof(signer), 0 }; - CERT_INFO certInfo = { 0 }; - - if (!pCryptAcquireContextW) - return FALSE; - - certInfo.SerialNumber.cbData = sizeof(serialNum); - certInfo.SerialNumber.pbData = serialNum; - certInfo.Issuer.cbData = sizeof(encodedCommonName); - certInfo.Issuer.pbData = encodedCommonName; - signer.pCertInfo = &certInfo; - signer.HashAlgorithm.pszObjId = oid_rsa_md5; - - ret = pCryptAcquireContextW(&signer.hCryptProv, cspNameW, NULL, - PROV_RSA_FULL, CRYPT_NEWKEYSET); - if (!ret && GetLastError() == NTE_EXISTS) { - ret = pCryptAcquireContextW(&signer.hCryptProv, cspNameW, NULL, - PROV_RSA_FULL, 0); - } - - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) return FALSE; - - /* cleanup */ - CryptReleaseContext(signer.hCryptProv, 0); - pCryptAcquireContextW(&signer.hCryptProv, cspNameW, NULL, PROV_RSA_FULL, - CRYPT_DELETEKEYSET); - - return TRUE; -} - -static void test_msg_get_and_verify_signer(void) -{ - BOOL ret; - HCRYPTMSG msg; - PCCERT_CONTEXT signer; - DWORD signerIndex; - HCERTSTORE store; - - /* Crash */ - if (0) - { - ret = CryptMsgGetAndVerifySigner(NULL, 0, NULL, 0, NULL, NULL); - ret = CryptMsgGetAndVerifySigner(NULL, 0, NULL, 0, NULL, &signerIndex); - } - - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - /* An empty message has no signer */ - SetLastError(0xdeadbeef); - ret = CryptMsgGetAndVerifySigner(msg, 0, NULL, 0, NULL, NULL); - ok(!ret && GetLastError() == CRYPT_E_NO_TRUSTED_SIGNER, - "expected CRYPT_E_NO_TRUSTED_SIGNER, got 0x%08x\n", GetLastError()); - /* The signer is cleared on error */ - signer = (PCCERT_CONTEXT)0xdeadbeef; - SetLastError(0xdeadbeef); - ret = CryptMsgGetAndVerifySigner(msg, 0, NULL, 0, &signer, NULL); - ok(!ret && GetLastError() == CRYPT_E_NO_TRUSTED_SIGNER, - "expected CRYPT_E_NO_TRUSTED_SIGNER, got 0x%08x\n", GetLastError()); - ok(!signer, "expected signer to be NULL\n"); - /* The signer index is also cleared on error */ - signerIndex = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = CryptMsgGetAndVerifySigner(msg, 0, NULL, 0, NULL, &signerIndex); - ok(!ret && GetLastError() == CRYPT_E_NO_TRUSTED_SIGNER, - "expected CRYPT_E_NO_TRUSTED_SIGNER, got 0x%08x\n", GetLastError()); - ok(!signerIndex, "expected 0, got %d\n", signerIndex); - /* An unsigned message (msgData isn't a signed message at all) - * likewise has no signer. - */ - CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); - SetLastError(0xdeadbeef); - ret = CryptMsgGetAndVerifySigner(msg, 0, NULL, 0, NULL, NULL); - ok(!ret && GetLastError() == CRYPT_E_NO_TRUSTED_SIGNER, - "expected CRYPT_E_NO_TRUSTED_SIGNER, got 0x%08x\n", GetLastError()); - CryptMsgClose(msg); - - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - /* A "signed" message created with no signer cert likewise has no signer */ - ret = CryptMsgUpdate(msg, signedEmptyContent, sizeof(signedEmptyContent), TRUE); - if (ret) - { - /* Crashes on most Win9x */ - ret = CryptMsgGetAndVerifySigner(msg, 0, NULL, 0, NULL, NULL); - ok(!ret && GetLastError() == CRYPT_E_NO_TRUSTED_SIGNER, - "expected CRYPT_E_NO_TRUSTED_SIGNER, got 0x%08x\n", GetLastError()); - } - CryptMsgClose(msg); - - msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); - /* A signed message succeeds, .. */ - CryptMsgUpdate(msg, signedWithCertWithValidPubKeyContent, - sizeof(signedWithCertWithValidPubKeyContent), TRUE); - ret = CryptMsgGetAndVerifySigner(msg, 0, NULL, 0, NULL, NULL); - ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* Win9x */), - "CryptMsgGetAndVerifySigner failed: 0x%08x\n", GetLastError()); - /* the signer index can be retrieved, .. */ - signerIndex = 0xdeadbeef; - ret = CryptMsgGetAndVerifySigner(msg, 0, NULL, 0, NULL, &signerIndex); - ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* Win9x */), - "CryptMsgGetAndVerifySigner failed: 0x%08x\n", GetLastError()); - if (ret) - ok(signerIndex == 0, "expected 0, got %d\n", signerIndex); - /* as can the signer cert. */ - signer = (PCCERT_CONTEXT)0xdeadbeef; - ret = CryptMsgGetAndVerifySigner(msg, 0, NULL, 0, &signer, NULL); - ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* Win9x */), - "CryptMsgGetAndVerifySigner failed: 0x%08x\n", GetLastError()); - if (ret) - ok(signer != NULL && signer != (PCCERT_CONTEXT)0xdeadbeef, - "expected a valid signer\n"); - if (signer && signer != (PCCERT_CONTEXT)0xdeadbeef) - CertFreeCertificateContext(signer); - /* Specifying CMSG_USE_SIGNER_INDEX_FLAG and an invalid signer index fails - */ - signerIndex = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = CryptMsgGetAndVerifySigner(msg, 0, NULL, CMSG_USE_SIGNER_INDEX_FLAG, - NULL, &signerIndex); - ok(!ret && GetLastError() == CRYPT_E_INVALID_INDEX, - "expected CRYPT_E_INVALID_INDEX, got 0x%08x\n", GetLastError()); - /* Specifying CMSG_TRUSTED_SIGNER_FLAG and no cert stores causes the - * message signer not to be found. - */ - SetLastError(0xdeadbeef); - ret = CryptMsgGetAndVerifySigner(msg, 0, NULL, CMSG_TRUSTED_SIGNER_FLAG, - NULL, NULL); - ok(!ret && (GetLastError() == CRYPT_E_NO_TRUSTED_SIGNER || - broken(GetLastError() == OSS_DATA_ERROR /* Win9x */)), - "expected CRYPT_E_NO_TRUSTED_SIGNER, got 0x%08x\n", GetLastError()); - /* Specifying CMSG_TRUSTED_SIGNER_FLAG and an empty cert store also causes - * the message signer not to be found. - */ - store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - SetLastError(0xdeadbeef); - ret = CryptMsgGetAndVerifySigner(msg, 1, &store, CMSG_TRUSTED_SIGNER_FLAG, - NULL, NULL); - ok(!ret && (GetLastError() == CRYPT_E_NO_TRUSTED_SIGNER || - broken(GetLastError() == OSS_DATA_ERROR /* Win9x */)), - "expected CRYPT_E_NO_TRUSTED_SIGNER, got 0x%08x\n", GetLastError()); - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - v1CertWithValidPubKey, sizeof(v1CertWithValidPubKey), - CERT_STORE_ADD_ALWAYS, NULL); - ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* Win98 */), - "CertAddEncodedCertificateToStore failed: 0x%08x\n", GetLastError()); - /* Specifying CMSG_TRUSTED_SIGNER_FLAG with a cert store that contains - * the signer succeeds. - */ - SetLastError(0xdeadbeef); - ret = CryptMsgGetAndVerifySigner(msg, 1, &store, CMSG_TRUSTED_SIGNER_FLAG, - NULL, NULL); - ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* Win9x */), - "CryptMsgGetAndVerifySigner failed: 0x%08x\n", GetLastError()); - CertCloseStore(store, 0); - CryptMsgClose(msg); -} - -START_TEST(msg) -{ - init_function_pointers(); - have_nt = detect_nt(); - if (!have_nt) - win_skip("Win9x crashes on some parameter checks\n"); - - /* I_CertUpdateStore can be used for verification if crypt32 is new enough */ - if (!GetProcAddress(GetModuleHandleA("crypt32.dll"), "I_CertUpdateStore")) - { - win_skip("Some tests will crash on older crypt32 implementations\n"); - old_crypt32 = TRUE; - } - - /* Basic parameter checking tests */ - test_msg_open_to_encode(); - test_msg_open_to_decode(); - test_msg_get_param(); - test_msg_close(); - test_msg_control(); - - /* Message-type specific tests */ - test_data_msg(); - test_hash_msg(); - test_signed_msg(); - test_decode_msg(); - - test_msg_get_and_verify_signer(); -} diff --git a/rostests/winetests/crypt32/object.c b/rostests/winetests/crypt32/object.c deleted file mode 100644 index 211b5423e01..00000000000 --- a/rostests/winetests/crypt32/object.c +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Unit test suite for crypt32.dll's Crypt*Object functions - * - * Copyright 2008 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 - */ -#include -#include -#include -#include -#include -#include - -#include "wine/test.h" - -static BOOL (WINAPI * pCryptQueryObject)(DWORD, const void *, DWORD, DWORD, - DWORD, DWORD *, DWORD *, DWORD *, HCERTSTORE *, HCRYPTMSG *, const void **); - -static BYTE bigCert[] = { -0x30,0x7a,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31, -0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75, -0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x22,0x18,0x0f, -0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30, -0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30, -0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13, -0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61, -0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x07,0x30,0x02,0x06, -0x00,0x03,0x01,0x00,0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03, -0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01, -0xff,0x02,0x01,0x01 }; -static char bigCertBase64[] = -"MHoCAQEwAgYAMBUxEzARBgNVBAMTCkp1YW4gTGFuZwAwIhgPMTYwMTAxMDEwMDAw\n" -"MDBaGA8xNjAxMDEwMTAwMDAwMFowFTETMBEGA1UEAxMKSnVhbiBMYW5nADAHMAIG\n" -"AAMBAKMWMBQwEgYDVR0TAQH/BAgwBgEB/wIBAQ==\n"; -static WCHAR bigCertBase64W[] = { -'M','H','o','C','A','Q','E','w','A','g','Y','A','M','B','U','x','E','z','A', -'R','B','g','N','V','B','A','M','T','C','k','p','1','Y','W','4','g','T','G', -'F','u','Z','w','A','w','I','h','g','P','M','T','Y','w','M','T','A','x','M', -'D','E','w',',','D','A','w','\n', -'M','D','B','a','G','A','8','x','N','j','A','x','M','D','E','w','M','T','A', -'w','M','D','A','w','M','F','o','w','F','T','E','T','M','B','E','G','A','1', -'U','E','A','x','M','K','S','n','V','h','b','i','B','M','Y','W','5','n','A', -'D','A','H','M','A','I','G','\n', -'A','A','M','B','A','K','M','W','M','B','Q','w','E','g','Y','D','V','R','0', -'T','A','Q','H','/','B','A','g','w','B','g','E','B','/','w','I','B','A','Q', -'=','=','\n',0 }; -static BYTE signedWithCertWithValidPubKeyContent[] = { -0x30,0x82,0x01,0x89,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02, -0xa0,0x82,0x01,0x7a,0x30,0x82,0x01,0x76,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c, -0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x13,0x06, -0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x06,0x04,0x04,0x01, -0x02,0x03,0x04,0xa0,0x81,0xd2,0x30,0x81,0xcf,0x02,0x01,0x01,0x30,0x02,0x06, -0x00,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a, -0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36, -0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f, -0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a, -0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75, -0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x5c,0x30,0x0d,0x06,0x09,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x4b,0x00,0x30,0x48, -0x02,0x41,0x00,0xe2,0x54,0x3a,0xa7,0x83,0xb1,0x27,0x14,0x3e,0x59,0xbb,0xb4, -0x53,0xe6,0x1f,0xe7,0x5d,0xf1,0x21,0x68,0xad,0x85,0x53,0xdb,0x6b,0x1e,0xeb, -0x65,0x97,0x03,0x86,0x60,0xde,0xf3,0x6c,0x38,0x75,0xe0,0x4c,0x61,0xbb,0xbc, -0x62,0x17,0xa9,0xcd,0x79,0x3f,0x21,0x4e,0x96,0xcb,0x0e,0xdc,0x61,0x94,0x30, -0x18,0x10,0x6b,0xd0,0x1c,0x10,0x79,0x02,0x03,0x01,0x00,0x01,0xa3,0x16,0x30, -0x14,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06, -0x01,0x01,0xff,0x02,0x01,0x01,0x31,0x77,0x30,0x75,0x02,0x01,0x01,0x30,0x1a, -0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75, -0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08, -0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x04,0x06,0x00,0x05, -0x00,0x04,0x40,0x81,0xa6,0x70,0xb3,0xef,0x59,0xd1,0x66,0xd1,0x9b,0xc0,0x9a, -0xb6,0x9a,0x5e,0x6d,0x6f,0x6d,0x0d,0x59,0xa9,0xaa,0x6e,0xe9,0x2c,0xa0,0x1e, -0xee,0xc2,0x60,0xbc,0x59,0xbe,0x3f,0x63,0x06,0x8d,0xc9,0x11,0x1d,0x23,0x64, -0x92,0xef,0x2e,0xfc,0x57,0x29,0xa4,0xaf,0xe0,0xee,0x93,0x19,0x39,0x51,0xe4, -0x44,0xb8,0x0b,0x28,0xf4,0xa8,0x0d }; -static char signedWithCertWithValidPubKeyContentBase64[] = -"MIIBiQYJKoZIhvcNAQcCoIIBejCCAXYCAQExDjAMBggqhkiG9w0CBQUAMBMGCSqG" -"SIb3DQEHAaAGBAQBAgMEoIHSMIHPAgEBMAIGADAVMRMwEQYDVQQDEwpKdWFuIExh" -"bmcAMCIYDzE2MDEwMTAxMDAwMDAwWhgPMTYwMTAxMDEwMDAwMDBaMBUxEzARBgNV" -"BAMTCkp1YW4gTGFuZwAwXDANBgkqhkiG9w0BAQEFAANLADBIAkEA4lQ6p4OxJxQ+" -"Wbu0U+Yf513xIWithVPbax7rZZcDhmDe82w4deBMYbu8YhepzXk/IU6Wyw7cYZQw" -"GBBr0BwQeQIDAQABoxYwFDASBgNVHRMBAf8ECDAGAQH/AgEBMXcwdQIBATAaMBUx" -"EzARBgNVBAMTCkp1YW4gTGFuZwACAQEwDAYIKoZIhvcNAgUFADAEBgAFAARAgaZw" -"s+9Z0WbRm8CatppebW9tDVmpqm7pLKAe7sJgvFm+P2MGjckRHSNkku8u/FcppK/g" -"7pMZOVHkRLgLKPSoDQ=="; -static WCHAR signedWithCertWithValidPubKeyContentBase64W[] = { -'M','I','I','B','i','Q','Y','J','K','o','Z','I','h','v','c','N','A','Q','c','C', -'o','I','I','B','e','j','C','C','A','X','Y','C','A','Q','E','x','D','j','A','M', -'B','g','g','q','h','k','i','G','9','w','0','C','B','Q','U','A','M','B','M','G', -'C','S','q','G','S','I','b','3','D','Q','E','H','A','a','A','G','B','A','Q','B', -'A','g','M','E','o','I','H','S','M','I','H','P','A','g','E','B','M','A','I','G', -'A','D','A','V','M','R','M','w','E','Q','Y','D','V','Q','Q','D','E','w','p','K', -'d','W','F','u','I','E','x','h','b','m','c','A','M','C','I','Y','D','z','E','2', -'M','D','E','w','M','T','A','x','M','D','A','w','M','D','A','w','W','h','g','P', -'M','T','Y','w','M','T','A','x','M','D','E','w','M','D','A','w','M','D','B','a', -'M','B','U','x','E','z','A','R','B','g','N','V','B','A','M','T','C','k','p','1', -'Y','W','4','g','T','G','F','u','Z','w','A','w','X','D','A','N','B','g','k','q', -'h','k','i','G','9','w','0','B','A','Q','E','F','A','A','N','L','A','D','B','I', -'A','k','E','A','4','l','Q','6','p','4','O','x','J','x','Q','+','W','b','u','0', -'U','+','Y','f','5','1','3','x','I','W','i','t','h','V','P','b','a','x','7','r', -'Z','Z','c','D','h','m','D','e','8','2','w','4','d','e','B','M','Y','b','u','8', -'Y','h','e','p','z','X','k','/','I','U','6','W','y','w','7','c','Y','Z','Q','w', -'G','B','B','r','0','B','w','Q','e','Q','I','D','A','Q','A','B','o','x','Y','w', -'F','D','A','S','B','g','N','V','H','R','M','B','A','f','8','E','C','D','A','G', -'A','Q','H','/','A','g','E','B','M','X','c','w','d','Q','I','B','A','T','A','a', -'M','B','U','x','E','z','A','R','B','g','N','V','B','A','M','T','C','k','p','1', -'Y','W','4','g','T','G','F','u','Z','w','A','C','A','Q','E','w','D','A','Y','I', -'K','o','Z','I','h','v','c','N','A','g','U','F','A','D','A','E','B','g','A','F', -'A','A','R','A','g','a','Z','w','s','+','9','Z','0','W','b','R','m','8','C','a', -'t','p','p','e','b','W','9','t','D','V','m','p','q','m','7','p','L','K','A','e', -'7','s','J','g','v','F','m','+','P','2','M','G','j','c','k','R','H','S','N','k', -'k','u','8','u','/','F','c','p','p','K','/','g','7','p','M','Z','O','V','H','k', -'R','L','g','L','K','P','S','o','D','Q','=','=',0 }; - -static void test_query_object(void) -{ - BOOL ret; - CRYPT_DATA_BLOB blob; - - /* Test the usual invalid arguments */ - SetLastError(0xdeadbeef); - ret = pCryptQueryObject(0, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, - NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pCryptQueryObject(CERT_QUERY_OBJECT_BLOB, NULL, 0, 0, 0, NULL, NULL, - NULL, NULL, NULL, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - /* Test with a simple cert */ - blob.pbData = bigCert; - blob.cbData = sizeof(bigCert); - SetLastError(0xdeadbeef); - ret = pCryptQueryObject(CERT_QUERY_OBJECT_BLOB, &blob, - CERT_QUERY_CONTENT_FLAG_ALL, CERT_QUERY_FORMAT_FLAG_ALL, 0, NULL, NULL, - NULL, NULL, NULL, NULL); - ok(ret, "CryptQueryObject failed: %08x\n", GetLastError()); - /* The same cert, base64-encoded */ - blob.pbData = (BYTE *)bigCertBase64; - blob.cbData = sizeof(bigCertBase64); - SetLastError(0xdeadbeef); - ret = pCryptQueryObject(CERT_QUERY_OBJECT_BLOB, &blob, - CERT_QUERY_CONTENT_FLAG_ALL, CERT_QUERY_FORMAT_FLAG_ALL, 0, NULL, NULL, - NULL, NULL, NULL, NULL); - ok(ret, "CryptQueryObject failed: %08x\n", GetLastError()); - /* The same base64-encoded cert, restricting the format types */ - SetLastError(0xdeadbeef); - ret = pCryptQueryObject(CERT_QUERY_OBJECT_BLOB, &blob, - CERT_QUERY_CONTENT_FLAG_ALL, CERT_QUERY_FORMAT_FLAG_BINARY, 0, NULL, NULL, - NULL, NULL, NULL, NULL); - ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pCryptQueryObject(CERT_QUERY_OBJECT_BLOB, &blob, - CERT_QUERY_CONTENT_FLAG_ALL, CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED, 0, - NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret, "CryptQueryObject failed: %08x\n", GetLastError()); - /* The same cert, base64-encoded but as a wide character string */ - blob.pbData = (BYTE *)bigCertBase64W; - blob.cbData = sizeof(bigCertBase64W); - SetLastError(0xdeadbeef); - ret = pCryptQueryObject(CERT_QUERY_OBJECT_BLOB, &blob, - CERT_QUERY_CONTENT_FLAG_ALL, CERT_QUERY_FORMAT_FLAG_ALL, 0, NULL, NULL, - NULL, NULL, NULL, NULL); - ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); - /* For brevity, not tested here, but tested on Windows: same failure - * (CRYPT_E_NO_MATCH) when the wide character base64-encoded cert - * is written to a file and queried. - */ - /* Test with a valid signed message */ - blob.pbData = signedWithCertWithValidPubKeyContent; - blob.cbData = sizeof(signedWithCertWithValidPubKeyContent); - SetLastError(0xdeadbeef); - ret = pCryptQueryObject(CERT_QUERY_OBJECT_BLOB, &blob, - CERT_QUERY_CONTENT_FLAG_ALL, CERT_QUERY_FORMAT_FLAG_ALL, 0, NULL, NULL, - NULL, NULL, NULL, NULL); - ok(ret, "CryptQueryObject failed: %08x\n", GetLastError()); - blob.pbData = (BYTE *)signedWithCertWithValidPubKeyContentBase64; - blob.cbData = sizeof(signedWithCertWithValidPubKeyContentBase64); - SetLastError(0xdeadbeef); - ret = pCryptQueryObject(CERT_QUERY_OBJECT_BLOB, &blob, - CERT_QUERY_CONTENT_FLAG_ALL, CERT_QUERY_FORMAT_FLAG_ALL, 0, NULL, NULL, - NULL, NULL, NULL, NULL); - ok(ret, "CryptQueryObject failed: %08x\n", GetLastError()); - /* A valid signed message, encoded as a wide character base64 string, can - * be queried successfully. - */ - blob.pbData = (BYTE *)signedWithCertWithValidPubKeyContentBase64W; - blob.cbData = sizeof(signedWithCertWithValidPubKeyContentBase64W); - SetLastError(0xdeadbeef); - ret = pCryptQueryObject(CERT_QUERY_OBJECT_BLOB, &blob, - CERT_QUERY_CONTENT_FLAG_ALL, CERT_QUERY_FORMAT_FLAG_ALL, 0, NULL, NULL, - NULL, NULL, NULL, NULL); - ok(ret, "CryptQueryObject failed: %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pCryptQueryObject(CERT_QUERY_OBJECT_BLOB, &blob, - CERT_QUERY_CONTENT_FLAG_ALL, CERT_QUERY_FORMAT_FLAG_BINARY, 0, NULL, NULL, - NULL, NULL, NULL, NULL); - ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, - "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pCryptQueryObject(CERT_QUERY_OBJECT_BLOB, &blob, - CERT_QUERY_CONTENT_FLAG_ALL, CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED, 0, - NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret, "CryptQueryObject failed: %08x\n", GetLastError()); -} - -START_TEST(object) -{ - HMODULE mod = GetModuleHandleA("crypt32.dll"); - - pCryptQueryObject = (void *)GetProcAddress(mod, "CryptQueryObject"); - - if (!pCryptQueryObject) - { - win_skip("CryptQueryObject is not available\n"); - return; - } - - test_query_object(); -} diff --git a/rostests/winetests/crypt32/oid.c b/rostests/winetests/crypt32/oid.c deleted file mode 100644 index 030a548ac1a..00000000000 --- a/rostests/winetests/crypt32/oid.c +++ /dev/null @@ -1,603 +0,0 @@ -/* - * Unit test suite for crypt32.dll's OID support functions. - * - * Copyright 2005 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 - */ -#include -#include -#include -#include -#include -#include -#include - -#include "wine/test.h" - - -static BOOL (WINAPI *pCryptEnumOIDInfo)(DWORD,DWORD,void*,PFN_CRYPT_ENUM_OID_INFO); - - -struct OIDToAlgID -{ - LPCSTR oid; - LPCSTR altOid; - DWORD algID; -}; - -static const struct OIDToAlgID oidToAlgID[] = { - { szOID_RSA_RSA, NULL, CALG_RSA_KEYX }, - { szOID_RSA_MD2RSA, NULL, CALG_MD2 }, - { szOID_RSA_MD4RSA, NULL, CALG_MD4 }, - { szOID_RSA_MD5RSA, NULL, CALG_MD5 }, - { szOID_RSA_SHA1RSA, NULL, CALG_SHA }, - { szOID_RSA_DH, NULL, CALG_DH_SF }, - { szOID_RSA_SMIMEalgESDH, NULL, CALG_DH_EPHEM }, - { szOID_RSA_SMIMEalgCMS3DESwrap, NULL, CALG_3DES }, - { szOID_RSA_SMIMEalgCMSRC2wrap, NULL, CALG_RC2 }, - { szOID_RSA_MD2, NULL, CALG_MD2 }, - { szOID_RSA_MD4, NULL, CALG_MD4 }, - { szOID_RSA_MD5, NULL, CALG_MD5 }, - { szOID_RSA_RC2CBC, NULL, CALG_RC2 }, - { szOID_RSA_RC4, NULL, CALG_RC4 }, - { szOID_RSA_DES_EDE3_CBC, NULL, CALG_3DES }, - { szOID_ANSI_X942_DH, NULL, CALG_DH_SF }, - { szOID_X957_DSA, NULL, CALG_DSS_SIGN }, - { szOID_X957_SHA1DSA, NULL, CALG_SHA }, - { szOID_OIWSEC_md4RSA, NULL, CALG_MD4 }, - { szOID_OIWSEC_md5RSA, NULL, CALG_MD5 }, - { szOID_OIWSEC_md4RSA2, NULL, CALG_MD4 }, - { szOID_OIWSEC_desCBC, NULL, CALG_DES }, - { szOID_OIWSEC_dsa, NULL, CALG_DSS_SIGN }, - { szOID_OIWSEC_shaDSA, NULL, CALG_SHA }, - { szOID_OIWSEC_shaRSA, NULL, CALG_SHA }, - { szOID_OIWSEC_sha, NULL, CALG_SHA }, - { szOID_OIWSEC_rsaXchg, NULL, CALG_RSA_KEYX }, - { szOID_OIWSEC_sha1, NULL, CALG_SHA }, - { szOID_OIWSEC_dsaSHA1, NULL, CALG_SHA }, - { szOID_OIWSEC_sha1RSASign, NULL, CALG_SHA }, - { szOID_OIWDIR_md2RSA, NULL, CALG_MD2 }, - { szOID_INFOSEC_mosaicUpdatedSig, NULL, CALG_SHA }, - { szOID_INFOSEC_mosaicKMandUpdSig, NULL, CALG_DSS_SIGN }, -}; - -static const struct OIDToAlgID algIDToOID[] = { - { szOID_RSA_RSA, NULL, CALG_RSA_KEYX }, - { szOID_RSA_SMIMEalgESDH, NULL, CALG_DH_EPHEM }, - { szOID_RSA_MD2, NULL, CALG_MD2 }, - { szOID_RSA_MD4, NULL, CALG_MD4 }, - { szOID_RSA_MD5, NULL, CALG_MD5 }, - { szOID_RSA_RC2CBC, NULL, CALG_RC2 }, - { szOID_RSA_RC4, NULL, CALG_RC4 }, - { szOID_RSA_DES_EDE3_CBC, NULL, CALG_3DES }, - { szOID_ANSI_X942_DH, NULL, CALG_DH_SF }, - { szOID_X957_DSA, szOID_OIWSEC_dsa /* some Win98 */, CALG_DSS_SIGN }, - { szOID_OIWSEC_desCBC, NULL, CALG_DES }, - { szOID_OIWSEC_sha1, NULL, CALG_SHA }, -}; - -static const WCHAR bogusDll[] = { 'b','o','g','u','s','.','d','l','l',0 }; -static const WCHAR bogus2Dll[] = { 'b','o','g','u','s','2','.','d','l','l',0 }; - -static void testOIDToAlgID(void) -{ - int i; - DWORD alg; - - /* Test with a bogus one */ - alg = CertOIDToAlgId("1.2.3"); - ok(!alg, "Expected failure, got %d\n", alg); - - for (i = 0; i < sizeof(oidToAlgID) / sizeof(oidToAlgID[0]); i++) - { - alg = CertOIDToAlgId(oidToAlgID[i].oid); - /* Not all Windows installations support all these, so make sure it's - * at least not the wrong one. - */ - ok(alg == 0 || alg == oidToAlgID[i].algID, - "Expected %d, got %d\n", oidToAlgID[i].algID, alg); - } -} - -static void testAlgIDToOID(void) -{ - int i; - LPCSTR oid; - - /* Test with a bogus one */ - SetLastError(0xdeadbeef); - oid = CertAlgIdToOID(ALG_CLASS_SIGNATURE | ALG_TYPE_ANY | 80); - ok(!oid && GetLastError() == 0xdeadbeef, - "Didn't expect last error (%08x) to be set\n", GetLastError()); - for (i = 0; i < sizeof(algIDToOID) / sizeof(algIDToOID[0]); i++) - { - oid = CertAlgIdToOID(algIDToOID[i].algID); - /* Allow failure, not every version of Windows supports every algo */ - if (oid) - { - if (strcmp(oid, algIDToOID[i].oid)) - { - if (algIDToOID[i].altOid) - ok(!strcmp(oid, algIDToOID[i].altOid), - "Expected %s or %s, got %s\n", algIDToOID[i].oid, - algIDToOID[i].altOid, oid); - else - { - /* No need to rerun the test, we already know it failed. */ - ok(0, "Expected %s, got %s\n", algIDToOID[i].oid, oid); - } - } - else - { - /* No need to rerun the test, we already know it succeeded. */ - ok(1, "Expected %s, got %s\n", algIDToOID[i].oid, oid); - } - } - } -} - -static void test_oidFunctionSet(void) -{ - HCRYPTOIDFUNCSET set1, set2; - BOOL ret; - LPWSTR buf = NULL; - DWORD size; - - /* This crashes - set = CryptInitOIDFunctionSet(NULL, 0); - */ - - /* The name doesn't mean much */ - set1 = CryptInitOIDFunctionSet("funky", 0); - ok(set1 != 0, "CryptInitOIDFunctionSet failed: %08x\n", GetLastError()); - if (set1) - { - /* These crash - ret = CryptGetDefaultOIDDllList(NULL, 0, NULL, NULL); - ret = CryptGetDefaultOIDDllList(NULL, 0, NULL, &size); - */ - size = 0; - ret = CryptGetDefaultOIDDllList(set1, 0, NULL, &size); - ok(ret, "CryptGetDefaultOIDDllList failed: %08x\n", GetLastError()); - if (ret) - { - buf = HeapAlloc(GetProcessHeap(), 0, size * sizeof(WCHAR)); - if (buf) - { - ret = CryptGetDefaultOIDDllList(set1, 0, buf, &size); - ok(ret, "CryptGetDefaultOIDDllList failed: %08x\n", - GetLastError()); - ok(!*buf, "Expected empty DLL list\n"); - HeapFree(GetProcessHeap(), 0, buf); - } - } - } - - /* MSDN says flags must be 0, but it's not checked */ - set1 = CryptInitOIDFunctionSet("", 1); - ok(set1 != 0, "CryptInitOIDFunctionSet failed: %08x\n", GetLastError()); - set2 = CryptInitOIDFunctionSet("", 0); - ok(set2 != 0, "CryptInitOIDFunctionSet failed: %08x\n", GetLastError()); - /* There isn't a free function, so there must be only one set per name to - * limit leaks. (I guess the sets are freed when crypt32 is unloaded.) - */ - ok(set1 == set2, "Expected identical sets\n"); - if (set1) - { - /* The empty name function set used here seems to correspond to - * DEFAULT. - */ - } - - /* There's no installed function for a built-in encoding. */ - set1 = CryptInitOIDFunctionSet("CryptDllEncodeObject", 0); - ok(set1 != 0, "CryptInitOIDFunctionSet failed: %08x\n", GetLastError()); - if (set1) - { - void *funcAddr; - HCRYPTOIDFUNCADDR hFuncAddr; - - ret = CryptGetOIDFunctionAddress(set1, X509_ASN_ENCODING, X509_CERT, 0, - &funcAddr, &hFuncAddr); - ok((!ret && GetLastError() == ERROR_FILE_NOT_FOUND) || - broken(ret) /* some Win98 */, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - } -} - -typedef int (*funcY)(int); - -static int funky(int x) -{ - return x; -} - -static void test_installOIDFunctionAddress(void) -{ - BOOL ret; - CRYPT_OID_FUNC_ENTRY entry = { CRYPT_DEFAULT_OID, funky }; - HCRYPTOIDFUNCSET set; - - /* This crashes - ret = CryptInstallOIDFunctionAddress(NULL, 0, NULL, 0, NULL, 0); - */ - - /* Installing zero functions should work */ - SetLastError(0xdeadbeef); - ret = CryptInstallOIDFunctionAddress(NULL, 0, "CryptDllEncodeObject", 0, - NULL, 0); - ok(ret && GetLastError() == 0xdeadbeef, "Expected success, got %08x\n", - GetLastError()); - - /* The function name doesn't much matter */ - SetLastError(0xdeadbeef); - ret = CryptInstallOIDFunctionAddress(NULL, 0, "OhSoFunky", 0, NULL, 0); - ok(ret && GetLastError() == 0xdeadbeef, "Expected success, got %08x\n", - GetLastError()); - SetLastError(0xdeadbeef); - entry.pszOID = X509_CERT; - ret = CryptInstallOIDFunctionAddress(NULL, 0, "OhSoFunky", 1, &entry, 0); - ok(ret && GetLastError() == 0xdeadbeef, "Expected success, got %08x\n", - GetLastError()); - set = CryptInitOIDFunctionSet("OhSoFunky", 0); - ok(set != 0, "CryptInitOIDFunctionSet failed: %08x\n", GetLastError()); - if (set) - { - funcY funcAddr = NULL; - HCRYPTOIDFUNCADDR hFuncAddr = NULL; - - /* This crashes - ret = CryptGetOIDFunctionAddress(set, X509_ASN_ENCODING, 0, 0, NULL, - NULL); - */ - ret = CryptGetOIDFunctionAddress(set, X509_ASN_ENCODING, 0, 0, - (void **)&funcAddr, &hFuncAddr); - ok(!ret && (GetLastError() == ERROR_FILE_NOT_FOUND || - GetLastError() == E_INVALIDARG /* some Win98 */), - "Expected ERROR_FILE_NOT_FOUND or E_INVALIDARG, got %d\n", - GetLastError()); - ret = CryptGetOIDFunctionAddress(set, X509_ASN_ENCODING, X509_CERT, 0, - (void **)&funcAddr, &hFuncAddr); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - ret = CryptGetOIDFunctionAddress(set, 0, X509_CERT, 0, - (void **)&funcAddr, &hFuncAddr); - ok(ret, "CryptGetOIDFunctionAddress failed: %d\n", GetLastError()); - if (funcAddr) - { - int y = funcAddr(0xabadc0da); - - ok(y == 0xabadc0da, "Unexpected return (%d) from function\n", y); - CryptFreeOIDFunctionAddress(hFuncAddr, 0); - } - } -} - -static void test_registerOIDFunction(void) -{ - BOOL ret; - - /* oddly, this succeeds under WinXP; the function name key is merely - * omitted. This may be a side effect of the registry code, I don't know. - * I don't check it because I doubt anyone would depend on it. - ret = CryptRegisterOIDFunction(X509_ASN_ENCODING, NULL, - "1.2.3.4.5.6.7.8.9.10", bogusDll, NULL); - */ - /* On windows XP, GetLastError is incorrectly being set with an HRESULT, - * E_INVALIDARG - */ - ret = CryptRegisterOIDFunction(X509_ASN_ENCODING, "foo", NULL, bogusDll, - NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG: %d\n", GetLastError()); - /* This has no effect, but "succeeds" on XP */ - ret = CryptRegisterOIDFunction(X509_ASN_ENCODING, "foo", - "1.2.3.4.5.6.7.8.9.10", NULL, NULL); - ok(ret, "Expected pseudo-success, got %d\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptRegisterOIDFunction(X509_ASN_ENCODING, "CryptDllEncodeObject", - "1.2.3.4.5.6.7.8.9.10", bogusDll, NULL); - if (!ret && GetLastError() == ERROR_ACCESS_DENIED) - { - skip("Need admin rights\n"); - return; - } - ok(ret, "CryptRegisterOIDFunction failed: %d\n", GetLastError()); - ret = CryptUnregisterOIDFunction(X509_ASN_ENCODING, "CryptDllEncodeObject", - "1.2.3.4.5.6.7.8.9.10"); - ok(ret, "CryptUnregisterOIDFunction failed: %d\n", GetLastError()); - ret = CryptRegisterOIDFunction(X509_ASN_ENCODING, "bogus", - "1.2.3.4.5.6.7.8.9.10", bogusDll, NULL); - ok(ret, "CryptRegisterOIDFunction failed: %d\n", GetLastError()); - ret = CryptUnregisterOIDFunction(X509_ASN_ENCODING, "bogus", - "1.2.3.4.5.6.7.8.9.10"); - ok(ret, "CryptUnregisterOIDFunction failed: %d\n", GetLastError()); - /* Unwanted Cryptography\OID\EncodingType 1\bogus\ will still be there */ - ok(!RegDeleteKeyA(HKEY_LOCAL_MACHINE, - "SOFTWARE\\Microsoft\\Cryptography\\OID\\EncodingType 1\\bogus"), - "Could not delete bogus key\n"); - /* Shouldn't have effect but registry keys are created */ - ret = CryptRegisterOIDFunction(PKCS_7_ASN_ENCODING, "CryptDllEncodeObject", - "1.2.3.4.5.6.7.8.9.10", bogusDll, NULL); - ok(ret, "CryptRegisterOIDFunction failed: %d\n", GetLastError()); - ret = CryptUnregisterOIDFunction(PKCS_7_ASN_ENCODING, "CryptDllEncodeObject", - "1.2.3.4.5.6.7.8.9.10"); - ok(ret, "CryptUnregisterOIDFunction failed: %d\n", GetLastError()); - /* Check with bogus encoding type. Registry keys are still created */ - ret = CryptRegisterOIDFunction(0, "CryptDllEncodeObject", - "1.2.3.4.5.6.7.8.9.10", bogusDll, NULL); - ok(ret, "CryptRegisterOIDFunction failed: %d\n", GetLastError()); - ret = CryptUnregisterOIDFunction(0, "CryptDllEncodeObject", - "1.2.3.4.5.6.7.8.9.10"); - ok(ret, "CryptUnregisterOIDFunction failed: %d\n", GetLastError()); - /* Unwanted Cryptography\OID\EncodingType 0\CryptDllEncodeObject\ - * will still be there - */ - ok(!RegDeleteKeyA(HKEY_LOCAL_MACHINE, - "SOFTWARE\\Microsoft\\Cryptography\\OID\\EncodingType 0\\CryptDllEncodeObject"), - "Could not delete CryptDllEncodeObject key\n"); - /* This is written with value 3 verbatim. Thus, the encoding type isn't - * (for now) treated as a mask. Registry keys are created. - */ - ret = CryptRegisterOIDFunction(3, "CryptDllEncodeObject", - "1.2.3.4.5.6.7.8.9.10", bogusDll, NULL); - ok(ret, "CryptRegisterOIDFunction failed: %d\n", GetLastError()); - ret = CryptUnregisterOIDFunction(3, "CryptDllEncodeObject", - "1.2.3.4.5.6.7.8.9.10"); - ok(ret, "CryptUnregisterOIDFunction failed: %d\n", GetLastError()); - /* Unwanted Cryptography\OID\EncodingType 3\CryptDllEncodeObject - * will still be there. - */ - ok(!RegDeleteKeyA(HKEY_LOCAL_MACHINE, - "SOFTWARE\\Microsoft\\Cryptography\\OID\\EncodingType 3\\CryptDllEncodeObject"), - "Could not delete CryptDllEncodeObject key\n"); - ok(!RegDeleteKeyA(HKEY_LOCAL_MACHINE, - "SOFTWARE\\Microsoft\\Cryptography\\OID\\EncodingType 3"), - "Could not delete 'EncodingType 3' key\n"); -} - -static void test_registerDefaultOIDFunction(void) -{ - static const char fmt[] = - "Software\\Microsoft\\Cryptography\\OID\\EncodingType %d\\%s\\DEFAULT"; - static const char func[] = "CertDllOpenStoreProv"; - char buf[MAX_PATH]; - BOOL ret; - LSTATUS rc; - HKEY key; - - ret = CryptRegisterDefaultOIDFunction(0, NULL, 0, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* This succeeds on WinXP, although the bogus entry is unusable. - ret = CryptRegisterDefaultOIDFunction(0, NULL, 0, bogusDll); - */ - /* Register one at index 0 */ - SetLastError(0xdeadbeef); - ret = CryptRegisterDefaultOIDFunction(0, "CertDllOpenStoreProv", 0, - bogusDll); - if (!ret && GetLastError() == ERROR_ACCESS_DENIED) - { - skip("Need admin rights\n"); - return; - } - ok(ret, "CryptRegisterDefaultOIDFunction failed: %08x\n", GetLastError()); - /* Reregistering should fail */ - ret = CryptRegisterDefaultOIDFunction(0, "CertDllOpenStoreProv", 0, - bogusDll); - ok(!ret && GetLastError() == ERROR_FILE_EXISTS, - "Expected ERROR_FILE_EXISTS, got %08x\n", GetLastError()); - /* Registering the same one at index 1 should also fail */ - ret = CryptRegisterDefaultOIDFunction(0, "CertDllOpenStoreProv", 1, - bogusDll); - ok(!ret && GetLastError() == ERROR_FILE_EXISTS, - "Expected ERROR_FILE_EXISTS, got %08x\n", GetLastError()); - /* Registering a different one at index 1 succeeds */ - ret = CryptRegisterDefaultOIDFunction(0, "CertDllOpenStoreProv", 1, - bogus2Dll); - ok(ret, "CryptRegisterDefaultOIDFunction failed: %08x\n", GetLastError()); - sprintf(buf, fmt, 0, func); - rc = RegOpenKeyA(HKEY_LOCAL_MACHINE, buf, &key); - ok(rc == 0, "Expected key to exist, RegOpenKeyA failed: %d\n", rc); - if (rc == 0) - { - static const CHAR dllA[] = "Dll"; - static const CHAR bogusDll_A[] = "bogus.dll"; - static const CHAR bogus2Dll_A[] = "bogus2.dll"; - CHAR dllBuf[MAX_PATH]; - DWORD type, size; - LPSTR ptr; - - size = sizeof(dllBuf) / sizeof(dllBuf[0]); - rc = RegQueryValueExA(key, dllA, NULL, &type, (LPBYTE)dllBuf, &size); - ok(rc == 0, - "Expected Dll value to exist, RegQueryValueExA failed: %d\n", rc); - ok(type == REG_MULTI_SZ, "Expected type REG_MULTI_SZ, got %d\n", type); - /* bogusDll was registered first, so that should be first */ - ptr = dllBuf; - ok(!lstrcmpiA(ptr, bogusDll_A), "Unexpected dll\n"); - ptr += lstrlenA(ptr) + 1; - ok(!lstrcmpiA(ptr, bogus2Dll_A), "Unexpected dll\n"); - RegCloseKey(key); - } - /* Unregister both of them */ - ret = CryptUnregisterDefaultOIDFunction(0, "CertDllOpenStoreProv", - bogusDll); - ok(ret, "CryptUnregisterDefaultOIDFunction failed: %08x\n", - GetLastError()); - ret = CryptUnregisterDefaultOIDFunction(0, "CertDllOpenStoreProv", - bogus2Dll); - ok(ret, "CryptUnregisterDefaultOIDFunction failed: %08x\n", - GetLastError()); - /* Now that they're both unregistered, unregistering should fail */ - ret = CryptUnregisterDefaultOIDFunction(0, "CertDllOpenStoreProv", - bogusDll); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - - /* Repeat a few tests on the normal encoding type */ - ret = CryptRegisterDefaultOIDFunction(X509_ASN_ENCODING, - "CertDllOpenStoreProv", 0, bogusDll); - ret = CryptUnregisterDefaultOIDFunction(X509_ASN_ENCODING, - "CertDllOpenStoreProv", bogusDll); - ok(ret, "CryptUnregisterDefaultOIDFunction failed\n"); - ret = CryptUnregisterDefaultOIDFunction(X509_ASN_ENCODING, - "CertDllOpenStoreProv", bogusDll); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); -} - -static void test_getDefaultOIDFunctionAddress(void) -{ - BOOL ret; - HCRYPTOIDFUNCSET set; - void *funcAddr; - HCRYPTOIDFUNCADDR hFuncAddr; - - /* Crash - ret = CryptGetDefaultOIDFunctionAddress(0, 0, NULL, 0, NULL, NULL); - ret = CryptGetDefaultOIDFunctionAddress(0, 0, NULL, 0, &funcAddr, NULL); - ret = CryptGetDefaultOIDFunctionAddress(0, 0, NULL, 0, NULL, &hFuncAddr); - ret = CryptGetDefaultOIDFunctionAddress(0, 0, NULL, 0, &funcAddr, - &hFuncAddr); - */ - set = CryptInitOIDFunctionSet("CertDllOpenStoreProv", 0); - ok(set != 0, "CryptInitOIDFunctionSet failed: %d\n", GetLastError()); - /* This crashes if hFuncAddr is not 0 to begin with */ - hFuncAddr = 0; - ret = CryptGetDefaultOIDFunctionAddress(set, 0, NULL, 0, &funcAddr, - &hFuncAddr); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - /* This fails with the normal encoding too, so built-in functions aren't - * returned. - */ - ret = CryptGetDefaultOIDFunctionAddress(set, X509_ASN_ENCODING, NULL, 0, - &funcAddr, &hFuncAddr); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - - /* Even with a registered dll, this fails (since the dll doesn't exist) */ - SetLastError(0xdeadbeef); - ret = CryptRegisterDefaultOIDFunction(0, "CertDllOpenStoreProv", 0, - bogusDll); - if (!ret && GetLastError() == ERROR_ACCESS_DENIED) - skip("Need admin rights\n"); - else - ok(ret, "CryptRegisterDefaultOIDFunction failed: %08x\n", GetLastError()); - ret = CryptGetDefaultOIDFunctionAddress(set, 0, NULL, 0, &funcAddr, - &hFuncAddr); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - CryptUnregisterDefaultOIDFunction(0, "CertDllOpenStoreProv", bogusDll); -} - -static BOOL WINAPI countOidInfo(PCCRYPT_OID_INFO pInfo, void *pvArg) -{ - (*(DWORD *)pvArg)++; - return TRUE; -} - -static BOOL WINAPI noOidInfo(PCCRYPT_OID_INFO pInfo, void *pvArg) -{ - return FALSE; -} - -static void test_enumOIDInfo(void) -{ - BOOL ret; - DWORD count = 0; - - if (!pCryptEnumOIDInfo) - { - win_skip("CryptEnumOIDInfo() is not available\n"); - return; - } - - /* This crashes - ret = pCryptEnumOIDInfo(7, 0, NULL, NULL); - */ - - /* Silly tests, check that more than one thing is enumerated */ - ret = pCryptEnumOIDInfo(0, 0, &count, countOidInfo); - ok(ret && count > 0, "Expected more than item enumerated\n"); - ret = pCryptEnumOIDInfo(0, 0, NULL, noOidInfo); - ok(!ret, "Expected FALSE\n"); -} - -static void test_findOIDInfo(void) -{ - static WCHAR sha1[] = { 's','h','a','1',0 }; - static CHAR oid_rsa_md5[] = szOID_RSA_MD5; - ALG_ID alg = CALG_SHA1; - ALG_ID algs[2] = { CALG_MD5, CALG_RSA_SIGN }; - PCCRYPT_OID_INFO info; - - info = CryptFindOIDInfo(0, NULL, 0); - ok(info == NULL, "Expected NULL\n"); - info = CryptFindOIDInfo(CRYPT_OID_INFO_OID_KEY, oid_rsa_md5, 0); - ok(info != NULL, "Expected to find szOID_RSA_MD5\n"); - if (info) - { - ok(!strcmp(info->pszOID, szOID_RSA_MD5), "Expected %s, got %s\n", - szOID_RSA_MD5, info->pszOID); - ok(U(*info).Algid == CALG_MD5, "Expected CALG_MD5, got %d\n", - U(*info).Algid); - } - info = CryptFindOIDInfo(CRYPT_OID_INFO_NAME_KEY, sha1, 0); - ok(info != NULL, "Expected to find sha1\n"); - if (info) - { - ok(!strcmp(info->pszOID, szOID_OIWSEC_sha1), "Expected %s, got %s\n", - szOID_OIWSEC_sha1, info->pszOID); - ok(U(*info).Algid == CALG_SHA1, "Expected CALG_SHA1, got %d\n", - U(*info).Algid); - } - info = CryptFindOIDInfo(CRYPT_OID_INFO_ALGID_KEY, &alg, 0); - ok(info != NULL, "Expected to find sha1\n"); - if (info) - { - ok(!strcmp(info->pszOID, szOID_OIWSEC_sha1), "Expected %s, got %s\n", - szOID_OIWSEC_sha1, info->pszOID); - ok(U(*info).Algid == CALG_SHA1, "Expected CALG_SHA1, got %d\n", - U(*info).Algid); - } - info = CryptFindOIDInfo(CRYPT_OID_INFO_SIGN_KEY, algs, 0); - ok(info != NULL, "Expected to find md5RSA\n"); - if (info) - { - ok(!strcmp(info->pszOID, szOID_RSA_MD5RSA), "Expected %s, got %s\n", - szOID_RSA_MD5RSA, info->pszOID); - ok(U(*info).Algid == CALG_MD5, "Expected CALG_MD5, got %d\n", - U(*info).Algid); - } -} - -START_TEST(oid) -{ - HMODULE hCrypt32 = GetModuleHandleA("crypt32.dll"); - pCryptEnumOIDInfo = (void*)GetProcAddress(hCrypt32, "CryptEnumOIDInfo"); - - testOIDToAlgID(); - testAlgIDToOID(); - test_enumOIDInfo(); - test_findOIDInfo(); - test_oidFunctionSet(); - test_installOIDFunctionAddress(); - test_registerOIDFunction(); - test_registerDefaultOIDFunction(); - test_getDefaultOIDFunctionAddress(); -} diff --git a/rostests/winetests/crypt32/protectdata.c b/rostests/winetests/crypt32/protectdata.c deleted file mode 100644 index 29d04e81aa6..00000000000 --- a/rostests/winetests/crypt32/protectdata.c +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Unit test suite for crypt32.dll's CryptProtectData/CryptUnprotectData - * - * Copyright 2005 Kees Cook - * - * 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 "wine/test.h" - -static BOOL (WINAPI *pCryptProtectData)(DATA_BLOB*,LPCWSTR,DATA_BLOB*,PVOID,CRYPTPROTECT_PROMPTSTRUCT*,DWORD,DATA_BLOB*); -static BOOL (WINAPI *pCryptUnprotectData)(DATA_BLOB*,LPWSTR*,DATA_BLOB*,PVOID,CRYPTPROTECT_PROMPTSTRUCT*,DWORD,DATA_BLOB*); - -static char secret[] = "I am a super secret string that no one can see!"; -static char secret2[] = "I am a super secret string indescribable string"; -static char key[] = "Wibble wibble wibble"; -static const WCHAR desc[] = {'U','l','t','r','a',' ','s','e','c','r','e','t',' ','t','e','s','t',' ','m','e','s','s','a','g','e',0}; -static BOOL protected = FALSE; /* if true, the unprotect tests can run */ -static DATA_BLOB cipher; -static DATA_BLOB cipher_entropy; -static DATA_BLOB cipher_no_desc; - -static void test_cryptprotectdata(void) -{ - LONG r; - DATA_BLOB plain; - DATA_BLOB entropy; - - plain.pbData=(void*)secret; - plain.cbData=strlen(secret)+1; - - entropy.pbData=(void*)key; - entropy.cbData=strlen(key)+1; - - SetLastError(0xDEADBEEF); - protected = pCryptProtectData(NULL,desc,NULL,NULL,NULL,0,&cipher); - ok(!protected, "Encrypting without plain data source.\n"); - r = GetLastError(); - ok(r == ERROR_INVALID_PARAMETER, "Wrong (%u) GetLastError seen\n",r); - - SetLastError(0xDEADBEEF); - protected = pCryptProtectData(&plain,desc,NULL,NULL,NULL,0,NULL); - ok(!protected, "Encrypting without cipher destination.\n"); - r = GetLastError(); - ok(r == ERROR_INVALID_PARAMETER, "Wrong (%u) GetLastError seen\n",r); - - cipher.pbData=NULL; - cipher.cbData=0; - - /* without entropy */ - SetLastError(0xDEADBEEF); - protected = pCryptProtectData(&plain,desc,NULL,NULL,NULL,0,&cipher); - ok(protected || - broken(!protected), /* Win9x/NT4 */ - "Encrypting without entropy.\n"); - if (protected) - { - r = GetLastError(); - ok(r == ERROR_SUCCESS || - r == ERROR_IO_PENDING, /* win2k */ - "Expected ERROR_SUCCESS or ERROR_IO_PENDING, got %d\n",r); - } - - cipher_entropy.pbData=NULL; - cipher_entropy.cbData=0; - - /* with entropy */ - SetLastError(0xDEADBEEF); - protected = pCryptProtectData(&plain,desc,&entropy,NULL,NULL,0,&cipher_entropy); - ok(protected || - broken(!protected), /* Win9x/NT4 */ - "Encrypting with entropy.\n"); - - cipher_no_desc.pbData=NULL; - cipher_no_desc.cbData=0; - - /* with entropy but no description */ - plain.pbData=(void*)secret2; - plain.cbData=strlen(secret2)+1; - SetLastError(0xDEADBEEF); - protected = pCryptProtectData(&plain,NULL,&entropy,NULL,NULL,0,&cipher_no_desc); - if (!protected) - { - /* fails in win2k */ - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - } -} - -static void test_cryptunprotectdata(void) -{ - LONG r; - DATA_BLOB plain; - DATA_BLOB entropy; - BOOL okay; - WCHAR * data_desc; - - entropy.pbData=(void*)key; - entropy.cbData=strlen(key)+1; - - /* fails in win2k */ - if (!protected) - { - skip("CryptProtectData failed to run\n"); - return; - } - - plain.pbData=NULL; - plain.cbData=0; - - SetLastError(0xDEADBEEF); - okay = pCryptUnprotectData(&cipher,NULL,NULL,NULL,NULL,0,NULL); - ok(!okay,"Decrypting without destination\n"); - r = GetLastError(); - ok(r == ERROR_INVALID_PARAMETER, "Wrong (%u) GetLastError seen\n",r); - - SetLastError(0xDEADBEEF); - okay = pCryptUnprotectData(NULL,NULL,NULL,NULL,NULL,0,&plain); - ok(!okay,"Decrypting without source\n"); - r = GetLastError(); - ok(r == ERROR_INVALID_PARAMETER, "Wrong (%u) GetLastError seen\n",r); - - plain.pbData=NULL; - plain.cbData=0; - - SetLastError(0xDEADBEEF); - okay = pCryptUnprotectData(&cipher_entropy,NULL,NULL,NULL,NULL,0,&plain); - ok(!okay,"Decrypting without needed entropy\n"); - r = GetLastError(); - ok(r == ERROR_INVALID_DATA, "Wrong (%u) GetLastError seen\n", r); - - plain.pbData=NULL; - plain.cbData=0; - data_desc=NULL; - - /* without entropy */ - SetLastError(0xDEADBEEF); - okay = pCryptUnprotectData(&cipher,&data_desc,NULL,NULL,NULL,0,&plain); - ok(okay,"Decrypting without entropy\n"); - - ok(plain.pbData!=NULL,"Plain DATA_BLOB missing data\n"); - ok(plain.cbData==strlen(secret)+1,"Plain DATA_BLOB wrong length\n"); - ok(!strcmp((const char*)plain.pbData,secret),"Plain does not match secret\n"); - ok(data_desc!=NULL,"Description not allocated\n"); - ok(!lstrcmpW(data_desc,desc),"Description does not match\n"); - - LocalFree(plain.pbData); - LocalFree(data_desc); - - plain.pbData=NULL; - plain.cbData=0; - data_desc=NULL; - - /* with wrong entropy */ - SetLastError(0xDEADBEEF); - okay = pCryptUnprotectData(&cipher_entropy,&data_desc,&cipher_entropy,NULL,NULL,0,&plain); - ok(!okay,"Decrypting with wrong entropy\n"); - r = GetLastError(); - ok(r == ERROR_INVALID_DATA, "Wrong (%u) GetLastError seen\n",r); - - /* with entropy */ - SetLastError(0xDEADBEEF); - okay = pCryptUnprotectData(&cipher_entropy,&data_desc,&entropy,NULL,NULL,0,&plain); - ok(okay,"Decrypting with entropy\n"); - - ok(plain.pbData!=NULL,"Plain DATA_BLOB missing data\n"); - ok(plain.cbData==strlen(secret)+1,"Plain DATA_BLOB wrong length\n"); - ok(!strcmp((const char*)plain.pbData,secret),"Plain does not match secret\n"); - ok(data_desc!=NULL,"Description not allocated\n"); - ok(!lstrcmpW(data_desc,desc),"Description does not match\n"); - - LocalFree(plain.pbData); - LocalFree(data_desc); - - plain.pbData=NULL; - plain.cbData=0; - data_desc=NULL; - - /* with entropy but no description */ - SetLastError(0xDEADBEEF); - okay = pCryptUnprotectData(&cipher_no_desc,&data_desc,&entropy,NULL,NULL,0,&plain); - ok(okay,"Decrypting with entropy and no description\n"); - - ok(plain.pbData!=NULL,"Plain DATA_BLOB missing data\n"); - ok(plain.cbData==strlen(secret2)+1,"Plain DATA_BLOB wrong length\n"); - ok(!strcmp((const char*)plain.pbData,secret2),"Plain does not match secret\n"); - ok(data_desc!=NULL,"Description not allocated\n"); - ok(data_desc[0]=='\0',"Description not empty\n"); - - LocalFree(data_desc); - LocalFree(plain.pbData); - - plain.pbData=NULL; - plain.cbData=0; -} - -static void test_simpleroundtrip(const char *plaintext) -{ - DATA_BLOB input; - DATA_BLOB encrypted; - DATA_BLOB output; - int res; - WCHAR emptyW[1]; - - emptyW[0] = 0; - input.pbData = (unsigned char *)plaintext; - input.cbData = strlen(plaintext); - res = pCryptProtectData(&input, emptyW, NULL, NULL, NULL, 0, &encrypted); - ok(res != 0 || broken(!res), "can't protect\n"); - if (!res) - { - /* Fails on Win9x, NT4 */ - win_skip("CryptProtectData failed\n"); - return; - } - - res = pCryptUnprotectData(&encrypted, NULL, NULL, NULL, NULL, 0, &output); - ok(res != 0, "can't unprotect; last error %u\n", GetLastError()); - ok(output.cbData == strlen(plaintext), "output wrong length %d for input '%s', wanted %d\n", output.cbData, plaintext, lstrlenA(plaintext)); - ok(!memcmp(plaintext, (char *)output.pbData, output.cbData), "output wrong contents for input '%s'\n", plaintext); - LocalFree(output.pbData); - LocalFree(encrypted.pbData); -} - -START_TEST(protectdata) -{ - HMODULE hCrypt32 = GetModuleHandleA("crypt32.dll"); - hCrypt32 = GetModuleHandleA("crypt32.dll"); - pCryptProtectData = (void*)GetProcAddress(hCrypt32, "CryptProtectData"); - pCryptUnprotectData = (void*)GetProcAddress(hCrypt32, "CryptUnprotectData"); - if (!pCryptProtectData || !pCryptUnprotectData) - { - win_skip("Crypt(Un)ProtectData() is not available\n"); - return; - } - - protected=FALSE; - test_cryptprotectdata(); - test_cryptunprotectdata(); - test_simpleroundtrip(""); - test_simpleroundtrip("hello"); - - /* deinit globals here */ - if (cipher.pbData) LocalFree(cipher.pbData); - if (cipher_entropy.pbData) LocalFree(cipher_entropy.pbData); - if (cipher_no_desc.pbData) LocalFree(cipher_no_desc.pbData); -} diff --git a/rostests/winetests/crypt32/sip.c b/rostests/winetests/crypt32/sip.c deleted file mode 100644 index 8d9af75a73c..00000000000 --- a/rostests/winetests/crypt32/sip.c +++ /dev/null @@ -1,458 +0,0 @@ -/* - * Subject Interface Package tests - * - * Copyright 2006 Paul Vriens - * Copyright 2008 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 - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "wine/test.h" - -static BOOL (WINAPI * funcCryptSIPGetSignedDataMsg)(SIP_SUBJECTINFO *,DWORD *,DWORD,DWORD *,BYTE *); -static BOOL (WINAPI * funcCryptSIPPutSignedDataMsg)(SIP_SUBJECTINFO *,DWORD,DWORD *,DWORD,BYTE *); -static BOOL (WINAPI * funcCryptSIPCreateIndirectData)(SIP_SUBJECTINFO *,DWORD *,SIP_INDIRECT_DATA *); -static BOOL (WINAPI * funcCryptSIPVerifyIndirectData)(SIP_SUBJECTINFO *,SIP_INDIRECT_DATA *); -static BOOL (WINAPI * funcCryptSIPRemoveSignedDataMsg)(SIP_SUBJECTINFO *,DWORD); - -static char *show_guid(const GUID *guid, char *buf) -{ - sprintf(buf, - "{%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] ); - - return buf; -} - -static void test_AddRemoveProvider(void) -{ - BOOL ret; - SIP_ADD_NEWPROVIDER newprov; - GUID actionid = { 0xdeadbe, 0xefde, 0xadbe, { 0xef,0xde,0xad,0xbe,0xef,0xde,0xad,0xbe }}; - static WCHAR dummydll[] = {'d','e','a','d','b','e','e','f','.','d','l','l',0 }; - static WCHAR dummyfunction[] = {'d','u','m','m','y','f','u','n','c','t','i','o','n',0 }; - - /* NULL check */ - SetLastError(0xdeadbeef); - ret = CryptSIPRemoveProvider(NULL); - ok (!ret, "Expected CryptSIPRemoveProvider to fail.\n"); - ok (GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d.\n", GetLastError()); - - /* nonexistent provider should result in a registry error */ - SetLastError(0xdeadbeef); - ret = CryptSIPRemoveProvider(&actionid); - if (!ret && GetLastError() == ERROR_ACCESS_DENIED) - { - /* Apparently the needed rights are checked before the existence of the provider */ - skip("Need admin rights\n"); - } - else - { - /* On some Win98 systems, CryptSIPRemoveProvider always succeeds if - * the arguments are correct, whether or not the registry key is - * present, so don't test ret, just check the last error if it does - * return FALSE. - */ - if (!ret) - ok (GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d.\n", GetLastError()); - } - - /* Everything OK, pwszIsFunctionName and pwszIsFunctionNameFmt2 are left NULL - * as allowed */ - - memset(&newprov, 0, sizeof(SIP_ADD_NEWPROVIDER)); - newprov.cbStruct = sizeof(SIP_ADD_NEWPROVIDER); - newprov.pgSubject = &actionid; - newprov.pwszDLLFileName = dummydll; - newprov.pwszGetFuncName = dummyfunction; - newprov.pwszPutFuncName = dummyfunction; - newprov.pwszCreateFuncName = dummyfunction; - newprov.pwszVerifyFuncName = dummyfunction; - newprov.pwszRemoveFuncName = dummyfunction; - SetLastError(0xdeadbeef); - ret = CryptSIPAddProvider(&newprov); - if (!ret && GetLastError() == ERROR_ACCESS_DENIED) - { - skip("Need admin rights\n"); - return; - } - ok ( ret, "CryptSIPAddProvider should have succeeded\n"); - - /* Dummy provider will be deleted, but the function still fails because - * pwszIsFunctionName and pwszIsFunctionNameFmt2 are not present in the - * registry. - */ - SetLastError(0xdeadbeef); - ret = CryptSIPRemoveProvider(&actionid); - /* On some Win98 systems, CryptSIPRemoveProvider always succeeds if - * the arguments are correct, whether or not the registry key is - * present, so don't test ret, just check the last error if it does - * return FALSE. - */ - if (!ret) - ok (GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d.\n", GetLastError()); - - /* Everything OK */ - memset(&newprov, 0, sizeof(SIP_ADD_NEWPROVIDER)); - newprov.cbStruct = sizeof(SIP_ADD_NEWPROVIDER); - newprov.pgSubject = &actionid; - newprov.pwszDLLFileName = dummydll; - newprov.pwszGetFuncName = dummyfunction; - newprov.pwszPutFuncName = dummyfunction; - newprov.pwszCreateFuncName = dummyfunction; - newprov.pwszVerifyFuncName = dummyfunction; - newprov.pwszRemoveFuncName = dummyfunction; - newprov.pwszIsFunctionNameFmt2 = dummyfunction; - newprov.pwszIsFunctionName = dummyfunction; - SetLastError(0xdeadbeef); - ret = CryptSIPAddProvider(&newprov); - ok ( ret, "CryptSIPAddProvider should have succeeded\n"); - - /* Dummy provider should be deleted */ - SetLastError(0xdeadbeef); - ret = CryptSIPRemoveProvider(&actionid); - ok ( ret, "CryptSIPRemoveProvider should have succeeded\n"); -} - -static const BYTE cabFileData[] = { -0x4d,0x53,0x43,0x46,0x00,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x2c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x01,0x01,0x00,0x01,0x00,0x00,0x00, -0xef,0xbe,0xff,0xff,0x42,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0xf7,0x38,0x4b,0xac,0x00,0x00,0x61,0x2e,0x74,0x78, -0x74,0x00,0x6d,0x5a,0x72,0x78,0x06,0x00,0x06,0x00,0x61,0x2e,0x74,0x78,0x74,0x0a, -}; - -static void test_SIPRetrieveSubjectGUID(void) -{ - BOOL ret; - GUID subject; - HANDLE file; - static const CHAR windir[] = "windir"; - static const CHAR regeditExe[] = "regedit.exe"; - static const GUID nullSubject = { 0x0, 0x0, 0x0, { 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0 }}; - static const WCHAR deadbeef[] = { 'c',':','\\','d','e','a','d','b','e','e','f','.','d','b','f',0 }; - /* Couldn't find a name for this GUID, it's the one used for 95% of the files */ - static const GUID unknownGUID = { 0xC689AAB8, 0x8E78, 0x11D0, { 0x8C,0x47,0x00,0xC0,0x4F,0xC2,0x95,0xEE }}; - static const GUID cabGUID = { 0xc689aaba, 0x8e78, 0x11d0, {0x8c,0x47,0x00,0xc0,0x4f,0xc2,0x95,0xee }}; - static CHAR regeditPath[MAX_PATH]; - static WCHAR regeditPathW[MAX_PATH]; - static CHAR path[MAX_PATH]; - static CHAR tempfile[MAX_PATH]; - static WCHAR tempfileW[MAX_PATH]; - static char guid1[39], guid2[39]; - DWORD written; - - /* NULL check */ - SetLastError(0xdeadbeef); - ret = CryptSIPRetrieveSubjectGuid(NULL, NULL, NULL); - ok ( !ret, "Expected CryptSIPRetrieveSubjectGuid to fail\n"); - ok (GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d.\n", GetLastError()); - - /* Test with a nonexistent file (hopefully) */ - SetLastError(0xdeadbeef); - /* Set subject to something other than zeros */ - memset(&subject, 1, sizeof(GUID)); - ret = CryptSIPRetrieveSubjectGuid(deadbeef, NULL, &subject); - ok ( !ret, "Expected CryptSIPRetrieveSubjectGuid to fail\n"); - ok (GetLastError() == ERROR_FILE_NOT_FOUND || - GetLastError() == ERROR_PATH_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND or ERROR_PATH_NOT_FOUND, got %d.\n", - GetLastError()); - ok ( !memcmp(&subject, &nullSubject, sizeof(GUID)), - "Expected a NULL GUID for c:\\deadbeef.dbf, not %s\n", show_guid(&subject, guid1)); - - /* Now with an executable that should exist - * - * Use A-functions where possible as that should be available on all platforms - */ - ret = GetEnvironmentVariableA(windir, regeditPath, MAX_PATH); - ok (ret > 0, "expected GEVA(windir) to succeed, last error %d\n", GetLastError()); - strcat(regeditPath, "\\"); - strcat(regeditPath, regeditExe); - MultiByteToWideChar( CP_ACP, 0, regeditPath, - strlen(regeditPath)+1, regeditPathW, - sizeof(regeditPathW)/sizeof(regeditPathW[0]) ); - - SetLastError(0xdeadbeef); - memset(&subject, 1, sizeof(GUID)); - ret = CryptSIPRetrieveSubjectGuid(regeditPathW, NULL, &subject); - ok ( ret, "Expected CryptSIPRetrieveSubjectGuid to succeed\n"); - ok ( !memcmp(&subject, &unknownGUID, sizeof(GUID)), - "Expected (%s), got (%s).\n", show_guid(&unknownGUID, guid1), show_guid(&subject, guid2)); - - /* The same thing but now with a handle instead of a filename */ - file = CreateFileA(regeditPath, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL); - SetLastError(0xdeadbeef); - memset(&subject, 1, sizeof(GUID)); - ret = CryptSIPRetrieveSubjectGuid(NULL, file, &subject); - ok ( ret, "Expected CryptSIPRetrieveSubjectGuid to succeed\n"); - ok ( !memcmp(&subject, &unknownGUID, sizeof(GUID)), - "Expected (%s), got (%s).\n", show_guid(&unknownGUID, guid1), show_guid(&subject, guid2)); - CloseHandle(file); - - /* And both */ - file = CreateFileA(regeditPath, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL); - SetLastError(0xdeadbeef); - memset(&subject, 1, sizeof(GUID)); - ret = CryptSIPRetrieveSubjectGuid(regeditPathW, file, &subject); - ok ( ret, "Expected CryptSIPRetrieveSubjectGuid to succeed\n"); - ok ( !memcmp(&subject, &unknownGUID, sizeof(GUID)), - "Expected (%s), got (%s).\n", show_guid(&unknownGUID, guid1), show_guid(&subject, guid2)); - CloseHandle(file); - - /* Now with an empty file */ - GetTempPathA(sizeof(path), path); - GetTempFileNameA(path, "sip", 0 , tempfile); - MultiByteToWideChar( CP_ACP, 0, tempfile, - strlen(tempfile)+1, tempfileW, - sizeof(tempfileW)/sizeof(tempfileW[0]) ); - - SetLastError(0xdeadbeef); - memset(&subject, 1, sizeof(GUID)); - ret = CryptSIPRetrieveSubjectGuid(tempfileW, NULL, &subject); - ok ( !ret, "Expected CryptSIPRetrieveSubjectGuid to fail\n"); - ok ( GetLastError() == ERROR_FILE_INVALID || - GetLastError() == ERROR_INVALID_PARAMETER /* Vista */ || - GetLastError() == ERROR_SUCCESS /* most Win98 */ || - GetLastError() == TRUST_E_SUBJECT_FORM_UNKNOWN /* some Win98 */, - "Expected ERROR_FILE_INVALID, ERROR_INVALID_PARAMETER, ERROR_SUCCESS or TRUST_E_SUBJECT_FORM_UNKNOWN, got 0x%08x\n", GetLastError()); - ok ( !memcmp(&subject, &nullSubject, sizeof(GUID)), - "Expected a NULL GUID for empty file %s, not %s\n", tempfile, show_guid(&subject, guid1)); - - /* Use a file with a size of 3 (at least < 4) */ - file = CreateFileA(tempfile, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); - WriteFile(file, "123", 3, &written, NULL); - CloseHandle(file); - - SetLastError(0xdeadbeef); - memset(&subject, 1, sizeof(GUID)); - ret = CryptSIPRetrieveSubjectGuid(tempfileW, NULL, &subject); - ok ( !ret, "Expected CryptSIPRetrieveSubjectGuid to fail\n"); - ok ( GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_SUCCESS /* most Win98 */ || - GetLastError() == TRUST_E_SUBJECT_FORM_UNKNOWN /* some Win98 */, - "Expected ERROR_INVALID_PARAMETER, ERROR_SUCCESS or TRUST_E_SUBJECT_FORM_UNKNOWN, got 0x%08x\n", GetLastError()); - ok ( !memcmp(&subject, &nullSubject, sizeof(GUID)), - "Expected a NULL GUID for empty file %s, not %s\n", tempfile, show_guid(&subject, guid1)); - - /* And now >= 4 */ - file = CreateFileA(tempfile, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); - WriteFile(file, "1234", 4, &written, NULL); - CloseHandle(file); - - SetLastError(0xdeadbeef); - memset(&subject, 1, sizeof(GUID)); - ret = CryptSIPRetrieveSubjectGuid(tempfileW, NULL, &subject); - ok ( !ret, "Expected CryptSIPRetrieveSubjectGuid to fail\n"); - ok ( GetLastError() == TRUST_E_SUBJECT_FORM_UNKNOWN || - GetLastError() == ERROR_SUCCESS /* Win98 */, - "Expected TRUST_E_SUBJECT_FORM_UNKNOWN or ERROR_SUCCESS, got 0x%08x\n", GetLastError()); - ok ( !memcmp(&subject, &nullSubject, sizeof(GUID)), - "Expected a NULL GUID for empty file %s, not %s\n", tempfile, show_guid(&subject, guid1)); - - /* Clean up */ - DeleteFileA(tempfile); - - /* Create a file with just the .cab header 'MSCF' */ - SetLastError(0xdeadbeef); - file = CreateFileA(tempfile, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "failed with %u\n", GetLastError()); - WriteFile(file, cabFileData, 4, &written, NULL); - CloseHandle(file); - - SetLastError(0xdeadbeef); - memset(&subject, 1, sizeof(GUID)); - ret = CryptSIPRetrieveSubjectGuid(tempfileW, NULL, &subject); - ok( ret, "CryptSIPRetrieveSubjectGuid failed: %d (0x%08x)\n", - GetLastError(), GetLastError() ); - ok ( !memcmp(&subject, &cabGUID, sizeof(GUID)), - "Expected GUID %s for cabinet file, not %s\n", show_guid(&cabGUID, guid1), show_guid(&subject, guid2)); - - /* Clean up */ - DeleteFileA(tempfile); - - /* Create a .cab file */ - SetLastError(0xdeadbeef); - file = CreateFileA(tempfile, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "failed with %u\n", GetLastError()); - WriteFile(file, cabFileData, sizeof(cabFileData), &written, NULL); - CloseHandle(file); - - SetLastError(0xdeadbeef); - memset(&subject, 1, sizeof(GUID)); - ret = CryptSIPRetrieveSubjectGuid(tempfileW, NULL, &subject); - ok( ret, "CryptSIPRetrieveSubjectGuid failed: %d (0x%08x)\n", - GetLastError(), GetLastError() ); - ok ( !memcmp(&subject, &cabGUID, sizeof(GUID)), - "Expected GUID %s for cabinet file, not %s\n", show_guid(&cabGUID, guid1), show_guid(&subject, guid2)); - - /* Clean up */ - DeleteFileA(tempfile); -} - -static void test_SIPLoad(void) -{ - BOOL ret; - GUID subject; - static GUID dummySubject = { 0xdeadbeef, 0xdead, 0xbeef, { 0xde,0xad,0xbe,0xef,0xde,0xad,0xbe,0xef }}; - static GUID unknown = { 0xC689AABA, 0x8E78, 0x11D0, { 0x8C,0x47,0x00,0xC0,0x4F,0xC2,0x95,0xEE }}; /* WINTRUST.DLL */ - static GUID unknown2 = { 0xDE351A43, 0x8E59, 0x11D0, { 0x8C,0x47,0x00,0xC0,0x4F,0xC2,0x95,0xEE }}; /* WINTRUST.DLL */ - /* The next SIP is available on Windows and on Wine */ - static GUID unknown3 = { 0x000C10F1, 0x0000, 0x0000, { 0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46 }}; /* MSISIP.DLL */ - SIP_DISPATCH_INFO sdi; - HMODULE hCrypt; - - /* All NULL */ - SetLastError(0xdeadbeef); - ret = CryptSIPLoad(NULL, 0, NULL); - ok ( !ret, "Expected CryptSIPLoad to fail\n"); - ok ( GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got 0x%08x\n", GetLastError()); - - /* Only pSipDispatch NULL */ - SetLastError(0xdeadbeef); - ret = CryptSIPLoad(&subject, 0, NULL); - ok ( !ret, "Expected CryptSIPLoad to fail\n"); - ok ( GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got 0x%08x\n", GetLastError()); - - /* No NULLs, but nonexistent pgSubject */ - SetLastError(0xdeadbeef); - memset(&sdi, 0, sizeof(SIP_DISPATCH_INFO)); - sdi.cbSize = sizeof(SIP_DISPATCH_INFO); - sdi.pfGet = (pCryptSIPGetSignedDataMsg)0xdeadbeef; - ret = CryptSIPLoad(&dummySubject, 0, &sdi); - ok ( !ret, "Expected CryptSIPLoad to fail\n"); - ok ( GetLastError() == TRUST_E_SUBJECT_FORM_UNKNOWN, - "Expected TRUST_E_SUBJECT_FORM_UNKNOWN, got 0x%08x\n", GetLastError()); - ok( sdi.pfGet == (pCryptSIPGetSignedDataMsg)0xdeadbeef, "Expected no change to the function pointer\n"); - - hCrypt = GetModuleHandleA("crypt32.dll"); - funcCryptSIPGetSignedDataMsg = (void*)GetProcAddress(hCrypt, "CryptSIPGetSignedDataMsg"); - funcCryptSIPPutSignedDataMsg = (void*)GetProcAddress(hCrypt, "CryptSIPPutSignedDataMsg"); - funcCryptSIPCreateIndirectData = (void*)GetProcAddress(hCrypt, "CryptSIPCreateIndirectData"); - funcCryptSIPVerifyIndirectData = (void*)GetProcAddress(hCrypt, "CryptSIPVerifyIndirectData"); - funcCryptSIPRemoveSignedDataMsg = (void*)GetProcAddress(hCrypt, "CryptSIPRemoveSignedDataMsg"); - - /* All OK */ - SetLastError(0xdeadbeef); - memset(&sdi, 0, sizeof(SIP_DISPATCH_INFO)); - sdi.cbSize = sizeof(SIP_DISPATCH_INFO); - sdi.pfGet = (pCryptSIPGetSignedDataMsg)0xdeadbeef; - ret = CryptSIPLoad(&unknown, 0, &sdi); - ok ( ret, "Expected CryptSIPLoad to succeed\n"); - /* On native the last error will always be ERROR_PROC_NOT_FOUND as native searches for the function DllCanUnloadNow - * in WINTRUST.DLL (in this case). This function is not available in WINTRUST.DLL. - * For now there's no need to implement this is Wine as I doubt any program will rely on - * this last error when the call succeeded. - */ - ok( sdi.pfGet != (pCryptSIPGetSignedDataMsg)0xdeadbeef, "Expected a function pointer to be loaded.\n"); - - /* The function addresses returned by CryptSIPLoad are actually the addresses of - * crypt32's own functions. A function calling these addresses will end up first - * calling crypt32 functions which in its turn call the equivalent in the SIP - * as dictated by the given GUID. - */ - if (funcCryptSIPGetSignedDataMsg && funcCryptSIPPutSignedDataMsg && funcCryptSIPCreateIndirectData && - funcCryptSIPVerifyIndirectData && funcCryptSIPRemoveSignedDataMsg) - ok (sdi.pfGet == funcCryptSIPGetSignedDataMsg && - sdi.pfPut == funcCryptSIPPutSignedDataMsg && - sdi.pfCreate == funcCryptSIPCreateIndirectData && - sdi.pfVerify == funcCryptSIPVerifyIndirectData && - sdi.pfRemove == funcCryptSIPRemoveSignedDataMsg, - "Expected function addresses to be from crypt32\n"); - else - trace("Couldn't load function pointers\n"); - - /* All OK, but different GUID (same SIP though) */ - SetLastError(0xdeadbeef); - memset(&sdi, 0, sizeof(SIP_DISPATCH_INFO)); - sdi.cbSize = sizeof(SIP_DISPATCH_INFO); - sdi.pfGet = (pCryptSIPGetSignedDataMsg)0xdeadbeef; - ret = CryptSIPLoad(&unknown2, 0, &sdi); - ok ( ret, "Expected CryptSIPLoad to succeed\n"); - /* This call on its own would have resulted in an ERROR_PROC_NOT_FOUND, but the previous - * call to CryptSIPLoad already loaded wintrust.dll. As this information is cached, - * CryptSIPLoad will not try to search for the already mentioned DllCanUnloadNow. - */ - ok( sdi.pfGet != (pCryptSIPGetSignedDataMsg)0xdeadbeef, "Expected a function pointer to be loaded.\n"); - - /* All OK, but other SIP */ - SetLastError(0xdeadbeef); - memset(&sdi, 0, sizeof(SIP_DISPATCH_INFO)); - sdi.cbSize = sizeof(SIP_DISPATCH_INFO); - sdi.pfGet = (pCryptSIPGetSignedDataMsg)0xdeadbeef; - ret = CryptSIPLoad(&unknown3, 0, &sdi); - if (ret) - { - /* The SIP is known so we can safely assume that the next tests can be done */ - - /* As msisip.dll is not checked yet by any of the previous calls, the - * function DllCanUnloadNow will be checked again in msisip.dll (it's not present) - */ - ok( sdi.pfGet != (pCryptSIPGetSignedDataMsg)0xdeadbeef, "Expected a function pointer to be loaded.\n"); - - /* This is another SIP but this test proves the function addresses are the same as - * in the previous test. - */ - if (funcCryptSIPGetSignedDataMsg && funcCryptSIPPutSignedDataMsg && funcCryptSIPCreateIndirectData && - funcCryptSIPVerifyIndirectData && funcCryptSIPRemoveSignedDataMsg) - ok (sdi.pfGet == funcCryptSIPGetSignedDataMsg && - sdi.pfPut == funcCryptSIPPutSignedDataMsg && - sdi.pfCreate == funcCryptSIPCreateIndirectData && - sdi.pfVerify == funcCryptSIPVerifyIndirectData && - sdi.pfRemove == funcCryptSIPRemoveSignedDataMsg, - "Expected function addresses to be from crypt32\n"); - else - trace("Couldn't load function pointers\n"); - } - - /* Reserved parameter not 0 */ - SetLastError(0xdeadbeef); - memset(&sdi, 0, sizeof(SIP_DISPATCH_INFO)); - sdi.cbSize = sizeof(SIP_DISPATCH_INFO); - sdi.pfGet = (pCryptSIPGetSignedDataMsg)0xdeadbeef; - ret = CryptSIPLoad(&unknown, 1, &sdi); - ok ( !ret, "Expected CryptSIPLoad to fail\n"); - ok ( GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got 0x%08x\n", GetLastError()); - ok( sdi.pfGet == (pCryptSIPGetSignedDataMsg)0xdeadbeef, "Expected no change to the function pointer\n"); -} - -START_TEST(sip) -{ - test_AddRemoveProvider(); - /* It seems that the caching for loaded dlls is shared between CryptSIPRetrieveSubjectGUID - * and CryptSIPLoad. The tests have to be in this order to succeed. This is because in the last - * test for CryptSIPRetrieveSubjectGUID, several SIPs will be loaded (on Windows). - */ - test_SIPLoad(); - test_SIPRetrieveSubjectGUID(); -} diff --git a/rostests/winetests/crypt32/store.c b/rostests/winetests/crypt32/store.c deleted file mode 100644 index 10a85a346fe..00000000000 --- a/rostests/winetests/crypt32/store.c +++ /dev/null @@ -1,2596 +0,0 @@ -/* - * crypt32 cert store function tests - * - * Copyright 2005-2006 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 - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "wine/test.h" - -/* The following aren't defined in wincrypt.h, as they're "reserved" */ -#define CERT_CERT_PROP_ID 32 -#define CERT_CRL_PROP_ID 33 -#define CERT_CTL_PROP_ID 34 - -struct CertPropIDHeader -{ - DWORD propID; - DWORD unknown1; - DWORD cb; -}; - -static const BYTE emptyCert[] = { 0x30, 0x00 }; -static const BYTE bigCert[] = { 0x30, 0x7a, 0x02, 0x01, 0x01, 0x30, 0x02, 0x06, - 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, - 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x22, - 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, - 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, - 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, - 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, 0x01, - 0x00, 0xa3, 0x16, 0x30, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, - 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x01 }; -static const BYTE signedBigCert[] = { - 0x30, 0x81, 0x93, 0x30, 0x7a, 0x02, 0x01, 0x01, 0x30, 0x02, 0x06, 0x00, 0x30, - 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, - 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x22, 0x18, 0x0f, - 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, - 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, - 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, 0x01, 0x00, 0xa3, - 0x16, 0x30, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, - 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x01, 0x30, 0x02, 0x06, - 0x00, 0x03, 0x11, 0x00, 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07, - 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00 }; -static const BYTE serializedCert[] = { 0x20, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x30, 0x7a, 0x02, 0x01, 0x01, - 0x30, 0x02, 0x06, 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, - 0x04, 0x03, 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, - 0x00, 0x30, 0x22, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, - 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, - 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x15, - 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, 0x75, - 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, 0x06, - 0x00, 0x03, 0x01, 0x00, 0xa3, 0x16, 0x30, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, - 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, - 0x01, 0x01 }; -static const BYTE signedCRL[] = { 0x30, 0x45, 0x30, 0x2c, 0x30, 0x02, 0x06, - 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, - 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x18, 0x0f, - 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x5a, 0x30, 0x02, 0x06, 0x00, 0x03, 0x11, 0x00, 0x0f, 0x0e, 0x0d, 0x0c, - 0x0b, 0x0a, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00 }; -static const BYTE bigCert2[] = { 0x30, 0x7a, 0x02, 0x01, 0x01, 0x30, 0x02, 0x06, - 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, - 0x0a, 0x41, 0x6c, 0x65, 0x78, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x22, - 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, - 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, - 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x41, 0x6c, 0x65, 0x78, 0x20, - 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, 0x01, - 0x00, 0xa3, 0x16, 0x30, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, - 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x01 }; - - -static BOOL (WINAPI *pCertAddStoreToCollection)(HCERTSTORE,HCERTSTORE,DWORD,DWORD); -static BOOL (WINAPI *pCertControlStore)(HCERTSTORE,DWORD,DWORD,void const*); -static PCCRL_CONTEXT (WINAPI *pCertEnumCRLsInStore)(HCERTSTORE,PCCRL_CONTEXT); -static BOOL (WINAPI *pCertEnumSystemStore)(DWORD,void*,void*,PFN_CERT_ENUM_SYSTEM_STORE); -static BOOL (WINAPI *pCertGetStoreProperty)(HCERTSTORE,DWORD,void*,DWORD*); -static void (WINAPI *pCertRemoveStoreFromCollection)(HCERTSTORE,HCERTSTORE); -static BOOL (WINAPI *pCertSetStoreProperty)(HCERTSTORE,DWORD,DWORD,const void*); - -static void testMemStore(void) -{ - HCERTSTORE store1, store2; - PCCERT_CONTEXT context; - BOOL ret; - DWORD GLE; - - /* NULL provider */ - store1 = CertOpenStore(0, 0, 0, 0, NULL); - ok(!store1 && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - /* weird flags */ - store1 = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_DELETE_FLAG, NULL); - ok(!store1 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED, - "Expected ERROR_CALL_NOT_IMPLEMENTED, got %d\n", GetLastError()); - - /* normal */ - store1 = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(store1 != NULL, "CertOpenStore failed: %d\n", GetLastError()); - /* open existing doesn't */ - store2 = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_OPEN_EXISTING_FLAG, NULL); - ok(store2 != NULL, "CertOpenStore failed: %d\n", GetLastError()); - ok(store1 != store2, "Expected different stores\n"); - - /* add a bogus (empty) cert */ - context = NULL; - ret = CertAddEncodedCertificateToStore(store1, X509_ASN_ENCODING, emptyCert, - sizeof(emptyCert), CERT_STORE_ADD_ALWAYS, &context); - /* Windows returns CRYPT_E_ASN1_EOD or OSS_DATA_ERROR, but accept - * CRYPT_E_ASN1_CORRUPT as well (because matching errors is tough in this - * case) - */ - GLE = GetLastError(); - ok(!ret && (GLE == CRYPT_E_ASN1_EOD || GLE == CRYPT_E_ASN1_CORRUPT || - GLE == OSS_DATA_ERROR), - "Expected CRYPT_E_ASN1_EOD or CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n", - GLE); - /* add a "signed" cert--the signature isn't a real signature, so this adds - * without any check of the signature's validity - */ - ret = CertAddEncodedCertificateToStore(store1, X509_ASN_ENCODING, - signedBigCert, sizeof(signedBigCert), CERT_STORE_ADD_ALWAYS, &context); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); - ok(context != NULL, "Expected a valid cert context\n"); - if (context) - { - ok(context->cbCertEncoded == sizeof(signedBigCert), - "Wrong cert size %d\n", context->cbCertEncoded); - ok(!memcmp(context->pbCertEncoded, signedBigCert, - sizeof(signedBigCert)), "Unexpected encoded cert in context\n"); - /* remove it, the rest of the tests will work on an unsigned cert */ - ret = CertDeleteCertificateFromStore(context); - ok(ret, "CertDeleteCertificateFromStore failed: %08x\n", - GetLastError()); - } - /* try adding a "signed" CRL as a cert */ - ret = CertAddEncodedCertificateToStore(store1, X509_ASN_ENCODING, - signedCRL, sizeof(signedCRL), CERT_STORE_ADD_ALWAYS, &context); - GLE = GetLastError(); - ok(!ret && (GLE == CRYPT_E_ASN1_BADTAG || GLE == CRYPT_E_ASN1_CORRUPT || - GLE == OSS_DATA_ERROR), - "Expected CRYPT_E_ASN1_BADTAG or CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n", - GLE); - /* add a cert to store1 */ - ret = CertAddEncodedCertificateToStore(store1, X509_ASN_ENCODING, bigCert, - sizeof(bigCert), CERT_STORE_ADD_ALWAYS, &context); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); - ok(context != NULL, "Expected a valid cert context\n"); - if (context) - { - DWORD size; - BYTE *buf; - - ok(context->cbCertEncoded == sizeof(bigCert), - "Wrong cert size %d\n", context->cbCertEncoded); - ok(!memcmp(context->pbCertEncoded, bigCert, sizeof(bigCert)), - "Unexpected encoded cert in context\n"); - ok(context->hCertStore == store1, "Unexpected store\n"); - - /* check serializing this element */ - /* These crash - ret = CertSerializeCertificateStoreElement(NULL, 0, NULL, NULL); - ret = CertSerializeCertificateStoreElement(context, 0, NULL, NULL); - ret = CertSerializeCertificateStoreElement(NULL, 0, NULL, &size); - */ - /* apparently flags are ignored */ - ret = CertSerializeCertificateStoreElement(context, 1, NULL, &size); - ok(ret, "CertSerializeCertificateStoreElement failed: %08x\n", - GetLastError()); - buf = HeapAlloc(GetProcessHeap(), 0, size); - if (buf) - { - ret = CertSerializeCertificateStoreElement(context, 0, buf, &size); - ok(size == sizeof(serializedCert), "Wrong size %d\n", size); - ok(!memcmp(serializedCert, buf, size), - "Unexpected serialized cert\n"); - HeapFree(GetProcessHeap(), 0, buf); - } - - ret = CertFreeCertificateContext(context); - ok(ret, "CertFreeCertificateContext failed: %08x\n", GetLastError()); - } - /* verify the cert's in store1 */ - context = CertEnumCertificatesInStore(store1, NULL); - ok(context != NULL, "Expected a valid context\n"); - context = CertEnumCertificatesInStore(store1, context); - ok(!context && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - /* verify store2 (the "open existing" mem store) is still empty */ - context = CertEnumCertificatesInStore(store2, NULL); - ok(!context, "Expected an empty store\n"); - /* delete the cert from store1, and check it's empty */ - context = CertEnumCertificatesInStore(store1, NULL); - if (context) - { - /* Deleting a bitwise copy crashes with an access to an uninitialized - * pointer, so a cert context has some special data out there in memory - * someplace - CERT_CONTEXT copy; - memcpy(©, context, sizeof(copy)); - ret = CertDeleteCertificateFromStore(©); - */ - PCCERT_CONTEXT copy = CertDuplicateCertificateContext(context); - - ok(copy != NULL, "CertDuplicateCertificateContext failed: %08x\n", - GetLastError()); - ret = CertDeleteCertificateFromStore(context); - ok(ret, "CertDeleteCertificateFromStore failed: %08x\n", - GetLastError()); - /* try deleting a copy */ - ret = CertDeleteCertificateFromStore(copy); - ok(ret, "CertDeleteCertificateFromStore failed: %08x\n", - GetLastError()); - /* check that the store is empty */ - context = CertEnumCertificatesInStore(store1, NULL); - ok(!context, "Expected an empty store\n"); - } - - /* close an empty store */ - ret = CertCloseStore(NULL, 0); - ok(ret, "CertCloseStore failed: %d\n", GetLastError()); - ret = CertCloseStore(store1, 0); - ok(ret, "CertCloseStore failed: %d\n", GetLastError()); - ret = CertCloseStore(store2, 0); - ok(ret, "CertCloseStore failed: %d\n", GetLastError()); - - /* This seems nonsensical, but you can open a read-only mem store, only - * it isn't read-only - */ - store1 = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_READONLY_FLAG, NULL); - ok(store1 != NULL, "CertOpenStore failed: %d\n", GetLastError()); - /* yep, this succeeds */ - ret = CertAddEncodedCertificateToStore(store1, X509_ASN_ENCODING, bigCert, - sizeof(bigCert), CERT_STORE_ADD_ALWAYS, &context); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); - ok(context != NULL, "Expected a valid cert context\n"); - if (context) - { - ok(context->cbCertEncoded == sizeof(bigCert), - "Wrong cert size %d\n", context->cbCertEncoded); - ok(!memcmp(context->pbCertEncoded, bigCert, sizeof(bigCert)), - "Unexpected encoded cert in context\n"); - ok(context->hCertStore == store1, "Unexpected store\n"); - ret = CertDeleteCertificateFromStore(context); - ok(ret, "CertDeleteCertificateFromStore failed: %08x\n", - GetLastError()); - } - CertCloseStore(store1, 0); -} - -static void compareStore(HCERTSTORE store, LPCSTR name, const BYTE *pb, - DWORD cb, BOOL todo) -{ - BOOL ret; - CRYPT_DATA_BLOB blob = { 0, NULL }; - - ret = CertSaveStore(store, X509_ASN_ENCODING, CERT_STORE_SAVE_AS_STORE, - CERT_STORE_SAVE_TO_MEMORY, &blob, 0); - ok(ret, "CertSaveStore failed: %08x\n", GetLastError()); - if (todo) - todo_wine - ok(blob.cbData == cb, "%s: expected size %d, got %d\n", name, cb, - blob.cbData); - else - ok(blob.cbData == cb, "%s: expected size %d, got %d\n", name, cb, - blob.cbData); - blob.pbData = HeapAlloc(GetProcessHeap(), 0, blob.cbData); - if (blob.pbData) - { - ret = CertSaveStore(store, X509_ASN_ENCODING, CERT_STORE_SAVE_AS_STORE, - CERT_STORE_SAVE_TO_MEMORY, &blob, 0); - ok(ret, "CertSaveStore failed: %08x\n", GetLastError()); - if (todo) - todo_wine - ok(!memcmp(pb, blob.pbData, cb), "%s: unexpected value\n", name); - else - ok(!memcmp(pb, blob.pbData, cb), "%s: unexpected value\n", name); - HeapFree(GetProcessHeap(), 0, blob.pbData); - } -} - -static const BYTE serializedStoreWithCert[] = { - 0x00,0x00,0x00,0x00,0x43,0x45,0x52,0x54,0x20,0x00,0x00,0x00,0x01,0x00,0x00, - 0x00,0x7c,0x00,0x00,0x00,0x30,0x7a,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30, - 0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61, - 0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31, - 0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36, - 0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15, - 0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e, - 0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00, - 0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04, - 0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00 }; - -static void testCollectionStore(void) -{ - HCERTSTORE store1, store2, collection, collection2; - PCCERT_CONTEXT context; - BOOL ret; - static const WCHAR szPrefix[] = { 'c','e','r',0 }; - static const WCHAR szDot[] = { '.',0 }; - WCHAR filename[MAX_PATH]; - HANDLE file; - - if (!pCertAddStoreToCollection) - { - win_skip("CertAddStoreToCollection() is not available\n"); - return; - } - - collection = CertOpenStore(CERT_STORE_PROV_COLLECTION, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - - /* Try adding a cert to any empty collection */ - ret = CertAddEncodedCertificateToStore(collection, X509_ASN_ENCODING, - bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL); - ok(!ret && GetLastError() == E_ACCESSDENIED, - "Expected E_ACCESSDENIED, got %08x\n", GetLastError()); - - /* Create and add a cert to a memory store */ - store1 = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - ret = CertAddEncodedCertificateToStore(store1, X509_ASN_ENCODING, - bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); - /* Add the memory store to the collection, without allowing adding */ - ret = pCertAddStoreToCollection(collection, store1, 0, 0); - ok(ret, "CertAddStoreToCollection failed: %08x\n", GetLastError()); - /* Verify the cert is in the collection */ - context = CertEnumCertificatesInStore(collection, NULL); - ok(context != NULL, "Expected a valid context\n"); - if (context) - { - ok(context->hCertStore == collection, "Unexpected store\n"); - CertFreeCertificateContext(context); - } - /* Check that adding to the collection isn't allowed */ - ret = CertAddEncodedCertificateToStore(collection, X509_ASN_ENCODING, - bigCert2, sizeof(bigCert2), CERT_STORE_ADD_ALWAYS, NULL); - ok(!ret && GetLastError() == E_ACCESSDENIED, - "Expected E_ACCESSDENIED, got %08x\n", GetLastError()); - - /* Create a new memory store */ - store2 = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - /* Try adding a store to a non-collection store */ - ret = pCertAddStoreToCollection(store1, store2, - CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG, 0); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* Try adding some bogus stores */ - /* This crashes in Windows - ret = pCertAddStoreToCollection(0, store2, - CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG, 0); - */ - /* This "succeeds"... */ - ret = pCertAddStoreToCollection(collection, 0, - CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG, 0); - ok(ret, "CertAddStoreToCollection failed: %08x\n", GetLastError()); - /* while this crashes. - ret = pCertAddStoreToCollection(collection, 1, - CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG, 0); - */ - - /* Add it to the collection, this time allowing adding */ - ret = pCertAddStoreToCollection(collection, store2, - CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG, 0); - ok(ret, "CertAddStoreToCollection failed: %08x\n", GetLastError()); - /* Check that adding to the collection is allowed */ - ret = CertAddEncodedCertificateToStore(collection, X509_ASN_ENCODING, - bigCert2, sizeof(bigCert2), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); - /* Now check that it was actually added to store2 */ - context = CertEnumCertificatesInStore(store2, NULL); - ok(context != NULL, "Expected a valid context\n"); - if (context) - { - ok(context->hCertStore == store2, "Unexpected store\n"); - CertFreeCertificateContext(context); - } - /* Check that the collection has both bigCert and bigCert2. bigCert comes - * first because store1 was added first. - */ - context = CertEnumCertificatesInStore(collection, NULL); - ok(context != NULL, "Expected a valid context\n"); - if (context) - { - ok(context->hCertStore == collection, "Unexpected store\n"); - ok(context->cbCertEncoded == sizeof(bigCert), - "Wrong size %d\n", context->cbCertEncoded); - ok(!memcmp(context->pbCertEncoded, bigCert, context->cbCertEncoded), - "Unexpected cert\n"); - context = CertEnumCertificatesInStore(collection, context); - ok(context != NULL, "Expected a valid context\n"); - if (context) - { - ok(context->hCertStore == collection, "Unexpected store\n"); - ok(context->cbCertEncoded == sizeof(bigCert2), - "Wrong size %d\n", context->cbCertEncoded); - ok(!memcmp(context->pbCertEncoded, bigCert2, - context->cbCertEncoded), "Unexpected cert\n"); - context = CertEnumCertificatesInStore(collection, context); - ok(!context, "Unexpected cert\n"); - } - } - /* close store2, and check that the collection is unmodified */ - CertCloseStore(store2, 0); - context = CertEnumCertificatesInStore(collection, NULL); - ok(context != NULL, "Expected a valid context\n"); - if (context) - { - ok(context->hCertStore == collection, "Unexpected store\n"); - ok(context->cbCertEncoded == sizeof(bigCert), - "Wrong size %d\n", context->cbCertEncoded); - ok(!memcmp(context->pbCertEncoded, bigCert, context->cbCertEncoded), - "Unexpected cert\n"); - context = CertEnumCertificatesInStore(collection, context); - ok(context != NULL, "Expected a valid context\n"); - if (context) - { - ok(context->hCertStore == collection, "Unexpected store\n"); - ok(context->cbCertEncoded == sizeof(bigCert2), - "Wrong size %d\n", context->cbCertEncoded); - ok(!memcmp(context->pbCertEncoded, bigCert2, - context->cbCertEncoded), "Unexpected cert\n"); - context = CertEnumCertificatesInStore(collection, context); - ok(!context, "Unexpected cert\n"); - } - } - - /* Adding a collection to a collection is legal */ - collection2 = CertOpenStore(CERT_STORE_PROV_COLLECTION, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - ret = pCertAddStoreToCollection(collection2, collection, - CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG, 0); - ok(ret, "CertAddStoreToCollection failed: %08x\n", GetLastError()); - /* check the contents of collection2 */ - context = CertEnumCertificatesInStore(collection2, NULL); - ok(context != NULL, "Expected a valid context\n"); - if (context) - { - ok(context->hCertStore == collection2, "Unexpected store\n"); - ok(context->cbCertEncoded == sizeof(bigCert), - "Wrong size %d\n", context->cbCertEncoded); - ok(!memcmp(context->pbCertEncoded, bigCert, context->cbCertEncoded), - "Unexpected cert\n"); - context = CertEnumCertificatesInStore(collection2, context); - ok(context != NULL, "Expected a valid context\n"); - if (context) - { - ok(context->hCertStore == collection2, "Unexpected store\n"); - ok(context->cbCertEncoded == sizeof(bigCert2), - "Wrong size %d\n", context->cbCertEncoded); - ok(!memcmp(context->pbCertEncoded, bigCert2, - context->cbCertEncoded), "Unexpected cert\n"); - context = CertEnumCertificatesInStore(collection2, context); - ok(!context, "Unexpected cert\n"); - } - } - - /* I'd like to test closing the collection in the middle of enumeration, - * but my tests have been inconsistent. The first time calling - * CertEnumCertificatesInStore on a closed collection succeeded, while the - * second crashed. So anything appears to be fair game. - * I'd also like to test removing a store from a collection in the middle - * of an enumeration, but my tests in Windows have been inconclusive. - * In one scenario it worked. In another scenario, about a third of the - * time this leads to "random" crashes elsewhere in the code. This - * probably means this is not allowed. - */ - - CertCloseStore(store1, 0); - CertCloseStore(collection, 0); - CertCloseStore(collection2, 0); - - /* Add the same cert to two memory stores, then put them in a collection */ - store1 = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(store1 != 0, "CertOpenStore failed: %08x\n", GetLastError()); - store2 = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(store2 != 0, "CertOpenStore failed: %08x\n", GetLastError()); - - ret = CertAddEncodedCertificateToStore(store1, X509_ASN_ENCODING, - bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); - ret = CertAddEncodedCertificateToStore(store2, X509_ASN_ENCODING, - bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); - collection = CertOpenStore(CERT_STORE_PROV_COLLECTION, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(collection != 0, "CertOpenStore failed: %08x\n", GetLastError()); - - ret = pCertAddStoreToCollection(collection, store1, - CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG, 0); - ok(ret, "CertAddStoreToCollection failed: %08x\n", GetLastError()); - ret = pCertAddStoreToCollection(collection, store2, - CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG, 0); - ok(ret, "CertAddStoreToCollection failed: %08x\n", GetLastError()); - - /* Check that the collection has two copies of the same cert */ - context = CertEnumCertificatesInStore(collection, NULL); - ok(context != NULL, "Expected a valid context\n"); - if (context) - { - ok(context->hCertStore == collection, "Unexpected store\n"); - ok(context->cbCertEncoded == sizeof(bigCert), - "Wrong size %d\n", context->cbCertEncoded); - ok(!memcmp(context->pbCertEncoded, bigCert, context->cbCertEncoded), - "Unexpected cert\n"); - context = CertEnumCertificatesInStore(collection, context); - ok(context != NULL, "Expected a valid context\n"); - if (context) - { - ok(context->hCertStore == collection, "Unexpected store\n"); - ok(context->cbCertEncoded == sizeof(bigCert), - "Wrong size %d\n", context->cbCertEncoded); - ok(!memcmp(context->pbCertEncoded, bigCert, context->cbCertEncoded), - "Unexpected cert\n"); - context = CertEnumCertificatesInStore(collection, context); - ok(context == NULL, "Unexpected cert\n"); - } - } - - /* The following would check whether I can delete an identical cert, rather - * than one enumerated from the store. It crashes, so that means I must - * only call CertDeleteCertificateFromStore with contexts enumerated from - * the store. - context = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, - sizeof(bigCert)); - ok(context != NULL, "CertCreateCertificateContext failed: %08x\n", - GetLastError()); - if (context) - { - ret = CertDeleteCertificateFromStore(collection, context); - printf("ret is %d, GetLastError is %08x\n", ret, GetLastError()); - CertFreeCertificateContext(context); - } - */ - - /* Now check deleting from the collection. */ - context = CertEnumCertificatesInStore(collection, NULL); - ok(context != NULL, "Expected a valid context\n"); - if (context) - { - CertDeleteCertificateFromStore(context); - /* store1 should now be empty */ - context = CertEnumCertificatesInStore(store1, NULL); - ok(!context, "Unexpected cert\n"); - /* and there should be one certificate in the collection */ - context = CertEnumCertificatesInStore(collection, NULL); - ok(context != NULL, "Expected a valid cert\n"); - if (context) - { - ok(context->hCertStore == collection, "Unexpected store\n"); - ok(context->cbCertEncoded == sizeof(bigCert), - "Wrong size %d\n", context->cbCertEncoded); - ok(!memcmp(context->pbCertEncoded, bigCert, context->cbCertEncoded), - "Unexpected cert\n"); - } - context = CertEnumCertificatesInStore(collection, context); - ok(context == NULL, "Unexpected cert\n"); - } - - if (!pCertRemoveStoreFromCollection) - { - win_skip("CertRemoveStoreFromCollection() is not available\n"); - } - else - { - /* Finally, test removing stores from the collection. No return - * value, so it's a bit funny to test. - */ - /* This crashes - * pCertRemoveStoreFromCollection(NULL, NULL); - */ - /* This "succeeds," no crash, no last error set */ - SetLastError(0xdeadbeef); - pCertRemoveStoreFromCollection(store2, collection); - ok(GetLastError() == 0xdeadbeef, - "Didn't expect an error to be set: %08x\n", GetLastError()); - - /* After removing store2, the collection should be empty */ - SetLastError(0xdeadbeef); - pCertRemoveStoreFromCollection(collection, store2); - ok(GetLastError() == 0xdeadbeef, - "Didn't expect an error to be set: %08x\n", GetLastError()); - context = CertEnumCertificatesInStore(collection, NULL); - ok(!context, "Unexpected cert\n"); - } - - CertCloseStore(collection, 0); - CertCloseStore(store2, 0); - CertCloseStore(store1, 0); - - /* Test adding certificates to and deleting certificates from collections. - */ - store1 = CertOpenSystemStoreA(0, "My"); - collection = CertOpenStore(CERT_STORE_PROV_COLLECTION, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - - ret = CertAddEncodedCertificateToStore(store1, X509_ASN_ENCODING, - bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, &context); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); - CertDeleteCertificateFromStore(context); - - CertAddStoreToCollection(collection, store1, - CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG, 0); - - ret = CertAddEncodedCertificateToStore(collection, X509_ASN_ENCODING, - bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, &context); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError()); - CertDeleteCertificateFromStore(context); - - CertCloseStore(collection, 0); - CertCloseStore(store1, 0); - - /* Test whether a collection store can be committed */ - if (!pCertControlStore) - { - win_skip("CertControlStore() is not available\n"); - return; - } - collection = CertOpenStore(CERT_STORE_PROV_COLLECTION, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - - SetLastError(0xdeadbeef); - ret = pCertControlStore(collection, 0, CERT_STORE_CTRL_COMMIT, NULL); - ok(ret, "CertControlStore failed: %08x\n", GetLastError()); - - /* Adding a mem store that can't be committed prevents a successful commit. - */ - store1 = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - pCertAddStoreToCollection(collection, store1, 0, 0); - SetLastError(0xdeadbeef); - ret = pCertControlStore(collection, 0, CERT_STORE_CTRL_COMMIT, NULL); - ok(!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED, - "expected ERROR_CALL_NOT_IMPLEMENTED, got %d\n", GetLastError()); - pCertRemoveStoreFromCollection(collection, store1); - CertCloseStore(store1, 0); - - /* Test adding a cert to a collection with a file store, committing the - * change to the collection, and comparing the resulting file. - */ - if (!GetTempFileNameW(szDot, szPrefix, 0, filename)) - return; - - DeleteFileW(filename); - file = CreateFileW(filename, GENERIC_READ | GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - if (file == INVALID_HANDLE_VALUE) - return; - - store1 = CertOpenStore(CERT_STORE_PROV_FILE, 0, 0, - CERT_FILE_STORE_COMMIT_ENABLE_FLAG, file); - ok(store1 != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - CloseHandle(file); - pCertAddStoreToCollection(collection, store1, - CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG, 0); - CertCloseStore(store1, 0); - - ret = CertAddEncodedCertificateToStore(collection, X509_ASN_ENCODING, - bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", - GetLastError()); - ret = pCertControlStore(collection, 0, CERT_STORE_CTRL_COMMIT, NULL); - ok(ret, "CertControlStore failed: %d\n", ret); - compareStore(collection, "serialized store with cert", - serializedStoreWithCert, sizeof(serializedStoreWithCert), FALSE); - CertCloseStore(collection, 0); - - DeleteFileW(filename); -} - -/* Looks for the property with ID propID in the buffer buf. Returns a pointer - * to its header if found, NULL if not. - */ -static const struct CertPropIDHeader *findPropID(const BYTE *buf, DWORD size, - DWORD propID) -{ - const struct CertPropIDHeader *ret = NULL; - BOOL failed = FALSE; - - while (size && !ret && !failed) - { - if (size < sizeof(struct CertPropIDHeader)) - failed = TRUE; - else - { - const struct CertPropIDHeader *hdr = - (const struct CertPropIDHeader *)buf; - - size -= sizeof(struct CertPropIDHeader); - buf += sizeof(struct CertPropIDHeader); - if (size < hdr->cb) - failed = TRUE; - else if (hdr->propID == propID) - ret = hdr; - else - { - buf += hdr->cb; - size -= hdr->cb; - } - } - } - return ret; -} - -typedef DWORD (WINAPI *SHDeleteKeyAFunc)(HKEY, LPCSTR); - -static void testRegStore(void) -{ - static const char tempKey[] = "Software\\Wine\\CryptTemp"; - HCERTSTORE store; - LONG rc; - HKEY key = NULL; - DWORD disp, GLE; - - store = CertOpenStore(CERT_STORE_PROV_REG, 0, 0, 0, NULL); - GLE = GetLastError(); - ok(!store && (GLE == ERROR_INVALID_HANDLE || GLE == ERROR_BADKEY), - "Expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got %d\n", GLE); - store = CertOpenStore(CERT_STORE_PROV_REG, 0, 0, 0, key); - GLE = GetLastError(); - ok(!store && (GLE == ERROR_INVALID_HANDLE || GLE == ERROR_BADKEY), - "Expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got %d\n", GLE); - - /* Opening up any old key works.. */ - key = HKEY_CURRENT_USER; - store = CertOpenStore(CERT_STORE_PROV_REG, 0, 0, 0, key); - /* Not sure if this is a bug in DuplicateHandle, marking todo_wine for now - */ - todo_wine ok(store != 0, "CertOpenStore failed: %08x\n", GetLastError()); - CertCloseStore(store, 0); - - /* It looks like the remainder pretty much needs CertControlStore() */ - if (!pCertControlStore) - { - win_skip("CertControlStore() is not available\n"); - return; - } - - rc = RegCreateKeyExA(HKEY_CURRENT_USER, tempKey, 0, NULL, 0, KEY_ALL_ACCESS, - NULL, &key, NULL); - ok(!rc, "RegCreateKeyExA failed: %d\n", rc); - if (key) - { - BOOL ret; - BYTE hash[20]; - DWORD size, i; - static const char certificates[] = "Certificates\\"; - char subKeyName[sizeof(certificates) + 20 * 2 + 1], *ptr; - HKEY subKey; - PCCERT_CONTEXT context; - - store = CertOpenStore(CERT_STORE_PROV_REG, 0, 0, 0, key); - ok(store != 0, "CertOpenStore failed: %08x\n", GetLastError()); - /* Add a certificate. It isn't persisted right away, since it's only - * added to the cache.. - */ - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - bigCert2, sizeof(bigCert2), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", - GetLastError()); - /* so flush the cache to force a commit.. */ - ret = pCertControlStore(store, 0, CERT_STORE_CTRL_COMMIT, NULL); - ok(ret, "CertControlStore failed: %08x\n", GetLastError()); - /* and check that the expected subkey was written. */ - size = sizeof(hash); - ret = CryptHashCertificate(0, 0, 0, bigCert2, sizeof(bigCert2), - hash, &size); - ok(ret, "CryptHashCertificate failed: %d\n", GetLastError()); - strcpy(subKeyName, certificates); - for (i = 0, ptr = subKeyName + sizeof(certificates) - 1; i < size; - i++, ptr += 2) - sprintf(ptr, "%02X", hash[i]); - rc = RegCreateKeyExA(key, subKeyName, 0, NULL, 0, KEY_ALL_ACCESS, NULL, - &subKey, NULL); - ok(!rc, "RegCreateKeyExA failed: %d\n", rc); - if (subKey) - { - LPBYTE buf; - - size = 0; - RegQueryValueExA(subKey, "Blob", NULL, NULL, NULL, &size); - buf = HeapAlloc(GetProcessHeap(), 0, size); - if (buf) - { - rc = RegQueryValueExA(subKey, "Blob", NULL, NULL, buf, &size); - ok(!rc, "RegQueryValueExA failed: %d\n", rc); - if (!rc) - { - const struct CertPropIDHeader *hdr; - - /* Both the hash and the cert should be present */ - hdr = findPropID(buf, size, CERT_CERT_PROP_ID); - ok(hdr != NULL, "Expected to find a cert property\n"); - if (hdr) - { - ok(hdr->cb == sizeof(bigCert2), - "Wrong size %d of cert property\n", hdr->cb); - ok(!memcmp((const BYTE *)hdr + sizeof(*hdr), bigCert2, - hdr->cb), "Unexpected cert in cert property\n"); - } - hdr = findPropID(buf, size, CERT_HASH_PROP_ID); - ok(hdr != NULL, "Expected to find a hash property\n"); - if (hdr) - { - ok(hdr->cb == sizeof(hash), - "Wrong size %d of hash property\n", hdr->cb); - ok(!memcmp((const BYTE *)hdr + sizeof(*hdr), hash, - hdr->cb), "Unexpected hash in cert property\n"); - } - } - HeapFree(GetProcessHeap(), 0, buf); - } - RegCloseKey(subKey); - } - - /* Remove the existing context */ - context = CertEnumCertificatesInStore(store, NULL); - ok(context != NULL, "Expected a cert context\n"); - if (context) - CertDeleteCertificateFromStore(context); - ret = pCertControlStore(store, 0, CERT_STORE_CTRL_COMMIT, NULL); - ok(ret, "CertControlStore failed: %08x\n", GetLastError()); - - /* Add a serialized cert with a bogus hash directly to the registry */ - memset(hash, 0, sizeof(hash)); - strcpy(subKeyName, certificates); - for (i = 0, ptr = subKeyName + sizeof(certificates) - 1; - i < sizeof(hash); i++, ptr += 2) - sprintf(ptr, "%02X", hash[i]); - rc = RegCreateKeyExA(key, subKeyName, 0, NULL, 0, KEY_ALL_ACCESS, NULL, - &subKey, NULL); - ok(!rc, "RegCreateKeyExA failed: %d\n", rc); - if (subKey) - { - BYTE buf[sizeof(struct CertPropIDHeader) * 2 + sizeof(hash) + - sizeof(bigCert)], *ptr; - DWORD certCount = 0; - struct CertPropIDHeader *hdr; - - hdr = (struct CertPropIDHeader *)buf; - hdr->propID = CERT_HASH_PROP_ID; - hdr->unknown1 = 1; - hdr->cb = sizeof(hash); - ptr = buf + sizeof(*hdr); - memcpy(ptr, hash, sizeof(hash)); - ptr += sizeof(hash); - hdr = (struct CertPropIDHeader *)ptr; - hdr->propID = CERT_CERT_PROP_ID; - hdr->unknown1 = 1; - hdr->cb = sizeof(bigCert); - ptr += sizeof(*hdr); - memcpy(ptr, bigCert, sizeof(bigCert)); - - rc = RegSetValueExA(subKey, "Blob", 0, REG_BINARY, buf, - sizeof(buf)); - ok(!rc, "RegSetValueExA failed: %d\n", rc); - - ret = pCertControlStore(store, 0, CERT_STORE_CTRL_RESYNC, NULL); - ok(ret, "CertControlStore failed: %08x\n", GetLastError()); - - /* Make sure the bogus hash cert gets loaded. */ - certCount = 0; - context = NULL; - do { - context = CertEnumCertificatesInStore(store, context); - if (context) - certCount++; - } while (context != NULL); - ok(certCount == 1, "Expected 1 certificates, got %d\n", certCount); - - RegCloseKey(subKey); - } - - /* Add another serialized cert directly to the registry, this time - * under the correct key name (named with the correct hash value). - */ - size = sizeof(hash); - ret = CryptHashCertificate(0, 0, 0, bigCert2, - sizeof(bigCert2), hash, &size); - ok(ret, "CryptHashCertificate failed: %d\n", GetLastError()); - strcpy(subKeyName, certificates); - for (i = 0, ptr = subKeyName + sizeof(certificates) - 1; - i < sizeof(hash); i++, ptr += 2) - sprintf(ptr, "%02X", hash[i]); - rc = RegCreateKeyExA(key, subKeyName, 0, NULL, 0, KEY_ALL_ACCESS, NULL, - &subKey, NULL); - ok(!rc, "RegCreateKeyExA failed: %d\n", rc); - if (subKey) - { - BYTE buf[sizeof(struct CertPropIDHeader) * 2 + sizeof(hash) + - sizeof(bigCert2)], *ptr; - DWORD certCount = 0; - PCCERT_CONTEXT context; - struct CertPropIDHeader *hdr; - - /* First try with a bogus hash... */ - hdr = (struct CertPropIDHeader *)buf; - hdr->propID = CERT_HASH_PROP_ID; - hdr->unknown1 = 1; - hdr->cb = sizeof(hash); - ptr = buf + sizeof(*hdr); - memset(ptr, 0, sizeof(hash)); - ptr += sizeof(hash); - hdr = (struct CertPropIDHeader *)ptr; - hdr->propID = CERT_CERT_PROP_ID; - hdr->unknown1 = 1; - hdr->cb = sizeof(bigCert2); - ptr += sizeof(*hdr); - memcpy(ptr, bigCert2, sizeof(bigCert2)); - - rc = RegSetValueExA(subKey, "Blob", 0, REG_BINARY, buf, - sizeof(buf)); - ok(!rc, "RegSetValueExA failed: %d\n", rc); - - ret = pCertControlStore(store, 0, CERT_STORE_CTRL_RESYNC, NULL); - ok(ret, "CertControlStore failed: %08x\n", GetLastError()); - - /* and make sure just one cert still gets loaded. */ - certCount = 0; - context = NULL; - do { - context = CertEnumCertificatesInStore(store, context); - if (context) - certCount++; - } while (context != NULL); - ok(certCount == 1 || - broken(certCount == 2), /* win9x */ - "Expected 1 certificates, got %d\n", certCount); - - /* Try again with the correct hash... */ - ptr = buf + sizeof(*hdr); - memcpy(ptr, hash, sizeof(hash)); - - rc = RegSetValueExA(subKey, "Blob", 0, REG_BINARY, buf, - sizeof(buf)); - ok(!rc, "RegSetValueExA failed: %d\n", rc); - - ret = pCertControlStore(store, 0, CERT_STORE_CTRL_RESYNC, NULL); - ok(ret, "CertControlStore failed: %08x\n", GetLastError()); - - /* and make sure two certs get loaded. */ - certCount = 0; - context = NULL; - do { - context = CertEnumCertificatesInStore(store, context); - if (context) - certCount++; - } while (context != NULL); - ok(certCount == 2, "Expected 2 certificates, got %d\n", certCount); - - RegCloseKey(subKey); - } - CertCloseStore(store, 0); - /* Is delete allowed on a reg store? */ - store = CertOpenStore(CERT_STORE_PROV_REG, 0, 0, - CERT_STORE_DELETE_FLAG, key); - ok(store == NULL, "Expected NULL return from CERT_STORE_DELETE_FLAG\n"); - ok(GetLastError() == 0, "CertOpenStore failed: %08x\n", - GetLastError()); - - RegCloseKey(key); - } - /* The CertOpenStore with CERT_STORE_DELETE_FLAG above will delete the - * contents of the key, but not the key itself. - */ - rc = RegCreateKeyExA(HKEY_CURRENT_USER, tempKey, 0, NULL, 0, KEY_ALL_ACCESS, - NULL, &key, &disp); - ok(!rc, "RegCreateKeyExA failed: %d\n", rc); - ok(disp == REG_OPENED_EXISTING_KEY, - "Expected REG_OPENED_EXISTING_KEY, got %d\n", disp); - if (!rc) - { - RegCloseKey(key); - rc = RegDeleteKeyA(HKEY_CURRENT_USER, tempKey); - if (rc) - { - HMODULE shlwapi = LoadLibraryA("shlwapi"); - - /* Use shlwapi's SHDeleteKeyA to _really_ blow away the key, - * otherwise subsequent tests will fail. - */ - if (shlwapi) - { - SHDeleteKeyAFunc pSHDeleteKeyA = - (SHDeleteKeyAFunc)GetProcAddress(shlwapi, "SHDeleteKeyA"); - - if (pSHDeleteKeyA) - pSHDeleteKeyA(HKEY_CURRENT_USER, tempKey); - FreeLibrary(shlwapi); - } - } - } -} - -static const char MyA[] = { 'M','y',0,0 }; -static const WCHAR MyW[] = { 'M','y',0 }; -static const WCHAR BogusW[] = { 'B','o','g','u','s',0 }; -static const WCHAR BogusPathW[] = { 'S','o','f','t','w','a','r','e','\\', - 'M','i','c','r','o','s','o','f','t','\\','S','y','s','t','e','m','C','e','r', - 't','i','f','i','c','a','t','e','s','\\','B','o','g','u','s',0 }; - -static void testSystemRegStore(void) -{ - HCERTSTORE store, memStore; - - /* Check with a UNICODE name */ - store = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY, 0, 0, - CERT_SYSTEM_STORE_CURRENT_USER | CERT_STORE_OPEN_EXISTING_FLAG, MyW); - /* Not all OSes support CERT_STORE_PROV_SYSTEM_REGISTRY, so don't continue - * testing if they don't. - */ - if (!store) - return; - - /* Check that it isn't a collection store */ - memStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - if (memStore) - { - if (pCertAddStoreToCollection) - { - BOOL ret = pCertAddStoreToCollection(store, memStore, 0, 0); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - } - CertCloseStore(memStore, 0); - } - CertCloseStore(store, 0); - - /* Check opening a bogus store */ - store = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY, 0, 0, - CERT_SYSTEM_STORE_CURRENT_USER | CERT_STORE_OPEN_EXISTING_FLAG, BogusW); - ok(!store && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - store = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY, 0, 0, - CERT_SYSTEM_STORE_CURRENT_USER, BogusW); - ok(store != 0, "CertOpenStore failed: %08x\n", GetLastError()); - if (store) - CertCloseStore(store, 0); - /* Now check whether deleting is allowed */ - store = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY, 0, 0, - CERT_SYSTEM_STORE_CURRENT_USER | CERT_STORE_DELETE_FLAG, BogusW); - RegDeleteKeyW(HKEY_CURRENT_USER, BogusPathW); - - store = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY, 0, 0, 0, NULL); - ok(!store && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - store = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY, 0, 0, - CERT_SYSTEM_STORE_LOCAL_MACHINE | CERT_SYSTEM_STORE_CURRENT_USER, MyA); - ok(!store && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - store = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY, 0, 0, - CERT_SYSTEM_STORE_LOCAL_MACHINE | CERT_SYSTEM_STORE_CURRENT_USER, MyW); - ok(!store && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* The name is expected to be UNICODE, check with an ASCII name */ - store = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY, 0, 0, - CERT_SYSTEM_STORE_CURRENT_USER | CERT_STORE_OPEN_EXISTING_FLAG, MyA); - ok(!store && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); -} - -static void testSystemStore(void) -{ - static const WCHAR baskslashW[] = { '\\',0 }; - HCERTSTORE store; - WCHAR keyName[MAX_PATH]; - HKEY key; - LONG rc; - - store = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, 0, NULL); - ok(!store && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - store = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, - CERT_SYSTEM_STORE_LOCAL_MACHINE | CERT_SYSTEM_STORE_CURRENT_USER, MyA); - ok(!store && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - store = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, - CERT_SYSTEM_STORE_LOCAL_MACHINE | CERT_SYSTEM_STORE_CURRENT_USER, MyW); - ok(!store && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - /* The name is expected to be UNICODE, first check with an ASCII name */ - store = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, - CERT_SYSTEM_STORE_CURRENT_USER | CERT_STORE_OPEN_EXISTING_FLAG, MyA); - ok(!store && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - /* Create the expected key */ - lstrcpyW(keyName, CERT_LOCAL_MACHINE_SYSTEM_STORE_REGPATH); - lstrcatW(keyName, baskslashW); - lstrcatW(keyName, MyW); - rc = RegCreateKeyExW(HKEY_CURRENT_USER, keyName, 0, NULL, 0, KEY_READ, - NULL, &key, NULL); - ok(!rc, "RegCreateKeyEx failed: %d\n", rc); - if (!rc) - RegCloseKey(key); - /* Check opening with a UNICODE name, specifying the create new flag */ - store = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, - CERT_SYSTEM_STORE_CURRENT_USER | CERT_STORE_CREATE_NEW_FLAG, MyW); - ok(!store && GetLastError() == ERROR_FILE_EXISTS, - "Expected ERROR_FILE_EXISTS, got %08x\n", GetLastError()); - /* Now check opening with a UNICODE name, this time opening existing */ - store = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, - CERT_SYSTEM_STORE_CURRENT_USER | CERT_STORE_OPEN_EXISTING_FLAG, MyW); - ok(store != 0, "CertOpenStore failed: %08x\n", GetLastError()); - if (store) - { - HCERTSTORE memStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - - /* Check that it's a collection store */ - if (memStore) - { - if (pCertAddStoreToCollection) - { - BOOL ret = pCertAddStoreToCollection(store, memStore, 0, 0); - /* FIXME: this'll fail on NT4, but what error will it give? */ - ok(ret, "CertAddStoreToCollection failed: %08x\n", GetLastError()); - } - CertCloseStore(memStore, 0); - } - CertCloseStore(store, 0); - } - - /* Check opening a bogus store */ - store = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, - CERT_SYSTEM_STORE_CURRENT_USER | CERT_STORE_OPEN_EXISTING_FLAG, BogusW); - ok((!store || - broken(store != 0)) && /* win9x */ - GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - store = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, - CERT_SYSTEM_STORE_CURRENT_USER, BogusW); - ok(store != 0, "CertOpenStore failed: %08x\n", GetLastError()); - if (store) - CertCloseStore(store, 0); - /* Now check whether deleting is allowed */ - store = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, - CERT_SYSTEM_STORE_CURRENT_USER | CERT_STORE_DELETE_FLAG, BogusW); - RegDeleteKeyW(HKEY_CURRENT_USER, BogusPathW); -} - -static const BYTE serializedStoreWithCertAndCRL[] = { - 0x00,0x00,0x00,0x00,0x43,0x45,0x52,0x54,0x20,0x00,0x00,0x00,0x01,0x00,0x00, - 0x00,0x7c,0x00,0x00,0x00,0x30,0x7a,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30, - 0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61, - 0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31, - 0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36, - 0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15, - 0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e, - 0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00, - 0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04, - 0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01,0x21,0x00,0x00,0x00,0x01,0x00, - 0x00,0x00,0x47,0x00,0x00,0x00,0x30,0x45,0x30,0x2c,0x30,0x02,0x06,0x00,0x30, - 0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61, - 0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31, - 0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x02,0x06,0x00,0x03,0x11, - 0x00,0x0f,0x0e,0x0d,0x0c,0x0b,0x0a,0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02, - 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; - -static void testFileStore(void) -{ - static const WCHAR szPrefix[] = { 'c','e','r',0 }; - static const WCHAR szDot[] = { '.',0 }; - WCHAR filename[MAX_PATH]; - HCERTSTORE store; - BOOL ret; - PCCERT_CONTEXT cert; - HANDLE file; - - if (!pCertControlStore) - { - win_skip("CertControlStore() is not available\n"); - return; - } - - store = CertOpenStore(CERT_STORE_PROV_FILE, 0, 0, 0, NULL); - ok(!store && GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %08x\n", GetLastError()); - - if (!GetTempFileNameW(szDot, szPrefix, 0, filename)) - return; - - DeleteFileW(filename); - file = CreateFileW(filename, GENERIC_READ | GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - if (file == INVALID_HANDLE_VALUE) - return; - - store = CertOpenStore(CERT_STORE_PROV_FILE, 0, 0, CERT_STORE_DELETE_FLAG, - file); - ok(!store && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - store = CertOpenStore(CERT_STORE_PROV_FILE, 0, 0, - CERT_FILE_STORE_COMMIT_ENABLE_FLAG | CERT_STORE_READONLY_FLAG, file); - ok(!store && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - - /* A "read-only" file store.. */ - store = CertOpenStore(CERT_STORE_PROV_FILE, 0, 0, - CERT_STORE_OPEN_EXISTING_FLAG | CERT_STORE_READONLY_FLAG, file); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - if (store) - { - DWORD size; - - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL); - /* apparently allows adding certificates.. */ - ok(ret, "CertAddEncodedCertificateToStore failed: %d\n", ret); - /* but not commits.. */ - ret = pCertControlStore(store, 0, CERT_STORE_CTRL_COMMIT, NULL); - ok(!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED, - "Expected ERROR_CALL_NOT_IMPLEMENTED, got %08x\n", GetLastError()); - /* It still has certs in memory.. */ - cert = CertEnumCertificatesInStore(store, NULL); - ok(cert != NULL, "CertEnumCertificatesInStore failed: %08x\n", - GetLastError()); - CertFreeCertificateContext(cert); - /* but the file size is still 0. */ - size = GetFileSize(file, NULL); - ok(size == 0, "Expected size 0, got %d\n", size); - CertCloseStore(store, 0); - } - - /* The create new flag is allowed.. */ - store = CertOpenStore(CERT_STORE_PROV_FILE, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, file); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - if (store) - { - /* but without the commit enable flag, commits don't happen. */ - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %d\n", ret); - ret = pCertControlStore(store, 0, CERT_STORE_CTRL_COMMIT, NULL); - ok(!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED, - "Expected ERROR_CALL_NOT_IMPLEMENTED, got %08x\n", GetLastError()); - CertCloseStore(store, 0); - } - /* as is the open existing flag. */ - store = CertOpenStore(CERT_STORE_PROV_FILE, 0, 0, - CERT_STORE_OPEN_EXISTING_FLAG, file); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - if (store) - { - /* but without the commit enable flag, commits don't happen. */ - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %d\n", ret); - ret = pCertControlStore(store, 0, CERT_STORE_CTRL_COMMIT, NULL); - ok(!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED, - "Expected ERROR_CALL_NOT_IMPLEMENTED, got %08x\n", GetLastError()); - CertCloseStore(store, 0); - } - store = CertOpenStore(CERT_STORE_PROV_FILE, 0, 0, - CERT_FILE_STORE_COMMIT_ENABLE_FLAG, file); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - if (store) - { - CloseHandle(file); - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", - GetLastError()); - /* with commits enabled, commit is allowed */ - ret = pCertControlStore(store, 0, CERT_STORE_CTRL_COMMIT, NULL); - ok(ret, "CertControlStore failed: %d\n", ret); - compareStore(store, "serialized store with cert", - serializedStoreWithCert, sizeof(serializedStoreWithCert), FALSE); - CertCloseStore(store, 0); - } - file = CreateFileW(filename, GENERIC_READ | GENERIC_WRITE, 0, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - if (file == INVALID_HANDLE_VALUE) - return; - store = CertOpenStore(CERT_STORE_PROV_FILE, 0, 0, - CERT_FILE_STORE_COMMIT_ENABLE_FLAG, file); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - if (store) - { - CloseHandle(file); - ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, signedCRL, - sizeof(signedCRL), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError()); - compareStore(store, "serialized store with cert and CRL", - serializedStoreWithCertAndCRL, sizeof(serializedStoreWithCertAndCRL), - FALSE); - CertCloseStore(store, 0); - } - - DeleteFileW(filename); -} - -static BOOL initFileFromData(LPCWSTR filename, const BYTE *pb, DWORD cb) -{ - HANDLE file = CreateFileW(filename, GENERIC_READ | GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - BOOL ret; - - if (file != INVALID_HANDLE_VALUE) - { - DWORD written; - - ret = WriteFile(file, pb, cb, &written, NULL); - CloseHandle(file); - } - else - ret = FALSE; - return ret; -} - -static const BYTE base64SPC[] = -"MIICJQYJKoZIhvcNAQcCoIICFjCCAhICAQExADALBgkqhkiG9w0BBwGgggH6MIIB" -"9jCCAV+gAwIBAgIQnP8+EF4opr9OxH7h4uBPWTANBgkqhkiG9w0BAQQFADAUMRIw" -"EAYDVQQDEwlKdWFuIExhbmcwHhcNMDgxMjEyMTcxMDE0WhcNMzkxMjMxMjM1OTU5" -"WjAUMRIwEAYDVQQDEwlKdWFuIExhbmcwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJ" -"AoGBALCgNjyNvOic0FOfjxvi43HbM+D5joDkhiGSXe+gbZlf8f16k07kkObFEunz" -"mdB5coscmA7gyqiWNN4ZUyr2cA3lCbnpGPA/0IblyyOcuGIFmmCzeZaVa5ZG6xZP" -"K7L7o+73Qo6jXVbGhBGnMZ7Q9sAn6s2933olnStnejnqwV0NAgMBAAGjSTBHMEUG" -"A1UdAQQ+MDyAEFKbKEdXYyx+CWKcV6vxM6ShFjAUMRIwEAYDVQQDEwlKdWFuIExh" -"bmeCEJz/PhBeKKa/TsR+4eLgT1kwDQYJKoZIhvcNAQEEBQADgYEALpkgLgW3mEaK" -"idPQ3iPJYLG0Ub1wraqEl9bd42hrhzIdcDzlQgxnm8/5cHYVxIF/C20x/HJplb1R" -"G6U1ipFe/q8byWD/9JpiBKMGPi9YlUTgXHfS9d4S/QWO1h9Z7KeipBYhoslQpHXu" -"y9bUr8Adqi6SzgHpCnMu53dxgxUD1r4xAA=="; -/* Same as base64SPC, but as a wide-char string */ -static const WCHAR utf16Base64SPC[] = { -'M','I','I','C','J','Q','Y','J','K','o','Z','I','h','v','c','N','A', -'Q','c','C','o','I','I','C','F','j','C','C','A','h','I','C','A','Q', -'E','x','A','D','A','L','B','g','k','q','h','k','i','G','9','w','0', -'B','B','w','G','g','g','g','H','6','M','I','I','B','9','j','C','C', -'A','V','+','g','A','w','I','B','A','g','I','Q','n','P','8','+','E', -'F','4','o','p','r','9','O','x','H','7','h','4','u','B','P','W','T', -'A','N','B','g','k','q','h','k','i','G','9','w','0','B','A','Q','Q', -'F','A','D','A','U','M','R','I','w','E','A','Y','D','V','Q','Q','D', -'E','w','l','K','d','W','F','u','I','E','x','h','b','m','c','w','H', -'h','c','N','M','D','g','x','M','j','E','y','M','T','c','x','M','D', -'E','0','W','h','c','N','M','z','k','x','M','j','M','x','M','j','M', -'1','O','T','U','5','W','j','A','U','M','R','I','w','E','A','Y','D', -'V','Q','Q','D','E','w','l','K','d','W','F','u','I','E','x','h','b', -'m','c','w','g','Z','8','w','D','Q','Y','J','K','o','Z','I','h','v', -'c','N','A','Q','E','B','B','Q','A','D','g','Y','0','A','M','I','G', -'J','A','o','G','B','A','L','C','g','N','j','y','N','v','O','i','c', -'0','F','O','f','j','x','v','i','4','3','H','b','M','+','D','5','j', -'o','D','k','h','i','G','S','X','e','+','g','b','Z','l','f','8','f', -'1','6','k','0','7','k','k','O','b','F','E','u','n','z','m','d','B', -'5','c','o','s','c','m','A','7','g','y','q','i','W','N','N','4','Z', -'U','y','r','2','c','A','3','l','C','b','n','p','G','P','A','/','0', -'I','b','l','y','y','O','c','u','G','I','F','m','m','C','z','e','Z', -'a','V','a','5','Z','G','6','x','Z','P','K','7','L','7','o','+','7', -'3','Q','o','6','j','X','V','b','G','h','B','G','n','M','Z','7','Q', -'9','s','A','n','6','s','2','9','3','3','o','l','n','S','t','n','e', -'j','n','q','w','V','0','N','A','g','M','B','A','A','G','j','S','T', -'B','H','M','E','U','G','A','1','U','d','A','Q','Q','+','M','D','y', -'A','E','F','K','b','K','E','d','X','Y','y','x','+','C','W','K','c', -'V','6','v','x','M','6','S','h','F','j','A','U','M','R','I','w','E', -'A','Y','D','V','Q','Q','D','E','w','l','K','d','W','F','u','I','E', -'x','h','b','m','e','C','E','J','z','/','P','h','B','e','K','K','a', -'/','T','s','R','+','4','e','L','g','T','1','k','w','D','Q','Y','J', -'K','o','Z','I','h','v','c','N','A','Q','E','E','B','Q','A','D','g', -'Y','E','A','L','p','k','g','L','g','W','3','m','E','a','K','i','d', -'P','Q','3','i','P','J','Y','L','G','0','U','b','1','w','r','a','q', -'E','l','9','b','d','4','2','h','r','h','z','I','d','c','D','z','l', -'Q','g','x','n','m','8','/','5','c','H','Y','V','x','I','F','/','C', -'2','0','x','/','H','J','p','l','b','1','R','G','6','U','1','i','p', -'F','e','/','q','8','b','y','W','D','/','9','J','p','i','B','K','M', -'G','P','i','9','Y','l','U','T','g','X','H','f','S','9','d','4','S', -'/','Q','W','O','1','h','9','Z','7','K','e','i','p','B','Y','h','o', -'s','l','Q','p','H','X','u','y','9','b','U','r','8','A','d','q','i', -'6','S','z','g','H','p','C','n','M','u','5','3','d','x','g','x','U', -'D','1','r','4','x','A','A','=','=',0 }; - -static void testFileNameStore(void) -{ - static const WCHAR szPrefix[] = { 'c','e','r',0 }; - static const WCHAR spcPrefix[] = { 's','p','c',0 }; - static const WCHAR szDot[] = { '.',0 }; - WCHAR filename[MAX_PATH]; - HCERTSTORE store; - BOOL ret; - DWORD GLE; - - if (0) - { - /* Crashes on NT4 */ - store = CertOpenStore(CERT_STORE_PROV_FILENAME_W, 0, 0, 0, NULL); - GLE = GetLastError(); - ok(!store && (GLE == ERROR_PATH_NOT_FOUND || GLE == ERROR_INVALID_PARAMETER), - "Expected ERROR_PATH_NOT_FOUND or ERROR_INVALID_PARAMETER, got %08x\n", - GLE); - } - - if (!GetTempFileNameW(szDot, szPrefix, 0, filename)) - return; - DeleteFileW(filename); - - /* The two flags are mutually exclusive */ - store = CertOpenStore(CERT_STORE_PROV_FILENAME_W, 0, 0, - CERT_FILE_STORE_COMMIT_ENABLE_FLAG | CERT_STORE_READONLY_FLAG, filename); - ok(!store && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - - /* In all of the following tests, the encoding type seems to be ignored */ - if (initFileFromData(filename, bigCert, sizeof(bigCert))) - { - PCCERT_CONTEXT cert; - PCCRL_CONTEXT crl; - - store = CertOpenStore(CERT_STORE_PROV_FILENAME_W, 0, 0, - CERT_STORE_READONLY_FLAG, filename); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - - cert = CertEnumCertificatesInStore(store, NULL); - ok(cert != NULL, "CertEnumCertificatesInStore failed: %08x\n", - GetLastError()); - cert = CertEnumCertificatesInStore(store, cert); - ok(!cert, "Expected only one cert\n"); - if (pCertEnumCRLsInStore) - { - crl = pCertEnumCRLsInStore(store, NULL); - ok(!crl, "Expected no CRLs\n"); - } - - CertCloseStore(store, 0); - DeleteFileW(filename); - } - if (initFileFromData(filename, serializedStoreWithCert, - sizeof(serializedStoreWithCert))) - { - PCCERT_CONTEXT cert; - PCCRL_CONTEXT crl; - - store = CertOpenStore(CERT_STORE_PROV_FILENAME_W, 0, 0, - CERT_STORE_READONLY_FLAG, filename); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - - cert = CertEnumCertificatesInStore(store, NULL); - ok(cert != NULL, "CertEnumCertificatesInStore failed: %08x\n", - GetLastError()); - cert = CertEnumCertificatesInStore(store, cert); - ok(!cert, "Expected only one cert\n"); - if (pCertEnumCRLsInStore) - { - crl = pCertEnumCRLsInStore(store, NULL); - ok(!crl, "Expected no CRLs\n"); - } - - CertCloseStore(store, 0); - DeleteFileW(filename); - } - if (initFileFromData(filename, serializedStoreWithCertAndCRL, - sizeof(serializedStoreWithCertAndCRL))) - { - PCCERT_CONTEXT cert; - PCCRL_CONTEXT crl; - - store = CertOpenStore(CERT_STORE_PROV_FILENAME_W, 0, 0, - CERT_STORE_READONLY_FLAG, filename); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - - cert = CertEnumCertificatesInStore(store, NULL); - ok(cert != NULL, "CertEnumCertificatesInStore failed: %08x\n", - GetLastError()); - cert = CertEnumCertificatesInStore(store, cert); - ok(!cert, "Expected only one cert\n"); - if (pCertEnumCRLsInStore) - { - crl = pCertEnumCRLsInStore(store, NULL); - ok(crl != NULL, "CertEnumCRLsInStore failed: %08x\n", GetLastError()); - crl = pCertEnumCRLsInStore(store, crl); - ok(!crl, "Expected only one CRL\n"); - } - - CertCloseStore(store, 0); - /* Don't delete it this time, the next test uses it */ - } - /* Now that the file exists, we can open it read-only */ - store = CertOpenStore(CERT_STORE_PROV_FILENAME_W, 0, 0, - CERT_STORE_READONLY_FLAG, filename); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - CertCloseStore(store, 0); - DeleteFileW(filename); - - store = CertOpenStore(CERT_STORE_PROV_FILENAME_W, 0, 0, - CERT_FILE_STORE_COMMIT_ENABLE_FLAG | CERT_STORE_CREATE_NEW_FLAG, filename); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - if (store) - { - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", - GetLastError()); - compareStore(store, "serialized store with cert", - serializedStoreWithCert, sizeof(serializedStoreWithCert), FALSE); - CertCloseStore(store, 0); - } - store = CertOpenStore(CERT_STORE_PROV_FILENAME_W, 0, 0, - CERT_FILE_STORE_COMMIT_ENABLE_FLAG, filename); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - if (store) - { - ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, - signedCRL, sizeof(signedCRL), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError()); - compareStore(store, "serialized store with cert and CRL", - serializedStoreWithCertAndCRL, sizeof(serializedStoreWithCertAndCRL), - FALSE); - CertCloseStore(store, 0); - } - DeleteFileW(filename); - - if (!GetTempFileNameW(szDot, spcPrefix, 0, filename)) - return; - DeleteFileW(filename); - - if (initFileFromData(filename, base64SPC, sizeof(base64SPC))) - { - PCCERT_CONTEXT cert; - PCCRL_CONTEXT crl; - - store = CertOpenStore(CERT_STORE_PROV_FILENAME_W, 0, 0, - CERT_STORE_READONLY_FLAG, filename); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - - cert = CertEnumCertificatesInStore(store, NULL); - ok(cert != NULL, "CertEnumCertificatesInStore failed: %08x\n", - GetLastError()); - cert = CertEnumCertificatesInStore(store, cert); - ok(!cert, "Expected only one cert\n"); - if (pCertEnumCRLsInStore) - { - crl = pCertEnumCRLsInStore(store, NULL); - ok(!crl, "Expected no CRLs\n"); - } - - CertCloseStore(store, 0); - DeleteFileW(filename); - } - if (initFileFromData(filename, (BYTE *)utf16Base64SPC, - sizeof(utf16Base64SPC))) - { - PCCERT_CONTEXT cert; - PCCRL_CONTEXT crl; - - store = CertOpenStore(CERT_STORE_PROV_FILENAME_W, 0, 0, - CERT_STORE_READONLY_FLAG, filename); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - - cert = CertEnumCertificatesInStore(store, NULL); - ok(cert != NULL, "CertEnumCertificatesInStore failed: %08x\n", - GetLastError()); - cert = CertEnumCertificatesInStore(store, cert); - ok(!cert, "Expected only one cert\n"); - if (pCertEnumCRLsInStore) - { - crl = pCertEnumCRLsInStore(store, NULL); - ok(!crl, "Expected no CRLs\n"); - } - - CertCloseStore(store, 0); - DeleteFileW(filename); - } -} - -static const BYTE signedContent[] = { -0x30,0x81,0xb2,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0, -0x81,0xa4,0x30,0x81,0xa1,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x13,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x06,0x04,0x04,0x01,0x02,0x03,0x04, -0x31,0x77,0x30,0x75,0x02,0x01,0x01,0x30,0x1a,0x30,0x15,0x31,0x13,0x30,0x11, -0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x02,0x05,0x05,0x00,0x30,0x04,0x06,0x00,0x05,0x00,0x04,0x40,0x81,0xa6,0x70, -0xb3,0xef,0x59,0xd1,0x66,0xd1,0x9b,0xc0,0x9a,0xb6,0x9a,0x5e,0x6d,0x6f,0x6d, -0x0d,0x59,0xa9,0xaa,0x6e,0xe9,0x2c,0xa0,0x1e,0xee,0xc2,0x60,0xbc,0x59,0xbe, -0x3f,0x63,0x06,0x8d,0xc9,0x11,0x1d,0x23,0x64,0x92,0xef,0x2e,0xfc,0x57,0x29, -0xa4,0xaf,0xe0,0xee,0x93,0x19,0x39,0x51,0xe4,0x44,0xb8,0x0b,0x28,0xf4,0xa8, -0x0d }; -static const BYTE signedWithCertAndCrlBareContent[] = { -0x30,0x82,0x01,0x4f,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x13,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x06,0x04,0x04,0x01,0x02,0x03,0x04,0xa0, -0x7c,0x30,0x7a,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30, -0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61, -0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31, -0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31, -0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11, -0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x00,0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00,0xa3,0x16,0x30,0x14, -0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01, -0x01,0xff,0x02,0x01,0x01,0xa1,0x2e,0x30,0x2c,0x30,0x02,0x06,0x00,0x30,0x15, -0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e, -0x20,0x4c,0x61,0x6e,0x67,0x00,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30, -0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x31,0x77,0x30,0x75,0x02,0x01,0x01, -0x30,0x1a,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a, -0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c, -0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x04,0x06, -0x00,0x05,0x00,0x04,0x40,0x81,0xa6,0x70,0xb3,0xef,0x59,0xd1,0x66,0xd1,0x9b, -0xc0,0x9a,0xb6,0x9a,0x5e,0x6d,0x6f,0x6d,0x0d,0x59,0xa9,0xaa,0x6e,0xe9,0x2c, -0xa0,0x1e,0xee,0xc2,0x60,0xbc,0x59,0xbe,0x3f,0x63,0x06,0x8d,0xc9,0x11,0x1d, -0x23,0x64,0x92,0xef,0x2e,0xfc,0x57,0x29,0xa4,0xaf,0xe0,0xee,0x93,0x19,0x39, -0x51,0xe4,0x44,0xb8,0x0b,0x28,0xf4,0xa8,0x0d }; -static const BYTE hashContent[] = { -0x30,0x47,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x05,0xa0,0x3a, -0x30,0x38,0x02,0x01,0x00,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x02,0x05,0x05,0x00,0x30,0x13,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x07,0x01,0xa0,0x06,0x04,0x04,0x01,0x02,0x03,0x04,0x04,0x10,0x08,0xd6,0xc0, -0x5a,0x21,0x51,0x2a,0x79,0xa1,0xdf,0xeb,0x9d,0x2a,0x8f,0x26,0x2f }; -static const BYTE hashBareContent[] = { -0x30,0x38,0x02,0x01,0x00,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d, -0x02,0x05,0x05,0x00,0x30,0x13,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x07,0x01,0xa0,0x06,0x04,0x04,0x01,0x02,0x03,0x04,0x04,0x10,0x08,0xd6,0xc0, -0x5a,0x21,0x51,0x2a,0x79,0xa1,0xdf,0xeb,0x9d,0x2a,0x8f,0x26,0x2f }; - -static void testMessageStore(void) -{ - HCERTSTORE store; - HCRYPTMSG msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, - NULL); - CRYPT_DATA_BLOB blob = { sizeof(signedWithCertAndCrlBareContent), - (LPBYTE)signedWithCertAndCrlBareContent }; - DWORD count, size; - BOOL ret; - - /* Crashes - store = CertOpenStore(CERT_STORE_PROV_MSG, 0, 0, 0, NULL); - */ - SetLastError(0xdeadbeef); - store = CertOpenStore(CERT_STORE_PROV_MSG, 0, 0, 0, msg); - ok(!store && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); - CryptMsgUpdate(msg, signedContent, sizeof(signedContent), TRUE); - store = CertOpenStore(CERT_STORE_PROV_MSG, 0, 0, 0, msg); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - if (store) - { - PCCERT_CONTEXT cert = NULL; - PCCRL_CONTEXT crl = NULL; - - count = 0; - do { - cert = CertEnumCertificatesInStore(store, cert); - if (cert) - count++; - } while (cert); - ok(count == 0, "Expected 0 certificates, got %d\n", count); - - if (pCertEnumCRLsInStore) - { - count = 0; - do { - crl = pCertEnumCRLsInStore(store, crl); - if (crl) - count++; - } while (crl); - ok(count == 0, "Expected 0 CRLs, got %d\n", count); - } - - /* Can add certs to a message store */ - ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, - bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", - GetLastError()); - count = 0; - do { - cert = CertEnumCertificatesInStore(store, cert); - if (cert) - count++; - } while (cert); - ok(count == 1, "Expected 1 certificate, got %d\n", count); - - CertCloseStore(store, 0); - } - /* but the added certs weren't actually added to the message */ - size = sizeof(count); - ret = CryptMsgGetParam(msg, CMSG_CERT_COUNT_PARAM, 0, &count, &size); - ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - ok(count == 0, "Expected 0 certificates, got %d\n", count); - CryptMsgClose(msg); - - /* Crashes - store = CertOpenStore(CERT_STORE_PROV_PKCS7, 0, 0, 0, NULL); - */ - store = CertOpenStore(CERT_STORE_PROV_PKCS7, 0, 0, 0, &blob); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - if (store) - { - DWORD count = 0; - PCCERT_CONTEXT cert = NULL; - PCCRL_CONTEXT crl = NULL; - - do { - cert = CertEnumCertificatesInStore(store, cert); - if (cert) - count++; - } while (cert); - ok(count == 1, "Expected 1 certificate, got %d\n", count); - - if (pCertEnumCRLsInStore) - { - count = 0; - do { - crl = pCertEnumCRLsInStore(store, crl); - if (crl) - count++; - } while (crl); - ok(count == 1, "Expected 1 CRL, got %d\n", count); - } - CertCloseStore(store, 0); - } - /* Encoding appears to be ignored */ - store = CertOpenStore(CERT_STORE_PROV_PKCS7, X509_ASN_ENCODING, 0, 0, - &blob); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - if (store) - CertCloseStore(store, 0); - /* Messages other than signed messages aren't allowed */ - blob.cbData = sizeof(hashContent); - blob.pbData = (LPBYTE)hashContent; - SetLastError(0xdeadbeef); - store = CertOpenStore(CERT_STORE_PROV_PKCS7, 0, 0, 0, &blob); - ok(!store && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n", GetLastError()); - blob.cbData = sizeof(hashBareContent); - blob.pbData = (LPBYTE)hashBareContent; - SetLastError(0xdeadbeef); - store = CertOpenStore(CERT_STORE_PROV_PKCS7, 0, 0, 0, &blob); - ok(!store && - (GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == OSS_DATA_ERROR), /* win9x */ - "Expected CRYPT_E_ASN1_BADTAG, got %08x\n", GetLastError()); -} - -static void testSerializedStore(void) -{ - HCERTSTORE store; - CRYPT_DATA_BLOB blob; - - if (0) - { - /* Crash */ - store = CertOpenStore(CERT_STORE_PROV_SERIALIZED, 0, 0, 0, NULL); - store = CertOpenStore(CERT_STORE_PROV_SERIALIZED, 0, 0, - CERT_STORE_DELETE_FLAG, NULL); - } - blob.cbData = sizeof(serializedStoreWithCert); - blob.pbData = (BYTE *)serializedStoreWithCert; - store = CertOpenStore(CERT_STORE_PROV_SERIALIZED, 0, 0, - CERT_STORE_DELETE_FLAG, &blob); - ok(!store && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED, - "Expected ERROR_CALL_NOT_IMPLEMENTED, got %08x\n", GetLastError()); - store = CertOpenStore(CERT_STORE_PROV_SERIALIZED, 0, 0, 0, &blob); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - if (store) - { - PCCERT_CONTEXT cert; - PCCRL_CONTEXT crl; - - cert = CertEnumCertificatesInStore(store, NULL); - ok(cert != NULL, "CertEnumCertificatesInStore failed: %08x\n", - GetLastError()); - cert = CertEnumCertificatesInStore(store, cert); - ok(!cert, "Expected only one cert\n"); - if (pCertEnumCRLsInStore) - { - crl = pCertEnumCRLsInStore(store, NULL); - ok(!crl, "Expected no CRLs\n"); - } - CertCloseStore(store, 0); - } - blob.cbData = sizeof(serializedStoreWithCertAndCRL); - blob.pbData = (BYTE *)serializedStoreWithCertAndCRL; - store = CertOpenStore(CERT_STORE_PROV_SERIALIZED, 0, 0, 0, &blob); - ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - if (store) - { - PCCERT_CONTEXT cert; - PCCRL_CONTEXT crl; - - cert = CertEnumCertificatesInStore(store, NULL); - ok(cert != NULL, "CertEnumCertificatesInStore failed: %08x\n", - GetLastError()); - cert = CertEnumCertificatesInStore(store, cert); - ok(!cert, "Expected only one cert\n"); - if (pCertEnumCRLsInStore) - { - crl = pCertEnumCRLsInStore(store, NULL); - ok(crl != NULL, "CertEnumCRLsInStore failed: %08x\n", - GetLastError()); - crl = pCertEnumCRLsInStore(store, crl); - ok(!crl, "Expected only one CRL\n"); - } - CertCloseStore(store, 0); - } -} - -static void testCertOpenSystemStore(void) -{ - HCERTSTORE store; - - store = CertOpenSystemStoreW(0, NULL); - ok(!store && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* This succeeds, and on WinXP at least, the Bogus key is created under - * HKCU (but not under HKLM, even when run as an administrator.) - */ - store = CertOpenSystemStoreW(0, BogusW); - ok(store != 0, "CertOpenSystemStore failed: %08x\n", GetLastError()); - if (store) - CertCloseStore(store, 0); - /* Delete it so other tests succeed next time around */ - store = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, - CERT_SYSTEM_STORE_CURRENT_USER | CERT_STORE_DELETE_FLAG, BogusW); - RegDeleteKeyW(HKEY_CURRENT_USER, BogusPathW); -} - -struct EnumSystemStoreInfo -{ - BOOL goOn; - DWORD storeCount; -}; - -static BOOL CALLBACK enumSystemStoreCB(const void *systemStore, DWORD dwFlags, - PCERT_SYSTEM_STORE_INFO pStoreInfo, void *pvReserved, void *pvArg) -{ - struct EnumSystemStoreInfo *info = pvArg; - - info->storeCount++; - return info->goOn; -} - -static void testCertEnumSystemStore(void) -{ - BOOL ret; - struct EnumSystemStoreInfo info = { FALSE, 0 }; - - if (!pCertEnumSystemStore) - { - win_skip("CertEnumSystemStore() is not available\n"); - return; - } - - SetLastError(0xdeadbeef); - ret = pCertEnumSystemStore(0, NULL, NULL, NULL); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - /* Crashes - ret = pCertEnumSystemStore(CERT_SYSTEM_STORE_LOCAL_MACHINE, NULL, NULL, - NULL); - */ - - SetLastError(0xdeadbeef); - ret = pCertEnumSystemStore(CERT_SYSTEM_STORE_LOCAL_MACHINE, NULL, &info, - enumSystemStoreCB); - /* Callback returning FALSE stops enumeration */ - ok(!ret, "Expected CertEnumSystemStore to stop\n"); - ok(info.storeCount == 0 || info.storeCount == 1, - "Expected 0 or 1 stores\n"); - - info.goOn = TRUE; - info.storeCount = 0; - ret = pCertEnumSystemStore(CERT_SYSTEM_STORE_LOCAL_MACHINE, NULL, &info, - enumSystemStoreCB); - ok(ret, "CertEnumSystemStore failed: %08x\n", GetLastError()); - /* There should always be at least My, Root, and CA stores */ - ok(info.storeCount == 0 || info.storeCount >= 3, - "Expected at least 3 stores\n"); -} - -static void testStoreProperty(void) -{ - HCERTSTORE store; - BOOL ret; - DWORD propID, size = 0, state; - CRYPT_DATA_BLOB blob; - - if (!pCertGetStoreProperty || !pCertSetStoreProperty) - { - win_skip("CertGet/SetStoreProperty() is not available\n"); - return; - } - - /* Crash - ret = pCertGetStoreProperty(NULL, 0, NULL, NULL); - ret = pCertGetStoreProperty(NULL, 0, NULL, &size); - ret = pCertGetStoreProperty(store, 0, NULL, NULL); - */ - - store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - /* Check a missing prop ID */ - SetLastError(0xdeadbeef); - ret = pCertGetStoreProperty(store, 0, NULL, &size); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - /* Contrary to MSDN, CERT_ACCESS_STATE_PROP_ID is supported for stores.. */ - size = sizeof(state); - ret = pCertGetStoreProperty(store, CERT_ACCESS_STATE_PROP_ID, &state, &size); - ok(ret, "CertGetStoreProperty failed for CERT_ACCESS_STATE_PROP_ID: %08x\n", - GetLastError()); - ok(!state, "Expected a non-persisted store\n"); - /* and CERT_STORE_LOCALIZED_NAME_PROP_ID isn't supported by default. */ - size = 0; - ret = pCertGetStoreProperty(store, CERT_STORE_LOCALIZED_NAME_PROP_ID, NULL, - &size); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - /* Delete an arbitrary property on a store */ - ret = pCertSetStoreProperty(store, CERT_FIRST_USER_PROP_ID, 0, NULL); - ok(ret, "CertSetStoreProperty failed: %08x\n", GetLastError()); - /* Set an arbitrary property on a store */ - blob.pbData = (LPBYTE)&state; - blob.cbData = sizeof(state); - ret = pCertSetStoreProperty(store, CERT_FIRST_USER_PROP_ID, 0, &blob); - ok(ret, "CertSetStoreProperty failed: %08x\n", GetLastError()); - /* Get an arbitrary property that's been set */ - ret = pCertGetStoreProperty(store, CERT_FIRST_USER_PROP_ID, NULL, &size); - ok(ret, "CertGetStoreProperty failed: %08x\n", GetLastError()); - ok(size == sizeof(state), "Unexpected data size %d\n", size); - ret = pCertGetStoreProperty(store, CERT_FIRST_USER_PROP_ID, &propID, &size); - ok(ret, "CertGetStoreProperty failed: %08x\n", GetLastError()); - ok(propID == state, "CertGetStoreProperty got the wrong value\n"); - /* Delete it again */ - ret = pCertSetStoreProperty(store, CERT_FIRST_USER_PROP_ID, 0, NULL); - ok(ret, "CertSetStoreProperty failed: %08x\n", GetLastError()); - /* And check that it's missing */ - SetLastError(0xdeadbeef); - ret = pCertGetStoreProperty(store, CERT_FIRST_USER_PROP_ID, NULL, &size); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - CertCloseStore(store, 0); - - /* Recheck on the My store.. */ - store = CertOpenSystemStoreW(0, MyW); - size = sizeof(state); - ret = pCertGetStoreProperty(store, CERT_ACCESS_STATE_PROP_ID, &state, &size); - ok(ret, "CertGetStoreProperty failed for CERT_ACCESS_STATE_PROP_ID: %08x\n", - GetLastError()); - ok(state, "Expected a persisted store\n"); - SetLastError(0xdeadbeef); - size = 0; - ret = pCertGetStoreProperty(store, CERT_STORE_LOCALIZED_NAME_PROP_ID, NULL, - &size); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - CertCloseStore(store, 0); -} - -static void testAddSerialized(void) -{ - BOOL ret; - HCERTSTORE store; - BYTE buf[sizeof(struct CertPropIDHeader) * 2 + 20 + sizeof(bigCert)] = - { 0 }; - BYTE hash[20]; - struct CertPropIDHeader *hdr; - PCCERT_CONTEXT context; - - ret = CertAddSerializedElementToStore(0, NULL, 0, 0, 0, 0, NULL, NULL); - ok(!ret && GetLastError() == ERROR_END_OF_MEDIA, - "Expected ERROR_END_OF_MEDIA, got %08x\n", GetLastError()); - - store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - ok(store != 0, "CertOpenStore failed: %08x\n", GetLastError()); - - ret = CertAddSerializedElementToStore(store, NULL, 0, 0, 0, 0, NULL, NULL); - ok(!ret && GetLastError() == ERROR_END_OF_MEDIA, - "Expected ERROR_END_OF_MEDIA, got %08x\n", GetLastError()); - - /* Test with an empty property */ - hdr = (struct CertPropIDHeader *)buf; - hdr->propID = CERT_CERT_PROP_ID; - hdr->unknown1 = 1; - hdr->cb = 0; - ret = CertAddSerializedElementToStore(store, buf, sizeof(buf), 0, 0, 0, - NULL, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* Test with a bad size in property header */ - hdr->cb = sizeof(bigCert) - 1; - memcpy(buf + sizeof(struct CertPropIDHeader), bigCert, sizeof(bigCert)); - ret = CertAddSerializedElementToStore(store, buf, sizeof(buf), 0, 0, 0, - NULL, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - ret = CertAddSerializedElementToStore(store, buf, - sizeof(struct CertPropIDHeader) + sizeof(bigCert), 0, 0, 0, NULL, - NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - ret = CertAddSerializedElementToStore(store, buf, - sizeof(struct CertPropIDHeader) + sizeof(bigCert), CERT_STORE_ADD_NEW, - 0, 0, NULL, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* Kosher size in property header, but no context type */ - hdr->cb = sizeof(bigCert); - ret = CertAddSerializedElementToStore(store, buf, sizeof(buf), 0, 0, 0, - NULL, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - ret = CertAddSerializedElementToStore(store, buf, - sizeof(struct CertPropIDHeader) + sizeof(bigCert), 0, 0, 0, NULL, - NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - ret = CertAddSerializedElementToStore(store, buf, - sizeof(struct CertPropIDHeader) + sizeof(bigCert), CERT_STORE_ADD_NEW, - 0, 0, NULL, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* With a bad context type */ - ret = CertAddSerializedElementToStore(store, buf, sizeof(buf), 0, 0, - CERT_STORE_CRL_CONTEXT_FLAG, NULL, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - ret = CertAddSerializedElementToStore(store, buf, - sizeof(struct CertPropIDHeader) + sizeof(bigCert), 0, 0, - CERT_STORE_CRL_CONTEXT_FLAG, NULL, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - ret = CertAddSerializedElementToStore(store, buf, - sizeof(struct CertPropIDHeader) + sizeof(bigCert), CERT_STORE_ADD_NEW, - 0, CERT_STORE_CRL_CONTEXT_FLAG, NULL, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* Bad unknown field, good type */ - hdr->unknown1 = 2; - ret = CertAddSerializedElementToStore(store, buf, sizeof(buf), 0, 0, - CERT_STORE_CERTIFICATE_CONTEXT_FLAG, NULL, NULL); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND got %08x\n", GetLastError()); - ret = CertAddSerializedElementToStore(store, buf, - sizeof(struct CertPropIDHeader) + sizeof(bigCert), 0, 0, - CERT_STORE_CERTIFICATE_CONTEXT_FLAG, NULL, NULL); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND got %08x\n", GetLastError()); - ret = CertAddSerializedElementToStore(store, buf, - sizeof(struct CertPropIDHeader) + sizeof(bigCert), CERT_STORE_ADD_NEW, - 0, CERT_STORE_CERTIFICATE_CONTEXT_FLAG, NULL, NULL); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND got %08x\n", GetLastError()); - /* Most everything okay, but bad add disposition */ - hdr->unknown1 = 1; - /* This crashes - ret = CertAddSerializedElementToStore(store, buf, sizeof(buf), 0, 0, - CERT_STORE_CERTIFICATE_CONTEXT_FLAG, NULL, NULL); - * as does this - ret = CertAddSerializedElementToStore(store, buf, - sizeof(struct CertPropIDHeader) + sizeof(bigCert), 0, 0, - CERT_STORE_CERTIFICATE_CONTEXT_FLAG, NULL, NULL); - */ - /* Everything okay, but buffer's too big */ - ret = CertAddSerializedElementToStore(store, buf, sizeof(buf), - CERT_STORE_ADD_NEW, 0, CERT_STORE_CERTIFICATE_CONTEXT_FLAG, NULL, NULL); - ok(ret, "CertAddSerializedElementToStore failed: %08x\n", GetLastError()); - /* Everything okay, check it's not re-added */ - ret = CertAddSerializedElementToStore(store, buf, - sizeof(struct CertPropIDHeader) + sizeof(bigCert), CERT_STORE_ADD_NEW, - 0, CERT_STORE_CERTIFICATE_CONTEXT_FLAG, NULL, NULL); - ok(!ret && GetLastError() == CRYPT_E_EXISTS, - "Expected CRYPT_E_EXISTS, got %08x\n", GetLastError()); - - context = CertEnumCertificatesInStore(store, NULL); - ok(context != NULL, "Expected a cert\n"); - if (context) - CertDeleteCertificateFromStore(context); - - /* Try adding with a bogus hash. Oddly enough, it succeeds, and the hash, - * when queried, is the real hash rather than the bogus hash. - */ - hdr = (struct CertPropIDHeader *)(buf + sizeof(struct CertPropIDHeader) + - sizeof(bigCert)); - hdr->propID = CERT_HASH_PROP_ID; - hdr->unknown1 = 1; - hdr->cb = sizeof(hash); - memset(hash, 0xc, sizeof(hash)); - memcpy((LPBYTE)hdr + sizeof(struct CertPropIDHeader), hash, sizeof(hash)); - ret = CertAddSerializedElementToStore(store, buf, sizeof(buf), - CERT_STORE_ADD_NEW, 0, CERT_STORE_CERTIFICATE_CONTEXT_FLAG, NULL, - (const void **)&context); - ok(ret, "CertAddSerializedElementToStore failed: %08x\n", GetLastError()); - if (context) - { - BYTE hashVal[20], realHash[20]; - DWORD size = sizeof(hashVal); - - ret = CryptHashCertificate(0, 0, 0, bigCert, sizeof(bigCert), - realHash, &size); - ok(ret, "CryptHashCertificate failed: %08x\n", GetLastError()); - ret = CertGetCertificateContextProperty(context, CERT_HASH_PROP_ID, - hashVal, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", - GetLastError()); - ok(!memcmp(hashVal, realHash, size), "Unexpected hash\n"); - CertFreeCertificateContext(context); - } - - CertCloseStore(store, 0); -} - -static const BYTE serializedCertWithFriendlyName[] = { -0x0b,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x57,0x00,0x69, -0x00,0x6e,0x00,0x65,0x00,0x54,0x00,0x65,0x00,0x73,0x00,0x74,0x00,0x00,0x00, -0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x30,0x7a,0x02, -0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55, -0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30, -0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30, -0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30, -0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04, -0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x07, -0x30,0x02,0x06,0x00,0x03,0x01,0x00,0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03, -0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01, -0x01 }; -static const BYTE serializedStoreWithCertWithFriendlyName[] = { -0x00,0x00,0x00,0x00,0x43,0x45,0x52,0x54,0x0b,0x00,0x00,0x00,0x01,0x00,0x00, -0x00,0x12,0x00,0x00,0x00,0x57,0x00,0x69,0x00,0x6e,0x00,0x65,0x00,0x54,0x00, -0x65,0x00,0x73,0x00,0x74,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x01,0x00,0x00, -0x00,0x7c,0x00,0x00,0x00,0x30,0x7a,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30, -0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61, -0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31, -0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36, -0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15, -0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e, -0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00, -0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04, -0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00 }; -static const BYTE serializedStoreWithCertAndHash[] = { -0x00,0x00,0x00,0x00,0x43,0x45,0x52,0x54,0x03,0x00,0x00,0x00,0x01,0x00,0x00, -0x00,0x14,0x00,0x00,0x00,0x6e,0x30,0x90,0x71,0x5f,0xd9,0x23,0x56,0xeb,0xae, -0x25,0x40,0xe6,0x22,0xda,0x19,0x26,0x02,0xa6,0x08,0x20,0x00,0x00,0x00,0x01, -0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x30,0x7a,0x02,0x01,0x01,0x30,0x02,0x06, -0x00,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a, -0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36, -0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f, -0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a, -0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75, -0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x07,0x30,0x02,0x06,0x00,0x03, -0x01,0x00,0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01, -0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; - -static void testAddCertificateLink(void) -{ - BOOL ret; - HCERTSTORE store1, store2; - PCCERT_CONTEXT source, linked; - DWORD size; - LPBYTE buf; - CERT_NAME_BLOB blob; - static const WCHAR szPrefix[] = { 'c','e','r',0 }; - static const WCHAR szDot[] = { '.',0 }; - static const WCHAR WineTestW[] = { 'W','i','n','e','T','e','s','t',0 }; - WCHAR filename1[MAX_PATH], filename2[MAX_PATH]; - HANDLE file; - - if (0) - { - /* Crashes, i.e. the store is dereferenced without checking. */ - ret = CertAddCertificateLinkToStore(NULL, NULL, 0, NULL); - } - - /* Adding a certificate link to a store requires a valid add disposition */ - store1 = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - SetLastError(0xdeadbeef); - ret = CertAddCertificateLinkToStore(store1, NULL, 0, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - source = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, - sizeof(bigCert)); - SetLastError(0xdeadbeef); - ret = CertAddCertificateLinkToStore(store1, source, 0, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - ret = CertAddCertificateLinkToStore(store1, source, CERT_STORE_ADD_ALWAYS, - NULL); - ok(ret, "CertAddCertificateLinkToStore failed: %08x\n", GetLastError()); - if (0) - { - /* Crashes, i.e. the source certificate is dereferenced without - * checking when a valid add disposition is given. - */ - ret = CertAddCertificateLinkToStore(store1, NULL, CERT_STORE_ADD_ALWAYS, - NULL); - } - CertCloseStore(store1, 0); - - store1 = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - ret = CertAddCertificateLinkToStore(store1, source, CERT_STORE_ADD_ALWAYS, - &linked); - ok(ret, "CertAddCertificateLinkToStore failed: %08x\n", GetLastError()); - if (ret) - { - ok(linked->hCertStore == store1, "unexpected store\n"); - ret = CertSerializeCertificateStoreElement(linked, 0, NULL, &size); - ok(ret, "CertSerializeCertificateStoreElement failed: %08x\n", - GetLastError()); - buf = HeapAlloc(GetProcessHeap(), 0, size); - if (buf) - { - ret = CertSerializeCertificateStoreElement(linked, 0, buf, &size); - /* The serialized linked certificate is identical to the serialized - * original certificate. - */ - ok(size == sizeof(serializedCert), "Wrong size %d\n", size); - ok(!memcmp(serializedCert, buf, size), - "Unexpected serialized cert\n"); - HeapFree(GetProcessHeap(), 0, buf); - } - /* Set a friendly name on the source certificate... */ - blob.pbData = (LPBYTE)WineTestW; - blob.cbData = sizeof(WineTestW); - ret = CertSetCertificateContextProperty(source, - CERT_FRIENDLY_NAME_PROP_ID, 0, &blob); - ok(ret, "CertSetCertificateContextProperty failed: %08x\n", - GetLastError()); - /* and the linked certificate has the same friendly name. */ - ret = CertGetCertificateContextProperty(linked, - CERT_FRIENDLY_NAME_PROP_ID, NULL, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", - GetLastError()); - buf = HeapAlloc(GetProcessHeap(), 0, size); - if (buf) - { - ret = CertGetCertificateContextProperty(linked, - CERT_FRIENDLY_NAME_PROP_ID, buf, &size); - ok(!lstrcmpW((LPCWSTR)buf, WineTestW), - "unexpected friendly name\n"); - HeapFree(GetProcessHeap(), 0, buf); - } - CertFreeCertificateContext(linked); - } - CertFreeCertificateContext(source); - CertCloseStore(store1, 0); - - /* Test adding a cert to a file store, committing the change to the store, - * and creating a link to the resulting cert. - */ - if (!GetTempFileNameW(szDot, szPrefix, 0, filename1)) - return; - - DeleteFileW(filename1); - file = CreateFileW(filename1, GENERIC_READ | GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - if (file == INVALID_HANDLE_VALUE) - return; - - store1 = CertOpenStore(CERT_STORE_PROV_FILE, 0, 0, - CERT_FILE_STORE_COMMIT_ENABLE_FLAG, file); - ok(store1 != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - CloseHandle(file); - - ret = CertAddEncodedCertificateToStore(store1, X509_ASN_ENCODING, - bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, &source); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", - GetLastError()); - - /* Test adding a link to a memory store. */ - store2 = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - ret = CertAddCertificateLinkToStore(store2, source, CERT_STORE_ADD_ALWAYS, - &linked); - ok(ret, "CertAddCertificateLinkToStore failed: %08x\n", GetLastError()); - if (ret) - { - ok(linked->hCertStore == store2, "unexpected store\n"); - ret = CertSerializeCertificateStoreElement(linked, 0, NULL, &size); - ok(ret, "CertSerializeCertificateStoreElement failed: %08x\n", - GetLastError()); - buf = HeapAlloc(GetProcessHeap(), 0, size); - if (buf) - { - ret = CertSerializeCertificateStoreElement(linked, 0, buf, &size); - /* The serialized linked certificate is identical to the serialized - * original certificate. - */ - ok(size == sizeof(serializedCert), "Wrong size %d\n", size); - ok(!memcmp(serializedCert, buf, size), - "Unexpected serialized cert\n"); - HeapFree(GetProcessHeap(), 0, buf); - } - /* Set a friendly name on the source certificate... */ - blob.pbData = (LPBYTE)WineTestW; - blob.cbData = sizeof(WineTestW); - ret = CertSetCertificateContextProperty(source, - CERT_FRIENDLY_NAME_PROP_ID, 0, &blob); - ok(ret, "CertSetCertificateContextProperty failed: %08x\n", - GetLastError()); - /* and the linked certificate has the same friendly name. */ - ret = CertGetCertificateContextProperty(linked, - CERT_FRIENDLY_NAME_PROP_ID, NULL, &size); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", - GetLastError()); - buf = HeapAlloc(GetProcessHeap(), 0, size); - if (buf) - { - ret = CertGetCertificateContextProperty(linked, - CERT_FRIENDLY_NAME_PROP_ID, buf, &size); - ok(!lstrcmpW((LPCWSTR)buf, WineTestW), - "unexpected friendly name\n"); - HeapFree(GetProcessHeap(), 0, buf); - } - CertFreeCertificateContext(linked); - } - CertCloseStore(store2, 0); - - if (!GetTempFileNameW(szDot, szPrefix, 0, filename2)) - return; - - DeleteFileW(filename2); - file = CreateFileW(filename2, GENERIC_READ | GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - if (file == INVALID_HANDLE_VALUE) - return; - - store2 = CertOpenStore(CERT_STORE_PROV_FILE, 0, 0, - CERT_FILE_STORE_COMMIT_ENABLE_FLAG, file); - ok(store2 != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - CloseHandle(file); - /* Test adding a link to a file store. */ - ret = CertAddCertificateLinkToStore(store2, source, CERT_STORE_ADD_ALWAYS, - &linked); - ok(ret, "CertAddCertificateLinkToStore failed: %08x\n", GetLastError()); - if (ret) - { - ok(linked->hCertStore == store2, "unexpected store\n"); - ret = CertSerializeCertificateStoreElement(linked, 0, NULL, &size); - ok(ret, "CertSerializeCertificateStoreElement failed: %08x\n", - GetLastError()); - buf = HeapAlloc(GetProcessHeap(), 0, size); - if (buf) - { - ret = CertSerializeCertificateStoreElement(linked, 0, buf, &size); - ok(ret, "CertSerializeCertificateStoreElement failed: %08x\n", - GetLastError()); - /* The serialized linked certificate now contains the friendly - * name property. - */ - ok(size == sizeof(serializedCertWithFriendlyName), - "Wrong size %d\n", size); - ok(!memcmp(serializedCertWithFriendlyName, buf, size), - "Unexpected serialized cert\n"); - HeapFree(GetProcessHeap(), 0, buf); - } - CertFreeCertificateContext(linked); - compareStore(store2, "file store -> file store", - serializedStoreWithCertWithFriendlyName, - sizeof(serializedStoreWithCertWithFriendlyName), FALSE); - } - CertCloseStore(store2, 0); - DeleteFileW(filename2); - - CertFreeCertificateContext(source); - - CertCloseStore(store1, 0); - DeleteFileW(filename1); - - /* Test adding a link to a system store (which is a collection store.) */ - store1 = CertOpenSystemStoreA(0, "My"); - source = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, - sizeof(bigCert)); - SetLastError(0xdeadbeef); - ret = CertAddCertificateLinkToStore(store1, source, CERT_STORE_ADD_ALWAYS, - &linked); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - CertFreeCertificateContext(source); - - /* Test adding a link to a file store, where the linked certificate is - * in a system store. - */ - ret = CertAddEncodedCertificateToStore(store1, X509_ASN_ENCODING, - bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, &source); - ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", - GetLastError()); - if (!GetTempFileNameW(szDot, szPrefix, 0, filename1)) - return; - - DeleteFileW(filename1); - file = CreateFileW(filename1, GENERIC_READ | GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - if (file == INVALID_HANDLE_VALUE) - return; - - store2 = CertOpenStore(CERT_STORE_PROV_FILE, 0, 0, - CERT_FILE_STORE_COMMIT_ENABLE_FLAG, file); - ok(store2 != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - CloseHandle(file); - - ret = CertAddCertificateLinkToStore(store2, source, CERT_STORE_ADD_ALWAYS, - &linked); - ok(ret, "CertAddCertificateLinkToStore failed: %08x\n", GetLastError()); - if (ret) - { - ok(linked->hCertStore == store2, "unexpected store\n"); - ret = pCertControlStore(store2, 0, CERT_STORE_CTRL_COMMIT, NULL); - ok(ret, "CertControlStore failed: %d\n", ret); - compareStore(store2, "file store -> system store", - serializedStoreWithCertAndHash, - sizeof(serializedStoreWithCertAndHash), TRUE); - CertFreeCertificateContext(linked); - } - - CertCloseStore(store2, 0); - DeleteFileW(filename1); - - /* Test adding a link to a registry store, where the linked certificate is - * in a system store. - */ - store2 = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY, 0, 0, - CERT_SYSTEM_STORE_CURRENT_USER, WineTestW); - ok(store2 != NULL, "CertOpenStore failed: %08x\n", GetLastError()); - ret = CertAddCertificateLinkToStore(store2, source, CERT_STORE_ADD_ALWAYS, - &linked); - ok(ret, "CertAddCertificateLinkToStore failed: %08x\n", GetLastError()); - if (ret) - { - ok(linked->hCertStore == store2, "unexpected store\n"); - CertDeleteCertificateFromStore(linked); - } - CertCloseStore(store2, 0); - - CertFreeCertificateContext(source); - CertCloseStore(store1, 0); -} - -static DWORD countCertsInStore(HCERTSTORE store) -{ - PCCERT_CONTEXT cert = NULL; - DWORD certs = 0; - - do { - cert = CertEnumCertificatesInStore(store, cert); - if (cert) - certs++; - } while (cert); - return certs; -} - -static DWORD countCRLsInStore(HCERTSTORE store) -{ - PCCRL_CONTEXT crl = NULL; - DWORD crls = 0; - - do { - crl = pCertEnumCRLsInStore(store, crl); - if (crl) - crls++; - } while (crl); - return crls; -} - -static void test_I_UpdateStore(void) -{ - HMODULE lib = GetModuleHandleA("crypt32"); - BOOL (WINAPI *pI_CertUpdatestore)(HCERTSTORE, HCERTSTORE, DWORD, DWORD) = - (void *)GetProcAddress(lib, "I_CertUpdateStore"); - BOOL ret; - HCERTSTORE store1, store2; - PCCERT_CONTEXT cert; - DWORD certs; - - if (!pI_CertUpdatestore) - { - win_skip("No I_CertUpdateStore\n"); - return; - } - store1 = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - store2 = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - - /* Crash - ret = pI_CertUpdatestore(NULL, NULL, 0, 0); - ret = pI_CertUpdatestore(store1, NULL, 0, 0); - ret = pI_CertUpdatestore(NULL, store2, 0, 0); - */ - ret = pI_CertUpdatestore(store1, store2, 0, 0); - ok(ret, "I_CertUpdateStore failed: %08x\n", GetLastError()); - - CertAddEncodedCertificateToStore(store2, X509_ASN_ENCODING, bigCert, - sizeof(bigCert), CERT_STORE_ADD_ALWAYS, &cert); - /* I_CertUpdateStore adds the contexts from store2 to store1 */ - ret = pI_CertUpdatestore(store1, store2, 0, 0); - ok(ret, "I_CertUpdateStore failed: %08x\n", GetLastError()); - certs = countCertsInStore(store1); - ok(certs == 1, "Expected 1 cert, got %d\n", certs); - /* Calling it a second time has no effect */ - ret = pI_CertUpdatestore(store1, store2, 0, 0); - ok(ret, "I_CertUpdateStore failed: %08x\n", GetLastError()); - certs = countCertsInStore(store1); - ok(certs == 1, "Expected 1 cert, got %d\n", certs); - - /* The last parameters to I_CertUpdateStore appear to be ignored */ - ret = pI_CertUpdatestore(store1, store2, 1, 0); - ok(ret, "I_CertUpdateStore failed: %08x\n", GetLastError()); - ret = pI_CertUpdatestore(store1, store2, 0, 1); - ok(ret, "I_CertUpdateStore failed: %08x\n", GetLastError()); - - CertAddEncodedCRLToStore(store2, X509_ASN_ENCODING, signedCRL, - sizeof(signedCRL), CERT_STORE_ADD_ALWAYS, NULL); - - /* I_CertUpdateStore also adds the CRLs from store2 to store1 */ - ret = pI_CertUpdatestore(store1, store2, 0, 0); - ok(ret, "I_CertUpdateStore failed: %08x\n", GetLastError()); - certs = countCertsInStore(store1); - ok(certs == 1, "Expected 1 cert, got %d\n", certs); - if (pCertEnumCRLsInStore) - { - certs = countCRLsInStore(store1); - ok(certs == 1, "Expected 1 CRL, got %d\n", certs); - } - - CertDeleteCertificateFromStore(cert); - /* If a context is deleted from store2, I_CertUpdateStore deletes it - * from store1 - */ - ret = pI_CertUpdatestore(store1, store2, 0, 0); - ok(ret, "I_CertUpdateStore failed: %08x\n", GetLastError()); - certs = countCertsInStore(store1); - ok(certs == 0, "Expected 0 certs, got %d\n", certs); - - CertCloseStore(store1, 0); - CertCloseStore(store2, 0); -} - -START_TEST(store) -{ - HMODULE hdll; - - hdll = GetModuleHandleA("Crypt32.dll"); - pCertAddStoreToCollection = (void*)GetProcAddress(hdll, "CertAddStoreToCollection"); - pCertControlStore = (void*)GetProcAddress(hdll, "CertControlStore"); - pCertEnumCRLsInStore = (void*)GetProcAddress(hdll, "CertEnumCRLsInStore"); - pCertEnumSystemStore = (void*)GetProcAddress(hdll, "CertEnumSystemStore"); - pCertGetStoreProperty = (void*)GetProcAddress(hdll, "CertGetStoreProperty"); - pCertRemoveStoreFromCollection = (void*)GetProcAddress(hdll, "CertRemoveStoreFromCollection"); - pCertSetStoreProperty = (void*)GetProcAddress(hdll, "CertSetStoreProperty"); - - /* various combinations of CertOpenStore */ - testMemStore(); - testCollectionStore(); - testRegStore(); - testSystemRegStore(); - testSystemStore(); - testFileStore(); - testFileNameStore(); - testMessageStore(); - testSerializedStore(); - - testCertOpenSystemStore(); - testCertEnumSystemStore(); - testStoreProperty(); - - testAddSerialized(); - testAddCertificateLink(); - - test_I_UpdateStore(); -} diff --git a/rostests/winetests/crypt32/str.c b/rostests/winetests/crypt32/str.c deleted file mode 100644 index ebc334240ae..00000000000 --- a/rostests/winetests/crypt32/str.c +++ /dev/null @@ -1,654 +0,0 @@ -/* - * Unit test suite for crypt32.dll's Cert*ToStr and CertStrToName functions. - * - * Copyright 2006 Juan Lang, Aric Stewart 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 -#include -#include -#include -#include -#include - -#include "wine/test.h" - -/*#define DUMP_STRINGS*/ -#ifdef DUMP_STRINGS -#include "wine/debug.h" -#endif - -typedef struct _CertRDNAttrEncoding { - LPCSTR pszObjId; - DWORD dwValueType; - CERT_RDN_VALUE_BLOB Value; - LPCSTR str; -} CertRDNAttrEncoding, *PCertRDNAttrEncoding; - -typedef struct _CertRDNAttrEncodingW { - LPCSTR pszObjId; - DWORD dwValueType; - CERT_RDN_VALUE_BLOB Value; - LPCWSTR str; -} CertRDNAttrEncodingW, *PCertRDNAttrEncodingW; - -static BYTE bin1[] = { 0x55, 0x53 }; -static BYTE bin2[] = { 0x4d, 0x69, 0x6e, 0x6e, 0x65, 0x73, 0x6f, 0x74, - 0x61 }; -static BYTE bin3[] = { 0x4d, 0x69, 0x6e, 0x6e, 0x65, 0x61, 0x70, 0x6f, - 0x6c, 0x69, 0x73 }; -static BYTE bin4[] = { 0x43, 0x6f, 0x64, 0x65, 0x57, 0x65, 0x61, 0x76, - 0x65, 0x72, 0x73 }; -static BYTE bin5[] = { 0x57, 0x69, 0x6e, 0x65, 0x20, 0x44, 0x65, 0x76, - 0x65, 0x6c, 0x6f, 0x70, 0x6d, 0x65, 0x6e, 0x74 }; -static BYTE bin6[] = { 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, - 0x74 }; -static BYTE bin7[] = { 0x61, 0x72, 0x69, 0x63, 0x40, 0x63, 0x6f, 0x64, - 0x65, 0x77, 0x65, 0x61, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d }; - -static const BYTE cert[] = -{0x30,0x82,0x2,0xbb,0x30,0x82,0x2,0x24,0x2,0x9,0x0,0xe3,0x5a,0x10,0xf1,0xfc, - 0x4b,0xf3,0xa2,0x30,0xd,0x6,0x9,0x2a,0x86,0x48,0x86,0xf7,0xd,0x1,0x1,0x4,0x5, - 0x0,0x30,0x81,0xa1,0x31,0xb,0x30,0x9,0x6,0x3,0x55,0x4,0x6,0x13,0x2,0x55,0x53, - 0x31,0x12,0x30,0x10,0x6,0x3,0x55,0x4,0x8,0x13,0x9,0x4d,0x69,0x6e,0x6e,0x65, - 0x73,0x6f,0x74,0x61,0x31,0x14,0x30,0x12,0x6,0x3,0x55,0x4,0x7,0x13,0xb,0x4d, - 0x69,0x6e,0x6e,0x65,0x61,0x70,0x6f,0x6c,0x69,0x73,0x31,0x14,0x30,0x12,0x6,0x3, - 0x55,0x4,0xa,0x13,0xb,0x43,0x6f,0x64,0x65,0x57,0x65,0x61,0x76,0x65,0x72,0x73, - 0x31,0x19,0x30,0x17,0x6,0x3,0x55,0x4,0xb,0x13,0x10,0x57,0x69,0x6e,0x65,0x20, - 0x44,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74,0x31,0x12,0x30,0x10, - 0x6,0x3,0x55,0x4,0x3,0x13,0x9,0x6c,0x6f,0x63,0x61,0x6c,0x68,0x6f,0x73,0x74, - 0x31,0x23,0x30,0x21,0x6,0x9,0x2a,0x86,0x48,0x86,0xf7,0xd,0x1,0x9,0x1,0x16, - 0x14,0x61,0x72,0x69,0x63,0x40,0x63,0x6f,0x64,0x65,0x77,0x65,0x61,0x76,0x65, - 0x72,0x73,0x2e,0x63,0x6f,0x6d,0x30,0x1e,0x17,0xd,0x30,0x36,0x30,0x31,0x32, - 0x35,0x31,0x33,0x35,0x37,0x32,0x34,0x5a,0x17,0xd,0x30,0x36,0x30,0x32,0x32, - 0x34,0x31,0x33,0x35,0x37,0x32,0x34,0x5a,0x30,0x81,0xa1,0x31,0xb,0x30,0x9,0x6, - 0x3,0x55,0x4,0x6,0x13,0x2,0x55,0x53,0x31,0x12,0x30,0x10,0x6,0x3,0x55,0x4,0x8, - 0x13,0x9,0x4d,0x69,0x6e,0x6e,0x65,0x73,0x6f,0x74,0x61,0x31,0x14,0x30,0x12,0x6, - 0x3,0x55,0x4,0x7,0x13,0xb,0x4d,0x69,0x6e,0x6e,0x65,0x61,0x70,0x6f,0x6c,0x69, - 0x73,0x31,0x14,0x30,0x12,0x6,0x3,0x55,0x4,0xa,0x13,0xb,0x43,0x6f,0x64,0x65, - 0x57,0x65,0x61,0x76,0x65,0x72,0x73,0x31,0x19,0x30,0x17,0x6,0x3,0x55,0x4,0xb, - 0x13,0x10,0x57,0x69,0x6e,0x65,0x20,0x44,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d, - 0x65,0x6e,0x74,0x31,0x12,0x30,0x10,0x6,0x3,0x55,0x4,0x3,0x13,0x9,0x6c,0x6f, - 0x63,0x61,0x6c,0x68,0x6f,0x73,0x74,0x31,0x23,0x30,0x21,0x6,0x9,0x2a,0x86,0x48, - 0x86,0xf7,0xd,0x1,0x9,0x1,0x16,0x14,0x61,0x72,0x69,0x63,0x40,0x63,0x6f,0x64, - 0x65,0x77,0x65,0x61,0x76,0x65,0x72,0x73,0x2e,0x63,0x6f,0x6d,0x30,0x81,0x9f, - 0x30,0xd,0x6,0x9,0x2a,0x86,0x48,0x86,0xf7,0xd,0x1,0x1,0x1,0x5,0x0,0x3,0x81, - 0x8d,0x0,0x30,0x81,0x89,0x2,0x81,0x81,0x0,0x9b,0xb5,0x8f,0xaf,0xfb,0x9a,0xaf, - 0xdc,0xa2,0x4d,0xb1,0xc8,0x72,0x44,0xef,0x79,0x7f,0x28,0xb6,0xfe,0x50,0xdc, - 0x8a,0xf7,0x11,0x2f,0x90,0x70,0xed,0xa4,0xa9,0xd,0xbf,0x82,0x3e,0x56,0xd8, - 0x36,0xb6,0x9,0x52,0x83,0xab,0x65,0x95,0x0,0xe2,0xea,0x3c,0x4f,0x85,0xb8,0xc, - 0x41,0x42,0x77,0x5c,0x9d,0x44,0xeb,0xcf,0x7d,0x60,0x64,0x7a,0x6c,0x4c,0xac, - 0x4a,0x9a,0x23,0x25,0x15,0xd7,0x92,0xb4,0x10,0xe7,0x95,0xad,0x4b,0x93,0xda, - 0x6a,0x76,0xe0,0xa5,0xd2,0x13,0x8,0x12,0x30,0x68,0xde,0xb9,0x5b,0x6e,0x2a, - 0x97,0x43,0xaa,0x7b,0x22,0x33,0x34,0xb1,0xca,0x5d,0x19,0xd8,0x42,0x26,0x45, - 0xc6,0xe9,0x1d,0xee,0x7,0xc2,0x27,0x95,0x87,0xd8,0x12,0xec,0x4b,0x16,0x9f,0x2, - 0x3,0x1,0x0,0x1,0x30,0xd,0x6,0x9,0x2a,0x86,0x48,0x86,0xf7,0xd,0x1,0x1,0x4,0x5, - 0x0,0x3,0x81,0x81,0x0,0x96,0xf9,0xf6,0x6a,0x3d,0xd9,0xca,0x6e,0xd5,0x76,0x73, - 0xab,0x75,0xc1,0xcc,0x98,0x44,0xc3,0xa9,0x90,0x68,0x88,0x76,0xb9,0xeb,0xb6, - 0xbe,0x60,0x62,0xb9,0x67,0x1e,0xcc,0xf4,0xe1,0xe7,0x6c,0xc8,0x67,0x3f,0x1d, - 0xf3,0x68,0x86,0x30,0xee,0xaa,0x92,0x61,0x37,0xd7,0x82,0x90,0x28,0xaa,0x7a, - 0x18,0x88,0x60,0x14,0x88,0x75,0xc0,0x4a,0x4e,0x7d,0x48,0xe7,0x3,0xa6,0xfd, - 0xd7,0xce,0x3c,0xe5,0x9b,0xaf,0x2f,0xdc,0xbb,0x7c,0xbd,0x20,0x49,0xd9,0x68, - 0x37,0xeb,0x5d,0xbb,0xe2,0x6d,0x66,0xe3,0x11,0xc1,0xa7,0x88,0x49,0xc6,0x6f, - 0x65,0xd3,0xce,0xae,0x26,0x19,0x3,0x2e,0x4f,0x78,0xa5,0xa,0x97,0x7e,0x4f,0xc4, - 0x91,0x8a,0xf8,0x5,0xef,0x5b,0x3b,0x49,0xbf,0x5f,0x2b}; - -static char issuerStr[] = - "US, Minnesota, Minneapolis, CodeWeavers, Wine Development, localhost, aric@codeweavers.com"; -static char issuerStrSemicolon[] = - "US; Minnesota; Minneapolis; CodeWeavers; Wine Development; localhost; aric@codeweavers.com"; -static char issuerStrCRLF[] = - "US\r\nMinnesota\r\nMinneapolis\r\nCodeWeavers\r\nWine Development\r\nlocalhost\r\naric@codeweavers.com"; -static char subjectStr[] = - "2.5.4.6=US, 2.5.4.8=Minnesota, 2.5.4.7=Minneapolis, 2.5.4.10=CodeWeavers, 2.5.4.11=Wine Development, 2.5.4.3=localhost, 1.2.840.113549.1.9.1=aric@codeweavers.com"; -static char subjectStrSemicolon[] = - "2.5.4.6=US; 2.5.4.8=Minnesota; 2.5.4.7=Minneapolis; 2.5.4.10=CodeWeavers; 2.5.4.11=Wine Development; 2.5.4.3=localhost; 1.2.840.113549.1.9.1=aric@codeweavers.com"; -static char subjectStrCRLF[] = - "2.5.4.6=US\r\n2.5.4.8=Minnesota\r\n2.5.4.7=Minneapolis\r\n2.5.4.10=CodeWeavers\r\n2.5.4.11=Wine Development\r\n2.5.4.3=localhost\r\n1.2.840.113549.1.9.1=aric@codeweavers.com"; -static char x500SubjectStr[] = "C=US, S=Minnesota, L=Minneapolis, O=CodeWeavers, OU=Wine Development, CN=localhost, E=aric@codeweavers.com"; -static char x500SubjectStrSemicolonReverse[] = "E=aric@codeweavers.com; CN=localhost; OU=Wine Development; O=CodeWeavers; L=Minneapolis; S=Minnesota; C=US"; -static WCHAR issuerStrW[] = { - 'U','S',',',' ','M','i','n','n','e','s','o','t','a',',',' ','M','i','n','n', - 'e','a','p','o','l','i','s',',',' ','C','o','d','e','W','e','a','v','e','r', - 's',',',' ','W','i','n','e',' ','D','e','v','e','l','o','p','m','e','n','t', - ',',' ','l','o','c','a','l','h','o','s','t',',',' ','a','r','i','c','@','c', - 'o','d','e','w','e','a','v','e','r','s','.','c','o','m',0 }; -static WCHAR issuerStrSemicolonW[] = { - 'U','S',';',' ','M','i','n','n','e','s','o','t','a',';',' ','M','i','n','n', - 'e','a','p','o','l','i','s',';',' ','C','o','d','e','W','e','a','v','e','r', - 's',';',' ','W','i','n','e',' ','D','e','v','e','l','o','p','m','e','n','t', - ';',' ','l','o','c','a','l','h','o','s','t',';',' ','a','r','i','c','@','c', - 'o','d','e','w','e','a','v','e','r','s','.','c','o','m',0 }; -static WCHAR issuerStrCRLFW[] = { - 'U','S','\r','\n','M','i','n','n','e','s','o','t','a','\r','\n','M','i','n', - 'n','e','a','p','o','l','i','s','\r','\n','C','o','d','e','W','e','a','v','e', - 'r','s','\r','\n','W','i','n','e',' ','D','e','v','e','l','o','p','m','e','n', - 't','\r','\n','l','o','c','a','l','h','o','s','t','\r','\n','a','r','i','c', - '@','c','o','d','e','w','e','a','v','e','r','s','.','c','o','m',0 }; -static WCHAR subjectStrW[] = { - '2','.','5','.','4','.','6','=','U','S',',',' ','2','.','5','.','4','.','8', - '=','M','i','n','n','e','s','o','t','a',',',' ','2','.','5','.','4','.','7', - '=','M','i','n','n','e','a','p','o','l','i','s',',',' ','2','.','5','.','4', - '.','1','0','=','C','o','d','e','W','e','a','v','e','r','s',',',' ','2','.', - '5','.','4','.','1','1','=','W','i','n','e',' ','D','e','v','e','l','o','p', - 'm','e','n','t',',',' ','2','.','5','.','4','.','3','=','l','o','c','a','l', - 'h','o','s','t',',',' ','1','.','2','.','8','4','0','.','1','1','3','5','4', - '9','.','1','.','9','.','1','=','a','r','i','c','@','c','o','d','e','w','e', - 'a','v','e','r','s','.','c','o','m',0 }; -static WCHAR subjectStrSemicolonW[] = { - '2','.','5','.','4','.','6','=','U','S',';',' ','2','.','5','.','4','.','8', - '=','M','i','n','n','e','s','o','t','a',';',' ','2','.','5','.','4','.','7', - '=','M','i','n','n','e','a','p','o','l','i','s',';',' ','2','.','5','.','4', - '.','1','0','=','C','o','d','e','W','e','a','v','e','r','s',';',' ','2','.', - '5','.','4','.','1','1','=','W','i','n','e',' ','D','e','v','e','l','o','p', - 'm','e','n','t',';',' ','2','.','5','.','4','.','3','=','l','o','c','a','l', - 'h','o','s','t',';',' ','1','.','2','.','8','4','0','.','1','1','3','5','4', - '9','.','1','.','9','.','1','=','a','r','i','c','@','c','o','d','e','w','e', - 'a','v','e','r','s','.','c','o','m',0 }; -static WCHAR subjectStrCRLFW[] = { - '2','.','5','.','4','.','6','=','U','S','\r','\n','2','.','5','.','4','.','8', - '=','M','i','n','n','e','s','o','t','a','\r','\n','2','.','5','.','4','.','7', - '=','M','i','n','n','e','a','p','o','l','i','s','\r','\n','2','.','5','.','4', - '.','1','0','=','C','o','d','e','W','e','a','v','e','r','s','\r','\n','2','.', - '5','.','4','.','1','1','=','W','i','n','e',' ','D','e','v','e','l','o','p', - 'm','e','n','t','\r','\n','2','.','5','.','4','.','3','=','l','o','c','a','l', - 'h','o','s','t','\r','\n','1','.','2','.','8','4','0','.','1','1','3','5','4', - '9','.','1','.','9','.','1','=','a','r','i','c','@','c','o','d','e','w','e', - 'a','v','e','r','s','.','c','o','m',0 }; -static WCHAR x500SubjectStrSemicolonReverseW[] = { - 'E','=','a','r','i','c','@','c','o','d','e','w','e','a','v','e','r','s','.','c', - 'o','m',';',' ','C','N','=','l','o','c','a','l','h','o','s','t',';',' ','O','U', - '=','W','i','n','e',' ','D','e','v','e','l','o','p','m','e','n','t',';',' ','O', - '=','C','o','d','e','W','e','a','v','e','r','s',';',' ','L','=','M','i','n','n', - 'e','a','p','o','l','i','s',';',' ','S','=','M','i','n','n','e','s','o','t','a', - ';',' ','C','=','U','S',0 }; - -typedef BOOL (WINAPI *CryptDecodeObjectFunc)(DWORD, LPCSTR, const BYTE *, - DWORD, DWORD, void *, DWORD *); -typedef DWORD (WINAPI *CertNameToStrAFunc)(DWORD,LPVOID,DWORD,LPSTR,DWORD); -typedef DWORD (WINAPI *CertNameToStrWFunc)(DWORD,LPVOID,DWORD,LPWSTR,DWORD); -typedef DWORD (WINAPI *CertRDNValueToStrAFunc)(DWORD, PCERT_RDN_VALUE_BLOB, - LPSTR, DWORD); -typedef DWORD (WINAPI *CertRDNValueToStrWFunc)(DWORD, PCERT_RDN_VALUE_BLOB, - LPWSTR, DWORD); -typedef BOOL (WINAPI *CertStrToNameAFunc)(DWORD dwCertEncodingType, - LPCSTR pszX500, DWORD dwStrType, void *pvReserved, BYTE *pbEncoded, - DWORD *pcbEncoded, LPCSTR *ppszError); -typedef BOOL (WINAPI *CertStrToNameWFunc)(DWORD dwCertEncodingType, - LPCWSTR pszX500, DWORD dwStrType, void *pvReserved, BYTE *pbEncoded, - DWORD *pcbEncoded, LPCWSTR *ppszError); - -HMODULE dll; -static CertNameToStrAFunc pCertNameToStrA; -static CertNameToStrWFunc pCertNameToStrW; -static CryptDecodeObjectFunc pCryptDecodeObject; -static CertRDNValueToStrAFunc pCertRDNValueToStrA; -static CertRDNValueToStrWFunc pCertRDNValueToStrW; -static CertStrToNameAFunc pCertStrToNameA; -static CertStrToNameWFunc pCertStrToNameW; - -static void test_CertRDNValueToStrA(void) -{ - CertRDNAttrEncoding attrs[] = { - { "2.5.4.6", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin1), bin1 }, "US" }, - { "2.5.4.8", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin2), bin2 }, "Minnesota" }, - { "2.5.4.7", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin3), bin3 }, "Minneapolis" }, - { "2.5.4.10", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin4), bin4 }, "CodeWeavers" }, - { "2.5.4.11", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin5), bin5 }, "Wine Development" }, - { "2.5.4.3", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin6), bin6 }, "localhost" }, - { "1.2.840.113549.1.9.1", CERT_RDN_IA5_STRING, - { sizeof(bin7), bin7 }, "aric@codeweavers.com" }, - }; - DWORD i, ret; - char buffer[2000]; - CERT_RDN_VALUE_BLOB blob = { 0, NULL }; - - if (!pCertRDNValueToStrA) return; - - /* This crashes - ret = pCertRDNValueToStrA(0, NULL, NULL, 0); - */ - /* With empty input, it generates the empty string */ - SetLastError(0xdeadbeef); - ret = pCertRDNValueToStrA(0, &blob, NULL, 0); - ok(ret == 1 && GetLastError() == 0xdeadbeef, "Expected empty string\n"); - ret = pCertRDNValueToStrA(0, &blob, buffer, sizeof(buffer)); - ok(ret == 1 && GetLastError() == 0xdeadbeef, "Expected empty string\n"); - ok(!buffer[0], "Expected empty string\n"); - - for (i = 0; i < sizeof(attrs) / sizeof(attrs[0]); i++) - { - ret = pCertRDNValueToStrA(attrs[i].dwValueType, &attrs[i].Value, - buffer, sizeof(buffer)); - ok(ret == strlen(attrs[i].str) + 1, "Expected length %d, got %d\n", - lstrlenA(attrs[i].str) + 1, ret); - ok(!strcmp(buffer, attrs[i].str), "Expected %s, got %s\n", attrs[i].str, - buffer); - } -} - -static void test_CertRDNValueToStrW(void) -{ - static const WCHAR usW[] = { 'U','S',0 }; - static const WCHAR minnesotaW[] = { 'M','i','n','n','e','s','o','t','a',0 }; - static const WCHAR minneapolisW[] = { 'M','i','n','n','e','a','p','o','l', - 'i','s',0 }; - static const WCHAR codeweaversW[] = { 'C','o','d','e','W','e','a','v','e', - 'r','s',0 }; - static const WCHAR wineDevW[] = { 'W','i','n','e',' ','D','e','v','e','l', - 'o','p','m','e','n','t',0 }; - static const WCHAR localhostW[] = { 'l','o','c','a','l','h','o','s','t',0 }; - static const WCHAR aricW[] = { 'a','r','i','c','@','c','o','d','e','w','e', - 'a','v','e','r','s','.','c','o','m',0 }; - CertRDNAttrEncodingW attrs[] = { - { "2.5.4.6", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin1), bin1 }, usW }, - { "2.5.4.8", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin2), bin2 }, minnesotaW }, - { "2.5.4.7", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin3), bin3 }, minneapolisW }, - { "2.5.4.10", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin4), bin4 }, codeweaversW }, - { "2.5.4.11", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin5), bin5 }, wineDevW }, - { "2.5.4.3", CERT_RDN_PRINTABLE_STRING, - { sizeof(bin6), bin6 }, localhostW }, - { "1.2.840.113549.1.9.1", CERT_RDN_IA5_STRING, - { sizeof(bin7), bin7 }, aricW }, - }; - DWORD i, ret; - WCHAR buffer[2000]; - CERT_RDN_VALUE_BLOB blob = { 0, NULL }; - - if (!pCertRDNValueToStrW) - { - win_skip("CertRDNValueToStrW is not available\n"); - return; - } - - /* This crashes - ret = pCertRDNValueToStrW(0, NULL, NULL, 0); - */ - /* With empty input, it generates the empty string */ - SetLastError(0xdeadbeef); - ret = pCertRDNValueToStrW(0, &blob, NULL, 0); - ok(ret == 1 && GetLastError() == 0xdeadbeef, "Expected empty string\n"); - ret = pCertRDNValueToStrW(0, &blob, buffer, - sizeof(buffer) / sizeof(buffer[0])); - ok(ret == 1 && GetLastError() == 0xdeadbeef, "Expected empty string\n"); - ok(!buffer[0], "Expected empty string\n"); - - for (i = 0; i < sizeof(attrs) / sizeof(attrs[0]); i++) - { - ret = pCertRDNValueToStrW(attrs[i].dwValueType, &attrs[i].Value, - buffer, sizeof(buffer) / sizeof(buffer[0])); - ok(ret == lstrlenW(attrs[i].str) + 1, "Expected length %d, got %d\n", - lstrlenW(attrs[i].str) + 1, ret); - ok(!lstrcmpW(buffer, attrs[i].str), "Unexpected value\n"); -#ifdef DUMP_STRINGS - trace("Expected %s, got %s\n", - wine_dbgstr_w(attrs[i].str), wine_dbgstr_w(buffer)); -#endif - } -} - -static void test_NameToStrConversionA(PCERT_NAME_BLOB pName, DWORD dwStrType, - LPCSTR expected) -{ - char buffer[2000] = { 0 }; - DWORD i; - - i = pCertNameToStrA(X509_ASN_ENCODING, pName, dwStrType, NULL, 0); - ok(i == strlen(expected) + 1, "Expected %d chars, got %d\n", - lstrlenA(expected) + 1, i); - i = pCertNameToStrA(X509_ASN_ENCODING,pName, dwStrType, buffer, - sizeof(buffer)); - ok(i == strlen(expected) + 1, "Expected %d chars, got %d\n", - lstrlenA(expected) + 1, i); - ok(!strcmp(buffer, expected), "Expected %s, got %s\n", expected, buffer); -} - -static void test_CertNameToStrA(void) -{ - PCCERT_CONTEXT context; - - if (!pCertNameToStrA) - { - win_skip("CertNameToStrA is not available\n"); - return; - } - - context = CertCreateCertificateContext(X509_ASN_ENCODING, cert, - sizeof(cert)); - ok(context != NULL, "CertCreateCertificateContext failed: %08x\n", - GetLastError()); - if (context) - { - DWORD ret; - - /* This crashes - ret = pCertNameToStrA(0, NULL, 0, NULL, 0); - */ - /* Test with a bogus encoding type */ - SetLastError(0xdeadbeef); - ret = pCertNameToStrA(0, &context->pCertInfo->Issuer, 0, NULL, 0); - ok(ret == 1 && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected retval 1 and ERROR_FILE_NOT_FOUND, got %d - %08x\n", - ret, GetLastError()); - SetLastError(0xdeadbeef); - ret = pCertNameToStrA(X509_ASN_ENCODING, &context->pCertInfo->Issuer, - 0, NULL, 0); - ok(ret && GetLastError() == ERROR_SUCCESS, - "Expected positive return and ERROR_SUCCESS, got %d - %08x\n", - ret, GetLastError()); - - test_NameToStrConversionA(&context->pCertInfo->Issuer, - CERT_SIMPLE_NAME_STR, issuerStr); - test_NameToStrConversionA(&context->pCertInfo->Issuer, - CERT_SIMPLE_NAME_STR | CERT_NAME_STR_SEMICOLON_FLAG, - issuerStrSemicolon); - test_NameToStrConversionA(&context->pCertInfo->Issuer, - CERT_SIMPLE_NAME_STR | CERT_NAME_STR_CRLF_FLAG, - issuerStrCRLF); - test_NameToStrConversionA(&context->pCertInfo->Subject, - CERT_OID_NAME_STR, subjectStr); - test_NameToStrConversionA(&context->pCertInfo->Subject, - CERT_OID_NAME_STR | CERT_NAME_STR_SEMICOLON_FLAG, - subjectStrSemicolon); - test_NameToStrConversionA(&context->pCertInfo->Subject, - CERT_OID_NAME_STR | CERT_NAME_STR_CRLF_FLAG, - subjectStrCRLF); - test_NameToStrConversionA(&context->pCertInfo->Subject, - CERT_X500_NAME_STR, x500SubjectStr); - test_NameToStrConversionA(&context->pCertInfo->Subject, - CERT_X500_NAME_STR | CERT_NAME_STR_SEMICOLON_FLAG | CERT_NAME_STR_REVERSE_FLAG, x500SubjectStrSemicolonReverse); - - CertFreeCertificateContext(context); - } -} - -static void test_NameToStrConversionW(PCERT_NAME_BLOB pName, DWORD dwStrType, - LPCWSTR expected) -{ - WCHAR buffer[2000] = { 0 }; - DWORD i; - - i = pCertNameToStrW(X509_ASN_ENCODING,pName, dwStrType, NULL, 0); - ok(i == lstrlenW(expected) + 1, "Expected %d chars, got %d\n", - lstrlenW(expected) + 1, i); - i = pCertNameToStrW(X509_ASN_ENCODING,pName, dwStrType, buffer, - sizeof(buffer) / sizeof(buffer[0])); - ok(i == lstrlenW(expected) + 1, "Expected %d chars, got %d\n", - lstrlenW(expected) + 1, i); - ok(!lstrcmpW(buffer, expected), "Unexpected value\n"); -#ifdef DUMP_STRINGS - trace("Expected %s, got %s\n", - wine_dbgstr_w(expected), wine_dbgstr_w(buffer)); -#endif -} - -static void test_CertNameToStrW(void) -{ - PCCERT_CONTEXT context; - - if (!pCertNameToStrW) - { - win_skip("CertNameToStrW is not available\n"); - return; - } - - context = CertCreateCertificateContext(X509_ASN_ENCODING, cert, - sizeof(cert)); - ok(context != NULL, "CertCreateCertificateContext failed: %08x\n", - GetLastError()); - if (context) - { - DWORD ret; - - /* This crashes - ret = pCertNameToStrW(0, NULL, 0, NULL, 0); - */ - /* Test with a bogus encoding type */ - SetLastError(0xdeadbeef); - ret = pCertNameToStrW(0, &context->pCertInfo->Issuer, 0, NULL, 0); - ok(ret == 1 && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected retval 1 and ERROR_FILE_NOT_FOUND, got %d - %08x\n", - ret, GetLastError()); - SetLastError(0xdeadbeef); - ret = pCertNameToStrW(X509_ASN_ENCODING, &context->pCertInfo->Issuer, - 0, NULL, 0); - ok(ret && GetLastError() == ERROR_SUCCESS, - "Expected positive return and ERROR_SUCCESS, got %d - %08x\n", - ret, GetLastError()); - - test_NameToStrConversionW(&context->pCertInfo->Issuer, - CERT_SIMPLE_NAME_STR, issuerStrW); - test_NameToStrConversionW(&context->pCertInfo->Issuer, - CERT_SIMPLE_NAME_STR | CERT_NAME_STR_SEMICOLON_FLAG, - issuerStrSemicolonW); - test_NameToStrConversionW(&context->pCertInfo->Issuer, - CERT_SIMPLE_NAME_STR | CERT_NAME_STR_CRLF_FLAG, - issuerStrCRLFW); - test_NameToStrConversionW(&context->pCertInfo->Subject, - CERT_OID_NAME_STR, subjectStrW); - test_NameToStrConversionW(&context->pCertInfo->Subject, - CERT_OID_NAME_STR | CERT_NAME_STR_SEMICOLON_FLAG, - subjectStrSemicolonW); - test_NameToStrConversionW(&context->pCertInfo->Subject, - CERT_OID_NAME_STR | CERT_NAME_STR_CRLF_FLAG, - subjectStrCRLFW); - test_NameToStrConversionW(&context->pCertInfo->Subject, - CERT_X500_NAME_STR | CERT_NAME_STR_SEMICOLON_FLAG | CERT_NAME_STR_REVERSE_FLAG, x500SubjectStrSemicolonReverseW); - - CertFreeCertificateContext(context); - } -} - -struct StrToNameA -{ - LPCSTR x500; - DWORD encodedSize; - const BYTE *encoded; -}; - -const BYTE encodedSimpleCN[] = { -0x30,0x0c,0x31,0x0a,0x30,0x08,0x06,0x03,0x55,0x04,0x03,0x13,0x01,0x31 }; -static const BYTE encodedSingleQuotedCN[] = { 0x30,0x0e,0x31,0x0c,0x30,0x0a, - 0x06,0x03,0x55,0x04,0x03,0x13,0x03,0x27,0x31,0x27 }; -static const BYTE encodedSpacedCN[] = { 0x30,0x0e,0x31,0x0c,0x30,0x0a,0x06,0x03, - 0x55,0x04,0x03,0x13,0x03,0x20,0x31,0x20 }; -static const BYTE encodedQuotedCN[] = { 0x30,0x11,0x31,0x0f,0x30,0x0d,0x06,0x03, - 0x55, 0x04,0x03,0x1e,0x06,0x00,0x22,0x00,0x31,0x00,0x22, }; -static const BYTE encodedMultipleAttrCN[] = { 0x30,0x0e,0x31,0x0c,0x30,0x0a, - 0x06,0x03,0x55,0x04,0x03,0x13,0x03,0x31,0x2b,0x32 }; - -struct StrToNameA namesA[] = { - { "CN=1", sizeof(encodedSimpleCN), encodedSimpleCN }, - { "CN=\"1\"", sizeof(encodedSimpleCN), encodedSimpleCN }, - { "CN = \"1\"", sizeof(encodedSimpleCN), encodedSimpleCN }, - { "CN='1'", sizeof(encodedSingleQuotedCN), encodedSingleQuotedCN }, - { "CN=\" 1 \"", sizeof(encodedSpacedCN), encodedSpacedCN }, - { "CN=\"\"\"1\"\"\"", sizeof(encodedQuotedCN), encodedQuotedCN }, - { "CN=\"1+2\"", sizeof(encodedMultipleAttrCN), encodedMultipleAttrCN }, -}; - -static void test_CertStrToNameA(void) -{ - BOOL ret; - DWORD size, i; - BYTE buf[100]; - - if (!pCertStrToNameA) - { - win_skip("CertStrToNameA is not available\n"); - return; - } - - /* Crash - ret = pCertStrToNameA(0, NULL, 0, NULL, NULL, NULL, NULL); - */ - ret = pCertStrToNameA(0, NULL, 0, NULL, NULL, &size, NULL); - ok(!ret, "Expected failure\n"); - ret = pCertStrToNameA(0, "bogus", 0, NULL, NULL, &size, NULL); - ok(!ret && GetLastError() == CRYPT_E_INVALID_X500_STRING, - "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError()); - ret = pCertStrToNameA(0, "foo=1", 0, NULL, NULL, &size, NULL); - ok(!ret && GetLastError() == CRYPT_E_INVALID_X500_STRING, - "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError()); - ret = pCertStrToNameA(0, "CN=1", 0, NULL, NULL, &size, NULL); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - ret = pCertStrToNameA(X509_ASN_ENCODING, "CN=1", 0, NULL, NULL, &size, NULL); - ok(ret, "CertStrToNameA failed: %08x\n", GetLastError()); - size = sizeof(buf); - ret = pCertStrToNameA(X509_ASN_ENCODING, "CN=\"\"1\"\"", 0, NULL, buf, &size, - NULL); - ok(!ret && GetLastError() == CRYPT_E_INVALID_X500_STRING, - "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError()); - ret = pCertStrToNameA(X509_ASN_ENCODING, "CN=1+2", 0, NULL, buf, - &size, NULL); - todo_wine ok(!ret && GetLastError() == CRYPT_E_INVALID_X500_STRING, - "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError()); - for (i = 0; i < sizeof(namesA) / sizeof(namesA[0]); i++) - { - size = sizeof(buf); - ret = pCertStrToNameA(X509_ASN_ENCODING, namesA[i].x500, 0, NULL, buf, - &size, NULL); - ok(ret, "CertStrToNameA failed on string %s: %08x\n", namesA[i].x500, - GetLastError()); - ok(size == namesA[i].encodedSize, - "Expected size %d, got %d\n", namesA[i].encodedSize, size); - if (ret) - ok(!memcmp(buf, namesA[i].encoded, namesA[i].encodedSize), - "Unexpected value for string %s\n", namesA[i].x500); - } -} - -struct StrToNameW -{ - LPCWSTR x500; - DWORD encodedSize; - const BYTE *encoded; -}; - -static const WCHAR badlyQuotedCN_W[] = { 'C','N','=','"','"','1','"','"',0 }; -static const WCHAR simpleCN_W[] = { 'C','N','=','1',0 }; -static const WCHAR simpleCN2_W[] = { 'C','N','=','"','1','"',0 }; -static const WCHAR simpleCN3_W[] = { 'C','N',' ','=',' ','"','1','"',0 }; -static const WCHAR singledQuotedCN_W[] = { 'C','N','=','\'','1','\'',0 }; -static const WCHAR spacedCN_W[] = { 'C','N','=','"',' ','1',' ','"',0 }; -static const WCHAR quotedCN_W[] = { 'C','N','=','"','"','"','1','"','"','"',0 }; -static const WCHAR multipleAttrCN_W[] = { 'C','N','=','"','1','+','2','"',0 }; -static const WCHAR japaneseCN_W[] = { 'C','N','=',0x226f,0x575b,0 }; -static const BYTE encodedJapaneseCN[] = { 0x30,0x0f,0x31,0x0d,0x30,0x0b,0x06, - 0x03,0x55,0x04,0x03,0x1e,0x04,0x22,0x6f,0x57,0x5b }; - -struct StrToNameW namesW[] = { - { simpleCN_W, sizeof(encodedSimpleCN), encodedSimpleCN }, - { simpleCN2_W, sizeof(encodedSimpleCN), encodedSimpleCN }, - { simpleCN3_W, sizeof(encodedSimpleCN), encodedSimpleCN }, - { singledQuotedCN_W, sizeof(encodedSingleQuotedCN), encodedSingleQuotedCN }, - { spacedCN_W, sizeof(encodedSpacedCN), encodedSpacedCN }, - { quotedCN_W, sizeof(encodedQuotedCN), encodedQuotedCN }, - { multipleAttrCN_W, sizeof(encodedMultipleAttrCN), encodedMultipleAttrCN }, - { japaneseCN_W, sizeof(encodedJapaneseCN), encodedJapaneseCN }, -}; - -static void test_CertStrToNameW(void) -{ - static const WCHAR bogusW[] = { 'b','o','g','u','s',0 }; - static const WCHAR fooW[] = { 'f','o','o','=','1',0 }; - BOOL ret; - DWORD size, i; - LPCWSTR errorPtr; - BYTE buf[100]; - - if (!pCertStrToNameW) - { - win_skip("CertStrToNameW is not available\n"); - return; - } - - /* Crash - ret = pCertStrToNameW(0, NULL, 0, NULL, NULL, NULL, NULL); - */ - ret = pCertStrToNameW(0, NULL, 0, NULL, NULL, &size, NULL); - ok(!ret, "Expected failure\n"); - ret = pCertStrToNameW(0, bogusW, 0, NULL, NULL, &size, NULL); - ok(!ret && GetLastError() == CRYPT_E_INVALID_X500_STRING, - "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError()); - ret = pCertStrToNameW(0, fooW, 0, NULL, NULL, &size, NULL); - ok(!ret && GetLastError() == CRYPT_E_INVALID_X500_STRING, - "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError()); - ret = pCertStrToNameW(0, simpleCN_W, 0, NULL, NULL, &size, NULL); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - ret = pCertStrToNameW(X509_ASN_ENCODING, simpleCN_W, 0, NULL, NULL, &size, - NULL); - ok(ret, "CertStrToNameW failed: %08x\n", GetLastError()); - size = sizeof(buf); - ret = pCertStrToNameW(X509_ASN_ENCODING, badlyQuotedCN_W, 0, NULL, buf, - &size, NULL); - ok(!ret && GetLastError() == CRYPT_E_INVALID_X500_STRING, - "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError()); - ret = pCertStrToNameW(X509_ASN_ENCODING, badlyQuotedCN_W, 0, NULL, buf, - &size, &errorPtr); - ok(!ret && GetLastError() == CRYPT_E_INVALID_X500_STRING, - "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n", GetLastError()); - ok(errorPtr && *errorPtr == '1', "Expected first error character was 1\n"); - for (i = 0; i < sizeof(namesW) / sizeof(namesW[0]); i++) - { - size = sizeof(buf); - ret = pCertStrToNameW(X509_ASN_ENCODING, namesW[i].x500, 0, NULL, buf, - &size, NULL); - ok(ret, "Index %d: CertStrToNameW failed: %08x\n", i, GetLastError()); - ok(size == namesW[i].encodedSize, - "Index %d: expected size %d, got %d\n", i, namesW[i].encodedSize, - size); - if (ret) - ok(!memcmp(buf, namesW[i].encoded, size), - "Index %d: unexpected value\n", i); - } -} - -START_TEST(str) -{ - dll = GetModuleHandleA("Crypt32.dll"); - - pCertNameToStrA = (CertNameToStrAFunc)GetProcAddress(dll,"CertNameToStrA"); - pCertNameToStrW = (CertNameToStrWFunc)GetProcAddress(dll,"CertNameToStrW"); - pCertRDNValueToStrA = (CertRDNValueToStrAFunc)GetProcAddress(dll, - "CertRDNValueToStrA"); - pCertRDNValueToStrW = (CertRDNValueToStrWFunc)GetProcAddress(dll, - "CertRDNValueToStrW"); - pCryptDecodeObject = (CryptDecodeObjectFunc)GetProcAddress(dll, - "CryptDecodeObject"); - pCertStrToNameA = (CertStrToNameAFunc)GetProcAddress(dll,"CertStrToNameA"); - pCertStrToNameW = (CertStrToNameWFunc)GetProcAddress(dll,"CertStrToNameW"); - - test_CertRDNValueToStrA(); - test_CertRDNValueToStrW(); - test_CertNameToStrA(); - test_CertNameToStrW(); - test_CertStrToNameA(); - test_CertStrToNameW(); -} diff --git a/rostests/winetests/crypt32/testlist.c b/rostests/winetests/crypt32/testlist.c deleted file mode 100644 index 7486cad4546..00000000000 --- a/rostests/winetests/crypt32/testlist.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_base64(void); -extern void func_cert(void); -extern void func_chain(void); -extern void func_crl(void); -extern void func_ctl(void); -extern void func_encode(void); -extern void func_main(void); -extern void func_message(void); -extern void func_msg(void); -extern void func_object(void); -extern void func_oid(void); -extern void func_protectdata(void); -extern void func_sip(void); -extern void func_store(void); -extern void func_str(void); - -const struct test winetest_testlist[] = -{ - { "base64", func_base64 }, - { "cert", func_cert }, - { "chain", func_chain }, - { "crl", func_crl }, - { "ctl", func_ctl }, - { "encode", func_encode }, - { "main", func_main }, - { "message", func_message }, - { "msg", func_msg }, - { "object", func_object }, - { "oid", func_oid }, - { "protectdata", func_protectdata }, - { "sip", func_sip }, - { "store", func_store }, - { "str", func_str }, - { 0, 0 } -}; diff --git a/rostests/winetests/cryptnet/CMakeLists.txt b/rostests/winetests/cryptnet/CMakeLists.txt deleted file mode 100644 index e9f934b53c4..00000000000 --- a/rostests/winetests/cryptnet/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(cryptnet_winetest cryptnet.c testlist.c) -target_link_libraries(cryptnet_winetest wine) -set_module_type(cryptnet_winetest win32cui) -add_importlibs(cryptnet_winetest cryptnet crypt32 msvcrt kernel32 ntdll) -add_cd_file(TARGET cryptnet_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/cryptnet/cryptnet.c b/rostests/winetests/cryptnet/cryptnet.c deleted file mode 100644 index 1cdafa4811c..00000000000 --- a/rostests/winetests/cryptnet/cryptnet.c +++ /dev/null @@ -1,691 +0,0 @@ -/* - * Unit test suite for cryptnet.dll - * - * Copyright 2007 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 - */ -#include -#include -#define NONAMELESSUNION -#include -#include -#include -#include -#include "wine/test.h" - -static const BYTE bigCert[] = { -0x30,0x78,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x14,0x31,0x12,0x30,0x10, -0x06,0x03,0x55,0x04,0x03,0x13,0x09,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30, -0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31, -0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x14,0x31,0x12,0x30,0x10,0x06,0x03, -0x55,0x04,0x03,0x13,0x09,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x30, -0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00,0xa3,0x16,0x30,0x14,0x30,0x12,0x06, -0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02, -0x01,0x01}; -static const BYTE certWithIssuingDistPoint[] = { -0x30,0x81,0x99,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,0x01,0x30,0x0d,0x06,0x09, -0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x30,0x14,0x31,0x12, -0x30,0x10,0x06,0x03,0x55,0x04,0x03,0x13,0x09,0x4a,0x75,0x61,0x6e,0x20,0x4c, -0x61,0x6e,0x67,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31, -0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31, -0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x14,0x31,0x12,0x30,0x10, -0x06,0x03,0x55,0x04,0x03,0x13,0x09,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00,0xa3,0x27,0x30,0x25,0x30, -0x23,0x06,0x03,0x55,0x1d,0x1c,0x01,0x01,0xff,0x04,0x19,0x30,0x17,0xa0,0x15, -0xa0,0x13,0x86,0x11,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x69,0x6e,0x65, -0x68,0x71,0x2e,0x6f,0x72,0x67, }; -static const BYTE certWithCRLDistPoint[] = { -0x30,0x81,0x9b,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,0x01,0x30,0x0d,0x06,0x09, -0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x30,0x14,0x31,0x12, -0x30,0x10,0x06,0x03,0x55,0x04,0x03,0x13,0x09,0x4a,0x75,0x61,0x6e,0x20,0x4c, -0x61,0x6e,0x67,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31, -0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31, -0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x14,0x31,0x12,0x30,0x10, -0x06,0x03,0x55,0x04,0x03,0x13,0x09,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00,0xa3,0x29,0x30,0x27,0x30, -0x25,0x06,0x03,0x55,0x1d,0x1f,0x01,0x01,0xff,0x04,0x1b,0x30,0x19,0x30,0x17, -0xa0,0x15,0xa0,0x13,0x86,0x11,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x69, -0x6e,0x65,0x68,0x71,0x2e,0x6f,0x72,0x67, }; -static const BYTE certWithAIAWithCAIssuers[] = { -0x30,0x82,0x01,0x3c,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,0x01,0x30,0x0b,0x06, -0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30,0x14,0x31,0x12,0x30, -0x10,0x06,0x03,0x55,0x04,0x03,0x13,0x09,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61, -0x6e,0x67,0x30,0x1e,0x17,0x0d,0x30,0x39,0x31,0x30,0x32,0x38,0x30,0x30,0x30, -0x30,0x30,0x30,0x5a,0x17,0x0d,0x32,0x30,0x31,0x31,0x32,0x37,0x30,0x30,0x30, -0x30,0x30,0x30,0x5a,0x30,0x14,0x31,0x12,0x30,0x10,0x06,0x03,0x55,0x04,0x03, -0x13,0x09,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x30,0x81,0xa5,0x30, -0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x95, -0x00,0x06,0x02,0x00,0x00,0x00,0x24,0x00,0x00,0x52,0x53,0x41,0x31,0x00,0x04, -0x00,0x00,0x01,0x00,0x01,0x00,0x2f,0xb2,0x8c,0xff,0x6c,0xf1,0xb1,0x61,0x9c, -0x3a,0x8f,0x5e,0x35,0x2f,0x1f,0xd5,0xcf,0x2a,0xf6,0x9e,0x37,0xe8,0x89,0xa2, -0xb1,0x1c,0xc0,0x1c,0xb6,0x72,0x45,0x97,0xe5,0x88,0x3d,0xfe,0xa6,0x27,0xea, -0xd6,0x07,0x0f,0xcd,0xba,0x49,0x06,0x16,0xdb,0xad,0x06,0x76,0x39,0x4c,0x15, -0xdf,0xe2,0x07,0xc5,0x99,0x1b,0x98,0x4b,0xc3,0x8e,0x89,0x12,0x95,0x9e,0x3b, -0xb9,0x59,0xfe,0x91,0x33,0xc1,0x1f,0xce,0x8f,0xab,0x93,0x25,0x01,0x3e,0xde, -0xf1,0x58,0x3b,0xe7,0x7a,0x03,0x14,0x07,0x09,0x0a,0x21,0x2d,0x12,0x11,0x08, -0x78,0x07,0x9e,0x34,0xc3,0xc5,0xde,0xb2,0xd8,0xd7,0x86,0x0d,0x0d,0xcd,0x81, -0xa4,0x2d,0x7c,0x82,0x50,0xca,0x2a,0xc2,0x99,0xe5,0xf3,0xca,0x7e,0xad,0xa3, -0x31,0x30,0x2f,0x30,0x2d,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x01,0x01, -0x04,0x21,0x30,0x1f,0x30,0x1d,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x30, -0x02,0x86,0x11,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x69,0x6e,0x65,0x68, -0x71,0x2e,0x6f,0x72,0x67 }; - -static void compareUrlArray(const CRYPT_URL_ARRAY *expected, - const CRYPT_URL_ARRAY *got) -{ - ok(expected->cUrl == got->cUrl, "Expected %d URLs, got %d\n", - expected->cUrl, got->cUrl); - if (expected->cUrl == got->cUrl) - { - DWORD i; - - for (i = 0; i < got->cUrl; i++) - ok(!lstrcmpiW(expected->rgwszUrl[i], got->rgwszUrl[i]), - "%d: unexpected URL\n", i); - } -} - -static WCHAR url[] = - { 'h','t','t','p',':','/','/','w','i','n','e','h','q','.','o','r','g',0 }; - -static void test_getObjectUrl(void) -{ - BOOL ret; - DWORD urlArraySize = 0, infoSize = 0; - PCCERT_CONTEXT cert; - - SetLastError(0xdeadbeef); - ret = CryptGetObjectUrl(NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - /* Crash - ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, NULL, 0, NULL, NULL, - NULL, NULL, NULL); - ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, NULL, 0, NULL, NULL, - NULL, &infoSize, NULL); - ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, NULL, 0, NULL, - &urlArraySize, NULL, &infoSize, NULL); - */ - /* A cert with no CRL dist point extension fails.. */ - cert = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, - sizeof(bigCert)); - SetLastError(0xdeadbeef); - ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, (void *)cert, 0, NULL, - NULL, NULL, NULL, NULL); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - CertFreeCertificateContext(cert); - - cert = CertCreateCertificateContext(X509_ASN_ENCODING, - certWithIssuingDistPoint, sizeof(certWithIssuingDistPoint)); - if (cert) - { - /* This cert has no AIA extension, so expect this to fail */ - SetLastError(0xdeadbeef); - ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, (void *)cert, 0, - NULL, NULL, NULL, NULL, NULL); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, (void *)cert, - CRYPT_GET_URL_FROM_PROPERTY, NULL, NULL, NULL, NULL, NULL); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, (void *)cert, - CRYPT_GET_URL_FROM_EXTENSION, NULL, NULL, NULL, NULL, NULL); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - /* It does have an issuing dist point extension, but that's not what - * this is looking for (it wants a CRL dist points extension) - */ - SetLastError(0xdeadbeef); - ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, - (void *)cert, 0, NULL, NULL, NULL, NULL, NULL); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, - (void *)cert, CRYPT_GET_URL_FROM_PROPERTY, NULL, NULL, NULL, NULL, - NULL); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, - (void *)cert, CRYPT_GET_URL_FROM_EXTENSION, NULL, NULL, NULL, NULL, - NULL); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - CertFreeCertificateContext(cert); - } - cert = CertCreateCertificateContext(X509_ASN_ENCODING, - certWithCRLDistPoint, sizeof(certWithCRLDistPoint)); - if (cert) - { - PCRYPT_URL_ARRAY urlArray; - - /* This cert has no AIA extension, so expect this to fail */ - SetLastError(0xdeadbeef); - ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, (void *)cert, 0, - NULL, NULL, NULL, NULL, NULL); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, (void *)cert, - CRYPT_GET_URL_FROM_PROPERTY, NULL, NULL, NULL, NULL, NULL); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, (void *)cert, - CRYPT_GET_URL_FROM_EXTENSION, NULL, NULL, NULL, NULL, NULL); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - /* It does have a CRL dist points extension */ - SetLastError(0xdeadbeef); - ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, - (void *)cert, 0, NULL, NULL, NULL, NULL, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, - (void *)cert, 0, NULL, NULL, NULL, &infoSize, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "Expected E_INVALIDARG, got %08x\n", GetLastError()); - /* Can get it without specifying the location: */ - ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, - (void *)cert, 0, NULL, &urlArraySize, NULL, NULL, NULL); - ok(ret, "CryptGetObjectUrl failed: %08x\n", GetLastError()); - urlArray = HeapAlloc(GetProcessHeap(), 0, urlArraySize); - if (urlArray) - { - ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, - (void *)cert, 0, urlArray, &urlArraySize, NULL, NULL, NULL); - ok(ret, "CryptGetObjectUrl failed: %08x\n", GetLastError()); - if (ret) - { - LPWSTR pUrl = url; - CRYPT_URL_ARRAY expectedUrl = { 1, &pUrl }; - - compareUrlArray(&expectedUrl, urlArray); - } - HeapFree(GetProcessHeap(), 0, urlArray); - } - /* or by specifying it's an extension: */ - ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, - (void *)cert, CRYPT_GET_URL_FROM_EXTENSION, NULL, &urlArraySize, NULL, - NULL, NULL); - ok(ret, "CryptGetObjectUrl failed: %08x\n", GetLastError()); - urlArray = HeapAlloc(GetProcessHeap(), 0, urlArraySize); - if (urlArray) - { - ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, - (void *)cert, CRYPT_GET_URL_FROM_EXTENSION, urlArray, - &urlArraySize, NULL, NULL, NULL); - ok(ret, "CryptGetObjectUrl failed: %08x\n", GetLastError()); - if (ret) - { - LPWSTR pUrl = url; - CRYPT_URL_ARRAY expectedUrl = { 1, &pUrl }; - - compareUrlArray(&expectedUrl, urlArray); - } - HeapFree(GetProcessHeap(), 0, urlArray); - } - /* but it isn't contained in a property: */ - SetLastError(0xdeadbeef); - ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, - (void *)cert, CRYPT_GET_URL_FROM_PROPERTY, NULL, &urlArraySize, NULL, - NULL, NULL); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - CertFreeCertificateContext(cert); - } - cert = CertCreateCertificateContext(X509_ASN_ENCODING, - certWithAIAWithCAIssuers, sizeof(certWithAIAWithCAIssuers)); - if (cert) - { - PCRYPT_URL_ARRAY urlArray; - - /* This has an AIA extension with the CA Issuers set, so expect it - * to succeed: - */ - ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, - (void *)cert, 0, NULL, &urlArraySize, NULL, NULL, NULL); - ok(ret, "CryptGetObjectUrl failed: %08x\n", GetLastError()); - if (ret) - { - urlArray = HeapAlloc(GetProcessHeap(), 0, urlArraySize); - if (urlArray) - { - ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_ISSUER, - (void *)cert, CRYPT_GET_URL_FROM_EXTENSION, urlArray, - &urlArraySize, NULL, NULL, NULL); - ok(ret, "CryptGetObjectUrl failed: %08x\n", GetLastError()); - if (ret) - { - LPWSTR pUrl = url; - CRYPT_URL_ARRAY expectedUrl = { 1, &pUrl }; - - compareUrlArray(&expectedUrl, urlArray); - } - HeapFree(GetProcessHeap(), 0, urlArray); - } - } - /* It doesn't have a CRL dist points extension, so this should fail */ - SetLastError(0xdeadbeef); - ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, - (void *)cert, 0, NULL, &urlArraySize, NULL, NULL, NULL); - ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND, - "expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError()); - CertFreeCertificateContext(cert); - } -} - -static void make_tmp_file(LPSTR path) -{ - static char curr[MAX_PATH] = { 0 }; - char temp[MAX_PATH]; - DWORD dwNumberOfBytesWritten; - HANDLE hf; - - if (!*curr) - GetCurrentDirectoryA(MAX_PATH, curr); - GetTempFileNameA(curr, "net", 0, temp); - lstrcpyA(path, temp); - hf = CreateFileA(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, NULL); - WriteFile(hf, certWithCRLDistPoint, sizeof(certWithCRLDistPoint), - &dwNumberOfBytesWritten, NULL); - CloseHandle(hf); -} - -static void test_retrieveObjectByUrl(void) -{ - BOOL ret; - char tmpfile[MAX_PATH * 2], *ptr, url[MAX_PATH + 8]; - CRYPT_BLOB_ARRAY *pBlobArray; - PCCERT_CONTEXT cert; - PCCRL_CONTEXT crl; - HCERTSTORE store; - CRYPT_RETRIEVE_AUX_INFO aux = { 0 }; - FILETIME ft = { 0 }; - - SetLastError(0xdeadbeef); - ret = CryptRetrieveObjectByUrlA(NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL); - ok(!ret && (GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == E_INVALIDARG), - "got 0x%x/%u (expected ERROR_INVALID_PARAMETER or E_INVALIDARG)\n", - GetLastError(), GetLastError()); - - make_tmp_file(tmpfile); - ptr = strchr(tmpfile, ':'); - if (ptr) - ptr += 2; /* skip colon and first slash */ - else - ptr = tmpfile; - snprintf(url, sizeof(url), "file:///%s", ptr); - do { - ptr = strchr(url, '\\'); - if (ptr) - *ptr = '/'; - } while (ptr); - - pBlobArray = (CRYPT_BLOB_ARRAY *)0xdeadbeef; - ret = CryptRetrieveObjectByUrlA(url, NULL, 0, 0, (void **)&pBlobArray, - NULL, NULL, NULL, NULL); - if (!ret) - { - /* File URL support was apparently removed in Vista/Windows 2008 */ - win_skip("File URLs not supported\n"); - return; - } - ok(ret, "CryptRetrieveObjectByUrlA failed: %d\n", GetLastError()); - ok(pBlobArray && pBlobArray != (CRYPT_BLOB_ARRAY *)0xdeadbeef, - "Expected a valid pointer\n"); - if (pBlobArray && pBlobArray != (CRYPT_BLOB_ARRAY *)0xdeadbeef) - { - ok(pBlobArray->cBlob == 1, "Expected 1 blob, got %d\n", - pBlobArray->cBlob); - ok(pBlobArray->rgBlob[0].cbData == sizeof(certWithCRLDistPoint), - "Unexpected size %d\n", pBlobArray->rgBlob[0].cbData); - CryptMemFree(pBlobArray); - } - cert = (PCCERT_CONTEXT)0xdeadbeef; - ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CERTIFICATE, 0, 0, - (void **)&cert, NULL, NULL, NULL, NULL); - ok(cert && cert != (PCCERT_CONTEXT)0xdeadbeef, "Expected a cert\n"); - if (cert && cert != (PCCERT_CONTEXT)0xdeadbeef) - CertFreeCertificateContext(cert); - crl = (PCCRL_CONTEXT)0xdeadbeef; - SetLastError(0xdeadbeef); - ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CRL, 0, 0, (void **)&crl, - NULL, NULL, NULL, NULL); - /* w2k3,XP, newer w2k: CRYPT_E_NO_MATCH, 95: OSS_DATA_ERROR */ - ok(!ret && (GetLastError() == CRYPT_E_NO_MATCH || - GetLastError() == CRYPT_E_ASN1_BADTAG || - GetLastError() == OSS_DATA_ERROR), - "got 0x%x/%u (expected CRYPT_E_NO_MATCH or CRYPT_E_ASN1_BADTAG or " - "OSS_DATA_ERROR)\n", GetLastError(), GetLastError()); - - /* only newer versions of cryptnet do the cleanup */ - if(!ret && GetLastError() != CRYPT_E_ASN1_BADTAG && - GetLastError() != OSS_DATA_ERROR) { - ok(crl == NULL, "Expected CRL to be NULL\n"); - } - - if (crl && crl != (PCCRL_CONTEXT)0xdeadbeef) - CertFreeCRLContext(crl); - store = (HCERTSTORE)0xdeadbeef; - ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CAPI2_ANY, 0, 0, - &store, NULL, NULL, NULL, NULL); - ok(ret, "CryptRetrieveObjectByUrlA failed: %d\n", GetLastError()); - if (store && store != (HCERTSTORE)0xdeadbeef) - { - DWORD certs = 0; - - cert = NULL; - do { - cert = CertEnumCertificatesInStore(store, cert); - if (cert) - certs++; - } while (cert); - ok(certs == 1, "Expected 1 cert, got %d\n", certs); - CertCloseStore(store, 0); - } - /* Are file URLs cached? */ - cert = (PCCERT_CONTEXT)0xdeadbeef; - ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CERTIFICATE, - CRYPT_CACHE_ONLY_RETRIEVAL, 0, (void **)&cert, NULL, NULL, NULL, NULL); - ok(ret, "CryptRetrieveObjectByUrlA failed: %08x\n", GetLastError()); - if (cert && cert != (PCCERT_CONTEXT)0xdeadbeef) - CertFreeCertificateContext(cert); - - cert = (PCCERT_CONTEXT)0xdeadbeef; - ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CERTIFICATE, 0, 0, - (void **)&cert, NULL, NULL, NULL, &aux); - /* w2k: success, 9x: fail with E_INVALIDARG */ - ok(ret || (GetLastError() == E_INVALIDARG), - "got %u with 0x%x/%u (expected '!=0' or '0' with E_INVALIDARG)\n", - ret, GetLastError(), GetLastError()); - if (cert && cert != (PCCERT_CONTEXT)0xdeadbeef) - CertFreeCertificateContext(cert); - - cert = (PCCERT_CONTEXT)0xdeadbeef; - aux.cbSize = sizeof(aux); - ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CERTIFICATE, 0, 0, - (void **)&cert, NULL, NULL, NULL, &aux); - /* w2k: success, 9x: fail with E_INVALIDARG */ - ok(ret || (GetLastError() == E_INVALIDARG), - "got %u with 0x%x/%u (expected '!=0' or '0' with E_INVALIDARG)\n", - ret, GetLastError(), GetLastError()); - if (!ret) { - /* no more tests useful */ - DeleteFileA(tmpfile); - skip("no usable CertificateContext\n"); - return; - } - CertFreeCertificateContext(cert); - - aux.pLastSyncTime = &ft; - ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CERTIFICATE, 0, 0, - (void **)&cert, NULL, NULL, NULL, &aux); - ok(ret, "CryptRetrieveObjectByUrlA failed: %08x\n", GetLastError()); - CertFreeCertificateContext(cert); - ok(ft.dwLowDateTime || ft.dwHighDateTime, - "Expected last sync time to be set\n"); - DeleteFileA(tmpfile); - /* Okay, after being deleted, are file URLs still cached? */ - SetLastError(0xdeadbeef); - ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CERTIFICATE, - CRYPT_CACHE_ONLY_RETRIEVAL, 0, (void **)&cert, NULL, NULL, NULL, NULL); - ok(!ret && (GetLastError() == ERROR_FILE_NOT_FOUND || - GetLastError() == ERROR_PATH_NOT_FOUND), - "Expected ERROR_FILE_NOT_FOUND or ERROR_PATH_NOT_FOUND, got %d\n", - GetLastError()); -} - -static const BYTE rootWithKeySignAndCRLSign[] = { -0x30,0x82,0x01,0xdf,0x30,0x82,0x01,0x4c,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x5b,0xc7,0x0b,0x27,0x99,0xbb,0x2e,0x99,0x47,0x9d,0x45,0x4e,0x7c,0x1a,0xca, -0xe8,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31, -0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31, -0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30, -0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35, -0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05, -0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48, -0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89, -0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82, -0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34, -0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7, -0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91, -0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5, -0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd, -0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c, -0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35, -0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01, -0x00,0x01,0xa3,0x42,0x30,0x40,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01, -0xff,0x04,0x04,0x03,0x02,0x00,0x06,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01, -0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x1d,0x06,0x03,0x55,0x1d, -0x0e,0x04,0x16,0x04,0x14,0x14,0x8c,0x16,0xbb,0xbe,0x70,0xa2,0x28,0x89,0xa0, -0x58,0xff,0x98,0xbd,0xa8,0x24,0x2b,0x8a,0xe9,0x9a,0x30,0x09,0x06,0x05,0x2b, -0x0e,0x03,0x02,0x1d,0x05,0x00,0x03,0x81,0x81,0x00,0x74,0xcb,0x21,0xfd,0x2d, -0x25,0xdc,0xa5,0xaa,0xa1,0x26,0xdc,0x8b,0x40,0x11,0x64,0xae,0x5c,0x71,0x3c, -0x28,0xbc,0xf9,0xb3,0xcb,0xa5,0x94,0xb2,0x8d,0x4c,0x23,0x2b,0x9b,0xde,0x2c, -0x4c,0x30,0x04,0xc6,0x88,0x10,0x2f,0x53,0xfd,0x6c,0x82,0xf1,0x13,0xfb,0xda, -0x27,0x75,0x25,0x48,0xe4,0x72,0x09,0x2a,0xee,0xb4,0x1e,0xc9,0x55,0xf5,0xf7, -0x82,0x91,0xd8,0x4b,0xe4,0x3a,0xfe,0x97,0x87,0xdf,0xfb,0x15,0x5a,0x12,0x3e, -0x12,0xe6,0xad,0x40,0x0b,0xcf,0xee,0x1a,0x44,0xe0,0x83,0xb2,0x67,0x94,0xd4, -0x2e,0x7c,0xf2,0x06,0x9d,0xb3,0x3b,0x7e,0x2f,0xda,0x25,0x66,0x7e,0xa7,0x1f, -0x45,0xd4,0xf5,0xe3,0xdf,0x2a,0xf1,0x18,0x28,0x20,0xb5,0xf8,0xf5,0x8d,0x7a, -0x2e,0x84,0xee }; -static const BYTE eeCert[] = { -0x30,0x82,0x01,0xb9,0x30,0x82,0x01,0x22,0xa0,0x03,0x02,0x01,0x02,0x02,0x01, -0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43, -0x65,0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55, -0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06, -0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d, -0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5, -0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6, -0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7, -0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b, -0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b, -0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc, -0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85, -0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2, -0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72, -0xa3,0x02,0x03,0x01,0x00,0x01,0xa3,0x23,0x30,0x21,0x30,0x1f,0x06,0x03,0x55, -0x1d,0x23,0x04,0x18,0x30,0x18,0x80,0x14,0x14,0x8c,0x16,0xbb,0xbe,0x70,0xa2, -0x28,0x89,0xa0,0x58,0xff,0x98,0xbd,0xa8,0x24,0x2b,0x8a,0xe9,0x9a,0x30,0x0d, -0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81, -0x81,0x00,0x8a,0x49,0xa9,0x86,0x5e,0xc9,0x33,0x7e,0xfd,0xab,0x64,0x1f,0x6d, -0x00,0xd7,0x9b,0xec,0xd1,0x5b,0x38,0xcc,0xd6,0xf3,0xf2,0xb4,0x75,0x70,0x00, -0x82,0x9d,0x37,0x58,0xe1,0xcd,0x2c,0x61,0xb3,0x28,0xe7,0x8a,0x00,0xbe,0x6e, -0xca,0xe8,0x55,0xd5,0xad,0x3a,0xea,0xaf,0x13,0x20,0x1c,0x44,0xfc,0xb4,0xf9, -0x29,0x2b,0xdc,0x8a,0x2d,0x1b,0x27,0x9e,0xb9,0x3b,0x4a,0x71,0x9d,0x47,0x7d, -0xf7,0x92,0x6b,0x21,0x7f,0xfa,0x88,0x79,0x94,0x33,0xf6,0xdd,0x92,0x04,0x92, -0xd6,0x5e,0x0a,0x74,0xf2,0x85,0xa6,0xd5,0x3c,0x28,0xc0,0x89,0x5d,0xda,0xf3, -0xa6,0x01,0xc2,0xe9,0xa3,0xc1,0xb7,0x21,0x08,0xba,0x18,0x07,0x45,0xeb,0x77, -0x7d,0xcd,0xc6,0xe7,0x2a,0x7b,0x46,0xd2,0x3d,0xb5 }; -static const BYTE rootSignedCRL[] = { -0x30,0x82,0x01,0x1f,0x30,0x81,0x89,0x02,0x01,0x01,0x30,0x0d,0x06,0x09,0x2a, -0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x30,0x10,0x31,0x0e,0x30, -0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31,0x17,0x0d, -0x30,0x37,0x30,0x39,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d, -0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x14, -0x30,0x12,0x02,0x01,0x01,0x17,0x0d,0x30,0x37,0x30,0x39,0x30,0x31,0x30,0x30, -0x30,0x30,0x30,0x30,0x5a,0xa0,0x2f,0x30,0x2d,0x30,0x0a,0x06,0x03,0x55,0x1d, -0x14,0x04,0x03,0x02,0x01,0x01,0x30,0x1f,0x06,0x03,0x55,0x1d,0x23,0x04,0x18, -0x30,0x18,0x80,0x14,0x14,0x8c,0x16,0xbb,0xbe,0x70,0xa2,0x28,0x89,0xa0,0x58, -0xff,0x98,0xbd,0xa8,0x24,0x2b,0x8a,0xe9,0x9a,0x30,0x0d,0x06,0x09,0x2a,0x86, -0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0xa3,0xcf, -0x17,0x5d,0x7a,0x08,0xab,0x11,0x1a,0xbd,0x5c,0xde,0x9a,0x22,0x92,0x38,0xe6, -0x96,0xcc,0xb1,0xc5,0x42,0x86,0xa6,0xae,0xad,0xa3,0x1a,0x2b,0xa0,0xb0,0x65, -0xaa,0x9c,0xd7,0x2d,0x44,0x8c,0xae,0x61,0xc7,0x30,0x17,0x89,0x84,0x3b,0x4a, -0x8f,0x17,0x08,0x06,0x37,0x1c,0xf7,0x2d,0x4e,0x47,0x07,0x61,0x50,0xd9,0x06, -0xd1,0x46,0xed,0x0a,0xbb,0xc3,0x9b,0x36,0x0b,0xa7,0x27,0x2f,0x2b,0x55,0xce, -0x2a,0xa5,0x60,0xc6,0x53,0x28,0xe8,0xee,0xad,0x0e,0x2b,0xe8,0xd7,0x5f,0xc9, -0xa5,0xed,0xf9,0x77,0xb0,0x3c,0x81,0xcf,0xcc,0x49,0xb2,0x1a,0xc3,0xfd,0x34, -0xd5,0xbc,0xb0,0xd5,0xa5,0x9c,0x1b,0x72,0xc3,0x0f,0xa3,0xe3,0x3c,0xf0,0xc3, -0x91,0xe8,0x93,0x4f,0xd4,0x2f }; - -BOOL (WINAPI *pCertVerifyRevocation)(DWORD, DWORD, DWORD, void **, DWORD, - PCERT_REVOCATION_PARA, PCERT_REVOCATION_STATUS); - -/* Wednesday, Oct 1, 2007 */ -static SYSTEMTIME oct2007 = { 2007, 10, 1, 1, 0, 0, 0, 0 }; - -static void test_verifyRevocation(void) -{ - HMODULE hCryptNet = GetModuleHandleA("cryptnet.dll"); - BOOL ret; - CERT_REVOCATION_STATUS status = { sizeof(status), 0 }; - PCCERT_CONTEXT certs[2]; - CERT_REVOCATION_PARA revPara = { sizeof(revPara), 0 }; - FILETIME time; - - pCertVerifyRevocation = (void *)GetProcAddress(hCryptNet, - "CertDllVerifyRevocation"); - if (!pCertVerifyRevocation) - { - win_skip("no CertDllVerifyRevocation\n"); - return; - } - if (0) - { - /* Crash */ - ret = pCertVerifyRevocation(0, 0, 0, NULL, 0, NULL, NULL); - } - SetLastError(0xdeadbeef); - ret = pCertVerifyRevocation(0, 0, 0, NULL, 0, NULL, &status); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pCertVerifyRevocation(X509_ASN_ENCODING, 0, 0, NULL, 0, NULL, - &status); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pCertVerifyRevocation(0, CERT_CONTEXT_REVOCATION_TYPE, 0, NULL, 0, - NULL, &status); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - certs[0] = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, - sizeof(bigCert)); - SetLastError(0xdeadbeef); - ret = pCertVerifyRevocation(0, CERT_CONTEXT_REVOCATION_TYPE, - 1, (void **)certs, 0, NULL, &status); - ok(!ret && GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", GetLastError()); - ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", status.dwError); - ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex); - CertFreeCertificateContext(certs[0]); - certs[0] = CertCreateCertificateContext(X509_ASN_ENCODING, - rootWithKeySignAndCRLSign, sizeof(rootWithKeySignAndCRLSign)); - certs[1] = CertCreateCertificateContext(X509_ASN_ENCODING, - eeCert, sizeof(eeCert)); - /* The root cert itself can't be checked for revocation */ - SetLastError(0xdeadbeef); - ret = pCertVerifyRevocation(0, CERT_CONTEXT_REVOCATION_TYPE, - 1, (void **)certs, 0, NULL, &status); - ok(!ret && GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", GetLastError()); - ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", status.dwError); - ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex); - /* Neither can the end cert */ - SetLastError(0xdeadbeef); - ret = pCertVerifyRevocation(0, CERT_CONTEXT_REVOCATION_TYPE, - 1, (void **)&certs[1], 0, NULL, &status); - ok(!ret && GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", GetLastError()); - ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", status.dwError); - ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex); - /* Both certs together can't, either (they're not CRLs) */ - SetLastError(0xdeadbeef); - ret = pCertVerifyRevocation(0, CERT_CONTEXT_REVOCATION_TYPE, - 2, (void **)certs, 0, NULL, &status); - ok(!ret && GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", GetLastError()); - ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", status.dwError); - ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex); - /* Now add a CRL to the hCrlStore */ - revPara.hCrlStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - CertAddEncodedCRLToStore(revPara.hCrlStore, X509_ASN_ENCODING, - rootSignedCRL, sizeof(rootSignedCRL), CERT_STORE_ADD_ALWAYS, NULL); - SetLastError(0xdeadbeef); - ret = pCertVerifyRevocation(0, CERT_CONTEXT_REVOCATION_TYPE, - 2, (void **)certs, 0, &revPara, &status); - ok(!ret && GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", GetLastError()); - ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", status.dwError); - ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex); - /* Specifying CERT_VERIFY_REV_CHAIN_FLAG doesn't change things either */ - SetLastError(0xdeadbeef); - ret = pCertVerifyRevocation(0, CERT_CONTEXT_REVOCATION_TYPE, - 2, (void **)certs, CERT_VERIFY_REV_CHAIN_FLAG, &revPara, &status); - ok(!ret && GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", GetLastError()); - ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", status.dwError); - ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex); - /* Again, specifying the issuer cert: no change */ - revPara.pIssuerCert = certs[0]; - SetLastError(0xdeadbeef); - ret = CertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, - 1, (void **)&certs[1], 0, &revPara, &status); - /* Win2k thinks the cert is revoked, and it is, except the CRL is out of - * date, hence the revocation status should be unknown. - */ - ok(!ret && (GetLastError() == CRYPT_E_NO_REVOCATION_CHECK || - broken(GetLastError() == CRYPT_E_REVOKED /* Win2k */)), - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", GetLastError()); - ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK || - broken(status.dwError == CRYPT_E_REVOKED /* Win2k */), - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", status.dwError); - ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex); - /* Specifying the time to check: still no change */ - SystemTimeToFileTime(&oct2007, &time); - revPara.pftTimeToUse = &time; - ret = pCertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, - 1, (void **)&certs[1], 0, &revPara, &status); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == CRYPT_E_NO_REVOCATION_CHECK || - broken(GetLastError() == CRYPT_E_REVOKED), /* W2K SP3/SP4 */ - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", GetLastError()); - ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK || - broken(GetLastError() == CRYPT_E_REVOKED), /* W2K SP3/SP4 */ - "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", status.dwError); - ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex); - CertCloseStore(revPara.hCrlStore, 0); - CertFreeCertificateContext(certs[1]); - CertFreeCertificateContext(certs[0]); -} - -START_TEST(cryptnet) -{ - test_getObjectUrl(); - test_retrieveObjectByUrl(); - test_verifyRevocation(); -} diff --git a/rostests/winetests/cryptnet/cryptnet.rbuild b/rostests/winetests/cryptnet/cryptnet.rbuild deleted file mode 100644 index 309455432af..00000000000 --- a/rostests/winetests/cryptnet/cryptnet.rbuild +++ /dev/null @@ -1,10 +0,0 @@ - - . - - cryptnet.c - testlist.c - wine - cryptnet - crypt32 - ntdll - diff --git a/rostests/winetests/cryptnet/testlist.c b/rostests/winetests/cryptnet/testlist.c deleted file mode 100644 index 5321c62f438..00000000000 --- a/rostests/winetests/cryptnet/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_cryptnet(void); - -const struct test winetest_testlist[] = -{ - { "cryptnet", func_cryptnet }, - { 0, 0 } -}; diff --git a/rostests/winetests/cryptui/CMakeLists.txt b/rostests/winetests/cryptui/CMakeLists.txt deleted file mode 100644 index 203f68cb80e..00000000000 --- a/rostests/winetests/cryptui/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(cryptui_winetest cryptui.c testlist.c) -target_link_libraries(cryptui_winetest wine) -set_module_type(cryptui_winetest win32cui) -add_importlibs(cryptui_winetest cryptui crypt32 user32 msvcrt kernel32 ntdll) -add_cd_file(TARGET cryptui_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/cryptui/cryptui.c b/rostests/winetests/cryptui/cryptui.c deleted file mode 100644 index 996df0e7392..00000000000 --- a/rostests/winetests/cryptui/cryptui.c +++ /dev/null @@ -1,663 +0,0 @@ -/* - * Unit test suite for cryptui.dll - * - * Copyright 2008 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 - */ -#include -#include -#define NONAMELESSUNION -#include -#include -#include -#include -#include -#include - -#include "wine/test.h" - -static BYTE v1CertWithValidPubKey[] = { -0x30,0x81,0xcf,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30, -0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61, -0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31, -0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31, -0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11, -0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e, -0x67,0x00,0x30,0x5c,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, -0x01,0x01,0x05,0x00,0x03,0x4b,0x00,0x30,0x48,0x02,0x41,0x00,0xe2,0x54,0x3a, -0xa7,0x83,0xb1,0x27,0x14,0x3e,0x59,0xbb,0xb4,0x53,0xe6,0x1f,0xe7,0x5d,0xf1, -0x21,0x68,0xad,0x85,0x53,0xdb,0x6b,0x1e,0xeb,0x65,0x97,0x03,0x86,0x60,0xde, -0xf3,0x6c,0x38,0x75,0xe0,0x4c,0x61,0xbb,0xbc,0x62,0x17,0xa9,0xcd,0x79,0x3f, -0x21,0x4e,0x96,0xcb,0x0e,0xdc,0x61,0x94,0x30,0x18,0x10,0x6b,0xd0,0x1c,0x10, -0x79,0x02,0x03,0x01,0x00,0x01,0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03,0x55, -0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01 }; -static const BYTE iTunesCert1[] = { -0x30,0x82,0x03,0xff,0x30,0x82,0x02,0xe7,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x0d,0xe9,0x2b,0xf0,0xd4,0xd8,0x29,0x88,0x18,0x32,0x05,0x09,0x5e,0x9a,0x76, -0x88,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x53,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55, -0x53,0x31,0x17,0x30,0x15,0x06,0x03,0x55,0x04,0x0a,0x13,0x0e,0x56,0x65,0x72, -0x69,0x53,0x69,0x67,0x6e,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x2b,0x30,0x29, -0x06,0x03,0x55,0x04,0x03,0x13,0x22,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e, -0x20,0x54,0x69,0x6d,0x65,0x20,0x53,0x74,0x61,0x6d,0x70,0x69,0x6e,0x67,0x20, -0x53,0x65,0x72,0x76,0x69,0x63,0x65,0x73,0x20,0x43,0x41,0x30,0x1e,0x17,0x0d, -0x30,0x33,0x31,0x32,0x30,0x34,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d, -0x30,0x38,0x31,0x32,0x30,0x33,0x32,0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x57, -0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x17, -0x30,0x15,0x06,0x03,0x55,0x04,0x0a,0x13,0x0e,0x56,0x65,0x72,0x69,0x53,0x69, -0x67,0x6e,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x2f,0x30,0x2d,0x06,0x03,0x55, -0x04,0x03,0x13,0x26,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x20,0x54,0x69, -0x6d,0x65,0x20,0x53,0x74,0x61,0x6d,0x70,0x69,0x6e,0x67,0x20,0x53,0x65,0x72, -0x76,0x69,0x63,0x65,0x73,0x20,0x53,0x69,0x67,0x6e,0x65,0x72,0x30,0x82,0x01, -0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05, -0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01,0x0a,0x02,0x82,0x01,0x01,0x00, -0xb2,0x50,0x28,0x48,0xdd,0xd3,0x68,0x7a,0x84,0x18,0x44,0x66,0x75,0x5d,0x7e, -0xc4,0xb8,0x9f,0x63,0x26,0xff,0x3d,0x43,0x9c,0x7c,0x11,0x38,0x10,0x25,0x55, -0x73,0xd9,0x75,0x27,0x69,0xfd,0x4e,0xb9,0x20,0x5c,0xd3,0x0a,0xf9,0xa0,0x1b, -0x2a,0xed,0x55,0x56,0x21,0x61,0xd8,0x1e,0xdb,0xe4,0xbc,0x33,0x6b,0xc7,0xef, -0xdd,0xa3,0x37,0x65,0x8e,0x1b,0x93,0x0c,0xb6,0x53,0x1e,0x5c,0x7c,0x66,0x35, -0x5f,0x05,0x8a,0x45,0xfe,0x76,0x4e,0xdf,0x53,0x80,0xa2,0x81,0x20,0x9d,0xae, -0x88,0x5c,0xa2,0x08,0xf7,0xe5,0x30,0xf9,0xee,0x22,0x37,0x4c,0x42,0x0a,0xce, -0xdf,0xc6,0x1f,0xc4,0xd6,0x55,0xe9,0x81,0x3f,0xb5,0x52,0xa3,0x2c,0xaa,0x01, -0x7a,0xf2,0xa2,0xaa,0x8d,0x35,0xfe,0x9f,0xe6,0x5d,0x6a,0x05,0x9f,0x3d,0x6b, -0xe3,0xbf,0x96,0xc0,0xfe,0xcc,0x60,0xf9,0x40,0xe7,0x07,0xa0,0x44,0xeb,0x81, -0x51,0x6e,0xa5,0x2a,0xf2,0xb6,0x8a,0x10,0x28,0xed,0x8f,0xdc,0x06,0xa0,0x86, -0x50,0x9a,0x7b,0x4a,0x08,0x0d,0x30,0x1d,0xca,0x10,0x9e,0x6b,0xf7,0xe9,0x58, -0xae,0x04,0xa9,0x40,0x99,0xb2,0x28,0xe8,0x8f,0x16,0xac,0x3c,0xe3,0x53,0x6f, -0x4b,0xd3,0x35,0x9d,0xb5,0x6f,0x64,0x1d,0xb3,0x96,0x2c,0xbb,0x3d,0xe7,0x79, -0xeb,0x6d,0x7a,0xf9,0x16,0xe6,0x26,0xad,0xaf,0xef,0x99,0x53,0xb7,0x40,0x2c, -0x95,0xb8,0x79,0xaa,0xfe,0xd4,0x52,0xab,0x29,0x74,0x7e,0x42,0xec,0x39,0x1e, -0xa2,0x6a,0x16,0xe6,0x59,0xbb,0x24,0x68,0xd8,0x00,0x80,0x43,0x10,0x87,0x80, -0x6b,0x02,0x03,0x01,0x00,0x01,0xa3,0x81,0xca,0x30,0x81,0xc7,0x30,0x34,0x06, -0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x01,0x01,0x04,0x28,0x30,0x26,0x30,0x24, -0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x86,0x18,0x68,0x74,0x74, -0x70,0x3a,0x2f,0x2f,0x6f,0x63,0x73,0x70,0x2e,0x76,0x65,0x72,0x69,0x73,0x69, -0x67,0x6e,0x2e,0x63,0x6f,0x6d,0x30,0x0c,0x06,0x03,0x55,0x1d,0x13,0x01,0x01, -0xff,0x04,0x02,0x30,0x00,0x30,0x33,0x06,0x03,0x55,0x1d,0x1f,0x04,0x2c,0x30, -0x2a,0x30,0x28,0xa0,0x26,0xa0,0x24,0x86,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f, -0x2f,0x63,0x72,0x6c,0x2e,0x76,0x65,0x72,0x69,0x73,0x69,0x67,0x6e,0x2e,0x63, -0x6f,0x6d,0x2f,0x74,0x73,0x73,0x2d,0x63,0x61,0x2e,0x63,0x72,0x6c,0x30,0x16, -0x06,0x03,0x55,0x1d,0x25,0x01,0x01,0xff,0x04,0x0c,0x30,0x0a,0x06,0x08,0x2b, -0x06,0x01,0x05,0x05,0x07,0x03,0x08,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01, -0x01,0xff,0x04,0x04,0x03,0x02,0x06,0xc0,0x30,0x24,0x06,0x03,0x55,0x1d,0x11, -0x04,0x1d,0x30,0x1b,0xa4,0x19,0x30,0x17,0x31,0x15,0x30,0x13,0x06,0x03,0x55, -0x04,0x03,0x13,0x0c,0x54,0x53,0x41,0x32,0x30,0x34,0x38,0x2d,0x31,0x2d,0x35, -0x34,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x03,0x82,0x01,0x01,0x00,0x87,0x78,0x70,0xda,0x4e,0x52,0x01,0x20,0x5b, -0xe0,0x79,0xc9,0x82,0x30,0xc4,0xfd,0xb9,0x19,0x96,0xbd,0x91,0x00,0xc3,0xbd, -0xcd,0xcd,0xc6,0xf4,0x0e,0xd8,0xff,0xf9,0x4d,0xc0,0x33,0x62,0x30,0x11,0xc5, -0xf5,0x74,0x1b,0xd4,0x92,0xde,0x5f,0x9c,0x20,0x13,0xb1,0x7c,0x45,0xbe,0x50, -0xcd,0x83,0xe7,0x80,0x17,0x83,0xa7,0x27,0x93,0x67,0x13,0x46,0xfb,0xca,0xb8, -0x98,0x41,0x03,0xcc,0x9b,0x51,0x5b,0x05,0x8b,0x7f,0xa8,0x6f,0xf3,0x1b,0x50, -0x1b,0x24,0x2e,0xf2,0x69,0x8d,0x6c,0x22,0xf7,0xbb,0xca,0x16,0x95,0xed,0x0c, -0x74,0xc0,0x68,0x77,0xd9,0xeb,0x99,0x62,0x87,0xc1,0x73,0x90,0xf8,0x89,0x74, -0x7a,0x23,0xab,0xa3,0x98,0x7b,0x97,0xb1,0xf7,0x8f,0x29,0x71,0x4d,0x2e,0x75, -0x1b,0x48,0x41,0xda,0xf0,0xb5,0x0d,0x20,0x54,0xd6,0x77,0xa0,0x97,0x82,0x63, -0x69,0xfd,0x09,0xcf,0x8a,0xf0,0x75,0xbb,0x09,0x9b,0xd9,0xf9,0x11,0x55,0x26, -0x9a,0x61,0x32,0xbe,0x7a,0x02,0xb0,0x7b,0x86,0xbe,0xa2,0xc3,0x8b,0x22,0x2c, -0x78,0xd1,0x35,0x76,0xbc,0x92,0x73,0x5c,0xf9,0xb9,0xe6,0x4c,0x15,0x0a,0x23, -0xcc,0xe4,0xd2,0xd4,0x34,0x2e,0x49,0x40,0x15,0x3c,0x0f,0x60,0x7a,0x24,0xc6, -0xa5,0x66,0xef,0x96,0xcf,0x70,0xeb,0x3e,0xe7,0xf4,0x0d,0x7e,0xdc,0xd1,0x7c, -0xa3,0x76,0x71,0x69,0xc1,0x9c,0x4f,0x47,0x30,0x35,0x21,0xb1,0xa2,0xaf,0x1a, -0x62,0x3c,0x2b,0xd9,0x8e,0xaa,0x2a,0x07,0x7b,0xd8,0x18,0xb3,0x5c,0x7b,0xe2, -0x9d,0xa5,0x6f,0xfe,0x3c,0x89,0xad }; -static const BYTE iTunesCert2[] = { -0x30,0x82,0x04,0xbf,0x30,0x82,0x04,0x28,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x41,0x91,0xa1,0x5a,0x39,0x78,0xdf,0xcf,0x49,0x65,0x66,0x38,0x1d,0x4c,0x75, -0xc2,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x5f,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55, -0x53,0x31,0x17,0x30,0x15,0x06,0x03,0x55,0x04,0x0a,0x13,0x0e,0x56,0x65,0x72, -0x69,0x53,0x69,0x67,0x6e,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x37,0x30,0x35, -0x06,0x03,0x55,0x04,0x0b,0x13,0x2e,0x43,0x6c,0x61,0x73,0x73,0x20,0x33,0x20, -0x50,0x75,0x62,0x6c,0x69,0x63,0x20,0x50,0x72,0x69,0x6d,0x61,0x72,0x79,0x20, -0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x41, -0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x30,0x1e,0x17,0x0d,0x30,0x34,0x30, -0x37,0x31,0x36,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x31,0x34,0x30, -0x37,0x31,0x35,0x32,0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x81,0xb4,0x31,0x0b, -0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x17,0x30,0x15, -0x06,0x03,0x55,0x04,0x0a,0x13,0x0e,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e, -0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x1f,0x30,0x1d,0x06,0x03,0x55,0x04,0x0b, -0x13,0x16,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x20,0x54,0x72,0x75,0x73, -0x74,0x20,0x4e,0x65,0x74,0x77,0x6f,0x72,0x6b,0x31,0x3b,0x30,0x39,0x06,0x03, -0x55,0x04,0x0b,0x13,0x32,0x54,0x65,0x72,0x6d,0x73,0x20,0x6f,0x66,0x20,0x75, -0x73,0x65,0x20,0x61,0x74,0x20,0x68,0x74,0x74,0x70,0x73,0x3a,0x2f,0x2f,0x77, -0x77,0x77,0x2e,0x76,0x65,0x72,0x69,0x73,0x69,0x67,0x6e,0x2e,0x63,0x6f,0x6d, -0x2f,0x72,0x70,0x61,0x20,0x28,0x63,0x29,0x30,0x34,0x31,0x2e,0x30,0x2c,0x06, -0x03,0x55,0x04,0x03,0x13,0x25,0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x20, -0x43,0x6c,0x61,0x73,0x73,0x20,0x33,0x20,0x43,0x6f,0x64,0x65,0x20,0x53,0x69, -0x67,0x6e,0x69,0x6e,0x67,0x20,0x32,0x30,0x30,0x34,0x20,0x43,0x41,0x30,0x82, -0x01,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01, -0x05,0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01,0x0a,0x02,0x82,0x01,0x01, -0x00,0xbe,0xbc,0xee,0xbc,0x7e,0xef,0x83,0xeb,0xe0,0x37,0x4f,0xfb,0x03,0x10, -0x38,0xbe,0x08,0xd2,0x8c,0x7d,0x9d,0xfa,0x92,0x7f,0x19,0x0c,0xc2,0x6b,0xee, -0x42,0x52,0x8c,0xde,0xd3,0x1c,0x48,0x13,0x25,0xea,0xc1,0x63,0x7a,0xf9,0x51, -0x65,0xee,0xd3,0xaa,0x3b,0xf5,0xf0,0x94,0x9c,0x2b,0xfb,0xf2,0x66,0xd4,0x24, -0xda,0xf7,0xf5,0x9f,0x6e,0x19,0x39,0x36,0xbc,0xd0,0xa3,0x76,0x08,0x1e,0x22, -0x27,0x24,0x6c,0x38,0x91,0x27,0xe2,0x84,0x49,0xae,0x1b,0x8a,0xa1,0xfd,0x25, -0x82,0x2c,0x10,0x30,0xe8,0x71,0xab,0x28,0xe8,0x77,0x4a,0x51,0xf1,0xec,0xcd, -0xf8,0xf0,0x54,0xd4,0x6f,0xc0,0xe3,0x6d,0x0a,0x8f,0xd9,0xd8,0x64,0x8d,0x63, -0xb2,0x2d,0x4e,0x27,0xf6,0x85,0x0e,0xfe,0x6d,0xe3,0x29,0x99,0xe2,0x85,0x47, -0x7c,0x2d,0x86,0x7f,0xe8,0x57,0x8f,0xad,0x67,0xc2,0x33,0x32,0x91,0x13,0x20, -0xfc,0xa9,0x23,0x14,0x9a,0x6d,0xc2,0x84,0x4b,0x76,0x68,0x04,0xd5,0x71,0x2c, -0x5d,0x21,0xfa,0x88,0x0d,0x26,0xfd,0x1f,0x2d,0x91,0x2b,0xe7,0x01,0x55,0x4d, -0xf2,0x6d,0x35,0x28,0x82,0xdf,0xd9,0x6b,0x5c,0xb6,0xd6,0xd9,0xaa,0x81,0xfd, -0x5f,0xcd,0x83,0xba,0x63,0x9d,0xd0,0x22,0xfc,0xa9,0x3b,0x42,0x69,0xb2,0x8e, -0x3a,0xb5,0xbc,0xb4,0x9e,0x0f,0x5e,0xc4,0xea,0x2c,0x82,0x8b,0x28,0xfd,0x53, -0x08,0x96,0xdd,0xb5,0x01,0x20,0xd1,0xf9,0xa5,0x18,0xe7,0xc0,0xee,0x51,0x70, -0x37,0xe1,0xb6,0x05,0x48,0x52,0x48,0x6f,0x38,0xea,0xc3,0xe8,0x6c,0x7b,0x44, -0x84,0xbb,0x02,0x03,0x01,0x00,0x01,0xa3,0x82,0x01,0xa0,0x30,0x82,0x01,0x9c, -0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01, -0x01,0xff,0x02,0x01,0x00,0x30,0x44,0x06,0x03,0x55,0x1d,0x20,0x04,0x3d,0x30, -0x3b,0x30,0x39,0x06,0x0b,0x60,0x86,0x48,0x01,0x86,0xf8,0x45,0x01,0x07,0x17, -0x03,0x30,0x2a,0x30,0x28,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x02,0x01, -0x16,0x1c,0x68,0x74,0x74,0x70,0x73,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x76, -0x65,0x72,0x69,0x73,0x69,0x67,0x6e,0x2e,0x63,0x6f,0x6d,0x2f,0x72,0x70,0x61, -0x30,0x31,0x06,0x03,0x55,0x1d,0x1f,0x04,0x2a,0x30,0x28,0x30,0x26,0xa0,0x24, -0xa0,0x22,0x86,0x20,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x63,0x72,0x6c,0x2e, -0x76,0x65,0x72,0x69,0x73,0x69,0x67,0x6e,0x2e,0x63,0x6f,0x6d,0x2f,0x70,0x63, -0x61,0x33,0x2e,0x63,0x72,0x6c,0x30,0x1d,0x06,0x03,0x55,0x1d,0x25,0x04,0x16, -0x30,0x14,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x03,0x02,0x06,0x08,0x2b, -0x06,0x01,0x05,0x05,0x07,0x03,0x03,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01, -0x01,0xff,0x04,0x04,0x03,0x02,0x01,0x06,0x30,0x11,0x06,0x09,0x60,0x86,0x48, -0x01,0x86,0xf8,0x42,0x01,0x01,0x04,0x04,0x03,0x02,0x00,0x01,0x30,0x29,0x06, -0x03,0x55,0x1d,0x11,0x04,0x22,0x30,0x20,0xa4,0x1e,0x30,0x1c,0x31,0x1a,0x30, -0x18,0x06,0x03,0x55,0x04,0x03,0x13,0x11,0x43,0x6c,0x61,0x73,0x73,0x33,0x43, -0x41,0x32,0x30,0x34,0x38,0x2d,0x31,0x2d,0x34,0x33,0x30,0x1d,0x06,0x03,0x55, -0x1d,0x0e,0x04,0x16,0x04,0x14,0x08,0xf5,0x51,0xe8,0xfb,0xfe,0x3d,0x3d,0x64, -0x36,0x7c,0x68,0xcf,0x5b,0x78,0xa8,0xdf,0xb9,0xc5,0x37,0x30,0x81,0x80,0x06, -0x03,0x55,0x1d,0x23,0x04,0x79,0x30,0x77,0xa1,0x63,0xa4,0x61,0x30,0x5f,0x31, -0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x17,0x30, -0x15,0x06,0x03,0x55,0x04,0x0a,0x13,0x0e,0x56,0x65,0x72,0x69,0x53,0x69,0x67, -0x6e,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x37,0x30,0x35,0x06,0x03,0x55,0x04, -0x0b,0x13,0x2e,0x43,0x6c,0x61,0x73,0x73,0x20,0x33,0x20,0x50,0x75,0x62,0x6c, -0x69,0x63,0x20,0x50,0x72,0x69,0x6d,0x61,0x72,0x79,0x20,0x43,0x65,0x72,0x74, -0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x41,0x75,0x74,0x68,0x6f, -0x72,0x69,0x74,0x79,0x82,0x10,0x70,0xba,0xe4,0x1d,0x10,0xd9,0x29,0x34,0xb6, -0x38,0xca,0x7b,0x03,0xcc,0xba,0xbf,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86, -0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0xae,0x3a,0x17,0xb8, -0x4a,0x7b,0x55,0xfa,0x64,0x55,0xec,0x40,0xa4,0xed,0x49,0x41,0x90,0x99,0x9c, -0x89,0xbc,0xaf,0x2e,0x1d,0xca,0x78,0x23,0xf9,0x1c,0x19,0x0f,0x7f,0xeb,0x68, -0xbc,0x32,0xd9,0x88,0x38,0xde,0xdc,0x3f,0xd3,0x89,0xb4,0x3f,0xb1,0x82,0x96, -0xf1,0xa4,0x5a,0xba,0xed,0x2e,0x26,0xd3,0xde,0x7c,0x01,0x6e,0x00,0x0a,0x00, -0xa4,0x06,0x92,0x11,0x48,0x09,0x40,0xf9,0x1c,0x18,0x79,0x67,0x23,0x24,0xe0, -0xbb,0xd5,0xe1,0x50,0xae,0x1b,0xf5,0x0e,0xdd,0xe0,0x2e,0x81,0xcd,0x80,0xa3, -0x6c,0x52,0x4f,0x91,0x75,0x55,0x8a,0xba,0x22,0xf2,0xd2,0xea,0x41,0x75,0x88, -0x2f,0x63,0x55,0x7d,0x1e,0x54,0x5a,0x95,0x59,0xca,0xd9,0x34,0x81,0xc0,0x5f, -0x5e,0xf6,0x7a,0xb5 }; -static const BYTE iTunesCert3[] = { -0x30,0x82,0x04,0xf1,0x30,0x82,0x03,0xd9,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, -0x0f,0x1a,0xa0,0xe0,0x9b,0x9b,0x61,0xa6,0xb6,0xfe,0x40,0xd2,0xdf,0x6a,0xf6, -0x8d,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, -0x00,0x30,0x81,0xb4,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02, -0x55,0x53,0x31,0x17,0x30,0x15,0x06,0x03,0x55,0x04,0x0a,0x13,0x0e,0x56,0x65, -0x72,0x69,0x53,0x69,0x67,0x6e,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x1f,0x30, -0x1d,0x06,0x03,0x55,0x04,0x0b,0x13,0x16,0x56,0x65,0x72,0x69,0x53,0x69,0x67, -0x6e,0x20,0x54,0x72,0x75,0x73,0x74,0x20,0x4e,0x65,0x74,0x77,0x6f,0x72,0x6b, -0x31,0x3b,0x30,0x39,0x06,0x03,0x55,0x04,0x0b,0x13,0x32,0x54,0x65,0x72,0x6d, -0x73,0x20,0x6f,0x66,0x20,0x75,0x73,0x65,0x20,0x61,0x74,0x20,0x68,0x74,0x74, -0x70,0x73,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x76,0x65,0x72,0x69,0x73,0x69, -0x67,0x6e,0x2e,0x63,0x6f,0x6d,0x2f,0x72,0x70,0x61,0x20,0x28,0x63,0x29,0x30, -0x34,0x31,0x2e,0x30,0x2c,0x06,0x03,0x55,0x04,0x03,0x13,0x25,0x56,0x65,0x72, -0x69,0x53,0x69,0x67,0x6e,0x20,0x43,0x6c,0x61,0x73,0x73,0x20,0x33,0x20,0x43, -0x6f,0x64,0x65,0x20,0x53,0x69,0x67,0x6e,0x69,0x6e,0x67,0x20,0x32,0x30,0x30, -0x34,0x20,0x43,0x41,0x30,0x1e,0x17,0x0d,0x30,0x36,0x30,0x31,0x31,0x37,0x30, -0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x38,0x30,0x31,0x32,0x32,0x32, -0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x81,0xb4,0x31,0x0b,0x30,0x09,0x06,0x03, -0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04, -0x08,0x13,0x0a,0x43,0x61,0x6c,0x69,0x66,0x6f,0x72,0x6e,0x69,0x61,0x31,0x12, -0x30,0x10,0x06,0x03,0x55,0x04,0x07,0x13,0x09,0x43,0x75,0x70,0x65,0x72,0x74, -0x69,0x6e,0x6f,0x31,0x1d,0x30,0x1b,0x06,0x03,0x55,0x04,0x0a,0x14,0x14,0x41, -0x70,0x70,0x6c,0x65,0x20,0x43,0x6f,0x6d,0x70,0x75,0x74,0x65,0x72,0x2c,0x20, -0x49,0x6e,0x63,0x2e,0x31,0x3e,0x30,0x3c,0x06,0x03,0x55,0x04,0x0b,0x13,0x35, -0x44,0x69,0x67,0x69,0x74,0x61,0x6c,0x20,0x49,0x44,0x20,0x43,0x6c,0x61,0x73, -0x73,0x20,0x33,0x20,0x2d,0x20,0x4d,0x69,0x63,0x72,0x6f,0x73,0x6f,0x66,0x74, -0x20,0x53,0x6f,0x66,0x74,0x77,0x61,0x72,0x65,0x20,0x56,0x61,0x6c,0x69,0x64, -0x61,0x74,0x69,0x6f,0x6e,0x20,0x76,0x32,0x31,0x1d,0x30,0x1b,0x06,0x03,0x55, -0x04,0x03,0x14,0x14,0x41,0x70,0x70,0x6c,0x65,0x20,0x43,0x6f,0x6d,0x70,0x75, -0x74,0x65,0x72,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x30,0x81,0x9f,0x30,0x0d,0x06, -0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d, -0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xd3,0xab,0x3b,0x7f,0xec,0x48,0x84, -0xce,0xa8,0x1a,0x12,0xf3,0x3c,0x87,0xcb,0x24,0x58,0x96,0x02,0x87,0x66,0x49, -0xeb,0x89,0xee,0x79,0x44,0x70,0x8d,0xe7,0xd4,0x1f,0x30,0x92,0xc0,0x9c,0x35, -0x78,0xc0,0xaf,0x1c,0xb6,0x28,0xd3,0xe0,0xe0,0x9d,0xd3,0x49,0x76,0x73,0x57, -0x19,0x4d,0x8d,0x70,0x85,0x64,0x4d,0x1d,0xc6,0x02,0x3e,0xe5,0x2c,0x66,0x07, -0xd2,0x27,0x4b,0xd6,0xc8,0x3c,0x93,0xb6,0x15,0x0c,0xde,0x5b,0xd7,0x93,0xdd, -0xbe,0x85,0x62,0x34,0x17,0x8a,0x05,0x60,0xf0,0x8a,0x1c,0x5a,0x40,0x21,0x8d, -0x51,0x6c,0xb0,0x62,0xd8,0xb5,0xd4,0xf9,0xb1,0xd0,0x58,0x7a,0x7a,0x82,0x55, -0xb3,0xf9,0x53,0x71,0xde,0xd2,0xc9,0x37,0x8c,0xf6,0x5a,0x1f,0x2d,0xcd,0x7c, -0x67,0x02,0x03,0x01,0x00,0x01,0xa3,0x82,0x01,0x7f,0x30,0x82,0x01,0x7b,0x30, -0x09,0x06,0x03,0x55,0x1d,0x13,0x04,0x02,0x30,0x00,0x30,0x0e,0x06,0x03,0x55, -0x1d,0x0f,0x01,0x01,0xff,0x04,0x04,0x03,0x02,0x07,0x80,0x30,0x40,0x06,0x03, -0x55,0x1d,0x1f,0x04,0x39,0x30,0x37,0x30,0x35,0xa0,0x33,0xa0,0x31,0x86,0x2f, -0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x43,0x53,0x43,0x33,0x2d,0x32,0x30,0x30, -0x34,0x2d,0x63,0x72,0x6c,0x2e,0x76,0x65,0x72,0x69,0x73,0x69,0x67,0x6e,0x2e, -0x63,0x6f,0x6d,0x2f,0x43,0x53,0x43,0x33,0x2d,0x32,0x30,0x30,0x34,0x2e,0x63, -0x72,0x6c,0x30,0x44,0x06,0x03,0x55,0x1d,0x20,0x04,0x3d,0x30,0x3b,0x30,0x39, -0x06,0x0b,0x60,0x86,0x48,0x01,0x86,0xf8,0x45,0x01,0x07,0x17,0x03,0x30,0x2a, -0x30,0x28,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x02,0x01,0x16,0x1c,0x68, -0x74,0x74,0x70,0x73,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x76,0x65,0x72,0x69, -0x73,0x69,0x67,0x6e,0x2e,0x63,0x6f,0x6d,0x2f,0x72,0x70,0x61,0x30,0x13,0x06, -0x03,0x55,0x1d,0x25,0x04,0x0c,0x30,0x0a,0x06,0x08,0x2b,0x06,0x01,0x05,0x05, -0x07,0x03,0x03,0x30,0x75,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x01,0x01, -0x04,0x69,0x30,0x67,0x30,0x24,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x30, -0x01,0x86,0x18,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6f,0x63,0x73,0x70,0x2e, -0x76,0x65,0x72,0x69,0x73,0x69,0x67,0x6e,0x2e,0x63,0x6f,0x6d,0x30,0x3f,0x06, -0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x30,0x02,0x86,0x33,0x68,0x74,0x74,0x70, -0x3a,0x2f,0x2f,0x43,0x53,0x43,0x33,0x2d,0x32,0x30,0x30,0x34,0x2d,0x61,0x69, -0x61,0x2e,0x76,0x65,0x72,0x69,0x73,0x69,0x67,0x6e,0x2e,0x63,0x6f,0x6d,0x2f, -0x43,0x53,0x43,0x33,0x2d,0x32,0x30,0x30,0x34,0x2d,0x61,0x69,0x61,0x2e,0x63, -0x65,0x72,0x30,0x1f,0x06,0x03,0x55,0x1d,0x23,0x04,0x18,0x30,0x16,0x80,0x14, -0x08,0xf5,0x51,0xe8,0xfb,0xfe,0x3d,0x3d,0x64,0x36,0x7c,0x68,0xcf,0x5b,0x78, -0xa8,0xdf,0xb9,0xc5,0x37,0x30,0x11,0x06,0x09,0x60,0x86,0x48,0x01,0x86,0xf8, -0x42,0x01,0x01,0x04,0x04,0x03,0x02,0x04,0x10,0x30,0x16,0x06,0x0a,0x2b,0x06, -0x01,0x04,0x01,0x82,0x37,0x02,0x01,0x1b,0x04,0x08,0x30,0x06,0x01,0x01,0x00, -0x01,0x01,0xff,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01, -0x05,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x6a,0xa6,0x06,0xd0,0x33,0x18,0x64, -0xe2,0x69,0x82,0xee,0x6e,0x36,0x9e,0x9d,0x9a,0x0e,0x18,0xa8,0xac,0x9d,0x10, -0xed,0x01,0x3c,0xb9,0x61,0x04,0x62,0xf3,0x85,0x8f,0xcc,0x4f,0x2c,0x66,0x35, -0x54,0x25,0x45,0x8d,0x95,0x1c,0xd2,0x33,0xbe,0x2e,0xdd,0x7f,0x74,0xaf,0x03, -0x7b,0x86,0x63,0xb0,0xc9,0xe6,0xbd,0xc7,0x8e,0xde,0x03,0x18,0x98,0x82,0xc3, -0xbb,0xf8,0x15,0x99,0x1a,0xa9,0xdd,0xb9,0x5d,0xb9,0xbd,0x53,0x95,0x25,0x76, -0xfb,0x5c,0x53,0x90,0xea,0x01,0x0a,0xa0,0xb1,0xbf,0x09,0x1b,0x97,0x8f,0x40, -0xfa,0x85,0x12,0x74,0x01,0xdb,0xf6,0xdb,0x09,0xd6,0x5f,0x4f,0xd7,0x17,0xb4, -0xbf,0x9e,0x2f,0x86,0x52,0x5d,0x70,0x24,0x52,0x32,0x1e,0xa5,0x1d,0x39,0x8b, -0x66,0xf6,0xba,0x9b,0x69,0x8e,0x12,0x60,0xdb,0xb6,0xcf,0xe6,0x0d,0xd6,0x1c, -0x8f,0xd4,0x5b,0x4b,0x00,0xde,0x21,0x93,0xfb,0x6e,0xc7,0x3d,0xb4,0x66,0x0d, -0x29,0x0c,0x4e,0xe9,0x3f,0x94,0xd6,0xd6,0xdc,0xec,0xf8,0x53,0x3b,0x62,0xd5, -0x97,0x50,0x53,0x84,0x17,0xfe,0xe2,0xed,0x4c,0x23,0x0a,0x49,0xce,0x5b,0xe9, -0x70,0x31,0xc1,0x04,0x02,0x02,0x6c,0xb8,0x52,0xcd,0xc7,0x4e,0x70,0xb4,0x13, -0xd7,0xe0,0x92,0xba,0x44,0x1a,0x10,0x4c,0x6e,0x45,0xc6,0x86,0x04,0xc6,0x64, -0xd3,0x9c,0x6e,0xc1,0x9c,0xac,0x74,0x3d,0x77,0x06,0x5e,0x28,0x28,0x5c,0xf5, -0xe0,0x9c,0x19,0xd8,0xba,0x74,0x81,0x2d,0x67,0x77,0x93,0x8d,0xbf,0xd2,0x52, -0x00,0xe6,0xa5,0x38,0x4e,0x2e,0x73,0x66,0x7a }; -static const BYTE signedCRL[] = { 0x30, 0x45, 0x30, 0x2c, 0x30, 0x02, 0x06, - 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, - 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x18, 0x0f, - 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x30, 0x5a, 0x30, 0x02, 0x06, 0x00, 0x03, 0x11, 0x00, 0x0f, 0x0e, 0x0d, 0x0c, - 0x0b, 0x0a, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00 }; - -/* CBT hook to ensure a window (e.g., MessageBox) cannot be created */ -static HHOOK hook; -static LRESULT CALLBACK cbt_hook_proc(int code, WPARAM wp, LPARAM lp) -{ - return code == HCBT_CREATEWND ? 1: CallNextHookEx(hook, code, wp, lp); -} - -static BOOL (WINAPI *pCryptUIWizImport)(DWORD dwFlags, HWND hwndParent, - LPCWSTR pwszWizardTitle, PCCRYPTUI_WIZ_IMPORT_SRC_INFO pImportSrc, - HCERTSTORE hDestCertStore); - -static BOOL find_and_delete_cert_in_store(HCERTSTORE store, PCCERT_CONTEXT cert) -{ - CERT_ID id; - PCCERT_CONTEXT found; - - id.dwIdChoice = CERT_ID_ISSUER_SERIAL_NUMBER; - memcpy(&id.u.IssuerSerialNumber.Issuer, - &cert->pCertInfo->Issuer, sizeof(CERT_NAME_BLOB)); - memcpy(&id.u.IssuerSerialNumber.SerialNumber, - &cert->pCertInfo->SerialNumber, sizeof(CRYPT_INTEGER_BLOB)); - found = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, - CERT_FIND_CERT_ID, &id, NULL); - if (!found) - return FALSE; - - CertDeleteCertificateFromStore(found); - - return TRUE; -} - -static void test_crypt_ui_wiz_import(void) -{ - BOOL ret; - CRYPTUI_WIZ_IMPORT_SRC_INFO info; - HCERTSTORE store; - PCCERT_CONTEXT cert; - PCCRL_CONTEXT crl; - DWORD count; - - if (!pCryptUIWizImport) - { - skip("No CryptUIWizImport\n"); - return; - } - - /* Set CBT hook to disallow MessageBox and wizard creation in current - * thread. - */ - hook = SetWindowsHookExA(WH_CBT, cbt_hook_proc, 0, GetCurrentThreadId()); - - /* Brings up UI. Cancelling yields ret = 1. */ - if (0) - { - ret = pCryptUIWizImport(0, 0, NULL, NULL, NULL); - } - SetLastError(0xdeadbeef); - ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI, 0, NULL, NULL, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - memset(&info, 0, sizeof(info)); - SetLastError(0xdeadbeef); - ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI, 0, NULL, &info, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - info.dwSize = sizeof(info); - SetLastError(0xdeadbeef); - ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI, 0, NULL, &info, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - info.dwSubjectChoice = CRYPTUI_WIZ_IMPORT_SUBJECT_CERT_CONTEXT; - SetLastError(0xdeadbeef); - ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI, 0, NULL, &info, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI | CRYPTUI_WIZ_IMPORT_ALLOW_CERT, - 0, NULL, &info, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - /* Check allowed vs. given type mismatches */ - info.u.pCertContext = CertCreateCertificateContext(X509_ASN_ENCODING, - v1CertWithValidPubKey, sizeof(v1CertWithValidPubKey)); - SetLastError(0xdeadbeef); - ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI | CRYPTUI_WIZ_IMPORT_ALLOW_CRL, - 0, NULL, &info, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - CertFreeCertificateContext(info.u.pCertContext); - info.dwSubjectChoice = CRYPTUI_WIZ_IMPORT_SUBJECT_CRL_CONTEXT; - info.u.pCRLContext = CertCreateCRLContext(X509_ASN_ENCODING, - signedCRL, sizeof(signedCRL)); - SetLastError(0xdeadbeef); - ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI | CRYPTUI_WIZ_IMPORT_ALLOW_CERT, - 0, NULL, &info, NULL); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - CertFreeCRLContext(info.u.pCRLContext); - /* Imports the following cert--self-signed, with no basic constraints set-- - * to the CA store. Puts up a dialog at the end if it succeeds or fails. - */ - info.dwSubjectChoice = CRYPTUI_WIZ_IMPORT_SUBJECT_CERT_CONTEXT; - info.u.pCertContext = CertCreateCertificateContext(X509_ASN_ENCODING, - v1CertWithValidPubKey, sizeof(v1CertWithValidPubKey)); - ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI, 0, NULL, &info, NULL); - ok(ret, "CryptUIWizImport failed: %08x\n", GetLastError()); - if (ret) - { - static const WCHAR CA[] = { 'C','A',0 }; - HCERTSTORE ca = CertOpenStore(CERT_STORE_PROV_SYSTEM_W, 0, 0, - CERT_SYSTEM_STORE_CURRENT_USER, CA); - - if (ca) - { - ret = find_and_delete_cert_in_store(ca, info.u.pCertContext); - ok(ret || - broken(!ret) /* Win9x/NT4 */, - "expected to find v1CertWithValidPubKey in CA store\n"); - CertCloseStore(ca, 0); - } - } - CertFreeCertificateContext(info.u.pCertContext); - /* Imports the following cert--not self-signed, with a basic constraints2 - * extensions--to the "AddressBook" store. Puts up a dialog at the end if - * it succeeds or fails. - */ - info.u.pCertContext = CertCreateCertificateContext(X509_ASN_ENCODING, - iTunesCert3, sizeof(iTunesCert3)); - ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI, 0, NULL, &info, NULL); - ok(ret, "CryptUIWizImport failed: %08x\n", GetLastError()); - if (ret) - { - static const WCHAR AddressBook[] = { 'A','d','d','r','e','s','s', - 'B','o','o','k',0 }; - HCERTSTORE addressBook = CertOpenStore(CERT_STORE_PROV_SYSTEM_W, 0, 0, - CERT_SYSTEM_STORE_CURRENT_USER, AddressBook); - - if (addressBook) - { - ret = find_and_delete_cert_in_store(addressBook, - info.u.pCertContext); - ok(ret || - broken(!ret), /* Windows 2000 and earlier */ - "expected to find iTunesCert3 in AddressBook store\n"); - CertCloseStore(addressBook, 0); - } - } - /* Displays the wizard, but disables the "Certificate store" edit and - * the Browse button. Confusingly, the "Place all certificates in the - * following store" radio button is not disabled. - */ - if (0) - { - ret = pCryptUIWizImport(CRYPTUI_WIZ_IMPORT_NO_CHANGE_DEST_STORE, 0, - NULL, &info, NULL); - ok(ret, "CryptUIWizImport failed: %08x\n", GetLastError()); - } - store = CertOpenStore(CERT_STORE_PROV_MEMORY, X509_ASN_ENCODING, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - /* Displays the wizard, but sets the "Certificate store" edit to the - * string "Determined by the program", and disables it and the Browse - * button, as well as the "Automatically select the certificate store - * based on the type of certificate" radio button. - */ - if (0) - { - ret = pCryptUIWizImport(CRYPTUI_WIZ_IMPORT_NO_CHANGE_DEST_STORE, 0, - NULL, &info, store); - ok(ret, "CryptUIWizImport failed: %08x\n", GetLastError()); - } - ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI | - CRYPTUI_WIZ_IMPORT_NO_CHANGE_DEST_STORE, 0, NULL, &info, store); - ok(ret, "CryptUIWizImport failed: %08x\n", GetLastError()); - ret = find_and_delete_cert_in_store(store, info.u.pCertContext); - ok(ret || - broken(!ret) /* Win9x/NT4 */, - "expected to find iTunesCert3 in memory store\n"); - CertFreeCertificateContext(info.u.pCertContext); - CertCloseStore(store, 0); - - info.u.pCertContext = CertCreateCertificateContext(X509_ASN_ENCODING, - iTunesCert1, sizeof(iTunesCert1)); - ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI, 0, NULL, &info, NULL); - ok(ret, "CryptUIWizImport failed: %08x\n", GetLastError()); - if (ret) - { - static const WCHAR AddressBook[] = { 'A','d','d','r','e','s','s', - 'B','o','o','k',0 }; - HCERTSTORE addressBook = CertOpenStore(CERT_STORE_PROV_SYSTEM_W, 0, 0, - CERT_SYSTEM_STORE_CURRENT_USER, AddressBook); - - if (addressBook) - { - ret = find_and_delete_cert_in_store(addressBook, - info.u.pCertContext); - ok(ret || - broken(!ret), /* Windows 2000 and earlier */ - "expected to find iTunesCert1 in AddressBook store\n"); - CertCloseStore(addressBook, 0); - } - } - CertFreeCertificateContext(info.u.pCertContext); - - info.u.pCertContext = CertCreateCertificateContext(X509_ASN_ENCODING, - iTunesCert2, sizeof(iTunesCert2)); - ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI, 0, NULL, &info, NULL); - ok(ret, "CryptUIWizImport failed: %08x\n", GetLastError()); - if (ret) - { - static const WCHAR CA[] = { 'C','A',0 }; - HCERTSTORE ca = CertOpenStore(CERT_STORE_PROV_SYSTEM_W, 0, 0, - CERT_SYSTEM_STORE_CURRENT_USER, CA); - - if (ca) - { - ret = find_and_delete_cert_in_store(ca, info.u.pCertContext); - ok(ret || - broken(!ret) /* Win9x/NT4 */, - "expected to find iTunesCert2 in CA store\n"); - CertCloseStore(ca, 0); - } - } - CertFreeCertificateContext(info.u.pCertContext); - - info.u.hCertStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - CertAddEncodedCertificateToStore(info.u.hCertStore, X509_ASN_ENCODING, - v1CertWithValidPubKey, sizeof(v1CertWithValidPubKey), - CERT_STORE_ADD_ALWAYS, NULL); - CertAddEncodedCRLToStore(info.u.hCertStore, X509_ASN_ENCODING, signedCRL, - sizeof(signedCRL), CERT_STORE_ADD_ALWAYS, NULL); - info.dwSubjectChoice = CRYPTUI_WIZ_IMPORT_SUBJECT_CERT_STORE; - /* The ALLOW flags aren't allowed with a store as the source if the source - * contains types other than those allowed. - */ - store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - SetLastError(0xdeadbeef); - ret = CryptUIWizImport(CRYPTUI_WIZ_NO_UI | CRYPTUI_WIZ_IMPORT_ALLOW_CERT, - 0, NULL, &info, store); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptUIWizImport(CRYPTUI_WIZ_NO_UI | CRYPTUI_WIZ_IMPORT_ALLOW_CRL, - 0, NULL, &info, store); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = CryptUIWizImport(CRYPTUI_WIZ_NO_UI | - CRYPTUI_WIZ_IMPORT_NO_CHANGE_DEST_STORE | - CRYPTUI_WIZ_IMPORT_ALLOW_CERT | CRYPTUI_WIZ_IMPORT_ALLOW_CRL, 0, NULL, - &info, store); - ok(ret, "CryptUIWizImport failed: %08x\n", GetLastError()); - if (ret) - { - count = 0; - cert = NULL; - do { - cert = CertEnumCertificatesInStore(store, cert); - if (cert) - count++; - } while (cert); - ok(count == 1, "expected 1 cert, got %d\n", count); - count = 0; - crl = NULL; - do { - crl = CertEnumCRLsInStore(store, crl); - if (crl) - count++; - } while (crl); - ok(count == 1, "expected 1 CRL, got %d\n", count); - } - CertCloseStore(store, 0); - CertCloseStore(info.u.hCertStore, 0); - - /* If the ALLOW flags match the content of the store, the store can be - * imported. - */ - info.u.hCertStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - CertAddEncodedCertificateToStore(info.u.hCertStore, X509_ASN_ENCODING, - v1CertWithValidPubKey, sizeof(v1CertWithValidPubKey), - CERT_STORE_ADD_ALWAYS, NULL); - store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - SetLastError(0xdeadbeef); - ret = CryptUIWizImport(CRYPTUI_WIZ_NO_UI | CRYPTUI_WIZ_IMPORT_ALLOW_CERT, - 0, NULL, &info, store); - ok(ret, "CryptUIWizImport failed: %08x\n", GetLastError()); - if (ret) - { - count = 0; - cert = NULL; - do { - cert = CertEnumCertificatesInStore(store, cert); - if (cert) - count++; - } while (cert); - ok(count == 1, "expected 1 cert, got %d\n", count); - count = 0; - crl = NULL; - do { - crl = CertEnumCRLsInStore(store, crl); - if (crl) - count++; - } while (crl); - ok(count == 0, "expected 0 CRLs, got %d\n", count); - } - SetLastError(0xdeadbeef); - ret = CryptUIWizImport(CRYPTUI_WIZ_NO_UI | CRYPTUI_WIZ_IMPORT_ALLOW_CRL, - 0, NULL, &info, store); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - CertCloseStore(store, 0); - CertCloseStore(info.u.hCertStore, 0); - - /* Again, if the ALLOW flags match the content of the store, the store can - * be imported. - */ - info.u.hCertStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - CertAddEncodedCRLToStore(info.u.hCertStore, X509_ASN_ENCODING, signedCRL, - sizeof(signedCRL), CERT_STORE_ADD_ALWAYS, NULL); - store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, - CERT_STORE_CREATE_NEW_FLAG, NULL); - SetLastError(0xdeadbeef); - ret = CryptUIWizImport(CRYPTUI_WIZ_NO_UI | CRYPTUI_WIZ_IMPORT_ALLOW_CRL, - 0, NULL, &info, store); - ok(ret, "CryptUIWizImport failed: %08x\n", GetLastError()); - if (ret) - { - count = 0; - cert = NULL; - do { - cert = CertEnumCertificatesInStore(store, cert); - if (cert) - count++; - } while (cert); - ok(count == 0, "expected 0 certs, got %d\n", count); - count = 0; - crl = NULL; - do { - crl = CertEnumCRLsInStore(store, crl); - if (crl) - count++; - } while (crl); - ok(count == 1, "expected 1 CRL, got %d\n", count); - } - SetLastError(0xdeadbeef); - ret = CryptUIWizImport(CRYPTUI_WIZ_NO_UI | CRYPTUI_WIZ_IMPORT_ALLOW_CERT, - 0, NULL, &info, store); - ok(!ret && GetLastError() == E_INVALIDARG, - "expected E_INVALIDARG, got %08x\n", GetLastError()); - CertCloseStore(store, 0); - CertCloseStore(info.u.hCertStore, 0); - - UnhookWindowsHookEx(hook); -} - -START_TEST(cryptui) -{ - HMODULE lib = LoadLibraryA("cryptui"); - - if (lib) - { - pCryptUIWizImport = (void *)GetProcAddress(lib, "CryptUIWizImport"); - - test_crypt_ui_wiz_import(); - FreeLibrary(lib); - } -} diff --git a/rostests/winetests/cryptui/cryptui.rbuild b/rostests/winetests/cryptui/cryptui.rbuild deleted file mode 100644 index 13b7702ce10..00000000000 --- a/rostests/winetests/cryptui/cryptui.rbuild +++ /dev/null @@ -1,11 +0,0 @@ - - . - - cryptui.c - testlist.c - wine - cryptui - crypt32 - user32 - ntdll - diff --git a/rostests/winetests/cryptui/testlist.c b/rostests/winetests/cryptui/testlist.c deleted file mode 100644 index 315bb4fe129..00000000000 --- a/rostests/winetests/cryptui/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_cryptui(void); - -const struct test winetest_testlist[] = -{ - { "cryptui", func_cryptui }, - { 0, 0 } -}; diff --git a/rostests/winetests/directory.rbuild b/rostests/winetests/directory.rbuild deleted file mode 100644 index 76eab73420d..00000000000 --- a/rostests/winetests/directory.rbuild +++ /dev/null @@ -1,274 +0,0 @@ - - - - - -Wno-unused-value - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rostests/winetests/dnsapi/CMakeLists.txt b/rostests/winetests/dnsapi/CMakeLists.txt deleted file mode 100644 index ba5ffd06001..00000000000 --- a/rostests/winetests/dnsapi/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(dnsapi_winetest name.c record.c testlist.c) -target_link_libraries(dnsapi_winetest wine) -set_module_type(dnsapi_winetest win32cui) -add_importlibs(dnsapi_winetest dnsapi msvcrt kernel32 ntdll) -add_cd_file(TARGET dnsapi_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/dnsapi/dnsapi.rbuild b/rostests/winetests/dnsapi/dnsapi.rbuild deleted file mode 100644 index 918d8d6f49e..00000000000 --- a/rostests/winetests/dnsapi/dnsapi.rbuild +++ /dev/null @@ -1,10 +0,0 @@ - - . - - name.c - record.c - testlist.c - wine - dnsapi - ntdll - diff --git a/rostests/winetests/dnsapi/name.c b/rostests/winetests/dnsapi/name.c deleted file mode 100644 index d472687b9d3..00000000000 --- a/rostests/winetests/dnsapi/name.c +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Tests for name handling functions - * - * Copyright 2006 Hans Leidekker - * - * 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 "windef.h" -#include "winbase.h" -#include "winnls.h" -#include "windns.h" - -#include "wine/test.h" - -static const struct -{ - LPCSTR name; - DNS_NAME_FORMAT format; - DNS_STATUS status; -} -test_data[] = -{ - { "", DnsNameDomain, ERROR_INVALID_NAME }, - { ".", DnsNameDomain, ERROR_SUCCESS }, - { "..", DnsNameDomain, ERROR_INVALID_NAME }, - { ".a", DnsNameDomain, ERROR_INVALID_NAME }, - { "a.", DnsNameDomain, ERROR_SUCCESS }, - { "a..", DnsNameDomain, ERROR_INVALID_NAME }, - { "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", DnsNameDomain, ERROR_INVALID_NAME }, - { "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", DnsNameDomain, ERROR_INVALID_NAME }, - { "a.?", DnsNameDomain, DNS_ERROR_INVALID_NAME_CHAR }, - { "a.*", DnsNameDomain, DNS_ERROR_INVALID_NAME_CHAR }, - { "a ", DnsNameDomain, DNS_ERROR_INVALID_NAME_CHAR }, - { "a._b", DnsNameDomain, DNS_ERROR_NON_RFC_NAME }, - { "123", DnsNameDomain, DNS_ERROR_NUMERIC_NAME }, - { "123.456", DnsNameDomain, DNS_ERROR_NUMERIC_NAME }, - { "a.b", DnsNameDomain, ERROR_SUCCESS }, - - { "", DnsNameDomainLabel, ERROR_INVALID_NAME }, - { ".", DnsNameDomainLabel, ERROR_INVALID_NAME }, - { "..", DnsNameDomainLabel, ERROR_INVALID_NAME }, - { ".c", DnsNameDomainLabel, ERROR_INVALID_NAME }, - { "c.", DnsNameDomainLabel, ERROR_INVALID_NAME }, - { "c..", DnsNameDomainLabel, ERROR_INVALID_NAME }, - { "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc", DnsNameDomainLabel, ERROR_INVALID_NAME }, - { "?", DnsNameDomainLabel, DNS_ERROR_INVALID_NAME_CHAR }, - { "*", DnsNameDomainLabel, DNS_ERROR_INVALID_NAME_CHAR }, - { "c ", DnsNameDomainLabel, DNS_ERROR_INVALID_NAME_CHAR }, - { "_c", DnsNameDomainLabel, DNS_ERROR_NON_RFC_NAME }, - { "456", DnsNameDomainLabel, ERROR_SUCCESS }, - { "456.789", DnsNameDomainLabel, ERROR_INVALID_NAME }, - { "c.d", DnsNameDomainLabel, ERROR_INVALID_NAME }, - - { "", DnsNameHostnameFull, ERROR_INVALID_NAME }, - { ".", DnsNameHostnameFull, ERROR_SUCCESS }, - { "..", DnsNameHostnameFull, ERROR_INVALID_NAME }, - { ".e", DnsNameHostnameFull, ERROR_INVALID_NAME }, - { "e.", DnsNameHostnameFull, ERROR_SUCCESS }, - { "e..", DnsNameHostnameFull, ERROR_INVALID_NAME }, - { "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", DnsNameDomain, ERROR_INVALID_NAME }, - { "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", DnsNameHostnameFull, ERROR_INVALID_NAME }, - { "?", DnsNameHostnameLabel, DNS_ERROR_INVALID_NAME_CHAR }, - { "e.?", DnsNameHostnameFull, DNS_ERROR_INVALID_NAME_CHAR }, - { "e.*", DnsNameHostnameFull, DNS_ERROR_INVALID_NAME_CHAR }, - { "e ", DnsNameHostnameFull, DNS_ERROR_INVALID_NAME_CHAR }, - { "e._f", DnsNameHostnameFull, DNS_ERROR_NON_RFC_NAME }, - { "789", DnsNameHostnameFull, DNS_ERROR_NUMERIC_NAME }, - { "789.456", DnsNameHostnameFull, DNS_ERROR_NUMERIC_NAME }, - { "e.f", DnsNameHostnameFull, ERROR_SUCCESS }, - - { "", DnsNameHostnameLabel, ERROR_INVALID_NAME }, - { ".", DnsNameHostnameLabel, ERROR_INVALID_NAME }, - { "..", DnsNameHostnameLabel, ERROR_INVALID_NAME }, - { ".g", DnsNameHostnameLabel, ERROR_INVALID_NAME }, - { "g.", DnsNameHostnameLabel, ERROR_INVALID_NAME }, - { "g..", DnsNameHostnameLabel, ERROR_INVALID_NAME }, - { "gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg", DnsNameHostnameLabel, ERROR_INVALID_NAME }, - { "*", DnsNameHostnameLabel, DNS_ERROR_INVALID_NAME_CHAR }, - { "g ", DnsNameHostnameLabel, DNS_ERROR_INVALID_NAME_CHAR }, - { "_g", DnsNameHostnameLabel, DNS_ERROR_NON_RFC_NAME }, - { "123", DnsNameHostnameLabel, DNS_ERROR_NUMERIC_NAME }, - { "123.456", DnsNameHostnameLabel, ERROR_INVALID_NAME }, - { "g.h", DnsNameHostnameLabel, ERROR_INVALID_NAME }, - - { "", DnsNameWildcard, ERROR_INVALID_NAME }, - { ".", DnsNameWildcard, ERROR_INVALID_NAME }, - { "..", DnsNameWildcard, ERROR_INVALID_NAME }, - { ".j", DnsNameWildcard, ERROR_INVALID_NAME }, - { "j.", DnsNameWildcard, ERROR_INVALID_NAME }, - { "j..", DnsNameWildcard, ERROR_INVALID_NAME }, - { "jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj", DnsNameWildcard, ERROR_INVALID_NAME }, - { "jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj.jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj.jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj.jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj", DnsNameWildcard, ERROR_INVALID_NAME }, - { "?", DnsNameWildcard, ERROR_INVALID_NAME }, - { "i ", DnsNameWildcard, ERROR_INVALID_NAME }, - { "_i", DnsNameWildcard, ERROR_INVALID_NAME }, - { "123", DnsNameWildcard, ERROR_INVALID_NAME }, - { "123.456", DnsNameWildcard, ERROR_INVALID_NAME }, - { "i.j", DnsNameWildcard, ERROR_INVALID_NAME }, - { "*", DnsNameWildcard, ERROR_SUCCESS }, - { "*j", DnsNameWildcard, DNS_ERROR_INVALID_NAME_CHAR }, - { "*.j", DnsNameWildcard, ERROR_SUCCESS }, - { "i.*", DnsNameWildcard, ERROR_INVALID_NAME }, - - { "", DnsNameSrvRecord, ERROR_INVALID_NAME }, - { ".", DnsNameSrvRecord, ERROR_INVALID_NAME }, - { "..", DnsNameSrvRecord, ERROR_INVALID_NAME }, - { ".k", DnsNameSrvRecord, ERROR_INVALID_NAME }, - { "k.", DnsNameSrvRecord, ERROR_INVALID_NAME }, - { "k..", DnsNameSrvRecord, ERROR_INVALID_NAME }, - { "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk", DnsNameSrvRecord, ERROR_INVALID_NAME }, - { "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk.kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk.kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk.kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk", DnsNameSrvRecord, ERROR_INVALID_NAME }, - { "?", DnsNameSrvRecord, ERROR_INVALID_NAME }, - { "k ", DnsNameSrvRecord, ERROR_INVALID_NAME }, - { "_k", DnsNameSrvRecord, ERROR_SUCCESS }, - { "123", DnsNameSrvRecord, ERROR_INVALID_NAME }, - { "123.456", DnsNameSrvRecord, ERROR_INVALID_NAME }, - { "k.l", DnsNameSrvRecord, ERROR_INVALID_NAME }, - { "_", DnsNameSrvRecord, DNS_ERROR_NON_RFC_NAME }, - { "_k.l", DnsNameSrvRecord, ERROR_SUCCESS }, - { "k._l", DnsNameSrvRecord, ERROR_INVALID_NAME } -}; - -static void test_DnsValidateName_A( void ) -{ - unsigned int i; - DNS_STATUS status; - - status = DnsValidateName_A( NULL, DnsNameDomain ); - ok( status == ERROR_INVALID_NAME, "succeeded unexpectedly\n" ); - - for (i = 0; i < sizeof(test_data) / sizeof(test_data[0]); i++) - { - status = DnsValidateName_A( test_data[i].name, test_data[i].format ); - ok( status == test_data[i].status, "%d: \'%s\': got %d, expected %d\n", - i, test_data[i].name, status, test_data[i].status ); - } -} - -static void test_DnsNameCompare_A( void ) -{ - static CHAR empty[] = "", - dot[] = ".", - dotdot[] = "..", - A[] = "A", - a[] = "a", - B[] = "B", - b[] = "b", - A_dot_B[] = "A.B", - a_dot_a[] = "a.a", - a_dot_b[] = "a.b", - a_dot_b_dot[] = "a.b.", - a_dot_b_dotdot[] = "a.b..", - B_dot_A[] = "B.A", - b_dot_a[] = "b.a", - b_dot_a_dot[] = "b.a.", - b_dot_a_dotdot[] = "b.a.."; - - ok( DnsNameCompare_A( NULL, NULL ) == TRUE, "failed unexpectedly\n" ); - - ok( DnsNameCompare_A( empty, empty ) == TRUE, "failed unexpectedly\n" ); - ok( DnsNameCompare_A( dot, empty ) == TRUE, "failed unexpectedly\n" ); - ok( DnsNameCompare_A( empty, dot ) == TRUE, "failed unexpectedly\n" ); - ok( DnsNameCompare_A( dot, dotdot ) == TRUE, "failed unexpectedly\n" ); - ok( DnsNameCompare_A( dotdot, dot ) == TRUE, "failed unexpectedly\n" ); - ok( DnsNameCompare_A( a, a ) == TRUE, "failed unexpectedly\n" ); - ok( DnsNameCompare_A( a, A ) == TRUE, "failed unexpectedly\n" ); - ok( DnsNameCompare_A( A, a ) == TRUE, "failed unexpectedly\n" ); - ok( DnsNameCompare_A( a_dot_b, A_dot_B ) == TRUE, "failed unexpectedly\n" ); - ok( DnsNameCompare_A( a_dot_b, a_dot_b ) == TRUE, "failed unexpectedly\n" ); - ok( DnsNameCompare_A( a_dot_b_dot, a_dot_b_dot ) == TRUE, "failed unexpectedly\n" ); - ok( DnsNameCompare_A( a_dot_b_dotdot, a_dot_b_dotdot ) == TRUE, "failed unexpectedly\n" ); - - ok( DnsNameCompare_A( empty, NULL ) == FALSE, "succeeded unexpectedly\n" ); - ok( DnsNameCompare_A( NULL, empty ) == FALSE, "succeeded unexpectedly\n" ); - - ok( DnsNameCompare_A( a, b ) == FALSE, "succeeded unexpectedly\n" ); - ok( DnsNameCompare_A( a, B ) == FALSE, "succeeded unexpectedly\n" ); - ok( DnsNameCompare_A( A, b ) == FALSE, "succeeded unexpectedly\n" ); - ok( DnsNameCompare_A( a_dot_b, B_dot_A ) == FALSE, "succeeded unexpectedly\n" ); - ok( DnsNameCompare_A( a_dot_b_dot, b_dot_a_dot ) == FALSE, "succeeded unexpectedly\n" ); - ok( DnsNameCompare_A( a_dot_b, a_dot_a ) == FALSE, "succeeded unexpectedly\n" ); - ok( DnsNameCompare_A( a_dot_b_dotdot, b_dot_a_dotdot ) == FALSE, "succeeded unexpectedly\n" ); - ok( DnsNameCompare_A( a_dot_b_dot, b_dot_a_dotdot ) == FALSE, "succeeded unexpectedly\n" ); - ok( DnsNameCompare_A( a_dot_b_dotdot, b_dot_a_dot ) == FALSE, "succeeded unexpectedly\n" ); - ok( DnsNameCompare_A( a_dot_b_dot, b_dot_a ) == FALSE, "succeeded unexpectedly\n" ); - ok( DnsNameCompare_A( a_dot_b, b_dot_a_dot ) == FALSE, "succeeded unexpectedly\n" ); -} - -START_TEST(name) -{ - test_DnsValidateName_A(); - test_DnsNameCompare_A(); -} diff --git a/rostests/winetests/dnsapi/record.c b/rostests/winetests/dnsapi/record.c deleted file mode 100644 index 4e97d85d756..00000000000 --- a/rostests/winetests/dnsapi/record.c +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Tests for record handling functions - * - * Copyright 2006 Hans Leidekker - * - * 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 "windef.h" -#include "winbase.h" -#include "winnls.h" -#include "windns.h" - -#include "wine/test.h" - -static char name1[] = "localhost"; -static char name2[] = "LOCALHOST"; - -static DNS_RECORDA r1 = { NULL, name1, DNS_TYPE_A, sizeof(DNS_A_DATA), { 0 }, 1200, 0, { { 0xffffffff } } }; -static DNS_RECORDA r2 = { NULL, name1, DNS_TYPE_A, sizeof(DNS_A_DATA), { 0 }, 1200, 0, { { 0xffffffff } } }; -static DNS_RECORDA r3 = { NULL, name1, DNS_TYPE_A, sizeof(DNS_A_DATA), { 0 }, 1200, 0, { { 0xffffffff } } }; - -static void test_DnsRecordCompare( void ) -{ - ok( DnsRecordCompare( &r1, &r1 ) == TRUE, "failed unexpectedly\n" ); - - r2.pName = name2; - ok( DnsRecordCompare( &r1, &r2 ) == TRUE, "failed unexpectedly\n" ); - - r2.Flags.S.CharSet = DnsCharSetUnicode; - ok( DnsRecordCompare( &r1, &r2 ) == FALSE, "succeeded unexpectedly\n" ); - - r2.Flags.S.CharSet = DnsCharSetAnsi; - ok( DnsRecordCompare( &r1, &r2 ) == FALSE, "succeeded unexpectedly\n" ); - - r1.Flags.S.CharSet = DnsCharSetAnsi; - ok( DnsRecordCompare( &r1, &r2 ) == TRUE, "failed unexpectedly\n" ); - - r1.dwTtl = 0; - ok( DnsRecordCompare( &r1, &r2 ) == TRUE, "failed unexpectedly\n" ); - - r2.Data.A.IpAddress = 0; - ok( DnsRecordCompare( &r1, &r2 ) == FALSE, "succeeded unexpectedly\n" ); -} - -static void test_DnsRecordSetCompare( void ) -{ - DNS_RECORD *diff1; - DNS_RECORD *diff2; - DNS_RRSET rr1, rr2; - - r1.Flags.DW = 0x2019; - r2.Flags.DW = 0x2019; - r2.Data.A.IpAddress = 0xffffffff; - - DNS_RRSET_INIT( rr1 ); - DNS_RRSET_INIT( rr2 ); - - DNS_RRSET_ADD( rr1, &r1 ); - DNS_RRSET_ADD( rr2, &r2 ); - - DNS_RRSET_TERMINATE( rr1 ); - DNS_RRSET_TERMINATE( rr2 ); - - ok( DnsRecordSetCompare( NULL, NULL, NULL, NULL ) == FALSE, "succeeded unexpectedly\n" ); - ok( DnsRecordSetCompare( rr1.pFirstRR, NULL, NULL, NULL ) == FALSE, "succeeded unexpectedly\n" ); - ok( DnsRecordSetCompare( NULL, rr2.pFirstRR, NULL, NULL ) == FALSE, "succeeded unexpectedly\n" ); - - diff1 = NULL; - diff2 = NULL; - - ok( DnsRecordSetCompare( NULL, NULL, &diff1, &diff2 ) == FALSE, "succeeded unexpectedly\n" ); - ok( diff1 == NULL && diff2 == NULL, "unexpected result: %p, %p\n", diff1, diff2 ); - - ok( DnsRecordSetCompare( rr1.pFirstRR, NULL, &diff1, &diff2 ) == FALSE, "succeeded unexpectedly\n" ); - ok( diff1 != NULL && diff2 == NULL, "unexpected result: %p, %p\n", diff1, diff2 ); - DnsRecordListFree( diff1, DnsFreeRecordList ); - - ok( DnsRecordSetCompare( NULL, rr2.pFirstRR, &diff1, &diff2 ) == FALSE, "succeeded unexpectedly\n" ); - ok( diff1 == NULL && diff2 != NULL, "unexpected result: %p, %p\n", diff1, diff2 ); - DnsRecordListFree( diff2, DnsFreeRecordList ); - - ok( DnsRecordSetCompare( rr1.pFirstRR, rr2.pFirstRR, NULL, &diff2 ) == TRUE, "failed unexpectedly\n" ); - ok( diff2 == NULL, "unexpected result: %p\n", diff2 ); - - ok( DnsRecordSetCompare( rr1.pFirstRR, rr2.pFirstRR, &diff1, NULL ) == TRUE, "failed unexpectedly\n" ); - ok( diff1 == NULL, "unexpected result: %p\n", diff1 ); - - ok( DnsRecordSetCompare( rr1.pFirstRR, rr2.pFirstRR, &diff1, &diff2 ) == TRUE, "failed unexpectedly\n" ); - ok( diff1 == NULL && diff2 == NULL, "unexpected result: %p, %p\n", diff1, diff2 ); - - r2.Data.A.IpAddress = 0; - - ok( DnsRecordSetCompare( rr1.pFirstRR, rr2.pFirstRR, NULL, &diff2 ) == FALSE, "succeeded unexpectedly\n" ); - DnsRecordListFree( diff2, DnsFreeRecordList ); - - ok( DnsRecordSetCompare( rr1.pFirstRR, rr2.pFirstRR, &diff1, NULL ) == FALSE, "succeeded unexpectedly\n" ); - DnsRecordListFree( diff1, DnsFreeRecordList ); - - ok( DnsRecordSetCompare( rr1.pFirstRR, rr2.pFirstRR, &diff1, &diff2 ) == FALSE, "succeeded unexpectedly\n" ); - DnsRecordListFree( diff1, DnsFreeRecordList ); - DnsRecordListFree( diff2, DnsFreeRecordList ); -} - -static void test_DnsRecordSetDetach( void ) -{ - DNS_RRSET rr; - DNS_RECORDA *r, *s; - - DNS_RRSET_INIT( rr ); - DNS_RRSET_ADD( rr, &r1 ); - DNS_RRSET_ADD( rr, &r2 ); - DNS_RRSET_ADD( rr, &r3 ); - DNS_RRSET_TERMINATE( rr ); - - ok( !DnsRecordSetDetach( NULL ), "succeeded unexpectedly\n" ); - - r = rr.pFirstRR; - s = DnsRecordSetDetach( r ); - - ok( s == &r3, "failed unexpectedly: got %p, expected %p\n", s, &r3 ); - ok( r == &r1, "failed unexpectedly: got %p, expected %p\n", r, &r1 ); - ok( !r2.pNext, "failed unexpectedly\n" ); -} - -START_TEST(record) -{ - test_DnsRecordCompare(); - test_DnsRecordSetCompare(); - test_DnsRecordSetDetach(); -} diff --git a/rostests/winetests/dnsapi/testlist.c b/rostests/winetests/dnsapi/testlist.c deleted file mode 100644 index 5ca23fe84a1..00000000000 --- a/rostests/winetests/dnsapi/testlist.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_name(void); -extern void func_record(void); - -const struct test winetest_testlist[] = -{ - { "name", func_name }, - { "record", func_record }, - { 0, 0 } -}; diff --git a/rostests/winetests/dsound/CMakeLists.txt b/rostests/winetests/dsound/CMakeLists.txt deleted file mode 100644 index d88e7a96bb0..00000000000 --- a/rostests/winetests/dsound/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - capture.c - ds3d8.c - ds3d.c - dsound8.c - dsound.c - duplex.c - propset.c - testlist.c) - -add_executable(dsound_winetest ${SOURCE}) -target_link_libraries(dsound_winetest wine uuid dxguid) -set_module_type(dsound_winetest win32cui) -add_importlibs(dsound_winetest dsound ole32 user32 msvcrt kernel32 ntdll) -add_cd_file(TARGET dsound_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/dsound/capture.c b/rostests/winetests/dsound/capture.c deleted file mode 100644 index 87a5a59aca7..00000000000 --- a/rostests/winetests/dsound/capture.c +++ /dev/null @@ -1,709 +0,0 @@ -/* - * Unit tests for capture functions - * - * Copyright (c) 2002 Francois Gouget - * Copyright (c) 2003 Robert Reif - * - * 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 "initguid.h" -#include "windows.h" -#include "wine/test.h" -#include "dsound.h" -#include "mmreg.h" -#include "dsconf.h" - -#include "dsound_test.h" - -#define NOTIFICATIONS 5 - -static HRESULT (WINAPI *pDirectSoundCaptureCreate)(LPCGUID,LPDIRECTSOUNDCAPTURE*,LPUNKNOWN)=NULL; -static HRESULT (WINAPI *pDirectSoundCaptureEnumerateA)(LPDSENUMCALLBACKA,LPVOID)=NULL; - -static const char * get_format_str(WORD format) -{ - static char msg[32]; -#define WAVE_FORMAT(f) case f: return #f - switch (format) { - WAVE_FORMAT(WAVE_FORMAT_PCM); - WAVE_FORMAT(WAVE_FORMAT_ADPCM); - WAVE_FORMAT(WAVE_FORMAT_IBM_CVSD); - WAVE_FORMAT(WAVE_FORMAT_ALAW); - WAVE_FORMAT(WAVE_FORMAT_MULAW); - WAVE_FORMAT(WAVE_FORMAT_OKI_ADPCM); - WAVE_FORMAT(WAVE_FORMAT_IMA_ADPCM); - WAVE_FORMAT(WAVE_FORMAT_MEDIASPACE_ADPCM); - WAVE_FORMAT(WAVE_FORMAT_SIERRA_ADPCM); - WAVE_FORMAT(WAVE_FORMAT_G723_ADPCM); - WAVE_FORMAT(WAVE_FORMAT_DIGISTD); - WAVE_FORMAT(WAVE_FORMAT_DIGIFIX); - WAVE_FORMAT(WAVE_FORMAT_DIALOGIC_OKI_ADPCM); - WAVE_FORMAT(WAVE_FORMAT_YAMAHA_ADPCM); - WAVE_FORMAT(WAVE_FORMAT_SONARC); - WAVE_FORMAT(WAVE_FORMAT_DSPGROUP_TRUESPEECH); - WAVE_FORMAT(WAVE_FORMAT_ECHOSC1); - WAVE_FORMAT(WAVE_FORMAT_AUDIOFILE_AF36); - WAVE_FORMAT(WAVE_FORMAT_APTX); - WAVE_FORMAT(WAVE_FORMAT_AUDIOFILE_AF10); - WAVE_FORMAT(WAVE_FORMAT_DOLBY_AC2); - WAVE_FORMAT(WAVE_FORMAT_GSM610); - WAVE_FORMAT(WAVE_FORMAT_ANTEX_ADPCME); - WAVE_FORMAT(WAVE_FORMAT_CONTROL_RES_VQLPC); - WAVE_FORMAT(WAVE_FORMAT_DIGIREAL); - WAVE_FORMAT(WAVE_FORMAT_DIGIADPCM); - WAVE_FORMAT(WAVE_FORMAT_CONTROL_RES_CR10); - WAVE_FORMAT(WAVE_FORMAT_NMS_VBXADPCM); - WAVE_FORMAT(WAVE_FORMAT_G721_ADPCM); - WAVE_FORMAT(WAVE_FORMAT_MPEG); - WAVE_FORMAT(WAVE_FORMAT_MPEGLAYER3); - WAVE_FORMAT(WAVE_FORMAT_CREATIVE_ADPCM); - WAVE_FORMAT(WAVE_FORMAT_CREATIVE_FASTSPEECH8); - WAVE_FORMAT(WAVE_FORMAT_CREATIVE_FASTSPEECH10); - WAVE_FORMAT(WAVE_FORMAT_FM_TOWNS_SND); - WAVE_FORMAT(WAVE_FORMAT_OLIGSM); - WAVE_FORMAT(WAVE_FORMAT_OLIADPCM); - WAVE_FORMAT(WAVE_FORMAT_OLICELP); - WAVE_FORMAT(WAVE_FORMAT_OLISBC); - WAVE_FORMAT(WAVE_FORMAT_OLIOPR); - WAVE_FORMAT(WAVE_FORMAT_DEVELOPMENT); - WAVE_FORMAT(WAVE_FORMAT_EXTENSIBLE); - } -#undef WAVE_FORMAT - sprintf(msg, "Unknown(0x%04x)", format); - return msg; -} - -const char * format_string(const WAVEFORMATEX* wfx) -{ - static char str[64]; - - sprintf(str, "%5dx%2dx%d %s", - wfx->nSamplesPerSec, wfx->wBitsPerSample, wfx->nChannels, - get_format_str(wfx->wFormatTag)); - - return str; -} - -static void IDirectSoundCapture_test(LPDIRECTSOUNDCAPTURE dsco, - BOOL initialized, LPCGUID lpGuid) -{ - HRESULT rc; - DSCCAPS dsccaps; - int ref; - IUnknown * unknown; - IDirectSoundCapture * dsc; - - /* Try to Query for objects */ - rc=IDirectSoundCapture_QueryInterface(dsco, &IID_IUnknown, - (LPVOID*)&unknown); - ok(rc==DS_OK, "IDirectSoundCapture_QueryInterface(IID_IUnknown) " - "failed: %08x\n", rc); - if (rc==DS_OK) - IDirectSoundCapture_Release(unknown); - - rc=IDirectSoundCapture_QueryInterface(dsco, &IID_IDirectSoundCapture, - (LPVOID*)&dsc); - ok(rc==DS_OK, "IDirectSoundCapture_QueryInterface(IID_IDirectSoundCapture) " - "failed: %08x\n", rc); - if (rc==DS_OK) - IDirectSoundCapture_Release(dsc); - - if (initialized == FALSE) { - /* try uninitialized object */ - rc=IDirectSoundCapture_GetCaps(dsco,0); - ok(rc==DSERR_UNINITIALIZED||rc==E_INVALIDARG, - "IDirectSoundCapture_GetCaps(NULL) should have returned " - "DSERR_UNINITIALIZED or E_INVALIDARG, returned: %08x\n", rc); - - rc=IDirectSoundCapture_GetCaps(dsco, &dsccaps); - ok(rc==DSERR_UNINITIALIZED,"IDirectSoundCapture_GetCaps() " - "should have returned DSERR_UNINITIALIZED, returned: %08x\n", rc); - - rc=IDirectSoundCapture_Initialize(dsco, lpGuid); - ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED|| - rc==E_FAIL||rc==E_INVALIDARG, - "IDirectSoundCapture_Initialize() failed: %08x\n", rc); - if (rc==DSERR_NODRIVER||rc==E_INVALIDARG) { - trace(" No Driver\n"); - goto EXIT; - } else if (rc==E_FAIL) { - trace(" No Device\n"); - goto EXIT; - } else if (rc==DSERR_ALLOCATED) { - trace(" Already In Use\n"); - goto EXIT; - } - } - - rc=IDirectSoundCapture_Initialize(dsco, lpGuid); - ok(rc==DSERR_ALREADYINITIALIZED, "IDirectSoundCapture_Initialize() " - "should have returned DSERR_ALREADYINITIALIZED: %08x\n", rc); - - /* DSOUND: Error: Invalid caps buffer */ - rc=IDirectSoundCapture_GetCaps(dsco, 0); - ok(rc==DSERR_INVALIDPARAM, "IDirectSoundCapture_GetCaps(NULL) " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); - - ZeroMemory(&dsccaps, sizeof(dsccaps)); - - /* DSOUND: Error: Invalid caps buffer */ - rc=IDirectSound_GetCaps(dsco, &dsccaps); - ok(rc==DSERR_INVALIDPARAM, "IDirectSound_GetCaps() " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); - - dsccaps.dwSize=sizeof(dsccaps); - - /* DSOUND: Running on a certified driver */ - rc=IDirectSoundCapture_GetCaps(dsco, &dsccaps); - ok(rc==DS_OK, "IDirectSoundCapture_GetCaps() failed: %08x\n", rc); - -EXIT: - ref=IDirectSoundCapture_Release(dsco); - ok(ref==0, "IDirectSoundCapture_Release() has %d references, " - "should have 0\n", ref); -} - -static void IDirectSoundCapture_tests(void) -{ - HRESULT rc; - LPDIRECTSOUNDCAPTURE dsco=NULL; - LPCLASSFACTORY cf=NULL; - - trace("Testing IDirectSoundCapture\n"); - - rc=CoGetClassObject(&CLSID_DirectSoundCapture, CLSCTX_INPROC_SERVER, NULL, - &IID_IClassFactory, (void**)&cf); - ok(rc==S_OK,"CoGetClassObject(CLSID_DirectSoundCapture, IID_IClassFactory) " - "failed: %08x\n", rc); - - rc=CoGetClassObject(&CLSID_DirectSoundCapture, CLSCTX_INPROC_SERVER, NULL, - &IID_IUnknown, (void**)&cf); - ok(rc==S_OK,"CoGetClassObject(CLSID_DirectSoundCapture, IID_IUnknown) " - "failed: %08x\n", rc); - - /* try the COM class factory method of creation with no device specified */ - rc=CoCreateInstance(&CLSID_DirectSoundCapture, NULL, CLSCTX_INPROC_SERVER, - &IID_IDirectSoundCapture, (void**)&dsco); - ok(rc==S_OK||rc==REGDB_E_CLASSNOTREG,"CoCreateInstance(CLSID_DirectSoundCapture) failed: %08x\n", rc); - if (rc==REGDB_E_CLASSNOTREG) { - trace(" Class Not Registered\n"); - return; - } - if (dsco) - IDirectSoundCapture_test(dsco, FALSE, NULL); - - /* try the COM class factory method of creation with default capture - * device specified */ - rc=CoCreateInstance(&CLSID_DirectSoundCapture, NULL, CLSCTX_INPROC_SERVER, - &IID_IDirectSoundCapture, (void**)&dsco); - ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSoundCapture) failed: %08x\n", rc); - if (dsco) - IDirectSoundCapture_test(dsco, FALSE, &DSDEVID_DefaultCapture); - - /* try the COM class factory method of creation with default voice - * capture device specified */ - rc=CoCreateInstance(&CLSID_DirectSoundCapture, NULL, CLSCTX_INPROC_SERVER, - &IID_IDirectSoundCapture, (void**)&dsco); - ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSoundCapture) failed: %08x\n", rc); - if (dsco) - IDirectSoundCapture_test(dsco, FALSE, &DSDEVID_DefaultVoiceCapture); - - /* try the COM class factory method of creation with a bad - * IID specified */ - rc=CoCreateInstance(&CLSID_DirectSoundCapture, NULL, CLSCTX_INPROC_SERVER, - &CLSID_DirectSoundPrivate, (void**)&dsco); - ok(rc==E_NOINTERFACE, - "CoCreateInstance(CLSID_DirectSoundCapture,CLSID_DirectSoundPrivate) " - "should have failed: %08x\n",rc); - - /* try with no device specified */ - rc=pDirectSoundCaptureCreate(NULL,&dsco,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCaptureCreate(NULL) failed: %08x\n",rc); - if (rc==S_OK && dsco) - IDirectSoundCapture_test(dsco, TRUE, NULL); - - /* try with default capture device specified */ - rc=pDirectSoundCaptureCreate(&DSDEVID_DefaultCapture,&dsco,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCaptureCreate(DSDEVID_DefaultCapture) failed: %08x\n", rc); - if (rc==DS_OK && dsco) - IDirectSoundCapture_test(dsco, TRUE, NULL); - - /* try with default voice capture device specified */ - rc=pDirectSoundCaptureCreate(&DSDEVID_DefaultVoiceCapture,&dsco,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCaptureCreate(DSDEVID_DefaultVoiceCapture) failed: %08x\n", rc); - if (rc==DS_OK && dsco) - IDirectSoundCapture_test(dsco, TRUE, NULL); - - /* try with a bad device specified */ - rc=pDirectSoundCaptureCreate(&DSDEVID_DefaultVoicePlayback,&dsco,NULL); - ok(rc==DSERR_NODRIVER, - "DirectSoundCaptureCreate(DSDEVID_DefaultVoicePlatback) " - "should have failed: %08x\n",rc); - if (rc==DS_OK && dsco) - IDirectSoundCapture_Release(dsco); -} - -typedef struct { - char* wave; - DWORD wave_len; - - LPDIRECTSOUNDCAPTUREBUFFER dscbo; - LPWAVEFORMATEX wfx; - DSBPOSITIONNOTIFY posnotify[NOTIFICATIONS]; - HANDLE event[NOTIFICATIONS]; - LPDIRECTSOUNDNOTIFY notify; - - DWORD buffer_size; - DWORD read; - DWORD offset; - DWORD size; - - DWORD last_pos; -} capture_state_t; - -static int capture_buffer_service(capture_state_t* state) -{ - HRESULT rc; - LPVOID ptr1,ptr2; - DWORD len1,len2; - DWORD capture_pos,read_pos; - - rc=IDirectSoundCaptureBuffer_GetCurrentPosition(state->dscbo,&capture_pos, - &read_pos); - ok(rc==DS_OK,"IDirectSoundCaptureBuffer_GetCurrentPosition() failed: %08x\n", rc); - if (rc!=DS_OK) - return 0; - - rc=IDirectSoundCaptureBuffer_Lock(state->dscbo,state->offset,state->size, - &ptr1,&len1,&ptr2,&len2,0); - ok(rc==DS_OK,"IDirectSoundCaptureBuffer_Lock() failed: %08x\n", rc); - if (rc!=DS_OK) - return 0; - - rc=IDirectSoundCaptureBuffer_Unlock(state->dscbo,ptr1,len1,ptr2,len2); - ok(rc==DS_OK,"IDirectSoundCaptureBuffer_Unlock() failed: %08x\n", rc); - if (rc!=DS_OK) - return 0; - - state->offset = (state->offset + state->size) % state->buffer_size; - - return 1; -} - -static void test_capture_buffer(LPDIRECTSOUNDCAPTURE dsco, - LPDIRECTSOUNDCAPTUREBUFFER dscbo, int record) -{ - HRESULT rc; - DSCBCAPS dscbcaps; - WAVEFORMATEX wfx; - DWORD size,status; - capture_state_t state; - int i, ref; - - /* Private dsound.dll: Error: Invalid caps pointer */ - rc=IDirectSoundCaptureBuffer_GetCaps(dscbo,0); - ok(rc==DSERR_INVALIDPARAM,"IDirectSoundCaptureBuffer_GetCaps() should " - "have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); - - /* Private dsound.dll: Error: Invalid caps pointer */ - dscbcaps.dwSize=0; - rc=IDirectSoundCaptureBuffer_GetCaps(dscbo,&dscbcaps); - ok(rc==DSERR_INVALIDPARAM,"IDirectSoundCaptureBuffer_GetCaps() should " - "have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); - - dscbcaps.dwSize=sizeof(dscbcaps); - rc=IDirectSoundCaptureBuffer_GetCaps(dscbo,&dscbcaps); - ok(rc==DS_OK,"IDirectSoundCaptureBuffer_GetCaps() failed: %08x\n", rc); - if (rc==DS_OK && winetest_debug > 1) { - trace(" Caps: size = %d flags=0x%08x buffer size=%d\n", - dscbcaps.dwSize,dscbcaps.dwFlags,dscbcaps.dwBufferBytes); - } - - /* Query the format size. Note that it may not match sizeof(wfx) */ - /* Private dsound.dll: Error: Either pwfxFormat or pdwSizeWritten must - * be non-NULL */ - rc=IDirectSoundCaptureBuffer_GetFormat(dscbo,NULL,0,NULL); - ok(rc==DSERR_INVALIDPARAM,"IDirectSoundCaptureBuffer_GetFormat() should " - "have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); - - size=0; - rc=IDirectSoundCaptureBuffer_GetFormat(dscbo,NULL,0,&size); - ok(rc==DS_OK && size!=0,"IDirectSoundCaptureBuffer_GetFormat() should " - "have returned the needed size: rc=%08x, size=%d\n", rc,size); - - rc=IDirectSoundCaptureBuffer_GetFormat(dscbo,&wfx,sizeof(wfx),NULL); - ok(rc==DS_OK,"IDirectSoundCaptureBuffer_GetFormat() failed: %08x\n", rc); - if (rc==DS_OK && winetest_debug > 1) { - trace(" Format: tag=0x%04x %dx%dx%d avg.B/s=%d align=%d\n", - wfx.wFormatTag,wfx.nSamplesPerSec,wfx.wBitsPerSample, - wfx.nChannels,wfx.nAvgBytesPerSec,wfx.nBlockAlign); - } - - /* Private dsound.dll: Error: Invalid status pointer */ - rc=IDirectSoundCaptureBuffer_GetStatus(dscbo,0); - ok(rc==DSERR_INVALIDPARAM,"IDirectSoundCaptureBuffer_GetStatus() should " - "have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); - - rc=IDirectSoundCaptureBuffer_GetStatus(dscbo,&status); - ok(rc==DS_OK,"IDirectSoundCaptureBuffer_GetStatus() failed: %08x\n", rc); - if (rc==DS_OK && winetest_debug > 1) { - trace(" Status=0x%04x\n",status); - } - - ZeroMemory(&state, sizeof(state)); - state.dscbo=dscbo; - state.wfx=&wfx; - state.buffer_size = dscbcaps.dwBufferBytes; - for (i = 0; i < NOTIFICATIONS; i++) - state.event[i] = CreateEvent( NULL, FALSE, FALSE, NULL ); - state.size = dscbcaps.dwBufferBytes / NOTIFICATIONS; - - rc=IDirectSoundCaptureBuffer_QueryInterface(dscbo,&IID_IDirectSoundNotify, - (void **)&(state.notify)); - ok((rc==DS_OK)&&(state.notify!=NULL), - "IDirectSoundCaptureBuffer_QueryInterface() failed: %08x\n", rc); - if (rc!=DS_OK) - return; - - for (i = 0; i < NOTIFICATIONS; i++) { - state.posnotify[i].dwOffset = (i * state.size) + state.size - 1; - state.posnotify[i].hEventNotify = state.event[i]; - } - - rc=IDirectSoundNotify_SetNotificationPositions(state.notify,NOTIFICATIONS, - state.posnotify); - ok(rc==DS_OK,"IDirectSoundNotify_SetNotificationPositions() failed: %08x\n", rc); - if (rc!=DS_OK) - return; - - ref=IDirectSoundNotify_Release(state.notify); - ok(ref==0,"IDirectSoundNotify_Release(): has %d references, should have " - "0\n",ref); - if (ref!=0) - return; - - if (record) { - rc=IDirectSoundCaptureBuffer_Start(dscbo,DSCBSTART_LOOPING); - ok(rc==DS_OK,"IDirectSoundCaptureBuffer_Start() failed: %08x\n", rc); - if (rc!=DS_OK) - return; - - rc=IDirectSoundCaptureBuffer_GetStatus(dscbo,&status); - ok(rc==DS_OK,"IDirectSoundCaptureBuffer_GetStatus() failed: %08x\n", rc); - ok(status==(DSCBSTATUS_CAPTURING|DSCBSTATUS_LOOPING), - "GetStatus: bad status: %x\n",status); - if (rc!=DS_OK) - return; - - /* wait for the notifications */ - for (i = 0; i < (NOTIFICATIONS * 2); i++) { - rc=WaitForMultipleObjects(NOTIFICATIONS,state.event,FALSE,3000); - ok(rc==(WAIT_OBJECT_0+(i%NOTIFICATIONS)), - "WaitForMultipleObjects failed: 0x%x\n",rc); - if (rc!=(WAIT_OBJECT_0+(i%NOTIFICATIONS))) { - ok((rc==WAIT_TIMEOUT)||(rc==WAIT_FAILED), - "Wrong notification: should be %d, got %d\n", - i%NOTIFICATIONS,rc-WAIT_OBJECT_0); - } - if (!capture_buffer_service(&state)) - break; - } - - rc=IDirectSoundCaptureBuffer_Stop(dscbo); - ok(rc==DS_OK,"IDirectSoundCaptureBuffer_Stop() failed: %08x\n", rc); - if (rc!=DS_OK) - return; - } -} - -static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, - LPCSTR lpcstrModule, LPVOID lpContext) -{ - HRESULT rc; - LPDIRECTSOUNDCAPTURE dsco=NULL; - LPDIRECTSOUNDCAPTUREBUFFER dscbo=NULL; - DSCBUFFERDESC bufdesc; - WAVEFORMATEX wfx; - DSCCAPS dsccaps; - DWORD f; - int ref; - - /* Private dsound.dll: Error: Invalid interface buffer */ - trace("*** Testing %s - %s ***\n",lpcstrDescription,lpcstrModule); - rc=pDirectSoundCaptureCreate(lpGuid,NULL,NULL); - ok(rc==DSERR_INVALIDPARAM,"DirectSoundCaptureCreate() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); - - rc=pDirectSoundCaptureCreate(lpGuid,&dsco,NULL); - ok((rc==DS_OK)||(rc==DSERR_NODRIVER)||(rc==E_FAIL)||(rc==DSERR_ALLOCATED), - "DirectSoundCaptureCreate() failed: %08x\n",rc); - if (rc!=DS_OK) { - if (rc==DSERR_NODRIVER) - trace(" No Driver\n"); - else if (rc==E_FAIL) - trace(" No Device\n"); - else if (rc==DSERR_ALLOCATED) - trace(" Already In Use\n"); - goto EXIT; - } - - /* Private dsound.dll: Error: Invalid caps buffer */ - rc=IDirectSoundCapture_GetCaps(dsco,NULL); - ok(rc==DSERR_INVALIDPARAM,"IDirectSoundCapture_GetCaps() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); - - /* Private dsound.dll: Error: Invalid caps buffer */ - dsccaps.dwSize=0; - rc=IDirectSoundCapture_GetCaps(dsco,&dsccaps); - ok(rc==DSERR_INVALIDPARAM,"IDirectSoundCapture_GetCaps() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); - - dsccaps.dwSize=sizeof(dsccaps); - rc=IDirectSoundCapture_GetCaps(dsco,&dsccaps); - ok(rc==DS_OK,"IDirectSoundCapture_GetCaps() failed: %08x\n", rc); - if (rc==DS_OK && winetest_debug > 1) { - trace(" Caps: size=%d flags=0x%08x formats=%05x channels=%d\n", - dsccaps.dwSize,dsccaps.dwFlags,dsccaps.dwFormats, - dsccaps.dwChannels); - } - - /* Private dsound.dll: Error: Invalid size */ - /* Private dsound.dll: Error: Invalid capture buffer description */ - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=0; - bufdesc.dwFlags=0; - bufdesc.dwBufferBytes=0; - bufdesc.dwReserved=0; - bufdesc.lpwfxFormat=NULL; - rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL); - ok(rc==DSERR_INVALIDPARAM,"IDirectSoundCapture_CreateCaptureBuffer() " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); - if (rc==DS_OK) { - ref=IDirectSoundCaptureBuffer_Release(dscbo); - ok(ref==0,"IDirectSoundCaptureBuffer_Release() has %d references, " - "should have 0\n",ref); - } - - /* Private dsound.dll: Error: Invalid buffer size */ - /* Private dsound.dll: Error: Invalid capture buffer description */ - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=0; - bufdesc.dwBufferBytes=0; - bufdesc.dwReserved=0; - bufdesc.lpwfxFormat=NULL; - rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL); - ok(rc==DSERR_INVALIDPARAM,"IDirectSoundCapture_CreateCaptureBuffer() " - "should have returned DSERR_INVALIDPARAM, returned %08x\n", rc); - if (rc==DS_OK) { - ref=IDirectSoundCaptureBuffer_Release(dscbo); - ok(ref==0,"IDirectSoundCaptureBuffer_Release() has %d references, " - "should have 0\n",ref); - } - - /* Private dsound.dll: Error: Invalid buffer size */ - /* Private dsound.dll: Error: Invalid capture buffer description */ - ZeroMemory(&bufdesc, sizeof(bufdesc)); - ZeroMemory(&wfx, sizeof(wfx)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=0; - bufdesc.dwBufferBytes=0; - bufdesc.dwReserved=0; - bufdesc.lpwfxFormat=&wfx; - rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL); - ok(rc==DSERR_INVALIDPARAM,"IDirectSoundCapture_CreateCaptureBuffer() " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); - if (rc==DS_OK) { - ref=IDirectSoundCaptureBuffer_Release(dscbo); - ok(ref==0,"IDirectSoundCaptureBuffer_Release() has %d references, " - "should have 0\n",ref); - } - - /* Private dsound.dll: Error: Invalid buffer size */ - /* Private dsound.dll: Error: Invalid capture buffer description */ - init_format(&wfx,WAVE_FORMAT_PCM,11025,8,1); - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=0; - bufdesc.dwBufferBytes=0; - bufdesc.dwReserved=0; - bufdesc.lpwfxFormat=&wfx; - rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL); - ok(rc==DSERR_INVALIDPARAM,"IDirectSoundCapture_CreateCaptureBuffer() " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); - if (rc==DS_OK) { - ref=IDirectSoundCaptureBuffer_Release(dscbo); - ok(ref==0,"IDirectSoundCaptureBuffer_Release() has %d references, " - "should have 0\n",ref); - } - - for (f=0;f - -#include - -#include "wine/test.h" -#include "dsound.h" -#include "mmreg.h" -#include "dsound_test.h" - -#define PI 3.14159265358979323846 - - -static HRESULT (WINAPI *pDirectSoundEnumerateA)(LPDSENUMCALLBACKA,LPVOID)=NULL; -static HRESULT (WINAPI *pDirectSoundCreate)(LPCGUID,LPDIRECTSOUND*, - LPUNKNOWN)=NULL; - -char* wave_generate_la(WAVEFORMATEX* wfx, double duration, DWORD* size) -{ - int i; - int nb_samples; - char* buf; - char* b; - - nb_samples=(int)(duration*wfx->nSamplesPerSec); - *size=nb_samples*wfx->nBlockAlign; - b=buf=HeapAlloc(GetProcessHeap(), 0, *size); - for (i=0;inSamplesPerSec); - if (wfx->wBitsPerSample==8) { - unsigned char sample=(unsigned char)((double)127.5*(y+1.0)); - *b++=sample; - if (wfx->nChannels==2) - *b++=sample; - } else if (wfx->wBitsPerSample == 16) { - signed short sample=(signed short)((double)32767.5*y-0.5); - b[0]=sample & 0xff; - b[1]=sample >> 8; - b+=2; - if (wfx->nChannels==2) { - b[0]=sample & 0xff; - b[1]=sample >> 8; - b+=2; - } - } else if (wfx->wBitsPerSample == 24) { - signed int sample=(signed int)((double)8388607.5*y-0.5); - b[0]=sample & 0xff; - b[1]=(sample >> 8)&0xff; - b[2]=sample >> 16; - b+=3; - if (wfx->nChannels==2) { - b[0]=sample & 0xff; - b[1]=(sample >> 8)&0xff; - b[2]=sample >> 16; - b+=3; - } - } else if (wfx->wBitsPerSample == 32) { - signed int sample=(signed int)((double)2147483647.5*y-0.5); - b[0]=sample & 0xff; - b[1]=(sample >> 8)&0xff; - b[2]=(sample >> 16)&0xff; - b[3]=sample >> 24; - b+=4; - if (wfx->nChannels==2) { - b[0]=sample & 0xff; - b[1]=(sample >> 8)&0xff; - b[2]=(sample >> 16)&0xff; - b[3]=sample >> 24; - b+=4; - } - } - } - return buf; -} - -const char * getDSBCAPS(DWORD xmask) { - static struct { - DWORD mask; - const char *name; - } flags[] = { -#define FE(x) { x, #x }, - FE(DSBCAPS_PRIMARYBUFFER) - FE(DSBCAPS_STATIC) - FE(DSBCAPS_LOCHARDWARE) - FE(DSBCAPS_LOCSOFTWARE) - FE(DSBCAPS_CTRL3D) - FE(DSBCAPS_CTRLFREQUENCY) - FE(DSBCAPS_CTRLPAN) - FE(DSBCAPS_CTRLVOLUME) - FE(DSBCAPS_CTRLPOSITIONNOTIFY) - FE(DSBCAPS_STICKYFOCUS) - FE(DSBCAPS_GLOBALFOCUS) - FE(DSBCAPS_GETCURRENTPOSITION2) - FE(DSBCAPS_MUTE3DATMAXDISTANCE) -#undef FE - }; - static char buffer[512]; - unsigned int i; - BOOL first = TRUE; - - buffer[0] = 0; - - for (i=0;iwFormatTag=format; - wfx->nChannels=channels; - wfx->wBitsPerSample=depth; - wfx->nSamplesPerSec=rate; - wfx->nBlockAlign=wfx->nChannels*wfx->wBitsPerSample/8; - /* FIXME: Shouldn't this test be if (format!=WAVE_FORMAT_PCM) */ - if (wfx->nBlockAlign==0) - { - /* align compressed formats to byte boundary */ - wfx->nBlockAlign=1; - } - wfx->nAvgBytesPerSec=wfx->nSamplesPerSec*wfx->nBlockAlign; - wfx->cbSize=0; -} - -typedef struct { - char* wave; - DWORD wave_len; - - LPDIRECTSOUNDBUFFER dsbo; - LPWAVEFORMATEX wfx; - DWORD buffer_size; - DWORD written; - DWORD played; - DWORD offset; -} play_state_t; - -static int buffer_refill(play_state_t* state, DWORD size) -{ - LPVOID ptr1,ptr2; - DWORD len1,len2; - HRESULT rc; - - if (size>state->wave_len-state->written) - size=state->wave_len-state->written; - - /* some broken apps like Navyfield mistakenly pass NULL for a ppValue */ - rc=IDirectSoundBuffer_Lock(state->dsbo,state->offset,size, - &ptr1,NULL,&ptr2,&len2,0); - ok(rc==DSERR_INVALIDPARAM,"expected %08x got %08x\n",DSERR_INVALIDPARAM, rc); - rc=IDirectSoundBuffer_Lock(state->dsbo,state->offset,size, - &ptr1,&len1,&ptr2,&len2,0); - ok(rc==DS_OK,"IDirectSoundBuffer_Lock() failed: %08x\n", rc); - if (rc!=DS_OK) - return -1; - - memcpy(ptr1,state->wave+state->written,len1); - state->written+=len1; - if (ptr2!=NULL) { - memcpy(ptr2,state->wave+state->written,len2); - state->written+=len2; - } - state->offset=state->written % state->buffer_size; - /* some apps blindly pass &ptr1 instead of ptr1 */ - rc=IDirectSoundBuffer_Unlock(state->dsbo,&ptr1,len1,ptr2,len2); - ok(rc==DSERR_INVALIDPARAM, "IDDirectSoundBuffer_Unlock(): expected %08x got %08x, %p %p\n",DSERR_INVALIDPARAM, rc, &ptr1, ptr1); - rc=IDirectSoundBuffer_Unlock(state->dsbo,ptr1,len1,ptr2,len2); - ok(rc==DS_OK,"IDirectSoundBuffer_Unlock() failed: %08x\n", rc); - if (rc!=DS_OK) - return -1; - return size; -} - -static int buffer_silence(play_state_t* state, DWORD size) -{ - LPVOID ptr1,ptr2; - DWORD len1,len2; - HRESULT rc; - BYTE s; - - rc=IDirectSoundBuffer_Lock(state->dsbo,state->offset,size, - &ptr1,&len1,&ptr2,&len2,0); - ok(rc==DS_OK,"IDirectSoundBuffer_Lock() failed: %08x\n", rc); - if (rc!=DS_OK) - return -1; - - s=(state->wfx->wBitsPerSample==8?0x80:0); - memset(ptr1,s,len1); - if (ptr2!=NULL) { - memset(ptr2,s,len2); - } - state->offset=(state->offset+size) % state->buffer_size; - rc=IDirectSoundBuffer_Unlock(state->dsbo,ptr1,len1,ptr2,len2); - ok(rc==DS_OK,"IDirectSoundBuffer_Unlock() failed: %08x\n", rc); - if (rc!=DS_OK) - return -1; - return size; -} - -static int buffer_service(play_state_t* state) -{ - DWORD last_play_pos,play_pos,buf_free; - HRESULT rc; - - rc=IDirectSoundBuffer_GetCurrentPosition(state->dsbo,&play_pos,NULL); - ok(rc==DS_OK,"IDirectSoundBuffer_GetCurrentPosition() failed: %08x\n", rc); - if (rc!=DS_OK) { - goto STOP; - } - - /* Update the amount played */ - last_play_pos=state->played % state->buffer_size; - if (play_posplayed+=state->buffer_size-last_play_pos+play_pos; - else - state->played+=play_pos-last_play_pos; - - if (winetest_debug > 1) - trace("buf size=%d last_play_pos=%d play_pos=%d played=%d / %d\n", - state->buffer_size,last_play_pos,play_pos,state->played, - state->wave_len); - - if (state->played>state->wave_len) - { - /* Everything has been played */ - goto STOP; - } - - /* Refill the buffer */ - if (state->offset<=play_pos) - buf_free=play_pos-state->offset; - else - buf_free=state->buffer_size-state->offset+play_pos; - - if (winetest_debug > 1) - trace("offset=%d free=%d written=%d / %d\n", - state->offset,buf_free,state->written,state->wave_len); - if (buf_free==0) - return 1; - - if (state->writtenwave_len) - { - int w=buffer_refill(state,buf_free); - if (w==-1) - goto STOP; - buf_free-=w; - if (state->written==state->wave_len && winetest_debug > 1) - trace("last sound byte at %d\n", - (state->written % state->buffer_size)); - } - - if (buf_free>0) { - /* Fill with silence */ - if (winetest_debug > 1) - trace("writing %d bytes of silence\n",buf_free); - if (buffer_silence(state,buf_free)==-1) - goto STOP; - } - return 1; - -STOP: - if (winetest_debug > 1) - trace("stopping playback\n"); - rc=IDirectSoundBuffer_Stop(state->dsbo); - ok(rc==DS_OK,"IDirectSoundBuffer_Stop() failed: %08x\n", rc); - return 0; -} - -void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo, - BOOL is_primary, BOOL set_volume, LONG volume, - BOOL set_pan, LONG pan, BOOL play, double duration, - BOOL buffer3d, LPDIRECTSOUND3DLISTENER listener, - BOOL move_listener, BOOL move_sound, - BOOL set_frequency, DWORD frequency) -{ - HRESULT rc; - DSBCAPS dsbcaps; - WAVEFORMATEX wfx,wfx2; - DWORD size,status,freq; - int ref; - - if (set_frequency) { - rc=IDirectSoundBuffer_SetFrequency(*dsbo,frequency); - ok(rc==DS_OK||rc==DSERR_CONTROLUNAVAIL, - "IDirectSoundBuffer_SetFrequency() failed to set frequency %08x\n",rc); - if (rc!=DS_OK) - return; - } - - /* DSOUND: Error: Invalid caps pointer */ - rc=IDirectSoundBuffer_GetCaps(*dsbo,0); - ok(rc==DSERR_INVALIDPARAM,"IDirectSoundBuffer_GetCaps() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); - - ZeroMemory(&dsbcaps, sizeof(dsbcaps)); - - /* DSOUND: Error: Invalid caps pointer */ - rc=IDirectSoundBuffer_GetCaps(*dsbo,&dsbcaps); - ok(rc==DSERR_INVALIDPARAM,"IDirectSoundBuffer_GetCaps() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); - - dsbcaps.dwSize=sizeof(dsbcaps); - rc=IDirectSoundBuffer_GetCaps(*dsbo,&dsbcaps); - ok(rc==DS_OK,"IDirectSoundBuffer_GetCaps() failed: %08x\n", rc); - if (rc==DS_OK && winetest_debug > 1) { - trace(" Caps: flags=0x%08x size=%d\n",dsbcaps.dwFlags, - dsbcaps.dwBufferBytes); - } - - /* Query the format size. */ - size=0; - rc=IDirectSoundBuffer_GetFormat(*dsbo,NULL,0,&size); - ok(rc==DS_OK && size!=0,"IDirectSoundBuffer_GetFormat() should have " - "returned the needed size: rc=%08x size=%d\n",rc,size); - - ok(size == sizeof(WAVEFORMATEX) || size == sizeof(WAVEFORMATEXTENSIBLE), - "Expected a correct structure size, got %d\n", size); - - if (size == sizeof(WAVEFORMATEX)) { - rc=IDirectSoundBuffer_GetFormat(*dsbo,&wfx,size,NULL); - } - else if (size == sizeof(WAVEFORMATEXTENSIBLE)) { - WAVEFORMATEXTENSIBLE wfxe; - rc=IDirectSoundBuffer_GetFormat(*dsbo,(WAVEFORMATEX*)&wfxe,size,NULL); - wfx = wfxe.Format; - } - ok(rc==DS_OK, - "IDirectSoundBuffer_GetFormat() failed: %08x\n", rc); - if (rc==DS_OK && winetest_debug > 1) { - trace(" Format: %s tag=0x%04x %dx%dx%d avg.B/s=%d align=%d\n", - is_primary ? "Primary" : "Secondary", - wfx.wFormatTag,wfx.nSamplesPerSec,wfx.wBitsPerSample, - wfx.nChannels,wfx.nAvgBytesPerSec,wfx.nBlockAlign); - } - - /* DSOUND: Error: Invalid frequency buffer */ - rc=IDirectSoundBuffer_GetFrequency(*dsbo,0); - ok(rc==DSERR_INVALIDPARAM,"IDirectSoundBuffer_GetFrequency() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); - - /* DSOUND: Error: Primary buffers don't support CTRLFREQUENCY */ - rc=IDirectSoundBuffer_GetFrequency(*dsbo,&freq); - ok((rc==DS_OK && !is_primary) || (rc==DSERR_CONTROLUNAVAIL&&is_primary) || - (rc==DSERR_CONTROLUNAVAIL&&!(dsbcaps.dwFlags&DSBCAPS_CTRLFREQUENCY)), - "IDirectSoundBuffer_GetFrequency() failed: %08x\n",rc); - if (rc==DS_OK) { - DWORD f = set_frequency?frequency:wfx.nSamplesPerSec; - ok(freq==f,"The frequency returned by GetFrequency " - "%d does not match the format %d\n",freq,f); - } - - /* DSOUND: Error: Invalid status pointer */ - rc=IDirectSoundBuffer_GetStatus(*dsbo,0); - ok(rc==DSERR_INVALIDPARAM,"IDirectSoundBuffer_GetStatus() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); - - rc=IDirectSoundBuffer_GetStatus(*dsbo,&status); - ok(rc==DS_OK,"IDirectSoundBuffer_GetStatus() failed: %08x\n", rc); - ok(status==0,"status=0x%x instead of 0\n",status); - - if (is_primary) { - DSBCAPS new_dsbcaps; - /* We must call SetCooperativeLevel to be allowed to call SetFormat */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ - rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08x\n",rc); - if (rc!=DS_OK) - return; - - /* DSOUND: Error: Invalid format pointer */ - rc=IDirectSoundBuffer_SetFormat(*dsbo,0); - ok(rc==DSERR_INVALIDPARAM,"IDirectSoundBuffer_SetFormat() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); - - init_format(&wfx2,WAVE_FORMAT_PCM,11025,16,2); - rc=IDirectSoundBuffer_SetFormat(*dsbo,&wfx2); - ok(rc==DS_OK,"IDirectSoundBuffer_SetFormat(%s) failed: %08x\n", - format_string(&wfx2), rc); - - /* There is no guarantee that SetFormat will actually change the - * format to what we asked for. It depends on what the soundcard - * supports. So we must re-query the format. - */ - rc=IDirectSoundBuffer_GetFormat(*dsbo,&wfx,sizeof(wfx),NULL); - ok(rc==DS_OK,"IDirectSoundBuffer_GetFormat() failed: %08x\n", rc); - if (rc==DS_OK && - (wfx.wFormatTag!=wfx2.wFormatTag || - wfx.nSamplesPerSec!=wfx2.nSamplesPerSec || - wfx.wBitsPerSample!=wfx2.wBitsPerSample || - wfx.nChannels!=wfx2.nChannels)) { - trace("Requested format tag=0x%04x %dx%dx%d avg.B/s=%d align=%d\n", - wfx2.wFormatTag,wfx2.nSamplesPerSec,wfx2.wBitsPerSample, - wfx2.nChannels,wfx2.nAvgBytesPerSec,wfx2.nBlockAlign); - trace("Got tag=0x%04x %dx%dx%d avg.B/s=%d align=%d\n", - wfx.wFormatTag,wfx.nSamplesPerSec,wfx.wBitsPerSample, - wfx.nChannels,wfx.nAvgBytesPerSec,wfx.nBlockAlign); - } - - ZeroMemory(&new_dsbcaps, sizeof(new_dsbcaps)); - new_dsbcaps.dwSize = sizeof(new_dsbcaps); - rc=IDirectSoundBuffer_GetCaps(*dsbo,&new_dsbcaps); - ok(rc==DS_OK,"IDirectSoundBuffer_GetCaps() failed: %08x\n", rc); - if (rc==DS_OK && winetest_debug > 1) { - trace(" new Caps: flags=0x%08x size=%d\n",new_dsbcaps.dwFlags, - new_dsbcaps.dwBufferBytes); - } - - /* Check for primary buffer size change */ - ok(new_dsbcaps.dwBufferBytes == dsbcaps.dwBufferBytes, - " buffer size changed after SetFormat() - " - "previous size was %u, current size is %u\n", - dsbcaps.dwBufferBytes, new_dsbcaps.dwBufferBytes); - dsbcaps.dwBufferBytes = new_dsbcaps.dwBufferBytes; - - /* Check for primary buffer flags change */ - ok(new_dsbcaps.dwFlags == dsbcaps.dwFlags, - " flags changed after SetFormat() - " - "previous flags were %08x, current flags are %08x\n", - dsbcaps.dwFlags, new_dsbcaps.dwFlags); - - /* Set the CooperativeLevel back to normal */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ - rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_NORMAL) failed: %08x\n",rc); - } - - if (play) { - play_state_t state; - DS3DLISTENER listener_param; - LPDIRECTSOUND3DBUFFER buffer=NULL; - DS3DBUFFER buffer_param; - DWORD start_time,now; - LPVOID buffer1; - DWORD length1; - - if (winetest_interactive) { - if (set_frequency) - trace(" Playing %g second 440Hz tone at %dx%dx%d with a " - "frequency of %d (%dHz)\n", duration, - wfx.nSamplesPerSec, wfx.wBitsPerSample, wfx.nChannels, - frequency, (440 * frequency) / wfx.nSamplesPerSec); - else - trace(" Playing %g second 440Hz tone at %dx%dx%d\n", duration, - wfx.nSamplesPerSec, wfx.wBitsPerSample, wfx.nChannels); - } - - if (is_primary) { - /* We must call SetCooperativeLevel to be allowed to call Lock */ - /* DSOUND: Setting DirectSound cooperative level to - * DSSCL_WRITEPRIMARY */ - rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(), - DSSCL_WRITEPRIMARY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_WRITEPRIMARY) " - "failed: %08x\n",rc); - if (rc!=DS_OK) - return; - } - if (buffer3d) { - LPDIRECTSOUNDBUFFER temp_buffer; - - rc=IDirectSoundBuffer_QueryInterface(*dsbo,&IID_IDirectSound3DBuffer, - (LPVOID *)&buffer); - ok(rc==DS_OK,"IDirectSoundBuffer_QueryInterface() failed: %08x\n", rc); - if (rc!=DS_OK) - return; - - /* check the COM interface */ - rc=IDirectSoundBuffer_QueryInterface(*dsbo, &IID_IDirectSoundBuffer, - (LPVOID *)&temp_buffer); - ok(rc==DS_OK && temp_buffer!=NULL, - "IDirectSoundBuffer_QueryInterface() failed: %08x\n", rc); - ok(temp_buffer==*dsbo,"COM interface broken: %p != %p\n", - temp_buffer,*dsbo); - ref=IDirectSoundBuffer_Release(temp_buffer); - ok(ref==1,"IDirectSoundBuffer_Release() has %d references, " - "should have 1\n",ref); - - temp_buffer=NULL; - rc=IDirectSound3DBuffer_QueryInterface(*dsbo, - &IID_IDirectSoundBuffer, - (LPVOID *)&temp_buffer); - ok(rc==DS_OK && temp_buffer!=NULL, - "IDirectSound3DBuffer_QueryInterface() failed: %08x\n", rc); - ok(temp_buffer==*dsbo,"COM interface broken: %p != %p\n", - temp_buffer,*dsbo); - ref=IDirectSoundBuffer_Release(temp_buffer); - ok(ref==1,"IDirectSoundBuffer_Release() has %d references, " - "should have 1\n",ref); - - ref=IDirectSoundBuffer_Release(*dsbo); - ok(ref==0,"IDirectSoundBuffer_Release() has %d references, " - "should have 0\n",ref); - - rc=IDirectSound3DBuffer_QueryInterface(buffer, - &IID_IDirectSoundBuffer, - (LPVOID *)dsbo); - ok(rc==DS_OK && *dsbo!=NULL,"IDirectSound3DBuffer_QueryInterface() " - "failed: %08x\n",rc); - - /* DSOUND: Error: Invalid buffer */ - rc=IDirectSound3DBuffer_GetAllParameters(buffer,0); - ok(rc==DSERR_INVALIDPARAM,"IDirectSound3DBuffer_GetAllParameters() " - "failed: %08x\n",rc); - - ZeroMemory(&buffer_param, sizeof(buffer_param)); - - /* DSOUND: Error: Invalid buffer */ - rc=IDirectSound3DBuffer_GetAllParameters(buffer,&buffer_param); - ok(rc==DSERR_INVALIDPARAM,"IDirectSound3DBuffer_GetAllParameters() " - "failed: %08x\n",rc); - - buffer_param.dwSize=sizeof(buffer_param); - rc=IDirectSound3DBuffer_GetAllParameters(buffer,&buffer_param); - ok(rc==DS_OK,"IDirectSound3DBuffer_GetAllParameters() failed: %08x\n", rc); - } - if (set_volume) { - if (dsbcaps.dwFlags & DSBCAPS_CTRLVOLUME) { - LONG val; - rc=IDirectSoundBuffer_GetVolume(*dsbo,&val); - ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume() failed: %08x\n", rc); - - rc=IDirectSoundBuffer_SetVolume(*dsbo,volume); - ok(rc==DS_OK,"IDirectSoundBuffer_SetVolume() failed: %08x\n", rc); - } else { - /* DSOUND: Error: Buffer does not have CTRLVOLUME */ - rc=IDirectSoundBuffer_GetVolume(*dsbo,&volume); - ok(rc==DSERR_CONTROLUNAVAIL,"IDirectSoundBuffer_GetVolume() " - "should have returned DSERR_CONTROLUNAVAIL, returned: %08x\n", rc); - } - } - - if (set_pan) { - if (dsbcaps.dwFlags & DSBCAPS_CTRLPAN) { - LONG val; - rc=IDirectSoundBuffer_GetPan(*dsbo,&val); - ok(rc==DS_OK,"IDirectSoundBuffer_GetPan() failed: %08x\n", rc); - - rc=IDirectSoundBuffer_SetPan(*dsbo,pan); - ok(rc==DS_OK,"IDirectSoundBuffer_SetPan() failed: %08x\n", rc); - } else { - /* DSOUND: Error: Buffer does not have CTRLPAN */ - rc=IDirectSoundBuffer_GetPan(*dsbo,&pan); - ok(rc==DSERR_CONTROLUNAVAIL,"IDirectSoundBuffer_GetPan() " - "should have returned DSERR_CONTROLUNAVAIL, returned: %08x\n", rc); - } - } - - /* try an offset past the end of the buffer */ - rc = IDirectSoundBuffer_Lock(*dsbo, dsbcaps.dwBufferBytes, 0, &buffer1, - &length1, NULL, NULL, - DSBLOCK_ENTIREBUFFER); - ok(rc==DSERR_INVALIDPARAM, "IDirectSoundBuffer_Lock() should have " - "returned DSERR_INVALIDPARAM, returned %08x\n", rc); - - /* try a size larger than the buffer */ - rc = IDirectSoundBuffer_Lock(*dsbo, 0, dsbcaps.dwBufferBytes + 1, - &buffer1, &length1, NULL, NULL, - DSBLOCK_FROMWRITECURSOR); - ok(rc==DSERR_INVALIDPARAM, "IDirectSoundBuffer_Lock() should have " - "returned DSERR_INVALIDPARAM, returned %08x\n", rc); - - if (set_frequency) - state.wave=wave_generate_la(&wfx,(duration*frequency)/wfx.nSamplesPerSec,&state.wave_len); - else - state.wave=wave_generate_la(&wfx,duration,&state.wave_len); - - state.dsbo=*dsbo; - state.wfx=&wfx; - state.buffer_size=dsbcaps.dwBufferBytes; - state.played=state.written=state.offset=0; - buffer_refill(&state,state.buffer_size); - - rc=IDirectSoundBuffer_Play(*dsbo,0,0,DSBPLAY_LOOPING); - ok(rc==DS_OK,"IDirectSoundBuffer_Play() failed: %08x\n", rc); - - rc=IDirectSoundBuffer_GetStatus(*dsbo,&status); - ok(rc==DS_OK,"IDirectSoundBuffer_GetStatus() failed: %08x\n", rc); - ok(status==(DSBSTATUS_PLAYING|DSBSTATUS_LOOPING), - "GetStatus: bad status: %x\n",status); - - if (listener) { - ZeroMemory(&listener_param,sizeof(listener_param)); - listener_param.dwSize=sizeof(listener_param); - rc=IDirectSound3DListener_GetAllParameters(listener, - &listener_param); - ok(rc==DS_OK,"IDirectSound3dListener_GetAllParameters() " - "failed: %08x\n",rc); - if (move_listener) { - listener_param.vPosition.x = -5.0f; - listener_param.vVelocity.x = (float)(10.0/duration); - } - rc=IDirectSound3DListener_SetAllParameters(listener, - &listener_param, - DS3D_IMMEDIATE); - ok(rc==DS_OK,"IDirectSound3dListener_SetPosition() failed: %08x\n", rc); - } - if (buffer3d) { - if (move_sound) { - buffer_param.vPosition.x = 100.0f; - buffer_param.vVelocity.x = (float)(-200.0/duration); - } - buffer_param.flMinDistance = 10; - rc=IDirectSound3DBuffer_SetAllParameters(buffer,&buffer_param, - DS3D_IMMEDIATE); - ok(rc==DS_OK,"IDirectSound3dBuffer_SetPosition() failed: %08x\n", rc); - } - - start_time=GetTickCount(); - while (buffer_service(&state)) { - WaitForSingleObject(GetCurrentProcess(),TIME_SLICE); - now=GetTickCount(); - if (listener && move_listener) { - listener_param.vPosition.x = (float)(-5.0+10.0*(now-start_time)/1000/duration); - if (winetest_debug>2) - trace("listener position=%g\n",listener_param.vPosition.x); - rc=IDirectSound3DListener_SetPosition(listener, - listener_param.vPosition.x,listener_param.vPosition.y, - listener_param.vPosition.z,DS3D_IMMEDIATE); - ok(rc==DS_OK,"IDirectSound3dListener_SetPosition() failed: %08x\n",rc); - } - if (buffer3d && move_sound) { - buffer_param.vPosition.x = (float)(100-200.0*(now-start_time)/1000/duration); - if (winetest_debug>2) - trace("sound position=%g\n",buffer_param.vPosition.x); - rc=IDirectSound3DBuffer_SetPosition(buffer, - buffer_param.vPosition.x,buffer_param.vPosition.y, - buffer_param.vPosition.z,DS3D_IMMEDIATE); - ok(rc==DS_OK,"IDirectSound3dBuffer_SetPosition() failed: %08x\n", rc); - } - } - /* Check the sound duration was within 10% of the expected value */ - now=GetTickCount(); - ok(fabs(1000*duration-now+start_time)<=100*duration, - "The sound played for %d ms instead of %g ms\n", - now-start_time,1000*duration); - - HeapFree(GetProcessHeap(), 0, state.wave); - if (is_primary) { - /* Set the CooperativeLevel back to normal */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ - rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_NORMAL) " - "failed: %08x\n",rc); - } - if (buffer3d) { - ref=IDirectSound3DBuffer_Release(buffer); - ok(ref==0,"IDirectSound3DBuffer_Release() has %d references, " - "should have 0\n",ref); - } - } -} - -static HRESULT test_secondary(LPGUID lpGuid, int play, - int has_3d, int has_3dbuffer, - int has_listener, int has_duplicate, - int move_listener, int move_sound) -{ - HRESULT rc; - LPDIRECTSOUND dso=NULL; - LPDIRECTSOUNDBUFFER primary=NULL,secondary=NULL; - LPDIRECTSOUND3DLISTENER listener=NULL; - DSBUFFERDESC bufdesc; - WAVEFORMATEX wfx, wfx1; - int ref; - - /* Create the DirectSound object */ - rc=pDirectSoundCreate(lpGuid,&dso,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %08x\n", rc); - if (rc!=DS_OK) - return rc; - - /* We must call SetCooperativeLevel before creating primary buffer */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ - rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08x\n",rc); - if (rc!=DS_OK) - goto EXIT; - - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER; - if (has_3d) - bufdesc.dwFlags|=DSBCAPS_CTRL3D; - else - bufdesc.dwFlags|=(DSBCAPS_CTRLVOLUME|DSBCAPS_CTRLPAN); - rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); - ok((rc==DS_OK && primary!=NULL) || (rc==DSERR_CONTROLUNAVAIL), - "IDirectSound_CreateSoundBuffer() failed to create a %sprimary buffer: %08x\n",has_3d?"3D ":"", rc); - if (rc==DSERR_CONTROLUNAVAIL) - trace(" No Primary\n"); - else if (rc==DS_OK && primary!=NULL) { - rc=IDirectSoundBuffer_GetFormat(primary,&wfx1,sizeof(wfx1),NULL); - ok(rc==DS_OK,"IDirectSoundBuffer8_Getformat() failed: %08x\n", rc); - if (rc!=DS_OK) - goto EXIT1; - - if (has_listener) { - rc=IDirectSoundBuffer_QueryInterface(primary, - &IID_IDirectSound3DListener, - (void **)&listener); - ok(rc==DS_OK && listener!=NULL, - "IDirectSoundBuffer_QueryInterface() failed to get a 3D listener: %08x\n",rc); - ref=IDirectSoundBuffer_Release(primary); - ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, " - "should have 0\n",ref); - if (rc==DS_OK && listener!=NULL) { - DS3DLISTENER listener_param; - ZeroMemory(&listener_param,sizeof(listener_param)); - /* DSOUND: Error: Invalid buffer */ - rc=IDirectSound3DListener_GetAllParameters(listener,0); - ok(rc==DSERR_INVALIDPARAM, - "IDirectSound3dListener_GetAllParameters() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n", rc); - - /* DSOUND: Error: Invalid buffer */ - rc=IDirectSound3DListener_GetAllParameters(listener, - &listener_param); - ok(rc==DSERR_INVALIDPARAM, - "IDirectSound3dListener_GetAllParameters() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n", rc); - - listener_param.dwSize=sizeof(listener_param); - rc=IDirectSound3DListener_GetAllParameters(listener, - &listener_param); - ok(rc==DS_OK,"IDirectSound3dListener_GetAllParameters() " - "failed: %08x\n",rc); - } else { - ok(listener==NULL, "IDirectSoundBuffer_QueryInterface() " - "failed but returned a listener anyway\n"); - ok(rc!=DS_OK, "IDirectSoundBuffer_QueryInterface() succeeded " - "but returned a NULL listener\n"); - if (listener) { - ref=IDirectSound3DListener_Release(listener); - ok(ref==0,"IDirectSound3dListener_Release() listener has " - "%d references, should have 0\n",ref); - } - goto EXIT2; - } - } - - init_format(&wfx,WAVE_FORMAT_PCM,22050,16,2); - secondary=NULL; - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=DSBCAPS_GETCURRENTPOSITION2; - if (has_3d) - bufdesc.dwFlags|=DSBCAPS_CTRL3D; - else - bufdesc.dwFlags|= - (DSBCAPS_CTRLFREQUENCY|DSBCAPS_CTRLVOLUME|DSBCAPS_CTRLPAN); - bufdesc.dwBufferBytes=align(wfx.nAvgBytesPerSec*BUFFER_LEN/1000, - wfx.nBlockAlign); - bufdesc.lpwfxFormat=&wfx; - if (winetest_interactive) { - trace(" Testing a %s%ssecondary buffer %s%s%s%sat %dx%dx%d " - "with a primary buffer at %dx%dx%d\n", - has_3dbuffer?"3D ":"", - has_duplicate?"duplicated ":"", - listener!=NULL||move_sound?"with ":"", - move_listener?"moving ":"", - listener!=NULL?"listener ":"", - listener&&move_sound?"and moving sound ":move_sound? - "moving sound ":"", - wfx.nSamplesPerSec,wfx.wBitsPerSample,wfx.nChannels, - wfx1.nSamplesPerSec,wfx1.wBitsPerSample,wfx1.nChannels); - } - rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); - ok(rc==DS_OK && secondary!=NULL,"IDirectSound_CreateSoundBuffer() " - "failed to create a %s%ssecondary buffer %s%s%s%sat %dx%dx%d (%s): %08x\n", - has_3dbuffer?"3D ":"", has_duplicate?"duplicated ":"", - listener!=NULL||move_sound?"with ":"", move_listener?"moving ":"", - listener!=NULL?"listener ":"", - listener&&move_sound?"and moving sound ":move_sound? - "moving sound ":"", - wfx.nSamplesPerSec,wfx.wBitsPerSample,wfx.nChannels, - getDSBCAPS(bufdesc.dwFlags),rc); - if (rc==DS_OK && secondary!=NULL) { - if (!has_3d) { - LONG refvol,vol,refpan,pan; - - /* Check the initial secondary buffer's volume and pan */ - rc=IDirectSoundBuffer_GetVolume(secondary,&vol); - ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume(secondary) failed: %08x\n",rc); - ok(vol==0,"wrong volume for a new secondary buffer: %d\n",vol); - rc=IDirectSoundBuffer_GetPan(secondary,&pan); - ok(rc==DS_OK,"IDirectSoundBuffer_GetPan(secondary) failed: %08x\n",rc); - ok(pan==0,"wrong pan for a new secondary buffer: %d\n",pan); - - /* Check that changing the secondary buffer's volume and pan - * does not impact the primary buffer's volume and pan - */ - rc=IDirectSoundBuffer_GetVolume(primary,&refvol); - ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume(primary) failed: %08x\n",rc); - rc=IDirectSoundBuffer_GetPan(primary,&refpan); - ok(rc==DS_OK,"IDirectSoundBuffer_GetPan(primary) failed: %08x\n", rc); - - rc=IDirectSoundBuffer_SetVolume(secondary,-1000); - ok(rc==DS_OK,"IDirectSoundBuffer_SetVolume(secondary) failed: %08x\n",rc); - rc=IDirectSoundBuffer_GetVolume(secondary,&vol); - ok(rc==DS_OK,"IDirectSoundBuffer_SetVolume(secondary) failed: %08x\n",rc); - ok(vol==-1000,"secondary: wrong volume %d instead of -1000\n", - vol); - rc=IDirectSoundBuffer_SetPan(secondary,-1000); - ok(rc==DS_OK,"IDirectSoundBuffer_SetPan(secondary) failed: %08x\n",rc); - rc=IDirectSoundBuffer_GetPan(secondary,&pan); - ok(rc==DS_OK,"IDirectSoundBuffer_SetPan(secondary) failed: %08x\n",rc); - ok(pan==-1000,"secondary: wrong pan %d instead of -1000\n", - pan); - - rc=IDirectSoundBuffer_GetVolume(primary,&vol); - ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume(primary) failed: %08x\n",rc); - ok(vol==refvol,"The primary volume changed from %d to %d\n", - refvol,vol); - rc=IDirectSoundBuffer_GetPan(primary,&pan); - ok(rc==DS_OK,"IDirectSoundBuffer_GetPan(primary) failed: %08x\n", rc); - ok(pan==refpan,"The primary pan changed from %d to %d\n", - refpan,pan); - - rc=IDirectSoundBuffer_SetVolume(secondary,0); - ok(rc==DS_OK,"IDirectSoundBuffer_SetVolume(secondary) failed: %08x\n",rc); - rc=IDirectSoundBuffer_SetPan(secondary,0); - ok(rc==DS_OK,"IDirectSoundBuffer_SetPan(secondary) failed: %08x\n",rc); - } - if (has_duplicate) { - LPDIRECTSOUNDBUFFER duplicated=NULL; - - /* DSOUND: Error: Invalid source buffer */ - rc=IDirectSound_DuplicateSoundBuffer(dso,0,0); - ok(rc==DSERR_INVALIDPARAM, - "IDirectSound_DuplicateSoundBuffer() should have returned " - "DSERR_INVALIDPARAM, returned: %08x\n",rc); - - /* DSOUND: Error: Invalid dest buffer */ - rc=IDirectSound_DuplicateSoundBuffer(dso,secondary,0); - ok(rc==DSERR_INVALIDPARAM, - "IDirectSound_DuplicateSoundBuffer() should have returned " - "DSERR_INVALIDPARAM, returned: %08x\n",rc); - - /* DSOUND: Error: Invalid source buffer */ - rc=IDirectSound_DuplicateSoundBuffer(dso,0,&duplicated); - ok(rc==DSERR_INVALIDPARAM, - "IDirectSound_DuplicateSoundBuffer() should have returned " - "DSERR_INVALIDPARAM, returned: %08x\n",rc); - - duplicated=NULL; - rc=IDirectSound_DuplicateSoundBuffer(dso,secondary, - &duplicated); - ok(rc==DS_OK && duplicated!=NULL, - "IDirectSound_DuplicateSoundBuffer() failed to duplicate " - "a secondary buffer: %08x\n",rc); - - if (rc==DS_OK && duplicated!=NULL) { - ref=IDirectSoundBuffer_Release(secondary); - ok(ref==0,"IDirectSoundBuffer_Release() secondary has %d " - "references, should have 0\n",ref); - secondary=duplicated; - } - } - - if (rc==DS_OK && secondary!=NULL) { - double duration; - duration=(move_listener || move_sound?4.0:1.0); - test_buffer(dso,&secondary,0,FALSE,0,FALSE,0, - winetest_interactive,duration,has_3dbuffer, - listener,move_listener,move_sound,FALSE,0); - ref=IDirectSoundBuffer_Release(secondary); - ok(ref==0,"IDirectSoundBuffer_Release() %s has %d references, " - "should have 0\n",has_duplicate?"duplicated":"secondary", - ref); - } - } -EXIT1: - if (has_listener) { - ref=IDirectSound3DListener_Release(listener); - ok(ref==0,"IDirectSound3dListener_Release() listener has %d " - "references, should have 0\n",ref); - } else { - ref=IDirectSoundBuffer_Release(primary); - ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, " - "should have 0\n",ref); - } - } else { - ok(primary==NULL,"IDirectSound_CreateSoundBuffer(primary) failed " - "but primary created anyway\n"); - ok(rc!=DS_OK,"IDirectSound_CreateSoundBuffer(primary) succeeded " - "but primary not created\n"); - if (primary) { - ref=IDirectSoundBuffer_Release(primary); - ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, " - "should have 0\n",ref); - } - } -EXIT2: - /* Set the CooperativeLevel back to normal */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ - rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_NORMAL) failed: %08x\n", rc); - -EXIT: - ref=IDirectSound_Release(dso); - ok(ref==0,"IDirectSound_Release() has %d references, should have 0\n",ref); - if (ref!=0) - return DSERR_GENERIC; - - return rc; -} - -static HRESULT test_for_driver(LPGUID lpGuid) -{ - HRESULT rc; - LPDIRECTSOUND dso=NULL; - int ref; - - /* Create the DirectSound object */ - rc=pDirectSoundCreate(lpGuid,&dso,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCreate() failed: %08x\n",rc); - if (rc!=DS_OK) - return rc; - - ref=IDirectSound_Release(dso); - ok(ref==0,"IDirectSound_Release() has %d references, should have 0\n",ref); - if (ref!=0) - return DSERR_GENERIC; - - return rc; -} - -static HRESULT test_primary(LPGUID lpGuid) -{ - HRESULT rc; - LPDIRECTSOUND dso=NULL; - LPDIRECTSOUNDBUFFER primary=NULL; - DSBUFFERDESC bufdesc; - DSCAPS dscaps; - int ref, i; - - /* Create the DirectSound object */ - rc=pDirectSoundCreate(lpGuid,&dso,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %08x\n", rc); - if (rc!=DS_OK) - return rc; - - /* Get the device capabilities */ - ZeroMemory(&dscaps, sizeof(dscaps)); - dscaps.dwSize=sizeof(dscaps); - rc=IDirectSound_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %08x\n",rc); - if (rc!=DS_OK) - goto EXIT; - - /* We must call SetCooperativeLevel before calling CreateSoundBuffer */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ - rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08x\n",rc); - if (rc!=DS_OK) - goto EXIT; - - /* Testing the primary buffer */ - primary=NULL; - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER|DSBCAPS_CTRLVOLUME|DSBCAPS_CTRLPAN; - rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); - ok((rc==DS_OK && primary!=NULL) || (rc==DSERR_CONTROLUNAVAIL), - "IDirectSound_CreateSoundBuffer() failed to create a primary buffer: %08x\n",rc); - if (rc==DSERR_CONTROLUNAVAIL) - trace(" No Primary\n"); - else if (rc==DS_OK && primary!=NULL) { - test_buffer(dso,&primary,1,TRUE,0,TRUE,0,winetest_interactive && - !(dscaps.dwFlags & DSCAPS_EMULDRIVER),1.0,0,NULL,0,0, - FALSE,0); - if (winetest_interactive) { - LONG volume,pan; - - volume = DSBVOLUME_MAX; - for (i = 0; i < 6; i++) { - test_buffer(dso,&primary,1,TRUE,volume,TRUE,0, - winetest_interactive && - !(dscaps.dwFlags & DSCAPS_EMULDRIVER), - 1.0,0,NULL,0,0,FALSE,0); - volume -= ((DSBVOLUME_MAX-DSBVOLUME_MIN) / 40); - } - - pan = DSBPAN_LEFT; - for (i = 0; i < 7; i++) { - test_buffer(dso,&primary,1,TRUE,0,TRUE,pan, - winetest_interactive && - !(dscaps.dwFlags & DSCAPS_EMULDRIVER),1.0,0,0,0,0,FALSE,0); - pan += ((DSBPAN_RIGHT-DSBPAN_LEFT) / 6); - } - } - ref=IDirectSoundBuffer_Release(primary); - ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, " - "should have 0\n",ref); - } - - /* Set the CooperativeLevel back to normal */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ - rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_NORMAL) failed: %08x\n", rc); - -EXIT: - ref=IDirectSound_Release(dso); - ok(ref==0,"IDirectSound_Release() has %d references, should have 0\n",ref); - if (ref!=0) - return DSERR_GENERIC; - - return rc; -} - -static HRESULT test_primary_3d(LPGUID lpGuid) -{ - HRESULT rc; - LPDIRECTSOUND dso=NULL; - LPDIRECTSOUNDBUFFER primary=NULL; - DSBUFFERDESC bufdesc; - DSCAPS dscaps; - int ref; - - /* Create the DirectSound object */ - rc=pDirectSoundCreate(lpGuid,&dso,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %08x\n", rc); - if (rc!=DS_OK) - return rc; - - /* Get the device capabilities */ - ZeroMemory(&dscaps, sizeof(dscaps)); - dscaps.dwSize=sizeof(dscaps); - rc=IDirectSound_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %08x\n",rc); - if (rc!=DS_OK) - goto EXIT; - - /* We must call SetCooperativeLevel before calling CreateSoundBuffer */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ - rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08x\n",rc); - if (rc!=DS_OK) - goto EXIT; - - primary=NULL; - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER; - rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); - ok(rc==DS_OK && primary!=NULL,"IDirectSound_CreateSoundBuffer() failed " - "to create a primary buffer: %08x\n",rc); - if (rc==DS_OK && primary!=NULL) { - ref=IDirectSoundBuffer_Release(primary); - ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, " - "should have 0\n",ref); - primary=NULL; - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER|DSBCAPS_CTRL3D; - rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); - ok(rc==DS_OK && primary!=NULL,"IDirectSound_CreateSoundBuffer() " - "failed to create a 3D primary buffer: %08x\n",rc); - if (rc==DS_OK && primary!=NULL) { - test_buffer(dso,&primary,1,FALSE,0,FALSE,0,winetest_interactive && - !(dscaps.dwFlags & DSCAPS_EMULDRIVER),1.0,0,0,0,0, - FALSE,0); - ref=IDirectSoundBuffer_Release(primary); - ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, " - "should have 0\n",ref); - } - } - /* Set the CooperativeLevel back to normal */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ - rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_NORMAL) failed: %08x\n", rc); - -EXIT: - ref=IDirectSound_Release(dso); - ok(ref==0,"IDirectSound_Release() has %d references, should have 0\n",ref); - if (ref!=0) - return DSERR_GENERIC; - - return rc; -} - -static HRESULT test_primary_3d_with_listener(LPGUID lpGuid) -{ - HRESULT rc; - LPDIRECTSOUND dso=NULL; - LPDIRECTSOUNDBUFFER primary=NULL; - DSBUFFERDESC bufdesc; - DSCAPS dscaps; - int ref; - - /* Create the DirectSound object */ - rc=pDirectSoundCreate(lpGuid,&dso,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate() failed: %08x\n", rc); - if (rc!=DS_OK) - return rc; - - /* Get the device capabilities */ - ZeroMemory(&dscaps, sizeof(dscaps)); - dscaps.dwSize=sizeof(dscaps); - rc=IDirectSound_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %08x\n",rc); - if (rc!=DS_OK) - goto EXIT; - - /* We must call SetCooperativeLevel before calling CreateSoundBuffer */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ - rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08x\n",rc); - if (rc!=DS_OK) - goto EXIT; - primary=NULL; - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER|DSBCAPS_CTRL3D; - rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); - ok(rc==DS_OK && primary!=NULL,"IDirectSound_CreateSoundBuffer() failed " - "to create a 3D primary buffer: %08x\n",rc); - if (rc==DS_OK && primary!=NULL) { - LPDIRECTSOUND3DLISTENER listener=NULL; - LPDIRECTSOUNDBUFFER temp_buffer=NULL; - rc=IDirectSoundBuffer_QueryInterface(primary, - &IID_IDirectSound3DListener,(void **)&listener); - ok(rc==DS_OK && listener!=NULL,"IDirectSoundBuffer_QueryInterface() " - "failed to get a 3D listener: %08x\n",rc); - if (rc==DS_OK && listener!=NULL) { - /* Checking the COM interface */ - rc=IDirectSoundBuffer_QueryInterface(primary, - &IID_IDirectSoundBuffer,(LPVOID *)&temp_buffer); - ok(rc==DS_OK && temp_buffer!=NULL, - "IDirectSoundBuffer_QueryInterface() failed: %08x\n", rc); - ok(temp_buffer==primary, - "COM interface broken: %p != %p\n", - temp_buffer,primary); - if (rc==DS_OK && temp_buffer!=NULL) { - ref=IDirectSoundBuffer_Release(temp_buffer); - ok(ref==1,"IDirectSoundBuffer_Release() has %d references, " - "should have 1\n",ref); - - temp_buffer=NULL; - rc=IDirectSound3DListener_QueryInterface(listener, - &IID_IDirectSoundBuffer,(LPVOID *)&temp_buffer); - ok(rc==DS_OK && temp_buffer!=NULL, - "IDirectSoundBuffer_QueryInterface() failed: %08x\n", rc); - ok(temp_buffer==primary, - "COM interface broken: %p != %p\n", - temp_buffer,primary); - ref=IDirectSoundBuffer_Release(temp_buffer); - ok(ref==1,"IDirectSoundBuffer_Release() has %d references, " - "should have 1\n",ref); - - /* Testing the buffer */ - test_buffer(dso,&primary,1,FALSE,0,FALSE,0, - winetest_interactive && - !(dscaps.dwFlags & DSCAPS_EMULDRIVER),1.0,0, - listener,0,0,FALSE,0); - - todo_wine { - temp_buffer = NULL; - rc=IDirectSound3DListener_QueryInterface(listener, - &IID_IKsPropertySet,(LPVOID *)&temp_buffer); - ok(rc==DS_OK && temp_buffer!=NULL, - "IDirectSound3DListener_QueryInterface didn't handle IKsPropertySet: ret = %08x\n", rc); - if(temp_buffer) - IKsPropertySet_Release(temp_buffer); - } - } - - /* Testing the reference counting */ - ref=IDirectSound3DListener_Release(listener); - ok(ref==0,"IDirectSound3DListener_Release() listener has %d " - "references, should have 0\n",ref); - } - - todo_wine { - temp_buffer = NULL; - rc=IDirectSoundBuffer_QueryInterface(primary, - &IID_IKsPropertySet,(LPVOID *)&temp_buffer); - ok(rc==DS_OK && temp_buffer!=NULL, - "IDirectSoundBuffer_QueryInterface didn't handle IKsPropertySet on primary buffer: ret = %08x\n", rc); - if(temp_buffer) - IKsPropertySet_Release(temp_buffer); - } - - /* Testing the reference counting */ - ref=IDirectSoundBuffer_Release(primary); - ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, " - "should have 0\n",ref); - } - -EXIT: - ref=IDirectSound_Release(dso); - ok(ref==0,"IDirectSound_Release() has %d references, should have 0\n",ref); - if (ref!=0) -return DSERR_GENERIC; - - return rc; -} - -static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, - LPCSTR lpcstrModule, LPVOID lpContext) -{ - HRESULT rc; - trace("*** Testing %s - %s ***\n",lpcstrDescription,lpcstrModule); - - rc = test_for_driver(lpGuid); - if (rc == DSERR_NODRIVER) { - trace(" No Driver\n"); - return 1; - } else if (rc == DSERR_ALLOCATED) { - trace(" Already In Use\n"); - return 1; - } else if (rc == E_FAIL) { - trace(" No Device\n"); - return 1; - } - - trace(" Testing the primary buffer\n"); - test_primary(lpGuid); - - trace(" Testing 3D primary buffer\n"); - test_primary_3d(lpGuid); - - trace(" Testing 3D primary buffer with listener\n"); - test_primary_3d_with_listener(lpGuid); - - /* Testing secondary buffers */ - test_secondary(lpGuid,winetest_interactive,0,0,0,0,0,0); - test_secondary(lpGuid,winetest_interactive,0,0,0,1,0,0); - - /* Testing 3D secondary buffers */ - test_secondary(lpGuid,winetest_interactive,1,0,0,0,0,0); - test_secondary(lpGuid,winetest_interactive,1,1,0,0,0,0); - test_secondary(lpGuid,winetest_interactive,1,1,0,1,0,0); - test_secondary(lpGuid,winetest_interactive,1,0,1,0,0,0); - test_secondary(lpGuid,winetest_interactive,1,0,1,1,0,0); - test_secondary(lpGuid,winetest_interactive,1,1,1,0,0,0); - test_secondary(lpGuid,winetest_interactive,1,1,1,1,0,0); - test_secondary(lpGuid,winetest_interactive,1,1,1,0,1,0); - test_secondary(lpGuid,winetest_interactive,1,1,1,0,0,1); - test_secondary(lpGuid,winetest_interactive,1,1,1,0,1,1); - - return 1; -} - -static void ds3d_tests(void) -{ - HRESULT rc; - rc=pDirectSoundEnumerateA(&dsenum_callback,NULL); - ok(rc==DS_OK,"DirectSoundEnumerateA() failed: %08x\n",rc); -} - -START_TEST(ds3d) -{ - HMODULE hDsound; - - CoInitialize(NULL); - - hDsound = LoadLibrary("dsound.dll"); - if (hDsound) - { - - pDirectSoundEnumerateA = (void*)GetProcAddress(hDsound, - "DirectSoundEnumerateA"); - pDirectSoundCreate = (void*)GetProcAddress(hDsound, - "DirectSoundCreate"); - - ds3d_tests(); - - FreeLibrary(hDsound); - } - else - skip("dsound.dll not found!\n"); - - CoUninitialize(); -} diff --git a/rostests/winetests/dsound/ds3d8.c b/rostests/winetests/dsound/ds3d8.c deleted file mode 100644 index 8ad428d3edc..00000000000 --- a/rostests/winetests/dsound/ds3d8.c +++ /dev/null @@ -1,1154 +0,0 @@ -/* - * Tests the panning and 3D functions of DirectSound - * - * Part of this test involves playing test tones. But this only makes - * sense if someone is going to carefully listen to it, and would only - * bother everyone else. - * So this is only done if the test is being run in interactive mode. - * - * Copyright (c) 2002-2004 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 - -#include - -#include "wine/test.h" -#include "dsound.h" -#include "mmreg.h" -#include "dsound_test.h" - -static HRESULT (WINAPI *pDirectSoundEnumerateA)(LPDSENUMCALLBACKA,LPVOID)=NULL; -static HRESULT (WINAPI *pDirectSoundCreate8)(LPCGUID,LPDIRECTSOUND8*,LPUNKNOWN)=NULL; - -typedef struct { - char* wave; - DWORD wave_len; - - LPDIRECTSOUNDBUFFER dsbo; - LPWAVEFORMATEX wfx; - DWORD buffer_size; - DWORD written; - DWORD played; - DWORD offset; -} play_state_t; - -static int buffer_refill8(play_state_t* state, DWORD size) -{ - LPVOID ptr1,ptr2; - DWORD len1,len2; - HRESULT rc; - - if (size>state->wave_len-state->written) - size=state->wave_len-state->written; - - rc=IDirectSoundBuffer_Lock(state->dsbo,state->offset,size, - &ptr1,&len1,&ptr2,&len2,0); - ok(rc==DS_OK,"IDirectSoundBuffer_Lock() failed: %08x\n", rc); - if (rc!=DS_OK) - return -1; - - memcpy(ptr1,state->wave+state->written,len1); - state->written+=len1; - if (ptr2!=NULL) { - memcpy(ptr2,state->wave+state->written,len2); - state->written+=len2; - } - state->offset=state->written % state->buffer_size; - rc=IDirectSoundBuffer_Unlock(state->dsbo,ptr1,len1,ptr2,len2); - ok(rc==DS_OK,"IDirectSoundBuffer_Unlock() failed: %08x\n", rc); - if (rc!=DS_OK) - return -1; - return size; -} - -static int buffer_silence8(play_state_t* state, DWORD size) -{ - LPVOID ptr1,ptr2; - DWORD len1,len2; - HRESULT rc; - BYTE s; - - rc=IDirectSoundBuffer_Lock(state->dsbo,state->offset,size, - &ptr1,&len1,&ptr2,&len2,0); - ok(rc==DS_OK,"IDirectSoundBuffer_Lock() failed: %08x\n", rc); - if (rc!=DS_OK) - return -1; - - s=(state->wfx->wBitsPerSample==8?0x80:0); - memset(ptr1,s,len1); - if (ptr2!=NULL) { - memset(ptr2,s,len2); - } - state->offset=(state->offset+size) % state->buffer_size; - rc=IDirectSoundBuffer_Unlock(state->dsbo,ptr1,len1,ptr2,len2); - ok(rc==DS_OK,"IDirectSoundBuffer_Unlock() failed: %08x\n", rc); - if (rc!=DS_OK) - return -1; - return size; -} - -static int buffer_service8(play_state_t* state) -{ - DWORD last_play_pos,play_pos,buf_free; - HRESULT rc; - - rc=IDirectSoundBuffer_GetCurrentPosition(state->dsbo,&play_pos,NULL); - ok(rc==DS_OK,"IDirectSoundBuffer_GetCurrentPosition() failed: %08x\n", rc); - if (rc!=DS_OK) { - goto STOP; - } - - /* Update the amount played */ - last_play_pos=state->played % state->buffer_size; - if (play_posplayed+=state->buffer_size-last_play_pos+play_pos; - else - state->played+=play_pos-last_play_pos; - - if (winetest_debug > 1) - trace("buf size=%d last_play_pos=%d play_pos=%d played=%d / %d\n", - state->buffer_size,last_play_pos,play_pos,state->played, - state->wave_len); - - if (state->played>state->wave_len) - { - /* Everything has been played */ - goto STOP; - } - - /* Refill the buffer */ - if (state->offset<=play_pos) - buf_free=play_pos-state->offset; - else - buf_free=state->buffer_size-state->offset+play_pos; - - if (winetest_debug > 1) - trace("offset=%d free=%d written=%d / %d\n", - state->offset,buf_free,state->written,state->wave_len); - if (buf_free==0) - return 1; - - if (state->writtenwave_len) - { - int w=buffer_refill8(state,buf_free); - if (w==-1) - goto STOP; - buf_free-=w; - if (state->written==state->wave_len && winetest_debug > 1) - trace("last sound byte at %d\n", - (state->written % state->buffer_size)); - } - - if (buf_free>0) { - /* Fill with silence */ - if (winetest_debug > 1) - trace("writing %d bytes of silence\n",buf_free); - if (buffer_silence8(state,buf_free)==-1) - goto STOP; - } - return 1; - -STOP: - if (winetest_debug > 1) - trace("stopping playback\n"); - rc=IDirectSoundBuffer_Stop(state->dsbo); - ok(rc==DS_OK,"IDirectSoundBuffer_Stop() failed: %08x\n", rc); - return 0; -} - -void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo, - BOOL is_primary, BOOL set_volume, LONG volume, - BOOL set_pan, LONG pan, BOOL play, double duration, - BOOL buffer3d, LPDIRECTSOUND3DLISTENER listener, - BOOL move_listener, BOOL move_sound) -{ - HRESULT rc; - DSBCAPS dsbcaps; - WAVEFORMATEX wfx,wfx2; - DWORD size,status,freq; - int ref; - - /* DSOUND: Error: Invalid caps pointer */ - rc=IDirectSoundBuffer_GetCaps(*dsbo,0); - ok(rc==DSERR_INVALIDPARAM,"IDirectSoundBuffer_GetCaps() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); - - ZeroMemory(&dsbcaps, sizeof(dsbcaps)); - - /* DSOUND: Error: Invalid caps pointer */ - rc=IDirectSoundBuffer_GetCaps(*dsbo,&dsbcaps); - ok(rc==DSERR_INVALIDPARAM,"IDirectSoundBuffer_GetCaps() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); - - dsbcaps.dwSize=sizeof(dsbcaps); - rc=IDirectSoundBuffer_GetCaps(*dsbo,&dsbcaps); - ok(rc==DS_OK,"IDirectSoundBuffer_GetCaps() failed: %08x\n", rc); - if (rc==DS_OK && winetest_debug > 1) { - trace(" Caps: flags=0x%08x size=%d\n",dsbcaps.dwFlags, - dsbcaps.dwBufferBytes); - } - - /* Query the format size. */ - size=0; - rc=IDirectSoundBuffer_GetFormat(*dsbo,NULL,0,&size); - ok(rc==DS_OK && size!=0,"IDirectSoundBuffer_GetFormat() should have " - "returned the needed size: rc=%08x size=%d\n",rc,size); - - ok(size == sizeof(WAVEFORMATEX) || size == sizeof(WAVEFORMATEXTENSIBLE), - "Expected a correct structure size, got %d\n", size); - - if (size == sizeof(WAVEFORMATEX)) { - rc=IDirectSoundBuffer_GetFormat(*dsbo,&wfx,size,NULL); - } else if (size == sizeof(WAVEFORMATEXTENSIBLE)) { - WAVEFORMATEXTENSIBLE wfxe; - rc=IDirectSoundBuffer_GetFormat(*dsbo,(WAVEFORMATEX*)&wfxe,size,NULL); - wfx = wfxe.Format; - } - ok(rc==DS_OK,"IDirectSoundBuffer_GetFormat() failed: %08x\n", rc); - if (rc==DS_OK && winetest_debug > 1) { - trace(" Format: %s tag=0x%04x %dx%dx%d avg.B/s=%d align=%d\n", - is_primary ? "Primary" : "Secondary", - wfx.wFormatTag,wfx.nSamplesPerSec,wfx.wBitsPerSample, - wfx.nChannels,wfx.nAvgBytesPerSec,wfx.nBlockAlign); - } - - /* DSOUND: Error: Invalid frequency buffer */ - rc=IDirectSoundBuffer_GetFrequency(*dsbo,0); - ok(rc==DSERR_INVALIDPARAM,"IDirectSoundBuffer_GetFrequency() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); - - /* DSOUND: Error: Primary buffers don't support CTRLFREQUENCY */ - rc=IDirectSoundBuffer_GetFrequency(*dsbo,&freq); - ok((rc==DS_OK && !is_primary) || (rc==DSERR_CONTROLUNAVAIL&&is_primary) || - (rc==DSERR_CONTROLUNAVAIL&&!(dsbcaps.dwFlags&DSBCAPS_CTRLFREQUENCY)), - "IDirectSoundBuffer_GetFrequency() failed: %08x\n",rc); - if (rc==DS_OK) { - ok(freq==wfx.nSamplesPerSec,"The frequency returned by GetFrequency " - "%d does not match the format %d\n",freq,wfx.nSamplesPerSec); - } - - /* DSOUND: Error: Invalid status pointer */ - rc=IDirectSoundBuffer_GetStatus(*dsbo,0); - ok(rc==DSERR_INVALIDPARAM,"IDirectSoundBuffer_GetStatus() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); - - rc=IDirectSoundBuffer_GetStatus(*dsbo,&status); - ok(rc==DS_OK,"IDirectSoundBuffer_GetStatus() failed: %08x\n", rc); - ok(status==0,"status=0x%x instead of 0\n",status); - - if (is_primary) { - DSBCAPS new_dsbcaps; - /* We must call SetCooperativeLevel to be allowed to call SetFormat */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ - rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_PRIORITY) " - "failed: %08x\n",rc); - if (rc!=DS_OK) - return; - - /* DSOUND: Error: Invalid format pointer */ - rc=IDirectSoundBuffer_SetFormat(*dsbo,0); - ok(rc==DSERR_INVALIDPARAM,"IDirectSoundBuffer_SetFormat() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); - - init_format(&wfx2,WAVE_FORMAT_PCM,11025,16,2); - rc=IDirectSoundBuffer_SetFormat(*dsbo,&wfx2); - ok(rc==DS_OK,"IDirectSoundBuffer_SetFormat(%s) failed: %08x\n", - format_string(&wfx2), rc); - - /* There is no guarantee that SetFormat will actually change the - * format to what we asked for. It depends on what the soundcard - * supports. So we must re-query the format. - */ - rc=IDirectSoundBuffer_GetFormat(*dsbo,&wfx,sizeof(wfx),NULL); - ok(rc==DS_OK,"IDirectSoundBuffer_GetFormat() failed: %08x\n", rc); - if (rc==DS_OK && - (wfx.wFormatTag!=wfx2.wFormatTag || - wfx.nSamplesPerSec!=wfx2.nSamplesPerSec || - wfx.wBitsPerSample!=wfx2.wBitsPerSample || - wfx.nChannels!=wfx2.nChannels)) { - trace("Requested format tag=0x%04x %dx%dx%d avg.B/s=%d align=%d\n", - wfx2.wFormatTag,wfx2.nSamplesPerSec,wfx2.wBitsPerSample, - wfx2.nChannels,wfx2.nAvgBytesPerSec,wfx2.nBlockAlign); - trace("Got tag=0x%04x %dx%dx%d avg.B/s=%d align=%d\n", - wfx.wFormatTag,wfx.nSamplesPerSec,wfx.wBitsPerSample, - wfx.nChannels,wfx.nAvgBytesPerSec,wfx.nBlockAlign); - } - - ZeroMemory(&new_dsbcaps, sizeof(new_dsbcaps)); - new_dsbcaps.dwSize = sizeof(new_dsbcaps); - rc=IDirectSoundBuffer_GetCaps(*dsbo,&new_dsbcaps); - ok(rc==DS_OK,"IDirectSoundBuffer_GetCaps() failed: %08x\n", rc); - if (rc==DS_OK && winetest_debug > 1) { - trace(" new Caps: flags=0x%08x size=%d\n",new_dsbcaps.dwFlags, - new_dsbcaps.dwBufferBytes); - } - - /* Check for primary buffer size change */ - ok(new_dsbcaps.dwBufferBytes == dsbcaps.dwBufferBytes, - " buffer size changed after SetFormat() - " - "previous size was %u, current size is %u\n", - dsbcaps.dwBufferBytes, new_dsbcaps.dwBufferBytes); - dsbcaps.dwBufferBytes = new_dsbcaps.dwBufferBytes; - - /* Check for primary buffer flags change */ - ok(new_dsbcaps.dwFlags == dsbcaps.dwFlags, - " flags changed after SetFormat() - " - "previous flags were %08x, current flags are %08x\n", - dsbcaps.dwFlags, new_dsbcaps.dwFlags); - - /* Set the CooperativeLevel back to normal */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ - rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_NORMAL) " - "failed: %08x\n",rc); - } - - if (play) { - play_state_t state; - DS3DLISTENER listener_param; - LPDIRECTSOUND3DBUFFER buffer=NULL; - DS3DBUFFER buffer_param; - DWORD start_time,now; - LPVOID buffer1; - DWORD length1; - - if (winetest_interactive) { - trace(" Playing %g second 440Hz tone at %dx%dx%d\n", duration, - wfx.nSamplesPerSec, wfx.wBitsPerSample,wfx.nChannels); - } - - if (is_primary) { - /* We must call SetCooperativeLevel to be allowed to call Lock */ - /* DSOUND: Setting DirectSound cooperative level to - * DSSCL_WRITEPRIMARY */ - rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(), - DSSCL_WRITEPRIMARY); - ok(rc==DS_OK, - "IDirectSound8_SetCooperativeLevel(DSSCL_WRITEPRIMARY) failed: %08x\n",rc); - if (rc!=DS_OK) - return; - } - if (buffer3d) { - LPDIRECTSOUNDBUFFER temp_buffer; - - rc=IDirectSoundBuffer_QueryInterface(*dsbo,&IID_IDirectSound3DBuffer, - (LPVOID *)&buffer); - ok(rc==DS_OK,"IDirectSoundBuffer_QueryInterface() failed: %08x\n", rc); - if (rc!=DS_OK) - return; - - /* check the COM interface */ - rc=IDirectSoundBuffer_QueryInterface(*dsbo, &IID_IDirectSoundBuffer, - (LPVOID *)&temp_buffer); - ok(rc==DS_OK && temp_buffer!=NULL, - "IDirectSoundBuffer_QueryInterface() failed: %08x\n", rc); - ok(temp_buffer==*dsbo,"COM interface broken: %p != %p\n", - temp_buffer,*dsbo); - ref=IDirectSoundBuffer_Release(temp_buffer); - ok(ref==1,"IDirectSoundBuffer_Release() has %d references, " - "should have 1\n",ref); - - temp_buffer=NULL; - rc=IDirectSound3DBuffer_QueryInterface(*dsbo, &IID_IDirectSoundBuffer, - (LPVOID *)&temp_buffer); - ok(rc==DS_OK && temp_buffer!=NULL, - "IDirectSound3DBuffer_QueryInterface() failed: %08x\n", rc); - ok(temp_buffer==*dsbo,"COM interface broken: %p != %p\n", - temp_buffer,*dsbo); - ref=IDirectSoundBuffer_Release(temp_buffer); - ok(ref==1,"IDirectSoundBuffer_Release() has %d references, " - "should have 1\n",ref); - - ref=IDirectSoundBuffer_Release(*dsbo); - ok(ref==0,"IDirectSoundBuffer_Release() has %d references, " - "should have 0\n",ref); - - rc=IDirectSound3DBuffer_QueryInterface(buffer, - &IID_IDirectSoundBuffer, - (LPVOID *)dsbo); - ok(rc==DS_OK && *dsbo!=NULL,"IDirectSound3DBuffer_QueryInterface() " - "failed: %08x\n",rc); - - /* DSOUND: Error: Invalid buffer */ - rc=IDirectSound3DBuffer_GetAllParameters(buffer,0); - ok(rc==DSERR_INVALIDPARAM,"IDirectSound3DBuffer_GetAllParameters() " - "failed: %08x\n",rc); - - ZeroMemory(&buffer_param, sizeof(buffer_param)); - - /* DSOUND: Error: Invalid buffer */ - rc=IDirectSound3DBuffer_GetAllParameters(buffer,&buffer_param); - ok(rc==DSERR_INVALIDPARAM,"IDirectSound3DBuffer_GetAllParameters() " - "failed: %08x\n",rc); - - buffer_param.dwSize=sizeof(buffer_param); - rc=IDirectSound3DBuffer_GetAllParameters(buffer,&buffer_param); - ok(rc==DS_OK,"IDirectSound3DBuffer_GetAllParameters() failed: %08x\n", rc); - } - if (set_volume) { - if (dsbcaps.dwFlags & DSBCAPS_CTRLVOLUME) { - LONG val; - rc=IDirectSoundBuffer_GetVolume(*dsbo,&val); - ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume() failed: %08x\n", rc); - - rc=IDirectSoundBuffer_SetVolume(*dsbo,volume); - ok(rc==DS_OK,"IDirectSoundBuffer_SetVolume() failed: %08x\n", rc); - } else { - /* DSOUND: Error: Buffer does not have CTRLVOLUME */ - rc=IDirectSoundBuffer_GetVolume(*dsbo,&volume); - ok(rc==DSERR_CONTROLUNAVAIL,"IDirectSoundBuffer_GetVolume() " - "should have returned DSERR_CONTROLUNAVAIL, returned: %08x\n", rc); - } - } - - if (set_pan) { - if (dsbcaps.dwFlags & DSBCAPS_CTRLPAN) { - LONG val; - rc=IDirectSoundBuffer_GetPan(*dsbo,&val); - ok(rc==DS_OK,"IDirectSoundBuffer_GetPan() failed: %08x\n", rc); - - rc=IDirectSoundBuffer_SetPan(*dsbo,pan); - ok(rc==DS_OK,"IDirectSoundBuffer_SetPan() failed: %08x\n", rc); - } else { - /* DSOUND: Error: Buffer does not have CTRLPAN */ - rc=IDirectSoundBuffer_GetPan(*dsbo,&pan); - ok(rc==DSERR_CONTROLUNAVAIL,"IDirectSoundBuffer_GetPan() " - "should have returned DSERR_CONTROLUNAVAIL, returned: %08x\n", rc); - } - } - - /* try an offset past the end of the buffer */ - rc = IDirectSoundBuffer_Lock(*dsbo, dsbcaps.dwBufferBytes, 0, &buffer1, - &length1, NULL, NULL, - DSBLOCK_ENTIREBUFFER); - ok(rc==DSERR_INVALIDPARAM, "IDirectSoundBuffer_Lock() should have " - "returned DSERR_INVALIDPARAM, returned %08x\n", rc); - - /* try a size larger than the buffer */ - rc = IDirectSoundBuffer_Lock(*dsbo, 0, dsbcaps.dwBufferBytes + 1, - &buffer1, &length1, NULL, NULL, - DSBLOCK_FROMWRITECURSOR); - ok(rc==DSERR_INVALIDPARAM, "IDirectSoundBuffer_Lock() should have " - "returned DSERR_INVALIDPARAM, returned %08x\n", rc); - - state.wave=wave_generate_la(&wfx,duration,&state.wave_len); - - state.dsbo=*dsbo; - state.wfx=&wfx; - state.buffer_size=dsbcaps.dwBufferBytes; - state.played=state.written=state.offset=0; - buffer_refill8(&state,state.buffer_size); - - rc=IDirectSoundBuffer_Play(*dsbo,0,0,DSBPLAY_LOOPING); - ok(rc==DS_OK,"IDirectSoundBuffer_Play() failed: %08x\n", rc); - - rc=IDirectSoundBuffer_GetStatus(*dsbo,&status); - ok(rc==DS_OK,"IDirectSoundBuffer_GetStatus() failed: %08x\n", rc); - ok(status==(DSBSTATUS_PLAYING|DSBSTATUS_LOOPING), - "GetStatus: bad status: %x\n",status); - - if (listener) { - ZeroMemory(&listener_param,sizeof(listener_param)); - listener_param.dwSize=sizeof(listener_param); - rc=IDirectSound3DListener_GetAllParameters(listener,&listener_param); - ok(rc==DS_OK,"IDirectSound3dListener_GetAllParameters() " - "failed: %08x\n",rc); - if (move_listener) { - listener_param.vPosition.x = -5.0f; - listener_param.vVelocity.x = (float)(10.0/duration); - } - rc=IDirectSound3DListener_SetAllParameters(listener, - &listener_param, - DS3D_IMMEDIATE); - ok(rc==DS_OK,"IDirectSound3dListener_SetPosition() failed: %08x\n", rc); - } - if (buffer3d) { - if (move_sound) { - buffer_param.vPosition.x = 100.0f; - buffer_param.vVelocity.x = (float)(-200.0/duration); - } - buffer_param.flMinDistance = 10; - rc=IDirectSound3DBuffer_SetAllParameters(buffer,&buffer_param, - DS3D_IMMEDIATE); - ok(rc==DS_OK,"IDirectSound3dBuffer_SetPosition() failed: %08x\n", rc); - } - - start_time=GetTickCount(); - while (buffer_service8(&state)) { - WaitForSingleObject(GetCurrentProcess(),TIME_SLICE); - now=GetTickCount(); - if (listener && move_listener) { - listener_param.vPosition.x = (float)(-5.0+10.0*(now-start_time)/1000/duration); - if (winetest_debug>2) - trace("listener position=%g\n",listener_param.vPosition.x); - rc=IDirectSound3DListener_SetPosition(listener, - listener_param.vPosition.x,listener_param.vPosition.y, - listener_param.vPosition.z,DS3D_IMMEDIATE); - ok(rc==DS_OK,"IDirectSound3dListener_SetPosition() failed: %08x\n",rc); - } - if (buffer3d && move_sound) { - buffer_param.vPosition.x = (float)(100-200.0*(now-start_time)/1000/duration); - if (winetest_debug>2) - trace("sound position=%g\n",buffer_param.vPosition.x); - rc=IDirectSound3DBuffer_SetPosition(buffer, - buffer_param.vPosition.x,buffer_param.vPosition.y, - buffer_param.vPosition.z,DS3D_IMMEDIATE); - ok(rc==DS_OK,"IDirectSound3dBuffer_SetPosition() failed: %08x\n", rc); - } - } - /* Check the sound duration was within 10% of the expected value */ - now=GetTickCount(); - ok(fabs(1000*duration-now+start_time)<=100*duration, - "The sound played for %d ms instead of %g ms\n", - now-start_time,1000*duration); - - HeapFree(GetProcessHeap(), 0, state.wave); - if (is_primary) { - /* Set the CooperativeLevel back to normal */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ - rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_NORMAL) " - "failed: %08x\n",rc); - } - if (buffer3d) { - ref=IDirectSound3DBuffer_Release(buffer); - ok(ref==0,"IDirectSound3DBuffer_Release() has %d references, " - "should have 0\n",ref); - } - } -} - -static HRESULT test_secondary8(LPGUID lpGuid, int play, - int has_3d, int has_3dbuffer, - int has_listener, int has_duplicate, - int move_listener, int move_sound) -{ - HRESULT rc; - LPDIRECTSOUND8 dso=NULL; - LPDIRECTSOUNDBUFFER primary=NULL,secondary=NULL; - LPDIRECTSOUND3DLISTENER listener=NULL; - DSBUFFERDESC bufdesc; - WAVEFORMATEX wfx, wfx1; - int ref; - - /* Create the DirectSound object */ - rc=pDirectSoundCreate8(lpGuid,&dso,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %08x\n", rc); - if (rc!=DS_OK) - return rc; - - /* We must call SetCooperativeLevel before creating primary buffer */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ - rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08x\n",rc); - if (rc!=DS_OK) - goto EXIT; - - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER; - if (has_3d) - bufdesc.dwFlags|=DSBCAPS_CTRL3D; - else - bufdesc.dwFlags|=(DSBCAPS_CTRLVOLUME|DSBCAPS_CTRLPAN); - rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); - ok((rc==DS_OK && primary!=NULL) || (rc == DSERR_CONTROLUNAVAIL), - "IDirectSound8_CreateSoundBuffer() failed to create a %sprimary buffer: %08x\n",has_3d?"3D ":"", rc); - if (rc == DSERR_CONTROLUNAVAIL) - trace(" No Primary\n"); - else if (rc==DS_OK && primary!=NULL) { - rc=IDirectSoundBuffer_GetFormat(primary,&wfx1,sizeof(wfx1),NULL); - ok(rc==DS_OK,"IDirectSoundBuffer8_Getformat() failed: %08x\n", rc); - if (rc!=DS_OK) - goto EXIT1; - - if (has_listener) { - rc=IDirectSoundBuffer_QueryInterface(primary, - &IID_IDirectSound3DListener, - (void **)&listener); - ok(rc==DS_OK && listener!=NULL, - "IDirectSoundBuffer_QueryInterface() failed to get a 3D " - "listener %08x\n",rc); - ref=IDirectSoundBuffer_Release(primary); - ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, " - "should have 0\n",ref); - if (rc==DS_OK && listener!=NULL) { - DS3DLISTENER listener_param; - ZeroMemory(&listener_param,sizeof(listener_param)); - /* DSOUND: Error: Invalid buffer */ - rc=IDirectSound3DListener_GetAllParameters(listener,0); - ok(rc==DSERR_INVALIDPARAM, - "IDirectSound3dListener_GetAllParameters() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n", rc); - - /* DSOUND: Error: Invalid buffer */ - rc=IDirectSound3DListener_GetAllParameters(listener, - &listener_param); - ok(rc==DSERR_INVALIDPARAM, - "IDirectSound3dListener_GetAllParameters() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n", rc); - - listener_param.dwSize=sizeof(listener_param); - rc=IDirectSound3DListener_GetAllParameters(listener, - &listener_param); - ok(rc==DS_OK,"IDirectSound3dListener_GetAllParameters() " - "failed: %08x\n",rc); - } else { - ok(listener==NULL, "IDirectSoundBuffer_QueryInterface() " - "failed but returned a listener anyway\n"); - ok(rc!=DS_OK, "IDirectSoundBuffer_QueryInterface() succeeded " - "but returned a NULL listener\n"); - if (listener) { - ref=IDirectSound3DListener_Release(listener); - ok(ref==0,"IDirectSound3dListener_Release() listener has " - "%d references, should have 0\n",ref); - } - goto EXIT2; - } - } - - init_format(&wfx,WAVE_FORMAT_PCM,22050,16,2); - secondary=NULL; - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=DSBCAPS_GETCURRENTPOSITION2; - if (has_3d) - bufdesc.dwFlags|=DSBCAPS_CTRL3D; - else - bufdesc.dwFlags|= - (DSBCAPS_CTRLFREQUENCY|DSBCAPS_CTRLVOLUME|DSBCAPS_CTRLPAN); - bufdesc.dwBufferBytes=align(wfx.nAvgBytesPerSec*BUFFER_LEN/1000, - wfx.nBlockAlign); - bufdesc.lpwfxFormat=&wfx; - if (has_3d) { - /* a stereo 3D buffer should fail */ - rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); - ok(rc==DSERR_INVALIDPARAM, - "IDirectSound8_CreateSoundBuffer(secondary) should have " - "returned DSERR_INVALIDPARAM, returned %08x\n", rc); - if (secondary) - ref=IDirectSoundBuffer_Release(secondary); - init_format(&wfx,WAVE_FORMAT_PCM,22050,16,1); - } - - if (winetest_interactive) { - trace(" Testing a %s%ssecondary buffer %s%s%s%sat %dx%dx%d " - "with a primary buffer at %dx%dx%d\n", - has_3dbuffer?"3D ":"", - has_duplicate?"duplicated ":"", - listener!=NULL||move_sound?"with ":"", - move_listener?"moving ":"", - listener!=NULL?"listener ":"", - listener&&move_sound?"and moving sound ":move_sound? - "moving sound ":"", - wfx.nSamplesPerSec,wfx.wBitsPerSample,wfx.nChannels, - wfx1.nSamplesPerSec,wfx1.wBitsPerSample,wfx1.nChannels); - } - rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); - ok(rc==DS_OK && secondary!=NULL,"IDirectSound8_CreateSoundBuffer() " - "failed to create a %s%ssecondary buffer %s%s%s%sat %dx%dx%d (%s): %08x\n", - has_3dbuffer?"3D ":"", has_duplicate?"duplicated ":"", - listener!=NULL||move_sound?"with ":"", move_listener?"moving ":"", - listener!=NULL?"listener ":"", - listener&&move_sound?"and moving sound ":move_sound? - "moving sound ":"", - wfx.nSamplesPerSec,wfx.wBitsPerSample,wfx.nChannels, - getDSBCAPS(bufdesc.dwFlags),rc); - if (rc==DS_OK && secondary!=NULL) { - if (!has_3d) { - LONG refvol,vol,refpan,pan; - - /* Check the initial secondary buffer's volume and pan */ - rc=IDirectSoundBuffer_GetVolume(secondary,&vol); - ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume(secondary) failed: %08x\n",rc); - ok(vol==0,"wrong volume for a new secondary buffer: %d\n",vol); - rc=IDirectSoundBuffer_GetPan(secondary,&pan); - ok(rc==DS_OK,"IDirectSoundBuffer_GetPan(secondary) failed: %08x\n",rc); - ok(pan==0,"wrong pan for a new secondary buffer: %d\n",pan); - - /* Check that changing the secondary buffer's volume and pan - * does not impact the primary buffer's volume and pan - */ - rc=IDirectSoundBuffer_GetVolume(primary,&refvol); - ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume(primary) failed: %08x\n",rc); - rc=IDirectSoundBuffer_GetPan(primary,&refpan); - ok(rc==DS_OK,"IDirectSoundBuffer_GetPan(primary) failed: %08x\n",rc); - - rc=IDirectSoundBuffer_SetVolume(secondary,-1000); - ok(rc==DS_OK,"IDirectSoundBuffer_SetVolume(secondary) failed: %08x\n",rc); - rc=IDirectSoundBuffer_GetVolume(secondary,&vol); - ok(rc==DS_OK,"IDirectSoundBuffer_SetVolume(secondary) failed: %08x\n",rc); - ok(vol==-1000,"secondary: wrong volume %d instead of -1000\n", - vol); - rc=IDirectSoundBuffer_SetPan(secondary,-1000); - ok(rc==DS_OK,"IDirectSoundBuffer_SetPan(secondary) failed: %08x\n",rc); - rc=IDirectSoundBuffer_GetPan(secondary,&pan); - ok(rc==DS_OK,"IDirectSoundBuffer_SetPan(secondary) failed: %08x\n",rc); - ok(pan==-1000,"secondary: wrong pan %d instead of -1000\n", - pan); - - rc=IDirectSoundBuffer_GetVolume(primary,&vol); - ok(rc==DS_OK,"IDirectSoundBuffer_`GetVolume(primary) failed: i%08x\n",rc); - ok(vol==refvol,"The primary volume changed from %d to %d\n", - refvol,vol); - rc=IDirectSoundBuffer_GetPan(primary,&pan); - ok(rc==DS_OK,"IDirectSoundBuffer_GetPan(primary) failed: %08x\n",rc); - ok(pan==refpan,"The primary pan changed from %d to %d\n", - refpan,pan); - - rc=IDirectSoundBuffer_SetVolume(secondary,0); - ok(rc==DS_OK,"IDirectSoundBuffer_SetVolume(secondary) failed: %08x\n",rc); - rc=IDirectSoundBuffer_SetPan(secondary,0); - ok(rc==DS_OK,"IDirectSoundBuffer_SetPan(secondary) failed: %08x\n",rc); - } - if (has_duplicate) { - LPDIRECTSOUNDBUFFER duplicated=NULL; - - /* DSOUND: Error: Invalid source buffer */ - rc=IDirectSound8_DuplicateSoundBuffer(dso,0,0); - ok(rc==DSERR_INVALIDPARAM, - "IDirectSound8_DuplicateSoundBuffer() should have returned " - "DSERR_INVALIDPARAM, returned: %08x\n",rc); - - /* DSOUND: Error: Invalid dest buffer */ - rc=IDirectSound8_DuplicateSoundBuffer(dso,secondary,0); - ok(rc==DSERR_INVALIDPARAM, - "IDirectSound8_DuplicateSoundBuffer() should have returned " - "DSERR_INVALIDPARAM, returned: %08x\n",rc); - - /* DSOUND: Error: Invalid source buffer */ - rc=IDirectSound8_DuplicateSoundBuffer(dso,0,&duplicated); - ok(rc==DSERR_INVALIDPARAM, - "IDirectSound8_DuplicateSoundBuffer() should have returned " - "DSERR_INVALIDPARAM, returned: %08x\n",rc); - - duplicated=NULL; - rc=IDirectSound8_DuplicateSoundBuffer(dso,secondary, - &duplicated); - ok(rc==DS_OK && duplicated!=NULL, - "IDirectSound8_DuplicateSoundBuffer() failed to duplicate " - "a secondary buffer: %08x\n",rc); - - if (rc==DS_OK && duplicated!=NULL) { - ref=IDirectSoundBuffer_Release(secondary); - ok(ref==0,"IDirectSoundBuffer_Release() secondary has %d " - "references, should have 0\n",ref); - secondary=duplicated; - } - } - - if (rc==DS_OK && secondary!=NULL) { - double duration; - duration=(move_listener || move_sound?4.0:1.0); - test_buffer8(dso,&secondary,0,FALSE,0,FALSE,0, - winetest_interactive,duration,has_3dbuffer, - listener,move_listener,move_sound); - ref=IDirectSoundBuffer_Release(secondary); - ok(ref==0,"IDirectSoundBuffer_Release() %s has %d references, " - "should have 0\n",has_duplicate?"duplicated":"secondary", - ref); - } - } -EXIT1: - if (has_listener) { - if (listener) { - ref=IDirectSound3DListener_Release(listener); - ok(ref==0,"IDirectSound3dListener_Release() listener has %d " - "references, should have 0\n",ref); - } - } else { - ref=IDirectSoundBuffer_Release(primary); - ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, " - "should have 0\n",ref); - } - } else { - ok(primary==NULL,"IDirectSound8_CreateSoundBuffer(primary) failed " - "but primary created anyway\n"); - ok(rc!=DS_OK,"IDirectSound8_CreateSoundBuffer(primary) succeeded " - "but primary not created\n"); - if (primary) { - ref=IDirectSoundBuffer_Release(primary); - ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, " - "should have 0\n",ref); - } - } -EXIT2: - /* Set the CooperativeLevel back to normal */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ - rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_NORMAL) failed: %08x\n",rc); - -EXIT: - ref=IDirectSound8_Release(dso); - ok(ref==0,"IDirectSound8_Release() has %d references, should have 0\n",ref); - if (ref!=0) - return DSERR_GENERIC; - - return rc; -} - -static HRESULT test_for_driver8(LPGUID lpGuid) -{ - HRESULT rc; - LPDIRECTSOUND8 dso=NULL; - int ref; - - /* Create the DirectSound object */ - rc=pDirectSoundCreate8(lpGuid,&dso,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCreate8() failed: %08x\n",rc); - if (rc!=DS_OK) - return rc; - - ref=IDirectSound8_Release(dso); - ok(ref==0,"IDirectSound8_Release() has %d references, should have 0\n",ref); - if (ref!=0) - return DSERR_GENERIC; - - return rc; -} - -static HRESULT test_primary8(LPGUID lpGuid) -{ - HRESULT rc; - LPDIRECTSOUND8 dso=NULL; - LPDIRECTSOUNDBUFFER primary=NULL; - DSBUFFERDESC bufdesc; - DSCAPS dscaps; - int ref, i; - - /* Create the DirectSound object */ - rc=pDirectSoundCreate8(lpGuid,&dso,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %08x\n", rc); - if (rc!=DS_OK) - return rc; - - /* Get the device capabilities */ - ZeroMemory(&dscaps, sizeof(dscaps)); - dscaps.dwSize=sizeof(dscaps); - rc=IDirectSound8_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound8_GetCaps() failed: %08x\n",rc); - if (rc!=DS_OK) - goto EXIT; - - /* We must call SetCooperativeLevel before calling CreateSoundBuffer */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ - rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08x\n",rc); - if (rc!=DS_OK) - goto EXIT; - - /* Testing the primary buffer */ - primary=NULL; - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER|DSBCAPS_CTRLVOLUME|DSBCAPS_CTRLPAN; - rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); - ok((rc==DS_OK && primary!=NULL) || (rc == DSERR_CONTROLUNAVAIL), - "IDirectSound8_CreateSoundBuffer() failed to create a primary buffer: %08x\n",rc); - if (rc == DSERR_CONTROLUNAVAIL) - trace(" No Primary\n"); - else if (rc==DS_OK && primary!=NULL) { - test_buffer8(dso,&primary,1,TRUE,0,TRUE,0,winetest_interactive && - !(dscaps.dwFlags & DSCAPS_EMULDRIVER),1.0,0,NULL,0,0); - if (winetest_interactive) { - LONG volume,pan; - - volume = DSBVOLUME_MAX; - for (i = 0; i < 6; i++) { - test_buffer8(dso,&primary,1,TRUE,volume,TRUE,0, - winetest_interactive && - !(dscaps.dwFlags & DSCAPS_EMULDRIVER), - 1.0,0,NULL,0,0); - volume -= ((DSBVOLUME_MAX-DSBVOLUME_MIN) / 40); - } - - pan = DSBPAN_LEFT; - for (i = 0; i < 7; i++) { - test_buffer8(dso,&primary,1,TRUE,0,TRUE,pan, - winetest_interactive && - !(dscaps.dwFlags & DSCAPS_EMULDRIVER),1.0,0,0,0,0); - pan += ((DSBPAN_RIGHT-DSBPAN_LEFT) / 6); - } - } - ref=IDirectSoundBuffer_Release(primary); - ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, " - "should have 0\n",ref); - } - - /* Set the CooperativeLevel back to normal */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ - rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_NORMAL) failed: %08x\n",rc); - -EXIT: - ref=IDirectSound8_Release(dso); - ok(ref==0,"IDirectSound8_Release() has %d references, should have 0\n",ref); - if (ref!=0) - return DSERR_GENERIC; - - return rc; -} - -static HRESULT test_primary_3d8(LPGUID lpGuid) -{ - HRESULT rc; - LPDIRECTSOUND8 dso=NULL; - LPDIRECTSOUNDBUFFER primary=NULL; - DSBUFFERDESC bufdesc; - DSCAPS dscaps; - int ref; - - /* Create the DirectSound object */ - rc=pDirectSoundCreate8(lpGuid,&dso,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %08x\n", rc); - if (rc!=DS_OK) - return rc; - - /* Get the device capabilities */ - ZeroMemory(&dscaps, sizeof(dscaps)); - dscaps.dwSize=sizeof(dscaps); - rc=IDirectSound8_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound8_GetCaps failed: %08x\n",rc); - if (rc!=DS_OK) - goto EXIT; - - /* We must call SetCooperativeLevel before calling CreateSoundBuffer */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ - rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08x\n",rc); - if (rc!=DS_OK) - goto EXIT; - - primary=NULL; - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER; - rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); - ok(rc==DS_OK && primary!=NULL,"IDirectSound8_CreateSoundBuffer() failed " - "to create a primary buffer: %08x\n",rc); - if (rc==DS_OK && primary!=NULL) { - ref=IDirectSoundBuffer_Release(primary); - ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, " - "should have 0\n",ref); - primary=NULL; - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER|DSBCAPS_CTRL3D; - rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); - ok(rc==DS_OK && primary!=NULL,"IDirectSound8_CreateSoundBuffer() " - "failed to create a 3D primary buffer: %08x\n",rc); - if (rc==DS_OK && primary!=NULL) { - test_buffer8(dso,&primary,1,FALSE,0,FALSE,0, - winetest_interactive && - !(dscaps.dwFlags & DSCAPS_EMULDRIVER),1.0,0,0,0,0); - ref=IDirectSoundBuffer_Release(primary); - ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, " - "should have 0\n",ref); - } - } - /* Set the CooperativeLevel back to normal */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ - rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_NORMAL) failed: %08x\n",rc); - -EXIT: - ref=IDirectSound8_Release(dso); - ok(ref==0,"IDirectSound8_Release() has %d references, should have 0\n",ref); - if (ref!=0) - return DSERR_GENERIC; - - return rc; -} - -static HRESULT test_primary_3d_with_listener8(LPGUID lpGuid) -{ - HRESULT rc; - LPDIRECTSOUND8 dso=NULL; - LPDIRECTSOUNDBUFFER primary=NULL; - DSBUFFERDESC bufdesc; - DSCAPS dscaps; - int ref; - - /* Create the DirectSound object */ - rc=pDirectSoundCreate8(lpGuid,&dso,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER,"DirectSoundCreate8() failed: %08x\n", rc); - if (rc!=DS_OK) - return rc; - - /* Get the device capabilities */ - ZeroMemory(&dscaps, sizeof(dscaps)); - dscaps.dwSize=sizeof(dscaps); - rc=IDirectSound8_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound8_GetCaps() failed: %08x\n",rc); - if (rc!=DS_OK) - goto EXIT; - - /* We must call SetCooperativeLevel before calling CreateSoundBuffer */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ - rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel(DSSCL_PRIORITY) failed: %08x\n",rc); - if (rc!=DS_OK) - goto EXIT; - primary=NULL; - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER|DSBCAPS_CTRL3D; - rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); - ok(rc==DS_OK && primary!=NULL,"IDirectSound8_CreateSoundBuffer() failed " - "to create a 3D primary buffer %08x\n",rc); - if (rc==DS_OK && primary!=NULL) { - LPDIRECTSOUND3DLISTENER listener=NULL; - rc=IDirectSoundBuffer_QueryInterface(primary, - &IID_IDirectSound3DListener, - (void **)&listener); - ok(rc==DS_OK && listener!=NULL,"IDirectSoundBuffer_QueryInterface() " - "failed to get a 3D listener: %08x\n",rc); - if (rc==DS_OK && listener!=NULL) { - LPDIRECTSOUNDBUFFER temp_buffer=NULL; - - /* Checking the COM interface */ - rc=IDirectSoundBuffer_QueryInterface(primary, - &IID_IDirectSoundBuffer, - (LPVOID *)&temp_buffer); - ok(rc==DS_OK && temp_buffer!=NULL, - "IDirectSoundBuffer_QueryInterface() failed: %08x\n", rc); - ok(temp_buffer==primary,"COM interface broken: %p != %p\n",temp_buffer,primary); - if (rc==DS_OK && temp_buffer!=NULL) { - ref=IDirectSoundBuffer_Release(temp_buffer); - ok(ref==1,"IDirectSoundBuffer_Release() has %d references, " - "should have 1\n",ref); - - temp_buffer=NULL; - rc=IDirectSound3DListener_QueryInterface(listener, - &IID_IDirectSoundBuffer,(LPVOID *)&temp_buffer); - ok(rc==DS_OK && temp_buffer!=NULL, - "IDirectSoundBuffer_QueryInterface() failed: %08x\n", rc); - ok(temp_buffer==primary,"COM interface broken: %p != %p\n",temp_buffer,primary); - ref=IDirectSoundBuffer_Release(temp_buffer); - ok(ref==1,"IDirectSoundBuffer_Release() has %d references, " - "should have 1\n",ref); - - /* Testing the buffer */ - test_buffer8(dso,&primary,1,FALSE,0,FALSE,0, - winetest_interactive && - !(dscaps.dwFlags & DSCAPS_EMULDRIVER), - 1.0,0,listener,0,0); - } - - /* Testing the reference counting */ - ref=IDirectSound3DListener_Release(listener); - ok(ref==0,"IDirectSound3DListener_Release() listener has %d " - "references, should have 0\n",ref); - } - - /* Testing the reference counting */ - ref=IDirectSoundBuffer_Release(primary); - ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, " - "should have 0\n",ref); - } - -EXIT: - ref=IDirectSound8_Release(dso); - ok(ref==0,"IDirectSound8_Release() has %d references, should have 0\n",ref); - if (ref!=0) -return DSERR_GENERIC; - - return rc; -} - -static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, - LPCSTR lpcstrModule, LPVOID lpContext) -{ - HRESULT rc; - trace("*** Testing %s - %s ***\n",lpcstrDescription,lpcstrModule); - - rc = test_for_driver8(lpGuid); - if (rc == DSERR_NODRIVER) { - trace(" No Driver\n"); - return 1; - } else if (rc == DSERR_ALLOCATED) { - trace(" Already In Use\n"); - return 1; - } else if (rc == E_FAIL) { - trace(" No Device\n"); - return 1; - } - - trace(" Testing the primary buffer\n"); - test_primary8(lpGuid); - - trace(" Testing 3D primary buffer\n"); - test_primary_3d8(lpGuid); - - trace(" Testing 3D primary buffer with listener\n"); - test_primary_3d_with_listener8(lpGuid); - - /* Testing secondary buffers */ - test_secondary8(lpGuid,winetest_interactive,0,0,0,0,0,0); - test_secondary8(lpGuid,winetest_interactive,0,0,0,1,0,0); - - /* Testing 3D secondary buffers */ - test_secondary8(lpGuid,winetest_interactive,1,0,0,0,0,0); - test_secondary8(lpGuid,winetest_interactive,1,1,0,0,0,0); - test_secondary8(lpGuid,winetest_interactive,1,1,0,1,0,0); - test_secondary8(lpGuid,winetest_interactive,1,0,1,0,0,0); - test_secondary8(lpGuid,winetest_interactive,1,0,1,1,0,0); - test_secondary8(lpGuid,winetest_interactive,1,1,1,0,0,0); - test_secondary8(lpGuid,winetest_interactive,1,1,1,1,0,0); - test_secondary8(lpGuid,winetest_interactive,1,1,1,0,1,0); - test_secondary8(lpGuid,winetest_interactive,1,1,1,0,0,1); - test_secondary8(lpGuid,winetest_interactive,1,1,1,0,1,1); - - return 1; -} - -static void ds3d8_tests(void) -{ - HRESULT rc; - rc=pDirectSoundEnumerateA(&dsenum_callback,NULL); - ok(rc==DS_OK,"DirectSoundEnumerateA() failed: %08x\n",rc); -} - -START_TEST(ds3d8) -{ - HMODULE hDsound; - - CoInitialize(NULL); - - hDsound = LoadLibrary("dsound.dll"); - if (hDsound) - { - - pDirectSoundEnumerateA = (void*)GetProcAddress(hDsound, - "DirectSoundEnumerateA"); - pDirectSoundCreate8 = (void*)GetProcAddress(hDsound, - "DirectSoundCreate8"); - if (pDirectSoundCreate8) - ds3d8_tests(); - else - skip("ds3d8 test skipped\n"); - - FreeLibrary(hDsound); - } - else - skip("dsound.dll not found!\n"); - - CoUninitialize(); -} diff --git a/rostests/winetests/dsound/dsound.c b/rostests/winetests/dsound/dsound.c deleted file mode 100644 index f059c20e62f..00000000000 --- a/rostests/winetests/dsound/dsound.c +++ /dev/null @@ -1,1110 +0,0 @@ -/* - * Tests basic sound playback in DirectSound. - * In particular we test each standard Windows sound format to make sure - * we handle the sound card/driver quirks correctly. - * - * Part of this test involves playing test tones. But this only makes - * sense if someone is going to carefully listen to it, and would only - * bother everyone else. - * So this is only done if the test is being run in interactive mode. - * - * Copyright (c) 2002-2004 Francois Gouget - * Copyright (c) 2007 Maarten Lankhorst - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -#include "wine/test.h" -#include "dsound.h" -#include "dsconf.h" -#include "mmreg.h" -#include "initguid.h" -#include "ks.h" -#include "ksmedia.h" - -#include "dsound_test.h" - -DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); - -static HRESULT (WINAPI *pDirectSoundEnumerateA)(LPDSENUMCALLBACKA,LPVOID)=NULL; -static HRESULT (WINAPI *pDirectSoundCreate)(LPCGUID,LPDIRECTSOUND*, - LPUNKNOWN)=NULL; - -static BOOL gotdx8; - -static void IDirectSound_test(LPDIRECTSOUND dso, BOOL initialized, - LPCGUID lpGuid) -{ - HRESULT rc; - DSCAPS dscaps; - int ref; - IUnknown * unknown; - IDirectSound * ds; - IDirectSound8 * ds8; - DWORD speaker_config, new_speaker_config, ref_speaker_config; - - /* Try to Query for objects */ - rc=IDirectSound_QueryInterface(dso,&IID_IUnknown,(LPVOID*)&unknown); - ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IUnknown) failed: %08x\n", rc); - if (rc==DS_OK) - IDirectSound_Release(unknown); - - rc=IDirectSound_QueryInterface(dso,&IID_IDirectSound,(LPVOID*)&ds); - ok(rc==DS_OK,"IDirectSound_QueryInterface(IID_IDirectSound) failed: %08x\n", rc); - if (rc==DS_OK) - IDirectSound_Release(ds); - - rc=IDirectSound_QueryInterface(dso,&IID_IDirectSound8,(LPVOID*)&ds8); - ok(rc==E_NOINTERFACE,"IDirectSound_QueryInterface(IID_IDirectSound8) " - "should have failed: %08x\n",rc); - if (rc==DS_OK) - IDirectSound8_Release(ds8); - - if (initialized == FALSE) { - /* try uninitialized object */ - rc=IDirectSound_GetCaps(dso,0); - ok(rc==DSERR_UNINITIALIZED,"IDirectSound_GetCaps(NULL) " - "should have returned DSERR_UNINITIALIZED, returned: %08x\n", rc); - - rc=IDirectSound_GetCaps(dso,&dscaps); - ok(rc==DSERR_UNINITIALIZED,"IDirectSound_GetCaps() " - "should have returned DSERR_UNINITIALIZED, returned: %08x\n", rc); - - rc=IDirectSound_Compact(dso); - ok(rc==DSERR_UNINITIALIZED,"IDirectSound_Compact() " - "should have returned DSERR_UNINITIALIZED, returned: %08x\n", rc); - - rc=IDirectSound_GetSpeakerConfig(dso,&speaker_config); - ok(rc==DSERR_UNINITIALIZED,"IDirectSound_GetSpeakerConfig() " - "should have returned DSERR_UNINITIALIZED, returned: %08x\n", rc); - - rc=IDirectSound_Initialize(dso,lpGuid); - ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "IDirectSound_Initialize() failed: %08x\n",rc); - if (rc==DSERR_NODRIVER) { - trace(" No Driver\n"); - goto EXIT; - } else if (rc==E_FAIL) { - trace(" No Device\n"); - goto EXIT; - } else if (rc==DSERR_ALLOCATED) { - trace(" Already In Use\n"); - goto EXIT; - } - } - - rc=IDirectSound_Initialize(dso,lpGuid); - ok(rc==DSERR_ALREADYINITIALIZED, "IDirectSound_Initialize() " - "should have returned DSERR_ALREADYINITIALIZED: %08x\n", rc); - - /* DSOUND: Error: Invalid caps buffer */ - rc=IDirectSound_GetCaps(dso,0); - ok(rc==DSERR_INVALIDPARAM,"IDirectSound_GetCaps(NULL) " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); - - ZeroMemory(&dscaps, sizeof(dscaps)); - - /* DSOUND: Error: Invalid caps buffer */ - rc=IDirectSound_GetCaps(dso,&dscaps); - ok(rc==DSERR_INVALIDPARAM,"IDirectSound_GetCaps() " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); - - dscaps.dwSize=sizeof(dscaps); - - /* DSOUND: Running on a certified driver */ - rc=IDirectSound_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %08x\n",rc); - - rc=IDirectSound_Compact(dso); - ok(rc==DSERR_PRIOLEVELNEEDED,"IDirectSound_Compact() failed: %08x\n", rc); - - rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc); - - rc=IDirectSound_Compact(dso); - ok(rc==DS_OK,"IDirectSound_Compact() failed: %08x\n",rc); - - rc=IDirectSound_GetSpeakerConfig(dso,0); - ok(rc==DSERR_INVALIDPARAM,"IDirectSound_GetSpeakerConfig(NULL) " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); - - rc=IDirectSound_GetSpeakerConfig(dso,&speaker_config); - ok(rc==DS_OK,"IDirectSound_GetSpeakerConfig() failed: %08x\n", rc); - ref_speaker_config = speaker_config; - - speaker_config = DSSPEAKER_COMBINED(DSSPEAKER_STEREO, - DSSPEAKER_GEOMETRY_WIDE); - if (speaker_config == ref_speaker_config) - speaker_config = DSSPEAKER_COMBINED(DSSPEAKER_STEREO, - DSSPEAKER_GEOMETRY_NARROW); - if(rc==DS_OK) { - rc=IDirectSound_SetSpeakerConfig(dso,speaker_config); - ok(rc==DS_OK,"IDirectSound_SetSpeakerConfig() failed: %08x\n", rc); - } - if (rc==DS_OK) { - rc=IDirectSound_GetSpeakerConfig(dso,&new_speaker_config); - ok(rc==DS_OK,"IDirectSound_GetSpeakerConfig() failed: %08x\n", rc); - if (rc==DS_OK && speaker_config!=new_speaker_config) - trace("IDirectSound_GetSpeakerConfig() failed to set speaker " - "config: expected 0x%08x, got 0x%08x\n", - speaker_config,new_speaker_config); - IDirectSound_SetSpeakerConfig(dso,ref_speaker_config); - } - -EXIT: - ref=IDirectSound_Release(dso); - ok(ref==0,"IDirectSound_Release() has %d references, should have 0\n",ref); -} - -static void IDirectSound_tests(void) -{ - HRESULT rc; - LPDIRECTSOUND dso=NULL; - LPCLASSFACTORY cf=NULL; - - trace("Testing IDirectSound\n"); - - rc=CoGetClassObject(&CLSID_DirectSound, CLSCTX_INPROC_SERVER, NULL, - &IID_IClassFactory, (void**)&cf); - ok(rc==S_OK,"CoGetClassObject(CLSID_DirectSound, IID_IClassFactory) " - "failed: %08x\n", rc); - - rc=CoGetClassObject(&CLSID_DirectSound, CLSCTX_INPROC_SERVER, NULL, - &IID_IUnknown, (void**)&cf); - ok(rc==S_OK,"CoGetClassObject(CLSID_DirectSound, IID_IUnknown) " - "failed: %08x\n", rc); - - /* try the COM class factory method of creation with no device specified */ - rc=CoCreateInstance(&CLSID_DirectSound, NULL, CLSCTX_INPROC_SERVER, - &IID_IDirectSound, (void**)&dso); - ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSound) failed: %08x\n", rc); - if (dso) - IDirectSound_test(dso, FALSE, NULL); - - /* try the COM class factory method of creation with default playback - * device specified */ - rc=CoCreateInstance(&CLSID_DirectSound, NULL, CLSCTX_INPROC_SERVER, - &IID_IDirectSound, (void**)&dso); - ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSound) failed: %08x\n", rc); - if (dso) - IDirectSound_test(dso, FALSE, &DSDEVID_DefaultPlayback); - - /* try the COM class factory method of creation with default voice - * playback device specified */ - rc=CoCreateInstance(&CLSID_DirectSound, NULL, CLSCTX_INPROC_SERVER, - &IID_IDirectSound, (void**)&dso); - ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSound) failed: %08x\n", rc); - if (dso) - IDirectSound_test(dso, FALSE, &DSDEVID_DefaultVoicePlayback); - - /* try the COM class factory method of creation with a bad - * IID specified */ - rc=CoCreateInstance(&CLSID_DirectSound, NULL, CLSCTX_INPROC_SERVER, - &CLSID_DirectSoundPrivate, (void**)&dso); - ok(rc==E_NOINTERFACE, - "CoCreateInstance(CLSID_DirectSound,CLSID_DirectSoundPrivate) " - "should have failed: %08x\n",rc); - - /* try the COM class factory method of creation with a bad - * GUID and IID specified */ - rc=CoCreateInstance(&CLSID_DirectSoundPrivate, NULL, CLSCTX_INPROC_SERVER, - &IID_IDirectSound, (void**)&dso); - ok(rc==REGDB_E_CLASSNOTREG, - "CoCreateInstance(CLSID_DirectSoundPrivate,IID_IDirectSound) " - "should have failed: %08x\n",rc); - - /* try with no device specified */ - rc=pDirectSoundCreate(NULL,&dso,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCreate(NULL) failed: %08x\n",rc); - if (rc==S_OK && dso) - IDirectSound_test(dso, TRUE, NULL); - - /* try with default playback device specified */ - rc=pDirectSoundCreate(&DSDEVID_DefaultPlayback,&dso,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCreate(DSDEVID_DefaultPlayback) failed: %08x\n", rc); - if (rc==DS_OK && dso) - IDirectSound_test(dso, TRUE, NULL); - - /* try with default voice playback device specified */ - rc=pDirectSoundCreate(&DSDEVID_DefaultVoicePlayback,&dso,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCreate(DSDEVID_DefaultVoicePlayback) failed: %08x\n", rc); - if (rc==DS_OK && dso) - IDirectSound_test(dso, TRUE, NULL); - - /* try with a bad device specified */ - rc=pDirectSoundCreate(&DSDEVID_DefaultVoiceCapture,&dso,NULL); - ok(rc==DSERR_NODRIVER,"DirectSoundCreate(DSDEVID_DefaultVoiceCapture) " - "should have failed: %08x\n",rc); - if (rc==DS_OK && dso) - IDirectSound_Release(dso); -} - -static HRESULT test_dsound(LPGUID lpGuid) -{ - HRESULT rc; - LPDIRECTSOUND dso=NULL; - int ref; - - /* DSOUND: Error: Invalid interface buffer */ - rc=pDirectSoundCreate(lpGuid,0,NULL); - ok(rc==DSERR_INVALIDPARAM,"DirectSoundCreate() should have returned " - "DSERR_INVALIDPARAM, returned: %08x\n",rc); - - /* Create the DirectSound object */ - rc=pDirectSoundCreate(lpGuid,&dso,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCreate() failed: %08x\n",rc); - if (rc!=DS_OK) - return rc; - - /* Try the enumerated device */ - IDirectSound_test(dso, TRUE, lpGuid); - - /* Try the COM class factory method of creation with enumerated device */ - rc=CoCreateInstance(&CLSID_DirectSound, NULL, CLSCTX_INPROC_SERVER, - &IID_IDirectSound, (void**)&dso); - ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSound) failed: %08x\n", rc); - if (dso) - IDirectSound_test(dso, FALSE, lpGuid); - - /* Create a DirectSound object */ - rc=pDirectSoundCreate(lpGuid,&dso,NULL); - ok(rc==DS_OK,"DirectSoundCreate() failed: %08x\n",rc); - if (rc==DS_OK) { - LPDIRECTSOUND dso1=NULL; - - /* Create a second DirectSound object */ - rc=pDirectSoundCreate(lpGuid,&dso1,NULL); - ok(rc==DS_OK,"DirectSoundCreate() failed: %08x\n",rc); - if (rc==DS_OK) { - /* Release the second DirectSound object */ - ref=IDirectSound_Release(dso1); - ok(ref==0,"IDirectSound_Release() has %d references, should have " - "0\n",ref); - ok(dso!=dso1,"DirectSound objects should be unique: dso=%p,dso1=%p\n",dso,dso1); - } - - /* Release the first DirectSound object */ - ref=IDirectSound_Release(dso); - ok(ref==0,"IDirectSound_Release() has %d references, should have 0\n", - ref); - if (ref!=0) - return DSERR_GENERIC; - } else - return rc; - - /* Create a DirectSound object */ - rc=pDirectSoundCreate(lpGuid,&dso,NULL); - ok(rc==DS_OK,"DirectSoundCreate() failed: %08x\n",rc); - if (rc==DS_OK) { - LPDIRECTSOUNDBUFFER secondary; - DSBUFFERDESC bufdesc; - WAVEFORMATEX wfx; - - init_format(&wfx,WAVE_FORMAT_PCM,11025,8,1); - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=DSBCAPS_GETCURRENTPOSITION2 | DSBCAPS_CTRL3D; - bufdesc.dwBufferBytes=align(wfx.nAvgBytesPerSec*BUFFER_LEN/1000, - wfx.nBlockAlign); - bufdesc.lpwfxFormat=&wfx; - rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); - ok(rc==DS_OK && secondary!=NULL, - "IDirectSound_CreateSoundBuffer() failed to create a secondary " - "buffer %08x\n",rc); - if (rc==DS_OK && secondary!=NULL) { - LPDIRECTSOUND3DBUFFER buffer3d; - rc=IDirectSound_QueryInterface(secondary, &IID_IDirectSound3DBuffer, - (void **)&buffer3d); - ok(rc==DS_OK && buffer3d!=NULL,"IDirectSound_QueryInterface() " - "failed: %08x\n",rc); - if (rc==DS_OK && buffer3d!=NULL) { - ref=IDirectSound3DBuffer_AddRef(buffer3d); - ok(ref==2,"IDirectSound3DBuffer_AddRef() has %d references, " - "should have 2\n",ref); - } - ref=IDirectSoundBuffer_AddRef(secondary); - ok(ref==2,"IDirectSoundBuffer_AddRef() has %d references, " - "should have 2\n",ref); - } - /* release with buffer */ - ref=IDirectSound_Release(dso); - ok(ref==0,"IDirectSound_Release() has %d references, should have 0\n", - ref); - if (ref!=0) - return DSERR_GENERIC; - } else - return rc; - - return DS_OK; -} - -static HRESULT test_primary(LPGUID lpGuid) -{ - HRESULT rc; - LPDIRECTSOUND dso=NULL; - LPDIRECTSOUNDBUFFER primary=NULL,second=NULL,third=NULL; - DSBUFFERDESC bufdesc; - DSCAPS dscaps; - WAVEFORMATEX wfx; - int ref; - - /* Create the DirectSound object */ - rc=pDirectSoundCreate(lpGuid,&dso,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED, - "DirectSoundCreate() failed: %08x\n",rc); - if (rc!=DS_OK) - return rc; - - /* Get the device capabilities */ - ZeroMemory(&dscaps, sizeof(dscaps)); - dscaps.dwSize=sizeof(dscaps); - rc=IDirectSound_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %08x\n",rc); - if (rc!=DS_OK) - goto EXIT; - - /* DSOUND: Error: Invalid buffer description pointer */ - rc=IDirectSound_CreateSoundBuffer(dso,0,0,NULL); - ok(rc==DSERR_INVALIDPARAM, - "IDirectSound_CreateSoundBuffer() should have failed: %08x\n", rc); - - /* DSOUND: Error: NULL pointer is invalid */ - /* DSOUND: Error: Invalid buffer description pointer */ - rc=IDirectSound_CreateSoundBuffer(dso,0,&primary,NULL); - ok(rc==DSERR_INVALIDPARAM && primary==0, - "IDirectSound_CreateSoundBuffer() should have failed: rc=%08x," - "dsbo=%p\n",rc,primary); - - /* DSOUND: Error: Invalid size */ - /* DSOUND: Error: Invalid buffer description */ - primary=NULL; - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc)-1; - rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); - ok(rc==DSERR_INVALIDPARAM && primary==0, - "IDirectSound_CreateSoundBuffer() should have failed: rc=%08x," - "primary=%p\n",rc,primary); - - /* DSOUND: Error: DSBCAPS_PRIMARYBUFFER flag with non-NULL lpwfxFormat */ - /* DSOUND: Error: Invalid buffer description pointer */ - primary=NULL; - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER; - bufdesc.lpwfxFormat=&wfx; - rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); - ok(rc==DSERR_INVALIDPARAM && primary==0, - "IDirectSound_CreateSoundBuffer() should have failed: rc=%08x," - "primary=%p\n",rc,primary); - - /* DSOUND: Error: No DSBCAPS_PRIMARYBUFFER flag with NULL lpwfxFormat */ - /* DSOUND: Error: Invalid buffer description pointer */ - primary=NULL; - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=0; - bufdesc.lpwfxFormat=NULL; - rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); - ok(rc==DSERR_INVALIDPARAM && primary==0, - "IDirectSound_CreateSoundBuffer() should have failed: rc=%08x," - "primary=%p\n",rc,primary); - - /* We must call SetCooperativeLevel before calling CreateSoundBuffer */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ - rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc); - if (rc!=DS_OK) - goto EXIT; - - /* Testing the primary buffer */ - primary=NULL; - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER|DSBCAPS_CTRLVOLUME; - bufdesc.lpwfxFormat = &wfx; - init_format(&wfx,WAVE_FORMAT_PCM,11025,8,2); - rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); - ok(rc==DSERR_INVALIDPARAM,"IDirectSound_CreateSoundBuffer() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n", rc); - if (rc==DS_OK && primary!=NULL) - IDirectSoundBuffer_Release(primary); - - primary=NULL; - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER|DSBCAPS_CTRLVOLUME; - rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); - ok((rc==DS_OK && primary!=NULL) || (rc==DSERR_CONTROLUNAVAIL), - "IDirectSound_CreateSoundBuffer() failed to create a primary buffer: %08x\n",rc); - if (rc==DSERR_CONTROLUNAVAIL) - trace(" No Primary\n"); - else if (rc==DS_OK && primary!=NULL) { - LONG vol; - - /* Try to create a second primary buffer */ - /* DSOUND: Error: The primary buffer already exists. - * Any changes made to the buffer description will be ignored. */ - rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&second,NULL); - ok(rc==DS_OK && second==primary, - "IDirectSound_CreateSoundBuffer() should have returned original " - "primary buffer: %08x\n",rc); - ref=IDirectSoundBuffer_Release(second); - ok(ref==1,"IDirectSoundBuffer_Release() primary has %d references, " - "should have 1\n",ref); - - /* Try to duplicate a primary buffer */ - /* DSOUND: Error: Can't duplicate primary buffers */ - rc=IDirectSound_DuplicateSoundBuffer(dso,primary,&third); - /* rc=0x88780032 */ - ok(rc!=DS_OK,"IDirectSound_DuplicateSoundBuffer() primary buffer " - "should have failed %08x\n",rc); - - rc=IDirectSoundBuffer_GetVolume(primary,&vol); - ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume() failed: %08x\n", rc); - - if (winetest_interactive) { - trace("Playing a 5 seconds reference tone at the current " - "volume.\n"); - if (rc==DS_OK) - trace("(the current volume is %d according to DirectSound)\n", - vol); - trace("All subsequent tones should be identical to this one.\n"); - trace("Listen for stutter, changes in pitch, volume, etc.\n"); - } - test_buffer(dso,&primary,1,FALSE,0,FALSE,0,winetest_interactive && - !(dscaps.dwFlags & DSCAPS_EMULDRIVER),5.0,0,0,0,0,FALSE,0); - - ref=IDirectSoundBuffer_Release(primary); - ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, " - "should have 0\n",ref); - } - - /* Set the CooperativeLevel back to normal */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ - rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc); - -EXIT: - ref=IDirectSound_Release(dso); - ok(ref==0,"IDirectSound_Release() has %d references, should have 0\n",ref); - if (ref!=0) - return DSERR_GENERIC; - - return rc; -} - -/* - * Test the primary buffer at different formats while keeping the - * secondary buffer at a constant format. - */ -static HRESULT test_primary_secondary(LPGUID lpGuid) -{ - HRESULT rc; - LPDIRECTSOUND dso=NULL; - LPDIRECTSOUNDBUFFER primary=NULL,secondary=NULL; - DSBUFFERDESC bufdesc; - DSCAPS dscaps; - WAVEFORMATEX wfx, wfx2; - int f,ref; - - /* Create the DirectSound object */ - rc=pDirectSoundCreate(lpGuid,&dso,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED, - "DirectSoundCreate() failed: %08x\n",rc); - if (rc!=DS_OK) - return rc; - - /* Get the device capabilities */ - ZeroMemory(&dscaps, sizeof(dscaps)); - dscaps.dwSize=sizeof(dscaps); - rc=IDirectSound_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %08x\n",rc); - if (rc!=DS_OK) - goto EXIT; - - /* We must call SetCooperativeLevel before creating primary buffer */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ - rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc); - if (rc!=DS_OK) - goto EXIT; - - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER; - rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); - ok(rc==DS_OK && primary!=NULL, - "IDirectSound_CreateSoundBuffer() failed to create a primary buffer %08x\n",rc); - - if (rc==DS_OK && primary!=NULL) { - for (f=0;f 16) - ok(((rc == DSERR_CONTROLUNAVAIL || rc == DSERR_INVALIDCALL || rc == DSERR_INVALIDPARAM /* 2003 */) && !secondary) - || rc == DS_OK, /* driver dependent? */ - "IDirectSound_CreateSoundBuffer() " - "should have returned (DSERR_CONTROLUNAVAIL or DSERR_INVALIDCALL) " - "and NULL, returned: %08x %p\n", rc, secondary); - else - ok(rc==DS_OK && secondary!=NULL, - "IDirectSound_CreateSoundBuffer() failed to create a secondary buffer %08x\n",rc); - } - else - ok(rc==E_INVALIDARG, "Creating %d bpp buffer on dx < 8 returned: %p %08x\n", - wfx.wBitsPerSample, secondary, rc); - - if (!gotdx8) - { - skip("Not doing the WAVE_FORMAT_EXTENSIBLE tests\n"); - /* Apparently they succeed with bogus values, - * which means that older dsound doesn't look at them - */ - goto no_wfe; - } - - if (secondary) - IDirectSoundBuffer_Release(secondary); - secondary = NULL; - - bufdesc.lpwfxFormat=(WAVEFORMATEX*)&wfxe; - wfxe.Format = wfx; - wfxe.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE; - wfxe.SubFormat = KSDATAFORMAT_SUBTYPE_PCM; - wfxe.Format.cbSize = 1; - wfxe.Samples.wValidBitsPerSample = wfx.wBitsPerSample; - wfxe.dwChannelMask = (wfx.nChannels == 1 ? KSAUDIO_SPEAKER_MONO : KSAUDIO_SPEAKER_STEREO); - - rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); - ok((rc==DSERR_INVALIDPARAM || rc==DSERR_INVALIDCALL /* 2003 */) && !secondary, - "IDirectSound_CreateSoundBuffer() returned: %08x %p\n", - rc, secondary); - if (secondary) - { - IDirectSoundBuffer_Release(secondary); - secondary=NULL; - } - - wfxe.Format.cbSize = sizeof(wfxe) - sizeof(wfx) + 1; - - rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); - ok(((rc==DSERR_CONTROLUNAVAIL || rc==DSERR_INVALIDCALL || rc==DSERR_INVALIDPARAM) - && !secondary) - || rc==DS_OK, /* 2003 / 2008 */ - "IDirectSound_CreateSoundBuffer() returned: %08x %p\n", - rc, secondary); - if (secondary) - { - IDirectSoundBuffer_Release(secondary); - secondary=NULL; - } - - wfxe.Format.cbSize = sizeof(wfxe) - sizeof(wfx); - wfxe.SubFormat = GUID_NULL; - rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); - ok((rc==DSERR_INVALIDPARAM || rc==DSERR_INVALIDCALL) && !secondary, - "IDirectSound_CreateSoundBuffer() returned: %08x %p\n", - rc, secondary); - if (secondary) - { - IDirectSoundBuffer_Release(secondary); - secondary=NULL; - } - wfxe.SubFormat = KSDATAFORMAT_SUBTYPE_PCM; - - ++wfxe.Samples.wValidBitsPerSample; - rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); - ok(rc==DSERR_INVALIDPARAM && !secondary, - "IDirectSound_CreateSoundBuffer() returned: %08x %p\n", - rc, secondary); - if (secondary) - { - IDirectSoundBuffer_Release(secondary); - secondary=NULL; - } - --wfxe.Samples.wValidBitsPerSample; - - wfxe.Samples.wValidBitsPerSample = 0; - rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); - ok(rc==DS_OK && secondary, - "IDirectSound_CreateSoundBuffer() returned: %08x %p\n", - rc, secondary); - if (secondary) - { - IDirectSoundBuffer_Release(secondary); - secondary=NULL; - } - wfxe.Samples.wValidBitsPerSample = wfxe.Format.wBitsPerSample; - - rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); - ok(rc==DS_OK && secondary!=NULL, - "IDirectSound_CreateSoundBuffer() failed to create a secondary buffer %08x\n",rc); - -no_wfe: - if (rc==DS_OK && secondary!=NULL) { - if (winetest_interactive) { - trace(" Testing a secondary buffer at %dx%dx%d " - "with a primary buffer at %dx%dx%d\n", - wfx.nSamplesPerSec,wfx.wBitsPerSample,wfx.nChannels, - wfx1.nSamplesPerSec,wfx1.wBitsPerSample,wfx1.nChannels); - } - test_buffer(dso,&secondary,0,FALSE,0,FALSE,0, - winetest_interactive,1.0,0,NULL,0,0,FALSE,0); - - ref=IDirectSoundBuffer_Release(secondary); - ok(ref==0,"IDirectSoundBuffer_Release() has %d references, " - "should have 0\n",ref); - } - } -EXIT1: - ref=IDirectSoundBuffer_Release(primary); - ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, " - "should have 0\n",ref); - } - - /* Set the CooperativeLevel back to normal */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ - rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc); - -EXIT: - ref=IDirectSound_Release(dso); - ok(ref==0,"IDirectSound_Release() has %d references, should have 0\n",ref); - if (ref!=0) - return DSERR_GENERIC; - - return rc; -} - -static HRESULT test_block_align(LPGUID lpGuid) -{ - HRESULT rc; - LPDIRECTSOUND dso=NULL; - LPDIRECTSOUNDBUFFER secondary=NULL; - DSBUFFERDESC bufdesc; - DSBCAPS dsbcaps; - WAVEFORMATEX wfx; - DWORD pos, pos2; - int ref; - - /* Create the DirectSound object */ - rc=pDirectSoundCreate(lpGuid,&dso,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED, - "DirectSoundCreate() failed: %08x\n",rc); - if (rc!=DS_OK) - return rc; - - init_format(&wfx,WAVE_FORMAT_PCM,11025,16,2); - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=DSBCAPS_GETCURRENTPOSITION2; - bufdesc.dwBufferBytes=wfx.nAvgBytesPerSec + 1; - bufdesc.lpwfxFormat=&wfx; - rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); - ok(rc==DS_OK,"IDirectSound_CreateSoundBuffer() " - "should have returned DS_OK, returned: %08x\n", rc); - - if (rc==DS_OK && secondary!=NULL) { - ZeroMemory(&dsbcaps, sizeof(dsbcaps)); - dsbcaps.dwSize = sizeof(dsbcaps); - rc=IDirectSoundBuffer_GetCaps(secondary,&dsbcaps); - ok(rc==DS_OK,"IDirectSoundBuffer_GetCaps() should have returned DS_OK, " - "returned: %08x\n", rc); - if (rc==DS_OK && wfx.nBlockAlign > 1) - { - ok(dsbcaps.dwBufferBytes==(wfx.nAvgBytesPerSec + wfx.nBlockAlign), - "Buffer size not a multiple of nBlockAlign: requested %d, " - "got %d, should be %d\n", bufdesc.dwBufferBytes, - dsbcaps.dwBufferBytes, wfx.nAvgBytesPerSec + wfx.nBlockAlign); - - rc = IDirectSoundBuffer_SetCurrentPosition(secondary, 0); - ok(rc == DS_OK, "Could not set position to 0: %08x\n", rc); - rc = IDirectSoundBuffer_GetCurrentPosition(secondary, &pos, NULL); - ok(rc == DS_OK, "Could not get position: %08x\n", rc); - rc = IDirectSoundBuffer_SetCurrentPosition(secondary, 1); - ok(rc == DS_OK, "Could not set position to 1: %08x\n", rc); - rc = IDirectSoundBuffer_GetCurrentPosition(secondary, &pos2, NULL); - ok(rc == DS_OK, "Could not get new position: %08x\n", rc); - ok(pos == pos2, "Positions not the same! Old position: %d, new position: %d\n", pos, pos2); - } - ref=IDirectSoundBuffer_Release(secondary); - ok(ref==0,"IDirectSoundBuffer_Release() secondary has %d references, " - "should have 0\n",ref); - } - - ref=IDirectSound_Release(dso); - ok(ref==0,"IDirectSound_Release() has %d references, should have 0\n",ref); - if (ref!=0) - return DSERR_GENERIC; - - return rc; -} - -static struct fmt { - int bits; - int channels; -} fmts[] = { { 8, 1 }, { 8, 2 }, { 16, 1 }, {16, 2 } }; - -static HRESULT test_frequency(LPGUID lpGuid) -{ - HRESULT rc; - LPDIRECTSOUND dso=NULL; - LPDIRECTSOUNDBUFFER primary=NULL,secondary=NULL; - DSBUFFERDESC bufdesc; - DSCAPS dscaps; - WAVEFORMATEX wfx, wfx1; - DWORD f, r; - int ref; - int rates[] = { 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, - 48000, 96000 }; - - /* Create the DirectSound object */ - rc=pDirectSoundCreate(lpGuid,&dso,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED, - "DirectSoundCreate() failed: %08x\n",rc); - if (rc!=DS_OK) - return rc; - - /* Get the device capabilities */ - ZeroMemory(&dscaps, sizeof(dscaps)); - dscaps.dwSize=sizeof(dscaps); - rc=IDirectSound_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %08x\n",rc); - if (rc!=DS_OK) - goto EXIT; - - /* We must call SetCooperativeLevel before creating primary buffer */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ - rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08x\n", rc); - if (rc!=DS_OK) - goto EXIT; - - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER; - rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); - ok(rc==DS_OK && primary!=NULL, - "IDirectSound_CreateSoundBuffer() failed to create a primary buffer %08x\n",rc); - - if (rc==DS_OK && primary!=NULL) { - rc=IDirectSoundBuffer_GetFormat(primary,&wfx1,sizeof(wfx1),NULL); - ok(rc==DS_OK,"IDirectSoundBuffer8_Getformat() failed: %08x\n", rc); - if (rc!=DS_OK) - goto EXIT1; - - for (f=0;f - - - - . - - wine - uuid - dsound - dxguid - ole32 - user32 - capture.c - ds3d8.c - ds3d.c - dsound8.c - dsound.c - duplex.c - propset.c - testlist.c - - diff --git a/rostests/winetests/dsound/dsound8.c b/rostests/winetests/dsound/dsound8.c deleted file mode 100644 index 5eb7c059d35..00000000000 --- a/rostests/winetests/dsound/dsound8.c +++ /dev/null @@ -1,947 +0,0 @@ -/* - * Tests basic sound playback in DirectSound. - * In particular we test each standard Windows sound format to make sure - * we handle the sound card/driver quirks correctly. - * - * Part of this test involves playing test tones. But this only makes - * sense if someone is going to carefully listen to it, and would only - * bother everyone else. - * So this is only done if the test is being run in interactive mode. - * - * Copyright (c) 2002-2004 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 -#include - -#include "wine/test.h" -#include "dsound.h" -#include "dsconf.h" -#include "mmreg.h" -#include "ks.h" -#include "ksmedia.h" - -#include "dsound_test.h" - -static HRESULT (WINAPI *pDirectSoundEnumerateA)(LPDSENUMCALLBACKA,LPVOID)=NULL; -static HRESULT (WINAPI *pDirectSoundCreate8)(LPCGUID,LPDIRECTSOUND8*,LPUNKNOWN)=NULL; - -int align(int length, int align) -{ - return (length / align) * align; -} - -static void IDirectSound8_test(LPDIRECTSOUND8 dso, BOOL initialized, - LPCGUID lpGuid) -{ - HRESULT rc; - DSCAPS dscaps; - int ref; - IUnknown * unknown; - IDirectSound * ds; - IDirectSound8 * ds8; - DWORD speaker_config, new_speaker_config, ref_speaker_config; - DWORD certified; - - /* Try to Query for objects */ - rc=IDirectSound8_QueryInterface(dso,&IID_IUnknown,(LPVOID*)&unknown); - ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IUnknown) failed: %08x\n", rc); - if (rc==DS_OK) - IDirectSound8_Release(unknown); - - rc=IDirectSound8_QueryInterface(dso,&IID_IDirectSound,(LPVOID*)&ds); - ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound) failed: %08x\n", rc); - if (rc==DS_OK) - IDirectSound_Release(ds); - - rc=IDirectSound8_QueryInterface(dso,&IID_IDirectSound8,(LPVOID*)&ds8); - ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSound8) " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); - if (rc==DS_OK) - IDirectSound8_Release(ds8); - - if (initialized == FALSE) { - /* try uninitialized object */ - rc=IDirectSound8_GetCaps(dso,0); - ok(rc==DSERR_UNINITIALIZED,"IDirectSound8_GetCaps(NULL) " - "should have returned DSERR_UNINITIALIZED, returned: %08x\n", rc); - - rc=IDirectSound8_GetCaps(dso,&dscaps); - ok(rc==DSERR_UNINITIALIZED,"IDirectSound8_GetCaps() " - "should have returned DSERR_UNINITIALIZED, returned: %08x\n", rc); - - rc=IDirectSound8_Compact(dso); - ok(rc==DSERR_UNINITIALIZED,"IDirectSound8_Compact() " - "should have returned DSERR_UNINITIALIZED, returned: %08x\n", rc); - - rc=IDirectSound8_GetSpeakerConfig(dso,&speaker_config); - ok(rc==DSERR_UNINITIALIZED,"IDirectSound8_GetSpeakerConfig() " - "should have returned DSERR_UNINITIALIZED, returned: %08x\n", rc); - - rc=IDirectSound8_VerifyCertification(dso, &certified); - ok(rc==DSERR_UNINITIALIZED,"IDirectSound8_VerifyCertification() " - "should have returned DSERR_UNINITIALIZED, returned: %08x\n", rc); - - rc=IDirectSound8_Initialize(dso,lpGuid); - ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "IDirectSound8_Initialize() failed: %08x\n",rc); - if (rc==DSERR_NODRIVER) { - trace(" No Driver\n"); - goto EXIT; - } else if (rc==E_FAIL) { - trace(" No Device\n"); - goto EXIT; - } else if (rc==DSERR_ALLOCATED) { - trace(" Already In Use\n"); - goto EXIT; - } - } - - rc=IDirectSound8_Initialize(dso,lpGuid); - ok(rc==DSERR_ALREADYINITIALIZED, "IDirectSound8_Initialize() " - "should have returned DSERR_ALREADYINITIALIZED: %08x\n", rc); - - /* DSOUND: Error: Invalid caps buffer */ - rc=IDirectSound8_GetCaps(dso,0); - ok(rc==DSERR_INVALIDPARAM,"IDirectSound8_GetCaps() " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); - - ZeroMemory(&dscaps, sizeof(dscaps)); - - /* DSOUND: Error: Invalid caps buffer */ - rc=IDirectSound8_GetCaps(dso,&dscaps); - ok(rc==DSERR_INVALIDPARAM,"IDirectSound8_GetCaps() " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); - - dscaps.dwSize=sizeof(dscaps); - - /* DSOUND: Running on a certified driver */ - rc=IDirectSound8_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound8_GetCaps() failed: %08x\n",rc); - - rc=IDirectSound8_Compact(dso); - ok(rc==DSERR_PRIOLEVELNEEDED,"IDirectSound8_Compact() failed: %08x\n", rc); - - rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %08x\n", rc); - - rc=IDirectSound8_Compact(dso); - ok(rc==DS_OK,"IDirectSound8_Compact() failed: %08x\n",rc); - - rc=IDirectSound8_GetSpeakerConfig(dso,0); - ok(rc==DSERR_INVALIDPARAM,"IDirectSound8_GetSpeakerConfig(NULL) " - "should have returned DSERR_INVALIDPARAM, returned: %08x\n", rc); - - rc=IDirectSound8_GetSpeakerConfig(dso,&speaker_config); - ok(rc==DS_OK,"IDirectSound8_GetSpeakerConfig() failed: %08x\n", rc); - ref_speaker_config = speaker_config; - - speaker_config = DSSPEAKER_COMBINED(DSSPEAKER_STEREO, - DSSPEAKER_GEOMETRY_WIDE); - if (speaker_config == ref_speaker_config) - speaker_config = DSSPEAKER_COMBINED(DSSPEAKER_STEREO, - DSSPEAKER_GEOMETRY_NARROW); - if(rc==DS_OK) { - rc=IDirectSound8_SetSpeakerConfig(dso,speaker_config); - ok(rc==DS_OK,"IDirectSound8_SetSpeakerConfig() failed: %08x\n", rc); - } - if (rc==DS_OK) { - rc=IDirectSound8_GetSpeakerConfig(dso,&new_speaker_config); - ok(rc==DS_OK,"IDirectSound8_GetSpeakerConfig() failed: %08x\n", rc); - if (rc==DS_OK && speaker_config!=new_speaker_config) - trace("IDirectSound8_GetSpeakerConfig() failed to set speaker " - "config: expected 0x%08x, got 0x%08x\n", - speaker_config,new_speaker_config); - IDirectSound8_SetSpeakerConfig(dso,ref_speaker_config); - } - - rc=IDirectSound8_VerifyCertification(dso, &certified); - ok(rc==DS_OK||rc==E_NOTIMPL,"IDirectSound8_VerifyCertification() failed: %08x\n", rc); - -EXIT: - ref=IDirectSound8_Release(dso); - ok(ref==0,"IDirectSound8_Release() has %d references, should have 0\n",ref); -} - -static void IDirectSound8_tests(void) -{ - HRESULT rc; - LPDIRECTSOUND8 dso=NULL; - LPCLASSFACTORY cf=NULL; - - trace("Testing IDirectSound8\n"); - - rc=CoGetClassObject(&CLSID_DirectSound8, CLSCTX_INPROC_SERVER, NULL, - &IID_IClassFactory, (void**)&cf); - ok(rc==S_OK,"CoGetClassObject(CLSID_DirectSound8, IID_IClassFactory) " - "failed: %08x\n", rc); - - rc=CoGetClassObject(&CLSID_DirectSound8, CLSCTX_INPROC_SERVER, NULL, - &IID_IUnknown, (void**)&cf); - ok(rc==S_OK,"CoGetClassObject(CLSID_DirectSound8, IID_IUnknown) " - "failed: %08x\n", rc); - - /* try the COM class factory method of creation with no device specified */ - rc=CoCreateInstance(&CLSID_DirectSound8, NULL, CLSCTX_INPROC_SERVER, - &IID_IDirectSound8, (void**)&dso); - ok(rc==S_OK||rc==REGDB_E_CLASSNOTREG,"CoCreateInstance() failed: %08x\n", rc); - if (rc==REGDB_E_CLASSNOTREG) { - trace(" Class Not Registered\n"); - return; - } - if (dso) - IDirectSound8_test(dso, FALSE, NULL); - - /* try the COM class factory method of creation with default playback - * device specified */ - rc=CoCreateInstance(&CLSID_DirectSound8, NULL, CLSCTX_INPROC_SERVER, - &IID_IDirectSound8, (void**)&dso); - ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSound8) failed: %08x\n", rc); - if (dso) - IDirectSound8_test(dso, FALSE, &DSDEVID_DefaultPlayback); - - /* try the COM class factory method of creation with default voice - * playback device specified */ - rc=CoCreateInstance(&CLSID_DirectSound8, NULL, CLSCTX_INPROC_SERVER, - &IID_IDirectSound8, (void**)&dso); - ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSound8) failed: %08x\n", rc); - if (dso) - IDirectSound8_test(dso, FALSE, &DSDEVID_DefaultVoicePlayback); - - /* try the COM class factory method of creation with a bad - * IID specified */ - rc=CoCreateInstance(&CLSID_DirectSound8, NULL, CLSCTX_INPROC_SERVER, - &CLSID_DirectSoundPrivate, (void**)&dso); - ok(rc==E_NOINTERFACE, - "CoCreateInstance(CLSID_DirectSound8,CLSID_DirectSoundPrivate) " - "should have failed: %08x\n",rc); - - /* try the COM class factory method of creation with a bad - * GUID and IID specified */ - rc=CoCreateInstance(&CLSID_DirectSoundPrivate, NULL, CLSCTX_INPROC_SERVER, - &IID_IDirectSound8, (void**)&dso); - ok(rc==REGDB_E_CLASSNOTREG, - "CoCreateInstance(CLSID_DirectSoundPrivate,IID_IDirectSound8) " - "should have failed: %08x\n",rc); - - /* try with no device specified */ - rc=pDirectSoundCreate8(NULL,&dso,NULL); - ok(rc==S_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCreate8() failed: %08x\n",rc); - if (rc==DS_OK && dso) - IDirectSound8_test(dso, TRUE, NULL); - - /* try with default playback device specified */ - rc=pDirectSoundCreate8(&DSDEVID_DefaultPlayback,&dso,NULL); - ok(rc==S_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCreate8() failed: %08x\n",rc); - if (rc==DS_OK && dso) - IDirectSound8_test(dso, TRUE, NULL); - - /* try with default voice playback device specified */ - rc=pDirectSoundCreate8(&DSDEVID_DefaultVoicePlayback,&dso,NULL); - ok(rc==S_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCreate8() failed: %08x\n",rc); - if (rc==DS_OK && dso) - IDirectSound8_test(dso, TRUE, NULL); - - /* try with a bad device specified */ - rc=pDirectSoundCreate8(&DSDEVID_DefaultVoiceCapture,&dso,NULL); - ok(rc==DSERR_NODRIVER,"DirectSoundCreate8(DSDEVID_DefaultVoiceCapture) " - "should have failed: %08x\n",rc); -} - -static HRESULT test_dsound8(LPGUID lpGuid) -{ - HRESULT rc; - LPDIRECTSOUND8 dso=NULL; - int ref; - - /* DSOUND: Error: Invalid interface buffer */ - rc=pDirectSoundCreate8(lpGuid,0,NULL); - ok(rc==DSERR_INVALIDPARAM,"DirectSoundCreate8() should have returned " - "DSERR_INVALIDPARAM, returned: %08x\n",rc); - - /* Create the DirectSound8 object */ - rc=pDirectSoundCreate8(lpGuid,&dso,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCreate8() failed: %08x\n",rc); - if (rc!=DS_OK) - return rc; - - /* Try the enumerated device */ - IDirectSound8_test(dso, TRUE, lpGuid); - - /* Try the COM class factory method of creation with enumerated device */ - rc=CoCreateInstance(&CLSID_DirectSound8, NULL, CLSCTX_INPROC_SERVER, - &IID_IDirectSound8, (void**)&dso); - ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSound) failed: %08x\n", rc); - if (dso) - IDirectSound8_test(dso, FALSE, lpGuid); - - /* Create a DirectSound8 object */ - rc=pDirectSoundCreate8(lpGuid,&dso,NULL); - ok(rc==DS_OK,"DirectSoundCreate8() failed: %08x\n",rc); - if (rc==DS_OK) { - LPDIRECTSOUND8 dso1=NULL; - - /* Create a second DirectSound8 object */ - rc=pDirectSoundCreate8(lpGuid,&dso1,NULL); - ok(rc==DS_OK,"DirectSoundCreate8() failed: %08x\n",rc); - if (rc==DS_OK) { - /* Release the second DirectSound8 object */ - ref=IDirectSound8_Release(dso1); - ok(ref==0,"IDirectSound8_Release() has %d references, " - "should have 0\n",ref); - ok(dso!=dso1,"DirectSound8 objects should be unique: " - "dso=%p,dso1=%p\n",dso,dso1); - } - - /* Release the first DirectSound8 object */ - ref=IDirectSound8_Release(dso); - ok(ref==0,"IDirectSound8_Release() has %d references, should have 0\n", - ref); - if (ref!=0) - return DSERR_GENERIC; - } else - return rc; - - /* Create a DirectSound8 object */ - rc=pDirectSoundCreate8(lpGuid,&dso,NULL); - ok(rc==DS_OK,"DirectSoundCreate8() failed: %08x\n",rc); - if (rc==DS_OK) { - LPDIRECTSOUNDBUFFER secondary; - DSBUFFERDESC bufdesc; - WAVEFORMATEX wfx; - - init_format(&wfx,WAVE_FORMAT_PCM,11025,8,1); - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=DSBCAPS_GETCURRENTPOSITION2 | DSBCAPS_CTRL3D; - bufdesc.dwBufferBytes=align(wfx.nAvgBytesPerSec*BUFFER_LEN/1000, - wfx.nBlockAlign); - bufdesc.lpwfxFormat=&wfx; - rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); - ok(rc==DS_OK && secondary!=NULL, - "IDirectSound8_CreateSoundBuffer() failed to create a secondary " - "buffer: %08x\n",rc); - if (rc==DS_OK && secondary!=NULL) { - LPDIRECTSOUND3DBUFFER buffer3d; - LPDIRECTSOUNDBUFFER8 buffer8; - rc=IDirectSound8_QueryInterface(secondary, - &IID_IDirectSound3DBuffer, - (void **)&buffer3d); - ok(rc==DS_OK && buffer3d!=NULL, - "IDirectSound8_QueryInterface() failed: %08x\n", rc); - if (rc==DS_OK && buffer3d!=NULL) { - ref=IDirectSound3DBuffer_AddRef(buffer3d); - ok(ref==2,"IDirectSound3DBuffer_AddRef() has %d references, " - "should have 2\n",ref); - } - rc=IDirectSound8_QueryInterface(secondary, - &IID_IDirectSoundBuffer8, - (void **)&buffer8); - if (rc==DS_OK && buffer8!=NULL) { - ref=IDirectSoundBuffer8_AddRef(buffer8); - ok(ref==3,"IDirectSoundBuffer8_AddRef() has %d references, " - "should have 3\n",ref); - } - ref=IDirectSoundBuffer_AddRef(secondary); - ok(ref==4,"IDirectSoundBuffer_AddRef() has %d references, " - "should have 4\n",ref); - } - /* release with buffer */ - ref=IDirectSound8_Release(dso); - ok(ref==0,"IDirectSound8_Release() has %d references, should have 0\n", - ref); - if (ref!=0) - return DSERR_GENERIC; - } else - return rc; - - return DS_OK; -} - -static HRESULT test_primary8(LPGUID lpGuid) -{ - HRESULT rc; - LPDIRECTSOUND8 dso=NULL; - LPDIRECTSOUNDBUFFER primary=NULL,second=NULL,third=NULL; - LPDIRECTSOUNDBUFFER8 pb8 = NULL; - DSBUFFERDESC bufdesc; - DSCAPS dscaps; - WAVEFORMATEX wfx; - int ref; - - /* Create the DirectSound object */ - rc=pDirectSoundCreate8(lpGuid,&dso,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED, - "DirectSoundCreate8() failed: %08x\n",rc); - if (rc!=DS_OK) - return rc; - - /* Get the device capabilities */ - ZeroMemory(&dscaps, sizeof(dscaps)); - dscaps.dwSize=sizeof(dscaps); - rc=IDirectSound8_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound8_GetCaps() failed: %08x\n",rc); - if (rc!=DS_OK) - goto EXIT; - - /* DSOUND: Error: Invalid buffer description pointer */ - rc=IDirectSound8_CreateSoundBuffer(dso,0,0,NULL); - ok(rc==DSERR_INVALIDPARAM, - "IDirectSound8_CreateSoundBuffer should have returned " - "DSERR_INVALIDPARAM, returned: %08x\n",rc); - - /* DSOUND: Error: Invalid buffer description pointer */ - rc=IDirectSound8_CreateSoundBuffer(dso,0,&primary,NULL); - ok(rc==DSERR_INVALIDPARAM && primary==0, - "IDirectSound8_CreateSoundBuffer() should have returned " - "DSERR_INVALIDPARAM, returned: rc=%08x,dsbo=%p\n", - rc,primary); - - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize = sizeof(DSBUFFERDESC); - - /* DSOUND: Error: Invalid dsound buffer interface pointer */ - rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,0,NULL); - ok(rc==DSERR_INVALIDPARAM && primary==0, - "IDirectSound8_CreateSoundBuffer() should have failed: rc=%08x," - "dsbo=%p\n",rc,primary); - - ZeroMemory(&bufdesc, sizeof(bufdesc)); - - /* DSOUND: Error: Invalid size */ - /* DSOUND: Error: Invalid buffer description */ - rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); - ok(rc==DSERR_INVALIDPARAM && primary==0, - "IDirectSound8_CreateSoundBuffer() should have failed: rc=%08x," - "primary=%p\n",rc,primary); - - /* We must call SetCooperativeLevel before calling CreateSoundBuffer */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ - rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %08x\n", rc); - if (rc!=DS_OK) - goto EXIT; - - /* Testing the primary buffer */ - primary=NULL; - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER|DSBCAPS_CTRLVOLUME; - bufdesc.lpwfxFormat = &wfx; - init_format(&wfx,WAVE_FORMAT_PCM,11025,8,2); - rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); - ok(rc==DSERR_INVALIDPARAM,"IDirectSound8_CreateSoundBuffer() should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n", rc); - if (rc==DS_OK && primary!=NULL) - IDirectSoundBuffer_Release(primary); - - primary=NULL; - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER|DSBCAPS_CTRLVOLUME; - rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); - ok((rc==DS_OK && primary!=NULL) || (rc==DSERR_CONTROLUNAVAIL), - "IDirectSound8_CreateSoundBuffer() failed to create a primary buffer: " - "%08x\n",rc); - if (rc==DSERR_CONTROLUNAVAIL) - trace(" No Primary\n"); - else if (rc==DS_OK && primary!=NULL) { - LONG vol; - - /* Try to create a second primary buffer */ - /* DSOUND: Error: The primary buffer already exists. - * Any changes made to the buffer description will be ignored. */ - rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&second,NULL); - ok(rc==DS_OK && second==primary, - "IDirectSound8_CreateSoundBuffer() should have returned original " - "primary buffer: %08x\n",rc); - ref=IDirectSoundBuffer_Release(second); - ok(ref==1,"IDirectSoundBuffer_Release() primary has %d references, " - "should have 1\n",ref); - - /* Try to duplicate a primary buffer */ - /* DSOUND: Error: Can't duplicate primary buffers */ - rc=IDirectSound8_DuplicateSoundBuffer(dso,primary,&third); - /* rc=0x88780032 */ - ok(rc!=DS_OK,"IDirectSound8_DuplicateSoundBuffer() primary buffer " - "should have failed %08x\n",rc); - - /* Primary buffers don't have an IDirectSoundBuffer8 */ - rc = IDirectSoundBuffer_QueryInterface(primary, &IID_IDirectSoundBuffer8, (LPVOID*)&pb8); - ok(FAILED(rc), "Primary buffer does have an IDirectSoundBuffer8: %08x\n", rc); - - rc=IDirectSoundBuffer_GetVolume(primary,&vol); - ok(rc==DS_OK,"IDirectSoundBuffer_GetVolume() failed: %08x\n", rc); - - if (winetest_interactive) { - trace("Playing a 5 seconds reference tone at the current volume.\n"); - if (rc==DS_OK) - trace("(the current volume is %d according to DirectSound)\n", - vol); - trace("All subsequent tones should be identical to this one.\n"); - trace("Listen for stutter, changes in pitch, volume, etc.\n"); - } - test_buffer8(dso,&primary,1,FALSE,0,FALSE,0,winetest_interactive && - !(dscaps.dwFlags & DSCAPS_EMULDRIVER),5.0,0,0,0,0); - - ref=IDirectSoundBuffer_Release(primary); - ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, " - "should have 0\n",ref); - } - - /* Set the CooperativeLevel back to normal */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */ - rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_NORMAL); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %08x\n", rc); - -EXIT: - ref=IDirectSound8_Release(dso); - ok(ref==0,"IDirectSound8_Release() has %d references, should have 0\n",ref); - if (ref!=0) - return DSERR_GENERIC; - - return rc; -} - -/* - * Test the primary buffer at different formats while keeping the - * secondary buffer at a constant format. - */ -static HRESULT test_primary_secondary8(LPGUID lpGuid) -{ - HRESULT rc; - LPDIRECTSOUND8 dso=NULL; - LPDIRECTSOUNDBUFFER primary=NULL,secondary=NULL; - DSBUFFERDESC bufdesc; - DSCAPS dscaps; - WAVEFORMATEX wfx, wfx2; - int ref; - unsigned int f; - - /* Create the DirectSound object */ - rc=pDirectSoundCreate8(lpGuid,&dso,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED, - "DirectSoundCreate8() failed: %08x\n",rc); - if (rc!=DS_OK) - return rc; - - /* Get the device capabilities */ - ZeroMemory(&dscaps, sizeof(dscaps)); - dscaps.dwSize=sizeof(dscaps); - rc=IDirectSound8_GetCaps(dso,&dscaps); - ok(rc==DS_OK,"IDirectSound8_GetCaps() failed: %08x\n",rc); - if (rc!=DS_OK) - goto EXIT; - - /* We must call SetCooperativeLevel before creating primary buffer */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ - rc=IDirectSound8_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound8_SetCooperativeLevel() failed: %08x\n", rc); - if (rc!=DS_OK) - goto EXIT; - - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER; - rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); - ok(rc==DS_OK && primary!=NULL, - "IDirectSound8_CreateSoundBuffer() failed to create a primary buffer " - "%08x\n",rc); - - if (rc==DS_OK && primary!=NULL) { - for (f=0;f - -#include - -#include "wine/test.h" -#include "dsound.h" -#include "mmreg.h" -#include "dsconf.h" - -#include "dsound_test.h" - -static HRESULT (WINAPI *pDirectSoundFullDuplexCreate)(LPCGUID, LPCGUID, - LPCDSCBUFFERDESC, LPCDSBUFFERDESC, HWND, DWORD, LPDIRECTSOUNDFULLDUPLEX *, - LPDIRECTSOUNDCAPTUREBUFFER8*, LPDIRECTSOUNDBUFFER8*, LPUNKNOWN)=NULL; - -static void IDirectSoundFullDuplex_test(LPDIRECTSOUNDFULLDUPLEX dsfdo, - BOOL initialized, LPCGUID lpGuidCapture, - LPCGUID lpGuidRender) -{ - HRESULT rc; - int ref; - IUnknown * unknown; - IDirectSound * ds; - IDirectSound8 * ds8; - IDirectSoundCapture * dsc; - IDirectSoundFullDuplex * dsfd; - - /* Try to Query for objects */ - rc=IDirectSoundFullDuplex_QueryInterface(dsfdo,&IID_IUnknown,(LPVOID*)&unknown); - ok(rc==DS_OK,"IDirectSoundFullDuplex_QueryInterface(IID_IUnknown) failed: %08x\n", rc); - if (rc==DS_OK) { - ref=IDirectSoundFullDuplex_Release(unknown); - ok(ref==0, "IDirectSoundFullDuplex_Release() has %d references, " - "should have 0\n", ref); - } - - rc=IDirectSoundFullDuplex_QueryInterface(dsfdo,&IID_IDirectSound,(LPVOID*)&ds); - ok(rc==(initialized?DS_OK:E_NOINTERFACE),"IDirectSoundFullDuplex_QueryInterface(IID_IDirectSound) failed: %08x\n", rc); - if (rc==DS_OK) { - ref=IDirectSound_Release(ds); - ok(ref==0, "IDirectSound_Release() has %d references, " - "should have 0\n", ref); - } - - rc=IDirectSoundFullDuplex_QueryInterface(dsfdo,&IID_IDirectSound8,(LPVOID*)&ds8); - ok(rc==(initialized?DS_OK:E_NOINTERFACE),"IDirectSoundFullDuplex_QueryInterface(IID_IDirectSound8) " - "failed: %08x\n",rc); - if (rc==DS_OK) { - IDirectSoundFullDuplex * dsfd1; - rc=IDirectSound8_QueryInterface(ds8,&IID_IDirectSoundFullDuplex,(LPVOID*)&dsfd1); - ok(rc==DS_OK,"IDirectSound8_QueryInterface(IID_IDirectSoundFullDuplex) " - "failed: %08x\n",rc); - if (rc==DS_OK) { - ref=IDirectSoundFullDuplex_Release(dsfd1); - ok(ref==1, "IDirectSoundFullDuplex_Release() has %d references, " - "should have 1\n", ref); - } - ref=IDirectSound8_Release(ds8); - ok(ref==0, "IDirectSound8_Release() has %d references, " - "should have 0\n", ref); - } - - rc=IDirectSoundFullDuplex_QueryInterface(dsfdo,&IID_IDirectSoundCapture,(LPVOID*)&dsc); - ok(rc==(initialized?DS_OK:E_NOINTERFACE),"IDirectSoundFullDuplex_QueryInterface(IID_IDirectSoundCapture) " - "failed: %08x\n",rc); - if (rc==DS_OK) { - ref=IDirectSoundCapture_Release(dsc); - ok(ref==0, "IDirectSoundCapture_Release() has %d references, " - "should have 0\n", ref); - } - - rc=IDirectSoundFullDuplex_QueryInterface(dsfdo,&IID_IDirectSoundFullDuplex,(LPVOID*)&dsfd); - ok(rc==DS_OK,"IDirectSoundFullDuplex_QueryInterface(IID_IDirectSoundFullDuplex) " - "failed: %08x\n",rc); - if (rc==DS_OK) { - ok (dsfdo==dsfd, "different interfaces\n"); - ref=IDirectSound8_Release(dsfd); - } - - ref=IDirectSoundFullDuplex_Release(dsfdo); - ok(ref==0, "IDirectSoundFullDuplex_Release() has %d references, " - "should have 0\n", ref); -} - -static void IDirectSoundFullDuplex_tests(void) -{ - HRESULT rc; - LPDIRECTSOUNDFULLDUPLEX dsfdo = NULL; - DSCBUFFERDESC DSCBufferDesc; - DSBUFFERDESC DSBufferDesc; - LPDIRECTSOUNDCAPTUREBUFFER8 pDSCBuffer8; - LPDIRECTSOUNDBUFFER8 pDSBuffer8; - WAVEFORMATEX wfex; - - trace("Testing IDirectSoundFullDuplex\n"); - - /* try the COM class factory method of creation with no devices specified */ - rc=CoCreateInstance(&CLSID_DirectSoundFullDuplex, NULL, - CLSCTX_INPROC_SERVER, &IID_IDirectSoundFullDuplex, - (void**)&dsfdo); - ok(rc==S_OK||rc==REGDB_E_CLASSNOTREG||rc==CLASS_E_CLASSNOTAVAILABLE, - "CoCreateInstance(CLSID_DirectSoundFullDuplex) failed: 0x%08x\n", rc); - if (rc==REGDB_E_CLASSNOTREG) { - trace(" Class Not Registered\n"); - return; - } else if (rc==CLASS_E_CLASSNOTAVAILABLE) { - trace(" Class Not Available\n"); - return; - } - if (dsfdo) - IDirectSoundFullDuplex_test(dsfdo, FALSE, NULL, NULL); - - /* try the COM class factory method of creation with default devices - * specified */ - rc=CoCreateInstance(&CLSID_DirectSoundFullDuplex, NULL, - CLSCTX_INPROC_SERVER, &IID_IDirectSoundFullDuplex, - (void**)&dsfdo); - ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSoundFullDuplex) failed: 0x%08x\n", rc); - if (dsfdo) - IDirectSoundFullDuplex_test(dsfdo, FALSE, &DSDEVID_DefaultCapture, - &DSDEVID_DefaultPlayback); - - /* try the COM class factory method of creation with default voice - * devices specified */ - rc=CoCreateInstance(&CLSID_DirectSoundFullDuplex, NULL, - CLSCTX_INPROC_SERVER, &IID_IDirectSoundFullDuplex, - (void**)&dsfdo); - ok(rc==S_OK,"CoCreateInstance(CLSID_DirectSoundFullDuplex) failed: 0x%08x\n", rc); - if (dsfdo) - IDirectSoundFullDuplex_test(dsfdo, FALSE, &DSDEVID_DefaultVoiceCapture, - &DSDEVID_DefaultVoicePlayback); - - /* try the COM class factory method of creation with a bad - * IID specified */ - rc=CoCreateInstance(&CLSID_DirectSoundFullDuplex, NULL, - CLSCTX_INPROC_SERVER, &CLSID_DirectSoundPrivate, - (void**)&dsfdo); - ok(rc==E_NOINTERFACE, - "CoCreateInstance(CLSID_DirectSoundFullDuplex,CLSID_DirectSoundPrivate) " - "should have failed: 0x%08x\n", rc); - - ZeroMemory(&wfex, sizeof(wfex)); - wfex.wFormatTag = WAVE_FORMAT_PCM; - wfex.nChannels = 1; - wfex.nSamplesPerSec = 8000; - wfex.wBitsPerSample = 16; - wfex.nBlockAlign = (wfex.wBitsPerSample * wfex.nChannels) / 8; - wfex.nAvgBytesPerSec = wfex.nSamplesPerSec * wfex.nBlockAlign; - - ZeroMemory(&DSCBufferDesc, sizeof(DSCBufferDesc)); - DSCBufferDesc.dwSize = sizeof(DSCBufferDesc); - DSCBufferDesc.dwFlags = DSCBCAPS_WAVEMAPPED; - DSCBufferDesc.dwBufferBytes = 8192; - DSCBufferDesc.lpwfxFormat = &wfex; - - ZeroMemory(&DSBufferDesc, sizeof(DSBufferDesc)); - DSBufferDesc.dwSize = sizeof(DSBufferDesc); - DSBufferDesc.dwFlags = DSBCAPS_GLOBALFOCUS; - DSBufferDesc.dwBufferBytes = 8192; - DSBufferDesc.lpwfxFormat = &wfex; - - /* try with no device specified */ - rc=pDirectSoundFullDuplexCreate(NULL,NULL,&DSCBufferDesc,&DSBufferDesc, - get_hwnd(),DSSCL_EXCLUSIVE ,&dsfdo,&pDSCBuffer8, - &pDSBuffer8,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL||rc==DSERR_INVALIDCALL, - "DirectSoundFullDuplexCreate(NULL,NULL) failed: %08x\n",rc); - if (rc==S_OK && dsfdo) - IDirectSoundFullDuplex_test(dsfdo, TRUE, NULL, NULL); - - /* try with default devices specified */ - rc=pDirectSoundFullDuplexCreate(&DSDEVID_DefaultCapture, - &DSDEVID_DefaultPlayback,&DSCBufferDesc, - &DSBufferDesc,get_hwnd(),DSSCL_EXCLUSIVE,&dsfdo, - &pDSCBuffer8,&pDSBuffer8,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL||rc==DSERR_INVALIDCALL, - "DirectSoundFullDuplexCreate(DSDEVID_DefaultCapture," - "DSDEVID_DefaultPlayback) failed: %08x\n", rc); - if (rc==DS_OK && dsfdo) - IDirectSoundFullDuplex_test(dsfdo, TRUE, NULL, NULL); - - /* try with default voice devices specified */ - rc=pDirectSoundFullDuplexCreate(&DSDEVID_DefaultVoiceCapture, - &DSDEVID_DefaultVoicePlayback, - &DSCBufferDesc,&DSBufferDesc,get_hwnd(),DSSCL_EXCLUSIVE, - &dsfdo,&pDSCBuffer8,&pDSBuffer8,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL||rc==DSERR_INVALIDCALL, - "DirectSoundFullDuplexCreate(DSDEVID_DefaultVoiceCapture," - "DSDEVID_DefaultVoicePlayback) failed: %08x\n", rc); - if (rc==DS_OK && dsfdo) - IDirectSoundFullDuplex_test(dsfdo, TRUE, NULL, NULL); - - /* try with bad devices specified */ - rc=pDirectSoundFullDuplexCreate(&DSDEVID_DefaultVoicePlayback, - &DSDEVID_DefaultVoiceCapture, - &DSCBufferDesc,&DSBufferDesc,get_hwnd(),DSSCL_EXCLUSIVE, - &dsfdo,&pDSCBuffer8,&pDSBuffer8,NULL); - ok(rc==DSERR_NODRIVER||rc==DSERR_INVALIDCALL, - "DirectSoundFullDuplexCreate(DSDEVID_DefaultVoicePlayback," - "DSDEVID_DefaultVoiceCapture) should have failed: %08x\n", rc); - if (rc==DS_OK && dsfdo) - IDirectSoundFullDuplex_Release(dsfdo); -} - -START_TEST(duplex) -{ - HMODULE hDsound; - - CoInitialize(NULL); - - hDsound = LoadLibrary("dsound.dll"); - if (hDsound) - { - - pDirectSoundFullDuplexCreate=(void*)GetProcAddress(hDsound, - "DirectSoundFullDuplexCreate"); - if (pDirectSoundFullDuplexCreate) - IDirectSoundFullDuplex_tests(); - else - skip("duplex test skipped\n"); - - FreeLibrary(hDsound); - } - else - skip("dsound.dll not found!\n"); - - CoUninitialize(); -} diff --git a/rostests/winetests/dsound/propset.c b/rostests/winetests/dsound/propset.c deleted file mode 100644 index 5007fccb3ca..00000000000 --- a/rostests/winetests/dsound/propset.c +++ /dev/null @@ -1,749 +0,0 @@ -/* - * Unit tests for CLSID_DirectSoundPrivate property set functions - * (used by dxdiag) - * - * Copyright (c) 2003 Robert Reif - * - * 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 -#include - -#include "wine/test.h" -#include "dsound.h" -#include "dsconf.h" - -#include "dsound_test.h" - -#ifndef DSBCAPS_CTRLDEFAULT -#define DSBCAPS_CTRLDEFAULT \ - DSBCAPS_CTRLFREQUENCY|DSBCAPS_CTRLPAN|DSBCAPS_CTRLVOLUME -#endif - -#include "initguid.h" - -DEFINE_GUID(DSPROPSETID_VoiceManager, - 0x62A69BAE,0xDF9D,0x11D1,0x99,0xA6,0x00,0xC0,0x4F,0xC9,0x9D,0x46); -DEFINE_GUID(DSPROPSETID_EAX20_ListenerProperties, - 0x306a6a8,0xb224,0x11d2,0x99,0xe5,0x0,0x0,0xe8,0xd8,0xc7,0x22); -DEFINE_GUID(DSPROPSETID_EAX20_BufferProperties, - 0x306a6a7,0xb224,0x11d2,0x99,0xe5,0x0,0x0,0xe8,0xd8,0xc7,0x22); -DEFINE_GUID(DSPROPSETID_I3DL2_ListenerProperties, - 0xDA0F0520,0x300A,0x11D3,0x8A,0x2B,0x00,0x60,0x97,0x0D,0xB0,0x11); -DEFINE_GUID(DSPROPSETID_I3DL2_BufferProperties, - 0xDA0F0521,0x300A,0x11D3,0x8A,0x2B,0x00,0x60,0x97,0x0D,0xB0,0x11); -DEFINE_GUID(DSPROPSETID_ZOOMFX_BufferProperties, - 0xCD5368E0,0x3450,0x11D3,0x8B,0x6E,0x00,0x10,0x5A,0x9B,0x7B,0xBC); - -static HRESULT (WINAPI *pDirectSoundEnumerateA)(LPDSENUMCALLBACKA,LPVOID)=NULL; -static HRESULT (WINAPI *pDllGetClassObject)(REFCLSID,REFIID,LPVOID*)=NULL; -static HRESULT (WINAPI *pDirectSoundCreate)(LPCGUID,LPDIRECTSOUND*, - LPUNKNOWN)=NULL; -static HRESULT (WINAPI *pDirectSoundCreate8)(LPCGUID,LPDIRECTSOUND8*, - LPUNKNOWN)=NULL; -static HRESULT (WINAPI *pDirectSoundCaptureCreate)(LPCGUID, - LPDIRECTSOUNDCAPTURE*,LPUNKNOWN)=NULL; -static HRESULT (WINAPI *pDirectSoundCaptureCreate8)(LPCGUID, - LPDIRECTSOUNDCAPTURE8*,LPUNKNOWN)=NULL; -static HRESULT (WINAPI *pDirectSoundFullDuplexCreate)(LPCGUID,LPCGUID, - LPCDSCBUFFERDESC,LPCDSBUFFERDESC,HWND,DWORD,LPDIRECTSOUNDFULLDUPLEX*, - LPDIRECTSOUNDCAPTUREBUFFER8*,LPDIRECTSOUNDBUFFER8*,LPUNKNOWN)=NULL; - -static BOOL CALLBACK callback(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA data, - LPVOID context) -{ - trace(" found device:\n"); - trace(" Type: %s\n", - data->Type == DIRECTSOUNDDEVICE_TYPE_EMULATED ? "Emulated" : - data->Type == DIRECTSOUNDDEVICE_TYPE_VXD ? "VxD" : - data->Type == DIRECTSOUNDDEVICE_TYPE_WDM ? "WDM" : "Unknown"); - trace(" DataFlow: %s\n", - data->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_RENDER ? "Render" : - data->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE ? - "Capture" : "Unknown"); - trace(" DeviceId: {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n", - data->DeviceId.Data1,data->DeviceId.Data2,data->DeviceId.Data3, - data->DeviceId.Data4[0],data->DeviceId.Data4[1], - data->DeviceId.Data4[2],data->DeviceId.Data4[3], - data->DeviceId.Data4[4],data->DeviceId.Data4[5], - data->DeviceId.Data4[6],data->DeviceId.Data4[7]); - trace(" Description: %s\n", data->Description); - trace(" Module: %s\n", data->Module); - trace(" Interface: %s\n", data->Interface); - trace(" WaveDeviceId: %d\n", data->WaveDeviceId); - - return TRUE; -} - -static BOOL CALLBACK callback1(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA data, - LPVOID context) -{ - char descriptionA[0x100]; - char moduleA[MAX_PATH]; - - trace(" found device:\n"); - trace(" Type: %s\n", - data->Type == DIRECTSOUNDDEVICE_TYPE_EMULATED ? "Emulated" : - data->Type == DIRECTSOUNDDEVICE_TYPE_VXD ? "VxD" : - data->Type == DIRECTSOUNDDEVICE_TYPE_WDM ? "WDM" : "Unknown"); - trace(" DataFlow: %s\n", - data->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_RENDER ? "Render" : - data->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE ? - "Capture" : "Unknown"); - trace(" DeviceId: {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n", - data->DeviceId.Data1,data->DeviceId.Data2,data->DeviceId.Data3, - data->DeviceId.Data4[0],data->DeviceId.Data4[1], - data->DeviceId.Data4[2],data->DeviceId.Data4[3], - data->DeviceId.Data4[4],data->DeviceId.Data4[5], - data->DeviceId.Data4[6],data->DeviceId.Data4[7]); - trace(" DescriptionA: %s\n", data->DescriptionA); - WideCharToMultiByte(CP_ACP, 0, data->DescriptionW, -1, descriptionA, sizeof(descriptionA), NULL, NULL); - trace(" DescriptionW: %s\n", descriptionA); - trace(" ModuleA: %s\n", data->ModuleA); - WideCharToMultiByte(CP_ACP, 0, data->ModuleW, -1, moduleA, sizeof(moduleA), NULL, NULL); - trace(" ModuleW: %s\n", moduleA); - trace(" WaveDeviceId: %d\n", data->WaveDeviceId); - - return TRUE; -} - -static BOOL CALLBACK callbackA(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA data, - LPVOID context) -{ - trace(" found device:\n"); - trace(" Type: %s\n", - data->Type == DIRECTSOUNDDEVICE_TYPE_EMULATED ? "Emulated" : - data->Type == DIRECTSOUNDDEVICE_TYPE_VXD ? "VxD" : - data->Type == DIRECTSOUNDDEVICE_TYPE_WDM ? "WDM" : "Unknown"); - trace(" DataFlow: %s\n", - data->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_RENDER ? "Render" : - data->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE ? - "Capture" : "Unknown"); - trace(" DeviceId: {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n", - data->DeviceId.Data1,data->DeviceId.Data2,data->DeviceId.Data3, - data->DeviceId.Data4[0],data->DeviceId.Data4[1], - data->DeviceId.Data4[2],data->DeviceId.Data4[3], - data->DeviceId.Data4[4],data->DeviceId.Data4[5], - data->DeviceId.Data4[6],data->DeviceId.Data4[7]); - trace(" Description: %s\n", data->Description); - trace(" Module: %s\n", data->Module); - trace(" Interface: %s\n", data->Interface); - trace(" WaveDeviceId: %d\n", data->WaveDeviceId); - - return TRUE; -} - -static BOOL CALLBACK callbackW(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA data, - LPVOID context) -{ - char descriptionA[0x100]; - char moduleA[MAX_PATH]; - char interfaceA[MAX_PATH]; - - trace("found device:\n"); - trace("\tType: %s\n", - data->Type == DIRECTSOUNDDEVICE_TYPE_EMULATED ? "Emulated" : - data->Type == DIRECTSOUNDDEVICE_TYPE_VXD ? "VxD" : - data->Type == DIRECTSOUNDDEVICE_TYPE_WDM ? "WDM" : "Unknown"); - trace("\tDataFlow: %s\n", - data->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_RENDER ? "Render" : - data->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE ? - "Capture" : "Unknown"); - trace("\tDeviceId: {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n", - data->DeviceId.Data1,data->DeviceId.Data2,data->DeviceId.Data3, - data->DeviceId.Data4[0],data->DeviceId.Data4[1], - data->DeviceId.Data4[2],data->DeviceId.Data4[3], - data->DeviceId.Data4[4],data->DeviceId.Data4[5], - data->DeviceId.Data4[6],data->DeviceId.Data4[7]); - WideCharToMultiByte(CP_ACP, 0, data->Description, -1, descriptionA, sizeof(descriptionA), NULL, NULL); - WideCharToMultiByte(CP_ACP, 0, data->Module, -1, moduleA, sizeof(moduleA), NULL, NULL); - WideCharToMultiByte(CP_ACP, 0, data->Interface, -1, interfaceA, sizeof(interfaceA), NULL, NULL); - trace("\tDescription: %s\n", descriptionA); - trace("\tModule: %s\n", moduleA); - trace("\tInterface: %s\n", interfaceA); - trace("\tWaveDeviceId: %d\n", data->WaveDeviceId); - - return TRUE; -} - -static void propset_private_tests(void) -{ - HRESULT rc; - IClassFactory * pcf; - IKsPropertySet * pps; - ULONG support; - - /* try direct sound first */ - /* DSOUND: Error: Invalid interface buffer */ - rc = (pDllGetClassObject)(&CLSID_DirectSound, &IID_IClassFactory, NULL); - ok(rc==DSERR_INVALIDPARAM,"DllGetClassObject(CLSID_DirectSound, " - "IID_IClassFactory) should have returned DSERR_INVALIDPARAM, " - "returned: %08x\n",rc); - - rc = (pDllGetClassObject)(&CLSID_DirectSound, &IID_IDirectSound, (void **)(&pcf)); - ok(rc==E_NOINTERFACE,"DllGetClassObject(CLSID_DirectSound, " - "IID_IDirectSound) should have returned E_NOINTERFACE, " - "returned: %08x\n",rc); - - rc = (pDllGetClassObject)(&CLSID_DirectSound, &IID_IUnknown, (void **)(&pcf)); - ok(rc==DS_OK,"DllGetClassObject(CLSID_DirectSound, " - "IID_IUnknown) failed: %08x\n",rc); - - rc = (pDllGetClassObject)(&CLSID_DirectSound, &IID_IClassFactory, (void **)(&pcf)); - ok(pcf!=0, "DllGetClassObject(CLSID_DirectSound, IID_IClassFactory) " - "failed: %08x\n",rc); - if (pcf==0) - return; - - /* direct sound doesn't have an IKsPropertySet */ - /* DSOUND: Error: Invalid interface buffer */ - rc = IClassFactory_CreateInstance(pcf, NULL, &IID_IKsPropertySet, - NULL); - ok(rc==DSERR_INVALIDPARAM, "CreateInstance(IID_IKsPropertySet) should have " - "returned DSERR_INVALIDPARAM, returned: %08x\n",rc); - - rc = IClassFactory_CreateInstance(pcf, NULL, &IID_IKsPropertySet, - (void **)(&pps)); - ok(rc==E_NOINTERFACE, "CreateInstance(IID_IKsPropertySet) should have " - "returned E_NOINTERFACE, returned: %08x\n",rc); - - /* and the direct sound 8 version */ - if (pDirectSoundCreate8) { - rc = (pDllGetClassObject)(&CLSID_DirectSound8, &IID_IClassFactory, (void **)(&pcf)); - ok(pcf!=0, "DllGetClassObject(CLSID_DirectSound8, IID_IClassFactory) " - "failed: %08x\n",rc); - if (pcf==0) - return; - - /* direct sound 8 doesn't have an IKsPropertySet */ - rc = IClassFactory_CreateInstance(pcf, NULL, &IID_IKsPropertySet, - (void **)(&pps)); - ok(rc==E_NOINTERFACE, "CreateInstance(IID_IKsPropertySet) should have " - "returned E_NOINTERFACE, returned: %08x\n",rc); - } - - /* try direct sound capture next */ - if (pDirectSoundCaptureCreate) { - rc = (pDllGetClassObject)(&CLSID_DirectSoundCapture, &IID_IClassFactory, - (void **)(&pcf)); - ok(pcf!=0, "DllGetClassObject(CLSID_DirectSoundCapture, IID_IClassFactory) " - "failed: %08x\n",rc); - if (pcf==0) - return; - - /* direct sound capture doesn't have an IKsPropertySet */ - rc = IClassFactory_CreateInstance(pcf, NULL, &IID_IKsPropertySet, - (void **)(&pps)); - ok(rc==E_NOINTERFACE, "CreateInstance(IID_IKsPropertySet) should have " - "returned E_NOINTERFACE,returned: %08x\n",rc); - } - - /* and the direct sound capture 8 version */ - if (pDirectSoundCaptureCreate8) { - rc = (pDllGetClassObject)(&CLSID_DirectSoundCapture8, &IID_IClassFactory, - (void **)(&pcf)); - ok(pcf!=0, "DllGetClassObject(CLSID_DirectSoundCapture8, " - "IID_IClassFactory) failed: %08x\n",rc); - if (pcf==0) - return; - - /* direct sound capture 8 doesn't have an IKsPropertySet */ - rc = IClassFactory_CreateInstance(pcf, NULL, &IID_IKsPropertySet, - (void **)(&pps)); - ok(rc==E_NOINTERFACE, "CreateInstance(IID_IKsPropertySet) should have " - "returned E_NOINTERFACE, returned: %08x\n",rc); - } - - /* try direct sound full duplex next */ - if (pDirectSoundFullDuplexCreate) { - rc = (pDllGetClassObject)(&CLSID_DirectSoundFullDuplex, &IID_IClassFactory, - (void **)(&pcf)); - ok(pcf!=0, "DllGetClassObject(CLSID_DirectSoundFullDuplex, " - "IID_IClassFactory) failed: %08x\n",rc); - if (pcf==0) - return; - - /* direct sound full duplex doesn't have an IKsPropertySet */ - rc = IClassFactory_CreateInstance(pcf, NULL, &IID_IKsPropertySet, - (void **)(&pps)); - ok(rc==E_NOINTERFACE, "CreateInstance(IID_IKsPropertySet) should have " - "returned NOINTERFACE, returned: %08x\n",rc); - } - - /* try direct sound private last */ - rc = (pDllGetClassObject)(&CLSID_DirectSoundPrivate, &IID_IClassFactory, - (void **)(&pcf)); - - /* some early versions of Direct Sound do not have this */ - if (rc==CLASS_E_CLASSNOTAVAILABLE) - return; - - /* direct sound private does have an IKsPropertySet */ - rc = IClassFactory_CreateInstance(pcf, NULL, &IID_IKsPropertySet, - (void **)(&pps)); - ok(rc==DS_OK, "CreateInstance(IID_IKsPropertySet) failed: %08x\n", - rc); - if (rc!=DS_OK) - return; - - /* test generic DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION */ - rc = IKsPropertySet_QuerySupport(pps, &DSPROPSETID_DirectSoundDevice, - DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION, - &support); - ok(rc==DS_OK||rc==E_INVALIDARG, - "QuerySupport(DSPROPSETID_DirectSoundDevice, " - "DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION) failed: %08x\n", - rc); - if (rc!=DS_OK) { - if (rc==E_INVALIDARG) - trace(" Not Supported\n"); - return; - } - - ok(support & KSPROPERTY_SUPPORT_GET, - "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION: " - "support = 0x%x\n",support); - ok(!(support & KSPROPERTY_SUPPORT_SET), - "Shouldn't be able to set DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION: " - "support = 0x%x\n",support); - - /* test DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1 */ - rc = IKsPropertySet_QuerySupport(pps, &DSPROPSETID_DirectSoundDevice, - DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1, - &support); - ok(rc==DS_OK||rc==E_INVALIDARG, - "QuerySupport(DSPROPSETID_DirectSoundDevice, " - "DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1) failed: %08x\n", - rc); - if (rc!=DS_OK) { - if (rc==E_INVALIDARG) - trace(" Not Supported\n"); - return; - } - - ok(support & KSPROPERTY_SUPPORT_GET, - "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1: " - "support = 0x%x\n",support); - ok(!(support & KSPROPERTY_SUPPORT_SET), - "Shouldn't be able to set DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1: " - "support = 0x%x\n",support); - - /* test DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A */ - rc = IKsPropertySet_QuerySupport(pps, &DSPROPSETID_DirectSoundDevice, - DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A, - &support); - ok(rc==DS_OK||rc==E_INVALIDARG, - "QuerySupport(DSPROPSETID_DirectSoundDevice, " - "DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A) failed: %08x\n", - rc); - if (rc!=DS_OK) { - if (rc==E_INVALIDARG) - trace(" Not Supported\n"); - return; - } - - ok(support & KSPROPERTY_SUPPORT_GET, - "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A: " - "support = 0x%x\n",support); - ok(!(support & KSPROPERTY_SUPPORT_SET), - "Shouldn't be able to set DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A: " - "support = 0x%x\n",support); - - /* test DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W */ - rc = IKsPropertySet_QuerySupport(pps, &DSPROPSETID_DirectSoundDevice, - DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W, - &support); - ok(rc==DS_OK||rc==E_INVALIDARG, - "QuerySupport(DSPROPSETID_DirectSoundDevice, " - "DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W) failed: %08x\n", - rc); - if (rc!=DS_OK) { - if (rc==E_INVALIDARG) - trace(" Not Supported\n"); - return; - } - - ok(support & KSPROPERTY_SUPPORT_GET, - "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W: " - "support = 0x%x\n",support); - ok(!(support & KSPROPERTY_SUPPORT_SET), - "Shouldn't be able to set DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W: " - "support = 0x%x\n",support); - - /* test generic DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING */ - rc = IKsPropertySet_QuerySupport(pps, &DSPROPSETID_DirectSoundDevice, - DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING, &support); - ok(rc==DS_OK, "QuerySupport(DSPROPSETID_DirectSoundDevice, " - "DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING) failed: %08x\n", - rc); - if (rc!=DS_OK) - return; - - ok(support & KSPROPERTY_SUPPORT_GET, - "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING: " - "support = 0x%x\n",support); - ok(!(support & KSPROPERTY_SUPPORT_SET), "Shouldn't be able to set " - "DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING: support = " - "0x%x\n",support); - - /* test DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A */ - rc = IKsPropertySet_QuerySupport(pps, &DSPROPSETID_DirectSoundDevice, - DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A, &support); - ok(rc==DS_OK, "QuerySupport(DSPROPSETID_DirectSoundDevice, " - "DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A) failed: %08x\n", - rc); - if (rc!=DS_OK) - return; - - ok(support & KSPROPERTY_SUPPORT_GET, - "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A: " - "support = 0x%x\n",support); - ok(!(support & KSPROPERTY_SUPPORT_SET), "Shouldn't be able to set " - "DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A: support = " - "0x%x\n",support); - - /* test DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W */ - rc = IKsPropertySet_QuerySupport(pps, &DSPROPSETID_DirectSoundDevice, - DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W, &support); - ok(rc==DS_OK, "QuerySupport(DSPROPSETID_DirectSoundDevice, " - "DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W) failed: %08x\n", - rc); - if (rc!=DS_OK) - return; - - ok(support & KSPROPERTY_SUPPORT_GET, - "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W: " - "support = 0x%x\n",support); - ok(!(support & KSPROPERTY_SUPPORT_SET), "Shouldn't be able to set " - "DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W: support = " - "0x%x\n",support); - - /* test generic DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE */ - trace("*** Testing DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE ***\n"); - rc = IKsPropertySet_QuerySupport(pps, &DSPROPSETID_DirectSoundDevice, - DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE, - &support); - ok(rc==DS_OK, "QuerySupport(DSPROPSETID_DirectSoundDevice, " - "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE) failed: %08x\n", - rc); - if (rc!=DS_OK) - return; - - ok(support & KSPROPERTY_SUPPORT_GET, - "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE: " - "support = 0x%x\n",support); - ok(!(support & KSPROPERTY_SUPPORT_SET),"Shouldn't be able to set " - "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE: support = 0x%x\n",support); - - if (support & KSPROPERTY_SUPPORT_GET) { - DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA data; - ULONG bytes; - - data.Callback = callback; - data.Context = 0; - - rc = IKsPropertySet_Get(pps, &DSPROPSETID_DirectSoundDevice, - DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE, - NULL, 0, &data, sizeof(data), &bytes); - ok(rc==DS_OK, "Couldn't enumerate: 0x%x\n",rc); - } - - /* test DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1 */ - trace("*** Testing DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1 ***\n"); - rc = IKsPropertySet_QuerySupport(pps, &DSPROPSETID_DirectSoundDevice, - DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1, - &support); - ok(rc==DS_OK, "QuerySupport(DSPROPSETID_DirectSoundDevice, " - "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1) failed: %08x\n", - rc); - if (rc!=DS_OK) - return; - - ok(support & KSPROPERTY_SUPPORT_GET, - "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1: " - "support = 0x%x\n",support); - ok(!(support & KSPROPERTY_SUPPORT_SET),"Shouldn't be able to set " - "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1: support = 0x%x\n",support); - - if (support & KSPROPERTY_SUPPORT_GET) { - DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA data; - ULONG bytes; - - data.Callback = callback1; - data.Context = 0; - - rc = IKsPropertySet_Get(pps, &DSPROPSETID_DirectSoundDevice, - DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1, - NULL, 0, &data, sizeof(data), &bytes); - ok(rc==DS_OK, "Couldn't enumerate: 0x%x\n",rc); - } - - /* test DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A */ - trace("*** Testing DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A ***\n"); - rc = IKsPropertySet_QuerySupport(pps, &DSPROPSETID_DirectSoundDevice, - DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A, - &support); - ok(rc==DS_OK, "QuerySupport(DSPROPSETID_DirectSoundDevice, " - "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A) failed: %08x\n", - rc); - if (rc!=DS_OK) - return; - - ok(support & KSPROPERTY_SUPPORT_GET, - "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A: " - "support = 0x%x\n",support); - ok(!(support & KSPROPERTY_SUPPORT_SET),"Shouldn't be able to set " - "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A: support = 0x%x\n",support); - - if (support & KSPROPERTY_SUPPORT_GET) { - DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA data; - ULONG bytes; - - data.Callback = callbackA; - data.Context = 0; - - rc = IKsPropertySet_Get(pps, &DSPROPSETID_DirectSoundDevice, - DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A, - NULL, 0, &data, sizeof(data), &bytes); - ok(rc==DS_OK, "Couldn't enumerate: 0x%x\n",rc); - } - - /* test DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W */ - trace("*** Testing DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W ***\n"); - rc = IKsPropertySet_QuerySupport(pps, &DSPROPSETID_DirectSoundDevice, - DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W, - &support); - ok(rc==DS_OK, "QuerySupport(DSPROPSETID_DirectSoundDevice, " - "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W) failed: %08x\n", - rc); - if (rc!=DS_OK) - return; - - ok(support & KSPROPERTY_SUPPORT_GET, - "Couldn't get DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W: " - "support = 0x%x\n",support); - ok(!(support & KSPROPERTY_SUPPORT_SET),"Shouldn't be able to set " - "DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W: support = 0x%x\n",support); - - if (support & KSPROPERTY_SUPPORT_GET) { - DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA data; - ULONG bytes; - - data.Callback = callbackW; - data.Context = 0; - - rc = IKsPropertySet_Get(pps, &DSPROPSETID_DirectSoundDevice, - DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W, - NULL, 0, &data, sizeof(data), &bytes); - ok(rc==DS_OK, "Couldn't enumerate: 0x%x\n",rc); - } - IKsPropertySet_Release(pps); -} - -static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription, - LPCSTR lpcstrModule, LPVOID lpContext) -{ - HRESULT rc; - LPDIRECTSOUND dso=NULL; - LPDIRECTSOUNDBUFFER primary=NULL,secondary=NULL; - DSBUFFERDESC bufdesc; - WAVEFORMATEX wfx; - int ref; - - trace("*** Testing %s - %s ***\n",lpcstrDescription,lpcstrModule); - - rc=pDirectSoundCreate(lpGuid,&dso,NULL); - ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, - "DirectSoundCreate() failed: %08x\n",rc); - if (rc!=DS_OK) { - if (rc==DSERR_NODRIVER) - trace(" No Driver\n"); - else if (rc == DSERR_ALLOCATED) - trace(" Already In Use\n"); - else if (rc == E_FAIL) - trace(" No Device\n"); - goto EXIT; - } - - /* We must call SetCooperativeLevel before calling CreateSoundBuffer */ - /* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */ - rc=IDirectSound_SetCooperativeLevel(dso,get_hwnd(),DSSCL_PRIORITY); - ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel() failed: %08x\n", - rc); - if (rc!=DS_OK) - goto EXIT; - - /* Testing 3D buffers */ - primary=NULL; - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=DSBCAPS_PRIMARYBUFFER|DSBCAPS_LOCHARDWARE|DSBCAPS_CTRL3D; - rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&primary,NULL); - ok((rc==DS_OK&&primary!=NULL) - || broken(rc==DSERR_INVALIDPARAM), - "IDirectSound_CreateSoundBuffer() failed to " - "create a hardware 3D primary buffer: %08x\n",rc); - if(rc==DSERR_INVALIDPARAM) { - skip("broken driver\n"); - goto EXIT; - } - if (rc==DS_OK&&primary!=NULL) { - ZeroMemory(&wfx, sizeof(wfx)); - wfx.wFormatTag=WAVE_FORMAT_PCM; - wfx.nChannels=1; - wfx.wBitsPerSample=16; - wfx.nSamplesPerSec=44100; - wfx.nBlockAlign=wfx.nChannels*wfx.wBitsPerSample/8; - wfx.nAvgBytesPerSec=wfx.nSamplesPerSec*wfx.nBlockAlign; - ZeroMemory(&bufdesc, sizeof(bufdesc)); - bufdesc.dwSize=sizeof(bufdesc); - bufdesc.dwFlags=DSBCAPS_CTRLDEFAULT|DSBCAPS_GETCURRENTPOSITION2; - bufdesc.dwBufferBytes=wfx.nAvgBytesPerSec; - bufdesc.lpwfxFormat=&wfx; - trace(" Testing a secondary buffer at %dx%dx%d\n", - wfx.nSamplesPerSec,wfx.wBitsPerSample,wfx.nChannels); - rc=IDirectSound_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL); - ok(rc==DS_OK&&secondary!=NULL,"IDirectSound_CreateSoundBuffer() " - "failed to create a secondary buffer: %08x\n",rc); - if (rc==DS_OK&&secondary!=NULL) { - IKsPropertySet * pPropertySet=NULL; - rc=IDirectSoundBuffer_QueryInterface(secondary, - &IID_IKsPropertySet, - (void **)&pPropertySet); - /* it's not an error for this to fail */ - if(rc==DS_OK) { - ULONG ulTypeSupport; - trace(" Supports property sets\n"); - /* it's not an error for these to fail */ - rc=IKsPropertySet_QuerySupport(pPropertySet, - &DSPROPSETID_VoiceManager, - 0,&ulTypeSupport); - if((rc==DS_OK)&&(ulTypeSupport&(KSPROPERTY_SUPPORT_GET| - KSPROPERTY_SUPPORT_SET))) - trace(" DSPROPSETID_VoiceManager supported\n"); - else - trace(" DSPROPSETID_VoiceManager not supported\n"); - rc=IKsPropertySet_QuerySupport(pPropertySet, - &DSPROPSETID_EAX20_ListenerProperties,0,&ulTypeSupport); - if((rc==DS_OK)&&(ulTypeSupport&(KSPROPERTY_SUPPORT_GET| - KSPROPERTY_SUPPORT_SET))) - trace(" DSPROPSETID_EAX20_ListenerProperties " - "supported\n"); - else - trace(" DSPROPSETID_EAX20_ListenerProperties not " - "supported\n"); - rc=IKsPropertySet_QuerySupport(pPropertySet, - &DSPROPSETID_EAX20_BufferProperties,0,&ulTypeSupport); - if((rc==DS_OK)&&(ulTypeSupport&(KSPROPERTY_SUPPORT_GET| - KSPROPERTY_SUPPORT_SET))) - trace(" DSPROPSETID_EAX20_BufferProperties supported\n"); - else - trace(" DSPROPSETID_EAX20_BufferProperties not " - "supported\n"); - rc=IKsPropertySet_QuerySupport(pPropertySet, - &DSPROPSETID_I3DL2_ListenerProperties,0,&ulTypeSupport); - if((rc==DS_OK)&&(ulTypeSupport&(KSPROPERTY_SUPPORT_GET| - KSPROPERTY_SUPPORT_SET))) - trace(" DSPROPSETID_I3DL2_ListenerProperties " - "supported\n"); - else - trace(" DSPROPSETID_I3DL2_ListenerProperties not " - "supported\n"); - rc=IKsPropertySet_QuerySupport(pPropertySet, - &DSPROPSETID_I3DL2_BufferProperties,0,&ulTypeSupport); - if((rc==DS_OK)&&(ulTypeSupport&(KSPROPERTY_SUPPORT_GET| - KSPROPERTY_SUPPORT_SET))) - trace(" DSPROPSETID_I3DL2_BufferProperties supported\n"); - else - trace(" DSPROPSETID_I3DL2_BufferProperties not " - "supported\n"); - rc=IKsPropertySet_QuerySupport(pPropertySet, - &DSPROPSETID_ZOOMFX_BufferProperties,0,&ulTypeSupport); - if((rc==DS_OK)&&(ulTypeSupport&(KSPROPERTY_SUPPORT_GET| - KSPROPERTY_SUPPORT_SET))) - trace(" DSPROPSETID_ZOOMFX_BufferProperties " - "supported\n"); - else - trace(" DSPROPSETID_ZOOMFX_BufferProperties not " - "supported\n"); - ref=IKsPropertySet_Release(pPropertySet); - /* try a few common ones */ - ok(ref==0,"IKsPropertySet_Release() secondary has %d " - "references, should have 0\n",ref); - } else - trace(" Doesn't support property sets\n"); - - ref=IDirectSoundBuffer_Release(secondary); - ok(ref==0,"IDirectSoundBuffer_Release() secondary has %d " - "references, should have 0\n",ref); - } - - ref=IDirectSoundBuffer_Release(primary); - ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, " - "should have 0\n",ref); - } - -EXIT: - if (dso!=NULL) { - ref=IDirectSound_Release(dso); - ok(ref==0,"IDirectSound_Release() has %d references, should have 0\n", - ref); - } - return 1; -} - -static void propset_buffer_tests(void) -{ - HRESULT rc; - rc=pDirectSoundEnumerateA(&dsenum_callback,NULL); - ok(rc==DS_OK,"DirectSoundEnumerateA() failed: %08x\n",rc); -} - -START_TEST(propset) -{ - HMODULE hDsound; - - CoInitialize(NULL); - - hDsound = LoadLibrary("dsound.dll"); - if (hDsound) - { - - pDirectSoundEnumerateA = (void*)GetProcAddress(hDsound, - "DirectSoundEnumerateA"); - pDllGetClassObject = (void *)GetProcAddress(hDsound, - "DllGetClassObject"); - pDirectSoundCreate = (void*)GetProcAddress(hDsound, - "DirectSoundCreate"); - pDirectSoundCreate8 = (void*)GetProcAddress(hDsound, - "DirectSoundCreate8"); - pDirectSoundCaptureCreate=(void*)GetProcAddress(hDsound, - "DirectSoundCaptureCreate"); - pDirectSoundCaptureCreate8=(void*)GetProcAddress(hDsound, - "DirectSoundCaptureCreate8"); - pDirectSoundFullDuplexCreate=(void*)GetProcAddress(hDsound, - "DirectSoundFullDuplexCreate"); - - propset_private_tests(); - propset_buffer_tests(); - - FreeLibrary(hDsound); - } - else - skip("dsound.dll not found!\n"); - - CoUninitialize(); -} diff --git a/rostests/winetests/dsound/testlist.c b/rostests/winetests/dsound/testlist.c deleted file mode 100644 index 2afeb2ffd66..00000000000 --- a/rostests/winetests/dsound/testlist.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_capture(void); -extern void func_ds3d8(void); -extern void func_ds3d(void); -extern void func_dsound8(void); -extern void func_dsound(void); -extern void func_duplex(void); -extern void func_propset(void); - -const struct test winetest_testlist[] = -{ - { "capture", func_capture }, - { "ds3d8", func_ds3d8 }, - { "ds3d", func_ds3d }, - { "dsound8", func_dsound8 }, - { "dsound", func_dsound }, - { "duplex", func_duplex }, - { "propset", func_propset }, - { 0, 0 } -}; diff --git a/rostests/winetests/fusion/CMakeLists.txt b/rostests/winetests/fusion/CMakeLists.txt deleted file mode 100644 index e265d5b2dbe..00000000000 --- a/rostests/winetests/fusion/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - asmcache.c - asmenum.c - asmname.c - fusion.c - testlist.c) - -add_executable(fusion_winetest ${SOURCE}) -target_link_libraries(fusion_winetest wine) -set_module_type(fusion_winetest win32cui) -add_importlibs(fusion_winetest user32 msvcrt kernel32 ntdll) -add_cd_file(TARGET fusion_winetest DESTINATION reactos/bin FOR all) - -if(NOT MSVC) - allow_warnings(fusion_winetest) -endif() diff --git a/rostests/winetests/fusion/asmcache.c b/rostests/winetests/fusion/asmcache.c deleted file mode 100644 index 06867e6783e..00000000000 --- a/rostests/winetests/fusion/asmcache.c +++ /dev/null @@ -1,1529 +0,0 @@ -/* - * Copyright 2008 James Hawkins - * - * 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 INITGUID - -#include - -#include -#include -#include -#include - -#include "wine/test.h" - -typedef struct _tagASSEMBLY ASSEMBLY; - -typedef struct -{ - ULONG Signature; - USHORT MajorVersion; - USHORT MinorVersion; - ULONG Reserved; - ULONG VersionLength; - BYTE Version[12]; - BYTE Flags; - WORD Streams; -} METADATAHDR; - -#include - -typedef struct -{ - DWORD Offset; - DWORD Size; -} METADATASTREAMHDR; - -typedef struct -{ - DWORD Reserved1; - BYTE MajorVersion; - BYTE MinorVersion; - BYTE HeapOffsetSizes; - BYTE Reserved2; - LARGE_INTEGER MaskValid; - LARGE_INTEGER MaskSorted; -} METADATATABLESHDR; - -typedef struct -{ - WORD Generation; - WORD Name; - WORD Mvid; - WORD EncId; - WORD EncBaseId; -} MODULETABLE; - -typedef struct -{ - DWORD Flags; - WORD Name; - WORD Namespace; - WORD Extends; - WORD FieldList; - WORD MethodList; -} TYPEDEFTABLE; - -typedef struct -{ - DWORD HashAlgId; - WORD MajorVersion; - WORD MinorVersion; - WORD BuildNumber; - WORD RevisionNumber; - DWORD Flags; - WORD PublicKey; - WORD Name; - WORD Culture; -} ASSEMBLYTABLE; - -typedef struct -{ - DWORD Offset; - DWORD Flags; - WORD Name; - WORD Implementation; -} MANIFESTRESTABLE; - -typedef struct -{ - DWORD ImportLookupTable; - DWORD DateTimeStamp; - DWORD ForwarderChain; - DWORD Name; - DWORD ImportAddressTable; - BYTE pad[20]; -} IMPORTTABLE; - -typedef struct -{ - DWORD HintNameTableRVA; - BYTE pad[8]; -} IMPORTLOOKUPTABLE; - -typedef struct -{ - WORD Hint; - BYTE Name[12]; - BYTE Module[12]; - DWORD Reserved; - WORD EntryPoint; - DWORD RVA; -} HINTNAMETABLE; - -typedef struct -{ - DWORD PageRVA; - DWORD Size; - DWORD Relocation; -} RELOCATION; - -typedef struct -{ - WORD wLength; - WORD wValueLength; - WORD wType; - WCHAR szKey[17]; - VS_FIXEDFILEINFO Value; -} VS_VERSIONINFO; - -typedef struct -{ - WORD wLength; - WORD wValueLength; - WORD wType; - WCHAR szKey[13]; -} VARFILEINFO; - -typedef struct -{ - WORD wLength; - WORD wValueLength; - WORD wType; - WCHAR szKey[13]; - DWORD Value; -} VAR; - -typedef struct -{ - WORD wLength; - WORD wValueLength; - WORD wType; - WCHAR szKey[15]; -} STRINGFILEINFO; - -typedef struct -{ - WORD wLength; - WORD wValueLength; - WORD wType; - WCHAR szKey[9]; -} STRINGTABLE; - -typedef struct -{ - WORD wLength; - WORD wValueLength; - WORD wType; -} STRINGHDR; - -typedef struct -{ - DWORD Size; - DWORD Signature; - DWORD HeaderVersion; - DWORD SkipBytes; - BYTE Data[168]; -} RESOURCE; - -#include - -static struct _tagASSEMBLY -{ - IMAGE_DOS_HEADER doshdr; - WORD unknown[32]; - IMAGE_NT_HEADERS32 nthdrs; - IMAGE_SECTION_HEADER text; - IMAGE_SECTION_HEADER rsrc; - IMAGE_SECTION_HEADER reloc; - BYTE pad[16]; - IMAGE_IMPORT_BY_NAME iat; - BYTE pad2[3]; - IMAGE_COR20_HEADER clrhdr; - WORD strongname[64]; - RESOURCE resource; - METADATAHDR metadatahdr; - METADATASTREAMHDR roothdr; - BYTE rootname[4]; - METADATASTREAMHDR stringshdr; - BYTE stringsname[12]; - METADATASTREAMHDR ushdr; - BYTE usname[4]; - METADATASTREAMHDR guidhdr; - BYTE guidname[8]; - METADATASTREAMHDR blobhdr; - BYTE blobname[8]; - METADATATABLESHDR tableshdr; - DWORD numrows[4]; - MODULETABLE modtable; - TYPEDEFTABLE tdtable; - ASSEMBLYTABLE asmtable; - MANIFESTRESTABLE manifestrestable; - WORD pad3; - BYTE stringheap[40]; - WORD usheap[4]; - WORD guidheap[8]; - WORD blobheap[82]; - IMAGE_IMPORT_DESCRIPTOR importdesc; - BYTE pad4[20]; - IMPORTLOOKUPTABLE importlookup; - HINTNAMETABLE hintnametable; - BYTE pad5[108]; - IMAGE_RESOURCE_DIRECTORY topresdir; - IMAGE_RESOURCE_DIRECTORY_ENTRY labelres; - IMAGE_RESOURCE_DIRECTORY res11dir; - IMAGE_RESOURCE_DIRECTORY_ENTRY label11res; - IMAGE_RESOURCE_DIRECTORY res10dir; - IMAGE_RESOURCE_DIRECTORY_ENTRY label10res; - IMAGE_RESOURCE_DATA_ENTRY resdata; - VS_VERSIONINFO verinfo; - VARFILEINFO varfileinfo; - VAR translation; - STRINGFILEINFO strfileinfo; - STRINGTABLE strtable; - STRINGHDR filedeschdr; - WCHAR filedesckey[17]; - WCHAR filedescval[2]; - STRINGHDR fileverhdr; - WCHAR fileverkey[13]; - WCHAR fileverval[8]; - STRINGHDR intnamehdr; - WCHAR intnamekey[13]; - WCHAR intnameval[10]; - STRINGHDR copyrighthdr; - WCHAR copyrightkey[15]; - WCHAR copyrightval[2]; - STRINGHDR orignamehdr; - WCHAR orignamekey[17]; - WCHAR orignameval[10]; - STRINGHDR prodverhdr; - WCHAR prodverkey[15]; - WCHAR prodverval[8]; - STRINGHDR asmverhdr; - WCHAR asmverkey[17]; - WCHAR asmverval[8]; - WORD pad6[182]; - RELOCATION relocation; - WORD pad7[250]; -} assembly = -{ - /* IMAGE_DOS_HEADER */ - { - IMAGE_DOS_SIGNATURE, 144, 3, 0, 4, 0, 0xFFFF, 0, 0xB8, 0, 0, 0, 0x40, - 0, { 0 }, 0, 0, { 0 }, 0x80 - }, - /* binary to print "This program cannot be run in DOS mode." */ - { - 0x1F0E, 0x0EBA, 0xB400, 0xCD09, 0xB821, 0x4C01, 0x21CD, 0x6854, 0x7369, - 0x7020, 0x6F72, 0x7267, 0x6D61, 0x6320, 0x6E61, 0x6F6E, 0x2074, 0x6562, - 0x7220, 0x6E75, 0x6920, 0x206E, 0x4F44, 0x2053, 0x6F6D, 0x6564, 0x0D2E, - 0x0A0D, 0x0024, 0x0000, 0x0000, 0x0000 - }, - /* IMAGE_NT_HEADERS32 */ - { - IMAGE_NT_SIGNATURE, /* Signature */ - /* IMAGE_FILE_HEADER */ - { - IMAGE_FILE_MACHINE_I386, /* Machine */ - 3, /* NumberOfSections */ - 0x47EFDF09, /* TimeDateStamp */ - 0, /* PointerToSymbolTable */ - 0, /* NumberOfSymbols */ - 0xE0, /* SizeOfOptionalHeader */ - IMAGE_FILE_32BIT_MACHINE | IMAGE_FILE_LOCAL_SYMS_STRIPPED | - IMAGE_FILE_LINE_NUMS_STRIPPED | IMAGE_FILE_EXECUTABLE_IMAGE | - IMAGE_FILE_DLL, /* Characteristics */ - }, - /* IMAGE_OPTIONAL_HEADER32 */ - { - IMAGE_NT_OPTIONAL_HDR32_MAGIC, /* Magic */ - 8, /* MajorLinkerVersion */ - 0, /* MinorLinkerVersion */ - 0x400, /* SizeOfCode */ - 0x600, /* SizeOfInitializedData */ - 0, /* SizeOfUninitializedData */ - 0x238E, /* AddressOfEntryPoint */ - 0x2000, /* BaseOfCode */ - 0x4000, /* BaseOfData */ - 0x400000, /* ImageBase */ - 0x2000, /* SectionAlignment */ - 0x200, /* FileAlignment */ - 4, /* MajorOperatingSystemVersion */ - 0, /* MinorOperatingSystemVersion */ - 0, /* MajorImageVersion */ - 0, /* MinorImageVersion */ - 4, /* MajorSubsystemVersion */ - 0, /* MinorSubsystemVersion */ - 0, /* Win32VersionValue */ - 0x8000, /* SizeOfImage */ - 0x200, /* SizeOfHeaders */ - 0xB576, /* CheckSum */ - IMAGE_SUBSYSTEM_WINDOWS_CUI, /* Subsystem */ - IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE | - IMAGE_DLLCHARACTERISTICS_NO_SEH | - IMAGE_DLLCHARACTERISTICS_NX_COMPAT, /* DllCharacteristics */ - 0x100000, /* SizeOfStackReserve */ - 0x1000, /* SizeOfStackCommit */ - 0x100000, /* SizeOfHeapReserve */ - 0x1000, /* SizeOfHeapCommit */ - 0, /* LoaderFlags */ - 0x10, /* NumberOfRvaAndSizes */ - /* IMAGE_DATA_DIRECTORY */ - { - { 0 }, /* Export Table */ - { 0x233C, 0x4F }, /* Import Table */ - { 0x4000, 0x298 }, /* Resource Table */ - { 0 }, /* Exception Table */ - { 0 }, /* Certificate Table */ - { 0x6000, 0xC }, /* Base Relocation Table */ - { 0 }, /* Debug */ - { 0 }, /* Copyright */ - { 0 }, /* Global Ptr */ - { 0 }, /* TLS Table */ - { 0 }, /* Load Config Table */ - { 0 }, /* Bound Import */ - { 0x2000, 8 }, /* IAT */ - { 0 }, /* Delay Import Descriptor */ - { 0x2008, 0x48 }, /* CLI Header */ - { 0 } /* Reserved */ - } - } - }, - /* IMAGE_SECTION_HEADER */ - { - ".text", /* Name */ - { 0x394 }, /* Misc.VirtualSize */ - 0x2000, /* VirtualAddress */ - 0x400, /* SizeOfRawData */ - 0x200, /* PointerToRawData */ - 0, /* PointerToRelocations */ - 0, /* PointerToLinenumbers */ - 0, /* NumberOfRelocations */ - 0, /* NumberOfLinenumbers */ - IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_EXECUTE | - IMAGE_SCN_CNT_CODE, /* Characteristics */ - }, - /* IMAGE_SECTION_HEADER */ - { - ".rsrc", /* Name */ - { 0x298 }, /* Misc.VirtualSize */ - 0x4000, /* VirtualAddress */ - 0x400, /* SizeOfRawData */ - 0x600, /* PointerToRawData */ - 0, /* PointerToRelocations */ - 0, /* PointerToLinenumbers */ - 0, /* NumberOfRelocations */ - 0, /* NumberOfLinenumbers */ - IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ, /* Characteristics */ - }, - /* IMAGE_SECTION_HEADER */ - { - ".reloc", /* Name */ - { 0xC }, /* Misc.VirtualSize */ - 0x6000, /* VirtualAddress */ - 0x200, /* SizeOfRawData */ - 0xA00, /* PointerToRawData */ - 0, /* PointerToRelocations */ - 0, /* PointerToLinenumbers */ - 0, /* NumberOfRelocations */ - 0, /* NumberOfLinenumbers */ - IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | - IMAGE_SCN_MEM_DISCARDABLE, /* Characteristics */ - }, - /* fill */ - { 0 }, - /* IMAGE_IMPORT_BY_NAME */ - { - 0x2370, /* Hint */ - { 0 } /* Name */ - }, - /* fill */ - { 0 }, - /* IMAGE_COR20_HEADER */ - { - 0x48, /* Cb */ - 2, /* MajorRuntimeVersion */ - 5, /* MinorRuntimeVersion */ - { 0x2188, 0x1B4 }, /* MetaData */ - COMIMAGE_FLAGS_ILONLY | COMIMAGE_FLAGS_STRONGNAMESIGNED, /* Flags */ - 0, /* EntryPointToken */ - { 0x20D0, 0xB8 }, /* Resources */ - { 0x2050, 0x80 }, /* StrongNameSignature */ - { 0 }, /* CodeManagerTable */ - { 0 }, /* VTableFixups */ - { 0 }, /* ExportAddressTableJumps */ - { 0 } /* ManagedNativeHeader */ - }, - { 0xE496, 0x9A6E, 0xD95E, 0xA2A1, 0x5D72, 0x9CEF, 0x41E3, 0xD483, - 0xCB5C, 0x329A, 0x887C, 0xE18E, 0xE664, 0x2E1C, 0x0E61, 0xB361, - 0x8B88, 0xC8D0, 0x47A5, 0x9260, 0x6CC5, 0xE60F, 0x1F61, 0x1E3E, - 0xAFEE, 0x925A, 0xA084, 0x6B44, 0x2DC6, 0x8126, 0xEBC9, 0xD812, - 0xF3E9, 0xA3F3, 0xD0D5, 0x2C7F, 0x4592, 0xA0AF, 0x8B15, 0xD91E, - 0x693E, 0x7A4F, 0x5567, 0xC466, 0xC410, 0x3D29, 0xB25F, 0xCD6C, - 0x53EF, 0x0D29, 0x085A, 0xEC39, 0xE3BD, 0x58E0, 0x78F5, 0x0587, - 0xF8D8, 0x14E4, 0x77CE, 0xCCC9, 0x4DCF, 0x8A18, 0x90E8, 0x1A52 - }, - /* RESOURCE */ - { - 0xB4, /* Size */ - 0xBEEFCACE, /* Signature */ - 1, /* HeaderVersion */ - 0x91, /* SkipBytes */ - { 'l','S','y','s','t','e','m','.','R','e','s','o','u','r','c','e','s','.', - 'R','e','s','o','u','r','c','e','R','e','a','d','e','r',',',' ', - 'm','s','c','o','r','l','i','b',',',' ','V','e','r','s','i','o','n','=', - '2','.','0','.','0','.','0',',',' ','C','u','l','t','u','r','e','=', - 'n','e','u','t','r','a','l',',',' ','P','u','b','l','i','c','K','e','y','T','o','k','e','n','=', - 'b','7','7','a','5','c','5','6','1','9','3','4','e','0','8','9', - '#','S','y','s','t','e','m','.','R','e','s','o','u','r','c','e','s','.', - 'R','u','n','t','i','m','e','R','e','s','o','u','r','c','e','S','e','t', - 2,0,0,0,0,0,0,0,0,0,0,0,'P','A','D','P','A','D','P',180,0,0,0 - } - }, - /* METADATAHDR */ - { - 0x424A5342, /* Signature */ - 1, /* MajorVersion */ - 1, /* MinorVersion */ - 0, /* Reserved */ - 0xC, /* VersionLength */ - "v2.0.50727", /* Version */ - 0, /* Flags */ - 5 /* Streams */ - }, - /* METADATASTREAMHDR */ - { - 0x6C, /* Offset */ - 0x64, /* Size */ - }, - "#~\0\0", - /* METADATASTREAMHDR */ - { - 0xD0, /* Offset */ - 0x28, /* Size */ - }, - "#Strings\0\0\0\0", - /* METADATASTREAMHDR */ - { - 0xF8, /* Offset */ - 0x8, /* Size */ - }, - "#US\0", - /* METADATASTREAMHDR */ - { - 0x100, /* Offset */ - 0x10, /* Size */ - }, - "#GUID\0\0\0", - /* METADATASTREAMHDR */ - { - 0x110, /* Offset */ - 0xA4, /* Size */ - }, - "#Blob\0\0\0", - /* METADATATABLESHDR */ - { - 0, /* Reserved1 */ - 2, /* MajorVersion */ - 0, /* MinorVersion */ - 0, /* HeapOffsetSizes */ - 1, /* Reserved2 */ - { { 0 } }, /* MaskValid */ - { { 0 } } /* MaskSorted */ - }, - /* numrows */ - { 1, 1, 1, 1 }, - /* MODULETABLE */ - { - 0, /* Generation */ - 0xA, /* Name */ - 1, /* Mvid */ - 0, /* EncId */ - 0 /* EncBaseId */ - }, - /* TYPEDEFTABLE */ - { - 0, /* Flags */ - 0x1, /* Name */ - 0, /* Namespace */ - 0, /* Extends */ - 1, /* FieldList */ - 1 /* MethodList */ - }, - /* ASSEMBLYTABLE */ - { - 0x8004, /* HashAlgId */ - 1, /* MajorVersion */ - 0, /* MinorVersion */ - 0, /* BuildNumber */ - 0, /* RevisionNumber */ - 1, /* Flags */ - 1, /* PublicKey */ - 0x13, /* Name */ - 0 /* Culture */ - }, - /* MANIFESTRESTABLE */ - { - 0, /* Offset */ - 0x2, /* Flags */ - 0x18, /* Name */ - 0 /* Implementation */ - }, - /* pad */ - 0, - /* String heap */ - "\0\0wine.dll\0wine\0wine.resources\0\0", - /* US heap */ - { 0x0300, 0x0020 }, - /* GUID heap */ - { 0x86EF, 0x5B5A, 0x2C5E, 0x4F6D, 0xC2AB, 0x0A94, 0xD658, 0x31DA }, - /* BLOB heap */ - { 0x8000, 0x00A0, 0x0024, 0x0400, 0x0080, 0x9400, 0x0000, 0x0600, - 0x0002, 0x0000, 0x0024, 0x5200, 0x4153, 0x0031, 0x0004, 0x0100, - 0x0100, 0x2F00, 0x60E0, 0x4D76, 0x5E5C, 0x430A, 0x6FF3, 0x77D6, - 0x04CA, 0xF6AD, 0xF54D, 0x0AD2, 0x9FB6, 0x39C2, 0x2E66, 0xD30F, - 0x916F, 0x1826, 0xFB52, 0x78A0, 0x8262, 0x6902, 0xBD47, 0xAF30, - 0xBAB1, 0x29DA, 0xAA6D, 0xF189, 0x296A, 0x0F13, 0x4982, 0x531D, - 0x8283, 0x1343, 0x5A33, 0x5D36, 0xEB3F, 0x0863, 0xA771, 0x0679, - 0x4DFF, 0xD30A, 0xBEAD, 0x2A9F, 0x12A8, 0x4319, 0x5706, 0x333D, - 0x0CAC, 0xE80A, 0xFD99, 0xC82D, 0x3D3B, 0xBFFE, 0xF256, 0x25E3, - 0x1A12, 0xC116, 0x8936, 0xF237, 0x5F26, 0xC68A, 0x1E42, 0xCE41, - 0xC17C, 0x00C4 - }, - /* IMAGE_IMPORT_DESCRIPTOR */ - { - { 0x2364 }, /* OriginalFirstThunk */ - 0, /* TimeDateStamp */ - 0, /* ForwarderChain */ - 0x237E, /* Name */ - 0x2000, /* FirstThunk */ - }, - /* pad */ - { 0 }, - /* IMPORTLOOKUPTABLE */ - { - 0x2370, /* HintNameTableRVA */ - { 0 }, /* pad */ - }, - /* HINTNAMETABLE */ - { - 0, /* Hint */ - "_CorDllMain", /* Name */ - "mscoree.dll", /* Module */ - 0, /* Reserved */ - 0x25FF, /* EntryPoint */ - 0x402000 /* RVA */ - }, - /* pad to 0x600 */ - { 0 }, - /* IMAGE_RESOURCE_DIRECTORY */ - { - 0, /* Characteristics */ - 0, /* TimeDateStamp */ - 0, /* MajorVersion */ - 0, /* MinorVersion */ - 0, /* NumberOfNamedEntries */ - 1, /* NumberOfIdEntries */ - }, - /* IMAGE_RESOURCE_DIRECTORY_ENTRY */ - { { { 0 } }, { 0 } }, /* nameless unions initialized later */ - /* IMAGE_RESOURCE_DIRECTORY */ - { - 0, /* Characteristics */ - 0, /* TimeDateStamp */ - 0, /* MajorVersion */ - 0, /* MinorVersion */ - 0, /* NumberOfNamedEntries */ - 1, /* NumberOfIdEntries */ - }, - /* IMAGE_RESOURCE_DIRECTORY_ENTRY */ - { { { 0 } }, { 0 } }, /* nameless unions initialized later */ - /* IMAGE_RESOURCE_DIRECTORY */ - { - 0, /* Characteristics */ - 0, /* TimeDateStamp */ - 0, /* MajorVersion */ - 0, /* MinorVersion */ - 0, /* NumberOfNamedEntries */ - 1, /* NumberOfIdEntries */ - }, - /* IMAGE_RESOURCE_DIRECTORY_ENTRY */ - { { { 0 } }, { 0 } }, /* nameless unions initialized later */ - /* IMAGE_RESOURCE_DATA_ENTRY */ - { - 0x4058, /* OffsetToData */ - 0x23C, /* Size */ - 0, /* CodePage */ - 0, /* Reserved */ - }, - /* VS_VERSIONINFO */ - { - 0x23C, /* wLength */ - 0x34, /* wValueLength */ - 0, /* wType */ - { 'V','S','_','V','E','R','S','I','O','N','_','I','N','F','O',0,0 }, /* szKey */ - /* VS_FIXEDFILEINFO */ - { - VS_FFI_SIGNATURE, /* dwSignature */ - VS_FFI_STRUCVERSION, /* dwStrucVersion */ - 0x10000, /* dwFileVersionMS */ - 0x00000, /* dwFileVersionLS */ - 0x10000, /* dwProductVersionMS */ - 0x00000, /* dwProductVersionLS */ - VS_FFI_FILEFLAGSMASK, /* dwFileFlagsMask */ - 0x0, /* dwFileFlags */ - VOS__WINDOWS32, /* dwFileOS */ - VFT_DLL, /* dwFileType */ - VFT2_UNKNOWN, /* dwFileSubtype */ - 0, /* dwFileDateMS */ - 0, /* dwFileDateLS */ - }, - }, - /* VARFILEINFO */ - { - 0x44, /* wLength */ - 0, /* wValueLength */ - 1, /* wType */ - { 'V','a','r','F','i','l','e','I','n','f','o',0,0 } /* szKey */ - }, - /* VAR */ - { - 0x24, /* wLength */ - 0x4, /* wValueLength */ - 0, /* wType */ - { 'T','r','a','n','s','l','a','t','i','o','n',0,0 }, /* szKey */ - 0x4B00000, /* Value */ - }, - /* STRINGFILEINFO */ - { - 0x19C, /* wLength */ - 0, /* wValueLength */ - 1, /* wType */ - { 'S','t','r','i','n','g','F','i','l','e','I','n','f','o',0 }, /* szKey */ - }, - /* STRINGTABLE */ - { - 0x178, /* wLength */ - 0, /* wValueLength */ - 1, /* wType */ - { '0','0','0','0','0','4','b','0',0 }, /* szKey */ - }, - /* STRINGHDR */ - { - 0x2C, /* wLength */ - 2, /* wValueLength */ - 1, /* wType */ - }, - { 'F','i','l','e','D','e','s','c','r','i','p','t','i','o','n',0,0 }, /* szKey */ - { ' ',0 }, /* szValue */ - /* STRINGHDR */ - { - 0x30, /* wLength */ - 8, /* wValueLength */ - 1, /* wType */ - }, - { 'F','i','l','e','V','e','r','s','i','o','n',0,0 }, /* szKey */ - { '1','.','0','.','0','.','0',0 }, /* szValue */ - /* STRINGHDR */ - { - 0x34, /* wLength */ - 9, /* wValueLength */ - 1, /* wType */ - }, - { 'I','n','t','e','r','n','a','l','N','a','m','e',0 }, /* szKey */ - { 'w','i','n','e','.','d','l','l',0 }, /* szValue */ - /* STRINGHDR */ - { - 0x28, /* wLength */ - 2, /* wValueLength */ - 1, /* wType */ - }, - { 'L','e','g','a','l','C','o','p','y','r','i','g','h','t',0 }, /* szKey */ - { ' ',0 }, /* szValue */ - /* STRINGHDR */ - { - 0x3C, /* wLength */ - 9, /* wValueLength */ - 1, /* wType */ - }, - { 'O','r','i','g','i','n','a','l','F','i','l','e','n','a','m','e',0 }, /* szKey */ - { 'w','i','n','e','.','d','l','l',0,0 }, /* szValue */ - /* STRINGHDR */ - { - 0x34, /* wLength */ - 8, /* wValueLength */ - 1, /* wType */ - }, - { 'P','r','o','d','u','c','t','V','e','r','s','i','o','n',0 }, /* szKey */ - { '1','.','0','.','0','.','0',0 }, /* szValue */ - /* STRINGHDR */ - { - 0x38, /* wLength */ - 8, /* wValueLength */ - 1, /* wType */ - }, - { 'A','s','s','e','m','b','l','y',' ','V','e','r','s','i','o','n',0 }, /* szKey */ - { '1','.','0','.','0','.','0',0 }, /* szValue */ - { 0 }, /* pad */ - /* RELOCATION */ - { - 0x2000, /* PageRVA */ - 0xC, /* Size */ - 0x3390, /* Relocation */ - }, - { 0 } -}; - - -static HRESULT (WINAPI *pCreateAssemblyCache)(IAssemblyCache **ppAsmCache, - DWORD dwReserved); -static HRESULT (WINAPI *pGetCachePath)(ASM_CACHE_FLAGS dwCacheFlags, - LPWSTR pwzCachePath, PDWORD pcchPath); -static HRESULT (WINAPI *pLoadLibraryShim)(LPCWSTR szDllName, LPCWSTR szVersion, - LPVOID pvReserved, HMODULE *phModDll); - -static BOOL init_functionpointers(void) -{ - HRESULT hr; - HMODULE hfusion; - HMODULE hmscoree; - - static const WCHAR szFusion[] = {'f','u','s','i','o','n','.','d','l','l',0}; - - hmscoree = LoadLibraryA("mscoree.dll"); - if (!hmscoree) - { - win_skip("mscoree.dll not available\n"); - return FALSE; - } - - pLoadLibraryShim = (void *)GetProcAddress(hmscoree, "LoadLibraryShim"); - if (!pLoadLibraryShim) - { - win_skip("LoadLibraryShim not available\n"); - FreeLibrary(hmscoree); - return FALSE; - } - - hr = pLoadLibraryShim(szFusion, NULL, NULL, &hfusion); - if (FAILED(hr)) - { - win_skip("fusion.dll not available\n"); - FreeLibrary(hmscoree); - return FALSE; - } - - pCreateAssemblyCache = (void *)GetProcAddress(hfusion, "CreateAssemblyCache"); - pGetCachePath = (void *)GetProcAddress(hfusion, "GetCachePath"); - - if (!pCreateAssemblyCache || !pGetCachePath) - { - win_skip("fusion.dll not implemented\n"); - return FALSE; - } - - FreeLibrary(hmscoree); - return TRUE; -} - -static void create_file_data(LPCSTR name, LPCSTR data, DWORD size) -{ - HANDLE file; - DWORD written; - - file = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "Failure to open file %s\n", name); - WriteFile(file, data, strlen(data), &written, NULL); - - if (size) - { - SetFilePointer(file, size, NULL, FILE_BEGIN); - SetEndOfFile(file); - } - - CloseHandle(file); -} - -#define create_file(name, size) create_file_data(name, name, size) - -static void create_assembly(LPCSTR file) -{ - HANDLE hfile; - DWORD written; - - /* nameless unions initialized here */ - assembly.tableshdr.MaskValid.u.HighPart = 0x101; - assembly.tableshdr.MaskValid.u.LowPart = 0x00000005; - assembly.tableshdr.MaskSorted.u.HighPart = 0x1600; - assembly.tableshdr.MaskSorted.u.LowPart = 0x3301FA00; - U1(assembly.labelres).Name = 0x10; - U2(assembly.labelres).OffsetToData = 0x80000018; - U1(assembly.label11res).Name = 0x1; - U2(assembly.label11res).OffsetToData = 0x80000030; - U1(assembly.label10res).Name = 0x0; - U2(assembly.label10res).OffsetToData = 0x48; - - hfile = CreateFileA(file, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - - WriteFile(hfile, &assembly, sizeof(ASSEMBLY), &written, NULL); - CloseHandle(hfile); -} - -static BOOL check_dotnet20(void) -{ - IAssemblyCache *cache; - HRESULT hr; - BOOL ret = FALSE; - ULONG disp; - - static const WCHAR winedll[] = {'w','i','n','e','.','d','l','l',0}; - - create_assembly("wine.dll"); - - hr = pCreateAssemblyCache(&cache, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - hr = IAssemblyCache_InstallAssembly(cache, 0, winedll, NULL); - if (hr == S_OK) - ret = TRUE; - else if (hr == CLDB_E_FILE_OLDVER) - win_skip("Tests can't be run on older .NET version (.NET 1.1)\n"); - else if (hr == E_ACCESSDENIED) - skip("Not enough rights to install an assembly\n"); - else - ok(0, "Expected S_OK, got %08x\n", hr); - - DeleteFileA("wine.dll"); - IAssemblyCache_UninstallAssembly(cache, 0, winedll, NULL, &disp); - IAssemblyCache_Release(cache); - return ret; -} - -static void test_CreateAssemblyCache(void) -{ - IAssemblyCache *cache; - HRESULT hr; - - /* NULL ppAsmCache */ - hr = pCreateAssemblyCache(NULL, 0); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - - /* dwReserved is non-zero */ - hr = pCreateAssemblyCache(&cache, 42); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - IAssemblyCache_Release(cache); -} - -static void test_InstallAssembly(void) -{ - IAssemblyCache *cache; - HRESULT hr; - ULONG disp; - DWORD attr; - char dllpath[MAX_PATH]; - UINT size; - - static const WCHAR empty[] = {0}; - static const WCHAR noext[] = {'f','i','l','e',0}; - static const WCHAR badext[] = {'f','i','l','e','.','b','a','d',0}; - static const WCHAR dllext[] = {'f','i','l','e','.','d','l','l',0}; - static const WCHAR exeext[] = {'f','i','l','e','.','e','x','e',0}; - static const WCHAR testdll[] = {'t','e','s','t','.','d','l','l',0}; - static const WCHAR winedll[] = {'w','i','n','e','.','d','l','l',0}; - static const WCHAR wine[] = {'w','i','n','e',0}; - - create_file("test.dll", 100); - create_assembly("wine.dll"); - - hr = pCreateAssemblyCache(&cache, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - /* NULL pszManifestFilePath */ - hr = IAssemblyCache_InstallAssembly(cache, 0, NULL, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - - /* empty pszManifestFilePath */ - hr = IAssemblyCache_InstallAssembly(cache, 0, empty, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - - /* pszManifestFilePath has no extension */ - hr = IAssemblyCache_InstallAssembly(cache, 0, noext, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), - "Expected HRESULT_FROM_WIN32(ERROR_INVALID_NAME), got %08x\n", hr); - - /* pszManifestFilePath has bad extension */ - hr = IAssemblyCache_InstallAssembly(cache, 0, badext, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), - "Expected HRESULT_FROM_WIN32(ERROR_INVALID_NAME), got %08x\n", hr); - - /* pszManifestFilePath has dll extension */ - hr = IAssemblyCache_InstallAssembly(cache, 0, dllext, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x\n", hr); - - /* pszManifestFilePath has exe extension */ - hr = IAssemblyCache_InstallAssembly(cache, 0, exeext, NULL); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x\n", hr); - - /* empty file */ - hr = IAssemblyCache_InstallAssembly(cache, 0, testdll, NULL); - ok(hr == COR_E_ASSEMBLYEXPECTED, - "Expected COR_E_ASSEMBLYEXPECTED, got %08x\n", hr); - - /* wine assembly */ - hr = IAssemblyCache_InstallAssembly(cache, 0, winedll, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - size = GetWindowsDirectoryA(dllpath, MAX_PATH); - strcat(dllpath, "\\assembly\\GAC_MSIL\\wine\\\\1.0.0.0__2d03617b1c31e2f5\\wine.dll"); - - attr = GetFileAttributes(dllpath); - ok(attr != INVALID_FILE_ATTRIBUTES, "Expected assembly to exist\n"); - - /* uninstall the assembly from the GAC */ - disp = 0xf00dbad; - hr = IAssemblyCache_UninstallAssembly(cache, 0, wine, NULL, &disp); - todo_wine - { - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(disp == IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED, - "Expected IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED, got %d\n", disp); - } - - /* FIXME: remove once UninstallAssembly is implemented */ - DeleteFileA(dllpath); - dllpath[size + sizeof("\\assembly\\GAC_MSIL\\wine\\1.0.0.0__2d03617b1c31e2f5")] = '\0'; - RemoveDirectoryA(dllpath); - dllpath[size + sizeof("\\assembly\\GAC_MSIL\\wine")] = '\0'; - RemoveDirectoryA(dllpath); - - DeleteFileA("test.dll"); - DeleteFileA("wine.dll"); - IAssemblyCache_Release(cache); -} - -#define INIT_ASM_INFO() \ - ZeroMemory(&info, sizeof(ASSEMBLY_INFO)); \ - info.cbAssemblyInfo = sizeof(ASSEMBLY_INFO); \ - info.pszCurrentAssemblyPathBuf = path; \ - info.cchBuf = MAX_PATH; \ - path[0] = '\0'; - -static void test_QueryAssemblyInfo(void) -{ - IAssemblyCache *cache; - ASSEMBLY_INFO info; - WCHAR path[MAX_PATH]; - WCHAR asmpath[MAX_PATH]; - WCHAR name[MAX_PATH]; - HRESULT hr; - DWORD size; - ULONG disp; - char dllpath[MAX_PATH]; - UINT len; - - static const WCHAR empty[] = {0}; - static const WCHAR commasep[] = {',',' ',0}; - static const WCHAR winedll[] = {'w','i','n','e','.','d','l','l',0}; - static const WCHAR wine[] = {'w','i','n','e',0}; - static const WCHAR ver[] = { - 'V','e','r','s','i','o','n','=','1','.','0','.','0','.','0',0}; - static const WCHAR otherver[] = { - 'V','e','r','s','i','o','n','=','1','.','0','.','0','.','0','0','0','0','0',0}; - static const WCHAR badver[] = { - 'V','e','r','s','i','o','n','=','1','.','0','.','0','.','1',0}; - static const WCHAR culture[] = { - 'C','u','l','t','u','r','e','=','n','e','u','t','r','a','l',0}; - static const WCHAR badculture[] = { - 'C','u','l','t','u','r','e','=','e','n',0}; - static const WCHAR pubkey[] = { - 'P','u','b','l','i','c','K','e','y','T','o','k','e','n','=', - '2','d','0','3','6','1','7','b','1','c','3','1','e','2','f','5',0}; - static const WCHAR badpubkey[] = { - 'P','u','b','l','i','c','K','e','y','T','o','k','e','n','=', - 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a',0}; - static const WCHAR badprop[] = {'B','a','d','P','r','o','p','=','b','u','h',0}; - static const WCHAR msil[] = { - '_','M','S','I','L','\\','w','i','n','e','\\', - '1','.','0','.','0','.','0','_','_','2','d','0','3','6','1','7','b', - '1','c','3','1','e','2','f','5','\\',0}; - - size = MAX_PATH; - hr = pGetCachePath(ASM_CACHE_GAC, asmpath, &size); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - lstrcatW(asmpath, msil); - lstrcatW(asmpath, winedll); - - create_assembly("wine.dll"); - - hr = pCreateAssemblyCache(&cache, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - /* assembly not installed yet */ - INIT_ASM_INFO(); - hr = IAssemblyCache_QueryAssemblyInfo(cache, 0, wine, &info); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x\n", hr); - ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == 0, "Expected 0, got %08x\n", info.dwAssemblyFlags); - ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); - ok(info.uliAssemblySizeInKB.u.LowPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart); - ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, empty), - "Assembly path was changed\n"); - ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %d\n", info.cchBuf); - - hr = IAssemblyCache_InstallAssembly(cache, 0, winedll, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - /* NULL pszAssemblyName */ - INIT_ASM_INFO(); - hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_VALIDATE, - NULL, &info); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == 0, "Expected 0, got %08x\n", info.dwAssemblyFlags); - ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); - ok(info.uliAssemblySizeInKB.u.LowPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart); - ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, empty), - "Assembly path was changed\n"); - ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %d\n", info.cchBuf); - - /* empty pszAssemblyName */ - INIT_ASM_INFO(); - hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_VALIDATE, - empty, &info); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == 0, "Expected 0, got %08x\n", info.dwAssemblyFlags); - ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); - ok(info.uliAssemblySizeInKB.u.LowPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart); - ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, empty), - "Assembly path was changed\n"); - ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %d\n", info.cchBuf); - - /* no dwFlags */ - INIT_ASM_INFO(); - hr = IAssemblyCache_QueryAssemblyInfo(cache, 0, wine, &info); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, - "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); - ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); - ok(info.uliAssemblySizeInKB.u.LowPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart); - todo_wine - { - ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, asmpath), - "Wrong assembly path returned\n"); - ok(info.cchBuf == lstrlenW(asmpath) + 1, - "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf); - } - - /* pwzCachePath is full filename */ - INIT_ASM_INFO(); - hr = IAssemblyCache_QueryAssemblyInfo(cache, 0, winedll, &info); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x\n", hr); - ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == 0, "Expected 0, got %08x\n", info.dwAssemblyFlags); - ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); - ok(info.uliAssemblySizeInKB.u.LowPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart); - ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, empty), - "Assembly path was changed\n"); - ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %d\n", info.cchBuf); - - /* NULL pAsmInfo, QUERYASMINFO_FLAG_VALIDATE */ - hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_VALIDATE, - wine, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - /* NULL pAsmInfo, QUERYASMINFO_FLAG_GETSIZE */ - hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, - wine, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - /* info.cbAssemblyInfo is 0 */ - INIT_ASM_INFO(); - info.cbAssemblyInfo = 0; - hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_VALIDATE, - wine, &info); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, - "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); - ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); - ok(info.uliAssemblySizeInKB.u.LowPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart); - todo_wine - { - ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, asmpath), - "Wrong assembly path returned\n"); - ok(info.cchBuf == lstrlenW(asmpath) + 1, - "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf); - } - - /* info.cbAssemblyInfo is 1 */ - INIT_ASM_INFO(); - info.cbAssemblyInfo = 1; - hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_VALIDATE, - wine, &info); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - ok(info.cbAssemblyInfo == 1, "Expected 1, got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == 0, "Expected 0, got %08x\n", info.dwAssemblyFlags); - ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); - ok(info.uliAssemblySizeInKB.u.LowPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart); - ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, empty), - "Assembly path was changed\n"); - ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %d\n", info.cchBuf); - - /* info.cbAssemblyInfo is > sizeof(ASSEMBLY_INFO) */ - INIT_ASM_INFO(); - info.cbAssemblyInfo = sizeof(ASSEMBLY_INFO) * 2; - hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, - wine, &info); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO) * 2, - "Expected sizeof(ASSEMBLY_INFO) * 2, got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == 0, "Expected 0, got %08x\n", info.dwAssemblyFlags); - ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); - ok(info.uliAssemblySizeInKB.u.LowPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart); - ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, empty), - "Assembly path was changed\n"); - ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %d\n", info.cchBuf); - - /* QUERYASMINFO_FLAG_GETSIZE */ - INIT_ASM_INFO(); - hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, - wine, &info); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, - "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); - ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); - todo_wine - { - /* win9x: 32 */ - ok((info.uliAssemblySizeInKB.u.LowPart == 4) || - broken(info.uliAssemblySizeInKB.u.LowPart == 32), - "Expected 4, got %d\n", info.uliAssemblySizeInKB.u.LowPart); - ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, asmpath), - "Wrong assembly path returned\n"); - ok(info.cchBuf == lstrlenW(asmpath) + 1, - "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf); - } - - /* QUERYASMINFO_FLAG_GETSIZE and QUERYASMINFO_FLAG_VALIDATE */ - INIT_ASM_INFO(); - hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE | - QUERYASMINFO_FLAG_VALIDATE,wine, &info); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, - "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); - ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); - todo_wine - { - /* win9x: 32 */ - ok((info.uliAssemblySizeInKB.u.LowPart == 4) || - broken(info.uliAssemblySizeInKB.u.LowPart == 32), - "Expected 4, got %d\n", info.uliAssemblySizeInKB.u.LowPart); - ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, asmpath), - "Wrong assembly path returned\n"); - ok(info.cchBuf == lstrlenW(asmpath) + 1, - "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf); - } - - /* info.pszCurrentAssemblyPathBuf is NULL */ - INIT_ASM_INFO(); - info.pszCurrentAssemblyPathBuf = NULL; - hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, - wine, &info); - ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, - "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); - ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); - todo_wine - { - ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), - "Expected HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), got %08x\n", hr); - /* win9x: 32 */ - ok((info.uliAssemblySizeInKB.u.LowPart == 4) || - broken(info.uliAssemblySizeInKB.u.LowPart == 32), - "Expected 4, got %d\n", info.uliAssemblySizeInKB.u.LowPart); - ok(info.cchBuf == lstrlenW(asmpath) + 1, - "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf); - } - - /* info.cchBuf is exactly size of asmpath */ - INIT_ASM_INFO(); - info.cchBuf = lstrlenW(asmpath); - hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, - wine, &info); - ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, - "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); - ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); - ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, empty), - "Assembly path was changed\n"); - todo_wine - { - ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), - "Expected HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), got %08x\n", hr); - /* win9x: 32 */ - ok((info.uliAssemblySizeInKB.u.LowPart == 4) || - broken(info.uliAssemblySizeInKB.u.LowPart == 32), - "Expected 4, got %d\n", info.uliAssemblySizeInKB.u.LowPart); - ok(info.cchBuf == lstrlenW(asmpath) + 1, - "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf); - } - - /* info.cchBuf has room for NULL-terminator */ - INIT_ASM_INFO(); - info.cchBuf = lstrlenW(asmpath) + 1; - hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, - wine, &info); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, - "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); - ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); - ok(info.cchBuf == lstrlenW(asmpath) + 1, - "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf); - todo_wine - { - /* win9x: 32 */ - ok((info.uliAssemblySizeInKB.u.LowPart == 4) || - broken(info.uliAssemblySizeInKB.u.LowPart == 32), - "Expected 4, got %d\n", info.uliAssemblySizeInKB.u.LowPart); - ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, asmpath), - "Wrong assembly path returned\n"); - } - - /* display name is "wine, Version=1.0.0.0" */ - INIT_ASM_INFO(); - lstrcpyW(name, wine); - lstrcatW(name, commasep); - lstrcatW(name, ver); - hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, - name, &info); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, - "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); - ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); - todo_wine - { - /* win9x: 32 */ - ok((info.uliAssemblySizeInKB.u.LowPart == 4) || - broken(info.uliAssemblySizeInKB.u.LowPart == 32), - "Expected 4, got %d\n", info.uliAssemblySizeInKB.u.LowPart); - ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, asmpath), - "Wrong assembly path returned\n"); - ok(info.cchBuf == lstrlenW(asmpath) + 1, - "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf); - } - - /* display name is "wine, Version=1.0.0.00000" */ - INIT_ASM_INFO(); - lstrcpyW(name, wine); - lstrcatW(name, commasep); - lstrcatW(name, otherver); - hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, - name, &info); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, - "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); - ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); - todo_wine - { - /* win9x: 32 */ - ok((info.uliAssemblySizeInKB.u.LowPart == 4) || - broken(info.uliAssemblySizeInKB.u.LowPart == 32), - "Expected 4, got %d\n", info.uliAssemblySizeInKB.u.LowPart); - ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, asmpath), - "Wrong assembly path returned\n"); - ok(info.cchBuf == lstrlenW(asmpath) + 1, - "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf); - } - - /* display name is "wine, Version=1.0.0.1", versions don't match */ - INIT_ASM_INFO(); - lstrcpyW(name, wine); - lstrcatW(name, commasep); - lstrcatW(name, badver); - hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, - name, &info); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x\n", hr); - ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == 0, "Expected 0, got %08x\n", info.dwAssemblyFlags); - ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); - ok(info.uliAssemblySizeInKB.u.LowPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart); - ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, empty), - "Assembly path was changed\n"); - ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %d\n", info.cchBuf); - - /* display name is "wine, Culture=neutral" */ - INIT_ASM_INFO(); - lstrcpyW(name, wine); - lstrcatW(name, commasep); - lstrcatW(name, culture); - hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, - name, &info); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, - "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); - ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); - todo_wine - { - /* win9x: 32 */ - ok((info.uliAssemblySizeInKB.u.LowPart == 4) || - broken(info.uliAssemblySizeInKB.u.LowPart == 32), - "Expected 4, got %d\n", info.uliAssemblySizeInKB.u.LowPart); - ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, asmpath), - "Wrong assembly path returned\n"); - ok(info.cchBuf == lstrlenW(asmpath) + 1, - "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf); - } - - /* display name is "wine, Culture=en", cultures don't match */ - INIT_ASM_INFO(); - lstrcpyW(name, wine); - lstrcatW(name, commasep); - lstrcatW(name, badculture); - hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, - name, &info); - todo_wine - { - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x\n", hr); - ok(info.dwAssemblyFlags == 0, "Expected 0, got %08x\n", info.dwAssemblyFlags); - } - ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); - ok(info.uliAssemblySizeInKB.u.LowPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart); - ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, empty), - "Assembly path was changed\n"); - ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %d\n", info.cchBuf); - - /* display name is "wine, PublicKeyTokens=2d03617b1c31e2f5" */ - INIT_ASM_INFO(); - lstrcpyW(name, wine); - lstrcatW(name, commasep); - lstrcatW(name, pubkey); - hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, - name, &info); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, - "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); - ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); - todo_wine - { - /* win9x: 32 */ - ok((info.uliAssemblySizeInKB.u.LowPart == 4) || - broken(info.uliAssemblySizeInKB.u.LowPart == 32), - "Expected 4, got %d\n", info.uliAssemblySizeInKB.u.LowPart); - ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, asmpath), - "Wrong assembly path returned\n"); - ok(info.cchBuf == lstrlenW(asmpath) + 1, - "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf); - } - - /* display name is "wine, PublicKeyToken=aaaaaaaaaaaaaaaa", pubkeys don't match */ - INIT_ASM_INFO(); - lstrcpyW(name, wine); - lstrcatW(name, commasep); - lstrcatW(name, badpubkey); - hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, - name, &info); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x\n", hr); - ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == 0, "Expected 0, got %08x\n", info.dwAssemblyFlags); - ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); - ok(info.uliAssemblySizeInKB.u.LowPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.LowPart); - ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, empty), - "Assembly path was changed\n"); - ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %d\n", info.cchBuf); - - /* display name is "wine, BadProp=buh", bad property */ - INIT_ASM_INFO(); - lstrcpyW(name, wine); - lstrcatW(name, commasep); - lstrcatW(name, badprop); - hr = IAssemblyCache_QueryAssemblyInfo(cache, QUERYASMINFO_FLAG_GETSIZE, - name, &info); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), - "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); - ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, - "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); - ok(info.uliAssemblySizeInKB.u.HighPart == 0, - "Expected 0, got %d\n", info.uliAssemblySizeInKB.u.HighPart); - todo_wine - { - /* win9x: 32 */ - ok((info.uliAssemblySizeInKB.u.LowPart == 4) || - broken(info.uliAssemblySizeInKB.u.LowPart == 32), - "Expected 4, got %d\n", info.uliAssemblySizeInKB.u.LowPart); - ok(!lstrcmpW(info.pszCurrentAssemblyPathBuf, asmpath), - "Wrong assembly path returned\n"); - ok(info.cchBuf == lstrlenW(asmpath) + 1, - "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf); - } - - /* uninstall the assembly from the GAC */ - disp = 0xf00dbad; - hr = IAssemblyCache_UninstallAssembly(cache, 0, wine, NULL, &disp); - todo_wine - { - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(disp == IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED, - "Expected IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED, got %d\n", disp); - } - - /* FIXME: remove once UninstallAssembly is implemented */ - len = GetWindowsDirectoryA(dllpath, MAX_PATH); - strcat(dllpath, "\\assembly\\GAC_MSIL\\wine\\\\1.0.0.0__2d03617b1c31e2f5\\wine.dll"); - DeleteFileA(dllpath); - dllpath[len + sizeof("\\assembly\\GAC_MSIL\\wine\\1.0.0.0__2d03617b1c31e2f5")] = '\0'; - RemoveDirectoryA(dllpath); - dllpath[len + sizeof("\\assembly\\GAC_MSIL\\wine")] = '\0'; - RemoveDirectoryA(dllpath); - - DeleteFileA("test.dll"); - DeleteFileA("wine.dll"); - IAssemblyCache_Release(cache); -} - -START_TEST(asmcache) -{ - if (!init_functionpointers()) - return; - - if (!check_dotnet20()) - return; - - test_CreateAssemblyCache(); - test_InstallAssembly(); - test_QueryAssemblyInfo(); -} diff --git a/rostests/winetests/fusion/asmenum.c b/rostests/winetests/fusion/asmenum.c deleted file mode 100644 index cb6ea3dfdeb..00000000000 --- a/rostests/winetests/fusion/asmenum.c +++ /dev/null @@ -1,677 +0,0 @@ -/* - * Copyright 2008 James Hawkins - * - * 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 - -#include - -#include -#include -#include -#include -#include - -#include "wine/test.h" -#include "wine/list.h" - -static HRESULT (WINAPI *pCreateAssemblyEnum)(IAssemblyEnum **pEnum, - IUnknown *pUnkReserved, - IAssemblyName *pName, - DWORD dwFlags, LPVOID pvReserved); -static HRESULT (WINAPI *pCreateAssemblyNameObject)(LPASSEMBLYNAME *ppAssemblyNameObj, - LPCWSTR szAssemblyName, DWORD dwFlags, - LPVOID pvReserved); -static HRESULT (WINAPI *pGetCachePath)(ASM_CACHE_FLAGS dwCacheFlags, - LPWSTR pwzCachePath, PDWORD pcchPath); -static HRESULT (WINAPI *pLoadLibraryShim)(LPCWSTR szDllName, LPCWSTR szVersion, - LPVOID pvReserved, HMODULE *phModDll); - -static BOOL init_functionpointers(void) -{ - HRESULT hr; - HMODULE hfusion; - HMODULE hmscoree; - - static const WCHAR szFusion[] = {'f','u','s','i','o','n','.','d','l','l',0}; - - hmscoree = LoadLibraryA("mscoree.dll"); - if (!hmscoree) - { - win_skip("mscoree.dll not available\n"); - return FALSE; - } - - pLoadLibraryShim = (void *)GetProcAddress(hmscoree, "LoadLibraryShim"); - if (!pLoadLibraryShim) - { - win_skip("LoadLibraryShim not available\n"); - FreeLibrary(hmscoree); - return FALSE; - } - - hr = pLoadLibraryShim(szFusion, NULL, NULL, &hfusion); - if (FAILED(hr)) - { - win_skip("fusion.dll not available\n"); - FreeLibrary(hmscoree); - return FALSE; - } - - pCreateAssemblyEnum = (void *)GetProcAddress(hfusion, "CreateAssemblyEnum"); - pCreateAssemblyNameObject = (void *)GetProcAddress(hfusion, "CreateAssemblyNameObject"); - pGetCachePath = (void *)GetProcAddress(hfusion, "GetCachePath"); - - if (!pCreateAssemblyEnum || - !pCreateAssemblyNameObject || !pGetCachePath) - { - win_skip("fusion.dll not implemented\n"); - return FALSE; - } - - FreeLibrary(hmscoree); - return TRUE; -} - -static inline void to_widechar(LPWSTR dest, LPCSTR src) -{ - MultiByteToWideChar(CP_ACP, 0, src, -1, dest, MAX_PATH); -} - -static inline void to_multibyte(LPSTR dest, LPWSTR src) -{ - WideCharToMultiByte(CP_ACP, 0, src, -1, dest, MAX_PATH, NULL, NULL); -} - -static BOOL create_full_path(LPCSTR path) -{ - LPSTR new_path; - BOOL ret = TRUE; - int len; - - new_path = HeapAlloc(GetProcessHeap(), 0, lstrlenA(path) + 1); - if (!new_path) - return FALSE; - - lstrcpyA(new_path, path); - - while ((len = lstrlenA(new_path)) && new_path[len - 1] == '\\') - new_path[len - 1] = 0; - - while (!CreateDirectoryA(new_path, NULL)) - { - LPSTR slash; - DWORD last_error = GetLastError(); - - if(last_error == ERROR_ALREADY_EXISTS) - break; - - if(last_error != ERROR_PATH_NOT_FOUND) - { - ret = FALSE; - break; - } - - if(!(slash = strrchr(new_path, '\\'))) - { - ret = FALSE; - break; - } - - len = slash - new_path; - new_path[len] = 0; - if(!create_full_path(new_path)) - { - ret = FALSE; - break; - } - - new_path[len] = '\\'; - } - - HeapFree(GetProcessHeap(), 0, new_path); - return ret; -} - -static void create_file_data(LPCSTR name, LPCSTR data, DWORD size) -{ - HANDLE file; - DWORD written; - - file = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "Failure to open file %s\n", name); - WriteFile(file, data, strlen(data), &written, NULL); - - if (size) - { - SetFilePointer(file, size, NULL, FILE_BEGIN); - SetEndOfFile(file); - } - - CloseHandle(file); -} - -#define create_file(name, size) create_file_data(name, name, size) - -static void test_CreateAssemblyEnum(void) -{ - HRESULT hr; - WCHAR namestr[MAX_PATH]; - IAssemblyEnum *asmenum; - IAssemblyName *asmname; - - to_widechar(namestr, "wine"); - asmname = NULL; - hr = pCreateAssemblyNameObject(&asmname, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(asmname != NULL, "Expected non-NULL asmname\n"); - - /* pEnum is NULL */ - if (0) - { - /* Crashes on .NET 1.x */ - hr = pCreateAssemblyEnum(NULL, NULL, asmname, ASM_CACHE_GAC, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - } - - /* pName is NULL */ - asmenum = NULL; - hr = pCreateAssemblyEnum(&asmenum, NULL, NULL, ASM_CACHE_GAC, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(asmenum != NULL, "Expected non-NULL asmenum\n"); - - IAssemblyEnum_Release(asmenum); - - /* dwFlags is ASM_CACHE_ROOT */ - asmenum = (IAssemblyEnum *)0xdeadbeef; - hr = pCreateAssemblyEnum(&asmenum, NULL, NULL, ASM_CACHE_ROOT, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - ok(asmenum == (IAssemblyEnum *)0xdeadbeef, - "Expected asmenum to be unchanged, got %p\n", asmenum); - - /* invalid dwFlags */ - asmenum = (IAssemblyEnum *)0xdeadbeef; - hr = pCreateAssemblyEnum(&asmenum, NULL, NULL, 0, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - ok(asmenum == (IAssemblyEnum *)0xdeadbeef, - "Expected asmenum to be unchanged, got %p\n", asmenum); - - IAssemblyName_Release(asmname); -} - -typedef struct _tagASMNAME -{ - struct list entry; - LPSTR data; -} ASMNAME; - -static BOOL enum_gac_assemblies(struct list *assemblies, int depth, LPSTR path) -{ - WIN32_FIND_DATAA ffd; - CHAR buf[MAX_PATH]; - CHAR disp[MAX_PATH]; - ASMNAME *name; - HANDLE hfind; - LPSTR ptr; - - static CHAR parent[MAX_PATH]; - - sprintf(buf, "%s\\*", path); - hfind = FindFirstFileA(buf, &ffd); - if (hfind == INVALID_HANDLE_VALUE) - return FALSE; - - do - { - if (!lstrcmpA(ffd.cFileName, ".") || !lstrcmpA(ffd.cFileName, "..")) - continue; - - if (depth == 0) - { - lstrcpyA(parent, ffd.cFileName); - } - else if (depth == 1) - { - char culture[MAX_PATH]; - char dll[MAX_PATH], exe[MAX_PATH]; - - /* Directories with no dll or exe will not be enumerated */ - sprintf(dll, "%s\\%s\\%s.dll", path, ffd.cFileName, parent); - sprintf(exe, "%s\\%s\\%s.exe", path, ffd.cFileName, parent); - if (GetFileAttributesA(dll) == INVALID_FILE_ATTRIBUTES && - GetFileAttributesA(exe) == INVALID_FILE_ATTRIBUTES) - continue; - - ptr = strstr(ffd.cFileName, "_"); - *ptr = '\0'; - ptr++; - - if (*ptr != '_') - { - lstrcpyA(culture, ptr); - *strstr(culture, "_") = '\0'; - } - else - lstrcpyA(culture, "neutral"); - - ptr = strchr(ptr, '_'); - ptr++; - sprintf(buf, ", Version=%s, Culture=%s, PublicKeyToken=%s", - ffd.cFileName, culture, ptr); - lstrcpyA(disp, parent); - lstrcatA(disp, buf); - - name = HeapAlloc(GetProcessHeap(), 0, sizeof(ASMNAME)); - name->data = HeapAlloc(GetProcessHeap(), 0, lstrlenA(disp) + 1); - lstrcpyA(name->data, disp); - list_add_tail(assemblies, &name->entry); - - continue; - } - - sprintf(buf, "%s\\%s", path, ffd.cFileName); - enum_gac_assemblies(assemblies, depth + 1, buf); - } while (FindNextFileA(hfind, &ffd) != 0); - - FindClose(hfind); - return TRUE; -} - -static void test_enumerate(void) -{ - struct list assemblies = LIST_INIT(assemblies); - struct list *item, *cursor; - IAssemblyEnum *asmenum; - IAssemblyName *next; - WCHAR buf[MAX_PATH]; - CHAR path[MAX_PATH]; - CHAR disp[MAX_PATH]; - HRESULT hr; - BOOL found; - DWORD size; - - size = MAX_PATH; - hr = pGetCachePath(ASM_CACHE_GAC, buf, &size); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - to_multibyte(path, buf); - lstrcatA(path, "_32"); - enum_gac_assemblies(&assemblies, 0, path); - - to_multibyte(path, buf); - lstrcatA(path, "_64"); - enum_gac_assemblies(&assemblies, 0, path); - - to_multibyte(path, buf); - lstrcatA(path, "_MSIL"); - enum_gac_assemblies(&assemblies, 0, path); - - to_multibyte(path, buf); - enum_gac_assemblies(&assemblies, 0, path); - - asmenum = NULL; - hr = pCreateAssemblyEnum(&asmenum, NULL, NULL, ASM_CACHE_GAC, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(asmenum != NULL, "Expected non-NULL asmenum\n"); - - while (IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0) == S_OK) - { - size = MAX_PATH; - IAssemblyName_GetDisplayName(next, buf, &size, 0); - to_multibyte(disp, buf); - - found = FALSE; - LIST_FOR_EACH_SAFE(item, cursor, &assemblies) - { - ASMNAME *asmname = LIST_ENTRY(item, ASMNAME, entry); - - if (!lstrcmpA(asmname->data, disp)) - { - found = TRUE; - - list_remove(&asmname->entry); - HeapFree(GetProcessHeap(), 0, asmname->data); - HeapFree(GetProcessHeap(), 0, asmname); - break; - } - } - - ok(found, "Extra assembly enumerated: %s\n", disp); - IAssemblyName_Release(next); - } - - /* enumeration is exhausted */ - next = (IAssemblyName *)0xdeadbeef; - hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); - ok(next == (IAssemblyName *)0xdeadbeef, - "Expected next to be unchanged, got %p\n", next); - - LIST_FOR_EACH_SAFE(item, cursor, &assemblies) - { - ASMNAME *asmname = LIST_ENTRY(item, ASMNAME, entry); - - ok(FALSE, "Assembly not enumerated: %s\n", asmname->data); - - list_remove(&asmname->entry); - HeapFree(GetProcessHeap(), 0, asmname->data); - HeapFree(GetProcessHeap(), 0, asmname); - } - - IAssemblyEnum_Release(asmenum); -} - -static void test_enumerate_name(void) -{ - IAssemblyEnum *asmenum; - IAssemblyName *asmname, *next; - WCHAR buf[MAX_PATH]; - CHAR gac[MAX_PATH]; - CHAR path[MAX_PATH]; - CHAR disp[MAX_PATH]; - WCHAR namestr[MAX_PATH]; - CHAR exp[6][MAX_PATH]; - HRESULT hr; - DWORD size; - - lstrcpyA(exp[0], "wine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=16a3fcd171e93a8d"); - lstrcpyA(exp[1], "wine, Version=1.0.1.2, Culture=neutral, PublicKeyToken=123456789abcdef0"); - lstrcpyA(exp[2], "wine, Version=1.0.1.2, Culture=neutral, PublicKeyToken=16a3fcd171e93a8d"); - lstrcpyA(exp[3], "Wine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=16a3fcd171e93a8d"); - lstrcpyA(exp[4], "Wine, Version=1.0.1.2, Culture=neutral, PublicKeyToken=123456789abcdef0"); - lstrcpyA(exp[5], "Wine, Version=1.0.1.2, Culture=neutral, PublicKeyToken=16a3fcd171e93a8d"); - - size = MAX_PATH; - hr = pGetCachePath(ASM_CACHE_GAC, buf, &size); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - to_multibyte(gac, buf); - create_full_path(gac); - - sprintf(path, "%s\\Wine", gac); - CreateDirectoryA(path, NULL); - - sprintf(path, "%s\\Wine\\1.0.0.0__16a3fcd171e93a8d", gac); - CreateDirectoryA(path, NULL); - - lstrcatA(path, "\\Wine.dll"); - create_file(path, 100); - - sprintf(path, "%s\\Wine\\1.0.1.2__16a3fcd171e93a8d", gac); - CreateDirectoryA(path, NULL); - - lstrcatA(path, "\\Wine.dll"); - create_file(path, 100); - - sprintf(path, "%s\\Wine\\1.0.1.2__123456789abcdef0", gac); - CreateDirectoryA(path, NULL); - - lstrcatA(path, "\\Wine.dll"); - create_file(path, 100); - - /* test case sensitivity */ - to_widechar(namestr, "wine"); - asmname = NULL; - hr = pCreateAssemblyNameObject(&asmname, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(asmname != NULL, "Expected non-NULL asmname\n"); - - asmenum = NULL; - hr = pCreateAssemblyEnum(&asmenum, NULL, asmname, ASM_CACHE_GAC, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(asmenum != NULL, "Expected non-NULL asmenum\n"); - - next = NULL; - hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(next != NULL, "Expected non-NULL next\n"); - - size = MAX_PATH; - hr = IAssemblyName_GetDisplayName(next, buf, &size, 0); - to_multibyte(disp, buf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpA(disp, exp[0]), - "Expected \"%s\" or \"%s\", got \"%s\"\n", exp[0], exp[1], disp); - - IAssemblyName_Release(next); - - next = NULL; - hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(next != NULL, "Expected non-NULL next\n"); - - size = MAX_PATH; - hr = IAssemblyName_GetDisplayName(next, buf, &size, 0); - to_multibyte(disp, buf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpA(disp, exp[1]) || - !lstrcmpA(disp, exp[2]), /* Win98 */ - "Expected \"%s\" or \"%s\", got \"%s\"\n", exp[1], exp[2], disp); - - IAssemblyName_Release(next); - - next = NULL; - hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(next != NULL, "Expected non-NULL next\n"); - - size = MAX_PATH; - hr = IAssemblyName_GetDisplayName(next, buf, &size, 0); - to_multibyte(disp, buf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpA(disp, exp[2]) || - !lstrcmpA(disp, exp[1]), /* Win98 */ - "Expected \"%s\" or \"%s\", got \"%s\"\n", exp[2], exp[1], disp); - - IAssemblyName_Release(next); - - next = (IAssemblyName *)0xdeadbeef; - hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); - ok(next == (IAssemblyName *)0xdeadbeef, - "Expected next to be unchanged, got %p\n", next); - - IAssemblyEnum_Release(asmenum); - IAssemblyName_Release(asmname); - - /* only Version */ - to_widechar(namestr, "Wine, Version=1.0.1.2"); - asmname = NULL; - hr = pCreateAssemblyNameObject(&asmname, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(asmname != NULL, "Expected non-NULL asmname\n"); - - asmenum = NULL; - hr = pCreateAssemblyEnum(&asmenum, NULL, asmname, ASM_CACHE_GAC, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(asmenum != NULL, "Expected non-NULL asmenum\n"); - - next = NULL; - hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(next != NULL, "Expected non-NULL next\n"); - - size = MAX_PATH; - hr = IAssemblyName_GetDisplayName(next, buf, &size, 0); - to_multibyte(disp, buf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpA(disp, exp[4]) || - !lstrcmpA(disp, exp[5]), /* Win98 */ - "Expected \"%s\" or \"%s\", got \"%s\"\n", exp[4], exp[5], disp); - - IAssemblyName_Release(next); - - next = NULL; - hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(next != NULL, "Expected non-NULL next\n"); - - size = MAX_PATH; - hr = IAssemblyName_GetDisplayName(next, buf, &size, 0); - to_multibyte(disp, buf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpA(disp, exp[5]) || - !lstrcmpA(disp, exp[4]), /* Win98 */ - "Expected \"%s\" or \"%s\", got \"%s\"\n", exp[5], exp[4], disp); - - IAssemblyName_Release(next); - - next = (IAssemblyName *)0xdeadbeef; - hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); - ok(next == (IAssemblyName *)0xdeadbeef, - "Expected next to be unchanged, got %p\n", next); - - IAssemblyEnum_Release(asmenum); - IAssemblyName_Release(asmname); - - /* only PublicKeyToken */ - to_widechar(namestr, "Wine, PublicKeyToken=16a3fcd171e93a8d"); - asmname = NULL; - hr = pCreateAssemblyNameObject(&asmname, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(asmname != NULL, "Expected non-NULL asmname\n"); - - asmenum = NULL; - hr = pCreateAssemblyEnum(&asmenum, NULL, asmname, ASM_CACHE_GAC, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(asmenum != NULL, "Expected non-NULL asmenum\n"); - - next = NULL; - hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(next != NULL, "Expected non-NULL next\n"); - - size = MAX_PATH; - hr = IAssemblyName_GetDisplayName(next, buf, &size, 0); - to_multibyte(disp, buf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpA(disp, exp[3]), "Expected \"%s\", got \"%s\"\n", exp[3], disp); - - IAssemblyName_Release(next); - - next = NULL; - hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(next != NULL, "Expected non-NULL next\n"); - - size = MAX_PATH; - hr = IAssemblyName_GetDisplayName(next, buf, &size, 0); - to_multibyte(disp, buf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpA(disp, exp[5]), "Expected \"%s\", got \"%s\"\n", exp[5], disp); - - IAssemblyName_Release(next); - - next = (IAssemblyName *)0xdeadbeef; - hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); - ok(next == (IAssemblyName *)0xdeadbeef, - "Expected next to be unchanged, got %p\n", next); - - IAssemblyEnum_Release(asmenum); - IAssemblyName_Release(asmname); - - /* only Culture */ - to_widechar(namestr, "wine, Culture=neutral"); - asmname = NULL; - hr = pCreateAssemblyNameObject(&asmname, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(asmname != NULL, "Expected non-NULL asmname\n"); - - asmenum = NULL; - hr = pCreateAssemblyEnum(&asmenum, NULL, asmname, ASM_CACHE_GAC, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(asmenum != NULL, "Expected non-NULL asmenum\n"); - - next = NULL; - hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(next != NULL, "Expected non-NULL next\n"); - - size = MAX_PATH; - hr = IAssemblyName_GetDisplayName(next, buf, &size, 0); - to_multibyte(disp, buf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpA(disp, exp[0]), "Expected \"%s\", got \"%s\"\n", exp[0], disp); - - IAssemblyName_Release(next); - - next = NULL; - hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(next != NULL, "Expected non-NULL next\n"); - - size = MAX_PATH; - hr = IAssemblyName_GetDisplayName(next, buf, &size, 0); - to_multibyte(disp, buf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpA(disp, exp[1]) || - !lstrcmpA(disp, exp[2]), /* Win98 */ - "Expected \"%s\" or \"%s\", got \"%s\"\n", exp[1], exp[2], disp); - - IAssemblyName_Release(next); - - next = NULL; - hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(next != NULL, "Expected non-NULL next\n"); - - size = MAX_PATH; - hr = IAssemblyName_GetDisplayName(next, buf, &size, 0); - to_multibyte(disp, buf); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpA(disp, exp[2]) || - !lstrcmpA(disp, exp[1]), /* Win98 */ - "Expected \"%s\" or \"%s\", got \"%s\"\n", exp[2], exp[1], disp); - - IAssemblyName_Release(next); - - next = (IAssemblyName *)0xdeadbeef; - hr = IAssemblyEnum_GetNextAssembly(asmenum, NULL, &next, 0); - ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); - ok(next == (IAssemblyName *)0xdeadbeef, - "Expected next to be unchanged, got %p\n", next); - - IAssemblyEnum_Release(asmenum); - IAssemblyName_Release(asmname); - - sprintf(path, "%s\\Wine\\1.0.0.0__16a3fcd171e93a8d\\Wine.dll", gac); - DeleteFileA(path); - sprintf(path, "%s\\Wine\\1.0.1.2__16a3fcd171e93a8d\\Wine.dll", gac); - DeleteFileA(path); - sprintf(path, "%s\\Wine\\1.0.1.2__123456789abcdef0\\Wine.dll", gac); - DeleteFileA(path); - sprintf(path, "%s\\Wine\\1.0.0.0__16a3fcd171e93a8d", gac); - RemoveDirectoryA(path); - sprintf(path, "%s\\Wine\\1.0.1.2__16a3fcd171e93a8d", gac); - RemoveDirectoryA(path); - sprintf(path, "%s\\Wine\\1.0.1.2__123456789abcdef0", gac); - RemoveDirectoryA(path); - sprintf(path, "%s\\Wine", gac); - RemoveDirectoryA(path); -} - -START_TEST(asmenum) -{ - if (!init_functionpointers()) - return; - - test_CreateAssemblyEnum(); - test_enumerate(); - test_enumerate_name(); -} diff --git a/rostests/winetests/fusion/asmname.c b/rostests/winetests/fusion/asmname.c deleted file mode 100644 index 824837b25fc..00000000000 --- a/rostests/winetests/fusion/asmname.c +++ /dev/null @@ -1,818 +0,0 @@ -/* - * Copyright 2008 James Hawkins - * - * 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 - -#include - -#include -#include -#include -#include - -#include "wine/test.h" - -/* ok-like statement which takes two unicode strings or one unicode and one ANSI string as arguments */ -static CHAR string1[MAX_PATH]; - -#define ok_aw(aString, wString) \ - WideCharToMultiByte(CP_ACP, 0, wString, -1, string1, MAX_PATH, NULL, NULL); \ - if (lstrcmpA(string1, aString) != 0) \ - ok(0, "Expected \"%s\", got \"%s\"\n", aString, string1); - -static HRESULT (WINAPI *pCreateAssemblyNameObject)(LPASSEMBLYNAME *ppAssemblyNameObj, - LPCWSTR szAssemblyName, DWORD dwFlags, - LPVOID pvReserved); -static HRESULT (WINAPI *pLoadLibraryShim)(LPCWSTR szDllName, LPCWSTR szVersion, - LPVOID pvReserved, HMODULE *phModDll); - -static BOOL init_functionpointers(void) -{ - HRESULT hr; - HMODULE hfusion; - HMODULE hmscoree; - - static const WCHAR szFusion[] = {'f','u','s','i','o','n','.','d','l','l',0}; - - hmscoree = LoadLibraryA("mscoree.dll"); - if (!hmscoree) - return FALSE; - - pLoadLibraryShim = (void *)GetProcAddress(hmscoree, "LoadLibraryShim"); - if (!pLoadLibraryShim) - { - FreeLibrary(hmscoree); - return FALSE; - } - - hr = pLoadLibraryShim(szFusion, NULL, NULL, &hfusion); - if (FAILED(hr)) - return FALSE; - - pCreateAssemblyNameObject = (void *)GetProcAddress(hfusion, "CreateAssemblyNameObject"); - if (!pCreateAssemblyNameObject) - return FALSE; - - return TRUE; -} - -typedef struct _tagASMPROP_RES -{ - HRESULT hr; - CHAR val[MAX_PATH]; - DWORD size; -} ASMPROP_RES; - -static const ASMPROP_RES defaults[ASM_NAME_MAX_PARAMS] = -{ - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_FALSE, "", MAX_PATH}, - {S_FALSE, "", MAX_PATH}, - {S_OK, "", 0}, - {S_OK, "", MAX_PATH}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0} -}; - -static const ASMPROP_RES emptyname[ASM_NAME_MAX_PARAMS] = -{ - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 2}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_FALSE, "", MAX_PATH}, - {S_FALSE, "", MAX_PATH}, - {S_OK, "", 0}, - {S_OK, "", MAX_PATH}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0} -}; - -static const ASMPROP_RES winename[ASM_NAME_MAX_PARAMS] = -{ - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "wine", 10}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_FALSE, "", MAX_PATH}, - {S_FALSE, "", MAX_PATH}, - {S_OK, "", 0}, - {S_OK, "", MAX_PATH}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0} -}; - -static const ASMPROP_RES vername[ASM_NAME_MAX_PARAMS] = -{ - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "wine", 10}, - {S_OK, "\x01", 2}, - {S_OK, "\x02", 2}, - {S_OK, "\x03", 2}, - {S_OK, "\x04", 2}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_FALSE, "", MAX_PATH}, - {S_FALSE, "", MAX_PATH}, - {S_OK, "", 0}, - {S_OK, "", MAX_PATH}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0} -}; - -static const ASMPROP_RES badvername[ASM_NAME_MAX_PARAMS] = -{ - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "wine", 10}, - {S_OK, "\x01", 2}, - {S_OK, "\x05", 2}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_FALSE, "", MAX_PATH}, - {S_FALSE, "", MAX_PATH}, - {S_OK, "", 0}, - {S_OK, "", MAX_PATH}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0} -}; - -static const ASMPROP_RES neutralname[ASM_NAME_MAX_PARAMS] = -{ - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "wine", 10}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 2}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_FALSE, "", MAX_PATH}, - {S_FALSE, "", MAX_PATH}, - {S_OK, "", 0}, - {S_OK, "", MAX_PATH}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0} -}; - -static const ASMPROP_RES enname[ASM_NAME_MAX_PARAMS] = -{ - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "wine", 10}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "en", 6}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_FALSE, "", MAX_PATH}, - {S_FALSE, "", MAX_PATH}, - {S_OK, "", 0}, - {S_OK, "", MAX_PATH}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0} -}; - -static const ASMPROP_RES pubkeyname[ASM_NAME_MAX_PARAMS] = -{ - {S_OK, "", 0}, - {S_OK, "\x12\x34\x56\x78\x90\xab\xcd\xef", 8}, - {S_OK, "", 0}, - {S_OK, "wine", 10}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", MAX_PATH}, - {S_OK, "", MAX_PATH}, - {S_OK, "", 0}, - {S_OK, "", MAX_PATH}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0}, - {S_OK, "", 0} -}; - -static inline void to_widechar(LPWSTR dest, LPCSTR src) -{ - MultiByteToWideChar(CP_ACP, 0, src, -1, dest, MAX_PATH); -} - -static inline void to_multibyte(LPSTR dest, LPWSTR src) -{ - WideCharToMultiByte(CP_ACP, 0, src, -1, dest, MAX_PATH, NULL, NULL); -} - -static void test_assembly_name_props_line(IAssemblyName *name, - const ASMPROP_RES *vals, int line) -{ - HRESULT hr; - DWORD i, size; - WCHAR expect[MAX_PATH]; - WCHAR str[MAX_PATH]; - CHAR val[MAX_PATH]; - - for (i = 0; i < ASM_NAME_MAX_PARAMS; i++) - { - to_widechar(expect, vals[i].val); - - size = MAX_PATH; - ZeroMemory(str, MAX_PATH); - hr = IAssemblyName_GetProperty(name, i, str, &size); - to_multibyte(val, str); - - ok(hr == vals[i].hr || - broken(i >= ASM_NAME_CONFIG_MASK && hr == E_INVALIDARG) || /* .NET 1.1 */ - broken(i >= ASM_NAME_FILE_MAJOR_VERSION && hr == E_INVALIDARG), /* .NET 1.0 */ - "%d: prop %d: Expected %08x, got %08x\n", line, i, vals[i].hr, hr); - if (hr != E_INVALIDARG) - { - if (i == ASM_NAME_PUBLIC_KEY_TOKEN) - ok(!memcmp(vals[i].val, str, size), "Expected a correct ASM_NAME_PUBLIC_KEY_TOKEN\n"); - else - ok(!lstrcmpA(vals[i].val, val), "%d: prop %d: Expected \"%s\", got \"%s\"\n", line, i, vals[i].val, val); - ok(size == vals[i].size, "%d: prop %d: Expected %d, got %d\n", line, i, vals[i].size, size); - } - } -} - -#define test_assembly_name_props(name, vals) \ - test_assembly_name_props_line(name, vals, __LINE__); - -static void test_CreateAssemblyNameObject(void) -{ - IAssemblyName *name; - WCHAR str[MAX_PATH]; - WCHAR namestr[MAX_PATH]; - DWORD size, hi, lo; - HRESULT hr; - - static const WCHAR empty[] = {0}; - - /* NULL ppAssemblyNameObj */ - to_widechar(namestr, "wine.dll"); - hr = pCreateAssemblyNameObject(NULL, namestr, 0, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - - /* NULL szAssemblyName, CANOF_PARSE_DISPLAY_NAME */ - name = (IAssemblyName *)0xdeadbeef; - hr = pCreateAssemblyNameObject(&name, NULL, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - ok(name == (IAssemblyName *)0xdeadbeef, "Expected 0xdeadbeef, got %p\n", name); - - /* empty szAssemblyName, CANOF_PARSE_DISPLAY_NAME */ - name = (IAssemblyName *)0xdeadbeef; - hr = pCreateAssemblyNameObject(&name, empty, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - ok(name == (IAssemblyName *)0xdeadbeef, "Expected 0xdeadbeef, got %p\n", name); - - /* check the contents of the AssemblyName for default values */ - - /* NULL szAssemblyName */ - name = NULL; - hr = pCreateAssemblyNameObject(&name, NULL, CANOF_SET_DEFAULT_VALUES, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(name != NULL, "Expected non-NULL name\n"); - - size = MAX_PATH; - hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL); - ok(hr == FUSION_E_INVALID_NAME || - broken(hr == E_INVALIDARG), /* .NET 1.x */ - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); - - size = MAX_PATH; - str[0] = '\0'; - hr = IAssemblyName_GetName(name, &size, str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(lstrlenW(str) == 0, "Expected empty name\n"); - ok(size == 0, "Expected 0, got %d\n", size); - - hi = 0xbeefcace; - lo = 0xcafebabe; - hr = IAssemblyName_GetVersion(name, &hi, &lo); - ok(hr == FUSION_E_INVALID_NAME || - broken(hr == S_OK), /* .NET 1.x */ - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); - ok(hi == 0, "Expected 0, got %08x\n", hi); - ok(lo == 0, "Expected 0, got %08x\n", lo); - - if (hr == S_OK) - win_skip(".NET 1.x doesn't handle ASM_NAME_PROCESSOR_ID_ARRAY" - " and ASM_NAME_OSINFO_ARRAY correctly\n"); - else - test_assembly_name_props(name, defaults); - - IAssemblyName_Release(name); - - /* empty szAssemblyName */ - name = NULL; - hr = pCreateAssemblyNameObject(&name, empty, CANOF_SET_DEFAULT_VALUES, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(name != NULL, "Expected non-NULL name\n"); - - size = MAX_PATH; - hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL); - ok(hr == FUSION_E_INVALID_NAME || - broken(hr == S_OK), /* .NET 1.x */ - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); - - size = MAX_PATH; - str[0] = '\0'; - hr = IAssemblyName_GetName(name, &size, str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(lstrlenW(str) == 0, "Expected empty name\n"); - ok(size == 1, "Expected 1, got %d\n", size); - - hi = 0xbeefcace; - lo = 0xcafebabe; - hr = IAssemblyName_GetVersion(name, &hi, &lo); - ok(hr == FUSION_E_INVALID_NAME || - broken(hr == S_OK), /* .NET 1.x */ - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); - ok(hi == 0, "Expected 0, got %08x\n", hi); - ok(lo == 0, "Expected 0, got %08x\n", lo); - - if (hr == S_OK) - win_skip(".NET 1.x doesn't handle ASM_NAME_PROCESSOR_ID_ARRAY" - " and ASM_NAME_OSINFO_ARRAY correctly\n"); - else - test_assembly_name_props(name, emptyname); - - IAssemblyName_Release(name); - - /* 'wine' */ - to_widechar(namestr, "wine"); - name = NULL; - hr = pCreateAssemblyNameObject(&name, namestr, CANOF_SET_DEFAULT_VALUES, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(name != NULL, "Expected non-NULL name\n"); - - size = MAX_PATH; - hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok_aw("wine", str); - ok(size == 5, "Expected 5, got %d\n", size); - - size = MAX_PATH; - str[0] = '\0'; - hr = IAssemblyName_GetName(name, &size, str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok_aw("wine", str); - ok(size == 5, "Expected 5, got %d\n", size); - - hi = 0xbeefcace; - lo = 0xcafebabe; - hr = IAssemblyName_GetVersion(name, &hi, &lo); - ok(hr == FUSION_E_INVALID_NAME || - broken(hr == S_OK), /* .NET 1.x */ - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); - ok(hi == 0, "Expected 0, got %08x\n", hi); - ok(lo == 0, "Expected 0, got %08x\n", lo); - - if (hr == S_OK) - win_skip(".NET 1.x doesn't handle ASM_NAME_PROCESSOR_ID_ARRAY" - " and ASM_NAME_OSINFO_ARRAY correctly\n"); - else - test_assembly_name_props(name, winename); - - IAssemblyName_Release(name); - - /* check the contents of the AssemblyName with parsing */ - - /* 'wine' */ - to_widechar(namestr, "wine"); - name = NULL; - hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(name != NULL, "Expected non-NULL name\n"); - - size = MAX_PATH; - hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok_aw("wine", str); - ok(size == 5, "Expected 5, got %d\n", size); - - size = MAX_PATH; - str[0] = '\0'; - hr = IAssemblyName_GetName(name, &size, str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok_aw("wine", str); - ok(size == 5, "Expected 5, got %d\n", size); - - hi = 0xbeefcace; - lo = 0xcafebabe; - hr = IAssemblyName_GetVersion(name, &hi, &lo); - ok(hr == FUSION_E_INVALID_NAME || - broken(hr == S_OK), /* .NET 1.x */ - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); - ok(hi == 0, "Expected 0, got %08x\n", hi); - ok(lo == 0, "Expected 0, got %08x\n", lo); - - test_assembly_name_props(name, winename); - - IAssemblyName_Release(name); - - /* 'wine, Version=1.2.3.4' */ - to_widechar(namestr, "wine, Version=1.2.3.4"); - name = NULL; - hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(name != NULL, "Expected non-NULL name\n"); - - size = MAX_PATH; - hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok_aw("wine, Version=1.2.3.4", str); - ok(size == 22, "Expected 22, got %d\n", size); - - size = MAX_PATH; - str[0] = '\0'; - hr = IAssemblyName_GetName(name, &size, str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok_aw("wine", str); - ok(size == 5, "Expected 5, got %d\n", size); - - hi = 0xbeefcace; - lo = 0xcafebabe; - hr = IAssemblyName_GetVersion(name, &hi, &lo); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(hi == 0x00010002, "Expected 0x00010002, got %08x\n", hi); - ok(lo == 0x00030004, "Expected 0x00030004, got %08x\n", lo); - - test_assembly_name_props(name, vername); - - IAssemblyName_Release(name); - - /* Version isn't of the form 1.x.x.x */ - to_widechar(namestr, "wine, Version=1.5"); - name = NULL; - hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(name != NULL, "Expected non-NULL name\n"); - - size = MAX_PATH; - hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok_aw("wine, Version=1.5", str); - ok(size == 18, "Expected 18, got %d\n", size); - - size = MAX_PATH; - str[0] = '\0'; - hr = IAssemblyName_GetName(name, &size, str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok_aw("wine", str); - ok(size == 5, "Expected 5, got %d\n", size); - - hi = 0xbeefcace; - lo = 0xcafebabe; - hr = IAssemblyName_GetVersion(name, &hi, &lo); - ok(hr == FUSION_E_INVALID_NAME || - broken(hr == S_OK), /* .NET 1.x */ - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); - ok(hi == 0 || - broken(hi == 0x10005), /* .NET 1.x */ - "Expected 0, got %08x\n", hi); - ok(lo == 0, "Expected 0, got %08x\n", lo); - - test_assembly_name_props(name, badvername); - - IAssemblyName_Release(name); - - /* 'wine, Culture=neutral' */ - to_widechar(namestr, "wine, Culture=neutral"); - name = NULL; - hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(name != NULL, "Expected non-NULL name\n"); - - size = MAX_PATH; - hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok_aw("wine, Culture=neutral", str); - ok(size == 22, "Expected 22, got %d\n", size); - - size = MAX_PATH; - str[0] = '\0'; - hr = IAssemblyName_GetName(name, &size, str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok_aw("wine", str); - ok(size == 5, "Expected 5, got %d\n", size); - - hi = 0xbeefcace; - lo = 0xcafebabe; - hr = IAssemblyName_GetVersion(name, &hi, &lo); - ok(hr == FUSION_E_INVALID_NAME || - broken(hr == S_OK), /* .NET 1.x */ - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); - ok(hi == 0, "Expected 0, got %08x\n", hi); - ok(lo == 0, "Expected 0, got %08x\n", lo); - - test_assembly_name_props(name, neutralname); - - IAssemblyName_Release(name); - - /* 'wine, Culture=en' */ - to_widechar(namestr, "wine, Culture=en"); - name = NULL; - hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(name != NULL, "Expected non-NULL name\n"); - - size = MAX_PATH; - hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok_aw("wine, Culture=en", str); - ok(size == 17, "Expected 17, got %d\n", size); - - size = MAX_PATH; - str[0] = '\0'; - hr = IAssemblyName_GetName(name, &size, str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok_aw("wine", str); - ok(size == 5, "Expected 5, got %d\n", size); - - hi = 0xbeefcace; - lo = 0xcafebabe; - hr = IAssemblyName_GetVersion(name, &hi, &lo); - ok(hr == FUSION_E_INVALID_NAME || - broken(hr == S_OK), /* .NET 1.x */ - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); - ok(hi == 0, "Expected 0, got %08x\n", hi); - ok(lo == 0, "Expected 0, got %08x\n", lo); - - test_assembly_name_props(name, enname); - - IAssemblyName_Release(name); - - /* 'wine, PublicKeyToken=1234567890abcdef' */ - to_widechar(namestr, "wine, PublicKeyToken=1234567890abcdef"); - name = NULL; - hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(name != NULL, "Expected non-NULL name\n"); - - size = MAX_PATH; - hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok_aw("wine, PublicKeyToken=1234567890abcdef", str); - ok(size == 38, "Expected 38, got %d\n", size); - - size = MAX_PATH; - str[0] = '\0'; - hr = IAssemblyName_GetName(name, &size, str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok_aw("wine", str); - ok(size == 5, "Expected 5, got %d\n", size); - - hi = 0xbeefcace; - lo = 0xcafebabe; - hr = IAssemblyName_GetVersion(name, &hi, &lo); - ok(hr == FUSION_E_INVALID_NAME || - broken(hr == S_OK), /* .NET 1.x */ - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); - ok(hi == 0, "Expected 0, got %08x\n", hi); - ok(lo == 0, "Expected 0, got %08x\n", lo); - - test_assembly_name_props(name, pubkeyname); - - IAssemblyName_Release(name); - - /* invalid property */ - to_widechar(namestr, "wine, BadProp=42"); - name = NULL; - hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(name != NULL, "Expected non-NULL name\n"); - - size = MAX_PATH; - str[0] = '\0'; - hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - todo_wine - { - ok_aw("wine", str); - ok(size == 5, "Expected 5, got %d\n", size); - } - - size = MAX_PATH; - str[0] = '\0'; - hr = IAssemblyName_GetName(name, &size, str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok_aw("wine", str); - ok(size == 5, "Expected 5, got %d\n", size); - - hi = 0xbeefcace; - lo = 0xcafebabe; - hr = IAssemblyName_GetVersion(name, &hi, &lo); - ok(hr == FUSION_E_INVALID_NAME || - broken(hr == S_OK), /* .NET 1.x */ - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); - ok(hi == 0, "Expected 0, got %08x\n", hi); - ok(lo == 0, "Expected 0, got %08x\n", lo); - - test_assembly_name_props(name, winename); - - IAssemblyName_Release(name); - - /* PublicKeyToken is not 16 chars long */ - to_widechar(namestr, "wine, PublicKeyToken=567890abcdef"); - name = (IAssemblyName *)0xdeadbeef; - hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - if (hr == S_OK && name != (IAssemblyName *)0xdeadbeef) - { - win_skip(".NET 1.x doesn't check PublicKeyToken correctly\n"); - IAssemblyName_Release(name); - return; - } - ok(hr == FUSION_E_INVALID_NAME, - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); - ok(name == (IAssemblyName *)0xdeadbeef, "Expected 0xdeadbeef, got %p\n", name); - - /* PublicKeyToken contains invalid chars */ - to_widechar(namestr, "wine, PublicKeyToken=1234567890ghijkl"); - name = (IAssemblyName *)0xdeadbeef; - hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == FUSION_E_INVALID_NAME, - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); - ok(name == (IAssemblyName *)0xdeadbeef, "Expected 0xdeadbeef, got %p\n", name); - - /* no comma separator */ - to_widechar(namestr, "wine PublicKeyToken=1234567890abcdef"); - name = (IAssemblyName *)0xdeadbeef; - hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - todo_wine - { - ok(hr == FUSION_E_INVALID_NAME, - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); - ok(name == (IAssemblyName *)0xdeadbeef, "Expected 0xdeadbeef, got %p\n", name); - } - if(SUCCEEDED(hr)) IAssemblyName_Release(name); - - /* no '=' */ - to_widechar(namestr, "wine, PublicKeyToken"); - name = (IAssemblyName *)0xdeadbeef; - hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == FUSION_E_INVALID_NAME, - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); - ok(name == (IAssemblyName *)0xdeadbeef, "Expected 0xdeadbeef, got %p\n", name); - - /* no value */ - to_widechar(namestr, "wine, PublicKeyToken="); - name = (IAssemblyName *)0xdeadbeef; - hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL); - ok(hr == FUSION_E_INVALID_NAME, - "Expected FUSION_E_INVALID_NAME, got %08x\n", hr); - ok(name == (IAssemblyName *)0xdeadbeef, "Expected 0xdeadbeef, got %p\n", name); -} - -START_TEST(asmname) -{ - if (!init_functionpointers()) - { - win_skip("fusion.dll not available\n"); - return; - } - - test_CreateAssemblyNameObject(); -} diff --git a/rostests/winetests/fusion/fusion.c b/rostests/winetests/fusion/fusion.c deleted file mode 100644 index 6ebd4550eb0..00000000000 --- a/rostests/winetests/fusion/fusion.c +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Copyright 2008 James Hawkins - * - * 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 "wine/test.h" - -static HMODULE hmscoree; - -static HRESULT (WINAPI *pGetCachePath)(ASM_CACHE_FLAGS dwCacheFlags, - LPWSTR pwzCachePath, PDWORD pcchPath); -static HRESULT (WINAPI *pLoadLibraryShim)(LPCWSTR szDllName, LPCWSTR szVersion, - LPVOID pvReserved, HMODULE *phModDll); -static HRESULT (WINAPI *pGetCORVersion)(LPWSTR pbuffer, DWORD cchBuffer, - DWORD *dwLength); - -static CHAR string1[MAX_PATH], string2[MAX_PATH]; - -#define ok_w2(format, szString1, szString2) \ -\ - WideCharToMultiByte(CP_ACP, 0, szString1, -1, string1, MAX_PATH, NULL, NULL); \ - WideCharToMultiByte(CP_ACP, 0, szString2, -1, string2, MAX_PATH, NULL, NULL); \ - ok(!lstrcmpA(string1, string2), format, string1, string2) - -static BOOL init_functionpointers(void) -{ - HRESULT hr; - HMODULE hfusion; - - static const WCHAR szFusion[] = {'f','u','s','i','o','n','.','d','l','l',0}; - - hmscoree = LoadLibraryA("mscoree.dll"); - if (!hmscoree) - { - win_skip("mscoree.dll not available\n"); - return FALSE; - } - - pLoadLibraryShim = (void *)GetProcAddress(hmscoree, "LoadLibraryShim"); - if (!pLoadLibraryShim) - { - win_skip("LoadLibraryShim not available\n"); - FreeLibrary(hmscoree); - return FALSE; - } - - pGetCORVersion = (void *)GetProcAddress(hmscoree, "GetCORVersion"); - - hr = pLoadLibraryShim(szFusion, NULL, NULL, &hfusion); - if (FAILED(hr)) - { - win_skip("fusion.dll not available\n"); - FreeLibrary(hmscoree); - return FALSE; - } - - pGetCachePath = (void *)GetProcAddress(hfusion, "GetCachePath"); - return TRUE; -} - -static void test_GetCachePath(void) -{ - CHAR windirA[MAX_PATH]; - WCHAR windir[MAX_PATH]; - WCHAR cachepath[MAX_PATH]; - WCHAR version[MAX_PATH]; - WCHAR path[MAX_PATH]; - DWORD size; - HRESULT hr; - - static const WCHAR backslash[] = {'\\',0}; - static const WCHAR nochange[] = {'n','o','c','h','a','n','g','e',0}; - static const WCHAR assembly[] = {'a','s','s','e','m','b','l','y',0}; - static const WCHAR gac[] = {'G','A','C',0}; - - if (!pGetCachePath) - { - win_skip("GetCachePath not implemented\n"); - return; - } - - GetWindowsDirectoryA(windirA, MAX_PATH); - MultiByteToWideChar(CP_ACP, 0, windirA, -1, windir, MAX_PATH); - lstrcpyW(cachepath, windir); - lstrcatW(cachepath, backslash); - lstrcatW(cachepath, assembly); - lstrcatW(cachepath, backslash); - lstrcatW(cachepath, gac); - - /* NULL pwzCachePath, pcchPath is 0 */ - size = 0; - hr = pGetCachePath(ASM_CACHE_GAC, NULL, &size); - ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), - "Expected HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), got %08x\n", hr); - ok(size == lstrlenW(cachepath) + 1, - "Expected %d, got %d\n", lstrlenW(cachepath) + 1, size); - - /* NULL pwszCachePath, pcchPath is MAX_PATH */ - size = MAX_PATH; - hr = pGetCachePath(ASM_CACHE_GAC, NULL, &size); - ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), - "Expected HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), got %08x\n", hr); - ok(size == lstrlenW(cachepath) + 1, - "Expected %d, got %d\n", lstrlenW(cachepath) + 1, size); - - /* both pwszCachePath and pcchPath NULL */ - hr = pGetCachePath(ASM_CACHE_GAC, NULL, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - - /* NULL pcchPath */ - lstrcpyW(path, nochange); - hr = pGetCachePath(ASM_CACHE_GAC, path, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - ok_w2("Expected \"%s\", got \"%s\"\n", nochange, path); - - /* get the cache path */ - lstrcpyW(path, nochange); - size = MAX_PATH; - hr = pGetCachePath(ASM_CACHE_GAC, path, &size); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok_w2("Expected \"%s\", got \"%s\"\n", cachepath, path); - - /* pcchPath has no room for NULL terminator */ - lstrcpyW(path, nochange); - size = lstrlenW(cachepath); - hr = pGetCachePath(ASM_CACHE_GAC, path, &size); - ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), - "Expected HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), got %08x\n", hr); - ok_w2("Expected \"%s\", got \"%s\"\n", nochange, path); - - lstrcpyW(cachepath, windir); - lstrcatW(cachepath, backslash); - lstrcatW(cachepath, assembly); - - /* ASM_CACHE_ROOT */ - lstrcpyW(path, nochange); - size = MAX_PATH; - hr = pGetCachePath(ASM_CACHE_ROOT, path, &size); - ok(hr == S_OK || - broken(hr == E_INVALIDARG), /* .NET 1.1 */ - "Expected S_OK, got %08x\n", hr); - if (hr == S_OK) - ok_w2("Expected \"%s\", got \"%s\"\n", cachepath, path); - - if (pGetCORVersion) - { - CHAR versionA[MAX_PATH]; - CHAR cachepathA[MAX_PATH]; - CHAR nativeimgA[MAX_PATH]; - CHAR zapfmtA[MAX_PATH]; - - if (hr == S_OK) - { - lstrcpyA(nativeimgA, "NativeImages_"); -#ifdef _WIN64 - lstrcpyA(zapfmtA, "%s\\%s\\%s%s_64"); -#else - lstrcpyA(zapfmtA, "%s\\%s\\%s%s_32"); -#endif - } - else - { - lstrcpyA(nativeimgA, "NativeImages1_"); - lstrcpyA(zapfmtA, "%s\\%s\\%s%s"); - } - - pGetCORVersion(version, MAX_PATH, &size); - WideCharToMultiByte(CP_ACP, 0, version, -1, versionA, MAX_PATH, 0, 0); - - wsprintfA(cachepathA, zapfmtA, windirA, "assembly", nativeimgA, versionA); - MultiByteToWideChar(CP_ACP, 0, cachepathA, -1, cachepath, MAX_PATH); - - /* ASM_CACHE_ZAP */ - lstrcpyW(path, nochange); - size = MAX_PATH; - hr = pGetCachePath(ASM_CACHE_ZAP, path, &size); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok_w2("Expected \"%s\", got \"%s\"\n", cachepath, path); - } - - /* two flags at once */ - lstrcpyW(path, nochange); - size = MAX_PATH; - hr = pGetCachePath(ASM_CACHE_GAC | ASM_CACHE_ROOT, path, &size); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - ok_w2("Expected \"%s\", got \"%s\"\n", nochange, path); -} - -START_TEST(fusion) -{ - if (!init_functionpointers()) - return; - - test_GetCachePath(); - - FreeLibrary(hmscoree); -} diff --git a/rostests/winetests/fusion/fusion.rbuild b/rostests/winetests/fusion/fusion.rbuild deleted file mode 100644 index 6114362de3c..00000000000 --- a/rostests/winetests/fusion/fusion.rbuild +++ /dev/null @@ -1,12 +0,0 @@ - - . - - asmcache.c - asmenum.c - asmname.c - fusion.c - testlist.c - wine - user32 - ntdll - diff --git a/rostests/winetests/fusion/testlist.c b/rostests/winetests/fusion/testlist.c deleted file mode 100644 index a42cfc24642..00000000000 --- a/rostests/winetests/fusion/testlist.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_fusion(void); -extern void func_asmname(void); -extern void func_asmenum(void); -extern void func_asmcache(void); - -const struct test winetest_testlist[] = -{ - { "fusion", func_fusion }, - { "asmname", func_asmname }, - { "asmenum", func_asmenum }, - { "asmcache", func_asmcache }, - { 0, 0 } -}; diff --git a/rostests/winetests/gdi32/CMakeLists.txt b/rostests/winetests/gdi32/CMakeLists.txt deleted file mode 100644 index abc96bc2181..00000000000 --- a/rostests/winetests/gdi32/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ - -set_rc_compiler() - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -remove_definitions(-DWINVER=0x502 -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x502) - -list(APPEND SOURCE - bitmap.c - brush.c - clipping.c - dc.c - dib.c - font.c - gdiobj.c - generated.c - icm.c - mapping.c - metafile.c - palette.c - path.c - pen.c - testlist.c - resource.rc) - -add_executable(gdi32_winetest ${SOURCE}) -allow_warnings(gdi32_winetest) -set_module_type(gdi32_winetest win32cui) -add_importlibs(gdi32_winetest gdi32 user32 advapi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET gdi32_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/gdi32/bitmap.c b/rostests/winetests/gdi32/bitmap.c deleted file mode 100755 index b0b85621811..00000000000 --- a/rostests/winetests/gdi32/bitmap.c +++ /dev/null @@ -1,4872 +0,0 @@ -/* - * Unit test suite for bitmaps - * - * Copyright 2004 Huw Davies - * Copyright 2006 Dmitry Timoshkov - * - * 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 "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "wingdi.h" -#include "winuser.h" -#include "mmsystem.h" - -#include "wine/test.h" - -static BOOL (WINAPI *pGdiAlphaBlend)(HDC,int,int,int,int,HDC,int,int,int,int,BLENDFUNCTION); -static DWORD (WINAPI *pSetLayout)(HDC hdc, DWORD layout); - -#define expect_eq(expr, value, type, format) { type ret = (expr); ok((value) == ret, #expr " expected " format " got " format "\n", value, ret); } - -static inline int get_bitmap_stride( int width, int bpp ) -{ - return ((width * bpp + 15) >> 3) & ~1; -} - -static inline int get_dib_stride( int width, int bpp ) -{ - return ((width * bpp + 31) >> 3) & ~3; -} - -static inline int get_dib_image_size( const BITMAPINFO *info ) -{ - return get_dib_stride( info->bmiHeader.biWidth, info->bmiHeader.biBitCount ) - * abs( info->bmiHeader.biHeight ); -} - -static void test_bitmap_info(HBITMAP hbm, INT expected_depth, const BITMAPINFOHEADER *bmih) -{ - BITMAP bm; - BITMAP bma[2]; - INT ret, width_bytes; - BYTE buf[512], buf_cmp[512]; - - ret = GetObject(hbm, sizeof(bm), &bm); - ok(ret == sizeof(bm), "GetObject returned %d\n", ret); - - ok(bm.bmType == 0, "wrong bm.bmType %d\n", bm.bmType); - ok(bm.bmWidth == bmih->biWidth, "wrong bm.bmWidth %d\n", bm.bmWidth); - ok(bm.bmHeight == bmih->biHeight, "wrong bm.bmHeight %d\n", bm.bmHeight); - width_bytes = get_bitmap_stride(bm.bmWidth, bm.bmBitsPixel); - ok(bm.bmWidthBytes == width_bytes, "wrong bm.bmWidthBytes %d != %d\n", bm.bmWidthBytes, width_bytes); - ok(bm.bmPlanes == bmih->biPlanes, "wrong bm.bmPlanes %d\n", bm.bmPlanes); - ok(bm.bmBitsPixel == expected_depth, "wrong bm.bmBitsPixel %d != %d\n", bm.bmBitsPixel, expected_depth); - ok(bm.bmBits == NULL, "wrong bm.bmBits %p\n", bm.bmBits); - - assert(sizeof(buf) >= bm.bmWidthBytes * bm.bmHeight); - assert(sizeof(buf) == sizeof(buf_cmp)); - - SetLastError(0xdeadbeef); - ret = GetBitmapBits(hbm, 0, NULL); - ok(ret == bm.bmWidthBytes * bm.bmHeight, "%d != %d\n", ret, bm.bmWidthBytes * bm.bmHeight); - - memset(buf_cmp, 0xAA, sizeof(buf_cmp)); - memset(buf_cmp, 0, bm.bmWidthBytes * bm.bmHeight); - - memset(buf, 0xAA, sizeof(buf)); - ret = GetBitmapBits(hbm, sizeof(buf), buf); - ok(ret == bm.bmWidthBytes * bm.bmHeight, "%d != %d\n", ret, bm.bmWidthBytes * bm.bmHeight); - ok(!memcmp(buf, buf_cmp, sizeof(buf)), - "buffers do not match, depth %d\n", bmih->biBitCount); - - /* test various buffer sizes for GetObject */ - ret = GetObject(hbm, sizeof(*bma) * 2, bma); - ok(ret == sizeof(*bma), "wrong size %d\n", ret); - - ret = GetObject(hbm, sizeof(bm) / 2, &bm); - ok(ret == 0, "%d != 0\n", ret); - - ret = GetObject(hbm, 0, &bm); - ok(ret == 0, "%d != 0\n", ret); - - ret = GetObject(hbm, 1, &bm); - ok(ret == 0, "%d != 0\n", ret); - - ret = GetObject(hbm, 0, NULL); - ok(ret == sizeof(bm), "wrong size %d\n", ret); -} - -static void test_createdibitmap(void) -{ - HDC hdc, hdcmem; - BITMAPINFOHEADER bmih; - BITMAPINFO bm; - HBITMAP hbm, hbm_colour, hbm_old; - INT screen_depth; - DWORD pixel; - - hdc = GetDC(0); - screen_depth = GetDeviceCaps(hdc, BITSPIXEL); - memset(&bmih, 0, sizeof(bmih)); - bmih.biSize = sizeof(bmih); - bmih.biWidth = 10; - bmih.biHeight = 10; - bmih.biPlanes = 1; - bmih.biBitCount = 32; - bmih.biCompression = BI_RGB; - - hbm = CreateDIBitmap(hdc, NULL, CBM_INIT, NULL, NULL, 0); - ok(hbm == NULL, "CreateDIBitmap should fail\n"); - hbm = CreateDIBitmap(hdc, NULL, 0, NULL, NULL, 0); - ok(hbm == NULL, "CreateDIBitmap should fail\n"); - - /* First create an un-initialised bitmap. The depth of the bitmap - should match that of the hdc and not that supplied in bmih. - */ - - /* First try 32 bits */ - hbm = CreateDIBitmap(hdc, &bmih, 0, NULL, NULL, 0); - ok(hbm != NULL, "CreateDIBitmap failed\n"); - test_bitmap_info(hbm, screen_depth, &bmih); - DeleteObject(hbm); - - /* Then 16 */ - bmih.biBitCount = 16; - hbm = CreateDIBitmap(hdc, &bmih, 0, NULL, NULL, 0); - ok(hbm != NULL, "CreateDIBitmap failed\n"); - test_bitmap_info(hbm, screen_depth, &bmih); - DeleteObject(hbm); - - /* Then 1 */ - bmih.biBitCount = 1; - hbm = CreateDIBitmap(hdc, &bmih, 0, NULL, NULL, 0); - ok(hbm != NULL, "CreateDIBitmap failed\n"); - test_bitmap_info(hbm, screen_depth, &bmih); - DeleteObject(hbm); - - /* Now with a monochrome dc we expect a monochrome bitmap */ - hdcmem = CreateCompatibleDC(hdc); - - /* First try 32 bits */ - bmih.biBitCount = 32; - hbm = CreateDIBitmap(hdcmem, &bmih, 0, NULL, NULL, 0); - ok(hbm != NULL, "CreateDIBitmap failed\n"); - test_bitmap_info(hbm, 1, &bmih); - DeleteObject(hbm); - - /* Then 16 */ - bmih.biBitCount = 16; - hbm = CreateDIBitmap(hdcmem, &bmih, 0, NULL, NULL, 0); - ok(hbm != NULL, "CreateDIBitmap failed\n"); - test_bitmap_info(hbm, 1, &bmih); - DeleteObject(hbm); - - /* Then 1 */ - bmih.biBitCount = 1; - hbm = CreateDIBitmap(hdcmem, &bmih, 0, NULL, NULL, 0); - ok(hbm != NULL, "CreateDIBitmap failed\n"); - test_bitmap_info(hbm, 1, &bmih); - DeleteObject(hbm); - - /* Now select a polychrome bitmap into the dc and we expect - screen_depth bitmaps again */ - hbm_colour = CreateCompatibleBitmap(hdc, bmih.biWidth, bmih.biHeight); - test_bitmap_info(hbm_colour, screen_depth, &bmih); - hbm_old = SelectObject(hdcmem, hbm_colour); - - /* First try 32 bits */ - bmih.biBitCount = 32; - hbm = CreateDIBitmap(hdcmem, &bmih, 0, NULL, NULL, 0); - ok(hbm != NULL, "CreateDIBitmap failed\n"); - test_bitmap_info(hbm, screen_depth, &bmih); - DeleteObject(hbm); - - /* Then 16 */ - bmih.biBitCount = 16; - hbm = CreateDIBitmap(hdcmem, &bmih, 0, NULL, NULL, 0); - ok(hbm != NULL, "CreateDIBitmap failed\n"); - test_bitmap_info(hbm, screen_depth, &bmih); - DeleteObject(hbm); - - /* Then 1 */ - bmih.biBitCount = 1; - hbm = CreateDIBitmap(hdcmem, &bmih, 0, NULL, NULL, 0); - ok(hbm != NULL, "CreateDIBitmap failed\n"); - test_bitmap_info(hbm, screen_depth, &bmih); - DeleteObject(hbm); - - SelectObject(hdcmem, hbm_old); - DeleteObject(hbm_colour); - DeleteDC(hdcmem); - - bmih.biBitCount = 32; - hbm = CreateDIBitmap(0, &bmih, 0, NULL, NULL, 0); - ok(hbm != NULL, "CreateDIBitmap failed\n"); - test_bitmap_info(hbm, 1, &bmih); - DeleteObject(hbm); - - /* Test how formats are converted */ - pixel = 0xffffffff; - bmih.biBitCount = 1; - bmih.biWidth = 1; - bmih.biHeight = 1; - - memset(&bm, 0, sizeof(bm)); - bm.bmiHeader.biSize = sizeof(bm.bmiHeader); - bm.bmiHeader.biWidth = 1; - bm.bmiHeader.biHeight = 1; - bm.bmiHeader.biPlanes = 1; - bm.bmiHeader.biBitCount= 24; - bm.bmiHeader.biCompression= BI_RGB; - bm.bmiHeader.biSizeImage = 0; - hbm = CreateDIBitmap(hdc, &bmih, CBM_INIT, &pixel, &bm, DIB_RGB_COLORS); - ok(hbm != NULL, "CreateDIBitmap failed\n"); - - pixel = 0xdeadbeef; - bm.bmiHeader.biBitCount= 32; - GetDIBits(hdc, hbm, 0, 1, &pixel, &bm, DIB_RGB_COLORS); - ok(pixel == 0x00ffffff, "Reading a 32 bit pixel from a DDB returned %08x\n", pixel); - DeleteObject(hbm); - - ReleaseDC(0, hdc); -} - -static void test_dib_info(HBITMAP hbm, const void *bits, const BITMAPINFOHEADER *bmih) -{ - BITMAP bm; - BITMAP bma[2]; - DIBSECTION ds; - DIBSECTION dsa[2]; - INT ret, bm_width_bytes, dib_width_bytes; - BYTE *buf; - - ret = GetObject(hbm, sizeof(bm), &bm); - ok(ret == sizeof(bm), "GetObject returned %d\n", ret); - - ok(bm.bmType == 0, "wrong bm.bmType %d\n", bm.bmType); - ok(bm.bmWidth == bmih->biWidth, "wrong bm.bmWidth %d\n", bm.bmWidth); - ok(bm.bmHeight == abs(bmih->biHeight), "wrong bm.bmHeight %d\n", bm.bmHeight); - dib_width_bytes = get_dib_stride(bm.bmWidth, bm.bmBitsPixel); - bm_width_bytes = get_bitmap_stride(bm.bmWidth, bm.bmBitsPixel); - if (bm.bmWidthBytes != dib_width_bytes) /* Win2k bug */ - ok(bm.bmWidthBytes == bm_width_bytes, "wrong bm.bmWidthBytes %d != %d\n", bm.bmWidthBytes, bm_width_bytes); - else - ok(bm.bmWidthBytes == dib_width_bytes, "wrong bm.bmWidthBytes %d != %d\n", bm.bmWidthBytes, dib_width_bytes); - ok(bm.bmPlanes == bmih->biPlanes, "wrong bm.bmPlanes %d\n", bm.bmPlanes); - ok(bm.bmBitsPixel == bmih->biBitCount, "bm.bmBitsPixel %d != %d\n", bm.bmBitsPixel, bmih->biBitCount); - ok(bm.bmBits == bits, "wrong bm.bmBits %p != %p\n", bm.bmBits, bits); - - buf = HeapAlloc(GetProcessHeap(), 0, bm.bmWidthBytes * bm.bmHeight + 4096); - - /* GetBitmapBits returns not 32-bit aligned data */ - SetLastError(0xdeadbeef); - ret = GetBitmapBits(hbm, 0, NULL); - ok(ret == bm_width_bytes * bm.bmHeight, - "%d != %d\n", ret, bm_width_bytes * bm.bmHeight); - - memset(buf, 0xAA, bm.bmWidthBytes * bm.bmHeight + 4096); - ret = GetBitmapBits(hbm, bm.bmWidthBytes * bm.bmHeight + 4096, buf); - ok(ret == bm_width_bytes * bm.bmHeight, "%d != %d\n", ret, bm_width_bytes * bm.bmHeight); - - HeapFree(GetProcessHeap(), 0, buf); - - /* test various buffer sizes for GetObject */ - memset(&ds, 0xAA, sizeof(ds)); - ret = GetObject(hbm, sizeof(*bma) * 2, bma); - ok(ret == sizeof(*bma), "wrong size %d\n", ret); - ok(bm.bmWidth == bmih->biWidth, "wrong bm.bmWidth %d\n", bm.bmWidth); - ok(bm.bmHeight == abs(bmih->biHeight), "wrong bm.bmHeight %d\n", bm.bmHeight); - ok(bm.bmBits == bits, "wrong bm.bmBits %p != %p\n", bm.bmBits, bits); - - ret = GetObject(hbm, sizeof(bm) / 2, &bm); - ok(ret == 0, "%d != 0\n", ret); - - ret = GetObject(hbm, 0, &bm); - ok(ret == 0, "%d != 0\n", ret); - - ret = GetObject(hbm, 1, &bm); - ok(ret == 0, "%d != 0\n", ret); - - /* test various buffer sizes for GetObject */ - ret = GetObject(hbm, 0, NULL); - ok(ret == sizeof(bm), "wrong size %d\n", ret); - - ret = GetObject(hbm, sizeof(*dsa) * 2, dsa); - ok(ret == sizeof(*dsa), "wrong size %d\n", ret); - - memset(&ds, 0xAA, sizeof(ds)); - ret = GetObject(hbm, sizeof(ds), &ds); - ok(ret == sizeof(ds), "wrong size %d\n", ret); - - ok(ds.dsBm.bmBits == bits, "wrong bm.bmBits %p != %p\n", ds.dsBm.bmBits, bits); - if (ds.dsBm.bmWidthBytes != bm_width_bytes) /* Win2k bug */ - ok(ds.dsBmih.biSizeImage == ds.dsBm.bmWidthBytes * ds.dsBm.bmHeight, "%u != %u\n", - ds.dsBmih.biSizeImage, ds.dsBm.bmWidthBytes * ds.dsBm.bmHeight); - ok(bmih->biSizeImage == 0, "%u != 0\n", bmih->biSizeImage); - ds.dsBmih.biSizeImage = 0; - - ok(ds.dsBmih.biSize == bmih->biSize, "%u != %u\n", ds.dsBmih.biSize, bmih->biSize); - ok(ds.dsBmih.biWidth == bmih->biWidth, "%d != %d\n", ds.dsBmih.biWidth, bmih->biWidth); - ok(ds.dsBmih.biHeight == abs(bmih->biHeight), "%d != %d\n", ds.dsBmih.biHeight, abs(bmih->biHeight)); - ok(ds.dsBmih.biPlanes == bmih->biPlanes, "%u != %u\n", ds.dsBmih.biPlanes, bmih->biPlanes); - ok(ds.dsBmih.biBitCount == bmih->biBitCount, "%u != %u\n", ds.dsBmih.biBitCount, bmih->biBitCount); - ok(ds.dsBmih.biCompression == bmih->biCompression || - ((bmih->biBitCount == 32) && broken(ds.dsBmih.biCompression == BI_BITFIELDS)), /* nt4 sp1 and 2 */ - "%u != %u\n", ds.dsBmih.biCompression, bmih->biCompression); - ok(ds.dsBmih.biSizeImage == bmih->biSizeImage, "%u != %u\n", ds.dsBmih.biSizeImage, bmih->biSizeImage); - ok(ds.dsBmih.biXPelsPerMeter == bmih->biXPelsPerMeter, "%d != %d\n", ds.dsBmih.biXPelsPerMeter, bmih->biXPelsPerMeter); - ok(ds.dsBmih.biYPelsPerMeter == bmih->biYPelsPerMeter, "%d != %d\n", ds.dsBmih.biYPelsPerMeter, bmih->biYPelsPerMeter); - - memset(&ds, 0xAA, sizeof(ds)); - ret = GetObject(hbm, sizeof(ds) - 4, &ds); - ok(ret == sizeof(ds.dsBm), "wrong size %d\n", ret); - ok(ds.dsBm.bmWidth == bmih->biWidth, "%d != %d\n", ds.dsBmih.biWidth, bmih->biWidth); - ok(ds.dsBm.bmHeight == abs(bmih->biHeight), "%d != %d\n", ds.dsBmih.biHeight, abs(bmih->biHeight)); - ok(ds.dsBm.bmBits == bits, "%p != %p\n", ds.dsBm.bmBits, bits); - - ret = GetObject(hbm, 0, &ds); - ok(ret == 0, "%d != 0\n", ret); - - ret = GetObject(hbm, 1, &ds); - ok(ret == 0, "%d != 0\n", ret); -} - -#define test_color_todo(got, exp, txt, todo) \ - if (!todo && got != exp && screen_depth < 24) { \ - todo_wine ok(0, #txt " failed at %d-bit screen depth: got 0x%06x expected 0x%06x - skipping DIB tests\n", \ - screen_depth, (UINT)got, (UINT)exp); \ - return; \ - } else if (todo) todo_wine { ok(got == exp, #txt " failed: got 0x%06x expected 0x%06x\n", (UINT)got, (UINT)exp); } \ - else ok(got == exp, #txt " failed: got 0x%06x expected 0x%06x\n", (UINT)got, (UINT)exp) \ - -#define test_color(hdc, color, exp, todo_setp, todo_getp) \ -{ \ - COLORREF c; \ - c = SetPixel(hdc, 0, 0, color); \ - test_color_todo(c, exp, SetPixel, todo_setp); \ - c = GetPixel(hdc, 0, 0); \ - test_color_todo(c, exp, GetPixel, todo_getp); \ -} - -static void test_dib_bits_access( HBITMAP hdib, void *bits ) -{ - MEMORY_BASIC_INFORMATION info; - char bmibuf[sizeof(BITMAPINFO) + 256 * sizeof(RGBQUAD)]; - DWORD data[256]; - BITMAPINFO *pbmi = (BITMAPINFO *)bmibuf; - HDC hdc; - char filename[MAX_PATH]; - HANDLE file; - DWORD written; - INT ret; - - ok(VirtualQuery(bits, &info, sizeof(info)) == sizeof(info), - "VirtualQuery failed\n"); - ok(info.BaseAddress == bits, "%p != %p\n", info.BaseAddress, bits); - ok(info.AllocationBase == bits, "%p != %p\n", info.AllocationBase, bits); - ok(info.AllocationProtect == PAGE_READWRITE, "%x != PAGE_READWRITE\n", info.AllocationProtect); - ok(info.State == MEM_COMMIT, "%x != MEM_COMMIT\n", info.State); - ok(info.Protect == PAGE_READWRITE, "%x != PAGE_READWRITE\n", info.Protect); - ok(info.Type == MEM_PRIVATE, "%x != MEM_PRIVATE\n", info.Type); - - memset( pbmi, 0, sizeof(bmibuf) ); - memset( data, 0xcc, sizeof(data) ); - pbmi->bmiHeader.biSize = sizeof(pbmi->bmiHeader); - pbmi->bmiHeader.biHeight = 16; - pbmi->bmiHeader.biWidth = 16; - pbmi->bmiHeader.biBitCount = 32; - pbmi->bmiHeader.biPlanes = 1; - pbmi->bmiHeader.biCompression = BI_RGB; - - hdc = GetDC(0); - - ret = SetDIBits( hdc, hdib, 0, 16, data, pbmi, DIB_RGB_COLORS ); - ok(ret == 16, "SetDIBits failed: expected 16 got %d\n", ret); - - ReleaseDC(0, hdc); - - ok(VirtualQuery(bits, &info, sizeof(info)) == sizeof(info), - "VirtualQuery failed\n"); - ok(info.BaseAddress == bits, "%p != %p\n", info.BaseAddress, bits); - ok(info.AllocationBase == bits, "%p != %p\n", info.AllocationBase, bits); - ok(info.AllocationProtect == PAGE_READWRITE, "%x != PAGE_READWRITE\n", info.AllocationProtect); - ok(info.State == MEM_COMMIT, "%x != MEM_COMMIT\n", info.State); - ok(info.Type == MEM_PRIVATE, "%x != MEM_PRIVATE\n", info.Type); - ok(info.Protect == PAGE_READWRITE, "%x != PAGE_READWRITE\n", info.Protect); - - /* try writing protected bits to a file */ - - GetTempFileNameA( ".", "dib", 0, filename ); - file = CreateFileA( filename, GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, - CREATE_ALWAYS, 0, 0 ); - ok( file != INVALID_HANDLE_VALUE, "failed to open %s error %u\n", filename, GetLastError() ); - ret = WriteFile( file, bits, 8192, &written, NULL ); - ok( ret, "WriteFile failed error %u\n", GetLastError() ); - if (ret) ok( written == 8192, "only wrote %u bytes\n", written ); - CloseHandle( file ); - DeleteFileA( filename ); -} - -static void test_dibsections(void) -{ - HDC hdc, hdcmem, hdcmem2; - HBITMAP hdib, oldbm, hdib2, oldbm2; - char bmibuf[sizeof(BITMAPINFO) + 256 * sizeof(RGBQUAD)]; - char bcibuf[sizeof(BITMAPCOREINFO) + 256 * sizeof(RGBTRIPLE)]; - BITMAPINFO *pbmi = (BITMAPINFO *)bmibuf; - BITMAPCOREINFO *pbci = (BITMAPCOREINFO *)bcibuf; - HBITMAP hcoredib; - char coreBits[256]; - BYTE *bits; - RGBQUAD rgb[256]; - int ret; - char logpalbuf[sizeof(LOGPALETTE) + 256 * sizeof(PALETTEENTRY)]; - LOGPALETTE *plogpal = (LOGPALETTE*)logpalbuf; - WORD *index; - DWORD *bits32; - HPALETTE hpal, oldpal; - DIBSECTION dibsec; - COLORREF c0, c1; - int i; - int screen_depth; - MEMORY_BASIC_INFORMATION info; - - hdc = GetDC(0); - screen_depth = GetDeviceCaps(hdc, BITSPIXEL) * GetDeviceCaps(hdc, PLANES); - - memset(pbmi, 0, sizeof(bmibuf)); - pbmi->bmiHeader.biSize = sizeof(pbmi->bmiHeader); - pbmi->bmiHeader.biHeight = 100; - pbmi->bmiHeader.biWidth = 512; - pbmi->bmiHeader.biBitCount = 24; - pbmi->bmiHeader.biPlanes = 1; - pbmi->bmiHeader.biCompression = BI_RGB; - - SetLastError(0xdeadbeef); - - /* invalid pointer for BITMAPINFO - (*bits should be NULL on error) */ - bits = (BYTE*)0xdeadbeef; - hdib = CreateDIBSection(hdc, NULL, DIB_RGB_COLORS, (void**)&bits, NULL, 0); - ok(hdib == NULL && bits == NULL, "CreateDIBSection failed for invalid parameter: bmi == 0x0\n"); - - hdib = CreateDIBSection(hdc, pbmi, DIB_RGB_COLORS, (void**)&bits, NULL, 0); - ok(hdib != NULL, "CreateDIBSection error %d\n", GetLastError()); - ok(GetObject(hdib, sizeof(DIBSECTION), &dibsec) != 0, "GetObject failed for DIBSection\n"); - ok(dibsec.dsBm.bmBits == bits, "dibsec.dsBits %p != bits %p\n", dibsec.dsBm.bmBits, bits); - - /* test the DIB memory */ - ok(VirtualQuery(bits, &info, sizeof(info)) == sizeof(info), - "VirtualQuery failed\n"); - ok(info.BaseAddress == bits, "%p != %p\n", info.BaseAddress, bits); - ok(info.AllocationBase == bits, "%p != %p\n", info.AllocationBase, bits); - ok(info.AllocationProtect == PAGE_READWRITE, "%x != PAGE_READWRITE\n", info.AllocationProtect); - ok(info.RegionSize == 0x26000, "0x%lx != 0x26000\n", info.RegionSize); - ok(info.State == MEM_COMMIT, "%x != MEM_COMMIT\n", info.State); - ok(info.Protect == PAGE_READWRITE, "%x != PAGE_READWRITE\n", info.Protect); - ok(info.Type == MEM_PRIVATE, "%x != MEM_PRIVATE\n", info.Type); - - test_dib_bits_access( hdib, bits ); - - test_dib_info(hdib, bits, &pbmi->bmiHeader); - DeleteObject(hdib); - - /* Test a top-down DIB. */ - pbmi->bmiHeader.biHeight = -100; - hdib = CreateDIBSection(hdc, pbmi, DIB_RGB_COLORS, (void**)&bits, NULL, 0); - ok(hdib != NULL, "CreateDIBSection error %d\n", GetLastError()); - test_dib_info(hdib, bits, &pbmi->bmiHeader); - DeleteObject(hdib); - - pbmi->bmiHeader.biHeight = 100; - pbmi->bmiHeader.biBitCount = 8; - pbmi->bmiHeader.biCompression = BI_RLE8; - SetLastError(0xdeadbeef); - hdib = CreateDIBSection(hdc, pbmi, DIB_RGB_COLORS, (void**)&bits, NULL, 0); - ok(hdib == NULL, "CreateDIBSection should fail when asked to create a compressed DIB section\n"); - ok(GetLastError() == 0xdeadbeef, "wrong error %d\n", GetLastError()); - - pbmi->bmiHeader.biBitCount = 16; - pbmi->bmiHeader.biCompression = BI_BITFIELDS; - ((PDWORD)pbmi->bmiColors)[0] = 0xf800; - ((PDWORD)pbmi->bmiColors)[1] = 0x07e0; - ((PDWORD)pbmi->bmiColors)[2] = 0x001f; - SetLastError(0xdeadbeef); - hdib = CreateDIBSection(hdc, pbmi, DIB_RGB_COLORS, (void**)&bits, NULL, 0); - ok(hdib != NULL, "CreateDIBSection error %d\n", GetLastError()); - - /* test the DIB memory */ - ok(VirtualQuery(bits, &info, sizeof(info)) == sizeof(info), - "VirtualQuery failed\n"); - ok(info.BaseAddress == bits, "%p != %p\n", info.BaseAddress, bits); - ok(info.AllocationBase == bits, "%p != %p\n", info.AllocationBase, bits); - ok(info.AllocationProtect == PAGE_READWRITE, "%x != PAGE_READWRITE\n", info.AllocationProtect); - ok(info.RegionSize == 0x19000, "0x%lx != 0x19000\n", info.RegionSize); - ok(info.State == MEM_COMMIT, "%x != MEM_COMMIT\n", info.State); - ok(info.Protect == PAGE_READWRITE, "%x != PAGE_READWRITE\n", info.Protect); - ok(info.Type == MEM_PRIVATE, "%x != MEM_PRIVATE\n", info.Type); - - test_dib_info(hdib, bits, &pbmi->bmiHeader); - DeleteObject(hdib); - - memset(pbmi, 0, sizeof(bmibuf)); - pbmi->bmiHeader.biSize = sizeof(pbmi->bmiHeader); - pbmi->bmiHeader.biHeight = 16; - pbmi->bmiHeader.biWidth = 16; - pbmi->bmiHeader.biBitCount = 1; - pbmi->bmiHeader.biPlanes = 1; - pbmi->bmiHeader.biCompression = BI_RGB; - pbmi->bmiColors[0].rgbRed = 0xff; - pbmi->bmiColors[0].rgbGreen = 0; - pbmi->bmiColors[0].rgbBlue = 0; - pbmi->bmiColors[1].rgbRed = 0; - pbmi->bmiColors[1].rgbGreen = 0; - pbmi->bmiColors[1].rgbBlue = 0xff; - - hdib = CreateDIBSection(hdc, pbmi, DIB_RGB_COLORS, (void**)&bits, NULL, 0); - ok(hdib != NULL, "CreateDIBSection failed\n"); - ok(GetObject(hdib, sizeof(DIBSECTION), &dibsec) != 0, "GetObject failed for DIBSection\n"); - ok(dibsec.dsBmih.biClrUsed == 2, - "created DIBSection: wrong biClrUsed field: %u, should be: %u\n", dibsec.dsBmih.biClrUsed, 2); - - /* Test if the old BITMAPCOREINFO structure is supported */ - - pbci->bmciHeader.bcSize = sizeof(BITMAPCOREHEADER); - pbci->bmciHeader.bcBitCount = 0; - - ret = GetDIBits(hdc, hdib, 0, 16, NULL, (BITMAPINFO*) pbci, DIB_RGB_COLORS); - ok(ret, "GetDIBits doesn't work with a BITMAPCOREHEADER\n"); - ok((pbci->bmciHeader.bcWidth == 16) && (pbci->bmciHeader.bcHeight == 16) - && (pbci->bmciHeader.bcBitCount == 1) && (pbci->bmciHeader.bcPlanes == 1), - "GetDIBits didn't fill in the BITMAPCOREHEADER structure properly\n"); - - ret = GetDIBits(hdc, hdib, 0, 16, &coreBits, (BITMAPINFO*) pbci, DIB_RGB_COLORS); - ok(ret, "GetDIBits doesn't work with a BITMAPCOREHEADER\n"); - ok((pbci->bmciColors[0].rgbtRed == 0xff) && (pbci->bmciColors[0].rgbtGreen == 0) && - (pbci->bmciColors[0].rgbtBlue == 0) && (pbci->bmciColors[1].rgbtRed == 0) && - (pbci->bmciColors[1].rgbtGreen == 0) && (pbci->bmciColors[1].rgbtBlue == 0xff), - "The color table has not been translated to the old BITMAPCOREINFO format\n"); - - hcoredib = CreateDIBSection(hdc, (BITMAPINFO*) pbci, DIB_RGB_COLORS, (void**)&bits, NULL, 0); - ok(hcoredib != NULL, "CreateDIBSection failed with a BITMAPCOREINFO\n"); - - ZeroMemory(pbci->bmciColors, 256 * sizeof(RGBTRIPLE)); - ret = GetDIBits(hdc, hcoredib, 0, 16, &coreBits, (BITMAPINFO*) pbci, DIB_RGB_COLORS); - ok(ret, "GetDIBits doesn't work with a BITMAPCOREHEADER\n"); - ok((pbci->bmciColors[0].rgbtRed == 0xff) && (pbci->bmciColors[0].rgbtGreen == 0) && - (pbci->bmciColors[0].rgbtBlue == 0) && (pbci->bmciColors[1].rgbtRed == 0) && - (pbci->bmciColors[1].rgbtGreen == 0) && (pbci->bmciColors[1].rgbtBlue == 0xff), - "The color table has not been translated to the old BITMAPCOREINFO format\n"); - - DeleteObject(hcoredib); - - hdcmem = CreateCompatibleDC(hdc); - oldbm = SelectObject(hdcmem, hdib); - - ret = GetDIBColorTable(hdcmem, 0, 2, rgb); - ok(ret == 2, "GetDIBColorTable returned %d\n", ret); - ok(!memcmp(rgb, pbmi->bmiColors, 2 * sizeof(RGBQUAD)), - "GetDIBColorTable returns table 0: r%02x g%02x b%02x res%02x 1: r%02x g%02x b%02x res%02x\n", - rgb[0].rgbRed, rgb[0].rgbGreen, rgb[0].rgbBlue, rgb[0].rgbReserved, - rgb[1].rgbRed, rgb[1].rgbGreen, rgb[1].rgbBlue, rgb[1].rgbReserved); - - c0 = RGB(pbmi->bmiColors[0].rgbRed, pbmi->bmiColors[0].rgbGreen, pbmi->bmiColors[0].rgbBlue); - c1 = RGB(pbmi->bmiColors[1].rgbRed, pbmi->bmiColors[1].rgbGreen, pbmi->bmiColors[1].rgbBlue); - - test_color(hdcmem, DIBINDEX(0), c0, 0, 1); - test_color(hdcmem, DIBINDEX(1), c1, 0, 1); - test_color(hdcmem, DIBINDEX(2), c0, 1, 1); - test_color(hdcmem, PALETTEINDEX(0), c0, 1, 1); - test_color(hdcmem, PALETTEINDEX(1), c0, 1, 1); - test_color(hdcmem, PALETTEINDEX(2), c0, 1, 1); - test_color(hdcmem, PALETTERGB(pbmi->bmiColors[0].rgbRed, pbmi->bmiColors[0].rgbGreen, - pbmi->bmiColors[0].rgbBlue), c0, 1, 1); - test_color(hdcmem, PALETTERGB(pbmi->bmiColors[1].rgbRed, pbmi->bmiColors[1].rgbGreen, - pbmi->bmiColors[1].rgbBlue), c1, 1, 1); - test_color(hdcmem, PALETTERGB(0, 0, 0), c0, 1, 1); - test_color(hdcmem, PALETTERGB(0xff, 0xff, 0xff), c0, 1, 1); - test_color(hdcmem, PALETTERGB(0, 0, 0xfe), c1, 1, 1); - - SelectObject(hdcmem, oldbm); - DeleteObject(hdib); - - pbmi->bmiColors[0].rgbRed = 0xff; - pbmi->bmiColors[0].rgbGreen = 0xff; - pbmi->bmiColors[0].rgbBlue = 0xff; - pbmi->bmiColors[1].rgbRed = 0; - pbmi->bmiColors[1].rgbGreen = 0; - pbmi->bmiColors[1].rgbBlue = 0; - - hdib = CreateDIBSection(hdc, pbmi, DIB_RGB_COLORS, (void**)&bits, NULL, 0); - ok(hdib != NULL, "CreateDIBSection failed\n"); - - test_dib_info(hdib, bits, &pbmi->bmiHeader); - - oldbm = SelectObject(hdcmem, hdib); - - ret = GetDIBColorTable(hdcmem, 0, 2, rgb); - ok(ret == 2, "GetDIBColorTable returned %d\n", ret); - ok(!memcmp(rgb, pbmi->bmiColors, 2 * sizeof(RGBQUAD)), - "GetDIBColorTable returns table 0: r%02x g%02x b%02x res%02x 1: r%02x g%02x b%02x res%02x\n", - rgb[0].rgbRed, rgb[0].rgbGreen, rgb[0].rgbBlue, rgb[0].rgbReserved, - rgb[1].rgbRed, rgb[1].rgbGreen, rgb[1].rgbBlue, rgb[1].rgbReserved); - - SelectObject(hdcmem, oldbm); - test_dib_info(hdib, bits, &pbmi->bmiHeader); - DeleteObject(hdib); - - pbmi->bmiHeader.biBitCount = 4; - for (i = 0; i < 16; i++) { - pbmi->bmiColors[i].rgbRed = i; - pbmi->bmiColors[i].rgbGreen = 16-i; - pbmi->bmiColors[i].rgbBlue = 0; - } - hdib = CreateDIBSection(hdcmem, pbmi, DIB_RGB_COLORS, (void**)&bits, NULL, 0); - ok(hdib != NULL, "CreateDIBSection failed\n"); - ok(GetObject(hdib, sizeof(DIBSECTION), &dibsec) != 0, "GetObject failed for DIB Section\n"); - ok(dibsec.dsBmih.biClrUsed == 16, - "created DIBSection: wrong biClrUsed field: %u, should be: %u\n", dibsec.dsBmih.biClrUsed, 16); - test_dib_info(hdib, bits, &pbmi->bmiHeader); - DeleteObject(hdib); - - pbmi->bmiHeader.biBitCount = 8; - - for (i = 0; i < 128; i++) { - pbmi->bmiColors[i].rgbRed = 255 - i * 2; - pbmi->bmiColors[i].rgbGreen = i * 2; - pbmi->bmiColors[i].rgbBlue = 0; - pbmi->bmiColors[255 - i].rgbRed = 0; - pbmi->bmiColors[255 - i].rgbGreen = i * 2; - pbmi->bmiColors[255 - i].rgbBlue = 255 - i * 2; - } - hdib = CreateDIBSection(hdcmem, pbmi, DIB_RGB_COLORS, (void**)&bits, NULL, 0); - ok(hdib != NULL, "CreateDIBSection failed\n"); - ok(GetObject(hdib, sizeof(DIBSECTION), &dibsec) != 0, "GetObject failed for DIB Section\n"); - ok(dibsec.dsBmih.biClrUsed == 256, - "created DIBSection: wrong biClrUsed field: %u, should be: %u\n", dibsec.dsBmih.biClrUsed, 256); - - oldbm = SelectObject(hdcmem, hdib); - - for (i = 0; i < 256; i++) { - test_color(hdcmem, DIBINDEX(i), - RGB(pbmi->bmiColors[i].rgbRed, pbmi->bmiColors[i].rgbGreen, pbmi->bmiColors[i].rgbBlue), 0, 0); - test_color(hdcmem, PALETTERGB(pbmi->bmiColors[i].rgbRed, pbmi->bmiColors[i].rgbGreen, pbmi->bmiColors[i].rgbBlue), - RGB(pbmi->bmiColors[i].rgbRed, pbmi->bmiColors[i].rgbGreen, pbmi->bmiColors[i].rgbBlue), 0, 0); - } - - SelectObject(hdcmem, oldbm); - test_dib_info(hdib, bits, &pbmi->bmiHeader); - DeleteObject(hdib); - - pbmi->bmiHeader.biBitCount = 1; - - /* Now create a palette and a palette indexed dib section */ - memset(plogpal, 0, sizeof(logpalbuf)); - plogpal->palVersion = 0x300; - plogpal->palNumEntries = 2; - plogpal->palPalEntry[0].peRed = 0xff; - plogpal->palPalEntry[0].peBlue = 0xff; - plogpal->palPalEntry[1].peGreen = 0xff; - - index = (WORD*)pbmi->bmiColors; - *index++ = 0; - *index = 1; - hpal = CreatePalette(plogpal); - ok(hpal != NULL, "CreatePalette failed\n"); - oldpal = SelectPalette(hdc, hpal, TRUE); - hdib = CreateDIBSection(hdc, pbmi, DIB_PAL_COLORS, (void**)&bits, NULL, 0); - ok(hdib != NULL, "CreateDIBSection failed\n"); - ok(GetObject(hdib, sizeof(DIBSECTION), &dibsec) != 0, "GetObject failed for DIB Section\n"); - ok(dibsec.dsBmih.biClrUsed == 2, "created DIBSection: wrong biClrUsed field: %u, should be: %u\n", dibsec.dsBmih.biClrUsed, 2); - - /* The colour table has already been grabbed from the dc, so we select back the - old palette */ - - SelectPalette(hdc, oldpal, TRUE); - oldbm = SelectObject(hdcmem, hdib); - oldpal = SelectPalette(hdcmem, hpal, TRUE); - - ret = GetDIBColorTable(hdcmem, 0, 2, rgb); - ok(ret == 2, "GetDIBColorTable returned %d\n", ret); - ok(rgb[0].rgbRed == 0xff && rgb[0].rgbBlue == 0xff && rgb[0].rgbGreen == 0 && - rgb[1].rgbRed == 0 && rgb[1].rgbBlue == 0 && rgb[1].rgbGreen == 0xff, - "GetDIBColorTable returns table 0: r%02x g%02x b%02x res%02x 1: r%02x g%02x b%02x res%02x\n", - rgb[0].rgbRed, rgb[0].rgbGreen, rgb[0].rgbBlue, rgb[0].rgbReserved, - rgb[1].rgbRed, rgb[1].rgbGreen, rgb[1].rgbBlue, rgb[1].rgbReserved); - - c0 = RGB(plogpal->palPalEntry[0].peRed, plogpal->palPalEntry[0].peGreen, plogpal->palPalEntry[0].peBlue); - c1 = RGB(plogpal->palPalEntry[1].peRed, plogpal->palPalEntry[1].peGreen, plogpal->palPalEntry[1].peBlue); - - test_color(hdcmem, DIBINDEX(0), c0, 0, 1); - test_color(hdcmem, DIBINDEX(1), c1, 0, 1); - test_color(hdcmem, DIBINDEX(2), c0, 1, 1); - test_color(hdcmem, PALETTEINDEX(0), c0, 0, 1); - test_color(hdcmem, PALETTEINDEX(1), c1, 0, 1); - test_color(hdcmem, PALETTEINDEX(2), c0, 1, 1); - test_color(hdcmem, PALETTERGB(plogpal->palPalEntry[0].peRed, plogpal->palPalEntry[0].peGreen, - plogpal->palPalEntry[0].peBlue), c0, 1, 1); - test_color(hdcmem, PALETTERGB(plogpal->palPalEntry[1].peRed, plogpal->palPalEntry[1].peGreen, - plogpal->palPalEntry[1].peBlue), c1, 1, 1); - test_color(hdcmem, PALETTERGB(0, 0, 0), c1, 1, 1); - test_color(hdcmem, PALETTERGB(0xff, 0xff, 0xff), c0, 1, 1); - test_color(hdcmem, PALETTERGB(0, 0, 0xfe), c0, 1, 1); - test_color(hdcmem, PALETTERGB(0, 1, 0), c1, 1, 1); - test_color(hdcmem, PALETTERGB(0x3f, 0, 0x3f), c1, 1, 1); - test_color(hdcmem, PALETTERGB(0x40, 0, 0x40), c0, 1, 1); - - /* Bottom and 2nd row from top green, everything else magenta */ - bits[0] = bits[1] = 0xff; - bits[13 * 4] = bits[13*4 + 1] = 0xff; - - test_dib_info(hdib, bits, &pbmi->bmiHeader); - - pbmi->bmiHeader.biBitCount = 32; - - hdib2 = CreateDIBSection(NULL, pbmi, DIB_RGB_COLORS, (void **)&bits32, NULL, 0); - ok(hdib2 != NULL, "CreateDIBSection failed\n"); - hdcmem2 = CreateCompatibleDC(hdc); - oldbm2 = SelectObject(hdcmem2, hdib2); - - BitBlt(hdcmem2, 0, 0, 16,16, hdcmem, 0, 0, SRCCOPY); - - ok(bits32[0] == 0xff00, "lower left pixel is %08x\n", bits32[0]); - ok(bits32[17] == 0xff00ff, "bottom but one, left pixel is %08x\n", bits32[17]); - - SelectObject(hdcmem2, oldbm2); - test_dib_info(hdib2, bits32, &pbmi->bmiHeader); - DeleteObject(hdib2); - - SelectObject(hdcmem, oldbm); - SelectPalette(hdcmem, oldpal, TRUE); - DeleteObject(hdib); - DeleteObject(hpal); - - - pbmi->bmiHeader.biBitCount = 8; - - memset(plogpal, 0, sizeof(logpalbuf)); - plogpal->palVersion = 0x300; - plogpal->palNumEntries = 256; - - for (i = 0; i < 128; i++) { - plogpal->palPalEntry[i].peRed = 255 - i * 2; - plogpal->palPalEntry[i].peBlue = i * 2; - plogpal->palPalEntry[i].peGreen = 0; - plogpal->palPalEntry[255 - i].peRed = 0; - plogpal->palPalEntry[255 - i].peGreen = i * 2; - plogpal->palPalEntry[255 - i].peBlue = 255 - i * 2; - } - - index = (WORD*)pbmi->bmiColors; - for (i = 0; i < 256; i++) { - *index++ = i; - } - - hpal = CreatePalette(plogpal); - ok(hpal != NULL, "CreatePalette failed\n"); - oldpal = SelectPalette(hdc, hpal, TRUE); - hdib = CreateDIBSection(hdc, pbmi, DIB_PAL_COLORS, (void**)&bits, NULL, 0); - ok(hdib != NULL, "CreateDIBSection failed\n"); - ok(GetObject(hdib, sizeof(DIBSECTION), &dibsec) != 0, "GetObject failed for DIB Section\n"); - ok(dibsec.dsBmih.biClrUsed == 256, "created DIBSection: wrong biClrUsed field: %u, should be: %u\n", dibsec.dsBmih.biClrUsed, 256); - - test_dib_info(hdib, bits, &pbmi->bmiHeader); - - SelectPalette(hdc, oldpal, TRUE); - oldbm = SelectObject(hdcmem, hdib); - oldpal = SelectPalette(hdcmem, hpal, TRUE); - - ret = GetDIBColorTable(hdcmem, 0, 256, rgb); - ok(ret == 256, "GetDIBColorTable returned %d\n", ret); - for (i = 0; i < 256; i++) { - ok(rgb[i].rgbRed == plogpal->palPalEntry[i].peRed && - rgb[i].rgbBlue == plogpal->palPalEntry[i].peBlue && - rgb[i].rgbGreen == plogpal->palPalEntry[i].peGreen, - "GetDIBColorTable returns table %d: r%02x g%02x b%02x res%02x\n", - i, rgb[i].rgbRed, rgb[i].rgbGreen, rgb[i].rgbBlue, rgb[i].rgbReserved); - } - - for (i = 0; i < 256; i++) { - test_color(hdcmem, DIBINDEX(i), - RGB(plogpal->palPalEntry[i].peRed, plogpal->palPalEntry[i].peGreen, plogpal->palPalEntry[i].peBlue), 0, 0); - test_color(hdcmem, PALETTEINDEX(i), - RGB(plogpal->palPalEntry[i].peRed, plogpal->palPalEntry[i].peGreen, plogpal->palPalEntry[i].peBlue), 0, 0); - test_color(hdcmem, PALETTERGB(plogpal->palPalEntry[i].peRed, plogpal->palPalEntry[i].peGreen, plogpal->palPalEntry[i].peBlue), - RGB(plogpal->palPalEntry[i].peRed, plogpal->palPalEntry[i].peGreen, plogpal->palPalEntry[i].peBlue), 0, 0); - } - - SelectPalette(hdcmem, oldpal, TRUE); - SelectObject(hdcmem, oldbm); - DeleteObject(hdib); - DeleteObject(hpal); - - DeleteDC(hdcmem); - DeleteDC(hdcmem2); - ReleaseDC(0, hdc); -} - -static void test_dib_formats(void) -{ - BITMAPINFO *bi; - char data[256]; - void *bits; - //int planes, bpp, compr; - HBITMAP hdib, hbmp; - HDC hdc, memdc; - UINT ret; - //BOOL expect_ok, todo; - - bi = HeapAlloc( GetProcessHeap(), 0, FIELD_OFFSET( BITMAPINFO, bmiColors[256] ) ); - hdc = GetDC( 0 ); - memdc = CreateCompatibleDC( 0 ); - hbmp = CreateCompatibleBitmap( hdc, 10, 10 ); - - memset( data, 0xaa, sizeof(data) ); - -#if 0 // FIXME: ReactOS Bug 6527 - for (bpp = 0; bpp <= 64; bpp++) - { - for (planes = 0; planes <= 64; planes++) - { - for (compr = 0; compr < 8; compr++) - { - switch (bpp) - { - case 1: - case 4: - case 8: - case 24: expect_ok = (compr == BI_RGB); break; - case 16: - case 32: expect_ok = (compr == BI_RGB || compr == BI_BITFIELDS); break; - default: expect_ok = FALSE; break; - } - todo = (compr == BI_BITFIELDS); /* wine doesn't like strange bitfields */ - - memset( bi, 0, sizeof(bi->bmiHeader) ); - bi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bi->bmiHeader.biWidth = 2; - bi->bmiHeader.biHeight = 2; - bi->bmiHeader.biPlanes = planes; - bi->bmiHeader.biBitCount = bpp; - bi->bmiHeader.biCompression = compr; - bi->bmiHeader.biSizeImage = 0; - memset( bi->bmiColors, 0xaa, sizeof(RGBQUAD) * 256 ); - ret = GetDIBits(hdc, hbmp, 0, 0, data, bi, DIB_RGB_COLORS); - if (expect_ok || (!bpp && compr != BI_JPEG && compr != BI_PNG) || - (bpp == 4 && compr == BI_RLE4) || (bpp == 8 && compr == BI_RLE8)) - ok( ret, "GetDIBits failed for %u/%u/%u\n", bpp, planes, compr ); - else - ok( !ret || broken(!bpp && (compr == BI_JPEG || compr == BI_PNG)), /* nt4 */ - "GetDIBits succeeded for %u/%u/%u\n", bpp, planes, compr ); - - /* all functions check planes except GetDIBits with 0 lines */ - if (!planes) expect_ok = FALSE; - memset( bi, 0, sizeof(bi->bmiHeader) ); - bi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bi->bmiHeader.biWidth = 2; - bi->bmiHeader.biHeight = 2; - bi->bmiHeader.biPlanes = planes; - bi->bmiHeader.biBitCount = bpp; - bi->bmiHeader.biCompression = compr; - bi->bmiHeader.biSizeImage = 0; - memset( bi->bmiColors, 0xaa, sizeof(RGBQUAD) * 256 ); - - hdib = CreateDIBSection(hdc, bi, DIB_RGB_COLORS, &bits, NULL, 0); - if (expect_ok && (planes == 1 || planes * bpp <= 16)) - ok( hdib != NULL, "CreateDIBSection failed for %u/%u/%u\n", bpp, planes, compr ); - else - ok( hdib == NULL, "CreateDIBSection succeeded for %u/%u/%u\n", bpp, planes, compr ); - if (hdib) DeleteObject( hdib ); - - hdib = CreateDIBitmap( hdc, &bi->bmiHeader, 0, data, bi, DIB_RGB_COLORS ); - /* no sanity checks in CreateDIBitmap except compression */ - if (compr == BI_JPEG || compr == BI_PNG) - ok( hdib == NULL || broken(hdib != NULL), /* nt4 */ - "CreateDIBitmap succeeded for %u/%u/%u\n", bpp, planes, compr ); - else - ok( hdib != NULL, "CreateDIBitmap failed for %u/%u/%u\n", bpp, planes, compr ); - if (hdib) DeleteObject( hdib ); - - /* RLE needs a size */ - bi->bmiHeader.biSizeImage = 0; - ret = SetDIBits(hdc, hbmp, 0, 1, data, bi, DIB_RGB_COLORS); - if (expect_ok) - { - if (todo) - todo_wine ok( ret, "SetDIBits failed for %u/%u/%u\n", bpp, planes, compr ); - else - ok( ret, "SetDIBits failed for %u/%u/%u\n", bpp, planes, compr ); - } - else - ok( !ret || - broken((bpp == 4 && compr == BI_RLE4) || (bpp == 8 && compr == BI_RLE8)), /* nt4 */ - "SetDIBits succeeded for %u/%u/%u\n", bpp, planes, compr ); - ret = SetDIBitsToDevice( memdc, 0, 0, 1, 1, 0, 0, 0, 1, data, bi, DIB_RGB_COLORS ); - if (expect_ok) - { - if (todo) - todo_wine ok( ret, "SetDIBitsToDevice failed for %u/%u/%u\n", bpp, planes, compr ); - else - ok( ret, "SetDIBitsToDevice failed for %u/%u/%u\n", bpp, planes, compr ); - } - else - ok( !ret || - broken((bpp == 4 && compr == BI_RLE4) || (bpp == 8 && compr == BI_RLE8)), /* nt4 */ - "SetDIBitsToDevice succeeded for %u/%u/%u\n", bpp, planes, compr ); - ret = StretchDIBits( memdc, 0, 0, 1, 1, 0, 0, 1, 1, data, bi, DIB_RGB_COLORS, SRCCOPY ); - if (expect_ok) - { - if (todo) - todo_wine ok( ret, "StretchDIBits failed for %u/%u/%u\n", bpp, planes, compr ); - else - ok( ret, "StretchDIBits failed for %u/%u/%u\n", bpp, planes, compr ); - } - else - ok( !ret || - broken((bpp == 4 && compr == BI_RLE4) || (bpp == 8 && compr == BI_RLE8)), /* nt4 */ - "StretchDIBits succeeded for %u/%u/%u\n", bpp, planes, compr ); - - ret = GetDIBits(hdc, hbmp, 0, 2, data, bi, DIB_RGB_COLORS); - if (expect_ok) - ok( ret, "GetDIBits failed for %u/%u/%u\n", bpp, planes, compr ); - else - ok( !ret, "GetDIBits succeeded for %u/%u/%u\n", bpp, planes, compr ); - ok( bi->bmiHeader.biBitCount == bpp, "GetDIBits modified bpp %u/%u\n", - bpp, bi->bmiHeader.biBitCount ); - - bi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bi->bmiHeader.biWidth = 2; - bi->bmiHeader.biHeight = 2; - bi->bmiHeader.biPlanes = planes; - bi->bmiHeader.biBitCount = bpp; - bi->bmiHeader.biCompression = compr; - bi->bmiHeader.biSizeImage = 1; - memset( bi->bmiColors, 0xaa, sizeof(RGBQUAD) * 256 ); - /* RLE allowed with valid biSizeImage */ - if ((bpp == 4 && compr == BI_RLE4) || (bpp == 8 && compr == BI_RLE8)) expect_ok = TRUE; - - ret = SetDIBits(hdc, hbmp, 0, 1, data, bi, DIB_RGB_COLORS); - if (expect_ok) - { - if (todo) - todo_wine ok( ret, "SetDIBits failed for %u/%u/%u\n", bpp, planes, compr ); - else - ok( ret, "SetDIBits failed for %u/%u/%u\n", bpp, planes, compr ); - } - else - ok( !ret, "SetDIBits succeeded for %u/%u/%u\n", bpp, planes, compr ); - ret = SetDIBitsToDevice( memdc, 0, 0, 1, 1, 0, 0, 0, 1, data, bi, DIB_RGB_COLORS ); - if (expect_ok) - { - if (todo) - todo_wine ok( ret, "SetDIBitsToDevice failed for %u/%u/%u\n", bpp, planes, compr ); - else - ok( ret, "SetDIBitsToDevice failed for %u/%u/%u\n", bpp, planes, compr ); - } - else - ok( !ret, "SetDIBitsToDevice succeeded for %u/%u/%u\n", bpp, planes, compr ); - ret = StretchDIBits( memdc, 0, 0, 1, 1, 0, 0, 1, 1, data, bi, DIB_RGB_COLORS, SRCCOPY ); - if (expect_ok) - { - if (todo) - todo_wine ok( ret, "StretchDIBits failed for %u/%u/%u\n", bpp, planes, compr ); - else - ok( ret, "StretchDIBits failed for %u/%u/%u\n", bpp, planes, compr ); - } - else - ok( !ret, "StretchDIBits succeeded for %u/%u/%u\n", bpp, planes, compr ); - - bi->bmiHeader.biSizeImage = 0; - ret = GetDIBits(hdc, hbmp, 0, 2, NULL, bi, DIB_RGB_COLORS); - if (expect_ok || !bpp) - ok( ret, "GetDIBits failed for %u/%u/%u\n", bpp, planes, compr ); - else - ok( !ret, "GetDIBits succeeded for %u/%u/%u\n", bpp, planes, compr ); - } - } - } -#endif - - memset( bi, 0, sizeof(bi->bmiHeader) ); - bi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bi->bmiHeader.biWidth = 2; - bi->bmiHeader.biHeight = 2; - bi->bmiHeader.biPlanes = 1; - bi->bmiHeader.biBitCount = 16; - bi->bmiHeader.biCompression = BI_BITFIELDS; - bi->bmiHeader.biSizeImage = 0; - *(DWORD *)&bi->bmiColors[0] = 0; - *(DWORD *)&bi->bmiColors[1] = 0; - *(DWORD *)&bi->bmiColors[2] = 0; - - hdib = CreateDIBSection(hdc, bi, DIB_RGB_COLORS, &bits, NULL, 0); - ok( hdib == NULL, "CreateDIBSection succeeded with null bitfields\n" ); - ret = SetDIBits(hdc, hbmp, 0, 1, data, bi, DIB_RGB_COLORS); - ok( !ret, "SetDIBits succeeded with null bitfields\n" ); - /* other functions don't check */ - hdib = CreateDIBitmap( hdc, &bi->bmiHeader, 0, bits, bi, DIB_RGB_COLORS ); - ok( hdib != NULL, "CreateDIBitmap failed with null bitfields\n" ); - DeleteObject( hdib ); - ret = SetDIBitsToDevice( memdc, 0, 0, 1, 1, 0, 0, 0, 1, data, bi, DIB_RGB_COLORS ); - todo_wine ok( ret, "SetDIBitsToDevice failed with null bitfields\n" ); - ret = StretchDIBits( memdc, 0, 0, 1, 1, 0, 0, 1, 1, data, bi, DIB_RGB_COLORS, SRCCOPY ); - todo_wine ok( ret, "StretchDIBits failed with null bitfields\n" ); - ret = GetDIBits(hdc, hbmp, 0, 2, data, bi, DIB_RGB_COLORS); - ok( ret, "GetDIBits failed with null bitfields\n" ); - bi->bmiHeader.biPlanes = 1; - bi->bmiHeader.biBitCount = 16; - bi->bmiHeader.biCompression = BI_BITFIELDS; - bi->bmiHeader.biSizeImage = 0; - *(DWORD *)&bi->bmiColors[0] = 0; - *(DWORD *)&bi->bmiColors[1] = 0; - *(DWORD *)&bi->bmiColors[2] = 0; - ret = GetDIBits(hdc, hbmp, 0, 2, NULL, bi, DIB_RGB_COLORS); - ok( ret, "GetDIBits failed with null bitfields\n" ); - - /* all fields must be non-zero */ - *(DWORD *)&bi->bmiColors[0] = 3; - *(DWORD *)&bi->bmiColors[1] = 0; - *(DWORD *)&bi->bmiColors[2] = 7; - hdib = CreateDIBSection(hdc, bi, DIB_RGB_COLORS, &bits, NULL, 0); - ok( hdib == NULL, "CreateDIBSection succeeded with null bitfields\n" ); - ret = SetDIBits(hdc, hbmp, 0, 1, data, bi, DIB_RGB_COLORS); - ok( !ret, "SetDIBits succeeded with null bitfields\n" ); - - /* garbage is ok though */ - *(DWORD *)&bi->bmiColors[0] = 0x55; - *(DWORD *)&bi->bmiColors[1] = 0x44; - *(DWORD *)&bi->bmiColors[2] = 0x33; - hdib = CreateDIBSection(hdc, bi, DIB_RGB_COLORS, &bits, NULL, 0); - ok( hdib != NULL, "CreateDIBSection failed with bad bitfields\n" ); - if (hdib) DeleteObject( hdib ); - ret = SetDIBits(hdc, hbmp, 0, 1, data, bi, DIB_RGB_COLORS); - todo_wine ok( ret, "SetDIBits failed with bad bitfields\n" ); - - bi->bmiHeader.biWidth = -2; - bi->bmiHeader.biHeight = 2; - bi->bmiHeader.biBitCount = 32; - bi->bmiHeader.biCompression = BI_RGB; - hdib = CreateDIBSection(hdc, bi, DIB_RGB_COLORS, &bits, NULL, 0); - ok( hdib == NULL, "CreateDIBSection succeeded with negative width\n" ); - hdib = CreateDIBitmap( hdc, &bi->bmiHeader, 0, bits, bi, DIB_RGB_COLORS ); - ok( hdib == NULL, "CreateDIBitmap succeeded with negative width\n" ); - ret = SetDIBits(hdc, hbmp, 0, 1, data, bi, DIB_RGB_COLORS); - ok( !ret, "SetDIBits succeeded with negative width\n" ); - ret = SetDIBitsToDevice( memdc, 0, 0, 1, 1, 0, 0, 0, 1, data, bi, DIB_RGB_COLORS ); - ok( !ret, "SetDIBitsToDevice succeeded with negative width\n" ); - ret = StretchDIBits( memdc, 0, 0, 1, 1, 0, 0, 1, 1, data, bi, DIB_RGB_COLORS, SRCCOPY ); - ok( !ret, "StretchDIBits succeeded with negative width\n" ); - ret = GetDIBits(hdc, hbmp, 0, 2, data, bi, DIB_RGB_COLORS); - ok( !ret, "GetDIBits succeeded with negative width\n" ); - bi->bmiHeader.biWidth = -2; - bi->bmiHeader.biHeight = 2; - bi->bmiHeader.biBitCount = 32; - bi->bmiHeader.biCompression = BI_RGB; - ret = GetDIBits(hdc, hbmp, 0, 2, NULL, bi, DIB_RGB_COLORS); - ok( !ret || broken(ret), /* nt4 */ "GetDIBits succeeded with negative width\n" ); - - bi->bmiHeader.biWidth = 0; - bi->bmiHeader.biHeight = 2; - bi->bmiHeader.biBitCount = 32; - bi->bmiHeader.biCompression = BI_RGB; - hdib = CreateDIBSection(hdc, bi, DIB_RGB_COLORS, &bits, NULL, 0); - ok( hdib == NULL, "CreateDIBSection succeeded with zero width\n" ); - hdib = CreateDIBitmap( hdc, &bi->bmiHeader, 0, bits, bi, DIB_RGB_COLORS ); - ok( hdib != NULL, "CreateDIBitmap failed with zero width\n" ); - DeleteObject( hdib ); - ret = SetDIBits(hdc, hbmp, 0, 1, data, bi, DIB_RGB_COLORS); - ok( !ret || broken(ret), /* nt4 */ "SetDIBits succeeded with zero width\n" ); - ret = SetDIBitsToDevice( memdc, 0, 0, 1, 1, 0, 0, 0, 1, data, bi, DIB_RGB_COLORS ); - ok( !ret || broken(ret), /* nt4 */ "SetDIBitsToDevice succeeded with zero width\n" ); - ret = StretchDIBits( memdc, 0, 0, 1, 1, 0, 0, 1, 1, data, bi, DIB_RGB_COLORS, SRCCOPY ); - ok( !ret || broken(ret), /* nt4 */ "StretchDIBits succeeded with zero width\n" ); - ret = GetDIBits(hdc, hbmp, 0, 2, data, bi, DIB_RGB_COLORS); - ok( !ret, "GetDIBits succeeded with zero width\n" ); - bi->bmiHeader.biWidth = 0; - bi->bmiHeader.biHeight = 2; - bi->bmiHeader.biBitCount = 32; - bi->bmiHeader.biCompression = BI_RGB; - ret = GetDIBits(hdc, hbmp, 0, 2, NULL, bi, DIB_RGB_COLORS); - ok( !ret || broken(ret), /* nt4 */ "GetDIBits succeeded with zero width\n" ); - - bi->bmiHeader.biWidth = 2; - bi->bmiHeader.biHeight = 0; - bi->bmiHeader.biBitCount = 32; - bi->bmiHeader.biCompression = BI_RGB; - hdib = CreateDIBSection(hdc, bi, DIB_RGB_COLORS, &bits, NULL, 0); - ok( hdib == NULL, "CreateDIBSection succeeded with zero height\n" ); - hdib = CreateDIBitmap( hdc, &bi->bmiHeader, 0, bits, bi, DIB_RGB_COLORS ); - ok( hdib != NULL, "CreateDIBitmap failed with zero height\n" ); - DeleteObject( hdib ); - ret = SetDIBits(hdc, hbmp, 0, 1, data, bi, DIB_RGB_COLORS); - ok( !ret, "SetDIBits succeeded with zero height\n" ); - ret = SetDIBitsToDevice( memdc, 0, 0, 1, 1, 0, 0, 0, 1, data, bi, DIB_RGB_COLORS ); - ok( !ret, "SetDIBitsToDevice succeeded with zero height\n" ); - ret = StretchDIBits( memdc, 0, 0, 1, 1, 0, 0, 1, 1, data, bi, DIB_RGB_COLORS, SRCCOPY ); - ok( !ret, "StretchDIBits succeeded with zero height\n" ); - ret = GetDIBits(hdc, hbmp, 0, 2, data, bi, DIB_RGB_COLORS); - ok( !ret || broken(ret), /* nt4 */ "GetDIBits succeeded with zero height\n" ); - bi->bmiHeader.biWidth = 2; - bi->bmiHeader.biHeight = 0; - bi->bmiHeader.biBitCount = 32; - bi->bmiHeader.biCompression = BI_RGB; - ret = GetDIBits(hdc, hbmp, 0, 2, NULL, bi, DIB_RGB_COLORS); - ok( !ret || broken(ret), /* nt4 */ "GetDIBits succeeded with zero height\n" ); - - DeleteDC( memdc ); - DeleteObject( hbmp ); - ReleaseDC( 0, hdc ); - HeapFree( GetProcessHeap(), 0, bi ); -} - -static void test_mono_dibsection(void) -{ - HDC hdc, memdc; - HBITMAP old_bm, mono_ds; - char bmibuf[sizeof(BITMAPINFO) + 256 * sizeof(RGBQUAD)]; - BITMAPINFO *pbmi = (BITMAPINFO *)bmibuf; - BYTE bits[10 * 4]; - BYTE *ds_bits; - int num; - - hdc = GetDC(0); - - memdc = CreateCompatibleDC(hdc); - - memset(pbmi, 0, sizeof(bmibuf)); - pbmi->bmiHeader.biSize = sizeof(pbmi->bmiHeader); - pbmi->bmiHeader.biHeight = 10; - pbmi->bmiHeader.biWidth = 10; - pbmi->bmiHeader.biBitCount = 1; - pbmi->bmiHeader.biPlanes = 1; - pbmi->bmiHeader.biCompression = BI_RGB; - pbmi->bmiColors[0].rgbRed = 0xff; - pbmi->bmiColors[0].rgbGreen = 0xff; - pbmi->bmiColors[0].rgbBlue = 0xff; - pbmi->bmiColors[1].rgbRed = 0x0; - pbmi->bmiColors[1].rgbGreen = 0x0; - pbmi->bmiColors[1].rgbBlue = 0x0; - - /* - * First dib section is 'inverted' ie color[0] is white, color[1] is black - */ - - mono_ds = CreateDIBSection(hdc, pbmi, DIB_RGB_COLORS, (void**)&ds_bits, NULL, 0); - ok(mono_ds != NULL, "CreateDIBSection rets NULL\n"); - old_bm = SelectObject(memdc, mono_ds); - - /* black border, white interior */ - Rectangle(memdc, 0, 0, 10, 10); - ok(ds_bits[0] == 0xff, "out_bits %02x\n", ds_bits[0]); - ok(ds_bits[4] == 0x80, "out_bits %02x\n", ds_bits[4]); - - /* SetDIBitsToDevice with an inverted bmi -> inverted dib section */ - - memset(bits, 0, sizeof(bits)); - bits[0] = 0xaa; - - SetDIBitsToDevice(memdc, 0, 0, 10, 10, 0, 0, 0, 10, bits, pbmi, DIB_RGB_COLORS); - ok(ds_bits[0] == 0xaa, "out_bits %02x\n", ds_bits[0]); - - /* SetDIBitsToDevice with a normal bmi -> inverted dib section */ - - pbmi->bmiColors[0].rgbRed = 0x0; - pbmi->bmiColors[0].rgbGreen = 0x0; - pbmi->bmiColors[0].rgbBlue = 0x0; - pbmi->bmiColors[1].rgbRed = 0xff; - pbmi->bmiColors[1].rgbGreen = 0xff; - pbmi->bmiColors[1].rgbBlue = 0xff; - - SetDIBitsToDevice(memdc, 0, 0, 10, 10, 0, 0, 0, 10, bits, pbmi, DIB_RGB_COLORS); - ok(ds_bits[0] == 0x55, "out_bits %02x\n", ds_bits[0]); - - SelectObject(memdc, old_bm); - DeleteObject(mono_ds); - - /* - * Next dib section is 'normal' ie color[0] is black, color[1] is white - */ - - pbmi->bmiColors[0].rgbRed = 0x0; - pbmi->bmiColors[0].rgbGreen = 0x0; - pbmi->bmiColors[0].rgbBlue = 0x0; - pbmi->bmiColors[1].rgbRed = 0xff; - pbmi->bmiColors[1].rgbGreen = 0xff; - pbmi->bmiColors[1].rgbBlue = 0xff; - - mono_ds = CreateDIBSection(hdc, pbmi, DIB_RGB_COLORS, (void**)&ds_bits, NULL, 0); - ok(mono_ds != NULL, "CreateDIBSection rets NULL\n"); - old_bm = SelectObject(memdc, mono_ds); - - /* black border, white interior */ - Rectangle(memdc, 0, 0, 10, 10); - ok(ds_bits[0] == 0x00, "out_bits %02x\n", ds_bits[0]); - ok(ds_bits[4] == 0x7f, "out_bits %02x\n", ds_bits[4]); - - /* SetDIBitsToDevice with a normal bmi -> normal dib section */ - - SetDIBitsToDevice(memdc, 0, 0, 10, 10, 0, 0, 0, 10, bits, pbmi, DIB_RGB_COLORS); - ok(ds_bits[0] == 0xaa, "out_bits %02x\n", ds_bits[0]); - - /* SetDIBitsToDevice with a inverted bmi -> normal dib section */ - - pbmi->bmiColors[0].rgbRed = 0xff; - pbmi->bmiColors[0].rgbGreen = 0xff; - pbmi->bmiColors[0].rgbBlue = 0xff; - pbmi->bmiColors[1].rgbRed = 0x0; - pbmi->bmiColors[1].rgbGreen = 0x0; - pbmi->bmiColors[1].rgbBlue = 0x0; - - SetDIBitsToDevice(memdc, 0, 0, 10, 10, 0, 0, 0, 10, bits, pbmi, DIB_RGB_COLORS); - ok(ds_bits[0] == 0x55, "out_bits %02x\n", ds_bits[0]); - - /* - * Take that 'normal' dibsection and change its colour table to an 'inverted' one - */ - - pbmi->bmiColors[0].rgbRed = 0xff; - pbmi->bmiColors[0].rgbGreen = 0xff; - pbmi->bmiColors[0].rgbBlue = 0xff; - pbmi->bmiColors[1].rgbRed = 0x0; - pbmi->bmiColors[1].rgbGreen = 0x0; - pbmi->bmiColors[1].rgbBlue = 0x0; - num = SetDIBColorTable(memdc, 0, 2, pbmi->bmiColors); - ok(num == 2, "num = %d\n", num); - - /* black border, white interior */ - Rectangle(memdc, 0, 0, 10, 10); - ok(ds_bits[0] == 0xff, "out_bits %02x\n", ds_bits[0]); - ok(ds_bits[4] == 0x80, "out_bits %02x\n", ds_bits[4]); - - /* SetDIBitsToDevice with an inverted bmi -> inverted dib section */ - - memset(bits, 0, sizeof(bits)); - bits[0] = 0xaa; - - SetDIBitsToDevice(memdc, 0, 0, 10, 10, 0, 0, 0, 10, bits, pbmi, DIB_RGB_COLORS); - ok(ds_bits[0] == 0xaa, "out_bits %02x\n", ds_bits[0]); - - /* SetDIBitsToDevice with a normal bmi -> inverted dib section */ - - pbmi->bmiColors[0].rgbRed = 0x0; - pbmi->bmiColors[0].rgbGreen = 0x0; - pbmi->bmiColors[0].rgbBlue = 0x0; - pbmi->bmiColors[1].rgbRed = 0xff; - pbmi->bmiColors[1].rgbGreen = 0xff; - pbmi->bmiColors[1].rgbBlue = 0xff; - - SetDIBitsToDevice(memdc, 0, 0, 10, 10, 0, 0, 0, 10, bits, pbmi, DIB_RGB_COLORS); - ok(ds_bits[0] == 0x55, "out_bits %02x\n", ds_bits[0]); - - SelectObject(memdc, old_bm); - DeleteObject(mono_ds); - - /* - * Now a dib section with a strange colour map just for fun. This behaves just like an inverted one. - */ - - pbmi->bmiColors[0].rgbRed = 0xff; - pbmi->bmiColors[0].rgbGreen = 0x0; - pbmi->bmiColors[0].rgbBlue = 0x0; - pbmi->bmiColors[1].rgbRed = 0xfe; - pbmi->bmiColors[1].rgbGreen = 0x0; - pbmi->bmiColors[1].rgbBlue = 0x0; - - mono_ds = CreateDIBSection(hdc, pbmi, DIB_RGB_COLORS, (void**)&ds_bits, NULL, 0); - ok(mono_ds != NULL, "CreateDIBSection rets NULL\n"); - old_bm = SelectObject(memdc, mono_ds); - - /* black border, white interior */ - Rectangle(memdc, 0, 0, 10, 10); - ok(ds_bits[0] == 0xff, "out_bits %02x\n", ds_bits[0]); - ok(ds_bits[4] == 0x80, "out_bits %02x\n", ds_bits[4]); - - /* SetDIBitsToDevice with a normal bmi -> inverted dib section */ - - pbmi->bmiColors[0].rgbRed = 0x0; - pbmi->bmiColors[0].rgbGreen = 0x0; - pbmi->bmiColors[0].rgbBlue = 0x0; - pbmi->bmiColors[1].rgbRed = 0xff; - pbmi->bmiColors[1].rgbGreen = 0xff; - pbmi->bmiColors[1].rgbBlue = 0xff; - - SetDIBitsToDevice(memdc, 0, 0, 10, 10, 0, 0, 0, 10, bits, pbmi, DIB_RGB_COLORS); - ok(ds_bits[0] == 0x55, "out_bits %02x\n", ds_bits[0]); - - /* SetDIBitsToDevice with a inverted bmi -> inverted dib section */ - - pbmi->bmiColors[0].rgbRed = 0xff; - pbmi->bmiColors[0].rgbGreen = 0xff; - pbmi->bmiColors[0].rgbBlue = 0xff; - pbmi->bmiColors[1].rgbRed = 0x0; - pbmi->bmiColors[1].rgbGreen = 0x0; - pbmi->bmiColors[1].rgbBlue = 0x0; - - SetDIBitsToDevice(memdc, 0, 0, 10, 10, 0, 0, 0, 10, bits, pbmi, DIB_RGB_COLORS); - ok(ds_bits[0] == 0xaa, "out_bits %02x\n", ds_bits[0]); - - SelectObject(memdc, old_bm); - DeleteObject(mono_ds); - - DeleteDC(memdc); - ReleaseDC(0, hdc); -} - -static void test_bitmap(void) -{ - char buf[256], buf_cmp[256]; - HBITMAP hbmp, hbmp_old; - HDC hdc; - BITMAP bm; - BITMAP bma[2]; - INT ret; - - hdc = CreateCompatibleDC(0); - assert(hdc != 0); - - SetLastError(0xdeadbeef); - hbmp = CreateBitmap(0x7ffffff, 1, 1, 1, NULL); - if (!hbmp) - { - ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY /* XP */ || - GetLastError() == ERROR_INVALID_PARAMETER /* Win2k */, - "expected ERROR_NOT_ENOUGH_MEMORY, got %u\n", GetLastError()); - } - else - DeleteObject(hbmp); - - SetLastError(0xdeadbeef); - hbmp = CreateBitmap(0x7ffffff, 9, 1, 1, NULL); - if (!hbmp) - { - ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY /* XP */ || - GetLastError() == ERROR_INVALID_PARAMETER /* Win2k */, - "expected ERROR_NOT_ENOUGH_MEMORY, got %u\n", GetLastError()); - } - else - DeleteObject(hbmp); - - SetLastError(0xdeadbeef); - hbmp = CreateBitmap(0x7ffffff + 1, 1, 1, 1, NULL); - ok(!hbmp, "CreateBitmap should fail\n"); - if (!hbmp) - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); - else - DeleteObject(hbmp); - - hbmp = CreateBitmap(15, 15, 1, 1, NULL); - assert(hbmp != NULL); - - ret = GetObject(hbmp, sizeof(bm), &bm); - ok(ret == sizeof(bm), "wrong size %d\n", ret); - - ok(bm.bmType == 0, "wrong bm.bmType %d\n", bm.bmType); - ok(bm.bmWidth == 15, "wrong bm.bmWidth %d\n", bm.bmWidth); - ok(bm.bmHeight == 15, "wrong bm.bmHeight %d\n", bm.bmHeight); - ok(bm.bmWidthBytes == 2, "wrong bm.bmWidthBytes %d\n", bm.bmWidthBytes); - ok(bm.bmPlanes == 1, "wrong bm.bmPlanes %d\n", bm.bmPlanes); - ok(bm.bmBitsPixel == 1, "wrong bm.bmBitsPixel %d\n", bm.bmBitsPixel); - ok(bm.bmBits == NULL, "wrong bm.bmBits %p\n", bm.bmBits); - - assert(sizeof(buf) >= bm.bmWidthBytes * bm.bmHeight); - assert(sizeof(buf) == sizeof(buf_cmp)); - - ret = GetBitmapBits(hbmp, 0, NULL); - ok(ret == bm.bmWidthBytes * bm.bmHeight, "%d != %d\n", ret, bm.bmWidthBytes * bm.bmHeight); - - memset(buf_cmp, 0xAA, sizeof(buf_cmp)); - memset(buf_cmp, 0, bm.bmWidthBytes * bm.bmHeight); - - memset(buf, 0xAA, sizeof(buf)); - ret = GetBitmapBits(hbmp, sizeof(buf), buf); - ok(ret == bm.bmWidthBytes * bm.bmHeight, "%d != %d\n", ret, bm.bmWidthBytes * bm.bmHeight); - ok(!memcmp(buf, buf_cmp, sizeof(buf)), "buffers do not match\n"); - - hbmp_old = SelectObject(hdc, hbmp); - - ret = GetObject(hbmp, sizeof(bm), &bm); - ok(ret == sizeof(bm), "wrong size %d\n", ret); - - ok(bm.bmType == 0, "wrong bm.bmType %d\n", bm.bmType); - ok(bm.bmWidth == 15, "wrong bm.bmWidth %d\n", bm.bmWidth); - ok(bm.bmHeight == 15, "wrong bm.bmHeight %d\n", bm.bmHeight); - ok(bm.bmWidthBytes == 2, "wrong bm.bmWidthBytes %d\n", bm.bmWidthBytes); - ok(bm.bmPlanes == 1, "wrong bm.bmPlanes %d\n", bm.bmPlanes); - ok(bm.bmBitsPixel == 1, "wrong bm.bmBitsPixel %d\n", bm.bmBitsPixel); - ok(bm.bmBits == NULL, "wrong bm.bmBits %p\n", bm.bmBits); - - memset(buf, 0xAA, sizeof(buf)); - ret = GetBitmapBits(hbmp, sizeof(buf), buf); - ok(ret == bm.bmWidthBytes * bm.bmHeight, "%d != %d\n", ret, bm.bmWidthBytes * bm.bmHeight); - ok(!memcmp(buf, buf_cmp, sizeof(buf)), "buffers do not match\n"); - - hbmp_old = SelectObject(hdc, hbmp_old); - ok(hbmp_old == hbmp, "wrong old bitmap %p\n", hbmp_old); - - /* test various buffer sizes for GetObject */ - ret = GetObject(hbmp, sizeof(*bma) * 2, bma); - ok(ret == sizeof(*bma), "wrong size %d\n", ret); - - ret = GetObject(hbmp, sizeof(bm) / 2, &bm); - ok(ret == 0, "%d != 0\n", ret); - - ret = GetObject(hbmp, 0, &bm); - ok(ret == 0, "%d != 0\n", ret); - - ret = GetObject(hbmp, 1, &bm); - ok(ret == 0, "%d != 0\n", ret); - - DeleteObject(hbmp); - DeleteDC(hdc); -} - -static void test_bmBits(void) -{ - BYTE bits[4]; - HBITMAP hbmp; - BITMAP bmp; - - memset(bits, 0, sizeof(bits)); - hbmp = CreateBitmap(2, 2, 1, 4, bits); - ok(hbmp != NULL, "CreateBitmap failed\n"); - - memset(&bmp, 0xFF, sizeof(bmp)); - ok(GetObject(hbmp, sizeof(bmp), &bmp) == sizeof(bmp), - "GetObject failed or returned a wrong structure size\n"); - ok(!bmp.bmBits, "bmBits must be NULL for device-dependent bitmaps\n"); - - DeleteObject(hbmp); -} - -static void test_GetDIBits_selected_DIB(UINT bpp) -{ - HBITMAP dib; - BITMAPINFO *info; - BITMAPINFO *info2; - void * bits; - void * bits2; - UINT dib_size, dib32_size; - DWORD pixel; - HDC dib_dc, dc; - HBITMAP old_bmp; - UINT i; - int res; - - info = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(BITMAPINFO, bmiColors[256])); - info2 = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(BITMAPINFO, bmiColors[256])); - - /* Create a DIB section with a color table */ - - info->bmiHeader.biSize = sizeof(info->bmiHeader); - info->bmiHeader.biWidth = 32; - info->bmiHeader.biHeight = 32; - info->bmiHeader.biPlanes = 1; - info->bmiHeader.biBitCount = bpp; - info->bmiHeader.biCompression = BI_RGB; - info->bmiHeader.biXPelsPerMeter = 0; - info->bmiHeader.biYPelsPerMeter = 0; - info->bmiHeader.biClrUsed = 0; - info->bmiHeader.biClrImportant = 0; - - for (i=0; i < (1u << bpp); i++) - { - BYTE c = i * (1 << (8 - bpp)); - info->bmiColors[i].rgbRed = c; - info->bmiColors[i].rgbGreen = c; - info->bmiColors[i].rgbBlue = c; - info->bmiColors[i].rgbReserved = 0; - } - - dib = CreateDIBSection(NULL, info, DIB_RGB_COLORS, &bits, NULL, 0); - dib_size = bpp * (info->bmiHeader.biWidth * info->bmiHeader.biHeight) / 8; - dib32_size = 32 * (info->bmiHeader.biWidth * info->bmiHeader.biHeight) / 8; - - /* Set the bits of the DIB section */ - for (i=0; i < dib_size; i++) - { - ((BYTE *)bits)[i] = i % 256; - } - - /* Select the DIB into a DC */ - dib_dc = CreateCompatibleDC(NULL); - old_bmp = SelectObject(dib_dc, dib); - dc = CreateCompatibleDC(NULL); - bits2 = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dib32_size); - - /* Copy the DIB attributes but not the color table */ - memcpy(info2, info, sizeof(BITMAPINFOHEADER)); - - res = GetDIBits(dc, dib, 0, info->bmiHeader.biHeight, bits2, info2, DIB_RGB_COLORS); - ok( res == info->bmiHeader.biHeight, "got %d (bpp %d)\n", res, bpp ); - - /* Compare the color table and the bits */ - for (i=0; i < (1u << bpp); i++) - ok( info->bmiColors[i].rgbRed == info2->bmiColors[i].rgbRed && - info->bmiColors[i].rgbGreen == info2->bmiColors[i].rgbGreen && - info->bmiColors[i].rgbBlue == info2->bmiColors[i].rgbBlue && - info->bmiColors[i].rgbReserved == info2->bmiColors[i].rgbReserved, - "color table entry %d differs (bpp %d)\n", i, bpp ); - - ok( !memcmp( bits, bits2, dib_size ), "bit mismatch (bpp %d)\n", bpp ); - - /* Test various combinations of lines = 0 and bits2 = NULL */ - memset( info2->bmiColors, 0xcc, 256 * sizeof(RGBQUAD) ); - res = GetDIBits( dc, dib, 0, 0, bits2, info2, DIB_RGB_COLORS ); - ok( res == 1, "got %d (bpp %d)\n", res, bpp ); - ok( !memcmp( info->bmiColors, info2->bmiColors, (1 << bpp) * sizeof(RGBQUAD) ), - "color table mismatch (bpp %d)\n", bpp ); - - memset( info2->bmiColors, 0xcc, 256 * sizeof(RGBQUAD) ); - res = GetDIBits( dc, dib, 0, 0, NULL, info2, DIB_RGB_COLORS ); - ok( res == 1, "got %d (bpp %d)\n", res, bpp ); - ok( !memcmp( info->bmiColors, info2->bmiColors, (1 << bpp) * sizeof(RGBQUAD) ), - "color table mismatch (bpp %d)\n", bpp ); - - memset( info2->bmiColors, 0xcc, 256 * sizeof(RGBQUAD) ); - res = GetDIBits( dc, dib, 0, info->bmiHeader.biHeight, NULL, info2, DIB_RGB_COLORS ); - ok( res == 1, "got %d (bpp %d)\n", res, bpp ); - ok( !memcmp( info->bmiColors, info2->bmiColors, (1 << bpp) * sizeof(RGBQUAD) ), - "color table mismatch (bpp %d)\n", bpp ); - - /* Map into a 32bit-DIB */ - info2->bmiHeader.biBitCount = 32; - res = GetDIBits(dc, dib, 0, info->bmiHeader.biHeight, bits2, info2, DIB_RGB_COLORS); - ok( res == info->bmiHeader.biHeight, "got %d (bpp %d)\n", res, bpp ); - - /* Check if last pixel was set */ - pixel = ((DWORD *)bits2)[info->bmiHeader.biWidth * info->bmiHeader.biHeight - 1]; - ok(pixel != 0, "Pixel: 0x%08x\n", pixel); - - HeapFree(GetProcessHeap(), 0, bits2); - DeleteDC(dc); - - SelectObject(dib_dc, old_bmp); - DeleteDC(dib_dc); - DeleteObject(dib); - HeapFree(GetProcessHeap(), 0, info2); - HeapFree(GetProcessHeap(), 0, info); -} - -static void test_GetDIBits_selected_DDB(BOOL monochrome) -{ - HBITMAP ddb; - BITMAPINFO *info; - BITMAPINFO *info2; - void * bits; - void * bits2; - HDC ddb_dc, dc; - HBITMAP old_bmp; - UINT width, height; - UINT bpp; - UINT i, j; - int res; - - info = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(BITMAPINFO, bmiColors[256])); - info2 = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(BITMAPINFO, bmiColors[256])); - - width = height = 16; - - /* Create a DDB (device-dependent bitmap) */ - if (monochrome) - { - bpp = 1; - ddb = CreateBitmap(width, height, 1, 1, NULL); - } - else - { - HDC screen_dc = GetDC(NULL); - bpp = GetDeviceCaps(screen_dc, BITSPIXEL) * GetDeviceCaps(screen_dc, PLANES); - ddb = CreateCompatibleBitmap(screen_dc, width, height); - ReleaseDC(NULL, screen_dc); - } - - /* Set the pixels */ - ddb_dc = CreateCompatibleDC(NULL); - old_bmp = SelectObject(ddb_dc, ddb); - for (i = 0; i < width; i++) - { - for (j=0; j < height; j++) - { - BYTE c = (i * width + j) % 256; - SetPixelV(ddb_dc, i, j, RGB(c, c, c)); - } - } - SelectObject(ddb_dc, old_bmp); - - info->bmiHeader.biSize = sizeof(info->bmiHeader); - info->bmiHeader.biWidth = width; - info->bmiHeader.biHeight = height; - info->bmiHeader.biPlanes = 1; - info->bmiHeader.biBitCount = bpp; - info->bmiHeader.biCompression = BI_RGB; - - dc = CreateCompatibleDC(NULL); - - /* Fill in biSizeImage */ - GetDIBits(dc, ddb, 0, height, NULL, info, DIB_RGB_COLORS); - ok(info->bmiHeader.biSizeImage != 0, "GetDIBits failed to get the DIB attributes\n"); - - bits = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, info->bmiHeader.biSizeImage); - bits2 = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, info->bmiHeader.biSizeImage); - - /* Get the bits */ - res = GetDIBits(dc, ddb, 0, height, bits, info, DIB_RGB_COLORS); - ok( res == height, "got %d (bpp %d)\n", res, bpp ); - - /* Copy the DIB attributes but not the color table */ - memcpy(info2, info, sizeof(BITMAPINFOHEADER)); - - /* Select the DDB into another DC */ - old_bmp = SelectObject(ddb_dc, ddb); - - /* Get the bits */ - res = GetDIBits(dc, ddb, 0, height, bits2, info2, DIB_RGB_COLORS); - ok( res == height, "got %d (bpp %d)\n", res, bpp ); - - /* Compare the color table and the bits */ - if (bpp <= 8) - { - for (i=0; i < (1u << bpp); i++) - ok( info->bmiColors[i].rgbRed == info2->bmiColors[i].rgbRed && - info->bmiColors[i].rgbGreen == info2->bmiColors[i].rgbGreen && - info->bmiColors[i].rgbBlue == info2->bmiColors[i].rgbBlue && - info->bmiColors[i].rgbReserved == info2->bmiColors[i].rgbReserved, - "color table entry %d differs (bpp %d)\n", i, bpp ); - } - - ok( !memcmp( bits, bits2, info->bmiHeader.biSizeImage ), "bit mismatch (bpp %d)\n", bpp ); - - /* Test the palette */ - if (info2->bmiHeader.biBitCount <= 8) - { - WORD *colors = (WORD*)info2->bmiColors; - - /* Get the palette indices */ - res = GetDIBits(dc, ddb, 0, 0, NULL, info2, DIB_PAL_COLORS); - ok( res == 1, "got %d (bpp %d)\n", res, bpp ); - - for (i = 0; i < (1 << info->bmiHeader.biBitCount); i++) - ok( colors[i] == i, "%d: got %d (bpp %d)\n", i, colors[i], bpp ); - } - - HeapFree(GetProcessHeap(), 0, bits2); - HeapFree(GetProcessHeap(), 0, bits); - DeleteDC(dc); - - SelectObject(ddb_dc, old_bmp); - DeleteDC(ddb_dc); - DeleteObject(ddb); - HeapFree(GetProcessHeap(), 0, info2); - HeapFree(GetProcessHeap(), 0, info); -} - -static void test_GetDIBits(void) -{ - /* 2-bytes aligned 1-bit bitmap data: 16x16 */ - static const BYTE bmp_bits_1[16 * 2] = - { - 0xff,0xff, 0,0, 0xff,0xff, 0,0, - 0xff,0xff, 0,0, 0xff,0xff, 0,0, - 0xff,0xff, 0,0, 0xff,0xff, 0,0, - 0xff,0xff, 0,0, 0xff,0xff, 0,0 - }; - /* 4-bytes aligned 1-bit DIB data: 16x16 */ - static const BYTE dib_bits_1[16 * 4] = - { - 0,0,0,0, 0xff,0xff,0,0, 0,0,0,0, 0xff,0xff,0,0, - 0,0,0,0, 0xff,0xff,0,0, 0,0,0,0, 0xff,0xff,0,0, - 0,0,0,0, 0xff,0xff,0,0, 0,0,0,0, 0xff,0xff,0,0, - 0,0,0,0, 0xff,0xff,0,0, 0,0,0,0, 0xff,0xff,0,0 - }; - /* 2-bytes aligned 24-bit bitmap data: 16x16 */ - static const BYTE bmp_bits_24[16 * 16*3] = - { - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - }; - /* 4-bytes aligned 24-bit DIB data: 16x16 */ - static const BYTE dib_bits_24[16 * 16*3] = - { - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff - }; - HBITMAP hbmp; - BITMAP bm; - HDC hdc; - int i, bytes, lines; - BYTE buf[1024]; - char bi_buf[sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * 256]; - BITMAPINFO *bi = (BITMAPINFO *)bi_buf; - PALETTEENTRY pal_ents[20]; - - hdc = GetDC(0); - - /* 1-bit source bitmap data */ - hbmp = CreateBitmap(16, 16, 1, 1, bmp_bits_1); - ok(hbmp != 0, "CreateBitmap failed\n"); - - memset(&bm, 0xAA, sizeof(bm)); - bytes = GetObject(hbmp, sizeof(bm), &bm); - ok(bytes == sizeof(bm), "GetObject returned %d\n", bytes); - ok(bm.bmType == 0, "wrong bmType %d\n", bm.bmType); - ok(bm.bmWidth == 16, "wrong bmWidth %d\n", bm.bmWidth); - ok(bm.bmHeight == 16, "wrong bmHeight %d\n", bm.bmHeight); - ok(bm.bmWidthBytes == 2, "wrong bmWidthBytes %d\n", bm.bmWidthBytes); - ok(bm.bmPlanes == 1, "wrong bmPlanes %u\n", bm.bmPlanes); - ok(bm.bmBitsPixel == 1, "wrong bmBitsPixel %d\n", bm.bmBitsPixel); - ok(!bm.bmBits, "wrong bmBits %p\n", bm.bmBits); - - bytes = GetBitmapBits(hbmp, 0, NULL); - ok(bytes == sizeof(bmp_bits_1), "expected 16*2 got %d bytes\n", bytes); - bytes = GetBitmapBits(hbmp, sizeof(buf), buf); - ok(bytes == sizeof(bmp_bits_1), "expected 16*2 got %d bytes\n", bytes); - ok(!memcmp(buf, bmp_bits_1, sizeof(bmp_bits_1)), "bitmap bits don't match\n"); - - /* retrieve 1-bit DIB data */ - memset(bi, 0, sizeof(*bi)); - bi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bi->bmiHeader.biWidth = bm.bmWidth; - bi->bmiHeader.biHeight = bm.bmHeight; - bi->bmiHeader.biPlanes = 1; - bi->bmiHeader.biBitCount = 1; - bi->bmiHeader.biCompression = BI_RGB; - bi->bmiHeader.biSizeImage = 0; - memset(bi->bmiColors, 0xAA, sizeof(RGBQUAD) * 256); - SetLastError(0xdeadbeef); - lines = GetDIBits(0, hbmp, 0, bm.bmHeight, buf, bi, DIB_RGB_COLORS); - ok(lines == 0, "GetDIBits copied %d lines with hdc = 0\n", lines); - ok(GetLastError() == ERROR_INVALID_PARAMETER || - broken(GetLastError() == 0xdeadbeef), /* winnt */ - "wrong error %u\n", GetLastError()); - ok(bi->bmiHeader.biSizeImage == 0, "expected 0, got %u\n", bi->bmiHeader.biSizeImage); - - memset(buf, 0xAA, sizeof(buf)); - SetLastError(0xdeadbeef); - lines = GetDIBits(hdc, hbmp, 0, bm.bmHeight, buf, bi, DIB_RGB_COLORS); - ok(lines == bm.bmHeight, "GetDIBits copied %d lines of %d, error %u\n", - lines, bm.bmHeight, GetLastError()); - ok(bi->bmiHeader.biSizeImage == sizeof(dib_bits_1), "expected 16*4, got %u\n", bi->bmiHeader.biSizeImage); - - /* the color table consists of black and white */ - ok(bi->bmiColors[0].rgbRed == 0 && bi->bmiColors[0].rgbGreen == 0 && - bi->bmiColors[0].rgbBlue == 0 && bi->bmiColors[0].rgbReserved == 0, - "expected bmiColors[0] 0,0,0,0 - got %x %x %x %x\n", - bi->bmiColors[0].rgbRed, bi->bmiColors[0].rgbGreen, - bi->bmiColors[0].rgbBlue, bi->bmiColors[0].rgbReserved); - ok(bi->bmiColors[1].rgbRed == 0xff && bi->bmiColors[1].rgbGreen == 0xff && - bi->bmiColors[1].rgbBlue == 0xff && bi->bmiColors[1].rgbReserved == 0, - "expected bmiColors[0] 0xff,0xff,0xff,0 - got %x %x %x %x\n", - bi->bmiColors[1].rgbRed, bi->bmiColors[1].rgbGreen, - bi->bmiColors[1].rgbBlue, bi->bmiColors[1].rgbReserved); - for (i = 2; i < 256; i++) - { - ok(bi->bmiColors[i].rgbRed == 0xAA && bi->bmiColors[i].rgbGreen == 0xAA && - bi->bmiColors[i].rgbBlue == 0xAA && bi->bmiColors[i].rgbReserved == 0xAA, - "expected bmiColors[%d] 0xAA,0xAA,0xAA,0xAA - got %x %x %x %x\n", i, - bi->bmiColors[i].rgbRed, bi->bmiColors[i].rgbGreen, - bi->bmiColors[i].rgbBlue, bi->bmiColors[i].rgbReserved); - } - - /* returned bits are DWORD aligned and upside down */ - ok(!memcmp(buf, dib_bits_1, sizeof(dib_bits_1)), "DIB bits don't match\n"); - - /* Test the palette indices */ - memset(bi->bmiColors, 0xAA, sizeof(RGBQUAD) * 256); - SetLastError(0xdeadbeef); - lines = GetDIBits(hdc, hbmp, 0, 0, NULL, bi, DIB_PAL_COLORS); - ok(((WORD*)bi->bmiColors)[0] == 0, "Color 0 is %d\n", ((WORD*)bi->bmiColors)[0]); - ok(((WORD*)bi->bmiColors)[1] == 1, "Color 1 is %d\n", ((WORD*)bi->bmiColors)[1]); - for (i = 2; i < 256; i++) - ok(((WORD*)bi->bmiColors)[i] == 0xAAAA, "Color %d is %d\n", i, ((WORD*)bi->bmiColors)[1]); - - /* retrieve 24-bit DIB data */ - memset(bi, 0, sizeof(*bi)); - bi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bi->bmiHeader.biWidth = bm.bmWidth; - bi->bmiHeader.biHeight = bm.bmHeight; - bi->bmiHeader.biPlanes = 1; - bi->bmiHeader.biBitCount = 24; - bi->bmiHeader.biCompression = BI_RGB; - bi->bmiHeader.biSizeImage = 0; - memset(bi->bmiColors, 0xAA, sizeof(RGBQUAD) * 256); - memset(buf, 0xAA, sizeof(buf)); - SetLastError(0xdeadbeef); - lines = GetDIBits(hdc, hbmp, 0, bm.bmHeight, buf, bi, DIB_RGB_COLORS); - ok(lines == bm.bmHeight, "GetDIBits copied %d lines of %d, error %u\n", - lines, bm.bmHeight, GetLastError()); - ok(bi->bmiHeader.biSizeImage == sizeof(dib_bits_24), "expected 16*16*3, got %u\n", bi->bmiHeader.biSizeImage); - - /* the color table doesn't exist for 24-bit images */ - for (i = 0; i < 256; i++) - { - ok(bi->bmiColors[i].rgbRed == 0xAA && bi->bmiColors[i].rgbGreen == 0xAA && - bi->bmiColors[i].rgbBlue == 0xAA && bi->bmiColors[i].rgbReserved == 0xAA, - "expected bmiColors[%d] 0xAA,0xAA,0xAA,0xAA - got %x %x %x %x\n", i, - bi->bmiColors[i].rgbRed, bi->bmiColors[i].rgbGreen, - bi->bmiColors[i].rgbBlue, bi->bmiColors[i].rgbReserved); - } - - /* returned bits are DWORD aligned and upside down */ - ok(!memcmp(buf, dib_bits_24, sizeof(dib_bits_24)), "DIB bits don't match\n"); - DeleteObject(hbmp); - - /* 24-bit source bitmap data */ - hbmp = CreateCompatibleBitmap(hdc, 16, 16); - ok(hbmp != 0, "CreateBitmap failed\n"); - SetLastError(0xdeadbeef); - bi->bmiHeader.biHeight = -bm.bmHeight; /* indicate bottom-up data */ - lines = SetDIBits(hdc, hbmp, 0, bm.bmHeight, bmp_bits_24, bi, DIB_RGB_COLORS); - ok(lines == bm.bmHeight, "SetDIBits copied %d lines of %d, error %u\n", - lines, bm.bmHeight, GetLastError()); - - memset(&bm, 0xAA, sizeof(bm)); - bytes = GetObject(hbmp, sizeof(bm), &bm); - ok(bytes == sizeof(bm), "GetObject returned %d\n", bytes); - ok(bm.bmType == 0, "wrong bmType %d\n", bm.bmType); - ok(bm.bmWidth == 16, "wrong bmWidth %d\n", bm.bmWidth); - ok(bm.bmHeight == 16, "wrong bmHeight %d\n", bm.bmHeight); - ok(bm.bmWidthBytes == get_bitmap_stride(bm.bmWidth, bm.bmBitsPixel), "wrong bmWidthBytes %d\n", bm.bmWidthBytes); - ok(bm.bmPlanes == GetDeviceCaps(hdc, PLANES), "wrong bmPlanes %u\n", bm.bmPlanes); - ok(bm.bmBitsPixel == GetDeviceCaps(hdc, BITSPIXEL), "wrong bmBitsPixel %d\n", bm.bmBitsPixel); - ok(!bm.bmBits, "wrong bmBits %p\n", bm.bmBits); - - bytes = GetBitmapBits(hbmp, 0, NULL); - ok(bytes == bm.bmWidthBytes * bm.bmHeight, "expected %d got %d bytes\n", bm.bmWidthBytes * bm.bmHeight, bytes); - bytes = GetBitmapBits(hbmp, sizeof(buf), buf); - ok(bytes == bm.bmWidthBytes * bm.bmHeight, "expected %d got %d bytes\n", - bm.bmWidthBytes * bm.bmHeight, bytes); - - /* retrieve 1-bit DIB data */ - memset(bi, 0, sizeof(*bi)); - bi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bi->bmiHeader.biWidth = bm.bmWidth; - bi->bmiHeader.biHeight = bm.bmHeight; - bi->bmiHeader.biPlanes = 1; - bi->bmiHeader.biBitCount = 1; - bi->bmiHeader.biCompression = BI_RGB; - bi->bmiHeader.biSizeImage = 0; - memset(bi->bmiColors, 0xAA, sizeof(RGBQUAD) * 256); - memset(buf, 0xAA, sizeof(buf)); - SetLastError(0xdeadbeef); - lines = GetDIBits(hdc, hbmp, 0, bm.bmHeight, buf, bi, DIB_RGB_COLORS); - ok(lines == bm.bmHeight, "GetDIBits copied %d lines of %d, error %u\n", - lines, bm.bmHeight, GetLastError()); - ok(bi->bmiHeader.biSizeImage == sizeof(dib_bits_1), "expected 16*4, got %u\n", bi->bmiHeader.biSizeImage); - - /* the color table consists of black and white */ - ok(bi->bmiColors[0].rgbRed == 0 && bi->bmiColors[0].rgbGreen == 0 && - bi->bmiColors[0].rgbBlue == 0 && bi->bmiColors[0].rgbReserved == 0, - "expected bmiColors[0] 0,0,0,0 - got %x %x %x %x\n", - bi->bmiColors[0].rgbRed, bi->bmiColors[0].rgbGreen, - bi->bmiColors[0].rgbBlue, bi->bmiColors[0].rgbReserved); - ok(bi->bmiColors[1].rgbRed == 0xff && bi->bmiColors[1].rgbGreen == 0xff && - bi->bmiColors[1].rgbBlue == 0xff && bi->bmiColors[1].rgbReserved == 0, - "expected bmiColors[0] 0xff,0xff,0xff,0 - got %x %x %x %x\n", - bi->bmiColors[1].rgbRed, bi->bmiColors[1].rgbGreen, - bi->bmiColors[1].rgbBlue, bi->bmiColors[1].rgbReserved); - for (i = 2; i < 256; i++) - { - ok(bi->bmiColors[i].rgbRed == 0xAA && bi->bmiColors[i].rgbGreen == 0xAA && - bi->bmiColors[i].rgbBlue == 0xAA && bi->bmiColors[i].rgbReserved == 0xAA, - "expected bmiColors[%d] 0xAA,0xAA,0xAA,0xAA - got %x %x %x %x\n", i, - bi->bmiColors[i].rgbRed, bi->bmiColors[i].rgbGreen, - bi->bmiColors[i].rgbBlue, bi->bmiColors[i].rgbReserved); - } - - /* returned bits are DWORD aligned and upside down */ - ok(!memcmp(buf, dib_bits_1, sizeof(dib_bits_1)), "DIB bits don't match\n"); - - /* Test the palette indices */ - memset(bi->bmiColors, 0xAA, sizeof(RGBQUAD) * 256); - SetLastError(0xdeadbeef); - lines = GetDIBits(hdc, hbmp, 0, 0, NULL, bi, DIB_PAL_COLORS); - ok(((WORD*)bi->bmiColors)[0] == 0, "Color 0 is %d\n", ((WORD*)bi->bmiColors)[0]); - ok(((WORD*)bi->bmiColors)[1] == 1, "Color 1 is %d\n", ((WORD*)bi->bmiColors)[1]); - for (i = 2; i < 256; i++) - ok(((WORD*)bi->bmiColors)[i] == 0xAAAA, "Color %d is %d\n", i, ((WORD*)bi->bmiColors)[i]); - - /* retrieve 4-bit DIB data */ - memset(bi, 0, sizeof(*bi)); - bi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bi->bmiHeader.biWidth = bm.bmWidth; - bi->bmiHeader.biHeight = bm.bmHeight; - bi->bmiHeader.biPlanes = 1; - bi->bmiHeader.biBitCount = 4; - bi->bmiHeader.biCompression = BI_RGB; - bi->bmiHeader.biSizeImage = 0; - memset(bi->bmiColors, 0xAA, sizeof(RGBQUAD) * 256); - memset(buf, 0xAA, sizeof(buf)); - SetLastError(0xdeadbeef); - lines = GetDIBits(hdc, hbmp, 0, bm.bmHeight, buf, bi, DIB_RGB_COLORS); - ok(lines == bm.bmHeight, "GetDIBits copied %d lines of %d, error %u\n", - lines, bm.bmHeight, GetLastError()); - - GetPaletteEntries( GetStockObject(DEFAULT_PALETTE), 0, 20, pal_ents ); - - for (i = 0; i < 16; i++) - { - RGBQUAD expect; - int entry = i < 8 ? i : i + 4; - - if(entry == 7) entry = 12; - else if(entry == 12) entry = 7; - - expect.rgbRed = pal_ents[entry].peRed; - expect.rgbGreen = pal_ents[entry].peGreen; - expect.rgbBlue = pal_ents[entry].peBlue; - expect.rgbReserved = 0; - - ok(!memcmp(bi->bmiColors + i, &expect, sizeof(expect)), - "expected bmiColors[%d] %x %x %x %x - got %x %x %x %x\n", i, - expect.rgbRed, expect.rgbGreen, expect.rgbBlue, expect.rgbReserved, - bi->bmiColors[i].rgbRed, bi->bmiColors[i].rgbGreen, - bi->bmiColors[i].rgbBlue, bi->bmiColors[i].rgbReserved); - } - - /* retrieve 8-bit DIB data */ - memset(bi, 0, sizeof(*bi)); - bi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bi->bmiHeader.biWidth = bm.bmWidth; - bi->bmiHeader.biHeight = bm.bmHeight; - bi->bmiHeader.biPlanes = 1; - bi->bmiHeader.biBitCount = 8; - bi->bmiHeader.biCompression = BI_RGB; - bi->bmiHeader.biSizeImage = 0; - memset(bi->bmiColors, 0xAA, sizeof(RGBQUAD) * 256); - memset(buf, 0xAA, sizeof(buf)); - SetLastError(0xdeadbeef); - lines = GetDIBits(hdc, hbmp, 0, bm.bmHeight, buf, bi, DIB_RGB_COLORS); - ok(lines == bm.bmHeight, "GetDIBits copied %d lines of %d, error %u\n", - lines, bm.bmHeight, GetLastError()); - - GetPaletteEntries( GetStockObject(DEFAULT_PALETTE), 0, 20, pal_ents ); - - for (i = 0; i < 256; i++) - { - RGBQUAD expect; - - if (i < 10 || i >= 246) - { - int entry = i < 10 ? i : i - 236; - expect.rgbRed = pal_ents[entry].peRed; - expect.rgbGreen = pal_ents[entry].peGreen; - expect.rgbBlue = pal_ents[entry].peBlue; - } - else - { - expect.rgbRed = (i & 0x07) << 5; - expect.rgbGreen = (i & 0x38) << 2; - expect.rgbBlue = i & 0xc0; - } - expect.rgbReserved = 0; - - ok(!memcmp(bi->bmiColors + i, &expect, sizeof(expect)), - "expected bmiColors[%d] %x %x %x %x - got %x %x %x %x\n", i, - expect.rgbRed, expect.rgbGreen, expect.rgbBlue, expect.rgbReserved, - bi->bmiColors[i].rgbRed, bi->bmiColors[i].rgbGreen, - bi->bmiColors[i].rgbBlue, bi->bmiColors[i].rgbReserved); - } - - /* retrieve 24-bit DIB data */ - memset(bi, 0, sizeof(*bi)); - bi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bi->bmiHeader.biWidth = bm.bmWidth; - bi->bmiHeader.biHeight = bm.bmHeight; - bi->bmiHeader.biPlanes = 1; - bi->bmiHeader.biBitCount = 24; - bi->bmiHeader.biCompression = BI_RGB; - bi->bmiHeader.biSizeImage = 0; - memset(bi->bmiColors, 0xAA, sizeof(RGBQUAD) * 256); - memset(buf, 0xAA, sizeof(buf)); - SetLastError(0xdeadbeef); - lines = GetDIBits(hdc, hbmp, 0, bm.bmHeight, buf, bi, DIB_RGB_COLORS); - ok(lines == bm.bmHeight, "GetDIBits copied %d lines of %d, error %u\n", - lines, bm.bmHeight, GetLastError()); - ok(bi->bmiHeader.biSizeImage == sizeof(dib_bits_24), "expected 16*16*3, got %u\n", bi->bmiHeader.biSizeImage); - - /* the color table doesn't exist for 24-bit images */ - for (i = 0; i < 256; i++) - { - ok(bi->bmiColors[i].rgbRed == 0xAA && bi->bmiColors[i].rgbGreen == 0xAA && - bi->bmiColors[i].rgbBlue == 0xAA && bi->bmiColors[i].rgbReserved == 0xAA, - "expected bmiColors[%d] 0xAA,0xAA,0xAA,0xAA - got %x %x %x %x\n", i, - bi->bmiColors[i].rgbRed, bi->bmiColors[i].rgbGreen, - bi->bmiColors[i].rgbBlue, bi->bmiColors[i].rgbReserved); - } - - /* returned bits are DWORD aligned and upside down */ - ok(!memcmp(buf, dib_bits_24, sizeof(dib_bits_24)), "DIB bits don't match\n"); - DeleteObject(hbmp); - - ReleaseDC(0, hdc); -} - -static void test_GetDIBits_BI_BITFIELDS(void) -{ - /* Try a screen resolution detection technique - * from the September 1999 issue of Windows Developer's Journal - * which seems to be in widespread use. - * http://www.lesher.ws/highcolor.html - * http://www.lesher.ws/vidfmt.c - * It hinges on being able to retrieve the bitmaps - * for the three primary colors in non-paletted 16 bit mode. - */ - char dibinfo_buf[sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD)]; - DWORD bits[32]; - LPBITMAPINFO dibinfo = (LPBITMAPINFO) dibinfo_buf; - DWORD *bitmasks = (DWORD *)dibinfo->bmiColors; - HDC hdc; - HBITMAP hbm; - int ret; - void *ptr; - - memset(dibinfo, 0, sizeof(dibinfo_buf)); - dibinfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - - hdc = GetDC(NULL); - ok(hdc != NULL, "GetDC failed?\n"); - hbm = CreateCompatibleBitmap(hdc, 1, 1); - ok(hbm != NULL, "CreateCompatibleBitmap failed?\n"); - - /* Call GetDIBits to fill in bmiHeader. */ - ret = GetDIBits(hdc, hbm, 0, 1, NULL, dibinfo, DIB_RGB_COLORS); - ok(ret == 1, "GetDIBits failed\n"); - if (dibinfo->bmiHeader.biBitCount > 8) - { - ok( dibinfo->bmiHeader.biCompression == BI_BITFIELDS || - broken( dibinfo->bmiHeader.biCompression == BI_RGB ), /* nt4 sp3 */ - "compression is %u (%d bpp)\n", dibinfo->bmiHeader.biCompression, dibinfo->bmiHeader.biBitCount ); - - if (dibinfo->bmiHeader.biCompression == BI_BITFIELDS) - { - ok( !bitmasks[0], "red mask is set\n" ); - ok( !bitmasks[1], "green mask is set\n" ); - ok( !bitmasks[2], "blue mask is set\n" ); - - /* test with NULL bits pointer and correct bpp */ - dibinfo->bmiHeader.biSizeImage = 0xdeadbeef; - ret = GetDIBits(hdc, hbm, 0, 1, NULL, dibinfo, DIB_RGB_COLORS); - ok(ret == 1, "GetDIBits failed\n"); - - ok( bitmasks[0] != 0, "red mask is not set\n" ); - ok( bitmasks[1] != 0, "green mask is not set\n" ); - ok( bitmasks[2] != 0, "blue mask is not set\n" ); - ok( dibinfo->bmiHeader.biSizeImage != 0xdeadbeef, "size image not set\n" ); - - /* test with valid bits pointer */ - memset(dibinfo, 0, sizeof(dibinfo_buf)); - dibinfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - ret = GetDIBits(hdc, hbm, 0, 1, NULL, dibinfo, DIB_RGB_COLORS); - ok(ret == 1, "GetDIBits failed ret %u err %u\n",ret,GetLastError()); - dibinfo->bmiHeader.biSizeImage = 0xdeadbeef; - ret = GetDIBits(hdc, hbm, 0, 1, bits, dibinfo, DIB_RGB_COLORS); - ok(ret == 1, "GetDIBits failed ret %u err %u\n",ret,GetLastError()); - - ok( bitmasks[0] != 0, "red mask is not set\n" ); - ok( bitmasks[1] != 0, "green mask is not set\n" ); - ok( bitmasks[2] != 0, "blue mask is not set\n" ); - ok( dibinfo->bmiHeader.biSizeImage != 0xdeadbeef, "size image not set\n" ); - - /* now with bits and 0 lines */ - memset(dibinfo, 0, sizeof(dibinfo_buf)); - dibinfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - dibinfo->bmiHeader.biSizeImage = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = GetDIBits(hdc, hbm, 0, 0, bits, dibinfo, DIB_RGB_COLORS); - ok(ret == 1, "GetDIBits failed ret %u err %u\n",ret,GetLastError()); - - ok( !bitmasks[0], "red mask is set\n" ); - ok( !bitmasks[1], "green mask is set\n" ); - ok( !bitmasks[2], "blue mask is set\n" ); - ok( dibinfo->bmiHeader.biSizeImage != 0xdeadbeef, "size image not set\n" ); - - memset(bitmasks, 0, 3*sizeof(DWORD)); - dibinfo->bmiHeader.biSizeImage = 0xdeadbeef; - ret = GetDIBits(hdc, hbm, 0, 0, bits, dibinfo, DIB_RGB_COLORS); - ok(ret == 1, "GetDIBits failed ret %u err %u\n",ret,GetLastError()); - - ok( bitmasks[0] != 0, "red mask is not set\n" ); - ok( bitmasks[1] != 0, "green mask is not set\n" ); - ok( bitmasks[2] != 0, "blue mask is not set\n" ); - ok( dibinfo->bmiHeader.biSizeImage != 0xdeadbeef, "size image not set\n" ); - } - } - else skip("bitmap in colortable mode, skipping BI_BITFIELDS tests\n"); - - DeleteObject(hbm); - - /* same thing now with a 32-bpp DIB section */ - - dibinfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - dibinfo->bmiHeader.biWidth = 1; - dibinfo->bmiHeader.biHeight = 1; - dibinfo->bmiHeader.biPlanes = 1; - dibinfo->bmiHeader.biBitCount = 32; - dibinfo->bmiHeader.biCompression = BI_RGB; - dibinfo->bmiHeader.biSizeImage = 0; - dibinfo->bmiHeader.biXPelsPerMeter = 0; - dibinfo->bmiHeader.biYPelsPerMeter = 0; - dibinfo->bmiHeader.biClrUsed = 0; - dibinfo->bmiHeader.biClrImportant = 0; - bitmasks[0] = 0x0000ff; - bitmasks[1] = 0x00ff00; - bitmasks[2] = 0xff0000; - hbm = CreateDIBSection( hdc, dibinfo, DIB_RGB_COLORS, &ptr, NULL, 0 ); - ok( hbm != 0, "failed to create bitmap\n" ); - - memset(dibinfo, 0, sizeof(dibinfo_buf)); - dibinfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - ret = GetDIBits(hdc, hbm, 0, 0, NULL, dibinfo, DIB_RGB_COLORS); - ok(ret == 1, "GetDIBits failed\n"); - ok( dibinfo->bmiHeader.biBitCount == 32, "wrong bit count %u\n", dibinfo->bmiHeader.biBitCount ); - - ok( dibinfo->bmiHeader.biCompression == BI_BITFIELDS || - broken( dibinfo->bmiHeader.biCompression == BI_RGB ), /* nt4 sp3 */ - "compression is %u\n", dibinfo->bmiHeader.biCompression ); - ok( !bitmasks[0], "red mask is set\n" ); - ok( !bitmasks[1], "green mask is set\n" ); - ok( !bitmasks[2], "blue mask is set\n" ); - - dibinfo->bmiHeader.biSizeImage = 0xdeadbeef; - ret = GetDIBits(hdc, hbm, 0, 1, bits, dibinfo, DIB_RGB_COLORS); - ok(ret == 1, "GetDIBits failed\n"); - ok( dibinfo->bmiHeader.biBitCount == 32, "wrong bit count %u\n", dibinfo->bmiHeader.biBitCount ); - ok( dibinfo->bmiHeader.biCompression == BI_BITFIELDS || - broken( dibinfo->bmiHeader.biCompression == BI_RGB ), /* nt4 sp3 */ - "compression is %u\n", dibinfo->bmiHeader.biCompression ); - if (dibinfo->bmiHeader.biCompression == BI_BITFIELDS) - { - ok( bitmasks[0] == 0xff0000, "wrong red mask %08x\n", bitmasks[0] ); - ok( bitmasks[1] == 0x00ff00, "wrong green mask %08x\n", bitmasks[1] ); - ok( bitmasks[2] == 0x0000ff, "wrong blue mask %08x\n", bitmasks[2] ); - } - ok( dibinfo->bmiHeader.biSizeImage != 0xdeadbeef, "size image not set\n" ); - - DeleteObject(hbm); - - dibinfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - dibinfo->bmiHeader.biWidth = 1; - dibinfo->bmiHeader.biHeight = 1; - dibinfo->bmiHeader.biPlanes = 1; - dibinfo->bmiHeader.biBitCount = 32; - dibinfo->bmiHeader.biCompression = BI_BITFIELDS; - dibinfo->bmiHeader.biSizeImage = 0; - dibinfo->bmiHeader.biXPelsPerMeter = 0; - dibinfo->bmiHeader.biYPelsPerMeter = 0; - dibinfo->bmiHeader.biClrUsed = 0; - dibinfo->bmiHeader.biClrImportant = 0; - bitmasks[0] = 0x0000ff; - bitmasks[1] = 0x00ff00; - bitmasks[2] = 0xff0000; - hbm = CreateDIBSection( hdc, dibinfo, DIB_RGB_COLORS, &ptr, NULL, 0 ); - ok( hbm != 0, "failed to create bitmap\n" ); - - if (hbm) - { - memset(dibinfo, 0, sizeof(dibinfo_buf)); - dibinfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - ret = GetDIBits(hdc, hbm, 0, 0, NULL, dibinfo, DIB_RGB_COLORS); - ok(ret == 1, "GetDIBits failed\n"); - - ok( dibinfo->bmiHeader.biCompression == BI_BITFIELDS, - "compression is %u\n", dibinfo->bmiHeader.biCompression ); - ok( !bitmasks[0], "red mask is set\n" ); - ok( !bitmasks[1], "green mask is set\n" ); - ok( !bitmasks[2], "blue mask is set\n" ); - - dibinfo->bmiHeader.biSizeImage = 0xdeadbeef; - ret = GetDIBits(hdc, hbm, 0, 1, bits, dibinfo, DIB_RGB_COLORS); - ok(ret == 1, "GetDIBits failed\n"); - ok( bitmasks[0] == 0x0000ff, "wrong red mask %08x\n", bitmasks[0] ); - ok( bitmasks[1] == 0x00ff00, "wrong green mask %08x\n", bitmasks[1] ); - ok( bitmasks[2] == 0xff0000, "wrong blue mask %08x\n", bitmasks[2] ); - ok( dibinfo->bmiHeader.biSizeImage != 0xdeadbeef, "size image not set\n" ); - - DeleteObject(hbm); - } - - /* 24-bpp DIB sections don't have bitfields */ - - dibinfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - dibinfo->bmiHeader.biWidth = 1; - dibinfo->bmiHeader.biHeight = 1; - dibinfo->bmiHeader.biPlanes = 1; - dibinfo->bmiHeader.biBitCount = 24; - dibinfo->bmiHeader.biCompression = BI_BITFIELDS; - dibinfo->bmiHeader.biSizeImage = 0; - dibinfo->bmiHeader.biXPelsPerMeter = 0; - dibinfo->bmiHeader.biYPelsPerMeter = 0; - dibinfo->bmiHeader.biClrUsed = 0; - dibinfo->bmiHeader.biClrImportant = 0; - hbm = CreateDIBSection( hdc, dibinfo, DIB_RGB_COLORS, &ptr, NULL, 0 ); - ok( hbm == 0, "creating 24-bpp BI_BITFIELDS dibsection should fail\n" ); - dibinfo->bmiHeader.biCompression = BI_RGB; - hbm = CreateDIBSection( hdc, dibinfo, DIB_RGB_COLORS, &ptr, NULL, 0 ); - ok( hbm != 0, "failed to create bitmap\n" ); - - memset(dibinfo, 0, sizeof(dibinfo_buf)); - dibinfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - ret = GetDIBits(hdc, hbm, 0, 0, NULL, dibinfo, DIB_RGB_COLORS); - ok(ret == 1, "GetDIBits failed\n"); - ok( dibinfo->bmiHeader.biBitCount == 24, "wrong bit count %u\n", dibinfo->bmiHeader.biBitCount ); - - ok( dibinfo->bmiHeader.biCompression == BI_RGB, - "compression is %u\n", dibinfo->bmiHeader.biCompression ); - ok( !bitmasks[0], "red mask is set\n" ); - ok( !bitmasks[1], "green mask is set\n" ); - ok( !bitmasks[2], "blue mask is set\n" ); - - dibinfo->bmiHeader.biSizeImage = 0xdeadbeef; - ret = GetDIBits(hdc, hbm, 0, 1, bits, dibinfo, DIB_RGB_COLORS); - ok(ret == 1, "GetDIBits failed\n"); - ok( dibinfo->bmiHeader.biBitCount == 24, "wrong bit count %u\n", dibinfo->bmiHeader.biBitCount ); - ok( !bitmasks[0], "red mask is set\n" ); - ok( !bitmasks[1], "green mask is set\n" ); - ok( !bitmasks[2], "blue mask is set\n" ); - ok( dibinfo->bmiHeader.biSizeImage != 0xdeadbeef, "size image not set\n" ); - - DeleteObject(hbm); - ReleaseDC(NULL, hdc); -} - -static void test_select_object(void) -{ - HDC hdc; - HBITMAP hbm, hbm_old; - INT planes, bpp, i; - DWORD depths[] = {8, 15, 16, 24, 32}; - BITMAP bm; - DWORD bytes; - - hdc = GetDC(0); - ok(hdc != 0, "GetDC(0) failed\n"); - hbm = CreateCompatibleBitmap(hdc, 10, 10); - ok(hbm != 0, "CreateCompatibleBitmap failed\n"); - - hbm_old = SelectObject(hdc, hbm); - ok(hbm_old == 0, "SelectObject should fail\n"); - - DeleteObject(hbm); - ReleaseDC(0, hdc); - - hdc = CreateCompatibleDC(0); - ok(hdc != 0, "GetDC(0) failed\n"); - hbm = CreateCompatibleBitmap(hdc, 10, 10); - ok(hbm != 0, "CreateCompatibleBitmap failed\n"); - - hbm_old = SelectObject(hdc, hbm); - ok(hbm_old != 0, "SelectObject failed\n"); - hbm_old = SelectObject(hdc, hbm_old); - ok(hbm_old == hbm, "SelectObject failed\n"); - - DeleteObject(hbm); - - /* test an 1-bpp bitmap */ - planes = GetDeviceCaps(hdc, PLANES); - bpp = 1; - - hbm = CreateBitmap(10, 10, planes, bpp, NULL); - ok(hbm != 0, "CreateBitmap failed\n"); - - hbm_old = SelectObject(hdc, hbm); - ok(hbm_old != 0, "SelectObject failed\n"); - hbm_old = SelectObject(hdc, hbm_old); - ok(hbm_old == hbm, "SelectObject failed\n"); - - DeleteObject(hbm); - - for(i = 0; i < sizeof(depths)/sizeof(depths[0]); i++) { - /* test a color bitmap to dc bpp matching */ - planes = GetDeviceCaps(hdc, PLANES); - bpp = GetDeviceCaps(hdc, BITSPIXEL); - - hbm = CreateBitmap(10, 10, planes, depths[i], NULL); - ok(hbm != 0, "CreateBitmap failed\n"); - - hbm_old = SelectObject(hdc, hbm); - if(depths[i] == bpp || - (bpp == 16 && depths[i] == 15) /* 16 and 15 bpp are compatible */ - ) { - ok(hbm_old != 0, "SelectObject failed, BITSPIXEL: %d, created depth: %d\n", bpp, depths[i]); - SelectObject(hdc, hbm_old); - } else { - ok(hbm_old == 0, "SelectObject should fail. BITSPIXELS: %d, created depth: %d\n", bpp, depths[i]); - } - - memset(&bm, 0xAA, sizeof(bm)); - bytes = GetObject(hbm, sizeof(bm), &bm); - ok(bytes == sizeof(bm), "GetObject returned %d\n", bytes); - ok(bm.bmType == 0, "wrong bmType %d\n", bm.bmType); - ok(bm.bmWidth == 10, "wrong bmWidth %d\n", bm.bmWidth); - ok(bm.bmHeight == 10, "wrong bmHeight %d\n", bm.bmHeight); - ok(bm.bmWidthBytes == get_bitmap_stride(bm.bmWidth, bm.bmBitsPixel), "wrong bmWidthBytes %d\n", bm.bmWidthBytes); - ok(bm.bmPlanes == planes, "wrong bmPlanes %u\n", bm.bmPlanes); - if(depths[i] == 15) { - ok(bm.bmBitsPixel == 16, "wrong bmBitsPixel %d(15 bpp special)\n", bm.bmBitsPixel); - } else { - ok(bm.bmBitsPixel == depths[i], "wrong bmBitsPixel %d\n", bm.bmBitsPixel); - } - ok(!bm.bmBits, "wrong bmBits %p\n", bm.bmBits); - - DeleteObject(hbm); - } - - DeleteDC(hdc); -} - -static void test_mono_1x1_bmp_dbg(HBITMAP hbmp, int line) -{ - INT ret; - BITMAP bm; - - ret = GetObjectType(hbmp); - ok_(__FILE__, line)(ret == OBJ_BITMAP, "the object %p is not bitmap\n", hbmp); - - ret = GetObject(hbmp, 0, 0); - ok_(__FILE__, line)(ret == sizeof(BITMAP), "object size %d\n", ret); - - memset(&bm, 0xDA, sizeof(bm)); - SetLastError(0xdeadbeef); - ret = GetObject(hbmp, sizeof(bm), &bm); - if (!ret) /* XP, only for curObj2 */ return; - ok_(__FILE__, line)(ret == sizeof(BITMAP), "GetObject returned %d, error %u\n", ret, GetLastError()); - ok_(__FILE__, line)(bm.bmType == 0, "wrong bmType, expected 0 got %d\n", bm.bmType); - ok_(__FILE__, line)(bm.bmWidth == 1, "wrong bmWidth, expected 1 got %d\n", bm.bmWidth); - ok_(__FILE__, line)(bm.bmHeight == 1, "wrong bmHeight, expected 1 got %d\n", bm.bmHeight); - ok_(__FILE__, line)(bm.bmWidthBytes == 2, "wrong bmWidthBytes, expected 2 got %d\n", bm.bmWidthBytes); - ok_(__FILE__, line)(bm.bmPlanes == 1, "wrong bmPlanes, expected 1 got %u\n", bm.bmPlanes); - ok_(__FILE__, line)(bm.bmBitsPixel == 1, "wrong bmBitsPixel, expected 1 got %d\n", bm.bmBitsPixel); - ok_(__FILE__, line)(!bm.bmBits, "wrong bmBits %p\n", bm.bmBits); -} - -#define test_mono_1x1_bmp(a) test_mono_1x1_bmp_dbg((a), __LINE__) - -static void test_CreateBitmap(void) -{ - BITMAP bmp; - HDC screenDC = GetDC(0); - HDC hdc = CreateCompatibleDC(screenDC); - UINT i, expect = 0; - - /* all of these are the stock monochrome bitmap */ - HBITMAP bm = CreateCompatibleBitmap(hdc, 0, 0); - HBITMAP bm1 = CreateCompatibleBitmap(screenDC, 0, 0); - HBITMAP bm4 = CreateBitmap(0, 1, 0, 0, 0); - HBITMAP bm5 = CreateDiscardableBitmap(hdc, 0, 0); - HBITMAP curObj1 = GetCurrentObject(hdc, OBJ_BITMAP); - HBITMAP curObj2 = GetCurrentObject(screenDC, OBJ_BITMAP); - - /* these 2 are not the stock monochrome bitmap */ - HBITMAP bm2 = CreateCompatibleBitmap(hdc, 1, 1); - HBITMAP bm3 = CreateBitmap(1, 1, 1, 1, 0); - - HBITMAP old1 = SelectObject(hdc, bm2); - HBITMAP old2 = SelectObject(screenDC, bm3); - SelectObject(hdc, old1); - SelectObject(screenDC, old2); - - ok(bm == bm1 && bm == bm4 && bm == bm5 && bm == curObj1 && bm == old1, - "0: %p, 1: %p, 4: %p, 5: %p, curObj1 %p, old1 %p\n", - bm, bm1, bm4, bm5, curObj1, old1); - ok(bm != bm2 && bm != bm3, "0: %p, 2: %p, 3: %p\n", bm, bm2, bm3); -todo_wine - ok(bm != curObj2, "0: %p, curObj2 %p\n", bm, curObj2); - ok(old2 == 0, "old2 %p\n", old2); - - test_mono_1x1_bmp(bm); - test_mono_1x1_bmp(bm1); - test_mono_1x1_bmp(bm2); - test_mono_1x1_bmp(bm3); - test_mono_1x1_bmp(bm4); - test_mono_1x1_bmp(bm5); - test_mono_1x1_bmp(old1); - test_mono_1x1_bmp(curObj1); - - DeleteObject(bm); - DeleteObject(bm1); - DeleteObject(bm2); - DeleteObject(bm3); - DeleteObject(bm4); - DeleteObject(bm5); - - DeleteDC(hdc); - ReleaseDC(0, screenDC); - - /* show that Windows ignores the provided bm.bmWidthBytes */ - bmp.bmType = 0; - bmp.bmWidth = 1; - bmp.bmHeight = 1; - bmp.bmWidthBytes = 28; - bmp.bmPlanes = 1; - bmp.bmBitsPixel = 1; - bmp.bmBits = NULL; - bm = CreateBitmapIndirect(&bmp); - ok(bm != 0, "CreateBitmapIndirect error %u\n", GetLastError()); - test_mono_1x1_bmp(bm); - DeleteObject(bm); - - /* Test how the bmBitsPixel field is treated */ - for(i = 1; i <= 33; i++) { - bmp.bmType = 0; - bmp.bmWidth = 1; - bmp.bmHeight = 1; - bmp.bmWidthBytes = 28; - bmp.bmPlanes = 1; - bmp.bmBitsPixel = i; - bmp.bmBits = NULL; - SetLastError(0xdeadbeef); - bm = CreateBitmapIndirect(&bmp); - if(i > 32) { - DWORD error = GetLastError(); - ok(bm == 0, "CreateBitmapIndirect for %d bpp succeeded\n", i); - ok(error == ERROR_INVALID_PARAMETER, "Got error %d, expected ERROR_INVALID_PARAMETER\n", error); - DeleteObject(bm); - continue; - } - ok(bm != 0, "CreateBitmapIndirect error %u\n", GetLastError()); - GetObject(bm, sizeof(bmp), &bmp); - if(i == 1) { - expect = 1; - } else if(i <= 4) { - expect = 4; - } else if(i <= 8) { - expect = 8; - } else if(i <= 16) { - expect = 16; - } else if(i <= 24) { - expect = 24; - } else if(i <= 32) { - expect = 32; - } - ok(bmp.bmBitsPixel == expect, "CreateBitmapIndirect for a %d bpp bitmap created a %d bpp bitmap, expected %d\n", - i, bmp.bmBitsPixel, expect); - DeleteObject(bm); - } -} - -static void test_bitmapinfoheadersize(void) -{ - HBITMAP hdib; - BITMAPINFO bmi; - BITMAPCOREINFO bci; - HDC hdc = GetDC(0); - - memset(&bmi, 0, sizeof(BITMAPINFO)); - bmi.bmiHeader.biHeight = 100; - bmi.bmiHeader.biWidth = 512; - bmi.bmiHeader.biBitCount = 24; - bmi.bmiHeader.biPlanes = 1; - - bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER) - 1; - - hdib = CreateDIBSection(hdc, &bmi, 0, NULL, NULL, 0); - ok(hdib == NULL, "CreateDIBSection succeeded\n"); - - bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - - SetLastError(0xdeadbeef); - hdib = CreateDIBSection(hdc, &bmi, 0, NULL, NULL, 0); - ok(hdib != NULL, "CreateDIBSection error %d\n", GetLastError()); - DeleteObject(hdib); - - bmi.bmiHeader.biSize++; - - SetLastError(0xdeadbeef); - hdib = CreateDIBSection(hdc, &bmi, 0, NULL, NULL, 0); - ok(hdib != NULL || - broken(!hdib), /* Win98, WinMe */ - "CreateDIBSection error %d\n", GetLastError()); - DeleteObject(hdib); - - bmi.bmiHeader.biSize = sizeof(BITMAPINFO); - - SetLastError(0xdeadbeef); - hdib = CreateDIBSection(hdc, &bmi, 0, NULL, NULL, 0); - ok(hdib != NULL || - broken(!hdib), /* Win98, WinMe */ - "CreateDIBSection error %d\n", GetLastError()); - DeleteObject(hdib); - - bmi.bmiHeader.biSize++; - - SetLastError(0xdeadbeef); - hdib = CreateDIBSection(hdc, &bmi, 0, NULL, NULL, 0); - ok(hdib != NULL || - broken(!hdib), /* Win98, WinMe */ - "CreateDIBSection error %d\n", GetLastError()); - DeleteObject(hdib); - - bmi.bmiHeader.biSize = sizeof(BITMAPV4HEADER); - - SetLastError(0xdeadbeef); - hdib = CreateDIBSection(hdc, &bmi, 0, NULL, NULL, 0); - ok(hdib != NULL, "CreateDIBSection error %d\n", GetLastError()); - DeleteObject(hdib); - - bmi.bmiHeader.biSize = sizeof(BITMAPV5HEADER); - - SetLastError(0xdeadbeef); - hdib = CreateDIBSection(hdc, &bmi, 0, NULL, NULL, 0); - ok(hdib != NULL || - broken(!hdib), /* Win95 */ - "CreateDIBSection error %d\n", GetLastError()); - DeleteObject(hdib); - - memset(&bci, 0, sizeof(BITMAPCOREINFO)); - bci.bmciHeader.bcHeight = 100; - bci.bmciHeader.bcWidth = 512; - bci.bmciHeader.bcBitCount = 24; - bci.bmciHeader.bcPlanes = 1; - - bci.bmciHeader.bcSize = sizeof(BITMAPCOREHEADER) - 1; - - hdib = CreateDIBSection(hdc, (BITMAPINFO *)&bci, 0, NULL, NULL, 0); - ok(hdib == NULL, "CreateDIBSection succeeded\n"); - - bci.bmciHeader.bcSize = sizeof(BITMAPCOREHEADER); - - SetLastError(0xdeadbeef); - hdib = CreateDIBSection(hdc, (BITMAPINFO *)&bci, 0, NULL, NULL, 0); - ok(hdib != NULL, "CreateDIBSection error %d\n", GetLastError()); - DeleteObject(hdib); - - bci.bmciHeader.bcSize++; - - hdib = CreateDIBSection(hdc, (BITMAPINFO *)&bci, 0, NULL, NULL, 0); - ok(hdib == NULL, "CreateDIBSection succeeded\n"); - - bci.bmciHeader.bcSize = sizeof(BITMAPCOREINFO); - - hdib = CreateDIBSection(hdc, (BITMAPINFO *)&bci, 0, NULL, NULL, 0); - ok(hdib == NULL, "CreateDIBSection succeeded\n"); - - ReleaseDC(0, hdc); -} - -static void test_get16dibits(void) -{ - BYTE bits[4 * (16 / sizeof(BYTE))]; - HBITMAP hbmp; - HDC screen_dc = GetDC(NULL); - int ret; - BITMAPINFO * info; - int info_len = sizeof(BITMAPINFOHEADER) + 1024; - BYTE *p; - int overwritten_bytes = 0; - - memset(bits, 0, sizeof(bits)); - hbmp = CreateBitmap(2, 2, 1, 16, bits); - ok(hbmp != NULL, "CreateBitmap failed\n"); - - info = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, info_len); - assert(info); - - memset(info, '!', info_len); - memset(info, 0, sizeof(info->bmiHeader)); - - info->bmiHeader.biSize = sizeof(info->bmiHeader); - info->bmiHeader.biWidth = 2; - info->bmiHeader.biHeight = 2; - info->bmiHeader.biPlanes = 1; - info->bmiHeader.biCompression = BI_RGB; - - ret = GetDIBits(screen_dc, hbmp, 0, 0, NULL, info, 0); - ok(ret != 0, "GetDIBits failed got %d\n", ret); - - for (p = ((BYTE *) info) + sizeof(info->bmiHeader); (p - ((BYTE *) info)) < info_len; p++) - if (*p != '!') - overwritten_bytes++; - ok(overwritten_bytes == 0, "GetDIBits wrote past the buffer given\n"); - - HeapFree(GetProcessHeap(), 0, info); - DeleteObject(hbmp); - ReleaseDC(NULL, screen_dc); -} - -static void check_BitBlt_pixel(HDC hdcDst, HDC hdcSrc, UINT32 *dstBuffer, UINT32 *srcBuffer, - DWORD dwRop, UINT32 expected, int line) -{ - *srcBuffer = 0xFEDCBA98; - *dstBuffer = 0x89ABCDEF; - Rectangle(hdcSrc, 0, 0, 1, 1); /* A null operation to ensure dibs are coerced to X11 */ - BitBlt(hdcDst, 0, 0, 1, 1, hdcSrc, 0, 0, dwRop); - ok(expected == *dstBuffer, - "BitBlt with dwRop %06X. Expected 0x%08X, got 0x%08X from line %d\n", - dwRop, expected, *dstBuffer, line); -} - -static void test_BitBlt(void) -{ - HBITMAP bmpDst, bmpSrc; - HBITMAP oldDst, oldSrc; - HDC hdcScreen, hdcDst, hdcSrc; - UINT32 *dstBuffer, *srcBuffer; - HBRUSH hBrush, hOldBrush; - BITMAPINFO bitmapInfo; - - memset(&bitmapInfo, 0, sizeof(BITMAPINFO)); - bitmapInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bitmapInfo.bmiHeader.biWidth = 1; - bitmapInfo.bmiHeader.biHeight = 1; - bitmapInfo.bmiHeader.biPlanes = 1; - bitmapInfo.bmiHeader.biBitCount = 32; - bitmapInfo.bmiHeader.biCompression = BI_RGB; - bitmapInfo.bmiHeader.biSizeImage = sizeof(UINT32); - - hdcScreen = CreateCompatibleDC(0); - hdcDst = CreateCompatibleDC(hdcScreen); - hdcSrc = CreateCompatibleDC(hdcDst); - - /* Setup the destination dib section */ - bmpDst = CreateDIBSection(hdcScreen, &bitmapInfo, DIB_RGB_COLORS, (void**)&dstBuffer, - NULL, 0); - oldDst = SelectObject(hdcDst, bmpDst); - - hBrush = CreateSolidBrush(0x012345678); - hOldBrush = SelectObject(hdcDst, hBrush); - - /* Setup the source dib section */ - bmpSrc = CreateDIBSection(hdcScreen, &bitmapInfo, DIB_RGB_COLORS, (void**)&srcBuffer, - NULL, 0); - oldSrc = SelectObject(hdcSrc, bmpSrc); - - check_BitBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, SRCCOPY, 0xFEDCBA98, __LINE__); - check_BitBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, SRCPAINT, 0xFFFFFFFF, __LINE__); - check_BitBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, SRCAND, 0x88888888, __LINE__); - check_BitBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, SRCINVERT, 0x77777777, __LINE__); - check_BitBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, SRCERASE, 0x76543210, __LINE__); - check_BitBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, NOTSRCCOPY, 0x01234567, __LINE__); - check_BitBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, NOTSRCERASE, 0x00000000, __LINE__); - check_BitBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, MERGECOPY, 0x00581210, __LINE__); - check_BitBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, MERGEPAINT, 0x89ABCDEF, __LINE__); - check_BitBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, PATCOPY, 0x00785634, __LINE__); - check_BitBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, PATPAINT, 0x89FBDFFF, __LINE__); - check_BitBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, PATINVERT, 0x89D39BDB, __LINE__); - check_BitBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, DSTINVERT, 0x76543210, __LINE__); - check_BitBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, BLACKNESS, 0x00000000, __LINE__); - check_BitBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, WHITENESS, 0xFFFFFFFF, __LINE__); - - /* Tidy up */ - SelectObject(hdcSrc, oldSrc); - DeleteObject(bmpSrc); - DeleteDC(hdcSrc); - - SelectObject(hdcDst, hOldBrush); - DeleteObject(hBrush); - SelectObject(hdcDst, oldDst); - DeleteObject(bmpDst); - DeleteDC(hdcDst); - - - DeleteDC(hdcScreen); -} - -static void check_StretchBlt_pixel(HDC hdcDst, HDC hdcSrc, UINT32 *dstBuffer, UINT32 *srcBuffer, - DWORD dwRop, UINT32 expected, int line) -{ - *srcBuffer = 0xFEDCBA98; - *dstBuffer = 0x89ABCDEF; - StretchBlt(hdcDst, 0, 0, 2, 1, hdcSrc, 0, 0, 1, 1, dwRop); - ok(expected == *dstBuffer, - "StretchBlt with dwRop %06X. Expected 0x%08X, got 0x%08X from line %d\n", - dwRop, expected, *dstBuffer, line); -} - -static void check_StretchBlt_stretch(HDC hdcDst, HDC hdcSrc, BITMAPINFO *dst_info, UINT32 *dstBuffer, UINT32 *srcBuffer, - int nXOriginDest, int nYOriginDest, int nWidthDest, int nHeightDest, - int nXOriginSrc, int nYOriginSrc, int nWidthSrc, int nHeightSrc, - UINT32 *expected, int line) -{ - int dst_size = get_dib_image_size( dst_info ); - - memset(dstBuffer, 0, dst_size); - StretchBlt(hdcDst, nXOriginDest, nYOriginDest, nWidthDest, nHeightDest, - hdcSrc, nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc, SRCCOPY); - ok(memcmp(dstBuffer, expected, dst_size) == 0, - "StretchBlt expected { %08X, %08X, %08X, %08X } got { %08X, %08X, %08X, %08X } " - "stretching { %d, %d, %d, %d } to { %d, %d, %d, %d } from line %d\n", - expected[0], expected[1], expected[2], expected[3], - dstBuffer[0], dstBuffer[1], dstBuffer[2], dstBuffer[3], - nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc, - nXOriginDest, nYOriginDest, nWidthDest, nHeightDest, line); -} - -static void test_StretchBlt(void) -{ - HBITMAP bmpDst, bmpSrc; - HBITMAP oldDst, oldSrc; - HDC hdcScreen, hdcDst, hdcSrc; - UINT32 *dstBuffer, *srcBuffer; - HBRUSH hBrush, hOldBrush; - BITMAPINFO biDst, biSrc; - UINT32 expected[256]; - - memset(&biDst, 0, sizeof(BITMAPINFO)); - biDst.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - biDst.bmiHeader.biWidth = 16; - biDst.bmiHeader.biHeight = -16; - biDst.bmiHeader.biPlanes = 1; - biDst.bmiHeader.biBitCount = 32; - biDst.bmiHeader.biCompression = BI_RGB; - memcpy(&biSrc, &biDst, sizeof(BITMAPINFO)); - - hdcScreen = CreateCompatibleDC(0); - hdcDst = CreateCompatibleDC(hdcScreen); - hdcSrc = CreateCompatibleDC(hdcDst); - - /* Pixel Tests */ - bmpDst = CreateDIBSection(hdcScreen, &biDst, DIB_RGB_COLORS, (void**)&dstBuffer, - NULL, 0); - oldDst = SelectObject(hdcDst, bmpDst); - - bmpSrc = CreateDIBSection(hdcScreen, &biSrc, DIB_RGB_COLORS, (void**)&srcBuffer, - NULL, 0); - oldSrc = SelectObject(hdcSrc, bmpSrc); - - hBrush = CreateSolidBrush(0x012345678); - hOldBrush = SelectObject(hdcDst, hBrush); - - check_StretchBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, SRCCOPY, 0xFEDCBA98, __LINE__); - check_StretchBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, SRCPAINT, 0xFFFFFFFF, __LINE__); - check_StretchBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, SRCAND, 0x88888888, __LINE__); - check_StretchBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, SRCINVERT, 0x77777777, __LINE__); - check_StretchBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, SRCERASE, 0x76543210, __LINE__); - check_StretchBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, NOTSRCCOPY, 0x01234567, __LINE__); - check_StretchBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, NOTSRCERASE, 0x00000000, __LINE__); - check_StretchBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, MERGECOPY, 0x00581210, __LINE__); - check_StretchBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, MERGEPAINT, 0x89ABCDEF, __LINE__); - check_StretchBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, PATCOPY, 0x00785634, __LINE__); - check_StretchBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, PATPAINT, 0x89FBDFFF, __LINE__); - check_StretchBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, PATINVERT, 0x89D39BDB, __LINE__); - check_StretchBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, DSTINVERT, 0x76543210, __LINE__); - check_StretchBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, BLACKNESS, 0x00000000, __LINE__); - check_StretchBlt_pixel(hdcDst, hdcSrc, dstBuffer, srcBuffer, WHITENESS, 0xFFFFFFFF, __LINE__); - - SelectObject(hdcDst, hOldBrush); - DeleteObject(hBrush); - - /* Top-down to top-down tests */ - srcBuffer[0] = 0xCAFED00D, srcBuffer[1] = 0xFEEDFACE; - srcBuffer[16] = 0xFEDCBA98, srcBuffer[17] = 0x76543210; - - memset( expected, 0, get_dib_image_size( &biDst ) ); - expected[0] = 0xCAFED00D, expected[1] = 0xFEEDFACE; - expected[16] = 0xFEDCBA98, expected[17] = 0x76543210; - check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer, - 0, 0, 2, 2, 0, 0, 2, 2, expected, __LINE__); - - expected[0] = 0xCAFED00D, expected[1] = 0x00000000; - expected[16] = 0x00000000, expected[17] = 0x00000000; - check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer, - 0, 0, 1, 1, 0, 0, 1, 1, expected, __LINE__); - - expected[0] = 0xCAFED00D, expected[1] = 0xCAFED00D; - expected[16] = 0xCAFED00D, expected[17] = 0xCAFED00D; - check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer, - 0, 0, 2, 2, 0, 0, 1, 1, expected, __LINE__); - - /* This is an example of the dst width (height) == 1 exception, explored below */ - expected[0] = 0xCAFED00D, expected[1] = 0x00000000; - expected[16] = 0x00000000, expected[17] = 0x00000000; - check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer, - 0, 0, 1, 1, 0, 0, 2, 2, expected, __LINE__); - - expected[0] = 0x76543210, expected[1] = 0xFEDCBA98; - expected[16] = 0xFEEDFACE, expected[17] = 0xCAFED00D; - check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer, - 0, 0, 2, 2, 1, 1, -2, -2, expected, __LINE__); - - expected[0] = 0x76543210, expected[1] = 0xFEDCBA98; - expected[16] = 0xFEEDFACE, expected[17] = 0xCAFED00D; - check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer, - 1, 1, -2, -2, 0, 0, 2, 2, expected, __LINE__); - - expected[0] = 0xCAFED00D, expected[1] = 0x00000000; - expected[16] = 0x00000000, expected[17] = 0x00000000; - todo_wine check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer, - 1, 1, -2, -2, 1, 1, -2, -2, expected, __LINE__); - - expected[0] = 0x00000000, expected[1] = 0x00000000; - expected[16] = 0x00000000, expected[17] = 0xCAFED00D, expected[18] = 0xFEEDFACE; - expected[32] = 0x00000000, expected[33] = 0xFEDCBA98, expected[34] = 0x76543210; - - check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer, - 1, 1, 2, 2, 0, 0, 2, 2, expected, __LINE__); - - /* when dst width is 1 merge src width - 1 pixels */ - memset( srcBuffer, 0, get_dib_image_size( &biSrc ) ); - srcBuffer[0] = 0x0000ff00, srcBuffer[1] = 0x0000f0f0, srcBuffer[2] = 0x0000cccc, srcBuffer[3] = 0x0000aaaa; - srcBuffer[16] = 0xFEDCBA98, srcBuffer[17] = 0x76543210; - - memset( expected, 0, get_dib_image_size( &biDst ) ); - expected[0] = srcBuffer[0]; - check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer, - 0, 0, 1, 1, 0, 0, 2, 1, expected, __LINE__); - - expected[0] = srcBuffer[0] & srcBuffer[1]; -todo_wine - check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer, - 0, 0, 1, 1, 0, 0, 3, 1, expected, __LINE__); - - expected[0] = srcBuffer[0] & srcBuffer[1] & srcBuffer[2]; -todo_wine - check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer, - 0, 0, 1, 1, 0, 0, 4, 1, expected, __LINE__); - - /* this doesn't happen if the src width is -ve */ - expected[0] = srcBuffer[1] & srcBuffer[2]; -todo_wine - check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer, - 0, 0, 1, 1, 2, 0, -2, 1, expected, __LINE__); - - /* when dst width > 1 behaviour reverts to what one would expect */ - expected[0] = srcBuffer[0] & srcBuffer[1], expected[1] = srcBuffer[2] & srcBuffer[3]; -todo_wine - check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer, - 0, 0, 2, 1, 0, 0, 4, 1, expected, __LINE__); - - /* similarly in the vertical direction */ - memset( expected, 0, get_dib_image_size( &biDst ) ); - expected[0] = srcBuffer[0]; - check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer, - 0, 0, 1, 1, 0, 0, 1, 2, expected, __LINE__); - - /* check that it's the dst size in device units that needs to be 1 */ - SetMapMode( hdcDst, MM_ISOTROPIC ); - SetWindowExtEx( hdcDst, 200, 200, NULL ); - SetViewportExtEx( hdcDst, 100, 100, NULL ); - - expected[0] = srcBuffer[0] & srcBuffer[1] & srcBuffer[2]; -todo_wine - check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer, - 0, 0, 2, 2, 0, 0, 4, 1, expected, __LINE__); - SetMapMode( hdcDst, MM_TEXT ); - - SelectObject(hdcDst, oldDst); - DeleteObject(bmpDst); - - /* Top-down to bottom-up tests */ - memset( srcBuffer, 0, get_dib_image_size( &biSrc ) ); - srcBuffer[0] = 0xCAFED00D, srcBuffer[1] = 0xFEEDFACE; - srcBuffer[16] = 0xFEDCBA98, srcBuffer[17] = 0x76543210; - - biDst.bmiHeader.biHeight = 16; - bmpDst = CreateDIBSection(hdcScreen, &biDst, DIB_RGB_COLORS, (void**)&dstBuffer, - NULL, 0); - oldDst = SelectObject(hdcDst, bmpDst); - - memset( expected, 0, get_dib_image_size( &biDst ) ); - - expected[224] = 0xFEDCBA98, expected[225] = 0x76543210; - expected[240] = 0xCAFED00D, expected[241] = 0xFEEDFACE; - check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer, - 0, 0, 2, 2, 0, 0, 2, 2, expected, __LINE__); - - expected[224] = 0xFEEDFACE, expected[225] = 0xCAFED00D; - expected[240] = 0x76543210, expected[241] = 0xFEDCBA98; - check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer, - 0, 0, 2, 2, 1, 1, -2, -2, expected, __LINE__); - - SelectObject(hdcSrc, oldSrc); - DeleteObject(bmpSrc); - - /* Bottom-up to bottom-up tests */ - biSrc.bmiHeader.biHeight = 16; - bmpSrc = CreateDIBSection(hdcScreen, &biSrc, DIB_RGB_COLORS, (void**)&srcBuffer, - NULL, 0); - srcBuffer[224] = 0xCAFED00D, srcBuffer[225] = 0xFEEDFACE; - srcBuffer[240] = 0xFEDCBA98, srcBuffer[241] = 0x76543210; - oldSrc = SelectObject(hdcSrc, bmpSrc); - - memset( expected, 0, get_dib_image_size( &biDst ) ); - - expected[224] = 0xCAFED00D, expected[225] = 0xFEEDFACE; - expected[240] = 0xFEDCBA98, expected[241] = 0x76543210; - check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer, - 0, 0, 2, 2, 0, 0, 2, 2, expected, __LINE__); - - expected[224] = 0x76543210, expected[225] = 0xFEDCBA98; - expected[240] = 0xFEEDFACE, expected[241] = 0xCAFED00D; - check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer, - 0, 0, 2, 2, 1, 1, -2, -2, expected, __LINE__); - - SelectObject(hdcDst, oldDst); - DeleteObject(bmpDst); - - /* Bottom-up to top-down tests */ - biDst.bmiHeader.biHeight = -16; - bmpDst = CreateDIBSection(hdcScreen, &biDst, DIB_RGB_COLORS, (void**)&dstBuffer, - NULL, 0); - oldDst = SelectObject(hdcDst, bmpDst); - - memset( expected, 0, get_dib_image_size( &biDst ) ); - expected[0] = 0xFEDCBA98, expected[1] = 0x76543210; - expected[16] = 0xCAFED00D, expected[17] = 0xFEEDFACE; - check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer, - 0, 0, 2, 2, 0, 0, 2, 2, expected, __LINE__); - - expected[0] = 0xFEEDFACE, expected[1] = 0xCAFED00D; - expected[16] = 0x76543210, expected[17] = 0xFEDCBA98; - check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer, - 0, 0, 2, 2, 1, 1, -2, -2, expected, __LINE__); - - SelectObject(hdcSrc, oldSrc); - DeleteObject(bmpSrc); - - biSrc.bmiHeader.biHeight = -2; - biSrc.bmiHeader.biBitCount = 24; - bmpSrc = CreateDIBSection(hdcScreen, &biSrc, DIB_RGB_COLORS, (void**)&srcBuffer, NULL, 0); - oldSrc = SelectObject(hdcSrc, bmpSrc); - - memset( expected, 0, get_dib_image_size( &biDst ) ); - expected[0] = 0xFEEDFACE, expected[1] = 0xCAFED00D; - expected[2] = 0x76543210, expected[3] = 0xFEDCBA98; - memcpy(dstBuffer, expected, 4 * sizeof(*dstBuffer)); - StretchBlt(hdcSrc, 0, 0, 4, 1, hdcDst, 0, 0, 4, 1, SRCCOPY ); - memset(dstBuffer, 0x55, 4 * sizeof(*dstBuffer)); - StretchBlt(hdcDst, 0, 0, 4, 1, hdcSrc, 0, 0, 4, 1, SRCCOPY ); - expected[0] = 0x00EDFACE, expected[1] = 0x00FED00D; - expected[2] = 0x00543210, expected[3] = 0x00DCBA98; - ok(!memcmp(dstBuffer, expected, 16), - "StretchBlt expected { %08X, %08X, %08X, %08X } got { %08X, %08X, %08X, %08X }\n", - expected[0], expected[1], expected[2], expected[3], - dstBuffer[0], dstBuffer[1], dstBuffer[2], dstBuffer[3] ); - - expected[0] = 0xFEEDFACE, expected[1] = 0xCAFED00D; - expected[2] = 0x76543210, expected[3] = 0xFEDCBA98; - memcpy(srcBuffer, expected, 4 * sizeof(*dstBuffer)); - memset(dstBuffer, 0x55, 4 * sizeof(*dstBuffer)); - StretchBlt(hdcDst, 0, 0, 4, 1, hdcSrc, 0, 0, 4, 1, SRCCOPY ); - expected[0] = 0x00EDFACE, expected[1] = 0x00D00DFE; - expected[2] = 0x0010CAFE, expected[3] = 0x00765432; - ok(!memcmp(dstBuffer, expected, 16), - "StretchBlt expected { %08X, %08X, %08X, %08X } got { %08X, %08X, %08X, %08X }\n", - expected[0], expected[1], expected[2], expected[3], - dstBuffer[0], dstBuffer[1], dstBuffer[2], dstBuffer[3] ); - - SelectObject(hdcSrc, oldSrc); - DeleteObject(bmpSrc); - DeleteDC(hdcSrc); - - SelectObject(hdcDst, oldDst); - DeleteObject(bmpDst); - DeleteDC(hdcDst); - - DeleteDC(hdcScreen); -} - -static void check_StretchDIBits_pixel(HDC hdcDst, UINT32 *dstBuffer, UINT32 *srcBuffer, - DWORD dwRop, UINT32 expected, int line) -{ - const UINT32 buffer[2] = { 0xFEDCBA98, 0 }; - BITMAPINFO bitmapInfo; - - memset(&bitmapInfo, 0, sizeof(BITMAPINFO)); - bitmapInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bitmapInfo.bmiHeader.biWidth = 2; - bitmapInfo.bmiHeader.biHeight = 1; - bitmapInfo.bmiHeader.biPlanes = 1; - bitmapInfo.bmiHeader.biBitCount = 32; - bitmapInfo.bmiHeader.biCompression = BI_RGB; - bitmapInfo.bmiHeader.biSizeImage = sizeof(buffer); - - *dstBuffer = 0x89ABCDEF; - - StretchDIBits(hdcDst, 0, 0, 2, 1, 0, 0, 1, 1, &buffer, &bitmapInfo, DIB_RGB_COLORS, dwRop); - ok(expected == *dstBuffer, - "StretchDIBits with dwRop %06X. Expected 0x%08X, got 0x%08X from line %d\n", - dwRop, expected, *dstBuffer, line); -} - -static void check_StretchDIBits_stretch(HDC hdcDst, UINT32 *dstBuffer, UINT32 *srcBuffer, - int nXOriginDest, int nYOriginDest, int nWidthDest, int nHeightDest, - int nXOriginSrc, int nYOriginSrc, int nWidthSrc, int nHeightSrc, - UINT32 expected[4], UINT32 legacy_expected[4], int line) -{ - BITMAPINFO bitmapInfo; - - memset(&bitmapInfo, 0, sizeof(BITMAPINFO)); - bitmapInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bitmapInfo.bmiHeader.biWidth = 2; - bitmapInfo.bmiHeader.biHeight = -2; - bitmapInfo.bmiHeader.biPlanes = 1; - bitmapInfo.bmiHeader.biBitCount = 32; - bitmapInfo.bmiHeader.biCompression = BI_RGB; - - memset(dstBuffer, 0, 16); - StretchDIBits(hdcDst, nXOriginDest, nYOriginDest, nWidthDest, nHeightDest, - nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc, - srcBuffer, &bitmapInfo, DIB_RGB_COLORS, SRCCOPY); - ok(memcmp(dstBuffer, expected, 16) == 0, - "StretchDIBits expected { %08X, %08X, %08X, %08X } got { %08X, %08X, %08X, %08X } " - "stretching { %d, %d, %d, %d } to { %d, %d, %d, %d } from line %d\n", - expected[0], expected[1], expected[2], expected[3], - dstBuffer[0], dstBuffer[1], dstBuffer[2], dstBuffer[3], - nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc, - nXOriginDest, nYOriginDest, nWidthDest, nHeightDest, line); -} - -static void test_StretchDIBits(void) -{ - HBITMAP bmpDst; - HBITMAP oldDst; - HDC hdcScreen, hdcDst; - UINT32 *dstBuffer, srcBuffer[4]; - HBRUSH hBrush, hOldBrush; - BITMAPINFO biDst; - UINT32 expected[4], legacy_expected[4]; - - memset(&biDst, 0, sizeof(BITMAPINFO)); - biDst.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - biDst.bmiHeader.biWidth = 2; - biDst.bmiHeader.biHeight = -2; - biDst.bmiHeader.biPlanes = 1; - biDst.bmiHeader.biBitCount = 32; - biDst.bmiHeader.biCompression = BI_RGB; - - hdcScreen = CreateCompatibleDC(0); - hdcDst = CreateCompatibleDC(hdcScreen); - - /* Pixel Tests */ - bmpDst = CreateDIBSection(hdcScreen, &biDst, DIB_RGB_COLORS, (void**)&dstBuffer, - NULL, 0); - oldDst = SelectObject(hdcDst, bmpDst); - - hBrush = CreateSolidBrush(0x012345678); - hOldBrush = SelectObject(hdcDst, hBrush); - - check_StretchDIBits_pixel(hdcDst, dstBuffer, srcBuffer, SRCCOPY, 0xFEDCBA98, __LINE__); - check_StretchDIBits_pixel(hdcDst, dstBuffer, srcBuffer, SRCPAINT, 0xFFFFFFFF, __LINE__); - check_StretchDIBits_pixel(hdcDst, dstBuffer, srcBuffer, SRCAND, 0x88888888, __LINE__); - check_StretchDIBits_pixel(hdcDst, dstBuffer, srcBuffer, SRCINVERT, 0x77777777, __LINE__); - check_StretchDIBits_pixel(hdcDst, dstBuffer, srcBuffer, SRCERASE, 0x76543210, __LINE__); - check_StretchDIBits_pixel(hdcDst, dstBuffer, srcBuffer, NOTSRCCOPY, 0x01234567, __LINE__); - check_StretchDIBits_pixel(hdcDst, dstBuffer, srcBuffer, NOTSRCERASE, 0x00000000, __LINE__); - check_StretchDIBits_pixel(hdcDst, dstBuffer, srcBuffer, MERGECOPY, 0x00581210, __LINE__); - check_StretchDIBits_pixel(hdcDst, dstBuffer, srcBuffer, MERGEPAINT, 0x89ABCDEF, __LINE__); - check_StretchDIBits_pixel(hdcDst, dstBuffer, srcBuffer, PATCOPY, 0x00785634, __LINE__); - check_StretchDIBits_pixel(hdcDst, dstBuffer, srcBuffer, PATPAINT, 0x89FBDFFF, __LINE__); - check_StretchDIBits_pixel(hdcDst, dstBuffer, srcBuffer, PATINVERT, 0x89D39BDB, __LINE__); - check_StretchDIBits_pixel(hdcDst, dstBuffer, srcBuffer, DSTINVERT, 0x76543210, __LINE__); - check_StretchDIBits_pixel(hdcDst, dstBuffer, srcBuffer, BLACKNESS, 0x00000000, __LINE__); - check_StretchDIBits_pixel(hdcDst, dstBuffer, srcBuffer, WHITENESS, 0xFFFFFFFF, __LINE__); - - SelectObject(hdcDst, hOldBrush); - DeleteObject(hBrush); - - /* Top-down destination tests */ - srcBuffer[0] = 0xCAFED00D, srcBuffer[1] = 0xFEEDFACE; - srcBuffer[2] = 0xFEDCBA98, srcBuffer[3] = 0x76543210; - - expected[0] = 0xCAFED00D, expected[1] = 0xFEEDFACE; - expected[2] = 0xFEDCBA98, expected[3] = 0x76543210; - check_StretchDIBits_stretch(hdcDst, dstBuffer, srcBuffer, - 0, 0, 2, 2, 0, 0, 2, 2, expected, expected, __LINE__); - - expected[0] = 0xCAFED00D, expected[1] = 0x00000000; - expected[2] = 0x00000000, expected[3] = 0x00000000; - legacy_expected[0] = 0xFEDCBA98, legacy_expected[1] = 0x00000000; - legacy_expected[2] = 0x00000000, legacy_expected[3] = 0x00000000; - check_StretchDIBits_stretch(hdcDst, dstBuffer, srcBuffer, - 0, 0, 1, 1, 0, 0, 1, 1, expected, legacy_expected, __LINE__); - - expected[0] = 0xFEDCBA98, expected[1] = 0xFEDCBA98; - expected[2] = 0xFEDCBA98, expected[3] = 0xFEDCBA98; - check_StretchDIBits_stretch(hdcDst, dstBuffer, srcBuffer, - 0, 0, 2, 2, 0, 0, 1, 1, expected, expected, __LINE__); - - expected[0] = 0x42441000, expected[1] = 0x00000000; - expected[2] = 0x00000000, expected[3] = 0x00000000; - legacy_expected[0] = 0x00543210, legacy_expected[1] = 0x00000000; - legacy_expected[2] = 0x00000000, legacy_expected[3] = 0x00000000; - todo_wine check_StretchDIBits_stretch(hdcDst, dstBuffer, srcBuffer, - 0, 0, 1, 1, 0, 0, 2, 2, expected, legacy_expected, __LINE__); - - expected[0] = 0x00000000, expected[1] = 0x00000000; - expected[2] = 0x00000000, expected[3] = 0x00000000; - check_StretchDIBits_stretch(hdcDst, dstBuffer, srcBuffer, - 0, 0, 2, 2, 1, 1, -2, -2, expected, expected, __LINE__); - - expected[0] = 0x00000000, expected[1] = 0x00000000; - expected[2] = 0x00000000, expected[3] = 0x00000000; - check_StretchDIBits_stretch(hdcDst, dstBuffer, srcBuffer, - 0, 0, 2, 2, 1, 1, -2, -2, expected, expected, __LINE__); - - expected[0] = 0x00000000, expected[1] = 0x00000000; - expected[2] = 0x00000000, expected[3] = 0x00000000; - check_StretchDIBits_stretch(hdcDst, dstBuffer, srcBuffer, - 1, 1, -2, -2, 1, 1, -2, -2, expected, expected, __LINE__); - - expected[0] = 0x00000000, expected[1] = 0x00000000; - expected[2] = 0x00000000, expected[3] = 0xCAFED00D; - check_StretchDIBits_stretch(hdcDst, dstBuffer, srcBuffer, - 1, 1, 2, 2, 0, 0, 2, 2, expected, expected, __LINE__); - - SelectObject(hdcDst, oldDst); - DeleteObject(bmpDst); - - /* Bottom up destination tests */ - biDst.bmiHeader.biHeight = 2; - bmpDst = CreateDIBSection(hdcScreen, &biDst, DIB_RGB_COLORS, (void**)&dstBuffer, - NULL, 0); - oldDst = SelectObject(hdcDst, bmpDst); - - expected[0] = 0xFEDCBA98, expected[1] = 0x76543210; - expected[2] = 0xCAFED00D, expected[3] = 0xFEEDFACE; - check_StretchDIBits_stretch(hdcDst, dstBuffer, srcBuffer, - 0, 0, 2, 2, 0, 0, 2, 2, expected, expected, __LINE__); - - /* Tidy up */ - SelectObject(hdcDst, oldDst); - DeleteObject(bmpDst); - DeleteDC(hdcDst); - - DeleteDC(hdcScreen); -} - -static void test_GdiAlphaBlend(void) -{ - /* test out-of-bound parameters for GdiAlphaBlend */ - HDC hdcNull; - - HDC hdcDst; - HBITMAP bmpDst; - HBITMAP oldDst; - - BITMAPINFO bmi; - HDC hdcSrc; - HBITMAP bmpSrc; - HBITMAP oldSrc; - LPVOID bits; - - BLENDFUNCTION blend; - - if (!pGdiAlphaBlend) - { - win_skip("GdiAlphaBlend() is not implemented\n"); - return; - } - - hdcNull = GetDC(NULL); - hdcDst = CreateCompatibleDC(hdcNull); - bmpDst = CreateCompatibleBitmap(hdcNull, 100, 100); - hdcSrc = CreateCompatibleDC(hdcNull); - - memset(&bmi, 0, sizeof(bmi)); /* as of Wine 0.9.44 we require the src to be a DIB section */ - bmi.bmiHeader.biSize = sizeof(bmi.bmiHeader); - bmi.bmiHeader.biHeight = 20; - bmi.bmiHeader.biWidth = 20; - bmi.bmiHeader.biBitCount = 32; - bmi.bmiHeader.biPlanes = 1; - bmi.bmiHeader.biCompression = BI_RGB; - bmpSrc = CreateDIBSection(hdcDst, &bmi, DIB_RGB_COLORS, &bits, NULL, 0); - ok(bmpSrc != NULL, "Couldn't create source bitmap\n"); - - oldDst = SelectObject(hdcDst, bmpDst); - oldSrc = SelectObject(hdcSrc, bmpSrc); - - blend.BlendOp = AC_SRC_OVER; - blend.BlendFlags = 0; - blend.SourceConstantAlpha = 128; - blend.AlphaFormat = 0; - - expect_eq(pGdiAlphaBlend(hdcDst, 0, 0, 20, 20, hdcSrc, 0, 0, 20, 20, blend), TRUE, BOOL, "%d"); - SetLastError(0xdeadbeef); - expect_eq(pGdiAlphaBlend(hdcDst, 0, 0, 20, 20, hdcSrc, -1, 0, 10, 10, blend), FALSE, BOOL, "%d"); - expect_eq(GetLastError(), ERROR_INVALID_PARAMETER, int, "%d"); - expect_eq(pGdiAlphaBlend(hdcDst, 0, 0, 20, 20, hdcSrc, 0, -1, 10, 10, blend), FALSE, BOOL, "%d"); - expect_eq(pGdiAlphaBlend(hdcDst, 0, 0, 20, 20, hdcSrc, 15, 0, 10, 10, blend), FALSE, BOOL, "%d"); - expect_eq(pGdiAlphaBlend(hdcDst, 0, 0, 20, 20, hdcSrc, 10, 10, -2, 3, blend), FALSE, BOOL, "%d"); - expect_eq(pGdiAlphaBlend(hdcDst, 0, 0, 20, 20, hdcSrc, 10, 10, -2, 3, blend), FALSE, BOOL, "%d"); - - SetWindowOrgEx(hdcSrc, -10, -10, NULL); - expect_eq(pGdiAlphaBlend(hdcDst, 0, 0, 20, 20, hdcSrc, -1, 0, 10, 10, blend), TRUE, BOOL, "%d"); - expect_eq(pGdiAlphaBlend(hdcDst, 0, 0, 20, 20, hdcSrc, 0, -1, 10, 10, blend), TRUE, BOOL, "%d"); - SetMapMode(hdcSrc, MM_ANISOTROPIC); - ScaleWindowExtEx(hdcSrc, 10, 1, 10, 1, NULL); - expect_eq(pGdiAlphaBlend(hdcDst, 0, 0, 20, 20, hdcSrc, -1, 0, 30, 30, blend), TRUE, BOOL, "%d"); - expect_eq(pGdiAlphaBlend(hdcDst, 0, 0, 20, 20, hdcSrc, 0, -1, 30, 30, blend), TRUE, BOOL, "%d"); - - SetLastError(0xdeadbeef); - expect_eq(pGdiAlphaBlend(hdcDst, 0, 0, 20, 20, NULL, 0, 0, 20, 20, blend), FALSE, BOOL, "%d"); - expect_eq(GetLastError(), 0xdeadbeef, int, "%d"); - - SelectObject(hdcDst, oldDst); - SelectObject(hdcSrc, oldSrc); - DeleteObject(bmpSrc); - DeleteObject(bmpDst); - DeleteDC(hdcDst); - DeleteDC(hdcSrc); - - ReleaseDC(NULL, hdcNull); - -} - -static void test_clipping(void) -{ - HBITMAP bmpDst; - HBITMAP bmpSrc; - HRGN hRgn; - LPVOID bits; - BOOL result; - - HDC hdcDst = CreateCompatibleDC( NULL ); - HDC hdcSrc = CreateCompatibleDC( NULL ); - - BITMAPINFO bmpinfo={{0}}; - bmpinfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bmpinfo.bmiHeader.biWidth = 100; - bmpinfo.bmiHeader.biHeight = 100; - bmpinfo.bmiHeader.biPlanes = 1; - bmpinfo.bmiHeader.biBitCount = GetDeviceCaps( hdcDst, BITSPIXEL ); - bmpinfo.bmiHeader.biCompression = BI_RGB; - - bmpDst = CreateDIBSection( hdcDst, &bmpinfo, DIB_RGB_COLORS, &bits, NULL, 0 ); - ok(bmpDst != NULL, "Couldn't create destination bitmap\n"); - SelectObject( hdcDst, bmpDst ); - - bmpSrc = CreateDIBSection( hdcSrc, &bmpinfo, DIB_RGB_COLORS, &bits, NULL, 0 ); - ok(bmpSrc != NULL, "Couldn't create source bitmap\n"); - SelectObject( hdcSrc, bmpSrc ); - - result = BitBlt( hdcDst, 0, 0, 100, 100, hdcSrc, 100, 100, SRCCOPY ); - ok(result, "BitBlt failed\n"); - - hRgn = CreateRectRgn( 0,0,0,0 ); - SelectClipRgn( hdcDst, hRgn ); - - result = BitBlt( hdcDst, 0, 0, 100, 100, hdcSrc, 0, 0, SRCCOPY ); - ok(result, "BitBlt failed\n"); - - DeleteObject( bmpDst ); - DeleteObject( bmpSrc ); - DeleteObject( hRgn ); - DeleteDC( hdcDst ); - DeleteDC( hdcSrc ); -} - -static void test_32bit_bitmap_blt(void) -{ - BITMAPINFO biDst; - HBITMAP bmpSrc, bmpDst; - HBITMAP oldSrc, oldDst; - HDC hdcSrc, hdcDst, hdcScreen; - UINT32 *dstBuffer; - DWORD colorSrc = 0x11223344; - - memset(&biDst, 0, sizeof(BITMAPINFO)); - biDst.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - biDst.bmiHeader.biWidth = 2; - biDst.bmiHeader.biHeight = -2; - biDst.bmiHeader.biPlanes = 1; - biDst.bmiHeader.biBitCount = 32; - biDst.bmiHeader.biCompression = BI_RGB; - - hdcScreen = CreateCompatibleDC(0); - if(GetDeviceCaps(hdcScreen, BITSPIXEL) != 32) - { - DeleteDC(hdcScreen); - trace("Skipping 32-bit DDB test\n"); - return; - } - - hdcSrc = CreateCompatibleDC(hdcScreen); - bmpSrc = CreateBitmap(1, 1, 1, 32, &colorSrc); - oldSrc = SelectObject(hdcSrc, bmpSrc); - - hdcDst = CreateCompatibleDC(hdcScreen); - bmpDst = CreateDIBSection(hdcDst, &biDst, DIB_RGB_COLORS, (void**)&dstBuffer, NULL, 0); - oldDst = SelectObject(hdcDst, bmpDst); - - StretchBlt(hdcDst, 0, 0, 1, 1, hdcSrc, 0, 0, 1, 1, SRCCOPY); - ok(dstBuffer[0] == colorSrc, "Expected color=%x, received color=%x\n", colorSrc, dstBuffer[0]); - - /* Tidy up */ - SelectObject(hdcDst, oldDst); - DeleteObject(bmpDst); - DeleteDC(hdcDst); - - SelectObject(hdcSrc, oldSrc); - DeleteObject(bmpSrc); - DeleteDC(hdcSrc); - - DeleteDC(hdcScreen); -} - -/* - * Used by test_GetDIBits_top_down to create the bitmap to test against. - */ -static void setup_picture(char *picture, int bpp) -{ - int i; - - switch(bpp) - { - case 16: - case 32: - /*Set the first byte in each pixel to the index of that pixel.*/ - for (i = 0; i < 4; i++) - picture[i * (bpp / 8)] = i; - break; - case 24: - picture[0] = 0; - picture[3] = 1; - /*Each scanline in a bitmap must be a multiple of 4 bytes long.*/ - picture[8] = 2; - picture[11] = 3; - break; - } -} - -static void test_GetDIBits_top_down(int bpp) -{ - BITMAPINFO bi; - HBITMAP bmptb, bmpbt; - HDC hdc; - int pictureOut[4]; - int *picture; - int statusCode; - - memset( &bi, 0, sizeof(bi) ); - bi.bmiHeader.biSize=sizeof(bi.bmiHeader); - bi.bmiHeader.biWidth=2; - bi.bmiHeader.biHeight=2; - bi.bmiHeader.biPlanes=1; - bi.bmiHeader.biBitCount=bpp; - bi.bmiHeader.biCompression=BI_RGB; - - /*Get the device context for the screen.*/ - hdc = GetDC(NULL); - ok(hdc != NULL, "Could not get a handle to a device context.\n"); - - /*Create the bottom to top image (image's bottom scan line is at the top in memory).*/ - bmpbt = CreateDIBSection(hdc, &bi, DIB_RGB_COLORS, (void**)&picture, NULL, 0); - ok(bmpbt != NULL, "Could not create a DIB section.\n"); - /*Now that we have a pointer to the pixels, we write to them.*/ - setup_picture((char*)picture, bpp); - /*Create the top to bottom image (images' bottom scan line is at the bottom in memory).*/ - bi.bmiHeader.biHeight=-2; /*We specify that we want a top to bottom image by specifying a negative height.*/ - bmptb = CreateDIBSection(hdc, &bi, DIB_RGB_COLORS, (void**)&picture, NULL, 0); - ok(bmptb != NULL, "Could not create a DIB section.\n"); - /*Write to this top to bottom bitmap.*/ - setup_picture((char*)picture, bpp); - - bi.bmiHeader.biWidth = 1; - - bi.bmiHeader.biHeight = 2; - statusCode = GetDIBits(hdc, bmpbt, 0, 1, pictureOut, &bi, DIB_RGB_COLORS); - ok(statusCode, "Failed to call GetDIBits. Status code: %d.\n", statusCode); - /*Check the first byte of the pixel.*/ - ok((char)pictureOut[0] == 0, "Bottom-up -> bottom-up: first pixel should be 0 but was %d.\n", (char)pictureOut[0]); - statusCode = GetDIBits(hdc, bmptb, 0, 1, pictureOut, &bi, DIB_RGB_COLORS); - ok(statusCode, "Failed to call GetDIBits. Status code: %d.\n", statusCode); - ok((char)pictureOut[0] == 2, "Top-down -> bottom-up: first pixel should be 2 but was %d.\n", (char)pictureOut[0]); - /*Check second scanline.*/ - statusCode = GetDIBits(hdc, bmptb, 1, 1, pictureOut, &bi, DIB_RGB_COLORS); - ok(statusCode, "Failed to call GetDIBits. Status code: %d.\n", statusCode); - ok((char)pictureOut[0] == 0, "Top-down -> bottom-up: first pixel should be 0 but was %d.\n", (char)pictureOut[0]); - statusCode = GetDIBits(hdc, bmpbt, 1, 1, pictureOut, &bi, DIB_RGB_COLORS); - ok(statusCode, "Failed to call GetDIBits. Status code: %d.\n", statusCode); - ok((char)pictureOut[0] == 2, "Bottom-up -> bottom-up: first pixel should be 2 but was %d.\n", (char)pictureOut[0]); - /*Check both scanlines.*/ - statusCode = GetDIBits(hdc, bmptb, 0, 2, pictureOut, &bi, DIB_RGB_COLORS); - ok(statusCode, "Failed to call GetDIBits. Status code: %d.\n", statusCode); - ok((char)pictureOut[0] == 2, "Top-down -> bottom-up: first scanline should be 2 but was %d.\n", (char)pictureOut[0]); - ok((char)pictureOut[1] == 0, "Top-down -> bottom-up: second scanline should be 0 but was %d.\n", (char)pictureOut[0]); - statusCode = GetDIBits(hdc, bmpbt, 0, 2, pictureOut, &bi, DIB_RGB_COLORS); - ok(statusCode, "Failed to call GetDIBits. Status code: %d.\n", statusCode); - ok((char)pictureOut[0] == 0, "Bottom up -> bottom-up: first scanline should be 0 but was %d.\n", (char)pictureOut[0]); - ok((char)pictureOut[1] == 2, "Bottom up -> bottom-up: second scanline should be 2 but was %d.\n", (char)pictureOut[0]); - - /*Make destination bitmap top-down.*/ - bi.bmiHeader.biHeight = -2; - statusCode = GetDIBits(hdc, bmpbt, 0, 1, pictureOut, &bi, DIB_RGB_COLORS); - ok(statusCode, "Failed to call GetDIBits. Status code: %d.\n", statusCode); - ok((char)pictureOut[0] == 0, "Bottom-up -> top-down: first pixel should be 0 but was %d.\n", (char)pictureOut[0]); - statusCode = GetDIBits(hdc, bmptb, 0, 1, pictureOut, &bi, DIB_RGB_COLORS); - ok(statusCode, "Failed to call GetDIBits. Status code: %d.\n", statusCode); - ok((char)pictureOut[0] == 2, "Top-down -> top-down: first pixel should be 2 but was %d.\n", (char)pictureOut[0]); - /*Check second scanline.*/ - statusCode = GetDIBits(hdc, bmptb, 1, 1, pictureOut, &bi, DIB_RGB_COLORS); - ok(statusCode, "Failed to call GetDIBits. Status code: %d.\n", statusCode); - ok((char)pictureOut[0] == 0, "Top-down -> bottom-up: first pixel should be 0 but was %d.\n", (char)pictureOut[0]); - statusCode = GetDIBits(hdc, bmpbt, 1, 1, pictureOut, &bi, DIB_RGB_COLORS); - ok(statusCode, "Failed to call GetDIBits. Status code: %d.\n", statusCode); - ok((char)pictureOut[0] == 2, "Top-down -> bottom-up: first pixel should be 2 but was %d.\n", (char)pictureOut[0]); - /*Check both scanlines.*/ - statusCode = GetDIBits(hdc, bmptb, 0, 2, pictureOut, &bi, DIB_RGB_COLORS); - ok(statusCode, "Failed to call GetDIBits. Status code: %d.\n", statusCode); - ok((char)pictureOut[0] == 0, "Top-down -> top-down: first scanline should be 0 but was %d.\n", (char)pictureOut[0]); - ok((char)pictureOut[1] == 2, "Top-down -> top-down: second scanline should be 2 but was %d.\n", (char)pictureOut[0]); - statusCode = GetDIBits(hdc, bmpbt, 0, 2, pictureOut, &bi, DIB_RGB_COLORS); - ok(statusCode, "Failed to call GetDIBits. Status code: %d.\n", statusCode); - ok((char)pictureOut[0] == 2, "Bottom up -> top-down: first scanline should be 2 but was %d.\n", (char)pictureOut[0]); - ok((char)pictureOut[1] == 0, "Bottom up -> top-down: second scanline should be 0 but was %d.\n", (char)pictureOut[0]); - - DeleteObject(bmpbt); - DeleteObject(bmptb); -} - -static void test_GetSetDIBits_rtl(void) -{ - HDC hdc, hdc_mem; - HBITMAP bitmap, orig_bitmap; - BITMAPINFO info; - int ret; - DWORD bits_1[8 * 8], bits_2[8 * 8]; - - if(!pSetLayout) - { - win_skip("Don't have SetLayout\n"); - return; - } - - hdc = GetDC( NULL ); - hdc_mem = CreateCompatibleDC( hdc ); - pSetLayout( hdc_mem, LAYOUT_LTR ); - - bitmap = CreateCompatibleBitmap( hdc, 8, 8 ); - orig_bitmap = SelectObject( hdc_mem, bitmap ); - SetPixel( hdc_mem, 0, 0, RGB(0xff, 0, 0) ); - SelectObject( hdc_mem, orig_bitmap ); - - info.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - info.bmiHeader.biWidth = 8; - info.bmiHeader.biHeight = 8; - info.bmiHeader.biPlanes = 1; - info.bmiHeader.biBitCount = 32; - info.bmiHeader.biCompression = BI_RGB; - - /* First show that GetDIBits ignores the layout mode. */ - - ret = GetDIBits( hdc_mem, bitmap, 0, 8, bits_1, &info, DIB_RGB_COLORS ); - ok(ret == 8, "got %d\n", ret); - ok(bits_1[56] == 0xff0000, "got %08x\n", bits_1[56]); /* check we have a red pixel */ - - pSetLayout( hdc_mem, LAYOUT_RTL ); - - ret = GetDIBits( hdc_mem, bitmap, 0, 8, bits_2, &info, DIB_RGB_COLORS ); - ok(ret == 8, "got %d\n", ret); - - ok(!memcmp( bits_1, bits_2, sizeof(bits_1) ), "bits differ\n"); - - /* Now to show that SetDIBits also ignores the mode, we perform a SetDIBits - followed by a GetDIBits and show that the bits remain unchanged. */ - - pSetLayout( hdc_mem, LAYOUT_LTR ); - - ret = SetDIBits( hdc_mem, bitmap, 0, 8, bits_1, &info, DIB_RGB_COLORS ); - ok(ret == 8, "got %d\n", ret); - ret = GetDIBits( hdc_mem, bitmap, 0, 8, bits_2, &info, DIB_RGB_COLORS ); - ok(ret == 8, "got %d\n", ret); - ok(!memcmp( bits_1, bits_2, sizeof(bits_1) ), "bits differ\n"); - - pSetLayout( hdc_mem, LAYOUT_RTL ); - - ret = SetDIBits( hdc_mem, bitmap, 0, 8, bits_1, &info, DIB_RGB_COLORS ); - ok(ret == 8, "got %d\n", ret); - ret = GetDIBits( hdc_mem, bitmap, 0, 8, bits_2, &info, DIB_RGB_COLORS ); - ok(ret == 8, "got %d\n", ret); - ok(!memcmp( bits_1, bits_2, sizeof(bits_1) ), "bits differ\n"); - - DeleteObject( bitmap ); - DeleteDC( hdc_mem ); - ReleaseDC( NULL, hdc ); -} - -static void test_GetDIBits_scanlines(void) -{ - BITMAPINFO *info; - DWORD *dib_bits; - HDC hdc = GetDC( NULL ); - HBITMAP dib; - DWORD data[128], inverted_bits[64]; - int i, ret; - - info = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, FIELD_OFFSET( BITMAPINFO, bmiColors[256] ) ); - - info->bmiHeader.biSize = sizeof(info->bmiHeader); - info->bmiHeader.biWidth = 8; - info->bmiHeader.biHeight = 8; - info->bmiHeader.biPlanes = 1; - info->bmiHeader.biBitCount = 32; - info->bmiHeader.biCompression = BI_RGB; - - dib = CreateDIBSection( NULL, info, DIB_RGB_COLORS, (void**)&dib_bits, NULL, 0 ); - - for (i = 0; i < 64; i++) - { - dib_bits[i] = i; - inverted_bits[56 - (i & ~7) + (i & 7)] = i; - } - - /* b-u -> b-u */ - - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 0, 8, data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - ok( !memcmp( data, dib_bits, 64 * 4 ), "bits differ\n"); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 1, 5, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - ok( !memcmp( data, dib_bits + 8, 40 * 4 ), "bits differ\n"); - for (i = 40; i < 64; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 1, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 7, "got %d\n", ret ); - ok( !memcmp( data, dib_bits + 8, 56 * 4 ), "bits differ\n"); - for (i = 56; i < 64; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 9, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 1, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - info->bmiHeader.biHeight = 16; - ret = GetDIBits( hdc, dib, 1, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - for (i = 0; i < 56; i++) ok( data[i] == 0, "%d: got %08x\n", i, data[i] ); - ok( !memcmp( data + 56, dib_bits, 40 * 4 ), "bits differ\n"); - for (i = 96; i < 128; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 2, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 6, "got %d\n", ret ); - for (i = 0; i < 48; i++) ok( data[i] == 0, "%d: got %08x\n", i, data[i] ); - ok( !memcmp( data + 48, dib_bits, 48 * 4 ), "bits differ\n"); - for (i = 96; i < 128; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 2, 3, data, info, DIB_RGB_COLORS ); - ok( ret == 0, "got %d\n", ret ); - for (i = 0; i < 24; i++) ok( data[i] == 0, "%d: got %08x\n", i, data[i] ); - for (i = 24; i < 128; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - info->bmiHeader.biHeight = 5; - ret = GetDIBits( hdc, dib, 1, 2, data, info, DIB_RGB_COLORS ); - ok( ret == 2, "got %d\n", ret ); - ok( !memcmp( data, dib_bits + 32, 16 * 4 ), "bits differ\n"); - for (i = 16; i < 128; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - /* b-u -> t-d */ - - info->bmiHeader.biHeight = -8; - ret = GetDIBits( hdc, dib, 0, 8, data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - ok( !memcmp( data, inverted_bits, 64 * 4 ), "bits differ\n"); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 1, 5, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - ok( !memcmp( data, inverted_bits + 16, 40 * 4 ), "bits differ\n"); - for (i = 40; i < 64; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 1, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 7, "got %d\n", ret ); - ok( !memcmp( data, inverted_bits, 56 * 4 ), "bits differ\n"); - for (i = 56; i < 64; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 4, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 4, "got %d\n", ret ); - ok( !memcmp( data, inverted_bits, 32 * 4 ), "bits differ\n"); - for (i = 32; i < 64; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 3, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - ok( !memcmp( data, inverted_bits, 40 * 4 ), "bits differ\n"); - for (i = 40; i < 64; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 3, 13, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - ok( !memcmp( data, inverted_bits, 40 * 4 ), "bits differ\n"); - for (i = 40; i < 64; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - info->bmiHeader.biHeight = -16; - ret = GetDIBits( hdc, dib, 0, 16, data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - ok( !memcmp( data, inverted_bits, 64 * 4 ), "bits differ\n"); - for (i = 64; i < 128; i++) ok( data[i] == 0, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 1, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - ok( !memcmp( data, inverted_bits + 24, 40 * 4 ), "bits differ\n"); - for (i = 40; i < 96; i++) ok( data[i] == 0, "%d: got %08x\n", i, data[i] ); - for (i = 96; i < 128; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 4, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - ok( !memcmp( data, inverted_bits, 64 * 4 ), "bits differ\n"); - for (i = 64; i < 96; i++) ok( data[i] == 0, "%d: got %08x\n", i, data[i] ); - for (i = 96; i < 128; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 5, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - ok( !memcmp( data, inverted_bits, 64 * 4 ), "bits differ\n"); - for (i = 64; i < 88; i++) ok( data[i] == 0, "%d: got %08x\n", i, data[i] ); - for (i = 88; i < 128; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 9, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 7, "got %d\n", ret ); - ok( !memcmp( data, inverted_bits, 56 * 4 ), "bits differ\n"); - for (i = 56; i < 128; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 18, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 1, "got %d\n", ret ); - for (i = 0; i < 128; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - info->bmiHeader.biHeight = -5; - ret = GetDIBits( hdc, dib, 1, 2, data, info, DIB_RGB_COLORS ); - ok( ret == 2, "got %d\n", ret ); - ok( !memcmp( data, inverted_bits + 16, 16 * 4 ), "bits differ\n"); - for (i = 16; i < 128; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - DeleteObject( dib ); - - info->bmiHeader.biSize = sizeof(info->bmiHeader); - info->bmiHeader.biWidth = 8; - info->bmiHeader.biHeight = -8; - info->bmiHeader.biPlanes = 1; - info->bmiHeader.biBitCount = 32; - info->bmiHeader.biCompression = BI_RGB; - - dib = CreateDIBSection( NULL, info, DIB_RGB_COLORS, (void**)&dib_bits, NULL, 0 ); - - for (i = 0; i < 64; i++) dib_bits[i] = i; - - /* t-d -> t-d */ - - info->bmiHeader.biHeight = -8; - ret = GetDIBits( hdc, dib, 0, 8, data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - ok( !memcmp( data, dib_bits, 64 * 4 ), "bits differ\n"); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 1, 5, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - ok( !memcmp( data, dib_bits + 16, 40 * 4 ), "bits differ\n"); - for (i = 40; i < 64; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 1, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 7, "got %d\n", ret ); - ok( !memcmp( data, dib_bits, 56 * 4 ), "bits differ\n"); - for (i = 56; i < 64; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 4, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 4, "got %d\n", ret ); - ok( !memcmp( data, dib_bits, 32 * 4 ), "bits differ\n"); - for (i = 32; i < 64; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 3, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - ok( !memcmp( data, dib_bits, 40 * 4 ), "bits differ\n"); - for (i = 40; i < 64; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 3, 13, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - ok( !memcmp( data, dib_bits, 40 * 4 ), "bits differ\n"); - for (i = 40; i < 64; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - info->bmiHeader.biHeight = -16; - ret = GetDIBits( hdc, dib, 0, 16, data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - ok( !memcmp( data, dib_bits, 64 * 4 ), "bits differ\n"); - for (i = 64; i < 128; i++) ok( data[i] == 0, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 1, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - ok( !memcmp( data, dib_bits + 24, 40 * 4 ), "bits differ\n"); - for (i = 40; i < 96; i++) ok( data[i] == 0, "%d: got %08x\n", i, data[i] ); - for (i = 96; i < 128; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 4, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - ok( !memcmp( data, dib_bits, 64 * 4 ), "bits differ\n"); - for (i = 64; i < 96; i++) ok( data[i] == 0, "%d: got %08x\n", i, data[i] ); - for (i = 96; i < 128; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 5, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - ok( !memcmp( data, dib_bits, 64 * 4 ), "bits differ\n"); - for (i = 64; i < 88; i++) ok( data[i] == 0, "%d: got %08x\n", i, data[i] ); - for (i = 88; i < 128; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 9, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 7, "got %d\n", ret ); - ok( !memcmp( data, dib_bits, 56 * 4 ), "bits differ\n"); - for (i = 56; i < 128; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - info->bmiHeader.biHeight = -5; - ret = GetDIBits( hdc, dib, 1, 2, data, info, DIB_RGB_COLORS ); - ok( ret == 2, "got %d\n", ret ); - ok( !memcmp( data, dib_bits + 16, 16 * 4 ), "bits differ\n"); - for (i = 16; i < 128; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - - /* t-d -> b-u */ - - info->bmiHeader.biHeight = 8; - - ret = GetDIBits( hdc, dib, 0, 8, data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - ok( !memcmp( data, inverted_bits, 64 * 4 ), "bits differ\n"); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 1, 5, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - ok( !memcmp( data, inverted_bits + 8, 40 * 4 ), "bits differ\n"); - for (i = 40; i < 64; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 1, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 7, "got %d\n", ret ); - ok( !memcmp( data, inverted_bits + 8, 56 * 4 ), "bits differ\n"); - for (i = 56; i < 64; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 9, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 1, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - info->bmiHeader.biHeight = 16; - ret = GetDIBits( hdc, dib, 1, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - for (i = 0; i < 56; i++) ok( data[i] == 0, "%d: got %08x\n", i, data[i] ); - ok( !memcmp( data + 56, inverted_bits, 40 * 4 ), "bits differ\n"); - for (i = 96; i < 128; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 2, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 6, "got %d\n", ret ); - for (i = 0; i < 48; i++) ok( data[i] == 0, "%d: got %08x\n", i, data[i] ); - ok( !memcmp( data + 48, inverted_bits, 48 * 4 ), "bits differ\n"); - for (i = 96; i < 128; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - ret = GetDIBits( hdc, dib, 2, 3, data, info, DIB_RGB_COLORS ); - ok( ret == 0, "got %d\n", ret ); - for (i = 0; i < 24; i++) ok( data[i] == 0, "%d: got %08x\n", i, data[i] ); - for (i = 24; i < 128; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - info->bmiHeader.biHeight = 5; - ret = GetDIBits( hdc, dib, 1, 2, data, info, DIB_RGB_COLORS ); - ok( ret == 2, "got %d\n", ret ); - ok( !memcmp( data, inverted_bits + 32, 16 * 4 ), "bits differ\n"); - for (i = 16; i < 128; i++) ok( data[i] == 0xaaaaaaaa, "%d: got %08x\n", i, data[i] ); - memset( data, 0xaa, sizeof(data) ); - - DeleteObject( dib ); - - ReleaseDC( NULL, hdc ); - HeapFree( GetProcessHeap(), 0, info ); -} - - -static void test_SetDIBits(void) -{ - BITMAPINFO *info; - DWORD *dib_bits; - HDC hdc = GetDC( NULL ); - DWORD data[128], inverted_data[128]; - HBITMAP dib; - int i, ret; - - info = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, FIELD_OFFSET( BITMAPINFO, bmiColors[256] ) ); - - info->bmiHeader.biSize = sizeof(info->bmiHeader); - info->bmiHeader.biWidth = 8; - info->bmiHeader.biHeight = 8; - info->bmiHeader.biPlanes = 1; - info->bmiHeader.biBitCount = 32; - info->bmiHeader.biCompression = BI_RGB; - - dib = CreateDIBSection( NULL, info, DIB_RGB_COLORS, (void**)&dib_bits, NULL, 0 ); - memset( dib_bits, 0xaa, 64 * 4 ); - - for (i = 0; i < 128; i++) - { - data[i] = i; - inverted_data[120 - (i & ~7) + (i & 7)] = i; - } - - /* b-u -> b-u */ - - ret = SetDIBits( hdc, dib, 0, 8, data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - ok( !memcmp( dib_bits, data, 64 * 4 ), "bits differ\n"); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBits( hdc, dib, 1, 5, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - for (i = 0; i < 8; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - ok( !memcmp( dib_bits + 8, data, 40 * 4 ), "bits differ\n"); - for (i = 48; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - /* top of dst is aligned with startscans down for the top of the src. - Then starting from the bottom of src, lines rows are copied across. */ - - info->bmiHeader.biHeight = 16; - ret = SetDIBits( hdc, dib, 1, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 12, "got %d\n", ret ); - ok( !memcmp( dib_bits, data + 56, 40 * 4 ), "bits differ\n"); - for (i = 40; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biHeight = 5; - ret = SetDIBits( hdc, dib, 1, 2, data, info, DIB_RGB_COLORS ); - ok( ret == 2, "got %d\n", ret ); - for (i = 0; i < 32; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - ok( !memcmp( dib_bits + 32, data, 16 * 4 ), "bits differ\n"); - for (i = 48; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - /* t-d -> b-u */ - info->bmiHeader.biHeight = -8; - ret = SetDIBits( hdc, dib, 0, 8, data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - ok( !memcmp( dib_bits, inverted_data + 64, 64 * 4 ), "bits differ\n"); - memset( dib_bits, 0xaa, 64 * 4 ); - - /* top of dst now lines up with -(abs(src_h) - startscan - lines) and - we copy lines rows from the top of the src */ - - ret = SetDIBits( hdc, dib, 1, 5, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - for (i = 0; i < 8; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - ok( !memcmp( dib_bits + 8, inverted_data + 88, 40 * 4 ), "bits differ\n"); - for (i = 48; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biHeight = -16; - ret = SetDIBits( hdc, dib, 1, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 12, "got %d\n", ret ); - ok( !memcmp( dib_bits, inverted_data + 88, 40 * 4 ), "bits differ\n"); - for (i = 40; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBits( hdc, dib, 4, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 12, "got %d\n", ret ); - ok( !memcmp( dib_bits, inverted_data + 64, 64 * 4 ), "bits differ\n"); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBits( hdc, dib, 5, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 12, "got %d\n", ret ); - ok( !memcmp( dib_bits, inverted_data + 56, 64 * 4 ), "bits differ\n"); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biHeight = -5; - ret = SetDIBits( hdc, dib, 1, 2, data, info, DIB_RGB_COLORS ); - ok( ret == 2, "got %d\n", ret ); - for (i = 0; i < 32; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - ok( !memcmp( dib_bits + 32, inverted_data + 112, 16 * 4 ), "bits differ\n"); - for (i = 48; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - DeleteObject( dib ); - - info->bmiHeader.biHeight = -8; - - dib = CreateDIBSection( NULL, info, DIB_RGB_COLORS, (void**)&dib_bits, NULL, 0 ); - memset( dib_bits, 0xaa, 16 * 16 * 4 ); - - /* t-d -> t-d */ - - /* like the t-d -> b-u case. */ - - ret = SetDIBits( hdc, dib, 0, 8, data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - ok( !memcmp( dib_bits, data, 64 * 4 ), "bits differ\n"); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBits( hdc, dib, 1, 5, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - for (i = 0; i < 16; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - ok( !memcmp( dib_bits + 16, data, 40 * 4 ), "bits differ\n"); - for (i = 56; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biHeight = -16; - ret = SetDIBits( hdc, dib, 1, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 12, "got %d\n", ret ); - for (i = 0; i < 24; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - ok( !memcmp( dib_bits + 24, data, 40 * 4 ), "bits differ\n"); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biHeight = -5; - ret = SetDIBits( hdc, dib, 1, 2, data, info, DIB_RGB_COLORS ); - ok( ret == 2, "got %d\n", ret ); - for (i = 0; i < 16; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - ok( !memcmp( dib_bits + 16, data, 16 * 4 ), "bits differ\n"); - for (i = 32; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - /* b-u -> t-d */ - /* like the b-u -> b-u case */ - - info->bmiHeader.biHeight = 8; - ret = SetDIBits( hdc, dib, 0, 8, data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - ok( !memcmp( dib_bits, inverted_data + 64, 64 * 4 ), "bits differ\n"); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBits( hdc, dib, 1, 5, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - for (i = 0; i < 16; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - ok( !memcmp( dib_bits + 16, inverted_data + 88, 40 * 4 ), "bits differ\n"); - for (i = 56; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biHeight = 16; - ret = SetDIBits( hdc, dib, 1, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 12, "got %d\n", ret ); - for (i = 0; i < 24; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - ok( !memcmp( dib_bits + 24, inverted_data + 32, 40 * 4 ), "bits differ\n"); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biHeight = 5; - ret = SetDIBits( hdc, dib, 1, 2, data, info, DIB_RGB_COLORS ); - ok( ret == 2, "got %d\n", ret ); - for (i = 0; i < 16; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - ok( !memcmp( dib_bits + 16, inverted_data + 112, 16 * 4 ), "bits differ\n"); - for (i = 32; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - DeleteObject( dib ); - ReleaseDC( NULL, hdc ); - HeapFree( GetProcessHeap(), 0, info ); -} - -static void test_SetDIBits_RLE4(void) -{ - BITMAPINFO *info; - DWORD *dib_bits; - HDC hdc = GetDC( NULL ); - BYTE rle4_data[26] = { 0x03, 0x52, 0x07, 0x68, 0x00, 0x00, /* 5, 2, 5, 6, 8, 6, 8, 6, (8, 6,) */ - 0x00, 0x03, 0x14, 0x50, 0x00, 0x05, - 0x79, 0xfd, 0xb0, 0x00, 0x00, 0x00, /* 1, 4, 5, 7, 9, f, d, b */ - 0x00, 0x02, 0x01, 0x02, 0x05, 0x87, /* dx=1, dy=2, 8, 7, 8, 7, 8 */ - 0x00, 0x01 }; /* */ - HBITMAP dib; - int i, ret; - DWORD bottom_up[64] = { 0x00050505, 0x00020202, 0x00050505, 0x00060606, 0x00080808, 0x00060606, 0x00080808, 0x00060606, - 0x00010101, 0x00040404, 0x00050505, 0x00070707, 0x00090909, 0x000f0f0f, 0x000d0d0d, 0x000b0b0b, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0xaaaaaaaa, 0x00080808, 0x00070707, 0x00080808, 0x00070707, 0x00080808, 0xaaaaaaaa, 0xaaaaaaaa, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa }; - - info = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, FIELD_OFFSET( BITMAPINFO, bmiColors[256] ) ); - - info->bmiHeader.biSize = sizeof(info->bmiHeader); - info->bmiHeader.biWidth = 8; - info->bmiHeader.biHeight = 8; - info->bmiHeader.biPlanes = 1; - info->bmiHeader.biBitCount = 32; - info->bmiHeader.biCompression = BI_RGB; - - dib = CreateDIBSection( NULL, info, DIB_RGB_COLORS, (void**)&dib_bits, NULL, 0 ); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biBitCount = 4; - info->bmiHeader.biCompression = BI_RLE4; - info->bmiHeader.biSizeImage = sizeof(rle4_data); - - for (i = 0; i < 16; i++) - { - info->bmiColors[i].rgbRed = i; - info->bmiColors[i].rgbGreen = i; - info->bmiColors[i].rgbBlue = i; - info->bmiColors[i].rgbReserved = 0; - } - - ret = SetDIBits( hdc, dib, 0, 8, rle4_data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - ok( !memcmp( dib_bits, bottom_up, sizeof(bottom_up) ), "bits differ\n" ); - memset( dib_bits, 0xaa, 64 * 4 ); - - DeleteObject( dib ); - ReleaseDC( NULL, hdc ); - HeapFree( GetProcessHeap(), 0, info ); -} - -static void test_SetDIBits_RLE8(void) -{ - BITMAPINFO *info; - DWORD *dib_bits; - HDC hdc = GetDC( NULL ); - BYTE rle8_data[20] = { 0x03, 0x02, 0x04, 0xf0, 0x00, 0x00, /* 2, 2, 2, f0, f0, f0, f0, */ - 0x00, 0x03, 0x04, 0x05, 0x06, 0x00, /* 4, 5, 6, */ - 0x00, 0x02, 0x01, 0x02, 0x05, 0x80, /* dx=1, dy=2, 80, 80, 80, 80, (80) */ - 0x00, 0x01 }; /* */ - HBITMAP dib; - int i, ret; - DWORD bottom_up[64] = { 0x00020202, 0x00020202, 0x00020202, 0x00f0f0f0, 0x00f0f0f0, 0x00f0f0f0, 0x00f0f0f0, 0xaaaaaaaa, - 0x00040404, 0x00050505, 0x00060606, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0x00808080, 0x00808080, 0x00808080, 0x00808080, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa }; - DWORD top_down[64] = { 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0x00808080, 0x00808080, 0x00808080, 0x00808080, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0x00040404, 0x00050505, 0x00060606, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0x00020202, 0x00020202, 0x00020202, 0x00f0f0f0, 0x00f0f0f0, 0x00f0f0f0, 0x00f0f0f0, 0xaaaaaaaa }; - - info = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, FIELD_OFFSET( BITMAPINFO, bmiColors[256] ) ); - - info->bmiHeader.biSize = sizeof(info->bmiHeader); - info->bmiHeader.biWidth = 8; - info->bmiHeader.biHeight = 8; - info->bmiHeader.biPlanes = 1; - info->bmiHeader.biBitCount = 32; - info->bmiHeader.biCompression = BI_RGB; - - dib = CreateDIBSection( NULL, info, DIB_RGB_COLORS, (void**)&dib_bits, NULL, 0 ); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biBitCount = 8; - info->bmiHeader.biCompression = BI_RLE8; - info->bmiHeader.biSizeImage = sizeof(rle8_data); - - for (i = 0; i < 256; i++) - { - info->bmiColors[i].rgbRed = i; - info->bmiColors[i].rgbGreen = i; - info->bmiColors[i].rgbBlue = i; - info->bmiColors[i].rgbReserved = 0; - } - - ret = SetDIBits( hdc, dib, 0, 8, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - ok( !memcmp( dib_bits, bottom_up, sizeof(bottom_up) ), "bits differ\n"); - memset( dib_bits, 0xaa, 64 * 4 ); - - /* startscan and lines are ignored, unless lines == 0 */ - ret = SetDIBits( hdc, dib, 1, 8, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - ok( !memcmp( dib_bits, bottom_up, sizeof(bottom_up) ), "bits differ\n"); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBits( hdc, dib, 1, 1, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - ok( !memcmp( dib_bits, bottom_up, sizeof(bottom_up) ), "bits differ\n"); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBits( hdc, dib, 1, 0, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 0, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - /* reduce width to 4, left-hand side of dst is touched. */ - info->bmiHeader.biWidth = 4; - ret = SetDIBits( hdc, dib, 0, 8, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - for (i = 0; i < 64; i++) - { - DWORD expect = (i & 4) ? 0xaaaaaaaa : bottom_up[i]; - ok( dib_bits[i] == expect, "%d: got %08x\n", i, dib_bits[i] ); - } - memset( dib_bits, 0xaa, 64 * 4 ); - - /* Show that the top lines are aligned by adjusting the height of the src */ - - /* reduce the height to 4 -> top 4 lines of dst are touched (corresponding to last half of the bits). */ - info->bmiHeader.biWidth = 8; - info->bmiHeader.biHeight = 4; - ret = SetDIBits( hdc, dib, 0, 8, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 4, "got %d\n", ret ); - for (i = 0; i < 32; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - ok( !memcmp( dib_bits + 32, bottom_up, 32 * 4 ), "bits differ\n"); - memset( dib_bits, 0xaa, 64 * 4 ); - - /* increase the height to 9 -> everything moves down one row. */ - info->bmiHeader.biHeight = 9; - ret = SetDIBits( hdc, dib, 0, 8, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 9, "got %d\n", ret ); - ok( !memcmp( dib_bits, bottom_up + 8, 56 * 4 ), "bits differ\n"); - for (i = 0; i < 8; i++) ok( dib_bits[56 + i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[56 + i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - /* top-down compressed dibs are invalid */ - info->bmiHeader.biHeight = -8; - SetLastError( 0xdeadbeef ); - ret = SetDIBits( hdc, dib, 0, 8, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 0, "got %d\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "got %x\n", GetLastError() ); - DeleteObject( dib ); - - /* top-down dst */ - - info->bmiHeader.biHeight = -8; - info->bmiHeader.biBitCount = 32; - info->bmiHeader.biCompression = BI_RGB; - info->bmiHeader.biSizeImage = 0; - - dib = CreateDIBSection( NULL, info, DIB_RGB_COLORS, (void**)&dib_bits, NULL, 0 ); - memset( dib_bits, 0xaa, 16 * 16 * 4 ); - - info->bmiHeader.biHeight = 8; - info->bmiHeader.biBitCount = 8; - info->bmiHeader.biCompression = BI_RLE8; - info->bmiHeader.biSizeImage = sizeof(rle8_data); - - ret = SetDIBits( hdc, dib, 0, 8, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - ok( !memcmp( dib_bits, top_down, sizeof(top_down) ), "bits differ\n"); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biHeight = 4; - ret = SetDIBits( hdc, dib, 0, 8, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 4, "got %d\n", ret ); - ok( !memcmp( dib_bits, top_down + 32, 32 * 4 ), "bits differ\n"); - for (i = 32; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biHeight = 9; - ret = SetDIBits( hdc, dib, 0, 8, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 9, "got %d\n", ret ); - for (i = 0; i < 8; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - ok( !memcmp( dib_bits + 8, top_down, 56 * 4 ), "bits differ\n"); - memset( dib_bits, 0xaa, 64 * 4 ); - - DeleteObject( dib ); - ReleaseDC( NULL, hdc ); - HeapFree( GetProcessHeap(), 0, info ); -} - -static void test_SetDIBitsToDevice(void) -{ - BITMAPINFO *info; - DWORD *dib_bits; - HDC hdc = CreateCompatibleDC( 0 ); - DWORD data[128], inverted_data[128]; - HBITMAP dib; - int i, ret; - - info = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, FIELD_OFFSET( BITMAPINFO, bmiColors[256] ) ); - - info->bmiHeader.biSize = sizeof(info->bmiHeader); - info->bmiHeader.biWidth = 8; - info->bmiHeader.biHeight = 8; - info->bmiHeader.biPlanes = 1; - info->bmiHeader.biBitCount = 32; - info->bmiHeader.biCompression = BI_RGB; - - dib = CreateDIBSection( NULL, info, DIB_RGB_COLORS, (void**)&dib_bits, NULL, 0 ); - memset( dib_bits, 0xaa, 64 * 4 ); - SelectObject( hdc, dib ); - - for (i = 0; i < 128; i++) - { - data[i] = i; - inverted_data[120 - (i & ~7) + (i & 7)] = i; - } - - /* b-u -> b-u */ - - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 0, 8, data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == data[i], "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 1, 5, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - for (i = 0; i < 8; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - for (i = 8; i < 48; i++) ok( dib_bits[i] == data[i - 8], "%d: got %08x\n", i, dib_bits[i] ); - for (i = 48; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 3, 1, 5, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - for (i = 0; i < 24; i++) ok( dib_bits[i] == data[i + 16], "%d: got %08x\n", i, dib_bits[i] ); - for (i = 24; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biHeight = 16; - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 1, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 7, "got %d\n", ret ); - for (i = 0; i < 8; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - for (i = 8; i < 64; i++) ok( dib_bits[i] == data[i - 8], "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 2, 8, 8, 0, 6, 1, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 12, "got %d\n", ret ); - for (i = 0; i < 40; i++) ok( dib_bits[i] == data[i + 56], "%d: got %08x\n", i, dib_bits[i] ); - for (i = 40; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, -4, 8, 8, 0, 3, 1, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 10, "got %d\n", ret ); - for (i = 0; i < 32; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - for (i = 32; i < 64; i++) ok( dib_bits[i] == data[i - 16], "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 4, 8, 8, 0, -3, 1, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 4, "got %d\n", ret ); - for (i = 0; i < 32; i++) ok( dib_bits[i] == data[i], "%d: got %08x\n", i, dib_bits[i] ); - for (i = 32; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 2, 8, 5, 0, -2, 1, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 2, "got %d\n", ret ); - for (i = 0; i < 32; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - for (i = 32; i < 48; i++) ok( dib_bits[i] == data[i - 32], "%d: got %08x\n", i, dib_bits[i] ); - for (i = 48; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biHeight = 5; - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 2, 2, data, info, DIB_RGB_COLORS ); - ok( ret == 2, "got %d\n", ret ); - for (i = 0; i < 16; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - for (i = 16; i < 32; i++) ok( dib_bits[i] == data[i - 16], "%d: got %08x\n", i, dib_bits[i] ); - for (i = 32; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 3, 3, 2, 2, 1, 2, 1, 5, data, info, DIB_RGB_COLORS ); - ok( ret == 3, "got %d\n", ret ); - for (i = 0; i < 64; i++) - if (i == 27 || i == 28 || i == 35 || i == 36) - ok( dib_bits[i] == data[i - 18], "%d: got %08x\n", i, dib_bits[i] ); - else - ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 0, 16, 16, 0, 0, 0, 5, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 2, 8, 4, 0, -1, 3, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 0, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - SetMapMode( hdc, MM_ANISOTROPIC ); - SetWindowExtEx( hdc, 3, 3, NULL ); - ret = SetDIBitsToDevice( hdc, 2, 2, 2, 2, 1, 2, 1, 5, data, info, DIB_RGB_COLORS ); - ok( ret == 3, "got %d\n", ret ); - for (i = 0; i < 64; i++) - if (i == 41 || i == 42 || i == 49 || i == 50) - ok( dib_bits[i] == data[i - 32], "%d: got %08x\n", i, dib_bits[i] ); - else - ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - SetWindowExtEx( hdc, -1, -1, NULL ); - ret = SetDIBitsToDevice( hdc, 2, 2, 4, 4, 1, 2, 1, 5, data, info, DIB_RGB_COLORS ); - ok( ret == 4, "got %d\n", ret ); - for (i = 0; i < 64; i++) - if (i == 48 || i == 49 || i == 56 || i == 57) - ok( dib_bits[i] == data[i - 37], "%d: got %08x\n", i, dib_bits[i] ); - else - ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - SetMapMode( hdc, MM_TEXT ); - - if (pSetLayout) - { - pSetLayout( hdc, LAYOUT_RTL ); - ret = SetDIBitsToDevice( hdc, 1, 2, 3, 2, 1, 2, 1, 5, data, info, DIB_RGB_COLORS ); - ok( ret == 3, "got %d\n", ret ); - for (i = 0; i < 64; i++) - if (i == 36 || i == 37 || i == 38 || i == 44 || i == 45 || i == 46) - ok( dib_bits[i] == data[i - 27], "%d: got %08x\n", i, dib_bits[i] ); - else - ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - pSetLayout( hdc, LAYOUT_LTR ); - } - - /* t-d -> b-u */ - info->bmiHeader.biHeight = -8; - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 0, 8, data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == inverted_data[i + 64], "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 1, 5, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - for (i = 0; i < 8; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - for (i = 8; i < 48; i++) ok( dib_bits[i] == inverted_data[i + 80], "%d: got %08x\n", i, dib_bits[i] ); - for (i = 48; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 4, 1, 5, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - for (i = 0; i < 16; i++) ok( dib_bits[i] == inverted_data[i + 112], "%d: got %08x\n", i, dib_bits[i] ); - for (i = 16; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biHeight = -16; - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 1, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 12, "got %d\n", ret ); - for (i = 0; i < 8; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - for (i = 8; i < 64; i++) ok( dib_bits[i] == inverted_data[i + 24], "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 4, 8, 8, 0, 7, 1, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 12, "got %d\n", ret ); - for (i = 0; i < 16; i++) ok( dib_bits[i] == inverted_data[i + 112], "%d: got %08x\n", i, dib_bits[i] ); - for (i = 16; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 4, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 12, "got %d\n", ret ); - for (i = 0; i < 32; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - for (i = 32; i < 64; i++) ok( dib_bits[i] == inverted_data[i], "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, -3, 8, 8, 0, 2, 4, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 12, "got %d\n", ret ); - for (i = 0; i < 40; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - for (i = 40; i < 64; i++) ok( dib_bits[i] == inverted_data[i - 8], "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 3, 8, 8, 0, -2, 4, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 12, "got %d\n", ret ); - for (i = 0; i < 24; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - for (i = 24; i < 40; i++) ok( dib_bits[i] == inverted_data[i + 8], "%d: got %08x\n", i, dib_bits[i] ); - for (i = 40; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 5, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 12, "got %d\n", ret ); - for (i = 0; i < 40; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - for (i = 40; i < 64; i++) ok( dib_bits[i] == inverted_data[i - 8], "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 2, 8, 4, 0, -1, 3, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 12, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 5, -7, 8, 16, -2, -4, 0, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 12, "got %d\n", ret ); - for (i = 0; i < 64; i++) - if (i == 31 || i == 39 || i == 47 || i == 55 || i == 63) - ok( dib_bits[i] == inverted_data[i + 1], "%d: got %08x\n", i, dib_bits[i] ); - else - ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biHeight = -5; - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 1, 2, data, info, DIB_RGB_COLORS ); - ok( ret == 2, "got %d\n", ret ); - for (i = 0; i < 8; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - for (i = 8; i < 24; i++) ok( dib_bits[i] == inverted_data[i + 104], "%d: got %08x\n", i, dib_bits[i] ); - for (i = 24; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 5, 4, 2, 2, 6, 3, 1, 5, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - for (i = 0; i < 64; i++) - if (i == 21 || i == 22 || i == 29 || i == 30) - ok( dib_bits[i] == inverted_data[i + 89], "%d: got %08x\n", i, dib_bits[i] ); - else - ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 0, 16, 16, 0, 0, 0, 5, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biHeight = -8; - - dib = CreateDIBSection( NULL, info, DIB_RGB_COLORS, (void**)&dib_bits, NULL, 0 ); - DeleteObject( SelectObject( hdc, dib )); - memset( dib_bits, 0xaa, 16 * 16 * 4 ); - - /* t-d -> t-d */ - - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 0, 8, data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == data[i], "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 1, 5, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - for (i = 0; i < 16; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - for (i = 16; i < 56; i++) ok( dib_bits[i] == data[i - 16], "%d: got %08x\n", i, dib_bits[i] ); - for (i = 56; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 3, 8, 3, 0, 2, 1, 5, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - for (i = 0; i < 24; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - for (i = 24; i < 48; i++) ok( dib_bits[i] == data[i - 16], "%d: got %08x\n", i, dib_bits[i] ); - for (i = 48; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biHeight = -16; - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 1, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 12, "got %d\n", ret ); - for (i = 0; i < 56; i++) ok( dib_bits[i] == data[i + 40], "%d: got %08x\n", i, dib_bits[i] ); - for (i = 56; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 5, -7, 8, 16, -1, -8, 0, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 12, "got %d\n", ret ); - for (i = 0; i < 64; i++) - if (i == 6 || i == 7) - ok( dib_bits[i] == data[i + 82], "%d: got %08x\n", i, dib_bits[i] ); - else - ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biHeight = -5; - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 1, 2, data, info, DIB_RGB_COLORS ); - ok( ret == 2, "got %d\n", ret ); - for (i = 0; i < 40; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - for (i = 40; i < 56; i++) ok( dib_bits[i] == data[i - 40], "%d: got %08x\n", i, dib_bits[i] ); - for (i = 56; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 7, 2, 8, 8, 1, 0, 0, 5, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - for (i = 0; i < 64; i++) - if (i == 47 || i == 55 || i == 63) - ok( dib_bits[i] == data[i - 46], "%d: got %08x\n", i, dib_bits[i] ); - else - ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 0, 16, 16, 0, 0, 0, 5, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - /* b-u -> t-d */ - - info->bmiHeader.biHeight = 8; - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 0, 8, data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == inverted_data[i + 64], "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 1, 5, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - for (i = 0; i < 16; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - for (i = 16; i < 56; i++) ok( dib_bits[i] == inverted_data[i + 72], "%d: got %08x\n", i, dib_bits[i] ); - for (i = 56; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biHeight = 16; - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 1, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 7, "got %d\n", ret ); - for (i = 0; i < 56; i++) ok( dib_bits[i] == inverted_data[i + 72], "%d: got %08x\n", i, dib_bits[i] ); - for (i = 56; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 4, 4, 8, 8, 0, -4, 1, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 3, "got %d\n", ret ); - for (i = 0; i < 64; i++) - if ((i >= 36 && i <= 39) || (i >= 44 && i <= 47) || (i >= 52 && i <= 55)) - ok( dib_bits[i] == inverted_data[i + 68], "%d: got %08x\n", i, dib_bits[i] ); - else - ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 4, 4, 8, 8, -30, -30, 1, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 0, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 5, -5, 8, 16, -2, -4, 4, 12, data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - for (i = 0; i < 64; i++) - if (i == 7 || i == 15 || i == 23) - ok( dib_bits[i] == inverted_data[i + 97], "%d: got %08x\n", i, dib_bits[i] ); - else - ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biHeight = 5; - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 1, 2, data, info, DIB_RGB_COLORS ); - ok( ret == 2, "got %d\n", ret ); - for (i = 0; i < 40; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - for (i = 40; i < 56; i++) ok( dib_bits[i] == inverted_data[i + 72], "%d: got %08x\n", i, dib_bits[i] ); - for (i = 56; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 0, 16, 16, 0, 0, 0, 5, data, info, DIB_RGB_COLORS ); - ok( ret == 5, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - DeleteDC( hdc ); - DeleteObject( dib ); - HeapFree( GetProcessHeap(), 0, info ); -} - -static void test_SetDIBitsToDevice_RLE8(void) -{ - BITMAPINFO *info; - DWORD *dib_bits; - HDC hdc = CreateCompatibleDC( 0 ); - BYTE rle8_data[20] = { 0x04, 0x02, 0x03, 0xf0, 0x00, 0x00, /* 2, 2, 2, 2, f0, f0, f0, */ - 0x00, 0x03, 0x04, 0x05, 0x06, 0x00, /* 4, 5, 6, */ - 0x00, 0x02, 0x01, 0x02, 0x05, 0x80, /* dx=1, dy=2, 80, 80, 80, 80, (80) */ - 0x00, 0x01 }; /* */ - HBITMAP dib; - int i, ret; - DWORD bottom_up[64] = { 0x00020202, 0x00020202, 0x00020202, 0x00020202, 0x00f0f0f0, 0x00f0f0f0, 0x00f0f0f0, 0xaaaaaaaa, - 0x00040404, 0x00050505, 0x00060606, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0x00808080, 0x00808080, 0x00808080, 0x00808080, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa }; - DWORD top_down[64] = { 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0x00808080, 0x00808080, 0x00808080, 0x00808080, - 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0x00040404, 0x00050505, 0x00060606, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, - 0x00020202, 0x00020202, 0x00020202, 0x00020202, 0x00f0f0f0, 0x00f0f0f0, 0x00f0f0f0, 0xaaaaaaaa }; - - info = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, FIELD_OFFSET( BITMAPINFO, bmiColors[256] ) ); - - info->bmiHeader.biSize = sizeof(info->bmiHeader); - info->bmiHeader.biWidth = 8; - info->bmiHeader.biHeight = 8; - info->bmiHeader.biPlanes = 1; - info->bmiHeader.biBitCount = 32; - info->bmiHeader.biCompression = BI_RGB; - - dib = CreateDIBSection( NULL, info, DIB_RGB_COLORS, (void**)&dib_bits, NULL, 0 ); - memset( dib_bits, 0xaa, 64 * 4 ); - SelectObject( hdc, dib ); - - info->bmiHeader.biBitCount = 8; - info->bmiHeader.biCompression = BI_RLE8; - info->bmiHeader.biSizeImage = sizeof(rle8_data); - - for (i = 0; i < 256; i++) - { - info->bmiColors[i].rgbRed = i; - info->bmiColors[i].rgbGreen = i; - info->bmiColors[i].rgbBlue = i; - info->bmiColors[i].rgbReserved = 0; - } - - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 0, 8, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == bottom_up[i], "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - /* startscan and lines are ignored, unless lines == 0 */ - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 1, 8, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == bottom_up[i], "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 1, 1, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == bottom_up[i], "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 1, 0, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 0, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biWidth = 2; - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 0, 8, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == bottom_up[i], "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biWidth = 8; - info->bmiHeader.biHeight = 2; - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 0, 8, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 2, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == bottom_up[i], "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biHeight = 9; - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 0, 8, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 9, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == bottom_up[i], "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 0, 9, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 9, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == bottom_up[i], "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biHeight = 8; - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 1, 9, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == bottom_up[i], "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 3, 8, 8, 0, 0, 0, 8, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - for (i = 0; i < 40; i++) ok( dib_bits[i] == bottom_up[i + 24], "%d: got %08x\n", i, dib_bits[i] ); - for (i = 40; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 3, 4, 4, 0, 0, 0, 8, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - for (i = 0; i < 8; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - for (i = 8; i < 40; i++) - if (i & 4) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - else ok( dib_bits[i] == bottom_up[i - 8], "%d: got %08x\n", i, dib_bits[i] ); - for (i = 40; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 3, 3, 8, 4, 0, 0, 0, 8, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - for (i = 0; i < 8; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - for (i = 8; i < 40; i++) - if ((i & 7) < 3) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - else ok( dib_bits[i] == bottom_up[i - 11], "%d: got %08x\n", i, dib_bits[i] ); - for (i = 40; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 2, 3, 8, 4, 2, 0, 0, 8, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - for (i = 0; i < 8; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - for (i = 8; i < 40; i++) - if ((i & 7) < 2) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - else ok( dib_bits[i] == bottom_up[i - 8], "%d: got %08x\n", i, dib_bits[i] ); - for (i = 40; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biWidth = 37; - info->bmiHeader.biHeight = 37; - ret = SetDIBitsToDevice( hdc, -2, 1, 10, 5, 2, -1, 12, 24, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 37, "got %d\n", ret ); - for (i = 0; i < 24; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - for (i = 24; i < 64; i++) - if (i == 52) ok( dib_bits[i] == 0x00808080, "%d: got %08x\n", i, dib_bits[i] ); - else if (i & 4) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - else ok( dib_bits[i] == bottom_up[i - 20], "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - /* top-down compressed dibs are invalid */ - info->bmiHeader.biWidth = 8; - info->bmiHeader.biHeight = -8; - SetLastError( 0xdeadbeef ); - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 0, 8, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 0, "got %d\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "got %x\n", GetLastError() ); - - /* top-down dst */ - - info->bmiHeader.biHeight = -8; - info->bmiHeader.biBitCount = 32; - info->bmiHeader.biCompression = BI_RGB; - info->bmiHeader.biSizeImage = 0; - - dib = CreateDIBSection( NULL, info, DIB_RGB_COLORS, (void**)&dib_bits, NULL, 0 ); - memset( dib_bits, 0xaa, 16 * 16 * 4 ); - DeleteObject( SelectObject( hdc, dib )); - - info->bmiHeader.biHeight = 8; - info->bmiHeader.biBitCount = 8; - info->bmiHeader.biCompression = BI_RLE8; - info->bmiHeader.biSizeImage = sizeof(rle8_data); - - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 0, 8, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == top_down[i], "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 0, 9, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 8, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == top_down[i], "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biHeight = 4; - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 0, 8, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 4, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == top_down[i], "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biHeight = 9; - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 0, 8, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 9, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == top_down[i], "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 0, 0, 8, 8, 0, 0, 0, 9, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 9, "got %d\n", ret ); - for (i = 0; i < 64; i++) ok( dib_bits[i] == top_down[i], "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - ret = SetDIBitsToDevice( hdc, 2, 3, 8, 6, 2, 2, 0, 8, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 9, "got %d\n", ret ); - for (i = 0; i < 24; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - for (i = 24; i < 64; i++) ok( dib_bits[i] == top_down[i - 24], "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - info->bmiHeader.biWidth = 37; - info->bmiHeader.biHeight = 37; - ret = SetDIBitsToDevice( hdc, -2, 1, 10, 5, 2, -1, 12, 24, rle8_data, info, DIB_RGB_COLORS ); - ok( ret == 37, "got %d\n", ret ); - for (i = 0; i < 40; i++) - if (i == 12) ok( dib_bits[i] == 0x00808080, "%d: got %08x\n", i, dib_bits[i] ); - else if (i & 4) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - else ok( dib_bits[i] == top_down[i + 28], "%d: got %08x\n", i, dib_bits[i] ); - for (i = 40; i < 64; i++) ok( dib_bits[i] == 0xaaaaaaaa, "%d: got %08x\n", i, dib_bits[i] ); - memset( dib_bits, 0xaa, 64 * 4 ); - - DeleteDC( hdc ); - DeleteObject( dib ); - HeapFree( GetProcessHeap(), 0, info ); -} - -START_TEST(bitmap) -{ - HMODULE hdll; - - hdll = GetModuleHandle("gdi32.dll"); - pGdiAlphaBlend = (void*)GetProcAddress(hdll, "GdiAlphaBlend"); - pSetLayout = (void*)GetProcAddress(hdll, "SetLayout"); - - test_createdibitmap(); - test_dibsections(); - test_dib_formats(); - test_mono_dibsection(); - test_bitmap(); - test_bmBits(); - test_GetDIBits_selected_DIB(1); - test_GetDIBits_selected_DIB(4); - test_GetDIBits_selected_DIB(8); - test_GetDIBits_selected_DDB(TRUE); - test_GetDIBits_selected_DDB(FALSE); - test_GetDIBits(); - test_GetDIBits_BI_BITFIELDS(); - test_select_object(); - test_CreateBitmap(); - test_BitBlt(); - test_StretchBlt(); - test_StretchDIBits(); - test_GdiAlphaBlend(); - test_32bit_bitmap_blt(); - test_bitmapinfoheadersize(); - test_get16dibits(); - test_clipping(); - test_GetDIBits_top_down(16); - test_GetDIBits_top_down(24); - test_GetDIBits_top_down(32); - test_GetSetDIBits_rtl(); - test_GetDIBits_scanlines(); - test_SetDIBits(); - test_SetDIBits_RLE4(); - test_SetDIBits_RLE8(); - test_SetDIBitsToDevice(); - test_SetDIBitsToDevice_RLE8(); -} diff --git a/rostests/winetests/gdi32/brush.c b/rostests/winetests/gdi32/brush.c deleted file mode 100755 index 2197f7e3c18..00000000000 --- a/rostests/winetests/gdi32/brush.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Unit test suite for brushes - * - * Copyright 2004 Kevin Koltzau - * - * 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 "windef.h" -#include "winbase.h" -#include "wingdi.h" - -#include "wine/test.h" - -typedef struct _STOCK_BRUSH { - COLORREF color; - int stockobj; - const char *name; -} STOCK_BRUSH; - -static void test_solidbrush(void) -{ - static const STOCK_BRUSH stock[] = { - {RGB(255,255,255), WHITE_BRUSH, "white"}, - {RGB(192,192,192), LTGRAY_BRUSH, "ltgray"}, - {RGB(128,128,128), GRAY_BRUSH, "gray"}, - {RGB(0,0,0), BLACK_BRUSH, "black"}, - {RGB(0,0,255), -1, "blue"} - }; - HBRUSH solidBrush; - HBRUSH stockBrush; - LOGBRUSH br; - size_t i; - INT ret; - - for(i=0; ileft, rect->top, rect->right, rect->bottom); - ok(EqualRect(rect, rc), "rects don't match\n"); - } - - ok(rgn.data.rdh.dwSize == sizeof(rgn.data.rdh), "expected sizeof(rdh), got %u\n", rgn.data.rdh.dwSize); - ok(rgn.data.rdh.iType == RDH_RECTANGLES, "expected RDH_RECTANGLES, got %u\n", rgn.data.rdh.iType); - if (IsRectEmpty(rc)) - { - ok(rgn.data.rdh.nCount == 0, "expected 0, got %u\n", rgn.data.rdh.nCount); - ok(rgn.data.rdh.nRgnSize == 0 || - broken(rgn.data.rdh.nRgnSize == 168), /* NT4 */ - "expected 0, got %u\n", rgn.data.rdh.nRgnSize); - } - else - { - ok(rgn.data.rdh.nCount == 1, "expected 1, got %u\n", rgn.data.rdh.nCount); - ok(rgn.data.rdh.nRgnSize == sizeof(RECT) || - broken(rgn.data.rdh.nRgnSize == 168), /* NT4 */ - "expected sizeof(RECT), got %u\n", rgn.data.rdh.nRgnSize); - } - ok(EqualRect(&rgn.data.rdh.rcBound, rc), "rects don't match\n"); -} - -static void test_ExtCreateRegion(void) -{ - static const RECT empty_rect; - static const RECT rc = { 111, 222, 333, 444 }; - static const RECT rc_xformed = { 76, 151, 187, 262 }; - union - { - RGNDATA data; - char buf[sizeof(RGNDATAHEADER) + sizeof(RECT)]; - } rgn; - HRGN hrgn; - XFORM xform; - - if (0) /* crashes under Win9x */ - { - SetLastError(0xdeadbeef); - hrgn = ExtCreateRegion(NULL, 0, NULL); - ok(!hrgn, "ExtCreateRegion should fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); - } - - rgn.data.rdh.dwSize = 0; - rgn.data.rdh.iType = 0; - rgn.data.rdh.nCount = 0; - rgn.data.rdh.nRgnSize = 0; - SetRectEmpty(&rgn.data.rdh.rcBound); - memcpy(rgn.data.Buffer, &rc, sizeof(rc)); - - SetLastError(0xdeadbeef); - hrgn = ExtCreateRegion(NULL, sizeof(rgn), &rgn.data); - ok(!hrgn, "ExtCreateRegion should fail\n"); - ok(GetLastError() == 0xdeadbeef, "0xdeadbeef, got %u\n", GetLastError()); - - rgn.data.rdh.dwSize = sizeof(rgn.data.rdh) - 1; - - SetLastError(0xdeadbeef); - hrgn = ExtCreateRegion(NULL, sizeof(rgn), &rgn.data); - ok(!hrgn, "ExtCreateRegion should fail\n"); - ok(GetLastError() == 0xdeadbeef, "0xdeadbeef, got %u\n", GetLastError()); - - /* although XP doesn't care about the type Win9x does */ - rgn.data.rdh.iType = RDH_RECTANGLES; - rgn.data.rdh.dwSize = sizeof(rgn.data.rdh); - - SetLastError(0xdeadbeef); - hrgn = ExtCreateRegion(NULL, sizeof(rgn), &rgn.data); - ok(hrgn != 0, "ExtCreateRegion error %u\n", GetLastError()); - verify_region(hrgn, &empty_rect); - DeleteObject(hrgn); - - rgn.data.rdh.nCount = 1; - SetRectEmpty(&rgn.data.rdh.rcBound); - memcpy(rgn.data.Buffer, &rc, sizeof(rc)); - - SetLastError(0xdeadbeef); - hrgn = ExtCreateRegion(NULL, sizeof(rgn), &rgn.data); - ok(hrgn != 0, "ExtCreateRegion error %u\n", GetLastError()); - verify_region(hrgn, &rc); - DeleteObject(hrgn); - - rgn.data.rdh.dwSize = sizeof(rgn.data.rdh) + 1; - - SetLastError(0xdeadbeef); - hrgn = ExtCreateRegion(NULL, 1, &rgn.data); - ok(hrgn != 0 || - broken(GetLastError() == 0xdeadbeef), /* NT4 */ - "ExtCreateRegion error %u\n", GetLastError()); - if(hrgn) - { - verify_region(hrgn, &rc); - DeleteObject(hrgn); - } - - xform.eM11 = 0.5; /* 50% width */ - xform.eM12 = 0.0; - xform.eM21 = 0.0; - xform.eM22 = 0.5; /* 50% height */ - xform.eDx = 20.0; - xform.eDy = 40.0; - - rgn.data.rdh.dwSize = sizeof(rgn.data.rdh); - - SetLastError(0xdeadbeef); - hrgn = ExtCreateRegion(&xform, sizeof(rgn), &rgn.data); - ok(hrgn != 0, "ExtCreateRegion error %u/%x\n", GetLastError(), GetLastError()); - verify_region(hrgn, &rc_xformed); - DeleteObject(hrgn); -} - -static void test_GetClipRgn(void) -{ - HDC hdc; - HRGN hrgn, hrgn2, hrgn3, hrgn4; - int ret; - - /* Test calling GetClipRgn with NULL device context and region handles. */ - ret = GetClipRgn(NULL, NULL); - ok(ret == -1, "Expected GetClipRgn to return -1, got %d\n", ret); - - hdc = GetDC(NULL); - ok(hdc != NULL, "Expected GetDC to return a valid device context handle\n"); - - /* Test calling GetClipRgn with a valid device context and NULL region. */ - ret = GetClipRgn(hdc, NULL); - ok(ret == 0 || - ret == -1 /* Win9x */, - "Expected GetClipRgn to return 0, got %d\n", ret); - - /* Initialize the test regions. */ - hrgn = CreateRectRgn(100, 100, 100, 100); - ok(hrgn != NULL, - "Expected CreateRectRgn to return a handle to a new rectangular region\n"); - - hrgn2 = CreateRectRgn(1, 2, 3, 4); - ok(hrgn2 != NULL, - "Expected CreateRectRgn to return a handle to a new rectangular region\n"); - - hrgn3 = CreateRectRgn(1, 2, 3, 4); - ok(hrgn3 != NULL, - "Expected CreateRectRgn to return a handle to a new rectangular region\n"); - - hrgn4 = CreateRectRgn(1, 2, 3, 4); - ok(hrgn4 != NULL, - "Expected CreateRectRgn to return a handle to a new rectangular region\n"); - - /* Try getting a clipping region from the device context - * when the device context's clipping region isn't set. */ - ret = GetClipRgn(hdc, hrgn2); - ok(ret == 0, "Expected GetClipRgn to return 0, got %d\n", ret); - - /* The region passed to GetClipRgn should be unchanged. */ - ret = EqualRgn(hrgn2, hrgn3); - ok(ret == 1, - "Expected EqualRgn to compare the two regions as equal, got %d\n", ret); - - /* Try setting and getting back a clipping region. */ - ret = SelectClipRgn(hdc, hrgn); - ok(ret == NULLREGION, - "Expected SelectClipRgn to return NULLREGION, got %d\n", ret); - - /* Passing a NULL region handle when the device context - * has a clipping region results in an error. */ - ret = GetClipRgn(hdc, NULL); - ok(ret == -1, "Expected GetClipRgn to return -1, got %d\n", ret); - - ret = GetClipRgn(hdc, hrgn2); - ok(ret == 1, "Expected GetClipRgn to return 1, got %d\n", ret); - - ret = EqualRgn(hrgn, hrgn2); - ok(ret == 1, - "Expected EqualRgn to compare the two regions as equal, got %d\n", ret); - - /* Try unsetting and then query the clipping region. */ - ret = SelectClipRgn(hdc, NULL); - ok(ret == SIMPLEREGION, - "Expected SelectClipRgn to return SIMPLEREGION, got %d\n", ret); - - ret = GetClipRgn(hdc, NULL); - ok(ret == 0 || - ret == -1 /* Win9x */, - "Expected GetClipRgn to return 0, got %d\n", ret); - - ret = GetClipRgn(hdc, hrgn3); - ok(ret == 0, "Expected GetClipRgn to return 0, got %d\n", ret); - - ret = EqualRgn(hrgn3, hrgn4); - ok(ret == 1, - "Expected EqualRgn to compare the two regions as equal, got %d\n", ret); - - DeleteObject(hrgn4); - DeleteObject(hrgn3); - DeleteObject(hrgn2); - DeleteObject(hrgn); - ReleaseDC(NULL, hdc); -} - -static void test_memory_dc_clipping(void) -{ - HDC hdc; - HRGN hrgn, hrgn_empty; - HBITMAP hbmp; - RECT rc; - int ret; - - hdc = CreateCompatibleDC(0); - hrgn_empty = CreateRectRgn(0, 0, 0, 0); - hrgn = CreateRectRgn(0, 0, 0, 0); - hbmp = CreateCompatibleBitmap(hdc, 100, 100); - - ret = GetClipRgn(hdc, hrgn); - ok(ret == 0, "expected 0, got %d\n", ret); - - ret = ExtSelectClipRgn(hdc, hrgn_empty, RGN_DIFF); - ok(ret == SIMPLEREGION, "expected SIMPLEREGION, got %d\n", ret); - - ret = GetClipRgn(hdc, hrgn); - ok(ret == 1, "expected 1, got %d\n", ret); - - ret = GetRgnBox(hrgn, &rc); - ok(ret == SIMPLEREGION, "expected SIMPLEREGION, got %d\n", ret); - ok(rc.left == 0 && rc.top == 0 && rc.right == 1 && rc.bottom == 1, - "expected 0,0-1,1, got %d,%d-%d,%d\n", rc.left, rc.top, rc.right, rc.bottom); - - ret = ExtSelectClipRgn(hdc, 0, RGN_COPY); - ok(ret == SIMPLEREGION, "expected SIMPLEREGION, got %d\n", ret); - - ret = GetClipRgn(hdc, hrgn); - ok(ret == 0, "expected 0, got %d\n", ret); - - SelectObject(hdc, hbmp); - - ret = ExtSelectClipRgn(hdc, hrgn_empty, RGN_DIFF); - ok(ret == SIMPLEREGION, "expected SIMPLEREGION, got %d\n", ret); - - ret = GetClipRgn(hdc, hrgn); - ok(ret == 1, "expected 1, got %d\n", ret); - - ret = GetRgnBox(hrgn, &rc); - ok(ret == SIMPLEREGION, "expected SIMPLEREGION, got %d\n", ret); - ok(rc.left == 0 && rc.top == 0 && rc.right == 100 && rc.bottom == 100, - "expected 0,0-100,100, got %d,%d-%d,%d\n", rc.left, rc.top, rc.right, rc.bottom); - - DeleteDC(hdc); - DeleteObject(hrgn); - DeleteObject(hrgn_empty); - DeleteObject(hbmp); -} - -static void test_window_dc_clipping(void) -{ - HDC hdc; - HRGN hrgn, hrgn_empty; - HWND hwnd; - RECT rc; - int ret, screen_width, screen_height; - - /* Windows versions earlier than Win2k do not support the virtual screen metrics, - * so we fall back to the primary screen metrics. */ - screen_width = GetSystemMetrics(SM_CXVIRTUALSCREEN); - if(!screen_width) screen_width = GetSystemMetrics(SM_CXSCREEN); - screen_height = GetSystemMetrics(SM_CYVIRTUALSCREEN); - if(!screen_height) screen_height = GetSystemMetrics(SM_CYSCREEN); - - trace("screen resolution %d x %d\n", screen_width, screen_height); - - hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP, - -100, -100, screen_width * 2, screen_height * 2, 0, 0, 0, NULL); - hdc = GetWindowDC(0); - hrgn_empty = CreateRectRgn(0, 0, 0, 0); - hrgn = CreateRectRgn(0, 0, 0, 0); - - ret = GetClipRgn(hdc, hrgn); - ok(ret == 0, "expected 0, got %d\n", ret); - - ret = ExtSelectClipRgn(hdc, hrgn_empty, RGN_DIFF); - ok(ret == SIMPLEREGION, "expected SIMPLEREGION, got %d\n", ret); - - ret = GetClipRgn(hdc, hrgn); - ok(ret == 1, "expected 1, got %d\n", ret); - - ret = GetRgnBox(hrgn, &rc); - ok(ret == SIMPLEREGION, "expected SIMPLEREGION, got %d\n", ret); - ok(rc.left == 0 && rc.top == 0 && rc.right == screen_width && rc.bottom == screen_height, - "expected 0,0-%d,%d, got %d,%d-%d,%d\n", screen_width, screen_height, - rc.left, rc.top, rc.right, rc.bottom); - - ret = ExtSelectClipRgn(hdc, 0, RGN_COPY); - ok(ret == SIMPLEREGION, "expected SIMPLEREGION, got %d\n", ret); - - ret = GetClipRgn(hdc, hrgn); - ok(ret == 0, "expected 0, got %d\n", ret); - - DeleteDC(hdc); - DeleteObject(hrgn); - DeleteObject(hrgn_empty); - DestroyWindow(hwnd); -} - - -START_TEST(clipping) -{ - test_GetRandomRgn(); - test_ExtCreateRegion(); - test_GetClipRgn(); - test_memory_dc_clipping(); - test_window_dc_clipping(); -} diff --git a/rostests/winetests/gdi32/dc.c b/rostests/winetests/gdi32/dc.c deleted file mode 100644 index 2eee7edf863..00000000000 --- a/rostests/winetests/gdi32/dc.c +++ /dev/null @@ -1,798 +0,0 @@ -/* - * Unit tests for dc functions - * - * Copyright (c) 2005 Huw Davies - * Copyright (c) 2005 Dmitry Timoshkov - * - * 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 WINVER 0x0501 /* request latest DEVMODE */ - -#include -#include - -#include "wine/test.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winerror.h" - -static DWORD (WINAPI *pSetLayout)(HDC hdc, DWORD layout); - -static void dump_region(HRGN hrgn) -{ - DWORD i, size; - RGNDATA *data = NULL; - RECT *rect; - - if (!hrgn) - { - printf( "(null) region\n" ); - return; - } - if (!(size = GetRegionData( hrgn, 0, NULL ))) return; - if (!(data = HeapAlloc( GetProcessHeap(), 0, size ))) return; - GetRegionData( hrgn, size, data ); - printf( "%d rects:", data->rdh.nCount ); - for (i = 0, rect = (RECT *)data->Buffer; i < data->rdh.nCount; i++, rect++) - printf( " (%d,%d)-(%d,%d)", rect->left, rect->top, rect->right, rect->bottom ); - printf( "\n" ); - HeapFree( GetProcessHeap(), 0, data ); -} - -static void test_savedc_2(void) -{ - HWND hwnd; - HDC hdc; - HRGN hrgn; - RECT rc, rc_clip; - int ret; - - hwnd = CreateWindowExA(0, "static", "", WS_POPUP, 0,0,100,100, - 0, 0, 0, NULL); - assert(hwnd != 0); - ShowWindow(hwnd, SW_SHOW); - UpdateWindow(hwnd); - - hrgn = CreateRectRgn(0, 0, 0, 0); - assert(hrgn != 0); - - hdc = GetDC(hwnd); - ok(hdc != NULL, "GetDC failed\n"); - - ret = GetClipBox(hdc, &rc_clip); - ok(ret == SIMPLEREGION || broken(ret == COMPLEXREGION), "GetClipBox returned %d instead of SIMPLEREGION\n", ret); - ret = GetClipRgn(hdc, hrgn); - ok(ret == 0, "GetClipRgn returned %d instead of 0\n", ret); - ret = GetRgnBox(hrgn, &rc); - ok(ret == NULLREGION, "GetRgnBox returned %d (%d,%d-%d,%d) instead of NULLREGION\n", - ret, rc.left, rc.top, rc.right, rc.bottom); - /*dump_region(hrgn);*/ - SetRect(&rc, 0, 0, 100, 100); - ok(EqualRect(&rc, &rc_clip), - "rects are not equal: (%d,%d-%d,%d) - (%d,%d-%d,%d)\n", - rc.left, rc.top, rc.right, rc.bottom, - rc_clip.left, rc_clip.top, rc_clip.right, rc_clip.bottom); - - ret = SaveDC(hdc); -todo_wine -{ - ok(ret == 1, "ret = %d\n", ret); -} - - ret = IntersectClipRect(hdc, 0, 0, 50, 50); - if (ret == COMPLEXREGION) - { - /* XP returns COMPLEXREGION although dump_region reports only 1 rect */ - trace("Windows BUG: IntersectClipRect returned %d instead of SIMPLEREGION\n", ret); - /* let's make sure that it's a simple region */ - ret = GetClipRgn(hdc, hrgn); - ok(ret == 1, "GetClipRgn returned %d instead of 1\n", ret); - dump_region(hrgn); - } - else - ok(ret == SIMPLEREGION, "IntersectClipRect returned %d instead of SIMPLEREGION\n", ret); - - ret = GetClipBox(hdc, &rc_clip); - ok(ret == SIMPLEREGION || broken(ret == COMPLEXREGION), "GetClipBox returned %d instead of SIMPLEREGION\n", ret); - SetRect(&rc, 0, 0, 50, 50); - ok(EqualRect(&rc, &rc_clip), - "rects are not equal: (%d,%d-%d,%d) - (%d,%d-%d,%d)\n", - rc.left, rc.top, rc.right, rc.bottom, - rc_clip.left, rc_clip.top, rc_clip.right, rc_clip.bottom); - - ret = RestoreDC(hdc, 1); - ok(ret, "ret = %d\n", ret); - - ret = GetClipBox(hdc, &rc_clip); - ok(ret == SIMPLEREGION || broken(ret == COMPLEXREGION), "GetClipBox returned %d instead of SIMPLEREGION\n", ret); - SetRect(&rc, 0, 0, 100, 100); - ok(EqualRect(&rc, &rc_clip), - "rects are not equal: (%d,%d-%d,%d) - (%d,%d-%d,%d)\n", - rc.left, rc.top, rc.right, rc.bottom, - rc_clip.left, rc_clip.top, rc_clip.right, rc_clip.bottom); - - DeleteObject(hrgn); - ReleaseDC(hwnd, hdc); - DestroyWindow(hwnd); -} - -static void test_savedc(void) -{ - HDC hdc = CreateDCA("DISPLAY", NULL, NULL, NULL); - int ret; - - ok(hdc != NULL, "CreateDC rets %p\n", hdc); - - ret = SaveDC(hdc); - ok(ret == 1, "ret = %d\n", ret); - ret = SaveDC(hdc); - ok(ret == 2, "ret = %d\n", ret); - ret = SaveDC(hdc); - ok(ret == 3, "ret = %d\n", ret); - ret = RestoreDC(hdc, -1); - ok(ret, "ret = %d\n", ret); - ret = SaveDC(hdc); - ok(ret == 3, "ret = %d\n", ret); - ret = RestoreDC(hdc, 1); - ok(ret, "ret = %d\n", ret); - ret = SaveDC(hdc); - ok(ret == 1, "ret = %d\n", ret); - ret = SaveDC(hdc); - ok(ret == 2, "ret = %d\n", ret); - ret = SaveDC(hdc); - ok(ret == 3, "ret = %d\n", ret); - ret = RestoreDC(hdc, -2); - ok(ret, "ret = %d\n", ret); - ret = SaveDC(hdc); - ok(ret == 2, "ret = %d\n", ret); - ret = RestoreDC(hdc, -2); - ok(ret, "ret = %d\n", ret); - ret = SaveDC(hdc); - ok(ret == 1, "ret = %d\n", ret); - ret = SaveDC(hdc); - ok(ret == 2, "ret = %d\n", ret); - ret = RestoreDC(hdc, -4); - ok(!ret, "ret = %d\n", ret); - ret = RestoreDC(hdc, 3); - ok(!ret, "ret = %d\n", ret); - - /* Under Win9x the following RestoreDC call succeeds and clears the save stack. */ - ret = RestoreDC(hdc, -3); - ok(!ret || - broken(ret), /* Win9x */ - "ret = %d\n", ret); - - /* Trying to clear an empty save stack fails. */ - ret = RestoreDC(hdc, -3); - ok(!ret, "ret = %d\n", ret); - - ret = SaveDC(hdc); - ok(ret == 3 || - broken(ret == 1), /* Win9x */ - "ret = %d\n", ret); - - /* Under Win9x the following RestoreDC call succeeds and clears the save stack. */ - ret = RestoreDC(hdc, 0); - ok(!ret || - broken(ret), /* Win9x */ - "ret = %d\n", ret); - - /* Trying to clear an empty save stack fails. */ - ret = RestoreDC(hdc, 0); - ok(!ret, "ret = %d\n", ret); - - ret = RestoreDC(hdc, 1); - ok(ret || - broken(!ret), /* Win9x */ - "ret = %d\n", ret); - - DeleteDC(hdc); -} - -static void test_GdiConvertToDevmodeW(void) -{ - DEVMODEW * (WINAPI *pGdiConvertToDevmodeW)(const DEVMODEA *); - DEVMODEA dmA; - DEVMODEW *dmW; - BOOL ret; - - pGdiConvertToDevmodeW = (void *)GetProcAddress(GetModuleHandleA("gdi32.dll"), "GdiConvertToDevmodeW"); - if (!pGdiConvertToDevmodeW) - { - win_skip("GdiConvertToDevmodeW is not available on this platform\n"); - return; - } - - ret = EnumDisplaySettingsA(NULL, ENUM_CURRENT_SETTINGS, &dmA); - ok(ret, "EnumDisplaySettingsExA error %u\n", GetLastError()); - ok(dmA.dmSize >= FIELD_OFFSET(DEVMODEA, dmICMMethod), "dmSize is too small: %04x\n", dmA.dmSize); - ok(dmA.dmSize <= sizeof(DEVMODEA), "dmSize is too large: %04x\n", dmA.dmSize); - - dmW = pGdiConvertToDevmodeW(&dmA); - ok(dmW->dmSize >= FIELD_OFFSET(DEVMODEW, dmICMMethod), "dmSize is too small: %04x\n", dmW->dmSize); - ok(dmW->dmSize <= sizeof(DEVMODEW), "dmSize is too large: %04x\n", dmW->dmSize); - HeapFree(GetProcessHeap(), 0, dmW); - - dmA.dmSize = FIELD_OFFSET(DEVMODEA, dmFields) + sizeof(dmA.dmFields); - dmW = pGdiConvertToDevmodeW(&dmA); - ok(dmW->dmSize == FIELD_OFFSET(DEVMODEW, dmFields) + sizeof(dmW->dmFields), - "wrong size %u\n", dmW->dmSize); - HeapFree(GetProcessHeap(), 0, dmW); - - dmA.dmICMMethod = DMICMMETHOD_NONE; - dmA.dmSize = FIELD_OFFSET(DEVMODEA, dmICMMethod) + sizeof(dmA.dmICMMethod); - dmW = pGdiConvertToDevmodeW(&dmA); - ok(dmW->dmSize == FIELD_OFFSET(DEVMODEW, dmICMMethod) + sizeof(dmW->dmICMMethod), - "wrong size %u\n", dmW->dmSize); - ok(dmW->dmICMMethod == DMICMMETHOD_NONE, - "expected DMICMMETHOD_NONE, got %u\n", dmW->dmICMMethod); - HeapFree(GetProcessHeap(), 0, dmW); - - dmA.dmSize = 1024; - dmW = pGdiConvertToDevmodeW(&dmA); - ok(dmW->dmSize == FIELD_OFFSET(DEVMODEW, dmPanningHeight) + sizeof(dmW->dmPanningHeight), - "wrong size %u\n", dmW->dmSize); - HeapFree(GetProcessHeap(), 0, dmW); - - SetLastError(0xdeadbeef); - dmA.dmSize = 0; - dmW = pGdiConvertToDevmodeW(&dmA); - ok(!dmW, "GdiConvertToDevmodeW should fail\n"); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", GetLastError()); - - /* this is the minimal dmSize that XP accepts */ - dmA.dmSize = FIELD_OFFSET(DEVMODEA, dmFields); - dmW = pGdiConvertToDevmodeW(&dmA); - ok(dmW->dmSize == FIELD_OFFSET(DEVMODEW, dmFields), - "expected %04x, got %04x\n", FIELD_OFFSET(DEVMODEW, dmFields), dmW->dmSize); - HeapFree(GetProcessHeap(), 0, dmW); -} - -static void test_CreateCompatibleDC(void) -{ - BOOL bRet; - HDC hdc, hNewDC, hdcMetafile; - HBITMAP bitmap; - INT caps; - - bitmap = CreateBitmap( 10, 10, 1, 1, NULL ); - - /* Create a DC compatible with the screen */ - hdc = CreateCompatibleDC(NULL); - ok(hdc != NULL, "CreateCompatibleDC returned %p\n", hdc); - ok( SelectObject( hdc, bitmap ) != 0, "SelectObject failed\n" ); - caps = GetDeviceCaps( hdc, TECHNOLOGY ); - ok( caps == DT_RASDISPLAY, "wrong caps %u\n", caps ); - - /* Delete this DC, this should succeed */ - bRet = DeleteDC(hdc); - ok(bRet == TRUE, "DeleteDC returned %u\n", bRet); - - /* Try to create a DC compatible to the deleted DC. This has to fail */ - hNewDC = CreateCompatibleDC(hdc); - ok(hNewDC == NULL, "CreateCompatibleDC returned %p\n", hNewDC); - - hdc = GetDC( 0 ); - hdcMetafile = CreateEnhMetaFileA(hdc, NULL, NULL, NULL); - ok(hdcMetafile != 0, "CreateEnhMetaFileA failed\n"); - hNewDC = CreateCompatibleDC( hdcMetafile ); - ok(hNewDC != NULL, "CreateCompatibleDC failed\n"); - ok( SelectObject( hNewDC, bitmap ) != 0, "SelectObject failed\n" ); - caps = GetDeviceCaps( hdcMetafile, TECHNOLOGY ); - ok( caps == DT_RASDISPLAY, "wrong caps %u\n", caps ); - caps = GetDeviceCaps( hNewDC, TECHNOLOGY ); - ok( caps == DT_RASDISPLAY, "wrong caps %u\n", caps ); - DeleteDC( hNewDC ); - DeleteEnhMetaFile( CloseEnhMetaFile( hdcMetafile )); - ReleaseDC( 0, hdc ); - - hdcMetafile = CreateMetaFileA(NULL); - ok(hdcMetafile != 0, "CreateEnhMetaFileA failed\n"); - hNewDC = CreateCompatibleDC( hdcMetafile ); - ok(hNewDC == NULL, "CreateCompatibleDC succeeded\n"); - caps = GetDeviceCaps( hdcMetafile, TECHNOLOGY ); - ok( caps == DT_METAFILE, "wrong caps %u\n", caps ); - DeleteMetaFile( CloseMetaFile( hdcMetafile )); - - DeleteObject( bitmap ); -} - -static void test_DC_bitmap(void) -{ - HDC hdc, hdcmem; - DWORD bits[64]; - HBITMAP hbmp, oldhbmp; - COLORREF col; - int i, bitspixel; - - /* fill bitmap data with b&w pattern */ - for( i = 0; i < 64; i++) bits[i] = i & 1 ? 0 : 0xffffff; - - hdc = GetDC(0); - ok( hdc != NULL, "CreateDC rets %p\n", hdc); - bitspixel = GetDeviceCaps( hdc, BITSPIXEL); - /* create a memory dc */ - hdcmem = CreateCompatibleDC( hdc); - ok( hdcmem != NULL, "CreateCompatibleDC rets %p\n", hdcmem); - /* tests */ - /* test monochrome bitmap: should always work */ - hbmp = CreateBitmap(32, 32, 1, 1, bits); - ok( hbmp != NULL, "CreateBitmap returns %p\n", hbmp); - oldhbmp = SelectObject( hdcmem, hbmp); - ok( oldhbmp != NULL, "SelectObject returned NULL\n" ); /* a memdc always has a bitmap selected */ - col = GetPixel( hdcmem, 0, 0); - ok( col == 0xffffff, "GetPixel returned %08x, expected 00ffffff\n", col); - col = GetPixel( hdcmem, 1, 1); - ok( col == 0x000000, "GetPixel returned %08x, expected 00000000\n", col); - col = GetPixel( hdcmem, 100, 1); - ok( col == CLR_INVALID, "GetPixel returned %08x, expected ffffffff\n", col); - SelectObject( hdcmem, oldhbmp); - DeleteObject( hbmp); - - /* test with 2 bits color depth, not likely to succeed */ - hbmp = CreateBitmap(16, 16, 1, 2, bits); - ok( hbmp != NULL, "CreateBitmap returns %p\n", hbmp); - oldhbmp = SelectObject( hdcmem, hbmp); - if( bitspixel != 2) - ok( !oldhbmp, "SelectObject of a bitmap with 2 bits/pixel should return NULL\n"); - if( oldhbmp) SelectObject( hdcmem, oldhbmp); - DeleteObject( hbmp); - - /* test with 16 bits color depth, might succeed */ - hbmp = CreateBitmap(6, 6, 1, 16, bits); - ok( hbmp != NULL, "CreateBitmap returns %p\n", hbmp); - oldhbmp = SelectObject( hdcmem, hbmp); - if( bitspixel == 16) { - ok( oldhbmp != NULL, "SelectObject returned NULL\n" ); - col = GetPixel( hdcmem, 0, 0); - ok( col == 0xffffff, - "GetPixel of a bitmap with 16 bits/pixel returned %08x, expected 00ffffff\n", col); - col = GetPixel( hdcmem, 1, 1); - ok( col == 0x000000, - "GetPixel of a bitmap with 16 bits/pixel returned returned %08x, expected 00000000\n", col); - } - if( oldhbmp) SelectObject( hdcmem, oldhbmp); - DeleteObject( hbmp); - - /* test with 32 bits color depth, probably succeed */ - hbmp = CreateBitmap(4, 4, 1, 32, bits); - ok( hbmp != NULL, "CreateBitmap returns %p\n", hbmp); - oldhbmp = SelectObject( hdcmem, hbmp); - if( bitspixel == 32) { - ok( oldhbmp != NULL, "SelectObject returned NULL\n" ); - col = GetPixel( hdcmem, 0, 0); - ok( col == 0xffffff, - "GetPixel of a bitmap with 32 bits/pixel returned %08x, expected 00ffffff\n", col); - col = GetPixel( hdcmem, 1, 1); - ok( col == 0x000000, - "GetPixel of a bitmap with 32 bits/pixel returned returned %08x, expected 00000000\n", col); - } - if( oldhbmp) SelectObject( hdcmem, oldhbmp); - DeleteObject( hbmp); - ReleaseDC( 0, hdc ); -} - -static void test_DeleteDC(void) -{ - HWND hwnd; - HDC hdc, hdc_test; - WNDCLASSEX cls; - int ret; - - /* window DC */ - hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP|WS_VISIBLE, 0,0,100,100, - 0, 0, 0, NULL); - ok(hwnd != 0, "CreateWindowExA failed\n"); - - hdc = GetDC(hwnd); - ok(hdc != 0, "GetDC failed\n"); - ret = GetObjectType(hdc); - ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); - ret = DeleteDC(hdc); - ok(ret, "DeleteDC failed\n"); - ret = GetObjectType(hdc); - ok(!ret || broken(ret) /* win9x */, "GetObjectType should fail for a deleted DC\n"); - - hdc = GetWindowDC(hwnd); - ok(hdc != 0, "GetDC failed\n"); - ret = GetObjectType(hdc); - ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); - ret = DeleteDC(hdc); - ok(ret, "DeleteDC failed\n"); - ret = GetObjectType(hdc); - ok(!ret || broken(ret) /* win9x */, "GetObjectType should fail for a deleted DC\n"); - - DestroyWindow(hwnd); - - /* desktop window DC */ - hwnd = GetDesktopWindow(); - ok(hwnd != 0, "GetDesktopWindow failed\n"); - - hdc = GetDC(hwnd); - ok(hdc != 0, "GetDC failed\n"); - ret = GetObjectType(hdc); - ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); - ret = DeleteDC(hdc); - ok(ret, "DeleteDC failed\n"); - ret = GetObjectType(hdc); - ok(!ret || broken(ret) /* win9x */, "GetObjectType should fail for a deleted DC\n"); - - hdc = GetWindowDC(hwnd); - ok(hdc != 0, "GetDC failed\n"); - ret = GetObjectType(hdc); - ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); - ret = DeleteDC(hdc); - ok(ret, "DeleteDC failed\n"); - ret = GetObjectType(hdc); - ok(!ret || broken(ret) /* win9x */, "GetObjectType should fail for a deleted DC\n"); - - /* CS_CLASSDC */ - memset(&cls, 0, sizeof(cls)); - cls.cbSize = sizeof(cls); - cls.style = CS_CLASSDC; - cls.hInstance = GetModuleHandle(0); - cls.lpszClassName = "Wine class DC"; - cls.lpfnWndProc = DefWindowProcA; - ret = RegisterClassExA(&cls); - ok(ret, "RegisterClassExA failed\n"); - - hwnd = CreateWindowExA(0, "Wine class DC", NULL, WS_POPUP|WS_VISIBLE, 0,0,100,100, - 0, 0, 0, NULL); - ok(hwnd != 0, "CreateWindowExA failed\n"); - - hdc = GetDC(hwnd); - ok(hdc != 0, "GetDC failed\n"); - ret = GetObjectType(hdc); - ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); - ret = DeleteDC(hdc); - ok(ret, "DeleteDC failed\n"); - ret = GetObjectType(hdc); - ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); - ret = ReleaseDC(hwnd, hdc); - ok(ret, "ReleaseDC failed\n"); - ret = GetObjectType(hdc); - ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); - - hdc_test = hdc; - - hdc = GetWindowDC(hwnd); - ok(hdc != 0, "GetDC failed\n"); - ret = GetObjectType(hdc); - ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); - ret = DeleteDC(hdc); - ok(ret, "DeleteDC failed\n"); - ret = GetObjectType(hdc); - ok(!ret || broken(ret) /* win9x */, "GetObjectType should fail for a deleted DC\n"); - - DestroyWindow(hwnd); - - ret = GetObjectType(hdc_test); - ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); - - ret = UnregisterClassA("Wine class DC", GetModuleHandle(NULL)); - ok(ret, "UnregisterClassA failed\n"); - - ret = GetObjectType(hdc_test); -todo_wine - ok(!ret, "GetObjectType should fail for a deleted DC\n"); - - /* CS_OWNDC */ - memset(&cls, 0, sizeof(cls)); - cls.cbSize = sizeof(cls); - cls.style = CS_OWNDC; - cls.hInstance = GetModuleHandle(0); - cls.lpszClassName = "Wine own DC"; - cls.lpfnWndProc = DefWindowProcA; - ret = RegisterClassExA(&cls); - ok(ret, "RegisterClassExA failed\n"); - - hwnd = CreateWindowExA(0, "Wine own DC", NULL, WS_POPUP|WS_VISIBLE, 0,0,100,100, - 0, 0, 0, NULL); - ok(hwnd != 0, "CreateWindowExA failed\n"); - - hdc = GetDC(hwnd); - ok(hdc != 0, "GetDC failed\n"); - ret = GetObjectType(hdc); - ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); - ret = DeleteDC(hdc); - ok(ret, "DeleteDC failed\n"); - ret = GetObjectType(hdc); - ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); - ret = ReleaseDC(hwnd, hdc); - ok(ret, "ReleaseDC failed\n"); - ret = GetObjectType(hdc); - ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); - - hdc = GetWindowDC(hwnd); - ok(hdc != 0, "GetDC failed\n"); - ret = GetObjectType(hdc); - ok(ret == OBJ_DC, "expected OBJ_DC, got %d\n", ret); - ret = DeleteDC(hdc); - ok(ret, "DeleteDC failed\n"); - ret = GetObjectType(hdc); - ok(!ret || broken(ret) /* win9x */, "GetObjectType should fail for a deleted DC\n"); - - DestroyWindow(hwnd); - - ret = UnregisterClassA("Wine own DC", GetModuleHandle(NULL)); - ok(ret, "UnregisterClassA failed\n"); -} - -static void test_boundsrect(void) -{ - HDC hdc; - HBITMAP bitmap; - RECT rect, expect, set_rect; - UINT ret; - - hdc = CreateCompatibleDC(0); - ok(hdc != NULL, "CreateCompatibleDC failed\n"); - bitmap = CreateCompatibleBitmap( hdc, 200, 200 ); - SelectObject( hdc, bitmap ); - - ret = GetBoundsRect(hdc, NULL, 0); - ok(ret == 0, "Expected GetBoundsRect to return 0, got %u\n", ret); - - ret = GetBoundsRect(hdc, NULL, ~0U); - ok(ret == 0, "Expected GetBoundsRect to return 0, got %u\n", ret); - - /* Test parameter handling order. */ - SetRect(&set_rect, 10, 20, 40, 50); - ret = SetBoundsRect(hdc, &set_rect, DCB_SET); - ok(ret & DCB_RESET, - "Expected return flag DCB_RESET to be set, got %u\n", ret); - - ret = GetBoundsRect(hdc, NULL, DCB_RESET); - ok(ret == 0, - "Expected GetBoundsRect to return 0, got %u\n", ret); - - ret = GetBoundsRect(hdc, &rect, 0); - ok(ret == DCB_RESET, - "Expected GetBoundsRect to return DCB_RESET, got %u\n", ret); - SetRect(&expect, 0, 0, 0, 0); - ok(EqualRect(&rect, &expect) || - broken(EqualRect(&rect, &set_rect)), /* nt4 sp1-5 */ - "Expected output rectangle (0,0)-(0,0), got (%d,%d)-(%d,%d)\n", - rect.left, rect.top, rect.right, rect.bottom); - - ret = GetBoundsRect(NULL, NULL, 0); - ok(ret == 0, "Expected GetBoundsRect to return 0, got %u\n", ret); - - ret = GetBoundsRect(NULL, NULL, ~0U); - ok(ret == 0, "Expected GetBoundsRect to return 0, got %u\n", ret); - - ret = SetBoundsRect(NULL, NULL, 0); - ok(ret == 0, "Expected SetBoundsRect to return 0, got %u\n", ret); - - ret = SetBoundsRect(NULL, NULL, ~0U); - ok(ret == 0, "Expected SetBoundsRect to return 0, got %u\n", ret); - - SetRect(&set_rect, 10, 20, 40, 50); - ret = SetBoundsRect(hdc, &set_rect, DCB_SET); - ok(ret == (DCB_RESET | DCB_DISABLE), "SetBoundsRect returned %x\n", ret); - - ret = GetBoundsRect(hdc, &rect, 0); - ok(ret == DCB_SET, "GetBoundsRect returned %x\n", ret); - SetRect(&expect, 10, 20, 40, 50); - ok(EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n", - rect.left, rect.top, rect.right, rect.bottom); - - SetMapMode( hdc, MM_ANISOTROPIC ); - SetViewportExtEx( hdc, 2, 2, NULL ); - ret = GetBoundsRect(hdc, &rect, 0); - ok(ret == DCB_SET, "GetBoundsRect returned %x\n", ret); - SetRect(&expect, 5, 10, 20, 25); - ok(EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n", - rect.left, rect.top, rect.right, rect.bottom); - - SetViewportOrgEx( hdc, 20, 30, NULL ); - ret = GetBoundsRect(hdc, &rect, 0); - ok(ret == DCB_SET, "GetBoundsRect returned %x\n", ret); - SetRect(&expect, -5, -5, 10, 10); - ok(EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n", - rect.left, rect.top, rect.right, rect.bottom); - - SetRect(&set_rect, 10, 20, 40, 50); - ret = SetBoundsRect(hdc, &set_rect, DCB_SET); - ok(ret == (DCB_SET | DCB_DISABLE), "SetBoundsRect returned %x\n", ret); - - ret = GetBoundsRect(hdc, &rect, 0); - ok(ret == DCB_SET, "GetBoundsRect returned %x\n", ret); - SetRect(&expect, 10, 20, 40, 50); - ok(EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n", - rect.left, rect.top, rect.right, rect.bottom); - - SetMapMode( hdc, MM_TEXT ); - SetViewportOrgEx( hdc, 0, 0, NULL ); - ret = GetBoundsRect(hdc, &rect, 0); - ok(ret == DCB_SET, "GetBoundsRect returned %x\n", ret); - SetRect(&expect, 40, 70, 100, 130); - ok(EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n", - rect.left, rect.top, rect.right, rect.bottom); - - if (pSetLayout) - { - pSetLayout( hdc, LAYOUT_RTL ); - ret = GetBoundsRect(hdc, &rect, 0); - ok(ret == DCB_SET, "GetBoundsRect returned %x\n", ret); - SetRect(&expect, 159, 70, 99, 130); - ok(EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n", - rect.left, rect.top, rect.right, rect.bottom); - SetRect(&set_rect, 50, 25, 30, 35); - ret = SetBoundsRect(hdc, &set_rect, DCB_SET); - ok(ret == (DCB_SET | DCB_DISABLE), "SetBoundsRect returned %x\n", ret); - ret = GetBoundsRect(hdc, &rect, 0); - ok(ret == DCB_SET, "GetBoundsRect returned %x\n", ret); - SetRect(&expect, 50, 25, 30, 35); - ok(EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n", - rect.left, rect.top, rect.right, rect.bottom); - - pSetLayout( hdc, LAYOUT_LTR ); - ret = GetBoundsRect(hdc, &rect, 0); - ok(ret == DCB_SET, "GetBoundsRect returned %x\n", ret); - SetRect(&expect, 149, 25, 169, 35); - ok(EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n", - rect.left, rect.top, rect.right, rect.bottom); - } - - /* empty rect resets, except on nt4 */ - SetRect(&expect, 20, 20, 10, 10); - ret = SetBoundsRect(hdc, &set_rect, DCB_SET); - ok(ret == (DCB_SET | DCB_DISABLE), "SetBoundsRect returned %x\n", ret); - ret = GetBoundsRect(hdc, &rect, 0); - ok(ret == DCB_RESET || broken(ret == DCB_SET) /* nt4 */, - "GetBoundsRect returned %x\n", ret); - if (ret == DCB_RESET) - { - SetRect(&expect, 0, 0, 0, 0); - ok(EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n", - rect.left, rect.top, rect.right, rect.bottom); - - SetRect(&expect, 20, 20, 20, 20); - ret = SetBoundsRect(hdc, &set_rect, DCB_SET); - ok(ret == (DCB_RESET | DCB_DISABLE), "SetBoundsRect returned %x\n", ret); - ret = GetBoundsRect(hdc, &rect, 0); - ok(ret == DCB_RESET, "GetBoundsRect returned %x\n", ret); - SetRect(&expect, 0, 0, 0, 0); - ok(EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n", - rect.left, rect.top, rect.right, rect.bottom); - } - - DeleteDC( hdc ); - DeleteObject( bitmap ); -} - -static void test_desktop_colorres(void) -{ - HDC hdc = GetDC(NULL); - int bitspixel, colorres; - - bitspixel = GetDeviceCaps(hdc, BITSPIXEL); - ok(bitspixel != 0, "Expected to get valid BITSPIXEL capability value\n"); - - colorres = GetDeviceCaps(hdc, COLORRES); - ok(colorres != 0 || - broken(colorres == 0), /* Win9x */ - "Expected to get valid COLORRES capability value\n"); - - if (colorres) - { - switch (bitspixel) - { - case 8: - ok(colorres == 18, - "Expected COLORRES to be 18, got %d\n", colorres); - break; - case 16: - ok(colorres == 16, - "Expected COLORRES to be 16, got %d\n", colorres); - break; - case 24: - case 32: - ok(colorres == 24, - "Expected COLORRES to be 24, got %d\n", bitspixel); - break; - default: - ok(0, "Got unknown BITSPIXEL %d with COLORRES %d\n", bitspixel, colorres); - break; - } - } - - ReleaseDC(NULL, hdc); -} - -static void test_gamma(void) -{ - BOOL ret; - HDC hdc = GetDC(NULL); - WORD oldramp[3][256], ramp[3][256]; - INT i; - - ret = GetDeviceGammaRamp(hdc, &oldramp); - if (!ret) - { - win_skip("GetDeviceGammaRamp failed, skipping tests\n"); - goto done; - } - - /* try to set back old ramp */ - ret = SetDeviceGammaRamp(hdc, &oldramp); - if (!ret) - { - win_skip("SetDeviceGammaRamp failed, skipping tests\n"); - goto done; - } - - memcpy(ramp, oldramp, sizeof(ramp)); - - /* set one color ramp to zeros */ - memset(ramp[0], 0, sizeof(ramp[0])); - ret = SetDeviceGammaRamp(hdc, &ramp); - ok(!ret, "SetDeviceGammaRamp succeeded\n"); - - /* set one color ramp to a flat straight rising line */ - for (i = 0; i < 256; i++) ramp[0][i] = i; - ret = SetDeviceGammaRamp(hdc, &ramp); - todo_wine ok(!ret, "SetDeviceGammaRamp succeeded\n"); - - /* set one color ramp to a steep straight rising line */ - for (i = 0; i < 256; i++) ramp[0][i] = i * 256; - ret = SetDeviceGammaRamp(hdc, &ramp); - ok(ret, "SetDeviceGammaRamp failed\n"); - - /* try a bright gamma ramp */ - ramp[0][0] = 0; - ramp[0][1] = 0x7FFF; - for (i = 2; i < 256; i++) ramp[0][i] = 0xFFFF; - ret = SetDeviceGammaRamp(hdc, &ramp); - ok(!ret, "SetDeviceGammaRamp succeeded\n"); - - /* try ramps which are not uniform */ - ramp[0][0] = 0; - for (i = 1; i < 256; i++) ramp[0][i] = ramp[0][i - 1] + 512; - ret = SetDeviceGammaRamp(hdc, &ramp); - ok(ret, "SetDeviceGammaRamp failed\n"); - ramp[0][0] = 0; - for (i = 2; i < 256; i+=2) - { - ramp[0][i - 1] = ramp[0][i - 2]; - ramp[0][i] = ramp[0][i - 2] + 512; - } - ret = SetDeviceGammaRamp(hdc, &ramp); - ok(ret, "SetDeviceGammaRamp failed\n"); - - /* cleanup: set old ramp again */ - ret = SetDeviceGammaRamp(hdc, &oldramp); - ok(ret, "SetDeviceGammaRamp failed\n"); - -done: - ReleaseDC(NULL, hdc); -} - -START_TEST(dc) -{ - pSetLayout = (void *)GetProcAddress( GetModuleHandle("gdi32.dll"), "SetLayout"); - test_savedc(); - test_savedc_2(); - test_GdiConvertToDevmodeW(); - test_CreateCompatibleDC(); - test_DC_bitmap(); - test_DeleteDC(); - test_boundsrect(); - test_desktop_colorres(); - test_gamma(); -} diff --git a/rostests/winetests/gdi32/dib.c b/rostests/winetests/gdi32/dib.c deleted file mode 100644 index e8694bbf01b..00000000000 --- a/rostests/winetests/gdi32/dib.c +++ /dev/null @@ -1,1394 +0,0 @@ -/* - * DIB driver tests. - * - * Copyright 2011 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 - */ - -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "wincrypt.h" - -#include "wine/test.h" - -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - -static HCRYPTPROV crypt_prov; -static DWORD (WINAPI *pSetLayout)(HDC hdc, DWORD layout); - -static const DWORD rop3[256] = -{ - 0x000042, 0x010289, 0x020C89, 0x0300AA, 0x040C88, 0x0500A9, 0x060865, 0x0702C5, - 0x080F08, 0x090245, 0x0A0329, 0x0B0B2A, 0x0C0324, 0x0D0B25, 0x0E08A5, 0x0F0001, - 0x100C85, 0x1100A6, 0x120868, 0x1302C8, 0x140869, 0x1502C9, 0x165CCA, 0x171D54, - 0x180D59, 0x191CC8, 0x1A06C5, 0x1B0768, 0x1C06CA, 0x1D0766, 0x1E01A5, 0x1F0385, - 0x200F09, 0x210248, 0x220326, 0x230B24, 0x240D55, 0x251CC5, 0x2606C8, 0x271868, - 0x280369, 0x2916CA, 0x2A0CC9, 0x2B1D58, 0x2C0784, 0x2D060A, 0x2E064A, 0x2F0E2A, - 0x30032A, 0x310B28, 0x320688, 0x330008, 0x3406C4, 0x351864, 0x3601A8, 0x370388, - 0x38078A, 0x390604, 0x3A0644, 0x3B0E24, 0x3C004A, 0x3D18A4, 0x3E1B24, 0x3F00EA, - 0x400F0A, 0x410249, 0x420D5D, 0x431CC4, 0x440328, 0x450B29, 0x4606C6, 0x47076A, - 0x480368, 0x4916C5, 0x4A0789, 0x4B0605, 0x4C0CC8, 0x4D1954, 0x4E0645, 0x4F0E25, - 0x500325, 0x510B26, 0x5206C9, 0x530764, 0x5408A9, 0x550009, 0x5601A9, 0x570389, - 0x580785, 0x590609, 0x5A0049, 0x5B18A9, 0x5C0649, 0x5D0E29, 0x5E1B29, 0x5F00E9, - 0x600365, 0x6116C6, 0x620786, 0x630608, 0x640788, 0x650606, 0x660046, 0x6718A8, - 0x6858A6, 0x690145, 0x6A01E9, 0x6B178A, 0x6C01E8, 0x6D1785, 0x6E1E28, 0x6F0C65, - 0x700CC5, 0x711D5C, 0x720648, 0x730E28, 0x740646, 0x750E26, 0x761B28, 0x7700E6, - 0x7801E5, 0x791786, 0x7A1E29, 0x7B0C68, 0x7C1E24, 0x7D0C69, 0x7E0955, 0x7F03C9, - 0x8003E9, 0x810975, 0x820C49, 0x831E04, 0x840C48, 0x851E05, 0x8617A6, 0x8701C5, - 0x8800C6, 0x891B08, 0x8A0E06, 0x8B0666, 0x8C0E08, 0x8D0668, 0x8E1D7C, 0x8F0CE5, - 0x900C45, 0x911E08, 0x9217A9, 0x9301C4, 0x9417AA, 0x9501C9, 0x960169, 0x97588A, - 0x981888, 0x990066, 0x9A0709, 0x9B07A8, 0x9C0704, 0x9D07A6, 0x9E16E6, 0x9F0345, - 0xA000C9, 0xA11B05, 0xA20E09, 0xA30669, 0xA41885, 0xA50065, 0xA60706, 0xA707A5, - 0xA803A9, 0xA90189, 0xAA0029, 0xAB0889, 0xAC0744, 0xAD06E9, 0xAE0B06, 0xAF0229, - 0xB00E05, 0xB10665, 0xB21974, 0xB30CE8, 0xB4070A, 0xB507A9, 0xB616E9, 0xB70348, - 0xB8074A, 0xB906E6, 0xBA0B09, 0xBB0226, 0xBC1CE4, 0xBD0D7D, 0xBE0269, 0xBF08C9, - 0xC000CA, 0xC11B04, 0xC21884, 0xC3006A, 0xC40E04, 0xC50664, 0xC60708, 0xC707AA, - 0xC803A8, 0xC90184, 0xCA0749, 0xCB06E4, 0xCC0020, 0xCD0888, 0xCE0B08, 0xCF0224, - 0xD00E0A, 0xD1066A, 0xD20705, 0xD307A4, 0xD41D78, 0xD50CE9, 0xD616EA, 0xD70349, - 0xD80745, 0xD906E8, 0xDA1CE9, 0xDB0D75, 0xDC0B04, 0xDD0228, 0xDE0268, 0xDF08C8, - 0xE003A5, 0xE10185, 0xE20746, 0xE306EA, 0xE40748, 0xE506E5, 0xE61CE8, 0xE70D79, - 0xE81D74, 0xE95CE6, 0xEA02E9, 0xEB0849, 0xEC02E8, 0xED0848, 0xEE0086, 0xEF0A08, - 0xF00021, 0xF10885, 0xF20B05, 0xF3022A, 0xF40B0A, 0xF50225, 0xF60265, 0xF708C5, - 0xF802E5, 0xF90845, 0xFA0089, 0xFB0A09, 0xFC008A, 0xFD0A0A, 0xFE02A9, 0xFF0062 -}; - -static inline BOOL rop_uses_src(DWORD rop) -{ - return (((rop & 0xcc0000) >> 2) != (rop & 0x330000)); -} - -static const char *sha1_graphics_a8r8g8b8[] = -{ - "a3cadd34d95d3d5cc23344f69aab1c2e55935fcf", - "2426172d9e8fec27d9228088f382ef3c93717da9", - "9e8f27ca952cdba01dbf25d07c34e86a7820c012", - "664fac17803859a4015c6ae29e5538e314d5c827", - "17b2c177bdce5e94433574a928bda5c94a8cdfa5", - "fe6cc678fb13a3ead67839481bf22348adc69f52", - "d51bd330cec510cdccf5394328bd8e5411901e9e", - "df4aebf98d91f11be560dd232123b3ae327303d7", - "f2af53dd073a09b1031d0032d28da35c82adc566", - "eb5a963a6f7b25533ddfb8915e70865d037bd156", - "c387917268455017aa0b28bed73aa6554044bbb3", - "dcae44fee010dbf7a107797a503923fd8b1abe2e", - "6c530622a025d872a642e8f950867884d7b136cb", - "7c07d91b8f68fb31821701b3dcb96de018bf0c66", - "b2261353decda2712b83538ab434a49ce21f3172", - "35f731c0f6356b8f30651bb3cbe0d922c49deba5", - "9b9874c1c1d92afa554137e191d34ea33acc322f", - "c311dd74325e8cebfc8529a6d24a6fa4ecb7137e", - "d7398de15b2837a58a62a701ca1b3384625afec4", - "a78b28472bb7ff480ddedd06b9cf2daa775fa7ae", - "5246ef357e7317b9d141a3294d300c195da76cb7", - "87f6b6a19f021ca5912d285e14ce2ff9474d79f3", - "e2a8eef4aeda3a0f6c950075acba38f1f9e0814d", - "8b66f14d51ecdeea12bc993302bb9b7d3ec085a1", - "7da9dd3d40d44d92deb9883fb7110443c2d5769a", - "e358efb1c11172e40855de620bdb8a8e545cd790", - "9e0c2596c6ecb4f1bc97b18ec3ca493d37626608", - "58806549380c964e7a53ad54821d2eb86fa5b9ce", - "7fc30d3058c235ce39088de0a598b8c7fe7ca61f", - "52a6c769c227f2bb1949097c4c87fed5ee0cbcb1", - "8a010d4c5af51fcc34d51be3197878782bdf63e7", - "c84c2c33e22eb7e5c4a2faad3b3b99a359d77528", - "41bcc1f57c60bdec3c4d1e749084a12867f91224", - "94645300d6eb51020a7ef8261dee2941cd51b5df", - "c56f5bdc9cac4f0bc81c33295d9aed8eaf4cb1f2", - "21cdfde38ac7edbb241ec83d82f31286e90c4629", - NULL -}; - -static const char *sha1_graphics_a8b8g8r8[] = -{ - "a3cadd34d95d3d5cc23344f69aab1c2e55935fcf", - "e0bc877697093ed440e125154e247ca9d65e933c", - "c6d7faf5a502299f99d59eef3f7650bd63dbe108", - "9d8c05c3ebd786e7d052418e905a80a64bf7853d", - "3da12af0a810fd993fa3dbe23328a4fcd2b6c92a", - "b91c8f21cc4d7994abc551feff5b6927d267a9db", - "d49dd2c6a37e975b6dc3d201ccc217a788b30284", - "ca6753f9eb44529cf8c67cd6abcd4ed1ef758904", - "18c3ae944e0afb6c43c21cde093ddb22a27611e4", - "b753ebb39d90210cc717f57b53dd439f7de6b077", - "38c017dd1fff26b492a57e09f3ce2c4370faf225", - "94368cea5033b435454daa56d55546310675131e", - "bf57a6a37fb107d29ed3d45695919887abcb7902", - "3db0f8bcca3d94920aa57be6321202b8c3c08822", - "1f1fc165a4dae7ba118ddccb58a279bfe3876b0a", - "8e09abb108e137c99527ab4c9bd07d95b9254bbb", - "b0178632775d29bec2b16de7b9b8287115c40d0f", - "ca7e859647b9498b53fdd92543ad8aea98ff46f3", - "3369889a67d6c79a24ee15f7d14374f9995215e4", - "473a1fd07df800c87a5d3286b642ace10c61c6af", - "10cd25a0ed5cd8f978d7d68236f81d949b938e84", - "b8951d2b20518fd129e5113a5f429626893913bf", - "4851c5b7d5bc18590e787c0c218a592ef504e738", - "9aa506e3df33e0d5298755aa4144e10eb4b5adcf", - "abdf003699364fe45fab7dc61e67c606d0063b40", - "89abaadff4e68c738cf9251c51e3609564843381", - "f6aa3f907f620b9f3493f03cb3b4b292df3a9545", - "77d0ad32938147aa4038c1eced232b7b5a5f88f3", - "43d36e57b702ce56eb250bf53f1ecc4680990cfe", - "fd6e0ebb52710ebcdd8dd69931165c83c4930b41", - "71b9756fdfeedce1e6db201176d21a981b881662", - "5319528d9af750c172ae62ee85ddb2eaef73b193", - "b7ce8aa3c328eedaed7306234ed9bae67708e627", - "19b32a0daa91201725b5e13820c343d0a84ff698", - "abca6a80a99b05722d2d87ce2a8b94ef1ae549e1", - "2ba70994d0b4ce87fdf6fbc33ada11252178061e", - NULL -}; - -static const char *sha1_graphics_24[] = -{ - "e993b15c9bd14fb45a15310450b7083c44e42665", - "edbd7bab3d957fbc85e89612197cf918f5f5af20", - "6a7efb3b6e0b49336df1bd2937ca09a11d976531", - "236eb5ca9da70ec7cc719cd2fd291bab14000257", - "f98023c7cd8c068f2d7a77ce3600004b90ea12d6", - "5c4cb9cea2226fc671bb4a11f8253343ee94bb4b", - "fd4be592483623dbc800fe28210a1f0daa71999b", - "788b8de98c47974fa9f232a6042ae4ca546ddb7d", - "a8772e6c44ba633fb384a7c4b50b435f1406107e", - "883bc8f305c602edca785e21cd00f488583fb13f", - "3bac4e80993f49dc3926e30524115fca9d7a8026", - "91369e35be29059a0665782541db4c8b324c6bb2", - "0fa8cf332a56bb6d7e14e85861fdd60f51d70501", - "593d694cdcc8349b3bfc8257041dbcb27e61da45", - "1036b91d93e31cd1d4740d0c8642e115e5a38188", - "1898073cdb35ca4d2b21bba933ac16a0b4297317", - "5068bff794553cf5a3145ae407c9a2984357844c", - "413a7989969c229dee4ab1798362f32f96cf0a10", - "0bb222e540b82720d4971e4a2fc626899af03e03", - "adc20832d8c43f1cf372d8392535492013cd2306", - "45649794dcbcabda487f66f7a80fc1bec79047a1", - "367c2dc1e91ff9ea0e984d6fb3000cfb4e0ae7e9", - "b4df692ac70a5f9f303270df4641ab014c6cbf46", - "8bc3128ba47891366fd7b02fde7ca19100e64b9f", - "e649e00efe7fea1eb8b17f7867fe089e5270c44b", - "a0bffbbfb0adf6f188479c88da04e25d76ab4822", - "92a1ab214dd8027c407814420449119466c92840", - "b58f19c1800344a2b8e017eb784705bdb2bd8450", - "5747a6d5c6ce79731c55e8cf33f7da3025cd35fd", - "955390669afed2369b15b32fa519f2f921cdf1a0", - "201906f7d763b930a98c97f8eeab417f2b65e723", - "5313357d50c40c05a3b3a83d0d2013a138c955a1", - "701c5af1d0c28294ce7d804b5697643c430d22a0", - "b0a959745b2db1d9f449e68e4479a4f36301879c", - "63f764b9bd2f4876ab1ee0f3c0eb55b5a7de5212", - "e171f6ec77bca91d6b8559911bce296c0bac469e", - NULL -}; - -static const char *sha1_graphics_r5g5b5[] = -{ - "2a2ab8b3c019e70b788ade028b0e9e53ffc529ae", - "847005cf7371f511bcc837251cde07b1796f6113", - "a8f75743a930843ec14d516cd048b6e0468e5d89", - "d094f51ce9b9daa9c1d9594ea88be2a2db651459", - "cf3928e240c9149788e1635b115a4e5baea0dd8f", - "a9034a905daa91757b4f63345c0e40638cd53ca8", - "15ee915d989e49bb9bab5b834d8f355bd067cd8f", - "99474fecf11df7b7035c35be6b8b697be9889418", - "cbc2898717f97ebb07c0c7cc04abde936dc5b584", - "29c896b591fdf4ddd23e5c0da1818c37e4686d94", - "4b5b275d33c1ebfe5bdc61df2ad125e865b800fa", - "92df731fa1f89550d9d4f7ea36c13f2e57c4b02a", - "420e39ff3bdd04c4b6cc2c98e99cb7993c7a0de5", - "1fabf0fdd046857b1974e31c1c1764fa9d1a762f", - "449092689226a1172b6086ba1181d6b6d6499f26", - "1a92a60f190d33ef06d9decb56fd3fdd33f3af03", - "e61f5978c2e28c0c6d8f5eefe0f840c975586efc", - "897d16f4d6a6ddad685d23ed7828d4f676539b75", - "9d21bcfdeaf1ca5d47eb823bdefc24d7a95f4f56", - "6daaf945a955928c5c124c880522ca4634fb2343", - "12a288390d16e1efa99d4185301de48a4d433b14", - "ea92af2538b76f41a3a03eaa11ac395c9b6197c4", - "3a50ce21b3563a604b4fc9f247a30f5a981f1ba6", - "d7d97e28ed316f6596c737eb83baa5948d86b673", - "ecc2991277d7314f55b00e0f284ae3703aeef81e", - "656bf3b7121bcd620a0a3ad488f0d66604824577", - "d7d8493b5fa7a3a8323d6ac84245093a79f052c1", - "df5dafe96e528c2cc7fd11e4934e298f53cec34b", - "a49530722328ae88fd765792ac0c657efbcce75d", - "aa46aa2226e3121eaefa9d0836418e0b69262d69", - "333f3f2cf3ff15736d59f92a33c45323d3987d6d", - "a6fd83542c3826132e88d3f5e304d604c0056fad", - "a8d6a5285a927ba3a3be34b06a06c70a20d4c1b3", - "e428d213ad02651287894f093413949dcb369208", - "7df915bedcc5951a1b6f828490f7dbb93212e835", - NULL -}; - -static const char *sha1_graphics_r4g4b4[] = -{ - "2a2ab8b3c019e70b788ade028b0e9e53ffc529ae", - "cfa0ab83ee93283ad914c3748f0532da1697af1d", - "8bd18697d1ef27492805667a0bc956343ac08667", - "e8501c830321584474654f90e40eaf27dc21e6a8", - "d95ab10fcfb8447b41742e89f1ae8cd297a32fc4", - "821177710961d2cb5f7e7dfc0e06e767b6042753", - "667124365ffadeea1d8791bedda77a0c7b898de8", - "c9f23e684b600dea17575b4b17175fbd9106c3a9", - "7678876e50eae35d1eaa096aae25afaa0b864bf3", - "fb52b0c373a5f2a60b981604b120962942d2447a", - "5ab8dd07436681d762fa04ad7c6d71291c488924", - "0167981d9e1490a2ebd396ff7582f0943aa8e1b8", - "115a6bd382410a4a1d3c1fa71d8bf02536863e38", - "65c6d1228e3b6d63d42647f14217bc1658b70d9a", - "25fcb75aa687aac35b8f72640889fe92413e00c5", - "3bddf9d53e89560b083302b146cd33791b13d941", - "a81504498c7a7bb46340ce74476a42f70f2730b1", - "e61a4f2657a444d8c49f84fb944f9f847667bf2b", - "32b6e0aa79b7e96cd0ab2da167f6463c011023a8", - "1d283aa4d2b2114f7809fe59357d590c7c779aa7", - "29640e2ddd2d3016da14507c3ce9b2ce32f39bb4", - "57ebf8becac1524543da120e88e9cc57ecfdec49", - "d591232bbc2592462c819a9486750f64180518fd", - "0e183a4c30b3da345129cffe33fe0fc593d8666b", - "f14d9a4bd8a365b7c8f068a0dad481b6eb2b178b", - "8933450132bf949ba4bc28626968425b5ed2867d", - "9928a8f28a66c00069a124f7171b248817005763", - "e4a9dcc3e565cd3a6b7087dd1433f3898bb9cdb2", - "eca4f9b16b3bddfd0735fdd792e0ccaadfb9ba49", - "233e588cf660e2c9b552cf02065cf63fa6655864", - "0740ff74dcd259d9a644ba51ad77ff0d40348951", - "a3345acaf272f2e288626906e3056cd0ced70499", - "957a86fbe8a96dd068db65e4e624a52bcc84af46", - "13b0f240054dc57ba0e2dfde74048496304a2c7f", - "51ef267eb9c15487c9430f505e8a6c929eb2170c", - NULL -}; - -static const char *sha1_graphics_8[] = -{ - "41728d7ff2bb425b5fc06521adeabf6cc73136f3", - "512246d4886ab889a090b167ba194577cb95272e", - "921e852d4564cb9e5ac15ff68b5207bebea871d1", - "9636b0ebefc443ea11949ccd28f6ca454277dd41", - "aa9050da55e6b6957c60b7d603fce539cb5c0048", - "e2b93aca15fb1233ac09a713dced1f4cd950b1e4", - "3e3a603fc26cc305aa27f88da7d2a3b0073877d8", - "390b2bf70daba36310683f46af9cd50b9a061396", - "82d21737e9a7247397a6c983a9b6d9a0452dd74d", - "2a8460af91675e01cbe9384eb6cd3eb2cb420960", - "1af53b1218ee9844fcda891b836d42f6b2f66bd5", - "da1cc34a9d9b779fc7849e03e214096026506464", - "5ba8f99ca034666effa556748c49a0f5a015125f", - "b67ba2f55659c75ac72c1112494461bb3086e1a4", - "73e2859ce849f756f954718ce3c90f02e31712b6", - "b1dff0f5dd233b44ee568878c5d3f8ae1d80c6d9", - "1f27dc1a1316fb7a4a78fe40fcd4bdae3aaad218", - "6e375e1485a1e45ac6ab10af49645d5fb2e76dff", - "cfc67c325c7cdf96d90af9b3cceb8d0504cbb3b0", - "7262364067e03c7fa498af1d59d228d6c63b460e", - "5241241a355a667ef0834049adf4218e8b3f16b8", - "db22d666690948eb966f75b796c72c7150a5c4b9", - "1f13ea0034db4b0ffa4ddcff9664fd892058f9cd", - "3caf512cfddfd463d0750cfe3cadb58548eb2ae8", - "4e5e7d5fd64818b2b3d3e793c88f603b699d2f0f", - "c4efce8f7ed2d380ea5dc6fe1ef8448a27827532", - "bdc0a354635b879871077c5b712570e469863c99", - "d599bf210423fe3adbb4f1de87d9360de97827d0", - "bae7c8b789e4e9b336c03c4daee3bce63fe039d9", - "cc01f17928f7780cefd423ea653b072eea723a1b", - "c005662a47f14c2f1b7c7fb3b0ef0fc390c6ea6a", - "675cde16a6ad2bcd8d7e72780b07a0ccd8d0393a", - "ea39ac62ca2f815a1d029340c6465994b6f03cb0", - "9a603513cd81acf70cf8b27b0d544e7f672e9d40", - "f4a334e69535de74ee5ed54be93a75120a66e54a", - NULL -}; - -static const char *sha1_graphics_4[] = -{ - "fa867e2976a549ecd3b1fa67df54963232fcef8c", - "256d742b4da96b373b4fa5663d0ad3b5faab5c8e", - "d96d8f4232b930bccd53b903b5efaf8c0bdb16f4", - "9401799e6116c35e5f0e5bdca07ea25316757a72", - "482ae2b0ef1d64752b5ef11cc7f35a33eb55d07c", - "dcfb3e01100b41c0f75a1c5f84b6de6b90138281", - "2505598845fa026ea7187582461efbf06cb6904f", - "3981a19363beca8f28d32a5928ac296fd22a5296", - "01404024ebb2c266d17d734059524d874491650f", - "c87bbff3f83b8ec11bb03cfa9bc9ee5166c4c7ef", - "f35c5d62853be78c5d39fb2f45200dc262aa8e18", - "46e94a55f5f58a6b915078d8ffdc725f53aab516", - "665bbbc749a5ffeedc0d62aef0661a5ce845b017", - "1f26a01730f67d40ea711a50d9d801bac15a642e", - "3b53d24178cfacba53103a44dfd5d072b15a6781", - "c52cfd57f26037723d37192722fc3a217f280c9e", - "e34da6500cf2e424d980714d92737cf6c31a7bda", - "d17f4358ae529f920960ed89e535902ee13b0033", - "0f44e12ecd1ea7e39433890443626d4fc35204a4", - "eb38683e812fd13dca971ba8f4cfd2b6820d3524", - "73bbc83f88f1aaa6df0158b63e70bb3165163163", - "0dc2690a5c58a2907a8ab06693ebfab6698172eb", - "39c16648cf6c261be71a33cec41867f28e119b94", - "26ad5116562e7b58c76a26eaf521e2e40899e944", - "1bcc54eaf8e3c2b7c59ecccb23c240181d7ba8b8", - "4f827ca6927f15191588456f985bf29d2a3b3c24", - "e7de769c3d12ea9dd223bef4881c578823bec67e", - "6fb102d020e5554116feefc8482104f3ae2036d2", - "ae546ffd30b837afc7dfcb5c9ce4f01d15b35ddc", - "20c9eb3276c08fdce35755e349bec94b04929812", - "628d837163a25c6520f19c0602383176dbad528e", - "b5a12cff7100290ad43f5ed17a321b42de048893", - "b672afbeeafb44194a821f0def81a8892872937e", - "db0124045882b598feea192186cf7eb7a0387866", - "602d91471378fe24a2d0248bd8a92b624f099fea", - NULL -}; - -static const char *sha1_graphics_1[] = -{ - "23366004515f3bc46796ea505d748f8d0f97fbe1", - "ad674a4104c6a1eacaee8f20effdfe31775b4409", - "a7cc69f957d7b533a0a330859a143d701daac73c", - "a955bf088c5edb129289ce65caace48ec95632e4", - "5316d3c558c254479883133cf58cd07ab521d3f0", - "fcbfdb5d60716ea05f2d1896fae7a6e7a8249d35", - "2c140b39cc8d21358fded8959cd655f03d7f0f89", - "121423a38b4ac4743bd516e0a7e88a3863796313", - "7c17635c6c7f62dbf8fd4773d0c503358553d2c7", - "21d5d9e47bb07de2cf7bc99b7725390d03a6cde6", - "f69ee65ea25676429a28eea79b5b9cb9206b8d01", - "39ff81f77ef4ee772367ed1a63785987c060126e", - "4c686508a994ca4c7a0a73b8c0fe52423c180d9c", - "b0cc1f5e244ae0c0835a9866a46abdfcd56d1cb1", - "7ddf19df5bbdf4475b6ec1bc042425e382502864", - "144c9a846e5e37ac6efd5ed3a97ec231479e8fca", - "c5ffc59048bf786b5646ad6226cd8633965de9ef", - "40fadc2d24c713b04ff96f7dc26e70e85f26c55e", - "400a21caa01e015096ee1afcf1b54e7f8ec515bd", - "0ff4b49797e30e3555aab45219adf449a9a560ff", - "280327328ca940c212ce24fe72e0b00014072767", - "144c9a846e5e37ac6efd5ed3a97ec231479e8fca", - "b85463875f755b85f1464b1b6275912bcbad6c9f", - "816f200969feecc788b61dfeecf05b1790984401", - "a4964d8bbf80fe785f906bc0f7c5b113242a58fc", - "a5d204cc7342d40b765ca042f8668e22601c4ff9", - "adb2818f6d3845dd140bc0f9abdbaa89d2a8c3de", - "0a76e0121facb103857130bc6e12185ad77fc3fa", - "02aede714773d654d0fc2f640afaa133ec718ad5", - "13cc63972aee4f6ae27091a8af18de01f1d3a5da", - "3bb745ccb08402ce6fac6ee26fb8d7aad2dba27e", - "b26699f62661e16a1dc452d24c88ce363a1f2998", - "4d95c3d1e170f004c80aa8c52feafb8e0e90760e", - "c14832e69ec3585c15987b3d69d5007236fa9814", - "e44ea620b0c47125a34193537ab9d219a52ad028", - "d1e6091caa4482d3142df3b958606c41ebf4698e", - "07c1116d8286fb665a1005de220eadc3d5999aaf", - "4afb0649488f6e6f7d3a2b8bf438d82f2c88f4d1", - "f2fe295317e795a88edd0b2c52618b8cb0e7f2ce", - "ffc78c075d4be66806f6c59180772d5eed963dc0", - "c86eeaeed09871dee4b43722ba512d2d3af7f4d0", - "24b1a6241c81dbb950cfbe5da6798fd59eb36266", - "1007d3b531b4bc3553d4547bc88443fc1f497cf6", - "b71ca46be287598f716bb04fac0a52ad139c70db", - "6589e48498e30ab036fbfe94d73427b2b1238a69", - "4dce919117d2e41df9f5d4d0de14f97ae650046d", - "22c2e078f69d73b7a5cb3f7dcbb8fbaa007ef3ac", - "be36cda370650e6d5fb0570aeb8ced491d0c2b1c", - "4c34cb8e47f9ff4b4348aa2d40cce7cb54d65cb0", - "18f4497e43903e8df5b27da4ceebf62b15550a87", - NULL -}; - -static inline DWORD get_stride(BITMAPINFO *bmi) -{ - return ((bmi->bmiHeader.biBitCount * bmi->bmiHeader.biWidth + 31) >> 3) & ~3; -} - -static inline DWORD get_dib_size(BITMAPINFO *bmi) -{ - return get_stride(bmi) * abs(bmi->bmiHeader.biHeight); -} - -static char *hash_dib(BITMAPINFO *bmi, void *bits) -{ - DWORD dib_size = get_dib_size(bmi); - HCRYPTHASH hash; - char *buf; - BYTE hash_buf[20]; - DWORD hash_size = sizeof(hash_buf); - int i; - static const char *hex = "0123456789abcdef"; - - if(!crypt_prov) return NULL; - - if(!CryptCreateHash(crypt_prov, CALG_SHA1, 0, 0, &hash)) return NULL; - - CryptHashData(hash, bits, dib_size, 0); - - CryptGetHashParam(hash, HP_HASHVAL, NULL, &hash_size, 0); - if(hash_size != sizeof(hash_buf)) return NULL; - - CryptGetHashParam(hash, HP_HASHVAL, hash_buf, &hash_size, 0); - CryptDestroyHash(hash); - - buf = HeapAlloc(GetProcessHeap(), 0, hash_size * 2 + 1); - - for(i = 0; i < hash_size; i++) - { - buf[i * 2] = hex[hash_buf[i] >> 4]; - buf[i * 2 + 1] = hex[hash_buf[i] & 0xf]; - } - buf[i * 2] = '\0'; - - return buf; -} - -static void compare_hash_broken_todo(BITMAPINFO *bmi, BYTE *bits, const char ***sha1, const char *info, int num_broken, BOOL todo) -{ - char *hash = hash_dib(bmi, bits); - BOOL ok_cond; - int i; - - if(!hash) - { - skip("SHA1 hashing unavailable on this platform\n"); - return; - } - - for(i = 0; i <= num_broken; i++) - { - if((*sha1)[i] == NULL) - { - ok((*sha1)[i] != NULL, "missing hash, got \"%s\",\n", hash); - return; - } - } - - ok_cond = !strcmp(hash, **sha1); - - for(i = 1; i <= num_broken; i++) - ok_cond = ok_cond || broken( !strcmp(hash, (*sha1)[i]) ); - - if(todo) - todo_wine ok( ok_cond, "%d: %s: expected hash %s got %s\n", - bmi->bmiHeader.biBitCount, info, **sha1, hash ); - else - ok( ok_cond, "%d: %s: expected hash %s got %s\n", - bmi->bmiHeader.biBitCount, info, **sha1, hash ); - - *sha1 += num_broken + 1; - - HeapFree(GetProcessHeap(), 0, hash); -} - -static void compare_hash(BITMAPINFO *bmi, BYTE *bits, const char ***sha1, const char *info) -{ - compare_hash_broken_todo(bmi, bits, sha1, info, 0, FALSE); -} - -static const RECT bias_check[] = -{ - {100, 100, 200, 150}, - {100, 100, 150, 200}, - {100, 100, 50, 200}, - {100, 100, 0, 150}, - {100, 100, 0, 50}, - {100, 100, 50, 0}, - {100, 100, 150, 0}, - {100, 100, 200, 50} -}; - -static const RECT hline_clips[] = -{ - {120, 120, 140, 120}, /* unclipped */ - {100, 122, 140, 122}, /* l edgecase */ - { 99, 124, 140, 124}, /* l edgecase clipped */ - {120, 126, 200, 126}, /* r edgecase */ - {120, 128, 201, 128}, /* r edgecase clipped */ - { 99, 130, 201, 130}, /* l and r clipped */ - {120, 100, 140, 100}, /* t edgecase */ - {120, 99, 140, 99}, /* t edgecase clipped */ - {120, 199, 140, 199}, /* b edgecase */ - {120, 200, 140, 200}, /* b edgecase clipped */ - {120, 132, 310, 132}, /* inside two clip rects */ - { 10, 134, 101, 134}, /* r end on l edgecase */ - { 10, 136, 100, 136}, /* r end on l edgecase clipped */ - {199, 138, 220, 138}, /* l end on r edgecase */ - {200, 140, 220, 140} /* l end on r edgecase clipped */ -}; - -static const RECT vline_clips[] = -{ - {120, 120, 120, 140}, /* unclipped */ - {100, 120, 100, 140}, /* l edgecase */ - { 99, 120, 99, 140}, /* l edgecase clipped */ - {199, 120, 199, 140}, /* r edgecase */ - {200, 120, 200, 140}, /* r edgecase clipped */ - {122, 99, 122, 201}, /* t and b clipped */ - {124, 100, 124, 140}, /* t edgecase */ - {126, 99, 126, 140}, /* t edgecase clipped */ - {128, 120, 128, 200}, /* b edgecase */ - {130, 120, 130, 201}, /* b edgecase clipped */ - {132, 12, 132, 140}, /* inside two clip rects */ - {134, 90, 134, 101}, /* b end on t edgecase */ - {136, 90, 136, 100}, /* b end on t edgecase clipped */ - {138, 199, 138, 220}, /* t end on b edgecase */ - {140, 200, 140, 220} /* t end on b edgecase clipped */ -}; - -static const RECT line_clips[] = -{ - { 90, 110, 310, 120}, - { 90, 120, 295, 130}, - { 90, 190, 110, 240}, /* totally clipped, moving outcodes */ - { 90, 130, 100, 135}, /* totally clipped, end pt on l edge */ - { 90, 132, 101, 137}, /* end pt just inside l edge */ - {200, 140, 210, 141}, /* totally clipped, start pt on r edge */ - {199, 142, 210, 143} /* start pt just inside r edge */ -}; - -static const RECT patblt_clips[] = -{ - {120, 120, 140, 126}, /* unclipped */ - {100, 130, 140, 136}, /* l edgecase */ - { 99, 140, 140, 146}, /* l edgecase clipped */ - {180, 130, 200, 136}, /* r edgecase */ - {180, 140, 201, 146}, /* r edgecase clipped */ - {120, 100, 130, 110}, /* t edgecase */ - {140, 99, 150, 110}, /* t edgecase clipped */ - {120, 180, 130, 200}, /* b edgecase */ - {140, 180, 150, 201}, /* b edgecase */ - {199, 150, 210, 156}, /* l edge on r edgecase */ - {200, 160, 210, 166}, /* l edge on r edgecase clipped */ - { 90, 150, 101, 156}, /* r edge on l edgecase */ - { 90, 160, 100, 166}, /* r edge on l edgecase clipped */ - {160, 90, 166, 101}, /* b edge on t edgecase */ - {170, 90, 176, 101}, /* b edge on t edgecase clipped */ - {160, 199, 166, 210}, /* t edge on b edgecase */ - {170, 200, 176, 210}, /* t edge on b edgecase clipped */ -}; - -static const RECT rectangles[] = -{ - {10, 11, 100, 101}, - {250, 100, 350, 10}, - {120, 10, 120, 20}, /* zero width */ - {120, 10, 130, 10}, /* zero height */ - {120, 40, 121, 41}, /* 1 x 1 */ - {130, 50, 132, 52}, /* 2 x 2 */ - {140, 60, 143, 63}, /* 3 x 3 */ - {150, 70, 154, 74}, /* 4 x 4 */ - {120, 20, 121, 30}, /* width == 1 */ - {130, 20, 132, 30}, /* width == 2 */ - {140, 20, 143, 30}, /* width == 3 */ - {200, 20, 210, 21}, /* height == 1 */ - {200, 30, 210, 32}, /* height == 2 */ - {200, 40, 210, 43} /* height == 3 */ -}; - -static const BITMAPINFOHEADER dib_brush_header_8888 = {sizeof(BITMAPINFOHEADER), 16, -16, 1, 32, BI_RGB, 0, 0, 0, 0, 0}; -static const BITMAPINFOHEADER dib_brush_header_24 = {sizeof(BITMAPINFOHEADER), 16, -16, 1, 24, BI_RGB, 0, 0, 0, 0, 0}; -static const BITMAPINFOHEADER dib_brush_header_555 = {sizeof(BITMAPINFOHEADER), 16, -16, 1, 16, BI_RGB, 0, 0, 0, 0, 0}; -static const BITMAPINFOHEADER dib_brush_header_8 = {sizeof(BITMAPINFOHEADER), 16, -16, 1, 8, BI_RGB, 0, 0, 0, 0, 0}; -static const BITMAPINFOHEADER dib_brush_header_4 = {sizeof(BITMAPINFOHEADER), 16, -16, 1, 4, BI_RGB, 0, 0, 0, 0, 0}; -static const BITMAPINFOHEADER dib_brush_header_1 = {sizeof(BITMAPINFOHEADER), 16, -16, 1, 1, BI_RGB, 0, 0, 0, 0, 0}; - -static void draw_graphics(HDC hdc, BITMAPINFO *bmi, BYTE *bits, const char ***sha1) -{ - DWORD dib_size = get_dib_size(bmi); - HPEN solid_pen, dashed_pen, orig_pen; - HBRUSH solid_brush, dib_brush, hatch_brush, orig_brush; - INT i, y, hatch_style; - HRGN hrgn, hrgn2; - BYTE dib_brush_buf[sizeof(BITMAPINFO) + 256 * sizeof(RGBQUAD) + 16 * 16 * sizeof(DWORD)]; /* Enough for 16 x 16 at 32 bpp */ - BITMAPINFO *brush_bi = (BITMAPINFO*)dib_brush_buf; - BYTE *brush_bits; - BOOL dib_is_1bpp = (bmi->bmiHeader.biBitCount == 1); - - memset(bits, 0xcc, dib_size); - compare_hash(bmi, bits, sha1, "empty"); - - solid_pen = CreatePen(PS_SOLID, 1, RGB(0, 0, 0xff)); - orig_pen = SelectObject(hdc, solid_pen); - SetBrushOrgEx(hdc, 0, 0, NULL); - - /* horizontal and vertical lines */ - for(i = 1; i <= 16; i++) - { - SetROP2(hdc, i); - MoveToEx(hdc, 10, i * 3, NULL); - LineTo(hdc, 100, i * 3); /* l -> r */ - MoveToEx(hdc, 100, 50 + i * 3, NULL); - LineTo(hdc, 10, 50 + i * 3); /* r -> l */ - MoveToEx(hdc, 120 + i * 3, 10, NULL); - LineTo(hdc, 120 + i * 3, 100); /* t -> b */ - MoveToEx(hdc, 170 + i * 3, 100, NULL); - LineTo(hdc, 170 + i * 3, 10); /* b -> t */ - } - compare_hash(bmi, bits, sha1, "h and v solid lines"); - memset(bits, 0xcc, dib_size); - - /* diagonal lines */ - SetROP2(hdc, R2_COPYPEN); - for(i = 0; i < 16; i++) - { - double s = sin(M_PI * i / 8.0); - double c = cos(M_PI * i / 8.0); - - MoveToEx(hdc, 200.5 + 10 * c, 200.5 + 10 * s, NULL); - LineTo(hdc, 200.5 + 100 * c, 200.5 + 100 * s); - } - compare_hash(bmi, bits, sha1, "diagonal solid lines"); - memset(bits, 0xcc, dib_size); - - for(i = 0; i < sizeof(bias_check) / sizeof(bias_check[0]); i++) - { - MoveToEx(hdc, bias_check[i].left, bias_check[i].top, NULL); - LineTo(hdc, bias_check[i].right, bias_check[i].bottom); - } - compare_hash(bmi, bits, sha1, "more diagonal solid lines"); - memset(bits, 0xcc, dib_size); - - /* solid brush PatBlt */ - solid_brush = CreateSolidBrush(RGB(0x33, 0xaa, 0xff)); - orig_brush = SelectObject(hdc, solid_brush); - - for(i = 0, y = 10; i < 256; i++) - { - BOOL ret; - - ret = PatBlt(hdc, 10, y, 100, 10, rop3[i]); - - if(rop_uses_src(rop3[i])) - ok(ret == FALSE, "got TRUE for %x\n", rop3[i]); - else - { - ok(ret, "got FALSE for %x\n", rop3[i]); - y += 20; - } - - } - compare_hash(bmi, bits, sha1, "solid patblt"); - memset(bits, 0xcc, dib_size); - - /* clipped lines */ - hrgn = CreateRectRgn(10, 10, 200, 20); - hrgn2 = CreateRectRgn(100, 100, 200, 200); - CombineRgn(hrgn, hrgn, hrgn2, RGN_OR); - SetRectRgn(hrgn2, 290, 100, 300, 200); - CombineRgn(hrgn, hrgn, hrgn2, RGN_OR); - ExtSelectClipRgn(hdc, hrgn, RGN_COPY); - DeleteObject(hrgn2); - - for(i = 0; i < sizeof(hline_clips)/sizeof(hline_clips[0]); i++) - { - MoveToEx(hdc, hline_clips[i].left, hline_clips[i].top, NULL); - LineTo(hdc, hline_clips[i].right, hline_clips[i].bottom); - } - compare_hash(bmi, bits, sha1, "clipped solid hlines"); - memset(bits, 0xcc, dib_size); - - for(i = 0; i < sizeof(vline_clips)/sizeof(vline_clips[0]); i++) - { - MoveToEx(hdc, vline_clips[i].left, vline_clips[i].top, NULL); - LineTo(hdc, vline_clips[i].right, vline_clips[i].bottom); - } - compare_hash(bmi, bits, sha1, "clipped solid vlines"); - memset(bits, 0xcc, dib_size); - - for(i = 0; i < sizeof(line_clips)/sizeof(line_clips[0]); i++) - { - MoveToEx(hdc, line_clips[i].left, line_clips[i].top, NULL); - LineTo(hdc, line_clips[i].right, line_clips[i].bottom); - } - compare_hash(bmi, bits, sha1, "clipped solid diagonal lines"); - memset(bits, 0xcc, dib_size); - - /* clipped PatBlt */ - for(i = 0; i < sizeof(patblt_clips) / sizeof(patblt_clips[0]); i++) - { - PatBlt(hdc, patblt_clips[i].left, patblt_clips[i].top, - patblt_clips[i].right - patblt_clips[i].left, - patblt_clips[i].bottom - patblt_clips[i].top, PATCOPY); - } - compare_hash(bmi, bits, sha1, "clipped patblt"); - memset(bits, 0xcc, dib_size); - - /* clipped dashed lines */ - dashed_pen = CreatePen(PS_DASH, 1, RGB(0xff, 0, 0)); - SelectObject(hdc, dashed_pen); - SetBkMode(hdc, TRANSPARENT); - SetBkColor(hdc, RGB(0, 0xff, 0)); - - for(i = 0; i < sizeof(hline_clips)/sizeof(hline_clips[0]); i++) - { - MoveToEx(hdc, hline_clips[i].left, hline_clips[i].top, NULL); - LineTo(hdc, hline_clips[i].right, hline_clips[i].bottom); - } - compare_hash(bmi, bits, sha1, "clipped dashed hlines"); - memset(bits, 0xcc, dib_size); - - for(i = 0; i < sizeof(hline_clips)/sizeof(hline_clips[0]); i++) - { - MoveToEx(hdc, hline_clips[i].right - 1, hline_clips[i].bottom, NULL); - LineTo(hdc, hline_clips[i].left - 1, hline_clips[i].top); - } - compare_hash(bmi, bits, sha1, "clipped dashed hlines r -> l"); - memset(bits, 0xcc, dib_size); - - for(i = 0; i < sizeof(vline_clips)/sizeof(vline_clips[0]); i++) - { - MoveToEx(hdc, vline_clips[i].left, vline_clips[i].top, NULL); - LineTo(hdc, vline_clips[i].right, vline_clips[i].bottom); - } - compare_hash(bmi, bits, sha1, "clipped dashed vlines"); - memset(bits, 0xcc, dib_size); - - for(i = 0; i < sizeof(vline_clips)/sizeof(vline_clips[0]); i++) - { - MoveToEx(hdc, vline_clips[i].right, vline_clips[i].bottom - 1, NULL); - LineTo(hdc, vline_clips[i].left, vline_clips[i].top - 1); - } - compare_hash(bmi, bits, sha1, "clipped dashed vlines b -> t"); - memset(bits, 0xcc, dib_size); - - for(i = 0; i < sizeof(line_clips)/sizeof(line_clips[0]); i++) - { - MoveToEx(hdc, line_clips[i].left, line_clips[i].top, NULL); - LineTo(hdc, line_clips[i].right, line_clips[i].bottom); - } - compare_hash(bmi, bits, sha1, "clipped dashed diagonal lines"); - memset(bits, 0xcc, dib_size); - - SetBkMode(hdc, OPAQUE); - - for(i = 0; i < sizeof(line_clips)/sizeof(line_clips[0]); i++) - { - MoveToEx(hdc, line_clips[i].left, line_clips[i].top, NULL); - LineTo(hdc, line_clips[i].right, line_clips[i].bottom); - } - compare_hash(bmi, bits, sha1, "clipped opaque dashed diagonal lines"); - memset(bits, 0xcc, dib_size); - - ExtSelectClipRgn(hdc, NULL, RGN_COPY); - - /* 8888 DIB pattern brush */ - - brush_bi->bmiHeader = dib_brush_header_8888; - brush_bits = (BYTE*)brush_bi + sizeof(BITMAPINFOHEADER); - memset(brush_bits, 0, 16 * 16 * sizeof(DWORD)); - brush_bits[2] = 0xff; - brush_bits[6] = 0xff; - brush_bits[14] = 0xff; - brush_bits[65] = 0xff; - brush_bits[69] = 0xff; - brush_bits[72] = 0xff; - - dib_brush = CreateDIBPatternBrushPt(brush_bi, DIB_RGB_COLORS); - - SelectObject(hdc, dib_brush); - SetBrushOrgEx(hdc, 1, 1, NULL); - - for(i = 0, y = 10; i < 256; i++) - { - BOOL ret; - - if(!rop_uses_src(rop3[i])) - { - ret = PatBlt(hdc, 10 + i, y, 100, 20, rop3[i]); - ok(ret, "got FALSE for %x\n", rop3[i]); - y += 25; - } - } - compare_hash_broken_todo(bmi, bits, sha1, "top-down 8888 dib brush patblt", dib_is_1bpp ? 2 : 0, dib_is_1bpp); - memset(bits, 0xcc, dib_size); - - SelectObject(hdc, orig_brush); - DeleteObject(dib_brush); - - /* 8888 bottom-up DIB pattern brush */ - - brush_bi->bmiHeader.biHeight = -brush_bi->bmiHeader.biHeight; - - dib_brush = CreateDIBPatternBrushPt(brush_bi, DIB_RGB_COLORS); - - SelectObject(hdc, dib_brush); - - /* This used to set the x origin to 100 as well, but - there's a Windows bug for 24 bpp where the brush's x offset - is incorrectly calculated for rops that involve both D and P */ - SetBrushOrgEx(hdc, 4, 100, NULL); - - for(i = 0, y = 10; i < 256; i++) - { - BOOL ret; - - if(!rop_uses_src(rop3[i])) - { - ret = PatBlt(hdc, 10 + i, y, 100, 20, rop3[i]); - ok(ret, "got FALSE for %x\n", rop3[i]); - y += 25; - } - } - compare_hash_broken_todo(bmi, bits, sha1, "bottom-up 8888 dib brush patblt", dib_is_1bpp ? 2 : 0, dib_is_1bpp); - memset(bits, 0xcc, dib_size); - - SelectObject(hdc, orig_brush); - DeleteObject(dib_brush); - - /* 24 bpp dib pattern brush */ - - brush_bi->bmiHeader = dib_brush_header_24; - brush_bits = (BYTE*)brush_bi + sizeof(BITMAPINFOHEADER); - memset(brush_bits, 0, 16 * 16 * 3); - brush_bits[0] = brush_bits[3] = brush_bits[6] = brush_bits[8] = 0xff; - brush_bits[49] = brush_bits[52] = 0xff; - - dib_brush = CreateDIBPatternBrushPt(brush_bi, DIB_RGB_COLORS); - - SelectObject(hdc, dib_brush); - SetBrushOrgEx(hdc, 1, 1, NULL); - - for(i = 0, y = 10; i < 256; i++) - { - BOOL ret; - - if(!rop_uses_src(rop3[i])) - { - ret = PatBlt(hdc, 10 + i, y, 100, 20, rop3[i]); - ok(ret, "got FALSE for %x\n", rop3[i]); - y += 25; - } - } - compare_hash_broken_todo(bmi, bits, sha1, "top-down 24 bpp brush patblt", dib_is_1bpp ? 2 : 0, dib_is_1bpp); - memset(bits, 0xcc, dib_size); - - SelectObject(hdc, orig_brush); - DeleteObject(dib_brush); - - /* 555 dib pattern brush */ - - brush_bi->bmiHeader = dib_brush_header_555; - brush_bits = (BYTE*)brush_bi + sizeof(BITMAPINFOHEADER); - memset(brush_bits, 0, 16 * 16 * sizeof(WORD)); - brush_bits[0] = brush_bits[1] = 0xff; - brush_bits[32] = brush_bits[34] = 0x7c; - - dib_brush = CreateDIBPatternBrushPt(brush_bi, DIB_RGB_COLORS); - - SelectObject(hdc, dib_brush); - SetBrushOrgEx(hdc, 1, 1, NULL); - - for(i = 0, y = 10; i < 256; i++) - { - BOOL ret; - - if(!rop_uses_src(rop3[i])) - { - ret = PatBlt(hdc, 10 + i, y, 100, 20, rop3[i]); - ok(ret, "got FALSE for %x\n", rop3[i]); - y += 25; - } - } - compare_hash_broken_todo(bmi, bits, sha1, "top-down 555 dib brush patblt", dib_is_1bpp ? 1 : 0, dib_is_1bpp); - memset(bits, 0xcc, dib_size); - - SelectObject(hdc, orig_brush); - DeleteObject(dib_brush); - - SetBrushOrgEx(hdc, 0, 0, NULL); - - /* 8 bpp dib pattern brush */ - - brush_bi->bmiHeader = dib_brush_header_8; - brush_bi->bmiHeader.biClrUsed = 3; - memset(brush_bi->bmiColors, 0, brush_bi->bmiHeader.biClrUsed * sizeof(RGBQUAD)); - brush_bi->bmiColors[0].rgbRed = 0xff; - brush_bi->bmiColors[1].rgbRed = 0xff; - brush_bi->bmiColors[1].rgbGreen = 0xff; - brush_bi->bmiColors[1].rgbBlue = 0xff; - - brush_bits = (BYTE*)brush_bi + sizeof(BITMAPINFOHEADER) + brush_bi->bmiHeader.biClrUsed * sizeof(RGBQUAD); - memset(brush_bits, 0, 16 * 16 * sizeof(BYTE)); - brush_bits[0] = brush_bits[1] = 1; - brush_bits[16] = brush_bits[17] = 2; - brush_bits[32] = brush_bits[33] = 6; - - dib_brush = CreateDIBPatternBrushPt(brush_bi, DIB_RGB_COLORS); - - SelectObject(hdc, dib_brush); - SetBrushOrgEx(hdc, 1, 1, NULL); - - for(i = 0, y = 10; i < 256; i++) - { - BOOL ret; - - if(!rop_uses_src(rop3[i])) - { - ret = PatBlt(hdc, 10 + i, y, 100, 20, rop3[i]); - ok(ret, "got FALSE for %x\n", rop3[i]); - y += 25; - } - } - compare_hash_broken_todo(bmi, bits, sha1, "top-down 8 bpp dib brush patblt", dib_is_1bpp ? 2 : 0, dib_is_1bpp); - memset(bits, 0xcc, dib_size); - - SelectObject(hdc, orig_brush); - DeleteObject(dib_brush); - - /* 4 bpp dib pattern brush */ - - brush_bi->bmiHeader = dib_brush_header_4; - dib_brush = CreateDIBPatternBrushPt(brush_bi, DIB_RGB_COLORS); - - SelectObject(hdc, dib_brush); - SetBrushOrgEx(hdc, 1, 1, NULL); - - for(i = 0, y = 10; i < 256; i++) - { - BOOL ret; - - if(!rop_uses_src(rop3[i])) - { - ret = PatBlt(hdc, 10 + i, y, 100, 20, rop3[i]); - ok(ret, "got FALSE for %x\n", rop3[i]); - y += 25; - } - } - compare_hash_broken_todo(bmi, bits, sha1, "top-down 4 bpp dib brush patblt", dib_is_1bpp ? 2 : 0, dib_is_1bpp); - memset(bits, 0xcc, dib_size); - - SelectObject(hdc, orig_brush); - DeleteObject(dib_brush); - - /* 1 bpp dib pattern brush */ - - brush_bi->bmiHeader = dib_brush_header_1; - brush_bi->bmiHeader.biClrUsed = 2; - memset(brush_bits, 0, 16 * 4); - brush_bits[0] = 0xf0; - brush_bits[4] = 0xf0; - brush_bits[8] = 0xf0; - - dib_brush = CreateDIBPatternBrushPt(brush_bi, DIB_RGB_COLORS); - SelectObject(hdc, dib_brush); - for(i = 0, y = 10; i < 256; i++) - { - BOOL ret; - - if(!rop_uses_src(rop3[i])) - { - ret = PatBlt(hdc, 10 + i, y, 100, 20, rop3[i]); - ok(ret, "got FALSE for %x\n", rop3[i]); - y += 25; - } - } - - compare_hash_broken_todo(bmi, bits, sha1, "top-down 1 bpp dib brush patblt", dib_is_1bpp ? 2 : 0, dib_is_1bpp); - memset(bits, 0xcc, dib_size); - - SelectObject(hdc, orig_brush); - SetBrushOrgEx(hdc, 0, 0, NULL); - - /* Rectangle */ - - SelectObject(hdc, solid_pen); - SelectObject(hdc, solid_brush); - - for(i = 0; i < sizeof(rectangles)/sizeof(rectangles[0]); i++) - { - Rectangle(hdc, rectangles[i].left, rectangles[i].top, rectangles[i].right, rectangles[i].bottom); - } - - SelectObject(hdc, dashed_pen); - for(i = 0; i < sizeof(rectangles)/sizeof(rectangles[0]); i++) - { - Rectangle(hdc, rectangles[i].left, rectangles[i].top + 150, rectangles[i].right, rectangles[i].bottom + 150); - } - - compare_hash(bmi, bits, sha1, "rectangles"); - memset(bits, 0xcc, dib_size); - SelectObject(hdc, solid_pen); - - /* PaintRgn */ - - PaintRgn(hdc, hrgn); - compare_hash(bmi, bits, sha1, "PaintRgn"); - memset(bits, 0xcc, dib_size); - - /* RTL rectangles */ - - if( !pSetLayout ) - { - win_skip("Don't have SetLayout\n"); - (*sha1)++; - } - else - { - pSetLayout(hdc, LAYOUT_RTL); - PaintRgn(hdc, hrgn); - PatBlt(hdc, 10, 250, 10, 10, PATCOPY); - Rectangle(hdc, 100, 250, 110, 260); - compare_hash(bmi, bits, sha1, "rtl"); - memset(bits, 0xcc, dib_size); - - pSetLayout(hdc, LAYOUT_LTR); - } - - for(i = 0, y = 10; i < 256; i++) - { - BOOL ret; - - if(!rop_uses_src(rop3[i])) - { - for(hatch_style = HS_HORIZONTAL; hatch_style <= HS_DIAGCROSS; hatch_style++) - { - hatch_brush = CreateHatchBrush(hatch_style, RGB(0xff, 0, 0)); - SelectObject(hdc, hatch_brush); - ret = PatBlt(hdc, 10 + i + 30 * hatch_style, y, 20, 20, rop3[i]); - ok(ret, "got FALSE for %x\n", rop3[i]); - SelectObject(hdc, orig_brush); - DeleteObject(hatch_brush); - } - y += 25; - } - } - - compare_hash_broken_todo(bmi, bits, sha1, "hatch brushes", 1, FALSE); /* nt4 is different */ - memset(bits, 0xcc, dib_size); - - /* overlapping blits */ - - orig_brush = SelectObject(hdc, solid_brush); - - Rectangle(hdc, 10, 10, 100, 100); - Rectangle(hdc, 20, 15, 30, 40); - Rectangle(hdc, 15, 15, 20, 20); - Rectangle(hdc, 15, 20, 50, 45); - BitBlt( hdc, 20, 20, 100, 100, hdc, 10, 10, SRCCOPY ); - compare_hash(bmi, bits, sha1, "overlapping BitBlt SRCCOPY +x, +y"); - memset(bits, 0xcc, dib_size); - - Rectangle(hdc, 10, 10, 100, 100); - Rectangle(hdc, 20, 15, 30, 40); - Rectangle(hdc, 15, 15, 20, 20); - Rectangle(hdc, 15, 20, 50, 45); - BitBlt( hdc, 10, 10, 100, 100, hdc, 20, 20, SRCCOPY ); - if (bmi->bmiHeader.biBitCount == 1) /* Windows gets this one wrong */ - compare_hash_broken_todo(bmi, bits, sha1, "overlapping BitBlt SRCCOPY -x, -y",1, FALSE); - else - compare_hash(bmi, bits, sha1, "overlapping BitBlt SRCCOPY -x, -y"); - memset(bits, 0xcc, dib_size); - - Rectangle(hdc, 10, 10, 100, 100); - Rectangle(hdc, 20, 15, 30, 40); - Rectangle(hdc, 15, 15, 20, 20); - Rectangle(hdc, 15, 20, 50, 45); - BitBlt( hdc, 20, 10, 100, 100, hdc, 10, 20, SRCCOPY ); - compare_hash(bmi, bits, sha1, "overlapping BitBlt SRCCOPY +x, -y"); - memset(bits, 0xcc, dib_size); - - Rectangle(hdc, 10, 10, 100, 100); - Rectangle(hdc, 20, 15, 30, 40); - Rectangle(hdc, 15, 15, 20, 20); - Rectangle(hdc, 15, 20, 50, 45); - BitBlt( hdc, 10, 20, 100, 100, hdc, 20, 10, SRCCOPY ); - if (bmi->bmiHeader.biBitCount == 1) /* Windows gets this one wrong */ - compare_hash_broken_todo(bmi, bits, sha1, "overlapping BitBlt SRCCOPY -x, +y", 1, FALSE ); - else - compare_hash(bmi, bits, sha1, "overlapping BitBlt SRCCOPY -x, +y" ); - memset(bits, 0xcc, dib_size); - - Rectangle(hdc, 10, 10, 100, 100); - Rectangle(hdc, 20, 15, 30, 40); - Rectangle(hdc, 15, 15, 20, 20); - Rectangle(hdc, 15, 20, 50, 45); - BitBlt( hdc, 20, 20, 100, 100, hdc, 10, 10, PATPAINT ); - compare_hash(bmi, bits, sha1, "overlapping BitBlt PATPAINT +x, +y"); - memset(bits, 0xcc, dib_size); - - Rectangle(hdc, 10, 10, 100, 100); - Rectangle(hdc, 20, 15, 30, 40); - Rectangle(hdc, 15, 15, 20, 20); - Rectangle(hdc, 15, 20, 50, 45); - BitBlt( hdc, 10, 10, 100, 100, hdc, 20, 20, PATPAINT ); - compare_hash(bmi, bits, sha1, "overlapping BitBlt PATPAINT -x, -y"); - memset(bits, 0xcc, dib_size); - - Rectangle(hdc, 10, 10, 100, 100); - Rectangle(hdc, 20, 15, 30, 40); - Rectangle(hdc, 15, 15, 20, 20); - Rectangle(hdc, 15, 20, 50, 45); - BitBlt( hdc, 20, 10, 100, 100, hdc, 10, 20, PATPAINT ); - if (bmi->bmiHeader.biBitCount >= 24) /* Windows gets this one wrong */ - compare_hash_broken_todo(bmi, bits, sha1, "overlapping BitBlt PATPAINT +x, -y", 1, FALSE); - else - compare_hash(bmi, bits, sha1, "overlapping BitBlt PATPAINT +x, -y"); - memset(bits, 0xcc, dib_size); - - Rectangle(hdc, 10, 10, 100, 100); - Rectangle(hdc, 20, 15, 30, 40); - Rectangle(hdc, 15, 15, 20, 20); - Rectangle(hdc, 15, 20, 50, 45); - BitBlt( hdc, 10, 20, 100, 100, hdc, 20, 10, PATPAINT ); - compare_hash(bmi, bits, sha1, "overlapping BitBlt PATPAINT -x, +y" ); - memset(bits, 0xcc, dib_size); - - SelectObject(hdc, orig_brush); - SelectObject(hdc, orig_pen); - DeleteObject(hrgn); - DeleteObject(dib_brush); - DeleteObject(dashed_pen); - DeleteObject(solid_brush); - DeleteObject(solid_pen); -} - -static void test_simple_graphics(void) -{ - char bmibuf[sizeof(BITMAPINFO) + 256 * sizeof(RGBQUAD)]; - BITMAPINFO *bmi = (BITMAPINFO *)bmibuf; - DWORD *bit_fields = (DWORD*)(bmibuf + sizeof(BITMAPINFOHEADER)); - HDC mem_dc; - BYTE *bits; - HBITMAP dib, orig_bm; - const char **sha1; - DIBSECTION ds; - - mem_dc = CreateCompatibleDC(NULL); - - /* a8r8g8b8 */ - trace("8888\n"); - memset(bmi, 0, sizeof(bmibuf)); - bmi->bmiHeader.biSize = sizeof(bmi->bmiHeader); - bmi->bmiHeader.biHeight = 512; - bmi->bmiHeader.biWidth = 512; - bmi->bmiHeader.biBitCount = 32; - bmi->bmiHeader.biPlanes = 1; - bmi->bmiHeader.biCompression = BI_RGB; - - dib = CreateDIBSection(0, bmi, DIB_RGB_COLORS, (void**)&bits, NULL, 0); - ok(dib != NULL, "ret NULL\n"); - ok(GetObjectW( dib, sizeof(ds), &ds ), "GetObject failed\n"); - ok(ds.dsBitfields[0] == 0, "got %08x\n", ds.dsBitfields[0]); - ok(ds.dsBitfields[1] == 0, "got %08x\n", ds.dsBitfields[1]); - ok(ds.dsBitfields[2] == 0, "got %08x\n", ds.dsBitfields[2]); - ok(ds.dsBmih.biCompression == BI_RGB || - broken(ds.dsBmih.biCompression == BI_BITFIELDS), /* nt4 sp1 and 2 */ - "got %x\n", ds.dsBmih.biCompression); - - orig_bm = SelectObject(mem_dc, dib); - - sha1 = sha1_graphics_a8r8g8b8; - draw_graphics(mem_dc, bmi, bits, &sha1); - - SelectObject(mem_dc, orig_bm); - DeleteObject(dib); - - /* a8r8g8b8 - bitfields. Should be the same as the regular 32 bit case.*/ - trace("8888 - bitfields\n"); - bmi->bmiHeader.biBitCount = 32; - bmi->bmiHeader.biCompression = BI_BITFIELDS; - bit_fields[0] = 0xff0000; - bit_fields[1] = 0x00ff00; - bit_fields[2] = 0x0000ff; - - dib = CreateDIBSection(mem_dc, bmi, DIB_RGB_COLORS, (void**)&bits, NULL, 0); - ok(dib != NULL, "ret NULL\n"); - ok(GetObjectW( dib, sizeof(ds), &ds ), "GetObject failed\n"); - ok(ds.dsBitfields[0] == 0xff0000, "got %08x\n", ds.dsBitfields[0]); - ok(ds.dsBitfields[1] == 0x00ff00, "got %08x\n", ds.dsBitfields[1]); - ok(ds.dsBitfields[2] == 0x0000ff, "got %08x\n", ds.dsBitfields[2]); - ok(ds.dsBmih.biCompression == BI_BITFIELDS, "got %x\n", ds.dsBmih.biCompression); - - orig_bm = SelectObject(mem_dc, dib); - - sha1 = sha1_graphics_a8r8g8b8; - draw_graphics(mem_dc, bmi, bits, &sha1); - - SelectObject(mem_dc, orig_bm); - DeleteObject(dib); - - /* a8b8g8r8 - bitfields. */ - trace("a8b8g8r8 - bitfields\n"); - bmi->bmiHeader.biBitCount = 32; - bmi->bmiHeader.biCompression = BI_BITFIELDS; - bit_fields[0] = 0x0000ff; - bit_fields[1] = 0x00ff00; - bit_fields[2] = 0xff0000; - - dib = CreateDIBSection(mem_dc, bmi, DIB_RGB_COLORS, (void**)&bits, NULL, 0); - ok(dib != NULL, "ret NULL\n"); - ok(GetObjectW( dib, sizeof(ds), &ds ), "GetObject failed\n"); - ok(ds.dsBitfields[0] == 0x0000ff, "got %08x\n", ds.dsBitfields[0]); - ok(ds.dsBitfields[1] == 0x00ff00, "got %08x\n", ds.dsBitfields[1]); - ok(ds.dsBitfields[2] == 0xff0000, "got %08x\n", ds.dsBitfields[2]); - ok(ds.dsBmih.biCompression == BI_BITFIELDS, "got %x\n", ds.dsBmih.biCompression); - - orig_bm = SelectObject(mem_dc, dib); - - sha1 = sha1_graphics_a8b8g8r8; - draw_graphics(mem_dc, bmi, bits, &sha1); - - SelectObject(mem_dc, orig_bm); - DeleteObject(dib); - - /* 24 */ - trace("24\n"); - bmi->bmiHeader.biBitCount = 24; - bmi->bmiHeader.biCompression = BI_RGB; - - dib = CreateDIBSection(0, bmi, DIB_RGB_COLORS, (void**)&bits, NULL, 0); - ok(dib != NULL, "ret NULL\n"); - orig_bm = SelectObject(mem_dc, dib); - - sha1 = sha1_graphics_24; - draw_graphics(mem_dc, bmi, bits, &sha1); - - SelectObject(mem_dc, orig_bm); - DeleteObject(dib); - - /* r5g5b5 */ - trace("555\n"); - bmi->bmiHeader.biBitCount = 16; - bmi->bmiHeader.biCompression = BI_RGB; - - dib = CreateDIBSection(0, bmi, DIB_RGB_COLORS, (void**)&bits, NULL, 0); - ok(dib != NULL, "ret NULL\n"); - ok(GetObjectW( dib, sizeof(ds), &ds ), "GetObject failed\n"); - ok(ds.dsBitfields[0] == 0x7c00, "got %08x\n", ds.dsBitfields[0]); - ok(ds.dsBitfields[1] == 0x03e0, "got %08x\n", ds.dsBitfields[1]); - ok(ds.dsBitfields[2] == 0x001f, "got %08x\n", ds.dsBitfields[2]); - ok(ds.dsBmih.biCompression == BI_BITFIELDS, "got %x\n", ds.dsBmih.biCompression); - - orig_bm = SelectObject(mem_dc, dib); - - sha1 = sha1_graphics_r5g5b5; - draw_graphics(mem_dc, bmi, bits, &sha1); - - SelectObject(mem_dc, orig_bm); - DeleteObject(dib); - - /* r4g4b4 */ - trace("444\n"); - bmi->bmiHeader.biBitCount = 16; - bmi->bmiHeader.biCompression = BI_BITFIELDS; - bit_fields[0] = 0x0f00; - bit_fields[1] = 0x00f0; - bit_fields[2] = 0x000f; - dib = CreateDIBSection(0, bmi, DIB_RGB_COLORS, (void**)&bits, NULL, 0); - ok(dib != NULL, "ret NULL\n"); - ok(GetObjectW( dib, sizeof(ds), &ds ), "GetObject failed\n"); - ok(ds.dsBitfields[0] == 0x0f00, "got %08x\n", ds.dsBitfields[0]); - ok(ds.dsBitfields[1] == 0x00f0, "got %08x\n", ds.dsBitfields[1]); - ok(ds.dsBitfields[2] == 0x000f, "got %08x\n", ds.dsBitfields[2]); - ok(ds.dsBmih.biCompression == BI_BITFIELDS, "got %x\n", ds.dsBmih.biCompression); - - orig_bm = SelectObject(mem_dc, dib); - - sha1 = sha1_graphics_r4g4b4; - draw_graphics(mem_dc, bmi, bits, &sha1); - - SelectObject(mem_dc, orig_bm); - DeleteObject(dib); - - /* 8 */ - trace("8\n"); - bmi->bmiHeader.biBitCount = 8; - bmi->bmiHeader.biCompression = BI_RGB; - bmi->bmiHeader.biClrUsed = 5; - bmi->bmiColors[0].rgbRed = 0xff; - bmi->bmiColors[0].rgbGreen = 0xff; - bmi->bmiColors[0].rgbBlue = 0xff; - bmi->bmiColors[1].rgbRed = 0; - bmi->bmiColors[1].rgbGreen = 0; - bmi->bmiColors[1].rgbBlue = 0; - bmi->bmiColors[2].rgbRed = 0xff; - bmi->bmiColors[2].rgbGreen = 0; - bmi->bmiColors[2].rgbBlue = 0; - bmi->bmiColors[3].rgbRed = 0; - bmi->bmiColors[3].rgbGreen = 0xff; - bmi->bmiColors[3].rgbBlue = 0; - bmi->bmiColors[4].rgbRed = 0; - bmi->bmiColors[4].rgbGreen = 0; - bmi->bmiColors[4].rgbBlue = 0xff; - - dib = CreateDIBSection(0, bmi, DIB_RGB_COLORS, (void**)&bits, NULL, 0); - ok(dib != NULL, "ret NULL\n"); - - orig_bm = SelectObject(mem_dc, dib); - - sha1 = sha1_graphics_8; - draw_graphics(mem_dc, bmi, bits, &sha1); - - SelectObject(mem_dc, orig_bm); - DeleteObject(dib); - - /* 4 */ - trace("4\n"); - bmi->bmiHeader.biBitCount = 4; - - dib = CreateDIBSection(0, bmi, DIB_RGB_COLORS, (void**)&bits, NULL, 0); - ok(dib != NULL, "ret NULL\n"); - - orig_bm = SelectObject(mem_dc, dib); - - sha1 = sha1_graphics_4; - draw_graphics(mem_dc, bmi, bits, &sha1); - - SelectObject(mem_dc, orig_bm); - DeleteObject(dib); - - /* 1 */ - trace("1\n"); - bmi->bmiHeader.biBitCount = 1; - bmi->bmiHeader.biClrUsed = 2; - - bmi->bmiColors[0].rgbRed = 0x00; - bmi->bmiColors[0].rgbGreen = 0x01; - bmi->bmiColors[0].rgbBlue = 0xff; - bmi->bmiColors[1].rgbRed = 0xff; - bmi->bmiColors[1].rgbGreen = 0x00; - bmi->bmiColors[1].rgbBlue = 0x00; - - dib = CreateDIBSection(0, bmi, DIB_RGB_COLORS, (void**)&bits, NULL, 0); - ok(dib != NULL, "ret NULL\n"); - - orig_bm = SelectObject(mem_dc, dib); - - sha1 = sha1_graphics_1; - draw_graphics(mem_dc, bmi, bits, &sha1); - - SelectObject(mem_dc, orig_bm); - DeleteObject(dib); - - DeleteDC(mem_dc); -} - -START_TEST(dib) -{ - HMODULE mod = GetModuleHandleA("gdi32.dll"); - pSetLayout = (void *)GetProcAddress( mod, "SetLayout" ); - - CryptAcquireContextW(&crypt_prov, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); - - test_simple_graphics(); - - CryptReleaseContext(crypt_prov, 0); -} diff --git a/rostests/winetests/gdi32/font.c b/rostests/winetests/gdi32/font.c deleted file mode 100644 index b09b689cb1f..00000000000 --- a/rostests/winetests/gdi32/font.c +++ /dev/null @@ -1,4059 +0,0 @@ -/* - * Unit test suite for fonts - * - * Copyright 2002 Mike McCormack - * Copyright 2004 Dmitry Timoshkov - * - * 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 "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winnls.h" - -#include "wine/test.h" - -/* Do not allow more than 1 deviation here */ -#define match_off_by_1(a, b) (abs((a) - (b)) <= 1) - -#define near_match(a, b) (abs((a) - (b)) <= 6) -#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) - -static LONG (WINAPI *pGdiGetCharDimensions)(HDC hdc, LPTEXTMETRICW lptm, LONG *height); -static DWORD (WINAPI *pGdiGetCodePage)(HDC hdc); -static BOOL (WINAPI *pGetCharABCWidthsI)(HDC hdc, UINT first, UINT count, LPWORD glyphs, LPABC abc); -static BOOL (WINAPI *pGetCharABCWidthsA)(HDC hdc, UINT first, UINT last, LPABC abc); -static BOOL (WINAPI *pGetCharABCWidthsW)(HDC hdc, UINT first, UINT last, LPABC abc); -static DWORD (WINAPI *pGetFontUnicodeRanges)(HDC hdc, LPGLYPHSET lpgs); -static DWORD (WINAPI *pGetGlyphIndicesA)(HDC hdc, LPCSTR lpstr, INT count, LPWORD pgi, DWORD flags); -static DWORD (WINAPI *pGetGlyphIndicesW)(HDC hdc, LPCWSTR lpstr, INT count, LPWORD pgi, DWORD flags); -static BOOL (WINAPI *pGdiRealizationInfo)(HDC hdc, DWORD *); -static HFONT (WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDV *); -static HANDLE (WINAPI *pAddFontMemResourceEx)(PVOID, DWORD, PVOID, DWORD *); -static BOOL (WINAPI *pRemoveFontMemResourceEx)(HANDLE); -static INT (WINAPI *pAddFontResourceExA)(LPCSTR, DWORD, PVOID); -static BOOL (WINAPI *pRemoveFontResourceExA)(LPCSTR, DWORD, PVOID); - -static HMODULE hgdi32 = 0; -static const MAT2 mat = { {0,1}, {0,0}, {0,0}, {0,1} }; - -static void init(void) -{ - hgdi32 = GetModuleHandleA("gdi32.dll"); - - pGdiGetCharDimensions = (void *)GetProcAddress(hgdi32, "GdiGetCharDimensions"); - pGdiGetCodePage = (void *) GetProcAddress(hgdi32,"GdiGetCodePage"); - pGetCharABCWidthsI = (void *)GetProcAddress(hgdi32, "GetCharABCWidthsI"); - pGetCharABCWidthsA = (void *)GetProcAddress(hgdi32, "GetCharABCWidthsA"); - pGetCharABCWidthsW = (void *)GetProcAddress(hgdi32, "GetCharABCWidthsW"); - pGetFontUnicodeRanges = (void *)GetProcAddress(hgdi32, "GetFontUnicodeRanges"); - pGetGlyphIndicesA = (void *)GetProcAddress(hgdi32, "GetGlyphIndicesA"); - pGetGlyphIndicesW = (void *)GetProcAddress(hgdi32, "GetGlyphIndicesW"); - pGdiRealizationInfo = (void *)GetProcAddress(hgdi32, "GdiRealizationInfo"); - pCreateFontIndirectExA = (void *)GetProcAddress(hgdi32, "CreateFontIndirectExA"); - pAddFontMemResourceEx = (void *)GetProcAddress(hgdi32, "AddFontMemResourceEx"); - pRemoveFontMemResourceEx = (void *)GetProcAddress(hgdi32, "RemoveFontMemResourceEx"); - pAddFontResourceExA = (void *)GetProcAddress(hgdi32, "AddFontResourceExA"); - pRemoveFontResourceExA = (void *)GetProcAddress(hgdi32, "RemoveFontResourceExA"); -} - -static INT CALLBACK is_truetype_font_installed_proc(const LOGFONT *elf, const TEXTMETRIC *ntm, DWORD type, LPARAM lParam) -{ - if (type != TRUETYPE_FONTTYPE) return 1; - - return 0; -} - -static BOOL is_truetype_font_installed(const char *name) -{ - HDC hdc = GetDC(0); - BOOL ret = FALSE; - - if (!EnumFontFamiliesA(hdc, name, is_truetype_font_installed_proc, 0)) - ret = TRUE; - - ReleaseDC(0, hdc); - return ret; -} - -static INT CALLBACK is_font_installed_proc(const LOGFONT *elf, const TEXTMETRIC *ntm, DWORD type, LPARAM lParam) -{ - return 0; -} - -static BOOL is_font_installed(const char *name) -{ - HDC hdc = GetDC(0); - BOOL ret = FALSE; - - if(!EnumFontFamiliesA(hdc, name, is_font_installed_proc, 0)) - ret = TRUE; - - ReleaseDC(0, hdc); - return ret; -} - -static void check_font(const char* test, const LOGFONTA* lf, HFONT hfont) -{ - LOGFONTA getobj_lf; - int ret, minlen = 0; - - if (!hfont) - return; - - ret = GetObject(hfont, sizeof(getobj_lf), &getobj_lf); - /* NT4 tries to be clever and only returns the minimum length */ - while (lf->lfFaceName[minlen] && minlen < LF_FACESIZE-1) - minlen++; - minlen += FIELD_OFFSET(LOGFONTA, lfFaceName) + 1; - ok(ret == sizeof(LOGFONTA) || ret == minlen, "%s: GetObject returned %d\n", test, ret); - ok(lf->lfHeight == getobj_lf.lfHeight || - broken((SHORT)lf->lfHeight == getobj_lf.lfHeight), /* win9x */ - "lfHeight: expect %08x got %08x\n", lf->lfHeight, getobj_lf.lfHeight); - ok(lf->lfWidth == getobj_lf.lfWidth || - broken((SHORT)lf->lfWidth == getobj_lf.lfWidth), /* win9x */ - "lfWidth: expect %08x got %08x\n", lf->lfWidth, getobj_lf.lfWidth); - ok(lf->lfEscapement == getobj_lf.lfEscapement || - broken((SHORT)lf->lfEscapement == getobj_lf.lfEscapement), /* win9x */ - "lfEscapement: expect %08x got %08x\n", lf->lfEscapement, getobj_lf.lfEscapement); - ok(lf->lfOrientation == getobj_lf.lfOrientation || - broken((SHORT)lf->lfOrientation == getobj_lf.lfOrientation), /* win9x */ - "lfOrientation: expect %08x got %08x\n", lf->lfOrientation, getobj_lf.lfOrientation); - ok(lf->lfWeight == getobj_lf.lfWeight || - broken((SHORT)lf->lfWeight == getobj_lf.lfWeight), /* win9x */ - "lfWeight: expect %08x got %08x\n", lf->lfWeight, getobj_lf.lfWeight); - ok(lf->lfItalic == getobj_lf.lfItalic, "lfItalic: expect %02x got %02x\n", lf->lfItalic, getobj_lf.lfItalic); - ok(lf->lfUnderline == getobj_lf.lfUnderline, "lfUnderline: expect %02x got %02x\n", lf->lfUnderline, getobj_lf.lfUnderline); - ok(lf->lfStrikeOut == getobj_lf.lfStrikeOut, "lfStrikeOut: expect %02x got %02x\n", lf->lfStrikeOut, getobj_lf.lfStrikeOut); - ok(lf->lfCharSet == getobj_lf.lfCharSet, "lfCharSet: expect %02x got %02x\n", lf->lfCharSet, getobj_lf.lfCharSet); - ok(lf->lfOutPrecision == getobj_lf.lfOutPrecision, "lfOutPrecision: expect %02x got %02x\n", lf->lfOutPrecision, getobj_lf.lfOutPrecision); - ok(lf->lfClipPrecision == getobj_lf.lfClipPrecision, "lfClipPrecision: expect %02x got %02x\n", lf->lfClipPrecision, getobj_lf.lfClipPrecision); - ok(lf->lfQuality == getobj_lf.lfQuality, "lfQuality: expect %02x got %02x\n", lf->lfQuality, getobj_lf.lfQuality); - ok(lf->lfPitchAndFamily == getobj_lf.lfPitchAndFamily, "lfPitchAndFamily: expect %02x got %02x\n", lf->lfPitchAndFamily, getobj_lf.lfPitchAndFamily); - ok(!lstrcmpA(lf->lfFaceName, getobj_lf.lfFaceName) || - broken(!memcmp(lf->lfFaceName, getobj_lf.lfFaceName, LF_FACESIZE-1)), /* win9x doesn't ensure '\0' termination */ - "%s: font names don't match: %s != %s\n", test, lf->lfFaceName, getobj_lf.lfFaceName); -} - -static HFONT create_font(const char* test, const LOGFONTA* lf) -{ - HFONT hfont = CreateFontIndirectA(lf); - ok(hfont != 0, "%s: CreateFontIndirect failed\n", test); - if (hfont) - check_font(test, lf, hfont); - return hfont; -} - -static void test_logfont(void) -{ - LOGFONTA lf; - HFONT hfont; - - memset(&lf, 0, sizeof lf); - - lf.lfCharSet = ANSI_CHARSET; - lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; - lf.lfWeight = FW_DONTCARE; - lf.lfHeight = 16; - lf.lfWidth = 16; - lf.lfQuality = DEFAULT_QUALITY; - - lstrcpyA(lf.lfFaceName, "Arial"); - hfont = create_font("Arial", &lf); - DeleteObject(hfont); - - memset(&lf, 'A', sizeof(lf)); - hfont = CreateFontIndirectA(&lf); - ok(hfont != 0, "CreateFontIndirectA with strange LOGFONT failed\n"); - - lf.lfFaceName[LF_FACESIZE - 1] = 0; - check_font("AAA...", &lf, hfont); - DeleteObject(hfont); -} - -static INT CALLBACK font_enum_proc(const LOGFONT *elf, const TEXTMETRIC *ntm, DWORD type, LPARAM lParam) -{ - if (type & RASTER_FONTTYPE) - { - LOGFONT *lf = (LOGFONT *)lParam; - *lf = *elf; - return 0; /* stop enumeration */ - } - - return 1; /* continue enumeration */ -} - -static void compare_tm(const TEXTMETRICA *tm, const TEXTMETRICA *otm) -{ - ok(tm->tmHeight == otm->tmHeight, "tmHeight %d != %d\n", tm->tmHeight, otm->tmHeight); - ok(tm->tmAscent == otm->tmAscent, "tmAscent %d != %d\n", tm->tmAscent, otm->tmAscent); - ok(tm->tmDescent == otm->tmDescent, "tmDescent %d != %d\n", tm->tmDescent, otm->tmDescent); - ok(tm->tmInternalLeading == otm->tmInternalLeading, "tmInternalLeading %d != %d\n", tm->tmInternalLeading, otm->tmInternalLeading); - ok(tm->tmExternalLeading == otm->tmExternalLeading, "tmExternalLeading %d != %d\n", tm->tmExternalLeading, otm->tmExternalLeading); - ok(tm->tmAveCharWidth == otm->tmAveCharWidth, "tmAveCharWidth %d != %d\n", tm->tmAveCharWidth, otm->tmAveCharWidth); - ok(tm->tmMaxCharWidth == otm->tmMaxCharWidth, "tmMaxCharWidth %d != %d\n", tm->tmMaxCharWidth, otm->tmMaxCharWidth); - ok(tm->tmWeight == otm->tmWeight, "tmWeight %d != %d\n", tm->tmWeight, otm->tmWeight); - ok(tm->tmOverhang == otm->tmOverhang, "tmOverhang %d != %d\n", tm->tmOverhang, otm->tmOverhang); - ok(tm->tmDigitizedAspectX == otm->tmDigitizedAspectX, "tmDigitizedAspectX %d != %d\n", tm->tmDigitizedAspectX, otm->tmDigitizedAspectX); - ok(tm->tmDigitizedAspectY == otm->tmDigitizedAspectY, "tmDigitizedAspectY %d != %d\n", tm->tmDigitizedAspectY, otm->tmDigitizedAspectY); - ok(tm->tmFirstChar == otm->tmFirstChar, "tmFirstChar %d != %d\n", tm->tmFirstChar, otm->tmFirstChar); - ok(tm->tmLastChar == otm->tmLastChar, "tmLastChar %d != %d\n", tm->tmLastChar, otm->tmLastChar); - ok(tm->tmDefaultChar == otm->tmDefaultChar, "tmDefaultChar %d != %d\n", tm->tmDefaultChar, otm->tmDefaultChar); - ok(tm->tmBreakChar == otm->tmBreakChar, "tmBreakChar %d != %d\n", tm->tmBreakChar, otm->tmBreakChar); - ok(tm->tmItalic == otm->tmItalic, "tmItalic %d != %d\n", tm->tmItalic, otm->tmItalic); - ok(tm->tmUnderlined == otm->tmUnderlined, "tmUnderlined %d != %d\n", tm->tmUnderlined, otm->tmUnderlined); - ok(tm->tmStruckOut == otm->tmStruckOut, "tmStruckOut %d != %d\n", tm->tmStruckOut, otm->tmStruckOut); - ok(tm->tmPitchAndFamily == otm->tmPitchAndFamily, "tmPitchAndFamily %d != %d\n", tm->tmPitchAndFamily, otm->tmPitchAndFamily); - ok(tm->tmCharSet == otm->tmCharSet, "tmCharSet %d != %d\n", tm->tmCharSet, otm->tmCharSet); -} - -static void test_font_metrics(HDC hdc, HFONT hfont, LONG lfHeight, - LONG lfWidth, const char *test_str, - INT test_str_len, const TEXTMETRICA *tm_orig, - const SIZE *size_orig, INT width_of_A_orig, - INT scale_x, INT scale_y) -{ - LOGFONTA lf; - OUTLINETEXTMETRIC otm; - TEXTMETRICA tm; - SIZE size; - INT width_of_A, cx, cy; - UINT ret; - - if (!hfont) - return; - - ok(GetCurrentObject(hdc, OBJ_FONT) == hfont, "hfont should be selected\n"); - - GetObjectA(hfont, sizeof(lf), &lf); - - if (GetOutlineTextMetricsA(hdc, 0, NULL)) - { - otm.otmSize = sizeof(otm) / 2; - ret = GetOutlineTextMetricsA(hdc, otm.otmSize, &otm); - ok(ret == sizeof(otm)/2 /* XP */ || - ret == 1 /* Win9x */, "expected sizeof(otm)/2, got %u\n", ret); - - memset(&otm, 0x1, sizeof(otm)); - otm.otmSize = sizeof(otm); - ret = GetOutlineTextMetricsA(hdc, otm.otmSize, &otm); - ok(ret == sizeof(otm) /* XP */ || - ret == 1 /* Win9x */, "expected sizeof(otm), got %u\n", ret); - - memset(&tm, 0x2, sizeof(tm)); - ret = GetTextMetricsA(hdc, &tm); - ok(ret, "GetTextMetricsA failed\n"); - /* the structure size is aligned */ - if (memcmp(&tm, &otm.otmTextMetrics, FIELD_OFFSET(TEXTMETRICA, tmCharSet) + 1)) - { - ok(0, "tm != otm\n"); - compare_tm(&tm, &otm.otmTextMetrics); - } - - tm = otm.otmTextMetrics; -if (0) /* these metrics are scaled too, but with rounding errors */ -{ - ok(otm.otmAscent == tm.tmAscent, "ascent %d != %d\n", otm.otmAscent, tm.tmAscent); - ok(otm.otmDescent == -tm.tmDescent, "descent %d != %d\n", otm.otmDescent, -tm.tmDescent); -} - ok(otm.otmMacAscent == tm.tmAscent, "ascent %d != %d\n", otm.otmMacAscent, tm.tmAscent); - ok(otm.otmDescent < 0, "otm.otmDescent should be < 0\n"); - ok(otm.otmMacDescent < 0, "otm.otmMacDescent should be < 0\n"); - ok(tm.tmDescent > 0, "tm.tmDescent should be > 0\n"); - ok(otm.otmMacDescent == -tm.tmDescent, "descent %d != %d\n", otm.otmMacDescent, -tm.tmDescent); - ok(otm.otmEMSquare == 2048, "expected 2048, got %d\n", otm.otmEMSquare); - } - else - { - ret = GetTextMetricsA(hdc, &tm); - ok(ret, "GetTextMetricsA failed\n"); - } - - cx = tm.tmAveCharWidth / tm_orig->tmAveCharWidth; - cy = tm.tmHeight / tm_orig->tmHeight; - ok(cx == scale_x && cy == scale_y, "height %d: expected scale_x %d, scale_y %d, got cx %d, cy %d\n", - lfHeight, scale_x, scale_y, cx, cy); - ok(tm.tmHeight == tm_orig->tmHeight * scale_y, "height %d != %d\n", tm.tmHeight, tm_orig->tmHeight * scale_y); - ok(tm.tmAscent == tm_orig->tmAscent * scale_y, "ascent %d != %d\n", tm.tmAscent, tm_orig->tmAscent * scale_y); - ok(tm.tmDescent == tm_orig->tmDescent * scale_y, "descent %d != %d\n", tm.tmDescent, tm_orig->tmDescent * scale_y); - ok(near_match(tm.tmAveCharWidth, tm_orig->tmAveCharWidth * scale_x), "ave width %d != %d\n", tm.tmAveCharWidth, tm_orig->tmAveCharWidth * scale_x); - ok(near_match(tm.tmMaxCharWidth, tm_orig->tmMaxCharWidth * scale_x), "max width %d != %d\n", tm.tmMaxCharWidth, tm_orig->tmMaxCharWidth * scale_x); - - ok(lf.lfHeight == lfHeight, "lfHeight %d != %d\n", lf.lfHeight, lfHeight); - if (lf.lfHeight) - { - if (lf.lfWidth) - ok(lf.lfWidth == tm.tmAveCharWidth, "lfWidth %d != tm %d\n", lf.lfWidth, tm.tmAveCharWidth); - } - else - ok(lf.lfWidth == lfWidth, "lfWidth %d != %d\n", lf.lfWidth, lfWidth); - - GetTextExtentPoint32A(hdc, test_str, test_str_len, &size); - - ok(near_match(size.cx, size_orig->cx * scale_x), "cx %d != %d\n", size.cx, size_orig->cx * scale_x); - ok(size.cy == size_orig->cy * scale_y, "cy %d != %d\n", size.cy, size_orig->cy * scale_y); - - GetCharWidthA(hdc, 'A', 'A', &width_of_A); - - ok(near_match(width_of_A, width_of_A_orig * scale_x), "width A %d != %d\n", width_of_A, width_of_A_orig * scale_x); -} - -/* Test how GDI scales bitmap font metrics */ -static void test_bitmap_font(void) -{ - static const char test_str[11] = "Test String"; - HDC hdc; - LOGFONTA bitmap_lf; - HFONT hfont, old_hfont; - TEXTMETRICA tm_orig; - SIZE size_orig; - INT ret, i, width_orig, height_orig, scale, lfWidth; - - if(!winetest_interactive) - { - skip("reactos bug 5401: Skipping bitmap font tests!\n"); - return; - } - - hdc = GetDC(0); - - /* "System" has only 1 pixel size defined, otherwise the test breaks */ - ret = EnumFontFamiliesA(hdc, "System", font_enum_proc, (LPARAM)&bitmap_lf); - if (ret) - { - ReleaseDC(0, hdc); - trace("no bitmap fonts were found, skipping the test\n"); - return; - } - - trace("found bitmap font %s, height %d\n", bitmap_lf.lfFaceName, bitmap_lf.lfHeight); - - height_orig = bitmap_lf.lfHeight; - lfWidth = bitmap_lf.lfWidth; - - hfont = create_font("bitmap", &bitmap_lf); - old_hfont = SelectObject(hdc, hfont); - ok(GetTextMetricsA(hdc, &tm_orig), "GetTextMetricsA failed\n"); - ok(GetTextExtentPoint32A(hdc, test_str, sizeof(test_str), &size_orig), "GetTextExtentPoint32A failed\n"); - ok(GetCharWidthA(hdc, 'A', 'A', &width_orig), "GetCharWidthA failed\n"); - SelectObject(hdc, old_hfont); - DeleteObject(hfont); - - bitmap_lf.lfHeight = 0; - bitmap_lf.lfWidth = 4; - hfont = create_font("bitmap", &bitmap_lf); - old_hfont = SelectObject(hdc, hfont); - test_font_metrics(hdc, hfont, 0, 4, test_str, sizeof(test_str), &tm_orig, &size_orig, width_orig, 1, 1); - SelectObject(hdc, old_hfont); - DeleteObject(hfont); - - bitmap_lf.lfHeight = height_orig; - bitmap_lf.lfWidth = lfWidth; - - /* test fractional scaling */ - for (i = 1; i <= height_orig * 6; i++) - { - INT nearest_height; - - bitmap_lf.lfHeight = i; - hfont = create_font("fractional", &bitmap_lf); - scale = (i + height_orig - 1) / height_orig; - nearest_height = scale * height_orig; - /* Only jump to the next height if the difference <= 25% original height */ - if (scale > 2 && nearest_height - i > height_orig / 4) scale--; - /* The jump between unscaled and doubled is delayed by 1 in winnt+ but not in win9x, - so we'll not test this particular height. */ - else if(scale == 2 && nearest_height - i == (height_orig / 4)) continue; - else if(scale == 2 && nearest_height - i > (height_orig / 4 - 1)) scale--; - old_hfont = SelectObject(hdc, hfont); - test_font_metrics(hdc, hfont, bitmap_lf.lfHeight, 0, test_str, sizeof(test_str), &tm_orig, &size_orig, width_orig, 1, scale); - SelectObject(hdc, old_hfont); - DeleteObject(hfont); - } - - /* test integer scaling 3x2 */ - bitmap_lf.lfHeight = height_orig * 2; - bitmap_lf.lfWidth *= 3; - hfont = create_font("3x2", &bitmap_lf); - old_hfont = SelectObject(hdc, hfont); - test_font_metrics(hdc, hfont, bitmap_lf.lfHeight, 0, test_str, sizeof(test_str), &tm_orig, &size_orig, width_orig, 3, 2); - SelectObject(hdc, old_hfont); - DeleteObject(hfont); - - /* test integer scaling 3x3 */ - bitmap_lf.lfHeight = height_orig * 3; - bitmap_lf.lfWidth = 0; - hfont = create_font("3x3", &bitmap_lf); - old_hfont = SelectObject(hdc, hfont); - test_font_metrics(hdc, hfont, bitmap_lf.lfHeight, 0, test_str, sizeof(test_str), &tm_orig, &size_orig, width_orig, 3, 3); - SelectObject(hdc, old_hfont); - DeleteObject(hfont); - - ReleaseDC(0, hdc); -} - -/* Test how GDI scales outline font metrics */ -static void test_outline_font(void) -{ - static const char test_str[11] = "Test String"; - HDC hdc, hdc_2; - LOGFONTA lf; - HFONT hfont, old_hfont, old_hfont_2; - OUTLINETEXTMETRICA otm; - SIZE size_orig; - INT width_orig, height_orig, lfWidth; - XFORM xform; - GLYPHMETRICS gm; - MAT2 mat2 = { {0x8000,0}, {0,0}, {0,0}, {0x8000,0} }; - POINT pt; - INT ret; - - if(!winetest_interactive) - { - skip("reactos bug 5401: Skipping outline font tests!\n"); - return; - } - - if (!is_truetype_font_installed("Arial")) - { - skip("Arial is not installed\n"); - return; - } - - hdc = CreateCompatibleDC(0); - - memset(&lf, 0, sizeof(lf)); - strcpy(lf.lfFaceName, "Arial"); - lf.lfHeight = 72; - hfont = create_font("outline", &lf); - old_hfont = SelectObject(hdc, hfont); - otm.otmSize = sizeof(otm); - ok(GetOutlineTextMetricsA(hdc, sizeof(otm), &otm), "GetTextMetricsA failed\n"); - ok(GetTextExtentPoint32A(hdc, test_str, sizeof(test_str), &size_orig), "GetTextExtentPoint32A failed\n"); - ok(GetCharWidthA(hdc, 'A', 'A', &width_orig), "GetCharWidthA failed\n"); - - test_font_metrics(hdc, hfont, lf.lfHeight, otm.otmTextMetrics.tmAveCharWidth, test_str, sizeof(test_str), &otm.otmTextMetrics, &size_orig, width_orig, 1, 1); - SelectObject(hdc, old_hfont); - DeleteObject(hfont); - - /* font of otmEMSquare height helps to avoid a lot of rounding errors */ - lf.lfHeight = otm.otmEMSquare; - lf.lfHeight = -lf.lfHeight; - hfont = create_font("outline", &lf); - old_hfont = SelectObject(hdc, hfont); - otm.otmSize = sizeof(otm); - ok(GetOutlineTextMetricsA(hdc, sizeof(otm), &otm), "GetTextMetricsA failed\n"); - ok(GetTextExtentPoint32A(hdc, test_str, sizeof(test_str), &size_orig), "GetTextExtentPoint32A failed\n"); - ok(GetCharWidthA(hdc, 'A', 'A', &width_orig), "GetCharWidthA failed\n"); - SelectObject(hdc, old_hfont); - DeleteObject(hfont); - - height_orig = otm.otmTextMetrics.tmHeight; - lfWidth = otm.otmTextMetrics.tmAveCharWidth; - - /* test integer scaling 3x2 */ - lf.lfHeight = height_orig * 2; - lf.lfWidth = lfWidth * 3; - hfont = create_font("3x2", &lf); - old_hfont = SelectObject(hdc, hfont); - test_font_metrics(hdc, hfont, lf.lfHeight, lf.lfWidth, test_str, sizeof(test_str), &otm.otmTextMetrics, &size_orig, width_orig, 3, 2); - SelectObject(hdc, old_hfont); - DeleteObject(hfont); - - /* test integer scaling 3x3 */ - lf.lfHeight = height_orig * 3; - lf.lfWidth = lfWidth * 3; - hfont = create_font("3x3", &lf); - old_hfont = SelectObject(hdc, hfont); - test_font_metrics(hdc, hfont, lf.lfHeight, lf.lfWidth, test_str, sizeof(test_str), &otm.otmTextMetrics, &size_orig, width_orig, 3, 3); - SelectObject(hdc, old_hfont); - DeleteObject(hfont); - - /* test integer scaling 1x1 */ - lf.lfHeight = height_orig * 1; - lf.lfWidth = lfWidth * 1; - hfont = create_font("1x1", &lf); - old_hfont = SelectObject(hdc, hfont); - test_font_metrics(hdc, hfont, lf.lfHeight, lf.lfWidth, test_str, sizeof(test_str), &otm.otmTextMetrics, &size_orig, width_orig, 1, 1); - SelectObject(hdc, old_hfont); - DeleteObject(hfont); - - /* test integer scaling 1x1 */ - lf.lfHeight = height_orig; - lf.lfWidth = 0; - hfont = create_font("1x1", &lf); - old_hfont = SelectObject(hdc, hfont); - test_font_metrics(hdc, hfont, lf.lfHeight, lf.lfWidth, test_str, sizeof(test_str), &otm.otmTextMetrics, &size_orig, width_orig, 1, 1); - - /* with an identity matrix */ - memset(&gm, 0, sizeof(gm)); - SetLastError(0xdeadbeef); - ret = GetGlyphOutlineA(hdc, 'A', GGO_METRICS, &gm, 0, NULL, &mat); - ok(ret != GDI_ERROR, "GetGlyphOutlineA error %d\n", GetLastError()); - trace("gm.gmCellIncX %d, width_orig %d\n", gm.gmCellIncX, width_orig); - ok(gm.gmCellIncX == width_orig, "incX %d != %d\n", gm.gmCellIncX, width_orig); - ok(gm.gmCellIncY == 0, "incY %d != 0\n", gm.gmCellIncY); - /* with a custom matrix */ - memset(&gm, 0, sizeof(gm)); - SetLastError(0xdeadbeef); - ret = GetGlyphOutlineA(hdc, 'A', GGO_METRICS, &gm, 0, NULL, &mat2); - ok(ret != GDI_ERROR, "GetGlyphOutlineA error %d\n", GetLastError()); - trace("gm.gmCellIncX %d, width_orig %d\n", gm.gmCellIncX, width_orig); - ok(gm.gmCellIncX == width_orig/2, "incX %d != %d\n", gm.gmCellIncX, width_orig/2); - ok(gm.gmCellIncY == 0, "incY %d != 0\n", gm.gmCellIncY); - - /* Test that changing the DC transformation affects only the font - * selected on this DC and doesn't affect the same font selected on - * another DC. - */ - hdc_2 = CreateCompatibleDC(0); - old_hfont_2 = SelectObject(hdc_2, hfont); - test_font_metrics(hdc_2, hfont, lf.lfHeight, lf.lfWidth, test_str, sizeof(test_str), &otm.otmTextMetrics, &size_orig, width_orig, 1, 1); - - SetMapMode(hdc, MM_ANISOTROPIC); - - /* font metrics on another DC should be unchanged */ - test_font_metrics(hdc_2, hfont, lf.lfHeight, lf.lfWidth, test_str, sizeof(test_str), &otm.otmTextMetrics, &size_orig, width_orig, 1, 1); - - /* test restrictions of compatibility mode GM_COMPATIBLE */ - /* part 1: rescaling only X should not change font scaling on screen. - So compressing the X axis by 2 is not done, and this - appears as X scaling of 2 that no one requested. */ - SetWindowExtEx(hdc, 100, 100, NULL); - SetViewportExtEx(hdc, 50, 100, NULL); - test_font_metrics(hdc, hfont, lf.lfHeight, lf.lfWidth, test_str, sizeof(test_str), &otm.otmTextMetrics, &size_orig, width_orig, 2, 1); - /* font metrics on another DC should be unchanged */ - test_font_metrics(hdc_2, hfont, lf.lfHeight, lf.lfWidth, test_str, sizeof(test_str), &otm.otmTextMetrics, &size_orig, width_orig, 1, 1); - - /* part 2: rescaling only Y should change font scaling. - As also X is scaled by a factor of 2, but this is not - requested by the DC transformation, we get a scaling factor - of 2 in the X coordinate. */ - SetViewportExtEx(hdc, 100, 200, NULL); - test_font_metrics(hdc, hfont, lf.lfHeight, lf.lfWidth, test_str, sizeof(test_str), &otm.otmTextMetrics, &size_orig, width_orig, 2, 1); - /* font metrics on another DC should be unchanged */ - test_font_metrics(hdc_2, hfont, lf.lfHeight, lf.lfWidth, test_str, sizeof(test_str), &otm.otmTextMetrics, &size_orig, width_orig, 1, 1); - - /* restore scaling */ - SetMapMode(hdc, MM_TEXT); - - /* font metrics on another DC should be unchanged */ - test_font_metrics(hdc_2, hfont, lf.lfHeight, lf.lfWidth, test_str, sizeof(test_str), &otm.otmTextMetrics, &size_orig, width_orig, 1, 1); - - SelectObject(hdc_2, old_hfont_2); - DeleteDC(hdc_2); - - if (!SetGraphicsMode(hdc, GM_ADVANCED)) - { - SelectObject(hdc, old_hfont); - DeleteObject(hfont); - DeleteDC(hdc); - skip("GM_ADVANCED is not supported on this platform\n"); - return; - } - - xform.eM11 = 20.0f; - xform.eM12 = 0.0f; - xform.eM21 = 0.0f; - xform.eM22 = 20.0f; - xform.eDx = 0.0f; - xform.eDy = 0.0f; - - SetLastError(0xdeadbeef); - ret = SetWorldTransform(hdc, &xform); - ok(ret, "SetWorldTransform error %u\n", GetLastError()); - - test_font_metrics(hdc, hfont, lf.lfHeight, lf.lfWidth, test_str, sizeof(test_str), &otm.otmTextMetrics, &size_orig, width_orig, 1, 1); - - /* with an identity matrix */ - memset(&gm, 0, sizeof(gm)); - SetLastError(0xdeadbeef); - ret = GetGlyphOutlineA(hdc, 'A', GGO_METRICS, &gm, 0, NULL, &mat); - ok(ret != GDI_ERROR, "GetGlyphOutlineA error %d\n", GetLastError()); - trace("gm.gmCellIncX %d, width_orig %d\n", gm.gmCellIncX, width_orig); - pt.x = width_orig; pt.y = 0; - LPtoDP(hdc, &pt, 1); - ok(gm.gmCellIncX == pt.x, "incX %d != %d\n", gm.gmCellIncX, pt.x); - ok(gm.gmCellIncX == 20 * width_orig, "incX %d != %d\n", gm.gmCellIncX, 20 * width_orig); - ok(gm.gmCellIncY == 0, "incY %d != 0\n", gm.gmCellIncY); - /* with a custom matrix */ - memset(&gm, 0, sizeof(gm)); - SetLastError(0xdeadbeef); - ret = GetGlyphOutlineA(hdc, 'A', GGO_METRICS, &gm, 0, NULL, &mat2); - ok(ret != GDI_ERROR, "GetGlyphOutlineA error %d\n", GetLastError()); - trace("gm.gmCellIncX %d, width_orig %d\n", gm.gmCellIncX, width_orig); - pt.x = width_orig; pt.y = 0; - LPtoDP(hdc, &pt, 1); - ok(gm.gmCellIncX == pt.x/2, "incX %d != %d\n", gm.gmCellIncX, pt.x/2); - ok(near_match(gm.gmCellIncX, 10 * width_orig), "incX %d != %d\n", gm.gmCellIncX, 10 * width_orig); - ok(gm.gmCellIncY == 0, "incY %d != 0\n", gm.gmCellIncY); - - SetLastError(0xdeadbeef); - ret = SetMapMode(hdc, MM_LOMETRIC); - ok(ret == MM_TEXT, "expected MM_TEXT, got %d, error %u\n", ret, GetLastError()); - - test_font_metrics(hdc, hfont, lf.lfHeight, lf.lfWidth, test_str, sizeof(test_str), &otm.otmTextMetrics, &size_orig, width_orig, 1, 1); - - /* with an identity matrix */ - memset(&gm, 0, sizeof(gm)); - SetLastError(0xdeadbeef); - ret = GetGlyphOutlineA(hdc, 'A', GGO_METRICS, &gm, 0, NULL, &mat); - ok(ret != GDI_ERROR, "GetGlyphOutlineA error %d\n", GetLastError()); - trace("gm.gmCellIncX %d, width_orig %d\n", gm.gmCellIncX, width_orig); - pt.x = width_orig; pt.y = 0; - LPtoDP(hdc, &pt, 1); - ok(near_match(gm.gmCellIncX, pt.x), "incX %d != %d\n", gm.gmCellIncX, pt.x); - ok(gm.gmCellIncY == 0, "incY %d != 0\n", gm.gmCellIncY); - /* with a custom matrix */ - memset(&gm, 0, sizeof(gm)); - SetLastError(0xdeadbeef); - ret = GetGlyphOutlineA(hdc, 'A', GGO_METRICS, &gm, 0, NULL, &mat2); - ok(ret != GDI_ERROR, "GetGlyphOutlineA error %d\n", GetLastError()); - trace("gm.gmCellIncX %d, width_orig %d\n", gm.gmCellIncX, width_orig); - pt.x = width_orig; pt.y = 0; - LPtoDP(hdc, &pt, 1); - ok(near_match(gm.gmCellIncX, (pt.x + 1)/2), "incX %d != %d\n", gm.gmCellIncX, (pt.x + 1)/2); - ok(gm.gmCellIncY == 0, "incY %d != 0\n", gm.gmCellIncY); - - SetLastError(0xdeadbeef); - ret = SetMapMode(hdc, MM_TEXT); - ok(ret == MM_LOMETRIC, "expected MM_LOMETRIC, got %d, error %u\n", ret, GetLastError()); - - test_font_metrics(hdc, hfont, lf.lfHeight, lf.lfWidth, test_str, sizeof(test_str), &otm.otmTextMetrics, &size_orig, width_orig, 1, 1); - - /* with an identity matrix */ - memset(&gm, 0, sizeof(gm)); - SetLastError(0xdeadbeef); - ret = GetGlyphOutlineA(hdc, 'A', GGO_METRICS, &gm, 0, NULL, &mat); - ok(ret != GDI_ERROR, "GetGlyphOutlineA error %d\n", GetLastError()); - trace("gm.gmCellIncX %d, width_orig %d\n", gm.gmCellIncX, width_orig); - pt.x = width_orig; pt.y = 0; - LPtoDP(hdc, &pt, 1); - ok(gm.gmCellIncX == pt.x, "incX %d != %d\n", gm.gmCellIncX, pt.x); - ok(gm.gmCellIncX == 20 * width_orig, "incX %d != %d\n", gm.gmCellIncX, 20 * width_orig); - ok(gm.gmCellIncY == 0, "incY %d != 0\n", gm.gmCellIncY); - /* with a custom matrix */ - memset(&gm, 0, sizeof(gm)); - SetLastError(0xdeadbeef); - ret = GetGlyphOutlineA(hdc, 'A', GGO_METRICS, &gm, 0, NULL, &mat2); - ok(ret != GDI_ERROR, "GetGlyphOutlineA error %d\n", GetLastError()); - trace("gm.gmCellIncX %d, width_orig %d\n", gm.gmCellIncX, width_orig); - pt.x = width_orig; pt.y = 0; - LPtoDP(hdc, &pt, 1); - ok(gm.gmCellIncX == pt.x/2, "incX %d != %d\n", gm.gmCellIncX, pt.x/2); - ok(gm.gmCellIncX == 10 * width_orig, "incX %d != %d\n", gm.gmCellIncX, 10 * width_orig); - ok(gm.gmCellIncY == 0, "incY %d != 0\n", gm.gmCellIncY); - - SelectObject(hdc, old_hfont); - DeleteObject(hfont); - DeleteDC(hdc); -} - -static INT CALLBACK find_font_proc(const LOGFONT *elf, const TEXTMETRIC *ntm, DWORD type, LPARAM lParam) -{ - LOGFONT *lf = (LOGFONT *)lParam; - - if (elf->lfHeight == lf->lfHeight && !strcmp(elf->lfFaceName, lf->lfFaceName)) - { - *lf = *elf; - return 0; /* stop enumeration */ - } - return 1; /* continue enumeration */ -} - -static void test_bitmap_font_metrics(void) -{ - static const struct font_data - { - const char face_name[LF_FACESIZE]; - int weight, height, ascent, descent, int_leading, ext_leading; - int ave_char_width, max_char_width, dpi; - DWORD ansi_bitfield; - WORD skip_lang_id; - } fd[] = - { - { "MS Sans Serif", FW_NORMAL, 13, 11, 2, 2, 0, 5, 11, 96, FS_LATIN1 | FS_LATIN2 | FS_CYRILLIC }, - { "MS Sans Serif", FW_NORMAL, 16, 13, 3, 3, 0, 7, 14, 96, FS_LATIN1 | FS_LATIN2 | FS_CYRILLIC }, - { "MS Sans Serif", FW_NORMAL, 20, 16, 4, 4, 0, 8, 16, 96, FS_LATIN1 | FS_CYRILLIC }, - { "MS Sans Serif", FW_NORMAL, 20, 16, 4, 4, 0, 8, 18, 96, FS_LATIN2 }, - { "MS Sans Serif", FW_NORMAL, 24, 19, 5, 6, 0, 9, 19, 96, FS_LATIN1 }, - { "MS Sans Serif", FW_NORMAL, 24, 19, 5, 6, 0, 9, 24, 96, FS_LATIN2 }, - { "MS Sans Serif", FW_NORMAL, 24, 19, 5, 6, 0, 9, 20, 96, FS_CYRILLIC }, - { "MS Sans Serif", FW_NORMAL, 29, 23, 6, 5, 0, 12, 24, 96, FS_LATIN1 }, - { "MS Sans Serif", FW_NORMAL, 29, 23, 6, 6, 0, 12, 24, 96, FS_LATIN2 }, - { "MS Sans Serif", FW_NORMAL, 29, 23, 6, 5, 0, 12, 25, 96, FS_CYRILLIC }, - { "MS Sans Serif", FW_NORMAL, 37, 29, 8, 5, 0, 16, 32, 96, FS_LATIN1 | FS_LATIN2 | FS_CYRILLIC }, - - { "MS Sans Serif", FW_NORMAL, 16, 13, 3, 3, 0, 7, 14, 120, FS_LATIN1 | FS_LATIN2 | FS_CYRILLIC }, - { "MS Sans Serif", FW_NORMAL, 20, 16, 4, 4, 0, 8, 18, 120, FS_LATIN1 | FS_LATIN2 }, - { "MS Sans Serif", FW_NORMAL, 20, 16, 4, 4, 0, 8, 17, 120, FS_CYRILLIC }, - { "MS Sans Serif", FW_NORMAL, 25, 20, 5, 5, 0, 10, 21, 120, FS_LATIN1 | FS_LATIN2 | FS_CYRILLIC }, - { "MS Sans Serif", FW_NORMAL, 29, 23, 6, 6, 0, 12, 24, 120, FS_LATIN1 | FS_LATIN2 }, - { "MS Sans Serif", FW_NORMAL, 29, 23, 6, 5, 0, 12, 24, 120, FS_CYRILLIC }, - { "MS Sans Serif", FW_NORMAL, 36, 29, 7, 6, 0, 15, 30, 120, FS_LATIN1 | FS_LATIN2 | FS_CYRILLIC }, - { "MS Sans Serif", FW_NORMAL, 46, 37, 9, 6, 0, 20, 40, 120, FS_LATIN1 | FS_LATIN2 | FS_CYRILLIC }, - - { "MS Serif", FW_NORMAL, 10, 8, 2, 2, 0, 4, 8, 96, FS_LATIN1 | FS_LATIN2 }, - { "MS Serif", FW_NORMAL, 10, 8, 2, 2, 0, 5, 8, 96, FS_CYRILLIC }, - { "MS Serif", FW_NORMAL, 11, 9, 2, 2, 0, 5, 9, 96, FS_LATIN1 | FS_LATIN2 | FS_CYRILLIC }, - { "MS Serif", FW_NORMAL, 13, 11, 2, 2, 0, 5, 11, 96, FS_LATIN1 }, - { "MS Serif", FW_NORMAL, 13, 11, 2, 2, 0, 5, 12, 96, FS_LATIN2 | FS_CYRILLIC }, - { "MS Serif", FW_NORMAL, 16, 13, 3, 3, 0, 6, 14, 96, FS_LATIN1 | FS_LATIN2 }, - { "MS Serif", FW_NORMAL, 16, 13, 3, 3, 0, 6, 16, 96, FS_CYRILLIC }, - { "MS Serif", FW_NORMAL, 19, 15, 4, 3, 0, 8, 18, 96, FS_LATIN1 | FS_LATIN2 }, - { "MS Serif", FW_NORMAL, 19, 15, 4, 3, 0, 8, 19, 96, FS_CYRILLIC }, - { "MS Serif", FW_NORMAL, 21, 16, 5, 3, 0, 9, 17, 96, FS_LATIN1 }, - { "MS Serif", FW_NORMAL, 21, 16, 5, 3, 0, 9, 22, 96, FS_LATIN2 }, - { "MS Serif", FW_NORMAL, 21, 16, 5, 3, 0, 9, 23, 96, FS_CYRILLIC }, - { "MS Serif", FW_NORMAL, 27, 21, 6, 3, 0, 12, 23, 96, FS_LATIN1 }, - { "MS Serif", FW_NORMAL, 27, 21, 6, 3, 0, 12, 26, 96, FS_LATIN2 }, - { "MS Serif", FW_NORMAL, 27, 21, 6, 3, 0, 12, 27, 96, FS_CYRILLIC }, - { "MS Serif", FW_NORMAL, 35, 27, 8, 3, 0, 16, 33, 96, FS_LATIN1 | FS_LATIN2 }, - { "MS Serif", FW_NORMAL, 35, 27, 8, 3, 0, 16, 34, 96, FS_CYRILLIC }, - - { "MS Serif", FW_NORMAL, 16, 13, 3, 3, 0, 6, 14, 120, FS_LATIN1 | FS_CYRILLIC }, - { "MS Serif", FW_NORMAL, 16, 13, 3, 3, 0, 6, 13, 120, FS_LATIN2 }, - { "MS Serif", FW_NORMAL, 20, 16, 4, 4, 0, 8, 18, 120, FS_LATIN1 | FS_CYRILLIC }, - { "MS Serif", FW_NORMAL, 20, 16, 4, 4, 0, 8, 15, 120, FS_LATIN2 }, - { "MS Serif", FW_NORMAL, 23, 18, 5, 3, 0, 10, 21, 120, FS_LATIN1 | FS_CYRILLIC }, - { "MS Serif", FW_NORMAL, 23, 18, 5, 3, 0, 10, 19, 120, FS_LATIN2 }, - { "MS Serif", FW_NORMAL, 27, 21, 6, 4, 0, 12, 23, 120, FS_LATIN1 | FS_LATIN2 }, - { "MS Serif", FW_MEDIUM, 27, 22, 5, 2, 0, 12, 30, 120, FS_CYRILLIC }, - { "MS Serif", FW_NORMAL, 33, 26, 7, 3, 0, 14, 30, 120, FS_LATIN1 | FS_LATIN2 }, - { "MS Serif", FW_MEDIUM, 32, 25, 7, 2, 0, 14, 32, 120, FS_CYRILLIC }, - { "MS Serif", FW_NORMAL, 43, 34, 9, 3, 0, 19, 39, 120, FS_LATIN1 | FS_LATIN2 | FS_CYRILLIC }, - - { "Courier", FW_NORMAL, 13, 11, 2, 0, 0, 8, 8, 96, FS_LATIN1 | FS_LATIN2 | FS_CYRILLIC }, - { "Courier", FW_NORMAL, 16, 13, 3, 0, 0, 9, 9, 96, FS_LATIN1 | FS_LATIN2 | FS_CYRILLIC }, - { "Courier", FW_NORMAL, 20, 16, 4, 0, 0, 12, 12, 96, FS_LATIN1 | FS_LATIN2 | FS_CYRILLIC }, - - { "Courier", FW_NORMAL, 16, 13, 3, 0, 0, 9, 9, 120, FS_LATIN1 | FS_LATIN2 | FS_CYRILLIC }, - { "Courier", FW_NORMAL, 20, 16, 4, 0, 0, 12, 12, 120, FS_LATIN1 | FS_LATIN2 | FS_CYRILLIC }, - { "Courier", FW_NORMAL, 25, 20, 5, 0, 0, 15, 15, 120, FS_LATIN1 | FS_LATIN2 | FS_CYRILLIC }, - - { "System", FW_BOLD, 16, 13, 3, 3, 0, 7, 14, 96, FS_LATIN1 }, - { "System", FW_BOLD, 16, 13, 3, 3, 0, 7, 15, 96, FS_LATIN2 | FS_CYRILLIC }, - { "System", FW_NORMAL, 18, 16, 2, 0, 2, 8, 16, 96, FS_JISJAPAN }, - - { "System", FW_BOLD, 20, 16, 4, 4, 0, 9, 14, 120, FS_LATIN1 }, - { "System", FW_BOLD, 20, 16, 4, 4, 0, 9, 17, 120, FS_LATIN2 | FS_CYRILLIC }, - - { "Small Fonts", FW_NORMAL, 3, 2, 1, 0, 0, 1, 2, 96, FS_LATIN1 }, - { "Small Fonts", FW_NORMAL, 3, 2, 1, 0, 0, 1, 8, 96, FS_LATIN2 | FS_CYRILLIC }, - { "Small Fonts", FW_NORMAL, 3, 2, 1, 0, 0, 2, 4, 96, FS_JISJAPAN }, - { "Small Fonts", FW_NORMAL, 5, 4, 1, 1, 0, 3, 4, 96, FS_LATIN1, LANG_ARABIC }, - { "Small Fonts", FW_NORMAL, 5, 4, 1, 1, 0, 2, 8, 96, FS_LATIN2 | FS_CYRILLIC }, - { "Small Fonts", FW_NORMAL, 5, 4, 1, 0, 0, 3, 6, 96, FS_JISJAPAN }, - { "Small Fonts", FW_NORMAL, 6, 5, 1, 1, 0, 3, 13, 96, FS_LATIN1, LANG_ARABIC }, - { "Small Fonts", FW_NORMAL, 6, 5, 1, 1, 0, 3, 8, 96, FS_LATIN2 | FS_CYRILLIC }, - { "Small Fonts", FW_NORMAL, 6, 5, 1, 1, 0, 3, 8, 96, FS_ARABIC }, - { "Small Fonts", FW_NORMAL, 6, 5, 1, 0, 0, 4, 8, 96, FS_JISJAPAN }, - { "Small Fonts", FW_NORMAL, 8, 7, 1, 1, 0, 4, 7, 96, FS_LATIN1, LANG_ARABIC }, - { "Small Fonts", FW_NORMAL, 8, 7, 1, 1, 0, 4, 8, 96, FS_LATIN2 | FS_CYRILLIC }, - { "Small Fonts", FW_NORMAL, 8, 7, 1, 1, 0, 4, 8, 96, FS_ARABIC }, - { "Small Fonts", FW_NORMAL, 8, 7, 1, 0, 0, 5, 10, 96, FS_JISJAPAN }, - { "Small Fonts", FW_NORMAL, 10, 8, 2, 2, 0, 4, 8, 96, FS_LATIN1 | FS_LATIN2, LANG_ARABIC }, - { "Small Fonts", FW_NORMAL, 10, 8, 2, 2, 0, 5, 8, 96, FS_CYRILLIC }, - { "Small Fonts", FW_NORMAL, 10, 8, 2, 2, 0, 4, 9, 96, FS_ARABIC }, - { "Small Fonts", FW_NORMAL, 10, 8, 2, 0, 0, 6, 12, 96, FS_JISJAPAN }, - { "Small Fonts", FW_NORMAL, 11, 9, 2, 2, 0, 5, 9, 96, FS_LATIN1 | FS_LATIN2 | FS_CYRILLIC, LANG_ARABIC }, - { "Small Fonts", FW_NORMAL, 11, 9, 2, 2, 0, 4, 10, 96, FS_ARABIC }, - { "Small Fonts", FW_NORMAL, 11, 9, 2, 0, 0, 7, 14, 96, FS_JISJAPAN }, - - { "Small Fonts", FW_NORMAL, 3, 2, 1, 0, 0, 1, 2, 120, FS_LATIN1 | FS_JISJAPAN }, - { "Small Fonts", FW_NORMAL, 3, 2, 1, 0, 0, 1, 8, 120, FS_LATIN2 | FS_CYRILLIC }, - { "Small Fonts", FW_NORMAL, 6, 5, 1, 1, 0, 3, 5, 120, FS_LATIN1 | FS_JISJAPAN }, - { "Small Fonts", FW_NORMAL, 6, 5, 1, 1, 0, 3, 8, 120, FS_LATIN2 | FS_CYRILLIC }, - { "Small Fonts", FW_NORMAL, 8, 7, 1, 1, 0, 4, 7, 120, FS_LATIN1 | FS_JISJAPAN }, - { "Small Fonts", FW_NORMAL, 8, 7, 1, 1, 0, 4, 8, 120, FS_LATIN2 | FS_CYRILLIC }, - { "Small Fonts", FW_NORMAL, 10, 8, 2, 2, 0, 5, 9, 120, FS_LATIN1 | FS_LATIN2 | FS_JISJAPAN }, - { "Small Fonts", FW_NORMAL, 10, 8, 2, 2, 0, 5, 8, 120, FS_CYRILLIC }, - { "Small Fonts", FW_NORMAL, 12, 10, 2, 2, 0, 5, 10, 120, FS_LATIN1 | FS_LATIN2 | FS_JISJAPAN }, - { "Small Fonts", FW_NORMAL, 12, 10, 2, 2, 0, 6, 10, 120, FS_CYRILLIC }, - { "Small Fonts", FW_NORMAL, 13, 11, 2, 2, 0, 6, 12, 120, FS_LATIN1 | FS_LATIN2 | FS_JISJAPAN }, - { "Small Fonts", FW_NORMAL, 13, 11, 2, 2, 0, 6, 11, 120, FS_CYRILLIC }, - - { "Fixedsys", FW_NORMAL, 15, 12, 3, 3, 0, 8, 8, 96, FS_LATIN1 | FS_LATIN2 }, - { "Fixedsys", FW_NORMAL, 16, 12, 4, 3, 0, 8, 8, 96, FS_CYRILLIC }, - { "FixedSys", FW_NORMAL, 18, 16, 2, 0, 0, 8, 16, 96, FS_JISJAPAN }, - - /* The 120dpi version still has its dpi marked as 96 */ - { "Fixedsys", FW_NORMAL, 20, 16, 4, 2, 0, 10, 10, 96, FS_LATIN1 | FS_LATIN2 | FS_CYRILLIC } - - /* FIXME: add "Terminal" */ - }; - HDC hdc; - LOGFONT lf; - HFONT hfont, old_hfont; - TEXTMETRIC tm; - INT ret, i; - WORD system_lang_id; - - system_lang_id = PRIMARYLANGID(GetSystemDefaultLangID()); - - hdc = CreateCompatibleDC(0); - assert(hdc); - - for (i = 0; i < sizeof(fd)/sizeof(fd[0]); i++) - { - int bit; - - memset(&lf, 0, sizeof(lf)); - - lf.lfHeight = fd[i].height; - strcpy(lf.lfFaceName, fd[i].face_name); - - for(bit = 0; bit < 32; bit++) - { - DWORD fs[2]; - CHARSETINFO csi; - BOOL bRet; - - fs[0] = 1L << bit; - fs[1] = 0; - if((fd[i].ansi_bitfield & fs[0]) == 0) continue; - if(!TranslateCharsetInfo( fs, &csi, TCI_SRCFONTSIG )) continue; - - lf.lfCharSet = csi.ciCharset; - ret = EnumFontFamiliesEx(hdc, &lf, find_font_proc, (LPARAM)&lf, 0); - if (ret) continue; - - hfont = create_font(lf.lfFaceName, &lf); - old_hfont = SelectObject(hdc, hfont); - bRet = GetTextMetrics(hdc, &tm); - ok(bRet, "GetTextMetrics error %d\n", GetLastError()); - if(fd[i].dpi == tm.tmDigitizedAspectX) - { - trace("found font %s, height %d charset %x dpi %d\n", lf.lfFaceName, lf.lfHeight, lf.lfCharSet, fd[i].dpi); - if (fd[i].skip_lang_id == 0 || system_lang_id != fd[i].skip_lang_id) - { - ok(tm.tmWeight == fd[i].weight, "%s(%d): tm.tmWeight %d != %d\n", fd[i].face_name, fd[i].height, tm.tmWeight, fd[i].weight); - ok(tm.tmHeight == fd[i].height, "%s(%d): tm.tmHeight %d != %d\n", fd[i].face_name, fd[i].height, tm.tmHeight, fd[i].height); - ok(tm.tmAscent == fd[i].ascent, "%s(%d): tm.tmAscent %d != %d\n", fd[i].face_name, fd[i].height, tm.tmAscent, fd[i].ascent); - ok(tm.tmDescent == fd[i].descent, "%s(%d): tm.tmDescent %d != %d\n", fd[i].face_name, fd[i].height, tm.tmDescent, fd[i].descent); - ok(tm.tmInternalLeading == fd[i].int_leading, "%s(%d): tm.tmInternalLeading %d != %d\n", fd[i].face_name, fd[i].height, tm.tmInternalLeading, fd[i].int_leading); - ok(tm.tmExternalLeading == fd[i].ext_leading, "%s(%d): tm.tmExternalLeading %d != %d\n", fd[i].face_name, fd[i].height, tm.tmExternalLeading, fd[i].ext_leading); - ok(tm.tmAveCharWidth == fd[i].ave_char_width, "%s(%d): tm.tmAveCharWidth %d != %d\n", fd[i].face_name, fd[i].height, tm.tmAveCharWidth, fd[i].ave_char_width); - - /* Don't run the max char width test on System/ANSI_CHARSET. We have extra characters in our font - that make the max width bigger */ - if(strcmp(lf.lfFaceName, "System") || lf.lfCharSet != ANSI_CHARSET) - ok(tm.tmMaxCharWidth == fd[i].max_char_width, "%s(%d): tm.tmMaxCharWidth %d != %d\n", fd[i].face_name, fd[i].height, tm.tmMaxCharWidth, fd[i].max_char_width); - } - else - skip("Skipping font metrics test for system langid 0x%x\n", - system_lang_id); - } - SelectObject(hdc, old_hfont); - DeleteObject(hfont); - } - } - - DeleteDC(hdc); -} - -static void test_GdiGetCharDimensions(void) -{ - HDC hdc; - TEXTMETRICW tm; - LONG ret; - SIZE size; - LONG avgwidth, height; - static const char szAlphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; - - if (!pGdiGetCharDimensions) - { - win_skip("GdiGetCharDimensions not available on this platform\n"); - return; - } - - hdc = CreateCompatibleDC(NULL); - - GetTextExtentPoint(hdc, szAlphabet, strlen(szAlphabet), &size); - avgwidth = ((size.cx / 26) + 1) / 2; - - ret = pGdiGetCharDimensions(hdc, &tm, &height); - ok(ret == avgwidth, "GdiGetCharDimensions should have returned width of %d instead of %d\n", avgwidth, ret); - ok(height == tm.tmHeight, "GdiGetCharDimensions should have set height to %d instead of %d\n", tm.tmHeight, height); - - ret = pGdiGetCharDimensions(hdc, &tm, NULL); - ok(ret == avgwidth, "GdiGetCharDimensions should have returned width of %d instead of %d\n", avgwidth, ret); - - ret = pGdiGetCharDimensions(hdc, NULL, NULL); - ok(ret == avgwidth, "GdiGetCharDimensions should have returned width of %d instead of %d\n", avgwidth, ret); - - height = 0; - ret = pGdiGetCharDimensions(hdc, NULL, &height); - ok(ret == avgwidth, "GdiGetCharDimensions should have returned width of %d instead of %d\n", avgwidth, ret); - ok(height == size.cy, "GdiGetCharDimensions should have set height to %d instead of %d\n", size.cy, height); - - DeleteDC(hdc); -} - -static int CALLBACK create_font_proc(const LOGFONT *lpelfe, - const TEXTMETRIC *lpntme, - DWORD FontType, LPARAM lParam) -{ - if (FontType & TRUETYPE_FONTTYPE) - { - HFONT hfont; - - hfont = CreateFontIndirect(lpelfe); - if (hfont) - { - *(HFONT *)lParam = hfont; - return 0; - } - } - - return 1; -} - -static void test_GetCharABCWidths(void) -{ - static const WCHAR str[] = {'a',0}; - BOOL ret; - HDC hdc; - LOGFONTA lf; - HFONT hfont; - ABC abc[1]; - WORD glyphs[1]; - DWORD nb; - static const struct - { - UINT first; - UINT last; - } range[] = - { - {0xff, 0xff}, - {0x100, 0x100}, - {0xff, 0x100}, - {0x1ff, 0xff00}, - {0xffff, 0xffff}, - {0x10000, 0x10000}, - {0xffff, 0x10000}, - {0xffffff, 0xffffff}, - {0x1000000, 0x1000000}, - {0xffffff, 0x1000000}, - {0xffffffff, 0xffffffff} - }; - static const struct - { - UINT cs; - UINT a; - UINT w; - BOOL r[sizeof range / sizeof range[0]]; - } c[] = - { - {ANSI_CHARSET, 0x30, 0x30, {TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE}}, - {SHIFTJIS_CHARSET, 0x82a0, 0x3042, {TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE}}, - {HANGEUL_CHARSET, 0x8141, 0xac02, {TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE}}, - {JOHAB_CHARSET, 0x8446, 0x3135, {TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE}}, - {GB2312_CHARSET, 0x8141, 0x4e04, {TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE}}, - {CHINESEBIG5_CHARSET, 0xa142, 0x3001, {TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE}} - }; - UINT i; - - if (!pGetCharABCWidthsA || !pGetCharABCWidthsW || !pGetCharABCWidthsI) - { - win_skip("GetCharABCWidthsA/W/I not available on this platform\n"); - return; - } - - memset(&lf, 0, sizeof(lf)); - strcpy(lf.lfFaceName, "System"); - lf.lfHeight = 20; - - hfont = CreateFontIndirectA(&lf); - hdc = GetDC(0); - hfont = SelectObject(hdc, hfont); - - nb = pGetGlyphIndicesW(hdc, str, 1, glyphs, 0); - ok(nb == 1, "GetGlyphIndicesW should have returned 1\n"); - - ret = pGetCharABCWidthsI(NULL, 0, 1, glyphs, abc); - ok(!ret, "GetCharABCWidthsI should have failed\n"); - - ret = pGetCharABCWidthsI(hdc, 0, 1, glyphs, NULL); - ok(!ret, "GetCharABCWidthsI should have failed\n"); - - ret = pGetCharABCWidthsI(hdc, 0, 1, glyphs, abc); - ok(ret, "GetCharABCWidthsI should have succeeded\n"); - - ret = pGetCharABCWidthsW(NULL, 'a', 'a', abc); - ok(!ret, "GetCharABCWidthsW should have failed\n"); - - ret = pGetCharABCWidthsW(hdc, 'a', 'a', NULL); - ok(!ret, "GetCharABCWidthsW should have failed\n"); - - ret = pGetCharABCWidthsW(hdc, 'a', 'a', abc); - ok(!ret, "GetCharABCWidthsW should have failed\n"); - - hfont = SelectObject(hdc, hfont); - DeleteObject(hfont); - - for (i = 0; i < sizeof c / sizeof c[0]; ++i) - { - ABC a[2], w[2]; - ABC full[256]; - UINT code = 0x41, j; - - lf.lfFaceName[0] = '\0'; - lf.lfCharSet = c[i].cs; - lf.lfPitchAndFamily = 0; - if (EnumFontFamiliesEx(hdc, &lf, create_font_proc, (LPARAM)&hfont, 0)) - { - skip("TrueType font for charset %u is not installed\n", c[i].cs); - continue; - } - - memset(a, 0, sizeof a); - memset(w, 0, sizeof w); - hfont = SelectObject(hdc, hfont); - ok(pGetCharABCWidthsA(hdc, c[i].a, c[i].a + 1, a) && - pGetCharABCWidthsW(hdc, c[i].w, c[i].w + 1, w) && - memcmp(a, w, sizeof a) == 0, - "GetCharABCWidthsA and GetCharABCWidthsW should return same widths. charset = %u\n", c[i].cs); - - memset(a, 0xbb, sizeof a); - ret = pGetCharABCWidthsA(hdc, code, code, a); - ok(ret, "GetCharABCWidthsA should have succeeded\n"); - memset(full, 0xcc, sizeof full); - ret = pGetCharABCWidthsA(hdc, 0x00, code, full); - ok(ret, "GetCharABCWidthsA should have succeeded\n"); - ok(memcmp(&a[0], &full[code], sizeof(ABC)) == 0, - "GetCharABCWidthsA info should match. codepage = %u\n", c[i].cs); - - for (j = 0; j < sizeof range / sizeof range[0]; ++j) - { - ret = pGetCharABCWidthsA(hdc, range[j].first, range[j].last, full); - ok(ret == c[i].r[j], "GetCharABCWidthsA %x - %x should have %s\n", - range[j].first, range[j].last, c[i].r[j] ? "succeeded" : "failed"); - } - - hfont = SelectObject(hdc, hfont); - DeleteObject(hfont); - } - - ReleaseDC(NULL, hdc); -} - -static void test_text_extents(void) -{ - static const WCHAR wt[] = {'O','n','e','\n','t','w','o',' ','3',0}; - LPINT extents; - INT i, len, fit1, fit2; - LOGFONTA lf; - TEXTMETRICA tm; - HDC hdc; - HFONT hfont; - SIZE sz; - SIZE sz1, sz2; - - memset(&lf, 0, sizeof(lf)); - strcpy(lf.lfFaceName, "Arial"); - lf.lfHeight = 20; - - hfont = CreateFontIndirectA(&lf); - hdc = GetDC(0); - hfont = SelectObject(hdc, hfont); - GetTextMetricsA(hdc, &tm); - GetTextExtentPointA(hdc, "o", 1, &sz); - ok(sz.cy == tm.tmHeight, "cy %d tmHeight %d\n", sz.cy, tm.tmHeight); - - SetLastError(0xdeadbeef); - GetTextExtentExPointW(hdc, wt, 1, 1, &fit1, &fit2, &sz1); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("Skipping remainder of text extents test on a Win9x platform\n"); - hfont = SelectObject(hdc, hfont); - DeleteObject(hfont); - ReleaseDC(0, hdc); - return; - } - - len = lstrlenW(wt); - extents = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len * sizeof extents[0]); - extents[0] = 1; /* So that the increasing sequence test will fail - if the extents array is untouched. */ - GetTextExtentExPointW(hdc, wt, len, 32767, &fit1, extents, &sz1); - GetTextExtentPointW(hdc, wt, len, &sz2); - ok(sz1.cy == sz2.cy, - "cy from GetTextExtentExPointW (%d) and GetTextExtentPointW (%d) differ\n", sz1.cy, sz2.cy); - /* Because of the '\n' in the string GetTextExtentExPoint and - GetTextExtentPoint return different widths under Win2k, but - under WinXP they return the same width. So we don't test that - here. */ - - for (i = 1; i < len; ++i) - ok(extents[i-1] <= extents[i], - "GetTextExtentExPointW generated a non-increasing sequence of partial extents (at position %d)\n", - i); - ok(extents[len-1] == sz1.cx, "GetTextExtentExPointW extents and size don't match\n"); - ok(0 <= fit1 && fit1 <= len, "GetTextExtentExPointW generated illegal value %d for fit\n", fit1); - ok(0 < fit1, "GetTextExtentExPointW says we can't even fit one letter in 32767 logical units\n"); - GetTextExtentExPointW(hdc, wt, len, extents[2], &fit2, NULL, &sz2); - ok(sz1.cx == sz2.cx && sz1.cy == sz2.cy, "GetTextExtentExPointW returned different sizes for the same string\n"); - ok(fit2 == 3, "GetTextExtentExPointW extents isn't consistent with fit\n"); - GetTextExtentExPointW(hdc, wt, len, extents[2]-1, &fit2, NULL, &sz2); - ok(fit2 == 2, "GetTextExtentExPointW extents isn't consistent with fit\n"); - GetTextExtentExPointW(hdc, wt, 2, 0, NULL, extents + 2, &sz2); - ok(extents[0] == extents[2] && extents[1] == extents[3], - "GetTextExtentExPointW with lpnFit == NULL returns incorrect results\n"); - GetTextExtentExPointW(hdc, wt, 2, 0, NULL, NULL, &sz1); - ok(sz1.cx == sz2.cx && sz1.cy == sz2.cy, - "GetTextExtentExPointW with lpnFit and alpDx both NULL returns incorrect results\n"); - HeapFree(GetProcessHeap(), 0, extents); - - hfont = SelectObject(hdc, hfont); - DeleteObject(hfont); - ReleaseDC(NULL, hdc); -} - -static void test_GetGlyphIndices(void) -{ - HDC hdc; - HFONT hfont; - DWORD charcount; - LOGFONTA lf; - DWORD flags = 0; - WCHAR testtext[] = {'T','e','s','t',0xffff,0}; - WORD glyphs[(sizeof(testtext)/2)-1]; - TEXTMETRIC textm; - HFONT hOldFont; - - if (!pGetGlyphIndicesW) { - win_skip("GetGlyphIndicesW not available on platform\n"); - return; - } - - hdc = GetDC(0); - - memset(&lf, 0, sizeof(lf)); - strcpy(lf.lfFaceName, "System"); - lf.lfHeight = 16; - lf.lfCharSet = ANSI_CHARSET; - - hfont = CreateFontIndirectA(&lf); - ok(hfont != 0, "CreateFontIndirectEx failed\n"); - ok(GetTextMetrics(hdc, &textm), "GetTextMetric failed\n"); - if (textm.tmCharSet == ANSI_CHARSET) - { - flags |= GGI_MARK_NONEXISTING_GLYPHS; - charcount = pGetGlyphIndicesW(hdc, testtext, (sizeof(testtext)/2)-1, glyphs, flags); - ok(charcount == 5, "GetGlyphIndicesW count of glyphs should = 5 not %d\n", charcount); - ok((glyphs[4] == 0x001f || glyphs[4] == 0xffff /* Vista */), "GetGlyphIndicesW should have returned a nonexistent char not %04x\n", glyphs[4]); - flags = 0; - charcount = pGetGlyphIndicesW(hdc, testtext, (sizeof(testtext)/2)-1, glyphs, flags); - ok(charcount == 5, "GetGlyphIndicesW count of glyphs should = 5 not %d\n", charcount); - ok(glyphs[4] == textm.tmDefaultChar, "GetGlyphIndicesW should have returned a %04x not %04x\n", - textm.tmDefaultChar, glyphs[4]); - } - else - /* FIXME: Write tests for non-ANSI charsets. */ - skip("GetGlyphIndices System font tests only for ANSI_CHARSET\n"); - - if(!is_font_installed("Tahoma")) - { - skip("Tahoma is not installed so skipping this test\n"); - return; - } - memset(&lf, 0, sizeof(lf)); - strcpy(lf.lfFaceName, "Tahoma"); - lf.lfHeight = 20; - - hfont = CreateFontIndirectA(&lf); - hOldFont = SelectObject(hdc, hfont); - ok(GetTextMetrics(hdc, &textm), "GetTextMetric failed\n"); - flags |= GGI_MARK_NONEXISTING_GLYPHS; - charcount = pGetGlyphIndicesW(hdc, testtext, (sizeof(testtext)/2)-1, glyphs, flags); - ok(charcount == 5, "GetGlyphIndicesW count of glyphs should = 5 not %d\n", charcount); - ok(glyphs[4] == 0xffff, "GetGlyphIndicesW should have returned 0xffff char not %04x\n", glyphs[4]); - flags = 0; - testtext[0] = textm.tmDefaultChar; - charcount = pGetGlyphIndicesW(hdc, testtext, (sizeof(testtext)/2)-1, glyphs, flags); - ok(charcount == 5, "GetGlyphIndicesW count of glyphs should = 5 not %d\n", charcount); - ok(glyphs[0] == 0, "GetGlyphIndicesW for tmDefaultChar should be 0 not %04x\n", glyphs[0]); - ok(glyphs[4] == 0, "GetGlyphIndicesW should have returned 0 not %04x\n", glyphs[4]); - DeleteObject(SelectObject(hdc, hOldFont)); -} - -static void test_GetKerningPairs(void) -{ - static const struct kerning_data - { - const char face_name[LF_FACESIZE]; - LONG height; - /* some interesting fields from OUTLINETEXTMETRIC */ - LONG tmHeight, tmAscent, tmDescent; - UINT otmEMSquare; - INT otmAscent; - INT otmDescent; - UINT otmLineGap; - UINT otmsCapEmHeight; - UINT otmsXHeight; - INT otmMacAscent; - INT otmMacDescent; - UINT otmMacLineGap; - UINT otmusMinimumPPEM; - /* small subset of kerning pairs to test */ - DWORD total_kern_pairs; - const KERNINGPAIR kern_pair[26]; - } kd[] = - { - {"Arial", 12, 12, 9, 3, - 2048, 7, -2, 1, 5, 2, 8, -2, 0, 9, - 26, - { - {' ','A',-1},{' ','T',0},{' ','Y',0},{'1','1',-1}, - {'A',' ',-1},{'A','T',-1},{'A','V',-1},{'A','W',0}, - {'A','Y',-1},{'A','v',0},{'A','w',0},{'A','y',0}, - {'F',',',-1},{'F','.',-1},{'F','A',-1},{'L',' ',0}, - {'L','T',-1},{'L','V',-1},{'L','W',-1},{'L','Y',-1}, - {915,912,+1},{915,913,-1},{910,912,+1},{910,913,-1}, - {933,970,+1},{933,972,-1} - } - }, - {"Arial", -34, 39, 32, 7, - 2048, 25, -7, 5, 17, 9, 31, -7, 1, 9, - 26, - { - {' ','A',-2},{' ','T',-1},{' ','Y',-1},{'1','1',-3}, - {'A',' ',-2},{'A','T',-3},{'A','V',-3},{'A','W',-1}, - {'A','Y',-3},{'A','v',-1},{'A','w',-1},{'A','y',-1}, - {'F',',',-4},{'F','.',-4},{'F','A',-2},{'L',' ',-1}, - {'L','T',-3},{'L','V',-3},{'L','W',-3},{'L','Y',-3}, - {915,912,+3},{915,913,-3},{910,912,+3},{910,913,-3}, - {933,970,+2},{933,972,-3} - } - }, - { "Arial", 120, 120, 97, 23, - 2048, 79, -23, 16, 54, 27, 98, -23, 4, 9, - 26, - { - {' ','A',-6},{' ','T',-2},{' ','Y',-2},{'1','1',-8}, - {'A',' ',-6},{'A','T',-8},{'A','V',-8},{'A','W',-4}, - {'A','Y',-8},{'A','v',-2},{'A','w',-2},{'A','y',-2}, - {'F',',',-12},{'F','.',-12},{'F','A',-6},{'L',' ',-4}, - {'L','T',-8},{'L','V',-8},{'L','W',-8},{'L','Y',-8}, - {915,912,+9},{915,913,-10},{910,912,+9},{910,913,-8}, - {933,970,+6},{933,972,-10} - } - }, -#if 0 /* this set fails due to +1/-1 errors (rounding bug?), needs investigation. */ - { "Arial", 1024 /* usually 1/2 of EM Square */, 1024, 830, 194, - 2048, 668, -193, 137, 459, 229, 830, -194, 30, 9, - 26, - { - {' ','A',-51},{' ','T',-17},{' ','Y',-17},{'1','1',-68}, - {'A',' ',-51},{'A','T',-68},{'A','V',-68},{'A','W',-34}, - {'A','Y',-68},{'A','v',-17},{'A','w',-17},{'A','y',-17}, - {'F',',',-102},{'F','.',-102},{'F','A',-51},{'L',' ',-34}, - {'L','T',-68},{'L','V',-68},{'L','W',-68},{'L','Y',-68}, - {915,912,+73},{915,913,-84},{910,912,+76},{910,913,-68}, - {933,970,+54},{933,972,-83} - } - } -#endif - }; - LOGFONT lf; - HFONT hfont, hfont_old; - KERNINGPAIR *kern_pair; - HDC hdc; - DWORD total_kern_pairs, ret, i, n, matches; - - hdc = GetDC(0); - - /* GetKerningPairsA maps unicode set of kerning pairs to current code page - * which may render this test unusable, so we're trying to avoid that. - */ - SetLastError(0xdeadbeef); - GetKerningPairsW(hdc, 0, NULL); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("Skipping the GetKerningPairs test on a Win9x platform\n"); - ReleaseDC(0, hdc); - return; - } - - for (i = 0; i < sizeof(kd)/sizeof(kd[0]); i++) - { - OUTLINETEXTMETRICW otm; - UINT uiRet; - - if (!is_font_installed(kd[i].face_name)) - { - trace("%s is not installed so skipping this test\n", kd[i].face_name); - continue; - } - - trace("testing font %s, height %d\n", kd[i].face_name, kd[i].height); - - memset(&lf, 0, sizeof(lf)); - strcpy(lf.lfFaceName, kd[i].face_name); - lf.lfHeight = kd[i].height; - hfont = CreateFontIndirect(&lf); - assert(hfont != 0); - - hfont_old = SelectObject(hdc, hfont); - - SetLastError(0xdeadbeef); - otm.otmSize = sizeof(otm); /* just in case for Win9x compatibility */ - uiRet = GetOutlineTextMetricsW(hdc, sizeof(otm), &otm); - ok(uiRet == sizeof(otm), "GetOutlineTextMetricsW error %d\n", GetLastError()); - - ok(match_off_by_1(kd[i].tmHeight, otm.otmTextMetrics.tmHeight), "expected %d, got %d\n", - kd[i].tmHeight, otm.otmTextMetrics.tmHeight); - ok(match_off_by_1(kd[i].tmAscent, otm.otmTextMetrics.tmAscent), "expected %d, got %d\n", - kd[i].tmAscent, otm.otmTextMetrics.tmAscent); - ok(kd[i].tmDescent == otm.otmTextMetrics.tmDescent, "expected %d, got %d\n", - kd[i].tmDescent, otm.otmTextMetrics.tmDescent); - - ok(kd[i].otmEMSquare == otm.otmEMSquare, "expected %u, got %u\n", - kd[i].otmEMSquare, otm.otmEMSquare); - ok(kd[i].otmAscent == otm.otmAscent, "expected %d, got %d\n", - kd[i].otmAscent, otm.otmAscent); - ok(kd[i].otmDescent == otm.otmDescent, "expected %d, got %d\n", - kd[i].otmDescent, otm.otmDescent); - ok(kd[i].otmLineGap == otm.otmLineGap, "expected %u, got %u\n", - kd[i].otmLineGap, otm.otmLineGap); - ok(near_match(kd[i].otmMacDescent, otm.otmMacDescent), "expected %d, got %d\n", - kd[i].otmMacDescent, otm.otmMacDescent); - ok(near_match(kd[i].otmMacAscent, otm.otmMacAscent), "expected %d, got %d\n", - kd[i].otmMacAscent, otm.otmMacAscent); -todo_wine { - ok(kd[i].otmsCapEmHeight == otm.otmsCapEmHeight, "expected %u, got %u\n", - kd[i].otmsCapEmHeight, otm.otmsCapEmHeight); - ok(kd[i].otmsXHeight == otm.otmsXHeight, "expected %u, got %u\n", - kd[i].otmsXHeight, otm.otmsXHeight); - /* FIXME: this one sometimes succeeds due to expected 0, enable it when removing todo */ - if (0) ok(kd[i].otmMacLineGap == otm.otmMacLineGap, "expected %u, got %u\n", - kd[i].otmMacLineGap, otm.otmMacLineGap); - ok(kd[i].otmusMinimumPPEM == otm.otmusMinimumPPEM, "expected %u, got %u\n", - kd[i].otmusMinimumPPEM, otm.otmusMinimumPPEM); -} - - total_kern_pairs = GetKerningPairsW(hdc, 0, NULL); - trace("total_kern_pairs %u\n", total_kern_pairs); - kern_pair = HeapAlloc(GetProcessHeap(), 0, total_kern_pairs * sizeof(*kern_pair)); - -#if 0 /* Win98 (GetKerningPairsA) and XP behave differently here, the test passes on XP */ - SetLastError(0xdeadbeef); - ret = GetKerningPairsW(hdc, 0, kern_pair); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "got error %ld, expected ERROR_INVALID_PARAMETER\n", GetLastError()); - ok(ret == 0, "got %lu, expected 0\n", ret); -#endif - - ret = GetKerningPairsW(hdc, 100, NULL); - ok(ret == total_kern_pairs, "got %u, expected %u\n", ret, total_kern_pairs); - - ret = GetKerningPairsW(hdc, total_kern_pairs/2, kern_pair); - ok(ret == total_kern_pairs/2, "got %u, expected %u\n", ret, total_kern_pairs/2); - - ret = GetKerningPairsW(hdc, total_kern_pairs, kern_pair); - ok(ret == total_kern_pairs, "got %u, expected %u\n", ret, total_kern_pairs); - - matches = 0; - - for (n = 0; n < ret; n++) - { - DWORD j; -#if 0 - if (kern_pair[n].wFirst < 127 && kern_pair[n].wSecond < 127) - trace("{'%c','%c',%d},\n", - kern_pair[n].wFirst, kern_pair[n].wSecond, kern_pair[n].iKernAmount); -#endif - for (j = 0; j < kd[i].total_kern_pairs; j++) - { - if (kern_pair[n].wFirst == kd[i].kern_pair[j].wFirst && - kern_pair[n].wSecond == kd[i].kern_pair[j].wSecond) - { - ok(kern_pair[n].iKernAmount == kd[i].kern_pair[j].iKernAmount, - "pair %d:%d got %d, expected %d\n", - kern_pair[n].wFirst, kern_pair[n].wSecond, - kern_pair[n].iKernAmount, kd[i].kern_pair[j].iKernAmount); - matches++; - } - } - } - - ok(matches == kd[i].total_kern_pairs, "got matches %u, expected %u\n", - matches, kd[i].total_kern_pairs); - - HeapFree(GetProcessHeap(), 0, kern_pair); - - SelectObject(hdc, hfont_old); - DeleteObject(hfont); - } - - ReleaseDC(0, hdc); -} - -static void test_height_selection(void) -{ - static const struct font_data - { - const char face_name[LF_FACESIZE]; - int requested_height; - int weight, height, ascent, descent, int_leading, ext_leading, dpi; - } fd[] = - { - {"Tahoma", -12, FW_NORMAL, 14, 12, 2, 2, 0, 96 }, - {"Tahoma", -24, FW_NORMAL, 29, 24, 5, 5, 0, 96 }, - {"Tahoma", -48, FW_NORMAL, 58, 48, 10, 10, 0, 96 }, - {"Tahoma", -96, FW_NORMAL, 116, 96, 20, 20, 0, 96 }, - {"Tahoma", -192, FW_NORMAL, 232, 192, 40, 40, 0, 96 }, - {"Tahoma", 12, FW_NORMAL, 12, 10, 2, 2, 0, 96 }, - {"Tahoma", 24, FW_NORMAL, 24, 20, 4, 4, 0, 96 }, - {"Tahoma", 48, FW_NORMAL, 48, 40, 8, 8, 0, 96 }, - {"Tahoma", 96, FW_NORMAL, 96, 80, 16, 17, 0, 96 }, - {"Tahoma", 192, FW_NORMAL, 192, 159, 33, 33, 0, 96 } - }; - HDC hdc; - LOGFONT lf; - HFONT hfont, old_hfont; - TEXTMETRIC tm; - INT ret, i; - - hdc = CreateCompatibleDC(0); - assert(hdc); - - for (i = 0; i < sizeof(fd)/sizeof(fd[0]); i++) - { - if (!is_truetype_font_installed(fd[i].face_name)) - { - skip("%s is not installed\n", fd[i].face_name); - continue; - } - - memset(&lf, 0, sizeof(lf)); - lf.lfHeight = fd[i].requested_height; - lf.lfWeight = fd[i].weight; - strcpy(lf.lfFaceName, fd[i].face_name); - - hfont = CreateFontIndirect(&lf); - assert(hfont); - - old_hfont = SelectObject(hdc, hfont); - ret = GetTextMetrics(hdc, &tm); - ok(ret, "GetTextMetrics error %d\n", GetLastError()); - if(fd[i].dpi == tm.tmDigitizedAspectX) - { - trace("found font %s, height %d charset %x dpi %d\n", lf.lfFaceName, lf.lfHeight, lf.lfCharSet, fd[i].dpi); - ok(tm.tmWeight == fd[i].weight, "%s(%d): tm.tmWeight %d != %d\n", fd[i].face_name, fd[i].requested_height, tm.tmWeight, fd[i].weight); - ok(match_off_by_1(tm.tmHeight, fd[i].height), "%s(%d): tm.tmHeight %d != %d\n", fd[i].face_name, fd[i].requested_height, tm.tmHeight, fd[i].height); - ok(match_off_by_1(tm.tmAscent, fd[i].ascent), "%s(%d): tm.tmAscent %d != %d\n", fd[i].face_name, fd[i].requested_height, tm.tmAscent, fd[i].ascent); - ok(match_off_by_1(tm.tmDescent, fd[i].descent), "%s(%d): tm.tmDescent %d != %d\n", fd[i].face_name, fd[i].requested_height, tm.tmDescent, fd[i].descent); -#if 0 /* FIXME: calculation of tmInternalLeading in Wine doesn't match what Windows does */ - ok(tm.tmInternalLeading == fd[i].int_leading, "%s(%d): tm.tmInternalLeading %d != %d\n", fd[i].face_name, fd[i].requested_height, tm.tmInternalLeading, fd[i].int_leading); -#endif - ok(tm.tmExternalLeading == fd[i].ext_leading, "%s(%d): tm.tmExternalLeading %d != %d\n", fd[i].face_name, fd[i].requested_height, tm.tmExternalLeading, fd[i].ext_leading); - } - - SelectObject(hdc, old_hfont); - DeleteObject(hfont); - } - - DeleteDC(hdc); -} - -static void test_GetOutlineTextMetrics(void) -{ - OUTLINETEXTMETRIC *otm; - LOGFONT lf; - HFONT hfont, hfont_old; - HDC hdc; - DWORD ret, otm_size; - LPSTR unset_ptr; - - if (!is_font_installed("Arial")) - { - skip("Arial is not installed\n"); - return; - } - - hdc = GetDC(0); - - memset(&lf, 0, sizeof(lf)); - strcpy(lf.lfFaceName, "Arial"); - lf.lfHeight = -13; - lf.lfWeight = FW_NORMAL; - lf.lfPitchAndFamily = DEFAULT_PITCH; - lf.lfQuality = PROOF_QUALITY; - hfont = CreateFontIndirect(&lf); - assert(hfont != 0); - - hfont_old = SelectObject(hdc, hfont); - otm_size = GetOutlineTextMetrics(hdc, 0, NULL); - trace("otm buffer size %u (0x%x)\n", otm_size, otm_size); - - otm = HeapAlloc(GetProcessHeap(), 0, otm_size); - - memset(otm, 0xAA, otm_size); - SetLastError(0xdeadbeef); - otm->otmSize = sizeof(*otm); /* just in case for Win9x compatibility */ - ret = GetOutlineTextMetrics(hdc, otm->otmSize, otm); - ok(ret == 1 /* Win9x */ || - ret == otm->otmSize /* XP*/, - "expected %u, got %u, error %d\n", otm->otmSize, ret, GetLastError()); - if (ret != 1) /* Win9x doesn't care about pointing beyond of the buffer */ - { - ok(otm->otmpFamilyName == NULL, "expected NULL got %p\n", otm->otmpFamilyName); - ok(otm->otmpFaceName == NULL, "expected NULL got %p\n", otm->otmpFaceName); - ok(otm->otmpStyleName == NULL, "expected NULL got %p\n", otm->otmpStyleName); - ok(otm->otmpFullName == NULL, "expected NULL got %p\n", otm->otmpFullName); - } - - memset(otm, 0xAA, otm_size); - SetLastError(0xdeadbeef); - otm->otmSize = otm_size; /* just in case for Win9x compatibility */ - ret = GetOutlineTextMetrics(hdc, otm->otmSize, otm); - ok(ret == 1 /* Win9x */ || - ret == otm->otmSize /* XP*/, - "expected %u, got %u, error %d\n", otm->otmSize, ret, GetLastError()); - if (ret != 1) /* Win9x doesn't care about pointing beyond of the buffer */ - { - ok(otm->otmpFamilyName != NULL, "expected not NULL got %p\n", otm->otmpFamilyName); - ok(otm->otmpFaceName != NULL, "expected not NULL got %p\n", otm->otmpFaceName); - ok(otm->otmpStyleName != NULL, "expected not NULL got %p\n", otm->otmpStyleName); - ok(otm->otmpFullName != NULL, "expected not NULL got %p\n", otm->otmpFullName); - } - - /* ask about truncated data */ - memset(otm, 0xAA, otm_size); - memset(&unset_ptr, 0xAA, sizeof(unset_ptr)); - SetLastError(0xdeadbeef); - otm->otmSize = sizeof(*otm) - sizeof(LPSTR); /* just in case for Win9x compatibility */ - ret = GetOutlineTextMetrics(hdc, otm->otmSize, otm); - ok(ret == 1 /* Win9x */ || - ret == otm->otmSize /* XP*/, - "expected %u, got %u, error %d\n", otm->otmSize, ret, GetLastError()); - if (ret != 1) /* Win9x doesn't care about pointing beyond of the buffer */ - { - ok(otm->otmpFamilyName == NULL, "expected NULL got %p\n", otm->otmpFamilyName); - ok(otm->otmpFaceName == NULL, "expected NULL got %p\n", otm->otmpFaceName); - ok(otm->otmpStyleName == NULL, "expected NULL got %p\n", otm->otmpStyleName); - } - ok(otm->otmpFullName == unset_ptr, "expected %p got %p\n", unset_ptr, otm->otmpFullName); - - HeapFree(GetProcessHeap(), 0, otm); - - SelectObject(hdc, hfont_old); - DeleteObject(hfont); - - ReleaseDC(0, hdc); -} - -static void testJustification(HDC hdc, PSTR str, RECT *clientArea) -{ - INT y, - breakCount, - justifiedWidth = 0, /* to test GetTextExtentExPointW() */ - areaWidth = clientArea->right - clientArea->left, - nErrors = 0, e; - BOOL lastExtent = FALSE; - PSTR pFirstChar, pLastChar; - SIZE size; - TEXTMETRICA tm; - struct err - { - char extent[100]; - int GetTextExtentExPointWWidth; - } error[10]; - - GetTextMetricsA(hdc, &tm); - y = clientArea->top; - do { - breakCount = 0; - while (*str == tm.tmBreakChar) str++; /* skip leading break chars */ - pFirstChar = str; - - do { - pLastChar = str; - - /* if not at the end of the string, ... */ - if (*str == '\0') break; - /* ... add the next word to the current extent */ - while (*str != '\0' && *str++ != tm.tmBreakChar); - breakCount++; - SetTextJustification(hdc, 0, 0); - GetTextExtentPoint32(hdc, pFirstChar, str - pFirstChar - 1, &size); - } while ((int) size.cx < areaWidth); - - /* ignore trailing break chars */ - breakCount--; - while (*(pLastChar - 1) == tm.tmBreakChar) - { - pLastChar--; - breakCount--; - } - - if (*str == '\0' || breakCount <= 0) pLastChar = str; - - SetTextJustification(hdc, 0, 0); - GetTextExtentPoint32(hdc, pFirstChar, pLastChar - pFirstChar, &size); - - /* do not justify the last extent */ - if (*str != '\0' && breakCount > 0) - { - SetTextJustification(hdc, areaWidth - size.cx, breakCount); - GetTextExtentPoint32(hdc, pFirstChar, pLastChar - pFirstChar, &size); - justifiedWidth = size.cx; - } - else lastExtent = TRUE; - - /* catch errors and report them */ - if (!lastExtent && (justifiedWidth != areaWidth)) - { - memset(error[nErrors].extent, 0, 100); - memcpy(error[nErrors].extent, pFirstChar, pLastChar - pFirstChar); - error[nErrors].GetTextExtentExPointWWidth = justifiedWidth; - nErrors++; - } - - y += size.cy; - str = pLastChar; - } while (*str && y < clientArea->bottom); - - for (e = 0; e < nErrors; e++) - { - /* The width returned by GetTextExtentPoint32() is exactly the same - returned by GetTextExtentExPointW() - see dlls/gdi32/font.c */ - ok(error[e].GetTextExtentExPointWWidth == areaWidth, - "GetTextExtentPointW() for \"%s\" should have returned a width of %d, not %d.\n", - error[e].extent, areaWidth, error[e].GetTextExtentExPointWWidth); - } -} - -static void test_SetTextJustification(void) -{ - HDC hdc; - RECT clientArea; - LOGFONTA lf; - HFONT hfont; - HWND hwnd; - static char testText[] = - "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do " - "eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut " - "enim ad minim veniam, quis nostrud exercitation ullamco laboris " - "nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in " - "reprehenderit in voluptate velit esse cillum dolore eu fugiat " - "nulla pariatur. Excepteur sint occaecat cupidatat non proident, " - "sunt in culpa qui officia deserunt mollit anim id est laborum."; - - hwnd = CreateWindowExA(0, "static", "", WS_POPUP, 0,0, 400,400, 0, 0, 0, NULL); - GetClientRect( hwnd, &clientArea ); - hdc = GetDC( hwnd ); - - memset(&lf, 0, sizeof lf); - lf.lfCharSet = ANSI_CHARSET; - lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; - lf.lfWeight = FW_DONTCARE; - lf.lfHeight = 20; - lf.lfQuality = DEFAULT_QUALITY; - lstrcpyA(lf.lfFaceName, "Times New Roman"); - hfont = create_font("Times New Roman", &lf); - SelectObject(hdc, hfont); - - testJustification(hdc, testText, &clientArea); - - DeleteObject(hfont); - ReleaseDC(hwnd, hdc); - DestroyWindow(hwnd); -} - -static BOOL get_glyph_indices(INT charset, UINT code_page, WORD *idx, UINT count, BOOL unicode) -{ - HDC hdc; - LOGFONTA lf; - HFONT hfont, hfont_old; - CHARSETINFO csi; - FONTSIGNATURE fs; - INT cs; - DWORD i, ret; - char name[64]; - - assert(count <= 128); - - memset(&lf, 0, sizeof(lf)); - - lf.lfCharSet = charset; - lf.lfHeight = 10; - lstrcpyA(lf.lfFaceName, "Arial"); - SetLastError(0xdeadbeef); - hfont = CreateFontIndirectA(&lf); - ok(hfont != 0, "CreateFontIndirectA error %u\n", GetLastError()); - - hdc = GetDC(0); - hfont_old = SelectObject(hdc, hfont); - - cs = GetTextCharsetInfo(hdc, &fs, 0); - ok(cs == charset, "expected %d, got %d\n", charset, cs); - - SetLastError(0xdeadbeef); - ret = GetTextFaceA(hdc, sizeof(name), name); - ok(ret, "GetTextFaceA error %u\n", GetLastError()); - - if (charset == SYMBOL_CHARSET) - { - ok(strcmp("Arial", name), "face name should NOT be Arial\n"); - ok(fs.fsCsb[0] & (1 << 31), "symbol encoding should be available\n"); - } - else - { - ok(!strcmp("Arial", name), "face name should be Arial, not %s\n", name); - ok(!(fs.fsCsb[0] & (1 << 31)), "symbol encoding should NOT be available\n"); - } - - if (!TranslateCharsetInfo((DWORD *)(INT_PTR)cs, &csi, TCI_SRCCHARSET)) - { - trace("Can't find codepage for charset %d\n", cs); - ReleaseDC(0, hdc); - return FALSE; - } - ok(csi.ciACP == code_page, "expected %d, got %d\n", code_page, csi.ciACP); - - if (pGdiGetCodePage != NULL && pGdiGetCodePage(hdc) != code_page) - { - skip("Font code page %d, looking for code page %d\n", - pGdiGetCodePage(hdc), code_page); - ReleaseDC(0, hdc); - return FALSE; - } - - if (unicode) - { - char ansi_buf[128]; - WCHAR unicode_buf[128]; - - for (i = 0; i < count; i++) ansi_buf[i] = (BYTE)(i + 128); - - MultiByteToWideChar(code_page, 0, ansi_buf, count, unicode_buf, count); - - SetLastError(0xdeadbeef); - ret = pGetGlyphIndicesW(hdc, unicode_buf, count, idx, 0); - ok(ret == count, "GetGlyphIndicesW expected %d got %d, error %u\n", - count, ret, GetLastError()); - } - else - { - char ansi_buf[128]; - - for (i = 0; i < count; i++) ansi_buf[i] = (BYTE)(i + 128); - - SetLastError(0xdeadbeef); - ret = pGetGlyphIndicesA(hdc, ansi_buf, count, idx, 0); - ok(ret == count, "GetGlyphIndicesA expected %d got %d, error %u\n", - count, ret, GetLastError()); - } - - SelectObject(hdc, hfont_old); - DeleteObject(hfont); - - ReleaseDC(0, hdc); - - return TRUE; -} - -static void test_font_charset(void) -{ - static struct charset_data - { - INT charset; - UINT code_page; - WORD font_idxA[128], font_idxW[128]; - } cd[] = - { - { ANSI_CHARSET, 1252 }, - { RUSSIAN_CHARSET, 1251 }, - { SYMBOL_CHARSET, CP_SYMBOL } /* keep it as the last one */ - }; - int i; - - if (!pGetGlyphIndicesA || !pGetGlyphIndicesW) - { - win_skip("Skipping the font charset test on a Win9x platform\n"); - return; - } - - if (!is_font_installed("Arial")) - { - skip("Arial is not installed\n"); - return; - } - - for (i = 0; i < sizeof(cd)/sizeof(cd[0]); i++) - { - if (cd[i].charset == SYMBOL_CHARSET) - { - if (!is_font_installed("Symbol") && !is_font_installed("Wingdings")) - { - skip("Symbol or Wingdings is not installed\n"); - break; - } - } - if (get_glyph_indices(cd[i].charset, cd[i].code_page, cd[i].font_idxA, 128, FALSE) && - get_glyph_indices(cd[i].charset, cd[i].code_page, cd[i].font_idxW, 128, TRUE)) - ok(!memcmp(cd[i].font_idxA, cd[i].font_idxW, 128*sizeof(WORD)), "%d: indices don't match\n", i); - } - - ok(memcmp(cd[0].font_idxW, cd[1].font_idxW, 128*sizeof(WORD)), "0 vs 1: indices shouldn't match\n"); - if (i > 2) - { - ok(memcmp(cd[0].font_idxW, cd[2].font_idxW, 128*sizeof(WORD)), "0 vs 2: indices shouldn't match\n"); - ok(memcmp(cd[1].font_idxW, cd[2].font_idxW, 128*sizeof(WORD)), "1 vs 2: indices shouldn't match\n"); - } - else - skip("Symbol or Wingdings is not installed\n"); -} - -static void test_GetFontUnicodeRanges(void) -{ - LOGFONTA lf; - HDC hdc; - HFONT hfont, hfont_old; - DWORD size; - GLYPHSET *gs; - - if (!pGetFontUnicodeRanges) - { - win_skip("GetFontUnicodeRanges not available before W2K\n"); - return; - } - - memset(&lf, 0, sizeof(lf)); - lstrcpyA(lf.lfFaceName, "Arial"); - hfont = create_font("Arial", &lf); - - hdc = GetDC(0); - hfont_old = SelectObject(hdc, hfont); - - size = pGetFontUnicodeRanges(NULL, NULL); - ok(!size, "GetFontUnicodeRanges succeeded unexpectedly\n"); - - size = pGetFontUnicodeRanges(hdc, NULL); - ok(size, "GetFontUnicodeRanges failed unexpectedly\n"); - - gs = HeapAlloc(GetProcessHeap(), 0, size); - - size = pGetFontUnicodeRanges(hdc, gs); - ok(size, "GetFontUnicodeRanges failed\n"); -#if 0 - for (i = 0; i < gs->cRanges; i++) - trace("%03d wcLow %04x cGlyphs %u\n", i, gs->ranges[i].wcLow, gs->ranges[i].cGlyphs); -#endif - trace("found %u ranges\n", gs->cRanges); - - HeapFree(GetProcessHeap(), 0, gs); - - SelectObject(hdc, hfont_old); - DeleteObject(hfont); - ReleaseDC(NULL, hdc); -} - -#define MAX_ENUM_FONTS 4096 - -struct enum_font_data -{ - int total; - LOGFONT lf[MAX_ENUM_FONTS]; -}; - -struct enum_font_dataW -{ - int total; - LOGFONTW lf[MAX_ENUM_FONTS]; -}; - -static INT CALLBACK arial_enum_proc(const LOGFONT *lf, const TEXTMETRIC *tm, DWORD type, LPARAM lParam) -{ - struct enum_font_data *efd = (struct enum_font_data *)lParam; - - ok(lf->lfHeight == tm->tmHeight, "lfHeight %d != tmHeight %d\n", lf->lfHeight, tm->tmHeight); - - if (type != TRUETYPE_FONTTYPE) return 1; -#if 0 - trace("enumed font \"%s\", charset %d, height %d, weight %d, italic %d\n", - lf->lfFaceName, lf->lfCharSet, lf->lfHeight, lf->lfWeight, lf->lfItalic); -#endif - if (efd->total < MAX_ENUM_FONTS) - efd->lf[efd->total++] = *lf; - else - trace("enum tests invalid; you have more than %d fonts\n", MAX_ENUM_FONTS); - - return 1; -} - -static INT CALLBACK arial_enum_procw(const LOGFONTW *lf, const TEXTMETRICW *tm, DWORD type, LPARAM lParam) -{ - struct enum_font_dataW *efd = (struct enum_font_dataW *)lParam; - - ok(lf->lfHeight == tm->tmHeight, "lfHeight %d != tmHeight %d\n", lf->lfHeight, tm->tmHeight); - - if (type != TRUETYPE_FONTTYPE) return 1; -#if 0 - trace("enumed font \"%s\", charset %d, height %d, weight %d, italic %d\n", - lf->lfFaceName, lf->lfCharSet, lf->lfHeight, lf->lfWeight, lf->lfItalic); -#endif - if (efd->total < MAX_ENUM_FONTS) - efd->lf[efd->total++] = *lf; - else - trace("enum tests invalid; you have more than %d fonts\n", MAX_ENUM_FONTS); - - return 1; -} - -static void get_charset_stats(struct enum_font_data *efd, - int *ansi_charset, int *symbol_charset, - int *russian_charset) -{ - int i; - - *ansi_charset = 0; - *symbol_charset = 0; - *russian_charset = 0; - - for (i = 0; i < efd->total; i++) - { - switch (efd->lf[i].lfCharSet) - { - case ANSI_CHARSET: - (*ansi_charset)++; - break; - case SYMBOL_CHARSET: - (*symbol_charset)++; - break; - case RUSSIAN_CHARSET: - (*russian_charset)++; - break; - } - } -} - -static void get_charset_statsW(struct enum_font_dataW *efd, - int *ansi_charset, int *symbol_charset, - int *russian_charset) -{ - int i; - - *ansi_charset = 0; - *symbol_charset = 0; - *russian_charset = 0; - - for (i = 0; i < efd->total; i++) - { - switch (efd->lf[i].lfCharSet) - { - case ANSI_CHARSET: - (*ansi_charset)++; - break; - case SYMBOL_CHARSET: - (*symbol_charset)++; - break; - case RUSSIAN_CHARSET: - (*russian_charset)++; - break; - } - } -} - -static void test_EnumFontFamilies(const char *font_name, INT font_charset) -{ - struct enum_font_data efd; - struct enum_font_dataW efdw; - LOGFONT lf; - HDC hdc; - int i, ret, ansi_charset, symbol_charset, russian_charset; - - trace("Testing font %s, charset %d\n", *font_name ? font_name : "", font_charset); - - if (*font_name && !is_truetype_font_installed(font_name)) - { - skip("%s is not installed\n", font_name); - return; - } - - hdc = GetDC(0); - - /* Observed behaviour: EnumFontFamilies enumerates aliases like "Arial Cyr" - * while EnumFontFamiliesEx doesn't. - */ - if (!*font_name && font_charset == DEFAULT_CHARSET) /* do it only once */ - { - /* - * Use EnumFontFamiliesW since win98 crashes when the - * second parameter is NULL using EnumFontFamilies - */ - efdw.total = 0; - SetLastError(0xdeadbeef); - ret = EnumFontFamiliesW(hdc, NULL, arial_enum_procw, (LPARAM)&efdw); - ok(ret || GetLastError() == ERROR_CALL_NOT_IMPLEMENTED, "EnumFontFamiliesW error %u\n", GetLastError()); - if(ret) - { - get_charset_statsW(&efdw, &ansi_charset, &symbol_charset, &russian_charset); - trace("enumerated ansi %d, symbol %d, russian %d fonts for NULL\n", - ansi_charset, symbol_charset, russian_charset); - ok(efdw.total > 0, "fonts enumerated: NULL\n"); - ok(ansi_charset > 0, "NULL family should enumerate ANSI_CHARSET\n"); - ok(symbol_charset > 0, "NULL family should enumerate SYMBOL_CHARSET\n"); - ok(russian_charset > 0 || - broken(russian_charset == 0), /* NT4 */ - "NULL family should enumerate RUSSIAN_CHARSET\n"); - } - - efdw.total = 0; - SetLastError(0xdeadbeef); - ret = EnumFontFamiliesExW(hdc, NULL, arial_enum_procw, (LPARAM)&efdw, 0); - ok(ret || GetLastError() == ERROR_CALL_NOT_IMPLEMENTED, "EnumFontFamiliesExW error %u\n", GetLastError()); - if(ret) - { - get_charset_statsW(&efdw, &ansi_charset, &symbol_charset, &russian_charset); - trace("enumerated ansi %d, symbol %d, russian %d fonts for NULL\n", - ansi_charset, symbol_charset, russian_charset); - ok(efdw.total > 0, "fonts enumerated: NULL\n"); - ok(ansi_charset > 0, "NULL family should enumerate ANSI_CHARSET\n"); - ok(symbol_charset > 0, "NULL family should enumerate SYMBOL_CHARSET\n"); - ok(russian_charset > 0, "NULL family should enumerate RUSSIAN_CHARSET\n"); - } - } - - efd.total = 0; - SetLastError(0xdeadbeef); - ret = EnumFontFamilies(hdc, font_name, arial_enum_proc, (LPARAM)&efd); - ok(ret, "EnumFontFamilies error %u\n", GetLastError()); - get_charset_stats(&efd, &ansi_charset, &symbol_charset, &russian_charset); - trace("enumerated ansi %d, symbol %d, russian %d fonts for %s\n", - ansi_charset, symbol_charset, russian_charset, - *font_name ? font_name : ""); - if (*font_name) - ok(efd.total > 0, "no fonts enumerated: %s\n", font_name); - else - ok(!efd.total, "no fonts should be enumerated for empty font_name\n"); - for (i = 0; i < efd.total; i++) - { -/* FIXME: remove completely once Wine is fixed */ -if (efd.lf[i].lfCharSet != font_charset) -{ -todo_wine - ok(efd.lf[i].lfCharSet == font_charset, "%d: got charset %d\n", i, efd.lf[i].lfCharSet); -} -else - ok(efd.lf[i].lfCharSet == font_charset, "%d: got charset %d\n", i, efd.lf[i].lfCharSet); - ok(!lstrcmp(efd.lf[i].lfFaceName, font_name), "expected %s, got %s\n", - font_name, efd.lf[i].lfFaceName); - } - - memset(&lf, 0, sizeof(lf)); - lf.lfCharSet = ANSI_CHARSET; - lstrcpy(lf.lfFaceName, font_name); - efd.total = 0; - SetLastError(0xdeadbeef); - ret = EnumFontFamiliesEx(hdc, &lf, arial_enum_proc, (LPARAM)&efd, 0); - ok(ret, "EnumFontFamiliesEx error %u\n", GetLastError()); - get_charset_stats(&efd, &ansi_charset, &symbol_charset, &russian_charset); - trace("enumerated ansi %d, symbol %d, russian %d fonts for %s ANSI_CHARSET\n", - ansi_charset, symbol_charset, russian_charset, - *font_name ? font_name : ""); - if (font_charset == SYMBOL_CHARSET) - { - if (*font_name) - ok(efd.total == 0, "no fonts should be enumerated: %s ANSI_CHARSET\n", font_name); - else - ok(efd.total > 0, "no fonts enumerated: %s\n", font_name); - } - else - { - ok(efd.total > 0, "no fonts enumerated: %s ANSI_CHARSET\n", font_name); - for (i = 0; i < efd.total; i++) - { - ok(efd.lf[i].lfCharSet == ANSI_CHARSET, "%d: got charset %d\n", i, efd.lf[i].lfCharSet); - if (*font_name) - ok(!lstrcmp(efd.lf[i].lfFaceName, font_name), "expected %s, got %s\n", - font_name, efd.lf[i].lfFaceName); - } - } - - /* DEFAULT_CHARSET should enumerate all available charsets */ - memset(&lf, 0, sizeof(lf)); - lf.lfCharSet = DEFAULT_CHARSET; - lstrcpy(lf.lfFaceName, font_name); - efd.total = 0; - SetLastError(0xdeadbeef); - EnumFontFamiliesEx(hdc, &lf, arial_enum_proc, (LPARAM)&efd, 0); - ok(ret, "EnumFontFamiliesEx error %u\n", GetLastError()); - get_charset_stats(&efd, &ansi_charset, &symbol_charset, &russian_charset); - trace("enumerated ansi %d, symbol %d, russian %d fonts for %s DEFAULT_CHARSET\n", - ansi_charset, symbol_charset, russian_charset, - *font_name ? font_name : ""); - ok(efd.total > 0, "no fonts enumerated: %s DEFAULT_CHARSET\n", font_name); - for (i = 0; i < efd.total; i++) - { - if (*font_name) - ok(!lstrcmp(efd.lf[i].lfFaceName, font_name), "expected %s, got %s\n", - font_name, efd.lf[i].lfFaceName); - } - if (*font_name) - { - switch (font_charset) - { - case ANSI_CHARSET: - ok(ansi_charset > 0, - "ANSI_CHARSET should enumerate ANSI_CHARSET for %s\n", font_name); - ok(!symbol_charset, - "ANSI_CHARSET should NOT enumerate SYMBOL_CHARSET for %s\n", font_name); - ok(russian_charset > 0, - "ANSI_CHARSET should enumerate RUSSIAN_CHARSET for %s\n", font_name); - break; - case SYMBOL_CHARSET: - ok(!ansi_charset, - "SYMBOL_CHARSET should NOT enumerate ANSI_CHARSET for %s\n", font_name); - ok(symbol_charset, - "SYMBOL_CHARSET should enumerate SYMBOL_CHARSET for %s\n", font_name); - ok(!russian_charset, - "SYMBOL_CHARSET should NOT enumerate RUSSIAN_CHARSET for %s\n", font_name); - break; - case DEFAULT_CHARSET: - ok(ansi_charset > 0, - "DEFAULT_CHARSET should enumerate ANSI_CHARSET for %s\n", font_name); - ok(symbol_charset > 0, - "DEFAULT_CHARSET should enumerate SYMBOL_CHARSET for %s\n", font_name); - ok(russian_charset > 0, - "DEFAULT_CHARSET should enumerate RUSSIAN_CHARSET for %s\n", font_name); - break; - } - } - else - { - ok(ansi_charset > 0, - "DEFAULT_CHARSET should enumerate ANSI_CHARSET for %s\n", *font_name ? font_name : ""); - ok(symbol_charset > 0, - "DEFAULT_CHARSET should enumerate SYMBOL_CHARSET for %s\n", *font_name ? font_name : ""); - ok(russian_charset > 0, - "DEFAULT_CHARSET should enumerate RUSSIAN_CHARSET for %s\n", *font_name ? font_name : ""); - } - - memset(&lf, 0, sizeof(lf)); - lf.lfCharSet = SYMBOL_CHARSET; - lstrcpy(lf.lfFaceName, font_name); - efd.total = 0; - SetLastError(0xdeadbeef); - EnumFontFamiliesEx(hdc, &lf, arial_enum_proc, (LPARAM)&efd, 0); - ok(ret, "EnumFontFamiliesEx error %u\n", GetLastError()); - get_charset_stats(&efd, &ansi_charset, &symbol_charset, &russian_charset); - trace("enumerated ansi %d, symbol %d, russian %d fonts for %s SYMBOL_CHARSET\n", - ansi_charset, symbol_charset, russian_charset, - *font_name ? font_name : ""); - if (*font_name && font_charset == ANSI_CHARSET) - ok(efd.total == 0, "no fonts should be enumerated: %s SYMBOL_CHARSET\n", font_name); - else - { - ok(efd.total > 0, "no fonts enumerated: %s SYMBOL_CHARSET\n", font_name); - for (i = 0; i < efd.total; i++) - { - ok(efd.lf[i].lfCharSet == SYMBOL_CHARSET, "%d: got charset %d\n", i, efd.lf[i].lfCharSet); - if (*font_name) - ok(!lstrcmp(efd.lf[i].lfFaceName, font_name), "expected %s, got %s\n", - font_name, efd.lf[i].lfFaceName); - } - - ok(!ansi_charset, - "SYMBOL_CHARSET should NOT enumerate ANSI_CHARSET for %s\n", *font_name ? font_name : ""); - ok(symbol_charset > 0, - "SYMBOL_CHARSET should enumerate SYMBOL_CHARSET for %s\n", *font_name ? font_name : ""); - ok(!russian_charset, - "SYMBOL_CHARSET should NOT enumerate RUSSIAN_CHARSET for %s\n", *font_name ? font_name : ""); - } - - ReleaseDC(0, hdc); -} - -static INT CALLBACK enum_font_data_proc(const LOGFONT *lf, const TEXTMETRIC *ntm, DWORD type, LPARAM lParam) -{ - struct enum_font_data *efd = (struct enum_font_data *)lParam; - - if (type != TRUETYPE_FONTTYPE) return 1; - - if (efd->total < MAX_ENUM_FONTS) - efd->lf[efd->total++] = *lf; - else - trace("enum tests invalid; you have more than %d fonts\n", MAX_ENUM_FONTS); - - return 1; -} - -static void test_EnumFontFamiliesEx_default_charset(void) -{ - struct enum_font_data efd; - LOGFONT gui_font, enum_font; - DWORD ret; - HDC hdc; - - ret = GetObject(GetStockObject(DEFAULT_GUI_FONT), sizeof(gui_font), &gui_font); - ok(ret, "GetObject failed.\n"); - if (!ret) - return; - - efd.total = 0; - - hdc = GetDC(0); - memset(&enum_font, 0, sizeof(enum_font)); - lstrcpy(enum_font.lfFaceName, gui_font.lfFaceName); - enum_font.lfCharSet = DEFAULT_CHARSET; - EnumFontFamiliesEx(hdc, &enum_font, enum_font_data_proc, (LPARAM)&efd, 0); - ReleaseDC(0, hdc); - - if (efd.total == 0) { - skip("'%s' is not found or not a TrueType font.\n", gui_font.lfFaceName); - return; - } - trace("'%s' has %d charsets.\n", gui_font.lfFaceName, efd.total); - - ok(efd.lf[0].lfCharSet == gui_font.lfCharSet, - "(%s) got charset %d expected %d\n", - efd.lf[0].lfFaceName, efd.lf[0].lfCharSet, gui_font.lfCharSet); - - return; -} - -static void test_negative_width(HDC hdc, const LOGFONTA *lf) -{ - HFONT hfont, hfont_prev; - DWORD ret; - GLYPHMETRICS gm1, gm2; - LOGFONTA lf2 = *lf; - WORD idx; - - if(!pGetGlyphIndicesA) - return; - - /* negative widths are handled just as positive ones */ - lf2.lfWidth = -lf->lfWidth; - - SetLastError(0xdeadbeef); - hfont = CreateFontIndirectA(lf); - ok(hfont != 0, "CreateFontIndirect error %u\n", GetLastError()); - check_font("original", lf, hfont); - - hfont_prev = SelectObject(hdc, hfont); - - ret = pGetGlyphIndicesA(hdc, "x", 1, &idx, GGI_MARK_NONEXISTING_GLYPHS); - if (ret == GDI_ERROR || idx == 0xffff) - { - SelectObject(hdc, hfont_prev); - DeleteObject(hfont); - skip("Font %s doesn't contain 'x', skipping the test\n", lf->lfFaceName); - return; - } - - /* filling with 0xaa causes false pass under WINEDEBUG=warn+heap */ - memset(&gm1, 0xab, sizeof(gm1)); - SetLastError(0xdeadbeef); - ret = GetGlyphOutlineA(hdc, 'x', GGO_METRICS, &gm1, 0, NULL, &mat); - ok(ret != GDI_ERROR, "GetGlyphOutline error 0x%x\n", GetLastError()); - - SelectObject(hdc, hfont_prev); - DeleteObject(hfont); - - SetLastError(0xdeadbeef); - hfont = CreateFontIndirectA(&lf2); - ok(hfont != 0, "CreateFontIndirect error %u\n", GetLastError()); - check_font("negative width", &lf2, hfont); - - hfont_prev = SelectObject(hdc, hfont); - - memset(&gm2, 0xbb, sizeof(gm2)); - SetLastError(0xdeadbeef); - ret = GetGlyphOutlineA(hdc, 'x', GGO_METRICS, &gm2, 0, NULL, &mat); - ok(ret != GDI_ERROR, "GetGlyphOutline error 0x%x\n", GetLastError()); - - SelectObject(hdc, hfont_prev); - DeleteObject(hfont); - - ok(gm1.gmBlackBoxX == gm2.gmBlackBoxX && - gm1.gmBlackBoxY == gm2.gmBlackBoxY && - gm1.gmptGlyphOrigin.x == gm2.gmptGlyphOrigin.x && - gm1.gmptGlyphOrigin.y == gm2.gmptGlyphOrigin.y && - gm1.gmCellIncX == gm2.gmCellIncX && - gm1.gmCellIncY == gm2.gmCellIncY, - "gm1=%d,%d,%d,%d,%d,%d gm2=%d,%d,%d,%d,%d,%d\n", - gm1.gmBlackBoxX, gm1.gmBlackBoxY, gm1.gmptGlyphOrigin.x, - gm1.gmptGlyphOrigin.y, gm1.gmCellIncX, gm1.gmCellIncY, - gm2.gmBlackBoxX, gm2.gmBlackBoxY, gm2.gmptGlyphOrigin.x, - gm2.gmptGlyphOrigin.y, gm2.gmCellIncX, gm2.gmCellIncY); -} - -/* PANOSE is 10 bytes in size, need to pack the structure properly */ -#include "pshpack2.h" -typedef struct -{ - USHORT version; - SHORT xAvgCharWidth; - USHORT usWeightClass; - USHORT usWidthClass; - SHORT fsType; - SHORT ySubscriptXSize; - SHORT ySubscriptYSize; - SHORT ySubscriptXOffset; - SHORT ySubscriptYOffset; - SHORT ySuperscriptXSize; - SHORT ySuperscriptYSize; - SHORT ySuperscriptXOffset; - SHORT ySuperscriptYOffset; - SHORT yStrikeoutSize; - SHORT yStrikeoutPosition; - SHORT sFamilyClass; - PANOSE panose; - ULONG ulUnicodeRange1; - ULONG ulUnicodeRange2; - ULONG ulUnicodeRange3; - ULONG ulUnicodeRange4; - CHAR achVendID[4]; - USHORT fsSelection; - USHORT usFirstCharIndex; - USHORT usLastCharIndex; - /* According to the Apple spec, original version didn't have the below fields, - * version numbers were taken from the OpenType spec. - */ - /* version 0 (TrueType 1.5) */ - USHORT sTypoAscender; - USHORT sTypoDescender; - USHORT sTypoLineGap; - USHORT usWinAscent; - USHORT usWinDescent; - /* version 1 (TrueType 1.66) */ - ULONG ulCodePageRange1; - ULONG ulCodePageRange2; - /* version 2 (OpenType 1.2) */ - SHORT sxHeight; - SHORT sCapHeight; - USHORT usDefaultChar; - USHORT usBreakChar; - USHORT usMaxContext; -} TT_OS2_V2; -#include "poppack.h" - -#ifdef WORDS_BIGENDIAN -#define GET_BE_WORD(x) (x) -#define GET_BE_DWORD(x) (x) -#else -#define GET_BE_WORD(x) MAKEWORD(HIBYTE(x), LOBYTE(x)) -#define GET_BE_DWORD(x) MAKELONG(GET_BE_WORD(HIWORD(x)), GET_BE_WORD(LOWORD(x))); -#endif - -#define MS_MAKE_TAG(ch0, ch1, ch2, ch3) \ - ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \ - ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24)) -#define MS_OS2_TAG MS_MAKE_TAG('O','S','/','2') -#define MS_CMAP_TAG MS_MAKE_TAG('c','m','a','p') -#define MS_NAME_TAG MS_MAKE_TAG('n','a','m','e') - -typedef struct -{ - USHORT version; - USHORT num_tables; -} cmap_header; - -typedef struct -{ - USHORT plat_id; - USHORT enc_id; - ULONG offset; -} cmap_encoding_record; - -typedef struct -{ - USHORT format; - USHORT length; - USHORT language; - - BYTE glyph_ids[256]; -} cmap_format_0; - -typedef struct -{ - USHORT format; - USHORT length; - USHORT language; - - USHORT seg_countx2; - USHORT search_range; - USHORT entry_selector; - USHORT range_shift; - - USHORT end_count[1]; /* this is a variable-sized array of length seg_countx2 / 2 */ -/* Then follows: - USHORT pad; - USHORT start_count[seg_countx2 / 2]; - USHORT id_delta[seg_countx2 / 2]; - USHORT id_range_offset[seg_countx2 / 2]; - USHORT glyph_ids[]; -*/ -} cmap_format_4; - -typedef struct -{ - USHORT end_count; - USHORT start_count; - USHORT id_delta; - USHORT id_range_offset; -} cmap_format_4_seg; - -static void expect_ff(const TEXTMETRICA *tmA, const TT_OS2_V2 *os2, WORD family, const char *name) -{ - ok((tmA->tmPitchAndFamily & 0xf0) == family || - broken(PRIMARYLANGID(GetSystemDefaultLangID()) != LANG_ENGLISH), - "%s: expected family %02x got %02x. panose %d-%d-%d-%d-...\n", - name, family, tmA->tmPitchAndFamily, os2->panose.bFamilyType, os2->panose.bSerifStyle, - os2->panose.bWeight, os2->panose.bProportion); -} - -static BOOL get_first_last_from_cmap0(void *ptr, DWORD *first, DWORD *last) -{ - int i; - cmap_format_0 *cmap = (cmap_format_0*)ptr; - - *first = 256; - - for(i = 0; i < 256; i++) - { - if(cmap->glyph_ids[i] == 0) continue; - *last = i; - if(*first == 256) *first = i; - } - if(*first == 256) return FALSE; - return TRUE; -} - -static void get_seg4(cmap_format_4 *cmap, USHORT seg_num, cmap_format_4_seg *seg) -{ - USHORT segs = GET_BE_WORD(cmap->seg_countx2) / 2; - seg->end_count = GET_BE_WORD(cmap->end_count[seg_num]); - seg->start_count = GET_BE_WORD(cmap->end_count[segs + 1 + seg_num]); - seg->id_delta = GET_BE_WORD(cmap->end_count[2 * segs + 1 + seg_num]); - seg->id_range_offset = GET_BE_WORD(cmap->end_count[3 * segs + 1 + seg_num]); -} - -static BOOL get_first_last_from_cmap4(void *ptr, DWORD *first, DWORD *last, DWORD limit) -{ - int i; - cmap_format_4 *cmap = (cmap_format_4*)ptr; - USHORT seg_count = GET_BE_WORD(cmap->seg_countx2) / 2; - USHORT const *glyph_ids = cmap->end_count + 4 * seg_count + 1; - - *first = 0x10000; - - for(i = 0; i < seg_count; i++) - { - DWORD code, index; - cmap_format_4_seg seg; - - get_seg4(cmap, i, &seg); - for(code = seg.start_count; code <= seg.end_count; code++) - { - if(seg.id_range_offset == 0) - index = (seg.id_delta + code) & 0xffff; - else - { - index = seg.id_range_offset / 2 - + code - seg.start_count - + i - seg_count; - - /* some fonts have broken last segment */ - if ((char *)(glyph_ids + index + sizeof(*glyph_ids)) < (char *)ptr + limit) - index = GET_BE_WORD(glyph_ids[index]); - else - { - trace("segment %04x/%04x index %04x points to nowhere\n", - seg.start_count, seg.end_count, index); - index = 0; - } - if(index) index += seg.id_delta; - } - if(*first == 0x10000) - *last = *first = code; - else if(index) - *last = code; - } - } - - if(*first == 0x10000) return FALSE; - return TRUE; -} - -static void *get_cmap(cmap_header *header, USHORT plat_id, USHORT enc_id) -{ - USHORT i; - cmap_encoding_record *record = (cmap_encoding_record *)(header + 1); - - for(i = 0; i < GET_BE_WORD(header->num_tables); i++) - { - if(GET_BE_WORD(record->plat_id) == plat_id && GET_BE_WORD(record->enc_id) == enc_id) - return (BYTE *)header + GET_BE_DWORD(record->offset); - record++; - } - return NULL; -} - -typedef enum -{ - cmap_none, - cmap_ms_unicode, - cmap_ms_symbol -} cmap_type; - -static BOOL get_first_last_from_cmap(HDC hdc, DWORD *first, DWORD *last, cmap_type *cmap_type) -{ - LONG size, ret; - cmap_header *header; - void *cmap; - BOOL r = FALSE; - WORD format; - - size = GetFontData(hdc, MS_CMAP_TAG, 0, NULL, 0); - ok(size != GDI_ERROR, "no cmap table found\n"); - if(size == GDI_ERROR) return FALSE; - - header = HeapAlloc(GetProcessHeap(), 0, size); - ret = GetFontData(hdc, MS_CMAP_TAG, 0, header, size); - ok(ret == size, "GetFontData should return %u not %u\n", size, ret); - ok(GET_BE_WORD(header->version) == 0, "got cmap version %d\n", GET_BE_WORD(header->version)); - - cmap = get_cmap(header, 3, 1); - if(cmap) - *cmap_type = cmap_ms_unicode; - else - { - cmap = get_cmap(header, 3, 0); - if(cmap) *cmap_type = cmap_ms_symbol; - } - if(!cmap) - { - *cmap_type = cmap_none; - goto end; - } - - format = GET_BE_WORD(*(WORD *)cmap); - switch(format) - { - case 0: - r = get_first_last_from_cmap0(cmap, first, last); - break; - case 4: - r = get_first_last_from_cmap4(cmap, first, last, size); - break; - default: - trace("unhandled cmap format %d\n", format); - break; - } - -end: - HeapFree(GetProcessHeap(), 0, header); - return r; -} - -#define TT_PLATFORM_MICROSOFT 3 -#define TT_MS_ID_UNICODE_CS 1 -#define TT_MS_LANGID_ENGLISH_UNITED_STATES 0x0409 -#define TT_NAME_ID_FULL_NAME 4 - -static BOOL get_ttf_nametable_entry(HDC hdc, WORD name_id, char *out_buf, SIZE_T out_size) -{ - struct sfnt_name_header - { - USHORT format; - USHORT number_of_record; - USHORT storage_offset; - } *header; - struct sfnt_name - { - USHORT platform_id; - USHORT encoding_id; - USHORT language_id; - USHORT name_id; - USHORT length; - USHORT offset; - } *entry; - BOOL r = FALSE; - LONG size, offset, length; - LONG c, ret; - WCHAR *name; - BYTE *data; - USHORT i; - - size = GetFontData(hdc, MS_NAME_TAG, 0, NULL, 0); - ok(size != GDI_ERROR, "no name table found\n"); - if(size == GDI_ERROR) return FALSE; - - data = HeapAlloc(GetProcessHeap(), 0, size); - ret = GetFontData(hdc, MS_NAME_TAG, 0, data, size); - ok(ret == size, "GetFontData should return %u not %u\n", size, ret); - - header = (void *)data; - header->format = GET_BE_WORD(header->format); - header->number_of_record = GET_BE_WORD(header->number_of_record); - header->storage_offset = GET_BE_WORD(header->storage_offset); - if (header->format != 0) - { - trace("got format %u\n", header->format); - goto out; - } - if (header->number_of_record == 0 || sizeof(*header) + header->number_of_record * sizeof(*entry) > size) - { - trace("number records out of range: %d\n", header->number_of_record); - goto out; - } - if (header->storage_offset >= size) - { - trace("storage_offset %u > size %u\n", header->storage_offset, size); - goto out; - } - - entry = (void *)&header[1]; - for (i = 0; i < header->number_of_record; i++) - { - if (GET_BE_WORD(entry[i].platform_id) != TT_PLATFORM_MICROSOFT || - GET_BE_WORD(entry[i].encoding_id) != TT_MS_ID_UNICODE_CS || - GET_BE_WORD(entry[i].language_id) != TT_MS_LANGID_ENGLISH_UNITED_STATES || - GET_BE_WORD(entry[i].name_id) != name_id) - { - continue; - } - - offset = header->storage_offset + GET_BE_WORD(entry[i].offset); - length = GET_BE_WORD(entry[i].length); - if (offset + length > size) - { - trace("entry %d is out of range\n", i); - break; - } - if (length >= out_size) - { - trace("buffer too small for entry %d\n", i); - break; - } - - name = (WCHAR *)(data + offset); - for (c = 0; c < length / 2; c++) - out_buf[c] = GET_BE_WORD(name[c]); - out_buf[c] = 0; - - r = TRUE; - break; - } - -out: - HeapFree(GetProcessHeap(), 0, data); - return r; -} - -static void test_text_metrics(const LOGFONTA *lf) -{ - HDC hdc; - HFONT hfont, hfont_old; - TEXTMETRICA tmA; - TT_OS2_V2 tt_os2; - LONG size, ret; - const char *font_name = lf->lfFaceName; - DWORD cmap_first = 0, cmap_last = 0; - cmap_type cmap_type; - BOOL sys_lang_non_english; - - sys_lang_non_english = PRIMARYLANGID(GetSystemDefaultLangID()) != LANG_ENGLISH; - hdc = GetDC(0); - - SetLastError(0xdeadbeef); - hfont = CreateFontIndirectA(lf); - ok(hfont != 0, "CreateFontIndirect error %u\n", GetLastError()); - - hfont_old = SelectObject(hdc, hfont); - - size = GetFontData(hdc, MS_OS2_TAG, 0, NULL, 0); - if (size == GDI_ERROR) - { - trace("OS/2 chunk was not found\n"); - goto end_of_test; - } - if (size > sizeof(tt_os2)) - { - trace("got too large OS/2 chunk of size %u\n", size); - size = sizeof(tt_os2); - } - - memset(&tt_os2, 0, sizeof(tt_os2)); - ret = GetFontData(hdc, MS_OS2_TAG, 0, &tt_os2, size); - ok(ret == size, "GetFontData should return %u not %u\n", size, ret); - - SetLastError(0xdeadbeef); - ret = GetTextMetricsA(hdc, &tmA); - ok(ret, "GetTextMetricsA error %u\n", GetLastError()); - - if(!get_first_last_from_cmap(hdc, &cmap_first, &cmap_last, &cmap_type)) - { - skip("Unable to retrieve first and last glyphs from cmap\n"); - } - else - { - USHORT expect_first_A, expect_last_A, expect_break_A, expect_default_A; - USHORT expect_first_W, expect_last_W, expect_break_W, expect_default_W; - UINT os2_first_char, os2_last_char, default_char, break_char; - USHORT version; - TEXTMETRICW tmW; - - version = GET_BE_WORD(tt_os2.version); - - os2_first_char = GET_BE_WORD(tt_os2.usFirstCharIndex); - os2_last_char = GET_BE_WORD(tt_os2.usLastCharIndex); - default_char = GET_BE_WORD(tt_os2.usDefaultChar); - break_char = GET_BE_WORD(tt_os2.usBreakChar); - - trace("font %s charset %u: %x-%x (%x-%x) default %x break %x OS/2 version %u vendor %4.4s\n", - font_name, lf->lfCharSet, os2_first_char, os2_last_char, cmap_first, cmap_last, - default_char, break_char, version, (LPCSTR)&tt_os2.achVendID); - - if (cmap_type == cmap_ms_symbol || (cmap_first >= 0xf000 && cmap_first < 0xf100)) - { - expect_first_W = 0; - switch(GetACP()) - { - case 1257: /* Baltic */ - expect_last_W = 0xf8fd; - break; - default: - expect_last_W = 0xf0ff; - } - expect_break_W = 0x20; - expect_default_W = expect_break_W - 1; - expect_first_A = 0x1e; - expect_last_A = min(os2_last_char - os2_first_char + 0x20, 0xff); - } - else - { - expect_first_W = cmap_first; - expect_last_W = min(cmap_last, os2_last_char); - if(os2_first_char <= 1) - expect_break_W = os2_first_char + 2; - else if(os2_first_char > 0xff) - expect_break_W = 0x20; - else - expect_break_W = os2_first_char; - expect_default_W = expect_break_W - 1; - expect_first_A = expect_default_W - 1; - expect_last_A = min(expect_last_W, 0xff); - } - expect_break_A = expect_break_W; - expect_default_A = expect_default_W; - - /* Wine currently uses SYMBOL_CHARSET to identify whether the ANSI metrics need special handling */ - if(cmap_type != cmap_ms_symbol && tmA.tmCharSet == SYMBOL_CHARSET && expect_first_A != 0x1e) - todo_wine ok(tmA.tmFirstChar == expect_first_A || - tmA.tmFirstChar == expect_first_A + 1 /* win9x */, - "A: tmFirstChar for %s got %02x expected %02x\n", font_name, tmA.tmFirstChar, expect_first_A); - else - ok(tmA.tmFirstChar == expect_first_A || - tmA.tmFirstChar == expect_first_A + 1 /* win9x */, - "A: tmFirstChar for %s got %02x expected %02x\n", font_name, tmA.tmFirstChar, expect_first_A); - if (pGdiGetCodePage == NULL || ! IsDBCSLeadByteEx(pGdiGetCodePage(hdc), tmA.tmLastChar)) - ok(tmA.tmLastChar == expect_last_A || - tmA.tmLastChar == 0xff /* win9x */, - "A: tmLastChar for %s got %02x expected %02x\n", font_name, tmA.tmLastChar, expect_last_A); - else - skip("tmLastChar is DBCS lead byte\n"); - ok(tmA.tmBreakChar == expect_break_A, "A: tmBreakChar for %s got %02x expected %02x\n", - font_name, tmA.tmBreakChar, expect_break_A); - ok(tmA.tmDefaultChar == expect_default_A || broken(sys_lang_non_english), - "A: tmDefaultChar for %s got %02x expected %02x\n", - font_name, tmA.tmDefaultChar, expect_default_A); - - - SetLastError(0xdeadbeef); - ret = GetTextMetricsW(hdc, &tmW); - ok(ret || GetLastError() == ERROR_CALL_NOT_IMPLEMENTED, - "GetTextMetricsW error %u\n", GetLastError()); - if (ret) - { - /* Wine uses the os2 first char */ - if(cmap_first != os2_first_char && cmap_type != cmap_ms_symbol) - todo_wine ok(tmW.tmFirstChar == expect_first_W, "W: tmFirstChar for %s got %02x expected %02x\n", - font_name, tmW.tmFirstChar, expect_first_W); - else - ok(tmW.tmFirstChar == expect_first_W, "W: tmFirstChar for %s got %02x expected %02x\n", - font_name, tmW.tmFirstChar, expect_first_W); - - /* Wine uses the os2 last char */ - if(expect_last_W != os2_last_char && cmap_type != cmap_ms_symbol) - todo_wine ok(tmW.tmLastChar == expect_last_W, "W: tmLastChar for %s got %02x expected %02x\n", - font_name, tmW.tmLastChar, expect_last_W); - else - ok(tmW.tmLastChar == expect_last_W, "W: tmLastChar for %s got %02x expected %02x\n", - font_name, tmW.tmLastChar, expect_last_W); - ok(tmW.tmBreakChar == expect_break_W, "W: tmBreakChar for %s got %02x expected %02x\n", - font_name, tmW.tmBreakChar, expect_break_W); - ok(tmW.tmDefaultChar == expect_default_W || broken(sys_lang_non_english), - "W: tmDefaultChar for %s got %02x expected %02x\n", - font_name, tmW.tmDefaultChar, expect_default_W); - - /* Test the aspect ratio while we have tmW */ - ret = GetDeviceCaps(hdc, LOGPIXELSX); - ok(tmW.tmDigitizedAspectX == ret, "W: tmDigitizedAspectX %u != %u\n", - tmW.tmDigitizedAspectX, ret); - ret = GetDeviceCaps(hdc, LOGPIXELSY); - ok(tmW.tmDigitizedAspectX == ret, "W: tmDigitizedAspectY %u != %u\n", - tmW.tmDigitizedAspectX, ret); - } - } - - /* test FF_ values */ - switch(tt_os2.panose.bFamilyType) - { - case PAN_ANY: - case PAN_NO_FIT: - case PAN_FAMILY_TEXT_DISPLAY: - case PAN_FAMILY_PICTORIAL: - default: - if((tmA.tmPitchAndFamily & 1) == 0 || /* fixed */ - tt_os2.panose.bProportion == PAN_PROP_MONOSPACED) - { - expect_ff(&tmA, &tt_os2, FF_MODERN, font_name); - break; - } - switch(tt_os2.panose.bSerifStyle) - { - case PAN_ANY: - case PAN_NO_FIT: - default: - expect_ff(&tmA, &tt_os2, FF_DONTCARE, font_name); - break; - - case PAN_SERIF_COVE: - case PAN_SERIF_OBTUSE_COVE: - case PAN_SERIF_SQUARE_COVE: - case PAN_SERIF_OBTUSE_SQUARE_COVE: - case PAN_SERIF_SQUARE: - case PAN_SERIF_THIN: - case PAN_SERIF_BONE: - case PAN_SERIF_EXAGGERATED: - case PAN_SERIF_TRIANGLE: - expect_ff(&tmA, &tt_os2, FF_ROMAN, font_name); - break; - - case PAN_SERIF_NORMAL_SANS: - case PAN_SERIF_OBTUSE_SANS: - case PAN_SERIF_PERP_SANS: - case PAN_SERIF_FLARED: - case PAN_SERIF_ROUNDED: - expect_ff(&tmA, &tt_os2, FF_SWISS, font_name); - break; - } - break; - - case PAN_FAMILY_SCRIPT: - expect_ff(&tmA, &tt_os2, FF_SCRIPT, font_name); - break; - - case PAN_FAMILY_DECORATIVE: - expect_ff(&tmA, &tt_os2, FF_DECORATIVE, font_name); - break; - } - - test_negative_width(hdc, lf); - -end_of_test: - SelectObject(hdc, hfont_old); - DeleteObject(hfont); - - ReleaseDC(0, hdc); -} - -static INT CALLBACK enum_truetype_font_proc(const LOGFONT *lf, const TEXTMETRIC *ntm, DWORD type, LPARAM lParam) -{ - INT *enumed = (INT *)lParam; - - if (type == TRUETYPE_FONTTYPE) - { - (*enumed)++; - test_text_metrics(lf); - } - return 1; -} - -static void test_GetTextMetrics(void) -{ - LOGFONTA lf; - HDC hdc; - INT enumed; - - /* Report only once */ - if(!pGetGlyphIndicesA) - win_skip("GetGlyphIndicesA is unavailable, negative width will not be checked\n"); - - hdc = GetDC(0); - - memset(&lf, 0, sizeof(lf)); - lf.lfCharSet = DEFAULT_CHARSET; - enumed = 0; - EnumFontFamiliesExA(hdc, &lf, enum_truetype_font_proc, (LPARAM)&enumed, 0); - trace("Tested metrics of %d truetype fonts\n", enumed); - - ReleaseDC(0, hdc); -} - -static void test_nonexistent_font(void) -{ - static const struct - { - const char *name; - int charset; - } font_subst[] = - { - { "Times New Roman Baltic", 186 }, - { "Times New Roman CE", 238 }, - { "Times New Roman CYR", 204 }, - { "Times New Roman Greek", 161 }, - { "Times New Roman TUR", 162 } - }; - LOGFONTA lf; - HDC hdc; - HFONT hfont; - CHARSETINFO csi; - INT cs, expected_cs, i; - char buf[LF_FACESIZE]; - - if (!is_truetype_font_installed("Arial") || - !is_truetype_font_installed("Times New Roman")) - { - skip("Arial or Times New Roman not installed\n"); - return; - } - - expected_cs = GetACP(); - if (!TranslateCharsetInfo(ULongToPtr(expected_cs), &csi, TCI_SRCCODEPAGE)) - { - skip("TranslateCharsetInfo failed for code page %d\n", expected_cs); - return; - } - expected_cs = csi.ciCharset; - trace("ACP %d -> charset %d\n", GetACP(), expected_cs); - - hdc = GetDC(0); - - memset(&lf, 0, sizeof(lf)); - lf.lfHeight = 100; - lf.lfWeight = FW_REGULAR; - lf.lfCharSet = ANSI_CHARSET; - lf.lfPitchAndFamily = FF_SWISS; - strcpy(lf.lfFaceName, "Nonexistent font"); - hfont = CreateFontIndirectA(&lf); - hfont = SelectObject(hdc, hfont); - GetTextFaceA(hdc, sizeof(buf), buf); - ok(!lstrcmpiA(buf, "Arial"), "Got %s\n", buf); - cs = GetTextCharset(hdc); - ok(cs == ANSI_CHARSET, "expected ANSI_CHARSET, got %d\n", cs); - DeleteObject(SelectObject(hdc, hfont)); - - memset(&lf, 0, sizeof(lf)); - lf.lfHeight = -13; - lf.lfWeight = FW_DONTCARE; - strcpy(lf.lfFaceName, "Nonexistent font"); - hfont = CreateFontIndirectA(&lf); - hfont = SelectObject(hdc, hfont); - GetTextFaceA(hdc, sizeof(buf), buf); -todo_wine /* Wine uses Arial for all substitutions */ - ok(!lstrcmpiA(buf, "Nonexistent font") /* XP, Vista */ || - !lstrcmpiA(buf, "MS Serif") || /* Win9x */ - !lstrcmpiA(buf, "MS Sans Serif"), /* win2k3 */ - "Got %s\n", buf); - cs = GetTextCharset(hdc); - ok(cs == expected_cs || cs == ANSI_CHARSET, "expected %d, got %d\n", expected_cs, cs); - DeleteObject(SelectObject(hdc, hfont)); - - memset(&lf, 0, sizeof(lf)); - lf.lfHeight = -13; - lf.lfWeight = FW_REGULAR; - strcpy(lf.lfFaceName, "Nonexistent font"); - hfont = CreateFontIndirectA(&lf); - hfont = SelectObject(hdc, hfont); - GetTextFaceA(hdc, sizeof(buf), buf); - ok(!lstrcmpiA(buf, "Arial") /* XP, Vista */ || - !lstrcmpiA(buf, "Times New Roman") /* Win9x */, "Got %s\n", buf); - cs = GetTextCharset(hdc); - ok(cs == ANSI_CHARSET, "expected ANSI_CHARSET, got %d\n", cs); - DeleteObject(SelectObject(hdc, hfont)); - - memset(&lf, 0, sizeof(lf)); - lf.lfHeight = -13; - lf.lfWeight = FW_DONTCARE; - strcpy(lf.lfFaceName, "Times New Roman"); - hfont = CreateFontIndirectA(&lf); - hfont = SelectObject(hdc, hfont); - GetTextFaceA(hdc, sizeof(buf), buf); - ok(!lstrcmpiA(buf, "Times New Roman"), "Got %s\n", buf); - cs = GetTextCharset(hdc); - ok(cs == ANSI_CHARSET, "expected ANSI_CHARSET, got %d\n", cs); - DeleteObject(SelectObject(hdc, hfont)); - - for (i = 0; i < sizeof(font_subst)/sizeof(font_subst[0]); i++) - { - memset(&lf, 0, sizeof(lf)); - lf.lfHeight = -13; - lf.lfWeight = FW_REGULAR; - strcpy(lf.lfFaceName, font_subst[i].name); - hfont = CreateFontIndirectA(&lf); - hfont = SelectObject(hdc, hfont); - cs = GetTextCharset(hdc); - if (font_subst[i].charset == expected_cs) - { - ok(cs == expected_cs, "expected %d, got %d for font %s\n", expected_cs, cs, font_subst[i].name); - GetTextFaceA(hdc, sizeof(buf), buf); - ok(!lstrcmpiA(buf, font_subst[i].name), "expected %s, got %s\n", font_subst[i].name, buf); - } - else - { - ok(cs == ANSI_CHARSET, "expected ANSI_CHARSET, got %d for font %s\n", cs, font_subst[i].name); - GetTextFaceA(hdc, sizeof(buf), buf); - ok(!lstrcmpiA(buf, "Arial") /* XP, Vista */ || - !lstrcmpiA(buf, "Times New Roman") /* Win9x */, "got %s for font %s\n", buf, font_subst[i].name); - } - DeleteObject(SelectObject(hdc, hfont)); - - memset(&lf, 0, sizeof(lf)); - lf.lfHeight = -13; - lf.lfWeight = FW_DONTCARE; - strcpy(lf.lfFaceName, font_subst[i].name); - hfont = CreateFontIndirectA(&lf); - hfont = SelectObject(hdc, hfont); - GetTextFaceA(hdc, sizeof(buf), buf); - ok(!lstrcmpiA(buf, "Arial") /* Wine */ || - !lstrcmpiA(buf, font_subst[i].name) /* XP, Vista */ || - !lstrcmpiA(buf, "MS Serif") /* Win9x */ || - !lstrcmpiA(buf, "MS Sans Serif"), /* win2k3 */ - "got %s for font %s\n", buf, font_subst[i].name); - cs = GetTextCharset(hdc); - ok(cs == expected_cs || cs == ANSI_CHARSET, "expected %d, got %d for font %s\n", expected_cs, cs, font_subst[i].name); - DeleteObject(SelectObject(hdc, hfont)); - } - - ReleaseDC(0, hdc); -} - -static void test_GdiRealizationInfo(void) -{ - HDC hdc; - DWORD info[4]; - BOOL r; - HFONT hfont, hfont_old; - LOGFONTA lf; - - if(!pGdiRealizationInfo) - { - win_skip("GdiRealizationInfo not available\n"); - return; - } - - hdc = GetDC(0); - - memset(info, 0xcc, sizeof(info)); - r = pGdiRealizationInfo(hdc, info); - ok(r != 0, "ret 0\n"); - ok((info[0] & 0xf) == 1, "info[0] = %x for the system font\n", info[0]); - ok(info[3] == 0xcccccccc, "structure longer than 3 dwords\n"); - - if (!is_truetype_font_installed("Arial")) - { - skip("skipping GdiRealizationInfo with truetype font\n"); - goto end; - } - - memset(&lf, 0, sizeof(lf)); - strcpy(lf.lfFaceName, "Arial"); - lf.lfHeight = 20; - lf.lfWeight = FW_NORMAL; - hfont = CreateFontIndirectA(&lf); - hfont_old = SelectObject(hdc, hfont); - - memset(info, 0xcc, sizeof(info)); - r = pGdiRealizationInfo(hdc, info); - ok(r != 0, "ret 0\n"); - ok((info[0] & 0xf) == 3, "info[0] = %x for arial\n", info[0]); - ok(info[3] == 0xcccccccc, "structure longer than 3 dwords\n"); - - DeleteObject(SelectObject(hdc, hfont_old)); - - end: - ReleaseDC(0, hdc); -} - -/* Tests on XP SP2 show that the ANSI version of GetTextFace does NOT include - the nul in the count of characters copied when the face name buffer is not - NULL, whereas it does if the buffer is NULL. Further, the Unicode version - always includes it. */ -static void test_GetTextFace(void) -{ - static const char faceA[] = "Tahoma"; - static const WCHAR faceW[] = {'T','a','h','o','m','a', 0}; - LOGFONTA fA = {0}; - LOGFONTW fW = {0}; - char bufA[LF_FACESIZE]; - WCHAR bufW[LF_FACESIZE]; - HFONT f, g; - HDC dc; - int n; - - if(!is_font_installed("Tahoma")) - { - skip("Tahoma is not installed so skipping this test\n"); - return; - } - - /* 'A' case. */ - memcpy(fA.lfFaceName, faceA, sizeof faceA); - f = CreateFontIndirectA(&fA); - ok(f != NULL, "CreateFontIndirectA failed\n"); - - dc = GetDC(NULL); - g = SelectObject(dc, f); - n = GetTextFaceA(dc, sizeof bufA, bufA); - ok(n == sizeof faceA - 1, "GetTextFaceA returned %d\n", n); - ok(lstrcmpA(faceA, bufA) == 0, "GetTextFaceA\n"); - - /* Play with the count arg. */ - bufA[0] = 'x'; - n = GetTextFaceA(dc, 0, bufA); - ok(n == 0, "GetTextFaceA returned %d\n", n); - ok(bufA[0] == 'x', "GetTextFaceA buf[0] == %d\n", bufA[0]); - - bufA[0] = 'x'; - n = GetTextFaceA(dc, 1, bufA); - ok(n == 0, "GetTextFaceA returned %d\n", n); - ok(bufA[0] == '\0', "GetTextFaceA buf[0] == %d\n", bufA[0]); - - bufA[0] = 'x'; bufA[1] = 'y'; - n = GetTextFaceA(dc, 2, bufA); - ok(n == 1, "GetTextFaceA returned %d\n", n); - ok(bufA[0] == faceA[0] && bufA[1] == '\0', "GetTextFaceA didn't copy\n"); - - n = GetTextFaceA(dc, 0, NULL); - ok(n == sizeof faceA || - broken(n == 0), /* win98, winMe */ - "GetTextFaceA returned %d\n", n); - - DeleteObject(SelectObject(dc, g)); - ReleaseDC(NULL, dc); - - /* 'W' case. */ - memcpy(fW.lfFaceName, faceW, sizeof faceW); - SetLastError(0xdeadbeef); - f = CreateFontIndirectW(&fW); - if (!f && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("CreateFontIndirectW is not implemented\n"); - return; - } - ok(f != NULL, "CreateFontIndirectW failed\n"); - - dc = GetDC(NULL); - g = SelectObject(dc, f); - n = GetTextFaceW(dc, sizeof bufW / sizeof bufW[0], bufW); - ok(n == sizeof faceW / sizeof faceW[0], "GetTextFaceW returned %d\n", n); - ok(lstrcmpW(faceW, bufW) == 0, "GetTextFaceW\n"); - - /* Play with the count arg. */ - bufW[0] = 'x'; - n = GetTextFaceW(dc, 0, bufW); - ok(n == 0, "GetTextFaceW returned %d\n", n); - ok(bufW[0] == 'x', "GetTextFaceW buf[0] == %d\n", bufW[0]); - - bufW[0] = 'x'; - n = GetTextFaceW(dc, 1, bufW); - ok(n == 1, "GetTextFaceW returned %d\n", n); - ok(bufW[0] == '\0', "GetTextFaceW buf[0] == %d\n", bufW[0]); - - bufW[0] = 'x'; bufW[1] = 'y'; - n = GetTextFaceW(dc, 2, bufW); - ok(n == 2, "GetTextFaceW returned %d\n", n); - ok(bufW[0] == faceW[0] && bufW[1] == '\0', "GetTextFaceW didn't copy\n"); - - n = GetTextFaceW(dc, 0, NULL); - ok(n == sizeof faceW / sizeof faceW[0], "GetTextFaceW returned %d\n", n); - - DeleteObject(SelectObject(dc, g)); - ReleaseDC(NULL, dc); -} - -static void test_orientation(void) -{ - static const char test_str[11] = "Test String"; - HDC hdc; - LOGFONTA lf; - HFONT hfont, old_hfont; - SIZE size; - - if (!is_truetype_font_installed("Arial")) - { - skip("Arial is not installed\n"); - return; - } - - hdc = CreateCompatibleDC(0); - memset(&lf, 0, sizeof(lf)); - lstrcpyA(lf.lfFaceName, "Arial"); - lf.lfHeight = 72; - lf.lfOrientation = lf.lfEscapement = 900; - hfont = create_font("orientation", &lf); - old_hfont = SelectObject(hdc, hfont); - ok(GetTextExtentExPointA(hdc, test_str, sizeof(test_str), 32767, NULL, NULL, &size), "GetTextExtentExPointA failed\n"); - ok(near_match(311, size.cx), "cx should be about 311, got %d\n", size.cx); - ok(near_match(75, size.cy), "cy should be about 75, got %d\n", size.cy); - SelectObject(hdc, old_hfont); - DeleteObject(hfont); - DeleteDC(hdc); -} - -static void test_oemcharset(void) -{ - HDC hdc; - LOGFONTA lf, clf; - HFONT hfont, old_hfont; - int charset; - - hdc = CreateCompatibleDC(0); - ZeroMemory(&lf, sizeof(lf)); - lf.lfHeight = 12; - lf.lfCharSet = OEM_CHARSET; - lf.lfPitchAndFamily = FIXED_PITCH | FF_MODERN; - lstrcpyA(lf.lfFaceName, "Terminal"); - hfont = CreateFontIndirectA(&lf); - old_hfont = SelectObject(hdc, hfont); - charset = GetTextCharset(hdc); -todo_wine - ok(charset == OEM_CHARSET, "expected %d charset, got %d\n", OEM_CHARSET, charset); - hfont = SelectObject(hdc, old_hfont); - GetObjectA(hfont, sizeof(clf), &clf); - ok(!lstrcmpA(clf.lfFaceName, lf.lfFaceName), "expected %s face name, got %s\n", lf.lfFaceName, clf.lfFaceName); - ok(clf.lfPitchAndFamily == lf.lfPitchAndFamily, "expected %x family, got %x\n", lf.lfPitchAndFamily, clf.lfPitchAndFamily); - ok(clf.lfCharSet == lf.lfCharSet, "expected %d charset, got %d\n", lf.lfCharSet, clf.lfCharSet); - ok(clf.lfHeight == lf.lfHeight, "expected %d height, got %d\n", lf.lfHeight, clf.lfHeight); - DeleteObject(hfont); - DeleteDC(hdc); -} - -static void test_GetGlyphOutline(void) -{ - HDC hdc; - GLYPHMETRICS gm, gm2; - LOGFONTA lf; - HFONT hfont, old_hfont; - INT ret, ret2; - static const struct - { - UINT cs; - UINT a; - UINT w; - } c[] = - { - {ANSI_CHARSET, 0x30, 0x30}, - {SHIFTJIS_CHARSET, 0x82a0, 0x3042}, - {HANGEUL_CHARSET, 0x8141, 0xac02}, - {JOHAB_CHARSET, 0x8446, 0x3135}, - {GB2312_CHARSET, 0x8141, 0x4e04}, - {CHINESEBIG5_CHARSET, 0xa142, 0x3001} - }; - UINT i; - - if (!is_truetype_font_installed("Tahoma")) - { - skip("Tahoma is not installed\n"); - return; - } - - hdc = CreateCompatibleDC(0); - memset(&lf, 0, sizeof(lf)); - lf.lfHeight = 72; - lstrcpyA(lf.lfFaceName, "Tahoma"); - SetLastError(0xdeadbeef); - hfont = CreateFontIndirectA(&lf); - ok(hfont != 0, "CreateFontIndirectA error %u\n", GetLastError()); - old_hfont = SelectObject(hdc, hfont); - - memset(&gm, 0, sizeof(gm)); - SetLastError(0xdeadbeef); - ret = GetGlyphOutlineA(hdc, 'A', GGO_METRICS, &gm, 0, NULL, &mat); - ok(ret != GDI_ERROR, "GetGlyphOutlineA error %u\n", GetLastError()); - - memset(&gm, 0, sizeof(gm)); - SetLastError(0xdeadbeef); - ret = GetGlyphOutlineA(hdc, 'A', GGO_METRICS, &gm, 0, NULL, NULL); - ok(ret == GDI_ERROR, "GetGlyphOutlineA should fail\n"); - ok(GetLastError() == 0xdeadbeef || - GetLastError() == ERROR_INVALID_PARAMETER, /* win98, winMe */ - "expected 0xdeadbeef, got %u\n", GetLastError()); - - memset(&gm, 0, sizeof(gm)); - SetLastError(0xdeadbeef); - ret = GetGlyphOutlineW(hdc, 'A', GGO_METRICS, &gm, 0, NULL, &mat); - if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) - ok(ret != GDI_ERROR, "GetGlyphOutlineW error %u\n", GetLastError()); - - memset(&gm, 0, sizeof(gm)); - SetLastError(0xdeadbeef); - ret = GetGlyphOutlineW(hdc, 'A', GGO_METRICS, &gm, 0, NULL, NULL); - if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) - { - ok(ret == GDI_ERROR, "GetGlyphOutlineW should fail\n"); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", GetLastError()); - } - - /* test for needed buffer size request on space char */ - memset(&gm, 0, sizeof(gm)); - SetLastError(0xdeadbeef); - ret = GetGlyphOutlineW(hdc, ' ', GGO_NATIVE, &gm, 0, NULL, &mat); - if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) - ok(ret == 0, "GetGlyphOutlineW should return 0 buffer size for space char\n"); - - /* requesting buffer size for space char + error */ - memset(&gm, 0, sizeof(gm)); - SetLastError(0xdeadbeef); - ret = GetGlyphOutlineW(0, ' ', GGO_NATIVE, &gm, 0, NULL, NULL); - if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) - { - ok(ret == GDI_ERROR, "GetGlyphOutlineW should return GDI_ERROR\n"); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", GetLastError()); - } - - SelectObject(hdc, old_hfont); - DeleteObject(hfont); - - for (i = 0; i < sizeof c / sizeof c[0]; ++i) - { - lf.lfFaceName[0] = '\0'; - lf.lfCharSet = c[i].cs; - lf.lfPitchAndFamily = 0; - if (EnumFontFamiliesEx(hdc, &lf, create_font_proc, (LPARAM)&hfont, 0)) - { - skip("TrueType font for charset %u is not installed\n", c[i].cs); - continue; - } - - old_hfont = SelectObject(hdc, hfont); - - /* expected to ignore superfluous bytes (sigle-byte character) */ - ret = GetGlyphOutlineA(hdc, 0x8041, GGO_BITMAP, &gm, 0, NULL, &mat); - ret2 = GetGlyphOutlineA(hdc, 0x41, GGO_BITMAP, &gm2, 0, NULL, &mat); - ok(ret == ret2 && memcmp(&gm, &gm2, sizeof gm) == 0, "%d %d\n", ret, ret2); - - ret = GetGlyphOutlineA(hdc, 0xcc8041, GGO_BITMAP, &gm, 0, NULL, &mat); - ok(ret == ret2 && memcmp(&gm, &gm2, sizeof gm) == 0, - "Expected to ignore superfluous bytes, got %d %d\n", ret, ret2); - - /* expected to ignore superfluous bytes (double-byte character) */ - ret = GetGlyphOutlineA(hdc, c[i].a, GGO_BITMAP, &gm, 0, NULL, &mat); - ret2 = GetGlyphOutlineA(hdc, c[i].a | 0xdead0000, GGO_BITMAP, &gm2, 0, NULL, &mat); - ok(ret == ret2 && memcmp(&gm, &gm2, sizeof gm) == 0, - "Expected to ignore superfluous bytes, got %d %d\n", ret, ret2); - - /* expected to match wide-char version results */ - ret2 = GetGlyphOutlineW(hdc, c[i].w, GGO_BITMAP, &gm2, 0, NULL, &mat); - ok(ret == ret2 && memcmp(&gm, &gm2, sizeof gm) == 0, "%d %d\n", ret, ret2); - - hfont = SelectObject(hdc, old_hfont); - DeleteObject(hfont); - } - - DeleteDC(hdc); -} - -/* bug #9995: there is a limit to the character width that can be specified */ -static void test_GetTextMetrics2(const char *fontname, int font_height) -{ - HFONT of, hf; - HDC hdc; - TEXTMETRICA tm; - BOOL ret; - int ave_width, height, width, ratio, scale; - - if (!is_truetype_font_installed( fontname)) { - skip("%s is not installed\n", fontname); - return; - } - hdc = CreateCompatibleDC(0); - ok( hdc != NULL, "CreateCompatibleDC failed\n"); - /* select width = 0 */ - hf = CreateFontA(font_height, 0, 0, 0, FW_REGULAR, FALSE, FALSE, FALSE, - DEFAULT_CHARSET, OUT_TT_PRECIS, CLIP_LH_ANGLES, - DEFAULT_QUALITY, VARIABLE_PITCH, - fontname); - ok( hf != NULL, "CreateFontA(%s, %d) failed\n", fontname, font_height); - of = SelectObject( hdc, hf); - ret = GetTextMetricsA( hdc, &tm); - ok(ret, "GetTextMetricsA error %u\n", GetLastError()); - height = tm.tmHeight; - ave_width = tm.tmAveCharWidth; - SelectObject( hdc, of); - DeleteObject( hf); - - trace("height %d, ave width %d\n", height, ave_width); - - for (width = ave_width * 2; /* nothing*/; width += ave_width) - { - hf = CreateFont(height, width, 0, 0, FW_REGULAR, FALSE, FALSE, FALSE, - DEFAULT_CHARSET, OUT_TT_PRECIS, CLIP_LH_ANGLES, - DEFAULT_QUALITY, VARIABLE_PITCH, fontname); - ok(hf != 0, "CreateFont failed\n"); - of = SelectObject(hdc, hf); - ret = GetTextMetrics(hdc, &tm); - ok(ret, "GetTextMetrics error %u\n", GetLastError()); - SelectObject(hdc, of); - DeleteObject(hf); - - if (match_off_by_1(tm.tmAveCharWidth, ave_width) || width / height > 200) - break; - } - - DeleteDC(hdc); - - ratio = width / height; - scale = width / ave_width; - - trace("max width/height ratio (%d / %d) %d, max width scale (%d / %d) %d\n", - width, height, ratio, width, ave_width, scale); - - ok(ratio >= 90 && ratio <= 110, "expected width/height ratio 90-110, got %d\n", ratio); -} - -static void test_CreateFontIndirect(void) -{ - LOGFONTA lf, getobj_lf; - int ret, i; - HFONT hfont; - char TestName[][16] = {"Arial", "Arial Bold", "Arial Italic", "Arial Baltic"}; - - memset(&lf, 0, sizeof(lf)); - lf.lfCharSet = ANSI_CHARSET; - lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; - lf.lfHeight = 16; - lf.lfWidth = 16; - lf.lfQuality = DEFAULT_QUALITY; - lf.lfItalic = FALSE; - lf.lfWeight = FW_DONTCARE; - - for (i = 0; i < sizeof(TestName)/sizeof(TestName[0]); i++) - { - lstrcpyA(lf.lfFaceName, TestName[i]); - hfont = CreateFontIndirectA(&lf); - ok(hfont != 0, "CreateFontIndirectA failed\n"); - SetLastError(0xdeadbeef); - ret = GetObject(hfont, sizeof(getobj_lf), &getobj_lf); - ok(ret, "GetObject failed: %d\n", GetLastError()); - ok(lf.lfItalic == getobj_lf.lfItalic, "lfItalic: expect %02x got %02x\n", lf.lfItalic, getobj_lf.lfItalic); - ok(lf.lfWeight == getobj_lf.lfWeight || - broken((SHORT)lf.lfWeight == getobj_lf.lfWeight), /* win9x */ - "lfWeight: expect %08x got %08x\n", lf.lfWeight, getobj_lf.lfWeight); - ok(!lstrcmpA(lf.lfFaceName, getobj_lf.lfFaceName) || - broken(!memcmp(lf.lfFaceName, getobj_lf.lfFaceName, LF_FACESIZE-1)), /* win9x doesn't ensure '\0' termination */ - "font names don't match: %s != %s\n", lf.lfFaceName, getobj_lf.lfFaceName); - DeleteObject(hfont); - } -} - -static void test_CreateFontIndirectEx(void) -{ - ENUMLOGFONTEXDVA lfex; - HFONT hfont; - - if (!pCreateFontIndirectExA) - { - win_skip("CreateFontIndirectExA is not available\n"); - return; - } - - if (!is_truetype_font_installed("Arial")) - { - skip("Arial is not installed\n"); - return; - } - - SetLastError(0xdeadbeef); - hfont = pCreateFontIndirectExA(NULL); - ok(hfont == NULL, "got %p\n", hfont); - ok(GetLastError() == 0xdeadbeef, "got error %d\n", GetLastError()); - - memset(&lfex, 0, sizeof(lfex)); - lstrcpyA(lfex.elfEnumLogfontEx.elfLogFont.lfFaceName, "Arial"); - hfont = pCreateFontIndirectExA(&lfex); - ok(hfont != 0, "CreateFontIndirectEx failed\n"); - if (hfont) - check_font("Arial", &lfex.elfEnumLogfontEx.elfLogFont, hfont); - DeleteObject(hfont); -} - -static void free_font(void *font) -{ - UnmapViewOfFile(font); -} - -static void *load_font(const char *font_name, DWORD *font_size) -{ - char file_name[MAX_PATH]; - HANDLE file, mapping; - void *font; - - if (!GetWindowsDirectory(file_name, sizeof(file_name))) return NULL; - strcat(file_name, "\\fonts\\"); - strcat(file_name, font_name); - - file = CreateFile(file_name, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0); - if (file == INVALID_HANDLE_VALUE) return NULL; - - *font_size = GetFileSize(file, NULL); - - mapping = CreateFileMapping(file, NULL, PAGE_READONLY, 0, 0, NULL); - if (!mapping) - { - CloseHandle(file); - return NULL; - } - - font = MapViewOfFile(mapping, FILE_MAP_READ, 0, 0, 0); - - CloseHandle(file); - CloseHandle(mapping); - return font; -} - -static void test_AddFontMemResource(void) -{ - void *font; - DWORD font_size, num_fonts; - HANDLE ret; - BOOL bRet; - - if (!pAddFontMemResourceEx || !pRemoveFontMemResourceEx) - { - win_skip("AddFontMemResourceEx is not available on this platform\n"); - return; - } - - font = load_font("sserife.fon", &font_size); - if (!font) - { - skip("Unable to locate and load font sserife.fon\n"); - return; - } - - SetLastError(0xdeadbeef); - ret = pAddFontMemResourceEx(NULL, 0, NULL, NULL); - ok(!ret, "AddFontMemResourceEx should fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ret = pAddFontMemResourceEx(NULL, 10, NULL, NULL); - ok(!ret, "AddFontMemResourceEx should fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ret = pAddFontMemResourceEx(NULL, 0, NULL, &num_fonts); - ok(!ret, "AddFontMemResourceEx should fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ret = pAddFontMemResourceEx(NULL, 10, NULL, &num_fonts); - ok(!ret, "AddFontMemResourceEx should fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ret = pAddFontMemResourceEx(font, 0, NULL, NULL); - ok(!ret, "AddFontMemResourceEx should fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ret = pAddFontMemResourceEx(font, 10, NULL, NULL); - ok(!ret, "AddFontMemResourceEx should fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", - GetLastError()); - - num_fonts = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = pAddFontMemResourceEx(font, 0, NULL, &num_fonts); - ok(!ret, "AddFontMemResourceEx should fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", - GetLastError()); - ok(num_fonts == 0xdeadbeef, "number of loaded fonts should be 0xdeadbeef\n"); - - if (0) /* hangs under windows 2000 */ - { - num_fonts = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = pAddFontMemResourceEx(font, 10, NULL, &num_fonts); - ok(!ret, "AddFontMemResourceEx should fail\n"); - ok(GetLastError() == 0xdeadbeef, - "Expected GetLastError() to return 0xdeadbeef, got %u\n", - GetLastError()); - ok(num_fonts == 0xdeadbeef, "number of loaded fonts should be 0xdeadbeef\n"); - } - - num_fonts = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = pAddFontMemResourceEx(font, font_size, NULL, &num_fonts); - ok(ret != 0, "AddFontMemResourceEx error %d\n", GetLastError()); - ok(num_fonts != 0xdeadbeef, "number of loaded fonts should not be 0xdeadbeef\n"); - ok(num_fonts != 0, "number of loaded fonts should not be 0\n"); - - free_font(font); - - SetLastError(0xdeadbeef); - bRet = pRemoveFontMemResourceEx(ret); - ok(bRet, "RemoveFontMemResourceEx error %d\n", GetLastError()); - - /* test invalid pointer to number of loaded fonts */ - font = load_font("sserife.fon", &font_size); - ok(font != NULL, "Unable to locate and load font sserife.fon\n"); - - SetLastError(0xdeadbeef); - ret = pAddFontMemResourceEx(font, font_size, NULL, (void *)0xdeadbeef); - ok(!ret, "AddFontMemResourceEx should fail\n"); - ok(GetLastError() == 0xdeadbeef, - "Expected GetLastError() to return 0xdeadbeef, got %u\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ret = pAddFontMemResourceEx(font, font_size, NULL, NULL); - ok(!ret, "AddFontMemResourceEx should fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", - GetLastError()); - - free_font(font); -} - -static INT CALLBACK enum_fonts_proc(const LOGFONT *elf, const TEXTMETRIC *ntm, DWORD type, LPARAM lparam) -{ - LOGFONT *lf; - - if (type != TRUETYPE_FONTTYPE) return 1; - - ok(ntm->tmWeight == elf->lfWeight, "expected %d got %d\n", ntm->tmWeight, elf->lfWeight); - - lf = (LOGFONT *)lparam; - *lf = *elf; - return 0; -} - -static INT CALLBACK enum_all_fonts_proc(const LOGFONT *elf, const TEXTMETRIC *ntm, DWORD type, LPARAM lparam) -{ - int ret; - LOGFONT *lf; - - if (type != TRUETYPE_FONTTYPE) return 1; - - lf = (LOGFONT *)lparam; - ret = strcmp(lf->lfFaceName, elf->lfFaceName); - if(ret == 0) - { - ok(ntm->tmWeight == elf->lfWeight, "expected %d got %d\n", ntm->tmWeight, elf->lfWeight); - *lf = *elf; - return 0; - } - return 1; -} - -static void test_EnumFonts(void) -{ - int ret; - LOGFONT lf; - HDC hdc; - - if (!is_truetype_font_installed("Arial")) - { - skip("Arial is not installed\n"); - return; - } - - /* Windows uses localized font face names, so Arial Bold won't be found */ - if (PRIMARYLANGID(GetUserDefaultLangID()) != LANG_ENGLISH) - { - skip("User locale is not English, skipping the test\n"); - return; - } - - hdc = CreateCompatibleDC(0); - - ret = EnumFontFamilies(hdc, "Arial", enum_fonts_proc, (LPARAM)&lf); - ok(!ret, "font Arial is not enumerated\n"); - ret = strcmp(lf.lfFaceName, "Arial"); - ok(!ret, "expected Arial got %s\n", lf.lfFaceName); - ok(lf.lfWeight == FW_NORMAL, "expected FW_NORMAL got %d\n", lf.lfWeight); - - lstrcpy(lf.lfFaceName, "Arial"); - ret = EnumFontFamilies(hdc, NULL, enum_all_fonts_proc, (LPARAM)&lf); - ok(!ret, "font Arial is not enumerated\n"); - ret = strcmp(lf.lfFaceName, "Arial"); - ok(!ret, "expected Arial got %s\n", lf.lfFaceName); - ok(lf.lfWeight == FW_NORMAL, "expected FW_NORMAL got %d\n", lf.lfWeight); - - ret = EnumFontFamilies(hdc, "Arial Bold", enum_fonts_proc, (LPARAM)&lf); - ok(!ret, "font Arial Bold is not enumerated\n"); - ret = strcmp(lf.lfFaceName, "Arial"); - ok(!ret, "expected Arial got %s\n", lf.lfFaceName); - ok(lf.lfWeight == FW_BOLD, "expected FW_BOLD got %d\n", lf.lfWeight); - - lstrcpy(lf.lfFaceName, "Arial Bold"); - ret = EnumFontFamilies(hdc, NULL, enum_all_fonts_proc, (LPARAM)&lf); - ok(ret, "font Arial Bold should not be enumerated\n"); - - ret = EnumFontFamilies(hdc, "Arial Bold Italic", enum_fonts_proc, (LPARAM)&lf); - ok(!ret, "font Arial Bold Italic is not enumerated\n"); - ret = strcmp(lf.lfFaceName, "Arial"); - ok(!ret, "expected Arial got %s\n", lf.lfFaceName); - ok(lf.lfWeight == FW_BOLD, "expected FW_BOLD got %d\n", lf.lfWeight); - - lstrcpy(lf.lfFaceName, "Arial Bold Italic"); - ret = EnumFontFamilies(hdc, NULL, enum_all_fonts_proc, (LPARAM)&lf); - ok(ret, "font Arial Bold Italic should not be enumerated\n"); - - ret = EnumFontFamilies(hdc, "Arial Italic Bold", enum_fonts_proc, (LPARAM)&lf); - ok(ret, "font Arial Italic Bold should not be enumerated\n"); - - lstrcpy(lf.lfFaceName, "Arial Italic Bold"); - ret = EnumFontFamilies(hdc, NULL, enum_all_fonts_proc, (LPARAM)&lf); - ok(ret, "font Arial Italic Bold should not be enumerated\n"); - - DeleteDC(hdc); -} - -static INT CALLBACK is_font_installed_fullname_proc(const LOGFONT *lf, const TEXTMETRIC *ntm, DWORD type, LPARAM lParam) -{ - const ENUMLOGFONT *elf = (const ENUMLOGFONT *)lf; - const char *fullname = (const char *)lParam; - - if (!strcmp((const char *)elf->elfFullName, fullname)) return 0; - - return 1; -} - -static BOOL is_font_installed_fullname(const char *family, const char *fullname) -{ - HDC hdc = GetDC(0); - BOOL ret = FALSE; - - if(!EnumFontFamiliesA(hdc, family, is_font_installed_fullname_proc, (LPARAM)fullname)) - ret = TRUE; - - ReleaseDC(0, hdc); - return ret; -} - -static void test_fullname(void) -{ - static const char *TestName[] = {"Lucida Sans Demibold Roman", "Lucida Sans Italic", "Lucida Sans Regular"}; - char buf[LF_FULLFACESIZE]; - HFONT hfont, of; - LOGFONTA lf; - HDC hdc; - int i; - - hdc = CreateCompatibleDC(0); - ok(hdc != NULL, "CreateCompatibleDC failed\n"); - - memset(&lf, 0, sizeof(lf)); - lf.lfCharSet = ANSI_CHARSET; - lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; - lf.lfHeight = 16; - lf.lfWidth = 16; - lf.lfQuality = DEFAULT_QUALITY; - lf.lfItalic = FALSE; - lf.lfWeight = FW_DONTCARE; - - for (i = 0; i < sizeof(TestName) / sizeof(TestName[0]); i++) - { - if (!is_font_installed_fullname("Lucida Sans", TestName[i])) - { - skip("%s is not installed\n", TestName[i]); - continue; - } - - lstrcpyA(lf.lfFaceName, TestName[i]); - hfont = CreateFontIndirectA(&lf); - ok(hfont != 0, "CreateFontIndirectA failed\n"); - - of = SelectObject(hdc, hfont); - buf[0] = 0; - ok(get_ttf_nametable_entry(hdc, TT_NAME_ID_FULL_NAME, buf, sizeof(buf)), - "face full name could not be read\n"); - ok(!lstrcmpA(buf, TestName[i]), "font full names don't match: %s != %s\n", TestName[i], buf); - SelectObject(hdc, of); - DeleteObject(hfont); - } - DeleteDC(hdc); -} - -static BOOL write_ttf_file(char *tmp_name) -{ - char tmp_path[MAX_PATH]; - HRSRC rsrc; - void *rsrc_data; - DWORD rsrc_size; - HANDLE hfile; - BOOL ret; - - SetLastError(0xdeadbeef); - rsrc = FindResource(GetModuleHandle(0), "wine_test.ttf", RT_RCDATA); - ok(rsrc != 0, "FindResource error %d\n", GetLastError()); - if (!rsrc) return FALSE; - SetLastError(0xdeadbeef); - rsrc_data = LockResource(LoadResource(GetModuleHandle(0), rsrc)); - ok(rsrc_data != 0, "LockResource error %d\n", GetLastError()); - if (!rsrc_data) return FALSE; - SetLastError(0xdeadbeef); - rsrc_size = SizeofResource(GetModuleHandle(0), rsrc); - ok(rsrc_size != 0, "SizeofResource error %d\n", GetLastError()); - if (!rsrc_size) return FALSE; - - SetLastError(0xdeadbeef); - ret = GetTempPath(MAX_PATH, tmp_path); - ok(ret, "GetTempPath() error %d\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = GetTempFileName(tmp_path, "ttf", 0, tmp_name); - ok(ret, "GetTempFileName() error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - hfile = CreateFile(tmp_name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); - ok(hfile != INVALID_HANDLE_VALUE, "CreateFile() error %d\n", GetLastError()); - if (hfile == INVALID_HANDLE_VALUE) return FALSE; - - SetLastError(0xdeadbeef); - ret = WriteFile(hfile, rsrc_data, rsrc_size, &rsrc_size, NULL); - ok(ret, "WriteFile() error %d\n", GetLastError()); - - CloseHandle(hfile); - return ret; -} - -static void test_CreateScalableFontResource(void) -{ - char ttf_name[MAX_PATH]; - char tmp_path[MAX_PATH]; - char fot_name[MAX_PATH]; - char *file_part; - DWORD ret; - - if (!pAddFontResourceExA || !pRemoveFontResourceExA) - { - win_skip("AddFontResourceExA is not available on this platform\n"); - return; - } - - if (!write_ttf_file(ttf_name)) - { - skip("Failed to create ttf file for testing\n"); - return; - } - - trace("created %s\n", ttf_name); - - ret = is_truetype_font_installed("wine_test"); - ok(!ret, "font wine_test should not be enumerated\n"); - - ret = GetTempPath(MAX_PATH, tmp_path); - ok(ret, "GetTempPath() error %d\n", GetLastError()); - ret = GetTempFileName(tmp_path, "fot", 0, fot_name); - ok(ret, "GetTempFileName() error %d\n", GetLastError()); - - ret = GetFileAttributes(fot_name); - ok(ret != INVALID_FILE_ATTRIBUTES, "file %s does not exist\n", fot_name); - - SetLastError(0xdeadbeef); - ret = CreateScalableFontResource(0, fot_name, ttf_name, NULL); - ok(!ret, "CreateScalableFontResource() should fail\n"); - ok(GetLastError() == ERROR_FILE_EXISTS, "not expected error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = CreateScalableFontResource(0, fot_name, ttf_name, ""); - ok(!ret, "CreateScalableFontResource() should fail\n"); - ok(GetLastError() == ERROR_FILE_EXISTS, "not expected error %d\n", GetLastError()); - - file_part = strrchr(ttf_name, '\\'); - SetLastError(0xdeadbeef); - ret = CreateScalableFontResource(0, fot_name, file_part, tmp_path); - ok(!ret, "CreateScalableFontResource() should fail\n"); - ok(GetLastError() == ERROR_FILE_EXISTS, "not expected error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = CreateScalableFontResource(0, fot_name, "random file name", tmp_path); - ok(!ret, "CreateScalableFontResource() should fail\n"); -todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "not expected error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = CreateScalableFontResource(0, fot_name, NULL, ttf_name); - ok(!ret, "CreateScalableFontResource() should fail\n"); -todo_wine - ok(GetLastError() == ERROR_INVALID_PARAMETER, "not expected error %d\n", GetLastError()); - - ret = DeleteFile(fot_name); - ok(ret, "DeleteFile() error %d\n", GetLastError()); - - ret = pRemoveFontResourceExA(fot_name, 0, 0); -todo_wine - ok(!ret, "RemoveFontResourceEx() should fail\n"); - - /* FIXME: since CreateScalableFontResource is a stub further testing is impossible */ - if (ret) return; - - /* test public font resource */ - SetLastError(0xdeadbeef); - ret = CreateScalableFontResource(0, fot_name, ttf_name, NULL); - ok(ret, "CreateScalableFontResource() error %d\n", GetLastError()); - - ret = is_truetype_font_installed("wine_test"); - ok(!ret, "font wine_test should not be enumerated\n"); - - SetLastError(0xdeadbeef); - ret = pAddFontResourceExA(fot_name, 0, 0); - ok(ret, "AddFontResourceEx() error %d\n", GetLastError()); - - ret = is_truetype_font_installed("wine_test"); - ok(ret, "font wine_test should be enumerated\n"); - - ret = pRemoveFontResourceExA(fot_name, FR_PRIVATE, 0); - ok(!ret, "RemoveFontResourceEx() with not matching flags should fail\n"); - - SetLastError(0xdeadbeef); - ret = pRemoveFontResourceExA(fot_name, 0, 0); -todo_wine - ok(ret, "RemoveFontResourceEx() error %d\n", GetLastError()); - - ret = is_truetype_font_installed("wine_test"); -todo_wine - ok(!ret, "font wine_test should not be enumerated\n"); - - /* FIXME: since RemoveFontResource is a stub correct testing is impossible */ - if (ret) - { - /* remove once RemoveFontResource is implemented */ - DeleteFile(fot_name); - DeleteFile(ttf_name); - return; - } - - ret = pRemoveFontResourceExA(fot_name, 0, 0); - ok(!ret, "RemoveFontResourceEx() should fail\n"); - - DeleteFile(fot_name); - - /* test hidden font resource */ - SetLastError(0xdeadbeef); - ret = CreateScalableFontResource(1, fot_name, ttf_name, NULL); - ok(ret, "CreateScalableFontResource() error %d\n", GetLastError()); - - ret = is_truetype_font_installed("wine_test"); - ok(!ret, "font wine_test should not be enumerated\n"); - - SetLastError(0xdeadbeef); - ret = pAddFontResourceExA(fot_name, 0, 0); - ok(ret, "AddFontResourceEx() error %d\n", GetLastError()); - - ret = is_truetype_font_installed("wine_test"); - ok(!ret, "font wine_test should not be enumerated\n"); - - /* XP allows removing a private font added with 0 flags */ - SetLastError(0xdeadbeef); - ret = pRemoveFontResourceExA(fot_name, FR_PRIVATE, 0); - ok(ret, "RemoveFontResourceEx() error %d\n", GetLastError()); - - ret = is_truetype_font_installed("wine_test"); - ok(!ret, "font wine_test should not be enumerated\n"); - - ret = pRemoveFontResourceExA(fot_name, 0, 0); - ok(!ret, "RemoveFontResourceEx() should fail\n"); - - DeleteFile(fot_name); - DeleteFile(ttf_name); -} - -START_TEST(font) -{ - init(); - - test_logfont(); - test_bitmap_font(); - test_outline_font(); - test_bitmap_font_metrics(); - test_GdiGetCharDimensions(); - test_GetCharABCWidths(); - test_text_extents(); - test_GetGlyphIndices(); - test_GetKerningPairs(); - test_GetOutlineTextMetrics(); - test_SetTextJustification(); - test_font_charset(); - test_GetFontUnicodeRanges(); - test_nonexistent_font(); - test_orientation(); - test_height_selection(); - test_AddFontMemResource(); - test_EnumFonts(); - - /* On Windows Arial has a lot of default charset aliases such as Arial Cyr, - * I'd like to avoid them in this test. - */ - test_EnumFontFamilies("Arial Black", ANSI_CHARSET); - test_EnumFontFamilies("Symbol", SYMBOL_CHARSET); - if (is_truetype_font_installed("Arial Black") && - (is_truetype_font_installed("Symbol") || is_truetype_font_installed("Wingdings"))) - { - test_EnumFontFamilies("", ANSI_CHARSET); - test_EnumFontFamilies("", SYMBOL_CHARSET); - test_EnumFontFamilies("", DEFAULT_CHARSET); - } - else - skip("Arial Black or Symbol/Wingdings is not installed\n"); - test_EnumFontFamiliesEx_default_charset(); - test_GetTextMetrics(); - test_GdiRealizationInfo(); - test_GetTextFace(); - test_GetGlyphOutline(); - test_GetTextMetrics2("Tahoma", -11); - test_GetTextMetrics2("Tahoma", -55); - test_GetTextMetrics2("Tahoma", -110); - test_GetTextMetrics2("Arial", -11); - test_GetTextMetrics2("Arial", -55); - test_GetTextMetrics2("Arial", -110); - test_CreateFontIndirect(); - test_CreateFontIndirectEx(); - test_oemcharset(); - test_fullname(); - - /* CreateScalableFontResource should be last test until RemoveFontResource - * is properly implemented. - */ - test_CreateScalableFontResource(); -} diff --git a/rostests/winetests/gdi32/gdi32.rbuild b/rostests/winetests/gdi32/gdi32.rbuild deleted file mode 100644 index 8d78242b2d2..00000000000 --- a/rostests/winetests/gdi32/gdi32.rbuild +++ /dev/null @@ -1,26 +0,0 @@ - - - - . - - ntdll - gdi32 - user32 - advapi32 - bitmap.c - brush.c - clipping.c - dc.c - dib.c - font.c - gdiobj.c - generated.c - icm.c - mapping.c - metafile.c - palette.c - path.c - pen.c - testlist.c - resource.rc - diff --git a/rostests/winetests/gdi32/gdiobj.c b/rostests/winetests/gdi32/gdiobj.c deleted file mode 100755 index c85431182b9..00000000000 --- a/rostests/winetests/gdi32/gdiobj.c +++ /dev/null @@ -1,328 +0,0 @@ -/* - * Unit test suite for GDI objects - * - * Copyright 2002 Mike McCormack - * Copyright 2004 Dmitry Timoshkov - * - * 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 "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" - -#include "wine/test.h" - -static void test_gdi_objects(void) -{ - BYTE buff[256]; - HDC hdc = GetDC(NULL); - HPEN hp; - int i; - BOOL ret; - - /* SelectObject() with a NULL DC returns 0 and sets ERROR_INVALID_HANDLE. - * Note: Under XP at least invalid ptrs can also be passed, not just NULL; - * Don't test that here in case it crashes earlier win versions. - */ - SetLastError(0); - hp = SelectObject(NULL, GetStockObject(BLACK_PEN)); - ok(!hp && (GetLastError() == ERROR_INVALID_HANDLE || broken(!GetLastError())), - "SelectObject(NULL DC) expected 0, ERROR_INVALID_HANDLE, got %p, %u\n", - hp, GetLastError()); - - /* With a valid DC and a NULL object, the call returns 0 but does not SetLastError() */ - SetLastError(0); - hp = SelectObject(hdc, NULL); - ok(!hp && !GetLastError(), - "SelectObject(NULL obj) expected 0, NO_ERROR, got %p, %u\n", - hp, GetLastError()); - - /* The DC is unaffected by the NULL SelectObject */ - SetLastError(0); - hp = SelectObject(hdc, GetStockObject(BLACK_PEN)); - ok(hp && !GetLastError(), - "SelectObject(post NULL) expected non-null, NO_ERROR, got %p, %u\n", - hp, GetLastError()); - - /* GetCurrentObject does not SetLastError() on a null object */ - SetLastError(0); - hp = GetCurrentObject(NULL, OBJ_PEN); - ok(!hp && !GetLastError(), - "GetCurrentObject(NULL DC) expected 0, NO_ERROR, got %p, %u\n", - hp, GetLastError()); - - /* DeleteObject does not SetLastError() on a null object */ - ret = DeleteObject(NULL); - ok( !ret && !GetLastError(), - "DeleteObject(NULL obj), expected 0, NO_ERROR, got %d, %u\n", - ret, GetLastError()); - - /* GetObject does not SetLastError() on a null object */ - SetLastError(0); - i = GetObjectA(NULL, sizeof(buff), buff); - ok (!i && (GetLastError() == 0 || GetLastError() == ERROR_INVALID_PARAMETER), - "GetObject(NULL obj), expected 0, NO_ERROR, got %d, %u\n", - i, GetLastError()); - - /* GetObject expects ERROR_NOACCESS when passed an invalid buffer */ - hp = SelectObject(hdc, GetStockObject(BLACK_PEN)); - SetLastError(0); - i = GetObjectA(hp, (INT_PTR)buff, (LPVOID)sizeof(buff)); - ok (!i && (GetLastError() == 0 || GetLastError() == ERROR_NOACCESS), - "GetObject(invalid buff), expected 0, ERROR_NOACCESS, got %d, %u\n", - i, GetLastError()); - - /* GetObjectType does SetLastError() on a null object */ - SetLastError(0); - i = GetObjectType(NULL); - ok (!i && GetLastError() == ERROR_INVALID_HANDLE, - "GetObjectType(NULL obj), expected 0, ERROR_INVALID_HANDLE, got %d, %u\n", - i, GetLastError()); - - /* UnrealizeObject does not SetLastError() on a null object */ - SetLastError(0); - i = UnrealizeObject(NULL); - ok (!i && !GetLastError(), - "UnrealizeObject(NULL obj), expected 0, NO_ERROR, got %d, %u\n", - i, GetLastError()); - - ReleaseDC(NULL, hdc); -} - -struct hgdiobj_event -{ - HDC hdc; - HGDIOBJ hgdiobj1; - HGDIOBJ hgdiobj2; - HANDLE stop_event; - HANDLE ready_event; -}; - -static DWORD WINAPI thread_proc(void *param) -{ - LOGPEN lp; - DWORD status; - struct hgdiobj_event *hgdiobj_event = param; - - hgdiobj_event->hdc = CreateDC("display", NULL, NULL, NULL); - ok(hgdiobj_event->hdc != NULL, "CreateDC error %u\n", GetLastError()); - - hgdiobj_event->hgdiobj1 = CreatePen(PS_DASHDOTDOT, 17, RGB(1, 2, 3)); - ok(hgdiobj_event->hgdiobj1 != 0, "Failed to create pen\n"); - - hgdiobj_event->hgdiobj2 = CreateRectRgn(0, 1, 12, 17); - ok(hgdiobj_event->hgdiobj2 != 0, "Failed to create pen\n"); - - SetEvent(hgdiobj_event->ready_event); - status = WaitForSingleObject(hgdiobj_event->stop_event, INFINITE); - ok(status == WAIT_OBJECT_0, "WaitForSingleObject error %u\n", GetLastError()); - - ok(!GetObject(hgdiobj_event->hgdiobj1, sizeof(lp), &lp), "GetObject should fail\n"); - - ok(!GetDeviceCaps(hgdiobj_event->hdc, TECHNOLOGY), "GetDeviceCaps(TECHNOLOGY) should fail\n"); - - return 0; -} - -static void test_thread_objects(void) -{ - LOGPEN lp; - DWORD tid, type; - HANDLE hthread; - struct hgdiobj_event hgdiobj_event; - INT ret; - DWORD status; - BOOL bRet; - - hgdiobj_event.stop_event = CreateEvent(NULL, 0, 0, NULL); - ok(hgdiobj_event.stop_event != NULL, "CreateEvent error %u\n", GetLastError()); - hgdiobj_event.ready_event = CreateEvent(NULL, 0, 0, NULL); - ok(hgdiobj_event.ready_event != NULL, "CreateEvent error %u\n", GetLastError()); - - hthread = CreateThread(NULL, 0, thread_proc, &hgdiobj_event, 0, &tid); - ok(hthread != NULL, "CreateThread error %u\n", GetLastError()); - - status = WaitForSingleObject(hgdiobj_event.ready_event, INFINITE); - ok(status == WAIT_OBJECT_0, "WaitForSingleObject error %u\n", GetLastError()); - - ret = GetObject(hgdiobj_event.hgdiobj1, sizeof(lp), &lp); - ok(ret == sizeof(lp), "GetObject error %u\n", GetLastError()); - ok(lp.lopnStyle == PS_DASHDOTDOT, "wrong pen style %d\n", lp.lopnStyle); - ok(lp.lopnWidth.x == 17, "wrong pen width.y %d\n", lp.lopnWidth.x); - ok(lp.lopnWidth.y == 0, "wrong pen width.y %d\n", lp.lopnWidth.y); - ok(lp.lopnColor == RGB(1, 2, 3), "wrong pen width.y %08x\n", lp.lopnColor); - - ret = GetDeviceCaps(hgdiobj_event.hdc, TECHNOLOGY); - ok(ret == DT_RASDISPLAY, "GetDeviceCaps(TECHNOLOGY) should return DT_RASDISPLAY not %d\n", ret); - - bRet = DeleteObject(hgdiobj_event.hgdiobj1); - ok(bRet, "DeleteObject error %u\n", GetLastError()); - bRet = DeleteDC(hgdiobj_event.hdc); - ok(bRet, "DeleteDC error %u\n", GetLastError()); - - type = GetObjectType(hgdiobj_event.hgdiobj2); - ok(type == OBJ_REGION, "GetObjectType returned %u\n", type); - - SetEvent(hgdiobj_event.stop_event); - status = WaitForSingleObject(hthread, INFINITE); - ok(status == WAIT_OBJECT_0, "WaitForSingleObject error %u\n", GetLastError()); - CloseHandle(hthread); - - type = GetObjectType(hgdiobj_event.hgdiobj2); - ok(type == OBJ_REGION, "GetObjectType returned %u\n", type); - bRet = DeleteObject(hgdiobj_event.hgdiobj2); - ok(bRet, "DeleteObject error %u\n", GetLastError()); - - CloseHandle(hgdiobj_event.stop_event); - CloseHandle(hgdiobj_event.ready_event); -} - -static void test_GetCurrentObject(void) -{ - DWORD type; - HPEN hpen; - HBRUSH hbrush; - HPALETTE hpal; - HFONT hfont; - HBITMAP hbmp; - HRGN hrgn; - HDC hdc; - HCOLORSPACE hcs; - HGDIOBJ hobj; - LOGBRUSH lb; - LOGCOLORSPACEA lcs; - - hdc = CreateCompatibleDC(0); - assert(hdc != 0); - - type = GetObjectType(hdc); - ok(type == OBJ_MEMDC, "GetObjectType returned %u\n", type); - - hpen = CreatePen(PS_SOLID, 10, RGB(10, 20, 30)); - assert(hpen != 0); - SelectObject(hdc, hpen); - hobj = GetCurrentObject(hdc, OBJ_PEN); - ok(hobj == hpen, "OBJ_PEN is wrong: %p\n", hobj); - hobj = GetCurrentObject(hdc, OBJ_EXTPEN); - ok(hobj == hpen, "OBJ_EXTPEN is wrong: %p\n", hobj); - - hbrush = CreateSolidBrush(RGB(10, 20, 30)); - assert(hbrush != 0); - SelectObject(hdc, hbrush); - hobj = GetCurrentObject(hdc, OBJ_BRUSH); - ok(hobj == hbrush, "OBJ_BRUSH is wrong: %p\n", hobj); - - hpal = CreateHalftonePalette(hdc); - assert(hpal != 0); - SelectPalette(hdc, hpal, FALSE); - hobj = GetCurrentObject(hdc, OBJ_PAL); - ok(hobj == hpal, "OBJ_PAL is wrong: %p\n", hobj); - - hfont = CreateFontA(10, 5, 0, 0, FW_DONTCARE, 0, 0, 0, ANSI_CHARSET, - OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, - DEFAULT_PITCH, "MS Sans Serif"); - assert(hfont != 0); - SelectObject(hdc, hfont); - hobj = GetCurrentObject(hdc, OBJ_FONT); - ok(hobj == hfont, "OBJ_FONT is wrong: %p\n", hobj); - - hbmp = CreateBitmap(100, 100, 1, 1, NULL); - assert(hbmp != 0); - SelectObject(hdc, hbmp); - hobj = GetCurrentObject(hdc, OBJ_BITMAP); - ok(hobj == hbmp, "OBJ_BITMAP is wrong: %p\n", hobj); - - assert(GetObject(hbrush, sizeof(lb), &lb) == sizeof(lb)); - hpen = ExtCreatePen(PS_GEOMETRIC | PS_SOLID | PS_ENDCAP_SQUARE | PS_JOIN_BEVEL, - 10, &lb, 0, NULL); - assert(hpen != 0); - SelectObject(hdc, hpen); - hobj = GetCurrentObject(hdc, OBJ_PEN); - ok(hobj == hpen, "OBJ_PEN is wrong: %p\n", hobj); - hobj = GetCurrentObject(hdc, OBJ_EXTPEN); - ok(hobj == hpen, "OBJ_EXTPEN is wrong: %p\n", hobj); - - hcs = GetColorSpace(hdc); - if (hcs) - { - trace("current color space is not NULL\n"); - ok(GetLogColorSpaceA(hcs, &lcs, sizeof(lcs)), "GetLogColorSpace failed\n"); - hcs = CreateColorSpaceA(&lcs); - ok(hcs != 0, "CreateColorSpace failed\n"); - SelectObject(hdc, hcs); - hobj = GetCurrentObject(hdc, OBJ_COLORSPACE); - ok(hobj == hcs, "OBJ_COLORSPACE is wrong: %p\n", hobj); - } - - hrgn = CreateRectRgn(1, 1, 100, 100); - assert(hrgn != 0); - SelectObject(hdc, hrgn); - hobj = GetCurrentObject(hdc, OBJ_REGION); - ok(!hobj, "OBJ_REGION is wrong: %p\n", hobj); - - DeleteDC(hdc); -} - -static void test_region(void) -{ - HRGN hrgn = CreateRectRgn(10, 10, 20, 20); - RECT rc = { 5, 5, 15, 15 }; - BOOL ret = RectInRegion( hrgn, &rc); - ok( ret, "RectInRegion should return TRUE\n"); - /* swap left and right */ - SetRect( &rc, 15, 5, 5, 15 ); - ret = RectInRegion( hrgn, &rc); - ok( ret, "RectInRegion should return TRUE\n"); - /* swap top and bottom */ - SetRect( &rc, 5, 15, 15, 5 ); - ret = RectInRegion( hrgn, &rc); - ok( ret, "RectInRegion should return TRUE\n"); - /* swap both */ - SetRect( &rc, 15, 15, 5, 5 ); - ret = RectInRegion( hrgn, &rc); - ok( ret, "RectInRegion should return TRUE\n"); - DeleteObject(hrgn); - /* swap left and right in the region */ - hrgn = CreateRectRgn(20, 10, 10, 20); - SetRect( &rc, 5, 5, 15, 15 ); - ret = RectInRegion( hrgn, &rc); - ok( ret, "RectInRegion should return TRUE\n"); - /* swap left and right */ - SetRect( &rc, 15, 5, 5, 15 ); - ret = RectInRegion( hrgn, &rc); - ok( ret, "RectInRegion should return TRUE\n"); - /* swap top and bottom */ - SetRect( &rc, 5, 15, 15, 5 ); - ret = RectInRegion( hrgn, &rc); - ok( ret, "RectInRegion should return TRUE\n"); - /* swap both */ - SetRect( &rc, 15, 15, 5, 5 ); - ret = RectInRegion( hrgn, &rc); - ok( ret, "RectInRegion should return TRUE\n"); - DeleteObject(hrgn); -} - -START_TEST(gdiobj) -{ - test_gdi_objects(); - test_thread_objects(); - test_GetCurrentObject(); - test_region(); -} diff --git a/rostests/winetests/gdi32/generated.c b/rostests/winetests/gdi32/generated.c deleted file mode 100644 index 497d90084fb..00000000000 --- a/rostests/winetests/gdi32/generated.c +++ /dev/null @@ -1,13575 +0,0 @@ -/* File generated automatically from tools/winapi/tests.dat; do not edit! */ -/* This file can be copied, modified and distributed without restriction. */ - -/* - * Unit tests for data structure packing - */ - -#define WINVER 0x0501 -#define _WIN32_IE 0x0501 -#define _WIN32_WINNT 0x0501 - -#define WINE_NOWINSOCK - -#include "windows.h" - -#include "wine/test.h" - -/*********************************************************************** - * Compatibility macros - */ - -#define DWORD_PTR UINT_PTR -#define LONG_PTR INT_PTR -#define ULONG_PTR UINT_PTR - -/*********************************************************************** - * Windows API extension - */ - -#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus) -# define _TYPE_ALIGNMENT(type) __alignof(type) -#elif defined(__GNUC__) -# define _TYPE_ALIGNMENT(type) __alignof__(type) -#else -/* - * FIXME: May not be possible without a compiler extension - * (if type is not just a name that is, otherwise the normal - * TYPE_ALIGNMENT can be used) - */ -#endif - -#if defined(TYPE_ALIGNMENT) && defined(_MSC_VER) && _MSC_VER >= 800 && !defined(__cplusplus) -#pragma warning(disable:4116) -#endif - -#if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT) -# define TYPE_ALIGNMENT _TYPE_ALIGNMENT -#endif - -/*********************************************************************** - * Test helper macros - */ - -#define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size); - -#ifdef TYPE_ALIGNMENT -# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align); -#else -# define TEST_TYPE_ALIGN(type, align) -#endif - -#ifdef _TYPE_ALIGNMENT -# define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align); -# define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align); -#else -# define TEST_TARGET_ALIGN(type, align) -# define TEST_FIELD_ALIGN(type, field, align) -#endif - -#define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset); - -#define TEST_TARGET_SIZE(type, size) TEST_TYPE_SIZE(*(type)0, size) -#define TEST_FIELD_SIZE(type, field, size) TEST_TYPE_SIZE((((type*)0)->field), size) -#define TEST_TYPE_SIGNED(type) C_ASSERT((type) -1 < 0); -#define TEST_TYPE_UNSIGNED(type) C_ASSERT((type) -1 > 0); - - -#ifdef _WIN64 - -static void test_pack_ABC(void) -{ - /* ABC */ - TEST_TYPE_SIZE (ABC, 12) - TEST_TYPE_ALIGN (ABC, 4) - TEST_FIELD_SIZE (ABC, abcA, 4) - TEST_FIELD_ALIGN (ABC, abcA, 4) - TEST_FIELD_OFFSET(ABC, abcA, 0) - TEST_FIELD_SIZE (ABC, abcB, 4) - TEST_FIELD_ALIGN (ABC, abcB, 4) - TEST_FIELD_OFFSET(ABC, abcB, 4) - TEST_FIELD_SIZE (ABC, abcC, 4) - TEST_FIELD_ALIGN (ABC, abcC, 4) - TEST_FIELD_OFFSET(ABC, abcC, 8) -} - -static void test_pack_ABCFLOAT(void) -{ - /* ABCFLOAT */ - TEST_TYPE_SIZE (ABCFLOAT, 12) - TEST_TYPE_ALIGN (ABCFLOAT, 4) - TEST_FIELD_SIZE (ABCFLOAT, abcfA, 4) - TEST_FIELD_ALIGN (ABCFLOAT, abcfA, 4) - TEST_FIELD_OFFSET(ABCFLOAT, abcfA, 0) - TEST_FIELD_SIZE (ABCFLOAT, abcfB, 4) - TEST_FIELD_ALIGN (ABCFLOAT, abcfB, 4) - TEST_FIELD_OFFSET(ABCFLOAT, abcfB, 4) - TEST_FIELD_SIZE (ABCFLOAT, abcfC, 4) - TEST_FIELD_ALIGN (ABCFLOAT, abcfC, 4) - TEST_FIELD_OFFSET(ABCFLOAT, abcfC, 8) -} - -static void test_pack_ABORTPROC(void) -{ - /* ABORTPROC */ - TEST_TYPE_SIZE (ABORTPROC, 8) - TEST_TYPE_ALIGN (ABORTPROC, 8) -} - -static void test_pack_BITMAP(void) -{ - /* BITMAP */ - TEST_TYPE_SIZE (BITMAP, 32) - TEST_TYPE_ALIGN (BITMAP, 8) - TEST_FIELD_SIZE (BITMAP, bmType, 4) - TEST_FIELD_ALIGN (BITMAP, bmType, 4) - TEST_FIELD_OFFSET(BITMAP, bmType, 0) - TEST_FIELD_SIZE (BITMAP, bmWidth, 4) - TEST_FIELD_ALIGN (BITMAP, bmWidth, 4) - TEST_FIELD_OFFSET(BITMAP, bmWidth, 4) - TEST_FIELD_SIZE (BITMAP, bmHeight, 4) - TEST_FIELD_ALIGN (BITMAP, bmHeight, 4) - TEST_FIELD_OFFSET(BITMAP, bmHeight, 8) - TEST_FIELD_SIZE (BITMAP, bmWidthBytes, 4) - TEST_FIELD_ALIGN (BITMAP, bmWidthBytes, 4) - TEST_FIELD_OFFSET(BITMAP, bmWidthBytes, 12) - TEST_FIELD_SIZE (BITMAP, bmPlanes, 2) - TEST_FIELD_ALIGN (BITMAP, bmPlanes, 2) - TEST_FIELD_OFFSET(BITMAP, bmPlanes, 16) - TEST_FIELD_SIZE (BITMAP, bmBitsPixel, 2) - TEST_FIELD_ALIGN (BITMAP, bmBitsPixel, 2) - TEST_FIELD_OFFSET(BITMAP, bmBitsPixel, 18) - TEST_FIELD_SIZE (BITMAP, bmBits, 8) - TEST_FIELD_ALIGN (BITMAP, bmBits, 8) - TEST_FIELD_OFFSET(BITMAP, bmBits, 24) -} - -static void test_pack_BITMAPCOREHEADER(void) -{ - /* BITMAPCOREHEADER */ - TEST_TYPE_SIZE (BITMAPCOREHEADER, 12) - TEST_TYPE_ALIGN (BITMAPCOREHEADER, 4) - TEST_FIELD_SIZE (BITMAPCOREHEADER, bcSize, 4) - TEST_FIELD_ALIGN (BITMAPCOREHEADER, bcSize, 4) - TEST_FIELD_OFFSET(BITMAPCOREHEADER, bcSize, 0) - TEST_FIELD_SIZE (BITMAPCOREHEADER, bcWidth, 2) - TEST_FIELD_ALIGN (BITMAPCOREHEADER, bcWidth, 2) - TEST_FIELD_OFFSET(BITMAPCOREHEADER, bcWidth, 4) - TEST_FIELD_SIZE (BITMAPCOREHEADER, bcHeight, 2) - TEST_FIELD_ALIGN (BITMAPCOREHEADER, bcHeight, 2) - TEST_FIELD_OFFSET(BITMAPCOREHEADER, bcHeight, 6) - TEST_FIELD_SIZE (BITMAPCOREHEADER, bcPlanes, 2) - TEST_FIELD_ALIGN (BITMAPCOREHEADER, bcPlanes, 2) - TEST_FIELD_OFFSET(BITMAPCOREHEADER, bcPlanes, 8) - TEST_FIELD_SIZE (BITMAPCOREHEADER, bcBitCount, 2) - TEST_FIELD_ALIGN (BITMAPCOREHEADER, bcBitCount, 2) - TEST_FIELD_OFFSET(BITMAPCOREHEADER, bcBitCount, 10) -} - -static void test_pack_BITMAPCOREINFO(void) -{ - /* BITMAPCOREINFO */ - TEST_TYPE_SIZE (BITMAPCOREINFO, 16) - TEST_TYPE_ALIGN (BITMAPCOREINFO, 4) - TEST_FIELD_SIZE (BITMAPCOREINFO, bmciHeader, 12) - TEST_FIELD_ALIGN (BITMAPCOREINFO, bmciHeader, 4) - TEST_FIELD_OFFSET(BITMAPCOREINFO, bmciHeader, 0) - TEST_FIELD_SIZE (BITMAPCOREINFO, bmciColors, 3) - TEST_FIELD_ALIGN (BITMAPCOREINFO, bmciColors, 1) - TEST_FIELD_OFFSET(BITMAPCOREINFO, bmciColors, 12) -} - -static void test_pack_BITMAPFILEHEADER(void) -{ - /* BITMAPFILEHEADER (pack 2) */ - TEST_TYPE_SIZE (BITMAPFILEHEADER, 14) - TEST_TYPE_ALIGN (BITMAPFILEHEADER, 2) - TEST_FIELD_SIZE (BITMAPFILEHEADER, bfType, 2) - TEST_FIELD_ALIGN (BITMAPFILEHEADER, bfType, 2) - TEST_FIELD_OFFSET(BITMAPFILEHEADER, bfType, 0) - TEST_FIELD_SIZE (BITMAPFILEHEADER, bfSize, 4) - TEST_FIELD_ALIGN (BITMAPFILEHEADER, bfSize, 2) - TEST_FIELD_OFFSET(BITMAPFILEHEADER, bfSize, 2) - TEST_FIELD_SIZE (BITMAPFILEHEADER, bfReserved1, 2) - TEST_FIELD_ALIGN (BITMAPFILEHEADER, bfReserved1, 2) - TEST_FIELD_OFFSET(BITMAPFILEHEADER, bfReserved1, 6) - TEST_FIELD_SIZE (BITMAPFILEHEADER, bfReserved2, 2) - TEST_FIELD_ALIGN (BITMAPFILEHEADER, bfReserved2, 2) - TEST_FIELD_OFFSET(BITMAPFILEHEADER, bfReserved2, 8) - TEST_FIELD_SIZE (BITMAPFILEHEADER, bfOffBits, 4) - TEST_FIELD_ALIGN (BITMAPFILEHEADER, bfOffBits, 2) - TEST_FIELD_OFFSET(BITMAPFILEHEADER, bfOffBits, 10) -} - -static void test_pack_BITMAPINFO(void) -{ - /* BITMAPINFO */ - TEST_TYPE_SIZE (BITMAPINFO, 44) - TEST_TYPE_ALIGN (BITMAPINFO, 4) - TEST_FIELD_SIZE (BITMAPINFO, bmiHeader, 40) - TEST_FIELD_ALIGN (BITMAPINFO, bmiHeader, 4) - TEST_FIELD_OFFSET(BITMAPINFO, bmiHeader, 0) - TEST_FIELD_SIZE (BITMAPINFO, bmiColors, 4) - TEST_FIELD_ALIGN (BITMAPINFO, bmiColors, 1) - TEST_FIELD_OFFSET(BITMAPINFO, bmiColors, 40) -} - -static void test_pack_BITMAPINFOHEADER(void) -{ - /* BITMAPINFOHEADER */ - TEST_TYPE_SIZE (BITMAPINFOHEADER, 40) - TEST_TYPE_ALIGN (BITMAPINFOHEADER, 4) - TEST_FIELD_SIZE (BITMAPINFOHEADER, biSize, 4) - TEST_FIELD_ALIGN (BITMAPINFOHEADER, biSize, 4) - TEST_FIELD_OFFSET(BITMAPINFOHEADER, biSize, 0) - TEST_FIELD_SIZE (BITMAPINFOHEADER, biWidth, 4) - TEST_FIELD_ALIGN (BITMAPINFOHEADER, biWidth, 4) - TEST_FIELD_OFFSET(BITMAPINFOHEADER, biWidth, 4) - TEST_FIELD_SIZE (BITMAPINFOHEADER, biHeight, 4) - TEST_FIELD_ALIGN (BITMAPINFOHEADER, biHeight, 4) - TEST_FIELD_OFFSET(BITMAPINFOHEADER, biHeight, 8) - TEST_FIELD_SIZE (BITMAPINFOHEADER, biPlanes, 2) - TEST_FIELD_ALIGN (BITMAPINFOHEADER, biPlanes, 2) - TEST_FIELD_OFFSET(BITMAPINFOHEADER, biPlanes, 12) - TEST_FIELD_SIZE (BITMAPINFOHEADER, biBitCount, 2) - TEST_FIELD_ALIGN (BITMAPINFOHEADER, biBitCount, 2) - TEST_FIELD_OFFSET(BITMAPINFOHEADER, biBitCount, 14) - TEST_FIELD_SIZE (BITMAPINFOHEADER, biCompression, 4) - TEST_FIELD_ALIGN (BITMAPINFOHEADER, biCompression, 4) - TEST_FIELD_OFFSET(BITMAPINFOHEADER, biCompression, 16) - TEST_FIELD_SIZE (BITMAPINFOHEADER, biSizeImage, 4) - TEST_FIELD_ALIGN (BITMAPINFOHEADER, biSizeImage, 4) - TEST_FIELD_OFFSET(BITMAPINFOHEADER, biSizeImage, 20) - TEST_FIELD_SIZE (BITMAPINFOHEADER, biXPelsPerMeter, 4) - TEST_FIELD_ALIGN (BITMAPINFOHEADER, biXPelsPerMeter, 4) - TEST_FIELD_OFFSET(BITMAPINFOHEADER, biXPelsPerMeter, 24) - TEST_FIELD_SIZE (BITMAPINFOHEADER, biYPelsPerMeter, 4) - TEST_FIELD_ALIGN (BITMAPINFOHEADER, biYPelsPerMeter, 4) - TEST_FIELD_OFFSET(BITMAPINFOHEADER, biYPelsPerMeter, 28) - TEST_FIELD_SIZE (BITMAPINFOHEADER, biClrUsed, 4) - TEST_FIELD_ALIGN (BITMAPINFOHEADER, biClrUsed, 4) - TEST_FIELD_OFFSET(BITMAPINFOHEADER, biClrUsed, 32) - TEST_FIELD_SIZE (BITMAPINFOHEADER, biClrImportant, 4) - TEST_FIELD_ALIGN (BITMAPINFOHEADER, biClrImportant, 4) - TEST_FIELD_OFFSET(BITMAPINFOHEADER, biClrImportant, 36) -} - -static void test_pack_BITMAPV4HEADER(void) -{ - /* BITMAPV4HEADER */ - TEST_TYPE_SIZE (BITMAPV4HEADER, 108) - TEST_TYPE_ALIGN (BITMAPV4HEADER, 4) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4Size, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4Size, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4Size, 0) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4Width, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4Width, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4Width, 4) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4Height, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4Height, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4Height, 8) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4Planes, 2) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4Planes, 2) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4Planes, 12) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4BitCount, 2) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4BitCount, 2) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4BitCount, 14) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4V4Compression, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4V4Compression, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4V4Compression, 16) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4SizeImage, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4SizeImage, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4SizeImage, 20) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4XPelsPerMeter, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4XPelsPerMeter, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4XPelsPerMeter, 24) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4YPelsPerMeter, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4YPelsPerMeter, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4YPelsPerMeter, 28) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4ClrUsed, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4ClrUsed, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4ClrUsed, 32) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4ClrImportant, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4ClrImportant, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4ClrImportant, 36) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4RedMask, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4RedMask, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4RedMask, 40) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4GreenMask, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4GreenMask, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4GreenMask, 44) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4BlueMask, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4BlueMask, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4BlueMask, 48) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4AlphaMask, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4AlphaMask, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4AlphaMask, 52) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4CSType, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4CSType, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4CSType, 56) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4Endpoints, 36) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4Endpoints, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4Endpoints, 60) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4GammaRed, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4GammaRed, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4GammaRed, 96) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4GammaGreen, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4GammaGreen, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4GammaGreen, 100) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4GammaBlue, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4GammaBlue, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4GammaBlue, 104) -} - -static void test_pack_BITMAPV5HEADER(void) -{ - /* BITMAPV5HEADER */ - TEST_TYPE_SIZE (BITMAPV5HEADER, 124) - TEST_TYPE_ALIGN (BITMAPV5HEADER, 4) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5Size, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5Size, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5Size, 0) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5Width, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5Width, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5Width, 4) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5Height, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5Height, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5Height, 8) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5Planes, 2) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5Planes, 2) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5Planes, 12) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5BitCount, 2) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5BitCount, 2) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5BitCount, 14) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5Compression, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5Compression, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5Compression, 16) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5SizeImage, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5SizeImage, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5SizeImage, 20) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5XPelsPerMeter, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5XPelsPerMeter, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5XPelsPerMeter, 24) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5YPelsPerMeter, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5YPelsPerMeter, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5YPelsPerMeter, 28) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5ClrUsed, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5ClrUsed, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5ClrUsed, 32) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5ClrImportant, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5ClrImportant, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5ClrImportant, 36) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5RedMask, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5RedMask, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5RedMask, 40) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5GreenMask, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5GreenMask, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5GreenMask, 44) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5BlueMask, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5BlueMask, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5BlueMask, 48) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5AlphaMask, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5AlphaMask, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5AlphaMask, 52) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5CSType, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5CSType, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5CSType, 56) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5Endpoints, 36) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5Endpoints, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5Endpoints, 60) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5GammaRed, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5GammaRed, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5GammaRed, 96) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5GammaGreen, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5GammaGreen, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5GammaGreen, 100) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5GammaBlue, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5GammaBlue, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5GammaBlue, 104) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5Intent, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5Intent, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5Intent, 108) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5ProfileData, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5ProfileData, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5ProfileData, 112) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5ProfileSize, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5ProfileSize, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5ProfileSize, 116) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5Reserved, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5Reserved, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5Reserved, 120) -} - -static void test_pack_BLENDFUNCTION(void) -{ - /* BLENDFUNCTION */ - TEST_TYPE_SIZE (BLENDFUNCTION, 4) - TEST_TYPE_ALIGN (BLENDFUNCTION, 1) - TEST_FIELD_SIZE (BLENDFUNCTION, BlendOp, 1) - TEST_FIELD_ALIGN (BLENDFUNCTION, BlendOp, 1) - TEST_FIELD_OFFSET(BLENDFUNCTION, BlendOp, 0) - TEST_FIELD_SIZE (BLENDFUNCTION, BlendFlags, 1) - TEST_FIELD_ALIGN (BLENDFUNCTION, BlendFlags, 1) - TEST_FIELD_OFFSET(BLENDFUNCTION, BlendFlags, 1) - TEST_FIELD_SIZE (BLENDFUNCTION, SourceConstantAlpha, 1) - TEST_FIELD_ALIGN (BLENDFUNCTION, SourceConstantAlpha, 1) - TEST_FIELD_OFFSET(BLENDFUNCTION, SourceConstantAlpha, 2) - TEST_FIELD_SIZE (BLENDFUNCTION, AlphaFormat, 1) - TEST_FIELD_ALIGN (BLENDFUNCTION, AlphaFormat, 1) - TEST_FIELD_OFFSET(BLENDFUNCTION, AlphaFormat, 3) -} - -static void test_pack_CHARSETINFO(void) -{ - /* CHARSETINFO */ - TEST_TYPE_SIZE (CHARSETINFO, 32) - TEST_TYPE_ALIGN (CHARSETINFO, 4) - TEST_FIELD_SIZE (CHARSETINFO, ciCharset, 4) - TEST_FIELD_ALIGN (CHARSETINFO, ciCharset, 4) - TEST_FIELD_OFFSET(CHARSETINFO, ciCharset, 0) - TEST_FIELD_SIZE (CHARSETINFO, ciACP, 4) - TEST_FIELD_ALIGN (CHARSETINFO, ciACP, 4) - TEST_FIELD_OFFSET(CHARSETINFO, ciACP, 4) - TEST_FIELD_SIZE (CHARSETINFO, fs, 24) - TEST_FIELD_ALIGN (CHARSETINFO, fs, 4) - TEST_FIELD_OFFSET(CHARSETINFO, fs, 8) -} - -static void test_pack_CIEXYZ(void) -{ - /* CIEXYZ */ - TEST_TYPE_SIZE (CIEXYZ, 12) - TEST_TYPE_ALIGN (CIEXYZ, 4) - TEST_FIELD_SIZE (CIEXYZ, ciexyzX, 4) - TEST_FIELD_ALIGN (CIEXYZ, ciexyzX, 4) - TEST_FIELD_OFFSET(CIEXYZ, ciexyzX, 0) - TEST_FIELD_SIZE (CIEXYZ, ciexyzY, 4) - TEST_FIELD_ALIGN (CIEXYZ, ciexyzY, 4) - TEST_FIELD_OFFSET(CIEXYZ, ciexyzY, 4) - TEST_FIELD_SIZE (CIEXYZ, ciexyzZ, 4) - TEST_FIELD_ALIGN (CIEXYZ, ciexyzZ, 4) - TEST_FIELD_OFFSET(CIEXYZ, ciexyzZ, 8) -} - -static void test_pack_CIEXYZTRIPLE(void) -{ - /* CIEXYZTRIPLE */ - TEST_TYPE_SIZE (CIEXYZTRIPLE, 36) - TEST_TYPE_ALIGN (CIEXYZTRIPLE, 4) - TEST_FIELD_SIZE (CIEXYZTRIPLE, ciexyzRed, 12) - TEST_FIELD_ALIGN (CIEXYZTRIPLE, ciexyzRed, 4) - TEST_FIELD_OFFSET(CIEXYZTRIPLE, ciexyzRed, 0) - TEST_FIELD_SIZE (CIEXYZTRIPLE, ciexyzGreen, 12) - TEST_FIELD_ALIGN (CIEXYZTRIPLE, ciexyzGreen, 4) - TEST_FIELD_OFFSET(CIEXYZTRIPLE, ciexyzGreen, 12) - TEST_FIELD_SIZE (CIEXYZTRIPLE, ciexyzBlue, 12) - TEST_FIELD_ALIGN (CIEXYZTRIPLE, ciexyzBlue, 4) - TEST_FIELD_OFFSET(CIEXYZTRIPLE, ciexyzBlue, 24) -} - -static void test_pack_COLOR16(void) -{ - /* COLOR16 */ - TEST_TYPE_SIZE (COLOR16, 2) - TEST_TYPE_ALIGN (COLOR16, 2) -} - -static void test_pack_COLORADJUSTMENT(void) -{ - /* COLORADJUSTMENT */ - TEST_TYPE_SIZE (COLORADJUSTMENT, 24) - TEST_TYPE_ALIGN (COLORADJUSTMENT, 2) - TEST_FIELD_SIZE (COLORADJUSTMENT, caSize, 2) - TEST_FIELD_ALIGN (COLORADJUSTMENT, caSize, 2) - TEST_FIELD_OFFSET(COLORADJUSTMENT, caSize, 0) - TEST_FIELD_SIZE (COLORADJUSTMENT, caFlags, 2) - TEST_FIELD_ALIGN (COLORADJUSTMENT, caFlags, 2) - TEST_FIELD_OFFSET(COLORADJUSTMENT, caFlags, 2) - TEST_FIELD_SIZE (COLORADJUSTMENT, caIlluminantIndex, 2) - TEST_FIELD_ALIGN (COLORADJUSTMENT, caIlluminantIndex, 2) - TEST_FIELD_OFFSET(COLORADJUSTMENT, caIlluminantIndex, 4) - TEST_FIELD_SIZE (COLORADJUSTMENT, caRedGamma, 2) - TEST_FIELD_ALIGN (COLORADJUSTMENT, caRedGamma, 2) - TEST_FIELD_OFFSET(COLORADJUSTMENT, caRedGamma, 6) - TEST_FIELD_SIZE (COLORADJUSTMENT, caGreenGamma, 2) - TEST_FIELD_ALIGN (COLORADJUSTMENT, caGreenGamma, 2) - TEST_FIELD_OFFSET(COLORADJUSTMENT, caGreenGamma, 8) - TEST_FIELD_SIZE (COLORADJUSTMENT, caBlueGamma, 2) - TEST_FIELD_ALIGN (COLORADJUSTMENT, caBlueGamma, 2) - TEST_FIELD_OFFSET(COLORADJUSTMENT, caBlueGamma, 10) - TEST_FIELD_SIZE (COLORADJUSTMENT, caReferenceBlack, 2) - TEST_FIELD_ALIGN (COLORADJUSTMENT, caReferenceBlack, 2) - TEST_FIELD_OFFSET(COLORADJUSTMENT, caReferenceBlack, 12) - TEST_FIELD_SIZE (COLORADJUSTMENT, caReferenceWhite, 2) - TEST_FIELD_ALIGN (COLORADJUSTMENT, caReferenceWhite, 2) - TEST_FIELD_OFFSET(COLORADJUSTMENT, caReferenceWhite, 14) - TEST_FIELD_SIZE (COLORADJUSTMENT, caContrast, 2) - TEST_FIELD_ALIGN (COLORADJUSTMENT, caContrast, 2) - TEST_FIELD_OFFSET(COLORADJUSTMENT, caContrast, 16) - TEST_FIELD_SIZE (COLORADJUSTMENT, caBrightness, 2) - TEST_FIELD_ALIGN (COLORADJUSTMENT, caBrightness, 2) - TEST_FIELD_OFFSET(COLORADJUSTMENT, caBrightness, 18) - TEST_FIELD_SIZE (COLORADJUSTMENT, caColorfulness, 2) - TEST_FIELD_ALIGN (COLORADJUSTMENT, caColorfulness, 2) - TEST_FIELD_OFFSET(COLORADJUSTMENT, caColorfulness, 20) - TEST_FIELD_SIZE (COLORADJUSTMENT, caRedGreenTint, 2) - TEST_FIELD_ALIGN (COLORADJUSTMENT, caRedGreenTint, 2) - TEST_FIELD_OFFSET(COLORADJUSTMENT, caRedGreenTint, 22) -} - -static void test_pack_DEVMODEA(void) -{ - /* DEVMODEA */ - TEST_FIELD_SIZE (DEVMODEA, dmDeviceName, 32) - TEST_FIELD_ALIGN (DEVMODEA, dmDeviceName, 1) - TEST_FIELD_OFFSET(DEVMODEA, dmDeviceName, 0) - TEST_FIELD_SIZE (DEVMODEA, dmSpecVersion, 2) - TEST_FIELD_ALIGN (DEVMODEA, dmSpecVersion, 2) - TEST_FIELD_OFFSET(DEVMODEA, dmSpecVersion, 32) - TEST_FIELD_SIZE (DEVMODEA, dmDriverVersion, 2) - TEST_FIELD_ALIGN (DEVMODEA, dmDriverVersion, 2) - TEST_FIELD_OFFSET(DEVMODEA, dmDriverVersion, 34) - TEST_FIELD_SIZE (DEVMODEA, dmSize, 2) - TEST_FIELD_ALIGN (DEVMODEA, dmSize, 2) - TEST_FIELD_OFFSET(DEVMODEA, dmSize, 36) - TEST_FIELD_SIZE (DEVMODEA, dmDriverExtra, 2) - TEST_FIELD_ALIGN (DEVMODEA, dmDriverExtra, 2) - TEST_FIELD_OFFSET(DEVMODEA, dmDriverExtra, 38) - TEST_FIELD_SIZE (DEVMODEA, dmFields, 4) - TEST_FIELD_ALIGN (DEVMODEA, dmFields, 4) - TEST_FIELD_OFFSET(DEVMODEA, dmFields, 40) -} - -static void test_pack_DEVMODEW(void) -{ - /* DEVMODEW */ - TEST_FIELD_SIZE (DEVMODEW, dmDeviceName, 64) - TEST_FIELD_ALIGN (DEVMODEW, dmDeviceName, 2) - TEST_FIELD_OFFSET(DEVMODEW, dmDeviceName, 0) - TEST_FIELD_SIZE (DEVMODEW, dmSpecVersion, 2) - TEST_FIELD_ALIGN (DEVMODEW, dmSpecVersion, 2) - TEST_FIELD_OFFSET(DEVMODEW, dmSpecVersion, 64) - TEST_FIELD_SIZE (DEVMODEW, dmDriverVersion, 2) - TEST_FIELD_ALIGN (DEVMODEW, dmDriverVersion, 2) - TEST_FIELD_OFFSET(DEVMODEW, dmDriverVersion, 66) - TEST_FIELD_SIZE (DEVMODEW, dmSize, 2) - TEST_FIELD_ALIGN (DEVMODEW, dmSize, 2) - TEST_FIELD_OFFSET(DEVMODEW, dmSize, 68) - TEST_FIELD_SIZE (DEVMODEW, dmDriverExtra, 2) - TEST_FIELD_ALIGN (DEVMODEW, dmDriverExtra, 2) - TEST_FIELD_OFFSET(DEVMODEW, dmDriverExtra, 70) - TEST_FIELD_SIZE (DEVMODEW, dmFields, 4) - TEST_FIELD_ALIGN (DEVMODEW, dmFields, 4) - TEST_FIELD_OFFSET(DEVMODEW, dmFields, 72) -} - -static void test_pack_DIBSECTION(void) -{ - /* DIBSECTION */ - TEST_TYPE_SIZE (DIBSECTION, 104) - TEST_TYPE_ALIGN (DIBSECTION, 8) - TEST_FIELD_SIZE (DIBSECTION, dsBm, 32) - TEST_FIELD_ALIGN (DIBSECTION, dsBm, 8) - TEST_FIELD_OFFSET(DIBSECTION, dsBm, 0) - TEST_FIELD_SIZE (DIBSECTION, dsBmih, 40) - TEST_FIELD_ALIGN (DIBSECTION, dsBmih, 4) - TEST_FIELD_OFFSET(DIBSECTION, dsBmih, 32) - TEST_FIELD_SIZE (DIBSECTION, dsBitfields, 12) - TEST_FIELD_ALIGN (DIBSECTION, dsBitfields, 4) - TEST_FIELD_OFFSET(DIBSECTION, dsBitfields, 72) - TEST_FIELD_SIZE (DIBSECTION, dshSection, 8) - TEST_FIELD_ALIGN (DIBSECTION, dshSection, 8) - TEST_FIELD_OFFSET(DIBSECTION, dshSection, 88) - TEST_FIELD_SIZE (DIBSECTION, dsOffset, 4) - TEST_FIELD_ALIGN (DIBSECTION, dsOffset, 4) - TEST_FIELD_OFFSET(DIBSECTION, dsOffset, 96) -} - -static void test_pack_DISPLAY_DEVICEA(void) -{ - /* DISPLAY_DEVICEA */ - TEST_TYPE_SIZE (DISPLAY_DEVICEA, 424) - TEST_TYPE_ALIGN (DISPLAY_DEVICEA, 4) - TEST_FIELD_SIZE (DISPLAY_DEVICEA, cb, 4) - TEST_FIELD_ALIGN (DISPLAY_DEVICEA, cb, 4) - TEST_FIELD_OFFSET(DISPLAY_DEVICEA, cb, 0) - TEST_FIELD_SIZE (DISPLAY_DEVICEA, DeviceName, 32) - TEST_FIELD_ALIGN (DISPLAY_DEVICEA, DeviceName, 1) - TEST_FIELD_OFFSET(DISPLAY_DEVICEA, DeviceName, 4) - TEST_FIELD_SIZE (DISPLAY_DEVICEA, DeviceString, 128) - TEST_FIELD_ALIGN (DISPLAY_DEVICEA, DeviceString, 1) - TEST_FIELD_OFFSET(DISPLAY_DEVICEA, DeviceString, 36) - TEST_FIELD_SIZE (DISPLAY_DEVICEA, StateFlags, 4) - TEST_FIELD_ALIGN (DISPLAY_DEVICEA, StateFlags, 4) - TEST_FIELD_OFFSET(DISPLAY_DEVICEA, StateFlags, 164) - TEST_FIELD_SIZE (DISPLAY_DEVICEA, DeviceID, 128) - TEST_FIELD_ALIGN (DISPLAY_DEVICEA, DeviceID, 1) - TEST_FIELD_OFFSET(DISPLAY_DEVICEA, DeviceID, 168) - TEST_FIELD_SIZE (DISPLAY_DEVICEA, DeviceKey, 128) - TEST_FIELD_ALIGN (DISPLAY_DEVICEA, DeviceKey, 1) - TEST_FIELD_OFFSET(DISPLAY_DEVICEA, DeviceKey, 296) -} - -static void test_pack_DISPLAY_DEVICEW(void) -{ - /* DISPLAY_DEVICEW */ - TEST_TYPE_SIZE (DISPLAY_DEVICEW, 840) - TEST_TYPE_ALIGN (DISPLAY_DEVICEW, 4) - TEST_FIELD_SIZE (DISPLAY_DEVICEW, cb, 4) - TEST_FIELD_ALIGN (DISPLAY_DEVICEW, cb, 4) - TEST_FIELD_OFFSET(DISPLAY_DEVICEW, cb, 0) - TEST_FIELD_SIZE (DISPLAY_DEVICEW, DeviceName, 64) - TEST_FIELD_ALIGN (DISPLAY_DEVICEW, DeviceName, 2) - TEST_FIELD_OFFSET(DISPLAY_DEVICEW, DeviceName, 4) - TEST_FIELD_SIZE (DISPLAY_DEVICEW, DeviceString, 256) - TEST_FIELD_ALIGN (DISPLAY_DEVICEW, DeviceString, 2) - TEST_FIELD_OFFSET(DISPLAY_DEVICEW, DeviceString, 68) - TEST_FIELD_SIZE (DISPLAY_DEVICEW, StateFlags, 4) - TEST_FIELD_ALIGN (DISPLAY_DEVICEW, StateFlags, 4) - TEST_FIELD_OFFSET(DISPLAY_DEVICEW, StateFlags, 324) - TEST_FIELD_SIZE (DISPLAY_DEVICEW, DeviceID, 256) - TEST_FIELD_ALIGN (DISPLAY_DEVICEW, DeviceID, 2) - TEST_FIELD_OFFSET(DISPLAY_DEVICEW, DeviceID, 328) - TEST_FIELD_SIZE (DISPLAY_DEVICEW, DeviceKey, 256) - TEST_FIELD_ALIGN (DISPLAY_DEVICEW, DeviceKey, 2) - TEST_FIELD_OFFSET(DISPLAY_DEVICEW, DeviceKey, 584) -} - -static void test_pack_DOCINFOA(void) -{ - /* DOCINFOA */ - TEST_TYPE_SIZE (DOCINFOA, 40) - TEST_TYPE_ALIGN (DOCINFOA, 8) - TEST_FIELD_SIZE (DOCINFOA, cbSize, 4) - TEST_FIELD_ALIGN (DOCINFOA, cbSize, 4) - TEST_FIELD_OFFSET(DOCINFOA, cbSize, 0) - TEST_FIELD_SIZE (DOCINFOA, lpszDocName, 8) - TEST_FIELD_ALIGN (DOCINFOA, lpszDocName, 8) - TEST_FIELD_OFFSET(DOCINFOA, lpszDocName, 8) - TEST_FIELD_SIZE (DOCINFOA, lpszOutput, 8) - TEST_FIELD_ALIGN (DOCINFOA, lpszOutput, 8) - TEST_FIELD_OFFSET(DOCINFOA, lpszOutput, 16) - TEST_FIELD_SIZE (DOCINFOA, lpszDatatype, 8) - TEST_FIELD_ALIGN (DOCINFOA, lpszDatatype, 8) - TEST_FIELD_OFFSET(DOCINFOA, lpszDatatype, 24) - TEST_FIELD_SIZE (DOCINFOA, fwType, 4) - TEST_FIELD_ALIGN (DOCINFOA, fwType, 4) - TEST_FIELD_OFFSET(DOCINFOA, fwType, 32) -} - -static void test_pack_DOCINFOW(void) -{ - /* DOCINFOW */ - TEST_TYPE_SIZE (DOCINFOW, 40) - TEST_TYPE_ALIGN (DOCINFOW, 8) - TEST_FIELD_SIZE (DOCINFOW, cbSize, 4) - TEST_FIELD_ALIGN (DOCINFOW, cbSize, 4) - TEST_FIELD_OFFSET(DOCINFOW, cbSize, 0) - TEST_FIELD_SIZE (DOCINFOW, lpszDocName, 8) - TEST_FIELD_ALIGN (DOCINFOW, lpszDocName, 8) - TEST_FIELD_OFFSET(DOCINFOW, lpszDocName, 8) - TEST_FIELD_SIZE (DOCINFOW, lpszOutput, 8) - TEST_FIELD_ALIGN (DOCINFOW, lpszOutput, 8) - TEST_FIELD_OFFSET(DOCINFOW, lpszOutput, 16) - TEST_FIELD_SIZE (DOCINFOW, lpszDatatype, 8) - TEST_FIELD_ALIGN (DOCINFOW, lpszDatatype, 8) - TEST_FIELD_OFFSET(DOCINFOW, lpszDatatype, 24) - TEST_FIELD_SIZE (DOCINFOW, fwType, 4) - TEST_FIELD_ALIGN (DOCINFOW, fwType, 4) - TEST_FIELD_OFFSET(DOCINFOW, fwType, 32) -} - -static void test_pack_EMR(void) -{ - /* EMR */ - TEST_TYPE_SIZE (EMR, 8) - TEST_TYPE_ALIGN (EMR, 4) - TEST_FIELD_SIZE (EMR, iType, 4) - TEST_FIELD_ALIGN (EMR, iType, 4) - TEST_FIELD_OFFSET(EMR, iType, 0) - TEST_FIELD_SIZE (EMR, nSize, 4) - TEST_FIELD_ALIGN (EMR, nSize, 4) - TEST_FIELD_OFFSET(EMR, nSize, 4) -} - -static void test_pack_EMRABORTPATH(void) -{ - /* EMRABORTPATH */ - TEST_TYPE_SIZE (EMRABORTPATH, 8) - TEST_TYPE_ALIGN (EMRABORTPATH, 4) - TEST_FIELD_SIZE (EMRABORTPATH, emr, 8) - TEST_FIELD_ALIGN (EMRABORTPATH, emr, 4) - TEST_FIELD_OFFSET(EMRABORTPATH, emr, 0) -} - -static void test_pack_EMRANGLEARC(void) -{ - /* EMRANGLEARC */ - TEST_TYPE_SIZE (EMRANGLEARC, 28) - TEST_TYPE_ALIGN (EMRANGLEARC, 4) - TEST_FIELD_SIZE (EMRANGLEARC, emr, 8) - TEST_FIELD_ALIGN (EMRANGLEARC, emr, 4) - TEST_FIELD_OFFSET(EMRANGLEARC, emr, 0) - TEST_FIELD_SIZE (EMRANGLEARC, ptlCenter, 8) - TEST_FIELD_ALIGN (EMRANGLEARC, ptlCenter, 4) - TEST_FIELD_OFFSET(EMRANGLEARC, ptlCenter, 8) - TEST_FIELD_SIZE (EMRANGLEARC, nRadius, 4) - TEST_FIELD_ALIGN (EMRANGLEARC, nRadius, 4) - TEST_FIELD_OFFSET(EMRANGLEARC, nRadius, 16) - TEST_FIELD_SIZE (EMRANGLEARC, eStartAngle, 4) - TEST_FIELD_ALIGN (EMRANGLEARC, eStartAngle, 4) - TEST_FIELD_OFFSET(EMRANGLEARC, eStartAngle, 20) - TEST_FIELD_SIZE (EMRANGLEARC, eSweepAngle, 4) - TEST_FIELD_ALIGN (EMRANGLEARC, eSweepAngle, 4) - TEST_FIELD_OFFSET(EMRANGLEARC, eSweepAngle, 24) -} - -static void test_pack_EMRARC(void) -{ - /* EMRARC */ - TEST_TYPE_SIZE (EMRARC, 40) - TEST_TYPE_ALIGN (EMRARC, 4) - TEST_FIELD_SIZE (EMRARC, emr, 8) - TEST_FIELD_ALIGN (EMRARC, emr, 4) - TEST_FIELD_OFFSET(EMRARC, emr, 0) - TEST_FIELD_SIZE (EMRARC, rclBox, 16) - TEST_FIELD_ALIGN (EMRARC, rclBox, 4) - TEST_FIELD_OFFSET(EMRARC, rclBox, 8) - TEST_FIELD_SIZE (EMRARC, ptlStart, 8) - TEST_FIELD_ALIGN (EMRARC, ptlStart, 4) - TEST_FIELD_OFFSET(EMRARC, ptlStart, 24) - TEST_FIELD_SIZE (EMRARC, ptlEnd, 8) - TEST_FIELD_ALIGN (EMRARC, ptlEnd, 4) - TEST_FIELD_OFFSET(EMRARC, ptlEnd, 32) -} - -static void test_pack_EMRARCTO(void) -{ - /* EMRARCTO */ - TEST_TYPE_SIZE (EMRARCTO, 40) - TEST_TYPE_ALIGN (EMRARCTO, 4) - TEST_FIELD_SIZE (EMRARCTO, emr, 8) - TEST_FIELD_ALIGN (EMRARCTO, emr, 4) - TEST_FIELD_OFFSET(EMRARCTO, emr, 0) - TEST_FIELD_SIZE (EMRARCTO, rclBox, 16) - TEST_FIELD_ALIGN (EMRARCTO, rclBox, 4) - TEST_FIELD_OFFSET(EMRARCTO, rclBox, 8) - TEST_FIELD_SIZE (EMRARCTO, ptlStart, 8) - TEST_FIELD_ALIGN (EMRARCTO, ptlStart, 4) - TEST_FIELD_OFFSET(EMRARCTO, ptlStart, 24) - TEST_FIELD_SIZE (EMRARCTO, ptlEnd, 8) - TEST_FIELD_ALIGN (EMRARCTO, ptlEnd, 4) - TEST_FIELD_OFFSET(EMRARCTO, ptlEnd, 32) -} - -static void test_pack_EMRBEGINPATH(void) -{ - /* EMRBEGINPATH */ - TEST_TYPE_SIZE (EMRBEGINPATH, 8) - TEST_TYPE_ALIGN (EMRBEGINPATH, 4) - TEST_FIELD_SIZE (EMRBEGINPATH, emr, 8) - TEST_FIELD_ALIGN (EMRBEGINPATH, emr, 4) - TEST_FIELD_OFFSET(EMRBEGINPATH, emr, 0) -} - -static void test_pack_EMRBITBLT(void) -{ - /* EMRBITBLT */ - TEST_TYPE_SIZE (EMRBITBLT, 100) - TEST_TYPE_ALIGN (EMRBITBLT, 4) - TEST_FIELD_SIZE (EMRBITBLT, emr, 8) - TEST_FIELD_ALIGN (EMRBITBLT, emr, 4) - TEST_FIELD_OFFSET(EMRBITBLT, emr, 0) - TEST_FIELD_SIZE (EMRBITBLT, rclBounds, 16) - TEST_FIELD_ALIGN (EMRBITBLT, rclBounds, 4) - TEST_FIELD_OFFSET(EMRBITBLT, rclBounds, 8) - TEST_FIELD_SIZE (EMRBITBLT, xDest, 4) - TEST_FIELD_ALIGN (EMRBITBLT, xDest, 4) - TEST_FIELD_OFFSET(EMRBITBLT, xDest, 24) - TEST_FIELD_SIZE (EMRBITBLT, yDest, 4) - TEST_FIELD_ALIGN (EMRBITBLT, yDest, 4) - TEST_FIELD_OFFSET(EMRBITBLT, yDest, 28) - TEST_FIELD_SIZE (EMRBITBLT, cxDest, 4) - TEST_FIELD_ALIGN (EMRBITBLT, cxDest, 4) - TEST_FIELD_OFFSET(EMRBITBLT, cxDest, 32) - TEST_FIELD_SIZE (EMRBITBLT, cyDest, 4) - TEST_FIELD_ALIGN (EMRBITBLT, cyDest, 4) - TEST_FIELD_OFFSET(EMRBITBLT, cyDest, 36) - TEST_FIELD_SIZE (EMRBITBLT, dwRop, 4) - TEST_FIELD_ALIGN (EMRBITBLT, dwRop, 4) - TEST_FIELD_OFFSET(EMRBITBLT, dwRop, 40) - TEST_FIELD_SIZE (EMRBITBLT, xSrc, 4) - TEST_FIELD_ALIGN (EMRBITBLT, xSrc, 4) - TEST_FIELD_OFFSET(EMRBITBLT, xSrc, 44) - TEST_FIELD_SIZE (EMRBITBLT, ySrc, 4) - TEST_FIELD_ALIGN (EMRBITBLT, ySrc, 4) - TEST_FIELD_OFFSET(EMRBITBLT, ySrc, 48) - TEST_FIELD_SIZE (EMRBITBLT, xformSrc, 24) - TEST_FIELD_ALIGN (EMRBITBLT, xformSrc, 4) - TEST_FIELD_OFFSET(EMRBITBLT, xformSrc, 52) - TEST_FIELD_SIZE (EMRBITBLT, crBkColorSrc, 4) - TEST_FIELD_ALIGN (EMRBITBLT, crBkColorSrc, 4) - TEST_FIELD_OFFSET(EMRBITBLT, crBkColorSrc, 76) - TEST_FIELD_SIZE (EMRBITBLT, iUsageSrc, 4) - TEST_FIELD_ALIGN (EMRBITBLT, iUsageSrc, 4) - TEST_FIELD_OFFSET(EMRBITBLT, iUsageSrc, 80) - TEST_FIELD_SIZE (EMRBITBLT, offBmiSrc, 4) - TEST_FIELD_ALIGN (EMRBITBLT, offBmiSrc, 4) - TEST_FIELD_OFFSET(EMRBITBLT, offBmiSrc, 84) - TEST_FIELD_SIZE (EMRBITBLT, cbBmiSrc, 4) - TEST_FIELD_ALIGN (EMRBITBLT, cbBmiSrc, 4) - TEST_FIELD_OFFSET(EMRBITBLT, cbBmiSrc, 88) - TEST_FIELD_SIZE (EMRBITBLT, offBitsSrc, 4) - TEST_FIELD_ALIGN (EMRBITBLT, offBitsSrc, 4) - TEST_FIELD_OFFSET(EMRBITBLT, offBitsSrc, 92) - TEST_FIELD_SIZE (EMRBITBLT, cbBitsSrc, 4) - TEST_FIELD_ALIGN (EMRBITBLT, cbBitsSrc, 4) - TEST_FIELD_OFFSET(EMRBITBLT, cbBitsSrc, 96) -} - -static void test_pack_EMRCHORD(void) -{ - /* EMRCHORD */ - TEST_TYPE_SIZE (EMRCHORD, 40) - TEST_TYPE_ALIGN (EMRCHORD, 4) - TEST_FIELD_SIZE (EMRCHORD, emr, 8) - TEST_FIELD_ALIGN (EMRCHORD, emr, 4) - TEST_FIELD_OFFSET(EMRCHORD, emr, 0) - TEST_FIELD_SIZE (EMRCHORD, rclBox, 16) - TEST_FIELD_ALIGN (EMRCHORD, rclBox, 4) - TEST_FIELD_OFFSET(EMRCHORD, rclBox, 8) - TEST_FIELD_SIZE (EMRCHORD, ptlStart, 8) - TEST_FIELD_ALIGN (EMRCHORD, ptlStart, 4) - TEST_FIELD_OFFSET(EMRCHORD, ptlStart, 24) - TEST_FIELD_SIZE (EMRCHORD, ptlEnd, 8) - TEST_FIELD_ALIGN (EMRCHORD, ptlEnd, 4) - TEST_FIELD_OFFSET(EMRCHORD, ptlEnd, 32) -} - -static void test_pack_EMRCLOSEFIGURE(void) -{ - /* EMRCLOSEFIGURE */ - TEST_TYPE_SIZE (EMRCLOSEFIGURE, 8) - TEST_TYPE_ALIGN (EMRCLOSEFIGURE, 4) - TEST_FIELD_SIZE (EMRCLOSEFIGURE, emr, 8) - TEST_FIELD_ALIGN (EMRCLOSEFIGURE, emr, 4) - TEST_FIELD_OFFSET(EMRCLOSEFIGURE, emr, 0) -} - -static void test_pack_EMRCREATEBRUSHINDIRECT(void) -{ - /* EMRCREATEBRUSHINDIRECT */ - TEST_TYPE_SIZE (EMRCREATEBRUSHINDIRECT, 24) - TEST_TYPE_ALIGN (EMRCREATEBRUSHINDIRECT, 4) - TEST_FIELD_SIZE (EMRCREATEBRUSHINDIRECT, emr, 8) - TEST_FIELD_ALIGN (EMRCREATEBRUSHINDIRECT, emr, 4) - TEST_FIELD_OFFSET(EMRCREATEBRUSHINDIRECT, emr, 0) - TEST_FIELD_SIZE (EMRCREATEBRUSHINDIRECT, ihBrush, 4) - TEST_FIELD_ALIGN (EMRCREATEBRUSHINDIRECT, ihBrush, 4) - TEST_FIELD_OFFSET(EMRCREATEBRUSHINDIRECT, ihBrush, 8) - TEST_FIELD_SIZE (EMRCREATEBRUSHINDIRECT, lb, 12) - TEST_FIELD_ALIGN (EMRCREATEBRUSHINDIRECT, lb, 4) - TEST_FIELD_OFFSET(EMRCREATEBRUSHINDIRECT, lb, 12) -} - -static void test_pack_EMRCREATECOLORSPACE(void) -{ - /* EMRCREATECOLORSPACE */ - TEST_TYPE_SIZE (EMRCREATECOLORSPACE, 340) - TEST_TYPE_ALIGN (EMRCREATECOLORSPACE, 4) - TEST_FIELD_SIZE (EMRCREATECOLORSPACE, emr, 8) - TEST_FIELD_ALIGN (EMRCREATECOLORSPACE, emr, 4) - TEST_FIELD_OFFSET(EMRCREATECOLORSPACE, emr, 0) - TEST_FIELD_SIZE (EMRCREATECOLORSPACE, ihCS, 4) - TEST_FIELD_ALIGN (EMRCREATECOLORSPACE, ihCS, 4) - TEST_FIELD_OFFSET(EMRCREATECOLORSPACE, ihCS, 8) - TEST_FIELD_SIZE (EMRCREATECOLORSPACE, lcs, 328) - TEST_FIELD_ALIGN (EMRCREATECOLORSPACE, lcs, 4) - TEST_FIELD_OFFSET(EMRCREATECOLORSPACE, lcs, 12) -} - -static void test_pack_EMRCREATECOLORSPACEW(void) -{ - /* EMRCREATECOLORSPACEW */ - TEST_TYPE_SIZE (EMRCREATECOLORSPACEW, 612) - TEST_TYPE_ALIGN (EMRCREATECOLORSPACEW, 4) - TEST_FIELD_SIZE (EMRCREATECOLORSPACEW, emr, 8) - TEST_FIELD_ALIGN (EMRCREATECOLORSPACEW, emr, 4) - TEST_FIELD_OFFSET(EMRCREATECOLORSPACEW, emr, 0) - TEST_FIELD_SIZE (EMRCREATECOLORSPACEW, ihCS, 4) - TEST_FIELD_ALIGN (EMRCREATECOLORSPACEW, ihCS, 4) - TEST_FIELD_OFFSET(EMRCREATECOLORSPACEW, ihCS, 8) - TEST_FIELD_SIZE (EMRCREATECOLORSPACEW, lcs, 588) - TEST_FIELD_ALIGN (EMRCREATECOLORSPACEW, lcs, 4) - TEST_FIELD_OFFSET(EMRCREATECOLORSPACEW, lcs, 12) - TEST_FIELD_SIZE (EMRCREATECOLORSPACEW, dwFlags, 4) - TEST_FIELD_ALIGN (EMRCREATECOLORSPACEW, dwFlags, 4) - TEST_FIELD_OFFSET(EMRCREATECOLORSPACEW, dwFlags, 600) - TEST_FIELD_SIZE (EMRCREATECOLORSPACEW, cbData, 4) - TEST_FIELD_ALIGN (EMRCREATECOLORSPACEW, cbData, 4) - TEST_FIELD_OFFSET(EMRCREATECOLORSPACEW, cbData, 604) - TEST_FIELD_SIZE (EMRCREATECOLORSPACEW, Data, 1) - TEST_FIELD_ALIGN (EMRCREATECOLORSPACEW, Data, 1) - TEST_FIELD_OFFSET(EMRCREATECOLORSPACEW, Data, 608) -} - -static void test_pack_EMRCREATEDIBPATTERNBRUSHPT(void) -{ - /* EMRCREATEDIBPATTERNBRUSHPT */ - TEST_TYPE_SIZE (EMRCREATEDIBPATTERNBRUSHPT, 32) - TEST_TYPE_ALIGN (EMRCREATEDIBPATTERNBRUSHPT, 4) - TEST_FIELD_SIZE (EMRCREATEDIBPATTERNBRUSHPT, emr, 8) - TEST_FIELD_ALIGN (EMRCREATEDIBPATTERNBRUSHPT, emr, 4) - TEST_FIELD_OFFSET(EMRCREATEDIBPATTERNBRUSHPT, emr, 0) - TEST_FIELD_SIZE (EMRCREATEDIBPATTERNBRUSHPT, ihBrush, 4) - TEST_FIELD_ALIGN (EMRCREATEDIBPATTERNBRUSHPT, ihBrush, 4) - TEST_FIELD_OFFSET(EMRCREATEDIBPATTERNBRUSHPT, ihBrush, 8) - TEST_FIELD_SIZE (EMRCREATEDIBPATTERNBRUSHPT, iUsage, 4) - TEST_FIELD_ALIGN (EMRCREATEDIBPATTERNBRUSHPT, iUsage, 4) - TEST_FIELD_OFFSET(EMRCREATEDIBPATTERNBRUSHPT, iUsage, 12) - TEST_FIELD_SIZE (EMRCREATEDIBPATTERNBRUSHPT, offBmi, 4) - TEST_FIELD_ALIGN (EMRCREATEDIBPATTERNBRUSHPT, offBmi, 4) - TEST_FIELD_OFFSET(EMRCREATEDIBPATTERNBRUSHPT, offBmi, 16) - TEST_FIELD_SIZE (EMRCREATEDIBPATTERNBRUSHPT, cbBmi, 4) - TEST_FIELD_ALIGN (EMRCREATEDIBPATTERNBRUSHPT, cbBmi, 4) - TEST_FIELD_OFFSET(EMRCREATEDIBPATTERNBRUSHPT, cbBmi, 20) - TEST_FIELD_SIZE (EMRCREATEDIBPATTERNBRUSHPT, offBits, 4) - TEST_FIELD_ALIGN (EMRCREATEDIBPATTERNBRUSHPT, offBits, 4) - TEST_FIELD_OFFSET(EMRCREATEDIBPATTERNBRUSHPT, offBits, 24) - TEST_FIELD_SIZE (EMRCREATEDIBPATTERNBRUSHPT, cbBits, 4) - TEST_FIELD_ALIGN (EMRCREATEDIBPATTERNBRUSHPT, cbBits, 4) - TEST_FIELD_OFFSET(EMRCREATEDIBPATTERNBRUSHPT, cbBits, 28) -} - -static void test_pack_EMRCREATEMONOBRUSH(void) -{ - /* EMRCREATEMONOBRUSH */ - TEST_TYPE_SIZE (EMRCREATEMONOBRUSH, 32) - TEST_TYPE_ALIGN (EMRCREATEMONOBRUSH, 4) - TEST_FIELD_SIZE (EMRCREATEMONOBRUSH, emr, 8) - TEST_FIELD_ALIGN (EMRCREATEMONOBRUSH, emr, 4) - TEST_FIELD_OFFSET(EMRCREATEMONOBRUSH, emr, 0) - TEST_FIELD_SIZE (EMRCREATEMONOBRUSH, ihBrush, 4) - TEST_FIELD_ALIGN (EMRCREATEMONOBRUSH, ihBrush, 4) - TEST_FIELD_OFFSET(EMRCREATEMONOBRUSH, ihBrush, 8) - TEST_FIELD_SIZE (EMRCREATEMONOBRUSH, iUsage, 4) - TEST_FIELD_ALIGN (EMRCREATEMONOBRUSH, iUsage, 4) - TEST_FIELD_OFFSET(EMRCREATEMONOBRUSH, iUsage, 12) - TEST_FIELD_SIZE (EMRCREATEMONOBRUSH, offBmi, 4) - TEST_FIELD_ALIGN (EMRCREATEMONOBRUSH, offBmi, 4) - TEST_FIELD_OFFSET(EMRCREATEMONOBRUSH, offBmi, 16) - TEST_FIELD_SIZE (EMRCREATEMONOBRUSH, cbBmi, 4) - TEST_FIELD_ALIGN (EMRCREATEMONOBRUSH, cbBmi, 4) - TEST_FIELD_OFFSET(EMRCREATEMONOBRUSH, cbBmi, 20) - TEST_FIELD_SIZE (EMRCREATEMONOBRUSH, offBits, 4) - TEST_FIELD_ALIGN (EMRCREATEMONOBRUSH, offBits, 4) - TEST_FIELD_OFFSET(EMRCREATEMONOBRUSH, offBits, 24) - TEST_FIELD_SIZE (EMRCREATEMONOBRUSH, cbBits, 4) - TEST_FIELD_ALIGN (EMRCREATEMONOBRUSH, cbBits, 4) - TEST_FIELD_OFFSET(EMRCREATEMONOBRUSH, cbBits, 28) -} - -static void test_pack_EMRCREATEPEN(void) -{ - /* EMRCREATEPEN */ - TEST_TYPE_SIZE (EMRCREATEPEN, 28) - TEST_TYPE_ALIGN (EMRCREATEPEN, 4) - TEST_FIELD_SIZE (EMRCREATEPEN, emr, 8) - TEST_FIELD_ALIGN (EMRCREATEPEN, emr, 4) - TEST_FIELD_OFFSET(EMRCREATEPEN, emr, 0) - TEST_FIELD_SIZE (EMRCREATEPEN, ihPen, 4) - TEST_FIELD_ALIGN (EMRCREATEPEN, ihPen, 4) - TEST_FIELD_OFFSET(EMRCREATEPEN, ihPen, 8) - TEST_FIELD_SIZE (EMRCREATEPEN, lopn, 16) - TEST_FIELD_ALIGN (EMRCREATEPEN, lopn, 4) - TEST_FIELD_OFFSET(EMRCREATEPEN, lopn, 12) -} - -static void test_pack_EMRDELETECOLORSPACE(void) -{ - /* EMRDELETECOLORSPACE */ - TEST_TYPE_SIZE (EMRDELETECOLORSPACE, 12) - TEST_TYPE_ALIGN (EMRDELETECOLORSPACE, 4) - TEST_FIELD_SIZE (EMRDELETECOLORSPACE, emr, 8) - TEST_FIELD_ALIGN (EMRDELETECOLORSPACE, emr, 4) - TEST_FIELD_OFFSET(EMRDELETECOLORSPACE, emr, 0) - TEST_FIELD_SIZE (EMRDELETECOLORSPACE, ihCS, 4) - TEST_FIELD_ALIGN (EMRDELETECOLORSPACE, ihCS, 4) - TEST_FIELD_OFFSET(EMRDELETECOLORSPACE, ihCS, 8) -} - -static void test_pack_EMRDELETEOBJECT(void) -{ - /* EMRDELETEOBJECT */ - TEST_TYPE_SIZE (EMRDELETEOBJECT, 12) - TEST_TYPE_ALIGN (EMRDELETEOBJECT, 4) - TEST_FIELD_SIZE (EMRDELETEOBJECT, emr, 8) - TEST_FIELD_ALIGN (EMRDELETEOBJECT, emr, 4) - TEST_FIELD_OFFSET(EMRDELETEOBJECT, emr, 0) - TEST_FIELD_SIZE (EMRDELETEOBJECT, ihObject, 4) - TEST_FIELD_ALIGN (EMRDELETEOBJECT, ihObject, 4) - TEST_FIELD_OFFSET(EMRDELETEOBJECT, ihObject, 8) -} - -static void test_pack_EMRELLIPSE(void) -{ - /* EMRELLIPSE */ - TEST_TYPE_SIZE (EMRELLIPSE, 24) - TEST_TYPE_ALIGN (EMRELLIPSE, 4) - TEST_FIELD_SIZE (EMRELLIPSE, emr, 8) - TEST_FIELD_ALIGN (EMRELLIPSE, emr, 4) - TEST_FIELD_OFFSET(EMRELLIPSE, emr, 0) - TEST_FIELD_SIZE (EMRELLIPSE, rclBox, 16) - TEST_FIELD_ALIGN (EMRELLIPSE, rclBox, 4) - TEST_FIELD_OFFSET(EMRELLIPSE, rclBox, 8) -} - -static void test_pack_EMRENDPATH(void) -{ - /* EMRENDPATH */ - TEST_TYPE_SIZE (EMRENDPATH, 8) - TEST_TYPE_ALIGN (EMRENDPATH, 4) - TEST_FIELD_SIZE (EMRENDPATH, emr, 8) - TEST_FIELD_ALIGN (EMRENDPATH, emr, 4) - TEST_FIELD_OFFSET(EMRENDPATH, emr, 0) -} - -static void test_pack_EMREOF(void) -{ - /* EMREOF */ - TEST_TYPE_SIZE (EMREOF, 20) - TEST_TYPE_ALIGN (EMREOF, 4) - TEST_FIELD_SIZE (EMREOF, emr, 8) - TEST_FIELD_ALIGN (EMREOF, emr, 4) - TEST_FIELD_OFFSET(EMREOF, emr, 0) - TEST_FIELD_SIZE (EMREOF, nPalEntries, 4) - TEST_FIELD_ALIGN (EMREOF, nPalEntries, 4) - TEST_FIELD_OFFSET(EMREOF, nPalEntries, 8) - TEST_FIELD_SIZE (EMREOF, offPalEntries, 4) - TEST_FIELD_ALIGN (EMREOF, offPalEntries, 4) - TEST_FIELD_OFFSET(EMREOF, offPalEntries, 12) - TEST_FIELD_SIZE (EMREOF, nSizeLast, 4) - TEST_FIELD_ALIGN (EMREOF, nSizeLast, 4) - TEST_FIELD_OFFSET(EMREOF, nSizeLast, 16) -} - -static void test_pack_EMREXCLUDECLIPRECT(void) -{ - /* EMREXCLUDECLIPRECT */ - TEST_TYPE_SIZE (EMREXCLUDECLIPRECT, 24) - TEST_TYPE_ALIGN (EMREXCLUDECLIPRECT, 4) - TEST_FIELD_SIZE (EMREXCLUDECLIPRECT, emr, 8) - TEST_FIELD_ALIGN (EMREXCLUDECLIPRECT, emr, 4) - TEST_FIELD_OFFSET(EMREXCLUDECLIPRECT, emr, 0) - TEST_FIELD_SIZE (EMREXCLUDECLIPRECT, rclClip, 16) - TEST_FIELD_ALIGN (EMREXCLUDECLIPRECT, rclClip, 4) - TEST_FIELD_OFFSET(EMREXCLUDECLIPRECT, rclClip, 8) -} - -static void test_pack_EMREXTCREATEFONTINDIRECTW(void) -{ - /* EMREXTCREATEFONTINDIRECTW */ - TEST_TYPE_SIZE (EMREXTCREATEFONTINDIRECTW, 332) - TEST_TYPE_ALIGN (EMREXTCREATEFONTINDIRECTW, 4) - TEST_FIELD_SIZE (EMREXTCREATEFONTINDIRECTW, emr, 8) - TEST_FIELD_ALIGN (EMREXTCREATEFONTINDIRECTW, emr, 4) - TEST_FIELD_OFFSET(EMREXTCREATEFONTINDIRECTW, emr, 0) - TEST_FIELD_SIZE (EMREXTCREATEFONTINDIRECTW, ihFont, 4) - TEST_FIELD_ALIGN (EMREXTCREATEFONTINDIRECTW, ihFont, 4) - TEST_FIELD_OFFSET(EMREXTCREATEFONTINDIRECTW, ihFont, 8) - TEST_FIELD_SIZE (EMREXTCREATEFONTINDIRECTW, elfw, 320) - TEST_FIELD_ALIGN (EMREXTCREATEFONTINDIRECTW, elfw, 4) - TEST_FIELD_OFFSET(EMREXTCREATEFONTINDIRECTW, elfw, 12) -} - -static void test_pack_EMREXTCREATEPEN(void) -{ - /* EMREXTCREATEPEN */ - TEST_TYPE_SIZE (EMREXTCREATEPEN, 64) - TEST_TYPE_ALIGN (EMREXTCREATEPEN, 8) - TEST_FIELD_SIZE (EMREXTCREATEPEN, emr, 8) - TEST_FIELD_ALIGN (EMREXTCREATEPEN, emr, 4) - TEST_FIELD_OFFSET(EMREXTCREATEPEN, emr, 0) - TEST_FIELD_SIZE (EMREXTCREATEPEN, ihPen, 4) - TEST_FIELD_ALIGN (EMREXTCREATEPEN, ihPen, 4) - TEST_FIELD_OFFSET(EMREXTCREATEPEN, ihPen, 8) - TEST_FIELD_SIZE (EMREXTCREATEPEN, offBmi, 4) - TEST_FIELD_ALIGN (EMREXTCREATEPEN, offBmi, 4) - TEST_FIELD_OFFSET(EMREXTCREATEPEN, offBmi, 12) - TEST_FIELD_SIZE (EMREXTCREATEPEN, cbBmi, 4) - TEST_FIELD_ALIGN (EMREXTCREATEPEN, cbBmi, 4) - TEST_FIELD_OFFSET(EMREXTCREATEPEN, cbBmi, 16) - TEST_FIELD_SIZE (EMREXTCREATEPEN, offBits, 4) - TEST_FIELD_ALIGN (EMREXTCREATEPEN, offBits, 4) - TEST_FIELD_OFFSET(EMREXTCREATEPEN, offBits, 20) - TEST_FIELD_SIZE (EMREXTCREATEPEN, cbBits, 4) - TEST_FIELD_ALIGN (EMREXTCREATEPEN, cbBits, 4) - TEST_FIELD_OFFSET(EMREXTCREATEPEN, cbBits, 24) - TEST_FIELD_SIZE (EMREXTCREATEPEN, elp, 32) - TEST_FIELD_ALIGN (EMREXTCREATEPEN, elp, 8) - TEST_FIELD_OFFSET(EMREXTCREATEPEN, elp, 32) -} - -static void test_pack_EMREXTFLOODFILL(void) -{ - /* EMREXTFLOODFILL */ - TEST_TYPE_SIZE (EMREXTFLOODFILL, 24) - TEST_TYPE_ALIGN (EMREXTFLOODFILL, 4) - TEST_FIELD_SIZE (EMREXTFLOODFILL, emr, 8) - TEST_FIELD_ALIGN (EMREXTFLOODFILL, emr, 4) - TEST_FIELD_OFFSET(EMREXTFLOODFILL, emr, 0) - TEST_FIELD_SIZE (EMREXTFLOODFILL, ptlStart, 8) - TEST_FIELD_ALIGN (EMREXTFLOODFILL, ptlStart, 4) - TEST_FIELD_OFFSET(EMREXTFLOODFILL, ptlStart, 8) - TEST_FIELD_SIZE (EMREXTFLOODFILL, crColor, 4) - TEST_FIELD_ALIGN (EMREXTFLOODFILL, crColor, 4) - TEST_FIELD_OFFSET(EMREXTFLOODFILL, crColor, 16) - TEST_FIELD_SIZE (EMREXTFLOODFILL, iMode, 4) - TEST_FIELD_ALIGN (EMREXTFLOODFILL, iMode, 4) - TEST_FIELD_OFFSET(EMREXTFLOODFILL, iMode, 20) -} - -static void test_pack_EMREXTSELECTCLIPRGN(void) -{ - /* EMREXTSELECTCLIPRGN */ - TEST_TYPE_SIZE (EMREXTSELECTCLIPRGN, 20) - TEST_TYPE_ALIGN (EMREXTSELECTCLIPRGN, 4) - TEST_FIELD_SIZE (EMREXTSELECTCLIPRGN, emr, 8) - TEST_FIELD_ALIGN (EMREXTSELECTCLIPRGN, emr, 4) - TEST_FIELD_OFFSET(EMREXTSELECTCLIPRGN, emr, 0) - TEST_FIELD_SIZE (EMREXTSELECTCLIPRGN, cbRgnData, 4) - TEST_FIELD_ALIGN (EMREXTSELECTCLIPRGN, cbRgnData, 4) - TEST_FIELD_OFFSET(EMREXTSELECTCLIPRGN, cbRgnData, 8) - TEST_FIELD_SIZE (EMREXTSELECTCLIPRGN, iMode, 4) - TEST_FIELD_ALIGN (EMREXTSELECTCLIPRGN, iMode, 4) - TEST_FIELD_OFFSET(EMREXTSELECTCLIPRGN, iMode, 12) - TEST_FIELD_SIZE (EMREXTSELECTCLIPRGN, RgnData, 1) - TEST_FIELD_ALIGN (EMREXTSELECTCLIPRGN, RgnData, 1) - TEST_FIELD_OFFSET(EMREXTSELECTCLIPRGN, RgnData, 16) -} - -static void test_pack_EMREXTTEXTOUTA(void) -{ - /* EMREXTTEXTOUTA */ - TEST_TYPE_SIZE (EMREXTTEXTOUTA, 76) - TEST_TYPE_ALIGN (EMREXTTEXTOUTA, 4) - TEST_FIELD_SIZE (EMREXTTEXTOUTA, emr, 8) - TEST_FIELD_ALIGN (EMREXTTEXTOUTA, emr, 4) - TEST_FIELD_OFFSET(EMREXTTEXTOUTA, emr, 0) - TEST_FIELD_SIZE (EMREXTTEXTOUTA, rclBounds, 16) - TEST_FIELD_ALIGN (EMREXTTEXTOUTA, rclBounds, 4) - TEST_FIELD_OFFSET(EMREXTTEXTOUTA, rclBounds, 8) - TEST_FIELD_SIZE (EMREXTTEXTOUTA, iGraphicsMode, 4) - TEST_FIELD_ALIGN (EMREXTTEXTOUTA, iGraphicsMode, 4) - TEST_FIELD_OFFSET(EMREXTTEXTOUTA, iGraphicsMode, 24) - TEST_FIELD_SIZE (EMREXTTEXTOUTA, exScale, 4) - TEST_FIELD_ALIGN (EMREXTTEXTOUTA, exScale, 4) - TEST_FIELD_OFFSET(EMREXTTEXTOUTA, exScale, 28) - TEST_FIELD_SIZE (EMREXTTEXTOUTA, eyScale, 4) - TEST_FIELD_ALIGN (EMREXTTEXTOUTA, eyScale, 4) - TEST_FIELD_OFFSET(EMREXTTEXTOUTA, eyScale, 32) - TEST_FIELD_SIZE (EMREXTTEXTOUTA, emrtext, 40) - TEST_FIELD_ALIGN (EMREXTTEXTOUTA, emrtext, 4) - TEST_FIELD_OFFSET(EMREXTTEXTOUTA, emrtext, 36) -} - -static void test_pack_EMREXTTEXTOUTW(void) -{ - /* EMREXTTEXTOUTW */ - TEST_TYPE_SIZE (EMREXTTEXTOUTW, 76) - TEST_TYPE_ALIGN (EMREXTTEXTOUTW, 4) - TEST_FIELD_SIZE (EMREXTTEXTOUTW, emr, 8) - TEST_FIELD_ALIGN (EMREXTTEXTOUTW, emr, 4) - TEST_FIELD_OFFSET(EMREXTTEXTOUTW, emr, 0) - TEST_FIELD_SIZE (EMREXTTEXTOUTW, rclBounds, 16) - TEST_FIELD_ALIGN (EMREXTTEXTOUTW, rclBounds, 4) - TEST_FIELD_OFFSET(EMREXTTEXTOUTW, rclBounds, 8) - TEST_FIELD_SIZE (EMREXTTEXTOUTW, iGraphicsMode, 4) - TEST_FIELD_ALIGN (EMREXTTEXTOUTW, iGraphicsMode, 4) - TEST_FIELD_OFFSET(EMREXTTEXTOUTW, iGraphicsMode, 24) - TEST_FIELD_SIZE (EMREXTTEXTOUTW, exScale, 4) - TEST_FIELD_ALIGN (EMREXTTEXTOUTW, exScale, 4) - TEST_FIELD_OFFSET(EMREXTTEXTOUTW, exScale, 28) - TEST_FIELD_SIZE (EMREXTTEXTOUTW, eyScale, 4) - TEST_FIELD_ALIGN (EMREXTTEXTOUTW, eyScale, 4) - TEST_FIELD_OFFSET(EMREXTTEXTOUTW, eyScale, 32) - TEST_FIELD_SIZE (EMREXTTEXTOUTW, emrtext, 40) - TEST_FIELD_ALIGN (EMREXTTEXTOUTW, emrtext, 4) - TEST_FIELD_OFFSET(EMREXTTEXTOUTW, emrtext, 36) -} - -static void test_pack_EMRFILLPATH(void) -{ - /* EMRFILLPATH */ - TEST_TYPE_SIZE (EMRFILLPATH, 24) - TEST_TYPE_ALIGN (EMRFILLPATH, 4) - TEST_FIELD_SIZE (EMRFILLPATH, emr, 8) - TEST_FIELD_ALIGN (EMRFILLPATH, emr, 4) - TEST_FIELD_OFFSET(EMRFILLPATH, emr, 0) - TEST_FIELD_SIZE (EMRFILLPATH, rclBounds, 16) - TEST_FIELD_ALIGN (EMRFILLPATH, rclBounds, 4) - TEST_FIELD_OFFSET(EMRFILLPATH, rclBounds, 8) -} - -static void test_pack_EMRFILLRGN(void) -{ - /* EMRFILLRGN */ - TEST_TYPE_SIZE (EMRFILLRGN, 36) - TEST_TYPE_ALIGN (EMRFILLRGN, 4) - TEST_FIELD_SIZE (EMRFILLRGN, emr, 8) - TEST_FIELD_ALIGN (EMRFILLRGN, emr, 4) - TEST_FIELD_OFFSET(EMRFILLRGN, emr, 0) - TEST_FIELD_SIZE (EMRFILLRGN, rclBounds, 16) - TEST_FIELD_ALIGN (EMRFILLRGN, rclBounds, 4) - TEST_FIELD_OFFSET(EMRFILLRGN, rclBounds, 8) - TEST_FIELD_SIZE (EMRFILLRGN, cbRgnData, 4) - TEST_FIELD_ALIGN (EMRFILLRGN, cbRgnData, 4) - TEST_FIELD_OFFSET(EMRFILLRGN, cbRgnData, 24) - TEST_FIELD_SIZE (EMRFILLRGN, ihBrush, 4) - TEST_FIELD_ALIGN (EMRFILLRGN, ihBrush, 4) - TEST_FIELD_OFFSET(EMRFILLRGN, ihBrush, 28) - TEST_FIELD_SIZE (EMRFILLRGN, RgnData, 1) - TEST_FIELD_ALIGN (EMRFILLRGN, RgnData, 1) - TEST_FIELD_OFFSET(EMRFILLRGN, RgnData, 32) -} - -static void test_pack_EMRFLATTENPATH(void) -{ - /* EMRFLATTENPATH */ - TEST_TYPE_SIZE (EMRFLATTENPATH, 8) - TEST_TYPE_ALIGN (EMRFLATTENPATH, 4) - TEST_FIELD_SIZE (EMRFLATTENPATH, emr, 8) - TEST_FIELD_ALIGN (EMRFLATTENPATH, emr, 4) - TEST_FIELD_OFFSET(EMRFLATTENPATH, emr, 0) -} - -static void test_pack_EMRFORMAT(void) -{ - /* EMRFORMAT */ - TEST_TYPE_SIZE (EMRFORMAT, 16) - TEST_TYPE_ALIGN (EMRFORMAT, 4) - TEST_FIELD_SIZE (EMRFORMAT, dSignature, 4) - TEST_FIELD_ALIGN (EMRFORMAT, dSignature, 4) - TEST_FIELD_OFFSET(EMRFORMAT, dSignature, 0) - TEST_FIELD_SIZE (EMRFORMAT, nVersion, 4) - TEST_FIELD_ALIGN (EMRFORMAT, nVersion, 4) - TEST_FIELD_OFFSET(EMRFORMAT, nVersion, 4) - TEST_FIELD_SIZE (EMRFORMAT, cbData, 4) - TEST_FIELD_ALIGN (EMRFORMAT, cbData, 4) - TEST_FIELD_OFFSET(EMRFORMAT, cbData, 8) - TEST_FIELD_SIZE (EMRFORMAT, offData, 4) - TEST_FIELD_ALIGN (EMRFORMAT, offData, 4) - TEST_FIELD_OFFSET(EMRFORMAT, offData, 12) -} - -static void test_pack_EMRFRAMERGN(void) -{ - /* EMRFRAMERGN */ - TEST_TYPE_SIZE (EMRFRAMERGN, 44) - TEST_TYPE_ALIGN (EMRFRAMERGN, 4) - TEST_FIELD_SIZE (EMRFRAMERGN, emr, 8) - TEST_FIELD_ALIGN (EMRFRAMERGN, emr, 4) - TEST_FIELD_OFFSET(EMRFRAMERGN, emr, 0) - TEST_FIELD_SIZE (EMRFRAMERGN, rclBounds, 16) - TEST_FIELD_ALIGN (EMRFRAMERGN, rclBounds, 4) - TEST_FIELD_OFFSET(EMRFRAMERGN, rclBounds, 8) - TEST_FIELD_SIZE (EMRFRAMERGN, cbRgnData, 4) - TEST_FIELD_ALIGN (EMRFRAMERGN, cbRgnData, 4) - TEST_FIELD_OFFSET(EMRFRAMERGN, cbRgnData, 24) - TEST_FIELD_SIZE (EMRFRAMERGN, ihBrush, 4) - TEST_FIELD_ALIGN (EMRFRAMERGN, ihBrush, 4) - TEST_FIELD_OFFSET(EMRFRAMERGN, ihBrush, 28) - TEST_FIELD_SIZE (EMRFRAMERGN, szlStroke, 8) - TEST_FIELD_ALIGN (EMRFRAMERGN, szlStroke, 4) - TEST_FIELD_OFFSET(EMRFRAMERGN, szlStroke, 32) - TEST_FIELD_SIZE (EMRFRAMERGN, RgnData, 1) - TEST_FIELD_ALIGN (EMRFRAMERGN, RgnData, 1) - TEST_FIELD_OFFSET(EMRFRAMERGN, RgnData, 40) -} - -static void test_pack_EMRGDICOMMENT(void) -{ - /* EMRGDICOMMENT */ - TEST_TYPE_SIZE (EMRGDICOMMENT, 16) - TEST_TYPE_ALIGN (EMRGDICOMMENT, 4) - TEST_FIELD_SIZE (EMRGDICOMMENT, emr, 8) - TEST_FIELD_ALIGN (EMRGDICOMMENT, emr, 4) - TEST_FIELD_OFFSET(EMRGDICOMMENT, emr, 0) - TEST_FIELD_SIZE (EMRGDICOMMENT, cbData, 4) - TEST_FIELD_ALIGN (EMRGDICOMMENT, cbData, 4) - TEST_FIELD_OFFSET(EMRGDICOMMENT, cbData, 8) - TEST_FIELD_SIZE (EMRGDICOMMENT, Data, 1) - TEST_FIELD_ALIGN (EMRGDICOMMENT, Data, 1) - TEST_FIELD_OFFSET(EMRGDICOMMENT, Data, 12) -} - -static void test_pack_EMRGLSBOUNDEDRECORD(void) -{ - /* EMRGLSBOUNDEDRECORD */ - TEST_TYPE_SIZE (EMRGLSBOUNDEDRECORD, 32) - TEST_TYPE_ALIGN (EMRGLSBOUNDEDRECORD, 4) - TEST_FIELD_SIZE (EMRGLSBOUNDEDRECORD, emr, 8) - TEST_FIELD_ALIGN (EMRGLSBOUNDEDRECORD, emr, 4) - TEST_FIELD_OFFSET(EMRGLSBOUNDEDRECORD, emr, 0) - TEST_FIELD_SIZE (EMRGLSBOUNDEDRECORD, rclBounds, 16) - TEST_FIELD_ALIGN (EMRGLSBOUNDEDRECORD, rclBounds, 4) - TEST_FIELD_OFFSET(EMRGLSBOUNDEDRECORD, rclBounds, 8) - TEST_FIELD_SIZE (EMRGLSBOUNDEDRECORD, cbData, 4) - TEST_FIELD_ALIGN (EMRGLSBOUNDEDRECORD, cbData, 4) - TEST_FIELD_OFFSET(EMRGLSBOUNDEDRECORD, cbData, 24) - TEST_FIELD_SIZE (EMRGLSBOUNDEDRECORD, Data, 1) - TEST_FIELD_ALIGN (EMRGLSBOUNDEDRECORD, Data, 1) - TEST_FIELD_OFFSET(EMRGLSBOUNDEDRECORD, Data, 28) -} - -static void test_pack_EMRGLSRECORD(void) -{ - /* EMRGLSRECORD */ - TEST_TYPE_SIZE (EMRGLSRECORD, 16) - TEST_TYPE_ALIGN (EMRGLSRECORD, 4) - TEST_FIELD_SIZE (EMRGLSRECORD, emr, 8) - TEST_FIELD_ALIGN (EMRGLSRECORD, emr, 4) - TEST_FIELD_OFFSET(EMRGLSRECORD, emr, 0) - TEST_FIELD_SIZE (EMRGLSRECORD, cbData, 4) - TEST_FIELD_ALIGN (EMRGLSRECORD, cbData, 4) - TEST_FIELD_OFFSET(EMRGLSRECORD, cbData, 8) - TEST_FIELD_SIZE (EMRGLSRECORD, Data, 1) - TEST_FIELD_ALIGN (EMRGLSRECORD, Data, 1) - TEST_FIELD_OFFSET(EMRGLSRECORD, Data, 12) -} - -static void test_pack_EMRINTERSECTCLIPRECT(void) -{ - /* EMRINTERSECTCLIPRECT */ - TEST_TYPE_SIZE (EMRINTERSECTCLIPRECT, 24) - TEST_TYPE_ALIGN (EMRINTERSECTCLIPRECT, 4) - TEST_FIELD_SIZE (EMRINTERSECTCLIPRECT, emr, 8) - TEST_FIELD_ALIGN (EMRINTERSECTCLIPRECT, emr, 4) - TEST_FIELD_OFFSET(EMRINTERSECTCLIPRECT, emr, 0) - TEST_FIELD_SIZE (EMRINTERSECTCLIPRECT, rclClip, 16) - TEST_FIELD_ALIGN (EMRINTERSECTCLIPRECT, rclClip, 4) - TEST_FIELD_OFFSET(EMRINTERSECTCLIPRECT, rclClip, 8) -} - -static void test_pack_EMRINVERTRGN(void) -{ - /* EMRINVERTRGN */ - TEST_TYPE_SIZE (EMRINVERTRGN, 32) - TEST_TYPE_ALIGN (EMRINVERTRGN, 4) - TEST_FIELD_SIZE (EMRINVERTRGN, emr, 8) - TEST_FIELD_ALIGN (EMRINVERTRGN, emr, 4) - TEST_FIELD_OFFSET(EMRINVERTRGN, emr, 0) - TEST_FIELD_SIZE (EMRINVERTRGN, rclBounds, 16) - TEST_FIELD_ALIGN (EMRINVERTRGN, rclBounds, 4) - TEST_FIELD_OFFSET(EMRINVERTRGN, rclBounds, 8) - TEST_FIELD_SIZE (EMRINVERTRGN, cbRgnData, 4) - TEST_FIELD_ALIGN (EMRINVERTRGN, cbRgnData, 4) - TEST_FIELD_OFFSET(EMRINVERTRGN, cbRgnData, 24) - TEST_FIELD_SIZE (EMRINVERTRGN, RgnData, 1) - TEST_FIELD_ALIGN (EMRINVERTRGN, RgnData, 1) - TEST_FIELD_OFFSET(EMRINVERTRGN, RgnData, 28) -} - -static void test_pack_EMRLINETO(void) -{ - /* EMRLINETO */ - TEST_TYPE_SIZE (EMRLINETO, 16) - TEST_TYPE_ALIGN (EMRLINETO, 4) - TEST_FIELD_SIZE (EMRLINETO, emr, 8) - TEST_FIELD_ALIGN (EMRLINETO, emr, 4) - TEST_FIELD_OFFSET(EMRLINETO, emr, 0) - TEST_FIELD_SIZE (EMRLINETO, ptl, 8) - TEST_FIELD_ALIGN (EMRLINETO, ptl, 4) - TEST_FIELD_OFFSET(EMRLINETO, ptl, 8) -} - -static void test_pack_EMRMASKBLT(void) -{ - /* EMRMASKBLT */ - TEST_TYPE_SIZE (EMRMASKBLT, 128) - TEST_TYPE_ALIGN (EMRMASKBLT, 4) - TEST_FIELD_SIZE (EMRMASKBLT, emr, 8) - TEST_FIELD_ALIGN (EMRMASKBLT, emr, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, emr, 0) - TEST_FIELD_SIZE (EMRMASKBLT, rclBounds, 16) - TEST_FIELD_ALIGN (EMRMASKBLT, rclBounds, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, rclBounds, 8) - TEST_FIELD_SIZE (EMRMASKBLT, xDest, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, xDest, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, xDest, 24) - TEST_FIELD_SIZE (EMRMASKBLT, yDest, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, yDest, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, yDest, 28) - TEST_FIELD_SIZE (EMRMASKBLT, cxDest, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, cxDest, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, cxDest, 32) - TEST_FIELD_SIZE (EMRMASKBLT, cyDest, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, cyDest, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, cyDest, 36) - TEST_FIELD_SIZE (EMRMASKBLT, dwRop, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, dwRop, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, dwRop, 40) - TEST_FIELD_SIZE (EMRMASKBLT, xSrc, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, xSrc, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, xSrc, 44) - TEST_FIELD_SIZE (EMRMASKBLT, ySrc, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, ySrc, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, ySrc, 48) - TEST_FIELD_SIZE (EMRMASKBLT, xformSrc, 24) - TEST_FIELD_ALIGN (EMRMASKBLT, xformSrc, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, xformSrc, 52) - TEST_FIELD_SIZE (EMRMASKBLT, crBkColorSrc, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, crBkColorSrc, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, crBkColorSrc, 76) - TEST_FIELD_SIZE (EMRMASKBLT, iUsageSrc, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, iUsageSrc, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, iUsageSrc, 80) - TEST_FIELD_SIZE (EMRMASKBLT, offBmiSrc, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, offBmiSrc, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, offBmiSrc, 84) - TEST_FIELD_SIZE (EMRMASKBLT, cbBmiSrc, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, cbBmiSrc, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, cbBmiSrc, 88) - TEST_FIELD_SIZE (EMRMASKBLT, offBitsSrc, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, offBitsSrc, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, offBitsSrc, 92) - TEST_FIELD_SIZE (EMRMASKBLT, cbBitsSrc, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, cbBitsSrc, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, cbBitsSrc, 96) - TEST_FIELD_SIZE (EMRMASKBLT, xMask, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, xMask, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, xMask, 100) - TEST_FIELD_SIZE (EMRMASKBLT, yMask, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, yMask, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, yMask, 104) - TEST_FIELD_SIZE (EMRMASKBLT, iUsageMask, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, iUsageMask, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, iUsageMask, 108) - TEST_FIELD_SIZE (EMRMASKBLT, offBmiMask, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, offBmiMask, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, offBmiMask, 112) - TEST_FIELD_SIZE (EMRMASKBLT, cbBmiMask, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, cbBmiMask, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, cbBmiMask, 116) - TEST_FIELD_SIZE (EMRMASKBLT, offBitsMask, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, offBitsMask, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, offBitsMask, 120) - TEST_FIELD_SIZE (EMRMASKBLT, cbBitsMask, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, cbBitsMask, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, cbBitsMask, 124) -} - -static void test_pack_EMRMODIFYWORLDTRANSFORM(void) -{ - /* EMRMODIFYWORLDTRANSFORM */ - TEST_TYPE_SIZE (EMRMODIFYWORLDTRANSFORM, 36) - TEST_TYPE_ALIGN (EMRMODIFYWORLDTRANSFORM, 4) - TEST_FIELD_SIZE (EMRMODIFYWORLDTRANSFORM, emr, 8) - TEST_FIELD_ALIGN (EMRMODIFYWORLDTRANSFORM, emr, 4) - TEST_FIELD_OFFSET(EMRMODIFYWORLDTRANSFORM, emr, 0) - TEST_FIELD_SIZE (EMRMODIFYWORLDTRANSFORM, xform, 24) - TEST_FIELD_ALIGN (EMRMODIFYWORLDTRANSFORM, xform, 4) - TEST_FIELD_OFFSET(EMRMODIFYWORLDTRANSFORM, xform, 8) - TEST_FIELD_SIZE (EMRMODIFYWORLDTRANSFORM, iMode, 4) - TEST_FIELD_ALIGN (EMRMODIFYWORLDTRANSFORM, iMode, 4) - TEST_FIELD_OFFSET(EMRMODIFYWORLDTRANSFORM, iMode, 32) -} - -static void test_pack_EMRMOVETOEX(void) -{ - /* EMRMOVETOEX */ - TEST_TYPE_SIZE (EMRMOVETOEX, 16) - TEST_TYPE_ALIGN (EMRMOVETOEX, 4) - TEST_FIELD_SIZE (EMRMOVETOEX, emr, 8) - TEST_FIELD_ALIGN (EMRMOVETOEX, emr, 4) - TEST_FIELD_OFFSET(EMRMOVETOEX, emr, 0) - TEST_FIELD_SIZE (EMRMOVETOEX, ptl, 8) - TEST_FIELD_ALIGN (EMRMOVETOEX, ptl, 4) - TEST_FIELD_OFFSET(EMRMOVETOEX, ptl, 8) -} - -static void test_pack_EMROFFSETCLIPRGN(void) -{ - /* EMROFFSETCLIPRGN */ - TEST_TYPE_SIZE (EMROFFSETCLIPRGN, 16) - TEST_TYPE_ALIGN (EMROFFSETCLIPRGN, 4) - TEST_FIELD_SIZE (EMROFFSETCLIPRGN, emr, 8) - TEST_FIELD_ALIGN (EMROFFSETCLIPRGN, emr, 4) - TEST_FIELD_OFFSET(EMROFFSETCLIPRGN, emr, 0) - TEST_FIELD_SIZE (EMROFFSETCLIPRGN, ptlOffset, 8) - TEST_FIELD_ALIGN (EMROFFSETCLIPRGN, ptlOffset, 4) - TEST_FIELD_OFFSET(EMROFFSETCLIPRGN, ptlOffset, 8) -} - -static void test_pack_EMRPAINTRGN(void) -{ - /* EMRPAINTRGN */ - TEST_TYPE_SIZE (EMRPAINTRGN, 32) - TEST_TYPE_ALIGN (EMRPAINTRGN, 4) - TEST_FIELD_SIZE (EMRPAINTRGN, emr, 8) - TEST_FIELD_ALIGN (EMRPAINTRGN, emr, 4) - TEST_FIELD_OFFSET(EMRPAINTRGN, emr, 0) - TEST_FIELD_SIZE (EMRPAINTRGN, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPAINTRGN, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPAINTRGN, rclBounds, 8) - TEST_FIELD_SIZE (EMRPAINTRGN, cbRgnData, 4) - TEST_FIELD_ALIGN (EMRPAINTRGN, cbRgnData, 4) - TEST_FIELD_OFFSET(EMRPAINTRGN, cbRgnData, 24) - TEST_FIELD_SIZE (EMRPAINTRGN, RgnData, 1) - TEST_FIELD_ALIGN (EMRPAINTRGN, RgnData, 1) - TEST_FIELD_OFFSET(EMRPAINTRGN, RgnData, 28) -} - -static void test_pack_EMRPIE(void) -{ - /* EMRPIE */ - TEST_TYPE_SIZE (EMRPIE, 40) - TEST_TYPE_ALIGN (EMRPIE, 4) - TEST_FIELD_SIZE (EMRPIE, emr, 8) - TEST_FIELD_ALIGN (EMRPIE, emr, 4) - TEST_FIELD_OFFSET(EMRPIE, emr, 0) - TEST_FIELD_SIZE (EMRPIE, rclBox, 16) - TEST_FIELD_ALIGN (EMRPIE, rclBox, 4) - TEST_FIELD_OFFSET(EMRPIE, rclBox, 8) - TEST_FIELD_SIZE (EMRPIE, ptlStart, 8) - TEST_FIELD_ALIGN (EMRPIE, ptlStart, 4) - TEST_FIELD_OFFSET(EMRPIE, ptlStart, 24) - TEST_FIELD_SIZE (EMRPIE, ptlEnd, 8) - TEST_FIELD_ALIGN (EMRPIE, ptlEnd, 4) - TEST_FIELD_OFFSET(EMRPIE, ptlEnd, 32) -} - -static void test_pack_EMRPIXELFORMAT(void) -{ - /* EMRPIXELFORMAT */ - TEST_TYPE_SIZE (EMRPIXELFORMAT, 48) - TEST_TYPE_ALIGN (EMRPIXELFORMAT, 4) - TEST_FIELD_SIZE (EMRPIXELFORMAT, emr, 8) - TEST_FIELD_ALIGN (EMRPIXELFORMAT, emr, 4) - TEST_FIELD_OFFSET(EMRPIXELFORMAT, emr, 0) - TEST_FIELD_SIZE (EMRPIXELFORMAT, pfd, 40) - TEST_FIELD_ALIGN (EMRPIXELFORMAT, pfd, 4) - TEST_FIELD_OFFSET(EMRPIXELFORMAT, pfd, 8) -} - -static void test_pack_EMRPLGBLT(void) -{ - /* EMRPLGBLT */ - TEST_TYPE_SIZE (EMRPLGBLT, 140) - TEST_TYPE_ALIGN (EMRPLGBLT, 4) - TEST_FIELD_SIZE (EMRPLGBLT, emr, 8) - TEST_FIELD_ALIGN (EMRPLGBLT, emr, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, emr, 0) - TEST_FIELD_SIZE (EMRPLGBLT, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPLGBLT, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, rclBounds, 8) - TEST_FIELD_SIZE (EMRPLGBLT, aptlDest, 24) - TEST_FIELD_ALIGN (EMRPLGBLT, aptlDest, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, aptlDest, 24) - TEST_FIELD_SIZE (EMRPLGBLT, xSrc, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, xSrc, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, xSrc, 48) - TEST_FIELD_SIZE (EMRPLGBLT, ySrc, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, ySrc, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, ySrc, 52) - TEST_FIELD_SIZE (EMRPLGBLT, cxSrc, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, cxSrc, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, cxSrc, 56) - TEST_FIELD_SIZE (EMRPLGBLT, cySrc, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, cySrc, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, cySrc, 60) - TEST_FIELD_SIZE (EMRPLGBLT, xformSrc, 24) - TEST_FIELD_ALIGN (EMRPLGBLT, xformSrc, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, xformSrc, 64) - TEST_FIELD_SIZE (EMRPLGBLT, crBkColorSrc, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, crBkColorSrc, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, crBkColorSrc, 88) - TEST_FIELD_SIZE (EMRPLGBLT, iUsageSrc, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, iUsageSrc, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, iUsageSrc, 92) - TEST_FIELD_SIZE (EMRPLGBLT, offBmiSrc, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, offBmiSrc, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, offBmiSrc, 96) - TEST_FIELD_SIZE (EMRPLGBLT, cbBmiSrc, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, cbBmiSrc, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, cbBmiSrc, 100) - TEST_FIELD_SIZE (EMRPLGBLT, offBitsSrc, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, offBitsSrc, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, offBitsSrc, 104) - TEST_FIELD_SIZE (EMRPLGBLT, cbBitsSrc, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, cbBitsSrc, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, cbBitsSrc, 108) - TEST_FIELD_SIZE (EMRPLGBLT, xMask, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, xMask, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, xMask, 112) - TEST_FIELD_SIZE (EMRPLGBLT, yMask, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, yMask, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, yMask, 116) - TEST_FIELD_SIZE (EMRPLGBLT, iUsageMask, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, iUsageMask, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, iUsageMask, 120) - TEST_FIELD_SIZE (EMRPLGBLT, offBmiMask, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, offBmiMask, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, offBmiMask, 124) - TEST_FIELD_SIZE (EMRPLGBLT, cbBmiMask, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, cbBmiMask, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, cbBmiMask, 128) - TEST_FIELD_SIZE (EMRPLGBLT, offBitsMask, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, offBitsMask, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, offBitsMask, 132) - TEST_FIELD_SIZE (EMRPLGBLT, cbBitsMask, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, cbBitsMask, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, cbBitsMask, 136) -} - -static void test_pack_EMRPOLYBEZIER(void) -{ - /* EMRPOLYBEZIER */ - TEST_TYPE_SIZE (EMRPOLYBEZIER, 36) - TEST_TYPE_ALIGN (EMRPOLYBEZIER, 4) - TEST_FIELD_SIZE (EMRPOLYBEZIER, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYBEZIER, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIER, emr, 0) - TEST_FIELD_SIZE (EMRPOLYBEZIER, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYBEZIER, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIER, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYBEZIER, cptl, 4) - TEST_FIELD_ALIGN (EMRPOLYBEZIER, cptl, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIER, cptl, 24) - TEST_FIELD_SIZE (EMRPOLYBEZIER, aptl, 8) - TEST_FIELD_ALIGN (EMRPOLYBEZIER, aptl, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIER, aptl, 28) -} - -static void test_pack_EMRPOLYBEZIER16(void) -{ - /* EMRPOLYBEZIER16 */ - TEST_TYPE_SIZE (EMRPOLYBEZIER16, 32) - TEST_TYPE_ALIGN (EMRPOLYBEZIER16, 4) - TEST_FIELD_SIZE (EMRPOLYBEZIER16, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYBEZIER16, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIER16, emr, 0) - TEST_FIELD_SIZE (EMRPOLYBEZIER16, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYBEZIER16, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIER16, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYBEZIER16, cpts, 4) - TEST_FIELD_ALIGN (EMRPOLYBEZIER16, cpts, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIER16, cpts, 24) - TEST_FIELD_SIZE (EMRPOLYBEZIER16, apts, 4) - TEST_FIELD_ALIGN (EMRPOLYBEZIER16, apts, 2) - TEST_FIELD_OFFSET(EMRPOLYBEZIER16, apts, 28) -} - -static void test_pack_EMRPOLYBEZIERTO(void) -{ - /* EMRPOLYBEZIERTO */ - TEST_TYPE_SIZE (EMRPOLYBEZIERTO, 36) - TEST_TYPE_ALIGN (EMRPOLYBEZIERTO, 4) - TEST_FIELD_SIZE (EMRPOLYBEZIERTO, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYBEZIERTO, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIERTO, emr, 0) - TEST_FIELD_SIZE (EMRPOLYBEZIERTO, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYBEZIERTO, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIERTO, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYBEZIERTO, cptl, 4) - TEST_FIELD_ALIGN (EMRPOLYBEZIERTO, cptl, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIERTO, cptl, 24) - TEST_FIELD_SIZE (EMRPOLYBEZIERTO, aptl, 8) - TEST_FIELD_ALIGN (EMRPOLYBEZIERTO, aptl, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIERTO, aptl, 28) -} - -static void test_pack_EMRPOLYBEZIERTO16(void) -{ - /* EMRPOLYBEZIERTO16 */ - TEST_TYPE_SIZE (EMRPOLYBEZIERTO16, 32) - TEST_TYPE_ALIGN (EMRPOLYBEZIERTO16, 4) - TEST_FIELD_SIZE (EMRPOLYBEZIERTO16, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYBEZIERTO16, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIERTO16, emr, 0) - TEST_FIELD_SIZE (EMRPOLYBEZIERTO16, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYBEZIERTO16, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIERTO16, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYBEZIERTO16, cpts, 4) - TEST_FIELD_ALIGN (EMRPOLYBEZIERTO16, cpts, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIERTO16, cpts, 24) - TEST_FIELD_SIZE (EMRPOLYBEZIERTO16, apts, 4) - TEST_FIELD_ALIGN (EMRPOLYBEZIERTO16, apts, 2) - TEST_FIELD_OFFSET(EMRPOLYBEZIERTO16, apts, 28) -} - -static void test_pack_EMRPOLYDRAW(void) -{ - /* EMRPOLYDRAW */ - TEST_TYPE_SIZE (EMRPOLYDRAW, 40) - TEST_TYPE_ALIGN (EMRPOLYDRAW, 4) - TEST_FIELD_SIZE (EMRPOLYDRAW, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYDRAW, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYDRAW, emr, 0) - TEST_FIELD_SIZE (EMRPOLYDRAW, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYDRAW, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYDRAW, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYDRAW, cptl, 4) - TEST_FIELD_ALIGN (EMRPOLYDRAW, cptl, 4) - TEST_FIELD_OFFSET(EMRPOLYDRAW, cptl, 24) - TEST_FIELD_SIZE (EMRPOLYDRAW, aptl, 8) - TEST_FIELD_ALIGN (EMRPOLYDRAW, aptl, 4) - TEST_FIELD_OFFSET(EMRPOLYDRAW, aptl, 28) - TEST_FIELD_SIZE (EMRPOLYDRAW, abTypes, 1) - TEST_FIELD_ALIGN (EMRPOLYDRAW, abTypes, 1) - TEST_FIELD_OFFSET(EMRPOLYDRAW, abTypes, 36) -} - -static void test_pack_EMRPOLYDRAW16(void) -{ - /* EMRPOLYDRAW16 */ - TEST_TYPE_SIZE (EMRPOLYDRAW16, 36) - TEST_TYPE_ALIGN (EMRPOLYDRAW16, 4) - TEST_FIELD_SIZE (EMRPOLYDRAW16, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYDRAW16, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYDRAW16, emr, 0) - TEST_FIELD_SIZE (EMRPOLYDRAW16, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYDRAW16, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYDRAW16, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYDRAW16, cpts, 4) - TEST_FIELD_ALIGN (EMRPOLYDRAW16, cpts, 4) - TEST_FIELD_OFFSET(EMRPOLYDRAW16, cpts, 24) - TEST_FIELD_SIZE (EMRPOLYDRAW16, apts, 4) - TEST_FIELD_ALIGN (EMRPOLYDRAW16, apts, 2) - TEST_FIELD_OFFSET(EMRPOLYDRAW16, apts, 28) - TEST_FIELD_SIZE (EMRPOLYDRAW16, abTypes, 1) - TEST_FIELD_ALIGN (EMRPOLYDRAW16, abTypes, 1) - TEST_FIELD_OFFSET(EMRPOLYDRAW16, abTypes, 32) -} - -static void test_pack_EMRPOLYGON(void) -{ - /* EMRPOLYGON */ - TEST_TYPE_SIZE (EMRPOLYGON, 36) - TEST_TYPE_ALIGN (EMRPOLYGON, 4) - TEST_FIELD_SIZE (EMRPOLYGON, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYGON, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYGON, emr, 0) - TEST_FIELD_SIZE (EMRPOLYGON, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYGON, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYGON, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYGON, cptl, 4) - TEST_FIELD_ALIGN (EMRPOLYGON, cptl, 4) - TEST_FIELD_OFFSET(EMRPOLYGON, cptl, 24) - TEST_FIELD_SIZE (EMRPOLYGON, aptl, 8) - TEST_FIELD_ALIGN (EMRPOLYGON, aptl, 4) - TEST_FIELD_OFFSET(EMRPOLYGON, aptl, 28) -} - -static void test_pack_EMRPOLYGON16(void) -{ - /* EMRPOLYGON16 */ - TEST_TYPE_SIZE (EMRPOLYGON16, 32) - TEST_TYPE_ALIGN (EMRPOLYGON16, 4) - TEST_FIELD_SIZE (EMRPOLYGON16, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYGON16, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYGON16, emr, 0) - TEST_FIELD_SIZE (EMRPOLYGON16, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYGON16, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYGON16, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYGON16, cpts, 4) - TEST_FIELD_ALIGN (EMRPOLYGON16, cpts, 4) - TEST_FIELD_OFFSET(EMRPOLYGON16, cpts, 24) - TEST_FIELD_SIZE (EMRPOLYGON16, apts, 4) - TEST_FIELD_ALIGN (EMRPOLYGON16, apts, 2) - TEST_FIELD_OFFSET(EMRPOLYGON16, apts, 28) -} - -static void test_pack_EMRPOLYLINE(void) -{ - /* EMRPOLYLINE */ - TEST_TYPE_SIZE (EMRPOLYLINE, 36) - TEST_TYPE_ALIGN (EMRPOLYLINE, 4) - TEST_FIELD_SIZE (EMRPOLYLINE, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYLINE, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYLINE, emr, 0) - TEST_FIELD_SIZE (EMRPOLYLINE, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYLINE, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYLINE, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYLINE, cptl, 4) - TEST_FIELD_ALIGN (EMRPOLYLINE, cptl, 4) - TEST_FIELD_OFFSET(EMRPOLYLINE, cptl, 24) - TEST_FIELD_SIZE (EMRPOLYLINE, aptl, 8) - TEST_FIELD_ALIGN (EMRPOLYLINE, aptl, 4) - TEST_FIELD_OFFSET(EMRPOLYLINE, aptl, 28) -} - -static void test_pack_EMRPOLYLINE16(void) -{ - /* EMRPOLYLINE16 */ - TEST_TYPE_SIZE (EMRPOLYLINE16, 32) - TEST_TYPE_ALIGN (EMRPOLYLINE16, 4) - TEST_FIELD_SIZE (EMRPOLYLINE16, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYLINE16, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYLINE16, emr, 0) - TEST_FIELD_SIZE (EMRPOLYLINE16, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYLINE16, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYLINE16, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYLINE16, cpts, 4) - TEST_FIELD_ALIGN (EMRPOLYLINE16, cpts, 4) - TEST_FIELD_OFFSET(EMRPOLYLINE16, cpts, 24) - TEST_FIELD_SIZE (EMRPOLYLINE16, apts, 4) - TEST_FIELD_ALIGN (EMRPOLYLINE16, apts, 2) - TEST_FIELD_OFFSET(EMRPOLYLINE16, apts, 28) -} - -static void test_pack_EMRPOLYLINETO(void) -{ - /* EMRPOLYLINETO */ - TEST_TYPE_SIZE (EMRPOLYLINETO, 36) - TEST_TYPE_ALIGN (EMRPOLYLINETO, 4) - TEST_FIELD_SIZE (EMRPOLYLINETO, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYLINETO, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYLINETO, emr, 0) - TEST_FIELD_SIZE (EMRPOLYLINETO, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYLINETO, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYLINETO, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYLINETO, cptl, 4) - TEST_FIELD_ALIGN (EMRPOLYLINETO, cptl, 4) - TEST_FIELD_OFFSET(EMRPOLYLINETO, cptl, 24) - TEST_FIELD_SIZE (EMRPOLYLINETO, aptl, 8) - TEST_FIELD_ALIGN (EMRPOLYLINETO, aptl, 4) - TEST_FIELD_OFFSET(EMRPOLYLINETO, aptl, 28) -} - -static void test_pack_EMRPOLYLINETO16(void) -{ - /* EMRPOLYLINETO16 */ - TEST_TYPE_SIZE (EMRPOLYLINETO16, 32) - TEST_TYPE_ALIGN (EMRPOLYLINETO16, 4) - TEST_FIELD_SIZE (EMRPOLYLINETO16, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYLINETO16, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYLINETO16, emr, 0) - TEST_FIELD_SIZE (EMRPOLYLINETO16, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYLINETO16, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYLINETO16, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYLINETO16, cpts, 4) - TEST_FIELD_ALIGN (EMRPOLYLINETO16, cpts, 4) - TEST_FIELD_OFFSET(EMRPOLYLINETO16, cpts, 24) - TEST_FIELD_SIZE (EMRPOLYLINETO16, apts, 4) - TEST_FIELD_ALIGN (EMRPOLYLINETO16, apts, 2) - TEST_FIELD_OFFSET(EMRPOLYLINETO16, apts, 28) -} - -static void test_pack_EMRPOLYPOLYGON(void) -{ - /* EMRPOLYPOLYGON */ - TEST_TYPE_SIZE (EMRPOLYPOLYGON, 44) - TEST_TYPE_ALIGN (EMRPOLYPOLYGON, 4) - TEST_FIELD_SIZE (EMRPOLYPOLYGON, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYPOLYGON, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYGON, emr, 0) - TEST_FIELD_SIZE (EMRPOLYPOLYGON, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYPOLYGON, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYGON, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYPOLYGON, nPolys, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYGON, nPolys, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYGON, nPolys, 24) - TEST_FIELD_SIZE (EMRPOLYPOLYGON, cptl, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYGON, cptl, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYGON, cptl, 28) - TEST_FIELD_SIZE (EMRPOLYPOLYGON, aPolyCounts, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYGON, aPolyCounts, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYGON, aPolyCounts, 32) - TEST_FIELD_SIZE (EMRPOLYPOLYGON, aptl, 8) - TEST_FIELD_ALIGN (EMRPOLYPOLYGON, aptl, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYGON, aptl, 36) -} - -static void test_pack_EMRPOLYPOLYGON16(void) -{ - /* EMRPOLYPOLYGON16 */ - TEST_TYPE_SIZE (EMRPOLYPOLYGON16, 40) - TEST_TYPE_ALIGN (EMRPOLYPOLYGON16, 4) - TEST_FIELD_SIZE (EMRPOLYPOLYGON16, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYPOLYGON16, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYGON16, emr, 0) - TEST_FIELD_SIZE (EMRPOLYPOLYGON16, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYPOLYGON16, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYGON16, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYPOLYGON16, nPolys, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYGON16, nPolys, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYGON16, nPolys, 24) - TEST_FIELD_SIZE (EMRPOLYPOLYGON16, cpts, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYGON16, cpts, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYGON16, cpts, 28) - TEST_FIELD_SIZE (EMRPOLYPOLYGON16, aPolyCounts, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYGON16, aPolyCounts, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYGON16, aPolyCounts, 32) - TEST_FIELD_SIZE (EMRPOLYPOLYGON16, apts, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYGON16, apts, 2) - TEST_FIELD_OFFSET(EMRPOLYPOLYGON16, apts, 36) -} - -static void test_pack_EMRPOLYPOLYLINE(void) -{ - /* EMRPOLYPOLYLINE */ - TEST_TYPE_SIZE (EMRPOLYPOLYLINE, 44) - TEST_TYPE_ALIGN (EMRPOLYPOLYLINE, 4) - TEST_FIELD_SIZE (EMRPOLYPOLYLINE, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYPOLYLINE, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYLINE, emr, 0) - TEST_FIELD_SIZE (EMRPOLYPOLYLINE, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYPOLYLINE, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYLINE, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYPOLYLINE, nPolys, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYLINE, nPolys, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYLINE, nPolys, 24) - TEST_FIELD_SIZE (EMRPOLYPOLYLINE, cptl, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYLINE, cptl, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYLINE, cptl, 28) - TEST_FIELD_SIZE (EMRPOLYPOLYLINE, aPolyCounts, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYLINE, aPolyCounts, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYLINE, aPolyCounts, 32) - TEST_FIELD_SIZE (EMRPOLYPOLYLINE, aptl, 8) - TEST_FIELD_ALIGN (EMRPOLYPOLYLINE, aptl, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYLINE, aptl, 36) -} - -static void test_pack_EMRPOLYPOLYLINE16(void) -{ - /* EMRPOLYPOLYLINE16 */ - TEST_TYPE_SIZE (EMRPOLYPOLYLINE16, 40) - TEST_TYPE_ALIGN (EMRPOLYPOLYLINE16, 4) - TEST_FIELD_SIZE (EMRPOLYPOLYLINE16, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYPOLYLINE16, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYLINE16, emr, 0) - TEST_FIELD_SIZE (EMRPOLYPOLYLINE16, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYPOLYLINE16, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYLINE16, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYPOLYLINE16, nPolys, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYLINE16, nPolys, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYLINE16, nPolys, 24) - TEST_FIELD_SIZE (EMRPOLYPOLYLINE16, cpts, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYLINE16, cpts, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYLINE16, cpts, 28) - TEST_FIELD_SIZE (EMRPOLYPOLYLINE16, aPolyCounts, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYLINE16, aPolyCounts, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYLINE16, aPolyCounts, 32) - TEST_FIELD_SIZE (EMRPOLYPOLYLINE16, apts, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYLINE16, apts, 2) - TEST_FIELD_OFFSET(EMRPOLYPOLYLINE16, apts, 36) -} - -static void test_pack_EMRPOLYTEXTOUTA(void) -{ - /* EMRPOLYTEXTOUTA */ - TEST_TYPE_SIZE (EMRPOLYTEXTOUTA, 80) - TEST_TYPE_ALIGN (EMRPOLYTEXTOUTA, 4) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTA, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTA, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTA, emr, 0) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTA, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTA, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTA, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTA, iGraphicsMode, 4) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTA, iGraphicsMode, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTA, iGraphicsMode, 24) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTA, exScale, 4) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTA, exScale, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTA, exScale, 28) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTA, eyScale, 4) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTA, eyScale, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTA, eyScale, 32) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTA, cStrings, 4) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTA, cStrings, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTA, cStrings, 36) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTA, aemrtext, 40) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTA, aemrtext, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTA, aemrtext, 40) -} - -static void test_pack_EMRPOLYTEXTOUTW(void) -{ - /* EMRPOLYTEXTOUTW */ - TEST_TYPE_SIZE (EMRPOLYTEXTOUTW, 80) - TEST_TYPE_ALIGN (EMRPOLYTEXTOUTW, 4) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTW, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTW, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTW, emr, 0) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTW, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTW, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTW, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTW, iGraphicsMode, 4) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTW, iGraphicsMode, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTW, iGraphicsMode, 24) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTW, exScale, 4) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTW, exScale, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTW, exScale, 28) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTW, eyScale, 4) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTW, eyScale, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTW, eyScale, 32) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTW, cStrings, 4) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTW, cStrings, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTW, cStrings, 36) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTW, aemrtext, 40) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTW, aemrtext, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTW, aemrtext, 40) -} - -static void test_pack_EMRREALIZEPALETTE(void) -{ - /* EMRREALIZEPALETTE */ - TEST_TYPE_SIZE (EMRREALIZEPALETTE, 8) - TEST_TYPE_ALIGN (EMRREALIZEPALETTE, 4) - TEST_FIELD_SIZE (EMRREALIZEPALETTE, emr, 8) - TEST_FIELD_ALIGN (EMRREALIZEPALETTE, emr, 4) - TEST_FIELD_OFFSET(EMRREALIZEPALETTE, emr, 0) -} - -static void test_pack_EMRRECTANGLE(void) -{ - /* EMRRECTANGLE */ - TEST_TYPE_SIZE (EMRRECTANGLE, 24) - TEST_TYPE_ALIGN (EMRRECTANGLE, 4) - TEST_FIELD_SIZE (EMRRECTANGLE, emr, 8) - TEST_FIELD_ALIGN (EMRRECTANGLE, emr, 4) - TEST_FIELD_OFFSET(EMRRECTANGLE, emr, 0) - TEST_FIELD_SIZE (EMRRECTANGLE, rclBox, 16) - TEST_FIELD_ALIGN (EMRRECTANGLE, rclBox, 4) - TEST_FIELD_OFFSET(EMRRECTANGLE, rclBox, 8) -} - -static void test_pack_EMRRESIZEPALETTE(void) -{ - /* EMRRESIZEPALETTE */ - TEST_TYPE_SIZE (EMRRESIZEPALETTE, 16) - TEST_TYPE_ALIGN (EMRRESIZEPALETTE, 4) - TEST_FIELD_SIZE (EMRRESIZEPALETTE, emr, 8) - TEST_FIELD_ALIGN (EMRRESIZEPALETTE, emr, 4) - TEST_FIELD_OFFSET(EMRRESIZEPALETTE, emr, 0) - TEST_FIELD_SIZE (EMRRESIZEPALETTE, ihPal, 4) - TEST_FIELD_ALIGN (EMRRESIZEPALETTE, ihPal, 4) - TEST_FIELD_OFFSET(EMRRESIZEPALETTE, ihPal, 8) - TEST_FIELD_SIZE (EMRRESIZEPALETTE, cEntries, 4) - TEST_FIELD_ALIGN (EMRRESIZEPALETTE, cEntries, 4) - TEST_FIELD_OFFSET(EMRRESIZEPALETTE, cEntries, 12) -} - -static void test_pack_EMRRESTOREDC(void) -{ - /* EMRRESTOREDC */ - TEST_TYPE_SIZE (EMRRESTOREDC, 12) - TEST_TYPE_ALIGN (EMRRESTOREDC, 4) - TEST_FIELD_SIZE (EMRRESTOREDC, emr, 8) - TEST_FIELD_ALIGN (EMRRESTOREDC, emr, 4) - TEST_FIELD_OFFSET(EMRRESTOREDC, emr, 0) - TEST_FIELD_SIZE (EMRRESTOREDC, iRelative, 4) - TEST_FIELD_ALIGN (EMRRESTOREDC, iRelative, 4) - TEST_FIELD_OFFSET(EMRRESTOREDC, iRelative, 8) -} - -static void test_pack_EMRROUNDRECT(void) -{ - /* EMRROUNDRECT */ - TEST_TYPE_SIZE (EMRROUNDRECT, 32) - TEST_TYPE_ALIGN (EMRROUNDRECT, 4) - TEST_FIELD_SIZE (EMRROUNDRECT, emr, 8) - TEST_FIELD_ALIGN (EMRROUNDRECT, emr, 4) - TEST_FIELD_OFFSET(EMRROUNDRECT, emr, 0) - TEST_FIELD_SIZE (EMRROUNDRECT, rclBox, 16) - TEST_FIELD_ALIGN (EMRROUNDRECT, rclBox, 4) - TEST_FIELD_OFFSET(EMRROUNDRECT, rclBox, 8) - TEST_FIELD_SIZE (EMRROUNDRECT, szlCorner, 8) - TEST_FIELD_ALIGN (EMRROUNDRECT, szlCorner, 4) - TEST_FIELD_OFFSET(EMRROUNDRECT, szlCorner, 24) -} - -static void test_pack_EMRSAVEDC(void) -{ - /* EMRSAVEDC */ - TEST_TYPE_SIZE (EMRSAVEDC, 8) - TEST_TYPE_ALIGN (EMRSAVEDC, 4) - TEST_FIELD_SIZE (EMRSAVEDC, emr, 8) - TEST_FIELD_ALIGN (EMRSAVEDC, emr, 4) - TEST_FIELD_OFFSET(EMRSAVEDC, emr, 0) -} - -static void test_pack_EMRSCALEVIEWPORTEXTEX(void) -{ - /* EMRSCALEVIEWPORTEXTEX */ - TEST_TYPE_SIZE (EMRSCALEVIEWPORTEXTEX, 24) - TEST_TYPE_ALIGN (EMRSCALEVIEWPORTEXTEX, 4) - TEST_FIELD_SIZE (EMRSCALEVIEWPORTEXTEX, emr, 8) - TEST_FIELD_ALIGN (EMRSCALEVIEWPORTEXTEX, emr, 4) - TEST_FIELD_OFFSET(EMRSCALEVIEWPORTEXTEX, emr, 0) - TEST_FIELD_SIZE (EMRSCALEVIEWPORTEXTEX, xNum, 4) - TEST_FIELD_ALIGN (EMRSCALEVIEWPORTEXTEX, xNum, 4) - TEST_FIELD_OFFSET(EMRSCALEVIEWPORTEXTEX, xNum, 8) - TEST_FIELD_SIZE (EMRSCALEVIEWPORTEXTEX, xDenom, 4) - TEST_FIELD_ALIGN (EMRSCALEVIEWPORTEXTEX, xDenom, 4) - TEST_FIELD_OFFSET(EMRSCALEVIEWPORTEXTEX, xDenom, 12) - TEST_FIELD_SIZE (EMRSCALEVIEWPORTEXTEX, yNum, 4) - TEST_FIELD_ALIGN (EMRSCALEVIEWPORTEXTEX, yNum, 4) - TEST_FIELD_OFFSET(EMRSCALEVIEWPORTEXTEX, yNum, 16) - TEST_FIELD_SIZE (EMRSCALEVIEWPORTEXTEX, yDenom, 4) - TEST_FIELD_ALIGN (EMRSCALEVIEWPORTEXTEX, yDenom, 4) - TEST_FIELD_OFFSET(EMRSCALEVIEWPORTEXTEX, yDenom, 20) -} - -static void test_pack_EMRSCALEWINDOWEXTEX(void) -{ - /* EMRSCALEWINDOWEXTEX */ - TEST_TYPE_SIZE (EMRSCALEWINDOWEXTEX, 24) - TEST_TYPE_ALIGN (EMRSCALEWINDOWEXTEX, 4) - TEST_FIELD_SIZE (EMRSCALEWINDOWEXTEX, emr, 8) - TEST_FIELD_ALIGN (EMRSCALEWINDOWEXTEX, emr, 4) - TEST_FIELD_OFFSET(EMRSCALEWINDOWEXTEX, emr, 0) - TEST_FIELD_SIZE (EMRSCALEWINDOWEXTEX, xNum, 4) - TEST_FIELD_ALIGN (EMRSCALEWINDOWEXTEX, xNum, 4) - TEST_FIELD_OFFSET(EMRSCALEWINDOWEXTEX, xNum, 8) - TEST_FIELD_SIZE (EMRSCALEWINDOWEXTEX, xDenom, 4) - TEST_FIELD_ALIGN (EMRSCALEWINDOWEXTEX, xDenom, 4) - TEST_FIELD_OFFSET(EMRSCALEWINDOWEXTEX, xDenom, 12) - TEST_FIELD_SIZE (EMRSCALEWINDOWEXTEX, yNum, 4) - TEST_FIELD_ALIGN (EMRSCALEWINDOWEXTEX, yNum, 4) - TEST_FIELD_OFFSET(EMRSCALEWINDOWEXTEX, yNum, 16) - TEST_FIELD_SIZE (EMRSCALEWINDOWEXTEX, yDenom, 4) - TEST_FIELD_ALIGN (EMRSCALEWINDOWEXTEX, yDenom, 4) - TEST_FIELD_OFFSET(EMRSCALEWINDOWEXTEX, yDenom, 20) -} - -static void test_pack_EMRSELECTCLIPPATH(void) -{ - /* EMRSELECTCLIPPATH */ - TEST_TYPE_SIZE (EMRSELECTCLIPPATH, 12) - TEST_TYPE_ALIGN (EMRSELECTCLIPPATH, 4) - TEST_FIELD_SIZE (EMRSELECTCLIPPATH, emr, 8) - TEST_FIELD_ALIGN (EMRSELECTCLIPPATH, emr, 4) - TEST_FIELD_OFFSET(EMRSELECTCLIPPATH, emr, 0) - TEST_FIELD_SIZE (EMRSELECTCLIPPATH, iMode, 4) - TEST_FIELD_ALIGN (EMRSELECTCLIPPATH, iMode, 4) - TEST_FIELD_OFFSET(EMRSELECTCLIPPATH, iMode, 8) -} - -static void test_pack_EMRSELECTCOLORSPACE(void) -{ - /* EMRSELECTCOLORSPACE */ - TEST_TYPE_SIZE (EMRSELECTCOLORSPACE, 12) - TEST_TYPE_ALIGN (EMRSELECTCOLORSPACE, 4) - TEST_FIELD_SIZE (EMRSELECTCOLORSPACE, emr, 8) - TEST_FIELD_ALIGN (EMRSELECTCOLORSPACE, emr, 4) - TEST_FIELD_OFFSET(EMRSELECTCOLORSPACE, emr, 0) - TEST_FIELD_SIZE (EMRSELECTCOLORSPACE, ihCS, 4) - TEST_FIELD_ALIGN (EMRSELECTCOLORSPACE, ihCS, 4) - TEST_FIELD_OFFSET(EMRSELECTCOLORSPACE, ihCS, 8) -} - -static void test_pack_EMRSELECTOBJECT(void) -{ - /* EMRSELECTOBJECT */ - TEST_TYPE_SIZE (EMRSELECTOBJECT, 12) - TEST_TYPE_ALIGN (EMRSELECTOBJECT, 4) - TEST_FIELD_SIZE (EMRSELECTOBJECT, emr, 8) - TEST_FIELD_ALIGN (EMRSELECTOBJECT, emr, 4) - TEST_FIELD_OFFSET(EMRSELECTOBJECT, emr, 0) - TEST_FIELD_SIZE (EMRSELECTOBJECT, ihObject, 4) - TEST_FIELD_ALIGN (EMRSELECTOBJECT, ihObject, 4) - TEST_FIELD_OFFSET(EMRSELECTOBJECT, ihObject, 8) -} - -static void test_pack_EMRSELECTPALETTE(void) -{ - /* EMRSELECTPALETTE */ - TEST_TYPE_SIZE (EMRSELECTPALETTE, 12) - TEST_TYPE_ALIGN (EMRSELECTPALETTE, 4) - TEST_FIELD_SIZE (EMRSELECTPALETTE, emr, 8) - TEST_FIELD_ALIGN (EMRSELECTPALETTE, emr, 4) - TEST_FIELD_OFFSET(EMRSELECTPALETTE, emr, 0) - TEST_FIELD_SIZE (EMRSELECTPALETTE, ihPal, 4) - TEST_FIELD_ALIGN (EMRSELECTPALETTE, ihPal, 4) - TEST_FIELD_OFFSET(EMRSELECTPALETTE, ihPal, 8) -} - -static void test_pack_EMRSETARCDIRECTION(void) -{ - /* EMRSETARCDIRECTION */ - TEST_TYPE_SIZE (EMRSETARCDIRECTION, 12) - TEST_TYPE_ALIGN (EMRSETARCDIRECTION, 4) - TEST_FIELD_SIZE (EMRSETARCDIRECTION, emr, 8) - TEST_FIELD_ALIGN (EMRSETARCDIRECTION, emr, 4) - TEST_FIELD_OFFSET(EMRSETARCDIRECTION, emr, 0) - TEST_FIELD_SIZE (EMRSETARCDIRECTION, iArcDirection, 4) - TEST_FIELD_ALIGN (EMRSETARCDIRECTION, iArcDirection, 4) - TEST_FIELD_OFFSET(EMRSETARCDIRECTION, iArcDirection, 8) -} - -static void test_pack_EMRSETBKCOLOR(void) -{ - /* EMRSETBKCOLOR */ - TEST_TYPE_SIZE (EMRSETBKCOLOR, 12) - TEST_TYPE_ALIGN (EMRSETBKCOLOR, 4) - TEST_FIELD_SIZE (EMRSETBKCOLOR, emr, 8) - TEST_FIELD_ALIGN (EMRSETBKCOLOR, emr, 4) - TEST_FIELD_OFFSET(EMRSETBKCOLOR, emr, 0) - TEST_FIELD_SIZE (EMRSETBKCOLOR, crColor, 4) - TEST_FIELD_ALIGN (EMRSETBKCOLOR, crColor, 4) - TEST_FIELD_OFFSET(EMRSETBKCOLOR, crColor, 8) -} - -static void test_pack_EMRSETBKMODE(void) -{ - /* EMRSETBKMODE */ - TEST_TYPE_SIZE (EMRSETBKMODE, 12) - TEST_TYPE_ALIGN (EMRSETBKMODE, 4) - TEST_FIELD_SIZE (EMRSETBKMODE, emr, 8) - TEST_FIELD_ALIGN (EMRSETBKMODE, emr, 4) - TEST_FIELD_OFFSET(EMRSETBKMODE, emr, 0) - TEST_FIELD_SIZE (EMRSETBKMODE, iMode, 4) - TEST_FIELD_ALIGN (EMRSETBKMODE, iMode, 4) - TEST_FIELD_OFFSET(EMRSETBKMODE, iMode, 8) -} - -static void test_pack_EMRSETBRUSHORGEX(void) -{ - /* EMRSETBRUSHORGEX */ - TEST_TYPE_SIZE (EMRSETBRUSHORGEX, 16) - TEST_TYPE_ALIGN (EMRSETBRUSHORGEX, 4) - TEST_FIELD_SIZE (EMRSETBRUSHORGEX, emr, 8) - TEST_FIELD_ALIGN (EMRSETBRUSHORGEX, emr, 4) - TEST_FIELD_OFFSET(EMRSETBRUSHORGEX, emr, 0) - TEST_FIELD_SIZE (EMRSETBRUSHORGEX, ptlOrigin, 8) - TEST_FIELD_ALIGN (EMRSETBRUSHORGEX, ptlOrigin, 4) - TEST_FIELD_OFFSET(EMRSETBRUSHORGEX, ptlOrigin, 8) -} - -static void test_pack_EMRSETCOLORADJUSTMENT(void) -{ - /* EMRSETCOLORADJUSTMENT */ - TEST_TYPE_SIZE (EMRSETCOLORADJUSTMENT, 32) - TEST_TYPE_ALIGN (EMRSETCOLORADJUSTMENT, 4) - TEST_FIELD_SIZE (EMRSETCOLORADJUSTMENT, emr, 8) - TEST_FIELD_ALIGN (EMRSETCOLORADJUSTMENT, emr, 4) - TEST_FIELD_OFFSET(EMRSETCOLORADJUSTMENT, emr, 0) - TEST_FIELD_SIZE (EMRSETCOLORADJUSTMENT, ColorAdjustment, 24) - TEST_FIELD_ALIGN (EMRSETCOLORADJUSTMENT, ColorAdjustment, 2) - TEST_FIELD_OFFSET(EMRSETCOLORADJUSTMENT, ColorAdjustment, 8) -} - -static void test_pack_EMRSETCOLORSPACE(void) -{ - /* EMRSETCOLORSPACE */ - TEST_TYPE_SIZE (EMRSETCOLORSPACE, 12) - TEST_TYPE_ALIGN (EMRSETCOLORSPACE, 4) - TEST_FIELD_SIZE (EMRSETCOLORSPACE, emr, 8) - TEST_FIELD_ALIGN (EMRSETCOLORSPACE, emr, 4) - TEST_FIELD_OFFSET(EMRSETCOLORSPACE, emr, 0) - TEST_FIELD_SIZE (EMRSETCOLORSPACE, ihCS, 4) - TEST_FIELD_ALIGN (EMRSETCOLORSPACE, ihCS, 4) - TEST_FIELD_OFFSET(EMRSETCOLORSPACE, ihCS, 8) -} - -static void test_pack_EMRSETDIBITSTODEVICE(void) -{ - /* EMRSETDIBITSTODEVICE */ - TEST_TYPE_SIZE (EMRSETDIBITSTODEVICE, 76) - TEST_TYPE_ALIGN (EMRSETDIBITSTODEVICE, 4) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, emr, 8) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, emr, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, emr, 0) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, rclBounds, 16) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, rclBounds, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, rclBounds, 8) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, xDest, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, xDest, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, xDest, 24) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, yDest, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, yDest, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, yDest, 28) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, xSrc, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, xSrc, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, xSrc, 32) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, ySrc, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, ySrc, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, ySrc, 36) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, cxSrc, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, cxSrc, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, cxSrc, 40) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, cySrc, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, cySrc, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, cySrc, 44) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, offBmiSrc, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, offBmiSrc, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, offBmiSrc, 48) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, cbBmiSrc, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, cbBmiSrc, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, cbBmiSrc, 52) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, offBitsSrc, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, offBitsSrc, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, offBitsSrc, 56) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, cbBitsSrc, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, cbBitsSrc, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, cbBitsSrc, 60) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, iUsageSrc, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, iUsageSrc, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, iUsageSrc, 64) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, iStartScan, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, iStartScan, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, iStartScan, 68) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, cScans, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, cScans, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, cScans, 72) -} - -static void test_pack_EMRSETICMMODE(void) -{ - /* EMRSETICMMODE */ - TEST_TYPE_SIZE (EMRSETICMMODE, 12) - TEST_TYPE_ALIGN (EMRSETICMMODE, 4) - TEST_FIELD_SIZE (EMRSETICMMODE, emr, 8) - TEST_FIELD_ALIGN (EMRSETICMMODE, emr, 4) - TEST_FIELD_OFFSET(EMRSETICMMODE, emr, 0) - TEST_FIELD_SIZE (EMRSETICMMODE, iMode, 4) - TEST_FIELD_ALIGN (EMRSETICMMODE, iMode, 4) - TEST_FIELD_OFFSET(EMRSETICMMODE, iMode, 8) -} - -static void test_pack_EMRSETLAYOUT(void) -{ - /* EMRSETLAYOUT */ - TEST_TYPE_SIZE (EMRSETLAYOUT, 12) - TEST_TYPE_ALIGN (EMRSETLAYOUT, 4) - TEST_FIELD_SIZE (EMRSETLAYOUT, emr, 8) - TEST_FIELD_ALIGN (EMRSETLAYOUT, emr, 4) - TEST_FIELD_OFFSET(EMRSETLAYOUT, emr, 0) - TEST_FIELD_SIZE (EMRSETLAYOUT, iMode, 4) - TEST_FIELD_ALIGN (EMRSETLAYOUT, iMode, 4) - TEST_FIELD_OFFSET(EMRSETLAYOUT, iMode, 8) -} - -static void test_pack_EMRSETMAPMODE(void) -{ - /* EMRSETMAPMODE */ - TEST_TYPE_SIZE (EMRSETMAPMODE, 12) - TEST_TYPE_ALIGN (EMRSETMAPMODE, 4) - TEST_FIELD_SIZE (EMRSETMAPMODE, emr, 8) - TEST_FIELD_ALIGN (EMRSETMAPMODE, emr, 4) - TEST_FIELD_OFFSET(EMRSETMAPMODE, emr, 0) - TEST_FIELD_SIZE (EMRSETMAPMODE, iMode, 4) - TEST_FIELD_ALIGN (EMRSETMAPMODE, iMode, 4) - TEST_FIELD_OFFSET(EMRSETMAPMODE, iMode, 8) -} - -static void test_pack_EMRSETMAPPERFLAGS(void) -{ - /* EMRSETMAPPERFLAGS */ - TEST_TYPE_SIZE (EMRSETMAPPERFLAGS, 12) - TEST_TYPE_ALIGN (EMRSETMAPPERFLAGS, 4) - TEST_FIELD_SIZE (EMRSETMAPPERFLAGS, emr, 8) - TEST_FIELD_ALIGN (EMRSETMAPPERFLAGS, emr, 4) - TEST_FIELD_OFFSET(EMRSETMAPPERFLAGS, emr, 0) - TEST_FIELD_SIZE (EMRSETMAPPERFLAGS, dwFlags, 4) - TEST_FIELD_ALIGN (EMRSETMAPPERFLAGS, dwFlags, 4) - TEST_FIELD_OFFSET(EMRSETMAPPERFLAGS, dwFlags, 8) -} - -static void test_pack_EMRSETMETARGN(void) -{ - /* EMRSETMETARGN */ - TEST_TYPE_SIZE (EMRSETMETARGN, 8) - TEST_TYPE_ALIGN (EMRSETMETARGN, 4) - TEST_FIELD_SIZE (EMRSETMETARGN, emr, 8) - TEST_FIELD_ALIGN (EMRSETMETARGN, emr, 4) - TEST_FIELD_OFFSET(EMRSETMETARGN, emr, 0) -} - -static void test_pack_EMRSETMITERLIMIT(void) -{ - /* EMRSETMITERLIMIT */ - TEST_TYPE_SIZE (EMRSETMITERLIMIT, 12) - TEST_TYPE_ALIGN (EMRSETMITERLIMIT, 4) - TEST_FIELD_SIZE (EMRSETMITERLIMIT, emr, 8) - TEST_FIELD_ALIGN (EMRSETMITERLIMIT, emr, 4) - TEST_FIELD_OFFSET(EMRSETMITERLIMIT, emr, 0) - TEST_FIELD_SIZE (EMRSETMITERLIMIT, eMiterLimit, 4) - TEST_FIELD_ALIGN (EMRSETMITERLIMIT, eMiterLimit, 4) - TEST_FIELD_OFFSET(EMRSETMITERLIMIT, eMiterLimit, 8) -} - -static void test_pack_EMRSETPIXELV(void) -{ - /* EMRSETPIXELV */ - TEST_TYPE_SIZE (EMRSETPIXELV, 20) - TEST_TYPE_ALIGN (EMRSETPIXELV, 4) - TEST_FIELD_SIZE (EMRSETPIXELV, emr, 8) - TEST_FIELD_ALIGN (EMRSETPIXELV, emr, 4) - TEST_FIELD_OFFSET(EMRSETPIXELV, emr, 0) - TEST_FIELD_SIZE (EMRSETPIXELV, ptlPixel, 8) - TEST_FIELD_ALIGN (EMRSETPIXELV, ptlPixel, 4) - TEST_FIELD_OFFSET(EMRSETPIXELV, ptlPixel, 8) - TEST_FIELD_SIZE (EMRSETPIXELV, crColor, 4) - TEST_FIELD_ALIGN (EMRSETPIXELV, crColor, 4) - TEST_FIELD_OFFSET(EMRSETPIXELV, crColor, 16) -} - -static void test_pack_EMRSETPOLYFILLMODE(void) -{ - /* EMRSETPOLYFILLMODE */ - TEST_TYPE_SIZE (EMRSETPOLYFILLMODE, 12) - TEST_TYPE_ALIGN (EMRSETPOLYFILLMODE, 4) - TEST_FIELD_SIZE (EMRSETPOLYFILLMODE, emr, 8) - TEST_FIELD_ALIGN (EMRSETPOLYFILLMODE, emr, 4) - TEST_FIELD_OFFSET(EMRSETPOLYFILLMODE, emr, 0) - TEST_FIELD_SIZE (EMRSETPOLYFILLMODE, iMode, 4) - TEST_FIELD_ALIGN (EMRSETPOLYFILLMODE, iMode, 4) - TEST_FIELD_OFFSET(EMRSETPOLYFILLMODE, iMode, 8) -} - -static void test_pack_EMRSETROP2(void) -{ - /* EMRSETROP2 */ - TEST_TYPE_SIZE (EMRSETROP2, 12) - TEST_TYPE_ALIGN (EMRSETROP2, 4) - TEST_FIELD_SIZE (EMRSETROP2, emr, 8) - TEST_FIELD_ALIGN (EMRSETROP2, emr, 4) - TEST_FIELD_OFFSET(EMRSETROP2, emr, 0) - TEST_FIELD_SIZE (EMRSETROP2, iMode, 4) - TEST_FIELD_ALIGN (EMRSETROP2, iMode, 4) - TEST_FIELD_OFFSET(EMRSETROP2, iMode, 8) -} - -static void test_pack_EMRSETSTRETCHBLTMODE(void) -{ - /* EMRSETSTRETCHBLTMODE */ - TEST_TYPE_SIZE (EMRSETSTRETCHBLTMODE, 12) - TEST_TYPE_ALIGN (EMRSETSTRETCHBLTMODE, 4) - TEST_FIELD_SIZE (EMRSETSTRETCHBLTMODE, emr, 8) - TEST_FIELD_ALIGN (EMRSETSTRETCHBLTMODE, emr, 4) - TEST_FIELD_OFFSET(EMRSETSTRETCHBLTMODE, emr, 0) - TEST_FIELD_SIZE (EMRSETSTRETCHBLTMODE, iMode, 4) - TEST_FIELD_ALIGN (EMRSETSTRETCHBLTMODE, iMode, 4) - TEST_FIELD_OFFSET(EMRSETSTRETCHBLTMODE, iMode, 8) -} - -static void test_pack_EMRSETTEXTALIGN(void) -{ - /* EMRSETTEXTALIGN */ - TEST_TYPE_SIZE (EMRSETTEXTALIGN, 12) - TEST_TYPE_ALIGN (EMRSETTEXTALIGN, 4) - TEST_FIELD_SIZE (EMRSETTEXTALIGN, emr, 8) - TEST_FIELD_ALIGN (EMRSETTEXTALIGN, emr, 4) - TEST_FIELD_OFFSET(EMRSETTEXTALIGN, emr, 0) - TEST_FIELD_SIZE (EMRSETTEXTALIGN, iMode, 4) - TEST_FIELD_ALIGN (EMRSETTEXTALIGN, iMode, 4) - TEST_FIELD_OFFSET(EMRSETTEXTALIGN, iMode, 8) -} - -static void test_pack_EMRSETTEXTCOLOR(void) -{ - /* EMRSETTEXTCOLOR */ - TEST_TYPE_SIZE (EMRSETTEXTCOLOR, 12) - TEST_TYPE_ALIGN (EMRSETTEXTCOLOR, 4) - TEST_FIELD_SIZE (EMRSETTEXTCOLOR, emr, 8) - TEST_FIELD_ALIGN (EMRSETTEXTCOLOR, emr, 4) - TEST_FIELD_OFFSET(EMRSETTEXTCOLOR, emr, 0) - TEST_FIELD_SIZE (EMRSETTEXTCOLOR, crColor, 4) - TEST_FIELD_ALIGN (EMRSETTEXTCOLOR, crColor, 4) - TEST_FIELD_OFFSET(EMRSETTEXTCOLOR, crColor, 8) -} - -static void test_pack_EMRSETVIEWPORTEXTEX(void) -{ - /* EMRSETVIEWPORTEXTEX */ - TEST_TYPE_SIZE (EMRSETVIEWPORTEXTEX, 16) - TEST_TYPE_ALIGN (EMRSETVIEWPORTEXTEX, 4) - TEST_FIELD_SIZE (EMRSETVIEWPORTEXTEX, emr, 8) - TEST_FIELD_ALIGN (EMRSETVIEWPORTEXTEX, emr, 4) - TEST_FIELD_OFFSET(EMRSETVIEWPORTEXTEX, emr, 0) - TEST_FIELD_SIZE (EMRSETVIEWPORTEXTEX, szlExtent, 8) - TEST_FIELD_ALIGN (EMRSETVIEWPORTEXTEX, szlExtent, 4) - TEST_FIELD_OFFSET(EMRSETVIEWPORTEXTEX, szlExtent, 8) -} - -static void test_pack_EMRSETVIEWPORTORGEX(void) -{ - /* EMRSETVIEWPORTORGEX */ - TEST_TYPE_SIZE (EMRSETVIEWPORTORGEX, 16) - TEST_TYPE_ALIGN (EMRSETVIEWPORTORGEX, 4) - TEST_FIELD_SIZE (EMRSETVIEWPORTORGEX, emr, 8) - TEST_FIELD_ALIGN (EMRSETVIEWPORTORGEX, emr, 4) - TEST_FIELD_OFFSET(EMRSETVIEWPORTORGEX, emr, 0) - TEST_FIELD_SIZE (EMRSETVIEWPORTORGEX, ptlOrigin, 8) - TEST_FIELD_ALIGN (EMRSETVIEWPORTORGEX, ptlOrigin, 4) - TEST_FIELD_OFFSET(EMRSETVIEWPORTORGEX, ptlOrigin, 8) -} - -static void test_pack_EMRSETWINDOWEXTEX(void) -{ - /* EMRSETWINDOWEXTEX */ - TEST_TYPE_SIZE (EMRSETWINDOWEXTEX, 16) - TEST_TYPE_ALIGN (EMRSETWINDOWEXTEX, 4) - TEST_FIELD_SIZE (EMRSETWINDOWEXTEX, emr, 8) - TEST_FIELD_ALIGN (EMRSETWINDOWEXTEX, emr, 4) - TEST_FIELD_OFFSET(EMRSETWINDOWEXTEX, emr, 0) - TEST_FIELD_SIZE (EMRSETWINDOWEXTEX, szlExtent, 8) - TEST_FIELD_ALIGN (EMRSETWINDOWEXTEX, szlExtent, 4) - TEST_FIELD_OFFSET(EMRSETWINDOWEXTEX, szlExtent, 8) -} - -static void test_pack_EMRSETWINDOWORGEX(void) -{ - /* EMRSETWINDOWORGEX */ - TEST_TYPE_SIZE (EMRSETWINDOWORGEX, 16) - TEST_TYPE_ALIGN (EMRSETWINDOWORGEX, 4) - TEST_FIELD_SIZE (EMRSETWINDOWORGEX, emr, 8) - TEST_FIELD_ALIGN (EMRSETWINDOWORGEX, emr, 4) - TEST_FIELD_OFFSET(EMRSETWINDOWORGEX, emr, 0) - TEST_FIELD_SIZE (EMRSETWINDOWORGEX, ptlOrigin, 8) - TEST_FIELD_ALIGN (EMRSETWINDOWORGEX, ptlOrigin, 4) - TEST_FIELD_OFFSET(EMRSETWINDOWORGEX, ptlOrigin, 8) -} - -static void test_pack_EMRSETWORLDTRANSFORM(void) -{ - /* EMRSETWORLDTRANSFORM */ - TEST_TYPE_SIZE (EMRSETWORLDTRANSFORM, 32) - TEST_TYPE_ALIGN (EMRSETWORLDTRANSFORM, 4) - TEST_FIELD_SIZE (EMRSETWORLDTRANSFORM, emr, 8) - TEST_FIELD_ALIGN (EMRSETWORLDTRANSFORM, emr, 4) - TEST_FIELD_OFFSET(EMRSETWORLDTRANSFORM, emr, 0) - TEST_FIELD_SIZE (EMRSETWORLDTRANSFORM, xform, 24) - TEST_FIELD_ALIGN (EMRSETWORLDTRANSFORM, xform, 4) - TEST_FIELD_OFFSET(EMRSETWORLDTRANSFORM, xform, 8) -} - -static void test_pack_EMRSTRETCHBLT(void) -{ - /* EMRSTRETCHBLT */ - TEST_TYPE_SIZE (EMRSTRETCHBLT, 108) - TEST_TYPE_ALIGN (EMRSTRETCHBLT, 4) - TEST_FIELD_SIZE (EMRSTRETCHBLT, emr, 8) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, emr, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, emr, 0) - TEST_FIELD_SIZE (EMRSTRETCHBLT, rclBounds, 16) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, rclBounds, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, rclBounds, 8) - TEST_FIELD_SIZE (EMRSTRETCHBLT, xDest, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, xDest, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, xDest, 24) - TEST_FIELD_SIZE (EMRSTRETCHBLT, yDest, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, yDest, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, yDest, 28) - TEST_FIELD_SIZE (EMRSTRETCHBLT, cxDest, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, cxDest, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, cxDest, 32) - TEST_FIELD_SIZE (EMRSTRETCHBLT, cyDest, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, cyDest, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, cyDest, 36) - TEST_FIELD_SIZE (EMRSTRETCHBLT, dwRop, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, dwRop, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, dwRop, 40) - TEST_FIELD_SIZE (EMRSTRETCHBLT, xSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, xSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, xSrc, 44) - TEST_FIELD_SIZE (EMRSTRETCHBLT, ySrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, ySrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, ySrc, 48) - TEST_FIELD_SIZE (EMRSTRETCHBLT, xformSrc, 24) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, xformSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, xformSrc, 52) - TEST_FIELD_SIZE (EMRSTRETCHBLT, crBkColorSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, crBkColorSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, crBkColorSrc, 76) - TEST_FIELD_SIZE (EMRSTRETCHBLT, iUsageSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, iUsageSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, iUsageSrc, 80) - TEST_FIELD_SIZE (EMRSTRETCHBLT, offBmiSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, offBmiSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, offBmiSrc, 84) - TEST_FIELD_SIZE (EMRSTRETCHBLT, cbBmiSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, cbBmiSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, cbBmiSrc, 88) - TEST_FIELD_SIZE (EMRSTRETCHBLT, offBitsSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, offBitsSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, offBitsSrc, 92) - TEST_FIELD_SIZE (EMRSTRETCHBLT, cbBitsSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, cbBitsSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, cbBitsSrc, 96) - TEST_FIELD_SIZE (EMRSTRETCHBLT, cxSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, cxSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, cxSrc, 100) - TEST_FIELD_SIZE (EMRSTRETCHBLT, cySrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, cySrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, cySrc, 104) -} - -static void test_pack_EMRSTRETCHDIBITS(void) -{ - /* EMRSTRETCHDIBITS */ - TEST_TYPE_SIZE (EMRSTRETCHDIBITS, 80) - TEST_TYPE_ALIGN (EMRSTRETCHDIBITS, 4) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, emr, 8) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, emr, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, emr, 0) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, rclBounds, 16) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, rclBounds, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, rclBounds, 8) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, xDest, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, xDest, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, xDest, 24) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, yDest, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, yDest, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, yDest, 28) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, xSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, xSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, xSrc, 32) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, ySrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, ySrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, ySrc, 36) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, cxSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, cxSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, cxSrc, 40) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, cySrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, cySrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, cySrc, 44) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, offBmiSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, offBmiSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, offBmiSrc, 48) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, cbBmiSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, cbBmiSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, cbBmiSrc, 52) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, offBitsSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, offBitsSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, offBitsSrc, 56) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, cbBitsSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, cbBitsSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, cbBitsSrc, 60) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, iUsageSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, iUsageSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, iUsageSrc, 64) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, dwRop, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, dwRop, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, dwRop, 68) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, cxDest, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, cxDest, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, cxDest, 72) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, cyDest, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, cyDest, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, cyDest, 76) -} - -static void test_pack_EMRSTROKEANDFILLPATH(void) -{ - /* EMRSTROKEANDFILLPATH */ - TEST_TYPE_SIZE (EMRSTROKEANDFILLPATH, 24) - TEST_TYPE_ALIGN (EMRSTROKEANDFILLPATH, 4) - TEST_FIELD_SIZE (EMRSTROKEANDFILLPATH, emr, 8) - TEST_FIELD_ALIGN (EMRSTROKEANDFILLPATH, emr, 4) - TEST_FIELD_OFFSET(EMRSTROKEANDFILLPATH, emr, 0) - TEST_FIELD_SIZE (EMRSTROKEANDFILLPATH, rclBounds, 16) - TEST_FIELD_ALIGN (EMRSTROKEANDFILLPATH, rclBounds, 4) - TEST_FIELD_OFFSET(EMRSTROKEANDFILLPATH, rclBounds, 8) -} - -static void test_pack_EMRSTROKEPATH(void) -{ - /* EMRSTROKEPATH */ - TEST_TYPE_SIZE (EMRSTROKEPATH, 24) - TEST_TYPE_ALIGN (EMRSTROKEPATH, 4) - TEST_FIELD_SIZE (EMRSTROKEPATH, emr, 8) - TEST_FIELD_ALIGN (EMRSTROKEPATH, emr, 4) - TEST_FIELD_OFFSET(EMRSTROKEPATH, emr, 0) - TEST_FIELD_SIZE (EMRSTROKEPATH, rclBounds, 16) - TEST_FIELD_ALIGN (EMRSTROKEPATH, rclBounds, 4) - TEST_FIELD_OFFSET(EMRSTROKEPATH, rclBounds, 8) -} - -static void test_pack_EMRTEXT(void) -{ - /* EMRTEXT */ - TEST_TYPE_SIZE (EMRTEXT, 40) - TEST_TYPE_ALIGN (EMRTEXT, 4) - TEST_FIELD_SIZE (EMRTEXT, ptlReference, 8) - TEST_FIELD_ALIGN (EMRTEXT, ptlReference, 4) - TEST_FIELD_OFFSET(EMRTEXT, ptlReference, 0) - TEST_FIELD_SIZE (EMRTEXT, nChars, 4) - TEST_FIELD_ALIGN (EMRTEXT, nChars, 4) - TEST_FIELD_OFFSET(EMRTEXT, nChars, 8) - TEST_FIELD_SIZE (EMRTEXT, offString, 4) - TEST_FIELD_ALIGN (EMRTEXT, offString, 4) - TEST_FIELD_OFFSET(EMRTEXT, offString, 12) - TEST_FIELD_SIZE (EMRTEXT, fOptions, 4) - TEST_FIELD_ALIGN (EMRTEXT, fOptions, 4) - TEST_FIELD_OFFSET(EMRTEXT, fOptions, 16) - TEST_FIELD_SIZE (EMRTEXT, rcl, 16) - TEST_FIELD_ALIGN (EMRTEXT, rcl, 4) - TEST_FIELD_OFFSET(EMRTEXT, rcl, 20) - TEST_FIELD_SIZE (EMRTEXT, offDx, 4) - TEST_FIELD_ALIGN (EMRTEXT, offDx, 4) - TEST_FIELD_OFFSET(EMRTEXT, offDx, 36) -} - -static void test_pack_EMRWIDENPATH(void) -{ - /* EMRWIDENPATH */ - TEST_TYPE_SIZE (EMRWIDENPATH, 8) - TEST_TYPE_ALIGN (EMRWIDENPATH, 4) - TEST_FIELD_SIZE (EMRWIDENPATH, emr, 8) - TEST_FIELD_ALIGN (EMRWIDENPATH, emr, 4) - TEST_FIELD_OFFSET(EMRWIDENPATH, emr, 0) -} - -static void test_pack_ENHMETAHEADER(void) -{ - /* ENHMETAHEADER */ - TEST_TYPE_SIZE (ENHMETAHEADER, 108) - TEST_TYPE_ALIGN (ENHMETAHEADER, 4) - TEST_FIELD_SIZE (ENHMETAHEADER, iType, 4) - TEST_FIELD_ALIGN (ENHMETAHEADER, iType, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, iType, 0) - TEST_FIELD_SIZE (ENHMETAHEADER, nSize, 4) - TEST_FIELD_ALIGN (ENHMETAHEADER, nSize, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, nSize, 4) - TEST_FIELD_SIZE (ENHMETAHEADER, rclBounds, 16) - TEST_FIELD_ALIGN (ENHMETAHEADER, rclBounds, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, rclBounds, 8) - TEST_FIELD_SIZE (ENHMETAHEADER, rclFrame, 16) - TEST_FIELD_ALIGN (ENHMETAHEADER, rclFrame, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, rclFrame, 24) - TEST_FIELD_SIZE (ENHMETAHEADER, dSignature, 4) - TEST_FIELD_ALIGN (ENHMETAHEADER, dSignature, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, dSignature, 40) - TEST_FIELD_SIZE (ENHMETAHEADER, nVersion, 4) - TEST_FIELD_ALIGN (ENHMETAHEADER, nVersion, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, nVersion, 44) - TEST_FIELD_SIZE (ENHMETAHEADER, nBytes, 4) - TEST_FIELD_ALIGN (ENHMETAHEADER, nBytes, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, nBytes, 48) - TEST_FIELD_SIZE (ENHMETAHEADER, nRecords, 4) - TEST_FIELD_ALIGN (ENHMETAHEADER, nRecords, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, nRecords, 52) - TEST_FIELD_SIZE (ENHMETAHEADER, nHandles, 2) - TEST_FIELD_ALIGN (ENHMETAHEADER, nHandles, 2) - TEST_FIELD_OFFSET(ENHMETAHEADER, nHandles, 56) - TEST_FIELD_SIZE (ENHMETAHEADER, sReserved, 2) - TEST_FIELD_ALIGN (ENHMETAHEADER, sReserved, 2) - TEST_FIELD_OFFSET(ENHMETAHEADER, sReserved, 58) - TEST_FIELD_SIZE (ENHMETAHEADER, nDescription, 4) - TEST_FIELD_ALIGN (ENHMETAHEADER, nDescription, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, nDescription, 60) - TEST_FIELD_SIZE (ENHMETAHEADER, offDescription, 4) - TEST_FIELD_ALIGN (ENHMETAHEADER, offDescription, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, offDescription, 64) - TEST_FIELD_SIZE (ENHMETAHEADER, nPalEntries, 4) - TEST_FIELD_ALIGN (ENHMETAHEADER, nPalEntries, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, nPalEntries, 68) - TEST_FIELD_SIZE (ENHMETAHEADER, szlDevice, 8) - TEST_FIELD_ALIGN (ENHMETAHEADER, szlDevice, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, szlDevice, 72) - TEST_FIELD_SIZE (ENHMETAHEADER, szlMillimeters, 8) - TEST_FIELD_ALIGN (ENHMETAHEADER, szlMillimeters, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, szlMillimeters, 80) - TEST_FIELD_SIZE (ENHMETAHEADER, cbPixelFormat, 4) - TEST_FIELD_ALIGN (ENHMETAHEADER, cbPixelFormat, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, cbPixelFormat, 88) - TEST_FIELD_SIZE (ENHMETAHEADER, offPixelFormat, 4) - TEST_FIELD_ALIGN (ENHMETAHEADER, offPixelFormat, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, offPixelFormat, 92) - TEST_FIELD_SIZE (ENHMETAHEADER, bOpenGL, 4) - TEST_FIELD_ALIGN (ENHMETAHEADER, bOpenGL, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, bOpenGL, 96) - TEST_FIELD_SIZE (ENHMETAHEADER, szlMicrometers, 8) - TEST_FIELD_ALIGN (ENHMETAHEADER, szlMicrometers, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, szlMicrometers, 100) -} - -static void test_pack_ENHMETARECORD(void) -{ - /* ENHMETARECORD */ - TEST_TYPE_SIZE (ENHMETARECORD, 12) - TEST_TYPE_ALIGN (ENHMETARECORD, 4) - TEST_FIELD_SIZE (ENHMETARECORD, iType, 4) - TEST_FIELD_ALIGN (ENHMETARECORD, iType, 4) - TEST_FIELD_OFFSET(ENHMETARECORD, iType, 0) - TEST_FIELD_SIZE (ENHMETARECORD, nSize, 4) - TEST_FIELD_ALIGN (ENHMETARECORD, nSize, 4) - TEST_FIELD_OFFSET(ENHMETARECORD, nSize, 4) - TEST_FIELD_SIZE (ENHMETARECORD, dParm, 4) - TEST_FIELD_ALIGN (ENHMETARECORD, dParm, 4) - TEST_FIELD_OFFSET(ENHMETARECORD, dParm, 8) -} - -static void test_pack_ENHMFENUMPROC(void) -{ - /* ENHMFENUMPROC */ - TEST_TYPE_SIZE (ENHMFENUMPROC, 8) - TEST_TYPE_ALIGN (ENHMFENUMPROC, 8) -} - -static void test_pack_ENUMLOGFONTA(void) -{ - /* ENUMLOGFONTA */ - TEST_TYPE_SIZE (ENUMLOGFONTA, 156) - TEST_TYPE_ALIGN (ENUMLOGFONTA, 4) - TEST_FIELD_SIZE (ENUMLOGFONTA, elfLogFont, 60) - TEST_FIELD_ALIGN (ENUMLOGFONTA, elfLogFont, 4) - TEST_FIELD_OFFSET(ENUMLOGFONTA, elfLogFont, 0) - TEST_FIELD_SIZE (ENUMLOGFONTA, elfFullName, 64) - TEST_FIELD_ALIGN (ENUMLOGFONTA, elfFullName, 1) - TEST_FIELD_OFFSET(ENUMLOGFONTA, elfFullName, 60) - TEST_FIELD_SIZE (ENUMLOGFONTA, elfStyle, 32) - TEST_FIELD_ALIGN (ENUMLOGFONTA, elfStyle, 1) - TEST_FIELD_OFFSET(ENUMLOGFONTA, elfStyle, 124) -} - -static void test_pack_ENUMLOGFONTEXA(void) -{ - /* ENUMLOGFONTEXA */ - TEST_TYPE_SIZE (ENUMLOGFONTEXA, 188) - TEST_TYPE_ALIGN (ENUMLOGFONTEXA, 4) - TEST_FIELD_SIZE (ENUMLOGFONTEXA, elfLogFont, 60) - TEST_FIELD_ALIGN (ENUMLOGFONTEXA, elfLogFont, 4) - TEST_FIELD_OFFSET(ENUMLOGFONTEXA, elfLogFont, 0) - TEST_FIELD_SIZE (ENUMLOGFONTEXA, elfFullName, 64) - TEST_FIELD_ALIGN (ENUMLOGFONTEXA, elfFullName, 1) - TEST_FIELD_OFFSET(ENUMLOGFONTEXA, elfFullName, 60) - TEST_FIELD_SIZE (ENUMLOGFONTEXA, elfStyle, 32) - TEST_FIELD_ALIGN (ENUMLOGFONTEXA, elfStyle, 1) - TEST_FIELD_OFFSET(ENUMLOGFONTEXA, elfStyle, 124) - TEST_FIELD_SIZE (ENUMLOGFONTEXA, elfScript, 32) - TEST_FIELD_ALIGN (ENUMLOGFONTEXA, elfScript, 1) - TEST_FIELD_OFFSET(ENUMLOGFONTEXA, elfScript, 156) -} - -static void test_pack_ENUMLOGFONTEXW(void) -{ - /* ENUMLOGFONTEXW */ - TEST_TYPE_SIZE (ENUMLOGFONTEXW, 348) - TEST_TYPE_ALIGN (ENUMLOGFONTEXW, 4) - TEST_FIELD_SIZE (ENUMLOGFONTEXW, elfLogFont, 92) - TEST_FIELD_ALIGN (ENUMLOGFONTEXW, elfLogFont, 4) - TEST_FIELD_OFFSET(ENUMLOGFONTEXW, elfLogFont, 0) - TEST_FIELD_SIZE (ENUMLOGFONTEXW, elfFullName, 128) - TEST_FIELD_ALIGN (ENUMLOGFONTEXW, elfFullName, 2) - TEST_FIELD_OFFSET(ENUMLOGFONTEXW, elfFullName, 92) - TEST_FIELD_SIZE (ENUMLOGFONTEXW, elfStyle, 64) - TEST_FIELD_ALIGN (ENUMLOGFONTEXW, elfStyle, 2) - TEST_FIELD_OFFSET(ENUMLOGFONTEXW, elfStyle, 220) - TEST_FIELD_SIZE (ENUMLOGFONTEXW, elfScript, 64) - TEST_FIELD_ALIGN (ENUMLOGFONTEXW, elfScript, 2) - TEST_FIELD_OFFSET(ENUMLOGFONTEXW, elfScript, 284) -} - -static void test_pack_ENUMLOGFONTW(void) -{ - /* ENUMLOGFONTW */ - TEST_TYPE_SIZE (ENUMLOGFONTW, 284) - TEST_TYPE_ALIGN (ENUMLOGFONTW, 4) - TEST_FIELD_SIZE (ENUMLOGFONTW, elfLogFont, 92) - TEST_FIELD_ALIGN (ENUMLOGFONTW, elfLogFont, 4) - TEST_FIELD_OFFSET(ENUMLOGFONTW, elfLogFont, 0) - TEST_FIELD_SIZE (ENUMLOGFONTW, elfFullName, 128) - TEST_FIELD_ALIGN (ENUMLOGFONTW, elfFullName, 2) - TEST_FIELD_OFFSET(ENUMLOGFONTW, elfFullName, 92) - TEST_FIELD_SIZE (ENUMLOGFONTW, elfStyle, 64) - TEST_FIELD_ALIGN (ENUMLOGFONTW, elfStyle, 2) - TEST_FIELD_OFFSET(ENUMLOGFONTW, elfStyle, 220) -} - -static void test_pack_EXTLOGFONTA(void) -{ - /* EXTLOGFONTA */ - TEST_TYPE_SIZE (EXTLOGFONTA, 192) - TEST_TYPE_ALIGN (EXTLOGFONTA, 4) - TEST_FIELD_SIZE (EXTLOGFONTA, elfLogFont, 60) - TEST_FIELD_ALIGN (EXTLOGFONTA, elfLogFont, 4) - TEST_FIELD_OFFSET(EXTLOGFONTA, elfLogFont, 0) - TEST_FIELD_SIZE (EXTLOGFONTA, elfFullName, 64) - TEST_FIELD_ALIGN (EXTLOGFONTA, elfFullName, 1) - TEST_FIELD_OFFSET(EXTLOGFONTA, elfFullName, 60) - TEST_FIELD_SIZE (EXTLOGFONTA, elfStyle, 32) - TEST_FIELD_ALIGN (EXTLOGFONTA, elfStyle, 1) - TEST_FIELD_OFFSET(EXTLOGFONTA, elfStyle, 124) - TEST_FIELD_SIZE (EXTLOGFONTA, elfVersion, 4) - TEST_FIELD_ALIGN (EXTLOGFONTA, elfVersion, 4) - TEST_FIELD_OFFSET(EXTLOGFONTA, elfVersion, 156) - TEST_FIELD_SIZE (EXTLOGFONTA, elfStyleSize, 4) - TEST_FIELD_ALIGN (EXTLOGFONTA, elfStyleSize, 4) - TEST_FIELD_OFFSET(EXTLOGFONTA, elfStyleSize, 160) - TEST_FIELD_SIZE (EXTLOGFONTA, elfMatch, 4) - TEST_FIELD_ALIGN (EXTLOGFONTA, elfMatch, 4) - TEST_FIELD_OFFSET(EXTLOGFONTA, elfMatch, 164) - TEST_FIELD_SIZE (EXTLOGFONTA, elfReserved, 4) - TEST_FIELD_ALIGN (EXTLOGFONTA, elfReserved, 4) - TEST_FIELD_OFFSET(EXTLOGFONTA, elfReserved, 168) - TEST_FIELD_SIZE (EXTLOGFONTA, elfVendorId, 4) - TEST_FIELD_ALIGN (EXTLOGFONTA, elfVendorId, 1) - TEST_FIELD_OFFSET(EXTLOGFONTA, elfVendorId, 172) - TEST_FIELD_SIZE (EXTLOGFONTA, elfCulture, 4) - TEST_FIELD_ALIGN (EXTLOGFONTA, elfCulture, 4) - TEST_FIELD_OFFSET(EXTLOGFONTA, elfCulture, 176) - TEST_FIELD_SIZE (EXTLOGFONTA, elfPanose, 10) - TEST_FIELD_ALIGN (EXTLOGFONTA, elfPanose, 1) - TEST_FIELD_OFFSET(EXTLOGFONTA, elfPanose, 180) -} - -static void test_pack_EXTLOGFONTW(void) -{ - /* EXTLOGFONTW */ - TEST_TYPE_SIZE (EXTLOGFONTW, 320) - TEST_TYPE_ALIGN (EXTLOGFONTW, 4) - TEST_FIELD_SIZE (EXTLOGFONTW, elfLogFont, 92) - TEST_FIELD_ALIGN (EXTLOGFONTW, elfLogFont, 4) - TEST_FIELD_OFFSET(EXTLOGFONTW, elfLogFont, 0) - TEST_FIELD_SIZE (EXTLOGFONTW, elfFullName, 128) - TEST_FIELD_ALIGN (EXTLOGFONTW, elfFullName, 2) - TEST_FIELD_OFFSET(EXTLOGFONTW, elfFullName, 92) - TEST_FIELD_SIZE (EXTLOGFONTW, elfStyle, 64) - TEST_FIELD_ALIGN (EXTLOGFONTW, elfStyle, 2) - TEST_FIELD_OFFSET(EXTLOGFONTW, elfStyle, 220) - TEST_FIELD_SIZE (EXTLOGFONTW, elfVersion, 4) - TEST_FIELD_ALIGN (EXTLOGFONTW, elfVersion, 4) - TEST_FIELD_OFFSET(EXTLOGFONTW, elfVersion, 284) - TEST_FIELD_SIZE (EXTLOGFONTW, elfStyleSize, 4) - TEST_FIELD_ALIGN (EXTLOGFONTW, elfStyleSize, 4) - TEST_FIELD_OFFSET(EXTLOGFONTW, elfStyleSize, 288) - TEST_FIELD_SIZE (EXTLOGFONTW, elfMatch, 4) - TEST_FIELD_ALIGN (EXTLOGFONTW, elfMatch, 4) - TEST_FIELD_OFFSET(EXTLOGFONTW, elfMatch, 292) - TEST_FIELD_SIZE (EXTLOGFONTW, elfReserved, 4) - TEST_FIELD_ALIGN (EXTLOGFONTW, elfReserved, 4) - TEST_FIELD_OFFSET(EXTLOGFONTW, elfReserved, 296) - TEST_FIELD_SIZE (EXTLOGFONTW, elfVendorId, 4) - TEST_FIELD_ALIGN (EXTLOGFONTW, elfVendorId, 1) - TEST_FIELD_OFFSET(EXTLOGFONTW, elfVendorId, 300) - TEST_FIELD_SIZE (EXTLOGFONTW, elfCulture, 4) - TEST_FIELD_ALIGN (EXTLOGFONTW, elfCulture, 4) - TEST_FIELD_OFFSET(EXTLOGFONTW, elfCulture, 304) - TEST_FIELD_SIZE (EXTLOGFONTW, elfPanose, 10) - TEST_FIELD_ALIGN (EXTLOGFONTW, elfPanose, 1) - TEST_FIELD_OFFSET(EXTLOGFONTW, elfPanose, 308) -} - -static void test_pack_EXTLOGPEN(void) -{ - /* EXTLOGPEN */ - TEST_TYPE_SIZE (EXTLOGPEN, 32) - TEST_TYPE_ALIGN (EXTLOGPEN, 8) - TEST_FIELD_SIZE (EXTLOGPEN, elpPenStyle, 4) - TEST_FIELD_ALIGN (EXTLOGPEN, elpPenStyle, 4) - TEST_FIELD_OFFSET(EXTLOGPEN, elpPenStyle, 0) - TEST_FIELD_SIZE (EXTLOGPEN, elpWidth, 4) - TEST_FIELD_ALIGN (EXTLOGPEN, elpWidth, 4) - TEST_FIELD_OFFSET(EXTLOGPEN, elpWidth, 4) - TEST_FIELD_SIZE (EXTLOGPEN, elpBrushStyle, 4) - TEST_FIELD_ALIGN (EXTLOGPEN, elpBrushStyle, 4) - TEST_FIELD_OFFSET(EXTLOGPEN, elpBrushStyle, 8) - TEST_FIELD_SIZE (EXTLOGPEN, elpColor, 4) - TEST_FIELD_ALIGN (EXTLOGPEN, elpColor, 4) - TEST_FIELD_OFFSET(EXTLOGPEN, elpColor, 12) - TEST_FIELD_SIZE (EXTLOGPEN, elpHatch, 8) - TEST_FIELD_ALIGN (EXTLOGPEN, elpHatch, 8) - TEST_FIELD_OFFSET(EXTLOGPEN, elpHatch, 16) - TEST_FIELD_SIZE (EXTLOGPEN, elpNumEntries, 4) - TEST_FIELD_ALIGN (EXTLOGPEN, elpNumEntries, 4) - TEST_FIELD_OFFSET(EXTLOGPEN, elpNumEntries, 24) - TEST_FIELD_SIZE (EXTLOGPEN, elpStyleEntry, 4) - TEST_FIELD_ALIGN (EXTLOGPEN, elpStyleEntry, 4) - TEST_FIELD_OFFSET(EXTLOGPEN, elpStyleEntry, 28) -} - -static void test_pack_FIXED(void) -{ - /* FIXED */ - TEST_TYPE_SIZE (FIXED, 4) - TEST_TYPE_ALIGN (FIXED, 2) - TEST_FIELD_SIZE (FIXED, fract, 2) - TEST_FIELD_ALIGN (FIXED, fract, 2) - TEST_FIELD_OFFSET(FIXED, fract, 0) - TEST_FIELD_SIZE (FIXED, value, 2) - TEST_FIELD_ALIGN (FIXED, value, 2) - TEST_FIELD_OFFSET(FIXED, value, 2) -} - -static void test_pack_FONTENUMPROCA(void) -{ - /* FONTENUMPROCA */ - TEST_TYPE_SIZE (FONTENUMPROCA, 8) - TEST_TYPE_ALIGN (FONTENUMPROCA, 8) -} - -static void test_pack_FONTENUMPROCW(void) -{ - /* FONTENUMPROCW */ - TEST_TYPE_SIZE (FONTENUMPROCW, 8) - TEST_TYPE_ALIGN (FONTENUMPROCW, 8) -} - -static void test_pack_FONTSIGNATURE(void) -{ - /* FONTSIGNATURE */ - TEST_TYPE_SIZE (FONTSIGNATURE, 24) - TEST_TYPE_ALIGN (FONTSIGNATURE, 4) - TEST_FIELD_SIZE (FONTSIGNATURE, fsUsb, 16) - TEST_FIELD_ALIGN (FONTSIGNATURE, fsUsb, 4) - TEST_FIELD_OFFSET(FONTSIGNATURE, fsUsb, 0) - TEST_FIELD_SIZE (FONTSIGNATURE, fsCsb, 8) - TEST_FIELD_ALIGN (FONTSIGNATURE, fsCsb, 4) - TEST_FIELD_OFFSET(FONTSIGNATURE, fsCsb, 16) -} - -static void test_pack_FXPT16DOT16(void) -{ - /* FXPT16DOT16 */ - TEST_TYPE_SIZE (FXPT16DOT16, 4) - TEST_TYPE_ALIGN (FXPT16DOT16, 4) -} - -static void test_pack_FXPT2DOT30(void) -{ - /* FXPT2DOT30 */ - TEST_TYPE_SIZE (FXPT2DOT30, 4) - TEST_TYPE_ALIGN (FXPT2DOT30, 4) -} - -static void test_pack_GCP_RESULTSA(void) -{ - /* GCP_RESULTSA */ - TEST_TYPE_SIZE (GCP_RESULTSA, 64) - TEST_TYPE_ALIGN (GCP_RESULTSA, 8) - TEST_FIELD_SIZE (GCP_RESULTSA, lStructSize, 4) - TEST_FIELD_ALIGN (GCP_RESULTSA, lStructSize, 4) - TEST_FIELD_OFFSET(GCP_RESULTSA, lStructSize, 0) - TEST_FIELD_SIZE (GCP_RESULTSA, lpOutString, 8) - TEST_FIELD_ALIGN (GCP_RESULTSA, lpOutString, 8) - TEST_FIELD_OFFSET(GCP_RESULTSA, lpOutString, 8) - TEST_FIELD_SIZE (GCP_RESULTSA, lpOrder, 8) - TEST_FIELD_ALIGN (GCP_RESULTSA, lpOrder, 8) - TEST_FIELD_OFFSET(GCP_RESULTSA, lpOrder, 16) - TEST_FIELD_SIZE (GCP_RESULTSA, lpDx, 8) - TEST_FIELD_ALIGN (GCP_RESULTSA, lpDx, 8) - TEST_FIELD_OFFSET(GCP_RESULTSA, lpDx, 24) - TEST_FIELD_SIZE (GCP_RESULTSA, lpCaretPos, 8) - TEST_FIELD_ALIGN (GCP_RESULTSA, lpCaretPos, 8) - TEST_FIELD_OFFSET(GCP_RESULTSA, lpCaretPos, 32) - TEST_FIELD_SIZE (GCP_RESULTSA, lpClass, 8) - TEST_FIELD_ALIGN (GCP_RESULTSA, lpClass, 8) - TEST_FIELD_OFFSET(GCP_RESULTSA, lpClass, 40) - TEST_FIELD_SIZE (GCP_RESULTSA, lpGlyphs, 8) - TEST_FIELD_ALIGN (GCP_RESULTSA, lpGlyphs, 8) - TEST_FIELD_OFFSET(GCP_RESULTSA, lpGlyphs, 48) - TEST_FIELD_SIZE (GCP_RESULTSA, nGlyphs, 4) - TEST_FIELD_ALIGN (GCP_RESULTSA, nGlyphs, 4) - TEST_FIELD_OFFSET(GCP_RESULTSA, nGlyphs, 56) - TEST_FIELD_SIZE (GCP_RESULTSA, nMaxFit, 4) - TEST_FIELD_ALIGN (GCP_RESULTSA, nMaxFit, 4) - TEST_FIELD_OFFSET(GCP_RESULTSA, nMaxFit, 60) -} - -static void test_pack_GCP_RESULTSW(void) -{ - /* GCP_RESULTSW */ - TEST_TYPE_SIZE (GCP_RESULTSW, 64) - TEST_TYPE_ALIGN (GCP_RESULTSW, 8) - TEST_FIELD_SIZE (GCP_RESULTSW, lStructSize, 4) - TEST_FIELD_ALIGN (GCP_RESULTSW, lStructSize, 4) - TEST_FIELD_OFFSET(GCP_RESULTSW, lStructSize, 0) - TEST_FIELD_SIZE (GCP_RESULTSW, lpOutString, 8) - TEST_FIELD_ALIGN (GCP_RESULTSW, lpOutString, 8) - TEST_FIELD_OFFSET(GCP_RESULTSW, lpOutString, 8) - TEST_FIELD_SIZE (GCP_RESULTSW, lpOrder, 8) - TEST_FIELD_ALIGN (GCP_RESULTSW, lpOrder, 8) - TEST_FIELD_OFFSET(GCP_RESULTSW, lpOrder, 16) - TEST_FIELD_SIZE (GCP_RESULTSW, lpDx, 8) - TEST_FIELD_ALIGN (GCP_RESULTSW, lpDx, 8) - TEST_FIELD_OFFSET(GCP_RESULTSW, lpDx, 24) - TEST_FIELD_SIZE (GCP_RESULTSW, lpCaretPos, 8) - TEST_FIELD_ALIGN (GCP_RESULTSW, lpCaretPos, 8) - TEST_FIELD_OFFSET(GCP_RESULTSW, lpCaretPos, 32) - TEST_FIELD_SIZE (GCP_RESULTSW, lpClass, 8) - TEST_FIELD_ALIGN (GCP_RESULTSW, lpClass, 8) - TEST_FIELD_OFFSET(GCP_RESULTSW, lpClass, 40) - TEST_FIELD_SIZE (GCP_RESULTSW, lpGlyphs, 8) - TEST_FIELD_ALIGN (GCP_RESULTSW, lpGlyphs, 8) - TEST_FIELD_OFFSET(GCP_RESULTSW, lpGlyphs, 48) - TEST_FIELD_SIZE (GCP_RESULTSW, nGlyphs, 4) - TEST_FIELD_ALIGN (GCP_RESULTSW, nGlyphs, 4) - TEST_FIELD_OFFSET(GCP_RESULTSW, nGlyphs, 56) - TEST_FIELD_SIZE (GCP_RESULTSW, nMaxFit, 4) - TEST_FIELD_ALIGN (GCP_RESULTSW, nMaxFit, 4) - TEST_FIELD_OFFSET(GCP_RESULTSW, nMaxFit, 60) -} - -static void test_pack_GLYPHMETRICS(void) -{ - /* GLYPHMETRICS */ - TEST_TYPE_SIZE (GLYPHMETRICS, 20) - TEST_TYPE_ALIGN (GLYPHMETRICS, 4) - TEST_FIELD_SIZE (GLYPHMETRICS, gmBlackBoxX, 4) - TEST_FIELD_ALIGN (GLYPHMETRICS, gmBlackBoxX, 4) - TEST_FIELD_OFFSET(GLYPHMETRICS, gmBlackBoxX, 0) - TEST_FIELD_SIZE (GLYPHMETRICS, gmBlackBoxY, 4) - TEST_FIELD_ALIGN (GLYPHMETRICS, gmBlackBoxY, 4) - TEST_FIELD_OFFSET(GLYPHMETRICS, gmBlackBoxY, 4) - TEST_FIELD_SIZE (GLYPHMETRICS, gmptGlyphOrigin, 8) - TEST_FIELD_ALIGN (GLYPHMETRICS, gmptGlyphOrigin, 4) - TEST_FIELD_OFFSET(GLYPHMETRICS, gmptGlyphOrigin, 8) - TEST_FIELD_SIZE (GLYPHMETRICS, gmCellIncX, 2) - TEST_FIELD_ALIGN (GLYPHMETRICS, gmCellIncX, 2) - TEST_FIELD_OFFSET(GLYPHMETRICS, gmCellIncX, 16) - TEST_FIELD_SIZE (GLYPHMETRICS, gmCellIncY, 2) - TEST_FIELD_ALIGN (GLYPHMETRICS, gmCellIncY, 2) - TEST_FIELD_OFFSET(GLYPHMETRICS, gmCellIncY, 18) -} - -static void test_pack_GLYPHMETRICSFLOAT(void) -{ - /* GLYPHMETRICSFLOAT */ - TEST_TYPE_SIZE (GLYPHMETRICSFLOAT, 24) - TEST_TYPE_ALIGN (GLYPHMETRICSFLOAT, 4) - TEST_FIELD_SIZE (GLYPHMETRICSFLOAT, gmfBlackBoxX, 4) - TEST_FIELD_ALIGN (GLYPHMETRICSFLOAT, gmfBlackBoxX, 4) - TEST_FIELD_OFFSET(GLYPHMETRICSFLOAT, gmfBlackBoxX, 0) - TEST_FIELD_SIZE (GLYPHMETRICSFLOAT, gmfBlackBoxY, 4) - TEST_FIELD_ALIGN (GLYPHMETRICSFLOAT, gmfBlackBoxY, 4) - TEST_FIELD_OFFSET(GLYPHMETRICSFLOAT, gmfBlackBoxY, 4) - TEST_FIELD_SIZE (GLYPHMETRICSFLOAT, gmfptGlyphOrigin, 8) - TEST_FIELD_ALIGN (GLYPHMETRICSFLOAT, gmfptGlyphOrigin, 4) - TEST_FIELD_OFFSET(GLYPHMETRICSFLOAT, gmfptGlyphOrigin, 8) - TEST_FIELD_SIZE (GLYPHMETRICSFLOAT, gmfCellIncX, 4) - TEST_FIELD_ALIGN (GLYPHMETRICSFLOAT, gmfCellIncX, 4) - TEST_FIELD_OFFSET(GLYPHMETRICSFLOAT, gmfCellIncX, 16) - TEST_FIELD_SIZE (GLYPHMETRICSFLOAT, gmfCellIncY, 4) - TEST_FIELD_ALIGN (GLYPHMETRICSFLOAT, gmfCellIncY, 4) - TEST_FIELD_OFFSET(GLYPHMETRICSFLOAT, gmfCellIncY, 20) -} - -static void test_pack_GOBJENUMPROC(void) -{ - /* GOBJENUMPROC */ - TEST_TYPE_SIZE (GOBJENUMPROC, 8) - TEST_TYPE_ALIGN (GOBJENUMPROC, 8) -} - -static void test_pack_GRADIENT_RECT(void) -{ - /* GRADIENT_RECT */ - TEST_TYPE_SIZE (GRADIENT_RECT, 8) - TEST_TYPE_ALIGN (GRADIENT_RECT, 4) - TEST_FIELD_SIZE (GRADIENT_RECT, UpperLeft, 4) - TEST_FIELD_ALIGN (GRADIENT_RECT, UpperLeft, 4) - TEST_FIELD_OFFSET(GRADIENT_RECT, UpperLeft, 0) - TEST_FIELD_SIZE (GRADIENT_RECT, LowerRight, 4) - TEST_FIELD_ALIGN (GRADIENT_RECT, LowerRight, 4) - TEST_FIELD_OFFSET(GRADIENT_RECT, LowerRight, 4) -} - -static void test_pack_GRADIENT_TRIANGLE(void) -{ - /* GRADIENT_TRIANGLE */ - TEST_TYPE_SIZE (GRADIENT_TRIANGLE, 12) - TEST_TYPE_ALIGN (GRADIENT_TRIANGLE, 4) - TEST_FIELD_SIZE (GRADIENT_TRIANGLE, Vertex1, 4) - TEST_FIELD_ALIGN (GRADIENT_TRIANGLE, Vertex1, 4) - TEST_FIELD_OFFSET(GRADIENT_TRIANGLE, Vertex1, 0) - TEST_FIELD_SIZE (GRADIENT_TRIANGLE, Vertex2, 4) - TEST_FIELD_ALIGN (GRADIENT_TRIANGLE, Vertex2, 4) - TEST_FIELD_OFFSET(GRADIENT_TRIANGLE, Vertex2, 4) - TEST_FIELD_SIZE (GRADIENT_TRIANGLE, Vertex3, 4) - TEST_FIELD_ALIGN (GRADIENT_TRIANGLE, Vertex3, 4) - TEST_FIELD_OFFSET(GRADIENT_TRIANGLE, Vertex3, 8) -} - -static void test_pack_HANDLETABLE(void) -{ - /* HANDLETABLE */ - TEST_TYPE_SIZE (HANDLETABLE, 8) - TEST_TYPE_ALIGN (HANDLETABLE, 8) - TEST_FIELD_SIZE (HANDLETABLE, objectHandle, 8) - TEST_FIELD_ALIGN (HANDLETABLE, objectHandle, 8) - TEST_FIELD_OFFSET(HANDLETABLE, objectHandle, 0) -} - -static void test_pack_ICMENUMPROCA(void) -{ - /* ICMENUMPROCA */ - TEST_TYPE_SIZE (ICMENUMPROCA, 8) - TEST_TYPE_ALIGN (ICMENUMPROCA, 8) -} - -static void test_pack_ICMENUMPROCW(void) -{ - /* ICMENUMPROCW */ - TEST_TYPE_SIZE (ICMENUMPROCW, 8) - TEST_TYPE_ALIGN (ICMENUMPROCW, 8) -} - -static void test_pack_KERNINGPAIR(void) -{ - /* KERNINGPAIR */ - TEST_TYPE_SIZE (KERNINGPAIR, 8) - TEST_TYPE_ALIGN (KERNINGPAIR, 4) - TEST_FIELD_SIZE (KERNINGPAIR, wFirst, 2) - TEST_FIELD_ALIGN (KERNINGPAIR, wFirst, 2) - TEST_FIELD_OFFSET(KERNINGPAIR, wFirst, 0) - TEST_FIELD_SIZE (KERNINGPAIR, wSecond, 2) - TEST_FIELD_ALIGN (KERNINGPAIR, wSecond, 2) - TEST_FIELD_OFFSET(KERNINGPAIR, wSecond, 2) - TEST_FIELD_SIZE (KERNINGPAIR, iKernAmount, 4) - TEST_FIELD_ALIGN (KERNINGPAIR, iKernAmount, 4) - TEST_FIELD_OFFSET(KERNINGPAIR, iKernAmount, 4) -} - -static void test_pack_LAYERPLANEDESCRIPTOR(void) -{ - /* LAYERPLANEDESCRIPTOR */ - TEST_TYPE_SIZE (LAYERPLANEDESCRIPTOR, 32) - TEST_TYPE_ALIGN (LAYERPLANEDESCRIPTOR, 4) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, nSize, 2) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, nSize, 2) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, nSize, 0) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, nVersion, 2) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, nVersion, 2) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, nVersion, 2) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, dwFlags, 4) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, dwFlags, 4) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, dwFlags, 4) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, iPixelType, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, iPixelType, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, iPixelType, 8) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cColorBits, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cColorBits, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cColorBits, 9) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cRedBits, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cRedBits, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cRedBits, 10) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cRedShift, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cRedShift, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cRedShift, 11) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cGreenBits, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cGreenBits, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cGreenBits, 12) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cGreenShift, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cGreenShift, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cGreenShift, 13) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cBlueBits, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cBlueBits, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cBlueBits, 14) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cBlueShift, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cBlueShift, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cBlueShift, 15) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cAlphaBits, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cAlphaBits, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cAlphaBits, 16) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cAlphaShift, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cAlphaShift, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cAlphaShift, 17) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cAccumBits, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cAccumBits, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cAccumBits, 18) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cAccumRedBits, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cAccumRedBits, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cAccumRedBits, 19) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cAccumGreenBits, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cAccumGreenBits, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cAccumGreenBits, 20) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cAccumBlueBits, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cAccumBlueBits, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cAccumBlueBits, 21) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cAccumAlphaBits, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cAccumAlphaBits, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cAccumAlphaBits, 22) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cDepthBits, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cDepthBits, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cDepthBits, 23) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cStencilBits, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cStencilBits, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cStencilBits, 24) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cAuxBuffers, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cAuxBuffers, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cAuxBuffers, 25) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, iLayerPlane, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, iLayerPlane, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, iLayerPlane, 26) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, bReserved, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, bReserved, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, bReserved, 27) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, crTransparent, 4) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, crTransparent, 4) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, crTransparent, 28) -} - -static void test_pack_LCSCSTYPE(void) -{ - /* LCSCSTYPE */ - TEST_TYPE_SIZE (LCSCSTYPE, 4) - TEST_TYPE_ALIGN (LCSCSTYPE, 4) -} - -static void test_pack_LCSGAMUTMATCH(void) -{ - /* LCSGAMUTMATCH */ - TEST_TYPE_SIZE (LCSGAMUTMATCH, 4) - TEST_TYPE_ALIGN (LCSGAMUTMATCH, 4) -} - -static void test_pack_LINEDDAPROC(void) -{ - /* LINEDDAPROC */ - TEST_TYPE_SIZE (LINEDDAPROC, 8) - TEST_TYPE_ALIGN (LINEDDAPROC, 8) -} - -static void test_pack_LOCALESIGNATURE(void) -{ - /* LOCALESIGNATURE */ - TEST_TYPE_SIZE (LOCALESIGNATURE, 32) - TEST_TYPE_ALIGN (LOCALESIGNATURE, 4) - TEST_FIELD_SIZE (LOCALESIGNATURE, lsUsb, 16) - TEST_FIELD_ALIGN (LOCALESIGNATURE, lsUsb, 4) - TEST_FIELD_OFFSET(LOCALESIGNATURE, lsUsb, 0) - TEST_FIELD_SIZE (LOCALESIGNATURE, lsCsbDefault, 8) - TEST_FIELD_ALIGN (LOCALESIGNATURE, lsCsbDefault, 4) - TEST_FIELD_OFFSET(LOCALESIGNATURE, lsCsbDefault, 16) - TEST_FIELD_SIZE (LOCALESIGNATURE, lsCsbSupported, 8) - TEST_FIELD_ALIGN (LOCALESIGNATURE, lsCsbSupported, 4) - TEST_FIELD_OFFSET(LOCALESIGNATURE, lsCsbSupported, 24) -} - -static void test_pack_LOGBRUSH(void) -{ - /* LOGBRUSH */ - TEST_TYPE_SIZE (LOGBRUSH, 16) - TEST_TYPE_ALIGN (LOGBRUSH, 8) - TEST_FIELD_SIZE (LOGBRUSH, lbStyle, 4) - TEST_FIELD_ALIGN (LOGBRUSH, lbStyle, 4) - TEST_FIELD_OFFSET(LOGBRUSH, lbStyle, 0) - TEST_FIELD_SIZE (LOGBRUSH, lbColor, 4) - TEST_FIELD_ALIGN (LOGBRUSH, lbColor, 4) - TEST_FIELD_OFFSET(LOGBRUSH, lbColor, 4) - TEST_FIELD_SIZE (LOGBRUSH, lbHatch, 8) - TEST_FIELD_ALIGN (LOGBRUSH, lbHatch, 8) - TEST_FIELD_OFFSET(LOGBRUSH, lbHatch, 8) -} - -static void test_pack_LOGCOLORSPACEA(void) -{ - /* LOGCOLORSPACEA */ - TEST_TYPE_SIZE (LOGCOLORSPACEA, 328) - TEST_TYPE_ALIGN (LOGCOLORSPACEA, 4) - TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsSignature, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsSignature, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsSignature, 0) - TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsVersion, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsVersion, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsVersion, 4) - TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsSize, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsSize, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsSize, 8) - TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsCSType, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsCSType, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsCSType, 12) - TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsIntent, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsIntent, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsIntent, 16) - TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsEndpoints, 36) - TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsEndpoints, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsEndpoints, 20) - TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsGammaRed, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsGammaRed, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsGammaRed, 56) - TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsGammaGreen, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsGammaGreen, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsGammaGreen, 60) - TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsGammaBlue, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsGammaBlue, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsGammaBlue, 64) - TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsFilename, 260) - TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsFilename, 1) - TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsFilename, 68) -} - -static void test_pack_LOGCOLORSPACEW(void) -{ - /* LOGCOLORSPACEW */ - TEST_TYPE_SIZE (LOGCOLORSPACEW, 588) - TEST_TYPE_ALIGN (LOGCOLORSPACEW, 4) - TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsSignature, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsSignature, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsSignature, 0) - TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsVersion, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsVersion, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsVersion, 4) - TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsSize, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsSize, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsSize, 8) - TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsCSType, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsCSType, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsCSType, 12) - TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsIntent, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsIntent, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsIntent, 16) - TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsEndpoints, 36) - TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsEndpoints, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsEndpoints, 20) - TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsGammaRed, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsGammaRed, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsGammaRed, 56) - TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsGammaGreen, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsGammaGreen, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsGammaGreen, 60) - TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsGammaBlue, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsGammaBlue, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsGammaBlue, 64) - TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsFilename, 520) - TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsFilename, 2) - TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsFilename, 68) -} - -static void test_pack_LOGFONTA(void) -{ - /* LOGFONTA */ - TEST_TYPE_SIZE (LOGFONTA, 60) - TEST_TYPE_ALIGN (LOGFONTA, 4) - TEST_FIELD_SIZE (LOGFONTA, lfHeight, 4) - TEST_FIELD_ALIGN (LOGFONTA, lfHeight, 4) - TEST_FIELD_OFFSET(LOGFONTA, lfHeight, 0) - TEST_FIELD_SIZE (LOGFONTA, lfWidth, 4) - TEST_FIELD_ALIGN (LOGFONTA, lfWidth, 4) - TEST_FIELD_OFFSET(LOGFONTA, lfWidth, 4) - TEST_FIELD_SIZE (LOGFONTA, lfEscapement, 4) - TEST_FIELD_ALIGN (LOGFONTA, lfEscapement, 4) - TEST_FIELD_OFFSET(LOGFONTA, lfEscapement, 8) - TEST_FIELD_SIZE (LOGFONTA, lfOrientation, 4) - TEST_FIELD_ALIGN (LOGFONTA, lfOrientation, 4) - TEST_FIELD_OFFSET(LOGFONTA, lfOrientation, 12) - TEST_FIELD_SIZE (LOGFONTA, lfWeight, 4) - TEST_FIELD_ALIGN (LOGFONTA, lfWeight, 4) - TEST_FIELD_OFFSET(LOGFONTA, lfWeight, 16) - TEST_FIELD_SIZE (LOGFONTA, lfItalic, 1) - TEST_FIELD_ALIGN (LOGFONTA, lfItalic, 1) - TEST_FIELD_OFFSET(LOGFONTA, lfItalic, 20) - TEST_FIELD_SIZE (LOGFONTA, lfUnderline, 1) - TEST_FIELD_ALIGN (LOGFONTA, lfUnderline, 1) - TEST_FIELD_OFFSET(LOGFONTA, lfUnderline, 21) - TEST_FIELD_SIZE (LOGFONTA, lfStrikeOut, 1) - TEST_FIELD_ALIGN (LOGFONTA, lfStrikeOut, 1) - TEST_FIELD_OFFSET(LOGFONTA, lfStrikeOut, 22) - TEST_FIELD_SIZE (LOGFONTA, lfCharSet, 1) - TEST_FIELD_ALIGN (LOGFONTA, lfCharSet, 1) - TEST_FIELD_OFFSET(LOGFONTA, lfCharSet, 23) - TEST_FIELD_SIZE (LOGFONTA, lfOutPrecision, 1) - TEST_FIELD_ALIGN (LOGFONTA, lfOutPrecision, 1) - TEST_FIELD_OFFSET(LOGFONTA, lfOutPrecision, 24) - TEST_FIELD_SIZE (LOGFONTA, lfClipPrecision, 1) - TEST_FIELD_ALIGN (LOGFONTA, lfClipPrecision, 1) - TEST_FIELD_OFFSET(LOGFONTA, lfClipPrecision, 25) - TEST_FIELD_SIZE (LOGFONTA, lfQuality, 1) - TEST_FIELD_ALIGN (LOGFONTA, lfQuality, 1) - TEST_FIELD_OFFSET(LOGFONTA, lfQuality, 26) - TEST_FIELD_SIZE (LOGFONTA, lfPitchAndFamily, 1) - TEST_FIELD_ALIGN (LOGFONTA, lfPitchAndFamily, 1) - TEST_FIELD_OFFSET(LOGFONTA, lfPitchAndFamily, 27) - TEST_FIELD_SIZE (LOGFONTA, lfFaceName, 32) - TEST_FIELD_ALIGN (LOGFONTA, lfFaceName, 1) - TEST_FIELD_OFFSET(LOGFONTA, lfFaceName, 28) -} - -static void test_pack_LOGFONTW(void) -{ - /* LOGFONTW */ - TEST_TYPE_SIZE (LOGFONTW, 92) - TEST_TYPE_ALIGN (LOGFONTW, 4) - TEST_FIELD_SIZE (LOGFONTW, lfHeight, 4) - TEST_FIELD_ALIGN (LOGFONTW, lfHeight, 4) - TEST_FIELD_OFFSET(LOGFONTW, lfHeight, 0) - TEST_FIELD_SIZE (LOGFONTW, lfWidth, 4) - TEST_FIELD_ALIGN (LOGFONTW, lfWidth, 4) - TEST_FIELD_OFFSET(LOGFONTW, lfWidth, 4) - TEST_FIELD_SIZE (LOGFONTW, lfEscapement, 4) - TEST_FIELD_ALIGN (LOGFONTW, lfEscapement, 4) - TEST_FIELD_OFFSET(LOGFONTW, lfEscapement, 8) - TEST_FIELD_SIZE (LOGFONTW, lfOrientation, 4) - TEST_FIELD_ALIGN (LOGFONTW, lfOrientation, 4) - TEST_FIELD_OFFSET(LOGFONTW, lfOrientation, 12) - TEST_FIELD_SIZE (LOGFONTW, lfWeight, 4) - TEST_FIELD_ALIGN (LOGFONTW, lfWeight, 4) - TEST_FIELD_OFFSET(LOGFONTW, lfWeight, 16) - TEST_FIELD_SIZE (LOGFONTW, lfItalic, 1) - TEST_FIELD_ALIGN (LOGFONTW, lfItalic, 1) - TEST_FIELD_OFFSET(LOGFONTW, lfItalic, 20) - TEST_FIELD_SIZE (LOGFONTW, lfUnderline, 1) - TEST_FIELD_ALIGN (LOGFONTW, lfUnderline, 1) - TEST_FIELD_OFFSET(LOGFONTW, lfUnderline, 21) - TEST_FIELD_SIZE (LOGFONTW, lfStrikeOut, 1) - TEST_FIELD_ALIGN (LOGFONTW, lfStrikeOut, 1) - TEST_FIELD_OFFSET(LOGFONTW, lfStrikeOut, 22) - TEST_FIELD_SIZE (LOGFONTW, lfCharSet, 1) - TEST_FIELD_ALIGN (LOGFONTW, lfCharSet, 1) - TEST_FIELD_OFFSET(LOGFONTW, lfCharSet, 23) - TEST_FIELD_SIZE (LOGFONTW, lfOutPrecision, 1) - TEST_FIELD_ALIGN (LOGFONTW, lfOutPrecision, 1) - TEST_FIELD_OFFSET(LOGFONTW, lfOutPrecision, 24) - TEST_FIELD_SIZE (LOGFONTW, lfClipPrecision, 1) - TEST_FIELD_ALIGN (LOGFONTW, lfClipPrecision, 1) - TEST_FIELD_OFFSET(LOGFONTW, lfClipPrecision, 25) - TEST_FIELD_SIZE (LOGFONTW, lfQuality, 1) - TEST_FIELD_ALIGN (LOGFONTW, lfQuality, 1) - TEST_FIELD_OFFSET(LOGFONTW, lfQuality, 26) - TEST_FIELD_SIZE (LOGFONTW, lfPitchAndFamily, 1) - TEST_FIELD_ALIGN (LOGFONTW, lfPitchAndFamily, 1) - TEST_FIELD_OFFSET(LOGFONTW, lfPitchAndFamily, 27) - TEST_FIELD_SIZE (LOGFONTW, lfFaceName, 64) - TEST_FIELD_ALIGN (LOGFONTW, lfFaceName, 2) - TEST_FIELD_OFFSET(LOGFONTW, lfFaceName, 28) -} - -static void test_pack_LOGPEN(void) -{ - /* LOGPEN */ - TEST_TYPE_SIZE (LOGPEN, 16) - TEST_TYPE_ALIGN (LOGPEN, 4) - TEST_FIELD_SIZE (LOGPEN, lopnStyle, 4) - TEST_FIELD_ALIGN (LOGPEN, lopnStyle, 4) - TEST_FIELD_OFFSET(LOGPEN, lopnStyle, 0) - TEST_FIELD_SIZE (LOGPEN, lopnWidth, 8) - TEST_FIELD_ALIGN (LOGPEN, lopnWidth, 4) - TEST_FIELD_OFFSET(LOGPEN, lopnWidth, 4) - TEST_FIELD_SIZE (LOGPEN, lopnColor, 4) - TEST_FIELD_ALIGN (LOGPEN, lopnColor, 4) - TEST_FIELD_OFFSET(LOGPEN, lopnColor, 12) -} - -static void test_pack_LPABC(void) -{ - /* LPABC */ - TEST_TYPE_SIZE (LPABC, 8) - TEST_TYPE_ALIGN (LPABC, 8) - TEST_TARGET_SIZE (LPABC, 12) - TEST_TARGET_ALIGN(LPABC, 4) -} - -static void test_pack_LPABCFLOAT(void) -{ - /* LPABCFLOAT */ - TEST_TYPE_SIZE (LPABCFLOAT, 8) - TEST_TYPE_ALIGN (LPABCFLOAT, 8) - TEST_TARGET_SIZE (LPABCFLOAT, 12) - TEST_TARGET_ALIGN(LPABCFLOAT, 4) -} - -static void test_pack_LPBITMAP(void) -{ - /* LPBITMAP */ - TEST_TYPE_SIZE (LPBITMAP, 8) - TEST_TYPE_ALIGN (LPBITMAP, 8) - TEST_TARGET_SIZE (LPBITMAP, 32) - TEST_TARGET_ALIGN(LPBITMAP, 8) -} - -static void test_pack_LPBITMAPCOREHEADER(void) -{ - /* LPBITMAPCOREHEADER */ - TEST_TYPE_SIZE (LPBITMAPCOREHEADER, 8) - TEST_TYPE_ALIGN (LPBITMAPCOREHEADER, 8) - TEST_TARGET_SIZE (LPBITMAPCOREHEADER, 12) - TEST_TARGET_ALIGN(LPBITMAPCOREHEADER, 4) -} - -static void test_pack_LPBITMAPCOREINFO(void) -{ - /* LPBITMAPCOREINFO */ - TEST_TYPE_SIZE (LPBITMAPCOREINFO, 8) - TEST_TYPE_ALIGN (LPBITMAPCOREINFO, 8) - TEST_TARGET_SIZE (LPBITMAPCOREINFO, 16) - TEST_TARGET_ALIGN(LPBITMAPCOREINFO, 4) -} - -static void test_pack_LPBITMAPFILEHEADER(void) -{ - /* LPBITMAPFILEHEADER */ - TEST_TYPE_SIZE (LPBITMAPFILEHEADER, 8) - TEST_TYPE_ALIGN (LPBITMAPFILEHEADER, 8) - TEST_TARGET_SIZE (LPBITMAPFILEHEADER, 14) - TEST_TARGET_ALIGN(LPBITMAPFILEHEADER, 2) -} - -static void test_pack_LPBITMAPINFO(void) -{ - /* LPBITMAPINFO */ - TEST_TYPE_SIZE (LPBITMAPINFO, 8) - TEST_TYPE_ALIGN (LPBITMAPINFO, 8) - TEST_TARGET_SIZE (LPBITMAPINFO, 44) - TEST_TARGET_ALIGN(LPBITMAPINFO, 4) -} - -static void test_pack_LPBITMAPINFOHEADER(void) -{ - /* LPBITMAPINFOHEADER */ - TEST_TYPE_SIZE (LPBITMAPINFOHEADER, 8) - TEST_TYPE_ALIGN (LPBITMAPINFOHEADER, 8) - TEST_TARGET_SIZE (LPBITMAPINFOHEADER, 40) - TEST_TARGET_ALIGN(LPBITMAPINFOHEADER, 4) -} - -static void test_pack_LPBITMAPV5HEADER(void) -{ - /* LPBITMAPV5HEADER */ - TEST_TYPE_SIZE (LPBITMAPV5HEADER, 8) - TEST_TYPE_ALIGN (LPBITMAPV5HEADER, 8) - TEST_TARGET_SIZE (LPBITMAPV5HEADER, 124) - TEST_TARGET_ALIGN(LPBITMAPV5HEADER, 4) -} - -static void test_pack_LPCHARSETINFO(void) -{ - /* LPCHARSETINFO */ - TEST_TYPE_SIZE (LPCHARSETINFO, 8) - TEST_TYPE_ALIGN (LPCHARSETINFO, 8) - TEST_TARGET_SIZE (LPCHARSETINFO, 32) - TEST_TARGET_ALIGN(LPCHARSETINFO, 4) -} - -static void test_pack_LPCIEXYZ(void) -{ - /* LPCIEXYZ */ - TEST_TYPE_SIZE (LPCIEXYZ, 8) - TEST_TYPE_ALIGN (LPCIEXYZ, 8) - TEST_TARGET_SIZE (LPCIEXYZ, 12) - TEST_TARGET_ALIGN(LPCIEXYZ, 4) -} - -static void test_pack_LPCIEXYZTRIPLE(void) -{ - /* LPCIEXYZTRIPLE */ - TEST_TYPE_SIZE (LPCIEXYZTRIPLE, 8) - TEST_TYPE_ALIGN (LPCIEXYZTRIPLE, 8) - TEST_TARGET_SIZE (LPCIEXYZTRIPLE, 36) - TEST_TARGET_ALIGN(LPCIEXYZTRIPLE, 4) -} - -static void test_pack_LPCOLORADJUSTMENT(void) -{ - /* LPCOLORADJUSTMENT */ - TEST_TYPE_SIZE (LPCOLORADJUSTMENT, 8) - TEST_TYPE_ALIGN (LPCOLORADJUSTMENT, 8) - TEST_TARGET_SIZE (LPCOLORADJUSTMENT, 24) - TEST_TARGET_ALIGN(LPCOLORADJUSTMENT, 2) -} - -static void test_pack_LPDEVMODEA(void) -{ - /* LPDEVMODEA */ - TEST_TYPE_SIZE (LPDEVMODEA, 8) - TEST_TYPE_ALIGN (LPDEVMODEA, 8) -} - -static void test_pack_LPDEVMODEW(void) -{ - /* LPDEVMODEW */ - TEST_TYPE_SIZE (LPDEVMODEW, 8) - TEST_TYPE_ALIGN (LPDEVMODEW, 8) -} - -static void test_pack_LPDIBSECTION(void) -{ - /* LPDIBSECTION */ - TEST_TYPE_SIZE (LPDIBSECTION, 8) - TEST_TYPE_ALIGN (LPDIBSECTION, 8) - TEST_TARGET_SIZE (LPDIBSECTION, 104) - TEST_TARGET_ALIGN(LPDIBSECTION, 8) -} - -static void test_pack_LPDISPLAY_DEVICEA(void) -{ - /* LPDISPLAY_DEVICEA */ - TEST_TYPE_SIZE (LPDISPLAY_DEVICEA, 8) - TEST_TYPE_ALIGN (LPDISPLAY_DEVICEA, 8) - TEST_TARGET_SIZE (LPDISPLAY_DEVICEA, 424) - TEST_TARGET_ALIGN(LPDISPLAY_DEVICEA, 4) -} - -static void test_pack_LPDISPLAY_DEVICEW(void) -{ - /* LPDISPLAY_DEVICEW */ - TEST_TYPE_SIZE (LPDISPLAY_DEVICEW, 8) - TEST_TYPE_ALIGN (LPDISPLAY_DEVICEW, 8) - TEST_TARGET_SIZE (LPDISPLAY_DEVICEW, 840) - TEST_TARGET_ALIGN(LPDISPLAY_DEVICEW, 4) -} - -static void test_pack_LPDOCINFOA(void) -{ - /* LPDOCINFOA */ - TEST_TYPE_SIZE (LPDOCINFOA, 8) - TEST_TYPE_ALIGN (LPDOCINFOA, 8) - TEST_TARGET_SIZE (LPDOCINFOA, 40) - TEST_TARGET_ALIGN(LPDOCINFOA, 8) -} - -static void test_pack_LPDOCINFOW(void) -{ - /* LPDOCINFOW */ - TEST_TYPE_SIZE (LPDOCINFOW, 8) - TEST_TYPE_ALIGN (LPDOCINFOW, 8) - TEST_TARGET_SIZE (LPDOCINFOW, 40) - TEST_TARGET_ALIGN(LPDOCINFOW, 8) -} - -static void test_pack_LPENHMETAHEADER(void) -{ - /* LPENHMETAHEADER */ - TEST_TYPE_SIZE (LPENHMETAHEADER, 8) - TEST_TYPE_ALIGN (LPENHMETAHEADER, 8) - TEST_TARGET_SIZE (LPENHMETAHEADER, 108) - TEST_TARGET_ALIGN(LPENHMETAHEADER, 4) -} - -static void test_pack_LPENHMETARECORD(void) -{ - /* LPENHMETARECORD */ - TEST_TYPE_SIZE (LPENHMETARECORD, 8) - TEST_TYPE_ALIGN (LPENHMETARECORD, 8) - TEST_TARGET_SIZE (LPENHMETARECORD, 12) - TEST_TARGET_ALIGN(LPENHMETARECORD, 4) -} - -static void test_pack_LPENUMLOGFONTA(void) -{ - /* LPENUMLOGFONTA */ - TEST_TYPE_SIZE (LPENUMLOGFONTA, 8) - TEST_TYPE_ALIGN (LPENUMLOGFONTA, 8) - TEST_TARGET_SIZE (LPENUMLOGFONTA, 156) - TEST_TARGET_ALIGN(LPENUMLOGFONTA, 4) -} - -static void test_pack_LPENUMLOGFONTEXA(void) -{ - /* LPENUMLOGFONTEXA */ - TEST_TYPE_SIZE (LPENUMLOGFONTEXA, 8) - TEST_TYPE_ALIGN (LPENUMLOGFONTEXA, 8) - TEST_TARGET_SIZE (LPENUMLOGFONTEXA, 188) - TEST_TARGET_ALIGN(LPENUMLOGFONTEXA, 4) -} - -static void test_pack_LPENUMLOGFONTEXW(void) -{ - /* LPENUMLOGFONTEXW */ - TEST_TYPE_SIZE (LPENUMLOGFONTEXW, 8) - TEST_TYPE_ALIGN (LPENUMLOGFONTEXW, 8) - TEST_TARGET_SIZE (LPENUMLOGFONTEXW, 348) - TEST_TARGET_ALIGN(LPENUMLOGFONTEXW, 4) -} - -static void test_pack_LPENUMLOGFONTW(void) -{ - /* LPENUMLOGFONTW */ - TEST_TYPE_SIZE (LPENUMLOGFONTW, 8) - TEST_TYPE_ALIGN (LPENUMLOGFONTW, 8) - TEST_TARGET_SIZE (LPENUMLOGFONTW, 284) - TEST_TARGET_ALIGN(LPENUMLOGFONTW, 4) -} - -static void test_pack_LPEXTLOGFONTA(void) -{ - /* LPEXTLOGFONTA */ - TEST_TYPE_SIZE (LPEXTLOGFONTA, 8) - TEST_TYPE_ALIGN (LPEXTLOGFONTA, 8) - TEST_TARGET_SIZE (LPEXTLOGFONTA, 192) - TEST_TARGET_ALIGN(LPEXTLOGFONTA, 4) -} - -static void test_pack_LPEXTLOGFONTW(void) -{ - /* LPEXTLOGFONTW */ - TEST_TYPE_SIZE (LPEXTLOGFONTW, 8) - TEST_TYPE_ALIGN (LPEXTLOGFONTW, 8) - TEST_TARGET_SIZE (LPEXTLOGFONTW, 320) - TEST_TARGET_ALIGN(LPEXTLOGFONTW, 4) -} - -static void test_pack_LPEXTLOGPEN(void) -{ - /* LPEXTLOGPEN */ - TEST_TYPE_SIZE (LPEXTLOGPEN, 8) - TEST_TYPE_ALIGN (LPEXTLOGPEN, 8) - TEST_TARGET_SIZE (LPEXTLOGPEN, 32) - TEST_TARGET_ALIGN(LPEXTLOGPEN, 8) -} - -static void test_pack_LPFONTSIGNATURE(void) -{ - /* LPFONTSIGNATURE */ - TEST_TYPE_SIZE (LPFONTSIGNATURE, 8) - TEST_TYPE_ALIGN (LPFONTSIGNATURE, 8) - TEST_TARGET_SIZE (LPFONTSIGNATURE, 24) - TEST_TARGET_ALIGN(LPFONTSIGNATURE, 4) -} - -static void test_pack_LPGCP_RESULTSA(void) -{ - /* LPGCP_RESULTSA */ - TEST_TYPE_SIZE (LPGCP_RESULTSA, 8) - TEST_TYPE_ALIGN (LPGCP_RESULTSA, 8) - TEST_TARGET_SIZE (LPGCP_RESULTSA, 64) - TEST_TARGET_ALIGN(LPGCP_RESULTSA, 8) -} - -static void test_pack_LPGCP_RESULTSW(void) -{ - /* LPGCP_RESULTSW */ - TEST_TYPE_SIZE (LPGCP_RESULTSW, 8) - TEST_TYPE_ALIGN (LPGCP_RESULTSW, 8) - TEST_TARGET_SIZE (LPGCP_RESULTSW, 64) - TEST_TARGET_ALIGN(LPGCP_RESULTSW, 8) -} - -static void test_pack_LPGLYPHMETRICS(void) -{ - /* LPGLYPHMETRICS */ - TEST_TYPE_SIZE (LPGLYPHMETRICS, 8) - TEST_TYPE_ALIGN (LPGLYPHMETRICS, 8) - TEST_TARGET_SIZE (LPGLYPHMETRICS, 20) - TEST_TARGET_ALIGN(LPGLYPHMETRICS, 4) -} - -static void test_pack_LPGLYPHMETRICSFLOAT(void) -{ - /* LPGLYPHMETRICSFLOAT */ - TEST_TYPE_SIZE (LPGLYPHMETRICSFLOAT, 8) - TEST_TYPE_ALIGN (LPGLYPHMETRICSFLOAT, 8) - TEST_TARGET_SIZE (LPGLYPHMETRICSFLOAT, 24) - TEST_TARGET_ALIGN(LPGLYPHMETRICSFLOAT, 4) -} - -static void test_pack_LPGRADIENT_RECT(void) -{ - /* LPGRADIENT_RECT */ - TEST_TYPE_SIZE (LPGRADIENT_RECT, 8) - TEST_TYPE_ALIGN (LPGRADIENT_RECT, 8) - TEST_TARGET_SIZE (LPGRADIENT_RECT, 8) - TEST_TARGET_ALIGN(LPGRADIENT_RECT, 4) -} - -static void test_pack_LPGRADIENT_TRIANGLE(void) -{ - /* LPGRADIENT_TRIANGLE */ - TEST_TYPE_SIZE (LPGRADIENT_TRIANGLE, 8) - TEST_TYPE_ALIGN (LPGRADIENT_TRIANGLE, 8) - TEST_TARGET_SIZE (LPGRADIENT_TRIANGLE, 12) - TEST_TARGET_ALIGN(LPGRADIENT_TRIANGLE, 4) -} - -static void test_pack_LPHANDLETABLE(void) -{ - /* LPHANDLETABLE */ - TEST_TYPE_SIZE (LPHANDLETABLE, 8) - TEST_TYPE_ALIGN (LPHANDLETABLE, 8) - TEST_TARGET_SIZE (LPHANDLETABLE, 8) - TEST_TARGET_ALIGN(LPHANDLETABLE, 8) -} - -static void test_pack_LPKERNINGPAIR(void) -{ - /* LPKERNINGPAIR */ - TEST_TYPE_SIZE (LPKERNINGPAIR, 8) - TEST_TYPE_ALIGN (LPKERNINGPAIR, 8) - TEST_TARGET_SIZE (LPKERNINGPAIR, 8) - TEST_TARGET_ALIGN(LPKERNINGPAIR, 4) -} - -static void test_pack_LPLAYERPLANEDESCRIPTOR(void) -{ - /* LPLAYERPLANEDESCRIPTOR */ - TEST_TYPE_SIZE (LPLAYERPLANEDESCRIPTOR, 8) - TEST_TYPE_ALIGN (LPLAYERPLANEDESCRIPTOR, 8) - TEST_TARGET_SIZE (LPLAYERPLANEDESCRIPTOR, 32) - TEST_TARGET_ALIGN(LPLAYERPLANEDESCRIPTOR, 4) -} - -static void test_pack_LPLOCALESIGNATURE(void) -{ - /* LPLOCALESIGNATURE */ - TEST_TYPE_SIZE (LPLOCALESIGNATURE, 8) - TEST_TYPE_ALIGN (LPLOCALESIGNATURE, 8) - TEST_TARGET_SIZE (LPLOCALESIGNATURE, 32) - TEST_TARGET_ALIGN(LPLOCALESIGNATURE, 4) -} - -static void test_pack_LPLOGBRUSH(void) -{ - /* LPLOGBRUSH */ - TEST_TYPE_SIZE (LPLOGBRUSH, 8) - TEST_TYPE_ALIGN (LPLOGBRUSH, 8) - TEST_TARGET_SIZE (LPLOGBRUSH, 16) - TEST_TARGET_ALIGN(LPLOGBRUSH, 8) -} - -static void test_pack_LPLOGCOLORSPACEA(void) -{ - /* LPLOGCOLORSPACEA */ - TEST_TYPE_SIZE (LPLOGCOLORSPACEA, 8) - TEST_TYPE_ALIGN (LPLOGCOLORSPACEA, 8) - TEST_TARGET_SIZE (LPLOGCOLORSPACEA, 328) - TEST_TARGET_ALIGN(LPLOGCOLORSPACEA, 4) -} - -static void test_pack_LPLOGCOLORSPACEW(void) -{ - /* LPLOGCOLORSPACEW */ - TEST_TYPE_SIZE (LPLOGCOLORSPACEW, 8) - TEST_TYPE_ALIGN (LPLOGCOLORSPACEW, 8) - TEST_TARGET_SIZE (LPLOGCOLORSPACEW, 588) - TEST_TARGET_ALIGN(LPLOGCOLORSPACEW, 4) -} - -static void test_pack_LPLOGFONTA(void) -{ - /* LPLOGFONTA */ - TEST_TYPE_SIZE (LPLOGFONTA, 8) - TEST_TYPE_ALIGN (LPLOGFONTA, 8) - TEST_TARGET_SIZE (LPLOGFONTA, 60) - TEST_TARGET_ALIGN(LPLOGFONTA, 4) -} - -static void test_pack_LPLOGFONTW(void) -{ - /* LPLOGFONTW */ - TEST_TYPE_SIZE (LPLOGFONTW, 8) - TEST_TYPE_ALIGN (LPLOGFONTW, 8) - TEST_TARGET_SIZE (LPLOGFONTW, 92) - TEST_TARGET_ALIGN(LPLOGFONTW, 4) -} - -static void test_pack_LPLOGPEN(void) -{ - /* LPLOGPEN */ - TEST_TYPE_SIZE (LPLOGPEN, 8) - TEST_TYPE_ALIGN (LPLOGPEN, 8) - TEST_TARGET_SIZE (LPLOGPEN, 16) - TEST_TARGET_ALIGN(LPLOGPEN, 4) -} - -static void test_pack_LPMAT2(void) -{ - /* LPMAT2 */ - TEST_TYPE_SIZE (LPMAT2, 8) - TEST_TYPE_ALIGN (LPMAT2, 8) - TEST_TARGET_SIZE (LPMAT2, 16) - TEST_TARGET_ALIGN(LPMAT2, 2) -} - -static void test_pack_LPMETAFILEPICT(void) -{ - /* LPMETAFILEPICT */ - TEST_TYPE_SIZE (LPMETAFILEPICT, 8) - TEST_TYPE_ALIGN (LPMETAFILEPICT, 8) - TEST_TARGET_SIZE (LPMETAFILEPICT, 24) - TEST_TARGET_ALIGN(LPMETAFILEPICT, 8) -} - -static void test_pack_LPMETAHEADER(void) -{ - /* LPMETAHEADER */ - TEST_TYPE_SIZE (LPMETAHEADER, 8) - TEST_TYPE_ALIGN (LPMETAHEADER, 8) - TEST_TARGET_SIZE (LPMETAHEADER, 18) - TEST_TARGET_ALIGN(LPMETAHEADER, 2) -} - -static void test_pack_LPMETARECORD(void) -{ - /* LPMETARECORD */ - TEST_TYPE_SIZE (LPMETARECORD, 8) - TEST_TYPE_ALIGN (LPMETARECORD, 8) - TEST_TARGET_SIZE (LPMETARECORD, 8) - TEST_TARGET_ALIGN(LPMETARECORD, 4) -} - -static void test_pack_LPNEWTEXTMETRICA(void) -{ - /* LPNEWTEXTMETRICA */ - TEST_TYPE_SIZE (LPNEWTEXTMETRICA, 8) - TEST_TYPE_ALIGN (LPNEWTEXTMETRICA, 8) - TEST_TARGET_SIZE (LPNEWTEXTMETRICA, 72) - TEST_TARGET_ALIGN(LPNEWTEXTMETRICA, 4) -} - -static void test_pack_LPNEWTEXTMETRICW(void) -{ - /* LPNEWTEXTMETRICW */ - TEST_TYPE_SIZE (LPNEWTEXTMETRICW, 8) - TEST_TYPE_ALIGN (LPNEWTEXTMETRICW, 8) - TEST_TARGET_SIZE (LPNEWTEXTMETRICW, 76) - TEST_TARGET_ALIGN(LPNEWTEXTMETRICW, 4) -} - -static void test_pack_LPOUTLINETEXTMETRICA(void) -{ - /* LPOUTLINETEXTMETRICA */ - TEST_TYPE_SIZE (LPOUTLINETEXTMETRICA, 8) - TEST_TYPE_ALIGN (LPOUTLINETEXTMETRICA, 8) - TEST_TARGET_SIZE (LPOUTLINETEXTMETRICA, 232) - TEST_TARGET_ALIGN(LPOUTLINETEXTMETRICA, 8) -} - -static void test_pack_LPOUTLINETEXTMETRICW(void) -{ - /* LPOUTLINETEXTMETRICW */ - TEST_TYPE_SIZE (LPOUTLINETEXTMETRICW, 8) - TEST_TYPE_ALIGN (LPOUTLINETEXTMETRICW, 8) - TEST_TARGET_SIZE (LPOUTLINETEXTMETRICW, 232) - TEST_TARGET_ALIGN(LPOUTLINETEXTMETRICW, 8) -} - -static void test_pack_LPPANOSE(void) -{ - /* LPPANOSE */ - TEST_TYPE_SIZE (LPPANOSE, 8) - TEST_TYPE_ALIGN (LPPANOSE, 8) - TEST_TARGET_SIZE (LPPANOSE, 10) - TEST_TARGET_ALIGN(LPPANOSE, 1) -} - -static void test_pack_LPPELARRAY(void) -{ - /* LPPELARRAY */ - TEST_TYPE_SIZE (LPPELARRAY, 8) - TEST_TYPE_ALIGN (LPPELARRAY, 8) - TEST_TARGET_SIZE (LPPELARRAY, 20) - TEST_TARGET_ALIGN(LPPELARRAY, 4) -} - -static void test_pack_LPPIXELFORMATDESCRIPTOR(void) -{ - /* LPPIXELFORMATDESCRIPTOR */ - TEST_TYPE_SIZE (LPPIXELFORMATDESCRIPTOR, 8) - TEST_TYPE_ALIGN (LPPIXELFORMATDESCRIPTOR, 8) - TEST_TARGET_SIZE (LPPIXELFORMATDESCRIPTOR, 40) - TEST_TARGET_ALIGN(LPPIXELFORMATDESCRIPTOR, 4) -} - -static void test_pack_LPPOINTFX(void) -{ - /* LPPOINTFX */ - TEST_TYPE_SIZE (LPPOINTFX, 8) - TEST_TYPE_ALIGN (LPPOINTFX, 8) - TEST_TARGET_SIZE (LPPOINTFX, 8) - TEST_TARGET_ALIGN(LPPOINTFX, 2) -} - -static void test_pack_LPPOLYTEXTA(void) -{ - /* LPPOLYTEXTA */ - TEST_TYPE_SIZE (LPPOLYTEXTA, 8) - TEST_TYPE_ALIGN (LPPOLYTEXTA, 8) - TEST_TARGET_SIZE (LPPOLYTEXTA, 56) - TEST_TARGET_ALIGN(LPPOLYTEXTA, 8) -} - -static void test_pack_LPPOLYTEXTW(void) -{ - /* LPPOLYTEXTW */ - TEST_TYPE_SIZE (LPPOLYTEXTW, 8) - TEST_TYPE_ALIGN (LPPOLYTEXTW, 8) - TEST_TARGET_SIZE (LPPOLYTEXTW, 56) - TEST_TARGET_ALIGN(LPPOLYTEXTW, 8) -} - -static void test_pack_LPRASTERIZER_STATUS(void) -{ - /* LPRASTERIZER_STATUS */ - TEST_TYPE_SIZE (LPRASTERIZER_STATUS, 8) - TEST_TYPE_ALIGN (LPRASTERIZER_STATUS, 8) - TEST_TARGET_SIZE (LPRASTERIZER_STATUS, 6) - TEST_TARGET_ALIGN(LPRASTERIZER_STATUS, 2) -} - -static void test_pack_LPRGBQUAD(void) -{ - /* LPRGBQUAD */ - TEST_TYPE_SIZE (LPRGBQUAD, 8) - TEST_TYPE_ALIGN (LPRGBQUAD, 8) - TEST_TARGET_SIZE (LPRGBQUAD, 4) - TEST_TARGET_ALIGN(LPRGBQUAD, 1) -} - -static void test_pack_LPRGNDATA(void) -{ - /* LPRGNDATA */ - TEST_TYPE_SIZE (LPRGNDATA, 8) - TEST_TYPE_ALIGN (LPRGNDATA, 8) - TEST_TARGET_SIZE (LPRGNDATA, 36) - TEST_TARGET_ALIGN(LPRGNDATA, 4) -} - -static void test_pack_LPTEXTMETRICA(void) -{ - /* LPTEXTMETRICA */ - TEST_TYPE_SIZE (LPTEXTMETRICA, 8) - TEST_TYPE_ALIGN (LPTEXTMETRICA, 8) - TEST_TARGET_SIZE (LPTEXTMETRICA, 56) - TEST_TARGET_ALIGN(LPTEXTMETRICA, 4) -} - -static void test_pack_LPTEXTMETRICW(void) -{ - /* LPTEXTMETRICW */ - TEST_TYPE_SIZE (LPTEXTMETRICW, 8) - TEST_TYPE_ALIGN (LPTEXTMETRICW, 8) - TEST_TARGET_SIZE (LPTEXTMETRICW, 60) - TEST_TARGET_ALIGN(LPTEXTMETRICW, 4) -} - -static void test_pack_LPTRIVERTEX(void) -{ - /* LPTRIVERTEX */ - TEST_TYPE_SIZE (LPTRIVERTEX, 8) - TEST_TYPE_ALIGN (LPTRIVERTEX, 8) - TEST_TARGET_SIZE (LPTRIVERTEX, 16) - TEST_TARGET_ALIGN(LPTRIVERTEX, 4) -} - -static void test_pack_LPTTPOLYCURVE(void) -{ - /* LPTTPOLYCURVE */ - TEST_TYPE_SIZE (LPTTPOLYCURVE, 8) - TEST_TYPE_ALIGN (LPTTPOLYCURVE, 8) - TEST_TARGET_SIZE (LPTTPOLYCURVE, 12) - TEST_TARGET_ALIGN(LPTTPOLYCURVE, 2) -} - -static void test_pack_LPTTPOLYGONHEADER(void) -{ - /* LPTTPOLYGONHEADER */ - TEST_TYPE_SIZE (LPTTPOLYGONHEADER, 8) - TEST_TYPE_ALIGN (LPTTPOLYGONHEADER, 8) - TEST_TARGET_SIZE (LPTTPOLYGONHEADER, 16) - TEST_TARGET_ALIGN(LPTTPOLYGONHEADER, 4) -} - -static void test_pack_LPXFORM(void) -{ - /* LPXFORM */ - TEST_TYPE_SIZE (LPXFORM, 8) - TEST_TYPE_ALIGN (LPXFORM, 8) - TEST_TARGET_SIZE (LPXFORM, 24) - TEST_TARGET_ALIGN(LPXFORM, 4) -} - -static void test_pack_MAT2(void) -{ - /* MAT2 */ - TEST_TYPE_SIZE (MAT2, 16) - TEST_TYPE_ALIGN (MAT2, 2) - TEST_FIELD_SIZE (MAT2, eM11, 4) - TEST_FIELD_ALIGN (MAT2, eM11, 2) - TEST_FIELD_OFFSET(MAT2, eM11, 0) - TEST_FIELD_SIZE (MAT2, eM12, 4) - TEST_FIELD_ALIGN (MAT2, eM12, 2) - TEST_FIELD_OFFSET(MAT2, eM12, 4) - TEST_FIELD_SIZE (MAT2, eM21, 4) - TEST_FIELD_ALIGN (MAT2, eM21, 2) - TEST_FIELD_OFFSET(MAT2, eM21, 8) - TEST_FIELD_SIZE (MAT2, eM22, 4) - TEST_FIELD_ALIGN (MAT2, eM22, 2) - TEST_FIELD_OFFSET(MAT2, eM22, 12) -} - -static void test_pack_METAFILEPICT(void) -{ - /* METAFILEPICT */ - TEST_TYPE_SIZE (METAFILEPICT, 24) - TEST_TYPE_ALIGN (METAFILEPICT, 8) - TEST_FIELD_SIZE (METAFILEPICT, mm, 4) - TEST_FIELD_ALIGN (METAFILEPICT, mm, 4) - TEST_FIELD_OFFSET(METAFILEPICT, mm, 0) - TEST_FIELD_SIZE (METAFILEPICT, xExt, 4) - TEST_FIELD_ALIGN (METAFILEPICT, xExt, 4) - TEST_FIELD_OFFSET(METAFILEPICT, xExt, 4) - TEST_FIELD_SIZE (METAFILEPICT, yExt, 4) - TEST_FIELD_ALIGN (METAFILEPICT, yExt, 4) - TEST_FIELD_OFFSET(METAFILEPICT, yExt, 8) - TEST_FIELD_SIZE (METAFILEPICT, hMF, 8) - TEST_FIELD_ALIGN (METAFILEPICT, hMF, 8) - TEST_FIELD_OFFSET(METAFILEPICT, hMF, 16) -} - -static void test_pack_METAHEADER(void) -{ - /* METAHEADER (pack 2) */ - TEST_TYPE_SIZE (METAHEADER, 18) - TEST_TYPE_ALIGN (METAHEADER, 2) - TEST_FIELD_SIZE (METAHEADER, mtType, 2) - TEST_FIELD_ALIGN (METAHEADER, mtType, 2) - TEST_FIELD_OFFSET(METAHEADER, mtType, 0) - TEST_FIELD_SIZE (METAHEADER, mtHeaderSize, 2) - TEST_FIELD_ALIGN (METAHEADER, mtHeaderSize, 2) - TEST_FIELD_OFFSET(METAHEADER, mtHeaderSize, 2) - TEST_FIELD_SIZE (METAHEADER, mtVersion, 2) - TEST_FIELD_ALIGN (METAHEADER, mtVersion, 2) - TEST_FIELD_OFFSET(METAHEADER, mtVersion, 4) - TEST_FIELD_SIZE (METAHEADER, mtSize, 4) - TEST_FIELD_ALIGN (METAHEADER, mtSize, 2) - TEST_FIELD_OFFSET(METAHEADER, mtSize, 6) - TEST_FIELD_SIZE (METAHEADER, mtNoObjects, 2) - TEST_FIELD_ALIGN (METAHEADER, mtNoObjects, 2) - TEST_FIELD_OFFSET(METAHEADER, mtNoObjects, 10) - TEST_FIELD_SIZE (METAHEADER, mtMaxRecord, 4) - TEST_FIELD_ALIGN (METAHEADER, mtMaxRecord, 2) - TEST_FIELD_OFFSET(METAHEADER, mtMaxRecord, 12) - TEST_FIELD_SIZE (METAHEADER, mtNoParameters, 2) - TEST_FIELD_ALIGN (METAHEADER, mtNoParameters, 2) - TEST_FIELD_OFFSET(METAHEADER, mtNoParameters, 16) -} - -static void test_pack_METARECORD(void) -{ - /* METARECORD */ - TEST_TYPE_SIZE (METARECORD, 8) - TEST_TYPE_ALIGN (METARECORD, 4) - TEST_FIELD_SIZE (METARECORD, rdSize, 4) - TEST_FIELD_ALIGN (METARECORD, rdSize, 4) - TEST_FIELD_OFFSET(METARECORD, rdSize, 0) - TEST_FIELD_SIZE (METARECORD, rdFunction, 2) - TEST_FIELD_ALIGN (METARECORD, rdFunction, 2) - TEST_FIELD_OFFSET(METARECORD, rdFunction, 4) - TEST_FIELD_SIZE (METARECORD, rdParm, 2) - TEST_FIELD_ALIGN (METARECORD, rdParm, 2) - TEST_FIELD_OFFSET(METARECORD, rdParm, 6) -} - -static void test_pack_MFENUMPROC(void) -{ - /* MFENUMPROC */ - TEST_TYPE_SIZE (MFENUMPROC, 8) - TEST_TYPE_ALIGN (MFENUMPROC, 8) -} - -static void test_pack_NEWTEXTMETRICA(void) -{ - /* NEWTEXTMETRICA */ - TEST_TYPE_SIZE (NEWTEXTMETRICA, 72) - TEST_TYPE_ALIGN (NEWTEXTMETRICA, 4) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmHeight, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmHeight, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmHeight, 0) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmAscent, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmAscent, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmAscent, 4) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmDescent, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmDescent, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmDescent, 8) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmInternalLeading, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmInternalLeading, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmInternalLeading, 12) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmExternalLeading, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmExternalLeading, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmExternalLeading, 16) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmAveCharWidth, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmAveCharWidth, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmAveCharWidth, 20) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmMaxCharWidth, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmMaxCharWidth, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmMaxCharWidth, 24) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmWeight, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmWeight, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmWeight, 28) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmOverhang, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmOverhang, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmOverhang, 32) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmDigitizedAspectX, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmDigitizedAspectX, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmDigitizedAspectX, 36) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmDigitizedAspectY, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmDigitizedAspectY, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmDigitizedAspectY, 40) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmFirstChar, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmFirstChar, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmFirstChar, 44) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmLastChar, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmLastChar, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmLastChar, 45) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmDefaultChar, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmDefaultChar, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmDefaultChar, 46) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmBreakChar, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmBreakChar, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmBreakChar, 47) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmItalic, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmItalic, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmItalic, 48) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmUnderlined, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmUnderlined, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmUnderlined, 49) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmStruckOut, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmStruckOut, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmStruckOut, 50) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmPitchAndFamily, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmPitchAndFamily, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmPitchAndFamily, 51) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmCharSet, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmCharSet, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmCharSet, 52) - TEST_FIELD_SIZE (NEWTEXTMETRICA, ntmFlags, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, ntmFlags, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, ntmFlags, 56) - TEST_FIELD_SIZE (NEWTEXTMETRICA, ntmSizeEM, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, ntmSizeEM, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, ntmSizeEM, 60) - TEST_FIELD_SIZE (NEWTEXTMETRICA, ntmCellHeight, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, ntmCellHeight, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, ntmCellHeight, 64) - TEST_FIELD_SIZE (NEWTEXTMETRICA, ntmAvgWidth, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, ntmAvgWidth, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, ntmAvgWidth, 68) -} - -static void test_pack_NEWTEXTMETRICEXA(void) -{ - /* NEWTEXTMETRICEXA */ - TEST_TYPE_SIZE (NEWTEXTMETRICEXA, 96) - TEST_TYPE_ALIGN (NEWTEXTMETRICEXA, 4) - TEST_FIELD_SIZE (NEWTEXTMETRICEXA, ntmTm, 72) - TEST_FIELD_ALIGN (NEWTEXTMETRICEXA, ntmTm, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICEXA, ntmTm, 0) - TEST_FIELD_SIZE (NEWTEXTMETRICEXA, ntmFontSig, 24) - TEST_FIELD_ALIGN (NEWTEXTMETRICEXA, ntmFontSig, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICEXA, ntmFontSig, 72) -} - -static void test_pack_NEWTEXTMETRICEXW(void) -{ - /* NEWTEXTMETRICEXW */ - TEST_TYPE_SIZE (NEWTEXTMETRICEXW, 100) - TEST_TYPE_ALIGN (NEWTEXTMETRICEXW, 4) - TEST_FIELD_SIZE (NEWTEXTMETRICEXW, ntmTm, 76) - TEST_FIELD_ALIGN (NEWTEXTMETRICEXW, ntmTm, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICEXW, ntmTm, 0) - TEST_FIELD_SIZE (NEWTEXTMETRICEXW, ntmFontSig, 24) - TEST_FIELD_ALIGN (NEWTEXTMETRICEXW, ntmFontSig, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICEXW, ntmFontSig, 76) -} - -static void test_pack_NEWTEXTMETRICW(void) -{ - /* NEWTEXTMETRICW */ - TEST_TYPE_SIZE (NEWTEXTMETRICW, 76) - TEST_TYPE_ALIGN (NEWTEXTMETRICW, 4) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmHeight, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmHeight, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmHeight, 0) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmAscent, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmAscent, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmAscent, 4) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmDescent, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmDescent, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmDescent, 8) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmInternalLeading, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmInternalLeading, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmInternalLeading, 12) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmExternalLeading, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmExternalLeading, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmExternalLeading, 16) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmAveCharWidth, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmAveCharWidth, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmAveCharWidth, 20) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmMaxCharWidth, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmMaxCharWidth, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmMaxCharWidth, 24) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmWeight, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmWeight, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmWeight, 28) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmOverhang, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmOverhang, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmOverhang, 32) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmDigitizedAspectX, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmDigitizedAspectX, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmDigitizedAspectX, 36) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmDigitizedAspectY, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmDigitizedAspectY, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmDigitizedAspectY, 40) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmFirstChar, 2) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmFirstChar, 2) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmFirstChar, 44) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmLastChar, 2) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmLastChar, 2) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmLastChar, 46) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmDefaultChar, 2) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmDefaultChar, 2) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmDefaultChar, 48) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmBreakChar, 2) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmBreakChar, 2) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmBreakChar, 50) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmItalic, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmItalic, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmItalic, 52) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmUnderlined, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmUnderlined, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmUnderlined, 53) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmStruckOut, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmStruckOut, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmStruckOut, 54) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmPitchAndFamily, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmPitchAndFamily, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmPitchAndFamily, 55) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmCharSet, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmCharSet, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmCharSet, 56) - TEST_FIELD_SIZE (NEWTEXTMETRICW, ntmFlags, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, ntmFlags, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, ntmFlags, 60) - TEST_FIELD_SIZE (NEWTEXTMETRICW, ntmSizeEM, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, ntmSizeEM, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, ntmSizeEM, 64) - TEST_FIELD_SIZE (NEWTEXTMETRICW, ntmCellHeight, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, ntmCellHeight, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, ntmCellHeight, 68) - TEST_FIELD_SIZE (NEWTEXTMETRICW, ntmAvgWidth, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, ntmAvgWidth, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, ntmAvgWidth, 72) -} - -static void test_pack_NPEXTLOGPEN(void) -{ - /* NPEXTLOGPEN */ - TEST_TYPE_SIZE (NPEXTLOGPEN, 8) - TEST_TYPE_ALIGN (NPEXTLOGPEN, 8) - TEST_TARGET_SIZE (NPEXTLOGPEN, 32) - TEST_TARGET_ALIGN(NPEXTLOGPEN, 8) -} - -static void test_pack_OLDFONTENUMPROC(void) -{ - /* OLDFONTENUMPROC */ - TEST_TYPE_SIZE (OLDFONTENUMPROC, 8) - TEST_TYPE_ALIGN (OLDFONTENUMPROC, 8) -} - -static void test_pack_OLDFONTENUMPROCA(void) -{ - /* OLDFONTENUMPROCA */ - TEST_TYPE_SIZE (OLDFONTENUMPROCA, 8) - TEST_TYPE_ALIGN (OLDFONTENUMPROCA, 8) -} - -static void test_pack_OLDFONTENUMPROCW(void) -{ - /* OLDFONTENUMPROCW */ - TEST_TYPE_SIZE (OLDFONTENUMPROCW, 8) - TEST_TYPE_ALIGN (OLDFONTENUMPROCW, 8) -} - -static void test_pack_OUTLINETEXTMETRICA(void) -{ - /* OUTLINETEXTMETRICA */ - TEST_TYPE_SIZE (OUTLINETEXTMETRICA, 232) - TEST_TYPE_ALIGN (OUTLINETEXTMETRICA, 8) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmSize, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmSize, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmSize, 0) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmTextMetrics, 56) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmTextMetrics, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmTextMetrics, 4) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmFiller, 1) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmFiller, 1) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmFiller, 60) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmPanoseNumber, 10) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmPanoseNumber, 1) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmPanoseNumber, 61) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmfsSelection, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmfsSelection, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmfsSelection, 72) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmfsType, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmfsType, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmfsType, 76) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmsCharSlopeRise, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmsCharSlopeRise, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmsCharSlopeRise, 80) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmsCharSlopeRun, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmsCharSlopeRun, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmsCharSlopeRun, 84) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmItalicAngle, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmItalicAngle, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmItalicAngle, 88) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmEMSquare, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmEMSquare, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmEMSquare, 92) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmAscent, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmAscent, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmAscent, 96) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmDescent, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmDescent, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmDescent, 100) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmLineGap, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmLineGap, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmLineGap, 104) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmsCapEmHeight, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmsCapEmHeight, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmsCapEmHeight, 108) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmsXHeight, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmsXHeight, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmsXHeight, 112) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmrcFontBox, 16) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmrcFontBox, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmrcFontBox, 116) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmMacAscent, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmMacAscent, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmMacAscent, 132) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmMacDescent, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmMacDescent, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmMacDescent, 136) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmMacLineGap, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmMacLineGap, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmMacLineGap, 140) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmusMinimumPPEM, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmusMinimumPPEM, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmusMinimumPPEM, 144) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmptSubscriptSize, 8) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmptSubscriptSize, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmptSubscriptSize, 148) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmptSubscriptOffset, 8) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmptSubscriptOffset, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmptSubscriptOffset, 156) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmptSuperscriptSize, 8) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmptSuperscriptSize, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmptSuperscriptSize, 164) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmptSuperscriptOffset, 8) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmptSuperscriptOffset, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmptSuperscriptOffset, 172) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmsStrikeoutSize, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmsStrikeoutSize, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmsStrikeoutSize, 180) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmsStrikeoutPosition, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmsStrikeoutPosition, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmsStrikeoutPosition, 184) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmsUnderscoreSize, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmsUnderscoreSize, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmsUnderscoreSize, 188) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmsUnderscorePosition, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmsUnderscorePosition, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmsUnderscorePosition, 192) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmpFamilyName, 8) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmpFamilyName, 8) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmpFamilyName, 200) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmpFaceName, 8) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmpFaceName, 8) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmpFaceName, 208) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmpStyleName, 8) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmpStyleName, 8) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmpStyleName, 216) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmpFullName, 8) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmpFullName, 8) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmpFullName, 224) -} - -static void test_pack_OUTLINETEXTMETRICW(void) -{ - /* OUTLINETEXTMETRICW */ - TEST_TYPE_SIZE (OUTLINETEXTMETRICW, 232) - TEST_TYPE_ALIGN (OUTLINETEXTMETRICW, 8) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmSize, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmSize, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmSize, 0) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmTextMetrics, 60) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmTextMetrics, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmTextMetrics, 4) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmFiller, 1) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmFiller, 1) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmFiller, 64) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmPanoseNumber, 10) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmPanoseNumber, 1) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmPanoseNumber, 65) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmfsSelection, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmfsSelection, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmfsSelection, 76) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmfsType, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmfsType, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmfsType, 80) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmsCharSlopeRise, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmsCharSlopeRise, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmsCharSlopeRise, 84) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmsCharSlopeRun, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmsCharSlopeRun, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmsCharSlopeRun, 88) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmItalicAngle, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmItalicAngle, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmItalicAngle, 92) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmEMSquare, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmEMSquare, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmEMSquare, 96) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmAscent, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmAscent, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmAscent, 100) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmDescent, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmDescent, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmDescent, 104) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmLineGap, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmLineGap, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmLineGap, 108) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmsCapEmHeight, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmsCapEmHeight, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmsCapEmHeight, 112) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmsXHeight, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmsXHeight, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmsXHeight, 116) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmrcFontBox, 16) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmrcFontBox, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmrcFontBox, 120) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmMacAscent, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmMacAscent, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmMacAscent, 136) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmMacDescent, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmMacDescent, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmMacDescent, 140) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmMacLineGap, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmMacLineGap, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmMacLineGap, 144) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmusMinimumPPEM, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmusMinimumPPEM, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmusMinimumPPEM, 148) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmptSubscriptSize, 8) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmptSubscriptSize, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmptSubscriptSize, 152) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmptSubscriptOffset, 8) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmptSubscriptOffset, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmptSubscriptOffset, 160) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmptSuperscriptSize, 8) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmptSuperscriptSize, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmptSuperscriptSize, 168) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmptSuperscriptOffset, 8) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmptSuperscriptOffset, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmptSuperscriptOffset, 176) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmsStrikeoutSize, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmsStrikeoutSize, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmsStrikeoutSize, 184) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmsStrikeoutPosition, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmsStrikeoutPosition, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmsStrikeoutPosition, 188) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmsUnderscoreSize, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmsUnderscoreSize, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmsUnderscoreSize, 192) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmsUnderscorePosition, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmsUnderscorePosition, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmsUnderscorePosition, 196) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmpFamilyName, 8) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmpFamilyName, 8) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmpFamilyName, 200) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmpFaceName, 8) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmpFaceName, 8) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmpFaceName, 208) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmpStyleName, 8) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmpStyleName, 8) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmpStyleName, 216) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmpFullName, 8) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmpFullName, 8) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmpFullName, 224) -} - -static void test_pack_PABC(void) -{ - /* PABC */ - TEST_TYPE_SIZE (PABC, 8) - TEST_TYPE_ALIGN (PABC, 8) - TEST_TARGET_SIZE (PABC, 12) - TEST_TARGET_ALIGN(PABC, 4) -} - -static void test_pack_PABCFLOAT(void) -{ - /* PABCFLOAT */ - TEST_TYPE_SIZE (PABCFLOAT, 8) - TEST_TYPE_ALIGN (PABCFLOAT, 8) - TEST_TARGET_SIZE (PABCFLOAT, 12) - TEST_TARGET_ALIGN(PABCFLOAT, 4) -} - -static void test_pack_PANOSE(void) -{ - /* PANOSE */ - TEST_TYPE_SIZE (PANOSE, 10) - TEST_TYPE_ALIGN (PANOSE, 1) - TEST_FIELD_SIZE (PANOSE, bFamilyType, 1) - TEST_FIELD_ALIGN (PANOSE, bFamilyType, 1) - TEST_FIELD_OFFSET(PANOSE, bFamilyType, 0) - TEST_FIELD_SIZE (PANOSE, bSerifStyle, 1) - TEST_FIELD_ALIGN (PANOSE, bSerifStyle, 1) - TEST_FIELD_OFFSET(PANOSE, bSerifStyle, 1) - TEST_FIELD_SIZE (PANOSE, bWeight, 1) - TEST_FIELD_ALIGN (PANOSE, bWeight, 1) - TEST_FIELD_OFFSET(PANOSE, bWeight, 2) - TEST_FIELD_SIZE (PANOSE, bProportion, 1) - TEST_FIELD_ALIGN (PANOSE, bProportion, 1) - TEST_FIELD_OFFSET(PANOSE, bProportion, 3) - TEST_FIELD_SIZE (PANOSE, bContrast, 1) - TEST_FIELD_ALIGN (PANOSE, bContrast, 1) - TEST_FIELD_OFFSET(PANOSE, bContrast, 4) - TEST_FIELD_SIZE (PANOSE, bStrokeVariation, 1) - TEST_FIELD_ALIGN (PANOSE, bStrokeVariation, 1) - TEST_FIELD_OFFSET(PANOSE, bStrokeVariation, 5) - TEST_FIELD_SIZE (PANOSE, bArmStyle, 1) - TEST_FIELD_ALIGN (PANOSE, bArmStyle, 1) - TEST_FIELD_OFFSET(PANOSE, bArmStyle, 6) - TEST_FIELD_SIZE (PANOSE, bLetterform, 1) - TEST_FIELD_ALIGN (PANOSE, bLetterform, 1) - TEST_FIELD_OFFSET(PANOSE, bLetterform, 7) - TEST_FIELD_SIZE (PANOSE, bMidline, 1) - TEST_FIELD_ALIGN (PANOSE, bMidline, 1) - TEST_FIELD_OFFSET(PANOSE, bMidline, 8) - TEST_FIELD_SIZE (PANOSE, bXHeight, 1) - TEST_FIELD_ALIGN (PANOSE, bXHeight, 1) - TEST_FIELD_OFFSET(PANOSE, bXHeight, 9) -} - -static void test_pack_PATTERN(void) -{ - /* PATTERN */ - TEST_TYPE_SIZE (PATTERN, 16) - TEST_TYPE_ALIGN (PATTERN, 8) -} - -static void test_pack_PBITMAP(void) -{ - /* PBITMAP */ - TEST_TYPE_SIZE (PBITMAP, 8) - TEST_TYPE_ALIGN (PBITMAP, 8) - TEST_TARGET_SIZE (PBITMAP, 32) - TEST_TARGET_ALIGN(PBITMAP, 8) -} - -static void test_pack_PBITMAPCOREHEADER(void) -{ - /* PBITMAPCOREHEADER */ - TEST_TYPE_SIZE (PBITMAPCOREHEADER, 8) - TEST_TYPE_ALIGN (PBITMAPCOREHEADER, 8) - TEST_TARGET_SIZE (PBITMAPCOREHEADER, 12) - TEST_TARGET_ALIGN(PBITMAPCOREHEADER, 4) -} - -static void test_pack_PBITMAPCOREINFO(void) -{ - /* PBITMAPCOREINFO */ - TEST_TYPE_SIZE (PBITMAPCOREINFO, 8) - TEST_TYPE_ALIGN (PBITMAPCOREINFO, 8) - TEST_TARGET_SIZE (PBITMAPCOREINFO, 16) - TEST_TARGET_ALIGN(PBITMAPCOREINFO, 4) -} - -static void test_pack_PBITMAPFILEHEADER(void) -{ - /* PBITMAPFILEHEADER */ - TEST_TYPE_SIZE (PBITMAPFILEHEADER, 8) - TEST_TYPE_ALIGN (PBITMAPFILEHEADER, 8) - TEST_TARGET_SIZE (PBITMAPFILEHEADER, 14) - TEST_TARGET_ALIGN(PBITMAPFILEHEADER, 2) -} - -static void test_pack_PBITMAPINFO(void) -{ - /* PBITMAPINFO */ - TEST_TYPE_SIZE (PBITMAPINFO, 8) - TEST_TYPE_ALIGN (PBITMAPINFO, 8) - TEST_TARGET_SIZE (PBITMAPINFO, 44) - TEST_TARGET_ALIGN(PBITMAPINFO, 4) -} - -static void test_pack_PBITMAPINFOHEADER(void) -{ - /* PBITMAPINFOHEADER */ - TEST_TYPE_SIZE (PBITMAPINFOHEADER, 8) - TEST_TYPE_ALIGN (PBITMAPINFOHEADER, 8) - TEST_TARGET_SIZE (PBITMAPINFOHEADER, 40) - TEST_TARGET_ALIGN(PBITMAPINFOHEADER, 4) -} - -static void test_pack_PBITMAPV4HEADER(void) -{ - /* PBITMAPV4HEADER */ - TEST_TYPE_SIZE (PBITMAPV4HEADER, 8) - TEST_TYPE_ALIGN (PBITMAPV4HEADER, 8) - TEST_TARGET_SIZE (PBITMAPV4HEADER, 108) - TEST_TARGET_ALIGN(PBITMAPV4HEADER, 4) -} - -static void test_pack_PBITMAPV5HEADER(void) -{ - /* PBITMAPV5HEADER */ - TEST_TYPE_SIZE (PBITMAPV5HEADER, 8) - TEST_TYPE_ALIGN (PBITMAPV5HEADER, 8) - TEST_TARGET_SIZE (PBITMAPV5HEADER, 124) - TEST_TARGET_ALIGN(PBITMAPV5HEADER, 4) -} - -static void test_pack_PBLENDFUNCTION(void) -{ - /* PBLENDFUNCTION */ - TEST_TYPE_SIZE (PBLENDFUNCTION, 8) - TEST_TYPE_ALIGN (PBLENDFUNCTION, 8) - TEST_TARGET_SIZE (PBLENDFUNCTION, 4) - TEST_TARGET_ALIGN(PBLENDFUNCTION, 1) -} - -static void test_pack_PCHARSETINFO(void) -{ - /* PCHARSETINFO */ - TEST_TYPE_SIZE (PCHARSETINFO, 8) - TEST_TYPE_ALIGN (PCHARSETINFO, 8) - TEST_TARGET_SIZE (PCHARSETINFO, 32) - TEST_TARGET_ALIGN(PCHARSETINFO, 4) -} - -static void test_pack_PCOLORADJUSTMENT(void) -{ - /* PCOLORADJUSTMENT */ - TEST_TYPE_SIZE (PCOLORADJUSTMENT, 8) - TEST_TYPE_ALIGN (PCOLORADJUSTMENT, 8) - TEST_TARGET_SIZE (PCOLORADJUSTMENT, 24) - TEST_TARGET_ALIGN(PCOLORADJUSTMENT, 2) -} - -static void test_pack_PDEVMODEA(void) -{ - /* PDEVMODEA */ - TEST_TYPE_SIZE (PDEVMODEA, 8) - TEST_TYPE_ALIGN (PDEVMODEA, 8) -} - -static void test_pack_PDEVMODEW(void) -{ - /* PDEVMODEW */ - TEST_TYPE_SIZE (PDEVMODEW, 8) - TEST_TYPE_ALIGN (PDEVMODEW, 8) -} - -static void test_pack_PDIBSECTION(void) -{ - /* PDIBSECTION */ - TEST_TYPE_SIZE (PDIBSECTION, 8) - TEST_TYPE_ALIGN (PDIBSECTION, 8) - TEST_TARGET_SIZE (PDIBSECTION, 104) - TEST_TARGET_ALIGN(PDIBSECTION, 8) -} - -static void test_pack_PDISPLAY_DEVICEA(void) -{ - /* PDISPLAY_DEVICEA */ - TEST_TYPE_SIZE (PDISPLAY_DEVICEA, 8) - TEST_TYPE_ALIGN (PDISPLAY_DEVICEA, 8) - TEST_TARGET_SIZE (PDISPLAY_DEVICEA, 424) - TEST_TARGET_ALIGN(PDISPLAY_DEVICEA, 4) -} - -static void test_pack_PDISPLAY_DEVICEW(void) -{ - /* PDISPLAY_DEVICEW */ - TEST_TYPE_SIZE (PDISPLAY_DEVICEW, 8) - TEST_TYPE_ALIGN (PDISPLAY_DEVICEW, 8) - TEST_TARGET_SIZE (PDISPLAY_DEVICEW, 840) - TEST_TARGET_ALIGN(PDISPLAY_DEVICEW, 4) -} - -static void test_pack_PELARRAY(void) -{ - /* PELARRAY */ - TEST_TYPE_SIZE (PELARRAY, 20) - TEST_TYPE_ALIGN (PELARRAY, 4) - TEST_FIELD_SIZE (PELARRAY, paXCount, 4) - TEST_FIELD_ALIGN (PELARRAY, paXCount, 4) - TEST_FIELD_OFFSET(PELARRAY, paXCount, 0) - TEST_FIELD_SIZE (PELARRAY, paYCount, 4) - TEST_FIELD_ALIGN (PELARRAY, paYCount, 4) - TEST_FIELD_OFFSET(PELARRAY, paYCount, 4) - TEST_FIELD_SIZE (PELARRAY, paXExt, 4) - TEST_FIELD_ALIGN (PELARRAY, paXExt, 4) - TEST_FIELD_OFFSET(PELARRAY, paXExt, 8) - TEST_FIELD_SIZE (PELARRAY, paYExt, 4) - TEST_FIELD_ALIGN (PELARRAY, paYExt, 4) - TEST_FIELD_OFFSET(PELARRAY, paYExt, 12) - TEST_FIELD_SIZE (PELARRAY, paRGBs, 1) - TEST_FIELD_ALIGN (PELARRAY, paRGBs, 1) - TEST_FIELD_OFFSET(PELARRAY, paRGBs, 16) -} - -static void test_pack_PEMR(void) -{ - /* PEMR */ - TEST_TYPE_SIZE (PEMR, 8) - TEST_TYPE_ALIGN (PEMR, 8) - TEST_TARGET_SIZE (PEMR, 8) - TEST_TARGET_ALIGN(PEMR, 4) -} - -static void test_pack_PEMRABORTPATH(void) -{ - /* PEMRABORTPATH */ - TEST_TYPE_SIZE (PEMRABORTPATH, 8) - TEST_TYPE_ALIGN (PEMRABORTPATH, 8) - TEST_TARGET_SIZE (PEMRABORTPATH, 8) - TEST_TARGET_ALIGN(PEMRABORTPATH, 4) -} - -static void test_pack_PEMRANGLEARC(void) -{ - /* PEMRANGLEARC */ - TEST_TYPE_SIZE (PEMRANGLEARC, 8) - TEST_TYPE_ALIGN (PEMRANGLEARC, 8) - TEST_TARGET_SIZE (PEMRANGLEARC, 28) - TEST_TARGET_ALIGN(PEMRANGLEARC, 4) -} - -static void test_pack_PEMRARC(void) -{ - /* PEMRARC */ - TEST_TYPE_SIZE (PEMRARC, 8) - TEST_TYPE_ALIGN (PEMRARC, 8) - TEST_TARGET_SIZE (PEMRARC, 40) - TEST_TARGET_ALIGN(PEMRARC, 4) -} - -static void test_pack_PEMRARCTO(void) -{ - /* PEMRARCTO */ - TEST_TYPE_SIZE (PEMRARCTO, 8) - TEST_TYPE_ALIGN (PEMRARCTO, 8) - TEST_TARGET_SIZE (PEMRARCTO, 40) - TEST_TARGET_ALIGN(PEMRARCTO, 4) -} - -static void test_pack_PEMRBEGINPATH(void) -{ - /* PEMRBEGINPATH */ - TEST_TYPE_SIZE (PEMRBEGINPATH, 8) - TEST_TYPE_ALIGN (PEMRBEGINPATH, 8) - TEST_TARGET_SIZE (PEMRBEGINPATH, 8) - TEST_TARGET_ALIGN(PEMRBEGINPATH, 4) -} - -static void test_pack_PEMRBITBLT(void) -{ - /* PEMRBITBLT */ - TEST_TYPE_SIZE (PEMRBITBLT, 8) - TEST_TYPE_ALIGN (PEMRBITBLT, 8) - TEST_TARGET_SIZE (PEMRBITBLT, 100) - TEST_TARGET_ALIGN(PEMRBITBLT, 4) -} - -static void test_pack_PEMRCHORD(void) -{ - /* PEMRCHORD */ - TEST_TYPE_SIZE (PEMRCHORD, 8) - TEST_TYPE_ALIGN (PEMRCHORD, 8) - TEST_TARGET_SIZE (PEMRCHORD, 40) - TEST_TARGET_ALIGN(PEMRCHORD, 4) -} - -static void test_pack_PEMRCLOSEFIGURE(void) -{ - /* PEMRCLOSEFIGURE */ - TEST_TYPE_SIZE (PEMRCLOSEFIGURE, 8) - TEST_TYPE_ALIGN (PEMRCLOSEFIGURE, 8) - TEST_TARGET_SIZE (PEMRCLOSEFIGURE, 8) - TEST_TARGET_ALIGN(PEMRCLOSEFIGURE, 4) -} - -static void test_pack_PEMRCREATEBRUSHINDIRECT(void) -{ - /* PEMRCREATEBRUSHINDIRECT */ - TEST_TYPE_SIZE (PEMRCREATEBRUSHINDIRECT, 8) - TEST_TYPE_ALIGN (PEMRCREATEBRUSHINDIRECT, 8) - TEST_TARGET_SIZE (PEMRCREATEBRUSHINDIRECT, 24) - TEST_TARGET_ALIGN(PEMRCREATEBRUSHINDIRECT, 4) -} - -static void test_pack_PEMRCREATECOLORSPACE(void) -{ - /* PEMRCREATECOLORSPACE */ - TEST_TYPE_SIZE (PEMRCREATECOLORSPACE, 8) - TEST_TYPE_ALIGN (PEMRCREATECOLORSPACE, 8) - TEST_TARGET_SIZE (PEMRCREATECOLORSPACE, 340) - TEST_TARGET_ALIGN(PEMRCREATECOLORSPACE, 4) -} - -static void test_pack_PEMRCREATECOLORSPACEW(void) -{ - /* PEMRCREATECOLORSPACEW */ - TEST_TYPE_SIZE (PEMRCREATECOLORSPACEW, 8) - TEST_TYPE_ALIGN (PEMRCREATECOLORSPACEW, 8) - TEST_TARGET_SIZE (PEMRCREATECOLORSPACEW, 612) - TEST_TARGET_ALIGN(PEMRCREATECOLORSPACEW, 4) -} - -static void test_pack_PEMRCREATEDIBPATTERNBRUSHPT(void) -{ - /* PEMRCREATEDIBPATTERNBRUSHPT */ - TEST_TYPE_SIZE (PEMRCREATEDIBPATTERNBRUSHPT, 8) - TEST_TYPE_ALIGN (PEMRCREATEDIBPATTERNBRUSHPT, 8) - TEST_TARGET_SIZE (PEMRCREATEDIBPATTERNBRUSHPT, 32) - TEST_TARGET_ALIGN(PEMRCREATEDIBPATTERNBRUSHPT, 4) -} - -static void test_pack_PEMRCREATEMONOBRUSH(void) -{ - /* PEMRCREATEMONOBRUSH */ - TEST_TYPE_SIZE (PEMRCREATEMONOBRUSH, 8) - TEST_TYPE_ALIGN (PEMRCREATEMONOBRUSH, 8) - TEST_TARGET_SIZE (PEMRCREATEMONOBRUSH, 32) - TEST_TARGET_ALIGN(PEMRCREATEMONOBRUSH, 4) -} - -static void test_pack_PEMRCREATEPALETTE(void) -{ - /* PEMRCREATEPALETTE */ - TEST_TYPE_SIZE (PEMRCREATEPALETTE, 8) - TEST_TYPE_ALIGN (PEMRCREATEPALETTE, 8) - TEST_TARGET_SIZE (PEMRCREATEPALETTE, 20) - TEST_TARGET_ALIGN(PEMRCREATEPALETTE, 4) -} - -static void test_pack_PEMRCREATEPEN(void) -{ - /* PEMRCREATEPEN */ - TEST_TYPE_SIZE (PEMRCREATEPEN, 8) - TEST_TYPE_ALIGN (PEMRCREATEPEN, 8) - TEST_TARGET_SIZE (PEMRCREATEPEN, 28) - TEST_TARGET_ALIGN(PEMRCREATEPEN, 4) -} - -static void test_pack_PEMRDELETECOLORSPACE(void) -{ - /* PEMRDELETECOLORSPACE */ - TEST_TYPE_SIZE (PEMRDELETECOLORSPACE, 8) - TEST_TYPE_ALIGN (PEMRDELETECOLORSPACE, 8) - TEST_TARGET_SIZE (PEMRDELETECOLORSPACE, 12) - TEST_TARGET_ALIGN(PEMRDELETECOLORSPACE, 4) -} - -static void test_pack_PEMRDELETEOBJECT(void) -{ - /* PEMRDELETEOBJECT */ - TEST_TYPE_SIZE (PEMRDELETEOBJECT, 8) - TEST_TYPE_ALIGN (PEMRDELETEOBJECT, 8) - TEST_TARGET_SIZE (PEMRDELETEOBJECT, 12) - TEST_TARGET_ALIGN(PEMRDELETEOBJECT, 4) -} - -static void test_pack_PEMRELLIPSE(void) -{ - /* PEMRELLIPSE */ - TEST_TYPE_SIZE (PEMRELLIPSE, 8) - TEST_TYPE_ALIGN (PEMRELLIPSE, 8) - TEST_TARGET_SIZE (PEMRELLIPSE, 24) - TEST_TARGET_ALIGN(PEMRELLIPSE, 4) -} - -static void test_pack_PEMRENDPATH(void) -{ - /* PEMRENDPATH */ - TEST_TYPE_SIZE (PEMRENDPATH, 8) - TEST_TYPE_ALIGN (PEMRENDPATH, 8) - TEST_TARGET_SIZE (PEMRENDPATH, 8) - TEST_TARGET_ALIGN(PEMRENDPATH, 4) -} - -static void test_pack_PEMREOF(void) -{ - /* PEMREOF */ - TEST_TYPE_SIZE (PEMREOF, 8) - TEST_TYPE_ALIGN (PEMREOF, 8) - TEST_TARGET_SIZE (PEMREOF, 20) - TEST_TARGET_ALIGN(PEMREOF, 4) -} - -static void test_pack_PEMREXCLUDECLIPRECT(void) -{ - /* PEMREXCLUDECLIPRECT */ - TEST_TYPE_SIZE (PEMREXCLUDECLIPRECT, 8) - TEST_TYPE_ALIGN (PEMREXCLUDECLIPRECT, 8) - TEST_TARGET_SIZE (PEMREXCLUDECLIPRECT, 24) - TEST_TARGET_ALIGN(PEMREXCLUDECLIPRECT, 4) -} - -static void test_pack_PEMREXTCREATEFONTINDIRECTW(void) -{ - /* PEMREXTCREATEFONTINDIRECTW */ - TEST_TYPE_SIZE (PEMREXTCREATEFONTINDIRECTW, 8) - TEST_TYPE_ALIGN (PEMREXTCREATEFONTINDIRECTW, 8) - TEST_TARGET_SIZE (PEMREXTCREATEFONTINDIRECTW, 332) - TEST_TARGET_ALIGN(PEMREXTCREATEFONTINDIRECTW, 4) -} - -static void test_pack_PEMREXTCREATEPEN(void) -{ - /* PEMREXTCREATEPEN */ - TEST_TYPE_SIZE (PEMREXTCREATEPEN, 8) - TEST_TYPE_ALIGN (PEMREXTCREATEPEN, 8) - TEST_TARGET_SIZE (PEMREXTCREATEPEN, 64) - TEST_TARGET_ALIGN(PEMREXTCREATEPEN, 8) -} - -static void test_pack_PEMREXTFLOODFILL(void) -{ - /* PEMREXTFLOODFILL */ - TEST_TYPE_SIZE (PEMREXTFLOODFILL, 8) - TEST_TYPE_ALIGN (PEMREXTFLOODFILL, 8) - TEST_TARGET_SIZE (PEMREXTFLOODFILL, 24) - TEST_TARGET_ALIGN(PEMREXTFLOODFILL, 4) -} - -static void test_pack_PEMREXTSELECTCLIPRGN(void) -{ - /* PEMREXTSELECTCLIPRGN */ - TEST_TYPE_SIZE (PEMREXTSELECTCLIPRGN, 8) - TEST_TYPE_ALIGN (PEMREXTSELECTCLIPRGN, 8) - TEST_TARGET_SIZE (PEMREXTSELECTCLIPRGN, 20) - TEST_TARGET_ALIGN(PEMREXTSELECTCLIPRGN, 4) -} - -static void test_pack_PEMREXTTEXTOUTA(void) -{ - /* PEMREXTTEXTOUTA */ - TEST_TYPE_SIZE (PEMREXTTEXTOUTA, 8) - TEST_TYPE_ALIGN (PEMREXTTEXTOUTA, 8) - TEST_TARGET_SIZE (PEMREXTTEXTOUTA, 76) - TEST_TARGET_ALIGN(PEMREXTTEXTOUTA, 4) -} - -static void test_pack_PEMREXTTEXTOUTW(void) -{ - /* PEMREXTTEXTOUTW */ - TEST_TYPE_SIZE (PEMREXTTEXTOUTW, 8) - TEST_TYPE_ALIGN (PEMREXTTEXTOUTW, 8) - TEST_TARGET_SIZE (PEMREXTTEXTOUTW, 76) - TEST_TARGET_ALIGN(PEMREXTTEXTOUTW, 4) -} - -static void test_pack_PEMRFILLPATH(void) -{ - /* PEMRFILLPATH */ - TEST_TYPE_SIZE (PEMRFILLPATH, 8) - TEST_TYPE_ALIGN (PEMRFILLPATH, 8) - TEST_TARGET_SIZE (PEMRFILLPATH, 24) - TEST_TARGET_ALIGN(PEMRFILLPATH, 4) -} - -static void test_pack_PEMRFILLRGN(void) -{ - /* PEMRFILLRGN */ - TEST_TYPE_SIZE (PEMRFILLRGN, 8) - TEST_TYPE_ALIGN (PEMRFILLRGN, 8) - TEST_TARGET_SIZE (PEMRFILLRGN, 36) - TEST_TARGET_ALIGN(PEMRFILLRGN, 4) -} - -static void test_pack_PEMRFLATTENPATH(void) -{ - /* PEMRFLATTENPATH */ - TEST_TYPE_SIZE (PEMRFLATTENPATH, 8) - TEST_TYPE_ALIGN (PEMRFLATTENPATH, 8) - TEST_TARGET_SIZE (PEMRFLATTENPATH, 8) - TEST_TARGET_ALIGN(PEMRFLATTENPATH, 4) -} - -static void test_pack_PEMRFORMAT(void) -{ - /* PEMRFORMAT */ - TEST_TYPE_SIZE (PEMRFORMAT, 8) - TEST_TYPE_ALIGN (PEMRFORMAT, 8) - TEST_TARGET_SIZE (PEMRFORMAT, 16) - TEST_TARGET_ALIGN(PEMRFORMAT, 4) -} - -static void test_pack_PEMRFRAMERGN(void) -{ - /* PEMRFRAMERGN */ - TEST_TYPE_SIZE (PEMRFRAMERGN, 8) - TEST_TYPE_ALIGN (PEMRFRAMERGN, 8) - TEST_TARGET_SIZE (PEMRFRAMERGN, 44) - TEST_TARGET_ALIGN(PEMRFRAMERGN, 4) -} - -static void test_pack_PEMRGDICOMMENT(void) -{ - /* PEMRGDICOMMENT */ - TEST_TYPE_SIZE (PEMRGDICOMMENT, 8) - TEST_TYPE_ALIGN (PEMRGDICOMMENT, 8) - TEST_TARGET_SIZE (PEMRGDICOMMENT, 16) - TEST_TARGET_ALIGN(PEMRGDICOMMENT, 4) -} - -static void test_pack_PEMRGLSBOUNDEDRECORD(void) -{ - /* PEMRGLSBOUNDEDRECORD */ - TEST_TYPE_SIZE (PEMRGLSBOUNDEDRECORD, 8) - TEST_TYPE_ALIGN (PEMRGLSBOUNDEDRECORD, 8) - TEST_TARGET_SIZE (PEMRGLSBOUNDEDRECORD, 32) - TEST_TARGET_ALIGN(PEMRGLSBOUNDEDRECORD, 4) -} - -static void test_pack_PEMRGLSRECORD(void) -{ - /* PEMRGLSRECORD */ - TEST_TYPE_SIZE (PEMRGLSRECORD, 8) - TEST_TYPE_ALIGN (PEMRGLSRECORD, 8) - TEST_TARGET_SIZE (PEMRGLSRECORD, 16) - TEST_TARGET_ALIGN(PEMRGLSRECORD, 4) -} - -static void test_pack_PEMRINTERSECTCLIPRECT(void) -{ - /* PEMRINTERSECTCLIPRECT */ - TEST_TYPE_SIZE (PEMRINTERSECTCLIPRECT, 8) - TEST_TYPE_ALIGN (PEMRINTERSECTCLIPRECT, 8) - TEST_TARGET_SIZE (PEMRINTERSECTCLIPRECT, 24) - TEST_TARGET_ALIGN(PEMRINTERSECTCLIPRECT, 4) -} - -static void test_pack_PEMRINVERTRGN(void) -{ - /* PEMRINVERTRGN */ - TEST_TYPE_SIZE (PEMRINVERTRGN, 8) - TEST_TYPE_ALIGN (PEMRINVERTRGN, 8) - TEST_TARGET_SIZE (PEMRINVERTRGN, 32) - TEST_TARGET_ALIGN(PEMRINVERTRGN, 4) -} - -static void test_pack_PEMRLINETO(void) -{ - /* PEMRLINETO */ - TEST_TYPE_SIZE (PEMRLINETO, 8) - TEST_TYPE_ALIGN (PEMRLINETO, 8) - TEST_TARGET_SIZE (PEMRLINETO, 16) - TEST_TARGET_ALIGN(PEMRLINETO, 4) -} - -static void test_pack_PEMRMASKBLT(void) -{ - /* PEMRMASKBLT */ - TEST_TYPE_SIZE (PEMRMASKBLT, 8) - TEST_TYPE_ALIGN (PEMRMASKBLT, 8) - TEST_TARGET_SIZE (PEMRMASKBLT, 128) - TEST_TARGET_ALIGN(PEMRMASKBLT, 4) -} - -static void test_pack_PEMRMODIFYWORLDTRANSFORM(void) -{ - /* PEMRMODIFYWORLDTRANSFORM */ - TEST_TYPE_SIZE (PEMRMODIFYWORLDTRANSFORM, 8) - TEST_TYPE_ALIGN (PEMRMODIFYWORLDTRANSFORM, 8) - TEST_TARGET_SIZE (PEMRMODIFYWORLDTRANSFORM, 36) - TEST_TARGET_ALIGN(PEMRMODIFYWORLDTRANSFORM, 4) -} - -static void test_pack_PEMRMOVETOEX(void) -{ - /* PEMRMOVETOEX */ - TEST_TYPE_SIZE (PEMRMOVETOEX, 8) - TEST_TYPE_ALIGN (PEMRMOVETOEX, 8) - TEST_TARGET_SIZE (PEMRMOVETOEX, 16) - TEST_TARGET_ALIGN(PEMRMOVETOEX, 4) -} - -static void test_pack_PEMROFFSETCLIPRGN(void) -{ - /* PEMROFFSETCLIPRGN */ - TEST_TYPE_SIZE (PEMROFFSETCLIPRGN, 8) - TEST_TYPE_ALIGN (PEMROFFSETCLIPRGN, 8) - TEST_TARGET_SIZE (PEMROFFSETCLIPRGN, 16) - TEST_TARGET_ALIGN(PEMROFFSETCLIPRGN, 4) -} - -static void test_pack_PEMRPAINTRGN(void) -{ - /* PEMRPAINTRGN */ - TEST_TYPE_SIZE (PEMRPAINTRGN, 8) - TEST_TYPE_ALIGN (PEMRPAINTRGN, 8) - TEST_TARGET_SIZE (PEMRPAINTRGN, 32) - TEST_TARGET_ALIGN(PEMRPAINTRGN, 4) -} - -static void test_pack_PEMRPIE(void) -{ - /* PEMRPIE */ - TEST_TYPE_SIZE (PEMRPIE, 8) - TEST_TYPE_ALIGN (PEMRPIE, 8) - TEST_TARGET_SIZE (PEMRPIE, 40) - TEST_TARGET_ALIGN(PEMRPIE, 4) -} - -static void test_pack_PEMRPIXELFORMAT(void) -{ - /* PEMRPIXELFORMAT */ - TEST_TYPE_SIZE (PEMRPIXELFORMAT, 8) - TEST_TYPE_ALIGN (PEMRPIXELFORMAT, 8) - TEST_TARGET_SIZE (PEMRPIXELFORMAT, 48) - TEST_TARGET_ALIGN(PEMRPIXELFORMAT, 4) -} - -static void test_pack_PEMRPLGBLT(void) -{ - /* PEMRPLGBLT */ - TEST_TYPE_SIZE (PEMRPLGBLT, 8) - TEST_TYPE_ALIGN (PEMRPLGBLT, 8) - TEST_TARGET_SIZE (PEMRPLGBLT, 140) - TEST_TARGET_ALIGN(PEMRPLGBLT, 4) -} - -static void test_pack_PEMRPOLYBEZIER(void) -{ - /* PEMRPOLYBEZIER */ - TEST_TYPE_SIZE (PEMRPOLYBEZIER, 8) - TEST_TYPE_ALIGN (PEMRPOLYBEZIER, 8) - TEST_TARGET_SIZE (PEMRPOLYBEZIER, 36) - TEST_TARGET_ALIGN(PEMRPOLYBEZIER, 4) -} - -static void test_pack_PEMRPOLYBEZIER16(void) -{ - /* PEMRPOLYBEZIER16 */ - TEST_TYPE_SIZE (PEMRPOLYBEZIER16, 8) - TEST_TYPE_ALIGN (PEMRPOLYBEZIER16, 8) - TEST_TARGET_SIZE (PEMRPOLYBEZIER16, 32) - TEST_TARGET_ALIGN(PEMRPOLYBEZIER16, 4) -} - -static void test_pack_PEMRPOLYBEZIERTO(void) -{ - /* PEMRPOLYBEZIERTO */ - TEST_TYPE_SIZE (PEMRPOLYBEZIERTO, 8) - TEST_TYPE_ALIGN (PEMRPOLYBEZIERTO, 8) - TEST_TARGET_SIZE (PEMRPOLYBEZIERTO, 36) - TEST_TARGET_ALIGN(PEMRPOLYBEZIERTO, 4) -} - -static void test_pack_PEMRPOLYBEZIERTO16(void) -{ - /* PEMRPOLYBEZIERTO16 */ - TEST_TYPE_SIZE (PEMRPOLYBEZIERTO16, 8) - TEST_TYPE_ALIGN (PEMRPOLYBEZIERTO16, 8) - TEST_TARGET_SIZE (PEMRPOLYBEZIERTO16, 32) - TEST_TARGET_ALIGN(PEMRPOLYBEZIERTO16, 4) -} - -static void test_pack_PEMRPOLYDRAW(void) -{ - /* PEMRPOLYDRAW */ - TEST_TYPE_SIZE (PEMRPOLYDRAW, 8) - TEST_TYPE_ALIGN (PEMRPOLYDRAW, 8) - TEST_TARGET_SIZE (PEMRPOLYDRAW, 40) - TEST_TARGET_ALIGN(PEMRPOLYDRAW, 4) -} - -static void test_pack_PEMRPOLYDRAW16(void) -{ - /* PEMRPOLYDRAW16 */ - TEST_TYPE_SIZE (PEMRPOLYDRAW16, 8) - TEST_TYPE_ALIGN (PEMRPOLYDRAW16, 8) - TEST_TARGET_SIZE (PEMRPOLYDRAW16, 36) - TEST_TARGET_ALIGN(PEMRPOLYDRAW16, 4) -} - -static void test_pack_PEMRPOLYGON(void) -{ - /* PEMRPOLYGON */ - TEST_TYPE_SIZE (PEMRPOLYGON, 8) - TEST_TYPE_ALIGN (PEMRPOLYGON, 8) - TEST_TARGET_SIZE (PEMRPOLYGON, 36) - TEST_TARGET_ALIGN(PEMRPOLYGON, 4) -} - -static void test_pack_PEMRPOLYGON16(void) -{ - /* PEMRPOLYGON16 */ - TEST_TYPE_SIZE (PEMRPOLYGON16, 8) - TEST_TYPE_ALIGN (PEMRPOLYGON16, 8) - TEST_TARGET_SIZE (PEMRPOLYGON16, 32) - TEST_TARGET_ALIGN(PEMRPOLYGON16, 4) -} - -static void test_pack_PEMRPOLYLINE(void) -{ - /* PEMRPOLYLINE */ - TEST_TYPE_SIZE (PEMRPOLYLINE, 8) - TEST_TYPE_ALIGN (PEMRPOLYLINE, 8) - TEST_TARGET_SIZE (PEMRPOLYLINE, 36) - TEST_TARGET_ALIGN(PEMRPOLYLINE, 4) -} - -static void test_pack_PEMRPOLYLINE16(void) -{ - /* PEMRPOLYLINE16 */ - TEST_TYPE_SIZE (PEMRPOLYLINE16, 8) - TEST_TYPE_ALIGN (PEMRPOLYLINE16, 8) - TEST_TARGET_SIZE (PEMRPOLYLINE16, 32) - TEST_TARGET_ALIGN(PEMRPOLYLINE16, 4) -} - -static void test_pack_PEMRPOLYLINETO(void) -{ - /* PEMRPOLYLINETO */ - TEST_TYPE_SIZE (PEMRPOLYLINETO, 8) - TEST_TYPE_ALIGN (PEMRPOLYLINETO, 8) - TEST_TARGET_SIZE (PEMRPOLYLINETO, 36) - TEST_TARGET_ALIGN(PEMRPOLYLINETO, 4) -} - -static void test_pack_PEMRPOLYLINETO16(void) -{ - /* PEMRPOLYLINETO16 */ - TEST_TYPE_SIZE (PEMRPOLYLINETO16, 8) - TEST_TYPE_ALIGN (PEMRPOLYLINETO16, 8) - TEST_TARGET_SIZE (PEMRPOLYLINETO16, 32) - TEST_TARGET_ALIGN(PEMRPOLYLINETO16, 4) -} - -static void test_pack_PEMRPOLYPOLYGON(void) -{ - /* PEMRPOLYPOLYGON */ - TEST_TYPE_SIZE (PEMRPOLYPOLYGON, 8) - TEST_TYPE_ALIGN (PEMRPOLYPOLYGON, 8) - TEST_TARGET_SIZE (PEMRPOLYPOLYGON, 44) - TEST_TARGET_ALIGN(PEMRPOLYPOLYGON, 4) -} - -static void test_pack_PEMRPOLYPOLYGON16(void) -{ - /* PEMRPOLYPOLYGON16 */ - TEST_TYPE_SIZE (PEMRPOLYPOLYGON16, 8) - TEST_TYPE_ALIGN (PEMRPOLYPOLYGON16, 8) - TEST_TARGET_SIZE (PEMRPOLYPOLYGON16, 40) - TEST_TARGET_ALIGN(PEMRPOLYPOLYGON16, 4) -} - -static void test_pack_PEMRPOLYPOLYLINE(void) -{ - /* PEMRPOLYPOLYLINE */ - TEST_TYPE_SIZE (PEMRPOLYPOLYLINE, 8) - TEST_TYPE_ALIGN (PEMRPOLYPOLYLINE, 8) - TEST_TARGET_SIZE (PEMRPOLYPOLYLINE, 44) - TEST_TARGET_ALIGN(PEMRPOLYPOLYLINE, 4) -} - -static void test_pack_PEMRPOLYPOLYLINE16(void) -{ - /* PEMRPOLYPOLYLINE16 */ - TEST_TYPE_SIZE (PEMRPOLYPOLYLINE16, 8) - TEST_TYPE_ALIGN (PEMRPOLYPOLYLINE16, 8) - TEST_TARGET_SIZE (PEMRPOLYPOLYLINE16, 40) - TEST_TARGET_ALIGN(PEMRPOLYPOLYLINE16, 4) -} - -static void test_pack_PEMRPOLYTEXTOUTA(void) -{ - /* PEMRPOLYTEXTOUTA */ - TEST_TYPE_SIZE (PEMRPOLYTEXTOUTA, 8) - TEST_TYPE_ALIGN (PEMRPOLYTEXTOUTA, 8) - TEST_TARGET_SIZE (PEMRPOLYTEXTOUTA, 80) - TEST_TARGET_ALIGN(PEMRPOLYTEXTOUTA, 4) -} - -static void test_pack_PEMRPOLYTEXTOUTW(void) -{ - /* PEMRPOLYTEXTOUTW */ - TEST_TYPE_SIZE (PEMRPOLYTEXTOUTW, 8) - TEST_TYPE_ALIGN (PEMRPOLYTEXTOUTW, 8) - TEST_TARGET_SIZE (PEMRPOLYTEXTOUTW, 80) - TEST_TARGET_ALIGN(PEMRPOLYTEXTOUTW, 4) -} - -static void test_pack_PEMRREALIZEPALETTE(void) -{ - /* PEMRREALIZEPALETTE */ - TEST_TYPE_SIZE (PEMRREALIZEPALETTE, 8) - TEST_TYPE_ALIGN (PEMRREALIZEPALETTE, 8) - TEST_TARGET_SIZE (PEMRREALIZEPALETTE, 8) - TEST_TARGET_ALIGN(PEMRREALIZEPALETTE, 4) -} - -static void test_pack_PEMRRECTANGLE(void) -{ - /* PEMRRECTANGLE */ - TEST_TYPE_SIZE (PEMRRECTANGLE, 8) - TEST_TYPE_ALIGN (PEMRRECTANGLE, 8) - TEST_TARGET_SIZE (PEMRRECTANGLE, 24) - TEST_TARGET_ALIGN(PEMRRECTANGLE, 4) -} - -static void test_pack_PEMRRESIZEPALETTE(void) -{ - /* PEMRRESIZEPALETTE */ - TEST_TYPE_SIZE (PEMRRESIZEPALETTE, 8) - TEST_TYPE_ALIGN (PEMRRESIZEPALETTE, 8) - TEST_TARGET_SIZE (PEMRRESIZEPALETTE, 16) - TEST_TARGET_ALIGN(PEMRRESIZEPALETTE, 4) -} - -static void test_pack_PEMRRESTOREDC(void) -{ - /* PEMRRESTOREDC */ - TEST_TYPE_SIZE (PEMRRESTOREDC, 8) - TEST_TYPE_ALIGN (PEMRRESTOREDC, 8) - TEST_TARGET_SIZE (PEMRRESTOREDC, 12) - TEST_TARGET_ALIGN(PEMRRESTOREDC, 4) -} - -static void test_pack_PEMRROUNDRECT(void) -{ - /* PEMRROUNDRECT */ - TEST_TYPE_SIZE (PEMRROUNDRECT, 8) - TEST_TYPE_ALIGN (PEMRROUNDRECT, 8) - TEST_TARGET_SIZE (PEMRROUNDRECT, 32) - TEST_TARGET_ALIGN(PEMRROUNDRECT, 4) -} - -static void test_pack_PEMRSAVEDC(void) -{ - /* PEMRSAVEDC */ - TEST_TYPE_SIZE (PEMRSAVEDC, 8) - TEST_TYPE_ALIGN (PEMRSAVEDC, 8) - TEST_TARGET_SIZE (PEMRSAVEDC, 8) - TEST_TARGET_ALIGN(PEMRSAVEDC, 4) -} - -static void test_pack_PEMRSCALEVIEWPORTEXTEX(void) -{ - /* PEMRSCALEVIEWPORTEXTEX */ - TEST_TYPE_SIZE (PEMRSCALEVIEWPORTEXTEX, 8) - TEST_TYPE_ALIGN (PEMRSCALEVIEWPORTEXTEX, 8) - TEST_TARGET_SIZE (PEMRSCALEVIEWPORTEXTEX, 24) - TEST_TARGET_ALIGN(PEMRSCALEVIEWPORTEXTEX, 4) -} - -static void test_pack_PEMRSCALEWINDOWEXTEX(void) -{ - /* PEMRSCALEWINDOWEXTEX */ - TEST_TYPE_SIZE (PEMRSCALEWINDOWEXTEX, 8) - TEST_TYPE_ALIGN (PEMRSCALEWINDOWEXTEX, 8) - TEST_TARGET_SIZE (PEMRSCALEWINDOWEXTEX, 24) - TEST_TARGET_ALIGN(PEMRSCALEWINDOWEXTEX, 4) -} - -static void test_pack_PEMRSELECTCLIPPATH(void) -{ - /* PEMRSELECTCLIPPATH */ - TEST_TYPE_SIZE (PEMRSELECTCLIPPATH, 8) - TEST_TYPE_ALIGN (PEMRSELECTCLIPPATH, 8) - TEST_TARGET_SIZE (PEMRSELECTCLIPPATH, 12) - TEST_TARGET_ALIGN(PEMRSELECTCLIPPATH, 4) -} - -static void test_pack_PEMRSELECTCOLORSPACE(void) -{ - /* PEMRSELECTCOLORSPACE */ - TEST_TYPE_SIZE (PEMRSELECTCOLORSPACE, 8) - TEST_TYPE_ALIGN (PEMRSELECTCOLORSPACE, 8) - TEST_TARGET_SIZE (PEMRSELECTCOLORSPACE, 12) - TEST_TARGET_ALIGN(PEMRSELECTCOLORSPACE, 4) -} - -static void test_pack_PEMRSELECTOBJECT(void) -{ - /* PEMRSELECTOBJECT */ - TEST_TYPE_SIZE (PEMRSELECTOBJECT, 8) - TEST_TYPE_ALIGN (PEMRSELECTOBJECT, 8) - TEST_TARGET_SIZE (PEMRSELECTOBJECT, 12) - TEST_TARGET_ALIGN(PEMRSELECTOBJECT, 4) -} - -static void test_pack_PEMRSELECTPALETTE(void) -{ - /* PEMRSELECTPALETTE */ - TEST_TYPE_SIZE (PEMRSELECTPALETTE, 8) - TEST_TYPE_ALIGN (PEMRSELECTPALETTE, 8) - TEST_TARGET_SIZE (PEMRSELECTPALETTE, 12) - TEST_TARGET_ALIGN(PEMRSELECTPALETTE, 4) -} - -static void test_pack_PEMRSETARCDIRECTION(void) -{ - /* PEMRSETARCDIRECTION */ - TEST_TYPE_SIZE (PEMRSETARCDIRECTION, 8) - TEST_TYPE_ALIGN (PEMRSETARCDIRECTION, 8) - TEST_TARGET_SIZE (PEMRSETARCDIRECTION, 12) - TEST_TARGET_ALIGN(PEMRSETARCDIRECTION, 4) -} - -static void test_pack_PEMRSETBKCOLOR(void) -{ - /* PEMRSETBKCOLOR */ - TEST_TYPE_SIZE (PEMRSETBKCOLOR, 8) - TEST_TYPE_ALIGN (PEMRSETBKCOLOR, 8) - TEST_TARGET_SIZE (PEMRSETBKCOLOR, 12) - TEST_TARGET_ALIGN(PEMRSETBKCOLOR, 4) -} - -static void test_pack_PEMRSETBKMODE(void) -{ - /* PEMRSETBKMODE */ - TEST_TYPE_SIZE (PEMRSETBKMODE, 8) - TEST_TYPE_ALIGN (PEMRSETBKMODE, 8) - TEST_TARGET_SIZE (PEMRSETBKMODE, 12) - TEST_TARGET_ALIGN(PEMRSETBKMODE, 4) -} - -static void test_pack_PEMRSETBRUSHORGEX(void) -{ - /* PEMRSETBRUSHORGEX */ - TEST_TYPE_SIZE (PEMRSETBRUSHORGEX, 8) - TEST_TYPE_ALIGN (PEMRSETBRUSHORGEX, 8) - TEST_TARGET_SIZE (PEMRSETBRUSHORGEX, 16) - TEST_TARGET_ALIGN(PEMRSETBRUSHORGEX, 4) -} - -static void test_pack_PEMRSETCOLORADJUSTMENT(void) -{ - /* PEMRSETCOLORADJUSTMENT */ - TEST_TYPE_SIZE (PEMRSETCOLORADJUSTMENT, 8) - TEST_TYPE_ALIGN (PEMRSETCOLORADJUSTMENT, 8) - TEST_TARGET_SIZE (PEMRSETCOLORADJUSTMENT, 32) - TEST_TARGET_ALIGN(PEMRSETCOLORADJUSTMENT, 4) -} - -static void test_pack_PEMRSETCOLORSPACE(void) -{ - /* PEMRSETCOLORSPACE */ - TEST_TYPE_SIZE (PEMRSETCOLORSPACE, 8) - TEST_TYPE_ALIGN (PEMRSETCOLORSPACE, 8) - TEST_TARGET_SIZE (PEMRSETCOLORSPACE, 12) - TEST_TARGET_ALIGN(PEMRSETCOLORSPACE, 4) -} - -static void test_pack_PEMRSETDIBITSTODEVICE(void) -{ - /* PEMRSETDIBITSTODEVICE */ - TEST_TYPE_SIZE (PEMRSETDIBITSTODEVICE, 8) - TEST_TYPE_ALIGN (PEMRSETDIBITSTODEVICE, 8) - TEST_TARGET_SIZE (PEMRSETDIBITSTODEVICE, 76) - TEST_TARGET_ALIGN(PEMRSETDIBITSTODEVICE, 4) -} - -static void test_pack_PEMRSETICMMODE(void) -{ - /* PEMRSETICMMODE */ - TEST_TYPE_SIZE (PEMRSETICMMODE, 8) - TEST_TYPE_ALIGN (PEMRSETICMMODE, 8) - TEST_TARGET_SIZE (PEMRSETICMMODE, 12) - TEST_TARGET_ALIGN(PEMRSETICMMODE, 4) -} - -static void test_pack_PEMRSETLAYOUT(void) -{ - /* PEMRSETLAYOUT */ - TEST_TYPE_SIZE (PEMRSETLAYOUT, 8) - TEST_TYPE_ALIGN (PEMRSETLAYOUT, 8) - TEST_TARGET_SIZE (PEMRSETLAYOUT, 12) - TEST_TARGET_ALIGN(PEMRSETLAYOUT, 4) -} - -static void test_pack_PEMRSETMAPMODE(void) -{ - /* PEMRSETMAPMODE */ - TEST_TYPE_SIZE (PEMRSETMAPMODE, 8) - TEST_TYPE_ALIGN (PEMRSETMAPMODE, 8) - TEST_TARGET_SIZE (PEMRSETMAPMODE, 12) - TEST_TARGET_ALIGN(PEMRSETMAPMODE, 4) -} - -static void test_pack_PEMRSETMAPPERFLAGS(void) -{ - /* PEMRSETMAPPERFLAGS */ - TEST_TYPE_SIZE (PEMRSETMAPPERFLAGS, 8) - TEST_TYPE_ALIGN (PEMRSETMAPPERFLAGS, 8) - TEST_TARGET_SIZE (PEMRSETMAPPERFLAGS, 12) - TEST_TARGET_ALIGN(PEMRSETMAPPERFLAGS, 4) -} - -static void test_pack_PEMRSETMETARGN(void) -{ - /* PEMRSETMETARGN */ - TEST_TYPE_SIZE (PEMRSETMETARGN, 8) - TEST_TYPE_ALIGN (PEMRSETMETARGN, 8) - TEST_TARGET_SIZE (PEMRSETMETARGN, 8) - TEST_TARGET_ALIGN(PEMRSETMETARGN, 4) -} - -static void test_pack_PEMRSETMITERLIMIT(void) -{ - /* PEMRSETMITERLIMIT */ - TEST_TYPE_SIZE (PEMRSETMITERLIMIT, 8) - TEST_TYPE_ALIGN (PEMRSETMITERLIMIT, 8) - TEST_TARGET_SIZE (PEMRSETMITERLIMIT, 12) - TEST_TARGET_ALIGN(PEMRSETMITERLIMIT, 4) -} - -static void test_pack_PEMRSETPALETTEENTRIES(void) -{ - /* PEMRSETPALETTEENTRIES */ - TEST_TYPE_SIZE (PEMRSETPALETTEENTRIES, 8) - TEST_TYPE_ALIGN (PEMRSETPALETTEENTRIES, 8) - TEST_TARGET_SIZE (PEMRSETPALETTEENTRIES, 24) - TEST_TARGET_ALIGN(PEMRSETPALETTEENTRIES, 4) -} - -static void test_pack_PEMRSETPIXELV(void) -{ - /* PEMRSETPIXELV */ - TEST_TYPE_SIZE (PEMRSETPIXELV, 8) - TEST_TYPE_ALIGN (PEMRSETPIXELV, 8) - TEST_TARGET_SIZE (PEMRSETPIXELV, 20) - TEST_TARGET_ALIGN(PEMRSETPIXELV, 4) -} - -static void test_pack_PEMRSETPOLYFILLMODE(void) -{ - /* PEMRSETPOLYFILLMODE */ - TEST_TYPE_SIZE (PEMRSETPOLYFILLMODE, 8) - TEST_TYPE_ALIGN (PEMRSETPOLYFILLMODE, 8) - TEST_TARGET_SIZE (PEMRSETPOLYFILLMODE, 12) - TEST_TARGET_ALIGN(PEMRSETPOLYFILLMODE, 4) -} - -static void test_pack_PEMRSETROP2(void) -{ - /* PEMRSETROP2 */ - TEST_TYPE_SIZE (PEMRSETROP2, 8) - TEST_TYPE_ALIGN (PEMRSETROP2, 8) - TEST_TARGET_SIZE (PEMRSETROP2, 12) - TEST_TARGET_ALIGN(PEMRSETROP2, 4) -} - -static void test_pack_PEMRSETSTRETCHBLTMODE(void) -{ - /* PEMRSETSTRETCHBLTMODE */ - TEST_TYPE_SIZE (PEMRSETSTRETCHBLTMODE, 8) - TEST_TYPE_ALIGN (PEMRSETSTRETCHBLTMODE, 8) - TEST_TARGET_SIZE (PEMRSETSTRETCHBLTMODE, 12) - TEST_TARGET_ALIGN(PEMRSETSTRETCHBLTMODE, 4) -} - -static void test_pack_PEMRSETTEXTALIGN(void) -{ - /* PEMRSETTEXTALIGN */ - TEST_TYPE_SIZE (PEMRSETTEXTALIGN, 8) - TEST_TYPE_ALIGN (PEMRSETTEXTALIGN, 8) - TEST_TARGET_SIZE (PEMRSETTEXTALIGN, 12) - TEST_TARGET_ALIGN(PEMRSETTEXTALIGN, 4) -} - -static void test_pack_PEMRSETTEXTCOLOR(void) -{ - /* PEMRSETTEXTCOLOR */ - TEST_TYPE_SIZE (PEMRSETTEXTCOLOR, 8) - TEST_TYPE_ALIGN (PEMRSETTEXTCOLOR, 8) - TEST_TARGET_SIZE (PEMRSETTEXTCOLOR, 12) - TEST_TARGET_ALIGN(PEMRSETTEXTCOLOR, 4) -} - -static void test_pack_PEMRSETVIEWPORTEXTEX(void) -{ - /* PEMRSETVIEWPORTEXTEX */ - TEST_TYPE_SIZE (PEMRSETVIEWPORTEXTEX, 8) - TEST_TYPE_ALIGN (PEMRSETVIEWPORTEXTEX, 8) - TEST_TARGET_SIZE (PEMRSETVIEWPORTEXTEX, 16) - TEST_TARGET_ALIGN(PEMRSETVIEWPORTEXTEX, 4) -} - -static void test_pack_PEMRSETVIEWPORTORGEX(void) -{ - /* PEMRSETVIEWPORTORGEX */ - TEST_TYPE_SIZE (PEMRSETVIEWPORTORGEX, 8) - TEST_TYPE_ALIGN (PEMRSETVIEWPORTORGEX, 8) - TEST_TARGET_SIZE (PEMRSETVIEWPORTORGEX, 16) - TEST_TARGET_ALIGN(PEMRSETVIEWPORTORGEX, 4) -} - -static void test_pack_PEMRSETWINDOWEXTEX(void) -{ - /* PEMRSETWINDOWEXTEX */ - TEST_TYPE_SIZE (PEMRSETWINDOWEXTEX, 8) - TEST_TYPE_ALIGN (PEMRSETWINDOWEXTEX, 8) - TEST_TARGET_SIZE (PEMRSETWINDOWEXTEX, 16) - TEST_TARGET_ALIGN(PEMRSETWINDOWEXTEX, 4) -} - -static void test_pack_PEMRSETWINDOWORGEX(void) -{ - /* PEMRSETWINDOWORGEX */ - TEST_TYPE_SIZE (PEMRSETWINDOWORGEX, 8) - TEST_TYPE_ALIGN (PEMRSETWINDOWORGEX, 8) - TEST_TARGET_SIZE (PEMRSETWINDOWORGEX, 16) - TEST_TARGET_ALIGN(PEMRSETWINDOWORGEX, 4) -} - -static void test_pack_PEMRSETWORLDTRANSFORM(void) -{ - /* PEMRSETWORLDTRANSFORM */ - TEST_TYPE_SIZE (PEMRSETWORLDTRANSFORM, 8) - TEST_TYPE_ALIGN (PEMRSETWORLDTRANSFORM, 8) - TEST_TARGET_SIZE (PEMRSETWORLDTRANSFORM, 32) - TEST_TARGET_ALIGN(PEMRSETWORLDTRANSFORM, 4) -} - -static void test_pack_PEMRSTRETCHBLT(void) -{ - /* PEMRSTRETCHBLT */ - TEST_TYPE_SIZE (PEMRSTRETCHBLT, 8) - TEST_TYPE_ALIGN (PEMRSTRETCHBLT, 8) - TEST_TARGET_SIZE (PEMRSTRETCHBLT, 108) - TEST_TARGET_ALIGN(PEMRSTRETCHBLT, 4) -} - -static void test_pack_PEMRSTRETCHDIBITS(void) -{ - /* PEMRSTRETCHDIBITS */ - TEST_TYPE_SIZE (PEMRSTRETCHDIBITS, 8) - TEST_TYPE_ALIGN (PEMRSTRETCHDIBITS, 8) - TEST_TARGET_SIZE (PEMRSTRETCHDIBITS, 80) - TEST_TARGET_ALIGN(PEMRSTRETCHDIBITS, 4) -} - -static void test_pack_PEMRSTROKEANDFILLPATH(void) -{ - /* PEMRSTROKEANDFILLPATH */ - TEST_TYPE_SIZE (PEMRSTROKEANDFILLPATH, 8) - TEST_TYPE_ALIGN (PEMRSTROKEANDFILLPATH, 8) - TEST_TARGET_SIZE (PEMRSTROKEANDFILLPATH, 24) - TEST_TARGET_ALIGN(PEMRSTROKEANDFILLPATH, 4) -} - -static void test_pack_PEMRSTROKEPATH(void) -{ - /* PEMRSTROKEPATH */ - TEST_TYPE_SIZE (PEMRSTROKEPATH, 8) - TEST_TYPE_ALIGN (PEMRSTROKEPATH, 8) - TEST_TARGET_SIZE (PEMRSTROKEPATH, 24) - TEST_TARGET_ALIGN(PEMRSTROKEPATH, 4) -} - -static void test_pack_PEMRTEXT(void) -{ - /* PEMRTEXT */ - TEST_TYPE_SIZE (PEMRTEXT, 8) - TEST_TYPE_ALIGN (PEMRTEXT, 8) - TEST_TARGET_SIZE (PEMRTEXT, 40) - TEST_TARGET_ALIGN(PEMRTEXT, 4) -} - -static void test_pack_PEMRWIDENPATH(void) -{ - /* PEMRWIDENPATH */ - TEST_TYPE_SIZE (PEMRWIDENPATH, 8) - TEST_TYPE_ALIGN (PEMRWIDENPATH, 8) - TEST_TARGET_SIZE (PEMRWIDENPATH, 8) - TEST_TARGET_ALIGN(PEMRWIDENPATH, 4) -} - -static void test_pack_PENHMETAHEADER(void) -{ - /* PENHMETAHEADER */ - TEST_TYPE_SIZE (PENHMETAHEADER, 8) - TEST_TYPE_ALIGN (PENHMETAHEADER, 8) - TEST_TARGET_SIZE (PENHMETAHEADER, 108) - TEST_TARGET_ALIGN(PENHMETAHEADER, 4) -} - -static void test_pack_PEXTLOGFONTA(void) -{ - /* PEXTLOGFONTA */ - TEST_TYPE_SIZE (PEXTLOGFONTA, 8) - TEST_TYPE_ALIGN (PEXTLOGFONTA, 8) - TEST_TARGET_SIZE (PEXTLOGFONTA, 192) - TEST_TARGET_ALIGN(PEXTLOGFONTA, 4) -} - -static void test_pack_PEXTLOGFONTW(void) -{ - /* PEXTLOGFONTW */ - TEST_TYPE_SIZE (PEXTLOGFONTW, 8) - TEST_TYPE_ALIGN (PEXTLOGFONTW, 8) - TEST_TARGET_SIZE (PEXTLOGFONTW, 320) - TEST_TARGET_ALIGN(PEXTLOGFONTW, 4) -} - -static void test_pack_PEXTLOGPEN(void) -{ - /* PEXTLOGPEN */ - TEST_TYPE_SIZE (PEXTLOGPEN, 8) - TEST_TYPE_ALIGN (PEXTLOGPEN, 8) - TEST_TARGET_SIZE (PEXTLOGPEN, 32) - TEST_TARGET_ALIGN(PEXTLOGPEN, 8) -} - -static void test_pack_PFONTSIGNATURE(void) -{ - /* PFONTSIGNATURE */ - TEST_TYPE_SIZE (PFONTSIGNATURE, 8) - TEST_TYPE_ALIGN (PFONTSIGNATURE, 8) - TEST_TARGET_SIZE (PFONTSIGNATURE, 24) - TEST_TARGET_ALIGN(PFONTSIGNATURE, 4) -} - -static void test_pack_PGLYPHMETRICSFLOAT(void) -{ - /* PGLYPHMETRICSFLOAT */ - TEST_TYPE_SIZE (PGLYPHMETRICSFLOAT, 8) - TEST_TYPE_ALIGN (PGLYPHMETRICSFLOAT, 8) - TEST_TARGET_SIZE (PGLYPHMETRICSFLOAT, 24) - TEST_TARGET_ALIGN(PGLYPHMETRICSFLOAT, 4) -} - -static void test_pack_PGRADIENT_RECT(void) -{ - /* PGRADIENT_RECT */ - TEST_TYPE_SIZE (PGRADIENT_RECT, 8) - TEST_TYPE_ALIGN (PGRADIENT_RECT, 8) - TEST_TARGET_SIZE (PGRADIENT_RECT, 8) - TEST_TARGET_ALIGN(PGRADIENT_RECT, 4) -} - -static void test_pack_PGRADIENT_TRIANGLE(void) -{ - /* PGRADIENT_TRIANGLE */ - TEST_TYPE_SIZE (PGRADIENT_TRIANGLE, 8) - TEST_TYPE_ALIGN (PGRADIENT_TRIANGLE, 8) - TEST_TARGET_SIZE (PGRADIENT_TRIANGLE, 12) - TEST_TARGET_ALIGN(PGRADIENT_TRIANGLE, 4) -} - -static void test_pack_PHANDLETABLE(void) -{ - /* PHANDLETABLE */ - TEST_TYPE_SIZE (PHANDLETABLE, 8) - TEST_TYPE_ALIGN (PHANDLETABLE, 8) - TEST_TARGET_SIZE (PHANDLETABLE, 8) - TEST_TARGET_ALIGN(PHANDLETABLE, 8) -} - -static void test_pack_PIXELFORMATDESCRIPTOR(void) -{ - /* PIXELFORMATDESCRIPTOR */ - TEST_TYPE_SIZE (PIXELFORMATDESCRIPTOR, 40) - TEST_TYPE_ALIGN (PIXELFORMATDESCRIPTOR, 4) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, nSize, 2) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, nSize, 2) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, nSize, 0) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, nVersion, 2) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, nVersion, 2) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, nVersion, 2) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, dwFlags, 4) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, dwFlags, 4) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, dwFlags, 4) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, iPixelType, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, iPixelType, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, iPixelType, 8) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cColorBits, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cColorBits, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cColorBits, 9) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cRedBits, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cRedBits, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cRedBits, 10) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cRedShift, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cRedShift, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cRedShift, 11) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cGreenBits, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cGreenBits, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cGreenBits, 12) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cGreenShift, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cGreenShift, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cGreenShift, 13) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cBlueBits, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cBlueBits, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cBlueBits, 14) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cBlueShift, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cBlueShift, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cBlueShift, 15) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cAlphaBits, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cAlphaBits, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cAlphaBits, 16) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cAlphaShift, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cAlphaShift, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cAlphaShift, 17) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cAccumBits, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cAccumBits, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cAccumBits, 18) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cAccumRedBits, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cAccumRedBits, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cAccumRedBits, 19) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cAccumGreenBits, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cAccumGreenBits, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cAccumGreenBits, 20) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cAccumBlueBits, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cAccumBlueBits, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cAccumBlueBits, 21) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cAccumAlphaBits, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cAccumAlphaBits, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cAccumAlphaBits, 22) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cDepthBits, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cDepthBits, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cDepthBits, 23) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cStencilBits, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cStencilBits, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cStencilBits, 24) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cAuxBuffers, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cAuxBuffers, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cAuxBuffers, 25) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, iLayerType, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, iLayerType, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, iLayerType, 26) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, bReserved, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, bReserved, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, bReserved, 27) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, dwLayerMask, 4) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, dwLayerMask, 4) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, dwLayerMask, 28) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, dwVisibleMask, 4) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, dwVisibleMask, 4) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, dwVisibleMask, 32) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, dwDamageMask, 4) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, dwDamageMask, 4) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, dwDamageMask, 36) -} - -static void test_pack_PLAYERPLANEDESCRIPTOR(void) -{ - /* PLAYERPLANEDESCRIPTOR */ - TEST_TYPE_SIZE (PLAYERPLANEDESCRIPTOR, 8) - TEST_TYPE_ALIGN (PLAYERPLANEDESCRIPTOR, 8) - TEST_TARGET_SIZE (PLAYERPLANEDESCRIPTOR, 32) - TEST_TARGET_ALIGN(PLAYERPLANEDESCRIPTOR, 4) -} - -static void test_pack_PLOCALESIGNATURE(void) -{ - /* PLOCALESIGNATURE */ - TEST_TYPE_SIZE (PLOCALESIGNATURE, 8) - TEST_TYPE_ALIGN (PLOCALESIGNATURE, 8) - TEST_TARGET_SIZE (PLOCALESIGNATURE, 32) - TEST_TARGET_ALIGN(PLOCALESIGNATURE, 4) -} - -static void test_pack_PLOGBRUSH(void) -{ - /* PLOGBRUSH */ - TEST_TYPE_SIZE (PLOGBRUSH, 8) - TEST_TYPE_ALIGN (PLOGBRUSH, 8) - TEST_TARGET_SIZE (PLOGBRUSH, 16) - TEST_TARGET_ALIGN(PLOGBRUSH, 8) -} - -static void test_pack_PLOGFONTA(void) -{ - /* PLOGFONTA */ - TEST_TYPE_SIZE (PLOGFONTA, 8) - TEST_TYPE_ALIGN (PLOGFONTA, 8) - TEST_TARGET_SIZE (PLOGFONTA, 60) - TEST_TARGET_ALIGN(PLOGFONTA, 4) -} - -static void test_pack_PLOGFONTW(void) -{ - /* PLOGFONTW */ - TEST_TYPE_SIZE (PLOGFONTW, 8) - TEST_TYPE_ALIGN (PLOGFONTW, 8) - TEST_TARGET_SIZE (PLOGFONTW, 92) - TEST_TARGET_ALIGN(PLOGFONTW, 4) -} - -static void test_pack_PMETAHEADER(void) -{ - /* PMETAHEADER */ - TEST_TYPE_SIZE (PMETAHEADER, 8) - TEST_TYPE_ALIGN (PMETAHEADER, 8) - TEST_TARGET_SIZE (PMETAHEADER, 18) - TEST_TARGET_ALIGN(PMETAHEADER, 2) -} - -static void test_pack_PMETARECORD(void) -{ - /* PMETARECORD */ - TEST_TYPE_SIZE (PMETARECORD, 8) - TEST_TYPE_ALIGN (PMETARECORD, 8) - TEST_TARGET_SIZE (PMETARECORD, 8) - TEST_TARGET_ALIGN(PMETARECORD, 4) -} - -static void test_pack_PNEWTEXTMETRICA(void) -{ - /* PNEWTEXTMETRICA */ - TEST_TYPE_SIZE (PNEWTEXTMETRICA, 8) - TEST_TYPE_ALIGN (PNEWTEXTMETRICA, 8) - TEST_TARGET_SIZE (PNEWTEXTMETRICA, 72) - TEST_TARGET_ALIGN(PNEWTEXTMETRICA, 4) -} - -static void test_pack_PNEWTEXTMETRICW(void) -{ - /* PNEWTEXTMETRICW */ - TEST_TYPE_SIZE (PNEWTEXTMETRICW, 8) - TEST_TYPE_ALIGN (PNEWTEXTMETRICW, 8) - TEST_TARGET_SIZE (PNEWTEXTMETRICW, 76) - TEST_TARGET_ALIGN(PNEWTEXTMETRICW, 4) -} - -static void test_pack_POINTFLOAT(void) -{ - /* POINTFLOAT */ - TEST_TYPE_SIZE (POINTFLOAT, 8) - TEST_TYPE_ALIGN (POINTFLOAT, 4) - TEST_FIELD_SIZE (POINTFLOAT, x, 4) - TEST_FIELD_ALIGN (POINTFLOAT, x, 4) - TEST_FIELD_OFFSET(POINTFLOAT, x, 0) - TEST_FIELD_SIZE (POINTFLOAT, y, 4) - TEST_FIELD_ALIGN (POINTFLOAT, y, 4) - TEST_FIELD_OFFSET(POINTFLOAT, y, 4) -} - -static void test_pack_POINTFX(void) -{ - /* POINTFX */ - TEST_TYPE_SIZE (POINTFX, 8) - TEST_TYPE_ALIGN (POINTFX, 2) - TEST_FIELD_SIZE (POINTFX, x, 4) - TEST_FIELD_ALIGN (POINTFX, x, 2) - TEST_FIELD_OFFSET(POINTFX, x, 0) - TEST_FIELD_SIZE (POINTFX, y, 4) - TEST_FIELD_ALIGN (POINTFX, y, 2) - TEST_FIELD_OFFSET(POINTFX, y, 4) -} - -static void test_pack_POLYTEXTA(void) -{ - /* POLYTEXTA */ - TEST_TYPE_SIZE (POLYTEXTA, 56) - TEST_TYPE_ALIGN (POLYTEXTA, 8) - TEST_FIELD_SIZE (POLYTEXTA, x, 4) - TEST_FIELD_ALIGN (POLYTEXTA, x, 4) - TEST_FIELD_OFFSET(POLYTEXTA, x, 0) - TEST_FIELD_SIZE (POLYTEXTA, y, 4) - TEST_FIELD_ALIGN (POLYTEXTA, y, 4) - TEST_FIELD_OFFSET(POLYTEXTA, y, 4) - TEST_FIELD_SIZE (POLYTEXTA, n, 4) - TEST_FIELD_ALIGN (POLYTEXTA, n, 4) - TEST_FIELD_OFFSET(POLYTEXTA, n, 8) - TEST_FIELD_SIZE (POLYTEXTA, lpstr, 8) - TEST_FIELD_ALIGN (POLYTEXTA, lpstr, 8) - TEST_FIELD_OFFSET(POLYTEXTA, lpstr, 16) - TEST_FIELD_SIZE (POLYTEXTA, uiFlags, 4) - TEST_FIELD_ALIGN (POLYTEXTA, uiFlags, 4) - TEST_FIELD_OFFSET(POLYTEXTA, uiFlags, 24) - TEST_FIELD_SIZE (POLYTEXTA, rcl, 16) - TEST_FIELD_ALIGN (POLYTEXTA, rcl, 4) - TEST_FIELD_OFFSET(POLYTEXTA, rcl, 28) - TEST_FIELD_SIZE (POLYTEXTA, pdx, 8) - TEST_FIELD_ALIGN (POLYTEXTA, pdx, 8) - TEST_FIELD_OFFSET(POLYTEXTA, pdx, 48) -} - -static void test_pack_POLYTEXTW(void) -{ - /* POLYTEXTW */ - TEST_TYPE_SIZE (POLYTEXTW, 56) - TEST_TYPE_ALIGN (POLYTEXTW, 8) - TEST_FIELD_SIZE (POLYTEXTW, x, 4) - TEST_FIELD_ALIGN (POLYTEXTW, x, 4) - TEST_FIELD_OFFSET(POLYTEXTW, x, 0) - TEST_FIELD_SIZE (POLYTEXTW, y, 4) - TEST_FIELD_ALIGN (POLYTEXTW, y, 4) - TEST_FIELD_OFFSET(POLYTEXTW, y, 4) - TEST_FIELD_SIZE (POLYTEXTW, n, 4) - TEST_FIELD_ALIGN (POLYTEXTW, n, 4) - TEST_FIELD_OFFSET(POLYTEXTW, n, 8) - TEST_FIELD_SIZE (POLYTEXTW, lpstr, 8) - TEST_FIELD_ALIGN (POLYTEXTW, lpstr, 8) - TEST_FIELD_OFFSET(POLYTEXTW, lpstr, 16) - TEST_FIELD_SIZE (POLYTEXTW, uiFlags, 4) - TEST_FIELD_ALIGN (POLYTEXTW, uiFlags, 4) - TEST_FIELD_OFFSET(POLYTEXTW, uiFlags, 24) - TEST_FIELD_SIZE (POLYTEXTW, rcl, 16) - TEST_FIELD_ALIGN (POLYTEXTW, rcl, 4) - TEST_FIELD_OFFSET(POLYTEXTW, rcl, 28) - TEST_FIELD_SIZE (POLYTEXTW, pdx, 8) - TEST_FIELD_ALIGN (POLYTEXTW, pdx, 8) - TEST_FIELD_OFFSET(POLYTEXTW, pdx, 48) -} - -static void test_pack_POUTLINETEXTMETRICA(void) -{ - /* POUTLINETEXTMETRICA */ - TEST_TYPE_SIZE (POUTLINETEXTMETRICA, 8) - TEST_TYPE_ALIGN (POUTLINETEXTMETRICA, 8) - TEST_TARGET_SIZE (POUTLINETEXTMETRICA, 232) - TEST_TARGET_ALIGN(POUTLINETEXTMETRICA, 8) -} - -static void test_pack_POUTLINETEXTMETRICW(void) -{ - /* POUTLINETEXTMETRICW */ - TEST_TYPE_SIZE (POUTLINETEXTMETRICW, 8) - TEST_TYPE_ALIGN (POUTLINETEXTMETRICW, 8) - TEST_TARGET_SIZE (POUTLINETEXTMETRICW, 232) - TEST_TARGET_ALIGN(POUTLINETEXTMETRICW, 8) -} - -static void test_pack_PPELARRAY(void) -{ - /* PPELARRAY */ - TEST_TYPE_SIZE (PPELARRAY, 8) - TEST_TYPE_ALIGN (PPELARRAY, 8) - TEST_TARGET_SIZE (PPELARRAY, 20) - TEST_TARGET_ALIGN(PPELARRAY, 4) -} - -static void test_pack_PPIXELFORMATDESCRIPTOR(void) -{ - /* PPIXELFORMATDESCRIPTOR */ - TEST_TYPE_SIZE (PPIXELFORMATDESCRIPTOR, 8) - TEST_TYPE_ALIGN (PPIXELFORMATDESCRIPTOR, 8) - TEST_TARGET_SIZE (PPIXELFORMATDESCRIPTOR, 40) - TEST_TARGET_ALIGN(PPIXELFORMATDESCRIPTOR, 4) -} - -static void test_pack_PPOINTFLOAT(void) -{ - /* PPOINTFLOAT */ - TEST_TYPE_SIZE (PPOINTFLOAT, 8) - TEST_TYPE_ALIGN (PPOINTFLOAT, 8) - TEST_TARGET_SIZE (PPOINTFLOAT, 8) - TEST_TARGET_ALIGN(PPOINTFLOAT, 4) -} - -static void test_pack_PPOLYTEXTA(void) -{ - /* PPOLYTEXTA */ - TEST_TYPE_SIZE (PPOLYTEXTA, 8) - TEST_TYPE_ALIGN (PPOLYTEXTA, 8) - TEST_TARGET_SIZE (PPOLYTEXTA, 56) - TEST_TARGET_ALIGN(PPOLYTEXTA, 8) -} - -static void test_pack_PPOLYTEXTW(void) -{ - /* PPOLYTEXTW */ - TEST_TYPE_SIZE (PPOLYTEXTW, 8) - TEST_TYPE_ALIGN (PPOLYTEXTW, 8) - TEST_TARGET_SIZE (PPOLYTEXTW, 56) - TEST_TARGET_ALIGN(PPOLYTEXTW, 8) -} - -static void test_pack_PRGNDATA(void) -{ - /* PRGNDATA */ - TEST_TYPE_SIZE (PRGNDATA, 8) - TEST_TYPE_ALIGN (PRGNDATA, 8) - TEST_TARGET_SIZE (PRGNDATA, 36) - TEST_TARGET_ALIGN(PRGNDATA, 4) -} - -static void test_pack_PRGNDATAHEADER(void) -{ - /* PRGNDATAHEADER */ - TEST_TYPE_SIZE (PRGNDATAHEADER, 8) - TEST_TYPE_ALIGN (PRGNDATAHEADER, 8) - TEST_TARGET_SIZE (PRGNDATAHEADER, 32) - TEST_TARGET_ALIGN(PRGNDATAHEADER, 4) -} - -static void test_pack_PTEXTMETRICA(void) -{ - /* PTEXTMETRICA */ - TEST_TYPE_SIZE (PTEXTMETRICA, 8) - TEST_TYPE_ALIGN (PTEXTMETRICA, 8) - TEST_TARGET_SIZE (PTEXTMETRICA, 56) - TEST_TARGET_ALIGN(PTEXTMETRICA, 4) -} - -static void test_pack_PTEXTMETRICW(void) -{ - /* PTEXTMETRICW */ - TEST_TYPE_SIZE (PTEXTMETRICW, 8) - TEST_TYPE_ALIGN (PTEXTMETRICW, 8) - TEST_TARGET_SIZE (PTEXTMETRICW, 60) - TEST_TARGET_ALIGN(PTEXTMETRICW, 4) -} - -static void test_pack_PTRIVERTEX(void) -{ - /* PTRIVERTEX */ - TEST_TYPE_SIZE (PTRIVERTEX, 8) - TEST_TYPE_ALIGN (PTRIVERTEX, 8) - TEST_TARGET_SIZE (PTRIVERTEX, 16) - TEST_TARGET_ALIGN(PTRIVERTEX, 4) -} - -static void test_pack_PXFORM(void) -{ - /* PXFORM */ - TEST_TYPE_SIZE (PXFORM, 8) - TEST_TYPE_ALIGN (PXFORM, 8) - TEST_TARGET_SIZE (PXFORM, 24) - TEST_TARGET_ALIGN(PXFORM, 4) -} - -static void test_pack_RASTERIZER_STATUS(void) -{ - /* RASTERIZER_STATUS */ - TEST_TYPE_SIZE (RASTERIZER_STATUS, 6) - TEST_TYPE_ALIGN (RASTERIZER_STATUS, 2) - TEST_FIELD_SIZE (RASTERIZER_STATUS, nSize, 2) - TEST_FIELD_ALIGN (RASTERIZER_STATUS, nSize, 2) - TEST_FIELD_OFFSET(RASTERIZER_STATUS, nSize, 0) - TEST_FIELD_SIZE (RASTERIZER_STATUS, wFlags, 2) - TEST_FIELD_ALIGN (RASTERIZER_STATUS, wFlags, 2) - TEST_FIELD_OFFSET(RASTERIZER_STATUS, wFlags, 2) - TEST_FIELD_SIZE (RASTERIZER_STATUS, nLanguageID, 2) - TEST_FIELD_ALIGN (RASTERIZER_STATUS, nLanguageID, 2) - TEST_FIELD_OFFSET(RASTERIZER_STATUS, nLanguageID, 4) -} - -static void test_pack_RGBQUAD(void) -{ - /* RGBQUAD */ - TEST_TYPE_SIZE (RGBQUAD, 4) - TEST_TYPE_ALIGN (RGBQUAD, 1) - TEST_FIELD_SIZE (RGBQUAD, rgbBlue, 1) - TEST_FIELD_ALIGN (RGBQUAD, rgbBlue, 1) - TEST_FIELD_OFFSET(RGBQUAD, rgbBlue, 0) - TEST_FIELD_SIZE (RGBQUAD, rgbGreen, 1) - TEST_FIELD_ALIGN (RGBQUAD, rgbGreen, 1) - TEST_FIELD_OFFSET(RGBQUAD, rgbGreen, 1) - TEST_FIELD_SIZE (RGBQUAD, rgbRed, 1) - TEST_FIELD_ALIGN (RGBQUAD, rgbRed, 1) - TEST_FIELD_OFFSET(RGBQUAD, rgbRed, 2) - TEST_FIELD_SIZE (RGBQUAD, rgbReserved, 1) - TEST_FIELD_ALIGN (RGBQUAD, rgbReserved, 1) - TEST_FIELD_OFFSET(RGBQUAD, rgbReserved, 3) -} - -static void test_pack_RGBTRIPLE(void) -{ - /* RGBTRIPLE */ - TEST_TYPE_SIZE (RGBTRIPLE, 3) - TEST_TYPE_ALIGN (RGBTRIPLE, 1) - TEST_FIELD_SIZE (RGBTRIPLE, rgbtBlue, 1) - TEST_FIELD_ALIGN (RGBTRIPLE, rgbtBlue, 1) - TEST_FIELD_OFFSET(RGBTRIPLE, rgbtBlue, 0) - TEST_FIELD_SIZE (RGBTRIPLE, rgbtGreen, 1) - TEST_FIELD_ALIGN (RGBTRIPLE, rgbtGreen, 1) - TEST_FIELD_OFFSET(RGBTRIPLE, rgbtGreen, 1) - TEST_FIELD_SIZE (RGBTRIPLE, rgbtRed, 1) - TEST_FIELD_ALIGN (RGBTRIPLE, rgbtRed, 1) - TEST_FIELD_OFFSET(RGBTRIPLE, rgbtRed, 2) -} - -static void test_pack_RGNDATA(void) -{ - /* RGNDATA */ - TEST_TYPE_SIZE (RGNDATA, 36) - TEST_TYPE_ALIGN (RGNDATA, 4) - TEST_FIELD_SIZE (RGNDATA, rdh, 32) - TEST_FIELD_ALIGN (RGNDATA, rdh, 4) - TEST_FIELD_OFFSET(RGNDATA, rdh, 0) - TEST_FIELD_SIZE (RGNDATA, Buffer, 1) - TEST_FIELD_ALIGN (RGNDATA, Buffer, 1) - TEST_FIELD_OFFSET(RGNDATA, Buffer, 32) -} - -static void test_pack_RGNDATAHEADER(void) -{ - /* RGNDATAHEADER */ - TEST_TYPE_SIZE (RGNDATAHEADER, 32) - TEST_TYPE_ALIGN (RGNDATAHEADER, 4) - TEST_FIELD_SIZE (RGNDATAHEADER, dwSize, 4) - TEST_FIELD_ALIGN (RGNDATAHEADER, dwSize, 4) - TEST_FIELD_OFFSET(RGNDATAHEADER, dwSize, 0) - TEST_FIELD_SIZE (RGNDATAHEADER, iType, 4) - TEST_FIELD_ALIGN (RGNDATAHEADER, iType, 4) - TEST_FIELD_OFFSET(RGNDATAHEADER, iType, 4) - TEST_FIELD_SIZE (RGNDATAHEADER, nCount, 4) - TEST_FIELD_ALIGN (RGNDATAHEADER, nCount, 4) - TEST_FIELD_OFFSET(RGNDATAHEADER, nCount, 8) - TEST_FIELD_SIZE (RGNDATAHEADER, nRgnSize, 4) - TEST_FIELD_ALIGN (RGNDATAHEADER, nRgnSize, 4) - TEST_FIELD_OFFSET(RGNDATAHEADER, nRgnSize, 12) - TEST_FIELD_SIZE (RGNDATAHEADER, rcBound, 16) - TEST_FIELD_ALIGN (RGNDATAHEADER, rcBound, 4) - TEST_FIELD_OFFSET(RGNDATAHEADER, rcBound, 16) -} - -static void test_pack_TEXTMETRICA(void) -{ - /* TEXTMETRICA */ - TEST_TYPE_SIZE (TEXTMETRICA, 56) - TEST_TYPE_ALIGN (TEXTMETRICA, 4) - TEST_FIELD_SIZE (TEXTMETRICA, tmHeight, 4) - TEST_FIELD_ALIGN (TEXTMETRICA, tmHeight, 4) - TEST_FIELD_OFFSET(TEXTMETRICA, tmHeight, 0) - TEST_FIELD_SIZE (TEXTMETRICA, tmAscent, 4) - TEST_FIELD_ALIGN (TEXTMETRICA, tmAscent, 4) - TEST_FIELD_OFFSET(TEXTMETRICA, tmAscent, 4) - TEST_FIELD_SIZE (TEXTMETRICA, tmDescent, 4) - TEST_FIELD_ALIGN (TEXTMETRICA, tmDescent, 4) - TEST_FIELD_OFFSET(TEXTMETRICA, tmDescent, 8) - TEST_FIELD_SIZE (TEXTMETRICA, tmInternalLeading, 4) - TEST_FIELD_ALIGN (TEXTMETRICA, tmInternalLeading, 4) - TEST_FIELD_OFFSET(TEXTMETRICA, tmInternalLeading, 12) - TEST_FIELD_SIZE (TEXTMETRICA, tmExternalLeading, 4) - TEST_FIELD_ALIGN (TEXTMETRICA, tmExternalLeading, 4) - TEST_FIELD_OFFSET(TEXTMETRICA, tmExternalLeading, 16) - TEST_FIELD_SIZE (TEXTMETRICA, tmAveCharWidth, 4) - TEST_FIELD_ALIGN (TEXTMETRICA, tmAveCharWidth, 4) - TEST_FIELD_OFFSET(TEXTMETRICA, tmAveCharWidth, 20) - TEST_FIELD_SIZE (TEXTMETRICA, tmMaxCharWidth, 4) - TEST_FIELD_ALIGN (TEXTMETRICA, tmMaxCharWidth, 4) - TEST_FIELD_OFFSET(TEXTMETRICA, tmMaxCharWidth, 24) - TEST_FIELD_SIZE (TEXTMETRICA, tmWeight, 4) - TEST_FIELD_ALIGN (TEXTMETRICA, tmWeight, 4) - TEST_FIELD_OFFSET(TEXTMETRICA, tmWeight, 28) - TEST_FIELD_SIZE (TEXTMETRICA, tmOverhang, 4) - TEST_FIELD_ALIGN (TEXTMETRICA, tmOverhang, 4) - TEST_FIELD_OFFSET(TEXTMETRICA, tmOverhang, 32) - TEST_FIELD_SIZE (TEXTMETRICA, tmDigitizedAspectX, 4) - TEST_FIELD_ALIGN (TEXTMETRICA, tmDigitizedAspectX, 4) - TEST_FIELD_OFFSET(TEXTMETRICA, tmDigitizedAspectX, 36) - TEST_FIELD_SIZE (TEXTMETRICA, tmDigitizedAspectY, 4) - TEST_FIELD_ALIGN (TEXTMETRICA, tmDigitizedAspectY, 4) - TEST_FIELD_OFFSET(TEXTMETRICA, tmDigitizedAspectY, 40) - TEST_FIELD_SIZE (TEXTMETRICA, tmFirstChar, 1) - TEST_FIELD_ALIGN (TEXTMETRICA, tmFirstChar, 1) - TEST_FIELD_OFFSET(TEXTMETRICA, tmFirstChar, 44) - TEST_FIELD_SIZE (TEXTMETRICA, tmLastChar, 1) - TEST_FIELD_ALIGN (TEXTMETRICA, tmLastChar, 1) - TEST_FIELD_OFFSET(TEXTMETRICA, tmLastChar, 45) - TEST_FIELD_SIZE (TEXTMETRICA, tmDefaultChar, 1) - TEST_FIELD_ALIGN (TEXTMETRICA, tmDefaultChar, 1) - TEST_FIELD_OFFSET(TEXTMETRICA, tmDefaultChar, 46) - TEST_FIELD_SIZE (TEXTMETRICA, tmBreakChar, 1) - TEST_FIELD_ALIGN (TEXTMETRICA, tmBreakChar, 1) - TEST_FIELD_OFFSET(TEXTMETRICA, tmBreakChar, 47) - TEST_FIELD_SIZE (TEXTMETRICA, tmItalic, 1) - TEST_FIELD_ALIGN (TEXTMETRICA, tmItalic, 1) - TEST_FIELD_OFFSET(TEXTMETRICA, tmItalic, 48) - TEST_FIELD_SIZE (TEXTMETRICA, tmUnderlined, 1) - TEST_FIELD_ALIGN (TEXTMETRICA, tmUnderlined, 1) - TEST_FIELD_OFFSET(TEXTMETRICA, tmUnderlined, 49) - TEST_FIELD_SIZE (TEXTMETRICA, tmStruckOut, 1) - TEST_FIELD_ALIGN (TEXTMETRICA, tmStruckOut, 1) - TEST_FIELD_OFFSET(TEXTMETRICA, tmStruckOut, 50) - TEST_FIELD_SIZE (TEXTMETRICA, tmPitchAndFamily, 1) - TEST_FIELD_ALIGN (TEXTMETRICA, tmPitchAndFamily, 1) - TEST_FIELD_OFFSET(TEXTMETRICA, tmPitchAndFamily, 51) - TEST_FIELD_SIZE (TEXTMETRICA, tmCharSet, 1) - TEST_FIELD_ALIGN (TEXTMETRICA, tmCharSet, 1) - TEST_FIELD_OFFSET(TEXTMETRICA, tmCharSet, 52) -} - -static void test_pack_TEXTMETRICW(void) -{ - /* TEXTMETRICW */ - TEST_TYPE_SIZE (TEXTMETRICW, 60) - TEST_TYPE_ALIGN (TEXTMETRICW, 4) - TEST_FIELD_SIZE (TEXTMETRICW, tmHeight, 4) - TEST_FIELD_ALIGN (TEXTMETRICW, tmHeight, 4) - TEST_FIELD_OFFSET(TEXTMETRICW, tmHeight, 0) - TEST_FIELD_SIZE (TEXTMETRICW, tmAscent, 4) - TEST_FIELD_ALIGN (TEXTMETRICW, tmAscent, 4) - TEST_FIELD_OFFSET(TEXTMETRICW, tmAscent, 4) - TEST_FIELD_SIZE (TEXTMETRICW, tmDescent, 4) - TEST_FIELD_ALIGN (TEXTMETRICW, tmDescent, 4) - TEST_FIELD_OFFSET(TEXTMETRICW, tmDescent, 8) - TEST_FIELD_SIZE (TEXTMETRICW, tmInternalLeading, 4) - TEST_FIELD_ALIGN (TEXTMETRICW, tmInternalLeading, 4) - TEST_FIELD_OFFSET(TEXTMETRICW, tmInternalLeading, 12) - TEST_FIELD_SIZE (TEXTMETRICW, tmExternalLeading, 4) - TEST_FIELD_ALIGN (TEXTMETRICW, tmExternalLeading, 4) - TEST_FIELD_OFFSET(TEXTMETRICW, tmExternalLeading, 16) - TEST_FIELD_SIZE (TEXTMETRICW, tmAveCharWidth, 4) - TEST_FIELD_ALIGN (TEXTMETRICW, tmAveCharWidth, 4) - TEST_FIELD_OFFSET(TEXTMETRICW, tmAveCharWidth, 20) - TEST_FIELD_SIZE (TEXTMETRICW, tmMaxCharWidth, 4) - TEST_FIELD_ALIGN (TEXTMETRICW, tmMaxCharWidth, 4) - TEST_FIELD_OFFSET(TEXTMETRICW, tmMaxCharWidth, 24) - TEST_FIELD_SIZE (TEXTMETRICW, tmWeight, 4) - TEST_FIELD_ALIGN (TEXTMETRICW, tmWeight, 4) - TEST_FIELD_OFFSET(TEXTMETRICW, tmWeight, 28) - TEST_FIELD_SIZE (TEXTMETRICW, tmOverhang, 4) - TEST_FIELD_ALIGN (TEXTMETRICW, tmOverhang, 4) - TEST_FIELD_OFFSET(TEXTMETRICW, tmOverhang, 32) - TEST_FIELD_SIZE (TEXTMETRICW, tmDigitizedAspectX, 4) - TEST_FIELD_ALIGN (TEXTMETRICW, tmDigitizedAspectX, 4) - TEST_FIELD_OFFSET(TEXTMETRICW, tmDigitizedAspectX, 36) - TEST_FIELD_SIZE (TEXTMETRICW, tmDigitizedAspectY, 4) - TEST_FIELD_ALIGN (TEXTMETRICW, tmDigitizedAspectY, 4) - TEST_FIELD_OFFSET(TEXTMETRICW, tmDigitizedAspectY, 40) - TEST_FIELD_SIZE (TEXTMETRICW, tmFirstChar, 2) - TEST_FIELD_ALIGN (TEXTMETRICW, tmFirstChar, 2) - TEST_FIELD_OFFSET(TEXTMETRICW, tmFirstChar, 44) - TEST_FIELD_SIZE (TEXTMETRICW, tmLastChar, 2) - TEST_FIELD_ALIGN (TEXTMETRICW, tmLastChar, 2) - TEST_FIELD_OFFSET(TEXTMETRICW, tmLastChar, 46) - TEST_FIELD_SIZE (TEXTMETRICW, tmDefaultChar, 2) - TEST_FIELD_ALIGN (TEXTMETRICW, tmDefaultChar, 2) - TEST_FIELD_OFFSET(TEXTMETRICW, tmDefaultChar, 48) - TEST_FIELD_SIZE (TEXTMETRICW, tmBreakChar, 2) - TEST_FIELD_ALIGN (TEXTMETRICW, tmBreakChar, 2) - TEST_FIELD_OFFSET(TEXTMETRICW, tmBreakChar, 50) - TEST_FIELD_SIZE (TEXTMETRICW, tmItalic, 1) - TEST_FIELD_ALIGN (TEXTMETRICW, tmItalic, 1) - TEST_FIELD_OFFSET(TEXTMETRICW, tmItalic, 52) - TEST_FIELD_SIZE (TEXTMETRICW, tmUnderlined, 1) - TEST_FIELD_ALIGN (TEXTMETRICW, tmUnderlined, 1) - TEST_FIELD_OFFSET(TEXTMETRICW, tmUnderlined, 53) - TEST_FIELD_SIZE (TEXTMETRICW, tmStruckOut, 1) - TEST_FIELD_ALIGN (TEXTMETRICW, tmStruckOut, 1) - TEST_FIELD_OFFSET(TEXTMETRICW, tmStruckOut, 54) - TEST_FIELD_SIZE (TEXTMETRICW, tmPitchAndFamily, 1) - TEST_FIELD_ALIGN (TEXTMETRICW, tmPitchAndFamily, 1) - TEST_FIELD_OFFSET(TEXTMETRICW, tmPitchAndFamily, 55) - TEST_FIELD_SIZE (TEXTMETRICW, tmCharSet, 1) - TEST_FIELD_ALIGN (TEXTMETRICW, tmCharSet, 1) - TEST_FIELD_OFFSET(TEXTMETRICW, tmCharSet, 56) -} - -static void test_pack_TRIVERTEX(void) -{ - /* TRIVERTEX */ - TEST_TYPE_SIZE (TRIVERTEX, 16) - TEST_TYPE_ALIGN (TRIVERTEX, 4) - TEST_FIELD_SIZE (TRIVERTEX, x, 4) - TEST_FIELD_ALIGN (TRIVERTEX, x, 4) - TEST_FIELD_OFFSET(TRIVERTEX, x, 0) - TEST_FIELD_SIZE (TRIVERTEX, y, 4) - TEST_FIELD_ALIGN (TRIVERTEX, y, 4) - TEST_FIELD_OFFSET(TRIVERTEX, y, 4) - TEST_FIELD_SIZE (TRIVERTEX, Red, 2) - TEST_FIELD_ALIGN (TRIVERTEX, Red, 2) - TEST_FIELD_OFFSET(TRIVERTEX, Red, 8) - TEST_FIELD_SIZE (TRIVERTEX, Green, 2) - TEST_FIELD_ALIGN (TRIVERTEX, Green, 2) - TEST_FIELD_OFFSET(TRIVERTEX, Green, 10) - TEST_FIELD_SIZE (TRIVERTEX, Blue, 2) - TEST_FIELD_ALIGN (TRIVERTEX, Blue, 2) - TEST_FIELD_OFFSET(TRIVERTEX, Blue, 12) - TEST_FIELD_SIZE (TRIVERTEX, Alpha, 2) - TEST_FIELD_ALIGN (TRIVERTEX, Alpha, 2) - TEST_FIELD_OFFSET(TRIVERTEX, Alpha, 14) -} - -static void test_pack_TTPOLYCURVE(void) -{ - /* TTPOLYCURVE */ - TEST_TYPE_SIZE (TTPOLYCURVE, 12) - TEST_TYPE_ALIGN (TTPOLYCURVE, 2) - TEST_FIELD_SIZE (TTPOLYCURVE, wType, 2) - TEST_FIELD_ALIGN (TTPOLYCURVE, wType, 2) - TEST_FIELD_OFFSET(TTPOLYCURVE, wType, 0) - TEST_FIELD_SIZE (TTPOLYCURVE, cpfx, 2) - TEST_FIELD_ALIGN (TTPOLYCURVE, cpfx, 2) - TEST_FIELD_OFFSET(TTPOLYCURVE, cpfx, 2) - TEST_FIELD_SIZE (TTPOLYCURVE, apfx, 8) - TEST_FIELD_ALIGN (TTPOLYCURVE, apfx, 2) - TEST_FIELD_OFFSET(TTPOLYCURVE, apfx, 4) -} - -static void test_pack_TTPOLYGONHEADER(void) -{ - /* TTPOLYGONHEADER */ - TEST_TYPE_SIZE (TTPOLYGONHEADER, 16) - TEST_TYPE_ALIGN (TTPOLYGONHEADER, 4) - TEST_FIELD_SIZE (TTPOLYGONHEADER, cb, 4) - TEST_FIELD_ALIGN (TTPOLYGONHEADER, cb, 4) - TEST_FIELD_OFFSET(TTPOLYGONHEADER, cb, 0) - TEST_FIELD_SIZE (TTPOLYGONHEADER, dwType, 4) - TEST_FIELD_ALIGN (TTPOLYGONHEADER, dwType, 4) - TEST_FIELD_OFFSET(TTPOLYGONHEADER, dwType, 4) - TEST_FIELD_SIZE (TTPOLYGONHEADER, pfxStart, 8) - TEST_FIELD_ALIGN (TTPOLYGONHEADER, pfxStart, 2) - TEST_FIELD_OFFSET(TTPOLYGONHEADER, pfxStart, 8) -} - -static void test_pack_XFORM(void) -{ - /* XFORM */ - TEST_TYPE_SIZE (XFORM, 24) - TEST_TYPE_ALIGN (XFORM, 4) - TEST_FIELD_SIZE (XFORM, eM11, 4) - TEST_FIELD_ALIGN (XFORM, eM11, 4) - TEST_FIELD_OFFSET(XFORM, eM11, 0) - TEST_FIELD_SIZE (XFORM, eM12, 4) - TEST_FIELD_ALIGN (XFORM, eM12, 4) - TEST_FIELD_OFFSET(XFORM, eM12, 4) - TEST_FIELD_SIZE (XFORM, eM21, 4) - TEST_FIELD_ALIGN (XFORM, eM21, 4) - TEST_FIELD_OFFSET(XFORM, eM21, 8) - TEST_FIELD_SIZE (XFORM, eM22, 4) - TEST_FIELD_ALIGN (XFORM, eM22, 4) - TEST_FIELD_OFFSET(XFORM, eM22, 12) - TEST_FIELD_SIZE (XFORM, eDx, 4) - TEST_FIELD_ALIGN (XFORM, eDx, 4) - TEST_FIELD_OFFSET(XFORM, eDx, 16) - TEST_FIELD_SIZE (XFORM, eDy, 4) - TEST_FIELD_ALIGN (XFORM, eDy, 4) - TEST_FIELD_OFFSET(XFORM, eDy, 20) -} - -#else /* _WIN64 */ - -static void test_pack_ABC(void) -{ - /* ABC */ - TEST_TYPE_SIZE (ABC, 12) - TEST_TYPE_ALIGN (ABC, 4) - TEST_FIELD_SIZE (ABC, abcA, 4) - TEST_FIELD_ALIGN (ABC, abcA, 4) - TEST_FIELD_OFFSET(ABC, abcA, 0) - TEST_FIELD_SIZE (ABC, abcB, 4) - TEST_FIELD_ALIGN (ABC, abcB, 4) - TEST_FIELD_OFFSET(ABC, abcB, 4) - TEST_FIELD_SIZE (ABC, abcC, 4) - TEST_FIELD_ALIGN (ABC, abcC, 4) - TEST_FIELD_OFFSET(ABC, abcC, 8) -} - -static void test_pack_ABCFLOAT(void) -{ - /* ABCFLOAT */ - TEST_TYPE_SIZE (ABCFLOAT, 12) - TEST_TYPE_ALIGN (ABCFLOAT, 4) - TEST_FIELD_SIZE (ABCFLOAT, abcfA, 4) - TEST_FIELD_ALIGN (ABCFLOAT, abcfA, 4) - TEST_FIELD_OFFSET(ABCFLOAT, abcfA, 0) - TEST_FIELD_SIZE (ABCFLOAT, abcfB, 4) - TEST_FIELD_ALIGN (ABCFLOAT, abcfB, 4) - TEST_FIELD_OFFSET(ABCFLOAT, abcfB, 4) - TEST_FIELD_SIZE (ABCFLOAT, abcfC, 4) - TEST_FIELD_ALIGN (ABCFLOAT, abcfC, 4) - TEST_FIELD_OFFSET(ABCFLOAT, abcfC, 8) -} - -static void test_pack_ABORTPROC(void) -{ - /* ABORTPROC */ - TEST_TYPE_SIZE (ABORTPROC, 4) - TEST_TYPE_ALIGN (ABORTPROC, 4) -} - -static void test_pack_BITMAP(void) -{ - /* BITMAP */ - TEST_TYPE_SIZE (BITMAP, 24) - TEST_TYPE_ALIGN (BITMAP, 4) - TEST_FIELD_SIZE (BITMAP, bmType, 4) - TEST_FIELD_ALIGN (BITMAP, bmType, 4) - TEST_FIELD_OFFSET(BITMAP, bmType, 0) - TEST_FIELD_SIZE (BITMAP, bmWidth, 4) - TEST_FIELD_ALIGN (BITMAP, bmWidth, 4) - TEST_FIELD_OFFSET(BITMAP, bmWidth, 4) - TEST_FIELD_SIZE (BITMAP, bmHeight, 4) - TEST_FIELD_ALIGN (BITMAP, bmHeight, 4) - TEST_FIELD_OFFSET(BITMAP, bmHeight, 8) - TEST_FIELD_SIZE (BITMAP, bmWidthBytes, 4) - TEST_FIELD_ALIGN (BITMAP, bmWidthBytes, 4) - TEST_FIELD_OFFSET(BITMAP, bmWidthBytes, 12) - TEST_FIELD_SIZE (BITMAP, bmPlanes, 2) - TEST_FIELD_ALIGN (BITMAP, bmPlanes, 2) - TEST_FIELD_OFFSET(BITMAP, bmPlanes, 16) - TEST_FIELD_SIZE (BITMAP, bmBitsPixel, 2) - TEST_FIELD_ALIGN (BITMAP, bmBitsPixel, 2) - TEST_FIELD_OFFSET(BITMAP, bmBitsPixel, 18) - TEST_FIELD_SIZE (BITMAP, bmBits, 4) - TEST_FIELD_ALIGN (BITMAP, bmBits, 4) - TEST_FIELD_OFFSET(BITMAP, bmBits, 20) -} - -static void test_pack_BITMAPCOREHEADER(void) -{ - /* BITMAPCOREHEADER */ - TEST_TYPE_SIZE (BITMAPCOREHEADER, 12) - TEST_TYPE_ALIGN (BITMAPCOREHEADER, 4) - TEST_FIELD_SIZE (BITMAPCOREHEADER, bcSize, 4) - TEST_FIELD_ALIGN (BITMAPCOREHEADER, bcSize, 4) - TEST_FIELD_OFFSET(BITMAPCOREHEADER, bcSize, 0) - TEST_FIELD_SIZE (BITMAPCOREHEADER, bcWidth, 2) - TEST_FIELD_ALIGN (BITMAPCOREHEADER, bcWidth, 2) - TEST_FIELD_OFFSET(BITMAPCOREHEADER, bcWidth, 4) - TEST_FIELD_SIZE (BITMAPCOREHEADER, bcHeight, 2) - TEST_FIELD_ALIGN (BITMAPCOREHEADER, bcHeight, 2) - TEST_FIELD_OFFSET(BITMAPCOREHEADER, bcHeight, 6) - TEST_FIELD_SIZE (BITMAPCOREHEADER, bcPlanes, 2) - TEST_FIELD_ALIGN (BITMAPCOREHEADER, bcPlanes, 2) - TEST_FIELD_OFFSET(BITMAPCOREHEADER, bcPlanes, 8) - TEST_FIELD_SIZE (BITMAPCOREHEADER, bcBitCount, 2) - TEST_FIELD_ALIGN (BITMAPCOREHEADER, bcBitCount, 2) - TEST_FIELD_OFFSET(BITMAPCOREHEADER, bcBitCount, 10) -} - -static void test_pack_BITMAPCOREINFO(void) -{ - /* BITMAPCOREINFO */ - TEST_TYPE_SIZE (BITMAPCOREINFO, 16) - TEST_TYPE_ALIGN (BITMAPCOREINFO, 4) - TEST_FIELD_SIZE (BITMAPCOREINFO, bmciHeader, 12) - TEST_FIELD_ALIGN (BITMAPCOREINFO, bmciHeader, 4) - TEST_FIELD_OFFSET(BITMAPCOREINFO, bmciHeader, 0) - TEST_FIELD_SIZE (BITMAPCOREINFO, bmciColors, 3) - TEST_FIELD_ALIGN (BITMAPCOREINFO, bmciColors, 1) - TEST_FIELD_OFFSET(BITMAPCOREINFO, bmciColors, 12) -} - -static void test_pack_BITMAPFILEHEADER(void) -{ - /* BITMAPFILEHEADER (pack 2) */ - TEST_TYPE_SIZE (BITMAPFILEHEADER, 14) - TEST_TYPE_ALIGN (BITMAPFILEHEADER, 2) - TEST_FIELD_SIZE (BITMAPFILEHEADER, bfType, 2) - TEST_FIELD_ALIGN (BITMAPFILEHEADER, bfType, 2) - TEST_FIELD_OFFSET(BITMAPFILEHEADER, bfType, 0) - TEST_FIELD_SIZE (BITMAPFILEHEADER, bfSize, 4) - TEST_FIELD_ALIGN (BITMAPFILEHEADER, bfSize, 2) - TEST_FIELD_OFFSET(BITMAPFILEHEADER, bfSize, 2) - TEST_FIELD_SIZE (BITMAPFILEHEADER, bfReserved1, 2) - TEST_FIELD_ALIGN (BITMAPFILEHEADER, bfReserved1, 2) - TEST_FIELD_OFFSET(BITMAPFILEHEADER, bfReserved1, 6) - TEST_FIELD_SIZE (BITMAPFILEHEADER, bfReserved2, 2) - TEST_FIELD_ALIGN (BITMAPFILEHEADER, bfReserved2, 2) - TEST_FIELD_OFFSET(BITMAPFILEHEADER, bfReserved2, 8) - TEST_FIELD_SIZE (BITMAPFILEHEADER, bfOffBits, 4) - TEST_FIELD_ALIGN (BITMAPFILEHEADER, bfOffBits, 2) - TEST_FIELD_OFFSET(BITMAPFILEHEADER, bfOffBits, 10) -} - -static void test_pack_BITMAPINFO(void) -{ - /* BITMAPINFO */ - TEST_TYPE_SIZE (BITMAPINFO, 44) - TEST_TYPE_ALIGN (BITMAPINFO, 4) - TEST_FIELD_SIZE (BITMAPINFO, bmiHeader, 40) - TEST_FIELD_ALIGN (BITMAPINFO, bmiHeader, 4) - TEST_FIELD_OFFSET(BITMAPINFO, bmiHeader, 0) - TEST_FIELD_SIZE (BITMAPINFO, bmiColors, 4) - TEST_FIELD_ALIGN (BITMAPINFO, bmiColors, 1) - TEST_FIELD_OFFSET(BITMAPINFO, bmiColors, 40) -} - -static void test_pack_BITMAPINFOHEADER(void) -{ - /* BITMAPINFOHEADER */ - TEST_TYPE_SIZE (BITMAPINFOHEADER, 40) - TEST_TYPE_ALIGN (BITMAPINFOHEADER, 4) - TEST_FIELD_SIZE (BITMAPINFOHEADER, biSize, 4) - TEST_FIELD_ALIGN (BITMAPINFOHEADER, biSize, 4) - TEST_FIELD_OFFSET(BITMAPINFOHEADER, biSize, 0) - TEST_FIELD_SIZE (BITMAPINFOHEADER, biWidth, 4) - TEST_FIELD_ALIGN (BITMAPINFOHEADER, biWidth, 4) - TEST_FIELD_OFFSET(BITMAPINFOHEADER, biWidth, 4) - TEST_FIELD_SIZE (BITMAPINFOHEADER, biHeight, 4) - TEST_FIELD_ALIGN (BITMAPINFOHEADER, biHeight, 4) - TEST_FIELD_OFFSET(BITMAPINFOHEADER, biHeight, 8) - TEST_FIELD_SIZE (BITMAPINFOHEADER, biPlanes, 2) - TEST_FIELD_ALIGN (BITMAPINFOHEADER, biPlanes, 2) - TEST_FIELD_OFFSET(BITMAPINFOHEADER, biPlanes, 12) - TEST_FIELD_SIZE (BITMAPINFOHEADER, biBitCount, 2) - TEST_FIELD_ALIGN (BITMAPINFOHEADER, biBitCount, 2) - TEST_FIELD_OFFSET(BITMAPINFOHEADER, biBitCount, 14) - TEST_FIELD_SIZE (BITMAPINFOHEADER, biCompression, 4) - TEST_FIELD_ALIGN (BITMAPINFOHEADER, biCompression, 4) - TEST_FIELD_OFFSET(BITMAPINFOHEADER, biCompression, 16) - TEST_FIELD_SIZE (BITMAPINFOHEADER, biSizeImage, 4) - TEST_FIELD_ALIGN (BITMAPINFOHEADER, biSizeImage, 4) - TEST_FIELD_OFFSET(BITMAPINFOHEADER, biSizeImage, 20) - TEST_FIELD_SIZE (BITMAPINFOHEADER, biXPelsPerMeter, 4) - TEST_FIELD_ALIGN (BITMAPINFOHEADER, biXPelsPerMeter, 4) - TEST_FIELD_OFFSET(BITMAPINFOHEADER, biXPelsPerMeter, 24) - TEST_FIELD_SIZE (BITMAPINFOHEADER, biYPelsPerMeter, 4) - TEST_FIELD_ALIGN (BITMAPINFOHEADER, biYPelsPerMeter, 4) - TEST_FIELD_OFFSET(BITMAPINFOHEADER, biYPelsPerMeter, 28) - TEST_FIELD_SIZE (BITMAPINFOHEADER, biClrUsed, 4) - TEST_FIELD_ALIGN (BITMAPINFOHEADER, biClrUsed, 4) - TEST_FIELD_OFFSET(BITMAPINFOHEADER, biClrUsed, 32) - TEST_FIELD_SIZE (BITMAPINFOHEADER, biClrImportant, 4) - TEST_FIELD_ALIGN (BITMAPINFOHEADER, biClrImportant, 4) - TEST_FIELD_OFFSET(BITMAPINFOHEADER, biClrImportant, 36) -} - -static void test_pack_BITMAPV4HEADER(void) -{ - /* BITMAPV4HEADER */ - TEST_TYPE_SIZE (BITMAPV4HEADER, 108) - TEST_TYPE_ALIGN (BITMAPV4HEADER, 4) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4Size, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4Size, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4Size, 0) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4Width, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4Width, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4Width, 4) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4Height, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4Height, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4Height, 8) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4Planes, 2) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4Planes, 2) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4Planes, 12) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4BitCount, 2) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4BitCount, 2) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4BitCount, 14) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4V4Compression, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4V4Compression, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4V4Compression, 16) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4SizeImage, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4SizeImage, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4SizeImage, 20) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4XPelsPerMeter, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4XPelsPerMeter, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4XPelsPerMeter, 24) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4YPelsPerMeter, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4YPelsPerMeter, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4YPelsPerMeter, 28) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4ClrUsed, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4ClrUsed, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4ClrUsed, 32) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4ClrImportant, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4ClrImportant, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4ClrImportant, 36) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4RedMask, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4RedMask, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4RedMask, 40) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4GreenMask, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4GreenMask, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4GreenMask, 44) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4BlueMask, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4BlueMask, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4BlueMask, 48) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4AlphaMask, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4AlphaMask, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4AlphaMask, 52) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4CSType, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4CSType, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4CSType, 56) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4Endpoints, 36) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4Endpoints, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4Endpoints, 60) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4GammaRed, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4GammaRed, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4GammaRed, 96) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4GammaGreen, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4GammaGreen, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4GammaGreen, 100) - TEST_FIELD_SIZE (BITMAPV4HEADER, bV4GammaBlue, 4) - TEST_FIELD_ALIGN (BITMAPV4HEADER, bV4GammaBlue, 4) - TEST_FIELD_OFFSET(BITMAPV4HEADER, bV4GammaBlue, 104) -} - -static void test_pack_BITMAPV5HEADER(void) -{ - /* BITMAPV5HEADER */ - TEST_TYPE_SIZE (BITMAPV5HEADER, 124) - TEST_TYPE_ALIGN (BITMAPV5HEADER, 4) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5Size, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5Size, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5Size, 0) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5Width, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5Width, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5Width, 4) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5Height, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5Height, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5Height, 8) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5Planes, 2) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5Planes, 2) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5Planes, 12) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5BitCount, 2) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5BitCount, 2) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5BitCount, 14) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5Compression, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5Compression, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5Compression, 16) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5SizeImage, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5SizeImage, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5SizeImage, 20) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5XPelsPerMeter, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5XPelsPerMeter, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5XPelsPerMeter, 24) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5YPelsPerMeter, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5YPelsPerMeter, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5YPelsPerMeter, 28) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5ClrUsed, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5ClrUsed, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5ClrUsed, 32) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5ClrImportant, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5ClrImportant, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5ClrImportant, 36) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5RedMask, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5RedMask, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5RedMask, 40) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5GreenMask, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5GreenMask, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5GreenMask, 44) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5BlueMask, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5BlueMask, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5BlueMask, 48) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5AlphaMask, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5AlphaMask, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5AlphaMask, 52) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5CSType, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5CSType, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5CSType, 56) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5Endpoints, 36) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5Endpoints, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5Endpoints, 60) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5GammaRed, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5GammaRed, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5GammaRed, 96) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5GammaGreen, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5GammaGreen, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5GammaGreen, 100) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5GammaBlue, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5GammaBlue, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5GammaBlue, 104) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5Intent, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5Intent, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5Intent, 108) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5ProfileData, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5ProfileData, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5ProfileData, 112) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5ProfileSize, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5ProfileSize, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5ProfileSize, 116) - TEST_FIELD_SIZE (BITMAPV5HEADER, bV5Reserved, 4) - TEST_FIELD_ALIGN (BITMAPV5HEADER, bV5Reserved, 4) - TEST_FIELD_OFFSET(BITMAPV5HEADER, bV5Reserved, 120) -} - -static void test_pack_BLENDFUNCTION(void) -{ - /* BLENDFUNCTION */ - TEST_TYPE_SIZE (BLENDFUNCTION, 4) - TEST_TYPE_ALIGN (BLENDFUNCTION, 1) - TEST_FIELD_SIZE (BLENDFUNCTION, BlendOp, 1) - TEST_FIELD_ALIGN (BLENDFUNCTION, BlendOp, 1) - TEST_FIELD_OFFSET(BLENDFUNCTION, BlendOp, 0) - TEST_FIELD_SIZE (BLENDFUNCTION, BlendFlags, 1) - TEST_FIELD_ALIGN (BLENDFUNCTION, BlendFlags, 1) - TEST_FIELD_OFFSET(BLENDFUNCTION, BlendFlags, 1) - TEST_FIELD_SIZE (BLENDFUNCTION, SourceConstantAlpha, 1) - TEST_FIELD_ALIGN (BLENDFUNCTION, SourceConstantAlpha, 1) - TEST_FIELD_OFFSET(BLENDFUNCTION, SourceConstantAlpha, 2) - TEST_FIELD_SIZE (BLENDFUNCTION, AlphaFormat, 1) - TEST_FIELD_ALIGN (BLENDFUNCTION, AlphaFormat, 1) - TEST_FIELD_OFFSET(BLENDFUNCTION, AlphaFormat, 3) -} - -static void test_pack_CHARSETINFO(void) -{ - /* CHARSETINFO */ - TEST_TYPE_SIZE (CHARSETINFO, 32) - TEST_TYPE_ALIGN (CHARSETINFO, 4) - TEST_FIELD_SIZE (CHARSETINFO, ciCharset, 4) - TEST_FIELD_ALIGN (CHARSETINFO, ciCharset, 4) - TEST_FIELD_OFFSET(CHARSETINFO, ciCharset, 0) - TEST_FIELD_SIZE (CHARSETINFO, ciACP, 4) - TEST_FIELD_ALIGN (CHARSETINFO, ciACP, 4) - TEST_FIELD_OFFSET(CHARSETINFO, ciACP, 4) - TEST_FIELD_SIZE (CHARSETINFO, fs, 24) - TEST_FIELD_ALIGN (CHARSETINFO, fs, 4) - TEST_FIELD_OFFSET(CHARSETINFO, fs, 8) -} - -static void test_pack_CIEXYZ(void) -{ - /* CIEXYZ */ - TEST_TYPE_SIZE (CIEXYZ, 12) - TEST_TYPE_ALIGN (CIEXYZ, 4) - TEST_FIELD_SIZE (CIEXYZ, ciexyzX, 4) - TEST_FIELD_ALIGN (CIEXYZ, ciexyzX, 4) - TEST_FIELD_OFFSET(CIEXYZ, ciexyzX, 0) - TEST_FIELD_SIZE (CIEXYZ, ciexyzY, 4) - TEST_FIELD_ALIGN (CIEXYZ, ciexyzY, 4) - TEST_FIELD_OFFSET(CIEXYZ, ciexyzY, 4) - TEST_FIELD_SIZE (CIEXYZ, ciexyzZ, 4) - TEST_FIELD_ALIGN (CIEXYZ, ciexyzZ, 4) - TEST_FIELD_OFFSET(CIEXYZ, ciexyzZ, 8) -} - -static void test_pack_CIEXYZTRIPLE(void) -{ - /* CIEXYZTRIPLE */ - TEST_TYPE_SIZE (CIEXYZTRIPLE, 36) - TEST_TYPE_ALIGN (CIEXYZTRIPLE, 4) - TEST_FIELD_SIZE (CIEXYZTRIPLE, ciexyzRed, 12) - TEST_FIELD_ALIGN (CIEXYZTRIPLE, ciexyzRed, 4) - TEST_FIELD_OFFSET(CIEXYZTRIPLE, ciexyzRed, 0) - TEST_FIELD_SIZE (CIEXYZTRIPLE, ciexyzGreen, 12) - TEST_FIELD_ALIGN (CIEXYZTRIPLE, ciexyzGreen, 4) - TEST_FIELD_OFFSET(CIEXYZTRIPLE, ciexyzGreen, 12) - TEST_FIELD_SIZE (CIEXYZTRIPLE, ciexyzBlue, 12) - TEST_FIELD_ALIGN (CIEXYZTRIPLE, ciexyzBlue, 4) - TEST_FIELD_OFFSET(CIEXYZTRIPLE, ciexyzBlue, 24) -} - -static void test_pack_COLOR16(void) -{ - /* COLOR16 */ - TEST_TYPE_SIZE (COLOR16, 2) - TEST_TYPE_ALIGN (COLOR16, 2) -} - -static void test_pack_COLORADJUSTMENT(void) -{ - /* COLORADJUSTMENT */ - TEST_TYPE_SIZE (COLORADJUSTMENT, 24) - TEST_TYPE_ALIGN (COLORADJUSTMENT, 2) - TEST_FIELD_SIZE (COLORADJUSTMENT, caSize, 2) - TEST_FIELD_ALIGN (COLORADJUSTMENT, caSize, 2) - TEST_FIELD_OFFSET(COLORADJUSTMENT, caSize, 0) - TEST_FIELD_SIZE (COLORADJUSTMENT, caFlags, 2) - TEST_FIELD_ALIGN (COLORADJUSTMENT, caFlags, 2) - TEST_FIELD_OFFSET(COLORADJUSTMENT, caFlags, 2) - TEST_FIELD_SIZE (COLORADJUSTMENT, caIlluminantIndex, 2) - TEST_FIELD_ALIGN (COLORADJUSTMENT, caIlluminantIndex, 2) - TEST_FIELD_OFFSET(COLORADJUSTMENT, caIlluminantIndex, 4) - TEST_FIELD_SIZE (COLORADJUSTMENT, caRedGamma, 2) - TEST_FIELD_ALIGN (COLORADJUSTMENT, caRedGamma, 2) - TEST_FIELD_OFFSET(COLORADJUSTMENT, caRedGamma, 6) - TEST_FIELD_SIZE (COLORADJUSTMENT, caGreenGamma, 2) - TEST_FIELD_ALIGN (COLORADJUSTMENT, caGreenGamma, 2) - TEST_FIELD_OFFSET(COLORADJUSTMENT, caGreenGamma, 8) - TEST_FIELD_SIZE (COLORADJUSTMENT, caBlueGamma, 2) - TEST_FIELD_ALIGN (COLORADJUSTMENT, caBlueGamma, 2) - TEST_FIELD_OFFSET(COLORADJUSTMENT, caBlueGamma, 10) - TEST_FIELD_SIZE (COLORADJUSTMENT, caReferenceBlack, 2) - TEST_FIELD_ALIGN (COLORADJUSTMENT, caReferenceBlack, 2) - TEST_FIELD_OFFSET(COLORADJUSTMENT, caReferenceBlack, 12) - TEST_FIELD_SIZE (COLORADJUSTMENT, caReferenceWhite, 2) - TEST_FIELD_ALIGN (COLORADJUSTMENT, caReferenceWhite, 2) - TEST_FIELD_OFFSET(COLORADJUSTMENT, caReferenceWhite, 14) - TEST_FIELD_SIZE (COLORADJUSTMENT, caContrast, 2) - TEST_FIELD_ALIGN (COLORADJUSTMENT, caContrast, 2) - TEST_FIELD_OFFSET(COLORADJUSTMENT, caContrast, 16) - TEST_FIELD_SIZE (COLORADJUSTMENT, caBrightness, 2) - TEST_FIELD_ALIGN (COLORADJUSTMENT, caBrightness, 2) - TEST_FIELD_OFFSET(COLORADJUSTMENT, caBrightness, 18) - TEST_FIELD_SIZE (COLORADJUSTMENT, caColorfulness, 2) - TEST_FIELD_ALIGN (COLORADJUSTMENT, caColorfulness, 2) - TEST_FIELD_OFFSET(COLORADJUSTMENT, caColorfulness, 20) - TEST_FIELD_SIZE (COLORADJUSTMENT, caRedGreenTint, 2) - TEST_FIELD_ALIGN (COLORADJUSTMENT, caRedGreenTint, 2) - TEST_FIELD_OFFSET(COLORADJUSTMENT, caRedGreenTint, 22) -} - -static void test_pack_DEVMODEA(void) -{ - /* DEVMODEA */ - TEST_FIELD_SIZE (DEVMODEA, dmDeviceName, 32) - TEST_FIELD_ALIGN (DEVMODEA, dmDeviceName, 1) - TEST_FIELD_OFFSET(DEVMODEA, dmDeviceName, 0) - TEST_FIELD_SIZE (DEVMODEA, dmSpecVersion, 2) - TEST_FIELD_ALIGN (DEVMODEA, dmSpecVersion, 2) - TEST_FIELD_OFFSET(DEVMODEA, dmSpecVersion, 32) - TEST_FIELD_SIZE (DEVMODEA, dmDriverVersion, 2) - TEST_FIELD_ALIGN (DEVMODEA, dmDriverVersion, 2) - TEST_FIELD_OFFSET(DEVMODEA, dmDriverVersion, 34) - TEST_FIELD_SIZE (DEVMODEA, dmSize, 2) - TEST_FIELD_ALIGN (DEVMODEA, dmSize, 2) - TEST_FIELD_OFFSET(DEVMODEA, dmSize, 36) - TEST_FIELD_SIZE (DEVMODEA, dmDriverExtra, 2) - TEST_FIELD_ALIGN (DEVMODEA, dmDriverExtra, 2) - TEST_FIELD_OFFSET(DEVMODEA, dmDriverExtra, 38) - TEST_FIELD_SIZE (DEVMODEA, dmFields, 4) - TEST_FIELD_ALIGN (DEVMODEA, dmFields, 4) - TEST_FIELD_OFFSET(DEVMODEA, dmFields, 40) -} - -static void test_pack_DEVMODEW(void) -{ - /* DEVMODEW */ - TEST_FIELD_SIZE (DEVMODEW, dmDeviceName, 64) - TEST_FIELD_ALIGN (DEVMODEW, dmDeviceName, 2) - TEST_FIELD_OFFSET(DEVMODEW, dmDeviceName, 0) - TEST_FIELD_SIZE (DEVMODEW, dmSpecVersion, 2) - TEST_FIELD_ALIGN (DEVMODEW, dmSpecVersion, 2) - TEST_FIELD_OFFSET(DEVMODEW, dmSpecVersion, 64) - TEST_FIELD_SIZE (DEVMODEW, dmDriverVersion, 2) - TEST_FIELD_ALIGN (DEVMODEW, dmDriverVersion, 2) - TEST_FIELD_OFFSET(DEVMODEW, dmDriverVersion, 66) - TEST_FIELD_SIZE (DEVMODEW, dmSize, 2) - TEST_FIELD_ALIGN (DEVMODEW, dmSize, 2) - TEST_FIELD_OFFSET(DEVMODEW, dmSize, 68) - TEST_FIELD_SIZE (DEVMODEW, dmDriverExtra, 2) - TEST_FIELD_ALIGN (DEVMODEW, dmDriverExtra, 2) - TEST_FIELD_OFFSET(DEVMODEW, dmDriverExtra, 70) - TEST_FIELD_SIZE (DEVMODEW, dmFields, 4) - TEST_FIELD_ALIGN (DEVMODEW, dmFields, 4) - TEST_FIELD_OFFSET(DEVMODEW, dmFields, 72) -} - -static void test_pack_DIBSECTION(void) -{ - /* DIBSECTION */ - TEST_TYPE_SIZE (DIBSECTION, 84) - TEST_TYPE_ALIGN (DIBSECTION, 4) - TEST_FIELD_SIZE (DIBSECTION, dsBm, 24) - TEST_FIELD_ALIGN (DIBSECTION, dsBm, 4) - TEST_FIELD_OFFSET(DIBSECTION, dsBm, 0) - TEST_FIELD_SIZE (DIBSECTION, dsBmih, 40) - TEST_FIELD_ALIGN (DIBSECTION, dsBmih, 4) - TEST_FIELD_OFFSET(DIBSECTION, dsBmih, 24) - TEST_FIELD_SIZE (DIBSECTION, dsBitfields, 12) - TEST_FIELD_ALIGN (DIBSECTION, dsBitfields, 4) - TEST_FIELD_OFFSET(DIBSECTION, dsBitfields, 64) - TEST_FIELD_SIZE (DIBSECTION, dshSection, 4) - TEST_FIELD_ALIGN (DIBSECTION, dshSection, 4) - TEST_FIELD_OFFSET(DIBSECTION, dshSection, 76) - TEST_FIELD_SIZE (DIBSECTION, dsOffset, 4) - TEST_FIELD_ALIGN (DIBSECTION, dsOffset, 4) - TEST_FIELD_OFFSET(DIBSECTION, dsOffset, 80) -} - -static void test_pack_DISPLAY_DEVICEA(void) -{ - /* DISPLAY_DEVICEA */ - TEST_TYPE_SIZE (DISPLAY_DEVICEA, 424) - TEST_TYPE_ALIGN (DISPLAY_DEVICEA, 4) - TEST_FIELD_SIZE (DISPLAY_DEVICEA, cb, 4) - TEST_FIELD_ALIGN (DISPLAY_DEVICEA, cb, 4) - TEST_FIELD_OFFSET(DISPLAY_DEVICEA, cb, 0) - TEST_FIELD_SIZE (DISPLAY_DEVICEA, DeviceName, 32) - TEST_FIELD_ALIGN (DISPLAY_DEVICEA, DeviceName, 1) - TEST_FIELD_OFFSET(DISPLAY_DEVICEA, DeviceName, 4) - TEST_FIELD_SIZE (DISPLAY_DEVICEA, DeviceString, 128) - TEST_FIELD_ALIGN (DISPLAY_DEVICEA, DeviceString, 1) - TEST_FIELD_OFFSET(DISPLAY_DEVICEA, DeviceString, 36) - TEST_FIELD_SIZE (DISPLAY_DEVICEA, StateFlags, 4) - TEST_FIELD_ALIGN (DISPLAY_DEVICEA, StateFlags, 4) - TEST_FIELD_OFFSET(DISPLAY_DEVICEA, StateFlags, 164) - TEST_FIELD_SIZE (DISPLAY_DEVICEA, DeviceID, 128) - TEST_FIELD_ALIGN (DISPLAY_DEVICEA, DeviceID, 1) - TEST_FIELD_OFFSET(DISPLAY_DEVICEA, DeviceID, 168) - TEST_FIELD_SIZE (DISPLAY_DEVICEA, DeviceKey, 128) - TEST_FIELD_ALIGN (DISPLAY_DEVICEA, DeviceKey, 1) - TEST_FIELD_OFFSET(DISPLAY_DEVICEA, DeviceKey, 296) -} - -static void test_pack_DISPLAY_DEVICEW(void) -{ - /* DISPLAY_DEVICEW */ - TEST_TYPE_SIZE (DISPLAY_DEVICEW, 840) - TEST_TYPE_ALIGN (DISPLAY_DEVICEW, 4) - TEST_FIELD_SIZE (DISPLAY_DEVICEW, cb, 4) - TEST_FIELD_ALIGN (DISPLAY_DEVICEW, cb, 4) - TEST_FIELD_OFFSET(DISPLAY_DEVICEW, cb, 0) - TEST_FIELD_SIZE (DISPLAY_DEVICEW, DeviceName, 64) - TEST_FIELD_ALIGN (DISPLAY_DEVICEW, DeviceName, 2) - TEST_FIELD_OFFSET(DISPLAY_DEVICEW, DeviceName, 4) - TEST_FIELD_SIZE (DISPLAY_DEVICEW, DeviceString, 256) - TEST_FIELD_ALIGN (DISPLAY_DEVICEW, DeviceString, 2) - TEST_FIELD_OFFSET(DISPLAY_DEVICEW, DeviceString, 68) - TEST_FIELD_SIZE (DISPLAY_DEVICEW, StateFlags, 4) - TEST_FIELD_ALIGN (DISPLAY_DEVICEW, StateFlags, 4) - TEST_FIELD_OFFSET(DISPLAY_DEVICEW, StateFlags, 324) - TEST_FIELD_SIZE (DISPLAY_DEVICEW, DeviceID, 256) - TEST_FIELD_ALIGN (DISPLAY_DEVICEW, DeviceID, 2) - TEST_FIELD_OFFSET(DISPLAY_DEVICEW, DeviceID, 328) - TEST_FIELD_SIZE (DISPLAY_DEVICEW, DeviceKey, 256) - TEST_FIELD_ALIGN (DISPLAY_DEVICEW, DeviceKey, 2) - TEST_FIELD_OFFSET(DISPLAY_DEVICEW, DeviceKey, 584) -} - -static void test_pack_DOCINFOA(void) -{ - /* DOCINFOA */ - TEST_TYPE_SIZE (DOCINFOA, 20) - TEST_TYPE_ALIGN (DOCINFOA, 4) - TEST_FIELD_SIZE (DOCINFOA, cbSize, 4) - TEST_FIELD_ALIGN (DOCINFOA, cbSize, 4) - TEST_FIELD_OFFSET(DOCINFOA, cbSize, 0) - TEST_FIELD_SIZE (DOCINFOA, lpszDocName, 4) - TEST_FIELD_ALIGN (DOCINFOA, lpszDocName, 4) - TEST_FIELD_OFFSET(DOCINFOA, lpszDocName, 4) - TEST_FIELD_SIZE (DOCINFOA, lpszOutput, 4) - TEST_FIELD_ALIGN (DOCINFOA, lpszOutput, 4) - TEST_FIELD_OFFSET(DOCINFOA, lpszOutput, 8) - TEST_FIELD_SIZE (DOCINFOA, lpszDatatype, 4) - TEST_FIELD_ALIGN (DOCINFOA, lpszDatatype, 4) - TEST_FIELD_OFFSET(DOCINFOA, lpszDatatype, 12) - TEST_FIELD_SIZE (DOCINFOA, fwType, 4) - TEST_FIELD_ALIGN (DOCINFOA, fwType, 4) - TEST_FIELD_OFFSET(DOCINFOA, fwType, 16) -} - -static void test_pack_DOCINFOW(void) -{ - /* DOCINFOW */ - TEST_TYPE_SIZE (DOCINFOW, 20) - TEST_TYPE_ALIGN (DOCINFOW, 4) - TEST_FIELD_SIZE (DOCINFOW, cbSize, 4) - TEST_FIELD_ALIGN (DOCINFOW, cbSize, 4) - TEST_FIELD_OFFSET(DOCINFOW, cbSize, 0) - TEST_FIELD_SIZE (DOCINFOW, lpszDocName, 4) - TEST_FIELD_ALIGN (DOCINFOW, lpszDocName, 4) - TEST_FIELD_OFFSET(DOCINFOW, lpszDocName, 4) - TEST_FIELD_SIZE (DOCINFOW, lpszOutput, 4) - TEST_FIELD_ALIGN (DOCINFOW, lpszOutput, 4) - TEST_FIELD_OFFSET(DOCINFOW, lpszOutput, 8) - TEST_FIELD_SIZE (DOCINFOW, lpszDatatype, 4) - TEST_FIELD_ALIGN (DOCINFOW, lpszDatatype, 4) - TEST_FIELD_OFFSET(DOCINFOW, lpszDatatype, 12) - TEST_FIELD_SIZE (DOCINFOW, fwType, 4) - TEST_FIELD_ALIGN (DOCINFOW, fwType, 4) - TEST_FIELD_OFFSET(DOCINFOW, fwType, 16) -} - -static void test_pack_EMR(void) -{ - /* EMR */ - TEST_TYPE_SIZE (EMR, 8) - TEST_TYPE_ALIGN (EMR, 4) - TEST_FIELD_SIZE (EMR, iType, 4) - TEST_FIELD_ALIGN (EMR, iType, 4) - TEST_FIELD_OFFSET(EMR, iType, 0) - TEST_FIELD_SIZE (EMR, nSize, 4) - TEST_FIELD_ALIGN (EMR, nSize, 4) - TEST_FIELD_OFFSET(EMR, nSize, 4) -} - -static void test_pack_EMRABORTPATH(void) -{ - /* EMRABORTPATH */ - TEST_TYPE_SIZE (EMRABORTPATH, 8) - TEST_TYPE_ALIGN (EMRABORTPATH, 4) - TEST_FIELD_SIZE (EMRABORTPATH, emr, 8) - TEST_FIELD_ALIGN (EMRABORTPATH, emr, 4) - TEST_FIELD_OFFSET(EMRABORTPATH, emr, 0) -} - -static void test_pack_EMRANGLEARC(void) -{ - /* EMRANGLEARC */ - TEST_TYPE_SIZE (EMRANGLEARC, 28) - TEST_TYPE_ALIGN (EMRANGLEARC, 4) - TEST_FIELD_SIZE (EMRANGLEARC, emr, 8) - TEST_FIELD_ALIGN (EMRANGLEARC, emr, 4) - TEST_FIELD_OFFSET(EMRANGLEARC, emr, 0) - TEST_FIELD_SIZE (EMRANGLEARC, ptlCenter, 8) - TEST_FIELD_ALIGN (EMRANGLEARC, ptlCenter, 4) - TEST_FIELD_OFFSET(EMRANGLEARC, ptlCenter, 8) - TEST_FIELD_SIZE (EMRANGLEARC, nRadius, 4) - TEST_FIELD_ALIGN (EMRANGLEARC, nRadius, 4) - TEST_FIELD_OFFSET(EMRANGLEARC, nRadius, 16) - TEST_FIELD_SIZE (EMRANGLEARC, eStartAngle, 4) - TEST_FIELD_ALIGN (EMRANGLEARC, eStartAngle, 4) - TEST_FIELD_OFFSET(EMRANGLEARC, eStartAngle, 20) - TEST_FIELD_SIZE (EMRANGLEARC, eSweepAngle, 4) - TEST_FIELD_ALIGN (EMRANGLEARC, eSweepAngle, 4) - TEST_FIELD_OFFSET(EMRANGLEARC, eSweepAngle, 24) -} - -static void test_pack_EMRARC(void) -{ - /* EMRARC */ - TEST_TYPE_SIZE (EMRARC, 40) - TEST_TYPE_ALIGN (EMRARC, 4) - TEST_FIELD_SIZE (EMRARC, emr, 8) - TEST_FIELD_ALIGN (EMRARC, emr, 4) - TEST_FIELD_OFFSET(EMRARC, emr, 0) - TEST_FIELD_SIZE (EMRARC, rclBox, 16) - TEST_FIELD_ALIGN (EMRARC, rclBox, 4) - TEST_FIELD_OFFSET(EMRARC, rclBox, 8) - TEST_FIELD_SIZE (EMRARC, ptlStart, 8) - TEST_FIELD_ALIGN (EMRARC, ptlStart, 4) - TEST_FIELD_OFFSET(EMRARC, ptlStart, 24) - TEST_FIELD_SIZE (EMRARC, ptlEnd, 8) - TEST_FIELD_ALIGN (EMRARC, ptlEnd, 4) - TEST_FIELD_OFFSET(EMRARC, ptlEnd, 32) -} - -static void test_pack_EMRARCTO(void) -{ - /* EMRARCTO */ - TEST_TYPE_SIZE (EMRARCTO, 40) - TEST_TYPE_ALIGN (EMRARCTO, 4) - TEST_FIELD_SIZE (EMRARCTO, emr, 8) - TEST_FIELD_ALIGN (EMRARCTO, emr, 4) - TEST_FIELD_OFFSET(EMRARCTO, emr, 0) - TEST_FIELD_SIZE (EMRARCTO, rclBox, 16) - TEST_FIELD_ALIGN (EMRARCTO, rclBox, 4) - TEST_FIELD_OFFSET(EMRARCTO, rclBox, 8) - TEST_FIELD_SIZE (EMRARCTO, ptlStart, 8) - TEST_FIELD_ALIGN (EMRARCTO, ptlStart, 4) - TEST_FIELD_OFFSET(EMRARCTO, ptlStart, 24) - TEST_FIELD_SIZE (EMRARCTO, ptlEnd, 8) - TEST_FIELD_ALIGN (EMRARCTO, ptlEnd, 4) - TEST_FIELD_OFFSET(EMRARCTO, ptlEnd, 32) -} - -static void test_pack_EMRBEGINPATH(void) -{ - /* EMRBEGINPATH */ - TEST_TYPE_SIZE (EMRBEGINPATH, 8) - TEST_TYPE_ALIGN (EMRBEGINPATH, 4) - TEST_FIELD_SIZE (EMRBEGINPATH, emr, 8) - TEST_FIELD_ALIGN (EMRBEGINPATH, emr, 4) - TEST_FIELD_OFFSET(EMRBEGINPATH, emr, 0) -} - -static void test_pack_EMRBITBLT(void) -{ - /* EMRBITBLT */ - TEST_TYPE_SIZE (EMRBITBLT, 100) - TEST_TYPE_ALIGN (EMRBITBLT, 4) - TEST_FIELD_SIZE (EMRBITBLT, emr, 8) - TEST_FIELD_ALIGN (EMRBITBLT, emr, 4) - TEST_FIELD_OFFSET(EMRBITBLT, emr, 0) - TEST_FIELD_SIZE (EMRBITBLT, rclBounds, 16) - TEST_FIELD_ALIGN (EMRBITBLT, rclBounds, 4) - TEST_FIELD_OFFSET(EMRBITBLT, rclBounds, 8) - TEST_FIELD_SIZE (EMRBITBLT, xDest, 4) - TEST_FIELD_ALIGN (EMRBITBLT, xDest, 4) - TEST_FIELD_OFFSET(EMRBITBLT, xDest, 24) - TEST_FIELD_SIZE (EMRBITBLT, yDest, 4) - TEST_FIELD_ALIGN (EMRBITBLT, yDest, 4) - TEST_FIELD_OFFSET(EMRBITBLT, yDest, 28) - TEST_FIELD_SIZE (EMRBITBLT, cxDest, 4) - TEST_FIELD_ALIGN (EMRBITBLT, cxDest, 4) - TEST_FIELD_OFFSET(EMRBITBLT, cxDest, 32) - TEST_FIELD_SIZE (EMRBITBLT, cyDest, 4) - TEST_FIELD_ALIGN (EMRBITBLT, cyDest, 4) - TEST_FIELD_OFFSET(EMRBITBLT, cyDest, 36) - TEST_FIELD_SIZE (EMRBITBLT, dwRop, 4) - TEST_FIELD_ALIGN (EMRBITBLT, dwRop, 4) - TEST_FIELD_OFFSET(EMRBITBLT, dwRop, 40) - TEST_FIELD_SIZE (EMRBITBLT, xSrc, 4) - TEST_FIELD_ALIGN (EMRBITBLT, xSrc, 4) - TEST_FIELD_OFFSET(EMRBITBLT, xSrc, 44) - TEST_FIELD_SIZE (EMRBITBLT, ySrc, 4) - TEST_FIELD_ALIGN (EMRBITBLT, ySrc, 4) - TEST_FIELD_OFFSET(EMRBITBLT, ySrc, 48) - TEST_FIELD_SIZE (EMRBITBLT, xformSrc, 24) - TEST_FIELD_ALIGN (EMRBITBLT, xformSrc, 4) - TEST_FIELD_OFFSET(EMRBITBLT, xformSrc, 52) - TEST_FIELD_SIZE (EMRBITBLT, crBkColorSrc, 4) - TEST_FIELD_ALIGN (EMRBITBLT, crBkColorSrc, 4) - TEST_FIELD_OFFSET(EMRBITBLT, crBkColorSrc, 76) - TEST_FIELD_SIZE (EMRBITBLT, iUsageSrc, 4) - TEST_FIELD_ALIGN (EMRBITBLT, iUsageSrc, 4) - TEST_FIELD_OFFSET(EMRBITBLT, iUsageSrc, 80) - TEST_FIELD_SIZE (EMRBITBLT, offBmiSrc, 4) - TEST_FIELD_ALIGN (EMRBITBLT, offBmiSrc, 4) - TEST_FIELD_OFFSET(EMRBITBLT, offBmiSrc, 84) - TEST_FIELD_SIZE (EMRBITBLT, cbBmiSrc, 4) - TEST_FIELD_ALIGN (EMRBITBLT, cbBmiSrc, 4) - TEST_FIELD_OFFSET(EMRBITBLT, cbBmiSrc, 88) - TEST_FIELD_SIZE (EMRBITBLT, offBitsSrc, 4) - TEST_FIELD_ALIGN (EMRBITBLT, offBitsSrc, 4) - TEST_FIELD_OFFSET(EMRBITBLT, offBitsSrc, 92) - TEST_FIELD_SIZE (EMRBITBLT, cbBitsSrc, 4) - TEST_FIELD_ALIGN (EMRBITBLT, cbBitsSrc, 4) - TEST_FIELD_OFFSET(EMRBITBLT, cbBitsSrc, 96) -} - -static void test_pack_EMRCHORD(void) -{ - /* EMRCHORD */ - TEST_TYPE_SIZE (EMRCHORD, 40) - TEST_TYPE_ALIGN (EMRCHORD, 4) - TEST_FIELD_SIZE (EMRCHORD, emr, 8) - TEST_FIELD_ALIGN (EMRCHORD, emr, 4) - TEST_FIELD_OFFSET(EMRCHORD, emr, 0) - TEST_FIELD_SIZE (EMRCHORD, rclBox, 16) - TEST_FIELD_ALIGN (EMRCHORD, rclBox, 4) - TEST_FIELD_OFFSET(EMRCHORD, rclBox, 8) - TEST_FIELD_SIZE (EMRCHORD, ptlStart, 8) - TEST_FIELD_ALIGN (EMRCHORD, ptlStart, 4) - TEST_FIELD_OFFSET(EMRCHORD, ptlStart, 24) - TEST_FIELD_SIZE (EMRCHORD, ptlEnd, 8) - TEST_FIELD_ALIGN (EMRCHORD, ptlEnd, 4) - TEST_FIELD_OFFSET(EMRCHORD, ptlEnd, 32) -} - -static void test_pack_EMRCLOSEFIGURE(void) -{ - /* EMRCLOSEFIGURE */ - TEST_TYPE_SIZE (EMRCLOSEFIGURE, 8) - TEST_TYPE_ALIGN (EMRCLOSEFIGURE, 4) - TEST_FIELD_SIZE (EMRCLOSEFIGURE, emr, 8) - TEST_FIELD_ALIGN (EMRCLOSEFIGURE, emr, 4) - TEST_FIELD_OFFSET(EMRCLOSEFIGURE, emr, 0) -} - -static void test_pack_EMRCREATEBRUSHINDIRECT(void) -{ - /* EMRCREATEBRUSHINDIRECT */ - TEST_TYPE_SIZE (EMRCREATEBRUSHINDIRECT, 24) - TEST_TYPE_ALIGN (EMRCREATEBRUSHINDIRECT, 4) - TEST_FIELD_SIZE (EMRCREATEBRUSHINDIRECT, emr, 8) - TEST_FIELD_ALIGN (EMRCREATEBRUSHINDIRECT, emr, 4) - TEST_FIELD_OFFSET(EMRCREATEBRUSHINDIRECT, emr, 0) - TEST_FIELD_SIZE (EMRCREATEBRUSHINDIRECT, ihBrush, 4) - TEST_FIELD_ALIGN (EMRCREATEBRUSHINDIRECT, ihBrush, 4) - TEST_FIELD_OFFSET(EMRCREATEBRUSHINDIRECT, ihBrush, 8) - TEST_FIELD_SIZE (EMRCREATEBRUSHINDIRECT, lb, 12) - TEST_FIELD_ALIGN (EMRCREATEBRUSHINDIRECT, lb, 4) - TEST_FIELD_OFFSET(EMRCREATEBRUSHINDIRECT, lb, 12) -} - -static void test_pack_EMRCREATECOLORSPACE(void) -{ - /* EMRCREATECOLORSPACE */ - TEST_TYPE_SIZE (EMRCREATECOLORSPACE, 340) - TEST_TYPE_ALIGN (EMRCREATECOLORSPACE, 4) - TEST_FIELD_SIZE (EMRCREATECOLORSPACE, emr, 8) - TEST_FIELD_ALIGN (EMRCREATECOLORSPACE, emr, 4) - TEST_FIELD_OFFSET(EMRCREATECOLORSPACE, emr, 0) - TEST_FIELD_SIZE (EMRCREATECOLORSPACE, ihCS, 4) - TEST_FIELD_ALIGN (EMRCREATECOLORSPACE, ihCS, 4) - TEST_FIELD_OFFSET(EMRCREATECOLORSPACE, ihCS, 8) - TEST_FIELD_SIZE (EMRCREATECOLORSPACE, lcs, 328) - TEST_FIELD_ALIGN (EMRCREATECOLORSPACE, lcs, 4) - TEST_FIELD_OFFSET(EMRCREATECOLORSPACE, lcs, 12) -} - -static void test_pack_EMRCREATECOLORSPACEW(void) -{ - /* EMRCREATECOLORSPACEW */ - TEST_TYPE_SIZE (EMRCREATECOLORSPACEW, 612) - TEST_TYPE_ALIGN (EMRCREATECOLORSPACEW, 4) - TEST_FIELD_SIZE (EMRCREATECOLORSPACEW, emr, 8) - TEST_FIELD_ALIGN (EMRCREATECOLORSPACEW, emr, 4) - TEST_FIELD_OFFSET(EMRCREATECOLORSPACEW, emr, 0) - TEST_FIELD_SIZE (EMRCREATECOLORSPACEW, ihCS, 4) - TEST_FIELD_ALIGN (EMRCREATECOLORSPACEW, ihCS, 4) - TEST_FIELD_OFFSET(EMRCREATECOLORSPACEW, ihCS, 8) - TEST_FIELD_SIZE (EMRCREATECOLORSPACEW, lcs, 588) - TEST_FIELD_ALIGN (EMRCREATECOLORSPACEW, lcs, 4) - TEST_FIELD_OFFSET(EMRCREATECOLORSPACEW, lcs, 12) - TEST_FIELD_SIZE (EMRCREATECOLORSPACEW, dwFlags, 4) - TEST_FIELD_ALIGN (EMRCREATECOLORSPACEW, dwFlags, 4) - TEST_FIELD_OFFSET(EMRCREATECOLORSPACEW, dwFlags, 600) - TEST_FIELD_SIZE (EMRCREATECOLORSPACEW, cbData, 4) - TEST_FIELD_ALIGN (EMRCREATECOLORSPACEW, cbData, 4) - TEST_FIELD_OFFSET(EMRCREATECOLORSPACEW, cbData, 604) - TEST_FIELD_SIZE (EMRCREATECOLORSPACEW, Data, 1) - TEST_FIELD_ALIGN (EMRCREATECOLORSPACEW, Data, 1) - TEST_FIELD_OFFSET(EMRCREATECOLORSPACEW, Data, 608) -} - -static void test_pack_EMRCREATEDIBPATTERNBRUSHPT(void) -{ - /* EMRCREATEDIBPATTERNBRUSHPT */ - TEST_TYPE_SIZE (EMRCREATEDIBPATTERNBRUSHPT, 32) - TEST_TYPE_ALIGN (EMRCREATEDIBPATTERNBRUSHPT, 4) - TEST_FIELD_SIZE (EMRCREATEDIBPATTERNBRUSHPT, emr, 8) - TEST_FIELD_ALIGN (EMRCREATEDIBPATTERNBRUSHPT, emr, 4) - TEST_FIELD_OFFSET(EMRCREATEDIBPATTERNBRUSHPT, emr, 0) - TEST_FIELD_SIZE (EMRCREATEDIBPATTERNBRUSHPT, ihBrush, 4) - TEST_FIELD_ALIGN (EMRCREATEDIBPATTERNBRUSHPT, ihBrush, 4) - TEST_FIELD_OFFSET(EMRCREATEDIBPATTERNBRUSHPT, ihBrush, 8) - TEST_FIELD_SIZE (EMRCREATEDIBPATTERNBRUSHPT, iUsage, 4) - TEST_FIELD_ALIGN (EMRCREATEDIBPATTERNBRUSHPT, iUsage, 4) - TEST_FIELD_OFFSET(EMRCREATEDIBPATTERNBRUSHPT, iUsage, 12) - TEST_FIELD_SIZE (EMRCREATEDIBPATTERNBRUSHPT, offBmi, 4) - TEST_FIELD_ALIGN (EMRCREATEDIBPATTERNBRUSHPT, offBmi, 4) - TEST_FIELD_OFFSET(EMRCREATEDIBPATTERNBRUSHPT, offBmi, 16) - TEST_FIELD_SIZE (EMRCREATEDIBPATTERNBRUSHPT, cbBmi, 4) - TEST_FIELD_ALIGN (EMRCREATEDIBPATTERNBRUSHPT, cbBmi, 4) - TEST_FIELD_OFFSET(EMRCREATEDIBPATTERNBRUSHPT, cbBmi, 20) - TEST_FIELD_SIZE (EMRCREATEDIBPATTERNBRUSHPT, offBits, 4) - TEST_FIELD_ALIGN (EMRCREATEDIBPATTERNBRUSHPT, offBits, 4) - TEST_FIELD_OFFSET(EMRCREATEDIBPATTERNBRUSHPT, offBits, 24) - TEST_FIELD_SIZE (EMRCREATEDIBPATTERNBRUSHPT, cbBits, 4) - TEST_FIELD_ALIGN (EMRCREATEDIBPATTERNBRUSHPT, cbBits, 4) - TEST_FIELD_OFFSET(EMRCREATEDIBPATTERNBRUSHPT, cbBits, 28) -} - -static void test_pack_EMRCREATEMONOBRUSH(void) -{ - /* EMRCREATEMONOBRUSH */ - TEST_TYPE_SIZE (EMRCREATEMONOBRUSH, 32) - TEST_TYPE_ALIGN (EMRCREATEMONOBRUSH, 4) - TEST_FIELD_SIZE (EMRCREATEMONOBRUSH, emr, 8) - TEST_FIELD_ALIGN (EMRCREATEMONOBRUSH, emr, 4) - TEST_FIELD_OFFSET(EMRCREATEMONOBRUSH, emr, 0) - TEST_FIELD_SIZE (EMRCREATEMONOBRUSH, ihBrush, 4) - TEST_FIELD_ALIGN (EMRCREATEMONOBRUSH, ihBrush, 4) - TEST_FIELD_OFFSET(EMRCREATEMONOBRUSH, ihBrush, 8) - TEST_FIELD_SIZE (EMRCREATEMONOBRUSH, iUsage, 4) - TEST_FIELD_ALIGN (EMRCREATEMONOBRUSH, iUsage, 4) - TEST_FIELD_OFFSET(EMRCREATEMONOBRUSH, iUsage, 12) - TEST_FIELD_SIZE (EMRCREATEMONOBRUSH, offBmi, 4) - TEST_FIELD_ALIGN (EMRCREATEMONOBRUSH, offBmi, 4) - TEST_FIELD_OFFSET(EMRCREATEMONOBRUSH, offBmi, 16) - TEST_FIELD_SIZE (EMRCREATEMONOBRUSH, cbBmi, 4) - TEST_FIELD_ALIGN (EMRCREATEMONOBRUSH, cbBmi, 4) - TEST_FIELD_OFFSET(EMRCREATEMONOBRUSH, cbBmi, 20) - TEST_FIELD_SIZE (EMRCREATEMONOBRUSH, offBits, 4) - TEST_FIELD_ALIGN (EMRCREATEMONOBRUSH, offBits, 4) - TEST_FIELD_OFFSET(EMRCREATEMONOBRUSH, offBits, 24) - TEST_FIELD_SIZE (EMRCREATEMONOBRUSH, cbBits, 4) - TEST_FIELD_ALIGN (EMRCREATEMONOBRUSH, cbBits, 4) - TEST_FIELD_OFFSET(EMRCREATEMONOBRUSH, cbBits, 28) -} - -static void test_pack_EMRCREATEPEN(void) -{ - /* EMRCREATEPEN */ - TEST_TYPE_SIZE (EMRCREATEPEN, 28) - TEST_TYPE_ALIGN (EMRCREATEPEN, 4) - TEST_FIELD_SIZE (EMRCREATEPEN, emr, 8) - TEST_FIELD_ALIGN (EMRCREATEPEN, emr, 4) - TEST_FIELD_OFFSET(EMRCREATEPEN, emr, 0) - TEST_FIELD_SIZE (EMRCREATEPEN, ihPen, 4) - TEST_FIELD_ALIGN (EMRCREATEPEN, ihPen, 4) - TEST_FIELD_OFFSET(EMRCREATEPEN, ihPen, 8) - TEST_FIELD_SIZE (EMRCREATEPEN, lopn, 16) - TEST_FIELD_ALIGN (EMRCREATEPEN, lopn, 4) - TEST_FIELD_OFFSET(EMRCREATEPEN, lopn, 12) -} - -static void test_pack_EMRDELETECOLORSPACE(void) -{ - /* EMRDELETECOLORSPACE */ - TEST_TYPE_SIZE (EMRDELETECOLORSPACE, 12) - TEST_TYPE_ALIGN (EMRDELETECOLORSPACE, 4) - TEST_FIELD_SIZE (EMRDELETECOLORSPACE, emr, 8) - TEST_FIELD_ALIGN (EMRDELETECOLORSPACE, emr, 4) - TEST_FIELD_OFFSET(EMRDELETECOLORSPACE, emr, 0) - TEST_FIELD_SIZE (EMRDELETECOLORSPACE, ihCS, 4) - TEST_FIELD_ALIGN (EMRDELETECOLORSPACE, ihCS, 4) - TEST_FIELD_OFFSET(EMRDELETECOLORSPACE, ihCS, 8) -} - -static void test_pack_EMRDELETEOBJECT(void) -{ - /* EMRDELETEOBJECT */ - TEST_TYPE_SIZE (EMRDELETEOBJECT, 12) - TEST_TYPE_ALIGN (EMRDELETEOBJECT, 4) - TEST_FIELD_SIZE (EMRDELETEOBJECT, emr, 8) - TEST_FIELD_ALIGN (EMRDELETEOBJECT, emr, 4) - TEST_FIELD_OFFSET(EMRDELETEOBJECT, emr, 0) - TEST_FIELD_SIZE (EMRDELETEOBJECT, ihObject, 4) - TEST_FIELD_ALIGN (EMRDELETEOBJECT, ihObject, 4) - TEST_FIELD_OFFSET(EMRDELETEOBJECT, ihObject, 8) -} - -static void test_pack_EMRELLIPSE(void) -{ - /* EMRELLIPSE */ - TEST_TYPE_SIZE (EMRELLIPSE, 24) - TEST_TYPE_ALIGN (EMRELLIPSE, 4) - TEST_FIELD_SIZE (EMRELLIPSE, emr, 8) - TEST_FIELD_ALIGN (EMRELLIPSE, emr, 4) - TEST_FIELD_OFFSET(EMRELLIPSE, emr, 0) - TEST_FIELD_SIZE (EMRELLIPSE, rclBox, 16) - TEST_FIELD_ALIGN (EMRELLIPSE, rclBox, 4) - TEST_FIELD_OFFSET(EMRELLIPSE, rclBox, 8) -} - -static void test_pack_EMRENDPATH(void) -{ - /* EMRENDPATH */ - TEST_TYPE_SIZE (EMRENDPATH, 8) - TEST_TYPE_ALIGN (EMRENDPATH, 4) - TEST_FIELD_SIZE (EMRENDPATH, emr, 8) - TEST_FIELD_ALIGN (EMRENDPATH, emr, 4) - TEST_FIELD_OFFSET(EMRENDPATH, emr, 0) -} - -static void test_pack_EMREOF(void) -{ - /* EMREOF */ - TEST_TYPE_SIZE (EMREOF, 20) - TEST_TYPE_ALIGN (EMREOF, 4) - TEST_FIELD_SIZE (EMREOF, emr, 8) - TEST_FIELD_ALIGN (EMREOF, emr, 4) - TEST_FIELD_OFFSET(EMREOF, emr, 0) - TEST_FIELD_SIZE (EMREOF, nPalEntries, 4) - TEST_FIELD_ALIGN (EMREOF, nPalEntries, 4) - TEST_FIELD_OFFSET(EMREOF, nPalEntries, 8) - TEST_FIELD_SIZE (EMREOF, offPalEntries, 4) - TEST_FIELD_ALIGN (EMREOF, offPalEntries, 4) - TEST_FIELD_OFFSET(EMREOF, offPalEntries, 12) - TEST_FIELD_SIZE (EMREOF, nSizeLast, 4) - TEST_FIELD_ALIGN (EMREOF, nSizeLast, 4) - TEST_FIELD_OFFSET(EMREOF, nSizeLast, 16) -} - -static void test_pack_EMREXCLUDECLIPRECT(void) -{ - /* EMREXCLUDECLIPRECT */ - TEST_TYPE_SIZE (EMREXCLUDECLIPRECT, 24) - TEST_TYPE_ALIGN (EMREXCLUDECLIPRECT, 4) - TEST_FIELD_SIZE (EMREXCLUDECLIPRECT, emr, 8) - TEST_FIELD_ALIGN (EMREXCLUDECLIPRECT, emr, 4) - TEST_FIELD_OFFSET(EMREXCLUDECLIPRECT, emr, 0) - TEST_FIELD_SIZE (EMREXCLUDECLIPRECT, rclClip, 16) - TEST_FIELD_ALIGN (EMREXCLUDECLIPRECT, rclClip, 4) - TEST_FIELD_OFFSET(EMREXCLUDECLIPRECT, rclClip, 8) -} - -static void test_pack_EMREXTCREATEFONTINDIRECTW(void) -{ - /* EMREXTCREATEFONTINDIRECTW */ - TEST_TYPE_SIZE (EMREXTCREATEFONTINDIRECTW, 332) - TEST_TYPE_ALIGN (EMREXTCREATEFONTINDIRECTW, 4) - TEST_FIELD_SIZE (EMREXTCREATEFONTINDIRECTW, emr, 8) - TEST_FIELD_ALIGN (EMREXTCREATEFONTINDIRECTW, emr, 4) - TEST_FIELD_OFFSET(EMREXTCREATEFONTINDIRECTW, emr, 0) - TEST_FIELD_SIZE (EMREXTCREATEFONTINDIRECTW, ihFont, 4) - TEST_FIELD_ALIGN (EMREXTCREATEFONTINDIRECTW, ihFont, 4) - TEST_FIELD_OFFSET(EMREXTCREATEFONTINDIRECTW, ihFont, 8) - TEST_FIELD_SIZE (EMREXTCREATEFONTINDIRECTW, elfw, 320) - TEST_FIELD_ALIGN (EMREXTCREATEFONTINDIRECTW, elfw, 4) - TEST_FIELD_OFFSET(EMREXTCREATEFONTINDIRECTW, elfw, 12) -} - -static void test_pack_EMREXTCREATEPEN(void) -{ - /* EMREXTCREATEPEN */ - TEST_TYPE_SIZE (EMREXTCREATEPEN, 56) - TEST_TYPE_ALIGN (EMREXTCREATEPEN, 4) - TEST_FIELD_SIZE (EMREXTCREATEPEN, emr, 8) - TEST_FIELD_ALIGN (EMREXTCREATEPEN, emr, 4) - TEST_FIELD_OFFSET(EMREXTCREATEPEN, emr, 0) - TEST_FIELD_SIZE (EMREXTCREATEPEN, ihPen, 4) - TEST_FIELD_ALIGN (EMREXTCREATEPEN, ihPen, 4) - TEST_FIELD_OFFSET(EMREXTCREATEPEN, ihPen, 8) - TEST_FIELD_SIZE (EMREXTCREATEPEN, offBmi, 4) - TEST_FIELD_ALIGN (EMREXTCREATEPEN, offBmi, 4) - TEST_FIELD_OFFSET(EMREXTCREATEPEN, offBmi, 12) - TEST_FIELD_SIZE (EMREXTCREATEPEN, cbBmi, 4) - TEST_FIELD_ALIGN (EMREXTCREATEPEN, cbBmi, 4) - TEST_FIELD_OFFSET(EMREXTCREATEPEN, cbBmi, 16) - TEST_FIELD_SIZE (EMREXTCREATEPEN, offBits, 4) - TEST_FIELD_ALIGN (EMREXTCREATEPEN, offBits, 4) - TEST_FIELD_OFFSET(EMREXTCREATEPEN, offBits, 20) - TEST_FIELD_SIZE (EMREXTCREATEPEN, cbBits, 4) - TEST_FIELD_ALIGN (EMREXTCREATEPEN, cbBits, 4) - TEST_FIELD_OFFSET(EMREXTCREATEPEN, cbBits, 24) - TEST_FIELD_SIZE (EMREXTCREATEPEN, elp, 28) - TEST_FIELD_ALIGN (EMREXTCREATEPEN, elp, 4) - TEST_FIELD_OFFSET(EMREXTCREATEPEN, elp, 28) -} - -static void test_pack_EMREXTFLOODFILL(void) -{ - /* EMREXTFLOODFILL */ - TEST_TYPE_SIZE (EMREXTFLOODFILL, 24) - TEST_TYPE_ALIGN (EMREXTFLOODFILL, 4) - TEST_FIELD_SIZE (EMREXTFLOODFILL, emr, 8) - TEST_FIELD_ALIGN (EMREXTFLOODFILL, emr, 4) - TEST_FIELD_OFFSET(EMREXTFLOODFILL, emr, 0) - TEST_FIELD_SIZE (EMREXTFLOODFILL, ptlStart, 8) - TEST_FIELD_ALIGN (EMREXTFLOODFILL, ptlStart, 4) - TEST_FIELD_OFFSET(EMREXTFLOODFILL, ptlStart, 8) - TEST_FIELD_SIZE (EMREXTFLOODFILL, crColor, 4) - TEST_FIELD_ALIGN (EMREXTFLOODFILL, crColor, 4) - TEST_FIELD_OFFSET(EMREXTFLOODFILL, crColor, 16) - TEST_FIELD_SIZE (EMREXTFLOODFILL, iMode, 4) - TEST_FIELD_ALIGN (EMREXTFLOODFILL, iMode, 4) - TEST_FIELD_OFFSET(EMREXTFLOODFILL, iMode, 20) -} - -static void test_pack_EMREXTSELECTCLIPRGN(void) -{ - /* EMREXTSELECTCLIPRGN */ - TEST_TYPE_SIZE (EMREXTSELECTCLIPRGN, 20) - TEST_TYPE_ALIGN (EMREXTSELECTCLIPRGN, 4) - TEST_FIELD_SIZE (EMREXTSELECTCLIPRGN, emr, 8) - TEST_FIELD_ALIGN (EMREXTSELECTCLIPRGN, emr, 4) - TEST_FIELD_OFFSET(EMREXTSELECTCLIPRGN, emr, 0) - TEST_FIELD_SIZE (EMREXTSELECTCLIPRGN, cbRgnData, 4) - TEST_FIELD_ALIGN (EMREXTSELECTCLIPRGN, cbRgnData, 4) - TEST_FIELD_OFFSET(EMREXTSELECTCLIPRGN, cbRgnData, 8) - TEST_FIELD_SIZE (EMREXTSELECTCLIPRGN, iMode, 4) - TEST_FIELD_ALIGN (EMREXTSELECTCLIPRGN, iMode, 4) - TEST_FIELD_OFFSET(EMREXTSELECTCLIPRGN, iMode, 12) - TEST_FIELD_SIZE (EMREXTSELECTCLIPRGN, RgnData, 1) - TEST_FIELD_ALIGN (EMREXTSELECTCLIPRGN, RgnData, 1) - TEST_FIELD_OFFSET(EMREXTSELECTCLIPRGN, RgnData, 16) -} - -static void test_pack_EMREXTTEXTOUTA(void) -{ - /* EMREXTTEXTOUTA */ - TEST_TYPE_SIZE (EMREXTTEXTOUTA, 76) - TEST_TYPE_ALIGN (EMREXTTEXTOUTA, 4) - TEST_FIELD_SIZE (EMREXTTEXTOUTA, emr, 8) - TEST_FIELD_ALIGN (EMREXTTEXTOUTA, emr, 4) - TEST_FIELD_OFFSET(EMREXTTEXTOUTA, emr, 0) - TEST_FIELD_SIZE (EMREXTTEXTOUTA, rclBounds, 16) - TEST_FIELD_ALIGN (EMREXTTEXTOUTA, rclBounds, 4) - TEST_FIELD_OFFSET(EMREXTTEXTOUTA, rclBounds, 8) - TEST_FIELD_SIZE (EMREXTTEXTOUTA, iGraphicsMode, 4) - TEST_FIELD_ALIGN (EMREXTTEXTOUTA, iGraphicsMode, 4) - TEST_FIELD_OFFSET(EMREXTTEXTOUTA, iGraphicsMode, 24) - TEST_FIELD_SIZE (EMREXTTEXTOUTA, exScale, 4) - TEST_FIELD_ALIGN (EMREXTTEXTOUTA, exScale, 4) - TEST_FIELD_OFFSET(EMREXTTEXTOUTA, exScale, 28) - TEST_FIELD_SIZE (EMREXTTEXTOUTA, eyScale, 4) - TEST_FIELD_ALIGN (EMREXTTEXTOUTA, eyScale, 4) - TEST_FIELD_OFFSET(EMREXTTEXTOUTA, eyScale, 32) - TEST_FIELD_SIZE (EMREXTTEXTOUTA, emrtext, 40) - TEST_FIELD_ALIGN (EMREXTTEXTOUTA, emrtext, 4) - TEST_FIELD_OFFSET(EMREXTTEXTOUTA, emrtext, 36) -} - -static void test_pack_EMREXTTEXTOUTW(void) -{ - /* EMREXTTEXTOUTW */ - TEST_TYPE_SIZE (EMREXTTEXTOUTW, 76) - TEST_TYPE_ALIGN (EMREXTTEXTOUTW, 4) - TEST_FIELD_SIZE (EMREXTTEXTOUTW, emr, 8) - TEST_FIELD_ALIGN (EMREXTTEXTOUTW, emr, 4) - TEST_FIELD_OFFSET(EMREXTTEXTOUTW, emr, 0) - TEST_FIELD_SIZE (EMREXTTEXTOUTW, rclBounds, 16) - TEST_FIELD_ALIGN (EMREXTTEXTOUTW, rclBounds, 4) - TEST_FIELD_OFFSET(EMREXTTEXTOUTW, rclBounds, 8) - TEST_FIELD_SIZE (EMREXTTEXTOUTW, iGraphicsMode, 4) - TEST_FIELD_ALIGN (EMREXTTEXTOUTW, iGraphicsMode, 4) - TEST_FIELD_OFFSET(EMREXTTEXTOUTW, iGraphicsMode, 24) - TEST_FIELD_SIZE (EMREXTTEXTOUTW, exScale, 4) - TEST_FIELD_ALIGN (EMREXTTEXTOUTW, exScale, 4) - TEST_FIELD_OFFSET(EMREXTTEXTOUTW, exScale, 28) - TEST_FIELD_SIZE (EMREXTTEXTOUTW, eyScale, 4) - TEST_FIELD_ALIGN (EMREXTTEXTOUTW, eyScale, 4) - TEST_FIELD_OFFSET(EMREXTTEXTOUTW, eyScale, 32) - TEST_FIELD_SIZE (EMREXTTEXTOUTW, emrtext, 40) - TEST_FIELD_ALIGN (EMREXTTEXTOUTW, emrtext, 4) - TEST_FIELD_OFFSET(EMREXTTEXTOUTW, emrtext, 36) -} - -static void test_pack_EMRFILLPATH(void) -{ - /* EMRFILLPATH */ - TEST_TYPE_SIZE (EMRFILLPATH, 24) - TEST_TYPE_ALIGN (EMRFILLPATH, 4) - TEST_FIELD_SIZE (EMRFILLPATH, emr, 8) - TEST_FIELD_ALIGN (EMRFILLPATH, emr, 4) - TEST_FIELD_OFFSET(EMRFILLPATH, emr, 0) - TEST_FIELD_SIZE (EMRFILLPATH, rclBounds, 16) - TEST_FIELD_ALIGN (EMRFILLPATH, rclBounds, 4) - TEST_FIELD_OFFSET(EMRFILLPATH, rclBounds, 8) -} - -static void test_pack_EMRFILLRGN(void) -{ - /* EMRFILLRGN */ - TEST_TYPE_SIZE (EMRFILLRGN, 36) - TEST_TYPE_ALIGN (EMRFILLRGN, 4) - TEST_FIELD_SIZE (EMRFILLRGN, emr, 8) - TEST_FIELD_ALIGN (EMRFILLRGN, emr, 4) - TEST_FIELD_OFFSET(EMRFILLRGN, emr, 0) - TEST_FIELD_SIZE (EMRFILLRGN, rclBounds, 16) - TEST_FIELD_ALIGN (EMRFILLRGN, rclBounds, 4) - TEST_FIELD_OFFSET(EMRFILLRGN, rclBounds, 8) - TEST_FIELD_SIZE (EMRFILLRGN, cbRgnData, 4) - TEST_FIELD_ALIGN (EMRFILLRGN, cbRgnData, 4) - TEST_FIELD_OFFSET(EMRFILLRGN, cbRgnData, 24) - TEST_FIELD_SIZE (EMRFILLRGN, ihBrush, 4) - TEST_FIELD_ALIGN (EMRFILLRGN, ihBrush, 4) - TEST_FIELD_OFFSET(EMRFILLRGN, ihBrush, 28) - TEST_FIELD_SIZE (EMRFILLRGN, RgnData, 1) - TEST_FIELD_ALIGN (EMRFILLRGN, RgnData, 1) - TEST_FIELD_OFFSET(EMRFILLRGN, RgnData, 32) -} - -static void test_pack_EMRFLATTENPATH(void) -{ - /* EMRFLATTENPATH */ - TEST_TYPE_SIZE (EMRFLATTENPATH, 8) - TEST_TYPE_ALIGN (EMRFLATTENPATH, 4) - TEST_FIELD_SIZE (EMRFLATTENPATH, emr, 8) - TEST_FIELD_ALIGN (EMRFLATTENPATH, emr, 4) - TEST_FIELD_OFFSET(EMRFLATTENPATH, emr, 0) -} - -static void test_pack_EMRFORMAT(void) -{ - /* EMRFORMAT */ - TEST_TYPE_SIZE (EMRFORMAT, 16) - TEST_TYPE_ALIGN (EMRFORMAT, 4) - TEST_FIELD_SIZE (EMRFORMAT, dSignature, 4) - TEST_FIELD_ALIGN (EMRFORMAT, dSignature, 4) - TEST_FIELD_OFFSET(EMRFORMAT, dSignature, 0) - TEST_FIELD_SIZE (EMRFORMAT, nVersion, 4) - TEST_FIELD_ALIGN (EMRFORMAT, nVersion, 4) - TEST_FIELD_OFFSET(EMRFORMAT, nVersion, 4) - TEST_FIELD_SIZE (EMRFORMAT, cbData, 4) - TEST_FIELD_ALIGN (EMRFORMAT, cbData, 4) - TEST_FIELD_OFFSET(EMRFORMAT, cbData, 8) - TEST_FIELD_SIZE (EMRFORMAT, offData, 4) - TEST_FIELD_ALIGN (EMRFORMAT, offData, 4) - TEST_FIELD_OFFSET(EMRFORMAT, offData, 12) -} - -static void test_pack_EMRFRAMERGN(void) -{ - /* EMRFRAMERGN */ - TEST_TYPE_SIZE (EMRFRAMERGN, 44) - TEST_TYPE_ALIGN (EMRFRAMERGN, 4) - TEST_FIELD_SIZE (EMRFRAMERGN, emr, 8) - TEST_FIELD_ALIGN (EMRFRAMERGN, emr, 4) - TEST_FIELD_OFFSET(EMRFRAMERGN, emr, 0) - TEST_FIELD_SIZE (EMRFRAMERGN, rclBounds, 16) - TEST_FIELD_ALIGN (EMRFRAMERGN, rclBounds, 4) - TEST_FIELD_OFFSET(EMRFRAMERGN, rclBounds, 8) - TEST_FIELD_SIZE (EMRFRAMERGN, cbRgnData, 4) - TEST_FIELD_ALIGN (EMRFRAMERGN, cbRgnData, 4) - TEST_FIELD_OFFSET(EMRFRAMERGN, cbRgnData, 24) - TEST_FIELD_SIZE (EMRFRAMERGN, ihBrush, 4) - TEST_FIELD_ALIGN (EMRFRAMERGN, ihBrush, 4) - TEST_FIELD_OFFSET(EMRFRAMERGN, ihBrush, 28) - TEST_FIELD_SIZE (EMRFRAMERGN, szlStroke, 8) - TEST_FIELD_ALIGN (EMRFRAMERGN, szlStroke, 4) - TEST_FIELD_OFFSET(EMRFRAMERGN, szlStroke, 32) - TEST_FIELD_SIZE (EMRFRAMERGN, RgnData, 1) - TEST_FIELD_ALIGN (EMRFRAMERGN, RgnData, 1) - TEST_FIELD_OFFSET(EMRFRAMERGN, RgnData, 40) -} - -static void test_pack_EMRGDICOMMENT(void) -{ - /* EMRGDICOMMENT */ - TEST_TYPE_SIZE (EMRGDICOMMENT, 16) - TEST_TYPE_ALIGN (EMRGDICOMMENT, 4) - TEST_FIELD_SIZE (EMRGDICOMMENT, emr, 8) - TEST_FIELD_ALIGN (EMRGDICOMMENT, emr, 4) - TEST_FIELD_OFFSET(EMRGDICOMMENT, emr, 0) - TEST_FIELD_SIZE (EMRGDICOMMENT, cbData, 4) - TEST_FIELD_ALIGN (EMRGDICOMMENT, cbData, 4) - TEST_FIELD_OFFSET(EMRGDICOMMENT, cbData, 8) - TEST_FIELD_SIZE (EMRGDICOMMENT, Data, 1) - TEST_FIELD_ALIGN (EMRGDICOMMENT, Data, 1) - TEST_FIELD_OFFSET(EMRGDICOMMENT, Data, 12) -} - -static void test_pack_EMRGLSBOUNDEDRECORD(void) -{ - /* EMRGLSBOUNDEDRECORD */ - TEST_TYPE_SIZE (EMRGLSBOUNDEDRECORD, 32) - TEST_TYPE_ALIGN (EMRGLSBOUNDEDRECORD, 4) - TEST_FIELD_SIZE (EMRGLSBOUNDEDRECORD, emr, 8) - TEST_FIELD_ALIGN (EMRGLSBOUNDEDRECORD, emr, 4) - TEST_FIELD_OFFSET(EMRGLSBOUNDEDRECORD, emr, 0) - TEST_FIELD_SIZE (EMRGLSBOUNDEDRECORD, rclBounds, 16) - TEST_FIELD_ALIGN (EMRGLSBOUNDEDRECORD, rclBounds, 4) - TEST_FIELD_OFFSET(EMRGLSBOUNDEDRECORD, rclBounds, 8) - TEST_FIELD_SIZE (EMRGLSBOUNDEDRECORD, cbData, 4) - TEST_FIELD_ALIGN (EMRGLSBOUNDEDRECORD, cbData, 4) - TEST_FIELD_OFFSET(EMRGLSBOUNDEDRECORD, cbData, 24) - TEST_FIELD_SIZE (EMRGLSBOUNDEDRECORD, Data, 1) - TEST_FIELD_ALIGN (EMRGLSBOUNDEDRECORD, Data, 1) - TEST_FIELD_OFFSET(EMRGLSBOUNDEDRECORD, Data, 28) -} - -static void test_pack_EMRGLSRECORD(void) -{ - /* EMRGLSRECORD */ - TEST_TYPE_SIZE (EMRGLSRECORD, 16) - TEST_TYPE_ALIGN (EMRGLSRECORD, 4) - TEST_FIELD_SIZE (EMRGLSRECORD, emr, 8) - TEST_FIELD_ALIGN (EMRGLSRECORD, emr, 4) - TEST_FIELD_OFFSET(EMRGLSRECORD, emr, 0) - TEST_FIELD_SIZE (EMRGLSRECORD, cbData, 4) - TEST_FIELD_ALIGN (EMRGLSRECORD, cbData, 4) - TEST_FIELD_OFFSET(EMRGLSRECORD, cbData, 8) - TEST_FIELD_SIZE (EMRGLSRECORD, Data, 1) - TEST_FIELD_ALIGN (EMRGLSRECORD, Data, 1) - TEST_FIELD_OFFSET(EMRGLSRECORD, Data, 12) -} - -static void test_pack_EMRINTERSECTCLIPRECT(void) -{ - /* EMRINTERSECTCLIPRECT */ - TEST_TYPE_SIZE (EMRINTERSECTCLIPRECT, 24) - TEST_TYPE_ALIGN (EMRINTERSECTCLIPRECT, 4) - TEST_FIELD_SIZE (EMRINTERSECTCLIPRECT, emr, 8) - TEST_FIELD_ALIGN (EMRINTERSECTCLIPRECT, emr, 4) - TEST_FIELD_OFFSET(EMRINTERSECTCLIPRECT, emr, 0) - TEST_FIELD_SIZE (EMRINTERSECTCLIPRECT, rclClip, 16) - TEST_FIELD_ALIGN (EMRINTERSECTCLIPRECT, rclClip, 4) - TEST_FIELD_OFFSET(EMRINTERSECTCLIPRECT, rclClip, 8) -} - -static void test_pack_EMRINVERTRGN(void) -{ - /* EMRINVERTRGN */ - TEST_TYPE_SIZE (EMRINVERTRGN, 32) - TEST_TYPE_ALIGN (EMRINVERTRGN, 4) - TEST_FIELD_SIZE (EMRINVERTRGN, emr, 8) - TEST_FIELD_ALIGN (EMRINVERTRGN, emr, 4) - TEST_FIELD_OFFSET(EMRINVERTRGN, emr, 0) - TEST_FIELD_SIZE (EMRINVERTRGN, rclBounds, 16) - TEST_FIELD_ALIGN (EMRINVERTRGN, rclBounds, 4) - TEST_FIELD_OFFSET(EMRINVERTRGN, rclBounds, 8) - TEST_FIELD_SIZE (EMRINVERTRGN, cbRgnData, 4) - TEST_FIELD_ALIGN (EMRINVERTRGN, cbRgnData, 4) - TEST_FIELD_OFFSET(EMRINVERTRGN, cbRgnData, 24) - TEST_FIELD_SIZE (EMRINVERTRGN, RgnData, 1) - TEST_FIELD_ALIGN (EMRINVERTRGN, RgnData, 1) - TEST_FIELD_OFFSET(EMRINVERTRGN, RgnData, 28) -} - -static void test_pack_EMRLINETO(void) -{ - /* EMRLINETO */ - TEST_TYPE_SIZE (EMRLINETO, 16) - TEST_TYPE_ALIGN (EMRLINETO, 4) - TEST_FIELD_SIZE (EMRLINETO, emr, 8) - TEST_FIELD_ALIGN (EMRLINETO, emr, 4) - TEST_FIELD_OFFSET(EMRLINETO, emr, 0) - TEST_FIELD_SIZE (EMRLINETO, ptl, 8) - TEST_FIELD_ALIGN (EMRLINETO, ptl, 4) - TEST_FIELD_OFFSET(EMRLINETO, ptl, 8) -} - -static void test_pack_EMRMASKBLT(void) -{ - /* EMRMASKBLT */ - TEST_TYPE_SIZE (EMRMASKBLT, 128) - TEST_TYPE_ALIGN (EMRMASKBLT, 4) - TEST_FIELD_SIZE (EMRMASKBLT, emr, 8) - TEST_FIELD_ALIGN (EMRMASKBLT, emr, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, emr, 0) - TEST_FIELD_SIZE (EMRMASKBLT, rclBounds, 16) - TEST_FIELD_ALIGN (EMRMASKBLT, rclBounds, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, rclBounds, 8) - TEST_FIELD_SIZE (EMRMASKBLT, xDest, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, xDest, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, xDest, 24) - TEST_FIELD_SIZE (EMRMASKBLT, yDest, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, yDest, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, yDest, 28) - TEST_FIELD_SIZE (EMRMASKBLT, cxDest, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, cxDest, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, cxDest, 32) - TEST_FIELD_SIZE (EMRMASKBLT, cyDest, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, cyDest, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, cyDest, 36) - TEST_FIELD_SIZE (EMRMASKBLT, dwRop, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, dwRop, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, dwRop, 40) - TEST_FIELD_SIZE (EMRMASKBLT, xSrc, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, xSrc, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, xSrc, 44) - TEST_FIELD_SIZE (EMRMASKBLT, ySrc, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, ySrc, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, ySrc, 48) - TEST_FIELD_SIZE (EMRMASKBLT, xformSrc, 24) - TEST_FIELD_ALIGN (EMRMASKBLT, xformSrc, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, xformSrc, 52) - TEST_FIELD_SIZE (EMRMASKBLT, crBkColorSrc, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, crBkColorSrc, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, crBkColorSrc, 76) - TEST_FIELD_SIZE (EMRMASKBLT, iUsageSrc, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, iUsageSrc, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, iUsageSrc, 80) - TEST_FIELD_SIZE (EMRMASKBLT, offBmiSrc, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, offBmiSrc, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, offBmiSrc, 84) - TEST_FIELD_SIZE (EMRMASKBLT, cbBmiSrc, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, cbBmiSrc, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, cbBmiSrc, 88) - TEST_FIELD_SIZE (EMRMASKBLT, offBitsSrc, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, offBitsSrc, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, offBitsSrc, 92) - TEST_FIELD_SIZE (EMRMASKBLT, cbBitsSrc, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, cbBitsSrc, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, cbBitsSrc, 96) - TEST_FIELD_SIZE (EMRMASKBLT, xMask, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, xMask, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, xMask, 100) - TEST_FIELD_SIZE (EMRMASKBLT, yMask, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, yMask, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, yMask, 104) - TEST_FIELD_SIZE (EMRMASKBLT, iUsageMask, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, iUsageMask, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, iUsageMask, 108) - TEST_FIELD_SIZE (EMRMASKBLT, offBmiMask, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, offBmiMask, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, offBmiMask, 112) - TEST_FIELD_SIZE (EMRMASKBLT, cbBmiMask, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, cbBmiMask, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, cbBmiMask, 116) - TEST_FIELD_SIZE (EMRMASKBLT, offBitsMask, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, offBitsMask, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, offBitsMask, 120) - TEST_FIELD_SIZE (EMRMASKBLT, cbBitsMask, 4) - TEST_FIELD_ALIGN (EMRMASKBLT, cbBitsMask, 4) - TEST_FIELD_OFFSET(EMRMASKBLT, cbBitsMask, 124) -} - -static void test_pack_EMRMODIFYWORLDTRANSFORM(void) -{ - /* EMRMODIFYWORLDTRANSFORM */ - TEST_TYPE_SIZE (EMRMODIFYWORLDTRANSFORM, 36) - TEST_TYPE_ALIGN (EMRMODIFYWORLDTRANSFORM, 4) - TEST_FIELD_SIZE (EMRMODIFYWORLDTRANSFORM, emr, 8) - TEST_FIELD_ALIGN (EMRMODIFYWORLDTRANSFORM, emr, 4) - TEST_FIELD_OFFSET(EMRMODIFYWORLDTRANSFORM, emr, 0) - TEST_FIELD_SIZE (EMRMODIFYWORLDTRANSFORM, xform, 24) - TEST_FIELD_ALIGN (EMRMODIFYWORLDTRANSFORM, xform, 4) - TEST_FIELD_OFFSET(EMRMODIFYWORLDTRANSFORM, xform, 8) - TEST_FIELD_SIZE (EMRMODIFYWORLDTRANSFORM, iMode, 4) - TEST_FIELD_ALIGN (EMRMODIFYWORLDTRANSFORM, iMode, 4) - TEST_FIELD_OFFSET(EMRMODIFYWORLDTRANSFORM, iMode, 32) -} - -static void test_pack_EMRMOVETOEX(void) -{ - /* EMRMOVETOEX */ - TEST_TYPE_SIZE (EMRMOVETOEX, 16) - TEST_TYPE_ALIGN (EMRMOVETOEX, 4) - TEST_FIELD_SIZE (EMRMOVETOEX, emr, 8) - TEST_FIELD_ALIGN (EMRMOVETOEX, emr, 4) - TEST_FIELD_OFFSET(EMRMOVETOEX, emr, 0) - TEST_FIELD_SIZE (EMRMOVETOEX, ptl, 8) - TEST_FIELD_ALIGN (EMRMOVETOEX, ptl, 4) - TEST_FIELD_OFFSET(EMRMOVETOEX, ptl, 8) -} - -static void test_pack_EMROFFSETCLIPRGN(void) -{ - /* EMROFFSETCLIPRGN */ - TEST_TYPE_SIZE (EMROFFSETCLIPRGN, 16) - TEST_TYPE_ALIGN (EMROFFSETCLIPRGN, 4) - TEST_FIELD_SIZE (EMROFFSETCLIPRGN, emr, 8) - TEST_FIELD_ALIGN (EMROFFSETCLIPRGN, emr, 4) - TEST_FIELD_OFFSET(EMROFFSETCLIPRGN, emr, 0) - TEST_FIELD_SIZE (EMROFFSETCLIPRGN, ptlOffset, 8) - TEST_FIELD_ALIGN (EMROFFSETCLIPRGN, ptlOffset, 4) - TEST_FIELD_OFFSET(EMROFFSETCLIPRGN, ptlOffset, 8) -} - -static void test_pack_EMRPAINTRGN(void) -{ - /* EMRPAINTRGN */ - TEST_TYPE_SIZE (EMRPAINTRGN, 32) - TEST_TYPE_ALIGN (EMRPAINTRGN, 4) - TEST_FIELD_SIZE (EMRPAINTRGN, emr, 8) - TEST_FIELD_ALIGN (EMRPAINTRGN, emr, 4) - TEST_FIELD_OFFSET(EMRPAINTRGN, emr, 0) - TEST_FIELD_SIZE (EMRPAINTRGN, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPAINTRGN, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPAINTRGN, rclBounds, 8) - TEST_FIELD_SIZE (EMRPAINTRGN, cbRgnData, 4) - TEST_FIELD_ALIGN (EMRPAINTRGN, cbRgnData, 4) - TEST_FIELD_OFFSET(EMRPAINTRGN, cbRgnData, 24) - TEST_FIELD_SIZE (EMRPAINTRGN, RgnData, 1) - TEST_FIELD_ALIGN (EMRPAINTRGN, RgnData, 1) - TEST_FIELD_OFFSET(EMRPAINTRGN, RgnData, 28) -} - -static void test_pack_EMRPIE(void) -{ - /* EMRPIE */ - TEST_TYPE_SIZE (EMRPIE, 40) - TEST_TYPE_ALIGN (EMRPIE, 4) - TEST_FIELD_SIZE (EMRPIE, emr, 8) - TEST_FIELD_ALIGN (EMRPIE, emr, 4) - TEST_FIELD_OFFSET(EMRPIE, emr, 0) - TEST_FIELD_SIZE (EMRPIE, rclBox, 16) - TEST_FIELD_ALIGN (EMRPIE, rclBox, 4) - TEST_FIELD_OFFSET(EMRPIE, rclBox, 8) - TEST_FIELD_SIZE (EMRPIE, ptlStart, 8) - TEST_FIELD_ALIGN (EMRPIE, ptlStart, 4) - TEST_FIELD_OFFSET(EMRPIE, ptlStart, 24) - TEST_FIELD_SIZE (EMRPIE, ptlEnd, 8) - TEST_FIELD_ALIGN (EMRPIE, ptlEnd, 4) - TEST_FIELD_OFFSET(EMRPIE, ptlEnd, 32) -} - -static void test_pack_EMRPIXELFORMAT(void) -{ - /* EMRPIXELFORMAT */ - TEST_TYPE_SIZE (EMRPIXELFORMAT, 48) - TEST_TYPE_ALIGN (EMRPIXELFORMAT, 4) - TEST_FIELD_SIZE (EMRPIXELFORMAT, emr, 8) - TEST_FIELD_ALIGN (EMRPIXELFORMAT, emr, 4) - TEST_FIELD_OFFSET(EMRPIXELFORMAT, emr, 0) - TEST_FIELD_SIZE (EMRPIXELFORMAT, pfd, 40) - TEST_FIELD_ALIGN (EMRPIXELFORMAT, pfd, 4) - TEST_FIELD_OFFSET(EMRPIXELFORMAT, pfd, 8) -} - -static void test_pack_EMRPLGBLT(void) -{ - /* EMRPLGBLT */ - TEST_TYPE_SIZE (EMRPLGBLT, 140) - TEST_TYPE_ALIGN (EMRPLGBLT, 4) - TEST_FIELD_SIZE (EMRPLGBLT, emr, 8) - TEST_FIELD_ALIGN (EMRPLGBLT, emr, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, emr, 0) - TEST_FIELD_SIZE (EMRPLGBLT, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPLGBLT, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, rclBounds, 8) - TEST_FIELD_SIZE (EMRPLGBLT, aptlDest, 24) - TEST_FIELD_ALIGN (EMRPLGBLT, aptlDest, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, aptlDest, 24) - TEST_FIELD_SIZE (EMRPLGBLT, xSrc, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, xSrc, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, xSrc, 48) - TEST_FIELD_SIZE (EMRPLGBLT, ySrc, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, ySrc, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, ySrc, 52) - TEST_FIELD_SIZE (EMRPLGBLT, cxSrc, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, cxSrc, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, cxSrc, 56) - TEST_FIELD_SIZE (EMRPLGBLT, cySrc, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, cySrc, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, cySrc, 60) - TEST_FIELD_SIZE (EMRPLGBLT, xformSrc, 24) - TEST_FIELD_ALIGN (EMRPLGBLT, xformSrc, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, xformSrc, 64) - TEST_FIELD_SIZE (EMRPLGBLT, crBkColorSrc, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, crBkColorSrc, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, crBkColorSrc, 88) - TEST_FIELD_SIZE (EMRPLGBLT, iUsageSrc, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, iUsageSrc, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, iUsageSrc, 92) - TEST_FIELD_SIZE (EMRPLGBLT, offBmiSrc, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, offBmiSrc, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, offBmiSrc, 96) - TEST_FIELD_SIZE (EMRPLGBLT, cbBmiSrc, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, cbBmiSrc, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, cbBmiSrc, 100) - TEST_FIELD_SIZE (EMRPLGBLT, offBitsSrc, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, offBitsSrc, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, offBitsSrc, 104) - TEST_FIELD_SIZE (EMRPLGBLT, cbBitsSrc, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, cbBitsSrc, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, cbBitsSrc, 108) - TEST_FIELD_SIZE (EMRPLGBLT, xMask, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, xMask, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, xMask, 112) - TEST_FIELD_SIZE (EMRPLGBLT, yMask, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, yMask, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, yMask, 116) - TEST_FIELD_SIZE (EMRPLGBLT, iUsageMask, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, iUsageMask, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, iUsageMask, 120) - TEST_FIELD_SIZE (EMRPLGBLT, offBmiMask, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, offBmiMask, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, offBmiMask, 124) - TEST_FIELD_SIZE (EMRPLGBLT, cbBmiMask, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, cbBmiMask, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, cbBmiMask, 128) - TEST_FIELD_SIZE (EMRPLGBLT, offBitsMask, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, offBitsMask, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, offBitsMask, 132) - TEST_FIELD_SIZE (EMRPLGBLT, cbBitsMask, 4) - TEST_FIELD_ALIGN (EMRPLGBLT, cbBitsMask, 4) - TEST_FIELD_OFFSET(EMRPLGBLT, cbBitsMask, 136) -} - -static void test_pack_EMRPOLYBEZIER(void) -{ - /* EMRPOLYBEZIER */ - TEST_TYPE_SIZE (EMRPOLYBEZIER, 36) - TEST_TYPE_ALIGN (EMRPOLYBEZIER, 4) - TEST_FIELD_SIZE (EMRPOLYBEZIER, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYBEZIER, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIER, emr, 0) - TEST_FIELD_SIZE (EMRPOLYBEZIER, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYBEZIER, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIER, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYBEZIER, cptl, 4) - TEST_FIELD_ALIGN (EMRPOLYBEZIER, cptl, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIER, cptl, 24) - TEST_FIELD_SIZE (EMRPOLYBEZIER, aptl, 8) - TEST_FIELD_ALIGN (EMRPOLYBEZIER, aptl, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIER, aptl, 28) -} - -static void test_pack_EMRPOLYBEZIER16(void) -{ - /* EMRPOLYBEZIER16 */ - TEST_TYPE_SIZE (EMRPOLYBEZIER16, 32) - TEST_TYPE_ALIGN (EMRPOLYBEZIER16, 4) - TEST_FIELD_SIZE (EMRPOLYBEZIER16, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYBEZIER16, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIER16, emr, 0) - TEST_FIELD_SIZE (EMRPOLYBEZIER16, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYBEZIER16, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIER16, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYBEZIER16, cpts, 4) - TEST_FIELD_ALIGN (EMRPOLYBEZIER16, cpts, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIER16, cpts, 24) - TEST_FIELD_SIZE (EMRPOLYBEZIER16, apts, 4) - TEST_FIELD_ALIGN (EMRPOLYBEZIER16, apts, 2) - TEST_FIELD_OFFSET(EMRPOLYBEZIER16, apts, 28) -} - -static void test_pack_EMRPOLYBEZIERTO(void) -{ - /* EMRPOLYBEZIERTO */ - TEST_TYPE_SIZE (EMRPOLYBEZIERTO, 36) - TEST_TYPE_ALIGN (EMRPOLYBEZIERTO, 4) - TEST_FIELD_SIZE (EMRPOLYBEZIERTO, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYBEZIERTO, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIERTO, emr, 0) - TEST_FIELD_SIZE (EMRPOLYBEZIERTO, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYBEZIERTO, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIERTO, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYBEZIERTO, cptl, 4) - TEST_FIELD_ALIGN (EMRPOLYBEZIERTO, cptl, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIERTO, cptl, 24) - TEST_FIELD_SIZE (EMRPOLYBEZIERTO, aptl, 8) - TEST_FIELD_ALIGN (EMRPOLYBEZIERTO, aptl, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIERTO, aptl, 28) -} - -static void test_pack_EMRPOLYBEZIERTO16(void) -{ - /* EMRPOLYBEZIERTO16 */ - TEST_TYPE_SIZE (EMRPOLYBEZIERTO16, 32) - TEST_TYPE_ALIGN (EMRPOLYBEZIERTO16, 4) - TEST_FIELD_SIZE (EMRPOLYBEZIERTO16, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYBEZIERTO16, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIERTO16, emr, 0) - TEST_FIELD_SIZE (EMRPOLYBEZIERTO16, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYBEZIERTO16, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIERTO16, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYBEZIERTO16, cpts, 4) - TEST_FIELD_ALIGN (EMRPOLYBEZIERTO16, cpts, 4) - TEST_FIELD_OFFSET(EMRPOLYBEZIERTO16, cpts, 24) - TEST_FIELD_SIZE (EMRPOLYBEZIERTO16, apts, 4) - TEST_FIELD_ALIGN (EMRPOLYBEZIERTO16, apts, 2) - TEST_FIELD_OFFSET(EMRPOLYBEZIERTO16, apts, 28) -} - -static void test_pack_EMRPOLYDRAW(void) -{ - /* EMRPOLYDRAW */ - TEST_TYPE_SIZE (EMRPOLYDRAW, 40) - TEST_TYPE_ALIGN (EMRPOLYDRAW, 4) - TEST_FIELD_SIZE (EMRPOLYDRAW, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYDRAW, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYDRAW, emr, 0) - TEST_FIELD_SIZE (EMRPOLYDRAW, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYDRAW, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYDRAW, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYDRAW, cptl, 4) - TEST_FIELD_ALIGN (EMRPOLYDRAW, cptl, 4) - TEST_FIELD_OFFSET(EMRPOLYDRAW, cptl, 24) - TEST_FIELD_SIZE (EMRPOLYDRAW, aptl, 8) - TEST_FIELD_ALIGN (EMRPOLYDRAW, aptl, 4) - TEST_FIELD_OFFSET(EMRPOLYDRAW, aptl, 28) - TEST_FIELD_SIZE (EMRPOLYDRAW, abTypes, 1) - TEST_FIELD_ALIGN (EMRPOLYDRAW, abTypes, 1) - TEST_FIELD_OFFSET(EMRPOLYDRAW, abTypes, 36) -} - -static void test_pack_EMRPOLYDRAW16(void) -{ - /* EMRPOLYDRAW16 */ - TEST_TYPE_SIZE (EMRPOLYDRAW16, 36) - TEST_TYPE_ALIGN (EMRPOLYDRAW16, 4) - TEST_FIELD_SIZE (EMRPOLYDRAW16, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYDRAW16, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYDRAW16, emr, 0) - TEST_FIELD_SIZE (EMRPOLYDRAW16, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYDRAW16, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYDRAW16, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYDRAW16, cpts, 4) - TEST_FIELD_ALIGN (EMRPOLYDRAW16, cpts, 4) - TEST_FIELD_OFFSET(EMRPOLYDRAW16, cpts, 24) - TEST_FIELD_SIZE (EMRPOLYDRAW16, apts, 4) - TEST_FIELD_ALIGN (EMRPOLYDRAW16, apts, 2) - TEST_FIELD_OFFSET(EMRPOLYDRAW16, apts, 28) - TEST_FIELD_SIZE (EMRPOLYDRAW16, abTypes, 1) - TEST_FIELD_ALIGN (EMRPOLYDRAW16, abTypes, 1) - TEST_FIELD_OFFSET(EMRPOLYDRAW16, abTypes, 32) -} - -static void test_pack_EMRPOLYGON(void) -{ - /* EMRPOLYGON */ - TEST_TYPE_SIZE (EMRPOLYGON, 36) - TEST_TYPE_ALIGN (EMRPOLYGON, 4) - TEST_FIELD_SIZE (EMRPOLYGON, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYGON, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYGON, emr, 0) - TEST_FIELD_SIZE (EMRPOLYGON, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYGON, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYGON, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYGON, cptl, 4) - TEST_FIELD_ALIGN (EMRPOLYGON, cptl, 4) - TEST_FIELD_OFFSET(EMRPOLYGON, cptl, 24) - TEST_FIELD_SIZE (EMRPOLYGON, aptl, 8) - TEST_FIELD_ALIGN (EMRPOLYGON, aptl, 4) - TEST_FIELD_OFFSET(EMRPOLYGON, aptl, 28) -} - -static void test_pack_EMRPOLYGON16(void) -{ - /* EMRPOLYGON16 */ - TEST_TYPE_SIZE (EMRPOLYGON16, 32) - TEST_TYPE_ALIGN (EMRPOLYGON16, 4) - TEST_FIELD_SIZE (EMRPOLYGON16, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYGON16, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYGON16, emr, 0) - TEST_FIELD_SIZE (EMRPOLYGON16, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYGON16, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYGON16, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYGON16, cpts, 4) - TEST_FIELD_ALIGN (EMRPOLYGON16, cpts, 4) - TEST_FIELD_OFFSET(EMRPOLYGON16, cpts, 24) - TEST_FIELD_SIZE (EMRPOLYGON16, apts, 4) - TEST_FIELD_ALIGN (EMRPOLYGON16, apts, 2) - TEST_FIELD_OFFSET(EMRPOLYGON16, apts, 28) -} - -static void test_pack_EMRPOLYLINE(void) -{ - /* EMRPOLYLINE */ - TEST_TYPE_SIZE (EMRPOLYLINE, 36) - TEST_TYPE_ALIGN (EMRPOLYLINE, 4) - TEST_FIELD_SIZE (EMRPOLYLINE, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYLINE, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYLINE, emr, 0) - TEST_FIELD_SIZE (EMRPOLYLINE, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYLINE, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYLINE, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYLINE, cptl, 4) - TEST_FIELD_ALIGN (EMRPOLYLINE, cptl, 4) - TEST_FIELD_OFFSET(EMRPOLYLINE, cptl, 24) - TEST_FIELD_SIZE (EMRPOLYLINE, aptl, 8) - TEST_FIELD_ALIGN (EMRPOLYLINE, aptl, 4) - TEST_FIELD_OFFSET(EMRPOLYLINE, aptl, 28) -} - -static void test_pack_EMRPOLYLINE16(void) -{ - /* EMRPOLYLINE16 */ - TEST_TYPE_SIZE (EMRPOLYLINE16, 32) - TEST_TYPE_ALIGN (EMRPOLYLINE16, 4) - TEST_FIELD_SIZE (EMRPOLYLINE16, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYLINE16, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYLINE16, emr, 0) - TEST_FIELD_SIZE (EMRPOLYLINE16, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYLINE16, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYLINE16, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYLINE16, cpts, 4) - TEST_FIELD_ALIGN (EMRPOLYLINE16, cpts, 4) - TEST_FIELD_OFFSET(EMRPOLYLINE16, cpts, 24) - TEST_FIELD_SIZE (EMRPOLYLINE16, apts, 4) - TEST_FIELD_ALIGN (EMRPOLYLINE16, apts, 2) - TEST_FIELD_OFFSET(EMRPOLYLINE16, apts, 28) -} - -static void test_pack_EMRPOLYLINETO(void) -{ - /* EMRPOLYLINETO */ - TEST_TYPE_SIZE (EMRPOLYLINETO, 36) - TEST_TYPE_ALIGN (EMRPOLYLINETO, 4) - TEST_FIELD_SIZE (EMRPOLYLINETO, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYLINETO, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYLINETO, emr, 0) - TEST_FIELD_SIZE (EMRPOLYLINETO, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYLINETO, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYLINETO, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYLINETO, cptl, 4) - TEST_FIELD_ALIGN (EMRPOLYLINETO, cptl, 4) - TEST_FIELD_OFFSET(EMRPOLYLINETO, cptl, 24) - TEST_FIELD_SIZE (EMRPOLYLINETO, aptl, 8) - TEST_FIELD_ALIGN (EMRPOLYLINETO, aptl, 4) - TEST_FIELD_OFFSET(EMRPOLYLINETO, aptl, 28) -} - -static void test_pack_EMRPOLYLINETO16(void) -{ - /* EMRPOLYLINETO16 */ - TEST_TYPE_SIZE (EMRPOLYLINETO16, 32) - TEST_TYPE_ALIGN (EMRPOLYLINETO16, 4) - TEST_FIELD_SIZE (EMRPOLYLINETO16, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYLINETO16, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYLINETO16, emr, 0) - TEST_FIELD_SIZE (EMRPOLYLINETO16, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYLINETO16, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYLINETO16, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYLINETO16, cpts, 4) - TEST_FIELD_ALIGN (EMRPOLYLINETO16, cpts, 4) - TEST_FIELD_OFFSET(EMRPOLYLINETO16, cpts, 24) - TEST_FIELD_SIZE (EMRPOLYLINETO16, apts, 4) - TEST_FIELD_ALIGN (EMRPOLYLINETO16, apts, 2) - TEST_FIELD_OFFSET(EMRPOLYLINETO16, apts, 28) -} - -static void test_pack_EMRPOLYPOLYGON(void) -{ - /* EMRPOLYPOLYGON */ - TEST_TYPE_SIZE (EMRPOLYPOLYGON, 44) - TEST_TYPE_ALIGN (EMRPOLYPOLYGON, 4) - TEST_FIELD_SIZE (EMRPOLYPOLYGON, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYPOLYGON, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYGON, emr, 0) - TEST_FIELD_SIZE (EMRPOLYPOLYGON, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYPOLYGON, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYGON, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYPOLYGON, nPolys, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYGON, nPolys, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYGON, nPolys, 24) - TEST_FIELD_SIZE (EMRPOLYPOLYGON, cptl, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYGON, cptl, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYGON, cptl, 28) - TEST_FIELD_SIZE (EMRPOLYPOLYGON, aPolyCounts, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYGON, aPolyCounts, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYGON, aPolyCounts, 32) - TEST_FIELD_SIZE (EMRPOLYPOLYGON, aptl, 8) - TEST_FIELD_ALIGN (EMRPOLYPOLYGON, aptl, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYGON, aptl, 36) -} - -static void test_pack_EMRPOLYPOLYGON16(void) -{ - /* EMRPOLYPOLYGON16 */ - TEST_TYPE_SIZE (EMRPOLYPOLYGON16, 40) - TEST_TYPE_ALIGN (EMRPOLYPOLYGON16, 4) - TEST_FIELD_SIZE (EMRPOLYPOLYGON16, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYPOLYGON16, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYGON16, emr, 0) - TEST_FIELD_SIZE (EMRPOLYPOLYGON16, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYPOLYGON16, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYGON16, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYPOLYGON16, nPolys, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYGON16, nPolys, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYGON16, nPolys, 24) - TEST_FIELD_SIZE (EMRPOLYPOLYGON16, cpts, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYGON16, cpts, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYGON16, cpts, 28) - TEST_FIELD_SIZE (EMRPOLYPOLYGON16, aPolyCounts, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYGON16, aPolyCounts, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYGON16, aPolyCounts, 32) - TEST_FIELD_SIZE (EMRPOLYPOLYGON16, apts, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYGON16, apts, 2) - TEST_FIELD_OFFSET(EMRPOLYPOLYGON16, apts, 36) -} - -static void test_pack_EMRPOLYPOLYLINE(void) -{ - /* EMRPOLYPOLYLINE */ - TEST_TYPE_SIZE (EMRPOLYPOLYLINE, 44) - TEST_TYPE_ALIGN (EMRPOLYPOLYLINE, 4) - TEST_FIELD_SIZE (EMRPOLYPOLYLINE, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYPOLYLINE, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYLINE, emr, 0) - TEST_FIELD_SIZE (EMRPOLYPOLYLINE, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYPOLYLINE, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYLINE, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYPOLYLINE, nPolys, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYLINE, nPolys, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYLINE, nPolys, 24) - TEST_FIELD_SIZE (EMRPOLYPOLYLINE, cptl, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYLINE, cptl, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYLINE, cptl, 28) - TEST_FIELD_SIZE (EMRPOLYPOLYLINE, aPolyCounts, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYLINE, aPolyCounts, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYLINE, aPolyCounts, 32) - TEST_FIELD_SIZE (EMRPOLYPOLYLINE, aptl, 8) - TEST_FIELD_ALIGN (EMRPOLYPOLYLINE, aptl, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYLINE, aptl, 36) -} - -static void test_pack_EMRPOLYPOLYLINE16(void) -{ - /* EMRPOLYPOLYLINE16 */ - TEST_TYPE_SIZE (EMRPOLYPOLYLINE16, 40) - TEST_TYPE_ALIGN (EMRPOLYPOLYLINE16, 4) - TEST_FIELD_SIZE (EMRPOLYPOLYLINE16, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYPOLYLINE16, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYLINE16, emr, 0) - TEST_FIELD_SIZE (EMRPOLYPOLYLINE16, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYPOLYLINE16, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYLINE16, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYPOLYLINE16, nPolys, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYLINE16, nPolys, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYLINE16, nPolys, 24) - TEST_FIELD_SIZE (EMRPOLYPOLYLINE16, cpts, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYLINE16, cpts, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYLINE16, cpts, 28) - TEST_FIELD_SIZE (EMRPOLYPOLYLINE16, aPolyCounts, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYLINE16, aPolyCounts, 4) - TEST_FIELD_OFFSET(EMRPOLYPOLYLINE16, aPolyCounts, 32) - TEST_FIELD_SIZE (EMRPOLYPOLYLINE16, apts, 4) - TEST_FIELD_ALIGN (EMRPOLYPOLYLINE16, apts, 2) - TEST_FIELD_OFFSET(EMRPOLYPOLYLINE16, apts, 36) -} - -static void test_pack_EMRPOLYTEXTOUTA(void) -{ - /* EMRPOLYTEXTOUTA */ - TEST_TYPE_SIZE (EMRPOLYTEXTOUTA, 80) - TEST_TYPE_ALIGN (EMRPOLYTEXTOUTA, 4) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTA, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTA, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTA, emr, 0) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTA, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTA, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTA, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTA, iGraphicsMode, 4) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTA, iGraphicsMode, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTA, iGraphicsMode, 24) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTA, exScale, 4) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTA, exScale, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTA, exScale, 28) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTA, eyScale, 4) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTA, eyScale, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTA, eyScale, 32) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTA, cStrings, 4) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTA, cStrings, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTA, cStrings, 36) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTA, aemrtext, 40) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTA, aemrtext, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTA, aemrtext, 40) -} - -static void test_pack_EMRPOLYTEXTOUTW(void) -{ - /* EMRPOLYTEXTOUTW */ - TEST_TYPE_SIZE (EMRPOLYTEXTOUTW, 80) - TEST_TYPE_ALIGN (EMRPOLYTEXTOUTW, 4) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTW, emr, 8) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTW, emr, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTW, emr, 0) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTW, rclBounds, 16) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTW, rclBounds, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTW, rclBounds, 8) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTW, iGraphicsMode, 4) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTW, iGraphicsMode, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTW, iGraphicsMode, 24) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTW, exScale, 4) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTW, exScale, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTW, exScale, 28) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTW, eyScale, 4) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTW, eyScale, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTW, eyScale, 32) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTW, cStrings, 4) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTW, cStrings, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTW, cStrings, 36) - TEST_FIELD_SIZE (EMRPOLYTEXTOUTW, aemrtext, 40) - TEST_FIELD_ALIGN (EMRPOLYTEXTOUTW, aemrtext, 4) - TEST_FIELD_OFFSET(EMRPOLYTEXTOUTW, aemrtext, 40) -} - -static void test_pack_EMRREALIZEPALETTE(void) -{ - /* EMRREALIZEPALETTE */ - TEST_TYPE_SIZE (EMRREALIZEPALETTE, 8) - TEST_TYPE_ALIGN (EMRREALIZEPALETTE, 4) - TEST_FIELD_SIZE (EMRREALIZEPALETTE, emr, 8) - TEST_FIELD_ALIGN (EMRREALIZEPALETTE, emr, 4) - TEST_FIELD_OFFSET(EMRREALIZEPALETTE, emr, 0) -} - -static void test_pack_EMRRECTANGLE(void) -{ - /* EMRRECTANGLE */ - TEST_TYPE_SIZE (EMRRECTANGLE, 24) - TEST_TYPE_ALIGN (EMRRECTANGLE, 4) - TEST_FIELD_SIZE (EMRRECTANGLE, emr, 8) - TEST_FIELD_ALIGN (EMRRECTANGLE, emr, 4) - TEST_FIELD_OFFSET(EMRRECTANGLE, emr, 0) - TEST_FIELD_SIZE (EMRRECTANGLE, rclBox, 16) - TEST_FIELD_ALIGN (EMRRECTANGLE, rclBox, 4) - TEST_FIELD_OFFSET(EMRRECTANGLE, rclBox, 8) -} - -static void test_pack_EMRRESIZEPALETTE(void) -{ - /* EMRRESIZEPALETTE */ - TEST_TYPE_SIZE (EMRRESIZEPALETTE, 16) - TEST_TYPE_ALIGN (EMRRESIZEPALETTE, 4) - TEST_FIELD_SIZE (EMRRESIZEPALETTE, emr, 8) - TEST_FIELD_ALIGN (EMRRESIZEPALETTE, emr, 4) - TEST_FIELD_OFFSET(EMRRESIZEPALETTE, emr, 0) - TEST_FIELD_SIZE (EMRRESIZEPALETTE, ihPal, 4) - TEST_FIELD_ALIGN (EMRRESIZEPALETTE, ihPal, 4) - TEST_FIELD_OFFSET(EMRRESIZEPALETTE, ihPal, 8) - TEST_FIELD_SIZE (EMRRESIZEPALETTE, cEntries, 4) - TEST_FIELD_ALIGN (EMRRESIZEPALETTE, cEntries, 4) - TEST_FIELD_OFFSET(EMRRESIZEPALETTE, cEntries, 12) -} - -static void test_pack_EMRRESTOREDC(void) -{ - /* EMRRESTOREDC */ - TEST_TYPE_SIZE (EMRRESTOREDC, 12) - TEST_TYPE_ALIGN (EMRRESTOREDC, 4) - TEST_FIELD_SIZE (EMRRESTOREDC, emr, 8) - TEST_FIELD_ALIGN (EMRRESTOREDC, emr, 4) - TEST_FIELD_OFFSET(EMRRESTOREDC, emr, 0) - TEST_FIELD_SIZE (EMRRESTOREDC, iRelative, 4) - TEST_FIELD_ALIGN (EMRRESTOREDC, iRelative, 4) - TEST_FIELD_OFFSET(EMRRESTOREDC, iRelative, 8) -} - -static void test_pack_EMRROUNDRECT(void) -{ - /* EMRROUNDRECT */ - TEST_TYPE_SIZE (EMRROUNDRECT, 32) - TEST_TYPE_ALIGN (EMRROUNDRECT, 4) - TEST_FIELD_SIZE (EMRROUNDRECT, emr, 8) - TEST_FIELD_ALIGN (EMRROUNDRECT, emr, 4) - TEST_FIELD_OFFSET(EMRROUNDRECT, emr, 0) - TEST_FIELD_SIZE (EMRROUNDRECT, rclBox, 16) - TEST_FIELD_ALIGN (EMRROUNDRECT, rclBox, 4) - TEST_FIELD_OFFSET(EMRROUNDRECT, rclBox, 8) - TEST_FIELD_SIZE (EMRROUNDRECT, szlCorner, 8) - TEST_FIELD_ALIGN (EMRROUNDRECT, szlCorner, 4) - TEST_FIELD_OFFSET(EMRROUNDRECT, szlCorner, 24) -} - -static void test_pack_EMRSAVEDC(void) -{ - /* EMRSAVEDC */ - TEST_TYPE_SIZE (EMRSAVEDC, 8) - TEST_TYPE_ALIGN (EMRSAVEDC, 4) - TEST_FIELD_SIZE (EMRSAVEDC, emr, 8) - TEST_FIELD_ALIGN (EMRSAVEDC, emr, 4) - TEST_FIELD_OFFSET(EMRSAVEDC, emr, 0) -} - -static void test_pack_EMRSCALEVIEWPORTEXTEX(void) -{ - /* EMRSCALEVIEWPORTEXTEX */ - TEST_TYPE_SIZE (EMRSCALEVIEWPORTEXTEX, 24) - TEST_TYPE_ALIGN (EMRSCALEVIEWPORTEXTEX, 4) - TEST_FIELD_SIZE (EMRSCALEVIEWPORTEXTEX, emr, 8) - TEST_FIELD_ALIGN (EMRSCALEVIEWPORTEXTEX, emr, 4) - TEST_FIELD_OFFSET(EMRSCALEVIEWPORTEXTEX, emr, 0) - TEST_FIELD_SIZE (EMRSCALEVIEWPORTEXTEX, xNum, 4) - TEST_FIELD_ALIGN (EMRSCALEVIEWPORTEXTEX, xNum, 4) - TEST_FIELD_OFFSET(EMRSCALEVIEWPORTEXTEX, xNum, 8) - TEST_FIELD_SIZE (EMRSCALEVIEWPORTEXTEX, xDenom, 4) - TEST_FIELD_ALIGN (EMRSCALEVIEWPORTEXTEX, xDenom, 4) - TEST_FIELD_OFFSET(EMRSCALEVIEWPORTEXTEX, xDenom, 12) - TEST_FIELD_SIZE (EMRSCALEVIEWPORTEXTEX, yNum, 4) - TEST_FIELD_ALIGN (EMRSCALEVIEWPORTEXTEX, yNum, 4) - TEST_FIELD_OFFSET(EMRSCALEVIEWPORTEXTEX, yNum, 16) - TEST_FIELD_SIZE (EMRSCALEVIEWPORTEXTEX, yDenom, 4) - TEST_FIELD_ALIGN (EMRSCALEVIEWPORTEXTEX, yDenom, 4) - TEST_FIELD_OFFSET(EMRSCALEVIEWPORTEXTEX, yDenom, 20) -} - -static void test_pack_EMRSCALEWINDOWEXTEX(void) -{ - /* EMRSCALEWINDOWEXTEX */ - TEST_TYPE_SIZE (EMRSCALEWINDOWEXTEX, 24) - TEST_TYPE_ALIGN (EMRSCALEWINDOWEXTEX, 4) - TEST_FIELD_SIZE (EMRSCALEWINDOWEXTEX, emr, 8) - TEST_FIELD_ALIGN (EMRSCALEWINDOWEXTEX, emr, 4) - TEST_FIELD_OFFSET(EMRSCALEWINDOWEXTEX, emr, 0) - TEST_FIELD_SIZE (EMRSCALEWINDOWEXTEX, xNum, 4) - TEST_FIELD_ALIGN (EMRSCALEWINDOWEXTEX, xNum, 4) - TEST_FIELD_OFFSET(EMRSCALEWINDOWEXTEX, xNum, 8) - TEST_FIELD_SIZE (EMRSCALEWINDOWEXTEX, xDenom, 4) - TEST_FIELD_ALIGN (EMRSCALEWINDOWEXTEX, xDenom, 4) - TEST_FIELD_OFFSET(EMRSCALEWINDOWEXTEX, xDenom, 12) - TEST_FIELD_SIZE (EMRSCALEWINDOWEXTEX, yNum, 4) - TEST_FIELD_ALIGN (EMRSCALEWINDOWEXTEX, yNum, 4) - TEST_FIELD_OFFSET(EMRSCALEWINDOWEXTEX, yNum, 16) - TEST_FIELD_SIZE (EMRSCALEWINDOWEXTEX, yDenom, 4) - TEST_FIELD_ALIGN (EMRSCALEWINDOWEXTEX, yDenom, 4) - TEST_FIELD_OFFSET(EMRSCALEWINDOWEXTEX, yDenom, 20) -} - -static void test_pack_EMRSELECTCLIPPATH(void) -{ - /* EMRSELECTCLIPPATH */ - TEST_TYPE_SIZE (EMRSELECTCLIPPATH, 12) - TEST_TYPE_ALIGN (EMRSELECTCLIPPATH, 4) - TEST_FIELD_SIZE (EMRSELECTCLIPPATH, emr, 8) - TEST_FIELD_ALIGN (EMRSELECTCLIPPATH, emr, 4) - TEST_FIELD_OFFSET(EMRSELECTCLIPPATH, emr, 0) - TEST_FIELD_SIZE (EMRSELECTCLIPPATH, iMode, 4) - TEST_FIELD_ALIGN (EMRSELECTCLIPPATH, iMode, 4) - TEST_FIELD_OFFSET(EMRSELECTCLIPPATH, iMode, 8) -} - -static void test_pack_EMRSELECTCOLORSPACE(void) -{ - /* EMRSELECTCOLORSPACE */ - TEST_TYPE_SIZE (EMRSELECTCOLORSPACE, 12) - TEST_TYPE_ALIGN (EMRSELECTCOLORSPACE, 4) - TEST_FIELD_SIZE (EMRSELECTCOLORSPACE, emr, 8) - TEST_FIELD_ALIGN (EMRSELECTCOLORSPACE, emr, 4) - TEST_FIELD_OFFSET(EMRSELECTCOLORSPACE, emr, 0) - TEST_FIELD_SIZE (EMRSELECTCOLORSPACE, ihCS, 4) - TEST_FIELD_ALIGN (EMRSELECTCOLORSPACE, ihCS, 4) - TEST_FIELD_OFFSET(EMRSELECTCOLORSPACE, ihCS, 8) -} - -static void test_pack_EMRSELECTOBJECT(void) -{ - /* EMRSELECTOBJECT */ - TEST_TYPE_SIZE (EMRSELECTOBJECT, 12) - TEST_TYPE_ALIGN (EMRSELECTOBJECT, 4) - TEST_FIELD_SIZE (EMRSELECTOBJECT, emr, 8) - TEST_FIELD_ALIGN (EMRSELECTOBJECT, emr, 4) - TEST_FIELD_OFFSET(EMRSELECTOBJECT, emr, 0) - TEST_FIELD_SIZE (EMRSELECTOBJECT, ihObject, 4) - TEST_FIELD_ALIGN (EMRSELECTOBJECT, ihObject, 4) - TEST_FIELD_OFFSET(EMRSELECTOBJECT, ihObject, 8) -} - -static void test_pack_EMRSELECTPALETTE(void) -{ - /* EMRSELECTPALETTE */ - TEST_TYPE_SIZE (EMRSELECTPALETTE, 12) - TEST_TYPE_ALIGN (EMRSELECTPALETTE, 4) - TEST_FIELD_SIZE (EMRSELECTPALETTE, emr, 8) - TEST_FIELD_ALIGN (EMRSELECTPALETTE, emr, 4) - TEST_FIELD_OFFSET(EMRSELECTPALETTE, emr, 0) - TEST_FIELD_SIZE (EMRSELECTPALETTE, ihPal, 4) - TEST_FIELD_ALIGN (EMRSELECTPALETTE, ihPal, 4) - TEST_FIELD_OFFSET(EMRSELECTPALETTE, ihPal, 8) -} - -static void test_pack_EMRSETARCDIRECTION(void) -{ - /* EMRSETARCDIRECTION */ - TEST_TYPE_SIZE (EMRSETARCDIRECTION, 12) - TEST_TYPE_ALIGN (EMRSETARCDIRECTION, 4) - TEST_FIELD_SIZE (EMRSETARCDIRECTION, emr, 8) - TEST_FIELD_ALIGN (EMRSETARCDIRECTION, emr, 4) - TEST_FIELD_OFFSET(EMRSETARCDIRECTION, emr, 0) - TEST_FIELD_SIZE (EMRSETARCDIRECTION, iArcDirection, 4) - TEST_FIELD_ALIGN (EMRSETARCDIRECTION, iArcDirection, 4) - TEST_FIELD_OFFSET(EMRSETARCDIRECTION, iArcDirection, 8) -} - -static void test_pack_EMRSETBKCOLOR(void) -{ - /* EMRSETBKCOLOR */ - TEST_TYPE_SIZE (EMRSETBKCOLOR, 12) - TEST_TYPE_ALIGN (EMRSETBKCOLOR, 4) - TEST_FIELD_SIZE (EMRSETBKCOLOR, emr, 8) - TEST_FIELD_ALIGN (EMRSETBKCOLOR, emr, 4) - TEST_FIELD_OFFSET(EMRSETBKCOLOR, emr, 0) - TEST_FIELD_SIZE (EMRSETBKCOLOR, crColor, 4) - TEST_FIELD_ALIGN (EMRSETBKCOLOR, crColor, 4) - TEST_FIELD_OFFSET(EMRSETBKCOLOR, crColor, 8) -} - -static void test_pack_EMRSETBKMODE(void) -{ - /* EMRSETBKMODE */ - TEST_TYPE_SIZE (EMRSETBKMODE, 12) - TEST_TYPE_ALIGN (EMRSETBKMODE, 4) - TEST_FIELD_SIZE (EMRSETBKMODE, emr, 8) - TEST_FIELD_ALIGN (EMRSETBKMODE, emr, 4) - TEST_FIELD_OFFSET(EMRSETBKMODE, emr, 0) - TEST_FIELD_SIZE (EMRSETBKMODE, iMode, 4) - TEST_FIELD_ALIGN (EMRSETBKMODE, iMode, 4) - TEST_FIELD_OFFSET(EMRSETBKMODE, iMode, 8) -} - -static void test_pack_EMRSETBRUSHORGEX(void) -{ - /* EMRSETBRUSHORGEX */ - TEST_TYPE_SIZE (EMRSETBRUSHORGEX, 16) - TEST_TYPE_ALIGN (EMRSETBRUSHORGEX, 4) - TEST_FIELD_SIZE (EMRSETBRUSHORGEX, emr, 8) - TEST_FIELD_ALIGN (EMRSETBRUSHORGEX, emr, 4) - TEST_FIELD_OFFSET(EMRSETBRUSHORGEX, emr, 0) - TEST_FIELD_SIZE (EMRSETBRUSHORGEX, ptlOrigin, 8) - TEST_FIELD_ALIGN (EMRSETBRUSHORGEX, ptlOrigin, 4) - TEST_FIELD_OFFSET(EMRSETBRUSHORGEX, ptlOrigin, 8) -} - -static void test_pack_EMRSETCOLORADJUSTMENT(void) -{ - /* EMRSETCOLORADJUSTMENT */ - TEST_TYPE_SIZE (EMRSETCOLORADJUSTMENT, 32) - TEST_TYPE_ALIGN (EMRSETCOLORADJUSTMENT, 4) - TEST_FIELD_SIZE (EMRSETCOLORADJUSTMENT, emr, 8) - TEST_FIELD_ALIGN (EMRSETCOLORADJUSTMENT, emr, 4) - TEST_FIELD_OFFSET(EMRSETCOLORADJUSTMENT, emr, 0) - TEST_FIELD_SIZE (EMRSETCOLORADJUSTMENT, ColorAdjustment, 24) - TEST_FIELD_ALIGN (EMRSETCOLORADJUSTMENT, ColorAdjustment, 2) - TEST_FIELD_OFFSET(EMRSETCOLORADJUSTMENT, ColorAdjustment, 8) -} - -static void test_pack_EMRSETCOLORSPACE(void) -{ - /* EMRSETCOLORSPACE */ - TEST_TYPE_SIZE (EMRSETCOLORSPACE, 12) - TEST_TYPE_ALIGN (EMRSETCOLORSPACE, 4) - TEST_FIELD_SIZE (EMRSETCOLORSPACE, emr, 8) - TEST_FIELD_ALIGN (EMRSETCOLORSPACE, emr, 4) - TEST_FIELD_OFFSET(EMRSETCOLORSPACE, emr, 0) - TEST_FIELD_SIZE (EMRSETCOLORSPACE, ihCS, 4) - TEST_FIELD_ALIGN (EMRSETCOLORSPACE, ihCS, 4) - TEST_FIELD_OFFSET(EMRSETCOLORSPACE, ihCS, 8) -} - -static void test_pack_EMRSETDIBITSTODEVICE(void) -{ - /* EMRSETDIBITSTODEVICE */ - TEST_TYPE_SIZE (EMRSETDIBITSTODEVICE, 76) - TEST_TYPE_ALIGN (EMRSETDIBITSTODEVICE, 4) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, emr, 8) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, emr, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, emr, 0) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, rclBounds, 16) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, rclBounds, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, rclBounds, 8) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, xDest, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, xDest, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, xDest, 24) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, yDest, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, yDest, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, yDest, 28) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, xSrc, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, xSrc, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, xSrc, 32) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, ySrc, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, ySrc, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, ySrc, 36) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, cxSrc, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, cxSrc, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, cxSrc, 40) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, cySrc, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, cySrc, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, cySrc, 44) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, offBmiSrc, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, offBmiSrc, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, offBmiSrc, 48) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, cbBmiSrc, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, cbBmiSrc, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, cbBmiSrc, 52) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, offBitsSrc, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, offBitsSrc, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, offBitsSrc, 56) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, cbBitsSrc, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, cbBitsSrc, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, cbBitsSrc, 60) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, iUsageSrc, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, iUsageSrc, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, iUsageSrc, 64) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, iStartScan, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, iStartScan, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, iStartScan, 68) - TEST_FIELD_SIZE (EMRSETDIBITSTODEVICE, cScans, 4) - TEST_FIELD_ALIGN (EMRSETDIBITSTODEVICE, cScans, 4) - TEST_FIELD_OFFSET(EMRSETDIBITSTODEVICE, cScans, 72) -} - -static void test_pack_EMRSETICMMODE(void) -{ - /* EMRSETICMMODE */ - TEST_TYPE_SIZE (EMRSETICMMODE, 12) - TEST_TYPE_ALIGN (EMRSETICMMODE, 4) - TEST_FIELD_SIZE (EMRSETICMMODE, emr, 8) - TEST_FIELD_ALIGN (EMRSETICMMODE, emr, 4) - TEST_FIELD_OFFSET(EMRSETICMMODE, emr, 0) - TEST_FIELD_SIZE (EMRSETICMMODE, iMode, 4) - TEST_FIELD_ALIGN (EMRSETICMMODE, iMode, 4) - TEST_FIELD_OFFSET(EMRSETICMMODE, iMode, 8) -} - -static void test_pack_EMRSETLAYOUT(void) -{ - /* EMRSETLAYOUT */ - TEST_TYPE_SIZE (EMRSETLAYOUT, 12) - TEST_TYPE_ALIGN (EMRSETLAYOUT, 4) - TEST_FIELD_SIZE (EMRSETLAYOUT, emr, 8) - TEST_FIELD_ALIGN (EMRSETLAYOUT, emr, 4) - TEST_FIELD_OFFSET(EMRSETLAYOUT, emr, 0) - TEST_FIELD_SIZE (EMRSETLAYOUT, iMode, 4) - TEST_FIELD_ALIGN (EMRSETLAYOUT, iMode, 4) - TEST_FIELD_OFFSET(EMRSETLAYOUT, iMode, 8) -} - -static void test_pack_EMRSETMAPMODE(void) -{ - /* EMRSETMAPMODE */ - TEST_TYPE_SIZE (EMRSETMAPMODE, 12) - TEST_TYPE_ALIGN (EMRSETMAPMODE, 4) - TEST_FIELD_SIZE (EMRSETMAPMODE, emr, 8) - TEST_FIELD_ALIGN (EMRSETMAPMODE, emr, 4) - TEST_FIELD_OFFSET(EMRSETMAPMODE, emr, 0) - TEST_FIELD_SIZE (EMRSETMAPMODE, iMode, 4) - TEST_FIELD_ALIGN (EMRSETMAPMODE, iMode, 4) - TEST_FIELD_OFFSET(EMRSETMAPMODE, iMode, 8) -} - -static void test_pack_EMRSETMAPPERFLAGS(void) -{ - /* EMRSETMAPPERFLAGS */ - TEST_TYPE_SIZE (EMRSETMAPPERFLAGS, 12) - TEST_TYPE_ALIGN (EMRSETMAPPERFLAGS, 4) - TEST_FIELD_SIZE (EMRSETMAPPERFLAGS, emr, 8) - TEST_FIELD_ALIGN (EMRSETMAPPERFLAGS, emr, 4) - TEST_FIELD_OFFSET(EMRSETMAPPERFLAGS, emr, 0) - TEST_FIELD_SIZE (EMRSETMAPPERFLAGS, dwFlags, 4) - TEST_FIELD_ALIGN (EMRSETMAPPERFLAGS, dwFlags, 4) - TEST_FIELD_OFFSET(EMRSETMAPPERFLAGS, dwFlags, 8) -} - -static void test_pack_EMRSETMETARGN(void) -{ - /* EMRSETMETARGN */ - TEST_TYPE_SIZE (EMRSETMETARGN, 8) - TEST_TYPE_ALIGN (EMRSETMETARGN, 4) - TEST_FIELD_SIZE (EMRSETMETARGN, emr, 8) - TEST_FIELD_ALIGN (EMRSETMETARGN, emr, 4) - TEST_FIELD_OFFSET(EMRSETMETARGN, emr, 0) -} - -static void test_pack_EMRSETMITERLIMIT(void) -{ - /* EMRSETMITERLIMIT */ - TEST_TYPE_SIZE (EMRSETMITERLIMIT, 12) - TEST_TYPE_ALIGN (EMRSETMITERLIMIT, 4) - TEST_FIELD_SIZE (EMRSETMITERLIMIT, emr, 8) - TEST_FIELD_ALIGN (EMRSETMITERLIMIT, emr, 4) - TEST_FIELD_OFFSET(EMRSETMITERLIMIT, emr, 0) - TEST_FIELD_SIZE (EMRSETMITERLIMIT, eMiterLimit, 4) - TEST_FIELD_ALIGN (EMRSETMITERLIMIT, eMiterLimit, 4) - TEST_FIELD_OFFSET(EMRSETMITERLIMIT, eMiterLimit, 8) -} - -static void test_pack_EMRSETPIXELV(void) -{ - /* EMRSETPIXELV */ - TEST_TYPE_SIZE (EMRSETPIXELV, 20) - TEST_TYPE_ALIGN (EMRSETPIXELV, 4) - TEST_FIELD_SIZE (EMRSETPIXELV, emr, 8) - TEST_FIELD_ALIGN (EMRSETPIXELV, emr, 4) - TEST_FIELD_OFFSET(EMRSETPIXELV, emr, 0) - TEST_FIELD_SIZE (EMRSETPIXELV, ptlPixel, 8) - TEST_FIELD_ALIGN (EMRSETPIXELV, ptlPixel, 4) - TEST_FIELD_OFFSET(EMRSETPIXELV, ptlPixel, 8) - TEST_FIELD_SIZE (EMRSETPIXELV, crColor, 4) - TEST_FIELD_ALIGN (EMRSETPIXELV, crColor, 4) - TEST_FIELD_OFFSET(EMRSETPIXELV, crColor, 16) -} - -static void test_pack_EMRSETPOLYFILLMODE(void) -{ - /* EMRSETPOLYFILLMODE */ - TEST_TYPE_SIZE (EMRSETPOLYFILLMODE, 12) - TEST_TYPE_ALIGN (EMRSETPOLYFILLMODE, 4) - TEST_FIELD_SIZE (EMRSETPOLYFILLMODE, emr, 8) - TEST_FIELD_ALIGN (EMRSETPOLYFILLMODE, emr, 4) - TEST_FIELD_OFFSET(EMRSETPOLYFILLMODE, emr, 0) - TEST_FIELD_SIZE (EMRSETPOLYFILLMODE, iMode, 4) - TEST_FIELD_ALIGN (EMRSETPOLYFILLMODE, iMode, 4) - TEST_FIELD_OFFSET(EMRSETPOLYFILLMODE, iMode, 8) -} - -static void test_pack_EMRSETROP2(void) -{ - /* EMRSETROP2 */ - TEST_TYPE_SIZE (EMRSETROP2, 12) - TEST_TYPE_ALIGN (EMRSETROP2, 4) - TEST_FIELD_SIZE (EMRSETROP2, emr, 8) - TEST_FIELD_ALIGN (EMRSETROP2, emr, 4) - TEST_FIELD_OFFSET(EMRSETROP2, emr, 0) - TEST_FIELD_SIZE (EMRSETROP2, iMode, 4) - TEST_FIELD_ALIGN (EMRSETROP2, iMode, 4) - TEST_FIELD_OFFSET(EMRSETROP2, iMode, 8) -} - -static void test_pack_EMRSETSTRETCHBLTMODE(void) -{ - /* EMRSETSTRETCHBLTMODE */ - TEST_TYPE_SIZE (EMRSETSTRETCHBLTMODE, 12) - TEST_TYPE_ALIGN (EMRSETSTRETCHBLTMODE, 4) - TEST_FIELD_SIZE (EMRSETSTRETCHBLTMODE, emr, 8) - TEST_FIELD_ALIGN (EMRSETSTRETCHBLTMODE, emr, 4) - TEST_FIELD_OFFSET(EMRSETSTRETCHBLTMODE, emr, 0) - TEST_FIELD_SIZE (EMRSETSTRETCHBLTMODE, iMode, 4) - TEST_FIELD_ALIGN (EMRSETSTRETCHBLTMODE, iMode, 4) - TEST_FIELD_OFFSET(EMRSETSTRETCHBLTMODE, iMode, 8) -} - -static void test_pack_EMRSETTEXTALIGN(void) -{ - /* EMRSETTEXTALIGN */ - TEST_TYPE_SIZE (EMRSETTEXTALIGN, 12) - TEST_TYPE_ALIGN (EMRSETTEXTALIGN, 4) - TEST_FIELD_SIZE (EMRSETTEXTALIGN, emr, 8) - TEST_FIELD_ALIGN (EMRSETTEXTALIGN, emr, 4) - TEST_FIELD_OFFSET(EMRSETTEXTALIGN, emr, 0) - TEST_FIELD_SIZE (EMRSETTEXTALIGN, iMode, 4) - TEST_FIELD_ALIGN (EMRSETTEXTALIGN, iMode, 4) - TEST_FIELD_OFFSET(EMRSETTEXTALIGN, iMode, 8) -} - -static void test_pack_EMRSETTEXTCOLOR(void) -{ - /* EMRSETTEXTCOLOR */ - TEST_TYPE_SIZE (EMRSETTEXTCOLOR, 12) - TEST_TYPE_ALIGN (EMRSETTEXTCOLOR, 4) - TEST_FIELD_SIZE (EMRSETTEXTCOLOR, emr, 8) - TEST_FIELD_ALIGN (EMRSETTEXTCOLOR, emr, 4) - TEST_FIELD_OFFSET(EMRSETTEXTCOLOR, emr, 0) - TEST_FIELD_SIZE (EMRSETTEXTCOLOR, crColor, 4) - TEST_FIELD_ALIGN (EMRSETTEXTCOLOR, crColor, 4) - TEST_FIELD_OFFSET(EMRSETTEXTCOLOR, crColor, 8) -} - -static void test_pack_EMRSETVIEWPORTEXTEX(void) -{ - /* EMRSETVIEWPORTEXTEX */ - TEST_TYPE_SIZE (EMRSETVIEWPORTEXTEX, 16) - TEST_TYPE_ALIGN (EMRSETVIEWPORTEXTEX, 4) - TEST_FIELD_SIZE (EMRSETVIEWPORTEXTEX, emr, 8) - TEST_FIELD_ALIGN (EMRSETVIEWPORTEXTEX, emr, 4) - TEST_FIELD_OFFSET(EMRSETVIEWPORTEXTEX, emr, 0) - TEST_FIELD_SIZE (EMRSETVIEWPORTEXTEX, szlExtent, 8) - TEST_FIELD_ALIGN (EMRSETVIEWPORTEXTEX, szlExtent, 4) - TEST_FIELD_OFFSET(EMRSETVIEWPORTEXTEX, szlExtent, 8) -} - -static void test_pack_EMRSETVIEWPORTORGEX(void) -{ - /* EMRSETVIEWPORTORGEX */ - TEST_TYPE_SIZE (EMRSETVIEWPORTORGEX, 16) - TEST_TYPE_ALIGN (EMRSETVIEWPORTORGEX, 4) - TEST_FIELD_SIZE (EMRSETVIEWPORTORGEX, emr, 8) - TEST_FIELD_ALIGN (EMRSETVIEWPORTORGEX, emr, 4) - TEST_FIELD_OFFSET(EMRSETVIEWPORTORGEX, emr, 0) - TEST_FIELD_SIZE (EMRSETVIEWPORTORGEX, ptlOrigin, 8) - TEST_FIELD_ALIGN (EMRSETVIEWPORTORGEX, ptlOrigin, 4) - TEST_FIELD_OFFSET(EMRSETVIEWPORTORGEX, ptlOrigin, 8) -} - -static void test_pack_EMRSETWINDOWEXTEX(void) -{ - /* EMRSETWINDOWEXTEX */ - TEST_TYPE_SIZE (EMRSETWINDOWEXTEX, 16) - TEST_TYPE_ALIGN (EMRSETWINDOWEXTEX, 4) - TEST_FIELD_SIZE (EMRSETWINDOWEXTEX, emr, 8) - TEST_FIELD_ALIGN (EMRSETWINDOWEXTEX, emr, 4) - TEST_FIELD_OFFSET(EMRSETWINDOWEXTEX, emr, 0) - TEST_FIELD_SIZE (EMRSETWINDOWEXTEX, szlExtent, 8) - TEST_FIELD_ALIGN (EMRSETWINDOWEXTEX, szlExtent, 4) - TEST_FIELD_OFFSET(EMRSETWINDOWEXTEX, szlExtent, 8) -} - -static void test_pack_EMRSETWINDOWORGEX(void) -{ - /* EMRSETWINDOWORGEX */ - TEST_TYPE_SIZE (EMRSETWINDOWORGEX, 16) - TEST_TYPE_ALIGN (EMRSETWINDOWORGEX, 4) - TEST_FIELD_SIZE (EMRSETWINDOWORGEX, emr, 8) - TEST_FIELD_ALIGN (EMRSETWINDOWORGEX, emr, 4) - TEST_FIELD_OFFSET(EMRSETWINDOWORGEX, emr, 0) - TEST_FIELD_SIZE (EMRSETWINDOWORGEX, ptlOrigin, 8) - TEST_FIELD_ALIGN (EMRSETWINDOWORGEX, ptlOrigin, 4) - TEST_FIELD_OFFSET(EMRSETWINDOWORGEX, ptlOrigin, 8) -} - -static void test_pack_EMRSETWORLDTRANSFORM(void) -{ - /* EMRSETWORLDTRANSFORM */ - TEST_TYPE_SIZE (EMRSETWORLDTRANSFORM, 32) - TEST_TYPE_ALIGN (EMRSETWORLDTRANSFORM, 4) - TEST_FIELD_SIZE (EMRSETWORLDTRANSFORM, emr, 8) - TEST_FIELD_ALIGN (EMRSETWORLDTRANSFORM, emr, 4) - TEST_FIELD_OFFSET(EMRSETWORLDTRANSFORM, emr, 0) - TEST_FIELD_SIZE (EMRSETWORLDTRANSFORM, xform, 24) - TEST_FIELD_ALIGN (EMRSETWORLDTRANSFORM, xform, 4) - TEST_FIELD_OFFSET(EMRSETWORLDTRANSFORM, xform, 8) -} - -static void test_pack_EMRSTRETCHBLT(void) -{ - /* EMRSTRETCHBLT */ - TEST_TYPE_SIZE (EMRSTRETCHBLT, 108) - TEST_TYPE_ALIGN (EMRSTRETCHBLT, 4) - TEST_FIELD_SIZE (EMRSTRETCHBLT, emr, 8) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, emr, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, emr, 0) - TEST_FIELD_SIZE (EMRSTRETCHBLT, rclBounds, 16) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, rclBounds, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, rclBounds, 8) - TEST_FIELD_SIZE (EMRSTRETCHBLT, xDest, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, xDest, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, xDest, 24) - TEST_FIELD_SIZE (EMRSTRETCHBLT, yDest, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, yDest, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, yDest, 28) - TEST_FIELD_SIZE (EMRSTRETCHBLT, cxDest, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, cxDest, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, cxDest, 32) - TEST_FIELD_SIZE (EMRSTRETCHBLT, cyDest, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, cyDest, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, cyDest, 36) - TEST_FIELD_SIZE (EMRSTRETCHBLT, dwRop, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, dwRop, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, dwRop, 40) - TEST_FIELD_SIZE (EMRSTRETCHBLT, xSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, xSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, xSrc, 44) - TEST_FIELD_SIZE (EMRSTRETCHBLT, ySrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, ySrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, ySrc, 48) - TEST_FIELD_SIZE (EMRSTRETCHBLT, xformSrc, 24) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, xformSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, xformSrc, 52) - TEST_FIELD_SIZE (EMRSTRETCHBLT, crBkColorSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, crBkColorSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, crBkColorSrc, 76) - TEST_FIELD_SIZE (EMRSTRETCHBLT, iUsageSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, iUsageSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, iUsageSrc, 80) - TEST_FIELD_SIZE (EMRSTRETCHBLT, offBmiSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, offBmiSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, offBmiSrc, 84) - TEST_FIELD_SIZE (EMRSTRETCHBLT, cbBmiSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, cbBmiSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, cbBmiSrc, 88) - TEST_FIELD_SIZE (EMRSTRETCHBLT, offBitsSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, offBitsSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, offBitsSrc, 92) - TEST_FIELD_SIZE (EMRSTRETCHBLT, cbBitsSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, cbBitsSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, cbBitsSrc, 96) - TEST_FIELD_SIZE (EMRSTRETCHBLT, cxSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, cxSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, cxSrc, 100) - TEST_FIELD_SIZE (EMRSTRETCHBLT, cySrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHBLT, cySrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHBLT, cySrc, 104) -} - -static void test_pack_EMRSTRETCHDIBITS(void) -{ - /* EMRSTRETCHDIBITS */ - TEST_TYPE_SIZE (EMRSTRETCHDIBITS, 80) - TEST_TYPE_ALIGN (EMRSTRETCHDIBITS, 4) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, emr, 8) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, emr, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, emr, 0) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, rclBounds, 16) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, rclBounds, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, rclBounds, 8) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, xDest, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, xDest, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, xDest, 24) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, yDest, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, yDest, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, yDest, 28) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, xSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, xSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, xSrc, 32) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, ySrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, ySrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, ySrc, 36) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, cxSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, cxSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, cxSrc, 40) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, cySrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, cySrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, cySrc, 44) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, offBmiSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, offBmiSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, offBmiSrc, 48) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, cbBmiSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, cbBmiSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, cbBmiSrc, 52) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, offBitsSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, offBitsSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, offBitsSrc, 56) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, cbBitsSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, cbBitsSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, cbBitsSrc, 60) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, iUsageSrc, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, iUsageSrc, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, iUsageSrc, 64) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, dwRop, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, dwRop, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, dwRop, 68) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, cxDest, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, cxDest, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, cxDest, 72) - TEST_FIELD_SIZE (EMRSTRETCHDIBITS, cyDest, 4) - TEST_FIELD_ALIGN (EMRSTRETCHDIBITS, cyDest, 4) - TEST_FIELD_OFFSET(EMRSTRETCHDIBITS, cyDest, 76) -} - -static void test_pack_EMRSTROKEANDFILLPATH(void) -{ - /* EMRSTROKEANDFILLPATH */ - TEST_TYPE_SIZE (EMRSTROKEANDFILLPATH, 24) - TEST_TYPE_ALIGN (EMRSTROKEANDFILLPATH, 4) - TEST_FIELD_SIZE (EMRSTROKEANDFILLPATH, emr, 8) - TEST_FIELD_ALIGN (EMRSTROKEANDFILLPATH, emr, 4) - TEST_FIELD_OFFSET(EMRSTROKEANDFILLPATH, emr, 0) - TEST_FIELD_SIZE (EMRSTROKEANDFILLPATH, rclBounds, 16) - TEST_FIELD_ALIGN (EMRSTROKEANDFILLPATH, rclBounds, 4) - TEST_FIELD_OFFSET(EMRSTROKEANDFILLPATH, rclBounds, 8) -} - -static void test_pack_EMRSTROKEPATH(void) -{ - /* EMRSTROKEPATH */ - TEST_TYPE_SIZE (EMRSTROKEPATH, 24) - TEST_TYPE_ALIGN (EMRSTROKEPATH, 4) - TEST_FIELD_SIZE (EMRSTROKEPATH, emr, 8) - TEST_FIELD_ALIGN (EMRSTROKEPATH, emr, 4) - TEST_FIELD_OFFSET(EMRSTROKEPATH, emr, 0) - TEST_FIELD_SIZE (EMRSTROKEPATH, rclBounds, 16) - TEST_FIELD_ALIGN (EMRSTROKEPATH, rclBounds, 4) - TEST_FIELD_OFFSET(EMRSTROKEPATH, rclBounds, 8) -} - -static void test_pack_EMRTEXT(void) -{ - /* EMRTEXT */ - TEST_TYPE_SIZE (EMRTEXT, 40) - TEST_TYPE_ALIGN (EMRTEXT, 4) - TEST_FIELD_SIZE (EMRTEXT, ptlReference, 8) - TEST_FIELD_ALIGN (EMRTEXT, ptlReference, 4) - TEST_FIELD_OFFSET(EMRTEXT, ptlReference, 0) - TEST_FIELD_SIZE (EMRTEXT, nChars, 4) - TEST_FIELD_ALIGN (EMRTEXT, nChars, 4) - TEST_FIELD_OFFSET(EMRTEXT, nChars, 8) - TEST_FIELD_SIZE (EMRTEXT, offString, 4) - TEST_FIELD_ALIGN (EMRTEXT, offString, 4) - TEST_FIELD_OFFSET(EMRTEXT, offString, 12) - TEST_FIELD_SIZE (EMRTEXT, fOptions, 4) - TEST_FIELD_ALIGN (EMRTEXT, fOptions, 4) - TEST_FIELD_OFFSET(EMRTEXT, fOptions, 16) - TEST_FIELD_SIZE (EMRTEXT, rcl, 16) - TEST_FIELD_ALIGN (EMRTEXT, rcl, 4) - TEST_FIELD_OFFSET(EMRTEXT, rcl, 20) - TEST_FIELD_SIZE (EMRTEXT, offDx, 4) - TEST_FIELD_ALIGN (EMRTEXT, offDx, 4) - TEST_FIELD_OFFSET(EMRTEXT, offDx, 36) -} - -static void test_pack_EMRWIDENPATH(void) -{ - /* EMRWIDENPATH */ - TEST_TYPE_SIZE (EMRWIDENPATH, 8) - TEST_TYPE_ALIGN (EMRWIDENPATH, 4) - TEST_FIELD_SIZE (EMRWIDENPATH, emr, 8) - TEST_FIELD_ALIGN (EMRWIDENPATH, emr, 4) - TEST_FIELD_OFFSET(EMRWIDENPATH, emr, 0) -} - -static void test_pack_ENHMETAHEADER(void) -{ - /* ENHMETAHEADER */ - TEST_TYPE_SIZE (ENHMETAHEADER, 108) - TEST_TYPE_ALIGN (ENHMETAHEADER, 4) - TEST_FIELD_SIZE (ENHMETAHEADER, iType, 4) - TEST_FIELD_ALIGN (ENHMETAHEADER, iType, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, iType, 0) - TEST_FIELD_SIZE (ENHMETAHEADER, nSize, 4) - TEST_FIELD_ALIGN (ENHMETAHEADER, nSize, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, nSize, 4) - TEST_FIELD_SIZE (ENHMETAHEADER, rclBounds, 16) - TEST_FIELD_ALIGN (ENHMETAHEADER, rclBounds, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, rclBounds, 8) - TEST_FIELD_SIZE (ENHMETAHEADER, rclFrame, 16) - TEST_FIELD_ALIGN (ENHMETAHEADER, rclFrame, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, rclFrame, 24) - TEST_FIELD_SIZE (ENHMETAHEADER, dSignature, 4) - TEST_FIELD_ALIGN (ENHMETAHEADER, dSignature, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, dSignature, 40) - TEST_FIELD_SIZE (ENHMETAHEADER, nVersion, 4) - TEST_FIELD_ALIGN (ENHMETAHEADER, nVersion, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, nVersion, 44) - TEST_FIELD_SIZE (ENHMETAHEADER, nBytes, 4) - TEST_FIELD_ALIGN (ENHMETAHEADER, nBytes, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, nBytes, 48) - TEST_FIELD_SIZE (ENHMETAHEADER, nRecords, 4) - TEST_FIELD_ALIGN (ENHMETAHEADER, nRecords, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, nRecords, 52) - TEST_FIELD_SIZE (ENHMETAHEADER, nHandles, 2) - TEST_FIELD_ALIGN (ENHMETAHEADER, nHandles, 2) - TEST_FIELD_OFFSET(ENHMETAHEADER, nHandles, 56) - TEST_FIELD_SIZE (ENHMETAHEADER, sReserved, 2) - TEST_FIELD_ALIGN (ENHMETAHEADER, sReserved, 2) - TEST_FIELD_OFFSET(ENHMETAHEADER, sReserved, 58) - TEST_FIELD_SIZE (ENHMETAHEADER, nDescription, 4) - TEST_FIELD_ALIGN (ENHMETAHEADER, nDescription, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, nDescription, 60) - TEST_FIELD_SIZE (ENHMETAHEADER, offDescription, 4) - TEST_FIELD_ALIGN (ENHMETAHEADER, offDescription, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, offDescription, 64) - TEST_FIELD_SIZE (ENHMETAHEADER, nPalEntries, 4) - TEST_FIELD_ALIGN (ENHMETAHEADER, nPalEntries, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, nPalEntries, 68) - TEST_FIELD_SIZE (ENHMETAHEADER, szlDevice, 8) - TEST_FIELD_ALIGN (ENHMETAHEADER, szlDevice, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, szlDevice, 72) - TEST_FIELD_SIZE (ENHMETAHEADER, szlMillimeters, 8) - TEST_FIELD_ALIGN (ENHMETAHEADER, szlMillimeters, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, szlMillimeters, 80) - TEST_FIELD_SIZE (ENHMETAHEADER, cbPixelFormat, 4) - TEST_FIELD_ALIGN (ENHMETAHEADER, cbPixelFormat, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, cbPixelFormat, 88) - TEST_FIELD_SIZE (ENHMETAHEADER, offPixelFormat, 4) - TEST_FIELD_ALIGN (ENHMETAHEADER, offPixelFormat, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, offPixelFormat, 92) - TEST_FIELD_SIZE (ENHMETAHEADER, bOpenGL, 4) - TEST_FIELD_ALIGN (ENHMETAHEADER, bOpenGL, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, bOpenGL, 96) - TEST_FIELD_SIZE (ENHMETAHEADER, szlMicrometers, 8) - TEST_FIELD_ALIGN (ENHMETAHEADER, szlMicrometers, 4) - TEST_FIELD_OFFSET(ENHMETAHEADER, szlMicrometers, 100) -} - -static void test_pack_ENHMETARECORD(void) -{ - /* ENHMETARECORD */ - TEST_TYPE_SIZE (ENHMETARECORD, 12) - TEST_TYPE_ALIGN (ENHMETARECORD, 4) - TEST_FIELD_SIZE (ENHMETARECORD, iType, 4) - TEST_FIELD_ALIGN (ENHMETARECORD, iType, 4) - TEST_FIELD_OFFSET(ENHMETARECORD, iType, 0) - TEST_FIELD_SIZE (ENHMETARECORD, nSize, 4) - TEST_FIELD_ALIGN (ENHMETARECORD, nSize, 4) - TEST_FIELD_OFFSET(ENHMETARECORD, nSize, 4) - TEST_FIELD_SIZE (ENHMETARECORD, dParm, 4) - TEST_FIELD_ALIGN (ENHMETARECORD, dParm, 4) - TEST_FIELD_OFFSET(ENHMETARECORD, dParm, 8) -} - -static void test_pack_ENHMFENUMPROC(void) -{ - /* ENHMFENUMPROC */ - TEST_TYPE_SIZE (ENHMFENUMPROC, 4) - TEST_TYPE_ALIGN (ENHMFENUMPROC, 4) -} - -static void test_pack_ENUMLOGFONTA(void) -{ - /* ENUMLOGFONTA */ - TEST_TYPE_SIZE (ENUMLOGFONTA, 156) - TEST_TYPE_ALIGN (ENUMLOGFONTA, 4) - TEST_FIELD_SIZE (ENUMLOGFONTA, elfLogFont, 60) - TEST_FIELD_ALIGN (ENUMLOGFONTA, elfLogFont, 4) - TEST_FIELD_OFFSET(ENUMLOGFONTA, elfLogFont, 0) - TEST_FIELD_SIZE (ENUMLOGFONTA, elfFullName, 64) - TEST_FIELD_ALIGN (ENUMLOGFONTA, elfFullName, 1) - TEST_FIELD_OFFSET(ENUMLOGFONTA, elfFullName, 60) - TEST_FIELD_SIZE (ENUMLOGFONTA, elfStyle, 32) - TEST_FIELD_ALIGN (ENUMLOGFONTA, elfStyle, 1) - TEST_FIELD_OFFSET(ENUMLOGFONTA, elfStyle, 124) -} - -static void test_pack_ENUMLOGFONTEXA(void) -{ - /* ENUMLOGFONTEXA */ - TEST_TYPE_SIZE (ENUMLOGFONTEXA, 188) - TEST_TYPE_ALIGN (ENUMLOGFONTEXA, 4) - TEST_FIELD_SIZE (ENUMLOGFONTEXA, elfLogFont, 60) - TEST_FIELD_ALIGN (ENUMLOGFONTEXA, elfLogFont, 4) - TEST_FIELD_OFFSET(ENUMLOGFONTEXA, elfLogFont, 0) - TEST_FIELD_SIZE (ENUMLOGFONTEXA, elfFullName, 64) - TEST_FIELD_ALIGN (ENUMLOGFONTEXA, elfFullName, 1) - TEST_FIELD_OFFSET(ENUMLOGFONTEXA, elfFullName, 60) - TEST_FIELD_SIZE (ENUMLOGFONTEXA, elfStyle, 32) - TEST_FIELD_ALIGN (ENUMLOGFONTEXA, elfStyle, 1) - TEST_FIELD_OFFSET(ENUMLOGFONTEXA, elfStyle, 124) - TEST_FIELD_SIZE (ENUMLOGFONTEXA, elfScript, 32) - TEST_FIELD_ALIGN (ENUMLOGFONTEXA, elfScript, 1) - TEST_FIELD_OFFSET(ENUMLOGFONTEXA, elfScript, 156) -} - -static void test_pack_ENUMLOGFONTEXW(void) -{ - /* ENUMLOGFONTEXW */ - TEST_TYPE_SIZE (ENUMLOGFONTEXW, 348) - TEST_TYPE_ALIGN (ENUMLOGFONTEXW, 4) - TEST_FIELD_SIZE (ENUMLOGFONTEXW, elfLogFont, 92) - TEST_FIELD_ALIGN (ENUMLOGFONTEXW, elfLogFont, 4) - TEST_FIELD_OFFSET(ENUMLOGFONTEXW, elfLogFont, 0) - TEST_FIELD_SIZE (ENUMLOGFONTEXW, elfFullName, 128) - TEST_FIELD_ALIGN (ENUMLOGFONTEXW, elfFullName, 2) - TEST_FIELD_OFFSET(ENUMLOGFONTEXW, elfFullName, 92) - TEST_FIELD_SIZE (ENUMLOGFONTEXW, elfStyle, 64) - TEST_FIELD_ALIGN (ENUMLOGFONTEXW, elfStyle, 2) - TEST_FIELD_OFFSET(ENUMLOGFONTEXW, elfStyle, 220) - TEST_FIELD_SIZE (ENUMLOGFONTEXW, elfScript, 64) - TEST_FIELD_ALIGN (ENUMLOGFONTEXW, elfScript, 2) - TEST_FIELD_OFFSET(ENUMLOGFONTEXW, elfScript, 284) -} - -static void test_pack_ENUMLOGFONTW(void) -{ - /* ENUMLOGFONTW */ - TEST_TYPE_SIZE (ENUMLOGFONTW, 284) - TEST_TYPE_ALIGN (ENUMLOGFONTW, 4) - TEST_FIELD_SIZE (ENUMLOGFONTW, elfLogFont, 92) - TEST_FIELD_ALIGN (ENUMLOGFONTW, elfLogFont, 4) - TEST_FIELD_OFFSET(ENUMLOGFONTW, elfLogFont, 0) - TEST_FIELD_SIZE (ENUMLOGFONTW, elfFullName, 128) - TEST_FIELD_ALIGN (ENUMLOGFONTW, elfFullName, 2) - TEST_FIELD_OFFSET(ENUMLOGFONTW, elfFullName, 92) - TEST_FIELD_SIZE (ENUMLOGFONTW, elfStyle, 64) - TEST_FIELD_ALIGN (ENUMLOGFONTW, elfStyle, 2) - TEST_FIELD_OFFSET(ENUMLOGFONTW, elfStyle, 220) -} - -static void test_pack_EXTLOGFONTA(void) -{ - /* EXTLOGFONTA */ - TEST_TYPE_SIZE (EXTLOGFONTA, 192) - TEST_TYPE_ALIGN (EXTLOGFONTA, 4) - TEST_FIELD_SIZE (EXTLOGFONTA, elfLogFont, 60) - TEST_FIELD_ALIGN (EXTLOGFONTA, elfLogFont, 4) - TEST_FIELD_OFFSET(EXTLOGFONTA, elfLogFont, 0) - TEST_FIELD_SIZE (EXTLOGFONTA, elfFullName, 64) - TEST_FIELD_ALIGN (EXTLOGFONTA, elfFullName, 1) - TEST_FIELD_OFFSET(EXTLOGFONTA, elfFullName, 60) - TEST_FIELD_SIZE (EXTLOGFONTA, elfStyle, 32) - TEST_FIELD_ALIGN (EXTLOGFONTA, elfStyle, 1) - TEST_FIELD_OFFSET(EXTLOGFONTA, elfStyle, 124) - TEST_FIELD_SIZE (EXTLOGFONTA, elfVersion, 4) - TEST_FIELD_ALIGN (EXTLOGFONTA, elfVersion, 4) - TEST_FIELD_OFFSET(EXTLOGFONTA, elfVersion, 156) - TEST_FIELD_SIZE (EXTLOGFONTA, elfStyleSize, 4) - TEST_FIELD_ALIGN (EXTLOGFONTA, elfStyleSize, 4) - TEST_FIELD_OFFSET(EXTLOGFONTA, elfStyleSize, 160) - TEST_FIELD_SIZE (EXTLOGFONTA, elfMatch, 4) - TEST_FIELD_ALIGN (EXTLOGFONTA, elfMatch, 4) - TEST_FIELD_OFFSET(EXTLOGFONTA, elfMatch, 164) - TEST_FIELD_SIZE (EXTLOGFONTA, elfReserved, 4) - TEST_FIELD_ALIGN (EXTLOGFONTA, elfReserved, 4) - TEST_FIELD_OFFSET(EXTLOGFONTA, elfReserved, 168) - TEST_FIELD_SIZE (EXTLOGFONTA, elfVendorId, 4) - TEST_FIELD_ALIGN (EXTLOGFONTA, elfVendorId, 1) - TEST_FIELD_OFFSET(EXTLOGFONTA, elfVendorId, 172) - TEST_FIELD_SIZE (EXTLOGFONTA, elfCulture, 4) - TEST_FIELD_ALIGN (EXTLOGFONTA, elfCulture, 4) - TEST_FIELD_OFFSET(EXTLOGFONTA, elfCulture, 176) - TEST_FIELD_SIZE (EXTLOGFONTA, elfPanose, 10) - TEST_FIELD_ALIGN (EXTLOGFONTA, elfPanose, 1) - TEST_FIELD_OFFSET(EXTLOGFONTA, elfPanose, 180) -} - -static void test_pack_EXTLOGFONTW(void) -{ - /* EXTLOGFONTW */ - TEST_TYPE_SIZE (EXTLOGFONTW, 320) - TEST_TYPE_ALIGN (EXTLOGFONTW, 4) - TEST_FIELD_SIZE (EXTLOGFONTW, elfLogFont, 92) - TEST_FIELD_ALIGN (EXTLOGFONTW, elfLogFont, 4) - TEST_FIELD_OFFSET(EXTLOGFONTW, elfLogFont, 0) - TEST_FIELD_SIZE (EXTLOGFONTW, elfFullName, 128) - TEST_FIELD_ALIGN (EXTLOGFONTW, elfFullName, 2) - TEST_FIELD_OFFSET(EXTLOGFONTW, elfFullName, 92) - TEST_FIELD_SIZE (EXTLOGFONTW, elfStyle, 64) - TEST_FIELD_ALIGN (EXTLOGFONTW, elfStyle, 2) - TEST_FIELD_OFFSET(EXTLOGFONTW, elfStyle, 220) - TEST_FIELD_SIZE (EXTLOGFONTW, elfVersion, 4) - TEST_FIELD_ALIGN (EXTLOGFONTW, elfVersion, 4) - TEST_FIELD_OFFSET(EXTLOGFONTW, elfVersion, 284) - TEST_FIELD_SIZE (EXTLOGFONTW, elfStyleSize, 4) - TEST_FIELD_ALIGN (EXTLOGFONTW, elfStyleSize, 4) - TEST_FIELD_OFFSET(EXTLOGFONTW, elfStyleSize, 288) - TEST_FIELD_SIZE (EXTLOGFONTW, elfMatch, 4) - TEST_FIELD_ALIGN (EXTLOGFONTW, elfMatch, 4) - TEST_FIELD_OFFSET(EXTLOGFONTW, elfMatch, 292) - TEST_FIELD_SIZE (EXTLOGFONTW, elfReserved, 4) - TEST_FIELD_ALIGN (EXTLOGFONTW, elfReserved, 4) - TEST_FIELD_OFFSET(EXTLOGFONTW, elfReserved, 296) - TEST_FIELD_SIZE (EXTLOGFONTW, elfVendorId, 4) - TEST_FIELD_ALIGN (EXTLOGFONTW, elfVendorId, 1) - TEST_FIELD_OFFSET(EXTLOGFONTW, elfVendorId, 300) - TEST_FIELD_SIZE (EXTLOGFONTW, elfCulture, 4) - TEST_FIELD_ALIGN (EXTLOGFONTW, elfCulture, 4) - TEST_FIELD_OFFSET(EXTLOGFONTW, elfCulture, 304) - TEST_FIELD_SIZE (EXTLOGFONTW, elfPanose, 10) - TEST_FIELD_ALIGN (EXTLOGFONTW, elfPanose, 1) - TEST_FIELD_OFFSET(EXTLOGFONTW, elfPanose, 308) -} - -static void test_pack_EXTLOGPEN(void) -{ - /* EXTLOGPEN */ - TEST_TYPE_SIZE (EXTLOGPEN, 28) - TEST_TYPE_ALIGN (EXTLOGPEN, 4) - TEST_FIELD_SIZE (EXTLOGPEN, elpPenStyle, 4) - TEST_FIELD_ALIGN (EXTLOGPEN, elpPenStyle, 4) - TEST_FIELD_OFFSET(EXTLOGPEN, elpPenStyle, 0) - TEST_FIELD_SIZE (EXTLOGPEN, elpWidth, 4) - TEST_FIELD_ALIGN (EXTLOGPEN, elpWidth, 4) - TEST_FIELD_OFFSET(EXTLOGPEN, elpWidth, 4) - TEST_FIELD_SIZE (EXTLOGPEN, elpBrushStyle, 4) - TEST_FIELD_ALIGN (EXTLOGPEN, elpBrushStyle, 4) - TEST_FIELD_OFFSET(EXTLOGPEN, elpBrushStyle, 8) - TEST_FIELD_SIZE (EXTLOGPEN, elpColor, 4) - TEST_FIELD_ALIGN (EXTLOGPEN, elpColor, 4) - TEST_FIELD_OFFSET(EXTLOGPEN, elpColor, 12) - TEST_FIELD_SIZE (EXTLOGPEN, elpHatch, 4) - TEST_FIELD_ALIGN (EXTLOGPEN, elpHatch, 4) - TEST_FIELD_OFFSET(EXTLOGPEN, elpHatch, 16) - TEST_FIELD_SIZE (EXTLOGPEN, elpNumEntries, 4) - TEST_FIELD_ALIGN (EXTLOGPEN, elpNumEntries, 4) - TEST_FIELD_OFFSET(EXTLOGPEN, elpNumEntries, 20) - TEST_FIELD_SIZE (EXTLOGPEN, elpStyleEntry, 4) - TEST_FIELD_ALIGN (EXTLOGPEN, elpStyleEntry, 4) - TEST_FIELD_OFFSET(EXTLOGPEN, elpStyleEntry, 24) -} - -static void test_pack_FIXED(void) -{ - /* FIXED */ - TEST_TYPE_SIZE (FIXED, 4) - TEST_TYPE_ALIGN (FIXED, 2) - TEST_FIELD_SIZE (FIXED, fract, 2) - TEST_FIELD_ALIGN (FIXED, fract, 2) - TEST_FIELD_OFFSET(FIXED, fract, 0) - TEST_FIELD_SIZE (FIXED, value, 2) - TEST_FIELD_ALIGN (FIXED, value, 2) - TEST_FIELD_OFFSET(FIXED, value, 2) -} - -static void test_pack_FONTENUMPROCA(void) -{ - /* FONTENUMPROCA */ - TEST_TYPE_SIZE (FONTENUMPROCA, 4) - TEST_TYPE_ALIGN (FONTENUMPROCA, 4) -} - -static void test_pack_FONTENUMPROCW(void) -{ - /* FONTENUMPROCW */ - TEST_TYPE_SIZE (FONTENUMPROCW, 4) - TEST_TYPE_ALIGN (FONTENUMPROCW, 4) -} - -static void test_pack_FONTSIGNATURE(void) -{ - /* FONTSIGNATURE */ - TEST_TYPE_SIZE (FONTSIGNATURE, 24) - TEST_TYPE_ALIGN (FONTSIGNATURE, 4) - TEST_FIELD_SIZE (FONTSIGNATURE, fsUsb, 16) - TEST_FIELD_ALIGN (FONTSIGNATURE, fsUsb, 4) - TEST_FIELD_OFFSET(FONTSIGNATURE, fsUsb, 0) - TEST_FIELD_SIZE (FONTSIGNATURE, fsCsb, 8) - TEST_FIELD_ALIGN (FONTSIGNATURE, fsCsb, 4) - TEST_FIELD_OFFSET(FONTSIGNATURE, fsCsb, 16) -} - -static void test_pack_FXPT16DOT16(void) -{ - /* FXPT16DOT16 */ - TEST_TYPE_SIZE (FXPT16DOT16, 4) - TEST_TYPE_ALIGN (FXPT16DOT16, 4) -} - -static void test_pack_FXPT2DOT30(void) -{ - /* FXPT2DOT30 */ - TEST_TYPE_SIZE (FXPT2DOT30, 4) - TEST_TYPE_ALIGN (FXPT2DOT30, 4) -} - -static void test_pack_GCP_RESULTSA(void) -{ - /* GCP_RESULTSA */ - TEST_TYPE_SIZE (GCP_RESULTSA, 36) - TEST_TYPE_ALIGN (GCP_RESULTSA, 4) - TEST_FIELD_SIZE (GCP_RESULTSA, lStructSize, 4) - TEST_FIELD_ALIGN (GCP_RESULTSA, lStructSize, 4) - TEST_FIELD_OFFSET(GCP_RESULTSA, lStructSize, 0) - TEST_FIELD_SIZE (GCP_RESULTSA, lpOutString, 4) - TEST_FIELD_ALIGN (GCP_RESULTSA, lpOutString, 4) - TEST_FIELD_OFFSET(GCP_RESULTSA, lpOutString, 4) - TEST_FIELD_SIZE (GCP_RESULTSA, lpOrder, 4) - TEST_FIELD_ALIGN (GCP_RESULTSA, lpOrder, 4) - TEST_FIELD_OFFSET(GCP_RESULTSA, lpOrder, 8) - TEST_FIELD_SIZE (GCP_RESULTSA, lpDx, 4) - TEST_FIELD_ALIGN (GCP_RESULTSA, lpDx, 4) - TEST_FIELD_OFFSET(GCP_RESULTSA, lpDx, 12) - TEST_FIELD_SIZE (GCP_RESULTSA, lpCaretPos, 4) - TEST_FIELD_ALIGN (GCP_RESULTSA, lpCaretPos, 4) - TEST_FIELD_OFFSET(GCP_RESULTSA, lpCaretPos, 16) - TEST_FIELD_SIZE (GCP_RESULTSA, lpClass, 4) - TEST_FIELD_ALIGN (GCP_RESULTSA, lpClass, 4) - TEST_FIELD_OFFSET(GCP_RESULTSA, lpClass, 20) - TEST_FIELD_SIZE (GCP_RESULTSA, lpGlyphs, 4) - TEST_FIELD_ALIGN (GCP_RESULTSA, lpGlyphs, 4) - TEST_FIELD_OFFSET(GCP_RESULTSA, lpGlyphs, 24) - TEST_FIELD_SIZE (GCP_RESULTSA, nGlyphs, 4) - TEST_FIELD_ALIGN (GCP_RESULTSA, nGlyphs, 4) - TEST_FIELD_OFFSET(GCP_RESULTSA, nGlyphs, 28) - TEST_FIELD_SIZE (GCP_RESULTSA, nMaxFit, 4) - TEST_FIELD_ALIGN (GCP_RESULTSA, nMaxFit, 4) - TEST_FIELD_OFFSET(GCP_RESULTSA, nMaxFit, 32) -} - -static void test_pack_GCP_RESULTSW(void) -{ - /* GCP_RESULTSW */ - TEST_TYPE_SIZE (GCP_RESULTSW, 36) - TEST_TYPE_ALIGN (GCP_RESULTSW, 4) - TEST_FIELD_SIZE (GCP_RESULTSW, lStructSize, 4) - TEST_FIELD_ALIGN (GCP_RESULTSW, lStructSize, 4) - TEST_FIELD_OFFSET(GCP_RESULTSW, lStructSize, 0) - TEST_FIELD_SIZE (GCP_RESULTSW, lpOutString, 4) - TEST_FIELD_ALIGN (GCP_RESULTSW, lpOutString, 4) - TEST_FIELD_OFFSET(GCP_RESULTSW, lpOutString, 4) - TEST_FIELD_SIZE (GCP_RESULTSW, lpOrder, 4) - TEST_FIELD_ALIGN (GCP_RESULTSW, lpOrder, 4) - TEST_FIELD_OFFSET(GCP_RESULTSW, lpOrder, 8) - TEST_FIELD_SIZE (GCP_RESULTSW, lpDx, 4) - TEST_FIELD_ALIGN (GCP_RESULTSW, lpDx, 4) - TEST_FIELD_OFFSET(GCP_RESULTSW, lpDx, 12) - TEST_FIELD_SIZE (GCP_RESULTSW, lpCaretPos, 4) - TEST_FIELD_ALIGN (GCP_RESULTSW, lpCaretPos, 4) - TEST_FIELD_OFFSET(GCP_RESULTSW, lpCaretPos, 16) - TEST_FIELD_SIZE (GCP_RESULTSW, lpClass, 4) - TEST_FIELD_ALIGN (GCP_RESULTSW, lpClass, 4) - TEST_FIELD_OFFSET(GCP_RESULTSW, lpClass, 20) - TEST_FIELD_SIZE (GCP_RESULTSW, lpGlyphs, 4) - TEST_FIELD_ALIGN (GCP_RESULTSW, lpGlyphs, 4) - TEST_FIELD_OFFSET(GCP_RESULTSW, lpGlyphs, 24) - TEST_FIELD_SIZE (GCP_RESULTSW, nGlyphs, 4) - TEST_FIELD_ALIGN (GCP_RESULTSW, nGlyphs, 4) - TEST_FIELD_OFFSET(GCP_RESULTSW, nGlyphs, 28) - TEST_FIELD_SIZE (GCP_RESULTSW, nMaxFit, 4) - TEST_FIELD_ALIGN (GCP_RESULTSW, nMaxFit, 4) - TEST_FIELD_OFFSET(GCP_RESULTSW, nMaxFit, 32) -} - -static void test_pack_GLYPHMETRICS(void) -{ - /* GLYPHMETRICS */ - TEST_TYPE_SIZE (GLYPHMETRICS, 20) - TEST_TYPE_ALIGN (GLYPHMETRICS, 4) - TEST_FIELD_SIZE (GLYPHMETRICS, gmBlackBoxX, 4) - TEST_FIELD_ALIGN (GLYPHMETRICS, gmBlackBoxX, 4) - TEST_FIELD_OFFSET(GLYPHMETRICS, gmBlackBoxX, 0) - TEST_FIELD_SIZE (GLYPHMETRICS, gmBlackBoxY, 4) - TEST_FIELD_ALIGN (GLYPHMETRICS, gmBlackBoxY, 4) - TEST_FIELD_OFFSET(GLYPHMETRICS, gmBlackBoxY, 4) - TEST_FIELD_SIZE (GLYPHMETRICS, gmptGlyphOrigin, 8) - TEST_FIELD_ALIGN (GLYPHMETRICS, gmptGlyphOrigin, 4) - TEST_FIELD_OFFSET(GLYPHMETRICS, gmptGlyphOrigin, 8) - TEST_FIELD_SIZE (GLYPHMETRICS, gmCellIncX, 2) - TEST_FIELD_ALIGN (GLYPHMETRICS, gmCellIncX, 2) - TEST_FIELD_OFFSET(GLYPHMETRICS, gmCellIncX, 16) - TEST_FIELD_SIZE (GLYPHMETRICS, gmCellIncY, 2) - TEST_FIELD_ALIGN (GLYPHMETRICS, gmCellIncY, 2) - TEST_FIELD_OFFSET(GLYPHMETRICS, gmCellIncY, 18) -} - -static void test_pack_GLYPHMETRICSFLOAT(void) -{ - /* GLYPHMETRICSFLOAT */ - TEST_TYPE_SIZE (GLYPHMETRICSFLOAT, 24) - TEST_TYPE_ALIGN (GLYPHMETRICSFLOAT, 4) - TEST_FIELD_SIZE (GLYPHMETRICSFLOAT, gmfBlackBoxX, 4) - TEST_FIELD_ALIGN (GLYPHMETRICSFLOAT, gmfBlackBoxX, 4) - TEST_FIELD_OFFSET(GLYPHMETRICSFLOAT, gmfBlackBoxX, 0) - TEST_FIELD_SIZE (GLYPHMETRICSFLOAT, gmfBlackBoxY, 4) - TEST_FIELD_ALIGN (GLYPHMETRICSFLOAT, gmfBlackBoxY, 4) - TEST_FIELD_OFFSET(GLYPHMETRICSFLOAT, gmfBlackBoxY, 4) - TEST_FIELD_SIZE (GLYPHMETRICSFLOAT, gmfptGlyphOrigin, 8) - TEST_FIELD_ALIGN (GLYPHMETRICSFLOAT, gmfptGlyphOrigin, 4) - TEST_FIELD_OFFSET(GLYPHMETRICSFLOAT, gmfptGlyphOrigin, 8) - TEST_FIELD_SIZE (GLYPHMETRICSFLOAT, gmfCellIncX, 4) - TEST_FIELD_ALIGN (GLYPHMETRICSFLOAT, gmfCellIncX, 4) - TEST_FIELD_OFFSET(GLYPHMETRICSFLOAT, gmfCellIncX, 16) - TEST_FIELD_SIZE (GLYPHMETRICSFLOAT, gmfCellIncY, 4) - TEST_FIELD_ALIGN (GLYPHMETRICSFLOAT, gmfCellIncY, 4) - TEST_FIELD_OFFSET(GLYPHMETRICSFLOAT, gmfCellIncY, 20) -} - -static void test_pack_GOBJENUMPROC(void) -{ - /* GOBJENUMPROC */ - TEST_TYPE_SIZE (GOBJENUMPROC, 4) - TEST_TYPE_ALIGN (GOBJENUMPROC, 4) -} - -static void test_pack_GRADIENT_RECT(void) -{ - /* GRADIENT_RECT */ - TEST_TYPE_SIZE (GRADIENT_RECT, 8) - TEST_TYPE_ALIGN (GRADIENT_RECT, 4) - TEST_FIELD_SIZE (GRADIENT_RECT, UpperLeft, 4) - TEST_FIELD_ALIGN (GRADIENT_RECT, UpperLeft, 4) - TEST_FIELD_OFFSET(GRADIENT_RECT, UpperLeft, 0) - TEST_FIELD_SIZE (GRADIENT_RECT, LowerRight, 4) - TEST_FIELD_ALIGN (GRADIENT_RECT, LowerRight, 4) - TEST_FIELD_OFFSET(GRADIENT_RECT, LowerRight, 4) -} - -static void test_pack_GRADIENT_TRIANGLE(void) -{ - /* GRADIENT_TRIANGLE */ - TEST_TYPE_SIZE (GRADIENT_TRIANGLE, 12) - TEST_TYPE_ALIGN (GRADIENT_TRIANGLE, 4) - TEST_FIELD_SIZE (GRADIENT_TRIANGLE, Vertex1, 4) - TEST_FIELD_ALIGN (GRADIENT_TRIANGLE, Vertex1, 4) - TEST_FIELD_OFFSET(GRADIENT_TRIANGLE, Vertex1, 0) - TEST_FIELD_SIZE (GRADIENT_TRIANGLE, Vertex2, 4) - TEST_FIELD_ALIGN (GRADIENT_TRIANGLE, Vertex2, 4) - TEST_FIELD_OFFSET(GRADIENT_TRIANGLE, Vertex2, 4) - TEST_FIELD_SIZE (GRADIENT_TRIANGLE, Vertex3, 4) - TEST_FIELD_ALIGN (GRADIENT_TRIANGLE, Vertex3, 4) - TEST_FIELD_OFFSET(GRADIENT_TRIANGLE, Vertex3, 8) -} - -static void test_pack_HANDLETABLE(void) -{ - /* HANDLETABLE */ - TEST_TYPE_SIZE (HANDLETABLE, 4) - TEST_TYPE_ALIGN (HANDLETABLE, 4) - TEST_FIELD_SIZE (HANDLETABLE, objectHandle, 4) - TEST_FIELD_ALIGN (HANDLETABLE, objectHandle, 4) - TEST_FIELD_OFFSET(HANDLETABLE, objectHandle, 0) -} - -static void test_pack_ICMENUMPROCA(void) -{ - /* ICMENUMPROCA */ - TEST_TYPE_SIZE (ICMENUMPROCA, 4) - TEST_TYPE_ALIGN (ICMENUMPROCA, 4) -} - -static void test_pack_ICMENUMPROCW(void) -{ - /* ICMENUMPROCW */ - TEST_TYPE_SIZE (ICMENUMPROCW, 4) - TEST_TYPE_ALIGN (ICMENUMPROCW, 4) -} - -static void test_pack_KERNINGPAIR(void) -{ - /* KERNINGPAIR */ - TEST_TYPE_SIZE (KERNINGPAIR, 8) - TEST_TYPE_ALIGN (KERNINGPAIR, 4) - TEST_FIELD_SIZE (KERNINGPAIR, wFirst, 2) - TEST_FIELD_ALIGN (KERNINGPAIR, wFirst, 2) - TEST_FIELD_OFFSET(KERNINGPAIR, wFirst, 0) - TEST_FIELD_SIZE (KERNINGPAIR, wSecond, 2) - TEST_FIELD_ALIGN (KERNINGPAIR, wSecond, 2) - TEST_FIELD_OFFSET(KERNINGPAIR, wSecond, 2) - TEST_FIELD_SIZE (KERNINGPAIR, iKernAmount, 4) - TEST_FIELD_ALIGN (KERNINGPAIR, iKernAmount, 4) - TEST_FIELD_OFFSET(KERNINGPAIR, iKernAmount, 4) -} - -static void test_pack_LAYERPLANEDESCRIPTOR(void) -{ - /* LAYERPLANEDESCRIPTOR */ - TEST_TYPE_SIZE (LAYERPLANEDESCRIPTOR, 32) - TEST_TYPE_ALIGN (LAYERPLANEDESCRIPTOR, 4) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, nSize, 2) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, nSize, 2) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, nSize, 0) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, nVersion, 2) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, nVersion, 2) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, nVersion, 2) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, dwFlags, 4) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, dwFlags, 4) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, dwFlags, 4) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, iPixelType, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, iPixelType, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, iPixelType, 8) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cColorBits, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cColorBits, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cColorBits, 9) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cRedBits, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cRedBits, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cRedBits, 10) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cRedShift, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cRedShift, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cRedShift, 11) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cGreenBits, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cGreenBits, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cGreenBits, 12) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cGreenShift, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cGreenShift, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cGreenShift, 13) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cBlueBits, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cBlueBits, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cBlueBits, 14) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cBlueShift, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cBlueShift, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cBlueShift, 15) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cAlphaBits, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cAlphaBits, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cAlphaBits, 16) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cAlphaShift, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cAlphaShift, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cAlphaShift, 17) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cAccumBits, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cAccumBits, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cAccumBits, 18) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cAccumRedBits, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cAccumRedBits, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cAccumRedBits, 19) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cAccumGreenBits, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cAccumGreenBits, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cAccumGreenBits, 20) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cAccumBlueBits, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cAccumBlueBits, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cAccumBlueBits, 21) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cAccumAlphaBits, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cAccumAlphaBits, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cAccumAlphaBits, 22) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cDepthBits, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cDepthBits, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cDepthBits, 23) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cStencilBits, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cStencilBits, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cStencilBits, 24) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, cAuxBuffers, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, cAuxBuffers, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, cAuxBuffers, 25) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, iLayerPlane, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, iLayerPlane, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, iLayerPlane, 26) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, bReserved, 1) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, bReserved, 1) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, bReserved, 27) - TEST_FIELD_SIZE (LAYERPLANEDESCRIPTOR, crTransparent, 4) - TEST_FIELD_ALIGN (LAYERPLANEDESCRIPTOR, crTransparent, 4) - TEST_FIELD_OFFSET(LAYERPLANEDESCRIPTOR, crTransparent, 28) -} - -static void test_pack_LCSCSTYPE(void) -{ - /* LCSCSTYPE */ - TEST_TYPE_SIZE (LCSCSTYPE, 4) - TEST_TYPE_ALIGN (LCSCSTYPE, 4) -} - -static void test_pack_LCSGAMUTMATCH(void) -{ - /* LCSGAMUTMATCH */ - TEST_TYPE_SIZE (LCSGAMUTMATCH, 4) - TEST_TYPE_ALIGN (LCSGAMUTMATCH, 4) -} - -static void test_pack_LINEDDAPROC(void) -{ - /* LINEDDAPROC */ - TEST_TYPE_SIZE (LINEDDAPROC, 4) - TEST_TYPE_ALIGN (LINEDDAPROC, 4) -} - -static void test_pack_LOCALESIGNATURE(void) -{ - /* LOCALESIGNATURE */ - TEST_TYPE_SIZE (LOCALESIGNATURE, 32) - TEST_TYPE_ALIGN (LOCALESIGNATURE, 4) - TEST_FIELD_SIZE (LOCALESIGNATURE, lsUsb, 16) - TEST_FIELD_ALIGN (LOCALESIGNATURE, lsUsb, 4) - TEST_FIELD_OFFSET(LOCALESIGNATURE, lsUsb, 0) - TEST_FIELD_SIZE (LOCALESIGNATURE, lsCsbDefault, 8) - TEST_FIELD_ALIGN (LOCALESIGNATURE, lsCsbDefault, 4) - TEST_FIELD_OFFSET(LOCALESIGNATURE, lsCsbDefault, 16) - TEST_FIELD_SIZE (LOCALESIGNATURE, lsCsbSupported, 8) - TEST_FIELD_ALIGN (LOCALESIGNATURE, lsCsbSupported, 4) - TEST_FIELD_OFFSET(LOCALESIGNATURE, lsCsbSupported, 24) -} - -static void test_pack_LOGBRUSH(void) -{ - /* LOGBRUSH */ - TEST_TYPE_SIZE (LOGBRUSH, 12) - TEST_TYPE_ALIGN (LOGBRUSH, 4) - TEST_FIELD_SIZE (LOGBRUSH, lbStyle, 4) - TEST_FIELD_ALIGN (LOGBRUSH, lbStyle, 4) - TEST_FIELD_OFFSET(LOGBRUSH, lbStyle, 0) - TEST_FIELD_SIZE (LOGBRUSH, lbColor, 4) - TEST_FIELD_ALIGN (LOGBRUSH, lbColor, 4) - TEST_FIELD_OFFSET(LOGBRUSH, lbColor, 4) - TEST_FIELD_SIZE (LOGBRUSH, lbHatch, 4) - TEST_FIELD_ALIGN (LOGBRUSH, lbHatch, 4) - TEST_FIELD_OFFSET(LOGBRUSH, lbHatch, 8) -} - -static void test_pack_LOGCOLORSPACEA(void) -{ - /* LOGCOLORSPACEA */ - TEST_TYPE_SIZE (LOGCOLORSPACEA, 328) - TEST_TYPE_ALIGN (LOGCOLORSPACEA, 4) - TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsSignature, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsSignature, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsSignature, 0) - TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsVersion, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsVersion, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsVersion, 4) - TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsSize, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsSize, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsSize, 8) - TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsCSType, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsCSType, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsCSType, 12) - TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsIntent, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsIntent, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsIntent, 16) - TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsEndpoints, 36) - TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsEndpoints, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsEndpoints, 20) - TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsGammaRed, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsGammaRed, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsGammaRed, 56) - TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsGammaGreen, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsGammaGreen, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsGammaGreen, 60) - TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsGammaBlue, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsGammaBlue, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsGammaBlue, 64) - TEST_FIELD_SIZE (LOGCOLORSPACEA, lcsFilename, 260) - TEST_FIELD_ALIGN (LOGCOLORSPACEA, lcsFilename, 1) - TEST_FIELD_OFFSET(LOGCOLORSPACEA, lcsFilename, 68) -} - -static void test_pack_LOGCOLORSPACEW(void) -{ - /* LOGCOLORSPACEW */ - TEST_TYPE_SIZE (LOGCOLORSPACEW, 588) - TEST_TYPE_ALIGN (LOGCOLORSPACEW, 4) - TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsSignature, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsSignature, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsSignature, 0) - TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsVersion, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsVersion, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsVersion, 4) - TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsSize, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsSize, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsSize, 8) - TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsCSType, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsCSType, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsCSType, 12) - TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsIntent, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsIntent, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsIntent, 16) - TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsEndpoints, 36) - TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsEndpoints, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsEndpoints, 20) - TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsGammaRed, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsGammaRed, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsGammaRed, 56) - TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsGammaGreen, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsGammaGreen, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsGammaGreen, 60) - TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsGammaBlue, 4) - TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsGammaBlue, 4) - TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsGammaBlue, 64) - TEST_FIELD_SIZE (LOGCOLORSPACEW, lcsFilename, 520) - TEST_FIELD_ALIGN (LOGCOLORSPACEW, lcsFilename, 2) - TEST_FIELD_OFFSET(LOGCOLORSPACEW, lcsFilename, 68) -} - -static void test_pack_LOGFONTA(void) -{ - /* LOGFONTA */ - TEST_TYPE_SIZE (LOGFONTA, 60) - TEST_TYPE_ALIGN (LOGFONTA, 4) - TEST_FIELD_SIZE (LOGFONTA, lfHeight, 4) - TEST_FIELD_ALIGN (LOGFONTA, lfHeight, 4) - TEST_FIELD_OFFSET(LOGFONTA, lfHeight, 0) - TEST_FIELD_SIZE (LOGFONTA, lfWidth, 4) - TEST_FIELD_ALIGN (LOGFONTA, lfWidth, 4) - TEST_FIELD_OFFSET(LOGFONTA, lfWidth, 4) - TEST_FIELD_SIZE (LOGFONTA, lfEscapement, 4) - TEST_FIELD_ALIGN (LOGFONTA, lfEscapement, 4) - TEST_FIELD_OFFSET(LOGFONTA, lfEscapement, 8) - TEST_FIELD_SIZE (LOGFONTA, lfOrientation, 4) - TEST_FIELD_ALIGN (LOGFONTA, lfOrientation, 4) - TEST_FIELD_OFFSET(LOGFONTA, lfOrientation, 12) - TEST_FIELD_SIZE (LOGFONTA, lfWeight, 4) - TEST_FIELD_ALIGN (LOGFONTA, lfWeight, 4) - TEST_FIELD_OFFSET(LOGFONTA, lfWeight, 16) - TEST_FIELD_SIZE (LOGFONTA, lfItalic, 1) - TEST_FIELD_ALIGN (LOGFONTA, lfItalic, 1) - TEST_FIELD_OFFSET(LOGFONTA, lfItalic, 20) - TEST_FIELD_SIZE (LOGFONTA, lfUnderline, 1) - TEST_FIELD_ALIGN (LOGFONTA, lfUnderline, 1) - TEST_FIELD_OFFSET(LOGFONTA, lfUnderline, 21) - TEST_FIELD_SIZE (LOGFONTA, lfStrikeOut, 1) - TEST_FIELD_ALIGN (LOGFONTA, lfStrikeOut, 1) - TEST_FIELD_OFFSET(LOGFONTA, lfStrikeOut, 22) - TEST_FIELD_SIZE (LOGFONTA, lfCharSet, 1) - TEST_FIELD_ALIGN (LOGFONTA, lfCharSet, 1) - TEST_FIELD_OFFSET(LOGFONTA, lfCharSet, 23) - TEST_FIELD_SIZE (LOGFONTA, lfOutPrecision, 1) - TEST_FIELD_ALIGN (LOGFONTA, lfOutPrecision, 1) - TEST_FIELD_OFFSET(LOGFONTA, lfOutPrecision, 24) - TEST_FIELD_SIZE (LOGFONTA, lfClipPrecision, 1) - TEST_FIELD_ALIGN (LOGFONTA, lfClipPrecision, 1) - TEST_FIELD_OFFSET(LOGFONTA, lfClipPrecision, 25) - TEST_FIELD_SIZE (LOGFONTA, lfQuality, 1) - TEST_FIELD_ALIGN (LOGFONTA, lfQuality, 1) - TEST_FIELD_OFFSET(LOGFONTA, lfQuality, 26) - TEST_FIELD_SIZE (LOGFONTA, lfPitchAndFamily, 1) - TEST_FIELD_ALIGN (LOGFONTA, lfPitchAndFamily, 1) - TEST_FIELD_OFFSET(LOGFONTA, lfPitchAndFamily, 27) - TEST_FIELD_SIZE (LOGFONTA, lfFaceName, 32) - TEST_FIELD_ALIGN (LOGFONTA, lfFaceName, 1) - TEST_FIELD_OFFSET(LOGFONTA, lfFaceName, 28) -} - -static void test_pack_LOGFONTW(void) -{ - /* LOGFONTW */ - TEST_TYPE_SIZE (LOGFONTW, 92) - TEST_TYPE_ALIGN (LOGFONTW, 4) - TEST_FIELD_SIZE (LOGFONTW, lfHeight, 4) - TEST_FIELD_ALIGN (LOGFONTW, lfHeight, 4) - TEST_FIELD_OFFSET(LOGFONTW, lfHeight, 0) - TEST_FIELD_SIZE (LOGFONTW, lfWidth, 4) - TEST_FIELD_ALIGN (LOGFONTW, lfWidth, 4) - TEST_FIELD_OFFSET(LOGFONTW, lfWidth, 4) - TEST_FIELD_SIZE (LOGFONTW, lfEscapement, 4) - TEST_FIELD_ALIGN (LOGFONTW, lfEscapement, 4) - TEST_FIELD_OFFSET(LOGFONTW, lfEscapement, 8) - TEST_FIELD_SIZE (LOGFONTW, lfOrientation, 4) - TEST_FIELD_ALIGN (LOGFONTW, lfOrientation, 4) - TEST_FIELD_OFFSET(LOGFONTW, lfOrientation, 12) - TEST_FIELD_SIZE (LOGFONTW, lfWeight, 4) - TEST_FIELD_ALIGN (LOGFONTW, lfWeight, 4) - TEST_FIELD_OFFSET(LOGFONTW, lfWeight, 16) - TEST_FIELD_SIZE (LOGFONTW, lfItalic, 1) - TEST_FIELD_ALIGN (LOGFONTW, lfItalic, 1) - TEST_FIELD_OFFSET(LOGFONTW, lfItalic, 20) - TEST_FIELD_SIZE (LOGFONTW, lfUnderline, 1) - TEST_FIELD_ALIGN (LOGFONTW, lfUnderline, 1) - TEST_FIELD_OFFSET(LOGFONTW, lfUnderline, 21) - TEST_FIELD_SIZE (LOGFONTW, lfStrikeOut, 1) - TEST_FIELD_ALIGN (LOGFONTW, lfStrikeOut, 1) - TEST_FIELD_OFFSET(LOGFONTW, lfStrikeOut, 22) - TEST_FIELD_SIZE (LOGFONTW, lfCharSet, 1) - TEST_FIELD_ALIGN (LOGFONTW, lfCharSet, 1) - TEST_FIELD_OFFSET(LOGFONTW, lfCharSet, 23) - TEST_FIELD_SIZE (LOGFONTW, lfOutPrecision, 1) - TEST_FIELD_ALIGN (LOGFONTW, lfOutPrecision, 1) - TEST_FIELD_OFFSET(LOGFONTW, lfOutPrecision, 24) - TEST_FIELD_SIZE (LOGFONTW, lfClipPrecision, 1) - TEST_FIELD_ALIGN (LOGFONTW, lfClipPrecision, 1) - TEST_FIELD_OFFSET(LOGFONTW, lfClipPrecision, 25) - TEST_FIELD_SIZE (LOGFONTW, lfQuality, 1) - TEST_FIELD_ALIGN (LOGFONTW, lfQuality, 1) - TEST_FIELD_OFFSET(LOGFONTW, lfQuality, 26) - TEST_FIELD_SIZE (LOGFONTW, lfPitchAndFamily, 1) - TEST_FIELD_ALIGN (LOGFONTW, lfPitchAndFamily, 1) - TEST_FIELD_OFFSET(LOGFONTW, lfPitchAndFamily, 27) - TEST_FIELD_SIZE (LOGFONTW, lfFaceName, 64) - TEST_FIELD_ALIGN (LOGFONTW, lfFaceName, 2) - TEST_FIELD_OFFSET(LOGFONTW, lfFaceName, 28) -} - -static void test_pack_LOGPEN(void) -{ - /* LOGPEN */ - TEST_TYPE_SIZE (LOGPEN, 16) - TEST_TYPE_ALIGN (LOGPEN, 4) - TEST_FIELD_SIZE (LOGPEN, lopnStyle, 4) - TEST_FIELD_ALIGN (LOGPEN, lopnStyle, 4) - TEST_FIELD_OFFSET(LOGPEN, lopnStyle, 0) - TEST_FIELD_SIZE (LOGPEN, lopnWidth, 8) - TEST_FIELD_ALIGN (LOGPEN, lopnWidth, 4) - TEST_FIELD_OFFSET(LOGPEN, lopnWidth, 4) - TEST_FIELD_SIZE (LOGPEN, lopnColor, 4) - TEST_FIELD_ALIGN (LOGPEN, lopnColor, 4) - TEST_FIELD_OFFSET(LOGPEN, lopnColor, 12) -} - -static void test_pack_LPABC(void) -{ - /* LPABC */ - TEST_TYPE_SIZE (LPABC, 4) - TEST_TYPE_ALIGN (LPABC, 4) - TEST_TARGET_SIZE (LPABC, 12) - TEST_TARGET_ALIGN(LPABC, 4) -} - -static void test_pack_LPABCFLOAT(void) -{ - /* LPABCFLOAT */ - TEST_TYPE_SIZE (LPABCFLOAT, 4) - TEST_TYPE_ALIGN (LPABCFLOAT, 4) - TEST_TARGET_SIZE (LPABCFLOAT, 12) - TEST_TARGET_ALIGN(LPABCFLOAT, 4) -} - -static void test_pack_LPBITMAP(void) -{ - /* LPBITMAP */ - TEST_TYPE_SIZE (LPBITMAP, 4) - TEST_TYPE_ALIGN (LPBITMAP, 4) - TEST_TARGET_SIZE (LPBITMAP, 24) - TEST_TARGET_ALIGN(LPBITMAP, 4) -} - -static void test_pack_LPBITMAPCOREHEADER(void) -{ - /* LPBITMAPCOREHEADER */ - TEST_TYPE_SIZE (LPBITMAPCOREHEADER, 4) - TEST_TYPE_ALIGN (LPBITMAPCOREHEADER, 4) - TEST_TARGET_SIZE (LPBITMAPCOREHEADER, 12) - TEST_TARGET_ALIGN(LPBITMAPCOREHEADER, 4) -} - -static void test_pack_LPBITMAPCOREINFO(void) -{ - /* LPBITMAPCOREINFO */ - TEST_TYPE_SIZE (LPBITMAPCOREINFO, 4) - TEST_TYPE_ALIGN (LPBITMAPCOREINFO, 4) - TEST_TARGET_SIZE (LPBITMAPCOREINFO, 16) - TEST_TARGET_ALIGN(LPBITMAPCOREINFO, 4) -} - -static void test_pack_LPBITMAPFILEHEADER(void) -{ - /* LPBITMAPFILEHEADER */ - TEST_TYPE_SIZE (LPBITMAPFILEHEADER, 4) - TEST_TYPE_ALIGN (LPBITMAPFILEHEADER, 4) - TEST_TARGET_SIZE (LPBITMAPFILEHEADER, 14) - TEST_TARGET_ALIGN(LPBITMAPFILEHEADER, 2) -} - -static void test_pack_LPBITMAPINFO(void) -{ - /* LPBITMAPINFO */ - TEST_TYPE_SIZE (LPBITMAPINFO, 4) - TEST_TYPE_ALIGN (LPBITMAPINFO, 4) - TEST_TARGET_SIZE (LPBITMAPINFO, 44) - TEST_TARGET_ALIGN(LPBITMAPINFO, 4) -} - -static void test_pack_LPBITMAPINFOHEADER(void) -{ - /* LPBITMAPINFOHEADER */ - TEST_TYPE_SIZE (LPBITMAPINFOHEADER, 4) - TEST_TYPE_ALIGN (LPBITMAPINFOHEADER, 4) - TEST_TARGET_SIZE (LPBITMAPINFOHEADER, 40) - TEST_TARGET_ALIGN(LPBITMAPINFOHEADER, 4) -} - -static void test_pack_LPBITMAPV5HEADER(void) -{ - /* LPBITMAPV5HEADER */ - TEST_TYPE_SIZE (LPBITMAPV5HEADER, 4) - TEST_TYPE_ALIGN (LPBITMAPV5HEADER, 4) - TEST_TARGET_SIZE (LPBITMAPV5HEADER, 124) - TEST_TARGET_ALIGN(LPBITMAPV5HEADER, 4) -} - -static void test_pack_LPCHARSETINFO(void) -{ - /* LPCHARSETINFO */ - TEST_TYPE_SIZE (LPCHARSETINFO, 4) - TEST_TYPE_ALIGN (LPCHARSETINFO, 4) - TEST_TARGET_SIZE (LPCHARSETINFO, 32) - TEST_TARGET_ALIGN(LPCHARSETINFO, 4) -} - -static void test_pack_LPCIEXYZ(void) -{ - /* LPCIEXYZ */ - TEST_TYPE_SIZE (LPCIEXYZ, 4) - TEST_TYPE_ALIGN (LPCIEXYZ, 4) - TEST_TARGET_SIZE (LPCIEXYZ, 12) - TEST_TARGET_ALIGN(LPCIEXYZ, 4) -} - -static void test_pack_LPCIEXYZTRIPLE(void) -{ - /* LPCIEXYZTRIPLE */ - TEST_TYPE_SIZE (LPCIEXYZTRIPLE, 4) - TEST_TYPE_ALIGN (LPCIEXYZTRIPLE, 4) - TEST_TARGET_SIZE (LPCIEXYZTRIPLE, 36) - TEST_TARGET_ALIGN(LPCIEXYZTRIPLE, 4) -} - -static void test_pack_LPCOLORADJUSTMENT(void) -{ - /* LPCOLORADJUSTMENT */ - TEST_TYPE_SIZE (LPCOLORADJUSTMENT, 4) - TEST_TYPE_ALIGN (LPCOLORADJUSTMENT, 4) - TEST_TARGET_SIZE (LPCOLORADJUSTMENT, 24) - TEST_TARGET_ALIGN(LPCOLORADJUSTMENT, 2) -} - -static void test_pack_LPDEVMODEA(void) -{ - /* LPDEVMODEA */ - TEST_TYPE_SIZE (LPDEVMODEA, 4) - TEST_TYPE_ALIGN (LPDEVMODEA, 4) -} - -static void test_pack_LPDEVMODEW(void) -{ - /* LPDEVMODEW */ - TEST_TYPE_SIZE (LPDEVMODEW, 4) - TEST_TYPE_ALIGN (LPDEVMODEW, 4) -} - -static void test_pack_LPDIBSECTION(void) -{ - /* LPDIBSECTION */ - TEST_TYPE_SIZE (LPDIBSECTION, 4) - TEST_TYPE_ALIGN (LPDIBSECTION, 4) - TEST_TARGET_SIZE (LPDIBSECTION, 84) - TEST_TARGET_ALIGN(LPDIBSECTION, 4) -} - -static void test_pack_LPDISPLAY_DEVICEA(void) -{ - /* LPDISPLAY_DEVICEA */ - TEST_TYPE_SIZE (LPDISPLAY_DEVICEA, 4) - TEST_TYPE_ALIGN (LPDISPLAY_DEVICEA, 4) - TEST_TARGET_SIZE (LPDISPLAY_DEVICEA, 424) - TEST_TARGET_ALIGN(LPDISPLAY_DEVICEA, 4) -} - -static void test_pack_LPDISPLAY_DEVICEW(void) -{ - /* LPDISPLAY_DEVICEW */ - TEST_TYPE_SIZE (LPDISPLAY_DEVICEW, 4) - TEST_TYPE_ALIGN (LPDISPLAY_DEVICEW, 4) - TEST_TARGET_SIZE (LPDISPLAY_DEVICEW, 840) - TEST_TARGET_ALIGN(LPDISPLAY_DEVICEW, 4) -} - -static void test_pack_LPDOCINFOA(void) -{ - /* LPDOCINFOA */ - TEST_TYPE_SIZE (LPDOCINFOA, 4) - TEST_TYPE_ALIGN (LPDOCINFOA, 4) - TEST_TARGET_SIZE (LPDOCINFOA, 20) - TEST_TARGET_ALIGN(LPDOCINFOA, 4) -} - -static void test_pack_LPDOCINFOW(void) -{ - /* LPDOCINFOW */ - TEST_TYPE_SIZE (LPDOCINFOW, 4) - TEST_TYPE_ALIGN (LPDOCINFOW, 4) - TEST_TARGET_SIZE (LPDOCINFOW, 20) - TEST_TARGET_ALIGN(LPDOCINFOW, 4) -} - -static void test_pack_LPENHMETAHEADER(void) -{ - /* LPENHMETAHEADER */ - TEST_TYPE_SIZE (LPENHMETAHEADER, 4) - TEST_TYPE_ALIGN (LPENHMETAHEADER, 4) - TEST_TARGET_SIZE (LPENHMETAHEADER, 108) - TEST_TARGET_ALIGN(LPENHMETAHEADER, 4) -} - -static void test_pack_LPENHMETARECORD(void) -{ - /* LPENHMETARECORD */ - TEST_TYPE_SIZE (LPENHMETARECORD, 4) - TEST_TYPE_ALIGN (LPENHMETARECORD, 4) - TEST_TARGET_SIZE (LPENHMETARECORD, 12) - TEST_TARGET_ALIGN(LPENHMETARECORD, 4) -} - -static void test_pack_LPENUMLOGFONTA(void) -{ - /* LPENUMLOGFONTA */ - TEST_TYPE_SIZE (LPENUMLOGFONTA, 4) - TEST_TYPE_ALIGN (LPENUMLOGFONTA, 4) - TEST_TARGET_SIZE (LPENUMLOGFONTA, 156) - TEST_TARGET_ALIGN(LPENUMLOGFONTA, 4) -} - -static void test_pack_LPENUMLOGFONTEXA(void) -{ - /* LPENUMLOGFONTEXA */ - TEST_TYPE_SIZE (LPENUMLOGFONTEXA, 4) - TEST_TYPE_ALIGN (LPENUMLOGFONTEXA, 4) - TEST_TARGET_SIZE (LPENUMLOGFONTEXA, 188) - TEST_TARGET_ALIGN(LPENUMLOGFONTEXA, 4) -} - -static void test_pack_LPENUMLOGFONTEXW(void) -{ - /* LPENUMLOGFONTEXW */ - TEST_TYPE_SIZE (LPENUMLOGFONTEXW, 4) - TEST_TYPE_ALIGN (LPENUMLOGFONTEXW, 4) - TEST_TARGET_SIZE (LPENUMLOGFONTEXW, 348) - TEST_TARGET_ALIGN(LPENUMLOGFONTEXW, 4) -} - -static void test_pack_LPENUMLOGFONTW(void) -{ - /* LPENUMLOGFONTW */ - TEST_TYPE_SIZE (LPENUMLOGFONTW, 4) - TEST_TYPE_ALIGN (LPENUMLOGFONTW, 4) - TEST_TARGET_SIZE (LPENUMLOGFONTW, 284) - TEST_TARGET_ALIGN(LPENUMLOGFONTW, 4) -} - -static void test_pack_LPEXTLOGFONTA(void) -{ - /* LPEXTLOGFONTA */ - TEST_TYPE_SIZE (LPEXTLOGFONTA, 4) - TEST_TYPE_ALIGN (LPEXTLOGFONTA, 4) - TEST_TARGET_SIZE (LPEXTLOGFONTA, 192) - TEST_TARGET_ALIGN(LPEXTLOGFONTA, 4) -} - -static void test_pack_LPEXTLOGFONTW(void) -{ - /* LPEXTLOGFONTW */ - TEST_TYPE_SIZE (LPEXTLOGFONTW, 4) - TEST_TYPE_ALIGN (LPEXTLOGFONTW, 4) - TEST_TARGET_SIZE (LPEXTLOGFONTW, 320) - TEST_TARGET_ALIGN(LPEXTLOGFONTW, 4) -} - -static void test_pack_LPEXTLOGPEN(void) -{ - /* LPEXTLOGPEN */ - TEST_TYPE_SIZE (LPEXTLOGPEN, 4) - TEST_TYPE_ALIGN (LPEXTLOGPEN, 4) - TEST_TARGET_SIZE (LPEXTLOGPEN, 28) - TEST_TARGET_ALIGN(LPEXTLOGPEN, 4) -} - -static void test_pack_LPFONTSIGNATURE(void) -{ - /* LPFONTSIGNATURE */ - TEST_TYPE_SIZE (LPFONTSIGNATURE, 4) - TEST_TYPE_ALIGN (LPFONTSIGNATURE, 4) - TEST_TARGET_SIZE (LPFONTSIGNATURE, 24) - TEST_TARGET_ALIGN(LPFONTSIGNATURE, 4) -} - -static void test_pack_LPGCP_RESULTSA(void) -{ - /* LPGCP_RESULTSA */ - TEST_TYPE_SIZE (LPGCP_RESULTSA, 4) - TEST_TYPE_ALIGN (LPGCP_RESULTSA, 4) - TEST_TARGET_SIZE (LPGCP_RESULTSA, 36) - TEST_TARGET_ALIGN(LPGCP_RESULTSA, 4) -} - -static void test_pack_LPGCP_RESULTSW(void) -{ - /* LPGCP_RESULTSW */ - TEST_TYPE_SIZE (LPGCP_RESULTSW, 4) - TEST_TYPE_ALIGN (LPGCP_RESULTSW, 4) - TEST_TARGET_SIZE (LPGCP_RESULTSW, 36) - TEST_TARGET_ALIGN(LPGCP_RESULTSW, 4) -} - -static void test_pack_LPGLYPHMETRICS(void) -{ - /* LPGLYPHMETRICS */ - TEST_TYPE_SIZE (LPGLYPHMETRICS, 4) - TEST_TYPE_ALIGN (LPGLYPHMETRICS, 4) - TEST_TARGET_SIZE (LPGLYPHMETRICS, 20) - TEST_TARGET_ALIGN(LPGLYPHMETRICS, 4) -} - -static void test_pack_LPGLYPHMETRICSFLOAT(void) -{ - /* LPGLYPHMETRICSFLOAT */ - TEST_TYPE_SIZE (LPGLYPHMETRICSFLOAT, 4) - TEST_TYPE_ALIGN (LPGLYPHMETRICSFLOAT, 4) - TEST_TARGET_SIZE (LPGLYPHMETRICSFLOAT, 24) - TEST_TARGET_ALIGN(LPGLYPHMETRICSFLOAT, 4) -} - -static void test_pack_LPGRADIENT_RECT(void) -{ - /* LPGRADIENT_RECT */ - TEST_TYPE_SIZE (LPGRADIENT_RECT, 4) - TEST_TYPE_ALIGN (LPGRADIENT_RECT, 4) - TEST_TARGET_SIZE (LPGRADIENT_RECT, 8) - TEST_TARGET_ALIGN(LPGRADIENT_RECT, 4) -} - -static void test_pack_LPGRADIENT_TRIANGLE(void) -{ - /* LPGRADIENT_TRIANGLE */ - TEST_TYPE_SIZE (LPGRADIENT_TRIANGLE, 4) - TEST_TYPE_ALIGN (LPGRADIENT_TRIANGLE, 4) - TEST_TARGET_SIZE (LPGRADIENT_TRIANGLE, 12) - TEST_TARGET_ALIGN(LPGRADIENT_TRIANGLE, 4) -} - -static void test_pack_LPHANDLETABLE(void) -{ - /* LPHANDLETABLE */ - TEST_TYPE_SIZE (LPHANDLETABLE, 4) - TEST_TYPE_ALIGN (LPHANDLETABLE, 4) - TEST_TARGET_SIZE (LPHANDLETABLE, 4) - TEST_TARGET_ALIGN(LPHANDLETABLE, 4) -} - -static void test_pack_LPKERNINGPAIR(void) -{ - /* LPKERNINGPAIR */ - TEST_TYPE_SIZE (LPKERNINGPAIR, 4) - TEST_TYPE_ALIGN (LPKERNINGPAIR, 4) - TEST_TARGET_SIZE (LPKERNINGPAIR, 8) - TEST_TARGET_ALIGN(LPKERNINGPAIR, 4) -} - -static void test_pack_LPLAYERPLANEDESCRIPTOR(void) -{ - /* LPLAYERPLANEDESCRIPTOR */ - TEST_TYPE_SIZE (LPLAYERPLANEDESCRIPTOR, 4) - TEST_TYPE_ALIGN (LPLAYERPLANEDESCRIPTOR, 4) - TEST_TARGET_SIZE (LPLAYERPLANEDESCRIPTOR, 32) - TEST_TARGET_ALIGN(LPLAYERPLANEDESCRIPTOR, 4) -} - -static void test_pack_LPLOCALESIGNATURE(void) -{ - /* LPLOCALESIGNATURE */ - TEST_TYPE_SIZE (LPLOCALESIGNATURE, 4) - TEST_TYPE_ALIGN (LPLOCALESIGNATURE, 4) - TEST_TARGET_SIZE (LPLOCALESIGNATURE, 32) - TEST_TARGET_ALIGN(LPLOCALESIGNATURE, 4) -} - -static void test_pack_LPLOGBRUSH(void) -{ - /* LPLOGBRUSH */ - TEST_TYPE_SIZE (LPLOGBRUSH, 4) - TEST_TYPE_ALIGN (LPLOGBRUSH, 4) - TEST_TARGET_SIZE (LPLOGBRUSH, 12) - TEST_TARGET_ALIGN(LPLOGBRUSH, 4) -} - -static void test_pack_LPLOGCOLORSPACEA(void) -{ - /* LPLOGCOLORSPACEA */ - TEST_TYPE_SIZE (LPLOGCOLORSPACEA, 4) - TEST_TYPE_ALIGN (LPLOGCOLORSPACEA, 4) - TEST_TARGET_SIZE (LPLOGCOLORSPACEA, 328) - TEST_TARGET_ALIGN(LPLOGCOLORSPACEA, 4) -} - -static void test_pack_LPLOGCOLORSPACEW(void) -{ - /* LPLOGCOLORSPACEW */ - TEST_TYPE_SIZE (LPLOGCOLORSPACEW, 4) - TEST_TYPE_ALIGN (LPLOGCOLORSPACEW, 4) - TEST_TARGET_SIZE (LPLOGCOLORSPACEW, 588) - TEST_TARGET_ALIGN(LPLOGCOLORSPACEW, 4) -} - -static void test_pack_LPLOGFONTA(void) -{ - /* LPLOGFONTA */ - TEST_TYPE_SIZE (LPLOGFONTA, 4) - TEST_TYPE_ALIGN (LPLOGFONTA, 4) - TEST_TARGET_SIZE (LPLOGFONTA, 60) - TEST_TARGET_ALIGN(LPLOGFONTA, 4) -} - -static void test_pack_LPLOGFONTW(void) -{ - /* LPLOGFONTW */ - TEST_TYPE_SIZE (LPLOGFONTW, 4) - TEST_TYPE_ALIGN (LPLOGFONTW, 4) - TEST_TARGET_SIZE (LPLOGFONTW, 92) - TEST_TARGET_ALIGN(LPLOGFONTW, 4) -} - -static void test_pack_LPLOGPEN(void) -{ - /* LPLOGPEN */ - TEST_TYPE_SIZE (LPLOGPEN, 4) - TEST_TYPE_ALIGN (LPLOGPEN, 4) - TEST_TARGET_SIZE (LPLOGPEN, 16) - TEST_TARGET_ALIGN(LPLOGPEN, 4) -} - -static void test_pack_LPMAT2(void) -{ - /* LPMAT2 */ - TEST_TYPE_SIZE (LPMAT2, 4) - TEST_TYPE_ALIGN (LPMAT2, 4) - TEST_TARGET_SIZE (LPMAT2, 16) - TEST_TARGET_ALIGN(LPMAT2, 2) -} - -static void test_pack_LPMETAFILEPICT(void) -{ - /* LPMETAFILEPICT */ - TEST_TYPE_SIZE (LPMETAFILEPICT, 4) - TEST_TYPE_ALIGN (LPMETAFILEPICT, 4) - TEST_TARGET_SIZE (LPMETAFILEPICT, 16) - TEST_TARGET_ALIGN(LPMETAFILEPICT, 4) -} - -static void test_pack_LPMETAHEADER(void) -{ - /* LPMETAHEADER */ - TEST_TYPE_SIZE (LPMETAHEADER, 4) - TEST_TYPE_ALIGN (LPMETAHEADER, 4) - TEST_TARGET_SIZE (LPMETAHEADER, 18) - TEST_TARGET_ALIGN(LPMETAHEADER, 2) -} - -static void test_pack_LPMETARECORD(void) -{ - /* LPMETARECORD */ - TEST_TYPE_SIZE (LPMETARECORD, 4) - TEST_TYPE_ALIGN (LPMETARECORD, 4) - TEST_TARGET_SIZE (LPMETARECORD, 8) - TEST_TARGET_ALIGN(LPMETARECORD, 4) -} - -static void test_pack_LPNEWTEXTMETRICA(void) -{ - /* LPNEWTEXTMETRICA */ - TEST_TYPE_SIZE (LPNEWTEXTMETRICA, 4) - TEST_TYPE_ALIGN (LPNEWTEXTMETRICA, 4) - TEST_TARGET_SIZE (LPNEWTEXTMETRICA, 72) - TEST_TARGET_ALIGN(LPNEWTEXTMETRICA, 4) -} - -static void test_pack_LPNEWTEXTMETRICW(void) -{ - /* LPNEWTEXTMETRICW */ - TEST_TYPE_SIZE (LPNEWTEXTMETRICW, 4) - TEST_TYPE_ALIGN (LPNEWTEXTMETRICW, 4) - TEST_TARGET_SIZE (LPNEWTEXTMETRICW, 76) - TEST_TARGET_ALIGN(LPNEWTEXTMETRICW, 4) -} - -static void test_pack_LPOUTLINETEXTMETRICA(void) -{ - /* LPOUTLINETEXTMETRICA */ - TEST_TYPE_SIZE (LPOUTLINETEXTMETRICA, 4) - TEST_TYPE_ALIGN (LPOUTLINETEXTMETRICA, 4) - TEST_TARGET_SIZE (LPOUTLINETEXTMETRICA, 212) - TEST_TARGET_ALIGN(LPOUTLINETEXTMETRICA, 4) -} - -static void test_pack_LPOUTLINETEXTMETRICW(void) -{ - /* LPOUTLINETEXTMETRICW */ - TEST_TYPE_SIZE (LPOUTLINETEXTMETRICW, 4) - TEST_TYPE_ALIGN (LPOUTLINETEXTMETRICW, 4) - TEST_TARGET_SIZE (LPOUTLINETEXTMETRICW, 216) - TEST_TARGET_ALIGN(LPOUTLINETEXTMETRICW, 4) -} - -static void test_pack_LPPANOSE(void) -{ - /* LPPANOSE */ - TEST_TYPE_SIZE (LPPANOSE, 4) - TEST_TYPE_ALIGN (LPPANOSE, 4) - TEST_TARGET_SIZE (LPPANOSE, 10) - TEST_TARGET_ALIGN(LPPANOSE, 1) -} - -static void test_pack_LPPELARRAY(void) -{ - /* LPPELARRAY */ - TEST_TYPE_SIZE (LPPELARRAY, 4) - TEST_TYPE_ALIGN (LPPELARRAY, 4) - TEST_TARGET_SIZE (LPPELARRAY, 20) - TEST_TARGET_ALIGN(LPPELARRAY, 4) -} - -static void test_pack_LPPIXELFORMATDESCRIPTOR(void) -{ - /* LPPIXELFORMATDESCRIPTOR */ - TEST_TYPE_SIZE (LPPIXELFORMATDESCRIPTOR, 4) - TEST_TYPE_ALIGN (LPPIXELFORMATDESCRIPTOR, 4) - TEST_TARGET_SIZE (LPPIXELFORMATDESCRIPTOR, 40) - TEST_TARGET_ALIGN(LPPIXELFORMATDESCRIPTOR, 4) -} - -static void test_pack_LPPOINTFX(void) -{ - /* LPPOINTFX */ - TEST_TYPE_SIZE (LPPOINTFX, 4) - TEST_TYPE_ALIGN (LPPOINTFX, 4) - TEST_TARGET_SIZE (LPPOINTFX, 8) - TEST_TARGET_ALIGN(LPPOINTFX, 2) -} - -static void test_pack_LPPOLYTEXTA(void) -{ - /* LPPOLYTEXTA */ - TEST_TYPE_SIZE (LPPOLYTEXTA, 4) - TEST_TYPE_ALIGN (LPPOLYTEXTA, 4) - TEST_TARGET_SIZE (LPPOLYTEXTA, 40) - TEST_TARGET_ALIGN(LPPOLYTEXTA, 4) -} - -static void test_pack_LPPOLYTEXTW(void) -{ - /* LPPOLYTEXTW */ - TEST_TYPE_SIZE (LPPOLYTEXTW, 4) - TEST_TYPE_ALIGN (LPPOLYTEXTW, 4) - TEST_TARGET_SIZE (LPPOLYTEXTW, 40) - TEST_TARGET_ALIGN(LPPOLYTEXTW, 4) -} - -static void test_pack_LPRASTERIZER_STATUS(void) -{ - /* LPRASTERIZER_STATUS */ - TEST_TYPE_SIZE (LPRASTERIZER_STATUS, 4) - TEST_TYPE_ALIGN (LPRASTERIZER_STATUS, 4) - TEST_TARGET_SIZE (LPRASTERIZER_STATUS, 6) - TEST_TARGET_ALIGN(LPRASTERIZER_STATUS, 2) -} - -static void test_pack_LPRGBQUAD(void) -{ - /* LPRGBQUAD */ - TEST_TYPE_SIZE (LPRGBQUAD, 4) - TEST_TYPE_ALIGN (LPRGBQUAD, 4) - TEST_TARGET_SIZE (LPRGBQUAD, 4) - TEST_TARGET_ALIGN(LPRGBQUAD, 1) -} - -static void test_pack_LPRGNDATA(void) -{ - /* LPRGNDATA */ - TEST_TYPE_SIZE (LPRGNDATA, 4) - TEST_TYPE_ALIGN (LPRGNDATA, 4) - TEST_TARGET_SIZE (LPRGNDATA, 36) - TEST_TARGET_ALIGN(LPRGNDATA, 4) -} - -static void test_pack_LPTEXTMETRICA(void) -{ - /* LPTEXTMETRICA */ - TEST_TYPE_SIZE (LPTEXTMETRICA, 4) - TEST_TYPE_ALIGN (LPTEXTMETRICA, 4) - TEST_TARGET_SIZE (LPTEXTMETRICA, 56) - TEST_TARGET_ALIGN(LPTEXTMETRICA, 4) -} - -static void test_pack_LPTEXTMETRICW(void) -{ - /* LPTEXTMETRICW */ - TEST_TYPE_SIZE (LPTEXTMETRICW, 4) - TEST_TYPE_ALIGN (LPTEXTMETRICW, 4) - TEST_TARGET_SIZE (LPTEXTMETRICW, 60) - TEST_TARGET_ALIGN(LPTEXTMETRICW, 4) -} - -static void test_pack_LPTRIVERTEX(void) -{ - /* LPTRIVERTEX */ - TEST_TYPE_SIZE (LPTRIVERTEX, 4) - TEST_TYPE_ALIGN (LPTRIVERTEX, 4) - TEST_TARGET_SIZE (LPTRIVERTEX, 16) - TEST_TARGET_ALIGN(LPTRIVERTEX, 4) -} - -static void test_pack_LPTTPOLYCURVE(void) -{ - /* LPTTPOLYCURVE */ - TEST_TYPE_SIZE (LPTTPOLYCURVE, 4) - TEST_TYPE_ALIGN (LPTTPOLYCURVE, 4) - TEST_TARGET_SIZE (LPTTPOLYCURVE, 12) - TEST_TARGET_ALIGN(LPTTPOLYCURVE, 2) -} - -static void test_pack_LPTTPOLYGONHEADER(void) -{ - /* LPTTPOLYGONHEADER */ - TEST_TYPE_SIZE (LPTTPOLYGONHEADER, 4) - TEST_TYPE_ALIGN (LPTTPOLYGONHEADER, 4) - TEST_TARGET_SIZE (LPTTPOLYGONHEADER, 16) - TEST_TARGET_ALIGN(LPTTPOLYGONHEADER, 4) -} - -static void test_pack_LPXFORM(void) -{ - /* LPXFORM */ - TEST_TYPE_SIZE (LPXFORM, 4) - TEST_TYPE_ALIGN (LPXFORM, 4) - TEST_TARGET_SIZE (LPXFORM, 24) - TEST_TARGET_ALIGN(LPXFORM, 4) -} - -static void test_pack_MAT2(void) -{ - /* MAT2 */ - TEST_TYPE_SIZE (MAT2, 16) - TEST_TYPE_ALIGN (MAT2, 2) - TEST_FIELD_SIZE (MAT2, eM11, 4) - TEST_FIELD_ALIGN (MAT2, eM11, 2) - TEST_FIELD_OFFSET(MAT2, eM11, 0) - TEST_FIELD_SIZE (MAT2, eM12, 4) - TEST_FIELD_ALIGN (MAT2, eM12, 2) - TEST_FIELD_OFFSET(MAT2, eM12, 4) - TEST_FIELD_SIZE (MAT2, eM21, 4) - TEST_FIELD_ALIGN (MAT2, eM21, 2) - TEST_FIELD_OFFSET(MAT2, eM21, 8) - TEST_FIELD_SIZE (MAT2, eM22, 4) - TEST_FIELD_ALIGN (MAT2, eM22, 2) - TEST_FIELD_OFFSET(MAT2, eM22, 12) -} - -static void test_pack_METAFILEPICT(void) -{ - /* METAFILEPICT */ - TEST_TYPE_SIZE (METAFILEPICT, 16) - TEST_TYPE_ALIGN (METAFILEPICT, 4) - TEST_FIELD_SIZE (METAFILEPICT, mm, 4) - TEST_FIELD_ALIGN (METAFILEPICT, mm, 4) - TEST_FIELD_OFFSET(METAFILEPICT, mm, 0) - TEST_FIELD_SIZE (METAFILEPICT, xExt, 4) - TEST_FIELD_ALIGN (METAFILEPICT, xExt, 4) - TEST_FIELD_OFFSET(METAFILEPICT, xExt, 4) - TEST_FIELD_SIZE (METAFILEPICT, yExt, 4) - TEST_FIELD_ALIGN (METAFILEPICT, yExt, 4) - TEST_FIELD_OFFSET(METAFILEPICT, yExt, 8) - TEST_FIELD_SIZE (METAFILEPICT, hMF, 4) - TEST_FIELD_ALIGN (METAFILEPICT, hMF, 4) - TEST_FIELD_OFFSET(METAFILEPICT, hMF, 12) -} - -static void test_pack_METAHEADER(void) -{ - /* METAHEADER (pack 2) */ - TEST_TYPE_SIZE (METAHEADER, 18) - TEST_TYPE_ALIGN (METAHEADER, 2) - TEST_FIELD_SIZE (METAHEADER, mtType, 2) - TEST_FIELD_ALIGN (METAHEADER, mtType, 2) - TEST_FIELD_OFFSET(METAHEADER, mtType, 0) - TEST_FIELD_SIZE (METAHEADER, mtHeaderSize, 2) - TEST_FIELD_ALIGN (METAHEADER, mtHeaderSize, 2) - TEST_FIELD_OFFSET(METAHEADER, mtHeaderSize, 2) - TEST_FIELD_SIZE (METAHEADER, mtVersion, 2) - TEST_FIELD_ALIGN (METAHEADER, mtVersion, 2) - TEST_FIELD_OFFSET(METAHEADER, mtVersion, 4) - TEST_FIELD_SIZE (METAHEADER, mtSize, 4) - TEST_FIELD_ALIGN (METAHEADER, mtSize, 2) - TEST_FIELD_OFFSET(METAHEADER, mtSize, 6) - TEST_FIELD_SIZE (METAHEADER, mtNoObjects, 2) - TEST_FIELD_ALIGN (METAHEADER, mtNoObjects, 2) - TEST_FIELD_OFFSET(METAHEADER, mtNoObjects, 10) - TEST_FIELD_SIZE (METAHEADER, mtMaxRecord, 4) - TEST_FIELD_ALIGN (METAHEADER, mtMaxRecord, 2) - TEST_FIELD_OFFSET(METAHEADER, mtMaxRecord, 12) - TEST_FIELD_SIZE (METAHEADER, mtNoParameters, 2) - TEST_FIELD_ALIGN (METAHEADER, mtNoParameters, 2) - TEST_FIELD_OFFSET(METAHEADER, mtNoParameters, 16) -} - -static void test_pack_METARECORD(void) -{ - /* METARECORD */ - TEST_TYPE_SIZE (METARECORD, 8) - TEST_TYPE_ALIGN (METARECORD, 4) - TEST_FIELD_SIZE (METARECORD, rdSize, 4) - TEST_FIELD_ALIGN (METARECORD, rdSize, 4) - TEST_FIELD_OFFSET(METARECORD, rdSize, 0) - TEST_FIELD_SIZE (METARECORD, rdFunction, 2) - TEST_FIELD_ALIGN (METARECORD, rdFunction, 2) - TEST_FIELD_OFFSET(METARECORD, rdFunction, 4) - TEST_FIELD_SIZE (METARECORD, rdParm, 2) - TEST_FIELD_ALIGN (METARECORD, rdParm, 2) - TEST_FIELD_OFFSET(METARECORD, rdParm, 6) -} - -static void test_pack_MFENUMPROC(void) -{ - /* MFENUMPROC */ - TEST_TYPE_SIZE (MFENUMPROC, 4) - TEST_TYPE_ALIGN (MFENUMPROC, 4) -} - -static void test_pack_NEWTEXTMETRICA(void) -{ - /* NEWTEXTMETRICA */ - TEST_TYPE_SIZE (NEWTEXTMETRICA, 72) - TEST_TYPE_ALIGN (NEWTEXTMETRICA, 4) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmHeight, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmHeight, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmHeight, 0) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmAscent, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmAscent, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmAscent, 4) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmDescent, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmDescent, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmDescent, 8) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmInternalLeading, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmInternalLeading, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmInternalLeading, 12) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmExternalLeading, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmExternalLeading, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmExternalLeading, 16) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmAveCharWidth, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmAveCharWidth, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmAveCharWidth, 20) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmMaxCharWidth, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmMaxCharWidth, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmMaxCharWidth, 24) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmWeight, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmWeight, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmWeight, 28) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmOverhang, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmOverhang, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmOverhang, 32) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmDigitizedAspectX, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmDigitizedAspectX, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmDigitizedAspectX, 36) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmDigitizedAspectY, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmDigitizedAspectY, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmDigitizedAspectY, 40) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmFirstChar, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmFirstChar, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmFirstChar, 44) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmLastChar, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmLastChar, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmLastChar, 45) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmDefaultChar, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmDefaultChar, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmDefaultChar, 46) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmBreakChar, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmBreakChar, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmBreakChar, 47) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmItalic, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmItalic, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmItalic, 48) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmUnderlined, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmUnderlined, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmUnderlined, 49) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmStruckOut, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmStruckOut, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmStruckOut, 50) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmPitchAndFamily, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmPitchAndFamily, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmPitchAndFamily, 51) - TEST_FIELD_SIZE (NEWTEXTMETRICA, tmCharSet, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, tmCharSet, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, tmCharSet, 52) - TEST_FIELD_SIZE (NEWTEXTMETRICA, ntmFlags, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, ntmFlags, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, ntmFlags, 56) - TEST_FIELD_SIZE (NEWTEXTMETRICA, ntmSizeEM, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, ntmSizeEM, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, ntmSizeEM, 60) - TEST_FIELD_SIZE (NEWTEXTMETRICA, ntmCellHeight, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, ntmCellHeight, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, ntmCellHeight, 64) - TEST_FIELD_SIZE (NEWTEXTMETRICA, ntmAvgWidth, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICA, ntmAvgWidth, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICA, ntmAvgWidth, 68) -} - -static void test_pack_NEWTEXTMETRICEXA(void) -{ - /* NEWTEXTMETRICEXA */ - TEST_TYPE_SIZE (NEWTEXTMETRICEXA, 96) - TEST_TYPE_ALIGN (NEWTEXTMETRICEXA, 4) - TEST_FIELD_SIZE (NEWTEXTMETRICEXA, ntmTm, 72) - TEST_FIELD_ALIGN (NEWTEXTMETRICEXA, ntmTm, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICEXA, ntmTm, 0) - TEST_FIELD_SIZE (NEWTEXTMETRICEXA, ntmFontSig, 24) - TEST_FIELD_ALIGN (NEWTEXTMETRICEXA, ntmFontSig, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICEXA, ntmFontSig, 72) -} - -static void test_pack_NEWTEXTMETRICEXW(void) -{ - /* NEWTEXTMETRICEXW */ - TEST_TYPE_SIZE (NEWTEXTMETRICEXW, 100) - TEST_TYPE_ALIGN (NEWTEXTMETRICEXW, 4) - TEST_FIELD_SIZE (NEWTEXTMETRICEXW, ntmTm, 76) - TEST_FIELD_ALIGN (NEWTEXTMETRICEXW, ntmTm, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICEXW, ntmTm, 0) - TEST_FIELD_SIZE (NEWTEXTMETRICEXW, ntmFontSig, 24) - TEST_FIELD_ALIGN (NEWTEXTMETRICEXW, ntmFontSig, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICEXW, ntmFontSig, 76) -} - -static void test_pack_NEWTEXTMETRICW(void) -{ - /* NEWTEXTMETRICW */ - TEST_TYPE_SIZE (NEWTEXTMETRICW, 76) - TEST_TYPE_ALIGN (NEWTEXTMETRICW, 4) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmHeight, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmHeight, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmHeight, 0) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmAscent, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmAscent, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmAscent, 4) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmDescent, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmDescent, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmDescent, 8) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmInternalLeading, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmInternalLeading, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmInternalLeading, 12) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmExternalLeading, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmExternalLeading, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmExternalLeading, 16) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmAveCharWidth, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmAveCharWidth, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmAveCharWidth, 20) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmMaxCharWidth, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmMaxCharWidth, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmMaxCharWidth, 24) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmWeight, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmWeight, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmWeight, 28) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmOverhang, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmOverhang, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmOverhang, 32) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmDigitizedAspectX, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmDigitizedAspectX, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmDigitizedAspectX, 36) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmDigitizedAspectY, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmDigitizedAspectY, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmDigitizedAspectY, 40) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmFirstChar, 2) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmFirstChar, 2) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmFirstChar, 44) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmLastChar, 2) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmLastChar, 2) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmLastChar, 46) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmDefaultChar, 2) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmDefaultChar, 2) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmDefaultChar, 48) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmBreakChar, 2) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmBreakChar, 2) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmBreakChar, 50) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmItalic, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmItalic, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmItalic, 52) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmUnderlined, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmUnderlined, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmUnderlined, 53) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmStruckOut, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmStruckOut, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmStruckOut, 54) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmPitchAndFamily, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmPitchAndFamily, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmPitchAndFamily, 55) - TEST_FIELD_SIZE (NEWTEXTMETRICW, tmCharSet, 1) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, tmCharSet, 1) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, tmCharSet, 56) - TEST_FIELD_SIZE (NEWTEXTMETRICW, ntmFlags, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, ntmFlags, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, ntmFlags, 60) - TEST_FIELD_SIZE (NEWTEXTMETRICW, ntmSizeEM, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, ntmSizeEM, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, ntmSizeEM, 64) - TEST_FIELD_SIZE (NEWTEXTMETRICW, ntmCellHeight, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, ntmCellHeight, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, ntmCellHeight, 68) - TEST_FIELD_SIZE (NEWTEXTMETRICW, ntmAvgWidth, 4) - TEST_FIELD_ALIGN (NEWTEXTMETRICW, ntmAvgWidth, 4) - TEST_FIELD_OFFSET(NEWTEXTMETRICW, ntmAvgWidth, 72) -} - -static void test_pack_NPEXTLOGPEN(void) -{ - /* NPEXTLOGPEN */ - TEST_TYPE_SIZE (NPEXTLOGPEN, 4) - TEST_TYPE_ALIGN (NPEXTLOGPEN, 4) - TEST_TARGET_SIZE (NPEXTLOGPEN, 28) - TEST_TARGET_ALIGN(NPEXTLOGPEN, 4) -} - -static void test_pack_OLDFONTENUMPROC(void) -{ - /* OLDFONTENUMPROC */ - TEST_TYPE_SIZE (OLDFONTENUMPROC, 4) - TEST_TYPE_ALIGN (OLDFONTENUMPROC, 4) -} - -static void test_pack_OLDFONTENUMPROCA(void) -{ - /* OLDFONTENUMPROCA */ - TEST_TYPE_SIZE (OLDFONTENUMPROCA, 4) - TEST_TYPE_ALIGN (OLDFONTENUMPROCA, 4) -} - -static void test_pack_OLDFONTENUMPROCW(void) -{ - /* OLDFONTENUMPROCW */ - TEST_TYPE_SIZE (OLDFONTENUMPROCW, 4) - TEST_TYPE_ALIGN (OLDFONTENUMPROCW, 4) -} - -static void test_pack_OUTLINETEXTMETRICA(void) -{ - /* OUTLINETEXTMETRICA */ - TEST_TYPE_SIZE (OUTLINETEXTMETRICA, 212) - TEST_TYPE_ALIGN (OUTLINETEXTMETRICA, 4) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmSize, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmSize, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmSize, 0) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmTextMetrics, 56) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmTextMetrics, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmTextMetrics, 4) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmFiller, 1) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmFiller, 1) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmFiller, 60) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmPanoseNumber, 10) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmPanoseNumber, 1) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmPanoseNumber, 61) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmfsSelection, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmfsSelection, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmfsSelection, 72) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmfsType, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmfsType, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmfsType, 76) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmsCharSlopeRise, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmsCharSlopeRise, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmsCharSlopeRise, 80) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmsCharSlopeRun, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmsCharSlopeRun, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmsCharSlopeRun, 84) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmItalicAngle, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmItalicAngle, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmItalicAngle, 88) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmEMSquare, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmEMSquare, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmEMSquare, 92) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmAscent, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmAscent, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmAscent, 96) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmDescent, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmDescent, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmDescent, 100) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmLineGap, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmLineGap, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmLineGap, 104) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmsCapEmHeight, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmsCapEmHeight, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmsCapEmHeight, 108) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmsXHeight, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmsXHeight, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmsXHeight, 112) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmrcFontBox, 16) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmrcFontBox, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmrcFontBox, 116) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmMacAscent, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmMacAscent, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmMacAscent, 132) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmMacDescent, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmMacDescent, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmMacDescent, 136) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmMacLineGap, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmMacLineGap, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmMacLineGap, 140) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmusMinimumPPEM, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmusMinimumPPEM, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmusMinimumPPEM, 144) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmptSubscriptSize, 8) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmptSubscriptSize, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmptSubscriptSize, 148) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmptSubscriptOffset, 8) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmptSubscriptOffset, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmptSubscriptOffset, 156) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmptSuperscriptSize, 8) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmptSuperscriptSize, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmptSuperscriptSize, 164) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmptSuperscriptOffset, 8) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmptSuperscriptOffset, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmptSuperscriptOffset, 172) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmsStrikeoutSize, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmsStrikeoutSize, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmsStrikeoutSize, 180) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmsStrikeoutPosition, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmsStrikeoutPosition, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmsStrikeoutPosition, 184) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmsUnderscoreSize, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmsUnderscoreSize, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmsUnderscoreSize, 188) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmsUnderscorePosition, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmsUnderscorePosition, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmsUnderscorePosition, 192) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmpFamilyName, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmpFamilyName, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmpFamilyName, 196) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmpFaceName, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmpFaceName, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmpFaceName, 200) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmpStyleName, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmpStyleName, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmpStyleName, 204) - TEST_FIELD_SIZE (OUTLINETEXTMETRICA, otmpFullName, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICA, otmpFullName, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICA, otmpFullName, 208) -} - -static void test_pack_OUTLINETEXTMETRICW(void) -{ - /* OUTLINETEXTMETRICW */ - TEST_TYPE_SIZE (OUTLINETEXTMETRICW, 216) - TEST_TYPE_ALIGN (OUTLINETEXTMETRICW, 4) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmSize, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmSize, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmSize, 0) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmTextMetrics, 60) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmTextMetrics, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmTextMetrics, 4) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmFiller, 1) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmFiller, 1) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmFiller, 64) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmPanoseNumber, 10) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmPanoseNumber, 1) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmPanoseNumber, 65) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmfsSelection, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmfsSelection, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmfsSelection, 76) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmfsType, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmfsType, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmfsType, 80) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmsCharSlopeRise, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmsCharSlopeRise, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmsCharSlopeRise, 84) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmsCharSlopeRun, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmsCharSlopeRun, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmsCharSlopeRun, 88) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmItalicAngle, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmItalicAngle, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmItalicAngle, 92) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmEMSquare, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmEMSquare, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmEMSquare, 96) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmAscent, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmAscent, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmAscent, 100) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmDescent, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmDescent, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmDescent, 104) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmLineGap, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmLineGap, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmLineGap, 108) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmsCapEmHeight, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmsCapEmHeight, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmsCapEmHeight, 112) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmsXHeight, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmsXHeight, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmsXHeight, 116) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmrcFontBox, 16) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmrcFontBox, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmrcFontBox, 120) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmMacAscent, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmMacAscent, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmMacAscent, 136) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmMacDescent, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmMacDescent, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmMacDescent, 140) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmMacLineGap, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmMacLineGap, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmMacLineGap, 144) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmusMinimumPPEM, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmusMinimumPPEM, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmusMinimumPPEM, 148) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmptSubscriptSize, 8) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmptSubscriptSize, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmptSubscriptSize, 152) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmptSubscriptOffset, 8) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmptSubscriptOffset, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmptSubscriptOffset, 160) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmptSuperscriptSize, 8) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmptSuperscriptSize, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmptSuperscriptSize, 168) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmptSuperscriptOffset, 8) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmptSuperscriptOffset, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmptSuperscriptOffset, 176) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmsStrikeoutSize, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmsStrikeoutSize, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmsStrikeoutSize, 184) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmsStrikeoutPosition, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmsStrikeoutPosition, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmsStrikeoutPosition, 188) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmsUnderscoreSize, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmsUnderscoreSize, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmsUnderscoreSize, 192) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmsUnderscorePosition, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmsUnderscorePosition, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmsUnderscorePosition, 196) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmpFamilyName, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmpFamilyName, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmpFamilyName, 200) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmpFaceName, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmpFaceName, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmpFaceName, 204) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmpStyleName, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmpStyleName, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmpStyleName, 208) - TEST_FIELD_SIZE (OUTLINETEXTMETRICW, otmpFullName, 4) - TEST_FIELD_ALIGN (OUTLINETEXTMETRICW, otmpFullName, 4) - TEST_FIELD_OFFSET(OUTLINETEXTMETRICW, otmpFullName, 212) -} - -static void test_pack_PABC(void) -{ - /* PABC */ - TEST_TYPE_SIZE (PABC, 4) - TEST_TYPE_ALIGN (PABC, 4) - TEST_TARGET_SIZE (PABC, 12) - TEST_TARGET_ALIGN(PABC, 4) -} - -static void test_pack_PABCFLOAT(void) -{ - /* PABCFLOAT */ - TEST_TYPE_SIZE (PABCFLOAT, 4) - TEST_TYPE_ALIGN (PABCFLOAT, 4) - TEST_TARGET_SIZE (PABCFLOAT, 12) - TEST_TARGET_ALIGN(PABCFLOAT, 4) -} - -static void test_pack_PANOSE(void) -{ - /* PANOSE */ - TEST_TYPE_SIZE (PANOSE, 10) - TEST_TYPE_ALIGN (PANOSE, 1) - TEST_FIELD_SIZE (PANOSE, bFamilyType, 1) - TEST_FIELD_ALIGN (PANOSE, bFamilyType, 1) - TEST_FIELD_OFFSET(PANOSE, bFamilyType, 0) - TEST_FIELD_SIZE (PANOSE, bSerifStyle, 1) - TEST_FIELD_ALIGN (PANOSE, bSerifStyle, 1) - TEST_FIELD_OFFSET(PANOSE, bSerifStyle, 1) - TEST_FIELD_SIZE (PANOSE, bWeight, 1) - TEST_FIELD_ALIGN (PANOSE, bWeight, 1) - TEST_FIELD_OFFSET(PANOSE, bWeight, 2) - TEST_FIELD_SIZE (PANOSE, bProportion, 1) - TEST_FIELD_ALIGN (PANOSE, bProportion, 1) - TEST_FIELD_OFFSET(PANOSE, bProportion, 3) - TEST_FIELD_SIZE (PANOSE, bContrast, 1) - TEST_FIELD_ALIGN (PANOSE, bContrast, 1) - TEST_FIELD_OFFSET(PANOSE, bContrast, 4) - TEST_FIELD_SIZE (PANOSE, bStrokeVariation, 1) - TEST_FIELD_ALIGN (PANOSE, bStrokeVariation, 1) - TEST_FIELD_OFFSET(PANOSE, bStrokeVariation, 5) - TEST_FIELD_SIZE (PANOSE, bArmStyle, 1) - TEST_FIELD_ALIGN (PANOSE, bArmStyle, 1) - TEST_FIELD_OFFSET(PANOSE, bArmStyle, 6) - TEST_FIELD_SIZE (PANOSE, bLetterform, 1) - TEST_FIELD_ALIGN (PANOSE, bLetterform, 1) - TEST_FIELD_OFFSET(PANOSE, bLetterform, 7) - TEST_FIELD_SIZE (PANOSE, bMidline, 1) - TEST_FIELD_ALIGN (PANOSE, bMidline, 1) - TEST_FIELD_OFFSET(PANOSE, bMidline, 8) - TEST_FIELD_SIZE (PANOSE, bXHeight, 1) - TEST_FIELD_ALIGN (PANOSE, bXHeight, 1) - TEST_FIELD_OFFSET(PANOSE, bXHeight, 9) -} - -static void test_pack_PATTERN(void) -{ - /* PATTERN */ - TEST_TYPE_SIZE (PATTERN, 12) - TEST_TYPE_ALIGN (PATTERN, 4) -} - -static void test_pack_PBITMAP(void) -{ - /* PBITMAP */ - TEST_TYPE_SIZE (PBITMAP, 4) - TEST_TYPE_ALIGN (PBITMAP, 4) - TEST_TARGET_SIZE (PBITMAP, 24) - TEST_TARGET_ALIGN(PBITMAP, 4) -} - -static void test_pack_PBITMAPCOREHEADER(void) -{ - /* PBITMAPCOREHEADER */ - TEST_TYPE_SIZE (PBITMAPCOREHEADER, 4) - TEST_TYPE_ALIGN (PBITMAPCOREHEADER, 4) - TEST_TARGET_SIZE (PBITMAPCOREHEADER, 12) - TEST_TARGET_ALIGN(PBITMAPCOREHEADER, 4) -} - -static void test_pack_PBITMAPCOREINFO(void) -{ - /* PBITMAPCOREINFO */ - TEST_TYPE_SIZE (PBITMAPCOREINFO, 4) - TEST_TYPE_ALIGN (PBITMAPCOREINFO, 4) - TEST_TARGET_SIZE (PBITMAPCOREINFO, 16) - TEST_TARGET_ALIGN(PBITMAPCOREINFO, 4) -} - -static void test_pack_PBITMAPFILEHEADER(void) -{ - /* PBITMAPFILEHEADER */ - TEST_TYPE_SIZE (PBITMAPFILEHEADER, 4) - TEST_TYPE_ALIGN (PBITMAPFILEHEADER, 4) - TEST_TARGET_SIZE (PBITMAPFILEHEADER, 14) - TEST_TARGET_ALIGN(PBITMAPFILEHEADER, 2) -} - -static void test_pack_PBITMAPINFO(void) -{ - /* PBITMAPINFO */ - TEST_TYPE_SIZE (PBITMAPINFO, 4) - TEST_TYPE_ALIGN (PBITMAPINFO, 4) - TEST_TARGET_SIZE (PBITMAPINFO, 44) - TEST_TARGET_ALIGN(PBITMAPINFO, 4) -} - -static void test_pack_PBITMAPINFOHEADER(void) -{ - /* PBITMAPINFOHEADER */ - TEST_TYPE_SIZE (PBITMAPINFOHEADER, 4) - TEST_TYPE_ALIGN (PBITMAPINFOHEADER, 4) - TEST_TARGET_SIZE (PBITMAPINFOHEADER, 40) - TEST_TARGET_ALIGN(PBITMAPINFOHEADER, 4) -} - -static void test_pack_PBITMAPV4HEADER(void) -{ - /* PBITMAPV4HEADER */ - TEST_TYPE_SIZE (PBITMAPV4HEADER, 4) - TEST_TYPE_ALIGN (PBITMAPV4HEADER, 4) - TEST_TARGET_SIZE (PBITMAPV4HEADER, 108) - TEST_TARGET_ALIGN(PBITMAPV4HEADER, 4) -} - -static void test_pack_PBITMAPV5HEADER(void) -{ - /* PBITMAPV5HEADER */ - TEST_TYPE_SIZE (PBITMAPV5HEADER, 4) - TEST_TYPE_ALIGN (PBITMAPV5HEADER, 4) - TEST_TARGET_SIZE (PBITMAPV5HEADER, 124) - TEST_TARGET_ALIGN(PBITMAPV5HEADER, 4) -} - -static void test_pack_PBLENDFUNCTION(void) -{ - /* PBLENDFUNCTION */ - TEST_TYPE_SIZE (PBLENDFUNCTION, 4) - TEST_TYPE_ALIGN (PBLENDFUNCTION, 4) - TEST_TARGET_SIZE (PBLENDFUNCTION, 4) - TEST_TARGET_ALIGN(PBLENDFUNCTION, 1) -} - -static void test_pack_PCHARSETINFO(void) -{ - /* PCHARSETINFO */ - TEST_TYPE_SIZE (PCHARSETINFO, 4) - TEST_TYPE_ALIGN (PCHARSETINFO, 4) - TEST_TARGET_SIZE (PCHARSETINFO, 32) - TEST_TARGET_ALIGN(PCHARSETINFO, 4) -} - -static void test_pack_PCOLORADJUSTMENT(void) -{ - /* PCOLORADJUSTMENT */ - TEST_TYPE_SIZE (PCOLORADJUSTMENT, 4) - TEST_TYPE_ALIGN (PCOLORADJUSTMENT, 4) - TEST_TARGET_SIZE (PCOLORADJUSTMENT, 24) - TEST_TARGET_ALIGN(PCOLORADJUSTMENT, 2) -} - -static void test_pack_PDEVMODEA(void) -{ - /* PDEVMODEA */ - TEST_TYPE_SIZE (PDEVMODEA, 4) - TEST_TYPE_ALIGN (PDEVMODEA, 4) -} - -static void test_pack_PDEVMODEW(void) -{ - /* PDEVMODEW */ - TEST_TYPE_SIZE (PDEVMODEW, 4) - TEST_TYPE_ALIGN (PDEVMODEW, 4) -} - -static void test_pack_PDIBSECTION(void) -{ - /* PDIBSECTION */ - TEST_TYPE_SIZE (PDIBSECTION, 4) - TEST_TYPE_ALIGN (PDIBSECTION, 4) - TEST_TARGET_SIZE (PDIBSECTION, 84) - TEST_TARGET_ALIGN(PDIBSECTION, 4) -} - -static void test_pack_PDISPLAY_DEVICEA(void) -{ - /* PDISPLAY_DEVICEA */ - TEST_TYPE_SIZE (PDISPLAY_DEVICEA, 4) - TEST_TYPE_ALIGN (PDISPLAY_DEVICEA, 4) - TEST_TARGET_SIZE (PDISPLAY_DEVICEA, 424) - TEST_TARGET_ALIGN(PDISPLAY_DEVICEA, 4) -} - -static void test_pack_PDISPLAY_DEVICEW(void) -{ - /* PDISPLAY_DEVICEW */ - TEST_TYPE_SIZE (PDISPLAY_DEVICEW, 4) - TEST_TYPE_ALIGN (PDISPLAY_DEVICEW, 4) - TEST_TARGET_SIZE (PDISPLAY_DEVICEW, 840) - TEST_TARGET_ALIGN(PDISPLAY_DEVICEW, 4) -} - -static void test_pack_PELARRAY(void) -{ - /* PELARRAY */ - TEST_TYPE_SIZE (PELARRAY, 20) - TEST_TYPE_ALIGN (PELARRAY, 4) - TEST_FIELD_SIZE (PELARRAY, paXCount, 4) - TEST_FIELD_ALIGN (PELARRAY, paXCount, 4) - TEST_FIELD_OFFSET(PELARRAY, paXCount, 0) - TEST_FIELD_SIZE (PELARRAY, paYCount, 4) - TEST_FIELD_ALIGN (PELARRAY, paYCount, 4) - TEST_FIELD_OFFSET(PELARRAY, paYCount, 4) - TEST_FIELD_SIZE (PELARRAY, paXExt, 4) - TEST_FIELD_ALIGN (PELARRAY, paXExt, 4) - TEST_FIELD_OFFSET(PELARRAY, paXExt, 8) - TEST_FIELD_SIZE (PELARRAY, paYExt, 4) - TEST_FIELD_ALIGN (PELARRAY, paYExt, 4) - TEST_FIELD_OFFSET(PELARRAY, paYExt, 12) - TEST_FIELD_SIZE (PELARRAY, paRGBs, 1) - TEST_FIELD_ALIGN (PELARRAY, paRGBs, 1) - TEST_FIELD_OFFSET(PELARRAY, paRGBs, 16) -} - -static void test_pack_PEMR(void) -{ - /* PEMR */ - TEST_TYPE_SIZE (PEMR, 4) - TEST_TYPE_ALIGN (PEMR, 4) - TEST_TARGET_SIZE (PEMR, 8) - TEST_TARGET_ALIGN(PEMR, 4) -} - -static void test_pack_PEMRABORTPATH(void) -{ - /* PEMRABORTPATH */ - TEST_TYPE_SIZE (PEMRABORTPATH, 4) - TEST_TYPE_ALIGN (PEMRABORTPATH, 4) - TEST_TARGET_SIZE (PEMRABORTPATH, 8) - TEST_TARGET_ALIGN(PEMRABORTPATH, 4) -} - -static void test_pack_PEMRANGLEARC(void) -{ - /* PEMRANGLEARC */ - TEST_TYPE_SIZE (PEMRANGLEARC, 4) - TEST_TYPE_ALIGN (PEMRANGLEARC, 4) - TEST_TARGET_SIZE (PEMRANGLEARC, 28) - TEST_TARGET_ALIGN(PEMRANGLEARC, 4) -} - -static void test_pack_PEMRARC(void) -{ - /* PEMRARC */ - TEST_TYPE_SIZE (PEMRARC, 4) - TEST_TYPE_ALIGN (PEMRARC, 4) - TEST_TARGET_SIZE (PEMRARC, 40) - TEST_TARGET_ALIGN(PEMRARC, 4) -} - -static void test_pack_PEMRARCTO(void) -{ - /* PEMRARCTO */ - TEST_TYPE_SIZE (PEMRARCTO, 4) - TEST_TYPE_ALIGN (PEMRARCTO, 4) - TEST_TARGET_SIZE (PEMRARCTO, 40) - TEST_TARGET_ALIGN(PEMRARCTO, 4) -} - -static void test_pack_PEMRBEGINPATH(void) -{ - /* PEMRBEGINPATH */ - TEST_TYPE_SIZE (PEMRBEGINPATH, 4) - TEST_TYPE_ALIGN (PEMRBEGINPATH, 4) - TEST_TARGET_SIZE (PEMRBEGINPATH, 8) - TEST_TARGET_ALIGN(PEMRBEGINPATH, 4) -} - -static void test_pack_PEMRBITBLT(void) -{ - /* PEMRBITBLT */ - TEST_TYPE_SIZE (PEMRBITBLT, 4) - TEST_TYPE_ALIGN (PEMRBITBLT, 4) - TEST_TARGET_SIZE (PEMRBITBLT, 100) - TEST_TARGET_ALIGN(PEMRBITBLT, 4) -} - -static void test_pack_PEMRCHORD(void) -{ - /* PEMRCHORD */ - TEST_TYPE_SIZE (PEMRCHORD, 4) - TEST_TYPE_ALIGN (PEMRCHORD, 4) - TEST_TARGET_SIZE (PEMRCHORD, 40) - TEST_TARGET_ALIGN(PEMRCHORD, 4) -} - -static void test_pack_PEMRCLOSEFIGURE(void) -{ - /* PEMRCLOSEFIGURE */ - TEST_TYPE_SIZE (PEMRCLOSEFIGURE, 4) - TEST_TYPE_ALIGN (PEMRCLOSEFIGURE, 4) - TEST_TARGET_SIZE (PEMRCLOSEFIGURE, 8) - TEST_TARGET_ALIGN(PEMRCLOSEFIGURE, 4) -} - -static void test_pack_PEMRCREATEBRUSHINDIRECT(void) -{ - /* PEMRCREATEBRUSHINDIRECT */ - TEST_TYPE_SIZE (PEMRCREATEBRUSHINDIRECT, 4) - TEST_TYPE_ALIGN (PEMRCREATEBRUSHINDIRECT, 4) - TEST_TARGET_SIZE (PEMRCREATEBRUSHINDIRECT, 24) - TEST_TARGET_ALIGN(PEMRCREATEBRUSHINDIRECT, 4) -} - -static void test_pack_PEMRCREATECOLORSPACE(void) -{ - /* PEMRCREATECOLORSPACE */ - TEST_TYPE_SIZE (PEMRCREATECOLORSPACE, 4) - TEST_TYPE_ALIGN (PEMRCREATECOLORSPACE, 4) - TEST_TARGET_SIZE (PEMRCREATECOLORSPACE, 340) - TEST_TARGET_ALIGN(PEMRCREATECOLORSPACE, 4) -} - -static void test_pack_PEMRCREATECOLORSPACEW(void) -{ - /* PEMRCREATECOLORSPACEW */ - TEST_TYPE_SIZE (PEMRCREATECOLORSPACEW, 4) - TEST_TYPE_ALIGN (PEMRCREATECOLORSPACEW, 4) - TEST_TARGET_SIZE (PEMRCREATECOLORSPACEW, 612) - TEST_TARGET_ALIGN(PEMRCREATECOLORSPACEW, 4) -} - -static void test_pack_PEMRCREATEDIBPATTERNBRUSHPT(void) -{ - /* PEMRCREATEDIBPATTERNBRUSHPT */ - TEST_TYPE_SIZE (PEMRCREATEDIBPATTERNBRUSHPT, 4) - TEST_TYPE_ALIGN (PEMRCREATEDIBPATTERNBRUSHPT, 4) - TEST_TARGET_SIZE (PEMRCREATEDIBPATTERNBRUSHPT, 32) - TEST_TARGET_ALIGN(PEMRCREATEDIBPATTERNBRUSHPT, 4) -} - -static void test_pack_PEMRCREATEMONOBRUSH(void) -{ - /* PEMRCREATEMONOBRUSH */ - TEST_TYPE_SIZE (PEMRCREATEMONOBRUSH, 4) - TEST_TYPE_ALIGN (PEMRCREATEMONOBRUSH, 4) - TEST_TARGET_SIZE (PEMRCREATEMONOBRUSH, 32) - TEST_TARGET_ALIGN(PEMRCREATEMONOBRUSH, 4) -} - -static void test_pack_PEMRCREATEPALETTE(void) -{ - /* PEMRCREATEPALETTE */ - TEST_TYPE_SIZE (PEMRCREATEPALETTE, 4) - TEST_TYPE_ALIGN (PEMRCREATEPALETTE, 4) - TEST_TARGET_SIZE (PEMRCREATEPALETTE, 20) - TEST_TARGET_ALIGN(PEMRCREATEPALETTE, 4) -} - -static void test_pack_PEMRCREATEPEN(void) -{ - /* PEMRCREATEPEN */ - TEST_TYPE_SIZE (PEMRCREATEPEN, 4) - TEST_TYPE_ALIGN (PEMRCREATEPEN, 4) - TEST_TARGET_SIZE (PEMRCREATEPEN, 28) - TEST_TARGET_ALIGN(PEMRCREATEPEN, 4) -} - -static void test_pack_PEMRDELETECOLORSPACE(void) -{ - /* PEMRDELETECOLORSPACE */ - TEST_TYPE_SIZE (PEMRDELETECOLORSPACE, 4) - TEST_TYPE_ALIGN (PEMRDELETECOLORSPACE, 4) - TEST_TARGET_SIZE (PEMRDELETECOLORSPACE, 12) - TEST_TARGET_ALIGN(PEMRDELETECOLORSPACE, 4) -} - -static void test_pack_PEMRDELETEOBJECT(void) -{ - /* PEMRDELETEOBJECT */ - TEST_TYPE_SIZE (PEMRDELETEOBJECT, 4) - TEST_TYPE_ALIGN (PEMRDELETEOBJECT, 4) - TEST_TARGET_SIZE (PEMRDELETEOBJECT, 12) - TEST_TARGET_ALIGN(PEMRDELETEOBJECT, 4) -} - -static void test_pack_PEMRELLIPSE(void) -{ - /* PEMRELLIPSE */ - TEST_TYPE_SIZE (PEMRELLIPSE, 4) - TEST_TYPE_ALIGN (PEMRELLIPSE, 4) - TEST_TARGET_SIZE (PEMRELLIPSE, 24) - TEST_TARGET_ALIGN(PEMRELLIPSE, 4) -} - -static void test_pack_PEMRENDPATH(void) -{ - /* PEMRENDPATH */ - TEST_TYPE_SIZE (PEMRENDPATH, 4) - TEST_TYPE_ALIGN (PEMRENDPATH, 4) - TEST_TARGET_SIZE (PEMRENDPATH, 8) - TEST_TARGET_ALIGN(PEMRENDPATH, 4) -} - -static void test_pack_PEMREOF(void) -{ - /* PEMREOF */ - TEST_TYPE_SIZE (PEMREOF, 4) - TEST_TYPE_ALIGN (PEMREOF, 4) - TEST_TARGET_SIZE (PEMREOF, 20) - TEST_TARGET_ALIGN(PEMREOF, 4) -} - -static void test_pack_PEMREXCLUDECLIPRECT(void) -{ - /* PEMREXCLUDECLIPRECT */ - TEST_TYPE_SIZE (PEMREXCLUDECLIPRECT, 4) - TEST_TYPE_ALIGN (PEMREXCLUDECLIPRECT, 4) - TEST_TARGET_SIZE (PEMREXCLUDECLIPRECT, 24) - TEST_TARGET_ALIGN(PEMREXCLUDECLIPRECT, 4) -} - -static void test_pack_PEMREXTCREATEFONTINDIRECTW(void) -{ - /* PEMREXTCREATEFONTINDIRECTW */ - TEST_TYPE_SIZE (PEMREXTCREATEFONTINDIRECTW, 4) - TEST_TYPE_ALIGN (PEMREXTCREATEFONTINDIRECTW, 4) - TEST_TARGET_SIZE (PEMREXTCREATEFONTINDIRECTW, 332) - TEST_TARGET_ALIGN(PEMREXTCREATEFONTINDIRECTW, 4) -} - -static void test_pack_PEMREXTCREATEPEN(void) -{ - /* PEMREXTCREATEPEN */ - TEST_TYPE_SIZE (PEMREXTCREATEPEN, 4) - TEST_TYPE_ALIGN (PEMREXTCREATEPEN, 4) - TEST_TARGET_SIZE (PEMREXTCREATEPEN, 56) - TEST_TARGET_ALIGN(PEMREXTCREATEPEN, 4) -} - -static void test_pack_PEMREXTFLOODFILL(void) -{ - /* PEMREXTFLOODFILL */ - TEST_TYPE_SIZE (PEMREXTFLOODFILL, 4) - TEST_TYPE_ALIGN (PEMREXTFLOODFILL, 4) - TEST_TARGET_SIZE (PEMREXTFLOODFILL, 24) - TEST_TARGET_ALIGN(PEMREXTFLOODFILL, 4) -} - -static void test_pack_PEMREXTSELECTCLIPRGN(void) -{ - /* PEMREXTSELECTCLIPRGN */ - TEST_TYPE_SIZE (PEMREXTSELECTCLIPRGN, 4) - TEST_TYPE_ALIGN (PEMREXTSELECTCLIPRGN, 4) - TEST_TARGET_SIZE (PEMREXTSELECTCLIPRGN, 20) - TEST_TARGET_ALIGN(PEMREXTSELECTCLIPRGN, 4) -} - -static void test_pack_PEMREXTTEXTOUTA(void) -{ - /* PEMREXTTEXTOUTA */ - TEST_TYPE_SIZE (PEMREXTTEXTOUTA, 4) - TEST_TYPE_ALIGN (PEMREXTTEXTOUTA, 4) - TEST_TARGET_SIZE (PEMREXTTEXTOUTA, 76) - TEST_TARGET_ALIGN(PEMREXTTEXTOUTA, 4) -} - -static void test_pack_PEMREXTTEXTOUTW(void) -{ - /* PEMREXTTEXTOUTW */ - TEST_TYPE_SIZE (PEMREXTTEXTOUTW, 4) - TEST_TYPE_ALIGN (PEMREXTTEXTOUTW, 4) - TEST_TARGET_SIZE (PEMREXTTEXTOUTW, 76) - TEST_TARGET_ALIGN(PEMREXTTEXTOUTW, 4) -} - -static void test_pack_PEMRFILLPATH(void) -{ - /* PEMRFILLPATH */ - TEST_TYPE_SIZE (PEMRFILLPATH, 4) - TEST_TYPE_ALIGN (PEMRFILLPATH, 4) - TEST_TARGET_SIZE (PEMRFILLPATH, 24) - TEST_TARGET_ALIGN(PEMRFILLPATH, 4) -} - -static void test_pack_PEMRFILLRGN(void) -{ - /* PEMRFILLRGN */ - TEST_TYPE_SIZE (PEMRFILLRGN, 4) - TEST_TYPE_ALIGN (PEMRFILLRGN, 4) - TEST_TARGET_SIZE (PEMRFILLRGN, 36) - TEST_TARGET_ALIGN(PEMRFILLRGN, 4) -} - -static void test_pack_PEMRFLATTENPATH(void) -{ - /* PEMRFLATTENPATH */ - TEST_TYPE_SIZE (PEMRFLATTENPATH, 4) - TEST_TYPE_ALIGN (PEMRFLATTENPATH, 4) - TEST_TARGET_SIZE (PEMRFLATTENPATH, 8) - TEST_TARGET_ALIGN(PEMRFLATTENPATH, 4) -} - -static void test_pack_PEMRFORMAT(void) -{ - /* PEMRFORMAT */ - TEST_TYPE_SIZE (PEMRFORMAT, 4) - TEST_TYPE_ALIGN (PEMRFORMAT, 4) - TEST_TARGET_SIZE (PEMRFORMAT, 16) - TEST_TARGET_ALIGN(PEMRFORMAT, 4) -} - -static void test_pack_PEMRFRAMERGN(void) -{ - /* PEMRFRAMERGN */ - TEST_TYPE_SIZE (PEMRFRAMERGN, 4) - TEST_TYPE_ALIGN (PEMRFRAMERGN, 4) - TEST_TARGET_SIZE (PEMRFRAMERGN, 44) - TEST_TARGET_ALIGN(PEMRFRAMERGN, 4) -} - -static void test_pack_PEMRGDICOMMENT(void) -{ - /* PEMRGDICOMMENT */ - TEST_TYPE_SIZE (PEMRGDICOMMENT, 4) - TEST_TYPE_ALIGN (PEMRGDICOMMENT, 4) - TEST_TARGET_SIZE (PEMRGDICOMMENT, 16) - TEST_TARGET_ALIGN(PEMRGDICOMMENT, 4) -} - -static void test_pack_PEMRGLSBOUNDEDRECORD(void) -{ - /* PEMRGLSBOUNDEDRECORD */ - TEST_TYPE_SIZE (PEMRGLSBOUNDEDRECORD, 4) - TEST_TYPE_ALIGN (PEMRGLSBOUNDEDRECORD, 4) - TEST_TARGET_SIZE (PEMRGLSBOUNDEDRECORD, 32) - TEST_TARGET_ALIGN(PEMRGLSBOUNDEDRECORD, 4) -} - -static void test_pack_PEMRGLSRECORD(void) -{ - /* PEMRGLSRECORD */ - TEST_TYPE_SIZE (PEMRGLSRECORD, 4) - TEST_TYPE_ALIGN (PEMRGLSRECORD, 4) - TEST_TARGET_SIZE (PEMRGLSRECORD, 16) - TEST_TARGET_ALIGN(PEMRGLSRECORD, 4) -} - -static void test_pack_PEMRINTERSECTCLIPRECT(void) -{ - /* PEMRINTERSECTCLIPRECT */ - TEST_TYPE_SIZE (PEMRINTERSECTCLIPRECT, 4) - TEST_TYPE_ALIGN (PEMRINTERSECTCLIPRECT, 4) - TEST_TARGET_SIZE (PEMRINTERSECTCLIPRECT, 24) - TEST_TARGET_ALIGN(PEMRINTERSECTCLIPRECT, 4) -} - -static void test_pack_PEMRINVERTRGN(void) -{ - /* PEMRINVERTRGN */ - TEST_TYPE_SIZE (PEMRINVERTRGN, 4) - TEST_TYPE_ALIGN (PEMRINVERTRGN, 4) - TEST_TARGET_SIZE (PEMRINVERTRGN, 32) - TEST_TARGET_ALIGN(PEMRINVERTRGN, 4) -} - -static void test_pack_PEMRLINETO(void) -{ - /* PEMRLINETO */ - TEST_TYPE_SIZE (PEMRLINETO, 4) - TEST_TYPE_ALIGN (PEMRLINETO, 4) - TEST_TARGET_SIZE (PEMRLINETO, 16) - TEST_TARGET_ALIGN(PEMRLINETO, 4) -} - -static void test_pack_PEMRMASKBLT(void) -{ - /* PEMRMASKBLT */ - TEST_TYPE_SIZE (PEMRMASKBLT, 4) - TEST_TYPE_ALIGN (PEMRMASKBLT, 4) - TEST_TARGET_SIZE (PEMRMASKBLT, 128) - TEST_TARGET_ALIGN(PEMRMASKBLT, 4) -} - -static void test_pack_PEMRMODIFYWORLDTRANSFORM(void) -{ - /* PEMRMODIFYWORLDTRANSFORM */ - TEST_TYPE_SIZE (PEMRMODIFYWORLDTRANSFORM, 4) - TEST_TYPE_ALIGN (PEMRMODIFYWORLDTRANSFORM, 4) - TEST_TARGET_SIZE (PEMRMODIFYWORLDTRANSFORM, 36) - TEST_TARGET_ALIGN(PEMRMODIFYWORLDTRANSFORM, 4) -} - -static void test_pack_PEMRMOVETOEX(void) -{ - /* PEMRMOVETOEX */ - TEST_TYPE_SIZE (PEMRMOVETOEX, 4) - TEST_TYPE_ALIGN (PEMRMOVETOEX, 4) - TEST_TARGET_SIZE (PEMRMOVETOEX, 16) - TEST_TARGET_ALIGN(PEMRMOVETOEX, 4) -} - -static void test_pack_PEMROFFSETCLIPRGN(void) -{ - /* PEMROFFSETCLIPRGN */ - TEST_TYPE_SIZE (PEMROFFSETCLIPRGN, 4) - TEST_TYPE_ALIGN (PEMROFFSETCLIPRGN, 4) - TEST_TARGET_SIZE (PEMROFFSETCLIPRGN, 16) - TEST_TARGET_ALIGN(PEMROFFSETCLIPRGN, 4) -} - -static void test_pack_PEMRPAINTRGN(void) -{ - /* PEMRPAINTRGN */ - TEST_TYPE_SIZE (PEMRPAINTRGN, 4) - TEST_TYPE_ALIGN (PEMRPAINTRGN, 4) - TEST_TARGET_SIZE (PEMRPAINTRGN, 32) - TEST_TARGET_ALIGN(PEMRPAINTRGN, 4) -} - -static void test_pack_PEMRPIE(void) -{ - /* PEMRPIE */ - TEST_TYPE_SIZE (PEMRPIE, 4) - TEST_TYPE_ALIGN (PEMRPIE, 4) - TEST_TARGET_SIZE (PEMRPIE, 40) - TEST_TARGET_ALIGN(PEMRPIE, 4) -} - -static void test_pack_PEMRPIXELFORMAT(void) -{ - /* PEMRPIXELFORMAT */ - TEST_TYPE_SIZE (PEMRPIXELFORMAT, 4) - TEST_TYPE_ALIGN (PEMRPIXELFORMAT, 4) - TEST_TARGET_SIZE (PEMRPIXELFORMAT, 48) - TEST_TARGET_ALIGN(PEMRPIXELFORMAT, 4) -} - -static void test_pack_PEMRPLGBLT(void) -{ - /* PEMRPLGBLT */ - TEST_TYPE_SIZE (PEMRPLGBLT, 4) - TEST_TYPE_ALIGN (PEMRPLGBLT, 4) - TEST_TARGET_SIZE (PEMRPLGBLT, 140) - TEST_TARGET_ALIGN(PEMRPLGBLT, 4) -} - -static void test_pack_PEMRPOLYBEZIER(void) -{ - /* PEMRPOLYBEZIER */ - TEST_TYPE_SIZE (PEMRPOLYBEZIER, 4) - TEST_TYPE_ALIGN (PEMRPOLYBEZIER, 4) - TEST_TARGET_SIZE (PEMRPOLYBEZIER, 36) - TEST_TARGET_ALIGN(PEMRPOLYBEZIER, 4) -} - -static void test_pack_PEMRPOLYBEZIER16(void) -{ - /* PEMRPOLYBEZIER16 */ - TEST_TYPE_SIZE (PEMRPOLYBEZIER16, 4) - TEST_TYPE_ALIGN (PEMRPOLYBEZIER16, 4) - TEST_TARGET_SIZE (PEMRPOLYBEZIER16, 32) - TEST_TARGET_ALIGN(PEMRPOLYBEZIER16, 4) -} - -static void test_pack_PEMRPOLYBEZIERTO(void) -{ - /* PEMRPOLYBEZIERTO */ - TEST_TYPE_SIZE (PEMRPOLYBEZIERTO, 4) - TEST_TYPE_ALIGN (PEMRPOLYBEZIERTO, 4) - TEST_TARGET_SIZE (PEMRPOLYBEZIERTO, 36) - TEST_TARGET_ALIGN(PEMRPOLYBEZIERTO, 4) -} - -static void test_pack_PEMRPOLYBEZIERTO16(void) -{ - /* PEMRPOLYBEZIERTO16 */ - TEST_TYPE_SIZE (PEMRPOLYBEZIERTO16, 4) - TEST_TYPE_ALIGN (PEMRPOLYBEZIERTO16, 4) - TEST_TARGET_SIZE (PEMRPOLYBEZIERTO16, 32) - TEST_TARGET_ALIGN(PEMRPOLYBEZIERTO16, 4) -} - -static void test_pack_PEMRPOLYDRAW(void) -{ - /* PEMRPOLYDRAW */ - TEST_TYPE_SIZE (PEMRPOLYDRAW, 4) - TEST_TYPE_ALIGN (PEMRPOLYDRAW, 4) - TEST_TARGET_SIZE (PEMRPOLYDRAW, 40) - TEST_TARGET_ALIGN(PEMRPOLYDRAW, 4) -} - -static void test_pack_PEMRPOLYDRAW16(void) -{ - /* PEMRPOLYDRAW16 */ - TEST_TYPE_SIZE (PEMRPOLYDRAW16, 4) - TEST_TYPE_ALIGN (PEMRPOLYDRAW16, 4) - TEST_TARGET_SIZE (PEMRPOLYDRAW16, 36) - TEST_TARGET_ALIGN(PEMRPOLYDRAW16, 4) -} - -static void test_pack_PEMRPOLYGON(void) -{ - /* PEMRPOLYGON */ - TEST_TYPE_SIZE (PEMRPOLYGON, 4) - TEST_TYPE_ALIGN (PEMRPOLYGON, 4) - TEST_TARGET_SIZE (PEMRPOLYGON, 36) - TEST_TARGET_ALIGN(PEMRPOLYGON, 4) -} - -static void test_pack_PEMRPOLYGON16(void) -{ - /* PEMRPOLYGON16 */ - TEST_TYPE_SIZE (PEMRPOLYGON16, 4) - TEST_TYPE_ALIGN (PEMRPOLYGON16, 4) - TEST_TARGET_SIZE (PEMRPOLYGON16, 32) - TEST_TARGET_ALIGN(PEMRPOLYGON16, 4) -} - -static void test_pack_PEMRPOLYLINE(void) -{ - /* PEMRPOLYLINE */ - TEST_TYPE_SIZE (PEMRPOLYLINE, 4) - TEST_TYPE_ALIGN (PEMRPOLYLINE, 4) - TEST_TARGET_SIZE (PEMRPOLYLINE, 36) - TEST_TARGET_ALIGN(PEMRPOLYLINE, 4) -} - -static void test_pack_PEMRPOLYLINE16(void) -{ - /* PEMRPOLYLINE16 */ - TEST_TYPE_SIZE (PEMRPOLYLINE16, 4) - TEST_TYPE_ALIGN (PEMRPOLYLINE16, 4) - TEST_TARGET_SIZE (PEMRPOLYLINE16, 32) - TEST_TARGET_ALIGN(PEMRPOLYLINE16, 4) -} - -static void test_pack_PEMRPOLYLINETO(void) -{ - /* PEMRPOLYLINETO */ - TEST_TYPE_SIZE (PEMRPOLYLINETO, 4) - TEST_TYPE_ALIGN (PEMRPOLYLINETO, 4) - TEST_TARGET_SIZE (PEMRPOLYLINETO, 36) - TEST_TARGET_ALIGN(PEMRPOLYLINETO, 4) -} - -static void test_pack_PEMRPOLYLINETO16(void) -{ - /* PEMRPOLYLINETO16 */ - TEST_TYPE_SIZE (PEMRPOLYLINETO16, 4) - TEST_TYPE_ALIGN (PEMRPOLYLINETO16, 4) - TEST_TARGET_SIZE (PEMRPOLYLINETO16, 32) - TEST_TARGET_ALIGN(PEMRPOLYLINETO16, 4) -} - -static void test_pack_PEMRPOLYPOLYGON(void) -{ - /* PEMRPOLYPOLYGON */ - TEST_TYPE_SIZE (PEMRPOLYPOLYGON, 4) - TEST_TYPE_ALIGN (PEMRPOLYPOLYGON, 4) - TEST_TARGET_SIZE (PEMRPOLYPOLYGON, 44) - TEST_TARGET_ALIGN(PEMRPOLYPOLYGON, 4) -} - -static void test_pack_PEMRPOLYPOLYGON16(void) -{ - /* PEMRPOLYPOLYGON16 */ - TEST_TYPE_SIZE (PEMRPOLYPOLYGON16, 4) - TEST_TYPE_ALIGN (PEMRPOLYPOLYGON16, 4) - TEST_TARGET_SIZE (PEMRPOLYPOLYGON16, 40) - TEST_TARGET_ALIGN(PEMRPOLYPOLYGON16, 4) -} - -static void test_pack_PEMRPOLYPOLYLINE(void) -{ - /* PEMRPOLYPOLYLINE */ - TEST_TYPE_SIZE (PEMRPOLYPOLYLINE, 4) - TEST_TYPE_ALIGN (PEMRPOLYPOLYLINE, 4) - TEST_TARGET_SIZE (PEMRPOLYPOLYLINE, 44) - TEST_TARGET_ALIGN(PEMRPOLYPOLYLINE, 4) -} - -static void test_pack_PEMRPOLYPOLYLINE16(void) -{ - /* PEMRPOLYPOLYLINE16 */ - TEST_TYPE_SIZE (PEMRPOLYPOLYLINE16, 4) - TEST_TYPE_ALIGN (PEMRPOLYPOLYLINE16, 4) - TEST_TARGET_SIZE (PEMRPOLYPOLYLINE16, 40) - TEST_TARGET_ALIGN(PEMRPOLYPOLYLINE16, 4) -} - -static void test_pack_PEMRPOLYTEXTOUTA(void) -{ - /* PEMRPOLYTEXTOUTA */ - TEST_TYPE_SIZE (PEMRPOLYTEXTOUTA, 4) - TEST_TYPE_ALIGN (PEMRPOLYTEXTOUTA, 4) - TEST_TARGET_SIZE (PEMRPOLYTEXTOUTA, 80) - TEST_TARGET_ALIGN(PEMRPOLYTEXTOUTA, 4) -} - -static void test_pack_PEMRPOLYTEXTOUTW(void) -{ - /* PEMRPOLYTEXTOUTW */ - TEST_TYPE_SIZE (PEMRPOLYTEXTOUTW, 4) - TEST_TYPE_ALIGN (PEMRPOLYTEXTOUTW, 4) - TEST_TARGET_SIZE (PEMRPOLYTEXTOUTW, 80) - TEST_TARGET_ALIGN(PEMRPOLYTEXTOUTW, 4) -} - -static void test_pack_PEMRREALIZEPALETTE(void) -{ - /* PEMRREALIZEPALETTE */ - TEST_TYPE_SIZE (PEMRREALIZEPALETTE, 4) - TEST_TYPE_ALIGN (PEMRREALIZEPALETTE, 4) - TEST_TARGET_SIZE (PEMRREALIZEPALETTE, 8) - TEST_TARGET_ALIGN(PEMRREALIZEPALETTE, 4) -} - -static void test_pack_PEMRRECTANGLE(void) -{ - /* PEMRRECTANGLE */ - TEST_TYPE_SIZE (PEMRRECTANGLE, 4) - TEST_TYPE_ALIGN (PEMRRECTANGLE, 4) - TEST_TARGET_SIZE (PEMRRECTANGLE, 24) - TEST_TARGET_ALIGN(PEMRRECTANGLE, 4) -} - -static void test_pack_PEMRRESIZEPALETTE(void) -{ - /* PEMRRESIZEPALETTE */ - TEST_TYPE_SIZE (PEMRRESIZEPALETTE, 4) - TEST_TYPE_ALIGN (PEMRRESIZEPALETTE, 4) - TEST_TARGET_SIZE (PEMRRESIZEPALETTE, 16) - TEST_TARGET_ALIGN(PEMRRESIZEPALETTE, 4) -} - -static void test_pack_PEMRRESTOREDC(void) -{ - /* PEMRRESTOREDC */ - TEST_TYPE_SIZE (PEMRRESTOREDC, 4) - TEST_TYPE_ALIGN (PEMRRESTOREDC, 4) - TEST_TARGET_SIZE (PEMRRESTOREDC, 12) - TEST_TARGET_ALIGN(PEMRRESTOREDC, 4) -} - -static void test_pack_PEMRROUNDRECT(void) -{ - /* PEMRROUNDRECT */ - TEST_TYPE_SIZE (PEMRROUNDRECT, 4) - TEST_TYPE_ALIGN (PEMRROUNDRECT, 4) - TEST_TARGET_SIZE (PEMRROUNDRECT, 32) - TEST_TARGET_ALIGN(PEMRROUNDRECT, 4) -} - -static void test_pack_PEMRSAVEDC(void) -{ - /* PEMRSAVEDC */ - TEST_TYPE_SIZE (PEMRSAVEDC, 4) - TEST_TYPE_ALIGN (PEMRSAVEDC, 4) - TEST_TARGET_SIZE (PEMRSAVEDC, 8) - TEST_TARGET_ALIGN(PEMRSAVEDC, 4) -} - -static void test_pack_PEMRSCALEVIEWPORTEXTEX(void) -{ - /* PEMRSCALEVIEWPORTEXTEX */ - TEST_TYPE_SIZE (PEMRSCALEVIEWPORTEXTEX, 4) - TEST_TYPE_ALIGN (PEMRSCALEVIEWPORTEXTEX, 4) - TEST_TARGET_SIZE (PEMRSCALEVIEWPORTEXTEX, 24) - TEST_TARGET_ALIGN(PEMRSCALEVIEWPORTEXTEX, 4) -} - -static void test_pack_PEMRSCALEWINDOWEXTEX(void) -{ - /* PEMRSCALEWINDOWEXTEX */ - TEST_TYPE_SIZE (PEMRSCALEWINDOWEXTEX, 4) - TEST_TYPE_ALIGN (PEMRSCALEWINDOWEXTEX, 4) - TEST_TARGET_SIZE (PEMRSCALEWINDOWEXTEX, 24) - TEST_TARGET_ALIGN(PEMRSCALEWINDOWEXTEX, 4) -} - -static void test_pack_PEMRSELECTCLIPPATH(void) -{ - /* PEMRSELECTCLIPPATH */ - TEST_TYPE_SIZE (PEMRSELECTCLIPPATH, 4) - TEST_TYPE_ALIGN (PEMRSELECTCLIPPATH, 4) - TEST_TARGET_SIZE (PEMRSELECTCLIPPATH, 12) - TEST_TARGET_ALIGN(PEMRSELECTCLIPPATH, 4) -} - -static void test_pack_PEMRSELECTCOLORSPACE(void) -{ - /* PEMRSELECTCOLORSPACE */ - TEST_TYPE_SIZE (PEMRSELECTCOLORSPACE, 4) - TEST_TYPE_ALIGN (PEMRSELECTCOLORSPACE, 4) - TEST_TARGET_SIZE (PEMRSELECTCOLORSPACE, 12) - TEST_TARGET_ALIGN(PEMRSELECTCOLORSPACE, 4) -} - -static void test_pack_PEMRSELECTOBJECT(void) -{ - /* PEMRSELECTOBJECT */ - TEST_TYPE_SIZE (PEMRSELECTOBJECT, 4) - TEST_TYPE_ALIGN (PEMRSELECTOBJECT, 4) - TEST_TARGET_SIZE (PEMRSELECTOBJECT, 12) - TEST_TARGET_ALIGN(PEMRSELECTOBJECT, 4) -} - -static void test_pack_PEMRSELECTPALETTE(void) -{ - /* PEMRSELECTPALETTE */ - TEST_TYPE_SIZE (PEMRSELECTPALETTE, 4) - TEST_TYPE_ALIGN (PEMRSELECTPALETTE, 4) - TEST_TARGET_SIZE (PEMRSELECTPALETTE, 12) - TEST_TARGET_ALIGN(PEMRSELECTPALETTE, 4) -} - -static void test_pack_PEMRSETARCDIRECTION(void) -{ - /* PEMRSETARCDIRECTION */ - TEST_TYPE_SIZE (PEMRSETARCDIRECTION, 4) - TEST_TYPE_ALIGN (PEMRSETARCDIRECTION, 4) - TEST_TARGET_SIZE (PEMRSETARCDIRECTION, 12) - TEST_TARGET_ALIGN(PEMRSETARCDIRECTION, 4) -} - -static void test_pack_PEMRSETBKCOLOR(void) -{ - /* PEMRSETBKCOLOR */ - TEST_TYPE_SIZE (PEMRSETBKCOLOR, 4) - TEST_TYPE_ALIGN (PEMRSETBKCOLOR, 4) - TEST_TARGET_SIZE (PEMRSETBKCOLOR, 12) - TEST_TARGET_ALIGN(PEMRSETBKCOLOR, 4) -} - -static void test_pack_PEMRSETBKMODE(void) -{ - /* PEMRSETBKMODE */ - TEST_TYPE_SIZE (PEMRSETBKMODE, 4) - TEST_TYPE_ALIGN (PEMRSETBKMODE, 4) - TEST_TARGET_SIZE (PEMRSETBKMODE, 12) - TEST_TARGET_ALIGN(PEMRSETBKMODE, 4) -} - -static void test_pack_PEMRSETBRUSHORGEX(void) -{ - /* PEMRSETBRUSHORGEX */ - TEST_TYPE_SIZE (PEMRSETBRUSHORGEX, 4) - TEST_TYPE_ALIGN (PEMRSETBRUSHORGEX, 4) - TEST_TARGET_SIZE (PEMRSETBRUSHORGEX, 16) - TEST_TARGET_ALIGN(PEMRSETBRUSHORGEX, 4) -} - -static void test_pack_PEMRSETCOLORADJUSTMENT(void) -{ - /* PEMRSETCOLORADJUSTMENT */ - TEST_TYPE_SIZE (PEMRSETCOLORADJUSTMENT, 4) - TEST_TYPE_ALIGN (PEMRSETCOLORADJUSTMENT, 4) - TEST_TARGET_SIZE (PEMRSETCOLORADJUSTMENT, 32) - TEST_TARGET_ALIGN(PEMRSETCOLORADJUSTMENT, 4) -} - -static void test_pack_PEMRSETCOLORSPACE(void) -{ - /* PEMRSETCOLORSPACE */ - TEST_TYPE_SIZE (PEMRSETCOLORSPACE, 4) - TEST_TYPE_ALIGN (PEMRSETCOLORSPACE, 4) - TEST_TARGET_SIZE (PEMRSETCOLORSPACE, 12) - TEST_TARGET_ALIGN(PEMRSETCOLORSPACE, 4) -} - -static void test_pack_PEMRSETDIBITSTODEVICE(void) -{ - /* PEMRSETDIBITSTODEVICE */ - TEST_TYPE_SIZE (PEMRSETDIBITSTODEVICE, 4) - TEST_TYPE_ALIGN (PEMRSETDIBITSTODEVICE, 4) - TEST_TARGET_SIZE (PEMRSETDIBITSTODEVICE, 76) - TEST_TARGET_ALIGN(PEMRSETDIBITSTODEVICE, 4) -} - -static void test_pack_PEMRSETICMMODE(void) -{ - /* PEMRSETICMMODE */ - TEST_TYPE_SIZE (PEMRSETICMMODE, 4) - TEST_TYPE_ALIGN (PEMRSETICMMODE, 4) - TEST_TARGET_SIZE (PEMRSETICMMODE, 12) - TEST_TARGET_ALIGN(PEMRSETICMMODE, 4) -} - -static void test_pack_PEMRSETLAYOUT(void) -{ - /* PEMRSETLAYOUT */ - TEST_TYPE_SIZE (PEMRSETLAYOUT, 4) - TEST_TYPE_ALIGN (PEMRSETLAYOUT, 4) - TEST_TARGET_SIZE (PEMRSETLAYOUT, 12) - TEST_TARGET_ALIGN(PEMRSETLAYOUT, 4) -} - -static void test_pack_PEMRSETMAPMODE(void) -{ - /* PEMRSETMAPMODE */ - TEST_TYPE_SIZE (PEMRSETMAPMODE, 4) - TEST_TYPE_ALIGN (PEMRSETMAPMODE, 4) - TEST_TARGET_SIZE (PEMRSETMAPMODE, 12) - TEST_TARGET_ALIGN(PEMRSETMAPMODE, 4) -} - -static void test_pack_PEMRSETMAPPERFLAGS(void) -{ - /* PEMRSETMAPPERFLAGS */ - TEST_TYPE_SIZE (PEMRSETMAPPERFLAGS, 4) - TEST_TYPE_ALIGN (PEMRSETMAPPERFLAGS, 4) - TEST_TARGET_SIZE (PEMRSETMAPPERFLAGS, 12) - TEST_TARGET_ALIGN(PEMRSETMAPPERFLAGS, 4) -} - -static void test_pack_PEMRSETMETARGN(void) -{ - /* PEMRSETMETARGN */ - TEST_TYPE_SIZE (PEMRSETMETARGN, 4) - TEST_TYPE_ALIGN (PEMRSETMETARGN, 4) - TEST_TARGET_SIZE (PEMRSETMETARGN, 8) - TEST_TARGET_ALIGN(PEMRSETMETARGN, 4) -} - -static void test_pack_PEMRSETMITERLIMIT(void) -{ - /* PEMRSETMITERLIMIT */ - TEST_TYPE_SIZE (PEMRSETMITERLIMIT, 4) - TEST_TYPE_ALIGN (PEMRSETMITERLIMIT, 4) - TEST_TARGET_SIZE (PEMRSETMITERLIMIT, 12) - TEST_TARGET_ALIGN(PEMRSETMITERLIMIT, 4) -} - -static void test_pack_PEMRSETPALETTEENTRIES(void) -{ - /* PEMRSETPALETTEENTRIES */ - TEST_TYPE_SIZE (PEMRSETPALETTEENTRIES, 4) - TEST_TYPE_ALIGN (PEMRSETPALETTEENTRIES, 4) - TEST_TARGET_SIZE (PEMRSETPALETTEENTRIES, 24) - TEST_TARGET_ALIGN(PEMRSETPALETTEENTRIES, 4) -} - -static void test_pack_PEMRSETPIXELV(void) -{ - /* PEMRSETPIXELV */ - TEST_TYPE_SIZE (PEMRSETPIXELV, 4) - TEST_TYPE_ALIGN (PEMRSETPIXELV, 4) - TEST_TARGET_SIZE (PEMRSETPIXELV, 20) - TEST_TARGET_ALIGN(PEMRSETPIXELV, 4) -} - -static void test_pack_PEMRSETPOLYFILLMODE(void) -{ - /* PEMRSETPOLYFILLMODE */ - TEST_TYPE_SIZE (PEMRSETPOLYFILLMODE, 4) - TEST_TYPE_ALIGN (PEMRSETPOLYFILLMODE, 4) - TEST_TARGET_SIZE (PEMRSETPOLYFILLMODE, 12) - TEST_TARGET_ALIGN(PEMRSETPOLYFILLMODE, 4) -} - -static void test_pack_PEMRSETROP2(void) -{ - /* PEMRSETROP2 */ - TEST_TYPE_SIZE (PEMRSETROP2, 4) - TEST_TYPE_ALIGN (PEMRSETROP2, 4) - TEST_TARGET_SIZE (PEMRSETROP2, 12) - TEST_TARGET_ALIGN(PEMRSETROP2, 4) -} - -static void test_pack_PEMRSETSTRETCHBLTMODE(void) -{ - /* PEMRSETSTRETCHBLTMODE */ - TEST_TYPE_SIZE (PEMRSETSTRETCHBLTMODE, 4) - TEST_TYPE_ALIGN (PEMRSETSTRETCHBLTMODE, 4) - TEST_TARGET_SIZE (PEMRSETSTRETCHBLTMODE, 12) - TEST_TARGET_ALIGN(PEMRSETSTRETCHBLTMODE, 4) -} - -static void test_pack_PEMRSETTEXTALIGN(void) -{ - /* PEMRSETTEXTALIGN */ - TEST_TYPE_SIZE (PEMRSETTEXTALIGN, 4) - TEST_TYPE_ALIGN (PEMRSETTEXTALIGN, 4) - TEST_TARGET_SIZE (PEMRSETTEXTALIGN, 12) - TEST_TARGET_ALIGN(PEMRSETTEXTALIGN, 4) -} - -static void test_pack_PEMRSETTEXTCOLOR(void) -{ - /* PEMRSETTEXTCOLOR */ - TEST_TYPE_SIZE (PEMRSETTEXTCOLOR, 4) - TEST_TYPE_ALIGN (PEMRSETTEXTCOLOR, 4) - TEST_TARGET_SIZE (PEMRSETTEXTCOLOR, 12) - TEST_TARGET_ALIGN(PEMRSETTEXTCOLOR, 4) -} - -static void test_pack_PEMRSETVIEWPORTEXTEX(void) -{ - /* PEMRSETVIEWPORTEXTEX */ - TEST_TYPE_SIZE (PEMRSETVIEWPORTEXTEX, 4) - TEST_TYPE_ALIGN (PEMRSETVIEWPORTEXTEX, 4) - TEST_TARGET_SIZE (PEMRSETVIEWPORTEXTEX, 16) - TEST_TARGET_ALIGN(PEMRSETVIEWPORTEXTEX, 4) -} - -static void test_pack_PEMRSETVIEWPORTORGEX(void) -{ - /* PEMRSETVIEWPORTORGEX */ - TEST_TYPE_SIZE (PEMRSETVIEWPORTORGEX, 4) - TEST_TYPE_ALIGN (PEMRSETVIEWPORTORGEX, 4) - TEST_TARGET_SIZE (PEMRSETVIEWPORTORGEX, 16) - TEST_TARGET_ALIGN(PEMRSETVIEWPORTORGEX, 4) -} - -static void test_pack_PEMRSETWINDOWEXTEX(void) -{ - /* PEMRSETWINDOWEXTEX */ - TEST_TYPE_SIZE (PEMRSETWINDOWEXTEX, 4) - TEST_TYPE_ALIGN (PEMRSETWINDOWEXTEX, 4) - TEST_TARGET_SIZE (PEMRSETWINDOWEXTEX, 16) - TEST_TARGET_ALIGN(PEMRSETWINDOWEXTEX, 4) -} - -static void test_pack_PEMRSETWINDOWORGEX(void) -{ - /* PEMRSETWINDOWORGEX */ - TEST_TYPE_SIZE (PEMRSETWINDOWORGEX, 4) - TEST_TYPE_ALIGN (PEMRSETWINDOWORGEX, 4) - TEST_TARGET_SIZE (PEMRSETWINDOWORGEX, 16) - TEST_TARGET_ALIGN(PEMRSETWINDOWORGEX, 4) -} - -static void test_pack_PEMRSETWORLDTRANSFORM(void) -{ - /* PEMRSETWORLDTRANSFORM */ - TEST_TYPE_SIZE (PEMRSETWORLDTRANSFORM, 4) - TEST_TYPE_ALIGN (PEMRSETWORLDTRANSFORM, 4) - TEST_TARGET_SIZE (PEMRSETWORLDTRANSFORM, 32) - TEST_TARGET_ALIGN(PEMRSETWORLDTRANSFORM, 4) -} - -static void test_pack_PEMRSTRETCHBLT(void) -{ - /* PEMRSTRETCHBLT */ - TEST_TYPE_SIZE (PEMRSTRETCHBLT, 4) - TEST_TYPE_ALIGN (PEMRSTRETCHBLT, 4) - TEST_TARGET_SIZE (PEMRSTRETCHBLT, 108) - TEST_TARGET_ALIGN(PEMRSTRETCHBLT, 4) -} - -static void test_pack_PEMRSTRETCHDIBITS(void) -{ - /* PEMRSTRETCHDIBITS */ - TEST_TYPE_SIZE (PEMRSTRETCHDIBITS, 4) - TEST_TYPE_ALIGN (PEMRSTRETCHDIBITS, 4) - TEST_TARGET_SIZE (PEMRSTRETCHDIBITS, 80) - TEST_TARGET_ALIGN(PEMRSTRETCHDIBITS, 4) -} - -static void test_pack_PEMRSTROKEANDFILLPATH(void) -{ - /* PEMRSTROKEANDFILLPATH */ - TEST_TYPE_SIZE (PEMRSTROKEANDFILLPATH, 4) - TEST_TYPE_ALIGN (PEMRSTROKEANDFILLPATH, 4) - TEST_TARGET_SIZE (PEMRSTROKEANDFILLPATH, 24) - TEST_TARGET_ALIGN(PEMRSTROKEANDFILLPATH, 4) -} - -static void test_pack_PEMRSTROKEPATH(void) -{ - /* PEMRSTROKEPATH */ - TEST_TYPE_SIZE (PEMRSTROKEPATH, 4) - TEST_TYPE_ALIGN (PEMRSTROKEPATH, 4) - TEST_TARGET_SIZE (PEMRSTROKEPATH, 24) - TEST_TARGET_ALIGN(PEMRSTROKEPATH, 4) -} - -static void test_pack_PEMRTEXT(void) -{ - /* PEMRTEXT */ - TEST_TYPE_SIZE (PEMRTEXT, 4) - TEST_TYPE_ALIGN (PEMRTEXT, 4) - TEST_TARGET_SIZE (PEMRTEXT, 40) - TEST_TARGET_ALIGN(PEMRTEXT, 4) -} - -static void test_pack_PEMRWIDENPATH(void) -{ - /* PEMRWIDENPATH */ - TEST_TYPE_SIZE (PEMRWIDENPATH, 4) - TEST_TYPE_ALIGN (PEMRWIDENPATH, 4) - TEST_TARGET_SIZE (PEMRWIDENPATH, 8) - TEST_TARGET_ALIGN(PEMRWIDENPATH, 4) -} - -static void test_pack_PENHMETAHEADER(void) -{ - /* PENHMETAHEADER */ - TEST_TYPE_SIZE (PENHMETAHEADER, 4) - TEST_TYPE_ALIGN (PENHMETAHEADER, 4) - TEST_TARGET_SIZE (PENHMETAHEADER, 108) - TEST_TARGET_ALIGN(PENHMETAHEADER, 4) -} - -static void test_pack_PEXTLOGFONTA(void) -{ - /* PEXTLOGFONTA */ - TEST_TYPE_SIZE (PEXTLOGFONTA, 4) - TEST_TYPE_ALIGN (PEXTLOGFONTA, 4) - TEST_TARGET_SIZE (PEXTLOGFONTA, 192) - TEST_TARGET_ALIGN(PEXTLOGFONTA, 4) -} - -static void test_pack_PEXTLOGFONTW(void) -{ - /* PEXTLOGFONTW */ - TEST_TYPE_SIZE (PEXTLOGFONTW, 4) - TEST_TYPE_ALIGN (PEXTLOGFONTW, 4) - TEST_TARGET_SIZE (PEXTLOGFONTW, 320) - TEST_TARGET_ALIGN(PEXTLOGFONTW, 4) -} - -static void test_pack_PEXTLOGPEN(void) -{ - /* PEXTLOGPEN */ - TEST_TYPE_SIZE (PEXTLOGPEN, 4) - TEST_TYPE_ALIGN (PEXTLOGPEN, 4) - TEST_TARGET_SIZE (PEXTLOGPEN, 28) - TEST_TARGET_ALIGN(PEXTLOGPEN, 4) -} - -static void test_pack_PFONTSIGNATURE(void) -{ - /* PFONTSIGNATURE */ - TEST_TYPE_SIZE (PFONTSIGNATURE, 4) - TEST_TYPE_ALIGN (PFONTSIGNATURE, 4) - TEST_TARGET_SIZE (PFONTSIGNATURE, 24) - TEST_TARGET_ALIGN(PFONTSIGNATURE, 4) -} - -static void test_pack_PGLYPHMETRICSFLOAT(void) -{ - /* PGLYPHMETRICSFLOAT */ - TEST_TYPE_SIZE (PGLYPHMETRICSFLOAT, 4) - TEST_TYPE_ALIGN (PGLYPHMETRICSFLOAT, 4) - TEST_TARGET_SIZE (PGLYPHMETRICSFLOAT, 24) - TEST_TARGET_ALIGN(PGLYPHMETRICSFLOAT, 4) -} - -static void test_pack_PGRADIENT_RECT(void) -{ - /* PGRADIENT_RECT */ - TEST_TYPE_SIZE (PGRADIENT_RECT, 4) - TEST_TYPE_ALIGN (PGRADIENT_RECT, 4) - TEST_TARGET_SIZE (PGRADIENT_RECT, 8) - TEST_TARGET_ALIGN(PGRADIENT_RECT, 4) -} - -static void test_pack_PGRADIENT_TRIANGLE(void) -{ - /* PGRADIENT_TRIANGLE */ - TEST_TYPE_SIZE (PGRADIENT_TRIANGLE, 4) - TEST_TYPE_ALIGN (PGRADIENT_TRIANGLE, 4) - TEST_TARGET_SIZE (PGRADIENT_TRIANGLE, 12) - TEST_TARGET_ALIGN(PGRADIENT_TRIANGLE, 4) -} - -static void test_pack_PHANDLETABLE(void) -{ - /* PHANDLETABLE */ - TEST_TYPE_SIZE (PHANDLETABLE, 4) - TEST_TYPE_ALIGN (PHANDLETABLE, 4) - TEST_TARGET_SIZE (PHANDLETABLE, 4) - TEST_TARGET_ALIGN(PHANDLETABLE, 4) -} - -static void test_pack_PIXELFORMATDESCRIPTOR(void) -{ - /* PIXELFORMATDESCRIPTOR */ - TEST_TYPE_SIZE (PIXELFORMATDESCRIPTOR, 40) - TEST_TYPE_ALIGN (PIXELFORMATDESCRIPTOR, 4) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, nSize, 2) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, nSize, 2) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, nSize, 0) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, nVersion, 2) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, nVersion, 2) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, nVersion, 2) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, dwFlags, 4) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, dwFlags, 4) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, dwFlags, 4) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, iPixelType, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, iPixelType, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, iPixelType, 8) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cColorBits, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cColorBits, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cColorBits, 9) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cRedBits, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cRedBits, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cRedBits, 10) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cRedShift, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cRedShift, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cRedShift, 11) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cGreenBits, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cGreenBits, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cGreenBits, 12) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cGreenShift, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cGreenShift, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cGreenShift, 13) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cBlueBits, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cBlueBits, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cBlueBits, 14) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cBlueShift, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cBlueShift, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cBlueShift, 15) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cAlphaBits, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cAlphaBits, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cAlphaBits, 16) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cAlphaShift, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cAlphaShift, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cAlphaShift, 17) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cAccumBits, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cAccumBits, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cAccumBits, 18) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cAccumRedBits, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cAccumRedBits, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cAccumRedBits, 19) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cAccumGreenBits, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cAccumGreenBits, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cAccumGreenBits, 20) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cAccumBlueBits, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cAccumBlueBits, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cAccumBlueBits, 21) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cAccumAlphaBits, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cAccumAlphaBits, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cAccumAlphaBits, 22) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cDepthBits, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cDepthBits, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cDepthBits, 23) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cStencilBits, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cStencilBits, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cStencilBits, 24) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, cAuxBuffers, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, cAuxBuffers, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, cAuxBuffers, 25) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, iLayerType, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, iLayerType, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, iLayerType, 26) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, bReserved, 1) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, bReserved, 1) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, bReserved, 27) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, dwLayerMask, 4) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, dwLayerMask, 4) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, dwLayerMask, 28) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, dwVisibleMask, 4) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, dwVisibleMask, 4) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, dwVisibleMask, 32) - TEST_FIELD_SIZE (PIXELFORMATDESCRIPTOR, dwDamageMask, 4) - TEST_FIELD_ALIGN (PIXELFORMATDESCRIPTOR, dwDamageMask, 4) - TEST_FIELD_OFFSET(PIXELFORMATDESCRIPTOR, dwDamageMask, 36) -} - -static void test_pack_PLAYERPLANEDESCRIPTOR(void) -{ - /* PLAYERPLANEDESCRIPTOR */ - TEST_TYPE_SIZE (PLAYERPLANEDESCRIPTOR, 4) - TEST_TYPE_ALIGN (PLAYERPLANEDESCRIPTOR, 4) - TEST_TARGET_SIZE (PLAYERPLANEDESCRIPTOR, 32) - TEST_TARGET_ALIGN(PLAYERPLANEDESCRIPTOR, 4) -} - -static void test_pack_PLOCALESIGNATURE(void) -{ - /* PLOCALESIGNATURE */ - TEST_TYPE_SIZE (PLOCALESIGNATURE, 4) - TEST_TYPE_ALIGN (PLOCALESIGNATURE, 4) - TEST_TARGET_SIZE (PLOCALESIGNATURE, 32) - TEST_TARGET_ALIGN(PLOCALESIGNATURE, 4) -} - -static void test_pack_PLOGBRUSH(void) -{ - /* PLOGBRUSH */ - TEST_TYPE_SIZE (PLOGBRUSH, 4) - TEST_TYPE_ALIGN (PLOGBRUSH, 4) - TEST_TARGET_SIZE (PLOGBRUSH, 12) - TEST_TARGET_ALIGN(PLOGBRUSH, 4) -} - -static void test_pack_PLOGFONTA(void) -{ - /* PLOGFONTA */ - TEST_TYPE_SIZE (PLOGFONTA, 4) - TEST_TYPE_ALIGN (PLOGFONTA, 4) - TEST_TARGET_SIZE (PLOGFONTA, 60) - TEST_TARGET_ALIGN(PLOGFONTA, 4) -} - -static void test_pack_PLOGFONTW(void) -{ - /* PLOGFONTW */ - TEST_TYPE_SIZE (PLOGFONTW, 4) - TEST_TYPE_ALIGN (PLOGFONTW, 4) - TEST_TARGET_SIZE (PLOGFONTW, 92) - TEST_TARGET_ALIGN(PLOGFONTW, 4) -} - -static void test_pack_PMETAHEADER(void) -{ - /* PMETAHEADER */ - TEST_TYPE_SIZE (PMETAHEADER, 4) - TEST_TYPE_ALIGN (PMETAHEADER, 4) - TEST_TARGET_SIZE (PMETAHEADER, 18) - TEST_TARGET_ALIGN(PMETAHEADER, 2) -} - -static void test_pack_PMETARECORD(void) -{ - /* PMETARECORD */ - TEST_TYPE_SIZE (PMETARECORD, 4) - TEST_TYPE_ALIGN (PMETARECORD, 4) - TEST_TARGET_SIZE (PMETARECORD, 8) - TEST_TARGET_ALIGN(PMETARECORD, 4) -} - -static void test_pack_PNEWTEXTMETRICA(void) -{ - /* PNEWTEXTMETRICA */ - TEST_TYPE_SIZE (PNEWTEXTMETRICA, 4) - TEST_TYPE_ALIGN (PNEWTEXTMETRICA, 4) - TEST_TARGET_SIZE (PNEWTEXTMETRICA, 72) - TEST_TARGET_ALIGN(PNEWTEXTMETRICA, 4) -} - -static void test_pack_PNEWTEXTMETRICW(void) -{ - /* PNEWTEXTMETRICW */ - TEST_TYPE_SIZE (PNEWTEXTMETRICW, 4) - TEST_TYPE_ALIGN (PNEWTEXTMETRICW, 4) - TEST_TARGET_SIZE (PNEWTEXTMETRICW, 76) - TEST_TARGET_ALIGN(PNEWTEXTMETRICW, 4) -} - -static void test_pack_POINTFLOAT(void) -{ - /* POINTFLOAT */ - TEST_TYPE_SIZE (POINTFLOAT, 8) - TEST_TYPE_ALIGN (POINTFLOAT, 4) - TEST_FIELD_SIZE (POINTFLOAT, x, 4) - TEST_FIELD_ALIGN (POINTFLOAT, x, 4) - TEST_FIELD_OFFSET(POINTFLOAT, x, 0) - TEST_FIELD_SIZE (POINTFLOAT, y, 4) - TEST_FIELD_ALIGN (POINTFLOAT, y, 4) - TEST_FIELD_OFFSET(POINTFLOAT, y, 4) -} - -static void test_pack_POINTFX(void) -{ - /* POINTFX */ - TEST_TYPE_SIZE (POINTFX, 8) - TEST_TYPE_ALIGN (POINTFX, 2) - TEST_FIELD_SIZE (POINTFX, x, 4) - TEST_FIELD_ALIGN (POINTFX, x, 2) - TEST_FIELD_OFFSET(POINTFX, x, 0) - TEST_FIELD_SIZE (POINTFX, y, 4) - TEST_FIELD_ALIGN (POINTFX, y, 2) - TEST_FIELD_OFFSET(POINTFX, y, 4) -} - -static void test_pack_POLYTEXTA(void) -{ - /* POLYTEXTA */ - TEST_TYPE_SIZE (POLYTEXTA, 40) - TEST_TYPE_ALIGN (POLYTEXTA, 4) - TEST_FIELD_SIZE (POLYTEXTA, x, 4) - TEST_FIELD_ALIGN (POLYTEXTA, x, 4) - TEST_FIELD_OFFSET(POLYTEXTA, x, 0) - TEST_FIELD_SIZE (POLYTEXTA, y, 4) - TEST_FIELD_ALIGN (POLYTEXTA, y, 4) - TEST_FIELD_OFFSET(POLYTEXTA, y, 4) - TEST_FIELD_SIZE (POLYTEXTA, n, 4) - TEST_FIELD_ALIGN (POLYTEXTA, n, 4) - TEST_FIELD_OFFSET(POLYTEXTA, n, 8) - TEST_FIELD_SIZE (POLYTEXTA, lpstr, 4) - TEST_FIELD_ALIGN (POLYTEXTA, lpstr, 4) - TEST_FIELD_OFFSET(POLYTEXTA, lpstr, 12) - TEST_FIELD_SIZE (POLYTEXTA, uiFlags, 4) - TEST_FIELD_ALIGN (POLYTEXTA, uiFlags, 4) - TEST_FIELD_OFFSET(POLYTEXTA, uiFlags, 16) - TEST_FIELD_SIZE (POLYTEXTA, rcl, 16) - TEST_FIELD_ALIGN (POLYTEXTA, rcl, 4) - TEST_FIELD_OFFSET(POLYTEXTA, rcl, 20) - TEST_FIELD_SIZE (POLYTEXTA, pdx, 4) - TEST_FIELD_ALIGN (POLYTEXTA, pdx, 4) - TEST_FIELD_OFFSET(POLYTEXTA, pdx, 36) -} - -static void test_pack_POLYTEXTW(void) -{ - /* POLYTEXTW */ - TEST_TYPE_SIZE (POLYTEXTW, 40) - TEST_TYPE_ALIGN (POLYTEXTW, 4) - TEST_FIELD_SIZE (POLYTEXTW, x, 4) - TEST_FIELD_ALIGN (POLYTEXTW, x, 4) - TEST_FIELD_OFFSET(POLYTEXTW, x, 0) - TEST_FIELD_SIZE (POLYTEXTW, y, 4) - TEST_FIELD_ALIGN (POLYTEXTW, y, 4) - TEST_FIELD_OFFSET(POLYTEXTW, y, 4) - TEST_FIELD_SIZE (POLYTEXTW, n, 4) - TEST_FIELD_ALIGN (POLYTEXTW, n, 4) - TEST_FIELD_OFFSET(POLYTEXTW, n, 8) - TEST_FIELD_SIZE (POLYTEXTW, lpstr, 4) - TEST_FIELD_ALIGN (POLYTEXTW, lpstr, 4) - TEST_FIELD_OFFSET(POLYTEXTW, lpstr, 12) - TEST_FIELD_SIZE (POLYTEXTW, uiFlags, 4) - TEST_FIELD_ALIGN (POLYTEXTW, uiFlags, 4) - TEST_FIELD_OFFSET(POLYTEXTW, uiFlags, 16) - TEST_FIELD_SIZE (POLYTEXTW, rcl, 16) - TEST_FIELD_ALIGN (POLYTEXTW, rcl, 4) - TEST_FIELD_OFFSET(POLYTEXTW, rcl, 20) - TEST_FIELD_SIZE (POLYTEXTW, pdx, 4) - TEST_FIELD_ALIGN (POLYTEXTW, pdx, 4) - TEST_FIELD_OFFSET(POLYTEXTW, pdx, 36) -} - -static void test_pack_POUTLINETEXTMETRICA(void) -{ - /* POUTLINETEXTMETRICA */ - TEST_TYPE_SIZE (POUTLINETEXTMETRICA, 4) - TEST_TYPE_ALIGN (POUTLINETEXTMETRICA, 4) - TEST_TARGET_SIZE (POUTLINETEXTMETRICA, 212) - TEST_TARGET_ALIGN(POUTLINETEXTMETRICA, 4) -} - -static void test_pack_POUTLINETEXTMETRICW(void) -{ - /* POUTLINETEXTMETRICW */ - TEST_TYPE_SIZE (POUTLINETEXTMETRICW, 4) - TEST_TYPE_ALIGN (POUTLINETEXTMETRICW, 4) - TEST_TARGET_SIZE (POUTLINETEXTMETRICW, 216) - TEST_TARGET_ALIGN(POUTLINETEXTMETRICW, 4) -} - -static void test_pack_PPELARRAY(void) -{ - /* PPELARRAY */ - TEST_TYPE_SIZE (PPELARRAY, 4) - TEST_TYPE_ALIGN (PPELARRAY, 4) - TEST_TARGET_SIZE (PPELARRAY, 20) - TEST_TARGET_ALIGN(PPELARRAY, 4) -} - -static void test_pack_PPIXELFORMATDESCRIPTOR(void) -{ - /* PPIXELFORMATDESCRIPTOR */ - TEST_TYPE_SIZE (PPIXELFORMATDESCRIPTOR, 4) - TEST_TYPE_ALIGN (PPIXELFORMATDESCRIPTOR, 4) - TEST_TARGET_SIZE (PPIXELFORMATDESCRIPTOR, 40) - TEST_TARGET_ALIGN(PPIXELFORMATDESCRIPTOR, 4) -} - -static void test_pack_PPOINTFLOAT(void) -{ - /* PPOINTFLOAT */ - TEST_TYPE_SIZE (PPOINTFLOAT, 4) - TEST_TYPE_ALIGN (PPOINTFLOAT, 4) - TEST_TARGET_SIZE (PPOINTFLOAT, 8) - TEST_TARGET_ALIGN(PPOINTFLOAT, 4) -} - -static void test_pack_PPOLYTEXTA(void) -{ - /* PPOLYTEXTA */ - TEST_TYPE_SIZE (PPOLYTEXTA, 4) - TEST_TYPE_ALIGN (PPOLYTEXTA, 4) - TEST_TARGET_SIZE (PPOLYTEXTA, 40) - TEST_TARGET_ALIGN(PPOLYTEXTA, 4) -} - -static void test_pack_PPOLYTEXTW(void) -{ - /* PPOLYTEXTW */ - TEST_TYPE_SIZE (PPOLYTEXTW, 4) - TEST_TYPE_ALIGN (PPOLYTEXTW, 4) - TEST_TARGET_SIZE (PPOLYTEXTW, 40) - TEST_TARGET_ALIGN(PPOLYTEXTW, 4) -} - -static void test_pack_PRGNDATA(void) -{ - /* PRGNDATA */ - TEST_TYPE_SIZE (PRGNDATA, 4) - TEST_TYPE_ALIGN (PRGNDATA, 4) - TEST_TARGET_SIZE (PRGNDATA, 36) - TEST_TARGET_ALIGN(PRGNDATA, 4) -} - -static void test_pack_PRGNDATAHEADER(void) -{ - /* PRGNDATAHEADER */ - TEST_TYPE_SIZE (PRGNDATAHEADER, 4) - TEST_TYPE_ALIGN (PRGNDATAHEADER, 4) - TEST_TARGET_SIZE (PRGNDATAHEADER, 32) - TEST_TARGET_ALIGN(PRGNDATAHEADER, 4) -} - -static void test_pack_PTEXTMETRICA(void) -{ - /* PTEXTMETRICA */ - TEST_TYPE_SIZE (PTEXTMETRICA, 4) - TEST_TYPE_ALIGN (PTEXTMETRICA, 4) - TEST_TARGET_SIZE (PTEXTMETRICA, 56) - TEST_TARGET_ALIGN(PTEXTMETRICA, 4) -} - -static void test_pack_PTEXTMETRICW(void) -{ - /* PTEXTMETRICW */ - TEST_TYPE_SIZE (PTEXTMETRICW, 4) - TEST_TYPE_ALIGN (PTEXTMETRICW, 4) - TEST_TARGET_SIZE (PTEXTMETRICW, 60) - TEST_TARGET_ALIGN(PTEXTMETRICW, 4) -} - -static void test_pack_PTRIVERTEX(void) -{ - /* PTRIVERTEX */ - TEST_TYPE_SIZE (PTRIVERTEX, 4) - TEST_TYPE_ALIGN (PTRIVERTEX, 4) - TEST_TARGET_SIZE (PTRIVERTEX, 16) - TEST_TARGET_ALIGN(PTRIVERTEX, 4) -} - -static void test_pack_PXFORM(void) -{ - /* PXFORM */ - TEST_TYPE_SIZE (PXFORM, 4) - TEST_TYPE_ALIGN (PXFORM, 4) - TEST_TARGET_SIZE (PXFORM, 24) - TEST_TARGET_ALIGN(PXFORM, 4) -} - -static void test_pack_RASTERIZER_STATUS(void) -{ - /* RASTERIZER_STATUS */ - TEST_TYPE_SIZE (RASTERIZER_STATUS, 6) - TEST_TYPE_ALIGN (RASTERIZER_STATUS, 2) - TEST_FIELD_SIZE (RASTERIZER_STATUS, nSize, 2) - TEST_FIELD_ALIGN (RASTERIZER_STATUS, nSize, 2) - TEST_FIELD_OFFSET(RASTERIZER_STATUS, nSize, 0) - TEST_FIELD_SIZE (RASTERIZER_STATUS, wFlags, 2) - TEST_FIELD_ALIGN (RASTERIZER_STATUS, wFlags, 2) - TEST_FIELD_OFFSET(RASTERIZER_STATUS, wFlags, 2) - TEST_FIELD_SIZE (RASTERIZER_STATUS, nLanguageID, 2) - TEST_FIELD_ALIGN (RASTERIZER_STATUS, nLanguageID, 2) - TEST_FIELD_OFFSET(RASTERIZER_STATUS, nLanguageID, 4) -} - -static void test_pack_RGBQUAD(void) -{ - /* RGBQUAD */ - TEST_TYPE_SIZE (RGBQUAD, 4) - TEST_TYPE_ALIGN (RGBQUAD, 1) - TEST_FIELD_SIZE (RGBQUAD, rgbBlue, 1) - TEST_FIELD_ALIGN (RGBQUAD, rgbBlue, 1) - TEST_FIELD_OFFSET(RGBQUAD, rgbBlue, 0) - TEST_FIELD_SIZE (RGBQUAD, rgbGreen, 1) - TEST_FIELD_ALIGN (RGBQUAD, rgbGreen, 1) - TEST_FIELD_OFFSET(RGBQUAD, rgbGreen, 1) - TEST_FIELD_SIZE (RGBQUAD, rgbRed, 1) - TEST_FIELD_ALIGN (RGBQUAD, rgbRed, 1) - TEST_FIELD_OFFSET(RGBQUAD, rgbRed, 2) - TEST_FIELD_SIZE (RGBQUAD, rgbReserved, 1) - TEST_FIELD_ALIGN (RGBQUAD, rgbReserved, 1) - TEST_FIELD_OFFSET(RGBQUAD, rgbReserved, 3) -} - -static void test_pack_RGBTRIPLE(void) -{ - /* RGBTRIPLE */ - TEST_TYPE_SIZE (RGBTRIPLE, 3) - TEST_TYPE_ALIGN (RGBTRIPLE, 1) - TEST_FIELD_SIZE (RGBTRIPLE, rgbtBlue, 1) - TEST_FIELD_ALIGN (RGBTRIPLE, rgbtBlue, 1) - TEST_FIELD_OFFSET(RGBTRIPLE, rgbtBlue, 0) - TEST_FIELD_SIZE (RGBTRIPLE, rgbtGreen, 1) - TEST_FIELD_ALIGN (RGBTRIPLE, rgbtGreen, 1) - TEST_FIELD_OFFSET(RGBTRIPLE, rgbtGreen, 1) - TEST_FIELD_SIZE (RGBTRIPLE, rgbtRed, 1) - TEST_FIELD_ALIGN (RGBTRIPLE, rgbtRed, 1) - TEST_FIELD_OFFSET(RGBTRIPLE, rgbtRed, 2) -} - -static void test_pack_RGNDATA(void) -{ - /* RGNDATA */ - TEST_TYPE_SIZE (RGNDATA, 36) - TEST_TYPE_ALIGN (RGNDATA, 4) - TEST_FIELD_SIZE (RGNDATA, rdh, 32) - TEST_FIELD_ALIGN (RGNDATA, rdh, 4) - TEST_FIELD_OFFSET(RGNDATA, rdh, 0) - TEST_FIELD_SIZE (RGNDATA, Buffer, 1) - TEST_FIELD_ALIGN (RGNDATA, Buffer, 1) - TEST_FIELD_OFFSET(RGNDATA, Buffer, 32) -} - -static void test_pack_RGNDATAHEADER(void) -{ - /* RGNDATAHEADER */ - TEST_TYPE_SIZE (RGNDATAHEADER, 32) - TEST_TYPE_ALIGN (RGNDATAHEADER, 4) - TEST_FIELD_SIZE (RGNDATAHEADER, dwSize, 4) - TEST_FIELD_ALIGN (RGNDATAHEADER, dwSize, 4) - TEST_FIELD_OFFSET(RGNDATAHEADER, dwSize, 0) - TEST_FIELD_SIZE (RGNDATAHEADER, iType, 4) - TEST_FIELD_ALIGN (RGNDATAHEADER, iType, 4) - TEST_FIELD_OFFSET(RGNDATAHEADER, iType, 4) - TEST_FIELD_SIZE (RGNDATAHEADER, nCount, 4) - TEST_FIELD_ALIGN (RGNDATAHEADER, nCount, 4) - TEST_FIELD_OFFSET(RGNDATAHEADER, nCount, 8) - TEST_FIELD_SIZE (RGNDATAHEADER, nRgnSize, 4) - TEST_FIELD_ALIGN (RGNDATAHEADER, nRgnSize, 4) - TEST_FIELD_OFFSET(RGNDATAHEADER, nRgnSize, 12) - TEST_FIELD_SIZE (RGNDATAHEADER, rcBound, 16) - TEST_FIELD_ALIGN (RGNDATAHEADER, rcBound, 4) - TEST_FIELD_OFFSET(RGNDATAHEADER, rcBound, 16) -} - -static void test_pack_TEXTMETRICA(void) -{ - /* TEXTMETRICA */ - TEST_TYPE_SIZE (TEXTMETRICA, 56) - TEST_TYPE_ALIGN (TEXTMETRICA, 4) - TEST_FIELD_SIZE (TEXTMETRICA, tmHeight, 4) - TEST_FIELD_ALIGN (TEXTMETRICA, tmHeight, 4) - TEST_FIELD_OFFSET(TEXTMETRICA, tmHeight, 0) - TEST_FIELD_SIZE (TEXTMETRICA, tmAscent, 4) - TEST_FIELD_ALIGN (TEXTMETRICA, tmAscent, 4) - TEST_FIELD_OFFSET(TEXTMETRICA, tmAscent, 4) - TEST_FIELD_SIZE (TEXTMETRICA, tmDescent, 4) - TEST_FIELD_ALIGN (TEXTMETRICA, tmDescent, 4) - TEST_FIELD_OFFSET(TEXTMETRICA, tmDescent, 8) - TEST_FIELD_SIZE (TEXTMETRICA, tmInternalLeading, 4) - TEST_FIELD_ALIGN (TEXTMETRICA, tmInternalLeading, 4) - TEST_FIELD_OFFSET(TEXTMETRICA, tmInternalLeading, 12) - TEST_FIELD_SIZE (TEXTMETRICA, tmExternalLeading, 4) - TEST_FIELD_ALIGN (TEXTMETRICA, tmExternalLeading, 4) - TEST_FIELD_OFFSET(TEXTMETRICA, tmExternalLeading, 16) - TEST_FIELD_SIZE (TEXTMETRICA, tmAveCharWidth, 4) - TEST_FIELD_ALIGN (TEXTMETRICA, tmAveCharWidth, 4) - TEST_FIELD_OFFSET(TEXTMETRICA, tmAveCharWidth, 20) - TEST_FIELD_SIZE (TEXTMETRICA, tmMaxCharWidth, 4) - TEST_FIELD_ALIGN (TEXTMETRICA, tmMaxCharWidth, 4) - TEST_FIELD_OFFSET(TEXTMETRICA, tmMaxCharWidth, 24) - TEST_FIELD_SIZE (TEXTMETRICA, tmWeight, 4) - TEST_FIELD_ALIGN (TEXTMETRICA, tmWeight, 4) - TEST_FIELD_OFFSET(TEXTMETRICA, tmWeight, 28) - TEST_FIELD_SIZE (TEXTMETRICA, tmOverhang, 4) - TEST_FIELD_ALIGN (TEXTMETRICA, tmOverhang, 4) - TEST_FIELD_OFFSET(TEXTMETRICA, tmOverhang, 32) - TEST_FIELD_SIZE (TEXTMETRICA, tmDigitizedAspectX, 4) - TEST_FIELD_ALIGN (TEXTMETRICA, tmDigitizedAspectX, 4) - TEST_FIELD_OFFSET(TEXTMETRICA, tmDigitizedAspectX, 36) - TEST_FIELD_SIZE (TEXTMETRICA, tmDigitizedAspectY, 4) - TEST_FIELD_ALIGN (TEXTMETRICA, tmDigitizedAspectY, 4) - TEST_FIELD_OFFSET(TEXTMETRICA, tmDigitizedAspectY, 40) - TEST_FIELD_SIZE (TEXTMETRICA, tmFirstChar, 1) - TEST_FIELD_ALIGN (TEXTMETRICA, tmFirstChar, 1) - TEST_FIELD_OFFSET(TEXTMETRICA, tmFirstChar, 44) - TEST_FIELD_SIZE (TEXTMETRICA, tmLastChar, 1) - TEST_FIELD_ALIGN (TEXTMETRICA, tmLastChar, 1) - TEST_FIELD_OFFSET(TEXTMETRICA, tmLastChar, 45) - TEST_FIELD_SIZE (TEXTMETRICA, tmDefaultChar, 1) - TEST_FIELD_ALIGN (TEXTMETRICA, tmDefaultChar, 1) - TEST_FIELD_OFFSET(TEXTMETRICA, tmDefaultChar, 46) - TEST_FIELD_SIZE (TEXTMETRICA, tmBreakChar, 1) - TEST_FIELD_ALIGN (TEXTMETRICA, tmBreakChar, 1) - TEST_FIELD_OFFSET(TEXTMETRICA, tmBreakChar, 47) - TEST_FIELD_SIZE (TEXTMETRICA, tmItalic, 1) - TEST_FIELD_ALIGN (TEXTMETRICA, tmItalic, 1) - TEST_FIELD_OFFSET(TEXTMETRICA, tmItalic, 48) - TEST_FIELD_SIZE (TEXTMETRICA, tmUnderlined, 1) - TEST_FIELD_ALIGN (TEXTMETRICA, tmUnderlined, 1) - TEST_FIELD_OFFSET(TEXTMETRICA, tmUnderlined, 49) - TEST_FIELD_SIZE (TEXTMETRICA, tmStruckOut, 1) - TEST_FIELD_ALIGN (TEXTMETRICA, tmStruckOut, 1) - TEST_FIELD_OFFSET(TEXTMETRICA, tmStruckOut, 50) - TEST_FIELD_SIZE (TEXTMETRICA, tmPitchAndFamily, 1) - TEST_FIELD_ALIGN (TEXTMETRICA, tmPitchAndFamily, 1) - TEST_FIELD_OFFSET(TEXTMETRICA, tmPitchAndFamily, 51) - TEST_FIELD_SIZE (TEXTMETRICA, tmCharSet, 1) - TEST_FIELD_ALIGN (TEXTMETRICA, tmCharSet, 1) - TEST_FIELD_OFFSET(TEXTMETRICA, tmCharSet, 52) -} - -static void test_pack_TEXTMETRICW(void) -{ - /* TEXTMETRICW */ - TEST_TYPE_SIZE (TEXTMETRICW, 60) - TEST_TYPE_ALIGN (TEXTMETRICW, 4) - TEST_FIELD_SIZE (TEXTMETRICW, tmHeight, 4) - TEST_FIELD_ALIGN (TEXTMETRICW, tmHeight, 4) - TEST_FIELD_OFFSET(TEXTMETRICW, tmHeight, 0) - TEST_FIELD_SIZE (TEXTMETRICW, tmAscent, 4) - TEST_FIELD_ALIGN (TEXTMETRICW, tmAscent, 4) - TEST_FIELD_OFFSET(TEXTMETRICW, tmAscent, 4) - TEST_FIELD_SIZE (TEXTMETRICW, tmDescent, 4) - TEST_FIELD_ALIGN (TEXTMETRICW, tmDescent, 4) - TEST_FIELD_OFFSET(TEXTMETRICW, tmDescent, 8) - TEST_FIELD_SIZE (TEXTMETRICW, tmInternalLeading, 4) - TEST_FIELD_ALIGN (TEXTMETRICW, tmInternalLeading, 4) - TEST_FIELD_OFFSET(TEXTMETRICW, tmInternalLeading, 12) - TEST_FIELD_SIZE (TEXTMETRICW, tmExternalLeading, 4) - TEST_FIELD_ALIGN (TEXTMETRICW, tmExternalLeading, 4) - TEST_FIELD_OFFSET(TEXTMETRICW, tmExternalLeading, 16) - TEST_FIELD_SIZE (TEXTMETRICW, tmAveCharWidth, 4) - TEST_FIELD_ALIGN (TEXTMETRICW, tmAveCharWidth, 4) - TEST_FIELD_OFFSET(TEXTMETRICW, tmAveCharWidth, 20) - TEST_FIELD_SIZE (TEXTMETRICW, tmMaxCharWidth, 4) - TEST_FIELD_ALIGN (TEXTMETRICW, tmMaxCharWidth, 4) - TEST_FIELD_OFFSET(TEXTMETRICW, tmMaxCharWidth, 24) - TEST_FIELD_SIZE (TEXTMETRICW, tmWeight, 4) - TEST_FIELD_ALIGN (TEXTMETRICW, tmWeight, 4) - TEST_FIELD_OFFSET(TEXTMETRICW, tmWeight, 28) - TEST_FIELD_SIZE (TEXTMETRICW, tmOverhang, 4) - TEST_FIELD_ALIGN (TEXTMETRICW, tmOverhang, 4) - TEST_FIELD_OFFSET(TEXTMETRICW, tmOverhang, 32) - TEST_FIELD_SIZE (TEXTMETRICW, tmDigitizedAspectX, 4) - TEST_FIELD_ALIGN (TEXTMETRICW, tmDigitizedAspectX, 4) - TEST_FIELD_OFFSET(TEXTMETRICW, tmDigitizedAspectX, 36) - TEST_FIELD_SIZE (TEXTMETRICW, tmDigitizedAspectY, 4) - TEST_FIELD_ALIGN (TEXTMETRICW, tmDigitizedAspectY, 4) - TEST_FIELD_OFFSET(TEXTMETRICW, tmDigitizedAspectY, 40) - TEST_FIELD_SIZE (TEXTMETRICW, tmFirstChar, 2) - TEST_FIELD_ALIGN (TEXTMETRICW, tmFirstChar, 2) - TEST_FIELD_OFFSET(TEXTMETRICW, tmFirstChar, 44) - TEST_FIELD_SIZE (TEXTMETRICW, tmLastChar, 2) - TEST_FIELD_ALIGN (TEXTMETRICW, tmLastChar, 2) - TEST_FIELD_OFFSET(TEXTMETRICW, tmLastChar, 46) - TEST_FIELD_SIZE (TEXTMETRICW, tmDefaultChar, 2) - TEST_FIELD_ALIGN (TEXTMETRICW, tmDefaultChar, 2) - TEST_FIELD_OFFSET(TEXTMETRICW, tmDefaultChar, 48) - TEST_FIELD_SIZE (TEXTMETRICW, tmBreakChar, 2) - TEST_FIELD_ALIGN (TEXTMETRICW, tmBreakChar, 2) - TEST_FIELD_OFFSET(TEXTMETRICW, tmBreakChar, 50) - TEST_FIELD_SIZE (TEXTMETRICW, tmItalic, 1) - TEST_FIELD_ALIGN (TEXTMETRICW, tmItalic, 1) - TEST_FIELD_OFFSET(TEXTMETRICW, tmItalic, 52) - TEST_FIELD_SIZE (TEXTMETRICW, tmUnderlined, 1) - TEST_FIELD_ALIGN (TEXTMETRICW, tmUnderlined, 1) - TEST_FIELD_OFFSET(TEXTMETRICW, tmUnderlined, 53) - TEST_FIELD_SIZE (TEXTMETRICW, tmStruckOut, 1) - TEST_FIELD_ALIGN (TEXTMETRICW, tmStruckOut, 1) - TEST_FIELD_OFFSET(TEXTMETRICW, tmStruckOut, 54) - TEST_FIELD_SIZE (TEXTMETRICW, tmPitchAndFamily, 1) - TEST_FIELD_ALIGN (TEXTMETRICW, tmPitchAndFamily, 1) - TEST_FIELD_OFFSET(TEXTMETRICW, tmPitchAndFamily, 55) - TEST_FIELD_SIZE (TEXTMETRICW, tmCharSet, 1) - TEST_FIELD_ALIGN (TEXTMETRICW, tmCharSet, 1) - TEST_FIELD_OFFSET(TEXTMETRICW, tmCharSet, 56) -} - -static void test_pack_TRIVERTEX(void) -{ - /* TRIVERTEX */ - TEST_TYPE_SIZE (TRIVERTEX, 16) - TEST_TYPE_ALIGN (TRIVERTEX, 4) - TEST_FIELD_SIZE (TRIVERTEX, x, 4) - TEST_FIELD_ALIGN (TRIVERTEX, x, 4) - TEST_FIELD_OFFSET(TRIVERTEX, x, 0) - TEST_FIELD_SIZE (TRIVERTEX, y, 4) - TEST_FIELD_ALIGN (TRIVERTEX, y, 4) - TEST_FIELD_OFFSET(TRIVERTEX, y, 4) - TEST_FIELD_SIZE (TRIVERTEX, Red, 2) - TEST_FIELD_ALIGN (TRIVERTEX, Red, 2) - TEST_FIELD_OFFSET(TRIVERTEX, Red, 8) - TEST_FIELD_SIZE (TRIVERTEX, Green, 2) - TEST_FIELD_ALIGN (TRIVERTEX, Green, 2) - TEST_FIELD_OFFSET(TRIVERTEX, Green, 10) - TEST_FIELD_SIZE (TRIVERTEX, Blue, 2) - TEST_FIELD_ALIGN (TRIVERTEX, Blue, 2) - TEST_FIELD_OFFSET(TRIVERTEX, Blue, 12) - TEST_FIELD_SIZE (TRIVERTEX, Alpha, 2) - TEST_FIELD_ALIGN (TRIVERTEX, Alpha, 2) - TEST_FIELD_OFFSET(TRIVERTEX, Alpha, 14) -} - -static void test_pack_TTPOLYCURVE(void) -{ - /* TTPOLYCURVE */ - TEST_TYPE_SIZE (TTPOLYCURVE, 12) - TEST_TYPE_ALIGN (TTPOLYCURVE, 2) - TEST_FIELD_SIZE (TTPOLYCURVE, wType, 2) - TEST_FIELD_ALIGN (TTPOLYCURVE, wType, 2) - TEST_FIELD_OFFSET(TTPOLYCURVE, wType, 0) - TEST_FIELD_SIZE (TTPOLYCURVE, cpfx, 2) - TEST_FIELD_ALIGN (TTPOLYCURVE, cpfx, 2) - TEST_FIELD_OFFSET(TTPOLYCURVE, cpfx, 2) - TEST_FIELD_SIZE (TTPOLYCURVE, apfx, 8) - TEST_FIELD_ALIGN (TTPOLYCURVE, apfx, 2) - TEST_FIELD_OFFSET(TTPOLYCURVE, apfx, 4) -} - -static void test_pack_TTPOLYGONHEADER(void) -{ - /* TTPOLYGONHEADER */ - TEST_TYPE_SIZE (TTPOLYGONHEADER, 16) - TEST_TYPE_ALIGN (TTPOLYGONHEADER, 4) - TEST_FIELD_SIZE (TTPOLYGONHEADER, cb, 4) - TEST_FIELD_ALIGN (TTPOLYGONHEADER, cb, 4) - TEST_FIELD_OFFSET(TTPOLYGONHEADER, cb, 0) - TEST_FIELD_SIZE (TTPOLYGONHEADER, dwType, 4) - TEST_FIELD_ALIGN (TTPOLYGONHEADER, dwType, 4) - TEST_FIELD_OFFSET(TTPOLYGONHEADER, dwType, 4) - TEST_FIELD_SIZE (TTPOLYGONHEADER, pfxStart, 8) - TEST_FIELD_ALIGN (TTPOLYGONHEADER, pfxStart, 2) - TEST_FIELD_OFFSET(TTPOLYGONHEADER, pfxStart, 8) -} - -static void test_pack_XFORM(void) -{ - /* XFORM */ - TEST_TYPE_SIZE (XFORM, 24) - TEST_TYPE_ALIGN (XFORM, 4) - TEST_FIELD_SIZE (XFORM, eM11, 4) - TEST_FIELD_ALIGN (XFORM, eM11, 4) - TEST_FIELD_OFFSET(XFORM, eM11, 0) - TEST_FIELD_SIZE (XFORM, eM12, 4) - TEST_FIELD_ALIGN (XFORM, eM12, 4) - TEST_FIELD_OFFSET(XFORM, eM12, 4) - TEST_FIELD_SIZE (XFORM, eM21, 4) - TEST_FIELD_ALIGN (XFORM, eM21, 4) - TEST_FIELD_OFFSET(XFORM, eM21, 8) - TEST_FIELD_SIZE (XFORM, eM22, 4) - TEST_FIELD_ALIGN (XFORM, eM22, 4) - TEST_FIELD_OFFSET(XFORM, eM22, 12) - TEST_FIELD_SIZE (XFORM, eDx, 4) - TEST_FIELD_ALIGN (XFORM, eDx, 4) - TEST_FIELD_OFFSET(XFORM, eDx, 16) - TEST_FIELD_SIZE (XFORM, eDy, 4) - TEST_FIELD_ALIGN (XFORM, eDy, 4) - TEST_FIELD_OFFSET(XFORM, eDy, 20) -} - -#endif /* _WIN64 */ - -static void test_pack(void) -{ - test_pack_ABC(); - test_pack_ABCFLOAT(); - test_pack_ABORTPROC(); - test_pack_BITMAP(); - test_pack_BITMAPCOREHEADER(); - test_pack_BITMAPCOREINFO(); - test_pack_BITMAPFILEHEADER(); - test_pack_BITMAPINFO(); - test_pack_BITMAPINFOHEADER(); - test_pack_BITMAPV4HEADER(); - test_pack_BITMAPV5HEADER(); - test_pack_BLENDFUNCTION(); - test_pack_CHARSETINFO(); - test_pack_CIEXYZ(); - test_pack_CIEXYZTRIPLE(); - test_pack_COLOR16(); - test_pack_COLORADJUSTMENT(); - test_pack_DEVMODEA(); - test_pack_DEVMODEW(); - test_pack_DIBSECTION(); - test_pack_DISPLAY_DEVICEA(); - test_pack_DISPLAY_DEVICEW(); - test_pack_DOCINFOA(); - test_pack_DOCINFOW(); - test_pack_EMR(); - test_pack_EMRABORTPATH(); - test_pack_EMRANGLEARC(); - test_pack_EMRARC(); - test_pack_EMRARCTO(); - test_pack_EMRBEGINPATH(); - test_pack_EMRBITBLT(); - test_pack_EMRCHORD(); - test_pack_EMRCLOSEFIGURE(); - test_pack_EMRCREATEBRUSHINDIRECT(); - test_pack_EMRCREATECOLORSPACE(); - test_pack_EMRCREATECOLORSPACEW(); - test_pack_EMRCREATEDIBPATTERNBRUSHPT(); - test_pack_EMRCREATEMONOBRUSH(); - test_pack_EMRCREATEPEN(); - test_pack_EMRDELETECOLORSPACE(); - test_pack_EMRDELETEOBJECT(); - test_pack_EMRELLIPSE(); - test_pack_EMRENDPATH(); - test_pack_EMREOF(); - test_pack_EMREXCLUDECLIPRECT(); - test_pack_EMREXTCREATEFONTINDIRECTW(); - test_pack_EMREXTCREATEPEN(); - test_pack_EMREXTFLOODFILL(); - test_pack_EMREXTSELECTCLIPRGN(); - test_pack_EMREXTTEXTOUTA(); - test_pack_EMREXTTEXTOUTW(); - test_pack_EMRFILLPATH(); - test_pack_EMRFILLRGN(); - test_pack_EMRFLATTENPATH(); - test_pack_EMRFORMAT(); - test_pack_EMRFRAMERGN(); - test_pack_EMRGDICOMMENT(); - test_pack_EMRGLSBOUNDEDRECORD(); - test_pack_EMRGLSRECORD(); - test_pack_EMRINTERSECTCLIPRECT(); - test_pack_EMRINVERTRGN(); - test_pack_EMRLINETO(); - test_pack_EMRMASKBLT(); - test_pack_EMRMODIFYWORLDTRANSFORM(); - test_pack_EMRMOVETOEX(); - test_pack_EMROFFSETCLIPRGN(); - test_pack_EMRPAINTRGN(); - test_pack_EMRPIE(); - test_pack_EMRPIXELFORMAT(); - test_pack_EMRPLGBLT(); - test_pack_EMRPOLYBEZIER(); - test_pack_EMRPOLYBEZIER16(); - test_pack_EMRPOLYBEZIERTO(); - test_pack_EMRPOLYBEZIERTO16(); - test_pack_EMRPOLYDRAW(); - test_pack_EMRPOLYDRAW16(); - test_pack_EMRPOLYGON(); - test_pack_EMRPOLYGON16(); - test_pack_EMRPOLYLINE(); - test_pack_EMRPOLYLINE16(); - test_pack_EMRPOLYLINETO(); - test_pack_EMRPOLYLINETO16(); - test_pack_EMRPOLYPOLYGON(); - test_pack_EMRPOLYPOLYGON16(); - test_pack_EMRPOLYPOLYLINE(); - test_pack_EMRPOLYPOLYLINE16(); - test_pack_EMRPOLYTEXTOUTA(); - test_pack_EMRPOLYTEXTOUTW(); - test_pack_EMRREALIZEPALETTE(); - test_pack_EMRRECTANGLE(); - test_pack_EMRRESIZEPALETTE(); - test_pack_EMRRESTOREDC(); - test_pack_EMRROUNDRECT(); - test_pack_EMRSAVEDC(); - test_pack_EMRSCALEVIEWPORTEXTEX(); - test_pack_EMRSCALEWINDOWEXTEX(); - test_pack_EMRSELECTCLIPPATH(); - test_pack_EMRSELECTCOLORSPACE(); - test_pack_EMRSELECTOBJECT(); - test_pack_EMRSELECTPALETTE(); - test_pack_EMRSETARCDIRECTION(); - test_pack_EMRSETBKCOLOR(); - test_pack_EMRSETBKMODE(); - test_pack_EMRSETBRUSHORGEX(); - test_pack_EMRSETCOLORADJUSTMENT(); - test_pack_EMRSETCOLORSPACE(); - test_pack_EMRSETDIBITSTODEVICE(); - test_pack_EMRSETICMMODE(); - test_pack_EMRSETLAYOUT(); - test_pack_EMRSETMAPMODE(); - test_pack_EMRSETMAPPERFLAGS(); - test_pack_EMRSETMETARGN(); - test_pack_EMRSETMITERLIMIT(); - test_pack_EMRSETPIXELV(); - test_pack_EMRSETPOLYFILLMODE(); - test_pack_EMRSETROP2(); - test_pack_EMRSETSTRETCHBLTMODE(); - test_pack_EMRSETTEXTALIGN(); - test_pack_EMRSETTEXTCOLOR(); - test_pack_EMRSETVIEWPORTEXTEX(); - test_pack_EMRSETVIEWPORTORGEX(); - test_pack_EMRSETWINDOWEXTEX(); - test_pack_EMRSETWINDOWORGEX(); - test_pack_EMRSETWORLDTRANSFORM(); - test_pack_EMRSTRETCHBLT(); - test_pack_EMRSTRETCHDIBITS(); - test_pack_EMRSTROKEANDFILLPATH(); - test_pack_EMRSTROKEPATH(); - test_pack_EMRTEXT(); - test_pack_EMRWIDENPATH(); - test_pack_ENHMETAHEADER(); - test_pack_ENHMETARECORD(); - test_pack_ENHMFENUMPROC(); - test_pack_ENUMLOGFONTA(); - test_pack_ENUMLOGFONTEXA(); - test_pack_ENUMLOGFONTEXW(); - test_pack_ENUMLOGFONTW(); - test_pack_EXTLOGFONTA(); - test_pack_EXTLOGFONTW(); - test_pack_EXTLOGPEN(); - test_pack_FIXED(); - test_pack_FONTENUMPROCA(); - test_pack_FONTENUMPROCW(); - test_pack_FONTSIGNATURE(); - test_pack_FXPT16DOT16(); - test_pack_FXPT2DOT30(); - test_pack_GCP_RESULTSA(); - test_pack_GCP_RESULTSW(); - test_pack_GLYPHMETRICS(); - test_pack_GLYPHMETRICSFLOAT(); - test_pack_GOBJENUMPROC(); - test_pack_GRADIENT_RECT(); - test_pack_GRADIENT_TRIANGLE(); - test_pack_HANDLETABLE(); - test_pack_ICMENUMPROCA(); - test_pack_ICMENUMPROCW(); - test_pack_KERNINGPAIR(); - test_pack_LAYERPLANEDESCRIPTOR(); - test_pack_LCSCSTYPE(); - test_pack_LCSGAMUTMATCH(); - test_pack_LINEDDAPROC(); - test_pack_LOCALESIGNATURE(); - test_pack_LOGBRUSH(); - test_pack_LOGCOLORSPACEA(); - test_pack_LOGCOLORSPACEW(); - test_pack_LOGFONTA(); - test_pack_LOGFONTW(); - test_pack_LOGPEN(); - test_pack_LPABC(); - test_pack_LPABCFLOAT(); - test_pack_LPBITMAP(); - test_pack_LPBITMAPCOREHEADER(); - test_pack_LPBITMAPCOREINFO(); - test_pack_LPBITMAPFILEHEADER(); - test_pack_LPBITMAPINFO(); - test_pack_LPBITMAPINFOHEADER(); - test_pack_LPBITMAPV5HEADER(); - test_pack_LPCHARSETINFO(); - test_pack_LPCIEXYZ(); - test_pack_LPCIEXYZTRIPLE(); - test_pack_LPCOLORADJUSTMENT(); - test_pack_LPDEVMODEA(); - test_pack_LPDEVMODEW(); - test_pack_LPDIBSECTION(); - test_pack_LPDISPLAY_DEVICEA(); - test_pack_LPDISPLAY_DEVICEW(); - test_pack_LPDOCINFOA(); - test_pack_LPDOCINFOW(); - test_pack_LPENHMETAHEADER(); - test_pack_LPENHMETARECORD(); - test_pack_LPENUMLOGFONTA(); - test_pack_LPENUMLOGFONTEXA(); - test_pack_LPENUMLOGFONTEXW(); - test_pack_LPENUMLOGFONTW(); - test_pack_LPEXTLOGFONTA(); - test_pack_LPEXTLOGFONTW(); - test_pack_LPEXTLOGPEN(); - test_pack_LPFONTSIGNATURE(); - test_pack_LPGCP_RESULTSA(); - test_pack_LPGCP_RESULTSW(); - test_pack_LPGLYPHMETRICS(); - test_pack_LPGLYPHMETRICSFLOAT(); - test_pack_LPGRADIENT_RECT(); - test_pack_LPGRADIENT_TRIANGLE(); - test_pack_LPHANDLETABLE(); - test_pack_LPKERNINGPAIR(); - test_pack_LPLAYERPLANEDESCRIPTOR(); - test_pack_LPLOCALESIGNATURE(); - test_pack_LPLOGBRUSH(); - test_pack_LPLOGCOLORSPACEA(); - test_pack_LPLOGCOLORSPACEW(); - test_pack_LPLOGFONTA(); - test_pack_LPLOGFONTW(); - test_pack_LPLOGPEN(); - test_pack_LPMAT2(); - test_pack_LPMETAFILEPICT(); - test_pack_LPMETAHEADER(); - test_pack_LPMETARECORD(); - test_pack_LPNEWTEXTMETRICA(); - test_pack_LPNEWTEXTMETRICW(); - test_pack_LPOUTLINETEXTMETRICA(); - test_pack_LPOUTLINETEXTMETRICW(); - test_pack_LPPANOSE(); - test_pack_LPPELARRAY(); - test_pack_LPPIXELFORMATDESCRIPTOR(); - test_pack_LPPOINTFX(); - test_pack_LPPOLYTEXTA(); - test_pack_LPPOLYTEXTW(); - test_pack_LPRASTERIZER_STATUS(); - test_pack_LPRGBQUAD(); - test_pack_LPRGNDATA(); - test_pack_LPTEXTMETRICA(); - test_pack_LPTEXTMETRICW(); - test_pack_LPTRIVERTEX(); - test_pack_LPTTPOLYCURVE(); - test_pack_LPTTPOLYGONHEADER(); - test_pack_LPXFORM(); - test_pack_MAT2(); - test_pack_METAFILEPICT(); - test_pack_METAHEADER(); - test_pack_METARECORD(); - test_pack_MFENUMPROC(); - test_pack_NEWTEXTMETRICA(); - test_pack_NEWTEXTMETRICEXA(); - test_pack_NEWTEXTMETRICEXW(); - test_pack_NEWTEXTMETRICW(); - test_pack_NPEXTLOGPEN(); - test_pack_OLDFONTENUMPROC(); - test_pack_OLDFONTENUMPROCA(); - test_pack_OLDFONTENUMPROCW(); - test_pack_OUTLINETEXTMETRICA(); - test_pack_OUTLINETEXTMETRICW(); - test_pack_PABC(); - test_pack_PABCFLOAT(); - test_pack_PANOSE(); - test_pack_PATTERN(); - test_pack_PBITMAP(); - test_pack_PBITMAPCOREHEADER(); - test_pack_PBITMAPCOREINFO(); - test_pack_PBITMAPFILEHEADER(); - test_pack_PBITMAPINFO(); - test_pack_PBITMAPINFOHEADER(); - test_pack_PBITMAPV4HEADER(); - test_pack_PBITMAPV5HEADER(); - test_pack_PBLENDFUNCTION(); - test_pack_PCHARSETINFO(); - test_pack_PCOLORADJUSTMENT(); - test_pack_PDEVMODEA(); - test_pack_PDEVMODEW(); - test_pack_PDIBSECTION(); - test_pack_PDISPLAY_DEVICEA(); - test_pack_PDISPLAY_DEVICEW(); - test_pack_PELARRAY(); - test_pack_PEMR(); - test_pack_PEMRABORTPATH(); - test_pack_PEMRANGLEARC(); - test_pack_PEMRARC(); - test_pack_PEMRARCTO(); - test_pack_PEMRBEGINPATH(); - test_pack_PEMRBITBLT(); - test_pack_PEMRCHORD(); - test_pack_PEMRCLOSEFIGURE(); - test_pack_PEMRCREATEBRUSHINDIRECT(); - test_pack_PEMRCREATECOLORSPACE(); - test_pack_PEMRCREATECOLORSPACEW(); - test_pack_PEMRCREATEDIBPATTERNBRUSHPT(); - test_pack_PEMRCREATEMONOBRUSH(); - test_pack_PEMRCREATEPALETTE(); - test_pack_PEMRCREATEPEN(); - test_pack_PEMRDELETECOLORSPACE(); - test_pack_PEMRDELETEOBJECT(); - test_pack_PEMRELLIPSE(); - test_pack_PEMRENDPATH(); - test_pack_PEMREOF(); - test_pack_PEMREXCLUDECLIPRECT(); - test_pack_PEMREXTCREATEFONTINDIRECTW(); - test_pack_PEMREXTCREATEPEN(); - test_pack_PEMREXTFLOODFILL(); - test_pack_PEMREXTSELECTCLIPRGN(); - test_pack_PEMREXTTEXTOUTA(); - test_pack_PEMREXTTEXTOUTW(); - test_pack_PEMRFILLPATH(); - test_pack_PEMRFILLRGN(); - test_pack_PEMRFLATTENPATH(); - test_pack_PEMRFORMAT(); - test_pack_PEMRFRAMERGN(); - test_pack_PEMRGDICOMMENT(); - test_pack_PEMRGLSBOUNDEDRECORD(); - test_pack_PEMRGLSRECORD(); - test_pack_PEMRINTERSECTCLIPRECT(); - test_pack_PEMRINVERTRGN(); - test_pack_PEMRLINETO(); - test_pack_PEMRMASKBLT(); - test_pack_PEMRMODIFYWORLDTRANSFORM(); - test_pack_PEMRMOVETOEX(); - test_pack_PEMROFFSETCLIPRGN(); - test_pack_PEMRPAINTRGN(); - test_pack_PEMRPIE(); - test_pack_PEMRPIXELFORMAT(); - test_pack_PEMRPLGBLT(); - test_pack_PEMRPOLYBEZIER(); - test_pack_PEMRPOLYBEZIER16(); - test_pack_PEMRPOLYBEZIERTO(); - test_pack_PEMRPOLYBEZIERTO16(); - test_pack_PEMRPOLYDRAW(); - test_pack_PEMRPOLYDRAW16(); - test_pack_PEMRPOLYGON(); - test_pack_PEMRPOLYGON16(); - test_pack_PEMRPOLYLINE(); - test_pack_PEMRPOLYLINE16(); - test_pack_PEMRPOLYLINETO(); - test_pack_PEMRPOLYLINETO16(); - test_pack_PEMRPOLYPOLYGON(); - test_pack_PEMRPOLYPOLYGON16(); - test_pack_PEMRPOLYPOLYLINE(); - test_pack_PEMRPOLYPOLYLINE16(); - test_pack_PEMRPOLYTEXTOUTA(); - test_pack_PEMRPOLYTEXTOUTW(); - test_pack_PEMRREALIZEPALETTE(); - test_pack_PEMRRECTANGLE(); - test_pack_PEMRRESIZEPALETTE(); - test_pack_PEMRRESTOREDC(); - test_pack_PEMRROUNDRECT(); - test_pack_PEMRSAVEDC(); - test_pack_PEMRSCALEVIEWPORTEXTEX(); - test_pack_PEMRSCALEWINDOWEXTEX(); - test_pack_PEMRSELECTCLIPPATH(); - test_pack_PEMRSELECTCOLORSPACE(); - test_pack_PEMRSELECTOBJECT(); - test_pack_PEMRSELECTPALETTE(); - test_pack_PEMRSETARCDIRECTION(); - test_pack_PEMRSETBKCOLOR(); - test_pack_PEMRSETBKMODE(); - test_pack_PEMRSETBRUSHORGEX(); - test_pack_PEMRSETCOLORADJUSTMENT(); - test_pack_PEMRSETCOLORSPACE(); - test_pack_PEMRSETDIBITSTODEVICE(); - test_pack_PEMRSETICMMODE(); - test_pack_PEMRSETLAYOUT(); - test_pack_PEMRSETMAPMODE(); - test_pack_PEMRSETMAPPERFLAGS(); - test_pack_PEMRSETMETARGN(); - test_pack_PEMRSETMITERLIMIT(); - test_pack_PEMRSETPALETTEENTRIES(); - test_pack_PEMRSETPIXELV(); - test_pack_PEMRSETPOLYFILLMODE(); - test_pack_PEMRSETROP2(); - test_pack_PEMRSETSTRETCHBLTMODE(); - test_pack_PEMRSETTEXTALIGN(); - test_pack_PEMRSETTEXTCOLOR(); - test_pack_PEMRSETVIEWPORTEXTEX(); - test_pack_PEMRSETVIEWPORTORGEX(); - test_pack_PEMRSETWINDOWEXTEX(); - test_pack_PEMRSETWINDOWORGEX(); - test_pack_PEMRSETWORLDTRANSFORM(); - test_pack_PEMRSTRETCHBLT(); - test_pack_PEMRSTRETCHDIBITS(); - test_pack_PEMRSTROKEANDFILLPATH(); - test_pack_PEMRSTROKEPATH(); - test_pack_PEMRTEXT(); - test_pack_PEMRWIDENPATH(); - test_pack_PENHMETAHEADER(); - test_pack_PEXTLOGFONTA(); - test_pack_PEXTLOGFONTW(); - test_pack_PEXTLOGPEN(); - test_pack_PFONTSIGNATURE(); - test_pack_PGLYPHMETRICSFLOAT(); - test_pack_PGRADIENT_RECT(); - test_pack_PGRADIENT_TRIANGLE(); - test_pack_PHANDLETABLE(); - test_pack_PIXELFORMATDESCRIPTOR(); - test_pack_PLAYERPLANEDESCRIPTOR(); - test_pack_PLOCALESIGNATURE(); - test_pack_PLOGBRUSH(); - test_pack_PLOGFONTA(); - test_pack_PLOGFONTW(); - test_pack_PMETAHEADER(); - test_pack_PMETARECORD(); - test_pack_PNEWTEXTMETRICA(); - test_pack_PNEWTEXTMETRICW(); - test_pack_POINTFLOAT(); - test_pack_POINTFX(); - test_pack_POLYTEXTA(); - test_pack_POLYTEXTW(); - test_pack_POUTLINETEXTMETRICA(); - test_pack_POUTLINETEXTMETRICW(); - test_pack_PPELARRAY(); - test_pack_PPIXELFORMATDESCRIPTOR(); - test_pack_PPOINTFLOAT(); - test_pack_PPOLYTEXTA(); - test_pack_PPOLYTEXTW(); - test_pack_PRGNDATA(); - test_pack_PRGNDATAHEADER(); - test_pack_PTEXTMETRICA(); - test_pack_PTEXTMETRICW(); - test_pack_PTRIVERTEX(); - test_pack_PXFORM(); - test_pack_RASTERIZER_STATUS(); - test_pack_RGBQUAD(); - test_pack_RGBTRIPLE(); - test_pack_RGNDATA(); - test_pack_RGNDATAHEADER(); - test_pack_TEXTMETRICA(); - test_pack_TEXTMETRICW(); - test_pack_TRIVERTEX(); - test_pack_TTPOLYCURVE(); - test_pack_TTPOLYGONHEADER(); - test_pack_XFORM(); -} - -START_TEST(generated) -{ - test_pack(); -} diff --git a/rostests/winetests/gdi32/icm.c b/rostests/winetests/gdi32/icm.c deleted file mode 100644 index 4afae6beb30..00000000000 --- a/rostests/winetests/gdi32/icm.c +++ /dev/null @@ -1,309 +0,0 @@ -/* - * Tests for ICM functions - * - * Copyright (C) 2005, 2008 Hans Leidekker - * - * 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 "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "wingdi.h" - -#include "wine/test.h" - -static const WCHAR displayW[] = {'D','I','S','P','L','A','Y',0}; - -static void test_GetICMProfileA( HDC dc ) -{ - BOOL ret; - DWORD size, error; - char filename[MAX_PATH]; - - SetLastError( 0xdeadbeef ); - ret = GetICMProfileA( NULL, NULL, NULL ); - if ( !ret && ( GetLastError() == ERROR_CALL_NOT_IMPLEMENTED ) ) - { - win_skip( "GetICMProfileA is not implemented\n" ); - return; - } - ok( !ret, "GetICMProfileA succeeded\n" ); - - ret = GetICMProfileA( dc, NULL, NULL ); - ok( !ret, "GetICMProfileA succeeded\n" ); - - size = MAX_PATH; - ret = GetICMProfileA( dc, &size, NULL ); - ok( !ret, "GetICMProfileA succeeded\n" ); - - size = MAX_PATH; - ret = GetICMProfileA( NULL, &size, filename ); - ok( !ret, "GetICMProfileA succeeded\n" ); - - size = 0; - filename[0] = 0; - SetLastError(0xdeadbeef); - ret = GetICMProfileA( dc, &size, filename ); - error = GetLastError(); - ok( !ret, "GetICMProfileA succeeded\n" ); - ok( size, "expected size > 0\n" ); - ok( filename[0] == 0, "Expected filename to be empty\n" ); - ok( error == ERROR_INSUFFICIENT_BUFFER, "got %d, expected ERROR_INSUFFICIENT_BUFFER\n", error ); - - ret = GetICMProfileA( dc, NULL, filename ); - ok( !ret, "GetICMProfileA succeeded\n" ); - - size = MAX_PATH; - ret = GetICMProfileA( dc, &size, filename ); - ok( ret, "GetICMProfileA failed %d\n", GetLastError() ); - - trace( "%s\n", filename ); -} - -static void test_GetICMProfileW( HDC dc ) -{ - BOOL ret; - DWORD size, error; - WCHAR filename[MAX_PATH]; - - SetLastError( 0xdeadbeef ); - ret = GetICMProfileW( NULL, NULL, NULL ); - if ( !ret && ( GetLastError() == ERROR_CALL_NOT_IMPLEMENTED ) ) - { - win_skip( "GetICMProfileW is not implemented\n" ); - return; - } - ok( !ret, "GetICMProfileW succeeded\n" ); - - ret = GetICMProfileW( dc, NULL, NULL ); - ok( !ret, "GetICMProfileW succeeded\n" ); - - if (0) - { - /* Vista crashes */ - size = MAX_PATH; - ret = GetICMProfileW( dc, &size, NULL ); - ok( ret, "GetICMProfileW failed %d\n", GetLastError() ); - } - - ret = GetICMProfileW( dc, NULL, filename ); - ok( !ret, "GetICMProfileW succeeded\n" ); - - size = MAX_PATH; - ret = GetICMProfileW( NULL, &size, filename ); - ok( !ret, "GetICMProfileW succeeded\n" ); - - size = 0; - SetLastError(0xdeadbeef); - ret = GetICMProfileW( dc, &size, filename ); - error = GetLastError(); - ok( !ret, "GetICMProfileW succeeded\n" ); - ok( size, "expected size > 0\n" ); - ok( error == ERROR_INSUFFICIENT_BUFFER, "got %d, expected ERROR_INSUFFICIENT_BUFFER\n", error ); - - size = MAX_PATH; - ret = GetICMProfileW( dc, &size, filename ); - ok( ret, "GetICMProfileW failed %d\n", GetLastError() ); -} - -static void test_SetICMMode( HDC dc ) -{ - INT ret, knob, save; - BOOL impl; - - SetLastError( 0xdeadbeef ); - impl = GetICMProfileA( NULL, NULL, NULL ); - if ( !impl && ( GetLastError() == ERROR_CALL_NOT_IMPLEMENTED ) ) - { - win_skip( "On NT4 where SetICMMode is not implemented but this is not advertised\n" ); - return; - } - - SetLastError( 0xdeadbeef ); - ret = SetICMMode( NULL, 0 ); - ok( !ret, "SetICMMode succeeded (%d)\n", GetLastError() ); - - ret = SetICMMode( dc, -1 ); - ok( !ret, "SetICMMode succeeded (%d)\n", GetLastError() ); - - save = SetICMMode( dc, ICM_QUERY ); - ok( save == ICM_ON || save == ICM_OFF, "SetICMMode failed (%d)\n", GetLastError() ); - - if (save == ICM_ON) knob = ICM_OFF; else knob = ICM_ON; - - ret = SetICMMode( dc, knob ); - todo_wine ok( ret, "SetICMMode failed (%d)\n", GetLastError() ); - - ret = SetICMMode( dc, ICM_QUERY ); - todo_wine ok( ret == knob, "SetICMMode failed (%d)\n", GetLastError() ); - - ret = SetICMMode( dc, save ); - ok( ret, "SetICMMode failed (%d)\n", GetLastError() ); - - SetLastError( 0xdeadbeef ); - dc = CreateDCW( displayW, NULL, NULL, NULL ); - if ( !dc && ( GetLastError() == ERROR_CALL_NOT_IMPLEMENTED ) ) - { - win_skip( "CreateDCW is not implemented\n" ); - return; - } - ok( dc != NULL, "CreateDCW failed (%d)\n", GetLastError() ); - - ret = SetICMMode( dc, ICM_QUERY ); - ok( ret == ICM_OFF, "SetICMMode failed (%d)\n", GetLastError() ); - - DeleteDC( dc ); -} - -static INT CALLBACK enum_profiles_callbackA( LPSTR filename, LPARAM lparam ) -{ - trace("%s\n", filename); - return 1; -} - -static void test_EnumICMProfilesA( HDC dc ) -{ - INT ret; - - ret = EnumICMProfilesA( NULL, NULL, 0 ); - ok(ret == -1 || broken(ret == 0) /* nt4 */, "expected -1, got %d\n", ret); - - ret = EnumICMProfilesA( dc, enum_profiles_callbackA, 0 ); - ok(ret == -1 || ret == 1 || broken(ret == 0) /* nt4 */, - "expected -1 or 1, got %d\n", ret); - - ret = EnumICMProfilesA( dc, NULL, 0 ); - ok(ret == -1 || broken(ret == 0) /* nt4 */, "expected -1, got %d\n", ret); -} - -static INT CALLBACK enum_profiles_callbackW( LPWSTR filename, LPARAM lparam ) -{ - return 1; -} - -static void test_EnumICMProfilesW( HDC dc ) -{ - INT ret; - - ret = EnumICMProfilesW( NULL, NULL, 0 ); - ok(ret == -1 || broken(ret == 0) /* NT4 */, "expected -1, got %d\n", ret); - - ret = EnumICMProfilesW( dc, NULL, 0 ); - ok(ret == -1 || broken(ret == 0) /* NT4 */, "expected -1, got %d\n", ret); - - ret = EnumICMProfilesW( dc, enum_profiles_callbackW, 0 ); - ok(ret == -1 || ret == 1 || broken(ret == 0) /* NT4 */, "expected -1 or 1, got %d\n", ret); -} - -static void test_SetICMProfileA( HDC dc ) -{ - BOOL ret; - char profile[MAX_PATH]; - DWORD len, error; - - SetLastError( 0xdeadbeef ); - ret = SetICMProfileA( NULL, NULL ); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("SetICMProfileA is not implemented\n"); - return; - } - - len = sizeof(profile); - ret = GetICMProfileA( dc, &len, profile ); - ok(ret, "GetICMProfileA failed %u\n", GetLastError()); - - SetLastError( 0xdeadbeef ); - ret = SetICMProfileA( NULL, NULL ); - error = GetLastError(); - ok(!ret, "SetICMProfileA succeeded\n"); - ok(error == ERROR_INVALID_PARAMETER, - "expected ERROR_INVALID_PARAMETER, got %u\n", error); - - SetLastError( 0xdeadbeef ); - ret = SetICMProfileA( NULL, profile ); - error = GetLastError(); - ok(!ret, "SetICMProfileA succeeded\n"); - ok(error == ERROR_INVALID_HANDLE, - "expected ERROR_INVALID_HANDLE, got %u\n", error); - - SetLastError( 0xdeadbeef ); - ret = SetICMProfileA( dc, NULL ); - error = GetLastError(); - ok(!ret, "SetICMProfileA succeeded\n"); - ok(error == ERROR_INVALID_PARAMETER, - "expected ERROR_INVALID_PARAMETER, got %u\n", error); - - ret = SetICMProfileA( dc, profile ); - ok(ret, "SetICMProfileA failed %u\n", GetLastError()); -} - -static void test_SetICMProfileW( HDC dc ) -{ - BOOL ret; - WCHAR profile[MAX_PATH]; - DWORD len, error; - - SetLastError( 0xdeadbeef ); - ret = SetICMProfileW( NULL, NULL ); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("SetICMProfileW is not implemented\n"); - return; - } - - len = sizeof(profile)/sizeof(profile[0]); - ret = GetICMProfileW( dc, &len, profile ); - ok(ret, "GetICMProfileW failed %u\n", GetLastError()); - - SetLastError( 0xdeadbeef ); - ret = SetICMProfileW( NULL, NULL ); - error = GetLastError(); - ok(!ret, "SetICMProfileW succeeded\n"); - ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error); - - SetLastError( 0xdeadbeef ); - ret = SetICMProfileW( NULL, profile ); - error = GetLastError(); - ok(!ret, "SetICMProfileW succeeded\n"); - ok(error == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %u\n", error); - - SetLastError( 0xdeadbeef ); - ret = SetICMProfileW( dc, NULL ); - error = GetLastError(); - ok(!ret, "SetICMProfileW succeeded\n"); - ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error); - - ret = SetICMProfileW( dc, profile ); - ok(ret, "SetICMProfileW failed %u\n", GetLastError()); -} - -START_TEST(icm) -{ - HDC dc = GetDC( NULL ); - - test_GetICMProfileA( dc ); - test_GetICMProfileW( dc ); - test_SetICMMode( dc ); - test_EnumICMProfilesA( dc ); - test_EnumICMProfilesW( dc ); - test_SetICMProfileA( dc ); - test_SetICMProfileW( dc ); - - ReleaseDC( NULL, dc ); -} diff --git a/rostests/winetests/gdi32/mapping.c b/rostests/winetests/gdi32/mapping.c deleted file mode 100644 index 650efdae157..00000000000 --- a/rostests/winetests/gdi32/mapping.c +++ /dev/null @@ -1,739 +0,0 @@ -/* - * Unit tests for mapping functions - * - * Copyright (c) 2005 Huw Davies - * Copyright (c) 2008 Dmitry Timoshkov - * - * 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 "wine/test.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winerror.h" - -static DWORD (WINAPI *pSetLayout)(HDC hdc, DWORD layout); -static DWORD (WINAPI *pGetLayout)(HDC hdc); -static INT (WINAPI *pGetRandomRgn)(HDC hDC, HRGN hRgn, INT iCode); -static BOOL (WINAPI *pGetTransform)(HDC, DWORD, XFORM *); -static DWORD (WINAPI *pSetVirtualResolution)(HDC, DWORD, DWORD, DWORD, DWORD); - -#define rough_match(got, expected) (abs( MulDiv( (got) - (expected), 1000, (expected) )) <= 5) - -#define expect_LPtoDP(_hdc, _x, _y) \ -{ \ - POINT _pt = { 1000, 1000 }; \ - LPtoDP(_hdc, &_pt, 1); \ - ok(rough_match(_pt.x, _x), "expected x %d, got %d\n", (_x), _pt.x); \ - ok(rough_match(_pt.y, _y), "expected y %d, got %d\n", (_y), _pt.y); \ -} - -#define expect_world_transform(_hdc, _em11, _em22) \ -{ \ - BOOL _ret; \ - XFORM _xform; \ - SetLastError(0xdeadbeef); \ - _ret = GetWorldTransform(_hdc, &_xform); \ - if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) \ - { \ - ok(_ret, "GetWorldTransform error %u\n", GetLastError()); \ - ok(_xform.eM11 == (_em11), "expected %f, got %f\n", (_em11), _xform.eM11); \ - ok(_xform.eM12 == 0.0, "expected 0.0, got %f\n", _xform.eM12); \ - ok(_xform.eM21 == 0.0, "expected 0.0, got %f\n", _xform.eM21); \ - ok(_xform.eM22 == (_em22), "expected %f, got %f\n", (_em22), _xform.eM22); \ - ok(_xform.eDx == 0.0, "expected 0.0, got %f\n", _xform.eDx); \ - ok(_xform.eDy == 0.0, "expected 0.0, got %f\n", _xform.eDy); \ - } \ -} - -#define expect_dc_ext(_func, _hdc, _cx, _cy) \ -{ \ - BOOL _ret; \ - SIZE _size; \ - SetLastError(0xdeadbeef); \ - _ret = _func(_hdc, &_size); \ - ok(_ret, #_func " error %u\n", GetLastError()); \ - ok(_size.cx == (_cx), "expected cx %d, got %d\n", (_cx), _size.cx); \ - ok(_size.cy == (_cy), "expected cy %d, got %d\n", (_cy), _size.cy); \ -} - -#define expect_viewport_ext(_hdc, _cx, _cy) expect_dc_ext(GetViewportExtEx, _hdc, _cx, _cy) -#define expect_window_ext(_hdc, _cx, _cy) expect_dc_ext(GetWindowExtEx, _hdc, _cx, _cy) - -static void test_world_transform(void) -{ - HDC hdc; - INT ret, size_cx, size_cy, res_x, res_y, dpi_x, dpi_y; - XFORM xform; - SIZE size; - - hdc = CreateCompatibleDC(0); - - xform.eM11 = 1.0f; - xform.eM12 = 0.0f; - xform.eM21 = 0.0f; - xform.eM22 = 1.0f; - xform.eDx = 0.0f; - xform.eDy = 0.0f; - ret = SetWorldTransform(hdc, &xform); - ok(!ret, "SetWorldTransform should fail in GM_COMPATIBLE mode\n"); - - size_cx = GetDeviceCaps(hdc, HORZSIZE); - size_cy = GetDeviceCaps(hdc, VERTSIZE); - res_x = GetDeviceCaps(hdc, HORZRES); - res_y = GetDeviceCaps(hdc, VERTRES); - dpi_x = GetDeviceCaps(hdc, LOGPIXELSX); - dpi_y = GetDeviceCaps(hdc, LOGPIXELSY); - trace("dc size %d x %d, resolution %d x %d dpi %d x %d\n", - size_cx, size_cy, res_x, res_y, dpi_x, dpi_y ); - - expect_viewport_ext(hdc, 1, 1); - expect_window_ext(hdc, 1, 1); - expect_world_transform(hdc, 1.0, 1.0); - expect_LPtoDP(hdc, 1000, 1000); - - SetLastError(0xdeadbeef); - ret = SetMapMode(hdc, MM_LOMETRIC); - ok(ret == MM_TEXT, "expected MM_TEXT, got %d\n", ret); - - expect_viewport_ext(hdc, res_x, -res_y); - ok( GetWindowExtEx( hdc, &size ), "GetWindowExtEx failed\n" ); - ok( rough_match( size.cx, size_cx * 10 ) || - rough_match( size.cx, MulDiv( res_x, 254, dpi_x )), /* Vista uses a more precise method */ - "expected cx %d or %d, got %d\n", size_cx * 10, MulDiv( res_x, 254, dpi_x ), size.cx ); - ok( rough_match( size.cy, size_cy * 10 ) || - rough_match( size.cy, MulDiv( res_y, 254, dpi_y )), /* Vista uses a more precise method */ - "expected cy %d or %d, got %d\n", size_cy * 10, MulDiv( res_y, 254, dpi_y ), size.cy ); - expect_world_transform(hdc, 1.0, 1.0); - expect_LPtoDP(hdc, MulDiv(1000 / 10, res_x, size_cx), -MulDiv(1000 / 10, res_y, size_cy)); - - SetLastError(0xdeadbeef); - ret = SetMapMode(hdc, MM_TEXT); - ok(ret == MM_LOMETRIC, "expected MM_LOMETRIC, got %d\n", ret); - - expect_viewport_ext(hdc, 1, 1); - expect_window_ext(hdc, 1, 1); - expect_world_transform(hdc, 1.0, 1.0); - expect_LPtoDP(hdc, 1000, 1000); - - ret = SetGraphicsMode(hdc, GM_ADVANCED); - if (!ret) - { - DeleteDC(hdc); - skip("GM_ADVANCED is not supported on this platform\n"); - return; - } - - expect_viewport_ext(hdc, 1, 1); - expect_window_ext(hdc, 1, 1); - expect_world_transform(hdc, 1.0, 1.0); - expect_LPtoDP(hdc, 1000, 1000); - - /* The transform must conform to (eM11 * eM22 != eM12 * eM21) requirement */ - xform.eM11 = 1.0f; - xform.eM12 = 2.0f; - xform.eM21 = 1.0f; - xform.eM22 = 2.0f; - xform.eDx = 0.0f; - xform.eDy = 0.0f; - ret = SetWorldTransform(hdc, &xform); - ok(!ret || - broken(ret), /* NT4 */ - "SetWorldTransform should fail with an invalid xform\n"); - - xform.eM11 = 20.0f; - xform.eM12 = 0.0f; - xform.eM21 = 0.0f; - xform.eM22 = 20.0f; - xform.eDx = 0.0f; - xform.eDy = 0.0f; - SetLastError(0xdeadbeef); - ret = SetWorldTransform(hdc, &xform); - ok(ret, "SetWorldTransform error %u\n", GetLastError()); - - expect_viewport_ext(hdc, 1, 1); - expect_window_ext(hdc, 1, 1); - expect_world_transform(hdc, 20.0, 20.0); - expect_LPtoDP(hdc, 20000, 20000); - - SetLastError(0xdeadbeef); - ret = SetMapMode(hdc, MM_LOMETRIC); - ok(ret == MM_TEXT, "expected MM_TEXT, got %d\n", ret); - - expect_viewport_ext(hdc, res_x, -res_y); - ok( GetWindowExtEx( hdc, &size ), "GetWindowExtEx failed\n" ); - ok( rough_match( size.cx, size_cx * 10 ) || - rough_match( size.cx, MulDiv( res_x, 254, dpi_x )), /* Vista uses a more precise method */ - "expected cx %d or %d, got %d\n", size_cx * 10, MulDiv( res_x, 254, dpi_x ), size.cx ); - ok( rough_match( size.cy, size_cy * 10 ) || - rough_match( size.cy, MulDiv( res_y, 254, dpi_y )), /* Vista uses a more precise method */ - "expected cy %d or %d, got %d\n", size_cy * 10, MulDiv( res_y, 254, dpi_y ), size.cy ); - expect_world_transform(hdc, 20.0, 20.0); - expect_LPtoDP(hdc, MulDiv(20000, res_x, size.cx), -MulDiv(20000, res_y, size.cy)); - - SetLastError(0xdeadbeef); - ret = SetMapMode(hdc, MM_TEXT); - ok(ret == MM_LOMETRIC, "expected MM_LOMETRIC, got %d\n", ret); - - expect_viewport_ext(hdc, 1, 1); - expect_window_ext(hdc, 1, 1); - expect_world_transform(hdc, 20.0, 20.0); - expect_LPtoDP(hdc, 20000, 20000); - - size.cx = 0xdeadbeef; - size.cy = 0xdeadbeef; - ret = SetViewportExtEx(hdc, -1, -1, &size); - ok(ret, "SetViewportExtEx(-1, -1) failed\n"); - ok(size.cx == 1 && size.cy == 1, "expected 1,1 got %d,%d\n", size.cx, size.cy); - expect_viewport_ext(hdc, 1, 1); - expect_window_ext(hdc, 1, 1); - expect_world_transform(hdc, 20.0, 20.0); - expect_LPtoDP(hdc, 20000, 20000); - - ret = SetMapMode(hdc, MM_ANISOTROPIC); - ok(ret == MM_TEXT, "expected MM_TEXT, got %d\n", ret); - - expect_viewport_ext(hdc, 1, 1); - expect_window_ext(hdc, 1, 1); - expect_world_transform(hdc, 20.0, 20.0); - expect_LPtoDP(hdc, 20000, 20000); - - size.cx = 0xdeadbeef; - size.cy = 0xdeadbeef; - ret = SetViewportExtEx(hdc, -1, -1, &size); - ok(ret, "SetViewportExtEx(-1, -1) failed\n"); - ok(size.cx == 1 && size.cy == 1, "expected 1,1 got %d,%d\n", size.cx, size.cy); - expect_viewport_ext(hdc, -1, -1); - expect_window_ext(hdc, 1, 1); - expect_world_transform(hdc, 20.0, 20.0); - expect_LPtoDP(hdc, -20000, -20000); - - ret = SetGraphicsMode(hdc, GM_COMPATIBLE); - ok(ret, "SetGraphicsMode(GM_COMPATIBLE) should not fail if DC has't an identity transform\n"); - ret = GetGraphicsMode(hdc); - ok(ret == GM_COMPATIBLE, "expected GM_COMPATIBLE, got %d\n", ret); - - expect_viewport_ext(hdc, -1, -1); - expect_window_ext(hdc, 1, 1); - expect_world_transform(hdc, 20.0, 20.0); - expect_LPtoDP(hdc, -20000, -20000); - - DeleteDC(hdc); -} - -static void test_dc_layout(void) -{ - INT ret, size_cx, size_cy, res_x, res_y, dpi_x, dpi_y; - SIZE size; - POINT pt; - HBITMAP bitmap; - RECT rc, ret_rc; - HDC hdc; - HRGN hrgn; - - if (!pGetLayout || !pSetLayout) - { - win_skip( "Don't have SetLayout\n" ); - return; - } - - hdc = CreateCompatibleDC(0); - bitmap = CreateCompatibleBitmap( hdc, 100, 100 ); - SelectObject( hdc, bitmap ); - - size_cx = GetDeviceCaps(hdc, HORZSIZE); - size_cy = GetDeviceCaps(hdc, VERTSIZE); - res_x = GetDeviceCaps(hdc, HORZRES); - res_y = GetDeviceCaps(hdc, VERTRES); - dpi_x = GetDeviceCaps(hdc, LOGPIXELSX); - dpi_y = GetDeviceCaps(hdc, LOGPIXELSY); - - ret = GetMapMode( hdc ); - ok(ret == MM_TEXT, "expected MM_TEXT, got %d\n", ret); - expect_viewport_ext(hdc, 1, 1); - expect_window_ext(hdc, 1, 1); - expect_world_transform(hdc, 1.0, 1.0); - expect_LPtoDP(hdc, 1000, 1000); - - pSetLayout( hdc, LAYOUT_RTL ); - if (!pGetLayout( hdc )) - { - win_skip( "SetLayout not supported\n" ); - DeleteDC(hdc); - return; - } - - ret = GetMapMode( hdc ); - ok(ret == MM_ANISOTROPIC, "expected MM_ANISOTROPIC, got %d\n", ret); - expect_viewport_ext(hdc, 1, 1); - expect_window_ext(hdc, 1, 1); - expect_world_transform(hdc, 1.0, 1.0); - expect_LPtoDP(hdc, -1000 + 99, 1000); - GetViewportOrgEx( hdc, &pt ); - ok( pt.x == 0 && pt.y == 0, "wrong origin %d,%d\n", pt.x, pt.y ); - GetWindowOrgEx( hdc, &pt ); - ok( pt.x == 0 && pt.y == 0, "wrong origin %d,%d\n", pt.x, pt.y ); - GetDCOrgEx( hdc, &pt ); - ok( pt.x == 0 && pt.y == 0, "wrong origin %d,%d\n", pt.x, pt.y ); - if (pGetTransform) - { - XFORM xform; - BOOL ret = pGetTransform( hdc, 0x204, &xform ); /* World -> Device */ - ok( ret, "got %d\n", ret ); - ok( xform.eM11 == -1.0, "got %f\n", xform.eM11 ); - ok( xform.eM12 == 0.0, "got %f\n", xform.eM12 ); - ok( xform.eM21 == 0.0, "got %f\n", xform.eM21 ); - ok( xform.eM22 == 1.0, "got %f\n", xform.eM22 ); - ok( xform.eDx == 99.0, "got %f\n", xform.eDx ); - ok( xform.eDy == 0.0, "got %f\n", xform.eDy ); - } - - SetRect( &rc, 10, 10, 20, 20 ); - IntersectClipRect( hdc, 10, 10, 20, 20 ); - hrgn = CreateRectRgn( 0, 0, 0, 0 ); - GetClipRgn( hdc, hrgn ); - GetRgnBox( hrgn, &ret_rc ); - ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n", - ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom ); - pSetLayout( hdc, LAYOUT_LTR ); - SetRect( &rc, 80, 10, 90, 20 ); - GetClipRgn( hdc, hrgn ); - GetRgnBox( hrgn, &ret_rc ); - ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n", - ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom ); - GetClipBox( hdc, &ret_rc ); - ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n", - ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom ); - IntersectClipRect( hdc, 80, 10, 85, 20 ); - pSetLayout( hdc, LAYOUT_RTL ); - SetRect( &rc, 15, 10, 20, 20 ); - GetClipRgn( hdc, hrgn ); - GetRgnBox( hrgn, &ret_rc ); - ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n", - ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom ); - GetClipBox( hdc, &ret_rc ); - ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n", - ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom ); - SetRectRgn( hrgn, 60, 10, 80, 20 ); - pSetLayout( hdc, LAYOUT_LTR ); - ExtSelectClipRgn( hdc, hrgn, RGN_OR ); - pSetLayout( hdc, LAYOUT_RTL ); - SetRect( &rc, 15, 10, 40, 20 ); - GetClipRgn( hdc, hrgn ); - GetRgnBox( hrgn, &ret_rc ); - ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n", - ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom ); - GetClipBox( hdc, &ret_rc ); - ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n", - ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom ); - - /* OffsetClipRgn mirrors too */ - OffsetClipRgn( hdc, 5, 5 ); - OffsetRect( &rc, 5, 5 ); - GetClipRgn( hdc, hrgn ); - GetRgnBox( hrgn, &ret_rc ); - ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n", - ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom ); - - /* GetRandomRgn returns the raw region */ - if (pGetRandomRgn) - { - SetRect( &rc, 55, 15, 80, 25 ); - pGetRandomRgn( hdc, hrgn, 1 ); - GetRgnBox( hrgn, &ret_rc ); - ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n", - ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom ); - } - - SetMapMode(hdc, MM_LOMETRIC); - ret = GetMapMode( hdc ); - ok(ret == MM_ANISOTROPIC, "expected MM_ANISOTROPIC, got %d\n", ret); - - expect_viewport_ext(hdc, res_x, -res_y); - ok( GetWindowExtEx( hdc, &size ), "GetWindowExtEx failed\n" ); - ok( rough_match( size.cx, size_cx * 10 ) || - rough_match( size.cx, MulDiv( res_x, 254, dpi_x )), /* Vista uses a more precise method */ - "expected cx %d or %d, got %d\n", size_cx * 10, MulDiv( res_x, 254, dpi_x ), size.cx ); - ok( rough_match( size.cy, size_cy * 10 ) || - rough_match( size.cy, MulDiv( res_y, 254, dpi_y )), /* Vista uses a more precise method */ - "expected cy %d or %d, got %d\n", size_cy * 10, MulDiv( res_y, 254, dpi_y ), size.cy ); - expect_world_transform(hdc, 1.0, 1.0); - expect_LPtoDP(hdc, -MulDiv(1000 / 10, res_x, size_cx) + 99, -MulDiv(1000 / 10, res_y, size_cy)); - - SetMapMode(hdc, MM_TEXT); - ret = GetMapMode( hdc ); - ok(ret == MM_ANISOTROPIC, "expected MM_ANISOTROPIC, got %d\n", ret); - pSetLayout( hdc, LAYOUT_LTR ); - ret = GetMapMode( hdc ); - ok(ret == MM_ANISOTROPIC, "expected MM_ANISOTROPIC, got %d\n", ret); - SetMapMode(hdc, MM_TEXT); - ret = GetMapMode( hdc ); - ok(ret == MM_TEXT, "expected MM_TEXT, got %d\n", ret); - - DeleteDC(hdc); - DeleteObject( bitmap ); -} - -static void test_modify_world_transform(void) -{ - HDC hdc = GetDC(0); - int ret; - - ret = SetGraphicsMode(hdc, GM_ADVANCED); - ok(ret, "ret = %d\n", ret); - - ret = ModifyWorldTransform(hdc, NULL, MWT_IDENTITY); - ok(ret, "ret = %d\n", ret); - - ret = ModifyWorldTransform(hdc, NULL, MWT_LEFTMULTIPLY); - ok(!ret, "ret = %d\n", ret); - - ret = ModifyWorldTransform(hdc, NULL, MWT_RIGHTMULTIPLY); - ok(!ret, "ret = %d\n", ret); - - ReleaseDC(0, hdc); -} - -static void test_SetWindowExt(HDC hdc, LONG cx, LONG cy, LONG expected_vp_cx, LONG expected_vp_cy) -{ - SIZE windowExt, viewportExt; - POINT windowOrg, windowOrgAfter, viewportOrg, viewportOrgAfter; - - GetWindowOrgEx(hdc, &windowOrg); - GetViewportOrgEx(hdc, &viewportOrg); - - SetWindowExtEx(hdc, cx, cy, NULL); - GetWindowExtEx(hdc, &windowExt); - ok(windowExt.cx == cx && windowExt.cy == cy, - "Window extension: Expected %dx%d, got %dx%d\n", - cx, cy, windowExt.cx, windowExt.cy); - - GetViewportExtEx(hdc, &viewportExt); - ok(rough_match(viewportExt.cx, expected_vp_cx) && rough_match(viewportExt.cy, expected_vp_cy), - "Viewport extents have not been properly adjusted: Expected %dx%d, got %dx%d\n", - expected_vp_cx, expected_vp_cy, viewportExt.cx, viewportExt.cy); - - GetWindowOrgEx(hdc, &windowOrgAfter); - ok(windowOrg.x == windowOrgAfter.x && windowOrg.y == windowOrgAfter.y, - "Window origin changed from (%d,%d) to (%d,%d)\n", - windowOrg.x, windowOrg.y, windowOrgAfter.x, windowOrgAfter.y); - - GetViewportOrgEx(hdc, &viewportOrgAfter); - ok(viewportOrg.x == viewportOrgAfter.x && viewportOrg.y == viewportOrgAfter.y, - "Viewport origin changed from (%d,%d) to (%d,%d)\n", - viewportOrg.x, viewportOrg.y, viewportOrgAfter.x, viewportOrgAfter.y); -} - -static void test_SetViewportExt(HDC hdc, LONG cx, LONG cy, LONG expected_vp_cx, LONG expected_vp_cy) -{ - SIZE windowExt, windowExtAfter, viewportExt; - POINT windowOrg, windowOrgAfter, viewportOrg, viewportOrgAfter; - - GetWindowOrgEx(hdc, &windowOrg); - GetViewportOrgEx(hdc, &viewportOrg); - GetWindowExtEx(hdc, &windowExt); - - SetViewportExtEx(hdc, cx, cy, NULL); - GetViewportExtEx(hdc, &viewportExt); - ok(rough_match(viewportExt.cx, expected_vp_cx) && rough_match(viewportExt.cy, expected_vp_cy), - "Viewport extents have not been properly adjusted: Expected %dx%d, got %dx%d\n", - expected_vp_cx, expected_vp_cy, viewportExt.cx, viewportExt.cy); - - GetWindowExtEx(hdc, &windowExtAfter); - ok(windowExt.cx == windowExtAfter.cx && windowExt.cy == windowExtAfter.cy, - "Window extension changed from %dx%d to %dx%d\n", - windowExt.cx, windowExt.cy, windowExtAfter.cx, windowExtAfter.cy); - - GetWindowOrgEx(hdc, &windowOrgAfter); - ok(windowOrg.x == windowOrgAfter.x && windowOrg.y == windowOrgAfter.y, - "Window origin changed from (%d,%d) to (%d,%d)\n", - windowOrg.x, windowOrg.y, windowOrgAfter.x, windowOrgAfter.y); - - GetViewportOrgEx(hdc, &viewportOrgAfter); - ok(viewportOrg.x == viewportOrgAfter.x && viewportOrg.y == viewportOrgAfter.y, - "Viewport origin changed from (%d,%d) to (%d,%d)\n", - viewportOrg.x, viewportOrg.y, viewportOrgAfter.x, viewportOrgAfter.y); -} - -static void test_isotropic_mapping(void) -{ - SIZE win, vp; - HDC hdc = GetDC(0); - - SetMapMode(hdc, MM_ISOTROPIC); - - /* MM_ISOTROPIC is set up like MM_LOMETRIC. - Initial values after SetMapMode(): - (1 inch = 25.4 mm) - - Windows 9x: Windows NT: - Window Ext: 254 x -254 HORZSIZE*10 x VERTSIZE*10 - Viewport Ext: LOGPIXELSX x LOGPIXELSY HORZRES x -VERTRES - - To test without rounding errors, we have to use multiples of - these values! - */ - - GetWindowExtEx(hdc, &win); - GetViewportExtEx(hdc, &vp); - - test_SetViewportExt(hdc, 10 * vp.cx, 10 * vp.cy, 10 * vp.cx, 10 * vp.cy); - test_SetWindowExt(hdc, win.cx, win.cy, 10 * vp.cx, 10 * vp.cy); - test_SetWindowExt(hdc, 2 * win.cx, win.cy, 10 * vp.cx, 5 * vp.cy); - test_SetWindowExt(hdc, win.cx, win.cy, 5 * vp.cx, 5 * vp.cy); - test_SetViewportExt(hdc, 4 * vp.cx, 2 * vp.cy, 2 * vp.cx, 2 * vp.cy); - test_SetViewportExt(hdc, vp.cx, 2 * vp.cy, vp.cx, vp.cy); - test_SetViewportExt(hdc, 2 * vp.cx, 2 * vp.cy, 2 * vp.cx, 2 * vp.cy); - test_SetViewportExt(hdc, 4 * vp.cx, 2 * vp.cy, 2 * vp.cx, 2 * vp.cy); - test_SetWindowExt(hdc, 4 * win.cx, 2 * win.cy, 2 * vp.cx, vp.cy); - test_SetViewportExt(hdc, -2 * vp.cx, -4 * vp.cy, -2 * vp.cx, -vp.cy); - test_SetViewportExt(hdc, -2 * vp.cx, -1 * vp.cy, -2 * vp.cx, -vp.cy); - test_SetWindowExt(hdc, -4 * win.cx, -2 * win.cy, -2 * vp.cx, -vp.cy); - test_SetWindowExt(hdc, 4 * win.cx, -4 * win.cy, -vp.cx, -vp.cy); - - ReleaseDC(0, hdc); -} - -static void test_setvirtualresolution(void) -{ - HDC hdc = CreateICA("DISPLAY", NULL, NULL, NULL); - DWORD r; - INT horz_res = GetDeviceCaps(hdc, HORZRES); - INT horz_size = GetDeviceCaps(hdc, HORZSIZE); - INT log_pixels_x = GetDeviceCaps(hdc, LOGPIXELSX); - SIZE orig_lometric_vp, orig_lometric_wnd; - - if(!pSetVirtualResolution) - { - win_skip("Don't have SetVirtualResolution\n"); - return; - } - - /* Get the true resolution limits */ - SetMapMode(hdc, MM_LOMETRIC); - GetViewportExtEx(hdc, &orig_lometric_vp); - GetWindowExtEx(hdc, &orig_lometric_wnd); - SetMapMode(hdc, MM_TEXT); - - r = pSetVirtualResolution(hdc, 4000, 1000, 400, 200); /* 10 pix/mm x 5 pix/mm */ - ok(r == TRUE, "got %d\n", r); - expect_LPtoDP(hdc, 1000, 1000); - expect_viewport_ext(hdc, 1, 1); - expect_window_ext(hdc, 1, 1); - - SetMapMode(hdc, MM_LOMETRIC); - expect_LPtoDP(hdc, 1000, -500); - expect_viewport_ext(hdc, 4000, -1000); - expect_window_ext(hdc, 4000, 2000); - - /* Doesn't change the device caps */ - ok(horz_res == GetDeviceCaps(hdc, HORZRES), "horz_res changed\n"); - ok(horz_size == GetDeviceCaps(hdc, HORZSIZE), "horz_size changed\n"); - ok(log_pixels_x == GetDeviceCaps(hdc, LOGPIXELSX), "log_pixels_x changed\n"); - - r = pSetVirtualResolution(hdc, 8000, 1000, 400, 200); /* 20 pix/mm x 5 pix/mm */ - ok(r == TRUE, "got %d\n", r); - expect_LPtoDP(hdc, 1000, -500); /* No change, need to re-set the mapping mode */ - SetMapMode(hdc, MM_TEXT); - SetMapMode(hdc, MM_LOMETRIC); - expect_LPtoDP(hdc, 2000, -500); - expect_viewport_ext(hdc, 8000, -1000); - expect_window_ext(hdc, 4000, 2000); - - r = pSetVirtualResolution(hdc, 8000, 1000, 200, 200); /* 40 pix/mm x 5 pix/mm */ - ok(r == TRUE, "got %d\n", r); - SetMapMode(hdc, MM_TEXT); - SetMapMode(hdc, MM_LOMETRIC); - expect_LPtoDP(hdc, 4000, -500); - expect_viewport_ext(hdc, 8000, -1000); - expect_window_ext(hdc, 2000, 2000); - - r = pSetVirtualResolution(hdc, 8000, 1000, 200, 200); /* 40 pix/mm x 5 pix/mm */ - ok(r == TRUE, "got %d\n", r); - SetMapMode(hdc, MM_TEXT); - SetMapMode(hdc, MM_LOMETRIC); - expect_LPtoDP(hdc, 4000, -500); - expect_viewport_ext(hdc, 8000, -1000); - expect_window_ext(hdc, 2000, 2000); - - r = pSetVirtualResolution(hdc, 8000, 2000, 200, 200); /* 40 pix/mm x 10 pix/mm */ - ok(r == TRUE, "got %d\n", r); - SetMapMode(hdc, MM_TEXT); - SetMapMode(hdc, MM_LOMETRIC); - expect_LPtoDP(hdc, 4000, -1000); - expect_viewport_ext(hdc, 8000, -2000); - expect_window_ext(hdc, 2000, 2000); - - r = pSetVirtualResolution(hdc, 0, 0, 10, 0); /* Error */ - ok(r == FALSE, "got %d\n", r); - SetMapMode(hdc, MM_TEXT); - SetMapMode(hdc, MM_LOMETRIC); - expect_LPtoDP(hdc, 4000, -1000); - expect_viewport_ext(hdc, 8000, -2000); - expect_window_ext(hdc, 2000, 2000); - - r = pSetVirtualResolution(hdc, 0, 0, 0, 0); /* Reset to true resolution */ - ok(r == TRUE, "got %d\n", r); - SetMapMode(hdc, MM_TEXT); - SetMapMode(hdc, MM_LOMETRIC); - expect_viewport_ext(hdc, orig_lometric_vp.cx, orig_lometric_vp.cy); - expect_window_ext(hdc, orig_lometric_wnd.cx, orig_lometric_wnd.cy); - - DeleteDC(hdc); -} - - -static inline void expect_identity(int line, XFORM *xf) -{ - ok(xf->eM11 == 1.0, "%d: got %f\n", line, xf->eM11); - ok(xf->eM12 == 0.0, "%d: got %f\n", line, xf->eM12); - ok(xf->eM21 == 0.0, "%d: got %f\n", line, xf->eM21); - ok(xf->eM22 == 1.0, "%d: got %f\n", line, xf->eM22); - ok(xf->eDx == 0.0, "%d: got %f\n", line, xf->eDx); - ok(xf->eDy == 0.0, "%d: got %f\n", line, xf->eDy); -} - -static inline void xform_near_match(int line, XFORM *got, XFORM *expect) -{ - ok(fabs(got->eM11 - expect->eM11) < 0.001, "%d: got %f expect %f\n", line, got->eM11, expect->eM11); - ok(fabs(got->eM12 - expect->eM12) < 0.001, "%d: got %f expect %f\n", line, got->eM12, expect->eM12); - ok(fabs(got->eM21 - expect->eM21) < 0.001, "%d: got %f expect %f\n", line, got->eM21, expect->eM21); - ok(fabs(got->eM22 - expect->eM22) < 0.001, "%d: got %f expect %f\n", line, got->eM22, expect->eM22); - ok(fabs(got->eDx - expect->eDx) < 0.001, "%d: got %f expect %f\n", line, got->eDx, expect->eDx); - ok(fabs(got->eDy - expect->eDy) < 0.001, "%d: got %f expect %f\n", line, got->eDy, expect->eDy); -} - - -static void test_gettransform(void) -{ - HDC hdc = CreateICA("DISPLAY", NULL, NULL, NULL); - XFORM xform, expect; - BOOL r; - SIZE lometric_vp, lometric_wnd; - - if(!pGetTransform) - { - win_skip("Don't have GetTransform\n"); - return; - } - - r = pGetTransform(hdc, 0x203, &xform); /* World -> Page */ - ok(r == TRUE, "got %d\n", r); - expect_identity(__LINE__, &xform); - r = pGetTransform(hdc, 0x304, &xform); /* Page -> Device */ - ok(r == TRUE, "got %d\n", r); - expect_identity(__LINE__, &xform); - r = pGetTransform(hdc, 0x204, &xform); /* World -> Device */ - ok(r == TRUE, "got %d\n", r); - expect_identity(__LINE__, &xform); - r = pGetTransform(hdc, 0x402, &xform); /* Device -> World */ - ok(r == TRUE, "got %d\n", r); - expect_identity(__LINE__, &xform); - - SetMapMode(hdc, MM_LOMETRIC); - GetViewportExtEx(hdc, &lometric_vp); - GetWindowExtEx(hdc, &lometric_wnd); - - r = pGetTransform(hdc, 0x203, &xform); /* World -> Page */ - ok(r == TRUE, "got %d\n", r); - expect_identity(__LINE__, &xform); - - r = pGetTransform(hdc, 0x304, &xform); /* Page -> Device */ - ok(r == TRUE, "got %d\n", r); - expect.eM11 = (FLOAT) lometric_vp.cx / lometric_wnd.cx; - expect.eM12 = expect.eM21 = 0.0; - expect.eM22 = (FLOAT) lometric_vp.cy / lometric_wnd.cy; - expect.eDx = expect.eDy = 0.0; - xform_near_match(__LINE__, &xform, &expect); - - r = pGetTransform(hdc, 0x204, &xform); /* World -> Device */ - ok(r == TRUE, "got %d\n", r); - xform_near_match(__LINE__, &xform, &expect); - - r = pGetTransform(hdc, 0x402, &xform); /* Device -> World */ - ok(r == TRUE, "got %d\n", r); - expect.eM11 = (FLOAT) lometric_wnd.cx / lometric_vp.cx; - expect.eM22 = (FLOAT) lometric_wnd.cy / lometric_vp.cy; - xform_near_match(__LINE__, &xform, &expect); - - - SetGraphicsMode(hdc, GM_ADVANCED); - - expect.eM11 = 10.0; - expect.eM22 = 20.0; - SetWorldTransform(hdc, &expect); - r = pGetTransform(hdc, 0x203, &xform); /* World -> Page */ - ok(r == TRUE, "got %d\n", r); - xform_near_match(__LINE__, &xform, &expect); - - r = pGetTransform(hdc, 0x304, &xform); /* Page -> Device */ - ok(r == TRUE, "got %d\n", r); - expect.eM11 = (FLOAT) lometric_vp.cx / lometric_wnd.cx; - expect.eM22 = (FLOAT) lometric_vp.cy / lometric_wnd.cy; - xform_near_match(__LINE__, &xform, &expect); - - r = pGetTransform(hdc, 0x204, &xform); /* World -> Device */ - ok(r == TRUE, "got %d\n", r); - expect.eM11 *= 10.0; - expect.eM22 *= 20.0; - xform_near_match(__LINE__, &xform, &expect); - - r = pGetTransform(hdc, 0x402, &xform); /* Device -> World */ - ok(r == TRUE, "got %d\n", r); - expect.eM11 = 1 / expect.eM11; - expect.eM22 = 1 / expect.eM22; - xform_near_match(__LINE__, &xform, &expect); - - r = pGetTransform(hdc, 0x102, &xform); - ok(r == FALSE, "got %d\n", r); - r = pGetTransform(hdc, 0x103, &xform); - ok(r == FALSE, "got %d\n", r); - r = pGetTransform(hdc, 0x104, &xform); - ok(r == FALSE, "got %d\n", r); - r = pGetTransform(hdc, 0x202, &xform); - ok(r == FALSE, "got %d\n", r); - r = pGetTransform(hdc, 0x302, &xform); - ok(r == FALSE, "got %d\n", r); - r = pGetTransform(hdc, 0x303, &xform); - ok(r == FALSE, "got %d\n", r); - r = pGetTransform(hdc, 0x403, &xform); - ok(r == FALSE, "got %d\n", r); - r = pGetTransform(hdc, 0x404, &xform); - ok(r == FALSE, "got %d\n", r); - r = pGetTransform(hdc, 0xffff, &xform); - ok(r == FALSE, "got %d\n", r); -} - -START_TEST(mapping) -{ - HMODULE mod = GetModuleHandleA("gdi32.dll"); - pGetLayout = (void *)GetProcAddress( mod, "GetLayout" ); - pSetLayout = (void *)GetProcAddress( mod, "SetLayout" ); - pGetRandomRgn = (void *)GetProcAddress( mod, "GetRandomRgn" ); - pGetTransform = (void *)GetProcAddress( mod, "GetTransform" ); - pSetVirtualResolution = (void *)GetProcAddress( mod, "SetVirtualResolution" ); - - test_modify_world_transform(); - test_world_transform(); - test_dc_layout(); - test_isotropic_mapping(); - test_setvirtualresolution(); - test_gettransform(); -} diff --git a/rostests/winetests/gdi32/metafile.c b/rostests/winetests/gdi32/metafile.c deleted file mode 100755 index ddd667e6f4d..00000000000 --- a/rostests/winetests/gdi32/metafile.c +++ /dev/null @@ -1,3128 +0,0 @@ -/* - * Unit tests for metafile functions - * - * Copyright (c) 2002 Dmitry Timoshkov - * - * 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 "wine/test.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winerror.h" - -static LOGFONTA orig_lf; -static BOOL emr_processed = FALSE; - -/* Arbitrarily chosen values for the second co-ordinate of a metafile line */ -#define LINE_X 55.0f -#define LINE_Y 15.0f - -static INT (WINAPI * pGetRelAbs)(HDC, DWORD); -static INT (WINAPI * pSetRelAbs)(HDC, INT); -static COLORREF (WINAPI *pSetDCBrushColor)(HDC,COLORREF); -static COLORREF (WINAPI *pSetDCPenColor)(HDC,COLORREF); - -#define GDI_GET_PROC(func) \ - p ## func = (void *)GetProcAddress(hGDI, #func); \ - if(!p ## func) \ - trace("GetProcAddress(hGDI, \"%s\") failed\n", #func); \ - -static void init_function_pointers(void) -{ - HMODULE hGDI; - - pGetRelAbs = NULL; - pSetRelAbs = NULL; - - hGDI = GetModuleHandleA("gdi32.dll"); - assert(hGDI); - GDI_GET_PROC(GetRelAbs); - GDI_GET_PROC(SetRelAbs); - GDI_GET_PROC(SetDCBrushColor); - GDI_GET_PROC(SetDCPenColor); -} - -static int CALLBACK eto_emf_enum_proc(HDC hdc, HANDLETABLE *handle_table, - const ENHMETARECORD *emr, int n_objs, LPARAM param) -{ - static int n_record; - DWORD i; - const INT *dx; - INT *orig_dx = (INT *)param; - LOGFONTA device_lf; - INT ret; - - trace("hdc %p, emr->iType %d, emr->nSize %d, param %p\n", - hdc, emr->iType, emr->nSize, (void *)param); - - if(!hdc) return 1; - - PlayEnhMetaFileRecord(hdc, handle_table, emr, n_objs); - - switch (emr->iType) - { - case EMR_HEADER: - ok(GetTextAlign(hdc) == 0, "text align %08x\n", GetTextAlign(hdc)); - ok(GetBkColor(hdc) == RGB(0xff, 0xff, 0xff), "bk color %08x\n", GetBkColor(hdc)); - ok(GetTextColor(hdc) == RGB(0x0, 0x0, 0x0), "text color %08x\n", GetTextColor(hdc)); - ok(GetROP2(hdc) == R2_COPYPEN, "rop %d\n", GetROP2(hdc)); - ok(GetArcDirection(hdc) == AD_COUNTERCLOCKWISE, "arc dir %d\n", GetArcDirection(hdc)); - ok(GetPolyFillMode(hdc) == ALTERNATE, "poly fill %d\n", GetPolyFillMode(hdc)); - ok(GetStretchBltMode(hdc) == BLACKONWHITE, "stretchblt mode %d\n", GetStretchBltMode(hdc)); - - /* GetBkMode, GetRelAbs do not get reset to the default value */ - ok(GetBkMode(hdc) == OPAQUE, "bk mode %d\n", GetBkMode(hdc)); - if(pSetRelAbs && pGetRelAbs) - ok(pGetRelAbs(hdc, 0) == RELATIVE, "relabs %d\n", pGetRelAbs(hdc, 0)); - - n_record = 0; - break; - - case EMR_EXTTEXTOUTA: - { - const EMREXTTEXTOUTA *emr_ExtTextOutA = (const EMREXTTEXTOUTA *)emr; - dx = (const INT *)((const char *)emr + emr_ExtTextOutA->emrtext.offDx); - - ret = GetObjectA(GetCurrentObject(hdc, OBJ_FONT), sizeof(device_lf), &device_lf); - ok( ret == sizeof(device_lf), "GetObjectA error %d\n", GetLastError()); - - /* compare up to lfOutPrecision, other values are not interesting, - * and in fact sometimes arbitrary adapted by Win9x. - */ - ok(!memcmp(&orig_lf, &device_lf, FIELD_OFFSET(LOGFONTA, lfOutPrecision)), "fonts don't match\n"); - ok(!lstrcmpA(orig_lf.lfFaceName, device_lf.lfFaceName), "font names don't match\n"); - - for(i = 0; i < emr_ExtTextOutA->emrtext.nChars; i++) - { - ok(orig_dx[i] == dx[i], "pass %d: dx[%d] (%d) didn't match %d\n", - n_record, i, dx[i], orig_dx[i]); - } - n_record++; - emr_processed = TRUE; - break; - } - - case EMR_EXTTEXTOUTW: - { - const EMREXTTEXTOUTW *emr_ExtTextOutW = (const EMREXTTEXTOUTW *)emr; - dx = (const INT *)((const char *)emr + emr_ExtTextOutW->emrtext.offDx); - - SetLastError(0xdeadbeef); - ret = GetObjectA(GetCurrentObject(hdc, OBJ_FONT), sizeof(device_lf), &device_lf); - ok( ret == sizeof(device_lf) || - broken(ret == (sizeof(device_lf) - LF_FACESIZE + strlen(device_lf.lfFaceName) + 1)), /* NT4 */ - "GetObjectA error %d\n", GetLastError()); - - /* compare up to lfOutPrecision, other values are not interesting, - * and in fact sometimes arbitrary adapted by Win9x. - */ - ok(!memcmp(&orig_lf, &device_lf, FIELD_OFFSET(LOGFONTA, lfOutPrecision)), "fonts don't match\n"); - ok(!lstrcmpA(orig_lf.lfFaceName, device_lf.lfFaceName), "font names don't match\n"); - - for(i = 0; i < emr_ExtTextOutW->emrtext.nChars; i++) - { - ok(orig_dx[i] == dx[i], "pass %d: dx[%d] (%d) didn't match %d\n", - n_record, i, dx[i], orig_dx[i]); - } - n_record++; - emr_processed = TRUE; - break; - } - - default: - break; - } - - return 1; -} - -static void test_ExtTextOut(void) -{ - HWND hwnd; - HDC hdcDisplay, hdcMetafile; - HENHMETAFILE hMetafile; - HFONT hFont; - static const char text[] = "Simple text to test ExtTextOut on metafiles"; - INT i, len, dx[256]; - static const RECT rc = { 0, 0, 100, 100 }; - BOOL ret; - - assert(sizeof(dx)/sizeof(dx[0]) >= lstrlenA(text)); - - /* Win9x doesn't play EMFs on invisible windows */ - hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP | WS_VISIBLE, - 0, 0, 200, 200, 0, 0, 0, NULL); - ok(hwnd != 0, "CreateWindowExA error %d\n", GetLastError()); - - hdcDisplay = GetDC(hwnd); - ok(hdcDisplay != 0, "GetDC error %d\n", GetLastError()); - - trace("hdcDisplay %p\n", hdcDisplay); - - SetMapMode(hdcDisplay, MM_TEXT); - - memset(&orig_lf, 0, sizeof(orig_lf)); - - orig_lf.lfCharSet = ANSI_CHARSET; - orig_lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; - orig_lf.lfWeight = FW_DONTCARE; - orig_lf.lfHeight = 7; - orig_lf.lfQuality = DEFAULT_QUALITY; - lstrcpyA(orig_lf.lfFaceName, "Arial"); - hFont = CreateFontIndirectA(&orig_lf); - ok(hFont != 0, "CreateFontIndirectA error %d\n", GetLastError()); - - hFont = SelectObject(hdcDisplay, hFont); - - len = lstrlenA(text); - for (i = 0; i < len; i++) - { - ret = GetCharWidthA(hdcDisplay, text[i], text[i], &dx[i]); - ok( ret, "GetCharWidthA error %d\n", GetLastError()); - } - hFont = SelectObject(hdcDisplay, hFont); - - hdcMetafile = CreateEnhMetaFileA(hdcDisplay, NULL, NULL, NULL); - ok(hdcMetafile != 0, "CreateEnhMetaFileA error %d\n", GetLastError()); - - trace("hdcMetafile %p\n", hdcMetafile); - - ok(GetDeviceCaps(hdcMetafile, TECHNOLOGY) == DT_RASDISPLAY, - "GetDeviceCaps(TECHNOLOGY) has to return DT_RASDISPLAY for a display based EMF\n"); - - hFont = SelectObject(hdcMetafile, hFont); - - /* 1. pass NULL lpDx */ - ret = ExtTextOutA(hdcMetafile, 0, 0, 0, &rc, text, lstrlenA(text), NULL); - ok( ret, "ExtTextOutA error %d\n", GetLastError()); - - /* 2. pass custom lpDx */ - ret = ExtTextOutA(hdcMetafile, 0, 20, 0, &rc, text, lstrlenA(text), dx); - ok( ret, "ExtTextOutA error %d\n", GetLastError()); - - hFont = SelectObject(hdcMetafile, hFont); - ret = DeleteObject(hFont); - ok( ret, "DeleteObject error %d\n", GetLastError()); - - hMetafile = CloseEnhMetaFile(hdcMetafile); - ok(hMetafile != 0, "CloseEnhMetaFile error %d\n", GetLastError()); - - ok(!GetObjectType(hdcMetafile), "CloseEnhMetaFile has to destroy metafile hdc\n"); - - ret = PlayEnhMetaFile(hdcDisplay, hMetafile, &rc); - ok( ret, "PlayEnhMetaFile error %d\n", GetLastError()); - - SetTextAlign(hdcDisplay, TA_UPDATECP | TA_CENTER | TA_BASELINE | TA_RTLREADING ); - SetBkColor(hdcDisplay, RGB(0xff, 0, 0)); - SetTextColor(hdcDisplay, RGB(0, 0xff, 0)); - SetROP2(hdcDisplay, R2_NOT); - SetArcDirection(hdcDisplay, AD_CLOCKWISE); - SetPolyFillMode(hdcDisplay, WINDING); - SetStretchBltMode(hdcDisplay, HALFTONE); - - if(pSetRelAbs) pSetRelAbs(hdcDisplay, RELATIVE); - SetBkMode(hdcDisplay, OPAQUE); - - ret = EnumEnhMetaFile(hdcDisplay, hMetafile, eto_emf_enum_proc, dx, &rc); - ok( ret, "EnumEnhMetaFile error %d\n", GetLastError()); - - ok( GetTextAlign(hdcDisplay) == (TA_UPDATECP | TA_CENTER | TA_BASELINE | TA_RTLREADING), - "text align %08x\n", GetTextAlign(hdcDisplay)); - ok( GetBkColor(hdcDisplay) == RGB(0xff, 0, 0), "bk color %08x\n", GetBkColor(hdcDisplay)); - ok( GetTextColor(hdcDisplay) == RGB(0, 0xff, 0), "text color %08x\n", GetTextColor(hdcDisplay)); - ok( GetROP2(hdcDisplay) == R2_NOT, "rop2 %d\n", GetROP2(hdcDisplay)); - ok( GetArcDirection(hdcDisplay) == AD_CLOCKWISE, "arc dir %d\n", GetArcDirection(hdcDisplay)); - ok( GetPolyFillMode(hdcDisplay) == WINDING, "poly fill %d\n", GetPolyFillMode(hdcDisplay)); - ok( GetStretchBltMode(hdcDisplay) == HALFTONE, "stretchblt mode %d\n", GetStretchBltMode(hdcDisplay)); - - ok(emr_processed, "EnumEnhMetaFile couldn't find EMR_EXTTEXTOUTA or EMR_EXTTEXTOUTW record\n"); - - ok(!EnumEnhMetaFile(hdcDisplay, hMetafile, eto_emf_enum_proc, dx, NULL), - "A valid hdc has to require a valid rc\n"); - - ok(EnumEnhMetaFile(NULL, hMetafile, eto_emf_enum_proc, dx, NULL), - "A null hdc does not require a valid rc\n"); - - ret = DeleteEnhMetaFile(hMetafile); - ok( ret, "DeleteEnhMetaFile error %d\n", GetLastError()); - ret = ReleaseDC(hwnd, hdcDisplay); - ok( ret, "ReleaseDC error %d\n", GetLastError()); - DestroyWindow(hwnd); -} - -struct eto_scale_test_record -{ - INT graphics_mode; - INT map_mode; - double ex_scale; - double ey_scale; - BOOL processed; -}; - -static int CALLBACK eto_scale_enum_proc(HDC hdc, HANDLETABLE *handle_table, - const ENHMETARECORD *emr, int n_objs, LPARAM param) -{ - struct eto_scale_test_record *test = (struct eto_scale_test_record*)param; - - if (emr->iType == EMR_EXTTEXTOUTW) - { - const EMREXTTEXTOUTW *pExtTextOutW = (const EMREXTTEXTOUTW *)emr; - trace("gm %d, mm %d, scale %f, %f, expected %f, %f\n", - test->graphics_mode, test->map_mode, - pExtTextOutW->exScale, pExtTextOutW->eyScale, - test->ex_scale, test->ey_scale); - ok(fabs(test->ex_scale - pExtTextOutW->exScale) < 0.001, - "Got exScale %f, expected %f\n", pExtTextOutW->exScale, test->ex_scale); - ok(fabs(test->ey_scale - pExtTextOutW->eyScale) < 0.001, - "Got eyScale %f, expected %f\n", pExtTextOutW->eyScale, test->ey_scale); - test->processed = TRUE; - } - - return 1; -} - -static void test_ExtTextOutScale(void) -{ - const RECT rc = { 0, 0, 100, 100 }; - const WCHAR str[] = {'a',0 }; - struct eto_scale_test_record test; - HDC hdcDisplay, hdcMetafile; - HENHMETAFILE hMetafile; - HWND hwnd; - SIZE wndext, vportext; - int horzSize, vertSize, horzRes, vertRes; - int ret; - int i; - - hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP | WS_VISIBLE, - 0, 0, 200, 200, 0, 0, 0, NULL); - ok(hwnd != 0, "CreateWindowExA failed\n"); - - hdcDisplay = GetDC(hwnd); - ok(hdcDisplay != 0, "GetDC failed\n"); - - horzSize = GetDeviceCaps(hdcDisplay, HORZSIZE); - horzRes = GetDeviceCaps(hdcDisplay, HORZRES); - vertSize = GetDeviceCaps(hdcDisplay, VERTSIZE); - vertRes = GetDeviceCaps(hdcDisplay, VERTRES); - ok(horzSize && horzRes && vertSize && vertRes, "GetDeviceCaps failed\n"); - - for (i = 0; i < 16; i++) - { - test.graphics_mode = i / 8 + 1; - test.map_mode = i % 8 + 1; - - ret = SetGraphicsMode(hdcDisplay, test.graphics_mode); - ok(ret, "SetGraphicsMode failed\n"); - ret = SetMapMode(hdcDisplay, test.map_mode); - ok(ret, "SetMapMode failed\n"); - - if ((test.map_mode == MM_ISOTROPIC) || (test.map_mode == MM_ANISOTROPIC)) - { - ret = SetWindowExtEx(hdcDisplay, 1, 1, NULL); - ok(ret, "SetWindowExtEx failed\n"); - ret = SetViewportExtEx(hdcDisplay, -20, -10, NULL); - ok(ret, "SetViewportExtEx failed\n"); - } - - ret = GetViewportExtEx(hdcDisplay, &vportext); - ok(ret, "GetViewportExtEx failed\n"); - ret = GetWindowExtEx(hdcDisplay, &wndext); - ok(ret, "GetWindowExtEx failed\n"); - - trace("gm %d, mm %d, wnd %d,%d, vp %d,%d horz %d,%d vert %d,%d\n", - test.graphics_mode, test.map_mode, - wndext.cx, wndext.cy, vportext.cx, vportext.cy, - horzSize, horzRes, vertSize, vertRes); - - if (test.graphics_mode == GM_COMPATIBLE) - { - test.ex_scale = 100.0 * ((FLOAT)horzSize / (FLOAT)horzRes) / - ((FLOAT)wndext.cx / (FLOAT)vportext.cx); - test.ey_scale = 100.0 * ((FLOAT)vertSize / (FLOAT)vertRes) / - ((FLOAT)wndext.cy / (FLOAT)vportext.cy); - } - else - { - test.ex_scale = 0.0; - test.ey_scale = 0.0; - } - - hdcMetafile = CreateEnhMetaFileA(hdcDisplay, NULL, NULL, NULL); - ok(hdcMetafile != 0, "CreateEnhMetaFileA failed\n"); - - ret = SetGraphicsMode(hdcMetafile, test.graphics_mode); - ok(ret, "SetGraphicsMode failed\n"); - ret = SetMapMode(hdcMetafile, test.map_mode); - ok(ret, "SetMapMode failed\n"); - - if ((test.map_mode == MM_ISOTROPIC) || (test.map_mode == MM_ANISOTROPIC)) - { - ret = SetWindowExtEx(hdcMetafile, 1, 1, NULL); - ok(ret, "SetWindowExtEx failed\n"); - ret = SetViewportExtEx(hdcMetafile, -20, -10, NULL); - ok(ret, "SetViewportExtEx failed\n"); - } - - ret = ExtTextOutW(hdcMetafile, 0, 0, 0, 0, str, 1, NULL); - ok(ret, "ExtTextOutW failed\n"); - - hMetafile = CloseEnhMetaFile(hdcMetafile); - ok(hMetafile != 0, "CloseEnhMetaFile failed\n"); - - test.processed = 0; - ret = EnumEnhMetaFile(hdcDisplay, hMetafile, eto_scale_enum_proc, &test, &rc); - ok(ret, "EnumEnhMetaFile failed\n"); - ok(test.processed, "EnumEnhMetaFile couldn't find EMR_EXTTEXTOUTW record\n"); - - ret = DeleteEnhMetaFile(hMetafile); - ok(ret, "DeleteEnhMetaFile failed\n"); - } - - ret = ReleaseDC(hwnd, hdcDisplay); - ok(ret, "ReleaseDC failed\n"); - DestroyWindow(hwnd); -} - - -static void check_dc_state(HDC hdc, int restore_no, - int wnd_org_x, int wnd_org_y, int wnd_ext_x, int wnd_ext_y, - int vp_org_x, int vp_org_y, int vp_ext_x, int vp_ext_y) -{ - BOOL ret; - XFORM xform; - POINT vp_org, win_org; - SIZE vp_size, win_size; - FLOAT xscale, yscale, edx, edy; - - SetLastError(0xdeadbeef); - ret = GetWorldTransform(hdc, &xform); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) goto win9x_here; - ok(ret, "GetWorldTransform error %u\n", GetLastError()); - - trace("%d: eM11 %f, eM22 %f, eDx %f, eDy %f\n", restore_no, xform.eM11, xform.eM22, xform.eDx, xform.eDy); - - ok(xform.eM12 == 0.0, "%d: expected eM12 0.0, got %f\n", restore_no, xform.eM12); - ok(xform.eM21 == 0.0, "%d: expected eM21 0.0, got %f\n", restore_no, xform.eM21); - - xscale = (FLOAT)vp_ext_x / (FLOAT)wnd_ext_x; - trace("x scale %f\n", xscale); - ok(fabs(xscale - xform.eM11) < 0.01, "%d: vp_ext_x %d, wnd_ext_cx %d, eM11 %f\n", - restore_no, vp_ext_x, wnd_ext_x, xform.eM11); - - yscale = (FLOAT)vp_ext_y / (FLOAT)wnd_ext_y; - trace("y scale %f\n", yscale); - ok(fabs(yscale - xform.eM22) < 0.01, "%d: vp_ext_y %d, wnd_ext_y %d, eM22 %f\n", - restore_no, vp_ext_y, wnd_ext_y, xform.eM22); - - edx = (FLOAT)vp_org_x - xform.eM11 * (FLOAT)wnd_org_x; - ok(fabs(edx - xform.eDx) < 0.01, "%d: edx %f != eDx %f\n", restore_no, edx, xform.eDx); - edy = (FLOAT)vp_org_y - xform.eM22 * (FLOAT)wnd_org_y; - ok(fabs(edy - xform.eDy) < 0.01, "%d: edy %f != eDy %f\n", restore_no, edy, xform.eDy); - - return; - -win9x_here: - - GetWindowOrgEx(hdc, &win_org); - GetViewportOrgEx(hdc, &vp_org); - GetWindowExtEx(hdc, &win_size); - GetViewportExtEx(hdc, &vp_size); - - ok(wnd_org_x == win_org.x, "%d: wnd_org_x: %d != %d\n", restore_no, wnd_org_x, win_org.x); - ok(wnd_org_y == win_org.y, "%d: wnd_org_y: %d != %d\n", restore_no, wnd_org_y, win_org.y); - - ok(vp_org_x == vp_org.x, "%d: vport_org_x: %d != %d\n", restore_no, vp_org_x, vp_org.x); - ok(vp_org_y == vp_org.y, "%d: vport_org_y: %d != %d\n", restore_no, vp_org_y, vp_org.y); - - ok(wnd_ext_x == win_size.cx, "%d: wnd_ext_x: %d != %d\n", restore_no, wnd_ext_x, win_size.cx); - ok(wnd_ext_y == win_size.cy, "%d: wnd_ext_y: %d != %d\n", restore_no, wnd_ext_y, win_size.cy); - - ok(vp_ext_x == vp_size.cx, "%d: vport_ext_x: %d != %d\n", restore_no, vp_ext_x, vp_size.cx); - ok(vp_ext_y == vp_size.cy, "%d: vport_ext_y: %d != %d\n", restore_no, vp_ext_y, vp_size.cy); -} - -static int CALLBACK savedc_emf_enum_proc(HDC hdc, HANDLETABLE *handle_table, - const ENHMETARECORD *emr, int n_objs, LPARAM param) -{ - BOOL ret; - XFORM xform; - POINT pt; - SIZE size; - static int save_state; - static int restore_no; - static int select_no; - - trace("hdc %p, emr->iType %d, emr->nSize %d, param %p\n", - hdc, emr->iType, emr->nSize, (void *)param); - - trace("BEFORE:\n"); - SetLastError(0xdeadbeef); - ret = GetWorldTransform(hdc, &xform); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - ret = GetWindowOrgEx(hdc, &pt); - ok(ret, "GetWindowOrgEx error %u\n", GetLastError()); - trace("window org (%d,%d)\n", pt.x, pt.y); - ret = GetViewportOrgEx(hdc, &pt); - ok(ret, "GetViewportOrgEx error %u\n", GetLastError()); - trace("vport org (%d,%d)\n", pt.x, pt.y); - ret = GetWindowExtEx(hdc, &size); - ok(ret, "GetWindowExtEx error %u\n", GetLastError()); - trace("window ext (%d,%d)\n", size.cx, size.cy); - ret = GetViewportExtEx(hdc, &size); - ok(ret, "GetViewportExtEx error %u\n", GetLastError()); - trace("vport ext (%d,%d)\n", size.cx, size.cy); - } - else - { - ok(ret, "GetWorldTransform error %u\n", GetLastError()); - trace("eM11 %f, eM22 %f, eDx %f, eDy %f\n", xform.eM11, xform.eM22, xform.eDx, xform.eDy); - } - - PlayEnhMetaFileRecord(hdc, handle_table, emr, n_objs); - - switch (emr->iType) - { - case EMR_HEADER: - { - static RECT exp_bounds = { 0, 0, 150, 150 }; - RECT bounds; - const ENHMETAHEADER *emf = (const ENHMETAHEADER *)emr; - - trace("bounds %d,%d-%d,%d, frame %d,%d-%d,%d\n", - emf->rclBounds.left, emf->rclBounds.top, emf->rclBounds.right, emf->rclBounds.bottom, - emf->rclFrame.left, emf->rclFrame.top, emf->rclFrame.right, emf->rclFrame.bottom); - trace("mm %d x %d, device %d x %d\n", emf->szlMillimeters.cx, emf->szlMillimeters.cy, - emf->szlDevice.cx, emf->szlDevice.cy); - - SetRect(&bounds, emf->rclBounds.left, emf->rclBounds.top, emf->rclBounds.right, emf->rclBounds.bottom); - ok(EqualRect(&bounds, &exp_bounds), "wrong bounds\n"); - - save_state = 0; - restore_no = 0; - select_no = 0; - check_dc_state(hdc, restore_no, 0, 0, 1, 1, 0, 0, 1, 1); - break; - } - - case EMR_LINETO: - { - const EMRLINETO *line = (const EMRLINETO *)emr; - trace("EMR_LINETO %d,%d\n", line->ptl.x, line->ptl.x); - break; - } - case EMR_SETWINDOWORGEX: - { - const EMRSETWINDOWORGEX *org = (const EMRSETWINDOWORGEX *)emr; - trace("EMR_SETWINDOWORGEX: %d,%d\n", org->ptlOrigin.x, org->ptlOrigin.y); - break; - } - case EMR_SETWINDOWEXTEX: - { - const EMRSETWINDOWEXTEX *ext = (const EMRSETWINDOWEXTEX *)emr; - trace("EMR_SETWINDOWEXTEX: %d,%d\n", ext->szlExtent.cx, ext->szlExtent.cy); - break; - } - case EMR_SETVIEWPORTORGEX: - { - const EMRSETVIEWPORTORGEX *org = (const EMRSETVIEWPORTORGEX *)emr; - trace("EMR_SETVIEWPORTORGEX: %d,%d\n", org->ptlOrigin.x, org->ptlOrigin.y); - break; - } - case EMR_SETVIEWPORTEXTEX: - { - const EMRSETVIEWPORTEXTEX *ext = (const EMRSETVIEWPORTEXTEX *)emr; - trace("EMR_SETVIEWPORTEXTEX: %d,%d\n", ext->szlExtent.cx, ext->szlExtent.cy); - break; - } - case EMR_SAVEDC: - save_state++; - trace("EMR_SAVEDC\n"); - break; - - case EMR_RESTOREDC: - { - const EMRRESTOREDC *restoredc = (const EMRRESTOREDC *)emr; - trace("EMR_RESTOREDC: %d\n", restoredc->iRelative); - - switch(++restore_no) - { - case 1: - ok(restoredc->iRelative == -1, "first restore %d\n", restoredc->iRelative); - check_dc_state(hdc, restore_no, -2, -2, 8192, 8192, 20, 20, 20479, 20478); - break; - case 2: - ok(restoredc->iRelative == -3, "second restore %d\n", restoredc->iRelative); - check_dc_state(hdc, restore_no, 0, 0, 16384, 16384, 0, 0, 17873, 17872); - break; - case 3: - ok(restoredc->iRelative == -2, "third restore %d\n", restoredc->iRelative); - check_dc_state(hdc, restore_no, -4, -4, 32767, 32767, 40, 40, 3276, 3276); - break; - } - ok(restore_no <= 3, "restore_no %d\n", restore_no); - save_state += restoredc->iRelative; - break; - } - case EMR_SELECTOBJECT: - { - const EMRSELECTOBJECT *selectobj = (const EMRSELECTOBJECT*)emr; - trace("EMR_SELECTOBJECT: %x\n",selectobj->ihObject); - select_no ++; - break; - } - case EMR_EOF: - ok(save_state == 0, "EOF save_state %d\n", save_state); - ok(select_no == 3, "Too many/few selects %i\n",select_no); - break; - } - - trace("AFTER:\n"); - SetLastError(0xdeadbeef); - ret = GetWorldTransform(hdc, &xform); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - ret = GetWindowOrgEx(hdc, &pt); - ok(ret, "GetWindowOrgEx error %u\n", GetLastError()); - trace("window org (%d,%d)\n", pt.x, pt.y); - ret = GetViewportOrgEx(hdc, &pt); - ok(ret, "GetViewportOrgEx error %u\n", GetLastError()); - trace("vport org (%d,%d)\n", pt.x, pt.y); - ret = GetWindowExtEx(hdc, &size); - ok(ret, "GetWindowExtEx error %u\n", GetLastError()); - trace("window ext (%d,%d)\n", size.cx, size.cy); - ret = GetViewportExtEx(hdc, &size); - ok(ret, "GetViewportExtEx error %u\n", GetLastError()); - trace("vport ext (%d,%d)\n", size.cx, size.cy); - } - else - { - ok(ret, "GetWorldTransform error %u\n", GetLastError()); - trace("eM11 %f, eM22 %f, eDx %f, eDy %f\n", xform.eM11, xform.eM22, xform.eDx, xform.eDy); - } - - return 1; -} - -static void test_SaveDC(void) -{ - HDC hdcMetafile, hdcDisplay; - HENHMETAFILE hMetafile; - HWND hwnd; - int ret; - POINT pt; - SIZE size; - HFONT hFont,hFont2,hFontOld,hFontCheck; - static const RECT rc = { 0, 0, 150, 150 }; - - /* Win9x doesn't play EMFs on invisible windows */ - hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP | WS_VISIBLE, - 0, 0, 200, 200, 0, 0, 0, NULL); - ok(hwnd != 0, "CreateWindowExA error %d\n", GetLastError()); - - hdcDisplay = GetDC(hwnd); - ok(hdcDisplay != 0, "GetDC error %d\n", GetLastError()); - - hdcMetafile = CreateEnhMetaFileA(hdcDisplay, NULL, NULL, NULL); - ok(hdcMetafile != 0, "CreateEnhMetaFileA error %d\n", GetLastError()); - - SetMapMode(hdcMetafile, MM_ANISOTROPIC); - - /* Need to write something to the emf, otherwise Windows won't play it back */ - LineTo(hdcMetafile, 150, 150); - - SetWindowOrgEx(hdcMetafile, 0, 0, NULL); - SetViewportOrgEx(hdcMetafile, 0, 0, NULL); - SetWindowExtEx(hdcMetafile, 110, 110, NULL ); - SetViewportExtEx(hdcMetafile, 120, 120, NULL ); - - /* Force Win9x to update DC state */ - SetPixelV(hdcMetafile, 50, 50, 0); - - ret = GetViewportOrgEx(hdcMetafile, &pt); - ok(ret, "GetViewportOrgEx error %u\n", GetLastError()); - ok(pt.x == 0,"Expecting ViewportOrg x of 0, got %i\n",pt.x); - ret = GetViewportExtEx(hdcMetafile, &size); - ok(ret, "GetViewportExtEx error %u\n", GetLastError()); - ok(size.cx == 120,"Expecting ViewportExt cx of 120, got %i\n",size.cx); - ret = SaveDC(hdcMetafile); - ok(ret == 1, "ret = %d\n", ret); - - SetWindowOrgEx(hdcMetafile, -1, -1, NULL); - SetViewportOrgEx(hdcMetafile, 10, 10, NULL); - SetWindowExtEx(hdcMetafile, 150, 150, NULL ); - SetViewportExtEx(hdcMetafile, 200, 200, NULL ); - - /* Force Win9x to update DC state */ - SetPixelV(hdcMetafile, 50, 50, 0); - - ret = GetViewportOrgEx(hdcMetafile, &pt); - ok(ret, "GetViewportOrgEx error %u\n", GetLastError()); - ok(pt.x == 10,"Expecting ViewportOrg x of 10, got %i\n",pt.x); - ret = GetViewportExtEx(hdcMetafile, &size); - ok(ret, "GetViewportExtEx error %u\n", GetLastError()); - ok(size.cx == 200,"Expecting ViewportExt cx of 200, got %i\n",size.cx); - ret = SaveDC(hdcMetafile); - ok(ret == 2, "ret = %d\n", ret); - - SetWindowOrgEx(hdcMetafile, -2, -2, NULL); - SetViewportOrgEx(hdcMetafile, 20, 20, NULL); - SetWindowExtEx(hdcMetafile, 120, 120, NULL ); - SetViewportExtEx(hdcMetafile, 300, 300, NULL ); - SetPolyFillMode( hdcMetafile, ALTERNATE ); - SetBkColor( hdcMetafile, 0 ); - - /* Force Win9x to update DC state */ - SetPixelV(hdcMetafile, 50, 50, 0); - - ret = GetViewportOrgEx(hdcMetafile, &pt); - ok(ret, "GetViewportOrgEx error %u\n", GetLastError()); - ok(pt.x == 20,"Expecting ViewportOrg x of 20, got %i\n",pt.x); - ret = GetViewportExtEx(hdcMetafile, &size); - ok(ret, "GetViewportExtEx error %u\n", GetLastError()); - ok(size.cx == 300,"Expecting ViewportExt cx of 300, got %i\n",size.cx); - ret = SaveDC(hdcMetafile); - ok(ret == 3, "ret = %d\n", ret); - - SetWindowOrgEx(hdcMetafile, -3, -3, NULL); - SetViewportOrgEx(hdcMetafile, 30, 30, NULL); - SetWindowExtEx(hdcMetafile, 200, 200, NULL ); - SetViewportExtEx(hdcMetafile, 400, 400, NULL ); - - SetPolyFillMode( hdcMetafile, WINDING ); - SetBkColor( hdcMetafile, 0x123456 ); - ok( GetPolyFillMode( hdcMetafile ) == WINDING, "PolyFillMode not restored\n" ); - ok( GetBkColor( hdcMetafile ) == 0x123456, "Background color not restored\n" ); - - /* Force Win9x to update DC state */ - SetPixelV(hdcMetafile, 50, 50, 0); - - ret = GetViewportOrgEx(hdcMetafile, &pt); - ok(ret, "GetViewportOrgEx error %u\n", GetLastError()); - ok(pt.x == 30,"Expecting ViewportOrg x of 30, got %i\n",pt.x); - ret = GetViewportExtEx(hdcMetafile, &size); - ok(ret, "GetViewportExtEx error %u\n", GetLastError()); - ok(size.cx == 400,"Expecting ViewportExt cx of 400, got %i\n",size.cx); - ret = RestoreDC(hdcMetafile, -1); - ok(ret, "ret = %d\n", ret); - - ret = GetViewportOrgEx(hdcMetafile, &pt); - ok(ret, "GetViewportOrgEx error %u\n", GetLastError()); - ok(pt.x == 20,"Expecting ViewportOrg x of 20, got %i\n",pt.x); - ret = GetViewportExtEx(hdcMetafile, &size); - ok(ret, "GetViewportExtEx error %u\n", GetLastError()); - ok(size.cx == 300,"Expecting ViewportExt cx of 300, got %i\n",size.cx); - ok( GetPolyFillMode( hdcMetafile ) == ALTERNATE, "PolyFillMode not restored\n" ); - ok( GetBkColor( hdcMetafile ) == 0, "Background color not restored\n" ); - ret = SaveDC(hdcMetafile); - ok(ret == 3, "ret = %d\n", ret); - - ret = GetViewportOrgEx(hdcMetafile, &pt); - ok(ret, "GetViewportOrgEx error %u\n", GetLastError()); - ok(pt.x == 20,"Expecting ViewportOrg x of 20, got %i\n",pt.x); - ret = GetViewportExtEx(hdcMetafile, &size); - ok(ret, "GetViewportExtEx error %u\n", GetLastError()); - ok(size.cx == 300,"Expecting ViewportExt cx of 300, got %i\n",size.cx); - ret = RestoreDC(hdcMetafile, 1); - ok(ret, "ret = %d\n", ret); - ret = GetViewportOrgEx(hdcMetafile, &pt); - ok(ret, "GetViewportOrgEx error %u\n", GetLastError()); - ok(pt.x == 0,"Expecting ViewportOrg x of 0, got %i\n",pt.x); - ret = GetViewportExtEx(hdcMetafile, &size); - ok(ret, "GetViewportExtEx error %u\n", GetLastError()); - ok(size.cx == 120,"Expecting ViewportExt cx of 120, got %i\n",size.cx); - - SetWindowOrgEx(hdcMetafile, -4, -4, NULL); - SetViewportOrgEx(hdcMetafile, 40, 40, NULL); - SetWindowExtEx(hdcMetafile, 500, 500, NULL ); - SetViewportExtEx(hdcMetafile, 50, 50, NULL ); - - /* Force Win9x to update DC state */ - SetPixelV(hdcMetafile, 50, 50, 0); - - ret = GetViewportOrgEx(hdcMetafile, &pt); - ok(ret, "GetViewportOrgEx error %u\n", GetLastError()); - ok(pt.x == 40,"Expecting ViewportOrg x of 40, got %i\n",pt.x); - ret = GetViewportExtEx(hdcMetafile, &size); - ok(ret, "GetViewportExtEx error %u\n", GetLastError()); - ok(size.cx == 50,"Expecting ViewportExt cx of 50, got %i\n",size.cx); - ret = SaveDC(hdcMetafile); - ok(ret == 1, "ret = %d\n", ret); - - ret = GetViewportOrgEx(hdcMetafile, &pt); - ok(ret, "GetViewportOrgEx error %u\n", GetLastError()); - ok(pt.x == 40,"Expecting ViewportOrg x of 40, got %i\n",pt.x); - ret = GetViewportExtEx(hdcMetafile, &size); - ok(ret, "GetViewportExtEx error %u\n", GetLastError()); - ok(size.cx == 50,"Expecting ViewportExt cx of 50, got %i\n",size.cx); - ret = SaveDC(hdcMetafile); - ok(ret == 2, "ret = %d\n", ret); - - memset(&orig_lf, 0, sizeof(orig_lf)); - orig_lf.lfCharSet = ANSI_CHARSET; - orig_lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; - orig_lf.lfWeight = FW_DONTCARE; - orig_lf.lfHeight = 7; - orig_lf.lfQuality = DEFAULT_QUALITY; - lstrcpyA(orig_lf.lfFaceName, "Arial"); - hFont = CreateFontIndirectA(&orig_lf); - ok(hFont != 0, "CreateFontIndirectA error %d\n", GetLastError()); - - hFontOld = SelectObject(hdcMetafile, hFont); - - hFont2 = CreateFontIndirectA(&orig_lf); - ok(hFont2 != 0, "CreateFontIndirectA error %d\n", GetLastError()); - hFontCheck = SelectObject(hdcMetafile, hFont2); - ok(hFontCheck == hFont, "Font not selected\n"); - - /* Force Win9x to update DC state */ - SetPixelV(hdcMetafile, 50, 50, 0); - - ret = RestoreDC(hdcMetafile, 1); - ok(ret, "ret = %d\n", ret); - ret = GetViewportOrgEx(hdcMetafile, &pt); - ok(ret, "GetViewportOrgEx error %u\n", GetLastError()); - ok(pt.x == 40,"Expecting ViewportOrg x of 40, got %i\n",pt.x); - ret = GetViewportExtEx(hdcMetafile, &size); - ok(ret, "GetViewportExtEx error %u\n", GetLastError()); - ok(size.cx == 50,"Expecting ViewportExt cx of 50, got %i\n",size.cx); - - hFontCheck = SelectObject(hdcMetafile, hFontOld); - ok(hFontOld == hFontCheck && hFontCheck != hFont && hFontCheck != hFont2, - "Font not reverted with DC Restore\n"); - - ret = RestoreDC(hdcMetafile, -20); - ok(!ret, "ret = %d\n", ret); - ret = RestoreDC(hdcMetafile, 20); - ok(!ret, "ret = %d\n", ret); - - hMetafile = CloseEnhMetaFile(hdcMetafile); - ok(hMetafile != 0, "CloseEnhMetaFile error %d\n", GetLastError()); - - ret = EnumEnhMetaFile(hdcDisplay, hMetafile, savedc_emf_enum_proc, 0, &rc); - ok( ret == 1, "EnumEnhMetaFile rets %d\n", ret); - - ret = DeleteObject(hFont); - ok( ret, "DeleteObject error %d\n", GetLastError()); - ret = DeleteObject(hFont2); - ok( ret, "DeleteObject error %d\n", GetLastError()); - ret = DeleteEnhMetaFile(hMetafile); - ok( ret, "DeleteEnhMetaFile error %d\n", GetLastError()); - ret = ReleaseDC(hwnd, hdcDisplay); - ok( ret, "ReleaseDC error %d\n", GetLastError()); - DestroyWindow(hwnd); -} - -static void test_mf_SaveDC(void) -{ - HDC hdcMetafile; - HMETAFILE hMetafile; - int ret; - POINT pt; - SIZE size; - HFONT hFont,hFont2,hFontOld,hFontCheck; - - hdcMetafile = CreateMetaFileA(NULL); - ok(hdcMetafile != 0, "CreateMetaFileA error %d\n", GetLastError()); - - ret = SetMapMode(hdcMetafile, MM_ANISOTROPIC); - ok (ret, "SetMapMode should not fail\n"); - - /* Need to write something to the emf, otherwise Windows won't play it back */ - LineTo(hdcMetafile, 150, 150); - - pt.x = pt.y = 5555; - SetWindowOrgEx(hdcMetafile, 0, 0, &pt); - ok( pt.x == 5555 && pt.y == 5555, "wrong origin %d,%d\n", pt.x, pt.y); - pt.x = pt.y = 5555; - SetViewportOrgEx(hdcMetafile, 0, 0, &pt); - ok( pt.x == 5555 && pt.y == 5555, "wrong origin %d,%d\n", pt.x, pt.y); - size.cx = size.cy = 5555; - SetWindowExtEx(hdcMetafile, 110, 110, &size ); - ok( size.cx == 5555 && size.cy == 5555, "wrong size %d,%d\n", size.cx, size.cy ); - size.cx = size.cy = 5555; - SetViewportExtEx(hdcMetafile, 120, 120, &size ); - ok( size.cx == 5555 && size.cy == 5555, "wrong size %d,%d\n", size.cx, size.cy ); - - /* Force Win9x to update DC state */ - SetPixelV(hdcMetafile, 50, 50, 0); - - ret = GetViewportOrgEx(hdcMetafile, &pt); - todo_wine ok (!ret, "GetViewportOrgEx should fail\n"); - ret = GetViewportExtEx(hdcMetafile, &size); - todo_wine ok (!ret, "GetViewportExtEx should fail\n"); - ret = SaveDC(hdcMetafile); - ok(ret == 1, "ret = %d\n", ret); - - SetWindowOrgEx(hdcMetafile, -1, -1, NULL); - SetViewportOrgEx(hdcMetafile, 10, 10, NULL); - SetWindowExtEx(hdcMetafile, 150, 150, NULL ); - SetViewportExtEx(hdcMetafile, 200, 200, NULL ); - - /* Force Win9x to update DC state */ - SetPixelV(hdcMetafile, 50, 50, 0); - - ret = SaveDC(hdcMetafile); - ok(ret == 1, "ret = %d\n", ret); - - SetWindowOrgEx(hdcMetafile, -2, -2, NULL); - SetViewportOrgEx(hdcMetafile, 20, 20, NULL); - SetWindowExtEx(hdcMetafile, 120, 120, NULL ); - SetViewportExtEx(hdcMetafile, 300, 300, NULL ); - - /* Force Win9x to update DC state */ - SetPixelV(hdcMetafile, 50, 50, 0); - SetPolyFillMode( hdcMetafile, ALTERNATE ); - SetBkColor( hdcMetafile, 0 ); - - ret = SaveDC(hdcMetafile); - ok(ret == 1, "ret = %d\n", ret); - - SetWindowOrgEx(hdcMetafile, -3, -3, NULL); - SetViewportOrgEx(hdcMetafile, 30, 30, NULL); - SetWindowExtEx(hdcMetafile, 200, 200, NULL ); - SetViewportExtEx(hdcMetafile, 400, 400, NULL ); - - SetPolyFillMode( hdcMetafile, WINDING ); - SetBkColor( hdcMetafile, 0x123456 ); - todo_wine ok( !GetPolyFillMode( hdcMetafile ), "GetPolyFillMode succeeded\n" ); - todo_wine ok( GetBkColor( hdcMetafile ) == CLR_INVALID, "GetBkColor succeeded\n" ); - - /* Force Win9x to update DC state */ - SetPixelV(hdcMetafile, 50, 50, 0); - - ret = RestoreDC(hdcMetafile, -1); - ok(ret, "ret = %d\n", ret); - - ret = SaveDC(hdcMetafile); - ok(ret == 1, "ret = %d\n", ret); - - ret = RestoreDC(hdcMetafile, 1); - ok(ret, "ret = %d\n", ret); - - SetWindowOrgEx(hdcMetafile, -4, -4, NULL); - SetViewportOrgEx(hdcMetafile, 40, 40, NULL); - SetWindowExtEx(hdcMetafile, 500, 500, NULL ); - SetViewportExtEx(hdcMetafile, 50, 50, NULL ); - - /* Force Win9x to update DC state */ - SetPixelV(hdcMetafile, 50, 50, 0); - - ret = SaveDC(hdcMetafile); - ok(ret == 1, "ret = %d\n", ret); - - ret = SaveDC(hdcMetafile); - ok(ret == 1, "ret = %d\n", ret); - - memset(&orig_lf, 0, sizeof(orig_lf)); - orig_lf.lfCharSet = ANSI_CHARSET; - orig_lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; - orig_lf.lfWeight = FW_DONTCARE; - orig_lf.lfHeight = 7; - orig_lf.lfQuality = DEFAULT_QUALITY; - lstrcpyA(orig_lf.lfFaceName, "Arial"); - hFont = CreateFontIndirectA(&orig_lf); - ok(hFont != 0, "CreateFontIndirectA error %d\n", GetLastError()); - - hFontOld = SelectObject(hdcMetafile, hFont); - - hFont2 = CreateFontIndirectA(&orig_lf); - ok(hFont2 != 0, "CreateFontIndirectA error %d\n", GetLastError()); - hFontCheck = SelectObject(hdcMetafile, hFont2); - ok(hFontCheck == hFont, "Font not selected\n"); - - /* Force Win9x to update DC state */ - SetPixelV(hdcMetafile, 50, 50, 0); - - ret = RestoreDC(hdcMetafile, 1); - ok(ret, "ret = %d\n", ret); - - hFontCheck = SelectObject(hdcMetafile, hFontOld); - ok(hFontOld != hFontCheck && hFontCheck == hFont2, "Font incorrectly reverted with DC Restore\n"); - - /* restore level is ignored */ - ret = RestoreDC(hdcMetafile, -20); - ok(ret, "ret = %d\n", ret); - ret = RestoreDC(hdcMetafile, 20); - ok(ret, "ret = %d\n", ret); - ret = RestoreDC(hdcMetafile, 0); - ok(ret, "ret = %d\n", ret); - - hMetafile = CloseMetaFile(hdcMetafile); - ok(hMetafile != 0, "CloseEnhMetaFile error %d\n", GetLastError()); - - ret = DeleteMetaFile(hMetafile); - ok( ret, "DeleteMetaFile error %d\n", GetLastError()); - ret = DeleteObject(hFont); - ok( ret, "DeleteObject error %d\n", GetLastError()); - ret = DeleteObject(hFont2); - ok( ret, "DeleteObject error %d\n", GetLastError()); -} - - -/* Win-format metafile (mfdrv) tests */ -/* These tests compare the generated metafiles byte-by-byte */ -/* with the nominal results. */ - -/* Maximum size of sample metafiles in bytes. */ -#define MF_BUFSIZE 512 - -/* 8x8 bitmap data for a pattern brush */ -static const unsigned char SAMPLE_PATTERN_BRUSH[] = { - 0x01, 0x00, 0x02, 0x00, - 0x03, 0x00, 0x04, 0x00, - 0x05, 0x00, 0x06, 0x00, - 0x07, 0x00, 0x08, 0x00 -}; - -/* Sample metafiles to be compared to the outputs of the - * test functions. - */ - -static const unsigned char MF_BLANK_BITS[] = { - 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x0c, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -static const unsigned char MF_GRAPHICS_BITS[] = { - 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x22, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0x02, - 0x01, 0x00, 0x01, 0x00, 0x05, 0x00, 0x00, 0x00, - 0x13, 0x02, 0x02, 0x00, 0x02, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x14, 0x02, 0x01, 0x00, 0x01, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x18, 0x04, 0x02, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, - 0x00, 0x00, 0x00, 0x00 -}; - -static const unsigned char MF_PATTERN_BRUSH_BITS[] = { - 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x3d, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x2d, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x2d, 0x00, 0x00, 0x00, 0x42, 0x01, - 0x03, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, - 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, - 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x2d, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00 -}; - -static const unsigned char MF_DCBRUSH_BITS[] = -{ - 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x2a, 0x00, - 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xfc, 0x02, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x2d, 0x01, 0x00, 0x00, - 0x08, 0x00, 0x00, 0x00, 0xfa, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x2d, 0x01, 0x01, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x1b, 0x04, 0x14, 0x00, - 0x14, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x03, 0x00, - 0x00, 0x00, 0x00, 0x00 -}; - -static const unsigned char MF_TEXTOUT_ON_PATH_BITS[] = -{ - 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x19, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x32, 0x0a, - 0x16, 0x00, 0x0b, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x54, 0x65, 0x73, 0x74, 0x03, 0x00, 0x05, 0x00, - 0x08, 0x00, 0x0c, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00 -}; - -static const unsigned char EMF_TEXTOUT_ON_PATH_BITS[] = -{ - 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xe7, 0xff, 0xff, 0xff, 0xe9, 0xff, 0xff, 0xff, - 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00, - 0xf4, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0x40, 0x01, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x04, 0x00, - 0x80, 0xa9, 0x03, 0x00, 0x3b, 0x00, 0x00, 0x00, - 0x08, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, - 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xc8, 0x41, 0x00, 0x80, 0xbb, 0x41, - 0x0b, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x54, 0x00, 0x00, 0x00, - 0x54, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, - 0x08, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, - 0x3c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x14, 0x00, 0x00, 0x00 -}; - -static const unsigned char MF_LINETO_BITS[] = { - 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x11, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0x02, - 0x0f, 0x00, 0x37, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00 -}; - -static const unsigned char EMF_LINETO_BITS[] = { - 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x37, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x61, 0x06, 0x00, 0x00, 0xb7, 0x01, 0x00, 0x00, - 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00, - 0x38, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0x7c, 0x01, 0x00, 0x00, 0x2c, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x60, 0xcc, 0x05, 0x00, - 0xe0, 0x93, 0x04, 0x00, 0x46, 0x00, 0x00, 0x00, - 0x48, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x00, - 0x47, 0x44, 0x49, 0x43, 0x01, 0x00, 0x00, 0x80, - 0x00, 0x03, 0x00, 0x00, 0x60, 0xe5, 0xf4, 0x73, - 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x11, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0x02, - 0x0f, 0x00, 0x37, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, - 0x0c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x0b, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0x09, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0x36, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x37, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, - 0x25, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, - 0x07, 0x00, 0x00, 0x80, 0x25, 0x00, 0x00, 0x00, - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x30, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, - 0x0f, 0x00, 0x00, 0x80, 0x4b, 0x00, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x05, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00 -}; - -static const unsigned char EMF_LINETO_MM_ANISOTROPIC_BITS[] = { - 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x37, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x64, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, - 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00, - 0x38, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0x7c, 0x01, 0x00, 0x00, 0x2c, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x60, 0xcc, 0x05, 0x00, - 0xe0, 0x93, 0x04, 0x00, 0x46, 0x00, 0x00, 0x00, - 0x48, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x00, - 0x47, 0x44, 0x49, 0x43, 0x01, 0x00, 0x00, 0x80, - 0x00, 0x03, 0x00, 0x00, 0xa4, 0xfe, 0xf4, 0x73, - 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x11, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0x02, - 0x0f, 0x00, 0x37, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, - 0x0c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x0b, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x09, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x36, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x37, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, - 0x25, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, - 0x07, 0x00, 0x00, 0x80, 0x25, 0x00, 0x00, 0x00, - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x30, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, - 0x0f, 0x00, 0x00, 0x80, 0x4b, 0x00, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x05, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00 -}; - -static const unsigned char EMF_LINETO_MM_TEXT_BITS[] = { - 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x37, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x61, 0x06, 0x00, 0x00, 0xb7, 0x01, 0x00, 0x00, - 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00, - 0xe4, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0x7c, 0x01, 0x00, 0x00, 0x2c, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x60, 0xcc, 0x05, 0x00, - 0xe0, 0x93, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, - 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, - 0x00, 0x04, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, - 0x0f, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, - 0x0c, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x80, - 0x25, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x30, 0x00, 0x00, 0x00, - 0x0c, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x80, - 0x4b, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, - 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x14, 0x00, 0x00, 0x00 -}; - -static const unsigned char EMF_BITBLT[] = -{ - 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x6a, 0x00, 0x00, 0x00, 0x6a, 0x00, 0x00, 0x00, - 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00, - 0xa0, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x23, 0x04, 0x00, 0x00, 0x3b, 0x02, 0x00, 0x00, - 0x75, 0x01, 0x00, 0x00, 0xc9, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x08, 0xb1, 0x05, 0x00, - 0x28, 0x11, 0x03, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0xbc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0xcc, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x64, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, - 0x8c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, - 0x28, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x18, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x62, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00 -}; - -static const unsigned char EMF_DCBRUSH_BITS[] = -{ - 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, - 0x0a, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, - 0x13, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, - 0x39, 0x01, 0x00, 0x00, 0x39, 0x01, 0x00, 0x00, - 0x52, 0x02, 0x00, 0x00, 0x52, 0x02, 0x00, 0x00, - 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00, - 0x44, 0x01, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, - 0x40, 0x01, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x04, 0x00, - 0x80, 0xa9, 0x03, 0x00, 0x25, 0x00, 0x00, 0x00, - 0x0c, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x80, - 0x25, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, - 0x13, 0x00, 0x00, 0x80, 0x27, 0x00, 0x00, 0x00, - 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x55, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, - 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x26, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x33, 0x44, 0x55, 0x00, 0x25, 0x00, 0x00, 0x00, - 0x0c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x2b, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, - 0x0a, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, - 0x13, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, - 0x28, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, - 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x12, 0x34, 0x56, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, - 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x28, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, - 0x0c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x14, 0x00, 0x00, 0x00 -}; - -/* For debugging or dumping the raw metafiles produced by - * new test functions. - */ -static INT CALLBACK mf_enum_proc(HDC hdc, HANDLETABLE *ht, METARECORD *mr, - INT nobj, LPARAM param) -{ - trace("hdc %p, mr->rdFunction %04x, mr->rdSize %u, param %p\n", - hdc, mr->rdFunction, mr->rdSize, (void *)param); - return TRUE; -} - -/* For debugging or dumping the raw metafiles produced by - * new test functions. - */ - -static void dump_mf_bits (const HMETAFILE mf, const char *desc) -{ - BYTE buf[MF_BUFSIZE]; - UINT mfsize, i; - - if (!winetest_debug) return; - - mfsize = GetMetaFileBitsEx (mf, MF_BUFSIZE, buf); - ok (mfsize > 0, "%s: GetMetaFileBitsEx failed.\n", desc); - - printf ("MetaFile %s has bits:\n{\n ", desc); - for (i=0; i 0, "%s: GetMetaFileBitsEx failed.\n", desc); - if (mfsize < MF_BUFSIZE) - ok (mfsize == bsize, "%s: mfsize=%d, bsize=%d.\n", - desc, mfsize, bsize); - else - ok (bsize >= MF_BUFSIZE, "%s: mfsize > bufsize (%d bytes), bsize=%d.\n", - desc, mfsize, bsize); - if (mfsize != bsize) - return -1; - - diff = 0; - for (i=0; i 0, "%s: GetEnhMetaFileBits failed\n", desc); - - printf("EMF %s has bits:\n{\n ", desc); - for (i = 0; i < mfsize; i++) - { - printf ("0x%02x", buf[i]); - if (i == mfsize-1) - printf ("\n"); - else if (i % 8 == 7) - printf (",\n "); - else - printf (", "); - } - printf ("};\n"); -} - -static void dump_emf_records(const HENHMETAFILE mf, const char *desc) -{ - BYTE *emf; - BYTE buf[MF_BUFSIZE]; - UINT mfsize, offset; - - if (!winetest_debug) return; - - mfsize = GetEnhMetaFileBits(mf, MF_BUFSIZE, buf); - ok (mfsize > 0, "%s: GetEnhMetaFileBits error %d\n", desc, GetLastError()); - - printf("EMF %s has records:\n", desc); - - emf = buf; - offset = 0; - while(offset < mfsize) - { - EMR *emr = (EMR *)(emf + offset); - printf("emr->iType %d, emr->nSize %u\n", emr->iType, emr->nSize); - /*trace("emr->iType 0x%04lx, emr->nSize 0x%04lx\n", emr->iType, emr->nSize);*/ - offset += emr->nSize; - } -} - -static void dump_emf_record(const ENHMETARECORD *emr, const char *desc) -{ - const BYTE *buf; - DWORD i; - - if (!winetest_debug) return; - - printf ("%s: EMF record %u has bits:\n{\n", desc, emr->iType); - buf = (const BYTE *)emr; - for (i = 0; i < emr->nSize; i++) - { - printf ("0x%02x", buf[i]); - if (i == emr->nSize - 1) - printf ("\n"); - else if (i % 8 == 7) - printf (",\n"); - else - printf (", "); - } - printf ("};\n"); -} - -static void dump_EMREXTTEXTOUT(const EMREXTTEXTOUTW *eto) -{ - trace("rclBounds %d,%d - %d,%d\n", eto->rclBounds.left, eto->rclBounds.top, - eto->rclBounds.right, eto->rclBounds.bottom); - trace("iGraphicsMode %u\n", eto->iGraphicsMode); - trace("exScale: %f\n", eto->exScale); - trace("eyScale: %f\n", eto->eyScale); - trace("emrtext.ptlReference %d,%d\n", eto->emrtext.ptlReference.x, eto->emrtext.ptlReference.y); - trace("emrtext.nChars %u\n", eto->emrtext.nChars); - trace("emrtext.offString %#x\n", eto->emrtext.offString); - trace("emrtext.fOptions %#x\n", eto->emrtext.fOptions); - trace("emrtext.rcl %d,%d - %d,%d\n", eto->emrtext.rcl.left, eto->emrtext.rcl.top, - eto->emrtext.rcl.right, eto->emrtext.rcl.bottom); - trace("emrtext.offDx %#x\n", eto->emrtext.offDx); -} - -static BOOL match_emf_record(const ENHMETARECORD *emr1, const ENHMETARECORD *emr2, - const char *desc, BOOL ignore_scaling) -{ - int diff; - - ok(emr1->iType == emr2->iType, "%s: emr->iType %u != %u\n", - desc, emr1->iType, emr2->iType); - - ok(emr1->nSize == emr2->nSize, "%s: emr->nSize %u != %u\n", - desc, emr1->nSize, emr2->nSize); - - /* iType and nSize mismatches are fatal */ - if (emr1->iType != emr2->iType || emr1->nSize != emr2->nSize) return FALSE; - - /* contents of EMR_GDICOMMENT are not interesting */ - if (emr1->iType == EMR_GDICOMMENT) return TRUE; - - /* different Windows versions setup DC scaling differently when - * converting an old style metafile to an EMF. - */ - if (ignore_scaling && (emr1->iType == EMR_SETWINDOWEXTEX || - emr1->iType == EMR_SETVIEWPORTEXTEX)) - return TRUE; - - if (emr1->iType == EMR_EXTTEXTOUTW || emr1->iType == EMR_EXTTEXTOUTA) - { - EMREXTTEXTOUTW *eto1, *eto2; - - eto1 = HeapAlloc(GetProcessHeap(), 0, emr1->nSize); - memcpy(eto1, emr1, emr1->nSize); - eto2 = HeapAlloc(GetProcessHeap(), 0, emr2->nSize); - memcpy(eto2, emr2, emr2->nSize); - - /* different Windows versions setup DC scaling differently */ - eto1->exScale = eto1->eyScale = 0.0; - eto2->exScale = eto2->eyScale = 0.0; - - diff = memcmp(eto1, eto2, emr1->nSize); - if (diff) - { - dump_EMREXTTEXTOUT(eto1); - dump_EMREXTTEXTOUT(eto2); - } - HeapFree(GetProcessHeap(), 0, eto1); - HeapFree(GetProcessHeap(), 0, eto2); - } - else if (emr1->iType == EMR_EXTSELECTCLIPRGN && !lstrcmpA(desc, "emf_clipping")) - { - /* We have to take care of NT4 differences here */ - diff = memcmp(emr1, emr2, emr1->nSize); - if (diff) - { - ENHMETARECORD *emr_nt4; - - emr_nt4 = HeapAlloc(GetProcessHeap(), 0, emr2->nSize); - memcpy(emr_nt4, emr2, emr2->nSize); - /* Correct the nRgnSize field */ - emr_nt4->dParm[5] = sizeof(RECT); - - diff = memcmp(emr1, emr_nt4, emr1->nSize); - if (!diff) - win_skip("Catered for NT4 differences\n"); - - HeapFree(GetProcessHeap(), 0, emr_nt4); - } - } - else - diff = memcmp(emr1, emr2, emr1->nSize); - - ok(diff == 0, "%s: contents of record %u don't match\n", desc, emr1->iType); - - if (diff) - { - dump_emf_record(emr1, "expected bits"); - dump_emf_record(emr2, "actual bits"); - } - - return diff == 0; /* report all non-fatal record mismatches */ -} - -/* Compare the EMF produced by a test function with the - * expected raw EMF data in "bits". - * Return value is 0 for a perfect match, - * -1 if lengths aren't equal, - * otherwise returns the number of non-matching bytes. - */ -static int compare_emf_bits(const HENHMETAFILE mf, const unsigned char *bits, - UINT bsize, const char *desc, - BOOL ignore_scaling) -{ - unsigned char buf[MF_BUFSIZE]; - UINT mfsize, offset1, offset2, diff_nt4, diff_9x; - const ENHMETAHEADER *emh1, *emh2; - - mfsize = GetEnhMetaFileBits(mf, MF_BUFSIZE, buf); - ok (mfsize > 0, "%s: GetEnhMetaFileBits error %d\n", desc, GetLastError()); - - /* ENHMETAHEADER size could differ, depending on platform */ - diff_nt4 = sizeof(SIZEL); - diff_9x = sizeof(SIZEL) + 3 * sizeof(DWORD); - - if (mfsize < MF_BUFSIZE) - { - ok(mfsize == bsize || - broken(mfsize == bsize - diff_nt4) || /* NT4 */ - broken(mfsize == bsize - diff_9x), /* Win9x/WinME */ - "%s: mfsize=%d, bsize=%d\n", desc, mfsize, bsize); - } - else - ok(bsize >= MF_BUFSIZE, "%s: mfsize > bufsize (%d bytes), bsize=%d\n", - desc, mfsize, bsize); - - /* basic things must match */ - emh1 = (const ENHMETAHEADER *)bits; - emh2 = (const ENHMETAHEADER *)buf; - ok(emh1->iType == EMR_HEADER, "expected EMR_HEADER, got %u\n", emh1->iType); - ok(emh1->nSize == sizeof(ENHMETAHEADER), "expected sizeof(ENHMETAHEADER), got %u\n", emh1->nSize); - ok(emh2->nBytes == mfsize, "expected emh->nBytes %u, got %u\n", mfsize, emh2->nBytes); - ok(emh1->dSignature == ENHMETA_SIGNATURE, "expected ENHMETA_SIGNATURE, got %u\n", emh1->dSignature); - - ok(emh1->iType == emh2->iType, "expected EMR_HEADER, got %u\n", emh2->iType); - ok(emh1->nSize == emh2->nSize || - broken(emh1->nSize - diff_nt4 == emh2->nSize) || - broken(emh1->nSize - diff_9x == emh2->nSize), - "expected nSize %u, got %u\n", emh1->nSize, emh2->nSize); - ok(emh1->dSignature == emh2->dSignature, "expected dSignature %u, got %u\n", emh1->dSignature, emh2->dSignature); - ok(emh1->nBytes == emh2->nBytes || - broken(emh1->nBytes - diff_nt4 == emh2->nBytes) || - broken(emh1->nBytes - diff_9x == emh2->nBytes), - "expected nBytes %u, got %u\n", emh1->nBytes, emh2->nBytes); - ok(emh1->nRecords == emh2->nRecords, "expected nRecords %u, got %u\n", emh1->nRecords, emh2->nRecords); - - if(!winetest_interactive) - { - skip("skipping match_emf_record(), bug 5393\n"); - return 0; - } - - offset1 = emh1->nSize; - offset2 = emh2->nSize; /* Needed for Win9x/WinME/NT4 */ - while (offset1 < emh1->nBytes) - { - const ENHMETARECORD *emr1 = (const ENHMETARECORD *)(bits + offset1); - const ENHMETARECORD *emr2 = (const ENHMETARECORD *)(buf + offset2); - - trace("%s: EMF record %u, size %u/record %u, size %u\n", - desc, emr1->iType, emr1->nSize, emr2->iType, emr2->nSize); - - if (!match_emf_record(emr1, emr2, desc, ignore_scaling)) return -1; - - /* We have already bailed out if iType or nSize don't match */ - offset1 += emr1->nSize; - offset2 += emr2->nSize; - } - return 0; -} - - -/* tests blitting to an EMF */ -static void test_emf_BitBlt(void) -{ - HDC hdcDisplay, hdcMetafile, hdcBitmap; - HBITMAP hBitmap, hOldBitmap; - HENHMETAFILE hMetafile; -#define BMP_DIM 4 - BITMAPINFOHEADER bmih = - { - sizeof(BITMAPINFOHEADER), - BMP_DIM,/* biWidth */ - BMP_DIM,/* biHeight */ - 1, /* biPlanes */ - 24, /* biBitCount */ - BI_RGB, /* biCompression */ - 0, /* biXPelsPerMeter */ - 0, /* biYPelsPerMeter */ - 0, /* biClrUsed */ - 0, /* biClrImportant */ - }; - void *bits; - BOOL ret; - - hdcDisplay = CreateDCA("DISPLAY", NULL, NULL, NULL); - ok( hdcDisplay != 0, "CreateDCA error %d\n", GetLastError() ); - - hdcBitmap = CreateCompatibleDC(hdcDisplay); - ok( hdcBitmap != 0, "CreateCompatibleDC failed\n" ); - bmih.biXPelsPerMeter = MulDiv(GetDeviceCaps(hdcDisplay, LOGPIXELSX), 100, 3937); - bmih.biYPelsPerMeter = MulDiv(GetDeviceCaps(hdcDisplay, LOGPIXELSY), 100, 3937); - hBitmap = CreateDIBSection(hdcDisplay, (const BITMAPINFO *)&bmih, - DIB_RGB_COLORS, &bits, NULL, 0); - hOldBitmap = SelectObject(hdcBitmap, hBitmap); - - hdcMetafile = CreateEnhMetaFileA(hdcBitmap, NULL, NULL, NULL); - ok( hdcMetafile != 0, "CreateEnhMetaFileA failed\n" ); - - /* First fill the bitmap DC with something recognizable, like BLACKNESS */ - ret = BitBlt(hdcBitmap, 0, 0, BMP_DIM, BMP_DIM, 0, 0, 0, BLACKNESS); - ok( ret, "BitBlt(BLACKNESS) failed\n" ); - - ret = BitBlt(hdcMetafile, 0, 0, BMP_DIM, BMP_DIM, hdcBitmap, 0, 0, SRCCOPY); - ok( ret, "BitBlt(SRCCOPY) failed\n" ); - ret = BitBlt(hdcMetafile, 0, 0, BMP_DIM, BMP_DIM, 0, 0, 0, WHITENESS); - ok( ret, "BitBlt(WHITENESS) failed\n" ); - - hMetafile = CloseEnhMetaFile(hdcMetafile); - ok( hMetafile != 0, "CloseEnhMetaFile failed\n" ); - - if(compare_emf_bits(hMetafile, EMF_BITBLT, sizeof(EMF_BITBLT), - "emf_BitBlt", FALSE) != 0) - { - dump_emf_bits(hMetafile, "emf_BitBlt"); - dump_emf_records(hMetafile, "emf_BitBlt"); - } - - SelectObject(hdcBitmap, hOldBitmap); - DeleteObject(hBitmap); - DeleteDC(hdcBitmap); - DeleteDC(hdcDisplay); -#undef BMP_DIM -} - -static void test_emf_DCBrush(void) -{ - HDC hdcMetafile; - HENHMETAFILE hMetafile; - HBRUSH hBrush; - HPEN hPen; - BOOL ret; - COLORREF color; - - if (!pSetDCBrushColor || !pSetDCPenColor) - { - win_skip( "SetDCBrush/PenColor not supported\n" ); - return; - } - - hdcMetafile = CreateEnhMetaFileA(GetDC(0), NULL, NULL, NULL); - ok( hdcMetafile != 0, "CreateEnhMetaFileA failed\n" ); - - hBrush = SelectObject(hdcMetafile, GetStockObject(DC_BRUSH)); - ok(hBrush != 0, "SelectObject error %d.\n", GetLastError()); - - hPen = SelectObject(hdcMetafile, GetStockObject(DC_PEN)); - ok(hPen != 0, "SelectObject error %d.\n", GetLastError()); - - color = pSetDCBrushColor( hdcMetafile, RGB(0x55,0x55,0x55) ); - ok( color == 0xffffff, "SetDCBrushColor returned %x\n", color ); - - color = pSetDCPenColor( hdcMetafile, RGB(0x33,0x44,0x55) ); - ok( color == 0, "SetDCPenColor returned %x\n", color ); - - Rectangle( hdcMetafile, 10, 10, 20, 20 ); - - color = pSetDCBrushColor( hdcMetafile, RGB(0x12,0x34,0x56) ); - ok( color == 0x555555, "SetDCBrushColor returned %x\n", color ); - - hMetafile = CloseEnhMetaFile(hdcMetafile); - ok( hMetafile != 0, "CloseEnhMetaFile failed\n" ); - - if (compare_emf_bits (hMetafile, EMF_DCBRUSH_BITS, sizeof(EMF_DCBRUSH_BITS), - "emf_DC_Brush", FALSE ) != 0) - { - dump_emf_bits(hMetafile, "emf_DC_Brush"); - dump_emf_records(hMetafile, "emf_DC_Brush"); - } - ret = DeleteEnhMetaFile(hMetafile); - ok( ret, "DeleteEnhMetaFile error %d\n", GetLastError()); - ret = DeleteObject(hBrush); - ok( ret, "DeleteObject(HBRUSH) error %d\n", GetLastError()); - ret = DeleteObject(hPen); - ok( ret, "DeleteObject(HPEN) error %d\n", GetLastError()); -} - -/* Test a blank metafile. May be used as a template for new tests. */ - -static void test_mf_Blank(void) -{ - HDC hdcMetafile; - HMETAFILE hMetafile; - INT caps; - BOOL ret; - INT type; - - hdcMetafile = CreateMetaFileA(NULL); - ok(hdcMetafile != 0, "CreateMetaFileA(NULL) error %d\n", GetLastError()); - trace("hdcMetafile %p\n", hdcMetafile); - -/* Tests on metafile initialization */ - caps = GetDeviceCaps (hdcMetafile, TECHNOLOGY); - ok (caps == DT_METAFILE, - "GetDeviceCaps: TECHNOLOGY=%d != DT_METAFILE.\n", caps); - - hMetafile = CloseMetaFile(hdcMetafile); - ok(hMetafile != 0, "CloseMetaFile error %d\n", GetLastError()); - type = GetObjectType(hMetafile); - ok(type == OBJ_METAFILE, "CloseMetaFile created object with type %d\n", type); - ok(!GetObjectType(hdcMetafile), "CloseMetaFile has to destroy metafile hdc\n"); - - if (compare_mf_bits (hMetafile, MF_BLANK_BITS, sizeof(MF_BLANK_BITS), - "mf_blank") != 0) - { - dump_mf_bits(hMetafile, "mf_Blank"); - EnumMetaFile(0, hMetafile, mf_enum_proc, 0); - } - - ret = DeleteMetaFile(hMetafile); - ok( ret, "DeleteMetaFile(%p) error %d\n", hMetafile, GetLastError()); -} - -static void test_CopyMetaFile(void) -{ - HDC hdcMetafile; - HMETAFILE hMetafile, hmf_copy; - BOOL ret; - char temp_path[MAX_PATH]; - char mf_name[MAX_PATH]; - INT type; - - hdcMetafile = CreateMetaFileA(NULL); - ok(hdcMetafile != 0, "CreateMetaFileA(NULL) error %d\n", GetLastError()); - trace("hdcMetafile %p\n", hdcMetafile); - - hMetafile = CloseMetaFile(hdcMetafile); - ok(hMetafile != 0, "CloseMetaFile error %d\n", GetLastError()); - type = GetObjectType(hMetafile); - ok(type == OBJ_METAFILE, "CloseMetaFile created object with type %d\n", type); - - if (compare_mf_bits (hMetafile, MF_BLANK_BITS, sizeof(MF_BLANK_BITS), - "mf_blank") != 0) - { - dump_mf_bits(hMetafile, "mf_Blank"); - EnumMetaFile(0, hMetafile, mf_enum_proc, 0); - } - - GetTempPathA(MAX_PATH, temp_path); - GetTempFileNameA(temp_path, "wmf", 0, mf_name); - - hmf_copy = CopyMetaFileA(hMetafile, mf_name); - ok(hmf_copy != 0, "CopyMetaFile error %d\n", GetLastError()); - - type = GetObjectType(hmf_copy); - ok(type == OBJ_METAFILE, "CopyMetaFile created object with type %d\n", type); - - ret = DeleteMetaFile(hMetafile); - ok( ret, "DeleteMetaFile(%p) error %d\n", hMetafile, GetLastError()); - - if (compare_mf_disk_bits(mf_name, MF_BLANK_BITS, sizeof(MF_BLANK_BITS), "mf_blank") != 0) - { - dump_mf_bits(hmf_copy, "mf_Blank"); - EnumMetaFile(0, hmf_copy, mf_enum_proc, 0); - } - - ret = DeleteMetaFile(hmf_copy); - ok( ret, "DeleteMetaFile(%p) error %d\n", hmf_copy, GetLastError()); - - DeleteFileA(mf_name); -} - -static void test_SetMetaFileBits(void) -{ - HMETAFILE hmf; - INT type; - BOOL ret; - BYTE buf[256]; - METAHEADER *mh; - - hmf = SetMetaFileBitsEx(sizeof(MF_GRAPHICS_BITS), MF_GRAPHICS_BITS); - trace("hmf %p\n", hmf); - ok(hmf != 0, "SetMetaFileBitsEx error %d\n", GetLastError()); - type = GetObjectType(hmf); - ok(type == OBJ_METAFILE, "SetMetaFileBitsEx created object with type %d\n", type); - - if (compare_mf_bits(hmf, MF_GRAPHICS_BITS, sizeof(MF_GRAPHICS_BITS), "mf_Graphics") != 0) - { - dump_mf_bits(hmf, "mf_Graphics"); - EnumMetaFile(0, hmf, mf_enum_proc, 0); - } - - ret = DeleteMetaFile(hmf); - ok(ret, "DeleteMetaFile(%p) error %d\n", hmf, GetLastError()); - - /* NULL data crashes XP SP1 */ - /*hmf = SetMetaFileBitsEx(sizeof(MF_GRAPHICS_BITS), NULL);*/ - - /* Now with zero size */ - SetLastError(0xdeadbeef); - hmf = SetMetaFileBitsEx(0, MF_GRAPHICS_BITS); - trace("hmf %p\n", hmf); - ok(!hmf, "SetMetaFileBitsEx should fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA || - broken(GetLastError() == ERROR_INVALID_PARAMETER), /* Win9x */ - "wrong error %d\n", GetLastError()); - - /* Now with odd size */ - SetLastError(0xdeadbeef); - hmf = SetMetaFileBitsEx(sizeof(MF_GRAPHICS_BITS) - 1, MF_GRAPHICS_BITS); - trace("hmf %p\n", hmf); - ok(!hmf, "SetMetaFileBitsEx should fail\n"); - ok(GetLastError() == 0xdeadbeef /* XP SP1 */, "wrong error %d\n", GetLastError()); - - /* Now with zeroed out header fields */ - assert(sizeof(buf) >= sizeof(MF_GRAPHICS_BITS)); - memcpy(buf, MF_GRAPHICS_BITS, sizeof(MF_GRAPHICS_BITS)); - mh = (METAHEADER *)buf; - /* corruption of any of the below fields leads to a failure */ - mh->mtType = 0; - mh->mtVersion = 0; - mh->mtHeaderSize = 0; - SetLastError(0xdeadbeef); - hmf = SetMetaFileBitsEx(sizeof(MF_GRAPHICS_BITS), buf); - trace("hmf %p\n", hmf); - ok(!hmf, "SetMetaFileBitsEx should fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA || - broken(GetLastError() == ERROR_INVALID_PARAMETER), /* Win9x */ - "wrong error %d\n", GetLastError()); - - /* Now with corrupted mtSize field */ - memcpy(buf, MF_GRAPHICS_BITS, sizeof(MF_GRAPHICS_BITS)); - mh = (METAHEADER *)buf; - /* corruption of mtSize doesn't lead to a failure */ - mh->mtSize *= 2; - hmf = SetMetaFileBitsEx(sizeof(MF_GRAPHICS_BITS), buf); - trace("hmf %p\n", hmf); - ok(hmf != 0, "SetMetaFileBitsEx error %d\n", GetLastError()); - - if (compare_mf_bits(hmf, MF_GRAPHICS_BITS, sizeof(MF_GRAPHICS_BITS), "mf_Graphics") != 0) - { - dump_mf_bits(hmf, "mf_Graphics"); - EnumMetaFile(0, hmf, mf_enum_proc, 0); - } - - ret = DeleteMetaFile(hmf); - ok(ret, "DeleteMetaFile(%p) error %d\n", hmf, GetLastError()); - -#ifndef _WIN64 /* Generates access violation on XP x64 and Win2003 x64 */ - /* Now with zeroed out mtSize field */ - memcpy(buf, MF_GRAPHICS_BITS, sizeof(MF_GRAPHICS_BITS)); - mh = (METAHEADER *)buf; - /* zeroing mtSize doesn't lead to a failure */ - mh->mtSize = 0; - hmf = SetMetaFileBitsEx(sizeof(MF_GRAPHICS_BITS), buf); - trace("hmf %p\n", hmf); - ok(hmf != 0, "SetMetaFileBitsEx error %d\n", GetLastError()); - - if (compare_mf_bits(hmf, MF_GRAPHICS_BITS, sizeof(MF_GRAPHICS_BITS), "mf_Graphics") != 0) - { - dump_mf_bits(hmf, "mf_Graphics"); - EnumMetaFile(0, hmf, mf_enum_proc, 0); - } - - ret = DeleteMetaFile(hmf); - ok(ret, "DeleteMetaFile(%p) error %d\n", hmf, GetLastError()); -#endif -} - -/* Simple APIs from mfdrv/graphics.c - */ - -static void test_mf_Graphics(void) -{ - HDC hdcMetafile; - HMETAFILE hMetafile; - POINT oldpoint; - BOOL ret; - - hdcMetafile = CreateMetaFileA(NULL); - ok(hdcMetafile != 0, "CreateMetaFileA(NULL) error %d\n", GetLastError()); - trace("hdcMetafile %p\n", hdcMetafile); - - ret = MoveToEx(hdcMetafile, 1, 1, NULL); - ok( ret, "MoveToEx error %d.\n", GetLastError()); - ret = LineTo(hdcMetafile, 2, 2); - ok( ret, "LineTo error %d.\n", GetLastError()); - ret = MoveToEx(hdcMetafile, 1, 1, &oldpoint); - ok( ret, "MoveToEx error %d.\n", GetLastError()); - -/* oldpoint gets garbage under Win XP, so the following test would - * work under Wine but fails under Windows: - * - * ok((oldpoint.x == 2) && (oldpoint.y == 2), - * "MoveToEx: (x, y) = (%ld, %ld), should be (2, 2).\n", - * oldpoint.x, oldpoint.y); - */ - - ret = Ellipse(hdcMetafile, 0, 0, 2, 2); - ok( ret, "Ellipse error %d.\n", GetLastError()); - - hMetafile = CloseMetaFile(hdcMetafile); - ok(hMetafile != 0, "CloseMetaFile error %d\n", GetLastError()); - ok(!GetObjectType(hdcMetafile), "CloseMetaFile has to destroy metafile hdc\n"); - - if (compare_mf_bits (hMetafile, MF_GRAPHICS_BITS, sizeof(MF_GRAPHICS_BITS), - "mf_Graphics") != 0) - { - dump_mf_bits(hMetafile, "mf_Graphics"); - EnumMetaFile(0, hMetafile, mf_enum_proc, 0); - } - - ret = DeleteMetaFile(hMetafile); - ok( ret, "DeleteMetaFile(%p) error %d\n", - hMetafile, GetLastError()); -} - -static void test_mf_PatternBrush(void) -{ - HDC hdcMetafile; - HMETAFILE hMetafile; - LOGBRUSH *orig_lb; - HBRUSH hBrush; - BOOL ret; - - orig_lb = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(LOGBRUSH)); - - orig_lb->lbStyle = BS_PATTERN; - orig_lb->lbColor = RGB(0, 0, 0); - orig_lb->lbHatch = (ULONG_PTR)CreateBitmap (8, 8, 1, 1, SAMPLE_PATTERN_BRUSH); - ok((HBITMAP)orig_lb->lbHatch != NULL, "CreateBitmap error %d.\n", GetLastError()); - - hBrush = CreateBrushIndirect (orig_lb); - ok(hBrush != 0, "CreateBrushIndirect error %d\n", GetLastError()); - - hdcMetafile = CreateMetaFileA(NULL); - ok(hdcMetafile != 0, "CreateMetaFileA error %d\n", GetLastError()); - trace("hdcMetafile %p\n", hdcMetafile); - - hBrush = SelectObject(hdcMetafile, hBrush); - ok(hBrush != 0, "SelectObject error %d.\n", GetLastError()); - - hMetafile = CloseMetaFile(hdcMetafile); - ok(hMetafile != 0, "CloseMetaFile error %d\n", GetLastError()); - ok(!GetObjectType(hdcMetafile), "CloseMetaFile has to destroy metafile hdc\n"); - - if (compare_mf_bits (hMetafile, MF_PATTERN_BRUSH_BITS, sizeof(MF_PATTERN_BRUSH_BITS), - "mf_Pattern_Brush") != 0) - { - dump_mf_bits(hMetafile, "mf_Pattern_Brush"); - EnumMetaFile(0, hMetafile, mf_enum_proc, 0); - } - - ret = DeleteMetaFile(hMetafile); - ok( ret, "DeleteMetaFile error %d\n", GetLastError()); - ret = DeleteObject(hBrush); - ok( ret, "DeleteObject(HBRUSH) error %d\n", GetLastError()); - ret = DeleteObject((HBITMAP)orig_lb->lbHatch); - ok( ret, "DeleteObject(HBITMAP) error %d\n", - GetLastError()); - HeapFree (GetProcessHeap(), 0, orig_lb); -} - -static void test_mf_DCBrush(void) -{ - HDC hdcMetafile; - HMETAFILE hMetafile; - HBRUSH hBrush; - HPEN hPen; - BOOL ret; - COLORREF color; - - if (!pSetDCBrushColor || !pSetDCPenColor) - { - win_skip( "SetDCBrush/PenColor not supported\n" ); - return; - } - - hdcMetafile = CreateMetaFileA(NULL); - ok( hdcMetafile != 0, "CreateMetaFileA failed\n" ); - - hBrush = SelectObject(hdcMetafile, GetStockObject(DC_BRUSH)); - ok(hBrush != 0, "SelectObject error %d.\n", GetLastError()); - - hPen = SelectObject(hdcMetafile, GetStockObject(DC_PEN)); - ok(hPen != 0, "SelectObject error %d.\n", GetLastError()); - - color = pSetDCBrushColor( hdcMetafile, RGB(0x55,0x55,0x55) ); - ok( color == CLR_INVALID, "SetDCBrushColor returned %x\n", color ); - - color = pSetDCPenColor( hdcMetafile, RGB(0x33,0x44,0x55) ); - ok( color == CLR_INVALID, "SetDCPenColor returned %x\n", color ); - - Rectangle( hdcMetafile, 10, 10, 20, 20 ); - - color = pSetDCBrushColor( hdcMetafile, RGB(0x12,0x34,0x56) ); - ok( color == CLR_INVALID, "SetDCBrushColor returned %x\n", color ); - - hMetafile = CloseMetaFile(hdcMetafile); - ok( hMetafile != 0, "CloseMetaFile failed\n" ); - - if (compare_mf_bits(hMetafile, MF_DCBRUSH_BITS, sizeof(MF_DCBRUSH_BITS), "mf_DCBrush") != 0) - { - dump_mf_bits(hMetafile, "mf_DCBrush"); - EnumMetaFile(0, hMetafile, mf_enum_proc, 0); - } - ret = DeleteMetaFile(hMetafile); - ok(ret, "DeleteMetaFile(%p) error %d\n", hMetafile, GetLastError()); -} - -static void test_mf_ExtTextOut_on_path(void) -{ - HDC hdcMetafile; - HMETAFILE hMetafile; - BOOL ret; - static const INT dx[4] = { 3, 5, 8, 12 }; - - hdcMetafile = CreateMetaFileA(NULL); - ok(hdcMetafile != 0, "CreateMetaFileA(NULL) error %d\n", GetLastError()); - trace("hdcMetafile %p\n", hdcMetafile); - - ret = BeginPath(hdcMetafile); - ok(!ret, "BeginPath on metafile DC should fail\n"); - - ret = ExtTextOutA(hdcMetafile, 11, 22, 0, NULL, "Test", 4, dx); - ok(ret, "ExtTextOut error %d\n", GetLastError()); - - ret = EndPath(hdcMetafile); - ok(!ret, "EndPath on metafile DC should fail\n"); - - hMetafile = CloseMetaFile(hdcMetafile); - ok(hMetafile != 0, "CloseMetaFile error %d\n", GetLastError()); - - if (compare_mf_bits(hMetafile, MF_TEXTOUT_ON_PATH_BITS, sizeof(MF_TEXTOUT_ON_PATH_BITS), - "mf_TextOut_on_path") != 0) - { - dump_mf_bits(hMetafile, "mf_TextOut_on_path"); - EnumMetaFile(0, hMetafile, mf_enum_proc, 0); - } - - ret = DeleteMetaFile(hMetafile); - ok(ret, "DeleteMetaFile(%p) error %d\n", hMetafile, GetLastError()); -} - -static void test_emf_ExtTextOut_on_path(void) -{ - HWND hwnd; - HDC hdcDisplay, hdcMetafile; - HENHMETAFILE hMetafile; - BOOL ret; - static const INT dx[4] = { 3, 5, 8, 12 }; - - /* Win9x doesn't play EMFs on invisible windows */ - hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP | WS_VISIBLE, - 0, 0, 200, 200, 0, 0, 0, NULL); - ok(hwnd != 0, "CreateWindowExA error %d\n", GetLastError()); - - hdcDisplay = GetDC(hwnd); - ok(hdcDisplay != 0, "GetDC error %d\n", GetLastError()); - - hdcMetafile = CreateEnhMetaFileA(hdcDisplay, NULL, NULL, NULL); - ok(hdcMetafile != 0, "CreateEnhMetaFileA error %d\n", GetLastError()); - - ret = BeginPath(hdcMetafile); - ok(ret, "BeginPath error %d\n", GetLastError()); - - ret = ExtTextOutA(hdcMetafile, 11, 22, 0, NULL, "Test", 4, dx); - ok(ret, "ExtTextOut error %d\n", GetLastError()); - - ret = EndPath(hdcMetafile); - ok(ret, "EndPath error %d\n", GetLastError()); - - hMetafile = CloseEnhMetaFile(hdcMetafile); - ok(hMetafile != 0, "CloseEnhMetaFile error %d\n", GetLastError()); - - /* this doesn't succeed yet: EMF has correct size, all EMF records - * are there, but their contents don't match for different reasons. - */ - if (compare_emf_bits(hMetafile, EMF_TEXTOUT_ON_PATH_BITS, sizeof(EMF_TEXTOUT_ON_PATH_BITS), - "emf_TextOut_on_path", FALSE) != 0) - { - dump_emf_bits(hMetafile, "emf_TextOut_on_path"); - dump_emf_records(hMetafile, "emf_TextOut_on_path"); - } - - ret = DeleteEnhMetaFile(hMetafile); - ok(ret, "DeleteEnhMetaFile error %d\n", GetLastError()); - ret = ReleaseDC(hwnd, hdcDisplay); - ok(ret, "ReleaseDC error %d\n", GetLastError()); - DestroyWindow(hwnd); -} - -static const unsigned char EMF_CLIPPING[] = -{ - 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1e, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, - 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00, - 0xd0, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0x7c, 0x01, 0x00, 0x00, 0x2c, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x60, 0xcc, 0x05, 0x00, - 0xe0, 0x93, 0x04, 0x00, 0x36, 0x00, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, - 0x05, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, - 0x64, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0x00, 0x04, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, - 0x64, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0x00, 0x04, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00 -}; - -static void translate( POINT *pt, UINT count, const XFORM *xform ) -{ - while (count--) - { - FLOAT x = (FLOAT)pt->x; - FLOAT y = (FLOAT)pt->y; - pt->x = (LONG)floor( x * xform->eM11 + y * xform->eM21 + xform->eDx + 0.5 ); - pt->y = (LONG)floor( x * xform->eM12 + y * xform->eM22 + xform->eDy + 0.5 ); - pt++; - } -} - -/* Compare rectangles allowing rounding errors */ -static BOOL is_equal_rect(const RECT *rc1, const RECT *rc2) -{ - return abs(rc1->left - rc2->left) <= 1 && - abs(rc1->top - rc2->top) <= 1 && - abs(rc1->right - rc2->right) <= 1 && - abs(rc1->bottom - rc2->bottom) <= 1; -} - -static int CALLBACK clip_emf_enum_proc(HDC hdc, HANDLETABLE *handle_table, - const ENHMETARECORD *emr, int n_objs, LPARAM param) -{ - if (emr->iType == EMR_EXTSELECTCLIPRGN) - { - const EMREXTSELECTCLIPRGN *clip = (const EMREXTSELECTCLIPRGN *)emr; - union _rgn - { - RGNDATA data; - char buf[sizeof(RGNDATAHEADER) + sizeof(RECT)]; - }; - const union _rgn *rgn1; - union _rgn rgn2; - RECT rect, rc_transformed; - const RECT *rc = (const RECT *)param; - HRGN hrgn; - XFORM xform; - INT ret; - BOOL is_win9x; - - trace("EMR_EXTSELECTCLIPRGN: cbRgnData %#x, iMode %u\n", - clip->cbRgnData, clip->iMode); - - ok(clip->iMode == RGN_COPY, "expected RGN_COPY, got %u\n", clip->iMode); - ok(clip->cbRgnData >= sizeof(RGNDATAHEADER) + sizeof(RECT), - "too small data block: %u bytes\n", clip->cbRgnData); - if (clip->cbRgnData < sizeof(RGNDATAHEADER) + sizeof(RECT)) - return 0; - - rgn1 = (const union _rgn *)clip->RgnData; - - trace("size %u, type %u, count %u, rgn size %u, bound (%d,%d-%d,%d)\n", - rgn1->data.rdh.dwSize, rgn1->data.rdh.iType, - rgn1->data.rdh.nCount, rgn1->data.rdh.nRgnSize, - rgn1->data.rdh.rcBound.left, rgn1->data.rdh.rcBound.top, - rgn1->data.rdh.rcBound.right, rgn1->data.rdh.rcBound.bottom); - - ok(EqualRect(&rgn1->data.rdh.rcBound, rc), "rects don't match\n"); - - rect = *(const RECT *)rgn1->data.Buffer; - trace("rect (%d,%d-%d,%d)\n", rect.left, rect.top, rect.right, rect.bottom); - ok(EqualRect(&rect, rc), "rects don't match\n"); - - ok(rgn1->data.rdh.dwSize == sizeof(rgn1->data.rdh), "expected sizeof(rdh), got %u\n", rgn1->data.rdh.dwSize); - ok(rgn1->data.rdh.iType == RDH_RECTANGLES, "expected RDH_RECTANGLES, got %u\n", rgn1->data.rdh.iType); - ok(rgn1->data.rdh.nCount == 1, "expected 1, got %u\n", rgn1->data.rdh.nCount); - ok(rgn1->data.rdh.nRgnSize == sizeof(RECT) || - broken(rgn1->data.rdh.nRgnSize == 168), /* NT4 */ - "expected sizeof(RECT), got %u\n", rgn1->data.rdh.nRgnSize); - - hrgn = CreateRectRgn(0, 0, 0, 0); - - memset(&xform, 0, sizeof(xform)); - SetLastError(0xdeadbeef); - ret = GetWorldTransform(hdc, &xform); - is_win9x = !ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED; - if (!is_win9x) - ok(ret, "GetWorldTransform error %u\n", GetLastError()); - - trace("xform.eM11 %f, xform.eM22 %f\n", xform.eM11, xform.eM22); - - ret = GetClipRgn(hdc, hrgn); - ok(ret == 0, "GetClipRgn returned %d, expected 0\n", ret); - - PlayEnhMetaFileRecord(hdc, handle_table, emr, n_objs); - - ret = GetClipRgn(hdc, hrgn); - ok(ret == 1, "GetClipRgn returned %d, expected 1\n", ret); - - /* Win9x returns empty clipping region */ - if (is_win9x) return 1; - - ret = GetRegionData(hrgn, 0, NULL); - ok(ret == sizeof(rgn2.data.rdh) + sizeof(RECT), "expected sizeof(rgn), got %u\n", ret); - - ret = GetRegionData(hrgn, sizeof(rgn2), &rgn2.data); - ok(ret == sizeof(rgn2), "expected sizeof(rgn2), got %u\n", ret); - - trace("size %u, type %u, count %u, rgn size %u, bound (%d,%d-%d,%d)\n", - rgn2.data.rdh.dwSize, rgn2.data.rdh.iType, - rgn2.data.rdh.nCount, rgn2.data.rdh.nRgnSize, - rgn2.data.rdh.rcBound.left, rgn2.data.rdh.rcBound.top, - rgn2.data.rdh.rcBound.right, rgn2.data.rdh.rcBound.bottom); - - rect = rgn2.data.rdh.rcBound; - rc_transformed = *rc; - translate((POINT *)&rc_transformed, 2, &xform); - trace("transformed (%d,%d-%d,%d)\n", rc_transformed.left, rc_transformed.top, - rc_transformed.right, rc_transformed.bottom); - ok(is_equal_rect(&rect, &rc_transformed), "rects don't match\n"); - - rect = *(const RECT *)rgn2.data.Buffer; - trace("rect (%d,%d-%d,%d)\n", rect.left, rect.top, rect.right, rect.bottom); - rc_transformed = *rc; - translate((POINT *)&rc_transformed, 2, &xform); - trace("transformed (%d,%d-%d,%d)\n", rc_transformed.left, rc_transformed.top, - rc_transformed.right, rc_transformed.bottom); - ok(is_equal_rect(&rect, &rc_transformed), "rects don't match\n"); - - ok(rgn2.data.rdh.dwSize == sizeof(rgn1->data.rdh), "expected sizeof(rdh), got %u\n", rgn2.data.rdh.dwSize); - ok(rgn2.data.rdh.iType == RDH_RECTANGLES, "expected RDH_RECTANGLES, got %u\n", rgn2.data.rdh.iType); - ok(rgn2.data.rdh.nCount == 1, "expected 1, got %u\n", rgn2.data.rdh.nCount); - ok(rgn2.data.rdh.nRgnSize == sizeof(RECT) || - broken(rgn2.data.rdh.nRgnSize == 168), /* NT4 */ - "expected sizeof(RECT), got %u\n", rgn2.data.rdh.nRgnSize); - - DeleteObject(hrgn); - } - return 1; -} - -static void test_emf_clipping(void) -{ - static const RECT rc = { 0, 0, 100, 100 }; - RECT rc_clip = { 100, 100, 1024, 1024 }; - HWND hwnd; - HDC hdc; - HENHMETAFILE hemf; - HRGN hrgn; - INT ret; - RECT rc_res, rc_sclip; - - SetLastError(0xdeadbeef); - hdc = CreateEnhMetaFileA(0, NULL, NULL, NULL); - ok(hdc != 0, "CreateEnhMetaFileA error %d\n", GetLastError()); - - /* Need to write something to the emf, otherwise Windows won't play it back */ - LineTo(hdc, 1, 1); - - hrgn = CreateRectRgn(rc_clip.left, rc_clip.top, rc_clip.right, rc_clip.bottom); - ret = SelectClipRgn(hdc, hrgn); - ok(ret == SIMPLEREGION, "expected SIMPLEREGION, got %d\n", ret); - - SetLastError(0xdeadbeef); - hemf = CloseEnhMetaFile(hdc); - ok(hemf != 0, "CloseEnhMetaFile error %d\n", GetLastError()); - - if (compare_emf_bits(hemf, EMF_CLIPPING, sizeof(EMF_CLIPPING), - "emf_clipping", FALSE) != 0) - { - dump_emf_bits(hemf, "emf_clipping"); - dump_emf_records(hemf, "emf_clipping"); - } - - DeleteObject(hrgn); - - /* Win9x doesn't play EMFs on invisible windows */ - hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP | WS_VISIBLE, - 0, 0, 200, 200, 0, 0, 0, NULL); - ok(hwnd != 0, "CreateWindowExA error %d\n", GetLastError()); - - hdc = GetDC(hwnd); - - ret = EnumEnhMetaFile(hdc, hemf, clip_emf_enum_proc, &rc_clip, &rc); - ok(ret, "EnumEnhMetaFile error %d\n", GetLastError()); - - DeleteEnhMetaFile(hemf); - ReleaseDC(hwnd, hdc); - DestroyWindow(hwnd); - - hdc = CreateEnhMetaFileA(0, NULL, NULL, NULL); - - SetRect(&rc_sclip, 100, 100, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)); - hrgn = CreateRectRgn(rc_sclip.left, rc_sclip.top, rc_sclip.right, rc_sclip.bottom); - SelectClipRgn(hdc, hrgn); - ret = GetClipBox(hdc, &rc_res); -todo_wine - ok(ret == SIMPLEREGION, "got %d\n", ret); - if(ret == SIMPLEREGION) - ok(EqualRect(&rc_res, &rc_sclip), - "expected rc_res (%d, %d) - (%d, %d), got (%d, %d) - (%d, %d)\n", - rc_sclip.left, rc_sclip.top, rc_sclip.right, rc_sclip.bottom, - rc_res.left, rc_res.top, rc_res.right, rc_res.bottom); - - hemf = CloseEnhMetaFile(hdc); - DeleteEnhMetaFile(hemf); - DeleteObject(hrgn); - DeleteDC(hdc); -} - -static INT CALLBACK EmfEnumProc(HDC hdc, HANDLETABLE *lpHTable, const ENHMETARECORD *lpEMFR, INT nObj, LPARAM lpData) -{ - LPMETAFILEPICT lpMFP = (LPMETAFILEPICT)lpData; - POINT mapping[2] = { { 0, 0 }, { 10, 10 } }; - /* When using MM_TEXT Win9x does not update the mapping mode - * until a record is played which actually outputs something */ - PlayEnhMetaFileRecord(hdc, lpHTable, lpEMFR, nObj); - LPtoDP(hdc, mapping, 2); - trace("EMF record: iType %d, nSize %d, (%d,%d)-(%d,%d)\n", - lpEMFR->iType, lpEMFR->nSize, - mapping[0].x, mapping[0].y, mapping[1].x, mapping[1].y); - - if (lpEMFR->iType == EMR_LINETO) - { - INT x0, y0, x1, y1; - if (!lpMFP || lpMFP->mm == MM_TEXT) - { - x0 = 0; - y0 = 0; - x1 = (INT)floor(10 * 100.0 / LINE_X + 0.5); - y1 = (INT)floor(10 * 100.0 / LINE_Y + 0.5); - } - else - { - ok(lpMFP->mm == MM_ANISOTROPIC, "mm=%d\n", lpMFP->mm); - - x0 = MulDiv(0, GetDeviceCaps(hdc, HORZSIZE) * 100, GetDeviceCaps(hdc, HORZRES)); - y0 = MulDiv(0, GetDeviceCaps(hdc, VERTSIZE) * 100, GetDeviceCaps(hdc, VERTRES)); - x1 = MulDiv(10, GetDeviceCaps(hdc, HORZSIZE) * 100, GetDeviceCaps(hdc, HORZRES)); - y1 = MulDiv(10, GetDeviceCaps(hdc, VERTSIZE) * 100, GetDeviceCaps(hdc, VERTRES)); - } - ok(mapping[0].x == x0 && mapping[0].y == y0 && mapping[1].x == x1 && mapping[1].y == y1, - "(%d,%d)->(%d,%d), expected (%d,%d)->(%d,%d)\n", - mapping[0].x, mapping[0].y, mapping[1].x, mapping[1].y, - x0, y0, x1, y1); - } - return TRUE; -} - -static HENHMETAFILE create_converted_emf(const METAFILEPICT *mfp) -{ - HDC hdcMf; - HMETAFILE hmf; - HENHMETAFILE hemf; - BOOL ret; - UINT size; - LPBYTE pBits; - - hdcMf = CreateMetaFile(NULL); - ok(hdcMf != NULL, "CreateMetaFile failed with error %d\n", GetLastError()); - ret = LineTo(hdcMf, (INT)LINE_X, (INT)LINE_Y); - ok(ret, "LineTo failed with error %d\n", GetLastError()); - hmf = CloseMetaFile(hdcMf); - ok(hmf != NULL, "CloseMetaFile failed with error %d\n", GetLastError()); - - if (compare_mf_bits (hmf, MF_LINETO_BITS, sizeof(MF_LINETO_BITS), "mf_LineTo") != 0) - { - dump_mf_bits(hmf, "mf_LineTo"); - EnumMetaFile(0, hmf, mf_enum_proc, 0); - } - - size = GetMetaFileBitsEx(hmf, 0, NULL); - ok(size, "GetMetaFileBitsEx failed with error %d\n", GetLastError()); - pBits = HeapAlloc(GetProcessHeap(), 0, size); - GetMetaFileBitsEx(hmf, size, pBits); - DeleteMetaFile(hmf); - hemf = SetWinMetaFileBits(size, pBits, NULL, mfp); - HeapFree(GetProcessHeap(), 0, pBits); - return hemf; -} - -static void test_mf_conversions(void) -{ - trace("Testing MF->EMF conversion (MM_ANISOTROPIC)\n"); - { - HDC hdcOffscreen = CreateCompatibleDC(NULL); - HENHMETAFILE hemf; - METAFILEPICT mfp; - RECT rect = { 0, 0, 100, 100 }; - mfp.mm = MM_ANISOTROPIC; - mfp.xExt = 100; - mfp.yExt = 100; - mfp.hMF = NULL; - hemf = create_converted_emf(&mfp); - - if (compare_emf_bits(hemf, EMF_LINETO_MM_ANISOTROPIC_BITS, sizeof(EMF_LINETO_MM_ANISOTROPIC_BITS), - "emf_LineTo MM_ANISOTROPIC", TRUE) != 0) - { - dump_emf_bits(hemf, "emf_LineTo MM_ANISOTROPIC"); - dump_emf_records(hemf, "emf_LineTo MM_ANISOTROPIC"); - } - - EnumEnhMetaFile(hdcOffscreen, hemf, EmfEnumProc, &mfp, &rect); - - DeleteEnhMetaFile(hemf); - DeleteDC(hdcOffscreen); - } - - trace("Testing MF->EMF conversion (MM_TEXT)\n"); - { - HDC hdcOffscreen = CreateCompatibleDC(NULL); - HENHMETAFILE hemf; - METAFILEPICT mfp; - RECT rect = { 0, 0, 100, 100 }; - mfp.mm = MM_TEXT; - mfp.xExt = 0; - mfp.yExt = 0; - mfp.hMF = NULL; - hemf = create_converted_emf(&mfp); - - if (compare_emf_bits(hemf, EMF_LINETO_MM_TEXT_BITS, sizeof(EMF_LINETO_MM_TEXT_BITS), - "emf_LineTo MM_TEXT", TRUE) != 0) - { - dump_emf_bits(hemf, "emf_LineTo MM_TEXT"); - dump_emf_records(hemf, "emf_LineTo MM_TEXT"); - } - - EnumEnhMetaFile(hdcOffscreen, hemf, EmfEnumProc, &mfp, &rect); - - DeleteEnhMetaFile(hemf); - DeleteDC(hdcOffscreen); - } - - trace("Testing MF->EMF conversion (NULL mfp)\n"); - { - HDC hdcOffscreen = CreateCompatibleDC(NULL); - HENHMETAFILE hemf; - RECT rect = { 0, 0, 100, 100 }; - hemf = create_converted_emf(NULL); - - if (compare_emf_bits(hemf, EMF_LINETO_BITS, sizeof(EMF_LINETO_BITS), - "emf_LineTo NULL", TRUE) != 0) - { - dump_emf_bits(hemf, "emf_LineTo NULL"); - dump_emf_records(hemf, "emf_LineTo NULL"); - } - - EnumEnhMetaFile(hdcOffscreen, hemf, EmfEnumProc, NULL, &rect); - - DeleteEnhMetaFile(hemf); - DeleteDC(hdcOffscreen); - } -} - -static BOOL getConvertedFrameAndBounds(UINT buffer_size, BYTE * buffer, BOOL mfpIsNull, - LONG mm, LONG xExt, LONG yExt, - RECTL * rclBounds, RECTL * rclFrame) -{ - METAFILEPICT mfp; - METAFILEPICT * mfpPtr = NULL; - HENHMETAFILE emf; - ENHMETAHEADER header; - UINT res; - - if (!mfpIsNull) - { - mfp.mm = mm; - mfp.xExt = xExt; - mfp.yExt = yExt; - mfpPtr = &mfp; - } - - emf = SetWinMetaFileBits(buffer_size, buffer, NULL, mfpPtr); - ok(emf != NULL, "SetWinMetaFileBits failed\n"); - if (!emf) return FALSE; - res = GetEnhMetaFileHeader(emf, sizeof(header), &header); - ok(res != 0, "GetEnhMetaHeader failed\n"); - DeleteEnhMetaFile(emf); - if (!res) return FALSE; - - *rclBounds = header.rclBounds; - *rclFrame = header.rclFrame; - return TRUE; -} - -static void checkConvertedFrameAndBounds(UINT buffer_size, BYTE * buffer, BOOL mfpIsNull, - LONG mm, LONG xExt, LONG yExt, - RECTL * rclBoundsExpected, RECTL * rclFrameExpected) -{ - RECTL rclBounds, rclFrame; - - if (getConvertedFrameAndBounds(buffer_size, buffer, mfpIsNull, mm, xExt, yExt, &rclBounds, &rclFrame)) - { - const char * msg; - char buf[64]; - - if (mfpIsNull) - { - msg = "mfp == NULL"; - } - else - { - const char * mm_str; - switch (mm) - { - case MM_ANISOTROPIC: mm_str = "MM_ANISOTROPIC"; break; - case MM_ISOTROPIC: mm_str = "MM_ISOTROPIC"; break; - default: mm_str = "Unexpected"; - } - sprintf(buf, "mm=%s, xExt=%d, yExt=%d", mm_str, xExt, yExt); - msg = buf; - } - - ok(rclBounds.left == rclBoundsExpected->left, "rclBounds.left: Expected %d, got %d (%s)\n", rclBoundsExpected->left, rclBounds.left, msg); - ok(rclBounds.top == rclBoundsExpected->top, "rclBounds.top: Expected %d, got %d (%s)\n", rclBoundsExpected->top, rclBounds.top, msg); - ok(rclBounds.right == rclBoundsExpected->right, "rclBounds.right: Expected %d, got %d (%s)\n", rclBoundsExpected->right, rclBounds.right, msg); - ok(rclBounds.bottom == rclBoundsExpected->bottom, "rclBounds.bottom: Expected %d, got %d (%s)\n", rclBoundsExpected->bottom, rclBounds.bottom, msg); - ok(rclFrame.left == rclFrameExpected->left, "rclFrame.left: Expected %d, got %d (%s)\n", rclFrameExpected->left, rclFrame.left, msg); - ok(rclFrame.top == rclFrameExpected->top, "rclFrame.top: Expected %d, got %d (%s)\n", rclFrameExpected->top, rclFrame.top, msg); - ok(rclFrame.right == rclFrameExpected->right, "rclFrame.right: Expected %d, got %d (%s)\n", rclFrameExpected->right, rclFrame.right, msg); - ok(rclFrame.bottom == rclFrameExpected->bottom, "rclFrame.bottom: Expected %d, got %d (%s)\n", rclFrameExpected->bottom, rclFrame.bottom, msg); - } -} - -static void test_SetWinMetaFileBits(void) -{ - HMETAFILE wmf; - HDC wmfDC; - BYTE * buffer; - UINT buffer_size; - RECT rect; - UINT res; - RECTL rclBoundsAnisotropic, rclFrameAnisotropic; - RECTL rclBoundsIsotropic, rclFrameIsotropic; - RECTL rclBounds, rclFrame; - HDC dc; - LONG diffx, diffy; - - wmfDC = CreateMetaFile(NULL); - ok(wmfDC != NULL, "CreateMetaFile failed\n"); - if (!wmfDC) return; - - SetWindowExtEx(wmfDC, 100, 100, NULL); - rect.left = rect.top = 0; - rect.right = rect.bottom = 50; - FillRect(wmfDC, &rect, GetStockObject(BLACK_BRUSH)); - wmf = CloseMetaFile(wmfDC); - ok(wmf != NULL, "Metafile creation failed\n"); - if (!wmf) return; - - buffer_size = GetMetaFileBitsEx(wmf, 0, NULL); - ok(buffer_size != 0, "GetMetaFileBitsEx failed\n"); - if (buffer_size == 0) - { - DeleteMetaFile(wmf); - return; - } - - buffer = HeapAlloc(GetProcessHeap(), 0, buffer_size); - ok(buffer != NULL, "HeapAlloc failed\n"); - if (!buffer) - { - DeleteMetaFile(wmf); - return; - } - - res = GetMetaFileBitsEx(wmf, buffer_size, buffer); - ok(res == buffer_size, "GetMetaFileBitsEx failed\n"); - DeleteMetaFile(wmf); - if (res != buffer_size) - { - HeapFree(GetProcessHeap(), 0, buffer); - return; - } - - /* Get the reference bounds and frame */ - getConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ANISOTROPIC, 0, 0, &rclBoundsAnisotropic, &rclFrameAnisotropic); - getConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ISOTROPIC, 0, 0, &rclBoundsIsotropic, &rclFrameIsotropic); - - ok(rclBoundsAnisotropic.left == 0 && rclBoundsAnisotropic.top == 0 && - rclBoundsIsotropic.left == 0 && rclBoundsIsotropic.top == 0, - "SetWinMetaFileBits: Reference bounds: Left and top bound must be zero\n"); - - ok(rclBoundsAnisotropic.right >= rclBoundsIsotropic.right, "SetWinMetaFileBits: Reference bounds: Invalid right bound\n"); - ok(rclBoundsAnisotropic.bottom >= rclBoundsIsotropic.bottom, "SetWinMetaFileBits: Reference bounds: Invalid bottom bound\n"); - diffx = rclBoundsIsotropic.right - rclBoundsIsotropic.bottom; - if (diffx < 0) diffx = -diffx; - ok(diffx <= 1, "SetWinMetaFileBits (MM_ISOTROPIC): Reference bounds are not isotropic\n"); - - dc = CreateCompatibleDC(NULL); - - /* Allow 1 mm difference (rounding errors) */ - diffx = rclBoundsAnisotropic.right - GetDeviceCaps(dc, HORZRES) / 2; - diffy = rclBoundsAnisotropic.bottom - GetDeviceCaps(dc, VERTRES) / 2; - if (diffx < 0) diffx = -diffx; - if (diffy < 0) diffy = -diffy; - todo_wine - { - ok(diffx <= 1 && diffy <= 1, - "SetWinMetaFileBits (MM_ANISOTROPIC): Reference bounds: The whole device surface must be used (%dx%d), but got (%dx%d)\n", - GetDeviceCaps(dc, HORZRES) / 2, GetDeviceCaps(dc, VERTRES) / 2, rclBoundsAnisotropic.right, rclBoundsAnisotropic.bottom); - } - - /* Allow 1 mm difference (rounding errors) */ - diffx = rclFrameAnisotropic.right / 100 - GetDeviceCaps(dc, HORZSIZE) / 2; - diffy = rclFrameAnisotropic.bottom / 100 - GetDeviceCaps(dc, VERTSIZE) / 2; - if (diffx < 0) diffx = -diffx; - if (diffy < 0) diffy = -diffy; - todo_wine - { - ok(diffx <= 1 && diffy <= 1, - "SetWinMetaFileBits (MM_ANISOTROPIC): Reference frame: The whole device surface must be used (%dx%d), but got (%dx%d)\n", - GetDeviceCaps(dc, HORZSIZE) / 2, GetDeviceCaps(dc, VERTSIZE) / 2, rclFrameAnisotropic.right / 100, rclFrameAnisotropic.bottom / 100); - } - DeleteDC(dc); - - /* If the METAFILEPICT pointer is NULL, the MM_ANISOTROPIC mapping mode and the whole device surface are used */ - checkConvertedFrameAndBounds(buffer_size, buffer, TRUE, 0, 0, 0, &rclBoundsAnisotropic, &rclFrameAnisotropic); - - /* If xExt or yExt is zero or negative, the whole device surface is used */ - checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ANISOTROPIC, 10000, 0, &rclBoundsAnisotropic, &rclFrameAnisotropic); - checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ISOTROPIC, 10000, 0, &rclBoundsIsotropic, &rclFrameIsotropic); - checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ANISOTROPIC, 0, 10000, &rclBoundsAnisotropic, &rclFrameAnisotropic); - checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ISOTROPIC, 0, 10000, &rclBoundsIsotropic, &rclFrameIsotropic); - checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ANISOTROPIC, -10000, 0, &rclBoundsAnisotropic, &rclFrameAnisotropic); - checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ISOTROPIC, -10000, 0, &rclBoundsIsotropic, &rclFrameIsotropic); - checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ANISOTROPIC, 0, -10000, &rclBoundsAnisotropic, &rclFrameAnisotropic); - checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ISOTROPIC, 0, -10000, &rclBoundsIsotropic, &rclFrameIsotropic); - checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ANISOTROPIC, -10000, 10000, &rclBoundsAnisotropic, &rclFrameAnisotropic); - checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ISOTROPIC, -10000, 10000, &rclBoundsIsotropic, &rclFrameIsotropic); - checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ANISOTROPIC, 10000, -10000, &rclBoundsAnisotropic, &rclFrameAnisotropic); - checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ISOTROPIC, 10000, -10000, &rclBoundsIsotropic, &rclFrameIsotropic); - - /* MSDN says that negative xExt and yExt values specify a ratio. - Check that this is wrong and the whole device surface is used */ - checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ANISOTROPIC, -1000, -100, &rclBoundsAnisotropic, &rclFrameAnisotropic); - checkConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ISOTROPIC, -1000, -100, &rclBoundsIsotropic, &rclFrameIsotropic); - - /* Ordinary conversions */ - - if (getConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ANISOTROPIC, 30000, 20000, &rclBounds, &rclFrame)) - { - ok(rclFrame.left == 0 && rclFrame.top == 0 && rclFrame.right == 30000 && rclFrame.bottom == 20000, - "SetWinMetaFileBits (MM_ANISOTROPIC): rclFrame contains invalid values\n"); - ok(rclBounds.left == 0 && rclBounds.top == 0 && rclBounds.right > rclBounds.bottom, - "SetWinMetaFileBits (MM_ANISOTROPIC): rclBounds contains invalid values\n"); - } - - if (getConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_ISOTROPIC, 30000, 20000, &rclBounds, &rclFrame)) - { - ok(rclFrame.left == 0 && rclFrame.top == 0 && rclFrame.right == 30000 && rclFrame.bottom == 20000, - "SetWinMetaFileBits (MM_ISOTROPIC): rclFrame contains invalid values\n"); - ok(rclBounds.left == 0 && rclBounds.top == 0, - "SetWinMetaFileBits (MM_ISOTROPIC): rclBounds contains invalid values\n"); - - /* Wine has a rounding error */ - diffx = rclBounds.right - rclBounds.bottom; - if (diffx < 0) diffx = -diffx; - ok(diffx <= 1, "SetWinMetaFileBits (MM_ISOTROPIC): rclBounds is not isotropic\n"); - } - - if (getConvertedFrameAndBounds(buffer_size, buffer, FALSE, MM_HIMETRIC, 30000, 20000, &rclBounds, &rclFrame)) - { - ok(rclFrame.right - rclFrame.left != 30000 && rclFrame.bottom - rclFrame.top != 20000, - "SetWinMetaFileBits: xExt and yExt must be ignored for mapping modes other than MM_ANISOTROPIC and MM_ISOTROPIC\n"); - } - - HeapFree(GetProcessHeap(), 0, buffer); -} - -static BOOL near_match(int x, int y) -{ - int epsilon = min(abs(x), abs(y)); - - epsilon = max(epsilon/100, 2); - - if(x < y - epsilon || x > y + epsilon) return FALSE; - return TRUE; -} - -static void getwinmetafilebits(UINT mode, int scale, RECT *rc) -{ - HENHMETAFILE emf; - HDC display_dc, emf_dc; - ENHMETAHEADER *enh_header; - UINT size, emf_size, i; - WORD check = 0; - DWORD rec_num = 0; - METAHEADER *mh = NULL; - METARECORD *rec; - INT horz_res, vert_res, horz_size, vert_size; - INT curve_caps, line_caps, poly_caps; - - display_dc = GetDC(NULL); - ok(display_dc != NULL, "display_dc is NULL\n"); - - horz_res = GetDeviceCaps(display_dc, HORZRES); - vert_res = GetDeviceCaps(display_dc, VERTRES); - horz_size = GetDeviceCaps(display_dc, HORZSIZE); - vert_size = GetDeviceCaps(display_dc, VERTSIZE); - - emf_dc = CreateEnhMetaFileA(display_dc, NULL, rc, NULL); - ok(emf_dc != NULL, "emf_dc is NULL\n"); - - curve_caps = GetDeviceCaps(emf_dc, CURVECAPS); - ok(curve_caps == 511, "expect 511 got %d\n", curve_caps); - - line_caps = GetDeviceCaps(emf_dc, LINECAPS); - ok(line_caps == 254, "expect 254 got %d\n", line_caps); - - poly_caps = GetDeviceCaps(emf_dc, POLYGONALCAPS); - ok(poly_caps == 255, "expect 511 got %d\n", poly_caps); - - for(i = 0; i < 3000; i++) /* This is enough to take emf_size > 0xffff */ - Rectangle(emf_dc, 0, 0, 1000, 20); - emf = CloseEnhMetaFile(emf_dc); - ok(emf != NULL, "emf is NULL\n"); - - emf_size = GetEnhMetaFileBits(emf, 0, NULL); - enh_header = HeapAlloc(GetProcessHeap(), 0, emf_size); - emf_size = GetEnhMetaFileBits(emf, emf_size, (BYTE*)enh_header); - DeleteEnhMetaFile(emf); - /* multiply szlDevice.cx by scale, when scale != 1 the recording and playback dcs - have different resolutions */ - enh_header->szlDevice.cx *= scale; - emf = SetEnhMetaFileBits(emf_size, (BYTE*)enh_header); - ok(emf != NULL, "emf is NULL\n"); - ok(EqualRect((RECT*)&enh_header->rclFrame, rc), "Frame rectangles differ\n"); - - size = GetWinMetaFileBits(emf, 0, NULL, mode, display_dc); - ok(size || - broken(size == 0), /* some versions of winxp fail for some reason */ - "GetWinMetaFileBits returns 0\n"); - if(!size) goto end; - mh = HeapAlloc(GetProcessHeap(), 0, size); - GetWinMetaFileBits(emf, size, (BYTE*)mh, mode, display_dc); - - for(i = 0; i < size / 2; i++) check += ((WORD*)mh)[i]; - ok(check == 0, "check %04x\n", check); - - rec = (METARECORD*)(mh + 1); - - while(rec->rdSize && rec->rdFunction) - { - const DWORD chunk_size = 0x2000; - DWORD mfcomment_chunks = (emf_size + chunk_size - 1) / chunk_size; - - if(rec_num < mfcomment_chunks) - { - DWORD this_chunk_size = chunk_size; - - if(rec_num == mfcomment_chunks - 1) - this_chunk_size = emf_size - rec_num * chunk_size; - - ok(rec->rdSize == (this_chunk_size + 44) / 2, "%04x: got %04x expected %04x\n", rec_num, rec->rdSize, (this_chunk_size + 44) / 2); - ok(rec->rdFunction == META_ESCAPE, "%04x: got %04x\n", rec_num, rec->rdFunction); - if(rec->rdSize < (this_chunk_size + 44) / 2) break; - ok(rec->rdParm[0] == MFCOMMENT, "got %04x\n", rec->rdParm[0]); - ok(rec->rdParm[1] == this_chunk_size + 34, "got %04x %x\n", rec->rdParm[1], emf_size + 34); - ok(rec->rdParm[2] == 0x4d57, "got %04x\n", rec->rdParm[2]); /* WMFC */ - ok(rec->rdParm[3] == 0x4346, "got %04x\n", rec->rdParm[3]); /* " */ - ok(rec->rdParm[4] == 1, "got %04x\n", rec->rdParm[4]); - ok(rec->rdParm[5] == 0, "got %04x\n", rec->rdParm[5]); - ok(rec->rdParm[6] == 0, "got %04x\n", rec->rdParm[6]); - ok(rec->rdParm[7] == 1, "got %04x\n", rec->rdParm[7]); - /* parm[8] is the checksum, tested above */ - if(rec_num > 0) ok(rec->rdParm[8] == 0, "got %04x\n", rec->rdParm[8]); - ok(rec->rdParm[9] == 0, "got %04x\n", rec->rdParm[9]); - ok(rec->rdParm[10] == 0, "got %04x\n", rec->rdParm[10]); - ok(rec->rdParm[11] == mfcomment_chunks, "got %04x\n", rec->rdParm[11]); /* num chunks */ - ok(rec->rdParm[12] == 0, "got %04x\n", rec->rdParm[12]); - ok(rec->rdParm[13] == this_chunk_size, "got %04x expected %04x\n", rec->rdParm[13], this_chunk_size); - ok(rec->rdParm[14] == 0, "got %04x\n", rec->rdParm[14]); - ok(*(DWORD*)(rec->rdParm + 15) == emf_size - this_chunk_size - rec_num * chunk_size, "got %08x\n", *(DWORD*)(rec->rdParm + 15)); /* DWORD size remaining after current chunk */ - ok(*(DWORD*)(rec->rdParm + 17) == emf_size, "got %08x emf_size %08x\n", *(DWORD*)(rec->rdParm + 17), emf_size); - ok(!memcmp(rec->rdParm + 19, (char*)enh_header + rec_num * chunk_size, this_chunk_size), "bits mismatch\n"); - } - - else if(rec_num == mfcomment_chunks) - { - ok(rec->rdFunction == META_SETMAPMODE, "got %04x\n", rec->rdFunction); - ok(rec->rdParm[0] == mode, "got %04x\n", rec->rdParm[0]); - } - else if(rec_num == mfcomment_chunks + 1) - { - POINT pt; - ok(rec->rdFunction == META_SETWINDOWORG, "got %04x\n", rec->rdFunction); - switch(mode) - { - case MM_TEXT: - case MM_ISOTROPIC: - case MM_ANISOTROPIC: - pt.y = MulDiv(rc->top, vert_res, vert_size * 100) + 1; - pt.x = MulDiv(rc->left, horz_res, horz_size * 100); - break; - case MM_LOMETRIC: - pt.y = MulDiv(-rc->top, 1, 10) + 1; - pt.x = MulDiv( rc->left, 1, 10); - break; - case MM_HIMETRIC: - pt.y = -rc->top + 1; - pt.x = (rc->left >= 0) ? rc->left : rc->left + 1; /* strange but true */ - break; - case MM_LOENGLISH: - pt.y = MulDiv(-rc->top, 10, 254) + 1; - pt.x = MulDiv( rc->left, 10, 254); - break; - case MM_HIENGLISH: - pt.y = MulDiv(-rc->top, 100, 254) + 1; - pt.x = MulDiv( rc->left, 100, 254); - break; - case MM_TWIPS: - pt.y = MulDiv(-rc->top, 72 * 20, 2540) + 1; - pt.x = MulDiv( rc->left, 72 * 20, 2540); - break; - default: - pt.x = pt.y = 0; - } - ok(near_match((short)rec->rdParm[0], pt.y), "got %d expect %d\n", (short)rec->rdParm[0], pt.y); - ok(near_match((short)rec->rdParm[1], pt.x), "got %d expect %d\n", (short)rec->rdParm[1], pt.x); - } - if(rec_num == mfcomment_chunks + 2) - { - ok(rec->rdFunction == META_SETWINDOWEXT, "got %04x\n", rec->rdFunction); - ok(near_match((short)rec->rdParm[0], MulDiv(rc->bottom - rc->top, vert_res, vert_size * 100)), - "got %d\n", (short)rec->rdParm[0]); - ok(near_match((short)rec->rdParm[1], MulDiv(rc->right - rc->left, horz_res, horz_size * 100)), - "got %d\n", (short)rec->rdParm[1]); - } - - rec_num++; - rec = (METARECORD*)((WORD*)rec + rec->rdSize); - } - -end: - HeapFree(GetProcessHeap(), 0, mh); - HeapFree(GetProcessHeap(), 0, enh_header); - DeleteEnhMetaFile(emf); - - ReleaseDC(NULL, display_dc); -} - -static void test_GetWinMetaFileBits(void) -{ - UINT mode; - RECT frames[] = - { - { 1000, 2000, 3000, 6000}, - {-1000, 2000, 3000, 6000}, - { 1000, -2000, 3000, 6000}, - { 1005, 2005, 3000, 6000}, - {-1005, -2005, 3000, 6000}, - {-1005, -2010, 3000, 6000}, - {-1005, 2010, 3000, 6000}, - { 0, 0, 1, 1}, - { -1, -1, 1, 1}, - { 0, 0, 0, 0} - }; - - for(mode = MM_MIN; mode <= MM_MAX; mode++) - { - RECT *rc; - trace("mode %d\n", mode); - - for(rc = frames; rc->right - rc->left > 0; rc++) - { - trace("frame %d,%d - %d,%d\n", rc->left, rc->top, rc->right, rc->bottom); - getwinmetafilebits(mode, 1, rc); - getwinmetafilebits(mode, 2, rc); - } - } -} - -static BOOL (WINAPI *pGdiIsMetaPrintDC)(HDC); -static BOOL (WINAPI *pGdiIsMetaFileDC)(HDC); -static BOOL (WINAPI *pGdiIsPlayMetafileDC)(HDC); - -static void test_gdiis(void) -{ - RECT rect = {0,0,100,100}; - HDC hdc, hemfDC, hmfDC; - HENHMETAFILE hemf; - HMODULE hgdi32; - - /* resolve all the functions */ - hgdi32 = GetModuleHandle("gdi32"); - pGdiIsMetaPrintDC = (void*) GetProcAddress(hgdi32, "GdiIsMetaPrintDC"); - pGdiIsMetaFileDC = (void*) GetProcAddress(hgdi32, "GdiIsMetaFileDC"); - pGdiIsPlayMetafileDC = (void*) GetProcAddress(hgdi32, "GdiIsPlayMetafileDC"); - - if(!pGdiIsMetaPrintDC || !pGdiIsMetaFileDC || !pGdiIsPlayMetafileDC) - { - win_skip("Needed GdiIs* functions are not available\n"); - return; - } - - /* try with nothing */ - ok(!pGdiIsMetaPrintDC(NULL), "ismetaprint with NULL parameter\n"); - ok(!pGdiIsMetaFileDC(NULL), "ismetafile with NULL parameter\n"); - ok(!pGdiIsPlayMetafileDC(NULL), "isplaymetafile with NULL parameter\n"); - - /* try with a metafile */ - hmfDC = CreateMetaFile(NULL); - ok(!pGdiIsMetaPrintDC(hmfDC), "ismetaprint on metafile\n"); - ok(pGdiIsMetaFileDC(hmfDC), "ismetafile on metafile\n"); - ok(!pGdiIsPlayMetafileDC(hmfDC), "isplaymetafile on metafile\n"); - DeleteMetaFile(CloseMetaFile(hmfDC)); - - /* try with an enhanced metafile */ - hdc = GetDC(NULL); - hemfDC = CreateEnhMetaFileW(hdc, NULL, &rect, NULL); - ok(hemfDC != NULL, "failed to create emf\n"); - - ok(!pGdiIsMetaPrintDC(hemfDC), "ismetaprint on emf\n"); - ok(pGdiIsMetaFileDC(hemfDC), "ismetafile on emf\n"); - ok(!pGdiIsPlayMetafileDC(hemfDC), "isplaymetafile on emf\n"); - - hemf = CloseEnhMetaFile(hemfDC); - ok(hemf != NULL, "failed to close EMF\n"); - DeleteEnhMetaFile(hemf); - ReleaseDC(NULL,hdc); -} - -static void test_SetEnhMetaFileBits(void) -{ - BYTE data[256]; - HENHMETAFILE hemf; - ENHMETAHEADER *emh; - - memset(data, 0xAA, sizeof(data)); - SetLastError(0xdeadbeef); - hemf = SetEnhMetaFileBits(sizeof(data), data); - ok(!hemf, "SetEnhMetaFileBits should fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA || - GetLastError() == ERROR_INVALID_PARAMETER, /* Win9x, WinMe */ - "expected ERROR_INVALID_DATA or ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); - - emh = (ENHMETAHEADER *)data; - memset(emh, 0, sizeof(*emh)); - - emh->iType = EMR_HEADER; - emh->nSize = sizeof(*emh); - emh->dSignature = ENHMETA_SIGNATURE; - /* emh->nVersion = 0x10000; XP doesn't care about version */ - emh->nBytes = sizeof(*emh); - /* emh->nRecords = 1; XP doesn't care about records */ - emh->nHandles = 1; /* XP refuses to load a EMF if nHandles == 0 */ - - SetLastError(0xdeadbeef); - hemf = SetEnhMetaFileBits(emh->nBytes, data); - ok(hemf != 0, "SetEnhMetaFileBits error %u\n", GetLastError()); - DeleteEnhMetaFile(hemf); - - /* XP refuses to load unaligned EMF */ - emh->nBytes++; - SetLastError(0xdeadbeef); - hemf = SetEnhMetaFileBits(emh->nBytes, data); - ok(!hemf || - broken(hemf != NULL), /* Win9x, WinMe */ - "SetEnhMetaFileBits should fail\n"); - ok(GetLastError() == 0xdeadbeef, "Expected deadbeef, got %u\n", GetLastError()); - DeleteEnhMetaFile(hemf); - - emh->dSignature = 0; - emh->nBytes--; - SetLastError(0xdeadbeef); - hemf = SetEnhMetaFileBits(emh->nBytes, data); - ok(!hemf || - broken(hemf != NULL), /* Win9x, WinMe */ - "SetEnhMetaFileBits should fail\n"); - ok(GetLastError() == 0xdeadbeef, "Expected deadbeef, got %u\n", GetLastError()); - DeleteEnhMetaFile(hemf); -} - -START_TEST(metafile) -{ - init_function_pointers(); - - /* For enhanced metafiles (enhmfdrv) */ - test_ExtTextOut(); - test_ExtTextOutScale(); - test_SaveDC(); - test_emf_BitBlt(); - test_emf_DCBrush(); - - /* For win-format metafiles (mfdrv) */ - test_mf_SaveDC(); - test_mf_Blank(); - test_mf_Graphics(); - test_mf_PatternBrush(); - test_mf_DCBrush(); - test_CopyMetaFile(); - test_SetMetaFileBits(); - test_mf_ExtTextOut_on_path(); - test_emf_ExtTextOut_on_path(); - test_emf_clipping(); - - /* For metafile conversions */ - test_mf_conversions(); - test_SetWinMetaFileBits(); - test_GetWinMetaFileBits(); - - test_gdiis(); - test_SetEnhMetaFileBits(); -} diff --git a/rostests/winetests/gdi32/palette.c b/rostests/winetests/gdi32/palette.c deleted file mode 100644 index 4ad1dd19bb8..00000000000 --- a/rostests/winetests/gdi32/palette.c +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Unit test suite for palettes - * - * Copyright 2005 Glenn Wurster - * - * 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 "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "mmsystem.h" - -#include "wine/test.h" - -static const PALETTEENTRY logpalettedata[8] = { - { 0x10, 0x20, 0x30, PC_NOCOLLAPSE }, - { 0x20, 0x30, 0x40, PC_NOCOLLAPSE }, - { 0x30, 0x40, 0x50, PC_NOCOLLAPSE }, - { 0x40, 0x50, 0x60, PC_NOCOLLAPSE }, - { 0x50, 0x60, 0x70, PC_NOCOLLAPSE }, - { 0x60, 0x70, 0x80, PC_NOCOLLAPSE }, - { 0x70, 0x80, 0x90, PC_NOCOLLAPSE }, - { 0x80, 0x90, 0xA0, PC_NOCOLLAPSE }, -}; - -static void test_DIB_PAL_COLORS(void) { - HDC hdc = GetDC( NULL ); - HDC memhdc = CreateCompatibleDC( hdc ); - HBITMAP hbmp, hbmpOld; - char bmpbuf[sizeof(BITMAPINFO) + 10 * sizeof(WORD)]; - PBITMAPINFO bmp = (PBITMAPINFO)bmpbuf; - WORD * bmpPalPtr; - char logpalettebuf[sizeof(LOGPALETTE) + sizeof(logpalettedata)]; - PLOGPALETTE logpalette = (PLOGPALETTE)logpalettebuf; - HPALETTE hpal, hpalOld; - COLORREF setColor, chkColor, getColor; - int i; - - /* Initialize the logical palette with a few colours */ - logpalette->palVersion = 0x300; - logpalette->palNumEntries = 8; - memcpy( logpalette->palPalEntry, logpalettedata, sizeof(logpalettedata) ); - hpal = CreatePalette( logpalette ); - hpalOld = SelectPalette( memhdc, hpal, FALSE ); - ok( hpalOld != NULL, "error=%d\n", GetLastError() ); - - /* Create a DIB BMP which references colours in the logical palette */ - memset( bmp, 0x00, sizeof(BITMAPINFO) ); - bmp->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bmp->bmiHeader.biWidth = 1; - bmp->bmiHeader.biHeight = 1; - bmp->bmiHeader.biPlanes = 1; - bmp->bmiHeader.biBitCount = 8; - bmp->bmiHeader.biCompression = BI_RGB; - bmp->bmiHeader.biClrUsed = 10; - bmp->bmiHeader.biClrImportant = 0; - bmpPalPtr = (WORD *)&bmp->bmiColors; - for( i = 0; i < 8; i++ ) { - *bmpPalPtr++ = i; - } - *bmpPalPtr++ = 8; /* Pointer to logical palette index just outside range */ - *bmpPalPtr++ = 19; /* Pointer to bad logical palette index */ - - hbmp = CreateDIBSection( memhdc, bmp, DIB_PAL_COLORS, 0, 0, 0 ); - ok( hbmp != NULL, "error=%d\n", GetLastError() ); - hbmpOld = SelectObject( memhdc, hbmp ); - ok( hbmpOld != NULL, "error=%d\n", GetLastError() ); - - /* Test with a RGB to DIB_PAL_COLORS */ - setColor = RGB( logpalettedata[1].peRed, logpalettedata[1].peGreen, logpalettedata[1].peBlue ); - SetPixel( memhdc, 0, 0, setColor ); - chkColor = RGB( logpalettedata[1].peRed, logpalettedata[1].peGreen, logpalettedata[1].peBlue ); - getColor = GetPixel( memhdc, 0, 0 ); - ok( getColor == chkColor, "getColor=%08X\n", (UINT)getColor ); - - /* Test with a valid DIBINDEX to DIB_PAL_COLORS */ - setColor = DIBINDEX( 2 ); - SetPixel( memhdc, 0, 0, setColor ); - chkColor = RGB( logpalettedata[2].peRed, logpalettedata[2].peGreen, logpalettedata[2].peBlue ); - getColor = GetPixel( memhdc, 0, 0 ); - ok( getColor == chkColor, "getColor=%08X\n", (UINT)getColor ); - - /* Test with a invalid DIBINDEX to DIB_PAL_COLORS */ - setColor = DIBINDEX( 12 ); - SetPixel( memhdc, 0, 0, setColor ); - chkColor = RGB( 0, 0, 0 ); - getColor = GetPixel( memhdc, 0, 0 ); - ok( getColor == chkColor, "getColor=%08X\n", (UINT)getColor ); - - /* Test for double wraparound on logical palette references from */ - /* DIBINDEX by DIB_PAL_COLORS. */ - setColor = DIBINDEX( 9 ); - SetPixel( memhdc, 0, 0, setColor ); - chkColor = RGB( logpalettedata[3].peRed, logpalettedata[3].peGreen, logpalettedata[3].peBlue ); - getColor = GetPixel( memhdc, 0, 0 ); - ok( getColor == chkColor, "getColor=%08X\n", (UINT)getColor ); - - SelectPalette( memhdc, hpalOld, FALSE ); - DeleteObject( hpal ); - SelectObject( memhdc, hbmpOld ); - DeleteObject( hbmp ); - DeleteDC( memhdc ); - ReleaseDC( NULL, hdc ); -} - -static void test_palette_entries(void) -{ - char logpalettebuf[sizeof(LOGPALETTE) + sizeof(logpalettedata)]; - PLOGPALETTE logpalette = (PLOGPALETTE)logpalettebuf; - HPALETTE hpal; - UINT res=0; - PALETTEENTRY palEntry = { 0x1, 0x2, 0x3, 0xff }; - PALETTEENTRY getEntryResult; - - /* Initialize the logical palette with a few colours */ - logpalette->palVersion = 0x300; - logpalette->palNumEntries = 8; - memcpy( logpalette->palPalEntry, logpalettedata, sizeof(logpalettedata) ); - hpal = CreatePalette( logpalette ); - - /* Set a new entry with peFlags to 0xff */ - SetPaletteEntries(hpal, 0, 1, &palEntry); - - /* Retrieve the entry to see if GDI32 performs any filtering on peFlags */ - res = GetPaletteEntries(hpal, 0, 1, &getEntryResult); - ok(res == 1, "GetPaletteEntries should have returned 1 but returned %d\n", res); - - ok( palEntry.peFlags == getEntryResult.peFlags, "palEntry.peFlags (%#x) != getEntryResult.peFlags (%#x)\n", palEntry.peFlags, getEntryResult.peFlags ); -} - -START_TEST(palette) -{ - test_DIB_PAL_COLORS(); - test_palette_entries(); -} diff --git a/rostests/winetests/gdi32/path.c b/rostests/winetests/gdi32/path.c deleted file mode 100644 index 18dffa36284..00000000000 --- a/rostests/winetests/gdi32/path.c +++ /dev/null @@ -1,513 +0,0 @@ -/* - * Unit test suite for paths - * - * Copyright 2007 Laurent Vromman - * Copyright 2007 Misha Koshelev - * - * 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 "windef.h" -#include "winbase.h" -#include "wingdi.h" - -#include "wine/test.h" - -#include "winuser.h" -#include "winerror.h" - -#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) - -static void test_widenpath(void) -{ - HDC hdc = GetDC(0); - HPEN greenPen, narrowPen; - POINT pnt[6]; - INT nSize, ret; - - /* Create a pen to be used in WidenPath */ - greenPen = CreatePen(PS_SOLID, 10, RGB(0,0,0)); - SelectObject(hdc, greenPen); - - /* Prepare a path */ - pnt[0].x = 100; - pnt[0].y = 0; - pnt[1].x = 200; - pnt[1].y = 0; - pnt[2].x = 300; - pnt[2].y = 100; - pnt[3].x = 300; - pnt[3].y = 200; - pnt[4].x = 200; - pnt[4].y = 300; - pnt[5].x = 100; - pnt[5].y = 300; - - /* Set a polyline path */ - BeginPath(hdc); - Polyline(hdc, pnt, 6); - EndPath(hdc); - - /* Widen the polyline path */ - ok(WidenPath(hdc), "WidenPath fails while widening a poyline path.\n"); - - /* Test if WidenPath seems to have done his job */ - nSize = GetPath(hdc, NULL, NULL, 0); - ok(nSize != -1, "GetPath fails after calling WidenPath.\n"); - ok(nSize > 6, "Path number of points is too low. Should be more than 6 but is %d\n", nSize); - - AbortPath(hdc); - - /* Test WidenPath with an open path (last error only set on Win2k and later) */ - SetLastError(0xdeadbeef); - BeginPath(hdc); - ret = WidenPath(hdc); - ok(ret == FALSE && (GetLastError() == ERROR_CAN_NOT_COMPLETE || GetLastError() == 0xdeadbeef), - "WidenPath fails while widening an open path. Return value is %d, should be %d. Error is %u\n", ret, FALSE, GetLastError()); - - AbortPath(hdc); - - /* Test when the pen width is equal to 1. The path should change too */ - narrowPen = CreatePen(PS_SOLID, 1, RGB(0,0,0)); - SelectObject(hdc, narrowPen); - BeginPath(hdc); - Polyline(hdc, pnt, 6); - EndPath(hdc); - ret = WidenPath(hdc); - ok(ret == TRUE, "WidenPath failed: %d\n", GetLastError()); - nSize = GetPath(hdc, NULL, NULL, 0); - ok(nSize > 6, "WidenPath should compute a widened path with a 1px wide pen. Path length is %d, should be more than 6\n", nSize); - - ReleaseDC(0, hdc); - return; -} - -/* - * Tests for GDI drawing functions in paths - */ - -typedef struct -{ - int x, y; - BYTE type; - - /* How many extra entries before this one only on wine - * but not on native? */ - int wine_only_entries_preceding; - - /* 0 - This entry matches on wine. - * 1 - This entry corresponds to a single entry on wine that does not match the native entry. - * 2 - This entry is currently skipped on wine but present on native. */ - int todo; -} path_test_t; - -/* Helper function to verify that the current path in the given DC matches the expected path. - * - * We use a "smart" matching algorithm that allows us to detect partial improvements - * in conformance. Specifically, two running indices are kept, one through the actual - * path and one through the expected path. The actual path index increases unless there is - * no match and the todo field of the appropriate path_test_t element is 2. Similarly, - * if the wine_entries_preceding field of the appropriate path_test_t element is non-zero, - * the expected path index does not increase for that many elements as long as there - * is no match. This allows us to todo_wine extra path elements that are present only - * on wine but not on native and vice versa. - * - * Note that if expected_size is zero and the WINETEST_DEBUG environment variable is - * greater than 2, the trace() output is a C path_test_t array structure, useful for making - * new tests that use this function. - */ -static void ok_path(HDC hdc, const char *path_name, const path_test_t *expected, int expected_size, BOOL todo_size) -{ - static const char *type_string[8] = { "Unknown (0)", "PT_CLOSEFIGURE", "PT_LINETO", - "PT_LINETO | PT_CLOSEFIGURE", "PT_BEZIERTO", - "PT_BEZIERTO | PT_CLOSEFIGURE", "PT_MOVETO", "PT_MOVETO | PT_CLOSEFIGURE"}; - POINT *pnt = NULL; - BYTE *types = NULL; - int size, numskip, - idx = 0, eidx = 0; - - /* Get the path */ - assert(hdc != 0); - size = GetPath(hdc, NULL, NULL, 0); - ok(size > 0, "GetPath returned size %d, last error %d\n", size, GetLastError()); - if (size <= 0) - { - skip("Cannot perform path comparisons due to failure to retrieve path.\n"); - return; - } - pnt = HeapAlloc(GetProcessHeap(), 0, size*sizeof(POINT)); - assert(pnt != 0); - types = HeapAlloc(GetProcessHeap(), 0, size*sizeof(BYTE)); - assert(types != 0); - size = GetPath(hdc, pnt, types, size); - assert(size > 0); - - if (todo_size) todo_wine - ok(size == expected_size, "Path size %d does not match expected size %d\n", size, expected_size); - else - ok(size == expected_size, "Path size %d does not match expected size %d\n", size, expected_size); - - if (winetest_debug > 2) - trace("static const path_test_t %s[] = {\n", path_name); - - numskip = expected_size ? expected[eidx].wine_only_entries_preceding : 0; - while (idx < size && eidx < expected_size) - { - /* We allow a few pixels fudge in matching X and Y coordinates to account for imprecision in - * floating point to integer conversion */ - BOOL match = (types[idx] == expected[eidx].type) && - (pnt[idx].x >= expected[eidx].x-2 && pnt[idx].x <= expected[eidx].x+2) && - (pnt[idx].y >= expected[eidx].y-2 && pnt[idx].y <= expected[eidx].y+2); - - if (expected[eidx].todo || numskip) todo_wine - ok(match, "Expected #%d: %s (%d,%d) but got %s (%d,%d)\n", eidx, - type_string[expected[eidx].type], expected[eidx].x, expected[eidx].y, - type_string[types[idx]], pnt[idx].x, pnt[idx].y); - else - ok(match, "Expected #%d: %s (%d,%d) but got %s (%d,%d)\n", eidx, - type_string[expected[eidx].type], expected[eidx].x, expected[eidx].y, - type_string[types[idx]], pnt[idx].x, pnt[idx].y); - - if (match || expected[eidx].todo != 2) - { - if (winetest_debug > 2) - trace(" {%d, %d, %s, 0, 0}%s /* %d */\n", pnt[idx].x, pnt[idx].y, - type_string[types[idx]], idx < size-1 ? "," : "};", idx); - idx++; - } - if (match || !numskip--) - numskip = expected[++eidx].wine_only_entries_preceding; - } - - /* If we are debugging and the actual path is longer than the expected path, make - * sure to display the entire path */ - if (winetest_debug > 2 && idx < size) - for (; idx < size; idx++) - trace(" {%d, %d, %s, 0, 0}%s /* %d */\n", pnt[idx].x, pnt[idx].y, - type_string[types[idx]], idx < size-1 ? "," : "};", idx); - - HeapFree(GetProcessHeap(), 0, types); - HeapFree(GetProcessHeap(), 0, pnt); -} - -static const path_test_t arcto_path[] = { - {0, 0, PT_MOVETO, 0, 0}, /* 0 */ - {229, 215, PT_LINETO, 0, 0}, /* 1 */ - {248, 205, PT_BEZIERTO, 0, 0}, /* 2 */ - {273, 200, PT_BEZIERTO, 0, 0}, /* 3 */ - {300, 200, PT_BEZIERTO, 0, 0}, /* 4 */ - {355, 200, PT_BEZIERTO, 0, 0}, /* 5 */ - {399, 222, PT_BEZIERTO, 0, 0}, /* 6 */ - {399, 250, PT_BEZIERTO, 0, 0}, /* 7 */ - {399, 263, PT_BEZIERTO, 0, 0}, /* 8 */ - {389, 275, PT_BEZIERTO, 0, 0}, /* 9 */ - {370, 285, PT_BEZIERTO, 0, 0}, /* 10 */ - {363, 277, PT_LINETO, 0, 0}, /* 11 */ - {380, 270, PT_BEZIERTO, 0, 0}, /* 12 */ - {389, 260, PT_BEZIERTO, 0, 0}, /* 13 */ - {389, 250, PT_BEZIERTO, 0, 0}, /* 14 */ - {389, 228, PT_BEZIERTO, 0, 0}, /* 15 */ - {349, 210, PT_BEZIERTO, 0, 0}, /* 16 */ - {300, 210, PT_BEZIERTO, 0, 0}, /* 17 */ - {276, 210, PT_BEZIERTO, 0, 0}, /* 18 */ - {253, 214, PT_BEZIERTO, 0, 0}, /* 19 */ - {236, 222, PT_BEZIERTO | PT_CLOSEFIGURE, 0, 0}}; /* 20 */ - -static void test_arcto(void) -{ - HDC hdc = GetDC(0); - - BeginPath(hdc); - SetArcDirection(hdc, AD_CLOCKWISE); - if (!ArcTo(hdc, 200, 200, 400, 300, 200, 200, 400, 300) && - GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - /* ArcTo is only available on Win2k and later */ - win_skip("ArcTo is not available\n"); - goto done; - } - SetArcDirection(hdc, AD_COUNTERCLOCKWISE); - ArcTo(hdc, 210, 210, 390, 290, 390, 290, 210, 210); - CloseFigure(hdc); - EndPath(hdc); - - ok_path(hdc, "arcto_path", arcto_path, sizeof(arcto_path)/sizeof(path_test_t), 0); -done: - ReleaseDC(0, hdc); -} - -static const path_test_t anglearc_path[] = { - {0, 0, PT_MOVETO, 0, 0}, /* 0 */ - {371, 229, PT_LINETO, 0, 0}, /* 1 */ - {352, 211, PT_BEZIERTO, 0, 0}, /* 2 */ - {327, 200, PT_BEZIERTO, 0, 0}, /* 3 */ - {300, 200, PT_BEZIERTO, 0, 0}, /* 4 */ - {245, 200, PT_BEZIERTO, 0, 0}, /* 5 */ - {200, 245, PT_BEZIERTO, 0, 0}, /* 6 */ - {200, 300, PT_BEZIERTO, 0, 0}, /* 7 */ - {200, 300, PT_BEZIERTO, 0, 0}, /* 8 */ - {200, 300, PT_BEZIERTO, 0, 0}, /* 9 */ - {200, 300, PT_BEZIERTO, 0, 0}, /* 10 */ - {231, 260, PT_LINETO, 0, 0}, /* 11 */ - {245, 235, PT_BEZIERTO, 0, 0}, /* 12 */ - {271, 220, PT_BEZIERTO, 0, 0}, /* 13 */ - {300, 220, PT_BEZIERTO, 0, 0}, /* 14 */ - {344, 220, PT_BEZIERTO, 0, 0}, /* 15 */ - {380, 256, PT_BEZIERTO, 0, 0}, /* 16 */ - {380, 300, PT_BEZIERTO, 0, 0}, /* 17 */ - {380, 314, PT_BEZIERTO, 0, 0}, /* 18 */ - {376, 328, PT_BEZIERTO, 0, 0}, /* 19 */ - {369, 340, PT_BEZIERTO | PT_CLOSEFIGURE, 0, 0}}; /* 20 */ - -static void test_anglearc(void) -{ - HDC hdc = GetDC(0); - BeginPath(hdc); - if (!AngleArc(hdc, 300, 300, 100, 45.0, 135.0) && - GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - /* AngleArc is only available on Win2k and later */ - win_skip("AngleArc is not available\n"); - goto done; - } - AngleArc(hdc, 300, 300, 80, 150.0, -180.0); - CloseFigure(hdc); - EndPath(hdc); - - ok_path(hdc, "anglearc_path", anglearc_path, sizeof(anglearc_path)/sizeof(path_test_t), 0); -done: - ReleaseDC(0, hdc); -} - -static const path_test_t polydraw_path[] = { - {0, 0, PT_MOVETO, 0, 0}, /*0*/ - {10, 10, PT_LINETO, 0, 0}, /*1*/ - {10, 15, PT_LINETO | PT_CLOSEFIGURE, 0, 0}, /*2*/ - {100, 100, PT_MOVETO, 0, 0}, /*3*/ - {95, 95, PT_LINETO, 0, 0}, /*4*/ - {10, 10, PT_LINETO, 0, 0}, /*5*/ - {10, 15, PT_LINETO | PT_CLOSEFIGURE, 0, 0}, /*6*/ - {100, 100, PT_MOVETO, 0, 0}, /*7*/ - {15, 15, PT_LINETO, 0, 0}, /*8*/ - {25, 25, PT_MOVETO, 0, 0}, /*9*/ - {25, 30, PT_LINETO, 0, 0}, /*10*/ - {100, 100, PT_MOVETO, 0, 0}, /*11*/ - {30, 30, PT_BEZIERTO, 0, 0}, /*12*/ - {30, 35, PT_BEZIERTO, 0, 0}, /*13*/ - {35, 35, PT_BEZIERTO, 0, 0}, /*14*/ - {35, 40, PT_LINETO, 0, 0}, /*15*/ - {40, 40, PT_MOVETO, 0, 0}, /*16*/ - {40, 45, PT_LINETO, 0, 0}, /*17*/ - {35, 40, PT_MOVETO, 0, 0}, /*18*/ - {45, 50, PT_LINETO, 0, 0}, /*19*/ - {35, 40, PT_MOVETO, 0, 0}, /*20*/ - {50, 55, PT_LINETO, 0, 0}, /*21*/ - {45, 50, PT_LINETO, 0, 0}, /*22*/ - {35, 40, PT_MOVETO, 0, 0}, /*23*/ - {60, 60, PT_LINETO, 0, 0}, /*24*/ - {60, 65, PT_MOVETO, 0, 0}, /*25*/ - {65, 65, PT_LINETO, 0, 0} /*26*/ - }; - -static POINT polydraw_pts[] = { - {10, 10}, {10, 15}, - {15, 15}, {15, 20}, {20, 20}, {20, 25}, - {25, 25}, {25, 30}, - {30, 30}, {30, 35}, {35, 35}, {35, 40}, - {40, 40}, {40, 45}, {45, 45}, - {45, 50}, {50, 50}, - {50, 55}, {45, 50}, {55, 60}, - {60, 60}, {60, 65}, {65, 65}}; - -static BYTE polydraw_tps[] = - {PT_LINETO, PT_CLOSEFIGURE | PT_LINETO, /* 2 */ - PT_LINETO, PT_BEZIERTO, PT_LINETO, PT_LINETO, /* 6 */ - PT_MOVETO, PT_LINETO, /* 8 */ - PT_BEZIERTO, PT_BEZIERTO, PT_BEZIERTO, PT_LINETO, /* 12 */ - PT_MOVETO, PT_LINETO, PT_CLOSEFIGURE, /* 15 */ - PT_LINETO, PT_MOVETO | PT_CLOSEFIGURE, /* 17 */ - PT_LINETO, PT_LINETO, PT_MOVETO | PT_CLOSEFIGURE, /* 20 */ - PT_LINETO, PT_MOVETO | PT_LINETO, PT_LINETO}; /* 23 */ - -static void test_polydraw(void) -{ - BOOL retb; - HDC hdc = GetDC(0); - BeginPath(hdc); - - /* closefigure with no previous moveto */ - if (!(retb = PolyDraw(hdc, polydraw_pts, polydraw_tps, 2)) && - GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - /* PolyDraw is only available on Win2k and later */ - win_skip("PolyDraw is not available\n"); - goto done; - } - expect(TRUE, retb); - - MoveToEx(hdc, 100, 100, NULL); - LineTo(hdc, 95, 95); - /* closefigure with previous moveto */ - retb = PolyDraw(hdc, polydraw_pts, polydraw_tps, 2); - expect(TRUE, retb); - /* bad bezier points */ - retb = PolyDraw(hdc, &(polydraw_pts[2]), &(polydraw_tps[2]), 4); - expect(FALSE, retb); - retb = PolyDraw(hdc, &(polydraw_pts[6]), &(polydraw_tps[6]), 4); - expect(FALSE, retb); - /* good bezier points */ - retb = PolyDraw(hdc, &(polydraw_pts[8]), &(polydraw_tps[8]), 4); - expect(TRUE, retb); - /* does lineto or bezierto take precedence? */ - retb = PolyDraw(hdc, &(polydraw_pts[12]), &(polydraw_tps[12]), 4); - expect(FALSE, retb); - /* bad point type, has already moved cursor position */ - retb = PolyDraw(hdc, &(polydraw_pts[15]), &(polydraw_tps[15]), 4); - expect(FALSE, retb); - /* bad point type, cursor position is moved, but back to its original spot */ - retb = PolyDraw(hdc, &(polydraw_pts[17]), &(polydraw_tps[17]), 4); - expect(FALSE, retb); - /* does lineto or moveto take precedence? */ - retb = PolyDraw(hdc, &(polydraw_pts[20]), &(polydraw_tps[20]), 3); - expect(TRUE, retb); - - EndPath(hdc); - ok_path(hdc, "polydraw_path", polydraw_path, sizeof(polydraw_path)/sizeof(path_test_t), 0); -done: - ReleaseDC(0, hdc); -} - -static void test_closefigure(void) { - int nSize, nSizeWitness; - HDC hdc = GetDC(0); - - BeginPath(hdc); - MoveToEx(hdc, 95, 95, NULL); - LineTo(hdc, 95, 0); - LineTo(hdc, 0, 95); - - CloseFigure(hdc); - EndPath(hdc); - nSize = GetPath(hdc, NULL, NULL, 0); - - AbortPath(hdc); - - BeginPath(hdc); - MoveToEx(hdc, 95, 95, NULL); - LineTo(hdc, 95, 0); - LineTo(hdc, 0, 95); - - EndPath(hdc); - nSizeWitness = GetPath(hdc, NULL, NULL, 0); - - /* This test shows CloseFigure does not have to add a point at the end of the path */ - ok(nSize == nSizeWitness, "Wrong number of points, no point should be added by CloseFigure\n"); - - ReleaseDC(0, hdc); -} - -static void WINAPI linedda_callback(INT x, INT y, LPARAM lparam) -{ - POINT **pt = (POINT**)lparam; - ok((*pt)->x == x && (*pt)->y == y, "point mismatch expect(%d,%d) got(%d,%d)\n", - (*pt)->x, (*pt)->y, x, y); - - (*pt)++; - return; -} - -static void test_linedda(void) -{ - const POINT *pt; - static const POINT array_10_20_20_40[] = {{10,20},{10,21},{11,22},{11,23}, - {12,24},{12,25},{13,26},{13,27}, - {14,28},{14,29},{15,30},{15,31}, - {16,32},{16,33},{17,34},{17,35}, - {18,36},{18,37},{19,38},{19,39}, - {-1,-1}}; - static const POINT array_10_20_20_43[] = {{10,20},{10,21},{11,22},{11,23}, - {12,24},{12,25},{13,26},{13,27}, - {13,28},{14,29},{14,30},{15,31}, - {15,32},{16,33},{16,34},{17,35}, - {17,36},{17,37},{18,38},{18,39}, - {19,40},{19,41},{20,42},{-1,-1}}; - - static const POINT array_10_20_10_20[] = {{-1,-1}}; - static const POINT array_10_20_11_27[] = {{10,20},{10,21},{10,22},{10,23}, - {11,24},{11,25},{11,26},{-1,-1}}; - - static const POINT array_20_43_10_20[] = {{20,43},{20,42},{19,41},{19,40}, - {18,39},{18,38},{17,37},{17,36}, - {17,35},{16,34},{16,33},{15,32}, - {15,31},{14,30},{14,29},{13,28}, - {13,27},{13,26},{12,25},{12,24}, - {11,23},{11,22},{10,21},{-1,-1}}; - - static const POINT array_20_20_10_43[] = {{20,20},{20,21},{19,22},{19,23}, - {18,24},{18,25},{17,26},{17,27}, - {17,28},{16,29},{16,30},{15,31}, - {15,32},{14,33},{14,34},{13,35}, - {13,36},{13,37},{12,38},{12,39}, - {11,40},{11,41},{10,42},{-1,-1}}; - - static const POINT array_20_20_43_10[] = {{20,20},{21,20},{22,19},{23,19}, - {24,18},{25,18},{26,17},{27,17}, - {28,17},{29,16},{30,16},{31,15}, - {32,15},{33,14},{34,14},{35,13}, - {36,13},{37,13},{38,12},{39,12}, - {40,11},{41,11},{42,10},{-1,-1}}; - - - pt = array_10_20_20_40; - LineDDA(10, 20, 20, 40, linedda_callback, (LPARAM)&pt); - ok(pt->x == -1 && pt->y == -1, "didn't find terminator\n"); - - pt = array_10_20_20_43; - LineDDA(10, 20, 20, 43, linedda_callback, (LPARAM)&pt); - ok(pt->x == -1 && pt->y == -1, "didn't find terminator\n"); - - pt = array_10_20_10_20; - LineDDA(10, 20, 10, 20, linedda_callback, (LPARAM)&pt); - ok(pt->x == -1 && pt->y == -1, "didn't find terminator\n"); - - pt = array_10_20_11_27; - LineDDA(10, 20, 11, 27, linedda_callback, (LPARAM)&pt); - ok(pt->x == -1 && pt->y == -1, "didn't find terminator\n"); - - pt = array_20_43_10_20; - LineDDA(20, 43, 10, 20, linedda_callback, (LPARAM)&pt); - ok(pt->x == -1 && pt->y == -1, "didn't find terminator\n"); - - pt = array_20_20_10_43; - LineDDA(20, 20, 10, 43, linedda_callback, (LPARAM)&pt); - ok(pt->x == -1 && pt->y == -1, "didn't find terminator\n"); - - pt = array_20_20_43_10; - LineDDA(20, 20, 43, 10, linedda_callback, (LPARAM)&pt); - ok(pt->x == -1 && pt->y == -1, "didn't find terminator\n"); -} - -START_TEST(path) -{ - test_widenpath(); - test_arcto(); - test_anglearc(); - test_polydraw(); - test_closefigure(); - test_linedda(); -} diff --git a/rostests/winetests/gdi32/pen.c b/rostests/winetests/gdi32/pen.c deleted file mode 100644 index d7819a59960..00000000000 --- a/rostests/winetests/gdi32/pen.c +++ /dev/null @@ -1,597 +0,0 @@ -/* - * Unit test suite for pens - * - * Copyright 2006 Dmitry Timoshkov - * - * 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 "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" - -#include "wine/test.h" - -#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) -#define expect2(expected, alt, got) ok(got == expected || got == alt, \ - "Expected %.8x or %.8x, got %.8x\n", expected, alt, got) - -static void test_logpen(void) -{ - static const struct - { - UINT style; - INT width; - COLORREF color; - UINT ret_style; - INT ret_width; - COLORREF ret_color; - } pen[] = { - { PS_SOLID, -123, RGB(0x12,0x34,0x56), PS_SOLID, 123, RGB(0x12,0x34,0x56) }, - { PS_SOLID, 0, RGB(0x12,0x34,0x56), PS_SOLID, 0, RGB(0x12,0x34,0x56) }, - { PS_SOLID, 123, RGB(0x12,0x34,0x56), PS_SOLID, 123, RGB(0x12,0x34,0x56) }, - { PS_DASH, 123, RGB(0x12,0x34,0x56), PS_DASH, 123, RGB(0x12,0x34,0x56) }, - { PS_DOT, 123, RGB(0x12,0x34,0x56), PS_DOT, 123, RGB(0x12,0x34,0x56) }, - { PS_DASHDOT, 123, RGB(0x12,0x34,0x56), PS_DASHDOT, 123, RGB(0x12,0x34,0x56) }, - { PS_DASHDOTDOT, 123, RGB(0x12,0x34,0x56), PS_DASHDOTDOT, 123, RGB(0x12,0x34,0x56) }, - { PS_NULL, -123, RGB(0x12,0x34,0x56), PS_NULL, 1, 0 }, - { PS_NULL, 123, RGB(0x12,0x34,0x56), PS_NULL, 1, 0 }, - { PS_INSIDEFRAME, 123, RGB(0x12,0x34,0x56), PS_INSIDEFRAME, 123, RGB(0x12,0x34,0x56) }, - { PS_USERSTYLE, 123, RGB(0x12,0x34,0x56), PS_SOLID, 123, RGB(0x12,0x34,0x56) }, - { PS_ALTERNATE, 123, RGB(0x12,0x34,0x56), PS_SOLID, 123, RGB(0x12,0x34,0x56) } - }; - INT i, size; - HPEN hpen; - LOGPEN lp; - EXTLOGPEN elp; - LOGBRUSH lb; - DWORD_PTR unset_hatch; - DWORD obj_type, user_style[2] = { 0xabc, 0xdef }; - struct - { - EXTLOGPEN elp; - DWORD style_data[10]; - } ext_pen; - - for (i = 0; i < sizeof(pen)/sizeof(pen[0]); i++) - { - trace("%d: testing style %u\n", i, pen[i].style); - - /********************** cosmetic pens **********************/ - /* CreatePenIndirect behaviour */ - lp.lopnStyle = pen[i].style, - lp.lopnWidth.x = pen[i].width; - lp.lopnWidth.y = 11; /* just in case */ - lp.lopnColor = pen[i].color; - SetLastError(0xdeadbeef); - hpen = CreatePenIndirect(&lp); - if(hpen == 0 && GetLastError() == ERROR_INVALID_PARAMETER) - { - win_skip("No support for pen style %u (%d)\n", pen[i].style, i); - continue; - } - - obj_type = GetObjectType(hpen); - ok(obj_type == OBJ_PEN, "wrong object type %u\n", obj_type); - - memset(&lp, 0xb0, sizeof(lp)); - SetLastError(0xdeadbeef); - size = GetObject(hpen, sizeof(lp), &lp); - ok(size == sizeof(lp), "GetObject returned %d, error %d\n", size, GetLastError()); - - if (pen[i].style == PS_USERSTYLE || pen[i].style == PS_ALTERNATE) - { - if (lp.lopnStyle == pen[i].style) - { - win_skip("Skipping PS_USERSTYLE and PS_ALTERNATE tests on Win9x\n"); - continue; - } - } - ok(lp.lopnStyle == pen[i].ret_style, "expected %u, got %u\n", pen[i].ret_style, lp.lopnStyle); - ok(lp.lopnWidth.x == pen[i].ret_width, "expected %u, got %d\n", pen[i].ret_width, lp.lopnWidth.x); - ok(lp.lopnWidth.y == 0 || - broken(lp.lopnWidth.y == 0xb), /* Win9x */ - "expected 0, got %d\n", lp.lopnWidth.y); - ok(lp.lopnColor == pen[i].ret_color, "expected %08x, got %08x\n", pen[i].ret_color, lp.lopnColor); - - DeleteObject(hpen); - - /* CreatePen behaviour */ - SetLastError(0xdeadbeef); - hpen = CreatePen(pen[i].style, pen[i].width, pen[i].color); - ok(hpen != 0, "CreatePen error %d\n", GetLastError()); - - obj_type = GetObjectType(hpen); - ok(obj_type == OBJ_PEN, "wrong object type %u\n", obj_type); - - /* check what's the real size of the object */ - size = GetObject(hpen, 0, NULL); - ok(size == sizeof(lp), "GetObject returned %d, error %d\n", size, GetLastError()); - - /* ask for truncated data */ - memset(&lp, 0xb0, sizeof(lp)); - SetLastError(0xdeadbeef); - size = GetObject(hpen, sizeof(lp.lopnStyle), &lp); - ok(!size || - broken(size == sizeof(lp.lopnStyle)), /* Win9x */ - "GetObject should fail: size %d, error %d\n", size, GetLastError()); - - /* see how larger buffer sizes are handled */ - memset(&lp, 0xb0, sizeof(lp)); - SetLastError(0xdeadbeef); - size = GetObject(hpen, sizeof(lp) * 4, &lp); - ok(size == sizeof(lp), "GetObject returned %d, error %d\n", size, GetLastError()); - - /* see how larger buffer sizes are handled */ - memset(&elp, 0xb0, sizeof(elp)); - SetLastError(0xdeadbeef); - size = GetObject(hpen, sizeof(elp) * 2, &elp); - ok(size == sizeof(lp), "GetObject returned %d, error %d\n", size, GetLastError()); - - memset(&lp, 0xb0, sizeof(lp)); - SetLastError(0xdeadbeef); - size = GetObject(hpen, sizeof(lp), &lp); - ok(size == sizeof(lp), "GetObject returned %d, error %d\n", size, GetLastError()); - - ok(lp.lopnStyle == pen[i].ret_style, "expected %u, got %u\n", pen[i].ret_style, lp.lopnStyle); - ok(lp.lopnWidth.x == pen[i].ret_width, "expected %u, got %d\n", pen[i].ret_width, lp.lopnWidth.x); - ok(lp.lopnWidth.y == 0, "expected 0, got %d\n", lp.lopnWidth.y); - ok(lp.lopnColor == pen[i].ret_color, "expected %08x, got %08x\n", pen[i].ret_color, lp.lopnColor); - - memset(&elp, 0xb0, sizeof(elp)); - SetLastError(0xdeadbeef); - size = GetObject(hpen, sizeof(elp), &elp); - - /* for some reason XP differentiates PS_NULL here */ - if (pen[i].style == PS_NULL) - { - ok(hpen == GetStockObject(NULL_PEN), "hpen should be a stock NULL_PEN\n"); - ok(size == sizeof(EXTLOGPEN), "GetObject returned %d, error %d\n", size, GetLastError()); - ok(elp.elpPenStyle == pen[i].ret_style, "expected %u, got %u\n", pen[i].ret_style, elp.elpPenStyle); - ok(elp.elpWidth == 0, "expected 0, got %u\n", elp.elpWidth); - ok(elp.elpColor == pen[i].ret_color, "expected %08x, got %08x\n", pen[i].ret_color, elp.elpColor); - ok(elp.elpBrushStyle == BS_SOLID, "expected BS_SOLID, got %u\n", elp.elpBrushStyle); - ok(elp.elpHatch == 0, "expected 0, got %p\n", (void *)elp.elpHatch); - ok(elp.elpNumEntries == 0, "expected 0, got %x\n", elp.elpNumEntries); - } - else - { - ok(size == sizeof(LOGPEN), "GetObject returned %d, error %d\n", size, GetLastError()); - memcpy(&lp, &elp, sizeof(lp)); - ok(lp.lopnStyle == pen[i].ret_style, "expected %u, got %u\n", pen[i].ret_style, lp.lopnStyle); - ok(lp.lopnWidth.x == pen[i].ret_width, "expected %u, got %d\n", pen[i].ret_width, lp.lopnWidth.x); - ok(lp.lopnWidth.y == 0, "expected 0, got %d\n", lp.lopnWidth.y); - ok(lp.lopnColor == pen[i].ret_color, "expected %08x, got %08x\n", pen[i].ret_color, lp.lopnColor); - } - - DeleteObject(hpen); - - /********** cosmetic pens created by ExtCreatePen ***********/ - lb.lbStyle = BS_SOLID; - lb.lbColor = pen[i].color; - lb.lbHatch = HS_CROSS; /* just in case */ - SetLastError(0xdeadbeef); - hpen = ExtCreatePen(pen[i].style, pen[i].width, &lb, 2, user_style); - if (pen[i].style != PS_USERSTYLE) - { - ok(hpen == 0, "ExtCreatePen should fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "wrong last error value %d\n", GetLastError()); - SetLastError(0xdeadbeef); - hpen = ExtCreatePen(pen[i].style, pen[i].width, &lb, 0, NULL); - if (pen[i].style != PS_NULL) - { - ok(hpen == 0, "ExtCreatePen with width != 1 should fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "wrong last error value %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - hpen = ExtCreatePen(pen[i].style, 1, &lb, 0, NULL); - } - } - else - { - ok(hpen == 0, "ExtCreatePen with width != 1 should fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "wrong last error value %d\n", GetLastError()); - SetLastError(0xdeadbeef); - hpen = ExtCreatePen(pen[i].style, 1, &lb, 2, user_style); - } - if (pen[i].style == PS_INSIDEFRAME) - { - /* This style is applicable only for geometric pens */ - ok(hpen == 0, "ExtCreatePen should fail\n"); - goto test_geometric_pens; - } - ok(hpen != 0, "ExtCreatePen error %d\n", GetLastError()); - - obj_type = GetObjectType(hpen); - /* for some reason XP differentiates PS_NULL here */ - if (pen[i].style == PS_NULL) - { - ok(obj_type == OBJ_PEN, "wrong object type %u\n", obj_type); - ok(hpen == GetStockObject(NULL_PEN), "hpen should be a stock NULL_PEN\n"); - } - else - ok(obj_type == OBJ_EXTPEN, "wrong object type %u\n", obj_type); - - /* check what's the real size of the object */ - SetLastError(0xdeadbeef); - size = GetObject(hpen, 0, NULL); - switch (pen[i].style) - { - case PS_NULL: - ok(size == sizeof(LOGPEN), - "GetObject returned %d, error %d\n", size, GetLastError()); - break; - - case PS_USERSTYLE: - ok(size == sizeof(EXTLOGPEN) - sizeof(elp.elpStyleEntry) + sizeof(user_style) || - broken(size == 0 && GetLastError() == ERROR_INVALID_PARAMETER), /* Win9x */ - "GetObject returned %d, error %d\n", size, GetLastError()); - break; - - default: - ok(size == sizeof(EXTLOGPEN) - sizeof(elp.elpStyleEntry) || - broken(size == sizeof(LOGPEN)) || /* Win9x */ - broken(pen[i].style == PS_ALTERNATE && - size == 0 && - GetLastError() == ERROR_INVALID_PARAMETER), /* Win9x */ - "GetObject returned %d, error %d\n", size, GetLastError()); - break; - } - - /* ask for truncated data */ - memset(&elp, 0xb0, sizeof(elp)); - SetLastError(0xdeadbeef); - size = GetObject(hpen, sizeof(elp.elpPenStyle), &elp); - ok(!size || - broken(size == sizeof(elp.elpPenStyle)), /* Win9x */ - "GetObject should fail: size %d, error %d\n", size, GetLastError()); - - /* see how larger buffer sizes are handled */ - memset(&ext_pen, 0xb0, sizeof(ext_pen)); - SetLastError(0xdeadbeef); - size = GetObject(hpen, sizeof(ext_pen), &ext_pen.elp); - switch (pen[i].style) - { - case PS_NULL: - ok(size == sizeof(LOGPEN), - "GetObject returned %d, error %d\n", size, GetLastError()); - memcpy(&lp, &ext_pen.elp, sizeof(lp)); - ok(lp.lopnStyle == pen[i].ret_style, "expected %u, got %u\n", pen[i].ret_style, lp.lopnStyle); - ok(lp.lopnWidth.x == pen[i].ret_width, "expected %u, got %d\n", pen[i].ret_width, lp.lopnWidth.x); - ok(lp.lopnWidth.y == 0, "expected 0, got %d\n", lp.lopnWidth.y); - ok(lp.lopnColor == pen[i].ret_color, "expected %08x, got %08x\n", pen[i].ret_color, lp.lopnColor); - - /* for PS_NULL it also works this way */ - memset(&elp, 0xb0, sizeof(elp)); - memset(&unset_hatch, 0xb0, sizeof(unset_hatch)); - SetLastError(0xdeadbeef); - size = GetObject(hpen, sizeof(elp), &elp); - ok(size == sizeof(EXTLOGPEN), - "GetObject returned %d, error %d\n", size, GetLastError()); - ok(ext_pen.elp.elpHatch == unset_hatch, "expected 0xb0b0b0b0, got %p\n", (void *)ext_pen.elp.elpHatch); - ok(ext_pen.elp.elpNumEntries == 0xb0b0b0b0, "expected 0xb0b0b0b0, got %x\n", ext_pen.elp.elpNumEntries); - break; - - case PS_USERSTYLE: - ok(size == sizeof(EXTLOGPEN) - sizeof(elp.elpStyleEntry) + sizeof(user_style), - "GetObject returned %d, error %d\n", size, GetLastError()); - ok(ext_pen.elp.elpHatch == HS_CROSS, "expected HS_CROSS, got %p\n", (void *)ext_pen.elp.elpHatch); - ok(ext_pen.elp.elpNumEntries == 2, "expected 0, got %x\n", ext_pen.elp.elpNumEntries); - ok(ext_pen.elp.elpStyleEntry[0] == 0xabc, "expected 0xabc, got %x\n", ext_pen.elp.elpStyleEntry[0]); - ok(ext_pen.elp.elpStyleEntry[1] == 0xdef, "expected 0xdef, got %x\n", ext_pen.elp.elpStyleEntry[1]); - break; - - default: - ok(size == sizeof(EXTLOGPEN) - sizeof(elp.elpStyleEntry) || - broken(size == sizeof(LOGPEN)) || /* Win9x */ - broken(pen[i].style == PS_ALTERNATE && - size == 0 && - GetLastError() == ERROR_INVALID_PARAMETER), /* Win9x */ - "GetObject returned %d, error %d\n", size, GetLastError()); - ok(ext_pen.elp.elpHatch == HS_CROSS, "expected HS_CROSS, got %p\n", (void *)ext_pen.elp.elpHatch); - ok(ext_pen.elp.elpNumEntries == 0, "expected 0, got %x\n", ext_pen.elp.elpNumEntries); - break; - } - -if (pen[i].style == PS_USERSTYLE) -{ - todo_wine - ok(ext_pen.elp.elpPenStyle == pen[i].style, "expected %x, got %x\n", pen[i].style, ext_pen.elp.elpPenStyle); -} -else - ok(ext_pen.elp.elpPenStyle == pen[i].style, "expected %x, got %x\n", pen[i].style, ext_pen.elp.elpPenStyle); - ok(ext_pen.elp.elpWidth == 1, "expected 1, got %x\n", ext_pen.elp.elpWidth); - ok(ext_pen.elp.elpColor == pen[i].ret_color, "expected %08x, got %08x\n", pen[i].ret_color, ext_pen.elp.elpColor); - ok(ext_pen.elp.elpBrushStyle == BS_SOLID, "expected BS_SOLID, got %x\n", ext_pen.elp.elpBrushStyle); - - DeleteObject(hpen); - -test_geometric_pens: - /********************** geometric pens **********************/ - lb.lbStyle = BS_SOLID; - lb.lbColor = pen[i].color; - lb.lbHatch = HS_CROSS; /* just in case */ - SetLastError(0xdeadbeef); - hpen = ExtCreatePen(PS_GEOMETRIC | pen[i].style, pen[i].width, &lb, 2, user_style); - if (pen[i].style != PS_USERSTYLE) - { - ok(hpen == 0, "ExtCreatePen should fail\n"); - SetLastError(0xdeadbeef); - hpen = ExtCreatePen(PS_GEOMETRIC | pen[i].style, pen[i].width, &lb, 0, NULL); - } - if (pen[i].style == PS_ALTERNATE) - { - /* This style is applicable only for cosmetic pens */ - ok(hpen == 0, "ExtCreatePen should fail\n"); - continue; - } - ok(hpen != 0, "ExtCreatePen error %d\n", GetLastError()); - - obj_type = GetObjectType(hpen); - /* for some reason XP differentiates PS_NULL here */ - if (pen[i].style == PS_NULL) - ok(obj_type == OBJ_PEN, "wrong object type %u\n", obj_type); - else - ok(obj_type == OBJ_EXTPEN, "wrong object type %u\n", obj_type); - - /* check what's the real size of the object */ - size = GetObject(hpen, 0, NULL); - switch (pen[i].style) - { - case PS_NULL: - ok(size == sizeof(LOGPEN), - "GetObject returned %d, error %d\n", size, GetLastError()); - break; - - case PS_USERSTYLE: - ok(size == sizeof(EXTLOGPEN) - sizeof(elp.elpStyleEntry) + sizeof(user_style), - "GetObject returned %d, error %d\n", size, GetLastError()); - break; - - default: - ok(size == sizeof(EXTLOGPEN) - sizeof(elp.elpStyleEntry), - "GetObject returned %d, error %d\n", size, GetLastError()); - break; - } - - /* ask for truncated data */ - memset(&lp, 0xb0, sizeof(lp)); - SetLastError(0xdeadbeef); - size = GetObject(hpen, sizeof(lp.lopnStyle), &lp); - ok(!size, "GetObject should fail: size %d, error %d\n", size, GetLastError()); - - memset(&lp, 0xb0, sizeof(lp)); - SetLastError(0xdeadbeef); - size = GetObject(hpen, sizeof(lp), &lp); - /* for some reason XP differentiates PS_NULL here */ - if (pen[i].style == PS_NULL) - { - ok(size == sizeof(LOGPEN), "GetObject returned %d, error %d\n", size, GetLastError()); - ok(lp.lopnStyle == pen[i].ret_style, "expected %u, got %u\n", pen[i].ret_style, lp.lopnStyle); - ok(lp.lopnWidth.x == pen[i].ret_width, "expected %u, got %d\n", pen[i].ret_width, lp.lopnWidth.x); - ok(lp.lopnWidth.y == 0, "expected 0, got %d\n", lp.lopnWidth.y); - ok(lp.lopnColor == pen[i].ret_color, "expected %08x, got %08x\n", pen[i].ret_color, lp.lopnColor); - } - else - /* XP doesn't set last error here */ - ok(!size /*&& GetLastError() == ERROR_INVALID_PARAMETER*/, - "GetObject should fail: size %d, error %d\n", size, GetLastError()); - - memset(&ext_pen, 0xb0, sizeof(ext_pen)); - SetLastError(0xdeadbeef); - /* buffer is too small for user styles */ - size = GetObject(hpen, sizeof(elp), &ext_pen.elp); - switch (pen[i].style) - { - case PS_NULL: - ok(size == sizeof(EXTLOGPEN), - "GetObject returned %d, error %d\n", size, GetLastError()); - ok(ext_pen.elp.elpHatch == 0, "expected 0, got %p\n", (void *)ext_pen.elp.elpHatch); - ok(ext_pen.elp.elpNumEntries == 0, "expected 0, got %x\n", ext_pen.elp.elpNumEntries); - - /* for PS_NULL it also works this way */ - SetLastError(0xdeadbeef); - size = GetObject(hpen, sizeof(ext_pen), &lp); - ok(size == sizeof(LOGPEN), - "GetObject returned %d, error %d\n", size, GetLastError()); - ok(lp.lopnStyle == pen[i].ret_style, "expected %u, got %u\n", pen[i].ret_style, lp.lopnStyle); - ok(lp.lopnWidth.x == pen[i].ret_width, "expected %u, got %d\n", pen[i].ret_width, lp.lopnWidth.x); - ok(lp.lopnWidth.y == 0, "expected 0, got %d\n", lp.lopnWidth.y); - ok(lp.lopnColor == pen[i].ret_color, "expected %08x, got %08x\n", pen[i].ret_color, lp.lopnColor); - break; - - case PS_USERSTYLE: - ok(!size /*&& GetLastError() == ERROR_INVALID_PARAMETER*/, - "GetObject should fail: size %d, error %d\n", size, GetLastError()); - size = GetObject(hpen, sizeof(ext_pen), &ext_pen.elp); - ok(size == sizeof(EXTLOGPEN) - sizeof(elp.elpStyleEntry) + sizeof(user_style), - "GetObject returned %d, error %d\n", size, GetLastError()); - ok(ext_pen.elp.elpHatch == HS_CROSS, "expected HS_CROSS, got %p\n", (void *)ext_pen.elp.elpHatch); - ok(ext_pen.elp.elpNumEntries == 2, "expected 0, got %x\n", ext_pen.elp.elpNumEntries); - ok(ext_pen.elp.elpStyleEntry[0] == 0xabc, "expected 0xabc, got %x\n", ext_pen.elp.elpStyleEntry[0]); - ok(ext_pen.elp.elpStyleEntry[1] == 0xdef, "expected 0xdef, got %x\n", ext_pen.elp.elpStyleEntry[1]); - break; - - default: - ok(size == sizeof(EXTLOGPEN) - sizeof(elp.elpStyleEntry), - "GetObject returned %d, error %d\n", size, GetLastError()); - ok(ext_pen.elp.elpHatch == HS_CROSS, "expected HS_CROSS, got %p\n", (void *)ext_pen.elp.elpHatch); - ok(ext_pen.elp.elpNumEntries == 0, "expected 0, got %x\n", ext_pen.elp.elpNumEntries); - break; - } - - /* for some reason XP differentiates PS_NULL here */ - if (pen[i].style == PS_NULL) - ok(ext_pen.elp.elpPenStyle == pen[i].ret_style, "expected %x, got %x\n", pen[i].ret_style, ext_pen.elp.elpPenStyle); - else - { - ok(ext_pen.elp.elpPenStyle == (PS_GEOMETRIC | pen[i].style), "expected %x, got %x\n", PS_GEOMETRIC | pen[i].style, ext_pen.elp.elpPenStyle); - } - - if (pen[i].style == PS_NULL) - ok(ext_pen.elp.elpWidth == 0, "expected 0, got %x\n", ext_pen.elp.elpWidth); - else - ok(ext_pen.elp.elpWidth == pen[i].ret_width, "expected %u, got %x\n", pen[i].ret_width, ext_pen.elp.elpWidth); - ok(ext_pen.elp.elpColor == pen[i].ret_color, "expected %08x, got %08x\n", pen[i].ret_color, ext_pen.elp.elpColor); - ok(ext_pen.elp.elpBrushStyle == BS_SOLID, "expected BS_SOLID, got %x\n", ext_pen.elp.elpBrushStyle); - - DeleteObject(hpen); - } -} - -static unsigned int atoi2(const char *s) -{ - unsigned int ret = 0; - while(*s) ret = (ret << 1) | (*s++ == '1'); - return ret; -} - -#define TEST_LINE(x1, x2, z) \ - { int buf = 0; \ - SetBitmapBits(bmp, sizeof(buf), &buf); \ - MoveToEx(hdc, x1, 0, NULL); \ - LineTo(hdc, x2, 0); \ - GetBitmapBits(bmp, sizeof(buf), &buf); \ - expect(atoi2(z), buf); } - -static void test_ps_alternate(void) -{ - HDC hdc; - HBITMAP bmp; - HPEN pen; - LOGBRUSH lb; - INT iRet; - HGDIOBJ hRet; - - lb.lbStyle = BS_SOLID; - lb.lbColor = RGB(0xff,0xff,0xff); - - SetLastError(0xdeadbeef); - pen = ExtCreatePen(PS_COSMETIC|PS_ALTERNATE, 1, &lb, 0, NULL); - if(pen == NULL && GetLastError() == 0xdeadbeef) { - skip("looks like 9x, skipping PS_ALTERNATE tests\n"); - return; - } - ok(pen != NULL, "gle=%d\n", GetLastError()); - hdc = CreateCompatibleDC(NULL); - ok(hdc != NULL, "gle=%d\n", GetLastError()); - bmp = CreateBitmap(8, 1, 1, 1, NULL); - ok(bmp != NULL, "gle=%d\n", GetLastError()); - hRet = SelectObject(hdc, bmp); - ok(hRet != NULL, "gle=%d\n", GetLastError()); - hRet = SelectObject(hdc, pen); - ok(hRet != NULL, "gle=%d\n", GetLastError()); - iRet = SetBkMode(hdc, TRANSPARENT); - ok(iRet, "gle=%d\n", GetLastError()); - - TEST_LINE(0, 1, "10000000") - TEST_LINE(0, 2, "10000000") - TEST_LINE(0, 3, "10100000") - TEST_LINE(0, 4, "10100000") - TEST_LINE(1, 4, "01010000") - TEST_LINE(1, 5, "01010000") - TEST_LINE(4, 8, "00001010") - - DeleteObject(pen); - DeleteObject(bmp); - DeleteDC(hdc); -} - -static void test_ps_userstyle(void) -{ - static DWORD style[17] = {0, 2, 0, 4, 5, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 17}; - static DWORD bad_style[5] = {0, 0, 0, 0, 0}; - static DWORD bad_style2[5] = {4, 7, 8, 3, -1}; - - LOGBRUSH lb; - HPEN pen; - INT size, i; - - struct - { - EXTLOGPEN elp; - DWORD style_data[15]; - } ext_pen; - - lb.lbColor = 0x00ff0000; - lb.lbStyle = BS_SOLID; - lb.lbHatch = 0; - - pen = ExtCreatePen(PS_GEOMETRIC | PS_USERSTYLE, 50, &lb, 3, NULL); - ok(pen == 0, "ExtCreatePen should fail\n"); - if (pen == 0 && GetLastError() == 0xdeadbeef) - { - win_skip("Looks like 9x, skipping PS_USERSTYLE tests\n"); - return; - } - expect(ERROR_INVALID_PARAMETER, GetLastError()); - DeleteObject(pen); - SetLastError(0xdeadbeef); - - pen = ExtCreatePen(PS_GEOMETRIC | PS_USERSTYLE, 50, &lb, 0, style); - ok(pen == 0, "ExtCreatePen should fail\n"); - expect2(0xdeadbeef, ERROR_INVALID_PARAMETER, GetLastError()); - DeleteObject(pen); - SetLastError(0xdeadbeef); - - pen = ExtCreatePen(PS_GEOMETRIC | PS_USERSTYLE, 50, &lb, 17, style); - ok(pen == 0, "ExtCreatePen should fail\n"); - expect(ERROR_INVALID_PARAMETER, GetLastError()); - DeleteObject(pen); - SetLastError(0xdeadbeef); - - pen = ExtCreatePen(PS_GEOMETRIC | PS_USERSTYLE, 50, &lb, -1, style); - ok(pen == 0, "ExtCreatePen should fail\n"); - expect(0xdeadbeef, GetLastError()); - DeleteObject(pen); - SetLastError(0xdeadbeef); - - pen = ExtCreatePen(PS_GEOMETRIC | PS_USERSTYLE, 50, &lb, 5, bad_style); - ok(pen == 0, "ExtCreatePen should fail\n"); - expect(ERROR_INVALID_PARAMETER, GetLastError()); - DeleteObject(pen); - SetLastError(0xdeadbeef); - - pen = ExtCreatePen(PS_GEOMETRIC | PS_USERSTYLE, 50, &lb, 5, bad_style2); - ok(pen == 0, "ExtCreatePen should fail\n"); - expect(ERROR_INVALID_PARAMETER, GetLastError()); - DeleteObject(pen); - SetLastError(0xdeadbeef); - - pen = ExtCreatePen(PS_GEOMETRIC | PS_USERSTYLE, 50, &lb, 16, style); - ok(pen != 0, "ExtCreatePen should not fail\n"); - - size = GetObject(pen, sizeof(ext_pen), &ext_pen); - expect(FIELD_OFFSET(EXTLOGPEN,elpStyleEntry[16]), size); - - for(i = 0; i < 16; i++) - expect(style[i], ext_pen.elp.elpStyleEntry[i]); - - DeleteObject(pen); -} - -START_TEST(pen) -{ - test_logpen(); - test_ps_alternate(); - test_ps_userstyle(); -} diff --git a/rostests/winetests/gdi32/resource.rc b/rostests/winetests/gdi32/resource.rc deleted file mode 100644 index f172b80b58e..00000000000 --- a/rostests/winetests/gdi32/resource.rc +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Resources for gdi32 test suite. - * - * Copyright 2010 Dmitry Timoshkov - * - * 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 "windef.h" - -/* @makedep: wine_test.ttf */ -wine_test.ttf RCDATA wine_test.ttf diff --git a/rostests/winetests/gdi32/testlist.c b/rostests/winetests/gdi32/testlist.c deleted file mode 100644 index 370d1a1a45c..00000000000 --- a/rostests/winetests/gdi32/testlist.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_bitmap(void); -extern void func_brush(void); -extern void func_clipping(void); -extern void func_dc(void); -extern void func_dib(void); -extern void func_font(void); -extern void func_gdiobj(void); -extern void func_generated(void); -extern void func_icm(void); -extern void func_mapping(void); -extern void func_metafile(void); -extern void func_palette(void); -extern void func_path(void); -extern void func_pen(void); - -const struct test winetest_testlist[] = -{ - { "bitmap", func_bitmap }, - { "brush", func_brush }, - { "clipping", func_clipping }, - { "dc", func_dc }, - { "dib", func_dib }, - { "font", func_font }, - { "gdiobj", func_gdiobj }, - { "generated", func_generated }, - { "icm", func_icm }, - { "mapping", func_mapping }, - { "metafile", func_metafile }, - { "palette", func_palette }, - { "path", func_path }, - { "pen", func_pen }, - { 0, 0 } -}; diff --git a/rostests/winetests/gdi32/wine_test.sfd b/rostests/winetests/gdi32/wine_test.sfd deleted file mode 100644 index 5b735458940..00000000000 --- a/rostests/winetests/gdi32/wine_test.sfd +++ /dev/null @@ -1,180 +0,0 @@ -SplineFontDB: 3.0 -FontName: wine_test -FullName: wine_test -FamilyName: wine_test -Weight: Medium -Copyright: Copyright (c) 2010 Dmitry Timoshkov -Version: 001.000 -ItalicAngle: 0 -UnderlinePosition: -205 -UnderlineWidth: 102 -Ascent: 1638 -Descent: 410 -sfntRevision: 0x00010000 -LayerCount: 2 -Layer: 0 1 "Back" 1 -Layer: 1 1 "Fore" 0 -XUID: [1021 905 592216984 1247726] -FSType: 0 -OS2Version: 2 -OS2_WeightWidthSlopeOnly: 0 -OS2_UseTypoMetrics: 1 -CreationTime: 1288336343 -ModificationTime: 1288336873 -PfmFamily: 17 -TTFWeight: 500 -TTFWidth: 5 -LineGap: 184 -VLineGap: 0 -Panose: 2 0 6 3 0 0 0 0 0 0 -OS2TypoAscent: 0 -OS2TypoAOffset: 1 -OS2TypoDescent: 0 -OS2TypoDOffset: 1 -OS2TypoLinegap: 184 -OS2WinAscent: 0 -OS2WinAOffset: 1 -OS2WinDescent: 0 -OS2WinDOffset: 1 -HheadAscent: 0 -HheadAOffset: 1 -HheadDescent: 0 -HheadDOffset: 1 -OS2SubXSize: 1331 -OS2SubYSize: 1433 -OS2SubXOff: 0 -OS2SubYOff: 286 -OS2SupXSize: 1331 -OS2SupYSize: 1433 -OS2SupXOff: 0 -OS2SupYOff: 983 -OS2StrikeYSize: 102 -OS2StrikeYPos: 530 -OS2Vendor: 'Wine' -OS2CodePages: 00000001.00000000 -OS2UnicodeRanges: 00000001.00000000.00000000.00000000 -MarkAttachClasses: 1 -DEI: 91125 -ShortTable: cvt 2 - 68 - 1297 -EndShort -ShortTable: maxp 16 - 1 - 0 - 4 - 8 - 2 - 0 - 0 - 2 - 0 - 1 - 1 - 0 - 64 - 46 - 0 - 0 -EndShort -LangName: 1033 "" "" "" "Wine : wine_test : 4-11-2010" -GaspTable: 1 65535 2 -Encoding: UnicodeBmp -UnicodeInterp: none -NameList: Adobe Glyph List -DisplaySize: -24 -AntiAlias: 1 -FitToEm: 1 -WinInfo: 65 65 19 -BeginChars: 65539 4 - -StartChar: .notdef -Encoding: 65536 -1 0 -Width: 748 -Flags: W -TtInstrs: -PUSHB_2 - 1 - 0 -MDAP[rnd] -ALIGNRP -PUSHB_3 - 7 - 4 - 0 -MIRP[min,rnd,black] -SHP[rp2] -PUSHB_2 - 6 - 5 -MDRP[rp0,min,rnd,grey] -ALIGNRP -PUSHB_3 - 3 - 2 - 0 -MIRP[min,rnd,black] -SHP[rp2] -SVTCA[y-axis] -PUSHB_2 - 3 - 0 -MDAP[rnd] -ALIGNRP -PUSHB_3 - 5 - 4 - 0 -MIRP[min,rnd,black] -SHP[rp2] -PUSHB_3 - 7 - 6 - 1 -MIRP[rp0,min,rnd,grey] -ALIGNRP -PUSHB_3 - 1 - 2 - 0 -MIRP[min,rnd,black] -SHP[rp2] -EndTTInstrs -LayerCount: 2 -Fore -SplineSet -68 0 m 1,0,-1 - 68 1365 l 1,1,-1 - 612 1365 l 1,2,-1 - 612 0 l 1,3,-1 - 68 0 l 1,0,-1 -136 68 m 1,4,-1 - 544 68 l 1,5,-1 - 544 1297 l 1,6,-1 - 136 1297 l 1,7,-1 - 136 68 l 1,4,-1 -EndSplineSet -EndChar - -StartChar: .null -Encoding: 65537 -1 1 -Width: 0 -Flags: W -LayerCount: 2 -EndChar - -StartChar: nonmarkingreturn -Encoding: 65538 -1 2 -Width: 682 -Flags: W -LayerCount: 2 -EndChar - -StartChar: exclam -Encoding: 33 33 3 -Width: 0 -Flags: W -LayerCount: 2 -EndChar -EndChars -EndSplineFont diff --git a/rostests/winetests/gdi32/wine_test.ttf b/rostests/winetests/gdi32/wine_test.ttf deleted file mode 100644 index badef181fb4..00000000000 Binary files a/rostests/winetests/gdi32/wine_test.ttf and /dev/null differ diff --git a/rostests/winetests/gdiplus/CMakeLists.txt b/rostests/winetests/gdiplus/CMakeLists.txt deleted file mode 100644 index 28dd4c58177..00000000000 --- a/rostests/winetests/gdiplus/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - brush.c - customlinecap.c - font.c - graphics.c - graphicspath.c - image.c - matrix.c - pathiterator.c - pen.c - region.c - stringformat.c - testlist.c) - -add_executable(gdiplus_winetest ${SOURCE}) -target_link_libraries(gdiplus_winetest wine) -set_module_type(gdiplus_winetest win32cui) -add_importlibs(gdiplus_winetest gdiplus user32 gdi32 ole32 msvcrt kernel32 ntdll) -add_cd_file(TARGET gdiplus_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/gdiplus/brush.c b/rostests/winetests/gdiplus/brush.c deleted file mode 100644 index 0effcf40fd6..00000000000 --- a/rostests/winetests/gdiplus/brush.c +++ /dev/null @@ -1,730 +0,0 @@ -/* - * Unit test suite for brushes - * - * Copyright (C) 2007 Google (Evan Stade) - * - * 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 "windows.h" -#include "gdiplus.h" -#include "wine/test.h" -#include - -#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) -#define expectf(expected, got) ok(fabs(expected - got) < 0.0001, "Expected %.2f, got %.2f\n", expected, got) - -static void test_constructor_destructor(void) -{ - GpStatus status; - GpSolidFill *brush = NULL; - - status = GdipCreateSolidFill((ARGB)0xdeadbeef, &brush); - expect(Ok, status); - ok(brush != NULL, "Expected brush to be initialized\n"); - - status = GdipDeleteBrush(NULL); - expect(InvalidParameter, status); - - status = GdipDeleteBrush((GpBrush*) brush); - expect(Ok, status); -} - -static void test_type(void) -{ - GpStatus status; - GpBrushType bt; - GpSolidFill *brush = NULL; - - GdipCreateSolidFill((ARGB)0xdeadbeef, &brush); - - status = GdipGetBrushType((GpBrush*)brush, &bt); - expect(Ok, status); - expect(BrushTypeSolidColor, bt); - - GdipDeleteBrush((GpBrush*) brush); -} -static GpPointF blendcount_ptf[] = {{0.0, 0.0}, - {50.0, 50.0}}; -static void test_gradientblendcount(void) -{ - GpStatus status; - GpPathGradient *brush; - INT count; - - status = GdipCreatePathGradient(blendcount_ptf, 2, WrapModeClamp, &brush); - expect(Ok, status); - - status = GdipGetPathGradientBlendCount(NULL, NULL); - expect(InvalidParameter, status); - status = GdipGetPathGradientBlendCount(NULL, &count); - expect(InvalidParameter, status); - status = GdipGetPathGradientBlendCount(brush, NULL); - expect(InvalidParameter, status); - - status = GdipGetPathGradientBlendCount(brush, &count); - expect(Ok, status); - expect(1, count); - - GdipDeleteBrush((GpBrush*) brush); -} - -static GpPointF getblend_ptf[] = {{0.0, 0.0}, - {50.0, 50.0}}; -static void test_getblend(void) -{ - GpStatus status; - GpPathGradient *brush; - REAL blends[4]; - REAL pos[4]; - - status = GdipCreatePathGradient(getblend_ptf, 2, WrapModeClamp, &brush); - expect(Ok, status); - - /* check some invalid parameters combinations */ - status = GdipGetPathGradientBlend(NULL, NULL, NULL, -1); - expect(InvalidParameter, status); - status = GdipGetPathGradientBlend(brush,NULL, NULL, -1); - expect(InvalidParameter, status); - status = GdipGetPathGradientBlend(NULL, blends,NULL, -1); - expect(InvalidParameter, status); - status = GdipGetPathGradientBlend(NULL, NULL, pos, -1); - expect(InvalidParameter, status); - status = GdipGetPathGradientBlend(NULL, NULL, NULL, 1); - expect(InvalidParameter, status); - - blends[0] = (REAL)0xdeadbeef; - pos[0] = (REAL)0xdeadbeef; - status = GdipGetPathGradientBlend(brush, blends, pos, 1); - expect(Ok, status); - expectf(1.0, blends[0]); - expectf((REAL)0xdeadbeef, pos[0]); - - GdipDeleteBrush((GpBrush*) brush); -} - -static GpPointF getbounds_ptf[] = {{0.0, 20.0}, - {50.0, 50.0}, - {21.0, 25.0}, - {25.0, 46.0}}; -static void test_getbounds(void) -{ - GpStatus status; - GpPathGradient *brush; - GpRectF bounds; - - status = GdipCreatePathGradient(getbounds_ptf, 4, WrapModeClamp, &brush); - expect(Ok, status); - - status = GdipGetPathGradientRect(NULL, NULL); - expect(InvalidParameter, status); - status = GdipGetPathGradientRect(brush, NULL); - expect(InvalidParameter, status); - status = GdipGetPathGradientRect(NULL, &bounds); - expect(InvalidParameter, status); - - status = GdipGetPathGradientRect(brush, &bounds); - expect(Ok, status); - expectf(0.0, bounds.X); - expectf(20.0, bounds.Y); - expectf(50.0, bounds.Width); - expectf(30.0, bounds.Height); - - GdipDeleteBrush((GpBrush*) brush); -} - -static void test_getgamma(void) -{ - GpStatus status; - GpLineGradient *line; - GpPointF start, end; - BOOL gamma; - - start.X = start.Y = 0.0; - end.X = end.Y = 100.0; - - status = GdipCreateLineBrush(&start, &end, (ARGB)0xdeadbeef, 0xdeadbeef, WrapModeTile, &line); - expect(Ok, status); - - /* NULL arguments */ - status = GdipGetLineGammaCorrection(NULL, NULL); - expect(InvalidParameter, status); - status = GdipGetLineGammaCorrection(line, NULL); - expect(InvalidParameter, status); - status = GdipGetLineGammaCorrection(NULL, &gamma); - expect(InvalidParameter, status); - - GdipDeleteBrush((GpBrush*)line); -} - -static void test_transform(void) -{ - GpStatus status; - GpTexture *texture; - GpGraphics *graphics = NULL; - GpBitmap *bitmap; - HDC hdc = GetDC(0); - GpMatrix *m, *m1; - BOOL res; - - status = GdipCreateMatrix2(2.0, 0.0, 0.0, 0.0, 0.0, 0.0, &m); - expect(Ok, status); - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - status = GdipCreateBitmapFromGraphics(1, 1, graphics, &bitmap); - expect(Ok, status); - - status = GdipCreateTexture((GpImage*)bitmap, WrapModeTile, &texture); - expect(Ok, status); - - /* NULL */ - status = GdipGetTextureTransform(NULL, NULL); - expect(InvalidParameter, status); - status = GdipGetTextureTransform(texture, NULL); - expect(InvalidParameter, status); - - /* get default value - identity matrix */ - status = GdipGetTextureTransform(texture, m); - expect(Ok, status); - status = GdipIsMatrixIdentity(m, &res); - expect(Ok, status); - expect(TRUE, res); - /* set and get then */ - status = GdipCreateMatrix2(2.0, 0.0, 0.0, 2.0, 0.0, 0.0, &m1); - expect(Ok, status); - status = GdipSetTextureTransform(texture, m1); - expect(Ok, status); - status = GdipGetTextureTransform(texture, m); - expect(Ok, status); - status = GdipIsMatrixEqual(m, m1, &res); - expect(Ok, status); - expect(TRUE, res); - /* reset */ - status = GdipResetTextureTransform(texture); - expect(Ok, status); - status = GdipGetTextureTransform(texture, m); - expect(Ok, status); - status = GdipIsMatrixIdentity(m, &res); - expect(Ok, status); - expect(TRUE, res); - - status = GdipDeleteBrush((GpBrush*)texture); - expect(Ok, status); - - status = GdipDeleteMatrix(m1); - expect(Ok, status); - status = GdipDeleteMatrix(m); - expect(Ok, status); - status = GdipDisposeImage((GpImage*)bitmap); - expect(Ok, status); - status = GdipDeleteGraphics(graphics); - expect(Ok, status); - ReleaseDC(0, hdc); -} - -static void test_texturewrap(void) -{ - GpStatus status; - GpTexture *texture; - GpGraphics *graphics = NULL; - GpBitmap *bitmap; - HDC hdc = GetDC(0); - GpWrapMode wrap; - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - status = GdipCreateBitmapFromGraphics(1, 1, graphics, &bitmap); - expect(Ok, status); - - status = GdipCreateTexture((GpImage*)bitmap, WrapModeTile, &texture); - expect(Ok, status); - - /* NULL */ - status = GdipGetTextureWrapMode(NULL, NULL); - expect(InvalidParameter, status); - status = GdipGetTextureWrapMode(texture, NULL); - expect(InvalidParameter, status); - status = GdipGetTextureWrapMode(NULL, &wrap); - expect(InvalidParameter, status); - - /* get */ - wrap = WrapModeClamp; - status = GdipGetTextureWrapMode(texture, &wrap); - expect(Ok, status); - expect(WrapModeTile, wrap); - /* set, then get */ - wrap = WrapModeClamp; - status = GdipSetTextureWrapMode(texture, wrap); - expect(Ok, status); - wrap = WrapModeTile; - status = GdipGetTextureWrapMode(texture, &wrap); - expect(Ok, status); - expect(WrapModeClamp, wrap); - - status = GdipDeleteBrush((GpBrush*)texture); - expect(Ok, status); - status = GdipDisposeImage((GpImage*)bitmap); - expect(Ok, status); - status = GdipDeleteGraphics(graphics); - expect(Ok, status); - ReleaseDC(0, hdc); -} - -static void test_gradientgetrect(void) -{ - GpLineGradient *brush; - GpRectF rectf; - GpStatus status; - GpPointF pt1, pt2; - - pt1.X = pt1.Y = 1.0; - pt2.X = pt2.Y = 100.0; - status = GdipCreateLineBrush(&pt1, &pt2, 0, 0, WrapModeTile, &brush); - expect(Ok, status); - memset(&rectf, 0, sizeof(GpRectF)); - status = GdipGetLineRect(brush, &rectf); - expect(Ok, status); - expectf(1.0, rectf.X); - expectf(1.0, rectf.Y); - expectf(99.0, rectf.Width); - expectf(99.0, rectf.Height); - status = GdipDeleteBrush((GpBrush*)brush); - /* vertical gradient */ - pt1.X = pt1.Y = pt2.X = 0.0; - pt2.Y = 10.0; - status = GdipCreateLineBrush(&pt1, &pt2, 0, 0, WrapModeTile, &brush); - expect(Ok, status); - memset(&rectf, 0, sizeof(GpRectF)); - status = GdipGetLineRect(brush, &rectf); - expect(Ok, status); - expectf(-5.0, rectf.X); - expectf(0.0, rectf.Y); - expectf(10.0, rectf.Width); - expectf(10.0, rectf.Height); - status = GdipDeleteBrush((GpBrush*)brush); - /* horizontal gradient */ - pt1.X = pt1.Y = pt2.Y = 0.0; - pt2.X = 10.0; - status = GdipCreateLineBrush(&pt1, &pt2, 0, 0, WrapModeTile, &brush); - expect(Ok, status); - memset(&rectf, 0, sizeof(GpRectF)); - status = GdipGetLineRect(brush, &rectf); - expect(Ok, status); - expectf(0.0, rectf.X); - expectf(-5.0, rectf.Y); - expectf(10.0, rectf.Width); - expectf(10.0, rectf.Height); - status = GdipDeleteBrush((GpBrush*)brush); - /* slope = -1 */ - pt1.X = pt1.Y = 0.0; - pt2.X = 20.0; - pt2.Y = -20.0; - status = GdipCreateLineBrush(&pt1, &pt2, 0, 0, WrapModeTile, &brush); - expect(Ok, status); - memset(&rectf, 0, sizeof(GpRectF)); - status = GdipGetLineRect(brush, &rectf); - expect(Ok, status); - expectf(0.0, rectf.X); - expectf(-20.0, rectf.Y); - expectf(20.0, rectf.Width); - expectf(20.0, rectf.Height); - status = GdipDeleteBrush((GpBrush*)brush); - /* slope = 1/100 */ - pt1.X = pt1.Y = 0.0; - pt2.X = 100.0; - pt2.Y = 1.0; - status = GdipCreateLineBrush(&pt1, &pt2, 0, 0, WrapModeTile, &brush); - expect(Ok, status); - memset(&rectf, 0, sizeof(GpRectF)); - status = GdipGetLineRect(brush, &rectf); - expect(Ok, status); - expectf(0.0, rectf.X); - expectf(0.0, rectf.Y); - expectf(100.0, rectf.Width); - expectf(1.0, rectf.Height); - status = GdipDeleteBrush((GpBrush*)brush); - /* from rect with LinearGradientModeHorizontal */ - rectf.X = rectf.Y = 10.0; - rectf.Width = rectf.Height = 100.0; - status = GdipCreateLineBrushFromRect(&rectf, 0, 0, LinearGradientModeHorizontal, - WrapModeTile, &brush); - expect(Ok, status); - memset(&rectf, 0, sizeof(GpRectF)); - status = GdipGetLineRect(brush, &rectf); - expect(Ok, status); - expectf(10.0, rectf.X); - expectf(10.0, rectf.Y); - expectf(100.0, rectf.Width); - expectf(100.0, rectf.Height); - status = GdipDeleteBrush((GpBrush*)brush); - /* passing negative Width/Height to LinearGradientModeHorizontal */ - rectf.X = rectf.Y = 10.0; - rectf.Width = rectf.Height = -100.0; - status = GdipCreateLineBrushFromRect(&rectf, 0, 0, LinearGradientModeHorizontal, - WrapModeTile, &brush); - expect(Ok, status); - memset(&rectf, 0, sizeof(GpRectF)); - status = GdipGetLineRect(brush, &rectf); - expect(Ok, status); - expectf(10.0, rectf.X); - expectf(10.0, rectf.Y); - expectf(-100.0, rectf.Width); - expectf(-100.0, rectf.Height); - status = GdipDeleteBrush((GpBrush*)brush); -} - -static void test_lineblend(void) -{ - GpLineGradient *brush; - GpStatus status; - GpPointF pt1, pt2; - INT count=10; - int i; - const REAL factors[5] = {0.0f, 0.1f, 0.5f, 0.9f, 1.0f}; - const REAL positions[5] = {0.0f, 0.2f, 0.5f, 0.8f, 1.0f}; - const REAL two_positions[2] = {0.0f, 1.0f}; - const ARGB colors[5] = {0xff0000ff, 0xff00ff00, 0xff00ffff, 0xffff0000, 0xffffffff}; - REAL res_factors[6] = {0.3f, 0.0f, 0.0f, 0.0f, 0.0f}; - REAL res_positions[6] = {0.3f, 0.0f, 0.0f, 0.0f, 0.0f}; - ARGB res_colors[6] = {0xdeadbeef, 0, 0, 0, 0}; - - pt1.X = pt1.Y = 1.0; - pt2.X = pt2.Y = 100.0; - status = GdipCreateLineBrush(&pt1, &pt2, 0, 0, WrapModeTile, &brush); - expect(Ok, status); - - status = GdipGetLineBlendCount(NULL, &count); - expect(InvalidParameter, status); - - status = GdipGetLineBlendCount(brush, NULL); - expect(InvalidParameter, status); - - status = GdipGetLineBlendCount(brush, &count); - expect(Ok, status); - expect(1, count); - - status = GdipGetLineBlend(NULL, res_factors, res_positions, 1); - expect(InvalidParameter, status); - - status = GdipGetLineBlend(brush, NULL, res_positions, 1); - expect(InvalidParameter, status); - - status = GdipGetLineBlend(brush, res_factors, NULL, 1); - expect(InvalidParameter, status); - - status = GdipGetLineBlend(brush, res_factors, res_positions, 0); - expect(InvalidParameter, status); - - status = GdipGetLineBlend(brush, res_factors, res_positions, -1); - expect(InvalidParameter, status); - - status = GdipGetLineBlend(brush, res_factors, res_positions, 1); - expect(Ok, status); - - status = GdipGetLineBlend(brush, res_factors, res_positions, 2); - expect(Ok, status); - - status = GdipSetLineBlend(NULL, factors, positions, 5); - expect(InvalidParameter, status); - - status = GdipSetLineBlend(brush, NULL, positions, 5); - expect(InvalidParameter, status); - - status = GdipSetLineBlend(brush, factors, NULL, 5); - expect(InvalidParameter, status); - - status = GdipSetLineBlend(brush, factors, positions, 0); - expect(InvalidParameter, status); - - status = GdipSetLineBlend(brush, factors, positions, -1); - expect(InvalidParameter, status); - - /* leave off the 0.0 position */ - status = GdipSetLineBlend(brush, &factors[1], &positions[1], 4); - expect(InvalidParameter, status); - - /* leave off the 1.0 position */ - status = GdipSetLineBlend(brush, factors, positions, 4); - expect(InvalidParameter, status); - - status = GdipSetLineBlend(brush, factors, positions, 5); - expect(Ok, status); - - status = GdipGetLineBlendCount(brush, &count); - expect(Ok, status); - expect(5, count); - - status = GdipGetLineBlend(brush, res_factors, res_positions, 4); - expect(InsufficientBuffer, status); - - status = GdipGetLineBlend(brush, res_factors, res_positions, 5); - expect(Ok, status); - - for (i=0; i<5; i++) - { - expectf(factors[i], res_factors[i]); - expectf(positions[i], res_positions[i]); - } - - status = GdipGetLineBlend(brush, res_factors, res_positions, 6); - expect(Ok, status); - - status = GdipSetLineBlend(brush, factors, positions, 1); - expect(Ok, status); - - status = GdipGetLineBlendCount(brush, &count); - expect(Ok, status); - expect(1, count); - - status = GdipGetLineBlend(brush, res_factors, res_positions, 1); - expect(Ok, status); - - status = GdipGetLinePresetBlendCount(NULL, &count); - expect(InvalidParameter, status); - - status = GdipGetLinePresetBlendCount(brush, NULL); - expect(InvalidParameter, status); - - status = GdipGetLinePresetBlendCount(brush, &count); - expect(Ok, status); - expect(0, count); - - status = GdipGetLinePresetBlend(NULL, res_colors, res_positions, 1); - expect(InvalidParameter, status); - - status = GdipGetLinePresetBlend(brush, NULL, res_positions, 1); - expect(InvalidParameter, status); - - status = GdipGetLinePresetBlend(brush, res_colors, NULL, 1); - expect(InvalidParameter, status); - - status = GdipGetLinePresetBlend(brush, res_colors, res_positions, 0); - expect(InvalidParameter, status); - - status = GdipGetLinePresetBlend(brush, res_colors, res_positions, -1); - expect(InvalidParameter, status); - - status = GdipGetLinePresetBlend(brush, res_colors, res_positions, 1); - expect(InvalidParameter, status); - - status = GdipGetLinePresetBlend(brush, res_colors, res_positions, 2); - expect(GenericError, status); - - status = GdipSetLinePresetBlend(NULL, colors, positions, 5); - expect(InvalidParameter, status); - - status = GdipSetLinePresetBlend(brush, NULL, positions, 5); - expect(InvalidParameter, status); - - status = GdipSetLinePresetBlend(brush, colors, NULL, 5); - expect(InvalidParameter, status); - - status = GdipSetLinePresetBlend(brush, colors, positions, 0); - expect(InvalidParameter, status); - - status = GdipSetLinePresetBlend(brush, colors, positions, -1); - expect(InvalidParameter, status); - - status = GdipSetLinePresetBlend(brush, colors, positions, 1); - expect(InvalidParameter, status); - - /* leave off the 0.0 position */ - status = GdipSetLinePresetBlend(brush, &colors[1], &positions[1], 4); - expect(InvalidParameter, status); - - /* leave off the 1.0 position */ - status = GdipSetLinePresetBlend(brush, colors, positions, 4); - expect(InvalidParameter, status); - - status = GdipSetLinePresetBlend(brush, colors, positions, 5); - expect(Ok, status); - - status = GdipGetLinePresetBlendCount(brush, &count); - expect(Ok, status); - expect(5, count); - - status = GdipGetLinePresetBlend(brush, res_colors, res_positions, 4); - expect(InsufficientBuffer, status); - - status = GdipGetLinePresetBlend(brush, res_colors, res_positions, 5); - expect(Ok, status); - - for (i=0; i<5; i++) - { - expect(colors[i], res_colors[i]); - expectf(positions[i], res_positions[i]); - } - - status = GdipGetLinePresetBlend(brush, res_colors, res_positions, 6); - expect(Ok, status); - - status = GdipSetLinePresetBlend(brush, colors, two_positions, 2); - expect(Ok, status); - - status = GdipDeleteBrush((GpBrush*)brush); - expect(Ok, status); -} - -static void test_linelinearblend(void) -{ - GpLineGradient *brush; - GpStatus status; - GpPointF pt1, pt2; - INT count=10; - REAL res_factors[3] = {0.3f}; - REAL res_positions[3] = {0.3f}; - - status = GdipSetLineLinearBlend(NULL, 0.6, 0.8); - expect(InvalidParameter, status); - - pt1.X = pt1.Y = 1.0; - pt2.X = pt2.Y = 100.0; - status = GdipCreateLineBrush(&pt1, &pt2, 0, 0, WrapModeTile, &brush); - expect(Ok, status); - - - status = GdipSetLineLinearBlend(brush, 0.6, 0.8); - expect(Ok, status); - - status = GdipGetLineBlendCount(brush, &count); - expect(Ok, status); - expect(3, count); - - status = GdipGetLineBlend(brush, res_factors, res_positions, 3); - expect(Ok, status); - expectf(0.0, res_factors[0]); - expectf(0.0, res_positions[0]); - expectf(0.8, res_factors[1]); - expectf(0.6, res_positions[1]); - expectf(0.0, res_factors[2]); - expectf(1.0, res_positions[2]); - - - status = GdipSetLineLinearBlend(brush, 0.0, 0.8); - expect(Ok, status); - - status = GdipGetLineBlendCount(brush, &count); - expect(Ok, status); - expect(2, count); - - status = GdipGetLineBlend(brush, res_factors, res_positions, 3); - expect(Ok, status); - expectf(0.8, res_factors[0]); - expectf(0.0, res_positions[0]); - expectf(0.0, res_factors[1]); - expectf(1.0, res_positions[1]); - - - status = GdipSetLineLinearBlend(brush, 1.0, 0.8); - expect(Ok, status); - - status = GdipGetLineBlendCount(brush, &count); - expect(Ok, status); - expect(2, count); - - status = GdipGetLineBlend(brush, res_factors, res_positions, 3); - expect(Ok, status); - expectf(0.0, res_factors[0]); - expectf(0.0, res_positions[0]); - expectf(0.8, res_factors[1]); - expectf(1.0, res_positions[1]); - - status = GdipDeleteBrush((GpBrush*)brush); - expect(Ok, status); -} - -static void test_gradientsurroundcolorcount(void) -{ - GpStatus status; - GpPathGradient *grad; - ARGB *color; - INT count = 3; - - status = GdipCreatePathGradient(blendcount_ptf, 2, WrapModeClamp, &grad); - expect(Ok, status); - - color = GdipAlloc(sizeof(ARGB[3])); - - status = GdipSetPathGradientSurroundColorsWithCount(grad, color, &count); - expect(InvalidParameter, status); - GdipFree(color); - - count = 2; - - color = GdipAlloc(sizeof(ARGB[2])); - - color[0] = 0x00ff0000; - color[1] = 0x0000ff00; - - status = GdipSetPathGradientSurroundColorsWithCount(NULL, color, &count); - expect(InvalidParameter, status); - - status = GdipSetPathGradientSurroundColorsWithCount(grad, NULL, &count); - expect(InvalidParameter, status); - - /* WinXP crashes on this test */ - if(0) - { - status = GdipSetPathGradientSurroundColorsWithCount(grad, color, NULL); - expect(InvalidParameter, status); - } - - status = GdipSetPathGradientSurroundColorsWithCount(grad, color, &count); - todo_wine expect(Ok, status); - expect(2, count); - - status = GdipGetPathGradientSurroundColorCount(NULL, &count); - expect(InvalidParameter, status); - - status = GdipGetPathGradientSurroundColorCount(grad, NULL); - expect(InvalidParameter, status); - - count = 0; - status = GdipGetPathGradientSurroundColorCount(grad, &count); - todo_wine expect(Ok, status); - todo_wine expect(2, count); - - GdipFree(color); - GdipDeleteBrush((GpBrush*)grad); -} - -START_TEST(brush) -{ - struct GdiplusStartupInput gdiplusStartupInput; - ULONG_PTR gdiplusToken; - - gdiplusStartupInput.GdiplusVersion = 1; - gdiplusStartupInput.DebugEventCallback = NULL; - gdiplusStartupInput.SuppressBackgroundThread = 0; - gdiplusStartupInput.SuppressExternalCodecs = 0; - - GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); - - test_constructor_destructor(); - test_type(); - test_gradientblendcount(); - test_getblend(); - test_getbounds(); - test_getgamma(); - test_transform(); - test_texturewrap(); - test_gradientgetrect(); - test_lineblend(); - test_linelinearblend(); - test_gradientsurroundcolorcount(); - - GdiplusShutdown(gdiplusToken); -} diff --git a/rostests/winetests/gdiplus/customlinecap.c b/rostests/winetests/gdiplus/customlinecap.c deleted file mode 100644 index 218e46d2c48..00000000000 --- a/rostests/winetests/gdiplus/customlinecap.c +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Unit test suite for customlinecap - * - * Copyright (C) 2008 Nikolay Sivov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "windows.h" -#include "gdiplus.h" -#include "wine/test.h" - -#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) -#define expectf(expected, got) ok(got == expected, "Expected %.2f, got %.2f\n", expected, got) - -static void test_constructor_destructor(void) -{ - GpCustomLineCap *custom; - GpPath *path, *path2; - GpStatus stat; - - stat = GdipCreatePath(FillModeAlternate, &path); - expect(Ok, stat); - stat = GdipAddPathRectangle(path, 5.0, 5.0, 10.0, 10.0); - expect(Ok, stat); - - stat = GdipCreatePath(FillModeAlternate, &path2); - expect(Ok, stat); - stat = GdipAddPathRectangle(path2, 5.0, 5.0, 10.0, 10.0); - expect(Ok, stat); - - /* NULL args */ - stat = GdipCreateCustomLineCap(NULL, NULL, LineCapFlat, 0.0, NULL); - expect(InvalidParameter, stat); - stat = GdipCreateCustomLineCap(path, NULL, LineCapFlat, 0.0, NULL); - expect(InvalidParameter, stat); - stat = GdipCreateCustomLineCap(NULL, path, LineCapFlat, 0.0, NULL); - expect(InvalidParameter, stat); - stat = GdipCreateCustomLineCap(NULL, NULL, LineCapFlat, 0.0, &custom); - expect(InvalidParameter, stat); - stat = GdipDeleteCustomLineCap(NULL); - expect(InvalidParameter, stat); - - /* valid args */ - stat = GdipCreateCustomLineCap(NULL, path2, LineCapFlat, 0.0, &custom); - expect(Ok, stat); - stat = GdipDeleteCustomLineCap(custom); - expect(Ok, stat); - /* it's strange but native returns NotImplemented on stroke == NULL */ - custom = NULL; - stat = GdipCreateCustomLineCap(path, NULL, LineCapFlat, 10.0, &custom); - todo_wine expect(NotImplemented, stat); - todo_wine ok(custom == NULL, "Expected a failure on creation\n"); - if(stat == Ok) GdipDeleteCustomLineCap(custom); - - GdipDeletePath(path2); - GdipDeletePath(path); -} - -static void test_linejoin(void) -{ - GpCustomLineCap *custom; - GpPath *path; - GpLineJoin join; - GpStatus stat; - - stat = GdipCreatePath(FillModeAlternate, &path); - expect(Ok, stat); - stat = GdipAddPathRectangle(path, 5.0, 5.0, 10.0, 10.0); - expect(Ok, stat); - - stat = GdipCreateCustomLineCap(NULL, path, LineCapFlat, 0.0, &custom); - expect(Ok, stat); - - /* NULL args */ - stat = GdipGetCustomLineCapStrokeJoin(NULL, NULL); - expect(InvalidParameter, stat); - stat = GdipGetCustomLineCapStrokeJoin(custom, NULL); - expect(InvalidParameter, stat); - stat = GdipGetCustomLineCapStrokeJoin(NULL, &join); - expect(InvalidParameter, stat); - stat = GdipSetCustomLineCapStrokeJoin(NULL, LineJoinBevel); - expect(InvalidParameter, stat); - - /* LineJoinMiter is default */ - stat = GdipGetCustomLineCapStrokeJoin(custom, &join); - expect(Ok, stat); - expect(LineJoinMiter, join); - - /* set/get */ - stat = GdipSetCustomLineCapStrokeJoin(custom, LineJoinBevel); - expect(Ok, stat); - stat = GdipGetCustomLineCapStrokeJoin(custom, &join); - expect(Ok, stat); - expect(LineJoinBevel, join); - stat = GdipSetCustomLineCapStrokeJoin(custom, LineJoinRound); - expect(Ok, stat); - stat = GdipGetCustomLineCapStrokeJoin(custom, &join); - expect(Ok, stat); - expect(LineJoinRound, join); - stat = GdipSetCustomLineCapStrokeJoin(custom, LineJoinMiterClipped); - expect(Ok, stat); - stat = GdipGetCustomLineCapStrokeJoin(custom, &join); - expect(Ok, stat); - expect(LineJoinMiterClipped, join); - - GdipDeleteCustomLineCap(custom); - GdipDeletePath(path); -} - -static void test_inset(void) -{ - GpCustomLineCap *custom; - GpPath *path; - REAL inset; - GpStatus stat; - - stat = GdipCreatePath(FillModeAlternate, &path); - expect(Ok, stat); - stat = GdipAddPathRectangle(path, 5.0, 5.0, 10.0, 10.0); - expect(Ok, stat); - - stat = GdipCreateCustomLineCap(NULL, path, LineCapFlat, 0.0, &custom); - expect(Ok, stat); - - /* NULL args */ - stat = GdipGetCustomLineCapBaseInset(NULL, NULL); - expect(InvalidParameter, stat); - stat = GdipGetCustomLineCapBaseInset(NULL, &inset); - expect(InvalidParameter, stat); - stat = GdipGetCustomLineCapBaseInset(custom, NULL); - expect(InvalidParameter, stat); - /* valid args */ - inset = (REAL)0xdeadbeef; - stat = GdipGetCustomLineCapBaseInset(custom, &inset); - expect(Ok, stat); - expectf(0.0, inset); - - GdipDeleteCustomLineCap(custom); - GdipDeletePath(path); -} - -static void test_scale(void) -{ - GpCustomLineCap *custom; - GpPath *path; - REAL scale; - GpStatus stat; - - stat = GdipCreatePath(FillModeAlternate, &path); - expect(Ok, stat); - stat = GdipAddPathRectangle(path, 5.0, 5.0, 10.0, 10.0); - expect(Ok, stat); - - stat = GdipCreateCustomLineCap(NULL, path, LineCapFlat, 0.0, &custom); - expect(Ok, stat); - - /* NULL args */ - stat = GdipGetCustomLineCapWidthScale(NULL, NULL); - expect(InvalidParameter, stat); - stat = GdipGetCustomLineCapWidthScale(NULL, &scale); - expect(InvalidParameter, stat); - stat = GdipGetCustomLineCapWidthScale(custom, NULL); - expect(InvalidParameter, stat); - /* valid args */ - scale = (REAL)0xdeadbeef; - stat = GdipGetCustomLineCapWidthScale(custom, &scale); - expect(Ok, stat); - expectf(1.0, scale); - - GdipDeleteCustomLineCap(custom); - GdipDeletePath(path); -} - -START_TEST(customlinecap) -{ - struct GdiplusStartupInput gdiplusStartupInput; - ULONG_PTR gdiplusToken; - - gdiplusStartupInput.GdiplusVersion = 1; - gdiplusStartupInput.DebugEventCallback = NULL; - gdiplusStartupInput.SuppressBackgroundThread = 0; - gdiplusStartupInput.SuppressExternalCodecs = 0; - - GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); - - test_constructor_destructor(); - test_linejoin(); - test_inset(); - test_scale(); - - GdiplusShutdown(gdiplusToken); -} diff --git a/rostests/winetests/gdiplus/font.c b/rostests/winetests/gdiplus/font.c deleted file mode 100644 index c2ed3c70b30..00000000000 --- a/rostests/winetests/gdiplus/font.c +++ /dev/null @@ -1,445 +0,0 @@ -/* - * Unit test suite for fonts - * - * Copyright (C) 2007 Google (Evan Stade) - * - * 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 "windows.h" -#include "gdiplus.h" -#include "wine/test.h" - -#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) -#define expectf(expected, got) ok(fabs(expected - got) < 0.0001, "Expected %.2f, got %.2f\n", expected, got) - -static const WCHAR arial[] = {'A','r','i','a','l','\0'}; -static const WCHAR nonexistent[] = {'T','h','i','s','F','o','n','t','s','h','o','u','l','d','N','o','t','E','x','i','s','t','\0'}; -static const WCHAR MSSansSerif[] = {'M','S',' ','S','a','n','s',' ','S','e','r','i','f','\0'}; -static const WCHAR MicrosoftSansSerif[] = {'M','i','c','r','o','s','o','f','t',' ','S','a','n','s',' ','S','e','r','i','f','\0'}; -static const WCHAR TimesNewRoman[] = {'T','i','m','e','s',' ','N','e','w',' ','R','o','m','a','n','\0'}; -static const WCHAR CourierNew[] = {'C','o','u','r','i','e','r',' ','N','e','w','\0'}; -static const WCHAR Tahoma[] = {'T','a','h','o','m','a',0}; - -static void test_createfont(void) -{ - GpFontFamily* fontfamily = NULL, *fontfamily2; - GpFont* font = NULL; - GpStatus stat; - Unit unit; - UINT i; - REAL size; - WCHAR familyname[LF_FACESIZE]; - - stat = GdipCreateFontFamilyFromName(nonexistent, NULL, &fontfamily); - expect (FontFamilyNotFound, stat); - stat = GdipDeleteFont(font); - expect (InvalidParameter, stat); - stat = GdipCreateFontFamilyFromName(arial, NULL, &fontfamily); - if(stat == FontFamilyNotFound) - { - skip("Arial not installed\n"); - return; - } - expect (Ok, stat); - stat = GdipCreateFont(fontfamily, 12, FontStyleRegular, UnitPoint, &font); - expect (Ok, stat); - stat = GdipGetFontUnit (font, &unit); - expect (Ok, stat); - expect (UnitPoint, unit); - - stat = GdipGetFamily(font, &fontfamily2); - expect(Ok, stat); - stat = GdipGetFamilyName(fontfamily2, familyname, 0); - expect(Ok, stat); - ok (lstrcmpiW(arial, familyname) == 0, "Expected arial, got %s\n", - wine_dbgstr_w(familyname)); - stat = GdipDeleteFontFamily(fontfamily2); - expect(Ok, stat); - - /* Test to see if returned size is based on unit (its not) */ - GdipGetFontSize(font, &size); - ok (size == 12, "Expected 12, got %f\n", size); - GdipDeleteFont(font); - - /* Make sure everything is converted correctly for all Units */ - for (i = UnitWorld; i <=UnitMillimeter; i++) - { - if (i == UnitDisplay) continue; /* Crashes WindowsXP, wtf? */ - GdipCreateFont(fontfamily, 24, FontStyleRegular, i, &font); - GdipGetFontSize (font, &size); - ok (size == 24, "Expected 24, got %f (with unit: %d)\n", size, i); - GdipGetFontUnit (font, &unit); - expect (i, unit); - GdipDeleteFont(font); - } - - GdipDeleteFontFamily(fontfamily); -} - -static void test_logfont(void) -{ - LOGFONTA lfa, lfa2; - GpFont *font; - GpStatus stat; - GpGraphics *graphics; - HDC hdc = GetDC(0); - INT style; - - GdipCreateFromHDC(hdc, &graphics); - memset(&lfa, 0, sizeof(LOGFONTA)); - memset(&lfa2, 0xff, sizeof(LOGFONTA)); - - /* empty FaceName */ - lfa.lfFaceName[0] = 0; - stat = GdipCreateFontFromLogfontA(hdc, &lfa, &font); - expect(NotTrueTypeFont, stat); - - lstrcpyA(lfa.lfFaceName, "Arial"); - - stat = GdipCreateFontFromLogfontA(hdc, &lfa, &font); - if (stat == FileNotFound) - { - skip("Arial not installed.\n"); - return; - } - expect(Ok, stat); - stat = GdipGetLogFontA(font, graphics, &lfa2); - expect(Ok, stat); - - ok(lfa2.lfHeight < 0, "Expected negative height\n"); - expect(0, lfa2.lfWidth); - expect(0, lfa2.lfEscapement); - expect(0, lfa2.lfOrientation); - ok((lfa2.lfWeight >= 100) && (lfa2.lfWeight <= 900), "Expected weight to be set\n"); - expect(0, lfa2.lfItalic); - expect(0, lfa2.lfUnderline); - expect(0, lfa2.lfStrikeOut); - expect(GetTextCharset(hdc), lfa2.lfCharSet); - expect(0, lfa2.lfOutPrecision); - expect(0, lfa2.lfClipPrecision); - expect(0, lfa2.lfQuality); - expect(0, lfa2.lfPitchAndFamily); - - GdipDeleteFont(font); - - memset(&lfa, 0, sizeof(LOGFONTA)); - lfa.lfHeight = 25; - lfa.lfWidth = 25; - lfa.lfEscapement = lfa.lfOrientation = 50; - lfa.lfItalic = lfa.lfUnderline = lfa.lfStrikeOut = TRUE; - - memset(&lfa2, 0xff, sizeof(LOGFONTA)); - lstrcpyA(lfa.lfFaceName, "Arial"); - - stat = GdipCreateFontFromLogfontA(hdc, &lfa, &font); - expect(Ok, stat); - stat = GdipGetLogFontA(font, graphics, &lfa2); - expect(Ok, stat); - - ok(lfa2.lfHeight < 0, "Expected negative height\n"); - expect(0, lfa2.lfWidth); - expect(0, lfa2.lfEscapement); - expect(0, lfa2.lfOrientation); - ok((lfa2.lfWeight >= 100) && (lfa2.lfWeight <= 900), "Expected weight to be set\n"); - expect(TRUE, lfa2.lfItalic); - expect(TRUE, lfa2.lfUnderline); - expect(TRUE, lfa2.lfStrikeOut); - expect(GetTextCharset(hdc), lfa2.lfCharSet); - expect(0, lfa2.lfOutPrecision); - expect(0, lfa2.lfClipPrecision); - expect(0, lfa2.lfQuality); - expect(0, lfa2.lfPitchAndFamily); - - stat = GdipGetFontStyle(font, &style); - expect(Ok, stat); - ok (style == (FontStyleItalic | FontStyleUnderline | FontStyleStrikeout), - "Expected , got %d\n", style); - - GdipDeleteFont(font); - - GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); -} - -static void test_fontfamily (void) -{ - GpFontFamily *family, *clonedFontFamily; - WCHAR itsName[LF_FACESIZE]; - GpStatus stat; - - /* FontFamily cannot be NULL */ - stat = GdipCreateFontFamilyFromName (arial , NULL, NULL); - expect (InvalidParameter, stat); - - /* FontFamily must be able to actually find the family. - * If it can't, any subsequent calls should fail. - */ - stat = GdipCreateFontFamilyFromName (nonexistent, NULL, &family); - expect (FontFamilyNotFound, stat); - - /* Bitmap fonts are not found */ - stat = GdipCreateFontFamilyFromName (MSSansSerif, NULL, &family); - expect (FontFamilyNotFound, stat); - if(stat == Ok) GdipDeleteFontFamily(family); - - stat = GdipCreateFontFamilyFromName (arial, NULL, &family); - if(stat == FontFamilyNotFound) - { - skip("Arial not installed\n"); - return; - } - expect (Ok, stat); - - stat = GdipGetFamilyName (family, itsName, LANG_NEUTRAL); - expect (Ok, stat); - expect (0, lstrcmpiW(itsName, arial)); - - if (0) - { - /* Crashes on Windows XP SP2, Vista, and so Wine as well */ - stat = GdipGetFamilyName (family, NULL, LANG_NEUTRAL); - expect (Ok, stat); - } - - /* Make sure we don't read old data */ - ZeroMemory (itsName, sizeof(itsName)); - stat = GdipCloneFontFamily(family, &clonedFontFamily); - expect (Ok, stat); - GdipDeleteFontFamily(family); - stat = GdipGetFamilyName(clonedFontFamily, itsName, LANG_NEUTRAL); - expect(Ok, stat); - expect(0, lstrcmpiW(itsName, arial)); - - GdipDeleteFontFamily(clonedFontFamily); -} - -static void test_fontfamily_properties (void) -{ - GpFontFamily* FontFamily = NULL; - GpStatus stat; - UINT16 result = 0; - - stat = GdipCreateFontFamilyFromName(arial, NULL, &FontFamily); - if(stat == FontFamilyNotFound) - skip("Arial not installed\n"); - else - { - stat = GdipGetLineSpacing(FontFamily, FontStyleRegular, &result); - expect(Ok, stat); - ok (result == 2355, "Expected 2355, got %d\n", result); - result = 0; - stat = GdipGetEmHeight(FontFamily, FontStyleRegular, &result); - expect(Ok, stat); - ok(result == 2048, "Expected 2048, got %d\n", result); - result = 0; - stat = GdipGetCellAscent(FontFamily, FontStyleRegular, &result); - expect(Ok, stat); - ok(result == 1854, "Expected 1854, got %d\n", result); - result = 0; - stat = GdipGetCellDescent(FontFamily, FontStyleRegular, &result); - ok(result == 434, "Expected 434, got %d\n", result); - GdipDeleteFontFamily(FontFamily); - } - - stat = GdipCreateFontFamilyFromName(TimesNewRoman, NULL, &FontFamily); - if(stat == FontFamilyNotFound) - skip("Times New Roman not installed\n"); - else - { - result = 0; - stat = GdipGetLineSpacing(FontFamily, FontStyleRegular, &result); - expect(Ok, stat); - ok(result == 2355, "Expected 2355, got %d\n", result); - result = 0; - stat = GdipGetEmHeight(FontFamily, FontStyleRegular, &result); - expect(Ok, stat); - ok(result == 2048, "Expected 2048, got %d\n", result); - result = 0; - stat = GdipGetCellAscent(FontFamily, FontStyleRegular, &result); - expect(Ok, stat); - ok(result == 1825, "Expected 1825, got %d\n", result); - result = 0; - stat = GdipGetCellDescent(FontFamily, FontStyleRegular, &result); - ok(result == 443, "Expected 443 got %d\n", result); - GdipDeleteFontFamily(FontFamily); - } -} - -static void test_getgenerics (void) -{ - GpStatus stat; - GpFontFamily* family; - WCHAR familyName[LF_FACESIZE]; - ZeroMemory(familyName, sizeof(familyName)/sizeof(WCHAR)); - - stat = GdipGetGenericFontFamilySansSerif (&family); - if (stat == FontFamilyNotFound) - { - skip("Microsoft Sans Serif not installed\n"); - goto serif; - } - expect (Ok, stat); - stat = GdipGetFamilyName (family, familyName, LANG_NEUTRAL); - expect (Ok, stat); - if (!lstrcmpiW(familyName, Tahoma)) - todo_wine ok ((lstrcmpiW(familyName, MicrosoftSansSerif) == 0), - "Expected Microsoft Sans Serif, got Tahoma\n"); - else - ok ((lstrcmpiW(familyName, MicrosoftSansSerif) == 0), - "Expected Microsoft Sans Serif, got %s\n", wine_dbgstr_w(familyName)); - stat = GdipDeleteFontFamily (family); - expect (Ok, stat); - -serif: - stat = GdipGetGenericFontFamilySerif (&family); - if (stat == FontFamilyNotFound) - { - skip("Times New Roman not installed\n"); - goto monospace; - } - expect (Ok, stat); - stat = GdipGetFamilyName (family, familyName, LANG_NEUTRAL); - expect (Ok, stat); - ok (lstrcmpiW(familyName, TimesNewRoman) == 0, - "Expected Times New Roman, got %s\n", wine_dbgstr_w(familyName)); - stat = GdipDeleteFontFamily (family); - expect (Ok, stat); - -monospace: - stat = GdipGetGenericFontFamilyMonospace (&family); - if (stat == FontFamilyNotFound) - { - skip("Courier New not installed\n"); - return; - } - expect (Ok, stat); - stat = GdipGetFamilyName (family, familyName, LANG_NEUTRAL); - expect (Ok, stat); - ok (lstrcmpiW(familyName, CourierNew) == 0, - "Expected Courier New, got %s\n", wine_dbgstr_w(familyName)); - stat = GdipDeleteFontFamily (family); - expect (Ok, stat); -} - -static void test_installedfonts (void) -{ - GpStatus stat; - GpFontCollection* collection=NULL; - - stat = GdipNewInstalledFontCollection(NULL); - expect (InvalidParameter, stat); - - stat = GdipNewInstalledFontCollection(&collection); - expect (Ok, stat); - ok (collection != NULL, "got NULL font collection\n"); -} - -static void test_heightgivendpi(void) -{ - GpStatus stat; - GpFont* font = NULL; - GpFontFamily* fontfamily = NULL; - REAL height; - - stat = GdipCreateFontFamilyFromName(arial, NULL, &fontfamily); - if(stat == FontFamilyNotFound) - { - skip("Arial not installed\n"); - return; - } - expect(Ok, stat); - - stat = GdipCreateFont(fontfamily, 30, FontStyleRegular, UnitPixel, &font); - expect(Ok, stat); - - stat = GdipGetFontHeightGivenDPI(NULL, 96, &height); - expect(InvalidParameter, stat); - - stat = GdipGetFontHeightGivenDPI(font, 96, NULL); - expect(InvalidParameter, stat); - - stat = GdipGetFontHeightGivenDPI(font, 96, &height); - expect(Ok, stat); - expectf((REAL)34.497070, height); - GdipDeleteFont(font); - - height = 12345; - stat = GdipCreateFont(fontfamily, 30, FontStyleRegular, UnitWorld, &font); - expect(Ok, stat); - stat = GdipGetFontHeightGivenDPI(font, 96, &height); - expect(Ok, stat); - expectf((REAL)34.497070, height); - GdipDeleteFont(font); - - height = 12345; - stat = GdipCreateFont(fontfamily, 30, FontStyleRegular, UnitPoint, &font); - expect(Ok, stat); - stat = GdipGetFontHeightGivenDPI(font, 96, &height); - expect(Ok, stat); - expectf((REAL)45.996094, height); - GdipDeleteFont(font); - - height = 12345; - stat = GdipCreateFont(fontfamily, 30, FontStyleRegular, UnitInch, &font); - expect(Ok, stat); - stat = GdipGetFontHeightGivenDPI(font, 96, &height); - expect(Ok, stat); - expectf((REAL)3311.718750, height); - GdipDeleteFont(font); - - height = 12345; - stat = GdipCreateFont(fontfamily, 30, FontStyleRegular, UnitDocument, &font); - expect(Ok, stat); - stat = GdipGetFontHeightGivenDPI(font, 96, &height); - expect(Ok, stat); - expectf((REAL)11.039062, height); - GdipDeleteFont(font); - - height = 12345; - stat = GdipCreateFont(fontfamily, 30, FontStyleRegular, UnitMillimeter, &font); - expect(Ok, stat); - stat = GdipGetFontHeightGivenDPI(font, 96, &height); - expect(Ok, stat); - expectf((REAL)130.382614, height); - GdipDeleteFont(font); - - GdipDeleteFontFamily(fontfamily); -} - -START_TEST(font) -{ - struct GdiplusStartupInput gdiplusStartupInput; - ULONG_PTR gdiplusToken; - - gdiplusStartupInput.GdiplusVersion = 1; - gdiplusStartupInput.DebugEventCallback = NULL; - gdiplusStartupInput.SuppressBackgroundThread = 0; - gdiplusStartupInput.SuppressExternalCodecs = 0; - - GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); - - test_createfont(); - test_logfont(); - test_fontfamily(); - test_fontfamily_properties(); - test_getgenerics(); - test_installedfonts(); - test_heightgivendpi(); - - GdiplusShutdown(gdiplusToken); -} diff --git a/rostests/winetests/gdiplus/gdiplus.rbuild b/rostests/winetests/gdiplus/gdiplus.rbuild deleted file mode 100644 index 588629eef2e..00000000000 --- a/rostests/winetests/gdiplus/gdiplus.rbuild +++ /dev/null @@ -1,26 +0,0 @@ - - - - - . - - brush.c - customlinecap.c - font.c - graphics.c - graphicspath.c - image.c - matrix.c - pathiterator.c - pen.c - region.c - stringformat.c - testlist.c - wine - gdiplus - user32 - gdi32 - ole32 - ntdll - - diff --git a/rostests/winetests/gdiplus/graphics.c b/rostests/winetests/gdiplus/graphics.c deleted file mode 100644 index aaf661df814..00000000000 --- a/rostests/winetests/gdiplus/graphics.c +++ /dev/null @@ -1,2687 +0,0 @@ -/* - * Unit test suite for graphics objects - * - * Copyright (C) 2007 Google (Evan Stade) - * - * 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 "windows.h" -#include "gdiplus.h" -#include "wingdi.h" -#include "wine/test.h" -#include - -#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) -#define expectf_(expected, got, precision) ok(fabs(expected - got) < precision, "Expected %.2f, got %.2f\n", expected, got) -#define expectf(expected, got) expectf_(expected, got, 0.0001) -#define TABLE_LEN (23) - -static HWND hwnd; - -static void test_constructor_destructor(void) -{ - GpStatus stat; - GpGraphics *graphics = NULL; - HDC hdc = GetDC( hwnd ); - - stat = GdipCreateFromHDC(NULL, &graphics); - expect(OutOfMemory, stat); - stat = GdipDeleteGraphics(graphics); - expect(InvalidParameter, stat); - - stat = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, stat); - stat = GdipDeleteGraphics(graphics); - expect(Ok, stat); - - stat = GdipCreateFromHWND(NULL, &graphics); - expect(Ok, stat); - stat = GdipDeleteGraphics(graphics); - expect(Ok, stat); - - stat = GdipCreateFromHWNDICM(NULL, &graphics); - expect(Ok, stat); - stat = GdipDeleteGraphics(graphics); - expect(Ok, stat); - - stat = GdipDeleteGraphics(NULL); - expect(InvalidParameter, stat); - ReleaseDC(hwnd, hdc); -} - -typedef struct node{ - GraphicsState data; - struct node * next; -} node; - -/* Linked list prepend function. */ -static void log_state(GraphicsState data, node ** log) -{ - node * new_entry = HeapAlloc(GetProcessHeap(), 0, sizeof(node)); - - new_entry->data = data; - new_entry->next = *log; - *log = new_entry; -} - -/* Checks if there are duplicates in the list, and frees it. */ -static void check_no_duplicates(node * log) -{ - INT dups = 0; - node * temp = NULL; - node * temp2 = NULL; - node * orig = log; - - if(!log) - goto end; - - do{ - temp = log; - while((temp = temp->next)){ - if(log->data == temp->data){ - dups++; - break; - } - if(dups > 0) - break; - } - }while((log = log->next)); - - temp = orig; - do{ - temp2 = temp->next; - HeapFree(GetProcessHeap(), 0, temp); - temp = temp2; - }while(temp); - -end: - expect(0, dups); -} - -static void test_save_restore(void) -{ - GpStatus stat; - GraphicsState state_a, state_b, state_c; - InterpolationMode mode; - GpGraphics *graphics1, *graphics2; - node * state_log = NULL; - HDC hdc = GetDC( hwnd ); - state_a = state_b = state_c = 0xdeadbeef; - - /* Invalid saving. */ - GdipCreateFromHDC(hdc, &graphics1); - stat = GdipSaveGraphics(graphics1, NULL); - expect(InvalidParameter, stat); - stat = GdipSaveGraphics(NULL, &state_a); - expect(InvalidParameter, stat); - GdipDeleteGraphics(graphics1); - - log_state(state_a, &state_log); - - /* Basic save/restore. */ - GdipCreateFromHDC(hdc, &graphics1); - GdipSetInterpolationMode(graphics1, InterpolationModeBilinear); - stat = GdipSaveGraphics(graphics1, &state_a); - expect(Ok, stat); - GdipSetInterpolationMode(graphics1, InterpolationModeBicubic); - stat = GdipRestoreGraphics(graphics1, state_a); - expect(Ok, stat); - GdipGetInterpolationMode(graphics1, &mode); - expect(InterpolationModeBilinear, mode); - GdipDeleteGraphics(graphics1); - - log_state(state_a, &state_log); - - /* Restoring garbage doesn't affect saves. */ - GdipCreateFromHDC(hdc, &graphics1); - GdipSetInterpolationMode(graphics1, InterpolationModeBilinear); - GdipSaveGraphics(graphics1, &state_a); - GdipSetInterpolationMode(graphics1, InterpolationModeBicubic); - GdipSaveGraphics(graphics1, &state_b); - GdipSetInterpolationMode(graphics1, InterpolationModeNearestNeighbor); - stat = GdipRestoreGraphics(graphics1, 0xdeadbeef); - expect(Ok, stat); - GdipRestoreGraphics(graphics1, state_b); - GdipGetInterpolationMode(graphics1, &mode); - expect(InterpolationModeBicubic, mode); - GdipRestoreGraphics(graphics1, state_a); - GdipGetInterpolationMode(graphics1, &mode); - expect(InterpolationModeBilinear, mode); - GdipDeleteGraphics(graphics1); - - log_state(state_a, &state_log); - log_state(state_b, &state_log); - - /* Restoring older state invalidates newer saves (but not older saves). */ - GdipCreateFromHDC(hdc, &graphics1); - GdipSetInterpolationMode(graphics1, InterpolationModeBilinear); - GdipSaveGraphics(graphics1, &state_a); - GdipSetInterpolationMode(graphics1, InterpolationModeBicubic); - GdipSaveGraphics(graphics1, &state_b); - GdipSetInterpolationMode(graphics1, InterpolationModeNearestNeighbor); - GdipSaveGraphics(graphics1, &state_c); - GdipSetInterpolationMode(graphics1, InterpolationModeHighQualityBilinear); - GdipRestoreGraphics(graphics1, state_b); - GdipGetInterpolationMode(graphics1, &mode); - expect(InterpolationModeBicubic, mode); - GdipRestoreGraphics(graphics1, state_c); - GdipGetInterpolationMode(graphics1, &mode); - expect(InterpolationModeBicubic, mode); - GdipRestoreGraphics(graphics1, state_a); - GdipGetInterpolationMode(graphics1, &mode); - expect(InterpolationModeBilinear, mode); - GdipDeleteGraphics(graphics1); - - log_state(state_a, &state_log); - log_state(state_b, &state_log); - log_state(state_c, &state_log); - - /* Restoring older save from one graphics object does not invalidate - * newer save from other graphics object. */ - GdipCreateFromHDC(hdc, &graphics1); - GdipCreateFromHDC(hdc, &graphics2); - GdipSetInterpolationMode(graphics1, InterpolationModeBilinear); - GdipSaveGraphics(graphics1, &state_a); - GdipSetInterpolationMode(graphics2, InterpolationModeBicubic); - GdipSaveGraphics(graphics2, &state_b); - GdipSetInterpolationMode(graphics1, InterpolationModeNearestNeighbor); - GdipSetInterpolationMode(graphics2, InterpolationModeNearestNeighbor); - GdipRestoreGraphics(graphics1, state_a); - GdipGetInterpolationMode(graphics1, &mode); - expect(InterpolationModeBilinear, mode); - GdipRestoreGraphics(graphics2, state_b); - GdipGetInterpolationMode(graphics2, &mode); - expect(InterpolationModeBicubic, mode); - GdipDeleteGraphics(graphics1); - GdipDeleteGraphics(graphics2); - - /* You can't restore a state to a graphics object that didn't save it. */ - GdipCreateFromHDC(hdc, &graphics1); - GdipCreateFromHDC(hdc, &graphics2); - GdipSetInterpolationMode(graphics1, InterpolationModeBilinear); - GdipSaveGraphics(graphics1, &state_a); - GdipSetInterpolationMode(graphics1, InterpolationModeNearestNeighbor); - GdipSetInterpolationMode(graphics2, InterpolationModeNearestNeighbor); - GdipRestoreGraphics(graphics2, state_a); - GdipGetInterpolationMode(graphics2, &mode); - expect(InterpolationModeNearestNeighbor, mode); - GdipDeleteGraphics(graphics1); - GdipDeleteGraphics(graphics2); - - log_state(state_a, &state_log); - - /* The same state value should never be returned twice. */ - todo_wine - check_no_duplicates(state_log); - - ReleaseDC(hwnd, hdc); -} - -static void test_GdipDrawArc(void) -{ - GpStatus status; - GpGraphics *graphics = NULL; - GpPen *pen = NULL; - HDC hdc = GetDC( hwnd ); - - /* make a graphics object and pen object */ - ok(hdc != NULL, "Expected HDC to be initialized\n"); - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - ok(graphics != NULL, "Expected graphics to be initialized\n"); - - status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen); - expect(Ok, status); - ok(pen != NULL, "Expected pen to be initialized\n"); - - /* InvalidParameter cases: null graphics, null pen, non-positive width, non-positive height */ - status = GdipDrawArc(NULL, NULL, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); - expect(InvalidParameter, status); - - status = GdipDrawArc(graphics, NULL, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0); - expect(InvalidParameter, status); - - status = GdipDrawArc(NULL, pen, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0); - expect(InvalidParameter, status); - - status = GdipDrawArc(graphics, pen, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0); - expect(InvalidParameter, status); - - status = GdipDrawArc(graphics, pen, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0); - expect(InvalidParameter, status); - - /* successful case */ - status = GdipDrawArc(graphics, pen, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0); - expect(Ok, status); - - GdipDeletePen(pen); - GdipDeleteGraphics(graphics); - - ReleaseDC(hwnd, hdc); -} - -static void test_GdipDrawArcI(void) -{ - GpStatus status; - GpGraphics *graphics = NULL; - GpPen *pen = NULL; - HDC hdc = GetDC( hwnd ); - - /* make a graphics object and pen object */ - ok(hdc != NULL, "Expected HDC to be initialized\n"); - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - ok(graphics != NULL, "Expected graphics to be initialized\n"); - - status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen); - expect(Ok, status); - ok(pen != NULL, "Expected pen to be initialized\n"); - - /* InvalidParameter cases: null graphics, null pen, non-positive width, non-positive height */ - status = GdipDrawArcI(NULL, NULL, 0, 0, 0, 0, 0, 0); - expect(InvalidParameter, status); - - status = GdipDrawArcI(graphics, NULL, 0, 0, 1, 1, 0, 0); - expect(InvalidParameter, status); - - status = GdipDrawArcI(NULL, pen, 0, 0, 1, 1, 0, 0); - expect(InvalidParameter, status); - - status = GdipDrawArcI(graphics, pen, 0, 0, 1, 0, 0, 0); - expect(InvalidParameter, status); - - status = GdipDrawArcI(graphics, pen, 0, 0, 0, 1, 0, 0); - expect(InvalidParameter, status); - - /* successful case */ - status = GdipDrawArcI(graphics, pen, 0, 0, 1, 1, 0, 0); - expect(Ok, status); - - GdipDeletePen(pen); - GdipDeleteGraphics(graphics); - - ReleaseDC(hwnd, hdc); -} - -static void test_BeginContainer2(void) -{ - GpMatrix *transform; - GpRectF clip; - REAL defClip[] = {5, 10, 15, 20}; - REAL elems[6], defTrans[] = {1, 2, 3, 4, 5, 6}; - GraphicsContainer cont1, cont2, cont3, cont4; - CompositingQuality compqual, defCompqual = CompositingQualityHighSpeed; - CompositingMode compmode, defCompmode = CompositingModeSourceOver; - InterpolationMode interp, defInterp = InterpolationModeHighQualityBicubic; - REAL scale, defScale = 17; - GpUnit unit, defUnit = UnitPixel; - PixelOffsetMode offsetmode, defOffsetmode = PixelOffsetModeHighSpeed; - SmoothingMode smoothmode, defSmoothmode = SmoothingModeAntiAlias; - UINT contrast, defContrast = 5; - TextRenderingHint texthint, defTexthint = TextRenderingHintAntiAlias; - - GpStatus status; - GpGraphics *graphics = NULL; - HDC hdc = GetDC( hwnd ); - - ok(hdc != NULL, "Expected HDC to be initialized\n"); - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - ok(graphics != NULL, "Expected graphics to be initialized\n"); - - /* null graphics, null container */ - status = GdipBeginContainer2(NULL, &cont1); - expect(InvalidParameter, status); - - status = GdipBeginContainer2(graphics, NULL); - expect(InvalidParameter, status); - - status = GdipEndContainer(NULL, cont1); - expect(InvalidParameter, status); - - /* test all quality-related values */ - GdipSetCompositingMode(graphics, defCompmode); - GdipSetCompositingQuality(graphics, defCompqual); - GdipSetInterpolationMode(graphics, defInterp); - GdipSetPageScale(graphics, defScale); - GdipSetPageUnit(graphics, defUnit); - GdipSetPixelOffsetMode(graphics, defOffsetmode); - GdipSetSmoothingMode(graphics, defSmoothmode); - GdipSetTextContrast(graphics, defContrast); - GdipSetTextRenderingHint(graphics, defTexthint); - - status = GdipBeginContainer2(graphics, &cont1); - expect(Ok, status); - - GdipSetCompositingMode(graphics, CompositingModeSourceCopy); - GdipSetCompositingQuality(graphics, CompositingQualityHighQuality); - GdipSetInterpolationMode(graphics, InterpolationModeBilinear); - GdipSetPageScale(graphics, 10); - GdipSetPageUnit(graphics, UnitDocument); - GdipSetPixelOffsetMode(graphics, PixelOffsetModeHalf); - GdipSetSmoothingMode(graphics, SmoothingModeNone); - GdipSetTextContrast(graphics, 7); - GdipSetTextRenderingHint(graphics, TextRenderingHintClearTypeGridFit); - - status = GdipEndContainer(graphics, cont1); - expect(Ok, status); - - GdipGetCompositingMode(graphics, &compmode); - ok(defCompmode == compmode, "Expected Compositing Mode to be restored to %d, got %d\n", defCompmode, compmode); - - GdipGetCompositingQuality(graphics, &compqual); - ok(defCompqual == compqual, "Expected Compositing Quality to be restored to %d, got %d\n", defCompqual, compqual); - - GdipGetInterpolationMode(graphics, &interp); - ok(defInterp == interp, "Expected Interpolation Mode to be restored to %d, got %d\n", defInterp, interp); - - GdipGetPageScale(graphics, &scale); - ok(fabs(defScale - scale) < 0.0001, "Expected Page Scale to be restored to %f, got %f\n", defScale, scale); - - GdipGetPageUnit(graphics, &unit); - ok(defUnit == unit, "Expected Page Unit to be restored to %d, got %d\n", defUnit, unit); - - GdipGetPixelOffsetMode(graphics, &offsetmode); - ok(defOffsetmode == offsetmode, "Expected Pixel Offset Mode to be restored to %d, got %d\n", defOffsetmode, offsetmode); - - GdipGetSmoothingMode(graphics, &smoothmode); - ok(defSmoothmode == smoothmode, "Expected Smoothing Mode to be restored to %d, got %d\n", defSmoothmode, smoothmode); - - GdipGetTextContrast(graphics, &contrast); - ok(defContrast == contrast, "Expected Text Contrast to be restored to %d, got %d\n", defContrast, contrast); - - GdipGetTextRenderingHint(graphics, &texthint); - ok(defTexthint == texthint, "Expected Text Hint to be restored to %d, got %d\n", defTexthint, texthint); - - /* test world transform */ - status = GdipBeginContainer2(graphics, &cont1); - expect(Ok, status); - - GdipCreateMatrix2(defTrans[0], defTrans[1], defTrans[2], defTrans[3], - defTrans[4], defTrans[5], &transform); - GdipSetWorldTransform(graphics, transform); - GdipDeleteMatrix(transform); - transform = NULL; - - status = GdipBeginContainer2(graphics, &cont2); - expect(Ok, status); - - GdipCreateMatrix2(10, 20, 30, 40, 50, 60, &transform); - GdipSetWorldTransform(graphics, transform); - GdipDeleteMatrix(transform); - transform = NULL; - - status = GdipEndContainer(graphics, cont2); - expect(Ok, status); - - GdipCreateMatrix(&transform); - GdipGetWorldTransform(graphics, transform); - GdipGetMatrixElements(transform, elems); - ok(fabs(defTrans[0] - elems[0]) < 0.0001 && - fabs(defTrans[1] - elems[1]) < 0.0001 && - fabs(defTrans[2] - elems[2]) < 0.0001 && - fabs(defTrans[3] - elems[3]) < 0.0001 && - fabs(defTrans[4] - elems[4]) < 0.0001 && - fabs(defTrans[5] - elems[5]) < 0.0001, - "Expected World Transform Matrix to be restored to [%f, %f, %f, %f, %f, %f], got [%f, %f, %f, %f, %f, %f]\n", - defTrans[0], defTrans[1], defTrans[2], defTrans[3], defTrans[4], defTrans[5], - elems[0], elems[1], elems[2], elems[3], elems[4], elems[5]); - GdipDeleteMatrix(transform); - transform = NULL; - - status = GdipEndContainer(graphics, cont1); - expect(Ok, status); - - /* test clipping */ - status = GdipBeginContainer2(graphics, &cont1); - expect(Ok, status); - - GdipSetClipRect(graphics, defClip[0], defClip[1], defClip[2], defClip[3], CombineModeReplace); - - status = GdipBeginContainer2(graphics, &cont2); - expect(Ok, status); - - GdipSetClipRect(graphics, 2, 4, 6, 8, CombineModeReplace); - - status = GdipEndContainer(graphics, cont2); - - GdipGetClipBounds(graphics, &clip); - ok(fabs(defClip[0] - clip.X) < 0.0001 && - fabs(defClip[1] - clip.Y) < 0.0001 && - fabs(defClip[2] - clip.Width) < 0.0001 && - fabs(defClip[3] - clip.Height) < 0.0001, - "Expected Clipping Rectangle to be restored to [%f, %f, %f, %f], got [%f, %f, %f, %f]\n", - defClip[0], defClip[1], defClip[2], defClip[3], - clip.X, clip.Y, clip.Width, clip.Height); - - status = GdipEndContainer(graphics, cont1); - - /* nesting */ - status = GdipBeginContainer2(graphics, &cont1); - expect(Ok, status); - - status = GdipBeginContainer2(graphics, &cont2); - expect(Ok, status); - - status = GdipBeginContainer2(graphics, &cont3); - expect(Ok, status); - - status = GdipEndContainer(graphics, cont3); - expect(Ok, status); - - status = GdipBeginContainer2(graphics, &cont4); - expect(Ok, status); - - status = GdipEndContainer(graphics, cont4); - expect(Ok, status); - - /* skip cont2 */ - status = GdipEndContainer(graphics, cont1); - expect(Ok, status); - - /* end an already-ended container */ - status = GdipEndContainer(graphics, cont1); - expect(Ok, status); - - GdipDeleteGraphics(graphics); - ReleaseDC(hwnd, hdc); -} - -static void test_GdipDrawBezierI(void) -{ - GpStatus status; - GpGraphics *graphics = NULL; - GpPen *pen = NULL; - HDC hdc = GetDC( hwnd ); - - /* make a graphics object and pen object */ - ok(hdc != NULL, "Expected HDC to be initialized\n"); - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - ok(graphics != NULL, "Expected graphics to be initialized\n"); - - status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen); - expect(Ok, status); - ok(pen != NULL, "Expected pen to be initialized\n"); - - /* InvalidParameter cases: null graphics, null pen */ - status = GdipDrawBezierI(NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0); - expect(InvalidParameter, status); - - status = GdipDrawBezierI(graphics, NULL, 0, 0, 0, 0, 0, 0, 0, 0); - expect(InvalidParameter, status); - - status = GdipDrawBezierI(NULL, pen, 0, 0, 0, 0, 0, 0, 0, 0); - expect(InvalidParameter, status); - - /* successful case */ - status = GdipDrawBezierI(graphics, pen, 0, 0, 0, 0, 0, 0, 0, 0); - expect(Ok, status); - - GdipDeletePen(pen); - GdipDeleteGraphics(graphics); - - ReleaseDC(hwnd, hdc); -} - -static void test_GdipDrawCurve3(void) -{ - GpStatus status; - GpGraphics *graphics = NULL; - GpPen *pen = NULL; - HDC hdc = GetDC( hwnd ); - GpPointF points[3]; - - points[0].X = 0; - points[0].Y = 0; - - points[1].X = 40; - points[1].Y = 20; - - points[2].X = 10; - points[2].Y = 40; - - /* make a graphics object and pen object */ - ok(hdc != NULL, "Expected HDC to be initialized\n"); - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - ok(graphics != NULL, "Expected graphics to be initialized\n"); - - status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen); - expect(Ok, status); - ok(pen != NULL, "Expected pen to be initialized\n"); - - /* InvalidParameter cases: null graphics, null pen */ - status = GdipDrawCurve3(NULL, NULL, points, 3, 0, 2, 1); - expect(InvalidParameter, status); - - status = GdipDrawCurve3(graphics, NULL, points, 3, 0, 2, 1); - expect(InvalidParameter, status); - - status = GdipDrawCurve3(NULL, pen, points, 3, 0, 2, 1); - expect(InvalidParameter, status); - - /* InvalidParameter cases: invalid count */ - status = GdipDrawCurve3(graphics, pen, points, -1, 0, 2, 1); - expect(InvalidParameter, status); - - status = GdipDrawCurve3(graphics, pen, points, 0, 0, 2, 1); - expect(InvalidParameter, status); - - status = GdipDrawCurve3(graphics, pen, points, 1, 0, 0, 1); - expect(InvalidParameter, status); - - status = GdipDrawCurve3(graphics, pen, points, 3, 4, 2, 1); - expect(InvalidParameter, status); - - /* InvalidParameter cases: invalid number of segments */ - status = GdipDrawCurve3(graphics, pen, points, 3, 0, -1, 1); - expect(InvalidParameter, status); - - status = GdipDrawCurve3(graphics, pen, points, 3, 1, 2, 1); - expect(InvalidParameter, status); - - status = GdipDrawCurve3(graphics, pen, points, 2, 0, 2, 1); - expect(InvalidParameter, status); - - /* Valid test cases */ - status = GdipDrawCurve3(graphics, pen, points, 2, 0, 1, 1); - expect(Ok, status); - - status = GdipDrawCurve3(graphics, pen, points, 3, 0, 2, 2); - expect(Ok, status); - - status = GdipDrawCurve3(graphics, pen, points, 2, 0, 1, -2); - expect(Ok, status); - - status = GdipDrawCurve3(graphics, pen, points, 3, 1, 1, 0); - expect(Ok, status); - - GdipDeletePen(pen); - GdipDeleteGraphics(graphics); - - ReleaseDC(hwnd, hdc); -} - -static void test_GdipDrawCurve3I(void) -{ - GpStatus status; - GpGraphics *graphics = NULL; - GpPen *pen = NULL; - HDC hdc = GetDC( hwnd ); - GpPoint points[3]; - - points[0].X = 0; - points[0].Y = 0; - - points[1].X = 40; - points[1].Y = 20; - - points[2].X = 10; - points[2].Y = 40; - - /* make a graphics object and pen object */ - ok(hdc != NULL, "Expected HDC to be initialized\n"); - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - ok(graphics != NULL, "Expected graphics to be initialized\n"); - - status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen); - expect(Ok, status); - ok(pen != NULL, "Expected pen to be initialized\n"); - - /* InvalidParameter cases: null graphics, null pen */ - status = GdipDrawCurve3I(NULL, NULL, points, 3, 0, 2, 1); - expect(InvalidParameter, status); - - status = GdipDrawCurve3I(graphics, NULL, points, 3, 0, 2, 1); - expect(InvalidParameter, status); - - status = GdipDrawCurve3I(NULL, pen, points, 3, 0, 2, 1); - expect(InvalidParameter, status); - - /* InvalidParameter cases: invalid count */ - status = GdipDrawCurve3I(graphics, pen, points, -1, -1, -1, 1); - expect(OutOfMemory, status); - - status = GdipDrawCurve3I(graphics, pen, points, 0, 0, 2, 1); - expect(InvalidParameter, status); - - status = GdipDrawCurve3I(graphics, pen, points, 1, 0, 0, 1); - expect(InvalidParameter, status); - - status = GdipDrawCurve3I(graphics, pen, points, 3, 4, 2, 1); - expect(InvalidParameter, status); - - /* InvalidParameter cases: invalid number of segments */ - status = GdipDrawCurve3I(graphics, pen, points, 3, 0, -1, 1); - expect(InvalidParameter, status); - - status = GdipDrawCurve3I(graphics, pen, points, 3, 1, 2, 1); - expect(InvalidParameter, status); - - status = GdipDrawCurve3I(graphics, pen, points, 2, 0, 2, 1); - expect(InvalidParameter, status); - - /* Valid test cases */ - status = GdipDrawCurve3I(graphics, pen, points, 2, 0, 1, 1); - expect(Ok, status); - - status = GdipDrawCurve3I(graphics, pen, points, 3, 0, 2, 2); - expect(Ok, status); - - status = GdipDrawCurve3I(graphics, pen, points, 2, 0, 1, -2); - expect(Ok, status); - - status = GdipDrawCurve3I(graphics, pen, points, 3, 1, 1, 0); - expect(Ok, status); - - GdipDeletePen(pen); - GdipDeleteGraphics(graphics); - - ReleaseDC(hwnd, hdc); -} - -static void test_GdipDrawCurve2(void) -{ - GpStatus status; - GpGraphics *graphics = NULL; - GpPen *pen = NULL; - HDC hdc = GetDC( hwnd ); - GpPointF points[3]; - - points[0].X = 0; - points[0].Y = 0; - - points[1].X = 40; - points[1].Y = 20; - - points[2].X = 10; - points[2].Y = 40; - - /* make a graphics object and pen object */ - ok(hdc != NULL, "Expected HDC to be initialized\n"); - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - ok(graphics != NULL, "Expected graphics to be initialized\n"); - - status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen); - expect(Ok, status); - ok(pen != NULL, "Expected pen to be initialized\n"); - - /* InvalidParameter cases: null graphics, null pen */ - status = GdipDrawCurve2(NULL, NULL, points, 3, 1); - expect(InvalidParameter, status); - - status = GdipDrawCurve2(graphics, NULL, points, 3, 1); - expect(InvalidParameter, status); - - status = GdipDrawCurve2(NULL, pen, points, 3, 1); - expect(InvalidParameter, status); - - /* InvalidParameter cases: invalid count */ - status = GdipDrawCurve2(graphics, pen, points, -1, 1); - expect(InvalidParameter, status); - - status = GdipDrawCurve2(graphics, pen, points, 0, 1); - expect(InvalidParameter, status); - - status = GdipDrawCurve2(graphics, pen, points, 1, 1); - expect(InvalidParameter, status); - - /* Valid test cases */ - status = GdipDrawCurve2(graphics, pen, points, 2, 1); - expect(Ok, status); - - status = GdipDrawCurve2(graphics, pen, points, 3, 2); - expect(Ok, status); - - status = GdipDrawCurve2(graphics, pen, points, 3, -2); - expect(Ok, status); - - status = GdipDrawCurve2(graphics, pen, points, 3, 0); - expect(Ok, status); - - GdipDeletePen(pen); - GdipDeleteGraphics(graphics); - - ReleaseDC(hwnd, hdc); -} - -static void test_GdipDrawCurve2I(void) -{ - GpStatus status; - GpGraphics *graphics = NULL; - GpPen *pen = NULL; - HDC hdc = GetDC( hwnd ); - GpPoint points[3]; - - points[0].X = 0; - points[0].Y = 0; - - points[1].X = 40; - points[1].Y = 20; - - points[2].X = 10; - points[2].Y = 40; - - /* make a graphics object and pen object */ - ok(hdc != NULL, "Expected HDC to be initialized\n"); - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - ok(graphics != NULL, "Expected graphics to be initialized\n"); - - status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen); - expect(Ok, status); - ok(pen != NULL, "Expected pen to be initialized\n"); - - /* InvalidParameter cases: null graphics, null pen */ - status = GdipDrawCurve2I(NULL, NULL, points, 3, 1); - expect(InvalidParameter, status); - - status = GdipDrawCurve2I(graphics, NULL, points, 3, 1); - expect(InvalidParameter, status); - - status = GdipDrawCurve2I(NULL, pen, points, 3, 1); - expect(InvalidParameter, status); - - /* InvalidParameter cases: invalid count */ - status = GdipDrawCurve2I(graphics, pen, points, -1, 1); - expect(OutOfMemory, status); - - status = GdipDrawCurve2I(graphics, pen, points, 0, 1); - expect(InvalidParameter, status); - - status = GdipDrawCurve2I(graphics, pen, points, 1, 1); - expect(InvalidParameter, status); - - /* Valid test cases */ - status = GdipDrawCurve2I(graphics, pen, points, 2, 1); - expect(Ok, status); - - status = GdipDrawCurve2I(graphics, pen, points, 3, 2); - expect(Ok, status); - - status = GdipDrawCurve2I(graphics, pen, points, 3, -2); - expect(Ok, status); - - status = GdipDrawCurve2I(graphics, pen, points, 3, 0); - expect(Ok, status); - - GdipDeletePen(pen); - GdipDeleteGraphics(graphics); - - ReleaseDC(hwnd, hdc); -} - -static void test_GdipDrawCurve(void) -{ - GpStatus status; - GpGraphics *graphics = NULL; - GpPen *pen = NULL; - HDC hdc = GetDC( hwnd ); - GpPointF points[3]; - - points[0].X = 0; - points[0].Y = 0; - - points[1].X = 40; - points[1].Y = 20; - - points[2].X = 10; - points[2].Y = 40; - - /* make a graphics object and pen object */ - ok(hdc != NULL, "Expected HDC to be initialized\n"); - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - ok(graphics != NULL, "Expected graphics to be initialized\n"); - - status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen); - expect(Ok, status); - ok(pen != NULL, "Expected pen to be initialized\n"); - - /* InvalidParameter cases: null graphics, null pen */ - status = GdipDrawCurve(NULL, NULL, points, 3); - expect(InvalidParameter, status); - - status = GdipDrawCurve(graphics, NULL, points, 3); - expect(InvalidParameter, status); - - status = GdipDrawCurve(NULL, pen, points, 3); - expect(InvalidParameter, status); - - /* InvalidParameter cases: invalid count */ - status = GdipDrawCurve(graphics, pen, points, -1); - expect(InvalidParameter, status); - - status = GdipDrawCurve(graphics, pen, points, 0); - expect(InvalidParameter, status); - - status = GdipDrawCurve(graphics, pen, points, 1); - expect(InvalidParameter, status); - - /* Valid test cases */ - status = GdipDrawCurve(graphics, pen, points, 2); - expect(Ok, status); - - status = GdipDrawCurve(graphics, pen, points, 3); - expect(Ok, status); - - GdipDeletePen(pen); - GdipDeleteGraphics(graphics); - - ReleaseDC(hwnd, hdc); -} - -static void test_GdipDrawCurveI(void) -{ - GpStatus status; - GpGraphics *graphics = NULL; - GpPen *pen = NULL; - HDC hdc = GetDC( hwnd ); - GpPoint points[3]; - - points[0].X = 0; - points[0].Y = 0; - - points[1].X = 40; - points[1].Y = 20; - - points[2].X = 10; - points[2].Y = 40; - - /* make a graphics object and pen object */ - ok(hdc != NULL, "Expected HDC to be initialized\n"); - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - ok(graphics != NULL, "Expected graphics to be initialized\n"); - - status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen); - expect(Ok, status); - ok(pen != NULL, "Expected pen to be initialized\n"); - - /* InvalidParameter cases: null graphics, null pen */ - status = GdipDrawCurveI(NULL, NULL, points, 3); - expect(InvalidParameter, status); - - status = GdipDrawCurveI(graphics, NULL, points, 3); - expect(InvalidParameter, status); - - status = GdipDrawCurveI(NULL, pen, points, 3); - expect(InvalidParameter, status); - - /* InvalidParameter cases: invalid count */ - status = GdipDrawCurveI(graphics, pen, points, -1); - expect(OutOfMemory, status); - - status = GdipDrawCurveI(graphics, pen, points, 0); - expect(InvalidParameter, status); - - status = GdipDrawCurveI(graphics, pen, points, 1); - expect(InvalidParameter, status); - - /* Valid test cases */ - status = GdipDrawCurveI(graphics, pen, points, 2); - expect(Ok, status); - - status = GdipDrawCurveI(graphics, pen, points, 3); - expect(Ok, status); - - GdipDeletePen(pen); - GdipDeleteGraphics(graphics); - - ReleaseDC(hwnd, hdc); -} - -static void test_GdipDrawLineI(void) -{ - GpStatus status; - GpGraphics *graphics = NULL; - GpPen *pen = NULL; - HDC hdc = GetDC( hwnd ); - - /* make a graphics object and pen object */ - ok(hdc != NULL, "Expected HDC to be initialized\n"); - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - ok(graphics != NULL, "Expected graphics to be initialized\n"); - - status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen); - expect(Ok, status); - ok(pen != NULL, "Expected pen to be initialized\n"); - - /* InvalidParameter cases: null graphics, null pen */ - status = GdipDrawLineI(NULL, NULL, 0, 0, 0, 0); - expect(InvalidParameter, status); - - status = GdipDrawLineI(graphics, NULL, 0, 0, 0, 0); - expect(InvalidParameter, status); - - status = GdipDrawLineI(NULL, pen, 0, 0, 0, 0); - expect(InvalidParameter, status); - - /* successful case */ - status = GdipDrawLineI(graphics, pen, 0, 0, 0, 0); - expect(Ok, status); - - GdipDeletePen(pen); - GdipDeleteGraphics(graphics); - - ReleaseDC(hwnd, hdc); -} - -static void test_GdipDrawLinesI(void) -{ - GpStatus status; - GpGraphics *graphics = NULL; - GpPen *pen = NULL; - GpPoint *ptf = NULL; - HDC hdc = GetDC( hwnd ); - - /* make a graphics object and pen object */ - ok(hdc != NULL, "Expected HDC to be initialized\n"); - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - ok(graphics != NULL, "Expected graphics to be initialized\n"); - - status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen); - expect(Ok, status); - ok(pen != NULL, "Expected pen to be initialized\n"); - - /* make some arbitrary valid points*/ - ptf = GdipAlloc(2 * sizeof(GpPointF)); - - ptf[0].X = 1; - ptf[0].Y = 1; - - ptf[1].X = 2; - ptf[1].Y = 2; - - /* InvalidParameter cases: null graphics, null pen, null points, count < 2*/ - status = GdipDrawLinesI(NULL, NULL, NULL, 0); - expect(InvalidParameter, status); - - status = GdipDrawLinesI(graphics, pen, ptf, 0); - expect(InvalidParameter, status); - - status = GdipDrawLinesI(graphics, NULL, ptf, 2); - expect(InvalidParameter, status); - - status = GdipDrawLinesI(NULL, pen, ptf, 2); - expect(InvalidParameter, status); - - /* successful case */ - status = GdipDrawLinesI(graphics, pen, ptf, 2); - expect(Ok, status); - - GdipFree(ptf); - GdipDeletePen(pen); - GdipDeleteGraphics(graphics); - - ReleaseDC(hwnd, hdc); -} - -static void test_Get_Release_DC(void) -{ - GpStatus status; - GpGraphics *graphics = NULL; - GpPen *pen; - GpSolidFill *brush; - GpPath *path; - HDC hdc = GetDC( hwnd ); - HDC retdc; - REAL r; - CompositingQuality quality; - CompositingMode compmode; - InterpolationMode intmode; - GpMatrix *m; - GpRegion *region; - GpUnit unit; - PixelOffsetMode offsetmode; - SmoothingMode smoothmode; - TextRenderingHint texthint; - GpPointF ptf[5]; - GpPoint pt[5]; - GpRectF rectf[2]; - GpRect rect[2]; - GpRegion *clip; - INT i; - BOOL res; - ARGB color = 0x00000000; - HRGN hrgn = CreateRectRgn(0, 0, 10, 10); - - pt[0].X = 10; - pt[0].Y = 10; - pt[1].X = 20; - pt[1].Y = 15; - pt[2].X = 40; - pt[2].Y = 80; - pt[3].X = -20; - pt[3].Y = 20; - pt[4].X = 50; - pt[4].Y = 110; - - for(i = 0; i < 5;i++){ - ptf[i].X = (REAL)pt[i].X; - ptf[i].Y = (REAL)pt[i].Y; - } - - rect[0].X = 0; - rect[0].Y = 0; - rect[0].Width = 50; - rect[0].Height = 70; - rect[1].X = 0; - rect[1].Y = 0; - rect[1].Width = 10; - rect[1].Height = 20; - - for(i = 0; i < 2;i++){ - rectf[i].X = (REAL)rect[i].X; - rectf[i].Y = (REAL)rect[i].Y; - rectf[i].Height = (REAL)rect[i].Height; - rectf[i].Width = (REAL)rect[i].Width; - } - - GdipCreateMatrix(&m); - GdipCreateRegion(®ion); - GdipCreateSolidFill((ARGB)0xdeadbeef, &brush); - GdipCreatePath(FillModeAlternate, &path); - GdipCreateRegion(&clip); - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - ok(graphics != NULL, "Expected graphics to be initialized\n"); - status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen); - expect(Ok, status); - - /* NULL arguments */ - status = GdipGetDC(NULL, NULL); - expect(InvalidParameter, status); - status = GdipGetDC(graphics, NULL); - expect(InvalidParameter, status); - status = GdipGetDC(NULL, &retdc); - expect(InvalidParameter, status); - - status = GdipReleaseDC(NULL, NULL); - expect(InvalidParameter, status); - status = GdipReleaseDC(graphics, NULL); - expect(InvalidParameter, status); - status = GdipReleaseDC(NULL, (HDC)0xdeadbeef); - expect(InvalidParameter, status); - - /* Release without Get */ - status = GdipReleaseDC(graphics, hdc); - expect(InvalidParameter, status); - - retdc = NULL; - status = GdipGetDC(graphics, &retdc); - expect(Ok, status); - ok(retdc == hdc, "Invalid HDC returned\n"); - /* call it once more */ - status = GdipGetDC(graphics, &retdc); - expect(ObjectBusy, status); - - /* try all Graphics calls here */ - status = Ok; - status = GdipDrawArc(graphics, pen, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawArcI(graphics, pen, 0, 0, 1, 1, 0.0, 0.0); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawBezier(graphics, pen, 0.0, 10.0, 20.0, 15.0, 35.0, -10.0, 10.0, 10.0); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawBezierI(graphics, pen, 0, 0, 0, 0, 0, 0, 0, 0); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawBeziers(graphics, pen, ptf, 5); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawBeziersI(graphics, pen, pt, 5); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawClosedCurve(graphics, pen, ptf, 5); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawClosedCurveI(graphics, pen, pt, 5); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawClosedCurve2(graphics, pen, ptf, 5, 1.0); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawClosedCurve2I(graphics, pen, pt, 5, 1.0); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawCurve(graphics, pen, ptf, 5); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawCurveI(graphics, pen, pt, 5); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawCurve2(graphics, pen, ptf, 5, 1.0); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawCurve2I(graphics, pen, pt, 5, 1.0); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawEllipse(graphics, pen, 0.0, 0.0, 100.0, 50.0); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawEllipseI(graphics, pen, 0, 0, 100, 50); - expect(ObjectBusy, status); status = Ok; - /* GdipDrawImage/GdipDrawImageI */ - /* GdipDrawImagePointsRect/GdipDrawImagePointsRectI */ - /* GdipDrawImageRectRect/GdipDrawImageRectRectI */ - /* GdipDrawImageRect/GdipDrawImageRectI */ - status = GdipDrawLine(graphics, pen, 0.0, 0.0, 100.0, 200.0); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawLineI(graphics, pen, 0, 0, 100, 200); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawLines(graphics, pen, ptf, 5); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawLinesI(graphics, pen, pt, 5); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawPath(graphics, pen, path); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawPie(graphics, pen, 0.0, 0.0, 100.0, 100.0, 0.0, 90.0); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawPieI(graphics, pen, 0, 0, 100, 100, 0.0, 90.0); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawRectangle(graphics, pen, 0.0, 0.0, 100.0, 300.0); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawRectangleI(graphics, pen, 0, 0, 100, 300); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawRectangles(graphics, pen, rectf, 2); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawRectanglesI(graphics, pen, rect, 2); - expect(ObjectBusy, status); status = Ok; - /* GdipDrawString */ - status = GdipFillClosedCurve2(graphics, (GpBrush*)brush, ptf, 5, 1.0, FillModeAlternate); - expect(ObjectBusy, status); status = Ok; - status = GdipFillClosedCurve2I(graphics, (GpBrush*)brush, pt, 5, 1.0, FillModeAlternate); - expect(ObjectBusy, status); status = Ok; - status = GdipFillEllipse(graphics, (GpBrush*)brush, 0.0, 0.0, 100.0, 100.0); - expect(ObjectBusy, status); status = Ok; - status = GdipFillEllipseI(graphics, (GpBrush*)brush, 0, 0, 100, 100); - expect(ObjectBusy, status); status = Ok; - status = GdipFillPath(graphics, (GpBrush*)brush, path); - expect(ObjectBusy, status); status = Ok; - status = GdipFillPie(graphics, (GpBrush*)brush, 0.0, 0.0, 100.0, 100.0, 0.0, 15.0); - expect(ObjectBusy, status); status = Ok; - status = GdipFillPieI(graphics, (GpBrush*)brush, 0, 0, 100, 100, 0.0, 15.0); - expect(ObjectBusy, status); status = Ok; - status = GdipFillPolygon(graphics, (GpBrush*)brush, ptf, 5, FillModeAlternate); - expect(ObjectBusy, status); status = Ok; - status = GdipFillPolygonI(graphics, (GpBrush*)brush, pt, 5, FillModeAlternate); - expect(ObjectBusy, status); status = Ok; - status = GdipFillPolygon2(graphics, (GpBrush*)brush, ptf, 5); - expect(ObjectBusy, status); status = Ok; - status = GdipFillPolygon2I(graphics, (GpBrush*)brush, pt, 5); - expect(ObjectBusy, status); status = Ok; - status = GdipFillRectangle(graphics, (GpBrush*)brush, 0.0, 0.0, 100.0, 100.0); - expect(ObjectBusy, status); status = Ok; - status = GdipFillRectangleI(graphics, (GpBrush*)brush, 0, 0, 100, 100); - expect(ObjectBusy, status); status = Ok; - status = GdipFillRectangles(graphics, (GpBrush*)brush, rectf, 2); - expect(ObjectBusy, status); status = Ok; - status = GdipFillRectanglesI(graphics, (GpBrush*)brush, rect, 2); - expect(ObjectBusy, status); status = Ok; - status = GdipFillRegion(graphics, (GpBrush*)brush, region); - expect(ObjectBusy, status); status = Ok; - status = GdipFlush(graphics, FlushIntentionFlush); - expect(ObjectBusy, status); status = Ok; - status = GdipGetClipBounds(graphics, rectf); - expect(ObjectBusy, status); status = Ok; - status = GdipGetClipBoundsI(graphics, rect); - expect(ObjectBusy, status); status = Ok; - status = GdipGetCompositingMode(graphics, &compmode); - expect(ObjectBusy, status); status = Ok; - status = GdipGetCompositingQuality(graphics, &quality); - expect(ObjectBusy, status); status = Ok; - status = GdipGetInterpolationMode(graphics, &intmode); - expect(ObjectBusy, status); status = Ok; - status = GdipGetNearestColor(graphics, &color); - expect(ObjectBusy, status); status = Ok; - status = GdipGetPageScale(graphics, &r); - expect(ObjectBusy, status); status = Ok; - status = GdipGetPageUnit(graphics, &unit); - expect(ObjectBusy, status); status = Ok; - status = GdipGetPixelOffsetMode(graphics, &offsetmode); - expect(ObjectBusy, status); status = Ok; - status = GdipGetSmoothingMode(graphics, &smoothmode); - expect(ObjectBusy, status); status = Ok; - status = GdipGetTextRenderingHint(graphics, &texthint); - expect(ObjectBusy, status); status = Ok; - status = GdipGetWorldTransform(graphics, m); - expect(ObjectBusy, status); status = Ok; - status = GdipGraphicsClear(graphics, 0xdeadbeef); - expect(ObjectBusy, status); status = Ok; - status = GdipIsVisiblePoint(graphics, 0.0, 0.0, &res); - expect(ObjectBusy, status); status = Ok; - status = GdipIsVisiblePointI(graphics, 0, 0, &res); - expect(ObjectBusy, status); status = Ok; - /* GdipMeasureCharacterRanges */ - /* GdipMeasureString */ - status = GdipResetClip(graphics); - expect(ObjectBusy, status); status = Ok; - status = GdipResetWorldTransform(graphics); - expect(ObjectBusy, status); status = Ok; - /* GdipRestoreGraphics */ - status = GdipRotateWorldTransform(graphics, 15.0, MatrixOrderPrepend); - expect(ObjectBusy, status); status = Ok; - /* GdipSaveGraphics */ - status = GdipScaleWorldTransform(graphics, 1.0, 1.0, MatrixOrderPrepend); - expect(ObjectBusy, status); status = Ok; - status = GdipSetCompositingMode(graphics, CompositingModeSourceOver); - expect(ObjectBusy, status); status = Ok; - status = GdipSetCompositingQuality(graphics, CompositingQualityDefault); - expect(ObjectBusy, status); status = Ok; - status = GdipSetInterpolationMode(graphics, InterpolationModeDefault); - expect(ObjectBusy, status); status = Ok; - status = GdipSetPageScale(graphics, 1.0); - expect(ObjectBusy, status); status = Ok; - status = GdipSetPageUnit(graphics, UnitWorld); - expect(ObjectBusy, status); status = Ok; - status = GdipSetPixelOffsetMode(graphics, PixelOffsetModeDefault); - expect(ObjectBusy, status); status = Ok; - status = GdipSetSmoothingMode(graphics, SmoothingModeDefault); - expect(ObjectBusy, status); status = Ok; - status = GdipSetTextRenderingHint(graphics, TextRenderingHintSystemDefault); - expect(ObjectBusy, status); status = Ok; - status = GdipSetWorldTransform(graphics, m); - expect(ObjectBusy, status); status = Ok; - status = GdipTranslateWorldTransform(graphics, 0.0, 0.0, MatrixOrderPrepend); - expect(ObjectBusy, status); status = Ok; - status = GdipSetClipHrgn(graphics, hrgn, CombineModeReplace); - expect(ObjectBusy, status); status = Ok; - status = GdipSetClipPath(graphics, path, CombineModeReplace); - expect(ObjectBusy, status); status = Ok; - status = GdipSetClipRect(graphics, 0.0, 0.0, 10.0, 10.0, CombineModeReplace); - expect(ObjectBusy, status); status = Ok; - status = GdipSetClipRectI(graphics, 0, 0, 10, 10, CombineModeReplace); - expect(ObjectBusy, status); status = Ok; - status = GdipSetClipRegion(graphics, clip, CombineModeReplace); - expect(ObjectBusy, status); status = Ok; - status = GdipTranslateClip(graphics, 0.0, 0.0); - expect(ObjectBusy, status); status = Ok; - status = GdipTranslateClipI(graphics, 0, 0); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawPolygon(graphics, pen, ptf, 5); - expect(ObjectBusy, status); status = Ok; - status = GdipDrawPolygonI(graphics, pen, pt, 5); - expect(ObjectBusy, status); status = Ok; - status = GdipGetDpiX(graphics, &r); - expect(ObjectBusy, status); status = Ok; - status = GdipGetDpiY(graphics, &r); - expect(ObjectBusy, status); status = Ok; - status = GdipMultiplyWorldTransform(graphics, m, MatrixOrderPrepend); - status = GdipGetClip(graphics, region); - expect(ObjectBusy, status); status = Ok; - status = GdipTransformPoints(graphics, CoordinateSpacePage, CoordinateSpaceWorld, ptf, 5); - expect(ObjectBusy, status); status = Ok; - /* try to delete before release */ - status = GdipDeleteGraphics(graphics); - expect(ObjectBusy, status); - - status = GdipReleaseDC(graphics, retdc); - expect(Ok, status); - - GdipDeletePen(pen); - GdipDeleteGraphics(graphics); - - GdipDeleteRegion(clip); - GdipDeletePath(path); - GdipDeleteBrush((GpBrush*)brush); - GdipDeleteRegion(region); - GdipDeleteMatrix(m); - DeleteObject(hrgn); - - ReleaseDC(hwnd, hdc); -} - -static void test_transformpoints(void) -{ - GpStatus status; - GpGraphics *graphics = NULL; - HDC hdc = GetDC( hwnd ); - GpPointF ptf[2]; - GpPoint pt[2]; - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - - /* NULL arguments */ - status = GdipTransformPoints(NULL, CoordinateSpacePage, CoordinateSpaceWorld, NULL, 0); - expect(InvalidParameter, status); - status = GdipTransformPoints(graphics, CoordinateSpacePage, CoordinateSpaceWorld, NULL, 0); - expect(InvalidParameter, status); - status = GdipTransformPoints(graphics, CoordinateSpacePage, CoordinateSpaceWorld, ptf, 0); - expect(InvalidParameter, status); - status = GdipTransformPoints(graphics, CoordinateSpacePage, CoordinateSpaceWorld, ptf, -1); - expect(InvalidParameter, status); - - ptf[0].X = 1.0; - ptf[0].Y = 0.0; - ptf[1].X = 0.0; - ptf[1].Y = 1.0; - status = GdipTransformPoints(graphics, CoordinateSpaceDevice, CoordinateSpaceWorld, ptf, 2); - expect(Ok, status); - expectf(1.0, ptf[0].X); - expectf(0.0, ptf[0].Y); - expectf(0.0, ptf[1].X); - expectf(1.0, ptf[1].Y); - - status = GdipTranslateWorldTransform(graphics, 5.0, 5.0, MatrixOrderAppend); - expect(Ok, status); - status = GdipSetPageUnit(graphics, UnitPixel); - expect(Ok, status); - status = GdipSetPageScale(graphics, 3.0); - expect(Ok, status); - - ptf[0].X = 1.0; - ptf[0].Y = 0.0; - ptf[1].X = 0.0; - ptf[1].Y = 1.0; - status = GdipTransformPoints(graphics, CoordinateSpaceDevice, CoordinateSpaceWorld, ptf, 2); - expect(Ok, status); - expectf(18.0, ptf[0].X); - expectf(15.0, ptf[0].Y); - expectf(15.0, ptf[1].X); - expectf(18.0, ptf[1].Y); - - ptf[0].X = 1.0; - ptf[0].Y = 0.0; - ptf[1].X = 0.0; - ptf[1].Y = 1.0; - status = GdipTransformPoints(graphics, CoordinateSpacePage, CoordinateSpaceWorld, ptf, 2); - expect(Ok, status); - expectf(6.0, ptf[0].X); - expectf(5.0, ptf[0].Y); - expectf(5.0, ptf[1].X); - expectf(6.0, ptf[1].Y); - - ptf[0].X = 1.0; - ptf[0].Y = 0.0; - ptf[1].X = 0.0; - ptf[1].Y = 1.0; - status = GdipTransformPoints(graphics, CoordinateSpaceDevice, CoordinateSpacePage, ptf, 2); - expect(Ok, status); - expectf(3.0, ptf[0].X); - expectf(0.0, ptf[0].Y); - expectf(0.0, ptf[1].X); - expectf(3.0, ptf[1].Y); - - ptf[0].X = 18.0; - ptf[0].Y = 15.0; - ptf[1].X = 15.0; - ptf[1].Y = 18.0; - status = GdipTransformPoints(graphics, CoordinateSpaceWorld, CoordinateSpaceDevice, ptf, 2); - expect(Ok, status); - expectf(1.0, ptf[0].X); - expectf(0.0, ptf[0].Y); - expectf(0.0, ptf[1].X); - expectf(1.0, ptf[1].Y); - - ptf[0].X = 6.0; - ptf[0].Y = 5.0; - ptf[1].X = 5.0; - ptf[1].Y = 6.0; - status = GdipTransformPoints(graphics, CoordinateSpaceWorld, CoordinateSpacePage, ptf, 2); - expect(Ok, status); - expectf(1.0, ptf[0].X); - expectf(0.0, ptf[0].Y); - expectf(0.0, ptf[1].X); - expectf(1.0, ptf[1].Y); - - ptf[0].X = 3.0; - ptf[0].Y = 0.0; - ptf[1].X = 0.0; - ptf[1].Y = 3.0; - status = GdipTransformPoints(graphics, CoordinateSpacePage, CoordinateSpaceDevice, ptf, 2); - expect(Ok, status); - expectf(1.0, ptf[0].X); - expectf(0.0, ptf[0].Y); - expectf(0.0, ptf[1].X); - expectf(1.0, ptf[1].Y); - - pt[0].X = 1; - pt[0].Y = 0; - pt[1].X = 0; - pt[1].Y = 1; - status = GdipTransformPointsI(graphics, CoordinateSpaceDevice, CoordinateSpaceWorld, pt, 2); - expect(Ok, status); - expect(18, pt[0].X); - expect(15, pt[0].Y); - expect(15, pt[1].X); - expect(18, pt[1].Y); - - GdipDeleteGraphics(graphics); - ReleaseDC(hwnd, hdc); -} - -static void test_get_set_clip(void) -{ - GpStatus status; - GpGraphics *graphics = NULL; - HDC hdc = GetDC( hwnd ); - GpRegion *clip; - GpRectF rect; - BOOL res; - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - - rect.X = rect.Y = 0.0; - rect.Height = rect.Width = 100.0; - - status = GdipCreateRegionRect(&rect, &clip); - - /* NULL arguments */ - status = GdipGetClip(NULL, NULL); - expect(InvalidParameter, status); - status = GdipGetClip(graphics, NULL); - expect(InvalidParameter, status); - status = GdipGetClip(NULL, clip); - expect(InvalidParameter, status); - - status = GdipSetClipRegion(NULL, NULL, CombineModeReplace); - expect(InvalidParameter, status); - status = GdipSetClipRegion(graphics, NULL, CombineModeReplace); - expect(InvalidParameter, status); - - status = GdipSetClipPath(NULL, NULL, CombineModeReplace); - expect(InvalidParameter, status); - status = GdipSetClipPath(graphics, NULL, CombineModeReplace); - expect(InvalidParameter, status); - - res = FALSE; - status = GdipGetClip(graphics, clip); - expect(Ok, status); - status = GdipIsInfiniteRegion(clip, graphics, &res); - expect(Ok, status); - expect(TRUE, res); - - /* remains infinite after reset */ - res = FALSE; - status = GdipResetClip(graphics); - expect(Ok, status); - status = GdipGetClip(graphics, clip); - expect(Ok, status); - status = GdipIsInfiniteRegion(clip, graphics, &res); - expect(Ok, status); - expect(TRUE, res); - - /* set to empty and then reset to infinite */ - status = GdipSetEmpty(clip); - expect(Ok, status); - status = GdipSetClipRegion(graphics, clip, CombineModeReplace); - expect(Ok, status); - - status = GdipGetClip(graphics, clip); - expect(Ok, status); - res = FALSE; - status = GdipIsEmptyRegion(clip, graphics, &res); - expect(Ok, status); - expect(TRUE, res); - status = GdipResetClip(graphics); - expect(Ok, status); - status = GdipGetClip(graphics, clip); - expect(Ok, status); - res = FALSE; - status = GdipIsInfiniteRegion(clip, graphics, &res); - expect(Ok, status); - expect(TRUE, res); - - GdipDeleteRegion(clip); - - GdipDeleteGraphics(graphics); - ReleaseDC(hwnd, hdc); -} - -static void test_isempty(void) -{ - GpStatus status; - GpGraphics *graphics = NULL; - HDC hdc = GetDC( hwnd ); - GpRegion *clip; - BOOL res; - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - - status = GdipCreateRegion(&clip); - expect(Ok, status); - - /* NULL */ - status = GdipIsClipEmpty(NULL, NULL); - expect(InvalidParameter, status); - status = GdipIsClipEmpty(graphics, NULL); - expect(InvalidParameter, status); - status = GdipIsClipEmpty(NULL, &res); - expect(InvalidParameter, status); - - /* default is infinite */ - res = TRUE; - status = GdipIsClipEmpty(graphics, &res); - expect(Ok, status); - expect(FALSE, res); - - GdipDeleteRegion(clip); - - GdipDeleteGraphics(graphics); - ReleaseDC(hwnd, hdc); -} - -static void test_clear(void) -{ - GpStatus status; - - status = GdipGraphicsClear(NULL, 0xdeadbeef); - expect(InvalidParameter, status); -} - -static void test_textcontrast(void) -{ - GpStatus status; - HDC hdc = GetDC( hwnd ); - GpGraphics *graphics; - UINT contrast; - - status = GdipGetTextContrast(NULL, NULL); - expect(InvalidParameter, status); - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - - status = GdipGetTextContrast(graphics, NULL); - expect(InvalidParameter, status); - status = GdipGetTextContrast(graphics, &contrast); - expect(4, contrast); - - GdipDeleteGraphics(graphics); - ReleaseDC(hwnd, hdc); -} - -static void test_GdipDrawString(void) -{ - GpStatus status; - GpGraphics *graphics = NULL; - GpFont *fnt = NULL; - RectF rect; - GpStringFormat *format; - GpBrush *brush; - LOGFONTA logfont; - HDC hdc = GetDC( hwnd ); - static const WCHAR string[] = {'T','e','s','t',0}; - - memset(&logfont,0,sizeof(logfont)); - strcpy(logfont.lfFaceName,"Arial"); - logfont.lfHeight = 12; - logfont.lfCharSet = DEFAULT_CHARSET; - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - - status = GdipCreateFontFromLogfontA(hdc, &logfont, &fnt); - if (status == FileNotFound) - { - skip("Arial not installed.\n"); - return; - } - expect(Ok, status); - - status = GdipCreateSolidFill((ARGB)0xdeadbeef, (GpSolidFill**)&brush); - expect(Ok, status); - - status = GdipCreateStringFormat(0,0,&format); - expect(Ok, status); - - rect.X = 0; - rect.Y = 0; - rect.Width = 0; - rect.Height = 12; - - status = GdipDrawString(graphics, string, 4, fnt, &rect, format, brush); - expect(Ok, status); - - GdipDeleteGraphics(graphics); - GdipDeleteBrush(brush); - GdipDeleteFont(fnt); - GdipDeleteStringFormat(format); - - ReleaseDC(hwnd, hdc); -} - -static void test_GdipGetVisibleClipBounds_screen(void) -{ - GpStatus status; - GpGraphics *graphics = NULL; - HDC hdc = GetDC(0); - GpRectF rectf, exp, clipr; - GpRect recti; - - ok(hdc != NULL, "Expected HDC to be initialized\n"); - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - ok(graphics != NULL, "Expected graphics to be initialized\n"); - - /* no clipping rect */ - exp.X = 0; - exp.Y = 0; - exp.Width = GetDeviceCaps(hdc, HORZRES); - exp.Height = GetDeviceCaps(hdc, VERTRES); - - status = GdipGetVisibleClipBounds(graphics, &rectf); - expect(Ok, status); - ok(rectf.X == exp.X && - rectf.Y == exp.Y && - rectf.Width == exp.Width && - rectf.Height == exp.Height, - "Expected clip bounds (%0.f, %0.f, %0.f, %0.f) to be the size of " - "the screen (%0.f, %0.f, %0.f, %0.f)\n", - rectf.X, rectf.Y, rectf.Width, rectf.Height, - exp.X, exp.Y, exp.Width, exp.Height); - - /* clipping rect entirely within window */ - exp.X = clipr.X = 10; - exp.Y = clipr.Y = 12; - exp.Width = clipr.Width = 14; - exp.Height = clipr.Height = 16; - - status = GdipSetClipRect(graphics, clipr.X, clipr.Y, clipr.Width, clipr.Height, CombineModeReplace); - expect(Ok, status); - - status = GdipGetVisibleClipBounds(graphics, &rectf); - expect(Ok, status); - ok(rectf.X == exp.X && - rectf.Y == exp.Y && - rectf.Width == exp.Width && - rectf.Height == exp.Height, - "Expected clip bounds (%0.f, %0.f, %0.f, %0.f) to be the size of " - "the clipping rect (%0.f, %0.f, %0.f, %0.f)\n", - rectf.X, rectf.Y, rectf.Width, rectf.Height, - exp.X, exp.Y, exp.Width, exp.Height); - - /* clipping rect partially outside of screen */ - clipr.X = -10; - clipr.Y = -12; - clipr.Width = 20; - clipr.Height = 24; - - status = GdipSetClipRect(graphics, clipr.X, clipr.Y, clipr.Width, clipr.Height, CombineModeReplace); - expect(Ok, status); - - exp.X = 0; - exp.Y = 0; - exp.Width = 10; - exp.Height = 12; - - status = GdipGetVisibleClipBounds(graphics, &rectf); - expect(Ok, status); - ok(rectf.X == exp.X && - rectf.Y == exp.Y && - rectf.Width == exp.Width && - rectf.Height == exp.Height, - "Expected clip bounds (%0.f, %0.f, %0.f, %0.f) to be the size of " - "the visible clipping rect (%0.f, %0.f, %0.f, %0.f)\n", - rectf.X, rectf.Y, rectf.Width, rectf.Height, - exp.X, exp.Y, exp.Width, exp.Height); - - status = GdipGetVisibleClipBoundsI(graphics, &recti); - expect(Ok, status); - ok(recti.X == exp.X && - recti.Y == exp.Y && - recti.Width == exp.Width && - recti.Height == exp.Height, - "Expected clip bounds (%d, %d, %d, %d) to be the size of " - "the visible clipping rect (%0.f, %0.f, %0.f, %0.f)\n", - recti.X, recti.Y, recti.Width, recti.Height, - exp.X, exp.Y, exp.Width, exp.Height); - - GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); -} - -static void test_GdipGetVisibleClipBounds_window(void) -{ - GpStatus status; - GpGraphics *graphics = NULL; - GpRectF rectf, window, exp, clipr; - GpRect recti; - HDC hdc; - PAINTSTRUCT ps; - RECT wnd_rect; - - /* get client area size */ - ok(GetClientRect(hwnd, &wnd_rect), "GetClientRect should have succeeded\n"); - window.X = wnd_rect.left; - window.Y = wnd_rect.top; - window.Width = wnd_rect.right - wnd_rect.left; - window.Height = wnd_rect.bottom - wnd_rect.top; - - hdc = BeginPaint(hwnd, &ps); - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - ok(graphics != NULL, "Expected graphics to be initialized\n"); - - status = GdipGetVisibleClipBounds(graphics, &rectf); - expect(Ok, status); - ok(rectf.X == window.X && - rectf.Y == window.Y && - rectf.Width == window.Width && - rectf.Height == window.Height, - "Expected clip bounds (%0.f, %0.f, %0.f, %0.f) to be the size of " - "the window (%0.f, %0.f, %0.f, %0.f)\n", - rectf.X, rectf.Y, rectf.Width, rectf.Height, - window.X, window.Y, window.Width, window.Height); - - /* clipping rect entirely within window */ - exp.X = clipr.X = 20; - exp.Y = clipr.Y = 8; - exp.Width = clipr.Width = 30; - exp.Height = clipr.Height = 20; - - status = GdipSetClipRect(graphics, clipr.X, clipr.Y, clipr.Width, clipr.Height, CombineModeReplace); - expect(Ok, status); - - status = GdipGetVisibleClipBounds(graphics, &rectf); - expect(Ok, status); - ok(rectf.X == exp.X && - rectf.Y == exp.Y && - rectf.Width == exp.Width && - rectf.Height == exp.Height, - "Expected clip bounds (%0.f, %0.f, %0.f, %0.f) to be the size of " - "the clipping rect (%0.f, %0.f, %0.f, %0.f)\n", - rectf.X, rectf.Y, rectf.Width, rectf.Height, - exp.X, exp.Y, exp.Width, exp.Height); - - /* clipping rect partially outside of window */ - clipr.X = window.Width - 10; - clipr.Y = window.Height - 15; - clipr.Width = 20; - clipr.Height = 30; - - status = GdipSetClipRect(graphics, clipr.X, clipr.Y, clipr.Width, clipr.Height, CombineModeReplace); - expect(Ok, status); - - exp.X = window.Width - 10; - exp.Y = window.Height - 15; - exp.Width = 10; - exp.Height = 15; - - status = GdipGetVisibleClipBounds(graphics, &rectf); - expect(Ok, status); - ok(rectf.X == exp.X && - rectf.Y == exp.Y && - rectf.Width == exp.Width && - rectf.Height == exp.Height, - "Expected clip bounds (%0.f, %0.f, %0.f, %0.f) to be the size of " - "the visible clipping rect (%0.f, %0.f, %0.f, %0.f)\n", - rectf.X, rectf.Y, rectf.Width, rectf.Height, - exp.X, exp.Y, exp.Width, exp.Height); - - status = GdipGetVisibleClipBoundsI(graphics, &recti); - expect(Ok, status); - ok(recti.X == exp.X && - recti.Y == exp.Y && - recti.Width == exp.Width && - recti.Height == exp.Height, - "Expected clip bounds (%d, %d, %d, %d) to be the size of " - "the visible clipping rect (%0.f, %0.f, %0.f, %0.f)\n", - recti.X, recti.Y, recti.Width, recti.Height, - exp.X, exp.Y, exp.Width, exp.Height); - - GdipDeleteGraphics(graphics); - EndPaint(hwnd, &ps); -} - -static void test_GdipGetVisibleClipBounds(void) -{ - GpGraphics* graphics = NULL; - GpRectF rectf; - GpRect rect; - HDC hdc = GetDC( hwnd ); - GpStatus status; - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - ok(graphics != NULL, "Expected graphics to be initialized\n"); - - /* test null parameters */ - status = GdipGetVisibleClipBounds(graphics, NULL); - expect(InvalidParameter, status); - - status = GdipGetVisibleClipBounds(NULL, &rectf); - expect(InvalidParameter, status); - - status = GdipGetVisibleClipBoundsI(graphics, NULL); - expect(InvalidParameter, status); - - status = GdipGetVisibleClipBoundsI(NULL, &rect); - expect(InvalidParameter, status); - - GdipDeleteGraphics(graphics); - ReleaseDC(hwnd, hdc); - - test_GdipGetVisibleClipBounds_screen(); - test_GdipGetVisibleClipBounds_window(); -} - -static void test_fromMemoryBitmap(void) -{ - GpStatus status; - GpGraphics *graphics = NULL; - GpBitmap *bitmap = NULL; - BYTE bits[48] = {0}; - - status = GdipCreateBitmapFromScan0(4, 4, 12, PixelFormat24bppRGB, bits, &bitmap); - expect(Ok, status); - - status = GdipGetImageGraphicsContext((GpImage*)bitmap, &graphics); - expect(Ok, status); - - status = GdipGraphicsClear(graphics, 0xff686868); - expect(Ok, status); - - GdipDeleteGraphics(graphics); - - /* drawing writes to the memory provided */ - todo_wine expect(0x68, bits[10]); - - GdipDisposeImage((GpImage*)bitmap); -} - -static void test_GdipIsVisiblePoint(void) -{ - GpStatus status; - GpGraphics *graphics = NULL; - HDC hdc = GetDC( hwnd ); - REAL x, y; - BOOL val; - - ok(hdc != NULL, "Expected HDC to be initialized\n"); - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - ok(graphics != NULL, "Expected graphics to be initialized\n"); - - /* null parameters */ - status = GdipIsVisiblePoint(NULL, 0, 0, &val); - expect(InvalidParameter, status); - - status = GdipIsVisiblePoint(graphics, 0, 0, NULL); - expect(InvalidParameter, status); - - status = GdipIsVisiblePointI(NULL, 0, 0, &val); - expect(InvalidParameter, status); - - status = GdipIsVisiblePointI(graphics, 0, 0, NULL); - expect(InvalidParameter, status); - - x = 0; - y = 0; - status = GdipIsVisiblePoint(graphics, x, y, &val); - expect(Ok, status); - ok(val == TRUE, "Expected (%.2f, %.2f) to be visible\n", x, y); - - x = -10; - y = 0; - status = GdipIsVisiblePoint(graphics, x, y, &val); - expect(Ok, status); - ok(val == FALSE, "Expected (%.2f, %.2f) not to be visible\n", x, y); - - x = 0; - y = -5; - status = GdipIsVisiblePoint(graphics, x, y, &val); - expect(Ok, status); - ok(val == FALSE, "Expected (%.2f, %.2f) not to be visible\n", x, y); - - x = 1; - y = 1; - status = GdipIsVisiblePoint(graphics, x, y, &val); - expect(Ok, status); - ok(val == TRUE, "Expected (%.2f, %.2f) to be visible\n", x, y); - - status = GdipSetClipRect(graphics, 10, 20, 30, 40, CombineModeReplace); - expect(Ok, status); - - x = 1; - y = 1; - status = GdipIsVisiblePoint(graphics, x, y, &val); - expect(Ok, status); - ok(val == FALSE, "After clipping, expected (%.2f, %.2f) not to be visible\n", x, y); - - x = 15.5; - y = 40.5; - status = GdipIsVisiblePoint(graphics, x, y, &val); - expect(Ok, status); - ok(val == TRUE, "After clipping, expected (%.2f, %.2f) to be visible\n", x, y); - - /* translate into the center of the rect */ - GdipTranslateWorldTransform(graphics, 25, 40, MatrixOrderAppend); - - x = 0; - y = 0; - status = GdipIsVisiblePoint(graphics, x, y, &val); - expect(Ok, status); - ok(val == TRUE, "Expected (%.2f, %.2f) to be visible\n", x, y); - - x = 25; - y = 40; - status = GdipIsVisiblePoint(graphics, x, y, &val); - expect(Ok, status); - ok(val == FALSE, "Expected (%.2f, %.2f) not to be visible\n", x, y); - - GdipTranslateWorldTransform(graphics, -25, -40, MatrixOrderAppend); - - /* corner cases */ - x = 9; - y = 19; - status = GdipIsVisiblePoint(graphics, x, y, &val); - expect(Ok, status); - ok(val == FALSE, "After clipping, expected (%.2f, %.2f) not to be visible\n", x, y); - - x = 9.25; - y = 19.25; - status = GdipIsVisiblePoint(graphics, x, y, &val); - expect(Ok, status); - ok(val == FALSE, "After clipping, expected (%.2f, %.2f) not to be visible\n", x, y); - - x = 9.5; - y = 19.5; - status = GdipIsVisiblePoint(graphics, x, y, &val); - expect(Ok, status); - ok(val == TRUE, "After clipping, expected (%.2f, %.2f) to be visible\n", x, y); - - x = 9.75; - y = 19.75; - status = GdipIsVisiblePoint(graphics, x, y, &val); - expect(Ok, status); - ok(val == TRUE, "After clipping, expected (%.2f, %.2f) to be visible\n", x, y); - - x = 10; - y = 20; - status = GdipIsVisiblePoint(graphics, x, y, &val); - expect(Ok, status); - ok(val == TRUE, "After clipping, expected (%.2f, %.2f) to be visible\n", x, y); - - x = 40; - y = 20; - status = GdipIsVisiblePoint(graphics, x, y, &val); - expect(Ok, status); - ok(val == FALSE, "After clipping, expected (%.2f, %.2f) not to be visible\n", x, y); - - x = 39; - y = 59; - status = GdipIsVisiblePoint(graphics, x, y, &val); - expect(Ok, status); - ok(val == TRUE, "After clipping, expected (%.2f, %.2f) to be visible\n", x, y); - - x = 39.25; - y = 59.25; - status = GdipIsVisiblePoint(graphics, x, y, &val); - expect(Ok, status); - ok(val == TRUE, "After clipping, expected (%.2f, %.2f) to be visible\n", x, y); - - x = 39.5; - y = 39.5; - status = GdipIsVisiblePoint(graphics, x, y, &val); - expect(Ok, status); - ok(val == FALSE, "After clipping, expected (%.2f, %.2f) not to be visible\n", x, y); - - x = 39.75; - y = 59.75; - status = GdipIsVisiblePoint(graphics, x, y, &val); - expect(Ok, status); - ok(val == FALSE, "After clipping, expected (%.2f, %.2f) not to be visible\n", x, y); - - x = 40; - y = 60; - status = GdipIsVisiblePoint(graphics, x, y, &val); - expect(Ok, status); - ok(val == FALSE, "After clipping, expected (%.2f, %.2f) not to be visible\n", x, y); - - x = 40.15; - y = 60.15; - status = GdipIsVisiblePoint(graphics, x, y, &val); - expect(Ok, status); - ok(val == FALSE, "After clipping, expected (%.2f, %.2f) not to be visible\n", x, y); - - x = 10; - y = 60; - status = GdipIsVisiblePoint(graphics, x, y, &val); - expect(Ok, status); - ok(val == FALSE, "After clipping, expected (%.2f, %.2f) not to be visible\n", x, y); - - /* integer version */ - x = 25; - y = 30; - status = GdipIsVisiblePointI(graphics, (INT)x, (INT)y, &val); - expect(Ok, status); - ok(val == TRUE, "After clipping, expected (%.2f, %.2f) to be visible\n", x, y); - - x = 50; - y = 100; - status = GdipIsVisiblePointI(graphics, (INT)x, (INT)y, &val); - expect(Ok, status); - ok(val == FALSE, "After clipping, expected (%.2f, %.2f) not to be visible\n", x, y); - - GdipDeleteGraphics(graphics); - ReleaseDC(hwnd, hdc); -} - -static void test_GdipIsVisibleRect(void) -{ - GpStatus status; - GpGraphics *graphics = NULL; - HDC hdc = GetDC( hwnd ); - REAL x, y, width, height; - BOOL val; - - ok(hdc != NULL, "Expected HDC to be initialized\n"); - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - ok(graphics != NULL, "Expected graphics to be initialized\n"); - - status = GdipIsVisibleRect(NULL, 0, 0, 0, 0, &val); - expect(InvalidParameter, status); - - status = GdipIsVisibleRect(graphics, 0, 0, 0, 0, NULL); - expect(InvalidParameter, status); - - status = GdipIsVisibleRectI(NULL, 0, 0, 0, 0, &val); - expect(InvalidParameter, status); - - status = GdipIsVisibleRectI(graphics, 0, 0, 0, 0, NULL); - expect(InvalidParameter, status); - - /* entirely within the visible region */ - x = 0; width = 10; - y = 0; height = 10; - status = GdipIsVisibleRect(graphics, x, y, width, height, &val); - expect(Ok, status); - ok(val == TRUE, "Expected (%.2f, %.2f, %.2f, %.2f) to be visible\n", x, y, width, height); - - /* partially outside */ - x = -10; width = 20; - y = -10; height = 20; - status = GdipIsVisibleRect(graphics, x, y, width, height, &val); - expect(Ok, status); - ok(val == TRUE, "Expected (%.2f, %.2f, %.2f, %.2f) to be visible\n", x, y, width, height); - - /* entirely outside */ - x = -10; width = 5; - y = -10; height = 5; - status = GdipIsVisibleRect(graphics, x, y, width, height, &val); - expect(Ok, status); - ok(val == FALSE, "Expected (%.2f, %.2f, %.2f, %.2f) not to be visible\n", x, y, width, height); - - status = GdipSetClipRect(graphics, 10, 20, 30, 40, CombineModeReplace); - expect(Ok, status); - - /* entirely within the visible region */ - x = 12; width = 10; - y = 22; height = 10; - status = GdipIsVisibleRect(graphics, x, y, width, height, &val); - expect(Ok, status); - ok(val == TRUE, "Expected (%.2f, %.2f, %.2f, %.2f) to be visible\n", x, y, width, height); - - /* partially outside */ - x = 35; width = 10; - y = 55; height = 10; - status = GdipIsVisibleRect(graphics, x, y, width, height, &val); - expect(Ok, status); - ok(val == TRUE, "Expected (%.2f, %.2f, %.2f, %.2f) to be visible\n", x, y, width, height); - - /* entirely outside */ - x = 45; width = 5; - y = 65; height = 5; - status = GdipIsVisibleRect(graphics, x, y, width, height, &val); - expect(Ok, status); - ok(val == FALSE, "Expected (%.2f, %.2f, %.2f, %.2f) not to be visible\n", x, y, width, height); - - /* translate into center of clipping rect */ - GdipTranslateWorldTransform(graphics, 25, 40, MatrixOrderAppend); - - x = 0; width = 10; - y = 0; height = 10; - status = GdipIsVisibleRect(graphics, x, y, width, height, &val); - expect(Ok, status); - ok(val == TRUE, "Expected (%.2f, %.2f, %.2f, %.2f) to be visible\n", x, y, width, height); - - x = 25; width = 5; - y = 40; height = 5; - status = GdipIsVisibleRect(graphics, x, y, width, height, &val); - expect(Ok, status); - ok(val == FALSE, "Expected (%.2f, %.2f, %.2f, %.2f) not to be visible\n", x, y, width, height); - - GdipTranslateWorldTransform(graphics, -25, -40, MatrixOrderAppend); - - /* corners entirely outside, but some intersections */ - x = 0; width = 70; - y = 0; height = 90; - status = GdipIsVisibleRect(graphics, x, y, width, height, &val); - expect(Ok, status); - ok(val == TRUE, "Expected (%.2f, %.2f, %.2f, %.2f) to be visible\n", x, y, width, height); - - x = 0; width = 70; - y = 0; height = 30; - status = GdipIsVisibleRect(graphics, x, y, width, height, &val); - expect(Ok, status); - ok(val == TRUE, "Expected (%.2f, %.2f, %.2f, %.2f) to be visible\n", x, y, width, height); - - x = 0; width = 30; - y = 0; height = 90; - status = GdipIsVisibleRect(graphics, x, y, width, height, &val); - expect(Ok, status); - ok(val == TRUE, "Expected (%.2f, %.2f, %.2f, %.2f) to be visible\n", x, y, width, height); - - /* edge cases */ - x = 0; width = 10; - y = 20; height = 40; - status = GdipIsVisibleRect(graphics, x, y, width, height, &val); - expect(Ok, status); - ok(val == FALSE, "Expected (%.2f, %.2f, %.2f, %.2f) not to be visible\n", x, y, width, height); - - x = 10; width = 30; - y = 0; height = 20; - status = GdipIsVisibleRect(graphics, x, y, width, height, &val); - expect(Ok, status); - ok(val == FALSE, "Expected (%.2f, %.2f, %.2f, %.2f) not to be visible\n", x, y, width, height); - - x = 40; width = 10; - y = 20; height = 40; - status = GdipIsVisibleRect(graphics, x, y, width, height, &val); - expect(Ok, status); - ok(val == FALSE, "Expected (%.2f, %.2f, %.2f, %.2f) not to be visible\n", x, y, width, height); - - x = 10; width = 30; - y = 60; height = 10; - status = GdipIsVisibleRect(graphics, x, y, width, height, &val); - expect(Ok, status); - ok(val == FALSE, "Expected (%.2f, %.2f, %.2f, %.2f) not to be visible\n", x, y, width, height); - - /* rounding tests */ - x = 0.4; width = 10.4; - y = 20; height = 40; - status = GdipIsVisibleRect(graphics, x, y, width, height, &val); - expect(Ok, status); - ok(val == TRUE, "Expected (%.2f, %.2f, %.2f, %.2f) to be visible\n", x, y, width, height); - - x = 10; width = 30; - y = 0.4; height = 20.4; - status = GdipIsVisibleRect(graphics, x, y, width, height, &val); - expect(Ok, status); - ok(val == TRUE, "Expected (%.2f, %.2f, %.2f, %.2f) to be visible\n", x, y, width, height); - - /* integer version */ - x = 0; width = 30; - y = 0; height = 90; - status = GdipIsVisibleRectI(graphics, (INT)x, (INT)y, (INT)width, (INT)height, &val); - expect(Ok, status); - ok(val == TRUE, "Expected (%.2f, %.2f, %.2f, %.2f) to be visible\n", x, y, width, height); - - x = 12; width = 10; - y = 22; height = 10; - status = GdipIsVisibleRectI(graphics, (INT)x, (INT)y, (INT)width, (INT)height, &val); - expect(Ok, status); - ok(val == TRUE, "Expected (%.2f, %.2f, %.2f, %.2f) to be visible\n", x, y, width, height); - - GdipDeleteGraphics(graphics); - ReleaseDC(hwnd, hdc); -} - -static void test_GdipGetNearestColor(void) -{ - GpStatus status; - GpGraphics *graphics; - GpBitmap *bitmap; - ARGB color = 0xdeadbeef; - HDC hdc = GetDC( hwnd ); - - /* create a graphics object */ - ok(hdc != NULL, "Expected HDC to be initialized\n"); - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - ok(graphics != NULL, "Expected graphics to be initialized\n"); - - status = GdipGetNearestColor(graphics, NULL); - expect(InvalidParameter, status); - - status = GdipGetNearestColor(NULL, &color); - expect(InvalidParameter, status); - GdipDeleteGraphics(graphics); - - status = GdipCreateBitmapFromScan0(10, 10, 10, PixelFormat1bppIndexed, NULL, &bitmap); - expect(Ok, status); - status = GdipGetImageGraphicsContext((GpImage*)bitmap, &graphics); - ok(broken(status == OutOfMemory) /* winver < Win7 */ || status == Ok, "status=%u\n", status); - if (status == Ok) - { - status = GdipGetNearestColor(graphics, &color); - expect(Ok, status); - expect(0xdeadbeef, color); - GdipDeleteGraphics(graphics); - } - GdipDisposeImage((GpImage*)bitmap); - - status = GdipCreateBitmapFromScan0(10, 10, 10, PixelFormat4bppIndexed, NULL, &bitmap); - expect(Ok, status); - status = GdipGetImageGraphicsContext((GpImage*)bitmap, &graphics); - ok(broken(status == OutOfMemory) /* winver < Win7 */ || status == Ok, "status=%u\n", status); - if (status == Ok) - { - status = GdipGetNearestColor(graphics, &color); - expect(Ok, status); - expect(0xdeadbeef, color); - GdipDeleteGraphics(graphics); - } - GdipDisposeImage((GpImage*)bitmap); - - status = GdipCreateBitmapFromScan0(10, 10, 10, PixelFormat8bppIndexed, NULL, &bitmap); - expect(Ok, status); - status = GdipGetImageGraphicsContext((GpImage*)bitmap, &graphics); - ok(broken(status == OutOfMemory) /* winver < Win7 */ || status == Ok, "status=%u\n", status); - if (status == Ok) - { - status = GdipGetNearestColor(graphics, &color); - expect(Ok, status); - expect(0xdeadbeef, color); - GdipDeleteGraphics(graphics); - } - GdipDisposeImage((GpImage*)bitmap); - - status = GdipCreateBitmapFromScan0(10, 10, 10, PixelFormat16bppGrayScale, NULL, &bitmap); - expect(Ok, status); - status = GdipGetImageGraphicsContext((GpImage*)bitmap, &graphics); - todo_wine expect(OutOfMemory, status); - if (status == Ok) - GdipDeleteGraphics(graphics); - GdipDisposeImage((GpImage*)bitmap); - - status = GdipCreateBitmapFromScan0(10, 10, 10, PixelFormat24bppRGB, NULL, &bitmap); - expect(Ok, status); - status = GdipGetImageGraphicsContext((GpImage*)bitmap, &graphics); - expect(Ok, status); - status = GdipGetNearestColor(graphics, &color); - expect(Ok, status); - expect(0xdeadbeef, color); - GdipDeleteGraphics(graphics); - GdipDisposeImage((GpImage*)bitmap); - - status = GdipCreateBitmapFromScan0(10, 10, 10, PixelFormat32bppRGB, NULL, &bitmap); - expect(Ok, status); - status = GdipGetImageGraphicsContext((GpImage*)bitmap, &graphics); - expect(Ok, status); - status = GdipGetNearestColor(graphics, &color); - expect(Ok, status); - expect(0xdeadbeef, color); - GdipDeleteGraphics(graphics); - GdipDisposeImage((GpImage*)bitmap); - - status = GdipCreateBitmapFromScan0(10, 10, 10, PixelFormat32bppARGB, NULL, &bitmap); - expect(Ok, status); - status = GdipGetImageGraphicsContext((GpImage*)bitmap, &graphics); - expect(Ok, status); - status = GdipGetNearestColor(graphics, &color); - expect(Ok, status); - expect(0xdeadbeef, color); - GdipDeleteGraphics(graphics); - GdipDisposeImage((GpImage*)bitmap); - - status = GdipCreateBitmapFromScan0(10, 10, 10, PixelFormat48bppRGB, NULL, &bitmap); - expect(Ok, status); - status = GdipGetImageGraphicsContext((GpImage*)bitmap, &graphics); - expect(Ok, status); - status = GdipGetNearestColor(graphics, &color); - expect(Ok, status); - expect(0xdeadbeef, color); - GdipDeleteGraphics(graphics); - GdipDisposeImage((GpImage*)bitmap); - - status = GdipCreateBitmapFromScan0(10, 10, 10, PixelFormat64bppARGB, NULL, &bitmap); - expect(Ok, status); - status = GdipGetImageGraphicsContext((GpImage*)bitmap, &graphics); - expect(Ok, status); - status = GdipGetNearestColor(graphics, &color); - expect(Ok, status); - expect(0xdeadbeef, color); - GdipDeleteGraphics(graphics); - GdipDisposeImage((GpImage*)bitmap); - - status = GdipCreateBitmapFromScan0(10, 10, 10, PixelFormat64bppPARGB, NULL, &bitmap); - expect(Ok, status); - status = GdipGetImageGraphicsContext((GpImage*)bitmap, &graphics); - expect(Ok, status); - status = GdipGetNearestColor(graphics, &color); - expect(Ok, status); - expect(0xdeadbeef, color); - GdipDeleteGraphics(graphics); - GdipDisposeImage((GpImage*)bitmap); - - status = GdipCreateBitmapFromScan0(10, 10, 10, PixelFormat16bppRGB565, NULL, &bitmap); - expect(Ok, status); - status = GdipGetImageGraphicsContext((GpImage*)bitmap, &graphics); - expect(Ok, status); - status = GdipGetNearestColor(graphics, &color); - expect(Ok, status); - todo_wine expect(0xffa8bce8, color); - GdipDeleteGraphics(graphics); - GdipDisposeImage((GpImage*)bitmap); - - status = GdipCreateBitmapFromScan0(10, 10, 10, PixelFormat16bppRGB555, NULL, &bitmap); - expect(Ok, status); - status = GdipGetImageGraphicsContext((GpImage*)bitmap, &graphics); - expect(Ok, status); - status = GdipGetNearestColor(graphics, &color); - expect(Ok, status); - todo_wine - ok(color == 0xffa8b8e8 || - broken(color == 0xffa0b8e0), /* Win98/WinMe */ - "Expected ffa8b8e8, got %.8x\n", color); - GdipDeleteGraphics(graphics); - GdipDisposeImage((GpImage*)bitmap); - - ReleaseDC(hwnd, hdc); -} - -static void test_string_functions(void) -{ - GpStatus status; - GpGraphics *graphics; - GpFontFamily *family; - GpFont *font; - RectF rc, char_bounds, bounds; - GpBrush *brush; - ARGB color = 0xff000000; - HDC hdc = GetDC( hwnd ); - const WCHAR fontname[] = {'T','a','h','o','m','a',0}; - const WCHAR teststring[] = {'M','M',' ','M','\n','M',0}; - REAL char_width, char_height; - INT codepointsfitted, linesfilled; - GpStringFormat *format; - CharacterRange ranges[3] = {{0, 1}, {1, 3}, {5, 1}}; - GpRegion *regions[4] = {0}; - BOOL region_isempty[4]; - int i; - - ok(hdc != NULL, "Expected HDC to be initialized\n"); - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - ok(graphics != NULL, "Expected graphics to be initialized\n"); - - status = GdipCreateFontFamilyFromName(fontname, NULL, &family); - expect(Ok, status); - - status = GdipCreateFont(family, 10.0, FontStyleRegular, UnitPixel, &font); - expect(Ok, status); - - status = GdipCreateSolidFill(color, (GpSolidFill**)&brush); - expect(Ok, status); - - status = GdipCreateStringFormat(0, LANG_NEUTRAL, &format); - expect(Ok, status); - - rc.X = 0; - rc.Y = 0; - rc.Width = 100.0; - rc.Height = 100.0; - - status = GdipDrawString(NULL, teststring, 6, font, &rc, NULL, brush); - expect(InvalidParameter, status); - - status = GdipDrawString(graphics, NULL, 6, font, &rc, NULL, brush); - expect(InvalidParameter, status); - - status = GdipDrawString(graphics, teststring, 6, NULL, &rc, NULL, brush); - expect(InvalidParameter, status); - - status = GdipDrawString(graphics, teststring, 6, font, NULL, NULL, brush); - expect(InvalidParameter, status); - - status = GdipDrawString(graphics, teststring, 6, font, &rc, NULL, NULL); - expect(InvalidParameter, status); - - status = GdipDrawString(graphics, teststring, 6, font, &rc, NULL, brush); - expect(Ok, status); - - status = GdipMeasureString(NULL, teststring, 6, font, &rc, NULL, &bounds, &codepointsfitted, &linesfilled); - expect(InvalidParameter, status); - - status = GdipMeasureString(graphics, NULL, 6, font, &rc, NULL, &bounds, &codepointsfitted, &linesfilled); - expect(InvalidParameter, status); - - status = GdipMeasureString(graphics, teststring, 6, NULL, &rc, NULL, &bounds, &codepointsfitted, &linesfilled); - expect(InvalidParameter, status); - - status = GdipMeasureString(graphics, teststring, 6, font, NULL, NULL, &bounds, &codepointsfitted, &linesfilled); - expect(InvalidParameter, status); - - status = GdipMeasureString(graphics, teststring, 6, font, &rc, NULL, NULL, &codepointsfitted, &linesfilled); - expect(InvalidParameter, status); - - status = GdipMeasureString(graphics, teststring, 6, font, &rc, NULL, &bounds, NULL, &linesfilled); - expect(Ok, status); - - status = GdipMeasureString(graphics, teststring, 6, font, &rc, NULL, &bounds, &codepointsfitted, NULL); - expect(Ok, status); - - status = GdipMeasureString(graphics, teststring, 1, font, &rc, NULL, &char_bounds, &codepointsfitted, &linesfilled); - expect(Ok, status); - expectf(0.0, char_bounds.X); - expectf(0.0, char_bounds.Y); - ok(char_bounds.Width > 0, "got %0.2f\n", bounds.Width); - ok(char_bounds.Height > 0, "got %0.2f\n", bounds.Height); - expect(1, codepointsfitted); - expect(1, linesfilled); - - status = GdipMeasureString(graphics, teststring, 2, font, &rc, NULL, &bounds, &codepointsfitted, &linesfilled); - expect(Ok, status); - expectf(0.0, bounds.X); - expectf(0.0, bounds.Y); - ok(bounds.Width > char_bounds.Width, "got %0.2f, expected at least %0.2f\n", bounds.Width, char_bounds.Width); - expectf(char_bounds.Height, bounds.Height); - expect(2, codepointsfitted); - expect(1, linesfilled); - char_width = bounds.Width - char_bounds.Width; - - status = GdipMeasureString(graphics, teststring, 6, font, &rc, NULL, &bounds, &codepointsfitted, &linesfilled); - expect(Ok, status); - expectf(0.0, bounds.X); - expectf(0.0, bounds.Y); - ok(bounds.Width > char_bounds.Width + char_width * 2, "got %0.2f, expected at least %0.2f\n", - bounds.Width, char_bounds.Width + char_width * 2); - ok(bounds.Height > char_bounds.Height, "got %0.2f, expected at least %0.2f\n", bounds.Height, char_bounds.Height); - expect(6, codepointsfitted); - expect(2, linesfilled); - char_height = bounds.Height - char_bounds.Height; - - /* Cut off everything after the first space. */ - rc.Width = char_bounds.Width + char_width * 2.1; - - status = GdipMeasureString(graphics, teststring, 6, font, &rc, NULL, &bounds, &codepointsfitted, &linesfilled); - expect(Ok, status); - expectf(0.0, bounds.X); - expectf(0.0, bounds.Y); - expectf_(char_bounds.Width + char_width, bounds.Width, 0.01); - expectf_(char_bounds.Height + char_height * 2, bounds.Height, 0.01); - expect(6, codepointsfitted); - expect(3, linesfilled); - - /* Cut off everything including the first space. */ - rc.Width = char_bounds.Width + char_width * 1.5; - - status = GdipMeasureString(graphics, teststring, 6, font, &rc, NULL, &bounds, &codepointsfitted, &linesfilled); - expect(Ok, status); - expectf(0.0, bounds.X); - expectf(0.0, bounds.Y); - expectf_(char_bounds.Width + char_width, bounds.Width, 0.01); - expectf_(char_bounds.Height + char_height * 2, bounds.Height, 0.01); - expect(6, codepointsfitted); - expect(3, linesfilled); - - /* Cut off everything after the first character. */ - rc.Width = char_bounds.Width + char_width * 0.5; - - status = GdipMeasureString(graphics, teststring, 6, font, &rc, NULL, &bounds, &codepointsfitted, &linesfilled); - expect(Ok, status); - expectf(0.0, bounds.X); - expectf(0.0, bounds.Y); - expectf_(char_bounds.Width, bounds.Width, 0.01); - todo_wine expectf_(char_bounds.Height + char_height * 3, bounds.Height, 0.05); - expect(6, codepointsfitted); - todo_wine expect(4, linesfilled); - - status = GdipSetStringFormatMeasurableCharacterRanges(format, 3, ranges); - expect(Ok, status); - - rc.Width = 100.0; - - for (i=0; i<4; i++) - { - status = GdipCreateRegion(®ions[i]); - expect(Ok, status); - } - - status = GdipMeasureCharacterRanges(NULL, teststring, 6, font, &rc, format, 3, regions); - expect(InvalidParameter, status); - - status = GdipMeasureCharacterRanges(graphics, NULL, 6, font, &rc, format, 3, regions); - expect(InvalidParameter, status); - - status = GdipMeasureCharacterRanges(graphics, teststring, 6, NULL, &rc, format, 3, regions); - expect(InvalidParameter, status); - - status = GdipMeasureCharacterRanges(graphics, teststring, 6, font, NULL, format, 3, regions); - expect(InvalidParameter, status); - - if (0) - { - /* Crashes on Windows XP */ - status = GdipMeasureCharacterRanges(graphics, teststring, 6, font, &rc, NULL, 3, regions); - expect(InvalidParameter, status); - } - - status = GdipMeasureCharacterRanges(graphics, teststring, 6, font, &rc, format, 3, NULL); - expect(InvalidParameter, status); - - status = GdipMeasureCharacterRanges(graphics, teststring, 6, font, &rc, format, 2, regions); - expect(InvalidParameter, status); - - status = GdipMeasureCharacterRanges(graphics, teststring, 6, font, &rc, format, 4, regions); - expect(Ok, status); - - for (i=0; i<4; i++) - { - status = GdipIsEmptyRegion(regions[i], graphics, ®ion_isempty[i]); - expect(Ok, status); - } - - ok(!region_isempty[0], "region shouldn't be empty\n"); - ok(!region_isempty[1], "region shouldn't be empty\n"); - ok(!region_isempty[2], "region shouldn't be empty\n"); - ok(!region_isempty[3], "region shouldn't be empty\n"); - - /* Cut off everything after the first space, and the second line. */ - rc.Width = char_bounds.Width + char_width * 2.1; - rc.Height = char_bounds.Height + char_height * 0.5; - - status = GdipMeasureCharacterRanges(graphics, teststring, 6, font, &rc, format, 3, regions); - expect(Ok, status); - - for (i=0; i<4; i++) - { - status = GdipIsEmptyRegion(regions[i], graphics, ®ion_isempty[i]); - expect(Ok, status); - } - - ok(!region_isempty[0], "region shouldn't be empty\n"); - ok(!region_isempty[1], "region shouldn't be empty\n"); - ok(region_isempty[2], "region should be empty\n"); - ok(!region_isempty[3], "region shouldn't be empty\n"); - - for (i=0; i<4; i++) - GdipDeleteRegion(regions[i]); - - GdipDeleteStringFormat(format); - GdipDeleteBrush(brush); - GdipDeleteFont(font); - GdipDeleteFontFamily(family); - GdipDeleteGraphics(graphics); - - ReleaseDC(hwnd, hdc); -} - -START_TEST(graphics) -{ - struct GdiplusStartupInput gdiplusStartupInput; - ULONG_PTR gdiplusToken; - WNDCLASSA class; - - memset( &class, 0, sizeof(class) ); - class.lpszClassName = "gdiplus_test"; - class.style = CS_HREDRAW | CS_VREDRAW; - class.lpfnWndProc = DefWindowProcA; - class.hInstance = GetModuleHandleA(0); - class.hIcon = LoadIcon(0, IDI_APPLICATION); - class.hCursor = LoadCursor(NULL, IDC_ARROW); - class.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); - RegisterClassA( &class ); - hwnd = CreateWindowA( "gdiplus_test", "graphics test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, - CW_USEDEFAULT, CW_USEDEFAULT, 200, 200, 0, 0, GetModuleHandleA(0), 0 ); - ok(hwnd != NULL, "Expected window to be created\n"); - - gdiplusStartupInput.GdiplusVersion = 1; - gdiplusStartupInput.DebugEventCallback = NULL; - gdiplusStartupInput.SuppressBackgroundThread = 0; - gdiplusStartupInput.SuppressExternalCodecs = 0; - - GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); - - test_constructor_destructor(); - test_save_restore(); - test_GdipDrawBezierI(); - test_GdipDrawArc(); - test_GdipDrawArcI(); - test_GdipDrawCurve(); - test_GdipDrawCurveI(); - test_GdipDrawCurve2(); - test_GdipDrawCurve2I(); - test_GdipDrawCurve3(); - test_GdipDrawCurve3I(); - test_GdipDrawLineI(); - test_GdipDrawLinesI(); - test_GdipDrawString(); - test_GdipGetNearestColor(); - test_GdipGetVisibleClipBounds(); - test_GdipIsVisiblePoint(); - test_GdipIsVisibleRect(); - test_Get_Release_DC(); - test_BeginContainer2(); - test_transformpoints(); - test_get_set_clip(); - test_isempty(); - test_clear(); - test_textcontrast(); - test_fromMemoryBitmap(); - test_string_functions(); - - GdiplusShutdown(gdiplusToken); - DestroyWindow( hwnd ); -} diff --git a/rostests/winetests/gdiplus/graphicspath.c b/rostests/winetests/gdiplus/graphicspath.c deleted file mode 100644 index 2343e9cf7a8..00000000000 --- a/rostests/winetests/gdiplus/graphicspath.c +++ /dev/null @@ -1,1140 +0,0 @@ -/* - * Unit test suite for paths - * - * Copyright (C) 2007 Google (Evan Stade) - * - * 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 "windows.h" -#include "gdiplus.h" -#include "wine/test.h" -#include - -#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) -#define expectf(expected, got) ok(fabs(expected - got) < 2.0, "Expected %.2f, got %.2f\n", expected, got) -#define POINT_TYPE_MAX_LEN (75) - -static void stringify_point_type(PathPointType type, char * name) -{ - *name = '\0'; - - switch(type & PathPointTypePathTypeMask){ - case PathPointTypeStart: - strcat(name, "PathPointTypeStart"); - break; - case PathPointTypeLine: - strcat(name, "PathPointTypeLine"); - break; - case PathPointTypeBezier: - strcat(name, "PathPointTypeBezier"); - break; - default: - strcat(name, "Unknown type"); - return; - } - - type &= ~PathPointTypePathTypeMask; - if(type & ~((PathPointTypePathMarker | PathPointTypeCloseSubpath))){ - *name = '\0'; - strcat(name, "Unknown type"); - return; - } - - if(type & PathPointTypePathMarker) - strcat(name, " | PathPointTypePathMarker"); - if(type & PathPointTypeCloseSubpath) - strcat(name, " | PathPointTypeCloseSubpath"); -} - -/* this helper structure and function modeled after gdi path.c test */ -typedef struct -{ - REAL X, Y; - BYTE type; - - /* How many extra entries before this one only on wine - * but not on native? */ - int wine_only_entries_preceding; - - /* 0 - This entry matches on wine. - * 1 - This entry corresponds to a single entry on wine that does not match the native entry. - * 2 - This entry is currently skipped on wine but present on native. */ - int todo; -} path_test_t; - -static void ok_path(GpPath* path, const path_test_t *expected, INT expected_size, BOOL todo_size) -{ - BYTE * types; - INT size, idx = 0, eidx = 0, numskip; - GpPointF * points; - char ename[POINT_TYPE_MAX_LEN], name[POINT_TYPE_MAX_LEN]; - - if(GdipGetPointCount(path, &size) != Ok){ - skip("Cannot perform path comparisons due to failure to retrieve path.\n"); - return; - } - - if(todo_size) todo_wine - ok(size == expected_size, "Path size %d does not match expected size %d\n", - size, expected_size); - else - ok(size == expected_size, "Path size %d does not match expected size %d\n", - size, expected_size); - - points = HeapAlloc(GetProcessHeap(), 0, size * sizeof(GpPointF)); - types = HeapAlloc(GetProcessHeap(), 0, size); - - if(GdipGetPathPoints(path, points, size) != Ok || GdipGetPathTypes(path, types, size) != Ok){ - skip("Cannot perform path comparisons due to failure to retrieve path.\n"); - goto end; - } - - numskip = expected_size ? expected[eidx].wine_only_entries_preceding : 0; - while (idx < size && eidx < expected_size){ - /* We allow a few pixels fudge in matching X and Y coordinates to account for imprecision in - * floating point to integer conversion */ - BOOL match = (types[idx] == expected[eidx].type) && - fabs(points[idx].X - expected[eidx].X) <= 2.0 && - fabs(points[idx].Y - expected[eidx].Y) <= 2.0; - - stringify_point_type(expected[eidx].type, ename); - stringify_point_type(types[idx], name); - - if (expected[eidx].todo || numskip) todo_wine - ok(match, "Expected #%d: %s (%.1f,%.1f) but got %s (%.1f,%.1f)\n", eidx, - ename, expected[eidx].X, expected[eidx].Y, - name, points[idx].X, points[idx].Y); - else - ok(match, "Expected #%d: %s (%.1f,%.1f) but got %s (%.1f,%.1f)\n", eidx, - ename, expected[eidx].X, expected[eidx].Y, - name, points[idx].X, points[idx].Y); - - if (match || expected[eidx].todo != 2) - idx++; - if (match || !numskip--) - numskip = expected[++eidx].wine_only_entries_preceding; - } - -end: - HeapFree(GetProcessHeap(), 0, types); - HeapFree(GetProcessHeap(), 0, points); -} - -static void test_constructor_destructor(void) -{ - GpStatus status; - GpPath* path = NULL; - - status = GdipCreatePath(FillModeAlternate, &path); - expect(Ok, status); - ok(path != NULL, "Expected path to be initialized\n"); - - status = GdipDeletePath(NULL); - expect(InvalidParameter, status); - - status = GdipDeletePath(path); - expect(Ok, status); -} - -static void test_getpathdata(void) -{ - GpPath *path; - GpPathData data; - GpStatus status; - INT count; - - GdipCreatePath(FillModeAlternate, &path); - status = GdipAddPathLine(path, 5.0, 5.0, 100.0, 50.0); - expect(Ok, status); - - /* Prepare storage. Made by wrapper class. */ - status = GdipGetPointCount(path, &count); - expect(Ok, status); - - data.Count = 2; - data.Types = GdipAlloc(sizeof(BYTE) * count); - data.Points = GdipAlloc(sizeof(PointF) * count); - - status = GdipGetPathData(path, &data); - expect(Ok, status); - expect((data.Points[0].X == 5.0) && (data.Points[0].Y == 5.0) && - (data.Points[1].X == 100.0) && (data.Points[1].Y == 50.0), TRUE); - expect((data.Types[0] == PathPointTypeStart) && (data.Types[1] == PathPointTypeLine), TRUE); - - GdipFree(data.Points); - GdipFree(data.Types); - GdipDeletePath(path); -} - -static path_test_t line2_path[] = { - {0.0, 50.0, PathPointTypeStart, 0, 0}, /*0*/ - {5.0, 45.0, PathPointTypeLine, 0, 0}, /*1*/ - {0.0, 40.0, PathPointTypeLine, 0, 0}, /*2*/ - {15.0, 35.0, PathPointTypeLine, 0, 0}, /*3*/ - {0.0, 30.0, PathPointTypeLine, 0, 0}, /*4*/ - {25.0, 25.0, PathPointTypeLine | PathPointTypeCloseSubpath, 0, 0}, /*5*/ - {0.0, 20.0, PathPointTypeStart, 0, 0}, /*6*/ - {35.0, 15.0, PathPointTypeLine, 0, 0}, /*7*/ - {0.0, 10.0, PathPointTypeLine, 0, 0} /*8*/ - }; - -static void test_line2(void) -{ - GpStatus status; - GpPath* path; - int i; - GpPointF line2_points[9]; - - for(i = 0; i < 9; i ++){ - line2_points[i].X = i * 5.0 * (REAL)(i % 2); - line2_points[i].Y = 50.0 - i * 5.0; - } - - GdipCreatePath(FillModeAlternate, &path); - status = GdipAddPathLine2(path, line2_points, 3); - expect(Ok, status); - status = GdipAddPathLine2(path, &(line2_points[3]), 3); - expect(Ok, status); - status = GdipClosePathFigure(path); - expect(Ok, status); - status = GdipAddPathLine2(path, &(line2_points[6]), 3); - expect(Ok, status); - - ok_path(path, line2_path, sizeof(line2_path)/sizeof(path_test_t), FALSE); - - GdipDeletePath(path); -} - -static path_test_t arc_path[] = { - {600.0, 450.0, PathPointTypeStart, 0, 0}, /*0*/ - {600.0, 643.3, PathPointTypeBezier, 0, 0}, /*1*/ - {488.1, 800.0, PathPointTypeBezier, 0, 0}, /*2*/ - {350.0, 800.0, PathPointTypeBezier, 0, 0}, /*3*/ - {600.0, 450.0, PathPointTypeLine, 0, 0}, /*4*/ - {600.0, 643.3, PathPointTypeBezier, 0, 0}, /*5*/ - {488.1, 800.0, PathPointTypeBezier, 0, 0}, /*6*/ - {350.0, 800.0, PathPointTypeBezier, 0, 0}, /*7*/ - {329.8, 800.0, PathPointTypeBezier, 0, 0}, /*8*/ - {309.7, 796.6, PathPointTypeBezier, 0, 0}, /*9*/ - {290.1, 789.8, PathPointTypeBezier, 0, 0}, /*10*/ - {409.9, 110.2, PathPointTypeLine, 0, 0}, /*11*/ - {544.0, 156.5, PathPointTypeBezier, 0, 0}, /*12*/ - {625.8, 346.2, PathPointTypeBezier, 0, 0}, /*13*/ - {592.7, 533.9, PathPointTypeBezier, 0, 0}, /*14*/ - {592.5, 535.3, PathPointTypeBezier, 0, 0}, /*15*/ - {592.2, 536.7, PathPointTypeBezier, 0, 0}, /*16*/ - {592.0, 538.1, PathPointTypeBezier, 0, 0}, /*17*/ - {409.9, 789.8, PathPointTypeLine, 0, 0}, /*18*/ - {544.0, 743.5, PathPointTypeBezier, 0, 0}, /*19*/ - {625.8, 553.8, PathPointTypeBezier, 0, 0}, /*20*/ - {592.7, 366.1, PathPointTypeBezier, 0, 0}, /*21*/ - {592.5, 364.7, PathPointTypeBezier, 0, 0}, /*22*/ - {592.2, 363.3, PathPointTypeBezier, 0, 0}, /*23*/ - {592.0, 361.9, PathPointTypeBezier, 0, 0}, /*24*/ - {540.4, 676.9, PathPointTypeLine, 0, 0}, /*25*/ - {629.9, 529.7, PathPointTypeBezier, 0, 0}, /*26*/ - {617.2, 308.8, PathPointTypeBezier, 0, 0}, /*27*/ - {512.1, 183.5, PathPointTypeBezier, 0, 0}, /*28*/ - {406.9, 58.2, PathPointTypeBezier, 0, 0}, /*29*/ - {249.1, 75.9, PathPointTypeBezier, 0, 0}, /*30*/ - {159.6, 223.1, PathPointTypeBezier, 0, 0}, /*31*/ - {70.1, 370.3, PathPointTypeBezier, 0, 0}, /*32*/ - {82.8, 591.2, PathPointTypeBezier, 0, 0}, /*33*/ - {187.9, 716.5, PathPointTypeBezier, 0, 0}, /*34*/ - {293.1, 841.8, PathPointTypeBezier, 0, 0}, /*35*/ - {450.9, 824.1, PathPointTypeBezier, 0, 0}, /*36*/ - {540.4, 676.9, PathPointTypeBezier | PathPointTypeCloseSubpath, 0, 1} /*37*/ - }; - -static void test_arc(void) -{ - GpStatus status; - GpPath* path; - - GdipCreatePath(FillModeAlternate, &path); - /* Exactly 90 degrees */ - status = GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 0.0, 90.0); - expect(Ok, status); - /* Over 90 degrees */ - status = GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 0.0, 100.0); - expect(Ok, status); - /* Negative start angle */ - status = GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, -80.0, 100.0); - expect(Ok, status); - /* Negative sweep angle */ - status = GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 80.0, -100.0); - expect(Ok, status); - /* More than a full revolution */ - status = GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 50.0, -400.0); - expect(Ok, status); - /* 0 sweep angle */ - status = GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 50.0, 0.0); - expect(Ok, status); - - ok_path(path, arc_path, sizeof(arc_path)/sizeof(path_test_t), FALSE); - - GdipDeletePath(path); -} - -static void test_worldbounds(void) -{ - GpStatus status; - GpPath *path; - GpPen *pen; - GpMatrix *matrix; - GpRectF bounds; - GpPointF line2_points[10]; - int i; - - for(i = 0; i < 10; i ++){ - line2_points[i].X = 200.0 + i * 50.0 * (i % 2); - line2_points[i].Y = 200.0 + i * 50.0 * !(i % 2); - } - GdipCreatePen1((ARGB)0xdeadbeef, 20.0, UnitWorld, &pen); - GdipSetPenEndCap(pen, LineCapSquareAnchor); - GdipCreateMatrix2(1.5, 0.0, 1.0, 1.2, 10.4, 10.2, &matrix); - - GdipCreatePath(FillModeAlternate, &path); - GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 0.0, 100.0); - GdipAddPathLine2(path, &(line2_points[0]), 10); - status = GdipGetPathWorldBounds(path, &bounds, NULL, NULL); - expect(Ok, status); - GdipDeletePath(path); - - expectf(200.0, bounds.X); - expectf(200.0, bounds.Y); - expectf(450.0, bounds.Width); - expectf(600.0, bounds.Height); - - GdipCreatePath(FillModeAlternate, &path); - GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 0.0, 100.0); - GdipAddPathLine2(path, &(line2_points[0]), 10); - status = GdipGetPathWorldBounds(path, &bounds, matrix, NULL); - expect(Ok, status); - GdipDeletePath(path); - - expectf(510.4, bounds.X); - expectf(250.2, bounds.Y); - expectf(1275.0, bounds.Width); - expectf(720.0, bounds.Height); - - GdipCreatePath(FillModeAlternate, &path); - GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 0.0, 100.0); - GdipAddPathLine2(path, &(line2_points[0]), 10); - status = GdipGetPathWorldBounds(path, &bounds, NULL, pen); - expect(Ok, status); - GdipDeletePath(path); - - expectf(100.0, bounds.X); - expectf(100.0, bounds.Y); - expectf(650.0, bounds.Width); - expectf(800.0, bounds.Height); - - GdipCreatePath(FillModeAlternate, &path); - GdipAddPathLine2(path, &(line2_points[0]), 2); - status = GdipGetPathWorldBounds(path, &bounds, NULL, pen); - expect(Ok, status); - GdipDeletePath(path); - - expectf(156.0, bounds.X); - expectf(156.0, bounds.Y); - expectf(138.0, bounds.Width); - expectf(88.0, bounds.Height); - - line2_points[2].X = 2 * line2_points[1].X - line2_points[0].X; - line2_points[2].Y = 2 * line2_points[1].Y - line2_points[0].Y; - - GdipCreatePath(FillModeAlternate, &path); - GdipAddPathLine2(path, &(line2_points[0]), 3); - status = GdipGetPathWorldBounds(path, &bounds, NULL, pen); - expect(Ok, status); - GdipDeletePath(path); - - expectf(100.0, bounds.X); - expectf(100.0, bounds.Y); - expectf(300.0, bounds.Width); - expectf(200.0, bounds.Height); - - GdipCreatePath(FillModeAlternate, &path); - GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 45.0, 20.0); - status = GdipGetPathWorldBounds(path, &bounds, NULL, pen); - expect(Ok, status); - GdipDeletePath(path); - - expectf(386.7, bounds.X); - expectf(553.4, bounds.Y); - expectf(266.8, bounds.Width); - expectf(289.6, bounds.Height); - - GdipCreatePath(FillModeAlternate, &path); - status = GdipGetPathWorldBounds(path, &bounds, matrix, pen); - expect(Ok, status); - GdipDeletePath(path); - - expectf(0.0, bounds.X); - expectf(0.0, bounds.Y); - expectf(0.0, bounds.Width); - expectf(0.0, bounds.Height); - - GdipCreatePath(FillModeAlternate, &path); - GdipAddPathLine2(path, &(line2_points[0]), 2); - status = GdipGetPathWorldBounds(path, &bounds, matrix, pen); - expect(Ok, status); - GdipDeletePath(path); - - todo_wine{ - expectf(427.9, bounds.X); - expectf(167.7, bounds.Y); - expectf(239.9, bounds.Width); - expectf(164.9, bounds.Height); - } - - GdipDeleteMatrix(matrix); - GdipCreateMatrix2(0.9, -0.5, -0.5, -1.2, 10.4, 10.2, &matrix); - GdipCreatePath(FillModeAlternate, &path); - GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 0.0, 100.0); - GdipAddPathLine2(path, &(line2_points[0]), 10); - status = GdipGetPathWorldBounds(path, &bounds, matrix, NULL); - expect(Ok, status); - GdipDeletePath(path); - GdipDeleteMatrix(matrix); - - expectf(-209.6, bounds.X); - expectf(-1274.8, bounds.Y); - expectf(705.0, bounds.Width); - expectf(945.0, bounds.Height); - - GdipDeletePen(pen); -} - -static path_test_t pathpath_path[] = { - {600.00, 450.00, PathPointTypeStart, 0, 0}, /*0*/ - {600.00, 643.30, PathPointTypeBezier, 0, 0}, /*1*/ - {488.07, 800.00, PathPointTypeBezier, 0, 0}, /*2*/ - {350.00, 800.00, PathPointTypeBezier, 0, 0}, /*3*/ - {319.61, 797.40, PathPointTypeStart, 0, 0}, /*4*/ - {182.56, 773.90, PathPointTypeBezier, 0, 0}, /*5*/ - {85.07, 599.31, PathPointTypeBezier, 0, 0}, /*6*/ - {101.85, 407.45, PathPointTypeBezier, 0, 0}, /*7*/ - {102.54, 399.66, PathPointTypeBezier, 0, 0}, /*8*/ - {103.40, 391.91, PathPointTypeBezier, 0, 0}, /*9*/ - {104.46, 384.21, PathPointTypeBezier, 0, 0}, /*10*/ - {409.92, 110.20, PathPointTypeLine, 0, 0}, /*11*/ - {543.96, 156.53, PathPointTypeBezier, 0, 0}, /*12*/ - {625.80, 346.22, PathPointTypeBezier, 0, 0}, /*13*/ - {592.71, 533.88, PathPointTypeBezier, 0, 0}, /*14*/ - {592.47, 535.28, PathPointTypeBezier, 0, 0}, /*15*/ - {592.22, 536.67, PathPointTypeBezier, 0, 0}, /*16*/ - {591.96, 538.06, PathPointTypeBezier, 0, 0}, /*17*/ - {319.61, 797.40, PathPointTypeLine, 0, 0}, /*18*/ - {182.56, 773.90, PathPointTypeBezier, 0, 0}, /*19*/ - {85.07, 599.31, PathPointTypeBezier, 0, 0}, /*20*/ - {101.85, 407.45, PathPointTypeBezier, 0, 0}, /*21*/ - {102.54, 399.66, PathPointTypeBezier, 0, 0}, /*22*/ - {103.40, 391.91, PathPointTypeBezier, 0, 0}, /*23*/ - {104.46, 384.21, PathPointTypeBezier, 0, 0} /*24*/ - }; - -static void test_pathpath(void) -{ - GpStatus status; - GpPath* path1, *path2; - - GdipCreatePath(FillModeAlternate, &path2); - GdipAddPathArc(path2, 100.0, 100.0, 500.0, 700.0, 95.0, 100.0); - - GdipCreatePath(FillModeAlternate, &path1); - GdipAddPathArc(path1, 100.0, 100.0, 500.0, 700.0, 0.0, 90.0); - status = GdipAddPathPath(path1, path2, FALSE); - expect(Ok, status); - GdipAddPathArc(path1, 100.0, 100.0, 500.0, 700.0, -80.0, 100.0); - status = GdipAddPathPath(path1, path2, TRUE); - expect(Ok, status); - - ok_path(path1, pathpath_path, sizeof(pathpath_path)/sizeof(path_test_t), FALSE); - - GdipDeletePath(path1); - GdipDeletePath(path2); -} - -static path_test_t ellipse_path[] = { - {30.00, 125.25, PathPointTypeStart, 0, 0}, /*0*/ - {30.00, 139.20, PathPointTypeBezier, 0, 0}, /*1*/ - {25.52, 150.50, PathPointTypeBezier, 0, 0}, /*2*/ - {20.00, 150.50, PathPointTypeBezier, 0, 0}, /*3*/ - {14.48, 150.50, PathPointTypeBezier, 0, 0}, /*4*/ - {10.00, 139.20, PathPointTypeBezier, 0, 0}, /*5*/ - {10.00, 125.25, PathPointTypeBezier, 0, 0}, /*6*/ - {10.00, 111.30, PathPointTypeBezier, 0, 0}, /*7*/ - {14.48, 100.00, PathPointTypeBezier, 0, 0}, /*8*/ - {20.00, 100.00, PathPointTypeBezier, 0, 0}, /*9*/ - {25.52, 100.00, PathPointTypeBezier, 0, 0}, /*10*/ - {30.00, 111.30, PathPointTypeBezier, 0, 0}, /*11*/ - {30.00, 125.25, PathPointTypeBezier | PathPointTypeCloseSubpath, 0, 0}, /*12*/ - {7.00, 11.00, PathPointTypeStart, 0, 0}, /*13*/ - {13.00, 17.00, PathPointTypeLine, 0, 0}, /*14*/ - {5.00, 195.00, PathPointTypeStart, 0, 0}, /*15*/ - {5.00, 192.24, PathPointTypeBezier, 0, 0}, /*16*/ - {6.12, 190.00, PathPointTypeBezier, 0, 0}, /*17*/ - {7.50, 190.00, PathPointTypeBezier, 0, 0}, /*18*/ - {8.88, 190.00, PathPointTypeBezier, 0, 0}, /*19*/ - {10.00, 192.24, PathPointTypeBezier, 0, 0}, /*20*/ - {10.00, 195.00, PathPointTypeBezier, 0, 0}, /*21*/ - {10.00, 197.76, PathPointTypeBezier, 0, 0}, /*22*/ - {8.88, 200.00, PathPointTypeBezier, 0, 0}, /*23*/ - {7.50, 200.00, PathPointTypeBezier, 0, 0}, /*24*/ - {6.12, 200.00, PathPointTypeBezier, 0, 0}, /*25*/ - {5.00, 197.76, PathPointTypeBezier, 0, 0}, /*26*/ - {5.00, 195.00, PathPointTypeBezier | PathPointTypeCloseSubpath, 0, 0}, /*27*/ - {10.00, 300.50, PathPointTypeStart, 0, 0}, /*28*/ - {10.00, 300.78, PathPointTypeBezier, 0, 0}, /*29*/ - {10.00, 301.00, PathPointTypeBezier, 0, 0}, /*30*/ - {10.00, 301.00, PathPointTypeBezier, 0, 0}, /*31*/ - {10.00, 301.00, PathPointTypeBezier, 0, 0}, /*32*/ - {10.00, 300.78, PathPointTypeBezier, 0, 0}, /*33*/ - {10.00, 300.50, PathPointTypeBezier, 0, 0}, /*34*/ - {10.00, 300.22, PathPointTypeBezier, 0, 0}, /*35*/ - {10.00, 300.00, PathPointTypeBezier, 0, 0}, /*36*/ - {10.00, 300.00, PathPointTypeBezier, 0, 0}, /*37*/ - {10.00, 300.00, PathPointTypeBezier, 0, 0}, /*38*/ - {10.00, 300.22, PathPointTypeBezier, 0, 0}, /*39*/ - {10.00, 300.50, PathPointTypeBezier | PathPointTypeCloseSubpath, 0, 0} /*40*/ - }; - -static void test_ellipse(void) -{ - GpStatus status; - GpPath *path; - GpPointF points[2]; - - points[0].X = 7.0; - points[0].Y = 11.0; - points[1].X = 13.0; - points[1].Y = 17.0; - - GdipCreatePath(FillModeAlternate, &path); - status = GdipAddPathEllipse(path, 10.0, 100.0, 20.0, 50.5); - expect(Ok, status); - GdipAddPathLine2(path, points, 2); - status = GdipAddPathEllipse(path, 10.0, 200.0, -5.0, -10.0); - expect(Ok, status); - GdipClosePathFigure(path); - status = GdipAddPathEllipse(path, 10.0, 300.0, 0.0, 1.0); - expect(Ok, status); - - ok_path(path, ellipse_path, sizeof(ellipse_path)/sizeof(path_test_t), FALSE); - - GdipDeletePath(path); -} - -static path_test_t linei_path[] = { - {5.00, 5.00, PathPointTypeStart, 0, 0}, /*0*/ - {6.00, 8.00, PathPointTypeLine, 0, 0}, /*1*/ - {409.92, 110.20, PathPointTypeLine, 0, 0}, /*2*/ - {543.96, 156.53, PathPointTypeBezier, 0, 0}, /*3*/ - {625.80, 346.22, PathPointTypeBezier, 0, 0}, /*4*/ - {592.71, 533.88, PathPointTypeBezier, 0, 0}, /*5*/ - {592.47, 535.28, PathPointTypeBezier, 0, 0}, /*6*/ - {592.22, 536.67, PathPointTypeBezier, 0, 0}, /*7*/ - {591.96, 538.06, PathPointTypeBezier, 0, 0}, /*8*/ - {15.00, 15.00, PathPointTypeLine, 0, 0}, /*9*/ - {26.00, 28.00, PathPointTypeLine | PathPointTypeCloseSubpath, 0, 0}, /*10*/ - {35.00, 35.00, PathPointTypeStart, 0, 0}, /*11*/ - {36.00, 38.00, PathPointTypeLine, 0, 0} /*12*/ - }; - -static void test_linei(void) -{ - GpStatus status; - GpPath *path; - - GdipCreatePath(FillModeAlternate, &path); - status = GdipAddPathLineI(path, 5.0, 5.0, 6.0, 8.0); - expect(Ok, status); - GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, -80.0, 100.0); - status = GdipAddPathLineI(path, 15.0, 15.0, 26.0, 28.0); - expect(Ok, status); - GdipClosePathFigure(path); - status = GdipAddPathLineI(path, 35.0, 35.0, 36.0, 38.0); - expect(Ok, status); - - ok_path(path, linei_path, sizeof(linei_path)/sizeof(path_test_t), FALSE); - - GdipDeletePath(path); -} - -static path_test_t poly_path[] = { - {5.00, 5.00, PathPointTypeStart, 0, 0}, /*1*/ - {6.00, 8.00, PathPointTypeLine, 0, 0}, /*2*/ - {0.00, 0.00, PathPointTypeStart, 0, 0}, /*3*/ - {10.00, 10.00, PathPointTypeLine, 0, 0}, /*4*/ - {10.00, 20.00, PathPointTypeLine, 0, 0}, /*5*/ - {30.00, 10.00, PathPointTypeLine, 0, 0}, /*6*/ - {20.00, 0.00, PathPointTypeLine | PathPointTypeCloseSubpath, 0, 0}, /*7*/ - }; - -static void test_polygon(void) -{ - GpStatus status; - GpPath *path; - GpPointF points[5]; - - points[0].X = 0.0; - points[0].Y = 0.0; - points[1].X = 10.0; - points[1].Y = 10.0; - points[2].X = 10.0; - points[2].Y = 20.0; - points[3].X = 30.0; - points[3].Y = 10.0; - points[4].X = 20.0; - points[4].Y = 0.0; - - GdipCreatePath(FillModeAlternate, &path); - - /* NULL args */ - status = GdipAddPathPolygon(NULL, points, 5); - expect(InvalidParameter, status); - status = GdipAddPathPolygon(path, NULL, 5); - expect(InvalidParameter, status); - /* Polygon should have 3 points at least */ - status = GdipAddPathPolygon(path, points, 2); - expect(InvalidParameter, status); - - /* to test how it prolongs not empty path */ - status = GdipAddPathLine(path, 5.0, 5.0, 6.0, 8.0); - expect(Ok, status); - status = GdipAddPathPolygon(path, points, 5); - expect(Ok, status); - /* check resulting path */ - ok_path(path, poly_path, sizeof(poly_path)/sizeof(path_test_t), FALSE); - - GdipDeletePath(path); -} - -static path_test_t rect_path[] = { - {5.0, 5.0, PathPointTypeStart, 0, 0}, /*0*/ - {105.0, 5.0, PathPointTypeLine, 0, 0}, /*1*/ - {105.0, 55.0, PathPointTypeLine, 0, 0}, /*2*/ - {5.0, 55.0, PathPointTypeLine | PathPointTypeCloseSubpath, 0, 0}, /*3*/ - - {100.0, 50.0, PathPointTypeStart, 0, 0}, /*4*/ - {220.0, 50.0, PathPointTypeLine, 0, 0}, /*5*/ - {220.0, 80.0, PathPointTypeLine, 0, 0}, /*6*/ - {100.0, 80.0, PathPointTypeLine | PathPointTypeCloseSubpath, 0, 0} /*7*/ - }; - -static void test_rect(void) -{ - GpStatus status; - GpPath *path; - GpRectF rects[2]; - - GdipCreatePath(FillModeAlternate, &path); - status = GdipAddPathRectangle(path, 5.0, 5.0, 100.0, 50.0); - expect(Ok, status); - status = GdipAddPathRectangle(path, 100.0, 50.0, 120.0, 30.0); - expect(Ok, status); - - ok_path(path, rect_path, sizeof(rect_path)/sizeof(path_test_t), FALSE); - - GdipDeletePath(path); - - GdipCreatePath(FillModeAlternate, &path); - - rects[0].X = 5.0; - rects[0].Y = 5.0; - rects[0].Width = 100.0; - rects[0].Height = 50.0; - rects[1].X = 100.0; - rects[1].Y = 50.0; - rects[1].Width = 120.0; - rects[1].Height = 30.0; - - status = GdipAddPathRectangles(path, (GDIPCONST GpRectF*)&rects, 2); - expect(Ok, status); - - ok_path(path, rect_path, sizeof(rect_path)/sizeof(path_test_t), FALSE); - - GdipDeletePath(path); -} - -static void test_lastpoint(void) -{ - GpStatus status; - GpPath *path; - GpPointF ptf; - - GdipCreatePath(FillModeAlternate, &path); - status = GdipAddPathRectangle(path, 5.0, 5.0, 100.0, 50.0); - expect(Ok, status); - - /* invalid args */ - status = GdipGetPathLastPoint(NULL, &ptf); - expect(InvalidParameter, status); - status = GdipGetPathLastPoint(path, NULL); - expect(InvalidParameter, status); - status = GdipGetPathLastPoint(NULL, NULL); - expect(InvalidParameter, status); - - status = GdipGetPathLastPoint(path, &ptf); - expect(Ok, status); - expect(TRUE, (ptf.X == 5.0) && (ptf.Y == 55.0)); - - GdipDeletePath(path); -} - -static path_test_t addcurve_path[] = { - {0.0, 0.0, PathPointTypeStart, 0, 0}, /*0*/ - {3.3, 3.3, PathPointTypeBezier, 0, 0}, /*1*/ - {6.7, 3.3, PathPointTypeBezier, 0, 0}, /*2*/ - {10.0, 10.0, PathPointTypeBezier, 0, 0}, /*3*/ - {13.3, 16.7, PathPointTypeBezier, 0, 0}, /*4*/ - {3.3, 20.0, PathPointTypeBezier, 0, 0}, /*5*/ - {10.0, 20.0, PathPointTypeBezier, 0, 0}, /*6*/ - {16.7, 20.0, PathPointTypeBezier, 0, 0}, /*7*/ - {23.3, 13.3, PathPointTypeBezier, 0, 0}, /*8*/ - {30.0, 10.0, PathPointTypeBezier, 0, 0} /*9*/ - }; -static path_test_t addcurve_path2[] = { - {100.0,120.0,PathPointTypeStart, 0, 0}, /*0*/ - {123.0,10.0, PathPointTypeLine, 0, 0}, /*1*/ - {0.0, 0.0, PathPointTypeLine, 0, 0}, /*2*/ - {3.3, 3.3, PathPointTypeBezier, 0, 0}, /*3*/ - {6.7, 3.3, PathPointTypeBezier, 0, 0}, /*4*/ - {10.0, 10.0, PathPointTypeBezier, 0, 0}, /*5*/ - {13.3, 16.7, PathPointTypeBezier, 0, 0}, /*6*/ - {3.3, 20.0, PathPointTypeBezier, 0, 0}, /*7*/ - {10.0, 20.0, PathPointTypeBezier, 0, 0}, /*8*/ - {16.7, 20.0, PathPointTypeBezier, 0, 0}, /*9*/ - {23.3, 13.3, PathPointTypeBezier, 0, 0}, /*10*/ - {30.0, 10.0, PathPointTypeBezier, 0, 0} /*11*/ - }; -static path_test_t addcurve_path3[] = { - {10.0, 10.0, PathPointTypeStart, 0, 0}, /*0*/ - {13.3, 16.7, PathPointTypeBezier, 0, 1}, /*1*/ - {3.3, 20.0, PathPointTypeBezier, 0, 0}, /*2*/ - {10.0, 20.0, PathPointTypeBezier, 0, 0}, /*3*/ - {16.7, 20.0, PathPointTypeBezier, 0, 0}, /*4*/ - {23.3, 13.3, PathPointTypeBezier, 0, 0}, /*5*/ - {30.0, 10.0, PathPointTypeBezier, 0, 0} /*6*/ - }; -static void test_addcurve(void) -{ - GpStatus status; - GpPath *path; - GpPointF points[4]; - - points[0].X = 0.0; - points[0].Y = 0.0; - points[1].X = 10.0; - points[1].Y = 10.0; - points[2].X = 10.0; - points[2].Y = 20.0; - points[3].X = 30.0; - points[3].Y = 10.0; - - GdipCreatePath(FillModeAlternate, &path); - - /* NULL args */ - status = GdipAddPathCurve2(NULL, NULL, 0, 0.0); - expect(InvalidParameter, status); - status = GdipAddPathCurve2(path, NULL, 0, 0.0); - expect(InvalidParameter, status); - status = GdipAddPathCurve2(path, points, -1, 0.0); - expect(InvalidParameter, status); - status = GdipAddPathCurve2(path, points, 1, 1.0); - expect(InvalidParameter, status); - - /* add to empty path */ - status = GdipAddPathCurve2(path, points, 4, 1.0); - expect(Ok, status); - ok_path(path, addcurve_path, sizeof(addcurve_path)/sizeof(path_test_t), FALSE); - GdipDeletePath(path); - - /* add to notempty path and opened figure */ - GdipCreatePath(FillModeAlternate, &path); - GdipAddPathLine(path, 100.0, 120.0, 123.0, 10.0); - status = GdipAddPathCurve2(path, points, 4, 1.0); - expect(Ok, status); - ok_path(path, addcurve_path2, sizeof(addcurve_path2)/sizeof(path_test_t), FALSE); - - /* NULL args */ - GdipResetPath(path); - status = GdipAddPathCurve3(NULL, NULL, 0, 0, 0, 0.0); - expect(InvalidParameter, status); - status = GdipAddPathCurve3(path, NULL, 0, 0, 0, 0.0); - expect(InvalidParameter, status); - /* wrong count, offset.. */ - status = GdipAddPathCurve3(path, points, 0, 0, 0, 0.0); - expect(InvalidParameter, status); - status = GdipAddPathCurve3(path, points, 4, 0, 0, 0.0); - expect(InvalidParameter, status); - status = GdipAddPathCurve3(path, points, 4, 0, 4, 0.0); - expect(InvalidParameter, status); - status = GdipAddPathCurve3(path, points, 4, 1, 3, 0.0); - expect(InvalidParameter, status); - status = GdipAddPathCurve3(path, points, 4, 1, 0, 0.0); - expect(InvalidParameter, status); - status = GdipAddPathCurve3(path, points, 4, 3, 1, 0.0); - expect(InvalidParameter, status); - - /* use all points */ - status = GdipAddPathCurve3(path, points, 4, 0, 3, 1.0); - expect(Ok, status); - ok_path(path, addcurve_path, sizeof(addcurve_path)/sizeof(path_test_t), FALSE); - GdipResetPath(path); - - status = GdipAddPathCurve3(path, points, 4, 1, 2, 1.0); - expect(Ok, status); - ok_path(path, addcurve_path3, sizeof(addcurve_path3)/sizeof(path_test_t), FALSE); - - GdipDeletePath(path); -} - -static path_test_t addclosedcurve_path[] = { - {0.0, 0.0, PathPointTypeStart, 0, 0}, /*0*/ - {-6.7, 0.0, PathPointTypeBezier, 0, 0}, /*1*/ - {6.7, 3.3, PathPointTypeBezier, 0, 0}, /*2*/ - {10.0, 10.0, PathPointTypeBezier, 0, 0}, /*3*/ - {13.3, 16.7, PathPointTypeBezier, 0, 0}, /*4*/ - {3.3, 20.0, PathPointTypeBezier, 0, 0}, /*5*/ - {10.0, 20.0, PathPointTypeBezier, 0, 0}, /*6*/ - {16.7, 20.0, PathPointTypeBezier, 0, 0}, /*7*/ - {33.3, 16.7, PathPointTypeBezier, 0, 0}, /*8*/ - {30.0, 10.0, PathPointTypeBezier, 0, 0}, /*9*/ - {26.7, 3.3, PathPointTypeBezier, 0, 0}, /*10*/ - {6.7, 0.0, PathPointTypeBezier, 0, 0}, /*11*/ - {0.0, 0.0, PathPointTypeBezier | PathPointTypeCloseSubpath, 0, 0} /*12*/ - }; -static void test_addclosedcurve(void) -{ - GpStatus status; - GpPath *path; - GpPointF points[4]; - - points[0].X = 0.0; - points[0].Y = 0.0; - points[1].X = 10.0; - points[1].Y = 10.0; - points[2].X = 10.0; - points[2].Y = 20.0; - points[3].X = 30.0; - points[3].Y = 10.0; - - GdipCreatePath(FillModeAlternate, &path); - - /* NULL args */ - status = GdipAddPathClosedCurve2(NULL, NULL, 0, 0.0); - expect(InvalidParameter, status); - status = GdipAddPathClosedCurve2(path, NULL, 0, 0.0); - expect(InvalidParameter, status); - status = GdipAddPathClosedCurve2(path, points, -1, 0.0); - expect(InvalidParameter, status); - status = GdipAddPathClosedCurve2(path, points, 1, 1.0); - expect(InvalidParameter, status); - - /* add to empty path */ - status = GdipAddPathClosedCurve2(path, points, 4, 1.0); - expect(Ok, status); - ok_path(path, addclosedcurve_path, sizeof(addclosedcurve_path)/sizeof(path_test_t), FALSE); - GdipDeletePath(path); -} - -static path_test_t reverse_path[] = { - {0.0, 20.0, PathPointTypeStart, 0, 0}, /*0*/ - {25.0, 25.0, PathPointTypeLine, 0, 0}, /*1*/ - {0.0, 30.0, PathPointTypeLine, 0, 0}, /*2*/ - {15.0, 35.0, PathPointTypeStart, 0, 0}, /*3*/ - {0.0, 40.0, PathPointTypeLine, 0, 0}, /*4*/ - {5.0, 45.0, PathPointTypeLine, 0, 0}, /*5*/ - {0.0, 50.0, PathPointTypeLine | PathPointTypeCloseSubpath, 0, 0} /*6*/ - }; - -static void test_reverse(void) -{ - GpStatus status; - GpPath *path; - GpPointF pts[7]; - INT i; - - for(i = 0; i < 7; i++){ - pts[i].X = i * 5.0 * (REAL)(i % 2); - pts[i].Y = 50.0 - i * 5.0; - } - - GdipCreatePath(FillModeAlternate, &path); - - /* NULL argument */ - status = GdipReversePath(NULL); - expect(InvalidParameter, status); - - /* empty path */ - status = GdipReversePath(path); - expect(Ok, status); - - GdipAddPathLine2(path, pts, 4); - GdipClosePathFigure(path); - GdipAddPathLine2(path, &(pts[4]), 3); - - status = GdipReversePath(path); - expect(Ok, status); - ok_path(path, reverse_path, sizeof(reverse_path)/sizeof(path_test_t), FALSE); - - GdipDeletePath(path); -} - -static path_test_t addpie_path[] = { - {50.0, 25.0, PathPointTypeStart, 0, 0}, /*0*/ - {97.2, 33.3, PathPointTypeLine, 0, 0}, /*1*/ - {91.8, 40.9, PathPointTypeBezier,0, 0}, /*2*/ - {79.4, 46.8, PathPointTypeBezier,0, 0}, /*3*/ - {63.9, 49.0, PathPointTypeBezier | PathPointTypeCloseSubpath, 0, 0} /*4*/ - }; -static path_test_t addpie_path2[] = { - {0.0, 30.0, PathPointTypeStart | PathPointTypeCloseSubpath, 0, 0} /*0*/ - }; -static path_test_t addpie_path3[] = { - {30.0, 0.0, PathPointTypeStart | PathPointTypeCloseSubpath, 0, 0} /*0*/ - }; -static void test_addpie(void) -{ - GpStatus status; - GpPath *path; - - GdipCreatePath(FillModeAlternate, &path); - - /* NULL argument */ - status = GdipAddPathPie(NULL, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); - expect(InvalidParameter, status); - - status = GdipAddPathPie(path, 0.0, 0.0, 100.0, 50.0, 10.0, 50.0); - expect(Ok, status); - ok_path(path, addpie_path, sizeof(addpie_path)/sizeof(path_test_t), FALSE); - status = GdipResetPath(path); - expect(Ok, status); - - /* zero width base ellipse */ - status = GdipAddPathPie(path, 0.0, 0.0, 0.0, 60.0, -90.0, 24.0); - expect(InvalidParameter, status); - ok_path(path, addpie_path2, sizeof(addpie_path2)/sizeof(path_test_t), FALSE); - status = GdipResetPath(path); - expect(Ok, status); - - /* zero height base ellipse */ - status = GdipAddPathPie(path, 0.0, 0.0, 60.0, 0.0 , -90.0, 24.0); - expect(InvalidParameter, status); - ok_path(path, addpie_path3, sizeof(addpie_path3)/sizeof(path_test_t), FALSE); - - GdipDeletePath(path); -} - -static path_test_t flattenellipse_path[] = { - {100.0, 25.0,PathPointTypeStart, 0, 0}, /*0*/ - {99.0, 30.0, PathPointTypeLine, 0, 0}, /*1*/ - {96.0, 34.8, PathPointTypeLine, 0, 0}, /*2*/ - {91.5, 39.0, PathPointTypeLine, 0, 0}, /*3*/ - {85.5, 42.8, PathPointTypeLine, 0, 0}, /*4*/ - {69.5, 48.0, PathPointTypeLine, 0, 1}, /*5*/ - {50.0, 50.0, PathPointTypeLine, 0, 1}, /*6*/ - {30.5, 48.0, PathPointTypeLine, 0, 1}, /*7*/ - {14.8, 42.8, PathPointTypeLine, 0, 1}, /*8*/ - {8.5, 39.0, PathPointTypeLine, 0, 1}, /*9*/ - {4.0, 34.8, PathPointTypeLine, 0, 1}, /*10*/ - {1.0, 30.0, PathPointTypeLine, 0, 1}, /*11*/ - {0.0, 25.0, PathPointTypeLine, 0, 1}, /*12*/ - {1.0, 20.0, PathPointTypeLine, 0, 1}, /*13*/ - {4.0, 15.3, PathPointTypeLine, 0, 1}, /*14*/ - {8.5, 11.0, PathPointTypeLine, 0, 1}, /*15*/ - {14.8, 7.3, PathPointTypeLine, 0, 1}, /*16*/ - {30.5, 2.0, PathPointTypeLine, 0, 1}, /*17*/ - {50.0, 0.0, PathPointTypeLine, 0, 1}, /*18*/ - {69.5, 2.0, PathPointTypeLine, 0, 1}, /*19*/ - {85.5, 7.3, PathPointTypeLine, 0, 1}, /*20*/ - {91.5, 11.0, PathPointTypeLine, 0, 1}, /*21*/ - {96.0, 15.3, PathPointTypeLine, 0, 1}, /*22*/ - {99.0, 20.0, PathPointTypeLine, 0, 1}, /*23*/ - {100.0,25.0, PathPointTypeLine | PathPointTypeCloseSubpath, 0, 1} /*24*/ - }; - -static path_test_t flattenline_path[] = { - {5.0, 10.0,PathPointTypeStart, 0, 0}, /*0*/ - {50.0, 100.0, PathPointTypeLine, 0, 0} /*1*/ - }; - -static path_test_t flattenarc_path[] = { - {100.0, 25.0,PathPointTypeStart, 0, 0}, /*0*/ - {99.0, 30.0, PathPointTypeLine, 0, 0}, /*1*/ - {96.0, 34.8, PathPointTypeLine, 0, 0}, /*2*/ - {91.5, 39.0, PathPointTypeLine, 0, 0}, /*3*/ - {85.5, 42.8, PathPointTypeLine, 0, 0}, /*4*/ - {69.5, 48.0, PathPointTypeLine, 0, 1}, /*5*/ - {50.0, 50.0, PathPointTypeLine, 0, 1} /*6*/ - }; - -static path_test_t flattenquater_path[] = { - {100.0, 50.0,PathPointTypeStart, 0, 0}, /*0*/ - {99.0, 60.0, PathPointTypeLine, 0, 0}, /*1*/ - {96.0, 69.5, PathPointTypeLine, 0, 0}, /*2*/ - {91.5, 78.0, PathPointTypeLine, 0, 0}, /*3*/ - {85.5, 85.5, PathPointTypeLine, 0, 0}, /*4*/ - {78.0, 91.5, PathPointTypeLine, 0, 0}, /*5*/ - {69.5, 96.0, PathPointTypeLine, 0, 0}, /*6*/ - {60.0, 99.0, PathPointTypeLine, 0, 0}, /*7*/ - {50.0, 100.0,PathPointTypeLine, 0, 0} /*8*/ - }; - -static void test_flatten(void) -{ - GpStatus status; - GpPath *path; - GpMatrix *m; - - status = GdipCreatePath(FillModeAlternate, &path); - expect(Ok, status); - status = GdipCreateMatrix(&m); - expect(Ok, status); - - /* NULL arguments */ - status = GdipFlattenPath(NULL, NULL, 0.0); - expect(InvalidParameter, status); - status = GdipFlattenPath(NULL, m, 0.0); - expect(InvalidParameter, status); - - /* flatten empty path */ - status = GdipFlattenPath(path, NULL, 1.0); - expect(Ok, status); - - status = GdipAddPathEllipse(path, 0.0, 0.0, 100.0, 50.0); - expect(Ok, status); - - status = GdipFlattenPath(path, NULL, 1.0); - expect(Ok, status); - ok_path(path, flattenellipse_path, sizeof(flattenellipse_path)/sizeof(path_test_t), TRUE); - - status = GdipResetPath(path); - expect(Ok, status); - status = GdipAddPathLine(path, 5.0, 10.0, 50.0, 100.0); - expect(Ok, status); - status = GdipFlattenPath(path, NULL, 1.0); - expect(Ok, status); - ok_path(path, flattenline_path, sizeof(flattenline_path)/sizeof(path_test_t), FALSE); - - status = GdipResetPath(path); - expect(Ok, status); - status = GdipAddPathArc(path, 0.0, 0.0, 100.0, 50.0, 0.0, 90.0); - expect(Ok, status); - status = GdipFlattenPath(path, NULL, 1.0); - expect(Ok, status); - ok_path(path, flattenarc_path, sizeof(flattenarc_path)/sizeof(path_test_t), TRUE); - - /* easy case - quater of a full circle */ - status = GdipResetPath(path); - expect(Ok, status); - status = GdipAddPathArc(path, 0.0, 0.0, 100.0, 100.0, 0.0, 90.0); - expect(Ok, status); - status = GdipFlattenPath(path, NULL, 1.0); - expect(Ok, status); - ok_path(path, flattenquater_path, sizeof(flattenquater_path)/sizeof(path_test_t), FALSE); - - GdipDeleteMatrix(m); - GdipDeletePath(path); -} - -static void test_isvisible(void) -{ - GpPath *path; - GpGraphics *graphics = NULL; - HDC hdc = GetDC(0); - BOOL result; - GpStatus status; - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - status = GdipCreatePath(FillModeAlternate, &path); - expect(Ok, status); - - /* NULL */ - status = GdipIsVisiblePathPoint(NULL, 0.0, 0.0, NULL, NULL); - expect(InvalidParameter, status); - status = GdipIsVisiblePathPoint(path, 0.0, 0.0, NULL, NULL); - expect(InvalidParameter, status); - status = GdipIsVisiblePathPoint(path, 0.0, 0.0, NULL, NULL); - expect(InvalidParameter, status); - status = GdipIsVisiblePathPoint(path, 0.0, 0.0, graphics, NULL); - expect(InvalidParameter, status); - - /* empty path */ - result = TRUE; - status = GdipIsVisiblePathPoint(path, 0.0, 0.0, NULL, &result); - expect(Ok, status); - expect(FALSE, result); - /* rect */ - status = GdipAddPathRectangle(path, 0.0, 0.0, 10.0, 10.0); - expect(Ok, status); - result = FALSE; - status = GdipIsVisiblePathPoint(path, 0.0, 0.0, NULL, &result); - expect(Ok, status); - expect(TRUE, result); - result = TRUE; - status = GdipIsVisiblePathPoint(path, 11.0, 11.0, NULL, &result); - expect(Ok, status); - expect(FALSE, result); - /* not affected by clipping */ - status = GdipSetClipRect(graphics, 5.0, 5.0, 5.0, 5.0, CombineModeReplace); - expect(Ok, status); - result = FALSE; - status = GdipIsVisiblePathPoint(path, 0.0, 0.0, graphics, &result); - expect(Ok, status); - expect(TRUE, result); - - GdipDeletePath(path); - GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); -} - -START_TEST(graphicspath) -{ - struct GdiplusStartupInput gdiplusStartupInput; - ULONG_PTR gdiplusToken; - - gdiplusStartupInput.GdiplusVersion = 1; - gdiplusStartupInput.DebugEventCallback = NULL; - gdiplusStartupInput.SuppressBackgroundThread = 0; - gdiplusStartupInput.SuppressExternalCodecs = 0; - - GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); - - test_constructor_destructor(); - test_getpathdata(); - test_line2(); - test_arc(); - test_worldbounds(); - test_pathpath(); - test_ellipse(); - test_linei(); - test_rect(); - test_polygon(); - test_lastpoint(); - test_addcurve(); - test_addclosedcurve(); - test_reverse(); - test_addpie(); - test_flatten(); - test_isvisible(); - - GdiplusShutdown(gdiplusToken); -} diff --git a/rostests/winetests/gdiplus/image.c b/rostests/winetests/gdiplus/image.c deleted file mode 100644 index 0e33049a5b7..00000000000 --- a/rostests/winetests/gdiplus/image.c +++ /dev/null @@ -1,2185 +0,0 @@ -/* - * Unit test suite for images - * - * Copyright (C) 2007 Google (Evan Stade) - * - * 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 - -#include - -#include "initguid.h" -#include "windows.h" -#include "gdiplus.h" -#include "wine/test.h" - -#define expect(expected, got) ok((UINT)(got) == (UINT)(expected), "Expected %.8x, got %.8x\n", (UINT)(expected), (UINT)(got)) -#define expectf(expected, got) ok(fabs(expected - got) < 0.0001, "Expected %.2f, got %.2f\n", expected, got) - -static BOOL color_match(ARGB c1, ARGB c2, BYTE max_diff) -{ - if (abs((c1 & 0xff) - (c2 & 0xff)) > max_diff) return FALSE; - c1 >>= 8; c2 >>= 8; - if (abs((c1 & 0xff) - (c2 & 0xff)) > max_diff) return FALSE; - c1 >>= 8; c2 >>= 8; - if (abs((c1 & 0xff) - (c2 & 0xff)) > max_diff) return FALSE; - c1 >>= 8; c2 >>= 8; - if (abs((c1 & 0xff) - (c2 & 0xff)) > max_diff) return FALSE; - return TRUE; -} - -static void expect_guid(REFGUID expected, REFGUID got, int line, BOOL todo) -{ - WCHAR bufferW[39]; - char buffer[39]; - char buffer2[39]; - - StringFromGUID2(got, bufferW, sizeof(bufferW)/sizeof(bufferW[0])); - WideCharToMultiByte(CP_ACP, 0, bufferW, sizeof(bufferW)/sizeof(bufferW[0]), buffer, sizeof(buffer), NULL, NULL); - StringFromGUID2(expected, bufferW, sizeof(bufferW)/sizeof(bufferW[0])); - WideCharToMultiByte(CP_ACP, 0, bufferW, sizeof(bufferW)/sizeof(bufferW[0]), buffer2, sizeof(buffer2), NULL, NULL); - if(todo) - todo_wine ok_(__FILE__, line)(IsEqualGUID(expected, got), "Expected %s, got %s\n", buffer2, buffer); - else - ok_(__FILE__, line)(IsEqualGUID(expected, got), "Expected %s, got %s\n", buffer2, buffer); -} - -static void expect_rawformat(REFGUID expected, GpImage *img, int line, BOOL todo) -{ - GUID raw; - GpStatus stat; - - stat = GdipGetImageRawFormat(img, &raw); - ok_(__FILE__, line)(stat == Ok, "GdipGetImageRawFormat failed with %d\n", stat); - if(stat != Ok) return; - expect_guid(expected, &raw, line, todo); -} - -static void test_bufferrawformat(void* buff, int size, REFGUID expected, int line, BOOL todo) -{ - LPSTREAM stream; - HGLOBAL hglob; - LPBYTE data; - HRESULT hres; - GpStatus stat; - GpImage *img; - - hglob = GlobalAlloc (0, size); - data = GlobalLock (hglob); - memcpy(data, buff, size); - GlobalUnlock(hglob); data = NULL; - - hres = CreateStreamOnHGlobal(hglob, TRUE, &stream); - ok_(__FILE__, line)(hres == S_OK, "Failed to create a stream\n"); - if(hres != S_OK) return; - - stat = GdipLoadImageFromStream(stream, &img); - ok_(__FILE__, line)(stat == Ok, "Failed to create a Bitmap\n"); - if(stat != Ok){ - IStream_Release(stream); - return; - } - - expect_rawformat(expected, img, line, todo); - - GdipDisposeImage(img); - IStream_Release(stream); -} - -static void test_Scan0(void) -{ - GpBitmap *bm; - GpStatus stat; - BYTE buff[360]; - - bm = NULL; - stat = GdipCreateBitmapFromScan0(10, 10, 10, PixelFormat24bppRGB, NULL, &bm); - expect(Ok, stat); - ok(NULL != bm, "Expected bitmap to be initialized\n"); - if (stat == Ok) - GdipDisposeImage((GpImage*)bm); - - bm = (GpBitmap*)0xdeadbeef; - stat = GdipCreateBitmapFromScan0(10, -10, 10, PixelFormat24bppRGB, NULL, &bm); - expect(InvalidParameter, stat); - ok( !bm, "expected null bitmap\n" ); - - bm = (GpBitmap*)0xdeadbeef; - stat = GdipCreateBitmapFromScan0(-10, 10, 10, PixelFormat24bppRGB, NULL, &bm); - expect(InvalidParameter, stat); - ok( !bm, "expected null bitmap\n" ); - - bm = (GpBitmap*)0xdeadbeef; - stat = GdipCreateBitmapFromScan0(10, 0, 10, PixelFormat24bppRGB, NULL, &bm); - expect(InvalidParameter, stat); - ok( !bm, "expected null bitmap\n" ); - - bm = NULL; - stat = GdipCreateBitmapFromScan0(10, 10, 12, PixelFormat24bppRGB, buff, &bm); - expect(Ok, stat); - ok(NULL != bm, "Expected bitmap to be initialized\n"); - if (stat == Ok) - GdipDisposeImage((GpImage*)bm); - - bm = (GpBitmap*) 0xdeadbeef; - stat = GdipCreateBitmapFromScan0(10, 10, 10, PixelFormat24bppRGB, buff, &bm); - expect(InvalidParameter, stat); - ok( !bm, "expected null bitmap\n" ); - - bm = (GpBitmap*)0xdeadbeef; - stat = GdipCreateBitmapFromScan0(10, 10, 0, PixelFormat24bppRGB, buff, &bm); - expect(InvalidParameter, stat); - ok( bm == (GpBitmap*)0xdeadbeef, "expected deadbeef bitmap\n" ); - - bm = NULL; - stat = GdipCreateBitmapFromScan0(10, 10, -8, PixelFormat24bppRGB, buff, &bm); - expect(Ok, stat); - ok(NULL != bm, "Expected bitmap to be initialized\n"); - if (stat == Ok) - GdipDisposeImage((GpImage*)bm); - - bm = (GpBitmap*)0xdeadbeef; - stat = GdipCreateBitmapFromScan0(10, 10, -10, PixelFormat24bppRGB, buff, &bm); - expect(InvalidParameter, stat); - ok( !bm, "expected null bitmap\n" ); -} - -static void test_FromGdiDib(void) -{ - GpBitmap *bm; - GpStatus stat; - BYTE buff[400]; - BYTE rbmi[sizeof(BITMAPINFOHEADER)+256*sizeof(RGBQUAD)]; - BITMAPINFO *bmi = (BITMAPINFO*)rbmi; - PixelFormat format; - - bm = NULL; - - memset(rbmi, 0, sizeof(rbmi)); - - bmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bmi->bmiHeader.biWidth = 10; - bmi->bmiHeader.biHeight = 10; - bmi->bmiHeader.biPlanes = 1; - bmi->bmiHeader.biBitCount = 32; - bmi->bmiHeader.biCompression = BI_RGB; - - stat = GdipCreateBitmapFromGdiDib(NULL, buff, &bm); - expect(InvalidParameter, stat); - - stat = GdipCreateBitmapFromGdiDib(bmi, NULL, &bm); - expect(InvalidParameter, stat); - - stat = GdipCreateBitmapFromGdiDib(bmi, buff, NULL); - expect(InvalidParameter, stat); - - stat = GdipCreateBitmapFromGdiDib(bmi, buff, &bm); - expect(Ok, stat); - ok(NULL != bm, "Expected bitmap to be initialized\n"); - if (stat == Ok) - { - stat = GdipGetImagePixelFormat((GpImage*)bm, &format); - expect(Ok, stat); - expect(PixelFormat32bppRGB, format); - - GdipDisposeImage((GpImage*)bm); - } - - bmi->bmiHeader.biBitCount = 24; - stat = GdipCreateBitmapFromGdiDib(bmi, buff, &bm); - expect(Ok, stat); - ok(NULL != bm, "Expected bitmap to be initialized\n"); - if (stat == Ok) - { - stat = GdipGetImagePixelFormat((GpImage*)bm, &format); - expect(Ok, stat); - expect(PixelFormat24bppRGB, format); - - GdipDisposeImage((GpImage*)bm); - } - - bmi->bmiHeader.biBitCount = 16; - stat = GdipCreateBitmapFromGdiDib(bmi, buff, &bm); - expect(Ok, stat); - ok(NULL != bm, "Expected bitmap to be initialized\n"); - if (stat == Ok) - { - stat = GdipGetImagePixelFormat((GpImage*)bm, &format); - expect(Ok, stat); - expect(PixelFormat16bppRGB555, format); - - GdipDisposeImage((GpImage*)bm); - } - - bmi->bmiHeader.biBitCount = 8; - stat = GdipCreateBitmapFromGdiDib(bmi, buff, &bm); - expect(Ok, stat); - ok(NULL != bm, "Expected bitmap to be initialized\n"); - if (stat == Ok) - { - stat = GdipGetImagePixelFormat((GpImage*)bm, &format); - expect(Ok, stat); - expect(PixelFormat8bppIndexed, format); - - GdipDisposeImage((GpImage*)bm); - } - - bmi->bmiHeader.biBitCount = 4; - stat = GdipCreateBitmapFromGdiDib(bmi, buff, &bm); - expect(Ok, stat); - ok(NULL != bm, "Expected bitmap to be initialized\n"); - if (stat == Ok) - { - stat = GdipGetImagePixelFormat((GpImage*)bm, &format); - expect(Ok, stat); - expect(PixelFormat4bppIndexed, format); - - GdipDisposeImage((GpImage*)bm); - } - - bmi->bmiHeader.biBitCount = 1; - stat = GdipCreateBitmapFromGdiDib(bmi, buff, &bm); - expect(Ok, stat); - ok(NULL != bm, "Expected bitmap to be initialized\n"); - if (stat == Ok) - { - stat = GdipGetImagePixelFormat((GpImage*)bm, &format); - expect(Ok, stat); - expect(PixelFormat1bppIndexed, format); - - GdipDisposeImage((GpImage*)bm); - } - - bmi->bmiHeader.biBitCount = 0; - stat = GdipCreateBitmapFromGdiDib(bmi, buff, &bm); - expect(InvalidParameter, stat); -} - -static void test_GetImageDimension(void) -{ - GpBitmap *bm; - GpStatus stat; - const REAL WIDTH = 10.0, HEIGHT = 20.0; - REAL w,h; - - bm = (GpBitmap*)0xdeadbeef; - stat = GdipCreateBitmapFromScan0(WIDTH, HEIGHT, 0, PixelFormat24bppRGB,NULL, &bm); - expect(Ok,stat); - ok((GpBitmap*)0xdeadbeef != bm, "Expected bitmap to not be 0xdeadbeef\n"); - ok(NULL != bm, "Expected bitmap to not be NULL\n"); - - stat = GdipGetImageDimension(NULL,&w,&h); - expect(InvalidParameter, stat); - - stat = GdipGetImageDimension((GpImage*)bm,NULL,&h); - expect(InvalidParameter, stat); - - stat = GdipGetImageDimension((GpImage*)bm,&w,NULL); - expect(InvalidParameter, stat); - - w = -1; - h = -1; - stat = GdipGetImageDimension((GpImage*)bm,&w,&h); - expect(Ok, stat); - expectf(WIDTH, w); - expectf(HEIGHT, h); - GdipDisposeImage((GpImage*)bm); -} - -static void test_GdipImageGetFrameDimensionsCount(void) -{ - GpBitmap *bm; - GpStatus stat; - const REAL WIDTH = 10.0, HEIGHT = 20.0; - UINT w; - GUID dimension = {0}; - UINT count; - ARGB color; - - bm = (GpBitmap*)0xdeadbeef; - stat = GdipCreateBitmapFromScan0(WIDTH, HEIGHT, 0, PixelFormat24bppRGB,NULL, &bm); - expect(Ok,stat); - ok((GpBitmap*)0xdeadbeef != bm, "Expected bitmap to not be 0xdeadbeef\n"); - ok(NULL != bm, "Expected bitmap to not be NULL\n"); - - stat = GdipImageGetFrameDimensionsCount(NULL,&w); - expect(InvalidParameter, stat); - - stat = GdipImageGetFrameDimensionsCount((GpImage*)bm,NULL); - expect(InvalidParameter, stat); - - w = -1; - stat = GdipImageGetFrameDimensionsCount((GpImage*)bm,&w); - expect(Ok, stat); - expect(1, w); - - stat = GdipImageGetFrameDimensionsList((GpImage*)bm, &dimension, 1); - expect(Ok, stat); - expect_guid(&FrameDimensionPage, &dimension, __LINE__, FALSE); - - stat = GdipImageGetFrameDimensionsList((GpImage*)bm, &dimension, 2); - expect(InvalidParameter, stat); - - stat = GdipImageGetFrameDimensionsList((GpImage*)bm, &dimension, 0); - expect(InvalidParameter, stat); - - stat = GdipImageGetFrameCount(NULL, &dimension, &count); - expect(InvalidParameter, stat); - - /* WinXP crashes on this test */ - if(0) - { - stat = GdipImageGetFrameCount((GpImage*)bm, &dimension, NULL); - expect(InvalidParameter, stat); - } - - stat = GdipImageGetFrameCount((GpImage*)bm, NULL, &count); - expect(Ok, stat); - - count = 12345; - stat = GdipImageGetFrameCount((GpImage*)bm, &dimension, &count); - expect(Ok, stat); - expect(1, count); - - GdipBitmapSetPixel(bm, 0, 0, 0xffffffff); - - stat = GdipImageSelectActiveFrame((GpImage*)bm, &dimension, 0); - expect(Ok, stat); - - /* SelectActiveFrame has no effect on image data of memory bitmaps */ - color = 0xdeadbeef; - GdipBitmapGetPixel(bm, 0, 0, &color); - expect(0xffffffff, color); - - GdipDisposeImage((GpImage*)bm); -} - -static void test_LoadingImages(void) -{ - GpStatus stat; - - stat = GdipCreateBitmapFromFile(0, 0); - expect(InvalidParameter, stat); - - stat = GdipCreateBitmapFromFile(0, (GpBitmap**)0xdeadbeef); - expect(InvalidParameter, stat); - - stat = GdipLoadImageFromFile(0, 0); - expect(InvalidParameter, stat); - - stat = GdipLoadImageFromFile(0, (GpImage**)0xdeadbeef); - expect(InvalidParameter, stat); - - stat = GdipLoadImageFromFileICM(0, 0); - expect(InvalidParameter, stat); - - stat = GdipLoadImageFromFileICM(0, (GpImage**)0xdeadbeef); - expect(InvalidParameter, stat); -} - -static void test_SavingImages(void) -{ - GpStatus stat; - GpBitmap *bm; - UINT n; - UINT s; - const REAL WIDTH = 10.0, HEIGHT = 20.0; - REAL w, h; - ImageCodecInfo *codecs; - static const CHAR filenameA[] = "a.bmp"; - static const WCHAR filename[] = { 'a','.','b','m','p',0 }; - - codecs = NULL; - - stat = GdipSaveImageToFile(0, 0, 0, 0); - expect(InvalidParameter, stat); - - bm = NULL; - stat = GdipCreateBitmapFromScan0(WIDTH, HEIGHT, 0, PixelFormat24bppRGB, NULL, &bm); - expect(Ok, stat); - if (!bm) - return; - - /* invalid params */ - stat = GdipSaveImageToFile((GpImage*)bm, 0, 0, 0); - expect(InvalidParameter, stat); - - stat = GdipSaveImageToFile((GpImage*)bm, filename, 0, 0); - expect(InvalidParameter, stat); - - /* encoder tests should succeed -- already tested */ - stat = GdipGetImageEncodersSize(&n, &s); - if (stat != Ok || n == 0) goto cleanup; - - codecs = GdipAlloc(s); - if (!codecs) goto cleanup; - - stat = GdipGetImageEncoders(n, s, codecs); - if (stat != Ok) goto cleanup; - - stat = GdipSaveImageToFile((GpImage*)bm, filename, &codecs[0].Clsid, 0); - expect(stat, Ok); - - GdipDisposeImage((GpImage*)bm); - bm = 0; - - /* re-load and check image stats */ - stat = GdipLoadImageFromFile(filename, (GpImage**)&bm); - expect(stat, Ok); - if (stat != Ok) goto cleanup; - - stat = GdipGetImageDimension((GpImage*)bm, &w, &h); - if (stat != Ok) goto cleanup; - - expectf(WIDTH, w); - expectf(HEIGHT, h); - - cleanup: - GdipFree(codecs); - if (bm) - GdipDisposeImage((GpImage*)bm); - ok(DeleteFileA(filenameA), "Delete failed.\n"); -} - -static void test_encoders(void) -{ - GpStatus stat; - UINT n; - UINT s; - ImageCodecInfo *codecs; - int i; - int bmp_found; - - static const CHAR bmp_format[] = "BMP"; - - stat = GdipGetImageEncodersSize(&n, &s); - expect(stat, Ok); - - codecs = GdipAlloc(s); - if (!codecs) - return; - - stat = GdipGetImageEncoders(n, s, NULL); - expect(GenericError, stat); - - stat = GdipGetImageEncoders(0, s, codecs); - expect(GenericError, stat); - - stat = GdipGetImageEncoders(n, s-1, codecs); - expect(GenericError, stat); - - stat = GdipGetImageEncoders(n, s+1, codecs); - expect(GenericError, stat); - - stat = GdipGetImageEncoders(n, s, codecs); - expect(stat, Ok); - - bmp_found = FALSE; - for (i = 0; i < n; i++) - { - CHAR desc[32]; - - WideCharToMultiByte(CP_ACP, 0, codecs[i].FormatDescription, -1, - desc, 32, 0, 0); - - if (CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, - desc, -1, - bmp_format, -1) == CSTR_EQUAL) { - bmp_found = TRUE; - break; - } - } - if (!bmp_found) - ok(FALSE, "No BMP codec found.\n"); - - GdipFree(codecs); -} - -static void test_LockBits(void) -{ - GpStatus stat; - GpBitmap *bm; - GpRect rect; - BitmapData bd; - const INT WIDTH = 10, HEIGHT = 20; - - bm = NULL; - stat = GdipCreateBitmapFromScan0(WIDTH, HEIGHT, 0, PixelFormat24bppRGB, NULL, &bm); - expect(Ok, stat); - - rect.X = 2; - rect.Y = 3; - rect.Width = 4; - rect.Height = 5; - - /* read-only */ - stat = GdipBitmapLockBits(bm, &rect, ImageLockModeRead, PixelFormat24bppRGB, &bd); - expect(Ok, stat); - - if (stat == Ok) { - stat = GdipBitmapUnlockBits(bm, &bd); - expect(Ok, stat); - } - - /* read-only, with NULL rect -> whole bitmap lock */ - stat = GdipBitmapLockBits(bm, NULL, ImageLockModeRead, PixelFormat24bppRGB, &bd); - expect(Ok, stat); - expect(bd.Width, WIDTH); - expect(bd.Height, HEIGHT); - - if (stat == Ok) { - stat = GdipBitmapUnlockBits(bm, &bd); - expect(Ok, stat); - } - - /* read-only, consecutive */ - stat = GdipBitmapLockBits(bm, &rect, ImageLockModeRead, PixelFormat24bppRGB, &bd); - expect(Ok, stat); - - if (stat == Ok) { - stat = GdipBitmapUnlockBits(bm, &bd); - expect(Ok, stat); - } - - stat = GdipDisposeImage((GpImage*)bm); - expect(Ok, stat); - stat = GdipCreateBitmapFromScan0(WIDTH, HEIGHT, 0, PixelFormat24bppRGB, NULL, &bm); - expect(Ok, stat); - - /* read x2 */ - stat = GdipBitmapLockBits(bm, &rect, ImageLockModeRead, PixelFormat24bppRGB, &bd); - expect(Ok, stat); - stat = GdipBitmapLockBits(bm, &rect, ImageLockModeRead, PixelFormat24bppRGB, &bd); - expect(WrongState, stat); - - stat = GdipBitmapUnlockBits(bm, &bd); - expect(Ok, stat); - - stat = GdipDisposeImage((GpImage*)bm); - expect(Ok, stat); - stat = GdipCreateBitmapFromScan0(WIDTH, HEIGHT, 0, PixelFormat24bppRGB, NULL, &bm); - expect(Ok, stat); - - /* write, no modification */ - stat = GdipBitmapLockBits(bm, &rect, ImageLockModeWrite, PixelFormat24bppRGB, &bd); - expect(Ok, stat); - - if (stat == Ok) { - stat = GdipBitmapUnlockBits(bm, &bd); - expect(Ok, stat); - } - - /* write, consecutive */ - stat = GdipBitmapLockBits(bm, &rect, ImageLockModeWrite, PixelFormat24bppRGB, &bd); - expect(Ok, stat); - - if (stat == Ok) { - stat = GdipBitmapUnlockBits(bm, &bd); - expect(Ok, stat); - } - - stat = GdipDisposeImage((GpImage*)bm); - expect(Ok, stat); - stat = GdipCreateBitmapFromScan0(WIDTH, HEIGHT, 0, PixelFormat24bppRGB, NULL, &bm); - expect(Ok, stat); - - /* write, modify */ - stat = GdipBitmapLockBits(bm, &rect, ImageLockModeWrite, PixelFormat24bppRGB, &bd); - expect(Ok, stat); - - if (stat == Ok) { - if (bd.Scan0) - ((char*)bd.Scan0)[2] = 0xff; - - stat = GdipBitmapUnlockBits(bm, &bd); - expect(Ok, stat); - } - - stat = GdipDisposeImage((GpImage*)bm); - expect(Ok, stat); - - /* dispose locked */ - stat = GdipCreateBitmapFromScan0(WIDTH, HEIGHT, 0, PixelFormat24bppRGB, NULL, &bm); - expect(Ok, stat); - stat = GdipBitmapLockBits(bm, &rect, ImageLockModeRead, PixelFormat24bppRGB, &bd); - expect(Ok, stat); - stat = GdipDisposeImage((GpImage*)bm); - expect(Ok, stat); -} - -static void test_GdipCreateBitmapFromHBITMAP(void) -{ - GpBitmap* gpbm = NULL; - HBITMAP hbm = NULL; - HPALETTE hpal = NULL; - GpStatus stat; - BYTE buff[1000]; - LOGPALETTE* LogPal = NULL; - REAL width, height; - const REAL WIDTH1 = 5; - const REAL HEIGHT1 = 15; - const REAL WIDTH2 = 10; - const REAL HEIGHT2 = 20; - HDC hdc; - BITMAPINFO bmi; - BYTE *bits; - - stat = GdipCreateBitmapFromHBITMAP(NULL, NULL, NULL); - expect(InvalidParameter, stat); - - hbm = CreateBitmap(WIDTH1, HEIGHT1, 1, 1, NULL); - stat = GdipCreateBitmapFromHBITMAP(hbm, NULL, NULL); - expect(InvalidParameter, stat); - - stat = GdipCreateBitmapFromHBITMAP(hbm, NULL, &gpbm); - expect(Ok, stat); - expect(Ok, GdipGetImageDimension((GpImage*) gpbm, &width, &height)); - expectf(WIDTH1, width); - expectf(HEIGHT1, height); - if (stat == Ok) - GdipDisposeImage((GpImage*)gpbm); - DeleteObject(hbm); - - memset(buff, 0, sizeof(buff)); - hbm = CreateBitmap(WIDTH2, HEIGHT2, 1, 1, &buff); - stat = GdipCreateBitmapFromHBITMAP(hbm, NULL, &gpbm); - expect(Ok, stat); - /* raw format */ - expect_rawformat(&ImageFormatMemoryBMP, (GpImage*)gpbm, __LINE__, FALSE); - - expect(Ok, GdipGetImageDimension((GpImage*) gpbm, &width, &height)); - expectf(WIDTH2, width); - expectf(HEIGHT2, height); - if (stat == Ok) - GdipDisposeImage((GpImage*)gpbm); - DeleteObject(hbm); - - hdc = CreateCompatibleDC(0); - ok(hdc != NULL, "CreateCompatibleDC failed\n"); - bmi.bmiHeader.biSize = sizeof(bmi.bmiHeader); - bmi.bmiHeader.biHeight = HEIGHT1; - bmi.bmiHeader.biWidth = WIDTH1; - bmi.bmiHeader.biBitCount = 24; - bmi.bmiHeader.biPlanes = 1; - bmi.bmiHeader.biCompression = BI_RGB; - - hbm = CreateDIBSection(hdc, &bmi, DIB_RGB_COLORS, (void**)&bits, NULL, 0); - ok(hbm != NULL, "CreateDIBSection failed\n"); - - bits[0] = 0; - - stat = GdipCreateBitmapFromHBITMAP(hbm, NULL, &gpbm); - expect(Ok, stat); - expect(Ok, GdipGetImageDimension((GpImage*) gpbm, &width, &height)); - expectf(WIDTH1, width); - expectf(HEIGHT1, height); - if (stat == Ok) - { - /* test whether writing to the bitmap affects the original */ - stat = GdipBitmapSetPixel(gpbm, 0, 0, 0xffffffff); - expect(Ok, stat); - - expect(0, bits[0]); - - GdipDisposeImage((GpImage*)gpbm); - } - - LogPal = GdipAlloc(sizeof(LOGPALETTE)); - ok(LogPal != NULL, "unable to allocate LOGPALETTE\n"); - LogPal->palVersion = 0x300; - LogPal->palNumEntries = 1; - hpal = CreatePalette(LogPal); - ok(hpal != NULL, "CreatePalette failed\n"); - GdipFree(LogPal); - - stat = GdipCreateBitmapFromHBITMAP(hbm, hpal, &gpbm); - todo_wine - { - expect(Ok, stat); - } - if (stat == Ok) - GdipDisposeImage((GpImage*)gpbm); - - DeleteObject(hpal); - DeleteObject(hbm); -} - -static void test_GdipGetImageFlags(void) -{ - GpImage *img; - GpStatus stat; - UINT flags; - - img = (GpImage*)0xdeadbeef; - - stat = GdipGetImageFlags(NULL, NULL); - expect(InvalidParameter, stat); - - stat = GdipGetImageFlags(NULL, &flags); - expect(InvalidParameter, stat); - - stat = GdipGetImageFlags(img, NULL); - expect(InvalidParameter, stat); -} - -static void test_GdipCloneImage(void) -{ - GpStatus stat; - GpRectF rectF; - GpUnit unit; - GpBitmap *bm; - GpImage *image_src, *image_dest = NULL; - const INT WIDTH = 10, HEIGHT = 20; - - /* Create an image, clone it, delete the original, make sure the copy works */ - stat = GdipCreateBitmapFromScan0(WIDTH, HEIGHT, 0, PixelFormat24bppRGB, NULL, &bm); - expect(Ok, stat); - expect_rawformat(&ImageFormatMemoryBMP, (GpImage*)bm, __LINE__, FALSE); - - image_src = ((GpImage*)bm); - stat = GdipCloneImage(image_src, &image_dest); - expect(Ok, stat); - expect_rawformat(&ImageFormatMemoryBMP, image_dest, __LINE__, FALSE); - - stat = GdipDisposeImage((GpImage*)bm); - expect(Ok, stat); - stat = GdipGetImageBounds(image_dest, &rectF, &unit); - expect(Ok, stat); - - /* Treat FP values carefully */ - expectf((REAL)WIDTH, rectF.Width); - expectf((REAL)HEIGHT, rectF.Height); - - stat = GdipDisposeImage(image_dest); - expect(Ok, stat); -} - -static void test_testcontrol(void) -{ - GpStatus stat; - DWORD param; - - param = 0; - stat = GdipTestControl(TestControlGetBuildNumber, ¶m); - expect(Ok, stat); - ok(param != 0, "Build number expected, got %u\n", param); -} - -static void test_fromhicon(void) -{ - static const BYTE bmp_bits[1024]; - HBITMAP hbmMask, hbmColor; - ICONINFO info; - HICON hIcon; - GpStatus stat; - GpBitmap *bitmap = NULL; - UINT dim; - ImageType type; - PixelFormat format; - - /* NULL */ - stat = GdipCreateBitmapFromHICON(NULL, NULL); - expect(InvalidParameter, stat); - stat = GdipCreateBitmapFromHICON(NULL, &bitmap); - expect(InvalidParameter, stat); - - /* color icon 1 bit */ - hbmMask = CreateBitmap(16, 16, 1, 1, bmp_bits); - ok(hbmMask != 0, "CreateBitmap failed\n"); - hbmColor = CreateBitmap(16, 16, 1, 1, bmp_bits); - ok(hbmColor != 0, "CreateBitmap failed\n"); - info.fIcon = TRUE; - info.xHotspot = 8; - info.yHotspot = 8; - info.hbmMask = hbmMask; - info.hbmColor = hbmColor; - hIcon = CreateIconIndirect(&info); - ok(hIcon != 0, "CreateIconIndirect failed\n"); - DeleteObject(hbmMask); - DeleteObject(hbmColor); - - stat = GdipCreateBitmapFromHICON(hIcon, &bitmap); - ok(stat == Ok || - broken(stat == InvalidParameter), /* Win98 */ - "Expected Ok, got %.8x\n", stat); - if(stat == Ok){ - /* check attributes */ - stat = GdipGetImageHeight((GpImage*)bitmap, &dim); - expect(Ok, stat); - expect(16, dim); - stat = GdipGetImageWidth((GpImage*)bitmap, &dim); - expect(Ok, stat); - expect(16, dim); - stat = GdipGetImageType((GpImage*)bitmap, &type); - expect(Ok, stat); - expect(ImageTypeBitmap, type); - stat = GdipGetImagePixelFormat((GpImage*)bitmap, &format); - expect(PixelFormat32bppARGB, format); - /* raw format */ - expect_rawformat(&ImageFormatMemoryBMP, (GpImage*)bitmap, __LINE__, FALSE); - GdipDisposeImage((GpImage*)bitmap); - } - DestroyIcon(hIcon); - - /* color icon 8 bpp */ - hbmMask = CreateBitmap(16, 16, 1, 8, bmp_bits); - ok(hbmMask != 0, "CreateBitmap failed\n"); - hbmColor = CreateBitmap(16, 16, 1, 8, bmp_bits); - ok(hbmColor != 0, "CreateBitmap failed\n"); - info.fIcon = TRUE; - info.xHotspot = 8; - info.yHotspot = 8; - info.hbmMask = hbmMask; - info.hbmColor = hbmColor; - hIcon = CreateIconIndirect(&info); - ok(hIcon != 0, "CreateIconIndirect failed\n"); - DeleteObject(hbmMask); - DeleteObject(hbmColor); - - stat = GdipCreateBitmapFromHICON(hIcon, &bitmap); - expect(Ok, stat); - if(stat == Ok){ - /* check attributes */ - stat = GdipGetImageHeight((GpImage*)bitmap, &dim); - expect(Ok, stat); - expect(16, dim); - stat = GdipGetImageWidth((GpImage*)bitmap, &dim); - expect(Ok, stat); - expect(16, dim); - stat = GdipGetImageType((GpImage*)bitmap, &type); - expect(Ok, stat); - expect(ImageTypeBitmap, type); - stat = GdipGetImagePixelFormat((GpImage*)bitmap, &format); - expect(PixelFormat32bppARGB, format); - /* raw format */ - expect_rawformat(&ImageFormatMemoryBMP, (GpImage*)bitmap, __LINE__, FALSE); - GdipDisposeImage((GpImage*)bitmap); - } - DestroyIcon(hIcon); -} - -/* 1x1 pixel png */ -static const unsigned char pngimage[285] = { -0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,0x44,0x52, -0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x08,0x02,0x00,0x00,0x00,0x90,0x77,0x53, -0xde,0x00,0x00,0x00,0x09,0x70,0x48,0x59,0x73,0x00,0x00,0x0b,0x13,0x00,0x00,0x0b, -0x13,0x01,0x00,0x9a,0x9c,0x18,0x00,0x00,0x00,0x07,0x74,0x49,0x4d,0x45,0x07,0xd5, -0x06,0x03,0x0f,0x07,0x2d,0x12,0x10,0xf0,0xfd,0x00,0x00,0x00,0x0c,0x49,0x44,0x41, -0x54,0x08,0xd7,0x63,0xf8,0xff,0xff,0x3f,0x00,0x05,0xfe,0x02,0xfe,0xdc,0xcc,0x59, -0xe7,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82 -}; -/* 1x1 pixel gif */ -static const unsigned char gifimage[35] = { -0x47,0x49,0x46,0x38,0x37,0x61,0x01,0x00,0x01,0x00,0x80,0x00,0x00,0xff,0xff,0xff, -0xff,0xff,0xff,0x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x02,0x02,0x44, -0x01,0x00,0x3b -}; -/* 1x1 pixel bmp */ -static const unsigned char bmpimage[66] = { -0x42,0x4d,0x42,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x28,0x00, -0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00, -0x00,0x00,0x04,0x00,0x00,0x00,0x12,0x0b,0x00,0x00,0x12,0x0b,0x00,0x00,0x02,0x00, -0x00,0x00,0x02,0x00,0x00,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0x00,0x00, -0x00,0x00 -}; -/* 1x1 pixel jpg */ -static const unsigned char jpgimage[285] = { -0xff,0xd8,0xff,0xe0,0x00,0x10,0x4a,0x46,0x49,0x46,0x00,0x01,0x01,0x01,0x01,0x2c, -0x01,0x2c,0x00,0x00,0xff,0xdb,0x00,0x43,0x00,0x05,0x03,0x04,0x04,0x04,0x03,0x05, -0x04,0x04,0x04,0x05,0x05,0x05,0x06,0x07,0x0c,0x08,0x07,0x07,0x07,0x07,0x0f,0x0b, -0x0b,0x09,0x0c,0x11,0x0f,0x12,0x12,0x11,0x0f,0x11,0x11,0x13,0x16,0x1c,0x17,0x13, -0x14,0x1a,0x15,0x11,0x11,0x18,0x21,0x18,0x1a,0x1d,0x1d,0x1f,0x1f,0x1f,0x13,0x17, -0x22,0x24,0x22,0x1e,0x24,0x1c,0x1e,0x1f,0x1e,0xff,0xdb,0x00,0x43,0x01,0x05,0x05, -0x05,0x07,0x06,0x07,0x0e,0x08,0x08,0x0e,0x1e,0x14,0x11,0x14,0x1e,0x1e,0x1e,0x1e, -0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e, -0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e, -0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0xff,0xc0, -0x00,0x11,0x08,0x00,0x01,0x00,0x01,0x03,0x01,0x22,0x00,0x02,0x11,0x01,0x03,0x11, -0x01,0xff,0xc4,0x00,0x15,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xff,0xc4,0x00,0x14,0x10,0x01,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xc4, -0x00,0x14,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0xff,0xc4,0x00,0x14,0x11,0x01,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xda,0x00,0x0c,0x03,0x01, -0x00,0x02,0x11,0x03,0x11,0x00,0x3f,0x00,0xb2,0xc0,0x07,0xff,0xd9 -}; -/* 1x1 pixel tiff */ -static const unsigned char tiffimage[] = { -0x49,0x49,0x2a,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0xfe,0x00, -0x04,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x00,0x01,0x00, -0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x01,0x03,0x00,0x01,0x00,0x00,0x00,0x01,0x00, -0x00,0x00,0x02,0x01,0x03,0x00,0x03,0x00,0x00,0x00,0xd2,0x00,0x00,0x00,0x03,0x01, -0x03,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x06,0x01,0x03,0x00,0x01,0x00, -0x00,0x00,0x02,0x00,0x00,0x00,0x0d,0x01,0x02,0x00,0x1b,0x00,0x00,0x00,0xd8,0x00, -0x00,0x00,0x11,0x01,0x04,0x00,0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x12,0x01, -0x03,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x15,0x01,0x03,0x00,0x01,0x00, -0x00,0x00,0x03,0x00,0x00,0x00,0x16,0x01,0x03,0x00,0x01,0x00,0x00,0x00,0x40,0x00, -0x00,0x00,0x17,0x01,0x04,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x1a,0x01, -0x05,0x00,0x01,0x00,0x00,0x00,0xf4,0x00,0x00,0x00,0x1b,0x01,0x05,0x00,0x01,0x00, -0x00,0x00,0xfc,0x00,0x00,0x00,0x1c,0x01,0x03,0x00,0x01,0x00,0x00,0x00,0x01,0x00, -0x00,0x00,0x28,0x01,0x03,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x2f,0x68,0x6f,0x6d,0x65,0x2f,0x6d,0x65, -0x68,0x2f,0x44,0x65,0x73,0x6b,0x74,0x6f,0x70,0x2f,0x74,0x65,0x73,0x74,0x2e,0x74, -0x69,0x66,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x48, -0x00,0x00,0x00,0x01 -}; -/* 320x320 twip wmf */ -static const unsigned char wmfimage[180] = { -0xd7,0xcd,0xc6,0x9a,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x01,0x40,0x01,0xa0,0x05, -0x00,0x00,0x00,0x00,0xb1,0x52,0x01,0x00,0x09,0x00,0x00,0x03,0x4f,0x00,0x00,0x00, -0x0f,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x0b,0x02,0x00,0x00, -0x00,0x00,0x05,0x00,0x00,0x00,0x0c,0x02,0x40,0x01,0x40,0x01,0x04,0x00,0x00,0x00, -0x02,0x01,0x01,0x00,0x04,0x00,0x00,0x00,0x04,0x01,0x0d,0x00,0x08,0x00,0x00,0x00, -0xfa,0x02,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00, -0x2d,0x01,0x00,0x00,0x07,0x00,0x00,0x00,0xfc,0x02,0x01,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x04,0x00,0x00,0x00,0x2d,0x01,0x01,0x00,0x07,0x00,0x00,0x00,0xfc,0x02, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x2d,0x01,0x02,0x00, -0x07,0x00,0x00,0x00,0x1b,0x04,0x40,0x01,0x40,0x01,0x00,0x00,0x00,0x00,0x04,0x00, -0x00,0x00,0xf0,0x01,0x00,0x00,0x04,0x00,0x00,0x00,0xf0,0x01,0x01,0x00,0x03,0x00, -0x00,0x00,0x00,0x00 -}; -static void test_getrawformat(void) -{ - test_bufferrawformat((void*)pngimage, sizeof(pngimage), &ImageFormatPNG, __LINE__, FALSE); - test_bufferrawformat((void*)gifimage, sizeof(gifimage), &ImageFormatGIF, __LINE__, FALSE); - test_bufferrawformat((void*)bmpimage, sizeof(bmpimage), &ImageFormatBMP, __LINE__, FALSE); - test_bufferrawformat((void*)jpgimage, sizeof(jpgimage), &ImageFormatJPEG, __LINE__, FALSE); - test_bufferrawformat((void*)tiffimage, sizeof(tiffimage), &ImageFormatTIFF, __LINE__, FALSE); - test_bufferrawformat((void*)wmfimage, sizeof(wmfimage), &ImageFormatWMF, __LINE__, FALSE); -} - -static void test_loadwmf(void) -{ - LPSTREAM stream; - HGLOBAL hglob; - LPBYTE data; - HRESULT hres; - GpStatus stat; - GpImage *img; - GpRectF bounds; - GpUnit unit; - REAL res = 12345.0; - MetafileHeader header; - - hglob = GlobalAlloc (0, sizeof(wmfimage)); - data = GlobalLock (hglob); - memcpy(data, wmfimage, sizeof(wmfimage)); - GlobalUnlock(hglob); data = NULL; - - hres = CreateStreamOnHGlobal(hglob, TRUE, &stream); - ok(hres == S_OK, "Failed to create a stream\n"); - if(hres != S_OK) return; - - stat = GdipLoadImageFromStream(stream, &img); - ok(stat == Ok, "Failed to create a Bitmap\n"); - if(stat != Ok){ - IStream_Release(stream); - return; - } - - IStream_Release(stream); - - stat = GdipGetImageBounds(img, &bounds, &unit); - expect(Ok, stat); - todo_wine expect(UnitPixel, unit); - expectf(0.0, bounds.X); - expectf(0.0, bounds.Y); - todo_wine expectf(320.0, bounds.Width); - todo_wine expectf(320.0, bounds.Height); - - stat = GdipGetImageHorizontalResolution(img, &res); - expect(Ok, stat); - todo_wine expectf(1440.0, res); - - stat = GdipGetImageVerticalResolution(img, &res); - expect(Ok, stat); - todo_wine expectf(1440.0, res); - - memset(&header, 0, sizeof(header)); - stat = GdipGetMetafileHeaderFromMetafile((GpMetafile*)img, &header); - expect(Ok, stat); - if (stat == Ok) - { - todo_wine expect(MetafileTypeWmfPlaceable, header.Type); - todo_wine expect(sizeof(wmfimage)-sizeof(WmfPlaceableFileHeader), header.Size); - todo_wine expect(0x300, header.Version); - expect(0, header.EmfPlusFlags); - todo_wine expectf(1440.0, header.DpiX); - todo_wine expectf(1440.0, header.DpiY); - expect(0, header.X); - expect(0, header.Y); - todo_wine expect(320, header.Width); - todo_wine expect(320, header.Height); - todo_wine expect(1, U(header).WmfHeader.mtType); - expect(0, header.EmfPlusHeaderSize); - expect(0, header.LogicalDpiX); - expect(0, header.LogicalDpiY); - } - - GdipDisposeImage(img); -} - -static void test_createfromwmf(void) -{ - HMETAFILE hwmf; - GpImage *img; - GpStatus stat; - GpRectF bounds; - GpUnit unit; - REAL res = 12345.0; - MetafileHeader header; - - hwmf = SetMetaFileBitsEx(sizeof(wmfimage)-sizeof(WmfPlaceableFileHeader), - wmfimage+sizeof(WmfPlaceableFileHeader)); - ok(hwmf != 0, "SetMetaFileBitsEx failed\n"); - - stat = GdipCreateMetafileFromWmf(hwmf, TRUE, - (WmfPlaceableFileHeader*)wmfimage, (GpMetafile**)&img); - expect(Ok, stat); - - stat = GdipGetImageBounds(img, &bounds, &unit); - expect(Ok, stat); - expect(UnitPixel, unit); - expectf(0.0, bounds.X); - expectf(0.0, bounds.Y); - expectf(320.0, bounds.Width); - expectf(320.0, bounds.Height); - - stat = GdipGetImageHorizontalResolution(img, &res); - expect(Ok, stat); - expectf(1440.0, res); - - stat = GdipGetImageVerticalResolution(img, &res); - expect(Ok, stat); - expectf(1440.0, res); - - memset(&header, 0, sizeof(header)); - stat = GdipGetMetafileHeaderFromMetafile((GpMetafile*)img, &header); - expect(Ok, stat); - if (stat == Ok) - { - todo_wine expect(MetafileTypeWmfPlaceable, header.Type); - todo_wine expect(sizeof(wmfimage)-sizeof(WmfPlaceableFileHeader), header.Size); - todo_wine expect(0x300, header.Version); - expect(0, header.EmfPlusFlags); - todo_wine expectf(1440.0, header.DpiX); - todo_wine expectf(1440.0, header.DpiY); - expect(0, header.X); - expect(0, header.Y); - todo_wine expect(320, header.Width); - todo_wine expect(320, header.Height); - todo_wine expect(1, U(header).WmfHeader.mtType); - expect(0, header.EmfPlusHeaderSize); - expect(0, header.LogicalDpiX); - expect(0, header.LogicalDpiY); - } - - GdipDisposeImage(img); -} - -static void test_resolution(void) -{ - GpStatus stat; - GpBitmap *bitmap; - REAL res=-1.0; - HDC screendc; - int screenxres, screenyres; - - /* create Bitmap */ - stat = GdipCreateBitmapFromScan0(1, 1, 32, PixelFormat24bppRGB, NULL, &bitmap); - expect(Ok, stat); - - /* test invalid values */ - stat = GdipGetImageHorizontalResolution(NULL, &res); - expect(InvalidParameter, stat); - - stat = GdipGetImageHorizontalResolution((GpImage*)bitmap, NULL); - expect(InvalidParameter, stat); - - stat = GdipGetImageVerticalResolution(NULL, &res); - expect(InvalidParameter, stat); - - stat = GdipGetImageVerticalResolution((GpImage*)bitmap, NULL); - expect(InvalidParameter, stat); - - stat = GdipBitmapSetResolution(NULL, 96.0, 96.0); - expect(InvalidParameter, stat); - - stat = GdipBitmapSetResolution(bitmap, 0.0, 0.0); - expect(InvalidParameter, stat); - - /* defaults to screen resolution */ - screendc = GetDC(0); - - screenxres = GetDeviceCaps(screendc, LOGPIXELSX); - screenyres = GetDeviceCaps(screendc, LOGPIXELSY); - - ReleaseDC(0, screendc); - - stat = GdipGetImageHorizontalResolution((GpImage*)bitmap, &res); - expect(Ok, stat); - expectf((REAL)screenxres, res); - - stat = GdipGetImageVerticalResolution((GpImage*)bitmap, &res); - expect(Ok, stat); - expectf((REAL)screenyres, res); - - /* test changing the resolution */ - stat = GdipBitmapSetResolution(bitmap, screenxres*2.0, screenyres*3.0); - expect(Ok, stat); - - stat = GdipGetImageHorizontalResolution((GpImage*)bitmap, &res); - expect(Ok, stat); - expectf(screenxres*2.0, res); - - stat = GdipGetImageVerticalResolution((GpImage*)bitmap, &res); - expect(Ok, stat); - expectf(screenyres*3.0, res); - - stat = GdipDisposeImage((GpImage*)bitmap); - expect(Ok, stat); -} - -static void test_createhbitmap(void) -{ - GpStatus stat; - GpBitmap *bitmap; - HBITMAP hbitmap, oldhbitmap; - BITMAP bm; - int ret; - HDC hdc; - COLORREF pixel; - BYTE bits[640]; - - memset(bits, 0x68, 640); - - /* create Bitmap */ - stat = GdipCreateBitmapFromScan0(10, 20, 32, PixelFormat24bppRGB, bits, &bitmap); - expect(Ok, stat); - - /* test NULL values */ - stat = GdipCreateHBITMAPFromBitmap(NULL, &hbitmap, 0); - expect(InvalidParameter, stat); - - stat = GdipCreateHBITMAPFromBitmap(bitmap, NULL, 0); - expect(InvalidParameter, stat); - - /* create HBITMAP */ - stat = GdipCreateHBITMAPFromBitmap(bitmap, &hbitmap, 0); - expect(Ok, stat); - - if (stat == Ok) - { - ret = GetObjectA(hbitmap, sizeof(BITMAP), &bm); - expect(sizeof(BITMAP), ret); - - expect(0, bm.bmType); - expect(10, bm.bmWidth); - expect(20, bm.bmHeight); - expect(40, bm.bmWidthBytes); - expect(1, bm.bmPlanes); - expect(32, bm.bmBitsPixel); - ok(bm.bmBits != NULL, "got DDB, expected DIB\n"); - - hdc = CreateCompatibleDC(NULL); - - oldhbitmap = SelectObject(hdc, hbitmap); - pixel = GetPixel(hdc, 5, 5); - SelectObject(hdc, oldhbitmap); - - DeleteDC(hdc); - - expect(0x686868, pixel); - - DeleteObject(hbitmap); - } - - stat = GdipDisposeImage((GpImage*)bitmap); - expect(Ok, stat); -} - -static void test_getthumbnail(void) -{ - GpStatus stat; - GpImage *bitmap1, *bitmap2; - UINT width, height; - - stat = GdipGetImageThumbnail(NULL, 0, 0, &bitmap2, NULL, NULL); - expect(InvalidParameter, stat); - - stat = GdipCreateBitmapFromScan0(128, 128, 0, PixelFormat32bppRGB, NULL, (GpBitmap**)&bitmap1); - expect(Ok, stat); - - stat = GdipGetImageThumbnail(bitmap1, 0, 0, NULL, NULL, NULL); - expect(InvalidParameter, stat); - - stat = GdipGetImageThumbnail(bitmap1, 0, 0, &bitmap2, NULL, NULL); - expect(Ok, stat); - - if (stat == Ok) - { - stat = GdipGetImageWidth(bitmap2, &width); - expect(Ok, stat); - expect(120, width); - - stat = GdipGetImageHeight(bitmap2, &height); - expect(Ok, stat); - expect(120, height); - - GdipDisposeImage(bitmap2); - } - - GdipDisposeImage(bitmap1); - - - stat = GdipCreateBitmapFromScan0(64, 128, 0, PixelFormat32bppRGB, NULL, (GpBitmap**)&bitmap1); - expect(Ok, stat); - - stat = GdipGetImageThumbnail(bitmap1, 32, 32, &bitmap2, NULL, NULL); - expect(Ok, stat); - - if (stat == Ok) - { - stat = GdipGetImageWidth(bitmap2, &width); - expect(Ok, stat); - expect(32, width); - - stat = GdipGetImageHeight(bitmap2, &height); - expect(Ok, stat); - expect(32, height); - - GdipDisposeImage(bitmap2); - } - - stat = GdipGetImageThumbnail(bitmap1, 0, 0, &bitmap2, NULL, NULL); - expect(Ok, stat); - - if (stat == Ok) - { - stat = GdipGetImageWidth(bitmap2, &width); - expect(Ok, stat); - expect(120, width); - - stat = GdipGetImageHeight(bitmap2, &height); - expect(Ok, stat); - expect(120, height); - - GdipDisposeImage(bitmap2); - } - - GdipDisposeImage(bitmap1); -} - -static void test_getsetpixel(void) -{ - GpStatus stat; - GpBitmap *bitmap; - ARGB color; - BYTE bits[16] = {0x00,0x00,0x00,0x00, 0x00,0xff,0xff,0x00, - 0xff,0x00,0x00,0x00, 0xff,0xff,0xff,0x00}; - - stat = GdipCreateBitmapFromScan0(2, 2, 8, PixelFormat32bppRGB, bits, &bitmap); - expect(Ok, stat); - - /* null parameters */ - stat = GdipBitmapGetPixel(NULL, 1, 1, &color); - expect(InvalidParameter, stat); - - stat = GdipBitmapGetPixel(bitmap, 1, 1, NULL); - expect(InvalidParameter, stat); - - stat = GdipBitmapSetPixel(NULL, 1, 1, 0); - expect(InvalidParameter, stat); - - /* out of bounds */ - stat = GdipBitmapGetPixel(bitmap, -1, 1, &color); - expect(InvalidParameter, stat); - - stat = GdipBitmapSetPixel(bitmap, -1, 1, 0); - expect(InvalidParameter, stat); - - stat = GdipBitmapGetPixel(bitmap, 1, -1, &color); - ok(stat == InvalidParameter || - broken(stat == Ok), /* Older gdiplus */ - "Expected InvalidParameter, got %.8x\n", stat); - - stat = GdipBitmapSetPixel(bitmap, 1, -1, 0); - ok(stat == InvalidParameter || - broken(stat == Ok), /* Older gdiplus */ - "Expected InvalidParameter, got %.8x\n", stat); - - stat = GdipBitmapGetPixel(bitmap, 2, 1, &color); - expect(InvalidParameter, stat); - - stat = GdipBitmapSetPixel(bitmap, 2, 1, 0); - expect(InvalidParameter, stat); - - stat = GdipBitmapGetPixel(bitmap, 1, 2, &color); - expect(InvalidParameter, stat); - - stat = GdipBitmapSetPixel(bitmap, 1, 2, 0); - expect(InvalidParameter, stat); - - /* valid use */ - stat = GdipBitmapGetPixel(bitmap, 1, 1, &color); - expect(Ok, stat); - expect(0xffffffff, color); - - stat = GdipBitmapGetPixel(bitmap, 0, 1, &color); - expect(Ok, stat); - expect(0xff0000ff, color); - - stat = GdipBitmapSetPixel(bitmap, 1, 1, 0xff676869); - expect(Ok, stat); - - stat = GdipBitmapSetPixel(bitmap, 0, 0, 0xff474849); - expect(Ok, stat); - - stat = GdipBitmapGetPixel(bitmap, 1, 1, &color); - expect(Ok, stat); - expect(0xff676869, color); - - stat = GdipBitmapGetPixel(bitmap, 0, 0, &color); - expect(Ok, stat); - expect(0xff474849, color); - - stat = GdipDisposeImage((GpImage*)bitmap); - expect(Ok, stat); -} - -static void check_halftone_palette(ColorPalette *palette) -{ - static const BYTE halftone_values[6]={0x00,0x33,0x66,0x99,0xcc,0xff}; - UINT i; - - for (i=0; iCount; i++) - { - ARGB expected=0xff000000; - if (i<8) - { - if (i&1) expected |= 0x800000; - if (i&2) expected |= 0x8000; - if (i&4) expected |= 0x80; - } - else if (i == 8) - { - expected = 0xffc0c0c0; - } - else if (i < 16) - { - if (i&1) expected |= 0xff0000; - if (i&2) expected |= 0xff00; - if (i&4) expected |= 0xff; - } - else if (i < 40) - { - expected = 0x00000000; - } - else - { - expected |= halftone_values[(i-40)%6]; - expected |= halftone_values[((i-40)/6)%6] << 8; - expected |= halftone_values[((i-40)/36)%6] << 16; - } - ok(expected == palette->Entries[i], "Expected %.8x, got %.8x, i=%u/%u\n", - expected, palette->Entries[i], i, palette->Count); - } -} - -static void test_palette(void) -{ - GpStatus stat; - GpBitmap *bitmap; - INT size; - BYTE buffer[1040]; - ColorPalette *palette=(ColorPalette*)buffer; - ARGB color=0; - - /* test initial palette from non-indexed bitmap */ - stat = GdipCreateBitmapFromScan0(2, 2, 8, PixelFormat32bppRGB, NULL, &bitmap); - expect(Ok, stat); - - stat = GdipGetImagePaletteSize((GpImage*)bitmap, &size); - expect(Ok, stat); - expect(sizeof(UINT)*2+sizeof(ARGB), size); - - stat = GdipGetImagePalette((GpImage*)bitmap, palette, size); - expect(Ok, stat); - expect(0, palette->Count); - - /* test setting palette on not-indexed bitmap */ - palette->Count = 3; - - stat = GdipSetImagePalette((GpImage*)bitmap, palette); - expect(Ok, stat); - - stat = GdipGetImagePaletteSize((GpImage*)bitmap, &size); - expect(Ok, stat); - expect(sizeof(UINT)*2+sizeof(ARGB)*3, size); - - stat = GdipGetImagePalette((GpImage*)bitmap, palette, size); - expect(Ok, stat); - expect(3, palette->Count); - - GdipDisposeImage((GpImage*)bitmap); - - /* test initial palette on 1-bit bitmap */ - stat = GdipCreateBitmapFromScan0(2, 2, 4, PixelFormat1bppIndexed, NULL, &bitmap); - expect(Ok, stat); - - stat = GdipGetImagePaletteSize((GpImage*)bitmap, &size); - expect(Ok, stat); - expect(sizeof(UINT)*2+sizeof(ARGB)*2, size); - - stat = GdipGetImagePalette((GpImage*)bitmap, palette, size); - expect(Ok, stat); - expect(PaletteFlagsGrayScale, palette->Flags); - expect(2, palette->Count); - - expect(0xff000000, palette->Entries[0]); - expect(0xffffffff, palette->Entries[1]); - - /* test getting/setting pixels */ - stat = GdipBitmapGetPixel(bitmap, 0, 0, &color); - expect(Ok, stat); - expect(0xff000000, color); - - stat = GdipBitmapSetPixel(bitmap, 0, 1, 0xffffffff); - todo_wine ok((stat == Ok) || - broken(stat == InvalidParameter) /* pre-win7 */, "stat=%.8x\n", stat); - - if (stat == Ok) - { - stat = GdipBitmapGetPixel(bitmap, 0, 1, &color); - expect(Ok, stat); - expect(0xffffffff, color); - } - - GdipDisposeImage((GpImage*)bitmap); - - /* test initial palette on 4-bit bitmap */ - stat = GdipCreateBitmapFromScan0(2, 2, 4, PixelFormat4bppIndexed, NULL, &bitmap); - expect(Ok, stat); - - stat = GdipGetImagePaletteSize((GpImage*)bitmap, &size); - expect(Ok, stat); - expect(sizeof(UINT)*2+sizeof(ARGB)*16, size); - - stat = GdipGetImagePalette((GpImage*)bitmap, palette, size); - expect(Ok, stat); - expect(0, palette->Flags); - expect(16, palette->Count); - - check_halftone_palette(palette); - - /* test getting/setting pixels */ - stat = GdipBitmapGetPixel(bitmap, 0, 0, &color); - expect(Ok, stat); - expect(0xff000000, color); - - stat = GdipBitmapSetPixel(bitmap, 0, 1, 0xffff00ff); - todo_wine ok((stat == Ok) || - broken(stat == InvalidParameter) /* pre-win7 */, "stat=%.8x\n", stat); - - if (stat == Ok) - { - stat = GdipBitmapGetPixel(bitmap, 0, 1, &color); - expect(Ok, stat); - expect(0xffff00ff, color); - } - - GdipDisposeImage((GpImage*)bitmap); - - /* test initial palette on 8-bit bitmap */ - stat = GdipCreateBitmapFromScan0(2, 2, 8, PixelFormat8bppIndexed, NULL, &bitmap); - expect(Ok, stat); - - stat = GdipGetImagePaletteSize((GpImage*)bitmap, &size); - expect(Ok, stat); - expect(sizeof(UINT)*2+sizeof(ARGB)*256, size); - - stat = GdipGetImagePalette((GpImage*)bitmap, palette, size); - expect(Ok, stat); - expect(PaletteFlagsHalftone, palette->Flags); - expect(256, palette->Count); - - check_halftone_palette(palette); - - /* test getting/setting pixels */ - stat = GdipBitmapGetPixel(bitmap, 0, 0, &color); - expect(Ok, stat); - expect(0xff000000, color); - - stat = GdipBitmapSetPixel(bitmap, 0, 1, 0xffcccccc); - todo_wine ok((stat == Ok) || - broken(stat == InvalidParameter) /* pre-win7 */, "stat=%.8x\n", stat); - - if (stat == Ok) - { - stat = GdipBitmapGetPixel(bitmap, 0, 1, &color); - expect(Ok, stat); - expect(0xffcccccc, color); - } - - /* test setting/getting a different palette */ - palette->Entries[1] = 0xffcccccc; - - stat = GdipSetImagePalette((GpImage*)bitmap, palette); - expect(Ok, stat); - - palette->Entries[1] = 0; - - stat = GdipGetImagePaletteSize((GpImage*)bitmap, &size); - expect(Ok, stat); - expect(sizeof(UINT)*2+sizeof(ARGB)*256, size); - - stat = GdipGetImagePalette((GpImage*)bitmap, palette, size); - expect(Ok, stat); - expect(PaletteFlagsHalftone, palette->Flags); - expect(256, palette->Count); - expect(0xffcccccc, palette->Entries[1]); - - /* test count < 256 */ - palette->Flags = 12345; - palette->Count = 3; - - stat = GdipSetImagePalette((GpImage*)bitmap, palette); - expect(Ok, stat); - - palette->Entries[1] = 0; - palette->Entries[3] = 0xdeadbeef; - - stat = GdipGetImagePaletteSize((GpImage*)bitmap, &size); - expect(Ok, stat); - expect(sizeof(UINT)*2+sizeof(ARGB)*3, size); - - stat = GdipGetImagePalette((GpImage*)bitmap, palette, size); - expect(Ok, stat); - expect(12345, palette->Flags); - expect(3, palette->Count); - expect(0xffcccccc, palette->Entries[1]); - expect(0xdeadbeef, palette->Entries[3]); - - /* test count > 256 */ - palette->Count = 257; - - stat = GdipSetImagePalette((GpImage*)bitmap, palette); - ok(stat == InvalidParameter || - broken(stat == Ok), /* Old gdiplus behavior */ - "Expected %.8x, got %.8x\n", InvalidParameter, stat); - - GdipDisposeImage((GpImage*)bitmap); -} - -static void test_colormatrix(void) -{ - GpStatus stat; - ColorMatrix colormatrix, graymatrix; - GpImageAttributes *imageattr; - const ColorMatrix identity = {{ - {1.0,0.0,0.0,0.0,0.0}, - {0.0,1.0,0.0,0.0,0.0}, - {0.0,0.0,1.0,0.0,0.0}, - {0.0,0.0,0.0,1.0,0.0}, - {0.0,0.0,0.0,0.0,1.0}}}; - const ColorMatrix double_red = {{ - {2.0,0.0,0.0,0.0,0.0}, - {0.0,1.0,0.0,0.0,0.0}, - {0.0,0.0,1.0,0.0,0.0}, - {0.0,0.0,0.0,1.0,0.0}, - {0.0,0.0,0.0,0.0,1.0}}}; - GpBitmap *bitmap1, *bitmap2; - GpGraphics *graphics; - ARGB color; - - colormatrix = identity; - graymatrix = identity; - - stat = GdipSetImageAttributesColorMatrix(NULL, ColorAdjustTypeDefault, - TRUE, &colormatrix, &graymatrix, ColorMatrixFlagsDefault); - expect(InvalidParameter, stat); - - stat = GdipCreateImageAttributes(&imageattr); - expect(Ok, stat); - - stat = GdipSetImageAttributesColorMatrix(imageattr, ColorAdjustTypeDefault, - TRUE, &colormatrix, NULL, ColorMatrixFlagsDefault); - expect(Ok, stat); - - stat = GdipSetImageAttributesColorMatrix(imageattr, ColorAdjustTypeDefault, - TRUE, NULL, NULL, ColorMatrixFlagsDefault); - expect(InvalidParameter, stat); - - stat = GdipSetImageAttributesColorMatrix(imageattr, ColorAdjustTypeDefault, - TRUE, &colormatrix, &graymatrix, ColorMatrixFlagsDefault); - expect(Ok, stat); - - stat = GdipSetImageAttributesColorMatrix(imageattr, ColorAdjustTypeDefault, - TRUE, &colormatrix, NULL, ColorMatrixFlagsSkipGrays); - expect(Ok, stat); - - stat = GdipSetImageAttributesColorMatrix(imageattr, ColorAdjustTypeDefault, - TRUE, &colormatrix, NULL, ColorMatrixFlagsAltGray); - expect(InvalidParameter, stat); - - stat = GdipSetImageAttributesColorMatrix(imageattr, ColorAdjustTypeDefault, - TRUE, &colormatrix, &graymatrix, ColorMatrixFlagsAltGray); - expect(Ok, stat); - - stat = GdipSetImageAttributesColorMatrix(imageattr, ColorAdjustTypeDefault, - TRUE, &colormatrix, &graymatrix, 3); - expect(InvalidParameter, stat); - - stat = GdipSetImageAttributesColorMatrix(imageattr, ColorAdjustTypeCount, - TRUE, &colormatrix, &graymatrix, ColorMatrixFlagsDefault); - expect(InvalidParameter, stat); - - stat = GdipSetImageAttributesColorMatrix(imageattr, ColorAdjustTypeAny, - TRUE, &colormatrix, &graymatrix, ColorMatrixFlagsDefault); - expect(InvalidParameter, stat); - - stat = GdipSetImageAttributesColorMatrix(imageattr, ColorAdjustTypeDefault, - FALSE, NULL, NULL, ColorMatrixFlagsDefault); - expect(Ok, stat); - - /* Drawing a bitmap transforms the colors */ - colormatrix = double_red; - stat = GdipSetImageAttributesColorMatrix(imageattr, ColorAdjustTypeDefault, - TRUE, &colormatrix, NULL, ColorMatrixFlagsDefault); - expect(Ok, stat); - - stat = GdipCreateBitmapFromScan0(1, 1, 0, PixelFormat32bppRGB, NULL, &bitmap1); - expect(Ok, stat); - - stat = GdipCreateBitmapFromScan0(1, 1, 0, PixelFormat32bppRGB, NULL, &bitmap2); - expect(Ok, stat); - - stat = GdipBitmapSetPixel(bitmap1, 0, 0, 0xff40ffff); - expect(Ok, stat); - - stat = GdipGetImageGraphicsContext((GpImage*)bitmap2, &graphics); - expect(Ok, stat); - - stat = GdipDrawImageRectRectI(graphics, (GpImage*)bitmap1, 0,0,1,1, 0,0,1,1, - UnitPixel, imageattr, NULL, NULL); - expect(Ok, stat); - - stat = GdipBitmapGetPixel(bitmap2, 0, 0, &color); - expect(Ok, stat); - todo_wine expect(0xff80ffff, color); - - GdipDeleteGraphics(graphics); - GdipDisposeImage((GpImage*)bitmap1); - GdipDisposeImage((GpImage*)bitmap2); - GdipDisposeImageAttributes(imageattr); -} - -static void test_gamma(void) -{ - GpStatus stat; - GpImageAttributes *imageattr; - GpBitmap *bitmap1, *bitmap2; - GpGraphics *graphics; - ARGB color; - - stat = GdipSetImageAttributesGamma(NULL, ColorAdjustTypeDefault, TRUE, 1.0); - expect(InvalidParameter, stat); - - stat = GdipCreateImageAttributes(&imageattr); - expect(Ok, stat); - - stat = GdipSetImageAttributesGamma(imageattr, ColorAdjustTypeDefault, TRUE, 1.0); - expect(Ok, stat); - - stat = GdipSetImageAttributesGamma(imageattr, ColorAdjustTypeAny, TRUE, 1.0); - expect(InvalidParameter, stat); - - stat = GdipSetImageAttributesGamma(imageattr, ColorAdjustTypeDefault, TRUE, -1.0); - expect(InvalidParameter, stat); - - stat = GdipSetImageAttributesGamma(imageattr, ColorAdjustTypeDefault, TRUE, 0.0); - expect(InvalidParameter, stat); - - stat = GdipSetImageAttributesGamma(imageattr, ColorAdjustTypeDefault, TRUE, 0.5); - expect(Ok, stat); - - stat = GdipSetImageAttributesGamma(imageattr, ColorAdjustTypeDefault, FALSE, 0.0); - expect(Ok, stat); - - /* Drawing a bitmap transforms the colors */ - stat = GdipSetImageAttributesGamma(imageattr, ColorAdjustTypeDefault, TRUE, 3.0); - expect(Ok, stat); - - stat = GdipCreateBitmapFromScan0(1, 1, 0, PixelFormat32bppRGB, NULL, &bitmap1); - expect(Ok, stat); - - stat = GdipCreateBitmapFromScan0(1, 1, 0, PixelFormat32bppRGB, NULL, &bitmap2); - expect(Ok, stat); - - stat = GdipBitmapSetPixel(bitmap1, 0, 0, 0xff80ffff); - expect(Ok, stat); - - stat = GdipGetImageGraphicsContext((GpImage*)bitmap2, &graphics); - expect(Ok, stat); - - stat = GdipDrawImageRectRectI(graphics, (GpImage*)bitmap1, 0,0,1,1, 0,0,1,1, - UnitPixel, imageattr, NULL, NULL); - expect(Ok, stat); - - stat = GdipBitmapGetPixel(bitmap2, 0, 0, &color); - expect(Ok, stat); - todo_wine ok(color_match(0xff20ffff, color, 1), "Expected ff20ffff, got %.8x\n", color); - - GdipDeleteGraphics(graphics); - GdipDisposeImage((GpImage*)bitmap1); - GdipDisposeImage((GpImage*)bitmap2); - GdipDisposeImageAttributes(imageattr); -} - -/* 1x1 pixel gif, 2 frames; first frame is white, second is black */ -static const unsigned char gifanimation[72] = { -0x47,0x49,0x46,0x38,0x39,0x61,0x01,0x00,0x01,0x00,0xa1,0x00,0x00,0x00,0x00,0x00, -0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0xf9,0x04,0x00,0x0a,0x00,0xff, -0x00,0x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x02,0x02,0x4c,0x01,0x00, -0x21,0xf9,0x04,0x01,0x0a,0x00,0x01,0x00,0x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01, -0x00,0x00,0x02,0x02,0x44,0x01,0x00,0x3b -}; - -static void test_multiframegif(void) -{ - LPSTREAM stream; - HGLOBAL hglob; - LPBYTE data; - HRESULT hres; - GpStatus stat; - GpBitmap *bmp; - ARGB color; - UINT count; - GUID dimension; - - /* Test frame functions with an animated GIF */ - hglob = GlobalAlloc (0, sizeof(gifanimation)); - data = GlobalLock (hglob); - memcpy(data, gifanimation, sizeof(gifanimation)); - GlobalUnlock(hglob); - - hres = CreateStreamOnHGlobal(hglob, TRUE, &stream); - ok(hres == S_OK, "Failed to create a stream\n"); - if(hres != S_OK) return; - - stat = GdipCreateBitmapFromStream(stream, &bmp); - ok(stat == Ok, "Failed to create a Bitmap\n"); - if(stat != Ok){ - IStream_Release(stream); - return; - } - - /* Bitmap starts at frame 0 */ - color = 0xdeadbeef; - stat = GdipBitmapGetPixel(bmp, 0, 0, &color); - expect(Ok, stat); - expect(0xffffffff, color); - - /* Check that we get correct metadata */ - stat = GdipImageGetFrameDimensionsCount((GpImage*)bmp,&count); - expect(Ok, stat); - expect(1, count); - - stat = GdipImageGetFrameDimensionsList((GpImage*)bmp, &dimension, 1); - expect(Ok, stat); - expect_guid(&FrameDimensionTime, &dimension, __LINE__, FALSE); - - count = 12345; - stat = GdipImageGetFrameCount((GpImage*)bmp, &dimension, &count); - expect(Ok, stat); - todo_wine expect(2, count); - - /* SelectActiveFrame overwrites our current data */ - stat = GdipImageSelectActiveFrame((GpImage*)bmp, &dimension, 1); - expect(Ok, stat); - - color = 0xdeadbeef; - GdipBitmapGetPixel(bmp, 0, 0, &color); - expect(Ok, stat); - todo_wine expect(0xff000000, color); - - stat = GdipImageSelectActiveFrame((GpImage*)bmp, &dimension, 0); - expect(Ok, stat); - - color = 0xdeadbeef; - GdipBitmapGetPixel(bmp, 0, 0, &color); - expect(Ok, stat); - expect(0xffffffff, color); - - /* Write over the image data */ - stat = GdipBitmapSetPixel(bmp, 0, 0, 0xff000000); - expect(Ok, stat); - - /* Switching to the same frame does not overwrite our changes */ - stat = GdipImageSelectActiveFrame((GpImage*)bmp, &dimension, 0); - expect(Ok, stat); - - stat = GdipBitmapGetPixel(bmp, 0, 0, &color); - expect(Ok, stat); - expect(0xff000000, color); - - /* But switching to another frame and back does */ - stat = GdipImageSelectActiveFrame((GpImage*)bmp, &dimension, 1); - expect(Ok, stat); - - stat = GdipImageSelectActiveFrame((GpImage*)bmp, &dimension, 0); - expect(Ok, stat); - - stat = GdipBitmapGetPixel(bmp, 0, 0, &color); - expect(Ok, stat); - todo_wine expect(0xffffffff, color); - - GdipDisposeImage((GpImage*)bmp); - IStream_Release(stream); - - /* Test with a non-animated gif */ - hglob = GlobalAlloc (0, sizeof(gifimage)); - data = GlobalLock (hglob); - memcpy(data, gifimage, sizeof(gifimage)); - GlobalUnlock(hglob); - - hres = CreateStreamOnHGlobal(hglob, TRUE, &stream); - ok(hres == S_OK, "Failed to create a stream\n"); - if(hres != S_OK) return; - - stat = GdipCreateBitmapFromStream(stream, &bmp); - ok(stat == Ok, "Failed to create a Bitmap\n"); - if(stat != Ok){ - IStream_Release(stream); - return; - } - - /* Check metadata */ - stat = GdipImageGetFrameDimensionsCount((GpImage*)bmp,&count); - expect(Ok, stat); - expect(1, count); - - stat = GdipImageGetFrameDimensionsList((GpImage*)bmp, &dimension, 1); - expect(Ok, stat); - expect_guid(&FrameDimensionTime, &dimension, __LINE__, FALSE); - - count = 12345; - stat = GdipImageGetFrameCount((GpImage*)bmp, &dimension, &count); - expect(Ok, stat); - expect(1, count); - - GdipDisposeImage((GpImage*)bmp); - IStream_Release(stream); -} - -static void test_rotateflip(void) -{ - GpImage *bitmap; - GpStatus stat; - BYTE bits[24]; - static const BYTE orig_bits[24] = { - 0,0,0xff, 0,0xff,0, 0xff,0,0, 23,23,23, - 0xff,0xff,0, 0xff,0,0xff, 0,0xff,0xff, 23,23,23}; - UINT width, height; - ARGB color; - - memcpy(bits, orig_bits, sizeof(bits)); - stat = GdipCreateBitmapFromScan0(3, 2, 12, PixelFormat24bppRGB, bits, (GpBitmap**)&bitmap); - expect(Ok, stat); - - stat = GdipImageRotateFlip(bitmap, Rotate90FlipNone); - expect(Ok, stat); - - stat = GdipGetImageWidth(bitmap, &width); - expect(Ok, stat); - stat = GdipGetImageHeight(bitmap, &height); - expect(Ok, stat); - expect(2, width); - expect(3, height); - - stat = GdipBitmapGetPixel((GpBitmap*)bitmap, 0, 0, &color); - expect(Ok, stat); - expect(0xff00ffff, color); - - stat = GdipBitmapGetPixel((GpBitmap*)bitmap, 1, 0, &color); - expect(Ok, stat); - expect(0xffff0000, color); - - stat = GdipBitmapGetPixel((GpBitmap*)bitmap, 0, 2, &color); - expect(Ok, stat); - expect(0xffffff00, color); - - stat = GdipBitmapGetPixel((GpBitmap*)bitmap, 1, 2, &color); - expect(Ok, stat); - expect(0xff0000ff, color); - - expect(0, bits[0]); - expect(0, bits[1]); - expect(0xff, bits[2]); - - GdipDisposeImage(bitmap); - - memcpy(bits, orig_bits, sizeof(bits)); - stat = GdipCreateBitmapFromScan0(3, 2, 12, PixelFormat24bppRGB, bits, (GpBitmap**)&bitmap); - expect(Ok, stat); - - stat = GdipImageRotateFlip(bitmap, RotateNoneFlipX); - expect(Ok, stat); - - stat = GdipGetImageWidth(bitmap, &width); - expect(Ok, stat); - stat = GdipGetImageHeight(bitmap, &height); - expect(Ok, stat); - expect(3, width); - expect(2, height); - - stat = GdipBitmapGetPixel((GpBitmap*)bitmap, 0, 0, &color); - expect(Ok, stat); - expect(0xff0000ff, color); - - stat = GdipBitmapGetPixel((GpBitmap*)bitmap, 2, 0, &color); - expect(Ok, stat); - expect(0xffff0000, color); - - stat = GdipBitmapGetPixel((GpBitmap*)bitmap, 0, 1, &color); - expect(Ok, stat); - expect(0xffffff00, color); - - stat = GdipBitmapGetPixel((GpBitmap*)bitmap, 2, 1, &color); - expect(Ok, stat); - expect(0xff00ffff, color); - - expect(0, bits[0]); - expect(0, bits[1]); - expect(0xff, bits[2]); - - GdipDisposeImage(bitmap); - - memcpy(bits, orig_bits, sizeof(bits)); - stat = GdipCreateBitmapFromScan0(3, 2, 12, PixelFormat24bppRGB, bits, (GpBitmap**)&bitmap); - expect(Ok, stat); - - stat = GdipImageRotateFlip(bitmap, RotateNoneFlipY); - expect(Ok, stat); - - stat = GdipGetImageWidth(bitmap, &width); - expect(Ok, stat); - stat = GdipGetImageHeight(bitmap, &height); - expect(Ok, stat); - expect(3, width); - expect(2, height); - - stat = GdipBitmapGetPixel((GpBitmap*)bitmap, 0, 0, &color); - expect(Ok, stat); - expect(0xff00ffff, color); - - stat = GdipBitmapGetPixel((GpBitmap*)bitmap, 2, 0, &color); - expect(Ok, stat); - expect(0xffffff00, color); - - stat = GdipBitmapGetPixel((GpBitmap*)bitmap, 0, 1, &color); - expect(Ok, stat); - expect(0xffff0000, color); - - stat = GdipBitmapGetPixel((GpBitmap*)bitmap, 2, 1, &color); - expect(Ok, stat); - expect(0xff0000ff, color); - - expect(0, bits[0]); - expect(0, bits[1]); - expect(0xff, bits[2]); - - GdipDisposeImage(bitmap); -} - -static void test_remaptable(void) -{ - GpStatus stat; - GpImageAttributes *imageattr; - GpBitmap *bitmap1, *bitmap2; - GpGraphics *graphics; - ARGB color; - ColorMap *map; - - map = GdipAlloc(sizeof(ColorMap)); - - map->oldColor.Argb = 0xff00ff00; - map->newColor.Argb = 0xffff00ff; - - stat = GdipSetImageAttributesRemapTable(NULL, ColorAdjustTypeDefault, TRUE, 1, map); - expect(InvalidParameter, stat); - - stat = GdipCreateImageAttributes(&imageattr); - expect(Ok, stat); - - stat = GdipSetImageAttributesRemapTable(imageattr, ColorAdjustTypeDefault, TRUE, 1, NULL); - expect(InvalidParameter, stat); - - stat = GdipSetImageAttributesRemapTable(imageattr, ColorAdjustTypeCount, TRUE, 1, map); - expect(InvalidParameter, stat); - - stat = GdipSetImageAttributesRemapTable(imageattr, ColorAdjustTypeAny, TRUE, 1, map); - expect(InvalidParameter, stat); - - stat = GdipSetImageAttributesRemapTable(imageattr, ColorAdjustTypeDefault, TRUE, 0, map); - expect(InvalidParameter, stat); - - stat = GdipSetImageAttributesRemapTable(imageattr, ColorAdjustTypeDefault, FALSE, 0, NULL); - expect(Ok, stat); - - stat = GdipSetImageAttributesRemapTable(imageattr, ColorAdjustTypeDefault, TRUE, 1, map); - expect(Ok, stat); - - stat = GdipCreateBitmapFromScan0(1, 1, 0, PixelFormat32bppRGB, NULL, &bitmap1); - expect(Ok, stat); - - stat = GdipCreateBitmapFromScan0(1, 1, 0, PixelFormat32bppRGB, NULL, &bitmap2); - expect(Ok, stat); - - stat = GdipBitmapSetPixel(bitmap1, 0, 0, 0xff00ff00); - expect(Ok, stat); - - stat = GdipGetImageGraphicsContext((GpImage*)bitmap2, &graphics); - expect(Ok, stat); - - stat = GdipDrawImageRectRectI(graphics, (GpImage*)bitmap1, 0,0,1,1, 0,0,1,1, - UnitPixel, imageattr, NULL, NULL); - expect(Ok, stat); - - stat = GdipBitmapGetPixel(bitmap2, 0, 0, &color); - expect(Ok, stat); - ok(color_match(0xffff00ff, color, 1), "Expected ffff00ff, got %.8x\n", color); - - GdipDeleteGraphics(graphics); - GdipDisposeImage((GpImage*)bitmap1); - GdipDisposeImage((GpImage*)bitmap2); - GdipDisposeImageAttributes(imageattr); - GdipFree(map); -} - -static void test_colorkey(void) -{ - GpStatus stat; - GpImageAttributes *imageattr; - GpBitmap *bitmap1, *bitmap2; - GpGraphics *graphics; - ARGB color; - - stat = GdipSetImageAttributesColorKeys(NULL, ColorAdjustTypeDefault, TRUE, 0xff405060, 0xff708090); - expect(InvalidParameter, stat); - - stat = GdipCreateImageAttributes(&imageattr); - expect(Ok, stat); - - stat = GdipSetImageAttributesColorKeys(imageattr, ColorAdjustTypeCount, TRUE, 0xff405060, 0xff708090); - expect(InvalidParameter, stat); - - stat = GdipSetImageAttributesColorKeys(imageattr, ColorAdjustTypeAny, TRUE, 0xff405060, 0xff708090); - expect(InvalidParameter, stat); - - stat = GdipSetImageAttributesColorKeys(imageattr, ColorAdjustTypeDefault, TRUE, 0xff405060, 0xff708090); - expect(Ok, stat); - - stat = GdipCreateBitmapFromScan0(2, 2, 0, PixelFormat32bppARGB, NULL, &bitmap1); - expect(Ok, stat); - - stat = GdipCreateBitmapFromScan0(2, 2, 0, PixelFormat32bppARGB, NULL, &bitmap2); - expect(Ok, stat); - - stat = GdipBitmapSetPixel(bitmap1, 0, 0, 0x20405060); - expect(Ok, stat); - - stat = GdipBitmapSetPixel(bitmap1, 0, 1, 0x40506070); - expect(Ok, stat); - - stat = GdipBitmapSetPixel(bitmap1, 1, 0, 0x60708090); - expect(Ok, stat); - - stat = GdipBitmapSetPixel(bitmap1, 1, 1, 0xffffffff); - expect(Ok, stat); - - stat = GdipGetImageGraphicsContext((GpImage*)bitmap2, &graphics); - expect(Ok, stat); - - stat = GdipDrawImageRectRectI(graphics, (GpImage*)bitmap1, 0,0,2,2, 0,0,2,2, - UnitPixel, imageattr, NULL, NULL); - expect(Ok, stat); - - stat = GdipBitmapGetPixel(bitmap2, 0, 0, &color); - expect(Ok, stat); - ok(color_match(0x00000000, color, 1), "Expected ffff00ff, got %.8x\n", color); - - stat = GdipBitmapGetPixel(bitmap2, 0, 1, &color); - expect(Ok, stat); - ok(color_match(0x00000000, color, 1), "Expected ffff00ff, got %.8x\n", color); - - stat = GdipBitmapGetPixel(bitmap2, 1, 0, &color); - expect(Ok, stat); - ok(color_match(0x00000000, color, 1), "Expected ffff00ff, got %.8x\n", color); - - stat = GdipBitmapGetPixel(bitmap2, 1, 1, &color); - expect(Ok, stat); - ok(color_match(0xffffffff, color, 1), "Expected ffff00ff, got %.8x\n", color); - - GdipDeleteGraphics(graphics); - GdipDisposeImage((GpImage*)bitmap1); - GdipDisposeImage((GpImage*)bitmap2); - GdipDisposeImageAttributes(imageattr); -} - -START_TEST(image) -{ - struct GdiplusStartupInput gdiplusStartupInput; - ULONG_PTR gdiplusToken; - - gdiplusStartupInput.GdiplusVersion = 1; - gdiplusStartupInput.DebugEventCallback = NULL; - gdiplusStartupInput.SuppressBackgroundThread = 0; - gdiplusStartupInput.SuppressExternalCodecs = 0; - - GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); - - test_Scan0(); - test_FromGdiDib(); - test_GetImageDimension(); - test_GdipImageGetFrameDimensionsCount(); - test_LoadingImages(); - test_SavingImages(); - test_encoders(); - test_LockBits(); - test_GdipCreateBitmapFromHBITMAP(); - test_GdipGetImageFlags(); - test_GdipCloneImage(); - test_testcontrol(); - test_fromhicon(); - test_getrawformat(); - test_loadwmf(); - test_createfromwmf(); - test_resolution(); - test_createhbitmap(); - test_getthumbnail(); - test_getsetpixel(); - test_palette(); - test_colormatrix(); - test_gamma(); - test_multiframegif(); - test_rotateflip(); - test_remaptable(); - test_colorkey(); - - GdiplusShutdown(gdiplusToken); -} diff --git a/rostests/winetests/gdiplus/matrix.c b/rostests/winetests/gdiplus/matrix.c deleted file mode 100644 index 16ce85a6bec..00000000000 --- a/rostests/winetests/gdiplus/matrix.c +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Unit test suite for matrices - * - * Copyright (C) 2007 Google (Evan Stade) - * - * 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 "windows.h" -#include -#include "gdiplus.h" -#include "wine/test.h" - -#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) - -static void test_constructor_destructor(void) -{ - GpStatus status; - GpMatrix *matrix = NULL; - - status = GdipCreateMatrix2(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, &matrix); - expect(Ok, status); - ok(matrix != NULL, "Expected matrix to be initialized\n"); - - status = GdipDeleteMatrix(NULL); - expect(InvalidParameter, status); - - status = GdipDeleteMatrix(matrix); - expect(Ok, status); -} - -typedef struct{ - REAL X; - REAL Y; -} real_point; - -static real_point transform_points[] = { - {1000.00, 2600.00}, /*0*/ - {855.00, 2390.00}, /*1*/ - {700.00, 2200.00}, /*2*/ - {565.00, 1970.00}, /*3*/ - {400.00, 1800.00}, /*4*/ - {275.00, 1550.00}, /*5*/ - {100.00, 1400.00}, /*6*/ - {-15.00, 1130.00}, /*7*/ - {-200.00, 1000.00}, /*8*/ - {-305.00, 710.00} /*9*/ - }; - -static void test_transform(void) -{ - GpStatus status; - GpMatrix *matrix = NULL; - GpPointF pts[10]; - INT i; - BOOL match; - - for(i = 0; i < 10; i ++){ - pts[i].X = i * 5.0 * (REAL)(i % 2); - pts[i].Y = 50.0 - i * 5.0; - } - - GdipCreateMatrix2(1.0, -2.0, 30.0, 40.0, -500.0, 600.0, &matrix); - - status = GdipTransformMatrixPoints(matrix, pts, 10); - expect(Ok, status); - - for(i = 0; i < 10; i ++){ - match = fabs(transform_points[i].X - pts[i].X) < 2.0 - && fabs(transform_points[i].Y - pts[i].Y) < 2.0; - - ok(match, "Expected #%d to be (%.2f, %.2f) but got (%.2f, %.2f)\n", i, - transform_points[i].X, transform_points[i].Y, pts[i].X, pts[i].Y); - } - - GdipDeleteMatrix(matrix); -} - -static void test_isinvertible(void) -{ - GpStatus status; - GpMatrix *matrix = NULL; - BOOL result; - - /* NULL arguments */ - status = GdipIsMatrixInvertible(NULL, &result); - expect(InvalidParameter, status); - status = GdipIsMatrixInvertible((GpMatrix*)0xdeadbeef, NULL); - expect(InvalidParameter, status); - status = GdipIsMatrixInvertible(NULL, NULL); - expect(InvalidParameter, status); - - /* invertible */ - GdipCreateMatrix2(1.0, 1.2, 2.3, -1.0, 2.0, 3.0, &matrix); - status = GdipIsMatrixInvertible(matrix, &result); - expect(Ok, status); - expect(TRUE, result); - GdipDeleteMatrix(matrix); - - /* noninvertible */ - GdipCreateMatrix2(2.0, -1.0, 6.0, -3.0, 2.2, 3.0, &matrix); - status = GdipIsMatrixInvertible(matrix, &result); - expect(Ok, status); - expect(FALSE, result); - GdipDeleteMatrix(matrix); -} - -static void test_invert(void) -{ - GpStatus status; - GpMatrix *matrix = NULL; - GpMatrix *inverted = NULL; - BOOL equal = FALSE; - - /* NULL */ - status = GdipInvertMatrix(NULL); - expect(InvalidParameter, status); - - /* noninvertible */ - GdipCreateMatrix2(2.0, -1.0, 6.0, -3.0, 2.2, 3.0, &matrix); - status = GdipInvertMatrix(matrix); - expect(InvalidParameter, status); - GdipDeleteMatrix(matrix); - - /* invertible */ - GdipCreateMatrix2(3.0, -2.0, 5.0, 2.0, 6.0, 3.0, &matrix); - status = GdipInvertMatrix(matrix); - expect(Ok, status); - GdipCreateMatrix2(2.0/16.0, 2.0/16.0, -5.0/16.0, 3.0/16.0, 3.0/16.0, -21.0/16.0, &inverted); - GdipIsMatrixEqual(matrix, inverted, &equal); - expect(TRUE, equal); - - GdipDeleteMatrix(inverted); - GdipDeleteMatrix(matrix); -} - -static void test_shear(void) -{ - GpStatus status; - GpMatrix *matrix = NULL; - GpMatrix *sheared = NULL; - BOOL equal; - - /* NULL */ - status = GdipShearMatrix(NULL, 0.0, 0.0, MatrixOrderPrepend); - expect(InvalidParameter, status); - - /* X only shearing, MatrixOrderPrepend */ - GdipCreateMatrix2(1.0, 2.0, 4.0, -1.0, 6.0, 3.0, &matrix); - status = GdipShearMatrix(matrix, 1.5, 0.0, MatrixOrderPrepend); - expect(Ok, status); - GdipCreateMatrix2(1.0, 2.0, 5.5, 2.0, 6.0, 3.0, &sheared); - GdipIsMatrixEqual(matrix, sheared, &equal); - expect(TRUE, equal); - GdipDeleteMatrix(sheared); - GdipDeleteMatrix(matrix); - - /* X only shearing, MatrixOrderAppend */ - GdipCreateMatrix2(1.0, 2.0, 4.0, -1.0, 6.0, 3.0, &matrix); - status = GdipShearMatrix(matrix, 1.5, 0.0, MatrixOrderAppend); - expect(Ok, status); - GdipCreateMatrix2(4.0, 2.0, 2.5, -1.0, 10.5, 3.0, &sheared); - GdipIsMatrixEqual(matrix, sheared, &equal); - expect(TRUE, equal); - GdipDeleteMatrix(sheared); - GdipDeleteMatrix(matrix); - - /* Y only shearing, MatrixOrderPrepend */ - GdipCreateMatrix2(1.0, 2.0, 4.0, -1.0, 6.0, 3.0, &matrix); - status = GdipShearMatrix(matrix, 0.0, 1.5, MatrixOrderPrepend); - expect(Ok, status); - GdipCreateMatrix2(7.0, 0.5, 4.0, -1.0, 6.0, 3.0, &sheared); - GdipIsMatrixEqual(matrix, sheared, &equal); - expect(TRUE, equal); - GdipDeleteMatrix(sheared); - GdipDeleteMatrix(matrix); - - /* Y only shearing, MatrixOrderAppend */ - GdipCreateMatrix2(1.0, 2.0, 4.0, -1.0, 6.0, 3.0, &matrix); - status = GdipShearMatrix(matrix, 0.0, 1.5, MatrixOrderAppend); - expect(Ok, status); - GdipCreateMatrix2(1.0, 3.5, 4.0, 5.0, 6.0, 12.0, &sheared); - GdipIsMatrixEqual(matrix, sheared, &equal); - expect(TRUE, equal); - GdipDeleteMatrix(sheared); - GdipDeleteMatrix(matrix); - - /* X,Y shearing, MatrixOrderPrepend */ - GdipCreateMatrix2(1.0, 2.0, 4.0, -1.0, 6.0, 3.0, &matrix); - status = GdipShearMatrix(matrix, 4.0, 1.5, MatrixOrderPrepend); - expect(Ok, status); - GdipCreateMatrix2(7.0, 0.5, 8.0, 7.0, 6.0, 3.0, &sheared); - GdipIsMatrixEqual(matrix, sheared, &equal); - expect(TRUE, equal); - GdipDeleteMatrix(sheared); - GdipDeleteMatrix(matrix); - - /* X,Y shearing, MatrixOrderAppend */ - GdipCreateMatrix2(1.0, 2.0, 4.0, -1.0, 6.0, 3.0, &matrix); - status = GdipShearMatrix(matrix, 4.0, 1.5, MatrixOrderAppend); - expect(Ok, status); - GdipCreateMatrix2(9.0, 3.5, 0.0, 5.0, 18.0, 12.0, &sheared); - GdipIsMatrixEqual(matrix, sheared, &equal); - expect(TRUE, equal); - GdipDeleteMatrix(sheared); - GdipDeleteMatrix(matrix); -} - -START_TEST(matrix) -{ - struct GdiplusStartupInput gdiplusStartupInput; - ULONG_PTR gdiplusToken; - - gdiplusStartupInput.GdiplusVersion = 1; - gdiplusStartupInput.DebugEventCallback = NULL; - gdiplusStartupInput.SuppressBackgroundThread = 0; - gdiplusStartupInput.SuppressExternalCodecs = 0; - - GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); - - test_constructor_destructor(); - test_transform(); - test_isinvertible(); - test_invert(); - test_shear(); - - GdiplusShutdown(gdiplusToken); -} diff --git a/rostests/winetests/gdiplus/pathiterator.c b/rostests/winetests/gdiplus/pathiterator.c deleted file mode 100644 index 3e1c287f326..00000000000 --- a/rostests/winetests/gdiplus/pathiterator.c +++ /dev/null @@ -1,580 +0,0 @@ -/* - * Unit test suite for pathiterator - * - * Copyright (C) 2008 Nikolay Sivov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "windows.h" -#include "gdiplus.h" -#include "wine/test.h" - -#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) - -static void test_constructor_destructor(void) -{ - GpPath *path; - GpPathIterator *iter; - GpStatus stat; - - GdipCreatePath(FillModeAlternate, &path); - GdipAddPathRectangle(path, 5.0, 5.0, 100.0, 50.0); - - /* NULL args */ - stat = GdipCreatePathIter(NULL, NULL); - expect(InvalidParameter, stat); - iter = NULL; - stat = GdipCreatePathIter(&iter, NULL); - expect(Ok, stat); - ok(iter != NULL, "Expected iterator to be created\n"); - GdipDeletePathIter(iter); - stat = GdipCreatePathIter(NULL, path); - expect(InvalidParameter, stat); - stat = GdipDeletePathIter(NULL); - expect(InvalidParameter, stat); - - /* valid args */ - stat = GdipCreatePathIter(&iter, path); - expect(Ok, stat); - - GdipDeletePathIter(iter); - GdipDeletePath(path); -} - -static void test_hascurve(void) -{ - GpPath *path; - GpPathIterator *iter; - GpStatus stat; - BOOL hasCurve; - - GdipCreatePath(FillModeAlternate, &path); - GdipAddPathRectangle(path, 5.0, 5.0, 100.0, 50.0); - - stat = GdipCreatePathIter(&iter, path); - expect(Ok, stat); - - /* NULL args - BOOL out argument is local in wrapper class method, - so it always has not-NULL address */ - stat = GdipPathIterHasCurve(NULL, &hasCurve); - expect(InvalidParameter, stat); - - /* valid args */ - stat = GdipPathIterHasCurve(iter, &hasCurve); - expect(Ok, stat); - expect(FALSE, hasCurve); - - GdipDeletePathIter(iter); - - GdipAddPathEllipse(path, 0.0, 0.0, 35.0, 70.0); - - stat = GdipCreatePathIter(&iter, path); - expect(Ok, stat); - - stat = GdipPathIterHasCurve(iter, &hasCurve); - expect(Ok, stat); - expect(TRUE, hasCurve); - - GdipDeletePathIter(iter); - GdipDeletePath(path); -} - -static void test_nextmarker(void) -{ - GpPath *path; - GpPathIterator *iter; - GpStatus stat; - INT start, end; - INT result; - - /* NULL args - BOOL out argument is local in wrapper class method, - so it always has not-NULL address */ - stat = GdipPathIterNextMarker(NULL, &result, NULL, NULL); - expect(InvalidParameter, stat); - stat = GdipPathIterNextMarker(NULL, &result, &start, NULL); - expect(InvalidParameter, stat); - stat = GdipPathIterNextMarker(NULL, &result, NULL, &end); - expect(InvalidParameter, stat); - - GdipCreatePath(FillModeAlternate, &path); - GdipAddPathRectangle(path, 5.0, 5.0, 100.0, 50.0); - - /* no markers */ - GdipCreatePathIter(&iter, path); - start = end = result = (INT)0xdeadbeef; - stat = GdipPathIterNextMarker(iter, &result, &start, &end); - expect(Ok, stat); - expect(0, start); - expect(3, end); - expect(4, result); - start = end = result = (INT)0xdeadbeef; - stat = GdipPathIterNextMarker(iter, &result, &start, &end); - /* start/end remain unchanged */ - expect((INT)0xdeadbeef, start); - expect((INT)0xdeadbeef, end); - expect(0, result); - GdipDeletePathIter(iter); - - /* one marker */ - GdipSetPathMarker(path); - GdipCreatePathIter(&iter, path); - start = end = result = (INT)0xdeadbeef; - stat = GdipPathIterNextMarker(iter, &result, &start, &end); - expect(Ok, stat); - expect(0, start); - expect(3, end); - expect(4, result); - start = end = result = (INT)0xdeadbeef; - stat = GdipPathIterNextMarker(iter, &result, &start, &end); - expect(Ok, stat); - expect((INT)0xdeadbeef, start); - expect((INT)0xdeadbeef, end); - expect(0, result); - GdipDeletePathIter(iter); - - /* two markers */ - GdipAddPathLine(path, 0.0, 0.0, 10.0, 30.0); - GdipSetPathMarker(path); - GdipCreatePathIter(&iter, path); - start = end = result = (INT)0xdeadbeef; - stat = GdipPathIterNextMarker(iter, &result, &start, &end); - expect(Ok, stat); - expect(0, start); - expect(3, end); - expect(4, result); - start = end = result = (INT)0xdeadbeef; - stat = GdipPathIterNextMarker(iter, &result, &start, &end); - expect(Ok, stat); - expect(4, start); - expect(5, end); - expect(2, result); - start = end = result = (INT)0xdeadbeef; - stat = GdipPathIterNextMarker(iter, &result, &start, &end); - expect(Ok, stat); - expect((INT)0xdeadbeef, start); - expect((INT)0xdeadbeef, end); - expect(0, result); - GdipDeletePathIter(iter); - - GdipDeletePath(path); -} - -static void test_nextmarkerpath(void) -{ - GpPath *path, *retpath; - GpPathIterator *iter; - GpStatus stat; - INT result, count; - - GdipCreatePath(FillModeAlternate, &path); - - /* NULL */ - stat = GdipPathIterNextMarkerPath(NULL, NULL, NULL); - expect(InvalidParameter, stat); - stat = GdipPathIterNextMarkerPath(NULL, &result, NULL); - expect(InvalidParameter, stat); - stat = GdipPathIterNextMarkerPath(NULL, &result, path); - expect(InvalidParameter, stat); - - GdipAddPathRectangle(path, 5.0, 5.0, 100.0, 50.0); - - /* no markers */ - GdipCreatePath(FillModeAlternate, &retpath); - GdipCreatePathIter(&iter, path); - result = -1; - stat = GdipPathIterNextMarkerPath(iter, &result, retpath); - expect(Ok, stat); - expect(4, result); - count = -1; - GdipGetPointCount(retpath, &count); - expect(4, count); - result = -1; - stat = GdipPathIterNextMarkerPath(iter, &result, retpath); - expect(Ok, stat); - expect(0, result); - count = -1; - GdipGetPointCount(retpath, &count); - expect(4, count); - GdipDeletePathIter(iter); - GdipDeletePath(retpath); - - /* one marker */ - GdipSetPathMarker(path); - GdipCreatePath(FillModeAlternate, &retpath); - GdipCreatePathIter(&iter, path); - result = -1; - stat = GdipPathIterNextMarkerPath(iter, &result, retpath); - expect(Ok, stat); - expect(4, result); - count = -1; - GdipGetPointCount(retpath, &count); - expect(4, count); - result = -1; - stat = GdipPathIterNextMarkerPath(iter, &result, retpath); - expect(Ok, stat); - expect(0, result); - count = -1; - GdipGetPointCount(retpath, &count); - expect(4, count); - GdipDeletePathIter(iter); - GdipDeletePath(retpath); - - /* two markers */ - GdipAddPathLine(path, 0.0, 0.0, 10.0, 30.0); - GdipSetPathMarker(path); - GdipCreatePath(FillModeAlternate, &retpath); - GdipCreatePathIter(&iter, path); - result = -1; - stat = GdipPathIterNextMarkerPath(iter, &result, retpath); - expect(Ok, stat); - expect(4, result); - result = -1; - stat = GdipPathIterNextMarkerPath(iter, &result, retpath); - expect(Ok, stat); - expect(2, result); - result = -1; - stat = GdipPathIterNextMarkerPath(iter, &result, retpath); - expect(Ok, stat); - expect(0, result); - GdipDeletePathIter(iter); - GdipDeletePath(retpath); - - GdipDeletePath(path); -} - -static void test_getsubpathcount(void) -{ - GpPath *path; - GpPathIterator *iter; - GpStatus stat; - INT count; - - /* NULL args */ - stat = GdipPathIterGetSubpathCount(NULL, NULL); - expect(InvalidParameter, stat); - stat = GdipPathIterGetSubpathCount(NULL, &count); - expect(InvalidParameter, stat); - - GdipCreatePath(FillModeAlternate, &path); - - /* empty path */ - GdipCreatePathIter(&iter, path); - stat = GdipPathIterGetSubpathCount(iter, &count); - expect(Ok, stat); - expect(0, count); - GdipDeletePathIter(iter); - - GdipAddPathLine(path, 5.0, 5.0, 100.0, 50.0); - - /* open figure */ - GdipCreatePathIter(&iter, path); - stat = GdipPathIterGetSubpathCount(iter, &count); - expect(Ok, stat); - expect(1, count); - GdipDeletePathIter(iter); - - /* manually start new figure */ - GdipStartPathFigure(path); - GdipAddPathLine(path, 50.0, 50.0, 110.0, 40.0); - GdipCreatePathIter(&iter, path); - stat = GdipPathIterGetSubpathCount(iter, &count); - expect(Ok, stat); - expect(2, count); - GdipDeletePathIter(iter); - - GdipDeletePath(path); -} - -static void test_isvalid(void) -{ - GpPath *path; - GpPathIterator *iter; - GpStatus stat; - BOOL isvalid; - INT start, end, result; - - GdipCreatePath(FillModeAlternate, &path); - - /* NULL args */ - GdipCreatePathIter(&iter, path); - stat = GdipPathIterIsValid(NULL, NULL); - expect(InvalidParameter, stat); - stat = GdipPathIterIsValid(iter, NULL); - expect(InvalidParameter, stat); - stat = GdipPathIterIsValid(NULL, &isvalid); - expect(InvalidParameter, stat); - GdipDeletePathIter(iter); - - /* on empty path */ - GdipCreatePathIter(&iter, path); - isvalid = FALSE; - stat = GdipPathIterIsValid(iter, &isvalid); - expect(Ok, stat); - expect(TRUE, isvalid); - GdipDeletePathIter(iter); - - /* no markers */ - GdipAddPathLine(path, 50.0, 50.0, 110.0, 40.0); - GdipCreatePathIter(&iter, path); - GdipPathIterNextMarker(iter, &result, &start, &end); - isvalid = FALSE; - stat = GdipPathIterIsValid(iter, &isvalid); - expect(Ok, stat); - expect(TRUE, isvalid); - GdipDeletePathIter(iter); - - GdipDeletePath(path); -} - -static void test_nextsubpathpath(void) -{ - GpPath *path, *retpath; - GpPathIterator *iter; - GpStatus stat; - BOOL closed; - INT count, result; - - GdipCreatePath(FillModeAlternate, &path); - - /* NULL args */ - GdipCreatePath(FillModeAlternate, &retpath); - GdipCreatePathIter(&iter, path); - stat = GdipPathIterNextSubpathPath(NULL, NULL, NULL, NULL); - expect(InvalidParameter, stat); - stat = GdipPathIterNextSubpathPath(iter, NULL, NULL, NULL); - expect(InvalidParameter, stat); - stat = GdipPathIterNextSubpathPath(NULL, &result, NULL, NULL); - expect(InvalidParameter, stat); - stat = GdipPathIterNextSubpathPath(iter, &result, NULL, &closed); - expect(Ok, stat); - stat = GdipPathIterNextSubpathPath(iter, NULL, NULL, &closed); - expect(InvalidParameter, stat); - stat = GdipPathIterNextSubpathPath(iter, NULL, retpath, NULL); - expect(InvalidParameter, stat); - stat = GdipPathIterNextSubpathPath(iter, &result, retpath, NULL); - expect(InvalidParameter, stat); - GdipDeletePathIter(iter); - GdipDeletePath(retpath); - - /* empty path */ - GdipCreatePath(FillModeAlternate, &retpath); - GdipCreatePathIter(&iter, path); - result = -2; - closed = TRUE; - stat = GdipPathIterNextSubpathPath(iter, &result, retpath, &closed); - expect(Ok, stat); - expect(0, result); - expect(TRUE, closed); - count = -1; - GdipGetPointCount(retpath, &count); - expect(0, count); - GdipDeletePathIter(iter); - GdipDeletePath(retpath); - - /* open figure */ - GdipAddPathLine(path, 5.0, 5.0, 100.0, 50.0); - - GdipCreatePath(FillModeAlternate, &retpath); - GdipCreatePathIter(&iter, path); - result = -2; - closed = TRUE; - stat = GdipPathIterNextSubpathPath(iter, &result, retpath, &closed); - expect(Ok, stat); - expect(2, result); - expect(FALSE, closed); - count = -1; - GdipGetPointCount(retpath, &count); - expect(2, count); - /* subsequent call */ - result = -2; - closed = TRUE; - stat = GdipPathIterNextSubpathPath(iter, &result, retpath, &closed); - expect(Ok, stat); - expect(0, result); - expect(TRUE, closed); - count = -1; - GdipGetPointCount(retpath, &count); - expect(2, count); - GdipDeletePathIter(iter); - - /* closed figure, check does it extend retpath or reset it */ - GdipAddPathLine(retpath, 50.0, 55.0, 200.0, 150.0); - - GdipClosePathFigure(path); - GdipAddPathLine(path, 50.0, 55.0, 200.0, 150.0); - GdipClosePathFigure(path); - - GdipCreatePathIter(&iter, path); - result = -2; - closed = FALSE; - stat = GdipPathIterNextSubpathPath(iter, &result, retpath, &closed); - expect(Ok, stat); - expect(2, result); - expect(TRUE, closed); - count = -1; - GdipGetPointCount(retpath, &count); - expect(2, count); - /* subsequent call */ - result = -2; - closed = FALSE; - stat = GdipPathIterNextSubpathPath(iter, &result, retpath, &closed); - expect(Ok, stat); - expect(2, result); - expect(TRUE, closed); - count = -1; - GdipGetPointCount(retpath, &count); - expect(2, count); - result = -2; - closed = FALSE; - stat = GdipPathIterNextSubpathPath(iter, &result, retpath, &closed); - expect(Ok, stat); - expect(0, result); - expect(TRUE, closed); - count = -1; - GdipGetPointCount(retpath, &count); - expect(2, count); - GdipDeletePathIter(iter); - - GdipDeletePath(retpath); - GdipDeletePath(path); -} - -static void test_nextsubpath(void) -{ - GpPath *path; - GpPathIterator *iter; - GpStatus stat; - INT start, end, result; - BOOL closed; - - /* empty path */ - GdipCreatePath(FillModeAlternate, &path); - GdipCreatePathIter(&iter, path); - - result = -2; - closed = TRUE; - stat = GdipPathIterNextSubpath(iter, &result, &start, &end, &closed); - expect(Ok, stat); - expect(0, result); - expect(TRUE, closed); - - GdipDeletePathIter(iter); - GdipDeletePath(path); -} - -static void test_nextpathtype(void) -{ - GpPath *path; - GpPathIterator *iter; - GpStatus stat; - INT start, end, result; - BYTE type; - - GdipCreatePath(FillModeAlternate, &path); - GdipCreatePathIter(&iter, path); - - /* NULL arguments */ - stat = GdipPathIterNextPathType(NULL, NULL, NULL, NULL, NULL); - expect(InvalidParameter, stat); - stat = GdipPathIterNextPathType(iter, NULL, NULL, NULL, NULL); - expect(InvalidParameter, stat); - stat = GdipPathIterNextPathType(iter, &result, NULL, NULL, NULL); - expect(InvalidParameter, stat); - stat = GdipPathIterNextPathType(iter, NULL, &type, NULL, NULL); - expect(InvalidParameter, stat); - stat = GdipPathIterNextPathType(iter, NULL, NULL, &start, &end); - expect(InvalidParameter, stat); - stat = GdipPathIterNextPathType(iter, NULL, &type, &start, &end); - expect(InvalidParameter, stat); - stat = GdipPathIterNextPathType(iter, &result, &type, NULL, NULL); - expect(InvalidParameter, stat); - - /* empty path */ - start = end = result = (INT)0xdeadbeef; - stat = GdipPathIterNextPathType(iter, &result, &type, &start, &end); - todo_wine expect(Ok, stat); - expect((INT)0xdeadbeef, start); - expect((INT)0xdeadbeef, end); - todo_wine expect(0, result); - GdipDeletePathIter(iter); - - /* single figure */ - GdipAddPathLine(path, 0.0, 0.0, 10.0, 30.0); - GdipCreatePathIter(&iter, path); - start = end = result = (INT)0xdeadbeef; - type = 255; /* out of range */ - stat = GdipPathIterNextPathType(iter, &result, &type, &start, &end); - todo_wine expect(Ok, stat); - expect((INT)0xdeadbeef, start); - expect((INT)0xdeadbeef, end); - expect(255, type); - todo_wine expect(0, result); - GdipDeletePathIter(iter); - - GdipAddPathEllipse(path, 0.0, 0.0, 35.0, 70.0); - GdipCreatePathIter(&iter, path); - start = end = result = (INT)0xdeadbeef; - type = 255; /* out of range */ - stat = GdipPathIterNextPathType(iter, &result, &type, &start, &end); - todo_wine expect(Ok, stat); - expect((INT)0xdeadbeef, start); - expect((INT)0xdeadbeef, end); - expect(255, type); - todo_wine expect(0, result); - GdipDeletePathIter(iter); - - /* closed */ - GdipClosePathFigure(path); - GdipCreatePathIter(&iter, path); - start = end = result = (INT)0xdeadbeef; - type = 255; /* out of range */ - stat = GdipPathIterNextPathType(iter, &result, &type, &start, &end); - todo_wine expect(Ok, stat); - expect((INT)0xdeadbeef, start); - expect((INT)0xdeadbeef, end); - expect(255, type); - todo_wine expect(0, result); - GdipDeletePathIter(iter); - - GdipDeletePath(path); -} - -START_TEST(pathiterator) -{ - struct GdiplusStartupInput gdiplusStartupInput; - ULONG_PTR gdiplusToken; - - gdiplusStartupInput.GdiplusVersion = 1; - gdiplusStartupInput.DebugEventCallback = NULL; - gdiplusStartupInput.SuppressBackgroundThread = 0; - gdiplusStartupInput.SuppressExternalCodecs = 0; - - GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); - - test_constructor_destructor(); - test_hascurve(); - test_nextmarker(); - test_nextmarkerpath(); - test_getsubpathcount(); - test_isvalid(); - test_nextsubpathpath(); - test_nextsubpath(); - test_nextpathtype(); - - GdiplusShutdown(gdiplusToken); -} diff --git a/rostests/winetests/gdiplus/pen.c b/rostests/winetests/gdiplus/pen.c deleted file mode 100644 index b742118be37..00000000000 --- a/rostests/winetests/gdiplus/pen.c +++ /dev/null @@ -1,392 +0,0 @@ -/* - * Unit test suite for pens (and init) - * - * Copyright (C) 2007 Google (Evan Stade) - * - * 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 "windows.h" -#include "gdiplus.h" -#include "wine/test.h" - -#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) -#define expectf(expected, got) ok(fabs(got - expected) < 0.1, "Expected %.2f, got %.2f\n", expected, got) - -static void test_startup(void) -{ - GpPen *pen = NULL; - Status status; - struct GdiplusStartupInput gdiplusStartupInput; - ULONG_PTR gdiplusToken; - int gpversion; - - gdiplusStartupInput.DebugEventCallback = NULL; - gdiplusStartupInput.SuppressBackgroundThread = 0; - gdiplusStartupInput.SuppressExternalCodecs = 0; - - for (gpversion=1; gpversion<256; gpversion++) - { - gdiplusStartupInput.GdiplusVersion = gpversion; - status = GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); - ok(status == Ok || status == UnsupportedGdiplusVersion, - "GdiplusStartup returned %x\n", status); - GdiplusShutdown(gdiplusToken); - if (status != Ok) - { - gpversion--; - break; - } - } - - ok(gpversion > 0 && gpversion <= 2, "unexpected gdiplus version %i\n", gpversion); - trace("gdiplus version is %i\n", gpversion); - - status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen); - - todo_wine - expect(GdiplusNotInitialized, status); - - GdipDeletePen(pen); -} - -static void test_constructor_destructor(void) -{ - GpStatus status; - GpPen *pen = NULL; - - status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, NULL); - expect(InvalidParameter, status); - ok(pen == NULL, "Expected pen to be NULL\n"); - - status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen); - expect(Ok, status); - ok(pen != NULL, "Expected pen to be initialized\n"); - - status = GdipDeletePen(NULL); - expect(InvalidParameter, status); - - status = GdipDeletePen(pen); - expect(Ok, status); -} - -static void test_constructor_destructor2(void) -{ - GpStatus status; - GpPen *pen = NULL; - GpBrush *brush = NULL; - GpPointF points[2]; - - status = GdipCreatePen2(NULL, 10.0f, UnitPixel, &pen); - expect(InvalidParameter, status); - ok(pen == NULL, "Expected pen to be NULL\n"); - - points[0].X = 7.0; - points[0].Y = 11.0; - points[1].X = 13.0; - points[1].Y = 17.0; - - status = GdipCreateLineBrush(&points[0], &points[1], (ARGB)0xffff00ff, - (ARGB)0xff0000ff, WrapModeTile, (GpLineGradient **)&brush); - expect(Ok, status); - ok(brush != NULL, "Expected brush to be initialized\n"); - - status = GdipCreatePen2(brush, 10.0f, UnitPixel, &pen); - expect(Ok, status); - ok(pen != NULL, "Expected pen to be initialized\n"); - - status = GdipDeletePen(pen); - expect(Ok, status); - - status = GdipDeleteBrush(brush); - expect(Ok, status); -} - -static void test_brushfill(void) -{ - GpStatus status; - GpPen *pen; - GpBrush *brush, *brush2; - GpBrushType type; - ARGB color = 0; - - /* default solid */ - GdipCreatePen1(0xdeadbeef, 4.5, UnitWorld, &pen); - status = GdipGetPenBrushFill(pen, &brush); - expect(Ok, status); - GdipGetBrushType(brush, &type); - expect(BrushTypeSolidColor, type); - GdipGetPenColor(pen, &color); - expect(0xdeadbeef, color); - GdipDeleteBrush(brush); - - /* color controlled by brush */ - GdipCreateSolidFill(0xabaddeed, (GpSolidFill**)&brush); - status = GdipSetPenBrushFill(pen, brush); - expect(Ok, status); - GdipGetPenColor(pen, &color); - expect(0xabaddeed, color); - GdipDeleteBrush(brush); - color = 0; - - /* get returns a clone, not a reference */ - GdipGetPenBrushFill(pen, &brush); - GdipSetSolidFillColor((GpSolidFill*)brush, 0xbeadfeed); - GdipGetPenBrushFill(pen, &brush2); - ok(brush != brush2, "Expected to get a clone, not a copy of the reference\n"); - GdipGetSolidFillColor((GpSolidFill*)brush2, &color); - expect(0xabaddeed, color); - GdipDeleteBrush(brush); - GdipDeleteBrush(brush2); - - /* brush cannot be NULL */ - status = GdipSetPenBrushFill(pen, NULL); - expect(InvalidParameter, status); - - GdipDeletePen(pen); -} - -static void test_dasharray(void) -{ - GpPen *pen; - GpDashStyle style; - GpStatus status; - REAL dashes[12]; - - GdipCreatePen1(0xdeadbeef, 10.0, UnitWorld, &pen); - dashes[0] = 10.0; - dashes[1] = 11.0; - dashes[2] = 12.0; - dashes[3] = 13.0; - dashes[4] = 14.0; - dashes[5] = -100.0; - dashes[6] = -100.0; - dashes[7] = dashes[8] = dashes[9] = dashes[10] = dashes[11] = 0.0; - - /* setting the array sets the type to custom */ - GdipGetPenDashStyle(pen, &style); - expect(DashStyleSolid, style); - status = GdipSetPenDashArray(pen, dashes, 2); - expect(Ok, status); - GdipGetPenDashStyle(pen, &style); - expect(DashStyleCustom, style); - - /* Getting the array on a non-custom pen returns invalid parameter (unless - * you are getting 0 elements).*/ - GdipSetPenDashStyle(pen, DashStyleSolid); - status = GdipGetPenDashArray(pen, &dashes[5], 2); - expect(InvalidParameter, status); - status = GdipGetPenDashArray(pen, &dashes[5], 0); - expect(Ok, status); - - /* What does setting DashStyleCustom do to the array length? */ - GdipSetPenDashArray(pen, dashes, 2); - GdipSetPenDashStyle(pen, DashStyleCustom); - status = GdipGetPenDashArray(pen, &dashes[5], 2); - expect(Ok, status); - expectf(10.0, dashes[5]); - expectf(11.0, dashes[6]); - - /* Set the array, then get with different sized buffers. */ - status = GdipSetPenDashArray(pen, dashes, 5); - expect(Ok, status); - dashes[5] = -100.0; - dashes[6] = -100.0; - status = GdipGetPenDashArray(pen, &dashes[5], 1); - expect(Ok, status); /* not InsufficientBuffer! */ - expectf(10.0, dashes[5]); - expectf(-100.0, dashes[6]); - dashes[5] = -100.0; - status = GdipGetPenDashArray(pen, &dashes[5], 6); - expect(InvalidParameter, status); /* not Ok! */ - expectf(-100.0, dashes[5]); - expectf(-100.0, dashes[6]); - - /* Some invalid array values. */ - status = GdipSetPenDashArray(pen, &dashes[7], 5); - expect(InvalidParameter, status); - dashes[9] = -1.0; - status = GdipSetPenDashArray(pen, &dashes[7], 5); - expect(InvalidParameter, status); - - /* Try to set with count = 0. */ - GdipSetPenDashStyle(pen, DashStyleDot); - if (0) /* corrupts stack on 64-bit Vista */ - { - status = GdipSetPenDashArray(pen, dashes, 0); - ok(status == OutOfMemory || status == InvalidParameter, - "Expected OutOfMemory or InvalidParameter, got %.8x\n", status); - } - status = GdipSetPenDashArray(pen, dashes, -1); - ok(status == OutOfMemory || status == InvalidParameter, - "Expected OutOfMemory or InvalidParameter, got %.8x\n", status); - GdipGetPenDashStyle(pen, &style); - expect(DashStyleDot, style); - - GdipDeletePen(pen); -} - -static void test_customcap(void) -{ - GpPen *pen; - GpStatus status; - GpCustomLineCap *custom; - - status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen); - expect(Ok, status); - - /* NULL args */ - status = GdipGetPenCustomStartCap(NULL, NULL); - expect(InvalidParameter, status); - status = GdipGetPenCustomStartCap(pen, NULL); - expect(InvalidParameter, status); - status = GdipGetPenCustomStartCap(NULL, &custom); - expect(InvalidParameter, status); - - status = GdipGetPenCustomEndCap(NULL, NULL); - expect(InvalidParameter, status); - status = GdipGetPenCustomEndCap(pen, NULL); - expect(InvalidParameter, status); - status = GdipGetPenCustomEndCap(NULL, &custom); - expect(InvalidParameter, status); - - /* native crashes on pen == NULL, custom != NULL */ - status = GdipSetPenCustomStartCap(NULL, NULL); - expect(InvalidParameter, status); - status = GdipSetPenCustomStartCap(pen, NULL); - expect(InvalidParameter, status); - - status = GdipSetPenCustomEndCap(NULL, NULL); - expect(InvalidParameter, status); - status = GdipSetPenCustomEndCap(pen, NULL); - expect(InvalidParameter, status); - - /* get without setting previously */ - custom = (GpCustomLineCap*)0xdeadbeef; - status = GdipGetPenCustomEndCap(pen, &custom); - expect(Ok, status); - ok(custom == NULL,"Expect CustomCap == NULL\n"); - - custom = (GpCustomLineCap*)0xdeadbeef; - status = GdipGetPenCustomStartCap(pen, &custom); - expect(Ok, status); - ok(custom == NULL,"Expect CustomCap == NULL\n"); - - GdipDeletePen(pen); -} - -static void test_penfilltype(void) -{ - GpPen *pen; - GpSolidFill *solid; - GpLineGradient *line; - GpPointF a, b; - GpStatus status; - GpPenType type; - - /* NULL */ - status = GdipGetPenFillType(NULL, NULL); - expect(InvalidParameter, status); - - status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen); - expect(Ok, status); - status = GdipGetPenFillType(pen, NULL); - expect(InvalidParameter, status); - - /* created with GdipCreatePen1() */ - status = GdipGetPenFillType(pen, &type); - expect(Ok, status); - expect(PenTypeSolidColor, type); - GdipDeletePen(pen); - - /* based on SolidBrush */ - status = GdipCreateSolidFill((ARGB)0xffff00ff, &solid); - expect(Ok, status); - status = GdipCreatePen2((GpBrush*)solid, 10.0f, UnitPixel, &pen); - expect(Ok, status); - status = GdipGetPenFillType(pen, &type); - expect(Ok, status); - expect(PenTypeSolidColor, type); - GdipDeletePen(pen); - GdipDeleteBrush((GpBrush*)solid); - - /* based on LinearGradientBrush */ - a.X = a.Y = 0.0; - b.X = b.Y = 10.0; - status = GdipCreateLineBrush(&a, &b, (ARGB)0xffff00ff, (ARGB)0xffff0000, - WrapModeTile, &line); - expect(Ok, status); - status = GdipCreatePen2((GpBrush*)line, 10.0f, UnitPixel, &pen); - expect(Ok, status); - status = GdipGetPenFillType(pen, &type); - expect(Ok, status); - expect(PenTypeLinearGradient, type); - GdipDeletePen(pen); - GdipDeleteBrush((GpBrush*)line); -} - -static void test_compoundarray(void) -{ - GpStatus status; - GpPen *pen; - static const REAL testvalues[] = {0.2, 0.4, 0.6, 0.8}; - - status = GdipSetPenCompoundArray(NULL, testvalues, 4); - expect(InvalidParameter, status); - - status = GdipCreatePen1((ARGB)0xffff00ff, 10.0f, UnitPixel, &pen); - expect(Ok, status); - - status = GdipSetPenCompoundArray(pen, NULL, 4); - expect(InvalidParameter, status); - status = GdipSetPenCompoundArray(pen, testvalues, 3); - expect(InvalidParameter, status); - status = GdipSetPenCompoundArray(pen, testvalues, 0); - expect(InvalidParameter, status); - status = GdipSetPenCompoundArray(pen, testvalues, -2); - expect(InvalidParameter, status); - - status = GdipSetPenCompoundArray(pen, testvalues, 4); - todo_wine expect(Ok, status); - - GdipDeletePen(pen); -} - -START_TEST(pen) -{ - struct GdiplusStartupInput gdiplusStartupInput; - ULONG_PTR gdiplusToken; - - test_startup(); - - gdiplusStartupInput.GdiplusVersion = 1; - gdiplusStartupInput.DebugEventCallback = NULL; - gdiplusStartupInput.SuppressBackgroundThread = 0; - gdiplusStartupInput.SuppressExternalCodecs = 0; - - GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); - - test_constructor_destructor(); - test_constructor_destructor2(); - test_brushfill(); - test_dasharray(); - test_customcap(); - test_penfilltype(); - test_compoundarray(); - - GdiplusShutdown(gdiplusToken); -} diff --git a/rostests/winetests/gdiplus/region.c b/rostests/winetests/gdiplus/region.c deleted file mode 100644 index efd2115df1a..00000000000 --- a/rostests/winetests/gdiplus/region.c +++ /dev/null @@ -1,1642 +0,0 @@ -/* - * Unit test suite for gdiplus regions - * - * Copyright (C) 2008 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 - */ - -#include "windows.h" -#include "gdiplus.h" -#include "wingdi.h" -#include "wine/test.h" - -#define RGNDATA_RECT 0x10000000 -#define RGNDATA_PATH 0x10000001 -#define RGNDATA_EMPTY_RECT 0x10000002 -#define RGNDATA_INFINITE_RECT 0x10000003 - -#define RGNDATA_MAGIC 0xdbc01001 -#define RGNDATA_MAGIC2 0xdbc01002 - -#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) - -#define expect_magic(value) ok(*value == RGNDATA_MAGIC || *value == RGNDATA_MAGIC2, "Expected a known magic value, got %8x\n", *value) - -#define expect_dword(value, expected) ok(*(value) == expected, "expected %08x got %08x\n", expected, *(value)) - -static inline void expect_float(DWORD *value, FLOAT expected) -{ - FLOAT valuef = *(FLOAT*)value; - ok(valuef == expected, "expected %f got %f\n", expected, valuef); -} - -/* We get shorts back, not INTs like a GpPoint */ -typedef struct RegionDataPoint -{ - short X, Y; -} RegionDataPoint; - -static void verify_region(HRGN hrgn, const RECT *rc) -{ - union - { - RGNDATA data; - char buf[sizeof(RGNDATAHEADER) + sizeof(RECT)]; - } rgn; - const RECT *rect; - DWORD ret; - - ret = GetRegionData(hrgn, 0, NULL); - if (IsRectEmpty(rc)) - ok(ret == sizeof(rgn.data.rdh), "expected sizeof(rdh), got %u\n", ret); - else - ok(ret == sizeof(rgn.data.rdh) + sizeof(RECT), "expected sizeof(rgn), got %u\n", ret); - - if (!ret) return; - - ret = GetRegionData(hrgn, sizeof(rgn), &rgn.data); - if (IsRectEmpty(rc)) - ok(ret == sizeof(rgn.data.rdh), "expected sizeof(rdh), got %u\n", ret); - else - ok(ret == sizeof(rgn.data.rdh) + sizeof(RECT), "expected sizeof(rgn), got %u\n", ret); - - trace("size %u, type %u, count %u, rgn size %u, bound (%d,%d-%d,%d)\n", - rgn.data.rdh.dwSize, rgn.data.rdh.iType, - rgn.data.rdh.nCount, rgn.data.rdh.nRgnSize, - rgn.data.rdh.rcBound.left, rgn.data.rdh.rcBound.top, - rgn.data.rdh.rcBound.right, rgn.data.rdh.rcBound.bottom); - if (rgn.data.rdh.nCount != 0) - { - rect = (const RECT *)rgn.data.Buffer; - trace("rect (%d,%d-%d,%d)\n", rect->left, rect->top, rect->right, rect->bottom); - ok(EqualRect(rect, rc), "rects don't match\n"); - } - - ok(rgn.data.rdh.dwSize == sizeof(rgn.data.rdh), "expected sizeof(rdh), got %u\n", rgn.data.rdh.dwSize); - ok(rgn.data.rdh.iType == RDH_RECTANGLES, "expected RDH_RECTANGLES, got %u\n", rgn.data.rdh.iType); - if (IsRectEmpty(rc)) - { - ok(rgn.data.rdh.nCount == 0, "expected 0, got %u\n", rgn.data.rdh.nCount); - ok(rgn.data.rdh.nRgnSize == 0, "expected 0, got %u\n", rgn.data.rdh.nRgnSize); - } - else - { - ok(rgn.data.rdh.nCount == 1, "expected 1, got %u\n", rgn.data.rdh.nCount); - ok(rgn.data.rdh.nRgnSize == sizeof(RECT), "expected sizeof(RECT), got %u\n", rgn.data.rdh.nRgnSize); - } - ok(EqualRect(&rgn.data.rdh.rcBound, rc), "rects don't match\n"); -} - -static void test_getregiondata(void) -{ - GpStatus status; - GpRegion *region, *region2; - RegionDataPoint *point; - UINT needed; - DWORD buf[100]; - GpRect rect; - GpPath *path; - - memset(buf, 0xee, sizeof(buf)); - - status = GdipCreateRegion(®ion); - ok(status == Ok, "status %08x\n", status); - - status = GdipGetRegionDataSize(region, &needed); - ok(status == Ok, "status %08x\n", status); - expect(20, needed); - status = GdipGetRegionData(region, (BYTE*)buf, sizeof(buf), &needed); - ok(status == Ok, "status %08x\n", status); - expect(20, needed); - expect_dword(buf, 12); - trace("buf[1] = %08x\n", buf[1]); - expect_magic((DWORD*)(buf + 2)); - expect_dword(buf + 3, 0); - expect_dword(buf + 4, RGNDATA_INFINITE_RECT); - - status = GdipSetEmpty(region); - ok(status == Ok, "status %08x\n", status); - status = GdipGetRegionDataSize(region, &needed); - ok(status == Ok, "status %08x\n", status); - expect(20, needed); - status = GdipGetRegionData(region, (BYTE*)buf, sizeof(buf), &needed); - ok(status == Ok, "status %08x\n", status); - expect(20, needed); - expect_dword(buf, 12); - trace("buf[1] = %08x\n", buf[1]); - expect_magic((DWORD*)(buf + 2)); - expect_dword(buf + 3, 0); - expect_dword(buf + 4, RGNDATA_EMPTY_RECT); - - status = GdipSetInfinite(region); - ok(status == Ok, "status %08x\n", status); - status = GdipGetRegionDataSize(region, &needed); - ok(status == Ok, "status %08x\n", status); - expect(20, needed); - status = GdipGetRegionData(region, (BYTE*)buf, sizeof(buf), &needed); - ok(status == Ok, "status %08x\n", status); - expect(20, needed); - expect_dword(buf, 12); - trace("buf[1] = %08x\n", buf[1]); - expect_magic((DWORD*)(buf + 2)); - expect_dword(buf + 3, 0); - expect_dword(buf + 4, RGNDATA_INFINITE_RECT); - - status = GdipDeleteRegion(region); - ok(status == Ok, "status %08x\n", status); - - rect.X = 10; - rect.Y = 20; - rect.Width = 100; - rect.Height = 200; - status = GdipCreateRegionRectI(&rect, ®ion); - ok(status == Ok, "status %08x\n", status); - status = GdipGetRegionDataSize(region, &needed); - ok(status == Ok, "status %08x\n", status); - expect(36, needed); - status = GdipGetRegionData(region, (BYTE*)buf, sizeof(buf), &needed); - ok(status == Ok, "status %08x\n", status); - expect(36, needed); - expect_dword(buf, 28); - trace("buf[1] = %08x\n", buf[1]); - expect_magic((DWORD*)(buf + 2)); - expect_dword(buf + 3, 0); - expect_dword(buf + 4, RGNDATA_RECT); - expect_float(buf + 5, 10.0); - expect_float(buf + 6, 20.0); - expect_float(buf + 7, 100.0); - expect_float(buf + 8, 200.0); - - rect.X = 50; - rect.Y = 30; - rect.Width = 10; - rect.Height = 20; - status = GdipCombineRegionRectI(region, &rect, CombineModeIntersect); - ok(status == Ok, "status %08x\n", status); - rect.X = 100; - rect.Y = 300; - rect.Width = 30; - rect.Height = 50; - status = GdipCombineRegionRectI(region, &rect, CombineModeXor); - ok(status == Ok, "status %08x\n", status); - - rect.X = 200; - rect.Y = 100; - rect.Width = 133; - rect.Height = 266; - status = GdipCreateRegionRectI(&rect, ®ion2); - ok(status == Ok, "status %08x\n", status); - rect.X = 20; - rect.Y = 10; - rect.Width = 40; - rect.Height = 66; - status = GdipCombineRegionRectI(region2, &rect, CombineModeUnion); - ok(status == Ok, "status %08x\n", status); - - status = GdipCombineRegionRegion(region, region2, CombineModeComplement); - ok(status == Ok, "status %08x\n", status); - - rect.X = 400; - rect.Y = 500; - rect.Width = 22; - rect.Height = 55; - status = GdipCombineRegionRectI(region, &rect, CombineModeExclude); - ok(status == Ok, "status %08x\n", status); - - status = GdipGetRegionDataSize(region, &needed); - ok(status == Ok, "status %08x\n", status); - expect(156, needed); - status = GdipGetRegionData(region, (BYTE*)buf, sizeof(buf), &needed); - ok(status == Ok, "status %08x\n", status); - expect(156, needed); - expect_dword(buf, 148); - trace("buf[1] = %08x\n", buf[1]); - expect_magic((DWORD*)(buf + 2)); - expect_dword(buf + 3, 10); - expect_dword(buf + 4, CombineModeExclude); - expect_dword(buf + 5, CombineModeComplement); - expect_dword(buf + 6, CombineModeXor); - expect_dword(buf + 7, CombineModeIntersect); - expect_dword(buf + 8, RGNDATA_RECT); - expect_float(buf + 9, 10.0); - expect_float(buf + 10, 20.0); - expect_float(buf + 11, 100.0); - expect_float(buf + 12, 200.0); - expect_dword(buf + 13, RGNDATA_RECT); - expect_float(buf + 14, 50.0); - expect_float(buf + 15, 30.0); - expect_float(buf + 16, 10.0); - expect_float(buf + 17, 20.0); - expect_dword(buf + 18, RGNDATA_RECT); - expect_float(buf + 19, 100.0); - expect_float(buf + 20, 300.0); - expect_float(buf + 21, 30.0); - expect_float(buf + 22, 50.0); - expect_dword(buf + 23, CombineModeUnion); - expect_dword(buf + 24, RGNDATA_RECT); - expect_float(buf + 25, 200.0); - expect_float(buf + 26, 100.0); - expect_float(buf + 27, 133.0); - expect_float(buf + 28, 266.0); - expect_dword(buf + 29, RGNDATA_RECT); - expect_float(buf + 30, 20.0); - expect_float(buf + 31, 10.0); - expect_float(buf + 32, 40.0); - expect_float(buf + 33, 66.0); - expect_dword(buf + 34, RGNDATA_RECT); - expect_float(buf + 35, 400.0); - expect_float(buf + 36, 500.0); - expect_float(buf + 37, 22.0); - expect_float(buf + 38, 55.0); - - status = GdipDeleteRegion(region2); - ok(status == Ok, "status %08x\n", status); - status = GdipDeleteRegion(region); - ok(status == Ok, "status %08x\n", status); - - /* Try some paths */ - - status = GdipCreatePath(FillModeAlternate, &path); - ok(status == Ok, "status %08x\n", status); - GdipAddPathRectangle(path, 12.5, 13.0, 14.0, 15.0); - - status = GdipCreateRegionPath(path, ®ion); - ok(status == Ok, "status %08x\n", status); - status = GdipGetRegionDataSize(region, &needed); - ok(status == Ok, "status %08x\n", status); - expect(72, needed); - status = GdipGetRegionData(region, (BYTE*)buf, sizeof(buf), &needed); - ok(status == Ok, "status %08x\n", status); - expect(72, needed); - expect_dword(buf, 64); - trace("buf[1] = %08x\n", buf[1]); - expect_magic((DWORD*)(buf + 2)); - expect_dword(buf + 3, 0); - expect_dword(buf + 4, RGNDATA_PATH); - expect_dword(buf + 5, 0x00000030); - expect_magic((DWORD*)(buf + 6)); - expect_dword(buf + 7, 0x00000004); - expect_dword(buf + 8, 0x00000000); - expect_float(buf + 9, 12.5); - expect_float(buf + 10, 13.0); - expect_float(buf + 11, 26.5); - expect_float(buf + 12, 13.0); - expect_float(buf + 13, 26.5); - expect_float(buf + 14, 28.0); - expect_float(buf + 15, 12.5); - expect_float(buf + 16, 28.0); - expect_dword(buf + 17, 0x81010100); - - - rect.X = 50; - rect.Y = 30; - rect.Width = 10; - rect.Height = 20; - status = GdipCombineRegionRectI(region, &rect, CombineModeIntersect); - ok(status == Ok, "status %08x\n", status); - status = GdipGetRegionDataSize(region, &needed); - ok(status == Ok, "status %08x\n", status); - expect(96, needed); - status = GdipGetRegionData(region, (BYTE*)buf, sizeof(buf), &needed); - ok(status == Ok, "status %08x\n", status); - expect(96, needed); - expect_dword(buf, 88); - trace("buf[1] = %08x\n", buf[1]); - expect_magic((DWORD*)(buf + 2)); - expect_dword(buf + 3, 2); - expect_dword(buf + 4, CombineModeIntersect); - expect_dword(buf + 5, RGNDATA_PATH); - expect_dword(buf + 6, 0x00000030); - expect_magic((DWORD*)(buf + 7)); - expect_dword(buf + 8, 0x00000004); - expect_dword(buf + 9, 0x00000000); - expect_float(buf + 10, 12.5); - expect_float(buf + 11, 13.0); - expect_float(buf + 12, 26.5); - expect_float(buf + 13, 13.0); - expect_float(buf + 14, 26.5); - expect_float(buf + 15, 28.0); - expect_float(buf + 16, 12.5); - expect_float(buf + 17, 28.0); - expect_dword(buf + 18, 0x81010100); - expect_dword(buf + 19, RGNDATA_RECT); - expect_float(buf + 20, 50.0); - expect_float(buf + 21, 30.0); - expect_float(buf + 22, 10.0); - expect_float(buf + 23, 20.0); - - status = GdipDeleteRegion(region); - ok(status == Ok, "status %08x\n", status); - status = GdipDeletePath(path); - ok(status == Ok, "status %08x\n", status); - - /* Test an empty path */ - status = GdipCreatePath(FillModeAlternate, &path); - expect(Ok, status); - status = GdipCreateRegionPath(path, ®ion); - expect(Ok, status); - status = GdipGetRegionDataSize(region, &needed); - expect(Ok, status); - expect(36, needed); - status = GdipGetRegionData(region, (BYTE*)buf, sizeof(buf), &needed); - expect(Ok, status); - expect(36, needed); - expect_dword(buf, 28); - trace("buf[1] = %08x\n", buf[1]); - expect_magic((DWORD*)(buf + 2)); - expect_dword(buf + 3, 0); - expect_dword(buf + 4, RGNDATA_PATH); - - /* Second signature for pathdata */ - expect_dword(buf + 5, 12); - expect_magic((DWORD*)(buf + 6)); - expect_dword(buf + 7, 0); - /* flags 0x4000 means its a path of shorts instead of FLOAT */ - ok((*(buf + 8) & (~ 0x00004000)) == 0x00000000, - "expected 00000000 got %08x\n", *(buf + 8) & (~ 0x00004000)); - - status = GdipDeleteRegion(region); - expect(Ok, status); - - /* Test a simple triangle of INTs */ - status = GdipAddPathLine(path, 5, 6, 7, 8); - expect(Ok, status); - status = GdipAddPathLine(path, 8, 1, 5, 6); - expect(Ok, status); - status = GdipClosePathFigure(path); - expect(Ok, status); - status = GdipCreateRegionPath(path, ®ion); - expect(Ok, status); - status = GdipGetRegionDataSize(region, &needed); - expect(Ok, status); - expect(56, needed); - status = GdipGetRegionData(region, (BYTE*)buf, sizeof(buf), &needed); - expect(Ok, status); - expect(56, needed); - expect_dword(buf, 48); - trace("buf[1] = %08x\n", buf[1]); - expect_magic((DWORD*)(buf + 2)); - expect_dword(buf + 3 , 0); - expect_dword(buf + 4 , RGNDATA_PATH); - - expect_dword(buf + 5, 32); - expect_magic((DWORD*)(buf + 6)); - expect_dword(buf + 7, 4); - expect_dword(buf + 8, 0x00004000); /* ?? */ - - point = (RegionDataPoint*)buf + 9; - expect(5, point[0].X); - expect(6, point[0].Y); - expect(7, point[1].X); /* buf + 10 */ - expect(8, point[1].Y); - expect(8, point[2].X); /* buf + 11 */ - expect(1, point[2].Y); - expect(5, point[3].X); /* buf + 12 */ - expect(6, point[3].Y); - expect_dword(buf + 13, 0x81010100); /* 0x01010100 if we don't close the path */ - - status = GdipDeletePath(path); - expect(Ok, status); - status = GdipDeleteRegion(region); - expect(Ok, status); - - /* Test a floating-point triangle */ - status = GdipCreatePath(FillModeAlternate, &path); - expect(Ok, status); - status = GdipAddPathLine(path, 5.6, 6.2, 7.2, 8.9); - expect(Ok, status); - status = GdipAddPathLine(path, 8.1, 1.6, 5.6, 6.2); - expect(Ok, status); - status = GdipCreateRegionPath(path, ®ion); - expect(Ok, status); - status = GdipGetRegionDataSize(region, &needed); - expect(Ok, status); - expect(72, needed); - status = GdipGetRegionData(region, (BYTE*)buf, sizeof(buf), &needed); - expect(Ok, status); - expect(72, needed); - expect_dword(buf, 64); - trace("buf[1] = %08x\n", buf[1]); - expect_magic((DWORD*)(buf + 2)); - expect_dword(buf + 3, 0); - expect_dword(buf + 4, RGNDATA_PATH); - - expect_dword(buf + 5, 48); - expect_magic((DWORD*)(buf + 6)); - expect_dword(buf + 7, 4); - expect_dword(buf + 8, 0); - expect_float(buf + 9, 5.6); - expect_float(buf + 10, 6.2); - expect_float(buf + 11, 7.2); - expect_float(buf + 12, 8.9); - expect_float(buf + 13, 8.1); - expect_float(buf + 14, 1.6); - expect_float(buf + 15, 5.6); - expect_float(buf + 16, 6.2); - - status = GdipDeletePath(path); - expect(Ok, status); - status = GdipDeleteRegion(region); - expect(Ok, status); - - /* Test for a path with > 4 points, and CombineRegionPath */ - GdipCreatePath(FillModeAlternate, &path); - status = GdipAddPathLine(path, 50, 70.2, 60, 102.8); - expect(Ok, status); - status = GdipAddPathLine(path, 55.4, 122.4, 40.4, 60.2); - expect(Ok, status); - status = GdipAddPathLine(path, 45.6, 20.2, 50, 70.2); - expect(Ok, status); - rect.X = 20; - rect.Y = 25; - rect.Width = 60; - rect.Height = 120; - status = GdipCreateRegionRectI(&rect, ®ion); - expect(Ok, status); - status = GdipCombineRegionPath(region, path, CombineModeUnion); - expect(Ok, status); - - status = GdipGetRegionDataSize(region, &needed); - expect(Ok, status); - expect(116, needed); - status = GdipGetRegionData(region, (BYTE*)buf, sizeof(buf), &needed); - expect(Ok, status); - expect(116, needed); - expect_dword(buf, 108); - trace("buf[1] = %08x\n", buf[1]); - expect_magic((DWORD*)(buf + 2)); - expect_dword(buf + 3, 2); - expect_dword(buf + 4, CombineModeUnion); - expect_dword(buf + 5, RGNDATA_RECT); - expect_float(buf + 6, 20); - expect_float(buf + 7, 25); - expect_float(buf + 8, 60); - expect_float(buf + 9, 120); - expect_dword(buf + 10, RGNDATA_PATH); - - expect_dword(buf + 11, 68); - expect_magic((DWORD*)(buf + 12)); - expect_dword(buf + 13, 6); - expect_float(buf + 14, 0x0); - - expect_float(buf + 15, 50); - expect_float(buf + 16, 70.2); - expect_float(buf + 17, 60); - expect_float(buf + 18, 102.8); - expect_float(buf + 19, 55.4); - expect_float(buf + 20, 122.4); - expect_float(buf + 21, 40.4); - expect_float(buf + 22, 60.2); - expect_float(buf + 23, 45.6); - expect_float(buf + 24, 20.2); - expect_float(buf + 25, 50); - expect_float(buf + 26, 70.2); - expect_dword(buf + 27, 0x01010100); - ok(*(buf + 28) == 0x00000101 || *(buf + 28) == 0x43050101 /* Win 7 */, - "expected 00000101 or 43050101 got %08x\n", *(buf + 28)); - - status = GdipDeletePath(path); - expect(Ok, status); - status = GdipDeleteRegion(region); - expect(Ok, status); -} - -static void test_isinfinite(void) -{ - GpStatus status; - GpRegion *region; - GpGraphics *graphics = NULL; - GpMatrix *m; - HDC hdc = GetDC(0); - BOOL res; - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - GdipCreateRegion(®ion); - - GdipCreateMatrix2(3.0, 0.0, 0.0, 1.0, 20.0, 30.0, &m); - - /* NULL arguments */ - status = GdipIsInfiniteRegion(NULL, NULL, NULL); - expect(InvalidParameter, status); - status = GdipIsInfiniteRegion(region, NULL, NULL); - expect(InvalidParameter, status); - status = GdipIsInfiniteRegion(NULL, graphics, NULL); - expect(InvalidParameter, status); - status = GdipIsInfiniteRegion(NULL, NULL, &res); - expect(InvalidParameter, status); - status = GdipIsInfiniteRegion(region, NULL, &res); - expect(InvalidParameter, status); - - res = FALSE; - status = GdipIsInfiniteRegion(region, graphics, &res); - expect(Ok, status); - expect(TRUE, res); - - /* after world transform */ - status = GdipSetWorldTransform(graphics, m); - expect(Ok, status); - - res = FALSE; - status = GdipIsInfiniteRegion(region, graphics, &res); - expect(Ok, status); - expect(TRUE, res); - - GdipDeleteMatrix(m); - GdipDeleteRegion(region); - GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); -} - -static void test_isempty(void) -{ - GpStatus status; - GpRegion *region; - GpGraphics *graphics = NULL; - HDC hdc = GetDC(0); - BOOL res; - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - GdipCreateRegion(®ion); - - /* NULL arguments */ - status = GdipIsEmptyRegion(NULL, NULL, NULL); - expect(InvalidParameter, status); - status = GdipIsEmptyRegion(region, NULL, NULL); - expect(InvalidParameter, status); - status = GdipIsEmptyRegion(NULL, graphics, NULL); - expect(InvalidParameter, status); - status = GdipIsEmptyRegion(NULL, NULL, &res); - expect(InvalidParameter, status); - status = GdipIsEmptyRegion(region, NULL, &res); - expect(InvalidParameter, status); - - /* default is infinite */ - res = TRUE; - status = GdipIsEmptyRegion(region, graphics, &res); - expect(Ok, status); - expect(FALSE, res); - - status = GdipSetEmpty(region); - expect(Ok, status); - - res = FALSE; - status = GdipIsEmptyRegion(region, graphics, &res); - expect(Ok, status); - expect(TRUE, res); - - GdipDeleteRegion(region); - GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); -} - -static void test_combinereplace(void) -{ - GpStatus status; - GpRegion *region, *region2; - GpPath *path; - GpRectF rectf; - UINT needed; - DWORD buf[50]; - - rectf.X = rectf.Y = 0.0; - rectf.Width = rectf.Height = 100.0; - - status = GdipCreateRegionRect(&rectf, ®ion); - expect(Ok, status); - - /* replace with the same rectangle */ - status = GdipCombineRegionRect(region, &rectf,CombineModeReplace); - expect(Ok, status); - - status = GdipGetRegionDataSize(region, &needed); - expect(Ok, status); - expect(36, needed); - status = GdipGetRegionData(region, (BYTE*)buf, sizeof(buf), &needed); - expect(Ok, status); - expect(36, needed); - expect_dword(buf, 28); - trace("buf[1] = %08x\n", buf[1]); - expect_magic((DWORD*)(buf + 2)); - expect_dword(buf + 3, 0); - expect_dword(buf + 4, RGNDATA_RECT); - - /* replace with path */ - status = GdipCreatePath(FillModeAlternate, &path); - expect(Ok, status); - status = GdipAddPathEllipse(path, 0.0, 0.0, 100.0, 250.0); - expect(Ok, status); - status = GdipCombineRegionPath(region, path, CombineModeReplace); - expect(Ok, status); - - status = GdipGetRegionDataSize(region, &needed); - expect(Ok, status); - expect(156, needed); - status = GdipGetRegionData(region, (BYTE*)buf, sizeof(buf), &needed); - expect(Ok, status); - expect(156, needed); - expect_dword(buf, 148); - trace("buf[1] = %08x\n", buf[1]); - expect_magic((DWORD*)(buf + 2)); - expect_dword(buf + 3, 0); - expect_dword(buf + 4, RGNDATA_PATH); - GdipDeletePath(path); - - /* replace with infinite rect */ - status = GdipCreateRegion(®ion2); - expect(Ok, status); - status = GdipCombineRegionRegion(region, region2, CombineModeReplace); - expect(Ok, status); - - status = GdipGetRegionDataSize(region, &needed); - expect(Ok, status); - expect(20, needed); - status = GdipGetRegionData(region, (BYTE*)buf, sizeof(buf), &needed); - expect(Ok, status); - expect(20, needed); - expect_dword(buf, 12); - trace("buf[1] = %08x\n", buf[1]); - expect_magic((DWORD*)(buf + 2)); - expect_dword(buf + 3, 0); - expect_dword(buf + 4, RGNDATA_INFINITE_RECT); - GdipDeleteRegion(region2); - - /* more complex case : replace with a combined region */ - status = GdipCreateRegionRect(&rectf, ®ion2); - expect(Ok, status); - status = GdipCreatePath(FillModeAlternate, &path); - expect(Ok, status); - status = GdipAddPathEllipse(path, 0.0, 0.0, 100.0, 250.0); - expect(Ok, status); - status = GdipCombineRegionPath(region2, path, CombineModeUnion); - expect(Ok, status); - GdipDeletePath(path); - status = GdipCombineRegionRegion(region, region2, CombineModeReplace); - expect(Ok, status); - GdipDeleteRegion(region2); - - status = GdipGetRegionDataSize(region, &needed); - expect(Ok, status); - expect(180, needed); - status = GdipGetRegionData(region, (BYTE*)buf, sizeof(buf), &needed); - expect(Ok, status); - expect(180, needed); - expect_dword(buf, 172); - trace("buf[1] = %08x\n", buf[1]); - expect_magic((DWORD*)(buf + 2)); - expect_dword(buf + 3, 2); - expect_dword(buf + 4, CombineModeUnion); - - GdipDeleteRegion(region); -} - -static void test_fromhrgn(void) -{ - GpStatus status; - GpRegion *region = (GpRegion*)0xabcdef01; - HRGN hrgn; - UINT needed; - DWORD buf[220]; - RegionDataPoint *point; - GpGraphics *graphics = NULL; - HDC hdc; - BOOL res; - - /* NULL */ - status = GdipCreateRegionHrgn(NULL, NULL); - expect(InvalidParameter, status); - status = GdipCreateRegionHrgn(NULL, ®ion); - expect(InvalidParameter, status); - status = GdipCreateRegionHrgn((HRGN)0xdeadbeef, ®ion); - expect(InvalidParameter, status); - ok(region == (GpRegion*)0xabcdef01, "Expected region not to be created\n"); - - /* empty rectangle */ - hrgn = CreateRectRgn(0, 0, 0, 0); - status = GdipCreateRegionHrgn(hrgn, ®ion); - expect(Ok, status); - if(status == Ok) { - - hdc = GetDC(0); - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - res = FALSE; - status = GdipIsEmptyRegion(region, graphics, &res); - expect(Ok, status); - expect(TRUE, res); - GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); - GdipDeleteRegion(region); - - } - DeleteObject(hrgn); - - /* rectangle */ - hrgn = CreateRectRgn(0, 0, 100, 10); - status = GdipCreateRegionHrgn(hrgn, ®ion); - expect(Ok, status); - - status = GdipGetRegionDataSize(region, &needed); - expect(Ok, status); - expect(56, needed); - - status = GdipGetRegionData(region, (BYTE*)buf, sizeof(buf), &needed); - expect(Ok, status); - - if(status == Ok){ - - expect(56, needed); - expect_dword(buf, 48); - expect_magic((DWORD*)(buf + 2)); - expect_dword(buf + 3, 0); - expect_dword(buf + 4, RGNDATA_PATH); - expect_dword(buf + 5, 0x00000020); - expect_magic((DWORD*)(buf + 6)); - expect_dword(buf + 7, 0x00000004); - todo_wine expect_dword(buf + 8, 0x00006000); /* ?? */ - - point = (RegionDataPoint*)buf + 9; - - expect(0, point[0].X); - expect(0, point[0].Y); - - expect(100,point[1].X); /* buf + 10 */ - expect(0, point[1].Y); - expect(100,point[2].X); /* buf + 11 */ - expect(10, point[2].Y); - - expect(0, point[3].X); /* buf + 12 */ - - expect(10, point[3].Y); - expect_dword(buf + 13, 0x81010100); /* closed */ - - } - - GdipDeleteRegion(region); - DeleteObject(hrgn); - - /* ellipse */ - hrgn = CreateEllipticRgn(0, 0, 100, 10); - status = GdipCreateRegionHrgn(hrgn, ®ion); - expect(Ok, status); - - status = GdipGetRegionDataSize(region, &needed); - expect(Ok, status); - ok(needed == 216 || - needed == 196, /* win98 */ - "Got %.8x\n", needed); - - status = GdipGetRegionData(region, (BYTE*)buf, sizeof(buf), &needed); - expect(Ok, status); - - if(status == Ok && needed == 216) /* Don't try to test win98 layout */ - { - expect(Ok, status); - expect(216, needed); - expect_dword(buf, 208); - expect_magic((DWORD*)(buf + 2)); - expect_dword(buf + 3, 0); - expect_dword(buf + 4, RGNDATA_PATH); - expect_dword(buf + 5, 0x000000C0); - expect_magic((DWORD*)(buf + 6)); - expect_dword(buf + 7, 0x00000024); - todo_wine expect_dword(buf + 8, 0x00006000); /* ?? */ - } - - GdipDeleteRegion(region); - DeleteObject(hrgn); -} - -static void test_gethrgn(void) -{ - GpStatus status; - GpRegion *region, *region2; - GpPath *path; - GpGraphics *graphics; - HRGN hrgn; - HDC hdc=GetDC(0); - static const RECT empty_rect = {0,0,0,0}; - static const RECT test_rect = {10, 11, 20, 21}; - static const GpRectF test_rectF = {10.0, 11.0, 10.0, 10.0}; - static const RECT scaled_rect = {20, 22, 40, 42}; - static const RECT test_rect2 = {10, 21, 20, 31}; - static const GpRectF test_rect2F = {10.0, 21.0, 10.0, 10.0}; - static const RECT test_rect3 = {10, 11, 20, 31}; - static const GpRectF test_rect3F = {10.0, 11.0, 10.0, 20.0}; - - status = GdipCreateFromHDC(hdc, &graphics); - ok(status == Ok, "status %08x\n", status); - - status = GdipCreateRegion(®ion); - ok(status == Ok, "status %08x\n", status); - - status = GdipGetRegionHRgn(NULL, graphics, &hrgn); - ok(status == InvalidParameter, "status %08x\n", status); - status = GdipGetRegionHRgn(region, graphics, NULL); - ok(status == InvalidParameter, "status %08x\n", status); - - status = GdipGetRegionHRgn(region, NULL, &hrgn); - ok(status == Ok, "status %08x\n", status); - ok(hrgn == NULL, "hrgn=%p\n", hrgn); - DeleteObject(hrgn); - - status = GdipGetRegionHRgn(region, graphics, &hrgn); - ok(status == Ok, "status %08x\n", status); - ok(hrgn == NULL, "hrgn=%p\n", hrgn); - DeleteObject(hrgn); - - status = GdipSetEmpty(region); - ok(status == Ok, "status %08x\n", status); - status = GdipGetRegionHRgn(region, NULL, &hrgn); - ok(status == Ok, "status %08x\n", status); - verify_region(hrgn, &empty_rect); - DeleteObject(hrgn); - - status = GdipCreatePath(FillModeAlternate, &path); - ok(status == Ok, "status %08x\n", status); - status = GdipAddPathRectangle(path, 10.0, 11.0, 10.0, 10.0); - ok(status == Ok, "status %08x\n", status); - - status = GdipCreateRegionPath(path, ®ion2); - ok(status == Ok, "status %08x\n", status); - status = GdipGetRegionHRgn(region2, NULL, &hrgn); - ok(status == Ok, "status %08x\n", status); - verify_region(hrgn, &test_rect); - DeleteObject(hrgn); - - /* resulting HRGN is in device coordinates */ - status = GdipScaleWorldTransform(graphics, 2.0, 2.0, MatrixOrderPrepend); - ok(status == Ok, "status %08x\n", status); - status = GdipGetRegionHRgn(region2, graphics, &hrgn); - ok(status == Ok, "status %08x\n", status); - verify_region(hrgn, &scaled_rect); - DeleteObject(hrgn); - - status = GdipCombineRegionRect(region2, &test_rectF, CombineModeReplace); - ok(status == Ok, "status %08x\n", status); - status = GdipGetRegionHRgn(region2, NULL, &hrgn); - ok(status == Ok, "status %08x\n", status); - verify_region(hrgn, &test_rect); - DeleteObject(hrgn); - - status = GdipGetRegionHRgn(region2, graphics, &hrgn); - ok(status == Ok, "status %08x\n", status); - verify_region(hrgn, &scaled_rect); - DeleteObject(hrgn); - - status = GdipSetInfinite(region); - ok(status == Ok, "status %08x\n", status); - status = GdipCombineRegionRect(region, &test_rectF, CombineModeIntersect); - ok(status == Ok, "status %08x\n", status); - status = GdipGetRegionHRgn(region, NULL, &hrgn); - ok(status == Ok, "status %08x\n", status); - verify_region(hrgn, &test_rect); - DeleteObject(hrgn); - - status = GdipCombineRegionRect(region, &test_rectF, CombineModeReplace); - ok(status == Ok, "status %08x\n", status); - status = GdipCombineRegionRect(region, &test_rect2F, CombineModeUnion); - ok(status == Ok, "status %08x\n", status); - status = GdipGetRegionHRgn(region, NULL, &hrgn); - ok(status == Ok, "status %08x\n", status); - verify_region(hrgn, &test_rect3); - DeleteObject(hrgn); - - status = GdipCombineRegionRect(region, &test_rect3F, CombineModeReplace); - ok(status == Ok, "status %08x\n", status); - status = GdipCombineRegionRect(region, &test_rect2F, CombineModeXor); - ok(status == Ok, "status %08x\n", status); - status = GdipGetRegionHRgn(region, NULL, &hrgn); - ok(status == Ok, "status %08x\n", status); - verify_region(hrgn, &test_rect); - DeleteObject(hrgn); - - status = GdipCombineRegionRect(region, &test_rect3F, CombineModeReplace); - ok(status == Ok, "status %08x\n", status); - status = GdipCombineRegionRect(region, &test_rectF, CombineModeExclude); - ok(status == Ok, "status %08x\n", status); - status = GdipGetRegionHRgn(region, NULL, &hrgn); - ok(status == Ok, "status %08x\n", status); - verify_region(hrgn, &test_rect2); - DeleteObject(hrgn); - - status = GdipCombineRegionRect(region, &test_rectF, CombineModeReplace); - ok(status == Ok, "status %08x\n", status); - status = GdipCombineRegionRect(region, &test_rect3F, CombineModeComplement); - ok(status == Ok, "status %08x\n", status); - status = GdipGetRegionHRgn(region, NULL, &hrgn); - ok(status == Ok, "status %08x\n", status); - verify_region(hrgn, &test_rect2); - DeleteObject(hrgn); - - status = GdipDeletePath(path); - ok(status == Ok, "status %08x\n", status); - status = GdipDeleteRegion(region); - ok(status == Ok, "status %08x\n", status); - status = GdipDeleteRegion(region2); - ok(status == Ok, "status %08x\n", status); - status = GdipDeleteGraphics(graphics); - ok(status == Ok, "status %08x\n", status); - ReleaseDC(0, hdc); -} - -static void test_isequal(void) -{ - GpRegion *region1, *region2; - GpGraphics *graphics; - GpRectF rectf; - GpStatus status; - HDC hdc = GetDC(0); - BOOL res; - - status = GdipCreateFromHDC(hdc, &graphics); - ok(status == Ok, "status %08x\n", status); - - status = GdipCreateRegion(®ion1); - ok(status == Ok, "status %08x\n", status); - status = GdipCreateRegion(®ion2); - ok(status == Ok, "status %08x\n", status); - - /* NULL */ - status = GdipIsEqualRegion(NULL, NULL, NULL, NULL); - ok(status == InvalidParameter, "status %08x\n", status); - status = GdipIsEqualRegion(region1, region2, NULL, NULL); - ok(status == InvalidParameter, "status %08x\n", status); - status = GdipIsEqualRegion(region1, region2, graphics, NULL); - ok(status == InvalidParameter, "status %08x\n", status); - status = GdipIsEqualRegion(region1, region2, NULL, &res); - ok(status == InvalidParameter, "status %08x\n", status); - - /* infinite regions */ - res = FALSE; - status = GdipIsEqualRegion(region1, region2, graphics, &res); - ok(status == Ok, "status %08x\n", status); - ok(res, "Expected to be equal.\n"); - /* empty regions */ - status = GdipSetEmpty(region1); - ok(status == Ok, "status %08x\n", status); - status = GdipSetEmpty(region2); - ok(status == Ok, "status %08x\n", status); - res = FALSE; - status = GdipIsEqualRegion(region1, region2, graphics, &res); - ok(status == Ok, "status %08x\n", status); - ok(res, "Expected to be equal.\n"); - /* empty & infinite */ - status = GdipSetInfinite(region1); - ok(status == Ok, "status %08x\n", status); - res = TRUE; - status = GdipIsEqualRegion(region1, region2, graphics, &res); - ok(status == Ok, "status %08x\n", status); - ok(!res, "Expected to be unequal.\n"); - /* rect & (inf/empty) */ - rectf.X = rectf.Y = 0.0; - rectf.Width = rectf.Height = 100.0; - status = GdipCombineRegionRect(region1, &rectf, CombineModeReplace); - ok(status == Ok, "status %08x\n", status); - res = TRUE; - status = GdipIsEqualRegion(region1, region2, graphics, &res); - ok(status == Ok, "status %08x\n", status); - ok(!res, "Expected to be unequal.\n"); - status = GdipSetInfinite(region2); - ok(status == Ok, "status %08x\n", status); - res = TRUE; - status = GdipIsEqualRegion(region1, region2, graphics, &res); - ok(status == Ok, "status %08x\n", status); - ok(!res, "Expected to be unequal.\n"); - /* roughly equal rectangles */ - rectf.X = rectf.Y = 0.0; - rectf.Width = rectf.Height = 100.001; - status = GdipCombineRegionRect(region2, &rectf, CombineModeReplace); - ok(status == Ok, "status %08x\n", status); - res = FALSE; - status = GdipIsEqualRegion(region1, region2, graphics, &res); - ok(status == Ok, "status %08x\n", status); - ok(res, "Expected to be equal.\n"); - /* equal rectangles */ - rectf.X = rectf.Y = 0.0; - rectf.Width = rectf.Height = 100.0; - status = GdipCombineRegionRect(region2, &rectf, CombineModeReplace); - ok(status == Ok, "status %08x\n", status); - res = FALSE; - status = GdipIsEqualRegion(region1, region2, graphics, &res); - ok(status == Ok, "status %08x\n", status); - ok(res, "Expected to be equal.\n"); - - /* cleanup */ - status = GdipDeleteRegion(region1); - ok(status == Ok, "status %08x\n", status); - status = GdipDeleteRegion(region2); - ok(status == Ok, "status %08x\n", status); - status = GdipDeleteGraphics(graphics); - ok(status == Ok, "status %08x\n", status); - ReleaseDC(0, hdc); -} - -static void test_translate(void) -{ - GpRegion *region, *region2; - GpGraphics *graphics; - GpPath *path; - GpRectF rectf; - GpStatus status; - HDC hdc = GetDC(0); - BOOL res; - - status = GdipCreateFromHDC(hdc, &graphics); - ok(status == Ok, "status %08x\n", status); - - status = GdipCreatePath(FillModeAlternate, &path); - ok(status == Ok, "status %08x\n", status); - - status = GdipCreateRegion(®ion); - ok(status == Ok, "status %08x\n", status); - status = GdipCreateRegion(®ion2); - ok(status == Ok, "status %08x\n", status); - - /* NULL */ - status = GdipTranslateRegion(NULL, 0.0, 0.0); - ok(status == InvalidParameter, "status %08x\n", status); - - /* infinite */ - status = GdipTranslateRegion(region, 10.0, 10.0); - ok(status == Ok, "status %08x\n", status); - /* empty */ - status = GdipSetEmpty(region); - ok(status == Ok, "status %08x\n", status); - status = GdipTranslateRegion(region, 10.0, 10.0); - ok(status == Ok, "status %08x\n", status); - /* rect */ - rectf.X = 10.0; rectf.Y = 0.0; - rectf.Width = rectf.Height = 100.0; - status = GdipCombineRegionRect(region, &rectf, CombineModeReplace); - ok(status == Ok, "status %08x\n", status); - rectf.X = 15.0; rectf.Y = -2.0; - rectf.Width = rectf.Height = 100.0; - status = GdipCombineRegionRect(region2, &rectf, CombineModeReplace); - ok(status == Ok, "status %08x\n", status); - status = GdipTranslateRegion(region, 5.0, -2.0); - ok(status == Ok, "status %08x\n", status); - res = FALSE; - status = GdipIsEqualRegion(region, region2, graphics, &res); - ok(status == Ok, "status %08x\n", status); - ok(res, "Expected to be equal.\n"); - /* path */ - status = GdipAddPathEllipse(path, 0.0, 10.0, 100.0, 150.0); - ok(status == Ok, "status %08x\n", status); - status = GdipCombineRegionPath(region, path, CombineModeReplace); - ok(status == Ok, "status %08x\n", status); - status = GdipResetPath(path); - ok(status == Ok, "status %08x\n", status); - status = GdipAddPathEllipse(path, 10.0, 21.0, 100.0, 150.0); - ok(status == Ok, "status %08x\n", status); - status = GdipCombineRegionPath(region2, path, CombineModeReplace); - ok(status == Ok, "status %08x\n", status); - status = GdipTranslateRegion(region, 10.0, 11.0); - ok(status == Ok, "status %08x\n", status); - res = FALSE; - status = GdipIsEqualRegion(region, region2, graphics, &res); - ok(status == Ok, "status %08x\n", status); - ok(res, "Expected to be equal.\n"); - - status = GdipDeleteRegion(region); - ok(status == Ok, "status %08x\n", status); - status = GdipDeleteRegion(region2); - ok(status == Ok, "status %08x\n", status); - status = GdipDeleteGraphics(graphics); - ok(status == Ok, "status %08x\n", status); - status = GdipDeletePath(path); - ok(status == Ok, "status %08x\n", status); - ReleaseDC(0, hdc); -} - -static void test_getbounds(void) -{ - GpRegion *region; - GpGraphics *graphics; - GpStatus status; - GpRectF rectf; - HDC hdc = GetDC(0); - - status = GdipCreateFromHDC(hdc, &graphics); - ok(status == Ok, "status %08x\n", status); - status = GdipCreateRegion(®ion); - ok(status == Ok, "status %08x\n", status); - - /* NULL */ - status = GdipGetRegionBounds(NULL, NULL, NULL); - ok(status == InvalidParameter, "status %08x\n", status); - status = GdipGetRegionBounds(region, NULL, NULL); - ok(status == InvalidParameter, "status %08x\n", status); - status = GdipGetRegionBounds(region, graphics, NULL); - ok(status == InvalidParameter, "status %08x\n", status); - /* infinite */ - rectf.X = rectf.Y = 0.0; - rectf.Height = rectf.Width = 100.0; - status = GdipGetRegionBounds(region, graphics, &rectf); - ok(status == Ok, "status %08x\n", status); - ok(rectf.X == -(REAL)(1 << 22), "Expected X = %.2f, got %.2f\n", -(REAL)(1 << 22), rectf.X); - ok(rectf.Y == -(REAL)(1 << 22), "Expected Y = %.2f, got %.2f\n", -(REAL)(1 << 22), rectf.Y); - ok(rectf.Width == (REAL)(1 << 23), "Expected width = %.2f, got %.2f\n", (REAL)(1 << 23), rectf.Width); - ok(rectf.Height == (REAL)(1 << 23), "Expected height = %.2f, got %.2f\n",(REAL)(1 << 23), rectf.Height); - /* empty */ - rectf.X = rectf.Y = 0.0; - rectf.Height = rectf.Width = 100.0; - status = GdipSetEmpty(region); - ok(status == Ok, "status %08x\n", status); - status = GdipGetRegionBounds(region, graphics, &rectf); - ok(status == Ok, "status %08x\n", status); - ok(rectf.X == 0.0, "Expected X = 0.0, got %.2f\n", rectf.X); - ok(rectf.Y == 0.0, "Expected Y = 0.0, got %.2f\n", rectf.Y); - ok(rectf.Width == 0.0, "Expected width = 0.0, got %.2f\n", rectf.Width); - ok(rectf.Height == 0.0, "Expected height = 0.0, got %.2f\n", rectf.Height); - /* rect */ - rectf.X = 10.0; rectf.Y = 0.0; - rectf.Width = rectf.Height = 100.0; - status = GdipCombineRegionRect(region, &rectf, CombineModeReplace); - ok(status == Ok, "status %08x\n", status); - rectf.X = rectf.Y = 0.0; - rectf.Height = rectf.Width = 0.0; - status = GdipGetRegionBounds(region, graphics, &rectf); - ok(status == Ok, "status %08x\n", status); - ok(rectf.X == 10.0, "Expected X = 0.0, got %.2f\n", rectf.X); - ok(rectf.Y == 0.0, "Expected Y = 0.0, got %.2f\n", rectf.Y); - ok(rectf.Width == 100.0, "Expected width = 0.0, got %.2f\n", rectf.Width); - ok(rectf.Height == 100.0, "Expected height = 0.0, got %.2f\n", rectf.Height); - - /* the world and page transforms are ignored */ - GdipScaleWorldTransform(graphics, 2.0, 2.0, MatrixOrderPrepend); - GdipSetPageUnit(graphics, UnitInch); - GdipSetPageScale(graphics, 2.0); - status = GdipGetRegionBounds(region, graphics, &rectf); - ok(status == Ok, "status %08x\n", status); - ok(rectf.X == 10.0, "Expected X = 0.0, got %.2f\n", rectf.X); - ok(rectf.Y == 0.0, "Expected Y = 0.0, got %.2f\n", rectf.Y); - ok(rectf.Width == 100.0, "Expected width = 0.0, got %.2f\n", rectf.Width); - - rectf.X = 10.0; rectf.Y = 0.0; - rectf.Width = rectf.Height = 100.0; - status = GdipCombineRegionRect(region, &rectf, CombineModeReplace); - ok(status == Ok, "status %08x\n", status); - rectf.X = rectf.Y = 0.0; - rectf.Height = rectf.Width = 0.0; - status = GdipGetRegionBounds(region, graphics, &rectf); - ok(status == Ok, "status %08x\n", status); - ok(rectf.X == 10.0, "Expected X = 0.0, got %.2f\n", rectf.X); - ok(rectf.Y == 0.0, "Expected Y = 0.0, got %.2f\n", rectf.Y); - ok(rectf.Width == 100.0, "Expected width = 0.0, got %.2f\n", rectf.Width); - ok(rectf.Height == 100.0, "Expected height = 0.0, got %.2f\n", rectf.Height); - - status = GdipDeleteRegion(region); - ok(status == Ok, "status %08x\n", status); - status = GdipDeleteGraphics(graphics); - ok(status == Ok, "status %08x\n", status); - ReleaseDC(0, hdc); -} - -static void test_isvisiblepoint(void) -{ - HDC hdc = GetDC(0); - GpGraphics* graphics; - GpRegion* region; - GpPath* path; - GpRectF rectf; - GpStatus status; - BOOL res; - REAL x, y; - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - - status = GdipCreateRegion(®ion); - expect(Ok, status); - - /* null parameters */ - status = GdipIsVisibleRegionPoint(NULL, 0, 0, graphics, &res); - expect(InvalidParameter, status); - status = GdipIsVisibleRegionPointI(NULL, 0, 0, graphics, &res); - expect(InvalidParameter, status); - - status = GdipIsVisibleRegionPoint(region, 0, 0, NULL, &res); - expect(Ok, status); - status = GdipIsVisibleRegionPointI(region, 0, 0, NULL, &res); - expect(Ok, status); - - status = GdipIsVisibleRegionPoint(region, 0, 0, graphics, NULL); - expect(InvalidParameter, status); - status = GdipIsVisibleRegionPointI(region, 0, 0, graphics, NULL); - expect(InvalidParameter, status); - - /* infinite region */ - status = GdipIsInfiniteRegion(region, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Region should be infinite\n"); - - x = 10; - y = 10; - status = GdipIsVisibleRegionPoint(region, x, y, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%.2f, %.2f) to be visible\n", x, y); - status = GdipIsVisibleRegionPointI(region, (INT)x, (INT)y, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%d, %d) to be visible\n", (INT)x, (INT)y); - - x = -10; - y = -10; - status = GdipIsVisibleRegionPoint(region, x, y, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%.2f, %.2f) to be visible\n", x, y); - status = GdipIsVisibleRegionPointI(region, (INT)x, (INT)y, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%d, %d) to be visible\n", (INT)x, (INT)y); - - /* rectangular region */ - rectf.X = 10; - rectf.Y = 20; - rectf.Width = 30; - rectf.Height = 40; - - status = GdipCombineRegionRect(region, &rectf, CombineModeReplace); - expect(Ok, status); - - x = 0; - y = 0; - status = GdipIsVisibleRegionPoint(region, x, y, graphics, &res); - expect(Ok, status); - ok(res == FALSE, "Expected (%.2f, %.2f) not to be visible\n", x, y); - status = GdipIsVisibleRegionPointI(region, (INT)x, (INT)y, graphics, &res); - expect(Ok, status); - ok(res == FALSE, "Expected (%d, %d) not to be visible\n", (INT)x, (INT)y); - - x = 9; - y = 19; - status = GdipIsVisibleRegionPoint(region, x, y, graphics, &res); - expect(Ok, status); - ok(res == FALSE, "Expected (%.2f, %.2f) to be visible\n", x, y); - - x = 9.25; - y = 19.25; - status = GdipIsVisibleRegionPoint(region, x, y, graphics, &res); - expect(Ok, status); - ok(res == FALSE, "Expected (%.2f, %.2f) to be visible\n", x, y); - - x = 9.5; - y = 19.5; - status = GdipIsVisibleRegionPoint(region, x, y, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%.2f, %.2f) to be visible\n", x, y); - - x = 9.75; - y = 19.75; - status = GdipIsVisibleRegionPoint(region, x, y, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%.2f, %.2f) to be visible\n", x, y); - - x = 10; - y = 20; - status = GdipIsVisibleRegionPoint(region, x, y, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%.2f, %.2f) to be visible\n", x, y); - - x = 25; - y = 40; - status = GdipIsVisibleRegionPoint(region, x, y, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%.2f, %.2f) to be visible\n", x, y); - status = GdipIsVisibleRegionPointI(region, (INT)x, (INT)y, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%d, %d) to be visible\n", (INT)x, (INT)y); - - x = 40; - y = 60; - status = GdipIsVisibleRegionPoint(region, x, y, graphics, &res); - expect(Ok, status); - ok(res == FALSE, "Expected (%.2f, %.2f) not to be visible\n", x, y); - status = GdipIsVisibleRegionPointI(region, (INT)x, (INT)y, graphics, &res); - expect(Ok, status); - ok(res == FALSE, "Expected (%d, %d) not to be visible\n", (INT)x, (INT)y); - - /* translate into the center of the rectangle */ - status = GdipTranslateWorldTransform(graphics, 25, 40, MatrixOrderAppend); - expect(Ok, status); - - /* native ignores the world transform, so treat these as if - * no transform exists */ - x = -20; - y = -30; - status = GdipIsVisibleRegionPoint(region, x, y, graphics, &res); - expect(Ok, status); - ok(res == FALSE, "Expected (%.2f, %.2f) not to be visible\n", x, y); - status = GdipIsVisibleRegionPointI(region, (INT)x, (INT)y, graphics, &res); - expect(Ok, status); - ok(res == FALSE, "Expected (%d, %d) not to be visible\n", (INT)x, (INT)y); - - x = 0; - y = 0; - status = GdipIsVisibleRegionPoint(region, x, y, graphics, &res); - expect(Ok, status); - ok(res == FALSE, "Expected (%.2f, %.2f) not to be visible\n", x, y); - status = GdipIsVisibleRegionPointI(region, (INT)x, (INT)y, graphics, &res); - expect(Ok, status); - ok(res == FALSE, "Expected (%d, %d) not to be visible\n", (INT)x, (INT)y); - - x = 25; - y = 40; - status = GdipIsVisibleRegionPoint(region, x, y, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%.2f, %.2f) to be visible\n", x, y); - status = GdipIsVisibleRegionPointI(region, (INT)x, (INT)y, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%d, %d) to be visible\n", (INT)x, (INT)y); - - /* translate back to origin */ - status = GdipTranslateWorldTransform(graphics, -25, -40, MatrixOrderAppend); - expect(Ok, status); - - /* region from path */ - status = GdipCreatePath(FillModeAlternate, &path); - expect(Ok, status); - - status = GdipAddPathEllipse(path, 10, 20, 30, 40); - expect(Ok, status); - - status = GdipCombineRegionPath(region, path, CombineModeReplace); - expect(Ok, status); - - x = 11; - y = 21; - status = GdipIsVisibleRegionPoint(region, x, y, graphics, &res); - expect(Ok, status); - ok(res == FALSE, "Expected (%.2f, %.2f) not to be visible\n", x, y); - status = GdipIsVisibleRegionPointI(region, (INT)x, (INT)y, graphics, &res); - expect(Ok, status); - ok(res == FALSE, "Expected (%d, %d) not to be visible\n", (INT)x, (INT)y); - - x = 25; - y = 40; - status = GdipIsVisibleRegionPoint(region, x, y, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%.2f, %.2f) to be visible\n", x, y); - status = GdipIsVisibleRegionPointI(region, (INT)x, (INT)y, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%d, %d) to be visible\n", (INT)x, (INT)y); - - x = 40; - y = 60; - status = GdipIsVisibleRegionPoint(region, x, y, graphics, &res); - expect(Ok, status); - ok(res == FALSE, "Expected (%.2f, %.2f) not to be visible\n", x, y); - status = GdipIsVisibleRegionPointI(region, (INT)x, (INT)y, graphics, &res); - expect(Ok, status); - ok(res == FALSE, "Expected (%d, %d) not to be visible\n", (INT)x, (INT)y); - - GdipDeletePath(path); - - GdipDeleteRegion(region); - GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); -} - -static void test_isvisiblerect(void) -{ - HDC hdc = GetDC(0); - GpGraphics* graphics; - GpRegion* region; - GpPath* path; - GpRectF rectf; - GpStatus status; - BOOL res; - REAL x, y, w, h; - - status = GdipCreateFromHDC(hdc, &graphics); - expect(Ok, status); - - status = GdipCreateRegion(®ion); - expect(Ok, status); - - /* null parameters */ - status = GdipIsVisibleRegionRect(NULL, 0, 0, 0, 0, graphics, &res); - expect(InvalidParameter, status); - status = GdipIsVisibleRegionRectI(NULL, 0, 0, 0, 0, graphics, &res); - expect(InvalidParameter, status); - - status = GdipIsVisibleRegionRect(region, 0, 0, 0, 0, NULL, &res); - expect(Ok, status); - status = GdipIsVisibleRegionRectI(region, 0, 0, 0, 0, NULL, &res); - expect(Ok, status); - - status = GdipIsVisibleRegionRect(region, 0, 0, 0, 0, graphics, NULL); - expect(InvalidParameter, status); - status = GdipIsVisibleRegionRectI(region, 0, 0, 0, 0, graphics, NULL); - expect(InvalidParameter, status); - - /* infinite region */ - status = GdipIsInfiniteRegion(region, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Region should be infinite\n"); - - x = 10; w = 10; - y = 10; h = 10; - status = GdipIsVisibleRegionRect(region, x, y, w, h, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%.2f, %.2f, %.2f, %.2f) to be visible\n", x, y, w, h); - - x = -10; w = 5; - y = -10; h = 5; - status = GdipIsVisibleRegionRect(region, x, y, w, h, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%.2f, %.2f, %.2f, %.2f) to be visible\n", x, y, w, h); - - /* rectangular region */ - rectf.X = 10; - rectf.Y = 20; - rectf.Width = 30; - rectf.Height = 40; - - status = GdipCombineRegionRect(region, &rectf, CombineModeIntersect); - expect(Ok, status); - - /* entirely within the region */ - x = 11; w = 10; - y = 12; h = 10; - status = GdipIsVisibleRegionRect(region, x, y, w, h, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%.2f, %.2f, %.2f, %.2f) to be visible\n", x, y, w, h); - status = GdipIsVisibleRegionRectI(region, (INT)x, (INT)y, (INT)w, (INT)h, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%d, %d, %d, %d) to be visible\n", (INT)x, (INT)y, (INT)w, (INT)h); - - /* entirely outside of the region */ - x = 0; w = 5; - y = 0; h = 5; - status = GdipIsVisibleRegionRect(region, x, y, w, h, graphics, &res); - expect(Ok, status); - ok(res == FALSE, "Expected (%.2f, %.2f, %.2f, %.2f) not to be visible\n", x, y, w, h); - status = GdipIsVisibleRegionRectI(region, (INT)x, (INT)y, (INT)w, (INT)h, graphics, &res); - expect(Ok, status); - ok(res == FALSE, "Expected (%d, %d, %d, %d) not to be visible\n", (INT)x, (INT)y, (INT)w, (INT)h); - - /* corner cases */ - x = 0; w = 10; - y = 0; h = 20; - status = GdipIsVisibleRegionRect(region, x, y, w, h, graphics, &res); - expect(Ok, status); - ok(res == FALSE, "Expected (%.2f, %.2f, %.2f, %.2f) not to be visible\n", x, y, w, h); - - x = 0; w = 10.25; - y = 0; h = 20.25; - status = GdipIsVisibleRegionRect(region, x, y, w, h, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%.2f, %.2f, %.2f, %.2f) to be visible\n", x, y, w, h); - - x = 39; w = 10; - y = 59; h = 10; - status = GdipIsVisibleRegionRect(region, x, y, w, h, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%.2f, %.2f, %.2f, %.2f) to be visible\n", x, y, w, h); - - x = 39.25; w = 10; - y = 59.25; h = 10; - status = GdipIsVisibleRegionRect(region, x, y, w, h, graphics, &res); - expect(Ok, status); - ok(res == FALSE, "Expected (%.2f, %.2f, %.2f, %.2f) not to be visible\n", x, y, w, h); - - /* corners outside, but some intersection */ - x = 0; w = 100; - y = 0; h = 100; - status = GdipIsVisibleRegionRect(region, x, y, w, h, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%.2f, %.2f, %.2f, %.2f) to be visible\n", x, y, w, h); - - x = 0; w = 100; - y = 0; h = 40; - status = GdipIsVisibleRegionRect(region, x, y, w, h, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%.2f, %.2f, %.2f, %.2f) to be visible\n", x, y, w, h); - - x = 0; w = 25; - y = 0; h = 100; - status = GdipIsVisibleRegionRect(region, x, y, w, h, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%.2f, %.2f, %.2f, %.2f) to be visible\n", x, y, w, h); - - /* translate into the center of the rectangle */ - status = GdipTranslateWorldTransform(graphics, 25, 40, MatrixOrderAppend); - expect(Ok, status); - - /* native ignores the world transform, so treat these as if - * no transform exists */ - x = 0; w = 5; - y = 0; h = 5; - status = GdipIsVisibleRegionRect(region, x, y, w, h, graphics, &res); - expect(Ok, status); - ok(res == FALSE, "Expected (%.2f, %.2f, %.2f, %.2f) not to be visible\n", x, y, w, h); - status = GdipIsVisibleRegionRectI(region, (INT)x, (INT)y, (INT)w, (INT)h, graphics, &res); - expect(Ok, status); - ok(res == FALSE, "Expected (%d, %d, %d, %d) not to be visible\n", (INT)x, (INT)y, (INT)w, (INT)h); - - x = 11; w = 10; - y = 12; h = 10; - status = GdipIsVisibleRegionRect(region, x, y, w, h, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%.2f, %.2f, %.2f, %.2f) to be visible\n", x, y, w, h); - status = GdipIsVisibleRegionRectI(region, (INT)x, (INT)y, (INT)w, (INT)h, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%d, %d, %d, %d) to be visible\n", (INT)x, (INT)y, (INT)w, (INT)h); - - /* translate back to origin */ - status = GdipTranslateWorldTransform(graphics, -25, -40, MatrixOrderAppend); - expect(Ok, status); - - /* region from path */ - status = GdipCreatePath(FillModeAlternate, &path); - expect(Ok, status); - - status = GdipAddPathEllipse(path, 10, 20, 30, 40); - expect(Ok, status); - - status = GdipCombineRegionPath(region, path, CombineModeReplace); - expect(Ok, status); - - x = 0; w = 12; - y = 0; h = 22; - status = GdipIsVisibleRegionRect(region, x, y, w, h, graphics, &res); - expect(Ok, status); - ok(res == FALSE, "Expected (%.2f, %.2f, %.2f, %.2f) not to be visible\n", x, y, w, h); - status = GdipIsVisibleRegionRectI(region, (INT)x, (INT)y, (INT)w, (INT)h, graphics, &res); - expect(Ok, status); - ok(res == FALSE, "Expected (%d, %d, %d, %d) not to be visible\n", (INT)x, (INT)y, (INT)w, (INT)h); - - x = 0; w = 25; - y = 0; h = 40; - status = GdipIsVisibleRegionRect(region, x, y, w, h, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%.2f, %.2f, %.2f, %.2f) to be visible\n", x, y, w, h); - status = GdipIsVisibleRegionRectI(region, (INT)x, (INT)y, (INT)w, (INT)h, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%d, %d, %d, %d) to be visible\n", (INT)x, (INT)y, (INT)w, (INT)h); - - x = 38; w = 10; - y = 55; h = 10; - status = GdipIsVisibleRegionRect(region, x, y, w, h, graphics, &res); - expect(Ok, status); - ok(res == FALSE, "Expected (%.2f, %.2f, %.2f, %.2f) not to be visible\n", x, y, w, h); - status = GdipIsVisibleRegionRectI(region, (INT)x, (INT)y, (INT)w, (INT)h, graphics, &res); - expect(Ok, status); - ok(res == FALSE, "Expected (%d, %d, %d, %d) not to be visible\n", (INT)x, (INT)y, (INT)w, (INT)h); - - x = 0; w = 100; - y = 0; h = 100; - status = GdipIsVisibleRegionRect(region, x, y, w, h, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%.2f, %.2f, %.2f, %.2f) to be visible\n", x, y, w, h); - status = GdipIsVisibleRegionRectI(region, (INT)x, (INT)y, (INT)w, (INT)h, graphics, &res); - expect(Ok, status); - ok(res == TRUE, "Expected (%d, %d, %d, %d) to be visible\n", (INT)x, (INT)y, (INT)w, (INT)h); - - GdipDeletePath(path); - - GdipDeleteRegion(region); - GdipDeleteGraphics(graphics); - ReleaseDC(0, hdc); -} - -START_TEST(region) -{ - struct GdiplusStartupInput gdiplusStartupInput; - ULONG_PTR gdiplusToken; - - gdiplusStartupInput.GdiplusVersion = 1; - gdiplusStartupInput.DebugEventCallback = NULL; - gdiplusStartupInput.SuppressBackgroundThread = 0; - gdiplusStartupInput.SuppressExternalCodecs = 0; - - GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); - - test_getregiondata(); - test_isinfinite(); - test_isempty(); - test_combinereplace(); - test_fromhrgn(); - test_gethrgn(); - test_isequal(); - test_translate(); - test_getbounds(); - test_isvisiblepoint(); - test_isvisiblerect(); - - GdiplusShutdown(gdiplusToken); -} diff --git a/rostests/winetests/gdiplus/stringformat.c b/rostests/winetests/gdiplus/stringformat.c deleted file mode 100644 index 117e57bd243..00000000000 --- a/rostests/winetests/gdiplus/stringformat.c +++ /dev/null @@ -1,410 +0,0 @@ -/* - * Unit test suite for string format - * - * Copyright (C) 2007 Google (Evan Stade) - * - * 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 "windows.h" -#include "gdiplus.h" -#include "wine/test.h" - -#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) -#define expectf(expected, got) ok(got == expected, "Expected %.2f, got %.2f\n", expected, got) - -static void test_constructor(void) -{ - GpStringFormat *format; - GpStatus stat; - INT n, count; - StringAlignment align, valign; - StringTrimming trimming; - StringDigitSubstitute digitsub; - LANGID digitlang; - - stat = GdipCreateStringFormat(0, LANG_NEUTRAL, &format); - expect(Ok, stat); - - GdipGetStringFormatAlign(format, &align); - GdipGetStringFormatLineAlign(format, &valign); - GdipGetStringFormatHotkeyPrefix(format, &n); - GdipGetStringFormatTrimming(format, &trimming); - GdipGetStringFormatDigitSubstitution(format, &digitlang, &digitsub); - GdipGetStringFormatMeasurableCharacterRangeCount(format, &count); - - expect(HotkeyPrefixNone, n); - expect(StringAlignmentNear, align); - expect(StringAlignmentNear, align); - expect(StringTrimmingCharacter, trimming); - expect(StringDigitSubstituteUser, digitsub); - expect(LANG_NEUTRAL, digitlang); - expect(0, count); - - stat = GdipDeleteStringFormat(format); - expect(Ok, stat); -} - -static void test_characterrange(void) -{ - CharacterRange ranges[3]; - INT count; - GpStringFormat* format; - GpStatus stat; - - stat = GdipCreateStringFormat(0, LANG_NEUTRAL, &format); - expect(Ok, stat); - stat = GdipSetStringFormatMeasurableCharacterRanges(NULL, 3, ranges); - expect(InvalidParameter, stat); - stat = GdipSetStringFormatMeasurableCharacterRanges(format, 0, ranges); - expect(Ok, stat); - stat = GdipSetStringFormatMeasurableCharacterRanges(format, 3, NULL); - expect(InvalidParameter, stat); - - stat = GdipSetStringFormatMeasurableCharacterRanges(format, 3, ranges); - expect(Ok, stat); - stat = GdipGetStringFormatMeasurableCharacterRangeCount(format, &count); - expect(Ok, stat); - if (stat == Ok) expect(3, count); - - stat= GdipDeleteStringFormat(format); - expect(Ok, stat); -} - -static void test_digitsubstitution(void) -{ - GpStringFormat *format; - GpStatus stat; - StringDigitSubstitute digitsub; - LANGID digitlang; - - stat = GdipCreateStringFormat(0, LANG_RUSSIAN, &format); - expect(Ok, stat); - - /* NULL arguments */ - stat = GdipGetStringFormatDigitSubstitution(NULL, NULL, NULL); - expect(InvalidParameter, stat); - stat = GdipGetStringFormatDigitSubstitution(format, NULL, NULL); - expect(Ok, stat); - stat = GdipGetStringFormatDigitSubstitution(NULL, &digitlang, NULL); - expect(InvalidParameter, stat); - stat = GdipGetStringFormatDigitSubstitution(NULL, NULL, &digitsub); - expect(InvalidParameter, stat); - stat = GdipGetStringFormatDigitSubstitution(NULL, &digitlang, &digitsub); - expect(InvalidParameter, stat); - stat = GdipSetStringFormatDigitSubstitution(NULL, LANG_NEUTRAL, StringDigitSubstituteNone); - expect(InvalidParameter, stat); - - /* try to get both and one by one */ - stat = GdipGetStringFormatDigitSubstitution(format, &digitlang, &digitsub); - expect(Ok, stat); - expect(StringDigitSubstituteUser, digitsub); - expect(LANG_NEUTRAL, digitlang); - - digitsub = StringDigitSubstituteNone; - stat = GdipGetStringFormatDigitSubstitution(format, NULL, &digitsub); - expect(Ok, stat); - expect(StringDigitSubstituteUser, digitsub); - - digitlang = LANG_RUSSIAN; - stat = GdipGetStringFormatDigitSubstitution(format, &digitlang, NULL); - expect(Ok, stat); - expect(LANG_NEUTRAL, digitlang); - - /* set/get */ - stat = GdipSetStringFormatDigitSubstitution(format, MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL), - StringDigitSubstituteUser); - expect(Ok, stat); - digitsub = StringDigitSubstituteNone; - digitlang = LANG_RUSSIAN; - stat = GdipGetStringFormatDigitSubstitution(format, &digitlang, &digitsub); - expect(Ok, stat); - expect(StringDigitSubstituteUser, digitsub); - expect(MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL), digitlang); - - stat = GdipDeleteStringFormat(format); - expect(Ok, stat); -} - -static void test_getgenerictypographic(void) -{ - GpStringFormat *format; - GpStatus stat; - INT flags; - INT n; - StringAlignment align, valign; - StringTrimming trimming; - StringDigitSubstitute digitsub; - LANGID digitlang; - INT tabcount; - - /* NULL arg */ - stat = GdipStringFormatGetGenericTypographic(NULL); - expect(InvalidParameter, stat); - - stat = GdipStringFormatGetGenericTypographic(&format); - expect(Ok, stat); - - GdipGetStringFormatFlags(format, &flags); - GdipGetStringFormatAlign(format, &align); - GdipGetStringFormatLineAlign(format, &valign); - GdipGetStringFormatHotkeyPrefix(format, &n); - GdipGetStringFormatTrimming(format, &trimming); - GdipGetStringFormatDigitSubstitution(format, &digitlang, &digitsub); - GdipGetStringFormatTabStopCount(format, &tabcount); - - expect((StringFormatFlagsNoFitBlackBox |StringFormatFlagsLineLimit | StringFormatFlagsNoClip), - flags); - expect(HotkeyPrefixNone, n); - expect(StringAlignmentNear, align); - expect(StringAlignmentNear, align); - expect(StringTrimmingNone, trimming); - expect(StringDigitSubstituteUser, digitsub); - expect(LANG_NEUTRAL, digitlang); - expect(0, tabcount); - - stat = GdipDeleteStringFormat(format); - expect(Ok, stat); -} - -static REAL tabstops[] = {0.0, 10.0, 2.0}; -static void test_tabstops(void) -{ - GpStringFormat *format; - GpStatus stat; - INT count; - REAL tabs[3]; - REAL firsttab; - - stat = GdipCreateStringFormat(0, LANG_NEUTRAL, &format); - expect(Ok, stat); - - /* NULL */ - stat = GdipGetStringFormatTabStopCount(NULL, NULL); - expect(InvalidParameter, stat); - stat = GdipGetStringFormatTabStopCount(NULL, &count); - expect(InvalidParameter, stat); - stat = GdipGetStringFormatTabStopCount(format, NULL); - expect(InvalidParameter, stat); - - stat = GdipSetStringFormatTabStops(NULL, 0.0, 0, NULL); - expect(InvalidParameter, stat); - stat = GdipSetStringFormatTabStops(format, 0.0, 0, NULL); - expect(InvalidParameter, stat); - stat = GdipSetStringFormatTabStops(NULL, 0.0, 0, tabstops); - expect(InvalidParameter, stat); - - stat = GdipGetStringFormatTabStops(NULL, 0, NULL, NULL); - expect(InvalidParameter, stat); - stat = GdipGetStringFormatTabStops(format, 0, NULL, NULL); - expect(InvalidParameter, stat); - stat = GdipGetStringFormatTabStops(NULL, 0, &firsttab, NULL); - expect(InvalidParameter, stat); - stat = GdipGetStringFormatTabStops(NULL, 0, NULL, tabs); - expect(InvalidParameter, stat); - stat = GdipGetStringFormatTabStops(format, 0, &firsttab, NULL); - expect(InvalidParameter, stat); - stat = GdipGetStringFormatTabStops(format, 0, NULL, tabs); - expect(InvalidParameter, stat); - - /* not NULL */ - stat = GdipGetStringFormatTabStopCount(format, &count); - expect(Ok, stat); - expect(0, count); - /* negative tabcount */ - stat = GdipSetStringFormatTabStops(format, 0.0, -1, tabstops); - expect(Ok, stat); - count = -1; - stat = GdipGetStringFormatTabStopCount(format, &count); - expect(Ok, stat); - expect(0, count); - - stat = GdipSetStringFormatTabStops(format, -10.0, 0, tabstops); - expect(Ok, stat); - stat = GdipSetStringFormatTabStops(format, -10.0, 1, tabstops); - expect(NotImplemented, stat); - - firsttab = -1.0; - tabs[0] = tabs[1] = tabs[2] = -1.0; - stat = GdipGetStringFormatTabStops(format, 0, &firsttab, tabs); - expect(Ok, stat); - expectf(-1.0, tabs[0]); - expectf(-1.0, tabs[1]); - expectf(-1.0, tabs[2]); - expectf(0.0, firsttab); - - stat = GdipSetStringFormatTabStops(format, +0.0, 3, tabstops); - expect(Ok, stat); - count = 0; - stat = GdipGetStringFormatTabStopCount(format, &count); - expect(Ok, stat); - expect(3, count); - - firsttab = -1.0; - tabs[0] = tabs[1] = tabs[2] = -1.0; - stat = GdipGetStringFormatTabStops(format, 3, &firsttab, tabs); - expect(Ok, stat); - expectf(0.0, tabs[0]); - expectf(10.0, tabs[1]); - expectf(2.0, tabs[2]); - expectf(0.0, firsttab); - - stat = GdipSetStringFormatTabStops(format, 10.0, 3, tabstops); - expect(Ok, stat); - firsttab = -1.0; - tabs[0] = tabs[1] = tabs[2] = -1.0; - stat = GdipGetStringFormatTabStops(format, 0, &firsttab, tabs); - expect(Ok, stat); - expectf(-1.0, tabs[0]); - expectf(-1.0, tabs[1]); - expectf(-1.0, tabs[2]); - expectf(10.0, firsttab); - - /* zero tabcount, after valid setting to 3 */ - stat = GdipSetStringFormatTabStops(format, 0.0, 0, tabstops); - expect(Ok, stat); - count = 0; - stat = GdipGetStringFormatTabStopCount(format, &count); - expect(Ok, stat); - expect(3, count); - - stat = GdipDeleteStringFormat(format); - expect(Ok, stat); -} - -static void test_getgenericdefault(void) -{ - GpStringFormat *format; - GpStatus stat; - - INT flags; - INT n; - StringAlignment align, valign; - StringTrimming trimming; - StringDigitSubstitute digitsub; - LANGID digitlang; - INT tabcount; - - /* NULL arg */ - stat = GdipStringFormatGetGenericDefault(NULL); - expect(InvalidParameter, stat); - - stat = GdipStringFormatGetGenericDefault(&format); - expect(Ok, stat); - - GdipGetStringFormatFlags(format, &flags); - GdipGetStringFormatAlign(format, &align); - GdipGetStringFormatLineAlign(format, &valign); - GdipGetStringFormatHotkeyPrefix(format, &n); - GdipGetStringFormatTrimming(format, &trimming); - GdipGetStringFormatDigitSubstitution(format, &digitlang, &digitsub); - GdipGetStringFormatTabStopCount(format, &tabcount); - - expect(0, flags); - expect(HotkeyPrefixNone, n); - expect(StringAlignmentNear, align); - expect(StringAlignmentNear, align); - expect(StringTrimmingCharacter, trimming); - expect(StringDigitSubstituteUser, digitsub); - expect(LANG_NEUTRAL, digitlang); - expect(0, tabcount); - - stat = GdipDeleteStringFormat(format); - expect(Ok, stat); -} - -static void test_stringformatflags(void) -{ - GpStringFormat *format; - GpStatus stat; - - INT flags; - - stat = GdipCreateStringFormat(0, LANG_NEUTRAL, &format); - expect(Ok, stat); - - /* NULL args */ - stat = GdipSetStringFormatFlags(NULL, 0); - expect(InvalidParameter, stat); - - stat = GdipSetStringFormatFlags(format, 0); - expect(Ok, stat); - stat = GdipGetStringFormatFlags(format, &flags); - expect(Ok, stat); - expect(0, flags); - - /* Check some valid flags */ - stat = GdipSetStringFormatFlags(format, StringFormatFlagsDirectionRightToLeft); - expect(Ok, stat); - stat = GdipGetStringFormatFlags(format, &flags); - expect(Ok, stat); - expect(StringFormatFlagsDirectionRightToLeft, flags); - - stat = GdipSetStringFormatFlags(format, StringFormatFlagsNoFontFallback); - expect(Ok, stat); - stat = GdipGetStringFormatFlags(format, &flags); - expect(Ok, stat); - expect(StringFormatFlagsNoFontFallback, flags); - - /* Check some flag combinations */ - stat = GdipSetStringFormatFlags(format, StringFormatFlagsDirectionVertical - | StringFormatFlagsNoFitBlackBox); - expect(Ok, stat); - stat = GdipGetStringFormatFlags(format, &flags); - expect(Ok, stat); - expect((StringFormatFlagsDirectionVertical - | StringFormatFlagsNoFitBlackBox), flags); - - stat = GdipSetStringFormatFlags(format, StringFormatFlagsDisplayFormatControl - | StringFormatFlagsMeasureTrailingSpaces); - expect(Ok, stat); - stat = GdipGetStringFormatFlags(format, &flags); - expect(Ok, stat); - expect((StringFormatFlagsDisplayFormatControl - | StringFormatFlagsMeasureTrailingSpaces), flags); - - /* Check invalid flags */ - stat = GdipSetStringFormatFlags(format, 0xdeadbeef); - expect(Ok, stat); - stat = GdipGetStringFormatFlags(format, &flags); - expect(Ok, stat); - expect(0xdeadbeef, flags); - - stat = GdipDeleteStringFormat(format); - expect(Ok, stat); -} - -START_TEST(stringformat) -{ - struct GdiplusStartupInput gdiplusStartupInput; - ULONG_PTR gdiplusToken; - - gdiplusStartupInput.GdiplusVersion = 1; - gdiplusStartupInput.DebugEventCallback = NULL; - gdiplusStartupInput.SuppressBackgroundThread = 0; - gdiplusStartupInput.SuppressExternalCodecs = 0; - - GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); - - test_constructor(); - test_characterrange(); - test_digitsubstitution(); - test_getgenerictypographic(); - test_tabstops(); - test_getgenericdefault(); - test_stringformatflags(); - - GdiplusShutdown(gdiplusToken); -} diff --git a/rostests/winetests/gdiplus/testlist.c b/rostests/winetests/gdiplus/testlist.c deleted file mode 100644 index 05456c6b9f7..00000000000 --- a/rostests/winetests/gdiplus/testlist.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_brush(void); -extern void func_customlinecap(void); -extern void func_font(void); -extern void func_graphics(void); -extern void func_graphicspath(void); -extern void func_image(void); -extern void func_matrix(void); -extern void func_pathiterator(void); -extern void func_pen(void); -extern void func_region(void); -extern void func_stringformat(void); - -const struct test winetest_testlist[] = -{ - { "brush", func_brush }, - { "customlinecap", func_customlinecap }, - { "font", func_font }, - { "graphics", func_graphics }, - { "graphicspath", func_graphicspath }, - { "image", func_image }, - { "matrix", func_matrix }, - { "pathiterator", func_pathiterator }, - { "pen", func_pen }, - { "region", func_region }, - { "stringformat", func_stringformat }, - { 0, 0 } -}; diff --git a/rostests/winetests/hlink/CMakeLists.txt b/rostests/winetests/hlink/CMakeLists.txt deleted file mode 100644 index 620e7494c8b..00000000000 --- a/rostests/winetests/hlink/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - browse_ctx.c - hlink.c - testlist.c) - -add_executable(hlink_winetest ${SOURCE}) -target_link_libraries(hlink_winetest wine uuid) -set_module_type(hlink_winetest win32cui) -add_importlibs(hlink_winetest hlink ole32 msvcrt kernel32 ntdll) -add_cd_file(TARGET hlink_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/hlink/browse_ctx.c b/rostests/winetests/hlink/browse_ctx.c deleted file mode 100644 index e25333d849c..00000000000 --- a/rostests/winetests/hlink/browse_ctx.c +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright 2009 Andrew Eikum 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 - */ - -#define COBJMACROS - -#include - -#include - -#include "wine/test.h" - -/* Win9x and WinMe don't have lstrcmpW */ -static int strcmp_ww(const WCHAR *str1, const WCHAR *str2) -{ - DWORD len1 = lstrlenW(str1); - DWORD len2 = lstrlenW(str2); - - if (len1 != len2) return 1; - return memcmp(str1, str2, len1 * sizeof(WCHAR)); -} - -static void test_SetInitialHlink(void) -{ - IHlinkBrowseContext *bc; - IHlink *found_hlink; - IMoniker *dummy, *found_moniker; - IBindCtx *bindctx; - WCHAR one[] = {'1',0}; - WCHAR five[] = {'5',0}; - WCHAR *found_name, *exp_name; - HRESULT hres; - - hres = CreateBindCtx(0, &bindctx); - ok(hres == S_OK, "CreateBindCtx failed: 0x%08x\n", hres); - - hres = CreateItemMoniker(one, five, &dummy); - ok(hres == S_OK, "CreateItemMoniker failed: 0x%08x\n", hres); - - hres = IMoniker_GetDisplayName(dummy, bindctx, NULL, &exp_name); - ok(hres == S_OK, "GetDisplayName failed: 0x%08x\n", hres); - - hres = HlinkCreateBrowseContext(NULL, &IID_IHlinkBrowseContext, (void**)&bc); - ok(hres == S_OK, "HlinkCreateBrowseContext failed: 0x%08x\n", hres); - - hres = IHlinkBrowseContext_SetInitialHlink(bc, dummy, one, NULL); - ok(hres == S_OK, "SetInitialHlink failed: 0x%08x\n", hres); - - hres = IHlinkBrowseContext_GetHlink(bc, HLID_CURRENT, &found_hlink); - ok(hres == S_OK, "GetHlink failed: 0x%08x\n", hres); - - hres = IHlink_GetMonikerReference(found_hlink, HLINKGETREF_DEFAULT, &found_moniker, NULL); - ok(hres == S_OK, "GetMonikerReference failed: 0x%08x\n", hres); - - hres = IMoniker_GetDisplayName(found_moniker, bindctx, NULL, &found_name); - ok(hres == S_OK, "GetDisplayName failed: 0x%08x\n", hres); - ok(!strcmp_ww(found_name, exp_name), "Found display name should have been %s, was: %s\n", wine_dbgstr_w(exp_name), wine_dbgstr_w(found_name)); - - CoTaskMemFree(exp_name); - CoTaskMemFree(found_name); - - IBindCtx_Release(bindctx); - IMoniker_Release(found_moniker); - IHlink_Release(found_hlink); - IHlinkBrowseContext_Release(bc); - IMoniker_Release(dummy); -} - -static void test_BrowseWindowInfo(void) -{ - IHlinkBrowseContext *bc; - HLBWINFO bwinfo_set, bwinfo_get; - HRESULT hres; - - hres = HlinkCreateBrowseContext(NULL, &IID_IHlinkBrowseContext, (void**)&bc); - ok(hres == S_OK, "HlinkCreateBrowseContext failed: 0x%08x\n", hres); - - hres = IHlinkBrowseContext_GetBrowseWindowInfo(bc, NULL); - ok(hres == E_INVALIDARG, "GetBrowseWindow failed with wrong code: 0x%08x\n", hres); - - hres = IHlinkBrowseContext_SetBrowseWindowInfo(bc, NULL); - ok(hres == E_INVALIDARG, "SetBrowseWindow failed with wrong code: 0x%08x\n", hres); - - memset(&bwinfo_get, -1, sizeof(HLBWINFO)); - - hres = IHlinkBrowseContext_GetBrowseWindowInfo(bc, &bwinfo_get); - ok(hres == S_OK, "GetBrowseWindowInfo failed: 0x%08x\n", hres); - ok(bwinfo_get.cbSize == 0, "Got wrong size: %x\n", bwinfo_get.cbSize); - - bwinfo_set.cbSize = sizeof(HLBWINFO); - bwinfo_set.grfHLBWIF = HLBWIF_WEBTOOLBARHIDDEN; - bwinfo_set.rcFramePos.left = 1; - bwinfo_set.rcFramePos.right = 2; - bwinfo_set.rcFramePos.top = 3; - bwinfo_set.rcFramePos.bottom = 4; - bwinfo_set.rcDocPos.left = 5; - bwinfo_set.rcDocPos.right = 6; - bwinfo_set.rcDocPos.top = 7; - bwinfo_set.rcDocPos.bottom = 8; - bwinfo_set.hltbinfo.uDockType = 4321; - bwinfo_set.hltbinfo.rcTbPos.left = 9; - bwinfo_set.hltbinfo.rcTbPos.right = 10; - bwinfo_set.hltbinfo.rcTbPos.top = 11; - bwinfo_set.hltbinfo.rcTbPos.bottom = 12; - hres = IHlinkBrowseContext_SetBrowseWindowInfo(bc, &bwinfo_set); - ok(hres == S_OK, "SetBrowseWindowInfo failed: 0x%08x\n", hres); - - memset(&bwinfo_get, 0, sizeof(HLBWINFO)); - - hres = IHlinkBrowseContext_GetBrowseWindowInfo(bc, &bwinfo_get); - ok(hres == S_OK, "GetBrowseWindowInfo failed: 0x%08x\n", hres); - ok(!memcmp(&bwinfo_set, &bwinfo_get, sizeof(HLBWINFO)), "Set and Get differ\n"); -} - -START_TEST(browse_ctx) -{ - CoInitialize(NULL); - - test_SetInitialHlink(); - test_BrowseWindowInfo(); - - CoUninitialize(); -} diff --git a/rostests/winetests/hlink/hlink.c b/rostests/winetests/hlink/hlink.c deleted file mode 100644 index cf031f5c9c7..00000000000 --- a/rostests/winetests/hlink/hlink.c +++ /dev/null @@ -1,1462 +0,0 @@ -/* - * Implementation of hyperlinking (hlink.dll) - * - * Copyright 2006 Mike McCormack - * Copyright 2007-2008 Jacek Caban for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * 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 - -#include - -#include -#include -#include - -#include "wine/test.h" - -#define DEFINE_EXPECT(func) \ - static BOOL expect_ ## func = FALSE, called_ ## func = FALSE - -#define SET_EXPECT(func) \ - expect_ ## func = TRUE - -#define CHECK_EXPECT2(func) \ - do { \ - ok(expect_ ##func, "unexpected call " #func "\n"); \ - called_ ## func = TRUE; \ - }while(0) - -#define CHECK_EXPECT(func) \ - do { \ - CHECK_EXPECT2(func); \ - expect_ ## func = FALSE; \ - }while(0) - -#define CHECK_CALLED(func) \ - do { \ - ok(called_ ## func, "expected " #func "\n"); \ - expect_ ## func = called_ ## func = FALSE; \ - }while(0) - -DEFINE_EXPECT(IsSystemMoniker); -DEFINE_EXPECT(BindToStorage); -DEFINE_EXPECT(GetDisplayName); - -static const char *debugstr_guid(REFIID riid) -{ - static char buf[50]; - - sprintf(buf, "{%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]); - - return buf; -} - -static void test_HlinkIsShortcut(void) -{ - UINT i; - HRESULT hres; - - static const WCHAR file0[] = {'f','i','l','e',0}; - static const WCHAR file1[] = {'f','i','l','e','.','u','r','l',0}; - static const WCHAR file2[] = {'f','i','l','e','.','l','n','k',0}; - static const WCHAR file3[] = {'f','i','l','e','.','u','R','l',0}; - static const WCHAR file4[] = {'f','i','l','e','u','r','l',0}; - static const WCHAR file5[] = {'c',':','\\','f','i','l','e','.','u','r','l',0}; - static const WCHAR file6[] = {'c',':','\\','f','i','l','e','.','l','n','k',0}; - static const WCHAR file7[] = {'.','u','r','l',0}; - - static struct { - LPCWSTR file; - HRESULT hres; - } shortcut_test[] = { - {file0, S_FALSE}, - {file1, S_OK}, - {file2, S_FALSE}, - {file3, S_OK}, - {file4, S_FALSE}, - {file5, S_OK}, - {file6, S_FALSE}, - {file7, S_OK}, - {NULL, E_INVALIDARG} - }; - - for(i=0; i= 56) && (i < 80 || i >= 84)))) - { - same = FALSE; - break; - } - } - - if (!same && (expected_data_alt != expected_data)) - { - /* then try the alternate data */ - same = TRUE; - for (i = 0; i < min(data_size, expected_data_alt_size); i++) - { - if ((expected_data_alt[i] != data[i]) && - (((expected_data_alt != expected_hlink_data2) && - (expected_data_alt != expected_hlink_data3)) || - ((i < 52 || i >= 56) && (i < 80 || i >= 84)))) - { - same = FALSE; - break; - } - } - } - - ok(same, "%s: Saved data differs\n", testname); - if (!same) - { - for (i = 0; i < data_size; i++) - { - if (i % 8 == 0) printf(" "); - printf("0x%02x,", data[i]); - if (i % 8 == 7) printf("\n"); - } - printf("\n"); - } - - GlobalUnlock(hglobal); - - IStream_Release(stream); - IPersistStream_Release(ps); -} - -static void test_persist(void) -{ - static const WCHAR url[] = { 'h','t','t','p',':','/','/','w','i','n','e','h','q','.','o','r','g',0 }; - static const WCHAR rel_url[] = { 'i','n','d','e','x','.','h','t','m','l',0 }; - static const WCHAR filename[] = { 'c',':','\\',0 }; - static const WCHAR friendly_name[] = { 'W','i','n','e',' ','H','Q',0 }; - static const WCHAR location[] = { '_','b','l','a','n','k',0 }; - static const WCHAR target_frame_name[] = { 't','g','t','f','r','m',0 }; - HRESULT hr; - IHlink *lnk; - - hr = HlinkCreateFromString(url, NULL, NULL, NULL, - 0, NULL, &IID_IHlink, (LPVOID*) &lnk); - ok(hr == S_OK, "IHlinkCreateFromString failed with error 0x%08x\n", hr); - if (!lnk) { - skip("Can't create lnk, skipping test_persist. Was wineprefixcreate run properly?\n"); - return; - } - test_persist_save_data("url only", lnk, - expected_hlink_data, sizeof(expected_hlink_data), - expected_hlink_data_ie7, sizeof(expected_hlink_data_ie7)); - IHlink_Release(lnk); - - hr = HlinkCreateFromString(url, NULL, friendly_name, NULL, - 0, NULL, &IID_IHlink, (LPVOID*) &lnk); - ok(hr == S_OK, "IHlinCreateFromString failed with error 0x%08x\n", hr); - test_persist_save_data("url + friendly name", lnk, - expected_hlink_data2, sizeof(expected_hlink_data2), - expected_hlink_data2_ie7, sizeof(expected_hlink_data2_ie7)); - IHlink_Release(lnk); - - hr = HlinkCreateFromString(url, location, friendly_name, NULL, - 0, NULL, &IID_IHlink, (LPVOID*) &lnk); - ok(hr == S_OK, "IHlinCreateFromString failed with error 0x%08x\n", hr); - test_persist_save_data("url + friendly_name + location", lnk, - expected_hlink_data3, sizeof(expected_hlink_data3), - expected_hlink_data3_ie7, sizeof(expected_hlink_data3_ie7)); - IHlink_Release(lnk); - - hr = HlinkCreateFromString(rel_url, NULL, NULL, NULL, - 0, NULL, &IID_IHlink, (LPVOID*) &lnk); - ok(hr == S_OK, "IHlinCreateFromString failed with error 0x%08x\n", hr); - test_persist_save_data("relative url", lnk, - expected_hlink_data4, sizeof(expected_hlink_data4), - expected_hlink_data4, sizeof(expected_hlink_data4)); - IHlink_Release(lnk); - - hr = HlinkCreateFromString(url, NULL, NULL, NULL, - 0, NULL, &IID_IHlink, (LPVOID*) &lnk); - ok(hr == S_OK, "IHlinCreateFromString failed with error 0x%08x\n", hr); - hr = IHlink_SetTargetFrameName(lnk, target_frame_name); - ok(hr == S_OK, "IHlink_SetTargetFrameName failed with error 0x%08x\n", hr); - test_persist_save_data("url + target frame name", lnk, - expected_hlink_data5, sizeof(expected_hlink_data5), - expected_hlink_data5_ie7, sizeof(expected_hlink_data5_ie7)); - IHlink_Release(lnk); - - hr = HlinkCreateFromString(filename, NULL, NULL, NULL, - 0, NULL, &IID_IHlink, (LPVOID*) &lnk); - ok(hr == S_OK, "IHlinCreateFromString failed with error 0x%08x\n", hr); - test_persist_save_data("filename", lnk, - expected_hlink_data6, sizeof(expected_hlink_data6), - expected_hlink_data6, sizeof(expected_hlink_data6)); - IHlink_Release(lnk); -} - -static void test_special_reference(void) -{ - LPWSTR ref; - HRESULT hres; - - hres = HlinkGetSpecialReference(HLSR_HOME, &ref); - ok(hres == S_OK, "HlinkGetSpecialReference(HLSR_HOME) failed: %08x\n", hres); - ok(ref != NULL, "ref == NULL\n"); - CoTaskMemFree(ref); - - hres = HlinkGetSpecialReference(HLSR_SEARCHPAGE, &ref); - ok(hres == S_OK, "HlinkGetSpecialReference(HLSR_SEARCHPAGE) failed: %08x\n", hres); - ok(ref != NULL, "ref == NULL\n"); - CoTaskMemFree(ref); - - ref = (void*)0xdeadbeef; - hres = HlinkGetSpecialReference(HLSR_HISTORYFOLDER, &ref); - ok(hres == E_NOTIMPL, "HlinkGetSpecialReference(HLSR_HISTORYFOLDER) failed: %08x\n", hres); - ok(ref == NULL, "ref=%p\n", ref); - - ref = (void*)0xdeadbeef; - hres = HlinkGetSpecialReference(4, &ref); - ok(hres == E_INVALIDARG, "HlinkGetSpecialReference(HLSR_HISTORYFOLDER) failed: %08x\n", hres); - ok(ref == NULL, "ref=%p\n", ref); -} - -static void test_HlinkCreateExtensionServices(void) -{ - IAuthenticate *authenticate; - IHttpNegotiate *http_negotiate; - LPWSTR password, username, headers; - HWND hwnd; - HRESULT hres; - - static const WCHAR usernameW[] = {'u','s','e','r',0}; - static const WCHAR passwordW[] = {'p','a','s','s',0}; - static const WCHAR headersW[] = {'h','e','a','d','e','r','s',0}; - static const WCHAR headersexW[] = {'h','e','a','d','e','r','s','\r','\n',0}; - - hres = HlinkCreateExtensionServices(NULL, NULL, NULL, NULL, - NULL, &IID_IAuthenticate, (void**)&authenticate); - ok(hres == S_OK, "HlinkCreateExtensionServices failed: %08x\n", hres); - ok(authenticate != NULL, "HlinkCreateExtensionServices returned NULL\n"); - - password = username = (void*)0xdeadbeef; - hwnd = (void*)0xdeadbeef; - hres = IAuthenticate_Authenticate(authenticate, &hwnd, &username, &password); - ok(hres == S_OK, "Authenticate failed: %08x\n", hres); - ok(!hwnd, "hwnd != NULL\n"); - ok(!username, "username != NULL\n"); - ok(!password, "password != NULL\n"); - - hres = IAuthenticate_QueryInterface(authenticate, &IID_IHttpNegotiate, (void**)&http_negotiate); - ok(hres == S_OK, "Could not get IHttpNegotiate interface: %08x\n", hres); - - headers = (void*)0xdeadbeef; - hres = IHttpNegotiate_BeginningTransaction(http_negotiate, (void*)0xdeadbeef, (void*)0xdeadbeef, - 0, &headers); - ok(hres == S_OK, "BeginningTransaction failed: %08x\n", hres); - ok(headers == NULL, "headers != NULL\n"); - - hres = IHttpNegotiate_BeginningTransaction(http_negotiate, (void*)0xdeadbeef, (void*)0xdeadbeef, - 0, NULL); - ok(hres == E_INVALIDARG, "BeginningTransaction failed: %08x, expected E_INVALIDARG\n", hres); - - headers = (void*)0xdeadbeef; - hres = IHttpNegotiate_OnResponse(http_negotiate, 200, (void*)0xdeadbeef, (void*)0xdeadbeef, &headers); - ok(hres == S_OK, "OnResponse failed: %08x\n", hres); - ok(headers == NULL, "headers != NULL\n"); - - IHttpNegotiate_Release(http_negotiate); - IAuthenticate_Release(authenticate); - - - hres = HlinkCreateExtensionServices(headersW, (HWND)0xfefefefe, usernameW, passwordW, - NULL, &IID_IAuthenticate, (void**)&authenticate); - ok(hres == S_OK, "HlinkCreateExtensionServices failed: %08x\n", hres); - ok(authenticate != NULL, "HlinkCreateExtensionServices returned NULL\n"); - - password = username = NULL; - hwnd = NULL; - hres = IAuthenticate_Authenticate(authenticate, &hwnd, &username, &password); - ok(hres == S_OK, "Authenticate failed: %08x\n", hres); - ok(hwnd == (HWND)0xfefefefe, "hwnd=%p\n", hwnd); - ok(!lstrcmpW(username, usernameW), "unexpected username\n"); - ok(!lstrcmpW(password, passwordW), "unexpected password\n"); - CoTaskMemFree(username); - CoTaskMemFree(password); - - password = username = (void*)0xdeadbeef; - hwnd = (void*)0xdeadbeef; - hres = IAuthenticate_Authenticate(authenticate, &hwnd, NULL, &password); - ok(hres == E_INVALIDARG, "Authenticate failed: %08x\n", hres); - ok(password == (void*)0xdeadbeef, "password = %p\n", password); - ok(hwnd == (void*)0xdeadbeef, "hwnd = %p\n", hwnd); - - hres = IAuthenticate_QueryInterface(authenticate, &IID_IHttpNegotiate, (void**)&http_negotiate); - ok(hres == S_OK, "Could not get IHttpNegotiate interface: %08x\n", hres); - - headers = (void*)0xdeadbeef; - hres = IHttpNegotiate_BeginningTransaction(http_negotiate, (void*)0xdeadbeef, (void*)0xdeadbeef, - 0, &headers); - ok(hres == S_OK, "BeginningTransaction failed: %08x\n", hres); - ok(!lstrcmpW(headers, headersexW), "unexpected headers %s\n", wine_dbgstr_w(headers)); - CoTaskMemFree(headers); - - headers = (void*)0xdeadbeef; - hres = IHttpNegotiate_OnResponse(http_negotiate, 200, (void*)0xdeadbeef, (void*)0xdeadbeef, &headers); - ok(hres == S_OK, "OnResponse failed: %08x\n", hres); - ok(headers == NULL, "unexpected headers %s\n", wine_dbgstr_w(headers)); - - IHttpNegotiate_Release(http_negotiate); - IAuthenticate_Release(authenticate); -} - -static void test_HlinkParseDisplayName(void) -{ - IMoniker *mon = NULL; - LPWSTR name; - DWORD issys; - ULONG eaten = 0; - IBindCtx *bctx; - HRESULT hres; - - static const WCHAR winehq_urlW[] = - {'h','t','t','p',':','/','/','w','w','w','.','w','i','n','e','h','q','.','o','r','g', - '/','s','i','t','e','/','a','b','o','u','t',0}; - static const WCHAR invalid_urlW[] = {'t','e','s','t',':','1','2','3','a','b','c',0}; - static const WCHAR clsid_nameW[] = {'c','l','s','i','d',':', - '2','0','D','0','4','F','E','0','-','3','A','E','A','-','1','0','6','9','-','A','2','D','8', - '-','0','8','0','0','2','B','3','0','3','0','9','D',':',0}; - - CreateBindCtx(0, &bctx); - - hres = HlinkParseDisplayName(bctx, winehq_urlW, FALSE, &eaten, &mon); - ok(hres == S_OK, "HlinkParseDisplayName failed: %08x\n", hres); - ok(eaten == sizeof(winehq_urlW)/sizeof(WCHAR)-1, "eaten=%d\n", eaten); - ok(mon != NULL, "mon == NULL\n"); - - hres = IMoniker_GetDisplayName(mon, bctx, 0, &name); - ok(hres == S_OK, "GetDiasplayName failed: %08x\n", hres); - ok(!lstrcmpW(name, winehq_urlW), "wrong display name %s\n", wine_dbgstr_w(name)); - CoTaskMemFree(name); - - hres = IMoniker_IsSystemMoniker(mon, &issys); - ok(hres == S_OK, "IsSystemMoniker failed: %08x\n", hres); - ok(issys == MKSYS_URLMONIKER, "issys=%x\n", issys); - - IMoniker_Release(mon); - - hres = HlinkParseDisplayName(bctx, clsid_nameW, FALSE, &eaten, &mon); - ok(hres == S_OK, "HlinkParseDisplayName failed: %08x\n", hres); - ok(eaten == sizeof(clsid_nameW)/sizeof(WCHAR)-1, "eaten=%d\n", eaten); - ok(mon != NULL, "mon == NULL\n"); - - hres = IMoniker_IsSystemMoniker(mon, &issys); - ok(hres == S_OK, "IsSystemMoniker failed: %08x\n", hres); - ok(issys == MKSYS_CLASSMONIKER, "issys=%x\n", issys); - - IMoniker_Release(mon); - - hres = HlinkParseDisplayName(bctx, invalid_urlW, FALSE, &eaten, &mon); - ok(hres == S_OK, "HlinkParseDisplayName failed: %08x\n", hres); - ok(eaten == sizeof(invalid_urlW)/sizeof(WCHAR)-1, "eaten=%d\n", eaten); - ok(mon != NULL, "mon == NULL\n"); - - hres = IMoniker_GetDisplayName(mon, bctx, 0, &name); - ok(hres == S_OK, "GetDiasplayName failed: %08x\n", hres); - ok(!lstrcmpW(name, invalid_urlW), "wrong display name %s\n", wine_dbgstr_w(name)); - CoTaskMemFree(name); - - hres = IMoniker_IsSystemMoniker(mon, &issys); - ok(hres == S_OK, "IsSystemMoniker failed: %08x\n", hres); - ok(issys == MKSYS_FILEMONIKER, "issys=%x\n", issys); - - IMoniker_Release(mon); - IBindCtx_Release(bctx); -} - -static IBindCtx *_bctx; - -static HRESULT WINAPI ServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv) -{ - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI ServiceProvider_AddRef(IServiceProvider *iface) -{ - return 2; -} - -static ULONG WINAPI ServiceProvider_Release(IServiceProvider *iface) -{ - return 1; -} - -static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, - REFGUID guidService, REFIID riid, void **ppv) -{ - ok(0, "unexpected service %s\n", debugstr_guid(guidService)); - return E_NOINTERFACE; -} - -static IServiceProviderVtbl ServiceProviderVtbl = { - ServiceProvider_QueryInterface, - ServiceProvider_AddRef, - ServiceProvider_Release, - ServiceProvider_QueryService -}; - -static IServiceProvider ServiceProvider = { &ServiceProviderVtbl }; - -static HRESULT WINAPI BindStatusCallback_QueryInterface(IBindStatusCallback *iface, REFIID riid, void **ppv) -{ - *ppv = NULL; - - if(IsEqualGUID(riid, &IID_IServiceProvider)) { - *ppv = &ServiceProvider; - return S_OK; - } - - ok(0, "unexpected interface %s\n", debugstr_guid(riid)); - return E_NOINTERFACE; -} - -static ULONG WINAPI BindStatusCallback_AddRef(IBindStatusCallback *iface) -{ - return 2; -} - -static ULONG WINAPI BindStatusCallback_Release(IBindStatusCallback *iface) -{ - return 1; -} - -static HRESULT WINAPI BindStatusCallback_OnStartBinding(IBindStatusCallback *iface, DWORD dwReserved, - IBinding *pib) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI BindStatusCallback_GetPriority(IBindStatusCallback *iface, LONG *pnPriority) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI BindStatusCallback_OnLowResource(IBindStatusCallback *iface, DWORD reserved) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI BindStatusCallback_OnProgress(IBindStatusCallback *iface, ULONG ulProgress, - ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *iface, HRESULT hresult, LPCWSTR szError) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI BindStatusCallback_GetBindInfo(IBindStatusCallback *iface, DWORD *grfBINDF, BINDINFO *pbindinfo) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI BindStatusCallback_OnDataAvailable(IBindStatusCallback *iface, DWORD grfBSCF, - DWORD dwSize, FORMATETC* pformatetc, STGMEDIUM* pstgmed) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI BindStatusCallback_OnObjectAvailable(IBindStatusCallback *iface, REFIID riid, IUnknown *punk) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static IBindStatusCallbackVtbl BindStatusCallbackVtbl = { - BindStatusCallback_QueryInterface, - BindStatusCallback_AddRef, - BindStatusCallback_Release, - BindStatusCallback_OnStartBinding, - BindStatusCallback_GetPriority, - BindStatusCallback_OnLowResource, - BindStatusCallback_OnProgress, - BindStatusCallback_OnStopBinding, - BindStatusCallback_GetBindInfo, - BindStatusCallback_OnDataAvailable, - BindStatusCallback_OnObjectAvailable -}; - -static IBindStatusCallback BindStatusCallback = { &BindStatusCallbackVtbl }; - -static HRESULT WINAPI Moniker_QueryInterface(IMoniker *iface, REFIID riid, void **ppv) -{ - *ppv = NULL; - - ok(0, "unexpected riid: %s\n", debugstr_guid(riid)); - return E_NOINTERFACE; -} - -static ULONG WINAPI Moniker_AddRef(IMoniker *iface) -{ - return 2; -} - -static ULONG WINAPI Moniker_Release(IMoniker *iface) -{ - return 1; -} - -static HRESULT WINAPI Moniker_GetClassID(IMoniker *iface, CLSID *pClassID) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_IsDirty(IMoniker *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_Load(IMoniker *iface, IStream *pStm) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_Save(IMoniker *iface, IStream *pStm, BOOL fClearDirty) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_GetSizeMax(IMoniker *iface, ULARGE_INTEGER *pcbSize) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_BindToObject(IMoniker *iface, IBindCtx *pcb, IMoniker *pmkToLeft, - REFIID riidResult, void **ppvResult) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_BindToStorage(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, - REFIID riid, void **ppv) -{ - IUnknown *unk; - HRESULT hres; - - static OLECHAR BSCBHolder[] = { '_','B','S','C','B','_','H','o','l','d','e','r','_',0 }; - - CHECK_EXPECT(BindToStorage); - - ok(pbc == _bctx, "pbc != _bctx\n"); - ok(pmkToLeft == NULL, "pmkToLeft=%p\n", pmkToLeft); - ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", debugstr_guid(riid)); - ok(ppv != NULL, "ppv == NULL\n"); - ok(*ppv == NULL, "*ppv=%p\n", *ppv); - - hres = IBindCtx_GetObjectParam(pbc, BSCBHolder, &unk); - ok(hres == S_OK, "GetObjectParam failed: %08x\n", hres); - ok(unk != NULL, "unk == NULL\n"); - - IUnknown_Release(unk); - - return S_OK; -} - -static HRESULT WINAPI Moniker_Reduce(IMoniker *iface, IBindCtx *pbc, DWORD dwReduceHowFar, - IMoniker **ppmkToLeft, IMoniker **ppmkReduced) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_ComposeWith(IMoniker *iface, IMoniker *pmkRight, - BOOL fOnlyIfNotGeneric, IMoniker **ppnkComposite) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_Enum(IMoniker *iface, BOOL fForwrd, IEnumMoniker **ppenumMoniker) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_IsEqual(IMoniker *iface, IMoniker *pmkOtherMoniker) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_Hash(IMoniker *iface, DWORD *pdwHash) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_IsRunning(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, - IMoniker *pmkNewlyRunning) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_GetTimeOfLastChange(IMoniker *iface, IBindCtx *pbc, - IMoniker *pmkToLeft, FILETIME *pFileTime) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_Inverse(IMoniker *iface, IMoniker **ppmk) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_CommonPrefixWith(IMoniker *iface, IMoniker *pmkOther, - IMoniker **ppmkPrefix) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_RelativePathTo(IMoniker *iface, IMoniker *pmkOther, - IMoniker **pmkRelPath) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_GetDisplayName(IMoniker *iface, IBindCtx *pbc, - IMoniker *pmkToLeft, LPOLESTR *ppszDisplayName) -{ - static const WCHAR winehq_urlW[] = - {'h','t','t','p',':','/','/','w','w','w','.','w','i','n','e','h','q','.','o','r','g', - '/','s','i','t','e','/','a','b','o','u','t',0}; - - CHECK_EXPECT(GetDisplayName); - - ok(pbc != NULL, "pbc == NULL\n"); - ok(pbc != _bctx, "pbc == _bctx\n"); - ok(pmkToLeft == NULL, "pmkToLeft=%p\n", pmkToLeft); - - *ppszDisplayName = CoTaskMemAlloc(sizeof(winehq_urlW)); - memcpy(*ppszDisplayName, winehq_urlW, sizeof(winehq_urlW)); - return S_OK; -} - -static HRESULT WINAPI Moniker_ParseDisplayName(IMoniker *iface, IBindCtx *pbc, - IMoniker *pmkToLeft, LPOLESTR pszDisplayName, ULONG *pchEaten, IMoniker **ppmkOut) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_IsSystemMoniker(IMoniker *iface, DWORD *pdwMksys) -{ - CHECK_EXPECT2(IsSystemMoniker); - - *pdwMksys = MKSYS_URLMONIKER; - return S_OK; -} - -static IMonikerVtbl MonikerVtbl = { - Moniker_QueryInterface, - Moniker_AddRef, - Moniker_Release, - Moniker_GetClassID, - Moniker_IsDirty, - Moniker_Load, - Moniker_Save, - Moniker_GetSizeMax, - Moniker_BindToObject, - Moniker_BindToStorage, - Moniker_Reduce, - Moniker_ComposeWith, - Moniker_Enum, - Moniker_IsEqual, - Moniker_Hash, - Moniker_IsRunning, - Moniker_GetTimeOfLastChange, - Moniker_Inverse, - Moniker_CommonPrefixWith, - Moniker_RelativePathTo, - Moniker_GetDisplayName, - Moniker_ParseDisplayName, - Moniker_IsSystemMoniker -}; - -static IMoniker Moniker = { &MonikerVtbl }; - -static void test_HlinkResolveMonikerForData(void) -{ - IBindCtx *bctx; - HRESULT hres; - - CreateBindCtx(0, &bctx); - _bctx = bctx; - - SET_EXPECT(IsSystemMoniker); - SET_EXPECT(GetDisplayName); - SET_EXPECT(BindToStorage); - - hres = HlinkResolveMonikerForData(&Moniker, 0, bctx, 0, NULL, &BindStatusCallback, NULL); - ok(hres == S_OK, "HlinkResolveMonikerForData failed: %08x\n", hres); - - CHECK_CALLED(IsSystemMoniker); - CHECK_CALLED(GetDisplayName); - CHECK_CALLED(BindToStorage); - - IBindCtx_Release(bctx); -} - -static void test_HlinkGetSetMonikerReference(void) -{ - IMoniker *found_trgt, *dummy, *dummy2; - IHlink *hlink; - HRESULT hres; - const WCHAR one[] = {'1',0}; - const WCHAR two[] = {'2',0}; - const WCHAR name[] = {'a',0}; - WCHAR *found_loc; - - /* create two dummy monikers to use as targets */ - hres = CreateItemMoniker(one, one, &dummy); - ok(hres == S_OK, "CreateItemMoniker failed: 0x%08x\n", hres); - - hres = CreateItemMoniker(two, two, &dummy2); - ok(hres == S_OK, "CreateItemMoniker failed: 0x%08x\n", hres); - - /* create a new hlink: target => dummy, location => one */ - hres = HlinkCreateFromMoniker(dummy, one, name, NULL, 0, NULL, &IID_IHlink, (void**)&hlink); - ok(hres == S_OK, "HlinkCreateFromMoniker failed: 0x%08x\n", hres); - - /* validate the target and location */ - hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc); - ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08x\n", hres); - ok(found_trgt == dummy, "Found target should've been %p, was: %p\n", dummy, found_trgt); - ok(lstrcmpW(found_loc, one) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(found_loc)); - IMoniker_Release(found_trgt); - CoTaskMemFree(found_loc); - - /* set location => two */ - hres = IHlink_SetMonikerReference(hlink, HLINKSETF_LOCATION, dummy2, two); - ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres); - - hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc); - ok(found_trgt == dummy, "Found target should've been %p, was: %p\n", dummy, found_trgt); - ok(lstrcmpW(found_loc, two) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(two), wine_dbgstr_w(found_loc)); - IMoniker_Release(found_trgt); - CoTaskMemFree(found_loc); - - /* set target => dummy2 */ - hres = IHlink_SetMonikerReference(hlink, HLINKSETF_TARGET, dummy2, one); - ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres); - - hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc); - ok(found_trgt == dummy2, "Found target should've been %p, was: %p\n", dummy2, found_trgt); - ok(lstrcmpW(found_loc, two) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(two), wine_dbgstr_w(found_loc)); - IMoniker_Release(found_trgt); - CoTaskMemFree(found_loc); - - /* set target => dummy, location => one */ - hres = IHlink_SetMonikerReference(hlink, HLINKSETF_TARGET | HLINKSETF_LOCATION, dummy, one); - ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres); - - hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc); - ok(found_trgt == dummy, "Found target should've been %p, was: %p\n", dummy, found_trgt); - ok(lstrcmpW(found_loc, one) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(found_loc)); - IMoniker_Release(found_trgt); - CoTaskMemFree(found_loc); - - /* no HLINKSETF flags */ - hres = IHlink_SetMonikerReference(hlink, 0, dummy2, two); - ok(hres == E_INVALIDARG, "IHlink_SetMonikerReference should've failed with E_INVALIDARG (0x%08x), failed with 0x%08x\n", E_INVALIDARG, hres); - - hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc); - ok(found_trgt == dummy, "Found target should've been %p, was: %p\n", dummy, found_trgt); - ok(lstrcmpW(found_loc, one) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(found_loc)); - IMoniker_Release(found_trgt); - CoTaskMemFree(found_loc); - - /* invalid HLINKSETF flags */ - hres = IHlink_SetMonikerReference(hlink, 12, dummy2, two); - /* Windows returns garbage; on 32-bit it returns the flags probably because the compiler happened to store them in %eax at some point */ - if (0) ok(hres == 12, "IHlink_SetMonikerReference should've failed with 0x%08x, failed with 0x%08x\n", 12, hres); - - hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc); - ok(found_trgt == dummy, "Found target should've been %p, was: %p\n", dummy, found_trgt); - ok(lstrcmpW(found_loc, one) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(found_loc)); - IMoniker_Release(found_trgt); - CoTaskMemFree(found_loc); - - /* valid & invalid HLINKSETF flags */ - hres = IHlink_SetMonikerReference(hlink, 12 | HLINKSETF_TARGET, dummy2, two); - ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres); - - hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc); - ok(found_trgt == dummy2, "Found target should've been %p, was: %p\n", dummy2, found_trgt); - ok(lstrcmpW(found_loc, one) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(found_loc)); - IMoniker_Release(found_trgt); - CoTaskMemFree(found_loc); - - /* NULL args */ - hres = IHlink_SetMonikerReference(hlink, HLINKSETF_TARGET | HLINKSETF_LOCATION, NULL, NULL); - ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres); - - hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc); - ok(found_trgt == NULL, "Found target should've been %p, was: %p\n", NULL, found_trgt); - ok(found_loc == NULL, "Found location should've been %s, was: %s\n", wine_dbgstr_w(NULL), wine_dbgstr_w(found_loc)); - if(found_trgt) - IMoniker_Release(found_trgt); - - IHlink_Release(hlink); - IMoniker_Release(dummy2); - IMoniker_Release(dummy); -} - -static void test_HlinkGetSetStringReference(void) -{ - IHlink *link; - static const WCHAR one[] = {'1',0}; - static const WCHAR two[] = {'2',0}; - static const WCHAR three[] = {'3',0}; - static const WCHAR empty[] = {0}; - WCHAR *fnd_tgt, *fnd_loc; - HRESULT hres; - - /* create a new hlink: target => NULL, location => one */ - hres = HlinkCreateFromMoniker(NULL, one, empty, NULL, 0, NULL, &IID_IHlink, (void**)&link); - ok(hres == S_OK, "HlinkCreateFromMoniker failed: 0x%08x\n", hres); - - /* test setting/getting location */ - hres = IHlink_GetStringReference(link, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc); - ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08x\n", hres); - ok(fnd_tgt == NULL, "Found target should have been NULL, was: %s\n", wine_dbgstr_w(fnd_tgt)); - ok(!lstrcmpW(fnd_loc, one), "Found location should have been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(fnd_loc)); - CoTaskMemFree(fnd_tgt); - CoTaskMemFree(fnd_loc); - - hres = IHlink_SetStringReference(link, HLINKSETF_LOCATION, one, two); - ok(hres == S_OK, "IHlink_SetStringReference failed: 0x%08x\n", hres); - - hres = IHlink_GetStringReference(link, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc); - ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08x\n", hres); - ok(fnd_tgt == NULL, "Found target should have been NULL, was: %s\n", wine_dbgstr_w(fnd_tgt)); - ok(!lstrcmpW(fnd_loc, two), "Found location should have been %s, was: %s\n", wine_dbgstr_w(two), wine_dbgstr_w(fnd_loc)); - CoTaskMemFree(fnd_tgt); - CoTaskMemFree(fnd_loc); - - hres = IHlink_SetStringReference(link, -HLINKSETF_LOCATION, two, one); - ok(hres == S_OK, "IHlink_SetStringReference failed: 0x%08x\n", hres); - - hres = IHlink_GetStringReference(link, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc); - ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08x\n", hres); - ok(fnd_tgt == NULL, "Found target should have been NULL, was: %s\n", wine_dbgstr_w(fnd_tgt)); - ok(!lstrcmpW(fnd_loc, one), "Found location should have been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(fnd_loc)); - CoTaskMemFree(fnd_tgt); - CoTaskMemFree(fnd_loc); - - /* test setting/getting target */ - hres = IHlink_SetStringReference(link, HLINKSETF_TARGET, two, three); - ok(hres == S_OK, "IHlink_SetStringReference failed: 0x%08x\n", hres); - - hres = IHlink_GetStringReference(link, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc); - ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08x\n", hres); - ok(!lstrcmpW(fnd_tgt, two), "Found target should have been %s, was: %s\n", wine_dbgstr_w(two), wine_dbgstr_w(fnd_tgt)); - ok(!lstrcmpW(fnd_loc, one), "Found location should have been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(fnd_loc)); - CoTaskMemFree(fnd_tgt); - CoTaskMemFree(fnd_loc); - - hres = IHlink_SetStringReference(link, -HLINKSETF_TARGET, three, two); - ok(hres == S_OK, "IHlink_SetStringReference failed: 0x%08x\n", hres); - - hres = IHlink_GetStringReference(link, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc); - ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08x\n", hres); - ok(!lstrcmpW(fnd_tgt, three), "Found target should have been %s, was: %s\n", wine_dbgstr_w(three), wine_dbgstr_w(fnd_tgt)); - ok(!lstrcmpW(fnd_loc, two), "Found location should have been %s, was: %s\n", wine_dbgstr_w(two), wine_dbgstr_w(fnd_loc)); - CoTaskMemFree(fnd_tgt); - CoTaskMemFree(fnd_loc); - - /* test setting/getting both */ - hres = IHlink_SetStringReference(link, HLINKSETF_TARGET | HLINKSETF_LOCATION, one, two); - ok(hres == S_OK, "IHlink_SetStringReference failed: 0x%08x\n", hres); - - hres = IHlink_GetStringReference(link, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc); - ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08x\n", hres); - ok(!lstrcmpW(fnd_tgt, one), "Found target should have been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(fnd_tgt)); - ok(!lstrcmpW(fnd_loc, two), "Found location should have been %s, was: %s\n", wine_dbgstr_w(two), wine_dbgstr_w(fnd_loc)); - CoTaskMemFree(fnd_tgt); - CoTaskMemFree(fnd_loc); - - hres = IHlink_SetStringReference(link, -(HLINKSETF_TARGET | HLINKSETF_LOCATION), three, one); - ok(hres == S_OK, "IHlink_SetStringReference failed: 0x%08x\n", hres); - - hres = IHlink_GetStringReference(link, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc); - ok(hres == S_OK, "IHlink_GetStringReference failed: 0x%08x\n", hres); - ok(!lstrcmpW(fnd_tgt, three), "Found target should have been %s, was: %s\n", wine_dbgstr_w(three), wine_dbgstr_w(fnd_tgt)); - ok(!lstrcmpW(fnd_loc, two), "Found location should have been %s, was: %s\n", wine_dbgstr_w(two), wine_dbgstr_w(fnd_loc)); - CoTaskMemFree(fnd_tgt); - CoTaskMemFree(fnd_loc); - - /* test invalid flags/params */ - hres = IHlink_GetStringReference(link, 4, &fnd_tgt, &fnd_loc); - ok(hres == E_INVALIDARG, "IHlink_GetStringReference should have failed " - "with E_INVALIDARG (0x%08x), instead: 0x%08x\n", E_INVALIDARG, hres); - ok(fnd_tgt == NULL, "Found target should have been NULL, was: %s\n", wine_dbgstr_w(fnd_tgt)); - ok(fnd_loc == NULL, "Found location should have been NULL, was: %s\n", wine_dbgstr_w(fnd_loc)); - CoTaskMemFree(fnd_tgt); - CoTaskMemFree(fnd_loc); - - hres = IHlink_GetStringReference(link, -1, &fnd_tgt, NULL); - todo_wine ok(hres == E_FAIL, "IHlink_GetStringReference should have failed " - "with E_FAIL (0x%08x), instead: 0x%08x\n", E_FAIL, hres); - CoTaskMemFree(fnd_tgt); - - hres = IHlink_GetStringReference(link, -1, NULL, NULL); - ok(hres == S_OK, "failed, hres=%08x\n", hres); - - hres = IHlink_GetStringReference(link, -1, NULL, &fnd_loc); - ok(hres == S_OK, "failed, hres=%08x\n", hres); - CoTaskMemFree(fnd_loc); - - hres = IHlink_GetStringReference(link, -1, &fnd_tgt, &fnd_loc); - todo_wine ok(hres == E_FAIL, "IHlink_GetStringReference should have failed " - "with E_FAIL (0x%08x), instead: 0x%08x\n", E_FAIL, hres); - CoTaskMemFree(fnd_tgt); - CoTaskMemFree(fnd_loc); - - hres = IHlink_GetStringReference(link, -2, &fnd_tgt, &fnd_loc); - ok(hres == E_INVALIDARG, "IHlink_GetStringReference should have failed " - "with E_INVALIDARG (0x%08x), instead: 0x%08x\n", E_INVALIDARG, hres); - CoTaskMemFree(fnd_tgt); - CoTaskMemFree(fnd_loc); - - hres = IHlink_SetStringReference(link, 4, NULL, NULL); - /* Windows returns garbage; on 32-bit it returns the flags probably because the compiler happened to store them in %eax at some point */ - if (0) ok(hres == 4, "IHlink_SetStringReference should have failed with 0x4, instead: 0x%08x\n", hres); - - hres = IHlink_SetStringReference(link, -4, NULL, NULL); - if (0) ok(hres == -4, "IHlink_SetStringReference should have failed with 0xFFFFFFFC, instead: 0x%08x\n", hres); - - IHlink_Release(link); -} - -#define setStringRef(h,f,t,l) r_setStringRef(__LINE__,h,f,t,l) -static void r_setStringRef(unsigned line, IHlink *hlink, DWORD flags, const WCHAR *tgt, const WCHAR *loc) -{ - HRESULT hres; - hres = IHlink_SetStringReference(hlink, flags, tgt, loc); - ok_(__FILE__,line) (hres == S_OK, "IHlink_SetStringReference failed: 0x%08x\n", hres); -} - -#define getStringRef(h,t,l) r_getStringRef(__LINE__,h,t,l) -static void r_getStringRef(unsigned line, IHlink *hlink, const WCHAR *exp_tgt, const WCHAR *exp_loc) -{ - HRESULT hres; - WCHAR *fnd_tgt, *fnd_loc; - - hres = IHlink_GetStringReference(hlink, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc); - ok_(__FILE__,line) (hres == S_OK, "IHlink_GetStringReference failed: 0x%08x\n", hres); - - if(exp_tgt) - ok_(__FILE__,line) (!lstrcmpW(fnd_tgt, exp_tgt), "Found string target should have been %s, was: %s\n", wine_dbgstr_w(exp_tgt), wine_dbgstr_w(fnd_tgt)); - else - ok_(__FILE__,line) (fnd_tgt == NULL, "Found string target should have been NULL, was: %s\n", wine_dbgstr_w(fnd_tgt)); - - if(exp_loc) - ok_(__FILE__,line) (!lstrcmpW(fnd_loc, exp_loc), "Found string location should have been %s, was: %s\n", wine_dbgstr_w(exp_loc), wine_dbgstr_w(fnd_loc)); - else - ok_(__FILE__,line) (fnd_loc == NULL, "Found string location should have been NULL, was: %s\n", wine_dbgstr_w(fnd_loc)); - - CoTaskMemFree(fnd_tgt); - CoTaskMemFree(fnd_loc); -} - -#define setMonikerRef(h,f,t,l) r_setMonikerRef(__LINE__,h,f,t,l) -static void r_setMonikerRef(unsigned line, IHlink *hlink, DWORD flags, IMoniker *tgt, const WCHAR *loc) -{ - HRESULT hres; - hres = IHlink_SetMonikerReference(hlink, flags, tgt, loc); - ok_(__FILE__,line) (hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres); -} - -/* passing 0xFFFFFFFF as exp_tgt will return the retrieved target & not test it */ -#define getMonikerRef(h,t,l) r_getMonikerRef(__LINE__,h,t,l) -static IMoniker *r_getMonikerRef(unsigned line, IHlink *hlink, IMoniker *exp_tgt, const WCHAR *exp_loc) -{ - HRESULT hres; - IMoniker *fnd_tgt; - WCHAR *fnd_loc; - - hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc); - ok_(__FILE__,line) (hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08x\n", hres); - - if(exp_loc) - ok_(__FILE__,line) (!lstrcmpW(fnd_loc, exp_loc), "Found string location should have been %s, was: %s\n", wine_dbgstr_w(exp_loc), wine_dbgstr_w(fnd_loc)); - else - ok_(__FILE__,line) (fnd_loc == NULL, "Found string location should have been NULL, was: %s\n", wine_dbgstr_w(fnd_loc)); - - CoTaskMemFree(fnd_loc); - - if(exp_tgt == (IMoniker*)0xFFFFFFFF) - return fnd_tgt; - - ok_(__FILE__,line) (fnd_tgt == exp_tgt, "Found moniker target should have been %p, was: %p\n", exp_tgt, fnd_tgt); - - if(fnd_tgt) - IMoniker_Release(fnd_tgt); - - return NULL; -} - -static void test_HlinkMoniker(void) -{ - IHlink *hlink; - IMoniker *aMon, *file_mon; - static const WCHAR emptyW[] = {0}; - static const WCHAR wordsW[] = {'w','o','r','d','s',0}; - static const WCHAR aW[] = {'a',0}; - static const WCHAR bW[] = {'b',0}; - HRESULT hres; - - hres = HlinkCreateFromString(NULL, NULL, NULL, NULL, 0, NULL, &IID_IHlink, (void**)&hlink); - ok(hres == S_OK, "HlinkCreateFromString failed: 0x%08x\n", hres); - getStringRef(hlink, NULL, NULL); - getMonikerRef(hlink, NULL, NULL); - - /* setting a string target creates a moniker reference */ - setStringRef(hlink, HLINKSETF_TARGET | HLINKSETF_LOCATION, aW, wordsW); - getStringRef(hlink, aW, wordsW); - aMon = getMonikerRef(hlink, (IMoniker*)0xFFFFFFFF, wordsW); - ok(aMon != NULL, "Moniker from %s target should not be NULL\n", wine_dbgstr_w(aW)); - if(aMon) - IMoniker_Release(aMon); - - /* setting target & location to the empty string deletes the moniker - * reference */ - setStringRef(hlink, HLINKSETF_TARGET | HLINKSETF_LOCATION, emptyW, emptyW); - getStringRef(hlink, NULL, NULL); - getMonikerRef(hlink, NULL, NULL); - - /* setting a moniker target also sets the target string to that moniker's - * display name */ - hres = CreateFileMoniker(bW, &file_mon); - ok(hres == S_OK, "CreateFileMoniker failed: 0x%08x\n", hres); - - setMonikerRef(hlink, HLINKSETF_TARGET | HLINKSETF_LOCATION, file_mon, wordsW); - getStringRef(hlink, bW, wordsW); - getMonikerRef(hlink, file_mon, wordsW); - - IMoniker_Release(file_mon); - - IHlink_Release(hlink); -} - -static void test_HashLink(void) -{ - IHlink *hlink; - IMoniker *pmk; - const WCHAR hash_targetW[] = {'a','f','i','l','e','#','a','n','a','n','c','h','o','r',0}; - const WCHAR two_hash_targetW[] = {'a','f','i','l','e','#','a','n','a','n','c','h','o','r','#','a','n','o','t','h','e','r',0}; - const WCHAR hash_no_tgtW[] = {'#','a','n','a','n','c','h','o','r',0}; - const WCHAR tgt_partW[] = {'a','f','i','l','e',0}; - const WCHAR loc_partW[] = {'a','n','a','n','c','h','o','r',0}; - const WCHAR two_hash_loc_partW[] = {'a','n','a','n','c','h','o','r','#','a','n','o','t','h','e','r',0}; - const WCHAR test_locW[] = {'t','e','s','t','l','o','c',0}; - HRESULT hres; - - /* simple single hash test */ - hres = HlinkCreateFromString(hash_targetW, NULL, NULL, NULL, 0, NULL, &IID_IHlink, (void*)&hlink); - ok(hres == S_OK, "HlinkCreateFromString failed: 0x%08x\n", hres); - ok(hlink != NULL, "Didn't get an hlink\n"); - - if(hlink){ - getStringRef(hlink, tgt_partW, loc_partW); - pmk = getMonikerRef(hlink, (IMoniker*)0xFFFFFFFF, loc_partW); - ok(pmk != NULL, "Found moniker should not be NULL\n"); - if(pmk) - IMoniker_Release(pmk); - - setStringRef(hlink, HLINKSETF_TARGET, hash_targetW, NULL); - getStringRef(hlink, hash_targetW, loc_partW); - - IHlink_Release(hlink); - } - - /* two hashes in the target */ - hres = HlinkCreateFromString(two_hash_targetW, NULL, NULL, NULL, 0, NULL, &IID_IHlink, (void*)&hlink); - ok(hres == S_OK, "HlinkCreateFromString failed: 0x%08x\n", hres); - ok(hlink != NULL, "Didn't get an hlink\n"); - - if(hlink){ - getStringRef(hlink, tgt_partW, two_hash_loc_partW); - pmk = getMonikerRef(hlink, (IMoniker*)0xFFFFFFFF, two_hash_loc_partW); - ok(pmk != NULL, "Found moniker should not be NULL\n"); - if(pmk) - IMoniker_Release(pmk); - - IHlink_Release(hlink); - } - - /* target with hash plus a location string */ - hres = HlinkCreateFromString(hash_targetW, test_locW, NULL, NULL, 0, NULL, &IID_IHlink, (void*)&hlink); - ok(hres == S_OK, "HlinkCreateFromString failed: 0x%08x\n", hres); - ok(hlink != NULL, "Didn't get an hlink\n"); - - if(hlink){ - getStringRef(hlink, tgt_partW, test_locW); - pmk = getMonikerRef(hlink, (IMoniker*)0xFFFFFFFF, test_locW); - ok(pmk != NULL, "Found moniker should not be NULL\n"); - if(pmk) - IMoniker_Release(pmk); - - IHlink_Release(hlink); - } - - /* target with hash containing no "target part" */ - hres = HlinkCreateFromString(hash_no_tgtW, NULL, NULL, NULL, 0, NULL, &IID_IHlink, (void*)&hlink); - ok(hres == S_OK, "HlinkCreateFromString failed: 0x%08x\n", hres); - ok(hlink != NULL, "Didn't get an hlink\n"); - - if(hlink){ - getStringRef(hlink, NULL, loc_partW); - pmk = getMonikerRef(hlink, (IMoniker*)0xFFFFFFFF, loc_partW); - ok(pmk == NULL, "Found moniker should be NULL\n"); - if(pmk) - IMoniker_Release(pmk); - - IHlink_Release(hlink); - } -} - -START_TEST(hlink) -{ - CoInitialize(NULL); - - test_HlinkIsShortcut(); - test_reference(); - test_persist(); - test_special_reference(); - test_HlinkCreateExtensionServices(); - test_HlinkParseDisplayName(); - test_HlinkResolveMonikerForData(); - test_HlinkGetSetMonikerReference(); - test_HlinkGetSetStringReference(); - test_HlinkMoniker(); - test_HashLink(); - - CoUninitialize(); -} diff --git a/rostests/winetests/hlink/hlink.rbuild b/rostests/winetests/hlink/hlink.rbuild deleted file mode 100644 index 46622c6ad98..00000000000 --- a/rostests/winetests/hlink/hlink.rbuild +++ /dev/null @@ -1,16 +0,0 @@ - - - - - . - - browse_ctx.c - hlink.c - testlist.c - wine - hlink - ole32 - uuid - ntdll - - diff --git a/rostests/winetests/hlink/testlist.c b/rostests/winetests/hlink/testlist.c deleted file mode 100644 index 2dcd97072a4..00000000000 --- a/rostests/winetests/hlink/testlist.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_hlink(void); -extern void func_browse_ctx(void); - -const struct test winetest_testlist[] = -{ - { "browse_ctx", func_browse_ctx }, - { "hlink", func_hlink }, - { 0, 0 } -}; diff --git a/rostests/winetests/icmp/CMakeLists.txt b/rostests/winetests/icmp/CMakeLists.txt deleted file mode 100644 index 34d4efba8e3..00000000000 --- a/rostests/winetests/icmp/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(icmp_winetest icmp.c testlist.c) -target_link_libraries(icmp_winetest wine uuid) -set_module_type(icmp_winetest win32cui) -add_importlibs(icmp_winetest icmp msvcrt kernel32 ntdll) -add_cd_file(TARGET icmp_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/icmp/icmp.c b/rostests/winetests/icmp/icmp.c deleted file mode 100644 index 700e82d4330..00000000000 --- a/rostests/winetests/icmp/icmp.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Unit test suite for Icmp.dll functions - * - * Copyright 2006 Steven Edwards - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -/* - * TODO: - * It seems under Windows XP, 2003 and Vista these functions are not implemented - * in iphlpapi. Move the implementation and tests there. - */ - -#include -#include "wine/test.h" - -HANDLE WINAPI IcmpCreateFile(void); -BOOL WINAPI IcmpCloseHandle(HANDLE handle); - -HANDLE handle; - -static void test_IcmpCreateFile(void) -{ - handle=IcmpCreateFile(); - ok(handle!=INVALID_HANDLE_VALUE,"Failed to create icmp file handle\n"); -} - -static void test_IcmpCloseHandle(void) -{ - BOOL result; - result=IcmpCloseHandle(handle); - ok(result!=FALSE,"Failed to close icmp file handle\n"); -} - -START_TEST(icmp) -{ - test_IcmpCreateFile(); - test_IcmpCloseHandle(); -} diff --git a/rostests/winetests/icmp/icmp.rbuild b/rostests/winetests/icmp/icmp.rbuild deleted file mode 100644 index 460e46218b0..00000000000 --- a/rostests/winetests/icmp/icmp.rbuild +++ /dev/null @@ -1,10 +0,0 @@ - - - - . - - ntdll - icmp - icmp.c - testlist.c - diff --git a/rostests/winetests/icmp/testlist.c b/rostests/winetests/icmp/testlist.c deleted file mode 100644 index 6800e31c85a..00000000000 --- a/rostests/winetests/icmp/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_icmp(void); - -const struct test winetest_testlist[] = -{ - { "icmp", func_icmp }, - { 0, 0 } -}; diff --git a/rostests/winetests/imagehlp/CMakeLists.txt b/rostests/winetests/imagehlp/CMakeLists.txt deleted file mode 100644 index ea3889c9ada..00000000000 --- a/rostests/winetests/imagehlp/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - image.c - integrity.c - testlist.c) - -add_executable(imagehlp_winetest ${SOURCE}) -target_link_libraries(imagehlp_winetest wine uuid) -set_module_type(imagehlp_winetest win32cui) -add_importlibs(imagehlp_winetest advapi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET imagehlp_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/imagehlp/image.c b/rostests/winetests/imagehlp/image.c deleted file mode 100644 index e008b0b4618..00000000000 --- a/rostests/winetests/imagehlp/image.c +++ /dev/null @@ -1,353 +0,0 @@ -/* - * Copyright 2008 Juan Lang - * Copyright 2010 Andrey Turkin - * - * 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 - -#define NONAMELESSUNION -#include -#include -#include -#include -#include - -#include "wine/test.h" - -static HMODULE hImageHlp; - -static BOOL (WINAPI *pImageGetDigestStream)(HANDLE, DWORD, DIGEST_FUNCTION, DIGEST_HANDLE); - -/* minimal PE file image */ -#define VA_START 0x400000 -#define FILE_PE_START 0x50 -#define NUM_SECTIONS 3 -#define FILE_TEXT 0x200 -#define RVA_TEXT 0x1000 -#define RVA_BSS 0x2000 -#define FILE_IDATA 0x400 -#define RVA_IDATA 0x3000 -#define FILE_TOTAL 0x600 -#define RVA_TOTAL 0x4000 -#include -struct Imports { - IMAGE_IMPORT_DESCRIPTOR descriptors[2]; - IMAGE_THUNK_DATA32 original_thunks[2]; - IMAGE_THUNK_DATA32 thunks[2]; - struct __IMPORT_BY_NAME { - WORD hint; - char funcname[0x20]; - } ibn; - char dllname[0x10]; -}; -#define EXIT_PROCESS (VA_START+RVA_IDATA+FIELD_OFFSET(struct Imports, thunks[0])) - -static struct _PeImage { - IMAGE_DOS_HEADER dos_header; - char __alignment1[FILE_PE_START - sizeof(IMAGE_DOS_HEADER)]; - IMAGE_NT_HEADERS32 nt_headers; - IMAGE_SECTION_HEADER sections[NUM_SECTIONS]; - char __alignment2[FILE_TEXT - FILE_PE_START - sizeof(IMAGE_NT_HEADERS32) - - NUM_SECTIONS * sizeof(IMAGE_SECTION_HEADER)]; - unsigned char text_section[FILE_IDATA-FILE_TEXT]; - struct Imports idata_section; - char __alignment3[FILE_TOTAL-FILE_IDATA-sizeof(struct Imports)]; -} bin = { - /* dos header */ - {IMAGE_DOS_SIGNATURE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, 0, 0, {}, FILE_PE_START}, - /* alignment before PE header */ - {}, - /* nt headers */ - {IMAGE_NT_SIGNATURE, - /* basic headers - 3 sections, no symbols, EXE file */ - {IMAGE_FILE_MACHINE_I386, NUM_SECTIONS, 0, 0, 0, sizeof(IMAGE_OPTIONAL_HEADER32), - IMAGE_FILE_32BIT_MACHINE | IMAGE_FILE_EXECUTABLE_IMAGE}, - /* optional header */ - {IMAGE_NT_OPTIONAL_HDR32_MAGIC, 4, 0, FILE_IDATA-FILE_TEXT, - FILE_TOTAL-FILE_IDATA + FILE_IDATA-FILE_TEXT, 0x400, - RVA_TEXT, RVA_TEXT, RVA_BSS, VA_START, 0x1000, 0x200, 4, 0, 1, 0, 4, 0, 0, - RVA_TOTAL, FILE_TEXT, 0, IMAGE_SUBSYSTEM_WINDOWS_GUI, 0, - 0x200000, 0x1000, 0x100000, 0x1000, 0, 0x10, - {{0, 0}, - {RVA_IDATA, sizeof(struct Imports)} - } - } - }, - /* sections */ - { - {".text", {0x100}, RVA_TEXT, FILE_IDATA-FILE_TEXT, FILE_TEXT, - 0, 0, 0, 0, IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_EXECUTE | IMAGE_SCN_MEM_READ}, - {".bss", {0x400}, RVA_BSS, 0, 0, 0, 0, 0, 0, - IMAGE_SCN_CNT_UNINITIALIZED_DATA | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE}, - {".idata", {sizeof(struct Imports)}, RVA_IDATA, FILE_TOTAL-FILE_IDATA, FILE_IDATA, 0, - 0, 0, 0, IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE} - }, - /* alignment before first section */ - {}, - /* .text section */ - { - 0x31, 0xC0, /* xor eax, eax */ - 0xFF, 0x25, EXIT_PROCESS&0xFF, (EXIT_PROCESS>>8)&0xFF, (EXIT_PROCESS>>16)&0xFF, - (EXIT_PROCESS>>24)&0xFF, /* jmp ExitProcess */ - 0 - }, - /* .idata section */ - { - { - {{RVA_IDATA + FIELD_OFFSET(struct Imports, original_thunks)}, 0, 0, - RVA_IDATA + FIELD_OFFSET(struct Imports, dllname), - RVA_IDATA + FIELD_OFFSET(struct Imports, thunks) - }, - {{0}, 0, 0, 0, 0} - }, - {{{RVA_IDATA+FIELD_OFFSET(struct Imports, ibn)}}, {{0}}}, - {{{RVA_IDATA+FIELD_OFFSET(struct Imports, ibn)}}, {{0}}}, - {0,"ExitProcess"}, - "KERNEL32.DLL" - }, - /* final alignment */ - {} -}; -#include - -struct blob -{ - DWORD cb; - BYTE *pb; -}; - -struct expected_blob -{ - DWORD cb; - const void *pb; -}; - -struct update_accum -{ - DWORD cUpdates; - struct blob *updates; -}; - -struct expected_update_accum -{ - DWORD cUpdates; - const struct expected_blob *updates; - BOOL todo; -}; - -static BOOL WINAPI accumulating_stream_output(DIGEST_HANDLE handle, BYTE *pb, - DWORD cb) -{ - struct update_accum *accum = (struct update_accum *)handle; - BOOL ret = FALSE; - - if (accum->cUpdates) - accum->updates = HeapReAlloc(GetProcessHeap(), 0, accum->updates, - (accum->cUpdates + 1) * sizeof(struct blob)); - else - accum->updates = HeapAlloc(GetProcessHeap(), 0, sizeof(struct blob)); - if (accum->updates) - { - struct blob *blob = &accum->updates[accum->cUpdates]; - - blob->pb = HeapAlloc(GetProcessHeap(), 0, cb); - if (blob->pb) - { - memcpy(blob->pb, pb, cb); - blob->cb = cb; - ret = TRUE; - } - accum->cUpdates++; - } - return ret; -} - -static void check_updates(LPCSTR header, const struct expected_update_accum *expected, - const struct update_accum *got) -{ - DWORD i; - - if (expected->todo) - todo_wine ok(expected->cUpdates == got->cUpdates, "%s: expected %d updates, got %d\n", - header, expected->cUpdates, got->cUpdates); - else - ok(expected->cUpdates == got->cUpdates, "%s: expected %d updates, got %d\n", - header, expected->cUpdates, got->cUpdates); - for (i = 0; i < min(expected->cUpdates, got->cUpdates); i++) - { - ok(expected->updates[i].cb == got->updates[i].cb, "%s, update %d: expected %d bytes, got %d\n", - header, i, expected->updates[i].cb, got->updates[i].cb); - if (expected->updates[i].cb && expected->updates[i].cb == got->updates[i].cb) - ok(!memcmp(expected->updates[i].pb, got->updates[i].pb, got->updates[i].cb), - "%s, update %d: unexpected value\n", header, i); - } -} - -/* Frees the updates stored in accum */ -static void free_updates(struct update_accum *accum) -{ - DWORD i; - - for (i = 0; i < accum->cUpdates; i++) - HeapFree(GetProcessHeap(), 0, accum->updates[i].pb); - HeapFree(GetProcessHeap(), 0, accum->updates); - accum->updates = NULL; - accum->cUpdates = 0; -} - -static const struct expected_blob b1[] = { - {FILE_PE_START, &bin}, - /* with zeroed Checksum/SizeOfInitializedData/SizeOfImage fields */ - {sizeof(bin.nt_headers), &bin.nt_headers}, - {sizeof(bin.sections), &bin.sections}, - {FILE_IDATA-FILE_TEXT, &bin.text_section}, - {sizeof(bin.idata_section.descriptors[0].u.OriginalFirstThunk), - &bin.idata_section.descriptors[0].u.OriginalFirstThunk}, - {FIELD_OFFSET(struct Imports, thunks)-FIELD_OFFSET(struct Imports, descriptors[0].Name), - &bin.idata_section.descriptors[0].Name}, - {FILE_TOTAL-FILE_IDATA-FIELD_OFFSET(struct Imports, ibn), - &bin.idata_section.ibn} -}; -static const struct expected_update_accum a1 = { sizeof(b1) / sizeof(b1[0]), b1, TRUE }; - -static const struct expected_blob b2[] = { - {FILE_PE_START, &bin}, - /* with zeroed Checksum/SizeOfInitializedData/SizeOfImage fields */ - {sizeof(bin.nt_headers), &bin.nt_headers}, - {sizeof(bin.sections), &bin.sections}, - {FILE_IDATA-FILE_TEXT, &bin.text_section}, - {FILE_TOTAL-FILE_IDATA, &bin.idata_section} -}; -static const struct expected_update_accum a2 = { sizeof(b2) / sizeof(b2[0]), b2, FALSE }; - -/* Creates a test file and returns a handle to it. The file's path is returned - * in temp_file, which must be at least MAX_PATH characters in length. - */ -static HANDLE create_temp_file(char *temp_file) -{ - HANDLE file = INVALID_HANDLE_VALUE; - char temp_path[MAX_PATH]; - - if (GetTempPathA(sizeof(temp_path), temp_path)) - { - if (GetTempFileNameA(temp_path, "img", 0, temp_file)) - file = CreateFileA(temp_file, GENERIC_READ | GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - } - return file; -} - -static void update_checksum(void) -{ - WORD const * ptr; - DWORD size; - DWORD sum = 0; - - bin.nt_headers.OptionalHeader.CheckSum = 0; - - for(ptr = (WORD const *)&bin, size = (sizeof(bin)+1)/sizeof(WORD); size > 0; ptr++, size--) - { - sum += *ptr; - if (HIWORD(sum) != 0) - { - sum = LOWORD(sum) + HIWORD(sum); - } - } - sum = (WORD)(LOWORD(sum) + HIWORD(sum)); - sum += sizeof(bin); - - bin.nt_headers.OptionalHeader.CheckSum = sum; -} - -static void test_get_digest_stream(void) -{ - BOOL ret; - HANDLE file; - char temp_file[MAX_PATH]; - DWORD count; - struct update_accum accum = { 0, NULL }; - - SetLastError(0xdeadbeef); - ret = pImageGetDigestStream(NULL, 0, NULL, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - file = create_temp_file(temp_file); - if (file == INVALID_HANDLE_VALUE) - { - skip("couldn't create temp file\n"); - return; - } - SetLastError(0xdeadbeef); - ret = pImageGetDigestStream(file, 0, NULL, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pImageGetDigestStream(NULL, 0, accumulating_stream_output, &accum); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - /* Even with "valid" parameters, it fails with an empty file */ - SetLastError(0xdeadbeef); - ret = pImageGetDigestStream(file, 0, accumulating_stream_output, &accum); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - /* Finally, with a valid executable in the file, it succeeds. Note that - * the file pointer need not be positioned at the beginning. - */ - update_checksum(); - WriteFile(file, &bin, sizeof(bin), &count, NULL); - FlushFileBuffers(file); - - /* zero out some fields ImageGetDigestStream would zero out */ - bin.nt_headers.OptionalHeader.CheckSum = 0; - bin.nt_headers.OptionalHeader.SizeOfInitializedData = 0; - bin.nt_headers.OptionalHeader.SizeOfImage = 0; - - ret = pImageGetDigestStream(file, 0, accumulating_stream_output, &accum); - ok(ret, "ImageGetDigestStream failed: %d\n", GetLastError()); - check_updates("flags = 0", &a1, &accum); - free_updates(&accum); - ret = pImageGetDigestStream(file, CERT_PE_IMAGE_DIGEST_ALL_IMPORT_INFO, - accumulating_stream_output, &accum); - ok(ret, "ImageGetDigestStream failed: %d\n", GetLastError()); - check_updates("flags = CERT_PE_IMAGE_DIGEST_ALL_IMPORT_INFO", &a2, &accum); - free_updates(&accum); - CloseHandle(file); - DeleteFileA(temp_file); -} - -START_TEST(image) -{ - hImageHlp = LoadLibraryA("imagehlp.dll"); - - if (!hImageHlp) - { - win_skip("ImageHlp unavailable\n"); - return; - } - - pImageGetDigestStream = (void *) GetProcAddress(hImageHlp, "ImageGetDigestStream"); - - if (!pImageGetDigestStream) - { - win_skip("ImageGetDigestStream function is not available\n"); - } else - { - test_get_digest_stream(); - } - - FreeLibrary(hImageHlp); -} diff --git a/rostests/winetests/imagehlp/imagehlp.rbuild b/rostests/winetests/imagehlp/imagehlp.rbuild deleted file mode 100644 index fc757e01d58..00000000000 --- a/rostests/winetests/imagehlp/imagehlp.rbuild +++ /dev/null @@ -1,16 +0,0 @@ - - - - - . - - image.c - integrity.c - testlist.c - wine - user32 - ole32 - oleaut32 - ntdll - - diff --git a/rostests/winetests/imagehlp/integrity.c b/rostests/winetests/imagehlp/integrity.c deleted file mode 100644 index 6f297dc07dd..00000000000 --- a/rostests/winetests/imagehlp/integrity.c +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Test suite for imagehlp integrity functions - * - * Copyright 2009 Owen Rudge 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 - */ - -#define COBJMACROS -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "winerror.h" -#include "winnt.h" -#include "imagehlp.h" - -static HMODULE hImageHlp; -static char test_dll_path[MAX_PATH]; - -static BOOL (WINAPI *pImageAddCertificate)(HANDLE, LPWIN_CERTIFICATE, PDWORD); -static BOOL (WINAPI *pImageEnumerateCertificates)(HANDLE, WORD, PDWORD, PDWORD, DWORD); -static BOOL (WINAPI *pImageGetCertificateData)(HANDLE, DWORD, LPWIN_CERTIFICATE, PDWORD); -static BOOL (WINAPI *pImageGetCertificateHeader)(HANDLE, DWORD, LPWIN_CERTIFICATE); -static BOOL (WINAPI *pImageRemoveCertificate)(HANDLE, DWORD); - -static char test_cert_data[] = -{0x30,0x82,0x02,0xE1,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x02 -,0xA0,0x82,0x02,0xD2,0x30,0x82,0x02,0xCE,0x02,0x01,0x01,0x31,0x00,0x30,0x0B -,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x01,0xA0,0x82,0x02,0xB4 -,0x30,0x82,0x02,0xB0,0x30,0x82,0x02,0x19,0xA0,0x03,0x02,0x01,0x02,0x02,0x09 -,0x00,0xE2,0x59,0x17,0xA5,0x87,0x0F,0x88,0x89,0x30,0x0D,0x06,0x09,0x2A,0x86 -,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x30,0x45,0x31,0x0B,0x30,0x09 -,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x41,0x55,0x31,0x13,0x30,0x11,0x06,0x03 -,0x55,0x04,0x08,0x13,0x0A,0x53,0x6F,0x6D,0x65,0x2D,0x53,0x74,0x61,0x74,0x65 -,0x31,0x21,0x30,0x1F,0x06,0x03,0x55,0x04,0x0A,0x13,0x18,0x49,0x6E,0x74,0x65 -,0x72,0x6E,0x65,0x74,0x20,0x57,0x69,0x64,0x67,0x69,0x74,0x73,0x20,0x50,0x74 -,0x79,0x20,0x4C,0x74,0x64,0x30,0x1E,0x17,0x0D,0x30,0x39,0x31,0x31,0x32,0x30 -,0x31,0x37,0x33,0x38,0x31,0x32,0x5A,0x17,0x0D,0x31,0x30,0x31,0x31,0x32,0x30 -,0x31,0x37,0x33,0x38,0x31,0x32,0x5A,0x30,0x45,0x31,0x0B,0x30,0x09,0x06,0x03 -,0x55,0x04,0x06,0x13,0x02,0x41,0x55,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04 -,0x08,0x13,0x0A,0x53,0x6F,0x6D,0x65,0x2D,0x53,0x74,0x61,0x74,0x65,0x31,0x21 -,0x30,0x1F,0x06,0x03,0x55,0x04,0x0A,0x13,0x18,0x49,0x6E,0x74,0x65,0x72,0x6E -,0x65,0x74,0x20,0x57,0x69,0x64,0x67,0x69,0x74,0x73,0x20,0x50,0x74,0x79,0x20 -,0x4C,0x74,0x64,0x30,0x81,0x9F,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7 -,0x0D,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8D,0x00,0x30,0x81,0x89,0x02,0x81 -,0x81,0x00,0x9B,0xC1,0x5E,0x28,0x70,0x32,0x81,0xEF,0x41,0x5C,0xCA,0x29,0x4A -,0xB0,0x12,0xF7,0xAE,0x1E,0x30,0x93,0x14,0x3E,0x54,0x7C,0xC3,0x60,0x8C,0xB2 -,0x2F,0xC4,0x1F,0x20,0xEE,0x76,0xAC,0x83,0xD9,0xD4,0xC0,0x3C,0x78,0x6B,0xAA -,0xA2,0x35,0x08,0x72,0x4A,0x5F,0xAE,0xD6,0x7D,0x5A,0xD8,0x27,0xEC,0xE0,0x24 -,0xBE,0xBE,0x62,0x86,0xF9,0x83,0x66,0x20,0xBC,0xF6,0x4B,0xC8,0x2D,0x1B,0x4C -,0x5C,0xFA,0x0C,0x42,0x9F,0x57,0x49,0xDC,0xB9,0xC7,0x88,0x53,0xFA,0x26,0x21 -,0xC3,0xAB,0x4D,0x93,0x83,0x48,0x88,0xF1,0x14,0xB8,0x64,0x03,0x46,0x58,0x35 -,0xAC,0xD2,0xD2,0x9C,0xD4,0x6F,0xA4,0xE4,0x88,0x83,0x1C,0xD8,0x98,0xEE,0x2C -,0xA3,0xEC,0x0C,0x4B,0xFB,0x1D,0x6E,0xBE,0xD9,0x77,0x02,0x03,0x01,0x00,0x01 -,0xA3,0x81,0xA7,0x30,0x81,0xA4,0x30,0x1D,0x06,0x03,0x55,0x1D,0x0E,0x04,0x16 -,0x04,0x14,0x3F,0xB3,0xC8,0x15,0x12,0xC7,0xD8,0xC0,0x13,0x3D,0xBE,0xF1,0x2F -,0x5A,0xB3,0x51,0x59,0x79,0x89,0xF8,0x30,0x75,0x06,0x03,0x55,0x1D,0x23,0x04 -,0x6E,0x30,0x6C,0x80,0x14,0x3F,0xB3,0xC8,0x15,0x12,0xC7,0xD8,0xC0,0x13,0x3D -,0xBE,0xF1,0x2F,0x5A,0xB3,0x51,0x59,0x79,0x89,0xF8,0xA1,0x49,0xA4,0x47,0x30 -,0x45,0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x41,0x55,0x31 -,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x08,0x13,0x0A,0x53,0x6F,0x6D,0x65,0x2D -,0x53,0x74,0x61,0x74,0x65,0x31,0x21,0x30,0x1F,0x06,0x03,0x55,0x04,0x0A,0x13 -,0x18,0x49,0x6E,0x74,0x65,0x72,0x6E,0x65,0x74,0x20,0x57,0x69,0x64,0x67,0x69 -,0x74,0x73,0x20,0x50,0x74,0x79,0x20,0x4C,0x74,0x64,0x82,0x09,0x00,0xE2,0x59 -,0x17,0xA5,0x87,0x0F,0x88,0x89,0x30,0x0C,0x06,0x03,0x55,0x1D,0x13,0x04,0x05 -,0x30,0x03,0x01,0x01,0xFF,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D -,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x52,0x09,0xA5,0x81,0x63,0xEF -,0xF7,0x76,0x65,0x2B,0xA5,0x48,0xC1,0xC5,0xE0,0x73,0x60,0x9B,0x66,0x2E,0x21 -,0xCF,0xF2,0xBD,0xFF,0x81,0xC4,0x99,0x39,0xD0,0x5D,0x1B,0x12,0xFD,0xAE,0x30 -,0x5D,0x9C,0x1A,0xD4,0x76,0x8A,0x25,0x10,0x0A,0x7E,0x5D,0x78,0xB5,0x94,0xD8 -,0x97,0xBD,0x9A,0x5A,0xD6,0x23,0xCA,0x5C,0x46,0x8C,0xC7,0x30,0x45,0xB4,0x77 -,0x44,0x6F,0x16,0xDD,0xC6,0x58,0xFE,0x16,0x15,0xAD,0xB8,0x58,0x49,0x9A,0xFE -,0x6B,0x87,0x78,0xEE,0x13,0xFF,0x29,0x26,0x8E,0x13,0x83,0x0D,0x18,0xCA,0x9F -,0xA9,0x3E,0x6E,0x3C,0xA6,0x50,0x4A,0x04,0x71,0x9F,0x2E,0xCF,0x25,0xA6,0x03 -,0x46,0xCA,0xEB,0xEA,0x67,0x89,0x49,0x7C,0x43,0xA2,0x52,0xD9,0x41,0xCC,0x65 -,0xED,0x2D,0xA1,0x00,0x31,0x00}; - -static char test_cert_data_2[] = {0xDE,0xAD,0xBE,0xEF,0x01,0x02,0x03}; - -static BOOL copy_dll_file(void) -{ - char sys_dir[MAX_PATH+15]; - char temp_path[MAX_PATH]; - - if (GetSystemDirectoryA(sys_dir, MAX_PATH) == 0) - { - skip("Failed to get system directory. Skipping certificate/PE image tests.\n"); - return FALSE; - } - - if (sys_dir[lstrlenA(sys_dir) - 1] != '\\') - lstrcatA(sys_dir, "\\"); - - lstrcatA(sys_dir, "imagehlp.dll"); - - /* Copy DLL to a temp file */ - GetTempPath(MAX_PATH, temp_path); - GetTempFileName(temp_path, "img", 0, test_dll_path); - - if (CopyFile(sys_dir, test_dll_path, FALSE) == 0) - { - skip("Unable to create copy of imagehlp.dll for tests.\n"); - return FALSE; - } - - return TRUE; -} - -static DWORD get_file_size(void) -{ - HANDLE file; - DWORD filesize = 0; - - file = CreateFileA(test_dll_path, GENERIC_READ, FILE_SHARE_READ, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - if (file == INVALID_HANDLE_VALUE) - return 0; - - filesize = GetFileSize(file, NULL); - CloseHandle(file); - - return filesize; -} - -static void test_add_certificate(char *cert_data, int len) -{ - HANDLE hFile; - LPWIN_CERTIFICATE cert; - DWORD cert_len; - DWORD index; - - hFile = CreateFileA(test_dll_path, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - - if (hFile == INVALID_HANDLE_VALUE) - { - skip("Unable to open %s, skipping test\n", test_dll_path); - return; - } - - cert_len = sizeof(WIN_CERTIFICATE) + len; - cert = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, cert_len); - - if (!cert) - { - skip("Unable to allocate memory, skipping test\n"); - CloseHandle(hFile); - return; - } - - cert->dwLength = cert_len; - cert->wRevision = WIN_CERT_REVISION_1_0; - cert->wCertificateType = WIN_CERT_TYPE_PKCS_SIGNED_DATA; - CopyMemory(cert->bCertificate, cert_data, len); - - ok(pImageAddCertificate(hFile, cert, &index), "Unable to add certificate to image, error %x\n", GetLastError()); - - HeapFree(GetProcessHeap(), 0, cert); - CloseHandle(hFile); -} - -static void test_get_certificate(char *cert_data, int index) -{ - HANDLE hFile; - LPWIN_CERTIFICATE cert; - DWORD cert_len = 0; - DWORD err, ret; - - hFile = CreateFileA(test_dll_path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - - if (hFile == INVALID_HANDLE_VALUE) - { - skip("Unable to open %s, skipping test\n", test_dll_path); - return; - } - - ret = pImageGetCertificateData(hFile, index, NULL, &cert_len); - err = GetLastError(); - - ok ((ret == FALSE) && (err == ERROR_INSUFFICIENT_BUFFER), "ImageGetCertificateData gave unexpected result; ret=%d / err=%x\n", ret, err); - - cert = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, cert_len); - - if (!cert) - { - skip("Unable to allocate memory, skipping test\n"); - CloseHandle(hFile); - return; - } - - ok(ret = pImageGetCertificateData(hFile, index, cert, &cert_len), "Unable to retrieve certificate; err=%x\n", GetLastError()); - ok(memcmp(cert->bCertificate, cert_data, cert_len - sizeof(WIN_CERTIFICATE)) == 0, "Certificate retrieved did not match original\n"); - - HeapFree(GetProcessHeap(), 0, cert); - CloseHandle(hFile); -} - -static void test_remove_certificate(int index) -{ - DWORD orig_count = 0, count = 0; - HANDLE hFile; - - hFile = CreateFileA(test_dll_path, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - - if (hFile == INVALID_HANDLE_VALUE) - { - skip("Unable to open %s, skipping test\n", test_dll_path); - return; - } - - ok (pImageEnumerateCertificates(hFile, CERT_SECTION_TYPE_ANY, &orig_count, NULL, 0), "Unable to enumerate certificates in file; err=%x\n", GetLastError()); - - ok (pImageRemoveCertificate(hFile, index), "Unable to remove certificate from file; err=%x\n", GetLastError()); - - /* Test to see if the certificate has actually been removed */ - pImageEnumerateCertificates(hFile, CERT_SECTION_TYPE_ANY, &count, NULL, 0); - ok (count == orig_count - 1, "Certificate count mismatch; orig=%d new=%d\n", orig_count, count); - - CloseHandle(hFile); -} - -START_TEST(integrity) -{ - DWORD file_size, file_size_orig; - - hImageHlp = LoadLibraryA("imagehlp.dll"); - - if (!hImageHlp) - { - win_skip("ImageHlp unavailable\n"); - return; - } - - if (!copy_dll_file()) - { - FreeLibrary(hImageHlp); - return; - } - - file_size_orig = get_file_size(); - /* - * Align file_size_orig to an 8-byte boundary. This avoids tests failures where - * the original dll is not correctly aligned (but when written to it will be). - */ - if (file_size_orig % 8 != 0) - { - skip("We need to align to an 8-byte boundary\n"); - file_size_orig = (file_size_orig + 7) & ~7; - } - - pImageAddCertificate = (void *) GetProcAddress(hImageHlp, "ImageAddCertificate"); - pImageEnumerateCertificates = (void *) GetProcAddress(hImageHlp, "ImageEnumerateCertificates"); - pImageGetCertificateData = (void *) GetProcAddress(hImageHlp, "ImageGetCertificateData"); - pImageGetCertificateHeader = (void *) GetProcAddress(hImageHlp, "ImageGetCertificateHeader"); - pImageRemoveCertificate = (void *) GetProcAddress(hImageHlp, "ImageRemoveCertificate"); - - test_add_certificate(test_cert_data, sizeof(test_cert_data)); - test_get_certificate(test_cert_data, 0); - test_remove_certificate(0); - - file_size = get_file_size(); - ok(file_size == file_size_orig, "File size different after add and remove (old: %d; new: %d)\n", file_size_orig, file_size); - - /* Try adding multiple certificates */ - test_add_certificate(test_cert_data, sizeof(test_cert_data)); - test_add_certificate(test_cert_data_2, sizeof(test_cert_data_2)); - - test_get_certificate(test_cert_data, 0); - test_get_certificate(test_cert_data_2, 1); - - /* Remove the first one and verify the second certificate is intact */ - test_remove_certificate(0); - test_get_certificate(test_cert_data_2, 0); - - test_remove_certificate(0); - - file_size = get_file_size(); - ok(file_size == file_size_orig, "File size different after add and remove (old: %d; new: %d)\n", file_size_orig, file_size); - - FreeLibrary(hImageHlp); - DeleteFile(test_dll_path); -} diff --git a/rostests/winetests/imagehlp/testlist.c b/rostests/winetests/imagehlp/testlist.c deleted file mode 100644 index 665ea1d5efe..00000000000 --- a/rostests/winetests/imagehlp/testlist.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_image(void); -extern void func_integrity(void); - -const struct test winetest_testlist[] = -{ - { "image", func_image }, - { "integrity", func_integrity }, - { 0, 0 } -}; diff --git a/rostests/winetests/imm32/CMakeLists.txt b/rostests/winetests/imm32/CMakeLists.txt deleted file mode 100644 index afd74dce4b9..00000000000 --- a/rostests/winetests/imm32/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(imm32_winetest imm32.c testlist.c) -target_link_libraries(imm32_winetest wine) -set_module_type(imm32_winetest win32cui) -add_importlibs(imm32_winetest imm32 user32 msvcrt kernel32 ntdll) -add_cd_file(TARGET imm32_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/imm32/imm32.c b/rostests/winetests/imm32/imm32.c deleted file mode 100644 index eca4d5e6fe8..00000000000 --- a/rostests/winetests/imm32/imm32.c +++ /dev/null @@ -1,589 +0,0 @@ -/* - * Unit tests for imm32 - * - * Copyright (c) 2008 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 St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -#include "wine/test.h" -#include "winuser.h" -#include "wingdi.h" -#include "imm.h" - -#define NUMELEMS(array) (sizeof((array))/sizeof((array)[0])) - -static BOOL (WINAPI *pImmAssociateContextEx)(HWND,HIMC,DWORD); -static BOOL (WINAPI *pImmIsUIMessageA)(HWND,UINT,WPARAM,LPARAM); - -/* - * msgspy - record and analyse message traces sent to a certain window - */ -static struct _msg_spy { - HWND hwnd; - HHOOK get_msg_hook; - HHOOK call_wnd_proc_hook; - CWPSTRUCT msgs[32]; - unsigned int i_msg; -} msg_spy; - -static LRESULT CALLBACK get_msg_filter(int nCode, WPARAM wParam, LPARAM lParam) -{ - if (HC_ACTION == nCode) { - MSG *msg = (MSG*)lParam; - - if ((msg->hwnd == msg_spy.hwnd) && - (msg_spy.i_msg < NUMELEMS(msg_spy.msgs))) - { - msg_spy.msgs[msg_spy.i_msg].hwnd = msg->hwnd; - msg_spy.msgs[msg_spy.i_msg].message = msg->message; - msg_spy.msgs[msg_spy.i_msg].wParam = msg->wParam; - msg_spy.msgs[msg_spy.i_msg].lParam = msg->lParam; - msg_spy.i_msg++; - } - } - - return CallNextHookEx(msg_spy.get_msg_hook, nCode, wParam, lParam); -} - -static LRESULT CALLBACK call_wnd_proc_filter(int nCode, WPARAM wParam, - LPARAM lParam) -{ - if (HC_ACTION == nCode) { - CWPSTRUCT *cwp = (CWPSTRUCT*)lParam; - - if ((cwp->hwnd == msg_spy.hwnd) && - (msg_spy.i_msg < NUMELEMS(msg_spy.msgs))) - { - memcpy(&msg_spy.msgs[msg_spy.i_msg], cwp, sizeof(msg_spy.msgs[0])); - msg_spy.i_msg++; - } - } - - return CallNextHookEx(msg_spy.call_wnd_proc_hook, nCode, wParam, lParam); -} - -static void msg_spy_pump_msg_queue(void) { - MSG msg; - - while(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - return; -} - -static void msg_spy_flush_msgs(void) { - msg_spy_pump_msg_queue(); - msg_spy.i_msg = 0; -} - -static CWPSTRUCT* msg_spy_find_msg(UINT message) { - UINT i; - - msg_spy_pump_msg_queue(); - - if (msg_spy.i_msg >= NUMELEMS(msg_spy.msgs)) - fprintf(stdout, "%s:%d: msg_spy: message buffer overflow!\n", - __FILE__, __LINE__); - - for (i = 0; i < msg_spy.i_msg; i++) - if (msg_spy.msgs[i].message == message) - return &msg_spy.msgs[i]; - - return NULL; -} - -static void msg_spy_init(HWND hwnd) { - msg_spy.hwnd = hwnd; - msg_spy.get_msg_hook = - SetWindowsHookEx(WH_GETMESSAGE, get_msg_filter, GetModuleHandle(0), - GetCurrentThreadId()); - msg_spy.call_wnd_proc_hook = - SetWindowsHookEx(WH_CALLWNDPROC, call_wnd_proc_filter, - GetModuleHandle(0), GetCurrentThreadId()); - msg_spy.i_msg = 0; - - msg_spy_flush_msgs(); -} - -static void msg_spy_cleanup(void) { - if (msg_spy.get_msg_hook) - UnhookWindowsHookEx(msg_spy.get_msg_hook); - if (msg_spy.call_wnd_proc_hook) - UnhookWindowsHookEx(msg_spy.call_wnd_proc_hook); - memset(&msg_spy, 0, sizeof(msg_spy)); -} - -/* - * imm32 test cases - Issue some IMM commands on a dummy window and analyse the - * messages being sent to this window in response. - */ -static const char wndcls[] = "winetest_imm32_wndcls"; -static HWND hwnd; - -static LRESULT WINAPI wndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch (msg) - { - case WM_IME_SETCONTEXT: - case WM_NCCREATE: - case WM_CREATE: - return TRUE; - } - - return DefWindowProcA(hwnd,msg,wParam,lParam); -} - -static BOOL init(void) { - WNDCLASSEX wc; - HIMC imc; - HMODULE hmod; - - hmod = GetModuleHandleA("imm32.dll"); - pImmAssociateContextEx = (void*)GetProcAddress(hmod, "ImmAssociateContextEx"); - pImmIsUIMessageA = (void*)GetProcAddress(hmod, "ImmIsUIMessageA"); - - wc.cbSize = sizeof(WNDCLASSEX); - wc.style = 0; - wc.lpfnWndProc = wndProc; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = GetModuleHandle(0); - wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); - wc.hCursor = LoadCursor(NULL, IDC_ARROW); - wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); - wc.lpszMenuName = NULL; - wc.lpszClassName = wndcls; - wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION); - - if (!RegisterClassExA(&wc)) - return FALSE; - - hwnd = CreateWindowEx(WS_EX_CLIENTEDGE, wndcls, "Wine imm32.dll test", - WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, - 240, 120, NULL, NULL, GetModuleHandle(0), NULL); - if (!hwnd) - return FALSE; - - imc = ImmGetContext(hwnd); - if (!imc) - { - win_skip("IME support not implemented\n"); - return FALSE; - } - ImmReleaseContext(hwnd, imc); - - ShowWindow(hwnd, SW_SHOWNORMAL); - UpdateWindow(hwnd); - - msg_spy_init(hwnd); - - return TRUE; -} - -static void cleanup(void) { - msg_spy_cleanup(); - if (hwnd) - DestroyWindow(hwnd); - UnregisterClass(wndcls, GetModuleHandle(0)); -} - -static void test_ImmNotifyIME(void) { - static const char string[] = "wine"; - char resstr[16] = ""; - HIMC imc; - BOOL ret; - - imc = ImmGetContext(hwnd); - msg_spy_flush_msgs(); - - ret = ImmNotifyIME(imc, NI_COMPOSITIONSTR, CPS_CANCEL, 0); - ok(broken(!ret) || - ret, /* Vista+ */ - "Canceling an empty composition string should succeed.\n"); - ok(!msg_spy_find_msg(WM_IME_COMPOSITION), "Windows does not post " - "WM_IME_COMPOSITION in response to NI_COMPOSITIONSTR / CPS_CANCEL, if " - "the composition string being canceled is empty.\n"); - - ImmSetCompositionString(imc, SCS_SETSTR, string, sizeof(string), NULL, 0); - msg_spy_flush_msgs(); - - ImmNotifyIME(imc, NI_COMPOSITIONSTR, CPS_CANCEL, 0); - msg_spy_flush_msgs(); - - /* behavior differs between win9x and NT */ - ret = ImmGetCompositionString(imc, GCS_COMPSTR, resstr, sizeof(resstr)); - ok(!ret, "After being cancelled the composition string is empty.\n"); - - msg_spy_flush_msgs(); - - ret = ImmNotifyIME(imc, NI_COMPOSITIONSTR, CPS_CANCEL, 0); - ok(broken(!ret) || - ret, /* Vista+ */ - "Canceling an empty composition string should succeed.\n"); - ok(!msg_spy_find_msg(WM_IME_COMPOSITION), "Windows does not post " - "WM_IME_COMPOSITION in response to NI_COMPOSITIONSTR / CPS_CANCEL, if " - "the composition string being canceled is empty.\n"); - - msg_spy_flush_msgs(); - ImmReleaseContext(hwnd, imc); -} - -static void test_ImmGetCompositionString(void) -{ - HIMC imc; - static const WCHAR string[] = {'w','i','n','e',0x65e5,0x672c,0x8a9e}; - char cstring[20]; - WCHAR wstring[20]; - DWORD len; - DWORD alen,wlen; - - imc = ImmGetContext(hwnd); - ImmSetCompositionStringW(imc, SCS_SETSTR, string, sizeof(string), NULL,0); - alen = ImmGetCompositionStringA(imc, GCS_COMPSTR, cstring, 20); - wlen = ImmGetCompositionStringW(imc, GCS_COMPSTR, wstring, 20); - /* windows machines without any IME installed just return 0 above */ - if( alen && wlen) - { - len = ImmGetCompositionStringW(imc, GCS_COMPATTR, NULL, 0); - ok(len*sizeof(WCHAR)==wlen,"GCS_COMPATTR(W) not returning correct count\n"); - len = ImmGetCompositionStringA(imc, GCS_COMPATTR, NULL, 0); - ok(len==alen,"GCS_COMPATTR(A) not returning correct count\n"); - } - ImmReleaseContext(hwnd, imc); -} - -static void test_ImmSetCompositionString(void) -{ - HIMC imc; - BOOL ret; - - SetLastError(0xdeadbeef); - imc = ImmGetContext(hwnd); - ok(imc != 0, "ImmGetContext() failed. Last error: %u\n", GetLastError()); - if (!imc) - return; - - ret = ImmSetCompositionStringW(imc, SCS_SETSTR, NULL, 0, NULL, 0); - ok(broken(!ret) || - ret, /* Vista+ */ - "ImmSetCompositionStringW() failed.\n"); - - ret = ImmSetCompositionStringW(imc, SCS_SETSTR | SCS_CHANGEATTR, - NULL, 0, NULL, 0); - ok(!ret, "ImmSetCompositionStringW() succeeded.\n"); - - ret = ImmSetCompositionStringW(imc, SCS_SETSTR | SCS_CHANGECLAUSE, - NULL, 0, NULL, 0); - ok(!ret, "ImmSetCompositionStringW() succeeded.\n"); - - ret = ImmSetCompositionStringW(imc, SCS_CHANGEATTR | SCS_CHANGECLAUSE, - NULL, 0, NULL, 0); - ok(!ret, "ImmSetCompositionStringW() succeeded.\n"); - - ret = ImmSetCompositionStringW(imc, SCS_SETSTR | SCS_CHANGEATTR | SCS_CHANGECLAUSE, - NULL, 0, NULL, 0); - ok(!ret, "ImmSetCompositionStringW() succeeded.\n"); - - ImmReleaseContext(hwnd, imc); -} - -static void test_ImmIME(void) -{ - HIMC imc; - - imc = ImmGetContext(hwnd); - if (imc) - { - BOOL rc; - rc = ImmConfigureIMEA(imc, NULL, IME_CONFIG_REGISTERWORD, NULL); - ok (rc == 0, "ImmConfigureIMEA did not fail\n"); - rc = ImmConfigureIMEW(imc, NULL, IME_CONFIG_REGISTERWORD, NULL); - ok (rc == 0, "ImmConfigureIMEW did not fail\n"); - } - ImmReleaseContext(hwnd,imc); -} - -static void test_ImmAssociateContextEx(void) -{ - HIMC imc; - BOOL rc; - - if (!pImmAssociateContextEx) return; - - imc = ImmGetContext(hwnd); - if (imc) - { - HIMC retimc, newimc; - - newimc = ImmCreateContext(); - ok(newimc != imc, "handles should not be the same\n"); - rc = pImmAssociateContextEx(NULL, NULL, 0); - ok(!rc, "ImmAssociateContextEx succeeded\n"); - rc = pImmAssociateContextEx(hwnd, NULL, 0); - ok(rc, "ImmAssociateContextEx failed\n"); - rc = pImmAssociateContextEx(NULL, imc, 0); - ok(!rc, "ImmAssociateContextEx succeeded\n"); - - rc = pImmAssociateContextEx(hwnd, imc, 0); - ok(rc, "ImmAssociateContextEx failed\n"); - retimc = ImmGetContext(hwnd); - ok(retimc == imc, "handles should be the same\n"); - ImmReleaseContext(hwnd,retimc); - - rc = pImmAssociateContextEx(hwnd, newimc, 0); - ok(rc, "ImmAssociateContextEx failed\n"); - retimc = ImmGetContext(hwnd); - ok(retimc == newimc, "handles should be the same\n"); - ImmReleaseContext(hwnd,retimc); - - rc = pImmAssociateContextEx(hwnd, NULL, IACE_DEFAULT); - ok(rc, "ImmAssociateContextEx failed\n"); - } - ImmReleaseContext(hwnd,imc); -} - -typedef struct _igc_threadinfo { - HWND hwnd; - HANDLE event; - HIMC himc; -} igc_threadinfo; - - -static DWORD WINAPI ImmGetContextThreadFunc( LPVOID lpParam) -{ - HIMC h1,h2; - HWND hwnd2; - COMPOSITIONFORM cf; - POINT pt; - igc_threadinfo *info= (igc_threadinfo*)lpParam; - info->hwnd = CreateWindowEx(WS_EX_CLIENTEDGE, wndcls, "Wine imm32.dll test", - WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, - 240, 120, NULL, NULL, GetModuleHandle(0), NULL); - - h1 = ImmGetContext(hwnd); - todo_wine ok(info->himc == h1, "hwnd context changed in new thread\n"); - h2 = ImmGetContext(info->hwnd); - todo_wine ok(h2 != h1, "new hwnd in new thread should have different context\n"); - info->himc = h2; - ImmReleaseContext(hwnd,h1); - - hwnd2 = CreateWindowEx(WS_EX_CLIENTEDGE, wndcls, "Wine imm32.dll test", - WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, - 240, 120, NULL, NULL, GetModuleHandle(0), NULL); - h1 = ImmGetContext(hwnd2); - - ok(h1 == h2, "Windows in same thread should have same default context\n"); - ImmReleaseContext(hwnd2,h1); - ImmReleaseContext(info->hwnd,h2); - DestroyWindow(hwnd2); - - /* priming for later tests */ - ImmSetCompositionWindow(h1, &cf); - ImmSetStatusWindowPos(h1, &pt); - - SetEvent(info->event); - Sleep(INFINITE); - return 1; -} - -static void test_ImmThreads(void) -{ - HIMC himc, otherHimc, h1; - igc_threadinfo threadinfo; - HANDLE hThread; - DWORD dwThreadId; - BOOL rc; - LOGFONT lf; - COMPOSITIONFORM cf; - DWORD status, sentence; - POINT pt; - - himc = ImmGetContext(hwnd); - threadinfo.event = CreateEvent(NULL, TRUE, FALSE, NULL); - threadinfo.himc = himc; - hThread = CreateThread(NULL, 0, ImmGetContextThreadFunc, &threadinfo, 0, &dwThreadId ); - WaitForSingleObject(threadinfo.event, INFINITE); - - otherHimc = ImmGetContext(threadinfo.hwnd); - - todo_wine ok(himc != otherHimc, "Windows from other threads should have different himc\n"); - todo_wine ok(otherHimc == threadinfo.himc, "Context from other thread should not change in main thread\n"); - - if (0) /* FIXME: Causes wine to hang */ - { - h1 = ImmAssociateContext(hwnd,otherHimc); - ok(h1 == NULL, "Should fail to be able to Associate a default context from a different thread\n"); - h1 = ImmGetContext(hwnd); - ok(h1 == himc, "Context for window should remain unchanged\n"); - ImmReleaseContext(hwnd,h1); - } - - - /* OpenStatus */ - rc = ImmSetOpenStatus(himc, TRUE); - ok(rc != 0, "ImmSetOpenStatus failed\n"); - rc = ImmGetOpenStatus(himc); - ok(rc != 0, "ImmGetOpenStatus failed\n"); - rc = ImmSetOpenStatus(himc, FALSE); - ok(rc != 0, "ImmSetOpenStatus failed\n"); - rc = ImmGetOpenStatus(himc); - ok(rc == 0, "ImmGetOpenStatus failed\n"); - - rc = ImmSetOpenStatus(otherHimc, TRUE); - todo_wine ok(rc == 0, "ImmSetOpenStatus should fail\n"); - rc = ImmGetOpenStatus(otherHimc); - todo_wine ok(rc == 0, "ImmGetOpenStatus failed\n"); - rc = ImmSetOpenStatus(otherHimc, FALSE); - todo_wine ok(rc == 0, "ImmSetOpenStatus should fail\n"); - rc = ImmGetOpenStatus(otherHimc); - ok(rc == 0, "ImmGetOpenStatus failed\n"); - - /* CompositionFont */ - rc = ImmGetCompositionFont(himc, &lf); - ok(rc != 0, "ImmGetCompositionFont failed\n"); - rc = ImmSetCompositionFont(himc, &lf); - ok(rc != 0, "ImmSetCompositionFont failed\n"); - - rc = ImmGetCompositionFont(otherHimc, &lf); - ok(rc != 0 || broken(rc == 0), "ImmGetCompositionFont failed\n"); - rc = ImmSetCompositionFont(otherHimc, &lf); - todo_wine ok(rc == 0, "ImmSetCompositionFont should fail\n"); - - /* CompositionWindow */ - rc = ImmSetCompositionWindow(himc, &cf); - ok(rc != 0, "ImmSetCompositionWindow failed\n"); - rc = ImmGetCompositionWindow(himc, &cf); - ok(rc != 0, "ImmGetCompositionWindow failed\n"); - - rc = ImmSetCompositionWindow(otherHimc, &cf); - todo_wine ok(rc == 0, "ImmSetCompositionWindow should fail\n"); - rc = ImmGetCompositionWindow(otherHimc, &cf); - ok(rc != 0 || broken(rc == 0), "ImmGetCompositionWindow failed\n"); - - /* ConversionStatus */ - rc = ImmGetConversionStatus(himc, &status, &sentence); - ok(rc != 0, "ImmGetConversionStatus failed\n"); - rc = ImmSetConversionStatus(himc, status, sentence); - ok(rc != 0, "ImmSetConversionStatus failed\n"); - - rc = ImmGetConversionStatus(otherHimc, &status, &sentence); - ok(rc != 0 || broken(rc == 0), "ImmGetConversionStatus failed\n"); - rc = ImmSetConversionStatus(otherHimc, status, sentence); - todo_wine ok(rc == 0, "ImmSetConversionStatus should fail\n"); - - /* StatusWindowPos */ - rc = ImmSetStatusWindowPos(himc, &pt); - ok(rc != 0, "ImmSetStatusWindowPos failed\n"); - rc = ImmGetStatusWindowPos(himc, &pt); - ok(rc != 0, "ImmGetStatusWindowPos failed\n"); - - rc = ImmSetStatusWindowPos(otherHimc, &pt); - todo_wine ok(rc == 0, "ImmSetStatusWindowPos should fail\n"); - rc = ImmGetStatusWindowPos(otherHimc, &pt); - ok(rc != 0 || broken(rc == 0), "ImmGetStatusWindowPos failed\n"); - - ImmReleaseContext(threadinfo.hwnd,otherHimc); - ImmReleaseContext(hwnd,himc); - - DestroyWindow(threadinfo.hwnd); - TerminateThread(hThread, 1); - - himc = ImmGetContext(GetDesktopWindow()); - todo_wine ok(himc == NULL, "Should not be able to get himc from other process window\n"); -} - -static void test_ImmIsUIMessage(void) -{ - struct test - { - UINT msg; - BOOL ret; - }; - - static const struct test tests[] = - { - { WM_MOUSEMOVE, FALSE }, - { WM_IME_STARTCOMPOSITION, TRUE }, - { WM_IME_ENDCOMPOSITION, TRUE }, - { WM_IME_COMPOSITION, TRUE }, - { WM_IME_SETCONTEXT, TRUE }, - { WM_IME_NOTIFY, TRUE }, - { WM_IME_CONTROL, FALSE }, - { WM_IME_COMPOSITIONFULL, TRUE }, - { WM_IME_SELECT, TRUE }, - { WM_IME_CHAR, FALSE }, - { 0x287 /* FIXME */, TRUE }, - { WM_IME_REQUEST, FALSE }, - { WM_IME_KEYDOWN, FALSE }, - { WM_IME_KEYUP, FALSE }, - { 0, FALSE } /* mark the end */ - }; - - const struct test *test; - BOOL ret; - - if (!pImmIsUIMessageA) return; - - for (test = tests; test->msg; test++) - { - msg_spy_flush_msgs(); - ret = pImmIsUIMessageA(NULL, test->msg, 0, 0); - ok(ret == test->ret, "ImmIsUIMessageA returned %x for %x\n", ret, test->msg); - ok(!msg_spy_find_msg(test->msg), "Windows does not send 0x%x for NULL hwnd\n", test->msg); - - ret = pImmIsUIMessageA(hwnd, test->msg, 0, 0); - ok(ret == test->ret, "ImmIsUIMessageA returned %x for %x\n", ret, test->msg); - if (ret) - ok(msg_spy_find_msg(test->msg) != NULL, "Windows does send 0x%x\n", test->msg); - else - ok(!msg_spy_find_msg(test->msg), "Windows does not send 0x%x\n", test->msg); - } -} - -static void test_ImmGetContext(void) -{ - HIMC himc; - DWORD err; - - SetLastError(0xdeadbeef); - himc = ImmGetContext((HWND)0xffffffff); - err = GetLastError(); - ok(himc == NULL, "ImmGetContext succeeded\n"); - ok(err == ERROR_INVALID_WINDOW_HANDLE, "got %u\n", err); - - himc = ImmGetContext(hwnd); - ok(himc != NULL, "ImmGetContext failed\n"); - ok(ImmReleaseContext(hwnd, himc), "ImmReleaseContext failed\n"); -} - -START_TEST(imm32) { - if (init()) - { - test_ImmNotifyIME(); - test_ImmGetCompositionString(); - test_ImmSetCompositionString(); - test_ImmIME(); - test_ImmAssociateContextEx(); - test_ImmThreads(); - test_ImmIsUIMessage(); - test_ImmGetContext(); - } - cleanup(); -} diff --git a/rostests/winetests/imm32/imm32.rbuild b/rostests/winetests/imm32/imm32.rbuild deleted file mode 100644 index 94abb2a8262..00000000000 --- a/rostests/winetests/imm32/imm32.rbuild +++ /dev/null @@ -1,14 +0,0 @@ - - - - - . - - imm32.c - testlist.c - wine - imm32 - user32 - ntdll - - diff --git a/rostests/winetests/imm32/testlist.c b/rostests/winetests/imm32/testlist.c deleted file mode 100644 index a7911d1b0e0..00000000000 --- a/rostests/winetests/imm32/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_imm32(void); - -const struct test winetest_testlist[] = -{ - { "imm32", func_imm32 }, - { 0, 0 } -}; diff --git a/rostests/winetests/inetcomm/CMakeLists.txt b/rostests/winetests/inetcomm/CMakeLists.txt deleted file mode 100644 index 2e07f3ddff3..00000000000 --- a/rostests/winetests/inetcomm/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ - -add_definitions(-D__ROS_LONG64__) - -list(APPEND SOURCE - mimeintl.c - mimeole.c - testlist.c) - -add_executable(inetcomm_winetest ${SOURCE}) -target_link_libraries(inetcomm_winetest wine) - -if(MSVC) - target_link_libraries(inetcomm_winetest uuid) -endif() - -set_module_type(inetcomm_winetest win32cui) -add_importlibs(inetcomm_winetest inetcomm oleaut32 ole32 msvcrt kernel32 ntdll) -add_cd_file(TARGET inetcomm_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/inetcomm/inetcomm.rbuild b/rostests/winetests/inetcomm/inetcomm.rbuild deleted file mode 100644 index ae1daf3c188..00000000000 --- a/rostests/winetests/inetcomm/inetcomm.rbuild +++ /dev/null @@ -1,12 +0,0 @@ - - . - - mimeintl.c - mimeole.c - testlist.c - wine - inetcomm - oleaut32 - ole32 - ntdll - diff --git a/rostests/winetests/inetcomm/mimeintl.c b/rostests/winetests/inetcomm/mimeintl.c deleted file mode 100644 index f64d7d93d23..00000000000 --- a/rostests/winetests/inetcomm/mimeintl.c +++ /dev/null @@ -1,304 +0,0 @@ -/* - * MimeInternational tests - * - * Copyright 2008 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 - */ - -#define COBJMACROS -#define NONAMELESSUNION - -#include "windows.h" -#include "ole2.h" -#include "ocidl.h" - -#include "mimeole.h" - -#include "initguid.h" -#include "mlang.h" - -#include -#include - -#include "wine/test.h" - -static void test_create(void) -{ - IMimeInternational *internat, *internat2; - HRESULT hr; - ULONG ref; - - hr = MimeOleGetInternat(&internat); - ok(hr == S_OK, "ret %08x\n", hr); - hr = MimeOleGetInternat(&internat2); - ok(hr == S_OK, "ret %08x\n", hr); - - /* Under w2k8 it's no longer a singleton */ - if(internat == internat2) - { - /* test to show that the object is a singleton with - a reference held by the dll. */ - ref = IMimeInternational_Release(internat2); - ok(ref == 2 || - ref == 1, /* win95 - object is a static singleton */ - "got %d\n", ref); - - ref = IMimeInternational_Release(internat); - ok(ref == 1, "got %d\n", ref); - } - else - { - ref = IMimeInternational_Release(internat2); - ok(ref == 0, "got %d\n", ref); - - ref = IMimeInternational_Release(internat); - ok(ref == 0, "got %d\n", ref); - } - -} - -static inline HRESULT get_mlang(IMultiLanguage **ml) -{ - return CoCreateInstance(&CLSID_CMultiLanguage, NULL, CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER, - &IID_IMultiLanguage, (void **)ml); -} - -static HRESULT mlang_getcsetinfo(const char *charset, MIMECSETINFO *mlang_info) -{ - DWORD len = MultiByteToWideChar(CP_ACP, 0, charset, -1, NULL, 0); - BSTR bstr = SysAllocStringLen(NULL, len - 1); - HRESULT hr; - IMultiLanguage *ml; - - MultiByteToWideChar(CP_ACP, 0, charset, -1, bstr, len); - - hr = get_mlang(&ml); - - if(SUCCEEDED(hr)) - { - hr = IMultiLanguage_GetCharsetInfo(ml, bstr, mlang_info); - IMultiLanguage_Release(ml); - } - SysFreeString(bstr); - if(FAILED(hr)) hr = MIME_E_NOT_FOUND; - return hr; -} - -static HRESULT mlang_getcodepageinfo(UINT cp, MIMECPINFO *mlang_cp_info) -{ - HRESULT hr; - IMultiLanguage *ml; - - hr = get_mlang(&ml); - - if(SUCCEEDED(hr)) - { - hr = IMultiLanguage_GetCodePageInfo(ml, cp, mlang_cp_info); - IMultiLanguage_Release(ml); - } - return hr; -} - -static HRESULT mlang_getcsetinfo_from_cp(UINT cp, CHARSETTYPE charset_type, MIMECSETINFO *mlang_info) -{ - MIMECPINFO mlang_cp_info; - WCHAR *charset_name; - HRESULT hr; - IMultiLanguage *ml; - - hr = mlang_getcodepageinfo(cp, &mlang_cp_info); - if(FAILED(hr)) return hr; - - switch(charset_type) - { - case CHARSET_BODY: - charset_name = mlang_cp_info.wszBodyCharset; - break; - case CHARSET_HEADER: - charset_name = mlang_cp_info.wszHeaderCharset; - break; - case CHARSET_WEB: - charset_name = mlang_cp_info.wszWebCharset; - break; - } - - hr = get_mlang(&ml); - - if(SUCCEEDED(hr)) - { - hr = IMultiLanguage_GetCharsetInfo(ml, charset_name, mlang_info); - IMultiLanguage_Release(ml); - } - return hr; -} - -static void test_charset(void) -{ - IMimeInternational *internat; - HRESULT hr; - HCHARSET hcs, hcs_windows_1252, hcs_windows_1251; - INETCSETINFO cs_info; - MIMECSETINFO mlang_cs_info; - - hr = MimeOleGetInternat(&internat); - ok(hr == S_OK, "ret %08x\n", hr); - - hr = IMimeInternational_FindCharset(internat, "nonexistent", &hcs); - ok(hr == MIME_E_NOT_FOUND, "got %08x\n", hr); - - hr = IMimeInternational_FindCharset(internat, "windows-1252", &hcs_windows_1252); - ok(hr == S_OK, "got %08x\n", hr); - hr = IMimeInternational_FindCharset(internat, "windows-1252", &hcs); - ok(hr == S_OK, "got %08x\n", hr); - ok(hcs_windows_1252 == hcs, "got different hcharsets for the same name\n"); - hr = IMimeInternational_FindCharset(internat, "WiNdoWs-1252", &hcs); - ok(hr == S_OK, "got %08x\n", hr); - ok(hcs_windows_1252 == hcs, "got different hcharsets for the same name\n"); - - hr = IMimeInternational_FindCharset(internat, "windows-1251", &hcs_windows_1251); - ok(hr == S_OK, "got %08x\n", hr); - ok(hcs_windows_1252 != hcs_windows_1251, "got the same hcharset for the different names\n"); - - hr = IMimeInternational_GetCharsetInfo(internat, hcs_windows_1252, &cs_info); - ok(hr == S_OK, "got %08x\n", hr); - - hr = mlang_getcsetinfo("windows-1252", &mlang_cs_info); - ok(hr == S_OK, "got %08x\n", hr); - ok(cs_info.cpiWindows == mlang_cs_info.uiCodePage, "cpiWindows %d while mlang uiCodePage %d\n", - cs_info.cpiWindows, mlang_cs_info.uiCodePage); - ok(cs_info.cpiInternet == mlang_cs_info.uiInternetEncoding, "cpiInternet %d while mlang uiInternetEncoding %d\n", - cs_info.cpiInternet, mlang_cs_info.uiInternetEncoding); - ok(cs_info.hCharset == hcs_windows_1252, "hCharset doesn't match requested\n"); - ok(!strcmp(cs_info.szName, "windows-1252"), "szName doesn't match requested\n"); - - hr = IMimeInternational_GetCodePageCharset(internat, 1252, CHARSET_BODY, &hcs); - ok(hr == S_OK, "got %08x\n", hr); - hr = IMimeInternational_GetCharsetInfo(internat, hcs, &cs_info); - ok(hr == S_OK, "got %08x\n", hr); - - hr = mlang_getcsetinfo_from_cp(1252, CHARSET_BODY, &mlang_cs_info); - ok(hr == S_OK, "got %08x\n", hr); - ok(cs_info.cpiWindows == mlang_cs_info.uiCodePage, "cpiWindows %d while mlang uiCodePage %d\n", - cs_info.cpiWindows, mlang_cs_info.uiCodePage); - ok(cs_info.cpiInternet == mlang_cs_info.uiInternetEncoding, "cpiInternet %d while mlang uiInternetEncoding %d\n", - cs_info.cpiInternet, mlang_cs_info.uiInternetEncoding); - - IMimeInternational_Release(internat); -} - -static void test_defaultcharset(void) -{ - IMimeInternational *internat; - HRESULT hr; - HCHARSET hcs_default, hcs, hcs_windows_1251; - - hr = MimeOleGetInternat(&internat); - ok(hr == S_OK, "ret %08x\n", hr); - - hr = IMimeInternational_GetDefaultCharset(internat, &hcs_default); - ok(hr == S_OK, "ret %08x\n", hr); - hr = IMimeInternational_GetCodePageCharset(internat, GetACP(), CHARSET_BODY, &hcs); - ok(hr == S_OK, "ret %08x\n", hr); - ok(hcs_default == hcs, "Unexpected default charset\n"); - - hr = IMimeInternational_FindCharset(internat, "windows-1251", &hcs_windows_1251); - ok(hr == S_OK, "got %08x\n", hr); - hr = IMimeInternational_SetDefaultCharset(internat, hcs_windows_1251); - ok(hr == S_OK, "ret %08x\n", hr); - hr = IMimeInternational_GetDefaultCharset(internat, &hcs); - ok(hr == S_OK, "ret %08x\n", hr); - ok(hcs == hcs_windows_1251, "didn't retrieve recently set default\n"); - /* Set the old default back again */ - hr = IMimeInternational_SetDefaultCharset(internat, hcs_default); - ok(hr == S_OK, "ret %08x\n", hr); - - IMimeInternational_Release(internat); -} - -static void test_convert(void) -{ - IMimeInternational *internat; - HRESULT hr; - BLOB src, dst; - ULONG read; - PROPVARIANT prop_in, prop_out; - static char test_string[] = "test string"; - static WCHAR test_stringW[] = {'t','e','s','t',' ','s','t','r','i','n','g',0}; - - hr = MimeOleGetInternat(&internat); - ok(hr == S_OK, "ret %08x\n", hr); - - src.pBlobData = (BYTE*)test_string; - src.cbSize = sizeof(test_string); - hr = IMimeInternational_ConvertBuffer(internat, 1252, 28591, &src, &dst, &read); - ok(hr == S_OK, "ret %08x\n", hr); - ok(read == sizeof(test_string), "got %d\n", read); - ok(dst.cbSize == sizeof(test_string), "got %d\n", dst.cbSize); - CoTaskMemFree(dst.pBlobData); - - src.cbSize = 2; - hr = IMimeInternational_ConvertBuffer(internat, 1252, 28591, &src, &dst, &read); - ok(hr == S_OK, "ret %08x\n", hr); - ok(read == 2, "got %d\n", read); - ok(dst.cbSize == 2, "got %d\n", dst.cbSize); - CoTaskMemFree(dst.pBlobData); - - prop_in.vt = VT_LPWSTR; - prop_in.u.pwszVal = test_stringW; - hr = IMimeInternational_ConvertString(internat, CP_UNICODE, 1252, &prop_in, &prop_out); - ok(hr == S_OK, "ret %08x\n", hr); - ok(prop_out.vt == VT_LPSTR, "got %d\n", prop_out.vt); - ok(!strcmp(prop_out.u.pszVal, test_string), "got %s\n", prop_out.u.pszVal); - PropVariantClear(&prop_out); - - /* If in.vt is VT_LPWSTR, ignore cpiSrc */ - prop_in.vt = VT_LPWSTR; - prop_in.u.pwszVal = test_stringW; - hr = IMimeInternational_ConvertString(internat, 28591, 1252, &prop_in, &prop_out); - ok(hr == S_OK, "ret %08x\n", hr); - ok(prop_out.vt == VT_LPSTR, "got %d\n", prop_out.vt); - ok(!strcmp(prop_out.u.pszVal, test_string), "got %s\n", prop_out.u.pszVal); - PropVariantClear(&prop_out); - - prop_in.vt = VT_LPSTR; - prop_in.u.pszVal = test_string; - hr = IMimeInternational_ConvertString(internat, 28591, CP_UNICODE, &prop_in, &prop_out); - ok(hr == S_OK, "ret %08x\n", hr); - ok(prop_out.vt == VT_LPWSTR, "got %d\n", prop_out.vt); - ok(!lstrcmpW(prop_out.u.pwszVal, test_stringW), "mismatched strings\n"); - PropVariantClear(&prop_out); - - /* If in.vt is VT_LPSTR and cpiSrc is CP_UNICODE, use another multibyte codepage (probably GetACP()) */ - prop_in.vt = VT_LPSTR; - prop_in.u.pszVal = test_string; - hr = IMimeInternational_ConvertString(internat, CP_UNICODE, CP_UNICODE, &prop_in, &prop_out); - ok(hr == S_OK, "ret %08x\n", hr); - ok(prop_out.vt == VT_LPWSTR, "got %d\n", prop_out.vt); - ok(!lstrcmpW(prop_out.u.pwszVal, test_stringW), "mismatched strings\n"); - PropVariantClear(&prop_out); - - IMimeInternational_Release(internat); -} - -START_TEST(mimeintl) -{ - OleInitialize(NULL); - test_create(); - test_charset(); - test_defaultcharset(); - test_convert(); - OleUninitialize(); -} diff --git a/rostests/winetests/inetcomm/mimeole.c b/rostests/winetests/inetcomm/mimeole.c deleted file mode 100644 index 7edef676f50..00000000000 --- a/rostests/winetests/inetcomm/mimeole.c +++ /dev/null @@ -1,344 +0,0 @@ -/* - * MimeOle tests - * - * Copyright 2007 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 - */ - -#define COBJMACROS -#define NONAMELESSUNION - -#include "initguid.h" -#include "windows.h" -#include "ole2.h" -#include "ocidl.h" - -#include "mimeole.h" - -#include -#include - -#include "wine/test.h" - -static char msg1[] = - "MIME-Version: 1.0\r\n" - "Content-Type: multipart/mixed;\r\n" - " boundary=\"------------1.5.0.6\";\r\n" - " stuff=\"du;nno\";\r\n" - " morestuff=\"so\\\\me\\\"thing\\\"\"\r\n" - "foo: bar\r\n" - "From: Huw Davies \r\n" - "From: Me \r\n" - "To: wine-patches \r\n" - "Cc: Huw Davies ,\r\n" - " \"Fred Bloggs\" \r\n" - "foo: baz\r\n" - "bar: fum\r\n" - "\r\n" - "This is a multi-part message in MIME format.\r\n" - "--------------1.5.0.6\r\n" - "Content-Type: text/plain; format=fixed; charset=UTF-8\r\n" - "Content-Transfer-Encoding: 8bit\r\n" - "\r\n" - "Stuff\r\n" - "--------------1.5.0.6\r\n" - "Content-Type: text/plain; charset=\"us-ascii\"\r\n" - "Content-Transfer-Encoding: 7bit\r\n" - "\r\n" - "More stuff\r\n" - "--------------1.5.0.6--\r\n"; - -static void test_CreateVirtualStream(void) -{ - HRESULT hr; - IStream *pstm; - - hr = MimeOleCreateVirtualStream(&pstm); - ok(hr == S_OK, "ret %08x\n", hr); - - IStream_Release(pstm); -} - -static void test_CreateSecurity(void) -{ - HRESULT hr; - IMimeSecurity *sec; - - hr = MimeOleCreateSecurity(&sec); - ok(hr == S_OK, "ret %08x\n", hr); - - IMimeSecurity_Release(sec); -} - -static void test_CreateBody(void) -{ - HRESULT hr; - IMimeBody *body; - HBODY handle = (void *)0xdeadbeef; - IStream *in; - LARGE_INTEGER off; - ULARGE_INTEGER pos; - ENCODINGTYPE enc; - ULONG count, found_param, i; - MIMEPARAMINFO *param_info; - IMimeAllocator *alloc; - BODYOFFSETS offsets; - - hr = CoCreateInstance(&CLSID_IMimeBody, NULL, CLSCTX_INPROC_SERVER, &IID_IMimeBody, (void**)&body); - ok(hr == S_OK, "ret %08x\n", hr); - - hr = IMimeBody_GetHandle(body, &handle); - ok(hr == MIME_E_NO_DATA, "ret %08x\n", hr); - ok(handle == NULL, "handle %p\n", handle); - - hr = CreateStreamOnHGlobal(NULL, TRUE, &in); - ok(hr == S_OK, "ret %08x\n", hr); - IStream_Write(in, msg1, sizeof(msg1) - 1, NULL); - off.QuadPart = 0; - IStream_Seek(in, off, STREAM_SEEK_SET, NULL); - - /* Need to call InitNew before Load otherwise Load crashes with native inetcomm */ - hr = IMimeBody_InitNew(body); - ok(hr == S_OK, "ret %08x\n", hr); - - hr = IMimeBody_GetCurrentEncoding(body, &enc); - ok(hr == S_OK, "ret %08x\n", hr); - ok(enc == IET_7BIT, "encoding %d\n", enc); - - hr = IMimeBody_Load(body, in); - ok(hr == S_OK, "ret %08x\n", hr); - off.QuadPart = 0; - IStream_Seek(in, off, STREAM_SEEK_CUR, &pos); - ok(pos.u.LowPart == 359, "pos %u\n", pos.u.LowPart); - - hr = IMimeBody_IsContentType(body, "multipart", "mixed"); - ok(hr == S_OK, "ret %08x\n", hr); - hr = IMimeBody_IsContentType(body, "text", "plain"); - ok(hr == S_FALSE, "ret %08x\n", hr); - hr = IMimeBody_IsContentType(body, NULL, "mixed"); - ok(hr == S_OK, "ret %08x\n", hr); - hr = IMimeBody_IsType(body, IBT_EMPTY); - ok(hr == S_OK, "got %08x\n", hr); - - hr = IMimeBody_SetData(body, IET_8BIT, "text", "plain", &IID_IStream, in); - ok(hr == S_OK, "ret %08x\n", hr); - hr = IMimeBody_IsContentType(body, "text", "plain"); - todo_wine - ok(hr == S_OK, "ret %08x\n", hr); - hr = IMimeBody_GetCurrentEncoding(body, &enc); - ok(hr == S_OK, "ret %08x\n", hr); - ok(enc == IET_8BIT, "encoding %d\n", enc); - - memset(&offsets, 0xcc, sizeof(offsets)); - hr = IMimeBody_GetOffsets(body, &offsets); - ok(hr == MIME_E_NO_DATA, "ret %08x\n", hr); - ok(offsets.cbBoundaryStart == 0, "got %d\n", offsets.cbBoundaryStart); - ok(offsets.cbHeaderStart == 0, "got %d\n", offsets.cbHeaderStart); - ok(offsets.cbBodyStart == 0, "got %d\n", offsets.cbBodyStart); - ok(offsets.cbBodyEnd == 0, "got %d\n", offsets.cbBodyEnd); - - hr = IMimeBody_IsType(body, IBT_EMPTY); - ok(hr == S_FALSE, "got %08x\n", hr); - - hr = MimeOleGetAllocator(&alloc); - ok(hr == S_OK, "ret %08x\n", hr); - - hr = IMimeBody_GetParameters(body, "nothere", &count, ¶m_info); - ok(hr == MIME_E_NOT_FOUND, "ret %08x\n", hr); - ok(count == 0, "got %d\n", count); - ok(!param_info, "got %p\n", param_info); - - hr = IMimeBody_GetParameters(body, "bar", &count, ¶m_info); - ok(hr == S_OK, "ret %08x\n", hr); - ok(count == 0, "got %d\n", count); - ok(!param_info, "got %p\n", param_info); - - hr = IMimeBody_GetParameters(body, "Content-Type", &count, ¶m_info); - ok(hr == S_OK, "ret %08x\n", hr); - todo_wine /* native adds a charset parameter */ - ok(count == 4, "got %d\n", count); - ok(param_info != NULL, "got %p\n", param_info); - - found_param = 0; - for(i = 0; i < count; i++) - { - if(!strcmp(param_info[i].pszName, "morestuff")) - { - found_param++; - ok(!strcmp(param_info[i].pszData, "so\\me\"thing\""), - "got %s\n", param_info[i].pszData); - } - else if(!strcmp(param_info[i].pszName, "stuff")) - { - found_param++; - ok(!strcmp(param_info[i].pszData, "du;nno"), - "got %s\n", param_info[i].pszData); - } - } - ok(found_param == 2, "matched %d params\n", found_param); - - hr = IMimeAllocator_FreeParamInfoArray(alloc, count, param_info, TRUE); - ok(hr == S_OK, "ret %08x\n", hr); - IMimeAllocator_Release(alloc); - - IStream_Release(in); - IMimeBody_Release(body); -} - -static void test_Allocator(void) -{ - HRESULT hr; - IMimeAllocator *alloc; - - hr = MimeOleGetAllocator(&alloc); - ok(hr == S_OK, "ret %08x\n", hr); - IMimeAllocator_Release(alloc); -} - -static void test_CreateMessage(void) -{ - HRESULT hr; - IMimeMessage *msg; - IStream *stream; - LARGE_INTEGER pos; - LONG ref; - HBODY hbody; - IMimeBody *body; - BODYOFFSETS offsets; - ULONG count; - FINDBODY find_struct; - HCHARSET hcs; - - char text[] = "text"; - HBODY *body_list; - PROPVARIANT prop; - static char att_pritype[] = "att:pri-content-type"; - - hr = MimeOleCreateMessage(NULL, &msg); - ok(hr == S_OK, "ret %08x\n", hr); - - CreateStreamOnHGlobal(NULL, TRUE, &stream); - IStream_Write(stream, msg1, sizeof(msg1) - 1, NULL); - pos.QuadPart = 0; - IStream_Seek(stream, pos, STREAM_SEEK_SET, NULL); - - hr = IMimeMessage_Load(msg, stream); - ok(hr == S_OK, "ret %08x\n", hr); - - hr = IMimeMessage_CountBodies(msg, HBODY_ROOT, TRUE, &count); - ok(hr == S_OK, "ret %08x\n", hr); - ok(count == 3, "got %d\n", count); - - hr = IMimeMessage_CountBodies(msg, HBODY_ROOT, FALSE, &count); - ok(hr == S_OK, "ret %08x\n", hr); - ok(count == 3, "got %d\n", count); - - hr = IMimeMessage_BindToObject(msg, HBODY_ROOT, &IID_IMimeBody, (void**)&body); - ok(hr == S_OK, "ret %08x\n", hr); - hr = IMimeBody_GetOffsets(body, &offsets); - ok(hr == S_OK, "ret %08x\n", hr); - ok(offsets.cbBoundaryStart == 0, "got %d\n", offsets.cbBoundaryStart); - ok(offsets.cbHeaderStart == 0, "got %d\n", offsets.cbHeaderStart); - ok(offsets.cbBodyStart == 359, "got %d\n", offsets.cbBodyStart); - ok(offsets.cbBodyEnd == 666, "got %d\n", offsets.cbBodyEnd); - IMimeBody_Release(body); - - hr = IMimeMessage_GetBody(msg, IBL_ROOT, NULL, &hbody); - - PropVariantInit(&prop); - hr = IMimeMessage_GetBodyProp(msg, hbody, att_pritype, 0, &prop); - ok(hr == S_OK, "ret %08x\n", hr); - ok(prop.vt == VT_LPSTR, "vt %08x\n", prop.vt); - ok(!strcasecmp(prop.u.pszVal, "multipart"), "got %s\n", prop.u.pszVal); - PropVariantClear(&prop); - - hr = IMimeMessage_GetBody(msg, IBL_FIRST, hbody, &hbody); - ok(hr == S_OK, "ret %08x\n", hr); - hr = IMimeMessage_BindToObject(msg, hbody, &IID_IMimeBody, (void**)&body); - ok(hr == S_OK, "ret %08x\n", hr); - hr = IMimeBody_GetOffsets(body, &offsets); - ok(hr == S_OK, "ret %08x\n", hr); - ok(offsets.cbBoundaryStart == 405, "got %d\n", offsets.cbBoundaryStart); - ok(offsets.cbHeaderStart == 428, "got %d\n", offsets.cbHeaderStart); - ok(offsets.cbBodyStart == 518, "got %d\n", offsets.cbBodyStart); - ok(offsets.cbBodyEnd == 523, "got %d\n", offsets.cbBodyEnd); - - hr = IMimeBody_GetCharset(body, &hcs); - ok(hr == S_OK, "ret %08x\n", hr); - todo_wine - { - ok(hcs != NULL, "Expected non-NULL charset\n"); - } - - IMimeBody_Release(body); - - hr = IMimeMessage_GetBody(msg, IBL_NEXT, hbody, &hbody); - ok(hr == S_OK, "ret %08x\n", hr); - hr = IMimeMessage_BindToObject(msg, hbody, &IID_IMimeBody, (void**)&body); - ok(hr == S_OK, "ret %08x\n", hr); - hr = IMimeBody_GetOffsets(body, &offsets); - ok(hr == S_OK, "ret %08x\n", hr); - ok(offsets.cbBoundaryStart == 525, "got %d\n", offsets.cbBoundaryStart); - ok(offsets.cbHeaderStart == 548, "got %d\n", offsets.cbHeaderStart); - ok(offsets.cbBodyStart == 629, "got %d\n", offsets.cbBodyStart); - ok(offsets.cbBodyEnd == 639, "got %d\n", offsets.cbBodyEnd); - IMimeBody_Release(body); - - find_struct.pszPriType = text; - find_struct.pszSubType = NULL; - - hr = IMimeMessage_FindFirst(msg, &find_struct, &hbody); - ok(hr == S_OK, "ret %08x\n", hr); - - hr = IMimeMessage_FindNext(msg, &find_struct, &hbody); - ok(hr == S_OK, "ret %08x\n", hr); - - hr = IMimeMessage_FindNext(msg, &find_struct, &hbody); - ok(hr == MIME_E_NOT_FOUND, "ret %08x\n", hr); - - hr = IMimeMessage_GetAttachments(msg, &count, &body_list); - ok(hr == S_OK, "ret %08x\n", hr); - ok(count == 2, "got %d\n", count); - CoTaskMemFree(body_list); - - hr = IMimeMessage_GetCharset(body, &hcs); - ok(hr == S_OK, "ret %08x\n", hr); - todo_wine - { - ok(hcs != NULL, "Expected non-NULL charset\n"); - } - - IMimeMessage_Release(msg); - - ref = IStream_AddRef(stream); - ok(ref == 2 || - broken(ref == 1), /* win95 */ - "ref %d\n", ref); - IStream_Release(stream); - - IStream_Release(stream); -} - -START_TEST(mimeole) -{ - OleInitialize(NULL); - test_CreateVirtualStream(); - test_CreateSecurity(); - test_CreateBody(); - test_Allocator(); - test_CreateMessage(); - OleUninitialize(); -} diff --git a/rostests/winetests/inetcomm/testlist.c b/rostests/winetests/inetcomm/testlist.c deleted file mode 100644 index fd53432c649..00000000000 --- a/rostests/winetests/inetcomm/testlist.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_mimeintl(void); -extern void func_mimeole(void); - -const struct test winetest_testlist[] = -{ - { "mimeintl", func_mimeintl }, - { "mimeole", func_mimeole }, - { 0, 0 } -}; diff --git a/rostests/winetests/inetmib1/CMakeLists.txt b/rostests/winetests/inetmib1/CMakeLists.txt deleted file mode 100644 index 205b345ffa3..00000000000 --- a/rostests/winetests/inetmib1/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(inetmib1_winetest main.c testlist.c) -target_link_libraries(inetmib1_winetest wine) -set_module_type(inetmib1_winetest win32cui) -add_importlibs(inetmib1_winetest snmpapi msvcrt kernel32 ntdll) -add_cd_file(TARGET inetmib1_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/inetmib1/inetmib1.rbuild b/rostests/winetests/inetmib1/inetmib1.rbuild deleted file mode 100644 index 467cfb35fed..00000000000 --- a/rostests/winetests/inetmib1/inetmib1.rbuild +++ /dev/null @@ -1,9 +0,0 @@ - - . - - main.c - testlist.c - wine - snmpapi - ntdll - diff --git a/rostests/winetests/inetmib1/main.c b/rostests/winetests/inetmib1/main.c deleted file mode 100644 index cc0e56f2a6a..00000000000 --- a/rostests/winetests/inetmib1/main.c +++ /dev/null @@ -1,479 +0,0 @@ -/* - * Copyright 2008 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 - */ -#include -#include -#include -#include -#include - -#include "wine/test.h" - -static HMODULE inetmib1; - -static void testInit(void) -{ - BOOL (WINAPI *pInit)(DWORD, HANDLE *, AsnObjectIdentifier *); - BOOL ret; - HANDLE event; - AsnObjectIdentifier oid; - - pInit = (void *)GetProcAddress(inetmib1, "SnmpExtensionInit"); - if (!pInit) - { - win_skip("no SnmpExtensionInit\n"); - return; - } - /* Crash - ret = pInit(0, NULL, NULL); - ret = pInit(0, NULL, &oid); - ret = pInit(0, &event, NULL); - */ - ret = pInit(0, &event, &oid); - ok(ret, "SnmpExtensionInit failed: %d\n", GetLastError()); - ok(!strcmp("1.3.6.1.2.1.1", SnmpUtilOidToA(&oid)), - "Expected 1.3.6.1.2.1.1, got %s\n", SnmpUtilOidToA(&oid)); - - SnmpUtilOidFree(&oid); -} - -static void testQuery(void) -{ - BOOL (WINAPI *pQuery)(BYTE, SnmpVarBindList *, AsnInteger32 *, - AsnInteger32 *); - BOOL ret, moreData, noChange; - SnmpVarBindList list; - AsnInteger32 error, index; - UINT bogus[] = { 1,2,3,4 }; - UINT mib2System[] = { 1,3,6,1,2,1,1 }; - UINT mib2If[] = { 1,3,6,1,2,1,2 }; - UINT mib2IfTable[] = { 1,3,6,1,2,1,2,2 }; - UINT mib2IfDescr[] = { 1,3,6,1,2,1,2,2,1,2 }; - UINT mib2IfAdminStatus[] = { 1,3,6,1,2,1,2,2,1,7 }; - UINT mib2IfOperStatus[] = { 1,3,6,1,2,1,2,2,1,8 }; - UINT mib2IpAddr[] = { 1,3,6,1,2,1,4,20,1,1 }; - UINT mib2IpRouteTable[] = { 1,3,6,1,2,1,4,21,1,1 }; - UINT mib2UdpTable[] = { 1,3,6,1,2,1,7,5,1,1 }; - SnmpVarBind vars[3], vars2[3], vars3[3]; - UINT entry; - - pQuery = (void *)GetProcAddress(inetmib1, "SnmpExtensionQuery"); - if (!pQuery) - { - win_skip("couldn't find SnmpExtensionQuery\n"); - return; - } - /* Crash - ret = pQuery(0, NULL, NULL, NULL); - ret = pQuery(0, NULL, &error, NULL); - ret = pQuery(0, NULL, NULL, &index); - ret = pQuery(0, &list, NULL, NULL); - ret = pQuery(0, &list, &error, NULL); - */ - - /* An empty list succeeds */ - list.len = 0; - error = 0xdeadbeef; - index = 0xdeadbeef; - ret = pQuery(SNMP_PDU_GET, &list, &error, &index); - ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index); - ok(error == SNMP_ERRORSTATUS_NOERROR, - "expected SNMP_ERRORSTATUS_NOERROR, got %d\n", error); - ok(index == 0, "expected index 0, got %d\n", index); - - /* Oddly enough, this "succeeds," even though the OID is clearly - * unsupported. - */ - vars[0].name.idLength = sizeof(bogus) / sizeof(bogus[0]); - vars[0].name.ids = bogus; - vars[0].value.asnType = 0; - list.len = 1; - list.list = vars; - SetLastError(0xdeadbeef); - error = 0xdeadbeef; - index = 0xdeadbeef; - ret = pQuery(SNMP_PDU_GET, &list, &error, &index); - ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index); - ok(error == SNMP_ERRORSTATUS_NOERROR || - error == ERROR_FILE_NOT_FOUND /* Win9x */, - "expected SNMP_ERRORSTATUS_NOERROR or ERROR_FILE_NOT_FOUND, got %d\n", - error); - if (error == SNMP_ERRORSTATUS_NOERROR) - ok(index == 0, "expected index 0, got %d\n", index); - else if (error == ERROR_FILE_NOT_FOUND) - ok(index == 1, "expected index 1, got %d\n", index); - /* The OID isn't changed either: */ - ok(!strcmp("1.2.3.4", SnmpUtilOidToA(&vars[0].name)), - "expected 1.2.3.4, got %s\n", SnmpUtilOidToA(&vars[0].name)); - - /* The table is not an accessible variable, so it fails */ - vars[0].name.idLength = sizeof(mib2IfTable) / sizeof(mib2IfTable[0]); - vars[0].name.ids = mib2IfTable; - SetLastError(0xdeadbeef); - error = 0xdeadbeef; - index = 0xdeadbeef; - ret = pQuery(SNMP_PDU_GET, &list, &error, &index); - ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index); - ok(error == SNMP_ERRORSTATUS_NOSUCHNAME, - "expected SNMP_ERRORSTATUS_NOSUCHNAME, got %d\n", error); - /* The index is 1-based rather than 0-based */ - ok(index == 1, "expected index 1, got %d\n", index); - - /* A Get fails on something that specifies a table (but not a particular - * entry in it)... - */ - vars[0].name.idLength = sizeof(mib2IfDescr) / sizeof(mib2IfDescr[0]); - vars[0].name.ids = mib2IfDescr; - vars[1].name.idLength = - sizeof(mib2IfAdminStatus) / sizeof(mib2IfAdminStatus[0]); - vars[1].name.ids = mib2IfAdminStatus; - vars[2].name.idLength = - sizeof(mib2IfOperStatus) / sizeof(mib2IfOperStatus[0]); - vars[2].name.ids = mib2IfOperStatus; - list.len = 3; - SetLastError(0xdeadbeef); - error = 0xdeadbeef; - index = 0xdeadbeef; - ret = pQuery(SNMP_PDU_GET, &list, &error, &index); - ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index); - ok(error == SNMP_ERRORSTATUS_NOSUCHNAME, - "expected SNMP_ERRORSTATUS_NOSUCHNAME, got %d\n", error); - ok(index == 1, "expected index 1, got %d\n", index); - /* but a GetNext succeeds with the same values, because GetNext gets the - * entry after the specified OID, not the entry specified by it. The - * successor to the table is the first entry in the table. - * The OIDs need to be allocated, because GetNext modifies them to indicate - * the end of data. - */ - SnmpUtilOidCpy(&vars2[0].name, &vars[0].name); - SnmpUtilOidCpy(&vars2[1].name, &vars[1].name); - SnmpUtilOidCpy(&vars2[2].name, &vars[2].name); - list.list = vars2; - moreData = TRUE; - noChange = FALSE; - entry = 0; - do { - SetLastError(0xdeadbeef); - error = 0xdeadbeef; - index = 0xdeadbeef; - ret = pQuery(SNMP_PDU_GETNEXT, &list, &error, &index); - ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index); - ok(error == SNMP_ERRORSTATUS_NOERROR, - "expected SNMP_ERRORSTATUS_NOERROR, got %d\n", error); - ok(index == 0, "expected index 0, got %d\n", index); - if (!ret) - moreData = FALSE; - else if (error) - moreData = FALSE; - else if (SnmpUtilOidNCmp(&vars2[0].name, &vars[0].name, - vars[0].name.idLength)) - moreData = FALSE; - else if (SnmpUtilOidNCmp(&vars2[1].name, &vars[1].name, - vars[1].name.idLength)) - moreData = FALSE; - else if (SnmpUtilOidNCmp(&vars2[2].name, &vars[2].name, - vars[2].name.idLength)) - moreData = FALSE; - else if (!SnmpUtilOidCmp(&vars[0].name, &vars2[0].name) || - !SnmpUtilOidCmp(&vars[1].name, &vars2[1].name) || - !SnmpUtilOidCmp(&vars[2].name, &vars2[2].name)) - { - /* If the OID isn't modified, the function isn't implemented on this - * platform, skip the remaining tests. - */ - noChange = TRUE; - } - if (moreData) - { - UINT lastID; - - /* Check the OIDs. For these types of values (display strings and - * integers) they should increase by 1 for each element of the table - * according to RFC 1158. Windows sometimes has a weird value in the - * table, so allow any value as long as it's greater than the previous - * value on Windows. - */ - ok(vars2[0].name.idLength == vars[0].name.idLength + 1, - "expected length %d, got %d\n", vars[0].name.idLength + 1, - vars2[0].name.idLength); - lastID = vars2[0].name.ids[vars2[0].name.idLength - 1]; - ok(lastID == entry + 1 || broken(lastID > entry), - "expected %d, got %d\n", entry + 1, lastID); - ok(vars2[1].name.idLength == vars[1].name.idLength + 1, - "expected length %d, got %d\n", vars[1].name.idLength + 1, - vars2[1].name.idLength); - lastID = vars2[1].name.ids[vars2[1].name.idLength - 1]; - ok(lastID == entry + 1 || broken(lastID > entry), - "expected %d, got %d\n", entry + 1, lastID); - ok(vars2[2].name.idLength == vars[2].name.idLength + 1, - "expected length %d, got %d\n", vars[2].name.idLength + 1, - vars2[2].name.idLength); - lastID = vars2[2].name.ids[vars2[2].name.idLength - 1]; - ok(lastID == entry + 1 || broken(lastID > entry), - "expected %d, got %d\n", entry + 1, lastID); - entry = lastID; - /* Check the types while we're at it */ - ok(vars2[0].value.asnType == ASN_OCTETSTRING, - "expected ASN_OCTETSTRING, got %02x\n", vars2[0].value.asnType); - ok(vars2[1].value.asnType == ASN_INTEGER, - "expected ASN_INTEGER, got %02x\n", vars2[1].value.asnType); - ok(vars2[2].value.asnType == ASN_INTEGER, - "expected ASN_INTEGER, got %02x\n", vars2[2].value.asnType); - } - else if (noChange) - skip("no change in OID, no MIB2 IF table implementation\n"); - } while (moreData && !noChange); - SnmpUtilVarBindFree(&vars2[0]); - SnmpUtilVarBindFree(&vars2[1]); - SnmpUtilVarBindFree(&vars2[2]); - - /* Even though SnmpExtensionInit says this DLL supports the MIB2 system - * variables, on recent systems (at least Win2k) the first variable it - * returns a value for is the first interface. - */ - vars[0].name.idLength = sizeof(mib2System) / sizeof(mib2System[0]); - vars[0].name.ids = mib2System; - SnmpUtilOidCpy(&vars2[0].name, &vars[0].name); - vars2[0].value.asnType = 0; - list.len = 1; - list.list = vars2; - moreData = TRUE; - noChange = FALSE; - ret = pQuery(SNMP_PDU_GETNEXT, &list, &error, &index); - ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index); - ok(error == SNMP_ERRORSTATUS_NOERROR, - "expected SNMP_ERRORSTATUS_NOERROR, got %d\n", error); - ok(index == 0, "expected index 0, got %d\n", index); - vars3[0].name.idLength = sizeof(mib2If) / sizeof(mib2If[0]); - vars3[0].name.ids = mib2If; - ok(!SnmpUtilOidNCmp(&vars2[0].name, &vars[0].name, vars[0].name.idLength) || - !SnmpUtilOidNCmp(&vars2[0].name, &vars3[0].name, vars3[0].name.idLength), - "expected 1.3.6.1.2.1.1 or 1.3.6.1.2.1.2, got %s\n", - SnmpUtilOidToA(&vars2[0].name)); - SnmpUtilVarBindFree(&vars2[0]); - - /* Check the type and OIDs of the IP address table */ - vars[0].name.idLength = sizeof(mib2IpAddr) / sizeof(mib2IpAddr[0]); - vars[0].name.ids = mib2IpAddr; - SnmpUtilOidCpy(&vars2[0].name, &vars[0].name); - vars2[0].value.asnType = 0; - list.len = 1; - list.list = vars2; - moreData = TRUE; - do { - ret = pQuery(SNMP_PDU_GETNEXT, &list, &error, &index); - ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index); - ok(error == SNMP_ERRORSTATUS_NOERROR, - "expected SNMP_ERRORSTATUS_NOERROR, got %d\n", error); - ok(index == 0, "expected index 0, got %d\n", index); - if (!ret) - moreData = FALSE; - else if (error) - moreData = FALSE; - else if (SnmpUtilOidNCmp(&vars2[0].name, &vars[0].name, - vars[0].name.idLength)) - moreData = FALSE; - else if (!SnmpUtilOidCmp(&vars2[0].name, &vars[0].name)) - { - /* If the OID isn't modified, the function isn't implemented on this - * platform, skip the remaining tests. - */ - noChange = TRUE; - } - if (moreData) - { - /* Make sure the size of the OID is right. - * FIXME: don't know if IPv6 addrs are shared with this table. - * Don't think so, but I'm not certain. - */ - ok(vars2[0].name.idLength == vars[0].name.idLength + 4, - "expected length %d, got %d\n", vars[0].name.idLength + 4, - vars2[0].name.idLength); - /* Make sure the type is right */ - ok(vars2[0].value.asnType == ASN_IPADDRESS, - "expected type ASN_IPADDRESS, got %02x\n", - vars2[0].value.asnType); - if (vars2[0].value.asnType == ASN_IPADDRESS) - { - UINT i; - - /* This looks uglier than it is: the base OID for the IP - * address, 1.3.6.1.2.1.4.20.1.1, is appended with the IP - * address of the entry. So e.g. the loopback address is - * identified in MIB2 as 1.3.6.1.2.1.4.20.1.1.127.0.0.1 - */ - for (i = 0; i < vars2[0].value.asnValue.address.length; i++) - { - ok(vars2[0].value.asnValue.address.stream[i] == - vars2[0].name.ids[vars2[0].name.idLength - 4 + i], - "expected ident byte %d to be %d, got %d\n", i, - vars2[0].value.asnValue.address.stream[i], - vars2[0].name.ids[vars2[0].name.idLength - 4 + i]); - } - } - } - else if (noChange) - skip("no change in OID, no MIB2 IP address table implementation\n"); - } while (moreData && !noChange); - SnmpUtilVarBindFree(&vars2[0]); - - /* Check the type and OIDs of the IP route table */ - vars[0].name.idLength = DEFINE_SIZEOF(mib2IpRouteTable); - vars[0].name.ids = mib2IpRouteTable; - SnmpUtilOidCpy(&vars2[0].name, &vars[0].name); - vars2[0].value.asnType = 0; - list.len = 1; - list.list = vars2; - moreData = TRUE; - noChange = FALSE; - do { - ret = pQuery(SNMP_PDU_GETNEXT, &list, &error, &index); - ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index); - ok(error == SNMP_ERRORSTATUS_NOERROR, - "expected SNMP_ERRORSTATUS_NOERROR, got %d\n", error); - ok(index == 0, "expected index 0, got %d\n", index); - if (!ret) - moreData = FALSE; - else if (error) - moreData = FALSE; - else if (SnmpUtilOidNCmp(&vars2[0].name, &vars[0].name, - vars[0].name.idLength)) - moreData = FALSE; - else if (!SnmpUtilOidCmp(&vars2[0].name, &vars[0].name)) - { - /* If the OID isn't modified, the function isn't implemented on this - * platform, skip the remaining tests. - */ - noChange = TRUE; - } - if (moreData) - { - /* Make sure the size of the OID is right. - * FIXME: don't know if IPv6 addrs are shared with this table. - * Don't think so, but I'm not certain. - */ - ok(vars2[0].name.idLength == vars[0].name.idLength + 4, - "expected length %d, got %d\n", vars[0].name.idLength + 4, - vars2[0].name.idLength); - /* Make sure the type is right */ - ok(vars2[0].value.asnType == ASN_IPADDRESS, - "expected type ASN_IPADDRESS, got %02x\n", - vars2[0].value.asnType); - if (vars2[0].value.asnType == ASN_IPADDRESS) - { - UINT i; - - /* The base OID for the route table, 1.3.6.1.2.1.4.21.1.1, is - * appended with the dest IP address of the entry. So e.g. a - * route entry for 224.0.0.0 is identified in MIB2 as - * 1.3.6.1.2.1.4.21.1.1.224.0.0.0 - */ - for (i = 0; i < vars2[0].value.asnValue.address.length; i++) - { - ok(vars2[0].value.asnValue.address.stream[i] == - vars2[0].name.ids[vars2[0].name.idLength - 4 + i], - "expected ident byte %d to be %d, got %d\n", i, - vars2[0].value.asnValue.address.stream[i], - vars2[0].name.ids[vars2[0].name.idLength - 4 + i]); - } - } - } - else if (noChange) - skip("no change in OID, no MIB2 IP route table implementation\n"); - } while (moreData && !noChange); - SnmpUtilVarBindFree(&vars2[0]); - - /* Check the type and OIDs of the UDP table */ - vars[0].name.idLength = DEFINE_SIZEOF(mib2UdpTable); - vars[0].name.ids = mib2UdpTable; - SnmpUtilOidCpy(&vars2[0].name, &vars[0].name); - vars2[0].value.asnType = 0; - list.len = 1; - list.list = vars2; - moreData = TRUE; - noChange = FALSE; - do { - ret = pQuery(SNMP_PDU_GETNEXT, &list, &error, &index); - ok(ret, "SnmpExtensionQuery failed: %d, %d\n", error, index); - /* FIXME: error and index aren't checked here because the UDP table is - * the last OID currently supported by Wine, so the last GetNext fails. - * todo_wine is also not effective because it will succeed for all but - * the last GetNext. Remove the if (0) if any later OID is supported - * by Wine. - */ - if (0) { - ok(error == SNMP_ERRORSTATUS_NOERROR, - "expected SNMP_ERRORSTATUS_NOERROR, got %d\n", error); - ok(index == 0, "expected index 0, got %d\n", index); - } - if (!ret) - moreData = FALSE; - else if (error) - moreData = FALSE; - else if (SnmpUtilOidNCmp(&vars2[0].name, &vars[0].name, - vars[0].name.idLength)) - moreData = FALSE; - else if (!SnmpUtilOidCmp(&vars2[0].name, &vars[0].name)) - { - /* If the OID isn't modified, the function isn't implemented on this - * platform, skip the remaining tests. - */ - noChange = TRUE; - } - if (moreData) - { - /* Make sure the size of the OID is right. */ - ok(vars2[0].name.idLength == vars[0].name.idLength + 5, - "expected length %d, got %d\n", vars[0].name.idLength + 5, - vars2[0].name.idLength); - /* Make sure the type is right */ - ok(vars2[0].value.asnType == ASN_IPADDRESS, - "expected type ASN_IPADDRESS, got %02x\n", - vars2[0].value.asnType); - if (vars2[0].value.asnType == ASN_IPADDRESS) - { - UINT i; - - /* Again with the ugly: the base OID for the UDP table, - * 1.3.6.1.2.1.7.5.1, is appended with the local IP address and - * port number of the entry. So e.g. an entry for - * 192.168.1.1:4000 is identified in MIB2 as - * 1.3.6.1.2.1.7.5.1.192.168.1.1.4000 - */ - for (i = 0; i < vars2[0].value.asnValue.address.length; i++) - { - ok(vars2[0].value.asnValue.address.stream[i] == - vars2[0].name.ids[vars2[0].name.idLength - 5 + i], - "expected ident byte %d to be %d, got %d\n", i, - vars2[0].value.asnValue.address.stream[i], - vars2[0].name.ids[vars2[0].name.idLength - 5 + i]); - } - } - } - else if (noChange) - skip("no change in OID, no MIB2 UDP table implementation\n"); - } while (moreData && !noChange); - SnmpUtilVarBindFree(&vars2[0]); -} - -START_TEST(main) -{ - inetmib1 = LoadLibraryA("inetmib1"); - testInit(); - testQuery(); - FreeLibrary(inetmib1); -} diff --git a/rostests/winetests/inetmib1/testlist.c b/rostests/winetests/inetmib1/testlist.c deleted file mode 100644 index 6f0c3974819..00000000000 --- a/rostests/winetests/inetmib1/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_main(void); - -const struct test winetest_testlist[] = -{ - { "main", func_main }, - { 0, 0 } -}; diff --git a/rostests/winetests/iphlpapi/CMakeLists.txt b/rostests/winetests/iphlpapi/CMakeLists.txt deleted file mode 100644 index 0227f736a21..00000000000 --- a/rostests/winetests/iphlpapi/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(iphlpapi_winetest iphlpapi.c testlist.c) -target_link_libraries(iphlpapi_winetest wine) -set_module_type(iphlpapi_winetest win32cui) -add_importlibs(iphlpapi_winetest msvcrt kernel32 ntdll) -add_cd_file(TARGET iphlpapi_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/iphlpapi/iphlpapi.c b/rostests/winetests/iphlpapi/iphlpapi.c deleted file mode 100644 index 69570d7a6a2..00000000000 --- a/rostests/winetests/iphlpapi/iphlpapi.c +++ /dev/null @@ -1,1002 +0,0 @@ -/* - * iphlpapi dll test - * - * Copyright (C) 2003 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 - */ - -/* - * Some observations that an automated test can't produce: - * An adapter index is a key for an adapter. That is, if an index is returned - * from one API, that same index may be used successfully in another API, as - * long as the adapter remains present. - * If the adapter is removed and reinserted, however, the index may change (and - * indeed it does change on Win2K). - * - * The Name field of the IP_ADAPTER_INDEX_MAP entries returned by - * GetInterfaceInfo is declared as a wide string, but the bytes are actually - * an ASCII string on some versions of the IP helper API under Win9x. This was - * apparently an MS bug, it's corrected in later versions. - * - * The DomainName field of FIXED_INFO isn't NULL-terminated on Win98. - */ - -#include -#include "winsock2.h" -#include "windef.h" -#include "winbase.h" -#include "iphlpapi.h" -#include "iprtrmib.h" -#include "wine/test.h" -#include -#include - -#undef htonl -#undef htons -#undef ntohl -#undef ntohs - -#define htonl(l) ((u_long)(l)) -#define htons(s) ((u_short)(s)) -#define ntohl(l) ((u_long)(l)) -#define ntohs(s) ((u_short)(s)) - -static HMODULE hLibrary = NULL; - -typedef DWORD (WINAPI *GetNumberOfInterfacesFunc)(PDWORD); -typedef DWORD (WINAPI *GetIpAddrTableFunc)(PMIB_IPADDRTABLE,PULONG,BOOL); -typedef DWORD (WINAPI *GetIfEntryFunc)(PMIB_IFROW); -typedef DWORD (WINAPI *GetFriendlyIfIndexFunc)(DWORD); -typedef DWORD (WINAPI *GetIfTableFunc)(PMIB_IFTABLE,PULONG,BOOL); -typedef DWORD (WINAPI *GetIpForwardTableFunc)(PMIB_IPFORWARDTABLE,PULONG,BOOL); -typedef DWORD (WINAPI *GetIpNetTableFunc)(PMIB_IPNETTABLE,PULONG,BOOL); -typedef DWORD (WINAPI *GetInterfaceInfoFunc)(PIP_INTERFACE_INFO,PULONG); -typedef DWORD (WINAPI *GetAdaptersInfoFunc)(PIP_ADAPTER_INFO,PULONG); -typedef DWORD (WINAPI *GetNetworkParamsFunc)(PFIXED_INFO,PULONG); -typedef DWORD (WINAPI *GetIcmpStatisticsFunc)(PMIB_ICMP); -typedef DWORD (WINAPI *GetIpStatisticsFunc)(PMIB_IPSTATS); -typedef DWORD (WINAPI *GetTcpStatisticsFunc)(PMIB_TCPSTATS); -typedef DWORD (WINAPI *GetUdpStatisticsFunc)(PMIB_UDPSTATS); -typedef DWORD (WINAPI *GetTcpTableFunc)(PMIB_TCPTABLE,PDWORD,BOOL); -typedef DWORD (WINAPI *GetUdpTableFunc)(PMIB_UDPTABLE,PDWORD,BOOL); -typedef DWORD (WINAPI *GetPerAdapterInfoFunc)(ULONG,PIP_PER_ADAPTER_INFO,PULONG); -typedef DWORD (WINAPI *GetAdaptersAddressesFunc)(ULONG,ULONG,PVOID,PIP_ADAPTER_ADDRESSES,PULONG); -typedef DWORD (WINAPI *NotifyAddrChangeFunc)(PHANDLE,LPOVERLAPPED); -typedef BOOL (WINAPI *CancelIPChangeNotifyFunc)(LPOVERLAPPED); - -static GetNumberOfInterfacesFunc gGetNumberOfInterfaces = NULL; -static GetIpAddrTableFunc gGetIpAddrTable = NULL; -static GetIfEntryFunc gGetIfEntry = NULL; -static GetFriendlyIfIndexFunc gGetFriendlyIfIndex = NULL; -static GetIfTableFunc gGetIfTable = NULL; -static GetIpForwardTableFunc gGetIpForwardTable = NULL; -static GetIpNetTableFunc gGetIpNetTable = NULL; -static GetInterfaceInfoFunc gGetInterfaceInfo = NULL; -static GetAdaptersInfoFunc gGetAdaptersInfo = NULL; -static GetNetworkParamsFunc gGetNetworkParams = NULL; -static GetIcmpStatisticsFunc gGetIcmpStatistics = NULL; -static GetIpStatisticsFunc gGetIpStatistics = NULL; -static GetTcpStatisticsFunc gGetTcpStatistics = NULL; -static GetUdpStatisticsFunc gGetUdpStatistics = NULL; -static GetTcpTableFunc gGetTcpTable = NULL; -static GetUdpTableFunc gGetUdpTable = NULL; -static GetPerAdapterInfoFunc gGetPerAdapterInfo = NULL; -static GetAdaptersAddressesFunc gGetAdaptersAddresses = NULL; -static NotifyAddrChangeFunc gNotifyAddrChange = NULL; -static CancelIPChangeNotifyFunc gCancelIPChangeNotify = NULL; - -static void loadIPHlpApi(void) -{ - hLibrary = LoadLibraryA("iphlpapi.dll"); - if (hLibrary) { - gGetNumberOfInterfaces = (GetNumberOfInterfacesFunc)GetProcAddress( - hLibrary, "GetNumberOfInterfaces"); - gGetIpAddrTable = (GetIpAddrTableFunc)GetProcAddress( - hLibrary, "GetIpAddrTable"); - gGetIfEntry = (GetIfEntryFunc)GetProcAddress( - hLibrary, "GetIfEntry"); - gGetFriendlyIfIndex = (GetFriendlyIfIndexFunc)GetProcAddress( - hLibrary, "GetFriendlyIfIndex"); - gGetIfTable = (GetIfTableFunc)GetProcAddress( - hLibrary, "GetIfTable"); - gGetIpForwardTable = (GetIpForwardTableFunc)GetProcAddress( - hLibrary, "GetIpForwardTable"); - gGetIpNetTable = (GetIpNetTableFunc)GetProcAddress( - hLibrary, "GetIpNetTable"); - gGetInterfaceInfo = (GetInterfaceInfoFunc)GetProcAddress( - hLibrary, "GetInterfaceInfo"); - gGetAdaptersInfo = (GetAdaptersInfoFunc)GetProcAddress( - hLibrary, "GetAdaptersInfo"); - gGetNetworkParams = (GetNetworkParamsFunc)GetProcAddress( - hLibrary, "GetNetworkParams"); - gGetIcmpStatistics = (GetIcmpStatisticsFunc)GetProcAddress( - hLibrary, "GetIcmpStatistics"); - gGetIpStatistics = (GetIpStatisticsFunc)GetProcAddress( - hLibrary, "GetIpStatistics"); - gGetTcpStatistics = (GetTcpStatisticsFunc)GetProcAddress( - hLibrary, "GetTcpStatistics"); - gGetUdpStatistics = (GetUdpStatisticsFunc)GetProcAddress( - hLibrary, "GetUdpStatistics"); - gGetTcpTable = (GetTcpTableFunc)GetProcAddress( - hLibrary, "GetTcpTable"); - gGetUdpTable = (GetUdpTableFunc)GetProcAddress( - hLibrary, "GetUdpTable"); - gGetPerAdapterInfo = (GetPerAdapterInfoFunc)GetProcAddress(hLibrary, "GetPerAdapterInfo"); - gGetAdaptersAddresses = (GetAdaptersAddressesFunc)GetProcAddress(hLibrary, "GetAdaptersAddresses"); - gNotifyAddrChange = (NotifyAddrChangeFunc)GetProcAddress( - hLibrary, "NotifyAddrChange"); - gCancelIPChangeNotify = (CancelIPChangeNotifyFunc)GetProcAddress( - hLibrary, "CancelIPChangeNotify"); - } -} - -static void freeIPHlpApi(void) -{ - if (hLibrary) { - gGetNumberOfInterfaces = NULL; - gGetIpAddrTable = NULL; - gGetIfEntry = NULL; - gGetFriendlyIfIndex = NULL; - gGetIfTable = NULL; - gGetIpForwardTable = NULL; - gGetIpNetTable = NULL; - gGetInterfaceInfo = NULL; - gGetAdaptersInfo = NULL; - gGetNetworkParams = NULL; - gGetIcmpStatistics = NULL; - gGetIpStatistics = NULL; - gGetTcpStatistics = NULL; - gGetUdpStatistics = NULL; - gGetTcpTable = NULL; - gGetUdpTable = NULL; - gNotifyAddrChange = NULL; - gCancelIPChangeNotify = NULL; - FreeLibrary(hLibrary); - hLibrary = NULL; - } -} - -/* replacement for inet_ntoa */ -static const char *ntoa( DWORD ip ) -{ - static char buffer[40]; - - ip = htonl(ip); - sprintf( buffer, "%u.%u.%u.%u", (ip >> 24) & 0xff, (ip >> 16) & 0xff, (ip >> 8) & 0xff, ip & 0xff ); - return buffer; -} - -/* -still-to-be-tested 98-only functions: -GetUniDirectionalAdapterInfo -*/ -static void testWin98OnlyFunctions(void) -{ -} - -static void testGetNumberOfInterfaces(void) -{ - if (gGetNumberOfInterfaces) { - DWORD apiReturn, numInterfaces; - - /* Crashes on Vista */ - if (0) { - apiReturn = gGetNumberOfInterfaces(NULL); - if (apiReturn == ERROR_NOT_SUPPORTED) - return; - ok(apiReturn == ERROR_INVALID_PARAMETER, - "GetNumberOfInterfaces(NULL) returned %d, expected ERROR_INVALID_PARAMETER\n", - apiReturn); - } - - apiReturn = gGetNumberOfInterfaces(&numInterfaces); - if (apiReturn == ERROR_NOT_SUPPORTED) { - skip("GetNumberOfInterfaces is not supported\n"); - return; - } - ok(apiReturn == NO_ERROR, - "GetNumberOfInterfaces returned %d, expected 0\n", apiReturn); - } -} - -static void testGetIfEntry(DWORD index) -{ - if (gGetIfEntry) { - DWORD apiReturn; - MIB_IFROW row; - - memset(&row, 0, sizeof(row)); - apiReturn = gGetIfEntry(NULL); - if (apiReturn == ERROR_NOT_SUPPORTED) { - skip("GetIfEntry is not supported\n"); - return; - } - ok(apiReturn == ERROR_INVALID_PARAMETER, - "GetIfEntry(NULL) returned %d, expected ERROR_INVALID_PARAMETER\n", - apiReturn); - row.dwIndex = -1; /* hope that's always bogus! */ - apiReturn = gGetIfEntry(&row); - ok(apiReturn == ERROR_INVALID_DATA || - apiReturn == ERROR_FILE_NOT_FOUND /* Vista */, - "GetIfEntry(bogus row) returned %d, expected ERROR_INVALID_DATA or ERROR_FILE_NOT_FOUND\n", - apiReturn); - row.dwIndex = index; - apiReturn = gGetIfEntry(&row); - ok(apiReturn == NO_ERROR, - "GetIfEntry returned %d, expected NO_ERROR\n", apiReturn); - } -} - -static void testGetIpAddrTable(void) -{ - if (gGetIpAddrTable) { - DWORD apiReturn; - ULONG dwSize = 0; - - apiReturn = gGetIpAddrTable(NULL, NULL, FALSE); - if (apiReturn == ERROR_NOT_SUPPORTED) { - skip("GetIpAddrTable is not supported\n"); - return; - } - ok(apiReturn == ERROR_INVALID_PARAMETER, - "GetIpAddrTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER\n", - apiReturn); - apiReturn = gGetIpAddrTable(NULL, &dwSize, FALSE); - ok(apiReturn == ERROR_INSUFFICIENT_BUFFER, - "GetIpAddrTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER\n", - apiReturn); - if (apiReturn == ERROR_INSUFFICIENT_BUFFER) { - PMIB_IPADDRTABLE buf = HeapAlloc(GetProcessHeap(), 0, dwSize); - - apiReturn = gGetIpAddrTable(buf, &dwSize, FALSE); - ok(apiReturn == NO_ERROR, - "GetIpAddrTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n", - apiReturn); - if (apiReturn == NO_ERROR && buf->dwNumEntries) - testGetIfEntry(buf->table[0].dwIndex); - HeapFree(GetProcessHeap(), 0, buf); - } - } -} - -static void testGetIfTable(void) -{ - if (gGetIfTable) { - DWORD apiReturn; - ULONG dwSize = 0; - - apiReturn = gGetIfTable(NULL, NULL, FALSE); - if (apiReturn == ERROR_NOT_SUPPORTED) { - skip("GetIfTable is not supported\n"); - return; - } - ok(apiReturn == ERROR_INVALID_PARAMETER, - "GetIfTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER\n", - apiReturn); - apiReturn = gGetIfTable(NULL, &dwSize, FALSE); - ok(apiReturn == ERROR_INSUFFICIENT_BUFFER, - "GetIfTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER\n", - apiReturn); - if (apiReturn == ERROR_INSUFFICIENT_BUFFER) { - PMIB_IFTABLE buf = HeapAlloc(GetProcessHeap(), 0, dwSize); - - apiReturn = gGetIfTable(buf, &dwSize, FALSE); - ok(apiReturn == NO_ERROR, - "GetIfTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n\n", - apiReturn); - - if (apiReturn == NO_ERROR && winetest_debug > 1) - { - DWORD i, j; - char name[MAX_INTERFACE_NAME_LEN]; - - trace( "interface table: %u entries\n", buf->dwNumEntries ); - for (i = 0; i < buf->dwNumEntries; i++) - { - MIB_IFROW *row = &buf->table[i]; - WideCharToMultiByte( CP_ACP, 0, row->wszName, -1, name, MAX_INTERFACE_NAME_LEN, NULL, NULL ); - trace( "%u: '%s' type %u mtu %u speed %u phys", - row->dwIndex, name, row->dwType, row->dwMtu, row->dwSpeed ); - for (j = 0; j < row->dwPhysAddrLen; j++) - printf( " %02x", row->bPhysAddr[j] ); - printf( "\n" ); - trace( " in: bytes %u upkts %u nupkts %u disc %u err %u unk %u\n", - row->dwInOctets, row->dwInUcastPkts, row->dwInNUcastPkts, - row->dwInDiscards, row->dwInErrors, row->dwInUnknownProtos ); - trace( " out: bytes %u upkts %u nupkts %u disc %u err %u\n", - row->dwOutOctets, row->dwOutUcastPkts, row->dwOutNUcastPkts, - row->dwOutDiscards, row->dwOutErrors ); - } - } - HeapFree(GetProcessHeap(), 0, buf); - } - } -} - -static void testGetIpForwardTable(void) -{ - if (gGetIpForwardTable) { - DWORD apiReturn; - ULONG dwSize = 0; - - apiReturn = gGetIpForwardTable(NULL, NULL, FALSE); - if (apiReturn == ERROR_NOT_SUPPORTED) { - skip("GetIpForwardTable is not supported\n"); - return; - } - ok(apiReturn == ERROR_INVALID_PARAMETER, - "GetIpForwardTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER\n", - apiReturn); - apiReturn = gGetIpForwardTable(NULL, &dwSize, FALSE); - ok(apiReturn == ERROR_INSUFFICIENT_BUFFER, - "GetIpForwardTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER\n", - apiReturn); - if (apiReturn == ERROR_INSUFFICIENT_BUFFER) { - PMIB_IPFORWARDTABLE buf = HeapAlloc(GetProcessHeap(), 0, dwSize); - - apiReturn = gGetIpForwardTable(buf, &dwSize, FALSE); - ok(apiReturn == NO_ERROR, - "GetIpForwardTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n", - apiReturn); - - if (apiReturn == NO_ERROR && winetest_debug > 1) - { - DWORD i; - - trace( "IP forward table: %u entries\n", buf->dwNumEntries ); - for (i = 0; i < buf->dwNumEntries; i++) - { - char buffer[40]; - sprintf( buffer, "dest %s", ntoa( buf->table[i].dwForwardDest )); - sprintf( buffer + strlen(buffer), " mask %s", ntoa( buf->table[i].dwForwardMask )); - trace( "%u: %s gw %s if %u type %u\n", i, buffer, - ntoa( buf->table[i].dwForwardNextHop ), - buf->table[i].dwForwardIfIndex, buf->table[i].dwForwardType ); - } - } - HeapFree(GetProcessHeap(), 0, buf); - } - } -} - -static void testGetIpNetTable(void) -{ - if (gGetIpNetTable) { - DWORD apiReturn; - ULONG dwSize = 0; - - apiReturn = gGetIpNetTable(NULL, NULL, FALSE); - if (apiReturn == ERROR_NOT_SUPPORTED) { - skip("GetIpNetTable is not supported\n"); - return; - } - ok(apiReturn == ERROR_INVALID_PARAMETER, - "GetIpNetTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER\n", - apiReturn); - apiReturn = gGetIpNetTable(NULL, &dwSize, FALSE); - ok(apiReturn == ERROR_NO_DATA || apiReturn == ERROR_INSUFFICIENT_BUFFER, - "GetIpNetTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_NO_DATA or ERROR_INSUFFICIENT_BUFFER\n", - apiReturn); - if (apiReturn == ERROR_NO_DATA) - ; /* empty ARP table's okay */ - else if (apiReturn == ERROR_INSUFFICIENT_BUFFER) { - PMIB_IPNETTABLE buf = HeapAlloc(GetProcessHeap(), 0, dwSize); - - apiReturn = gGetIpNetTable(buf, &dwSize, FALSE); - ok(apiReturn == NO_ERROR || - apiReturn == ERROR_NO_DATA, /* empty ARP table's okay */ - "GetIpNetTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n", - apiReturn); - - if (apiReturn == NO_ERROR && winetest_debug > 1) - { - DWORD i, j; - - trace( "IP net table: %u entries\n", buf->dwNumEntries ); - for (i = 0; i < buf->dwNumEntries; i++) - { - trace( "%u: idx %u type %u addr %s phys", - i, buf->table[i].dwIndex, buf->table[i].dwType, ntoa( buf->table[i].dwAddr )); - for (j = 0; j < buf->table[i].dwPhysAddrLen; j++) - printf( " %02x", buf->table[i].bPhysAddr[j] ); - printf( "\n" ); - } - } - HeapFree(GetProcessHeap(), 0, buf); - } - } -} - -static void testGetIcmpStatistics(void) -{ - if (gGetIcmpStatistics) { - DWORD apiReturn; - MIB_ICMP stats; - - /* Crashes on Vista */ - if (0) { - apiReturn = gGetIcmpStatistics(NULL); - if (apiReturn == ERROR_NOT_SUPPORTED) - return; - ok(apiReturn == ERROR_INVALID_PARAMETER, - "GetIcmpStatistics(NULL) returned %d, expected ERROR_INVALID_PARAMETER\n", - apiReturn); - } - - apiReturn = gGetIcmpStatistics(&stats); - if (apiReturn == ERROR_NOT_SUPPORTED) - { - skip("GetIcmpStatistics is not supported\n"); - return; - } - ok(apiReturn == NO_ERROR, - "GetIcmpStatistics returned %d, expected NO_ERROR\n", apiReturn); - if (apiReturn == NO_ERROR && winetest_debug > 1) - { - trace( "ICMP stats: %8s %8s\n", "in", "out" ); - trace( " dwMsgs: %8u %8u\n", stats.stats.icmpInStats.dwMsgs, stats.stats.icmpOutStats.dwMsgs ); - trace( " dwErrors: %8u %8u\n", stats.stats.icmpInStats.dwErrors, stats.stats.icmpOutStats.dwErrors ); - trace( " dwDestUnreachs: %8u %8u\n", stats.stats.icmpInStats.dwDestUnreachs, stats.stats.icmpOutStats.dwDestUnreachs ); - trace( " dwTimeExcds: %8u %8u\n", stats.stats.icmpInStats.dwTimeExcds, stats.stats.icmpOutStats.dwTimeExcds ); - trace( " dwParmProbs: %8u %8u\n", stats.stats.icmpInStats.dwParmProbs, stats.stats.icmpOutStats.dwParmProbs ); - trace( " dwSrcQuenchs: %8u %8u\n", stats.stats.icmpInStats.dwSrcQuenchs, stats.stats.icmpOutStats.dwSrcQuenchs ); - trace( " dwRedirects: %8u %8u\n", stats.stats.icmpInStats.dwRedirects, stats.stats.icmpOutStats.dwRedirects ); - trace( " dwEchos: %8u %8u\n", stats.stats.icmpInStats.dwEchos, stats.stats.icmpOutStats.dwEchos ); - trace( " dwEchoReps: %8u %8u\n", stats.stats.icmpInStats.dwEchoReps, stats.stats.icmpOutStats.dwEchoReps ); - trace( " dwTimestamps: %8u %8u\n", stats.stats.icmpInStats.dwTimestamps, stats.stats.icmpOutStats.dwTimestamps ); - trace( " dwTimestampReps: %8u %8u\n", stats.stats.icmpInStats.dwTimestampReps, stats.stats.icmpOutStats.dwTimestampReps ); - trace( " dwAddrMasks: %8u %8u\n", stats.stats.icmpInStats.dwAddrMasks, stats.stats.icmpOutStats.dwAddrMasks ); - trace( " dwAddrMaskReps: %8u %8u\n", stats.stats.icmpInStats.dwAddrMaskReps, stats.stats.icmpOutStats.dwAddrMaskReps ); - } - } -} - -static void testGetIpStatistics(void) -{ - if (gGetIpStatistics) { - DWORD apiReturn; - MIB_IPSTATS stats; - - apiReturn = gGetIpStatistics(NULL); - if (apiReturn == ERROR_NOT_SUPPORTED) { - skip("GetIpStatistics is not supported\n"); - return; - } - ok(apiReturn == ERROR_INVALID_PARAMETER, - "GetIpStatistics(NULL) returned %d, expected ERROR_INVALID_PARAMETER\n", - apiReturn); - apiReturn = gGetIpStatistics(&stats); - ok(apiReturn == NO_ERROR, - "GetIpStatistics returned %d, expected NO_ERROR\n", apiReturn); - if (apiReturn == NO_ERROR && winetest_debug > 1) - { - trace( "IP stats:\n" ); - trace( " dwForwarding: %u\n", stats.dwForwarding ); - trace( " dwDefaultTTL: %u\n", stats.dwDefaultTTL ); - trace( " dwInReceives: %u\n", stats.dwInReceives ); - trace( " dwInHdrErrors: %u\n", stats.dwInHdrErrors ); - trace( " dwInAddrErrors: %u\n", stats.dwInAddrErrors ); - trace( " dwForwDatagrams: %u\n", stats.dwForwDatagrams ); - trace( " dwInUnknownProtos: %u\n", stats.dwInUnknownProtos ); - trace( " dwInDiscards: %u\n", stats.dwInDiscards ); - trace( " dwInDelivers: %u\n", stats.dwInDelivers ); - trace( " dwOutRequests: %u\n", stats.dwOutRequests ); - trace( " dwRoutingDiscards: %u\n", stats.dwRoutingDiscards ); - trace( " dwOutDiscards: %u\n", stats.dwOutDiscards ); - trace( " dwOutNoRoutes: %u\n", stats.dwOutNoRoutes ); - trace( " dwReasmTimeout: %u\n", stats.dwReasmTimeout ); - trace( " dwReasmReqds: %u\n", stats.dwReasmReqds ); - trace( " dwReasmOks: %u\n", stats.dwReasmOks ); - trace( " dwReasmFails: %u\n", stats.dwReasmFails ); - trace( " dwFragOks: %u\n", stats.dwFragOks ); - trace( " dwFragFails: %u\n", stats.dwFragFails ); - trace( " dwFragCreates: %u\n", stats.dwFragCreates ); - trace( " dwNumIf: %u\n", stats.dwNumIf ); - trace( " dwNumAddr: %u\n", stats.dwNumAddr ); - trace( " dwNumRoutes: %u\n", stats.dwNumRoutes ); - } - } -} - -static void testGetTcpStatistics(void) -{ - if (gGetTcpStatistics) { - DWORD apiReturn; - MIB_TCPSTATS stats; - - apiReturn = gGetTcpStatistics(NULL); - if (apiReturn == ERROR_NOT_SUPPORTED) { - skip("GetTcpStatistics is not supported\n"); - return; - } - ok(apiReturn == ERROR_INVALID_PARAMETER, - "GetTcpStatistics(NULL) returned %d, expected ERROR_INVALID_PARAMETER\n", - apiReturn); - apiReturn = gGetTcpStatistics(&stats); - ok(apiReturn == NO_ERROR, - "GetTcpStatistics returned %d, expected NO_ERROR\n", apiReturn); - if (apiReturn == NO_ERROR && winetest_debug > 1) - { - trace( "TCP stats:\n" ); - trace( " dwRtoAlgorithm: %u\n", stats.dwRtoAlgorithm ); - trace( " dwRtoMin: %u\n", stats.dwRtoMin ); - trace( " dwRtoMax: %u\n", stats.dwRtoMax ); - trace( " dwMaxConn: %u\n", stats.dwMaxConn ); - trace( " dwActiveOpens: %u\n", stats.dwActiveOpens ); - trace( " dwPassiveOpens: %u\n", stats.dwPassiveOpens ); - trace( " dwAttemptFails: %u\n", stats.dwAttemptFails ); - trace( " dwEstabResets: %u\n", stats.dwEstabResets ); - trace( " dwCurrEstab: %u\n", stats.dwCurrEstab ); - trace( " dwInSegs: %u\n", stats.dwInSegs ); - trace( " dwOutSegs: %u\n", stats.dwOutSegs ); - trace( " dwRetransSegs: %u\n", stats.dwRetransSegs ); - trace( " dwInErrs: %u\n", stats.dwInErrs ); - trace( " dwOutRsts: %u\n", stats.dwOutRsts ); - trace( " dwNumConns: %u\n", stats.dwNumConns ); - } - } -} - -static void testGetUdpStatistics(void) -{ - if (gGetUdpStatistics) { - DWORD apiReturn; - MIB_UDPSTATS stats; - - apiReturn = gGetUdpStatistics(NULL); - if (apiReturn == ERROR_NOT_SUPPORTED) { - skip("GetUdpStatistics is not supported\n"); - return; - } - ok(apiReturn == ERROR_INVALID_PARAMETER, - "GetUdpStatistics(NULL) returned %d, expected ERROR_INVALID_PARAMETER\n", - apiReturn); - apiReturn = gGetUdpStatistics(&stats); - ok(apiReturn == NO_ERROR, - "GetUdpStatistics returned %d, expected NO_ERROR\n", apiReturn); - if (apiReturn == NO_ERROR && winetest_debug > 1) - { - trace( "UDP stats:\n" ); - trace( " dwInDatagrams: %u\n", stats.dwInDatagrams ); - trace( " dwNoPorts: %u\n", stats.dwNoPorts ); - trace( " dwInErrors: %u\n", stats.dwInErrors ); - trace( " dwOutDatagrams: %u\n", stats.dwOutDatagrams ); - trace( " dwNumAddrs: %u\n", stats.dwNumAddrs ); - } - } -} - -static void testGetTcpTable(void) -{ - if (gGetTcpTable) { - DWORD apiReturn; - ULONG dwSize = 0; - - apiReturn = gGetTcpTable(NULL, &dwSize, FALSE); - if (apiReturn == ERROR_NOT_SUPPORTED) { - skip("GetTcpTable is not supported\n"); - return; - } - ok(apiReturn == ERROR_INSUFFICIENT_BUFFER || - broken(apiReturn == ERROR_NO_DATA), /* win95 */ - "GetTcpTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER\n", - apiReturn); - if (apiReturn == ERROR_INSUFFICIENT_BUFFER) { - PMIB_TCPTABLE buf = HeapAlloc(GetProcessHeap(), 0, dwSize); - - apiReturn = gGetTcpTable(buf, &dwSize, FALSE); - ok(apiReturn == NO_ERROR, - "GetTcpTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n", - apiReturn); - - if (apiReturn == NO_ERROR && winetest_debug > 1) - { - DWORD i; - trace( "TCP table: %u entries\n", buf->dwNumEntries ); - for (i = 0; i < buf->dwNumEntries; i++) - { - char buffer[40]; - sprintf( buffer, "local %s:%u", - ntoa(buf->table[i].dwLocalAddr), ntohs(buf->table[i].dwLocalPort) ); - trace( "%u: %s remote %s:%u state %u\n", - i, buffer, ntoa( buf->table[i].dwRemoteAddr ), - ntohs(buf->table[i].dwRemotePort), buf->table[i].dwState ); - } - } - HeapFree(GetProcessHeap(), 0, buf); - } - } -} - -static void testGetUdpTable(void) -{ - if (gGetUdpTable) { - DWORD apiReturn; - ULONG dwSize = 0; - - apiReturn = gGetUdpTable(NULL, &dwSize, FALSE); - if (apiReturn == ERROR_NOT_SUPPORTED) { - skip("GetUdpTable is not supported\n"); - return; - } - ok(apiReturn == ERROR_INSUFFICIENT_BUFFER, - "GetUdpTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER\n", - apiReturn); - if (apiReturn == ERROR_INSUFFICIENT_BUFFER) { - PMIB_UDPTABLE buf = HeapAlloc(GetProcessHeap(), 0, dwSize); - - apiReturn = gGetUdpTable(buf, &dwSize, FALSE); - ok(apiReturn == NO_ERROR, - "GetUdpTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n", - apiReturn); - - if (apiReturn == NO_ERROR && winetest_debug > 1) - { - DWORD i; - trace( "UDP table: %u entries\n", buf->dwNumEntries ); - for (i = 0; i < buf->dwNumEntries; i++) - trace( "%u: %s:%u\n", - i, ntoa( buf->table[i].dwLocalAddr ), ntohs(buf->table[i].dwLocalPort) ); - } - HeapFree(GetProcessHeap(), 0, buf); - } - } -} - -/* -still-to-be-tested NT4-onward functions: -CreateIpForwardEntry -DeleteIpForwardEntry -CreateIpNetEntry -DeleteIpNetEntry -GetFriendlyIfIndex -GetRTTAndHopCount -SetIfEntry -SetIpForwardEntry -SetIpNetEntry -SetIpStatistics -SetIpTTL -SetTcpEntry -*/ -static void testWinNT4Functions(void) -{ - testGetNumberOfInterfaces(); - testGetIpAddrTable(); - testGetIfTable(); - testGetIpForwardTable(); - testGetIpNetTable(); - testGetIcmpStatistics(); - testGetIpStatistics(); - testGetTcpStatistics(); - testGetUdpStatistics(); - testGetTcpTable(); - testGetUdpTable(); -} - -static void testGetInterfaceInfo(void) -{ - if (gGetInterfaceInfo) { - DWORD apiReturn; - ULONG len = 0; - - apiReturn = gGetInterfaceInfo(NULL, NULL); - if (apiReturn == ERROR_NOT_SUPPORTED) { - skip("GetInterfaceInfo is not supported\n"); - return; - } - ok(apiReturn == ERROR_INVALID_PARAMETER, - "GetInterfaceInfo returned %d, expected ERROR_INVALID_PARAMETER\n", - apiReturn); - apiReturn = gGetInterfaceInfo(NULL, &len); - ok(apiReturn == ERROR_INSUFFICIENT_BUFFER, - "GetInterfaceInfo returned %d, expected ERROR_INSUFFICIENT_BUFFER\n", - apiReturn); - if (apiReturn == ERROR_INSUFFICIENT_BUFFER) { - PIP_INTERFACE_INFO buf = HeapAlloc(GetProcessHeap(), 0, len); - - apiReturn = gGetInterfaceInfo(buf, &len); - ok(apiReturn == NO_ERROR, - "GetInterfaceInfo(buf, &dwSize) returned %d, expected NO_ERROR\n", - apiReturn); - HeapFree(GetProcessHeap(), 0, buf); - } - } -} - -static void testGetAdaptersInfo(void) -{ - if (gGetAdaptersInfo) { - DWORD apiReturn; - ULONG len = 0; - - apiReturn = gGetAdaptersInfo(NULL, NULL); - if (apiReturn == ERROR_NOT_SUPPORTED) { - skip("GetAdaptersInfo is not supported\n"); - return; - } - ok(apiReturn == ERROR_INVALID_PARAMETER, - "GetAdaptersInfo returned %d, expected ERROR_INVALID_PARAMETER\n", - apiReturn); - apiReturn = gGetAdaptersInfo(NULL, &len); - ok(apiReturn == ERROR_NO_DATA || apiReturn == ERROR_BUFFER_OVERFLOW, - "GetAdaptersInfo returned %d, expected ERROR_NO_DATA or ERROR_BUFFER_OVERFLOW\n", - apiReturn); - if (apiReturn == ERROR_NO_DATA) - ; /* no adapter's, that's okay */ - else if (apiReturn == ERROR_BUFFER_OVERFLOW) { - PIP_ADAPTER_INFO buf = HeapAlloc(GetProcessHeap(), 0, len); - - apiReturn = gGetAdaptersInfo(buf, &len); - ok(apiReturn == NO_ERROR, - "GetAdaptersInfo(buf, &dwSize) returned %d, expected NO_ERROR\n", - apiReturn); - HeapFree(GetProcessHeap(), 0, buf); - } - } -} - -static void testGetNetworkParams(void) -{ - if (gGetNetworkParams) { - DWORD apiReturn; - ULONG len = 0; - - apiReturn = gGetNetworkParams(NULL, NULL); - if (apiReturn == ERROR_NOT_SUPPORTED) { - skip("GetNetworkParams is not supported\n"); - return; - } - ok(apiReturn == ERROR_INVALID_PARAMETER, - "GetNetworkParams returned %d, expected ERROR_INVALID_PARAMETER\n", - apiReturn); - apiReturn = gGetNetworkParams(NULL, &len); - ok(apiReturn == ERROR_BUFFER_OVERFLOW, - "GetNetworkParams returned %d, expected ERROR_BUFFER_OVERFLOW\n", - apiReturn); - if (apiReturn == ERROR_BUFFER_OVERFLOW) { - PFIXED_INFO buf = HeapAlloc(GetProcessHeap(), 0, len); - - apiReturn = gGetNetworkParams(buf, &len); - ok(apiReturn == NO_ERROR, - "GetNetworkParams(buf, &dwSize) returned %d, expected NO_ERROR\n", - apiReturn); - HeapFree(GetProcessHeap(), 0, buf); - } - } -} - -/* -still-to-be-tested 98-onward functions: -GetBestInterface -GetBestRoute -IpReleaseAddress -IpRenewAddress -*/ -static DWORD CALLBACK testWin98Functions(void *p) -{ - testGetInterfaceInfo(); - testGetAdaptersInfo(); - testGetNetworkParams(); - return 0; -} - -static void testGetPerAdapterInfo(void) -{ - DWORD ret, needed; - void *buffer; - - if (!gGetPerAdapterInfo) return; - ret = gGetPerAdapterInfo(1, NULL, NULL); - if (ret == ERROR_NOT_SUPPORTED) { - skip("GetPerAdapterInfo is not supported\n"); - return; - } - ok( ret == ERROR_INVALID_PARAMETER, "got %u instead of ERROR_INVALID_PARAMETER\n", ret ); - needed = 0xdeadbeef; - ret = gGetPerAdapterInfo(1, NULL, &needed); - if (ret == ERROR_NO_DATA) return; /* no such adapter */ - ok( ret == ERROR_BUFFER_OVERFLOW, "got %u instead of ERROR_BUFFER_OVERFLOW\n", ret ); - ok( needed != 0xdeadbeef, "needed not set\n" ); - buffer = HeapAlloc( GetProcessHeap(), 0, needed ); - ret = gGetPerAdapterInfo(1, buffer, &needed); - ok( ret == NO_ERROR, "got %u instead of NO_ERROR\n", ret ); - HeapFree( GetProcessHeap(), 0, buffer ); -} - -static void testNotifyAddrChange(void) -{ - DWORD ret, bytes; - OVERLAPPED overlapped; - HANDLE handle; - BOOL success; - - if (!gNotifyAddrChange) - { - win_skip("NotifyAddrChange not present\n"); - return; - } - if (!gCancelIPChangeNotify) - { - win_skip("CancelIPChangeNotify not present\n"); - return; - } - - handle = NULL; - ZeroMemory(&overlapped, sizeof(overlapped)); - ret = gNotifyAddrChange(&handle, &overlapped); - if (ret == ERROR_NOT_SUPPORTED) - { - win_skip("NotifyAddrChange is not supported\n"); - return; - } - ok(ret == ERROR_IO_PENDING, "NotifyAddrChange returned %d, expected ERROR_IO_PENDING\n", ret); - ret = GetLastError(); - todo_wine ok(ret == ERROR_IO_PENDING, "GetLastError returned %d, expected ERROR_IO_PENDING\n", ret); - success = gCancelIPChangeNotify(&overlapped); - todo_wine ok(success == TRUE, "CancelIPChangeNotify returned FALSE, expected TRUE\n"); - - ZeroMemory(&overlapped, sizeof(overlapped)); - success = gCancelIPChangeNotify(&overlapped); - ok(success == FALSE, "CancelIPChangeNotify returned TRUE, expected FALSE\n"); - - handle = NULL; - ZeroMemory(&overlapped, sizeof(overlapped)); - overlapped.hEvent = CreateEvent(NULL, FALSE, FALSE, NULL); - ret = gNotifyAddrChange(&handle, &overlapped); - ok(ret == ERROR_IO_PENDING, "NotifyAddrChange returned %d, expected ERROR_IO_PENDING\n", ret); - todo_wine ok(handle != INVALID_HANDLE_VALUE, "NotifyAddrChange returned invalid file handle\n"); - success = GetOverlappedResult(handle, &overlapped, &bytes, FALSE); - ok(success == FALSE, "GetOverlappedResult returned TRUE, expected FALSE\n"); - ret = GetLastError(); - ok(ret == ERROR_IO_INCOMPLETE, "GetLastError returned %d, expected ERROR_IO_INCOMPLETE\n", ret); - success = gCancelIPChangeNotify(&overlapped); - todo_wine ok(success == TRUE, "CancelIPChangeNotify returned FALSE, expected TRUE\n"); - - if (winetest_interactive) - { - handle = NULL; - ZeroMemory(&overlapped, sizeof(overlapped)); - overlapped.hEvent = CreateEvent(NULL, FALSE, FALSE, NULL); - trace("Testing asynchronous ipv4 address change notification. Please " - "change the ipv4 address of one of your network interfaces\n"); - ret = gNotifyAddrChange(&handle, &overlapped); - ok(ret == ERROR_IO_PENDING, "NotifyAddrChange returned %d, expected NO_ERROR\n", ret); - success = GetOverlappedResult(handle, &overlapped, &bytes, TRUE); - ok(success == TRUE, "GetOverlappedResult returned FALSE, expected TRUE\n"); - } - - /* test synchronous functionality */ - if (winetest_interactive) - { - trace("Testing synchronous ipv4 address change notification. Please " - "change the ipv4 address of one of your network interfaces\n"); - ret = gNotifyAddrChange(NULL, NULL); - todo_wine ok(ret == NO_ERROR, "NotifyAddrChange returned %d, expected NO_ERROR\n", ret); - } -} - -/* -still-to-be-tested 2K-onward functions: -AddIPAddress -CreateProxyArpEntry -DeleteIPAddress -DeleteProxyArpEntry -EnableRouter -FlushIpNetTable -GetAdapterIndex -NotifyRouteChange + CancelIPChangeNotify -SendARP -UnenableRouter -*/ -static void testWin2KFunctions(void) -{ - testGetPerAdapterInfo(); - testNotifyAddrChange(); -} - -static void test_GetAdaptersAddresses(void) -{ - ULONG ret, size; - IP_ADAPTER_ADDRESSES *aa, *ptr; - IP_ADAPTER_UNICAST_ADDRESS *ua; - - if (!gGetAdaptersAddresses) - { - win_skip("GetAdaptersAddresses not present\n"); - return; - } - - ret = gGetAdaptersAddresses(AF_UNSPEC, 0, NULL, NULL, NULL); - ok(ret == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %u\n", ret); - - /* size should be ignored and overwritten if buffer is NULL */ - size = 0x7fffffff; - ret = gGetAdaptersAddresses(AF_UNSPEC, 0, NULL, NULL, &size); - ok(ret == ERROR_BUFFER_OVERFLOW, "expected ERROR_BUFFER_OVERFLOW, got %u\n", ret); - if (ret != ERROR_BUFFER_OVERFLOW) return; - - ptr = HeapAlloc(GetProcessHeap(), 0, size); - ret = gGetAdaptersAddresses(AF_UNSPEC, 0, NULL, ptr, &size); - ok(!ret, "expected ERROR_SUCCESS got %u\n", ret); - - for (aa = ptr; !ret && aa; aa = aa->Next) - { - ok(aa->DnsSuffix != NULL, "DnsSuffix is not a valid pointer\n"); - ok(aa->Description != NULL, "Description is not a valid pointer\n"); - ok(aa->FriendlyName != NULL, "FriendlyName is not a valid pointer\n"); - - if (winetest_debug <= 1) - continue; - - trace("Length: %u\n", S(U(*aa)).Length); - trace("IfIndex: %u\n", S(U(*aa)).IfIndex); - trace("Next: %p\n", aa->Next); - trace("AdapterName: %s\n", aa->AdapterName); - trace("FirstUnicastAddress: %p\n", aa->FirstUnicastAddress); - ua = aa->FirstUnicastAddress; - while (ua) - { - trace("\tLength: %u\n", S(U(*ua)).Length); - trace("\tFlags: 0x%08x\n", S(U(*ua)).Flags); - trace("\tNext: %p\n", ua->Next); - trace("\tAddress.lpSockaddr: %p\n", ua->Address.lpSockaddr); - trace("\tAddress.iSockaddrLength: %d\n", ua->Address.iSockaddrLength); - trace("\tPrefixOrigin: %u\n", ua->PrefixOrigin); - trace("\tSuffixOrigin: %u\n", ua->SuffixOrigin); - trace("\tDadState: %u\n", ua->DadState); - trace("\tValidLifetime: 0x%08x\n", ua->ValidLifetime); - trace("\tPreferredLifetime: 0x%08x\n", ua->PreferredLifetime); - trace("\tLeaseLifetime: 0x%08x\n", ua->LeaseLifetime); - trace("\n"); - ua = ua->Next; - } - trace("FirstAnycastAddress: %p\n", aa->FirstAnycastAddress); - trace("FirstMulticastAddress: %p\n", aa->FirstMulticastAddress); - trace("FirstDnsServerAddress: %p\n", aa->FirstDnsServerAddress); - trace("DnsSuffix: %p\n", aa->DnsSuffix); - trace("Description: %p\n", aa->Description); - trace("FriendlyName: %p\n", aa->FriendlyName); - trace("PhysicalAddress: %02x\n", aa->PhysicalAddress[0]); - trace("PhysicalAddressLength: %u\n", aa->PhysicalAddressLength); - trace("Flags: 0x%08x\n", aa->Flags); - trace("Mtu: %u\n", aa->Mtu); - trace("IfType: %u\n", aa->IfType); - trace("OperStatus: %u\n", aa->OperStatus); - trace("\n"); - } - HeapFree(GetProcessHeap(), 0, ptr); -} - -START_TEST(iphlpapi) -{ - - loadIPHlpApi(); - if (hLibrary) { - HANDLE thread; - - testWin98OnlyFunctions(); - testWinNT4Functions(); - - /* run testGetXXXX in two threads at once to make sure we don't crash in that case */ - thread = CreateThread(NULL, 0, testWin98Functions, NULL, 0, NULL); - testWin98Functions(NULL); - WaitForSingleObject(thread, INFINITE); - - testWin2KFunctions(); - test_GetAdaptersAddresses(); - freeIPHlpApi(); - } -} diff --git a/rostests/winetests/iphlpapi/iphlpapi.rbuild b/rostests/winetests/iphlpapi/iphlpapi.rbuild deleted file mode 100644 index ced63e68810..00000000000 --- a/rostests/winetests/iphlpapi/iphlpapi.rbuild +++ /dev/null @@ -1,12 +0,0 @@ - - - - - . - - iphlpapi.c - testlist.c - wine - ntdll - - diff --git a/rostests/winetests/iphlpapi/testlist.c b/rostests/winetests/iphlpapi/testlist.c deleted file mode 100644 index 4905dfc12a7..00000000000 --- a/rostests/winetests/iphlpapi/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_iphlpapi(void); - -const struct test winetest_testlist[] = -{ - { "iphlpapi", func_iphlpapi }, - { 0, 0 } -}; diff --git a/rostests/winetests/itss/CMakeLists.txt b/rostests/winetests/itss/CMakeLists.txt deleted file mode 100644 index 785fbabe468..00000000000 --- a/rostests/winetests/itss/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ - -add_definitions(-D__ROS_LONG64__) - -set_rc_compiler() - -add_executable(itss_winetest protocol.c testlist.c rsrc.rc) -target_link_libraries(itss_winetest wine) - -if(MSVC) - target_link_libraries(itss_winetest uuid) -endif() - -set_module_type(itss_winetest win32cui) -add_importlibs(itss_winetest ole32 msvcrt kernel32 ntdll) -add_cd_file(TARGET itss_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/itss/data.chm b/rostests/winetests/itss/data.chm deleted file mode 100644 index 53b32804221..00000000000 Binary files a/rostests/winetests/itss/data.chm and /dev/null differ diff --git a/rostests/winetests/itss/itss.rbuild b/rostests/winetests/itss/itss.rbuild deleted file mode 100644 index f143add644f..00000000000 --- a/rostests/winetests/itss/itss.rbuild +++ /dev/null @@ -1,10 +0,0 @@ - - . - - protocol.c - rsrc.rc - testlist.c - wine - ole32 - ntdll - diff --git a/rostests/winetests/itss/protocol.c b/rostests/winetests/itss/protocol.c deleted file mode 100644 index b52e3d32224..00000000000 --- a/rostests/winetests/itss/protocol.c +++ /dev/null @@ -1,690 +0,0 @@ -/* - * 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 - */ - -#define COBJMACROS - -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "initguid.h" -#include "ole2.h" -#include "urlmon.h" -#include "shlwapi.h" - -#define DEFINE_EXPECT(func) \ - static BOOL expect_ ## func = FALSE, called_ ## func = FALSE - -#define SET_EXPECT(func) \ - expect_ ## func = TRUE - -#define CHECK_EXPECT(func) \ - do { \ - ok(expect_ ##func, "unexpected call " #func "\n"); \ - expect_ ## func = FALSE; \ - called_ ## func = TRUE; \ - }while(0) - -#define CHECK_EXPECT2(func) \ - do { \ - ok(expect_ ##func, "unexpected call " #func "\n"); \ - called_ ## func = TRUE; \ - }while(0) - -#define SET_CALLED(func) \ - expect_ ## func = called_ ## func = FALSE - -#define CHECK_CALLED(func) \ - do { \ - ok(called_ ## func, "expected " #func "\n"); \ - SET_CALLED(func); \ - }while(0) - -DEFINE_GUID(CLSID_ITSProtocol,0x9d148291,0xb9c8,0x11d0,0xa4,0xcc,0x00,0x00,0xf8,0x01,0x49,0xf6); - -DEFINE_EXPECT(GetBindInfo); -DEFINE_EXPECT(ReportProgress_BEGINDOWNLOADDATA); -DEFINE_EXPECT(ReportProgress_SENDINGREQUEST); -DEFINE_EXPECT(ReportProgress_MIMETYPEAVAILABLE); -DEFINE_EXPECT(ReportProgress_CACHEFILENAMEAVAIABLE); -DEFINE_EXPECT(ReportProgress_DIRECTBIND); -DEFINE_EXPECT(ReportData); -DEFINE_EXPECT(ReportResult); - -static HRESULT expect_hrResult; -static IInternetProtocol *read_protocol = NULL; -static DWORD bindf; - -static const WCHAR blank_url1[] = {'i','t','s',':', - 't','e','s','t','.','c','h','m',':',':','/','b','l','a','n','k','.','h','t','m','l',0}; -static const WCHAR blank_url2[] = {'m','S','-','i','T','s',':', - 't','e','s','t','.','c','h','m',':',':','/','b','l','a','n','k','.','h','t','m','l',0}; -static const WCHAR blank_url3[] = {'m','k',':','@','M','S','I','T','S','t','o','r','e',':', - 't','e','s','t','.','c','h','m',':',':','/','b','l','a','n','k','.','h','t','m','l',0}; -static const WCHAR blank_url4[] = {'i','t','s',':', - 't','e','s','t','.','c','h','m',':',':','b','l','a','n','k','.','h','t','m','l',0}; -static const WCHAR blank_url5[] = {'i','t','s',':', - 't','e','s','t','.','c','h','m',':',':','\\','b','l','a','n','k','.','h','t','m','l',0}; -static const WCHAR blank_url6[] = {'i','t','s',':', - 't','e','s','t','.','c','h','m',':',':','/','%','6','2','l','a','n','k','.','h','t','m','l',0}; -static const WCHAR blank_url7[] = {'m','k',':','@','M','S','I','T','S','t','o','r','e',':', - 't','e','s','t','.','c','h','m',':',':','\\','b','l','a','n','k','.','h','t','m','l',0}; -static const WCHAR blank_url8[] = {'m','k',':','@','M','S','I','T','S','t','o','r','e',':', - 't','e','s','t','.','c','h','m',':',':','/','b','l','a','n','k','.','h','t','m','l','/',0}; - -static enum { - ITS_PROTOCOL, - MK_PROTOCOL -} test_protocol; - -static const WCHAR cache_file1[] = - {'t','e','s','t','.','c','h','m',':',':','/','b','l','a','n','k','.','h','t','m','l',0}; -static const WCHAR cache_file2[] = - {'t','e','s','t','.','c','h','m',':',':','\\','b','l','a','n','k','.','h','t','m','l',0}; -static const WCHAR cache_file3[] = - {'t','e','s','t','.','c','h','m',':',':','/','b','l','a','n','k','.','h','t','m','l','/',0}; -static const WCHAR *cache_file = cache_file1; - -static HRESULT WINAPI ProtocolSink_QueryInterface(IInternetProtocolSink *iface, REFIID riid, void **ppv) -{ - if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IInternetProtocolSink, riid)) { - *ppv = iface; - return S_OK; - } - return E_NOINTERFACE; -} - -static ULONG WINAPI ProtocolSink_AddRef(IInternetProtocolSink *iface) -{ - return 2; -} - -static ULONG WINAPI ProtocolSink_Release(IInternetProtocolSink *iface) -{ - return 1; -} - -static HRESULT WINAPI ProtocolSink_Switch(IInternetProtocolSink *iface, PROTOCOLDATA *pProtocolData) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ProtocolSink_ReportProgress(IInternetProtocolSink *iface, ULONG ulStatusCode, - LPCWSTR szStatusText) -{ - static const WCHAR blank_html[] = {'b','l','a','n','k','.','h','t','m','l',0}; - static const WCHAR text_html[] = {'t','e','x','t','/','h','t','m','l',0}; - - switch(ulStatusCode) { - case BINDSTATUS_BEGINDOWNLOADDATA: - CHECK_EXPECT(ReportProgress_BEGINDOWNLOADDATA); - ok(!szStatusText, "szStatusText != NULL\n"); - break; - case BINDSTATUS_SENDINGREQUEST: - CHECK_EXPECT(ReportProgress_SENDINGREQUEST); - if(test_protocol == ITS_PROTOCOL) - ok(!lstrcmpW(szStatusText, blank_html), "unexpected szStatusText\n"); - else - ok(szStatusText == NULL, "szStatusText != NULL\n"); - break; - case BINDSTATUS_MIMETYPEAVAILABLE: - CHECK_EXPECT(ReportProgress_MIMETYPEAVAILABLE); - ok(!lstrcmpW(szStatusText, text_html), "unexpected szStatusText\n"); - break; - case BINDSTATUS_CACHEFILENAMEAVAILABLE: - CHECK_EXPECT(ReportProgress_CACHEFILENAMEAVAIABLE); - ok(!lstrcmpW(szStatusText, cache_file), "unexpected szStatusText\n"); - break; - case BINDSTATUS_DIRECTBIND: - CHECK_EXPECT(ReportProgress_DIRECTBIND); - ok(!szStatusText, "szStatusText != NULL\n"); - break; - default: - ok(0, "unexpected ulStatusCode %d\n", ulStatusCode); - break; - } - - return S_OK; -} - -static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWORD grfBSCF, ULONG ulProgress, - ULONG ulProgressMax) -{ - CHECK_EXPECT(ReportData); - - ok(ulProgress == ulProgressMax, "ulProgress != ulProgressMax\n"); - if(test_protocol == ITS_PROTOCOL) - ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION | BSCF_DATAFULLYAVAILABLE), "grcf = %08x\n", grfBSCF); - else - ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION), "grcf = %08x\n", grfBSCF); - - if(read_protocol) { - BYTE buf[100]; - DWORD cb = 0xdeadbeef; - HRESULT hres; - - hres = IInternetProtocol_Read(read_protocol, buf, sizeof(buf), &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - ok(cb == 13, "cb=%u expected 13\n", cb); - ok(!memcmp(buf, "", 13), "unexpected data\n"); - } - - return S_OK; -} - -static HRESULT WINAPI ProtocolSink_ReportResult(IInternetProtocolSink *iface, HRESULT hrResult, - DWORD dwError, LPCWSTR szResult) -{ - CHECK_EXPECT(ReportResult); - - ok(hrResult == expect_hrResult, "expected: %08x got: %08x\n", expect_hrResult, hrResult); - ok(dwError == 0, "dwError = %d\n", dwError); - ok(!szResult, "szResult != NULL\n"); - - return S_OK; -} - -static IInternetProtocolSinkVtbl protocol_sink_vtbl = { - ProtocolSink_QueryInterface, - ProtocolSink_AddRef, - ProtocolSink_Release, - ProtocolSink_Switch, - ProtocolSink_ReportProgress, - ProtocolSink_ReportData, - ProtocolSink_ReportResult -}; - -static IInternetProtocolSink protocol_sink = { - &protocol_sink_vtbl -}; - -static HRESULT WINAPI BindInfo_QueryInterface(IInternetBindInfo *iface, REFIID riid, void **ppv) -{ - if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IInternetBindInfo, riid)) { - *ppv = iface; - return S_OK; - } - return E_NOINTERFACE; -} - -static ULONG WINAPI BindInfo_AddRef(IInternetBindInfo *iface) -{ - return 2; -} - -static ULONG WINAPI BindInfo_Release(IInternetBindInfo *iface) -{ - return 1; -} - -static HRESULT WINAPI BindInfo_GetBindInfo(IInternetBindInfo *iface, DWORD *grfBINDF, BINDINFO *pbindinfo) -{ - CHECK_EXPECT(GetBindInfo); - - ok(grfBINDF != NULL, "grfBINDF == NULL\n"); - if(grfBINDF) - ok(!*grfBINDF, "*grfBINDF != 0\n"); - ok(pbindinfo != NULL, "pbindinfo == NULL\n"); - ok(pbindinfo->cbSize == sizeof(BINDINFO), "wrong size of pbindinfo: %d\n", pbindinfo->cbSize); - - *grfBINDF = bindf; - return S_OK; -} - -static HRESULT WINAPI BindInfo_GetBindString(IInternetBindInfo *iface, ULONG ulStringType, LPOLESTR *ppwzStr, - ULONG cEl, ULONG *pcElFetched) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static IInternetBindInfoVtbl bind_info_vtbl = { - BindInfo_QueryInterface, - BindInfo_AddRef, - BindInfo_Release, - BindInfo_GetBindInfo, - BindInfo_GetBindString -}; - -static IInternetBindInfo bind_info = { - &bind_info_vtbl -}; - -static void test_protocol_fail(IInternetProtocol *protocol, LPCWSTR url, HRESULT expected_hres) -{ - HRESULT hres; - - SET_EXPECT(GetBindInfo); - SET_EXPECT(ReportResult); - - expect_hrResult = expected_hres; - hres = IInternetProtocol_Start(protocol, url, &protocol_sink, &bind_info, 0, 0); - ok(hres == expected_hres, "expected: %08x got: %08x\n", expected_hres, hres); - - CHECK_CALLED(GetBindInfo); - CHECK_CALLED(ReportResult); -} - -#define protocol_start(p,u,e) _protocol_start(__LINE__,p,u,e) -static HRESULT _protocol_start(unsigned line, IInternetProtocol *protocol, LPCWSTR url, BOOL expect_mime) -{ - HRESULT hres; - - SET_EXPECT(GetBindInfo); - if(test_protocol == MK_PROTOCOL) - SET_EXPECT(ReportProgress_DIRECTBIND); - SET_EXPECT(ReportProgress_SENDINGREQUEST); - if(expect_mime) - SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE); - if(test_protocol == MK_PROTOCOL) - SET_EXPECT(ReportProgress_CACHEFILENAMEAVAIABLE); - SET_EXPECT(ReportData); - if(test_protocol == ITS_PROTOCOL) - SET_EXPECT(ReportProgress_BEGINDOWNLOADDATA); - SET_EXPECT(ReportResult); - expect_hrResult = S_OK; - - hres = IInternetProtocol_Start(protocol, url, &protocol_sink, &bind_info, 0, 0); - - if(FAILED(hres)) { - SET_CALLED(GetBindInfo); - if(test_protocol == MK_PROTOCOL) - SET_CALLED(ReportProgress_DIRECTBIND); - SET_CALLED(ReportProgress_SENDINGREQUEST); - if(expect_mime) - SET_CALLED(ReportProgress_MIMETYPEAVAILABLE); - if(test_protocol == MK_PROTOCOL) - SET_EXPECT(ReportProgress_CACHEFILENAMEAVAIABLE); - SET_CALLED(ReportData); - if(test_protocol == ITS_PROTOCOL) - SET_CALLED(ReportProgress_BEGINDOWNLOADDATA); - SET_CALLED(ReportResult); - }else { - CHECK_CALLED(GetBindInfo); - if(test_protocol == MK_PROTOCOL) - SET_CALLED(ReportProgress_DIRECTBIND); - CHECK_CALLED(ReportProgress_SENDINGREQUEST); - if(expect_mime) - CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE); - if(test_protocol == MK_PROTOCOL) - SET_EXPECT(ReportProgress_CACHEFILENAMEAVAIABLE); - CHECK_CALLED(ReportData); - if(test_protocol == ITS_PROTOCOL) - CHECK_CALLED(ReportProgress_BEGINDOWNLOADDATA); - CHECK_CALLED(ReportResult); - } - - return hres; -} - -static void test_protocol_url(IClassFactory *factory, LPCWSTR url, BOOL expect_mime) -{ - IInternetProtocol *protocol; - BYTE buf[512]; - ULONG cb, ref; - HRESULT hres; - - hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol); - ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = protocol_start(protocol, url, expect_mime); - if(FAILED(hres)) { - IInternetProtocol_Release(protocol); - return; - } - - hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - ok(cb == 13, "cb=%u expected 13\n", cb); - ok(!memcmp(buf, "", 13), "unexpected data\n"); - ref = IInternetProtocol_Release(protocol); - ok(!ref, "protocol ref=%d\n", ref); - - hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol); - ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); - if(FAILED(hres)) - return; - - cb = 0xdeadbeef; - hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); - ok(hres == (test_protocol == ITS_PROTOCOL ? INET_E_DATA_NOT_AVAILABLE : E_FAIL), - "Read returned %08x\n", hres); - ok(cb == 0xdeadbeef, "cb=%u expected 0xdeadbeef\n", cb); - - protocol_start(protocol, url, expect_mime); - hres = IInternetProtocol_Read(protocol, buf, 2, &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - ok(cb == 2, "cb=%u expected 2\n", cb); - hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - ok(cb == 11, "cb=%u, expected 11\n", cb); - hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); - ok(hres == S_FALSE, "Read failed: %08x expected S_FALSE\n", hres); - ok(cb == 0, "cb=%u expected 0\n", cb); - hres = IInternetProtocol_UnlockRequest(protocol); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); - ref = IInternetProtocol_Release(protocol); - ok(!ref, "protocol ref=%d\n", ref); - - hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol); - ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); - if(FAILED(hres)) - return; - - protocol_start(protocol, url, expect_mime); - hres = IInternetProtocol_Read(protocol, buf, 2, &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - hres = IInternetProtocol_LockRequest(protocol, 0); - ok(hres == S_OK, "LockRequest failed: %08x\n", hres); - hres = IInternetProtocol_UnlockRequest(protocol); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); - hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - ok(cb == 11, "cb=%u, expected 11\n", cb); - ref = IInternetProtocol_Release(protocol); - ok(!ref, "protocol ref=%d\n", ref); - - hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol); - ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); - if(FAILED(hres)) - return; - - protocol_start(protocol, url, expect_mime); - hres = IInternetProtocol_LockRequest(protocol, 0); - ok(hres == S_OK, "LockRequest failed: %08x\n", hres); - hres = IInternetProtocol_Terminate(protocol, 0); - ok(hres == S_OK, "Terminate failed: %08x\n", hres); - hres = IInternetProtocol_Read(protocol, buf, 2, &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - ok(cb == 2, "cb=%u, expected 2\n", cb); - hres = IInternetProtocol_UnlockRequest(protocol); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); - hres = IInternetProtocol_Read(protocol, buf, 2, &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - ok(cb == 2, "cb=%u, expected 2\n", cb); - hres = IInternetProtocol_Terminate(protocol, 0); - ok(hres == S_OK, "Terminate failed: %08x\n", hres); - hres = IInternetProtocol_Read(protocol, buf, 2, &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - ok(cb == 2, "cb=%u expected 2\n", cb); - ref = IInternetProtocol_Release(protocol); - ok(!ref, "protocol ref=%d\n", ref); - - hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&read_protocol); - ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); - if(FAILED(hres)) - return; - - protocol_start(read_protocol, url, expect_mime); - ref = IInternetProtocol_Release(read_protocol); - ok(!ref, "protocol ref=%d\n", ref); - read_protocol = NULL; -} - -static const WCHAR rel_url1[] = - {'t','e','s','t','.','h','t','m','l',0}; -static const WCHAR rel_url2[] = - {'t','e','s','t','.','c','h','m',':',':','/','t','e','s','t','.','h','t','m','l',0}; -static const WCHAR rel_url3[] = - {'/','t','e','s','t','.','h','t','m','l',0}; -static const WCHAR rel_url4[] = - {'t','e',':','t','.','h','t','m','l',0}; -static const WCHAR rel_url5[] = - {'d','i','r','/','t','e','s','t','.','h','t','m','l',0}; - -static const WCHAR base_url1[] = {'i','t','s',':', - 't','e','s','t',':','.','c','h','m',':',':','/','b','l','a','n','k','.','h','t','m','l',0}; -static const WCHAR base_url2[] = {'i','t','s',':','t','e','s','t','.','c','h','m', - ':',':','/','d','i','r','/','b','l','a','n','k','.','h','t','m','l',0}; -static const WCHAR base_url3[] = {'m','s','-','i','t','s',':','t','e','s','t','.','c','h','m', - ':',':','/','d','i','r','/','b','l','a','n','k','.','h','t','m','l',0}; -static const WCHAR base_url4[] = {'m','k',':','@','M','S','I','T','S','t','o','r','e',':', - 't','e','s','t','.','c','h','m',':',':','/','d','i','r','/', - 'b','l','a','n','k','.','h','t','m','l',0}; -static const WCHAR base_url5[] = {'x','x','x',':','t','e','s','t','.','c','h','m', - ':',':','/','d','i','r','/','b','l','a','n','k','.','h','t','m','l',0}; - -static const WCHAR combined_url1[] = {'i','t','s',':', - 't','e','s','t','.','c','h','m',':',':','/','t','e','s','t','.','h','t','m','l',0}; -static const WCHAR combined_url2[] = {'i','t','s',':', - 't','e','s','t','.','c','h','m',':',':','/','d','i','r','/','t','e','s','t','.','h','t','m','l',0}; -static const WCHAR combined_url3[] = {'i','t','s',':', - 't','e','s','t',':','.','c','h','m',':',':','/','t','e','s','t','.','h','t','m','l',0}; -static const WCHAR combined_url4[] = {'i','t','s',':','t','e','s','t','.','c','h','m', - ':',':','b','l','a','n','k','.','h','t','m','l','t','e','s','t','.','h','t','m','l',0}; -static const WCHAR combined_url5[] = {'m','s','-','i','t','s',':', - 't','e','s','t','.','c','h','m',':',':','/','d','i','r','/','t','e','s','t','.','h','t','m','l',0}; -static const WCHAR combined_url6[] = {'m','k',':','@','M','S','I','T','S','t','o','r','e',':', - 't','e','s','t','.','c','h','m',':',':','/','d','i','r','/','t','e','s','t','.','h','t','m','l',0}; - -static const struct { - LPCWSTR base_url; - LPCWSTR rel_url; - DWORD flags; - HRESULT hres; - LPCWSTR combined_url; -} combine_tests[] = { - {blank_url1, blank_url1, 0, STG_E_INVALIDNAME, NULL}, - {blank_url2, blank_url2, 0, STG_E_INVALIDNAME, NULL}, - {blank_url1, rel_url1, 0, S_OK, combined_url1}, - {blank_url1, rel_url2, 0, STG_E_INVALIDNAME, NULL}, - {blank_url1, rel_url3, 0, S_OK, combined_url1}, - {blank_url1, rel_url4, 0, STG_E_INVALIDNAME, NULL}, - {blank_url1, rel_url3, URL_ESCAPE_SPACES_ONLY|URL_DONT_ESCAPE_EXTRA_INFO, S_OK, combined_url1}, - {blank_url1, rel_url5, 0, S_OK, combined_url2}, - {rel_url1, rel_url2, 0, 0x80041001, NULL}, - {base_url1, rel_url1, 0, S_OK, combined_url3}, - {base_url2, rel_url1, 0, S_OK, combined_url2}, - {blank_url4, rel_url1, 0, S_OK, combined_url4}, - {base_url3, rel_url1, 0, S_OK, combined_url5}, - {base_url4, rel_url1, 0, S_OK, combined_url6}, - {base_url5, rel_url1, 0, INET_E_USE_DEFAULT_PROTOCOLHANDLER, NULL}, - {base_url2, rel_url3, 0, S_OK, combined_url1}, -}; - -static void test_its_protocol_info(IInternetProtocol *protocol) -{ - IInternetProtocolInfo *info; - WCHAR buf[1024]; - DWORD size, i; - HRESULT hres; - - hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetProtocolInfo, (void**)&info); - ok(hres == S_OK, "Could not get IInternetProtocolInfo interface: %08x\n", hres); - if(FAILED(hres)) - return; - - for(i = PARSE_CANONICALIZE; i <= PARSE_UNESCAPE; i++) { - if(i != PARSE_CANONICALIZE && i != PARSE_SECURITY_URL) { - hres = IInternetProtocolInfo_ParseUrl(info, blank_url1, i, 0, buf, - sizeof(buf)/sizeof(buf[0]), &size, 0); - ok(hres == INET_E_DEFAULT_ACTION, - "[%d] failed: %08x, expected INET_E_DEFAULT_ACTION\n", i, hres); - } - } - - for(i=0; i < sizeof(combine_tests)/sizeof(combine_tests[0]); i++) { - size = 0xdeadbeef; - memset(buf, 0xfe, sizeof(buf)); - hres = IInternetProtocolInfo_CombineUrl(info, combine_tests[i].base_url, - combine_tests[i].rel_url, combine_tests[i].flags, buf, - sizeof(buf)/sizeof(WCHAR), &size, 0); - ok(hres == combine_tests[i].hres, "[%d] CombineUrl returned %08x, expected %08x\n", - i, hres, combine_tests[i].hres); - ok(size == (combine_tests[i].combined_url ? lstrlenW(combine_tests[i].combined_url)+1 - : 0xdeadbeef), "[%d] unexpected size=%d\n", i, size); - if(combine_tests[i].combined_url) - ok(!lstrcmpW(combine_tests[i].combined_url, buf), "[%d] unexpected result\n", i); - else - ok(buf[0] == 0xfefe, "buf changed\n"); - } - - size = 0xdeadbeef; - memset(buf, 0xfe, sizeof(buf)); - hres = IInternetProtocolInfo_CombineUrl(info, blank_url1, rel_url1, 0, buf, - 1, &size, 0); - ok(hres == E_OUTOFMEMORY, "CombineUrl failed: %08x\n", hres); - ok(size == sizeof(combined_url1)/sizeof(WCHAR), "size=%d\n", size); - ok(buf[0] == 0xfefe, "buf changed\n"); - - IInternetProtocolInfo_Release(info); -} - -static void test_its_protocol(void) -{ - IInternetProtocolInfo *info; - IClassFactory *factory; - IUnknown *unk; - ULONG ref; - HRESULT hres; - - static const WCHAR wrong_url1[] = - {'i','t','s',':','t','e','s','t','.','c','h','m',':',':','/','b','l','a','n','.','h','t','m','l',0}; - static const WCHAR wrong_url2[] = - {'i','t','s',':','t','e','s','.','c','h','m',':',':','b','/','l','a','n','k','.','h','t','m','l',0}; - static const WCHAR wrong_url3[] = - {'i','t','s',':','t','e','s','t','.','c','h','m','/','b','l','a','n','k','.','h','t','m','l',0}; - static const WCHAR wrong_url4[] = {'m','k',':','@','M','S','I','T','S','t','o','r',':', - 't','e','s','t','.','c','h','m',':',':','/','b','l','a','n','k','.','h','t','m','l',0}; - static const WCHAR wrong_url5[] = {'f','i','l','e',':', - 't','e','s','.','c','h','m',':',':','/','b','l','a','n','k','.','h','t','m','l',0}; - - test_protocol = ITS_PROTOCOL; - - hres = CoGetClassObject(&CLSID_ITSProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk); - ok(hres == S_OK || - broken(hres == REGDB_E_CLASSNOTREG), /* Some W95 and NT4 */ - "CoGetClassObject failed: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (void**)&info); - ok(hres == E_NOINTERFACE, "Could not get IInternetProtocolInfo: %08x\n", hres); - - hres = IUnknown_QueryInterface(unk, &IID_IClassFactory, (void**)&factory); - ok(hres == S_OK, "Could not get IClassFactory interface\n"); - if(SUCCEEDED(hres)) { - IInternetProtocol *protocol; - - hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol); - ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); - if(SUCCEEDED(hres)) { - test_its_protocol_info(protocol); - - test_protocol_fail(protocol, wrong_url1, STG_E_FILENOTFOUND); - test_protocol_fail(protocol, wrong_url2, STG_E_FILENOTFOUND); - test_protocol_fail(protocol, wrong_url3, STG_E_FILENOTFOUND); - - hres = IInternetProtocol_Start(protocol, wrong_url4, &protocol_sink, &bind_info, 0, 0); - ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, - "Start failed: %08x, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", hres); - - hres = IInternetProtocol_Start(protocol, wrong_url5, &protocol_sink, &bind_info, 0, 0); - ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, - "Start failed: %08x, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", hres); - - ref = IInternetProtocol_Release(protocol); - ok(!ref, "protocol ref=%d\n", ref); - - test_protocol_url(factory, blank_url1, TRUE); - test_protocol_url(factory, blank_url2, TRUE); - test_protocol_url(factory, blank_url3, TRUE); - test_protocol_url(factory, blank_url4, TRUE); - test_protocol_url(factory, blank_url5, TRUE); - test_protocol_url(factory, blank_url6, TRUE); - test_protocol_url(factory, blank_url8, TRUE); - bindf = BINDF_FROMURLMON | BINDF_NEEDFILE; - test_protocol_url(factory, blank_url1, TRUE); - } - - IClassFactory_Release(factory); - } - - IUnknown_Release(unk); -} - -static void test_mk_protocol(void) -{ - IClassFactory *cf; - HRESULT hres; - - test_protocol = MK_PROTOCOL; - - hres = CoGetClassObject(&CLSID_MkProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, - (void**)&cf); - ok(hres == S_OK || - broken(hres == REGDB_E_CLASSNOTREG), /* Some W95 and NT4 */ - "CoGetClassObject failed: %08x\n", hres); - if(FAILED(hres)) - return; - - cache_file = cache_file1; - test_protocol_url(cf, blank_url3, TRUE); - cache_file = cache_file2; - test_protocol_url(cf, blank_url7, TRUE); - cache_file = cache_file3; - test_protocol_url(cf, blank_url8, FALSE); - - IClassFactory_Release(cf); -} - -static BOOL create_chm(void) -{ - HANDLE file; - HRSRC src; - DWORD size; - - file = CreateFileA("test.chm", GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, NULL); - ok(file != INVALID_HANDLE_VALUE, "Could not create test.chm file\n"); - if(file == INVALID_HANDLE_VALUE) - return FALSE; - - src = FindResourceA(NULL, MAKEINTRESOURCEA(60), MAKEINTRESOURCEA(60)); - - WriteFile(file, LoadResource(NULL, src), SizeofResource(NULL, src), &size, NULL); - CloseHandle(file); - - return TRUE; -} - -static void delete_chm(void) -{ - BOOL ret; - - ret = DeleteFileA("test.chm"); - ok(ret, "DeleteFileA failed: %d\n", GetLastError()); -} - -START_TEST(protocol) -{ - OleInitialize(NULL); - - if(!create_chm()) - return; - - test_its_protocol(); - test_mk_protocol(); - - delete_chm(); - OleUninitialize(); -} diff --git a/rostests/winetests/itss/rsrc.rc b/rostests/winetests/itss/rsrc.rc deleted file mode 100644 index 0e8eba03916..00000000000 --- a/rostests/winetests/itss/rsrc.rc +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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 "winbase.h" -#include "windef.h" - -/* - * This is a simple .chm file compiled by hhc.exe from files: - * ----------------- test.hhp: - * [FILES] - * blank.html - * ----------------- blank.html: - * - * ----------------- - */ - -/* @makedep: data.chm */ -60 60 data.chm diff --git a/rostests/winetests/itss/testlist.c b/rostests/winetests/itss/testlist.c deleted file mode 100644 index 8794b7ca517..00000000000 --- a/rostests/winetests/itss/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_protocol(void); - -const struct test winetest_testlist[] = -{ - { "protocol", func_protocol }, - { 0, 0 } -}; diff --git a/rostests/winetests/jscript/CMakeLists.txt b/rostests/winetests/jscript/CMakeLists.txt deleted file mode 100644 index d6b9a256048..00000000000 --- a/rostests/winetests/jscript/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ - -add_definitions(-D__ROS_LONG64__) - -set_rc_compiler() - -list(APPEND SOURCE - activex.c - jscript.c - run.c - testlist.c - rsrc.rc) - -add_executable(jscript_winetest ${SOURCE}) -target_link_libraries(jscript_winetest wine) - -if(MSVC) - target_link_libraries(jscript_winetest uuid) -endif() - -set_module_type(jscript_winetest win32cui) -add_importlibs(jscript_winetest ole32 oleaut32 advapi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET jscript_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/jscript/activex.c b/rostests/winetests/jscript/activex.c deleted file mode 100644 index ba3f8bd2d76..00000000000 --- a/rostests/winetests/jscript/activex.c +++ /dev/null @@ -1,1096 +0,0 @@ -/* - * Copyright 2009 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 - -#define COBJMACROS -#define CONST_VTABLE - -#include -#include -#include -#include -#include -#include - -#include "wine/test.h" - -static const CLSID CLSID_JScript = - {0xf414c260,0x6ac0,0x11cf,{0xb6,0xd1,0x00,0xaa,0x00,0xbb,0xbb,0x58}}; - -#define DEFINE_EXPECT(func) \ - static BOOL expect_ ## func = FALSE, called_ ## func = FALSE - -#define SET_EXPECT(func) \ - expect_ ## func = TRUE - -#define SET_CALLED(func) \ - called_ ## func = TRUE - -#define CHECK_EXPECT2(func) \ - do { \ - ok(expect_ ##func, "unexpected call " #func "\n"); \ - called_ ## func = TRUE; \ - }while(0) - -#define CHECK_EXPECT(func) \ - do { \ - CHECK_EXPECT2(func); \ - expect_ ## func = FALSE; \ - }while(0) - -#define CHECK_CALLED(func) \ - do { \ - ok(called_ ## func, "expected " #func "\n"); \ - expect_ ## func = called_ ## func = FALSE; \ - }while(0) - -DEFINE_EXPECT(CreateInstance); -DEFINE_EXPECT(ProcessUrlAction); -DEFINE_EXPECT(QueryCustomPolicy); -DEFINE_EXPECT(reportSuccess); -DEFINE_EXPECT(Host_QS_SecMgr); -DEFINE_EXPECT(Caller_QS_SecMgr); -DEFINE_EXPECT(QI_IObjectWithSite); -DEFINE_EXPECT(SetSite); - -static const WCHAR testW[] = {'t','e','s','t',0}; - -static HRESULT QS_SecMgr_hres; -static HRESULT ProcessUrlAction_hres; -static DWORD ProcessUrlAction_policy; -static HRESULT CreateInstance_hres; -static HRESULT QueryCustomPolicy_hres; -static DWORD QueryCustomPolicy_psize; -static DWORD QueryCustomPolicy_policy; -static HRESULT QI_IDispatch_hres; -static HRESULT SetSite_hres; - -#define TESTOBJ_CLSID "{178fc163-f585-4e24-9c13-4bb7faf80646}" - -static const GUID CLSID_TestObj = - {0x178fc163,0xf585,0x4e24,{0x9c,0x13,0x4b,0xb7,0xfa,0xf8,0x06,0x46}}; - -/* Defined as extern in urlmon.idl, but not exported by uuid.lib */ -const GUID GUID_CUSTOM_CONFIRMOBJECTSAFETY = - {0x10200490,0xfa38,0x11d0,{0xac,0x0e,0x00,0xa0,0xc9,0xf,0xff,0xc0}}; - -#define DISPID_TEST_REPORTSUCCESS 0x1000 - -#define DISPID_GLOBAL_OK 0x2000 - -static const char *debugstr_guid(REFIID riid) -{ - static char buf[50]; - - sprintf(buf, "{%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]); - - return buf; -} - -static BSTR a2bstr(const char *str) -{ - BSTR ret; - int len; - - len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); - ret = SysAllocStringLen(NULL, len-1); - MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len); - - return ret; -} - -static int strcmp_wa(LPCWSTR strw, const char *stra) -{ - CHAR buf[512]; - WideCharToMultiByte(CP_ACP, 0, strw, -1, buf, sizeof(buf), 0, 0); - return lstrcmpA(buf, stra); -} - -static HRESULT WINAPI ObjectWithSite_QueryInterface(IObjectWithSite *iface, REFIID riid, void **ppv) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static ULONG WINAPI ObjectWithSite_AddRef(IObjectWithSite *iface) -{ - return 2; -} - -static ULONG WINAPI ObjectWithSite_Release(IObjectWithSite *iface) -{ - return 1; -} - -static HRESULT WINAPI ObjectWithSite_SetSite(IObjectWithSite *iface, IUnknown *pUnkSite) -{ - IServiceProvider *sp; - HRESULT hres; - - - CHECK_EXPECT(SetSite); - ok(pUnkSite != NULL, "pUnkSite == NULL\n"); - - hres = IUnknown_QueryInterface(pUnkSite, &IID_IServiceProvider, (void**)&sp); - ok(hres == S_OK, "Could not get IServiceProvider iface: %08x\n", hres); - IServiceProvider_Release(sp); - - return SetSite_hres; -} - -static HRESULT WINAPI ObjectWithSite_GetSite(IObjectWithSite *iface, REFIID riid, void **ppvSite) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static const IObjectWithSiteVtbl ObjectWithSiteVtbl = { - ObjectWithSite_QueryInterface, - ObjectWithSite_AddRef, - ObjectWithSite_Release, - ObjectWithSite_SetSite, - ObjectWithSite_GetSite -}; - -static IObjectWithSite ObjectWithSite = { &ObjectWithSiteVtbl }; - -static IObjectWithSite *object_with_site; - -static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv) -{ - *ppv = NULL; - - if(IsEqualGUID(riid, &IID_IUnknown)) { - *ppv = iface; - }else if(IsEqualGUID(riid, &IID_IDispatch) || IsEqualGUID(riid, &IID_IDispatchEx)) { - if(FAILED(QI_IDispatch_hres)) - return QI_IDispatch_hres; - *ppv = iface; - }else if(IsEqualGUID(&IID_IObjectWithSite, riid)) { - CHECK_EXPECT(QI_IObjectWithSite); - *ppv = object_with_site; - }else { - return E_NOINTERFACE; - } - - return *ppv ? S_OK : E_NOINTERFACE; -} - -static ULONG WINAPI DispatchEx_AddRef(IDispatchEx *iface) -{ - return 2; -} - -static ULONG WINAPI DispatchEx_Release(IDispatchEx *iface) -{ - return 1; -} - -static HRESULT WINAPI DispatchEx_GetTypeInfoCount(IDispatchEx *iface, UINT *pctinfo) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetIDsOfNames(IDispatchEx *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, - LCID lcid, DISPID *rgDispId) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex) -{ - ok(0, "unexpected call %s %x\n", wine_dbgstr_w(bstrName), grfdex); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID id) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetMemberName(IDispatchEx *iface, DISPID id, BSTR *pbstrName) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetNextDispID(IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetNameSpaceParent(IDispatchEx *iface, IUnknown **ppunk) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Test_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid) -{ - if(!strcmp_wa(bstrName, "reportSuccess")) { - ok(grfdex == fdexNameCaseSensitive, "grfdex = %x\n", grfdex); - *pid = DISPID_TEST_REPORTSUCCESS; - return S_OK; - } - - ok(0, "unexpected name %s\n", wine_dbgstr_w(bstrName)); - return E_NOTIMPL; -} - -static HRESULT WINAPI Test_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, - VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) -{ - switch(id) { - case DISPID_TEST_REPORTSUCCESS: - CHECK_EXPECT(reportSuccess); - - ok(wFlags == INVOKE_FUNC, "wFlags = %x\n", wFlags); - ok(pdp != NULL, "pdp == NULL\n"); - ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n"); - ok(pdp->cArgs == 0, "cArgs = %d\n", pdp->cArgs); - ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs); - ok(!pvarRes, "pvarRes != NULL\n"); - ok(pei != NULL, "pei == NULL\n"); - break; - - default: - ok(0, "unexpected call\n"); - return E_NOTIMPL; - } - - return S_OK; -} - -static IDispatchExVtbl testObjVtbl = { - DispatchEx_QueryInterface, - DispatchEx_AddRef, - DispatchEx_Release, - DispatchEx_GetTypeInfoCount, - DispatchEx_GetTypeInfo, - DispatchEx_GetIDsOfNames, - DispatchEx_Invoke, - Test_GetDispID, - Test_InvokeEx, - DispatchEx_DeleteMemberByName, - DispatchEx_DeleteMemberByDispID, - DispatchEx_GetMemberProperties, - DispatchEx_GetMemberName, - DispatchEx_GetNextDispID, - DispatchEx_GetNameSpaceParent -}; - -static IDispatchEx testObj = { &testObjVtbl }; - -static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid) -{ - if(!strcmp_wa(bstrName, "ok")) { - ok(grfdex == fdexNameCaseSensitive, "grfdex = %x\n", grfdex); - *pid = DISPID_GLOBAL_OK; - return S_OK; - } - - ok(0, "unexpected name %s\n", wine_dbgstr_w(bstrName)); - return E_NOTIMPL; -} - -static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, - VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) -{ - switch(id) { - case DISPID_GLOBAL_OK: - ok(wFlags == INVOKE_FUNC || wFlags == (INVOKE_FUNC|INVOKE_PROPERTYGET), "wFlags = %x\n", wFlags); - ok(pdp != NULL, "pdp == NULL\n"); - ok(pdp->rgvarg != NULL, "rgvarg == NULL\n"); - ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n"); - ok(pdp->cArgs == 2, "cArgs = %d\n", pdp->cArgs); - ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs); - ok(pei != NULL, "pei == NULL\n"); - - ok(V_VT(pdp->rgvarg) == VT_BSTR, "V_VT(psp->rgvargs) = %d\n", V_VT(pdp->rgvarg)); - ok(V_VT(pdp->rgvarg+1) == VT_BOOL, "V_VT(psp->rgvargs+1) = %d\n", V_VT(pdp->rgvarg)); - ok(V_BOOL(pdp->rgvarg+1), "%s\n", wine_dbgstr_w(V_BSTR(pdp->rgvarg))); - break; - - default: - ok(0, "unexpected call\n"); - return E_NOTIMPL; - } - - return S_OK; -} - -static IDispatchExVtbl globalObjVtbl = { - DispatchEx_QueryInterface, - DispatchEx_AddRef, - DispatchEx_Release, - DispatchEx_GetTypeInfoCount, - DispatchEx_GetTypeInfo, - DispatchEx_GetIDsOfNames, - DispatchEx_Invoke, - Global_GetDispID, - Global_InvokeEx, - DispatchEx_DeleteMemberByName, - DispatchEx_DeleteMemberByDispID, - DispatchEx_GetMemberProperties, - DispatchEx_GetMemberName, - DispatchEx_GetNextDispID, - DispatchEx_GetNameSpaceParent -}; - -static IDispatchEx globalObj = { &globalObjVtbl }; - -static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv) -{ - if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IClassFactory, riid)) { - *ppv = iface; - return S_OK; - } - - /* TODO: IClassFactoryEx */ - *ppv = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface) -{ - return 2; -} - -static ULONG WINAPI ClassFactory_Release(IClassFactory *iface) -{ - return 1; -} - -static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) -{ - CHECK_EXPECT(CreateInstance); - - ok(!outer, "outer = %p\n", outer); - ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", debugstr_guid(riid)); - - if(SUCCEEDED(CreateInstance_hres)) - *ppv = &testObj; - return CreateInstance_hres; -} - -static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL dolock) -{ - ok(0, "unexpected call\n"); - return S_OK; -} - -static const IClassFactoryVtbl ClassFactoryVtbl = { - ClassFactory_QueryInterface, - ClassFactory_AddRef, - ClassFactory_Release, - ClassFactory_CreateInstance, - ClassFactory_LockServer -}; - -static IClassFactory activex_cf = { &ClassFactoryVtbl }; - -static HRESULT WINAPI InternetHostSecurityManager_QueryInterface(IInternetHostSecurityManager *iface, REFIID riid, void **ppv) -{ - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI InternetHostSecurityManager_AddRef(IInternetHostSecurityManager *iface) -{ - return 2; -} - -static ULONG WINAPI InternetHostSecurityManager_Release(IInternetHostSecurityManager *iface) -{ - return 1; -} - -static HRESULT WINAPI InternetHostSecurityManager_GetSecurityId(IInternetHostSecurityManager *iface, BYTE *pbSecurityId, - DWORD *pcbSecurityId, DWORD_PTR dwReserved) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InternetHostSecurityManager_ProcessUrlAction(IInternetHostSecurityManager *iface, DWORD dwAction, - BYTE *pPolicy, DWORD cbPolicy, BYTE *pContext, DWORD cbContext, DWORD dwFlags, DWORD dwReserved) -{ - CHECK_EXPECT(ProcessUrlAction); - - ok(dwAction == URLACTION_ACTIVEX_RUN, "dwAction = %x\n", dwAction); - ok(pPolicy != NULL, "pPolicy == NULL\n"); - ok(cbPolicy == sizeof(DWORD), "cbPolicy = %d\n", cbPolicy); - ok(pContext != NULL, "pContext == NULL\n"); - ok(cbContext == sizeof(GUID), "cbContext = %d\n", cbContext); - ok(IsEqualGUID(pContext, &CLSID_TestObj), "pContext = %s\n", debugstr_guid((const IID*)pContext)); - ok(!dwFlags, "dwFlags = %x\n", dwFlags); - ok(!dwReserved, "dwReserved = %x\n", dwReserved); - - if(SUCCEEDED(ProcessUrlAction_hres)) - *(DWORD*)pPolicy = ProcessUrlAction_policy; - return ProcessUrlAction_hres; -} - -static HRESULT WINAPI InternetHostSecurityManager_QueryCustomPolicy(IInternetHostSecurityManager *iface, REFGUID guidKey, - BYTE **ppPolicy, DWORD *pcbPolicy, BYTE *pContext, DWORD cbContext, DWORD dwReserved) -{ - const struct CONFIRMSAFETY *cs = (const struct CONFIRMSAFETY*)pContext; - DWORD *ret; - - CHECK_EXPECT(QueryCustomPolicy); - - ok(IsEqualGUID(&GUID_CUSTOM_CONFIRMOBJECTSAFETY, guidKey), "guidKey = %s\n", debugstr_guid(guidKey)); - - ok(ppPolicy != NULL, "ppPolicy == NULL\n"); - ok(pcbPolicy != NULL, "pcbPolicy == NULL\n"); - ok(pContext != NULL, "pContext == NULL\n"); - ok(cbContext == sizeof(struct CONFIRMSAFETY), "cbContext = %d\n", cbContext); - ok(!dwReserved, "dwReserved = %x\n", dwReserved); - - /* TODO: CLSID */ - ok(cs->pUnk != NULL, "cs->pUnk == NULL\n"); - ok(!cs->dwFlags, "dwFlags = %x\n", cs->dwFlags); - - if(FAILED(QueryCustomPolicy_hres)) - return QueryCustomPolicy_hres; - - ret = CoTaskMemAlloc(QueryCustomPolicy_psize); - *ppPolicy = (BYTE*)ret; - *pcbPolicy = QueryCustomPolicy_psize; - memset(ret, 0, QueryCustomPolicy_psize); - if(QueryCustomPolicy_psize >= sizeof(DWORD)) - *ret = QueryCustomPolicy_policy; - - return QueryCustomPolicy_hres; -} - -static const IInternetHostSecurityManagerVtbl InternetHostSecurityManagerVtbl = { - InternetHostSecurityManager_QueryInterface, - InternetHostSecurityManager_AddRef, - InternetHostSecurityManager_Release, - InternetHostSecurityManager_GetSecurityId, - InternetHostSecurityManager_ProcessUrlAction, - InternetHostSecurityManager_QueryCustomPolicy -}; - -static IInternetHostSecurityManager InternetHostSecurityManager = { &InternetHostSecurityManagerVtbl }; - -static IServiceProvider ServiceProvider; - -static HRESULT WINAPI ServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv) -{ - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI ServiceProvider_AddRef(IServiceProvider *iface) -{ - return 2; -} - -static ULONG WINAPI ServiceProvider_Release(IServiceProvider *iface) -{ - return 1; -} - -static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, - REFGUID guidService, REFIID riid, void **ppv) -{ - if(IsEqualGUID(&SID_GetCaller, guidService)) - return E_NOINTERFACE; - - if(IsEqualGUID(&SID_SInternetHostSecurityManager, guidService)) { - if(iface == &ServiceProvider) - CHECK_EXPECT(Host_QS_SecMgr); - else - CHECK_EXPECT(Caller_QS_SecMgr); - ok(IsEqualGUID(&IID_IInternetHostSecurityManager, riid), "unexpected riid %s\n", debugstr_guid(riid)); - if(SUCCEEDED(QS_SecMgr_hres)) - *ppv = &InternetHostSecurityManager; - return QS_SecMgr_hres; - } - - ok(0, "unexpected service %s\n", debugstr_guid(guidService)); - return E_NOINTERFACE; -} - -static IServiceProviderVtbl ServiceProviderVtbl = { - ServiceProvider_QueryInterface, - ServiceProvider_AddRef, - ServiceProvider_Release, - ServiceProvider_QueryService -}; - -static IServiceProvider ServiceProvider = { &ServiceProviderVtbl }; -static IServiceProvider caller_sp = { &ServiceProviderVtbl }; - -static HRESULT WINAPI ActiveScriptSite_QueryInterface(IActiveScriptSite *iface, REFIID riid, void **ppv) -{ - if(IsEqualGUID(&IID_IUnknown, riid)) { - *ppv = iface; - }else if(IsEqualGUID(&IID_IActiveScriptSite, riid)) { - *ppv = iface; - }else if(IsEqualGUID(&IID_IServiceProvider, riid)) { - *ppv = &ServiceProvider; - }else { - *ppv = NULL; - return E_NOINTERFACE; - } - - IUnknown_AddRef((IUnknown*)*ppv); - return S_OK; -} - -static ULONG WINAPI ActiveScriptSite_AddRef(IActiveScriptSite *iface) -{ - return 2; -} - -static ULONG WINAPI ActiveScriptSite_Release(IActiveScriptSite *iface) -{ - return 1; -} - -static HRESULT WINAPI ActiveScriptSite_GetLCID(IActiveScriptSite *iface, LCID *plcid) -{ - *plcid = GetUserDefaultLCID(); - return S_OK; -} - -static HRESULT WINAPI ActiveScriptSite_GetItemInfo(IActiveScriptSite *iface, LPCOLESTR pstrName, - DWORD dwReturnMask, IUnknown **ppiunkItem, ITypeInfo **ppti) -{ - ok(dwReturnMask == SCRIPTINFO_IUNKNOWN, "unexpected dwReturnMask %x\n", dwReturnMask); - ok(!ppti, "ppti != NULL\n"); - ok(!strcmp_wa(pstrName, "test"), "pstrName = %s\n", wine_dbgstr_w(pstrName)); - - *ppiunkItem = (IUnknown*)&globalObj; - return S_OK; -} - -static HRESULT WINAPI ActiveScriptSite_GetDocVersionString(IActiveScriptSite *iface, BSTR *pbstrVersion) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI ActiveScriptSite_OnScriptTerminate(IActiveScriptSite *iface, - const VARIANT *pvarResult, const EXCEPINFO *pexcepinfo) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI ActiveScriptSite_OnStateChange(IActiveScriptSite *iface, SCRIPTSTATE ssScriptState) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI ActiveScriptSite_OnScriptError(IActiveScriptSite *iface, IActiveScriptError *pscripterror) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI ActiveScriptSite_OnEnterScript(IActiveScriptSite *iface) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI ActiveScriptSite_OnLeaveScript(IActiveScriptSite *iface) -{ - return E_NOTIMPL; -} - -#undef ACTSCPSITE_THIS - -static const IActiveScriptSiteVtbl ActiveScriptSiteVtbl = { - ActiveScriptSite_QueryInterface, - ActiveScriptSite_AddRef, - ActiveScriptSite_Release, - ActiveScriptSite_GetLCID, - ActiveScriptSite_GetItemInfo, - ActiveScriptSite_GetDocVersionString, - ActiveScriptSite_OnScriptTerminate, - ActiveScriptSite_OnStateChange, - ActiveScriptSite_OnScriptError, - ActiveScriptSite_OnEnterScript, - ActiveScriptSite_OnLeaveScript -}; - -static IActiveScriptSite ActiveScriptSite = { &ActiveScriptSiteVtbl }; - -static void set_safety_options(IUnknown *unk) -{ - IObjectSafety *safety; - DWORD supported, enabled; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IObjectSafety, (void**)&safety); - ok(hres == S_OK, "Could not get IObjectSafety: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IObjectSafety_SetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, - INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER, - INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER); - ok(hres == S_OK, "SetInterfaceSafetyOptions failed: %08x\n", hres); - - supported = enabled = 0xdeadbeef; - hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, &supported, &enabled); - ok(hres == S_OK, "GetInterfaceSafetyOptions failed: %08x\n", hres); - ok(supported == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER), - "supported=%x\n", supported); - ok(enabled == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER), - "enabled=%x\n", enabled); - - IObjectSafety_Release(safety); -} - -#define parse_script_a(p,s) _parse_script_a(__LINE__,p,s) -static void _parse_script_a(unsigned line, IActiveScriptParse *parser, const char *script) -{ - BSTR str; - HRESULT hres; - - str = a2bstr(script); - hres = IActiveScriptParse64_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - SysFreeString(str); - ok_(__FILE__,line)(hres == S_OK, "ParseScriptText failed: %08x\n", hres); -} - -static IActiveScriptParse *create_script(void) -{ - IActiveScriptParse *parser; - IActiveScript *script; - HRESULT hres; - - QS_SecMgr_hres = S_OK; - ProcessUrlAction_hres = S_OK; - ProcessUrlAction_policy = URLPOLICY_ALLOW; - CreateInstance_hres = S_OK; - QueryCustomPolicy_hres = S_OK; - QueryCustomPolicy_psize = sizeof(DWORD); - QueryCustomPolicy_policy = URLPOLICY_ALLOW; - QI_IDispatch_hres = S_OK; - SetSite_hres = S_OK; - - hres = CoCreateInstance(&CLSID_JScript, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, - &IID_IActiveScript, (void**)&script); - ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres); - if(FAILED(hres)) - return NULL; - - set_safety_options((IUnknown*)script); - - hres = IActiveScript_QueryInterface(script, &IID_IActiveScriptParse, (void**)&parser); - ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres); - - hres = IActiveScriptParse64_InitNew(parser); - ok(hres == S_OK, "InitNew failed: %08x\n", hres); - - hres = IActiveScript_SetScriptSite(script, &ActiveScriptSite); - ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres); - - hres = IActiveScript_AddNamedItem(script, testW, - SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|SCRIPTITEM_GLOBALMEMBERS); - ok(hres == S_OK, "AddNamedItem failed: %08x\n", hres); - - hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_STARTED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n", hres); - - IActiveScript_Release(script); - - parse_script_a(parser, - "function testException(func, type, number) {\n" - "try {\n" - " func();\n" - "}catch(e) {\n" - " ok(e.name === type, 'e.name = ' + e.name + ', expected ' + type)\n" - " ok(e.number === number, 'e.number = ' + e.number + ', expected ' + number);\n" - " return;\n" - "}" - "ok(false, 'exception expected');\n" - "}"); - - return parser; -} - -static IDispatchEx *parse_procedure_a(IActiveScriptParse *parser, const char *src) -{ - IActiveScriptParseProcedure2 *parse_proc; - IDispatchEx *dispex; - IDispatch *disp; - BSTR str; - HRESULT hres; - - hres = IUnknown_QueryInterface(parser, &IID_IActiveScriptParseProcedure2, (void**)&parse_proc); - ok(hres == S_OK, "Coult not get IActiveScriptParseProcedure2: %08x\n", hres); - - str = a2bstr(src); - hres = IActiveScriptParseProcedure2_64_ParseProcedureText(parse_proc, str, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, &disp); - SysFreeString(str); - IUnknown_Release(parse_proc); - ok(hres == S_OK, "ParseProcedureText failed: %08x\n", hres); - ok(disp != NULL, "disp == NULL\n"); - - hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex); - IDispatch_Release(dispex); - ok(hres == S_OK, "Could not get IDispatchEx iface: %08x\n", hres); - - return dispex; -} - -#define call_procedure(p,c) _call_procedure(__LINE__,p,c) -static void _call_procedure(unsigned line, IDispatchEx *proc, IServiceProvider *caller) -{ - DISPPARAMS dp = {NULL,NULL,0,0}; - EXCEPINFO ei = {0}; - HRESULT hres; - - hres = IDispatchEx_InvokeEx(proc, DISPID_VALUE, 0, DISPATCH_METHOD, &dp, NULL, &ei, caller); - ok_(__FILE__,line)(hres == S_OK, "InvokeEx failed: %08x\n", hres); - -} - -static void test_ActiveXObject(void) -{ - IActiveScriptParse *parser; - IDispatchEx *proc; - - parser = create_script(); - - SET_EXPECT(Host_QS_SecMgr); - SET_EXPECT(ProcessUrlAction); - SET_EXPECT(CreateInstance); - SET_EXPECT(QueryCustomPolicy); - SET_EXPECT(QI_IObjectWithSite); - SET_EXPECT(reportSuccess); - parse_script_a(parser, "(new ActiveXObject('Wine.Test')).reportSuccess();"); - CHECK_CALLED(Host_QS_SecMgr); - CHECK_CALLED(ProcessUrlAction); - CHECK_CALLED(CreateInstance); - CHECK_CALLED(QueryCustomPolicy); - CHECK_CALLED(QI_IObjectWithSite); - CHECK_CALLED(reportSuccess); - - proc = parse_procedure_a(parser, "(new ActiveXObject('Wine.Test')).reportSuccess();"); - - SET_EXPECT(ProcessUrlAction); - SET_EXPECT(CreateInstance); - SET_EXPECT(QueryCustomPolicy); - SET_EXPECT(QI_IObjectWithSite); - SET_EXPECT(reportSuccess); - call_procedure(proc, NULL); - CHECK_CALLED(ProcessUrlAction); - CHECK_CALLED(CreateInstance); - CHECK_CALLED(QueryCustomPolicy); - CHECK_CALLED(QI_IObjectWithSite); - CHECK_CALLED(reportSuccess); - - SET_EXPECT(ProcessUrlAction); - SET_EXPECT(CreateInstance); - SET_EXPECT(QueryCustomPolicy); - SET_EXPECT(QI_IObjectWithSite); - SET_EXPECT(reportSuccess); - call_procedure(proc, &caller_sp); - CHECK_CALLED(ProcessUrlAction); - CHECK_CALLED(CreateInstance); - CHECK_CALLED(QueryCustomPolicy); - CHECK_CALLED(QI_IObjectWithSite); - CHECK_CALLED(reportSuccess); - - IDispatchEx_Release(proc); - IUnknown_Release(parser); - - parser = create_script(); - proc = parse_procedure_a(parser, "(new ActiveXObject('Wine.Test')).reportSuccess();"); - - SET_EXPECT(Host_QS_SecMgr); - SET_EXPECT(ProcessUrlAction); - SET_EXPECT(CreateInstance); - SET_EXPECT(QueryCustomPolicy); - SET_EXPECT(QI_IObjectWithSite); - SET_EXPECT(reportSuccess); - call_procedure(proc, &caller_sp); - CHECK_CALLED(Host_QS_SecMgr); - CHECK_CALLED(ProcessUrlAction); - CHECK_CALLED(CreateInstance); - CHECK_CALLED(QueryCustomPolicy); - CHECK_CALLED(QI_IObjectWithSite); - CHECK_CALLED(reportSuccess); - - parse_script_a(parser, "testException(function() { new ActiveXObject('Wine.TestABC'); }, 'Error', -2146827859);"); - - IDispatchEx_Release(proc); - IUnknown_Release(parser); - - parser = create_script(); - QS_SecMgr_hres = E_NOINTERFACE; - - SET_EXPECT(Host_QS_SecMgr); - parse_script_a(parser, "testException(function() { new ActiveXObject('Wine.Test'); }, 'Error', -2146827859);"); - CHECK_CALLED(Host_QS_SecMgr); - - IUnknown_Release(parser); - - parser = create_script(); - ProcessUrlAction_hres = E_FAIL; - - SET_EXPECT(Host_QS_SecMgr); - SET_EXPECT(ProcessUrlAction); - parse_script_a(parser, "testException(function() { new ActiveXObject('Wine.Test'); }, 'Error', -2146827859);"); - CHECK_CALLED(Host_QS_SecMgr); - CHECK_CALLED(ProcessUrlAction); - - IUnknown_Release(parser); - - parser = create_script(); - ProcessUrlAction_policy = URLPOLICY_DISALLOW; - - SET_EXPECT(Host_QS_SecMgr); - SET_EXPECT(ProcessUrlAction); - parse_script_a(parser, "testException(function() { new ActiveXObject('Wine.Test'); }, 'Error', -2146827859);"); - CHECK_CALLED(Host_QS_SecMgr); - CHECK_CALLED(ProcessUrlAction); - - IUnknown_Release(parser); - - parser = create_script(); - CreateInstance_hres = E_FAIL; - - SET_EXPECT(Host_QS_SecMgr); - SET_EXPECT(ProcessUrlAction); - SET_EXPECT(CreateInstance); - parse_script_a(parser, "testException(function() { new ActiveXObject('Wine.Test'); }, 'Error', -2146827859);"); - CHECK_CALLED(Host_QS_SecMgr); - CHECK_CALLED(ProcessUrlAction); - CHECK_CALLED(CreateInstance); - - IUnknown_Release(parser); - - parser = create_script(); - QueryCustomPolicy_hres = E_FAIL; - - SET_EXPECT(Host_QS_SecMgr); - SET_EXPECT(ProcessUrlAction); - SET_EXPECT(CreateInstance); - SET_EXPECT(QueryCustomPolicy); - parse_script_a(parser, "testException(function() { new ActiveXObject('Wine.Test'); }, 'Error', -2146827859);"); - CHECK_CALLED(Host_QS_SecMgr); - CHECK_CALLED(ProcessUrlAction); - CHECK_CALLED(CreateInstance); - CHECK_CALLED(QueryCustomPolicy); - - IUnknown_Release(parser); - - parser = create_script(); - QueryCustomPolicy_psize = 6; - - SET_EXPECT(Host_QS_SecMgr); - SET_EXPECT(ProcessUrlAction); - SET_EXPECT(CreateInstance); - SET_EXPECT(QueryCustomPolicy); - SET_EXPECT(QI_IObjectWithSite); - SET_EXPECT(reportSuccess); - parse_script_a(parser, "(new ActiveXObject('Wine.Test')).reportSuccess();"); - CHECK_CALLED(Host_QS_SecMgr); - CHECK_CALLED(ProcessUrlAction); - CHECK_CALLED(CreateInstance); - CHECK_CALLED(QueryCustomPolicy); - CHECK_CALLED(QI_IObjectWithSite); - CHECK_CALLED(reportSuccess); - - IUnknown_Release(parser); - - parser = create_script(); - QueryCustomPolicy_policy = URLPOLICY_DISALLOW; - - SET_EXPECT(Host_QS_SecMgr); - SET_EXPECT(ProcessUrlAction); - SET_EXPECT(CreateInstance); - SET_EXPECT(QueryCustomPolicy); - parse_script_a(parser, "testException(function() { new ActiveXObject('Wine.Test'); }, 'Error', -2146827859);"); - CHECK_CALLED(Host_QS_SecMgr); - CHECK_CALLED(ProcessUrlAction); - CHECK_CALLED(CreateInstance); - CHECK_CALLED(QueryCustomPolicy); - - QueryCustomPolicy_psize = 6; - - SET_EXPECT(ProcessUrlAction); - SET_EXPECT(CreateInstance); - SET_EXPECT(QueryCustomPolicy); - parse_script_a(parser, "testException(function() { new ActiveXObject('Wine.Test'); }, 'Error', -2146827859);"); - CHECK_CALLED(ProcessUrlAction); - CHECK_CALLED(CreateInstance); - CHECK_CALLED(QueryCustomPolicy); - - QueryCustomPolicy_policy = URLPOLICY_ALLOW; - QueryCustomPolicy_psize = 3; - - SET_EXPECT(ProcessUrlAction); - SET_EXPECT(CreateInstance); - SET_EXPECT(QueryCustomPolicy); - parse_script_a(parser, "testException(function() { new ActiveXObject('Wine.Test'); }, 'Error', -2146827859);"); - CHECK_CALLED(ProcessUrlAction); - CHECK_CALLED(CreateInstance); - CHECK_CALLED(QueryCustomPolicy); - - IUnknown_Release(parser); - - parser = create_script(); - object_with_site = &ObjectWithSite; - - SET_EXPECT(Host_QS_SecMgr); - SET_EXPECT(ProcessUrlAction); - SET_EXPECT(CreateInstance); - SET_EXPECT(QueryCustomPolicy); - SET_EXPECT(QI_IObjectWithSite); - SET_EXPECT(SetSite); - SET_EXPECT(reportSuccess); - parse_script_a(parser, "(new ActiveXObject('Wine.Test')).reportSuccess();"); - CHECK_CALLED(Host_QS_SecMgr); - CHECK_CALLED(ProcessUrlAction); - CHECK_CALLED(CreateInstance); - CHECK_CALLED(QueryCustomPolicy); - CHECK_CALLED(QI_IObjectWithSite); - CHECK_CALLED(SetSite); - CHECK_CALLED(reportSuccess); - - SetSite_hres = E_FAIL; - SET_EXPECT(ProcessUrlAction); - SET_EXPECT(CreateInstance); - SET_EXPECT(QueryCustomPolicy); - SET_EXPECT(QI_IObjectWithSite); - SET_EXPECT(SetSite); - parse_script_a(parser, "testException(function() { new ActiveXObject('Wine.Test'); }, 'Error', -2146827859);"); - CHECK_CALLED(ProcessUrlAction); - CHECK_CALLED(CreateInstance); - CHECK_CALLED(QueryCustomPolicy); - CHECK_CALLED(QI_IObjectWithSite); - CHECK_CALLED(SetSite); - - IUnknown_Release(parser); -} - -static BOOL init_key(const char *key_name, const char *def_value, BOOL init) -{ - HKEY hkey; - DWORD res; - - if(!init) { - RegDeleteKey(HKEY_CLASSES_ROOT, key_name); - return TRUE; - } - - res = RegCreateKeyA(HKEY_CLASSES_ROOT, key_name, &hkey); - if(res != ERROR_SUCCESS) - return FALSE; - - if(def_value) - res = RegSetValueA(hkey, NULL, REG_SZ, def_value, strlen(def_value)); - - RegCloseKey(hkey); - - return res == ERROR_SUCCESS; -} - -static BOOL init_registry(BOOL init) -{ - return init_key("Wine.Test\\CLSID", TESTOBJ_CLSID, init); -} - -static BOOL register_activex(void) -{ - DWORD regid; - HRESULT hres; - - if(!init_registry(TRUE)) { - init_registry(FALSE); - return FALSE; - } - - hres = CoRegisterClassObject(&CLSID_TestObj, (IUnknown *)&activex_cf, - CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, ®id); - ok(hres == S_OK, "Could not register screipt engine: %08x\n", hres); - - return TRUE; -} - -static BOOL check_jscript(void) -{ - IActiveScriptParse *parser; - BSTR str; - HRESULT hres; - - parser = create_script(); - if(!parser) - return FALSE; - - str = a2bstr("if(!('localeCompare' in String.prototype)) throw 1;"); - hres = IActiveScriptParse64_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - SysFreeString(str); - IUnknown_Release(parser); - - return hres == S_OK; -} - -START_TEST(activex) -{ - CoInitialize(NULL); - - if(check_jscript()) { - register_activex(); - - test_ActiveXObject(); - - init_registry(FALSE); - }else { - win_skip("Broken engine, probably too old\n"); - } - - CoUninitialize(); -} diff --git a/rostests/winetests/jscript/api.js b/rostests/winetests/jscript/api.js deleted file mode 100644 index 2ccad3dacd7..00000000000 --- a/rostests/winetests/jscript/api.js +++ /dev/null @@ -1,2170 +0,0 @@ -/* - * Copyright 2008 Jacek Caban for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * 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 - */ - -var tmp, i; - -i = parseInt("0"); -ok(i === 0, "parseInt('0') = " + i); -i = parseInt("123"); -ok(i === 123, "parseInt('123') = " + i); -i = parseInt("-123"); -ok(i === -123, "parseInt('-123') = " + i); -i = parseInt("0xff"); -ok(i === 0xff, "parseInt('0xff') = " + i); -i = parseInt("11", 8); -ok(i === 9, "parseInt('11', 8) = " + i); -i = parseInt("1j", 22); -ok(i === 41, "parseInt('1j', 32) = " + i); -i = parseInt("123", 0); -ok(i === 123, "parseInt('123', 0) = " + i); -i = parseInt("123", 10, "test"); -ok(i === 123, "parseInt('123', 10, 'test') = " + i); -i = parseInt("11", "8"); -ok(i === 9, "parseInt('11', '8') = " + i); - -tmp = encodeURI("abc"); -ok(tmp === "abc", "encodeURI('abc') = " + tmp); -tmp = encodeURI("{abc}"); -ok(tmp === "%7Babc%7D", "encodeURI('{abc}') = " + tmp); -tmp = encodeURI(""); -ok(tmp === "", "encodeURI('') = " + tmp); -tmp = encodeURI("\01\02\03\04"); -ok(tmp === "%01%02%03%04", "encodeURI('\\01\\02\\03\\04') = " + tmp); -tmp = encodeURI("{#@}"); -ok(tmp === "%7B#@%7D", "encodeURI('{#@}') = " + tmp); -tmp = encodeURI("\xa1 "); -ok(tmp === "%C2%A1%20", "encodeURI(\\xa1 ) = " + tmp); -tmp = encodeURI("\xffff"); -ok(tmp.length === 8, "encodeURI('\\xffff').length = " + tmp.length); -tmp = encodeURI("abcABC123;/?:@&=+$,-_.!~*'()"); -ok(tmp === "abcABC123;/?:@&=+$,-_.!~*'()", "encodeURI('abcABC123;/?:@&=+$,-_.!~*'()') = " + tmp); -tmp = encodeURI(); -ok(tmp === "undefined", "encodeURI() = " + tmp); -tmp = encodeURI("abc", "test"); -ok(tmp === "abc", "encodeURI('abc') = " + tmp); - -tmp = encodeURIComponent("abc"); -ok(tmp === "abc", "encodeURIComponent('abc') = " + tmp); -dec = decodeURIComponent(tmp); -ok(dec === "abc", "decodeURIComponent('" + tmp + "') = " + dec); -tmp = encodeURIComponent("{abc}"); -ok(tmp === "%7Babc%7D", "encodeURIComponent('{abc}') = " + tmp); -dec = decodeURIComponent(tmp); -ok(dec === "{abc}", "decodeURIComponent('" + tmp + "') = " + dec); -tmp = encodeURIComponent(""); -ok(tmp === "", "encodeURIComponent('') = " + tmp); -dec = decodeURIComponent(tmp); -ok(dec === "", "decodeURIComponent('" + tmp + "') = " + dec); -tmp = encodeURIComponent("\01\02\03\04"); -ok(tmp === "%01%02%03%04", "encodeURIComponent('\\01\\02\\03\\04') = " + tmp); -dec = decodeURIComponent(tmp); -ok(dec === "\01\02\03\04", "decodeURIComponent('" + tmp + "') = " + dec); -tmp = encodeURIComponent("{#@}"); -ok(tmp === "%7B%23%40%7D", "encodeURIComponent('{#@}') = " + tmp); -dec = decodeURIComponent(tmp); -ok(dec === "{#@}", "decodeURIComponent('" + tmp + "') = " + dec); -tmp = encodeURIComponent("\xa1 "); -ok(tmp === "%C2%A1%20", "encodeURIComponent(\\xa1 ) = " + tmp); -dec = decodeURIComponent(tmp); -ok(dec === "\xa1 ", "decodeURIComponent('" + tmp + "') = " + dec); -tmp = encodeURIComponent("\xffff"); -ok(tmp.length === 8, "encodeURIComponent('\\xffff').length = " + tmp.length); -dec = decodeURIComponent(tmp); -ok(dec === "\xffff", "decodeURIComponent('" + tmp + "') = " + dec); -tmp = encodeURIComponent("abcABC123;/?:@&=+$,-_.!~*'()"); -ok(tmp === "abcABC123%3B%2F%3F%3A%40%26%3D%2B%24%2C-_.!~*'()", "encodeURIComponent('abcABC123;/?:@&=+$,-_.!~*'()') = " + tmp); -dec = decodeURIComponent(tmp); -ok(dec === "abcABC123;/?:@&=+$,-_.!~*'()", "decodeURIComponent('" + tmp + "') = " + dec); -tmp = encodeURIComponent(); -ok(tmp === "undefined", "encodeURIComponent() = " + tmp); -tmp = encodeURIComponent("abc", "test"); -ok(tmp === "abc", "encodeURIComponent('abc') = " + tmp); -dec = decodeURIComponent(); -ok(dec === "undefined", "decodeURIComponent() = " + dec); -dec = decodeURIComponent("abc", "test"); -ok(dec === "abc", "decodeURIComponent('abc') = " + dec); - -tmp = escape("abc"); -ok(tmp === "abc", "escape('abc') = " + tmp); -tmp = escape(""); -ok(tmp === "", "escape('') = " + tmp); -tmp = escape("a1b c!d+e@*-_+./,"); -ok(tmp === "a1b%20c%21d+e@*-_+./%2C", "escape('a1b c!d+e@*-_+./,') = " + tmp); -tmp = escape(); -ok(tmp === "undefined", "escape() = " + tmp); -tmp = escape('\u1234\123\xf3'); -ok(tmp == "%u1234S%F3", "escape('\u1234\123\xf3') = " + tmp); - -tmp = unescape("abc"); -ok(tmp === "abc", "unescape('abc') = " + tmp); -tmp = unescape(""); -ok(tmp === "", "unescape('') = " + tmp); -tmp = unescape("%%%"); -ok(tmp === "%%%", "unescape('%%%') = " + tmp); -tmp = unescape(); -ok(tmp === "undefined", "unescape() = " + tmp); -tmp = unescape("%54%65s%u0074"); -ok(tmp === "Test", "unescape('%54%65s%u0074') = " + tmp); - -tmp = "aA1~`!@#$%^&*()_+=-][{}';:/.,<>?\|"; -ok(escape(tmp) === "aA1%7E%60%21@%23%24%25%5E%26*%28%29_+%3D-%5D%5B%7B%7D%27%3B%3A/.%2C%3C%3E%3F%7C", "escape('" + tmp + "') = " + escape(tmp)); -ok(unescape(escape(tmp)) === tmp, "unescape(escape('" + tmp + "')) = " + unescape(escape(tmp))); - -tmp = "" + new Object(); -ok(tmp === "[object Object]", "'' + new Object() = " + tmp); -(tmp = new Array).f = Object.prototype.toString; -ok(tmp.f() === "[object Array]", "tmp.f() = " + tmp.f()); -(tmp = new Boolean).f = Object.prototype.toString; -ok(tmp.f() === "[object Boolean]", "tmp.f() = " + tmp.f()); -(tmp = new Date).f = Object.prototype.toString; -ok(tmp.f() === "[object Date]", "tmp.f() = " + tmp.f()); -(tmp = function() {}).f = Object.prototype.toString; -ok(tmp.f() === "[object Function]", "tmp.f() = " + tmp.f()); -Math.f = Object.prototype.toString; -ok(Math.f() === "[object Math]", "tmp.f() = " + tmp.f()); -(tmp = new Number).f = Object.prototype.toString; -ok(tmp.f() === "[object Number]", "tmp.f() = " + tmp.f()); -(tmp = new RegExp("")).f = Object.prototype.toString; -ok(tmp.f() === "[object RegExp]", "tmp.f() = " + tmp.f()); -(tmp = new String).f = Object.prototype.toString; -ok(tmp.f() === "[object String]", "tmp.f() = " + tmp.f()); -tmp = Object.prototype.toString.call(testObj); -ok(tmp === "[object Object]", "toString.call(testObj) = " + tmp); -tmp = Object.prototype.toString.call(this); -ok(tmp === "[object Object]", "toString.call(this) = " + tmp); -(function () { tmp = Object.prototype.toString.call(arguments); })(); -ok(tmp === "[object Object]", "toString.call(arguments) = " + tmp); - -ok(Object(1) instanceof Number, "Object(1) is not instance of Number"); -ok(Object("") instanceof String, "Object('') is not instance of String"); -ok(Object(false) instanceof Boolean, "Object(false) is not instance of Boolean"); - -obj = new Object(); -ok(Object(obj) === obj, "Object(obj) !== obj"); - -ok(typeof(Object()) === "object", "typeof(Object()) !== 'object'"); -ok(typeof(Object(undefined)) === "object", "typeof(Object(undefined)) !== 'object'"); -ok(typeof(Object(null)) === "object", "typeof(Object(null)) !== 'object'"); - -var obj = new Object(); -obj.toString = function (x) { - ok(arguments.length === 0, "arguments.length = " + arguments.length); - return "test"; -}; -ok((tmp = obj.toLocaleString()) === "test", "obj.toLocaleString() = " + tmp); -ok((tmp = obj.toLocaleString(1)) === "test", "obj.toLocaleString(1) = " + tmp); -ok(obj === obj.valueOf(), "obj !== obj.valueOf"); - -ok("".length === 0, "\"\".length = " + "".length); -ok(getVT("".length) == "VT_I4", "\"\".length = " + "".length); -ok("abc".length === 3, "\"abc\".length = " + "abc".length); -ok(String.prototype.length === 0, "String.prototype.length = " + String.prototype.length); - -tmp = "".toString(); -ok(tmp === "", "''.toString() = " + tmp); -tmp = "test".toString(); -ok(tmp === "test", "''.toString() = " + tmp); -tmp = "test".toString(3); -ok(tmp === "test", "''.toString(3) = " + tmp); - -tmp = "".valueOf(); -ok(tmp === "", "''.valueOf() = " + tmp); -tmp = "test".valueOf(); -ok(tmp === "test", "''.valueOf() = " + tmp); -tmp = "test".valueOf(3); -ok(tmp === "test", "''.valueOf(3) = " + tmp); - -var str = new String("test"); -ok(str.toString() === "test", "str.toString() = " + str.toString()); -var str = new String(); -ok(str.toString() === "", "str.toString() = " + str.toString()); -var str = new String("test", "abc"); -ok(str.toString() === "test", "str.toString() = " + str.toString()); - -var strObj = new Object(); -strObj.toString = function() { return "abcd" }; -strObj.substr = String.prototype.substr; -strObj.lastIndexOf = String.prototype.lastIndexOf; - -tmp = "value " + str; -ok(tmp === "value test", "'value ' + str = " + tmp); - -tmp = String(); -ok(tmp === "", "String() = " + tmp); -tmp = String(false); -ok(tmp === "false", "String(false) = " + tmp); -tmp = String(null); -ok(tmp === "null", "String(null) = " + tmp); -tmp = String("test"); -ok(tmp === "test", "String('test') = " + tmp); -tmp = String("test", "abc"); -ok(tmp === "test", "String('test','abc') = " + tmp); - -tmp = "abc".charAt(0); -ok(tmp === "a", "'abc',charAt(0) = " + tmp); -tmp = "abc".charAt(1); -ok(tmp === "b", "'abc',charAt(1) = " + tmp); -tmp = "abc".charAt(2); -ok(tmp === "c", "'abc',charAt(2) = " + tmp); -tmp = "abc".charAt(3); -ok(tmp === "", "'abc',charAt(3) = " + tmp); -tmp = "abc".charAt(4); -ok(tmp === "", "'abc',charAt(4) = " + tmp); -tmp = "abc".charAt(); -ok(tmp === "a", "'abc',charAt() = " + tmp); -tmp = "abc".charAt(-1); -ok(tmp === "", "'abc',charAt(-1) = " + tmp); -tmp = "abc".charAt(0,2); -ok(tmp === "a", "'abc',charAt(0.2) = " + tmp); -tmp = "abc".charAt(NaN); -ok(tmp === "a", "'abc',charAt(NaN) = " + tmp); - -tmp = "abc".charCodeAt(0); -ok(tmp === 0x61, "'abc'.charCodeAt(0) = " + tmp); -tmp = "abc".charCodeAt(1); -ok(tmp === 0x62, "'abc'.charCodeAt(1) = " + tmp); -tmp = "abc".charCodeAt(2); -ok(tmp === 0x63, "'abc'.charCodeAt(2) = " + tmp); -tmp = "abc".charCodeAt(); -ok(tmp === 0x61, "'abc'.charCodeAt() = " + tmp); -tmp = "abc".charCodeAt(true); -ok(tmp === 0x62, "'abc'.charCodeAt(true) = " + tmp); -tmp = "abc".charCodeAt(0,2); -ok(tmp === 0x61, "'abc'.charCodeAt(0,2) = " + tmp); -tmp = "\u49F4".charCodeAt(0); -ok(tmp === 0x49F4, "'\u49F4'.charCodeAt(0) = " + tmp); -tmp = "\052".charCodeAt(0); -ok(tmp === 0x2A, "'\052'.charCodeAt(0) = " + tmp); -tmp = "\xa2".charCodeAt(0); -ok(tmp === 0xA2, "'\xa2'.charCodeAt(0) = " + tmp); - -tmp = "abcd".substring(1,3); -ok(tmp === "bc", "'abcd'.substring(1,3) = " + tmp); -tmp = "abcd".substring(-1,3); -ok(tmp === "abc", "'abcd'.substring(-1,3) = " + tmp); -tmp = "abcd".substring(1,6); -ok(tmp === "bcd", "'abcd'.substring(1,6) = " + tmp); -tmp = "abcd".substring(3,1); -ok(tmp === "bc", "'abcd'.substring(3,1) = " + tmp); -tmp = "abcd".substring(2,2); -ok(tmp === "", "'abcd'.substring(2,2) = " + tmp); -tmp = "abcd".substring(true,"3"); -ok(tmp === "bc", "'abcd'.substring(true,'3') = " + tmp); -tmp = "abcd".substring(1,3,2); -ok(tmp === "bc", "'abcd'.substring(1,3,2) = " + tmp); -tmp = "abcd".substring(); -ok(tmp === "abcd", "'abcd'.substring() = " + tmp); - -tmp = "abcd".substr(1,3); -ok(tmp === "bcd", "'abcd'.substr(1,3) = " + tmp); -tmp = "abcd".substr(-1,3); -ok(tmp === "abc", "'abcd'.substr(-1,3) = " + tmp); -tmp = "abcd".substr(1,6); -ok(tmp === "bcd", "'abcd'.substr(1,6) = " + tmp); -tmp = "abcd".substr(2,-1); -ok(tmp === "", "'abcd'.substr(3,1) = " + tmp); -tmp = "abcd".substr(2,0); -ok(tmp === "", "'abcd'.substr(2,2) = " + tmp); -tmp = "abcd".substr(true,"3"); -ok(tmp === "bcd", "'abcd'.substr(true,'3') = " + tmp); -tmp = "abcd".substr(1,3,2); -ok(tmp === "bcd", "'abcd'.substr(1,3,2) = " + tmp); -tmp = "abcd".substr(); -ok(tmp === "abcd", "'abcd'.substr() = " + tmp); -tmp = strObj.substr(1,1); -ok(tmp === "b", "'abcd'.substr(1,3) = " + tmp); - -tmp = "abcd".slice(1,3); -ok(tmp === "bc", "'abcd'.slice(1,3) = " + tmp); -tmp = "abcd".slice(1,-1); -ok(tmp === "bc", "'abcd'.slice(1,-1) = " + tmp); -tmp = "abcd".slice(-3,3); -ok(tmp === "bc", "'abcd'.slice(-3,3) = " + tmp); -tmp = "abcd".slice(-6,3); -ok(tmp === "abc", "'abcd'.slice(-6,3) = " + tmp); -tmp = "abcd".slice(3,1); -ok(tmp === "", "'abcd'.slice(3,1) = " + tmp); -tmp = "abcd".slice(true,3); -ok(tmp === "bc", "'abcd'.slice(true,3) = " + tmp); -tmp = "abcd".slice(); -ok(tmp === "abcd", "'abcd'.slice() = " + tmp); -tmp = "abcd".slice(1); -ok(tmp === "bcd", "'abcd'.slice(1) = " + tmp); - -tmp = "abc".concat(["d",1],2,false); -ok(tmp === "abcd,12false", "concat returned " + tmp); -var arr = new Array(2,"a"); -arr.concat = String.prototype.concat; -tmp = arr.concat("d"); -ok(tmp === "2,ad", "arr.concat = " + tmp); - -m = "a+bcabc".match("a+"); -ok(typeof(m) === "object", "typeof m is not object"); -ok(m.length === 1, "m.length is not 1"); -ok(m["0"] === "a", "m[0] is not \"ab\""); - -r = "- [test] -".replace("[test]", "success"); -ok(r === "- success -", "r = " + r + " expected '- success -'"); - -r = "- [test] -".replace("[test]", "success", "test"); -ok(r === "- success -", "r = " + r + " expected '- success -'"); - -r = "test".replace(); -ok(r === "test", "r = " + r + " expected 'test'"); - -function replaceFunc3(m, off, str) { - ok(arguments.length === 3, "arguments.length = " + arguments.length); - ok(m === "[test]", "m = " + m + " expected [test1]"); - ok(off === 1, "off = " + off + " expected 0"); - ok(str === "-[test]-", "str = " + arguments[3]); - return "ret"; -} - -r = "-[test]-".replace("[test]", replaceFunc3); -ok(r === "-ret-", "r = " + r + " expected '-ret-'"); - -r = "-[test]-".replace("[test]", replaceFunc3, "test"); -ok(r === "-ret-", "r = " + r + " expected '-ret-'"); - -r = "1,2,3".split(","); -ok(typeof(r) === "object", "typeof(r) = " + typeof(r)); -ok(r.length === 3, "r.length = " + r.length); -ok(r[0] === "1", "r[0] = " + r[0]); -ok(r[1] === "2", "r[1] = " + r[1]); -ok(r[2] === "3", "r[2] = " + r[2]); - - -r = "1,2,3".split(",*"); -ok(r.length === 1, "r.length = " + r.length); -ok(r[0] === "1,2,3", "r[0] = " + r[0]); - -r = "123".split(""); -ok(r.length === 3, "r.length = " + r.length); -ok(r[0] === "1", "r[0] = " + r[0]); -ok(r[1] === "2", "r[1] = " + r[1]); -ok(r[2] === "3", "r[2] = " + r[2]); - -r = "123".split(2); -ok(r.length === 2, "r.length = " + r.length); -ok(r[0] === "1", "r[0] = " + r[0]); -ok(r[1] === "3", "r[1] = " + r[1]); - -r = "1,2,".split(","); -ok(typeof(r) === "object", "typeof(r) = " + typeof(r)); -ok(r.length === 3, "r.length = " + r.length); -ok(r[0] === "1", "r[0] = " + r[0]); -ok(r[1] === "2", "r[1] = " + r[1]); -ok(r[2] === "", "r[2] = " + r[2]); - -tmp = "abcd".indexOf("bc",0); -ok(tmp === 1, "indexOf = " + tmp); -tmp = "abcd".indexOf("bc",1); -ok(tmp === 1, "indexOf = " + tmp); -tmp = "abcd".indexOf("bc"); -ok(tmp === 1, "indexOf = " + tmp); -tmp = "abcd".indexOf("ac"); -ok(tmp === -1, "indexOf = " + tmp); -tmp = "abcd".indexOf("bc",2); -ok(tmp === -1, "indexOf = " + tmp); -tmp = "abcd".indexOf("a",0); -ok(tmp === 0, "indexOf = " + tmp); -tmp = "abcd".indexOf("bc",0,"test"); -ok(tmp === 1, "indexOf = " + tmp); -tmp = "abcd".indexOf(); -ok(tmp == -1, "indexOf = " + tmp); - -tmp = "abcd".lastIndexOf("bc",1); -ok(tmp === 1, "lastIndexOf = " + tmp); -tmp = "abcd".lastIndexOf("bc",2); -ok(tmp === 1, "lastIndexOf = " + tmp); -tmp = "abcd".lastIndexOf("bc"); -ok(tmp === 1, "lastIndexOf = " + tmp); -tmp = "abcd".lastIndexOf("ac"); -ok(tmp === -1, "lastIndexOf = " + tmp); -tmp = "abcd".lastIndexOf("d",10); -ok(tmp === 3, "lastIndexOf = " + tmp); -tmp = "abcd".lastIndexOf("bc",0,"test"); -ok(tmp === -1, "lastIndexOf = " + tmp); -tmp = "abcd".lastIndexOf(); -ok(tmp === -1, "lastIndexOf = " + tmp); -tmp = "aaaa".lastIndexOf("a",2); -ok(tmp == 2, "lastIndexOf = " + tmp); -tmp = strObj.lastIndexOf("b"); -ok(tmp === 1, "lastIndexOf = " + tmp); - -tmp = "".toLowerCase(); -ok(tmp === "", "''.toLowerCase() = " + tmp); -tmp = "test".toLowerCase(); -ok(tmp === "test", "''.toLowerCase() = " + tmp); -tmp = "test".toLowerCase(3); -ok(tmp === "test", "''.toLowerCase(3) = " + tmp); -tmp = "tEsT".toLowerCase(); -ok(tmp === "test", "''.toLowerCase() = " + tmp); -tmp = "tEsT".toLowerCase(3); -ok(tmp === "test", "''.toLowerCase(3) = " + tmp); - -tmp = "".toUpperCase(); -ok(tmp === "", "''.toUpperCase() = " + tmp); -tmp = "TEST".toUpperCase(); -ok(tmp === "TEST", "''.toUpperCase() = " + tmp); -tmp = "TEST".toUpperCase(3); -ok(tmp === "TEST", "''.toUpperCase(3) = " + tmp); -tmp = "tEsT".toUpperCase(); -ok(tmp === "TEST", "''.toUpperCase() = " + tmp); -tmp = "tEsT".toUpperCase(3); -ok(tmp === "TEST", "''.toUpperCase(3) = " + tmp); - -tmp = "".anchor(); -ok(tmp === "", "''.anchor() = " + tmp); -tmp = "".anchor(3); -ok(tmp === "", "''.anchor(3) = " + tmp); -tmp = "".anchor("red"); -ok(tmp === "", "''.anchor('red') = " + tmp); -tmp = "test".anchor(); -ok(tmp === "test", "'test'.anchor() = " + tmp); -tmp = "test".anchor(3); -ok(tmp === "test", "'test'.anchor(3) = " + tmp); -tmp = "test".anchor("green"); -ok(tmp === "test", "'test'.anchor('green') = " + tmp); - -tmp = "".big(); -ok(tmp === "", "''.big() = " + tmp); -tmp = "".big(3); -ok(tmp === "", "''.big(3) = " + tmp); -tmp = "test".big(); -ok(tmp === "test", "'test'.big() = " + tmp); -tmp = "test".big(3); -ok(tmp === "test", "'test'.big(3) = " + tmp); - -tmp = "".blink(); -ok(tmp === "", "''.blink() = " + tmp); -tmp = "".blink(3); -ok(tmp === "", "''.blink(3) = " + tmp); -tmp = "test".blink(); -ok(tmp === "test", "'test'.blink() = " + tmp); -tmp = "test".blink(3); -ok(tmp === "test", "'test'.blink(3) = " + tmp); - -tmp = "".bold(); -ok(tmp === "", "''.bold() = " + tmp); -tmp = "".bold(3); -ok(tmp === "", "''.bold(3) = " + tmp); -tmp = "test".bold(); -ok(tmp === "test", "'test'.bold() = " + tmp); -tmp = "test".bold(3); -ok(tmp === "test", "'test'.bold(3) = " + tmp); - -tmp = "".fixed(); -ok(tmp === "", "''.fixed() = " + tmp); -tmp = "".fixed(3); -ok(tmp === "", "''.fixed(3) = " + tmp); -tmp = "test".fixed(); -ok(tmp === "test", "'test'.fixed() = " + tmp); -tmp = "test".fixed(3); -ok(tmp === "test", "'test'.fixed(3) = " + tmp); - -tmp = "".fontcolor(); -ok(tmp === "", "''.fontcolor() = " + tmp); -tmp = "".fontcolor(3); -ok(tmp === "", "''.fontcolor(3) = " + tmp); -tmp = "".fontcolor("red"); -ok(tmp === "", "''.fontcolor('red') = " + tmp); -tmp = "test".fontcolor(); -ok(tmp === "test", "'test'.fontcolor() = " + tmp); -tmp = "test".fontcolor(3); -ok(tmp === "test", "'test'.fontcolor(3) = " + tmp); -tmp = "test".fontcolor("green"); -ok(tmp === "test", "'test'.fontcolor('green') = " + tmp); - -tmp = "".fontsize(); -ok(tmp === "", "''.fontsize() = " + tmp); -tmp = "".fontsize(3); -ok(tmp === "", "''.fontsize(3) = " + tmp); -tmp = "".fontsize("red"); -ok(tmp === "", "''.fontsize('red') = " + tmp); -tmp = "test".fontsize(); -ok(tmp === "test", "'test'.fontsize() = " + tmp); -tmp = "test".fontsize(3); -ok(tmp === "test", "'test'.fontsize(3) = " + tmp); -tmp = "test".fontsize("green"); -ok(tmp === "test", "'test'.fontsize('green') = " + tmp); - -tmp = ("".fontcolor()).fontsize(); -ok(tmp === "", "(''.fontcolor()).fontsize() = " + tmp); - -tmp = "".italics(); -ok(tmp === "", "''.italics() = " + tmp); -tmp = "".italics(3); -ok(tmp === "", "''.italics(3) = " + tmp); -tmp = "test".italics(); -ok(tmp === "test", "'test'.italics() = " + tmp); -tmp = "test".italics(3); -ok(tmp === "test", "'test'.italics(3) = " + tmp); - -tmp = "".link(); -ok(tmp === "", "''.link() = " + tmp); -tmp = "".link(3); -ok(tmp === "", "''.link(3) = " + tmp); -tmp = "".link("red"); -ok(tmp === "", "''.link('red') = " + tmp); -tmp = "test".link(); -ok(tmp === "test", "'test'.link() = " + tmp); -tmp = "test".link(3); -ok(tmp === "test", "'test'.link(3) = " + tmp); -tmp = "test".link("green"); -ok(tmp === "test", "'test'.link('green') = " + tmp); - -tmp = "".small(); -ok(tmp === "", "''.small() = " + tmp); -tmp = "".small(3); -ok(tmp === "", "''.small(3) = " + tmp); -tmp = "test".small(); -ok(tmp === "test", "'test'.small() = " + tmp); -tmp = "test".small(3); -ok(tmp === "test", "'test'.small(3) = " + tmp); - -tmp = "".strike(); -ok(tmp === "", "''.strike() = " + tmp); -tmp = "".strike(3); -ok(tmp === "", "''.strike(3) = " + tmp); -tmp = "test".strike(); -ok(tmp === "test", "'test'.strike() = " + tmp); -tmp = "test".strike(3); -ok(tmp === "test", "'test'.strike(3) = " + tmp); - -tmp = "".sub(); -ok(tmp === "", "''.sub() = " + tmp); -tmp = "".sub(3); -ok(tmp === "", "''.sub(3) = " + tmp); -tmp = "test".sub(); -ok(tmp === "test", "'test'.sub() = " + tmp); -tmp = "test".sub(3); -ok(tmp === "test", "'test'.sub(3) = " + tmp); - -tmp = "".sup(); -ok(tmp === "", "''.sup() = " + tmp); -tmp = "".sup(3); -ok(tmp === "", "''.sup(3) = " + tmp); -tmp = "test".sup(); -ok(tmp === "test", "'test'.sup() = " + tmp); -tmp = "test".sup(3); -ok(tmp === "test", "'test'.sup(3) = " + tmp); - -ok(String.fromCharCode() === "", "String.fromCharCode() = " + String.fromCharCode()); -ok(String.fromCharCode(65,"66",67) === "ABC", "String.fromCharCode(65,'66',67) = " + String.fromCharCode(65,"66",67)); -ok(String.fromCharCode(1024*64+65, -1024*64+65) === "AA", - "String.fromCharCode(1024*64+65, -1024*64+65) = " + String.fromCharCode(1024*64+65, -1024*64+65)); -ok(String.fromCharCode(65, NaN, undefined).length === 3, - "String.fromCharCode(65, NaN, undefined).length = " + String.fromCharCode(65, NaN, undefined).length); - -var arr = new Array(); -ok(typeof(arr) === "object", "arr () is not object"); -ok((arr.length === 0), "arr.length is not 0"); -ok(arr["0"] === undefined, "arr[0] is not undefined"); - -var arr = new Array(1, 2, "test"); -ok(typeof(arr) === "object", "arr (1,2,test) is not object"); -ok((arr.length === 3), "arr.length is not 3"); -ok(arr["0"] === 1, "arr[0] is not 1"); -ok(arr["1"] === 2, "arr[1] is not 2"); -ok(arr["2"] === "test", "arr[2] is not \"test\""); - -arr["7"] = true; -ok((arr.length === 8), "arr.length is not 8"); - -tmp = "" + []; -ok(tmp === "", "'' + [] = " + tmp); -tmp = "" + [1,true]; -ok(tmp === "1,true", "'' + [1,true] = " + tmp); - -var arr = new Array(6); -ok(typeof(arr) === "object", "arr (6) is not object"); -ok((arr.length === 6), "arr.length is not 6"); -ok(arr["0"] === undefined, "arr[0] is not undefined"); - -ok(arr.push() === 6, "arr.push() !== 6"); -ok(arr.push(1) === 7, "arr.push(1) !== 7"); -ok(arr[6] === 1, "arr[6] != 1"); -ok(arr.length === 7, "arr.length != 10"); -ok(arr.push(true, 'b', false) === 10, "arr.push(true, 'b', false) !== 10"); -ok(arr[8] === "b", "arr[8] != 'b'"); -ok(arr.length === 10, "arr.length != 10"); - -var arr = new Object(); -arr.push = Array.prototype.push; - -arr.length = 6; - -ok(arr.push() === 6, "arr.push() !== 6"); -ok(arr.push(1) === 7, "arr.push(1) !== 7"); -ok(arr[6] === 1, "arr[6] != 1"); -ok(arr.length === 7, "arr.length != 10"); -ok(arr.push(true, 'b', false) === 10, "arr.push(true, 'b', false) !== 10"); -ok(arr[8] === "b", "arr[8] != 'b'"); -ok(arr.length === 10, "arr.length != 10"); - -arr.pop = Array.prototype.pop; -ok(arr.pop() === false, "arr.pop() !== false"); -ok(arr[8] === "b", "arr[8] !== 'b'"); -ok(arr.pop() === 'b', "arr.pop() !== 'b'"); -ok(arr[8] === undefined, "arr[8] !== undefined"); - -arr = [3,4,5]; -tmp = arr.pop(); -ok(arr.length === 2, "arr.length = " + arr.length); -ok(tmp === 5, "pop() = " + tmp); -tmp = arr.pop(2); -ok(arr.length === 1, "arr.length = " + arr.length); -ok(tmp === 4, "pop() = " + tmp); -tmp = arr.pop(); -ok(arr.length === 0, "arr.length = " + arr.length); -ok(tmp === 3, "pop() = " + tmp); -for(tmp in arr) - ok(false, "not deleted " + tmp); -tmp = arr.pop(); -ok(arr.length === 0, "arr.length = " + arr.length); -ok(tmp === undefined, "tmp = " + tmp); -arr = new Object(); -arr.pop = Array.prototype.pop; -tmp = arr.pop(); -ok(arr.length === 0, "arr.length = " + arr.length); -ok(tmp === undefined, "tmp = " + tmp); -arr = [,,,,,]; -tmp = arr.pop(); -ok(arr.length === 5, "arr.length = " + arr.length); -ok(tmp === undefined, "tmp = " + tmp); - -arr = [1,2,null,false,undefined,,"a"]; - -tmp = arr.join(); -ok(tmp === "1,2,,false,,,a", "arr.join() = " + tmp); -tmp = arr.join(";"); -ok(tmp === "1;2;;false;;;a", "arr.join(';') = " + tmp); -tmp = arr.join(";","test"); -ok(tmp === "1;2;;false;;;a", "arr.join(';') = " + tmp); -tmp = arr.join(""); -ok(tmp === "12falsea", "arr.join('') = " + tmp); - -tmp = arr.toString(); -ok(tmp === "1,2,,false,,,a", "arr.toString() = " + tmp); -tmp = arr.toString("test"); -ok(tmp === "1,2,,false,,,a", "arr.toString() = " + tmp); - -arr = new Object(); -arr.length = 3; -arr[0] = "aa"; -arr[2] = 2; -arr[7] = 3; -arr.join = Array.prototype.join; -tmp = arr.join(","); -ok(arr.length === 3, "arr.length = " + arr.length); -ok(tmp === "aa,,2", "tmp = " + tmp); - -arr = [5,true,2,-1,3,false,"2.5"]; -tmp = arr.sort(function(x,y) { return y-x; }); -ok(tmp === arr, "tmp !== arr"); -tmp = [5,3,"2.5",2,true,false,-1]; -for(var i=0; i < arr.length; i++) - ok(arr[i] === tmp[i], "arr[" + i + "] = " + arr[i] + " expected " + tmp[i]); - -arr = [5,false,2,0,"abc",3,"a",-1]; -tmp = arr.sort(); -ok(tmp === arr, "tmp !== arr"); -tmp = [-1,0,2,3,5,"a","abc",false]; -for(var i=0; i < arr.length; i++) - ok(arr[i] === tmp[i], "arr[" + i + "] = " + arr[i] + " expected " + tmp[i]); - -arr = ["a", "b", "ab"]; -tmp = ["a", "ab", "b"]; -ok(arr.sort() === arr, "arr.sort() !== arr"); -for(var i=0; i < arr.length; i++) - ok(arr[i] === tmp[i], "arr[" + i + "] = " + arr[i] + " expected " + tmp[i]); - -arr = new Object(); -arr.length = 3; -arr[0] = 1; -arr[2] = "aa"; -arr.sort = Array.prototype.sort; -tmp = arr.sort(); -ok(arr === tmp, "tmp !== arr"); -ok(arr[0]===1 && arr[1]==="aa" && arr[2]===undefined, "arr is sorted incorectly"); - -arr = ["1", "2", "3"]; -arr.length = 1; -ok(arr.length === 1, "arr.length = " + arr.length); -arr.length = 3; -ok(arr.length === 3, "arr.length = " + arr.length); -ok(arr.toString() === "1,,", "arr.toString() = " + arr.toString()); - -arr = Array("a","b","c"); -ok(arr.toString() === "a,b,c", "arr.toString() = " + arr.toString()); - -ok(arr.valueOf === Object.prototype.valueOf, "arr.valueOf !== Object.prototype.valueOf"); -ok(arr === arr.valueOf(), "arr !== arr.valueOf"); - -arr = [1,2,3]; -tmp = arr.reverse(); -ok(tmp === arr, "tmp !== arr"); -ok(arr.length === 3, "arr.length = " + arr.length); -ok(arr.toString() === "3,2,1", "arr.toString() = " + arr.toString()); - -arr = []; -arr[3] = 5; -arr[5] = 1; -tmp = arr.reverse(); -ok(tmp === arr, "tmp !== arr"); -ok(arr.length === 6, "arr.length = " + arr.length); -ok(arr.toString() === "1,,5,,,", "arr.toString() = " + arr.toString()); - -arr = new Object(); -arr.length = 3; -arr[0] = "aa"; -arr[2] = 2; -arr[7] = 3; -arr.reverse = Array.prototype.reverse; -tmp = arr.reverse(); -ok(tmp === arr, "tmp !== arr"); -ok(arr.length === 3, "arr.length = " + arr.length); -ok(arr[0] === 2 && arr[1] === undefined && arr[2] === "aa", "unexpected array"); - -arr = [1,2,3]; -tmp = arr.unshift(0); -ok(tmp === (invokeVersion < 2 ? undefined : 4), "[1,2,3].unshift(0) returned " +tmp); -ok(arr.length === 4, "arr.length = " + arr.length); -ok(arr.toString() === "0,1,2,3", "arr.toString() = " + arr.toString()); - -arr = new Array(3); -arr[0] = 1; -arr[2] = 3; -tmp = arr.unshift(-1,0); -ok(tmp === (invokeVersion < 2 ? undefined : 5), "unshift returned " +tmp); -ok(arr.length === 5, "arr.length = " + arr.length); -ok(arr.toString() === "-1,0,1,,3", "arr.toString() = " + arr.toString()); - -arr = [1,2,3]; -tmp = arr.unshift(); -ok(tmp === (invokeVersion < 2 ? undefined : 3), "unshift returned " +tmp); -ok(arr.length === 3, "arr.length = " + arr.length); -ok(arr.toString() === "1,2,3", "arr.toString() = " + arr.toString()); - -arr = new Object(); -arr.length = 2; -arr[0] = 1; -arr[1] = 2; -tmp = Array.prototype.unshift.call(arr, 0); -ok(tmp === (invokeVersion < 2 ? undefined : 3), "unshift returned " +tmp); -ok(arr.length === 3, "arr.length = " + arr.length); -ok(arr[0] === 0 && arr[1] === 1 && arr[2] === 2, "unexpected array"); - -arr = [1,2,,4]; -tmp = arr.shift(); -ok(tmp === 1, "[1,2,,4].shift() = " + tmp); -ok(arr.toString() === "2,,4", "arr = " + arr.toString()); - -arr = []; -tmp = arr.shift(); -ok(tmp === undefined, "[].shift() = " + tmp); -ok(arr.toString() === "", "arr = " + arr.toString()); - -arr = [1,2,,4]; -tmp = arr.shift(2); -ok(tmp === 1, "[1,2,,4].shift(2) = " + tmp); -ok(arr.toString() === "2,,4", "arr = " + arr.toString()); - -arr = [1,]; -tmp = arr.shift(); -ok(tmp === 1, "[1,].shift() = " + tmp); -ok(arr.toString() === "", "arr = " + arr.toString()); - -obj = new Object(); -obj[0] = "test"; -obj[2] = 3; -obj.length = 3; -tmp = Array.prototype.shift.call(obj); -ok(tmp === "test", "obj.shift() = " + tmp); -ok(obj.length == 2, "obj.length = " + obj.length); -ok(obj[1] === 3, "obj[1] = " + obj[1]); - -var num = new Number(6); -arr = [0,1,2]; -tmp = arr.concat(3, [4,5], num); -ok(tmp !== arr, "tmp === arr"); -for(var i=0; i<6; i++) - ok(tmp[i] === i, "tmp[" + i + "] = " + tmp[i]); -ok(tmp[6] === num, "tmp[6] !== num"); -ok(tmp.length === 7, "tmp.length = " + tmp.length); - -arr = [].concat(); -ok(arr.length === 0, "arr.length = " + arr.length); - -arr = [1,]; -tmp = arr.concat([2]); -ok(tmp.length === 3, "tmp.length = " + tmp.length); -ok(tmp[1] === undefined, "tmp[1] = " + tmp[1]); - -arr = [1,false,'a',null,undefined,'a']; -ok(arr.slice(0,6).toString() === "1,false,a,,,a", "arr.slice(0,6).toString() = " + arr.slice(0,6)); -ok(arr.slice(0,6).length === 6, "arr.slice(0,6).length = " + arr.slice(0,6).length); -ok(arr.slice().toString() === "1,false,a,,,a", "arr.slice().toString() = " + arr.slice()); -ok(arr.slice("abc").toString() === "1,false,a,,,a", "arr.slice(\"abc\").toString() = " + arr.slice("abc")); -ok(arr.slice(3,8).toString() === ",,a", "arr.slice(3,8).toString() = " + arr.slice(3,8)); -ok(arr.slice(3,8).length === 3, "arr.slice(3,8).length = " + arr.slice(3,8).length); -ok(arr.slice(1).toString() === "false,a,,,a", "arr.slice(1).toString() = " + arr.slice(1)); -ok(arr.slice(-2).toString() === ",a", "arr.slice(-2).toString() = " + arr.slice(-2)); -ok(arr.slice(3,1).toString() === "", "arr.slice(3,1).toString() = " + arr.slice(3,1)); -tmp = arr.slice(0,6); -for(var i=0; i < arr.length; i++) - ok(arr[i] === tmp[i], "arr[" + i + "] = " + arr[i] + " expected " + tmp[i]); -arr[12] = 2; -ok(arr.slice(5).toString() === "a,,,,,,,2", "arr.slice(5).toString() = " + arr.slice(5).toString()); -ok(arr.slice(5).length === 8, "arr.slice(5).length = " + arr.slice(5).length); - -arr = [1,2,3,4,5]; -tmp = arr.splice(2,2); -ok(tmp.toString() == "3,4", "arr.splice(2,2) returned " + tmp.toString()); -ok(arr.toString() == "1,2,5", "arr.splice(2,2) is " + arr.toString()); - -arr = [1,2,3,4,5]; -tmp = arr.splice(2,2,"a"); -ok(tmp.toString() == "3,4", "arr.splice(2,2,'a') returned " + tmp.toString()); -ok(arr.toString() == "1,2,a,5", "arr.splice(2,2,'a') is " + arr.toString()); - -arr = [1,2,3,4,5]; -tmp = arr.splice(2,2,'a','b','c'); -ok(tmp.toString() == "3,4", "arr.splice(2,2,'a','b','c') returned " + tmp.toString()); -ok(arr.toString() == "1,2,a,b,c,5", "arr.splice(2,2,'a','b','c') is " + arr.toString()); - -arr = [1,2,3,4,]; -tmp = arr.splice(2,2,'a','b','c'); -ok(tmp.toString() == "3,4", "arr.splice(2,2,'a','b','c') returned " + tmp.toString()); -ok(arr.toString() == "1,2,a,b,c,", "arr.splice(2,2,'a','b','c') is " + arr.toString()); - -arr = [1,2,3,4,]; -arr.splice(2,2,'a','b','c'); -ok(arr.toString() == "1,2,a,b,c,", "arr.splice(2,2,'a','b','c') is " + arr.toString()); - -arr = [1,2,3,4,5]; -tmp = arr.splice(2,2,'a','b'); -ok(tmp.toString() == "3,4", "arr.splice(2,2,'a','b') returned " + tmp.toString()); -ok(arr.toString() == "1,2,a,b,5", "arr.splice(2,2,'a','b') is " + arr.toString()); - -arr = [1,2,3,4,5]; -tmp = arr.splice(-1,2); -ok(tmp.toString() == "5", "arr.splice(-1,2) returned " + tmp.toString()); -ok(arr.toString() == "1,2,3,4", "arr.splice(-1,2) is " + arr.toString()); - -arr = [1,2,3,4,5]; -tmp = arr.splice(-10,3); -ok(tmp.toString() == "1,2,3", "arr.splice(-10,3) returned " + tmp.toString()); -ok(arr.toString() == "4,5", "arr.splice(-10,3) is " + arr.toString()); - -arr = [1,2,3,4,5]; -tmp = arr.splice(-10,100); -ok(tmp.toString() == "1,2,3,4,5", "arr.splice(-10,100) returned " + tmp.toString()); -ok(arr.toString() == "", "arr.splice(-10,100) is " + arr.toString()); - -arr = [1,2,3,4,5]; -tmp = arr.splice(2,-1); -ok(tmp.toString() == "", "arr.splice(2,-1) returned " + tmp.toString()); -ok(arr.toString() == "1,2,3,4,5", "arr.splice(2,-1) is " + arr.toString()); - -arr = [1,2,3,4,5]; -tmp = arr.splice(2); -ok(tmp.toString() == "", "arr.splice(2,-1) returned " + tmp.toString()); -ok(arr.toString() == "1,2,3,4,5", "arr.splice(2,-1) is " + arr.toString()); - -arr = [1,2,3,4,5]; -tmp = arr.splice(); -ok(tmp.toString() == "", "arr.splice(2,-1) returned " + tmp.toString()); -ok(arr.toString() == "1,2,3,4,5", "arr.splice(2,-1) is " + arr.toString()); - -obj = new Object(); -obj.length = 3; -obj[0] = 1; -obj[1] = 2; -obj[2] = 3; -tmp = Array.prototype.splice.call(obj, 1, 1, 'a', 'b'); -ok(tmp.toString() === "2", "obj.splice returned " + tmp); -ok(obj.length === 4, "obj.length = " + obj.length); -ok(obj[0] === 1, "obj[0] = " + obj[0]); -ok(obj[1] === 'a', "obj[1] = " + obj[1]); -ok(obj[2] === 'b', "obj[2] = " + obj[2]); -ok(obj[3] === 3, "obj[3] = " + obj[3]); - -obj = new Object(); -obj.length = 3; -obj[0] = 1; -obj[1] = 2; -obj[2] = 3; -tmp = Array.prototype.slice.call(obj, 1, 2); -ok(tmp.length === 1, "tmp.length = " + tmp.length); -ok(tmp[0] === 2, "tmp[0] = " + tmp[0]); - -var num = new Number(2); -ok(num.toString() === "2", "num(2).toString !== 2"); -var num = new Number(); -ok(num.toString() === "0", "num().toString !== 0"); - -ok(Number() === 0, "Number() = " + Number()); -ok(Number(false) === 0, "Number(false) = " + Number(false)); -ok(Number("43") === 43, "Number('43') = " + Number("43")); - -tmp = (new Number(1)).valueOf(); -ok(tmp === 1, "(new Number(1)).valueOf = " + tmp); -tmp = (new Number(1,2)).valueOf(); -ok(tmp === 1, "(new Number(1,2)).valueOf = " + tmp); -tmp = (new Number()).valueOf(); -ok(tmp === 0, "(new Number()).valueOf = " + tmp); -tmp = Number.prototype.valueOf(); -ok(tmp === 0, "Number.prototype.valueOf = " + tmp); - -function equals(val, base) { - var i; - var num = 0; - var str = val.toString(base); - - for(i=0; ival-val/1000 && num= 2) - ok(err.toString() === "null", "err.toString() = " + err.toString()); - -err = new Error(); -err.message = false; -ok(err.message === false, "err.message = " + err.message + " expected false"); -if(invokeVersion >= 2) - ok(err.toString() === "Error: false", "err.toString() = " + err.toString()); - -err = new Error(); -err.message = new Object(); -err.message.toString = function() { return ""; }; -if(invokeVersion >= 2) - ok(err.toString() === "Error", "err.toString() = " + err.toString()); - -err = new Error(); -err.message = undefined; -if(invokeVersion >= 2) - ok(err.toString() === "Error", "err.toString() = " + err.toString()); - -function exception_test(func, type, number) { - ret = ""; - num = ""; - try { - func(); - } catch(e) { - ret = e.name; - num = e.number; - } - ok(ret === type, "Exception test, ret = " + ret + ", expected " + type +". Executed function: " + func.toString()); - ok(num === number, "Exception test, num = " + num + ", expected " + number + ". Executed function: " + func.toString()); -} -exception_test(function() {arr.toString = Date.prototype.toString; arr.toString();}, "TypeError", -2146823282); -exception_test(function() {Array(-3);}, "RangeError", -2146823259); -exception_test(function() {arr.toString = Boolean.prototype.toString; arr.toString();}, "TypeError", -2146823278); -exception_test(function() {date.setTime();}, "TypeError", -2146827839); -exception_test(function() {arr.test();}, "TypeError", -2146827850); -exception_test(function() {arr.toString = Number.prototype.toString; arr.toString();}, "TypeError", -2146823287); -exception_test(function() {(new Number(3)).toString(1);}, "TypeError", -2146828283); -exception_test(function() {not_existing_variable.something();}, "TypeError", -2146823279); -exception_test(function() {arr.toString = Function.prototype.toString; arr.toString();}, "TypeError", -2146823286); -exception_test(function() {date();}, "TypeError", -2146823286); -exception_test(function() {arr();}, "TypeError", -2146823286); -exception_test(function() {eval("for(i=0;) {}");}, "SyntaxError", -2146827286); -exception_test(function() {eval("function {};");}, "SyntaxError", -2146827283); -exception_test(function() {eval("if");}, "SyntaxError", -2146827283); -exception_test(function() {eval("do i=0; while");}, "SyntaxError", -2146827283); -exception_test(function() {eval("while");}, "SyntaxError", -2146827283); -exception_test(function() {eval("for");}, "SyntaxError", -2146827283); -exception_test(function() {eval("with");}, "SyntaxError", -2146827283); -exception_test(function() {eval("switch");}, "SyntaxError", -2146827283); -exception_test(function() {eval("if(false");}, "SyntaxError", -2146827282); -exception_test(function() {eval("for(i=0; i<10; i++");}, "SyntaxError", -2146827282); -exception_test(function() {eval("while(true");}, "SyntaxError", -2146827282); -exception_test(function() {test = function() {}}, "ReferenceError", -2146823280); -exception_test(function() {eval("for(i=0")}, "SyntaxError", -2146827284); -exception_test(function() {eval("for(i=0;i<10")}, "SyntaxError", -2146827284); -exception_test(function() {eval("while(")}, "SyntaxError", -2146827286); -exception_test(function() {eval("if(")}, "SyntaxError", -2146827286); -exception_test(function() {eval("'unterminated")}, "SyntaxError", -2146827273); -exception_test(function() {eval("nonexistingfunc()")}, "TypeError", -2146823281); -exception_test(function() {RegExp(/a/, "g");}, "RegExpError", -2146823271); -exception_test(function() {encodeURI('\udcaa');}, "URIError", -2146823264); - -function testThisExcept(func, number) { - exception_test(function() {func.call(new Object())}, "TypeError", number); -} - -function testBoolThis(func) { - testThisExcept(Boolean.prototype[func], -2146823278); -} - -testBoolThis("toString"); -testBoolThis("valueOf"); - -function testDateThis(func) { - testThisExcept(Date.prototype[func], -2146823282); -} - -testDateThis("getDate"); -testDateThis("getDay"); -testDateThis("getFullYear"); -testDateThis("getHours"); -testDateThis("getMilliseconds"); -testDateThis("getMinutes"); -testDateThis("getMonth"); -testDateThis("getSeconds"); -testDateThis("getTime"); -testDateThis("getTimezoneOffset"); -testDateThis("getUTCDate"); -testDateThis("getUTCDay"); -testDateThis("getUTCFullYear"); -testDateThis("getUTCHours"); -testDateThis("getUTCMilliseconds"); -testDateThis("getUTCMinutes"); -testDateThis("getUTCMonth"); -testDateThis("getUTCSeconds"); -testDateThis("setDate"); -testDateThis("setFullYear"); -testDateThis("setHours"); -testDateThis("setMilliseconds"); -testDateThis("setMinutes"); -testDateThis("setMonth"); -testDateThis("setSeconds"); -testDateThis("setTime"); -testDateThis("setUTCDate"); -testDateThis("setUTCFullYear"); -testDateThis("setUTCHours"); -testDateThis("setUTCMilliseconds"); -testDateThis("setUTCMinutes"); -testDateThis("setUTCMonth"); -testDateThis("setUTCSeconds"); -testDateThis("toDateString"); -testDateThis("toLocaleDateString"); -testDateThis("toLocaleString"); -testDateThis("toLocaleTimeString"); -testDateThis("toString"); -testDateThis("toTimeString"); -testDateThis("toUTCString"); -testDateThis("valueOf"); - -function testArrayThis(func) { - testThisExcept(Array.prototype[func], -2146823257); -} - -testArrayThis("toString"); - -function testFunctionThis(func) { - testThisExcept(Function.prototype[func], -2146823286); -} - -testFunctionThis("toString"); -testFunctionThis("call"); -testFunctionThis("apply"); - -function testArrayHostThis(func) { - exception_test(function() { Array.prototype[func].call(testObj); }, "TypeError", -2146823274); -} - -testArrayHostThis("push"); -testArrayHostThis("shift"); -testArrayHostThis("slice"); -testArrayHostThis("splice"); -testArrayHostThis("unshift"); -testArrayHostThis("reverse"); -testArrayHostThis("join"); -testArrayHostThis("pop"); -testArrayHostThis("sort"); - -function testObjectInherit(obj, constr, ts, tls, vo) { - ok(obj instanceof Object, "obj is not instance of Object"); - ok(obj instanceof constr, "obj is not instance of its constructor"); - - ok(obj.hasOwnProperty === Object.prototype.hasOwnProperty, - "obj.hasOwnProperty !== Object.prototype.hasOwnProprty"); - ok(obj.isPrototypeOf === Object.prototype.isPrototypeOf, - "obj.isPrototypeOf !== Object.prototype.isPrototypeOf"); - ok(obj.propertyIsEnumerable === Object.prototype.propertyIsEnumerable, - "obj.propertyIsEnumerable !== Object.prototype.propertyIsEnumerable"); - - if(ts) - ok(obj.toString === Object.prototype.toString, - "obj.toString !== Object.prototype.toString"); - else - ok(obj.toString != Object.prototype.toString, - "obj.toString == Object.prototype.toString"); - - if(tls) - ok(obj.toLocaleString === Object.prototype.toLocaleString, - "obj.toLocaleString !== Object.prototype.toLocaleString"); - else - ok(obj.toLocaleString != Object.prototype.toLocaleString, - "obj.toLocaleString == Object.prototype.toLocaleString"); - - if(vo) - ok(obj.valueOf === Object.prototype.valueOf, - "obj.valueOf !== Object.prototype.valueOf"); - else - ok(obj.valueOf != Object.prototype.valueOf, - "obj.valueOf == Object.prototype.valueOf"); - - ok(obj._test === "test", "obj.test = " + obj._test); -} - -Object.prototype._test = "test"; -testObjectInherit(new String("test"), String, false, true, false); -testObjectInherit(/test/g, RegExp, false, true, true); -testObjectInherit(new Number(1), Number, false, false, false); -testObjectInherit(new Date(), Date, false, false, false); -testObjectInherit(new Boolean(true), Boolean, false, true, false); -testObjectInherit(new Array(), Array, false, false, true); -testObjectInherit(new Error(), Error, false, true, true); -testObjectInherit(testObjectInherit, Function, false, true, true); -testObjectInherit(Math, Object, true, true, true); - -(function() { testObjectInherit(arguments, Object, true, true, true); })(); - -function testFunctions(obj, arr) { - var l; - - for(var i=0; i - - - - . - - activex.c - jscript.c - run.c - testlist.c - rsrc.rc - wine - ole32 - advapi32 - oleaut32 - ntdll - - diff --git a/rostests/winetests/jscript/lang.js b/rostests/winetests/jscript/lang.js deleted file mode 100644 index 36a75f5b701..00000000000 --- a/rostests/winetests/jscript/lang.js +++ /dev/null @@ -1,1029 +0,0 @@ -/* - * Copyright 2008 Jacek Caban for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * 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 - */ - -var tmp; - -ok(true, "true is not true?"); -ok(!false, "!false is not true"); -ok(!undefined, "!undefined is not true"); -ok(!null, "!null is not true"); -ok(!0, "!0 is not true"); -ok(!0.0, "!0.0 is not true"); - -ok(1 === 1, "1 === 1 is false"); -ok(!(1 === 2), "!(1 === 2) is false"); -ok(1.0 === 1, "1.0 === 1 is false"); -ok("abc" === "abc", "\"abc\" === \"abc\" is false"); -ok(true === true, "true === true is false"); -ok(null === null, "null === null is false"); -ok(undefined === undefined, "undefined === undefined is false"); -ok(!(undefined === null), "!(undefined === null) is false"); -ok(1E0 === 1, "1E0 === 1 is false"); -ok(1000000*1000000 === 1000000000000, "1000000*1000000 === 1000000000000 is false"); -ok(8.64e15 === 8640000000000000, "8.64e15 !== 8640000000000000"); -ok(1e2147483648 === Infinity, "1e2147483648 !== Infinity"); - -ok(1 !== 2, "1 !== 2 is false"); -ok(null !== undefined, "null !== undefined is false"); - -ok(1 == 1, "1 == 1 is false"); -ok(!(1 == 2), "!(1 == 2) is false"); -ok(1.0 == 1, "1.0 == 1 is false"); -ok("abc" == "abc", "\"abc\" == \"abc\" is false"); -ok(true == true, "true == true is false"); -ok(null == null, "null == null is false"); -ok(undefined == undefined, "undefined == undefined is false"); -ok(undefined == null, "undefined == null is false"); -ok(true == 1, "true == 1 is false"); -ok(!(true == 2), "true == 2"); -ok(0 == false, "0 == false is false"); - -ok(1 != 2, "1 != 2 is false"); -ok(false != 1, "false != 1 is false"); - -var trueVar = true; -ok(trueVar, "trueVar is not true"); - -ok(ScriptEngine.length === 0, "ScriptEngine.length is not 0"); - -function testFunc1(x, y) { - ok(this !== undefined, "this is undefined"); - ok(x === true, "x is not true"); - ok(y === "test", "y is not \"test\""); - ok(arguments.length === 2, "arguments.length is not 2"); - ok(arguments["0"] === true, "arguments[0] is not true"); - ok(arguments["1"] === "test", "arguments[1] is not \"test\""); - ok(arguments.callee === testFunc1, "arguments.calee !== testFunc1"); - - return true; -} - -ok(testFunc1.length === 2, "testFunc1.length is not 2"); - -ok(Object.prototype !== undefined, "Object.prototype is undefined"); -ok(Object.prototype.prototype === undefined, "Object.prototype is not undefined"); -ok(String.prototype !== undefined, "String.prototype is undefined"); -ok(Array.prototype !== undefined, "Array.prototype is undefined"); -ok(Boolean.prototype !== undefined, "Boolean.prototype is undefined"); -ok(Number.prototype !== undefined, "Number.prototype is undefined"); -ok(RegExp.prototype !== undefined, "RegExp.prototype is undefined"); -ok(Math !== undefined, "Math is undefined"); -ok(Math.prototype === undefined, "Math.prototype is not undefined"); -ok(Function.prototype !== undefined, "Function.prototype is undefined"); -ok(Function.prototype.prototype === undefined, "Function.prototype.prototype is not undefined"); -ok(Date.prototype !== undefined, "Date.prototype is undefined"); -ok(Date.prototype.prototype === undefined, "Date.prototype is not undefined"); - -Function.prototype.test = true; -ok(testFunc1.test === true, "testFunc1.test !== true"); -ok(Function.test === true, "Function.test !== true"); - -ok(typeof(0) === "number", "typeof(0) is not number"); -ok(typeof(1.5) === "number", "typeof(1.5) is not number"); -ok(typeof("abc") === "string", "typeof(\"abc\") is not string"); -ok(typeof("") === "string", "typeof(\"\") is not string"); -ok(typeof(true) === "boolean", "typeof(true) is not boolean"); -ok(typeof(null) === "object", "typeof(null) is not object"); -ok(typeof(undefined) === "undefined", "typeof(undefined) is not undefined"); -ok(typeof(Math) === "object", "typeof(Math) is not object"); -ok(typeof(String.prototype) === "object", "typeof(String.prototype) is not object"); -ok(typeof(testFunc1) === "function", "typeof(testFunc1) is not function"); -ok(typeof(String) === "function", "typeof(String) is not function"); -ok(typeof(ScriptEngine) === "function", "typeof(ScriptEngine) is not function"); -ok(typeof(this) === "object", "typeof(this) is not object"); - -ok(testFunc1(true, "test") === true, "testFunc1 not returned true"); - -tmp = (function() {1;})(); -ok(tmp === undefined, "tmp = " + tmp); -tmp = eval("1;"); -ok(tmp === 1, "tmp = " + tmp); - -var obj1 = new Object(); -ok(typeof(obj1) === "object", "typeof(obj1) is not object"); -ok(obj1.constructor === Object, "unexpected obj1.constructor"); -obj1.test = true; -obj1.func = function () { - ok(this === obj1, "this is not obj1"); - ok(this.test === true, "this.test is not true"); - ok(arguments.length === 1, "arguments.length is not 1"); - ok(arguments["0"] === true, "arguments[0] is not true"); - ok(typeof(arguments.callee) === "function", "typeof(arguments.calee) = " + typeof(arguments.calee)); - - return "test"; -}; - -ok(obj1.func(true) === "test", "obj1.func(true) is not \"test\""); - -function testConstr1() { - this.var1 = 1; - - ok(this !== undefined, "this is undefined"); - ok(arguments.length === 1, "arguments.length is not 1"); - ok(arguments["0"] === true, "arguments[0] is not 1"); - ok(arguments.callee === testConstr1, "arguments.calee !== testConstr1"); - - return false; -} - -testConstr1.prototype.pvar = 1; - -var obj2 = new testConstr1(true); -ok(typeof(obj2) === "object", "typeof(obj2) is not object"); -ok(obj2.constructor === testConstr1, "unexpected obj2.constructor"); -ok(obj2.pvar === 1, "obj2.pvar is not 1"); - -testConstr1.prototype.pvar = 2; -ok(obj2.pvar === 2, "obj2.pvar is not 2"); - -obj2.pvar = 3; -testConstr1.prototype.pvar = 1; -ok(obj2.pvar === 3, "obj2.pvar is not 3"); - -obj1 = new Object(); -function testConstr3() { - return obj1; -} - -obj2 = new testConstr3(); -ok(obj1 === obj2, "obj1 != obj2"); - -function testConstr4() { - return 2; -} - -obj2 = new testConstr3(); -ok(typeof(obj2) === "object", "typeof(obj2) = " + typeof(obj2)); - -var obj3 = new Object; -ok(typeof(obj3) === "object", "typeof(obj3) is not object"); - -for(var iter in "test") - ok(false, "unexpected forin call, test = " + iter); - -for(var iter in null) - ok(false, "unexpected forin call, test = " + iter); - -for(var iter in false) - ok(false, "unexpected forin call, test = " + iter); - -tmp = 0; -if(true) - tmp = 1; -else - ok(false, "else evaluated"); -ok(tmp === 1, "tmp !== 1, if not evaluated?"); - -tmp = 0; -if(1 === 0) - ok(false, "if evaluated"); -else - tmp = 1; -ok(tmp === 1, "tmp !== 1, if not evaluated?"); - -if(false) - ok(false, "if(false) evaluated"); - -tmp = 0; -if(true) - tmp = 1; -ok(tmp === 1, "tmp !== 1, if(true) not evaluated?"); - -if(false) { -}else { -} - -var obj3 = { prop1: 1, prop2: typeof(false) }; -ok(obj3.prop1 === 1, "obj3.prop1 is not 1"); -ok(obj3.prop2 === "boolean", "obj3.prop2 is not \"boolean\""); -ok(obj3.constructor === Object, "unexpected obj3.constructor"); - -{ - var blockVar = 1; - blockVar = 2; -} -ok(blockVar === 2, "blockVar !== 2"); - -ok((true ? 1 : 2) === 1, "conditional expression true is not 1"); -ok((0 === 2 ? 1 : 2) === 2, "conditional expression true is not 2"); - -ok(getVT(undefined) === "VT_EMPTY", "getVT(undefined) is not VT_EMPTY"); -ok(getVT(null) === "VT_NULL", "getVT(null) is not VT_NULL"); -ok(getVT(0) === "VT_I4", "getVT(0) is not VT_I4"); -ok(getVT(0.5) === "VT_R8", "getVT(1.5) is not VT_R8"); -ok(getVT("test") === "VT_BSTR", "getVT(\"test\") is not VT_BSTR"); -ok(getVT(Math) === "VT_DISPATCH", "getVT(Math) is not VT_DISPATCH"); -ok(getVT(false) === "VT_BOOL", "getVT(false) is not VT_BOOL"); - -tmp = 2+2; -ok(tmp === 4, "2+2 !== 4"); -ok(getVT(tmp) === "VT_I4", "getVT(2+2) !== VT_I4"); - -tmp = 2+2.5; -ok(tmp === 4.5, "2+2.5 !== 4.5"); -ok(getVT(tmp) === "VT_R8", "getVT(2+2.5) !== VT_R8"); - -tmp = 1.5+2.5; -ok(tmp === 4, "1.4+2.5 !== 4"); -ok(getVT(tmp) === "VT_I4", "getVT(1.5+2.5) !== VT_I4"); - -tmp = 4-2; -ok(tmp === 2, "4-2 !== 2"); -ok(getVT(tmp) === "VT_I4", "getVT(4-2) !== VT_I4"); - -tmp = 4.5-2; -ok(tmp === 2.5, "4.5-2 !== 2.5"); -ok(getVT(tmp) === "VT_R8", "getVT(4-2) !== VT_R8"); - -tmp = -2; -ok(tmp === 0-2, "-2 !== 0-2"); -ok(getVT(tmp) === "VT_I4", "getVT(-2) !== VT_I4"); - -tmp = 2*3; -ok(tmp === 6, "2*3 !== 6"); -ok(getVT(tmp) === "VT_I4", "getVT(2*3) !== VT_I4"); - -tmp = 2*3.5; -ok(tmp === 7, "2*3.5 !== 7"); -ok(getVT(tmp) === "VT_I4", "getVT(2*3.5) !== VT_I4"); - -tmp = 2.5*3.5; -/* FIXME: the parser loses precision */ -/* ok(tmp === 8.75, "2.5*3.5 !== 8.75"); */ -ok(tmp > 8.749999 && tmp < 8.750001, "2.5*3.5 !== 8.75"); -ok(getVT(tmp) === "VT_R8", "getVT(2.5*3.5) !== VT_R8"); - -tmp = 4/2; -ok(tmp === 2, "4/2 !== 2"); -ok(getVT(tmp) === "VT_I4", "getVT(4/2) !== VT_I4"); - -tmp = 4.5/1.5; -ok(tmp === 3, "4.5/1.5 !== 3"); -ok(getVT(tmp) === "VT_I4", "getVT(4.5/1.5) !== VT_I4"); - -tmp = 3/2; -ok(tmp === 1.5, "3/2 !== 1.5"); -ok(getVT(tmp) === "VT_R8", "getVT(3/2) !== VT_R8"); - -tmp = 3%2; -ok(tmp === 1, "3%2 = " + tmp); - -tmp = 4%2; -ok(tmp ===0, "4%2 = " + tmp); - -tmp = 3.5%1.5; -ok(tmp === 0.5, "3.5%1.5 = " + tmp); - -tmp = 3%true; -ok(tmp === 0, "3%true = " + tmp); - -tmp = "ab" + "cd"; -ok(tmp === "abcd", "\"ab\" + \"cd\" !== \"abcd\""); - -tmp = 1; -ok((tmp += 1) === 2, "tmp += 1 !== 2"); -ok(tmp === 2, "tmp !== 2"); - -tmp = 2; -ok((tmp -= 1) === 1, "tmp -= 1 !== 1"); -ok(tmp === 1, "tmp !=== 1"); - -tmp = 2; -ok((tmp *= 1.5) === 3, "tmp *= 1.5 !== 3"); -ok(tmp === 3, "tmp !=== 3"); - -tmp = 5; -ok((tmp /= 2) === 2.5, "tmp /= 2 !== 2.5"); -ok(tmp === 2.5, "tmp !=== 2.5"); - -tmp = 3; -ok((tmp %= 2) === 1, "tmp %= 2 !== 1"); -ok(tmp === 1, "tmp !== 1"); - -tmp = 8; -ok((tmp <<= 1) === 16, "tmp <<= 1 !== 16"); - -tmp = 8; -ok((tmp >>= 1) === 4, "tmp >>= 1 !== 4"); - -tmp = 8; -ok((tmp >>>= 1) === 4, "tmp >>>= 1 !== 4"); - -tmp = 3 || ok(false, "second or expression called"); -ok(tmp === 3, "3 || (...) is not 3"); - -tmp = false || 2; -ok(tmp === 2, "false || 2 is not 2"); - -tmp = 0 && ok(false, "second and expression called"); -ok(tmp === 0, "0 && (...) is not 0"); - -tmp = true && "test"; -ok(tmp === "test", "true && \"test\" is not \"test\""); - -tmp = true && 0; -ok(tmp === 0, "true && 0 is not 0"); - -tmp = 3 | 4; -ok(tmp === 7, "3 | 4 !== 7"); -ok(getVT(tmp) === "VT_I4", "getVT(3|4) = " + getVT(tmp)); - -tmp = 3.5 | 0; -ok(tmp === 3, "3.5 | 0 !== 3"); -ok(getVT(tmp) === "VT_I4", "getVT(3.5|0) = " + getVT(tmp)); - -tmp = -3.5 | 0; -ok(tmp === -3, "-3.5 | 0 !== -3"); -ok(getVT(tmp) === "VT_I4", "getVT(3.5|0) = " + getVT(tmp)); - -tmp = 0 | NaN; -ok(tmp === 0, "0 | NaN = " + tmp); - -tmp = 0 | Infinity; -ok(tmp === 0, "0 | NaN = " + tmp); - -tmp = 0 | (-Infinity); -ok(tmp === 0, "0 | NaN = " + tmp); - -tmp = 10; -ok((tmp |= 0x10) === 26, "tmp(10) |= 0x10 !== 26"); -ok(getVT(tmp) === "VT_I4", "getVT(tmp |= 10) = " + getVT(tmp)); - -tmp = 3 & 5; -ok(tmp === 1, "3 & 5 !== 1"); -ok(getVT(tmp) === "VT_I4", "getVT(3|5) = " + getVT(tmp)); - -tmp = 3.5 & 0xffff; -ok(tmp === 3, "3.5 & 0xffff !== 3 "); -ok(getVT(tmp) === "VT_I4", "getVT(3.5&0xffff) = " + getVT(tmp)); - -tmp = (-3.5) & 0xffffffff; -ok(tmp === -3, "-3.5 & 0xffff !== -3"); -ok(getVT(tmp) === "VT_I4", "getVT(3.5&0xffff) = " + getVT(tmp)); - -tmp = 2 << 3; -ok(tmp === 16, "2 << 3 = " + tmp); - -tmp = 2 << 35; -ok(tmp === 16, "2 << 35 = " + tmp); - -tmp = 8 >> 2; -ok(tmp === 2, "8 >> 2 = " + tmp); - -tmp = -64 >> 4; -ok(tmp === -4, "-64 >> 4 = " + tmp); - -tmp = 8 >>> 2; -ok(tmp === 2, "8 >> 2 = " + tmp); - -tmp = -64 >>> 4; -ok(tmp === 0x0ffffffc, "-64 >>> 4 = " + tmp); - -tmp = 4 >>> NaN; -ok(tmp === 4, "4 >>> NaN = " + tmp); - -tmp = 10; -ok((tmp &= 8) === 8, "tmp(10) &= 8 !== 8"); -ok(getVT(tmp) === "VT_I4", "getVT(tmp &= 8) = " + getVT(tmp)); - -tmp = 0xf0f0^0xff00; -ok(tmp === 0x0ff0, "0xf0f0^0xff00 !== 0x0ff0"); -ok(getVT(tmp) === "VT_I4", "getVT(0xf0f0^0xff00) = " + getVT(tmp)); - -tmp = 5; -ok((tmp ^= 3) === 6, "tmp(5) ^= 3 !== 6"); -ok(getVT(tmp) === "VT_I4", "getVT(tmp ^= 3) = " + getVT(tmp)); - -tmp = ~1; -ok(tmp === -2, "~1 !== -2"); -ok(getVT(tmp) === "VT_I4", "getVT(~1) = " + getVT(tmp)); - -ok((3,4) === 4, "(3,4) !== 4"); - -ok(+3 === 3, "+3 !== 3"); -ok(+true === 1, "+true !== 1"); -ok(+false === 0, "+false !== 0"); -ok(+null === 0, "+null !== 0"); -ok(+"0" === 0, "+'0' !== 0"); -ok(+"3" === 3, "+'3' !== 3"); -ok(+"-3" === -3, "+'-3' !== -3"); -ok(+"0xff" === 255, "+'0xff' !== 255"); -ok(+"3e3" === 3000, "+'3e3' !== 3000"); - -tmp = new Number(1); -ok(+tmp === 1, "+(new Number(1)) = " + (+tmp)); -ok(tmp.constructor === Number, "unexpected tmp.constructor"); -tmp = new String("1"); -ok(+tmp === 1, "+(new String('1')) = " + (+tmp)); -ok(tmp.constructor === String, "unexpected tmp.constructor"); - -ok("" + 0 === "0", "\"\" + 0 !== \"0\""); -ok("" + 123 === "123", "\"\" + 123 !== \"123\""); -ok("" + (-5) === "-5", "\"\" + (-5) !== \"-5\""); -ok("" + null === "null", "\"\" + null !== \"null\""); -ok("" + undefined === "undefined", "\"\" + undefined !== \"undefined\""); -ok("" + true === "true", "\"\" + true !== \"true\""); -ok("" + false === "false", "\"\" + false !== \"false\""); -ok("" + 0.5 === "0.5", "'' + 0.5 = " + 0.5); -ok("" + (-0.5432) === "-0.5432", "'' + (-0.5432) = " + (-0.5432)); - -ok(1 < 3.4, "1 < 3.4 failed"); -ok(!(3.4 < 1), "3.4 < 1"); -ok("abc" < "abcd", "abc < abcd failed"); -ok("abcd" < "abce", "abce < abce failed"); -ok("" < "x", "\"\" < \"x\" failed"); -ok(!(0 < 0), "0 < 0"); - -ok(1 <= 3.4, "1 <= 3.4 failed"); -ok(!(3.4 <= 1), "3.4 <= 1"); -ok("abc" <= "abcd", "abc <= abcd failed"); -ok("abcd" <= "abce", "abce <= abce failed"); -ok("" <= "x", "\"\" <= \"x\" failed"); -ok(0 <= 0, "0 <= 0 failed"); - -ok(3.4 > 1, "3.4 > 1 failed"); -ok(!(1 > 3.4), "1 > 3.4"); -ok("abcd" > "abc", "abc > abcd failed"); -ok("abce" > "abcd", "abce > abce failed"); -ok("x" > "", "\"x\" > \"\" failed"); -ok(!(0 > 0), "0 > 0"); - -ok(3.4 >= 1, "3.4 >= 1 failed"); -ok(!(1 >= 3.4), "1 >= 3.4"); -ok("abcd" >= "abc", "abc >= abcd failed"); -ok("abce" >= "abcd", "abce >= abce failed"); -ok("x" >= "", "\"x\" >= \"\" failed"); -ok(0 >= 0, "0 >= 0"); - -tmp = 1; -ok(++tmp === 2, "++tmp (1) is not 2"); -ok(tmp === 2, "incremented tmp is not 2"); -ok(--tmp === 1, "--tmp (2) is not 1"); -ok(tmp === 1, "decremented tmp is not 1"); -ok(tmp++ === 1, "tmp++ (1) is not 1"); -ok(tmp === 2, "incremented tmp(1) is not 2"); -ok(tmp-- === 2, "tmp-- (2) is not 2"); -ok(tmp === 1, "decremented tmp is not 1"); - -String.prototype.test = true; -ok("".test === true, "\"\".test is not true"); - -Boolean.prototype.test = true; -ok(true.test === true, "true.test is not true"); - -Number.prototype.test = true; -ok((0).test === true, "(0).test is not true"); -ok((0.5).test === true, "(0.5).test is not true"); - -var state = ""; -try { - ok(state === "", "try: state = " + state); - state = "try"; -}catch(ex) { - ok(false, "unexpected catch"); -} -ok(state === "try", "state = " + state + " expected try"); - -state = ""; -try { - ok(state === "", "try: state = " + state); - state = "try"; -}finally { - ok(state === "try", "finally: state = " + state); - state = "finally"; -} -ok(state === "finally", "state = " + state + " expected finally"); - -state = ""; -try { - ok(state === "", "try: state = " + state); - state = "try"; -}catch(ex) { - ok(false, "unexpected catch"); -}finally { - ok(state === "try", "finally: state = " + state); - state = "finally"; -} -ok(state === "finally", "state = " + state + " expected finally"); - -var state = ""; -try { - ok(state === "", "try: state = " + state); - state = "try"; - throw "except"; -}catch(ex) { - ok(state === "try", "catch: state = " + state); - ok(ex === "except", "ex is not \"except\""); - state = "catch"; -} -ok(state === "catch", "state = " + state + " expected catch"); - -var state = ""; -try { - ok(state === "", "try: state = " + state); - state = "try"; - throw true; -}catch(ex) { - ok(state === "try", "catch: state = " + state); - ok(ex === true, "ex is not true"); - state = "catch"; -}finally { - ok(state === "catch", "finally: state = " + state); - state = "finally"; -} -ok(state === "finally", "state = " + state + " expected finally"); - -var state = ""; -try { - ok(state === "", "try: state = " + state); - state = "try"; - try { throw true; } finally {} -}catch(ex) { - ok(state === "try", "catch: state = " + state); - ok(ex === true, "ex is not true"); - state = "catch"; -}finally { - ok(state === "catch", "finally: state = " + state); - state = "finally"; -} -ok(state === "finally", "state = " + state + " expected finally"); - -var state = ""; -try { - ok(state === "", "try: state = " + state); - state = "try"; - try { throw "except"; } catch(ex) { throw true; } -}catch(ex) { - ok(state === "try", "catch: state = " + state); - ok(ex === true, "ex is not true"); - state = "catch"; -}finally { - ok(state === "catch", "finally: state = " + state); - state = "finally"; -} -ok(state === "finally", "state = " + state + " expected finally"); - -function throwFunc(x) { - throw x; -} - -var state = ""; -try { - ok(state === "", "try: state = " + state); - state = "try"; - throwFunc(true); -}catch(ex) { - ok(state === "try", "catch: state = " + state); - ok(ex === true, "ex is not true"); - state = "catch"; -}finally { - ok(state === "catch", "finally: state = " + state); - state = "finally"; -} -ok(state === "finally", "state = " + state + " expected finally"); - -state = ""; -switch(1) { -case "1": - ok(false, "unexpected case \"1\""); -case 1: - ok(state === "", "case 1: state = " + state); - state = "1"; -default: - ok(state === "1", "default: state = " + state); - state = "default"; -case false: - ok(state === "default", "case false: state = " + state); - state = "false"; -} -ok(state === "false", "state = " + state); - -state = ""; -switch("") { -case "1": -case 1: - ok(false, "unexpected case 1"); -default: - ok(state === "", "default: state = " + state); - state = "default"; -case false: - ok(state === "default", "case false: state = " + state); - state = "false"; -} -ok(state === "false", "state = " + state); - -state = ""; -switch(1) { -case "1": - ok(false, "unexpected case \"1\""); -case 1: - ok(state === "", "case 1: state = " + state); - state = "1"; -default: - ok(state === "1", "default: state = " + state); - state = "default"; - break; -case false: - ok(false, "unexpected case false"); -} -ok(state === "default", "state = " + state); - -tmp = eval("1"); -ok(tmp === 1, "eval(\"1\") !== 1"); -eval("{ ok(tmp === 1, 'eval: tmp !== 1'); } tmp = 2;"); -ok(tmp === 2, "tmp !== 2"); - -ok(eval(false) === false, "eval(false) !== false"); -ok(eval() === undefined, "eval() !== undefined"); - -tmp = eval("1", "2"); -ok(tmp === 1, "eval(\"1\", \"2\") !== 1"); - -var state = ""; -try { - ok(state === "", "try: state = " + state); - state = "try"; - eval("throwFunc(true);"); -}catch(ex) { - ok(state === "try", "catch: state = " + state); - ok(ex === true, "ex is not true"); - state = "catch"; -}finally { - ok(state === "catch", "finally: state = " + state); - state = "finally"; -} -ok(state === "finally", "state = " + state + " expected finally"); - -tmp = [,,1,2,,,true]; -ok(tmp.length === 7, "tmp.length !== 7"); -ok(tmp["0"] === undefined, "tmp[0] is not undefined"); -ok(tmp["3"] === 2, "tmp[3] !== 2"); -ok(tmp["6"] === true, "tmp[6] !== true"); -ok(tmp[2] === 1, "tmp[2] !== 1"); - -ok([1,].length === 2, "[1,].length !== 2"); -ok([,,].length === 3, "[,,].length !== 3"); -ok([,].length === 2, "[].length != 2"); -ok([].length === 0, "[].length != 0"); - -tmp = 0; -while(tmp < 4) { - ok(tmp < 4, "tmp >= 4"); - tmp++; -} -ok(tmp === 4, "tmp !== 4"); - -tmp = 0; -while(true) { - ok(tmp < 4, "tmp >= 4"); - tmp++; - if(tmp === 4) { - break; - ok(false, "break did not break"); - } -} -ok(tmp === 4, "tmp !== 4"); - -tmp = 0; -do { - ok(tmp < 4, "tmp >= 4"); - tmp++; -} while(tmp < 4); -ok(tmp === 4, "tmp !== 4"); - -tmp = 0; -do { - ok(tmp === 0, "tmp !=== 0"); - tmp++; -} while(false); -ok(tmp === 1, "tmp !== 1"); - -tmp = 0; -do { - ok(tmp < 4, "tmp >= 4"); - tmp++; -} while(tmp < 4) -ok(tmp === 4, "tmp !== 4") - -tmp = 0; -while(tmp < 4) { - tmp++; - if(tmp === 2) { - continue; - ok(false, "break did not break"); - } - ok(tmp <= 4 && tmp != 2, "tmp = " + tmp); -} -ok(tmp === 4, "tmp !== 4"); - -for(tmp=0; tmp < 4; tmp++) - ok(tmp < 4, "tmp = " + tmp); -ok(tmp === 4, "tmp !== 4"); - -for(tmp=0; tmp < 4; tmp++) { - if(tmp === 2) - break; - ok(tmp < 2, "tmp = " + tmp); -} -ok(tmp === 2, "tmp !== 2"); - -for(tmp=0; tmp < 4; tmp++) { - if(tmp === 2) - continue; - ok(tmp < 4 && tmp != 2, "tmp = " + tmp); -} -ok(tmp === 4, "tmp !== 4"); - -for(var fi=0; fi < 4; fi++) - ok(fi < 4, "fi = " + fi); -ok(fi === 4, "fi !== 4"); - -ok((void 1) === undefined, "(void 1) !== undefined"); - -var inobj = new Object(); - -for(var iter in inobj) - ok(false, "unexpected iter = " + iter); - -inobj.test = true; -tmp = 0; -for(iter in inobj) { - ok(iter == "test", "unexpected iter = " + iter); - tmp++; -} -ok(tmp === 1, "for..in tmp = " + tmp); - -function forinTestObj() {} - -forinTestObj.prototype.test3 = true; - -var arr = new Array(); -inobj = new forinTestObj(); -inobj.test1 = true; -inobj.test2 = true; - -tmp = 0; -for(iter in inobj) { - arr[iter] = true; - tmp++; -} - -ok(tmp === 3, "for..in tmp = " + tmp); -ok(arr["test1"] === true, "arr[test1] !== true"); -ok(arr["test2"] === true, "arr[test2] !== true"); -ok(arr["test3"] === true, "arr[test3] !== true"); - -tmp = new Object(); -tmp.test = false; -ok((delete tmp.test) === true, "delete returned false"); -ok(typeof(tmp.test) === "undefined", "tmp.test type = " + typeof(tmp.test)); -for(iter in tmp) - ok(false, "tmp has prop " + iter); - -tmp.testWith = true; -with(tmp) - ok(testWith === true, "testWith !== true"); - -if(false) { - var varTest1 = true; -} - -ok(varTest1 === undefined, "varTest1 = " + varTest1); -ok(varTest2 === undefined, "varTest2 = " + varTest1); - -var varTest2; - -function varTestFunc(varTest3) { - var varTest3; - - ok(varTest3 === 3, "varTest3 = " + varTest3); - ok(varTest4 === undefined, "varTest4 = " + varTest4); - - var varTest4; -} - -varTestFunc(3); - -deleteTest = 1; -delete deleteTest; -try { - tmp = deleteTest; - ok(false, "deleteTest not throwed exception?"); -}catch(ex) {} - -if (false) - if (true) - ok(false, "if evaluated"); - else - ok(false, "else should be associated with nearest if statement"); - -if (true) - if (false) - ok(false, "if evaluated"); - else - ok(true, "else should be associated with nearest if statement"); - -function instanceOfTest() {} -tmp = new instanceOfTest(); - -ok((tmp instanceof instanceOfTest) === true, "tmp is not instance of instanceOfTest"); -ok((tmp instanceof Object) === true, "tmp is not instance of Object"); -ok((tmp instanceof String) === false, "tmp is instance of String"); - -instanceOfTest.prototype = new Object(); -ok((tmp instanceof instanceOfTest) === false, "tmp is instance of instanceOfTest"); -ok((tmp instanceof Object) === true, "tmp is not instance of Object"); - -ok((1 instanceof Object) === false, "1 is instance of Object"); -ok((false instanceof Boolean) === false, "false is instance of Boolean"); -ok(("" instanceof Object) === false, "'' is instance of Object"); - -(function () { - ok((arguments instanceof Object) === true, "argument is not instance of Object"); - ok((arguments instanceof Array) === false, "argument is not instance of Array"); - ok(arguments.toString() === "[object Object]", "arguments.toString() = " + arguments.toString()); -})(1,2); - -obj = new String(); -ok(("length" in obj) === true, "length is not in obj"); -ok(("isPrototypeOf" in obj) === true, "isPrototypeOf is not in obj"); -ok(("abc" in obj) === false, "test is in obj"); -obj.abc = 1; -ok(("abc" in obj) === true, "test is not in obj"); -ok(("1" in obj) === false, "1 is in obj"); - -obj = [1,2,3]; -ok((1 in obj) === true, "1 is not in obj"); - -obj = new Object(); -try { - obj.prop["test"]; - ok(false, "expected exception"); -}catch(e) {} -ok(!("prop" in obj), "prop in obj"); - -ok(isNaN(NaN) === true, "isNaN(NaN) !== true"); -ok(isNaN(0.5) === false, "isNaN(0.5) !== false"); -ok(isNaN(Infinity) === false, "isNaN(Infinity) !== false"); -ok(isNaN() === true, "isNaN() !== true"); -ok(isNaN(NaN, 0) === true, "isNaN(NaN, 0) !== true"); -ok(isNaN(0.5, NaN) === false, "isNaN(0.5, NaN) !== false"); -ok(isNaN(+undefined) === true, "isNaN(+undefined) !== true"); - -ok(isFinite(0.5) === true, "isFinite(0.5) !== true"); -ok(isFinite(Infinity) === false, "isFinite(Infinity) !== false"); -ok(isFinite(-Infinity) === false, "isFinite(Infinity) !== false"); -ok(isFinite(NaN) === false, "isFinite(NaN) !== false"); -ok(isFinite(0.5, NaN) === true, "isFinite(0.5, NaN) !== true"); -ok(isFinite(NaN, 0.5) === false, "isFinite(NaN, 0.5) !== false"); -ok(isFinite() === false, "isFinite() !== false"); - -ok((1 < NaN) === false, "(1 < NaN) !== false"); -ok((1 > NaN) === false, "(1 > NaN) !== false"); -ok((1 <= NaN) === false, "(1 <= NaN) !== false"); -ok((1 >= NaN) === false, "(1 >= NaN) !== false"); -ok((NaN < 1) === false, "(NaN < 1) !== false"); -ok((NaN > 1) === false, "(NaN > 1) !== false"); -ok((NaN <= 1) === false, "(NaN <= 1) !== false"); -ok((NaN >= 1) === false, "(NaN >= 1) !== false"); -ok((Infinity < 2) === false, "(Infinity < 2) !== false"); -ok((Infinity > 2) === true, "(Infinity > 2) !== true"); -ok((-Infinity < 2) === true, "(-Infinity < 2) !== true"); - -ok(isNaN(+"test") === true, "isNaN(+'test') !== true"); -ok(isNaN(+"123t") === true, "isNaN(+'123t') !== true"); -ok(isNaN(+"Infinity x") === true, "isNaN(+'Infinity x') !== true"); -ok(+"Infinity" === Infinity, "+'Infinity' !== Infinity"); -ok(+" Infinity " === Infinity, "+' Infinity ' !== Infinity"); -ok(+"-Infinity" === -Infinity, "+'-Infinity' !== -Infinity"); - -ok((NaN !== NaN) === true, "(NaN !== NaN) !== true"); -ok((NaN === NaN) === false, "(NaN === NaN) !== false"); -ok((Infinity !== NaN) === true, "(Infinity !== NaN) !== true"); -ok((Infinity !== NaN) === true, "(Infinity !== NaN) !== true"); -ok((0 === NaN) === false, "(0 === NaN) !== false"); - -ok((NaN != NaN) === true, "(NaN !== NaN) != true"); -ok((NaN == NaN) === false, "(NaN === NaN) != false"); -ok((Infinity != NaN) === true, "(Infinity != NaN) !== true"); -ok((Infinity != NaN) === true, "(Infinity != NaN) !== true"); -ok((0 == NaN) === false, "(0 === NaN) != false"); - - -ok(typeof(testFunc2) === "function", "typeof(testFunc2) = " + typeof(testFunc2)); -tmp = testFunc2(1); -ok(tmp === 2, "testFunc2(1) = " + tmp); -function testFunc2(x) { return x+1; } - -ok(typeof(testFunc3) === "function", "typeof(testFunc3) = " + typeof(testFunc3)); -tmp = testFunc3(1); -ok(tmp === 3, "testFunc3(1) = " + tmp); -tmp = function testFunc3(x) { return x+2; }; - -tmp = testFunc4(1); -ok(tmp === 5, "testFunc4(1) = " + tmp); -tmp = function testFunc4(x) { return x+3; }; -tmp = testFunc4(1); -testFunc4 = 1; -ok(testFunc4 === 1, "testFunc4 = " + testFunc4); -ok(tmp === 5, "testFunc4(1) = " + tmp); -tmp = function testFunc4(x) { return x+4; }; -ok(testFunc4 === 1, "testFunc4 = " + testFunc4); - -function testEmbededFunctions() { - ok(typeof(testFunc5) === "function", "typeof(testFunc5) = " + typeof(testFunc5)); - tmp = testFunc5(1); - ok(tmp === 3, "testFunc5(1) = " + tmp); - tmp = function testFunc5(x) { return x+2; }; - - tmp = testFunc6(1); - ok(tmp === 5, "testFunc6(1) = " + tmp); - tmp = function testFunc6(x) { return x+3; }; - tmp = testFunc6(1); - ok(tmp === 5, "testFunc6(1) = " + tmp); - tmp = function testFunc6(x) { return x+4; }; - testFunc6 = 1; - ok(testFunc6 === 1, "testFunc4 = " + testFunc6); -} - -testEmbededFunctions(); - -date = new Date(); -date.toString = function() { return "toString"; } -ok(""+date === "toString", "''+date = " + date); -date.toString = function() { return this; } -ok(""+date === ""+date.valueOf(), "''+date = " + date); - -str = new String("test"); -str.valueOf = function() { return "valueOf"; } -ok(""+str === "valueOf", "''+str = " + str); -str.valueOf = function() { return new Date(); } -ok(""+str === "test", "''+str = " + str); - -ok((function (){return 1;})() === 1, "(function (){return 1;})() = " + (function (){return 1;})()); - -var re = /=(\?|%3F)/g; -ok(re.source === "=(\\?|%3F)", "re.source = " + re.source); - -tmp = new Array(); -for(var i=0; i<2; i++) - tmp[i] = /b/; -ok(tmp[0] != tmp[1], "tmp[0] == tmp [1]"); - -ok(createNullBSTR() === '', "createNullBSTR() !== ''"); - -ok(getVT(nullDisp) === "VT_DISPATCH", "getVT(nullDisp) = " + getVT(nullDisp)); -ok(typeof(nullDisp) === "object", "typeof(nullDisp) = " + typeof(nullDisp)); -ok(nullDisp === nullDisp, "nullDisp !== nullDisp"); -ok(nullDisp !== re, "nullDisp === re"); -ok(nullDisp === null, "nullDisp === null"); -ok(nullDisp == null, "nullDisp == null"); -ok(getVT(true && nullDisp) === "VT_DISPATCH", - "getVT(0 && nullDisp) = " + getVT(true && nullDisp)); -ok(!nullDisp === true, "!nullDisp = " + !nullDisp); -ok(String(nullDisp) === "null", "String(nullDisp) = " + String(nullDisp)); -ok(nullDisp != new Object(), "nullDisp == new Object()"); -ok(new Object() != nullDisp, "new Object() == nullDisp"); -ok((typeof Object(nullDisp)) === "object", "typeof Object(nullDisp) !== 'object'"); -tmp = getVT(Object(nullDisp)); -ok(tmp === "VT_DISPATCH", "getVT(Object(nullDisp) = " + tmp); -tmp = Object(nullDisp).toString(); -ok(tmp === "[object Object]", "Object(nullDisp).toString() = " + tmp); - -function do_test() {} -function nosemicolon() {} nosemicolon(); -function () {} nosemicolon(); - -if(false) { - function in_if_false() { return true; } ok(false, "!?"); -} - -ok(in_if_false(), "in_if_false failed"); - -ok(typeof(doesnotexist) === "undefined", "typeof(doesnotexist) = " + typeof(doesnotexist)); - -(function() { newValue = 1; })(); -ok(newValue === 1, "newValue = " + newValue); - -obj = {undefined: 3}; - -/* Keep this test in the end of file */ -undefined = 6; -ok(undefined === 6, "undefined = " + undefined); - -reportSuccess(); diff --git a/rostests/winetests/jscript/regexp.js b/rostests/winetests/jscript/regexp.js deleted file mode 100644 index 26919f9974b..00000000000 --- a/rostests/winetests/jscript/regexp.js +++ /dev/null @@ -1,575 +0,0 @@ -/* - * Copyright 2008 Jacek Caban for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * 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 - */ - - -var m, re, b, i, obj; - -ok(RegExp.leftContext === "", "RegExp.leftContext = " + RegExp.leftContext); -RegExp.leftContext = "abc"; -ok(RegExp.leftContext === "", "RegExp.leftContext = " + RegExp.leftContext); - -re = /a+/; -ok(re.lastIndex === 0, "re.lastIndex = " + re.lastIndex); - -m = re.exec(" aabaaa"); -ok(re.lastIndex === 3, "re.lastIndex = " + re.lastIndex); -ok(m.index === 1, "m.index = " + m.index); -ok(m.input === " aabaaa", "m.input = " + m.input); -ok(m.length === 1, "m.length = " + m.length); -ok(m[0] === "aa", "m[0] = " + m[0]); -ok(RegExp.leftContext === " ", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === "baaa", "RegExp.rightContext = " + RegExp.rightContext); - -m = re.exec(" aabaaa"); -ok(re.lastIndex === 3, "re.lastIndex = " + re.lastIndex); -ok(m.index === 1, "m.index = " + m.index); -ok(m.input === " aabaaa", "m.input = " + m.input); -ok(m.length === 1, "m.length = " + m.length); -ok(m[0] === "aa", "m[0] = " + m[0]); -ok(RegExp.leftContext === " ", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === "baaa", "RegExp.rightContext = " + RegExp.rightContext); - -re = /a+/g; -ok(re.lastIndex === 0, "re.lastIndex = " + re.lastIndex); - -m = re.exec(" aabaaa"); -ok(re.lastIndex === 3, "re.lastIndex = " + re.lastIndex); -ok(m.index === 1, "m.index = " + m.index); -ok(m.input === " aabaaa", "m.input = " + m.input); -ok(m.length === 1, "m.length = " + m.length); -ok(m[0] === "aa", "m[0] = " + m[0]); - -m = re.exec(" aabaaa"); -ok(re.lastIndex === 7, "re.lastIndex = " + re.lastIndex); -ok(m.index === 4, "m.index = " + m.index); -ok(m.input === " aabaaa", "m.input = " + m.input); -ok(m.length === 1, "m.length = " + m.length); -ok(m[0] === "aaa", "m[0] = " + m[0]); - -m = re.exec(" aabaaa"); -ok(re.lastIndex === 0, "re.lastIndex = " + re.lastIndex); -ok(m === null, "m is not null"); - -re.exec(" a"); -ok(re.lastIndex === 16, "re.lastIndex = " + re.lastIndex); -ok(RegExp.leftContext === " ", - "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === "", "RegExp.rightContext = " + RegExp.rightContext); - -m = re.exec(" a"); -ok(m === null, "m is not null"); -ok(re.lastIndex === 0, "re.lastIndex = " + re.lastIndex); - -m = re.exec(" a"); -ok(re.lastIndex === 2, "re.lastIndex = " + re.lastIndex); - -m = re.exec(); -ok(m === null, "m is not null"); -ok(re.lastIndex === 0, "re.lastIndex = " + re.lastIndex); - -m = /(a|b)+|(c)/.exec("aa"); -ok(m[0] === "aa", "m[0] = " + m[0]); -ok(m[1] === "a", "m[1] = " + m[1]); -ok(m[2] === "", "m[2] = " + m[2]); - -b = re.test(" a "); -ok(b === true, "re.test(' a ') returned " + b); -ok(re.lastIndex === 3, "re.lastIndex = " + re.lastIndex); -ok(RegExp.leftContext === " ", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === " ", "RegExp.rightContext = " + RegExp.rightContext); - -b = re.test(" a "); -ok(b === false, "re.test(' a ') returned " + b); -ok(re.lastIndex === 0, "re.lastIndex = " + re.lastIndex); -ok(RegExp.leftContext === " ", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === " ", "RegExp.rightContext = " + RegExp.rightContext); - -re = /\[([^\[]+)\]/g; -m = re.exec(" [test] "); -ok(re.lastIndex === 7, "re.lastIndex = " + re.lastIndex); -ok(m.index === 1, "m.index = " + m.index); -ok(m.input === " [test] ", "m.input = " + m.input); -ok(m.length === 2, "m.length = " + m.length); -ok(m[0] === "[test]", "m[0] = " + m[0]); -ok(m[1] === "test", "m[1] = " + m[1]); - -b = /a*/.test(); -ok(b === true, "/a*/.test() returned " + b); -ok(RegExp.leftContext === "", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === "undefined", "RegExp.rightContext = " + RegExp.rightContext); - -b = /f/.test(); -ok(b === true, "/f/.test() returned " + b); -ok(RegExp.leftContext === "unde", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === "ined", "RegExp.rightContext = " + RegExp.rightContext); - -b = /abc/.test(); -ok(b === false, "/abc/.test() returned " + b); -ok(RegExp.leftContext === "unde", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === "ined", "RegExp.rightContext = " + RegExp.rightContext); - -m = "abcabc".match(re = /ca/); -ok(typeof(m) === "object", "typeof m is not object"); -ok(m.length === 1, "m.length is not 1"); -ok(m["0"] === "ca", "m[0] is not \"ca\""); -ok(m.constructor === Array, "unexpected m.constructor"); -ok(re.lastIndex === 4, "re.lastIndex = " + re.lastIndex); -ok(RegExp.leftContext === "ab", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === "bc", "RegExp.rightContext = " + RegExp.rightContext); - -m = "abcabc".match(/ab/); -ok(typeof(m) === "object", "typeof m is not object"); -ok(m.length === 1, "m.length is not 1"); -ok(m["0"] === "ab", "m[0] is not \"ab\""); -ok(RegExp.leftContext === "", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === "cabc", "RegExp.rightContext = " + RegExp.rightContext); - -m = "abcabc".match(/ab/g); -ok(typeof(m) === "object", "typeof m is not object"); -ok(m.length === 2, "m.length is not 2"); -ok(m["0"] === "ab", "m[0] is not \"ab\""); -ok(m["1"] === "ab", "m[1] is not \"ab\""); -/* ok(m.input === "abcabc", "m.input = " + m.input); */ - -m = "abcabc".match(/Ab/g); -ok(typeof(m) === "object", "typeof m is not object"); -ok(m === null, "m is not null"); - -m = "abcabc".match(/Ab/gi); -ok(typeof(m) === "object", "typeof m is not object"); -ok(m.length === 2, "m.length is not 2"); -ok(m["0"] === "ab", "m[0] is not \"ab\""); -ok(m["1"] === "ab", "m[1] is not \"ab\""); -ok(RegExp.leftContext === "abc", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === "c", "RegExp.rightContext = " + RegExp.rightContext); - -m = "aaabcabc".match(/a+b/g); -ok(typeof(m) === "object", "typeof m is not object"); -ok(m.length === 2, "m.length is not 2"); -ok(m["0"] === "aaab", "m[0] is not \"ab\""); -ok(m["1"] === "ab", "m[1] is not \"ab\""); - -m = "aaa\\\\cabc".match(/\\/g); -ok(typeof(m) === "object", "typeof m is not object"); -ok(m.length === 2, "m.length is not 2"); -ok(m["0"] === "\\", "m[0] is not \"\\\""); -ok(m["1"] === "\\", "m[1] is not \"\\\""); - -m = "abcabc".match(new RegExp("ab")); -ok(typeof(m) === "object", "typeof m is not object"); -ok(m.length === 1, "m.length is not 1"); -ok(m["0"] === "ab", "m[0] is not \"ab\""); - -m = "abcabc".match(new RegExp("ab","g")); -ok(typeof(m) === "object", "typeof m is not object"); -ok(m.length === 2, "m.length is not 2"); -ok(m["0"] === "ab", "m[0] is not \"ab\""); -ok(m["1"] === "ab", "m[1] is not \"ab\""); -ok(RegExp.leftContext === "abc", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === "c", "RegExp.rightContext = " + RegExp.rightContext); - -m = "abcabc".match(new RegExp(/ab/g)); -ok(typeof(m) === "object", "typeof m is not object"); -ok(m.length === 2, "m.length is not 2"); -ok(m["0"] === "ab", "m[0] is not \"ab\""); -ok(m["1"] === "ab", "m[1] is not \"ab\""); - -m = "abcabc".match(new RegExp("ab","g", "test")); -ok(typeof(m) === "object", "typeof m is not object"); -ok(m.length === 2, "m.length is not 2"); -ok(m["0"] === "ab", "m[0] is not \"ab\""); -ok(m["1"] === "ab", "m[1] is not \"ab\""); - -m = "abcabcg".match("ab", "g"); -ok(typeof(m) === "object", "typeof m is not object"); -ok(m.length === 1, "m.length is not 1"); -ok(m["0"] === "ab", "m[0] is not \"ab\""); -ok(RegExp.leftContext === "", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === "cabcg", "RegExp.rightContext = " + RegExp.rightContext); - -m = "abcabc".match(); -ok(m === null, "m is not null"); -ok(RegExp.leftContext === "", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === "cabcg", "RegExp.rightContext = " + RegExp.rightContext); - -m = "abcabc".match(/(a)(b)cabc/); -ok(typeof(m) === "object", "typeof m is not object"); -ok(m.length === 3, "m.length is not 3"); -ok(m[0] === "abcabc", "m[0] is not \"abc\""); -ok(m[1] === "a", "m[1] is not \"a\""); -ok(m[2] === "b", "m[2] is not \"b\""); - -re = /(a)bcabc/; -re.lastIndex = -3; -m = "abcabc".match(re); -ok(typeof(m) === "object", "typeof m is not object"); -ok(m.length === 2, "m.length = " + m.length + "expected 3"); -ok(m[0] === "abcabc", "m[0] is not \"abc\""); -ok(m[1] === "a", "m[1] is not \"a\""); -ok(re.lastIndex === 6, "re.lastIndex = " + re.lastIndex); - -re = /(a)bcabc/; -re.lastIndex = 2; -m = "abcabcxxx".match(re); -ok(typeof(m) === "object", "typeof m is not object"); -ok(m.length === 2, "m.length = " + m.length + "expected 3"); -ok(m[0] === "abcabc", "m[0] is not \"abc\""); -ok(m[1] === "a", "m[1] is not \"a\""); -ok(m.input === "abcabcxxx", "m.input = " + m.input); -ok(re.lastIndex === 6, "re.lastIndex = " + re.lastIndex); - -r = "- [test] -".replace(re = /\[([^\[]+)\]/g, "success"); -ok(r === "- success -", "r = " + r + " expected '- success -'"); -ok(re.lastIndex === 8, "re.lastIndex = " + re.lastIndex); -ok(RegExp.leftContext === "- ", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === " -", "RegExp.rightContext = " + RegExp.rightContext); - -r = "[test] [test]".replace(/\[([^\[]+)\]/g, "aa"); -ok(r === "aa aa", "r = " + r + "aa aa"); -ok(RegExp.leftContext === "[test] ", - "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === "", - "RegExp.rightContext = " + RegExp.rightContext); - -r = "[test] [test]".replace(/\[([^\[]+)\]/, "aa"); -ok(r === "aa [test]", "r = " + r + " expected 'aa [test]'"); - -r = "- [test] -".replace(/\[([^\[]+)\]/g); -ok(r === "- undefined -", "r = " + r + " expected '- undefined -'"); - -r = "- [test] -".replace(/\[([^\[]+)\]/g, true); -ok(r === "- true -", "r = " + r + " expected '- true -'"); - -r = "- [test] -".replace(/\[([^\[]+)\]/g, true, "test"); -ok(r === "- true -", "r = " + r + " expected '- true -'"); -ok(RegExp.leftContext === "- ", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === " -", "RegExp.rightContext = " + RegExp.rightContext); - -var tmp = 0; - -function replaceFunc1(m, off, str) { - ok(arguments.length === 3, "arguments.length = " + arguments.length); - - switch(tmp) { - case 0: - ok(m === "[test1]", "m = " + m + " expected [test1]"); - ok(off === 0, "off = " + off + " expected 0"); - ok(RegExp.leftContext === "- ", - "RegExp.leftContext = " + RegExp.leftContext); - ok(RegExp.rightContext === " -", - "RegExp.rightContext = " + RegExp.rightContext); - break; - case 1: - ok(m === "[test2]", "m = " + m + " expected [test2]"); - ok(off === 8, "off = " + off + " expected 8"); - ok(RegExp.leftContext === "- ", - "RegExp.leftContext = " + RegExp.leftContext); - ok(RegExp.rightContext === " -", - "RegExp.rightContext = " + RegExp.rightContext); - break; - default: - ok(false, "unexpected call"); - } - - ok(str === "[test1] [test2]", "str = " + arguments[3]); - return "r" + tmp++; -} - -r = "[test1] [test2]".replace(/\[[^\[]+\]/g, replaceFunc1); -ok(r === "r0 r1", "r = " + r + " expected 'r0 r1'"); -ok(RegExp.leftContext === "[test1] ", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === "", "RegExp.rightContext = " + RegExp.rightContext); - -tmp = 0; - -function replaceFunc2(m, subm, off, str) { - ok(arguments.length === 4, "arguments.length = " + arguments.length); - - switch(tmp) { - case 0: - ok(subm === "test1", "subm = " + subm); - ok(m === "[test1]", "m = " + m + " expected [test1]"); - ok(off === 0, "off = " + off + " expected 0"); - break; - case 1: - ok(subm === "test2", "subm = " + subm); - ok(m === "[test2]", "m = " + m + " expected [test2]"); - ok(off === 8, "off = " + off + " expected 8"); - break; - default: - ok(false, "unexpected call"); - } - - ok(str === "[test1] [test2]", "str = " + arguments[3]); - return "r" + tmp++; -} - -r = "[test1] [test2]".replace(/\[([^\[]+)\]/g, replaceFunc2); -ok(r === "r0 r1", "r = '" + r + "' expected 'r0 r1'"); - -r = "$1,$2".replace(/(\$(\d))/g, "$$1-$1$2"); -ok(r === "$1-$11,$1-$22", "r = '" + r + "' expected '$1-$11,$1-$22'"); -ok(RegExp.leftContext === "$1,", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === "", "RegExp.rightContext = " + RegExp.rightContext); - -r = "abc &1 123".replace(/(\&(\d))/g, "$&"); -ok(r === "abc &1 123", "r = '" + r + "' expected 'abc &1 123'"); -ok(RegExp.leftContext === "abc ", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === " 123", "RegExp.rightContext = " + RegExp.rightContext); - -r = "abc &1 123".replace(/(\&(\d))/g, "$'"); -ok(r === "abc 123 123", "r = '" + r + "' expected 'abc 123 123'"); - -r = "abc &1 123".replace(/(\&(\d))/g, "$`"); -ok(r === "abc abc 123", "r = '" + r + "' expected 'abc abc 123'"); - -r = "abc &1 123".replace(/(\&(\d))/g, "$3"); -ok(r === "abc $3 123", "r = '" + r + "' expected 'abc $3 123'"); - -r = "abc &1 123".replace(/(\&(\d))/g, "$"); -ok(r === "abc $ 123", "r = '" + r + "' expected 'abc $ 123'"); - -r = "abc &1 123".replace(/(\&(\d))/g, "$a"); -ok(r === "abc $a 123", "r = '" + r + "' expected 'abc $a 123'"); - -r = "abc &1 123".replace(/(\&(\d))/g, "$11"); -ok(r === "abc &11 123", "r = '" + r + "' expected 'abc &11 123'"); - -r = "abc &1 123".replace(/(\&(\d))/g, "$0"); -ok(r === "abc $0 123", "r = '" + r + "' expected 'abc $0 123'"); - -/a/.test("a"); -r = "1 2 3".replace("2", "$&"); -ok(r === "1 $& 3", "r = '" + r + "' expected '1 $& 3'"); -ok(RegExp.leftContext === "", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === "", "RegExp.rightContext = " + RegExp.rightContext); - -r = "1 2 3".replace("2", "$'"); -ok(r === "1 $' 3", "r = '" + r + "' expected '1 $' 3'"); - -r = "1,,2,3".split(/,+/g); -ok(r.length === 3, "r.length = " + r.length); -ok(r[0] === "1", "r[0] = " + r[0]); -ok(r[1] === "2", "r[1] = " + r[1]); -ok(r[2] === "3", "r[2] = " + r[2]); -ok(RegExp.leftContext === "1,,2", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === "3", "RegExp.rightContext = " + RegExp.rightContext); - -r = "1,,2,3".split(/,+/); -ok(r.length === 3, "r.length = " + r.length); -ok(r[0] === "1", "r[0] = " + r[0]); -ok(r[1] === "2", "r[1] = " + r[1]); -ok(r[2] === "3", "r[2] = " + r[2]); - -r = "1,,2,".split(/,+/); -ok(r.length === 2, "r.length = " + r.length); -ok(r[0] === "1", "r[0] = " + r[0]); -ok(r[1] === "2", "r[1] = " + r[1]); - -re = /,+/; -r = "1,,2,".split(re); -ok(r.length === 2, "r.length = " + r.length); -ok(r[0] === "1", "r[0] = " + r[0]); -ok(r[1] === "2", "r[1] = " + r[1]); -ok(re.lastIndex === 5, "re.lastIndex = " + re.lastIndex); - -re = /,+/g; -r = "1,,2,".split(re); -ok(r.length === 2, "r.length = " + r.length); -ok(r[0] === "1", "r[0] = " + r[0]); -ok(r[1] === "2", "r[1] = " + r[1]); -ok(re.lastIndex === 5, "re.lastIndex = " + re.lastIndex); - -r = "1 12 \t3".split(re = /\s+/).join(";"); -ok(r === "1;12;3", "r = " + r); -ok(re.lastIndex === 6, "re.lastIndex = " + re.lastIndex); - -r = "123".split(re = /\s+/).join(";"); -ok(r === "123", "r = " + r); -ok(re.lastIndex === 0, "re.lastIndex = " + re.lastIndex); - -/* another standard violation */ -r = "1 12 \t3".split(re = /(\s)+/g).join(";"); -ok(r === "1;12;3", "r = " + r); -ok(re.lastIndex === 6, "re.lastIndex = " + re.lastIndex); -ok(RegExp.leftContext === "1 12", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === "3", "RegExp.rightContext = " + RegExp.rightContext); - -re = /,+/; -re.lastIndex = 4; -r = "1,,2,".split(re); -ok(r.length === 2, "r.length = " + r.length); -ok(r[0] === "1", "r[0] = " + r[0]); -ok(r[1] === "2", "r[1] = " + r[1]); -ok(re.lastIndex === 5, "re.lastIndex = " + re.lastIndex); - -re = /abc[^d]/g; -ok(re.source === "abc[^d]", "re.source = '" + re.source + "', expected 'abc[^d]'"); - -re = /a\bc[^d]/g; -ok(re.source === "a\\bc[^d]", "re.source = '" + re.source + "', expected 'a\\bc[^d]'"); - -re = /abc/; -ok(re === RegExp(re), "re !== RegExp(re)"); - -re = RegExp("abc[^d]", "g"); -ok(re.source === "abc[^d]", "re.source = '" + re.source + "', expected 'abc[^d]'"); - -re = /abc/; -ok(re === RegExp(re, undefined), "re !== RegExp(re, undefined)"); - -re = /abc/; -ok(re === RegExp(re, undefined, 1), "re !== RegExp(re, undefined, 1)"); - -re = /a/g; -ok(re.lastIndex === 0, "re.lastIndex = " + re.lastIndex + " expected 0"); - -m = re.exec(" a "); -ok(re.lastIndex === 2, "re.lastIndex = " + re.lastIndex + " expected 2"); -ok(m.index === 1, "m.index = " + m.index + " expected 1"); -ok(RegExp.leftContext === " ", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === " ", "RegExp.rightContext = " + RegExp.rightContext); - -m = re.exec(" a "); -ok(re.lastIndex === 0, "re.lastIndex = " + re.lastIndex + " expected 0"); -ok(m === null, "m = " + m + " expected null"); - -re.lastIndex = 2; -m = re.exec(" a a "); -ok(re.lastIndex === 4, "re.lastIndex = " + re.lastIndex + " expected 4"); -ok(m.index === 3, "m.index = " + m.index + " expected 3"); - -re.lastIndex = "2"; -ok(re.lastIndex === "2", "re.lastIndex = " + re.lastIndex + " expected '2'"); -m = re.exec(" a a "); -ok(re.lastIndex === 4, "re.lastIndex = " + re.lastIndex + " expected 4"); -ok(m.index === 3, "m.index = " + m.index + " expected 3"); - -var li = 0; -var obj = new Object(); -obj.valueOf = function() { return li; }; - -re.lastIndex = obj; -ok(re.lastIndex === obj, "re.lastIndex = " + re.lastIndex + " expected obj"); -li = 2; -m = re.exec(" a a "); -ok(re.lastIndex === 2, "re.lastIndex = " + re.lastIndex + " expected 2"); -ok(m.index === 1, "m.index = " + m.index + " expected 1"); - -re.lastIndex = 3; -re.lastIndex = "test"; -ok(re.lastIndex === "test", "re.lastIndex = " + re.lastIndex + " expected 'test'"); -m = re.exec(" a a "); -ok(re.lastIndex === 2 || re.lastIndex === 0, "re.lastIndex = " + re.lastIndex + " expected 2 or 0"); -if(re.lastIndex != 0) - ok(m.index === 1, "m.index = " + m.index + " expected 1"); -else - ok(m === null, "m = " + m + " expected null"); - -re.lastIndex = 0; -re.lastIndex = 3.9; -ok(re.lastIndex === 3.9, "re.lastIndex = " + re.lastIndex + " expected 3.9"); -m = re.exec(" a a "); -ok(re.lastIndex === 4, "re.lastIndex = " + re.lastIndex + " expected 4"); -ok(m.index === 3, "m.index = " + m.index + " expected 3"); - -obj.valueOf = function() { throw 0; } -re.lastIndex = obj; -ok(re.lastIndex === obj, "unexpected re.lastIndex"); -m = re.exec(" a a "); -ok(re.lastIndex === 2, "re.lastIndex = " + re.lastIndex + " expected 2"); -ok(m.index === 1, "m.index = " + m.index + " expected 1"); - -re.lastIndex = -3; -ok(re.lastIndex === -3, "re.lastIndex = " + re.lastIndex + " expected -3"); -m = re.exec(" a a "); -ok(re.lastIndex === 0, "re.lastIndex = " + re.lastIndex + " expected 0"); -ok(m === null, "m = " + m + " expected null"); - -re.lastIndex = -1; -ok(re.lastIndex === -1, "re.lastIndex = " + re.lastIndex + " expected -1"); -m = re.exec(" "); -ok(re.lastIndex === 0, "re.lastIndex = " + re.lastIndex + " expected 0"); -ok(m === null, "m = " + m + " expected null"); - -re = /a/; -re.lastIndex = -3; -ok(re.lastIndex === -3, "re.lastIndex = " + re.lastIndex + " expected -3"); -m = re.exec(" a a "); -ok(re.lastIndex === 2, "re.lastIndex = " + re.lastIndex + " expected 0"); -ok(m.index === 1, "m = " + m + " expected 1"); -ok(RegExp.leftContext === " ", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === " a ", "RegExp.rightContext = " + RegExp.rightContext); - -re.lastIndex = -1; -ok(re.lastIndex === -1, "re.lastIndex = " + re.lastIndex + " expected -1"); -m = re.exec(" "); -ok(re.lastIndex === 0, "re.lastIndex = " + re.lastIndex + " expected 0"); -ok(m === null, "m = " + m + " expected null"); - -re = /aa/g; -i = 'baacd'.search(re); -ok(i === 1, "'baacd'.search(re) = " + i); -ok(re.lastIndex === 3, "re.lastIndex = " + re.lastIndex); -ok(RegExp.leftContext === "b", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === "cd", "RegExp.rightContext = " + RegExp.rightContext); - -re.lastIndex = 2; -i = 'baacdaa'.search(re); -ok(i === 1, "'baacd'.search(re) = " + i); -ok(re.lastIndex === 3, "re.lastIndex = " + re.lastIndex); - -re = /aa/; -i = 'baacd'.search(re); -ok(i === 1, "'baacd'.search(re) = " + i); -ok(re.lastIndex === 3, "re.lastIndex = " + re.lastIndex); - -re.lastIndex = 2; -i = 'baacdaa'.search(re); -ok(i === 1, "'baacd'.search(re) = " + i); -ok(re.lastIndex === 3, "re.lastIndex = " + re.lastIndex); -ok(RegExp.leftContext === "b", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === "cdaa", "RegExp.rightContext = " + RegExp.rightContext); - -re = /d/g; -re.lastIndex = 1; -i = 'abc'.search(re); -ok(i === -1, "'abc'.search(/d/g) = " + i); -ok(re.lastIndex === 0, "re.lastIndex = " + re.lastIndex); -ok(RegExp.leftContext === "b", "RegExp.leftContext = " + RegExp.leftContext); -ok(RegExp.rightContext === "cdaa", "RegExp.rightContext = " + RegExp.rightContext); - -i = 'abcdde'.search(/[df]/); -ok(i === 3, "'abc'.search(/[df]/) = " + i); - -i = 'abcdde'.search(/[df]/, "a"); -ok(i === 3, "'abc'.search(/[df]/) = " + i); - -i = 'abcdde'.search("[df]"); -ok(i === 3, "'abc'.search(/d*/) = " + i); - -obj = { - toString: function() { return "abc"; } -}; -i = String.prototype.search.call(obj, "b"); -ok(i === 1, "String.prototype.seatch.apply(obj, 'b') = " + i); - -i = " undefined ".search(); -ok(i === null, "' undefined '.search() = " + i); - -reportSuccess(); diff --git a/rostests/winetests/jscript/rsrc.rc b/rostests/winetests/jscript/rsrc.rc deleted file mode 100644 index ecb421289d2..00000000000 --- a/rostests/winetests/jscript/rsrc.rc +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2008 Jacek Caban for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * 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 - */ - -/* @makedep: api.js */ -api.js 40 "api.js" - -/* @makedep: lang.js */ -lang.js 40 "lang.js" - -/* @makedep: regexp.js */ -regexp.js 40 "regexp.js" diff --git a/rostests/winetests/jscript/run.c b/rostests/winetests/jscript/run.c deleted file mode 100644 index 303907e8f90..00000000000 --- a/rostests/winetests/jscript/run.c +++ /dev/null @@ -1,1127 +0,0 @@ -/* - * Copyright 2008 Jacek Caban for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * 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 COBJMACROS -#define CONST_VTABLE - -#include -#include -#include - -#include "wine/test.h" - -static const CLSID CLSID_JScript = - {0xf414c260,0x6ac0,0x11cf,{0xb6,0xd1,0x00,0xaa,0x00,0xbb,0xbb,0x58}}; - -#define DEFINE_EXPECT(func) \ - static BOOL expect_ ## func = FALSE, called_ ## func = FALSE - -#define SET_EXPECT(func) \ - expect_ ## func = TRUE - -#define SET_CALLED(func) \ - called_ ## func = TRUE - -#define CHECK_EXPECT2(func) \ - do { \ - ok(expect_ ##func, "unexpected call " #func "\n"); \ - called_ ## func = TRUE; \ - }while(0) - -#define CHECK_EXPECT(func) \ - do { \ - CHECK_EXPECT2(func); \ - expect_ ## func = FALSE; \ - }while(0) - -#define CHECK_CALLED(func) \ - do { \ - ok(called_ ## func, "expected " #func "\n"); \ - expect_ ## func = called_ ## func = FALSE; \ - }while(0) - -DEFINE_EXPECT(global_propget_d); -DEFINE_EXPECT(global_propget_i); -DEFINE_EXPECT(global_propput_d); -DEFINE_EXPECT(global_propput_i); -DEFINE_EXPECT(global_success_d); -DEFINE_EXPECT(global_success_i); -DEFINE_EXPECT(global_notexists_d); -DEFINE_EXPECT(testobj_delete); -DEFINE_EXPECT(testobj_value); -DEFINE_EXPECT(testobj_prop_d); -DEFINE_EXPECT(testobj_noprop_d); -DEFINE_EXPECT(GetItemInfo_testVal); - -#define DISPID_GLOBAL_TESTPROPGET 0x1000 -#define DISPID_GLOBAL_TESTPROPPUT 0x1001 -#define DISPID_GLOBAL_REPORTSUCCESS 0x1002 -#define DISPID_GLOBAL_TRACE 0x1003 -#define DISPID_GLOBAL_OK 0x1004 -#define DISPID_GLOBAL_GETVT 0x1005 -#define DISPID_GLOBAL_TESTOBJ 0x1006 -#define DISPID_GLOBAL_NULL_BSTR 0x1007 -#define DISPID_GLOBAL_NULL_DISP 0x1008 -#define DISPID_GLOBAL_TESTTHIS 0x1009 -#define DISPID_GLOBAL_TESTTHIS2 0x100a -#define DISPID_GLOBAL_INVOKEVERSION 0x100b - -#define DISPID_TESTOBJ_PROP 0x2000 - -static const WCHAR testW[] = {'t','e','s','t',0}; -static const CHAR testA[] = "test"; -static const WCHAR test_valW[] = {'t','e','s','t','V','a','l',0}; -static const CHAR test_valA[] = "testVal"; - -static BOOL strict_dispid_check; -static const char *test_name = "(null)"; -static IDispatch *script_disp; -static int invoke_version; - -static BSTR a2bstr(const char *str) -{ - BSTR ret; - int len; - - len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); - ret = SysAllocStringLen(NULL, len-1); - MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len); - - return ret; -} - -static int strcmp_wa(LPCWSTR strw, const char *stra) -{ - CHAR buf[512]; - WideCharToMultiByte(CP_ACP, 0, strw, -1, buf, sizeof(buf), 0, 0); - return lstrcmpA(buf, stra); -} - -#define test_grfdex(a,b) _test_grfdex(__LINE__,a,b) -static void _test_grfdex(unsigned line, DWORD grfdex, DWORD expect) -{ - expect |= invoke_version << 28; - ok_(__FILE__,line)(grfdex == expect, "grfdex = %x, expected %x\n", grfdex, expect); -} - -static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv) -{ - *ppv = NULL; - - if(IsEqualGUID(riid, &IID_IUnknown) - || IsEqualGUID(riid, &IID_IDispatch) - || IsEqualGUID(riid, &IID_IDispatchEx)) - *ppv = iface; - else - return E_NOINTERFACE; - - return S_OK; -} - -static ULONG WINAPI DispatchEx_AddRef(IDispatchEx *iface) -{ - return 2; -} - -static ULONG WINAPI DispatchEx_Release(IDispatchEx *iface) -{ - return 1; -} - -static HRESULT WINAPI DispatchEx_GetTypeInfoCount(IDispatchEx *iface, UINT *pctinfo) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetIDsOfNames(IDispatchEx *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, - LCID lcid, DISPID *rgDispId) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex) -{ - ok(0, "unexpected call %s %x\n", wine_dbgstr_w(bstrName), grfdex); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID id) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetMemberName(IDispatchEx *iface, DISPID id, BSTR *pbstrName) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetNextDispID(IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetNameSpaceParent(IDispatchEx *iface, IUnknown **ppunk) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI testObj_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid) -{ - if(!strcmp_wa(bstrName, "prop")) { - CHECK_EXPECT(testobj_prop_d); - test_grfdex(grfdex, fdexNameCaseSensitive); - *pid = DISPID_TESTOBJ_PROP; - return S_OK; - } - if(!strcmp_wa(bstrName, "noprop")) { - CHECK_EXPECT(testobj_noprop_d); - test_grfdex(grfdex, fdexNameCaseSensitive); - return DISP_E_UNKNOWNNAME; - } - - ok(0, "unexpected name %s\n", wine_dbgstr_w(bstrName)); - return E_NOTIMPL; -} - -static HRESULT WINAPI testObj_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, - VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) -{ - switch(id) { - case DISPID_VALUE: - CHECK_EXPECT(testobj_value); - - ok(wFlags == INVOKE_PROPERTYGET, "wFlags = %x\n", wFlags); - ok(pdp != NULL, "pdp == NULL\n"); - ok(!pdp->rgvarg, "rgvarg != NULL\n"); - ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n"); - ok(!pdp->cArgs, "cArgs = %d\n", pdp->cArgs); - ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs); - ok(pvarRes != NULL, "pvarRes == NULL\n"); - ok(V_VT(pvarRes) == VT_EMPTY, "V_VT(pvarRes) = %d\n", V_VT(pvarRes)); - ok(pei != NULL, "pei == NULL\n"); - - V_VT(pvarRes) = VT_I4; - V_I4(pvarRes) = 1; - return S_OK; - } - - ok(0, "unexpected call %x\n", id); - return DISP_E_MEMBERNOTFOUND; -} - -static HRESULT WINAPI testObj_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex) -{ - CHECK_EXPECT(testobj_delete); - - ok(!strcmp_wa(bstrName, "deleteTest"), "unexpected name %s\n", wine_dbgstr_w(bstrName)); - test_grfdex(grfdex, fdexNameCaseSensitive); - return S_OK; -} - -static IDispatchExVtbl testObjVtbl = { - DispatchEx_QueryInterface, - DispatchEx_AddRef, - DispatchEx_Release, - DispatchEx_GetTypeInfoCount, - DispatchEx_GetTypeInfo, - DispatchEx_GetIDsOfNames, - DispatchEx_Invoke, - testObj_GetDispID, - testObj_InvokeEx, - testObj_DeleteMemberByName, - DispatchEx_DeleteMemberByDispID, - DispatchEx_GetMemberProperties, - DispatchEx_GetMemberName, - DispatchEx_GetNextDispID, - DispatchEx_GetNameSpaceParent -}; - -static IDispatchEx testObj = { &testObjVtbl }; - -static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid) -{ - if(!strcmp_wa(bstrName, "ok")) { - test_grfdex(grfdex, fdexNameCaseSensitive); - *pid = DISPID_GLOBAL_OK; - return S_OK; - } - if(!strcmp_wa(bstrName, "trace")) { - test_grfdex(grfdex, fdexNameCaseSensitive); - *pid = DISPID_GLOBAL_TRACE; - return S_OK; - } - if(!strcmp_wa(bstrName, "reportSuccess")) { - CHECK_EXPECT(global_success_d); - test_grfdex(grfdex, fdexNameCaseSensitive); - *pid = DISPID_GLOBAL_REPORTSUCCESS; - return S_OK; - } - if(!strcmp_wa(bstrName, "testPropGet")) { - CHECK_EXPECT(global_propget_d); - test_grfdex(grfdex, fdexNameCaseSensitive); - *pid = DISPID_GLOBAL_TESTPROPGET; - return S_OK; - } - if(!strcmp_wa(bstrName, "testPropPut")) { - CHECK_EXPECT(global_propput_d); - test_grfdex(grfdex, fdexNameCaseSensitive); - *pid = DISPID_GLOBAL_TESTPROPPUT; - return S_OK; - } - if(!strcmp_wa(bstrName, "getVT")) { - test_grfdex(grfdex, fdexNameCaseSensitive); - *pid = DISPID_GLOBAL_GETVT; - return S_OK; - } - if(!strcmp_wa(bstrName, "testObj")) { - test_grfdex(grfdex, fdexNameCaseSensitive); - *pid = DISPID_GLOBAL_TESTOBJ; - return S_OK; - } - if(!strcmp_wa(bstrName, "createNullBSTR")) { - *pid = DISPID_GLOBAL_NULL_BSTR; - return S_OK; - } - if(!strcmp_wa(bstrName, "nullDisp")) { - *pid = DISPID_GLOBAL_NULL_DISP; - return S_OK; - } - if(!strcmp_wa(bstrName, "notExists")) { - CHECK_EXPECT(global_notexists_d); - test_grfdex(grfdex, fdexNameCaseSensitive); - return DISP_E_UNKNOWNNAME; - } - - if(!strcmp_wa(bstrName, "testThis")) { - test_grfdex(grfdex, fdexNameCaseSensitive); - *pid = DISPID_GLOBAL_TESTTHIS; - return S_OK; - } - - if(!strcmp_wa(bstrName, "testThis2")) { - test_grfdex(grfdex, fdexNameCaseSensitive); - *pid = DISPID_GLOBAL_TESTTHIS2; - return S_OK; - } - - if(!strcmp_wa(bstrName, "invokeVersion")) { - test_grfdex(grfdex, fdexNameCaseSensitive); - *pid = DISPID_GLOBAL_INVOKEVERSION; - return S_OK; - } - - if(strict_dispid_check) - ok(0, "unexpected call %s\n", wine_dbgstr_w(bstrName)); - return DISP_E_UNKNOWNNAME; -} - -static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, - VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) -{ - switch(id) { - case DISPID_GLOBAL_OK: - ok(wFlags == INVOKE_FUNC || wFlags == (INVOKE_FUNC|INVOKE_PROPERTYGET), "wFlags = %x\n", wFlags); - ok(pdp != NULL, "pdp == NULL\n"); - ok(pdp->rgvarg != NULL, "rgvarg == NULL\n"); - ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n"); - ok(pdp->cArgs == 2, "cArgs = %d\n", pdp->cArgs); - ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs); - if(wFlags & INVOKE_PROPERTYGET) - ok(pvarRes != NULL, "pvarRes == NULL\n"); - else - ok(!pvarRes, "pvarRes != NULL\n"); - ok(pei != NULL, "pei == NULL\n"); - - ok(V_VT(pdp->rgvarg) == VT_BSTR, "V_VT(psp->rgvargs) = %d\n", V_VT(pdp->rgvarg)); - ok(V_VT(pdp->rgvarg+1) == VT_BOOL, "V_VT(psp->rgvargs+1) = %d\n", V_VT(pdp->rgvarg)); - ok(V_BOOL(pdp->rgvarg+1), "%s: %s\n", test_name, wine_dbgstr_w(V_BSTR(pdp->rgvarg))); - - return S_OK; - - case DISPID_GLOBAL_TRACE: - ok(wFlags == INVOKE_FUNC, "wFlags = %x\n", wFlags); - ok(pdp != NULL, "pdp == NULL\n"); - ok(pdp->rgvarg != NULL, "rgvarg == NULL\n"); - ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n"); - ok(pdp->cArgs == 1, "cArgs = %d\n", pdp->cArgs); - ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs); - ok(!pvarRes, "pvarRes != NULL\n"); - ok(pei != NULL, "pei == NULL\n"); - - ok(V_VT(pdp->rgvarg) == VT_BSTR, "V_VT(psp->rgvargs) = %d\n", V_VT(pdp->rgvarg)); - if(V_VT(pdp->rgvarg) == VT_BSTR) - trace("%s: %s\n", test_name, wine_dbgstr_w(V_BSTR(pdp->rgvarg))); - - return S_OK; - - case DISPID_GLOBAL_REPORTSUCCESS: - CHECK_EXPECT(global_success_i); - - ok(wFlags == INVOKE_FUNC, "wFlags = %x\n", wFlags); - ok(pdp != NULL, "pdp == NULL\n"); - ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n"); - ok(pdp->cArgs == 0, "cArgs = %d\n", pdp->cArgs); - ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs); - ok(!pvarRes, "pvarRes != NULL\n"); - ok(pei != NULL, "pei == NULL\n"); - - return S_OK; - - case DISPID_GLOBAL_TESTPROPGET: - CHECK_EXPECT(global_propget_i); - - ok(wFlags == INVOKE_PROPERTYGET, "wFlags = %x\n", wFlags); - ok(pdp != NULL, "pdp == NULL\n"); - ok(!pdp->rgvarg, "rgvarg != NULL\n"); - ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n"); - ok(!pdp->cArgs, "cArgs = %d\n", pdp->cArgs); - ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs); - ok(pvarRes != NULL, "pvarRes == NULL\n"); - ok(V_VT(pvarRes) == VT_EMPTY, "V_VT(pvarRes) = %d\n", V_VT(pvarRes)); - ok(pei != NULL, "pei == NULL\n"); - - V_VT(pvarRes) = VT_I4; - V_I4(pvarRes) = 1; - - return S_OK; - - case DISPID_GLOBAL_TESTPROPPUT: - CHECK_EXPECT(global_propput_i); - - ok(wFlags == INVOKE_PROPERTYPUT, "wFlags = %x\n", wFlags); - ok(pdp != NULL, "pdp == NULL\n"); - ok(pdp->rgvarg != NULL, "rgvarg == NULL\n"); - ok(pdp->rgdispidNamedArgs != NULL, "rgdispidNamedArgs == NULL\n"); - ok(pdp->cArgs == 1, "cArgs = %d\n", pdp->cArgs); - ok(pdp->cNamedArgs == 1, "cNamedArgs = %d\n", pdp->cNamedArgs); - ok(pdp->rgdispidNamedArgs[0] == DISPID_PROPERTYPUT, "pdp->rgdispidNamedArgs[0] = %d\n", pdp->rgdispidNamedArgs[0]); - ok(!pvarRes, "pvarRes != NULL\n"); - - ok(V_VT(pdp->rgvarg) == VT_I4, "V_VT(pdp->rgvarg)=%d\n", V_VT(pdp->rgvarg)); - ok(V_I4(pdp->rgvarg) == 1, "V_I4(pdp->rgvarg)=%d\n", V_I4(pdp->rgvarg)); - return S_OK; - - case DISPID_GLOBAL_GETVT: - ok(pdp != NULL, "pdp == NULL\n"); - ok(pdp->rgvarg != NULL, "rgvarg == NULL\n"); - ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n"); - ok(pdp->cArgs == 1, "cArgs = %d\n", pdp->cArgs); - ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs); - ok(pvarRes != NULL, "pvarRes == NULL\n"); - ok(V_VT(pvarRes) == VT_EMPTY, "V_VT(pvarRes) = %d\n", V_VT(pvarRes)); - ok(pei != NULL, "pei == NULL\n"); - - V_VT(pvarRes) = VT_BSTR; - switch(V_VT(pdp->rgvarg)) { - case VT_EMPTY: - V_BSTR(pvarRes) = a2bstr("VT_EMPTY"); - break; - case VT_NULL: - V_BSTR(pvarRes) = a2bstr("VT_NULL"); - break; - case VT_I4: - V_BSTR(pvarRes) = a2bstr("VT_I4"); - break; - case VT_R8: - V_BSTR(pvarRes) = a2bstr("VT_R8"); - break; - case VT_BSTR: - V_BSTR(pvarRes) = a2bstr("VT_BSTR"); - break; - case VT_DISPATCH: - V_BSTR(pvarRes) = a2bstr("VT_DISPATCH"); - break; - case VT_BOOL: - V_BSTR(pvarRes) = a2bstr("VT_BOOL"); - break; - default: - ok(0, "unknown vt %d\n", V_VT(pdp->rgvarg)); - return E_FAIL; - } - - return S_OK; - - case DISPID_GLOBAL_TESTOBJ: - ok(wFlags == INVOKE_PROPERTYGET, "wFlags = %x\n", wFlags); - ok(pdp != NULL, "pdp == NULL\n"); - ok(!pdp->rgvarg, "rgvarg != NULL\n"); - ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n"); - ok(!pdp->cArgs, "cArgs = %d\n", pdp->cArgs); - ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs); - ok(pvarRes != NULL, "pvarRes == NULL\n"); - ok(V_VT(pvarRes) == VT_EMPTY, "V_VT(pvarRes) = %d\n", V_VT(pvarRes)); - ok(pei != NULL, "pei == NULL\n"); - - V_VT(pvarRes) = VT_DISPATCH; - V_DISPATCH(pvarRes) = (IDispatch*)&testObj; - return S_OK; - - case DISPID_GLOBAL_NULL_BSTR: - if(pvarRes) { - V_VT(pvarRes) = VT_BSTR; - V_BSTR(pvarRes) = NULL; - } - return S_OK; - - case DISPID_GLOBAL_NULL_DISP: - ok(wFlags == INVOKE_PROPERTYGET, "wFlags = %x\n", wFlags); - ok(pdp != NULL, "pdp == NULL\n"); - ok(!pdp->rgvarg, "rgvarg != NULL\n"); - ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n"); - ok(!pdp->cArgs, "cArgs = %d\n", pdp->cArgs); - ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs); - ok(pvarRes != NULL, "pvarRes == NULL\n"); - ok(V_VT(pvarRes) == VT_EMPTY, "V_VT(pvarRes) = %d\n", V_VT(pvarRes)); - ok(pei != NULL, "pei == NULL\n"); - - V_VT(pvarRes) = VT_DISPATCH; - V_DISPATCH(pvarRes) = NULL; - return S_OK; - - case DISPID_GLOBAL_TESTTHIS: - ok(pdp != NULL, "pdp == NULL\n"); - ok(pdp->rgvarg != NULL, "rgvarg == NULL\n"); - ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n"); - ok(pdp->cArgs == 1, "cArgs = %d\n", pdp->cArgs); - ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs); - ok(pvarRes == NULL, "pvarRes != NULL\n"); - ok(pei != NULL, "pei == NULL\n"); - - ok(V_VT(pdp->rgvarg) == VT_DISPATCH, "V_VT(arg) = %d\n", V_VT(pdp->rgvarg)); - ok(V_DISPATCH(pdp->rgvarg) == (IDispatch*)iface, "disp != iface\n"); - - return S_OK; - - case DISPID_GLOBAL_TESTTHIS2: - ok(pdp != NULL, "pdp == NULL\n"); - ok(pdp->rgvarg != NULL, "rgvarg == NULL\n"); - ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n"); - ok(pdp->cArgs == 1, "cArgs = %d\n", pdp->cArgs); - ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs); - ok(pvarRes == NULL, "pvarRes != NULL\n"); - ok(pei != NULL, "pei == NULL\n"); - - ok(V_VT(pdp->rgvarg) == VT_DISPATCH, "V_VT(arg) = %d\n", V_VT(pdp->rgvarg)); - ok(V_DISPATCH(pdp->rgvarg) != (IDispatch*)iface, "disp == iface\n"); - ok(V_DISPATCH(pdp->rgvarg) == script_disp, "disp != script_disp\n"); - - return S_OK; - - case DISPID_GLOBAL_INVOKEVERSION: - ok(wFlags == INVOKE_PROPERTYGET, "wFlags = %x\n", wFlags); - ok(pdp != NULL, "pdp == NULL\n"); - ok(!pdp->rgvarg, "rgvarg != NULL\n"); - ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n"); - ok(!pdp->cArgs, "cArgs = %d\n", pdp->cArgs); - ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs); - ok(pvarRes != NULL, "pvarRes == NULL\n"); - ok(V_VT(pvarRes) == VT_EMPTY, "V_VT(pvarRes) = %d\n", V_VT(pvarRes)); - ok(pei != NULL, "pei == NULL\n"); - - V_VT(pvarRes) = VT_I4; - V_I4(pvarRes) = invoke_version; - - return S_OK; - - } - - ok(0, "unexpected call %x\n", id); - return DISP_E_MEMBERNOTFOUND; -} - -static IDispatchExVtbl GlobalVtbl = { - DispatchEx_QueryInterface, - DispatchEx_AddRef, - DispatchEx_Release, - DispatchEx_GetTypeInfoCount, - DispatchEx_GetTypeInfo, - DispatchEx_GetIDsOfNames, - DispatchEx_Invoke, - Global_GetDispID, - Global_InvokeEx, - DispatchEx_DeleteMemberByName, - DispatchEx_DeleteMemberByDispID, - DispatchEx_GetMemberProperties, - DispatchEx_GetMemberName, - DispatchEx_GetNextDispID, - DispatchEx_GetNameSpaceParent -}; - -static IDispatchEx Global = { &GlobalVtbl }; - -static HRESULT WINAPI ActiveScriptSite_QueryInterface(IActiveScriptSite *iface, REFIID riid, void **ppv) -{ - *ppv = NULL; - - if(IsEqualGUID(&IID_IUnknown, riid)) - *ppv = iface; - else if(IsEqualGUID(&IID_IActiveScriptSite, riid)) - *ppv = iface; - else - return E_NOINTERFACE; - - IUnknown_AddRef((IUnknown*)*ppv); - return S_OK; -} - -static ULONG WINAPI ActiveScriptSite_AddRef(IActiveScriptSite *iface) -{ - return 2; -} - -static ULONG WINAPI ActiveScriptSite_Release(IActiveScriptSite *iface) -{ - return 1; -} - -static HRESULT WINAPI ActiveScriptSite_GetLCID(IActiveScriptSite *iface, LCID *plcid) -{ - *plcid = GetUserDefaultLCID(); - return S_OK; -} - -static HRESULT WINAPI ActiveScriptSite_GetItemInfo(IActiveScriptSite *iface, LPCOLESTR pstrName, - DWORD dwReturnMask, IUnknown **ppiunkItem, ITypeInfo **ppti) -{ - ok(dwReturnMask == SCRIPTINFO_IUNKNOWN, "unexpected dwReturnMask %x\n", dwReturnMask); - ok(!ppti, "ppti != NULL\n"); - - if(!strcmp_wa(pstrName, test_valA)) - CHECK_EXPECT(GetItemInfo_testVal); - else if(strcmp_wa(pstrName, testA)) - ok(0, "unexpected pstrName %s\n", wine_dbgstr_w(pstrName)); - - *ppiunkItem = (IUnknown*)&Global; - return S_OK; -} - -static HRESULT WINAPI ActiveScriptSite_GetDocVersionString(IActiveScriptSite *iface, BSTR *pbstrVersion) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI ActiveScriptSite_OnScriptTerminate(IActiveScriptSite *iface, - const VARIANT *pvarResult, const EXCEPINFO *pexcepinfo) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI ActiveScriptSite_OnStateChange(IActiveScriptSite *iface, SCRIPTSTATE ssScriptState) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI ActiveScriptSite_OnScriptError(IActiveScriptSite *iface, IActiveScriptError *pscripterror) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI ActiveScriptSite_OnEnterScript(IActiveScriptSite *iface) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI ActiveScriptSite_OnLeaveScript(IActiveScriptSite *iface) -{ - return E_NOTIMPL; -} - -#undef ACTSCPSITE_THIS - -static const IActiveScriptSiteVtbl ActiveScriptSiteVtbl = { - ActiveScriptSite_QueryInterface, - ActiveScriptSite_AddRef, - ActiveScriptSite_Release, - ActiveScriptSite_GetLCID, - ActiveScriptSite_GetItemInfo, - ActiveScriptSite_GetDocVersionString, - ActiveScriptSite_OnScriptTerminate, - ActiveScriptSite_OnStateChange, - ActiveScriptSite_OnScriptError, - ActiveScriptSite_OnEnterScript, - ActiveScriptSite_OnLeaveScript -}; - -static IActiveScriptSite ActiveScriptSite = { &ActiveScriptSiteVtbl }; - -static HRESULT set_script_prop(IActiveScript *engine, DWORD property, VARIANT *val) -{ - IActiveScriptProperty *script_prop; - HRESULT hres; - - hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptProperty, - (void**)&script_prop); - ok(hres == S_OK, "Could not get IActiveScriptProperty iface: %08x\n", hres); - - hres = IActiveScriptProperty_SetProperty(script_prop, property, NULL, val); - IActiveScriptProperty_Release(script_prop); - - return hres; -} - -static IActiveScript *create_script(void) -{ - IActiveScript *script; - VARIANT v; - HRESULT hres; - - hres = CoCreateInstance(&CLSID_JScript, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, - &IID_IActiveScript, (void**)&script); - ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres); - - V_VT(&v) = VT_I4; - V_I4(&v) = invoke_version; - hres = set_script_prop(script, SCRIPTPROP_INVOKEVERSIONING, &v); - ok(hres == S_OK || broken(hres == E_NOTIMPL), "SetProperty(SCRIPTPROP_INVOKEVERSIONING) failed: %08x\n", hres); - if(invoke_version && FAILED(hres)) { - IActiveScript_Release(script); - return NULL; - } - - return script; -} - -static HRESULT parse_script(DWORD flags, BSTR script_str) -{ - IActiveScriptParse *parser; - IActiveScript *engine; - HRESULT hres; - - engine = create_script(); - if(!engine) - return S_OK; - - hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser); - ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres); - if (FAILED(hres)) - { - IActiveScript_Release(engine); - return hres; - } - - hres = IActiveScriptParse64_InitNew(parser); - ok(hres == S_OK, "InitNew failed: %08x\n", hres); - - hres = IActiveScript_SetScriptSite(engine, &ActiveScriptSite); - ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres); - - hres = IActiveScript_AddNamedItem(engine, testW, - SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|flags); - ok(hres == S_OK, "AddNamedItem failed: %08x\n", hres); - - hres = IActiveScript_SetScriptState(engine, SCRIPTSTATE_STARTED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n", hres); - - hres = IActiveScript_GetScriptDispatch(engine, NULL, &script_disp); - ok(hres == S_OK, "GetScriptDispatch failed: %08x\n", hres); - ok(script_disp != NULL, "script_disp == NULL\n"); - ok(script_disp != (IDispatch*)&Global, "script_disp == Global\n"); - - hres = IActiveScriptParse64_ParseScriptText(parser, script_str, NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - - IDispatch_Release(script_disp); - IActiveScript_Release(engine); - IUnknown_Release(parser); - - return hres; -} - -static HRESULT parse_htmlscript(BSTR script_str) -{ - IActiveScriptParse *parser; - IActiveScript *engine; - HRESULT hres; - BSTR tmp = a2bstr(""); - - engine = create_script(); - if(!engine) - return E_FAIL; - - hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser); - ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres); - if (FAILED(hres)) - { - IActiveScript_Release(engine); - return E_FAIL; - } - - hres = IActiveScriptParse64_InitNew(parser); - ok(hres == S_OK, "InitNew failed: %08x\n", hres); - - hres = IActiveScript_SetScriptSite(engine, &ActiveScriptSite); - ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres); - - hres = IActiveScript_AddNamedItem(engine, testW, - SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|SCRIPTITEM_GLOBALMEMBERS); - ok(hres == S_OK, "AddNamedItem failed: %08x\n", hres); - - hres = IActiveScript_SetScriptState(engine, SCRIPTSTATE_STARTED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n", hres); - - hres = IActiveScriptParse64_ParseScriptText(parser, script_str, NULL, NULL, tmp, 0, 0, 0, NULL, NULL); - - IActiveScript_Release(engine); - IUnknown_Release(parser); - SysFreeString(tmp); - - return hres; -} - -static void parse_script_af(DWORD flags, const char *src) -{ - BSTR tmp; - HRESULT hres; - - tmp = a2bstr(src); - hres = parse_script(flags, tmp); - SysFreeString(tmp); - ok(hres == S_OK, "parse_script failed: %08x\n", hres); -} - -static void parse_script_a(const char *src) -{ - parse_script_af(SCRIPTITEM_GLOBALMEMBERS, src); -} - -static HRESULT parse_htmlscript_a(const char *src) -{ - HRESULT hres; - BSTR tmp = a2bstr(src); - hres = parse_htmlscript(tmp); - SysFreeString(tmp); - - return hres; -} - -static BSTR get_script_from_file(const char *filename) -{ - DWORD size, len; - HANDLE file, map; - const char *file_map; - BSTR ret; - - file = CreateFileA(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, NULL); - if(file == INVALID_HANDLE_VALUE) { - trace("Could not open file: %u\n", GetLastError()); - return NULL; - } - - size = GetFileSize(file, NULL); - - map = CreateFileMapping(file, NULL, PAGE_READONLY, 0, 0, NULL); - CloseHandle(file); - if(map == INVALID_HANDLE_VALUE) { - trace("Could not create file mapping: %u\n", GetLastError()); - return NULL; - } - - file_map = MapViewOfFile(map, FILE_MAP_READ, 0, 0, 0); - CloseHandle(map); - if(!file_map) { - trace("MapViewOfFile failed: %u\n", GetLastError()); - return NULL; - } - - len = MultiByteToWideChar(CP_ACP, 0, file_map, size, NULL, 0); - ret = SysAllocStringLen(NULL, len); - MultiByteToWideChar(CP_ACP, 0, file_map, size, ret, len); - - UnmapViewOfFile(file_map); - - return ret; -} - -static void run_from_file(const char *filename) -{ - BSTR script_str; - HRESULT hres; - - script_str = get_script_from_file(filename); - if(!script_str) - return; - - strict_dispid_check = FALSE; - hres = parse_script(SCRIPTITEM_GLOBALMEMBERS, script_str); - SysFreeString(script_str); - ok(hres == S_OK, "parse_script failed: %08x\n", hres); -} - -static void run_from_res(const char *name) -{ - const char *data; - DWORD size, len; - BSTR str; - HRSRC src; - HRESULT hres; - - strict_dispid_check = FALSE; - test_name = name; - - src = FindResourceA(NULL, name, (LPCSTR)40); - ok(src != NULL, "Could not find resource %s\n", name); - - size = SizeofResource(NULL, src); - data = LoadResource(NULL, src); - - len = MultiByteToWideChar(CP_ACP, 0, data, size, NULL, 0); - str = SysAllocStringLen(NULL, len); - len = MultiByteToWideChar(CP_ACP, 0, data, size, str, len); - - SET_EXPECT(global_success_d); - SET_EXPECT(global_success_i); - hres = parse_script(SCRIPTITEM_GLOBALMEMBERS, str); - CHECK_CALLED(global_success_d); - CHECK_CALLED(global_success_i); - - ok(hres == S_OK, "parse_script failed: %08x\n", hres); - SysFreeString(str); -} - -static void test_isvisible(BOOL global_members) -{ - IActiveScriptParse *parser; - IActiveScript *engine; - HRESULT hres; - - static const WCHAR script_textW[] = - {'v','a','r',' ','v',' ','=',' ','t','e','s','t','V','a','l',';',0}; - - engine = create_script(); - if(!engine) - return; - - hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser); - ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres); - if (FAILED(hres)) - { - IActiveScript_Release(engine); - return; - } - - hres = IActiveScriptParse64_InitNew(parser); - ok(hres == S_OK, "InitNew failed: %08x\n", hres); - - hres = IActiveScript_SetScriptSite(engine, &ActiveScriptSite); - ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres); - - if(global_members) - SET_EXPECT(GetItemInfo_testVal); - hres = IActiveScript_AddNamedItem(engine, test_valW, - SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE| - (global_members ? SCRIPTITEM_GLOBALMEMBERS : 0)); - ok(hres == S_OK, "AddNamedItem failed: %08x\n", hres); - if(global_members) - CHECK_CALLED(GetItemInfo_testVal); - - hres = IActiveScript_SetScriptState(engine, SCRIPTSTATE_STARTED); - ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n", hres); - - if(!global_members) - SET_EXPECT(GetItemInfo_testVal); - hres = IActiveScriptParse64_ParseScriptText(parser, script_textW, NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); - if(!global_members) - CHECK_CALLED(GetItemInfo_testVal); - - hres = IActiveScriptParse64_ParseScriptText(parser, script_textW, NULL, NULL, NULL, 0, 0, 0, NULL, NULL); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); - - IActiveScript_Release(engine); - IUnknown_Release(parser); -} - -static void run_tests(void) -{ - HRESULT hres; - - if(invoke_version) { - IActiveScript *script; - - script = create_script(); - if(!script) { - win_skip("Could not create script\n"); - return; - } - IActiveScript_Release(script); - } - - strict_dispid_check = TRUE; - - parse_script_a(""); - parse_script_a("/* empty */ ;"); - - SET_EXPECT(global_propget_d); - SET_EXPECT(global_propget_i); - parse_script_a("testPropGet;"); - CHECK_CALLED(global_propget_d); - CHECK_CALLED(global_propget_i); - - SET_EXPECT(global_propput_d); - SET_EXPECT(global_propput_i); - parse_script_a("testPropPut = 1;"); - CHECK_CALLED(global_propput_d); - CHECK_CALLED(global_propput_i); - - SET_EXPECT(global_success_d); - SET_EXPECT(global_success_i); - parse_script_a("reportSuccess();"); - CHECK_CALLED(global_success_d); - CHECK_CALLED(global_success_i); - - SET_EXPECT(testobj_delete); - parse_script_a("delete testObj.deleteTest;"); - CHECK_CALLED(testobj_delete); - - parse_script_a("ok(typeof(test) === 'object', \"typeof(test) != 'object'\");"); - - parse_script_a("function reportSuccess() {}; reportSuccess();"); - - SET_EXPECT(global_propget_d); - parse_script_a("var testPropGet"); - CHECK_CALLED(global_propget_d); - - SET_EXPECT(global_notexists_d); - parse_script_a("var notExists; notExists = 1;"); - CHECK_CALLED(global_notexists_d); - - parse_script_a("function f() { var testPropGet; }"); - - parse_script_a("ok((testObj instanceof Object) === false, 'testObj is instance of Object');"); - - SET_EXPECT(testobj_prop_d); - parse_script_a("ok(('prop' in testObj) === true, 'prop is not in testObj');"); - CHECK_CALLED(testobj_prop_d); - - SET_EXPECT(testobj_noprop_d); - parse_script_a("ok(('noprop' in testObj) === false, 'noprop is in testObj');"); - CHECK_CALLED(testobj_noprop_d); - - SET_EXPECT(testobj_value); - parse_script_a("ok(String(testObj) === '1', 'wrong testObj value');"); - CHECK_CALLED(testobj_value); - - SET_EXPECT(testobj_value); - parse_script_a("ok(String.prototype.concat.call(testObj, ' OK') === '1 OK', 'wrong concat result');"); - CHECK_CALLED(testobj_value); - - SET_EXPECT(global_propget_d); - SET_EXPECT(global_propget_i); - parse_script_a("this.testPropGet;"); - CHECK_CALLED(global_propget_d); - CHECK_CALLED(global_propget_i); - - SET_EXPECT(global_propget_d); - SET_EXPECT(global_propget_i); - parse_script_a("(function () { this.testPropGet; })();"); - CHECK_CALLED(global_propget_d); - CHECK_CALLED(global_propget_i); - - parse_script_a("testThis(this);"); - parse_script_a("(function () { testThis(this); })();"); - - run_from_res("lang.js"); - run_from_res("api.js"); - run_from_res("regexp.js"); - - test_isvisible(FALSE); - test_isvisible(TRUE); - - parse_script_af(0, "test.testThis2(this);"); - parse_script_af(0, "(function () { test.testThis2(this); })();"); - - hres = parse_htmlscript_a(""); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); - hres = parse_htmlscript_a("\n"); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); - hres = parse_htmlscript_a("\n"); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); - hres = parse_htmlscript_a("var a=1;\nif(a-->0) a=5;\n"); - ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); - hres = parse_htmlscript_a("var a=1;\nif(a\n-->0) a=5;\n"); - ok(hres != S_OK, "ParseScriptText have not failed\n"); -} - -static BOOL check_jscript(void) -{ - BSTR str; - HRESULT hres; - - str = a2bstr("if(!('localeCompare' in String.prototype)) throw 1;"); - hres = parse_script(0, str); - SysFreeString(str); - - return hres == S_OK; -} - -START_TEST(run) -{ - int argc; - char **argv; - - argc = winetest_get_mainargs(&argv); - - CoInitialize(NULL); - - if(!check_jscript()) { - win_skip("Broken engine, probably too old\n"); - }else if(argc > 2) { - run_from_file(argv[2]); - }else { - trace("invoke version 0\n"); - invoke_version = 0; - run_tests(); - - trace("invoke version 2\n"); - invoke_version = 2; - run_tests(); - } - - CoUninitialize(); -} diff --git a/rostests/winetests/jscript/testlist.c b/rostests/winetests/jscript/testlist.c deleted file mode 100644 index 64bc3b8ad2a..00000000000 --- a/rostests/winetests/jscript/testlist.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_activex(void); -extern void func_jscript(void); -extern void func_run(void); - -const struct test winetest_testlist[] = -{ - { "activex", func_activex }, - { "jscript", func_jscript }, - { "run", func_run }, - { 0, 0 } -}; diff --git a/rostests/winetests/kernel32/CMakeLists.txt b/rostests/winetests/kernel32/CMakeLists.txt deleted file mode 100644 index ef98fc94b9c..00000000000 --- a/rostests/winetests/kernel32/CMakeLists.txt +++ /dev/null @@ -1,57 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__) - -remove_definitions(-DWINVER=0x502 -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x502) - -set_rc_compiler() - -list(APPEND SOURCE - actctx.c - alloc.c - atom.c - change.c - codepage.c - comm.c - console.c - debugger.c - directory.c - drive.c - environ.c - fiber.c - file.c - format_msg.c - #generated.c - heap.c - interlck.c - loader.c - locale.c - mailslot.c - module.c - path.c - pipe.c - process.c - profile.c - resource.c - sync.c - thread.c - time.c - timer.c - toolhelp.c - version.c - virtual.c - volume.c - dosdev.c - testlist.c - resource.rc) - -add_executable(kernel32_winetest ${SOURCE}) -target_link_libraries(kernel32_winetest wine) -set_module_type(kernel32_winetest win32cui) -add_importlibs(kernel32_winetest user32 advapi32 msvcrt kernel32 ntdll) -if(NOT MSVC) - add_target_compile_flags(kernel32_winetest "-Wno-format") - allow_warnings(kernel32_winetest) -endif() - -add_cd_file(TARGET kernel32_winetest DESTINATION reactos/bin FOR all) \ No newline at end of file diff --git a/rostests/winetests/kernel32/actctx.c b/rostests/winetests/kernel32/actctx.c deleted file mode 100644 index b7f30109786..00000000000 --- a/rostests/winetests/kernel32/actctx.c +++ /dev/null @@ -1,1241 +0,0 @@ -/* - * Copyright 2007 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 "wine/test.h" -#include -#include -#include -#include -#include -#include - -static BOOL (WINAPI *pActivateActCtx)(HANDLE,ULONG_PTR*); -static HANDLE (WINAPI *pCreateActCtxW)(PCACTCTXW); -static BOOL (WINAPI *pDeactivateActCtx)(DWORD,ULONG_PTR); -static BOOL (WINAPI *pFindActCtxSectionStringW)(DWORD,const GUID *,ULONG,LPCWSTR,PACTCTX_SECTION_KEYED_DATA); -static BOOL (WINAPI *pGetCurrentActCtx)(HANDLE *); -static BOOL (WINAPI *pIsDebuggerPresent)(void); -static BOOL (WINAPI *pQueryActCtxW)(DWORD,HANDLE,PVOID,ULONG,PVOID,SIZE_T,SIZE_T*); -static VOID (WINAPI *pReleaseActCtx)(HANDLE); - -static const char* strw(LPCWSTR x) -{ - static char buffer[1024]; - char* p = buffer; - - if (!x) return "(nil)"; - else while ((*p++ = *x++)); - return buffer; -} - -#ifdef __i386__ -#define ARCH "x86" -#elif defined __x86_64__ -#define ARCH "amd64" -#else -#define ARCH "none" -#endif - -static const char manifest1[] = -"" -"" -""; - -static const char manifest2[] = -"" -"" -"" -"" -"" -"" -"" -"" -"" -""; - -static const char manifest3[] = -"" -"" -"" -"wndClass" -"" -""; - -static const char manifest4[] = -"" -"" -"" -"" -"" -"" -"" -"" -"" -""; - -static const char testdep_manifest1[] = -"" -"" -""; - -static const char testdep_manifest2[] = -"" -"" -"" -"" -""; - -static const char testdep_manifest3[] = -" " -"" -"" -"" -"wndClass" -"wndClass2" -"" -""; - -static const char wrong_manifest1[] = -"" -"" -""; - -static const char wrong_manifest2[] = -"" -"" -""; - -static const char wrong_manifest3[] = -"" -"" -""; - -static const char wrong_manifest4[] = -"" -"" -"" -""; - -static const char wrong_manifest5[] = -"" -"" -"" -""; - -static const char wrong_manifest6[] = -"" -"" -""; - -static const char wrong_manifest7[] = -"" -"" -"" -""; - -static const char wrong_manifest8[] = -"" -"" -"" -""; - -static const char wrong_depmanifest1[] = -"" -"" -""; - -static const WCHAR testlib_dll[] = - {'t','e','s','t','l','i','b','.','d','l','l',0}; -static const WCHAR testlib2_dll[] = - {'t','e','s','t','l','i','b','2','.','d','l','l',0}; -static const WCHAR wndClassW[] = - {'w','n','d','C','l','a','s','s',0}; -static const WCHAR wndClass2W[] = - {'w','n','d','C','l','a','s','s','2',0}; -static const WCHAR acr_manifest[] = - {'a','c','r','.','m','a','n','i','f','e','s','t',0}; - -static WCHAR app_dir[MAX_PATH], exe_path[MAX_PATH], work_dir[MAX_PATH], work_dir_subdir[MAX_PATH]; -static WCHAR app_manifest_path[MAX_PATH], manifest_path[MAX_PATH], depmanifest_path[MAX_PATH]; - -static int strcmp_aw(LPCWSTR strw, const char *stra) -{ - WCHAR buf[1024]; - - if (!stra) return 1; - MultiByteToWideChar(CP_ACP, 0, stra, -1, buf, sizeof(buf)/sizeof(WCHAR)); - return lstrcmpW(strw, buf); -} - -static DWORD strlen_aw(const char *str) -{ - return MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0) - 1; -} - -static BOOL create_manifest_file(const char *filename, const char *manifest, int manifest_len, - const char *depfile, const char *depmanifest) -{ - DWORD size; - HANDLE file; - WCHAR path[MAX_PATH]; - - MultiByteToWideChar( CP_ACP, 0, filename, -1, path, MAX_PATH ); - GetFullPathNameW(path, sizeof(manifest_path)/sizeof(WCHAR), manifest_path, NULL); - - if (manifest_len == -1) - manifest_len = strlen(manifest); - - file = CreateFileW(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, NULL); - ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %u\n", GetLastError()); - if(file == INVALID_HANDLE_VALUE) - return FALSE; - WriteFile(file, manifest, manifest_len, &size, NULL); - CloseHandle(file); - - if (depmanifest) - { - MultiByteToWideChar( CP_ACP, 0, depfile, -1, path, MAX_PATH ); - GetFullPathNameW(path, sizeof(depmanifest_path)/sizeof(WCHAR), depmanifest_path, NULL); - file = CreateFileW(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, NULL); - ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %u\n", GetLastError()); - if(file == INVALID_HANDLE_VALUE) - return FALSE; - WriteFile(file, depmanifest, strlen(depmanifest), &size, NULL); - CloseHandle(file); - } - return TRUE; -} - -static BOOL create_wide_manifest(const char *filename, const char *manifest, BOOL fBOM, BOOL fReverse) -{ - WCHAR *wmanifest = HeapAlloc(GetProcessHeap(), 0, (strlen(manifest)+2) * sizeof(WCHAR)); - BOOL ret; - int offset = (fBOM ? 0 : 1); - - MultiByteToWideChar(CP_ACP, 0, manifest, -1, &wmanifest[1], (strlen(manifest)+1)); - wmanifest[0] = 0xfeff; - if (fReverse) - { - size_t i; - for (i = 0; i < strlen(manifest)+1; i++) - wmanifest[i] = (wmanifest[i] << 8) | ((wmanifest[i] >> 8) & 0xff); - } - ret = create_manifest_file(filename, (char *)&wmanifest[offset], (strlen(manifest)+1-offset) * sizeof(WCHAR), NULL, NULL); - HeapFree(GetProcessHeap(), 0, wmanifest); - return ret; -} - -typedef struct { - ULONG format_version; - ULONG assembly_cnt_min; - ULONG assembly_cnt_max; - ULONG root_manifest_type; - LPWSTR root_manifest_path; - ULONG root_config_type; - ULONG app_dir_type; - LPCWSTR app_dir; -} detailed_info_t; - -static const detailed_info_t detailed_info0 = { - 0, 0, 0, 0, NULL, 0, 0, NULL -}; - -static const detailed_info_t detailed_info1 = { - 1, 1, 1, ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE, manifest_path, - ACTIVATION_CONTEXT_PATH_TYPE_NONE, ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE, - work_dir, -}; - -static const detailed_info_t detailed_info1_child = { - 1, 1, 1, ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE, app_manifest_path, - ACTIVATION_CONTEXT_PATH_TYPE_NONE, ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE, - app_dir, -}; - -/* On Vista+, there's an extra assembly for Microsoft.Windows.Common-Controls.Resources */ -static const detailed_info_t detailed_info2 = { - 1, 2, 3, ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE, manifest_path, - ACTIVATION_CONTEXT_PATH_TYPE_NONE, ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE, - work_dir, -}; - -static void test_detailed_info(HANDLE handle, const detailed_info_t *exinfo, int line) -{ - ACTIVATION_CONTEXT_DETAILED_INFORMATION detailed_info_tmp, *detailed_info; - SIZE_T size, exsize, retsize; - BOOL b; - - exsize = sizeof(ACTIVATION_CONTEXT_DETAILED_INFORMATION) - + (exinfo->root_manifest_path ? (lstrlenW(exinfo->root_manifest_path)+1)*sizeof(WCHAR):0) - + (exinfo->app_dir ? (lstrlenW(exinfo->app_dir)+1)*sizeof(WCHAR) : 0); - - if(exsize != sizeof(ACTIVATION_CONTEXT_DETAILED_INFORMATION)) { - size = 0xdeadbeef; - b = pQueryActCtxW(0, handle, NULL, - ActivationContextDetailedInformation, &detailed_info_tmp, - sizeof(detailed_info_tmp), &size); - ok_(__FILE__, line)(!b, "QueryActCtx succeeded\n"); - ok_(__FILE__, line)(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() = %u\n", GetLastError()); - ok_(__FILE__, line)(size == exsize, "size=%ld, expected %ld\n", size, exsize); - }else { - size = sizeof(ACTIVATION_CONTEXT_DETAILED_INFORMATION); - } - - detailed_info = HeapAlloc(GetProcessHeap(), 0, size); - memset(detailed_info, 0xfe, size); - b = pQueryActCtxW(0, handle, NULL, - ActivationContextDetailedInformation, detailed_info, - size, &retsize); - ok_(__FILE__, line)(b, "QueryActCtx failed: %u\n", GetLastError()); - ok_(__FILE__, line)(retsize == exsize, "size=%ld, expected %ld\n", retsize, exsize); - - ok_(__FILE__, line)(detailed_info->dwFlags == 0, "detailed_info->dwFlags=%x\n", detailed_info->dwFlags); - ok_(__FILE__, line)(detailed_info->ulFormatVersion == exinfo->format_version, - "detailed_info->ulFormatVersion=%u, expected %u\n", detailed_info->ulFormatVersion, - exinfo->format_version); - ok_(__FILE__, line)(exinfo->assembly_cnt_min <= detailed_info->ulAssemblyCount && - detailed_info->ulAssemblyCount <= exinfo->assembly_cnt_max, - "detailed_info->ulAssemblyCount=%u, expected between %u and %u\n", detailed_info->ulAssemblyCount, - exinfo->assembly_cnt_min, exinfo->assembly_cnt_max); - ok_(__FILE__, line)(detailed_info->ulRootManifestPathType == exinfo->root_manifest_type, - "detailed_info->ulRootManifestPathType=%u, expected %u\n", - detailed_info->ulRootManifestPathType, exinfo->root_manifest_type); - ok_(__FILE__, line)(detailed_info->ulRootManifestPathChars == - (exinfo->root_manifest_path ? lstrlenW(exinfo->root_manifest_path) : 0), - "detailed_info->ulRootManifestPathChars=%u, expected %u\n", - detailed_info->ulRootManifestPathChars, - exinfo->root_manifest_path ?lstrlenW(exinfo->root_manifest_path) : 0); - ok_(__FILE__, line)(detailed_info->ulRootConfigurationPathType == exinfo->root_config_type, - "detailed_info->ulRootConfigurationPathType=%u, expected %u\n", - detailed_info->ulRootConfigurationPathType, exinfo->root_config_type); - ok_(__FILE__, line)(detailed_info->ulRootConfigurationPathChars == 0, - "detailed_info->ulRootConfigurationPathChars=%d\n", detailed_info->ulRootConfigurationPathChars); - ok_(__FILE__, line)(detailed_info->ulAppDirPathType == exinfo->app_dir_type, - "detailed_info->ulAppDirPathType=%u, expected %u\n", detailed_info->ulAppDirPathType, - exinfo->app_dir_type); - ok_(__FILE__, line)(detailed_info->ulAppDirPathChars == (exinfo->app_dir ? lstrlenW(exinfo->app_dir) : 0), - "detailed_info->ulAppDirPathChars=%u, expected %u\n", - detailed_info->ulAppDirPathChars, exinfo->app_dir ? lstrlenW(exinfo->app_dir) : 0); - if(exinfo->root_manifest_path) { - ok_(__FILE__, line)(detailed_info->lpRootManifestPath != NULL, "detailed_info->lpRootManifestPath == NULL\n"); - if(detailed_info->lpRootManifestPath) - ok_(__FILE__, line)(!lstrcmpiW(detailed_info->lpRootManifestPath, exinfo->root_manifest_path), - "unexpected detailed_info->lpRootManifestPath\n"); - }else { - ok_(__FILE__, line)(detailed_info->lpRootManifestPath == NULL, "detailed_info->lpRootManifestPath != NULL\n"); - } - ok_(__FILE__, line)(detailed_info->lpRootConfigurationPath == NULL, - "detailed_info->lpRootConfigurationPath=%p\n", detailed_info->lpRootConfigurationPath); - if(exinfo->app_dir) { - ok_(__FILE__, line)(detailed_info->lpAppDirPath != NULL, "detailed_info->lpAppDirPath == NULL\n"); - if(detailed_info->lpAppDirPath) - ok_(__FILE__, line)(!lstrcmpiW(exinfo->app_dir, detailed_info->lpAppDirPath), - "unexpected detailed_info->lpAppDirPath\n%s\n",strw(detailed_info->lpAppDirPath)); - }else { - ok_(__FILE__, line)(detailed_info->lpAppDirPath == NULL, "detailed_info->lpAppDirPath != NULL\n"); - } - - HeapFree(GetProcessHeap(), 0, detailed_info); -} - -typedef struct { - ULONG flags; -/* ULONG manifest_path_type; FIXME */ - LPCWSTR manifest_path; - LPCSTR encoded_assembly_id; - BOOL has_assembly_dir; -} info_in_assembly; - -static const info_in_assembly manifest1_info = { - 1, manifest_path, - "Wine.Test,type=\"win32\",version=\"1.0.0.0\"", - FALSE -}; - -static const info_in_assembly manifest1_child_info = { - 1, app_manifest_path, - "Wine.Test,type=\"win32\",version=\"1.0.0.0\"", - FALSE -}; - -static const info_in_assembly manifest2_info = { - 1, manifest_path, - "Wine.Test,type=\"win32\",version=\"1.2.3.4\"", - FALSE -}; - -static const info_in_assembly manifest3_info = { - 1, manifest_path, - "Wine.Test,publicKeyToken=\"6595b6414666f1df\",type=\"win32\",version=\"1.2.3.4\"", - FALSE -}; - -static const info_in_assembly manifest4_info = { - 1, manifest_path, - "Wine.Test,type=\"win32\",version=\"1.2.3.4\"", - FALSE -}; - -static const info_in_assembly depmanifest1_info = { - 0x10, depmanifest_path, - "testdep,processorArchitecture=\"" ARCH "\"," - "type=\"win32\",version=\"6.5.4.3\"", - TRUE -}; - -static const info_in_assembly depmanifest2_info = { - 0x10, depmanifest_path, - "testdep,processorArchitecture=\"" ARCH "\"," - "type=\"win32\",version=\"6.5.4.3\"", - TRUE -}; - -static const info_in_assembly depmanifest3_info = { - 0x10, depmanifest_path, - "testdep,processorArchitecture=\"" ARCH "\",type=\"win32\",version=\"6.5.4.3\"", - TRUE -}; - -static const info_in_assembly manifest_comctrl_info = { - 0, NULL, NULL, TRUE /* These values may differ between Windows installations */ -}; - -static void test_info_in_assembly(HANDLE handle, DWORD id, const info_in_assembly *exinfo, int line) -{ - ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION *info, info_tmp; - SIZE_T size, exsize; - ULONG len; - BOOL b; - - exsize = sizeof(ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION); - if (exinfo->manifest_path) exsize += (lstrlenW(exinfo->manifest_path)+1) * sizeof(WCHAR); - if (exinfo->encoded_assembly_id) exsize += (strlen_aw(exinfo->encoded_assembly_id) + 1) * sizeof(WCHAR); - - size = 0xdeadbeef; - b = pQueryActCtxW(0, handle, &id, - AssemblyDetailedInformationInActivationContext, &info_tmp, - sizeof(info_tmp), &size); - ok_(__FILE__, line)(!b, "QueryActCtx succeeded\n"); - ok_(__FILE__, line)(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() = %u\n", GetLastError()); - - ok_(__FILE__, line)(size >= exsize, "size=%lu, expected %lu\n", size, exsize); - - if (size == 0xdeadbeef) - { - skip("bad size\n"); - return; - } - - info = HeapAlloc(GetProcessHeap(), 0, size); - memset(info, 0xfe, size); - - size = 0xdeadbeef; - b = pQueryActCtxW(0, handle, &id, - AssemblyDetailedInformationInActivationContext, info, size, &size); - ok_(__FILE__, line)(b, "QueryActCtx failed: %u\n", GetLastError()); - if (!exinfo->manifest_path) - exsize += info->ulManifestPathLength + sizeof(WCHAR); - if (!exinfo->encoded_assembly_id) - exsize += info->ulEncodedAssemblyIdentityLength + sizeof(WCHAR); - if (exinfo->has_assembly_dir) - exsize += info->ulAssemblyDirectoryNameLength + sizeof(WCHAR); - ok_(__FILE__, line)(size == exsize, "size=%lu, expected %lu\n", size, exsize); - - if (0) /* FIXME: flags meaning unknown */ - { - ok_(__FILE__, line)((info->ulFlags) == exinfo->flags, "info->ulFlags = %x, expected %x\n", - info->ulFlags, exinfo->flags); - } - if(exinfo->encoded_assembly_id) { - len = strlen_aw(exinfo->encoded_assembly_id)*sizeof(WCHAR); - ok_(__FILE__, line)(info->ulEncodedAssemblyIdentityLength == len, - "info->ulEncodedAssemblyIdentityLength = %u, expected %u\n", - info->ulEncodedAssemblyIdentityLength, len); - } else { - ok_(__FILE__, line)(info->ulEncodedAssemblyIdentityLength != 0, - "info->ulEncodedAssemblyIdentityLength == 0\n"); - } - ok_(__FILE__, line)(info->ulManifestPathType == ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE, - "info->ulManifestPathType = %x\n", info->ulManifestPathType); - if(exinfo->manifest_path) { - len = lstrlenW(exinfo->manifest_path)*sizeof(WCHAR); - ok_(__FILE__, line)(info->ulManifestPathLength == len, "info->ulManifestPathLength = %u, expected %u\n", - info->ulManifestPathLength, len); - } else { - ok_(__FILE__, line)(info->ulManifestPathLength != 0, "info->ulManifestPathLength == 0\n"); - } - - ok_(__FILE__, line)(info->ulPolicyPathType == ACTIVATION_CONTEXT_PATH_TYPE_NONE, - "info->ulPolicyPathType = %x\n", info->ulPolicyPathType); - ok_(__FILE__, line)(info->ulPolicyPathLength == 0, - "info->ulPolicyPathLength = %u, expected 0\n", info->ulPolicyPathLength); - ok_(__FILE__, line)(info->ulMetadataSatelliteRosterIndex == 0, "info->ulMetadataSatelliteRosterIndex = %x\n", - info->ulMetadataSatelliteRosterIndex); - ok_(__FILE__, line)(info->ulManifestVersionMajor == 1,"info->ulManifestVersionMajor = %x\n", - info->ulManifestVersionMajor); - ok_(__FILE__, line)(info->ulManifestVersionMinor == 0, "info->ulManifestVersionMinor = %x\n", - info->ulManifestVersionMinor); - ok_(__FILE__, line)(info->ulPolicyVersionMajor == 0, "info->ulPolicyVersionMajor = %x\n", - info->ulPolicyVersionMajor); - ok_(__FILE__, line)(info->ulPolicyVersionMinor == 0, "info->ulPolicyVersionMinor = %x\n", - info->ulPolicyVersionMinor); - if(exinfo->has_assembly_dir) - ok_(__FILE__, line)(info->ulAssemblyDirectoryNameLength != 0, - "info->ulAssemblyDirectoryNameLength == 0\n"); - else - ok_(__FILE__, line)(info->ulAssemblyDirectoryNameLength == 0, - "info->ulAssemblyDirectoryNameLength != 0\n"); - - ok_(__FILE__, line)(info->lpAssemblyEncodedAssemblyIdentity != NULL, - "info->lpAssemblyEncodedAssemblyIdentity == NULL\n"); - if(info->lpAssemblyEncodedAssemblyIdentity && exinfo->encoded_assembly_id) { - ok_(__FILE__, line)(!strcmp_aw(info->lpAssemblyEncodedAssemblyIdentity, exinfo->encoded_assembly_id), - "unexpected info->lpAssemblyEncodedAssemblyIdentity %s / %s\n", - strw(info->lpAssemblyEncodedAssemblyIdentity), exinfo->encoded_assembly_id); - } - if(exinfo->manifest_path) { - ok_(__FILE__, line)(info->lpAssemblyManifestPath != NULL, "info->lpAssemblyManifestPath == NULL\n"); - if(info->lpAssemblyManifestPath) - ok_(__FILE__, line)(!lstrcmpiW(info->lpAssemblyManifestPath, exinfo->manifest_path), - "unexpected info->lpAssemblyManifestPath\n"); - }else { - ok_(__FILE__, line)(info->lpAssemblyManifestPath != NULL, "info->lpAssemblyManifestPath == NULL\n"); - } - - ok_(__FILE__, line)(info->lpAssemblyPolicyPath == NULL, "info->lpAssemblyPolicyPath != NULL\n"); - if(info->lpAssemblyPolicyPath) - ok_(__FILE__, line)(*(WORD*)info->lpAssemblyPolicyPath == 0, "info->lpAssemblyPolicyPath is not empty\n"); - if(exinfo->has_assembly_dir) - ok_(__FILE__, line)(info->lpAssemblyDirectoryName != NULL, "info->lpAssemblyDirectoryName == NULL\n"); - else - ok_(__FILE__, line)(info->lpAssemblyDirectoryName == NULL, "info->lpAssemblyDirectoryName = %s\n", - strw(info->lpAssemblyDirectoryName)); - HeapFree(GetProcessHeap(), 0, info); -} - -static void test_file_info(HANDLE handle, ULONG assid, ULONG fileid, LPCWSTR filename, int line) -{ - ASSEMBLY_FILE_DETAILED_INFORMATION *info, info_tmp; - ACTIVATION_CONTEXT_QUERY_INDEX index = {assid, fileid}; - SIZE_T size, exsize; - BOOL b; - - exsize = sizeof(ASSEMBLY_FILE_DETAILED_INFORMATION) - +(lstrlenW(filename)+1)*sizeof(WCHAR); - - size = 0xdeadbeef; - b = pQueryActCtxW(0, handle, &index, - FileInformationInAssemblyOfAssemblyInActivationContext, &info_tmp, - sizeof(info_tmp), &size); - ok_(__FILE__, line)(!b, "QueryActCtx succeeded\n"); - ok_(__FILE__, line)(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() = %u\n", GetLastError()); - ok_(__FILE__, line)(size == exsize, "size=%lu, expected %lu\n", size, exsize); - - if(size == 0xdeadbeef) - { - skip("bad size\n"); - return; - } - - info = HeapAlloc(GetProcessHeap(), 0, size); - memset(info, 0xfe, size); - - b = pQueryActCtxW(0, handle, &index, - FileInformationInAssemblyOfAssemblyInActivationContext, info, size, &size); - ok_(__FILE__, line)(b, "QueryActCtx failed: %u\n", GetLastError()); - ok_(__FILE__, line)(!size, "size=%lu, expected 0\n", size); - - ok_(__FILE__, line)(info->ulFlags == 2, "info->ulFlags=%x, expected 2\n", info->ulFlags); - ok_(__FILE__, line)(info->ulFilenameLength == lstrlenW(filename)*sizeof(WCHAR), - "info->ulFilenameLength=%u, expected %u*sizeof(WCHAR)\n", - info->ulFilenameLength, lstrlenW(filename)); - ok_(__FILE__, line)(info->ulPathLength == 0, "info->ulPathLength=%u\n", info->ulPathLength); - ok_(__FILE__, line)(info->lpFileName != NULL, "info->lpFileName == NULL\n"); - if(info->lpFileName) - ok_(__FILE__, line)(!lstrcmpiW(info->lpFileName, filename), "unexpected info->lpFileName\n"); - ok_(__FILE__, line)(info->lpFilePath == NULL, "info->lpFilePath != NULL\n"); - HeapFree(GetProcessHeap(), 0, info); -} - -static HANDLE test_create(const char *file, const char *manifest) -{ - ACTCTXW actctx; - HANDLE handle; - WCHAR path[MAX_PATH]; - - MultiByteToWideChar( CP_ACP, 0, file, -1, path, MAX_PATH ); - memset(&actctx, 0, sizeof(ACTCTXW)); - actctx.cbSize = sizeof(ACTCTXW); - actctx.lpSource = path; - - handle = pCreateActCtxW(&actctx); - ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError()); - - ok(actctx.cbSize == sizeof(actctx), "actctx.cbSize=%d\n", actctx.cbSize); - ok(actctx.dwFlags == 0, "actctx.=%d\n", actctx.dwFlags); - ok(actctx.lpSource == path, "actctx.lpSource=%p\n", actctx.lpSource); - ok(actctx.wProcessorArchitecture == 0, - "actctx.wProcessorArchitecture=%d\n", actctx.wProcessorArchitecture); - ok(actctx.wLangId == 0, "actctx.wLangId=%d\n", actctx.wLangId); - ok(actctx.lpAssemblyDirectory == NULL, - "actctx.lpAssemblyDirectory=%p\n", actctx.lpAssemblyDirectory); - ok(actctx.lpResourceName == NULL, "actctx.lpResourceName=%p\n", actctx.lpResourceName); - ok(actctx.lpApplicationName == NULL, "actctx.lpApplocationName=%p\n", - actctx.lpApplicationName); - ok(actctx.hModule == NULL, "actctx.hModule=%p\n", actctx.hModule); - - return handle; -} - -static void test_create_and_fail(const char *manifest, const char *depmanifest, int todo) -{ - ACTCTXW actctx; - HANDLE handle; - WCHAR path[MAX_PATH]; - - MultiByteToWideChar( CP_ACP, 0, "bad.manifest", -1, path, MAX_PATH ); - memset(&actctx, 0, sizeof(ACTCTXW)); - actctx.cbSize = sizeof(ACTCTXW); - actctx.lpSource = path; - - create_manifest_file("bad.manifest", manifest, -1, "testdep.manifest", depmanifest); - handle = pCreateActCtxW(&actctx); - if (todo) todo_wine - { - ok(handle == INVALID_HANDLE_VALUE, "handle != INVALID_HANDLE_VALUE\n"); - ok(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX, "GetLastError == %u\n", GetLastError()); - } - else - { - ok(handle == INVALID_HANDLE_VALUE, "handle != INVALID_HANDLE_VALUE\n"); - ok(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX, "GetLastError == %u\n", GetLastError()); - } - if (handle != INVALID_HANDLE_VALUE) pReleaseActCtx( handle ); - DeleteFileA("bad.manifest"); - DeleteFileA("testdep.manifest"); -} - -static void test_create_wide_and_fail(const char *manifest, BOOL fBOM) -{ - ACTCTXW actctx; - HANDLE handle; - WCHAR path[MAX_PATH]; - - MultiByteToWideChar( CP_ACP, 0, "bad.manifest", -1, path, MAX_PATH ); - memset(&actctx, 0, sizeof(ACTCTXW)); - actctx.cbSize = sizeof(ACTCTXW); - actctx.lpSource = path; - - create_wide_manifest("bad.manifest", manifest, fBOM, FALSE); - handle = pCreateActCtxW(&actctx); - ok(handle == INVALID_HANDLE_VALUE, "handle != INVALID_HANDLE_VALUE\n"); - ok(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX, "GetLastError == %u\n", GetLastError()); - - if (handle != INVALID_HANDLE_VALUE) pReleaseActCtx( handle ); - DeleteFileA("bad.manifest"); -} - -static void test_create_fail(void) -{ - ACTCTXW actctx; - HANDLE handle; - WCHAR path[MAX_PATH]; - - MultiByteToWideChar( CP_ACP, 0, "nonexistent.manifest", -1, path, MAX_PATH ); - memset(&actctx, 0, sizeof(ACTCTXW)); - actctx.cbSize = sizeof(ACTCTXW); - actctx.lpSource = path; - - handle = pCreateActCtxW(&actctx); - ok(handle == INVALID_HANDLE_VALUE, "handle != INVALID_HANDLE_VALUE\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "GetLastError == %u\n", GetLastError()); - - trace("wrong_manifest1\n"); - test_create_and_fail(wrong_manifest1, NULL, 0 ); - trace("wrong_manifest2\n"); - test_create_and_fail(wrong_manifest2, NULL, 0 ); - trace("wrong_manifest3\n"); - test_create_and_fail(wrong_manifest3, NULL, 1 ); - trace("wrong_manifest4\n"); - test_create_and_fail(wrong_manifest4, NULL, 1 ); - trace("wrong_manifest5\n"); - test_create_and_fail(wrong_manifest5, NULL, 0 ); - trace("wrong_manifest6\n"); - test_create_and_fail(wrong_manifest6, NULL, 0 ); - trace("wrong_manifest7\n"); - test_create_and_fail(wrong_manifest7, NULL, 1 ); - trace("wrong_manifest8\n"); - test_create_and_fail(wrong_manifest8, NULL, 0 ); - trace("UTF-16 manifest1 without BOM\n"); - test_create_wide_and_fail(manifest1, FALSE ); - trace("manifest2\n"); - test_create_and_fail(manifest2, NULL, 0 ); - trace("manifest2+depmanifest1\n"); - test_create_and_fail(manifest2, wrong_depmanifest1, 0 ); -} - -static void test_find_dll_redirection(HANDLE handle, LPCWSTR libname, ULONG exid, int line) -{ - ACTCTX_SECTION_KEYED_DATA data; - DWORD *p; - BOOL ret; - - memset(&data, 0xfe, sizeof(data)); - data.cbSize = sizeof(data); - - ret = pFindActCtxSectionStringW(0, NULL, - ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, - libname, &data); - ok_(__FILE__, line)(ret, "FindActCtxSectionStringW failed: %u\n", GetLastError()); - if(!ret) - { - skip("couldn't find %s\n",strw(libname)); - return; - } - - ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%u\n", data.cbSize); - ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%u\n", data.ulDataFormatVersion); - ok_(__FILE__, line)(data.lpData != NULL, "data.lpData == NULL\n"); - ok_(__FILE__, line)(data.ulLength == 20, "data.ulLength=%u\n", data.ulLength); - - p = data.lpData; - if(ret && p) todo_wine { - ok_(__FILE__, line)(p[0] == 20 && p[1] == 2 && p[2] == 0 && p[3] == 0 && p[4] == 0, - "wrong data %u,%u,%u,%u,%u\n",p[0], p[1], p[2], p[3], p[4]); - } - - ok_(__FILE__, line)(data.lpSectionGlobalData == NULL, "data.lpSectionGlobalData != NULL\n"); - ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%u\n", - data.ulSectionGlobalDataLength); - ok_(__FILE__, line)(data.lpSectionBase != NULL, "data.lpSectionBase == NULL\n"); - /* ok_(__FILE__, line)(data.ulSectionTotalLength == ??, "data.ulSectionTotalLength=%u\n", - data.ulSectionTotalLength); */ - ok_(__FILE__, line)(data.hActCtx == NULL, "data.hActCtx=%p\n", data.hActCtx); - ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%u, expected %u\n", - data.ulAssemblyRosterIndex, exid); - - memset(&data, 0xfe, sizeof(data)); - data.cbSize = sizeof(data); - - ret = pFindActCtxSectionStringW(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX, NULL, - ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, - libname, &data); - ok_(__FILE__, line)(ret, "FindActCtxSectionStringW failed: %u\n", GetLastError()); - if(!ret) - { - skip("couldn't find\n"); - return; - } - - ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%u\n", data.cbSize); - ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%u\n", data.ulDataFormatVersion); - ok_(__FILE__, line)(data.lpData != NULL, "data.lpData == NULL\n"); - ok_(__FILE__, line)(data.ulLength == 20, "data.ulLength=%u\n", data.ulLength); - ok_(__FILE__, line)(data.lpSectionGlobalData == NULL, "data.lpSectionGlobalData != NULL\n"); - ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%u\n", - data.ulSectionGlobalDataLength); - ok_(__FILE__, line)(data.lpSectionBase != NULL, "data.lpSectionBase == NULL\n"); - /* ok_(__FILE__, line)(data.ulSectionTotalLength == ?? , "data.ulSectionTotalLength=%u\n", - data.ulSectionTotalLength); */ - ok_(__FILE__, line)(data.hActCtx == handle, "data.hActCtx=%p\n", data.hActCtx); - ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%u, expected %u\n", - data.ulAssemblyRosterIndex, exid); - - pReleaseActCtx(handle); -} - -static void test_find_window_class(HANDLE handle, LPCWSTR clsname, ULONG exid, int line) -{ - ACTCTX_SECTION_KEYED_DATA data; - BOOL ret; - - memset(&data, 0xfe, sizeof(data)); - data.cbSize = sizeof(data); - - ret = pFindActCtxSectionStringW(0, NULL, - ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, - clsname, &data); - ok_(__FILE__, line)(ret, "FindActCtxSectionStringW failed: %u\n", GetLastError()); - if(!ret) - { - skip("couldn't find\n"); - return; - } - - ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%u\n", data.cbSize); - ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%u\n", data.ulDataFormatVersion); - ok_(__FILE__, line)(data.lpData != NULL, "data.lpData == NULL\n"); - /* ok_(__FILE__, line)(data.ulLength == ??, "data.ulLength=%u\n", data.ulLength); */ - ok_(__FILE__, line)(data.lpSectionGlobalData == NULL, "data.lpSectionGlobalData != NULL\n"); - ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%u\n", - data.ulSectionGlobalDataLength); - ok_(__FILE__, line)(data.lpSectionBase != NULL, "data.lpSectionBase == NULL\n"); - /* ok_(__FILE__, line)(data.ulSectionTotalLength == 0, "data.ulSectionTotalLength=%u\n", - data.ulSectionTotalLength); FIXME */ - ok_(__FILE__, line)(data.hActCtx == NULL, "data.hActCtx=%p\n", data.hActCtx); - ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%u, expected %u\n", - data.ulAssemblyRosterIndex, exid); - - memset(&data, 0xfe, sizeof(data)); - data.cbSize = sizeof(data); - - ret = pFindActCtxSectionStringW(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX, NULL, - ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, - clsname, &data); - ok_(__FILE__, line)(ret, "FindActCtxSectionStringW failed: %u\n", GetLastError()); - if(!ret) - { - skip("couldn't find\n"); - return; - } - - ok_(__FILE__, line)(data.cbSize == sizeof(data), "data.cbSize=%u\n", data.cbSize); - ok_(__FILE__, line)(data.ulDataFormatVersion == 1, "data.ulDataFormatVersion=%u\n", data.ulDataFormatVersion); - ok_(__FILE__, line)(data.lpData != NULL, "data.lpData == NULL\n"); - /* ok_(__FILE__, line)(data.ulLength == ??, "data.ulLength=%u\n", data.ulLength); FIXME */ - ok_(__FILE__, line)(data.lpSectionGlobalData == NULL, "data.lpSectionGlobalData != NULL\n"); - ok_(__FILE__, line)(data.ulSectionGlobalDataLength == 0, "data.ulSectionGlobalDataLength=%u\n", - data.ulSectionGlobalDataLength); - ok_(__FILE__, line)(data.lpSectionBase != NULL, "data.lpSectionBase == NULL\n"); - /* ok_(__FILE__, line)(data.ulSectionTotalLength == 0, "data.ulSectionTotalLength=%u\n", - data.ulSectionTotalLength); FIXME */ - ok_(__FILE__, line)(data.hActCtx == handle, "data.hActCtx=%p\n", data.hActCtx); - ok_(__FILE__, line)(data.ulAssemblyRosterIndex == exid, "data.ulAssemblyRosterIndex=%u, expected %u\n", - data.ulAssemblyRosterIndex, exid); - - pReleaseActCtx(handle); -} - -static void test_find_string_fail(void) -{ - ACTCTX_SECTION_KEYED_DATA data = {sizeof(data)}; - BOOL ret; - - ret = pFindActCtxSectionStringW(0, NULL, 100, testlib_dll, &data); - ok(!ret, "FindActCtxSectionStringW succeeded\n"); - ok(GetLastError() == ERROR_SXS_SECTION_NOT_FOUND, "GetLastError()=%u\n", GetLastError()); - - ret = pFindActCtxSectionStringW(0, NULL, ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, - testlib2_dll, &data); - ok(!ret, "FindActCtxSectionStringW succeeded\n"); - ok(GetLastError() == ERROR_SXS_KEY_NOT_FOUND, "GetLastError()=%u\n", GetLastError()); - - ret = pFindActCtxSectionStringW(0, NULL, ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, - testlib_dll, NULL); - ok(!ret, "FindActCtxSectionStringW succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError()=%u\n", GetLastError()); - - ret = pFindActCtxSectionStringW(0, NULL, ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, - NULL, &data); - ok(!ret, "FindActCtxSectionStringW succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError()=%u\n", GetLastError()); - - data.cbSize = 0; - ret = pFindActCtxSectionStringW(0, NULL, ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, - testlib_dll, &data); - ok(!ret, "FindActCtxSectionStringW succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError()=%u\n", GetLastError()); - - data.cbSize = 35; - ret = pFindActCtxSectionStringW(0, NULL, ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, - testlib_dll, &data); - ok(!ret, "FindActCtxSectionStringW succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError()=%u\n", GetLastError()); -} - - -static void test_basic_info(HANDLE handle, int line) -{ - ACTIVATION_CONTEXT_BASIC_INFORMATION basic; - SIZE_T size; - BOOL b; - - b = pQueryActCtxW(QUERY_ACTCTX_FLAG_NO_ADDREF, handle, NULL, - ActivationContextBasicInformation, &basic, - sizeof(basic), &size); - - ok_(__FILE__, line) (b,"ActivationContextBasicInformation failed\n"); - ok_(__FILE__, line) (size == sizeof(ACTIVATION_CONTEXT_BASIC_INFORMATION),"size mismatch\n"); - ok_(__FILE__, line) (basic.dwFlags == 0, "unexpected flags %x\n",basic.dwFlags); - ok_(__FILE__, line) (basic.hActCtx == handle, "unexpected handle\n"); - - b = pQueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX | - QUERY_ACTCTX_FLAG_NO_ADDREF, handle, NULL, - ActivationContextBasicInformation, &basic, - sizeof(basic), &size); - if (handle) - { - ok_(__FILE__, line) (!b,"ActivationContextBasicInformation succeeded\n"); - ok_(__FILE__, line) (size == 0,"size mismatch\n"); - ok_(__FILE__, line) (GetLastError() == ERROR_INVALID_PARAMETER, "Wrong last error\n"); - ok_(__FILE__, line) (basic.dwFlags == 0, "unexpected flags %x\n",basic.dwFlags); - ok_(__FILE__, line) (basic.hActCtx == handle, "unexpected handle\n"); - } - else - { - ok_(__FILE__, line) (b,"ActivationContextBasicInformation failed\n"); - ok_(__FILE__, line) (size == sizeof(ACTIVATION_CONTEXT_BASIC_INFORMATION),"size mismatch\n"); - ok_(__FILE__, line) (basic.dwFlags == 0, "unexpected flags %x\n",basic.dwFlags); - ok_(__FILE__, line) (basic.hActCtx == handle, "unexpected handle\n"); - } -} - -static void test_actctx(void) -{ - ULONG_PTR cookie; - HANDLE handle; - BOOL b; - - test_create_fail(); - - trace("default actctx\n"); - - b = pGetCurrentActCtx(&handle); - ok(handle == NULL, "handle = %p, expected NULL\n", handle); - ok(b, "GetCurrentActCtx failed: %u\n", GetLastError()); - if(b) { - test_basic_info(handle, __LINE__); - test_detailed_info(handle, &detailed_info0, __LINE__); - pReleaseActCtx(handle); - } - - if(!create_manifest_file("test1.manifest", manifest1, -1, NULL, NULL)) { - skip("Could not create manifest file\n"); - return; - } - - trace("manifest1\n"); - - handle = test_create("test1.manifest", manifest1); - DeleteFileA("test1.manifest"); - if(handle != INVALID_HANDLE_VALUE) { - test_basic_info(handle, __LINE__); - test_detailed_info(handle, &detailed_info1, __LINE__); - test_info_in_assembly(handle, 1, &manifest1_info, __LINE__); - - if (pIsDebuggerPresent && !pIsDebuggerPresent()) - { - /* CloseHandle will generate an exception if a debugger is present */ - b = CloseHandle(handle); - ok(!b, "CloseHandle succeeded\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError() == %u\n", GetLastError()); - } - - pReleaseActCtx(handle); - } - - if(!create_manifest_file("test2.manifest", manifest2, -1, "testdep.manifest", testdep_manifest1)) { - skip("Could not create manifest file\n"); - return; - } - - trace("manifest2 depmanifest1\n"); - - handle = test_create("test2.manifest", manifest2); - DeleteFileA("test2.manifest"); - DeleteFileA("testdep.manifest"); - if(handle != INVALID_HANDLE_VALUE) { - test_basic_info(handle, __LINE__); - test_detailed_info(handle, &detailed_info2, __LINE__); - test_info_in_assembly(handle, 1, &manifest2_info, __LINE__); - test_info_in_assembly(handle, 2, &depmanifest1_info, __LINE__); - pReleaseActCtx(handle); - } - - if(!create_manifest_file("test2-2.manifest", manifest2, -1, "testdep.manifest", testdep_manifest2)) { - skip("Could not create manifest file\n"); - return; - } - - trace("manifest2 depmanifest2\n"); - - handle = test_create("test2-2.manifest", manifest2); - DeleteFileA("test2-2.manifest"); - DeleteFileA("testdep.manifest"); - if(handle != INVALID_HANDLE_VALUE) { - test_basic_info(handle, __LINE__); - test_detailed_info(handle, &detailed_info2, __LINE__); - test_info_in_assembly(handle, 1, &manifest2_info, __LINE__); - test_info_in_assembly(handle, 2, &depmanifest2_info, __LINE__); - test_file_info(handle, 1, 0, testlib_dll, __LINE__); - test_file_info(handle, 1, 1, testlib2_dll, __LINE__); - - b = pActivateActCtx(handle, &cookie); - ok(b, "ActivateActCtx failed: %u\n", GetLastError()); - test_find_dll_redirection(handle, testlib_dll, 2, __LINE__); - test_find_dll_redirection(handle, testlib2_dll, 2, __LINE__); - b = pDeactivateActCtx(0, cookie); - ok(b, "DeactivateActCtx failed: %u\n", GetLastError()); - - pReleaseActCtx(handle); - } - - trace("manifest2 depmanifest3\n"); - - if(!create_manifest_file("test2-3.manifest", manifest2, -1, "testdep.manifest", testdep_manifest3)) { - skip("Could not create manifest file\n"); - return; - } - - handle = test_create("test2-3.manifest", manifest2); - DeleteFileA("test2-3.manifest"); - DeleteFileA("testdep.manifest"); - if(handle != INVALID_HANDLE_VALUE) { - test_basic_info(handle, __LINE__); - test_detailed_info(handle, &detailed_info2, __LINE__); - test_info_in_assembly(handle, 1, &manifest2_info, __LINE__); - test_info_in_assembly(handle, 2, &depmanifest3_info, __LINE__); - test_file_info(handle, 1, 0, testlib_dll, __LINE__); - test_file_info(handle, 1, 1, testlib2_dll, __LINE__); - - b = pActivateActCtx(handle, &cookie); - ok(b, "ActivateActCtx failed: %u\n", GetLastError()); - test_find_dll_redirection(handle, testlib_dll, 2, __LINE__); - test_find_dll_redirection(handle, testlib2_dll, 2, __LINE__); - test_find_window_class(handle, wndClassW, 2, __LINE__); - test_find_window_class(handle, wndClass2W, 2, __LINE__); - b = pDeactivateActCtx(0, cookie); - ok(b, "DeactivateActCtx failed: %u\n", GetLastError()); - - pReleaseActCtx(handle); - } - - trace("manifest3\n"); - - if(!create_manifest_file("test3.manifest", manifest3, -1, NULL, NULL)) { - skip("Could not create manifest file\n"); - return; - } - - handle = test_create("test3.manifest", manifest3); - DeleteFileA("test3.manifest"); - if(handle != INVALID_HANDLE_VALUE) { - test_basic_info(handle, __LINE__); - test_detailed_info(handle, &detailed_info1, __LINE__); - test_info_in_assembly(handle, 1, &manifest3_info, __LINE__); - test_file_info(handle, 0, 0, testlib_dll, __LINE__); - - b = pActivateActCtx(handle, &cookie); - ok(b, "ActivateActCtx failed: %u\n", GetLastError()); - test_find_dll_redirection(handle, testlib_dll, 1, __LINE__); - test_find_dll_redirection(handle, testlib_dll, 1, __LINE__); - test_find_string_fail(); - b = pDeactivateActCtx(0, cookie); - ok(b, "DeactivateActCtx failed: %u\n", GetLastError()); - - pReleaseActCtx(handle); - } - - trace("manifest4\n"); - - if(!create_manifest_file("test4.manifest", manifest4, -1, NULL, NULL)) { - skip("Could not create manifest file\n"); - return; - } - - handle = test_create("test4.manifest", manifest4); - DeleteFileA("test4.manifest"); - DeleteFileA("testdep.manifest"); - if(handle != INVALID_HANDLE_VALUE) { - test_basic_info(handle, __LINE__); - test_detailed_info(handle, &detailed_info2, __LINE__); - test_info_in_assembly(handle, 1, &manifest4_info, __LINE__); - test_info_in_assembly(handle, 2, &manifest_comctrl_info, __LINE__); - pReleaseActCtx(handle); - } - - trace("manifest1 in subdir\n"); - - CreateDirectoryW(work_dir_subdir, NULL); - if (SetCurrentDirectoryW(work_dir_subdir)) - { - if(!create_manifest_file("..\\test1.manifest", manifest1, -1, NULL, NULL)) { - skip("Could not create manifest file\n"); - return; - } - handle = test_create("..\\test1.manifest", manifest1); - DeleteFileA("..\\test1.manifest"); - if(handle != INVALID_HANDLE_VALUE) { - test_basic_info(handle, __LINE__); - test_detailed_info(handle, &detailed_info1, __LINE__); - test_info_in_assembly(handle, 1, &manifest1_info, __LINE__); - pReleaseActCtx(handle); - } - SetCurrentDirectoryW(work_dir); - } - else - skip("Couldn't change directory\n"); - RemoveDirectoryW(work_dir_subdir); - - trace("UTF-16 manifest1, with BOM\n"); - if(!create_wide_manifest("test1.manifest", manifest1, TRUE, FALSE)) { - skip("Could not create manifest file\n"); - return; - } - - handle = test_create("test1.manifest", manifest1); - DeleteFileA("test1.manifest"); - if (handle != INVALID_HANDLE_VALUE) { - test_basic_info(handle, __LINE__); - test_detailed_info(handle, &detailed_info1, __LINE__); - test_info_in_assembly(handle, 1, &manifest1_info, __LINE__); - pReleaseActCtx(handle); - } - - trace("UTF-16 manifest1, reverse endian, with BOM\n"); - if(!create_wide_manifest("test1.manifest", manifest1, TRUE, TRUE)) { - skip("Could not create manifest file\n"); - return; - } - - handle = test_create("test1.manifest", manifest1); - DeleteFileA("test1.manifest"); - if (handle != INVALID_HANDLE_VALUE) { - test_basic_info(handle, __LINE__); - test_detailed_info(handle, &detailed_info1, __LINE__); - test_info_in_assembly(handle, 1, &manifest1_info, __LINE__); - pReleaseActCtx(handle); - } - -} - -static void test_app_manifest(void) -{ - HANDLE handle; - BOOL b; - - trace("child process manifest1\n"); - - b = pGetCurrentActCtx(&handle); - ok(handle == NULL, "handle != NULL\n"); - ok(b, "GetCurrentActCtx failed: %u\n", GetLastError()); - if(b) { - test_basic_info(handle, __LINE__); - test_detailed_info(handle, &detailed_info1_child, __LINE__); - test_info_in_assembly(handle, 1, &manifest1_child_info, __LINE__); - pReleaseActCtx(handle); - } -} - -static void run_child_process(void) -{ - char cmdline[MAX_PATH]; - char path[MAX_PATH]; - char **argv; - PROCESS_INFORMATION pi; - STARTUPINFO si = { 0 }; - HANDLE file; - FILETIME now; - BOOL ret; - - GetModuleFileNameA(NULL, path, MAX_PATH); - strcat(path, ".manifest"); - if(!create_manifest_file(path, manifest1, -1, NULL, NULL)) { - skip("Could not create manifest file\n"); - return; - } - - si.cb = sizeof(si); - winetest_get_mainargs( &argv ); - /* Vista+ seems to cache presence of .manifest files. Change last modified - date to defeat the cache */ - file = CreateFileA(argv[0], FILE_WRITE_ATTRIBUTES, FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, OPEN_EXISTING, 0, NULL); - if (file != INVALID_HANDLE_VALUE) { - GetSystemTimeAsFileTime(&now); - SetFileTime(file, NULL, NULL, &now); - CloseHandle(file); - } - sprintf(cmdline, "\"%s\" %s manifest1", argv[0], argv[1]); - ret = CreateProcess(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "Could not create process: %u\n", GetLastError()); - winetest_wait_child_process( pi.hProcess ); - CloseHandle(pi.hThread); - CloseHandle(pi.hProcess); - DeleteFileA(path); -} - -static void init_paths(void) -{ - LPWSTR ptr; - WCHAR last; - - static const WCHAR dot_manifest[] = {'.','M','a','n','i','f','e','s','t',0}; - static const WCHAR backslash[] = {'\\',0}; - static const WCHAR subdir[] = {'T','e','s','t','S','u','b','d','i','r','\\',0}; - - GetModuleFileNameW(NULL, exe_path, sizeof(exe_path)/sizeof(WCHAR)); - lstrcpyW(app_dir, exe_path); - for(ptr=app_dir+lstrlenW(app_dir); *ptr != '\\' && *ptr != '/'; ptr--); - ptr[1] = 0; - - GetCurrentDirectoryW(MAX_PATH, work_dir); - last = work_dir[lstrlenW(work_dir) - 1]; - if (last != '\\' && last != '/') - lstrcatW(work_dir, backslash); - lstrcpyW(work_dir_subdir, work_dir); - lstrcatW(work_dir_subdir, subdir); - - GetModuleFileNameW(NULL, app_manifest_path, sizeof(app_manifest_path)/sizeof(WCHAR)); - lstrcpyW(app_manifest_path+lstrlenW(app_manifest_path), dot_manifest); -} - -static BOOL init_funcs(void) -{ - HMODULE hKernel32 = GetModuleHandle("kernel32"); - -#define X(f) if (!(p##f = (void*)GetProcAddress(hKernel32, #f))) return FALSE; - X(ActivateActCtx); - X(CreateActCtxW); - X(DeactivateActCtx); - X(FindActCtxSectionStringW); - X(GetCurrentActCtx); - X(IsDebuggerPresent); - X(QueryActCtxW); - X(ReleaseActCtx); -#undef X - - return TRUE; -} - -START_TEST(actctx) -{ - int argc; - char **argv; - - argc = winetest_get_mainargs(&argv); - - if (!init_funcs()) - { - win_skip("Needed functions are not available\n"); - return; - } - init_paths(); - - if(argc > 2 && !strcmp(argv[2], "manifest1")) { - test_app_manifest(); - return; - } - - test_actctx(); - run_child_process(); -} diff --git a/rostests/winetests/kernel32/alloc.c b/rostests/winetests/kernel32/alloc.c deleted file mode 100755 index c1b2afc734d..00000000000 --- a/rostests/winetests/kernel32/alloc.c +++ /dev/null @@ -1,399 +0,0 @@ -/* - * Unit test suite for memory allocation functions. - * - * Copyright 2002 Geoffrey Hausheer - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winerror.h" - - - /* The following functions don't have tests, because either I don't know how - to test them, or they are WinNT only, or require multiple threads. - Since the last two issues shouldn't really stop the tests from being - written, assume for now that it is all due to the first case - HeapCompact - HeapLock - HeapQueryInformation - HeapSetInformation - HeapUnlock - HeapValidate - HeapWalk -*/ -/* In addition, these features aren't being tested - HEAP_NO_SERIALIZE - HEAP_GENERATE_EXCEPTIONS - STATUS_ACCESS_VIOLATION (error code from HeapAlloc) -*/ - -static void test_Heap(void) -{ - SYSTEM_INFO sysInfo; - ULONG memchunk; - HANDLE heap; - LPVOID mem1,mem1a,mem3; - UCHAR *mem2,*mem2a; - UINT error,i; - DWORD dwSize; - -/* Retrieve the page size for this system */ - sysInfo.dwPageSize=0; - GetSystemInfo(&sysInfo); - ok(sysInfo.dwPageSize>0,"GetSystemInfo should return a valid page size\n"); - -/* Create a Heap with a minimum and maximum size */ -/* Note that Windows and Wine seem to behave a bit differently with respect - to memory allocation. In Windows, you can't access all the memory - specified in the heap (due to overhead), so choosing a reasonable maximum - size for the heap was done mostly by trial-and-error on Win2k. It may need - more tweaking for otherWindows variants. -*/ - memchunk=10*sysInfo.dwPageSize; - heap=HeapCreate(0,2*memchunk,5*memchunk); - -/* Check that HeapCreate allocated the right amount of ram */ - mem1=HeapAlloc(heap,0,5*memchunk+1); - ok(mem1==NULL,"HeapCreate allocated more Ram than it should have\n"); - HeapFree(heap,0,mem1); - -/* Check that a normal alloc works */ - mem1=HeapAlloc(heap,0,memchunk); - ok(mem1!=NULL,"HeapAlloc failed\n"); - if(mem1) { - ok(HeapSize(heap,0,mem1)>=memchunk, "HeapAlloc should return a big enough memory block\n"); - } - -/* Check that a 'zeroing' alloc works */ - mem2=HeapAlloc(heap,HEAP_ZERO_MEMORY,memchunk); - ok(mem2!=NULL,"HeapAlloc failed\n"); - if(mem2) { - ok(HeapSize(heap,0,mem2)>=memchunk,"HeapAlloc should return a big enough memory block\n"); - error=0; - for(i=0;i=memchunk+5*sysInfo.dwPageSize,"HeapReAlloc failed\n"); - error=0; - for(i=0;i<5*sysInfo.dwPageSize;i++) { - if(mem2a[memchunk+i]!=0) { - error=1; - } - } - ok(!error,"HeapReAlloc should have zeroed out it's allocated memory\n"); - } - -/* Check that HeapRealloc honours HEAP_REALLOC_IN_PLACE_ONLY */ - error=0; - mem1a=HeapReAlloc(heap,HEAP_REALLOC_IN_PLACE_ONLY,mem1,memchunk+sysInfo.dwPageSize); - if(mem1a!=NULL) { - if(mem1a!=mem1) { - error=1; - } - } - ok(mem1a==NULL || error==0,"HeapReAlloc didn't honour HEAP_REALLOC_IN_PLACE_ONLY\n"); - -/* Check that HeapFree works correctly */ - if(mem1a) { - ok(HeapFree(heap,0,mem1a),"HeapFree failed\n"); - } else { - ok(HeapFree(heap,0,mem1),"HeapFree failed\n"); - } - if(mem2a) { - ok(HeapFree(heap,0,mem2a),"HeapFree failed\n"); - } else { - ok(HeapFree(heap,0,mem2),"HeapFree failed\n"); - } - - /* 0-length buffer */ - mem1 = HeapAlloc(heap, 0, 0); - ok(mem1 != NULL, "Reserved memory\n"); - - dwSize = HeapSize(heap, 0, mem1); - /* should work with 0-length buffer */ - ok(dwSize < 0xFFFFFFFF, "The size of the 0-length buffer\n"); - ok(HeapFree(heap, 0, mem1), "Freed the 0-length buffer\n"); - -/* Check that HeapDestry works */ - ok(HeapDestroy(heap),"HeapDestroy failed\n"); -} - -/* The following functions don't have tests, because either I don't know how - to test them, or they are WinNT only, or require multiple threads. - Since the last two issues shouldn't really stop the tests from being - written, assume for now that it is all due to the first case - GlobalFlags - GlobalMemoryStatus - GlobalMemoryStatusEx -*/ -/* In addition, these features aren't being tested - GMEM_DISCARDABLE - GMEM_NOCOMPACT -*/ -static void test_Global(void) -{ - ULONG memchunk; - HGLOBAL mem1,mem2,mem2a,mem2b; - UCHAR *mem2ptr; - UINT error,i; - memchunk=100000; - - SetLastError(NO_ERROR); -/* Check that a normal alloc works */ - mem1=GlobalAlloc(0,memchunk); - ok(mem1!=NULL,"GlobalAlloc failed\n"); - if(mem1) { - ok(GlobalSize(mem1)>=memchunk, "GlobalAlloc should return a big enough memory block\n"); - } - -/* Check that a 'zeroing' alloc works */ - mem2=GlobalAlloc(GMEM_ZEROINIT,memchunk); - ok(mem2!=NULL,"GlobalAlloc failed: error=%d\n",GetLastError()); - if(mem2) { - ok(GlobalSize(mem2)>=memchunk,"GlobalAlloc should return a big enough memory block\n"); - mem2ptr=GlobalLock(mem2); - ok(mem2ptr==mem2,"GlobalLock should have returned the same memory as was allocated\n"); - if(mem2ptr) { - error=0; - for(i=0;i=2*memchunk,"GlobalReAlloc failed\n"); - mem2ptr=GlobalLock(mem2a); - ok(mem2ptr!=NULL,"GlobalLock Failed\n"); - if(mem2ptr) { - error=0; - for(i=0;i=memchunk, "LocalAlloc should return a big enough memory block\n"); - } - -/* Check that a 'zeroing' and lock alloc works */ - mem2=LocalAlloc(LMEM_ZEROINIT|LMEM_MOVEABLE,memchunk); - ok(mem2!=NULL,"LocalAlloc failed: error=%d\n",GetLastError()); - if(mem2) { - ok(LocalSize(mem2)>=memchunk,"LocalAlloc should return a big enough memory block\n"); - mem2ptr=LocalLock(mem2); - ok(mem2ptr!=NULL,"LocalLock: error=%d\n",GetLastError()); - if(mem2ptr) { - error=0; - for(i=0;i=2*memchunk,"LocalReAlloc failed\n"); - mem2ptr=LocalLock(mem2a); - ok(mem2ptr!=NULL,"LocalLock Failed\n"); - if(mem2ptr) { - error=0; - for(i=0;i0,"GetSystemInfo should return a valid page size\n"); - -/* Choose a reasonable allocation size */ - memchunk=10*sysInfo.dwPageSize; - -/* Check that a normal alloc works */ - mem1=VirtualAlloc(NULL,memchunk,MEM_COMMIT,PAGE_READWRITE); - ok(mem1!=NULL,"VirtualAlloc failed\n"); - if(mem1) { -/* check that memory is initialized to 0 */ - error=0; - for(i=0;i -#include - -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "winuser.h" - -#define DOUBLE(x) (WCHAR)((x<<8)|(x)) - -static const WCHAR foobarW[] = {'f','o','o','b','a','r',0}; -static const WCHAR FOOBARW[] = {'F','O','O','B','A','R',0}; -static const WCHAR _foobarW[] = {'_','f','o','o','b','a','r',0}; -static const WCHAR integfmt[] = {'#','%','d',0}; - -static void do_initA(char* tmp, const char* pattern, int len) -{ - const char* p = pattern; - - while (len--) - { - *tmp++ = *p++; - if (!*p) p = pattern; - } - *tmp = '\0'; -} - -static void do_initW(WCHAR* tmp, const char* pattern, int len) -{ - const char* p = pattern; - - while (len--) - { - *tmp++ = *p++; - if (!*p) p = pattern; - } - *tmp = '\0'; -} - -static BOOL unicode_OS; - -static void test_add_atom(void) -{ - ATOM atom, w_atom; - INT_PTR i; - - SetLastError( 0xdeadbeef ); - atom = GlobalAddAtomA( "foobar" ); - ok( atom >= 0xc000, "bad atom id %x\n", atom ); - ok( GetLastError() == 0xdeadbeef, "GlobalAddAtomA set last error\n" ); - - /* Verify that it can be found (or not) appropriately */ - ok( GlobalFindAtomA( "foobar" ) == atom, "could not find atom foobar\n" ); - ok( GlobalFindAtomA( "FOOBAR" ) == atom, "could not find atom FOOBAR\n" ); - ok( !GlobalFindAtomA( "_foobar" ), "found _foobar\n" ); - - /* Add the same atom, specifying string as unicode; should - * find the first one, not add a new one */ - SetLastError( 0xdeadbeef ); - w_atom = GlobalAddAtomW( foobarW ); - if (w_atom && GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) - unicode_OS = TRUE; - else - trace("WARNING: Unicode atom APIs are not supported on this platform\n"); - - if (unicode_OS) - { - ok( w_atom == atom, "Unicode atom does not match ASCII\n" ); - ok( GetLastError() == 0xdeadbeef, "GlobalAddAtomW set last error\n" ); - } - - /* Verify that it can be found (or not) appropriately via unicode name */ - if (unicode_OS) - { - ok( GlobalFindAtomW( foobarW ) == atom, "could not find atom foobar\n" ); - ok( GlobalFindAtomW( FOOBARW ) == atom, "could not find atom FOOBAR\n" ); - ok( !GlobalFindAtomW( _foobarW ), "found _foobar\n" ); - } - - /* Test integer atoms - * (0x0001 .. 0xbfff) should be valid; - * (0xc000 .. 0xffff) should be invalid */ - - SetLastError( 0xdeadbeef ); - ok( GlobalAddAtomA(0) == 0 && GetLastError() == 0xdeadbeef, "succeeded to add atom 0\n" ); - if (unicode_OS) - { - SetLastError( 0xdeadbeef ); - ok( GlobalAddAtomW(0) == 0 && GetLastError() == 0xdeadbeef, "succeeded to add atom 0\n" ); - } - - SetLastError( 0xdeadbeef ); - for (i = 1; i <= 0xbfff; i++) - { - SetLastError( 0xdeadbeef ); - ok( GlobalAddAtomA((LPCSTR)i) == i && GetLastError() == 0xdeadbeef, - "failed to add atom %lx\n", i ); - if (unicode_OS) - { - SetLastError( 0xdeadbeef ); - ok( GlobalAddAtomW((LPCWSTR)i) == i && GetLastError() == 0xdeadbeef, - "failed to add atom %lx\n", i ); - } - } - - for (i = 0xc000; i <= 0xffff; i++) - { - ok( !GlobalAddAtomA((LPCSTR)i), "succeeded adding %lx\n", i ); - if (unicode_OS) - ok( !GlobalAddAtomW((LPCWSTR)i), "succeeded adding %lx\n", i ); - } -} - -static void test_get_atom_name(void) -{ - char buf[10]; - WCHAR bufW[10]; - int i; - UINT len; - static const WCHAR resultW[] = {'f','o','o','b','a','r',0,'.','.','.'}; - char in[257], out[257]; - WCHAR inW[257], outW[257]; - - ATOM atom = GlobalAddAtomA( "foobar" ); - - /* Get the name of the atom we added above */ - memset( buf, '.', sizeof(buf) ); - len = GlobalGetAtomNameA( atom, buf, 10 ); - ok( len == strlen("foobar"), "bad length %d\n", len ); - ok( !memcmp( buf, "foobar\0...", 10 ), "bad buffer contents\n" ); - - /* Repeat, unicode-style */ - if (unicode_OS) - { - for (i = 0; i < 10; i++) bufW[i] = '.'; - SetLastError( 0xdeadbeef ); - len = GlobalGetAtomNameW( atom, bufW, 10 ); - ok( len && GetLastError() == 0xdeadbeef, "GlobalGetAtomNameW failed\n" ); - ok( len == lstrlenW(foobarW), "bad length %d\n", len ); - ok( !memcmp( bufW, resultW, 10*sizeof(WCHAR) ), "bad buffer contents\n" ); - } - - /* Check error code returns */ - memset(buf, '.', 10); - ok( !GlobalGetAtomNameA( atom, buf, 0 ), "succeeded\n" ); - ok( !memcmp( buf, "..........", 10 ), "should not touch buffer\n" ); - - if (unicode_OS) - { - static const WCHAR sampleW[10] = {'.','.','.','.','.','.','.','.','.','.'}; - - for (i = 0; i < 10; i++) bufW[i] = '.'; - ok( !GlobalGetAtomNameW( atom, bufW, 0 ), "succeeded\n" ); - ok( !memcmp( bufW, sampleW, 10 * sizeof(WCHAR) ), "should not touch buffer\n" ); - } - - /* Test integer atoms */ - for (i = 0; i <= 0xbfff; i++) - { - memset( buf, 'a', 10 ); - len = GlobalGetAtomNameA( (ATOM)i, buf, 10 ); - if (i) - { - char res[20]; - ok( (len > 1) && (len < 7), "bad length %d\n", len ); - sprintf( res, "#%d", i ); - memset( res + strlen(res) + 1, 'a', 10 ); - ok( !memcmp( res, buf, 10 ), "bad buffer contents %s\n", buf ); - if (len <= 1 || len >= 7) break; /* don't bother testing all of them */ - } - else - ok( !len, "bad length %d\n", len ); - - SetLastError(0xdeadbeef); - len = GlobalGetAtomNameA( (ATOM)i, buf, 2); - ok(!len, "bad length %d\n", len); - ok(GetLastError() == ERROR_MORE_DATA || GetLastError() == ERROR_INVALID_PARAMETER, - "wrong error conditions %u for %u\n", GetLastError(), i); - } - - memset( buf, '.', sizeof(buf) ); - len = GlobalGetAtomNameA( atom, buf, 6 ); - ok( len == 0, "bad length %d\n", len ); - ok( !memcmp( buf, "fooba\0....", 10 ), "bad buffer contents\n"); - if (unicode_OS) - { - static const WCHAR resW[] = {'f','o','o','b','a','r','.','.','.','.'}; - for (len = 0; len < 10; len++) bufW[len] = '.'; - SetLastError(0xdeadbeef); - len = GlobalGetAtomNameW( atom, bufW, 6 ); - ok( len && GetLastError() == 0xdeadbeef, "GlobalGetAtomNameW failed\n" ); - ok( len == lstrlenW(foobarW), "bad length %d\n", len ); - ok( !memcmp( bufW, resW, 10*sizeof(WCHAR) ), "bad buffer contents\n" ); - } - - /* test string limits & overflow */ - do_initA(in, "abcdefghij", 255); - atom = GlobalAddAtomA(in); - ok(atom, "couldn't add atom for %s\n", in); - len = GlobalGetAtomNameA(atom, out, sizeof(out)); - ok(len == 255, "length mismatch (%u instead of 255)\n", len); - for (i = 0; i < 255; i++) - { - ok(out[i] == "abcdefghij"[i % 10], "wrong string at %i (%c instead of %c)\n", i, out[i], "abcdefghij"[i % 10]); - } - ok(out[255] == '\0', "wrong end of string\n"); - memset(out, '.', sizeof(out)); - SetLastError(0xdeadbeef); - len = GlobalGetAtomNameA(atom, out, 10); - ok(!len, "bad length %d\n", len); - ok(GetLastError() == ERROR_MORE_DATA, "wrong error code (%u instead of %u)\n", GetLastError(), ERROR_MORE_DATA); - for (i = 0; i < 9; i++) - { - ok(out[i] == "abcdefghij"[i % 10], "wrong string at %i (%c instead of %c)\n", i, out[i], "abcdefghij"[i % 10]); - } - ok(out[9] == '\0', "wrong end of string\n"); - ok(out[10] == '.', "wrote after end of buf\n"); - do_initA(in, "abcdefghij", 256); - atom = GlobalAddAtomA(in); - ok(!atom, "succeeded\n"); - if (unicode_OS) - { - /* test integral atoms */ - for (i = 0; i <= 0xbfff; i++) - { - memset(outW, 'a', sizeof(outW)); - len = GlobalGetAtomNameW( (ATOM)i, outW, 10 ); - if (i) - { - WCHAR res[20]; - - ok( (len > 1) && (len < 7), "bad length %d\n", len ); - wsprintfW( res, integfmt, i ); - memset( res + lstrlenW(res) + 1, 'a', 10 * sizeof(WCHAR)); - ok( !memcmp( res, outW, 10 * sizeof(WCHAR) ), "bad buffer contents for %d\n", i ); - if (len <= 1 || len >= 7) break; /* don't bother testing all of them */ - } - else - ok( !len, "bad length %d\n", len ); - - memset(outW, '.', sizeof(outW)); - SetLastError(0xdeadbeef); - len = GlobalGetAtomNameW( (ATOM)i, outW, 1); - if (i) - { - /* len == 0 with ERROR_MORE_DATA is on NT3.51 */ - ok(len == 1 || (len == 0 && GetLastError() == ERROR_MORE_DATA), - "0x%04x: got %u with %d (excepted '1' or '0' with " - "ERROR_MORE_DATA)\n", i, len, GetLastError()); - ok(outW[1] == DOUBLE('.'), "buffer overwrite\n"); - } - else ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, "0 badly handled\n"); - } - - do_initW(inW, "abcdefghij", 255); - atom = GlobalAddAtomW(inW); - ok(atom, "couldn't add atom for %s\n", in); - len = GlobalGetAtomNameW(atom, outW, sizeof(outW)/sizeof(outW[0])); - ok(len == 255, "length mismatch (%u instead of 255)\n", len); - for (i = 0; i < 255; i++) - { - ok(outW[i] == "abcdefghij"[i % 10], "wrong string at %i (%c instead of %c)\n", i, outW[i], "abcdefghij"[i % 10]); - } - ok(outW[255] == '\0', "wrong end of string\n"); - memset(outW, '.', sizeof(outW)); - len = GlobalGetAtomNameW(atom, outW, 10); - ok(len == 10, "succeeded\n"); - for (i = 0; i < 10; i++) - { - ok(outW[i] == "abcdefghij"[i % 10], "wrong string at %i (%c instead of %c)\n", i, outW[i], "abcdefghij"[i % 10]); - } - ok(outW[10] == DOUBLE('.'), "wrote after end of buf\n"); - do_initW(inW, "abcdefghij", 256); - atom = GlobalAddAtomW(inW); - ok(!atom, "succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error code\n"); - } -} - -static void test_error_handling(void) -{ - char buffer[260]; - WCHAR bufferW[260]; - int i; - - memset( buffer, 'a', 256 ); - buffer[256] = 0; - ok( !GlobalAddAtomA(buffer), "add succeeded\n" ); - ok( !GlobalFindAtomA(buffer), "find succeeded\n" ); - - if (unicode_OS) - { - for (i = 0; i < 256; i++) bufferW[i] = 'b'; - bufferW[256] = 0; - ok( !GlobalAddAtomW(bufferW), "add succeeded\n" ); - ok( !GlobalFindAtomW(bufferW), "find succeeded\n" ); - } -} - -static void test_local_add_atom(void) -{ - ATOM atom, w_atom; - INT_PTR i; - - SetLastError( 0xdeadbeef ); - atom = AddAtomA( "foobar" ); - ok( atom >= 0xc000, "bad atom id %x\n", atom ); - ok( GetLastError() == 0xdeadbeef, "AddAtomA set last error\n" ); - - /* Verify that it can be found (or not) appropriately */ - ok( FindAtomA( "foobar" ) == atom, "could not find atom foobar\n" ); - ok( FindAtomA( "FOOBAR" ) == atom, "could not find atom FOOBAR\n" ); - ok( !FindAtomA( "_foobar" ), "found _foobar\n" ); - - /* Add the same atom, specifying string as unicode; should - * find the first one, not add a new one */ - SetLastError( 0xdeadbeef ); - w_atom = AddAtomW( foobarW ); - if (w_atom && GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) - unicode_OS = TRUE; - else - trace("WARNING: Unicode atom APIs are not supported on this platform\n"); - - if (unicode_OS) - { - ok( w_atom == atom, "Unicode atom does not match ASCII\n" ); - ok( GetLastError() == 0xdeadbeef, "AddAtomW set last error\n" ); - } - - /* Verify that it can be found (or not) appropriately via unicode name */ - if (unicode_OS) - { - ok( FindAtomW( foobarW ) == atom, "could not find atom foobar\n" ); - ok( FindAtomW( FOOBARW ) == atom, "could not find atom FOOBAR\n" ); - ok( !FindAtomW( _foobarW ), "found _foobar\n" ); - } - - /* Test integer atoms - * (0x0001 .. 0xbfff) should be valid; - * (0xc000 .. 0xffff) should be invalid */ - - SetLastError( 0xdeadbeef ); - ok( AddAtomA(0) == 0 && GetLastError() == 0xdeadbeef, "succeeded to add atom 0\n" ); - if (unicode_OS) - { - SetLastError( 0xdeadbeef ); - ok( AddAtomW(0) == 0 && GetLastError() == 0xdeadbeef, "succeeded to add atom 0\n" ); - } - - SetLastError( 0xdeadbeef ); - for (i = 1; i <= 0xbfff; i++) - { - SetLastError( 0xdeadbeef ); - ok( AddAtomA((LPCSTR)i) == i && GetLastError() == 0xdeadbeef, - "failed to add atom %lx\n", i ); - if (unicode_OS) - { - SetLastError( 0xdeadbeef ); - ok( AddAtomW((LPCWSTR)i) == i && GetLastError() == 0xdeadbeef, - "failed to add atom %lx\n", i ); - } - } - - for (i = 0xc000; i <= 0xffff; i++) - { - ok( !AddAtomA((LPCSTR)i), "succeeded adding %lx\n", i ); - if (unicode_OS) - ok( !AddAtomW((LPCWSTR)i), "succeeded adding %lx\n", i ); - } -} - -static void test_local_get_atom_name(void) -{ - char buf[10], in[257], out[257]; - WCHAR bufW[10], inW[257], outW[257]; - int i; - UINT len; - static const WCHAR resultW[] = {'f','o','o','b','a','r',0,'.','.','.'}; - - ATOM atom = AddAtomA( "foobar" ); - - /* Get the name of the atom we added above */ - memset( buf, '.', sizeof(buf) ); - len = GetAtomNameA( atom, buf, 10 ); - ok( len == strlen("foobar"), "bad length %d\n", len ); - ok( !memcmp( buf, "foobar\0...", 10 ), "bad buffer contents\n" ); - - /* Repeat, unicode-style */ - if (unicode_OS) - { - for (i = 0; i < 10; i++) bufW[i] = '.'; - SetLastError( 0xdeadbeef ); - len = GetAtomNameW( atom, bufW, 10 ); - ok( len && GetLastError() == 0xdeadbeef, "GetAtomNameW failed\n" ); - ok( len == lstrlenW(foobarW), "bad length %d\n", len ); - ok( !memcmp( bufW, resultW, 10*sizeof(WCHAR) ), "bad buffer contents\n" ); - } - - /* Get the name of the atom we added above */ - memset( buf, '.', sizeof(buf) ); - len = GetAtomNameA( atom, buf, 6 ); - ok( len == 5, "bad length %d\n", len ); - ok( !memcmp( buf, "fooba\0....", 10 ), "bad buffer contents\n" ); - - /* Repeat, unicode-style */ - if (unicode_OS) - { - WCHAR resW[] = {'f','o','o','b','a','\0','.','.','.','.'}; - for (i = 0; i < 10; i++) bufW[i] = '.'; - SetLastError( 0xdeadbeef ); - len = GetAtomNameW( atom, bufW, 6 ); - ok( len && GetLastError() == 0xdeadbeef, "GlobalGetAtomNameW failed\n" ); - ok( len == 5, "bad length %d\n", len ); - ok( !memcmp( bufW, resW, 10*sizeof(WCHAR) ), "bad buffer contents\n" ); - } - - /* Check error code returns */ - memset(buf, '.', 10); - ok( !GetAtomNameA( atom, buf, 0 ), "succeeded\n" ); - ok( !memcmp( buf, "..........", 10 ), "should not touch buffer\n" ); - - if (unicode_OS) - { - static const WCHAR sampleW[10] = {'.','.','.','.','.','.','.','.','.','.'}; - - for (i = 0; i < 10; i++) bufW[i] = '.'; - ok( !GetAtomNameW( atom, bufW, 0 ), "succeeded\n" ); - ok( !memcmp( bufW, sampleW, 10 * sizeof(WCHAR) ), "should not touch buffer\n" ); - } - - /* Test integer atoms */ - for (i = 0; i <= 0xbfff; i++) - { - memset( buf, 'a', 10 ); - len = GetAtomNameA( (ATOM)i, buf, 10 ); - if (i) - { - char res[20]; - ok( (len > 1) && (len < 7), "bad length %d for %s\n", len, buf ); - sprintf( res, "#%d", i ); - memset( res + strlen(res) + 1, 'a', 10 ); - ok( !memcmp( res, buf, 10 ), "bad buffer contents %s\n", buf ); - } - else - ok( !len, "bad length %d\n", len ); - - len = GetAtomNameA( (ATOM)i, buf, 1); - ok(!len, "succeed with %u for %u\n", len, i); - - /* ERROR_MORE_DATA is on nt3.51 sp5 */ - if (i) - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER || - GetLastError() == ERROR_MORE_DATA, - "wrong error conditions %u for %u\n", GetLastError(), i); - else - ok(GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_MORE_DATA, - "wrong error conditions %u for %u\n", GetLastError(), i); - } - /* test string limits & overflow */ - do_initA(in, "abcdefghij", 255); - atom = AddAtomA(in); - ok(atom, "couldn't add atom for %s\n", in); - len = GetAtomNameA(atom, out, sizeof(out)); - ok(len == 255, "length mismatch (%u instead of 255)\n", len); - for (i = 0; i < 255; i++) - { - ok(out[i] == "abcdefghij"[i % 10], "wrong string at %i (%c instead of %c)\n", i, out[i], "abcdefghij"[i % 10]); - } - ok(out[255] == '\0', "wrong end of string\n"); - memset(out, '.', sizeof(out)); - len = GetAtomNameA(atom, out, 10); - ok(len == 9, "succeeded %d\n", len); - for (i = 0; i < 9; i++) - { - ok(out[i] == "abcdefghij"[i % 10], "wrong string at %i (%c instead of %c)\n", i, out[i], "abcdefghij"[i % 10]); - } - ok(out[9] == '\0', "wrong end of string\n"); - ok(out[10] == '.', "buffer overwrite\n"); - do_initA(in, "abcdefghij", 256); - atom = AddAtomA(in); - ok(!atom, "succeeded\n"); - - /* ERROR_MORE_DATA is on nt3.51 sp5 */ - ok(GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_MORE_DATA, - "wrong error code (%u)\n", GetLastError()); - - if (unicode_OS) - { - /* test integral atoms */ - for (i = 0; i <= 0xbfff; i++) - { - memset(outW, 'a', sizeof(outW)); - len = GetAtomNameW( (ATOM)i, outW, 10 ); - if (i) - { - WCHAR res[20]; - - ok( (len > 1) && (len < 7), "bad length %d\n", len ); - wsprintfW( res, integfmt, i ); - memset( res + lstrlenW(res) + 1, 'a', 10 * sizeof(WCHAR)); - ok( !memcmp( res, outW, 10 * sizeof(WCHAR) ), "bad buffer contents for %d\n", i ); - } - else - ok( !len, "bad length %d\n", len ); - - len = GetAtomNameW( (ATOM)i, outW, 1); - ok(!len, "succeed with %u for %u\n", len, i); - - /* ERROR_MORE_DATA is on nt3.51 sp5 */ - ok(GetLastError() == ERROR_MORE_DATA || - GetLastError() == (i ? ERROR_INSUFFICIENT_BUFFER : ERROR_INVALID_PARAMETER), - "wrong error conditions %u for %u\n", GetLastError(), i); - } - do_initW(inW, "abcdefghij", 255); - atom = AddAtomW(inW); - ok(atom, "couldn't add atom for %s\n", in); - len = GetAtomNameW(atom, outW, sizeof(outW)/sizeof(outW[0])); - ok(len == 255, "length mismatch (%u instead of 255)\n", len); - for (i = 0; i < 255; i++) - { - ok(outW[i] == "abcdefghij"[i % 10], "wrong string at %i (%c instead of %c)\n", i, outW[i], "abcdefghij"[i % 10]); - } - ok(outW[255] == '\0', "wrong end of string\n"); - memset(outW, '.', sizeof(outW)); - len = GetAtomNameW(atom, outW, 10); - ok(len == 9, "succeeded %d\n", len); - for (i = 0; i < 9; i++) - { - ok(outW[i] == "abcdefghij"[i % 10], "wrong string at %i (%c instead of %c)\n", i, outW[i], "abcdefghij"[i % 10]); - } - ok(outW[9] == '\0', "wrong end of string\n"); - ok(outW[10] == DOUBLE('.'), "buffer overwrite\n"); - do_initW(inW, "abcdefghij", 256); - atom = AddAtomW(inW); - ok(!atom, "succeeded\n"); - - /* ERROR_MORE_DATA is on nt3.51 sp5 */ - ok(GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_MORE_DATA, - "wrong error code (%u)\n", GetLastError()); - } -} - -static void test_local_error_handling(void) -{ - char buffer[260]; - WCHAR bufferW[260]; - int i; - - memset( buffer, 'a', 256 ); - buffer[256] = 0; - ok( !AddAtomA(buffer), "add succeeded\n" ); - ok( !FindAtomA(buffer), "find succeeded\n" ); - - if (unicode_OS) - { - for (i = 0; i < 256; i++) bufferW[i] = 'b'; - bufferW[256] = 0; - ok( !AddAtomW(bufferW), "add succeeded\n" ); - ok( !FindAtomW(bufferW), "find succeeded\n" ); - } -} - -START_TEST(atom) -{ - /* Global atom table seems to be available to GUI apps only in - Win7, so let's turn this app into a GUI app */ - GetDesktopWindow(); - - test_add_atom(); - test_get_atom_name(); - test_error_handling(); - test_local_add_atom(); - test_local_get_atom_name(); - test_local_error_handling(); -} diff --git a/rostests/winetests/kernel32/change.c b/rostests/winetests/kernel32/change.c deleted file mode 100755 index 4d0bc1c43ce..00000000000 --- a/rostests/winetests/kernel32/change.c +++ /dev/null @@ -1,1105 +0,0 @@ -/* - * Tests for file change notification functions - * - * Copyright (c) 2004 Hans Leidekker - * Copyright 2006 Mike McCormack 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 - */ - -/* TODO: - security attribute changes - * - compound filter and multiple notifications - * - subtree notifications - * - non-documented flags FILE_NOTIFY_CHANGE_LAST_ACCESS and - * FILE_NOTIFY_CHANGE_CREATION - */ - -#include -#include - -#include "ntstatus.h" -#define WIN32_NO_STATUS -#include "wine/test.h" -#include -#include -#include - -static DWORD CALLBACK NotificationThread(LPVOID arg) -{ - HANDLE change = arg; - BOOL notified = FALSE; - BOOL ret = FALSE; - DWORD status; - - status = WaitForSingleObject(change, 100); - - if (status == WAIT_OBJECT_0 ) { - notified = TRUE; - FindNextChangeNotification(change); - } - - ret = FindCloseChangeNotification(change); - ok( ret, "FindCloseChangeNotification error: %d\n", - GetLastError()); - - ExitThread((DWORD)notified); -} - -static HANDLE StartNotificationThread(LPCSTR path, BOOL subtree, DWORD flags) -{ - HANDLE change, thread; - DWORD threadId; - - change = FindFirstChangeNotificationA(path, subtree, flags); - ok(change != INVALID_HANDLE_VALUE, "FindFirstChangeNotification error: %d\n", GetLastError()); - - thread = CreateThread(NULL, 0, NotificationThread, change, 0, &threadId); - ok(thread != NULL, "CreateThread error: %d\n", GetLastError()); - - return thread; -} - -static DWORD FinishNotificationThread(HANDLE thread) -{ - DWORD status, exitcode; - - status = WaitForSingleObject(thread, 5000); - ok(status == WAIT_OBJECT_0, "WaitForSingleObject status %d error %d\n", status, GetLastError()); - - ok(GetExitCodeThread(thread, &exitcode), "Could not retrieve thread exit code\n"); - CloseHandle(thread); - - return exitcode; -} - -static void test_FindFirstChangeNotification(void) -{ - HANDLE change, file, thread; - DWORD attributes, count; - BOOL ret; - - char workdir[MAX_PATH], dirname1[MAX_PATH], dirname2[MAX_PATH]; - char filename1[MAX_PATH], filename2[MAX_PATH]; - static const char prefix[] = "FCN"; - char buffer[2048]; - - /* pathetic checks */ - - change = FindFirstChangeNotificationA("not-a-file", FALSE, FILE_NOTIFY_CHANGE_FILE_NAME); - ok(change == INVALID_HANDLE_VALUE, "Expected INVALID_HANDLE_VALUE, got %p\n", change); - ok(GetLastError() == ERROR_FILE_NOT_FOUND || - GetLastError() == ERROR_NO_MORE_FILES, /* win95 */ - "FindFirstChangeNotification error: %d\n", GetLastError()); - - if (0) /* This documents win2k behavior. It crashes on win98. */ - { - change = FindFirstChangeNotificationA(NULL, FALSE, FILE_NOTIFY_CHANGE_FILE_NAME); - ok(change == NULL && GetLastError() == ERROR_PATH_NOT_FOUND, - "FindFirstChangeNotification error: %d\n", GetLastError()); - } - - ret = FindNextChangeNotification(NULL); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "FindNextChangeNotification error: %d\n", - GetLastError()); - - ret = FindCloseChangeNotification(NULL); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "FindCloseChangeNotification error: %d\n", - GetLastError()); - - ret = GetTempPathA(MAX_PATH, workdir); - ok(ret, "GetTempPathA error: %d\n", GetLastError()); - - lstrcatA(workdir, "testFileChangeNotification"); - - ret = CreateDirectoryA(workdir, NULL); - ok(ret, "CreateDirectoryA error: %d\n", GetLastError()); - - ret = GetTempFileNameA(workdir, prefix, 0, filename1); - ok(ret, "GetTempFileNameA error: %d\n", GetLastError()); - - file = CreateFileA(filename1, GENERIC_WRITE|GENERIC_READ, 0, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, 0); - ok(file != INVALID_HANDLE_VALUE, "CreateFileA error: %d\n", GetLastError()); - ret = CloseHandle(file); - ok( ret, "CloseHandle error: %d\n", GetLastError()); - - /* Try to register notification for a file. win98 and win2k behave differently here */ - change = FindFirstChangeNotificationA(filename1, FALSE, FILE_NOTIFY_CHANGE_FILE_NAME); - ok(change == INVALID_HANDLE_VALUE && (GetLastError() == ERROR_DIRECTORY || - GetLastError() == ERROR_FILE_NOT_FOUND), - "FindFirstChangeNotification error: %d\n", GetLastError()); - - lstrcpyA(dirname1, filename1); - lstrcatA(dirname1, "dir"); - - lstrcpyA(dirname2, dirname1); - lstrcatA(dirname2, "new"); - - ret = CreateDirectoryA(dirname1, NULL); - ok(ret, "CreateDirectoryA error: %d\n", GetLastError()); - - /* What if we move the directory we registered notification for? */ - thread = StartNotificationThread(dirname1, FALSE, FILE_NOTIFY_CHANGE_DIR_NAME); - ret = MoveFileA(dirname1, dirname2); - ok(ret, "MoveFileA error: %d\n", GetLastError()); - /* win9x and win2k behave differently here, don't check result */ - FinishNotificationThread(thread); - - /* What if we remove the directory we registered notification for? */ - thread = StartNotificationThread(dirname2, FALSE, FILE_NOTIFY_CHANGE_DIR_NAME); - ret = RemoveDirectoryA(dirname2); - ok(ret, "RemoveDirectoryA error: %d\n", GetLastError()); - /* win9x and win2k behave differently here, don't check result */ - FinishNotificationThread(thread); - - /* functional checks */ - - /* Create a directory */ - thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_DIR_NAME); - ret = CreateDirectoryA(dirname1, NULL); - ok(ret, "CreateDirectoryA error: %d\n", GetLastError()); - ok(FinishNotificationThread(thread), "Missed notification\n"); - - /* Rename a directory */ - thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_DIR_NAME); - ret = MoveFileA(dirname1, dirname2); - ok(ret, "MoveFileA error: %d\n", GetLastError()); - ok(FinishNotificationThread(thread), "Missed notification\n"); - - /* Delete a directory */ - thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_DIR_NAME); - ret = RemoveDirectoryA(dirname2); - ok(ret, "RemoveDirectoryA error: %d\n", GetLastError()); - ok(FinishNotificationThread(thread), "Missed notification\n"); - - lstrcpyA(filename2, filename1); - lstrcatA(filename2, "new"); - - /* Rename a file */ - thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_FILE_NAME); - ret = MoveFileA(filename1, filename2); - ok(ret, "MoveFileA error: %d\n", GetLastError()); - ok(FinishNotificationThread(thread), "Missed notification\n"); - - /* Delete a file */ - thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_FILE_NAME); - ret = DeleteFileA(filename2); - ok(ret, "DeleteFileA error: %d\n", GetLastError()); - ok(FinishNotificationThread(thread), "Missed notification\n"); - - /* Create a file */ - thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_FILE_NAME); - file = CreateFileA(filename2, GENERIC_WRITE|GENERIC_READ, 0, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, 0); - ok(file != INVALID_HANDLE_VALUE, "CreateFileA error: %d\n", GetLastError()); - ret = CloseHandle(file); - ok( ret, "CloseHandle error: %d\n", GetLastError()); - ok(FinishNotificationThread(thread), "Missed notification\n"); - - attributes = GetFileAttributesA(filename2); - ok(attributes != INVALID_FILE_ATTRIBUTES, "GetFileAttributesA error: %d\n", GetLastError()); - attributes &= FILE_ATTRIBUTE_READONLY; - - /* Change file attributes */ - thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_ATTRIBUTES); - ret = SetFileAttributesA(filename2, attributes); - ok(ret, "SetFileAttributesA error: %d\n", GetLastError()); - ok(FinishNotificationThread(thread), "Missed notification\n"); - - /* Change last write time by writing to a file */ - thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_LAST_WRITE); - file = CreateFileA(filename2, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, 0); - ok(file != INVALID_HANDLE_VALUE, "CreateFileA error: %d\n", GetLastError()); - memset(buffer, 0, sizeof(buffer)); - ret = WriteFile(file, buffer, sizeof(buffer), &count, NULL); - ok(ret && count == sizeof(buffer), "WriteFile error: %d\n", GetLastError()); - ret = CloseHandle(file); - ok( ret, "CloseHandle error: %d\n", GetLastError()); - ok(FinishNotificationThread(thread), "Missed notification\n"); - - /* Change file size by truncating a file */ - thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_SIZE); - file = CreateFileA(filename2, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, 0); - ok(file != INVALID_HANDLE_VALUE, "CreateFileA error: %d\n", GetLastError()); - ret = WriteFile(file, buffer, sizeof(buffer) / 2, &count, NULL); - ok(ret && count == sizeof(buffer) / 2, "WriteFileA error: %d\n", GetLastError()); - ret = CloseHandle(file); - ok( ret, "CloseHandle error: %d\n", GetLastError()); - ok(FinishNotificationThread(thread), "Missed notification\n"); - - /* clean up */ - - ret = DeleteFileA(filename2); - ok(ret, "DeleteFileA error: %d\n", GetLastError()); - - ret = RemoveDirectoryA(workdir); - ok(ret, "RemoveDirectoryA error: %d\n", GetLastError()); -} - -/* this test concentrates more on the wait behaviour of the handle */ -static void test_ffcn(void) -{ - DWORD filter; - HANDLE handle; - LONG r; - WCHAR path[MAX_PATH], subdir[MAX_PATH]; - static const WCHAR szBoo[] = { '\\','b','o','o',0 }; - static const WCHAR szHoo[] = { '\\','h','o','o',0 }; - - SetLastError(0xdeadbeef); - r = GetTempPathW( MAX_PATH, path ); - if (!r && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) - { - win_skip("GetTempPathW is not implemented\n"); - return; - } - ok( r != 0, "temp path failed\n"); - if (!r) - return; - - lstrcatW( path, szBoo ); - lstrcpyW( subdir, path ); - lstrcatW( subdir, szHoo ); - - RemoveDirectoryW( subdir ); - RemoveDirectoryW( path ); - - r = CreateDirectoryW(path, NULL); - ok( r == TRUE, "failed to create directory\n"); - - filter = FILE_NOTIFY_CHANGE_FILE_NAME; - filter |= FILE_NOTIFY_CHANGE_DIR_NAME; - - handle = FindFirstChangeNotificationW( path, 1, filter); - ok( handle != INVALID_HANDLE_VALUE, "invalid handle\n"); - - r = WaitForSingleObject( handle, 0 ); - ok( r == STATUS_TIMEOUT, "should time out\n"); - - r = CreateDirectoryW( subdir, NULL ); - ok( r == TRUE, "failed to create subdir\n"); - - r = WaitForSingleObject( handle, 0 ); - ok( r == WAIT_OBJECT_0, "should be ready\n"); - - r = WaitForSingleObject( handle, 0 ); - ok( r == WAIT_OBJECT_0, "should be ready\n"); - - r = FindNextChangeNotification(handle); - ok( r == TRUE, "find next failed\n"); - - r = WaitForSingleObject( handle, 0 ); - ok( r == STATUS_TIMEOUT, "should time out\n"); - - r = RemoveDirectoryW( subdir ); - ok( r == TRUE, "failed to remove subdir\n"); - - r = WaitForSingleObject( handle, 0 ); - ok( r == WAIT_OBJECT_0, "should be ready\n"); - - r = WaitForSingleObject( handle, 0 ); - ok( r == WAIT_OBJECT_0, "should be ready\n"); - - r = FindNextChangeNotification(handle); - ok( r == TRUE, "find next failed\n"); - - r = FindNextChangeNotification(handle); - ok( r == TRUE, "find next failed\n"); - - r = FindCloseChangeNotification(handle); - ok( r == TRUE, "should succeed\n"); - - r = RemoveDirectoryW( path ); - ok( r == TRUE, "failed to remove dir\n"); -} - -/* this test concentrates on the wait behavior when multiple threads are - * waiting on a change notification handle. */ -static void test_ffcnMultipleThreads(void) -{ - LONG r; - DWORD filter, threadId, status, exitcode; - HANDLE handles[2]; - char path[MAX_PATH]; - - r = GetTempPathA(MAX_PATH, path); - ok(r, "GetTempPathA error: %d\n", GetLastError()); - - lstrcatA(path, "ffcnTestMultipleThreads"); - - RemoveDirectoryA(path); - - r = CreateDirectoryA(path, NULL); - ok(r, "CreateDirectoryA error: %d\n", GetLastError()); - - filter = FILE_NOTIFY_CHANGE_FILE_NAME; - filter |= FILE_NOTIFY_CHANGE_DIR_NAME; - - handles[0] = FindFirstChangeNotificationA(path, FALSE, filter); - ok(handles[0] != INVALID_HANDLE_VALUE, "FindFirstChangeNotification error: %d\n", GetLastError()); - - /* Test behavior if a waiting thread holds the last reference to a change - * directory object with an empty wine user APC queue for this thread (bug #7286) */ - - /* Create our notification thread */ - handles[1] = CreateThread(NULL, 0, NotificationThread, handles[0], 0, - &threadId); - ok(handles[1] != NULL, "CreateThread error: %d\n", GetLastError()); - - status = WaitForMultipleObjects(2, handles, FALSE, 5000); - ok(status == WAIT_OBJECT_0 || status == WAIT_OBJECT_0+1, "WaitForMultipleObjects status %d error %d\n", status, GetLastError()); - ok(GetExitCodeThread(handles[1], &exitcode), "Could not retrieve thread exit code\n"); - - /* Clean up */ - r = RemoveDirectoryA( path ); - ok( r == TRUE, "failed to remove dir\n"); -} - -static BOOL (WINAPI *pReadDirectoryChangesW)(HANDLE,LPVOID,DWORD,BOOL,DWORD, - LPDWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE); - -static void test_readdirectorychanges(void) -{ - HANDLE hdir; - char buffer[0x1000]; - DWORD fflags, filter = 0, r, dwCount; - OVERLAPPED ov; - WCHAR path[MAX_PATH], subdir[MAX_PATH], subsubdir[MAX_PATH]; - static const WCHAR szBoo[] = { '\\','b','o','o',0 }; - static const WCHAR szHoo[] = { '\\','h','o','o',0 }; - static const WCHAR szGa[] = { '\\','h','o','o','\\','g','a',0 }; - PFILE_NOTIFY_INFORMATION pfni; - - if (!pReadDirectoryChangesW) - { - win_skip("ReadDirectoryChangesW is not available\n"); - return; - } - - SetLastError(0xdeadbeef); - r = GetTempPathW( MAX_PATH, path ); - if (!r && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) - { - win_skip("GetTempPathW is not implemented\n"); - return; - } - ok( r != 0, "temp path failed\n"); - if (!r) - return; - - lstrcatW( path, szBoo ); - lstrcpyW( subdir, path ); - lstrcatW( subdir, szHoo ); - - lstrcpyW( subsubdir, path ); - lstrcatW( subsubdir, szGa ); - - RemoveDirectoryW( subsubdir ); - RemoveDirectoryW( subdir ); - RemoveDirectoryW( path ); - - r = CreateDirectoryW(path, NULL); - ok( r == TRUE, "failed to create directory\n"); - - SetLastError(0xd0b00b00); - r = pReadDirectoryChangesW(NULL,NULL,0,FALSE,0,NULL,NULL,NULL); - ok(GetLastError()==ERROR_INVALID_PARAMETER,"last error wrong\n"); - ok(r==FALSE, "should return false\n"); - - fflags = FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED; - hdir = CreateFileW(path, GENERIC_READ|SYNCHRONIZE|FILE_LIST_DIRECTORY, - FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, - OPEN_EXISTING, fflags, NULL); - ok( hdir != INVALID_HANDLE_VALUE, "failed to open directory\n"); - - ov.hEvent = CreateEvent( NULL, 1, 0, NULL ); - - SetLastError(0xd0b00b00); - r = pReadDirectoryChangesW(hdir,NULL,0,FALSE,0,NULL,NULL,NULL); - ok(GetLastError()==ERROR_INVALID_PARAMETER,"last error wrong\n"); - ok(r==FALSE, "should return false\n"); - - SetLastError(0xd0b00b00); - r = pReadDirectoryChangesW(hdir,NULL,0,FALSE,0,NULL,&ov,NULL); - ok(GetLastError()==ERROR_INVALID_PARAMETER,"last error wrong\n"); - ok(r==FALSE, "should return false\n"); - - filter = FILE_NOTIFY_CHANGE_FILE_NAME; - filter |= FILE_NOTIFY_CHANGE_DIR_NAME; - filter |= FILE_NOTIFY_CHANGE_ATTRIBUTES; - filter |= FILE_NOTIFY_CHANGE_SIZE; - filter |= FILE_NOTIFY_CHANGE_LAST_WRITE; - filter |= FILE_NOTIFY_CHANGE_LAST_ACCESS; - filter |= FILE_NOTIFY_CHANGE_CREATION; - filter |= FILE_NOTIFY_CHANGE_SECURITY; - - SetLastError(0xd0b00b00); - ov.Internal = 0; - ov.InternalHigh = 0; - memset( buffer, 0, sizeof buffer ); - - r = pReadDirectoryChangesW(hdir,buffer,sizeof buffer,FALSE,-1,NULL,&ov,NULL); - ok(GetLastError()==ERROR_INVALID_PARAMETER,"last error wrong\n"); - ok(r==FALSE, "should return false\n"); - - r = pReadDirectoryChangesW(hdir,buffer,sizeof buffer,FALSE,0,NULL,&ov,NULL); - ok(GetLastError()==ERROR_INVALID_PARAMETER,"last error wrong\n"); - ok(r==FALSE, "should return false\n"); - - r = pReadDirectoryChangesW(hdir,buffer,sizeof buffer,TRUE,filter,NULL,&ov,NULL); - ok(r==TRUE, "should return true\n"); - - r = WaitForSingleObject( ov.hEvent, 10 ); - ok( r == STATUS_TIMEOUT, "should timeout\n" ); - - r = CreateDirectoryW( subdir, NULL ); - ok( r == TRUE, "failed to create directory\n"); - - r = WaitForSingleObject( ov.hEvent, 1000 ); - ok( r == WAIT_OBJECT_0, "event should be ready\n" ); - - ok( ov.Internal == STATUS_SUCCESS, "ov.Internal wrong\n"); - ok( ov.InternalHigh == 0x12, "ov.InternalHigh wrong\n"); - - pfni = (PFILE_NOTIFY_INFORMATION) buffer; - ok( pfni->NextEntryOffset == 0, "offset wrong\n" ); - ok( pfni->Action == FILE_ACTION_ADDED, "action wrong\n" ); - ok( pfni->FileNameLength == 6, "len wrong\n" ); - ok( !memcmp(pfni->FileName,&szHoo[1],6), "name wrong\n" ); - - ResetEvent(ov.hEvent); - SetLastError(0xd0b00b00); - r = pReadDirectoryChangesW(hdir,buffer,sizeof buffer,FALSE,0,NULL,NULL,NULL); - ok(GetLastError()==ERROR_INVALID_PARAMETER,"last error wrong\n"); - ok(r==FALSE, "should return false\n"); - - r = pReadDirectoryChangesW(hdir,buffer,sizeof buffer,FALSE,0,NULL,&ov,NULL); - ok(GetLastError()==ERROR_INVALID_PARAMETER,"last error wrong\n"); - ok(r==FALSE, "should return false\n"); - - filter = FILE_NOTIFY_CHANGE_SIZE; - - SetEvent(ov.hEvent); - ov.Internal = 1; - ov.InternalHigh = 1; - S(U(ov)).Offset = 0; - S(U(ov)).OffsetHigh = 0; - memset( buffer, 0, sizeof buffer ); - r = pReadDirectoryChangesW(hdir,buffer,sizeof buffer,FALSE,filter,NULL,&ov,NULL); - ok(r==TRUE, "should return true\n"); - - ok( ov.Internal == STATUS_PENDING, "ov.Internal wrong\n"); - ok( ov.InternalHigh == 1, "ov.InternalHigh wrong\n"); - - r = WaitForSingleObject( ov.hEvent, 0 ); - ok( r == STATUS_TIMEOUT, "should timeout\n" ); - - r = RemoveDirectoryW( subdir ); - ok( r == TRUE, "failed to remove directory\n"); - - r = WaitForSingleObject( ov.hEvent, 1000 ); - ok( r == WAIT_OBJECT_0, "should be ready\n" ); - - ok( ov.Internal == STATUS_SUCCESS, "ov.Internal wrong\n"); - ok( ov.InternalHigh == 0x12, "ov.InternalHigh wrong\n"); - - if (ov.Internal == STATUS_SUCCESS) - { - r = GetOverlappedResult( hdir, &ov, &dwCount, TRUE ); - ok( r == TRUE, "getoverlappedresult failed\n"); - ok( dwCount == 0x12, "count wrong\n"); - } - - pfni = (PFILE_NOTIFY_INFORMATION) buffer; - ok( pfni->NextEntryOffset == 0, "offset wrong\n" ); - ok( pfni->Action == FILE_ACTION_REMOVED, "action wrong\n" ); - ok( pfni->FileNameLength == 6, "len wrong\n" ); - ok( !memcmp(pfni->FileName,&szHoo[1],6), "name wrong\n" ); - - /* what happens if the buffer is too small? */ - r = pReadDirectoryChangesW(hdir,buffer,0x10,FALSE,filter,NULL,&ov,NULL); - ok(r==TRUE, "should return true\n"); - - r = CreateDirectoryW( subdir, NULL ); - ok( r == TRUE, "failed to create directory\n"); - - r = WaitForSingleObject( ov.hEvent, 1000 ); - ok( r == WAIT_OBJECT_0, "should be ready\n" ); - - ok( ov.Internal == STATUS_NOTIFY_ENUM_DIR, "ov.Internal wrong\n"); - ok( ov.InternalHigh == 0, "ov.InternalHigh wrong\n"); - - /* test the recursive watch */ - r = pReadDirectoryChangesW(hdir,buffer,sizeof buffer,FALSE,filter,NULL,&ov,NULL); - ok(r==TRUE, "should return true\n"); - - r = CreateDirectoryW( subsubdir, NULL ); - ok( r == TRUE, "failed to create directory\n"); - - r = WaitForSingleObject( ov.hEvent, 1000 ); - ok( r == WAIT_OBJECT_0, "should be ready\n" ); - - ok( ov.Internal == STATUS_SUCCESS, "ov.Internal wrong\n"); - ok( ov.InternalHigh == 0x18, "ov.InternalHigh wrong\n"); - - pfni = (PFILE_NOTIFY_INFORMATION) buffer; - ok( pfni->NextEntryOffset == 0, "offset wrong\n" ); - ok( pfni->Action == FILE_ACTION_ADDED, "action wrong\n" ); - ok( pfni->FileNameLength == 6*sizeof(WCHAR), "len wrong\n" ); - ok( !memcmp(pfni->FileName,&szGa[1],6*sizeof(WCHAR)), "name wrong\n" ); - - r = RemoveDirectoryW( subsubdir ); - ok( r == TRUE, "failed to remove directory\n"); - - ov.Internal = 1; - ov.InternalHigh = 1; - r = pReadDirectoryChangesW(hdir,buffer,sizeof buffer,FALSE,filter,NULL,&ov,NULL); - ok(r==TRUE, "should return true\n"); - - r = RemoveDirectoryW( subdir ); - ok( r == TRUE, "failed to remove directory\n"); - - r = WaitForSingleObject( ov.hEvent, 1000 ); - ok( r == WAIT_OBJECT_0, "should be ready\n" ); - - pfni = (PFILE_NOTIFY_INFORMATION) buffer; - /* we may get a notification for the parent dir too */ - if (pfni->Action == FILE_ACTION_MODIFIED && pfni->NextEntryOffset) - { - ok( pfni->FileNameLength == 3*sizeof(WCHAR), "len wrong %u\n", pfni->FileNameLength ); - ok( !memcmp(pfni->FileName,&szGa[1],3*sizeof(WCHAR)), "name wrong\n" ); - pfni = (PFILE_NOTIFY_INFORMATION)((char *)pfni + pfni->NextEntryOffset); - } - ok( pfni->NextEntryOffset == 0, "offset wrong %u\n", pfni->NextEntryOffset ); - ok( pfni->Action == FILE_ACTION_REMOVED, "action wrong %u\n", pfni->Action ); - ok( pfni->FileNameLength == 6*sizeof(WCHAR), "len wrong %u\n", pfni->FileNameLength ); - ok( !memcmp(pfni->FileName,&szGa[1],6*sizeof(WCHAR)), "name wrong\n" ); - - ok( ov.Internal == STATUS_SUCCESS, "ov.Internal wrong\n"); - dwCount = (char *)&pfni->FileName[pfni->FileNameLength/sizeof(WCHAR)] - buffer; - ok( ov.InternalHigh == dwCount, "ov.InternalHigh wrong %lu/%u\n",ov.InternalHigh, dwCount ); - - CloseHandle(hdir); - - r = RemoveDirectoryW( path ); - ok( r == TRUE, "failed to remove directory\n"); -} - -/* show the behaviour when a null buffer is passed */ -static void test_readdirectorychanges_null(void) -{ - NTSTATUS r; - HANDLE hdir; - char buffer[0x1000]; - DWORD fflags, filter = 0; - OVERLAPPED ov; - WCHAR path[MAX_PATH], subdir[MAX_PATH]; - static const WCHAR szBoo[] = { '\\','b','o','o',0 }; - static const WCHAR szHoo[] = { '\\','h','o','o',0 }; - PFILE_NOTIFY_INFORMATION pfni; - - if (!pReadDirectoryChangesW) - { - win_skip("ReadDirectoryChangesW is not available\n"); - return; - } - SetLastError(0xdeadbeef); - r = GetTempPathW( MAX_PATH, path ); - if (!r && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) - { - win_skip("GetTempPathW is not implemented\n"); - return; - } - ok( r != 0, "temp path failed\n"); - if (!r) - return; - - lstrcatW( path, szBoo ); - lstrcpyW( subdir, path ); - lstrcatW( subdir, szHoo ); - - RemoveDirectoryW( subdir ); - RemoveDirectoryW( path ); - - r = CreateDirectoryW(path, NULL); - ok( r == TRUE, "failed to create directory\n"); - - fflags = FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED; - hdir = CreateFileW(path, GENERIC_READ|SYNCHRONIZE|FILE_LIST_DIRECTORY, - FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, - OPEN_EXISTING, fflags, NULL); - ok( hdir != INVALID_HANDLE_VALUE, "failed to open directory\n"); - - ov.hEvent = CreateEvent( NULL, 1, 0, NULL ); - - filter = FILE_NOTIFY_CHANGE_FILE_NAME; - filter |= FILE_NOTIFY_CHANGE_DIR_NAME; - - SetLastError(0xd0b00b00); - ov.Internal = 0; - ov.InternalHigh = 0; - memset( buffer, 0, sizeof buffer ); - - r = pReadDirectoryChangesW(hdir,NULL,0,FALSE,filter,NULL,&ov,NULL); - ok(r==TRUE, "should return true\n"); - - r = WaitForSingleObject( ov.hEvent, 0 ); - ok( r == STATUS_TIMEOUT, "should timeout\n" ); - - r = CreateDirectoryW( subdir, NULL ); - ok( r == TRUE, "failed to create directory\n"); - - r = WaitForSingleObject( ov.hEvent, 0 ); - ok( r == WAIT_OBJECT_0, "event should be ready\n" ); - - ok( ov.Internal == STATUS_NOTIFY_ENUM_DIR, "ov.Internal wrong\n"); - ok( ov.InternalHigh == 0, "ov.InternalHigh wrong\n"); - - ov.Internal = 0; - ov.InternalHigh = 0; - S(U(ov)).Offset = 0; - S(U(ov)).OffsetHigh = 0; - memset( buffer, 0, sizeof buffer ); - - r = pReadDirectoryChangesW(hdir,buffer,sizeof buffer,FALSE,filter,NULL,&ov,NULL); - ok(r==TRUE, "should return true\n"); - - r = WaitForSingleObject( ov.hEvent, 0 ); - ok( r == STATUS_TIMEOUT, "should timeout\n" ); - - r = RemoveDirectoryW( subdir ); - ok( r == TRUE, "failed to remove directory\n"); - - r = WaitForSingleObject( ov.hEvent, 1000 ); - ok( r == WAIT_OBJECT_0, "should be ready\n" ); - - ok( ov.Internal == STATUS_NOTIFY_ENUM_DIR, "ov.Internal wrong\n"); - ok( ov.InternalHigh == 0, "ov.InternalHigh wrong\n"); - - pfni = (PFILE_NOTIFY_INFORMATION) buffer; - ok( pfni->NextEntryOffset == 0, "offset wrong\n" ); - - CloseHandle(hdir); - - r = RemoveDirectoryW( path ); - ok( r == TRUE, "failed to remove directory\n"); -} - -static void test_readdirectorychanges_filedir(void) -{ - NTSTATUS r; - HANDLE hdir, hfile; - char buffer[0x1000]; - DWORD fflags, filter = 0; - OVERLAPPED ov; - WCHAR path[MAX_PATH], subdir[MAX_PATH], file[MAX_PATH]; - static const WCHAR szBoo[] = { '\\','b','o','o',0 }; - static const WCHAR szHoo[] = { '\\','h','o','o',0 }; - static const WCHAR szFoo[] = { '\\','f','o','o',0 }; - PFILE_NOTIFY_INFORMATION pfni; - - SetLastError(0xdeadbeef); - r = GetTempPathW( MAX_PATH, path ); - if (!r && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) - { - win_skip("GetTempPathW is not implemented\n"); - return; - } - ok( r != 0, "temp path failed\n"); - if (!r) - return; - - lstrcatW( path, szBoo ); - lstrcpyW( subdir, path ); - lstrcatW( subdir, szHoo ); - - lstrcpyW( file, path ); - lstrcatW( file, szFoo ); - - DeleteFileW( file ); - RemoveDirectoryW( subdir ); - RemoveDirectoryW( path ); - - r = CreateDirectoryW(path, NULL); - ok( r == TRUE, "failed to create directory\n"); - - fflags = FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED; - hdir = CreateFileW(path, GENERIC_READ|SYNCHRONIZE|FILE_LIST_DIRECTORY, - FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, - OPEN_EXISTING, fflags, NULL); - ok( hdir != INVALID_HANDLE_VALUE, "failed to open directory\n"); - - ov.hEvent = CreateEvent( NULL, 0, 0, NULL ); - - filter = FILE_NOTIFY_CHANGE_FILE_NAME; - - r = pReadDirectoryChangesW(hdir,buffer,sizeof buffer,TRUE,filter,NULL,&ov,NULL); - ok(r==TRUE, "should return true\n"); - - r = WaitForSingleObject( ov.hEvent, 10 ); - ok( r == WAIT_TIMEOUT, "should timeout\n" ); - - r = CreateDirectoryW( subdir, NULL ); - ok( r == TRUE, "failed to create directory\n"); - - hfile = CreateFileW( file, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL ); - ok( hfile != INVALID_HANDLE_VALUE, "failed to create file\n"); - ok( CloseHandle(hfile), "failed toc lose file\n"); - - r = WaitForSingleObject( ov.hEvent, 1000 ); - ok( r == WAIT_OBJECT_0, "event should be ready\n" ); - - ok( ov.Internal == STATUS_SUCCESS, "ov.Internal wrong\n"); - ok( ov.InternalHigh == 0x12, "ov.InternalHigh wrong\n"); - - pfni = (PFILE_NOTIFY_INFORMATION) buffer; - ok( pfni->NextEntryOffset == 0, "offset wrong\n" ); - ok( pfni->Action == FILE_ACTION_ADDED, "action wrong\n" ); - ok( pfni->FileNameLength == 6, "len wrong\n" ); - ok( !memcmp(pfni->FileName,&szFoo[1],6), "name wrong\n" ); - - r = DeleteFileW( file ); - ok( r == TRUE, "failed to delete file\n"); - - r = RemoveDirectoryW( subdir ); - ok( r == TRUE, "failed to remove directory\n"); - - CloseHandle(hdir); - - r = RemoveDirectoryW( path ); - ok( r == TRUE, "failed to remove directory\n"); -} - -static void CALLBACK readdirectorychanges_cr(DWORD error, DWORD len, LPOVERLAPPED ov) -{ - ok(error == 0, "ReadDirectoryChangesW error %d\n", error); - ok(ov->hEvent == (void*)0xdeadbeef, "hEvent should not have changed\n"); -} - -static void test_readdirectorychanges_cr(void) -{ - static const WCHAR szBoo[] = { '\\','b','o','o','\\',0 }; - static const WCHAR szDir[] = { 'd','i','r',0 }; - static const WCHAR szFile[] = { 'f','i','l','e',0 }; - static const WCHAR szBackslash[] = { '\\',0 }; - - WCHAR path[MAX_PATH], file[MAX_PATH], dir[MAX_PATH], sub_file[MAX_PATH]; - FILE_NOTIFY_INFORMATION fni[1024], *fni_next; - OVERLAPPED ov; - HANDLE hdir, hfile; - NTSTATUS r; - - if (!pReadDirectoryChangesW) - { - win_skip("ReadDirectoryChangesW is not available\n"); - return; - } - - SetLastError(0xdeadbeef); - r = GetTempPathW(MAX_PATH, path); - if (!r && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) - { - win_skip("GetTempPathW is not implemented\n"); - return; - } - ok(r != 0, "temp path failed\n"); - if (!r) - return; - - lstrcatW(path, szBoo); - lstrcpyW(dir, path); - lstrcatW(dir, szDir); - lstrcpyW(file, path); - lstrcatW(file, szFile); - lstrcpyW(sub_file, dir); - lstrcatW(sub_file, szBackslash); - lstrcatW(sub_file, szFile); - - DeleteFileW(file); - RemoveDirectoryW(dir); - RemoveDirectoryW(path); - - r = CreateDirectoryW(path, NULL); - ok(r == TRUE, "failed to create directory\n"); - - hdir = CreateFileW(path, GENERIC_READ, - FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, NULL, OPEN_EXISTING, - FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED, NULL); - ok(hdir != INVALID_HANDLE_VALUE, "failed to open directory\n"); - - memset(&ov, 0, sizeof(ov)); - ov.hEvent = (void*)0xdeadbeef; - r = pReadDirectoryChangesW(hdir, fni, sizeof(fni), FALSE, - FILE_NOTIFY_CHANGE_FILE_NAME, NULL, &ov, readdirectorychanges_cr); - ok(r == TRUE, "pReadDirectoryChangesW failed\n"); - - hfile = CreateFileW(file, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - ok(hfile != INVALID_HANDLE_VALUE, "failed to create file\n"); - CloseHandle(hfile); - - r = SleepEx(1000, TRUE); - ok(r != 0, "failed to receive file creation event\n"); - ok(fni->NextEntryOffset == 0, "there should be no more events in buffer\n"); - ok(fni->Action == FILE_ACTION_ADDED, "Action = %d\n", fni->Action); - ok(fni->FileNameLength == lstrlenW(szFile)*sizeof(WCHAR), - "FileNameLength = %d\n", fni->FileNameLength); - ok(!memcmp(fni->FileName, szFile, lstrlenW(szFile)*sizeof(WCHAR)), - "FileName = %s\n", wine_dbgstr_w(fni->FileName)); - - r = pReadDirectoryChangesW(hdir, fni, sizeof(fni), FALSE, - FILE_NOTIFY_CHANGE_FILE_NAME, NULL, &ov, readdirectorychanges_cr); - ok(r == TRUE, "pReadDirectoryChangesW failed\n"); - - /* This event will not be reported */ - r = CreateDirectoryW(dir, NULL); - ok(r == TRUE, "failed to create directory\n"); - - r = MoveFileW(file, sub_file); - ok(r == TRUE, "failed to move file\n"); - - r = SleepEx(1000, TRUE); - ok(r != 0, "failed to receive file move event\n"); - ok(fni->NextEntryOffset == 0, "there should be no more events in buffer\n"); - ok(fni->Action == FILE_ACTION_REMOVED, "Action = %d\n", fni->Action); - ok(fni->FileNameLength == lstrlenW(szFile)*sizeof(WCHAR), - "FileNameLength = %d\n", fni->FileNameLength); - ok(!memcmp(fni->FileName, szFile, lstrlenW(szFile)*sizeof(WCHAR)), - "FileName = %s\n", wine_dbgstr_w(fni->FileName)); - - r = pReadDirectoryChangesW(hdir, fni, sizeof(fni), FALSE, - FILE_NOTIFY_CHANGE_FILE_NAME, NULL, &ov, readdirectorychanges_cr); - ok(r == TRUE, "pReadDirectoryChangesW failed\n"); - - r = MoveFileW(sub_file, file); - ok(r == TRUE, "failed to move file\n"); - - r = SleepEx(1000, TRUE); - ok(r != 0, "failed to receive file move event\n"); - ok(fni->NextEntryOffset == 0, "there should be no more events in buffer\n"); - ok(fni->Action == FILE_ACTION_ADDED, "Action = %d\n", fni->Action); - ok(fni->FileNameLength == lstrlenW(szFile)*sizeof(WCHAR), - "FileNameLength = %d\n", fni->FileNameLength); - ok(!memcmp(fni->FileName, szFile, lstrlenW(szFile)*sizeof(WCHAR)), - "FileName = %s\n", wine_dbgstr_w(fni->FileName)); - - r = pReadDirectoryChangesW(hdir, fni, sizeof(fni), FALSE, - FILE_NOTIFY_CHANGE_FILE_NAME, NULL, &ov, readdirectorychanges_cr); - ok(r == TRUE, "pReadDirectoryChangesW failed\n"); - - r = DeleteFileW(file); - ok(r == TRUE, "failed to delete file\n"); - - r = SleepEx(1000, TRUE); - ok(r != 0, "failed to receive file removal event\n"); - ok(fni->NextEntryOffset == 0, "there should be no more events in buffer\n"); - ok(fni->Action == FILE_ACTION_REMOVED, "Action = %d\n", fni->Action); - ok(fni->FileNameLength == lstrlenW(szFile)*sizeof(WCHAR), - "FileNameLength = %d\n", fni->FileNameLength); - ok(!memcmp(fni->FileName, szFile, lstrlenW(szFile)*sizeof(WCHAR)), - "FileName = %s\n", wine_dbgstr_w(fni->FileName)); - - CloseHandle(hdir); - - hdir = CreateFileW(path, GENERIC_READ, - FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, NULL, OPEN_EXISTING, - FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED, NULL); - ok(hdir != INVALID_HANDLE_VALUE, "failed to open directory\n"); - - r = pReadDirectoryChangesW(hdir, fni, sizeof(fni), FALSE, - FILE_NOTIFY_CHANGE_DIR_NAME, NULL, &ov, readdirectorychanges_cr); - ok(r == TRUE, "pReadDirectoryChangesW failed\n"); - - r = MoveFileW(dir, file); - ok(r == TRUE, "failed to move directory\n"); - - r = SleepEx(1000, TRUE); - ok(r != 0, "failed to receive directory move event\n"); - if (fni->Action == FILE_ACTION_RENAMED_OLD_NAME) - { - ok(fni->Action == FILE_ACTION_RENAMED_OLD_NAME, "Action = %d\n", fni->Action); - ok(fni->FileNameLength == lstrlenW(szDir)*sizeof(WCHAR), - "FileNameLength = %d\n", fni->FileNameLength); - ok(!memcmp(fni->FileName, szDir, lstrlenW(szDir)*sizeof(WCHAR)), - "FileName = %s\n", wine_dbgstr_w(fni->FileName)); - ok(fni->NextEntryOffset != 0, "no next entry in movement event\n"); - fni_next = (FILE_NOTIFY_INFORMATION*)((char*)fni+fni->NextEntryOffset); - ok(fni_next->NextEntryOffset == 0, "there should be no more events in buffer\n"); - ok(fni_next->Action == FILE_ACTION_RENAMED_NEW_NAME, "Action = %d\n", fni_next->Action); - ok(fni_next->FileNameLength == lstrlenW(szFile)*sizeof(WCHAR), - "FileNameLength = %d\n", fni_next->FileNameLength); - ok(!memcmp(fni_next->FileName, szFile, lstrlenW(szFile)*sizeof(WCHAR)), - "FileName = %s\n", wine_dbgstr_w(fni_next->FileName)); - } - else - { - todo_wine ok(0, "Expected rename event\n"); - - if (fni->NextEntryOffset == 0) - { - r = pReadDirectoryChangesW(hdir, fni, sizeof(fni), FALSE, - FILE_NOTIFY_CHANGE_DIR_NAME, NULL, &ov, readdirectorychanges_cr); - ok(r == TRUE, "pReadDirectoryChangesW failed\n"); - - r = SleepEx(1000, TRUE); - ok(r != 0, "failed to receive directory move event\n"); - } - } - - r = CreateDirectoryW(dir, NULL); - ok(r == TRUE, "failed to create directory\n"); - - r = RemoveDirectoryW(dir); - ok(r == TRUE, "failed to remove directory\n"); - - r = pReadDirectoryChangesW(hdir, fni, sizeof(fni), FALSE, - FILE_NOTIFY_CHANGE_DIR_NAME, NULL, &ov, readdirectorychanges_cr); - ok(r == TRUE, "pReadDirectoryChangesW failed\n"); - - r = SleepEx(1000, TRUE); - ok(r != 0, "failed to receive directory creation event\n"); - ok(fni->Action == FILE_ACTION_ADDED, "Action = %d\n", fni->Action); - ok(fni->FileNameLength == lstrlenW(szDir)*sizeof(WCHAR), - "FileNameLength = %d\n", fni->FileNameLength); - ok(!memcmp(fni->FileName, szDir, lstrlenW(szDir)*sizeof(WCHAR)), - "FileName = %s\n", wine_dbgstr_w(fni->FileName)); - if (fni->NextEntryOffset) - fni_next = (FILE_NOTIFY_INFORMATION*)((char*)fni+fni->NextEntryOffset); - else - { - r = pReadDirectoryChangesW(hdir, fni, sizeof(fni), FALSE, - FILE_NOTIFY_CHANGE_DIR_NAME, NULL, &ov, readdirectorychanges_cr); - ok(r == TRUE, "pReadDirectoryChangesW failed\n"); - - r = SleepEx(1000, TRUE); - ok(r != 0, "failed to receive directory removal event\n"); - fni_next = fni; - } - ok(fni_next->NextEntryOffset == 0, "there should be no more events in buffer\n"); - ok(fni_next->Action == FILE_ACTION_REMOVED, "Action = %d\n", fni_next->Action); - ok(fni_next->FileNameLength == lstrlenW(szDir)*sizeof(WCHAR), - "FileNameLength = %d\n", fni_next->FileNameLength); - ok(!memcmp(fni_next->FileName, szDir, lstrlenW(szDir)*sizeof(WCHAR)), - "FileName = %s\n", wine_dbgstr_w(fni_next->FileName)); - - CloseHandle(hdir); - RemoveDirectoryW(file); - RemoveDirectoryW(path); -} - -static void test_ffcn_directory_overlap(void) -{ - HANDLE parent_watch, child_watch, parent_thread, child_thread; - char workdir[MAX_PATH], parentdir[MAX_PATH], childdir[MAX_PATH]; - char tempfile[MAX_PATH]; - DWORD threadId; - BOOL ret; - - /* Setup directory hierarchy */ - ret = GetTempPathA(MAX_PATH, workdir); - ok((ret > 0) && (ret <= MAX_PATH), - "GetTempPathA error: %d\n", GetLastError()); - - ret = GetTempFileNameA(workdir, "fcn", 0, tempfile); - ok(ret, "GetTempFileNameA error: %d\n", GetLastError()); - ret = DeleteFileA(tempfile); - ok(ret, "DeleteFileA error: %d\n", GetLastError()); - - lstrcpyA(parentdir, tempfile); - ret = CreateDirectoryA(parentdir, NULL); - ok(ret, "CreateDirectoryA error: %d\n", GetLastError()); - - lstrcpyA(childdir, parentdir); - lstrcatA(childdir, "\\c"); - ret = CreateDirectoryA(childdir, NULL); - ok(ret, "CreateDirectoryA error: %d\n", GetLastError()); - - - /* When recursively watching overlapping directories, changes in child - * should trigger notifications for both child and parent */ - parent_thread = StartNotificationThread(parentdir, TRUE, - FILE_NOTIFY_CHANGE_FILE_NAME); - child_thread = StartNotificationThread(childdir, TRUE, - FILE_NOTIFY_CHANGE_FILE_NAME); - - /* Create a file in child */ - ret = GetTempFileNameA(childdir, "fcn", 0, tempfile); - ok(ret, "GetTempFileNameA error: %d\n", GetLastError()); - - /* Both watches should trigger */ - ret = FinishNotificationThread(parent_thread); - ok(ret, "Missed parent notification\n"); - ret = FinishNotificationThread(child_thread); - ok(ret, "Missed child notification\n"); - - ret = DeleteFileA(tempfile); - ok(ret, "DeleteFileA error: %d\n", GetLastError()); - - - /* Removing a recursive parent watch should not affect child watches. Doing - * so used to crash wineserver. */ - parent_watch = FindFirstChangeNotificationA(parentdir, TRUE, - FILE_NOTIFY_CHANGE_FILE_NAME); - ok(parent_watch != INVALID_HANDLE_VALUE, - "FindFirstChangeNotification error: %d\n", GetLastError()); - child_watch = FindFirstChangeNotificationA(childdir, TRUE, - FILE_NOTIFY_CHANGE_FILE_NAME); - ok(child_watch != INVALID_HANDLE_VALUE, - "FindFirstChangeNotification error: %d\n", GetLastError()); - - ret = FindCloseChangeNotification(parent_watch); - ok(ret, "FindCloseChangeNotification error: %d\n", GetLastError()); - - child_thread = CreateThread(NULL, 0, NotificationThread, child_watch, 0, - &threadId); - ok(child_thread != NULL, "CreateThread error: %d\n", GetLastError()); - - /* Create a file in child */ - ret = GetTempFileNameA(childdir, "fcn", 0, tempfile); - ok(ret, "GetTempFileNameA error: %d\n", GetLastError()); - - /* Child watch should trigger */ - ret = FinishNotificationThread(child_thread); - ok(ret, "Missed child notification\n"); - - /* clean up */ - ret = DeleteFileA(tempfile); - ok(ret, "DeleteFileA error: %d\n", GetLastError()); - - ret = RemoveDirectoryA(childdir); - ok(ret, "RemoveDirectoryA error: %d\n", GetLastError()); - - ret = RemoveDirectoryA(parentdir); - ok(ret, "RemoveDirectoryA error: %d\n", GetLastError()); -} - -START_TEST(change) -{ - HMODULE hkernel32 = GetModuleHandle("kernel32"); - pReadDirectoryChangesW = (void *)GetProcAddress(hkernel32, "ReadDirectoryChangesW"); - - test_ffcnMultipleThreads(); - /* The above function runs a test that must occur before FindCloseChangeNotification is run in the - current thread to preserve the emptiness of the wine user APC queue. To ensure this it should be - placed first. */ - test_FindFirstChangeNotification(); - test_ffcn(); - test_readdirectorychanges(); - test_readdirectorychanges_null(); - test_readdirectorychanges_filedir(); - test_readdirectorychanges_cr(); - test_ffcn_directory_overlap(); -} diff --git a/rostests/winetests/kernel32/codepage.c b/rostests/winetests/kernel32/codepage.c deleted file mode 100755 index 8f9c4e11956..00000000000 --- a/rostests/winetests/kernel32/codepage.c +++ /dev/null @@ -1,412 +0,0 @@ -/* - * Unit tests for code page to/from unicode translations - * - * Copyright (c) 2002 Dmitry Timoshkov - * Copyright (c) 2008 Colin Finck - * - * 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 "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winnls.h" - -static const WCHAR foobarW[] = {'f','o','o','b','a','r',0}; - -static void test_destination_buffer(void) -{ - LPSTR buffer; - INT maxsize; - INT needed; - INT len; - - SetLastError(0xdeadbeef); - needed = WideCharToMultiByte(CP_ACP, 0, foobarW, -1, NULL, 0, NULL, NULL); - ok( (needed > 0), "returned %d with %u (expected '> 0')\n", - needed, GetLastError()); - - maxsize = needed*2; - buffer = HeapAlloc(GetProcessHeap(), 0, maxsize); - if (buffer == NULL) return; - - maxsize--; - memset(buffer, 'x', maxsize); - buffer[maxsize] = '\0'; - SetLastError(0xdeadbeef); - len = WideCharToMultiByte(CP_ACP, 0, foobarW, -1, buffer, needed+1, NULL, NULL); - ok( (len > 0), "returned %d with %u and '%s' (expected '> 0')\n", - len, GetLastError(), buffer); - - memset(buffer, 'x', maxsize); - buffer[maxsize] = '\0'; - SetLastError(0xdeadbeef); - len = WideCharToMultiByte(CP_ACP, 0, foobarW, -1, buffer, needed, NULL, NULL); - ok( (len > 0), "returned %d with %u and '%s' (expected '> 0')\n", - len, GetLastError(), buffer); - - memset(buffer, 'x', maxsize); - buffer[maxsize] = '\0'; - SetLastError(0xdeadbeef); - len = WideCharToMultiByte(CP_ACP, 0, foobarW, -1, buffer, needed-1, NULL, NULL); - ok( !len && (GetLastError() == ERROR_INSUFFICIENT_BUFFER), - "returned %d with %u and '%s' (expected '0' with " - "ERROR_INSUFFICIENT_BUFFER)\n", len, GetLastError(), buffer); - - memset(buffer, 'x', maxsize); - buffer[maxsize] = '\0'; - SetLastError(0xdeadbeef); - len = WideCharToMultiByte(CP_ACP, 0, foobarW, -1, buffer, 1, NULL, NULL); - ok( !len && (GetLastError() == ERROR_INSUFFICIENT_BUFFER), - "returned %d with %u and '%s' (expected '0' with " - "ERROR_INSUFFICIENT_BUFFER)\n", len, GetLastError(), buffer); - - SetLastError(0xdeadbeef); - len = WideCharToMultiByte(CP_ACP, 0, foobarW, -1, buffer, 0, NULL, NULL); - ok( (len > 0), "returned %d with %u (expected '> 0')\n", - len, GetLastError()); - - SetLastError(0xdeadbeef); - len = WideCharToMultiByte(CP_ACP, 0, foobarW, -1, NULL, needed, NULL, NULL); - ok( !len && (GetLastError() == ERROR_INVALID_PARAMETER), - "returned %d with %u (expected '0' with " - "ERROR_INVALID_PARAMETER)\n", len, GetLastError()); - - HeapFree(GetProcessHeap(), 0, buffer); -} - - -static void test_null_source(void) -{ - int len; - DWORD GLE; - - SetLastError(0); - len = WideCharToMultiByte(CP_ACP, 0, NULL, 0, NULL, 0, NULL, NULL); - GLE = GetLastError(); - ok(!len && GLE == ERROR_INVALID_PARAMETER, - "WideCharToMultiByte returned %d with GLE=%u (expected 0 with ERROR_INVALID_PARAMETER)\n", - len, GLE); - - SetLastError(0); - len = WideCharToMultiByte(CP_ACP, 0, NULL, -1, NULL, 0, NULL, NULL); - GLE = GetLastError(); - ok(!len && GLE == ERROR_INVALID_PARAMETER, - "WideCharToMultiByte returned %d with GLE=%u (expected 0 with ERROR_INVALID_PARAMETER)\n", - len, GLE); -} - -static void test_negative_source_length(void) -{ - int len; - char buf[10]; - WCHAR bufW[10]; - - /* Test, whether any negative source length works as strlen() + 1 */ - SetLastError( 0xdeadbeef ); - memset(buf,'x',sizeof(buf)); - len = WideCharToMultiByte(CP_ACP, 0, foobarW, -2002, buf, 10, NULL, NULL); - ok(len == 7 && GetLastError() == 0xdeadbeef, - "WideCharToMultiByte(-2002): len=%d error=%u\n", len, GetLastError()); - ok(!lstrcmpA(buf, "foobar"), - "WideCharToMultiByte(-2002): expected \"foobar\" got \"%s\"\n", buf); - - SetLastError( 0xdeadbeef ); - memset(bufW,'x',sizeof(bufW)); - len = MultiByteToWideChar(CP_ACP, 0, "foobar", -2002, bufW, 10); - ok(len == 7 && !lstrcmpW(bufW, foobarW) && GetLastError() == 0xdeadbeef, - "MultiByteToWideChar(-2002): len=%d error=%u\n", len, GetLastError()); - - SetLastError(0xdeadbeef); - memset(bufW, 'x', sizeof(bufW)); - len = MultiByteToWideChar(CP_ACP, 0, "foobar", -1, bufW, 6); - ok(len == 0 && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "MultiByteToWideChar(-1): len=%d error=%u\n", len, GetLastError()); -} - -#define LONGBUFLEN 100000 -static void test_negative_dest_length(void) -{ - int len, i; - static char buf[LONGBUFLEN]; - static WCHAR originalW[LONGBUFLEN]; - static char originalA[LONGBUFLEN]; - DWORD theError; - - /* Test return on -1 dest length */ - SetLastError( 0xdeadbeef ); - memset(buf,'x',sizeof(buf)); - len = WideCharToMultiByte(CP_ACP, 0, foobarW, -1, buf, -1, NULL, NULL); - todo_wine { - ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, - "WideCharToMultiByte(destlen -1): len=%d error=%x\n", len, GetLastError()); - } - - /* Test return on -1000 dest length */ - SetLastError( 0xdeadbeef ); - memset(buf,'x',sizeof(buf)); - len = WideCharToMultiByte(CP_ACP, 0, foobarW, -1, buf, -1000, NULL, NULL); - todo_wine { - ok(len == 0 && GetLastError() == ERROR_INVALID_PARAMETER, - "WideCharToMultiByte(destlen -1000): len=%d error=%x\n", len, GetLastError()); - } - - /* Test return on INT_MAX dest length */ - SetLastError( 0xdeadbeef ); - memset(buf,'x',sizeof(buf)); - len = WideCharToMultiByte(CP_ACP, 0, foobarW, -1, buf, INT_MAX, NULL, NULL); - ok(len == 7 && !lstrcmpA(buf, "foobar") && GetLastError() == 0xdeadbeef, - "WideCharToMultiByte(destlen INT_MAX): len=%d error=%x\n", len, GetLastError()); - - /* Test return on INT_MAX dest length and very long input */ - SetLastError( 0xdeadbeef ); - memset(buf,'x',sizeof(buf)); - for (i=0; i < LONGBUFLEN - 1; i++) { - originalW[i] = 'Q'; - originalA[i] = 'Q'; - } - originalW[LONGBUFLEN-1] = 0; - originalA[LONGBUFLEN-1] = 0; - len = WideCharToMultiByte(CP_ACP, 0, originalW, -1, buf, INT_MAX, NULL, NULL); - theError = GetLastError(); - ok(len == LONGBUFLEN && !lstrcmpA(buf, originalA) && theError == 0xdeadbeef, - "WideCharToMultiByte(srclen %d, destlen INT_MAX): len %d error=%x\n", LONGBUFLEN, len, theError); - -} - -static void test_overlapped_buffers(void) -{ - static const WCHAR strW[] = {'j','u','s','t',' ','a',' ','t','e','s','t',0}; - static const char strA[] = "just a test"; - char buf[256]; - int ret; - - SetLastError(0xdeadbeef); - memcpy(buf + 1, strW, sizeof(strW)); - ret = WideCharToMultiByte(CP_ACP, 0, (WCHAR *)(buf + 1), -1, buf, sizeof(buf), NULL, NULL); - ok(ret == sizeof(strA), "unexpected ret %d\n", ret); - ok(!memcmp(buf, strA, sizeof(strA)), "conversion failed: %s\n", buf); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); -} - -static void test_string_conversion(LPBOOL bUsedDefaultChar) -{ - char mbc; - char mbs[5]; - int ret; - WCHAR wc1 = 228; /* Western Windows-1252 character */ - WCHAR wc2 = 1088; /* Russian Windows-1251 character not displayable for Windows-1252 */ - WCHAR wcs[5] = {'T', 'h', 1088, 'i', 0}; /* String with ASCII characters and a Russian character */ - WCHAR dbwcs[3] = {28953, 25152, 0}; /* String with Chinese (codepage 950) characters */ - - SetLastError(0xdeadbeef); - ret = WideCharToMultiByte(1252, 0, &wc1, 1, &mbc, 1, NULL, bUsedDefaultChar); - ok(ret == 1, "ret is %d\n", ret); - ok(mbc == -28, "mbc is %d\n", mbc); - if(bUsedDefaultChar) ok(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = WideCharToMultiByte(1252, 0, &wc2, 1, &mbc, 1, NULL, bUsedDefaultChar); - ok(ret == 1, "ret is %d\n", ret); - ok(mbc == 63, "mbc is %d\n", mbc); - if(bUsedDefaultChar) ok(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); - - if (IsValidCodePage(1251)) - { - SetLastError(0xdeadbeef); - ret = WideCharToMultiByte(1251, 0, &wc2, 1, &mbc, 1, NULL, bUsedDefaultChar); - ok(ret == 1, "ret is %d\n", ret); - ok(mbc == -16, "mbc is %d\n", mbc); - if(bUsedDefaultChar) ok(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == 0xdeadbeef || - broken(GetLastError() == 0), /* win95 */ - "GetLastError() is %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = WideCharToMultiByte(1251, 0, &wc1, 1, &mbc, 1, NULL, bUsedDefaultChar); - ok(ret == 1, "ret is %d\n", ret); - ok(mbc == 97, "mbc is %d\n", mbc); - if(bUsedDefaultChar) ok(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); - } - else - skip("Codepage 1251 not available\n"); - - /* This call triggers the last Win32 error */ - SetLastError(0xdeadbeef); - ret = WideCharToMultiByte(1252, 0, wcs, -1, &mbc, 1, NULL, bUsedDefaultChar); - ok(ret == 0, "ret is %d\n", ret); - ok(mbc == 84, "mbc is %d\n", mbc); - if(bUsedDefaultChar) ok(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() is %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = WideCharToMultiByte(1252, 0, wcs, -1, mbs, sizeof(mbs), NULL, bUsedDefaultChar); - ok(ret == 5, "ret is %d\n", ret); - ok(!strcmp(mbs, "Th?i"), "mbs is %s\n", mbs); - if(bUsedDefaultChar) ok(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); - mbs[0] = 0; - - /* WideCharToMultiByte mustn't add any null character automatically. - So in this case, we should get the same string again, even if we only copied the first three bytes. */ - SetLastError(0xdeadbeef); - ret = WideCharToMultiByte(1252, 0, wcs, 3, mbs, sizeof(mbs), NULL, bUsedDefaultChar); - ok(ret == 3, "ret is %d\n", ret); - ok(!strcmp(mbs, "Th?i"), "mbs is %s\n", mbs); - if(bUsedDefaultChar) ok(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); - ZeroMemory(mbs, 5); - - /* Now this shouldn't be the case like above as we zeroed the complete string buffer. */ - SetLastError(0xdeadbeef); - ret = WideCharToMultiByte(1252, 0, wcs, 3, mbs, sizeof(mbs), NULL, bUsedDefaultChar); - ok(ret == 3, "ret is %d\n", ret); - ok(!strcmp(mbs, "Th?"), "mbs is %s\n", mbs); - if(bUsedDefaultChar) ok(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); - - /* Double-byte tests */ - ret = WideCharToMultiByte(1252, 0, dbwcs, 3, mbs, sizeof(mbs), NULL, bUsedDefaultChar); - ok(ret == 3, "ret is %d\n", ret); - ok(!strcmp(mbs, "??"), "mbs is %s\n", mbs); - if(bUsedDefaultChar) ok(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - - /* Length-only tests */ - SetLastError(0xdeadbeef); - ret = WideCharToMultiByte(1252, 0, &wc2, 1, NULL, 0, NULL, bUsedDefaultChar); - ok(ret == 1, "ret is %d\n", ret); - if(bUsedDefaultChar) ok(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = WideCharToMultiByte(1252, 0, wcs, -1, NULL, 0, NULL, bUsedDefaultChar); - ok(ret == 5, "ret is %d\n", ret); - if(bUsedDefaultChar) ok(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); - - if (!IsValidCodePage(950)) - { - skip("Codepage 950 not available\n"); - return; - } - - /* Double-byte tests */ - SetLastError(0xdeadbeef); - ret = WideCharToMultiByte(950, 0, dbwcs, -1, mbs, sizeof(mbs), NULL, bUsedDefaultChar); - ok(ret == 5, "ret is %d\n", ret); - ok(!strcmp(mbs, "\xb5H\xa9\xd2"), "mbs is %s\n", mbs); - if(bUsedDefaultChar) ok(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = WideCharToMultiByte(950, 0, dbwcs, 1, &mbc, 1, NULL, bUsedDefaultChar); - ok(ret == 0, "ret is %d\n", ret); - if(bUsedDefaultChar) ok(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() is %u\n", GetLastError()); - ZeroMemory(mbs, 5); - - SetLastError(0xdeadbeef); - ret = WideCharToMultiByte(950, 0, dbwcs, 1, mbs, sizeof(mbs), NULL, bUsedDefaultChar); - ok(ret == 2, "ret is %d\n", ret); - ok(!strcmp(mbs, "\xb5H"), "mbs is %s\n", mbs); - if(bUsedDefaultChar) ok(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); - - /* Length-only tests */ - SetLastError(0xdeadbeef); - ret = WideCharToMultiByte(950, 0, dbwcs, 1, NULL, 0, NULL, bUsedDefaultChar); - ok(ret == 2, "ret is %d\n", ret); - if(bUsedDefaultChar) ok(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = WideCharToMultiByte(950, 0, dbwcs, -1, NULL, 0, NULL, bUsedDefaultChar); - ok(ret == 5, "ret is %d\n", ret); - if(bUsedDefaultChar) ok(*bUsedDefaultChar == FALSE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); - ok(GetLastError() == 0xdeadbeef, "GetLastError() is %u\n", GetLastError()); -} - -static void test_undefined_byte_char(void) -{ - static const struct tag_testset { - INT codepage; - LPCSTR str; - BOOL is_error; - } testset[] = { - { 874, "\xdd", TRUE }, - { 932, "\xfe", TRUE }, - { 932, "\x80", FALSE }, - { 936, "\xff", TRUE }, - { 949, "\xff", TRUE }, - { 950, "\xff", TRUE }, - { 1252, "\x90", FALSE }, - { 1253, "\xaa", TRUE }, - { 1255, "\xff", TRUE }, - { 1257, "\xa5", TRUE }, - }; - INT i, ret; - - for (i = 0; i < (sizeof(testset) / sizeof(testset[0])); i++) { - if (! IsValidCodePage(testset[i].codepage)) - { - skip("Codepage %d not available\n", testset[i].codepage); - continue; - } - - SetLastError(0xdeadbeef); - ret = MultiByteToWideChar(testset[i].codepage, MB_ERR_INVALID_CHARS, - testset[i].str, -1, NULL, 0); - if (testset[i].is_error) { - ok(ret == 0 && GetLastError() == ERROR_NO_UNICODE_TRANSLATION, - "ret is %d, GetLastError is %u (cp %d)\n", - ret, GetLastError(), testset[i].codepage); - } - else { - ok(ret == strlen(testset[i].str)+1 && GetLastError() == 0xdeadbeef, - "ret is %d, GetLastError is %u (cp %d)\n", - ret, GetLastError(), testset[i].codepage); - } - - SetLastError(0xdeadbeef); - ret = MultiByteToWideChar(testset[i].codepage, 0, - testset[i].str, -1, NULL, 0); - ok(ret == strlen(testset[i].str)+1 && GetLastError() == 0xdeadbeef, - "ret is %d, GetLastError is %u (cp %d)\n", - ret, GetLastError(), testset[i].codepage); - } -} - -START_TEST(codepage) -{ - BOOL bUsedDefaultChar; - - test_destination_buffer(); - test_null_source(); - test_negative_source_length(); - test_negative_dest_length(); - test_overlapped_buffers(); - - /* WideCharToMultiByte has two code paths, test both here */ - test_string_conversion(NULL); - test_string_conversion(&bUsedDefaultChar); - - test_undefined_byte_char(); -} diff --git a/rostests/winetests/kernel32/comm.c b/rostests/winetests/kernel32/comm.c deleted file mode 100755 index b08174f3520..00000000000 --- a/rostests/winetests/kernel32/comm.c +++ /dev/null @@ -1,1754 +0,0 @@ -/* Unit test suite for comm functions - * - * Copyright 2003 Kevin Groeneveld - * Copyright 2005 Uwe Bonnes - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -#include "wine/test.h" -#include "winbase.h" -#include "winnls.h" - -#define TIMEOUT 1000 /* one second for Timeouts*/ -#define SLOWBAUD 150 -#define FASTBAUD 115200 -#define TIMEDELTA 150 /* 150 ms uncertainty allowed */ - -/* Define the appropriate LOOPBACK(s) TRUE if you have a Loopback cable with - * the mentioned shorts connected to your Serial port - */ -#define LOOPBACK_TXD_RXD FALSE /* Sub-D 9: Short 2-3 */ -#define LOOPBACK_CTS_RTS FALSE /* Sub-D 9: Short 7-8 */ -#define LOOPBACK_DTR_DSR FALSE /* Sub-D 9: Short 4-6 */ -#define LOOPBACK_DTR_RING FALSE /* Sub-D 9: Short 4-9 */ -#define LOOPBACK_DTR_DCD FALSE /* Sub-D 9: Short 4-1 */ -/* Many Linux serial drivers have the TIOCM_LOOP flag in the TIOCM_SET ioctl - * available. For the 8250 this is equivalent to TXD->RXD, OUT2->DCD, - * OUT1->RI, RTS->CTS and DTR->DSR - */ - -typedef struct -{ - char string[100]; - BOOL result; - BOOL old_style; - DCB dcb1, dcb2; - COMMTIMEOUTS timeouts1, timeouts2; -} TEST; - -static TEST test[] = -{ - { - "baud=9600 parity=e data=5 stop=1 xon=on odsr=off octs=off dtr=on rts=on idsr=on", - TRUE, FALSE, - { 0x00000000, 0x00002580, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x05, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0x00002580, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0x05, 0x02, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "baud=0 parity=M data=6 stop=1.5 xon=off odsr=on octs=ON dtr=off rts=off idsr=OFF", - TRUE, FALSE, - { 0x00000000, 0x00000000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x06, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0x00000000, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0x06, 0x03, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "BAUD=4000000000 parity=n data=7 stop=2 to=off", - TRUE, FALSE, - { 0x00000000, 0xee6b2800, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x07, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0xee6b2800, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0x07, 0x00, 0x02, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } - }, - { - "Baud=115200 Parity=O Data=8 To=On", - TRUE, FALSE, - { 0x00000000, 0x0001c200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x08, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0x0001c200, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0x08, 0x01, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000EA60 }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000EA60 } - }, - { - "PaRiTy=s Data=7 DTR=on", - TRUE, FALSE, - { 0x00000000, 0x00000000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x07, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0xffffffff, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0x07, 0x04, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "data=4", - FALSE, FALSE, - { 0x00000000, 0x00000000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0xffffffff, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "data=9", - FALSE, FALSE, - { 0x00000000, 0x00000000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0xffffffff, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "parity=no", - FALSE, FALSE, - { 0x00000000, 0x00000000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0xffffffff, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "stop=0", - FALSE, FALSE, - { 0x00000000, 0x00000000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0xffffffff, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "stop=1.501", - FALSE, FALSE, - { 0x00000000, 0x00000000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0xffffffff, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "stop=3", - FALSE, FALSE, - { 0x00000000, 0x00000000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0xffffffff, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "to=foobar", - FALSE, FALSE, - { 0x00000000, 0x00000000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0xffffffff, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - " baud=9600", - FALSE, FALSE, - { 0x00000000, 0x00000000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0xffffffff, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "baud= 9600", - FALSE, FALSE, - { 0x00000000, 0x00000000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0xffffffff, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "baud=9600,data=8", - FALSE, FALSE, - { 0x00000000, 0x00000000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0xffffffff, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "11,n,8,1", - TRUE, TRUE, - { 0x00000000, 0x0000006e, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0x0000006e, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "30 ,E, 5,1.5", - TRUE, TRUE, - { 0x00000000, 0x0000012c, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x05, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0x0000012c, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0x05, 0x02, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "60, m, 6, 2 ", - TRUE, TRUE, - { 0x00000000, 0x00000258, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x06, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0x00000258, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0x06, 0x03, 0x02, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "12 , o , 7 , 1", - TRUE, TRUE, - { 0x00000000, 0x000004b0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0x000004b0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0x07, 0x01, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "24,s,8,1.5", - TRUE, TRUE, - { 0x00000000, 0x00000960, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x08, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0x00000960, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0x08, 0x04, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "48,n,8,1,p", - TRUE, TRUE, - { 0x00000000, 0x000012c0, 0, 0, 1, 1, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0x000012c0, 1, 1, 1, 1, 2, 1, 1, 0, 0, 1, 1, 2, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "96,N,8,1 , x ", - TRUE, TRUE, - { 0x00000000, 0x00002580, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0x00002580, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "19, e, 7, 1, x", - TRUE, TRUE, - { 0x00000000, 0x00004b00, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x07, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0x00004b00, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0x07, 0x02, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "0,M,7,1,P", - TRUE, TRUE, - { 0x00000000, 0x00000000, 0, 0, 1, 1, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0x00000000, 1, 1, 1, 1, 2, 1, 1, 0, 0, 1, 1, 2, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0x07, 0x03, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "4000000000,O,7,1.5,X", - TRUE, TRUE, - { 0x00000000, 0xee6b2800, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x07, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0xee6b2800, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0x07, 0x01, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "96,N,8,1 to=on", - FALSE, TRUE, - { 0x00000000, 0x00000000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0xffffffff, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "96,NO,8,1", - FALSE, TRUE, - { 0x00000000, 0x00000000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0xffffffff, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "96,N,4,1", - FALSE, TRUE, - { 0x00000000, 0x00000000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0xffffffff, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "96,N,9,1", - FALSE, TRUE, - { 0x00000000, 0x00000000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0xffffffff, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "96,N,8,0", - FALSE, TRUE, - { 0x00000000, 0x00000000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0xffffffff, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "96,N,8,3", - FALSE, TRUE, - { 0x00000000, 0x00000000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0xffffffff, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "96,N,8,1,K", - FALSE, TRUE, - { 0x00000000, 0x00000000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0xffffffff, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "COM0:baud=115200", - FALSE, FALSE, - { 0x00000000, 0x00000000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0xffffffff, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "COMx:baud=38400 data=8", - TRUE, FALSE, - { 0x00000000, 0x00009600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0x00009600, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0x08, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "COMx :to=on stop=1.5", - TRUE, FALSE, - { 0x00000000, 0x00000000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0xffffffff, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0xff, 0xff, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000EA60 }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000EA60 } - }, - { - "COMx: baud=12345 data=7", - TRUE, FALSE, - { 0x00000000, 0x00003039, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0x00003039, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0x07, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "COMx : xon=on odsr=off", - TRUE, FALSE, - { 0x00000000, 0x00000000, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0xffffffff, 1, 1, 1, 0, 3, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "COM0:9600,N,8,1", - FALSE, TRUE, - { 0x00000000, 0x00000000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0xffffffff, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "COMx:9600,N,8,1", - TRUE, TRUE, - { 0x00000000, 0x00002580, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0x00002580, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0x08, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "COMx: 11,E,7,2", - TRUE, TRUE, - { 0x00000000, 0x0000006e, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x07, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0x0000006e, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0x07, 0x02, 0x02, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "COMx :19,M,5,1", - TRUE, TRUE, - { 0x00000000, 0x00004b00, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x05, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0x00004b00, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0x05, 0x03, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, - { - "COMx : 57600,S,6,2,x", - TRUE, TRUE, - { 0x00000000, 0x0000e100, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0x00000, 0x0000, 0x0000, 0x0000, 0x06, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 }, - { 0xffffffff, 0x0000e100, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0x1ffff, 0xffff, 0xffff, 0xffff, 0x06, 0x04, 0x02, 0xff, 0xff, 0xff, 0xff, 0xff, 0xffff }, - { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, - { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } - }, -}; - -#define TEST_COUNT (sizeof(test) / sizeof(TEST)) - -/* This function can be useful if you are modifying the test cases and want to - output the contents of a DCB structure. */ -/*static print_dcb(DCB *pdcb) -{ - printf("0x%08x, 0x%08x, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, 0x%05x, 0x%04x, 0x%04x, 0x%04x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%04x\n", - pdcb->DCBlength, - pdcb->BaudRate, - pdcb->fBinary, - pdcb->fParity, - pdcb->fOutxCtsFlow, - pdcb->fOutxDsrFlow, - pdcb->fDtrControl, - pdcb->fDsrSensitivity, - pdcb->fTXContinueOnXoff, - pdcb->fOutX, - pdcb->fInX, - pdcb->fErrorChar, - pdcb->fNull, - pdcb->fRtsControl, - pdcb->fAbortOnError, - pdcb->fDummy2, - pdcb->wReserved, - pdcb->XonLim, - pdcb->XoffLim, - pdcb->ByteSize, - pdcb->Parity, - pdcb->StopBits, - pdcb->XonChar & 0xff, - pdcb->XoffChar & 0xff, - pdcb->ErrorChar & 0xff, - pdcb->EofChar & 0xff, - pdcb->EvtChar & 0xff, - pdcb->wReserved1 & 0xffff ); -} */ - -static void check_result(const char *function, TEST *ptest, int initial_value, BOOL result) -{ - DWORD LastError = GetLastError(); - DWORD CorrectError = (ptest->result ? 0xdeadbeef : ERROR_INVALID_PARAMETER); - - ok(LastError == CorrectError, "%s(\"%s\"), 0x%02x: GetLastError() returned %d, should be %d\n", function, ptest->string, initial_value, LastError, CorrectError); - ok(result == ptest->result, "%s(\"%s\"), 0x%02x: return value should be %s\n", function, ptest->string, initial_value, ptest->result ? "TRUE" : "FALSE"); -} - -#define check_dcb_member(a,b) ok(pdcb1->a == pdcb2->a, "%s(\"%s\"), 0x%02x: "#a" is "b", should be "b"\n", function, ptest->string, initial_value, pdcb1->a, pdcb2->a) -#define check_dcb_member2(a,c,b) if(pdcb2->a == c) { check_dcb_member(a,b); } else { ok(pdcb1->a == pdcb2->a || pdcb1->a == c, "%s(\"%s\"), 0x%02x: "#a" is "b", should be "b" or "b"\n", function, ptest->string, initial_value, pdcb1->a, pdcb2->a, c); } - -static void check_dcb(const char *function, TEST *ptest, int initial_value, DCB *pdcb1, DCB *pdcb2) -{ - /* DCBlength is a special case since Win 9x sets it but NT does not. - We will accept either as correct. */ - check_dcb_member2(DCBlength, (DWORD)sizeof(DCB), "%u"); - - /* For old style control strings Win 9x does not set the next five members, NT does. */ - if(ptest->old_style && ptest->result) - { - check_dcb_member2(fOutxCtsFlow, ((unsigned int)initial_value & 1), "%u"); - check_dcb_member2(fDtrControl, ((unsigned int)initial_value & 3), "%u"); - check_dcb_member2(fOutX, ((unsigned int)initial_value & 1), "%u"); - check_dcb_member2(fInX, ((unsigned)initial_value & 1), "%u"); - check_dcb_member2(fRtsControl, ((unsigned)initial_value & 3), "%u"); - } - else - { - check_dcb_member(fOutxCtsFlow, "%u"); - check_dcb_member(fDtrControl, "%u"); - check_dcb_member(fOutX, "%u"); - check_dcb_member(fInX, "%u"); - check_dcb_member(fRtsControl, "%u"); - } - - if(ptest->result) - { - /* For the idsr=xxx parameter, NT sets fDsrSensitivity, 9x sets - fOutxDsrFlow. */ - if(!ptest->old_style) - { - check_dcb_member2(fOutxDsrFlow, pdcb2->fDsrSensitivity, "%u"); - check_dcb_member2(fDsrSensitivity, pdcb2->fOutxDsrFlow, "%u"); - } - else - { - /* For old style control strings Win 9x does not set the - fOutxDsrFlow member, NT does. */ - check_dcb_member2(fOutxDsrFlow, ((unsigned int)initial_value & 1), "%u"); - check_dcb_member(fDsrSensitivity, "%u"); - } - } - else - { - check_dcb_member(fOutxDsrFlow, "%u"); - check_dcb_member(fDsrSensitivity, "%u"); - } - - /* Check the result of the DCB members. */ - check_dcb_member(BaudRate, "%u"); - check_dcb_member(fBinary, "%u"); - check_dcb_member(fParity, "%u"); - check_dcb_member(fTXContinueOnXoff, "%u"); - check_dcb_member(fErrorChar, "%u"); - check_dcb_member(fNull, "%u"); - check_dcb_member(fAbortOnError, "%u"); - check_dcb_member(fDummy2, "%u"); - check_dcb_member(wReserved, "%u"); - check_dcb_member(XonLim, "%u"); - check_dcb_member(XoffLim, "%u"); - check_dcb_member(ByteSize, "%u"); - check_dcb_member(Parity, "%u"); - check_dcb_member(StopBits, "%u"); - check_dcb_member(XonChar, "%d"); - check_dcb_member(XoffChar, "%d"); - check_dcb_member(ErrorChar, "%d"); - check_dcb_member(EofChar, "%d"); - check_dcb_member(EvtChar, "%d"); - check_dcb_member(wReserved1, "%u"); -} - -#define check_timeouts_member(a) ok(ptimeouts1->a == ptimeouts2->a, "%s(\"%s\"), 0x%02x: "#a" is %u, should be %u\n", function, ptest->string, initial_value, ptimeouts1->a, ptimeouts2->a); - -static void check_timeouts(const char *function, TEST *ptest, int initial_value, COMMTIMEOUTS *ptimeouts1, COMMTIMEOUTS *ptimeouts2) -{ - check_timeouts_member(ReadIntervalTimeout); - check_timeouts_member(ReadTotalTimeoutMultiplier); - check_timeouts_member(ReadTotalTimeoutConstant); - check_timeouts_member(WriteTotalTimeoutMultiplier); - check_timeouts_member(WriteTotalTimeoutConstant); -} - -static void test_BuildCommDCBA(TEST *ptest, int initial_value, DCB *pexpected_dcb) -{ - BOOL result; - DCB dcb; - - /* set initial conditions */ - memset(&dcb, initial_value, sizeof(DCB)); - SetLastError(0xdeadbeef); - - result = BuildCommDCBA(ptest->string, &dcb); - - /* check results */ - check_result("BuildCommDCBA", ptest, initial_value, result); - check_dcb("BuildCommDCBA", ptest, initial_value, &dcb, pexpected_dcb); -} - -static void test_BuildCommDCBAndTimeoutsA(TEST *ptest, int initial_value, DCB *pexpected_dcb, COMMTIMEOUTS *pexpected_timeouts) -{ - BOOL result; - DCB dcb; - COMMTIMEOUTS timeouts; - - /* set initial conditions */ - memset(&dcb, initial_value, sizeof(DCB)); - memset(&timeouts, initial_value, sizeof(COMMTIMEOUTS)); - SetLastError(0xdeadbeef); - - result = BuildCommDCBAndTimeoutsA(ptest->string, &dcb, &timeouts); - - /* check results */ - check_result("BuildCommDCBAndTimeoutsA", ptest, initial_value, result); - check_dcb("BuildCommDCBAndTimeoutsA", ptest, initial_value, &dcb, pexpected_dcb); - check_timeouts("BuildCommDCBAndTimeoutsA", ptest, initial_value, &timeouts, pexpected_timeouts); -} - -static void test_BuildCommDCBW(TEST *ptest, int initial_value, DCB *pexpected_dcb) -{ - BOOL result; - DCB dcb; - WCHAR wide_string[sizeof(ptest->string)]; - static int reportedDCBW = 0; - - MultiByteToWideChar(CP_ACP, 0, ptest->string, -1, wide_string, sizeof(wide_string) / sizeof(WCHAR)); - - /* set initial conditions */ - memset(&dcb, initial_value, sizeof(DCB)); - SetLastError(0xdeadbeef); - - result = BuildCommDCBW(wide_string, &dcb); - - if(GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - if(!reportedDCBW++) - win_skip("BuildCommDCBW is not implemented\n"); - return; - } - - /* check results */ - check_result("BuildCommDCBW", ptest, initial_value, result); - check_dcb("BuildCommDCBW", ptest, initial_value, &dcb, pexpected_dcb); -} - -static void test_BuildCommDCBAndTimeoutsW(TEST *ptest, int initial_value, DCB *pexpected_dcb, COMMTIMEOUTS *pexpected_timeouts) -{ - BOOL result; - DCB dcb; - COMMTIMEOUTS timeouts; - WCHAR wide_string[sizeof(ptest->string)]; - static int reportedDCBAndTW = 0; - - MultiByteToWideChar(CP_ACP, 0, ptest->string, -1, wide_string, sizeof(wide_string) / sizeof(WCHAR)); - - /* set initial conditions */ - memset(&dcb, initial_value, sizeof(DCB)); - memset(&timeouts, initial_value, sizeof(COMMTIMEOUTS)); - SetLastError(0xdeadbeef); - - result = BuildCommDCBAndTimeoutsW(wide_string, &dcb, &timeouts); - - if(GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - if(!reportedDCBAndTW++) - win_skip("BuildCommDCBAndTimeoutsW is not implemented\n"); - return; - } - - /* check results */ - check_result("BuildCommDCBAndTimeoutsW", ptest, initial_value, result); - check_dcb("BuildCommDCBAndTimeoutsW", ptest, initial_value, &dcb, pexpected_dcb); - check_timeouts("BuildCommDCBAndTimeoutsW", ptest, initial_value, &timeouts, pexpected_timeouts); -} - -static void test_BuildCommDCB(void) -{ - char port_name[] = "COMx"; - char port = 0; - unsigned int i; - char *ptr; - - /* Some of these tests require a valid COM port. This loop will try to find - a valid port. */ - for(port_name[3] = '1'; port_name[3] <= '9'; port_name[3]++) - { - COMMCONFIG commconfig; - DWORD size = sizeof(COMMCONFIG); - - if(GetDefaultCommConfig(port_name, &commconfig, &size)) - { - port = port_name[3]; - break; - } - } - - if(!port) - trace("Could not find a valid COM port. Some tests will be skipped.\n"); - - for(i = 0; i < TEST_COUNT; i++) - { - /* Check if this test case needs a valid COM port. */ - ptr = strstr(test[i].string, "COMx"); - - /* If required, substitute valid port number into device control string. */ - if(ptr) - { - if(port) - ptr[3] = port; - else - continue; - } - - test_BuildCommDCBA(&test[i], 0x00, &test[i].dcb1); - test_BuildCommDCBA(&test[i], 0xff, &test[i].dcb2); - test_BuildCommDCBAndTimeoutsA(&test[i], 0x00, &test[i].dcb1, &test[i].timeouts1); - test_BuildCommDCBAndTimeoutsA(&test[i], 0xff, &test[i].dcb2, &test[i].timeouts2); - - test_BuildCommDCBW(&test[i], 0x00, &test[i].dcb1); - test_BuildCommDCBW(&test[i], 0xff, &test[i].dcb2); - test_BuildCommDCBAndTimeoutsW(&test[i], 0x00, &test[i].dcb1, &test[i].timeouts1); - test_BuildCommDCBAndTimeoutsW(&test[i], 0xff, &test[i].dcb2, &test[i].timeouts2); - } -} - -static HANDLE test_OpenComm(BOOL doOverlap) -{ - HANDLE hcom = INVALID_HANDLE_VALUE; - char port_name[] = "COMx"; - static BOOL shown = FALSE; - DWORD errors; - COMSTAT comstat; - - /* Try to find a port */ - for(port_name[3] = '1'; port_name[3] <= '9'; port_name[3]++) - { - hcom = CreateFile( port_name, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, - (doOverlap)?FILE_FLAG_OVERLAPPED:0, NULL ); - if (hcom != INVALID_HANDLE_VALUE) - break; - } - if(!shown) - { - if (hcom == INVALID_HANDLE_VALUE) - trace("Could not find a valid COM port. Skipping test_ReadTimeOut\n"); - else - trace("Found Com port %s. Connected devices may disturb results\n", port_name); - /*shown = TRUE; */ - } - if (hcom != INVALID_HANDLE_VALUE) - { - BOOL ret; - - ret = ClearCommError(hcom, &errors, &comstat); - if (!ret && (GetLastError() == ERROR_NOT_READY || GetLastError() == ERROR_INVALID_HANDLE)) - { - if (GetLastError() == ERROR_NOT_READY) - trace("%s doesn't respond, skipping the test\n", port_name); - else - trace("%s is not a real serial port, skipping the test\n", port_name); - CloseHandle(hcom); - return INVALID_HANDLE_VALUE; - } - - ok(ret, "Unexpected error %u on open\n", GetLastError()); - ok(comstat.cbInQue == 0, "Unexpected %d chars in InQueue\n",comstat.cbInQue); - ok(comstat.cbOutQue == 0, "Still pending %d charcters in OutQueue\n", comstat.cbOutQue); - ok(errors == 0, "Unexpected errors 0x%08x\n", errors); - } - return hcom; -} - -static void test_GetModemStatus(HANDLE hcom) -{ - DWORD ModemStat = 0; - - ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - trace("GetCommModemStatus returned 0x%08x->%s%s%s%s\n", ModemStat, - (ModemStat &MS_RLSD_ON)?"MS_RLSD_ON ":"", - (ModemStat &MS_RING_ON)?"MS_RING_ON ":"", - (ModemStat &MS_DSR_ON)?"MS_DSR_ON ":"", - (ModemStat &MS_CTS_ON)?"MS_CTS_ON ":""); -} - -/* When we don't write anything, Read should time out even on a loopbacked port */ -static void test_ReadTimeOut(HANDLE hcom) -{ - DCB dcb; - COMMTIMEOUTS timeouts; - char rbuf[32]; - DWORD before, after, read, timediff, LastError; - BOOL res; - - ok(GetCommState(hcom, &dcb), "GetCommState failed\n"); - dcb.BaudRate = FASTBAUD; - dcb.ByteSize = 8; - dcb.Parity = NOPARITY; - dcb.fRtsControl=RTS_CONTROL_ENABLE; - dcb.fDtrControl=DTR_CONTROL_ENABLE; - dcb.StopBits = ONESTOPBIT; - ok(SetCommState(hcom, &dcb), "SetCommState failed\n"); - - ZeroMemory( &timeouts, sizeof(timeouts)); - timeouts.ReadTotalTimeoutConstant = TIMEOUT; - ok(SetCommTimeouts(hcom, &timeouts),"SetCommTimeouts failed\n"); - - before = GetTickCount(); - SetLastError(0xdeadbeef); - res = ReadFile(hcom, rbuf, sizeof(rbuf), &read, NULL); - LastError = GetLastError(); - after = GetTickCount(); - ok( res == TRUE, "A timed-out read should return TRUE\n"); - ok( LastError == 0xdeadbeef, "err=%d\n", LastError); - timediff = after - before; - ok( timediff > TIMEOUT>>2 && timediff < TIMEOUT *2, - "Unexpected TimeOut %d, expected %d\n", timediff, TIMEOUT); -} - -static void test_waittxempty(HANDLE hcom) -{ - DCB dcb; - COMMTIMEOUTS timeouts; - char tbuf[]="test_waittxempty"; - DWORD before, after, written, timediff, evtmask = 0; - BOOL res_write, res; - DWORD baud = SLOWBAUD; - - trace("test_waittxempty\n"); - /* set a low baud rate to have ample time*/ - ok(GetCommState(hcom, &dcb), "GetCommState failed\n"); - dcb.BaudRate = baud; - dcb.ByteSize = 8; - dcb.Parity = NOPARITY; - dcb.fRtsControl=RTS_CONTROL_ENABLE; - dcb.fDtrControl=DTR_CONTROL_ENABLE; - dcb.StopBits = ONESTOPBIT; - ok(SetCommState(hcom, &dcb), "SetCommState failed\n"); - - ZeroMemory( &timeouts, sizeof(timeouts)); - timeouts.ReadTotalTimeoutConstant = TIMEOUT; - ok(SetCommTimeouts(hcom, &timeouts),"SetCommTimeouts failed\n"); - - ok(SetupComm(hcom,1024,1024),"SetUpComm failed\n"); - ok(SetCommMask(hcom, EV_TXEMPTY), "SetCommMask failed\n"); - - before = GetTickCount(); - res_write=WriteFile(hcom, tbuf, sizeof(tbuf), &written, NULL); - after = GetTickCount(); - ok(res_write == TRUE, "WriteFile failed\n"); - ok(written == sizeof(tbuf), - "WriteFile: Unexpected write_size %d\n", written); - - trace("WriteFile succeeded, took %d ms to write %d Bytes at %d Baud\n", - after - before, written, baud); - - before = GetTickCount(); - res = WaitCommEvent(hcom, &evtmask, NULL); - after = GetTickCount(); - - ok(res == TRUE, "WaitCommEvent failed\n"); - ok((evtmask & EV_TXEMPTY), - "WaitCommEvent: Unexpected EvtMask 0x%08x, expected 0x%08x\n", - evtmask, EV_TXEMPTY); - - timediff = after - before; - - trace("WaitCommEvent for EV_TXEMPTY took %d ms\n", timediff); - /* 050604: This shows a difference between XP (tested with mingw compiled crosstest): - XP returns Writefile only after everything went out of the Serial port, - while wine returns immediately. - Thus on XP, WaintCommEvent after setting the CommMask for EV_TXEMPTY - nearly return immediate, - while on wine the most time is spent here - */ -} - -/* A new open handle should not return error or have bytes in the Queues */ -static void test_ClearCommErrors(HANDLE hcom) -{ - DWORD errors; - COMSTAT lpStat; - - ok(ClearCommError(hcom, &errors, &lpStat), "ClearCommError failed\n"); - ok(lpStat.cbInQue == 0, "Unexpected %d chars in InQueue\n", lpStat.cbInQue); - ok(lpStat.cbOutQue == 0, "Unexpected %d chars in OutQueue\n", lpStat.cbOutQue); - ok(errors == 0, "ClearCommErrors: Unexpected error 0x%08x\n", errors); - trace("test_ClearCommErrors done\n"); -} - -static void test_non_pending_errors(HANDLE hcom) -{ - DCB dcb; - DWORD err; - - ok(GetCommState(hcom, &dcb), "GetCommState failed\n"); - dcb.ByteSize = 255; /* likely bogus */ - ok(!SetCommState(hcom, &dcb), "SetCommState should have failed\n"); - ok(ClearCommError(hcom, &err, NULL), "ClearCommError should succeed\n"); - ok(!(err & CE_MODE), "ClearCommError shouldn't set CE_MODE byte in this case (%x)\n", err); -} - -/**/ -static void test_LoopbackRead(HANDLE hcom) -{ - DCB dcb; - COMMTIMEOUTS timeouts; - char rbuf[32]; - DWORD before, after, diff, read, read1, written, evtmask=0, i; - BOOL res; - char tbuf[]="test_LoopbackRead"; - - trace("Starting test_LoopbackRead\n"); - ok(GetCommState(hcom, &dcb), "GetCommState failed\n"); - dcb.BaudRate = FASTBAUD; - dcb.ByteSize = 8; - dcb.Parity = NOPARITY; - dcb.fRtsControl=RTS_CONTROL_ENABLE; - dcb.fDtrControl=DTR_CONTROL_ENABLE; - dcb.StopBits = ONESTOPBIT; - ok(SetCommState(hcom, &dcb), "SetCommState failed\n"); - - ZeroMemory( &timeouts, sizeof(timeouts)); - timeouts.ReadTotalTimeoutConstant = TIMEOUT; - ok(SetCommTimeouts(hcom, &timeouts),"SetCommTimeouts failed\n"); - - ok(SetCommMask(hcom, EV_TXEMPTY), "SetCommMask failed\n"); - - before = GetTickCount(); - ok(WriteFile(hcom,tbuf,sizeof(tbuf),&written, NULL), "WriteFile failed\n"); - after = GetTickCount(); - ok(written == sizeof(tbuf),"WriteFile %d bytes written\n", written); - diff = after -before; - - /* make sure all bytes are written, so Readfile will succeed in one call*/ - ok(WaitCommEvent(hcom, &evtmask, NULL), "WaitCommEvent failed\n"); - before = GetTickCount(); - ok(evtmask == EV_TXEMPTY, - "WaitCommEvent: Unexpected EvtMask 0x%08x, expected 0x%08x\n", - evtmask, EV_TXEMPTY); - trace("Write %d ms WaitCommEvent EV_TXEMPTY %d ms\n", diff, before- after); - - read=0; - ok(ReadFile(hcom, rbuf, sizeof(rbuf), &read, NULL), "Readfile failed\n"); - ok(read == sizeof(tbuf),"ReadFile read %d bytes, expected \"%s\"\n", read,rbuf); - - /* Now do the same with a slower Baud rate. - As we request more characters then written, we will hit the timeout - */ - - ok(GetCommState(hcom, &dcb), "GetCommState failed\n"); - dcb.BaudRate = 9600; - dcb.ByteSize = 8; - dcb.Parity = NOPARITY; - dcb.fRtsControl=RTS_CONTROL_ENABLE; - dcb.fDtrControl=DTR_CONTROL_ENABLE; - dcb.StopBits = ONESTOPBIT; - ok(SetCommState(hcom, &dcb), "SetCommState failed\n"); - - ok(SetCommMask(hcom, EV_RXCHAR), "SetCommMask failed\n"); - ok(WriteFile(hcom,tbuf,sizeof(tbuf),&written, NULL), "WriteFile failed\n"); - ok(written == sizeof(tbuf),"WriteFile %d bytes written\n", written); - - trace("WaitCommEventEV_RXCHAR\n"); - ok(WaitCommEvent(hcom, &evtmask, NULL), "WaitCommEvent failed\n"); - ok(evtmask == EV_RXCHAR, "WaitCommEvent: Unexpected EvtMask 0x%08x, expected 0x%08x\n", - evtmask, EV_RXCHAR); - - before = GetTickCount(); - res = ReadFile(hcom, rbuf, sizeof(rbuf), &read, NULL); - after = GetTickCount(); - ok(res, "Readfile failed\n"); - ok(read == sizeof(tbuf),"ReadFile read %d bytes\n", read); - diff = after - before; - trace("Readfile for %d chars took %d ms\n", read, diff); - ok( (diff > TIMEOUT - TIMEDELTA) && (diff < TIMEOUT + TIMEDELTA), - "Timedout Wait took %d ms, expected around %d\n", diff, TIMEOUT); - - /* now do a plain read with slow speed - * This will result in several low level reads and a timeout to happen - */ - dcb.BaudRate = SLOWBAUD; - ok(SetCommState(hcom, &dcb), "SetCommState failed\n"); - ok(WriteFile(hcom,tbuf,sizeof(tbuf),&written, NULL), "WriteFile failed\n"); - before = GetTickCount(); - read = 0; - read1 =0; - i=0; - do - { - res = ReadFile(hcom, rbuf+read, sizeof(rbuf)-read, &read1, NULL); - ok(res, "Readfile failed\n"); - read += read1; - i++; - } - while ((read < sizeof(tbuf)) && (i <10)); - after = GetTickCount(); - ok( read == sizeof(tbuf),"ReadFile read %d bytes\n", read); - trace("Plain Read for %d char at %d baud took %d ms\n", read, SLOWBAUD, after-before); -} - -static void test_LoopbackCtsRts(HANDLE hcom) -{ - DWORD ModemStat = 0, defaultStat = 0; - DCB dcb; - - memset (&dcb, 0, sizeof (dcb)); - ok(GetCommState(hcom, &dcb), "GetCommState failed\n"); - if (dcb.fRtsControl == RTS_CONTROL_HANDSHAKE) - { - trace("RTS_CONTROL_HANDSHAKE is set, so don't manipulate RTS\n"); - return; - } - ok(GetCommModemStatus(hcom, &defaultStat), "GetCommModemStatus failed\n"); - /* XP returns some values in the low nibble, so mask them out*/ - defaultStat &= MS_CTS_ON|MS_DSR_ON|MS_RING_ON|MS_RLSD_ON; - if(defaultStat & MS_CTS_ON) - { - ok(EscapeCommFunction(hcom, CLRRTS), "EscapeCommFunction failed to clear RTS\n"); - ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok ((ModemStat & MS_CTS_ON) == 0, "CTS didn't react: 0x%04x, expected 0x%04x\n", - ModemStat, (defaultStat & ~MS_CTS_ON)); - ok(EscapeCommFunction(hcom, SETRTS), "EscapeCommFunction failed to clear RTS\n"); - ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok (ModemStat == defaultStat, "Failed to restore CTS: 0x%04x, expected 0x%04x\n", - ModemStat, defaultStat); - } - else - { - ok(EscapeCommFunction(hcom, SETRTS), "EscapeCommFunction failed to set RTS\n"); - ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok ((ModemStat & MS_CTS_ON) == MS_CTS_ON, - "CTS didn't react: 0x%04x, expected 0x%04x\n", - ModemStat, (defaultStat | MS_CTS_ON)); - ok(EscapeCommFunction(hcom, CLRRTS), "EscapeCommFunction failed to clear RTS\n"); - ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok (ModemStat == defaultStat, "Failed to restore CTS: 0x%04x, expected 0x%04x\n", - ModemStat, defaultStat); - } -} - -static void test_LoopbackDtrDcd(HANDLE hcom) -{ - DWORD ModemStat = 0, defaultStat = 0; - DCB dcb; - - ok(GetCommState(hcom, &dcb), "GetCommState failed\n"); - if (dcb.fDtrControl == DTR_CONTROL_HANDSHAKE) - { - trace("DTR_CONTROL_HANDSHAKE is set, so don't manipulate DTR\n"); - return; - } - ok(GetCommModemStatus(hcom, &defaultStat), "GetCommModemStatus failed\n"); - /* XP returns some values in the low nibble, so mask them out*/ - defaultStat &= MS_CTS_ON|MS_DSR_ON|MS_RING_ON|MS_RLSD_ON; - if(defaultStat & MS_RLSD_ON) - { - ok(EscapeCommFunction(hcom, CLRDTR), "EscapeCommFunction failed to clear DTR\n"); - ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok ((ModemStat & MS_RLSD_ON) == 0, "RLSD didn't react: 0x%04x, expected 0x%04x\n", - ModemStat, (defaultStat & ~MS_RLSD_ON)); - ok(EscapeCommFunction(hcom, SETDTR), "EscapeCommFunction failed to set DTR\n"); - ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok (ModemStat == defaultStat, "Failed to restore RLSD: 0x%04x, expected 0x%04x\n", - ModemStat, defaultStat); - } - else - { - ok(EscapeCommFunction(hcom, SETDTR), "EscapeCommFunction failed to set DTR\n"); - ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok ((ModemStat & MS_RLSD_ON) == MS_RLSD_ON, - "RLSD didn't react: 0x%04x, expected 0x%04x\n", - ModemStat, (defaultStat | MS_RLSD_ON)); - ok(EscapeCommFunction(hcom, CLRDTR), "EscapeCommFunction failed to clear DTR\n"); - ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok (ModemStat == defaultStat, "Failed to restore RLSD: 0x%04x, expected 0x%04x\n", - ModemStat, defaultStat); - } -} - -static void test_LoopbackDtrDsr(HANDLE hcom) -{ - DWORD ModemStat = 0, defaultStat = 0; - DCB dcb; - - ok(GetCommState(hcom, &dcb), "GetCommState failed\n"); - if (dcb.fDtrControl == DTR_CONTROL_DISABLE) - { - trace("DTR_CONTROL_HANDSHAKE is set, so don't manipulate DTR\n"); - return; - } - ok(GetCommModemStatus(hcom, &defaultStat), "GetCommModemStatus failed\n"); - /* XP returns some values in the low nibble, so mask them out*/ - defaultStat &= MS_CTS_ON|MS_DSR_ON|MS_RING_ON|MS_RLSD_ON; - if(defaultStat & MS_DSR_ON) - { - ok(EscapeCommFunction(hcom, CLRDTR), "EscapeCommFunction failed to clear DTR\n"); - ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok ((ModemStat & MS_DSR_ON) == 0, "CTS didn't react: 0x%04x, expected 0x%04x\n", - ModemStat, (defaultStat & ~MS_DSR_ON)); - ok(EscapeCommFunction(hcom, SETDTR), "EscapeCommFunction failed to clear DTR\n"); - ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok (ModemStat == defaultStat, "Failed to restore DSR: 0x%04x, expected 0x%04x\n", - ModemStat, defaultStat); - } - else - { - ok(EscapeCommFunction(hcom, SETDTR), "EscapeCommFunction failed to set DTR\n"); - ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok ((ModemStat & MS_DSR_ON) == MS_DSR_ON, - "CTS didn't react: 0x%04x,expected 0x%04x\n", - ModemStat, (defaultStat | MS_DSR_ON)); - ok(EscapeCommFunction(hcom, CLRDTR), "EscapeCommFunction failed to clear DTR\n"); - ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok (ModemStat == defaultStat, "Failed to restore DSR: 0x%04x, expected 0x%04x\n", - ModemStat, defaultStat); - } -} - -static void test_LoopbackDtrRing(HANDLE hcom) -{ - DWORD ModemStat = 0, defaultStat = 0; - DCB dcb; - - ok(GetCommState(hcom, &dcb), "GetCommState failed\n"); - if (dcb.fDtrControl == DTR_CONTROL_HANDSHAKE) - { - trace("DTR_CONTROL_HANDSHAKE is set, so don't manipulate DTR\n"); - return; - } - ok(GetCommModemStatus(hcom, &defaultStat), "GetCommModemStatus failed\n"); - /* XP returns some values in the low nibble, so mask them out*/ - defaultStat &= MS_CTS_ON|MS_DSR_ON|MS_RING_ON|MS_RLSD_ON; - if(defaultStat & MS_RING_ON) - { - ok(EscapeCommFunction(hcom, CLRDTR), "EscapeCommFunction failed to clear DTR\n"); - ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok ((ModemStat & MS_RING_ON) == 0, "RING didn't react: 0x%04x, expected 0x%04x\n", - ModemStat, (defaultStat & ~MS_RING_ON)); - ok(EscapeCommFunction(hcom, SETDTR), "EscapeCommFunction failed to set DTR\n"); - ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok (ModemStat == defaultStat, "Failed to restore RING: 0x%04x, expected 0x%04x\n", - ModemStat, defaultStat); - } - else - { - ok(EscapeCommFunction(hcom, SETDTR), "EscapeCommFunction failed to set DTR\n"); - ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok ((ModemStat & MS_RING_ON) == MS_RING_ON, - "RING didn't react: 0x%04x,expected 0x%04x\n", - ModemStat, (defaultStat | MS_RING_ON)); - ok(EscapeCommFunction(hcom, CLRDTR), "EscapeCommFunction failed to clear DTR\n"); - ok(GetCommModemStatus(hcom, &ModemStat), "GetCommModemStatus failed\n"); - ok (ModemStat == defaultStat, "Failed to restore RING: 0x%04x, expected 0x%04x\n", - ModemStat, defaultStat); - } -} - -/* - * Set up a WaitCommEvent for anything in the receive buffer, - * then write to TX to put a character - * into the RX buffer - * Need Loopback TX->RX -*/ - -static void test_WaitRx(HANDLE hcom) -{ - OVERLAPPED overlapped, overlapped_w; - HANDLE hComPortEvent, hComWriteEvent; - DWORD before, after, after1, diff, success_wait = FALSE, success_write; - DWORD err_wait, err_write, written, evtmask=0; - - ok(SetCommMask(hcom, EV_RXCHAR), "SetCommMask failed\n"); - hComPortEvent = CreateEvent( NULL, TRUE, FALSE, NULL ); - ok(hComPortEvent != 0, "CreateEvent failed\n"); - ZeroMemory( &overlapped, sizeof(overlapped)); - overlapped.hEvent = hComPortEvent; - - ok((hComWriteEvent = CreateEvent( NULL, TRUE, FALSE, NULL )) !=0, - "CreateEvent res %d\n", - GetLastError()); - ZeroMemory( &overlapped_w, sizeof(overlapped_w)); - overlapped_w.hEvent = hComWriteEvent; - - before = GetTickCount(); - {success_wait = WaitCommEvent(hcom, &evtmask, &overlapped);} - err_wait = GetLastError(); - after = GetTickCount(); - trace("Success 0x%08x err %d evtmask 0x%08x\n", success_wait, err_wait, evtmask); - ok(success_wait || err_wait == ERROR_IO_PENDING, "overlapped WaitCommEvent failed\n"); - trace("overlapped WriteCommEvent returned.\n"); - - success_write= WriteFile(hcom, "X", 1, &written, &overlapped_w); - err_write = GetLastError(); - ok(success_write || err_write == ERROR_IO_PENDING, - "overlapped WriteFile failed, err %d\n", - err_write); - - if (!success_write && (err_write == ERROR_IO_PENDING)) { - success_write = WaitForSingleObjectEx(hComWriteEvent, TIMEOUT, TRUE); - err_write = GetLastError(); - ok(success_write == WAIT_OBJECT_0, "WaitForSingleObjectEx, res %d, err %d\n", - success_write, err_write); - } - Sleep(TIMEOUT >>1); - success_write = GetOverlappedResult(hcom, &overlapped_w, &written, FALSE); - err_write = GetLastError(); - - trace("Write after Wait res 0x%08x err %d\n",success_write, err_write); - ok(success_write && written ==1, "Write after Wait res 0x%08x err %d\n", - success_write, err_write); - - if (!success_wait && (err_wait == ERROR_IO_PENDING)) { - success_wait = WaitForSingleObjectEx(hComPortEvent, TIMEOUT, TRUE); - err_wait = GetLastError(); - ok(success_wait == WAIT_OBJECT_0, "wait hComPortEvent, res 0x%08x, err %d\n", - success_wait, err_wait); - } - success_wait = GetOverlappedResult(hcom, &overlapped, &written, FALSE); - err_wait = GetLastError(); - after1 = GetTickCount(); - trace("Success 0x%08x err %d evtmask 0x%08x diff1 %d, diff2 %d\n", - success_wait, err_wait, evtmask, after-before, after1-before); - - ok(evtmask & EV_RXCHAR, "Detect EV_RXCHAR: 0x%08x, expected 0x%08x\n", - evtmask, EV_RXCHAR); - diff = after1 - before; - ok ((diff > (TIMEOUT>>1) -TIMEDELTA) && (diff < (TIMEOUT>>1) + TIMEDELTA), - "Unexpected time %d, expected around %d\n", diff, TIMEOUT>>1); - -} - -/* Change the controling line after the given timeout to the given state - By the loopback, this should trigger the WaitCommEvent -*/ -static DWORD CALLBACK toggle_ctlLine(LPVOID arg) -{ - DWORD_PTR *args = arg; - DWORD timeout = args[0]; - DWORD ctl = args[1]; - HANDLE hcom = (HANDLE) args[2]; - HANDLE hComPortEvent = (HANDLE) args[3]; - DWORD success, err; - - trace("toggle_ctlLine timeout %d ctl 0x%08x handle %p\n", timeout, ctl, hcom ); - Sleep(timeout); - ok(EscapeCommFunction(hcom, ctl),"EscapeCommFunction 0x%08x failed\n", ctl); - trace("toggle_ctline done\n"); - success = WaitForSingleObjectEx(hComPortEvent, TIMEOUT, TRUE); - err = GetLastError(); - trace("toggle_ctline WaitForSingleObjectEx res 0x%08x err %d\n", - success, err); - return 0; -} - -/* - * Wait for a change in CTS - * Needs Loopback from DTR to CTS - */ -static void test_WaitCts(HANDLE hcom) -{ - DCB dcb; - OVERLAPPED overlapped; - HANDLE hComPortEvent; - HANDLE alarmThread; - DWORD_PTR args[4]; - DWORD alarmThreadId, before, after, after1, diff, success, err, written, evtmask=0, defaultStat = 0; - - ok(GetCommState(hcom, &dcb), "GetCommState failed\n"); - dcb.fRtsControl=RTS_CONTROL_ENABLE; - dcb.fDtrControl=DTR_CONTROL_ENABLE; - ok(SetCommState(hcom, &dcb), "SetCommState failed\n"); - if (dcb.fDtrControl == RTS_CONTROL_DISABLE) - { - trace("RTS_CONTROL_HANDSHAKE is set, so don't manipulate DTR\n"); - return; - } - args[0]= TIMEOUT >>1; - ok(GetCommModemStatus(hcom, &defaultStat), "GetCommModemStatus failed\n"); - if(defaultStat & MS_CTS_ON) - args[1] = CLRRTS; - else - args[1] = SETRTS; - args[2]=(DWORD_PTR)hcom; - - trace("test_WaitCts timeout %ld clt 0x%08lx handle %p\n",args[0], args[1], hcom); - - ok(SetCommMask(hcom, EV_CTS), "SetCommMask failed\n"); - hComPortEvent = CreateEvent( NULL, TRUE, FALSE, NULL ); - ok(hComPortEvent != 0, "CreateEvent failed\n"); - args[3] = (DWORD_PTR)hComPortEvent; - alarmThread = CreateThread(NULL, 0, toggle_ctlLine, args, 0, &alarmThreadId); - /* Wait a minimum to let the thread start up */ - Sleep(10); - trace("Thread created\n"); - ok(alarmThread !=0 , "CreateThread Failed\n"); - - ZeroMemory( &overlapped, sizeof(overlapped)); - overlapped.hEvent = hComPortEvent; - before = GetTickCount(); - success = WaitCommEvent(hcom, &evtmask, &overlapped); - err = GetLastError(); - after = GetTickCount(); - - trace("Success 0x%08x err %d evtmask 0x%08x\n", success, err, evtmask); - ok(success || err == ERROR_IO_PENDING, "overlapped WaitCommEvent failed\n"); - trace("overlapped WriteCommEvent returned.\n"); - if (!success && (err == ERROR_IO_PENDING)) - ok(WaitForSingleObjectEx(hComPortEvent, TIMEOUT, TRUE) == 0, - "WaitCts hComPortEvent failed\n"); - success = GetOverlappedResult(hcom, &overlapped, &written, FALSE); - err = GetLastError(); - after1 = GetTickCount(); - trace("Success 0x%08x err %d evtmask 0x%08x diff1 %d, diff2 %d\n", - success, err, evtmask, after-before, after1-before); - - ok(evtmask & EV_CTS, "Failed to detect EV_CTS: 0x%08x, expected 0x%08x\n", - evtmask, EV_CTS); - ok(GetCommModemStatus(hcom, &evtmask), "GetCommModemStatus failed\n"); - if(defaultStat & MS_CTS_ON) - ok((evtmask & MS_CTS_ON) == 0,"CTS didn't change state!\n"); - else - ok((evtmask & MS_CTS_ON), "CTS didn't change state!\n"); - - diff = after1 - before; - ok ((diff > (TIMEOUT>>1) -TIMEDELTA) && (diff < (TIMEOUT>>1) + TIMEDELTA), - "Unexpected time %d, expected around %d\n", diff, TIMEOUT>>1); - - /*restore RTS Settings*/ - if(defaultStat & MS_CTS_ON) - args[1] = SETRTS; - else - args[1] = CLRRTS; -} - -/* Change the Comm Mask while a Wait is going on - WaitCommevent should return with a EVTMASK set to zero -*/ -static DWORD CALLBACK reset_CommMask(LPVOID arg) -{ - DWORD_PTR *args = arg; - DWORD timeout = args[0]; - HANDLE hcom = (HANDLE) args[1]; - - trace(" Changing CommMask on the fly for handle %p after timeout %d\n", - hcom, timeout); - Sleep(timeout); - ok(SetCommMask(hcom, 0),"SetCommMask %p failed\n", hcom); - trace("SetCommMask changed\n"); - return 0; -} - -/* Set up a Wait for a change on CTS. We don't toggle any line, but we - reset the CommMask and expect the wait to return with a mask of 0 - No special port connections needed -*/ -static void test_AbortWaitCts(HANDLE hcom) -{ - DCB dcb; - OVERLAPPED overlapped; - HANDLE hComPortEvent; - HANDLE alarmThread; - DWORD_PTR args[2]; - DWORD alarmThreadId, before, after, after1, diff, success, err, written, evtmask=0; - - ok(GetCommState(hcom, &dcb), "GetCommState failed\n"); - if (dcb.fDtrControl == RTS_CONTROL_DISABLE) - { - trace("RTS_CONTROL_HANDSHAKE is set, so don't manipulate DTR\n"); - return; - } - args[0]= TIMEOUT >>1; - args[1]= (DWORD_PTR)hcom; - - trace("test_AbortWaitCts timeout %ld handle %p\n",args[0], hcom); - - ok(SetCommMask(hcom, EV_CTS), "SetCommMask failed\n"); - hComPortEvent = CreateEvent( NULL, TRUE, FALSE, NULL ); - ok(hComPortEvent != 0, "CreateEvent failed\n"); - alarmThread = CreateThread(NULL, 0, reset_CommMask, args, 0, &alarmThreadId); - /* Wait a minimum to let the thread start up */ - Sleep(10); - trace("Thread created\n"); - ok(alarmThread !=0 , "CreateThread Failed\n"); - - ZeroMemory( &overlapped, sizeof(overlapped)); - overlapped.hEvent = hComPortEvent; - before = GetTickCount(); - success = WaitCommEvent(hcom, &evtmask, &overlapped); - err = GetLastError(); - after = GetTickCount(); - - trace("Success 0x%08x err %d evtmask 0x%08x\n", success, err, evtmask); - ok(success || err == ERROR_IO_PENDING, "overlapped WaitCommEvent failed\n"); - trace("overlapped WriteCommEvent returned.\n"); - if (!success && (err == ERROR_IO_PENDING)) - ok(WaitForSingleObjectEx(hComPortEvent, TIMEOUT, TRUE) == 0, - "AbortWaitCts hComPortEvent failed\n"); - success = GetOverlappedResult(hcom, &overlapped, &written, FALSE); - err = GetLastError(); - after1 = GetTickCount(); - trace("Success 0x%08x err %d evtmask 0x%08x diff1 %d, diff2 %d\n", - success, err, evtmask, after-before, after1-before); - - ok(evtmask == 0, "Incorrect EventMask 0x%08x returned on Wait aborted bu SetCommMask, expected 0x%08x\n", - evtmask, 0); - ok(GetCommModemStatus(hcom, &evtmask), "GetCommModemStatus failed\n"); - diff = after1 - before; - ok ((diff > (TIMEOUT>>1) -TIMEDELTA) && (diff < (TIMEOUT>>1) + TIMEDELTA), - "Unexpected time %d, expected around %d\n", diff, TIMEOUT>>1); - -} - -/* - * Wait for a change in DSR - * Needs Loopback from DTR to DSR - */ -static void test_WaitDsr(HANDLE hcom) -{ - DCB dcb; - OVERLAPPED overlapped; - HANDLE hComPortEvent; - HANDLE alarmThread; - DWORD_PTR args[3]; - DWORD alarmThreadId, before, after, after1, diff, success, err, written, evtmask=0, defaultStat = 0; - - ok(GetCommState(hcom, &dcb), "GetCommState failed\n"); - if (dcb.fDtrControl == DTR_CONTROL_DISABLE) - { - trace("DTR_CONTROL_HANDSHAKE is set, so don't manipulate DTR\n"); - return; - } - args[0]= TIMEOUT >>1; - ok(GetCommModemStatus(hcom, &defaultStat), "GetCommModemStatus failed\n"); - if(defaultStat & MS_DSR_ON) - args[1] = CLRDTR; - else - args[1] = SETDTR; - args[2]= (DWORD_PTR)hcom; - - trace("test_WaitDsr timeout %ld clt 0x%08lx handle %p\n",args[0], args[1], hcom); - - ok(SetCommMask(hcom, EV_DSR), "SetCommMask failed\n"); - hComPortEvent = CreateEvent( NULL, TRUE, FALSE, NULL ); - ok(hComPortEvent != 0, "CreateEvent failed\n"); - alarmThread = CreateThread(NULL, 0, toggle_ctlLine, args, 0, &alarmThreadId); - ok(alarmThread !=0 , "CreateThread Failed\n"); - - ZeroMemory( &overlapped, sizeof(overlapped)); - overlapped.hEvent = hComPortEvent; - before = GetTickCount(); - success = WaitCommEvent(hcom, &evtmask, &overlapped); - err = GetLastError(); - after = GetTickCount(); - - trace("Success 0x%08x err %d evtmask 0x%08x\n", success, err, evtmask); - ok(success || err == ERROR_IO_PENDING, "overlapped WaitCommEvent failed\n"); - trace("overlapped WriteCommEvent returned.\n"); - if (!success && (err == ERROR_IO_PENDING)) - ok(WaitForSingleObjectEx(hComPortEvent, TIMEOUT, TRUE) == 0, - "wait hComPortEvent failed\n"); - success = GetOverlappedResult(hcom, &overlapped, &written, FALSE); - err = GetLastError(); - after1 = GetTickCount(); - trace("Success 0x%08x err %d evtmask 0x%08x diff1 %d, diff2 %d\n", - success, err, evtmask, after-before, after1-before); - - ok(evtmask & EV_DSR, "Failed to detect EV_DSR: 0x%08x, expected 0x%08x\n", - evtmask, EV_DSR); - ok(GetCommModemStatus(hcom, &evtmask), "GetCommModemStatus failed\n"); - if(defaultStat & MS_DSR_ON) - ok((evtmask & MS_DSR_ON) == 0,"DTR didn't change state!\n"); - else - ok((evtmask & MS_DSR_ON), "DTR didn't change state!\n"); - - diff = after1 - before; - ok ((diff > (TIMEOUT>>1) -TIMEDELTA) && (diff < (TIMEOUT>>1) + TIMEDELTA), - "Unexpected time %d, expected around %d\n", diff, TIMEOUT>>1); - - /*restore RTS Settings*/ - if(defaultStat & MS_DSR_ON) - args[1] = SETDTR; - else - args[1] = CLRDTR; -} - -/* - * Wait for a Ring - * Needs Loopback from DTR to RING - */ -static void test_WaitRing(HANDLE hcom) -{ - DCB dcb; - OVERLAPPED overlapped; - HANDLE hComPortEvent; - HANDLE alarmThread; - DWORD_PTR args[3]; - DWORD alarmThreadId, before, after, after1, diff, success, err, written, evtmask=0, defaultStat; - BOOL ret; - - ok(GetCommState(hcom, &dcb), "GetCommState failed\n"); - if (dcb.fDtrControl == DTR_CONTROL_DISABLE) - { - trace("DTR_CONTROL_HANDSHAKE is set, so don't manipulate DTR\n"); - return; - } - args[0]= TIMEOUT >>1; - ok((ret = GetCommModemStatus(hcom, &defaultStat)), "GetCommModemStatus failed\n"); - if (!ret) { - skip("modem status failed -> skip.\n"); - return; - } - if(defaultStat & MS_RING_ON) - args[1] = CLRDTR; - else - args[1] = SETDTR; - args[2]=(DWORD_PTR) hcom; - - trace("test_WaitRing timeout %ld clt 0x%08lx handle %p\n",args[0], args[1], hcom); - - ok(SetCommMask(hcom, EV_RING), "SetCommMask failed\n"); - hComPortEvent = CreateEvent( NULL, TRUE, FALSE, NULL ); - ok(hComPortEvent != 0, "CreateEvent failed\n"); - alarmThread = CreateThread(NULL, 0, toggle_ctlLine, args, 0, &alarmThreadId); - ok(alarmThread !=0 , "CreateThread Failed\n"); - - ZeroMemory( &overlapped, sizeof(overlapped)); - overlapped.hEvent = hComPortEvent; - before = GetTickCount(); - success = WaitCommEvent(hcom, &evtmask, &overlapped); - err = GetLastError(); - after = GetTickCount(); - - trace("Success 0x%08x err %d evtmask 0x%08x\n", success, err, evtmask); - ok(success || err == ERROR_IO_PENDING, "overlapped WaitCommEvent failed\n"); - trace("overlapped WriteCommEvent returned.\n"); - if (!success && (err == ERROR_IO_PENDING)) - ok(WaitForSingleObjectEx(hComPortEvent, TIMEOUT, TRUE) == 0, - "wait hComPortEvent failed\n"); - success = GetOverlappedResult(hcom, &overlapped, &written, FALSE); - err = GetLastError(); - after1 = GetTickCount(); - trace("Success 0x%08x err %d evtmask 0x%08x diff1 %d, diff2 %d\n", - success, err, evtmask, after-before, after1-before); - - ok(evtmask & EV_RING, "Failed to detect EV_RING: 0x%08x, expected 0x%08x\n", - evtmask, EV_CTS); - ok(GetCommModemStatus(hcom, &evtmask), "GetCommModemStatus failed\n"); - if(defaultStat & MS_RING_ON) - ok((evtmask & MS_RING_ON) == 0,"DTR didn't change state!\n"); - else - ok((evtmask & MS_RING_ON), "DTR didn't change state!\n"); - - diff = after1 - before; - ok ((diff > (TIMEOUT>>1) -TIMEDELTA) && (diff < (TIMEOUT>>1) + TIMEDELTA), - "Unexpected time %d, expected around %d\n", diff, TIMEOUT>>1); - - /*restore RTS Settings*/ - if(defaultStat & MS_RING_ON) - args[1] = SETDTR; - else - args[1] = CLRDTR; -} -/* - * Wait for a change in DCD - * Needs Loopback from DTR to DCD - */ -static void test_WaitDcd(HANDLE hcom) -{ - DCB dcb; - OVERLAPPED overlapped; - HANDLE hComPortEvent; - HANDLE alarmThread; - DWORD_PTR args[3]; - DWORD alarmThreadId, before, after, after1, diff, success, err, written, evtmask=0, defaultStat = 0; - - ok(GetCommState(hcom, &dcb), "GetCommState failed\n"); - if (dcb.fDtrControl == DTR_CONTROL_DISABLE) - { - trace("DTR_CONTROL_HANDSHAKE is set, so don't manipulate DTR\n"); - return; - } - args[0]= TIMEOUT >>1; - ok(GetCommModemStatus(hcom, &defaultStat), "GetCommModemStatus failed\n"); - if(defaultStat & MS_RLSD_ON) - args[1] = CLRDTR; - else - args[1] = SETDTR; - args[2]= (DWORD_PTR)hcom; - - trace("test_WaitDcd timeout %ld clt 0x%08lx handle %p\n",args[0], args[1], hcom); - - ok(SetCommMask(hcom, EV_RLSD), "SetCommMask failed\n"); - hComPortEvent = CreateEvent( NULL, TRUE, FALSE, NULL ); - ok(hComPortEvent != 0, "CreateEvent failed\n"); - alarmThread = CreateThread(NULL, 0, toggle_ctlLine, args, 0, &alarmThreadId); - ok(alarmThread !=0 , "CreateThread Failed\n"); - - ZeroMemory( &overlapped, sizeof(overlapped)); - overlapped.hEvent = hComPortEvent; - before = GetTickCount(); - success = WaitCommEvent(hcom, &evtmask, &overlapped); - err = GetLastError(); - after = GetTickCount(); - - trace("Success 0x%08x err %d evtmask 0x%08x\n", success, err, evtmask); - ok(success || err == ERROR_IO_PENDING, "overlapped WaitCommEvent failed\n"); - trace("overlapped WriteCommEvent returned.\n"); - if (!success && (err == ERROR_IO_PENDING)) - ok(WaitForSingleObjectEx(hComPortEvent, TIMEOUT, TRUE) == 0, - "wait hComPortEvent failed\n"); - success = GetOverlappedResult(hcom, &overlapped, &written, FALSE); - err = GetLastError(); - after1 = GetTickCount(); - trace("Success 0x%08x err %d evtmask 0x%08x diff1 %d, diff2 %d\n", - success, err, evtmask, after-before, after1-before); - - ok(evtmask & EV_RLSD, "Failed to detect EV_RLSD: 0x%08x, expected 0x%08x\n", - evtmask, EV_CTS); - ok(GetCommModemStatus(hcom, &evtmask), "GetCommModemStatus failed\n"); - if(defaultStat & MS_RLSD_ON) - ok((evtmask & MS_RLSD_ON) == 0,"DTR didn't change state!\n"); - else - ok((evtmask & MS_RLSD_ON), "DTR didn't change state!\n"); - - diff = after1 - before; - ok ((diff > (TIMEOUT>>1) -TIMEDELTA) && (diff < (TIMEOUT>>1) + TIMEDELTA), - "Unexpected time %d, expected around %d\n", diff, TIMEOUT>>1); - - /*restore RTS Settings*/ - if(defaultStat & MS_RLSD_ON) - args[1] = SETDTR; - else - args[1] = CLRDTR; -} - -/* - Set Break after timeout -*/ -static DWORD CALLBACK set_CommBreak(LPVOID arg) -{ - DWORD_PTR *args = arg; - DWORD timeout = args[0]; - HANDLE hcom = (HANDLE) args[1]; - - trace("SetCommBreak for handle %p after timeout %d\n", - hcom, timeout); - Sleep(timeout); - ok(SetCommBreak(hcom),"SetCommBreak %p failed\n", hcom); - trace("SetCommBreak done\n"); - return 0; -} - -/* - Wait for the Break condition (TX resp. RX active) - Needs Loopback TX-RX -*/ -static void test_WaitBreak(HANDLE hcom) -{ - OVERLAPPED overlapped; - HANDLE hComPortEvent; - HANDLE alarmThread; - DWORD_PTR args[2]; - DWORD alarmThreadId, before, after, after1, diff, success, err, written, evtmask=0; - - ok(SetCommMask(hcom, EV_BREAK), "SetCommMask failed\n"); - hComPortEvent = CreateEvent( NULL, TRUE, FALSE, NULL ); - ok(hComPortEvent != 0, "CreateEvent failed\n"); - - trace("test_WaitBreak\n"); - args[0]= TIMEOUT >>1; - args[1]= (DWORD_PTR)hcom; - alarmThread = CreateThread(NULL, 0, set_CommBreak, args, 0, &alarmThreadId); - /* Wait a minimum to let the thread start up */ - Sleep(10); - trace("Thread created\n"); - ok(alarmThread !=0 , "CreateThread Failed\n"); - - ZeroMemory( &overlapped, sizeof(overlapped)); - overlapped.hEvent = hComPortEvent; - before = GetTickCount(); - success = WaitCommEvent(hcom, &evtmask, &overlapped); - err = GetLastError(); - after = GetTickCount(); - - trace("Success 0x%08x err %d evtmask 0x%08x\n", success, err, evtmask); - ok(success || err == ERROR_IO_PENDING, "overlapped WaitCommEvent failed\n"); - trace("overlapped WriteCommEvent returned.\n"); - - if (!success && (err == ERROR_IO_PENDING)) - { - success = WaitForSingleObjectEx(hComPortEvent, TIMEOUT, TRUE); - ok(!success, "wait hComPortEvent res %d\n", GetLastError()); - } - success = GetOverlappedResult(hcom, &overlapped, &written, FALSE); - err = GetLastError(); - after1 = GetTickCount(); - trace("Success 0x%08x err %d evtmask 0x%08x diff1 %d, diff2 %d\n", - success, err, evtmask, after-before, after1-before); - - ok(evtmask & EV_BREAK, "Failed to detect EV_BREAK: 0x%08x, expected 0x%08x\n", - evtmask, EV_BREAK); - ok(GetCommModemStatus(hcom, &evtmask), "GetCommModemStatus failed\n"); - - diff = after1 - before; - ok ((diff > (TIMEOUT>>1) -TIMEDELTA) && (diff < (TIMEOUT>>1) + TIMEDELTA), - "Unexpected time %d, expected around %d\n", diff, TIMEOUT>>1); - - ok(ClearCommBreak(hcom), "ClearCommBreak failed\n"); -} - -static void test_stdio(void) -{ - DCB dcb; - - /* cygwin tries this to determine the stdin handle type */ - ok( !GetCommState( GetStdHandle(STD_INPUT_HANDLE), &dcb ), "GetCommState succeeded on stdin\n" ); - ok( GetLastError() == ERROR_INVALID_HANDLE || GetLastError() == ERROR_INVALID_FUNCTION, - "got error %u\n", GetLastError() ); -} - -START_TEST(comm) -{ - HANDLE hcom; - /* use variables and not #define to compile the code */ - BOOL loopback_txd_rxd = LOOPBACK_TXD_RXD; - BOOL loopback_rts_cts = LOOPBACK_CTS_RTS; - BOOL loopback_dtr_dsr = LOOPBACK_DTR_DSR; - BOOL loopback_dtr_ring = LOOPBACK_DTR_RING; - BOOL loopback_dtr_dcd = LOOPBACK_DTR_DCD; - - test_BuildCommDCB(); - hcom = test_OpenComm(FALSE); - if (hcom != INVALID_HANDLE_VALUE) - { - test_GetModemStatus(hcom); - test_ReadTimeOut(hcom); - test_waittxempty(hcom); - CloseHandle(hcom); - } - hcom = test_OpenComm(FALSE); - if (hcom != INVALID_HANDLE_VALUE) - { - Sleep(200); /* Give the laster character of test_waittxempty to drop into the receiver */ - test_ClearCommErrors(hcom); - CloseHandle(hcom); - } - hcom = test_OpenComm(FALSE); - if (hcom != INVALID_HANDLE_VALUE) - { - test_non_pending_errors(hcom); - CloseHandle(hcom); - } - if((loopback_txd_rxd) && ((hcom = test_OpenComm(FALSE))!=INVALID_HANDLE_VALUE)) - { - test_LoopbackRead(hcom); - CloseHandle(hcom); - } - if((loopback_rts_cts) && ((hcom = test_OpenComm(FALSE))!=INVALID_HANDLE_VALUE)) - { - test_LoopbackCtsRts(hcom); - CloseHandle(hcom); - } - if((loopback_dtr_dsr) && ((hcom = test_OpenComm(FALSE))!=INVALID_HANDLE_VALUE)) - { - test_LoopbackDtrDsr(hcom); - CloseHandle(hcom); - } - if((loopback_dtr_ring) && ((hcom = test_OpenComm(FALSE))!=INVALID_HANDLE_VALUE)) - { - test_LoopbackDtrRing(hcom); - CloseHandle(hcom); - } - if((loopback_dtr_dcd) && ((hcom = test_OpenComm(FALSE))!=INVALID_HANDLE_VALUE)) - { - test_LoopbackDtrDcd(hcom); - CloseHandle(hcom); - } - if((loopback_txd_rxd) && ((hcom = test_OpenComm(TRUE))!=INVALID_HANDLE_VALUE)) - { - test_WaitRx(hcom); - CloseHandle(hcom); - } - if((loopback_rts_cts) && ((hcom = test_OpenComm(TRUE))!=INVALID_HANDLE_VALUE)) - { - test_WaitCts(hcom); - CloseHandle(hcom); - } - if((hcom = test_OpenComm(TRUE))!=INVALID_HANDLE_VALUE) - { - test_AbortWaitCts(hcom); - CloseHandle(hcom); - } - if((loopback_dtr_dsr) && ((hcom = test_OpenComm(TRUE))!=INVALID_HANDLE_VALUE)) - { - test_WaitDsr(hcom); - CloseHandle(hcom); - } - if((loopback_dtr_ring) && ((hcom = test_OpenComm(TRUE))!=INVALID_HANDLE_VALUE)) - { - test_WaitRing(hcom); - CloseHandle(hcom); - } - if((loopback_dtr_dcd) && ((hcom = test_OpenComm(TRUE))!=INVALID_HANDLE_VALUE)) - { - test_WaitDcd(hcom); - CloseHandle(hcom); - } - if(loopback_txd_rxd && (hcom = test_OpenComm(TRUE))!=INVALID_HANDLE_VALUE) - { - test_WaitBreak(hcom); - CloseHandle(hcom); - } - test_stdio(); -} diff --git a/rostests/winetests/kernel32/console.c b/rostests/winetests/kernel32/console.c deleted file mode 100755 index f24866623cd..00000000000 --- a/rostests/winetests/kernel32/console.c +++ /dev/null @@ -1,2564 +0,0 @@ -/* - * Unit tests for console API - * - * Copyright (c) 2003,2004 Eric Pouech - * Copyright (c) 2007 Kirill K. Smirnov - * - * 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/test.h" -#include -#include - -static BOOL (WINAPI *pGetConsoleInputExeNameA)(DWORD, LPSTR); -static DWORD (WINAPI *pGetConsoleProcessList)(LPDWORD, DWORD); -static HANDLE (WINAPI *pOpenConsoleW)(LPCWSTR,DWORD,BOOL,DWORD); -static BOOL (WINAPI *pSetConsoleInputExeNameA)(LPCSTR); -static BOOL (WINAPI *pVerifyConsoleIoHandle)(HANDLE handle); - -/* DEFAULT_ATTRIB is used for all initial filling of the console. - * all modifications are made with TEST_ATTRIB so that we could check - * what has to be modified or not - */ -#define TEST_ATTRIB (BACKGROUND_BLUE | FOREGROUND_GREEN) -#define DEFAULT_ATTRIB (FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED) -/* when filling the screen with non-blank chars, this macro defines - * what character should be at position 'c' - */ -#define CONTENT(c) ('A' + (((c).Y * 17 + (c).X) % 23)) - -#define okCURSOR(hCon, c) do { \ - CONSOLE_SCREEN_BUFFER_INFO __sbi; \ - BOOL expect = GetConsoleScreenBufferInfo((hCon), &__sbi) && \ - __sbi.dwCursorPosition.X == (c).X && __sbi.dwCursorPosition.Y == (c).Y; \ - ok(expect, "Expected cursor at (%d,%d), got (%d,%d)\n", \ - (c).X, (c).Y, __sbi.dwCursorPosition.X, __sbi.dwCursorPosition.Y); \ -} while (0) - -#define okCHAR(hCon, c, ch, attr) do { \ - char __ch; WORD __attr; DWORD __len; BOOL expect; \ - expect = ReadConsoleOutputCharacter((hCon), &__ch, 1, (c), &__len) == 1 && __len == 1 && __ch == (ch); \ - ok(expect, "At (%d,%d): expecting char '%c'/%02x got '%c'/%02x\n", (c).X, (c).Y, (ch), (ch), __ch, __ch); \ - expect = ReadConsoleOutputAttribute((hCon), &__attr, 1, (c), &__len) == 1 && __len == 1 && __attr == (attr); \ - ok(expect, "At (%d,%d): expecting attr %04x got %04x\n", (c).X, (c).Y, (attr), __attr); \ -} while (0) - -static void init_function_pointers(void) -{ - HMODULE hKernel32; - -#define KERNEL32_GET_PROC(func) \ - p##func = (void *)GetProcAddress(hKernel32, #func); \ - if(!p##func) trace("GetProcAddress(hKernel32, '%s') failed\n", #func); - - hKernel32 = GetModuleHandleA("kernel32.dll"); - KERNEL32_GET_PROC(GetConsoleInputExeNameA); - KERNEL32_GET_PROC(GetConsoleProcessList); - KERNEL32_GET_PROC(OpenConsoleW); - KERNEL32_GET_PROC(SetConsoleInputExeNameA); - KERNEL32_GET_PROC(VerifyConsoleIoHandle); - -#undef KERNEL32_GET_PROC -} - -/* FIXME: this could be optimized on a speed point of view */ -static void resetContent(HANDLE hCon, COORD sbSize, BOOL content) -{ - COORD c; - WORD attr = DEFAULT_ATTRIB; - char ch; - DWORD len; - - for (c.X = 0; c.X < sbSize.X; c.X++) - { - for (c.Y = 0; c.Y < sbSize.Y; c.Y++) - { - ch = (content) ? CONTENT(c) : ' '; - WriteConsoleOutputAttribute(hCon, &attr, 1, c, &len); - WriteConsoleOutputCharacterA(hCon, &ch, 1, c, &len); - } - } -} - -static void testCursor(HANDLE hCon, COORD sbSize) -{ - COORD c; - - c.X = c.Y = 0; - ok(SetConsoleCursorPosition(0, c) == 0, "No handle\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError: expecting %u got %u\n", - ERROR_INVALID_HANDLE, GetLastError()); - - c.X = c.Y = 0; - ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left\n"); - okCURSOR(hCon, c); - - c.X = sbSize.X - 1; - c.Y = sbSize.Y - 1; - ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in lower-right\n"); - okCURSOR(hCon, c); - - c.X = sbSize.X; - c.Y = sbSize.Y - 1; - ok(SetConsoleCursorPosition(hCon, c) == 0, "Cursor is outside\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError: expecting %u got %u\n", - ERROR_INVALID_PARAMETER, GetLastError()); - - c.X = sbSize.X - 1; - c.Y = sbSize.Y; - ok(SetConsoleCursorPosition(hCon, c) == 0, "Cursor is outside\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError: expecting %u got %u\n", - ERROR_INVALID_PARAMETER, GetLastError()); - - c.X = -1; - c.Y = 0; - ok(SetConsoleCursorPosition(hCon, c) == 0, "Cursor is outside\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError: expecting %u got %u\n", - ERROR_INVALID_PARAMETER, GetLastError()); - - c.X = 0; - c.Y = -1; - ok(SetConsoleCursorPosition(hCon, c) == 0, "Cursor is outside\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError: expecting %u got %u\n", - ERROR_INVALID_PARAMETER, GetLastError()); -} - -static void testCursorInfo(HANDLE hCon) -{ - BOOL ret; - CONSOLE_CURSOR_INFO info; - - SetLastError(0xdeadbeef); - ret = GetConsoleCursorInfo(NULL, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError: expecting %u got %u\n", - ERROR_INVALID_HANDLE, GetLastError()); - - SetLastError(0xdeadbeef); - info.dwSize = -1; - ret = GetConsoleCursorInfo(NULL, &info); - ok(!ret, "Expected failure\n"); - ok(info.dwSize == -1, "Expected no change for dwSize\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError: expecting %u got %u\n", - ERROR_INVALID_HANDLE, GetLastError()); - - /* Test the correct call first to distinguish between win9x and the rest */ - SetLastError(0xdeadbeef); - ret = GetConsoleCursorInfo(hCon, &info); - ok(ret, "Expected success\n"); - ok(info.dwSize == 25 || - info.dwSize == 12 /* win9x */, - "Expected 12 or 25, got %d\n", info.dwSize); - ok(info.bVisible, "Expected the cursor to be visible\n"); - ok(GetLastError() == 0xdeadbeef, "GetLastError: expecting %u got %u\n", - 0xdeadbeef, GetLastError()); - - /* Don't test NULL CONSOLE_CURSOR_INFO, it crashes on win9x and win7 */ -} - -static void testEmptyWrite(HANDLE hCon) -{ - static const char emptybuf[16]; - COORD c; - DWORD len; - - c.X = c.Y = 0; - ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left\n"); - - len = -1; - ok(WriteConsole(hCon, NULL, 0, &len, NULL) != 0 && len == 0, "WriteConsole\n"); - okCURSOR(hCon, c); - - /* Passing a NULL lpBuffer with sufficiently large non-zero length succeeds - * on native Windows and result in memory-like contents being written to - * the console. Calling WriteConsoleW like this will crash on Wine. */ - if (0) - { - len = -1; - ok(!WriteConsole(hCon, NULL, 16, &len, NULL) && len == -1, "WriteConsole\n"); - okCURSOR(hCon, c); - - /* Cursor advances for this call. */ - len = -1; - ok(WriteConsole(hCon, NULL, 128, &len, NULL) != 0 && len == 128, "WriteConsole\n"); - } - - len = -1; - ok(WriteConsole(hCon, emptybuf, 0, &len, NULL) != 0 && len == 0, "WriteConsole\n"); - okCURSOR(hCon, c); - - /* WriteConsole does not halt on a null terminator and is happy to write - * memory contents beyond the actual size of the buffer. */ - len = -1; - ok(WriteConsole(hCon, emptybuf, 16, &len, NULL) != 0 && len == 16, "WriteConsole\n"); - c.X += 16; - okCURSOR(hCon, c); -} - -static void testWriteSimple(HANDLE hCon) -{ - COORD c; - DWORD len; - const char* mytest = "abcdefg"; - const int mylen = strlen(mytest); - - /* single line write */ - c.X = c.Y = 0; - ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left\n"); - - ok(WriteConsole(hCon, mytest, mylen, &len, NULL) != 0 && len == mylen, "WriteConsole\n"); - c.Y = 0; - for (c.X = 0; c.X < mylen; c.X++) - { - okCHAR(hCon, c, mytest[c.X], TEST_ATTRIB); - } - - okCURSOR(hCon, c); - okCHAR(hCon, c, ' ', DEFAULT_ATTRIB); -} - -static void testWriteNotWrappedNotProcessed(HANDLE hCon, COORD sbSize) -{ - COORD c; - DWORD len, mode; - const char* mytest = "123"; - const int mylen = strlen(mytest); - int ret; - int p; - - ok(GetConsoleMode(hCon, &mode) && SetConsoleMode(hCon, mode & ~(ENABLE_PROCESSED_OUTPUT|ENABLE_WRAP_AT_EOL_OUTPUT)), - "clearing wrap at EOL & processed output\n"); - - /* write line, wrapping disabled, buffer exceeds sb width */ - c.X = sbSize.X - 3; c.Y = 0; - ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left-3\n"); - - ret = WriteConsole(hCon, mytest, mylen, &len, NULL); - ok(ret != 0 && len == mylen, "Couldn't write, ret = %d, len = %d\n", ret, len); - c.Y = 0; - for (p = mylen - 3; p < mylen; p++) - { - c.X = sbSize.X - 3 + p % 3; - okCHAR(hCon, c, mytest[p], TEST_ATTRIB); - } - - c.X = 0; c.Y = 1; - okCHAR(hCon, c, ' ', DEFAULT_ATTRIB); - - p = sbSize.X - 3 + mylen % 3; - c.X = p; c.Y = 0; - - /* write line, wrapping disabled, strings end on end of line */ - c.X = sbSize.X - mylen; c.Y = 0; - ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left-3\n"); - - ok(WriteConsole(hCon, mytest, mylen, &len, NULL) != 0 && len == mylen, "WriteConsole\n"); -} - -static void testWriteNotWrappedProcessed(HANDLE hCon, COORD sbSize) -{ - COORD c; - DWORD len, mode; - const char* mytest = "abcd\nf\tg"; - const int mylen = strlen(mytest); - const int mylen2 = strchr(mytest, '\n') - mytest; - int p; - WORD attr; - - ok(GetConsoleMode(hCon, &mode) && SetConsoleMode(hCon, (mode | ENABLE_PROCESSED_OUTPUT) & ~ENABLE_WRAP_AT_EOL_OUTPUT), - "clearing wrap at EOL & setting processed output\n"); - - /* write line, wrapping disabled, buffer exceeds sb width */ - c.X = sbSize.X - 5; c.Y = 0; - ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left-5\n"); - - ok(WriteConsole(hCon, mytest, mylen, &len, NULL) != 0 && len == mylen, "WriteConsole\n"); - c.Y = 0; - for (c.X = sbSize.X - 5; c.X < sbSize.X - 1; c.X++) - { - okCHAR(hCon, c, mytest[c.X - sbSize.X + 5], TEST_ATTRIB); - } - - ReadConsoleOutputAttribute(hCon, &attr, 1, c, &len); - /* Win9x and WinMe change the attribs for '\n' up to 'f' */ - if (attr == TEST_ATTRIB) - { - win_skip("Win9x/WinMe don't respect ~ENABLE_WRAP_AT_EOL_OUTPUT\n"); - return; - } - - okCHAR(hCon, c, ' ', DEFAULT_ATTRIB); - - c.X = 0; c.Y++; - okCHAR(hCon, c, mytest[5], TEST_ATTRIB); - for (c.X = 1; c.X < 8; c.X++) - okCHAR(hCon, c, ' ', TEST_ATTRIB); - okCHAR(hCon, c, mytest[7], TEST_ATTRIB); - c.X++; - okCHAR(hCon, c, ' ', DEFAULT_ATTRIB); - - okCURSOR(hCon, c); - - /* write line, wrapping disabled, strings end on end of line */ - c.X = sbSize.X - 4; c.Y = 0; - ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left-4\n"); - - ok(WriteConsole(hCon, mytest, mylen, &len, NULL) != 0 && len == mylen, "WriteConsole\n"); - c.Y = 0; - for (c.X = sbSize.X - 4; c.X < sbSize.X; c.X++) - { - okCHAR(hCon, c, mytest[c.X - sbSize.X + 4], TEST_ATTRIB); - } - c.X = 0; c.Y++; - okCHAR(hCon, c, mytest[5], TEST_ATTRIB); - for (c.X = 1; c.X < 8; c.X++) - okCHAR(hCon, c, ' ', TEST_ATTRIB); - okCHAR(hCon, c, mytest[7], TEST_ATTRIB); - c.X++; - okCHAR(hCon, c, ' ', DEFAULT_ATTRIB); - - okCURSOR(hCon, c); - - /* write line, wrapping disabled, strings end after end of line */ - c.X = sbSize.X - 3; c.Y = 0; - ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left-4\n"); - - ok(WriteConsole(hCon, mytest, mylen, &len, NULL) != 0 && len == mylen, "WriteConsole\n"); - c.Y = 0; - for (p = mylen2 - 3; p < mylen2; p++) - { - c.X = sbSize.X - 3 + p % 3; - okCHAR(hCon, c, mytest[p], TEST_ATTRIB); - } - c.X = 0; c.Y = 1; - okCHAR(hCon, c, mytest[5], TEST_ATTRIB); - for (c.X = 1; c.X < 8; c.X++) - okCHAR(hCon, c, ' ', TEST_ATTRIB); - okCHAR(hCon, c, mytest[7], TEST_ATTRIB); - c.X++; - okCHAR(hCon, c, ' ', DEFAULT_ATTRIB); - - okCURSOR(hCon, c); -} - -static void testWriteWrappedNotProcessed(HANDLE hCon, COORD sbSize) -{ - COORD c; - DWORD len, mode; - const char* mytest = "abcd\nf\tg"; - const int mylen = strlen(mytest); - int p; - - ok(GetConsoleMode(hCon, &mode) && SetConsoleMode(hCon,(mode | ENABLE_WRAP_AT_EOL_OUTPUT) & ~(ENABLE_PROCESSED_OUTPUT)), - "setting wrap at EOL & clearing processed output\n"); - - /* write line, wrapping enabled, buffer doesn't exceed sb width */ - c.X = sbSize.X - 9; c.Y = 0; - ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left-9\n"); - - ok(WriteConsole(hCon, mytest, mylen, &len, NULL) != 0 && len == mylen, "WriteConsole\n"); - c.Y = 0; - for (p = 0; p < mylen; p++) - { - c.X = sbSize.X - 9 + p; - okCHAR(hCon, c, mytest[p], TEST_ATTRIB); - } - c.X = sbSize.X - 9 + mylen; - okCHAR(hCon, c, ' ', DEFAULT_ATTRIB); - c.X = 0; c.Y = 1; - okCHAR(hCon, c, ' ', DEFAULT_ATTRIB); - - /* write line, wrapping enabled, buffer does exceed sb width */ - c.X = sbSize.X - 3; c.Y = 0; - ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left-3\n"); - - c.Y = 1; - c.X = mylen - 3; - okCHAR(hCon, c, ' ', DEFAULT_ATTRIB); -} - -static void testWriteWrappedProcessed(HANDLE hCon, COORD sbSize) -{ - COORD c; - DWORD len, mode; - const char* mytest = "abcd\nf\tg"; - const int mylen = strlen(mytest); - int p; - WORD attr; - - ok(GetConsoleMode(hCon, &mode) && SetConsoleMode(hCon, mode | (ENABLE_WRAP_AT_EOL_OUTPUT|ENABLE_PROCESSED_OUTPUT)), - "setting wrap at EOL & processed output\n"); - - /* write line, wrapping enabled, buffer doesn't exceed sb width */ - c.X = sbSize.X - 9; c.Y = 0; - ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left-9\n"); - - ok(WriteConsole(hCon, mytest, mylen, &len, NULL) != 0 && len == mylen, "WriteConsole\n"); - for (p = 0; p < 4; p++) - { - c.X = sbSize.X - 9 + p; - okCHAR(hCon, c, mytest[p], TEST_ATTRIB); - } - c.X = sbSize.X - 9 + p; - ReadConsoleOutputAttribute(hCon, &attr, 1, c, &len); - if (attr == TEST_ATTRIB) - win_skip("Win9x/WinMe changes attribs for '\\n' up to 'f'\n"); - else - okCHAR(hCon, c, ' ', DEFAULT_ATTRIB); - c.X = 0; c.Y++; - okCHAR(hCon, c, mytest[5], TEST_ATTRIB); - for (c.X = 1; c.X < 8; c.X++) - okCHAR(hCon, c, ' ', TEST_ATTRIB); - okCHAR(hCon, c, mytest[7], TEST_ATTRIB); - c.X++; - okCHAR(hCon, c, ' ', DEFAULT_ATTRIB); - okCURSOR(hCon, c); - - /* write line, wrapping enabled, buffer does exceed sb width */ - c.X = sbSize.X - 3; c.Y = 2; - ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left-3\n"); - - ok(WriteConsole(hCon, mytest, mylen, &len, NULL) != 0 && len == mylen, "WriteConsole\n"); - for (p = 0; p < 3; p++) - { - c.X = sbSize.X - 3 + p; - okCHAR(hCon, c, mytest[p], TEST_ATTRIB); - } - c.X = 0; c.Y++; - okCHAR(hCon, c, mytest[3], TEST_ATTRIB); - c.X++; - ReadConsoleOutputAttribute(hCon, &attr, 1, c, &len); - if (attr == TEST_ATTRIB) - win_skip("Win9x/WinMe changes attribs for '\\n' up to 'f'\n"); - else - okCHAR(hCon, c, ' ', DEFAULT_ATTRIB); - - c.X = 0; c.Y++; - okCHAR(hCon, c, mytest[5], TEST_ATTRIB); - for (c.X = 1; c.X < 8; c.X++) - okCHAR(hCon, c, ' ', TEST_ATTRIB); - okCHAR(hCon, c, mytest[7], TEST_ATTRIB); - c.X++; - okCHAR(hCon, c, ' ', DEFAULT_ATTRIB); - okCURSOR(hCon, c); -} - -static void testWrite(HANDLE hCon, COORD sbSize) -{ - /* FIXME: should in fact insure that the sb is at least 10 character wide */ - ok(SetConsoleTextAttribute(hCon, TEST_ATTRIB), "Setting default text color\n"); - resetContent(hCon, sbSize, FALSE); - testEmptyWrite(hCon); - resetContent(hCon, sbSize, FALSE); - testWriteSimple(hCon); - resetContent(hCon, sbSize, FALSE); - testWriteNotWrappedNotProcessed(hCon, sbSize); - resetContent(hCon, sbSize, FALSE); - testWriteNotWrappedProcessed(hCon, sbSize); - resetContent(hCon, sbSize, FALSE); - testWriteWrappedNotProcessed(hCon, sbSize); - resetContent(hCon, sbSize, FALSE); - testWriteWrappedProcessed(hCon, sbSize); -} - -static void testScroll(HANDLE hCon, COORD sbSize) -{ - SMALL_RECT scroll, clip; - COORD dst, c, tc; - CHAR_INFO ci; - BOOL ret; - -#define W 11 -#define H 7 - -#define IN_SRECT(r,c) ((r).Left <= (c).X && (c).X <= (r).Right && (r).Top <= (c).Y && (c).Y <= (r).Bottom) -#define IN_SRECT2(r,d,c) ((d).X <= (c).X && (c).X <= (d).X + (r).Right - (r).Left && (d).Y <= (c).Y && (c).Y <= (d).Y + (r).Bottom - (r).Top) - - /* no clipping, src & dst rect don't overlap */ - resetContent(hCon, sbSize, TRUE); - - scroll.Left = 0; - scroll.Right = W - 1; - scroll.Top = 0; - scroll.Bottom = H - 1; - dst.X = W + 3; - dst.Y = H + 3; - ci.Char.UnicodeChar = '#'; - ci.Attributes = TEST_ATTRIB; - - clip.Left = 0; - clip.Right = sbSize.X - 1; - clip.Top = 0; - clip.Bottom = sbSize.Y - 1; - - ok(ScrollConsoleScreenBuffer(hCon, &scroll, NULL, dst, &ci), "Scrolling SB\n"); - - for (c.Y = 0; c.Y < sbSize.Y; c.Y++) - { - for (c.X = 0; c.X < sbSize.X; c.X++) - { - if (IN_SRECT2(scroll, dst, c) && IN_SRECT(clip, c)) - { - tc.X = c.X - dst.X; - tc.Y = c.Y - dst.Y; - okCHAR(hCon, c, CONTENT(tc), DEFAULT_ATTRIB); - } - else if (IN_SRECT(scroll, c) && IN_SRECT(clip, c)) - okCHAR(hCon, c, '#', TEST_ATTRIB); - else okCHAR(hCon, c, CONTENT(c), DEFAULT_ATTRIB); - } - } - - /* no clipping, src & dst rect do overlap */ - resetContent(hCon, sbSize, TRUE); - - scroll.Left = 0; - scroll.Right = W - 1; - scroll.Top = 0; - scroll.Bottom = H - 1; - dst.X = W /2; - dst.Y = H / 2; - ci.Char.UnicodeChar = '#'; - ci.Attributes = TEST_ATTRIB; - - clip.Left = 0; - clip.Right = sbSize.X - 1; - clip.Top = 0; - clip.Bottom = sbSize.Y - 1; - - ok(ScrollConsoleScreenBuffer(hCon, &scroll, NULL, dst, &ci), "Scrolling SB\n"); - - for (c.Y = 0; c.Y < sbSize.Y; c.Y++) - { - for (c.X = 0; c.X < sbSize.X; c.X++) - { - if (dst.X <= c.X && c.X < dst.X + W && dst.Y <= c.Y && c.Y < dst.Y + H) - { - tc.X = c.X - dst.X; - tc.Y = c.Y - dst.Y; - okCHAR(hCon, c, CONTENT(tc), DEFAULT_ATTRIB); - } - else if (c.X < W && c.Y < H) okCHAR(hCon, c, '#', TEST_ATTRIB); - else okCHAR(hCon, c, CONTENT(c), DEFAULT_ATTRIB); - } - } - - /* clipping, src & dst rect don't overlap */ - resetContent(hCon, sbSize, TRUE); - - scroll.Left = 0; - scroll.Right = W - 1; - scroll.Top = 0; - scroll.Bottom = H - 1; - dst.X = W + 3; - dst.Y = H + 3; - ci.Char.UnicodeChar = '#'; - ci.Attributes = TEST_ATTRIB; - - clip.Left = W / 2; - clip.Right = min(W + W / 2, sbSize.X - 1); - clip.Top = H / 2; - clip.Bottom = min(H + H / 2, sbSize.Y - 1); - - SetLastError(0xdeadbeef); - ret = ScrollConsoleScreenBuffer(hCon, &scroll, &clip, dst, &ci); - if (ret) - { - for (c.Y = 0; c.Y < sbSize.Y; c.Y++) - { - for (c.X = 0; c.X < sbSize.X; c.X++) - { - if (IN_SRECT2(scroll, dst, c) && IN_SRECT(clip, c)) - { - tc.X = c.X - dst.X; - tc.Y = c.Y - dst.Y; - okCHAR(hCon, c, CONTENT(tc), DEFAULT_ATTRIB); - } - else if (IN_SRECT(scroll, c) && IN_SRECT(clip, c)) - okCHAR(hCon, c, '#', TEST_ATTRIB); - else okCHAR(hCon, c, CONTENT(c), DEFAULT_ATTRIB); - } - } - } - else - { - /* Win9x will fail, Only accept ERROR_NOT_ENOUGH_MEMORY */ - ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY, - "Expected ERROR_NOT_ENOUGH_MEMORY, got %u\n", GetLastError()); - } - - /* clipping, src & dst rect do overlap */ - resetContent(hCon, sbSize, TRUE); - - scroll.Left = 0; - scroll.Right = W - 1; - scroll.Top = 0; - scroll.Bottom = H - 1; - dst.X = W / 2 - 3; - dst.Y = H / 2 - 3; - ci.Char.UnicodeChar = '#'; - ci.Attributes = TEST_ATTRIB; - - clip.Left = W / 2; - clip.Right = min(W + W / 2, sbSize.X - 1); - clip.Top = H / 2; - clip.Bottom = min(H + H / 2, sbSize.Y - 1); - - ok(ScrollConsoleScreenBuffer(hCon, &scroll, &clip, dst, &ci), "Scrolling SB\n"); - - for (c.Y = 0; c.Y < sbSize.Y; c.Y++) - { - for (c.X = 0; c.X < sbSize.X; c.X++) - { - if (IN_SRECT2(scroll, dst, c) && IN_SRECT(clip, c)) - { - tc.X = c.X - dst.X; - tc.Y = c.Y - dst.Y; - okCHAR(hCon, c, CONTENT(tc), DEFAULT_ATTRIB); - } - else if (IN_SRECT(scroll, c) && IN_SRECT(clip, c)) - okCHAR(hCon, c, '#', TEST_ATTRIB); - else okCHAR(hCon, c, CONTENT(c), DEFAULT_ATTRIB); - } - } -} - -static int mch_count; -/* we need the event as Wine console event generation isn't synchronous - * (ie GenerateConsoleCtrlEvent returns before all ctrl-handlers in all - * processes have been called). - */ -static HANDLE mch_event; -static BOOL WINAPI mch(DWORD event) -{ - mch_count++; - SetEvent(mch_event); - return TRUE; -} - -static void testCtrlHandler(void) -{ - ok(!SetConsoleCtrlHandler(mch, FALSE), "Shouldn't succeed\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Bad error %u\n", GetLastError()); - ok(SetConsoleCtrlHandler(mch, TRUE), "Couldn't set handler\n"); - /* wine requires the event for the test, as we cannot insure, so far, that event - * are processed synchronously in GenerateConsoleCtrlEvent() - */ - mch_event = CreateEventA(NULL, TRUE, FALSE, NULL); - mch_count = 0; - ok(GenerateConsoleCtrlEvent(CTRL_C_EVENT, 0), "Couldn't send ctrl-c event\n"); - /* FIXME: it isn't synchronous on wine but it can still happen before we test */ - if (0) ok(mch_count == 1, "Event isn't synchronous\n"); - ok(WaitForSingleObject(mch_event, 3000) == WAIT_OBJECT_0, "event sending didn't work\n"); - CloseHandle(mch_event); - - /* Turning off ctrl-c handling doesn't work on win9x such way ... */ - ok(SetConsoleCtrlHandler(NULL, TRUE), "Couldn't turn off ctrl-c handling\n"); - mch_event = CreateEventA(NULL, TRUE, FALSE, NULL); - mch_count = 0; - if(!(GetVersion() & 0x80000000)) - /* ... and next line leads to an unhandled exception on 9x. Avoid it on 9x. */ - ok(GenerateConsoleCtrlEvent(CTRL_C_EVENT, 0), "Couldn't send ctrl-c event\n"); - ok(WaitForSingleObject(mch_event, 3000) == WAIT_TIMEOUT && mch_count == 0, "Event shouldn't have been sent\n"); - CloseHandle(mch_event); - ok(SetConsoleCtrlHandler(mch, FALSE), "Couldn't remove handler\n"); - ok(!SetConsoleCtrlHandler(mch, FALSE), "Shouldn't succeed\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Bad error %u\n", GetLastError()); -} - -/* - * Test console screen buffer: - * 1) Try to set invalid handle. - * 2) Try to set non-console handles. - * 3) Use CONOUT$ file as active SB. - * 4) Test cursor. - * 5) Test output codepage to show it is not a property of SB. - * 6) Test switching to old SB if we close all handles to current SB - works - * in Windows, TODO in wine. - * - * What is not tested but should be: - * 1) ScreenBufferInfo - */ -static void testScreenBuffer(HANDLE hConOut) -{ - HANDLE hConOutRW, hConOutRO, hConOutWT; - HANDLE hFileOutRW, hFileOutRO, hFileOutWT; - HANDLE hConOutNew; - char test_str1[] = "Test for SB1"; - char test_str2[] = "Test for SB2"; - char test_cp866[] = {0xe2, 0xa5, 0xe1, 0xe2, 0}; - char test_cp1251[] = {0xf2, 0xe5, 0xf1, 0xf2, 0}; - WCHAR test_unicode[] = {0x0442, 0x0435, 0x0441, 0x0442, 0}; - WCHAR str_wbuf[20]; - char str_buf[20]; - DWORD len; - COORD c; - BOOL ret; - DWORD oldcp; - - if (!IsValidCodePage(866)) - { - skip("Codepage 866 not available\n"); - return; - } - - /* In the beginning set output codepage to 866 */ - oldcp = GetConsoleOutputCP(); - SetLastError(0xdeadbeef); - ret = SetConsoleOutputCP(866); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("SetConsoleOutputCP is not implemented\n"); - return; - } - ok(ret, "Cannot set output codepage to 866\n"); - - hConOutRW = CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, - CONSOLE_TEXTMODE_BUFFER, NULL); - ok(hConOutRW != INVALID_HANDLE_VALUE, - "Cannot create a new screen buffer for ReadWrite\n"); - hConOutRO = CreateConsoleScreenBuffer(GENERIC_READ, - FILE_SHARE_READ, NULL, - CONSOLE_TEXTMODE_BUFFER, NULL); - ok(hConOutRO != INVALID_HANDLE_VALUE, - "Cannot create a new screen buffer for ReadOnly\n"); - hConOutWT = CreateConsoleScreenBuffer(GENERIC_WRITE, - FILE_SHARE_WRITE, NULL, - CONSOLE_TEXTMODE_BUFFER, NULL); - ok(hConOutWT != INVALID_HANDLE_VALUE, - "Cannot create a new screen buffer for WriteOnly\n"); - - hFileOutRW = CreateFileA("NUL", GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, - OPEN_EXISTING, 0, NULL); - ok(hFileOutRW != INVALID_HANDLE_VALUE, "Cannot open NUL for ReadWrite\n"); - hFileOutRO = CreateFileA("NUL", GENERIC_READ, FILE_SHARE_READ, - NULL, OPEN_EXISTING, 0, NULL); - ok(hFileOutRO != INVALID_HANDLE_VALUE, "Cannot open NUL for ReadOnly\n"); - hFileOutWT = CreateFileA("NUL", GENERIC_WRITE, FILE_SHARE_WRITE, - NULL, OPEN_EXISTING, 0, NULL); - ok(hFileOutWT != INVALID_HANDLE_VALUE, "Cannot open NUL for WriteOnly\n"); - - /* Trying to set invalid handle */ - SetLastError(0); - ok(!SetConsoleActiveScreenBuffer(INVALID_HANDLE_VALUE), - "Shouldn't succeed\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, - "GetLastError: expecting %u got %u\n", - ERROR_INVALID_HANDLE, GetLastError()); - - /* Trying to set non-console handles */ - SetLastError(0); - ok(!SetConsoleActiveScreenBuffer(hFileOutRW), "Shouldn't succeed\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, - "GetLastError: expecting %u got %u\n", - ERROR_INVALID_HANDLE, GetLastError()); - - SetLastError(0); - ok(!SetConsoleActiveScreenBuffer(hFileOutRO), "Shouldn't succeed\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, - "GetLastError: expecting %u got %u\n", - ERROR_INVALID_HANDLE, GetLastError()); - - SetLastError(0); - ok(!SetConsoleActiveScreenBuffer(hFileOutWT), "Shouldn't succeed\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, - "GetLastError: expecting %u got %u\n", - ERROR_INVALID_HANDLE, GetLastError()); - - CloseHandle(hFileOutRW); - CloseHandle(hFileOutRO); - CloseHandle(hFileOutWT); - - /* Trying to set SB handles with various access modes */ - SetLastError(0); - ok(!SetConsoleActiveScreenBuffer(hConOutRO), "Shouldn't succeed\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, - "GetLastError: expecting %u got %u\n", - ERROR_INVALID_HANDLE, GetLastError()); - - ok(SetConsoleActiveScreenBuffer(hConOutWT), "Couldn't set new WriteOnly SB\n"); - - ok(SetConsoleActiveScreenBuffer(hConOutRW), "Couldn't set new ReadWrite SB\n"); - - CloseHandle(hConOutWT); - CloseHandle(hConOutRO); - - /* Now we have two ReadWrite SB, active must be hConOutRW */ - /* Open current SB via CONOUT$ */ - hConOutNew = CreateFileA("CONOUT$", GENERIC_READ|GENERIC_WRITE, 0, - NULL, OPEN_EXISTING, 0, 0); - ok(hConOutNew != INVALID_HANDLE_VALUE, "CONOUT$ is not opened\n"); - - - /* test cursor */ - c.X = c.Y = 10; - SetConsoleCursorPosition(hConOut, c); - c.X = c.Y = 5; - SetConsoleCursorPosition(hConOutRW, c); - okCURSOR(hConOutNew, c); - c.X = c.Y = 10; - okCURSOR(hConOut, c); - - - c.X = c.Y = 0; - - /* Write using hConOutNew... */ - SetConsoleCursorPosition(hConOutNew, c); - ret = WriteConsoleA(hConOutNew, test_str2, lstrlenA(test_str2), &len, NULL); - ok (ret && len == lstrlenA(test_str2), "WriteConsoleA failed\n"); - /* ... and read it back via hConOutRW */ - ret = ReadConsoleOutputCharacterA(hConOutRW, str_buf, lstrlenA(test_str2), c, &len); - ok(ret && len == lstrlenA(test_str2), "ReadConsoleOutputCharacterA failed\n"); - str_buf[lstrlenA(test_str2)] = 0; - ok(!lstrcmpA(str_buf, test_str2), "got '%s' expected '%s'\n", str_buf, test_str2); - - - /* Now test output codepage handling. Current is 866 as we set earlier. */ - SetConsoleCursorPosition(hConOutRW, c); - ret = WriteConsoleA(hConOutRW, test_cp866, lstrlenA(test_cp866), &len, NULL); - ok(ret && len == lstrlenA(test_cp866), "WriteConsoleA failed\n"); - ret = ReadConsoleOutputCharacterW(hConOutRW, str_wbuf, lstrlenA(test_cp866), c, &len); - ok(ret && len == lstrlenA(test_cp866), "ReadConsoleOutputCharacterW failed\n"); - str_wbuf[lstrlenA(test_cp866)] = 0; - ok(!lstrcmpW(str_wbuf, test_unicode), "string does not match the pattern\n"); - - /* - * cp866 is OK, let's switch to cp1251. - * We expect that this codepage will be used in every SB - active and not. - */ - ok(SetConsoleOutputCP(1251), "Cannot set output cp to 1251\n"); - SetConsoleCursorPosition(hConOutRW, c); - ret = WriteConsoleA(hConOutRW, test_cp1251, lstrlenA(test_cp1251), &len, NULL); - ok(ret && len == lstrlenA(test_cp1251), "WriteConsoleA failed\n"); - ret = ReadConsoleOutputCharacterW(hConOutRW, str_wbuf, lstrlenA(test_cp1251), c, &len); - ok(ret && len == lstrlenA(test_cp1251), "ReadConsoleOutputCharacterW failed\n"); - str_wbuf[lstrlenA(test_cp1251)] = 0; - ok(!lstrcmpW(str_wbuf, test_unicode), "string does not match the pattern\n"); - - /* Check what has happened to hConOut. */ - SetConsoleCursorPosition(hConOut, c); - ret = WriteConsoleA(hConOut, test_cp1251, lstrlenA(test_cp1251), &len, NULL); - ok(ret && len == lstrlenA(test_cp1251), "WriteConsoleA failed\n"); - ret = ReadConsoleOutputCharacterW(hConOut, str_wbuf, lstrlenA(test_cp1251), c, &len); - ok(ret && len == lstrlenA(test_cp1251), "ReadConsoleOutputCharacterW failed\n"); - str_wbuf[lstrlenA(test_cp1251)] = 0; - ok(!lstrcmpW(str_wbuf, test_unicode), "string does not match the pattern\n"); - - /* Close all handles of current console SB */ - CloseHandle(hConOutNew); - CloseHandle(hConOutRW); - - /* Now active SB should be hConOut */ - hConOutNew = CreateFileA("CONOUT$", GENERIC_READ|GENERIC_WRITE, 0, - NULL, OPEN_EXISTING, 0, 0); - ok(hConOutNew != INVALID_HANDLE_VALUE, "CONOUT$ is not opened\n"); - - /* Write using hConOutNew... */ - SetConsoleCursorPosition(hConOutNew, c); - ret = WriteConsoleA(hConOutNew, test_str1, lstrlenA(test_str1), &len, NULL); - ok (ret && len == lstrlenA(test_str1), "WriteConsoleA failed\n"); - /* ... and read it back via hConOut */ - ret = ReadConsoleOutputCharacterA(hConOut, str_buf, lstrlenA(test_str1), c, &len); - ok(ret && len == lstrlenA(test_str1), "ReadConsoleOutputCharacterA failed\n"); - str_buf[lstrlenA(test_str1)] = 0; - todo_wine ok(!lstrcmpA(str_buf, test_str1), "got '%s' expected '%s'\n", str_buf, test_str1); - CloseHandle(hConOutNew); - - /* This is not really needed under Windows */ - SetConsoleActiveScreenBuffer(hConOut); - - /* restore codepage */ - SetConsoleOutputCP(oldcp); -} - -static void test_GetSetConsoleInputExeName(void) -{ - BOOL ret; - DWORD error; - char buffer[MAX_PATH], module[MAX_PATH], *p; - static char input_exe[MAX_PATH] = "winetest.exe"; - - SetLastError(0xdeadbeef); - ret = pGetConsoleInputExeNameA(0, NULL); - error = GetLastError(); - ok(ret, "GetConsoleInputExeNameA failed\n"); - ok(error == ERROR_BUFFER_OVERFLOW, "got %u expected ERROR_BUFFER_OVERFLOW\n", error); - - SetLastError(0xdeadbeef); - ret = pGetConsoleInputExeNameA(0, buffer); - error = GetLastError(); - ok(ret, "GetConsoleInputExeNameA failed\n"); - ok(error == ERROR_BUFFER_OVERFLOW, "got %u expected ERROR_BUFFER_OVERFLOW\n", error); - - GetModuleFileNameA(GetModuleHandle(NULL), module, sizeof(module)); - p = strrchr(module, '\\') + 1; - - ret = pGetConsoleInputExeNameA(sizeof(buffer)/sizeof(buffer[0]), buffer); - ok(ret, "GetConsoleInputExeNameA failed\n"); - todo_wine ok(!lstrcmpA(buffer, p), "got %s expected %s\n", buffer, p); - - SetLastError(0xdeadbeef); - ret = pSetConsoleInputExeNameA(NULL); - error = GetLastError(); - ok(!ret, "SetConsoleInputExeNameA failed\n"); - ok(error == ERROR_INVALID_PARAMETER, "got %u expected ERROR_INVALID_PARAMETER\n", error); - - SetLastError(0xdeadbeef); - ret = pSetConsoleInputExeNameA(""); - error = GetLastError(); - ok(!ret, "SetConsoleInputExeNameA failed\n"); - ok(error == ERROR_INVALID_PARAMETER, "got %u expected ERROR_INVALID_PARAMETER\n", error); - - ret = pSetConsoleInputExeNameA(input_exe); - ok(ret, "SetConsoleInputExeNameA failed\n"); - - ret = pGetConsoleInputExeNameA(sizeof(buffer)/sizeof(buffer[0]), buffer); - ok(ret, "GetConsoleInputExeNameA failed\n"); - ok(!lstrcmpA(buffer, input_exe), "got %s expected %s\n", buffer, input_exe); -} - -static void test_GetConsoleProcessList(void) -{ - DWORD ret, *list = NULL; - - if (!pGetConsoleProcessList) - { - win_skip("GetConsoleProcessList is not available\n"); - return; - } - - SetLastError(0xdeadbeef); - ret = pGetConsoleProcessList(NULL, 0); - ok(ret == 0, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ret = pGetConsoleProcessList(NULL, 1); - ok(ret == 0, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", - GetLastError()); - - /* We should only have 1 process but only for these specific unit tests as - * we created our own console. An AttachConsole(ATTACH_PARENT_PROCESS) would - * give us two processes for example. - */ - list = HeapAlloc(GetProcessHeap(), 0, sizeof(DWORD)); - - SetLastError(0xdeadbeef); - ret = pGetConsoleProcessList(list, 0); - ok(ret == 0, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ret = pGetConsoleProcessList(list, 1); - todo_wine - ok(ret == 1, "Expected 1, got %d\n", ret); - - HeapFree(GetProcessHeap(), 0, list); - - list = HeapAlloc(GetProcessHeap(), 0, ret * sizeof(DWORD)); - - SetLastError(0xdeadbeef); - ret = pGetConsoleProcessList(list, ret); - todo_wine - ok(ret == 1, "Expected 1, got %d\n", ret); - - if (ret == 1) - { - DWORD pid = GetCurrentProcessId(); - ok(list[0] == pid, "Expected %d, got %d\n", pid, list[0]); - } - - HeapFree(GetProcessHeap(), 0, list); -} - -static void test_OpenCON(void) -{ - static const WCHAR conW[] = {'C','O','N',0}; - static const DWORD accesses[] = {CREATE_NEW, CREATE_ALWAYS, OPEN_EXISTING, - OPEN_ALWAYS, TRUNCATE_EXISTING}; - unsigned i; - HANDLE h; - - for (i = 0; i < sizeof(accesses) / sizeof(accesses[0]); i++) - { - h = CreateFileW(conW, GENERIC_WRITE, 0, NULL, accesses[i], 0, NULL); - ok(h != INVALID_HANDLE_VALUE, "Expected to open the CON device on write (%x)\n", accesses[i]); - CloseHandle(h); - - h = CreateFileW(conW, GENERIC_READ, 0, NULL, accesses[i], 0, NULL); - /* Windows versions differ here: - * MSDN states in CreateFile that TRUNCATE_EXISTING requires GENERIC_WRITE - * NT, XP, Vista comply, but Win7 doesn't and allows to open CON with TRUNCATE_EXISTING - * So don't test when disposition is TRUNCATE_EXISTING - */ - if (accesses[i] != TRUNCATE_EXISTING) - { - ok(h != INVALID_HANDLE_VALUE, "Expected to open the CON device on read (%x)\n", accesses[i]); - } - CloseHandle(h); - h = CreateFileW(conW, GENERIC_READ|GENERIC_WRITE, 0, NULL, accesses[i], 0, NULL); - ok(h == INVALID_HANDLE_VALUE, "Expected not to open the CON device on read-write (%x)\n", accesses[i]); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Unexpected error %x\n", GetLastError()); - } -} - -static void test_OpenConsoleW(void) -{ - static const WCHAR coninW[] = {'C','O','N','I','N','$',0}; - static const WCHAR conoutW[] = {'C','O','N','O','U','T','$',0}; - static const WCHAR emptyW[] = {0}; - static const WCHAR invalidW[] = {'I','N','V','A','L','I','D',0}; - - static const struct - { - LPCWSTR name; - DWORD access; - BOOL inherit; - DWORD creation; - DWORD gle; - } invalid_table[] = { - {NULL, 0, FALSE, 0, ERROR_INVALID_PARAMETER}, - {NULL, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, ERROR_INVALID_PARAMETER}, - {NULL, 0, FALSE, OPEN_ALWAYS, ERROR_INVALID_PARAMETER}, - {NULL, GENERIC_READ | GENERIC_WRITE, FALSE, 0, ERROR_INVALID_PARAMETER}, - {NULL, GENERIC_READ | GENERIC_WRITE, FALSE, OPEN_ALWAYS, ERROR_INVALID_PARAMETER}, - {NULL, GENERIC_READ | GENERIC_WRITE, FALSE, OPEN_EXISTING, ERROR_INVALID_PARAMETER}, - {emptyW, 0, FALSE, 0, ERROR_INVALID_PARAMETER}, - {emptyW, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, ERROR_INVALID_PARAMETER}, - {emptyW, 0, FALSE, OPEN_ALWAYS, ERROR_INVALID_PARAMETER}, - {emptyW, GENERIC_READ | GENERIC_WRITE, FALSE, 0, ERROR_INVALID_PARAMETER}, - {emptyW, GENERIC_READ | GENERIC_WRITE, FALSE, OPEN_ALWAYS, ERROR_INVALID_PARAMETER}, - {emptyW, GENERIC_READ | GENERIC_WRITE, FALSE, OPEN_EXISTING, ERROR_INVALID_PARAMETER}, - {invalidW, 0, FALSE, 0, ERROR_INVALID_PARAMETER}, - {invalidW, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, ERROR_INVALID_PARAMETER}, - {invalidW, 0, FALSE, OPEN_ALWAYS, ERROR_INVALID_PARAMETER}, - {invalidW, GENERIC_READ | GENERIC_WRITE, FALSE, 0, ERROR_INVALID_PARAMETER}, - {invalidW, GENERIC_READ | GENERIC_WRITE, FALSE, OPEN_ALWAYS, ERROR_INVALID_PARAMETER}, - {invalidW, GENERIC_READ | GENERIC_WRITE, FALSE, OPEN_EXISTING, ERROR_INVALID_PARAMETER}, - {coninW, 0, FALSE, 0, ERROR_SHARING_VIOLATION}, - {coninW, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, ERROR_INVALID_PARAMETER}, - {coninW, 0, FALSE, OPEN_ALWAYS, ERROR_INVALID_PARAMETER}, - {coninW, GENERIC_READ | GENERIC_WRITE, FALSE, 0, ERROR_SHARING_VIOLATION}, - {coninW, GENERIC_READ | GENERIC_WRITE, FALSE, CREATE_NEW, ERROR_SHARING_VIOLATION}, - {coninW, GENERIC_READ | GENERIC_WRITE, FALSE, CREATE_ALWAYS, ERROR_SHARING_VIOLATION}, - {coninW, GENERIC_READ | GENERIC_WRITE, FALSE, OPEN_ALWAYS, ERROR_INVALID_PARAMETER}, - {coninW, GENERIC_READ | GENERIC_WRITE, FALSE, TRUNCATE_EXISTING, ERROR_INVALID_PARAMETER}, - {conoutW, 0, FALSE, 0, ERROR_SHARING_VIOLATION}, - {conoutW, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, ERROR_INVALID_PARAMETER}, - {conoutW, 0, FALSE, OPEN_ALWAYS, ERROR_INVALID_PARAMETER}, - {conoutW, GENERIC_READ | GENERIC_WRITE, FALSE, 0, ERROR_SHARING_VIOLATION}, - {conoutW, GENERIC_READ | GENERIC_WRITE, FALSE, CREATE_NEW, ERROR_SHARING_VIOLATION}, - {conoutW, GENERIC_READ | GENERIC_WRITE, FALSE, CREATE_ALWAYS, ERROR_SHARING_VIOLATION}, - {conoutW, GENERIC_READ | GENERIC_WRITE, FALSE, OPEN_ALWAYS, ERROR_INVALID_PARAMETER}, - {conoutW, GENERIC_READ | GENERIC_WRITE, FALSE, TRUNCATE_EXISTING, ERROR_INVALID_PARAMETER}, - }; - - int index; - HANDLE ret; - - if (!pOpenConsoleW) - { - win_skip("OpenConsoleW is not available\n"); - return; - } - - for (index = 0; index < sizeof(invalid_table)/sizeof(invalid_table[0]); index++) - { - SetLastError(0xdeadbeef); - ret = pOpenConsoleW(invalid_table[index].name, invalid_table[index].access, - invalid_table[index].inherit, invalid_table[index].creation); - ok(ret == INVALID_HANDLE_VALUE, - "Expected OpenConsoleW to return INVALID_HANDLE_VALUE for index %d, got %p\n", - index, ret); - ok(GetLastError() == invalid_table[index].gle, - "Expected GetLastError() to return %u for index %d, got %u\n", - invalid_table[index].gle, index, GetLastError()); - } - - /* OpenConsoleW should not touch the last error on success. */ - SetLastError(0xdeadbeef); - ret = pOpenConsoleW(coninW, GENERIC_READ | GENERIC_WRITE, FALSE, OPEN_EXISTING); - ok(ret != INVALID_HANDLE_VALUE, - "Expected OpenConsoleW to return a valid handle\n"); - ok(GetLastError() == 0xdeadbeef, - "Expected the last error to be untouched, got %u\n", GetLastError()); - if (ret != INVALID_HANDLE_VALUE) - CloseHandle(ret); - - SetLastError(0xdeadbeef); - ret = pOpenConsoleW(conoutW, GENERIC_READ | GENERIC_WRITE, FALSE, OPEN_EXISTING); - ok(ret != INVALID_HANDLE_VALUE, - "Expected OpenConsoleW to return a valid handle\n"); - ok(GetLastError() == 0xdeadbeef, - "Expected the last error to be untouched, got %u\n", GetLastError()); - if (ret != INVALID_HANDLE_VALUE) - CloseHandle(ret); -} - -static void test_VerifyConsoleIoHandle( HANDLE handle ) -{ - BOOL ret; - DWORD error; - - if (!pVerifyConsoleIoHandle) - { - win_skip("VerifyConsoleIoHandle is not available\n"); - return; - } - - /* invalid handle */ - SetLastError(0xdeadbeef); - ret = pVerifyConsoleIoHandle((HANDLE)0xdeadbee0); - error = GetLastError(); - ok(!ret, "expected VerifyConsoleIoHandle to fail\n"); - ok(error == 0xdeadbeef, "wrong GetLastError() %d\n", error); - - /* invalid handle + 1 */ - SetLastError(0xdeadbeef); - ret = pVerifyConsoleIoHandle((HANDLE)0xdeadbee1); - error = GetLastError(); - ok(!ret, "expected VerifyConsoleIoHandle to fail\n"); - ok(error == 0xdeadbeef, "wrong GetLastError() %d\n", error); - - /* invalid handle + 2 */ - SetLastError(0xdeadbeef); - ret = pVerifyConsoleIoHandle((HANDLE)0xdeadbee2); - error = GetLastError(); - ok(!ret, "expected VerifyConsoleIoHandle to fail\n"); - ok(error == 0xdeadbeef, "wrong GetLastError() %d\n", error); - - /* invalid handle + 3 */ - SetLastError(0xdeadbeef); - ret = pVerifyConsoleIoHandle((HANDLE)0xdeadbee3); - error = GetLastError(); - ok(!ret, "expected VerifyConsoleIoHandle to fail\n"); - ok(error == 0xdeadbeef, "wrong GetLastError() %d\n", error); - - /* valid handle */ - SetLastError(0xdeadbeef); - ret = pVerifyConsoleIoHandle(handle); - error = GetLastError(); - ok(ret, "expected VerifyConsoleIoHandle to succeed\n"); - ok(error == 0xdeadbeef, "wrong GetLastError() %d\n", error); -} - -static void test_GetSetStdHandle(void) -{ - HANDLE handle; - DWORD error; - BOOL ret; - - /* get invalid std handle */ - SetLastError(0xdeadbeef); - handle = GetStdHandle(42); - error = GetLastError(); - ok(error == ERROR_INVALID_HANDLE || broken(error == ERROR_INVALID_FUNCTION)/* Win9x */, - "wrong GetLastError() %d\n", error); - ok(handle == INVALID_HANDLE_VALUE, "expected INVALID_HANDLE_VALUE\n"); - - /* get valid */ - SetLastError(0xdeadbeef); - handle = GetStdHandle(STD_INPUT_HANDLE); - error = GetLastError(); - ok(error == 0xdeadbeef, "wrong GetLastError() %d\n", error); - - /* set invalid std handle */ - SetLastError(0xdeadbeef); - ret = SetStdHandle(42, handle); - error = GetLastError(); - ok(!ret, "expected SetStdHandle to fail\n"); - ok(error == ERROR_INVALID_HANDLE || broken(error == ERROR_INVALID_FUNCTION)/* Win9x */, - "wrong GetLastError() %d\n", error); - - /* set valid (restore old value) */ - SetLastError(0xdeadbeef); - ret = SetStdHandle(STD_INPUT_HANDLE, handle); - error = GetLastError(); - ok(ret, "expected SetStdHandle to succeed\n"); - ok(error == 0xdeadbeef, "wrong GetLastError() %d\n", error); -} - -static void test_GetNumberOfConsoleInputEvents(HANDLE input_handle) -{ - DWORD count; - BOOL ret; - int i; - - const struct - { - HANDLE handle; - LPDWORD nrofevents; - DWORD last_error; - } invalid_table[] = - { - {NULL, NULL, ERROR_INVALID_HANDLE}, - {NULL, &count, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, NULL, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, &count, ERROR_INVALID_HANDLE}, - }; - - for (i = 0; i < sizeof(invalid_table)/sizeof(invalid_table[0]); i++) - { - SetLastError(0xdeadbeef); - if (invalid_table[i].nrofevents) count = 0xdeadbeef; - ret = GetNumberOfConsoleInputEvents(invalid_table[i].handle, - invalid_table[i].nrofevents); - ok(!ret, "[%d] Expected GetNumberOfConsoleInputEvents to return FALSE, got %d\n", i, ret); - if (invalid_table[i].nrofevents) - { - ok(count == 0xdeadbeef, - "[%d] Expected output count to be unmodified, got %u\n", i, count); - } - ok(GetLastError() == invalid_table[i].last_error, - "[%d] Expected last error to be %u, got %u\n", - i, invalid_table[i].last_error, GetLastError()); - } - - /* Test crashes on Windows 7. */ - if (0) - { - SetLastError(0xdeadbeef); - ret = GetNumberOfConsoleInputEvents(input_handle, NULL); - ok(!ret, "Expected GetNumberOfConsoleInputEvents to return FALSE, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_ACCESS, - "Expected last error to be ERROR_INVALID_ACCESS, got %u\n", - GetLastError()); - } - - count = 0xdeadbeef; - ret = GetNumberOfConsoleInputEvents(input_handle, &count); - ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count != 0xdeadbeef, "Expected output count to initialized\n"); -} - -static void test_WriteConsoleInputA(HANDLE input_handle) -{ - INPUT_RECORD event; - INPUT_RECORD event_list[5]; - MOUSE_EVENT_RECORD mouse_event = { {0, 0}, 0, 0, MOUSE_MOVED }; - KEY_EVENT_RECORD key_event; - DWORD count, console_mode; - BOOL ret; - int i; - - const struct - { - HANDLE handle; - const INPUT_RECORD *buffer; - DWORD count; - LPDWORD written; - DWORD expected_count; - DWORD last_error; - int win7_crash; - } invalid_table[] = - { - {NULL, NULL, 0, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, NULL, 0, &count, 0, ERROR_INVALID_HANDLE}, - {NULL, NULL, 1, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS}, - {NULL, NULL, 1, &count, 0xdeadbeef, ERROR_INVALID_ACCESS}, - {NULL, &event, 0, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, &event, 0, &count, 0, ERROR_INVALID_HANDLE}, - {NULL, &event, 1, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, &event, 1, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, NULL, 0, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, NULL, 0, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, NULL, 1, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS}, - {INVALID_HANDLE_VALUE, NULL, 1, &count, 0xdeadbeef, ERROR_INVALID_ACCESS}, - {INVALID_HANDLE_VALUE, &event, 0, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, &event, 0, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, &event, 1, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, &event, 1, &count, 0, ERROR_INVALID_HANDLE}, - {input_handle, NULL, 0, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {input_handle, NULL, 1, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS}, - {input_handle, NULL, 1, &count, 0xdeadbeef, ERROR_INVALID_ACCESS}, - {input_handle, &event, 0, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {input_handle, &event, 1, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - }; - - /* Suppress external sources of input events for the duration of the test. */ - ret = GetConsoleMode(input_handle, &console_mode); - ok(ret == TRUE, "Expected GetConsoleMode to return TRUE, got %d\n", ret); - if (!ret) - { - skip("GetConsoleMode failed with last error %u\n", GetLastError()); - return; - } - - ret = SetConsoleMode(input_handle, console_mode & ~(ENABLE_MOUSE_INPUT | ENABLE_WINDOW_INPUT)); - ok(ret == TRUE, "Expected SetConsoleMode to return TRUE, got %d\n", ret); - if (!ret) - { - skip("SetConsoleMode failed with last error %u\n", GetLastError()); - return; - } - - /* Discard any events queued before the tests. */ - ret = FlushConsoleInputBuffer(input_handle); - ok(ret == TRUE, "Expected FlushConsoleInputBuffer to return TRUE, got %d\n", ret); - - event.EventType = MOUSE_EVENT; - event.Event.MouseEvent = mouse_event; - - for (i = 0; i < sizeof(invalid_table)/sizeof(invalid_table[0]); i++) - { - if (invalid_table[i].win7_crash) - continue; - - SetLastError(0xdeadbeef); - if (invalid_table[i].written) count = 0xdeadbeef; - ret = WriteConsoleInputA(invalid_table[i].handle, - invalid_table[i].buffer, - invalid_table[i].count, - invalid_table[i].written); - ok(!ret, "[%d] Expected WriteConsoleInputA to return FALSE, got %d\n", i, ret); - if (invalid_table[i].written) - { - ok(count == invalid_table[i].expected_count, - "[%d] Expected output count to be %u, got %u\n", - i, invalid_table[i].expected_count, count); - } - ok(GetLastError() == invalid_table[i].last_error, - "[%d] Expected last error to be %u, got %u\n", - i, invalid_table[i].last_error, GetLastError()); - } - - count = 0xdeadbeef; - ret = WriteConsoleInputA(input_handle, NULL, 0, &count); - ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); - - count = 0xdeadbeef; - ret = WriteConsoleInputA(input_handle, &event, 0, &count); - ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); - - count = 0xdeadbeef; - ret = WriteConsoleInputA(input_handle, &event, 1, &count); - ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); - - ret = FlushConsoleInputBuffer(input_handle); - ok(ret == TRUE, "Expected FlushConsoleInputBuffer to return TRUE, got %d\n", ret); - - /* Writing a single mouse event doesn't seem to affect the count if an adjacent mouse event is already queued. */ - event.EventType = MOUSE_EVENT; - event.Event.MouseEvent = mouse_event; - - ret = WriteConsoleInputA(input_handle, &event, 1, &count); - ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); - - ret = GetNumberOfConsoleInputEvents(input_handle, &count); - ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); - - ret = WriteConsoleInputA(input_handle, &event, 1, &count); - ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); - - ret = GetNumberOfConsoleInputEvents(input_handle, &count); - ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - todo_wine - ok(count == 1, "Expected count to be 1, got %u\n", count); - - ret = FlushConsoleInputBuffer(input_handle); - ok(ret == TRUE, "Expected FlushConsoleInputBuffer to return TRUE, got %d\n", ret); - - for (i = 0; i < sizeof(event_list)/sizeof(event_list[0]); i++) - { - event_list[i].EventType = MOUSE_EVENT; - event_list[i].Event.MouseEvent = mouse_event; - } - - /* Writing consecutive chunks of mouse events appears to work. */ - ret = WriteConsoleInputA(input_handle, event_list, sizeof(event_list)/sizeof(event_list[0]), &count); - ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); - ok(count == sizeof(event_list)/sizeof(event_list[0]), - "Expected count to be event list length, got %u\n", count); - - ret = GetNumberOfConsoleInputEvents(input_handle, &count); - ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == sizeof(event_list)/sizeof(event_list[0]), - "Expected count to be event list length, got %u\n", count); - - ret = WriteConsoleInputA(input_handle, event_list, sizeof(event_list)/sizeof(event_list[0]), &count); - ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); - ok(count == sizeof(event_list)/sizeof(event_list[0]), - "Expected count to be event list length, got %u\n", count); - - ret = GetNumberOfConsoleInputEvents(input_handle, &count); - ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 2*sizeof(event_list)/sizeof(event_list[0]), - "Expected count to be twice event list length, got %u\n", count); - - /* Again, writing a single mouse event with adjacent mouse events queued doesn't appear to affect the count. */ - ret = WriteConsoleInputA(input_handle, &event, 1, &count); - ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); - - ret = GetNumberOfConsoleInputEvents(input_handle, &count); - ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - todo_wine - ok(count == 2*sizeof(event_list)/sizeof(event_list[0]), - "Expected count to be twice event list length, got %u\n", count); - - ret = FlushConsoleInputBuffer(input_handle); - ok(ret == TRUE, "Expected FlushConsoleInputBuffer to return TRUE, got %d\n", ret); - - key_event.bKeyDown = FALSE; - key_event.wRepeatCount = 0; - key_event.wVirtualKeyCode = VK_SPACE; - key_event.wVirtualScanCode = VK_SPACE; - key_event.uChar.AsciiChar = ' '; - key_event.dwControlKeyState = 0; - - event.EventType = KEY_EVENT; - event.Event.KeyEvent = key_event; - - /* Key events don't exhibit the same behavior as mouse events. */ - ret = WriteConsoleInputA(input_handle, &event, 1, &count); - ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); - - ret = GetNumberOfConsoleInputEvents(input_handle, &count); - ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); - - ret = WriteConsoleInputA(input_handle, &event, 1, &count); - ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); - - ret = GetNumberOfConsoleInputEvents(input_handle, &count); - ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 2, "Expected count to be 2, got %u\n", count); - - ret = FlushConsoleInputBuffer(input_handle); - ok(ret == TRUE, "Expected FlushConsoleInputBuffer to return TRUE, got %d\n", ret); - - /* Try interleaving mouse and key events. */ - event.EventType = MOUSE_EVENT; - event.Event.MouseEvent = mouse_event; - - ret = WriteConsoleInputA(input_handle, &event, 1, &count); - ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); - - ret = GetNumberOfConsoleInputEvents(input_handle, &count); - ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); - - event.EventType = KEY_EVENT; - event.Event.KeyEvent = key_event; - - ret = WriteConsoleInputA(input_handle, &event, 1, &count); - ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); - - ret = GetNumberOfConsoleInputEvents(input_handle, &count); - ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 2, "Expected count to be 2, got %u\n", count); - - event.EventType = MOUSE_EVENT; - event.Event.MouseEvent = mouse_event; - - ret = WriteConsoleInputA(input_handle, &event, 1, &count); - ok(ret == TRUE, "Expected WriteConsoleInputA to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); - - ret = GetNumberOfConsoleInputEvents(input_handle, &count); - ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 3, "Expected count to be 3, got %u\n", count); - - /* Restore the old console mode. */ - ret = SetConsoleMode(input_handle, console_mode); - ok(ret == TRUE, "Expected SetConsoleMode to return TRUE, got %d\n", ret); -} - -static void test_WriteConsoleInputW(HANDLE input_handle) -{ - INPUT_RECORD event; - INPUT_RECORD event_list[5]; - MOUSE_EVENT_RECORD mouse_event = { {0, 0}, 0, 0, MOUSE_MOVED }; - KEY_EVENT_RECORD key_event; - DWORD count, console_mode; - BOOL ret; - int i; - - const struct - { - HANDLE handle; - const INPUT_RECORD *buffer; - DWORD count; - LPDWORD written; - DWORD expected_count; - DWORD last_error; - int win7_crash; - } invalid_table[] = - { - {NULL, NULL, 0, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, NULL, 0, &count, 0, ERROR_INVALID_HANDLE}, - {NULL, NULL, 1, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS}, - {NULL, NULL, 1, &count, 0xdeadbeef, ERROR_INVALID_ACCESS}, - {NULL, &event, 0, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, &event, 0, &count, 0, ERROR_INVALID_HANDLE}, - {NULL, &event, 1, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, &event, 1, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, NULL, 0, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, NULL, 0, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, NULL, 1, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS}, - {INVALID_HANDLE_VALUE, NULL, 1, &count, 0xdeadbeef, ERROR_INVALID_ACCESS}, - {INVALID_HANDLE_VALUE, &event, 0, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, &event, 0, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, &event, 1, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, &event, 1, &count, 0, ERROR_INVALID_HANDLE}, - {input_handle, NULL, 0, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {input_handle, NULL, 1, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS}, - {input_handle, NULL, 1, &count, 0xdeadbeef, ERROR_INVALID_ACCESS}, - {input_handle, &event, 0, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {input_handle, &event, 1, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - }; - - /* Suppress external sources of input events for the duration of the test. */ - ret = GetConsoleMode(input_handle, &console_mode); - ok(ret == TRUE, "Expected GetConsoleMode to return TRUE, got %d\n", ret); - if (!ret) - { - skip("GetConsoleMode failed with last error %u\n", GetLastError()); - return; - } - - ret = SetConsoleMode(input_handle, console_mode & ~(ENABLE_MOUSE_INPUT | ENABLE_WINDOW_INPUT)); - ok(ret == TRUE, "Expected SetConsoleMode to return TRUE, got %d\n", ret); - if (!ret) - { - skip("SetConsoleMode failed with last error %u\n", GetLastError()); - return; - } - - /* Discard any events queued before the tests. */ - ret = FlushConsoleInputBuffer(input_handle); - ok(ret == TRUE, "Expected FlushConsoleInputBuffer to return TRUE, got %d\n", ret); - - event.EventType = MOUSE_EVENT; - event.Event.MouseEvent = mouse_event; - - for (i = 0; i < sizeof(invalid_table)/sizeof(invalid_table[0]); i++) - { - if (invalid_table[i].win7_crash) - continue; - - SetLastError(0xdeadbeef); - if (invalid_table[i].written) count = 0xdeadbeef; - ret = WriteConsoleInputW(invalid_table[i].handle, - invalid_table[i].buffer, - invalid_table[i].count, - invalid_table[i].written); - ok(!ret, "[%d] Expected WriteConsoleInputW to return FALSE, got %d\n", i, ret); - if (invalid_table[i].written) - { - ok(count == invalid_table[i].expected_count, - "[%d] Expected output count to be %u, got %u\n", - i, invalid_table[i].expected_count, count); - } - ok(GetLastError() == invalid_table[i].last_error, - "[%d] Expected last error to be %u, got %u\n", - i, invalid_table[i].last_error, GetLastError()); - } - - count = 0xdeadbeef; - ret = WriteConsoleInputW(input_handle, NULL, 0, &count); - ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); - - count = 0xdeadbeef; - ret = WriteConsoleInputW(input_handle, &event, 0, &count); - ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); - - count = 0xdeadbeef; - ret = WriteConsoleInputW(input_handle, &event, 1, &count); - ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); - - ret = FlushConsoleInputBuffer(input_handle); - ok(ret == TRUE, "Expected FlushConsoleInputBuffer to return TRUE, got %d\n", ret); - - /* Writing a single mouse event doesn't seem to affect the count if an adjacent mouse event is already queued. */ - event.EventType = MOUSE_EVENT; - event.Event.MouseEvent = mouse_event; - - ret = WriteConsoleInputW(input_handle, &event, 1, &count); - ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); - - ret = GetNumberOfConsoleInputEvents(input_handle, &count); - ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); - - ret = WriteConsoleInputW(input_handle, &event, 1, &count); - ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); - - ret = GetNumberOfConsoleInputEvents(input_handle, &count); - ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - todo_wine - ok(count == 1, "Expected count to be 1, got %u\n", count); - - ret = FlushConsoleInputBuffer(input_handle); - ok(ret == TRUE, "Expected FlushConsoleInputBuffer to return TRUE, got %d\n", ret); - - for (i = 0; i < sizeof(event_list)/sizeof(event_list[0]); i++) - { - event_list[i].EventType = MOUSE_EVENT; - event_list[i].Event.MouseEvent = mouse_event; - } - - /* Writing consecutive chunks of mouse events appears to work. */ - ret = WriteConsoleInputW(input_handle, event_list, sizeof(event_list)/sizeof(event_list[0]), &count); - ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); - ok(count == sizeof(event_list)/sizeof(event_list[0]), - "Expected count to be event list length, got %u\n", count); - - ret = GetNumberOfConsoleInputEvents(input_handle, &count); - ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == sizeof(event_list)/sizeof(event_list[0]), - "Expected count to be event list length, got %u\n", count); - - ret = WriteConsoleInputW(input_handle, event_list, sizeof(event_list)/sizeof(event_list[0]), &count); - ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); - ok(count == sizeof(event_list)/sizeof(event_list[0]), - "Expected count to be event list length, got %u\n", count); - - ret = GetNumberOfConsoleInputEvents(input_handle, &count); - ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 2*sizeof(event_list)/sizeof(event_list[0]), - "Expected count to be twice event list length, got %u\n", count); - - /* Again, writing a single mouse event with adjacent mouse events queued doesn't appear to affect the count. */ - ret = WriteConsoleInputW(input_handle, &event, 1, &count); - ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); - - ret = GetNumberOfConsoleInputEvents(input_handle, &count); - ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - todo_wine - ok(count == 2*sizeof(event_list)/sizeof(event_list[0]), - "Expected count to be twice event list length, got %u\n", count); - - ret = FlushConsoleInputBuffer(input_handle); - ok(ret == TRUE, "Expected FlushConsoleInputBuffer to return TRUE, got %d\n", ret); - - key_event.bKeyDown = FALSE; - key_event.wRepeatCount = 0; - key_event.wVirtualKeyCode = VK_SPACE; - key_event.wVirtualScanCode = VK_SPACE; - key_event.uChar.UnicodeChar = ' '; - key_event.dwControlKeyState = 0; - - event.EventType = KEY_EVENT; - event.Event.KeyEvent = key_event; - - /* Key events don't exhibit the same behavior as mouse events. */ - ret = WriteConsoleInputW(input_handle, &event, 1, &count); - ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); - - ret = GetNumberOfConsoleInputEvents(input_handle, &count); - ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); - - ret = WriteConsoleInputW(input_handle, &event, 1, &count); - ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); - - ret = GetNumberOfConsoleInputEvents(input_handle, &count); - ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 2, "Expected count to be 2, got %u\n", count); - - ret = FlushConsoleInputBuffer(input_handle); - ok(ret == TRUE, "Expected FlushConsoleInputBuffer to return TRUE, got %d\n", ret); - - /* Try interleaving mouse and key events. */ - event.EventType = MOUSE_EVENT; - event.Event.MouseEvent = mouse_event; - - ret = WriteConsoleInputW(input_handle, &event, 1, &count); - ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); - - ret = GetNumberOfConsoleInputEvents(input_handle, &count); - ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); - - event.EventType = KEY_EVENT; - event.Event.KeyEvent = key_event; - - ret = WriteConsoleInputW(input_handle, &event, 1, &count); - ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); - - ret = GetNumberOfConsoleInputEvents(input_handle, &count); - ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 2, "Expected count to be 2, got %u\n", count); - - event.EventType = MOUSE_EVENT; - event.Event.MouseEvent = mouse_event; - - ret = WriteConsoleInputW(input_handle, &event, 1, &count); - ok(ret == TRUE, "Expected WriteConsoleInputW to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); - - ret = GetNumberOfConsoleInputEvents(input_handle, &count); - ok(ret == TRUE, "Expected GetNumberOfConsoleInputEvents to return TRUE, got %d\n", ret); - ok(count == 3, "Expected count to be 3, got %u\n", count); - - /* Restore the old console mode. */ - ret = SetConsoleMode(input_handle, console_mode); - ok(ret == TRUE, "Expected SetConsoleMode to return TRUE, got %d\n", ret); -} - -static void test_WriteConsoleOutputCharacterA(HANDLE output_handle) -{ - static const char output[] = {'a', 0}; - - COORD origin = {0, 0}; - DWORD count; - BOOL ret; - int i; - - const struct - { - HANDLE hConsoleOutput; - LPCSTR str; - DWORD length; - COORD coord; - LPDWORD lpNumCharsWritten; - DWORD expected_count; - DWORD last_error; - int win7_crash; - } invalid_table[] = - { - {NULL, NULL, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, NULL, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {NULL, NULL, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, NULL, 1, {0, 0}, &count, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, output, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, output, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {NULL, output, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, output, 1, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, NULL, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, NULL, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, NULL, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, NULL, 1, {0, 0}, &count, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, output, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, output, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, output, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, output, 1, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {output_handle, NULL, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {output_handle, NULL, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {output_handle, NULL, 1, {0, 0}, &count, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {output_handle, output, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {output_handle, output, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - }; - - for (i = 0; i < sizeof(invalid_table)/sizeof(invalid_table[0]); i++) - { - if (invalid_table[i].win7_crash) - continue; - - SetLastError(0xdeadbeef); - if (invalid_table[i].lpNumCharsWritten) count = 0xdeadbeef; - ret = WriteConsoleOutputCharacterA(invalid_table[i].hConsoleOutput, - invalid_table[i].str, - invalid_table[i].length, - invalid_table[i].coord, - invalid_table[i].lpNumCharsWritten); - ok(!ret, "[%d] Expected WriteConsoleOutputCharacterA to return FALSE, got %d\n", i, ret); - if (invalid_table[i].lpNumCharsWritten) - { - ok(count == invalid_table[i].expected_count, - "[%d] Expected count to be %u, got %u\n", - i, invalid_table[i].expected_count, count); - } - ok(GetLastError() == invalid_table[i].last_error, - "[%d] Expected last error to be %u, got %u\n", - i, invalid_table[i].last_error, GetLastError()); - } - - count = 0xdeadbeef; - ret = WriteConsoleOutputCharacterA(output_handle, NULL, 0, origin, &count); - ok(ret == TRUE, "Expected WriteConsoleOutputCharacterA to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); - - count = 0xdeadbeef; - ret = WriteConsoleOutputCharacterA(output_handle, output, 0, origin, &count); - ok(ret == TRUE, "Expected WriteConsoleOutputCharacterA to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); - - count = 0xdeadbeef; - ret = WriteConsoleOutputCharacterA(output_handle, output, 1, origin, &count); - ok(ret == TRUE, "Expected WriteConsoleOutputCharacterA to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); -} - -static void test_WriteConsoleOutputCharacterW(HANDLE output_handle) -{ - static const WCHAR outputW[] = {'a',0}; - - COORD origin = {0, 0}; - DWORD count; - BOOL ret; - int i; - - const struct - { - HANDLE hConsoleOutput; - LPCWSTR str; - DWORD length; - COORD coord; - LPDWORD lpNumCharsWritten; - DWORD expected_count; - DWORD last_error; - int win7_crash; - } invalid_table[] = - { - {NULL, NULL, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, NULL, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {NULL, NULL, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, NULL, 1, {0, 0}, &count, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, outputW, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, outputW, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {NULL, outputW, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, outputW, 1, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, NULL, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, NULL, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, NULL, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, NULL, 1, {0, 0}, &count, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, outputW, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, outputW, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, outputW, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, outputW, 1, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {output_handle, NULL, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {output_handle, NULL, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {output_handle, NULL, 1, {0, 0}, &count, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {output_handle, outputW, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {output_handle, outputW, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - }; - - for (i = 0; i < sizeof(invalid_table)/sizeof(invalid_table[0]); i++) - { - if (invalid_table[i].win7_crash) - continue; - - SetLastError(0xdeadbeef); - if (invalid_table[i].lpNumCharsWritten) count = 0xdeadbeef; - ret = WriteConsoleOutputCharacterW(invalid_table[i].hConsoleOutput, - invalid_table[i].str, - invalid_table[i].length, - invalid_table[i].coord, - invalid_table[i].lpNumCharsWritten); - ok(!ret, "[%d] Expected WriteConsoleOutputCharacterW to return FALSE, got %d\n", i, ret); - if (invalid_table[i].lpNumCharsWritten) - { - ok(count == invalid_table[i].expected_count, - "[%d] Expected count to be %u, got %u\n", - i, invalid_table[i].expected_count, count); - } - ok(GetLastError() == invalid_table[i].last_error, - "[%d] Expected last error to be %u, got %u\n", - i, invalid_table[i].last_error, GetLastError()); - } - - count = 0xdeadbeef; - ret = WriteConsoleOutputCharacterW(output_handle, NULL, 0, origin, &count); - ok(ret == TRUE, "Expected WriteConsoleOutputCharacterW to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); - - count = 0xdeadbeef; - ret = WriteConsoleOutputCharacterW(output_handle, outputW, 0, origin, &count); - ok(ret == TRUE, "Expected WriteConsoleOutputCharacterW to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); - - count = 0xdeadbeef; - ret = WriteConsoleOutputCharacterW(output_handle, outputW, 1, origin, &count); - ok(ret == TRUE, "Expected WriteConsoleOutputCharacterW to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); -} - -static void test_WriteConsoleOutputAttribute(HANDLE output_handle) -{ - WORD attr = FOREGROUND_BLUE; - COORD origin = {0, 0}; - DWORD count; - BOOL ret; - int i; - - const struct - { - HANDLE hConsoleOutput; - CONST WORD *attr; - DWORD length; - COORD coord; - LPDWORD lpNumAttrsWritten; - DWORD expected_count; - DWORD last_error; - int win7_crash; - } invalid_table[] = - { - {NULL, NULL, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, NULL, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {NULL, NULL, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, NULL, 1, {0, 0}, &count, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, &attr, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, &attr, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {NULL, &attr, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, &attr, 1, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, NULL, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, NULL, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, NULL, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, NULL, 1, {0, 0}, &count, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, &attr, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, &attr, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, &attr, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, &attr, 1, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {output_handle, NULL, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {output_handle, NULL, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {output_handle, NULL, 1, {0, 0}, &count, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {output_handle, &attr, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {output_handle, &attr, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - }; - - for (i = 0; i < sizeof(invalid_table)/sizeof(invalid_table[0]); i++) - { - if (invalid_table[i].win7_crash) - continue; - - SetLastError(0xdeadbeef); - if (invalid_table[i].lpNumAttrsWritten) count = 0xdeadbeef; - ret = WriteConsoleOutputAttribute(invalid_table[i].hConsoleOutput, - invalid_table[i].attr, - invalid_table[i].length, - invalid_table[i].coord, - invalid_table[i].lpNumAttrsWritten); - ok(!ret, "[%d] Expected WriteConsoleOutputAttribute to return FALSE, got %d\n", i, ret); - if (invalid_table[i].lpNumAttrsWritten) - { - ok(count == invalid_table[i].expected_count, - "[%d] Expected count to be %u, got %u\n", - i, invalid_table[i].expected_count, count); - } - ok(GetLastError() == invalid_table[i].last_error, - "[%d] Expected last error to be %u, got %u\n", - i, invalid_table[i].last_error, GetLastError()); - } - - count = 0xdeadbeef; - ret = WriteConsoleOutputAttribute(output_handle, NULL, 0, origin, &count); - ok(ret == TRUE, "Expected WriteConsoleOutputAttribute to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); - - count = 0xdeadbeef; - ret = WriteConsoleOutputAttribute(output_handle, &attr, 0, origin, &count); - ok(ret == TRUE, "Expected WriteConsoleOutputAttribute to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); - - count = 0xdeadbeef; - ret = WriteConsoleOutputAttribute(output_handle, &attr, 1, origin, &count); - ok(ret == TRUE, "Expected WriteConsoleOutputAttribute to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); -} - -static void test_FillConsoleOutputCharacterA(HANDLE output_handle) -{ - COORD origin = {0, 0}; - DWORD count; - BOOL ret; - int i; - - const struct - { - HANDLE hConsoleOutput; - CHAR ch; - DWORD length; - COORD coord; - LPDWORD lpNumCharsWritten; - DWORD expected_count; - DWORD last_error; - int win7_crash; - } invalid_table[] = - { - {NULL, 'a', 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, 'a', 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {NULL, 'a', 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, 'a', 1, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, 'a', 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, 'a', 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, 'a', 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, 'a', 1, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {output_handle, 'a', 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {output_handle, 'a', 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - }; - - for (i = 0; i < sizeof(invalid_table)/sizeof(invalid_table[0]); i++) - { - if (invalid_table[i].win7_crash) - continue; - - SetLastError(0xdeadbeef); - if (invalid_table[i].lpNumCharsWritten) count = 0xdeadbeef; - ret = FillConsoleOutputCharacterA(invalid_table[i].hConsoleOutput, - invalid_table[i].ch, - invalid_table[i].length, - invalid_table[i].coord, - invalid_table[i].lpNumCharsWritten); - ok(!ret, "[%d] Expected FillConsoleOutputCharacterA to return FALSE, got %d\n", i, ret); - if (invalid_table[i].lpNumCharsWritten) - { - ok(count == invalid_table[i].expected_count, - "[%d] Expected count to be %u, got %u\n", - i, invalid_table[i].expected_count, count); - } - ok(GetLastError() == invalid_table[i].last_error, - "[%d] Expected last error to be %u, got %u\n", - i, invalid_table[i].last_error, GetLastError()); - } - - count = 0xdeadbeef; - ret = FillConsoleOutputCharacterA(output_handle, 'a', 0, origin, &count); - ok(ret == TRUE, "Expected FillConsoleOutputCharacterA to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); - - count = 0xdeadbeef; - ret = FillConsoleOutputCharacterA(output_handle, 'a', 1, origin, &count); - ok(ret == TRUE, "Expected FillConsoleOutputCharacterA to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); -} - -static void test_FillConsoleOutputCharacterW(HANDLE output_handle) -{ - COORD origin = {0, 0}; - DWORD count; - BOOL ret; - int i; - - const struct - { - HANDLE hConsoleOutput; - WCHAR ch; - DWORD length; - COORD coord; - LPDWORD lpNumCharsWritten; - DWORD expected_count; - DWORD last_error; - int win7_crash; - } invalid_table[] = - { - {NULL, 'a', 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, 'a', 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {NULL, 'a', 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, 'a', 1, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, 'a', 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, 'a', 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, 'a', 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, 'a', 1, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {output_handle, 'a', 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {output_handle, 'a', 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - }; - - for (i = 0; i < sizeof(invalid_table)/sizeof(invalid_table[0]); i++) - { - if (invalid_table[i].win7_crash) - continue; - - SetLastError(0xdeadbeef); - if (invalid_table[i].lpNumCharsWritten) count = 0xdeadbeef; - ret = FillConsoleOutputCharacterW(invalid_table[i].hConsoleOutput, - invalid_table[i].ch, - invalid_table[i].length, - invalid_table[i].coord, - invalid_table[i].lpNumCharsWritten); - ok(!ret, "[%d] Expected FillConsoleOutputCharacterW to return FALSE, got %d\n", i, ret); - if (invalid_table[i].lpNumCharsWritten) - { - ok(count == invalid_table[i].expected_count, - "[%d] Expected count to be %u, got %u\n", - i, invalid_table[i].expected_count, count); - } - ok(GetLastError() == invalid_table[i].last_error, - "[%d] Expected last error to be %u, got %u\n", - i, invalid_table[i].last_error, GetLastError()); - } - - count = 0xdeadbeef; - ret = FillConsoleOutputCharacterW(output_handle, 'a', 0, origin, &count); - ok(ret == TRUE, "Expected FillConsoleOutputCharacterW to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); - - count = 0xdeadbeef; - ret = FillConsoleOutputCharacterW(output_handle, 'a', 1, origin, &count); - ok(ret == TRUE, "Expected FillConsoleOutputCharacterW to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); -} - -static void test_FillConsoleOutputAttribute(HANDLE output_handle) -{ - COORD origin = {0, 0}; - DWORD count; - BOOL ret; - int i; - - const struct - { - HANDLE hConsoleOutput; - WORD attr; - DWORD length; - COORD coord; - LPDWORD lpNumAttrsWritten; - DWORD expected_count; - DWORD last_error; - int win7_crash; - } invalid_table[] = - { - {NULL, FOREGROUND_BLUE, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, FOREGROUND_BLUE, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {NULL, FOREGROUND_BLUE, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, FOREGROUND_BLUE, 1, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, FOREGROUND_BLUE, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, FOREGROUND_BLUE, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, FOREGROUND_BLUE, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, FOREGROUND_BLUE, 1, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {output_handle, FOREGROUND_BLUE, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {output_handle, FOREGROUND_BLUE, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - }; - - for (i = 0; i < sizeof(invalid_table)/sizeof(invalid_table[0]); i++) - { - if (invalid_table[i].win7_crash) - continue; - - SetLastError(0xdeadbeef); - if (invalid_table[i].lpNumAttrsWritten) count = 0xdeadbeef; - ret = FillConsoleOutputAttribute(invalid_table[i].hConsoleOutput, - invalid_table[i].attr, - invalid_table[i].length, - invalid_table[i].coord, - invalid_table[i].lpNumAttrsWritten); - ok(!ret, "[%d] Expected FillConsoleOutputAttribute to return FALSE, got %d\n", i, ret); - if (invalid_table[i].lpNumAttrsWritten) - { - ok(count == invalid_table[i].expected_count, - "[%d] Expected count to be %u, got %u\n", - i, invalid_table[i].expected_count, count); - } - ok(GetLastError() == invalid_table[i].last_error, - "[%d] Expected last error to be %u, got %u\n", - i, invalid_table[i].last_error, GetLastError()); - } - - count = 0xdeadbeef; - ret = FillConsoleOutputAttribute(output_handle, FOREGROUND_BLUE, 0, origin, &count); - ok(ret == TRUE, "Expected FillConsoleOutputAttribute to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); - - count = 0xdeadbeef; - ret = FillConsoleOutputAttribute(output_handle, FOREGROUND_BLUE, 1, origin, &count); - ok(ret == TRUE, "Expected FillConsoleOutputAttribute to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); - - count = 0xdeadbeef; - ret = FillConsoleOutputAttribute(output_handle, ~0, 1, origin, &count); - ok(ret == TRUE, "Expected FillConsoleOutputAttribute to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); -} - -static void test_ReadConsoleOutputCharacterA(HANDLE output_handle) -{ - CHAR read; - COORD origin = {0, 0}; - DWORD count; - BOOL ret; - int i; - - const struct - { - HANDLE hConsoleOutput; - LPSTR lpstr; - DWORD length; - COORD coord; - LPDWORD read_count; - DWORD expected_count; - DWORD last_error; - int win7_crash; - } invalid_table[] = - { - {NULL, NULL, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, NULL, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {NULL, NULL, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, NULL, 1, {0, 0}, &count, 0, ERROR_INVALID_HANDLE, 1}, - {NULL, &read, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, &read, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {NULL, &read, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, &read, 1, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, NULL, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, NULL, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, NULL, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, NULL, 1, {0, 0}, &count, 0, ERROR_INVALID_HANDLE, 1}, - {INVALID_HANDLE_VALUE, &read, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, &read, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, &read, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, &read, 1, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {output_handle, NULL, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {output_handle, NULL, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {output_handle, NULL, 1, {0, 0}, &count, 1, ERROR_INVALID_ACCESS, 1}, - {output_handle, NULL, 10, {0, 0}, &count, 10, ERROR_INVALID_ACCESS, 1}, - {output_handle, &read, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {output_handle, &read, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - }; - - for (i = 0; i < sizeof(invalid_table)/sizeof(invalid_table[0]); i++) - { - if (invalid_table[i].win7_crash) - continue; - - SetLastError(0xdeadbeef); - if (invalid_table[i].read_count) count = 0xdeadbeef; - ret = ReadConsoleOutputCharacterA(invalid_table[i].hConsoleOutput, - invalid_table[i].lpstr, - invalid_table[i].length, - invalid_table[i].coord, - invalid_table[i].read_count); - ok(!ret, "[%d] Expected ReadConsoleOutputCharacterA to return FALSE, got %d\n", i, ret); - if (invalid_table[i].read_count) - { - ok(count == invalid_table[i].expected_count, - "[%d] Expected count to be %u, got %u\n", - i, invalid_table[i].expected_count, count); - } - ok(GetLastError() == invalid_table[i].last_error, - "[%d] Expected last error to be %u, got %u\n", - i, invalid_table[i].last_error, GetLastError()); - } - - count = 0xdeadbeef; - ret = ReadConsoleOutputCharacterA(output_handle, NULL, 0, origin, &count); - ok(ret == TRUE, "Expected ReadConsoleOutputCharacterA to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); - - count = 0xdeadbeef; - ret = ReadConsoleOutputCharacterA(output_handle, &read, 0, origin, &count); - ok(ret == TRUE, "Expected ReadConsoleOutputCharacterA to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); - - count = 0xdeadbeef; - ret = ReadConsoleOutputCharacterA(output_handle, &read, 1, origin, &count); - ok(ret == TRUE, "Expected ReadConsoleOutputCharacterA to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); -} - -static void test_ReadConsoleOutputCharacterW(HANDLE output_handle) -{ - WCHAR read; - COORD origin = {0, 0}; - DWORD count; - BOOL ret; - int i; - - const struct - { - HANDLE hConsoleOutput; - LPWSTR buffer; - DWORD length; - COORD coord; - LPDWORD read_count; - DWORD expected_count; - DWORD last_error; - int win7_crash; - } invalid_table[] = - { - {NULL, NULL, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, NULL, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {NULL, NULL, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, NULL, 1, {0, 0}, &count, 0, ERROR_INVALID_HANDLE, 1}, - {NULL, &read, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, &read, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {NULL, &read, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, &read, 1, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, NULL, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, NULL, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, NULL, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, NULL, 1, {0, 0}, &count, 0, ERROR_INVALID_HANDLE, 1}, - {INVALID_HANDLE_VALUE, &read, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, &read, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, &read, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, &read, 1, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {output_handle, NULL, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {output_handle, NULL, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {output_handle, NULL, 1, {0, 0}, &count, 1, ERROR_INVALID_ACCESS, 1}, - {output_handle, NULL, 10, {0, 0}, &count, 10, ERROR_INVALID_ACCESS, 1}, - {output_handle, &read, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {output_handle, &read, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - }; - - for (i = 0; i < sizeof(invalid_table)/sizeof(invalid_table[0]); i++) - { - if (invalid_table[i].win7_crash) - continue; - - SetLastError(0xdeadbeef); - if (invalid_table[i].read_count) count = 0xdeadbeef; - ret = ReadConsoleOutputCharacterW(invalid_table[i].hConsoleOutput, - invalid_table[i].buffer, - invalid_table[i].length, - invalid_table[i].coord, - invalid_table[i].read_count); - ok(!ret, "[%d] Expected ReadConsoleOutputCharacterW to return FALSE, got %d\n", i, ret); - if (invalid_table[i].read_count) - { - ok(count == invalid_table[i].expected_count, - "[%d] Expected count to be %u, got %u\n", - i, invalid_table[i].expected_count, count); - } - ok(GetLastError() == invalid_table[i].last_error, - "[%d] Expected last error to be %u, got %u\n", - i, invalid_table[i].last_error, GetLastError()); - } - - count = 0xdeadbeef; - ret = ReadConsoleOutputCharacterW(output_handle, NULL, 0, origin, &count); - ok(ret == TRUE, "Expected ReadConsoleOutputCharacterW to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); - - count = 0xdeadbeef; - ret = ReadConsoleOutputCharacterW(output_handle, &read, 0, origin, &count); - ok(ret == TRUE, "Expected ReadConsoleOutputCharacterW to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); - - count = 0xdeadbeef; - ret = ReadConsoleOutputCharacterW(output_handle, &read, 1, origin, &count); - ok(ret == TRUE, "Expected ReadConsoleOutputCharacterW to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); -} - -static void test_ReadConsoleOutputAttribute(HANDLE output_handle) -{ - WORD attr; - COORD origin = {0, 0}; - DWORD count; - BOOL ret; - int i; - - const struct - { - HANDLE hConsoleOutput; - LPWORD lpAttribute; - DWORD length; - COORD coord; - LPDWORD read_count; - DWORD expected_count; - DWORD last_error; - int win7_crash; - } invalid_table[] = - { - {NULL, NULL, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, NULL, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {NULL, NULL, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, NULL, 1, {0, 0}, &count, 0, ERROR_INVALID_HANDLE, 1}, - {NULL, &attr, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, &attr, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {NULL, &attr, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {NULL, &attr, 1, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, NULL, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, NULL, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, NULL, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, NULL, 1, {0, 0}, &count, 0, ERROR_INVALID_HANDLE, 1}, - {INVALID_HANDLE_VALUE, &attr, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, &attr, 0, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {INVALID_HANDLE_VALUE, &attr, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {INVALID_HANDLE_VALUE, &attr, 1, {0, 0}, &count, 0, ERROR_INVALID_HANDLE}, - {output_handle, NULL, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {output_handle, NULL, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {output_handle, NULL, 1, {0, 0}, &count, 1, ERROR_INVALID_ACCESS, 1}, - {output_handle, &attr, 0, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - {output_handle, &attr, 1, {0, 0}, NULL, 0xdeadbeef, ERROR_INVALID_ACCESS, 1}, - }; - - for (i = 0; i < sizeof(invalid_table)/sizeof(invalid_table[0]); i++) - { - if (invalid_table[i].win7_crash) - continue; - - SetLastError(0xdeadbeef); - if (invalid_table[i].read_count) count = 0xdeadbeef; - ret = ReadConsoleOutputAttribute(invalid_table[i].hConsoleOutput, - invalid_table[i].lpAttribute, - invalid_table[i].length, - invalid_table[i].coord, - invalid_table[i].read_count); - ok(!ret, "[%d] Expected ReadConsoleOutputAttribute to return FALSE, got %d\n", i, ret); - if (invalid_table[i].read_count) - { - ok(count == invalid_table[i].expected_count, - "[%d] Expected count to be %u, got %u\n", - i, invalid_table[i].expected_count, count); - } - ok(GetLastError() == invalid_table[i].last_error, - "[%d] Expected last error to be %u, got %u\n", - i, invalid_table[i].last_error, GetLastError()); - } - - count = 0xdeadbeef; - ret = ReadConsoleOutputAttribute(output_handle, NULL, 0, origin, &count); - ok(ret == TRUE, "Expected ReadConsoleOutputAttribute to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); - - count = 0xdeadbeef; - ret = ReadConsoleOutputAttribute(output_handle, &attr, 0, origin, &count); - ok(ret == TRUE, "Expected ReadConsoleOutputAttribute to return TRUE, got %d\n", ret); - ok(count == 0, "Expected count to be 0, got %u\n", count); - - count = 0xdeadbeef; - ret = ReadConsoleOutputAttribute(output_handle, &attr, 1, origin, &count); - ok(ret == TRUE, "Expected ReadConsoleOutputAttribute to return TRUE, got %d\n", ret); - ok(count == 1, "Expected count to be 1, got %u\n", count); -} - -START_TEST(console) -{ - static const char font_name[] = "Lucida Console"; - HANDLE hConIn, hConOut; - BOOL ret; - CONSOLE_SCREEN_BUFFER_INFO sbi; - LONG err; - HKEY console_key; - char old_font[LF_FACESIZE]; - BOOL delete = FALSE; - DWORD size; - - init_function_pointers(); - - /* be sure we have a clean console (and that's our own) - * FIXME: this will make the test fail (currently) if we don't run - * under X11 - * Another solution would be to rerun the test under wineconsole with - * the curses backend - */ - - /* ReadConsoleOutputW doesn't retrieve characters from the output buffer - * correctly for characters that don't have a glyph in the console font. So, - * we first set the console font to Lucida Console (which has a wider - * selection of glyphs available than the default raster fonts). We want - * to be able to restore the original font afterwards, so don't change - * if we can't read the original font. - */ - err = RegOpenKeyExA(HKEY_CURRENT_USER, "Console", 0, - KEY_QUERY_VALUE | KEY_SET_VALUE, &console_key); - if (err == ERROR_SUCCESS) - { - size = sizeof(old_font); - err = RegQueryValueExA(console_key, "FaceName", NULL, NULL, - (LPBYTE) old_font, &size); - if (err == ERROR_SUCCESS || err == ERROR_FILE_NOT_FOUND) - { - delete = (err == ERROR_FILE_NOT_FOUND); - err = RegSetValueExA(console_key, "FaceName", 0, REG_SZ, - (const BYTE *) font_name, sizeof(font_name)); - if (err != ERROR_SUCCESS) - trace("Unable to change default console font, error %d\n", err); - } - else - { - trace("Unable to query default console font, error %d\n", err); - RegCloseKey(console_key); - console_key = NULL; - } - } - else - { - trace("Unable to open HKCU\\Console, error %d\n", err); - console_key = NULL; - } - - /* Now detach and open a fresh console to play with */ - FreeConsole(); - ok(AllocConsole(), "Couldn't alloc console\n"); - - /* Restore default console font if needed */ - if (console_key != NULL) - { - if (delete) - err = RegDeleteValueA(console_key, "FaceName"); - else - err = RegSetValueExA(console_key, "FaceName", 0, REG_SZ, - (const BYTE *) old_font, strlen(old_font) + 1); - ok(err == ERROR_SUCCESS, "Unable to restore default console font, error %d\n", err); - } - hConIn = CreateFileA("CONIN$", GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); - hConOut = CreateFileA("CONOUT$", GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); - - /* now verify everything's ok */ - ok(hConIn != INVALID_HANDLE_VALUE, "Opening ConIn\n"); - ok(hConOut != INVALID_HANDLE_VALUE, "Opening ConOut\n"); - - ret = GetConsoleScreenBufferInfo(hConOut, &sbi); - ok(ret, "Getting sb info\n"); - if (!ret) return; - - /* Non interactive tests */ - testCursor(hConOut, sbi.dwSize); - /* test parameters (FIXME: test functionality) */ - testCursorInfo(hConOut); - /* will test wrapped (on/off) & processed (on/off) strings output */ - testWrite(hConOut, sbi.dwSize); - /* will test line scrolling at the bottom of the screen */ - /* testBottomScroll(); */ - /* will test all the scrolling operations */ - testScroll(hConOut, sbi.dwSize); - /* will test sb creation / modification / codepage handling */ - testScreenBuffer(hConOut); - testCtrlHandler(); - /* still to be done: access rights & access on objects */ - - if (!pGetConsoleInputExeNameA || !pSetConsoleInputExeNameA) - win_skip("GetConsoleInputExeNameA and/or SetConsoleInputExeNameA is not available\n"); - else - test_GetSetConsoleInputExeName(); - - test_GetConsoleProcessList(); - test_OpenConsoleW(); - test_OpenCON(); - test_VerifyConsoleIoHandle(hConOut); - test_GetSetStdHandle(); - test_GetNumberOfConsoleInputEvents(hConIn); - test_WriteConsoleInputA(hConIn); - test_WriteConsoleInputW(hConIn); - test_WriteConsoleOutputCharacterA(hConOut); - test_WriteConsoleOutputCharacterW(hConOut); - test_WriteConsoleOutputAttribute(hConOut); - test_FillConsoleOutputCharacterA(hConOut); - test_FillConsoleOutputCharacterW(hConOut); - test_FillConsoleOutputAttribute(hConOut); - test_ReadConsoleOutputCharacterA(hConOut); - test_ReadConsoleOutputCharacterW(hConOut); - test_ReadConsoleOutputAttribute(hConOut); -} diff --git a/rostests/winetests/kernel32/debugger.c b/rostests/winetests/kernel32/debugger.c deleted file mode 100644 index 2094190456b..00000000000 --- a/rostests/winetests/kernel32/debugger.c +++ /dev/null @@ -1,693 +0,0 @@ -/* - * Unit tests for the debugger facility - * - * Copyright (c) 2007 Francois Gouget 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 -#include - -#include -#include -#include -#include "wine/test.h" - -#ifndef STATUS_DEBUGGER_INACTIVE -#define STATUS_DEBUGGER_INACTIVE ((NTSTATUS) 0xC0000354) -#endif - -#ifdef __GNUC__ -#define PRINTF_ATTR(fmt,args) __attribute__((format (printf,fmt,args))) -#else -#define PRINTF_ATTR(fmt,args) -#endif - -#define child_ok (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : test_child_ok - -static int myARGC; -static char** myARGV; - -static BOOL (WINAPI *pCheckRemoteDebuggerPresent)(HANDLE,PBOOL); -static BOOL (WINAPI *pDebugActiveProcessStop)(DWORD); -static BOOL (WINAPI *pDebugSetProcessKillOnExit)(BOOL); -static BOOL (WINAPI *pIsDebuggerPresent)(void); -static struct _TEB * (WINAPI *pNtCurrentTeb)(void); - -static LONG child_failures; - -static void PRINTF_ATTR(2, 3) test_child_ok(int condition, const char *msg, ...) -{ - va_list valist; - - va_start(valist, msg); - winetest_vok(condition, msg, valist); - va_end(valist); - if (!condition) ++child_failures; -} - -/* Copied from the process test */ -static void get_file_name(char* buf) -{ - char path[MAX_PATH]; - - buf[0] = '\0'; - GetTempPathA(sizeof(path), path); - GetTempFileNameA(path, "wt", 0, buf); -} - -typedef struct tag_reg_save_value -{ - const char *name; - DWORD type; - BYTE *data; - DWORD size; -} reg_save_value; - -static DWORD save_value(HKEY hkey, const char *value, reg_save_value *saved) -{ - DWORD ret; - saved->name=value; - saved->data=0; - saved->size=0; - ret=RegQueryValueExA(hkey, value, NULL, &saved->type, NULL, &saved->size); - if (ret == ERROR_SUCCESS) - { - saved->data=HeapAlloc(GetProcessHeap(), 0, saved->size); - RegQueryValueExA(hkey, value, NULL, &saved->type, saved->data, &saved->size); - } - return ret; -} - -static void restore_value(HKEY hkey, reg_save_value *saved) -{ - if (saved->data) - { - RegSetValueExA(hkey, saved->name, 0, saved->type, saved->data, saved->size); - HeapFree(GetProcessHeap(), 0, saved->data); - } - else - RegDeleteValueA(hkey, saved->name); -} - -static void get_events(const char* name, HANDLE *start_event, HANDLE *done_event) -{ - const char* basename; - char* event_name; - - basename=strrchr(name, '\\'); - basename=(basename ? basename+1 : name); - event_name=HeapAlloc(GetProcessHeap(), 0, 6+strlen(basename)+1); - - sprintf(event_name, "start_%s", basename); - *start_event=CreateEvent(NULL, 0,0, event_name); - sprintf(event_name, "done_%s", basename); - *done_event=CreateEvent(NULL, 0,0, event_name); - HeapFree(GetProcessHeap(), 0, event_name); -} - -static void save_blackbox(const char* logfile, void* blackbox, int size) -{ - HANDLE hFile; - DWORD written; - - hFile=CreateFileA(logfile, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - if (hFile == INVALID_HANDLE_VALUE) - return; - WriteFile(hFile, blackbox, size, &written, NULL); - CloseHandle(hFile); -} - -static int load_blackbox(const char* logfile, void* blackbox, int size) -{ - HANDLE hFile; - DWORD read; - BOOL ret; - - hFile=CreateFileA(logfile, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0); - if (hFile == INVALID_HANDLE_VALUE) - { - ok(0, "unable to open '%s'\n", logfile); - return 0; - } - SetLastError(0xdeadbeef); - ret=ReadFile(hFile, blackbox, size, &read, NULL); - ok(ret, "ReadFile failed: %d\n", GetLastError()); - ok(read == size, "wrong size for '%s': read=%d\n", logfile, read); - CloseHandle(hFile); - return 1; -} - -typedef struct -{ - DWORD pid; -} crash_blackbox_t; - -static void doCrash(int argc, char** argv) -{ - char* p; - - /* make sure the exception gets to the debugger */ - SetErrorMode( 0 ); - SetUnhandledExceptionFilter( NULL ); - - if (argc >= 4) - { - crash_blackbox_t blackbox; - blackbox.pid=GetCurrentProcessId(); - save_blackbox(argv[3], &blackbox, sizeof(blackbox)); - } - - /* Just crash */ - trace("child: crashing...\n"); - p=NULL; - *p=0; -} - -typedef struct -{ - int argc; - DWORD pid; - BOOL debug_rc; - DWORD debug_err; - BOOL attach_rc; - DWORD attach_err; - BOOL nokill_rc; - DWORD nokill_err; - BOOL detach_rc; - DWORD detach_err; -} debugger_blackbox_t; - -static void doDebugger(int argc, char** argv) -{ - const char* logfile; - debugger_blackbox_t blackbox; - HANDLE start_event = 0, done_event = 0, debug_event; - - blackbox.argc=argc; - logfile=(argc >= 4 ? argv[3] : NULL); - blackbox.pid=(argc >= 5 ? atol(argv[4]) : 0); - - blackbox.attach_err=0; - if (strstr(myARGV[2], "attach")) - { - blackbox.attach_rc=DebugActiveProcess(blackbox.pid); - if (!blackbox.attach_rc) - blackbox.attach_err=GetLastError(); - } - else - blackbox.attach_rc=TRUE; - - debug_event=(argc >= 6 ? (HANDLE)(INT_PTR)atol(argv[5]) : NULL); - blackbox.debug_err=0; - if (debug_event && strstr(myARGV[2], "event")) - { - blackbox.debug_rc=SetEvent(debug_event); - if (!blackbox.debug_rc) - blackbox.debug_err=GetLastError(); - } - else - blackbox.debug_rc=TRUE; - - if (logfile) - { - get_events(logfile, &start_event, &done_event); - } - - if (strstr(myARGV[2], "order")) - { - trace("debugger: waiting for the start signal...\n"); - WaitForSingleObject(start_event, INFINITE); - } - - blackbox.nokill_err=0; - if (strstr(myARGV[2], "nokill")) - { - blackbox.nokill_rc=pDebugSetProcessKillOnExit(FALSE); - if (!blackbox.nokill_rc) - blackbox.nokill_err=GetLastError(); - } - else - blackbox.nokill_rc=TRUE; - - blackbox.detach_err=0; - if (strstr(myARGV[2], "detach")) - { - blackbox.detach_rc=pDebugActiveProcessStop(blackbox.pid); - if (!blackbox.detach_rc) - blackbox.detach_err=GetLastError(); - } - else - blackbox.detach_rc=TRUE; - - if (logfile) - { - save_blackbox(logfile, &blackbox, sizeof(blackbox)); - } - trace("debugger: done debugging...\n"); - SetEvent(done_event); - - /* Just exit with a known value */ - ExitProcess(0xdeadbeef); -} - -static void crash_and_debug(HKEY hkey, const char* argv0, const char* dbgtasks) -{ - static BOOL skip_crash_and_debug = FALSE; - BOOL bRet; - DWORD ret; - HANDLE start_event, done_event; - char* cmd; - char dbglog[MAX_PATH]; - char childlog[MAX_PATH]; - PROCESS_INFORMATION info; - STARTUPINFOA startup; - DWORD exit_code; - crash_blackbox_t crash_blackbox; - debugger_blackbox_t dbg_blackbox; - DWORD wait_code; - - if (skip_crash_and_debug) - { - win_skip("Skipping crash_and_debug\n"); - return; - } - - ret=RegSetValueExA(hkey, "auto", 0, REG_SZ, (BYTE*)"1", 2); - ok(ret == ERROR_SUCCESS, "unable to set AeDebug/auto: ret=%d\n", ret); - - get_file_name(dbglog); - get_events(dbglog, &start_event, &done_event); - cmd=HeapAlloc(GetProcessHeap(), 0, strlen(argv0)+10+strlen(dbgtasks)+1+strlen(dbglog)+2+34+1); - sprintf(cmd, "%s debugger %s \"%s\" %%ld %%ld", argv0, dbgtasks, dbglog); - ret=RegSetValueExA(hkey, "debugger", 0, REG_SZ, (BYTE*)cmd, strlen(cmd)+1); - ok(ret == ERROR_SUCCESS, "unable to set AeDebug/debugger: ret=%d\n", ret); - HeapFree(GetProcessHeap(), 0, cmd); - - get_file_name(childlog); - cmd=HeapAlloc(GetProcessHeap(), 0, strlen(argv0)+16+strlen(dbglog)+2+1); - sprintf(cmd, "%s debugger crash \"%s\"", argv0, childlog); - - memset(&startup, 0, sizeof(startup)); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW; - startup.wShowWindow = SW_SHOWNORMAL; - ret=CreateProcessA(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &startup, &info); - ok(ret, "CreateProcess: err=%d\n", GetLastError()); - HeapFree(GetProcessHeap(), 0, cmd); - CloseHandle(info.hThread); - - /* The process exits... */ - trace("waiting for child exit...\n"); - wait_code = WaitForSingleObject(info.hProcess, 30000); -#if defined(_WIN64) && defined(__MINGW32__) - /* Mingw x64 doesn't output proper unwind info */ - skip_crash_and_debug = broken(wait_code == WAIT_TIMEOUT); - if (skip_crash_and_debug) - { - TerminateProcess(info.hProcess, WAIT_TIMEOUT); - WaitForSingleObject(info.hProcess, 5000); - CloseHandle(info.hProcess); - assert(DeleteFileA(dbglog) != 0); - assert(DeleteFileA(childlog) != 0); - win_skip("Giving up on child process\n"); - return; - } -#endif - ok(wait_code == WAIT_OBJECT_0, "Timed out waiting for the child to crash\n"); - bRet = GetExitCodeProcess(info.hProcess, &exit_code); - ok(bRet, "GetExitCodeProcess failed: err=%d\n", GetLastError()); - if (strstr(dbgtasks, "code2")) - { - /* If, after attaching to the debuggee, the debugger exits without - * detaching, then the debuggee gets a special exit code. - */ - ok(exit_code == STATUS_DEBUGGER_INACTIVE || - broken(exit_code == STATUS_ACCESS_VIOLATION) || /* Intermittent Vista+ */ - broken(exit_code == WAIT_ABANDONED), /* NT4, W2K */ - "wrong exit code : %08x\n", exit_code); - } - else - ok(exit_code == STATUS_ACCESS_VIOLATION || - broken(exit_code == WAIT_ABANDONED), /* NT4, W2K, W2K3 */ - "wrong exit code : %08x\n", exit_code); - CloseHandle(info.hProcess); - - /* ...before the debugger */ - if (strstr(dbgtasks, "order")) - ok(SetEvent(start_event), "SetEvent(start_event) failed\n"); - - trace("waiting for the debugger...\n"); - wait_code = WaitForSingleObject(done_event, 5000); -#if defined(_WIN64) && defined(__MINGW32__) - /* Mingw x64 doesn't output proper unwind info */ - skip_crash_and_debug = broken(wait_code == WAIT_TIMEOUT); - if (skip_crash_and_debug) - { - assert(DeleteFileA(dbglog) != 0); - assert(DeleteFileA(childlog) != 0); - win_skip("Giving up on debugger\n"); - return; - } -#endif - ok(wait_code == WAIT_OBJECT_0, "Timed out waiting for the debugger\n"); - - assert(load_blackbox(childlog, &crash_blackbox, sizeof(crash_blackbox))); - assert(load_blackbox(dbglog, &dbg_blackbox, sizeof(dbg_blackbox))); - - ok(dbg_blackbox.argc == 6, "wrong debugger argument count: %d\n", dbg_blackbox.argc); - ok(dbg_blackbox.pid == crash_blackbox.pid, "the child and debugged pids don't match: %d != %d\n", crash_blackbox.pid, dbg_blackbox.pid); - ok(dbg_blackbox.debug_rc, "debugger: SetEvent(debug_event) failed err=%d\n", dbg_blackbox.debug_err); - ok(dbg_blackbox.attach_rc, "DebugActiveProcess(%d) failed err=%d\n", dbg_blackbox.pid, dbg_blackbox.attach_err); - ok(dbg_blackbox.nokill_rc, "DebugSetProcessKillOnExit(FALSE) failed err=%d\n", dbg_blackbox.nokill_err); - ok(dbg_blackbox.detach_rc, "DebugActiveProcessStop(%d) failed err=%d\n", dbg_blackbox.pid, dbg_blackbox.detach_err); - - assert(DeleteFileA(dbglog) != 0); - assert(DeleteFileA(childlog) != 0); -} - -static void crash_and_winedbg(HKEY hkey, const char* argv0) -{ - BOOL bRet; - DWORD ret; - char* cmd; - PROCESS_INFORMATION info; - STARTUPINFOA startup; - DWORD exit_code; - - ret=RegSetValueExA(hkey, "auto", 0, REG_SZ, (BYTE*)"1", 2); - ok(ret == ERROR_SUCCESS, "unable to set AeDebug/auto: ret=%d\n", ret); - - cmd=HeapAlloc(GetProcessHeap(), 0, strlen(argv0)+15+1); - sprintf(cmd, "%s debugger crash", argv0); - - memset(&startup, 0, sizeof(startup)); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW; - startup.wShowWindow = SW_SHOWNORMAL; - ret=CreateProcessA(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &startup, &info); - ok(ret, "CreateProcess: err=%d\n", GetLastError()); - HeapFree(GetProcessHeap(), 0, cmd); - CloseHandle(info.hThread); - - trace("waiting for child exit...\n"); - ok(WaitForSingleObject(info.hProcess, 60000) == WAIT_OBJECT_0, "Timed out waiting for the child to crash\n"); - bRet = GetExitCodeProcess(info.hProcess, &exit_code); - ok(bRet, "GetExitCodeProcess failed: err=%d\n", GetLastError()); - ok(exit_code == STATUS_ACCESS_VIOLATION, "exit code = %08x\n", exit_code); - CloseHandle(info.hProcess); -} - -static void test_ExitCode(void) -{ - static const char* AeDebug="Software\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug"; - static const char* WineDbg="Software\\Wine\\WineDbg"; - char test_exe[MAX_PATH]; - DWORD ret; - HKEY hkey; - DWORD disposition; - reg_save_value auto_value; - reg_save_value debugger_value; - - GetModuleFileNameA(GetModuleHandle(NULL), test_exe, sizeof(test_exe)); - if (GetFileAttributes(test_exe) == INVALID_FILE_ATTRIBUTES) - strcat(test_exe, ".so"); - if (GetFileAttributesA(test_exe) == INVALID_FILE_ATTRIBUTES) - { - ok(0, "could not find the test executable '%s'\n", test_exe); - return; - } - - ret=RegCreateKeyExA(HKEY_LOCAL_MACHINE, AeDebug, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey, &disposition); - if (ret == ERROR_SUCCESS) - { - save_value(hkey, "auto", &auto_value); - save_value(hkey, "debugger", &debugger_value); - trace("HKLM\\%s\\debugger is set to '%s'\n", AeDebug, debugger_value.data); - } - else if (ret == ERROR_ACCESS_DENIED) - { - skip("not enough privileges to change the debugger\n"); - return; - } - else if (ret != ERROR_FILE_NOT_FOUND) - { - ok(0, "could not open the AeDebug key: %d\n", ret); - return; - } - else debugger_value.data = NULL; - - if (debugger_value.data && debugger_value.type == REG_SZ && - strstr((char*)debugger_value.data, "winedbg --auto")) - { - HKEY hkeyWinedbg; - ret=RegCreateKeyA(HKEY_CURRENT_USER, WineDbg, &hkeyWinedbg); - if (ret == ERROR_SUCCESS) - { - static DWORD zero; - reg_save_value crash_dlg_value; - save_value(hkeyWinedbg, "ShowCrashDialog", &crash_dlg_value); - RegSetValueExA(hkeyWinedbg, "ShowCrashDialog", 0, REG_DWORD, (BYTE *)&zero, sizeof(DWORD)); - crash_and_winedbg(hkey, test_exe); - restore_value(hkeyWinedbg, &crash_dlg_value); - RegCloseKey(hkeyWinedbg); - } - else - ok(0, "Couldn't access WineDbg Key - error %u\n", ret); - } - - if (winetest_interactive) - /* Since the debugging process never sets the debug event, it isn't recognized - as a valid debugger and, after the debugger exits, Windows will show a dialog box - asking the user what to do */ - crash_and_debug(hkey, test_exe, "dbg,none"); - else - skip("\"none\" debugger test needs user interaction\n"); - ok(disposition == REG_OPENED_EXISTING_KEY, "expected REG_OPENED_EXISTING_KEY, got %d\n", disposition); - crash_and_debug(hkey, test_exe, "dbg,event,order"); - crash_and_debug(hkey, test_exe, "dbg,attach,event,code2"); - if (pDebugSetProcessKillOnExit) - crash_and_debug(hkey, test_exe, "dbg,attach,event,nokill"); - else - win_skip("DebugSetProcessKillOnExit is not available\n"); - if (pDebugActiveProcessStop) - crash_and_debug(hkey, test_exe, "dbg,attach,event,detach"); - else - win_skip("DebugActiveProcessStop is not available\n"); - - if (disposition == REG_CREATED_NEW_KEY) - { - RegCloseKey(hkey); - RegDeleteKeyA(HKEY_LOCAL_MACHINE, AeDebug); - } - else - { - restore_value(hkey, &auto_value); - restore_value(hkey, &debugger_value); - RegCloseKey(hkey); - } -} - -static void test_RemoteDebugger(void) -{ - BOOL bret, present; - if(!pCheckRemoteDebuggerPresent) - { - win_skip("CheckRemoteDebuggerPresent is not available\n"); - return; - } - present = TRUE; - SetLastError(0xdeadbeef); - bret = pCheckRemoteDebuggerPresent(GetCurrentProcess(),&present); - ok(bret , "expected CheckRemoteDebuggerPresent to succeed\n"); - ok(0xdeadbeef == GetLastError(), - "expected error to be unchanged, got %d/%x\n",GetLastError(), GetLastError()); - - present = TRUE; - SetLastError(0xdeadbeef); - bret = pCheckRemoteDebuggerPresent(NULL,&present); - ok(!bret , "expected CheckRemoteDebuggerPresent to fail\n"); - ok(present, "expected parameter to be unchanged\n"); - ok(ERROR_INVALID_PARAMETER == GetLastError(), - "expected error ERROR_INVALID_PARAMETER, got %d/%x\n",GetLastError(), GetLastError()); - - SetLastError(0xdeadbeef); - bret = pCheckRemoteDebuggerPresent(GetCurrentProcess(),NULL); - ok(!bret , "expected CheckRemoteDebuggerPresent to fail\n"); - ok(ERROR_INVALID_PARAMETER == GetLastError(), - "expected error ERROR_INVALID_PARAMETER, got %d/%x\n",GetLastError(), GetLastError()); -} - -struct child_blackbox -{ - LONG failures; -}; - -static void doChild(int argc, char **argv) -{ - struct child_blackbox blackbox; - const char *blackbox_file; - HANDLE parent; - DWORD ppid; - BOOL debug; - BOOL ret; - - blackbox_file = argv[4]; - sscanf(argv[3], "%08x", &ppid); - - parent = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, ppid); - child_ok(!!parent, "OpenProcess failed, last error %#x.\n", GetLastError()); - - ret = pCheckRemoteDebuggerPresent(parent, &debug); - child_ok(ret, "CheckRemoteDebuggerPresent failed, last error %#x.\n", GetLastError()); - child_ok(!debug, "Expected debug == 0, got %#x.\n", debug); - - ret = DebugActiveProcess(ppid); - child_ok(ret, "DebugActiveProcess failed, last error %#x.\n", GetLastError()); - - ret = pCheckRemoteDebuggerPresent(parent, &debug); - child_ok(ret, "CheckRemoteDebuggerPresent failed, last error %#x.\n", GetLastError()); - child_ok(debug, "Expected debug != 0, got %#x.\n", debug); - - ret = pDebugActiveProcessStop(ppid); - child_ok(ret, "DebugActiveProcessStop failed, last error %#x.\n", GetLastError()); - - ret = pCheckRemoteDebuggerPresent(parent, &debug); - child_ok(ret, "CheckRemoteDebuggerPresent failed, last error %#x.\n", GetLastError()); - child_ok(!debug, "Expected debug == 0, got %#x.\n", debug); - - ret = CloseHandle(parent); - child_ok(ret, "CloseHandle failed, last error %#x.\n", GetLastError()); - - ret = pIsDebuggerPresent(); - child_ok(ret, "Expected ret != 0, got %#x.\n", ret); - ret = pCheckRemoteDebuggerPresent(GetCurrentProcess(), &debug); - child_ok(ret, "CheckRemoteDebuggerPresent failed, last error %#x.\n", GetLastError()); - child_ok(debug, "Expected debug != 0, got %#x.\n", debug); - - if (pNtCurrentTeb) - { - pNtCurrentTeb()->Peb->BeingDebugged = FALSE; - - ret = pIsDebuggerPresent(); - child_ok(!ret, "Expected ret != 0, got %#x.\n", ret); - ret = pCheckRemoteDebuggerPresent(GetCurrentProcess(), &debug); - child_ok(ret, "CheckRemoteDebuggerPresent failed, last error %#x.\n", GetLastError()); - child_ok(debug, "Expected debug != 0, got %#x.\n", debug); - - pNtCurrentTeb()->Peb->BeingDebugged = TRUE; - } - - blackbox.failures = child_failures; - save_blackbox(blackbox_file, &blackbox, sizeof(blackbox)); -} - -static void test_debug_loop(int argc, char **argv) -{ - const char *arguments = " debugger child "; - struct child_blackbox blackbox; - char blackbox_file[MAX_PATH]; - PROCESS_INFORMATION pi; - STARTUPINFOA si; - BOOL debug; - DWORD pid; - char *cmd; - BOOL ret; - - if (!pDebugActiveProcessStop || !pCheckRemoteDebuggerPresent) - { - win_skip("DebugActiveProcessStop or CheckRemoteDebuggerPresent not available, skipping test.\n"); - return; - } - - pid = GetCurrentProcessId(); - ret = DebugActiveProcess(pid); - ok(!ret, "DebugActiveProcess() succeeded on own process.\n"); - - get_file_name(blackbox_file); - cmd = HeapAlloc(GetProcessHeap(), 0, strlen(argv[0]) + strlen(arguments) + strlen(blackbox_file) + 2 + 10); - sprintf(cmd, "%s%s%08x \"%s\"", argv[0], arguments, pid, blackbox_file); - - memset(&si, 0, sizeof(si)); - si.cb = sizeof(si); - ret = CreateProcessA(NULL, cmd, NULL, NULL, FALSE, DEBUG_PROCESS, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess failed, last error %#x.\n", GetLastError()); - - HeapFree(GetProcessHeap(), 0, cmd); - - ret = pCheckRemoteDebuggerPresent(pi.hProcess, &debug); - ok(ret, "CheckRemoteDebuggerPresent failed, last error %#x.\n", GetLastError()); - ok(debug, "Expected debug != 0, got %#x.\n", debug); - - for (;;) - { - DEBUG_EVENT ev; - - ret = WaitForDebugEvent(&ev, INFINITE); - ok(ret, "WaitForDebugEvent failed, last error %#x.\n", GetLastError()); - if (!ret) break; - - if (ev.dwDebugEventCode == EXIT_PROCESS_DEBUG_EVENT) break; - - ret = ContinueDebugEvent(ev.dwProcessId, ev.dwThreadId, DBG_CONTINUE); - ok(ret, "ContinueDebugEvent failed, last error %#x.\n", GetLastError()); - if (!ret) break; - } - - ret = CloseHandle(pi.hThread); - ok(ret, "CloseHandle failed, last error %#x.\n", GetLastError()); - ret = CloseHandle(pi.hProcess); - ok(ret, "CloseHandle failed, last error %#x.\n", GetLastError()); - - load_blackbox(blackbox_file, &blackbox, sizeof(blackbox)); - ok(!blackbox.failures, "Got %d failures from child process.\n", blackbox.failures); - - ret = DeleteFileA(blackbox_file); - ok(ret, "DeleteFileA failed, last error %#x.\n", GetLastError()); -} - -START_TEST(debugger) -{ - HMODULE hdll; - - hdll=GetModuleHandle("kernel32.dll"); - pCheckRemoteDebuggerPresent=(void*)GetProcAddress(hdll, "CheckRemoteDebuggerPresent"); - pDebugActiveProcessStop=(void*)GetProcAddress(hdll, "DebugActiveProcessStop"); - pDebugSetProcessKillOnExit=(void*)GetProcAddress(hdll, "DebugSetProcessKillOnExit"); - pIsDebuggerPresent=(void*)GetProcAddress(hdll, "IsDebuggerPresent"); - hdll=GetModuleHandle("ntdll.dll"); - if (hdll) pNtCurrentTeb = (void*)GetProcAddress(hdll, "NtCurrentTeb"); - - myARGC=winetest_get_mainargs(&myARGV); - if (myARGC >= 3 && strcmp(myARGV[2], "crash") == 0) - { - doCrash(myARGC, myARGV); - } - else if (myARGC >= 3 && strncmp(myARGV[2], "dbg,", 4) == 0) - { - doDebugger(myARGC, myARGV); - } - else if (myARGC >= 5 && !strcmp(myARGV[2], "child")) - { - doChild(myARGC, myARGV); - } - else - { - test_ExitCode(); - test_RemoteDebugger(); - test_debug_loop(myARGC, myARGV); - } -} diff --git a/rostests/winetests/kernel32/directory.c b/rostests/winetests/kernel32/directory.c deleted file mode 100755 index 9baae472ba9..00000000000 --- a/rostests/winetests/kernel32/directory.c +++ /dev/null @@ -1,504 +0,0 @@ -/* - * Unit test suite for directory functions. - * - * Copyright 2002 Dmitry Timoshkov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winerror.h" - -/* If you change something in these tests, please do the same - * for GetSystemDirectory tests. - */ -static void test_GetWindowsDirectoryA(void) -{ - UINT len, len_with_null; - char buf[MAX_PATH]; - - len_with_null = GetWindowsDirectoryA(NULL, 0); - ok(len_with_null <= MAX_PATH, "should fit into MAX_PATH\n"); - - lstrcpyA(buf, "foo"); - len_with_null = GetWindowsDirectoryA(buf, 1); - ok(lstrcmpA(buf, "foo") == 0, "should not touch the buffer\n"); - - lstrcpyA(buf, "foo"); - len = GetWindowsDirectoryA(buf, len_with_null - 1); - ok(lstrcmpA(buf, "foo") == 0, "should not touch the buffer\n"); - ok(len == len_with_null, "GetWindowsDirectoryW returned %d, expected %d\n", - len, len_with_null); - - lstrcpyA(buf, "foo"); - len = GetWindowsDirectoryA(buf, len_with_null); - ok(lstrcmpA(buf, "foo") != 0, "should touch the buffer\n"); - ok(len == strlen(buf), "returned length should be equal to the length of string\n"); - ok(len == len_with_null-1, "GetWindowsDirectoryA returned %d, expected %d\n", - len, len_with_null-1); -} - -static void test_GetWindowsDirectoryW(void) -{ - UINT len, len_with_null; - WCHAR buf[MAX_PATH]; - static const WCHAR fooW[] = {'f','o','o',0}; - - len_with_null = GetWindowsDirectoryW(NULL, 0); - if (len_with_null == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("GetWindowsDirectoryW is not implemented\n"); - return; - } - ok(len_with_null <= MAX_PATH, "should fit into MAX_PATH\n"); - - lstrcpyW(buf, fooW); - len = GetWindowsDirectoryW(buf, 1); - ok(lstrcmpW(buf, fooW) == 0, "should not touch the buffer\n"); - ok(len == len_with_null, "GetWindowsDirectoryW returned %d, expected %d\n", - len, len_with_null); - - lstrcpyW(buf, fooW); - len = GetWindowsDirectoryW(buf, len_with_null - 1); - ok(lstrcmpW(buf, fooW) == 0, "should not touch the buffer\n"); - ok(len == len_with_null, "GetWindowsDirectoryW returned %d, expected %d\n", - len, len_with_null); - - lstrcpyW(buf, fooW); - len = GetWindowsDirectoryW(buf, len_with_null); - ok(lstrcmpW(buf, fooW) != 0, "should touch the buffer\n"); - ok(len == lstrlenW(buf), "returned length should be equal to the length of string\n"); - ok(len == len_with_null-1, "GetWindowsDirectoryW returned %d, expected %d\n", - len, len_with_null-1); -} - - -/* If you change something in these tests, please do the same - * for GetWindowsDirectory tests. - */ -static void test_GetSystemDirectoryA(void) -{ - UINT len, len_with_null; - char buf[MAX_PATH]; - - len_with_null = GetSystemDirectoryA(NULL, 0); - ok(len_with_null <= MAX_PATH, "should fit into MAX_PATH\n"); - - lstrcpyA(buf, "foo"); - len = GetSystemDirectoryA(buf, 1); - ok(lstrcmpA(buf, "foo") == 0, "should not touch the buffer\n"); - ok(len == len_with_null, "GetSystemDirectoryA returned %d, expected %d\n", - len, len_with_null); - - lstrcpyA(buf, "foo"); - len = GetSystemDirectoryA(buf, len_with_null - 1); - ok(lstrcmpA(buf, "foo") == 0, "should not touch the buffer\n"); - ok(len == len_with_null, "GetSystemDirectoryA returned %d, expected %d\n", - len, len_with_null); - - lstrcpyA(buf, "foo"); - len = GetSystemDirectoryA(buf, len_with_null); - ok(lstrcmpA(buf, "foo") != 0, "should touch the buffer\n"); - ok(len == strlen(buf), "returned length should be equal to the length of string\n"); - ok(len == len_with_null-1, "GetSystemDirectoryW returned %d, expected %d\n", - len, len_with_null-1); -} - -static void test_GetSystemDirectoryW(void) -{ - UINT len, len_with_null; - WCHAR buf[MAX_PATH]; - static const WCHAR fooW[] = {'f','o','o',0}; - - len_with_null = GetSystemDirectoryW(NULL, 0); - if (len_with_null == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("GetSystemDirectoryW is not available\n"); - return; - } - ok(len_with_null <= MAX_PATH, "should fit into MAX_PATH\n"); - - lstrcpyW(buf, fooW); - len = GetSystemDirectoryW(buf, 1); - ok(lstrcmpW(buf, fooW) == 0, "should not touch the buffer\n"); - ok(len == len_with_null, "GetSystemDirectoryW returned %d, expected %d\n", - len, len_with_null); - - lstrcpyW(buf, fooW); - len = GetSystemDirectoryW(buf, len_with_null - 1); - ok(lstrcmpW(buf, fooW) == 0, "should not touch the buffer\n"); - ok(len == len_with_null, "GetSystemDirectoryW returned %d, expected %d\n", - len, len_with_null); - - lstrcpyW(buf, fooW); - len = GetSystemDirectoryW(buf, len_with_null); - ok(lstrcmpW(buf, fooW) != 0, "should touch the buffer\n"); - ok(len == lstrlenW(buf), "returned length should be equal to the length of string\n"); - ok(len == len_with_null-1, "GetSystemDirectoryW returned %d, expected %d\n", - len, len_with_null-1); -} - -static void test_CreateDirectoryA(void) -{ - char tmpdir[MAX_PATH]; - BOOL ret; - - ret = CreateDirectoryA(NULL, NULL); - ok(ret == FALSE && (GetLastError() == ERROR_PATH_NOT_FOUND || - GetLastError() == ERROR_INVALID_PARAMETER), - "CreateDirectoryA(NULL): ret=%d err=%d\n", ret, GetLastError()); - - ret = CreateDirectoryA("", NULL); - ok(ret == FALSE && (GetLastError() == ERROR_BAD_PATHNAME || - GetLastError() == ERROR_PATH_NOT_FOUND), - "CreateDirectoryA(%s): ret=%d err=%d\n", tmpdir, ret, GetLastError()); - - ret = GetSystemDirectoryA(tmpdir, MAX_PATH); - ok(ret < MAX_PATH, "System directory should fit into MAX_PATH\n"); - - ret = SetCurrentDirectoryA(tmpdir); - ok(ret == TRUE, "could not chdir to the System directory\n"); - - ret = CreateDirectoryA(".", NULL); - ok(ret == FALSE && GetLastError() == ERROR_ALREADY_EXISTS, - "CreateDirectoryA(%s): ret=%d err=%d\n", tmpdir, ret, GetLastError()); - - - ret = CreateDirectoryA("..", NULL); - ok(ret == FALSE && GetLastError() == ERROR_ALREADY_EXISTS, - "CreateDirectoryA(%s): ret=%d err=%d\n", tmpdir, ret, GetLastError()); - - GetTempPathA(MAX_PATH, tmpdir); - tmpdir[3] = 0; /* truncate the path */ - ret = CreateDirectoryA(tmpdir, NULL); - ok(ret == FALSE && (GetLastError() == ERROR_ALREADY_EXISTS || - GetLastError() == ERROR_ACCESS_DENIED), - "CreateDirectoryA(%s): ret=%d err=%d\n", tmpdir, ret, GetLastError()); - - GetTempPathA(MAX_PATH, tmpdir); - lstrcatA(tmpdir, "Please Remove Me"); - ret = CreateDirectoryA(tmpdir, NULL); - ok(ret == TRUE, "CreateDirectoryA(%s) failed err=%d\n", tmpdir, GetLastError()); - - ret = CreateDirectoryA(tmpdir, NULL); - ok(ret == FALSE && GetLastError() == ERROR_ALREADY_EXISTS, - "CreateDirectoryA(%s): ret=%d err=%d\n", tmpdir, ret, GetLastError()); - - ret = RemoveDirectoryA(tmpdir); - ok(ret == TRUE, - "RemoveDirectoryA(%s) failed err=%d\n", tmpdir, GetLastError()); - - - lstrcatA(tmpdir, "?"); - ret = CreateDirectoryA(tmpdir, NULL); - ok(ret == FALSE && (GetLastError() == ERROR_INVALID_NAME || - GetLastError() == ERROR_PATH_NOT_FOUND), - "CreateDirectoryA(%s): ret=%d err=%d\n", tmpdir, ret, GetLastError()); - RemoveDirectoryA(tmpdir); - - tmpdir[lstrlenA(tmpdir) - 1] = '*'; - ret = CreateDirectoryA(tmpdir, NULL); - ok(ret == FALSE && (GetLastError() == ERROR_INVALID_NAME || - GetLastError() == ERROR_PATH_NOT_FOUND), - "CreateDirectoryA(%s): ret=%d err=%d\n", tmpdir, ret, GetLastError()); - RemoveDirectoryA(tmpdir); - - GetTempPathA(MAX_PATH, tmpdir); - lstrcatA(tmpdir, "Please Remove Me/Please Remove Me"); - ret = CreateDirectoryA(tmpdir, NULL); - ok(ret == FALSE && GetLastError() == ERROR_PATH_NOT_FOUND, - "CreateDirectoryA(%s): ret=%d err=%d\n", tmpdir, ret, GetLastError()); - RemoveDirectoryA(tmpdir); - - /* Test behavior with a trailing dot. - * The directory should be created without the dot. - */ - GetTempPathA(MAX_PATH, tmpdir); - lstrcatA(tmpdir, "Please Remove Me."); - ret = CreateDirectoryA(tmpdir, NULL); - ok(ret == TRUE, - "CreateDirectoryA(%s) failed err=%d\n", tmpdir, GetLastError()); - - lstrcatA(tmpdir, "/Please Remove Me"); - ret = CreateDirectoryA(tmpdir, NULL); - ok(ret == TRUE, - "CreateDirectoryA(%s) failed err=%d\n", tmpdir, GetLastError()); - ret = RemoveDirectoryA(tmpdir); - ok(ret == TRUE, - "RemoveDirectoryA(%s) failed err=%d\n", tmpdir, GetLastError()); - - GetTempPathA(MAX_PATH, tmpdir); - lstrcatA(tmpdir, "Please Remove Me"); - ret = RemoveDirectoryA(tmpdir); - ok(ret == TRUE, - "RemoveDirectoryA(%s) failed err=%d\n", tmpdir, GetLastError()); - - /* Test behavior with two trailing dots. - * The directory should be created without the trailing dots. - */ - GetTempPathA(MAX_PATH, tmpdir); - lstrcatA(tmpdir, "Please Remove Me.."); - ret = CreateDirectoryA(tmpdir, NULL); - ok(ret == TRUE, - "CreateDirectoryA(%s) failed err=%d\n", tmpdir, GetLastError()); - - lstrcatA(tmpdir, "/Please Remove Me"); - ret = CreateDirectoryA(tmpdir, NULL); - ok(ret == TRUE || /* On Win98 */ - (ret == FALSE && GetLastError() == ERROR_PATH_NOT_FOUND), /* On NT! */ - "CreateDirectoryA(%s): ret=%d err=%d\n", tmpdir, ret, GetLastError()); - if (ret == TRUE) - { - ret = RemoveDirectoryA(tmpdir); - ok(ret == TRUE, - "RemoveDirectoryA(%s) failed err=%d\n", tmpdir, GetLastError()); - } - - GetTempPathA(MAX_PATH, tmpdir); - lstrcatA(tmpdir, "Please Remove Me"); - ret = RemoveDirectoryA(tmpdir); - ok(ret == TRUE, - "RemoveDirectoryA(%s) failed err=%d\n", tmpdir, GetLastError()); - - /* Test behavior with a trailing space. - * The directory should be created without the trailing space. - */ - GetTempPathA(MAX_PATH, tmpdir); - lstrcatA(tmpdir, "Please Remove Me "); - ret = CreateDirectoryA(tmpdir, NULL); - ok(ret == TRUE, - "CreateDirectoryA(%s) failed err=%d\n", tmpdir, GetLastError()); - - lstrcatA(tmpdir, "/Please Remove Me"); - ret = CreateDirectoryA(tmpdir, NULL); - ok(ret == TRUE || /* On Win98 */ - (ret == FALSE && GetLastError() == ERROR_PATH_NOT_FOUND), /* On NT! */ - "CreateDirectoryA(%s): ret=%d err=%d\n", tmpdir, ret, GetLastError()); - if (ret == TRUE) - { - ret = RemoveDirectoryA(tmpdir); - ok(ret == TRUE, - "RemoveDirectoryA(%s) failed err=%d\n", tmpdir, GetLastError()); - } - - GetTempPathA(MAX_PATH, tmpdir); - lstrcatA(tmpdir, "Please Remove Me"); - ret = RemoveDirectoryA(tmpdir); - ok(ret == TRUE, - "RemoveDirectoryA(%s) failed err=%d\n", tmpdir, GetLastError()); - - /* Test behavior with a trailing space. - * The directory should be created without the trailing spaces. - */ - GetTempPathA(MAX_PATH, tmpdir); - lstrcatA(tmpdir, "Please Remove Me "); - ret = CreateDirectoryA(tmpdir, NULL); - ok(ret == TRUE, - "CreateDirectoryA(%s) failed err=%d\n", tmpdir, GetLastError()); - - lstrcatA(tmpdir, "/Please Remove Me"); - ret = CreateDirectoryA(tmpdir, NULL); - ok(ret == TRUE || /* On Win98 */ - (ret == FALSE && GetLastError() == ERROR_PATH_NOT_FOUND), /* On NT! */ - "CreateDirectoryA(%s): ret=%d err=%d\n", tmpdir, ret, GetLastError()); - if (ret == TRUE) - { - ret = RemoveDirectoryA(tmpdir); - ok(ret == TRUE, - "RemoveDirectoryA(%s) failed err=%d\n", tmpdir, GetLastError()); - } - - GetTempPathA(MAX_PATH, tmpdir); - lstrcatA(tmpdir, "Please Remove Me"); - ret = RemoveDirectoryA(tmpdir); - ok(ret == TRUE, - "RemoveDirectoryA(%s) failed err=%d\n", tmpdir, GetLastError()); -} - -static void test_CreateDirectoryW(void) -{ - WCHAR tmpdir[MAX_PATH]; - BOOL ret; - static const WCHAR empty_strW[] = { 0 }; - static const WCHAR tmp_dir_name[] = {'P','l','e','a','s','e',' ','R','e','m','o','v','e',' ','M','e',0}; - static const WCHAR dotW[] = {'.',0}; - static const WCHAR slashW[] = {'/',0}; - static const WCHAR dotdotW[] = {'.','.',0}; - static const WCHAR questionW[] = {'?',0}; - - ret = CreateDirectoryW(NULL, NULL); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("CreateDirectoryW is not available\n"); - return; - } - ok(ret == FALSE && GetLastError() == ERROR_PATH_NOT_FOUND, - "should not create NULL path ret %u err %u\n", ret, GetLastError()); - - ret = CreateDirectoryW(empty_strW, NULL); - ok(ret == FALSE && GetLastError() == ERROR_PATH_NOT_FOUND, - "should not create empty path ret %u err %u\n", ret, GetLastError()); - - ret = GetSystemDirectoryW(tmpdir, MAX_PATH); - ok(ret < MAX_PATH, "System directory should fit into MAX_PATH\n"); - - ret = SetCurrentDirectoryW(tmpdir); - ok(ret == TRUE, "could not chdir to the System directory ret %u err %u\n", ret, GetLastError()); - - ret = CreateDirectoryW(dotW, NULL); - ok(ret == FALSE && GetLastError() == ERROR_ALREADY_EXISTS, - "should not create existing path ret %u err %u\n", ret, GetLastError()); - - ret = CreateDirectoryW(dotdotW, NULL); - ok(ret == FALSE && GetLastError() == ERROR_ALREADY_EXISTS, - "should not create existing path ret %u err %u\n", ret, GetLastError()); - - GetTempPathW(MAX_PATH, tmpdir); - tmpdir[3] = 0; /* truncate the path */ - ret = CreateDirectoryW(tmpdir, NULL); - ok(ret == FALSE && (GetLastError() == ERROR_ACCESS_DENIED || GetLastError() == ERROR_ALREADY_EXISTS), - "should deny access to the drive root ret %u err %u\n", ret, GetLastError()); - - GetTempPathW(MAX_PATH, tmpdir); - lstrcatW(tmpdir, tmp_dir_name); - ret = CreateDirectoryW(tmpdir, NULL); - ok(ret == TRUE, "CreateDirectoryW should always succeed\n"); - - ret = CreateDirectoryW(tmpdir, NULL); - ok(ret == FALSE && GetLastError() == ERROR_ALREADY_EXISTS, - "should not create existing path ret %u err %u\n", ret, GetLastError()); - - ret = RemoveDirectoryW(tmpdir); - ok(ret == TRUE, "RemoveDirectoryW should always succeed\n"); - - lstrcatW(tmpdir, questionW); - ret = CreateDirectoryW(tmpdir, NULL); - ok(ret == FALSE && GetLastError() == ERROR_INVALID_NAME, - "CreateDirectoryW with ? wildcard name should fail with error 183, ret=%s error=%d\n", - ret ? " True" : "False", GetLastError()); - ret = RemoveDirectoryW(tmpdir); - ok(ret == FALSE, "RemoveDirectoryW should have failed\n"); - - tmpdir[lstrlenW(tmpdir) - 1] = '*'; - ret = CreateDirectoryW(tmpdir, NULL); - ok(ret == FALSE && GetLastError() == ERROR_INVALID_NAME, - "CreateDirectoryW with * wildcard name should fail with error 183, ret=%s error=%d\n", - ret ? " True" : "False", GetLastError()); - ret = RemoveDirectoryW(tmpdir); - ok(ret == FALSE, "RemoveDirectoryW should have failed\n"); - - GetTempPathW(MAX_PATH, tmpdir); - lstrcatW(tmpdir, tmp_dir_name); - lstrcatW(tmpdir, slashW); - lstrcatW(tmpdir, tmp_dir_name); - ret = CreateDirectoryW(tmpdir, NULL); - ok(ret == FALSE && GetLastError() == ERROR_PATH_NOT_FOUND, - "CreateDirectoryW with multiple nonexistent directories in path should fail ret %u err %u\n", - ret, GetLastError()); - ret = RemoveDirectoryW(tmpdir); - ok(ret == FALSE, "RemoveDirectoryW should have failed\n"); -} - -static void test_RemoveDirectoryA(void) -{ - char tmpdir[MAX_PATH]; - BOOL ret; - - GetTempPathA(MAX_PATH, tmpdir); - lstrcatA(tmpdir, "Please Remove Me"); - ret = CreateDirectoryA(tmpdir, NULL); - ok(ret == TRUE, "CreateDirectoryA should always succeed\n"); - - ret = RemoveDirectoryA(tmpdir); - ok(ret == TRUE, "RemoveDirectoryA should always succeed\n"); - - lstrcatA(tmpdir, "?"); - ret = RemoveDirectoryA(tmpdir); - ok(ret == FALSE && (GetLastError() == ERROR_INVALID_NAME || - GetLastError() == ERROR_PATH_NOT_FOUND), - "RemoveDirectoryA with ? wildcard name should fail, ret=%s error=%d\n", - ret ? " True" : "False", GetLastError()); - - tmpdir[lstrlenA(tmpdir) - 1] = '*'; - ret = RemoveDirectoryA(tmpdir); - ok(ret == FALSE && (GetLastError() == ERROR_INVALID_NAME || - GetLastError() == ERROR_PATH_NOT_FOUND), - "RemoveDirectoryA with * wildcard name should fail, ret=%s error=%d\n", - ret ? " True" : "False", GetLastError()); -} - -static void test_RemoveDirectoryW(void) -{ - WCHAR tmpdir[MAX_PATH]; - BOOL ret; - static const WCHAR tmp_dir_name[] = {'P','l','e','a','s','e',' ','R','e','m','o','v','e',' ','M','e',0}; - static const WCHAR questionW[] = {'?',0}; - - GetTempPathW(MAX_PATH, tmpdir); - lstrcatW(tmpdir, tmp_dir_name); - ret = CreateDirectoryW(tmpdir, NULL); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("CreateDirectoryW is not available\n"); - return; - } - - ok(ret == TRUE, "CreateDirectoryW should always succeed\n"); - - ret = RemoveDirectoryW(tmpdir); - ok(ret == TRUE, "RemoveDirectoryW should always succeed\n"); - - lstrcatW(tmpdir, questionW); - ret = RemoveDirectoryW(tmpdir); - ok(ret == FALSE && GetLastError() == ERROR_INVALID_NAME, - "RemoveDirectoryW with wildcard should fail with error 183, ret=%s error=%d\n", - ret ? " True" : "False", GetLastError()); - - tmpdir[lstrlenW(tmpdir) - 1] = '*'; - ret = RemoveDirectoryW(tmpdir); - ok(ret == FALSE && GetLastError() == ERROR_INVALID_NAME, - "RemoveDirectoryW with * wildcard name should fail with error 183, ret=%s error=%d\n", - ret ? " True" : "False", GetLastError()); -} - -static void test_SetCurrentDirectoryA(void) -{ - SetLastError(0); - ok( !SetCurrentDirectoryA( "\\some_dummy_dir" ), "SetCurrentDirectoryA succeeded\n" ); - ok( GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %d\n", GetLastError() ); - ok( !SetCurrentDirectoryA( "\\some_dummy\\subdir" ), "SetCurrentDirectoryA succeeded\n" ); - ok( GetLastError() == ERROR_PATH_NOT_FOUND, "wrong error %d\n", GetLastError() ); -} - -START_TEST(directory) -{ - test_GetWindowsDirectoryA(); - test_GetWindowsDirectoryW(); - - test_GetSystemDirectoryA(); - test_GetSystemDirectoryW(); - - test_CreateDirectoryA(); - test_CreateDirectoryW(); - - test_RemoveDirectoryA(); - test_RemoveDirectoryW(); - - test_SetCurrentDirectoryA(); -} diff --git a/rostests/winetests/kernel32/dosdev.c b/rostests/winetests/kernel32/dosdev.c deleted file mode 100644 index fab58ea343c..00000000000 --- a/rostests/winetests/kernel32/dosdev.c +++ /dev/null @@ -1,384 +0,0 @@ -/* - * Unit test suite for virtual substituted drive functions. - * - * Copyright 2011 Sam Arun Raj - * - * 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 "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winerror.h" - -#define SUBST_DRIVE_LETTER 'M' -#define SUBST_DRIVE "M:" -#define SUBST_DRIVE_NON_EXIST_DIR "M:\\deadbeef" -#define SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR "M:\\" -#define SUBST_DRIVE_SEARCH "M:\\*" -#define SUBST_DRIVE_LOWERCASE "m:" -#define SUBST_DRIVE_LOWERCASE_SEARCH "m:\\*" -#define SUBST_DRIVE2_LETTER 'R' -#define SUBST_DRIVE2 "R:" -#define SUBST_DRIVE2_WITH_TRAILING_PATH_SEPERATOR "R:\\" -#define SUBST_DRIVE2_SEARCH "R:\\*" - -static void test_DefineDosDeviceA(void) -{ - CHAR Buffer[MAX_PATH], Target[MAX_PATH]; - BOOL Result; - UINT CharCount; - HANDLE hnd; - WIN32_FIND_DATAA Data; - UINT SystemDriveType, DriveType1, DriveType2; - DWORD dwMaskPrev, dwMaskCur; - CHAR c; - - /* Choose the symbolic link target */ - CharCount = GetSystemWindowsDirectoryA(Target, MAX_PATH); - ok(CharCount > 0, "Failed to get windows directory\n"); - c = Target[3]; - Target[3] = '\0'; - SystemDriveType = GetDriveTypeA(Target); - Target[3] = c; - - /* Test with a subst drive pointing to another substed drive */ - dwMaskPrev = GetLogicalDrives(); - Result = DefineDosDeviceA(0, SUBST_DRIVE, Target); - ok(Result, "Failed to subst drive\n"); - DriveType1 = GetDriveTypeA(SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR); - Result = DefineDosDeviceA(0, SUBST_DRIVE2, SUBST_DRIVE); - ok(Result, "Failed to subst drive\n"); - DriveType2 = GetDriveTypeA(SUBST_DRIVE2_WITH_TRAILING_PATH_SEPERATOR); - dwMaskCur = GetLogicalDrives(); - ok(dwMaskCur != dwMaskPrev, "Drive masks match when it shouldn't\n"); - ok((dwMaskCur & (1 << (SUBST_DRIVE_LETTER - 'A'))), "Drive bit is not set\n"); - ok((dwMaskCur & (1 << (SUBST_DRIVE2_LETTER - 'A'))), "Drive bit is not set\n"); - hnd = FindFirstFileA(SUBST_DRIVE2_SEARCH, &Data); - ok(hnd != INVALID_HANDLE_VALUE, "Failed to open subst drive\n"); - if (hnd) FindClose(hnd); - ok(DriveType1 == DriveType2, "subst drive types don't match\n"); - ok(DriveType1 == SystemDriveType, "subst drive types don't match\n"); - ok(DriveType2 == SystemDriveType, "subst drive types don't match\n"); - Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, SUBST_DRIVE, Target); - ok(Result, "Failed to remove subst drive using NULL Target name\n"); - hnd = FindFirstFileA(SUBST_DRIVE2_SEARCH, &Data); - ok(hnd == INVALID_HANDLE_VALUE, "Opened subst drive when it should fail, we removed the target\n"); - if (hnd) FindClose(hnd); - Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, SUBST_DRIVE2, SUBST_DRIVE); - ok(Result, "Failed to remove subst drive using NULL Target name\n"); - Result = QueryDosDeviceA(SUBST_DRIVE, Buffer, MAX_PATH); - ok(!Result, "Subst drive is present even after remove attempt\n"); - Result = QueryDosDeviceA(SUBST_DRIVE2, Buffer, MAX_PATH); - ok(!Result, "Subst drive is present even after remove attempt\n"); - dwMaskCur = GetLogicalDrives(); - ok(dwMaskCur == dwMaskPrev, "Drive masks don't match\n"); - - /* Test using lowercase drive letter */ - dwMaskPrev = GetLogicalDrives(); - Result = DefineDosDeviceA(0, SUBST_DRIVE_LOWERCASE, Target); - ok(Result, "Failed to subst drive using lowercase drive letter\n"); - DriveType1 = GetDriveTypeA(SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR); - ok(DriveType1 == SystemDriveType, "subst drive types don't match\n"); - dwMaskCur = GetLogicalDrives(); - ok(dwMaskCur != dwMaskPrev, "Drive masks match when it shouldn't\n"); - ok((dwMaskCur & (1 << (SUBST_DRIVE_LETTER - 'A'))), "Drive bit is not set\n"); - hnd = FindFirstFileA(SUBST_DRIVE_SEARCH, &Data); - ok(hnd != INVALID_HANDLE_VALUE, "Failed to open subst drive\n"); - if (hnd) FindClose(hnd); - Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, SUBST_DRIVE_LOWERCASE, Target); - ok(Result, "Failed to remove subst drive using lowercase drive letter\n"); - Result = QueryDosDeviceA(SUBST_DRIVE_LOWERCASE, Buffer, MAX_PATH); - ok(!Result, "Subst drive is present even after remove attempt\n"); - dwMaskCur = GetLogicalDrives(); - ok(dwMaskCur == dwMaskPrev, "Drive masks don't match\n"); - - /* Test remove without using DDD_EXACT_MATCH_ON_REMOVE */ - dwMaskPrev = GetLogicalDrives(); - Result = DefineDosDeviceA(0, SUBST_DRIVE, Target); - ok(Result, "Failed to subst drive\n"); - DriveType1 = GetDriveTypeA(SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR); - ok(DriveType1 == SystemDriveType, "subst drive types don't match\n"); - dwMaskCur = GetLogicalDrives(); - ok(dwMaskCur != dwMaskPrev, "Drive masks match when it shouldn't\n"); - ok((dwMaskCur & (1 << (SUBST_DRIVE_LETTER - 'A'))), "Drive bit is not set\n"); - hnd = FindFirstFileA(SUBST_DRIVE_SEARCH, &Data); - ok(hnd != INVALID_HANDLE_VALUE, "Failed to open subst drive\n"); - if (hnd) FindClose(hnd); - Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION, SUBST_DRIVE, NULL); - ok(Result, "Failed to remove subst drive using NULL Target name\n"); - Result = QueryDosDeviceA(SUBST_DRIVE, Buffer, MAX_PATH); - ok(!Result, "Subst drive is present even after remove attempt\n"); - dwMaskCur = GetLogicalDrives(); - ok(dwMaskCur == dwMaskPrev, "Drive masks don't match\n"); - - /* Test multiple adds and multiple removes in add order */ - dwMaskPrev = GetLogicalDrives(); - Result = DefineDosDeviceA(0, SUBST_DRIVE, "C:\\temp1"); - ok(Result, "Failed to subst drive\n"); - Result = DefineDosDeviceA(0, SUBST_DRIVE, "C:\\temp2"); - ok(Result, "Failed to subst drive\n"); - Result = DefineDosDeviceA(0, SUBST_DRIVE, "C:\\temp3"); - ok(Result, "Failed to subst drive\n"); - DriveType1 = GetDriveTypeA(SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR); - ok(DriveType1 != SystemDriveType, "subst drive types match when it shouldn't\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "GetLastError() reports unexpected error code\n"); - dwMaskCur = GetLogicalDrives(); - ok(dwMaskCur != dwMaskPrev, "Drive masks match when it shouldn't\n"); - ok((dwMaskCur & (1 << (SUBST_DRIVE_LETTER - 'A'))), "Drive bit is not set\n"); - Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, SUBST_DRIVE, "C:\\temp1"); - ok(Result, "Failed to remove subst drive\n"); - Result = QueryDosDeviceA(SUBST_DRIVE, Buffer, MAX_PATH); - ok(Result, "Failed to query subst drive\n"); - if (Result) ok((_stricmp(Buffer, "\\??\\C:\\temp3") == 0), "Subst drive is not pointing to correct target\n"); - Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, SUBST_DRIVE, "C:\\temp2"); - ok(Result, "Failed to remove subst drive\n"); - Result = QueryDosDeviceA(SUBST_DRIVE, Buffer, MAX_PATH); - ok(Result, "Failed to query subst drive\n"); - if (Result) ok((_stricmp(Buffer, "\\??\\C:\\temp3") == 0), "Subst drive is not pointing to correct target\n"); - Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, SUBST_DRIVE, "C:\\temp3"); - ok(Result, "Failed to remove subst drive\n"); - Result = QueryDosDeviceA(SUBST_DRIVE, Buffer, MAX_PATH); - ok(!Result, "Subst drive is present even after remove attempt\n"); - dwMaskCur = GetLogicalDrives(); - ok(dwMaskCur == dwMaskPrev, "Drive masks don't match\n"); - - /* Test multiple adds and multiple removes in reverse order */ - dwMaskPrev = GetLogicalDrives(); - Result = DefineDosDeviceA(0, SUBST_DRIVE, "C:\\temp1"); - ok(Result, "Failed to subst drive\n"); - Result = DefineDosDeviceA(0, SUBST_DRIVE, "C:\\temp2"); - ok(Result, "Failed to subst drive\n"); - Result = DefineDosDeviceA(0, SUBST_DRIVE, "C:\\temp3"); - ok(Result, "Failed to subst drive\n"); - DriveType1 = GetDriveTypeA(SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR); - ok(DriveType1 != SystemDriveType, "subst drive types match when it shouldn't\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "GetLastError() reports unexpected error code\n"); - dwMaskCur = GetLogicalDrives(); - ok(dwMaskCur != dwMaskPrev, "Drive masks match when it shouldn't\n"); - ok((dwMaskCur & (1 << (SUBST_DRIVE_LETTER - 'A'))), "Drive bit is not set\n"); - Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, SUBST_DRIVE, "C:\\temp3"); - ok(Result, "Failed to remove subst drive\n"); - Result = QueryDosDeviceA(SUBST_DRIVE, Buffer, MAX_PATH); - ok(Result, "Failed to query subst drive\n"); - if (Result) ok((_stricmp(Buffer, "\\??\\C:\\temp2") == 0), "Subst drive is not pointing to correct target\n"); - Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, SUBST_DRIVE, "C:\\temp2"); - ok(Result, "Failed to remove subst drive\n"); - Result = QueryDosDeviceA(SUBST_DRIVE, Buffer, MAX_PATH); - ok(Result, "Failed to query subst drive\n"); - if (Result) ok((_stricmp(Buffer, "\\??\\C:\\temp1") == 0), "Subst drive is not pointing to correct target\n"); - Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, SUBST_DRIVE, "C:\\temp1"); - ok(Result, "Failed to remove subst drive\n"); - Result = QueryDosDeviceA(SUBST_DRIVE, Buffer, MAX_PATH); - ok(!Result, "Subst drive is present even after remove attempt\n"); - dwMaskCur = GetLogicalDrives(); - ok(dwMaskCur == dwMaskPrev, "Drive masks don't match\n"); - - /* Test multiple adds and multiple removes out of order */ - dwMaskPrev = GetLogicalDrives(); - Result = DefineDosDeviceA(0, SUBST_DRIVE, "C:\\temp1"); - ok(Result, "Failed to subst drive\n"); - Result = DefineDosDeviceA(0, SUBST_DRIVE, "C:\\temp2"); - ok(Result, "Failed to subst drive\n"); - Result = DefineDosDeviceA(0, SUBST_DRIVE, "C:\\temp3"); - ok(Result, "Failed to subst drive\n"); - Result = DefineDosDeviceA(0, SUBST_DRIVE, "C:\\temp4"); - ok(Result, "Failed to subst drive\n"); - Result = DefineDosDeviceA(0, SUBST_DRIVE, "C:\\temp5"); - ok(Result, "Failed to subst drive\n"); - DriveType1 = GetDriveTypeA(SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR); - ok(DriveType1 != SystemDriveType, "subst drive types match when it shouldn't\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "GetLastError() reports unexpected error code\n"); - dwMaskCur = GetLogicalDrives(); - ok(dwMaskCur != dwMaskPrev, "Drive masks match when it shouldn't\n"); - ok((dwMaskCur & (1 << (SUBST_DRIVE_LETTER - 'A'))), "Drive bit is not set\n"); - Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, SUBST_DRIVE, "C:\\temp2"); - ok(Result, "Failed to remove subst drive\n"); - Result = QueryDosDeviceA(SUBST_DRIVE, Buffer, MAX_PATH); - ok(Result, "Failed to query subst drive\n"); - if (Result) ok((_stricmp(Buffer, "\\??\\C:\\temp5") == 0), "Subst drive is not pointing to correct target\n"); - Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, SUBST_DRIVE, "C:\\temp5"); - ok(Result, "Failed to remove subst drive\n"); - Result = QueryDosDeviceA(SUBST_DRIVE, Buffer, MAX_PATH); - ok(Result, "Failed to query subst drive\n"); - if (Result) ok((_stricmp(Buffer, "\\??\\C:\\temp4") == 0), "Subst drive is not pointing to correct target\n"); - Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, SUBST_DRIVE, "C:\\temp1"); - ok(Result, "Failed to remove subst drive\n"); - Result = QueryDosDeviceA(SUBST_DRIVE, Buffer, MAX_PATH); - ok(Result, "Failed to query subst drive\n"); - if (Result) ok((_stricmp(Buffer, "\\??\\C:\\temp4") == 0), "Subst drive is not pointing to correct target\n"); - Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, SUBST_DRIVE, "C:\\temp3"); - ok(Result, "Failed to remove subst drive\n"); - Result = QueryDosDeviceA(SUBST_DRIVE, Buffer, MAX_PATH); - ok(Result, "Failed to query subst drive\n"); - if (Result) ok((_stricmp(Buffer, "\\??\\C:\\temp4") == 0), "Subst drive is not pointing to correct target"); - Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, SUBST_DRIVE, "C:\\temp4"); - ok(Result, "Failed to remove subst drive\n"); - Result = QueryDosDeviceA(SUBST_DRIVE, Buffer, MAX_PATH); - ok(!Result, "Subst drive is present even after remove attempt\n"); - dwMaskCur = GetLogicalDrives(); - ok(dwMaskCur == dwMaskPrev, "Drive masks don't match\n"); - - /* Test with trailing '\' appended to TargetPath */ - dwMaskPrev = GetLogicalDrives(); - snprintf(Buffer, sizeof(Buffer), "%s\\\\\\", Target); - Result = DefineDosDeviceA(0, SUBST_DRIVE, Buffer); - ok(Result, "Failed to subst drive\n"); - DriveType1 = GetDriveTypeA(SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR); - ok(DriveType1 == SystemDriveType, "subst drive types don't match\n"); - dwMaskCur = GetLogicalDrives(); - ok(dwMaskCur != dwMaskPrev, "Drive masks match when it shouldn't\n"); - ok((dwMaskCur & (1 << (SUBST_DRIVE_LETTER - 'A'))), "Drive bit is not set\n"); - hnd = FindFirstFileA(SUBST_DRIVE_SEARCH, &Data); - ok(hnd != INVALID_HANDLE_VALUE, "Failed to open subst drive\n"); - if (hnd) FindClose(hnd); - Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, SUBST_DRIVE, Buffer); - ok(Result, "Failed to remove subst drive using NULL Target name\n"); - Result = QueryDosDeviceA(SUBST_DRIVE, Buffer, MAX_PATH); - ok(!Result, "Subst drive is present even after remove attempt\n"); - dwMaskCur = GetLogicalDrives(); - ok(dwMaskCur == dwMaskPrev, "Drive masks don't match\n"); - - /* Test with trailing '\' appended to TargetPath and DDD_RAW_TARGET_PATH flag */ - dwMaskPrev = GetLogicalDrives(); - snprintf(Buffer, sizeof(Buffer), "\\??\\%s\\\\\\", Target); - Result = DefineDosDeviceA(DDD_RAW_TARGET_PATH, SUBST_DRIVE, Buffer); - ok(Result, "Failed to subst drive\n"); - DriveType1 = GetDriveTypeA(SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR); - ok(DriveType1 != SystemDriveType, "subst drive types match when they shouldn't\n"); - dwMaskCur = GetLogicalDrives(); - ok(dwMaskCur != dwMaskPrev, "Drive masks match when it shouldn't\n"); - ok((dwMaskCur & (1 << (SUBST_DRIVE_LETTER - 'A'))), "Drive bit is not set\n"); - hnd = FindFirstFileA(SUBST_DRIVE_SEARCH, &Data); - ok(hnd == INVALID_HANDLE_VALUE, "Opened subst drive when it should fail\n"); - ok(GetLastError() == ERROR_INVALID_NAME, "GetLastError() reports unexpected error code\n"); - if (hnd) FindClose(hnd); - Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION, SUBST_DRIVE, NULL); - ok(Result, "Failed to remove subst drive using NULL Target name\n"); - Result = QueryDosDeviceA(SUBST_DRIVE, Buffer, MAX_PATH); - ok(!Result, "Subst drive is present even after remove attempt\n"); - dwMaskCur = GetLogicalDrives(); - ok(dwMaskCur == dwMaskPrev, "Drive masks don't match\n"); - - /* Test using trailing \ against drive letter */ - dwMaskPrev = GetLogicalDrives(); - Result = DefineDosDeviceA(0, SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR, Target); - ok(!Result, "Subst drive using trailing path seperator, this should not happen\n"); - DriveType1 = GetDriveTypeA(SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR); - ok(DriveType1 != SystemDriveType, "subst drive types match when it shouldn't\n"); - dwMaskCur = GetLogicalDrives(); - ok(dwMaskCur == dwMaskPrev, "Drive masks don't match\n"); - ok(!(dwMaskCur & (1 << (SUBST_DRIVE_LETTER - 'A'))), "Drive bit is set when it shouldn't\n"); - hnd = FindFirstFileA(SUBST_DRIVE_SEARCH, &Data); - ok(hnd == INVALID_HANDLE_VALUE, "Opened subst drive when it should fail\n"); - if (hnd) FindClose(hnd); - Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR, Target); - ok(!Result, "Removing Subst drive using trailing path seperator passed when it should fail\n"); - Result = QueryDosDeviceA(SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR, Buffer, MAX_PATH); - ok(!Result, "Subst drive is present when it should not be created in the first place\n"); - dwMaskCur = GetLogicalDrives(); - ok(dwMaskCur == dwMaskPrev, "Drive masks don't match\n"); - - /* Test using arbitary string, not necessarily a DOS drive letter */ - dwMaskPrev = GetLogicalDrives(); - Result = DefineDosDeviceA(0, "!QHello:", Target); - ok(Result, "Failed to subst drive using non-DOS drive name\n"); - dwMaskCur = GetLogicalDrives(); - ok(dwMaskCur == dwMaskPrev, "Drive masks don't match\n"); - Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, "!QHello:", Target); - ok(Result, "Failed to subst drive using non-DOS drive name\n"); - Result = QueryDosDeviceA("!QHello:", Buffer, MAX_PATH); - ok(!Result, "Subst drive is present even after remove attempt\n"); - dwMaskCur = GetLogicalDrives(); - ok(dwMaskCur == dwMaskPrev, "Drive masks don't match\n"); - - /* Test by subst a drive to itself */ - dwMaskPrev = GetLogicalDrives(); - Result = DefineDosDeviceA(0, SUBST_DRIVE, SUBST_DRIVE); - ok(Result, "Failed to subst drive\n"); - DriveType1 = GetDriveTypeA(SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR); - ok(DriveType1 != SystemDriveType, "subst drive types match when it shouldn't\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "GetLastError() reports unexpected error code\n"); - dwMaskCur = GetLogicalDrives(); - ok(dwMaskCur != dwMaskPrev, "Drive masks match when it shouldn't\n"); - ok((dwMaskCur & (1 << (SUBST_DRIVE_LETTER - 'A'))), "Drive bit is not set\n"); - hnd = FindFirstFileA(SUBST_DRIVE_SEARCH, &Data); - ok(hnd == INVALID_HANDLE_VALUE, "Opened subst drive when it should fail\n"); - if (hnd) FindClose(hnd); - Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, SUBST_DRIVE, SUBST_DRIVE); - ok(Result, "Failed to remove subst drive using lowercase drive letter\n"); - Result = QueryDosDeviceA(SUBST_DRIVE, Buffer, MAX_PATH); - ok(!Result, "Subst drive is present even after remove attempt\n"); - dwMaskCur = GetLogicalDrives(); - ok(dwMaskCur == dwMaskPrev, "Drive masks don't match\n"); - - /* Test by subst a drive to an non-existent folder under itself */ - dwMaskPrev = GetLogicalDrives(); - Result = DefineDosDeviceA(0, SUBST_DRIVE, SUBST_DRIVE_NON_EXIST_DIR); - ok(Result, "Failed to subst drive\n"); - DriveType1 = GetDriveTypeA(SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR); - ok(DriveType1 != SystemDriveType, "subst drive types match when it shouldn't\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "GetLastError() reports unexpected error code\n"); - dwMaskCur = GetLogicalDrives(); - ok(dwMaskCur != dwMaskPrev, "Drive masks match when it shouldn't\n"); - ok((dwMaskCur & (1 << (SUBST_DRIVE_LETTER - 'A'))), "Drive bit is not set\n"); - hnd = FindFirstFileA(SUBST_DRIVE_SEARCH, &Data); - ok(hnd == INVALID_HANDLE_VALUE, "Opened subst drive when it should fail\n"); - if (hnd) FindClose(hnd); - Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, SUBST_DRIVE, SUBST_DRIVE_NON_EXIST_DIR); - ok(Result, "Failed to remove subst drive using lowercase drive letter\n"); - Result = QueryDosDeviceA(SUBST_DRIVE, Buffer, MAX_PATH); - ok(!Result, "Subst drive is present even after remove attempt\n"); - dwMaskCur = GetLogicalDrives(); - ok(dwMaskCur == dwMaskPrev, "Drive masks don't match\n"); -} - -static void test_QueryDosDeviceA(void) -{ - CHAR Buffer[MAX_PATH], Target[MAX_PATH]; - BOOL Result; - UINT CharCount; - - /* Choose the symbolic link target */ - CharCount = GetSystemWindowsDirectoryA(Target, MAX_PATH); - ok(CharCount > 0, "Failed to get windows directory\n"); - - Result = DefineDosDeviceA(0, SUBST_DRIVE, Target); - ok(Result, "Failed to subst drive\n"); - Result = QueryDosDeviceA(SUBST_DRIVE, Buffer, 0); - ok(!Result, "Should fail as the buffer passed is supposed to be small\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() reports unexpected error code\n"); - Result = QueryDosDeviceA(SUBST_DRIVE, Buffer, MAX_PATH); - ok(Result, "failed to get target path\n"); - ok(_strnicmp(Buffer, "\\??\\", 4) == 0, "The target returned does have correct prefix set\n"); - ok(stricmp(&Buffer[4], Target) == 0, "The target returned does not match the one set\n"); - Result = DefineDosDeviceA(DDD_REMOVE_DEFINITION | DDD_EXACT_MATCH_ON_REMOVE, SUBST_DRIVE, Target); - ok(Result, "Failed to remove subst drive using lowercase drive letter\n"); - Result = QueryDosDeviceA(SUBST_DRIVE, Buffer, MAX_PATH); - - /* This will try to retrieve all existing MS-DOS device names */ - Result = QueryDosDeviceA(NULL, Buffer, 0); - ok(!Result, "Should fail as the buffer passed is supposed to be small\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetLastError() reports unexpected error code\n"); -} - -START_TEST(dosdev) -{ - test_DefineDosDeviceA(); - test_QueryDosDeviceA(); -} diff --git a/rostests/winetests/kernel32/drive.c b/rostests/winetests/kernel32/drive.c deleted file mode 100755 index db9c9c437f9..00000000000 --- a/rostests/winetests/kernel32/drive.c +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Unit test suite for drive functions. - * - * Copyright 2002 Dmitry Timoshkov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winerror.h" - -static DWORD (WINAPI *pGetDiskFreeSpaceExA)(LPCSTR, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER); - -static void test_GetDriveTypeA(void) -{ - char drive[] = "?:\\"; - DWORD logical_drives; - UINT type; - - logical_drives = GetLogicalDrives(); - ok(logical_drives != 0, "GetLogicalDrives error %d\n", GetLastError()); - - for (drive[0] = 'A'; drive[0] <= 'Z'; drive[0]++) - { - type = GetDriveTypeA(drive); - ok(type > DRIVE_UNKNOWN && type <= DRIVE_RAMDISK, - "not a valid drive %c: type %u\n", drive[0], type); - - if (!(logical_drives & 1)) - ok(type == DRIVE_NO_ROOT_DIR, - "GetDriveTypeA should return DRIVE_NO_ROOT_DIR for inexistent drive %c: but not %u\n", - drive[0], type); - - logical_drives >>= 1; - } -} - -static void test_GetDriveTypeW(void) -{ - WCHAR drive[] = {'?',':','\\',0}; - DWORD logical_drives; - UINT type; - - logical_drives = GetLogicalDrives(); - ok(logical_drives != 0, "GetLogicalDrives error %d\n", GetLastError()); - - for (drive[0] = 'A'; drive[0] <= 'Z'; drive[0]++) - { - type = GetDriveTypeW(drive); - ok(type > DRIVE_UNKNOWN && type <= DRIVE_RAMDISK, - "not a valid drive %c: type %u\n", drive[0], type); - - if (!(logical_drives & 1)) - ok(type == DRIVE_NO_ROOT_DIR, - "GetDriveTypeW should return DRIVE_NO_ROOT_DIR for inexistent drive %c: but not %u\n", - drive[0], type); - - logical_drives >>= 1; - } -} - -static void test_GetDiskFreeSpaceA(void) -{ - BOOL ret; - DWORD sectors_per_cluster, bytes_per_sector, free_clusters, total_clusters; - char drive[] = "?:\\"; - DWORD logical_drives; - - ret = GetDiskFreeSpaceA(NULL, §ors_per_cluster, &bytes_per_sector, &free_clusters, &total_clusters); - ok(ret, "GetDiskFreeSpaceA error %d\n", GetLastError()); - - ret = GetDiskFreeSpaceA("", §ors_per_cluster, &bytes_per_sector, &free_clusters, &total_clusters); - ok(!ret && (GetLastError() == ERROR_PATH_NOT_FOUND || GetLastError() == ERROR_INVALID_NAME), - "GetDiskFreeSpaceA(\"\"): ret=%d GetLastError=%d\n", - ret, GetLastError()); - - ret = GetDiskFreeSpaceA("\\", §ors_per_cluster, &bytes_per_sector, &free_clusters, &total_clusters); - ok(ret, "GetDiskFreeSpaceA error %d\n", GetLastError()); - - ret = GetDiskFreeSpaceA("/", §ors_per_cluster, &bytes_per_sector, &free_clusters, &total_clusters); - ok(ret, "GetDiskFreeSpaceA error %d\n", GetLastError()); - - logical_drives = GetLogicalDrives(); - ok(logical_drives != 0, "GetLogicalDrives error %d\n", GetLastError()); - - for (drive[0] = 'A'; drive[0] <= 'Z'; drive[0]++) - { - UINT drivetype = GetDriveTypeA(drive); - /* Skip floppy drives because NT pops up a MessageBox if no - * floppy is present - */ - if (drivetype != DRIVE_REMOVABLE && drivetype != DRIVE_NO_ROOT_DIR) - { - ret = GetDiskFreeSpaceA(drive, §ors_per_cluster, &bytes_per_sector, &free_clusters, &total_clusters); - if (!(logical_drives & 1)) - ok(!ret && (GetLastError() == ERROR_PATH_NOT_FOUND || GetLastError() == ERROR_INVALID_DRIVE), - "GetDiskFreeSpaceA(%s): ret=%d GetLastError=%d\n", - drive, ret, GetLastError()); - else - { - ok(ret || - GetLastError() == ERROR_NOT_READY || - GetLastError() == ERROR_INVALID_FUNCTION || - GetLastError() == ERROR_INVALID_DRIVE || - GetLastError() == ERROR_PATH_NOT_FOUND || - GetLastError() == ERROR_REQUEST_ABORTED || - GetLastError() == ERROR_NETNAME_DELETED || - GetLastError() == ERROR_UNRECOGNIZED_VOLUME, - "GetDiskFreeSpaceA(%s): ret=%d GetLastError=%d\n", - drive, ret, GetLastError()); - if( GetVersion() & 0x80000000) - /* win3.0 thru winME */ - ok( total_clusters <= 65535, - "total clusters is %d > 65535\n", total_clusters); - else if (pGetDiskFreeSpaceExA) { - /* NT, 2k, XP : GetDiskFreeSpace should be accurate */ - ULARGE_INTEGER totEx, tot, d; - - tot.QuadPart = sectors_per_cluster; - tot.QuadPart = (tot.QuadPart * bytes_per_sector) * total_clusters; - ret = pGetDiskFreeSpaceExA( drive, &d, &totEx, NULL); - ok( ret || - GetLastError() == ERROR_NOT_READY || - GetLastError() == ERROR_INVALID_FUNCTION || - GetLastError() == ERROR_PATH_NOT_FOUND || - GetLastError() == ERROR_REQUEST_ABORTED || - GetLastError() == ERROR_NETNAME_DELETED || - GetLastError() == ERROR_UNRECOGNIZED_VOLUME, - "GetDiskFreeSpaceExA( %s ) failed. GetLastError=%d\n", drive, GetLastError()); - ok( bytes_per_sector == 0 || /* empty cd rom drive */ - totEx.QuadPart <= tot.QuadPart, - "GetDiskFreeSpaceA should report at least as much bytes on disk %s as GetDiskFreeSpaceExA\n", drive); - } - } - } - logical_drives >>= 1; - } -} - -static void test_GetDiskFreeSpaceW(void) -{ - BOOL ret; - DWORD sectors_per_cluster, bytes_per_sector, free_clusters, total_clusters; - WCHAR drive[] = {'?',':','\\',0}; - DWORD logical_drives; - static const WCHAR empty_pathW[] = { 0 }; - static const WCHAR root_pathW[] = { '\\', 0 }; - static const WCHAR unix_style_root_pathW[] = { '/', 0 }; - - ret = GetDiskFreeSpaceW(NULL, §ors_per_cluster, &bytes_per_sector, &free_clusters, &total_clusters); - if (ret == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("GetDiskFreeSpaceW is not available\n"); - return; - } - ok(ret, "GetDiskFreeSpaceW error %d\n", GetLastError()); - - ret = GetDiskFreeSpaceW(empty_pathW, §ors_per_cluster, &bytes_per_sector, &free_clusters, &total_clusters); - ok(!ret && GetLastError() == ERROR_PATH_NOT_FOUND, - "GetDiskFreeSpaceW(\"\"): ret=%d GetLastError=%d\n", - ret, GetLastError()); - - ret = GetDiskFreeSpaceW(root_pathW, §ors_per_cluster, &bytes_per_sector, &free_clusters, &total_clusters); - ok(ret, "GetDiskFreeSpaceW(\"\") error %d\n", GetLastError()); - - ret = GetDiskFreeSpaceW(unix_style_root_pathW, §ors_per_cluster, &bytes_per_sector, &free_clusters, &total_clusters); - ok(ret, "GetDiskFreeSpaceW error %d\n", GetLastError()); - - logical_drives = GetLogicalDrives(); - ok(logical_drives != 0, "GetLogicalDrives error %d\n", GetLastError()); - - for (drive[0] = 'A'; drive[0] <= 'Z'; drive[0]++) - { - UINT drivetype = GetDriveTypeW(drive); - /* Skip floppy drives because NT4 pops up a MessageBox if no floppy is present */ - if (drivetype != DRIVE_REMOVABLE && drivetype != DRIVE_NO_ROOT_DIR) - { - ret = GetDiskFreeSpaceW(drive, §ors_per_cluster, &bytes_per_sector, &free_clusters, &total_clusters); - if (!(logical_drives & 1)) - ok(!ret && GetLastError() == ERROR_PATH_NOT_FOUND, - "GetDiskFreeSpaceW(%c): ret=%d GetLastError=%d\n", - drive[0], ret, GetLastError()); - else - ok( ret || - GetLastError() == ERROR_NOT_READY || - GetLastError() == ERROR_INVALID_FUNCTION || - GetLastError() == ERROR_PATH_NOT_FOUND || - GetLastError() == ERROR_REQUEST_ABORTED || - GetLastError() == ERROR_UNRECOGNIZED_VOLUME, - "GetDiskFreeSpaceW(%c): ret=%d GetLastError=%d\n", - drive[0], ret, GetLastError()); - } - logical_drives >>= 1; - } -} - -START_TEST(drive) -{ - HANDLE hkernel32 = GetModuleHandleA("kernel32"); - pGetDiskFreeSpaceExA = (void *) GetProcAddress(hkernel32, "GetDiskFreeSpaceExA"); - - test_GetDriveTypeA(); - test_GetDriveTypeW(); - - test_GetDiskFreeSpaceA(); - test_GetDiskFreeSpaceW(); -} diff --git a/rostests/winetests/kernel32/environ.c b/rostests/winetests/kernel32/environ.c deleted file mode 100755 index 3ac86cd7a4b..00000000000 --- a/rostests/winetests/kernel32/environ.c +++ /dev/null @@ -1,568 +0,0 @@ -/* - * Unit test suite for environment functions. - * - * Copyright 2002 Dmitry Timoshkov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "winnls.h" - -static CHAR string[MAX_PATH]; -#define ok_w(res, format, szString) \ -\ - WideCharToMultiByte(CP_ACP, 0, szString, -1, string, MAX_PATH, NULL, NULL); \ - ok(res, format, string); - -static BOOL (WINAPI *pGetComputerNameExA)(COMPUTER_NAME_FORMAT,LPSTR,LPDWORD); -static BOOL (WINAPI *pGetComputerNameExW)(COMPUTER_NAME_FORMAT,LPWSTR,LPDWORD); -static BOOL (WINAPI *pOpenProcessToken)(HANDLE,DWORD,PHANDLE); -static BOOL (WINAPI *pGetUserProfileDirectoryA)(HANDLE,LPSTR,LPDWORD); - -static void init_functionpointers(void) -{ - HMODULE hkernel32 = GetModuleHandleA("kernel32.dll"); - HMODULE hadvapi32 = GetModuleHandleA("advapi32.dll"); - HMODULE huserenv = LoadLibraryA("userenv.dll"); - - pGetComputerNameExA = (void *)GetProcAddress(hkernel32, "GetComputerNameExA"); - pGetComputerNameExW = (void *)GetProcAddress(hkernel32, "GetComputerNameExW"); - pOpenProcessToken = (void *)GetProcAddress(hadvapi32, "OpenProcessToken"); - pGetUserProfileDirectoryA = (void *)GetProcAddress(huserenv, - "GetUserProfileDirectoryA"); -} - -static void test_Predefined(void) -{ - char Data[1024]; - DWORD DataSize; - char Env[sizeof(Data)]; - DWORD EnvSize; - HANDLE Token; - BOOL NoErr; - - /* - * Check value of %USERPROFILE%, should be same as GetUserProfileDirectory() - * If this fails, your test environment is probably not set up - */ - if (pOpenProcessToken == NULL || pGetUserProfileDirectoryA == NULL) - { - skip("Skipping USERPROFILE check\n"); - return; - } - NoErr = pOpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &Token); - ok(NoErr, "Failed to open token, error %u\n", GetLastError()); - DataSize = sizeof(Data); - NoErr = pGetUserProfileDirectoryA(Token, Data, &DataSize); - ok(NoErr, "Failed to get user profile dir, error %u\n", GetLastError()); - if (NoErr) - { - EnvSize = GetEnvironmentVariableA("USERPROFILE", Env, sizeof(Env)); - ok(EnvSize != 0 && EnvSize <= sizeof(Env), - "Failed to retrieve environment variable USERPROFILE, error %u\n", - GetLastError()); - ok(strcmp(Data, Env) == 0, - "USERPROFILE env var %s doesn't match GetUserProfileDirectory %s\n", - Env, Data); - } - else - skip("Skipping USERPROFILE check, can't get user profile dir\n"); - NoErr = CloseHandle(Token); - ok(NoErr, "Failed to close token, error %u\n", GetLastError()); -} - -static void test_GetSetEnvironmentVariableA(void) -{ - char buf[256]; - BOOL ret; - DWORD ret_size; - static const char name[] = "SomeWildName"; - static const char name_cased[] = "sOMEwILDnAME"; - static const char value[] = "SomeWildValue"; - - ret = SetEnvironmentVariableA(name, value); - ok(ret == TRUE, - "unexpected error in SetEnvironmentVariableA, GetLastError=%d\n", - GetLastError()); - - /* Try to retrieve the environment variable we just set */ - ret_size = GetEnvironmentVariableA(name, NULL, 0); - ok(ret_size == strlen(value) + 1, - "should return length with terminating 0 ret_size=%d\n", ret_size); - - lstrcpyA(buf, "foo"); - ret_size = GetEnvironmentVariableA(name, buf, lstrlenA(value)); - ok(lstrcmpA(buf, "foo") == 0, "should not touch the buffer\n"); - ok(ret_size == strlen(value) + 1, - "should return length with terminating 0 ret_size=%d\n", ret_size); - - lstrcpyA(buf, "foo"); - ret_size = GetEnvironmentVariableA(name, buf, lstrlenA(value) + 1); - ok(lstrcmpA(buf, value) == 0, "should touch the buffer\n"); - ok(ret_size == strlen(value), - "should return length without terminating 0 ret_size=%d\n", ret_size); - - lstrcpyA(buf, "foo"); - ret_size = GetEnvironmentVariableA(name_cased, buf, lstrlenA(value) + 1); - ok(lstrcmpA(buf, value) == 0, "should touch the buffer\n"); - ok(ret_size == strlen(value), - "should return length without terminating 0 ret_size=%d\n", ret_size); - - /* Remove that environment variable */ - ret = SetEnvironmentVariableA(name_cased, NULL); - ok(ret == TRUE, "should erase existing variable\n"); - - lstrcpyA(buf, "foo"); - ret_size = GetEnvironmentVariableA(name, buf, lstrlenA(value) + 1); - ok(lstrcmpA(buf, "foo") == 0, "should not touch the buffer\n"); - ok(ret_size == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND, - "should not find variable but ret_size=%d GetLastError=%d\n", - ret_size, GetLastError()); - - /* Check behavior of SetEnvironmentVariableA(name, "") */ - ret = SetEnvironmentVariableA(name, value); - ok(ret == TRUE, - "unexpected error in SetEnvironmentVariableA, GetLastError=%d\n", - GetLastError()); - - lstrcpyA(buf, "foo"); - ret_size = GetEnvironmentVariableA(name_cased, buf, lstrlenA(value) + 1); - ok(lstrcmpA(buf, value) == 0, "should touch the buffer\n"); - ok(ret_size == strlen(value), - "should return length without terminating 0 ret_size=%d\n", ret_size); - - ret = SetEnvironmentVariableA(name_cased, ""); - ok(ret == TRUE, - "should not fail with empty value but GetLastError=%d\n", GetLastError()); - - lstrcpyA(buf, "foo"); - SetLastError(0); - ret_size = GetEnvironmentVariableA(name, buf, lstrlenA(value) + 1); - ok(ret_size == 0 && - ((GetLastError() == 0 && lstrcmpA(buf, "") == 0) || - (GetLastError() == ERROR_ENVVAR_NOT_FOUND)), - "%s should be set to \"\" (NT) or removed (Win9x) but ret_size=%d GetLastError=%d and buf=%s\n", - name, ret_size, GetLastError(), buf); - - /* Test the limits */ - ret_size = GetEnvironmentVariableA(NULL, NULL, 0); - ok(ret_size == 0 && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_ENVVAR_NOT_FOUND), - "should not find variable but ret_size=%d GetLastError=%d\n", - ret_size, GetLastError()); - - ret_size = GetEnvironmentVariableA(NULL, buf, lstrlenA(value) + 1); - ok(ret_size == 0 && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_ENVVAR_NOT_FOUND), - "should not find variable but ret_size=%d GetLastError=%d\n", - ret_size, GetLastError()); - - ret_size = GetEnvironmentVariableA("", buf, lstrlenA(value) + 1); - ok(ret_size == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND, - "should not find variable but ret_size=%d GetLastError=%d\n", - ret_size, GetLastError()); -} - -static void test_GetSetEnvironmentVariableW(void) -{ - WCHAR buf[256]; - BOOL ret; - DWORD ret_size; - static const WCHAR name[] = {'S','o','m','e','W','i','l','d','N','a','m','e',0}; - static const WCHAR value[] = {'S','o','m','e','W','i','l','d','V','a','l','u','e',0}; - static const WCHAR name_cased[] = {'s','O','M','E','w','I','L','D','n','A','M','E',0}; - static const WCHAR empty_strW[] = { 0 }; - static const WCHAR fooW[] = {'f','o','o',0}; - - ret = SetEnvironmentVariableW(name, value); - if (ret == FALSE && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) - { - /* Must be Win9x which doesn't support the Unicode functions */ - win_skip("SetEnvironmentVariableW is not implemented\n"); - return; - } - ok(ret == TRUE, - "unexpected error in SetEnvironmentVariableW, GetLastError=%d\n", - GetLastError()); - - /* Try to retrieve the environment variable we just set */ - ret_size = GetEnvironmentVariableW(name, NULL, 0); - ok(ret_size == lstrlenW(value) + 1, - "should return length with terminating 0 ret_size=%d\n", - ret_size); - - lstrcpyW(buf, fooW); - ret_size = GetEnvironmentVariableW(name, buf, lstrlenW(value)); - ok_w(lstrcmpW(buf, fooW) == 0 || - lstrlenW(buf) == 0, /* Vista */ - "Expected untouched or empty buffer, got \"%s\"\n", buf); - - ok(ret_size == lstrlenW(value) + 1, - "should return length with terminating 0 ret_size=%d\n", ret_size); - - lstrcpyW(buf, fooW); - ret_size = GetEnvironmentVariableW(name, buf, lstrlenW(value) + 1); - ok(lstrcmpW(buf, value) == 0, "should touch the buffer\n"); - ok(ret_size == lstrlenW(value), - "should return length without terminating 0 ret_size=%d\n", ret_size); - - lstrcpyW(buf, fooW); - ret_size = GetEnvironmentVariableW(name_cased, buf, lstrlenW(value) + 1); - ok(lstrcmpW(buf, value) == 0, "should touch the buffer\n"); - ok(ret_size == lstrlenW(value), - "should return length without terminating 0 ret_size=%d\n", ret_size); - - /* Remove that environment variable */ - ret = SetEnvironmentVariableW(name_cased, NULL); - ok(ret == TRUE, "should erase existing variable\n"); - - lstrcpyW(buf, fooW); - ret_size = GetEnvironmentVariableW(name, buf, lstrlenW(value) + 1); - ok(lstrcmpW(buf, fooW) == 0, "should not touch the buffer\n"); - ok(ret_size == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND, - "should not find variable but ret_size=%d GetLastError=%d\n", - ret_size, GetLastError()); - - /* Check behavior of SetEnvironmentVariableW(name, "") */ - ret = SetEnvironmentVariableW(name, value); - ok(ret == TRUE, - "unexpected error in SetEnvironmentVariableW, GetLastError=%d\n", - GetLastError()); - - lstrcpyW(buf, fooW); - ret_size = GetEnvironmentVariableW(name, buf, lstrlenW(value) + 1); - ok(lstrcmpW(buf, value) == 0, "should touch the buffer\n"); - ok(ret_size == lstrlenW(value), - "should return length without terminating 0 ret_size=%d\n", ret_size); - - ret = SetEnvironmentVariableW(name_cased, empty_strW); - ok(ret == TRUE, "should not fail with empty value but GetLastError=%d\n", GetLastError()); - - lstrcpyW(buf, fooW); - ret_size = GetEnvironmentVariableW(name, buf, lstrlenW(value) + 1); - ok(ret_size == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND, - "should not find variable but ret_size=%d GetLastError=%d\n", - ret_size, GetLastError()); - ok(lstrcmpW(buf, empty_strW) == 0, "should copy an empty string\n"); - - /* Test the limits */ - ret_size = GetEnvironmentVariableW(NULL, NULL, 0); - ok(ret_size == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND, - "should not find variable but ret_size=%d GetLastError=%d\n", - ret_size, GetLastError()); - - if (0) /* Both tests crash on Vista */ - { - ret_size = GetEnvironmentVariableW(NULL, buf, lstrlenW(value) + 1); - ok(ret_size == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND, - "should not find variable but ret_size=%d GetLastError=%d\n", - ret_size, GetLastError()); - - ret = SetEnvironmentVariableW(NULL, NULL); - ok(ret == FALSE && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_ENVVAR_NOT_FOUND), - "should fail with NULL, NULL but ret=%d and GetLastError=%d\n", - ret, GetLastError()); - } -} - -static void test_ExpandEnvironmentStringsA(void) -{ - const char* value="Long long value"; - const char* not_an_env_var="%NotAnEnvVar%"; - char buf[256], buf1[256], buf2[0x8000]; - DWORD ret_size, ret_size1; - - SetEnvironmentVariableA("EnvVar", value); - - ret_size = ExpandEnvironmentStringsA(NULL, buf1, sizeof(buf1)); - ok(ret_size == 1 || ret_size == 0 /* Win9x */ || ret_size == 2 /* NT4 */, - "ExpandEnvironmentStrings returned %d\n", ret_size); - - /* Try to get the required buffer size 'the natural way' */ - strcpy(buf, "%EnvVar%"); - ret_size = ExpandEnvironmentStringsA(buf, NULL, 0); - ok(ret_size == strlen(value)+1 || /* win98 */ - ret_size == (strlen(value)+1)*2 || /* NT4 */ - ret_size == strlen(value)+2 || /* win2k, XP, win2k3 */ - ret_size == 0 /* Win95 */, - "ExpandEnvironmentStrings returned %d instead of %d, %d or %d\n", - ret_size, lstrlenA(value)+1, lstrlenA(value)+2, 0); - - /* Again, side-stepping the Win95 bug */ - ret_size = ExpandEnvironmentStringsA(buf, buf1, 0); - /* v5.1.2600.2945 (XP SP2) returns len + 2 here! */ - ok(ret_size == strlen(value)+1 || ret_size == strlen(value)+2 || - ret_size == (strlen(value)+1)*2 /* NT4 */, - "ExpandEnvironmentStrings returned %d instead of %d\n", - ret_size, lstrlenA(value)+1); - - /* Try with a buffer that's too small */ - ret_size = ExpandEnvironmentStringsA(buf, buf1, 12); - /* v5.1.2600.2945 (XP SP2) returns len + 2 here! */ - ok(ret_size == strlen(value)+1 || ret_size == strlen(value)+2 || - ret_size == (strlen(value)+1)*2 /* NT4 */, - "ExpandEnvironmentStrings returned %d instead of %d\n", - ret_size, lstrlenA(value)+1); - - /* Try with a buffer of just the right size */ - /* v5.1.2600.2945 (XP SP2) needs and returns len + 2 here! */ - ret_size = ExpandEnvironmentStringsA(buf, buf1, ret_size); - ok(ret_size == strlen(value)+1 || ret_size == strlen(value)+2 || - ret_size == (strlen(value)+1)*2 /* NT4 */, - "ExpandEnvironmentStrings returned %d instead of %d\n", - ret_size, lstrlenA(value)+1); - ok(!strcmp(buf1, value), "ExpandEnvironmentStrings returned [%s]\n", buf1); - - /* Try with an unset environment variable */ - strcpy(buf, not_an_env_var); - ret_size = ExpandEnvironmentStringsA(buf, buf1, sizeof(buf1)); - ok(ret_size == strlen(not_an_env_var)+1 || - ret_size == (strlen(not_an_env_var)+1)*2 /* NT4 */, - "ExpandEnvironmentStrings returned %d instead of %d\n", ret_size, lstrlenA(not_an_env_var)+1); - ok(!strcmp(buf1, not_an_env_var), "ExpandEnvironmentStrings returned [%s]\n", buf1); - - /* test a large destination size */ - strcpy(buf, "12345"); - ret_size = ExpandEnvironmentStringsA(buf, buf2, sizeof(buf2)); - ok(!strcmp(buf, buf2), "ExpandEnvironmentStrings failed %s vs %s. ret_size = %d\n", buf, buf2, ret_size); - - ret_size1 = GetWindowsDirectoryA(buf1,256); - ok ((ret_size1 >0) && (ret_size1<256), "GetWindowsDirectory Failed\n"); - ret_size = ExpandEnvironmentStringsA("%SystemRoot%",buf,sizeof(buf)); - if (ERROR_ENVVAR_NOT_FOUND != GetLastError()) - { - ok(!strcmp(buf, buf1), "ExpandEnvironmentStrings failed %s vs %s. ret_size = %d\n", buf, buf1, ret_size); - } - - /* Try with a variable that references another */ - SetEnvironmentVariableA("IndirectVar", "Foo%EnvVar%Bar"); - strcpy(buf, "Indirect-%IndirectVar%-Indirect"); - strcpy(buf2, "Indirect-Foo%EnvVar%Bar-Indirect"); - ret_size = ExpandEnvironmentStringsA(buf, buf1, sizeof(buf1)); - ok(ret_size == strlen(buf2)+1 || - ret_size == (strlen(buf2)+1)*2 /* NT4 */, - "ExpandEnvironmentStrings returned %d instead of %d\n", ret_size, lstrlen(buf2)+1); - ok(!strcmp(buf1, buf2), "ExpandEnvironmentStrings returned [%s]\n", buf1); - SetEnvironmentVariableA("IndirectVar", NULL); - - SetEnvironmentVariableA("EnvVar", NULL); -} - -static void test_GetComputerName(void) -{ - DWORD size; - BOOL ret; - LPSTR name; - LPWSTR nameW; - DWORD error; - int name_len; - - size = 0; - ret = GetComputerNameA((LPSTR)0xdeadbeef, &size); - error = GetLastError(); - ok(!ret && error == ERROR_BUFFER_OVERFLOW, "GetComputerNameA should have failed with ERROR_BUFFER_OVERFLOW instead of %d\n", error); - - /* Only Vista returns the computer name length as documented in the MSDN */ - if (size != 0) - { - size++; /* nul terminating character */ - name = HeapAlloc(GetProcessHeap(), 0, size * sizeof(name[0])); - ok(name != NULL, "HeapAlloc failed with error %d\n", GetLastError()); - ret = GetComputerNameA(name, &size); - ok(ret, "GetComputerNameA failed with error %d\n", GetLastError()); - HeapFree(GetProcessHeap(), 0, name); - } - - size = MAX_COMPUTERNAME_LENGTH + 1; - name = HeapAlloc(GetProcessHeap(), 0, size * sizeof(name[0])); - ok(name != NULL, "HeapAlloc failed with error %d\n", GetLastError()); - ret = GetComputerNameA(name, &size); - ok(ret, "GetComputerNameA failed with error %d\n", GetLastError()); - trace("computer name is \"%s\"\n", name); - name_len = strlen(name); - ok(size == name_len, "size should be same as length, name_len=%d, size=%d\n", name_len, size); - HeapFree(GetProcessHeap(), 0, name); - - size = 0; - SetLastError(0xdeadbeef); - ret = GetComputerNameW((LPWSTR)0xdeadbeef, &size); - error = GetLastError(); - if (error == ERROR_CALL_NOT_IMPLEMENTED) - win_skip("GetComputerNameW is not implemented\n"); - else - { - ok(!ret && error == ERROR_BUFFER_OVERFLOW, "GetComputerNameW should have failed with ERROR_BUFFER_OVERFLOW instead of %d\n", error); - size++; /* nul terminating character */ - nameW = HeapAlloc(GetProcessHeap(), 0, size * sizeof(nameW[0])); - ok(nameW != NULL, "HeapAlloc failed with error %d\n", GetLastError()); - ret = GetComputerNameW(nameW, &size); - ok(ret, "GetComputerNameW failed with error %d\n", GetLastError()); - HeapFree(GetProcessHeap(), 0, nameW); - } -} - -static void test_GetComputerNameExA(void) -{ - DWORD size; - BOOL ret; - LPSTR name; - DWORD error; - - static const int MAX_COMP_NAME = 32767; - - if (!pGetComputerNameExA) - { - win_skip("GetComputerNameExA function not implemented\n"); - return; - } - - size = 0; - ret = pGetComputerNameExA(ComputerNameDnsDomain, (LPSTR)0xdeadbeef, &size); - error = GetLastError(); - ok(ret == 0, "Expected 0, got %d\n", ret); - ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", error); - - /* size is not set in win2k */ - if (size == 0) - { - win_skip("Win2k doesn't set the size\n"); - size = MAX_COMP_NAME; - } - name = HeapAlloc(GetProcessHeap(), 0, size * sizeof(name[0])); - ok(name != NULL, "HeapAlloc failed with error %d\n", GetLastError()); - ret = pGetComputerNameExA(ComputerNameDnsDomain, name, &size); - ok(ret, "GetComputerNameExA(ComputerNameDnsDomain) failed with error %d\n", GetLastError()); - trace("domain name is \"%s\"\n", name); - HeapFree(GetProcessHeap(), 0, name); - - size = 0; - ret = pGetComputerNameExA(ComputerNameDnsFullyQualified, (LPSTR)0xdeadbeef, &size); - error = GetLastError(); - ok(ret == 0, "Expected 0, got %d\n", ret); - ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", error); - - /* size is not set in win2k */ - if (size == 0) - size = MAX_COMP_NAME; - name = HeapAlloc(GetProcessHeap(), 0, size * sizeof(name[0])); - ok(name != NULL, "HeapAlloc failed with error %d\n", GetLastError()); - ret = pGetComputerNameExA(ComputerNameDnsFullyQualified, name, &size); - ok(ret, "GetComputerNameExA(ComputerNameDnsFullyQualified) failed with error %d\n", GetLastError()); - trace("fully qualified hostname is \"%s\"\n", name); - HeapFree(GetProcessHeap(), 0, name); - - size = 0; - ret = pGetComputerNameExA(ComputerNameDnsHostname, (LPSTR)0xdeadbeef, &size); - error = GetLastError(); - ok(ret == 0, "Expected 0, got %d\n", ret); - ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", error); - - /* size is not set in win2k */ - if (size == 0) - size = MAX_COMP_NAME; - name = HeapAlloc(GetProcessHeap(), 0, size * sizeof(name[0])); - ok(name != NULL, "HeapAlloc failed with error %d\n", GetLastError()); - ret = pGetComputerNameExA(ComputerNameDnsHostname, name, &size); - ok(ret, "GetComputerNameExA(ComputerNameDnsHostname) failed with error %d\n", GetLastError()); - trace("hostname is \"%s\"\n", name); - HeapFree(GetProcessHeap(), 0, name); - - size = 0; - ret = pGetComputerNameExA(ComputerNameNetBIOS, (LPSTR)0xdeadbeef, &size); - error = GetLastError(); - ok(ret == 0, "Expected 0, got %d\n", ret); - ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", error); - - /* size is not set in win2k */ - if (size == 0) - size = MAX_COMP_NAME; - name = HeapAlloc(GetProcessHeap(), 0, size * sizeof(name[0])); - ok(name != NULL, "HeapAlloc failed with error %d\n", GetLastError()); - ret = pGetComputerNameExA(ComputerNameNetBIOS, name, &size); - ok(ret, "GetComputerNameExA(ComputerNameNetBIOS) failed with error %d\n", GetLastError()); - trace("NetBIOS name is \"%s\"\n", name); - HeapFree(GetProcessHeap(), 0, name); -} - -static void test_GetComputerNameExW(void) -{ - DWORD size; - BOOL ret; - LPWSTR nameW; - DWORD error; - - if (!pGetComputerNameExW) - { - win_skip("GetComputerNameExW function not implemented\n"); - return; - } - - size = 0; - ret = pGetComputerNameExW(ComputerNameDnsDomain, (LPWSTR)0xdeadbeef, &size); - error = GetLastError(); - ok(!ret && error == ERROR_MORE_DATA, "GetComputerNameExW should have failed with ERROR_MORE_DATA instead of %d\n", error); - nameW = HeapAlloc(GetProcessHeap(), 0, size * sizeof(nameW[0])); - ok(nameW != NULL, "HeapAlloc failed with error %d\n", GetLastError()); - ret = pGetComputerNameExW(ComputerNameDnsDomain, nameW, &size); - ok(ret, "GetComputerNameExW(ComputerNameDnsDomain) failed with error %d\n", GetLastError()); - HeapFree(GetProcessHeap(), 0, nameW); - - size = 0; - ret = pGetComputerNameExW(ComputerNameDnsFullyQualified, (LPWSTR)0xdeadbeef, &size); - error = GetLastError(); - ok(!ret && error == ERROR_MORE_DATA, "GetComputerNameExW should have failed with ERROR_MORE_DATA instead of %d\n", error); - nameW = HeapAlloc(GetProcessHeap(), 0, size * sizeof(nameW[0])); - ok(nameW != NULL, "HeapAlloc failed with error %d\n", GetLastError()); - ret = pGetComputerNameExW(ComputerNameDnsFullyQualified, nameW, &size); - ok(ret, "GetComputerNameExW(ComputerNameDnsFullyQualified) failed with error %d\n", GetLastError()); - HeapFree(GetProcessHeap(), 0, nameW); - - size = 0; - ret = pGetComputerNameExW(ComputerNameDnsHostname, (LPWSTR)0xdeadbeef, &size); - error = GetLastError(); - ok(!ret && error == ERROR_MORE_DATA, "GetComputerNameExW should have failed with ERROR_MORE_DATA instead of %d\n", error); - nameW = HeapAlloc(GetProcessHeap(), 0, size * sizeof(nameW[0])); - ok(nameW != NULL, "HeapAlloc failed with error %d\n", GetLastError()); - ret = pGetComputerNameExW(ComputerNameDnsHostname, nameW, &size); - ok(ret, "GetComputerNameExW(ComputerNameDnsHostname) failed with error %d\n", GetLastError()); - HeapFree(GetProcessHeap(), 0, nameW); - - size = 0; - ret = pGetComputerNameExW(ComputerNameNetBIOS, (LPWSTR)0xdeadbeef, &size); - error = GetLastError(); - ok(!ret && error == ERROR_MORE_DATA, "GetComputerNameExW should have failed with ERROR_MORE_DATA instead of %d\n", error); - nameW = HeapAlloc(GetProcessHeap(), 0, size * sizeof(nameW[0])); - ok(nameW != NULL, "HeapAlloc failed with error %d\n", GetLastError()); - ret = pGetComputerNameExW(ComputerNameNetBIOS, nameW, &size); - ok(ret, "GetComputerNameExW(ComputerNameNetBIOS) failed with error %d\n", GetLastError()); - HeapFree(GetProcessHeap(), 0, nameW); -} - -START_TEST(environ) -{ - init_functionpointers(); - - test_Predefined(); - test_GetSetEnvironmentVariableA(); - test_GetSetEnvironmentVariableW(); - test_ExpandEnvironmentStringsA(); - test_GetComputerName(); - test_GetComputerNameExA(); - test_GetComputerNameExW(); -} diff --git a/rostests/winetests/kernel32/fiber.c b/rostests/winetests/kernel32/fiber.c deleted file mode 100644 index 0e685351b46..00000000000 --- a/rostests/winetests/kernel32/fiber.c +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Unit tests for fiber functions - * - * Copyright (c) 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 - * 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/test.h" - -static LPVOID (WINAPI *pCreateFiber)(SIZE_T,LPFIBER_START_ROUTINE,LPVOID); -static LPVOID (WINAPI *pConvertThreadToFiber)(LPVOID); -static BOOL (WINAPI *pConvertFiberToThread)(void); -static void (WINAPI *pSwitchToFiber)(LPVOID); -static void (WINAPI *pDeleteFiber)(LPVOID); -static LPVOID (WINAPI *pConvertThreadToFiberEx)(LPVOID,DWORD); -static LPVOID (WINAPI *pCreateFiberEx)(SIZE_T,SIZE_T,DWORD,LPFIBER_START_ROUTINE,LPVOID); -static BOOL (WINAPI *pIsThreadAFiber)(void); -static DWORD (WINAPI *pFlsAlloc)(PFLS_CALLBACK_FUNCTION); -static BOOL (WINAPI *pFlsFree)(DWORD); -static PVOID (WINAPI *pFlsGetValue)(DWORD); -static BOOL (WINAPI *pFlsSetValue)(DWORD,PVOID); - -static LPVOID fibers[2]; -static BYTE testparam = 185; -static WORD cbCount; - -static VOID init_funcs(void) -{ - HMODULE hKernel32 = GetModuleHandle("kernel32"); - -#define X(f) p##f = (void*)GetProcAddress(hKernel32, #f); - X(CreateFiber); - X(ConvertThreadToFiber); - X(ConvertFiberToThread); - X(SwitchToFiber); - X(DeleteFiber); - X(ConvertThreadToFiberEx); - X(CreateFiberEx); - X(IsThreadAFiber); - X(FlsAlloc); - X(FlsFree); - X(FlsGetValue); - X(FlsSetValue); -#undef X -} - -static VOID WINAPI FiberLocalStorageProc(PVOID lpFlsData) -{ - cbCount++; - ok(lpFlsData == (PVOID) 1587, "FlsData expected not to be changed\n"); -} - -static VOID WINAPI FiberMainProc(LPVOID lpFiberParameter) -{ - BYTE *tparam = (BYTE *)lpFiberParameter; - cbCount++; - ok(*tparam == 185, "Parameterdata expected not to be changed\n"); - pSwitchToFiber(fibers[0]); -} - -static void test_ConvertThreadToFiber(void) -{ - if (pConvertThreadToFiber) - { - fibers[0] = pConvertThreadToFiber(&testparam); - ok(fibers[0] != 0, "ConvertThreadToFiber failed with error %d\n", GetLastError()); - } - else - { - win_skip( "ConvertThreadToFiber not present\n" ); - } -} - -static void test_ConvertThreadToFiberEx(void) -{ - if (pConvertThreadToFiberEx) - { - fibers[0] = pConvertThreadToFiberEx(&testparam, 0); - ok(fibers[0] != 0, "ConvertThreadToFiberEx failed with error %d\n", GetLastError()); - } - else - { - win_skip( "ConvertThreadToFiberEx not present\n" ); - } -} - -static void test_ConvertFiberToThread(void) -{ - if (pConvertFiberToThread) - { - BOOL ret = pConvertFiberToThread(); - ok(ret, "ConvertFiberToThread failed with error %d\n", GetLastError()); - } - else - { - win_skip( "ConvertFiberToThread not present\n" ); - } -} - -static void test_FiberHandling(void) -{ - cbCount = 0; - fibers[0] = pCreateFiber(0,FiberMainProc,&testparam); - ok(fibers[0] != 0, "CreateFiber failed with error %d\n", GetLastError()); - pDeleteFiber(fibers[0]); - - test_ConvertThreadToFiber(); - test_ConvertFiberToThread(); - if (pConvertThreadToFiberEx) - test_ConvertThreadToFiberEx(); - else - test_ConvertThreadToFiber(); - - - fibers[1] = pCreateFiber(0,FiberMainProc,&testparam); - ok(fibers[1] != 0, "CreateFiber failed with error %d\n", GetLastError()); - - pSwitchToFiber(fibers[1]); - ok(cbCount == 1, "Wrong callback count: %d\n", cbCount); - pDeleteFiber(fibers[1]); - - if (!pCreateFiberEx) - { - win_skip( "CreateFiberEx not present\n" ); - return; - } - - SetLastError(0xdeadbeef); - fibers[1] = pCreateFiberEx(0,0,0,FiberMainProc,&testparam); - ok(fibers[1] != 0, "CreateFiberEx failed with error %d\n", GetLastError()); - - pSwitchToFiber(fibers[1]); - ok(cbCount == 2, "Wrong callback count: %d\n", cbCount); - pDeleteFiber(fibers[1]); - - if (!pIsThreadAFiber) - { - win_skip( "IsThreadAFiber not present\n" ); - return; - } - - ok(pIsThreadAFiber(), "IsThreadAFiber reported FALSE\n"); - test_ConvertFiberToThread(); - ok(!pIsThreadAFiber(), "IsThreadAFiber reported TRUE\n"); -} - -static void test_FiberLocalStorage(PFLS_CALLBACK_FUNCTION cbfunc) -{ - DWORD fls; - BOOL ret; - PVOID val = (PVOID) 1587; - - if (!pFlsAlloc) - { - win_skip( "Fiber Local Storage not supported\n" ); - return; - } - cbCount = 0; - - fls = pFlsAlloc(cbfunc); - ok(fls != FLS_OUT_OF_INDEXES, "FlsAlloc failed with error %d\n", GetLastError()); - - ret = pFlsSetValue(fls, val); - ok(ret, "FlsSetValue failed\n"); - ok(val == pFlsGetValue(fls), "FlsGetValue failed\n"); - - ret = pFlsFree(fls); - ok(ret, "FlsFree failed\n"); - if (cbfunc) - todo_wine ok(cbCount == 1, "Wrong callback count: %d\n", cbCount); -} - -START_TEST(fiber) -{ - init_funcs(); - - if (!pCreateFiber) - { - win_skip( "Fibers not supported by win95\n" ); - return; - } - - test_FiberHandling(); - test_FiberLocalStorage(NULL); - test_FiberLocalStorage(FiberLocalStorageProc); -} diff --git a/rostests/winetests/kernel32/file.c b/rostests/winetests/kernel32/file.c deleted file mode 100755 index bc423d70150..00000000000 --- a/rostests/winetests/kernel32/file.c +++ /dev/null @@ -1,3165 +0,0 @@ -/* - * Unit tests for file functions in Wine - * - * Copyright (c) 2002, 2004 Jakob Eriksson - * Copyright (c) 2008 Jeff Zaroyko - * - * 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 - * - */ - -/* ReplaceFile requires Windows 2000 or newer */ -#define _WIN32_WINNT 0x0500 - -#include -#include -#include -#include - -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winerror.h" - -static HANDLE (WINAPI *pFindFirstFileExA)(LPCSTR,FINDEX_INFO_LEVELS,LPVOID,FINDEX_SEARCH_OPS,LPVOID,DWORD); -static BOOL (WINAPI *pReplaceFileA)(LPCSTR, LPCSTR, LPCSTR, DWORD, LPVOID, LPVOID); -static BOOL (WINAPI *pReplaceFileW)(LPCWSTR, LPCWSTR, LPCWSTR, DWORD, LPVOID, LPVOID); -static UINT (WINAPI *pGetSystemWindowsDirectoryA)(LPSTR, UINT); -static BOOL (WINAPI *pGetVolumeNameForVolumeMountPointA)(LPCSTR, LPSTR, DWORD); -static DWORD (WINAPI *pQueueUserAPC)(PAPCFUNC pfnAPC, HANDLE hThread, ULONG_PTR dwData); - -/* keep filename and filenameW the same */ -static const char filename[] = "testfile.xxx"; -static const WCHAR filenameW[] = { 't','e','s','t','f','i','l','e','.','x','x','x',0 }; -static const char sillytext[] = -"en larvig liten text dx \033 gx hej 84 hej 4484 ! \001\033 bla bl\na.. bla bla." -"1234 43 4kljf lf &%%%&&&&&& 34 4 34 3############# 33 3 3 3 # 3## 3" -"1234 43 4kljf lf &%%%&&&&&& 34 4 34 3############# 33 3 3 3 # 3## 3" -"1234 43 4kljf lf &%%%&&&&&& 34 4 34 3############# 33 3 3 3 # 3## 3" -"1234 43 4kljf lf &%%%&&&&&& 34 4 34 3############# 33 3 3 3 # 3## 3" -"1234 43 4kljf lf &%%%&&&&&& 34 4 34 3############# 33 3 3 3 # 3## 3" -"1234 43 4kljf lf &%%%&&&&&& 34 4 34 3############# 33 3 3 3 # 3## 3" -"1234 43 4kljf lf &%%%&&&&&& 34 4 34 3############# 33 3 3 3 # 3## 3" -"1234 43 4kljf lf &%%%&&&&&& 34 4 34 3############# 33 3 3 3 # 3## 3" -"sdlkfjasdlkfj a dslkj adsklf \n \nasdklf askldfa sdlkf \nsadklf asdklf asdf "; - -struct test_list { - const char *file; /* file string to test */ - const DWORD err; /* Win NT and further error code */ - const LONG err2; /* Win 9x & ME error code or -1 */ - const DWORD options; /* option flag to use for open */ - const BOOL todo_flag; /* todo_wine indicator */ -} ; - -static void InitFunctionPointers(void) -{ - HMODULE hkernel32 = GetModuleHandleA("kernel32"); - - pFindFirstFileExA=(void*)GetProcAddress(hkernel32, "FindFirstFileExA"); - pReplaceFileA=(void*)GetProcAddress(hkernel32, "ReplaceFileA"); - pReplaceFileW=(void*)GetProcAddress(hkernel32, "ReplaceFileW"); - pGetSystemWindowsDirectoryA=(void*)GetProcAddress(hkernel32, "GetSystemWindowsDirectoryA"); - pGetVolumeNameForVolumeMountPointA = (void *) GetProcAddress(hkernel32, "GetVolumeNameForVolumeMountPointA"); - pQueueUserAPC = (void *) GetProcAddress(hkernel32, "QueueUserAPC"); -} - -static void test__hread( void ) -{ - HFILE filehandle; - char buffer[10000]; - LONG bytes_read; - LONG bytes_wanted; - LONG i; - BOOL ret; - - SetFileAttributesA(filename,FILE_ATTRIBUTE_NORMAL); /* be sure to remove stale files */ - DeleteFileA( filename ); - filehandle = _lcreat( filename, 0 ); - if (filehandle == HFILE_ERROR) - { - ok(0,"couldn't create file \"%s\" (err=%d)\n",filename,GetLastError()); - return; - } - - ok( HFILE_ERROR != _hwrite( filehandle, sillytext, strlen( sillytext ) ), "_hwrite complains\n" ); - - ok( HFILE_ERROR != _lclose(filehandle), "_lclose complains\n" ); - - filehandle = _lopen( filename, OF_READ ); - - ok( HFILE_ERROR != filehandle, "couldn't open file \"%s\" again (err=%d)\n", filename, GetLastError( ) ); - - bytes_read = _hread( filehandle, buffer, 2 * strlen( sillytext ) ); - - ok( lstrlenA( sillytext ) == bytes_read, "file read size error\n" ); - - for (bytes_wanted = 0; bytes_wanted < lstrlenA( sillytext ); bytes_wanted++) - { - ok( 0 == _llseek( filehandle, 0, FILE_BEGIN ), "_llseek complains\n" ); - ok( _hread( filehandle, buffer, bytes_wanted ) == bytes_wanted, "erratic _hread return value\n" ); - for (i = 0; i < bytes_wanted; i++) - { - ok( buffer[i] == sillytext[i], "that's not what's written\n" ); - } - } - - ok( HFILE_ERROR != _lclose( filehandle ), "_lclose complains\n" ); - - ret = DeleteFileA( filename ); - ok( ret != 0, "DeleteFile failed (%d)\n", GetLastError( ) ); -} - - -static void test__hwrite( void ) -{ - HFILE filehandle; - char buffer[10000]; - LONG bytes_read; - LONG bytes_written; - ULONG blocks; - LONG i; - char *contents; - HLOCAL memory_object; - char checksum[1]; - BOOL ret; - - filehandle = _lcreat( filename, 0 ); - if (filehandle == HFILE_ERROR) - { - ok(0,"couldn't create file \"%s\" (err=%d)\n",filename,GetLastError()); - return; - } - - ok( HFILE_ERROR != _hwrite( filehandle, "", 0 ), "_hwrite complains\n" ); - - ok( HFILE_ERROR != _lclose(filehandle), "_lclose complains\n" ); - - filehandle = _lopen( filename, OF_READ ); - - bytes_read = _hread( filehandle, buffer, 1); - - ok( 0 == bytes_read, "file read size error\n" ); - - ok( HFILE_ERROR != _lclose(filehandle), "_lclose complains\n" ); - - filehandle = _lopen( filename, OF_READWRITE ); - - bytes_written = 0; - checksum[0] = '\0'; - srand( (unsigned)time( NULL ) ); - for (blocks = 0; blocks < 100; blocks++) - { - for (i = 0; i < (LONG)sizeof( buffer ); i++) - { - buffer[i] = rand( ); - checksum[0] = checksum[0] + buffer[i]; - } - ok( HFILE_ERROR != _hwrite( filehandle, buffer, sizeof( buffer ) ), "_hwrite complains\n" ); - bytes_written = bytes_written + sizeof( buffer ); - } - - ok( HFILE_ERROR != _hwrite( filehandle, checksum, 1 ), "_hwrite complains\n" ); - bytes_written++; - - ok( HFILE_ERROR != _lclose( filehandle ), "_lclose complains\n" ); - - memory_object = LocalAlloc( LPTR, bytes_written ); - - ok( 0 != memory_object, "LocalAlloc fails. (Could be out of memory.)\n" ); - - contents = LocalLock( memory_object ); - ok( NULL != contents, "LocalLock whines\n" ); - - filehandle = _lopen( filename, OF_READ ); - - contents = LocalLock( memory_object ); - ok( NULL != contents, "LocalLock whines\n" ); - - ok( bytes_written == _hread( filehandle, contents, bytes_written), "read length differ from write length\n" ); - - checksum[0] = '\0'; - i = 0; - do - { - checksum[0] = checksum[0] + contents[i]; - i++; - } - while (i < bytes_written - 1); - - ok( checksum[0] == contents[i], "stored checksum differ from computed checksum\n" ); - - ok( HFILE_ERROR != _lclose( filehandle ), "_lclose complains\n" ); - - ret = DeleteFileA( filename ); - ok( ret != 0, "DeleteFile failed (%d)\n", GetLastError( ) ); - - LocalFree( contents ); -} - - -static void test__lclose( void ) -{ - HFILE filehandle; - BOOL ret; - - filehandle = _lcreat( filename, 0 ); - if (filehandle == HFILE_ERROR) - { - ok(0,"couldn't create file \"%s\" (err=%d)\n",filename,GetLastError()); - return; - } - - ok( HFILE_ERROR != _hwrite( filehandle, sillytext, strlen( sillytext ) ), "_hwrite complains\n" ); - - ok( HFILE_ERROR != _lclose(filehandle), "_lclose complains\n" ); - - ret = DeleteFileA( filename ); - ok( ret != 0, "DeleteFile failed (%d)\n", GetLastError( ) ); -} - - -static void test__lcreat( void ) -{ - HFILE filehandle; - char buffer[10000]; - WIN32_FIND_DATAA search_results; - char slashname[] = "testfi/"; - int err; - HANDLE find; - BOOL ret; - - filehandle = _lcreat( filename, 0 ); - if (filehandle == HFILE_ERROR) - { - ok(0,"couldn't create file \"%s\" (err=%d)\n",filename,GetLastError()); - return; - } - - ok( HFILE_ERROR != _hwrite( filehandle, sillytext, strlen( sillytext ) ), "_hwrite complains\n" ); - - ok( 0 == _llseek( filehandle, 0, FILE_BEGIN ), "_llseek complains\n" ); - - ok( _hread( filehandle, buffer, strlen( sillytext ) ) == lstrlenA( sillytext ), "erratic _hread return value\n" ); - - ok( HFILE_ERROR != _lclose(filehandle), "_lclose complains\n" ); - - find = FindFirstFileA( filename, &search_results ); - ok( INVALID_HANDLE_VALUE != find, "should be able to find file\n" ); - FindClose( find ); - - ret = DeleteFileA(filename); - ok( ret != 0, "DeleteFile failed (%d)\n", GetLastError()); - - filehandle = _lcreat( filename, 1 ); /* readonly */ - ok( HFILE_ERROR != filehandle, "couldn't create file \"%s\" (err=%d)\n", filename, GetLastError( ) ); - - ok( HFILE_ERROR != _hwrite( filehandle, sillytext, strlen( sillytext ) ), "_hwrite shouldn't be able to write never the less\n" ); - - ok( HFILE_ERROR != _lclose(filehandle), "_lclose complains\n" ); - - find = FindFirstFileA( filename, &search_results ); - ok( INVALID_HANDLE_VALUE != find, "should be able to find file\n" ); - FindClose( find ); - - ok( 0 == DeleteFileA( filename ), "shouldn't be able to delete a readonly file\n" ); - - ok( SetFileAttributesA(filename, FILE_ATTRIBUTE_NORMAL ) != 0, "couldn't change attributes on file\n" ); - - ok( DeleteFileA( filename ) != 0, "now it should be possible to delete the file!\n" ); - - filehandle = _lcreat( filename, 2 ); - ok( HFILE_ERROR != filehandle, "couldn't create file \"%s\" (err=%d)\n", filename, GetLastError( ) ); - - ok( HFILE_ERROR != _hwrite( filehandle, sillytext, strlen( sillytext ) ), "_hwrite complains\n" ); - - ok( 0 == _llseek( filehandle, 0, FILE_BEGIN ), "_llseek complains\n" ); - - ok( _hread( filehandle, buffer, strlen( sillytext ) ) == lstrlenA( sillytext ), "erratic _hread return value\n" ); - - ok( HFILE_ERROR != _lclose(filehandle), "_lclose complains\n" ); - - find = FindFirstFileA( filename, &search_results ); - ok( INVALID_HANDLE_VALUE != find, "should STILL be able to find file\n" ); - FindClose( find ); - - ret = DeleteFileA( filename ); - ok( ret, "DeleteFile failed (%d)\n", GetLastError( ) ); - - filehandle = _lcreat( filename, 4 ); /* SYSTEM file */ - ok( HFILE_ERROR != filehandle, "couldn't create file \"%s\" (err=%d)\n", filename, GetLastError( ) ); - - ok( HFILE_ERROR != _hwrite( filehandle, sillytext, strlen( sillytext ) ), "_hwrite complains\n" ); - - ok( 0 == _llseek( filehandle, 0, FILE_BEGIN ), "_llseek complains\n" ); - - ok( _hread( filehandle, buffer, strlen( sillytext ) ) == lstrlenA( sillytext ), "erratic _hread return value\n" ); - - ok( HFILE_ERROR != _lclose(filehandle), "_lclose complains\n" ); - - find = FindFirstFileA( filename, &search_results ); - ok( INVALID_HANDLE_VALUE != find, "should STILL be able to find file\n" ); - FindClose( find ); - - ret = DeleteFileA( filename ); - ok( ret, "DeleteFile failed (%d)\n", GetLastError( ) ); - - filehandle=_lcreat (slashname, 0); /* illegal name */ - if (HFILE_ERROR==filehandle) { - err=GetLastError (); - ok (err==ERROR_INVALID_NAME || err==ERROR_PATH_NOT_FOUND, - "creating file \"%s\" failed with error %d\n", slashname, err); - } else { /* only NT succeeds */ - _lclose(filehandle); - find=FindFirstFileA (slashname, &search_results); - if (INVALID_HANDLE_VALUE!=find) - { - ret = FindClose (find); - ok (0 != ret, "FindClose complains (%d)\n", GetLastError ()); - slashname[strlen(slashname)-1]=0; - ok (!strcmp (slashname, search_results.cFileName), - "found unexpected name \"%s\"\n", search_results.cFileName); - ok (FILE_ATTRIBUTE_ARCHIVE==search_results.dwFileAttributes, - "attributes of file \"%s\" are 0x%04x\n", search_results.cFileName, - search_results.dwFileAttributes); - } - ret = DeleteFileA( slashname ); - ok( ret, "DeleteFile failed (%d)\n", GetLastError( ) ); - } - - filehandle=_lcreat (filename, 8); /* illegal attribute */ - if (HFILE_ERROR==filehandle) - ok (0, "couldn't create volume label \"%s\"\n", filename); - else { - _lclose(filehandle); - find=FindFirstFileA (filename, &search_results); - if (INVALID_HANDLE_VALUE==find) - ok (0, "file \"%s\" not found\n", filename); - else { - ret = FindClose(find); - ok ( 0 != ret, "FindClose complains (%d)\n", GetLastError ()); - ok (!strcmp (filename, search_results.cFileName), - "found unexpected name \"%s\"\n", search_results.cFileName); - search_results.dwFileAttributes &= ~FILE_ATTRIBUTE_NOT_CONTENT_INDEXED; - ok (FILE_ATTRIBUTE_ARCHIVE==search_results.dwFileAttributes, - "attributes of file \"%s\" are 0x%04x\n", search_results.cFileName, - search_results.dwFileAttributes); - } - ret = DeleteFileA( filename ); - ok( ret, "DeleteFile failed (%d)\n", GetLastError( ) ); - } -} - - -static void test__llseek( void ) -{ - INT i; - HFILE filehandle; - char buffer[1]; - LONG bytes_read; - BOOL ret; - - filehandle = _lcreat( filename, 0 ); - if (filehandle == HFILE_ERROR) - { - ok(0,"couldn't create file \"%s\" (err=%d)\n",filename,GetLastError()); - return; - } - - for (i = 0; i < 400; i++) - { - ok( _hwrite( filehandle, sillytext, strlen( sillytext ) ) != -1, "_hwrite complains\n" ); - } - ok( _llseek( filehandle, 400 * strlen( sillytext ), FILE_CURRENT ) != -1, "should be able to seek\n" ); - ok( _llseek( filehandle, 27 + 35 * strlen( sillytext ), FILE_BEGIN ) != -1, "should be able to seek\n" ); - - bytes_read = _hread( filehandle, buffer, 1); - ok( 1 == bytes_read, "file read size error\n" ); - ok( buffer[0] == sillytext[27], "_llseek error, it got lost seeking\n" ); - ok( _llseek( filehandle, -400 * (LONG)strlen( sillytext ), FILE_END ) != -1, "should be able to seek\n" ); - - bytes_read = _hread( filehandle, buffer, 1); - ok( 1 == bytes_read, "file read size error\n" ); - ok( buffer[0] == sillytext[0], "_llseek error, it got lost seeking\n" ); - ok( _llseek( filehandle, 1000000, FILE_END ) != -1, "should be able to seek past file; poor, poor Windows programmers\n" ); - ok( HFILE_ERROR != _lclose(filehandle), "_lclose complains\n" ); - - ret = DeleteFileA( filename ); - ok( ret, "DeleteFile failed (%d)\n", GetLastError( ) ); -} - - -static void test__llopen( void ) -{ - HFILE filehandle; - UINT bytes_read; - char buffer[10000]; - BOOL ret; - - filehandle = _lcreat( filename, 0 ); - if (filehandle == HFILE_ERROR) - { - ok(0,"couldn't create file \"%s\" (err=%d)\n",filename,GetLastError()); - return; - } - - ok( HFILE_ERROR != _hwrite( filehandle, sillytext, strlen( sillytext ) ), "_hwrite complains\n" ); - ok( HFILE_ERROR != _lclose(filehandle), "_lclose complains\n" ); - - filehandle = _lopen( filename, OF_READ ); - ok( HFILE_ERROR == _hwrite( filehandle, sillytext, strlen( sillytext ) ), "_hwrite shouldn't be able to write!\n" ); - bytes_read = _hread( filehandle, buffer, strlen( sillytext ) ); - ok( strlen( sillytext ) == bytes_read, "file read size error\n" ); - ok( HFILE_ERROR != _lclose(filehandle), "_lclose complains\n" ); - - filehandle = _lopen( filename, OF_READWRITE ); - bytes_read = _hread( filehandle, buffer, 2 * strlen( sillytext ) ); - ok( strlen( sillytext ) == bytes_read, "file read size error\n" ); - ok( HFILE_ERROR != _hwrite( filehandle, sillytext, strlen( sillytext ) ), "_hwrite should write just fine\n" ); - ok( HFILE_ERROR != _lclose(filehandle), "_lclose complains\n" ); - - filehandle = _lopen( filename, OF_WRITE ); - ok( HFILE_ERROR == _hread( filehandle, buffer, 1 ), "you should only be able to write this file\n" ); - ok( HFILE_ERROR != _hwrite( filehandle, sillytext, strlen( sillytext ) ), "_hwrite should write just fine\n" ); - ok( HFILE_ERROR != _lclose(filehandle), "_lclose complains\n" ); - - ret = DeleteFileA( filename ); - ok( ret, "DeleteFile failed (%d)\n", GetLastError( ) ); - /* TODO - add tests for the SHARE modes - use two processes to pull this one off */ -} - - -static void test__lread( void ) -{ - HFILE filehandle; - char buffer[10000]; - UINT bytes_read; - UINT bytes_wanted; - UINT i; - BOOL ret; - - filehandle = _lcreat( filename, 0 ); - if (filehandle == HFILE_ERROR) - { - ok(0,"couldn't create file \"%s\" (err=%d)\n",filename,GetLastError()); - return; - } - - ok( HFILE_ERROR != _hwrite( filehandle, sillytext, strlen( sillytext ) ), "_hwrite complains\n" ); - - ok( HFILE_ERROR != _lclose(filehandle), "_lclose complains\n" ); - - filehandle = _lopen( filename, OF_READ ); - - ok( HFILE_ERROR != filehandle, "couldn't open file \"%s\" again (err=%d)\n", filename, GetLastError()); - - bytes_read = _lread( filehandle, buffer, 2 * strlen( sillytext ) ); - - ok( lstrlenA( sillytext ) == bytes_read, "file read size error\n" ); - - for (bytes_wanted = 0; bytes_wanted < strlen( sillytext ); bytes_wanted++) - { - ok( 0 == _llseek( filehandle, 0, FILE_BEGIN ), "_llseek complains\n" ); - ok( _lread( filehandle, buffer, bytes_wanted ) == bytes_wanted, "erratic _hread return value\n" ); - for (i = 0; i < bytes_wanted; i++) - { - ok( buffer[i] == sillytext[i], "that's not what's written\n" ); - } - } - - ok( HFILE_ERROR != _lclose(filehandle), "_lclose complains\n" ); - - ret = DeleteFileA( filename ); - ok( ret, "DeleteFile failed (%d)\n", GetLastError( ) ); -} - - -static void test__lwrite( void ) -{ - HFILE filehandle; - char buffer[10000]; - UINT bytes_read; - UINT bytes_written; - UINT blocks; - INT i; - char *contents; - HLOCAL memory_object; - char checksum[1]; - BOOL ret; - - filehandle = _lcreat( filename, 0 ); - if (filehandle == HFILE_ERROR) - { - ok(0,"couldn't create file \"%s\" (err=%d)\n",filename,GetLastError()); - return; - } - - ok( HFILE_ERROR != _lwrite( filehandle, "", 0 ), "_hwrite complains\n" ); - - ok( HFILE_ERROR != _lclose(filehandle), "_lclose complains\n" ); - - filehandle = _lopen( filename, OF_READ ); - - bytes_read = _hread( filehandle, buffer, 1); - - ok( 0 == bytes_read, "file read size error\n" ); - - ok( HFILE_ERROR != _lclose(filehandle), "_lclose complains\n" ); - - filehandle = _lopen( filename, OF_READWRITE ); - - bytes_written = 0; - checksum[0] = '\0'; - srand( (unsigned)time( NULL ) ); - for (blocks = 0; blocks < 100; blocks++) - { - for (i = 0; i < (INT)sizeof( buffer ); i++) - { - buffer[i] = rand( ); - checksum[0] = checksum[0] + buffer[i]; - } - ok( HFILE_ERROR != _lwrite( filehandle, buffer, sizeof( buffer ) ), "_hwrite complains\n" ); - bytes_written = bytes_written + sizeof( buffer ); - } - - ok( HFILE_ERROR != _lwrite( filehandle, checksum, 1 ), "_hwrite complains\n" ); - bytes_written++; - - ok( HFILE_ERROR != _lclose( filehandle ), "_lclose complains\n" ); - - memory_object = LocalAlloc( LPTR, bytes_written ); - - ok( 0 != memory_object, "LocalAlloc fails, could be out of memory\n" ); - - contents = LocalLock( memory_object ); - ok( NULL != contents, "LocalLock whines\n" ); - - filehandle = _lopen( filename, OF_READ ); - - contents = LocalLock( memory_object ); - ok( NULL != contents, "LocalLock whines\n" ); - - ok( bytes_written == _hread( filehandle, contents, bytes_written), "read length differ from write length\n" ); - - checksum[0] = '\0'; - i = 0; - do - { - checksum[0] += contents[i]; - i++; - } - while (i < bytes_written - 1); - - ok( checksum[0] == contents[i], "stored checksum differ from computed checksum\n" ); - - ok( HFILE_ERROR != _lclose( filehandle ), "_lclose complains\n" ); - - ret = DeleteFileA( filename ); - ok( ret, "DeleteFile failed (%d)\n", GetLastError( ) ); - - LocalFree( contents ); -} - -static void test_CopyFileA(void) -{ - char temp_path[MAX_PATH]; - char source[MAX_PATH], dest[MAX_PATH]; - static const char prefix[] = "pfx"; - HANDLE hfile; - HANDLE hmapfile; - FILETIME ft1, ft2; - char buf[10]; - DWORD ret; - BOOL retok; - - ret = GetTempPathA(MAX_PATH, temp_path); - ok(ret != 0, "GetTempPathA error %d\n", GetLastError()); - ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n"); - - ret = GetTempFileNameA(temp_path, prefix, 0, source); - ok(ret != 0, "GetTempFileNameA error %d\n", GetLastError()); - - ret = MoveFileA(source, source); - todo_wine ok(ret, "MoveFileA: failed, error %d\n", GetLastError()); - - /* copying a file to itself must fail */ - retok = CopyFileA(source, source, FALSE); - ok( !retok && (GetLastError() == ERROR_SHARING_VIOLATION || broken(GetLastError() == ERROR_FILE_EXISTS) /* Win 9x */), - "copying a file to itself didn't fail (ret=%d, err=%d)\n", retok, GetLastError()); - - /* make the source have not zero size */ - hfile = CreateFileA(source, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0 ); - ok(hfile != INVALID_HANDLE_VALUE, "failed to open source file\n"); - retok = WriteFile(hfile, prefix, sizeof(prefix), &ret, NULL ); - ok( retok && ret == sizeof(prefix), - "WriteFile error %d\n", GetLastError()); - ok(GetFileSize(hfile, NULL) == sizeof(prefix), "source file has wrong size\n"); - /* get the file time and change it to prove the difference */ - ret = GetFileTime(hfile, NULL, NULL, &ft1); - ok( ret, "GetFileTime error %d\n", GetLastError()); - ft1.dwLowDateTime -= 600000000; /* 60 second */ - ret = SetFileTime(hfile, NULL, NULL, &ft1); - ok( ret, "SetFileTime error %d\n", GetLastError()); - GetFileTime(hfile, NULL, NULL, &ft1); /* get the actual time back */ - CloseHandle(hfile); - - ret = GetTempFileNameA(temp_path, prefix, 0, dest); - ok(ret != 0, "GetTempFileNameA error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = CopyFileA(source, dest, TRUE); - ok(!ret && GetLastError() == ERROR_FILE_EXISTS, - "CopyFileA: unexpected error %d\n", GetLastError()); - - ret = CopyFileA(source, dest, FALSE); - ok(ret, "CopyFileA: error %d\n", GetLastError()); - - /* copying from a read-locked source fails */ - hfile = CreateFileA(source, GENERIC_READ, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "failed to open source file, error %d\n", GetLastError()); - retok = CopyFileA(source, dest, FALSE); - ok(!retok && GetLastError() == ERROR_SHARING_VIOLATION, - "copying from a read-locked file succeeded when it shouldn't have\n"); - /* in addition, the source is opened before the destination */ - retok = CopyFileA("25f99d3b-4ba4-4f66-88f5-2906886993cc", dest, FALSE); - ok(!retok && GetLastError() == ERROR_FILE_NOT_FOUND, - "copying from a file that doesn't exist failed in an unexpected way (ret=%d, err=%d)\n", retok, GetLastError()); - CloseHandle(hfile); - - /* copying from a r+w opened, r shared source succeeds */ - hfile = CreateFileA(source, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "failed to open source file, error %d\n", GetLastError()); - retok = CopyFileA(source, dest, FALSE); - ok(retok, - "copying from an r+w opened and r shared file failed (ret=%d, err=%d)\n", retok, GetLastError()); - CloseHandle(hfile); - - /* copying from a delete-locked source is unreliable */ - hfile = CreateFileA(source, DELETE, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "failed to open source file, error %d\n", GetLastError()); - retok = CopyFileA(source, dest, FALSE); - ok((!retok && GetLastError() == ERROR_SHARING_VIOLATION) || broken(retok) /* 98, Vista, 2k8, 7 */, - "copying from a delete-locked file failed (ret=%d, err=%d)\n", retok, GetLastError()); - CloseHandle(hfile); - - /* copying to a write-locked destination fails */ - hfile = CreateFileA(dest, GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %d\n", GetLastError()); - retok = CopyFileA(source, dest, FALSE); - ok(!retok && GetLastError() == ERROR_SHARING_VIOLATION, - "copying to a write-locked file didn't fail (ret=%d, err=%d)\n", retok, GetLastError()); - CloseHandle(hfile); - - /* copying to a r+w opened, w shared destination mostly succeeds */ - hfile = CreateFileA(dest, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %d\n", GetLastError()); - retok = CopyFileA(source, dest, FALSE); - ok(retok || broken(!retok && GetLastError() == ERROR_SHARING_VIOLATION) /* Win 9x */, - "copying to a r+w opened and w shared file failed (ret=%d, err=%d)\n", retok, GetLastError()); - CloseHandle(hfile); - - /* copying to a delete-locked destination fails, even when the destination is delete-shared */ - hfile = CreateFileA(dest, DELETE, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE || broken(GetLastError() == ERROR_INVALID_PARAMETER) /* Win 9x */, - "failed to open destination file, error %d\n", GetLastError()); - if (hfile != INVALID_HANDLE_VALUE) - { - retok = CopyFileA(source, dest, FALSE); - ok(!retok && GetLastError() == ERROR_SHARING_VIOLATION, - "copying to a delete-locked shared file didn't fail (ret=%d, err=%d)\n", retok, GetLastError()); - CloseHandle(hfile); - } - - /* copy to a file that's opened the way Wine opens the source */ - hfile = CreateFileA(dest, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %d\n", GetLastError()); - retok = CopyFileA(source, dest, FALSE); - ok(retok || broken(GetLastError() == ERROR_SHARING_VIOLATION) /* Win 9x */, - "copying to a file opened the way Wine opens the source failed (ret=%d, err=%d)\n", retok, GetLastError()); - CloseHandle(hfile); - - /* make sure that destination has correct size */ - hfile = CreateFileA(dest, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file\n"); - ret = GetFileSize(hfile, NULL); - ok(ret == sizeof(prefix), "destination file has wrong size %d\n", ret); - - /* make sure that destination has the same filetime */ - ret = GetFileTime(hfile, NULL, NULL, &ft2); - ok( ret, "GetFileTime error %d\n", GetLastError()); - ok(CompareFileTime(&ft1, &ft2) == 0, "destination file has wrong filetime\n"); - - SetLastError(0xdeadbeef); - ret = CopyFileA(source, dest, FALSE); - ok(!ret && GetLastError() == ERROR_SHARING_VIOLATION, - "CopyFileA: ret = %d, unexpected error %d\n", ret, GetLastError()); - - /* make sure that destination still has correct size */ - ret = GetFileSize(hfile, NULL); - ok(ret == sizeof(prefix), "destination file has wrong size %d\n", ret); - retok = ReadFile(hfile, buf, sizeof(buf), &ret, NULL); - ok( retok && ret == sizeof(prefix), - "ReadFile: error %d\n", GetLastError()); - ok(!memcmp(prefix, buf, sizeof(prefix)), "buffer contents mismatch\n"); - - /* check error on copying over a mapped file that was opened with FILE_SHARE_READ */ - hmapfile = CreateFileMapping(hfile, NULL, PAGE_READONLY | SEC_COMMIT, 0, 0, NULL); - ok(hmapfile != NULL, "CreateFileMapping: error %d\n", GetLastError()); - - ret = CopyFileA(source, dest, FALSE); - ok(!ret && GetLastError() == ERROR_SHARING_VIOLATION, - "CopyFileA with mapped dest file: expected ERROR_SHARING_VIOLATION, got %d\n", GetLastError()); - - CloseHandle(hmapfile); - CloseHandle(hfile); - - hfile = CreateFileA(dest, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file\n"); - - /* check error on copying over a mapped file that was opened with FILE_SHARE_WRITE */ - hmapfile = CreateFileMapping(hfile, NULL, PAGE_READONLY | SEC_COMMIT, 0, 0, NULL); - ok(hmapfile != NULL, "CreateFileMapping: error %d\n", GetLastError()); - - ret = CopyFileA(source, dest, FALSE); - ok(!ret, "CopyFileA: expected failure\n"); - ok(GetLastError() == ERROR_USER_MAPPED_FILE || - broken(GetLastError() == ERROR_SHARING_VIOLATION), /* Win9x */ - "CopyFileA with mapped dest file: expected ERROR_USER_MAPPED_FILE, got %d\n", GetLastError()); - - CloseHandle(hmapfile); - CloseHandle(hfile); - - ret = DeleteFileA(source); - ok(ret, "DeleteFileA: error %d\n", GetLastError()); - ret = DeleteFileA(dest); - ok(ret, "DeleteFileA: error %d\n", GetLastError()); -} - -static void test_CopyFileW(void) -{ - WCHAR temp_path[MAX_PATH]; - WCHAR source[MAX_PATH], dest[MAX_PATH]; - static const WCHAR prefix[] = {'p','f','x',0}; - DWORD ret; - - ret = GetTempPathW(MAX_PATH, temp_path); - if (ret == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("GetTempPathW is not available\n"); - return; - } - ok(ret != 0, "GetTempPathW error %d\n", GetLastError()); - ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n"); - - ret = GetTempFileNameW(temp_path, prefix, 0, source); - ok(ret != 0, "GetTempFileNameW error %d\n", GetLastError()); - - ret = GetTempFileNameW(temp_path, prefix, 0, dest); - ok(ret != 0, "GetTempFileNameW error %d\n", GetLastError()); - - ret = CopyFileW(source, dest, TRUE); - ok(!ret && GetLastError() == ERROR_FILE_EXISTS, - "CopyFileW: unexpected error %d\n", GetLastError()); - - ret = CopyFileW(source, dest, FALSE); - ok(ret, "CopyFileW: error %d\n", GetLastError()); - - ret = DeleteFileW(source); - ok(ret, "DeleteFileW: error %d\n", GetLastError()); - ret = DeleteFileW(dest); - ok(ret, "DeleteFileW: error %d\n", GetLastError()); -} - - -/* - * Debugging routine to dump a buffer in a hexdump-like fashion. - */ -static void dumpmem(unsigned char *mem, int len) -{ - int x = 0; - char hex[49], *p; - char txt[17], *c; - - while (x < len) - { - p = hex; - c = txt; - do { - p += sprintf(p, "%02hhx ", mem[x]); - *c++ = (mem[x] >= 32 && mem[x] <= 127) ? mem[x] : '.'; - } while (++x % 16 && x < len); - *c = '\0'; - trace("%04x: %-48s- %s\n", x, hex, txt); - } -} - -static void test_CreateFileA(void) -{ - HANDLE hFile; - char temp_path[MAX_PATH], dirname[MAX_PATH]; - char filename[MAX_PATH]; - static const char prefix[] = "pfx"; - char windowsdir[MAX_PATH]; - char Volume_1[MAX_PATH]; - unsigned char buffer[512]; - char directory[] = "removeme"; - static const char nt_drive[] = "\\\\?\\A:"; - DWORD i, ret, len; - struct test_list p[] = { - {"", ERROR_PATH_NOT_FOUND, -1, FILE_ATTRIBUTE_NORMAL, TRUE }, /* dir as file w \ */ - {"", ERROR_SUCCESS, ERROR_PATH_NOT_FOUND, FILE_FLAG_BACKUP_SEMANTICS, FALSE }, /* dir as dir w \ */ - {"a", ERROR_FILE_NOT_FOUND, -1, FILE_ATTRIBUTE_NORMAL, FALSE }, /* non-exist file */ - {"a\\", ERROR_FILE_NOT_FOUND, ERROR_PATH_NOT_FOUND, FILE_ATTRIBUTE_NORMAL, FALSE }, /* non-exist dir */ - {"removeme", ERROR_ACCESS_DENIED, -1, FILE_ATTRIBUTE_NORMAL, FALSE }, /* exist dir w/o \ */ - {"removeme\\", ERROR_PATH_NOT_FOUND, -1, FILE_ATTRIBUTE_NORMAL, TRUE }, /* exst dir w \ */ - {"c:", ERROR_ACCESS_DENIED, ERROR_PATH_NOT_FOUND, FILE_ATTRIBUTE_NORMAL, FALSE }, /* device in file namespace */ - {"c:", ERROR_SUCCESS, ERROR_PATH_NOT_FOUND, FILE_FLAG_BACKUP_SEMANTICS, FALSE }, /* device in file namespace as dir */ - {"c:\\", ERROR_PATH_NOT_FOUND, ERROR_ACCESS_DENIED, FILE_ATTRIBUTE_NORMAL, TRUE }, /* root dir w \ */ - {"c:\\", ERROR_SUCCESS, ERROR_ACCESS_DENIED, FILE_FLAG_BACKUP_SEMANTICS, FALSE }, /* root dir w \ as dir */ - {"\\\\?\\c:", ERROR_SUCCESS, ERROR_BAD_NETPATH, FILE_ATTRIBUTE_NORMAL,FALSE }, /* dev namespace drive */ - {"\\\\?\\c:\\", ERROR_PATH_NOT_FOUND, ERROR_BAD_NETPATH, FILE_ATTRIBUTE_NORMAL, TRUE }, /* dev namespace drive w \ */ - {NULL, 0, -1, 0, FALSE} - }; - BY_HANDLE_FILE_INFORMATION Finfo; - - ret = GetTempPathA(MAX_PATH, temp_path); - ok(ret != 0, "GetTempPathA error %d\n", GetLastError()); - ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n"); - - ret = GetTempFileNameA(temp_path, prefix, 0, filename); - ok(ret != 0, "GetTempFileNameA error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - hFile = CreateFileA(filename, GENERIC_READ, 0, NULL, - CREATE_NEW, FILE_FLAG_RANDOM_ACCESS, 0); - ok(hFile == INVALID_HANDLE_VALUE && GetLastError() == ERROR_FILE_EXISTS, - "CREATE_NEW should fail if file exists and last error value should be ERROR_FILE_EXISTS\n"); - - SetLastError(0xdeadbeef); - hFile = CreateFileA(filename, GENERIC_READ, FILE_SHARE_READ, NULL, - CREATE_ALWAYS, FILE_FLAG_RANDOM_ACCESS, 0); - ok(hFile != INVALID_HANDLE_VALUE && GetLastError() == ERROR_ALREADY_EXISTS, - "hFile %p, last error %u\n", hFile, GetLastError()); - - CloseHandle(hFile); - - SetLastError(0xdeadbeef); - hFile = CreateFileA(filename, GENERIC_READ, FILE_SHARE_READ, NULL, - OPEN_ALWAYS, FILE_FLAG_RANDOM_ACCESS, 0); - ok(hFile != INVALID_HANDLE_VALUE && GetLastError() == ERROR_ALREADY_EXISTS, - "hFile %p, last error %u\n", hFile, GetLastError()); - - CloseHandle(hFile); - - ret = DeleteFileA(filename); - ok(ret, "DeleteFileA: error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - hFile = CreateFileA(filename, GENERIC_READ, FILE_SHARE_READ, NULL, - OPEN_ALWAYS, FILE_FLAG_RANDOM_ACCESS, 0); - ok(hFile != INVALID_HANDLE_VALUE && GetLastError() == 0, - "hFile %p, last error %u\n", hFile, GetLastError()); - - CloseHandle(hFile); - - ret = DeleteFileA(filename); - ok(ret, "DeleteFileA: error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - hFile = CreateFileA("c:\\*.*", GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - ok(hFile == INVALID_HANDLE_VALUE, "hFile should have been INVALID_HANDLE_VALUE\n"); - ok(GetLastError() == ERROR_INVALID_NAME || - broken(GetLastError() == ERROR_FILE_NOT_FOUND), /* Win98 */ - "LastError should have been ERROR_INVALID_NAME or ERROR_FILE_NOT_FOUND but got %u\n", GetLastError()); - - /* get windows drive letter */ - ret = GetWindowsDirectory(windowsdir, sizeof(windowsdir)); - ok(ret < sizeof(windowsdir), "windowsdir is abnormally long!\n"); - ok(ret != 0, "GetWindowsDirectory: error %d\n", GetLastError()); - - /* test error return codes from CreateFile for some cases */ - ret = GetTempPathA(MAX_PATH, temp_path); - ok(ret != 0, "GetTempPathA error %d\n", GetLastError()); - strcpy(dirname, temp_path); - strcat(dirname, directory); - ret = CreateDirectory(dirname, NULL); - ok( ret, "Createdirectory failed, gle=%d\n", GetLastError() ); - /* set current drive & directory to known location */ - SetCurrentDirectoryA( temp_path ); - i = 0; - while (p[i].file) - { - filename[0] = 0; - /* update the drive id in the table entry with the current one */ - if (p[i].file[1] == ':') - { - strcpy(filename, p[i].file); - filename[0] = windowsdir[0]; - } - else if (p[i].file[0] == '\\' && p[i].file[5] == ':') - { - strcpy(filename, p[i].file); - filename[4] = windowsdir[0]; - } - else - { - /* prefix the table entry with the current temp directory */ - strcpy(filename, temp_path); - strcat(filename, p[i].file); - } - hFile = CreateFileA( filename, GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, OPEN_EXISTING, - p[i].options, NULL ); - /* if we get ACCESS_DENIED when we do not expect it, assume - * no access to the volume - */ - if (hFile == INVALID_HANDLE_VALUE && - GetLastError() == ERROR_ACCESS_DENIED && - p[i].err != ERROR_ACCESS_DENIED) - { - if (p[i].todo_flag) - skip("Either no authority to volume, or is todo_wine for %s err=%d should be %d\n", filename, GetLastError(), p[i].err); - else - skip("Do not have authority to access volumes. Test for %s skipped\n", filename); - } - /* otherwise validate results with expectations */ - else if (p[i].todo_flag) - todo_wine ok( - (hFile == INVALID_HANDLE_VALUE && - (p[i].err == GetLastError() || p[i].err2 == GetLastError())) || - (hFile != INVALID_HANDLE_VALUE && p[i].err == ERROR_SUCCESS), - "CreateFileA failed on %s, hFile %p, err=%u, should be %u\n", - filename, hFile, GetLastError(), p[i].err); - else - ok( - (hFile == INVALID_HANDLE_VALUE && - (p[i].err == GetLastError() || p[i].err2 == GetLastError())) || - (hFile != INVALID_HANDLE_VALUE && p[i].err == ERROR_SUCCESS), - "CreateFileA failed on %s, hFile %p, err=%u, should be %u\n", - filename, hFile, GetLastError(), p[i].err); - if (hFile != INVALID_HANDLE_VALUE) - CloseHandle( hFile ); - i++; - } - ret = RemoveDirectoryA(dirname); - ok(ret, "RemoveDirectoryA: error %d\n", GetLastError()); - - - /* test opening directory as a directory */ - hFile = CreateFileA( temp_path, GENERIC_READ, - FILE_SHARE_READ, - NULL, - OPEN_EXISTING, - FILE_FLAG_BACKUP_SEMANTICS, NULL ); - if (hFile != INVALID_HANDLE_VALUE && GetLastError() != ERROR_PATH_NOT_FOUND) - { - ok(hFile != INVALID_HANDLE_VALUE && GetLastError() == ERROR_SUCCESS, - "CreateFileA did not work, last error %u on volume <%s>\n", - GetLastError(), temp_path ); - - if (hFile != INVALID_HANDLE_VALUE) - { - ret = GetFileInformationByHandle( hFile, &Finfo ); - if (ret) - { - ok(Finfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY, - "CreateFileA probably did not open temp directory %s correctly\n file information does not include FILE_ATTRIBUTE_DIRECTORY, actual=0x%08x\n", - temp_path, Finfo.dwFileAttributes); - } - CloseHandle( hFile ); - } - } - else - skip("Probable Win9x, got ERROR_PATH_NOT_FOUND w/ FILE_FLAG_BACKUP_SEMANTICS or %s\n", temp_path); - - - /* *** Test opening volumes/devices using drive letter *** */ - - /* test using drive letter in non-rewrite format without trailing \ */ - /* this should work */ - strcpy(filename, nt_drive); - filename[4] = windowsdir[0]; - hFile = CreateFileA( filename, GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL | FILE_FLAG_NO_BUFFERING, NULL ); - if (hFile != INVALID_HANDLE_VALUE || - (GetLastError() != ERROR_ACCESS_DENIED && GetLastError() != ERROR_BAD_NETPATH)) - { - /* if we have adm rights to volume, then try rest of tests */ - ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA did not open %s, last error=%u\n", - filename, GetLastError()); - if (hFile != INVALID_HANDLE_VALUE) - { - /* if we opened the volume/device, try to read it. Since it */ - /* opened, we should be able to read it. We don't care about*/ - /* what the data is at this time. */ - len = 512; - ret = ReadFile( hFile, buffer, len, &len, NULL ); - todo_wine ok(ret, "Failed to read volume, last error %u, %u, for %s\n", - GetLastError(), ret, filename); - if (ret) - { - trace("buffer is\n"); - dumpmem(buffer, 64); - } - CloseHandle( hFile ); - } - - /* test using drive letter with trailing \ and in non-rewrite */ - /* this should not work */ - strcpy(filename, nt_drive); - filename[4] = windowsdir[0]; - strcat( filename, "\\" ); - hFile = CreateFileA( filename, GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL | FILE_FLAG_NO_BUFFERING, NULL ); - todo_wine - ok(hFile == INVALID_HANDLE_VALUE && GetLastError() == ERROR_PATH_NOT_FOUND, - "CreateFileA should have returned ERROR_PATH_NOT_FOUND on %s, but got %u\n", - filename, GetLastError()); - if (hFile != INVALID_HANDLE_VALUE) - CloseHandle( hFile ); - - /* test using temp path with trailing \ and in non-rewrite as dir */ - /* this should work */ - strcpy(filename, nt_drive); - filename[4] = 0; - strcat( filename, temp_path ); - hFile = CreateFileA( filename, GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, OPEN_EXISTING, - FILE_FLAG_BACKUP_SEMANTICS, NULL ); - ok(hFile != INVALID_HANDLE_VALUE, - "CreateFileA should have worked on %s, but got %u\n", - filename, GetLastError()); - if (hFile != INVALID_HANDLE_VALUE) - CloseHandle( hFile ); - - /* test using drive letter without trailing \ and in device ns */ - /* this should work */ - strcpy(filename, nt_drive); - filename[4] = windowsdir[0]; - filename[2] = '.'; - hFile = CreateFileA( filename, GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL | FILE_FLAG_NO_BUFFERING, NULL ); - ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA did not open %s, last error=%u\n", - filename, GetLastError()); - if (hFile != INVALID_HANDLE_VALUE) - CloseHandle( hFile ); - } - /* If we see ERROR_BAD_NETPATH then on Win9x or WinME, so skip */ - else if (GetLastError() == ERROR_BAD_NETPATH) - skip("Probable Win9x, got ERROR_BAD_NETPATH (53)\n"); - else - skip("Do not have authority to access volumes. Tests skipped\n"); - - - /* *** Test opening volumes/devices using GUID *** */ - - if (pGetVolumeNameForVolumeMountPointA) - { - strcpy(filename, "c:\\"); - filename[0] = windowsdir[0]; - ret = pGetVolumeNameForVolumeMountPointA( filename, Volume_1, MAX_PATH ); - ok(ret, "GetVolumeNameForVolumeMountPointA failed, for %s, last error=%d\n", filename, GetLastError()); - if (ret) - { - ok(strlen(Volume_1) == 49, "GetVolumeNameForVolumeMountPointA returned wrong length name <%s>\n", Volume_1); - - /* test the result of opening a unique volume name (GUID) - * with the trailing \ - * this should error out - */ - strcpy(filename, Volume_1); - hFile = CreateFileA( filename, GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL | FILE_FLAG_NO_BUFFERING, NULL ); - todo_wine - ok(hFile == INVALID_HANDLE_VALUE, - "CreateFileA should not have opened %s, hFile %p\n", - filename, hFile); - todo_wine - ok(hFile == INVALID_HANDLE_VALUE && GetLastError() == ERROR_PATH_NOT_FOUND, - "CreateFileA should have returned ERROR_PATH_NOT_FOUND on %s, but got %u\n", - filename, GetLastError()); - if (hFile != INVALID_HANDLE_VALUE) - CloseHandle( hFile ); - - /* test the result of opening a unique volume name (GUID) - * with the temp path string as dir - * this should work - */ - strcpy(filename, Volume_1); - strcat(filename, temp_path+3); - hFile = CreateFileA( filename, GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, OPEN_EXISTING, - FILE_FLAG_BACKUP_SEMANTICS, NULL ); - todo_wine - ok(hFile != INVALID_HANDLE_VALUE, - "CreateFileA should have opened %s, but got %u\n", - filename, GetLastError()); - if (hFile != INVALID_HANDLE_VALUE) - CloseHandle( hFile ); - - /* test the result of opening a unique volume name (GUID) - * without the trailing \ and in device namespace - * this should work - */ - strcpy(filename, Volume_1); - filename[2] = '.'; - filename[48] = 0; - hFile = CreateFileA( filename, GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL | FILE_FLAG_NO_BUFFERING, NULL ); - if (hFile != INVALID_HANDLE_VALUE || GetLastError() != ERROR_ACCESS_DENIED) - { - /* if we have adm rights to volume, then try rest of tests */ - ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA did not open %s, last error=%u\n", - filename, GetLastError()); - if (hFile != INVALID_HANDLE_VALUE) - { - /* if we opened the volume/device, try to read it. Since it */ - /* opened, we should be able to read it. We don't care about*/ - /* what the data is at this time. */ - len = 512; - ret = ReadFile( hFile, buffer, len, &len, NULL ); - todo_wine ok(ret, "Failed to read volume, last error %u, %u, for %s\n", - GetLastError(), ret, filename); - if (ret) - { - trace("buffer is\n"); - dumpmem(buffer, 64); - } - CloseHandle( hFile ); - } - } - else - skip("Do not have authority to access volumes. Tests skipped\n"); - } - else - win_skip("GetVolumeNameForVolumeMountPointA not functioning\n"); - } - else - win_skip("GetVolumeNameForVolumeMountPointA not found\n"); -} - -static void test_CreateFileW(void) -{ - HANDLE hFile; - WCHAR temp_path[MAX_PATH]; - WCHAR filename[MAX_PATH]; - static const WCHAR emptyW[]={'\0'}; - static const WCHAR prefix[] = {'p','f','x',0}; - static const WCHAR bogus[] = { '\\', '\\', '.', '\\', 'B', 'O', 'G', 'U', 'S', 0 }; - DWORD ret; - - ret = GetTempPathW(MAX_PATH, temp_path); - if (ret == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("GetTempPathW is not available\n"); - return; - } - ok(ret != 0, "GetTempPathW error %d\n", GetLastError()); - ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n"); - - ret = GetTempFileNameW(temp_path, prefix, 0, filename); - ok(ret != 0, "GetTempFileNameW error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - hFile = CreateFileW(filename, GENERIC_READ, 0, NULL, - CREATE_NEW, FILE_FLAG_RANDOM_ACCESS, 0); - ok(hFile == INVALID_HANDLE_VALUE && GetLastError() == ERROR_FILE_EXISTS, - "CREATE_NEW should fail if file exists and last error value should be ERROR_FILE_EXISTS\n"); - - SetLastError(0xdeadbeef); - hFile = CreateFileW(filename, GENERIC_READ, FILE_SHARE_READ, NULL, - CREATE_ALWAYS, FILE_FLAG_RANDOM_ACCESS, 0); - ok(hFile != INVALID_HANDLE_VALUE && GetLastError() == ERROR_ALREADY_EXISTS, - "hFile %p, last error %u\n", hFile, GetLastError()); - - CloseHandle(hFile); - - SetLastError(0xdeadbeef); - hFile = CreateFileW(filename, GENERIC_READ, FILE_SHARE_READ, NULL, - OPEN_ALWAYS, FILE_FLAG_RANDOM_ACCESS, 0); - ok(hFile != INVALID_HANDLE_VALUE && GetLastError() == ERROR_ALREADY_EXISTS, - "hFile %p, last error %u\n", hFile, GetLastError()); - - CloseHandle(hFile); - - ret = DeleteFileW(filename); - ok(ret, "DeleteFileW: error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - hFile = CreateFileW(filename, GENERIC_READ, FILE_SHARE_READ, NULL, - OPEN_ALWAYS, FILE_FLAG_RANDOM_ACCESS, 0); - ok(hFile != INVALID_HANDLE_VALUE && GetLastError() == 0, - "hFile %p, last error %u\n", hFile, GetLastError()); - - CloseHandle(hFile); - - ret = DeleteFileW(filename); - ok(ret, "DeleteFileW: error %d\n", GetLastError()); - - if (0) - { - /* this crashes on NT4.0 */ - hFile = CreateFileW(NULL, GENERIC_READ, 0, NULL, - CREATE_NEW, FILE_FLAG_RANDOM_ACCESS, 0); - ok(hFile == INVALID_HANDLE_VALUE && GetLastError() == ERROR_PATH_NOT_FOUND, - "CreateFileW(NULL) returned ret=%p error=%u\n",hFile,GetLastError()); - } - - hFile = CreateFileW(emptyW, GENERIC_READ, 0, NULL, - CREATE_NEW, FILE_FLAG_RANDOM_ACCESS, 0); - ok(hFile == INVALID_HANDLE_VALUE && GetLastError() == ERROR_PATH_NOT_FOUND, - "CreateFileW(\"\") returned ret=%p error=%d\n",hFile,GetLastError()); - - /* test the result of opening a nonexistent driver name */ - hFile = CreateFileW(bogus, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - ok(hFile == INVALID_HANDLE_VALUE && GetLastError() == ERROR_FILE_NOT_FOUND, - "CreateFileW on invalid VxD name returned ret=%p error=%d\n",hFile,GetLastError()); - - ret = CreateDirectoryW(filename, NULL); - ok(ret == TRUE, "couldn't create temporary directory\n"); - hFile = CreateFileW(filename, GENERIC_READ | GENERIC_WRITE, 0, NULL, - OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, NULL); - ok(hFile != INVALID_HANDLE_VALUE, - "expected CreateFile to succeed on existing directory, error: %d\n", GetLastError()); - CloseHandle(hFile); - ret = RemoveDirectoryW(filename); - ok(ret, "DeleteFileW: error %d\n", GetLastError()); -} - -static void test_GetTempFileNameA(void) -{ - UINT result; - char out[MAX_PATH]; - char expected[MAX_PATH + 10]; - char windowsdir[MAX_PATH + 10]; - char windowsdrive[3]; - - result = GetWindowsDirectory(windowsdir, sizeof(windowsdir)); - ok(result < sizeof(windowsdir), "windowsdir is abnormally long!\n"); - ok(result != 0, "GetWindowsDirectory: error %d\n", GetLastError()); - - /* If the Windows directory is the root directory, it ends in backslash, not else. */ - if (strlen(windowsdir) != 3) /* As in "C:\" or "F:\" */ - { - strcat(windowsdir, "\\"); - } - - windowsdrive[0] = windowsdir[0]; - windowsdrive[1] = windowsdir[1]; - windowsdrive[2] = '\0'; - - result = GetTempFileNameA(windowsdrive, "abc", 1, out); - ok(result != 0, "GetTempFileNameA: error %d\n", GetLastError()); - ok(((out[0] == windowsdrive[0]) && (out[1] == ':')) && (out[2] == '\\'), - "GetTempFileNameA: first three characters should be %c:\\, string was actually %s\n", - windowsdrive[0], out); - - result = GetTempFileNameA(windowsdir, "abc", 2, out); - ok(result != 0, "GetTempFileNameA: error %d\n", GetLastError()); - expected[0] = '\0'; - strcat(expected, windowsdir); - strcat(expected, "abc2.tmp"); - ok(lstrcmpiA(out, expected) == 0, "GetTempFileNameA: Unexpected output \"%s\" vs \"%s\"\n", - out, expected); -} - -static void test_DeleteFileA( void ) -{ - BOOL ret; - - ret = DeleteFileA(NULL); - ok(!ret && (GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_PATH_NOT_FOUND), - "DeleteFileA(NULL) returned ret=%d error=%d\n",ret,GetLastError()); - - ret = DeleteFileA(""); - ok(!ret && (GetLastError() == ERROR_PATH_NOT_FOUND || - GetLastError() == ERROR_BAD_PATHNAME), - "DeleteFileA(\"\") returned ret=%d error=%d\n",ret,GetLastError()); - - ret = DeleteFileA("nul"); - ok(!ret && (GetLastError() == ERROR_FILE_NOT_FOUND || - GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_ACCESS_DENIED || - GetLastError() == ERROR_INVALID_FUNCTION), - "DeleteFileA(\"nul\") returned ret=%d error=%d\n",ret,GetLastError()); -} - -static void test_DeleteFileW( void ) -{ - BOOL ret; - WCHAR pathW[MAX_PATH]; - WCHAR pathsubW[MAX_PATH]; - static const WCHAR dirW[] = {'d','e','l','e','t','e','f','i','l','e',0}; - static const WCHAR subdirW[] = {'\\','s','u','b',0}; - static const WCHAR emptyW[]={'\0'}; - - ret = DeleteFileW(NULL); - if (ret == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("DeleteFileW is not available\n"); - return; - } - ok(!ret && GetLastError() == ERROR_PATH_NOT_FOUND, - "DeleteFileW(NULL) returned ret=%d error=%d\n",ret,GetLastError()); - - ret = DeleteFileW(emptyW); - ok(!ret && GetLastError() == ERROR_PATH_NOT_FOUND, - "DeleteFileW(\"\") returned ret=%d error=%d\n",ret,GetLastError()); - - /* test DeleteFile on empty directory */ - ret = GetTempPathW(MAX_PATH, pathW); - if (ret + sizeof(dirW)/sizeof(WCHAR)-1 + sizeof(subdirW)/sizeof(WCHAR)-1 >= MAX_PATH) - { - ok(0, "MAX_PATH exceeded in constructing paths\n"); - return; - } - lstrcatW(pathW, dirW); - lstrcpyW(pathsubW, pathW); - lstrcatW(pathsubW, subdirW); - ret = CreateDirectoryW(pathW, NULL); - ok(ret == TRUE, "couldn't create directory deletefile\n"); - ret = DeleteFileW(pathW); - ok(ret == FALSE, "DeleteFile should fail for empty directories\n"); - ret = RemoveDirectoryW(pathW); - ok(ret == TRUE, "expected to remove directory deletefile\n"); - - /* test DeleteFile on non-empty directory */ - ret = CreateDirectoryW(pathW, NULL); - ok(ret == TRUE, "couldn't create directory deletefile\n"); - ret = CreateDirectoryW(pathsubW, NULL); - ok(ret == TRUE, "couldn't create directory deletefile\\sub\n"); - ret = DeleteFileW(pathW); - ok(ret == FALSE, "DeleteFile should fail for non-empty directories\n"); - ret = RemoveDirectoryW(pathsubW); - ok(ret == TRUE, "expected to remove directory deletefile\\sub\n"); - ret = RemoveDirectoryW(pathW); - ok(ret == TRUE, "expected to remove directory deletefile\n"); -} - -#define IsDotDir(x) ((x[0] == '.') && ((x[1] == 0) || ((x[1] == '.') && (x[2] == 0)))) - -static void test_MoveFileA(void) -{ - char tempdir[MAX_PATH]; - char source[MAX_PATH], dest[MAX_PATH]; - static const char prefix[] = "pfx"; - HANDLE hfile; - HANDLE hmapfile; - DWORD ret; - BOOL retok; - - ret = GetTempPathA(MAX_PATH, tempdir); - ok(ret != 0, "GetTempPathA error %d\n", GetLastError()); - ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n"); - - ret = GetTempFileNameA(tempdir, prefix, 0, source); - ok(ret != 0, "GetTempFileNameA error %d\n", GetLastError()); - - ret = GetTempFileNameA(tempdir, prefix, 0, dest); - ok(ret != 0, "GetTempFileNameA error %d\n", GetLastError()); - - ret = MoveFileA(source, dest); - ok(!ret && GetLastError() == ERROR_ALREADY_EXISTS, - "MoveFileA: unexpected error %d\n", GetLastError()); - - ret = DeleteFileA(dest); - ok(ret, "DeleteFileA: error %d\n", GetLastError()); - - hfile = CreateFileA(source, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "failed to open source file\n"); - - retok = WriteFile(hfile, prefix, sizeof(prefix), &ret, NULL ); - ok( retok && ret == sizeof(prefix), - "WriteFile error %d\n", GetLastError()); - - hmapfile = CreateFileMapping(hfile, NULL, PAGE_READONLY | SEC_COMMIT, 0, 0, NULL); - ok(hmapfile != NULL, "CreateFileMapping: error %d\n", GetLastError()); - - ret = MoveFileA(source, dest); - todo_wine { - ok(!ret, "MoveFileA: expected failure\n"); - ok(GetLastError() == ERROR_SHARING_VIOLATION || - broken(GetLastError() == ERROR_ACCESS_DENIED), /* Win9x and WinMe */ - "MoveFileA: expected ERROR_SHARING_VIOLATION, got %d\n", GetLastError()); - } - - CloseHandle(hmapfile); - CloseHandle(hfile); - - /* if MoveFile succeeded, move back to dest */ - if (ret) MoveFile(dest, source); - - hfile = CreateFileA(source, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "failed to open source file\n"); - - hmapfile = CreateFileMapping(hfile, NULL, PAGE_READONLY | SEC_COMMIT, 0, 0, NULL); - ok(hmapfile != NULL, "CreateFileMapping: error %d\n", GetLastError()); - - ret = MoveFileA(source, dest); - todo_wine { - ok(!ret, "MoveFileA: expected failure\n"); - ok(GetLastError() == ERROR_SHARING_VIOLATION || - broken(GetLastError() == ERROR_ACCESS_DENIED), /* Win9x and WinMe */ - "MoveFileA: expected ERROR_SHARING_VIOLATION, got %d\n", GetLastError()); - } - - CloseHandle(hmapfile); - CloseHandle(hfile); - - /* if MoveFile succeeded, move back to dest */ - if (ret) MoveFile(dest, source); - - ret = MoveFileA(source, dest); - ok(ret, "MoveFileA: failed, error %d\n", GetLastError()); - - lstrcatA(tempdir, "Remove Me"); - ret = CreateDirectoryA(tempdir, NULL); - ok(ret == TRUE, "CreateDirectoryA failed\n"); - - lstrcpyA(source, dest); - lstrcpyA(dest, tempdir); - lstrcatA(dest, "\\wild?.*"); - /* FIXME: if we create a file with wildcards we can't delete it now that DeleteFile works correctly */ - ret = MoveFileA(source, dest); - ok(!ret, "MoveFileA: shouldn't move to wildcard file\n"); - ok(GetLastError() == ERROR_INVALID_NAME || /* NT */ - GetLastError() == ERROR_FILE_NOT_FOUND, /* Win9x */ - "MoveFileA: with wildcards, unexpected error %d\n", GetLastError()); - if (ret || (GetLastError() != ERROR_INVALID_NAME)) - { - WIN32_FIND_DATAA fd; - char temppath[MAX_PATH]; - HANDLE hFind; - - lstrcpyA(temppath, tempdir); - lstrcatA(temppath, "\\*.*"); - hFind = FindFirstFileA(temppath, &fd); - if (INVALID_HANDLE_VALUE != hFind) - { - LPSTR lpName; - do - { - lpName = fd.cAlternateFileName; - if (!lpName[0]) - lpName = fd.cFileName; - ok(IsDotDir(lpName), "MoveFileA: wildcards file created!\n"); - } - while (FindNextFileA(hFind, &fd)); - FindClose(hFind); - } - } - ret = DeleteFileA(source); - ok(ret, "DeleteFileA: error %d\n", GetLastError()); - ret = DeleteFileA(dest); - ok(!ret, "DeleteFileA: error %d\n", GetLastError()); - ret = RemoveDirectoryA(tempdir); - ok(ret, "DeleteDirectoryA: error %d\n", GetLastError()); -} - -static void test_MoveFileW(void) -{ - WCHAR temp_path[MAX_PATH]; - WCHAR source[MAX_PATH], dest[MAX_PATH]; - static const WCHAR prefix[] = {'p','f','x',0}; - DWORD ret; - - ret = GetTempPathW(MAX_PATH, temp_path); - if (ret == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("GetTempPathW is not available\n"); - return; - } - ok(ret != 0, "GetTempPathW error %d\n", GetLastError()); - ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n"); - - ret = GetTempFileNameW(temp_path, prefix, 0, source); - ok(ret != 0, "GetTempFileNameW error %d\n", GetLastError()); - - ret = GetTempFileNameW(temp_path, prefix, 0, dest); - ok(ret != 0, "GetTempFileNameW error %d\n", GetLastError()); - - ret = MoveFileW(source, dest); - ok(!ret && GetLastError() == ERROR_ALREADY_EXISTS, - "CopyFileW: unexpected error %d\n", GetLastError()); - - ret = DeleteFileW(source); - ok(ret, "DeleteFileW: error %d\n", GetLastError()); - ret = DeleteFileW(dest); - ok(ret, "DeleteFileW: error %d\n", GetLastError()); -} - -#define PATTERN_OFFSET 0x10 - -static void test_offset_in_overlapped_structure(void) -{ - HANDLE hFile; - OVERLAPPED ov; - DWORD done, offset; - BOOL rc; - BYTE buf[256], pattern[] = "TeSt"; - UINT i; - char temp_path[MAX_PATH], temp_fname[MAX_PATH]; - BOOL ret; - - ret =GetTempPathA(MAX_PATH, temp_path); - ok( ret, "GetTempPathA error %d\n", GetLastError()); - ret =GetTempFileNameA(temp_path, "pfx", 0, temp_fname); - ok( ret, "GetTempFileNameA error %d\n", GetLastError()); - - /*** Write File *****************************************************/ - - hFile = CreateFileA(temp_fname, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); - ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA error %d\n", GetLastError()); - - for(i = 0; i < sizeof(buf); i++) buf[i] = i; - ret = WriteFile(hFile, buf, sizeof(buf), &done, NULL); - ok( ret, "WriteFile error %d\n", GetLastError()); - ok(done == sizeof(buf), "expected number of bytes written %u\n", done); - - memset(&ov, 0, sizeof(ov)); - S(U(ov)).Offset = PATTERN_OFFSET; - S(U(ov)).OffsetHigh = 0; - rc=WriteFile(hFile, pattern, sizeof(pattern), &done, &ov); - /* Win 9x does not support the overlapped I/O on files */ - if (rc || GetLastError()!=ERROR_INVALID_PARAMETER) { - ok(rc, "WriteFile error %d\n", GetLastError()); - ok(done == sizeof(pattern), "expected number of bytes written %u\n", done); - offset = SetFilePointer(hFile, 0, NULL, FILE_CURRENT); - ok(offset == PATTERN_OFFSET + sizeof(pattern), "wrong file offset %d\n", offset); - - S(U(ov)).Offset = sizeof(buf) * 2; - S(U(ov)).OffsetHigh = 0; - ret = WriteFile(hFile, pattern, sizeof(pattern), &done, &ov); - ok( ret, "WriteFile error %d\n", GetLastError()); - ok(done == sizeof(pattern), "expected number of bytes written %u\n", done); - offset = SetFilePointer(hFile, 0, NULL, FILE_CURRENT); - ok(offset == sizeof(buf) * 2 + sizeof(pattern), "wrong file offset %d\n", offset); - } - - CloseHandle(hFile); - - /*** Read File *****************************************************/ - - hFile = CreateFileA(temp_fname, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0); - ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA error %d\n", GetLastError()); - - memset(buf, 0, sizeof(buf)); - memset(&ov, 0, sizeof(ov)); - S(U(ov)).Offset = PATTERN_OFFSET; - S(U(ov)).OffsetHigh = 0; - rc=ReadFile(hFile, buf, sizeof(pattern), &done, &ov); - /* Win 9x does not support the overlapped I/O on files */ - if (rc || GetLastError()!=ERROR_INVALID_PARAMETER) { - ok(rc, "ReadFile error %d\n", GetLastError()); - ok(done == sizeof(pattern), "expected number of bytes read %u\n", done); - offset = SetFilePointer(hFile, 0, NULL, FILE_CURRENT); - ok(offset == PATTERN_OFFSET + sizeof(pattern), "wrong file offset %d\n", offset); - ok(!memcmp(buf, pattern, sizeof(pattern)), "pattern match failed\n"); - } - - CloseHandle(hFile); - - ret = DeleteFileA(temp_fname); - ok( ret, "DeleteFileA error %d\n", GetLastError()); -} - -static void test_LockFile(void) -{ - HANDLE handle; - DWORD written; - OVERLAPPED overlapped; - int limited_LockFile; - int limited_UnLockFile; - BOOL ret; - - handle = CreateFileA( filename, GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, - CREATE_ALWAYS, 0, 0 ); - if (handle == INVALID_HANDLE_VALUE) - { - ok(0,"couldn't create file \"%s\" (err=%d)\n",filename,GetLastError()); - return; - } - ok( WriteFile( handle, sillytext, strlen(sillytext), &written, NULL ), "write failed\n" ); - - ok( LockFile( handle, 0, 0, 0, 0 ), "LockFile failed\n" ); - ok( UnlockFile( handle, 0, 0, 0, 0 ), "UnlockFile failed\n" ); - - limited_UnLockFile = 0; - if (UnlockFile( handle, 0, 0, 0, 0 )) - { - limited_UnLockFile = 1; - } - - ok( LockFile( handle, 10, 0, 20, 0 ), "LockFile 10,20 failed\n" ); - /* overlapping locks must fail */ - ok( !LockFile( handle, 12, 0, 10, 0 ), "LockFile 12,10 succeeded\n" ); - ok( !LockFile( handle, 5, 0, 6, 0 ), "LockFile 5,6 succeeded\n" ); - /* non-overlapping locks must succeed */ - ok( LockFile( handle, 5, 0, 5, 0 ), "LockFile 5,5 failed\n" ); - - ok( !UnlockFile( handle, 10, 0, 10, 0 ), "UnlockFile 10,10 succeeded\n" ); - ok( UnlockFile( handle, 10, 0, 20, 0 ), "UnlockFile 10,20 failed\n" ); - ok( !UnlockFile( handle, 10, 0, 20, 0 ), "UnlockFile 10,20 again succeeded\n" ); - ok( UnlockFile( handle, 5, 0, 5, 0 ), "UnlockFile 5,5 failed\n" ); - - S(U(overlapped)).Offset = 100; - S(U(overlapped)).OffsetHigh = 0; - overlapped.hEvent = 0; - - /* Test for broken LockFileEx a la Windows 95 OSR2. */ - if (LockFileEx( handle, 0, 0, 100, 0, &overlapped )) - { - /* LockFileEx is probably OK, test it more. */ - ok( LockFileEx( handle, 0, 0, 100, 0, &overlapped ), - "LockFileEx 100,100 failed\n" ); - } - - /* overlapping shared locks are OK */ - S(U(overlapped)).Offset = 150; - limited_UnLockFile || ok( LockFileEx( handle, 0, 0, 100, 0, &overlapped ), "LockFileEx 150,100 failed\n" ); - - /* but exclusive is not */ - ok( !LockFileEx( handle, LOCKFILE_EXCLUSIVE_LOCK|LOCKFILE_FAIL_IMMEDIATELY, - 0, 50, 0, &overlapped ), - "LockFileEx exclusive 150,50 succeeded\n" ); - if (!UnlockFileEx( handle, 0, 100, 0, &overlapped )) - { /* UnLockFile is capable. */ - S(U(overlapped)).Offset = 100; - ok( !UnlockFileEx( handle, 0, 100, 0, &overlapped ), - "UnlockFileEx 150,100 again succeeded\n" ); - } - - ret = LockFile( handle, 0, 0x10000000, 0, 0xf0000000 ); - if (ret) - { - ok( !LockFile( handle, ~0, ~0, 1, 0 ), "LockFile ~0,1 succeeded\n" ); - ok( !LockFile( handle, 0, 0x20000000, 20, 0 ), "LockFile 0x20000000,20 succeeded\n" ); - ok( UnlockFile( handle, 0, 0x10000000, 0, 0xf0000000 ), "UnlockFile failed\n" ); - } - else /* win9x */ - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong LockFile error %u\n", GetLastError() ); - - /* wrap-around lock should not do anything */ - /* (but still succeeds on NT4 so we don't check result) */ - LockFile( handle, 0, 0x10000000, 0, 0xf0000001 ); - - limited_LockFile = 0; - if (!LockFile( handle, ~0, ~0, 1, 0 )) - { - limited_LockFile = 1; - } - - limited_UnLockFile || ok( UnlockFile( handle, ~0, ~0, 1, 0 ), "Unlockfile ~0,1 failed\n" ); - - /* zero-byte lock */ - ok( LockFile( handle, 100, 0, 0, 0 ), "LockFile 100,0 failed\n" ); - if (!limited_LockFile) ok( !LockFile( handle, 98, 0, 4, 0 ), "LockFile 98,4 succeeded\n" ); - ok( LockFile( handle, 90, 0, 10, 0 ), "LockFile 90,10 failed\n" ); - if (!limited_LockFile) ok( !LockFile( handle, 100, 0, 10, 0 ), "LockFile 100,10 failed\n" ); - - ok( UnlockFile( handle, 90, 0, 10, 0 ), "UnlockFile 90,10 failed\n" ); - ok( !UnlockFile( handle, 100, 0, 10, 0 ), "UnlockFile 100,10 succeeded\n" ); - - ok( UnlockFile( handle, 100, 0, 0, 0 ), "UnlockFile 100,0 failed\n" ); - - CloseHandle( handle ); - DeleteFileA( filename ); -} - -static BOOL create_fake_dll( LPCSTR filename ) -{ - IMAGE_DOS_HEADER *dos; - IMAGE_NT_HEADERS *nt; - IMAGE_SECTION_HEADER *sec; - BYTE *buffer; - DWORD lfanew = sizeof(*dos); - DWORD size = lfanew + sizeof(*nt) + sizeof(*sec); - DWORD written; - BOOL ret; - - HANDLE file = CreateFileA( filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0 ); - if (file == INVALID_HANDLE_VALUE) return FALSE; - - buffer = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, size ); - - dos = (IMAGE_DOS_HEADER *)buffer; - dos->e_magic = IMAGE_DOS_SIGNATURE; - dos->e_cblp = sizeof(*dos); - dos->e_cp = 1; - dos->e_cparhdr = lfanew / 16; - dos->e_minalloc = 0; - dos->e_maxalloc = 0xffff; - dos->e_ss = 0x0000; - dos->e_sp = 0x00b8; - dos->e_lfarlc = lfanew; - dos->e_lfanew = lfanew; - - nt = (IMAGE_NT_HEADERS *)(buffer + lfanew); - nt->Signature = IMAGE_NT_SIGNATURE; -#if defined __i386__ - nt->FileHeader.Machine = IMAGE_FILE_MACHINE_I386; -#elif defined __x86_64__ - nt->FileHeader.Machine = IMAGE_FILE_MACHINE_AMD64; -#elif defined __powerpc__ - nt->FileHeader.Machine = IMAGE_FILE_MACHINE_POWERPC; -#elif defined __sparc__ - nt->FileHeader.Machine = IMAGE_FILE_MACHINE_SPARC; -#elif defined __arm__ - nt->FileHeader.Machine = IMAGE_FILE_MACHINE_ARM; -#else -# error You must specify the machine type -#endif - nt->FileHeader.NumberOfSections = 1; - nt->FileHeader.SizeOfOptionalHeader = IMAGE_SIZEOF_NT_OPTIONAL_HEADER; - nt->FileHeader.Characteristics = IMAGE_FILE_DLL | IMAGE_FILE_EXECUTABLE_IMAGE; - nt->OptionalHeader.Magic = IMAGE_NT_OPTIONAL_HDR_MAGIC; - nt->OptionalHeader.MajorLinkerVersion = 1; - nt->OptionalHeader.MinorLinkerVersion = 0; - nt->OptionalHeader.ImageBase = 0x10000000; - nt->OptionalHeader.SectionAlignment = 0x1000; - nt->OptionalHeader.FileAlignment = 0x1000; - nt->OptionalHeader.MajorOperatingSystemVersion = 1; - nt->OptionalHeader.MinorOperatingSystemVersion = 0; - nt->OptionalHeader.MajorImageVersion = 1; - nt->OptionalHeader.MinorImageVersion = 0; - nt->OptionalHeader.MajorSubsystemVersion = 4; - nt->OptionalHeader.MinorSubsystemVersion = 0; - nt->OptionalHeader.SizeOfImage = 0x2000; - nt->OptionalHeader.SizeOfHeaders = size; - nt->OptionalHeader.Subsystem = IMAGE_SUBSYSTEM_WINDOWS_GUI; - nt->OptionalHeader.NumberOfRvaAndSizes = IMAGE_NUMBEROF_DIRECTORY_ENTRIES; - - sec = (IMAGE_SECTION_HEADER *)(nt + 1); - memcpy( sec->Name, ".rodata", sizeof(".rodata") ); - sec->Misc.VirtualSize = 0x1000; - sec->VirtualAddress = 0x1000; - sec->SizeOfRawData = 0; - sec->PointerToRawData = 0; - sec->Characteristics = IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE; - - ret = WriteFile( file, buffer, size, &written, NULL ) && written == size; - HeapFree( GetProcessHeap(), 0, buffer ); - CloseHandle( file ); - return ret; -} - -static unsigned int map_file_access( unsigned int access ) -{ - if (access & GENERIC_READ) access |= FILE_GENERIC_READ; - if (access & GENERIC_WRITE) access |= FILE_GENERIC_WRITE; - if (access & GENERIC_EXECUTE) access |= FILE_GENERIC_EXECUTE; - if (access & GENERIC_ALL) access |= FILE_ALL_ACCESS; - return access & ~(GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL); -} - -static int is_sharing_compatible( DWORD access1, DWORD sharing1, DWORD access2, DWORD sharing2 ) -{ - access1 = map_file_access( access1 ); - access2 = map_file_access( access2 ); - access1 &= FILE_READ_DATA | FILE_WRITE_DATA | FILE_APPEND_DATA | FILE_EXECUTE | DELETE; - access2 &= FILE_READ_DATA | FILE_WRITE_DATA | FILE_APPEND_DATA | FILE_EXECUTE | DELETE; - - if (!access1) sharing1 = FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE; - if (!access2) sharing2 = FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE; - - if ((access1 & (FILE_READ_DATA|FILE_EXECUTE)) && !(sharing2 & FILE_SHARE_READ)) return 0; - if ((access1 & (FILE_WRITE_DATA|FILE_APPEND_DATA)) && !(sharing2 & FILE_SHARE_WRITE)) return 0; - if ((access1 & DELETE) && !(sharing2 & FILE_SHARE_DELETE)) return 0; - if ((access2 & (FILE_READ_DATA|FILE_EXECUTE)) && !(sharing1 & FILE_SHARE_READ)) return 0; - if ((access2 & (FILE_WRITE_DATA|FILE_APPEND_DATA)) && !(sharing1 & FILE_SHARE_WRITE)) return 0; - if ((access2 & DELETE) && !(sharing1 & FILE_SHARE_DELETE)) return 0; - return 1; -} - -static int is_sharing_map_compatible( DWORD map_access, DWORD access2, DWORD sharing2 ) -{ - if ((map_access == PAGE_READWRITE || map_access == PAGE_EXECUTE_READWRITE) && - !(sharing2 & FILE_SHARE_WRITE)) return 0; - access2 = map_file_access( access2 ); - if ((map_access & SEC_IMAGE) && (access2 & FILE_WRITE_DATA)) return 0; - return 1; -} - -static void test_file_sharing(void) -{ - static const DWORD access_modes[] = - { 0, GENERIC_READ, GENERIC_WRITE, GENERIC_READ|GENERIC_WRITE, - DELETE, GENERIC_READ|DELETE, GENERIC_WRITE|DELETE, GENERIC_READ|GENERIC_WRITE|DELETE, - GENERIC_EXECUTE, GENERIC_EXECUTE | DELETE, - FILE_READ_DATA, FILE_WRITE_DATA, FILE_APPEND_DATA, FILE_READ_EA, FILE_WRITE_EA, - FILE_READ_DATA | FILE_EXECUTE, FILE_WRITE_DATA | FILE_EXECUTE, FILE_APPEND_DATA | FILE_EXECUTE, - FILE_READ_EA | FILE_EXECUTE, FILE_WRITE_EA | FILE_EXECUTE, FILE_EXECUTE, - FILE_DELETE_CHILD, FILE_READ_ATTRIBUTES, FILE_WRITE_ATTRIBUTES }; - static const DWORD sharing_modes[] = - { 0, FILE_SHARE_READ, - FILE_SHARE_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, - FILE_SHARE_DELETE, FILE_SHARE_READ|FILE_SHARE_DELETE, - FILE_SHARE_WRITE|FILE_SHARE_DELETE, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE }; - static const DWORD mapping_modes[] = - { PAGE_READONLY, PAGE_WRITECOPY, PAGE_READWRITE, SEC_IMAGE | PAGE_WRITECOPY }; - int a1, s1, a2, s2; - int ret; - HANDLE h, h2; - - /* make sure the file exists */ - if (!create_fake_dll( filename )) - { - ok(0, "couldn't create file \"%s\" (err=%d)\n", filename, GetLastError()); - return; - } - - for (a1 = 0; a1 < sizeof(access_modes)/sizeof(access_modes[0]); a1++) - { - for (s1 = 0; s1 < sizeof(sharing_modes)/sizeof(sharing_modes[0]); s1++) - { - SetLastError(0xdeadbeef); - h = CreateFileA( filename, access_modes[a1], sharing_modes[s1], - NULL, OPEN_EXISTING, 0, 0 ); - if (h == INVALID_HANDLE_VALUE) - { - ok(0,"couldn't create file \"%s\" (err=%d)\n",filename,GetLastError()); - return; - } - for (a2 = 0; a2 < sizeof(access_modes)/sizeof(access_modes[0]); a2++) - { - for (s2 = 0; s2 < sizeof(sharing_modes)/sizeof(sharing_modes[0]); s2++) - { - SetLastError(0xdeadbeef); - h2 = CreateFileA( filename, access_modes[a2], sharing_modes[s2], - NULL, OPEN_EXISTING, 0, 0 ); - ret = GetLastError(); - if (is_sharing_compatible( access_modes[a1], sharing_modes[s1], - access_modes[a2], sharing_modes[s2] )) - { - ok( h2 != INVALID_HANDLE_VALUE, - "open failed for modes %x/%x/%x/%x\n", - access_modes[a1], sharing_modes[s1], - access_modes[a2], sharing_modes[s2] ); - ok( ret == 0, "wrong error code %d\n", ret ); - } - else - { - ok( h2 == INVALID_HANDLE_VALUE, - "open succeeded for modes %x/%x/%x/%x\n", - access_modes[a1], sharing_modes[s1], - access_modes[a2], sharing_modes[s2] ); - ok( ret == ERROR_SHARING_VIOLATION, - "wrong error code %d\n", ret ); - } - if (h2 != INVALID_HANDLE_VALUE) CloseHandle( h2 ); - } - } - CloseHandle( h ); - } - } - - for (a1 = 0; a1 < sizeof(mapping_modes)/sizeof(mapping_modes[0]); a1++) - { - HANDLE m; - - create_fake_dll( filename ); - SetLastError(0xdeadbeef); - h = CreateFileA( filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0 ); - if (h == INVALID_HANDLE_VALUE) - { - ok(0,"couldn't create file \"%s\" (err=%d)\n",filename,GetLastError()); - return; - } - m = CreateFileMappingA( h, NULL, mapping_modes[a1], 0, 0, NULL ); - ok( m != 0, "failed to create mapping %x err %u\n", mapping_modes[a1], GetLastError() ); - CloseHandle( h ); - if (!m) continue; - - for (a2 = 0; a2 < sizeof(access_modes)/sizeof(access_modes[0]); a2++) - { - for (s2 = 0; s2 < sizeof(sharing_modes)/sizeof(sharing_modes[0]); s2++) - { - SetLastError(0xdeadbeef); - h2 = CreateFileA( filename, access_modes[a2], sharing_modes[s2], - NULL, OPEN_EXISTING, 0, 0 ); - - ret = GetLastError(); - if (h2 == INVALID_HANDLE_VALUE) - { - ok( !is_sharing_map_compatible(mapping_modes[a1], access_modes[a2], sharing_modes[s2]), - "open failed for modes map %x/%x/%x\n", - mapping_modes[a1], access_modes[a2], sharing_modes[s2] ); - ok( ret == ERROR_SHARING_VIOLATION, - "wrong error code %d\n", ret ); - } - else - { - if (!is_sharing_map_compatible(mapping_modes[a1], access_modes[a2], sharing_modes[s2])) - ok( broken(1), /* no checking on nt4 */ - "open succeeded for modes map %x/%x/%x\n", - mapping_modes[a1], access_modes[a2], sharing_modes[s2] ); - ok( ret == 0xdeadbeef /* Win9x */ || - ret == 0, /* XP */ - "wrong error code %d\n", ret ); - CloseHandle( h2 ); - } - } - } - - /* try CREATE_ALWAYS over an existing mapping */ - SetLastError(0xdeadbeef); - h2 = CreateFileA( filename, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, CREATE_ALWAYS, 0, 0 ); - ret = GetLastError(); - if (mapping_modes[a1] & SEC_IMAGE) - { - ok( h2 == INVALID_HANDLE_VALUE, "create succeeded for map %x\n", mapping_modes[a1] ); - ok( ret == ERROR_SHARING_VIOLATION, "wrong error code %d for %x\n", ret, mapping_modes[a1] ); - } - else - { - ok( h2 == INVALID_HANDLE_VALUE, "create succeeded for map %x\n", mapping_modes[a1] ); - ok( ret == ERROR_USER_MAPPED_FILE, "wrong error code %d for %x\n", ret, mapping_modes[a1] ); - } - if (h2 != INVALID_HANDLE_VALUE) CloseHandle( h2 ); - - /* try DELETE_ON_CLOSE over an existing mapping */ - SetLastError(0xdeadbeef); - h2 = CreateFileA( filename, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, OPEN_EXISTING, FILE_FLAG_DELETE_ON_CLOSE, 0 ); - ret = GetLastError(); - if (mapping_modes[a1] & SEC_IMAGE) - { - ok( h2 == INVALID_HANDLE_VALUE, "create succeeded for map %x\n", mapping_modes[a1] ); - ok( ret == ERROR_ACCESS_DENIED, "wrong error code %d for %x\n", ret, mapping_modes[a1] ); - } - else - { - ok( h2 != INVALID_HANDLE_VALUE, "open failed for map %x err %u\n", mapping_modes[a1], ret ); - } - if (h2 != INVALID_HANDLE_VALUE) CloseHandle( h2 ); - - CloseHandle( m ); - } - - SetLastError(0xdeadbeef); - h = CreateFileA( filename, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, 0, 0 ); - ok( h != INVALID_HANDLE_VALUE, "CreateFileA error %d\n", GetLastError() ); - - SetLastError(0xdeadbeef); - h2 = CreateFileA( filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 ); - ok( h2 == INVALID_HANDLE_VALUE, "CreateFileA should fail\n"); - ok( GetLastError() == ERROR_SHARING_VIOLATION, "wrong error code %d\n", GetLastError() ); - - h2 = CreateFileA( filename, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0 ); - ok( h2 != INVALID_HANDLE_VALUE, "CreateFileA error %d\n", GetLastError() ); - - CloseHandle(h); - CloseHandle(h2); - - DeleteFileA( filename ); -} - -static char get_windows_drive(void) -{ - char windowsdir[MAX_PATH]; - GetWindowsDirectory(windowsdir, sizeof(windowsdir)); - return windowsdir[0]; -} - -static void test_FindFirstFileA(void) -{ - HANDLE handle; - WIN32_FIND_DATAA data; - int err; - char buffer[5] = "C:\\"; - char buffer2[100]; - char nonexistent[MAX_PATH]; - - /* try FindFirstFileA on "C:\" */ - buffer[0] = get_windows_drive(); - - SetLastError( 0xdeadbeaf ); - handle = FindFirstFileA(buffer, &data); - err = GetLastError(); - ok ( handle == INVALID_HANDLE_VALUE, "FindFirstFile on root directory should fail\n" ); - ok ( err == ERROR_FILE_NOT_FOUND, "Bad Error number %d\n", err ); - - /* try FindFirstFileA on "C:\*" */ - strcpy(buffer2, buffer); - strcat(buffer2, "*"); - handle = FindFirstFileA(buffer2, &data); - ok ( handle != INVALID_HANDLE_VALUE, "FindFirstFile on %s should succeed\n", buffer2 ); - ok ( strcmp( data.cFileName, "." ) && strcmp( data.cFileName, ".." ), - "FindFirstFile shouldn't return '%s' in drive root\n", data.cFileName ); - if (FindNextFileA( handle, &data )) - ok ( strcmp( data.cFileName, "." ) && strcmp( data.cFileName, ".." ), - "FindNextFile shouldn't return '%s' in drive root\n", data.cFileName ); - ok ( FindClose(handle) == TRUE, "Failed to close handle %s\n", buffer2 ); - - /* try FindFirstFileA on windows dir */ - GetWindowsDirectory( buffer2, sizeof(buffer2) ); - strcat(buffer2, "\\*"); - handle = FindFirstFileA(buffer2, &data); - ok( handle != INVALID_HANDLE_VALUE, "FindFirstFile on %s should succeed\n", buffer2 ); - ok( !strcmp( data.cFileName, "." ), "FindFirstFile should return '.' first\n" ); - ok( FindNextFileA( handle, &data ), "FindNextFile failed\n" ); - ok( !strcmp( data.cFileName, ".." ), "FindNextFile should return '..' as second entry\n" ); - while (FindNextFileA( handle, &data )) - ok ( strcmp( data.cFileName, "." ) && strcmp( data.cFileName, ".." ), - "FindNextFile shouldn't return '%s'\n", data.cFileName ); - ok ( FindClose(handle) == TRUE, "Failed to close handle %s\n", buffer2 ); - - /* try FindFirstFileA on "C:\foo\" */ - SetLastError( 0xdeadbeaf ); - if (!GetTempFileNameA( buffer, "foo", 0, nonexistent ) && GetLastError() == ERROR_ACCESS_DENIED) - { - char tmp[MAX_PATH]; - GetTempPathA( sizeof(tmp), tmp ); - GetTempFileNameA( tmp, "foo", 0, nonexistent ); - } - DeleteFileA( nonexistent ); - strcpy(buffer2, nonexistent); - strcat(buffer2, "\\"); - handle = FindFirstFileA(buffer2, &data); - err = GetLastError(); - ok ( handle == INVALID_HANDLE_VALUE, "FindFirstFile on %s should Fail\n", buffer2 ); - todo_wine { - ok ( err == ERROR_PATH_NOT_FOUND, "Bad Error number %d\n", err ); - } - - /* try FindFirstFileA on "C:\foo\bar.txt" */ - SetLastError( 0xdeadbeaf ); - strcpy(buffer2, nonexistent); - strcat(buffer2, "\\bar.txt"); - handle = FindFirstFileA(buffer2, &data); - err = GetLastError(); - ok ( handle == INVALID_HANDLE_VALUE, "FindFirstFile on %s should Fail\n", buffer2 ); - ok ( err == ERROR_PATH_NOT_FOUND, "Bad Error number %d\n", err ); - - /* try FindFirstFileA on "C:\foo\*.*" */ - SetLastError( 0xdeadbeaf ); - strcpy(buffer2, nonexistent); - strcat(buffer2, "\\*.*"); - handle = FindFirstFileA(buffer2, &data); - err = GetLastError(); - ok ( handle == INVALID_HANDLE_VALUE, "FindFirstFile on %s should Fail\n", buffer2 ); - ok ( err == ERROR_PATH_NOT_FOUND, "Bad Error number %d\n", err ); - - /* try FindFirstFileA on "foo\bar.txt" */ - SetLastError( 0xdeadbeaf ); - strcpy(buffer2, nonexistent + 3); - strcat(buffer2, "\\bar.txt"); - handle = FindFirstFileA(buffer2, &data); - err = GetLastError(); - ok ( handle == INVALID_HANDLE_VALUE, "FindFirstFile on %s should Fail\n", buffer2 ); - ok ( err == ERROR_PATH_NOT_FOUND, "Bad Error number %d\n", err ); - - /* try FindFirstFileA on "c:\nul" */ - SetLastError( 0xdeadbeaf ); - strcpy(buffer2, buffer); - strcat(buffer2, "nul"); - handle = FindFirstFileA(buffer2, &data); - err = GetLastError(); - ok( handle != INVALID_HANDLE_VALUE, "FindFirstFile on %s failed: %d\n", buffer2, err ); - ok( 0 == lstrcmpiA(data.cFileName, "nul"), "wrong name %s\n", data.cFileName ); - ok( FILE_ATTRIBUTE_ARCHIVE == data.dwFileAttributes || - FILE_ATTRIBUTE_DEVICE == data.dwFileAttributes /* Win9x */, - "wrong attributes %x\n", data.dwFileAttributes ); - if (data.dwFileAttributes == FILE_ATTRIBUTE_ARCHIVE) - { - ok( 0 == data.nFileSizeHigh, "wrong size %d\n", data.nFileSizeHigh ); - ok( 0 == data.nFileSizeLow, "wrong size %d\n", data.nFileSizeLow ); - } - SetLastError( 0xdeadbeaf ); - ok( !FindNextFileA( handle, &data ), "FindNextFileA succeeded\n" ); - ok( GetLastError() == ERROR_NO_MORE_FILES, "bad error %d\n", GetLastError() ); - ok( FindClose( handle ), "failed to close handle\n" ); - - /* try FindFirstFileA on "lpt1" */ - SetLastError( 0xdeadbeaf ); - strcpy(buffer2, "lpt1"); - handle = FindFirstFileA(buffer2, &data); - err = GetLastError(); - ok( handle != INVALID_HANDLE_VALUE, "FindFirstFile on %s failed: %d\n", buffer2, err ); - ok( 0 == lstrcmpiA(data.cFileName, "lpt1"), "wrong name %s\n", data.cFileName ); - ok( FILE_ATTRIBUTE_ARCHIVE == data.dwFileAttributes || - FILE_ATTRIBUTE_DEVICE == data.dwFileAttributes /* Win9x */, - "wrong attributes %x\n", data.dwFileAttributes ); - if (data.dwFileAttributes == FILE_ATTRIBUTE_ARCHIVE) - { - ok( 0 == data.nFileSizeHigh, "wrong size %d\n", data.nFileSizeHigh ); - ok( 0 == data.nFileSizeLow, "wrong size %d\n", data.nFileSizeLow ); - } - SetLastError( 0xdeadbeaf ); - ok( !FindNextFileA( handle, &data ), "FindNextFileA succeeded\n" ); - ok( GetLastError() == ERROR_NO_MORE_FILES, "bad error %d\n", GetLastError() ); - ok( FindClose( handle ), "failed to close handle\n" ); - - /* try FindFirstFileA on "c:\nul\*" */ - SetLastError( 0xdeadbeaf ); - strcpy(buffer2, buffer); - strcat(buffer2, "nul\\*"); - handle = FindFirstFileA(buffer2, &data); - err = GetLastError(); - ok ( handle == INVALID_HANDLE_VALUE, "FindFirstFile on %s should Fail\n", buffer2 ); - ok ( err == ERROR_PATH_NOT_FOUND, "Bad Error number %d\n", err ); - - /* try FindFirstFileA on "c:\nul*" */ - SetLastError( 0xdeadbeaf ); - strcpy(buffer2, buffer); - strcat(buffer2, "nul*"); - handle = FindFirstFileA(buffer2, &data); - err = GetLastError(); - ok ( handle == INVALID_HANDLE_VALUE, "FindFirstFile on %s should Fail\n", buffer2 ); - ok ( err == ERROR_FILE_NOT_FOUND, "Bad Error number %d\n", err ); - - /* try FindFirstFileA on "c:\foo\bar\nul" */ - SetLastError( 0xdeadbeaf ); - strcpy(buffer2, buffer); - strcat(buffer2, "foo\\bar\\nul"); - handle = FindFirstFileA(buffer2, &data); - err = GetLastError(); - ok ( handle == INVALID_HANDLE_VALUE, "FindFirstFile on %s should Fail\n", buffer2 ); - ok ( err == ERROR_PATH_NOT_FOUND, "Bad Error number %d\n", err ); - - /* try FindFirstFileA on "c:\foo\nul\bar" */ - SetLastError( 0xdeadbeaf ); - strcpy(buffer2, buffer); - strcat(buffer2, "foo\\nul\\bar"); - handle = FindFirstFileA(buffer2, &data); - err = GetLastError(); - ok ( handle == INVALID_HANDLE_VALUE, "FindFirstFile on %s should Fail\n", buffer2 ); - ok ( err == ERROR_PATH_NOT_FOUND, "Bad Error number %d\n", err ); -} - -static void test_FindNextFileA(void) -{ - HANDLE handle; - WIN32_FIND_DATAA search_results; - int err; - char buffer[5] = "C:\\*"; - - buffer[0] = get_windows_drive(); - handle = FindFirstFileA(buffer,&search_results); - ok ( handle != INVALID_HANDLE_VALUE, "FindFirstFile on C:\\* should succeed\n" ); - while (FindNextFile(handle, &search_results)) - { - /* get to the end of the files */ - } - ok ( FindClose(handle) == TRUE, "Failed to close handle\n"); - err = GetLastError(); - ok ( err == ERROR_NO_MORE_FILES, "GetLastError should return ERROR_NO_MORE_FILES\n"); -} - -static void test_FindFirstFileExA(FINDEX_SEARCH_OPS search_ops) -{ - WIN32_FIND_DATAA search_results; - HANDLE handle; - BOOL ret; - - if (!pFindFirstFileExA) - { - win_skip("FindFirstFileExA() is missing\n"); - return; - } - - CreateDirectoryA("test-dir", NULL); - _lclose(_lcreat("test-dir\\file1", 0)); - _lclose(_lcreat("test-dir\\file2", 0)); - CreateDirectoryA("test-dir\\dir1", NULL); - SetLastError(0xdeadbeef); - handle = pFindFirstFileExA("test-dir\\*", FindExInfoStandard, &search_results, search_ops, NULL, 0); - if (handle == INVALID_HANDLE_VALUE && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("FindFirstFileExA is not implemented\n"); - goto cleanup; - } - ok(handle != INVALID_HANDLE_VALUE, "FindFirstFile failed (err=%u)\n", GetLastError()); - ok(strcmp(search_results.cFileName, ".") == 0, "First entry should be '.', is %s\n", search_results.cFileName); - -#define CHECK_NAME(fn) (strcmp((fn), "file1") == 0 || strcmp((fn), "file2") == 0 || strcmp((fn), "dir1") == 0) - - ok(FindNextFile(handle, &search_results), "Fetching second file failed\n"); - ok(strcmp(search_results.cFileName, "..") == 0, "Second entry should be '..' is %s\n", search_results.cFileName); - - ok(FindNextFile(handle, &search_results), "Fetching third file failed\n"); - ok(CHECK_NAME(search_results.cFileName), "Invalid third entry - %s\n", search_results.cFileName); - - SetLastError(0xdeadbeef); - ret = FindNextFile(handle, &search_results); - if (!ret && (GetLastError() == ERROR_NO_MORE_FILES) && (search_ops == FindExSearchLimitToDirectories)) - { - skip("File system supports directory filtering\n"); - /* Results from the previous call are not cleared */ - ok(strcmp(search_results.cFileName, "dir1") == 0, "Third entry should be 'dir1' is %s\n", search_results.cFileName); - FindClose( handle ); - goto cleanup; - } - - ok(ret, "Fetching fourth file failed\n"); - ok(CHECK_NAME(search_results.cFileName), "Invalid fourth entry - %s\n", search_results.cFileName); - - ok(FindNextFile(handle, &search_results), "Fetching fifth file failed\n"); - ok(CHECK_NAME(search_results.cFileName), "Invalid fifth entry - %s\n", search_results.cFileName); - -#undef CHECK_NAME - - ok(FindNextFile(handle, &search_results) == FALSE, "Fetching sixth file should fail\n"); - - FindClose( handle ); - -cleanup: - DeleteFileA("test-dir\\file1"); - DeleteFileA("test-dir\\file2"); - RemoveDirectoryA("test-dir\\dir1"); - RemoveDirectoryA("test-dir"); -} - -static int test_Mapfile_createtemp(HANDLE *handle) -{ - SetFileAttributesA(filename,FILE_ATTRIBUTE_NORMAL); - DeleteFile(filename); - *handle = CreateFile(filename, GENERIC_READ|GENERIC_WRITE, 0, 0, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - if (*handle != INVALID_HANDLE_VALUE) { - - return 1; - } - - return 0; -} - -static void test_MapFile(void) -{ - HANDLE handle; - HANDLE hmap; - - ok(test_Mapfile_createtemp(&handle), "Couldn't create test file.\n"); - - hmap = CreateFileMapping( handle, NULL, PAGE_READWRITE, 0, 0x1000, "named_file_map" ); - ok( hmap != NULL, "mapping should work, I named it!\n" ); - - ok( CloseHandle( hmap ), "can't close mapping handle\n"); - - /* We have to close file before we try new stuff with mapping again. - Else we would always succeed on XP or block descriptors on 95. */ - hmap = CreateFileMapping( handle, NULL, PAGE_READWRITE, 0, 0, NULL ); - ok( hmap != NULL, "We should still be able to map!\n" ); - ok( CloseHandle( hmap ), "can't close mapping handle\n"); - ok( CloseHandle( handle ), "can't close file handle\n"); - handle = NULL; - - ok(test_Mapfile_createtemp(&handle), "Couldn't create test file.\n"); - - hmap = CreateFileMapping( handle, NULL, PAGE_READWRITE, 0, 0, NULL ); - ok( hmap == NULL, "mapped zero size file\n"); - ok( GetLastError() == ERROR_FILE_INVALID, "not ERROR_FILE_INVALID\n"); - - hmap = CreateFileMapping( handle, NULL, PAGE_READWRITE, 0x80000000, 0, NULL ); - ok( hmap == NULL || broken(hmap != NULL) /* NT4 */, "mapping should fail\n"); - /* GetLastError() varies between win9x and WinNT and also depends on the filesystem */ - if ( hmap ) - CloseHandle( hmap ); - - hmap = CreateFileMapping( handle, NULL, PAGE_READWRITE, 0x80000000, 0x10000, NULL ); - ok( hmap == NULL || broken(hmap != NULL) /* NT4 */, "mapping should fail\n"); - /* GetLastError() varies between win9x and WinNT and also depends on the filesystem */ - if ( hmap ) - CloseHandle( hmap ); - - /* On XP you can now map again, on Win 95 you cannot. */ - - ok( CloseHandle( handle ), "can't close file handle\n"); - ok( DeleteFileA( filename ), "DeleteFile failed after map\n" ); -} - -static void test_GetFileType(void) -{ - DWORD type; - HANDLE h = CreateFileA( filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0 ); - ok( h != INVALID_HANDLE_VALUE, "open %s failed\n", filename ); - type = GetFileType(h); - ok( type == FILE_TYPE_DISK, "expected type disk got %d\n", type ); - CloseHandle( h ); - h = CreateFileA( "nul", GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0 ); - ok( h != INVALID_HANDLE_VALUE, "open nul failed\n" ); - type = GetFileType(h); - ok( type == FILE_TYPE_CHAR, "expected type char for nul got %d\n", type ); - CloseHandle( h ); - DeleteFileA( filename ); -} - -static int completion_count; - -static void CALLBACK FileIOComplete(DWORD dwError, DWORD dwBytes, LPOVERLAPPED ovl) -{ -/* printf("(%ld, %ld, %p { %ld, %ld, %ld, %ld, %p })\n", dwError, dwBytes, ovl, ovl->Internal, ovl->InternalHigh, ovl->Offset, ovl->OffsetHigh, ovl->hEvent);*/ - ReleaseSemaphore(ovl->hEvent, 1, NULL); - completion_count++; -} - -static void test_async_file_errors(void) -{ - char szFile[MAX_PATH]; - HANDLE hSem = CreateSemaphoreW(NULL, 1, 1, NULL); - HANDLE hFile; - LPVOID lpBuffer = HeapAlloc(GetProcessHeap(), 0, 4096); - OVERLAPPED ovl; - S(U(ovl)).Offset = 0; - S(U(ovl)).OffsetHigh = 0; - ovl.hEvent = hSem; - completion_count = 0; - szFile[0] = '\0'; - GetWindowsDirectoryA(szFile, sizeof(szFile)/sizeof(szFile[0])-1-strlen("\\win.ini")); - strcat(szFile, "\\win.ini"); - hFile = CreateFileA(szFile, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, - NULL, OPEN_ALWAYS, FILE_FLAG_OVERLAPPED, NULL); - if (hFile == INVALID_HANDLE_VALUE) /* win9x doesn't like FILE_SHARE_DELETE */ - hFile = CreateFileA(szFile, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, OPEN_ALWAYS, FILE_FLAG_OVERLAPPED, NULL); - ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA(%s ...) failed\n", szFile); - while (TRUE) - { - BOOL res; - DWORD count; - while (WaitForSingleObjectEx(hSem, INFINITE, TRUE) == WAIT_IO_COMPLETION) - ; - res = ReadFileEx(hFile, lpBuffer, 4096, &ovl, FileIOComplete); - /*printf("Offset = %ld, result = %s\n", ovl.Offset, res ? "TRUE" : "FALSE");*/ - if (!res) - break; - if (!GetOverlappedResult(hFile, &ovl, &count, FALSE)) - break; - S(U(ovl)).Offset += count; - /* i/o completion routine only called if ReadFileEx returned success. - * we only care about violations of this rule so undo what should have - * been done */ - completion_count--; - } - ok(completion_count == 0, "completion routine should only be called when ReadFileEx succeeds (this rule was violated %d times)\n", completion_count); - /*printf("Error = %ld\n", GetLastError());*/ - HeapFree(GetProcessHeap(), 0, lpBuffer); -} - -static BOOL user_apc_ran; -static void CALLBACK user_apc(ULONG_PTR param) -{ - user_apc_ran = TRUE; -} - -static void test_read_write(void) -{ - DWORD bytes, ret, old_prot; - HANDLE hFile; - char temp_path[MAX_PATH]; - char filename[MAX_PATH]; - char *mem; - static const char prefix[] = "pfx"; - - ret = GetTempPathA(MAX_PATH, temp_path); - ok(ret != 0, "GetTempPathA error %d\n", GetLastError()); - ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n"); - - ret = GetTempFileNameA(temp_path, prefix, 0, filename); - ok(ret != 0, "GetTempFileNameA error %d\n", GetLastError()); - - hFile = CreateFileA(filename, GENERIC_READ | GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_FLAG_RANDOM_ACCESS, 0); - ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA: error %d\n", GetLastError()); - - user_apc_ran = FALSE; - if (pQueueUserAPC) { - trace("Queueing an user APC\n"); /* verify the file is non alerable */ - ok(pQueueUserAPC(&user_apc, GetCurrentThread(), 0), "QueueUserAPC failed: %d\n", GetLastError()); - } - - SetLastError(12345678); - bytes = 12345678; - ret = WriteFile(hFile, NULL, 0, &bytes, NULL); - ok(ret && GetLastError() == 12345678, - "ret = %d, error %d\n", ret, GetLastError()); - ok(!bytes, "bytes = %d\n", bytes); - - SetLastError(12345678); - bytes = 12345678; - ret = WriteFile(hFile, NULL, 10, &bytes, NULL); - ok((!ret && GetLastError() == ERROR_INVALID_USER_BUFFER) || /* Win2k */ - (ret && GetLastError() == 12345678), /* Win9x */ - "ret = %d, error %d\n", ret, GetLastError()); - ok(!bytes || /* Win2k */ - bytes == 10, /* Win9x */ - "bytes = %d\n", bytes); - - /* make sure the file contains data */ - WriteFile(hFile, "this is the test data", 21, &bytes, NULL); - SetFilePointer(hFile, 0, NULL, FILE_BEGIN); - - SetLastError(12345678); - bytes = 12345678; - ret = ReadFile(hFile, NULL, 0, &bytes, NULL); - ok(ret && GetLastError() == 12345678, - "ret = %d, error %d\n", ret, GetLastError()); - ok(!bytes, "bytes = %d\n", bytes); - - SetLastError(12345678); - bytes = 12345678; - ret = ReadFile(hFile, NULL, 10, &bytes, NULL); - ok(!ret && (GetLastError() == ERROR_NOACCESS || /* Win2k */ - GetLastError() == ERROR_INVALID_PARAMETER), /* Win9x */ - "ret = %d, error %d\n", ret, GetLastError()); - ok(!bytes, "bytes = %d\n", bytes); - - ok(user_apc_ran == FALSE, "UserAPC ran, file using alertable io mode\n"); - if (pQueueUserAPC) - SleepEx(0, TRUE); /* get rid of apc */ - - /* test passing protected memory as buffer */ - - mem = VirtualAlloc( NULL, 0x4000, MEM_COMMIT, PAGE_READWRITE ); - ok( mem != NULL, "failed to allocate virtual mem error %u\n", GetLastError() ); - - ret = WriteFile( hFile, mem, 0x4000, &bytes, NULL ); - ok( ret, "WriteFile failed error %u\n", GetLastError() ); - ok( bytes == 0x4000, "only wrote %x bytes\n", bytes ); - - ret = VirtualProtect( mem + 0x2000, 0x2000, PAGE_NOACCESS, &old_prot ); - ok( ret, "VirtualProtect failed error %u\n", GetLastError() ); - - ret = WriteFile( hFile, mem, 0x4000, &bytes, NULL ); - ok( !ret, "WriteFile succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_USER_BUFFER || - GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ - "wrong error %u\n", GetLastError() ); - ok( bytes == 0, "wrote %x bytes\n", bytes ); - - ret = WriteFile( (HANDLE)0xdead, mem, 0x4000, &bytes, NULL ); - ok( !ret, "WriteFile succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_HANDLE || /* handle is checked before buffer on NT */ - GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ - "wrong error %u\n", GetLastError() ); - ok( bytes == 0, "wrote %x bytes\n", bytes ); - - ret = VirtualProtect( mem, 0x2000, PAGE_NOACCESS, &old_prot ); - ok( ret, "VirtualProtect failed error %u\n", GetLastError() ); - - ret = WriteFile( hFile, mem, 0x4000, &bytes, NULL ); - ok( !ret, "WriteFile succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_USER_BUFFER || - GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ - "wrong error %u\n", GetLastError() ); - ok( bytes == 0, "wrote %x bytes\n", bytes ); - - SetFilePointer( hFile, 0, NULL, FILE_BEGIN ); - - ret = ReadFile( hFile, mem, 0x4000, &bytes, NULL ); - ok( !ret, "ReadFile succeeded\n" ); - ok( GetLastError() == ERROR_NOACCESS || - GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ - "wrong error %u\n", GetLastError() ); - ok( bytes == 0, "read %x bytes\n", bytes ); - - ret = VirtualProtect( mem, 0x2000, PAGE_READONLY, &old_prot ); - ok( ret, "VirtualProtect failed error %u\n", GetLastError() ); - - ret = ReadFile( hFile, mem, 0x4000, &bytes, NULL ); - ok( !ret, "ReadFile succeeded\n" ); - ok( GetLastError() == ERROR_NOACCESS || - GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ - "wrong error %u\n", GetLastError() ); - ok( bytes == 0, "read %x bytes\n", bytes ); - - ret = VirtualProtect( mem, 0x2000, PAGE_READWRITE, &old_prot ); - ok( ret, "VirtualProtect failed error %u\n", GetLastError() ); - - ret = ReadFile( hFile, mem, 0x4000, &bytes, NULL ); - ok( !ret, "ReadFile succeeded\n" ); - ok( GetLastError() == ERROR_NOACCESS || - GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ - "wrong error %u\n", GetLastError() ); - ok( bytes == 0, "read %x bytes\n", bytes ); - - SetFilePointer( hFile, 0x1234, NULL, FILE_BEGIN ); - SetEndOfFile( hFile ); - SetFilePointer( hFile, 0, NULL, FILE_BEGIN ); - - ret = ReadFile( hFile, mem, 0x4000, &bytes, NULL ); - ok( !ret, "ReadFile succeeded\n" ); - ok( GetLastError() == ERROR_NOACCESS || - GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ - "wrong error %u\n", GetLastError() ); - ok( bytes == 0, "read %x bytes\n", bytes ); - - ret = ReadFile( hFile, mem, 0x2000, &bytes, NULL ); - ok( ret, "ReadFile failed error %u\n", GetLastError() ); - ok( bytes == 0x1234, "read %x bytes\n", bytes ); - - ret = ReadFile( hFile, NULL, 1, &bytes, NULL ); - ok( !ret, "ReadFile succeeded\n" ); - ok( GetLastError() == ERROR_NOACCESS || - GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ - "wrong error %u\n", GetLastError() ); - ok( bytes == 0, "read %x bytes\n", bytes ); - - VirtualFree( mem, 0, MEM_FREE ); - - ret = CloseHandle(hFile); - ok( ret, "CloseHandle: error %d\n", GetLastError()); - ret = DeleteFileA(filename); - ok( ret, "DeleteFileA: error %d\n", GetLastError()); -} - -static void test_OpenFile(void) -{ - HFILE hFile; - OFSTRUCT ofs; - BOOL ret; - DWORD retval; - - static const char file[] = "regedit.exe"; - static const char foo[] = ".\\foo-bar-foo.baz"; - static const char *foo_too_long = ".\\foo-bar-foo.baz+++++++++++++++" - "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" - "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" - "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" - "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" - "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"; - char buff[MAX_PATH]; - char buff_long[4*MAX_PATH]; - char filled_0xA5[OFS_MAXPATHNAME]; - char *p; - UINT length; - - /* Check for existing file */ - if (!pGetSystemWindowsDirectoryA) - length = GetWindowsDirectoryA(buff, MAX_PATH); - else - length = pGetSystemWindowsDirectoryA(buff, MAX_PATH); - - if (length + sizeof(file) < MAX_PATH) - { - p = buff + strlen(buff); - if (p > buff && p[-1] != '\\') *p++ = '\\'; - strcpy( p, file ); - memset(&ofs, 0xA5, sizeof(ofs)); - SetLastError(0xfaceabee); - - hFile = OpenFile(buff, &ofs, OF_EXIST); - ok( hFile == TRUE, "%s not found : %d\n", buff, GetLastError() ); - ok( GetLastError() == 0xfaceabee || GetLastError() == ERROR_SUCCESS, - "GetLastError() returns %d\n", GetLastError() ); - ok( ofs.cBytes == sizeof(ofs), "OpenFile set ofs.cBytes to %d\n", ofs.cBytes ); - ok( ofs.nErrCode == ERROR_SUCCESS, "OpenFile set ofs.nErrCode to %d\n", ofs.nErrCode ); - ok( lstrcmpiA(ofs.szPathName, buff) == 0, - "OpenFile returned '%s', but was expected to return '%s' or string filled with 0xA5\n", - ofs.szPathName, buff ); - } - - memset(&filled_0xA5, 0xA5, OFS_MAXPATHNAME); - length = GetCurrentDirectoryA(MAX_PATH, buff); - - /* Check for nonexistent file */ - if (length + sizeof(foo) < MAX_PATH) - { - p = buff + strlen(buff); - if (p > buff && p[-1] != '\\') *p++ = '\\'; - strcpy( p, foo + 2 ); - memset(&ofs, 0xA5, sizeof(ofs)); - SetLastError(0xfaceabee); - - hFile = OpenFile(foo, &ofs, OF_EXIST); - ok( hFile == HFILE_ERROR, "hFile != HFILE_ERROR : %d\n", GetLastError()); - ok( GetLastError() == ERROR_FILE_NOT_FOUND, "GetLastError() returns %d\n", GetLastError() ); - todo_wine - ok( ofs.cBytes == 0xA5, "OpenFile set ofs.cBytes to %d\n", ofs.cBytes ); - ok( ofs.nErrCode == ERROR_FILE_NOT_FOUND, "OpenFile set ofs.nErrCode to %d\n", ofs.nErrCode ); - ok( lstrcmpiA(ofs.szPathName, buff) == 0 || strncmp(ofs.szPathName, filled_0xA5, OFS_MAXPATHNAME) == 0, - "OpenFile returned '%s', but was expected to return '%s' or string filled with 0xA5\n", - ofs.szPathName, buff ); - } - - length = GetCurrentDirectoryA(MAX_PATH, buff_long); - length += lstrlenA(foo_too_long + 1); - - /* Check for nonexistent file with too long filename */ - if (length >= OFS_MAXPATHNAME && length < sizeof(buff_long)) - { - lstrcatA(buff_long, foo_too_long + 1); /* Avoid '.' during concatenation */ - memset(&ofs, 0xA5, sizeof(ofs)); - SetLastError(0xfaceabee); - - hFile = OpenFile(foo_too_long, &ofs, OF_EXIST); - ok( hFile == HFILE_ERROR, "hFile != HFILE_ERROR : %d\n", GetLastError()); - ok( GetLastError() == ERROR_INVALID_DATA || GetLastError() == ERROR_FILENAME_EXCED_RANGE, - "GetLastError() returns %d\n", GetLastError() ); - todo_wine - ok( ofs.cBytes == 0xA5, "OpenFile set ofs.cBytes to %d\n", ofs.cBytes ); - ok( ofs.nErrCode == ERROR_INVALID_DATA || ofs.nErrCode == ERROR_FILENAME_EXCED_RANGE, - "OpenFile set ofs.nErrCode to %d\n", ofs.nErrCode ); - ok( strncmp(ofs.szPathName, filled_0xA5, OFS_MAXPATHNAME) == 0, - "OpenFile returned '%s', but was expected to return string filled with 0xA5\n", - ofs.szPathName ); - } - - length = GetCurrentDirectoryA(MAX_PATH, buff) + sizeof(filename); - - if (length >= MAX_PATH) - { - trace("Buffer too small, requested length = %d, but MAX_PATH = %d. Skipping test.\n", length, MAX_PATH); - return; - } - p = buff + strlen(buff); - if (p > buff && p[-1] != '\\') *p++ = '\\'; - strcpy( p, filename ); - - memset(&ofs, 0xA5, sizeof(ofs)); - SetLastError(0xfaceabee); - /* Create an empty file */ - hFile = OpenFile(filename, &ofs, OF_CREATE); - ok( hFile != HFILE_ERROR, "OpenFile failed to create nonexistent file\n" ); - ok( GetLastError() == 0xfaceabee || GetLastError() == ERROR_SUCCESS, - "GetLastError() returns %d\n", GetLastError() ); - ok( ofs.cBytes == sizeof(OFSTRUCT), "OpenFile set ofs.cBytes to %d\n", ofs.cBytes ); - ok( ofs.nErrCode == ERROR_SUCCESS || broken(ofs.nErrCode != ERROR_SUCCESS) /* win9x */, - "OpenFile set ofs.nErrCode to %d\n", ofs.nErrCode ); - ret = _lclose(hFile); - ok( !ret, "_lclose() returns %d\n", ret ); - retval = GetFileAttributesA(filename); - ok( retval != INVALID_FILE_ATTRIBUTES, "GetFileAttributesA: error %d\n", GetLastError() ); - - memset(&ofs, 0xA5, sizeof(ofs)); - SetLastError(0xfaceabee); - /* Check various opening options: */ - /* for reading only, */ - hFile = OpenFile(filename, &ofs, OF_READ); - ok( hFile != HFILE_ERROR, "OpenFile failed on read\n" ); - ok( GetLastError() == 0xfaceabee || GetLastError() == ERROR_SUCCESS, - "GetLastError() returns %d\n", GetLastError() ); - ok( ofs.cBytes == sizeof(OFSTRUCT), "OpenFile set ofs.cBytes to %d\n", ofs.cBytes ); - ok( ofs.nErrCode == ERROR_SUCCESS || broken(ofs.nErrCode != ERROR_SUCCESS) /* win9x */, - "OpenFile set ofs.nErrCode to %d\n", ofs.nErrCode ); - ok( lstrcmpiA(ofs.szPathName, buff) == 0, - "OpenFile returned '%s', but was expected to return '%s'\n", ofs.szPathName, buff ); - ret = _lclose(hFile); - ok( !ret, "_lclose() returns %d\n", ret ); - - memset(&ofs, 0xA5, sizeof(ofs)); - SetLastError(0xfaceabee); - /* for writing only, */ - hFile = OpenFile(filename, &ofs, OF_WRITE); - ok( hFile != HFILE_ERROR, "OpenFile failed on write\n" ); - ok( GetLastError() == 0xfaceabee || GetLastError() == ERROR_SUCCESS, - "GetLastError() returns %d\n", GetLastError() ); - ok( ofs.cBytes == sizeof(OFSTRUCT), "OpenFile set ofs.cBytes to %d\n", ofs.cBytes ); - ok( ofs.nErrCode == ERROR_SUCCESS || broken(ofs.nErrCode != ERROR_SUCCESS) /* win9x */, - "OpenFile set ofs.nErrCode to %d\n", ofs.nErrCode ); - ok( lstrcmpiA(ofs.szPathName, buff) == 0, - "OpenFile returned '%s', but was expected to return '%s'\n", ofs.szPathName, buff ); - ret = _lclose(hFile); - ok( !ret, "_lclose() returns %d\n", ret ); - - memset(&ofs, 0xA5, sizeof(ofs)); - SetLastError(0xfaceabee); - /* for reading and writing, */ - hFile = OpenFile(filename, &ofs, OF_READWRITE); - ok( hFile != HFILE_ERROR, "OpenFile failed on read/write\n" ); - ok( GetLastError() == 0xfaceabee || GetLastError() == ERROR_SUCCESS, - "GetLastError() returns %d\n", GetLastError() ); - ok( ofs.cBytes == sizeof(OFSTRUCT), "OpenFile set ofs.cBytes to %d\n", ofs.cBytes ); - ok( ofs.nErrCode == ERROR_SUCCESS || broken(ofs.nErrCode != ERROR_SUCCESS) /* win9x */, - "OpenFile set ofs.nErrCode to %d\n", ofs.nErrCode ); - ok( lstrcmpiA(ofs.szPathName, buff) == 0, - "OpenFile returned '%s', but was expected to return '%s'\n", ofs.szPathName, buff ); - ret = _lclose(hFile); - ok( !ret, "_lclose() returns %d\n", ret ); - - memset(&ofs, 0xA5, sizeof(ofs)); - SetLastError(0xfaceabee); - /* for checking file presence. */ - hFile = OpenFile(filename, &ofs, OF_EXIST); - ok( hFile == 1, "OpenFile failed on finding our created file\n" ); - ok( GetLastError() == 0xfaceabee || GetLastError() == ERROR_SUCCESS, - "GetLastError() returns %d\n", GetLastError() ); - ok( ofs.cBytes == sizeof(OFSTRUCT), "OpenFile set ofs.cBytes to %d\n", ofs.cBytes ); - ok( ofs.nErrCode == ERROR_SUCCESS || broken(ofs.nErrCode != ERROR_SUCCESS) /* win9x */, - "OpenFile set ofs.nErrCode to %d\n", ofs.nErrCode ); - ok( lstrcmpiA(ofs.szPathName, buff) == 0, - "OpenFile returned '%s', but was expected to return '%s'\n", ofs.szPathName, buff ); - - memset(&ofs, 0xA5, sizeof(ofs)); - SetLastError(0xfaceabee); - /* Delete the file and make sure it doesn't exist anymore */ - hFile = OpenFile(filename, &ofs, OF_DELETE); - ok( hFile == 1, "OpenFile failed on delete (%d)\n", hFile ); - ok( GetLastError() == 0xfaceabee || GetLastError() == ERROR_SUCCESS, - "GetLastError() returns %d\n", GetLastError() ); - ok( ofs.cBytes == sizeof(OFSTRUCT), "OpenFile set ofs.cBytes to %d\n", ofs.cBytes ); - ok( ofs.nErrCode == ERROR_SUCCESS || broken(ofs.nErrCode != ERROR_SUCCESS) /* win9x */, - "OpenFile set ofs.nErrCode to %d\n", ofs.nErrCode ); - ok( lstrcmpiA(ofs.szPathName, buff) == 0, - "OpenFile returned '%s', but was expected to return '%s'\n", ofs.szPathName, buff ); - - retval = GetFileAttributesA(filename); - ok( retval == INVALID_FILE_ATTRIBUTES, "GetFileAttributesA succeeded on deleted file\n" ); -} - -static void test_overlapped(void) -{ - OVERLAPPED ov; - DWORD r, result; - - /* GetOverlappedResult crashes if the 2nd or 3rd param are NULL */ - if (0) /* tested: WinXP */ - { - GetOverlappedResult(0, NULL, &result, FALSE); - GetOverlappedResult(0, &ov, NULL, FALSE); - GetOverlappedResult(0, NULL, NULL, FALSE); - } - - memset( &ov, 0, sizeof ov ); - result = 1; - r = GetOverlappedResult(0, &ov, &result, 0); - if (r) - ok( result == 0, "wrong result %u\n", result ); - else /* win9x */ - ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError() ); - - result = 0; - ov.Internal = 0; - ov.InternalHigh = 0xabcd; - r = GetOverlappedResult(0, &ov, &result, 0); - if (r) - ok( result == 0xabcd, "wrong result %u\n", result ); - else /* win9x */ - ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError() ); - - SetLastError( 0xb00 ); - result = 0; - ov.Internal = STATUS_INVALID_HANDLE; - ov.InternalHigh = 0xabcd; - r = GetOverlappedResult(0, &ov, &result, 0); - ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError() ); - ok( r == FALSE, "should return false\n"); - ok( result == 0xabcd || result == 0 /* win9x */, "wrong result %u\n", result ); - - SetLastError( 0xb00 ); - result = 0; - ov.Internal = STATUS_PENDING; - ov.InternalHigh = 0xabcd; - r = GetOverlappedResult(0, &ov, &result, 0); - ok( GetLastError() == ERROR_IO_INCOMPLETE || GetLastError() == ERROR_INVALID_HANDLE /* win9x */, - "wrong error %u\n", GetLastError() ); - ok( r == FALSE, "should return false\n"); - ok( result == 0, "wrong result %u\n", result ); - - SetLastError( 0xb00 ); - ov.hEvent = CreateEvent( NULL, 1, 1, NULL ); - ov.Internal = STATUS_PENDING; - ov.InternalHigh = 0xabcd; - r = GetOverlappedResult(0, &ov, &result, 0); - ok( GetLastError() == ERROR_IO_INCOMPLETE || GetLastError() == ERROR_INVALID_HANDLE /* win9x */, - "wrong error %u\n", GetLastError() ); - ok( r == FALSE, "should return false\n"); - - ResetEvent( ov.hEvent ); - - SetLastError( 0xb00 ); - ov.Internal = STATUS_PENDING; - ov.InternalHigh = 0; - r = GetOverlappedResult(0, &ov, &result, 0); - ok( GetLastError() == ERROR_IO_INCOMPLETE || GetLastError() == ERROR_INVALID_HANDLE /* win9x */, - "wrong error %u\n", GetLastError() ); - ok( r == FALSE, "should return false\n"); - - r = CloseHandle( ov.hEvent ); - ok( r == TRUE, "close handle failed\n"); -} - -static void test_RemoveDirectory(void) -{ - int rc; - char directory[] = "removeme"; - - rc = CreateDirectory(directory, NULL); - ok( rc, "Createdirectory failed, gle=%d\n", GetLastError() ); - - rc = SetCurrentDirectory(directory); - ok( rc, "SetCurrentDirectory failed, gle=%d\n", GetLastError() ); - - rc = RemoveDirectory("."); - if (!rc) - { - rc = SetCurrentDirectory(".."); - ok( rc, "SetCurrentDirectory failed, gle=%d\n", GetLastError() ); - - rc = RemoveDirectory(directory); - ok( rc, "RemoveDirectory failed, gle=%d\n", GetLastError() ); - } -} - -static BOOL check_file_time( const FILETIME *ft1, const FILETIME *ft2, UINT tolerance ) -{ - ULONGLONG t1 = ((ULONGLONG)ft1->dwHighDateTime << 32) | ft1->dwLowDateTime; - ULONGLONG t2 = ((ULONGLONG)ft2->dwHighDateTime << 32) | ft2->dwLowDateTime; - return abs(t1 - t2) <= tolerance; -} - -static void test_ReplaceFileA(void) -{ - char replaced[MAX_PATH], replacement[MAX_PATH], backup[MAX_PATH]; - HANDLE hReplacedFile, hReplacementFile, hBackupFile; - static const char replacedData[] = "file-to-replace"; - static const char replacementData[] = "new-file"; - static const char backupData[] = "backup-file"; - FILETIME ftReplaced, ftReplacement, ftBackup; - static const char prefix[] = "pfx"; - char temp_path[MAX_PATH]; - DWORD ret; - BOOL retok, removeBackup = FALSE; - - if (!pReplaceFileA) - { - win_skip("ReplaceFileA() is missing\n"); - return; - } - - ret = GetTempPathA(MAX_PATH, temp_path); - ok(ret != 0, "GetTempPathA error %d\n", GetLastError()); - ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n"); - - ret = GetTempFileNameA(temp_path, prefix, 0, replaced); - ok(ret != 0, "GetTempFileNameA error (replaced) %d\n", GetLastError()); - - ret = GetTempFileNameA(temp_path, prefix, 0, replacement); - ok(ret != 0, "GetTempFileNameA error (replacement) %d\n", GetLastError()); - - ret = GetTempFileNameA(temp_path, prefix, 0, backup); - ok(ret != 0, "GetTempFileNameA error (backup) %d\n", GetLastError()); - - /* place predictable data in the file to be replaced */ - hReplacedFile = CreateFileA(replaced, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0 ); - ok(hReplacedFile != INVALID_HANDLE_VALUE, - "failed to open replaced file\n"); - retok = WriteFile(hReplacedFile, replacedData, sizeof(replacedData), &ret, NULL ); - ok( retok && ret == sizeof(replacedData), - "WriteFile error (replaced) %d\n", GetLastError()); - ok(GetFileSize(hReplacedFile, NULL) == sizeof(replacedData), - "replaced file has wrong size\n"); - /* place predictable data in the file to be the replacement */ - hReplacementFile = CreateFileA(replacement, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0 ); - ok(hReplacementFile != INVALID_HANDLE_VALUE, - "failed to open replacement file\n"); - retok = WriteFile(hReplacementFile, replacementData, sizeof(replacementData), &ret, NULL ); - ok( retok && ret == sizeof(replacementData), - "WriteFile error (replacement) %d\n", GetLastError()); - ok(GetFileSize(hReplacementFile, NULL) == sizeof(replacementData), - "replacement file has wrong size\n"); - /* place predictable data in the backup file (to be over-written) */ - hBackupFile = CreateFileA(backup, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0 ); - ok(hBackupFile != INVALID_HANDLE_VALUE, - "failed to open backup file\n"); - retok = WriteFile(hBackupFile, backupData, sizeof(backupData), &ret, NULL ); - ok( retok && ret == sizeof(backupData), - "WriteFile error (replacement) %d\n", GetLastError()); - ok(GetFileSize(hBackupFile, NULL) == sizeof(backupData), - "backup file has wrong size\n"); - /* change the filetime on the "replaced" file to ensure that it changes */ - ret = GetFileTime(hReplacedFile, NULL, NULL, &ftReplaced); - ok( ret, "GetFileTime error (replaced) %d\n", GetLastError()); - ftReplaced.dwLowDateTime -= 600000000; /* 60 second */ - ret = SetFileTime(hReplacedFile, NULL, NULL, &ftReplaced); - ok( ret, "SetFileTime error (replaced) %d\n", GetLastError()); - GetFileTime(hReplacedFile, NULL, NULL, &ftReplaced); /* get the actual time back */ - CloseHandle(hReplacedFile); - /* change the filetime on the backup to ensure that it changes */ - ret = GetFileTime(hBackupFile, NULL, NULL, &ftBackup); - ok( ret, "GetFileTime error (backup) %d\n", GetLastError()); - ftBackup.dwLowDateTime -= 1200000000; /* 120 second */ - ret = SetFileTime(hBackupFile, NULL, NULL, &ftBackup); - ok( ret, "SetFileTime error (backup) %d\n", GetLastError()); - GetFileTime(hBackupFile, NULL, NULL, &ftBackup); /* get the actual time back */ - CloseHandle(hBackupFile); - /* get the filetime on the replacement file to perform checks */ - ret = GetFileTime(hReplacementFile, NULL, NULL, &ftReplacement); - ok( ret, "GetFileTime error (replacement) %d\n", GetLastError()); - CloseHandle(hReplacementFile); - - /* perform replacement w/ backup - * TODO: flags are not implemented - */ - SetLastError(0xdeadbeef); - ret = pReplaceFileA(replaced, replacement, backup, 0, 0, 0); - ok(ret, "ReplaceFileA: unexpected error %d\n", GetLastError()); - /* make sure that the backup has the size of the old "replaced" file */ - hBackupFile = CreateFileA(backup, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); - ok(hBackupFile != INVALID_HANDLE_VALUE, - "failed to open backup file\n"); - ret = GetFileSize(hBackupFile, NULL); - ok(ret == sizeof(replacedData), - "backup file has wrong size %d\n", ret); - /* make sure that the "replaced" file has the size of the replacement file */ - hReplacedFile = CreateFileA(replaced, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); - ok(hReplacedFile != INVALID_HANDLE_VALUE, - "failed to open replaced file: %d\n", GetLastError()); - if (hReplacedFile != INVALID_HANDLE_VALUE) - { - ret = GetFileSize(hReplacedFile, NULL); - ok(ret == sizeof(replacementData), - "replaced file has wrong size %d\n", ret); - /* make sure that the replacement file no-longer exists */ - hReplacementFile = CreateFileA(replacement, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); - ok(hReplacementFile == INVALID_HANDLE_VALUE, - "unexpected error, replacement file should not exist %d\n", GetLastError()); - /* make sure that the backup has the old "replaced" filetime */ - ret = GetFileTime(hBackupFile, NULL, NULL, &ftBackup); - ok( ret, "GetFileTime error (backup %d\n", GetLastError()); - ok(check_file_time(&ftBackup, &ftReplaced, 20000000), "backup file has wrong filetime\n"); - CloseHandle(hBackupFile); - /* make sure that the "replaced" has the old replacement filetime */ - ret = GetFileTime(hReplacedFile, NULL, NULL, &ftReplaced); - ok( ret, "GetFileTime error (backup %d\n", GetLastError()); - ok(check_file_time(&ftReplaced, &ftReplacement, 20000000), - "replaced file has wrong filetime %x%08x / %x%08x\n", - ftReplaced.dwHighDateTime, ftReplaced.dwLowDateTime, - ftReplacement.dwHighDateTime, ftReplacement.dwLowDateTime ); - CloseHandle(hReplacedFile); - } - else - skip("couldn't open replacement file, skipping tests\n"); - - /* re-create replacement file for pass w/o backup (blank) */ - ret = GetTempFileNameA(temp_path, prefix, 0, replacement); - ok(ret != 0, "GetTempFileNameA error (replacement) %d\n", GetLastError()); - /* perform replacement w/o backup - * TODO: flags are not implemented - */ - SetLastError(0xdeadbeef); - ret = pReplaceFileA(replaced, replacement, NULL, 0, 0, 0); - ok(ret || GetLastError() == ERROR_ACCESS_DENIED, - "ReplaceFileA: unexpected error %d\n", GetLastError()); - - /* re-create replacement file for pass w/ backup (backup-file not existing) */ - ret = GetTempFileNameA(temp_path, prefix, 0, replacement); - ok(ret != 0, "GetTempFileNameA error (replacement) %d\n", GetLastError()); - ret = DeleteFileA(backup); - ok(ret, "DeleteFileA: error (backup) %d\n", GetLastError()); - /* perform replacement w/ backup (no pre-existing backup) - * TODO: flags are not implemented - */ - SetLastError(0xdeadbeef); - ret = pReplaceFileA(replaced, replacement, backup, 0, 0, 0); - ok(ret || GetLastError() == ERROR_ACCESS_DENIED, - "ReplaceFileA: unexpected error %d\n", GetLastError()); - if (ret) - removeBackup = TRUE; - - /* re-create replacement file for pass w/ no permissions to "replaced" */ - ret = GetTempFileNameA(temp_path, prefix, 0, replacement); - ok(ret != 0, "GetTempFileNameA error (replacement) %d\n", GetLastError()); - ret = SetFileAttributesA(replaced, FILE_ATTRIBUTE_READONLY); - ok(ret || GetLastError() == ERROR_ACCESS_DENIED, - "SetFileAttributesA: error setting to read only %d\n", GetLastError()); - /* perform replacement w/ backup (no permission to "replaced") - * TODO: flags are not implemented - */ - SetLastError(0xdeadbeef); - ret = pReplaceFileA(replaced, replacement, backup, 0, 0, 0); - ok(ret != ERROR_UNABLE_TO_REMOVE_REPLACED, "ReplaceFileA: unexpected error %d\n", GetLastError()); - /* make sure that the replacement file still exists */ - hReplacementFile = CreateFileA(replacement, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); - ok(hReplacementFile != INVALID_HANDLE_VALUE || - broken(GetLastError() == ERROR_FILE_NOT_FOUND), /* win2k */ - "unexpected error, replacement file should still exist %d\n", GetLastError()); - CloseHandle(hReplacementFile); - ret = SetFileAttributesA(replaced, FILE_ATTRIBUTE_NORMAL); - ok(ret || GetLastError() == ERROR_ACCESS_DENIED, - "SetFileAttributesA: error setting to normal %d\n", GetLastError()); - - /* replacement file still exists, make pass w/o "replaced" */ - ret = DeleteFileA(replaced); - ok(ret || GetLastError() == ERROR_ACCESS_DENIED, - "DeleteFileA: error (replaced) %d\n", GetLastError()); - /* perform replacement w/ backup (no pre-existing backup or "replaced") - * TODO: flags are not implemented - */ - SetLastError(0xdeadbeef); - ret = pReplaceFileA(replaced, replacement, backup, 0, 0, 0); - ok(!ret && (GetLastError() == ERROR_FILE_NOT_FOUND || - GetLastError() == ERROR_ACCESS_DENIED), - "ReplaceFileA: unexpected error %d\n", GetLastError()); - - /* perform replacement w/o existing "replacement" file - * TODO: flags are not implemented - */ - SetLastError(0xdeadbeef); - ret = pReplaceFileA(replaced, replacement, NULL, 0, 0, 0); - ok(!ret && (GetLastError() == ERROR_FILE_NOT_FOUND || - GetLastError() == ERROR_ACCESS_DENIED), - "ReplaceFileA: unexpected error %d\n", GetLastError()); - DeleteFileA( replacement ); - - /* - * if the first round (w/ backup) worked then as long as there is no - * failure then there is no need to check this round (w/ backup is the - * more complete case) - */ - - /* delete temporary files, replacement and replaced are already deleted */ - if (removeBackup) - { - ret = DeleteFileA(backup); - ok(ret || - broken(GetLastError() == ERROR_ACCESS_DENIED), /* win2k */ - "DeleteFileA: error (backup) %d\n", GetLastError()); - } -} - -/* - * ReplaceFileW is a simpler case of ReplaceFileA, there is no - * need to be as thorough. - */ -static void test_ReplaceFileW(void) -{ - WCHAR replaced[MAX_PATH], replacement[MAX_PATH], backup[MAX_PATH]; - static const WCHAR prefix[] = {'p','f','x',0}; - WCHAR temp_path[MAX_PATH]; - DWORD ret; - BOOL removeBackup = FALSE; - - if (!pReplaceFileW) - { - win_skip("ReplaceFileW() is missing\n"); - return; - } - - ret = GetTempPathW(MAX_PATH, temp_path); - if (ret == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("GetTempPathW is not available\n"); - return; - } - ok(ret != 0, "GetTempPathW error %d\n", GetLastError()); - ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n"); - - ret = GetTempFileNameW(temp_path, prefix, 0, replaced); - ok(ret != 0, "GetTempFileNameW error (replaced) %d\n", GetLastError()); - - ret = GetTempFileNameW(temp_path, prefix, 0, replacement); - ok(ret != 0, "GetTempFileNameW error (replacement) %d\n", GetLastError()); - - ret = GetTempFileNameW(temp_path, prefix, 0, backup); - ok(ret != 0, "GetTempFileNameW error (backup) %d\n", GetLastError()); - - ret = pReplaceFileW(replaced, replacement, backup, 0, 0, 0); - ok(ret, "ReplaceFileW: error %d\n", GetLastError()); - - ret = GetTempFileNameW(temp_path, prefix, 0, replacement); - ok(ret != 0, "GetTempFileNameW error (replacement) %d\n", GetLastError()); - ret = pReplaceFileW(replaced, replacement, NULL, 0, 0, 0); - ok(ret || GetLastError() == ERROR_ACCESS_DENIED, - "ReplaceFileW: error %d\n", GetLastError()); - - ret = GetTempFileNameW(temp_path, prefix, 0, replacement); - ok(ret != 0, "GetTempFileNameW error (replacement) %d\n", GetLastError()); - ret = DeleteFileW(backup); - ok(ret, "DeleteFileW: error (backup) %d\n", GetLastError()); - ret = pReplaceFileW(replaced, replacement, backup, 0, 0, 0); - ok(ret || GetLastError() == ERROR_ACCESS_DENIED, - "ReplaceFileW: error %d\n", GetLastError()); - - ret = GetTempFileNameW(temp_path, prefix, 0, replacement); - ok(ret != 0, "GetTempFileNameW error (replacement) %d\n", GetLastError()); - ret = SetFileAttributesW(replaced, FILE_ATTRIBUTE_READONLY); - ok(ret || GetLastError() == ERROR_ACCESS_DENIED, - "SetFileAttributesW: error setting to read only %d\n", GetLastError()); - - ret = pReplaceFileW(replaced, replacement, backup, 0, 0, 0); - ok(ret != ERROR_UNABLE_TO_REMOVE_REPLACED, - "ReplaceFileW: unexpected error %d\n", GetLastError()); - ret = SetFileAttributesW(replaced, FILE_ATTRIBUTE_NORMAL); - ok(ret || GetLastError() == ERROR_ACCESS_DENIED, - "SetFileAttributesW: error setting to normal %d\n", GetLastError()); - if (ret) - removeBackup = TRUE; - - ret = DeleteFileW(replaced); - ok(ret, "DeleteFileW: error (replaced) %d\n", GetLastError()); - ret = pReplaceFileW(replaced, replacement, backup, 0, 0, 0); - ok(!ret, "ReplaceFileW: error %d\n", GetLastError()); - - ret = pReplaceFileW(replaced, replacement, NULL, 0, 0, 0); - ok(!ret && (GetLastError() == ERROR_FILE_NOT_FOUND || - GetLastError() == ERROR_ACCESS_DENIED), - "ReplaceFileW: unexpected error %d\n", GetLastError()); - DeleteFileW( replacement ); - - if (removeBackup) - { - ret = DeleteFileW(backup); - ok(ret || - broken(GetLastError() == ERROR_ACCESS_DENIED), /* win2k */ - "DeleteFileW: error (backup) %d\n", GetLastError()); - } -} - -START_TEST(file) -{ - InitFunctionPointers(); - - test__hread( ); - test__hwrite( ); - test__lclose( ); - test__lcreat( ); - test__llseek( ); - test__llopen( ); - test__lread( ); - test__lwrite( ); - test_GetTempFileNameA(); - test_CopyFileA(); - test_CopyFileW(); - test_CreateFileA(); - test_CreateFileW(); - test_DeleteFileA(); - test_DeleteFileW(); - test_MoveFileA(); - test_MoveFileW(); - test_FindFirstFileA(); - test_FindNextFileA(); - test_FindFirstFileExA(0); - /* FindExLimitToDirectories is ignored if the file system doesn't support directory filtering */ - test_FindFirstFileExA(FindExSearchLimitToDirectories); - test_LockFile(); - test_file_sharing(); - test_offset_in_overlapped_structure(); - test_MapFile(); - test_GetFileType(); - test_async_file_errors(); - test_read_write(); - test_OpenFile(); - test_overlapped(); - test_RemoveDirectory(); - test_ReplaceFileA(); - test_ReplaceFileW(); -} diff --git a/rostests/winetests/kernel32/format_msg.c b/rostests/winetests/kernel32/format_msg.c deleted file mode 100755 index 37ea3e9cbf9..00000000000 --- a/rostests/winetests/kernel32/format_msg.c +++ /dev/null @@ -1,1603 +0,0 @@ -/* Unit test suite for FormatMessageA/W - * - * Copyright 2002 Mike McCormack 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 - -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winnls.h" - -static DWORD __cdecl doit(DWORD flags, LPCVOID src, DWORD msg_id, DWORD lang_id, - LPSTR out, DWORD outsize, ... ) -{ - __ms_va_list list; - DWORD r; - - __ms_va_start(list, outsize); - r = FormatMessageA(flags, src, msg_id, - lang_id, out, outsize, &list); - __ms_va_end(list); - return r; -} - -static DWORD __cdecl doitW(DWORD flags, LPCVOID src, DWORD msg_id, DWORD lang_id, - LPWSTR out, DWORD outsize, ... ) -{ - __ms_va_list list; - DWORD r; - - __ms_va_start(list, outsize); - r = FormatMessageW(flags, src, msg_id, - lang_id, out, outsize, &list); - __ms_va_end(list); - return r; -} - -static void test_message_from_string_wide(void) -{ - static const WCHAR test[] = {'t','e','s','t',0}; - static const WCHAR empty[] = {0}; - static const WCHAR te[] = {'t','e',0}; - static const WCHAR st[] = {'s','t',0}; - static const WCHAR t[] = {'t',0}; - static const WCHAR e[] = {'e',0}; - static const WCHAR s[] = {'s',0}; - static const WCHAR fmt_null[] = {'%',0}; - static const WCHAR fmt_tnull[] = {'t','e','s','t','%',0}; - static const WCHAR fmt_1[] = {'%','1',0}; - static const WCHAR fmt_12[] = {'%','1','%','2',0}; - static const WCHAR fmt_123[] = {'%','1','%','3','%','2','%','1',0}; - static const WCHAR fmt_123c[] = {'%','1','!','c','!','%','2','!','c','!','%','3','!','c','!','%','1','!','c','!',0}; - static const WCHAR fmt_123lc[] = {'%','1','!','l','c','!','%','2','!','l','c','!','%','3','!','l','c','!','%','1','!','l','c','!',0}; - static const WCHAR fmt_123wc[] = {'%','1','!','w','c','!','%','2','!','w','c','!','%','3','!','w','c','!','%','1','!','w','c','!',0}; - static const WCHAR fmt_123C[] = {'%','1','!','C','!','%','2','!','C','!','%','3','!','C','!','%','1','!','C','!',0}; - static const WCHAR fmt_123d[] = {'%','1','!','d','!','%','2','!','d','!','%','3','!','d','!',0}; - static const WCHAR fmt_1s[] = {'%','1','!','s','!',0}; - static const WCHAR fmt_s[] = {'%','!','s','!',0}; - static const WCHAR fmt_ls[] = {'%','!','l','s','!',0}; - static const WCHAR fmt_ws[] = {'%','!','w','s','!',0}; - static const WCHAR fmt_S[] = {'%','!','S','!',0}; - static const WCHAR fmt_14d[] = {'%','1','!','4','d','!',0}; - static const WCHAR fmt_14x[] = {'%','1','!','4','x','!',0}; - static const WCHAR fmt_14X[] = {'%','1','!','4','X','!',0}; - static const WCHAR fmt_1_4X[] = {'%','1','!','-','4','X','!',0}; - static const WCHAR fmt_1_4d[] = {'%','1','!','-','4','d','!',0}; - static const WCHAR fmt_2pct[] = {' ','%','%','%','%',' ',0}; - static const WCHAR fmt_2dot1d[] = {' ', '%','.','%','.',' ',' ','%','1','!','d','!',0}; - static const WCHAR fmt_t0t[] = {'t','e','s','t','%','0','t','e','s','t',0}; - static const WCHAR fmt_yah[] = {'y','a','h','%','!','%','0',' ',' ',' ',0}; - static const WCHAR fmt_space[] = {'%',' ','%',' ',' ',' ',0}; - static const WCHAR fmt_nrt[] = {'%','n','%','r','%','t',0}; - static const WCHAR fmt_hi_lf[] = {'h','i','\n',0}; - static const WCHAR fmt_hi_crlf[] = {'h','i','\r','\n',0}; - static const WCHAR fmt_cr[] = {'\r',0}; - static const WCHAR fmt_crcrlf[] = {'\r','\r','\n',0}; - static const WCHAR fmt_13s[] = {'%','1','!','3','s','!',0}; - static const WCHAR fmt_1os[] = {'%','1','!','*','s','!',0}; - static const WCHAR fmt_142u[] = {'%','1','!','4','.','2','u','!',0}; - static const WCHAR fmt_1oou[] = {'%','1','!','*','.','*','u','!',0}; - static const WCHAR fmt_1oou1oou[] = {'%','1','!','*','.','*','u','!',',','%','1','!','*','.','*','u','!',0}; - static const WCHAR fmt_1oou3oou[] = {'%','1','!','*','.','*','u','!',',','%','3','!','*','.','*','u','!',0}; - static const WCHAR fmt_1oou4oou[] = {'%','1','!','*','.','*','u','!',',','%','4','!','*','.','*','u','!',0}; - - static const WCHAR s_123d[] = {'1','2','3',0}; - static const WCHAR s_14d[] = {' ',' ',' ','1',0}; - static const WCHAR s_14x[] = {' ',' ',' ','b',0}; - static const WCHAR s_14X[] = {' ',' ',' ','B',0}; - static const WCHAR s_1_4X[] = {'B',' ',' ',' ',0}; - static const WCHAR s_14d2[] = {' ',' ','1','1',0}; - static const WCHAR s_1_4d[] = {'1',' ',' ',' ',0}; - static const WCHAR s_1AB[] = {' ','1','A','B',0}; - static const WCHAR s_2pct[] = {' ','%','%',' ',0}; - static const WCHAR s_2dot147[] = {' ','.','.',' ',' ','4','2','7',0}; - static const WCHAR s_yah[] = {'y','a','h','!',0}; - static const WCHAR s_space[] = {' ',' ',' ',' ',0}; - static const WCHAR s_nrt[] = {'\r','\n','\r','\t',0}; - static const WCHAR s_hi_crlf[] = {'h','i','\r','\n',0}; - static const WCHAR s_crlf[] = {'\r','\n',0}; - static const WCHAR s_crlfcrlf[] = {'\r','\n','\r','\n',0}; - static const WCHAR s_hi_sp[] = {'h','i',' ',0}; - static const WCHAR s_sp[] = {' ',0}; - static const WCHAR s_2sp[] = {' ',' ',0}; - static const WCHAR s_spt[] = {' ',' ','t',0}; - static const WCHAR s_sp3t[] = {' ',' ',' ','t',0}; - static const WCHAR s_sp03[] = {' ',' ','0','3',0}; - static const WCHAR s_sp001[] = {' ',' ','0','0','1',0}; - static const WCHAR s_sp001002[] = {' ',' ','0','0','1',',',' ','0','0','0','2',0}; - static const WCHAR s_sp001sp002[] = {' ',' ','0','0','1',',',' ',' ','0','0','0','2',0}; - static const WCHAR s_sp002sp001[] = {' ',' ','0','0','0','2',',',' ',' ','0','0','1',0}; - static const WCHAR s_sp002sp003[] = {' ',' ','0','0','0','2',',',' ','0','0','0','0','3',0}; - static const WCHAR s_sp001004[] = {' ',' ','0','0','1',',','0','0','0','0','0','4',0}; - - static const WCHAR init_buf[] = {'x', 'x', 'x', 'x', 'x', 'x'}; - static const WCHAR broken_buf[] = {'t','e','s','t','x','x'}; - - WCHAR out[0x100] = {0}; - DWORD r, error; - - /* the basics */ - r = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, test, 0, - 0, out, sizeof(out)/sizeof(WCHAR), NULL); - ok(!lstrcmpW(test, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4, "failed: r=%d\n", r); - - /* null string, crashes on Windows */ - if (0) - { - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - FormatMessageW(FORMAT_MESSAGE_FROM_STRING, NULL, 0, - 0, out, sizeof(out)/sizeof(WCHAR), NULL); - } - - /* empty string */ - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - r = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, empty, 0, - 0, out, sizeof(out)/sizeof(WCHAR), NULL); - error = GetLastError(); - ok(!lstrcmpW(empty, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==0, "succeeded: r=%d\n", r); - ok(error==0xdeadbeef, "last error %u\n", error); - - /* format placeholder with no specifier */ - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - r = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, fmt_null, 0, - 0, out, sizeof(out)/sizeof(WCHAR), NULL); - error = GetLastError(); - ok(!memcmp(out, init_buf, sizeof(init_buf)), - "Expected the buffer to be unchanged\n"); - ok(r==0, "succeeded: r=%d\n", r); - ok(error==ERROR_INVALID_PARAMETER, "last error %u\n", error); - - /* test string with format placeholder with no specifier */ - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - r = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, fmt_tnull, 0, - 0, out, sizeof(out)/sizeof(WCHAR), NULL); - error = GetLastError(); - ok(!memcmp(out, init_buf, sizeof(init_buf)) || - broken(!memcmp(out, broken_buf, sizeof(broken_buf))), /* W2K3+ */ - "Expected the buffer to be unchanged\n"); - ok(r==0, "succeeded: r=%d\n", r); - ok(error==ERROR_INVALID_PARAMETER, "last error %u\n", error); - - /* insertion with no variadic arguments */ - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - r = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, fmt_1, 0, - 0, out, sizeof(out)/sizeof(WCHAR), NULL); - error = GetLastError(); - ok(!memcmp(out, init_buf, sizeof(init_buf)), - "Expected the buffer to be unchanged\n"); - ok(r==0, "succeeded: r=%d\n", r); - ok(error==ERROR_INVALID_PARAMETER, "last error %u\n", error); - - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - r = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY, fmt_1, 0, - 0, out, sizeof(out)/sizeof(WCHAR), NULL); - error = GetLastError(); - ok(!memcmp(out, init_buf, sizeof(init_buf)), - "Expected the buffer to be unchanged\n"); - ok(r==0, "succeeded: r=%d\n", r); - ok(error==ERROR_INVALID_PARAMETER, "last error %u\n", error); - - /* using the format feature */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1s, 0, - 0, out, sizeof(out)/sizeof(WCHAR), test); - ok(!lstrcmpW(test, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); - - /* no format */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1, 0, - 0, out, sizeof(out)/sizeof(WCHAR), test); - ok(!lstrcmpW(test, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); - - /* two pieces */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_12, 0, - 0, out, sizeof(out)/sizeof(WCHAR), te, st); - ok(!lstrcmpW(test, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); - - /* three pieces */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_123, 0, - 0, out, sizeof(out)/sizeof(WCHAR), t, s, e); - ok(!lstrcmpW(test, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); - - /* s doesn't seem to work in format strings */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_s, 0, - 0, out, sizeof(out)/sizeof(WCHAR), test); - ok(!lstrcmpW(&fmt_s[1], out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==3, "failed: r=%d\n", r); - - /* nor ls */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_ls, 0, - 0, out, sizeof(out)/sizeof(WCHAR), test); - ok(!lstrcmpW(&fmt_ls[1], out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4, "failed: r=%d\n", r); - - /* nor S */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_S, 0, - 0, out, sizeof(out)/sizeof(WCHAR), test); - ok(!lstrcmpW(&fmt_S[1], out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==3, "failed: r=%d\n", r); - - /* nor ws */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_ws, 0, - 0, out, sizeof(out)/sizeof(WCHAR), test); - ok(!lstrcmpW(&fmt_ws[1], out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4, "failed: r=%d\n", r); - - /* as characters */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_123c, 0, - 0, out, sizeof(out)/sizeof(WCHAR), 't', 'e', 's'); - ok(!lstrcmpW(test, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); - - /* lc is unicode */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_123lc, 0, - 0, out, sizeof(out)/sizeof(WCHAR), 't', 'e', 's'); - ok(!lstrcmpW(test, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); - - /* wc is unicode */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_123wc, 0, - 0, out, sizeof(out)/sizeof(WCHAR), 't', 'e', 's'); - ok(!lstrcmpW(test, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); - - /* C is unicode */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_123C, 0, - 0, out, sizeof(out)/sizeof(WCHAR), 't', 'e', 's'); - ok(!lstrcmpW(test, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); - - /* some numbers */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_123d, 0, - 0, out, sizeof(out)/sizeof(WCHAR), 1, 2, 3); - ok(!lstrcmpW(s_123d, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==3,"failed: r=%d\n", r); - - /* a single digit with some spacing */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_14d, 0, - 0, out, sizeof(out)/sizeof(WCHAR), 1); - ok(!lstrcmpW(s_14d, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); - - /* a single digit, left justified */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1_4d, 0, - 0, out, sizeof(out)/sizeof(CHAR), 1); - ok(!lstrcmpW(s_1_4d, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); - - /* two digit decimal number */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_14d, 0, - 0, out, sizeof(out)/sizeof(WCHAR), 11); - ok(!lstrcmpW(s_14d2, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); - - /* a hex number */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_14x, 0, - 0, out, sizeof(out)/sizeof(WCHAR), 11); - ok(!lstrcmpW(s_14x, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); - - /* a hex number, upper case */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_14X, 0, - 0, out, sizeof(out)/sizeof(WCHAR), 11); - ok(!lstrcmpW(s_14X, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); - - /* a hex number, upper case, left justified */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1_4X, 0, - 0, out, sizeof(out)/sizeof(WCHAR), 11); - ok(!lstrcmpW(s_1_4X, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); - - /* a long hex number, upper case */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_14X, 0, - 0, out, sizeof(out)/sizeof(WCHAR), 0x1ab); - ok(!lstrcmpW(s_1AB, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); - - /* two percent... */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_2pct, 0, - 0, out, sizeof(out)/sizeof(WCHAR)); - ok(!lstrcmpW(s_2pct, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); - - /* periods are special cases */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_2dot1d, 0, - 0, out, sizeof(out)/sizeof(WCHAR), 0x1ab); - ok(!lstrcmpW(s_2dot147, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==8,"failed: r=%d\n", r); - - /* %0 ends the line */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_t0t, 0, - 0, out, sizeof(out)/sizeof(WCHAR)); - ok(!lstrcmpW(test, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); - - /* %! prints an exclamation */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_yah, 0, - 0, out, sizeof(out)/sizeof(WCHAR)); - ok(!lstrcmpW(s_yah, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); - - /* %space */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_space, 0, - 0, out, sizeof(out)/sizeof(WCHAR)); - ok(!lstrcmpW(s_space, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); - - /* %n yields \r\n, %r yields \r, %t yields \t */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_nrt, 0, - 0, out, sizeof(out)/sizeof(WCHAR)); - ok(!lstrcmpW(s_nrt, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); - - /* line feed */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_hi_lf, 0, - 0, out, sizeof(out)/sizeof(WCHAR)); - ok(!lstrcmpW(s_hi_crlf, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); - - /* carriage return line feed */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_hi_crlf, 0, - 0, out, sizeof(out)/sizeof(WCHAR)); - ok(!lstrcmpW(s_hi_crlf, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); - - /* carriage return */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_cr, 0, - 0, out, sizeof(out)/sizeof(WCHAR)); - ok(!lstrcmpW(s_crlf, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==2,"failed: r=%d\n", r); - - /* double carriage return line feed */ - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_crcrlf, 0, - 0, out, sizeof(out)/sizeof(WCHAR)); - ok(!lstrcmpW(s_crlfcrlf, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); - - /* precision and width */ - - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_13s, - 0, 0, out, sizeof(out)/sizeof(WCHAR), t ); - ok(!lstrcmpW(s_spt, out),"failed out=[%s]\n", wine_dbgstr_w(out)); - ok(r==3, "failed: r=%d\n",r); - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1os, - 0, 0, out, sizeof(out)/sizeof(WCHAR), 4, t ); - ok(!lstrcmpW( s_sp3t, out),"failed out=[%s]\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n",r); - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_142u, - 0, 0, out, sizeof(out)/sizeof(WCHAR), 3 ); - ok(!lstrcmpW( s_sp03, out),"failed out=[%s]\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n",r); - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1oou, - 0, 0, out, sizeof(out)/sizeof(WCHAR), 5, 3, 1 ); - ok(!lstrcmpW( s_sp001, out),"failed out=[%s]\n", wine_dbgstr_w(out)); - ok(r==5,"failed: r=%d\n",r); - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1oou1oou, - 0, 0, out, sizeof(out)/sizeof(WCHAR), 5, 3, 1, 4, 2 ); - ok(!lstrcmpW( s_sp001002, out),"failed out=[%s]\n", wine_dbgstr_w(out)); - ok(r==11,"failed: r=%d\n",r); - r = doitW(FORMAT_MESSAGE_FROM_STRING, fmt_1oou3oou, - 0, 0, out, sizeof(out)/sizeof(WCHAR), 5, 3, 1, 6, 4, 2 ); - ok(!lstrcmpW( s_sp001sp002, out) || - broken(!lstrcmpW(s_sp001004, out)), /* NT4/Win2k */ - "failed out=[%s]\n", wine_dbgstr_w(out)); - ok(r==12,"failed: r=%d\n",r); - /* args are not counted the same way with an argument array */ - { - ULONG_PTR args[] = { 6, 4, 2, 5, 3, 1 }; - r = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY, fmt_1oou1oou, - 0, 0, out, sizeof(out)/sizeof(WCHAR), (__ms_va_list *)args ); - ok(!lstrcmpW(s_sp002sp003, out),"failed out=[%s]\n", wine_dbgstr_w(out)); - ok(r==13,"failed: r=%d\n",r); - r = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY, fmt_1oou4oou, - 0, 0, out, sizeof(out)/sizeof(WCHAR), (__ms_va_list *)args ); - ok(!lstrcmpW(s_sp002sp001, out),"failed out=[%s]\n", wine_dbgstr_w(out)); - ok(r==12,"failed: r=%d\n",r); - } - - /* change of pace... test the low byte of dwflags */ - - /* line feed */ - r = doitW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, fmt_hi_lf, 0, - 0, out, sizeof(out)/sizeof(WCHAR)); - ok(!lstrcmpW(s_hi_sp, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==3,"failed: r=%d\n", r); - - /* carriage return line feed */ - r = doitW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, fmt_hi_crlf, 0, - 0, out, sizeof(out)/sizeof(WCHAR)); - ok(!lstrcmpW(s_hi_sp, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==3,"failed: r=%d\n", r); - - /* carriage return */ - r = doitW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, fmt_cr, 0, - 0, out, sizeof(out)/sizeof(WCHAR)); - ok(!lstrcmpW(s_sp, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==1,"failed: r=%d\n", r); - - /* double carriage return line feed */ - r = doitW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, fmt_crcrlf, 0, - 0, out, sizeof(out)/sizeof(WCHAR)); - ok(!lstrcmpW(s_2sp, out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==2,"failed: r=%d\n", r); -} - -static void test_message_from_string(void) -{ - CHAR out[0x100] = {0}; - DWORD r; - static const char init_buf[] = {'x', 'x', 'x', 'x', 'x', 'x'}; - static const WCHAR szwTest[] = { 't','e','s','t',0}; - - /* the basics */ - r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "test", 0, - 0, out, sizeof(out)/sizeof(CHAR),NULL); - ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* null string, crashes on Windows */ - if (0) - { - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - FormatMessageA(FORMAT_MESSAGE_FROM_STRING, NULL, 0, - 0, out, sizeof(out)/sizeof(CHAR), NULL); - } - - /* empty string */ - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "", 0, - 0, out, sizeof(out)/sizeof(CHAR), NULL); - ok(!memcmp(out, init_buf, sizeof(init_buf)), "Expected the buffer to be untouched\n"); - ok(r==0, "succeeded: r=%d\n", r); - ok(GetLastError()==0xdeadbeef, - "last error %u\n", GetLastError()); - - /* format placeholder with no specifier */ - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "%", 0, - 0, out, sizeof(out)/sizeof(CHAR), NULL); - ok(!memcmp(out, init_buf, sizeof(init_buf)), - "Expected the buffer to be untouched\n"); - ok(r==0, "succeeded: r=%d\n", r); - ok(GetLastError()==ERROR_INVALID_PARAMETER, - "last error %u\n", GetLastError()); - - /* test string with format placeholder with no specifier */ - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "test%", 0, - 0, out, sizeof(out)/sizeof(CHAR), NULL); - ok(!memcmp(out, init_buf, sizeof(init_buf)), - "Expected the buffer to be untouched\n"); - ok(r==0, "succeeded: r=%d\n", r); - ok(GetLastError()==ERROR_INVALID_PARAMETER, - "last error %u\n", GetLastError()); - - /* insertion with no variadic arguments */ - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "%1", 0, - 0, out, sizeof(out)/sizeof(CHAR), NULL); - ok(!memcmp(out, init_buf, sizeof(init_buf)), "Expected the buffer to be untouched\n"); - ok(r==0, "succeeded: r=%d\n", r); - ok(GetLastError()==ERROR_INVALID_PARAMETER, "last error %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY, "%1", 0, - 0, out, sizeof(out)/sizeof(CHAR), NULL); - ok(!memcmp(out, init_buf, sizeof(init_buf)), "Expected the buffer to be untouched\n"); - ok(r==0, "succeeded: r=%d\n", r); - ok(GetLastError()==ERROR_INVALID_PARAMETER, "last error %u\n", GetLastError()); - - /* using the format feature */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!s!", 0, - 0, out, sizeof(out)/sizeof(CHAR), "test"); - ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* no format */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "%1", 0, - 0, out, sizeof(out)/sizeof(CHAR), "test"); - ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* two pieces */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "%1%2", 0, - 0, out, sizeof(out)/sizeof(CHAR), "te","st"); - ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* three pieces */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "%1%3%2%1", 0, - 0, out, sizeof(out)/sizeof(CHAR), "t","s","e"); - ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* s doesn't seem to work in format strings */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "%!s!", 0, - 0, out, sizeof(out)/sizeof(CHAR), "test"); - ok(!strcmp("!s!", out),"failed out=[%s]\n",out); - ok(r==3,"failed: r=%d\n",r); - - /* ls is unicode */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!ls!", 0, - 0, out, sizeof(out)/sizeof(CHAR), szwTest); - ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* S is unicode */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!S!", 0, - 0, out, sizeof(out)/sizeof(CHAR), szwTest); - ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* ws is unicode */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!ws!", 0, - 0, out, sizeof(out)/sizeof(CHAR), szwTest); - ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* as characters */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!c!%2!c!%3!c!%1!c!", 0, - 0, out, sizeof(out)/sizeof(CHAR), 't','e','s'); - ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* lc is unicode */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!lc!%2!lc!%3!lc!%1!lc!", 0, - 0, out, sizeof(out)/sizeof(CHAR), 't','e','s'); - ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* wc is unicode */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!wc!%2!wc!%3!wc!%1!wc!", 0, - 0, out, sizeof(out)/sizeof(CHAR), 't','e','s'); - ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* C is unicode */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!C!%2!C!%3!C!%1!C!", 0, - 0, out, sizeof(out)/sizeof(CHAR), 't','e','s'); - ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* some numbers */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!d!%2!d!%3!d!", 0, - 0, out, sizeof(out)/sizeof(CHAR), 1,2,3); - ok(!strcmp("123", out),"failed out=[%s]\n",out); - ok(r==3,"failed: r=%d\n",r); - - /* a single digit with some spacing */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!4d!", 0, - 0, out, sizeof(out)/sizeof(CHAR), 1); - ok(!strcmp(" 1", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* a single digit, left justified */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!-4d!", 0, - 0, out, sizeof(out)/sizeof(CHAR), 1); - ok(!strcmp("1 ", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* two digit decimal number */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!4d!", 0, - 0, out, sizeof(out)/sizeof(CHAR), 11); - ok(!strcmp(" 11", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* a hex number */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!4x!", 0, - 0, out, sizeof(out)/sizeof(CHAR), 11); - ok(!strcmp(" b", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* a hex number, upper case */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!4X!", 0, - 0, out, sizeof(out)/sizeof(CHAR), 11); - ok(!strcmp(" B", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* a hex number, upper case, left justified */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!-4X!", 0, - 0, out, sizeof(out)/sizeof(CHAR), 11); - ok(!strcmp("B ", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* a long hex number, upper case */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!4X!", 0, - 0, out, sizeof(out)/sizeof(CHAR), 0x1ab); - ok(!strcmp(" 1AB", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* two percent... */ - r = doit(FORMAT_MESSAGE_FROM_STRING, " %%%% ", 0, - 0, out, sizeof(out)/sizeof(CHAR)); - ok(!strcmp(" %% ", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* periods are special cases */ - r = doit(FORMAT_MESSAGE_FROM_STRING, " %.%. %1!d!", 0, - 0, out, sizeof(out)/sizeof(CHAR), 0x1ab); - ok(!strcmp(" .. 427", out),"failed out=[%s]\n",out); - ok(r==7,"failed: r=%d\n",r); - - /* %0 ends the line */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "test%0test", 0, - 0, out, sizeof(out)/sizeof(CHAR)); - ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* %! prints an exclamation */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "yah%!%0 ", 0, - 0, out, sizeof(out)/sizeof(CHAR)); - ok(!strcmp("yah!", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* %space */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "% % ", 0, - 0, out, sizeof(out)/sizeof(CHAR)); - ok(!strcmp(" ", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* %n yields \r\n, %r yields \r, %t yields \t */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "%n%r%t", 0, - 0, out, sizeof(out)/sizeof(CHAR)); - ok(!strcmp("\r\n\r\t", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* line feed */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "hi\n", 0, - 0, out, sizeof(out)/sizeof(CHAR)); - ok(!strcmp("hi\r\n", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* carriage return line feed */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "hi\r\n", 0, - 0, out, sizeof(out)/sizeof(CHAR)); - ok(!strcmp("hi\r\n", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* carriage return */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "\r", 0, - 0, out, sizeof(out)/sizeof(CHAR)); - ok(!strcmp("\r\n", out),"failed out=[%s]\n",out); - ok(r==2,"failed: r=%d\n",r); - - /* double carriage return line feed */ - r = doit(FORMAT_MESSAGE_FROM_STRING, "\r\r\n", 0, - 0, out, sizeof(out)/sizeof(CHAR)); - ok(!strcmp("\r\n\r\n", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - - /* precision and width */ - - r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!3s!", - 0, 0, out, sizeof(out), "t" ); - ok(!strcmp(" t", out),"failed out=[%s]\n",out); - ok(r==3, "failed: r=%d\n",r); - r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!*s!", - 0, 0, out, sizeof(out), 4, "t"); - if (!strcmp("*s",out)) win_skip( "width/precision not supported\n" ); - else - { - ok(!strcmp( " t", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!4.2u!", - 0, 0, out, sizeof(out), 3 ); - ok(!strcmp( " 03", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); - r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!*.*u!", - 0, 0, out, sizeof(out), 5, 3, 1 ); - ok(!strcmp( " 001", out),"failed out=[%s]\n",out); - ok(r==5,"failed: r=%d\n",r); - r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!*.*u!,%1!*.*u!", - 0, 0, out, sizeof(out), 5, 3, 1, 4, 2 ); - ok(!strcmp( " 001, 0002", out),"failed out=[%s]\n",out); - ok(r==11,"failed: r=%d\n",r); - r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!*.*u!,%3!*.*u!", - 0, 0, out, sizeof(out), 5, 3, 1, 6, 4, 2 ); - /* older Win versions marked as broken even though this is arguably the correct behavior */ - /* but the new (brain-damaged) behavior is specified on MSDN */ - ok(!strcmp( " 001, 0002", out) || - broken(!strcmp(" 001,000004", out)), /* NT4/Win2k */ - "failed out=[%s]\n",out); - ok(r==12,"failed: r=%d\n",r); - /* args are not counted the same way with an argument array */ - { - ULONG_PTR args[] = { 6, 4, 2, 5, 3, 1 }; - r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY, - "%1!*.*u!,%1!*.*u!", 0, 0, out, sizeof(out), (__ms_va_list *)args ); - ok(!strcmp(" 0002, 00003", out),"failed out=[%s]\n",out); - ok(r==13,"failed: r=%d\n",r); - r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY, - "%1!*.*u!,%4!*.*u!", 0, 0, out, sizeof(out), (__ms_va_list *)args ); - ok(!strcmp(" 0002, 001", out),"failed out=[%s]\n",out); - ok(r==12,"failed: r=%d\n",r); - } - } - - /* change of pace... test the low byte of dwflags */ - - /* line feed */ - r = doit(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, "hi\n", 0, - 0, out, sizeof(out)/sizeof(CHAR)); - ok(!strcmp("hi ", out), "failed out=[%s]\n",out); - ok(r==3, "failed: r=%d\n",r); - - /* carriage return line feed */ - r = doit(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, "hi\r\n", 0, - 0, out, sizeof(out)/sizeof(CHAR)); - ok(!strcmp("hi ", out),"failed out=[%s]\n",out); - ok(r==3,"failed: r=%d\n",r); - - /* carriage return */ - r = doit(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, "\r", 0, - 0, out, sizeof(out)/sizeof(CHAR)); - ok(!strcmp(" ", out),"failed out=[%s]\n",out); - ok(r==1,"failed: r=%d\n",r); - - /* double carriage return line feed */ - r = doit(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, "\r\r\n", 0, - 0, out, sizeof(out)/sizeof(CHAR)); - ok(!strcmp(" ", out),"failed out=[%s]\n",out); - ok(r==2,"failed: r=%d\n",r); -} - -static void test_message_ignore_inserts(void) -{ - static const char init_buf[] = {'x', 'x', 'x', 'x', 'x'}; - - DWORD ret; - CHAR out[256]; - - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "test", 0, 0, out, - sizeof(out)/sizeof(CHAR), NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %d\n", ret); - ok(!strcmp("test", out), "Expected output string \"test\", got %s\n", out); - - /* The %0 escape sequence is handled. */ - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "test%0", 0, 0, out, - sizeof(out)/sizeof(CHAR), NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %d\n", ret); - ok(!strcmp("test", out), "Expected output string \"test\", got %s\n", out); - - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "test%0test", 0, 0, out, - sizeof(out)/sizeof(CHAR), NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %d\n", ret); - ok(!strcmp("test", out), "Expected output string \"test\", got %s\n", out); - - /* While FormatMessageA returns 0 in this case, no last error code is set. */ - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "%0test", 0, 0, out, - sizeof(out)/sizeof(CHAR), NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %d\n", ret); - ok(!memcmp(out, init_buf, sizeof(init_buf)), "Expected the output buffer to be untouched\n"); - ok(GetLastError() == 0xdeadbeef, "Expected GetLastError() to return 0xdeadbeef, got %u\n", GetLastError()); - - /* Insert sequences are ignored. */ - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "test%1%2!*.*s!%99", 0, 0, out, - sizeof(out)/sizeof(CHAR), NULL); - ok(ret == 17, "Expected FormatMessageA to return 17, got %d\n", ret); - ok(!strcmp("test%1%2!*.*s!%99", out), "Expected output string \"test%%1%%2!*.*s!%%99\", got %s\n", out); - - /* Only the "%n", "%r", and "%t" escape sequences are processed. */ - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "%%% %.%!", 0, 0, out, - sizeof(out)/sizeof(CHAR), NULL); - ok(ret == 8, "Expected FormatMessageA to return 8, got %d\n", ret); - ok(!strcmp("%%% %.%!", out), "Expected output string \"%%%%%% %%.%%!\", got %s\n", out); - - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "%n%r%t", 0, 0, out, - sizeof(out)/sizeof(CHAR), NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %d\n", ret); - ok(!strcmp("\r\n\r\t", out), "Expected output string \"\\r\\n\\r\\t\", got %s\n", out); - - /* CRLF characters are processed normally. */ - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "hi\n", 0, 0, out, - sizeof(out)/sizeof(CHAR), NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %d\n", ret); - ok(!strcmp("hi\r\n", out), "Expected output string \"hi\\r\\n\", got %s\n", out); - - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "hi\r\n", 0, 0, out, - sizeof(out)/sizeof(CHAR), NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %d\n", ret); - ok(!strcmp("hi\r\n", out), "Expected output string \"hi\\r\\n\", got %s\n", out); - - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "\r", 0, 0, out, - sizeof(out)/sizeof(CHAR), NULL); - ok(ret == 2, "Expected FormatMessageA to return 2, got %d\n", ret); - ok(!strcmp("\r\n", out), "Expected output string \"\\r\\n\", got %s\n", out); - - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "\r\r\n", 0, 0, out, - sizeof(out)/sizeof(CHAR), NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %d\n", ret); - ok(!strcmp("\r\n\r\n", out), "Expected output string \"\\r\\n\\r\\n\", got %s\n", out); - - /* The width parameter is handled the same also. */ - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS | - FORMAT_MESSAGE_MAX_WIDTH_MASK, "hi\n", 0, 0, out, - sizeof(out)/sizeof(CHAR), NULL); - ok(!strcmp("hi ", out), "Expected output string \"hi \", got %s\n", out); - ok(ret == 3, "Expected FormatMessageA to return 3, got %d\n", ret); - - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS | - FORMAT_MESSAGE_MAX_WIDTH_MASK, "hi\r\n", 0, 0, out, - sizeof(out)/sizeof(CHAR), NULL); - ok(ret == 3, "Expected FormatMessageA to return 3, got %d\n", ret); - ok(!strcmp("hi ", out), "Expected output string \"hi \", got %s\n", out); - - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS | - FORMAT_MESSAGE_MAX_WIDTH_MASK, "\r", 0, 0, out, - sizeof(out)/sizeof(CHAR), NULL); - ok(ret == 1, "Expected FormatMessageA to return 1, got %d\n", ret); - ok(!strcmp(" ", out), "Expected output string \" \", got %s\n", out); - - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS | - FORMAT_MESSAGE_MAX_WIDTH_MASK, "\r\r\n", 0, 0, out, - sizeof(out)/sizeof(CHAR), NULL); - ok(ret == 2, "Expected FormatMessageA to return 2, got %d\n", ret); - ok(!strcmp(" ", out), "Expected output string \" \", got %s\n", out); -} - -static void test_message_ignore_inserts_wide(void) -{ - static const WCHAR test[] = {'t','e','s','t',0}; - static const WCHAR empty[] = {0}; - static const WCHAR fmt_t0[] = {'t','e','s','t','%','0',0}; - static const WCHAR fmt_t0t[] = {'t','e','s','t','%','0','t','e','s','t',0}; - static const WCHAR fmt_0t[] = {'%','0','t','e','s','t',0}; - static const WCHAR fmt_t12oos99[] = {'t','e','s','t','%','1','%','2','!','*','.','*','s','!','%','9','9',0}; - static const WCHAR fmt_pctspacedot[] = {'%','%','%',' ','%','.','%','!',0}; - static const WCHAR fmt_nrt[] = {'%','n','%','r','%','t',0}; - static const WCHAR fmt_hi_lf[] = {'h','i','\n',0}; - static const WCHAR fmt_hi_crlf[] = {'h','i','\r','\n',0}; - static const WCHAR fmt_cr[] = {'\r',0}; - static const WCHAR fmt_crcrlf[] = {'\r','\r','\n',0}; - - static const WCHAR s_nrt[] = {'\r','\n','\r','\t',0}; - static const WCHAR s_hi_crlf[] = {'h','i','\r','\n',0}; - static const WCHAR s_crlf[] = {'\r','\n',0}; - static const WCHAR s_crlfcrlf[] = {'\r','\n','\r','\n',0}; - static const WCHAR s_hi_sp[] = {'h','i',' ',0}; - static const WCHAR s_sp[] = {' ',0}; - static const WCHAR s_2sp[] = {' ',' ',0}; - - DWORD ret; - WCHAR out[256]; - - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, test, 0, 0, out, - sizeof(out)/sizeof(WCHAR), NULL); - ok(ret == 4, "Expected FormatMessageW to return 4, got %d\n", ret); - ok(!lstrcmpW(test, out), "Expected output string \"test\", got %s\n", wine_dbgstr_w(out)); - - /* The %0 escape sequence is handled. */ - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, fmt_t0, 0, 0, out, - sizeof(out)/sizeof(WCHAR), NULL); - ok(ret == 4, "Expected FormatMessageW to return 4, got %d\n", ret); - ok(!lstrcmpW(test, out), "Expected output string \"test\", got %s\n", wine_dbgstr_w(out)); - - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, fmt_t0t, 0, 0, out, - sizeof(out)/sizeof(WCHAR), NULL); - ok(ret == 4, "Expected FormatMessageW to return 4, got %d\n", ret); - ok(!lstrcmpW(test, out), "Expected output string \"test\", got %s\n", wine_dbgstr_w(out)); - - /* While FormatMessageA returns 0 in this case, no last error code is set. */ - SetLastError(0xdeadbeef); - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, fmt_0t, 0, 0, out, - sizeof(out)/sizeof(WCHAR), NULL); - ok(ret == 0, "Expected FormatMessageW to return 0, got %d\n", ret); - ok(!lstrcmpW(empty, out), "Expected the output buffer to be the empty string, got %s\n", wine_dbgstr_w(out)); - ok(GetLastError() == 0xdeadbeef, "Expected GetLastError() to return 0xdeadbeef, got %u\n", GetLastError()); - - /* Insert sequences are ignored. */ - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, fmt_t12oos99, 0, 0, out, - sizeof(out)/sizeof(WCHAR), NULL); - ok(ret == 17, "Expected FormatMessageW to return 17, got %d\n", ret); - ok(!lstrcmpW(fmt_t12oos99, out), "Expected output string \"test%%1%%2!*.*s!%%99\", got %s\n", wine_dbgstr_w(out)); - - /* Only the "%n", "%r", and "%t" escape sequences are processed. */ - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, fmt_pctspacedot, 0, 0, out, - sizeof(out)/sizeof(WCHAR), NULL); - ok(ret == 8, "Expected FormatMessageW to return 8, got %d\n", ret); - ok(!lstrcmpW(fmt_pctspacedot, out), "Expected output string \"%%%%%% %%.%%!\", got %s\n", wine_dbgstr_w(out)); - - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, fmt_nrt, 0, 0, out, - sizeof(out)/sizeof(WCHAR), NULL); - ok(ret == 4, "Expected FormatMessageW to return 4, got %d\n", ret); - ok(!lstrcmpW(s_nrt, out), "Expected output string \"\\r\\n\\r\\t\", got %s\n", wine_dbgstr_w(out)); - - /* CRLF characters are processed normally. */ - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, fmt_hi_lf, 0, 0, out, - sizeof(out)/sizeof(WCHAR), NULL); - ok(ret == 4, "Expected FormatMessageW to return 4, got %d\n", ret); - ok(!lstrcmpW(s_hi_crlf, out), "Expected output string \"hi\\r\\n\", got %s\n", wine_dbgstr_w(out)); - - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, fmt_hi_crlf, 0, 0, out, - sizeof(out)/sizeof(WCHAR), NULL); - ok(ret == 4, "Expected FormatMessageW to return 4, got %d\n", ret); - ok(!lstrcmpW(s_hi_crlf, out), "Expected output string \"hi\\r\\n\", got %s\n", wine_dbgstr_w(out)); - - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, fmt_cr, 0, 0, out, - sizeof(out)/sizeof(WCHAR), NULL); - ok(ret == 2, "Expected FormatMessageW to return 2, got %d\n", ret); - ok(!lstrcmpW(s_crlf, out), "Expected output string \"\\r\\n\", got %s\n", wine_dbgstr_w(out)); - - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, fmt_crcrlf, 0, 0, out, - sizeof(out)/sizeof(WCHAR), NULL); - ok(ret == 4, "Expected FormatMessageW to return 4, got %d\n", ret); - ok(!lstrcmpW(s_crlfcrlf, out), "Expected output string \"\\r\\n\\r\\n\", got %s\n", wine_dbgstr_w(out)); - - /* The width parameter is handled the same also. */ - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS | - FORMAT_MESSAGE_MAX_WIDTH_MASK, fmt_hi_lf, 0, 0, out, - sizeof(out)/sizeof(WCHAR), NULL); - ok(ret == 3, "Expected FormatMessageW to return 3, got %d\n", ret); - ok(!lstrcmpW(s_hi_sp, out), "Expected output string \"hi \", got %s\n", wine_dbgstr_w(out)); - - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS | - FORMAT_MESSAGE_MAX_WIDTH_MASK, fmt_hi_crlf, 0, 0, out, - sizeof(out)/sizeof(WCHAR), NULL); - ok(ret == 3, "Expected FormatMessageW to return 3, got %d\n", ret); - ok(!lstrcmpW(s_hi_sp, out), "Expected output string \"hi \", got %s\n", wine_dbgstr_w(out)); - - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS | - FORMAT_MESSAGE_MAX_WIDTH_MASK, fmt_cr, 0, 0, out, - sizeof(out)/sizeof(WCHAR), NULL); - ok(ret == 1, "Expected FormatMessageW to return 1, got %d\n", ret); - ok(!lstrcmpW(s_sp, out), "Expected output string \" \", got %s\n", wine_dbgstr_w(out)); - - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS | - FORMAT_MESSAGE_MAX_WIDTH_MASK, fmt_crcrlf, 0, 0, out, - sizeof(out)/sizeof(WCHAR), NULL); - ok(ret == 2, "Expected FormatMessageW to return 2, got %d\n", ret); - ok(!lstrcmpW(s_2sp, out), "Expected output string \" \", got %s\n", wine_dbgstr_w(out)); -} - -static void test_message_insufficient_buffer(void) -{ - static const char init_buf[] = {'x', 'x', 'x', 'x', 'x'}; - static const char expected_buf[] = {'x', 'x', 'x', 'x', 'x'}; - DWORD ret; - CHAR out[5]; - - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "test", 0, 0, out, 0, NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %u\n", - GetLastError()); - ok(!memcmp(expected_buf, out, sizeof(expected_buf)), - "Expected the buffer to be untouched\n"); - - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "test", 0, 0, out, 1, NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %u\n", - GetLastError()); - ok(!memcmp(expected_buf, out, sizeof(expected_buf)), - "Expected the buffer to be untouched\n"); - - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "test", 0, 0, out, sizeof(out)/sizeof(out[0]) - 1, NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %u\n", - GetLastError()); - ok(!memcmp(expected_buf, out, sizeof(expected_buf)), - "Expected the buffer to be untouched\n"); -} - -static void test_message_insufficient_buffer_wide(void) -{ - static const WCHAR test[] = {'t','e','s','t',0}; - static const WCHAR init_buf[] = {'x', 'x', 'x', 'x', 'x'}; - static const WCHAR expected_buf[] = {'x', 'x', 'x', 'x', 'x'}; - static const WCHAR broken_buf[] = {0, 'x', 'x', 'x', 'x'}; - static const WCHAR broken2_buf[] = {'t','e','s',0,'x'}; - - DWORD ret; - WCHAR out[5]; - - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, test, 0, 0, out, 0, NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %u\n", - GetLastError()); - ok(!memcmp(expected_buf, out, sizeof(expected_buf)), - "Expected the buffer to be untouched\n"); - - /* Windows Server 2003 and newer report failure but copy a - * truncated string to the buffer for non-zero buffer sizes. */ - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, test, 0, 0, out, 1, NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %u\n", - GetLastError()); - ok(!memcmp(expected_buf, out, sizeof(expected_buf)) || - broken(!memcmp(broken_buf, out, sizeof(broken_buf))), /* W2K3+ */ - "Expected the buffer to be untouched\n"); - - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, test, 0, 0, out, sizeof(out)/sizeof(out[0]) - 1, NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %u\n", - GetLastError()); - ok(!memcmp(expected_buf, out, sizeof(expected_buf)) || - broken(!memcmp(broken2_buf, out, sizeof(broken2_buf))), /* W2K3+ */ - "Expected the buffer to be untouched\n"); -} - -static void test_message_null_buffer(void) -{ - DWORD ret, error; - - /* Without FORMAT_MESSAGE_ALLOCATE_BUFFER, only the specified buffer size is checked. */ - SetLastError(0xdeadbeef); - ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, 0, 0, NULL, 0, NULL); - error = GetLastError(); - ok(!ret, "FormatMessageA returned %u\n", ret); - ok(error == ERROR_INSUFFICIENT_BUFFER, "last error %u\n", error); - - SetLastError(0xdeadbeef); - ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, 0, 0, NULL, 1, NULL); - error = GetLastError(); - ok(!ret, "FormatMessageA returned %u\n", ret); - ok(error == ERROR_INSUFFICIENT_BUFFER, "last error %u\n", error); - - if (0) /* crashes on Windows */ - { - SetLastError(0xdeadbeef); - FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, 0, 0, NULL, 256, NULL); - } - - SetLastError(0xdeadbeef); - ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, 0, 0, NULL, 0, NULL); - error = GetLastError(); - ok(!ret, "FormatMessageA returned %u\n", ret); - ok(error == ERROR_NOT_ENOUGH_MEMORY, "last error %u\n", error); - - SetLastError(0xdeadbeef); - ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, 0, 0, NULL, 1, NULL); - error = GetLastError(); - ok(!ret, "FormatMessageA returned %u\n", ret); - ok(error == ERROR_NOT_ENOUGH_MEMORY, "last error %u\n", error); - - SetLastError(0xdeadbeef); - ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, 0, 0, NULL, 256, NULL); - error = GetLastError(); - ok(!ret, "FormatMessageA returned %u\n", ret); - ok(error == ERROR_NOT_ENOUGH_MEMORY, "last error %u\n", error); -} - -static void test_message_null_buffer_wide(void) -{ - DWORD ret, error; - - SetLastError(0xdeadbeef); - ret = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM, NULL, 0, 0, NULL, 0, NULL); - error = GetLastError(); - ok(!ret, "FormatMessageW returned %u\n", ret); - ok(error == ERROR_INVALID_PARAMETER, "last error %u\n", error); - - SetLastError(0xdeadbeef); - ret = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM, NULL, 0, 0, NULL, 1, NULL); - error = GetLastError(); - ok(!ret, "FormatMessageW returned %u\n", ret); - ok(error == ERROR_INVALID_PARAMETER, "last error %u\n", error); - - SetLastError(0xdeadbeef); - ret = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM, NULL, 0, 0, NULL, 256, NULL); - error = GetLastError(); - ok(!ret, "FormatMessageW returned %u\n", ret); - ok(error == ERROR_INVALID_PARAMETER, "last error %u\n", error); - - SetLastError(0xdeadbeef); - ret = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, 0, 0, NULL, 0, NULL); - error = GetLastError(); - ok(!ret, "FormatMessageW returned %u\n", ret); - ok(error == ERROR_INVALID_PARAMETER, "last error %u\n", error); - - SetLastError(0xdeadbeef); - ret = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, 0, 0, NULL, 1, NULL); - error = GetLastError(); - ok(!ret, "FormatMessageW returned %u\n", ret); - ok(error == ERROR_INVALID_PARAMETER, "last error %u\n", error); - - SetLastError(0xdeadbeef); - ret = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, 0, 0, NULL, 256, NULL); - error = GetLastError(); - ok(!ret, "FormatMessageW returned %u\n", ret); - ok(error == ERROR_INVALID_PARAMETER, "last error %u\n", error); -} - -static void test_message_allocate_buffer(void) -{ - DWORD ret; - char *buf; - - /* While MSDN suggests that FormatMessageA allocates a buffer whose size is - * the larger of the output string and the requested buffer size, the tests - * will not try to determine the actual size of the buffer allocated, as - * the return value of LocalSize cannot be trusted for the purpose, and it should - * in any case be safe for FormatMessageA to allocate in the manner that - * MSDN suggests. */ - - SetLastError(0xdeadbeef); - buf = (char *)0xdeadbeef; - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, - "", 0, 0, (char *)&buf, 0, NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret); - ok(buf == NULL, "Expected output buffer pointer to be NULL\n"); - ok(GetLastError() == 0xdeadbeef, - "Expected last error to be untouched, got %u\n", GetLastError()); - - buf = (char *)0xdeadbeef; - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, - "test", 0, 0, (char *)&buf, 0, NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); - ok(buf != NULL && buf != (char *)0xdeadbeef, - "Expected output buffer pointer to be valid\n"); - if (buf != NULL && buf != (char *)0xdeadbeef) - { - ok(!strcmp("test", buf), - "Expected buffer to contain \"test\", got %s\n", buf); - LocalFree(buf); - } - - buf = (char *)0xdeadbeef; - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, - "test", 0, 0, (char *)&buf, strlen("test"), NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); - ok(buf != NULL && buf != (char *)0xdeadbeef, - "Expected output buffer pointer to be valid\n"); - if (buf != NULL && buf != (char *)0xdeadbeef) - { - ok(!strcmp("test", buf), - "Expected buffer to contain \"test\", got %s\n", buf); - LocalFree(buf); - } - - buf = (char *)0xdeadbeef; - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, - "test", 0, 0, (char *)&buf, strlen("test") + 1, NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); - ok(buf != NULL && buf != (char *)0xdeadbeef, - "Expected output buffer pointer to be valid\n"); - if (buf != NULL && buf != (char *)0xdeadbeef) - { - ok(!strcmp("test", buf), - "Expected buffer to contain \"test\", got %s\n", buf); - LocalFree(buf); - } - - buf = (char *)0xdeadbeef; - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, - "test", 0, 0, (char *)&buf, strlen("test") + 2, NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); - ok(buf != NULL && buf != (char *)0xdeadbeef, - "Expected output buffer pointer to be valid\n"); - if (buf != NULL && buf != (char *)0xdeadbeef) - { - ok(!strcmp("test", buf), - "Expected buffer to contain \"test\", got %s\n", buf); - LocalFree(buf); - } - - buf = (char *)0xdeadbeef; - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, - "test", 0, 0, (char *)&buf, 1024, NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); - ok(buf != NULL && buf != (char *)0xdeadbeef, - "Expected output buffer pointer to be valid\n"); - if (buf != NULL && buf != (char *)0xdeadbeef) - { - ok(!strcmp("test", buf), - "Expected buffer to contain \"test\", got %s\n", buf); - LocalFree(buf); - } -} - -static void test_message_allocate_buffer_wide(void) -{ - static const WCHAR empty[] = {0}; - static const WCHAR test[] = {'t','e','s','t',0}; - - DWORD ret; - WCHAR *buf; - - /* While MSDN suggests that FormatMessageW allocates a buffer whose size is - * the larger of the output string and the requested buffer size, the tests - * will not try to determine the actual size of the buffer allocated, as - * the return value of LocalSize cannot be trusted for the purpose, and it should - * in any case be safe for FormatMessageW to allocate in the manner that - * MSDN suggests. */ - - if (0) /* crashes on Windows */ - { - buf = (WCHAR *)0xdeadbeef; - FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, - NULL, 0, 0, (WCHAR *)&buf, 0, NULL); - } - - SetLastError(0xdeadbeef); - buf = (WCHAR *)0xdeadbeef; - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, - empty, 0, 0, (WCHAR *)&buf, 0, NULL); - ok(ret == 0, "Expected FormatMessageW to return 0, got %u\n", ret); - ok(buf == NULL, "Expected output buffer pointer to be NULL\n"); - ok(GetLastError() == 0xdeadbeef, - "Expected last error to be untouched, got %u\n", GetLastError()); - - buf = (WCHAR *)0xdeadbeef; - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, - test, 0, 0, (WCHAR *)&buf, 0, NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); - ok(buf != NULL && buf != (WCHAR *)0xdeadbeef, - "Expected output buffer pointer to be valid\n"); - if (buf != NULL && buf != (WCHAR *)0xdeadbeef) - { - ok(!lstrcmpW(test, buf), - "Expected buffer to contain \"test\", got %s\n", wine_dbgstr_w(buf)); - LocalFree(buf); - } - - buf = (WCHAR *)0xdeadbeef; - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, - test, 0, 0, (WCHAR *)&buf, sizeof(test)/sizeof(WCHAR) - 1, NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); - ok(buf != NULL && buf != (WCHAR *)0xdeadbeef, - "Expected output buffer pointer to be valid\n"); - if (buf != NULL && buf != (WCHAR *)0xdeadbeef) - { - ok(!lstrcmpW(test, buf), - "Expected buffer to contain \"test\", got %s\n", wine_dbgstr_w(buf)); - LocalFree(buf); - } - - buf = (WCHAR *)0xdeadbeef; - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, - test, 0, 0, (WCHAR *)&buf, sizeof(test)/sizeof(WCHAR), NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); - ok(buf != NULL && buf != (WCHAR *)0xdeadbeef, - "Expected output buffer pointer to be valid\n"); - if (buf != NULL && buf != (WCHAR *)0xdeadbeef) - { - ok(!lstrcmpW(test, buf), - "Expected buffer to contain \"test\", got %s\n", wine_dbgstr_w(buf)); - LocalFree(buf); - } - - buf = (WCHAR *)0xdeadbeef; - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, - test, 0, 0, (WCHAR *)&buf, sizeof(test)/sizeof(WCHAR) + 1, NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); - ok(buf != NULL && buf != (WCHAR *)0xdeadbeef, - "Expected output buffer pointer to be valid\n"); - if (buf != NULL && buf != (WCHAR *)0xdeadbeef) - { - ok(!lstrcmpW(test, buf), - "Expected buffer to contain \"test\", got %s\n", wine_dbgstr_w(buf)); - LocalFree(buf); - } - - buf = (WCHAR *)0xdeadbeef; - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, - test, 0, 0, (WCHAR *)&buf, 1024, NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); - ok(buf != NULL && buf != (WCHAR *)0xdeadbeef, - "Expected output buffer pointer to be valid\n"); - if (buf != NULL && buf != (WCHAR *)0xdeadbeef) - { - ok(!lstrcmpW(test, buf), - "Expected buffer to contain \"test\", got %s\n", wine_dbgstr_w(buf)); - LocalFree(buf); - } -} - -static void test_message_from_hmodule(void) -{ - DWORD ret, error; - HMODULE h; - CHAR out[0x100] = {0}; - - h = GetModuleHandle("kernel32.dll"); - ok(h != 0, "GetModuleHandle failed\n"); - - /*Test existing messageID; as the message strings from wine's kernel32 differ from windows' kernel32 we don't compare - the strings but only test that FormatMessage doesn't return 0*/ - ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE, h, 7/*=ERROR_ARENA_TRASHED*/, - MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), out, sizeof(out)/sizeof(CHAR), NULL); - ok(ret != 0, "FormatMessageA returned 0\n"); - - /* Test a message string with an insertion without passing any variadic arguments. */ - ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE, h, 193 /* ERROR_BAD_EXE_FORMAT */, - MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), out, sizeof(out)/sizeof(CHAR), NULL); - ok(ret == 0, "FormatMessageA returned non-zero\n"); - - ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE | - FORMAT_MESSAGE_ARGUMENT_ARRAY, h, 193 /* ERROR_BAD_EXE_FORMAT */, - MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), out, sizeof(out)/sizeof(CHAR), NULL); - ok(ret == 0, "FormatMessageA returned non-zero\n"); - - /*Test nonexistent messageID with varying language IDs Note: FormatMessageW behaves the same*/ - SetLastError(0xdeadbeef); - ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE, h, 3044, - MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), out, sizeof(out)/sizeof(CHAR), NULL); - error = GetLastError(); - ok(ret == 0, "FormatMessageA returned %u instead of 0\n", ret); - ok(error == ERROR_MR_MID_NOT_FOUND || error == ERROR_MUI_FILE_NOT_FOUND, "last error %u\n", error); - - SetLastError(0xdeadbeef); - ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE, h, 3044, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), out, sizeof(out)/sizeof(CHAR), NULL); - error = GetLastError(); - ok(ret == 0, "FormatMessageA returned %u instead of 0\n", ret); - ok(error == ERROR_MR_MID_NOT_FOUND || error == ERROR_MUI_FILE_NOT_LOADED, "last error %u\n", error); - - SetLastError(0xdeadbeef); - ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE, h, 3044, - MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT), out, sizeof(out)/sizeof(CHAR), NULL); - error = GetLastError(); - ok(ret == 0, "FormatMessageA returned %u instead of 0\n", ret); - ok(error == ERROR_MR_MID_NOT_FOUND || error == ERROR_MUI_FILE_NOT_LOADED, "last error %u\n", error); - - SetLastError(0xdeadbeef); - ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE, h, 3044, - MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), out, sizeof(out)/sizeof(CHAR), NULL); - error = GetLastError(); - ok(ret == 0, "FormatMessageA returned %u instead of 0\n", ret); - ok(error == ERROR_RESOURCE_LANG_NOT_FOUND || - error == ERROR_MR_MID_NOT_FOUND || - error == ERROR_MUI_FILE_NOT_FOUND || - error == ERROR_MUI_FILE_NOT_LOADED, - "last error %u\n", error); - - SetLastError(0xdeadbeef); - ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE, h, 3044, - MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_UK), out, sizeof(out)/sizeof(CHAR), NULL); - error = GetLastError(); - ok(ret == 0, "FormatMessageA returned %u instead of 0\n", ret); - ok(error == ERROR_RESOURCE_LANG_NOT_FOUND || - error == ERROR_MR_MID_NOT_FOUND || - error == ERROR_MUI_FILE_NOT_FOUND || - error == ERROR_MUI_FILE_NOT_LOADED, - "last error %u\n", error); -} - -static void test_message_invalid_flags(void) -{ - static const char init_buf[] = {'x', 'x', 'x', 'x', 'x'}; - - DWORD ret; - CHAR out[5]; - char *ptr; - - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - ret = FormatMessageA(0, "test", 0, 0, out, sizeof(out)/sizeof(CHAR), NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret); - ok(!memcmp(out, init_buf, sizeof(init_buf)), - "Expected the output buffer to be untouched\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ptr = (char *)0xdeadbeef; - ret = FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER, "test", 0, 0, (char *)&ptr, 0, NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret); - ok(ptr == NULL, "Expected output pointer to be initialized to NULL, got %p\n", ptr); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", - GetLastError()); - - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - ret = FormatMessageA(FORMAT_MESSAGE_IGNORE_INSERTS, "test", 0, 0, out, sizeof(out)/sizeof(CHAR), NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret); - ok(!memcmp(out, init_buf, sizeof(init_buf)), - "Expected the output buffer to be untouched\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", - GetLastError()); - - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - ret = FormatMessageA(FORMAT_MESSAGE_ARGUMENT_ARRAY, "test", 0, 0, out, sizeof(out)/sizeof(CHAR), NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret); - ok(!memcmp(out, init_buf, sizeof(init_buf)), - "Expected the output buffer to be untouched\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", - GetLastError()); - - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - ret = FormatMessageA(FORMAT_MESSAGE_MAX_WIDTH_MASK, "test", 0, 0, out, sizeof(out)/sizeof(CHAR), NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret); - ok(!memcmp(out, init_buf, sizeof(init_buf)), - "Expected the output buffer to be untouched\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", - GetLastError()); - - /* Simultaneously setting FORMAT_MESSAGE_FROM_STRING with other source - * flags is apparently permissible, and FORMAT_MESSAGE_FROM_STRING takes - * precedence in this case. */ - - memcpy(out, init_buf, sizeof(init_buf)); - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_FROM_SYSTEM, - "test", 0, 0, out, sizeof(out)/sizeof(CHAR), NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); - ok(!strcmp("test", out), - "Expected the output buffer to be untouched\n"); - - memcpy(out, init_buf, sizeof(init_buf)); - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_FROM_HMODULE, - "test", 0, 0, out, sizeof(out)/sizeof(CHAR), NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); - ok(!strcmp("test", out), - "Expected the output buffer to be untouched\n"); - - memcpy(out, init_buf, sizeof(init_buf)); - ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_FROM_HMODULE | - FORMAT_MESSAGE_FROM_SYSTEM, "test", 0, 0, out, - sizeof(out)/sizeof(CHAR), NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); - ok(!strcmp("test", out), - "Expected the output buffer to be untouched\n"); -} - -static void test_message_invalid_flags_wide(void) -{ - static const WCHAR init_buf[] = {'x', 'x', 'x', 'x', 'x'}; - static const WCHAR test[] = {'t','e','s','t',0}; - - DWORD ret; - WCHAR out[5]; - WCHAR *ptr; - - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - ret = FormatMessageW(0, test, 0, 0, out, sizeof(out)/sizeof(WCHAR), NULL); - ok(ret == 0, "Expected FormatMessageW to return 0, got %u\n", ret); - ok(!memcmp(out, init_buf, sizeof(init_buf)), - "Expected the output buffer to be untouched\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ptr = (WCHAR *)0xdeadbeef; - ret = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER, test, 0, 0, (WCHAR *)&ptr, 0, NULL); - ok(ret == 0, "Expected FormatMessageW to return 0, got %u\n", ret); - ok(ptr == NULL, "Expected output pointer to be initialized to NULL, got %p\n", ptr); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", - GetLastError()); - - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - ret = FormatMessageW(FORMAT_MESSAGE_IGNORE_INSERTS, test, 0, 0, out, sizeof(out)/sizeof(WCHAR), NULL); - ok(ret == 0, "Expected FormatMessageW to return 0, got %u\n", ret); - ok(!memcmp(out, init_buf, sizeof(init_buf)), - "Expected the output buffer to be untouched\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", - GetLastError()); - - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - ret = FormatMessageW(FORMAT_MESSAGE_ARGUMENT_ARRAY, test, 0, 0, out, sizeof(out)/sizeof(WCHAR), NULL); - ok(ret == 0, "Expected FormatMessageW to return 0, got %u\n", ret); - ok(!memcmp(out, init_buf, sizeof(init_buf)), - "Expected the output buffer to be untouched\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", - GetLastError()); - - SetLastError(0xdeadbeef); - memcpy(out, init_buf, sizeof(init_buf)); - ret = FormatMessageW(FORMAT_MESSAGE_MAX_WIDTH_MASK, test, 0, 0, out, sizeof(out)/sizeof(WCHAR), NULL); - ok(ret == 0, "Expected FormatMessageW to return 0, got %u\n", ret); - ok(!memcmp(out, init_buf, sizeof(init_buf)), - "Expected the output buffer to be untouched\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", - GetLastError()); - - /* Simultaneously setting FORMAT_MESSAGE_FROM_STRING with other source - * flags is apparently permissible, and FORMAT_MESSAGE_FROM_STRING takes - * precedence in this case. */ - - memcpy(out, init_buf, sizeof(init_buf)); - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_FROM_SYSTEM, - test, 0, 0, out, sizeof(out)/sizeof(WCHAR), NULL); - ok(ret == 4, "Expected FormatMessageW to return 4, got %u\n", ret); - ok(!lstrcmpW(test, out), - "Expected the output buffer to be untouched\n"); - - memcpy(out, init_buf, sizeof(init_buf)); - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_FROM_HMODULE, - test, 0, 0, out, sizeof(out)/sizeof(WCHAR), NULL); - ok(ret == 4, "Expected FormatMessageW to return 4, got %u\n", ret); - ok(!lstrcmpW(test, out), - "Expected the output buffer to be untouched\n"); - - memcpy(out, init_buf, sizeof(init_buf)); - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_FROM_HMODULE | - FORMAT_MESSAGE_FROM_SYSTEM, test, 0, 0, out, - sizeof(out)/sizeof(WCHAR), NULL); - ok(ret == 4, "Expected FormatMessageW to return 4, got %u\n", ret); - ok(!lstrcmpW(test, out), - "Expected the output buffer to be untouched\n"); -} - -START_TEST(format_msg) -{ - DWORD ret; - - test_message_from_string(); - test_message_ignore_inserts(); - test_message_insufficient_buffer(); - test_message_null_buffer(); - test_message_allocate_buffer(); - test_message_from_hmodule(); - test_message_invalid_flags(); - - SetLastError(0xdeadbeef); - ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, NULL, 0, 0, NULL, 0, NULL); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("FormatMessageW is not implemented\n"); - return; - } - - test_message_from_string_wide(); - test_message_ignore_inserts_wide(); - test_message_insufficient_buffer_wide(); - test_message_null_buffer_wide(); - test_message_allocate_buffer_wide(); - test_message_invalid_flags_wide(); -} diff --git a/rostests/winetests/kernel32/generated.c b/rostests/winetests/kernel32/generated.c deleted file mode 100644 index 36053b84916..00000000000 --- a/rostests/winetests/kernel32/generated.c +++ /dev/null @@ -1,3925 +0,0 @@ -/* File generated automatically from tools/winapi/tests.dat; do not edit! */ -/* This file can be copied, modified and distributed without restriction. */ - -/* - * Unit tests for data structure packing - */ - -#define WINVER 0x0501 -#define _WIN32_IE 0x0501 -#define _WIN32_WINNT 0x0501 - -#define WINE_NOWINSOCK - -#include "windows.h" - -#include "wine/test.h" - -/*********************************************************************** - * Compatibility macros - */ - -#define DWORD_PTR UINT_PTR -#define LONG_PTR INT_PTR -#define ULONG_PTR UINT_PTR - -/*********************************************************************** - * Windows API extension - */ - -#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus) -# define _TYPE_ALIGNMENT(type) __alignof(type) -#elif defined(__GNUC__) -# define _TYPE_ALIGNMENT(type) __alignof__(type) -#else -/* - * FIXME: May not be possible without a compiler extension - * (if type is not just a name that is, otherwise the normal - * TYPE_ALIGNMENT can be used) - */ -#endif - -#if defined(TYPE_ALIGNMENT) && defined(_MSC_VER) && _MSC_VER >= 800 && !defined(__cplusplus) -#pragma warning(disable:4116) -#endif - -#if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT) -# define TYPE_ALIGNMENT _TYPE_ALIGNMENT -#endif - -/*********************************************************************** - * Test helper macros - */ - -#define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size); - -#ifdef TYPE_ALIGNMENT -# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align); -#else -# define TEST_TYPE_ALIGN(type, align) -#endif - -#ifdef _TYPE_ALIGNMENT -# define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align); -# define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align); -#else -# define TEST_TARGET_ALIGN(type, align) -# define TEST_FIELD_ALIGN(type, field, align) -#endif - -#define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset); - -#define TEST_TARGET_SIZE(type, size) TEST_TYPE_SIZE(*(type)0, size) -#define TEST_FIELD_SIZE(type, field, size) TEST_TYPE_SIZE((((type*)0)->field), size) -#define TEST_TYPE_SIGNED(type) C_ASSERT((type) -1 < 0); -#define TEST_TYPE_UNSIGNED(type) C_ASSERT((type) -1 > 0); - - -#ifdef _WIN64 - -static void test_pack_LPOSVERSIONINFOA(void) -{ - /* LPOSVERSIONINFOA */ - TEST_TYPE_SIZE (LPOSVERSIONINFOA, 8) - TEST_TYPE_ALIGN (LPOSVERSIONINFOA, 8) - TEST_TARGET_SIZE (LPOSVERSIONINFOA, 148) - TEST_TARGET_ALIGN(LPOSVERSIONINFOA, 4) -} - -static void test_pack_LPOSVERSIONINFOEXA(void) -{ - /* LPOSVERSIONINFOEXA */ - TEST_TYPE_SIZE (LPOSVERSIONINFOEXA, 8) - TEST_TYPE_ALIGN (LPOSVERSIONINFOEXA, 8) - TEST_TARGET_SIZE (LPOSVERSIONINFOEXA, 156) - TEST_TARGET_ALIGN(LPOSVERSIONINFOEXA, 4) -} - -static void test_pack_LPOSVERSIONINFOEXW(void) -{ - /* LPOSVERSIONINFOEXW */ - TEST_TYPE_SIZE (LPOSVERSIONINFOEXW, 8) - TEST_TYPE_ALIGN (LPOSVERSIONINFOEXW, 8) - TEST_TARGET_SIZE (LPOSVERSIONINFOEXW, 284) - TEST_TARGET_ALIGN(LPOSVERSIONINFOEXW, 4) -} - -static void test_pack_LPOSVERSIONINFOW(void) -{ - /* LPOSVERSIONINFOW */ - TEST_TYPE_SIZE (LPOSVERSIONINFOW, 8) - TEST_TYPE_ALIGN (LPOSVERSIONINFOW, 8) - TEST_TARGET_SIZE (LPOSVERSIONINFOW, 276) - TEST_TARGET_ALIGN(LPOSVERSIONINFOW, 4) -} - -static void test_pack_OSVERSIONINFOA(void) -{ - /* OSVERSIONINFOA */ - TEST_TYPE_SIZE (OSVERSIONINFOA, 148) - TEST_TYPE_ALIGN (OSVERSIONINFOA, 4) - TEST_FIELD_SIZE (OSVERSIONINFOA, dwOSVersionInfoSize, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOA, dwOSVersionInfoSize, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOA, dwOSVersionInfoSize, 0) - TEST_FIELD_SIZE (OSVERSIONINFOA, dwMajorVersion, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOA, dwMajorVersion, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOA, dwMajorVersion, 4) - TEST_FIELD_SIZE (OSVERSIONINFOA, dwMinorVersion, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOA, dwMinorVersion, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOA, dwMinorVersion, 8) - TEST_FIELD_SIZE (OSVERSIONINFOA, dwBuildNumber, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOA, dwBuildNumber, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOA, dwBuildNumber, 12) - TEST_FIELD_SIZE (OSVERSIONINFOA, dwPlatformId, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOA, dwPlatformId, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOA, dwPlatformId, 16) - TEST_FIELD_SIZE (OSVERSIONINFOA, szCSDVersion, 128) - TEST_FIELD_ALIGN (OSVERSIONINFOA, szCSDVersion, 1) - TEST_FIELD_OFFSET(OSVERSIONINFOA, szCSDVersion, 20) -} - -static void test_pack_OSVERSIONINFOEXA(void) -{ - /* OSVERSIONINFOEXA */ - TEST_TYPE_SIZE (OSVERSIONINFOEXA, 156) - TEST_TYPE_ALIGN (OSVERSIONINFOEXA, 4) - TEST_FIELD_SIZE (OSVERSIONINFOEXA, dwOSVersionInfoSize, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOEXA, dwOSVersionInfoSize, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOEXA, dwOSVersionInfoSize, 0) - TEST_FIELD_SIZE (OSVERSIONINFOEXA, dwMajorVersion, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOEXA, dwMajorVersion, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOEXA, dwMajorVersion, 4) - TEST_FIELD_SIZE (OSVERSIONINFOEXA, dwMinorVersion, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOEXA, dwMinorVersion, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOEXA, dwMinorVersion, 8) - TEST_FIELD_SIZE (OSVERSIONINFOEXA, dwBuildNumber, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOEXA, dwBuildNumber, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOEXA, dwBuildNumber, 12) - TEST_FIELD_SIZE (OSVERSIONINFOEXA, dwPlatformId, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOEXA, dwPlatformId, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOEXA, dwPlatformId, 16) - TEST_FIELD_SIZE (OSVERSIONINFOEXA, szCSDVersion, 128) - TEST_FIELD_ALIGN (OSVERSIONINFOEXA, szCSDVersion, 1) - TEST_FIELD_OFFSET(OSVERSIONINFOEXA, szCSDVersion, 20) - TEST_FIELD_SIZE (OSVERSIONINFOEXA, wServicePackMajor, 2) - TEST_FIELD_ALIGN (OSVERSIONINFOEXA, wServicePackMajor, 2) - TEST_FIELD_OFFSET(OSVERSIONINFOEXA, wServicePackMajor, 148) - TEST_FIELD_SIZE (OSVERSIONINFOEXA, wServicePackMinor, 2) - TEST_FIELD_ALIGN (OSVERSIONINFOEXA, wServicePackMinor, 2) - TEST_FIELD_OFFSET(OSVERSIONINFOEXA, wServicePackMinor, 150) - TEST_FIELD_SIZE (OSVERSIONINFOEXA, wSuiteMask, 2) - TEST_FIELD_ALIGN (OSVERSIONINFOEXA, wSuiteMask, 2) - TEST_FIELD_OFFSET(OSVERSIONINFOEXA, wSuiteMask, 152) - TEST_FIELD_SIZE (OSVERSIONINFOEXA, wProductType, 1) - TEST_FIELD_ALIGN (OSVERSIONINFOEXA, wProductType, 1) - TEST_FIELD_OFFSET(OSVERSIONINFOEXA, wProductType, 154) - TEST_FIELD_SIZE (OSVERSIONINFOEXA, wReserved, 1) - TEST_FIELD_ALIGN (OSVERSIONINFOEXA, wReserved, 1) - TEST_FIELD_OFFSET(OSVERSIONINFOEXA, wReserved, 155) -} - -static void test_pack_OSVERSIONINFOEXW(void) -{ - /* OSVERSIONINFOEXW */ - TEST_TYPE_SIZE (OSVERSIONINFOEXW, 284) - TEST_TYPE_ALIGN (OSVERSIONINFOEXW, 4) - TEST_FIELD_SIZE (OSVERSIONINFOEXW, dwOSVersionInfoSize, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOEXW, dwOSVersionInfoSize, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOEXW, dwOSVersionInfoSize, 0) - TEST_FIELD_SIZE (OSVERSIONINFOEXW, dwMajorVersion, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOEXW, dwMajorVersion, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOEXW, dwMajorVersion, 4) - TEST_FIELD_SIZE (OSVERSIONINFOEXW, dwMinorVersion, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOEXW, dwMinorVersion, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOEXW, dwMinorVersion, 8) - TEST_FIELD_SIZE (OSVERSIONINFOEXW, dwBuildNumber, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOEXW, dwBuildNumber, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOEXW, dwBuildNumber, 12) - TEST_FIELD_SIZE (OSVERSIONINFOEXW, dwPlatformId, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOEXW, dwPlatformId, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOEXW, dwPlatformId, 16) - TEST_FIELD_SIZE (OSVERSIONINFOEXW, szCSDVersion, 256) - TEST_FIELD_ALIGN (OSVERSIONINFOEXW, szCSDVersion, 2) - TEST_FIELD_OFFSET(OSVERSIONINFOEXW, szCSDVersion, 20) - TEST_FIELD_SIZE (OSVERSIONINFOEXW, wServicePackMajor, 2) - TEST_FIELD_ALIGN (OSVERSIONINFOEXW, wServicePackMajor, 2) - TEST_FIELD_OFFSET(OSVERSIONINFOEXW, wServicePackMajor, 276) - TEST_FIELD_SIZE (OSVERSIONINFOEXW, wServicePackMinor, 2) - TEST_FIELD_ALIGN (OSVERSIONINFOEXW, wServicePackMinor, 2) - TEST_FIELD_OFFSET(OSVERSIONINFOEXW, wServicePackMinor, 278) - TEST_FIELD_SIZE (OSVERSIONINFOEXW, wSuiteMask, 2) - TEST_FIELD_ALIGN (OSVERSIONINFOEXW, wSuiteMask, 2) - TEST_FIELD_OFFSET(OSVERSIONINFOEXW, wSuiteMask, 280) - TEST_FIELD_SIZE (OSVERSIONINFOEXW, wProductType, 1) - TEST_FIELD_ALIGN (OSVERSIONINFOEXW, wProductType, 1) - TEST_FIELD_OFFSET(OSVERSIONINFOEXW, wProductType, 282) - TEST_FIELD_SIZE (OSVERSIONINFOEXW, wReserved, 1) - TEST_FIELD_ALIGN (OSVERSIONINFOEXW, wReserved, 1) - TEST_FIELD_OFFSET(OSVERSIONINFOEXW, wReserved, 283) -} - -static void test_pack_OSVERSIONINFOW(void) -{ - /* OSVERSIONINFOW */ - TEST_TYPE_SIZE (OSVERSIONINFOW, 276) - TEST_TYPE_ALIGN (OSVERSIONINFOW, 4) - TEST_FIELD_SIZE (OSVERSIONINFOW, dwOSVersionInfoSize, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOW, dwOSVersionInfoSize, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOW, dwOSVersionInfoSize, 0) - TEST_FIELD_SIZE (OSVERSIONINFOW, dwMajorVersion, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOW, dwMajorVersion, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOW, dwMajorVersion, 4) - TEST_FIELD_SIZE (OSVERSIONINFOW, dwMinorVersion, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOW, dwMinorVersion, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOW, dwMinorVersion, 8) - TEST_FIELD_SIZE (OSVERSIONINFOW, dwBuildNumber, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOW, dwBuildNumber, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOW, dwBuildNumber, 12) - TEST_FIELD_SIZE (OSVERSIONINFOW, dwPlatformId, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOW, dwPlatformId, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOW, dwPlatformId, 16) - TEST_FIELD_SIZE (OSVERSIONINFOW, szCSDVersion, 256) - TEST_FIELD_ALIGN (OSVERSIONINFOW, szCSDVersion, 2) - TEST_FIELD_OFFSET(OSVERSIONINFOW, szCSDVersion, 20) -} - -static void test_pack_POSVERSIONINFOA(void) -{ - /* POSVERSIONINFOA */ - TEST_TYPE_SIZE (POSVERSIONINFOA, 8) - TEST_TYPE_ALIGN (POSVERSIONINFOA, 8) - TEST_TARGET_SIZE (POSVERSIONINFOA, 148) - TEST_TARGET_ALIGN(POSVERSIONINFOA, 4) -} - -static void test_pack_POSVERSIONINFOEXA(void) -{ - /* POSVERSIONINFOEXA */ - TEST_TYPE_SIZE (POSVERSIONINFOEXA, 8) - TEST_TYPE_ALIGN (POSVERSIONINFOEXA, 8) - TEST_TARGET_SIZE (POSVERSIONINFOEXA, 156) - TEST_TARGET_ALIGN(POSVERSIONINFOEXA, 4) -} - -static void test_pack_POSVERSIONINFOEXW(void) -{ - /* POSVERSIONINFOEXW */ - TEST_TYPE_SIZE (POSVERSIONINFOEXW, 8) - TEST_TYPE_ALIGN (POSVERSIONINFOEXW, 8) - TEST_TARGET_SIZE (POSVERSIONINFOEXW, 284) - TEST_TARGET_ALIGN(POSVERSIONINFOEXW, 4) -} - -static void test_pack_POSVERSIONINFOW(void) -{ - /* POSVERSIONINFOW */ - TEST_TYPE_SIZE (POSVERSIONINFOW, 8) - TEST_TYPE_ALIGN (POSVERSIONINFOW, 8) - TEST_TARGET_SIZE (POSVERSIONINFOW, 276) - TEST_TARGET_ALIGN(POSVERSIONINFOW, 4) -} - -static void test_pack_LPLONG(void) -{ - /* LPLONG */ - TEST_TYPE_SIZE (LPLONG, 8) - TEST_TYPE_ALIGN (LPLONG, 8) -} - -static void test_pack_LPVOID(void) -{ - /* LPVOID */ - TEST_TYPE_SIZE (LPVOID, 8) - TEST_TYPE_ALIGN (LPVOID, 8) -} - -static void test_pack_PHKEY(void) -{ - /* PHKEY */ - TEST_TYPE_SIZE (PHKEY, 8) - TEST_TYPE_ALIGN (PHKEY, 8) -} - -static void test_pack_ACTCTXA(void) -{ - /* ACTCTXA */ - TEST_TYPE_SIZE (ACTCTXA, 56) - TEST_TYPE_ALIGN (ACTCTXA, 8) - TEST_FIELD_SIZE (ACTCTXA, cbSize, 4) - TEST_FIELD_ALIGN (ACTCTXA, cbSize, 4) - TEST_FIELD_OFFSET(ACTCTXA, cbSize, 0) - TEST_FIELD_SIZE (ACTCTXA, dwFlags, 4) - TEST_FIELD_ALIGN (ACTCTXA, dwFlags, 4) - TEST_FIELD_OFFSET(ACTCTXA, dwFlags, 4) - TEST_FIELD_SIZE (ACTCTXA, lpSource, 8) - TEST_FIELD_ALIGN (ACTCTXA, lpSource, 8) - TEST_FIELD_OFFSET(ACTCTXA, lpSource, 8) - TEST_FIELD_SIZE (ACTCTXA, wProcessorArchitecture, 2) - TEST_FIELD_ALIGN (ACTCTXA, wProcessorArchitecture, 2) - TEST_FIELD_OFFSET(ACTCTXA, wProcessorArchitecture, 16) - TEST_FIELD_SIZE (ACTCTXA, wLangId, 2) - TEST_FIELD_ALIGN (ACTCTXA, wLangId, 2) - TEST_FIELD_OFFSET(ACTCTXA, wLangId, 18) - TEST_FIELD_SIZE (ACTCTXA, lpAssemblyDirectory, 8) - TEST_FIELD_ALIGN (ACTCTXA, lpAssemblyDirectory, 8) - TEST_FIELD_OFFSET(ACTCTXA, lpAssemblyDirectory, 24) - TEST_FIELD_SIZE (ACTCTXA, lpResourceName, 8) - TEST_FIELD_ALIGN (ACTCTXA, lpResourceName, 8) - TEST_FIELD_OFFSET(ACTCTXA, lpResourceName, 32) - TEST_FIELD_SIZE (ACTCTXA, lpApplicationName, 8) - TEST_FIELD_ALIGN (ACTCTXA, lpApplicationName, 8) - TEST_FIELD_OFFSET(ACTCTXA, lpApplicationName, 40) - TEST_FIELD_SIZE (ACTCTXA, hModule, 8) - TEST_FIELD_ALIGN (ACTCTXA, hModule, 8) - TEST_FIELD_OFFSET(ACTCTXA, hModule, 48) -} - -static void test_pack_ACTCTXW(void) -{ - /* ACTCTXW */ - TEST_TYPE_SIZE (ACTCTXW, 56) - TEST_TYPE_ALIGN (ACTCTXW, 8) - TEST_FIELD_SIZE (ACTCTXW, cbSize, 4) - TEST_FIELD_ALIGN (ACTCTXW, cbSize, 4) - TEST_FIELD_OFFSET(ACTCTXW, cbSize, 0) - TEST_FIELD_SIZE (ACTCTXW, dwFlags, 4) - TEST_FIELD_ALIGN (ACTCTXW, dwFlags, 4) - TEST_FIELD_OFFSET(ACTCTXW, dwFlags, 4) - TEST_FIELD_SIZE (ACTCTXW, lpSource, 8) - TEST_FIELD_ALIGN (ACTCTXW, lpSource, 8) - TEST_FIELD_OFFSET(ACTCTXW, lpSource, 8) - TEST_FIELD_SIZE (ACTCTXW, wProcessorArchitecture, 2) - TEST_FIELD_ALIGN (ACTCTXW, wProcessorArchitecture, 2) - TEST_FIELD_OFFSET(ACTCTXW, wProcessorArchitecture, 16) - TEST_FIELD_SIZE (ACTCTXW, wLangId, 2) - TEST_FIELD_ALIGN (ACTCTXW, wLangId, 2) - TEST_FIELD_OFFSET(ACTCTXW, wLangId, 18) - TEST_FIELD_SIZE (ACTCTXW, lpAssemblyDirectory, 8) - TEST_FIELD_ALIGN (ACTCTXW, lpAssemblyDirectory, 8) - TEST_FIELD_OFFSET(ACTCTXW, lpAssemblyDirectory, 24) - TEST_FIELD_SIZE (ACTCTXW, lpResourceName, 8) - TEST_FIELD_ALIGN (ACTCTXW, lpResourceName, 8) - TEST_FIELD_OFFSET(ACTCTXW, lpResourceName, 32) - TEST_FIELD_SIZE (ACTCTXW, lpApplicationName, 8) - TEST_FIELD_ALIGN (ACTCTXW, lpApplicationName, 8) - TEST_FIELD_OFFSET(ACTCTXW, lpApplicationName, 40) - TEST_FIELD_SIZE (ACTCTXW, hModule, 8) - TEST_FIELD_ALIGN (ACTCTXW, hModule, 8) - TEST_FIELD_OFFSET(ACTCTXW, hModule, 48) -} - -static void test_pack_ACTCTX_SECTION_KEYED_DATA(void) -{ - /* ACTCTX_SECTION_KEYED_DATA */ - TEST_TYPE_SIZE (ACTCTX_SECTION_KEYED_DATA, 112) - TEST_TYPE_ALIGN (ACTCTX_SECTION_KEYED_DATA, 8) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, cbSize, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, cbSize, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, cbSize, 0) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, ulDataFormatVersion, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, ulDataFormatVersion, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulDataFormatVersion, 4) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, lpData, 8) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, lpData, 8) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, lpData, 8) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, ulLength, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, ulLength, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulLength, 16) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, lpSectionGlobalData, 8) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, lpSectionGlobalData, 8) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, lpSectionGlobalData, 24) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, ulSectionGlobalDataLength, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, ulSectionGlobalDataLength, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulSectionGlobalDataLength, 32) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, lpSectionBase, 8) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, lpSectionBase, 8) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, lpSectionBase, 40) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, ulSectionTotalLength, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, ulSectionTotalLength, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulSectionTotalLength, 48) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, hActCtx, 8) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, hActCtx, 8) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, hActCtx, 56) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex, 64) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, ulFlags, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, ulFlags, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulFlags, 68) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, AssemblyMetadata, 40) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, AssemblyMetadata, 8) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, AssemblyMetadata, 72) -} - -static void test_pack_ACTCTX_SECTION_KEYED_DATA_2600(void) -{ - /* ACTCTX_SECTION_KEYED_DATA_2600 */ - TEST_TYPE_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, 72) - TEST_TYPE_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, 8) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, cbSize, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, cbSize, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, cbSize, 0) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, ulDataFormatVersion, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, ulDataFormatVersion, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, ulDataFormatVersion, 4) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, lpData, 8) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, lpData, 8) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, lpData, 8) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, ulLength, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, ulLength, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, ulLength, 16) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, lpSectionGlobalData, 8) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, lpSectionGlobalData, 8) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, lpSectionGlobalData, 24) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, ulSectionGlobalDataLength, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, ulSectionGlobalDataLength, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, ulSectionGlobalDataLength, 32) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, lpSectionBase, 8) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, lpSectionBase, 8) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, lpSectionBase, 40) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, ulSectionTotalLength, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, ulSectionTotalLength, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, ulSectionTotalLength, 48) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, hActCtx, 8) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, hActCtx, 8) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, hActCtx, 56) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, ulAssemblyRosterIndex, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, ulAssemblyRosterIndex, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, ulAssemblyRosterIndex, 64) -} - -static void test_pack_ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA(void) -{ - /* ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA */ - TEST_TYPE_SIZE (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 40) - TEST_TYPE_ALIGN (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 8) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpInformation, 8) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpInformation, 8) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpInformation, 0) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpSectionBase, 8) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpSectionBase, 8) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpSectionBase, 8) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, ulSectionLength, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, ulSectionLength, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, ulSectionLength, 16) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpSectionGlobalDataBase, 8) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpSectionGlobalDataBase, 8) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpSectionGlobalDataBase, 24) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, ulSectionGlobalDataLength, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, ulSectionGlobalDataLength, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, ulSectionGlobalDataLength, 32) -} - -static void test_pack_ACTIVATION_CONTEXT_BASIC_INFORMATION(void) -{ - /* ACTIVATION_CONTEXT_BASIC_INFORMATION */ - TEST_TYPE_SIZE (ACTIVATION_CONTEXT_BASIC_INFORMATION, 16) - TEST_TYPE_ALIGN (ACTIVATION_CONTEXT_BASIC_INFORMATION, 8) - TEST_FIELD_SIZE (ACTIVATION_CONTEXT_BASIC_INFORMATION, hActCtx, 8) - TEST_FIELD_ALIGN (ACTIVATION_CONTEXT_BASIC_INFORMATION, hActCtx, 8) - TEST_FIELD_OFFSET(ACTIVATION_CONTEXT_BASIC_INFORMATION, hActCtx, 0) - TEST_FIELD_SIZE (ACTIVATION_CONTEXT_BASIC_INFORMATION, dwFlags, 4) - TEST_FIELD_ALIGN (ACTIVATION_CONTEXT_BASIC_INFORMATION, dwFlags, 4) - TEST_FIELD_OFFSET(ACTIVATION_CONTEXT_BASIC_INFORMATION, dwFlags, 8) -} - -static void test_pack_BY_HANDLE_FILE_INFORMATION(void) -{ - /* BY_HANDLE_FILE_INFORMATION */ - TEST_TYPE_SIZE (BY_HANDLE_FILE_INFORMATION, 52) - TEST_TYPE_ALIGN (BY_HANDLE_FILE_INFORMATION, 4) - TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, dwFileAttributes, 4) - TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, dwFileAttributes, 4) - TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, dwFileAttributes, 0) - TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, ftCreationTime, 8) - TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, ftCreationTime, 4) - TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, ftCreationTime, 4) - TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, ftLastAccessTime, 8) - TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, ftLastAccessTime, 4) - TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, ftLastAccessTime, 12) - TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, ftLastWriteTime, 8) - TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, ftLastWriteTime, 4) - TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, ftLastWriteTime, 20) - TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, dwVolumeSerialNumber, 4) - TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, dwVolumeSerialNumber, 4) - TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, dwVolumeSerialNumber, 28) - TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, nFileSizeHigh, 4) - TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, nFileSizeHigh, 4) - TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, nFileSizeHigh, 32) - TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, nFileSizeLow, 4) - TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, nFileSizeLow, 4) - TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, nFileSizeLow, 36) - TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, nNumberOfLinks, 4) - TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, nNumberOfLinks, 4) - TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, nNumberOfLinks, 40) - TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, nFileIndexHigh, 4) - TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, nFileIndexHigh, 4) - TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, nFileIndexHigh, 44) - TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, nFileIndexLow, 4) - TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, nFileIndexLow, 4) - TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, nFileIndexLow, 48) -} - -static void test_pack_COMMCONFIG(void) -{ - /* COMMCONFIG */ - TEST_TYPE_SIZE (COMMCONFIG, 52) - TEST_TYPE_ALIGN (COMMCONFIG, 4) - TEST_FIELD_SIZE (COMMCONFIG, dwSize, 4) - TEST_FIELD_ALIGN (COMMCONFIG, dwSize, 4) - TEST_FIELD_OFFSET(COMMCONFIG, dwSize, 0) - TEST_FIELD_SIZE (COMMCONFIG, wVersion, 2) - TEST_FIELD_ALIGN (COMMCONFIG, wVersion, 2) - TEST_FIELD_OFFSET(COMMCONFIG, wVersion, 4) - TEST_FIELD_SIZE (COMMCONFIG, wReserved, 2) - TEST_FIELD_ALIGN (COMMCONFIG, wReserved, 2) - TEST_FIELD_OFFSET(COMMCONFIG, wReserved, 6) - TEST_FIELD_SIZE (COMMCONFIG, dcb, 28) - TEST_FIELD_ALIGN (COMMCONFIG, dcb, 4) - TEST_FIELD_OFFSET(COMMCONFIG, dcb, 8) - TEST_FIELD_SIZE (COMMCONFIG, dwProviderSubType, 4) - TEST_FIELD_ALIGN (COMMCONFIG, dwProviderSubType, 4) - TEST_FIELD_OFFSET(COMMCONFIG, dwProviderSubType, 36) - TEST_FIELD_SIZE (COMMCONFIG, dwProviderOffset, 4) - TEST_FIELD_ALIGN (COMMCONFIG, dwProviderOffset, 4) - TEST_FIELD_OFFSET(COMMCONFIG, dwProviderOffset, 40) - TEST_FIELD_SIZE (COMMCONFIG, dwProviderSize, 4) - TEST_FIELD_ALIGN (COMMCONFIG, dwProviderSize, 4) - TEST_FIELD_OFFSET(COMMCONFIG, dwProviderSize, 44) - TEST_FIELD_SIZE (COMMCONFIG, wcProviderData, 4) - TEST_FIELD_ALIGN (COMMCONFIG, wcProviderData, 4) - TEST_FIELD_OFFSET(COMMCONFIG, wcProviderData, 48) -} - -static void test_pack_COMMPROP(void) -{ - /* COMMPROP */ - TEST_TYPE_SIZE (COMMPROP, 64) - TEST_TYPE_ALIGN (COMMPROP, 4) - TEST_FIELD_SIZE (COMMPROP, wPacketLength, 2) - TEST_FIELD_ALIGN (COMMPROP, wPacketLength, 2) - TEST_FIELD_OFFSET(COMMPROP, wPacketLength, 0) - TEST_FIELD_SIZE (COMMPROP, wPacketVersion, 2) - TEST_FIELD_ALIGN (COMMPROP, wPacketVersion, 2) - TEST_FIELD_OFFSET(COMMPROP, wPacketVersion, 2) - TEST_FIELD_SIZE (COMMPROP, dwServiceMask, 4) - TEST_FIELD_ALIGN (COMMPROP, dwServiceMask, 4) - TEST_FIELD_OFFSET(COMMPROP, dwServiceMask, 4) - TEST_FIELD_SIZE (COMMPROP, dwReserved1, 4) - TEST_FIELD_ALIGN (COMMPROP, dwReserved1, 4) - TEST_FIELD_OFFSET(COMMPROP, dwReserved1, 8) - TEST_FIELD_SIZE (COMMPROP, dwMaxTxQueue, 4) - TEST_FIELD_ALIGN (COMMPROP, dwMaxTxQueue, 4) - TEST_FIELD_OFFSET(COMMPROP, dwMaxTxQueue, 12) - TEST_FIELD_SIZE (COMMPROP, dwMaxRxQueue, 4) - TEST_FIELD_ALIGN (COMMPROP, dwMaxRxQueue, 4) - TEST_FIELD_OFFSET(COMMPROP, dwMaxRxQueue, 16) - TEST_FIELD_SIZE (COMMPROP, dwMaxBaud, 4) - TEST_FIELD_ALIGN (COMMPROP, dwMaxBaud, 4) - TEST_FIELD_OFFSET(COMMPROP, dwMaxBaud, 20) - TEST_FIELD_SIZE (COMMPROP, dwProvSubType, 4) - TEST_FIELD_ALIGN (COMMPROP, dwProvSubType, 4) - TEST_FIELD_OFFSET(COMMPROP, dwProvSubType, 24) - TEST_FIELD_SIZE (COMMPROP, dwProvCapabilities, 4) - TEST_FIELD_ALIGN (COMMPROP, dwProvCapabilities, 4) - TEST_FIELD_OFFSET(COMMPROP, dwProvCapabilities, 28) - TEST_FIELD_SIZE (COMMPROP, dwSettableParams, 4) - TEST_FIELD_ALIGN (COMMPROP, dwSettableParams, 4) - TEST_FIELD_OFFSET(COMMPROP, dwSettableParams, 32) - TEST_FIELD_SIZE (COMMPROP, dwSettableBaud, 4) - TEST_FIELD_ALIGN (COMMPROP, dwSettableBaud, 4) - TEST_FIELD_OFFSET(COMMPROP, dwSettableBaud, 36) - TEST_FIELD_SIZE (COMMPROP, wSettableData, 2) - TEST_FIELD_ALIGN (COMMPROP, wSettableData, 2) - TEST_FIELD_OFFSET(COMMPROP, wSettableData, 40) - TEST_FIELD_SIZE (COMMPROP, wSettableStopParity, 2) - TEST_FIELD_ALIGN (COMMPROP, wSettableStopParity, 2) - TEST_FIELD_OFFSET(COMMPROP, wSettableStopParity, 42) - TEST_FIELD_SIZE (COMMPROP, dwCurrentTxQueue, 4) - TEST_FIELD_ALIGN (COMMPROP, dwCurrentTxQueue, 4) - TEST_FIELD_OFFSET(COMMPROP, dwCurrentTxQueue, 44) - TEST_FIELD_SIZE (COMMPROP, dwCurrentRxQueue, 4) - TEST_FIELD_ALIGN (COMMPROP, dwCurrentRxQueue, 4) - TEST_FIELD_OFFSET(COMMPROP, dwCurrentRxQueue, 48) - TEST_FIELD_SIZE (COMMPROP, dwProvSpec1, 4) - TEST_FIELD_ALIGN (COMMPROP, dwProvSpec1, 4) - TEST_FIELD_OFFSET(COMMPROP, dwProvSpec1, 52) - TEST_FIELD_SIZE (COMMPROP, dwProvSpec2, 4) - TEST_FIELD_ALIGN (COMMPROP, dwProvSpec2, 4) - TEST_FIELD_OFFSET(COMMPROP, dwProvSpec2, 56) - TEST_FIELD_SIZE (COMMPROP, wcProvChar, 2) - TEST_FIELD_ALIGN (COMMPROP, wcProvChar, 2) - TEST_FIELD_OFFSET(COMMPROP, wcProvChar, 60) -} - -static void test_pack_COMMTIMEOUTS(void) -{ - /* COMMTIMEOUTS */ - TEST_TYPE_SIZE (COMMTIMEOUTS, 20) - TEST_TYPE_ALIGN (COMMTIMEOUTS, 4) - TEST_FIELD_SIZE (COMMTIMEOUTS, ReadIntervalTimeout, 4) - TEST_FIELD_ALIGN (COMMTIMEOUTS, ReadIntervalTimeout, 4) - TEST_FIELD_OFFSET(COMMTIMEOUTS, ReadIntervalTimeout, 0) - TEST_FIELD_SIZE (COMMTIMEOUTS, ReadTotalTimeoutMultiplier, 4) - TEST_FIELD_ALIGN (COMMTIMEOUTS, ReadTotalTimeoutMultiplier, 4) - TEST_FIELD_OFFSET(COMMTIMEOUTS, ReadTotalTimeoutMultiplier, 4) - TEST_FIELD_SIZE (COMMTIMEOUTS, ReadTotalTimeoutConstant, 4) - TEST_FIELD_ALIGN (COMMTIMEOUTS, ReadTotalTimeoutConstant, 4) - TEST_FIELD_OFFSET(COMMTIMEOUTS, ReadTotalTimeoutConstant, 8) - TEST_FIELD_SIZE (COMMTIMEOUTS, WriteTotalTimeoutMultiplier, 4) - TEST_FIELD_ALIGN (COMMTIMEOUTS, WriteTotalTimeoutMultiplier, 4) - TEST_FIELD_OFFSET(COMMTIMEOUTS, WriteTotalTimeoutMultiplier, 12) - TEST_FIELD_SIZE (COMMTIMEOUTS, WriteTotalTimeoutConstant, 4) - TEST_FIELD_ALIGN (COMMTIMEOUTS, WriteTotalTimeoutConstant, 4) - TEST_FIELD_OFFSET(COMMTIMEOUTS, WriteTotalTimeoutConstant, 16) -} - -static void test_pack_COMSTAT(void) -{ - /* COMSTAT */ - TEST_TYPE_SIZE (COMSTAT, 12) - TEST_TYPE_ALIGN (COMSTAT, 4) - TEST_FIELD_SIZE (COMSTAT, cbInQue, 4) - TEST_FIELD_ALIGN (COMSTAT, cbInQue, 4) - TEST_FIELD_OFFSET(COMSTAT, cbInQue, 4) - TEST_FIELD_SIZE (COMSTAT, cbOutQue, 4) - TEST_FIELD_ALIGN (COMSTAT, cbOutQue, 4) - TEST_FIELD_OFFSET(COMSTAT, cbOutQue, 8) -} - -static void test_pack_CREATE_PROCESS_DEBUG_INFO(void) -{ - /* CREATE_PROCESS_DEBUG_INFO */ - TEST_TYPE_SIZE (CREATE_PROCESS_DEBUG_INFO, 72) - TEST_TYPE_ALIGN (CREATE_PROCESS_DEBUG_INFO, 8) - TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, hFile, 8) - TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, hFile, 8) - TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, hFile, 0) - TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, hProcess, 8) - TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, hProcess, 8) - TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, hProcess, 8) - TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, hThread, 8) - TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, hThread, 8) - TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, hThread, 16) - TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, lpBaseOfImage, 8) - TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, lpBaseOfImage, 8) - TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, lpBaseOfImage, 24) - TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, dwDebugInfoFileOffset, 4) - TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, dwDebugInfoFileOffset, 4) - TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, dwDebugInfoFileOffset, 32) - TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, nDebugInfoSize, 4) - TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, nDebugInfoSize, 4) - TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, nDebugInfoSize, 36) - TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, lpThreadLocalBase, 8) - TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, lpThreadLocalBase, 8) - TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, lpThreadLocalBase, 40) - TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, lpStartAddress, 8) - TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, lpStartAddress, 8) - TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, lpStartAddress, 48) - TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, lpImageName, 8) - TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, lpImageName, 8) - TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, lpImageName, 56) - TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, fUnicode, 2) - TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, fUnicode, 2) - TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, fUnicode, 64) -} - -static void test_pack_CREATE_THREAD_DEBUG_INFO(void) -{ - /* CREATE_THREAD_DEBUG_INFO */ - TEST_TYPE_SIZE (CREATE_THREAD_DEBUG_INFO, 24) - TEST_TYPE_ALIGN (CREATE_THREAD_DEBUG_INFO, 8) - TEST_FIELD_SIZE (CREATE_THREAD_DEBUG_INFO, hThread, 8) - TEST_FIELD_ALIGN (CREATE_THREAD_DEBUG_INFO, hThread, 8) - TEST_FIELD_OFFSET(CREATE_THREAD_DEBUG_INFO, hThread, 0) - TEST_FIELD_SIZE (CREATE_THREAD_DEBUG_INFO, lpThreadLocalBase, 8) - TEST_FIELD_ALIGN (CREATE_THREAD_DEBUG_INFO, lpThreadLocalBase, 8) - TEST_FIELD_OFFSET(CREATE_THREAD_DEBUG_INFO, lpThreadLocalBase, 8) - TEST_FIELD_SIZE (CREATE_THREAD_DEBUG_INFO, lpStartAddress, 8) - TEST_FIELD_ALIGN (CREATE_THREAD_DEBUG_INFO, lpStartAddress, 8) - TEST_FIELD_OFFSET(CREATE_THREAD_DEBUG_INFO, lpStartAddress, 16) -} - -static void test_pack_CRITICAL_SECTION(void) -{ - /* CRITICAL_SECTION */ - TEST_TYPE_SIZE (CRITICAL_SECTION, 40) - TEST_TYPE_ALIGN (CRITICAL_SECTION, 8) -} - -static void test_pack_CRITICAL_SECTION_DEBUG(void) -{ - /* CRITICAL_SECTION_DEBUG */ -} - -static void test_pack_DCB(void) -{ - /* DCB */ - TEST_TYPE_SIZE (DCB, 28) - TEST_TYPE_ALIGN (DCB, 4) - TEST_FIELD_SIZE (DCB, DCBlength, 4) - TEST_FIELD_ALIGN (DCB, DCBlength, 4) - TEST_FIELD_OFFSET(DCB, DCBlength, 0) - TEST_FIELD_SIZE (DCB, BaudRate, 4) - TEST_FIELD_ALIGN (DCB, BaudRate, 4) - TEST_FIELD_OFFSET(DCB, BaudRate, 4) - TEST_FIELD_SIZE (DCB, wReserved, 2) - TEST_FIELD_ALIGN (DCB, wReserved, 2) - TEST_FIELD_OFFSET(DCB, wReserved, 12) - TEST_FIELD_SIZE (DCB, XonLim, 2) - TEST_FIELD_ALIGN (DCB, XonLim, 2) - TEST_FIELD_OFFSET(DCB, XonLim, 14) - TEST_FIELD_SIZE (DCB, XoffLim, 2) - TEST_FIELD_ALIGN (DCB, XoffLim, 2) - TEST_FIELD_OFFSET(DCB, XoffLim, 16) - TEST_FIELD_SIZE (DCB, ByteSize, 1) - TEST_FIELD_ALIGN (DCB, ByteSize, 1) - TEST_FIELD_OFFSET(DCB, ByteSize, 18) - TEST_FIELD_SIZE (DCB, Parity, 1) - TEST_FIELD_ALIGN (DCB, Parity, 1) - TEST_FIELD_OFFSET(DCB, Parity, 19) - TEST_FIELD_SIZE (DCB, StopBits, 1) - TEST_FIELD_ALIGN (DCB, StopBits, 1) - TEST_FIELD_OFFSET(DCB, StopBits, 20) - TEST_FIELD_SIZE (DCB, XonChar, 1) - TEST_FIELD_ALIGN (DCB, XonChar, 1) - TEST_FIELD_OFFSET(DCB, XonChar, 21) - TEST_FIELD_SIZE (DCB, XoffChar, 1) - TEST_FIELD_ALIGN (DCB, XoffChar, 1) - TEST_FIELD_OFFSET(DCB, XoffChar, 22) - TEST_FIELD_SIZE (DCB, ErrorChar, 1) - TEST_FIELD_ALIGN (DCB, ErrorChar, 1) - TEST_FIELD_OFFSET(DCB, ErrorChar, 23) - TEST_FIELD_SIZE (DCB, EofChar, 1) - TEST_FIELD_ALIGN (DCB, EofChar, 1) - TEST_FIELD_OFFSET(DCB, EofChar, 24) - TEST_FIELD_SIZE (DCB, EvtChar, 1) - TEST_FIELD_ALIGN (DCB, EvtChar, 1) - TEST_FIELD_OFFSET(DCB, EvtChar, 25) - TEST_FIELD_SIZE (DCB, wReserved1, 2) - TEST_FIELD_ALIGN (DCB, wReserved1, 2) - TEST_FIELD_OFFSET(DCB, wReserved1, 26) -} - -static void test_pack_DEBUG_EVENT(void) -{ - /* DEBUG_EVENT */ - TEST_FIELD_SIZE (DEBUG_EVENT, dwDebugEventCode, 4) - TEST_FIELD_ALIGN (DEBUG_EVENT, dwDebugEventCode, 4) - TEST_FIELD_OFFSET(DEBUG_EVENT, dwDebugEventCode, 0) - TEST_FIELD_SIZE (DEBUG_EVENT, dwProcessId, 4) - TEST_FIELD_ALIGN (DEBUG_EVENT, dwProcessId, 4) - TEST_FIELD_OFFSET(DEBUG_EVENT, dwProcessId, 4) - TEST_FIELD_SIZE (DEBUG_EVENT, dwThreadId, 4) - TEST_FIELD_ALIGN (DEBUG_EVENT, dwThreadId, 4) - TEST_FIELD_OFFSET(DEBUG_EVENT, dwThreadId, 8) -} - -static void test_pack_ENUMRESLANGPROCA(void) -{ - /* ENUMRESLANGPROCA */ - TEST_TYPE_SIZE (ENUMRESLANGPROCA, 8) - TEST_TYPE_ALIGN (ENUMRESLANGPROCA, 8) -} - -static void test_pack_ENUMRESLANGPROCW(void) -{ - /* ENUMRESLANGPROCW */ - TEST_TYPE_SIZE (ENUMRESLANGPROCW, 8) - TEST_TYPE_ALIGN (ENUMRESLANGPROCW, 8) -} - -static void test_pack_ENUMRESNAMEPROCA(void) -{ - /* ENUMRESNAMEPROCA */ - TEST_TYPE_SIZE (ENUMRESNAMEPROCA, 8) - TEST_TYPE_ALIGN (ENUMRESNAMEPROCA, 8) -} - -static void test_pack_ENUMRESNAMEPROCW(void) -{ - /* ENUMRESNAMEPROCW */ - TEST_TYPE_SIZE (ENUMRESNAMEPROCW, 8) - TEST_TYPE_ALIGN (ENUMRESNAMEPROCW, 8) -} - -static void test_pack_ENUMRESTYPEPROCA(void) -{ - /* ENUMRESTYPEPROCA */ - TEST_TYPE_SIZE (ENUMRESTYPEPROCA, 8) - TEST_TYPE_ALIGN (ENUMRESTYPEPROCA, 8) -} - -static void test_pack_ENUMRESTYPEPROCW(void) -{ - /* ENUMRESTYPEPROCW */ - TEST_TYPE_SIZE (ENUMRESTYPEPROCW, 8) - TEST_TYPE_ALIGN (ENUMRESTYPEPROCW, 8) -} - -static void test_pack_EXCEPTION_DEBUG_INFO(void) -{ - /* EXCEPTION_DEBUG_INFO */ - TEST_TYPE_SIZE (EXCEPTION_DEBUG_INFO, 160) - TEST_TYPE_ALIGN (EXCEPTION_DEBUG_INFO, 8) - TEST_FIELD_SIZE (EXCEPTION_DEBUG_INFO, ExceptionRecord, 152) - TEST_FIELD_ALIGN (EXCEPTION_DEBUG_INFO, ExceptionRecord, 8) - TEST_FIELD_OFFSET(EXCEPTION_DEBUG_INFO, ExceptionRecord, 0) - TEST_FIELD_SIZE (EXCEPTION_DEBUG_INFO, dwFirstChance, 4) - TEST_FIELD_ALIGN (EXCEPTION_DEBUG_INFO, dwFirstChance, 4) - TEST_FIELD_OFFSET(EXCEPTION_DEBUG_INFO, dwFirstChance, 152) -} - -static void test_pack_EXIT_PROCESS_DEBUG_INFO(void) -{ - /* EXIT_PROCESS_DEBUG_INFO */ - TEST_TYPE_SIZE (EXIT_PROCESS_DEBUG_INFO, 4) - TEST_TYPE_ALIGN (EXIT_PROCESS_DEBUG_INFO, 4) - TEST_FIELD_SIZE (EXIT_PROCESS_DEBUG_INFO, dwExitCode, 4) - TEST_FIELD_ALIGN (EXIT_PROCESS_DEBUG_INFO, dwExitCode, 4) - TEST_FIELD_OFFSET(EXIT_PROCESS_DEBUG_INFO, dwExitCode, 0) -} - -static void test_pack_EXIT_THREAD_DEBUG_INFO(void) -{ - /* EXIT_THREAD_DEBUG_INFO */ - TEST_TYPE_SIZE (EXIT_THREAD_DEBUG_INFO, 4) - TEST_TYPE_ALIGN (EXIT_THREAD_DEBUG_INFO, 4) - TEST_FIELD_SIZE (EXIT_THREAD_DEBUG_INFO, dwExitCode, 4) - TEST_FIELD_ALIGN (EXIT_THREAD_DEBUG_INFO, dwExitCode, 4) - TEST_FIELD_OFFSET(EXIT_THREAD_DEBUG_INFO, dwExitCode, 0) -} - -static void test_pack_HW_PROFILE_INFOA(void) -{ - /* HW_PROFILE_INFOA */ - TEST_TYPE_SIZE (HW_PROFILE_INFOA, 124) - TEST_TYPE_ALIGN (HW_PROFILE_INFOA, 4) - TEST_FIELD_SIZE (HW_PROFILE_INFOA, dwDockInfo, 4) - TEST_FIELD_ALIGN (HW_PROFILE_INFOA, dwDockInfo, 4) - TEST_FIELD_OFFSET(HW_PROFILE_INFOA, dwDockInfo, 0) - TEST_FIELD_SIZE (HW_PROFILE_INFOA, szHwProfileGuid, 39) - TEST_FIELD_ALIGN (HW_PROFILE_INFOA, szHwProfileGuid, 1) - TEST_FIELD_OFFSET(HW_PROFILE_INFOA, szHwProfileGuid, 4) - TEST_FIELD_SIZE (HW_PROFILE_INFOA, szHwProfileName, 80) - TEST_FIELD_ALIGN (HW_PROFILE_INFOA, szHwProfileName, 1) - TEST_FIELD_OFFSET(HW_PROFILE_INFOA, szHwProfileName, 43) -} - -static void test_pack_HW_PROFILE_INFOW(void) -{ - /* HW_PROFILE_INFOW */ - TEST_TYPE_SIZE (HW_PROFILE_INFOW, 244) - TEST_TYPE_ALIGN (HW_PROFILE_INFOW, 4) - TEST_FIELD_SIZE (HW_PROFILE_INFOW, dwDockInfo, 4) - TEST_FIELD_ALIGN (HW_PROFILE_INFOW, dwDockInfo, 4) - TEST_FIELD_OFFSET(HW_PROFILE_INFOW, dwDockInfo, 0) - TEST_FIELD_SIZE (HW_PROFILE_INFOW, szHwProfileGuid, 78) - TEST_FIELD_ALIGN (HW_PROFILE_INFOW, szHwProfileGuid, 2) - TEST_FIELD_OFFSET(HW_PROFILE_INFOW, szHwProfileGuid, 4) - TEST_FIELD_SIZE (HW_PROFILE_INFOW, szHwProfileName, 160) - TEST_FIELD_ALIGN (HW_PROFILE_INFOW, szHwProfileName, 2) - TEST_FIELD_OFFSET(HW_PROFILE_INFOW, szHwProfileName, 82) -} - -static void test_pack_LOAD_DLL_DEBUG_INFO(void) -{ - /* LOAD_DLL_DEBUG_INFO */ - TEST_TYPE_SIZE (LOAD_DLL_DEBUG_INFO, 40) - TEST_TYPE_ALIGN (LOAD_DLL_DEBUG_INFO, 8) - TEST_FIELD_SIZE (LOAD_DLL_DEBUG_INFO, hFile, 8) - TEST_FIELD_ALIGN (LOAD_DLL_DEBUG_INFO, hFile, 8) - TEST_FIELD_OFFSET(LOAD_DLL_DEBUG_INFO, hFile, 0) - TEST_FIELD_SIZE (LOAD_DLL_DEBUG_INFO, lpBaseOfDll, 8) - TEST_FIELD_ALIGN (LOAD_DLL_DEBUG_INFO, lpBaseOfDll, 8) - TEST_FIELD_OFFSET(LOAD_DLL_DEBUG_INFO, lpBaseOfDll, 8) - TEST_FIELD_SIZE (LOAD_DLL_DEBUG_INFO, dwDebugInfoFileOffset, 4) - TEST_FIELD_ALIGN (LOAD_DLL_DEBUG_INFO, dwDebugInfoFileOffset, 4) - TEST_FIELD_OFFSET(LOAD_DLL_DEBUG_INFO, dwDebugInfoFileOffset, 16) - TEST_FIELD_SIZE (LOAD_DLL_DEBUG_INFO, nDebugInfoSize, 4) - TEST_FIELD_ALIGN (LOAD_DLL_DEBUG_INFO, nDebugInfoSize, 4) - TEST_FIELD_OFFSET(LOAD_DLL_DEBUG_INFO, nDebugInfoSize, 20) - TEST_FIELD_SIZE (LOAD_DLL_DEBUG_INFO, lpImageName, 8) - TEST_FIELD_ALIGN (LOAD_DLL_DEBUG_INFO, lpImageName, 8) - TEST_FIELD_OFFSET(LOAD_DLL_DEBUG_INFO, lpImageName, 24) - TEST_FIELD_SIZE (LOAD_DLL_DEBUG_INFO, fUnicode, 2) - TEST_FIELD_ALIGN (LOAD_DLL_DEBUG_INFO, fUnicode, 2) - TEST_FIELD_OFFSET(LOAD_DLL_DEBUG_INFO, fUnicode, 32) -} - -static void test_pack_LPBY_HANDLE_FILE_INFORMATION(void) -{ - /* LPBY_HANDLE_FILE_INFORMATION */ - TEST_TYPE_SIZE (LPBY_HANDLE_FILE_INFORMATION, 8) - TEST_TYPE_ALIGN (LPBY_HANDLE_FILE_INFORMATION, 8) - TEST_TARGET_SIZE (LPBY_HANDLE_FILE_INFORMATION, 52) - TEST_TARGET_ALIGN(LPBY_HANDLE_FILE_INFORMATION, 4) -} - -static void test_pack_LPCOMMCONFIG(void) -{ - /* LPCOMMCONFIG */ - TEST_TYPE_SIZE (LPCOMMCONFIG, 8) - TEST_TYPE_ALIGN (LPCOMMCONFIG, 8) - TEST_TARGET_SIZE (LPCOMMCONFIG, 52) - TEST_TARGET_ALIGN(LPCOMMCONFIG, 4) -} - -static void test_pack_LPCOMMPROP(void) -{ - /* LPCOMMPROP */ - TEST_TYPE_SIZE (LPCOMMPROP, 8) - TEST_TYPE_ALIGN (LPCOMMPROP, 8) - TEST_TARGET_SIZE (LPCOMMPROP, 64) - TEST_TARGET_ALIGN(LPCOMMPROP, 4) -} - -static void test_pack_LPCOMMTIMEOUTS(void) -{ - /* LPCOMMTIMEOUTS */ - TEST_TYPE_SIZE (LPCOMMTIMEOUTS, 8) - TEST_TYPE_ALIGN (LPCOMMTIMEOUTS, 8) - TEST_TARGET_SIZE (LPCOMMTIMEOUTS, 20) - TEST_TARGET_ALIGN(LPCOMMTIMEOUTS, 4) -} - -static void test_pack_LPCOMSTAT(void) -{ - /* LPCOMSTAT */ - TEST_TYPE_SIZE (LPCOMSTAT, 8) - TEST_TYPE_ALIGN (LPCOMSTAT, 8) - TEST_TARGET_SIZE (LPCOMSTAT, 12) - TEST_TARGET_ALIGN(LPCOMSTAT, 4) -} - -static void test_pack_LPCRITICAL_SECTION(void) -{ - /* LPCRITICAL_SECTION */ - TEST_TYPE_SIZE (LPCRITICAL_SECTION, 8) - TEST_TYPE_ALIGN (LPCRITICAL_SECTION, 8) -} - -static void test_pack_LPCRITICAL_SECTION_DEBUG(void) -{ - /* LPCRITICAL_SECTION_DEBUG */ - TEST_TYPE_SIZE (LPCRITICAL_SECTION_DEBUG, 8) - TEST_TYPE_ALIGN (LPCRITICAL_SECTION_DEBUG, 8) -} - -static void test_pack_LPDCB(void) -{ - /* LPDCB */ - TEST_TYPE_SIZE (LPDCB, 8) - TEST_TYPE_ALIGN (LPDCB, 8) - TEST_TARGET_SIZE (LPDCB, 28) - TEST_TARGET_ALIGN(LPDCB, 4) -} - -static void test_pack_LPDEBUG_EVENT(void) -{ - /* LPDEBUG_EVENT */ - TEST_TYPE_SIZE (LPDEBUG_EVENT, 8) - TEST_TYPE_ALIGN (LPDEBUG_EVENT, 8) -} - -static void test_pack_LPEXCEPTION_POINTERS(void) -{ - /* LPEXCEPTION_POINTERS */ - TEST_TYPE_SIZE (LPEXCEPTION_POINTERS, 8) - TEST_TYPE_ALIGN (LPEXCEPTION_POINTERS, 8) -} - -static void test_pack_LPEXCEPTION_RECORD(void) -{ - /* LPEXCEPTION_RECORD */ - TEST_TYPE_SIZE (LPEXCEPTION_RECORD, 8) - TEST_TYPE_ALIGN (LPEXCEPTION_RECORD, 8) -} - -static void test_pack_LPFIBER_START_ROUTINE(void) -{ - /* LPFIBER_START_ROUTINE */ - TEST_TYPE_SIZE (LPFIBER_START_ROUTINE, 8) - TEST_TYPE_ALIGN (LPFIBER_START_ROUTINE, 8) -} - -static void test_pack_LPHW_PROFILE_INFOA(void) -{ - /* LPHW_PROFILE_INFOA */ - TEST_TYPE_SIZE (LPHW_PROFILE_INFOA, 8) - TEST_TYPE_ALIGN (LPHW_PROFILE_INFOA, 8) - TEST_TARGET_SIZE (LPHW_PROFILE_INFOA, 124) - TEST_TARGET_ALIGN(LPHW_PROFILE_INFOA, 4) -} - -static void test_pack_LPHW_PROFILE_INFOW(void) -{ - /* LPHW_PROFILE_INFOW */ - TEST_TYPE_SIZE (LPHW_PROFILE_INFOW, 8) - TEST_TYPE_ALIGN (LPHW_PROFILE_INFOW, 8) - TEST_TARGET_SIZE (LPHW_PROFILE_INFOW, 244) - TEST_TARGET_ALIGN(LPHW_PROFILE_INFOW, 4) -} - -static void test_pack_LPMEMORYSTATUS(void) -{ - /* LPMEMORYSTATUS */ - TEST_TYPE_SIZE (LPMEMORYSTATUS, 8) - TEST_TYPE_ALIGN (LPMEMORYSTATUS, 8) - TEST_TARGET_SIZE (LPMEMORYSTATUS, 56) - TEST_TARGET_ALIGN(LPMEMORYSTATUS, 8) -} - -static void test_pack_LPMEMORYSTATUSEX(void) -{ - /* LPMEMORYSTATUSEX */ - TEST_TYPE_SIZE (LPMEMORYSTATUSEX, 8) - TEST_TYPE_ALIGN (LPMEMORYSTATUSEX, 8) - TEST_TARGET_SIZE (LPMEMORYSTATUSEX, 64) - TEST_TARGET_ALIGN(LPMEMORYSTATUSEX, 8) -} - -static void test_pack_LPOFSTRUCT(void) -{ - /* LPOFSTRUCT */ - TEST_TYPE_SIZE (LPOFSTRUCT, 8) - TEST_TYPE_ALIGN (LPOFSTRUCT, 8) - TEST_TARGET_SIZE (LPOFSTRUCT, 136) - TEST_TARGET_ALIGN(LPOFSTRUCT, 2) -} - -static void test_pack_LPOVERLAPPED(void) -{ - /* LPOVERLAPPED */ - TEST_TYPE_SIZE (LPOVERLAPPED, 8) - TEST_TYPE_ALIGN (LPOVERLAPPED, 8) -} - -static void test_pack_LPOVERLAPPED_COMPLETION_ROUTINE(void) -{ - /* LPOVERLAPPED_COMPLETION_ROUTINE */ - TEST_TYPE_SIZE (LPOVERLAPPED_COMPLETION_ROUTINE, 8) - TEST_TYPE_ALIGN (LPOVERLAPPED_COMPLETION_ROUTINE, 8) -} - -static void test_pack_LPPROCESS_HEAP_ENTRY(void) -{ - /* LPPROCESS_HEAP_ENTRY */ - TEST_TYPE_SIZE (LPPROCESS_HEAP_ENTRY, 8) - TEST_TYPE_ALIGN (LPPROCESS_HEAP_ENTRY, 8) -} - -static void test_pack_LPPROCESS_INFORMATION(void) -{ - /* LPPROCESS_INFORMATION */ - TEST_TYPE_SIZE (LPPROCESS_INFORMATION, 8) - TEST_TYPE_ALIGN (LPPROCESS_INFORMATION, 8) - TEST_TARGET_SIZE (LPPROCESS_INFORMATION, 24) - TEST_TARGET_ALIGN(LPPROCESS_INFORMATION, 8) -} - -static void test_pack_LPPROGRESS_ROUTINE(void) -{ - /* LPPROGRESS_ROUTINE */ - TEST_TYPE_SIZE (LPPROGRESS_ROUTINE, 8) - TEST_TYPE_ALIGN (LPPROGRESS_ROUTINE, 8) -} - -static void test_pack_LPSECURITY_ATTRIBUTES(void) -{ - /* LPSECURITY_ATTRIBUTES */ - TEST_TYPE_SIZE (LPSECURITY_ATTRIBUTES, 8) - TEST_TYPE_ALIGN (LPSECURITY_ATTRIBUTES, 8) - TEST_TARGET_SIZE (LPSECURITY_ATTRIBUTES, 24) - TEST_TARGET_ALIGN(LPSECURITY_ATTRIBUTES, 8) -} - -static void test_pack_LPSTARTUPINFOA(void) -{ - /* LPSTARTUPINFOA */ - TEST_TYPE_SIZE (LPSTARTUPINFOA, 8) - TEST_TYPE_ALIGN (LPSTARTUPINFOA, 8) - TEST_TARGET_SIZE (LPSTARTUPINFOA, 104) - TEST_TARGET_ALIGN(LPSTARTUPINFOA, 8) -} - -static void test_pack_LPSTARTUPINFOW(void) -{ - /* LPSTARTUPINFOW */ - TEST_TYPE_SIZE (LPSTARTUPINFOW, 8) - TEST_TYPE_ALIGN (LPSTARTUPINFOW, 8) - TEST_TARGET_SIZE (LPSTARTUPINFOW, 104) - TEST_TARGET_ALIGN(LPSTARTUPINFOW, 8) -} - -static void test_pack_LPSYSTEMTIME(void) -{ - /* LPSYSTEMTIME */ - TEST_TYPE_SIZE (LPSYSTEMTIME, 8) - TEST_TYPE_ALIGN (LPSYSTEMTIME, 8) - TEST_TARGET_SIZE (LPSYSTEMTIME, 16) - TEST_TARGET_ALIGN(LPSYSTEMTIME, 2) -} - -static void test_pack_LPSYSTEM_INFO(void) -{ - /* LPSYSTEM_INFO */ - TEST_TYPE_SIZE (LPSYSTEM_INFO, 8) - TEST_TYPE_ALIGN (LPSYSTEM_INFO, 8) -} - -static void test_pack_LPSYSTEM_POWER_STATUS(void) -{ - /* LPSYSTEM_POWER_STATUS */ - TEST_TYPE_SIZE (LPSYSTEM_POWER_STATUS, 8) - TEST_TYPE_ALIGN (LPSYSTEM_POWER_STATUS, 8) - TEST_TARGET_SIZE (LPSYSTEM_POWER_STATUS, 12) - TEST_TARGET_ALIGN(LPSYSTEM_POWER_STATUS, 4) -} - -static void test_pack_LPTHREAD_START_ROUTINE(void) -{ - /* LPTHREAD_START_ROUTINE */ - TEST_TYPE_SIZE (LPTHREAD_START_ROUTINE, 8) - TEST_TYPE_ALIGN (LPTHREAD_START_ROUTINE, 8) -} - -static void test_pack_LPTIME_ZONE_INFORMATION(void) -{ - /* LPTIME_ZONE_INFORMATION */ - TEST_TYPE_SIZE (LPTIME_ZONE_INFORMATION, 8) - TEST_TYPE_ALIGN (LPTIME_ZONE_INFORMATION, 8) - TEST_TARGET_SIZE (LPTIME_ZONE_INFORMATION, 172) - TEST_TARGET_ALIGN(LPTIME_ZONE_INFORMATION, 4) -} - -static void test_pack_LPWIN32_FILE_ATTRIBUTE_DATA(void) -{ - /* LPWIN32_FILE_ATTRIBUTE_DATA */ - TEST_TYPE_SIZE (LPWIN32_FILE_ATTRIBUTE_DATA, 8) - TEST_TYPE_ALIGN (LPWIN32_FILE_ATTRIBUTE_DATA, 8) - TEST_TARGET_SIZE (LPWIN32_FILE_ATTRIBUTE_DATA, 36) - TEST_TARGET_ALIGN(LPWIN32_FILE_ATTRIBUTE_DATA, 4) -} - -static void test_pack_LPWIN32_FIND_DATAA(void) -{ - /* LPWIN32_FIND_DATAA */ - TEST_TYPE_SIZE (LPWIN32_FIND_DATAA, 8) - TEST_TYPE_ALIGN (LPWIN32_FIND_DATAA, 8) - TEST_TARGET_SIZE (LPWIN32_FIND_DATAA, 320) - TEST_TARGET_ALIGN(LPWIN32_FIND_DATAA, 4) -} - -static void test_pack_LPWIN32_FIND_DATAW(void) -{ - /* LPWIN32_FIND_DATAW */ - TEST_TYPE_SIZE (LPWIN32_FIND_DATAW, 8) - TEST_TYPE_ALIGN (LPWIN32_FIND_DATAW, 8) - TEST_TARGET_SIZE (LPWIN32_FIND_DATAW, 592) - TEST_TARGET_ALIGN(LPWIN32_FIND_DATAW, 4) -} - -static void test_pack_LPWIN32_STREAM_ID(void) -{ - /* LPWIN32_STREAM_ID */ - TEST_TYPE_SIZE (LPWIN32_STREAM_ID, 8) - TEST_TYPE_ALIGN (LPWIN32_STREAM_ID, 8) - TEST_TARGET_SIZE (LPWIN32_STREAM_ID, 24) - TEST_TARGET_ALIGN(LPWIN32_STREAM_ID, 8) -} - -static void test_pack_MEMORYSTATUS(void) -{ - /* MEMORYSTATUS */ - TEST_TYPE_SIZE (MEMORYSTATUS, 56) - TEST_TYPE_ALIGN (MEMORYSTATUS, 8) - TEST_FIELD_SIZE (MEMORYSTATUS, dwLength, 4) - TEST_FIELD_ALIGN (MEMORYSTATUS, dwLength, 4) - TEST_FIELD_OFFSET(MEMORYSTATUS, dwLength, 0) - TEST_FIELD_SIZE (MEMORYSTATUS, dwMemoryLoad, 4) - TEST_FIELD_ALIGN (MEMORYSTATUS, dwMemoryLoad, 4) - TEST_FIELD_OFFSET(MEMORYSTATUS, dwMemoryLoad, 4) - TEST_FIELD_SIZE (MEMORYSTATUS, dwTotalPhys, 8) - TEST_FIELD_ALIGN (MEMORYSTATUS, dwTotalPhys, 8) - TEST_FIELD_OFFSET(MEMORYSTATUS, dwTotalPhys, 8) - TEST_FIELD_SIZE (MEMORYSTATUS, dwAvailPhys, 8) - TEST_FIELD_ALIGN (MEMORYSTATUS, dwAvailPhys, 8) - TEST_FIELD_OFFSET(MEMORYSTATUS, dwAvailPhys, 16) - TEST_FIELD_SIZE (MEMORYSTATUS, dwTotalPageFile, 8) - TEST_FIELD_ALIGN (MEMORYSTATUS, dwTotalPageFile, 8) - TEST_FIELD_OFFSET(MEMORYSTATUS, dwTotalPageFile, 24) - TEST_FIELD_SIZE (MEMORYSTATUS, dwAvailPageFile, 8) - TEST_FIELD_ALIGN (MEMORYSTATUS, dwAvailPageFile, 8) - TEST_FIELD_OFFSET(MEMORYSTATUS, dwAvailPageFile, 32) - TEST_FIELD_SIZE (MEMORYSTATUS, dwTotalVirtual, 8) - TEST_FIELD_ALIGN (MEMORYSTATUS, dwTotalVirtual, 8) - TEST_FIELD_OFFSET(MEMORYSTATUS, dwTotalVirtual, 40) - TEST_FIELD_SIZE (MEMORYSTATUS, dwAvailVirtual, 8) - TEST_FIELD_ALIGN (MEMORYSTATUS, dwAvailVirtual, 8) - TEST_FIELD_OFFSET(MEMORYSTATUS, dwAvailVirtual, 48) -} - -static void test_pack_MEMORYSTATUSEX(void) -{ - /* MEMORYSTATUSEX (pack 8) */ - TEST_TYPE_SIZE (MEMORYSTATUSEX, 64) - TEST_TYPE_ALIGN (MEMORYSTATUSEX, 8) - TEST_FIELD_SIZE (MEMORYSTATUSEX, dwLength, 4) - TEST_FIELD_ALIGN (MEMORYSTATUSEX, dwLength, 4) - TEST_FIELD_OFFSET(MEMORYSTATUSEX, dwLength, 0) - TEST_FIELD_SIZE (MEMORYSTATUSEX, dwMemoryLoad, 4) - TEST_FIELD_ALIGN (MEMORYSTATUSEX, dwMemoryLoad, 4) - TEST_FIELD_OFFSET(MEMORYSTATUSEX, dwMemoryLoad, 4) - TEST_FIELD_SIZE (MEMORYSTATUSEX, ullTotalPhys, 8) - TEST_FIELD_ALIGN (MEMORYSTATUSEX, ullTotalPhys, 8) - TEST_FIELD_OFFSET(MEMORYSTATUSEX, ullTotalPhys, 8) - TEST_FIELD_SIZE (MEMORYSTATUSEX, ullAvailPhys, 8) - TEST_FIELD_ALIGN (MEMORYSTATUSEX, ullAvailPhys, 8) - TEST_FIELD_OFFSET(MEMORYSTATUSEX, ullAvailPhys, 16) - TEST_FIELD_SIZE (MEMORYSTATUSEX, ullTotalPageFile, 8) - TEST_FIELD_ALIGN (MEMORYSTATUSEX, ullTotalPageFile, 8) - TEST_FIELD_OFFSET(MEMORYSTATUSEX, ullTotalPageFile, 24) - TEST_FIELD_SIZE (MEMORYSTATUSEX, ullAvailPageFile, 8) - TEST_FIELD_ALIGN (MEMORYSTATUSEX, ullAvailPageFile, 8) - TEST_FIELD_OFFSET(MEMORYSTATUSEX, ullAvailPageFile, 32) - TEST_FIELD_SIZE (MEMORYSTATUSEX, ullTotalVirtual, 8) - TEST_FIELD_ALIGN (MEMORYSTATUSEX, ullTotalVirtual, 8) - TEST_FIELD_OFFSET(MEMORYSTATUSEX, ullTotalVirtual, 40) - TEST_FIELD_SIZE (MEMORYSTATUSEX, ullAvailVirtual, 8) - TEST_FIELD_ALIGN (MEMORYSTATUSEX, ullAvailVirtual, 8) - TEST_FIELD_OFFSET(MEMORYSTATUSEX, ullAvailVirtual, 48) - TEST_FIELD_SIZE (MEMORYSTATUSEX, ullAvailExtendedVirtual, 8) - TEST_FIELD_ALIGN (MEMORYSTATUSEX, ullAvailExtendedVirtual, 8) - TEST_FIELD_OFFSET(MEMORYSTATUSEX, ullAvailExtendedVirtual, 56) -} - -static void test_pack_OFSTRUCT(void) -{ - /* OFSTRUCT */ - TEST_TYPE_SIZE (OFSTRUCT, 136) - TEST_TYPE_ALIGN (OFSTRUCT, 2) - TEST_FIELD_SIZE (OFSTRUCT, cBytes, 1) - TEST_FIELD_ALIGN (OFSTRUCT, cBytes, 1) - TEST_FIELD_OFFSET(OFSTRUCT, cBytes, 0) - TEST_FIELD_SIZE (OFSTRUCT, fFixedDisk, 1) - TEST_FIELD_ALIGN (OFSTRUCT, fFixedDisk, 1) - TEST_FIELD_OFFSET(OFSTRUCT, fFixedDisk, 1) - TEST_FIELD_SIZE (OFSTRUCT, nErrCode, 2) - TEST_FIELD_ALIGN (OFSTRUCT, nErrCode, 2) - TEST_FIELD_OFFSET(OFSTRUCT, nErrCode, 2) - TEST_FIELD_SIZE (OFSTRUCT, Reserved1, 2) - TEST_FIELD_ALIGN (OFSTRUCT, Reserved1, 2) - TEST_FIELD_OFFSET(OFSTRUCT, Reserved1, 4) - TEST_FIELD_SIZE (OFSTRUCT, Reserved2, 2) - TEST_FIELD_ALIGN (OFSTRUCT, Reserved2, 2) - TEST_FIELD_OFFSET(OFSTRUCT, Reserved2, 6) - TEST_FIELD_SIZE (OFSTRUCT, szPathName, 128) - TEST_FIELD_ALIGN (OFSTRUCT, szPathName, 1) - TEST_FIELD_OFFSET(OFSTRUCT, szPathName, 8) -} - -static void test_pack_OUTPUT_DEBUG_STRING_INFO(void) -{ - /* OUTPUT_DEBUG_STRING_INFO */ - TEST_TYPE_SIZE (OUTPUT_DEBUG_STRING_INFO, 16) - TEST_TYPE_ALIGN (OUTPUT_DEBUG_STRING_INFO, 8) - TEST_FIELD_SIZE (OUTPUT_DEBUG_STRING_INFO, lpDebugStringData, 8) - TEST_FIELD_ALIGN (OUTPUT_DEBUG_STRING_INFO, lpDebugStringData, 8) - TEST_FIELD_OFFSET(OUTPUT_DEBUG_STRING_INFO, lpDebugStringData, 0) - TEST_FIELD_SIZE (OUTPUT_DEBUG_STRING_INFO, fUnicode, 2) - TEST_FIELD_ALIGN (OUTPUT_DEBUG_STRING_INFO, fUnicode, 2) - TEST_FIELD_OFFSET(OUTPUT_DEBUG_STRING_INFO, fUnicode, 8) - TEST_FIELD_SIZE (OUTPUT_DEBUG_STRING_INFO, nDebugStringLength, 2) - TEST_FIELD_ALIGN (OUTPUT_DEBUG_STRING_INFO, nDebugStringLength, 2) - TEST_FIELD_OFFSET(OUTPUT_DEBUG_STRING_INFO, nDebugStringLength, 10) -} - -static void test_pack_PACTCTXA(void) -{ - /* PACTCTXA */ - TEST_TYPE_SIZE (PACTCTXA, 8) - TEST_TYPE_ALIGN (PACTCTXA, 8) - TEST_TARGET_SIZE (PACTCTXA, 56) - TEST_TARGET_ALIGN(PACTCTXA, 8) -} - -static void test_pack_PACTCTXW(void) -{ - /* PACTCTXW */ - TEST_TYPE_SIZE (PACTCTXW, 8) - TEST_TYPE_ALIGN (PACTCTXW, 8) - TEST_TARGET_SIZE (PACTCTXW, 56) - TEST_TARGET_ALIGN(PACTCTXW, 8) -} - -static void test_pack_PACTCTX_SECTION_KEYED_DATA(void) -{ - /* PACTCTX_SECTION_KEYED_DATA */ - TEST_TYPE_SIZE (PACTCTX_SECTION_KEYED_DATA, 8) - TEST_TYPE_ALIGN (PACTCTX_SECTION_KEYED_DATA, 8) - TEST_TARGET_SIZE (PACTCTX_SECTION_KEYED_DATA, 112) - TEST_TARGET_ALIGN(PACTCTX_SECTION_KEYED_DATA, 8) -} - -static void test_pack_PACTCTX_SECTION_KEYED_DATA_2600(void) -{ - /* PACTCTX_SECTION_KEYED_DATA_2600 */ - TEST_TYPE_SIZE (PACTCTX_SECTION_KEYED_DATA_2600, 8) - TEST_TYPE_ALIGN (PACTCTX_SECTION_KEYED_DATA_2600, 8) - TEST_TARGET_SIZE (PACTCTX_SECTION_KEYED_DATA_2600, 72) - TEST_TARGET_ALIGN(PACTCTX_SECTION_KEYED_DATA_2600, 8) -} - -static void test_pack_PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA(void) -{ - /* PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA */ - TEST_TYPE_SIZE (PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 8) - TEST_TYPE_ALIGN (PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 8) - TEST_TARGET_SIZE (PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 40) - TEST_TARGET_ALIGN(PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 8) -} - -static void test_pack_PACTIVATION_CONTEXT_BASIC_INFORMATION(void) -{ - /* PACTIVATION_CONTEXT_BASIC_INFORMATION */ - TEST_TYPE_SIZE (PACTIVATION_CONTEXT_BASIC_INFORMATION, 8) - TEST_TYPE_ALIGN (PACTIVATION_CONTEXT_BASIC_INFORMATION, 8) - TEST_TARGET_SIZE (PACTIVATION_CONTEXT_BASIC_INFORMATION, 16) - TEST_TARGET_ALIGN(PACTIVATION_CONTEXT_BASIC_INFORMATION, 8) -} - -static void test_pack_PAPCFUNC(void) -{ - /* PAPCFUNC */ - TEST_TYPE_SIZE (PAPCFUNC, 8) - TEST_TYPE_ALIGN (PAPCFUNC, 8) -} - -static void test_pack_PBY_HANDLE_FILE_INFORMATION(void) -{ - /* PBY_HANDLE_FILE_INFORMATION */ - TEST_TYPE_SIZE (PBY_HANDLE_FILE_INFORMATION, 8) - TEST_TYPE_ALIGN (PBY_HANDLE_FILE_INFORMATION, 8) - TEST_TARGET_SIZE (PBY_HANDLE_FILE_INFORMATION, 52) - TEST_TARGET_ALIGN(PBY_HANDLE_FILE_INFORMATION, 4) -} - -static void test_pack_PCACTCTXA(void) -{ - /* PCACTCTXA */ - TEST_TYPE_SIZE (PCACTCTXA, 8) - TEST_TYPE_ALIGN (PCACTCTXA, 8) - TEST_TARGET_SIZE (PCACTCTXA, 56) - TEST_TARGET_ALIGN(PCACTCTXA, 8) -} - -static void test_pack_PCACTCTXW(void) -{ - /* PCACTCTXW */ - TEST_TYPE_SIZE (PCACTCTXW, 8) - TEST_TYPE_ALIGN (PCACTCTXW, 8) - TEST_TARGET_SIZE (PCACTCTXW, 56) - TEST_TARGET_ALIGN(PCACTCTXW, 8) -} - -static void test_pack_PCACTCTX_SECTION_KEYED_DATA(void) -{ - /* PCACTCTX_SECTION_KEYED_DATA */ - TEST_TYPE_SIZE (PCACTCTX_SECTION_KEYED_DATA, 8) - TEST_TYPE_ALIGN (PCACTCTX_SECTION_KEYED_DATA, 8) - TEST_TARGET_SIZE (PCACTCTX_SECTION_KEYED_DATA, 112) - TEST_TARGET_ALIGN(PCACTCTX_SECTION_KEYED_DATA, 8) -} - -static void test_pack_PCACTCTX_SECTION_KEYED_DATA_2600(void) -{ - /* PCACTCTX_SECTION_KEYED_DATA_2600 */ - TEST_TYPE_SIZE (PCACTCTX_SECTION_KEYED_DATA_2600, 8) - TEST_TYPE_ALIGN (PCACTCTX_SECTION_KEYED_DATA_2600, 8) - TEST_TARGET_SIZE (PCACTCTX_SECTION_KEYED_DATA_2600, 72) - TEST_TARGET_ALIGN(PCACTCTX_SECTION_KEYED_DATA_2600, 8) -} - -static void test_pack_PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA(void) -{ - /* PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA */ - TEST_TYPE_SIZE (PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 8) - TEST_TYPE_ALIGN (PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 8) - TEST_TARGET_SIZE (PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 40) - TEST_TARGET_ALIGN(PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 8) -} - -static void test_pack_PCRITICAL_SECTION(void) -{ - /* PCRITICAL_SECTION */ - TEST_TYPE_SIZE (PCRITICAL_SECTION, 8) - TEST_TYPE_ALIGN (PCRITICAL_SECTION, 8) -} - -static void test_pack_PCRITICAL_SECTION_DEBUG(void) -{ - /* PCRITICAL_SECTION_DEBUG */ - TEST_TYPE_SIZE (PCRITICAL_SECTION_DEBUG, 8) - TEST_TYPE_ALIGN (PCRITICAL_SECTION_DEBUG, 8) -} - -static void test_pack_PFIBER_START_ROUTINE(void) -{ - /* PFIBER_START_ROUTINE */ - TEST_TYPE_SIZE (PFIBER_START_ROUTINE, 8) - TEST_TYPE_ALIGN (PFIBER_START_ROUTINE, 8) -} - -static void test_pack_POFSTRUCT(void) -{ - /* POFSTRUCT */ - TEST_TYPE_SIZE (POFSTRUCT, 8) - TEST_TYPE_ALIGN (POFSTRUCT, 8) - TEST_TARGET_SIZE (POFSTRUCT, 136) - TEST_TARGET_ALIGN(POFSTRUCT, 2) -} - -static void test_pack_PPROCESS_HEAP_ENTRY(void) -{ - /* PPROCESS_HEAP_ENTRY */ - TEST_TYPE_SIZE (PPROCESS_HEAP_ENTRY, 8) - TEST_TYPE_ALIGN (PPROCESS_HEAP_ENTRY, 8) -} - -static void test_pack_PPROCESS_INFORMATION(void) -{ - /* PPROCESS_INFORMATION */ - TEST_TYPE_SIZE (PPROCESS_INFORMATION, 8) - TEST_TYPE_ALIGN (PPROCESS_INFORMATION, 8) - TEST_TARGET_SIZE (PPROCESS_INFORMATION, 24) - TEST_TARGET_ALIGN(PPROCESS_INFORMATION, 8) -} - -static void test_pack_PQUERYACTCTXW_FUNC(void) -{ - /* PQUERYACTCTXW_FUNC */ - TEST_TYPE_SIZE (PQUERYACTCTXW_FUNC, 8) - TEST_TYPE_ALIGN (PQUERYACTCTXW_FUNC, 8) -} - -static void test_pack_PROCESS_HEAP_ENTRY(void) -{ - /* PROCESS_HEAP_ENTRY */ - TEST_FIELD_SIZE (PROCESS_HEAP_ENTRY, lpData, 8) - TEST_FIELD_ALIGN (PROCESS_HEAP_ENTRY, lpData, 8) - TEST_FIELD_OFFSET(PROCESS_HEAP_ENTRY, lpData, 0) - TEST_FIELD_SIZE (PROCESS_HEAP_ENTRY, cbData, 4) - TEST_FIELD_ALIGN (PROCESS_HEAP_ENTRY, cbData, 4) - TEST_FIELD_OFFSET(PROCESS_HEAP_ENTRY, cbData, 8) - TEST_FIELD_SIZE (PROCESS_HEAP_ENTRY, cbOverhead, 1) - TEST_FIELD_ALIGN (PROCESS_HEAP_ENTRY, cbOverhead, 1) - TEST_FIELD_OFFSET(PROCESS_HEAP_ENTRY, cbOverhead, 12) - TEST_FIELD_SIZE (PROCESS_HEAP_ENTRY, iRegionIndex, 1) - TEST_FIELD_ALIGN (PROCESS_HEAP_ENTRY, iRegionIndex, 1) - TEST_FIELD_OFFSET(PROCESS_HEAP_ENTRY, iRegionIndex, 13) - TEST_FIELD_SIZE (PROCESS_HEAP_ENTRY, wFlags, 2) - TEST_FIELD_ALIGN (PROCESS_HEAP_ENTRY, wFlags, 2) - TEST_FIELD_OFFSET(PROCESS_HEAP_ENTRY, wFlags, 14) -} - -static void test_pack_PROCESS_INFORMATION(void) -{ - /* PROCESS_INFORMATION */ - TEST_TYPE_SIZE (PROCESS_INFORMATION, 24) - TEST_TYPE_ALIGN (PROCESS_INFORMATION, 8) - TEST_FIELD_SIZE (PROCESS_INFORMATION, hProcess, 8) - TEST_FIELD_ALIGN (PROCESS_INFORMATION, hProcess, 8) - TEST_FIELD_OFFSET(PROCESS_INFORMATION, hProcess, 0) - TEST_FIELD_SIZE (PROCESS_INFORMATION, hThread, 8) - TEST_FIELD_ALIGN (PROCESS_INFORMATION, hThread, 8) - TEST_FIELD_OFFSET(PROCESS_INFORMATION, hThread, 8) - TEST_FIELD_SIZE (PROCESS_INFORMATION, dwProcessId, 4) - TEST_FIELD_ALIGN (PROCESS_INFORMATION, dwProcessId, 4) - TEST_FIELD_OFFSET(PROCESS_INFORMATION, dwProcessId, 16) - TEST_FIELD_SIZE (PROCESS_INFORMATION, dwThreadId, 4) - TEST_FIELD_ALIGN (PROCESS_INFORMATION, dwThreadId, 4) - TEST_FIELD_OFFSET(PROCESS_INFORMATION, dwThreadId, 20) -} - -static void test_pack_PSECURITY_ATTRIBUTES(void) -{ - /* PSECURITY_ATTRIBUTES */ - TEST_TYPE_SIZE (PSECURITY_ATTRIBUTES, 8) - TEST_TYPE_ALIGN (PSECURITY_ATTRIBUTES, 8) - TEST_TARGET_SIZE (PSECURITY_ATTRIBUTES, 24) - TEST_TARGET_ALIGN(PSECURITY_ATTRIBUTES, 8) -} - -static void test_pack_PSYSTEMTIME(void) -{ - /* PSYSTEMTIME */ - TEST_TYPE_SIZE (PSYSTEMTIME, 8) - TEST_TYPE_ALIGN (PSYSTEMTIME, 8) - TEST_TARGET_SIZE (PSYSTEMTIME, 16) - TEST_TARGET_ALIGN(PSYSTEMTIME, 2) -} - -static void test_pack_PTIMERAPCROUTINE(void) -{ - /* PTIMERAPCROUTINE */ - TEST_TYPE_SIZE (PTIMERAPCROUTINE, 8) - TEST_TYPE_ALIGN (PTIMERAPCROUTINE, 8) -} - -static void test_pack_PTIME_ZONE_INFORMATION(void) -{ - /* PTIME_ZONE_INFORMATION */ - TEST_TYPE_SIZE (PTIME_ZONE_INFORMATION, 8) - TEST_TYPE_ALIGN (PTIME_ZONE_INFORMATION, 8) - TEST_TARGET_SIZE (PTIME_ZONE_INFORMATION, 172) - TEST_TARGET_ALIGN(PTIME_ZONE_INFORMATION, 4) -} - -static void test_pack_PWIN32_FIND_DATAA(void) -{ - /* PWIN32_FIND_DATAA */ - TEST_TYPE_SIZE (PWIN32_FIND_DATAA, 8) - TEST_TYPE_ALIGN (PWIN32_FIND_DATAA, 8) - TEST_TARGET_SIZE (PWIN32_FIND_DATAA, 320) - TEST_TARGET_ALIGN(PWIN32_FIND_DATAA, 4) -} - -static void test_pack_PWIN32_FIND_DATAW(void) -{ - /* PWIN32_FIND_DATAW */ - TEST_TYPE_SIZE (PWIN32_FIND_DATAW, 8) - TEST_TYPE_ALIGN (PWIN32_FIND_DATAW, 8) - TEST_TARGET_SIZE (PWIN32_FIND_DATAW, 592) - TEST_TARGET_ALIGN(PWIN32_FIND_DATAW, 4) -} - -static void test_pack_RIP_INFO(void) -{ - /* RIP_INFO */ - TEST_TYPE_SIZE (RIP_INFO, 8) - TEST_TYPE_ALIGN (RIP_INFO, 4) - TEST_FIELD_SIZE (RIP_INFO, dwError, 4) - TEST_FIELD_ALIGN (RIP_INFO, dwError, 4) - TEST_FIELD_OFFSET(RIP_INFO, dwError, 0) - TEST_FIELD_SIZE (RIP_INFO, dwType, 4) - TEST_FIELD_ALIGN (RIP_INFO, dwType, 4) - TEST_FIELD_OFFSET(RIP_INFO, dwType, 4) -} - -static void test_pack_SECURITY_ATTRIBUTES(void) -{ - /* SECURITY_ATTRIBUTES */ - TEST_TYPE_SIZE (SECURITY_ATTRIBUTES, 24) - TEST_TYPE_ALIGN (SECURITY_ATTRIBUTES, 8) - TEST_FIELD_SIZE (SECURITY_ATTRIBUTES, nLength, 4) - TEST_FIELD_ALIGN (SECURITY_ATTRIBUTES, nLength, 4) - TEST_FIELD_OFFSET(SECURITY_ATTRIBUTES, nLength, 0) - TEST_FIELD_SIZE (SECURITY_ATTRIBUTES, lpSecurityDescriptor, 8) - TEST_FIELD_ALIGN (SECURITY_ATTRIBUTES, lpSecurityDescriptor, 8) - TEST_FIELD_OFFSET(SECURITY_ATTRIBUTES, lpSecurityDescriptor, 8) - TEST_FIELD_SIZE (SECURITY_ATTRIBUTES, bInheritHandle, 4) - TEST_FIELD_ALIGN (SECURITY_ATTRIBUTES, bInheritHandle, 4) - TEST_FIELD_OFFSET(SECURITY_ATTRIBUTES, bInheritHandle, 16) -} - -static void test_pack_STARTUPINFOA(void) -{ - /* STARTUPINFOA */ - TEST_TYPE_SIZE (STARTUPINFOA, 104) - TEST_TYPE_ALIGN (STARTUPINFOA, 8) - TEST_FIELD_SIZE (STARTUPINFOA, cb, 4) - TEST_FIELD_ALIGN (STARTUPINFOA, cb, 4) - TEST_FIELD_OFFSET(STARTUPINFOA, cb, 0) - TEST_FIELD_SIZE (STARTUPINFOA, lpReserved, 8) - TEST_FIELD_ALIGN (STARTUPINFOA, lpReserved, 8) - TEST_FIELD_OFFSET(STARTUPINFOA, lpReserved, 8) - TEST_FIELD_SIZE (STARTUPINFOA, lpDesktop, 8) - TEST_FIELD_ALIGN (STARTUPINFOA, lpDesktop, 8) - TEST_FIELD_OFFSET(STARTUPINFOA, lpDesktop, 16) - TEST_FIELD_SIZE (STARTUPINFOA, lpTitle, 8) - TEST_FIELD_ALIGN (STARTUPINFOA, lpTitle, 8) - TEST_FIELD_OFFSET(STARTUPINFOA, lpTitle, 24) - TEST_FIELD_SIZE (STARTUPINFOA, dwX, 4) - TEST_FIELD_ALIGN (STARTUPINFOA, dwX, 4) - TEST_FIELD_OFFSET(STARTUPINFOA, dwX, 32) - TEST_FIELD_SIZE (STARTUPINFOA, dwY, 4) - TEST_FIELD_ALIGN (STARTUPINFOA, dwY, 4) - TEST_FIELD_OFFSET(STARTUPINFOA, dwY, 36) - TEST_FIELD_SIZE (STARTUPINFOA, dwXSize, 4) - TEST_FIELD_ALIGN (STARTUPINFOA, dwXSize, 4) - TEST_FIELD_OFFSET(STARTUPINFOA, dwXSize, 40) - TEST_FIELD_SIZE (STARTUPINFOA, dwYSize, 4) - TEST_FIELD_ALIGN (STARTUPINFOA, dwYSize, 4) - TEST_FIELD_OFFSET(STARTUPINFOA, dwYSize, 44) - TEST_FIELD_SIZE (STARTUPINFOA, dwXCountChars, 4) - TEST_FIELD_ALIGN (STARTUPINFOA, dwXCountChars, 4) - TEST_FIELD_OFFSET(STARTUPINFOA, dwXCountChars, 48) - TEST_FIELD_SIZE (STARTUPINFOA, dwYCountChars, 4) - TEST_FIELD_ALIGN (STARTUPINFOA, dwYCountChars, 4) - TEST_FIELD_OFFSET(STARTUPINFOA, dwYCountChars, 52) - TEST_FIELD_SIZE (STARTUPINFOA, dwFillAttribute, 4) - TEST_FIELD_ALIGN (STARTUPINFOA, dwFillAttribute, 4) - TEST_FIELD_OFFSET(STARTUPINFOA, dwFillAttribute, 56) - TEST_FIELD_SIZE (STARTUPINFOA, dwFlags, 4) - TEST_FIELD_ALIGN (STARTUPINFOA, dwFlags, 4) - TEST_FIELD_OFFSET(STARTUPINFOA, dwFlags, 60) - TEST_FIELD_SIZE (STARTUPINFOA, wShowWindow, 2) - TEST_FIELD_ALIGN (STARTUPINFOA, wShowWindow, 2) - TEST_FIELD_OFFSET(STARTUPINFOA, wShowWindow, 64) - TEST_FIELD_SIZE (STARTUPINFOA, cbReserved2, 2) - TEST_FIELD_ALIGN (STARTUPINFOA, cbReserved2, 2) - TEST_FIELD_OFFSET(STARTUPINFOA, cbReserved2, 66) - TEST_FIELD_SIZE (STARTUPINFOA, lpReserved2, 8) - TEST_FIELD_ALIGN (STARTUPINFOA, lpReserved2, 8) - TEST_FIELD_OFFSET(STARTUPINFOA, lpReserved2, 72) - TEST_FIELD_SIZE (STARTUPINFOA, hStdInput, 8) - TEST_FIELD_ALIGN (STARTUPINFOA, hStdInput, 8) - TEST_FIELD_OFFSET(STARTUPINFOA, hStdInput, 80) - TEST_FIELD_SIZE (STARTUPINFOA, hStdOutput, 8) - TEST_FIELD_ALIGN (STARTUPINFOA, hStdOutput, 8) - TEST_FIELD_OFFSET(STARTUPINFOA, hStdOutput, 88) - TEST_FIELD_SIZE (STARTUPINFOA, hStdError, 8) - TEST_FIELD_ALIGN (STARTUPINFOA, hStdError, 8) - TEST_FIELD_OFFSET(STARTUPINFOA, hStdError, 96) -} - -static void test_pack_STARTUPINFOW(void) -{ - /* STARTUPINFOW */ - TEST_TYPE_SIZE (STARTUPINFOW, 104) - TEST_TYPE_ALIGN (STARTUPINFOW, 8) - TEST_FIELD_SIZE (STARTUPINFOW, cb, 4) - TEST_FIELD_ALIGN (STARTUPINFOW, cb, 4) - TEST_FIELD_OFFSET(STARTUPINFOW, cb, 0) - TEST_FIELD_SIZE (STARTUPINFOW, lpReserved, 8) - TEST_FIELD_ALIGN (STARTUPINFOW, lpReserved, 8) - TEST_FIELD_OFFSET(STARTUPINFOW, lpReserved, 8) - TEST_FIELD_SIZE (STARTUPINFOW, lpDesktop, 8) - TEST_FIELD_ALIGN (STARTUPINFOW, lpDesktop, 8) - TEST_FIELD_OFFSET(STARTUPINFOW, lpDesktop, 16) - TEST_FIELD_SIZE (STARTUPINFOW, lpTitle, 8) - TEST_FIELD_ALIGN (STARTUPINFOW, lpTitle, 8) - TEST_FIELD_OFFSET(STARTUPINFOW, lpTitle, 24) - TEST_FIELD_SIZE (STARTUPINFOW, dwX, 4) - TEST_FIELD_ALIGN (STARTUPINFOW, dwX, 4) - TEST_FIELD_OFFSET(STARTUPINFOW, dwX, 32) - TEST_FIELD_SIZE (STARTUPINFOW, dwY, 4) - TEST_FIELD_ALIGN (STARTUPINFOW, dwY, 4) - TEST_FIELD_OFFSET(STARTUPINFOW, dwY, 36) - TEST_FIELD_SIZE (STARTUPINFOW, dwXSize, 4) - TEST_FIELD_ALIGN (STARTUPINFOW, dwXSize, 4) - TEST_FIELD_OFFSET(STARTUPINFOW, dwXSize, 40) - TEST_FIELD_SIZE (STARTUPINFOW, dwYSize, 4) - TEST_FIELD_ALIGN (STARTUPINFOW, dwYSize, 4) - TEST_FIELD_OFFSET(STARTUPINFOW, dwYSize, 44) - TEST_FIELD_SIZE (STARTUPINFOW, dwXCountChars, 4) - TEST_FIELD_ALIGN (STARTUPINFOW, dwXCountChars, 4) - TEST_FIELD_OFFSET(STARTUPINFOW, dwXCountChars, 48) - TEST_FIELD_SIZE (STARTUPINFOW, dwYCountChars, 4) - TEST_FIELD_ALIGN (STARTUPINFOW, dwYCountChars, 4) - TEST_FIELD_OFFSET(STARTUPINFOW, dwYCountChars, 52) - TEST_FIELD_SIZE (STARTUPINFOW, dwFillAttribute, 4) - TEST_FIELD_ALIGN (STARTUPINFOW, dwFillAttribute, 4) - TEST_FIELD_OFFSET(STARTUPINFOW, dwFillAttribute, 56) - TEST_FIELD_SIZE (STARTUPINFOW, dwFlags, 4) - TEST_FIELD_ALIGN (STARTUPINFOW, dwFlags, 4) - TEST_FIELD_OFFSET(STARTUPINFOW, dwFlags, 60) - TEST_FIELD_SIZE (STARTUPINFOW, wShowWindow, 2) - TEST_FIELD_ALIGN (STARTUPINFOW, wShowWindow, 2) - TEST_FIELD_OFFSET(STARTUPINFOW, wShowWindow, 64) - TEST_FIELD_SIZE (STARTUPINFOW, cbReserved2, 2) - TEST_FIELD_ALIGN (STARTUPINFOW, cbReserved2, 2) - TEST_FIELD_OFFSET(STARTUPINFOW, cbReserved2, 66) - TEST_FIELD_SIZE (STARTUPINFOW, lpReserved2, 8) - TEST_FIELD_ALIGN (STARTUPINFOW, lpReserved2, 8) - TEST_FIELD_OFFSET(STARTUPINFOW, lpReserved2, 72) - TEST_FIELD_SIZE (STARTUPINFOW, hStdInput, 8) - TEST_FIELD_ALIGN (STARTUPINFOW, hStdInput, 8) - TEST_FIELD_OFFSET(STARTUPINFOW, hStdInput, 80) - TEST_FIELD_SIZE (STARTUPINFOW, hStdOutput, 8) - TEST_FIELD_ALIGN (STARTUPINFOW, hStdOutput, 8) - TEST_FIELD_OFFSET(STARTUPINFOW, hStdOutput, 88) - TEST_FIELD_SIZE (STARTUPINFOW, hStdError, 8) - TEST_FIELD_ALIGN (STARTUPINFOW, hStdError, 8) - TEST_FIELD_OFFSET(STARTUPINFOW, hStdError, 96) -} - -static void test_pack_SYSTEMTIME(void) -{ - /* SYSTEMTIME */ - TEST_TYPE_SIZE (SYSTEMTIME, 16) - TEST_TYPE_ALIGN (SYSTEMTIME, 2) - TEST_FIELD_SIZE (SYSTEMTIME, wYear, 2) - TEST_FIELD_ALIGN (SYSTEMTIME, wYear, 2) - TEST_FIELD_OFFSET(SYSTEMTIME, wYear, 0) - TEST_FIELD_SIZE (SYSTEMTIME, wMonth, 2) - TEST_FIELD_ALIGN (SYSTEMTIME, wMonth, 2) - TEST_FIELD_OFFSET(SYSTEMTIME, wMonth, 2) - TEST_FIELD_SIZE (SYSTEMTIME, wDayOfWeek, 2) - TEST_FIELD_ALIGN (SYSTEMTIME, wDayOfWeek, 2) - TEST_FIELD_OFFSET(SYSTEMTIME, wDayOfWeek, 4) - TEST_FIELD_SIZE (SYSTEMTIME, wDay, 2) - TEST_FIELD_ALIGN (SYSTEMTIME, wDay, 2) - TEST_FIELD_OFFSET(SYSTEMTIME, wDay, 6) - TEST_FIELD_SIZE (SYSTEMTIME, wHour, 2) - TEST_FIELD_ALIGN (SYSTEMTIME, wHour, 2) - TEST_FIELD_OFFSET(SYSTEMTIME, wHour, 8) - TEST_FIELD_SIZE (SYSTEMTIME, wMinute, 2) - TEST_FIELD_ALIGN (SYSTEMTIME, wMinute, 2) - TEST_FIELD_OFFSET(SYSTEMTIME, wMinute, 10) - TEST_FIELD_SIZE (SYSTEMTIME, wSecond, 2) - TEST_FIELD_ALIGN (SYSTEMTIME, wSecond, 2) - TEST_FIELD_OFFSET(SYSTEMTIME, wSecond, 12) - TEST_FIELD_SIZE (SYSTEMTIME, wMilliseconds, 2) - TEST_FIELD_ALIGN (SYSTEMTIME, wMilliseconds, 2) - TEST_FIELD_OFFSET(SYSTEMTIME, wMilliseconds, 14) -} - -static void test_pack_SYSTEM_INFO(void) -{ - /* SYSTEM_INFO */ -} - -static void test_pack_SYSTEM_POWER_STATUS(void) -{ - /* SYSTEM_POWER_STATUS */ - TEST_TYPE_SIZE (SYSTEM_POWER_STATUS, 12) - TEST_TYPE_ALIGN (SYSTEM_POWER_STATUS, 4) - TEST_FIELD_SIZE (SYSTEM_POWER_STATUS, ACLineStatus, 1) - TEST_FIELD_ALIGN (SYSTEM_POWER_STATUS, ACLineStatus, 1) - TEST_FIELD_OFFSET(SYSTEM_POWER_STATUS, ACLineStatus, 0) - TEST_FIELD_SIZE (SYSTEM_POWER_STATUS, BatteryFlag, 1) - TEST_FIELD_ALIGN (SYSTEM_POWER_STATUS, BatteryFlag, 1) - TEST_FIELD_OFFSET(SYSTEM_POWER_STATUS, BatteryFlag, 1) - TEST_FIELD_SIZE (SYSTEM_POWER_STATUS, BatteryLifePercent, 1) - TEST_FIELD_ALIGN (SYSTEM_POWER_STATUS, BatteryLifePercent, 1) - TEST_FIELD_OFFSET(SYSTEM_POWER_STATUS, BatteryLifePercent, 2) - TEST_FIELD_SIZE (SYSTEM_POWER_STATUS, Reserved1, 1) - TEST_FIELD_ALIGN (SYSTEM_POWER_STATUS, Reserved1, 1) - TEST_FIELD_OFFSET(SYSTEM_POWER_STATUS, Reserved1, 3) - TEST_FIELD_SIZE (SYSTEM_POWER_STATUS, BatteryLifeTime, 4) - TEST_FIELD_ALIGN (SYSTEM_POWER_STATUS, BatteryLifeTime, 4) - TEST_FIELD_OFFSET(SYSTEM_POWER_STATUS, BatteryLifeTime, 4) - TEST_FIELD_SIZE (SYSTEM_POWER_STATUS, BatteryFullLifeTime, 4) - TEST_FIELD_ALIGN (SYSTEM_POWER_STATUS, BatteryFullLifeTime, 4) - TEST_FIELD_OFFSET(SYSTEM_POWER_STATUS, BatteryFullLifeTime, 8) -} - -static void test_pack_TIME_ZONE_INFORMATION(void) -{ - /* TIME_ZONE_INFORMATION */ - TEST_TYPE_SIZE (TIME_ZONE_INFORMATION, 172) - TEST_TYPE_ALIGN (TIME_ZONE_INFORMATION, 4) - TEST_FIELD_SIZE (TIME_ZONE_INFORMATION, Bias, 4) - TEST_FIELD_ALIGN (TIME_ZONE_INFORMATION, Bias, 4) - TEST_FIELD_OFFSET(TIME_ZONE_INFORMATION, Bias, 0) - TEST_FIELD_SIZE (TIME_ZONE_INFORMATION, StandardName, 64) - TEST_FIELD_ALIGN (TIME_ZONE_INFORMATION, StandardName, 2) - TEST_FIELD_OFFSET(TIME_ZONE_INFORMATION, StandardName, 4) - TEST_FIELD_SIZE (TIME_ZONE_INFORMATION, StandardDate, 16) - TEST_FIELD_ALIGN (TIME_ZONE_INFORMATION, StandardDate, 2) - TEST_FIELD_OFFSET(TIME_ZONE_INFORMATION, StandardDate, 68) - TEST_FIELD_SIZE (TIME_ZONE_INFORMATION, StandardBias, 4) - TEST_FIELD_ALIGN (TIME_ZONE_INFORMATION, StandardBias, 4) - TEST_FIELD_OFFSET(TIME_ZONE_INFORMATION, StandardBias, 84) - TEST_FIELD_SIZE (TIME_ZONE_INFORMATION, DaylightName, 64) - TEST_FIELD_ALIGN (TIME_ZONE_INFORMATION, DaylightName, 2) - TEST_FIELD_OFFSET(TIME_ZONE_INFORMATION, DaylightName, 88) - TEST_FIELD_SIZE (TIME_ZONE_INFORMATION, DaylightDate, 16) - TEST_FIELD_ALIGN (TIME_ZONE_INFORMATION, DaylightDate, 2) - TEST_FIELD_OFFSET(TIME_ZONE_INFORMATION, DaylightDate, 152) - TEST_FIELD_SIZE (TIME_ZONE_INFORMATION, DaylightBias, 4) - TEST_FIELD_ALIGN (TIME_ZONE_INFORMATION, DaylightBias, 4) - TEST_FIELD_OFFSET(TIME_ZONE_INFORMATION, DaylightBias, 168) -} - -static void test_pack_UNLOAD_DLL_DEBUG_INFO(void) -{ - /* UNLOAD_DLL_DEBUG_INFO */ - TEST_TYPE_SIZE (UNLOAD_DLL_DEBUG_INFO, 8) - TEST_TYPE_ALIGN (UNLOAD_DLL_DEBUG_INFO, 8) - TEST_FIELD_SIZE (UNLOAD_DLL_DEBUG_INFO, lpBaseOfDll, 8) - TEST_FIELD_ALIGN (UNLOAD_DLL_DEBUG_INFO, lpBaseOfDll, 8) - TEST_FIELD_OFFSET(UNLOAD_DLL_DEBUG_INFO, lpBaseOfDll, 0) -} - -static void test_pack_WAITORTIMERCALLBACK(void) -{ - /* WAITORTIMERCALLBACK */ - TEST_TYPE_SIZE (WAITORTIMERCALLBACK, 8) - TEST_TYPE_ALIGN (WAITORTIMERCALLBACK, 8) -} - -static void test_pack_WIN32_FILE_ATTRIBUTE_DATA(void) -{ - /* WIN32_FILE_ATTRIBUTE_DATA */ - TEST_TYPE_SIZE (WIN32_FILE_ATTRIBUTE_DATA, 36) - TEST_TYPE_ALIGN (WIN32_FILE_ATTRIBUTE_DATA, 4) - TEST_FIELD_SIZE (WIN32_FILE_ATTRIBUTE_DATA, dwFileAttributes, 4) - TEST_FIELD_ALIGN (WIN32_FILE_ATTRIBUTE_DATA, dwFileAttributes, 4) - TEST_FIELD_OFFSET(WIN32_FILE_ATTRIBUTE_DATA, dwFileAttributes, 0) - TEST_FIELD_SIZE (WIN32_FILE_ATTRIBUTE_DATA, ftCreationTime, 8) - TEST_FIELD_ALIGN (WIN32_FILE_ATTRIBUTE_DATA, ftCreationTime, 4) - TEST_FIELD_OFFSET(WIN32_FILE_ATTRIBUTE_DATA, ftCreationTime, 4) - TEST_FIELD_SIZE (WIN32_FILE_ATTRIBUTE_DATA, ftLastAccessTime, 8) - TEST_FIELD_ALIGN (WIN32_FILE_ATTRIBUTE_DATA, ftLastAccessTime, 4) - TEST_FIELD_OFFSET(WIN32_FILE_ATTRIBUTE_DATA, ftLastAccessTime, 12) - TEST_FIELD_SIZE (WIN32_FILE_ATTRIBUTE_DATA, ftLastWriteTime, 8) - TEST_FIELD_ALIGN (WIN32_FILE_ATTRIBUTE_DATA, ftLastWriteTime, 4) - TEST_FIELD_OFFSET(WIN32_FILE_ATTRIBUTE_DATA, ftLastWriteTime, 20) - TEST_FIELD_SIZE (WIN32_FILE_ATTRIBUTE_DATA, nFileSizeHigh, 4) - TEST_FIELD_ALIGN (WIN32_FILE_ATTRIBUTE_DATA, nFileSizeHigh, 4) - TEST_FIELD_OFFSET(WIN32_FILE_ATTRIBUTE_DATA, nFileSizeHigh, 28) - TEST_FIELD_SIZE (WIN32_FILE_ATTRIBUTE_DATA, nFileSizeLow, 4) - TEST_FIELD_ALIGN (WIN32_FILE_ATTRIBUTE_DATA, nFileSizeLow, 4) - TEST_FIELD_OFFSET(WIN32_FILE_ATTRIBUTE_DATA, nFileSizeLow, 32) -} - -static void test_pack_WIN32_FIND_DATAA(void) -{ - /* WIN32_FIND_DATAA */ - TEST_TYPE_SIZE (WIN32_FIND_DATAA, 320) - TEST_TYPE_ALIGN (WIN32_FIND_DATAA, 4) - TEST_FIELD_SIZE (WIN32_FIND_DATAA, dwFileAttributes, 4) - TEST_FIELD_ALIGN (WIN32_FIND_DATAA, dwFileAttributes, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAA, dwFileAttributes, 0) - TEST_FIELD_SIZE (WIN32_FIND_DATAA, ftCreationTime, 8) - TEST_FIELD_ALIGN (WIN32_FIND_DATAA, ftCreationTime, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAA, ftCreationTime, 4) - TEST_FIELD_SIZE (WIN32_FIND_DATAA, ftLastAccessTime, 8) - TEST_FIELD_ALIGN (WIN32_FIND_DATAA, ftLastAccessTime, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAA, ftLastAccessTime, 12) - TEST_FIELD_SIZE (WIN32_FIND_DATAA, ftLastWriteTime, 8) - TEST_FIELD_ALIGN (WIN32_FIND_DATAA, ftLastWriteTime, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAA, ftLastWriteTime, 20) - TEST_FIELD_SIZE (WIN32_FIND_DATAA, nFileSizeHigh, 4) - TEST_FIELD_ALIGN (WIN32_FIND_DATAA, nFileSizeHigh, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAA, nFileSizeHigh, 28) - TEST_FIELD_SIZE (WIN32_FIND_DATAA, nFileSizeLow, 4) - TEST_FIELD_ALIGN (WIN32_FIND_DATAA, nFileSizeLow, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAA, nFileSizeLow, 32) - TEST_FIELD_SIZE (WIN32_FIND_DATAA, dwReserved0, 4) - TEST_FIELD_ALIGN (WIN32_FIND_DATAA, dwReserved0, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAA, dwReserved0, 36) - TEST_FIELD_SIZE (WIN32_FIND_DATAA, dwReserved1, 4) - TEST_FIELD_ALIGN (WIN32_FIND_DATAA, dwReserved1, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAA, dwReserved1, 40) - TEST_FIELD_SIZE (WIN32_FIND_DATAA, cFileName, 260) - TEST_FIELD_ALIGN (WIN32_FIND_DATAA, cFileName, 1) - TEST_FIELD_OFFSET(WIN32_FIND_DATAA, cFileName, 44) - TEST_FIELD_SIZE (WIN32_FIND_DATAA, cAlternateFileName, 14) - TEST_FIELD_ALIGN (WIN32_FIND_DATAA, cAlternateFileName, 1) - TEST_FIELD_OFFSET(WIN32_FIND_DATAA, cAlternateFileName, 304) -} - -static void test_pack_WIN32_FIND_DATAW(void) -{ - /* WIN32_FIND_DATAW */ - TEST_TYPE_SIZE (WIN32_FIND_DATAW, 592) - TEST_TYPE_ALIGN (WIN32_FIND_DATAW, 4) - TEST_FIELD_SIZE (WIN32_FIND_DATAW, dwFileAttributes, 4) - TEST_FIELD_ALIGN (WIN32_FIND_DATAW, dwFileAttributes, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAW, dwFileAttributes, 0) - TEST_FIELD_SIZE (WIN32_FIND_DATAW, ftCreationTime, 8) - TEST_FIELD_ALIGN (WIN32_FIND_DATAW, ftCreationTime, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAW, ftCreationTime, 4) - TEST_FIELD_SIZE (WIN32_FIND_DATAW, ftLastAccessTime, 8) - TEST_FIELD_ALIGN (WIN32_FIND_DATAW, ftLastAccessTime, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAW, ftLastAccessTime, 12) - TEST_FIELD_SIZE (WIN32_FIND_DATAW, ftLastWriteTime, 8) - TEST_FIELD_ALIGN (WIN32_FIND_DATAW, ftLastWriteTime, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAW, ftLastWriteTime, 20) - TEST_FIELD_SIZE (WIN32_FIND_DATAW, nFileSizeHigh, 4) - TEST_FIELD_ALIGN (WIN32_FIND_DATAW, nFileSizeHigh, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAW, nFileSizeHigh, 28) - TEST_FIELD_SIZE (WIN32_FIND_DATAW, nFileSizeLow, 4) - TEST_FIELD_ALIGN (WIN32_FIND_DATAW, nFileSizeLow, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAW, nFileSizeLow, 32) - TEST_FIELD_SIZE (WIN32_FIND_DATAW, dwReserved0, 4) - TEST_FIELD_ALIGN (WIN32_FIND_DATAW, dwReserved0, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAW, dwReserved0, 36) - TEST_FIELD_SIZE (WIN32_FIND_DATAW, dwReserved1, 4) - TEST_FIELD_ALIGN (WIN32_FIND_DATAW, dwReserved1, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAW, dwReserved1, 40) - TEST_FIELD_SIZE (WIN32_FIND_DATAW, cFileName, 520) - TEST_FIELD_ALIGN (WIN32_FIND_DATAW, cFileName, 2) - TEST_FIELD_OFFSET(WIN32_FIND_DATAW, cFileName, 44) - TEST_FIELD_SIZE (WIN32_FIND_DATAW, cAlternateFileName, 28) - TEST_FIELD_ALIGN (WIN32_FIND_DATAW, cAlternateFileName, 2) - TEST_FIELD_OFFSET(WIN32_FIND_DATAW, cAlternateFileName, 564) -} - -static void test_pack_WIN32_STREAM_ID(void) -{ - /* WIN32_STREAM_ID (pack 8) */ - TEST_TYPE_SIZE (WIN32_STREAM_ID, 24) - TEST_TYPE_ALIGN (WIN32_STREAM_ID, 8) - TEST_FIELD_SIZE (WIN32_STREAM_ID, dwStreamId, 4) - TEST_FIELD_ALIGN (WIN32_STREAM_ID, dwStreamId, 4) - TEST_FIELD_OFFSET(WIN32_STREAM_ID, dwStreamId, 0) - TEST_FIELD_SIZE (WIN32_STREAM_ID, dwStreamAttributes, 4) - TEST_FIELD_ALIGN (WIN32_STREAM_ID, dwStreamAttributes, 4) - TEST_FIELD_OFFSET(WIN32_STREAM_ID, dwStreamAttributes, 4) - TEST_FIELD_SIZE (WIN32_STREAM_ID, Size, 8) - TEST_FIELD_ALIGN (WIN32_STREAM_ID, Size, 8) - TEST_FIELD_OFFSET(WIN32_STREAM_ID, Size, 8) - TEST_FIELD_SIZE (WIN32_STREAM_ID, dwStreamNameSize, 4) - TEST_FIELD_ALIGN (WIN32_STREAM_ID, dwStreamNameSize, 4) - TEST_FIELD_OFFSET(WIN32_STREAM_ID, dwStreamNameSize, 16) - TEST_FIELD_SIZE (WIN32_STREAM_ID, cStreamName, 2) - TEST_FIELD_ALIGN (WIN32_STREAM_ID, cStreamName, 2) - TEST_FIELD_OFFSET(WIN32_STREAM_ID, cStreamName, 20) -} - -#else /* _WIN64 */ - -static void test_pack_LPOSVERSIONINFOA(void) -{ - /* LPOSVERSIONINFOA */ - TEST_TYPE_SIZE (LPOSVERSIONINFOA, 4) - TEST_TYPE_ALIGN (LPOSVERSIONINFOA, 4) - TEST_TARGET_SIZE (LPOSVERSIONINFOA, 148) - TEST_TARGET_ALIGN(LPOSVERSIONINFOA, 4) -} - -static void test_pack_LPOSVERSIONINFOEXA(void) -{ - /* LPOSVERSIONINFOEXA */ - TEST_TYPE_SIZE (LPOSVERSIONINFOEXA, 4) - TEST_TYPE_ALIGN (LPOSVERSIONINFOEXA, 4) - TEST_TARGET_SIZE (LPOSVERSIONINFOEXA, 156) - TEST_TARGET_ALIGN(LPOSVERSIONINFOEXA, 4) -} - -static void test_pack_LPOSVERSIONINFOEXW(void) -{ - /* LPOSVERSIONINFOEXW */ - TEST_TYPE_SIZE (LPOSVERSIONINFOEXW, 4) - TEST_TYPE_ALIGN (LPOSVERSIONINFOEXW, 4) - TEST_TARGET_SIZE (LPOSVERSIONINFOEXW, 284) - TEST_TARGET_ALIGN(LPOSVERSIONINFOEXW, 4) -} - -static void test_pack_LPOSVERSIONINFOW(void) -{ - /* LPOSVERSIONINFOW */ - TEST_TYPE_SIZE (LPOSVERSIONINFOW, 4) - TEST_TYPE_ALIGN (LPOSVERSIONINFOW, 4) - TEST_TARGET_SIZE (LPOSVERSIONINFOW, 276) - TEST_TARGET_ALIGN(LPOSVERSIONINFOW, 4) -} - -static void test_pack_OSVERSIONINFOA(void) -{ - /* OSVERSIONINFOA */ - TEST_TYPE_SIZE (OSVERSIONINFOA, 148) - TEST_TYPE_ALIGN (OSVERSIONINFOA, 4) - TEST_FIELD_SIZE (OSVERSIONINFOA, dwOSVersionInfoSize, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOA, dwOSVersionInfoSize, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOA, dwOSVersionInfoSize, 0) - TEST_FIELD_SIZE (OSVERSIONINFOA, dwMajorVersion, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOA, dwMajorVersion, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOA, dwMajorVersion, 4) - TEST_FIELD_SIZE (OSVERSIONINFOA, dwMinorVersion, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOA, dwMinorVersion, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOA, dwMinorVersion, 8) - TEST_FIELD_SIZE (OSVERSIONINFOA, dwBuildNumber, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOA, dwBuildNumber, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOA, dwBuildNumber, 12) - TEST_FIELD_SIZE (OSVERSIONINFOA, dwPlatformId, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOA, dwPlatformId, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOA, dwPlatformId, 16) - TEST_FIELD_SIZE (OSVERSIONINFOA, szCSDVersion, 128) - TEST_FIELD_ALIGN (OSVERSIONINFOA, szCSDVersion, 1) - TEST_FIELD_OFFSET(OSVERSIONINFOA, szCSDVersion, 20) -} - -static void test_pack_OSVERSIONINFOEXA(void) -{ - /* OSVERSIONINFOEXA */ - TEST_TYPE_SIZE (OSVERSIONINFOEXA, 156) - TEST_TYPE_ALIGN (OSVERSIONINFOEXA, 4) - TEST_FIELD_SIZE (OSVERSIONINFOEXA, dwOSVersionInfoSize, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOEXA, dwOSVersionInfoSize, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOEXA, dwOSVersionInfoSize, 0) - TEST_FIELD_SIZE (OSVERSIONINFOEXA, dwMajorVersion, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOEXA, dwMajorVersion, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOEXA, dwMajorVersion, 4) - TEST_FIELD_SIZE (OSVERSIONINFOEXA, dwMinorVersion, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOEXA, dwMinorVersion, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOEXA, dwMinorVersion, 8) - TEST_FIELD_SIZE (OSVERSIONINFOEXA, dwBuildNumber, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOEXA, dwBuildNumber, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOEXA, dwBuildNumber, 12) - TEST_FIELD_SIZE (OSVERSIONINFOEXA, dwPlatformId, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOEXA, dwPlatformId, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOEXA, dwPlatformId, 16) - TEST_FIELD_SIZE (OSVERSIONINFOEXA, szCSDVersion, 128) - TEST_FIELD_ALIGN (OSVERSIONINFOEXA, szCSDVersion, 1) - TEST_FIELD_OFFSET(OSVERSIONINFOEXA, szCSDVersion, 20) - TEST_FIELD_SIZE (OSVERSIONINFOEXA, wServicePackMajor, 2) - TEST_FIELD_ALIGN (OSVERSIONINFOEXA, wServicePackMajor, 2) - TEST_FIELD_OFFSET(OSVERSIONINFOEXA, wServicePackMajor, 148) - TEST_FIELD_SIZE (OSVERSIONINFOEXA, wServicePackMinor, 2) - TEST_FIELD_ALIGN (OSVERSIONINFOEXA, wServicePackMinor, 2) - TEST_FIELD_OFFSET(OSVERSIONINFOEXA, wServicePackMinor, 150) - TEST_FIELD_SIZE (OSVERSIONINFOEXA, wSuiteMask, 2) - TEST_FIELD_ALIGN (OSVERSIONINFOEXA, wSuiteMask, 2) - TEST_FIELD_OFFSET(OSVERSIONINFOEXA, wSuiteMask, 152) - TEST_FIELD_SIZE (OSVERSIONINFOEXA, wProductType, 1) - TEST_FIELD_ALIGN (OSVERSIONINFOEXA, wProductType, 1) - TEST_FIELD_OFFSET(OSVERSIONINFOEXA, wProductType, 154) - TEST_FIELD_SIZE (OSVERSIONINFOEXA, wReserved, 1) - TEST_FIELD_ALIGN (OSVERSIONINFOEXA, wReserved, 1) - TEST_FIELD_OFFSET(OSVERSIONINFOEXA, wReserved, 155) -} - -static void test_pack_OSVERSIONINFOEXW(void) -{ - /* OSVERSIONINFOEXW */ - TEST_TYPE_SIZE (OSVERSIONINFOEXW, 284) - TEST_TYPE_ALIGN (OSVERSIONINFOEXW, 4) - TEST_FIELD_SIZE (OSVERSIONINFOEXW, dwOSVersionInfoSize, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOEXW, dwOSVersionInfoSize, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOEXW, dwOSVersionInfoSize, 0) - TEST_FIELD_SIZE (OSVERSIONINFOEXW, dwMajorVersion, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOEXW, dwMajorVersion, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOEXW, dwMajorVersion, 4) - TEST_FIELD_SIZE (OSVERSIONINFOEXW, dwMinorVersion, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOEXW, dwMinorVersion, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOEXW, dwMinorVersion, 8) - TEST_FIELD_SIZE (OSVERSIONINFOEXW, dwBuildNumber, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOEXW, dwBuildNumber, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOEXW, dwBuildNumber, 12) - TEST_FIELD_SIZE (OSVERSIONINFOEXW, dwPlatformId, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOEXW, dwPlatformId, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOEXW, dwPlatformId, 16) - TEST_FIELD_SIZE (OSVERSIONINFOEXW, szCSDVersion, 256) - TEST_FIELD_ALIGN (OSVERSIONINFOEXW, szCSDVersion, 2) - TEST_FIELD_OFFSET(OSVERSIONINFOEXW, szCSDVersion, 20) - TEST_FIELD_SIZE (OSVERSIONINFOEXW, wServicePackMajor, 2) - TEST_FIELD_ALIGN (OSVERSIONINFOEXW, wServicePackMajor, 2) - TEST_FIELD_OFFSET(OSVERSIONINFOEXW, wServicePackMajor, 276) - TEST_FIELD_SIZE (OSVERSIONINFOEXW, wServicePackMinor, 2) - TEST_FIELD_ALIGN (OSVERSIONINFOEXW, wServicePackMinor, 2) - TEST_FIELD_OFFSET(OSVERSIONINFOEXW, wServicePackMinor, 278) - TEST_FIELD_SIZE (OSVERSIONINFOEXW, wSuiteMask, 2) - TEST_FIELD_ALIGN (OSVERSIONINFOEXW, wSuiteMask, 2) - TEST_FIELD_OFFSET(OSVERSIONINFOEXW, wSuiteMask, 280) - TEST_FIELD_SIZE (OSVERSIONINFOEXW, wProductType, 1) - TEST_FIELD_ALIGN (OSVERSIONINFOEXW, wProductType, 1) - TEST_FIELD_OFFSET(OSVERSIONINFOEXW, wProductType, 282) - TEST_FIELD_SIZE (OSVERSIONINFOEXW, wReserved, 1) - TEST_FIELD_ALIGN (OSVERSIONINFOEXW, wReserved, 1) - TEST_FIELD_OFFSET(OSVERSIONINFOEXW, wReserved, 283) -} - -static void test_pack_OSVERSIONINFOW(void) -{ - /* OSVERSIONINFOW */ - TEST_TYPE_SIZE (OSVERSIONINFOW, 276) - TEST_TYPE_ALIGN (OSVERSIONINFOW, 4) - TEST_FIELD_SIZE (OSVERSIONINFOW, dwOSVersionInfoSize, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOW, dwOSVersionInfoSize, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOW, dwOSVersionInfoSize, 0) - TEST_FIELD_SIZE (OSVERSIONINFOW, dwMajorVersion, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOW, dwMajorVersion, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOW, dwMajorVersion, 4) - TEST_FIELD_SIZE (OSVERSIONINFOW, dwMinorVersion, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOW, dwMinorVersion, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOW, dwMinorVersion, 8) - TEST_FIELD_SIZE (OSVERSIONINFOW, dwBuildNumber, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOW, dwBuildNumber, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOW, dwBuildNumber, 12) - TEST_FIELD_SIZE (OSVERSIONINFOW, dwPlatformId, 4) - TEST_FIELD_ALIGN (OSVERSIONINFOW, dwPlatformId, 4) - TEST_FIELD_OFFSET(OSVERSIONINFOW, dwPlatformId, 16) - TEST_FIELD_SIZE (OSVERSIONINFOW, szCSDVersion, 256) - TEST_FIELD_ALIGN (OSVERSIONINFOW, szCSDVersion, 2) - TEST_FIELD_OFFSET(OSVERSIONINFOW, szCSDVersion, 20) -} - -static void test_pack_POSVERSIONINFOA(void) -{ - /* POSVERSIONINFOA */ - TEST_TYPE_SIZE (POSVERSIONINFOA, 4) - TEST_TYPE_ALIGN (POSVERSIONINFOA, 4) - TEST_TARGET_SIZE (POSVERSIONINFOA, 148) - TEST_TARGET_ALIGN(POSVERSIONINFOA, 4) -} - -static void test_pack_POSVERSIONINFOEXA(void) -{ - /* POSVERSIONINFOEXA */ - TEST_TYPE_SIZE (POSVERSIONINFOEXA, 4) - TEST_TYPE_ALIGN (POSVERSIONINFOEXA, 4) - TEST_TARGET_SIZE (POSVERSIONINFOEXA, 156) - TEST_TARGET_ALIGN(POSVERSIONINFOEXA, 4) -} - -static void test_pack_POSVERSIONINFOEXW(void) -{ - /* POSVERSIONINFOEXW */ - TEST_TYPE_SIZE (POSVERSIONINFOEXW, 4) - TEST_TYPE_ALIGN (POSVERSIONINFOEXW, 4) - TEST_TARGET_SIZE (POSVERSIONINFOEXW, 284) - TEST_TARGET_ALIGN(POSVERSIONINFOEXW, 4) -} - -static void test_pack_POSVERSIONINFOW(void) -{ - /* POSVERSIONINFOW */ - TEST_TYPE_SIZE (POSVERSIONINFOW, 4) - TEST_TYPE_ALIGN (POSVERSIONINFOW, 4) - TEST_TARGET_SIZE (POSVERSIONINFOW, 276) - TEST_TARGET_ALIGN(POSVERSIONINFOW, 4) -} - -static void test_pack_LPLONG(void) -{ - /* LPLONG */ - TEST_TYPE_SIZE (LPLONG, 4) - TEST_TYPE_ALIGN (LPLONG, 4) -} - -static void test_pack_LPVOID(void) -{ - /* LPVOID */ - TEST_TYPE_SIZE (LPVOID, 4) - TEST_TYPE_ALIGN (LPVOID, 4) -} - -static void test_pack_PHKEY(void) -{ - /* PHKEY */ - TEST_TYPE_SIZE (PHKEY, 4) - TEST_TYPE_ALIGN (PHKEY, 4) -} - -static void test_pack_ACTCTXA(void) -{ - /* ACTCTXA */ - TEST_TYPE_SIZE (ACTCTXA, 32) - TEST_TYPE_ALIGN (ACTCTXA, 4) - TEST_FIELD_SIZE (ACTCTXA, cbSize, 4) - TEST_FIELD_ALIGN (ACTCTXA, cbSize, 4) - TEST_FIELD_OFFSET(ACTCTXA, cbSize, 0) - TEST_FIELD_SIZE (ACTCTXA, dwFlags, 4) - TEST_FIELD_ALIGN (ACTCTXA, dwFlags, 4) - TEST_FIELD_OFFSET(ACTCTXA, dwFlags, 4) - TEST_FIELD_SIZE (ACTCTXA, lpSource, 4) - TEST_FIELD_ALIGN (ACTCTXA, lpSource, 4) - TEST_FIELD_OFFSET(ACTCTXA, lpSource, 8) - TEST_FIELD_SIZE (ACTCTXA, wProcessorArchitecture, 2) - TEST_FIELD_ALIGN (ACTCTXA, wProcessorArchitecture, 2) - TEST_FIELD_OFFSET(ACTCTXA, wProcessorArchitecture, 12) - TEST_FIELD_SIZE (ACTCTXA, wLangId, 2) - TEST_FIELD_ALIGN (ACTCTXA, wLangId, 2) - TEST_FIELD_OFFSET(ACTCTXA, wLangId, 14) - TEST_FIELD_SIZE (ACTCTXA, lpAssemblyDirectory, 4) - TEST_FIELD_ALIGN (ACTCTXA, lpAssemblyDirectory, 4) - TEST_FIELD_OFFSET(ACTCTXA, lpAssemblyDirectory, 16) - TEST_FIELD_SIZE (ACTCTXA, lpResourceName, 4) - TEST_FIELD_ALIGN (ACTCTXA, lpResourceName, 4) - TEST_FIELD_OFFSET(ACTCTXA, lpResourceName, 20) - TEST_FIELD_SIZE (ACTCTXA, lpApplicationName, 4) - TEST_FIELD_ALIGN (ACTCTXA, lpApplicationName, 4) - TEST_FIELD_OFFSET(ACTCTXA, lpApplicationName, 24) - TEST_FIELD_SIZE (ACTCTXA, hModule, 4) - TEST_FIELD_ALIGN (ACTCTXA, hModule, 4) - TEST_FIELD_OFFSET(ACTCTXA, hModule, 28) -} - -static void test_pack_ACTCTXW(void) -{ - /* ACTCTXW */ - TEST_TYPE_SIZE (ACTCTXW, 32) - TEST_TYPE_ALIGN (ACTCTXW, 4) - TEST_FIELD_SIZE (ACTCTXW, cbSize, 4) - TEST_FIELD_ALIGN (ACTCTXW, cbSize, 4) - TEST_FIELD_OFFSET(ACTCTXW, cbSize, 0) - TEST_FIELD_SIZE (ACTCTXW, dwFlags, 4) - TEST_FIELD_ALIGN (ACTCTXW, dwFlags, 4) - TEST_FIELD_OFFSET(ACTCTXW, dwFlags, 4) - TEST_FIELD_SIZE (ACTCTXW, lpSource, 4) - TEST_FIELD_ALIGN (ACTCTXW, lpSource, 4) - TEST_FIELD_OFFSET(ACTCTXW, lpSource, 8) - TEST_FIELD_SIZE (ACTCTXW, wProcessorArchitecture, 2) - TEST_FIELD_ALIGN (ACTCTXW, wProcessorArchitecture, 2) - TEST_FIELD_OFFSET(ACTCTXW, wProcessorArchitecture, 12) - TEST_FIELD_SIZE (ACTCTXW, wLangId, 2) - TEST_FIELD_ALIGN (ACTCTXW, wLangId, 2) - TEST_FIELD_OFFSET(ACTCTXW, wLangId, 14) - TEST_FIELD_SIZE (ACTCTXW, lpAssemblyDirectory, 4) - TEST_FIELD_ALIGN (ACTCTXW, lpAssemblyDirectory, 4) - TEST_FIELD_OFFSET(ACTCTXW, lpAssemblyDirectory, 16) - TEST_FIELD_SIZE (ACTCTXW, lpResourceName, 4) - TEST_FIELD_ALIGN (ACTCTXW, lpResourceName, 4) - TEST_FIELD_OFFSET(ACTCTXW, lpResourceName, 20) - TEST_FIELD_SIZE (ACTCTXW, lpApplicationName, 4) - TEST_FIELD_ALIGN (ACTCTXW, lpApplicationName, 4) - TEST_FIELD_OFFSET(ACTCTXW, lpApplicationName, 24) - TEST_FIELD_SIZE (ACTCTXW, hModule, 4) - TEST_FIELD_ALIGN (ACTCTXW, hModule, 4) - TEST_FIELD_OFFSET(ACTCTXW, hModule, 28) -} - -static void test_pack_ACTCTX_SECTION_KEYED_DATA(void) -{ - /* ACTCTX_SECTION_KEYED_DATA */ - TEST_TYPE_SIZE (ACTCTX_SECTION_KEYED_DATA, 64) - TEST_TYPE_ALIGN (ACTCTX_SECTION_KEYED_DATA, 4) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, cbSize, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, cbSize, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, cbSize, 0) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, ulDataFormatVersion, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, ulDataFormatVersion, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulDataFormatVersion, 4) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, lpData, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, lpData, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, lpData, 8) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, ulLength, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, ulLength, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulLength, 12) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, lpSectionGlobalData, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, lpSectionGlobalData, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, lpSectionGlobalData, 16) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, ulSectionGlobalDataLength, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, ulSectionGlobalDataLength, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulSectionGlobalDataLength, 20) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, lpSectionBase, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, lpSectionBase, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, lpSectionBase, 24) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, ulSectionTotalLength, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, ulSectionTotalLength, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulSectionTotalLength, 28) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, hActCtx, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, hActCtx, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, hActCtx, 32) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex, 36) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, ulFlags, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, ulFlags, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulFlags, 40) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA, AssemblyMetadata, 20) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA, AssemblyMetadata, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, AssemblyMetadata, 44) -} - -static void test_pack_ACTCTX_SECTION_KEYED_DATA_2600(void) -{ - /* ACTCTX_SECTION_KEYED_DATA_2600 */ - TEST_TYPE_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, 40) - TEST_TYPE_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, 4) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, cbSize, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, cbSize, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, cbSize, 0) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, ulDataFormatVersion, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, ulDataFormatVersion, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, ulDataFormatVersion, 4) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, lpData, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, lpData, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, lpData, 8) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, ulLength, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, ulLength, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, ulLength, 12) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, lpSectionGlobalData, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, lpSectionGlobalData, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, lpSectionGlobalData, 16) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, ulSectionGlobalDataLength, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, ulSectionGlobalDataLength, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, ulSectionGlobalDataLength, 20) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, lpSectionBase, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, lpSectionBase, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, lpSectionBase, 24) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, ulSectionTotalLength, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, ulSectionTotalLength, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, ulSectionTotalLength, 28) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, hActCtx, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, hActCtx, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, hActCtx, 32) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_2600, ulAssemblyRosterIndex, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_2600, ulAssemblyRosterIndex, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_2600, ulAssemblyRosterIndex, 36) -} - -static void test_pack_ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA(void) -{ - /* ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA */ - TEST_TYPE_SIZE (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 20) - TEST_TYPE_ALIGN (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 4) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpInformation, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpInformation, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpInformation, 0) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpSectionBase, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpSectionBase, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpSectionBase, 4) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, ulSectionLength, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, ulSectionLength, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, ulSectionLength, 8) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpSectionGlobalDataBase, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpSectionGlobalDataBase, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, lpSectionGlobalDataBase, 12) - TEST_FIELD_SIZE (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, ulSectionGlobalDataLength, 4) - TEST_FIELD_ALIGN (ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, ulSectionGlobalDataLength, 4) - TEST_FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, ulSectionGlobalDataLength, 16) -} - -static void test_pack_ACTIVATION_CONTEXT_BASIC_INFORMATION(void) -{ - /* ACTIVATION_CONTEXT_BASIC_INFORMATION */ - TEST_TYPE_SIZE (ACTIVATION_CONTEXT_BASIC_INFORMATION, 8) - TEST_TYPE_ALIGN (ACTIVATION_CONTEXT_BASIC_INFORMATION, 4) - TEST_FIELD_SIZE (ACTIVATION_CONTEXT_BASIC_INFORMATION, hActCtx, 4) - TEST_FIELD_ALIGN (ACTIVATION_CONTEXT_BASIC_INFORMATION, hActCtx, 4) - TEST_FIELD_OFFSET(ACTIVATION_CONTEXT_BASIC_INFORMATION, hActCtx, 0) - TEST_FIELD_SIZE (ACTIVATION_CONTEXT_BASIC_INFORMATION, dwFlags, 4) - TEST_FIELD_ALIGN (ACTIVATION_CONTEXT_BASIC_INFORMATION, dwFlags, 4) - TEST_FIELD_OFFSET(ACTIVATION_CONTEXT_BASIC_INFORMATION, dwFlags, 4) -} - -static void test_pack_BY_HANDLE_FILE_INFORMATION(void) -{ - /* BY_HANDLE_FILE_INFORMATION */ - TEST_TYPE_SIZE (BY_HANDLE_FILE_INFORMATION, 52) - TEST_TYPE_ALIGN (BY_HANDLE_FILE_INFORMATION, 4) - TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, dwFileAttributes, 4) - TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, dwFileAttributes, 4) - TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, dwFileAttributes, 0) - TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, ftCreationTime, 8) - TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, ftCreationTime, 4) - TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, ftCreationTime, 4) - TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, ftLastAccessTime, 8) - TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, ftLastAccessTime, 4) - TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, ftLastAccessTime, 12) - TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, ftLastWriteTime, 8) - TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, ftLastWriteTime, 4) - TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, ftLastWriteTime, 20) - TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, dwVolumeSerialNumber, 4) - TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, dwVolumeSerialNumber, 4) - TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, dwVolumeSerialNumber, 28) - TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, nFileSizeHigh, 4) - TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, nFileSizeHigh, 4) - TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, nFileSizeHigh, 32) - TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, nFileSizeLow, 4) - TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, nFileSizeLow, 4) - TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, nFileSizeLow, 36) - TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, nNumberOfLinks, 4) - TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, nNumberOfLinks, 4) - TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, nNumberOfLinks, 40) - TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, nFileIndexHigh, 4) - TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, nFileIndexHigh, 4) - TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, nFileIndexHigh, 44) - TEST_FIELD_SIZE (BY_HANDLE_FILE_INFORMATION, nFileIndexLow, 4) - TEST_FIELD_ALIGN (BY_HANDLE_FILE_INFORMATION, nFileIndexLow, 4) - TEST_FIELD_OFFSET(BY_HANDLE_FILE_INFORMATION, nFileIndexLow, 48) -} - -static void test_pack_COMMCONFIG(void) -{ - /* COMMCONFIG */ - TEST_TYPE_SIZE (COMMCONFIG, 52) - TEST_TYPE_ALIGN (COMMCONFIG, 4) - TEST_FIELD_SIZE (COMMCONFIG, dwSize, 4) - TEST_FIELD_ALIGN (COMMCONFIG, dwSize, 4) - TEST_FIELD_OFFSET(COMMCONFIG, dwSize, 0) - TEST_FIELD_SIZE (COMMCONFIG, wVersion, 2) - TEST_FIELD_ALIGN (COMMCONFIG, wVersion, 2) - TEST_FIELD_OFFSET(COMMCONFIG, wVersion, 4) - TEST_FIELD_SIZE (COMMCONFIG, wReserved, 2) - TEST_FIELD_ALIGN (COMMCONFIG, wReserved, 2) - TEST_FIELD_OFFSET(COMMCONFIG, wReserved, 6) - TEST_FIELD_SIZE (COMMCONFIG, dcb, 28) - TEST_FIELD_ALIGN (COMMCONFIG, dcb, 4) - TEST_FIELD_OFFSET(COMMCONFIG, dcb, 8) - TEST_FIELD_SIZE (COMMCONFIG, dwProviderSubType, 4) - TEST_FIELD_ALIGN (COMMCONFIG, dwProviderSubType, 4) - TEST_FIELD_OFFSET(COMMCONFIG, dwProviderSubType, 36) - TEST_FIELD_SIZE (COMMCONFIG, dwProviderOffset, 4) - TEST_FIELD_ALIGN (COMMCONFIG, dwProviderOffset, 4) - TEST_FIELD_OFFSET(COMMCONFIG, dwProviderOffset, 40) - TEST_FIELD_SIZE (COMMCONFIG, dwProviderSize, 4) - TEST_FIELD_ALIGN (COMMCONFIG, dwProviderSize, 4) - TEST_FIELD_OFFSET(COMMCONFIG, dwProviderSize, 44) - TEST_FIELD_SIZE (COMMCONFIG, wcProviderData, 4) - TEST_FIELD_ALIGN (COMMCONFIG, wcProviderData, 4) - TEST_FIELD_OFFSET(COMMCONFIG, wcProviderData, 48) -} - -static void test_pack_COMMPROP(void) -{ - /* COMMPROP */ - TEST_TYPE_SIZE (COMMPROP, 64) - TEST_TYPE_ALIGN (COMMPROP, 4) - TEST_FIELD_SIZE (COMMPROP, wPacketLength, 2) - TEST_FIELD_ALIGN (COMMPROP, wPacketLength, 2) - TEST_FIELD_OFFSET(COMMPROP, wPacketLength, 0) - TEST_FIELD_SIZE (COMMPROP, wPacketVersion, 2) - TEST_FIELD_ALIGN (COMMPROP, wPacketVersion, 2) - TEST_FIELD_OFFSET(COMMPROP, wPacketVersion, 2) - TEST_FIELD_SIZE (COMMPROP, dwServiceMask, 4) - TEST_FIELD_ALIGN (COMMPROP, dwServiceMask, 4) - TEST_FIELD_OFFSET(COMMPROP, dwServiceMask, 4) - TEST_FIELD_SIZE (COMMPROP, dwReserved1, 4) - TEST_FIELD_ALIGN (COMMPROP, dwReserved1, 4) - TEST_FIELD_OFFSET(COMMPROP, dwReserved1, 8) - TEST_FIELD_SIZE (COMMPROP, dwMaxTxQueue, 4) - TEST_FIELD_ALIGN (COMMPROP, dwMaxTxQueue, 4) - TEST_FIELD_OFFSET(COMMPROP, dwMaxTxQueue, 12) - TEST_FIELD_SIZE (COMMPROP, dwMaxRxQueue, 4) - TEST_FIELD_ALIGN (COMMPROP, dwMaxRxQueue, 4) - TEST_FIELD_OFFSET(COMMPROP, dwMaxRxQueue, 16) - TEST_FIELD_SIZE (COMMPROP, dwMaxBaud, 4) - TEST_FIELD_ALIGN (COMMPROP, dwMaxBaud, 4) - TEST_FIELD_OFFSET(COMMPROP, dwMaxBaud, 20) - TEST_FIELD_SIZE (COMMPROP, dwProvSubType, 4) - TEST_FIELD_ALIGN (COMMPROP, dwProvSubType, 4) - TEST_FIELD_OFFSET(COMMPROP, dwProvSubType, 24) - TEST_FIELD_SIZE (COMMPROP, dwProvCapabilities, 4) - TEST_FIELD_ALIGN (COMMPROP, dwProvCapabilities, 4) - TEST_FIELD_OFFSET(COMMPROP, dwProvCapabilities, 28) - TEST_FIELD_SIZE (COMMPROP, dwSettableParams, 4) - TEST_FIELD_ALIGN (COMMPROP, dwSettableParams, 4) - TEST_FIELD_OFFSET(COMMPROP, dwSettableParams, 32) - TEST_FIELD_SIZE (COMMPROP, dwSettableBaud, 4) - TEST_FIELD_ALIGN (COMMPROP, dwSettableBaud, 4) - TEST_FIELD_OFFSET(COMMPROP, dwSettableBaud, 36) - TEST_FIELD_SIZE (COMMPROP, wSettableData, 2) - TEST_FIELD_ALIGN (COMMPROP, wSettableData, 2) - TEST_FIELD_OFFSET(COMMPROP, wSettableData, 40) - TEST_FIELD_SIZE (COMMPROP, wSettableStopParity, 2) - TEST_FIELD_ALIGN (COMMPROP, wSettableStopParity, 2) - TEST_FIELD_OFFSET(COMMPROP, wSettableStopParity, 42) - TEST_FIELD_SIZE (COMMPROP, dwCurrentTxQueue, 4) - TEST_FIELD_ALIGN (COMMPROP, dwCurrentTxQueue, 4) - TEST_FIELD_OFFSET(COMMPROP, dwCurrentTxQueue, 44) - TEST_FIELD_SIZE (COMMPROP, dwCurrentRxQueue, 4) - TEST_FIELD_ALIGN (COMMPROP, dwCurrentRxQueue, 4) - TEST_FIELD_OFFSET(COMMPROP, dwCurrentRxQueue, 48) - TEST_FIELD_SIZE (COMMPROP, dwProvSpec1, 4) - TEST_FIELD_ALIGN (COMMPROP, dwProvSpec1, 4) - TEST_FIELD_OFFSET(COMMPROP, dwProvSpec1, 52) - TEST_FIELD_SIZE (COMMPROP, dwProvSpec2, 4) - TEST_FIELD_ALIGN (COMMPROP, dwProvSpec2, 4) - TEST_FIELD_OFFSET(COMMPROP, dwProvSpec2, 56) - TEST_FIELD_SIZE (COMMPROP, wcProvChar, 2) - TEST_FIELD_ALIGN (COMMPROP, wcProvChar, 2) - TEST_FIELD_OFFSET(COMMPROP, wcProvChar, 60) -} - -static void test_pack_COMMTIMEOUTS(void) -{ - /* COMMTIMEOUTS */ - TEST_TYPE_SIZE (COMMTIMEOUTS, 20) - TEST_TYPE_ALIGN (COMMTIMEOUTS, 4) - TEST_FIELD_SIZE (COMMTIMEOUTS, ReadIntervalTimeout, 4) - TEST_FIELD_ALIGN (COMMTIMEOUTS, ReadIntervalTimeout, 4) - TEST_FIELD_OFFSET(COMMTIMEOUTS, ReadIntervalTimeout, 0) - TEST_FIELD_SIZE (COMMTIMEOUTS, ReadTotalTimeoutMultiplier, 4) - TEST_FIELD_ALIGN (COMMTIMEOUTS, ReadTotalTimeoutMultiplier, 4) - TEST_FIELD_OFFSET(COMMTIMEOUTS, ReadTotalTimeoutMultiplier, 4) - TEST_FIELD_SIZE (COMMTIMEOUTS, ReadTotalTimeoutConstant, 4) - TEST_FIELD_ALIGN (COMMTIMEOUTS, ReadTotalTimeoutConstant, 4) - TEST_FIELD_OFFSET(COMMTIMEOUTS, ReadTotalTimeoutConstant, 8) - TEST_FIELD_SIZE (COMMTIMEOUTS, WriteTotalTimeoutMultiplier, 4) - TEST_FIELD_ALIGN (COMMTIMEOUTS, WriteTotalTimeoutMultiplier, 4) - TEST_FIELD_OFFSET(COMMTIMEOUTS, WriteTotalTimeoutMultiplier, 12) - TEST_FIELD_SIZE (COMMTIMEOUTS, WriteTotalTimeoutConstant, 4) - TEST_FIELD_ALIGN (COMMTIMEOUTS, WriteTotalTimeoutConstant, 4) - TEST_FIELD_OFFSET(COMMTIMEOUTS, WriteTotalTimeoutConstant, 16) -} - -static void test_pack_COMSTAT(void) -{ - /* COMSTAT */ - TEST_TYPE_SIZE (COMSTAT, 12) - TEST_TYPE_ALIGN (COMSTAT, 4) - TEST_FIELD_SIZE (COMSTAT, cbInQue, 4) - TEST_FIELD_ALIGN (COMSTAT, cbInQue, 4) - TEST_FIELD_OFFSET(COMSTAT, cbInQue, 4) - TEST_FIELD_SIZE (COMSTAT, cbOutQue, 4) - TEST_FIELD_ALIGN (COMSTAT, cbOutQue, 4) - TEST_FIELD_OFFSET(COMSTAT, cbOutQue, 8) -} - -static void test_pack_CREATE_PROCESS_DEBUG_INFO(void) -{ - /* CREATE_PROCESS_DEBUG_INFO */ - TEST_TYPE_SIZE (CREATE_PROCESS_DEBUG_INFO, 40) - TEST_TYPE_ALIGN (CREATE_PROCESS_DEBUG_INFO, 4) - TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, hFile, 4) - TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, hFile, 4) - TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, hFile, 0) - TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, hProcess, 4) - TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, hProcess, 4) - TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, hProcess, 4) - TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, hThread, 4) - TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, hThread, 4) - TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, hThread, 8) - TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, lpBaseOfImage, 4) - TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, lpBaseOfImage, 4) - TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, lpBaseOfImage, 12) - TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, dwDebugInfoFileOffset, 4) - TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, dwDebugInfoFileOffset, 4) - TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, dwDebugInfoFileOffset, 16) - TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, nDebugInfoSize, 4) - TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, nDebugInfoSize, 4) - TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, nDebugInfoSize, 20) - TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, lpThreadLocalBase, 4) - TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, lpThreadLocalBase, 4) - TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, lpThreadLocalBase, 24) - TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, lpStartAddress, 4) - TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, lpStartAddress, 4) - TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, lpStartAddress, 28) - TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, lpImageName, 4) - TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, lpImageName, 4) - TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, lpImageName, 32) - TEST_FIELD_SIZE (CREATE_PROCESS_DEBUG_INFO, fUnicode, 2) - TEST_FIELD_ALIGN (CREATE_PROCESS_DEBUG_INFO, fUnicode, 2) - TEST_FIELD_OFFSET(CREATE_PROCESS_DEBUG_INFO, fUnicode, 36) -} - -static void test_pack_CREATE_THREAD_DEBUG_INFO(void) -{ - /* CREATE_THREAD_DEBUG_INFO */ - TEST_TYPE_SIZE (CREATE_THREAD_DEBUG_INFO, 12) - TEST_TYPE_ALIGN (CREATE_THREAD_DEBUG_INFO, 4) - TEST_FIELD_SIZE (CREATE_THREAD_DEBUG_INFO, hThread, 4) - TEST_FIELD_ALIGN (CREATE_THREAD_DEBUG_INFO, hThread, 4) - TEST_FIELD_OFFSET(CREATE_THREAD_DEBUG_INFO, hThread, 0) - TEST_FIELD_SIZE (CREATE_THREAD_DEBUG_INFO, lpThreadLocalBase, 4) - TEST_FIELD_ALIGN (CREATE_THREAD_DEBUG_INFO, lpThreadLocalBase, 4) - TEST_FIELD_OFFSET(CREATE_THREAD_DEBUG_INFO, lpThreadLocalBase, 4) - TEST_FIELD_SIZE (CREATE_THREAD_DEBUG_INFO, lpStartAddress, 4) - TEST_FIELD_ALIGN (CREATE_THREAD_DEBUG_INFO, lpStartAddress, 4) - TEST_FIELD_OFFSET(CREATE_THREAD_DEBUG_INFO, lpStartAddress, 8) -} - -static void test_pack_CRITICAL_SECTION(void) -{ - /* CRITICAL_SECTION */ - TEST_TYPE_SIZE (CRITICAL_SECTION, 24) - TEST_TYPE_ALIGN (CRITICAL_SECTION, 4) -} - -static void test_pack_CRITICAL_SECTION_DEBUG(void) -{ - /* CRITICAL_SECTION_DEBUG */ -} - -static void test_pack_DCB(void) -{ - /* DCB */ - TEST_TYPE_SIZE (DCB, 28) - TEST_TYPE_ALIGN (DCB, 4) - TEST_FIELD_SIZE (DCB, DCBlength, 4) - TEST_FIELD_ALIGN (DCB, DCBlength, 4) - TEST_FIELD_OFFSET(DCB, DCBlength, 0) - TEST_FIELD_SIZE (DCB, BaudRate, 4) - TEST_FIELD_ALIGN (DCB, BaudRate, 4) - TEST_FIELD_OFFSET(DCB, BaudRate, 4) - TEST_FIELD_SIZE (DCB, wReserved, 2) - TEST_FIELD_ALIGN (DCB, wReserved, 2) - TEST_FIELD_OFFSET(DCB, wReserved, 12) - TEST_FIELD_SIZE (DCB, XonLim, 2) - TEST_FIELD_ALIGN (DCB, XonLim, 2) - TEST_FIELD_OFFSET(DCB, XonLim, 14) - TEST_FIELD_SIZE (DCB, XoffLim, 2) - TEST_FIELD_ALIGN (DCB, XoffLim, 2) - TEST_FIELD_OFFSET(DCB, XoffLim, 16) - TEST_FIELD_SIZE (DCB, ByteSize, 1) - TEST_FIELD_ALIGN (DCB, ByteSize, 1) - TEST_FIELD_OFFSET(DCB, ByteSize, 18) - TEST_FIELD_SIZE (DCB, Parity, 1) - TEST_FIELD_ALIGN (DCB, Parity, 1) - TEST_FIELD_OFFSET(DCB, Parity, 19) - TEST_FIELD_SIZE (DCB, StopBits, 1) - TEST_FIELD_ALIGN (DCB, StopBits, 1) - TEST_FIELD_OFFSET(DCB, StopBits, 20) - TEST_FIELD_SIZE (DCB, XonChar, 1) - TEST_FIELD_ALIGN (DCB, XonChar, 1) - TEST_FIELD_OFFSET(DCB, XonChar, 21) - TEST_FIELD_SIZE (DCB, XoffChar, 1) - TEST_FIELD_ALIGN (DCB, XoffChar, 1) - TEST_FIELD_OFFSET(DCB, XoffChar, 22) - TEST_FIELD_SIZE (DCB, ErrorChar, 1) - TEST_FIELD_ALIGN (DCB, ErrorChar, 1) - TEST_FIELD_OFFSET(DCB, ErrorChar, 23) - TEST_FIELD_SIZE (DCB, EofChar, 1) - TEST_FIELD_ALIGN (DCB, EofChar, 1) - TEST_FIELD_OFFSET(DCB, EofChar, 24) - TEST_FIELD_SIZE (DCB, EvtChar, 1) - TEST_FIELD_ALIGN (DCB, EvtChar, 1) - TEST_FIELD_OFFSET(DCB, EvtChar, 25) - TEST_FIELD_SIZE (DCB, wReserved1, 2) - TEST_FIELD_ALIGN (DCB, wReserved1, 2) - TEST_FIELD_OFFSET(DCB, wReserved1, 26) -} - -static void test_pack_DEBUG_EVENT(void) -{ - /* DEBUG_EVENT */ - TEST_FIELD_SIZE (DEBUG_EVENT, dwDebugEventCode, 4) - TEST_FIELD_ALIGN (DEBUG_EVENT, dwDebugEventCode, 4) - TEST_FIELD_OFFSET(DEBUG_EVENT, dwDebugEventCode, 0) - TEST_FIELD_SIZE (DEBUG_EVENT, dwProcessId, 4) - TEST_FIELD_ALIGN (DEBUG_EVENT, dwProcessId, 4) - TEST_FIELD_OFFSET(DEBUG_EVENT, dwProcessId, 4) - TEST_FIELD_SIZE (DEBUG_EVENT, dwThreadId, 4) - TEST_FIELD_ALIGN (DEBUG_EVENT, dwThreadId, 4) - TEST_FIELD_OFFSET(DEBUG_EVENT, dwThreadId, 8) -} - -static void test_pack_ENUMRESLANGPROCA(void) -{ - /* ENUMRESLANGPROCA */ - TEST_TYPE_SIZE (ENUMRESLANGPROCA, 4) - TEST_TYPE_ALIGN (ENUMRESLANGPROCA, 4) -} - -static void test_pack_ENUMRESLANGPROCW(void) -{ - /* ENUMRESLANGPROCW */ - TEST_TYPE_SIZE (ENUMRESLANGPROCW, 4) - TEST_TYPE_ALIGN (ENUMRESLANGPROCW, 4) -} - -static void test_pack_ENUMRESNAMEPROCA(void) -{ - /* ENUMRESNAMEPROCA */ - TEST_TYPE_SIZE (ENUMRESNAMEPROCA, 4) - TEST_TYPE_ALIGN (ENUMRESNAMEPROCA, 4) -} - -static void test_pack_ENUMRESNAMEPROCW(void) -{ - /* ENUMRESNAMEPROCW */ - TEST_TYPE_SIZE (ENUMRESNAMEPROCW, 4) - TEST_TYPE_ALIGN (ENUMRESNAMEPROCW, 4) -} - -static void test_pack_ENUMRESTYPEPROCA(void) -{ - /* ENUMRESTYPEPROCA */ - TEST_TYPE_SIZE (ENUMRESTYPEPROCA, 4) - TEST_TYPE_ALIGN (ENUMRESTYPEPROCA, 4) -} - -static void test_pack_ENUMRESTYPEPROCW(void) -{ - /* ENUMRESTYPEPROCW */ - TEST_TYPE_SIZE (ENUMRESTYPEPROCW, 4) - TEST_TYPE_ALIGN (ENUMRESTYPEPROCW, 4) -} - -static void test_pack_EXCEPTION_DEBUG_INFO(void) -{ - /* EXCEPTION_DEBUG_INFO */ - TEST_TYPE_SIZE (EXCEPTION_DEBUG_INFO, 84) - TEST_TYPE_ALIGN (EXCEPTION_DEBUG_INFO, 4) - TEST_FIELD_SIZE (EXCEPTION_DEBUG_INFO, ExceptionRecord, 80) - TEST_FIELD_ALIGN (EXCEPTION_DEBUG_INFO, ExceptionRecord, 4) - TEST_FIELD_OFFSET(EXCEPTION_DEBUG_INFO, ExceptionRecord, 0) - TEST_FIELD_SIZE (EXCEPTION_DEBUG_INFO, dwFirstChance, 4) - TEST_FIELD_ALIGN (EXCEPTION_DEBUG_INFO, dwFirstChance, 4) - TEST_FIELD_OFFSET(EXCEPTION_DEBUG_INFO, dwFirstChance, 80) -} - -static void test_pack_EXIT_PROCESS_DEBUG_INFO(void) -{ - /* EXIT_PROCESS_DEBUG_INFO */ - TEST_TYPE_SIZE (EXIT_PROCESS_DEBUG_INFO, 4) - TEST_TYPE_ALIGN (EXIT_PROCESS_DEBUG_INFO, 4) - TEST_FIELD_SIZE (EXIT_PROCESS_DEBUG_INFO, dwExitCode, 4) - TEST_FIELD_ALIGN (EXIT_PROCESS_DEBUG_INFO, dwExitCode, 4) - TEST_FIELD_OFFSET(EXIT_PROCESS_DEBUG_INFO, dwExitCode, 0) -} - -static void test_pack_EXIT_THREAD_DEBUG_INFO(void) -{ - /* EXIT_THREAD_DEBUG_INFO */ - TEST_TYPE_SIZE (EXIT_THREAD_DEBUG_INFO, 4) - TEST_TYPE_ALIGN (EXIT_THREAD_DEBUG_INFO, 4) - TEST_FIELD_SIZE (EXIT_THREAD_DEBUG_INFO, dwExitCode, 4) - TEST_FIELD_ALIGN (EXIT_THREAD_DEBUG_INFO, dwExitCode, 4) - TEST_FIELD_OFFSET(EXIT_THREAD_DEBUG_INFO, dwExitCode, 0) -} - -static void test_pack_HW_PROFILE_INFOA(void) -{ - /* HW_PROFILE_INFOA */ - TEST_TYPE_SIZE (HW_PROFILE_INFOA, 124) - TEST_TYPE_ALIGN (HW_PROFILE_INFOA, 4) - TEST_FIELD_SIZE (HW_PROFILE_INFOA, dwDockInfo, 4) - TEST_FIELD_ALIGN (HW_PROFILE_INFOA, dwDockInfo, 4) - TEST_FIELD_OFFSET(HW_PROFILE_INFOA, dwDockInfo, 0) - TEST_FIELD_SIZE (HW_PROFILE_INFOA, szHwProfileGuid, 39) - TEST_FIELD_ALIGN (HW_PROFILE_INFOA, szHwProfileGuid, 1) - TEST_FIELD_OFFSET(HW_PROFILE_INFOA, szHwProfileGuid, 4) - TEST_FIELD_SIZE (HW_PROFILE_INFOA, szHwProfileName, 80) - TEST_FIELD_ALIGN (HW_PROFILE_INFOA, szHwProfileName, 1) - TEST_FIELD_OFFSET(HW_PROFILE_INFOA, szHwProfileName, 43) -} - -static void test_pack_HW_PROFILE_INFOW(void) -{ - /* HW_PROFILE_INFOW */ - TEST_TYPE_SIZE (HW_PROFILE_INFOW, 244) - TEST_TYPE_ALIGN (HW_PROFILE_INFOW, 4) - TEST_FIELD_SIZE (HW_PROFILE_INFOW, dwDockInfo, 4) - TEST_FIELD_ALIGN (HW_PROFILE_INFOW, dwDockInfo, 4) - TEST_FIELD_OFFSET(HW_PROFILE_INFOW, dwDockInfo, 0) - TEST_FIELD_SIZE (HW_PROFILE_INFOW, szHwProfileGuid, 78) - TEST_FIELD_ALIGN (HW_PROFILE_INFOW, szHwProfileGuid, 2) - TEST_FIELD_OFFSET(HW_PROFILE_INFOW, szHwProfileGuid, 4) - TEST_FIELD_SIZE (HW_PROFILE_INFOW, szHwProfileName, 160) - TEST_FIELD_ALIGN (HW_PROFILE_INFOW, szHwProfileName, 2) - TEST_FIELD_OFFSET(HW_PROFILE_INFOW, szHwProfileName, 82) -} - -static void test_pack_LOAD_DLL_DEBUG_INFO(void) -{ - /* LOAD_DLL_DEBUG_INFO */ - TEST_TYPE_SIZE (LOAD_DLL_DEBUG_INFO, 24) - TEST_TYPE_ALIGN (LOAD_DLL_DEBUG_INFO, 4) - TEST_FIELD_SIZE (LOAD_DLL_DEBUG_INFO, hFile, 4) - TEST_FIELD_ALIGN (LOAD_DLL_DEBUG_INFO, hFile, 4) - TEST_FIELD_OFFSET(LOAD_DLL_DEBUG_INFO, hFile, 0) - TEST_FIELD_SIZE (LOAD_DLL_DEBUG_INFO, lpBaseOfDll, 4) - TEST_FIELD_ALIGN (LOAD_DLL_DEBUG_INFO, lpBaseOfDll, 4) - TEST_FIELD_OFFSET(LOAD_DLL_DEBUG_INFO, lpBaseOfDll, 4) - TEST_FIELD_SIZE (LOAD_DLL_DEBUG_INFO, dwDebugInfoFileOffset, 4) - TEST_FIELD_ALIGN (LOAD_DLL_DEBUG_INFO, dwDebugInfoFileOffset, 4) - TEST_FIELD_OFFSET(LOAD_DLL_DEBUG_INFO, dwDebugInfoFileOffset, 8) - TEST_FIELD_SIZE (LOAD_DLL_DEBUG_INFO, nDebugInfoSize, 4) - TEST_FIELD_ALIGN (LOAD_DLL_DEBUG_INFO, nDebugInfoSize, 4) - TEST_FIELD_OFFSET(LOAD_DLL_DEBUG_INFO, nDebugInfoSize, 12) - TEST_FIELD_SIZE (LOAD_DLL_DEBUG_INFO, lpImageName, 4) - TEST_FIELD_ALIGN (LOAD_DLL_DEBUG_INFO, lpImageName, 4) - TEST_FIELD_OFFSET(LOAD_DLL_DEBUG_INFO, lpImageName, 16) - TEST_FIELD_SIZE (LOAD_DLL_DEBUG_INFO, fUnicode, 2) - TEST_FIELD_ALIGN (LOAD_DLL_DEBUG_INFO, fUnicode, 2) - TEST_FIELD_OFFSET(LOAD_DLL_DEBUG_INFO, fUnicode, 20) -} - -static void test_pack_LPBY_HANDLE_FILE_INFORMATION(void) -{ - /* LPBY_HANDLE_FILE_INFORMATION */ - TEST_TYPE_SIZE (LPBY_HANDLE_FILE_INFORMATION, 4) - TEST_TYPE_ALIGN (LPBY_HANDLE_FILE_INFORMATION, 4) - TEST_TARGET_SIZE (LPBY_HANDLE_FILE_INFORMATION, 52) - TEST_TARGET_ALIGN(LPBY_HANDLE_FILE_INFORMATION, 4) -} - -static void test_pack_LPCOMMCONFIG(void) -{ - /* LPCOMMCONFIG */ - TEST_TYPE_SIZE (LPCOMMCONFIG, 4) - TEST_TYPE_ALIGN (LPCOMMCONFIG, 4) - TEST_TARGET_SIZE (LPCOMMCONFIG, 52) - TEST_TARGET_ALIGN(LPCOMMCONFIG, 4) -} - -static void test_pack_LPCOMMPROP(void) -{ - /* LPCOMMPROP */ - TEST_TYPE_SIZE (LPCOMMPROP, 4) - TEST_TYPE_ALIGN (LPCOMMPROP, 4) - TEST_TARGET_SIZE (LPCOMMPROP, 64) - TEST_TARGET_ALIGN(LPCOMMPROP, 4) -} - -static void test_pack_LPCOMMTIMEOUTS(void) -{ - /* LPCOMMTIMEOUTS */ - TEST_TYPE_SIZE (LPCOMMTIMEOUTS, 4) - TEST_TYPE_ALIGN (LPCOMMTIMEOUTS, 4) - TEST_TARGET_SIZE (LPCOMMTIMEOUTS, 20) - TEST_TARGET_ALIGN(LPCOMMTIMEOUTS, 4) -} - -static void test_pack_LPCOMSTAT(void) -{ - /* LPCOMSTAT */ - TEST_TYPE_SIZE (LPCOMSTAT, 4) - TEST_TYPE_ALIGN (LPCOMSTAT, 4) - TEST_TARGET_SIZE (LPCOMSTAT, 12) - TEST_TARGET_ALIGN(LPCOMSTAT, 4) -} - -static void test_pack_LPCRITICAL_SECTION(void) -{ - /* LPCRITICAL_SECTION */ - TEST_TYPE_SIZE (LPCRITICAL_SECTION, 4) - TEST_TYPE_ALIGN (LPCRITICAL_SECTION, 4) -} - -static void test_pack_LPCRITICAL_SECTION_DEBUG(void) -{ - /* LPCRITICAL_SECTION_DEBUG */ - TEST_TYPE_SIZE (LPCRITICAL_SECTION_DEBUG, 4) - TEST_TYPE_ALIGN (LPCRITICAL_SECTION_DEBUG, 4) -} - -static void test_pack_LPDCB(void) -{ - /* LPDCB */ - TEST_TYPE_SIZE (LPDCB, 4) - TEST_TYPE_ALIGN (LPDCB, 4) - TEST_TARGET_SIZE (LPDCB, 28) - TEST_TARGET_ALIGN(LPDCB, 4) -} - -static void test_pack_LPDEBUG_EVENT(void) -{ - /* LPDEBUG_EVENT */ - TEST_TYPE_SIZE (LPDEBUG_EVENT, 4) - TEST_TYPE_ALIGN (LPDEBUG_EVENT, 4) -} - -static void test_pack_LPEXCEPTION_POINTERS(void) -{ - /* LPEXCEPTION_POINTERS */ - TEST_TYPE_SIZE (LPEXCEPTION_POINTERS, 4) - TEST_TYPE_ALIGN (LPEXCEPTION_POINTERS, 4) -} - -static void test_pack_LPEXCEPTION_RECORD(void) -{ - /* LPEXCEPTION_RECORD */ - TEST_TYPE_SIZE (LPEXCEPTION_RECORD, 4) - TEST_TYPE_ALIGN (LPEXCEPTION_RECORD, 4) -} - -static void test_pack_LPFIBER_START_ROUTINE(void) -{ - /* LPFIBER_START_ROUTINE */ - TEST_TYPE_SIZE (LPFIBER_START_ROUTINE, 4) - TEST_TYPE_ALIGN (LPFIBER_START_ROUTINE, 4) -} - -static void test_pack_LPHW_PROFILE_INFOA(void) -{ - /* LPHW_PROFILE_INFOA */ - TEST_TYPE_SIZE (LPHW_PROFILE_INFOA, 4) - TEST_TYPE_ALIGN (LPHW_PROFILE_INFOA, 4) - TEST_TARGET_SIZE (LPHW_PROFILE_INFOA, 124) - TEST_TARGET_ALIGN(LPHW_PROFILE_INFOA, 4) -} - -static void test_pack_LPHW_PROFILE_INFOW(void) -{ - /* LPHW_PROFILE_INFOW */ - TEST_TYPE_SIZE (LPHW_PROFILE_INFOW, 4) - TEST_TYPE_ALIGN (LPHW_PROFILE_INFOW, 4) - TEST_TARGET_SIZE (LPHW_PROFILE_INFOW, 244) - TEST_TARGET_ALIGN(LPHW_PROFILE_INFOW, 4) -} - -static void test_pack_LPMEMORYSTATUS(void) -{ - /* LPMEMORYSTATUS */ - TEST_TYPE_SIZE (LPMEMORYSTATUS, 4) - TEST_TYPE_ALIGN (LPMEMORYSTATUS, 4) - TEST_TARGET_SIZE (LPMEMORYSTATUS, 32) - TEST_TARGET_ALIGN(LPMEMORYSTATUS, 4) -} - -static void test_pack_LPMEMORYSTATUSEX(void) -{ - /* LPMEMORYSTATUSEX */ - TEST_TYPE_SIZE (LPMEMORYSTATUSEX, 4) - TEST_TYPE_ALIGN (LPMEMORYSTATUSEX, 4) - TEST_TARGET_SIZE (LPMEMORYSTATUSEX, 64) - TEST_TARGET_ALIGN(LPMEMORYSTATUSEX, 8) -} - -static void test_pack_LPOFSTRUCT(void) -{ - /* LPOFSTRUCT */ - TEST_TYPE_SIZE (LPOFSTRUCT, 4) - TEST_TYPE_ALIGN (LPOFSTRUCT, 4) - TEST_TARGET_SIZE (LPOFSTRUCT, 136) - TEST_TARGET_ALIGN(LPOFSTRUCT, 2) -} - -static void test_pack_LPOVERLAPPED(void) -{ - /* LPOVERLAPPED */ - TEST_TYPE_SIZE (LPOVERLAPPED, 4) - TEST_TYPE_ALIGN (LPOVERLAPPED, 4) -} - -static void test_pack_LPOVERLAPPED_COMPLETION_ROUTINE(void) -{ - /* LPOVERLAPPED_COMPLETION_ROUTINE */ - TEST_TYPE_SIZE (LPOVERLAPPED_COMPLETION_ROUTINE, 4) - TEST_TYPE_ALIGN (LPOVERLAPPED_COMPLETION_ROUTINE, 4) -} - -static void test_pack_LPPROCESS_HEAP_ENTRY(void) -{ - /* LPPROCESS_HEAP_ENTRY */ - TEST_TYPE_SIZE (LPPROCESS_HEAP_ENTRY, 4) - TEST_TYPE_ALIGN (LPPROCESS_HEAP_ENTRY, 4) -} - -static void test_pack_LPPROCESS_INFORMATION(void) -{ - /* LPPROCESS_INFORMATION */ - TEST_TYPE_SIZE (LPPROCESS_INFORMATION, 4) - TEST_TYPE_ALIGN (LPPROCESS_INFORMATION, 4) - TEST_TARGET_SIZE (LPPROCESS_INFORMATION, 16) - TEST_TARGET_ALIGN(LPPROCESS_INFORMATION, 4) -} - -static void test_pack_LPPROGRESS_ROUTINE(void) -{ - /* LPPROGRESS_ROUTINE */ - TEST_TYPE_SIZE (LPPROGRESS_ROUTINE, 4) - TEST_TYPE_ALIGN (LPPROGRESS_ROUTINE, 4) -} - -static void test_pack_LPSECURITY_ATTRIBUTES(void) -{ - /* LPSECURITY_ATTRIBUTES */ - TEST_TYPE_SIZE (LPSECURITY_ATTRIBUTES, 4) - TEST_TYPE_ALIGN (LPSECURITY_ATTRIBUTES, 4) - TEST_TARGET_SIZE (LPSECURITY_ATTRIBUTES, 12) - TEST_TARGET_ALIGN(LPSECURITY_ATTRIBUTES, 4) -} - -static void test_pack_LPSTARTUPINFOA(void) -{ - /* LPSTARTUPINFOA */ - TEST_TYPE_SIZE (LPSTARTUPINFOA, 4) - TEST_TYPE_ALIGN (LPSTARTUPINFOA, 4) - TEST_TARGET_SIZE (LPSTARTUPINFOA, 68) - TEST_TARGET_ALIGN(LPSTARTUPINFOA, 4) -} - -static void test_pack_LPSTARTUPINFOW(void) -{ - /* LPSTARTUPINFOW */ - TEST_TYPE_SIZE (LPSTARTUPINFOW, 4) - TEST_TYPE_ALIGN (LPSTARTUPINFOW, 4) - TEST_TARGET_SIZE (LPSTARTUPINFOW, 68) - TEST_TARGET_ALIGN(LPSTARTUPINFOW, 4) -} - -static void test_pack_LPSYSTEMTIME(void) -{ - /* LPSYSTEMTIME */ - TEST_TYPE_SIZE (LPSYSTEMTIME, 4) - TEST_TYPE_ALIGN (LPSYSTEMTIME, 4) - TEST_TARGET_SIZE (LPSYSTEMTIME, 16) - TEST_TARGET_ALIGN(LPSYSTEMTIME, 2) -} - -static void test_pack_LPSYSTEM_INFO(void) -{ - /* LPSYSTEM_INFO */ - TEST_TYPE_SIZE (LPSYSTEM_INFO, 4) - TEST_TYPE_ALIGN (LPSYSTEM_INFO, 4) -} - -static void test_pack_LPSYSTEM_POWER_STATUS(void) -{ - /* LPSYSTEM_POWER_STATUS */ - TEST_TYPE_SIZE (LPSYSTEM_POWER_STATUS, 4) - TEST_TYPE_ALIGN (LPSYSTEM_POWER_STATUS, 4) - TEST_TARGET_SIZE (LPSYSTEM_POWER_STATUS, 12) - TEST_TARGET_ALIGN(LPSYSTEM_POWER_STATUS, 4) -} - -static void test_pack_LPTHREAD_START_ROUTINE(void) -{ - /* LPTHREAD_START_ROUTINE */ - TEST_TYPE_SIZE (LPTHREAD_START_ROUTINE, 4) - TEST_TYPE_ALIGN (LPTHREAD_START_ROUTINE, 4) -} - -static void test_pack_LPTIME_ZONE_INFORMATION(void) -{ - /* LPTIME_ZONE_INFORMATION */ - TEST_TYPE_SIZE (LPTIME_ZONE_INFORMATION, 4) - TEST_TYPE_ALIGN (LPTIME_ZONE_INFORMATION, 4) - TEST_TARGET_SIZE (LPTIME_ZONE_INFORMATION, 172) - TEST_TARGET_ALIGN(LPTIME_ZONE_INFORMATION, 4) -} - -static void test_pack_LPWIN32_FILE_ATTRIBUTE_DATA(void) -{ - /* LPWIN32_FILE_ATTRIBUTE_DATA */ - TEST_TYPE_SIZE (LPWIN32_FILE_ATTRIBUTE_DATA, 4) - TEST_TYPE_ALIGN (LPWIN32_FILE_ATTRIBUTE_DATA, 4) - TEST_TARGET_SIZE (LPWIN32_FILE_ATTRIBUTE_DATA, 36) - TEST_TARGET_ALIGN(LPWIN32_FILE_ATTRIBUTE_DATA, 4) -} - -static void test_pack_LPWIN32_FIND_DATAA(void) -{ - /* LPWIN32_FIND_DATAA */ - TEST_TYPE_SIZE (LPWIN32_FIND_DATAA, 4) - TEST_TYPE_ALIGN (LPWIN32_FIND_DATAA, 4) - TEST_TARGET_SIZE (LPWIN32_FIND_DATAA, 320) - TEST_TARGET_ALIGN(LPWIN32_FIND_DATAA, 4) -} - -static void test_pack_LPWIN32_FIND_DATAW(void) -{ - /* LPWIN32_FIND_DATAW */ - TEST_TYPE_SIZE (LPWIN32_FIND_DATAW, 4) - TEST_TYPE_ALIGN (LPWIN32_FIND_DATAW, 4) - TEST_TARGET_SIZE (LPWIN32_FIND_DATAW, 592) - TEST_TARGET_ALIGN(LPWIN32_FIND_DATAW, 4) -} - -static void test_pack_LPWIN32_STREAM_ID(void) -{ - /* LPWIN32_STREAM_ID */ - TEST_TYPE_SIZE (LPWIN32_STREAM_ID, 4) - TEST_TYPE_ALIGN (LPWIN32_STREAM_ID, 4) - TEST_TARGET_SIZE (LPWIN32_STREAM_ID, 24) - TEST_TARGET_ALIGN(LPWIN32_STREAM_ID, 8) -} - -static void test_pack_MEMORYSTATUS(void) -{ - /* MEMORYSTATUS */ - TEST_TYPE_SIZE (MEMORYSTATUS, 32) - TEST_TYPE_ALIGN (MEMORYSTATUS, 4) - TEST_FIELD_SIZE (MEMORYSTATUS, dwLength, 4) - TEST_FIELD_ALIGN (MEMORYSTATUS, dwLength, 4) - TEST_FIELD_OFFSET(MEMORYSTATUS, dwLength, 0) - TEST_FIELD_SIZE (MEMORYSTATUS, dwMemoryLoad, 4) - TEST_FIELD_ALIGN (MEMORYSTATUS, dwMemoryLoad, 4) - TEST_FIELD_OFFSET(MEMORYSTATUS, dwMemoryLoad, 4) - TEST_FIELD_SIZE (MEMORYSTATUS, dwTotalPhys, 4) - TEST_FIELD_ALIGN (MEMORYSTATUS, dwTotalPhys, 4) - TEST_FIELD_OFFSET(MEMORYSTATUS, dwTotalPhys, 8) - TEST_FIELD_SIZE (MEMORYSTATUS, dwAvailPhys, 4) - TEST_FIELD_ALIGN (MEMORYSTATUS, dwAvailPhys, 4) - TEST_FIELD_OFFSET(MEMORYSTATUS, dwAvailPhys, 12) - TEST_FIELD_SIZE (MEMORYSTATUS, dwTotalPageFile, 4) - TEST_FIELD_ALIGN (MEMORYSTATUS, dwTotalPageFile, 4) - TEST_FIELD_OFFSET(MEMORYSTATUS, dwTotalPageFile, 16) - TEST_FIELD_SIZE (MEMORYSTATUS, dwAvailPageFile, 4) - TEST_FIELD_ALIGN (MEMORYSTATUS, dwAvailPageFile, 4) - TEST_FIELD_OFFSET(MEMORYSTATUS, dwAvailPageFile, 20) - TEST_FIELD_SIZE (MEMORYSTATUS, dwTotalVirtual, 4) - TEST_FIELD_ALIGN (MEMORYSTATUS, dwTotalVirtual, 4) - TEST_FIELD_OFFSET(MEMORYSTATUS, dwTotalVirtual, 24) - TEST_FIELD_SIZE (MEMORYSTATUS, dwAvailVirtual, 4) - TEST_FIELD_ALIGN (MEMORYSTATUS, dwAvailVirtual, 4) - TEST_FIELD_OFFSET(MEMORYSTATUS, dwAvailVirtual, 28) -} - -static void test_pack_MEMORYSTATUSEX(void) -{ - /* MEMORYSTATUSEX (pack 8) */ - TEST_TYPE_SIZE (MEMORYSTATUSEX, 64) - TEST_TYPE_ALIGN (MEMORYSTATUSEX, 8) - TEST_FIELD_SIZE (MEMORYSTATUSEX, dwLength, 4) - TEST_FIELD_ALIGN (MEMORYSTATUSEX, dwLength, 4) - TEST_FIELD_OFFSET(MEMORYSTATUSEX, dwLength, 0) - TEST_FIELD_SIZE (MEMORYSTATUSEX, dwMemoryLoad, 4) - TEST_FIELD_ALIGN (MEMORYSTATUSEX, dwMemoryLoad, 4) - TEST_FIELD_OFFSET(MEMORYSTATUSEX, dwMemoryLoad, 4) - TEST_FIELD_SIZE (MEMORYSTATUSEX, ullTotalPhys, 8) - TEST_FIELD_ALIGN (MEMORYSTATUSEX, ullTotalPhys, 8) - TEST_FIELD_OFFSET(MEMORYSTATUSEX, ullTotalPhys, 8) - TEST_FIELD_SIZE (MEMORYSTATUSEX, ullAvailPhys, 8) - TEST_FIELD_ALIGN (MEMORYSTATUSEX, ullAvailPhys, 8) - TEST_FIELD_OFFSET(MEMORYSTATUSEX, ullAvailPhys, 16) - TEST_FIELD_SIZE (MEMORYSTATUSEX, ullTotalPageFile, 8) - TEST_FIELD_ALIGN (MEMORYSTATUSEX, ullTotalPageFile, 8) - TEST_FIELD_OFFSET(MEMORYSTATUSEX, ullTotalPageFile, 24) - TEST_FIELD_SIZE (MEMORYSTATUSEX, ullAvailPageFile, 8) - TEST_FIELD_ALIGN (MEMORYSTATUSEX, ullAvailPageFile, 8) - TEST_FIELD_OFFSET(MEMORYSTATUSEX, ullAvailPageFile, 32) - TEST_FIELD_SIZE (MEMORYSTATUSEX, ullTotalVirtual, 8) - TEST_FIELD_ALIGN (MEMORYSTATUSEX, ullTotalVirtual, 8) - TEST_FIELD_OFFSET(MEMORYSTATUSEX, ullTotalVirtual, 40) - TEST_FIELD_SIZE (MEMORYSTATUSEX, ullAvailVirtual, 8) - TEST_FIELD_ALIGN (MEMORYSTATUSEX, ullAvailVirtual, 8) - TEST_FIELD_OFFSET(MEMORYSTATUSEX, ullAvailVirtual, 48) - TEST_FIELD_SIZE (MEMORYSTATUSEX, ullAvailExtendedVirtual, 8) - TEST_FIELD_ALIGN (MEMORYSTATUSEX, ullAvailExtendedVirtual, 8) - TEST_FIELD_OFFSET(MEMORYSTATUSEX, ullAvailExtendedVirtual, 56) -} - -static void test_pack_OFSTRUCT(void) -{ - /* OFSTRUCT */ - TEST_TYPE_SIZE (OFSTRUCT, 136) - TEST_TYPE_ALIGN (OFSTRUCT, 2) - TEST_FIELD_SIZE (OFSTRUCT, cBytes, 1) - TEST_FIELD_ALIGN (OFSTRUCT, cBytes, 1) - TEST_FIELD_OFFSET(OFSTRUCT, cBytes, 0) - TEST_FIELD_SIZE (OFSTRUCT, fFixedDisk, 1) - TEST_FIELD_ALIGN (OFSTRUCT, fFixedDisk, 1) - TEST_FIELD_OFFSET(OFSTRUCT, fFixedDisk, 1) - TEST_FIELD_SIZE (OFSTRUCT, nErrCode, 2) - TEST_FIELD_ALIGN (OFSTRUCT, nErrCode, 2) - TEST_FIELD_OFFSET(OFSTRUCT, nErrCode, 2) - TEST_FIELD_SIZE (OFSTRUCT, Reserved1, 2) - TEST_FIELD_ALIGN (OFSTRUCT, Reserved1, 2) - TEST_FIELD_OFFSET(OFSTRUCT, Reserved1, 4) - TEST_FIELD_SIZE (OFSTRUCT, Reserved2, 2) - TEST_FIELD_ALIGN (OFSTRUCT, Reserved2, 2) - TEST_FIELD_OFFSET(OFSTRUCT, Reserved2, 6) - TEST_FIELD_SIZE (OFSTRUCT, szPathName, 128) - TEST_FIELD_ALIGN (OFSTRUCT, szPathName, 1) - TEST_FIELD_OFFSET(OFSTRUCT, szPathName, 8) -} - -static void test_pack_OUTPUT_DEBUG_STRING_INFO(void) -{ - /* OUTPUT_DEBUG_STRING_INFO */ - TEST_TYPE_SIZE (OUTPUT_DEBUG_STRING_INFO, 8) - TEST_TYPE_ALIGN (OUTPUT_DEBUG_STRING_INFO, 4) - TEST_FIELD_SIZE (OUTPUT_DEBUG_STRING_INFO, lpDebugStringData, 4) - TEST_FIELD_ALIGN (OUTPUT_DEBUG_STRING_INFO, lpDebugStringData, 4) - TEST_FIELD_OFFSET(OUTPUT_DEBUG_STRING_INFO, lpDebugStringData, 0) - TEST_FIELD_SIZE (OUTPUT_DEBUG_STRING_INFO, fUnicode, 2) - TEST_FIELD_ALIGN (OUTPUT_DEBUG_STRING_INFO, fUnicode, 2) - TEST_FIELD_OFFSET(OUTPUT_DEBUG_STRING_INFO, fUnicode, 4) - TEST_FIELD_SIZE (OUTPUT_DEBUG_STRING_INFO, nDebugStringLength, 2) - TEST_FIELD_ALIGN (OUTPUT_DEBUG_STRING_INFO, nDebugStringLength, 2) - TEST_FIELD_OFFSET(OUTPUT_DEBUG_STRING_INFO, nDebugStringLength, 6) -} - -static void test_pack_PACTCTXA(void) -{ - /* PACTCTXA */ - TEST_TYPE_SIZE (PACTCTXA, 4) - TEST_TYPE_ALIGN (PACTCTXA, 4) - TEST_TARGET_SIZE (PACTCTXA, 32) - TEST_TARGET_ALIGN(PACTCTXA, 4) -} - -static void test_pack_PACTCTXW(void) -{ - /* PACTCTXW */ - TEST_TYPE_SIZE (PACTCTXW, 4) - TEST_TYPE_ALIGN (PACTCTXW, 4) - TEST_TARGET_SIZE (PACTCTXW, 32) - TEST_TARGET_ALIGN(PACTCTXW, 4) -} - -static void test_pack_PACTCTX_SECTION_KEYED_DATA(void) -{ - /* PACTCTX_SECTION_KEYED_DATA */ - TEST_TYPE_SIZE (PACTCTX_SECTION_KEYED_DATA, 4) - TEST_TYPE_ALIGN (PACTCTX_SECTION_KEYED_DATA, 4) - TEST_TARGET_SIZE (PACTCTX_SECTION_KEYED_DATA, 64) - TEST_TARGET_ALIGN(PACTCTX_SECTION_KEYED_DATA, 4) -} - -static void test_pack_PACTCTX_SECTION_KEYED_DATA_2600(void) -{ - /* PACTCTX_SECTION_KEYED_DATA_2600 */ - TEST_TYPE_SIZE (PACTCTX_SECTION_KEYED_DATA_2600, 4) - TEST_TYPE_ALIGN (PACTCTX_SECTION_KEYED_DATA_2600, 4) - TEST_TARGET_SIZE (PACTCTX_SECTION_KEYED_DATA_2600, 40) - TEST_TARGET_ALIGN(PACTCTX_SECTION_KEYED_DATA_2600, 4) -} - -static void test_pack_PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA(void) -{ - /* PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA */ - TEST_TYPE_SIZE (PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 4) - TEST_TYPE_ALIGN (PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 4) - TEST_TARGET_SIZE (PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 20) - TEST_TARGET_ALIGN(PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 4) -} - -static void test_pack_PACTIVATION_CONTEXT_BASIC_INFORMATION(void) -{ - /* PACTIVATION_CONTEXT_BASIC_INFORMATION */ - TEST_TYPE_SIZE (PACTIVATION_CONTEXT_BASIC_INFORMATION, 4) - TEST_TYPE_ALIGN (PACTIVATION_CONTEXT_BASIC_INFORMATION, 4) - TEST_TARGET_SIZE (PACTIVATION_CONTEXT_BASIC_INFORMATION, 8) - TEST_TARGET_ALIGN(PACTIVATION_CONTEXT_BASIC_INFORMATION, 4) -} - -static void test_pack_PAPCFUNC(void) -{ - /* PAPCFUNC */ - TEST_TYPE_SIZE (PAPCFUNC, 4) - TEST_TYPE_ALIGN (PAPCFUNC, 4) -} - -static void test_pack_PBY_HANDLE_FILE_INFORMATION(void) -{ - /* PBY_HANDLE_FILE_INFORMATION */ - TEST_TYPE_SIZE (PBY_HANDLE_FILE_INFORMATION, 4) - TEST_TYPE_ALIGN (PBY_HANDLE_FILE_INFORMATION, 4) - TEST_TARGET_SIZE (PBY_HANDLE_FILE_INFORMATION, 52) - TEST_TARGET_ALIGN(PBY_HANDLE_FILE_INFORMATION, 4) -} - -static void test_pack_PCACTCTXA(void) -{ - /* PCACTCTXA */ - TEST_TYPE_SIZE (PCACTCTXA, 4) - TEST_TYPE_ALIGN (PCACTCTXA, 4) - TEST_TARGET_SIZE (PCACTCTXA, 32) - TEST_TARGET_ALIGN(PCACTCTXA, 4) -} - -static void test_pack_PCACTCTXW(void) -{ - /* PCACTCTXW */ - TEST_TYPE_SIZE (PCACTCTXW, 4) - TEST_TYPE_ALIGN (PCACTCTXW, 4) - TEST_TARGET_SIZE (PCACTCTXW, 32) - TEST_TARGET_ALIGN(PCACTCTXW, 4) -} - -static void test_pack_PCACTCTX_SECTION_KEYED_DATA(void) -{ - /* PCACTCTX_SECTION_KEYED_DATA */ - TEST_TYPE_SIZE (PCACTCTX_SECTION_KEYED_DATA, 4) - TEST_TYPE_ALIGN (PCACTCTX_SECTION_KEYED_DATA, 4) - TEST_TARGET_SIZE (PCACTCTX_SECTION_KEYED_DATA, 64) - TEST_TARGET_ALIGN(PCACTCTX_SECTION_KEYED_DATA, 4) -} - -static void test_pack_PCACTCTX_SECTION_KEYED_DATA_2600(void) -{ - /* PCACTCTX_SECTION_KEYED_DATA_2600 */ - TEST_TYPE_SIZE (PCACTCTX_SECTION_KEYED_DATA_2600, 4) - TEST_TYPE_ALIGN (PCACTCTX_SECTION_KEYED_DATA_2600, 4) - TEST_TARGET_SIZE (PCACTCTX_SECTION_KEYED_DATA_2600, 40) - TEST_TARGET_ALIGN(PCACTCTX_SECTION_KEYED_DATA_2600, 4) -} - -static void test_pack_PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA(void) -{ - /* PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA */ - TEST_TYPE_SIZE (PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 4) - TEST_TYPE_ALIGN (PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 4) - TEST_TARGET_SIZE (PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 20) - TEST_TARGET_ALIGN(PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA, 4) -} - -static void test_pack_PCRITICAL_SECTION(void) -{ - /* PCRITICAL_SECTION */ - TEST_TYPE_SIZE (PCRITICAL_SECTION, 4) - TEST_TYPE_ALIGN (PCRITICAL_SECTION, 4) -} - -static void test_pack_PCRITICAL_SECTION_DEBUG(void) -{ - /* PCRITICAL_SECTION_DEBUG */ - TEST_TYPE_SIZE (PCRITICAL_SECTION_DEBUG, 4) - TEST_TYPE_ALIGN (PCRITICAL_SECTION_DEBUG, 4) -} - -static void test_pack_PFIBER_START_ROUTINE(void) -{ - /* PFIBER_START_ROUTINE */ - TEST_TYPE_SIZE (PFIBER_START_ROUTINE, 4) - TEST_TYPE_ALIGN (PFIBER_START_ROUTINE, 4) -} - -static void test_pack_POFSTRUCT(void) -{ - /* POFSTRUCT */ - TEST_TYPE_SIZE (POFSTRUCT, 4) - TEST_TYPE_ALIGN (POFSTRUCT, 4) - TEST_TARGET_SIZE (POFSTRUCT, 136) - TEST_TARGET_ALIGN(POFSTRUCT, 2) -} - -static void test_pack_PPROCESS_HEAP_ENTRY(void) -{ - /* PPROCESS_HEAP_ENTRY */ - TEST_TYPE_SIZE (PPROCESS_HEAP_ENTRY, 4) - TEST_TYPE_ALIGN (PPROCESS_HEAP_ENTRY, 4) -} - -static void test_pack_PPROCESS_INFORMATION(void) -{ - /* PPROCESS_INFORMATION */ - TEST_TYPE_SIZE (PPROCESS_INFORMATION, 4) - TEST_TYPE_ALIGN (PPROCESS_INFORMATION, 4) - TEST_TARGET_SIZE (PPROCESS_INFORMATION, 16) - TEST_TARGET_ALIGN(PPROCESS_INFORMATION, 4) -} - -static void test_pack_PQUERYACTCTXW_FUNC(void) -{ - /* PQUERYACTCTXW_FUNC */ - TEST_TYPE_SIZE (PQUERYACTCTXW_FUNC, 4) - TEST_TYPE_ALIGN (PQUERYACTCTXW_FUNC, 4) -} - -static void test_pack_PROCESS_HEAP_ENTRY(void) -{ - /* PROCESS_HEAP_ENTRY */ - TEST_FIELD_SIZE (PROCESS_HEAP_ENTRY, lpData, 4) - TEST_FIELD_ALIGN (PROCESS_HEAP_ENTRY, lpData, 4) - TEST_FIELD_OFFSET(PROCESS_HEAP_ENTRY, lpData, 0) - TEST_FIELD_SIZE (PROCESS_HEAP_ENTRY, cbData, 4) - TEST_FIELD_ALIGN (PROCESS_HEAP_ENTRY, cbData, 4) - TEST_FIELD_OFFSET(PROCESS_HEAP_ENTRY, cbData, 4) - TEST_FIELD_SIZE (PROCESS_HEAP_ENTRY, cbOverhead, 1) - TEST_FIELD_ALIGN (PROCESS_HEAP_ENTRY, cbOverhead, 1) - TEST_FIELD_OFFSET(PROCESS_HEAP_ENTRY, cbOverhead, 8) - TEST_FIELD_SIZE (PROCESS_HEAP_ENTRY, iRegionIndex, 1) - TEST_FIELD_ALIGN (PROCESS_HEAP_ENTRY, iRegionIndex, 1) - TEST_FIELD_OFFSET(PROCESS_HEAP_ENTRY, iRegionIndex, 9) - TEST_FIELD_SIZE (PROCESS_HEAP_ENTRY, wFlags, 2) - TEST_FIELD_ALIGN (PROCESS_HEAP_ENTRY, wFlags, 2) - TEST_FIELD_OFFSET(PROCESS_HEAP_ENTRY, wFlags, 10) -} - -static void test_pack_PROCESS_INFORMATION(void) -{ - /* PROCESS_INFORMATION */ - TEST_TYPE_SIZE (PROCESS_INFORMATION, 16) - TEST_TYPE_ALIGN (PROCESS_INFORMATION, 4) - TEST_FIELD_SIZE (PROCESS_INFORMATION, hProcess, 4) - TEST_FIELD_ALIGN (PROCESS_INFORMATION, hProcess, 4) - TEST_FIELD_OFFSET(PROCESS_INFORMATION, hProcess, 0) - TEST_FIELD_SIZE (PROCESS_INFORMATION, hThread, 4) - TEST_FIELD_ALIGN (PROCESS_INFORMATION, hThread, 4) - TEST_FIELD_OFFSET(PROCESS_INFORMATION, hThread, 4) - TEST_FIELD_SIZE (PROCESS_INFORMATION, dwProcessId, 4) - TEST_FIELD_ALIGN (PROCESS_INFORMATION, dwProcessId, 4) - TEST_FIELD_OFFSET(PROCESS_INFORMATION, dwProcessId, 8) - TEST_FIELD_SIZE (PROCESS_INFORMATION, dwThreadId, 4) - TEST_FIELD_ALIGN (PROCESS_INFORMATION, dwThreadId, 4) - TEST_FIELD_OFFSET(PROCESS_INFORMATION, dwThreadId, 12) -} - -static void test_pack_PSECURITY_ATTRIBUTES(void) -{ - /* PSECURITY_ATTRIBUTES */ - TEST_TYPE_SIZE (PSECURITY_ATTRIBUTES, 4) - TEST_TYPE_ALIGN (PSECURITY_ATTRIBUTES, 4) - TEST_TARGET_SIZE (PSECURITY_ATTRIBUTES, 12) - TEST_TARGET_ALIGN(PSECURITY_ATTRIBUTES, 4) -} - -static void test_pack_PSYSTEMTIME(void) -{ - /* PSYSTEMTIME */ - TEST_TYPE_SIZE (PSYSTEMTIME, 4) - TEST_TYPE_ALIGN (PSYSTEMTIME, 4) - TEST_TARGET_SIZE (PSYSTEMTIME, 16) - TEST_TARGET_ALIGN(PSYSTEMTIME, 2) -} - -static void test_pack_PTIMERAPCROUTINE(void) -{ - /* PTIMERAPCROUTINE */ - TEST_TYPE_SIZE (PTIMERAPCROUTINE, 4) - TEST_TYPE_ALIGN (PTIMERAPCROUTINE, 4) -} - -static void test_pack_PTIME_ZONE_INFORMATION(void) -{ - /* PTIME_ZONE_INFORMATION */ - TEST_TYPE_SIZE (PTIME_ZONE_INFORMATION, 4) - TEST_TYPE_ALIGN (PTIME_ZONE_INFORMATION, 4) - TEST_TARGET_SIZE (PTIME_ZONE_INFORMATION, 172) - TEST_TARGET_ALIGN(PTIME_ZONE_INFORMATION, 4) -} - -static void test_pack_PWIN32_FIND_DATAA(void) -{ - /* PWIN32_FIND_DATAA */ - TEST_TYPE_SIZE (PWIN32_FIND_DATAA, 4) - TEST_TYPE_ALIGN (PWIN32_FIND_DATAA, 4) - TEST_TARGET_SIZE (PWIN32_FIND_DATAA, 320) - TEST_TARGET_ALIGN(PWIN32_FIND_DATAA, 4) -} - -static void test_pack_PWIN32_FIND_DATAW(void) -{ - /* PWIN32_FIND_DATAW */ - TEST_TYPE_SIZE (PWIN32_FIND_DATAW, 4) - TEST_TYPE_ALIGN (PWIN32_FIND_DATAW, 4) - TEST_TARGET_SIZE (PWIN32_FIND_DATAW, 592) - TEST_TARGET_ALIGN(PWIN32_FIND_DATAW, 4) -} - -static void test_pack_RIP_INFO(void) -{ - /* RIP_INFO */ - TEST_TYPE_SIZE (RIP_INFO, 8) - TEST_TYPE_ALIGN (RIP_INFO, 4) - TEST_FIELD_SIZE (RIP_INFO, dwError, 4) - TEST_FIELD_ALIGN (RIP_INFO, dwError, 4) - TEST_FIELD_OFFSET(RIP_INFO, dwError, 0) - TEST_FIELD_SIZE (RIP_INFO, dwType, 4) - TEST_FIELD_ALIGN (RIP_INFO, dwType, 4) - TEST_FIELD_OFFSET(RIP_INFO, dwType, 4) -} - -static void test_pack_SECURITY_ATTRIBUTES(void) -{ - /* SECURITY_ATTRIBUTES */ - TEST_TYPE_SIZE (SECURITY_ATTRIBUTES, 12) - TEST_TYPE_ALIGN (SECURITY_ATTRIBUTES, 4) - TEST_FIELD_SIZE (SECURITY_ATTRIBUTES, nLength, 4) - TEST_FIELD_ALIGN (SECURITY_ATTRIBUTES, nLength, 4) - TEST_FIELD_OFFSET(SECURITY_ATTRIBUTES, nLength, 0) - TEST_FIELD_SIZE (SECURITY_ATTRIBUTES, lpSecurityDescriptor, 4) - TEST_FIELD_ALIGN (SECURITY_ATTRIBUTES, lpSecurityDescriptor, 4) - TEST_FIELD_OFFSET(SECURITY_ATTRIBUTES, lpSecurityDescriptor, 4) - TEST_FIELD_SIZE (SECURITY_ATTRIBUTES, bInheritHandle, 4) - TEST_FIELD_ALIGN (SECURITY_ATTRIBUTES, bInheritHandle, 4) - TEST_FIELD_OFFSET(SECURITY_ATTRIBUTES, bInheritHandle, 8) -} - -static void test_pack_STARTUPINFOA(void) -{ - /* STARTUPINFOA */ - TEST_TYPE_SIZE (STARTUPINFOA, 68) - TEST_TYPE_ALIGN (STARTUPINFOA, 4) - TEST_FIELD_SIZE (STARTUPINFOA, cb, 4) - TEST_FIELD_ALIGN (STARTUPINFOA, cb, 4) - TEST_FIELD_OFFSET(STARTUPINFOA, cb, 0) - TEST_FIELD_SIZE (STARTUPINFOA, lpReserved, 4) - TEST_FIELD_ALIGN (STARTUPINFOA, lpReserved, 4) - TEST_FIELD_OFFSET(STARTUPINFOA, lpReserved, 4) - TEST_FIELD_SIZE (STARTUPINFOA, lpDesktop, 4) - TEST_FIELD_ALIGN (STARTUPINFOA, lpDesktop, 4) - TEST_FIELD_OFFSET(STARTUPINFOA, lpDesktop, 8) - TEST_FIELD_SIZE (STARTUPINFOA, lpTitle, 4) - TEST_FIELD_ALIGN (STARTUPINFOA, lpTitle, 4) - TEST_FIELD_OFFSET(STARTUPINFOA, lpTitle, 12) - TEST_FIELD_SIZE (STARTUPINFOA, dwX, 4) - TEST_FIELD_ALIGN (STARTUPINFOA, dwX, 4) - TEST_FIELD_OFFSET(STARTUPINFOA, dwX, 16) - TEST_FIELD_SIZE (STARTUPINFOA, dwY, 4) - TEST_FIELD_ALIGN (STARTUPINFOA, dwY, 4) - TEST_FIELD_OFFSET(STARTUPINFOA, dwY, 20) - TEST_FIELD_SIZE (STARTUPINFOA, dwXSize, 4) - TEST_FIELD_ALIGN (STARTUPINFOA, dwXSize, 4) - TEST_FIELD_OFFSET(STARTUPINFOA, dwXSize, 24) - TEST_FIELD_SIZE (STARTUPINFOA, dwYSize, 4) - TEST_FIELD_ALIGN (STARTUPINFOA, dwYSize, 4) - TEST_FIELD_OFFSET(STARTUPINFOA, dwYSize, 28) - TEST_FIELD_SIZE (STARTUPINFOA, dwXCountChars, 4) - TEST_FIELD_ALIGN (STARTUPINFOA, dwXCountChars, 4) - TEST_FIELD_OFFSET(STARTUPINFOA, dwXCountChars, 32) - TEST_FIELD_SIZE (STARTUPINFOA, dwYCountChars, 4) - TEST_FIELD_ALIGN (STARTUPINFOA, dwYCountChars, 4) - TEST_FIELD_OFFSET(STARTUPINFOA, dwYCountChars, 36) - TEST_FIELD_SIZE (STARTUPINFOA, dwFillAttribute, 4) - TEST_FIELD_ALIGN (STARTUPINFOA, dwFillAttribute, 4) - TEST_FIELD_OFFSET(STARTUPINFOA, dwFillAttribute, 40) - TEST_FIELD_SIZE (STARTUPINFOA, dwFlags, 4) - TEST_FIELD_ALIGN (STARTUPINFOA, dwFlags, 4) - TEST_FIELD_OFFSET(STARTUPINFOA, dwFlags, 44) - TEST_FIELD_SIZE (STARTUPINFOA, wShowWindow, 2) - TEST_FIELD_ALIGN (STARTUPINFOA, wShowWindow, 2) - TEST_FIELD_OFFSET(STARTUPINFOA, wShowWindow, 48) - TEST_FIELD_SIZE (STARTUPINFOA, cbReserved2, 2) - TEST_FIELD_ALIGN (STARTUPINFOA, cbReserved2, 2) - TEST_FIELD_OFFSET(STARTUPINFOA, cbReserved2, 50) - TEST_FIELD_SIZE (STARTUPINFOA, lpReserved2, 4) - TEST_FIELD_ALIGN (STARTUPINFOA, lpReserved2, 4) - TEST_FIELD_OFFSET(STARTUPINFOA, lpReserved2, 52) - TEST_FIELD_SIZE (STARTUPINFOA, hStdInput, 4) - TEST_FIELD_ALIGN (STARTUPINFOA, hStdInput, 4) - TEST_FIELD_OFFSET(STARTUPINFOA, hStdInput, 56) - TEST_FIELD_SIZE (STARTUPINFOA, hStdOutput, 4) - TEST_FIELD_ALIGN (STARTUPINFOA, hStdOutput, 4) - TEST_FIELD_OFFSET(STARTUPINFOA, hStdOutput, 60) - TEST_FIELD_SIZE (STARTUPINFOA, hStdError, 4) - TEST_FIELD_ALIGN (STARTUPINFOA, hStdError, 4) - TEST_FIELD_OFFSET(STARTUPINFOA, hStdError, 64) -} - -static void test_pack_STARTUPINFOW(void) -{ - /* STARTUPINFOW */ - TEST_TYPE_SIZE (STARTUPINFOW, 68) - TEST_TYPE_ALIGN (STARTUPINFOW, 4) - TEST_FIELD_SIZE (STARTUPINFOW, cb, 4) - TEST_FIELD_ALIGN (STARTUPINFOW, cb, 4) - TEST_FIELD_OFFSET(STARTUPINFOW, cb, 0) - TEST_FIELD_SIZE (STARTUPINFOW, lpReserved, 4) - TEST_FIELD_ALIGN (STARTUPINFOW, lpReserved, 4) - TEST_FIELD_OFFSET(STARTUPINFOW, lpReserved, 4) - TEST_FIELD_SIZE (STARTUPINFOW, lpDesktop, 4) - TEST_FIELD_ALIGN (STARTUPINFOW, lpDesktop, 4) - TEST_FIELD_OFFSET(STARTUPINFOW, lpDesktop, 8) - TEST_FIELD_SIZE (STARTUPINFOW, lpTitle, 4) - TEST_FIELD_ALIGN (STARTUPINFOW, lpTitle, 4) - TEST_FIELD_OFFSET(STARTUPINFOW, lpTitle, 12) - TEST_FIELD_SIZE (STARTUPINFOW, dwX, 4) - TEST_FIELD_ALIGN (STARTUPINFOW, dwX, 4) - TEST_FIELD_OFFSET(STARTUPINFOW, dwX, 16) - TEST_FIELD_SIZE (STARTUPINFOW, dwY, 4) - TEST_FIELD_ALIGN (STARTUPINFOW, dwY, 4) - TEST_FIELD_OFFSET(STARTUPINFOW, dwY, 20) - TEST_FIELD_SIZE (STARTUPINFOW, dwXSize, 4) - TEST_FIELD_ALIGN (STARTUPINFOW, dwXSize, 4) - TEST_FIELD_OFFSET(STARTUPINFOW, dwXSize, 24) - TEST_FIELD_SIZE (STARTUPINFOW, dwYSize, 4) - TEST_FIELD_ALIGN (STARTUPINFOW, dwYSize, 4) - TEST_FIELD_OFFSET(STARTUPINFOW, dwYSize, 28) - TEST_FIELD_SIZE (STARTUPINFOW, dwXCountChars, 4) - TEST_FIELD_ALIGN (STARTUPINFOW, dwXCountChars, 4) - TEST_FIELD_OFFSET(STARTUPINFOW, dwXCountChars, 32) - TEST_FIELD_SIZE (STARTUPINFOW, dwYCountChars, 4) - TEST_FIELD_ALIGN (STARTUPINFOW, dwYCountChars, 4) - TEST_FIELD_OFFSET(STARTUPINFOW, dwYCountChars, 36) - TEST_FIELD_SIZE (STARTUPINFOW, dwFillAttribute, 4) - TEST_FIELD_ALIGN (STARTUPINFOW, dwFillAttribute, 4) - TEST_FIELD_OFFSET(STARTUPINFOW, dwFillAttribute, 40) - TEST_FIELD_SIZE (STARTUPINFOW, dwFlags, 4) - TEST_FIELD_ALIGN (STARTUPINFOW, dwFlags, 4) - TEST_FIELD_OFFSET(STARTUPINFOW, dwFlags, 44) - TEST_FIELD_SIZE (STARTUPINFOW, wShowWindow, 2) - TEST_FIELD_ALIGN (STARTUPINFOW, wShowWindow, 2) - TEST_FIELD_OFFSET(STARTUPINFOW, wShowWindow, 48) - TEST_FIELD_SIZE (STARTUPINFOW, cbReserved2, 2) - TEST_FIELD_ALIGN (STARTUPINFOW, cbReserved2, 2) - TEST_FIELD_OFFSET(STARTUPINFOW, cbReserved2, 50) - TEST_FIELD_SIZE (STARTUPINFOW, lpReserved2, 4) - TEST_FIELD_ALIGN (STARTUPINFOW, lpReserved2, 4) - TEST_FIELD_OFFSET(STARTUPINFOW, lpReserved2, 52) - TEST_FIELD_SIZE (STARTUPINFOW, hStdInput, 4) - TEST_FIELD_ALIGN (STARTUPINFOW, hStdInput, 4) - TEST_FIELD_OFFSET(STARTUPINFOW, hStdInput, 56) - TEST_FIELD_SIZE (STARTUPINFOW, hStdOutput, 4) - TEST_FIELD_ALIGN (STARTUPINFOW, hStdOutput, 4) - TEST_FIELD_OFFSET(STARTUPINFOW, hStdOutput, 60) - TEST_FIELD_SIZE (STARTUPINFOW, hStdError, 4) - TEST_FIELD_ALIGN (STARTUPINFOW, hStdError, 4) - TEST_FIELD_OFFSET(STARTUPINFOW, hStdError, 64) -} - -static void test_pack_SYSTEMTIME(void) -{ - /* SYSTEMTIME */ - TEST_TYPE_SIZE (SYSTEMTIME, 16) - TEST_TYPE_ALIGN (SYSTEMTIME, 2) - TEST_FIELD_SIZE (SYSTEMTIME, wYear, 2) - TEST_FIELD_ALIGN (SYSTEMTIME, wYear, 2) - TEST_FIELD_OFFSET(SYSTEMTIME, wYear, 0) - TEST_FIELD_SIZE (SYSTEMTIME, wMonth, 2) - TEST_FIELD_ALIGN (SYSTEMTIME, wMonth, 2) - TEST_FIELD_OFFSET(SYSTEMTIME, wMonth, 2) - TEST_FIELD_SIZE (SYSTEMTIME, wDayOfWeek, 2) - TEST_FIELD_ALIGN (SYSTEMTIME, wDayOfWeek, 2) - TEST_FIELD_OFFSET(SYSTEMTIME, wDayOfWeek, 4) - TEST_FIELD_SIZE (SYSTEMTIME, wDay, 2) - TEST_FIELD_ALIGN (SYSTEMTIME, wDay, 2) - TEST_FIELD_OFFSET(SYSTEMTIME, wDay, 6) - TEST_FIELD_SIZE (SYSTEMTIME, wHour, 2) - TEST_FIELD_ALIGN (SYSTEMTIME, wHour, 2) - TEST_FIELD_OFFSET(SYSTEMTIME, wHour, 8) - TEST_FIELD_SIZE (SYSTEMTIME, wMinute, 2) - TEST_FIELD_ALIGN (SYSTEMTIME, wMinute, 2) - TEST_FIELD_OFFSET(SYSTEMTIME, wMinute, 10) - TEST_FIELD_SIZE (SYSTEMTIME, wSecond, 2) - TEST_FIELD_ALIGN (SYSTEMTIME, wSecond, 2) - TEST_FIELD_OFFSET(SYSTEMTIME, wSecond, 12) - TEST_FIELD_SIZE (SYSTEMTIME, wMilliseconds, 2) - TEST_FIELD_ALIGN (SYSTEMTIME, wMilliseconds, 2) - TEST_FIELD_OFFSET(SYSTEMTIME, wMilliseconds, 14) -} - -static void test_pack_SYSTEM_INFO(void) -{ - /* SYSTEM_INFO */ -} - -static void test_pack_SYSTEM_POWER_STATUS(void) -{ - /* SYSTEM_POWER_STATUS */ - TEST_TYPE_SIZE (SYSTEM_POWER_STATUS, 12) - TEST_TYPE_ALIGN (SYSTEM_POWER_STATUS, 4) - TEST_FIELD_SIZE (SYSTEM_POWER_STATUS, ACLineStatus, 1) - TEST_FIELD_ALIGN (SYSTEM_POWER_STATUS, ACLineStatus, 1) - TEST_FIELD_OFFSET(SYSTEM_POWER_STATUS, ACLineStatus, 0) - TEST_FIELD_SIZE (SYSTEM_POWER_STATUS, BatteryFlag, 1) - TEST_FIELD_ALIGN (SYSTEM_POWER_STATUS, BatteryFlag, 1) - TEST_FIELD_OFFSET(SYSTEM_POWER_STATUS, BatteryFlag, 1) - TEST_FIELD_SIZE (SYSTEM_POWER_STATUS, BatteryLifePercent, 1) - TEST_FIELD_ALIGN (SYSTEM_POWER_STATUS, BatteryLifePercent, 1) - TEST_FIELD_OFFSET(SYSTEM_POWER_STATUS, BatteryLifePercent, 2) - TEST_FIELD_SIZE (SYSTEM_POWER_STATUS, Reserved1, 1) - TEST_FIELD_ALIGN (SYSTEM_POWER_STATUS, Reserved1, 1) - TEST_FIELD_OFFSET(SYSTEM_POWER_STATUS, Reserved1, 3) - TEST_FIELD_SIZE (SYSTEM_POWER_STATUS, BatteryLifeTime, 4) - TEST_FIELD_ALIGN (SYSTEM_POWER_STATUS, BatteryLifeTime, 4) - TEST_FIELD_OFFSET(SYSTEM_POWER_STATUS, BatteryLifeTime, 4) - TEST_FIELD_SIZE (SYSTEM_POWER_STATUS, BatteryFullLifeTime, 4) - TEST_FIELD_ALIGN (SYSTEM_POWER_STATUS, BatteryFullLifeTime, 4) - TEST_FIELD_OFFSET(SYSTEM_POWER_STATUS, BatteryFullLifeTime, 8) -} - -static void test_pack_TIME_ZONE_INFORMATION(void) -{ - /* TIME_ZONE_INFORMATION */ - TEST_TYPE_SIZE (TIME_ZONE_INFORMATION, 172) - TEST_TYPE_ALIGN (TIME_ZONE_INFORMATION, 4) - TEST_FIELD_SIZE (TIME_ZONE_INFORMATION, Bias, 4) - TEST_FIELD_ALIGN (TIME_ZONE_INFORMATION, Bias, 4) - TEST_FIELD_OFFSET(TIME_ZONE_INFORMATION, Bias, 0) - TEST_FIELD_SIZE (TIME_ZONE_INFORMATION, StandardName, 64) - TEST_FIELD_ALIGN (TIME_ZONE_INFORMATION, StandardName, 2) - TEST_FIELD_OFFSET(TIME_ZONE_INFORMATION, StandardName, 4) - TEST_FIELD_SIZE (TIME_ZONE_INFORMATION, StandardDate, 16) - TEST_FIELD_ALIGN (TIME_ZONE_INFORMATION, StandardDate, 2) - TEST_FIELD_OFFSET(TIME_ZONE_INFORMATION, StandardDate, 68) - TEST_FIELD_SIZE (TIME_ZONE_INFORMATION, StandardBias, 4) - TEST_FIELD_ALIGN (TIME_ZONE_INFORMATION, StandardBias, 4) - TEST_FIELD_OFFSET(TIME_ZONE_INFORMATION, StandardBias, 84) - TEST_FIELD_SIZE (TIME_ZONE_INFORMATION, DaylightName, 64) - TEST_FIELD_ALIGN (TIME_ZONE_INFORMATION, DaylightName, 2) - TEST_FIELD_OFFSET(TIME_ZONE_INFORMATION, DaylightName, 88) - TEST_FIELD_SIZE (TIME_ZONE_INFORMATION, DaylightDate, 16) - TEST_FIELD_ALIGN (TIME_ZONE_INFORMATION, DaylightDate, 2) - TEST_FIELD_OFFSET(TIME_ZONE_INFORMATION, DaylightDate, 152) - TEST_FIELD_SIZE (TIME_ZONE_INFORMATION, DaylightBias, 4) - TEST_FIELD_ALIGN (TIME_ZONE_INFORMATION, DaylightBias, 4) - TEST_FIELD_OFFSET(TIME_ZONE_INFORMATION, DaylightBias, 168) -} - -static void test_pack_UNLOAD_DLL_DEBUG_INFO(void) -{ - /* UNLOAD_DLL_DEBUG_INFO */ - TEST_TYPE_SIZE (UNLOAD_DLL_DEBUG_INFO, 4) - TEST_TYPE_ALIGN (UNLOAD_DLL_DEBUG_INFO, 4) - TEST_FIELD_SIZE (UNLOAD_DLL_DEBUG_INFO, lpBaseOfDll, 4) - TEST_FIELD_ALIGN (UNLOAD_DLL_DEBUG_INFO, lpBaseOfDll, 4) - TEST_FIELD_OFFSET(UNLOAD_DLL_DEBUG_INFO, lpBaseOfDll, 0) -} - -static void test_pack_WAITORTIMERCALLBACK(void) -{ - /* WAITORTIMERCALLBACK */ - TEST_TYPE_SIZE (WAITORTIMERCALLBACK, 4) - TEST_TYPE_ALIGN (WAITORTIMERCALLBACK, 4) -} - -static void test_pack_WIN32_FILE_ATTRIBUTE_DATA(void) -{ - /* WIN32_FILE_ATTRIBUTE_DATA */ - TEST_TYPE_SIZE (WIN32_FILE_ATTRIBUTE_DATA, 36) - TEST_TYPE_ALIGN (WIN32_FILE_ATTRIBUTE_DATA, 4) - TEST_FIELD_SIZE (WIN32_FILE_ATTRIBUTE_DATA, dwFileAttributes, 4) - TEST_FIELD_ALIGN (WIN32_FILE_ATTRIBUTE_DATA, dwFileAttributes, 4) - TEST_FIELD_OFFSET(WIN32_FILE_ATTRIBUTE_DATA, dwFileAttributes, 0) - TEST_FIELD_SIZE (WIN32_FILE_ATTRIBUTE_DATA, ftCreationTime, 8) - TEST_FIELD_ALIGN (WIN32_FILE_ATTRIBUTE_DATA, ftCreationTime, 4) - TEST_FIELD_OFFSET(WIN32_FILE_ATTRIBUTE_DATA, ftCreationTime, 4) - TEST_FIELD_SIZE (WIN32_FILE_ATTRIBUTE_DATA, ftLastAccessTime, 8) - TEST_FIELD_ALIGN (WIN32_FILE_ATTRIBUTE_DATA, ftLastAccessTime, 4) - TEST_FIELD_OFFSET(WIN32_FILE_ATTRIBUTE_DATA, ftLastAccessTime, 12) - TEST_FIELD_SIZE (WIN32_FILE_ATTRIBUTE_DATA, ftLastWriteTime, 8) - TEST_FIELD_ALIGN (WIN32_FILE_ATTRIBUTE_DATA, ftLastWriteTime, 4) - TEST_FIELD_OFFSET(WIN32_FILE_ATTRIBUTE_DATA, ftLastWriteTime, 20) - TEST_FIELD_SIZE (WIN32_FILE_ATTRIBUTE_DATA, nFileSizeHigh, 4) - TEST_FIELD_ALIGN (WIN32_FILE_ATTRIBUTE_DATA, nFileSizeHigh, 4) - TEST_FIELD_OFFSET(WIN32_FILE_ATTRIBUTE_DATA, nFileSizeHigh, 28) - TEST_FIELD_SIZE (WIN32_FILE_ATTRIBUTE_DATA, nFileSizeLow, 4) - TEST_FIELD_ALIGN (WIN32_FILE_ATTRIBUTE_DATA, nFileSizeLow, 4) - TEST_FIELD_OFFSET(WIN32_FILE_ATTRIBUTE_DATA, nFileSizeLow, 32) -} - -static void test_pack_WIN32_FIND_DATAA(void) -{ - /* WIN32_FIND_DATAA */ - TEST_TYPE_SIZE (WIN32_FIND_DATAA, 320) - TEST_TYPE_ALIGN (WIN32_FIND_DATAA, 4) - TEST_FIELD_SIZE (WIN32_FIND_DATAA, dwFileAttributes, 4) - TEST_FIELD_ALIGN (WIN32_FIND_DATAA, dwFileAttributes, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAA, dwFileAttributes, 0) - TEST_FIELD_SIZE (WIN32_FIND_DATAA, ftCreationTime, 8) - TEST_FIELD_ALIGN (WIN32_FIND_DATAA, ftCreationTime, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAA, ftCreationTime, 4) - TEST_FIELD_SIZE (WIN32_FIND_DATAA, ftLastAccessTime, 8) - TEST_FIELD_ALIGN (WIN32_FIND_DATAA, ftLastAccessTime, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAA, ftLastAccessTime, 12) - TEST_FIELD_SIZE (WIN32_FIND_DATAA, ftLastWriteTime, 8) - TEST_FIELD_ALIGN (WIN32_FIND_DATAA, ftLastWriteTime, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAA, ftLastWriteTime, 20) - TEST_FIELD_SIZE (WIN32_FIND_DATAA, nFileSizeHigh, 4) - TEST_FIELD_ALIGN (WIN32_FIND_DATAA, nFileSizeHigh, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAA, nFileSizeHigh, 28) - TEST_FIELD_SIZE (WIN32_FIND_DATAA, nFileSizeLow, 4) - TEST_FIELD_ALIGN (WIN32_FIND_DATAA, nFileSizeLow, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAA, nFileSizeLow, 32) - TEST_FIELD_SIZE (WIN32_FIND_DATAA, dwReserved0, 4) - TEST_FIELD_ALIGN (WIN32_FIND_DATAA, dwReserved0, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAA, dwReserved0, 36) - TEST_FIELD_SIZE (WIN32_FIND_DATAA, dwReserved1, 4) - TEST_FIELD_ALIGN (WIN32_FIND_DATAA, dwReserved1, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAA, dwReserved1, 40) - TEST_FIELD_SIZE (WIN32_FIND_DATAA, cFileName, 260) - TEST_FIELD_ALIGN (WIN32_FIND_DATAA, cFileName, 1) - TEST_FIELD_OFFSET(WIN32_FIND_DATAA, cFileName, 44) - TEST_FIELD_SIZE (WIN32_FIND_DATAA, cAlternateFileName, 14) - TEST_FIELD_ALIGN (WIN32_FIND_DATAA, cAlternateFileName, 1) - TEST_FIELD_OFFSET(WIN32_FIND_DATAA, cAlternateFileName, 304) -} - -static void test_pack_WIN32_FIND_DATAW(void) -{ - /* WIN32_FIND_DATAW */ - TEST_TYPE_SIZE (WIN32_FIND_DATAW, 592) - TEST_TYPE_ALIGN (WIN32_FIND_DATAW, 4) - TEST_FIELD_SIZE (WIN32_FIND_DATAW, dwFileAttributes, 4) - TEST_FIELD_ALIGN (WIN32_FIND_DATAW, dwFileAttributes, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAW, dwFileAttributes, 0) - TEST_FIELD_SIZE (WIN32_FIND_DATAW, ftCreationTime, 8) - TEST_FIELD_ALIGN (WIN32_FIND_DATAW, ftCreationTime, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAW, ftCreationTime, 4) - TEST_FIELD_SIZE (WIN32_FIND_DATAW, ftLastAccessTime, 8) - TEST_FIELD_ALIGN (WIN32_FIND_DATAW, ftLastAccessTime, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAW, ftLastAccessTime, 12) - TEST_FIELD_SIZE (WIN32_FIND_DATAW, ftLastWriteTime, 8) - TEST_FIELD_ALIGN (WIN32_FIND_DATAW, ftLastWriteTime, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAW, ftLastWriteTime, 20) - TEST_FIELD_SIZE (WIN32_FIND_DATAW, nFileSizeHigh, 4) - TEST_FIELD_ALIGN (WIN32_FIND_DATAW, nFileSizeHigh, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAW, nFileSizeHigh, 28) - TEST_FIELD_SIZE (WIN32_FIND_DATAW, nFileSizeLow, 4) - TEST_FIELD_ALIGN (WIN32_FIND_DATAW, nFileSizeLow, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAW, nFileSizeLow, 32) - TEST_FIELD_SIZE (WIN32_FIND_DATAW, dwReserved0, 4) - TEST_FIELD_ALIGN (WIN32_FIND_DATAW, dwReserved0, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAW, dwReserved0, 36) - TEST_FIELD_SIZE (WIN32_FIND_DATAW, dwReserved1, 4) - TEST_FIELD_ALIGN (WIN32_FIND_DATAW, dwReserved1, 4) - TEST_FIELD_OFFSET(WIN32_FIND_DATAW, dwReserved1, 40) - TEST_FIELD_SIZE (WIN32_FIND_DATAW, cFileName, 520) - TEST_FIELD_ALIGN (WIN32_FIND_DATAW, cFileName, 2) - TEST_FIELD_OFFSET(WIN32_FIND_DATAW, cFileName, 44) - TEST_FIELD_SIZE (WIN32_FIND_DATAW, cAlternateFileName, 28) - TEST_FIELD_ALIGN (WIN32_FIND_DATAW, cAlternateFileName, 2) - TEST_FIELD_OFFSET(WIN32_FIND_DATAW, cAlternateFileName, 564) -} - -static void test_pack_WIN32_STREAM_ID(void) -{ - /* WIN32_STREAM_ID (pack 8) */ - TEST_TYPE_SIZE (WIN32_STREAM_ID, 24) - TEST_TYPE_ALIGN (WIN32_STREAM_ID, 8) - TEST_FIELD_SIZE (WIN32_STREAM_ID, dwStreamId, 4) - TEST_FIELD_ALIGN (WIN32_STREAM_ID, dwStreamId, 4) - TEST_FIELD_OFFSET(WIN32_STREAM_ID, dwStreamId, 0) - TEST_FIELD_SIZE (WIN32_STREAM_ID, dwStreamAttributes, 4) - TEST_FIELD_ALIGN (WIN32_STREAM_ID, dwStreamAttributes, 4) - TEST_FIELD_OFFSET(WIN32_STREAM_ID, dwStreamAttributes, 4) - TEST_FIELD_SIZE (WIN32_STREAM_ID, Size, 8) - TEST_FIELD_ALIGN (WIN32_STREAM_ID, Size, 8) - TEST_FIELD_OFFSET(WIN32_STREAM_ID, Size, 8) - TEST_FIELD_SIZE (WIN32_STREAM_ID, dwStreamNameSize, 4) - TEST_FIELD_ALIGN (WIN32_STREAM_ID, dwStreamNameSize, 4) - TEST_FIELD_OFFSET(WIN32_STREAM_ID, dwStreamNameSize, 16) - TEST_FIELD_SIZE (WIN32_STREAM_ID, cStreamName, 2) - TEST_FIELD_ALIGN (WIN32_STREAM_ID, cStreamName, 2) - TEST_FIELD_OFFSET(WIN32_STREAM_ID, cStreamName, 20) -} - -#endif /* _WIN64 */ - -static void test_pack(void) -{ - test_pack_ACTCTXA(); - test_pack_ACTCTXW(); - test_pack_ACTCTX_SECTION_KEYED_DATA(); - test_pack_ACTCTX_SECTION_KEYED_DATA_2600(); - test_pack_ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA(); - test_pack_ACTIVATION_CONTEXT_BASIC_INFORMATION(); - test_pack_BY_HANDLE_FILE_INFORMATION(); - test_pack_COMMCONFIG(); - test_pack_COMMPROP(); - test_pack_COMMTIMEOUTS(); - test_pack_COMSTAT(); - test_pack_CREATE_PROCESS_DEBUG_INFO(); - test_pack_CREATE_THREAD_DEBUG_INFO(); - test_pack_CRITICAL_SECTION(); - test_pack_CRITICAL_SECTION_DEBUG(); - test_pack_DCB(); - test_pack_DEBUG_EVENT(); - test_pack_ENUMRESLANGPROCA(); - test_pack_ENUMRESLANGPROCW(); - test_pack_ENUMRESNAMEPROCA(); - test_pack_ENUMRESNAMEPROCW(); - test_pack_ENUMRESTYPEPROCA(); - test_pack_ENUMRESTYPEPROCW(); - test_pack_EXCEPTION_DEBUG_INFO(); - test_pack_EXIT_PROCESS_DEBUG_INFO(); - test_pack_EXIT_THREAD_DEBUG_INFO(); - test_pack_HW_PROFILE_INFOA(); - test_pack_HW_PROFILE_INFOW(); - test_pack_LOAD_DLL_DEBUG_INFO(); - test_pack_LPBY_HANDLE_FILE_INFORMATION(); - test_pack_LPCOMMCONFIG(); - test_pack_LPCOMMPROP(); - test_pack_LPCOMMTIMEOUTS(); - test_pack_LPCOMSTAT(); - test_pack_LPCRITICAL_SECTION(); - test_pack_LPCRITICAL_SECTION_DEBUG(); - test_pack_LPDCB(); - test_pack_LPDEBUG_EVENT(); - test_pack_LPEXCEPTION_POINTERS(); - test_pack_LPEXCEPTION_RECORD(); - test_pack_LPFIBER_START_ROUTINE(); - test_pack_LPHW_PROFILE_INFOA(); - test_pack_LPHW_PROFILE_INFOW(); - test_pack_LPLONG(); - test_pack_LPMEMORYSTATUS(); - test_pack_LPMEMORYSTATUSEX(); - test_pack_LPOFSTRUCT(); - test_pack_LPOSVERSIONINFOA(); - test_pack_LPOSVERSIONINFOEXA(); - test_pack_LPOSVERSIONINFOEXW(); - test_pack_LPOSVERSIONINFOW(); - test_pack_LPOVERLAPPED(); - test_pack_LPOVERLAPPED_COMPLETION_ROUTINE(); - test_pack_LPPROCESS_HEAP_ENTRY(); - test_pack_LPPROCESS_INFORMATION(); - test_pack_LPPROGRESS_ROUTINE(); - test_pack_LPSECURITY_ATTRIBUTES(); - test_pack_LPSTARTUPINFOA(); - test_pack_LPSTARTUPINFOW(); - test_pack_LPSYSTEMTIME(); - test_pack_LPSYSTEM_INFO(); - test_pack_LPSYSTEM_POWER_STATUS(); - test_pack_LPTHREAD_START_ROUTINE(); - test_pack_LPTIME_ZONE_INFORMATION(); - test_pack_LPVOID(); - test_pack_LPWIN32_FILE_ATTRIBUTE_DATA(); - test_pack_LPWIN32_FIND_DATAA(); - test_pack_LPWIN32_FIND_DATAW(); - test_pack_LPWIN32_STREAM_ID(); - test_pack_MEMORYSTATUS(); - test_pack_MEMORYSTATUSEX(); - test_pack_OFSTRUCT(); - test_pack_OSVERSIONINFOA(); - test_pack_OSVERSIONINFOEXA(); - test_pack_OSVERSIONINFOEXW(); - test_pack_OSVERSIONINFOW(); - test_pack_OUTPUT_DEBUG_STRING_INFO(); - test_pack_PACTCTXA(); - test_pack_PACTCTXW(); - test_pack_PACTCTX_SECTION_KEYED_DATA(); - test_pack_PACTCTX_SECTION_KEYED_DATA_2600(); - test_pack_PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA(); - test_pack_PACTIVATION_CONTEXT_BASIC_INFORMATION(); - test_pack_PAPCFUNC(); - test_pack_PBY_HANDLE_FILE_INFORMATION(); - test_pack_PCACTCTXA(); - test_pack_PCACTCTXW(); - test_pack_PCACTCTX_SECTION_KEYED_DATA(); - test_pack_PCACTCTX_SECTION_KEYED_DATA_2600(); - test_pack_PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA(); - test_pack_PCRITICAL_SECTION(); - test_pack_PCRITICAL_SECTION_DEBUG(); - test_pack_PFIBER_START_ROUTINE(); - test_pack_PHKEY(); - test_pack_POFSTRUCT(); - test_pack_POSVERSIONINFOA(); - test_pack_POSVERSIONINFOEXA(); - test_pack_POSVERSIONINFOEXW(); - test_pack_POSVERSIONINFOW(); - test_pack_PPROCESS_HEAP_ENTRY(); - test_pack_PPROCESS_INFORMATION(); - test_pack_PQUERYACTCTXW_FUNC(); - test_pack_PROCESS_HEAP_ENTRY(); - test_pack_PROCESS_INFORMATION(); - test_pack_PSECURITY_ATTRIBUTES(); - test_pack_PSYSTEMTIME(); - test_pack_PTIMERAPCROUTINE(); - test_pack_PTIME_ZONE_INFORMATION(); - test_pack_PWIN32_FIND_DATAA(); - test_pack_PWIN32_FIND_DATAW(); - test_pack_RIP_INFO(); - test_pack_SECURITY_ATTRIBUTES(); - test_pack_STARTUPINFOA(); - test_pack_STARTUPINFOW(); - test_pack_SYSTEMTIME(); - test_pack_SYSTEM_INFO(); - test_pack_SYSTEM_POWER_STATUS(); - test_pack_TIME_ZONE_INFORMATION(); - test_pack_UNLOAD_DLL_DEBUG_INFO(); - test_pack_WAITORTIMERCALLBACK(); - test_pack_WIN32_FILE_ATTRIBUTE_DATA(); - test_pack_WIN32_FIND_DATAA(); - test_pack_WIN32_FIND_DATAW(); - test_pack_WIN32_STREAM_ID(); -} - -START_TEST(generated) -{ - test_pack(); -} diff --git a/rostests/winetests/kernel32/heap.c b/rostests/winetests/kernel32/heap.c deleted file mode 100755 index 634e14d9cd2..00000000000 --- a/rostests/winetests/kernel32/heap.c +++ /dev/null @@ -1,871 +0,0 @@ -/* - * Unit test suite for heap functions - * - * Copyright 2003 Dimitrie O. Paun - * Copyright 2006 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 -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "winternl.h" -#include "wine/test.h" - -#define MAGIC_DEAD 0xdeadbeef - -/* some undocumented flags (names are made up) */ -#define HEAP_PAGE_ALLOCS 0x01000000 -#define HEAP_VALIDATE 0x10000000 -#define HEAP_VALIDATE_ALL 0x20000000 -#define HEAP_VALIDATE_PARAMS 0x40000000 - -static BOOL (WINAPI *pHeapQueryInformation)(HANDLE, HEAP_INFORMATION_CLASS, PVOID, SIZE_T, PSIZE_T); -static ULONG (WINAPI *pRtlGetNtGlobalFlags)(void); - -struct heap_layout -{ - DWORD_PTR unknown[2]; - DWORD pattern; - DWORD flags; - DWORD force_flags; -}; - -static SIZE_T resize_9x(SIZE_T size) -{ - DWORD dwSizeAligned = (size + 3) & ~3; - return max(dwSizeAligned, 12); /* at least 12 bytes */ -} - -static void test_sized_HeapAlloc(int nbytes) -{ - int success; - char *buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, nbytes); - ok(buf != NULL, "allocate failed\n"); - ok(buf[0] == 0, "buffer not zeroed\n"); - success = HeapFree(GetProcessHeap(), 0, buf); - ok(success, "free failed\n"); -} - -static void test_sized_HeapReAlloc(int nbytes1, int nbytes2) -{ - int success; - char *buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, nbytes1); - ok(buf != NULL, "allocate failed\n"); - ok(buf[0] == 0, "buffer not zeroed\n"); - buf = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, buf, nbytes2); - ok(buf != NULL, "reallocate failed\n"); - ok(buf[nbytes2-1] == 0, "buffer not zeroed\n"); - success = HeapFree(GetProcessHeap(), 0, buf); - ok(success, "free failed\n"); -} - -static void test_heap(void) -{ - LPVOID mem; - LPVOID msecond; - DWORD res; - UINT flags; - HGLOBAL gbl; - HGLOBAL hsecond; - SIZE_T size, size2; - - /* Heap*() functions */ - mem = HeapAlloc(GetProcessHeap(), 0, 0); - ok(mem != NULL, "memory not allocated for size 0\n"); - HeapFree(GetProcessHeap(), 0, mem); - - mem = HeapReAlloc(GetProcessHeap(), 0, NULL, 10); - ok(mem == NULL, "memory allocated by HeapReAlloc\n"); - - for (size = 0; size <= 256; size++) - { - SIZE_T heap_size; - mem = HeapAlloc(GetProcessHeap(), 0, size); - heap_size = HeapSize(GetProcessHeap(), 0, mem); - ok(heap_size == size || heap_size == resize_9x(size), - "HeapSize returned %lu instead of %lu or %lu\n", heap_size, size, resize_9x(size)); - HeapFree(GetProcessHeap(), 0, mem); - } - - /* test some border cases of HeapAlloc and HeapReAlloc */ - mem = HeapAlloc(GetProcessHeap(), 0, 0); - ok(mem != NULL, "memory not allocated for size 0\n"); - msecond = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, ~(SIZE_T)0 - 7); - ok(msecond == NULL, "HeapReAlloc(~0 - 7) should have failed\n"); - msecond = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, ~(SIZE_T)0); - ok(msecond == NULL, "HeapReAlloc(~0) should have failed\n"); - HeapFree(GetProcessHeap(), 0, mem); - mem = HeapAlloc(GetProcessHeap(), 0, ~(SIZE_T)0); - ok(mem == NULL, "memory allocated for size ~0\n"); - - /* large blocks must be 16-byte aligned */ - mem = HeapAlloc(GetProcessHeap(), 0, 512 * 1024); - ok( mem != NULL, "failed for size 512K\n" ); - ok( (ULONG_PTR)mem % 16 == 0 || broken((ULONG_PTR)mem % 16) /* win9x */, - "512K block not 16-byte aligned\n" ); - HeapFree(GetProcessHeap(), 0, mem); - - /* Global*() functions */ - gbl = GlobalAlloc(GMEM_MOVEABLE, 0); - ok(gbl != NULL, "global memory not allocated for size 0\n"); - - gbl = GlobalReAlloc(gbl, 10, GMEM_MOVEABLE); - ok(gbl != NULL, "Can't realloc global memory\n"); - size = GlobalSize(gbl); - ok(size >= 10 && size <= 16, "Memory not resized to size 10, instead size=%ld\n", size); - - gbl = GlobalReAlloc(gbl, 0, GMEM_MOVEABLE); - ok(gbl != NULL, "GlobalReAlloc should not fail on size 0\n"); - - size = GlobalSize(gbl); - ok(size == 0, "Memory not resized to size 0, instead size=%ld\n", size); - ok(GlobalFree(gbl) == NULL, "Memory not freed\n"); - size = GlobalSize(gbl); - ok(size == 0, "Memory should have been freed, size=%ld\n", size); - - gbl = GlobalReAlloc(0, 10, GMEM_MOVEABLE); - ok(gbl == NULL, "global realloc allocated memory\n"); - - /* GlobalLock / GlobalUnlock with a valid handle */ - gbl = GlobalAlloc(GMEM_MOVEABLE, 256); - - SetLastError(MAGIC_DEAD); - mem = GlobalLock(gbl); /* #1 */ - ok(mem != NULL, "returned %p with %d (expected '!= NULL')\n", mem, GetLastError()); - SetLastError(MAGIC_DEAD); - flags = GlobalFlags(gbl); - ok( flags == 1, "returned 0x%04x with %d (expected '0x0001')\n", - flags, GetLastError()); - - SetLastError(MAGIC_DEAD); - msecond = GlobalLock(gbl); /* #2 */ - ok( msecond == mem, "returned %p with %d (expected '%p')\n", - msecond, GetLastError(), mem); - SetLastError(MAGIC_DEAD); - flags = GlobalFlags(gbl); - ok( flags == 2, "returned 0x%04x with %d (expected '0x0002')\n", - flags, GetLastError()); - SetLastError(MAGIC_DEAD); - - SetLastError(MAGIC_DEAD); - res = GlobalUnlock(gbl); /* #1 */ - ok(res, "returned %d with %d (expected '!= 0')\n", res, GetLastError()); - SetLastError(MAGIC_DEAD); - flags = GlobalFlags(gbl); - ok( flags , "returned 0x%04x with %d (expected '!= 0')\n", - flags, GetLastError()); - - SetLastError(MAGIC_DEAD); - res = GlobalUnlock(gbl); /* #0 */ - /* NT: ERROR_SUCCESS (documented on MSDN), 9x: untouched */ - ok(!res && ((GetLastError() == ERROR_SUCCESS) || (GetLastError() == MAGIC_DEAD)), - "returned %d with %d (expected '0' with: ERROR_SUCCESS or " - "MAGIC_DEAD)\n", res, GetLastError()); - SetLastError(MAGIC_DEAD); - flags = GlobalFlags(gbl); - ok( !flags , "returned 0x%04x with %d (expected '0')\n", - flags, GetLastError()); - - /* Unlock an already unlocked Handle */ - SetLastError(MAGIC_DEAD); - res = GlobalUnlock(gbl); - /* NT: ERROR_NOT_LOCKED, 9x: untouched */ - ok( !res && - ((GetLastError() == ERROR_NOT_LOCKED) || (GetLastError() == MAGIC_DEAD)), - "returned %d with %d (expected '0' with: ERROR_NOT_LOCKED or " - "MAGIC_DEAD)\n", res, GetLastError()); - - GlobalFree(gbl); - /* invalid handles are caught in windows: */ - SetLastError(MAGIC_DEAD); - hsecond = GlobalFree(gbl); /* invalid handle: free memory twice */ - ok( (hsecond == gbl) && (GetLastError() == ERROR_INVALID_HANDLE), - "returned %p with 0x%08x (expected %p with ERROR_INVALID_HANDLE)\n", - hsecond, GetLastError(), gbl); - SetLastError(MAGIC_DEAD); - flags = GlobalFlags(gbl); - ok( (flags == GMEM_INVALID_HANDLE) && (GetLastError() == ERROR_INVALID_HANDLE), - "returned 0x%04x with 0x%08x (expected GMEM_INVALID_HANDLE with " - "ERROR_INVALID_HANDLE)\n", flags, GetLastError()); - SetLastError(MAGIC_DEAD); - size = GlobalSize(gbl); - ok( (size == 0) && (GetLastError() == ERROR_INVALID_HANDLE), - "returned %ld with 0x%08x (expected '0' with ERROR_INVALID_HANDLE)\n", - size, GetLastError()); - - SetLastError(MAGIC_DEAD); - mem = GlobalLock(gbl); - ok( (mem == NULL) && (GetLastError() == ERROR_INVALID_HANDLE), - "returned %p with 0x%08x (expected NULL with ERROR_INVALID_HANDLE)\n", - mem, GetLastError()); - - /* documented on MSDN: GlobalUnlock() return FALSE on failure. - Win9x and wine return FALSE with ERROR_INVALID_HANDLE, but on - NT 3.51 and XPsp2, TRUE with ERROR_INVALID_HANDLE is returned. - The similar Test for LocalUnlock() works on all Systems */ - SetLastError(MAGIC_DEAD); - res = GlobalUnlock(gbl); - ok(GetLastError() == ERROR_INVALID_HANDLE, - "returned %d with %d (expected ERROR_INVALID_HANDLE)\n", - res, GetLastError()); - - gbl = GlobalAlloc(GMEM_DDESHARE, 100); - - /* first free */ - mem = GlobalFree(gbl); - ok(mem == NULL, "Expected NULL, got %p\n", mem); - - /* invalid free */ - if (sizeof(void *) != 8) /* crashes on 64-bit Vista */ - { - SetLastError(MAGIC_DEAD); - mem = GlobalFree(gbl); - ok(mem == gbl || broken(mem == NULL) /* nt4 */, "Expected gbl, got %p\n", mem); - if (mem == gbl) - ok(GetLastError() == ERROR_INVALID_HANDLE || - GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ - "Expected ERROR_INVALID_HANDLE or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - } - - gbl = GlobalAlloc(GMEM_DDESHARE, 100); - - res = GlobalUnlock(gbl); - ok(res == 1 || - broken(res == 0), /* win9x */ - "Expected 1 or 0, got %d\n", res); - - res = GlobalUnlock(gbl); - ok(res == 1 || - broken(res == 0), /* win9x */ - "Expected 1 or 0, got %d\n", res); - - GlobalFree(gbl); - - gbl = GlobalAlloc(GMEM_FIXED, 100); - - SetLastError(0xdeadbeef); - res = GlobalUnlock(gbl); - ok(res == 1 || - broken(res == 0), /* win9x */ - "Expected 1 or 0, got %d\n", res); - ok(GetLastError() == 0xdeadbeef, "got %d\n", GetLastError()); - - GlobalFree(gbl); - - /* GlobalSize on an invalid handle */ - if (sizeof(void *) != 8) /* crashes on 64-bit Vista */ - { - SetLastError(MAGIC_DEAD); - size = GlobalSize((HGLOBAL)0xc042); - ok(size == 0, "Expected 0, got %ld\n", size); - ok(GetLastError() == ERROR_INVALID_HANDLE || - GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ - "Expected ERROR_INVALID_HANDLE or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - } - - /* ####################################### */ - /* Local*() functions */ - gbl = LocalAlloc(LMEM_MOVEABLE, 0); - ok(gbl != NULL, "local memory not allocated for size 0\n"); - - gbl = LocalReAlloc(gbl, 10, LMEM_MOVEABLE); - ok(gbl != NULL, "Can't realloc local memory\n"); - size = LocalSize(gbl); - ok(size >= 10 && size <= 16, "Memory not resized to size 10, instead size=%ld\n", size); - - gbl = LocalReAlloc(gbl, 0, LMEM_MOVEABLE); - ok(gbl != NULL, "LocalReAlloc should not fail on size 0\n"); - - size = LocalSize(gbl); - ok(size == 0, "Memory not resized to size 0, instead size=%ld\n", size); - ok(LocalFree(gbl) == NULL, "Memory not freed\n"); - size = LocalSize(gbl); - ok(size == 0, "Memory should have been freed, size=%ld\n", size); - - gbl = LocalReAlloc(0, 10, LMEM_MOVEABLE); - ok(gbl == NULL, "local realloc allocated memory\n"); - - /* LocalLock / LocalUnlock with a valid handle */ - gbl = LocalAlloc(LMEM_MOVEABLE, 256); - SetLastError(MAGIC_DEAD); - mem = LocalLock(gbl); /* #1 */ - ok(mem != NULL, "returned %p with %d (expected '!= NULL')\n", mem, GetLastError()); - SetLastError(MAGIC_DEAD); - flags = LocalFlags(gbl); - ok( flags == 1, "returned 0x%04x with %d (expected '0x0001')\n", - flags, GetLastError()); - - SetLastError(MAGIC_DEAD); - msecond = LocalLock(gbl); /* #2 */ - ok( msecond == mem, "returned %p with %d (expected '%p')\n", - msecond, GetLastError(), mem); - SetLastError(MAGIC_DEAD); - flags = LocalFlags(gbl); - ok( flags == 2, "returned 0x%04x with %d (expected '0x0002')\n", - flags, GetLastError()); - SetLastError(MAGIC_DEAD); - - SetLastError(MAGIC_DEAD); - res = LocalUnlock(gbl); /* #1 */ - ok(res, "returned %d with %d (expected '!= 0')\n", res, GetLastError()); - SetLastError(MAGIC_DEAD); - flags = LocalFlags(gbl); - ok( flags , "returned 0x%04x with %d (expected '!= 0')\n", - flags, GetLastError()); - - SetLastError(MAGIC_DEAD); - res = LocalUnlock(gbl); /* #0 */ - /* NT: ERROR_SUCCESS (documented on MSDN), 9x: untouched */ - ok(!res && ((GetLastError() == ERROR_SUCCESS) || (GetLastError() == MAGIC_DEAD)), - "returned %d with %d (expected '0' with: ERROR_SUCCESS or " - "MAGIC_DEAD)\n", res, GetLastError()); - SetLastError(MAGIC_DEAD); - flags = LocalFlags(gbl); - ok( !flags , "returned 0x%04x with %d (expected '0')\n", - flags, GetLastError()); - - /* Unlock an already unlocked Handle */ - SetLastError(MAGIC_DEAD); - res = LocalUnlock(gbl); - /* NT: ERROR_NOT_LOCKED, 9x: untouched */ - ok( !res && - ((GetLastError() == ERROR_NOT_LOCKED) || (GetLastError() == MAGIC_DEAD)), - "returned %d with %d (expected '0' with: ERROR_NOT_LOCKED or " - "MAGIC_DEAD)\n", res, GetLastError()); - - LocalFree(gbl); - /* invalid handles are caught in windows: */ - SetLastError(MAGIC_DEAD); - hsecond = LocalFree(gbl); /* invalid handle: free memory twice */ - ok( (hsecond == gbl) && (GetLastError() == ERROR_INVALID_HANDLE), - "returned %p with 0x%08x (expected %p with ERROR_INVALID_HANDLE)\n", - hsecond, GetLastError(), gbl); - SetLastError(MAGIC_DEAD); - flags = LocalFlags(gbl); - ok( (flags == LMEM_INVALID_HANDLE) && (GetLastError() == ERROR_INVALID_HANDLE), - "returned 0x%04x with 0x%08x (expected LMEM_INVALID_HANDLE with " - "ERROR_INVALID_HANDLE)\n", flags, GetLastError()); - SetLastError(MAGIC_DEAD); - size = LocalSize(gbl); - ok( (size == 0) && (GetLastError() == ERROR_INVALID_HANDLE), - "returned %ld with 0x%08x (expected '0' with ERROR_INVALID_HANDLE)\n", - size, GetLastError()); - - SetLastError(MAGIC_DEAD); - mem = LocalLock(gbl); - ok( (mem == NULL) && (GetLastError() == ERROR_INVALID_HANDLE), - "returned %p with 0x%08x (expected NULL with ERROR_INVALID_HANDLE)\n", - mem, GetLastError()); - - /* This Test works the same on all Systems (GlobalUnlock() is different) */ - SetLastError(MAGIC_DEAD); - res = LocalUnlock(gbl); - ok(!res && (GetLastError() == ERROR_INVALID_HANDLE), - "returned %d with %d (expected '0' with ERROR_INVALID_HANDLE)\n", - res, GetLastError()); - - /* trying to unlock pointer from LocalAlloc */ - gbl = LocalAlloc(LMEM_FIXED, 100); - SetLastError(0xdeadbeef); - res = LocalUnlock(gbl); - ok(res == 0, "Expected 0, got %d\n", res); - ok(GetLastError() == ERROR_NOT_LOCKED || - broken(GetLastError() == 0xdeadbeef) /* win9x */, "got %d\n", GetLastError()); - LocalFree(gbl); - - /* trying to lock empty memory should give an error */ - gbl = GlobalAlloc(GMEM_MOVEABLE|GMEM_ZEROINIT,0); - ok(gbl != NULL, "returned NULL\n"); - SetLastError(MAGIC_DEAD); - mem = GlobalLock(gbl); - /* NT: ERROR_DISCARDED, 9x: untouched */ - ok( (mem == NULL) && - ((GetLastError() == ERROR_DISCARDED) || (GetLastError() == MAGIC_DEAD)), - "returned %p with 0x%x/%d (expected 'NULL' with: ERROR_DISCARDED or " - "MAGIC_DEAD)\n", mem, GetLastError(), GetLastError()); - - GlobalFree(gbl); - - /* trying to get size from data pointer (GMEM_MOVEABLE) */ - gbl = GlobalAlloc(GMEM_MOVEABLE, 0x123); - ok(gbl != NULL, "returned NULL\n"); - mem = GlobalLock(gbl); - ok(mem != NULL, "returned NULL.\n"); - ok(gbl != mem, "unexpectedly equal.\n"); - - size = GlobalSize(gbl); - size2 = GlobalSize(mem); - ok(size == 0x123, "got %lu\n", size); - ok(size2 == 0x123, "got %lu\n", size2); - - GlobalFree(gbl); - - /* trying to get size from data pointer (GMEM_FIXED) */ - gbl = GlobalAlloc(GMEM_FIXED, 0x123); - ok(gbl != NULL, "returned NULL\n"); - mem = GlobalLock(gbl); - ok(mem != NULL, "returned NULL.\n"); - ok(gbl == mem, "got %p, %p.\n", gbl, mem); - - size = GlobalSize(gbl); - ok(size == 0x123, "got %lu\n", size); - - GlobalFree(gbl); - - size = GlobalSize((void *)0xdeadbee0); - ok(size == 0, "got %lu\n", size); - -} - -static void test_obsolete_flags(void) -{ - static struct { - UINT flags; - UINT globalflags; - } test_global_flags[] = { - {GMEM_FIXED | GMEM_NOTIFY, 0}, - {GMEM_FIXED | GMEM_DISCARDABLE, 0}, - {GMEM_MOVEABLE | GMEM_NOTIFY, 0}, - {GMEM_MOVEABLE | GMEM_DDESHARE, GMEM_DDESHARE}, - {GMEM_MOVEABLE | GMEM_NOT_BANKED, 0}, - {GMEM_MOVEABLE | GMEM_NODISCARD, 0}, - {GMEM_MOVEABLE | GMEM_DISCARDABLE, GMEM_DISCARDABLE}, - {GMEM_MOVEABLE | GMEM_DDESHARE | GMEM_DISCARDABLE | GMEM_LOWER | GMEM_NOCOMPACT | GMEM_NODISCARD | - GMEM_NOT_BANKED | GMEM_NOTIFY, GMEM_DDESHARE | GMEM_DISCARDABLE}, - }; - - unsigned int i; - HGLOBAL gbl; - UINT resultflags; - - UINT (WINAPI *pGlobalFlags)(HGLOBAL); - - pGlobalFlags = (void *) GetProcAddress(GetModuleHandleA("kernel32"), "GlobalFlags"); - - if (!pGlobalFlags) - { - win_skip("GlobalFlags is not available\n"); - return; - } - - for (i = 0; i < sizeof(test_global_flags)/sizeof(test_global_flags[0]); i++) - { - gbl = GlobalAlloc(test_global_flags[i].flags, 4); - ok(gbl != NULL, "GlobalAlloc failed\n"); - - SetLastError(MAGIC_DEAD); - resultflags = pGlobalFlags(gbl); - - ok( resultflags == test_global_flags[i].globalflags || - broken(resultflags == (test_global_flags[i].globalflags & ~GMEM_DDESHARE)), /* win9x */ - "%u: expected 0x%08x, but returned 0x%08x with %d\n", - i, test_global_flags[i].globalflags, resultflags, GetLastError() ); - - GlobalFree(gbl); - } -} - -static void test_HeapQueryInformation(void) -{ - ULONG info; - SIZE_T size; - BOOL ret; - - pHeapQueryInformation = (void *)GetProcAddress(GetModuleHandle("kernel32.dll"), "HeapQueryInformation"); - if (!pHeapQueryInformation) - { - win_skip("HeapQueryInformation is not available\n"); - return; - } - - if (0) /* crashes under XP */ - { - size = 0; - pHeapQueryInformation(0, - HeapCompatibilityInformation, - &info, sizeof(info), &size); - size = 0; - pHeapQueryInformation(GetProcessHeap(), - HeapCompatibilityInformation, - NULL, sizeof(info), &size); - } - - size = 0; - SetLastError(0xdeadbeef); - ret = pHeapQueryInformation(GetProcessHeap(), - HeapCompatibilityInformation, - NULL, 0, &size); - ok(!ret, "HeapQueryInformation should fail\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "expected ERROR_INSUFFICIENT_BUFFER got %u\n", GetLastError()); - ok(size == sizeof(ULONG), "expected 4, got %lu\n", size); - - SetLastError(0xdeadbeef); - ret = pHeapQueryInformation(GetProcessHeap(), - HeapCompatibilityInformation, - NULL, 0, NULL); - ok(!ret, "HeapQueryInformation should fail\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "expected ERROR_INSUFFICIENT_BUFFER got %u\n", GetLastError()); - - info = 0xdeadbeaf; - SetLastError(0xdeadbeef); - ret = pHeapQueryInformation(GetProcessHeap(), - HeapCompatibilityInformation, - &info, sizeof(info) + 1, NULL); - ok(ret, "HeapQueryInformation error %u\n", GetLastError()); - ok(info == 0 || info == 1 || info == 2, "expected 0, 1 or 2, got %u\n", info); -} - -static void test_heap_checks( DWORD flags ) -{ - BYTE old, *p, *p2; - BOOL ret; - SIZE_T i, size, large_size = 3000 * 1024 + 37; - - if (flags & HEAP_PAGE_ALLOCS) return; /* no tests for that case yet */ - trace( "testing heap flags %08x\n", flags ); - - p = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, 17 ); - ok( p != NULL, "HeapAlloc failed\n" ); - - ret = HeapValidate( GetProcessHeap(), 0, p ); - ok( ret, "HeapValidate failed\n" ); - - size = HeapSize( GetProcessHeap(), 0, p ); - ok( size == 17, "Wrong size %lu\n", size ); - - ok( p[14] == 0, "wrong data %x\n", p[14] ); - ok( p[15] == 0, "wrong data %x\n", p[15] ); - ok( p[16] == 0, "wrong data %x\n", p[16] ); - - if (flags & HEAP_TAIL_CHECKING_ENABLED) - { - ok( p[17] == 0xab, "wrong padding %x\n", p[17] ); - ok( p[18] == 0xab, "wrong padding %x\n", p[18] ); - ok( p[19] == 0xab, "wrong padding %x\n", p[19] ); - } - - p2 = HeapReAlloc( GetProcessHeap(), HEAP_REALLOC_IN_PLACE_ONLY, p, 14 ); - if (p2 == p) - { - if (flags & HEAP_TAIL_CHECKING_ENABLED) - { - ok( p[14] == 0xab, "wrong padding %x\n", p[14] ); - ok( p[15] == 0xab, "wrong padding %x\n", p[15] ); - ok( p[16] == 0xab, "wrong padding %x\n", p[16] ); - } - else - { - ok( p[14] == 0, "wrong padding %x\n", p[14] ); - ok( p[15] == 0, "wrong padding %x\n", p[15] ); - } - } - else skip( "realloc in place failed\n"); - - ret = HeapFree( GetProcessHeap(), 0, p ); - ok( ret, "HeapFree failed\n" ); - - p = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, 17 ); - ok( p != NULL, "HeapAlloc failed\n" ); - old = p[17]; - p[17] = 0xcc; - - if (flags & HEAP_TAIL_CHECKING_ENABLED) - { - ret = HeapValidate( GetProcessHeap(), 0, p ); - ok( !ret, "HeapValidate succeeded\n" ); - - /* other calls only check when HEAP_VALIDATE is set */ - if (flags & HEAP_VALIDATE) - { - size = HeapSize( GetProcessHeap(), 0, p ); - ok( size == ~(SIZE_T)0 || broken(size == ~0u), "Wrong size %lu\n", size ); - - p2 = HeapReAlloc( GetProcessHeap(), 0, p, 14 ); - ok( p2 == NULL, "HeapReAlloc succeeded\n" ); - - ret = HeapFree( GetProcessHeap(), 0, p ); - ok( !ret || broken(sizeof(void*) == 8), /* not caught on xp64 */ - "HeapFree succeeded\n" ); - } - - p[17] = old; - size = HeapSize( GetProcessHeap(), 0, p ); - ok( size == 17, "Wrong size %lu\n", size ); - - p2 = HeapReAlloc( GetProcessHeap(), 0, p, 14 ); - ok( p2 != NULL, "HeapReAlloc failed\n" ); - p = p2; - } - - ret = HeapFree( GetProcessHeap(), 0, p ); - ok( ret, "HeapFree failed\n" ); - - p = HeapAlloc( GetProcessHeap(), 0, 37 ); - ok( p != NULL, "HeapAlloc failed\n" ); - memset( p, 0xcc, 37 ); - - ret = HeapFree( GetProcessHeap(), 0, p ); - ok( ret, "HeapFree failed\n" ); - - if (flags & HEAP_FREE_CHECKING_ENABLED) - { - ok( p[16] == 0xee, "wrong data %x\n", p[16] ); - ok( p[17] == 0xfe, "wrong data %x\n", p[17] ); - ok( p[18] == 0xee, "wrong data %x\n", p[18] ); - ok( p[19] == 0xfe, "wrong data %x\n", p[19] ); - - ret = HeapValidate( GetProcessHeap(), 0, NULL ); - ok( ret, "HeapValidate failed\n" ); - - old = p[16]; - p[16] = 0xcc; - ret = HeapValidate( GetProcessHeap(), 0, NULL ); - ok( !ret, "HeapValidate succeeded\n" ); - - p[16] = old; - ret = HeapValidate( GetProcessHeap(), 0, NULL ); - ok( ret, "HeapValidate failed\n" ); - } - - /* now test large blocks */ - - p = HeapAlloc( GetProcessHeap(), 0, large_size ); - ok( p != NULL, "HeapAlloc failed\n" ); - - ret = HeapValidate( GetProcessHeap(), 0, p ); - ok( ret, "HeapValidate failed\n" ); - - size = HeapSize( GetProcessHeap(), 0, p ); - ok( size == large_size, "Wrong size %lu\n", size ); - - ok( p[large_size - 2] == 0, "wrong data %x\n", p[large_size - 2] ); - ok( p[large_size - 1] == 0, "wrong data %x\n", p[large_size - 1] ); - - if (flags & HEAP_TAIL_CHECKING_ENABLED) - { - /* Windows doesn't do tail checking on large blocks */ - ok( p[large_size] == 0xab || broken(p[large_size] == 0), "wrong data %x\n", p[large_size] ); - ok( p[large_size+1] == 0xab || broken(p[large_size+1] == 0), "wrong data %x\n", p[large_size+1] ); - ok( p[large_size+2] == 0xab || broken(p[large_size+2] == 0), "wrong data %x\n", p[large_size+2] ); - if (p[large_size] == 0xab) - { - p[large_size] = 0xcc; - ret = HeapValidate( GetProcessHeap(), 0, p ); - ok( !ret, "HeapValidate succeeded\n" ); - - /* other calls only check when HEAP_VALIDATE is set */ - if (flags & HEAP_VALIDATE) - { - size = HeapSize( GetProcessHeap(), 0, p ); - ok( size == ~(SIZE_T)0, "Wrong size %lu\n", size ); - - p2 = HeapReAlloc( GetProcessHeap(), 0, p, large_size - 3 ); - ok( p2 == NULL, "HeapReAlloc succeeded\n" ); - - ret = HeapFree( GetProcessHeap(), 0, p ); - ok( !ret, "HeapFree succeeded\n" ); - } - p[large_size] = 0xab; - } - } - - ret = HeapFree( GetProcessHeap(), 0, p ); - ok( ret, "HeapFree failed\n" ); - - /* test block sizes when tail checking */ - if (flags & HEAP_TAIL_CHECKING_ENABLED) - { - for (size = 0; size < 64; size++) - { - p = HeapAlloc( GetProcessHeap(), 0, size ); - for (i = 0; i < 32; i++) if (p[size + i] != 0xab) break; - ok( i >= 8, "only %lu tail bytes for size %lu\n", i, size ); - HeapFree( GetProcessHeap(), 0, p ); - } - } -} - -static void test_debug_heap( const char *argv0, DWORD flags ) -{ - char keyname[MAX_PATH]; - char buffer[MAX_PATH]; - PROCESS_INFORMATION info; - STARTUPINFOA startup; - BOOL ret; - DWORD err; - HKEY hkey; - const char *basename; - - if ((basename = strrchr( argv0, '\\' ))) basename++; - else basename = argv0; - - sprintf( keyname, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\%s", - basename ); - if (!strcmp( keyname + strlen(keyname) - 3, ".so" )) keyname[strlen(keyname) - 3] = 0; - - err = RegCreateKeyA( HKEY_LOCAL_MACHINE, keyname, &hkey ); - if (err == ERROR_ACCESS_DENIED) - { - skip("Not authorized to change the image file execution options\n"); - return; - } - ok( !err, "failed to create '%s' error %u\n", keyname, err ); - if (err) return; - - if (flags == 0xdeadbeef) /* magic value for unsetting it */ - RegDeleteValueA( hkey, "GlobalFlag" ); - else - RegSetValueExA( hkey, "GlobalFlag", 0, REG_DWORD, (BYTE *)&flags, sizeof(flags) ); - - memset( &startup, 0, sizeof(startup) ); - startup.cb = sizeof(startup); - - sprintf( buffer, "%s heap.c 0x%x", argv0, flags ); - ret = CreateProcessA( NULL, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &startup, &info ); - ok( ret, "failed to create child process error %u\n", GetLastError() ); - if (ret) - { - winetest_wait_child_process( info.hProcess ); - CloseHandle( info.hThread ); - CloseHandle( info.hProcess ); - } - RegDeleteValueA( hkey, "GlobalFlag" ); - RegCloseKey( hkey ); - RegDeleteKeyA( HKEY_LOCAL_MACHINE, keyname ); -} - -static DWORD heap_flags_from_global_flag( DWORD flag ) -{ - DWORD ret = 0; - - if (flag & FLG_HEAP_ENABLE_TAIL_CHECK) - ret |= HEAP_TAIL_CHECKING_ENABLED; - if (flag & FLG_HEAP_ENABLE_FREE_CHECK) - ret |= HEAP_FREE_CHECKING_ENABLED; - if (flag & FLG_HEAP_VALIDATE_PARAMETERS) - ret |= HEAP_VALIDATE_PARAMS | HEAP_VALIDATE | HEAP_TAIL_CHECKING_ENABLED | HEAP_FREE_CHECKING_ENABLED; - if (flag & FLG_HEAP_VALIDATE_ALL) - ret |= HEAP_VALIDATE_ALL | HEAP_VALIDATE | HEAP_TAIL_CHECKING_ENABLED | HEAP_FREE_CHECKING_ENABLED; - if (flag & FLG_HEAP_DISABLE_COALESCING) - ret |= HEAP_DISABLE_COALESCE_ON_FREE; - if (flag & FLG_HEAP_PAGE_ALLOCS) - ret |= HEAP_PAGE_ALLOCS | HEAP_GROWABLE; - return ret; -} - -static void test_child_heap( const char *arg ) -{ - struct heap_layout *heap = GetProcessHeap(); - DWORD expected = strtoul( arg, 0, 16 ); - DWORD expect_heap; - - if (expected == 0xdeadbeef) /* expected value comes from Session Manager global flags */ - { - HKEY hkey; - expected = 0; - if (!RegOpenKeyA( HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Control\\Session Manager", &hkey )) - { - char buffer[32]; - DWORD type, size = sizeof(buffer); - - if (!RegQueryValueExA( hkey, "GlobalFlag", 0, &type, (BYTE *)buffer, &size )) - { - if (type == REG_DWORD) expected = *(DWORD *)buffer; - else if (type == REG_SZ) expected = strtoul( buffer, 0, 16 ); - } - RegCloseKey( hkey ); - } - } - if (expected && !pRtlGetNtGlobalFlags()) /* not working on NT4 */ - { - win_skip( "global flags not set\n" ); - return; - } - - ok( pRtlGetNtGlobalFlags() == expected, - "%s: got global flags %08x expected %08x\n", arg, pRtlGetNtGlobalFlags(), expected ); - - expect_heap = heap_flags_from_global_flag( expected ); - - if (!(heap->flags & HEAP_GROWABLE) || heap->pattern == 0xffeeffee) /* vista layout */ - { - ok( heap->flags == 0, "%s: got heap flags %08x expected 0\n", arg, heap->flags ); - } - else if (heap->pattern == 0xeeeeeeee && heap->flags == 0xeeeeeeee) - { - ok( expected & FLG_HEAP_PAGE_ALLOCS, "%s: got heap flags 0xeeeeeeee without page alloc\n", arg ); - } - else - { - ok( heap->flags == (expect_heap | HEAP_GROWABLE), - "%s: got heap flags %08x expected %08x\n", arg, heap->flags, expect_heap ); - ok( heap->force_flags == (expect_heap & ~0x18000080), - "%s: got heap force flags %08x expected %08x\n", arg, heap->force_flags, expect_heap ); - expect_heap = heap->flags; - } - - test_heap_checks( expect_heap ); -} - -START_TEST(heap) -{ - int argc; - char **argv; - - pRtlGetNtGlobalFlags = (void *)GetProcAddress( GetModuleHandleA("ntdll.dll"), "RtlGetNtGlobalFlags" ); - - argc = winetest_get_mainargs( &argv ); - if (argc >= 3) - { - test_child_heap( argv[2] ); - return; - } - - test_heap(); - test_obsolete_flags(); - - /* Test both short and very long blocks */ - test_sized_HeapAlloc(1); - test_sized_HeapAlloc(1 << 20); - test_sized_HeapReAlloc(1, 100); - test_sized_HeapReAlloc(1, (1 << 20)); - test_sized_HeapReAlloc((1 << 20), (2 << 20)); - test_sized_HeapReAlloc((1 << 20), 1); - test_HeapQueryInformation(); - - if (pRtlGetNtGlobalFlags) - { - test_debug_heap( argv[0], 0 ); - test_debug_heap( argv[0], FLG_HEAP_ENABLE_TAIL_CHECK ); - test_debug_heap( argv[0], FLG_HEAP_ENABLE_FREE_CHECK ); - test_debug_heap( argv[0], FLG_HEAP_VALIDATE_PARAMETERS ); - test_debug_heap( argv[0], FLG_HEAP_VALIDATE_ALL ); - test_debug_heap( argv[0], FLG_POOL_ENABLE_TAGGING ); - test_debug_heap( argv[0], FLG_HEAP_ENABLE_TAGGING ); - test_debug_heap( argv[0], FLG_HEAP_ENABLE_TAG_BY_DLL ); - test_debug_heap( argv[0], FLG_HEAP_DISABLE_COALESCING ); - test_debug_heap( argv[0], FLG_HEAP_PAGE_ALLOCS ); - test_debug_heap( argv[0], 0xdeadbeef ); - } - else win_skip( "RtlGetNtGlobalFlags not found, skipping heap debug tests\n" ); -} diff --git a/rostests/winetests/kernel32/interlck.c b/rostests/winetests/kernel32/interlck.c deleted file mode 100644 index 2bb9d25e769..00000000000 --- a/rostests/winetests/kernel32/interlck.c +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Unit test suite for interlocked functions. - * - * Copyright 2006 Hervé Poussineau - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include - -#undef __ROS_LONG64__ -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winerror.h" - -static void test_InterlockedCompareExchange(void) -{ - LONG dest, res; - - dest = 0; - res = InterlockedCompareExchange( &dest, 1, 0 ); - ok( res == 0 && dest == 1, - "Expected 0 and 1, got %ld and %ld", res, dest ); - - dest = 1; - res = InterlockedCompareExchange( &dest, 2, 0 ); - ok( res == 1 && dest == 1, - "Expected 1 and 1, got %ld and %ld", res, dest ); -} - -static void test_InterlockedDecrement(void) -{ - LONG dest, res; - - dest = 1; - res = InterlockedDecrement( &dest ); - ok( res == 0 && dest == 0, - "Expected 0 and 0, got %ld and %ld", res, dest ); - - dest = 0; - res = InterlockedDecrement( &dest ); - ok( res == -1 && dest == -1, - "Expected -1 and -1, got %ld and %ld", res, dest ); - - dest = -1; - res = InterlockedDecrement( &dest ); - ok( res == -2 && dest == -2, - "Expected -2 and -2, got %ld and %ld", res, dest ); -} - -static void test_InterlockedExchange(void) -{ - LONG dest, res; - - dest = 0; - res = InterlockedExchange( &dest, 1 ); - ok( res == 0 && dest == 1, - "Expected 0 and 1, got %ld and %ld", res, dest ); - - dest = 1; - res = InterlockedExchange( &dest, 2 ); - ok( res == 1 && dest == 2, - "Expected 1 and 2, got %ld and %ld", res, dest ); - - dest = 1; - res = InterlockedExchange( &dest, -1 ); - ok( res == 1 && dest == -1, - "Expected 1 and -1, got %ld and %ld", res, dest ); -} - -static void test_InterlockedExchangeAdd(void) -{ - LONG dest, res; - - dest = 0; - res = InterlockedExchangeAdd( &dest, 1 ); - ok( res == 0 && dest == 1, - "Expected 0 and 1, got %ld and %ld", res, dest ); - - dest = 1; - res = InterlockedExchangeAdd( &dest, 2 ); - ok( res == 1 && dest == 3, - "Expected 1 and 3, got %ld and %ld", res, dest ); - - dest = 1; - res = InterlockedExchangeAdd( &dest, -1 ); - ok( res == 1 && dest == 0, - "Expected 1 and 0, got %ld and %ld", res, dest ); -} - -static void test_InterlockedIncrement(void) -{ - LONG dest, res; - - dest = -2; - res = InterlockedIncrement( &dest ); - ok( res == -1 && dest == -1, - "Expected -1 and -1, got %ld and %ld", res, dest ); - - dest = -1; - res = InterlockedIncrement( &dest ); - ok( res == 0 && dest == 0, - "Expected 0 and 0, got %ld and %ld", res, dest ); - - dest = 0; - res = InterlockedIncrement( &dest ); - ok( res == 1 && dest == 1, - "Expected 1 and 1, got %ld and %ld", res, dest ); -} - -START_TEST(interlck) -{ - test_InterlockedCompareExchange(); - test_InterlockedDecrement(); - test_InterlockedExchange(); - test_InterlockedExchangeAdd(); - test_InterlockedIncrement(); -} diff --git a/rostests/winetests/kernel32/kernel32.rbuild b/rostests/winetests/kernel32/kernel32.rbuild deleted file mode 100644 index 03e64f87615..00000000000 --- a/rostests/winetests/kernel32/kernel32.rbuild +++ /dev/null @@ -1,46 +0,0 @@ - - - - . - - ntdll - user32 - advapi32 - actctx.c - alloc.c - atom.c - change.c - codepage.c - comm.c - console.c - debugger.c - directory.c - drive.c - environ.c - fiber.c - file.c - format_msg.c - - heap.c - interlck.c - loader.c - locale.c - mailslot.c - module.c - path.c - pipe.c - process.c - profile.c - resource.c - sync.c - thread.c - time.c - timer.c - toolhelp.c - version.c - virtual.c - volume.c - dosdev.c - testlist.c - resource.rc - diff --git a/rostests/winetests/kernel32/loader.c b/rostests/winetests/kernel32/loader.c deleted file mode 100644 index ce598439a0b..00000000000 --- a/rostests/winetests/kernel32/loader.c +++ /dev/null @@ -1,700 +0,0 @@ -/* - * Unit test suite for the PE loader. - * - * Copyright 2006,2011 Dmitry Timoshkov - * - * 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 "windef.h" -#include "winbase.h" -#include "wine/test.h" - -#define ALIGN_SIZE(size, alignment) (((size) + (alignment - 1)) & ~((alignment - 1))) - -static PVOID RVAToAddr(DWORD_PTR rva, HMODULE module) -{ - if (rva == 0) - return NULL; - return ((char*) module) + rva; -} - -static const struct -{ - WORD e_magic; /* 00: MZ Header signature */ - WORD unused[29]; - DWORD e_lfanew; /* 3c: Offset to extended header */ -} dos_header = -{ - IMAGE_DOS_SIGNATURE, { 0 }, sizeof(dos_header) -}; - -static IMAGE_NT_HEADERS nt_header = -{ - IMAGE_NT_SIGNATURE, /* Signature */ - { -#if defined __i386__ - IMAGE_FILE_MACHINE_I386, /* Machine */ -#elif defined __x86_64__ - IMAGE_FILE_MACHINE_AMD64, /* Machine */ -#elif defined __powerpc__ - IMAGE_FILE_MACHINE_POWERPC, /* Machine */ -#elif defined __sparc__ - IMAGE_FILE_MACHINE_SPARC, /* Machine */ -#elif defined __arm__ - IMAGE_FILE_MACHINE_ARM, /* Machine */ -#else -# error You must specify the machine type -#endif - 1, /* NumberOfSections */ - 0, /* TimeDateStamp */ - 0, /* PointerToSymbolTable */ - 0, /* NumberOfSymbols */ - sizeof(IMAGE_OPTIONAL_HEADER), /* SizeOfOptionalHeader */ - IMAGE_FILE_EXECUTABLE_IMAGE | IMAGE_FILE_DLL /* Characteristics */ - }, - { IMAGE_NT_OPTIONAL_HDR_MAGIC, /* Magic */ - 1, /* MajorLinkerVersion */ - 0, /* MinorLinkerVersion */ - 0, /* SizeOfCode */ - 0, /* SizeOfInitializedData */ - 0, /* SizeOfUninitializedData */ - 0, /* AddressOfEntryPoint */ - 0x10, /* BaseOfCode, also serves as e_lfanew in the truncated MZ header */ -#ifndef _WIN64 - 0, /* BaseOfData */ -#endif - 0x10000000, /* ImageBase */ - 0, /* SectionAlignment */ - 0, /* FileAlignment */ - 4, /* MajorOperatingSystemVersion */ - 0, /* MinorOperatingSystemVersion */ - 1, /* MajorImageVersion */ - 0, /* MinorImageVersion */ - 4, /* MajorSubsystemVersion */ - 0, /* MinorSubsystemVersion */ - 0, /* Win32VersionValue */ - sizeof(dos_header) + sizeof(nt_header) + sizeof(IMAGE_SECTION_HEADER) + 0x1000, /* SizeOfImage */ - sizeof(dos_header) + sizeof(nt_header), /* SizeOfHeaders */ - 0, /* CheckSum */ - IMAGE_SUBSYSTEM_WINDOWS_CUI, /* Subsystem */ - 0, /* DllCharacteristics */ - 0, /* SizeOfStackReserve */ - 0, /* SizeOfStackCommit */ - 0, /* SizeOfHeapReserve */ - 0, /* SizeOfHeapCommit */ - 0, /* LoaderFlags */ - 0, /* NumberOfRvaAndSizes */ - { { 0 } } /* DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES] */ - } -}; - -static IMAGE_SECTION_HEADER section = -{ - ".rodata", /* Name */ - { 0x10 }, /* Misc */ - 0, /* VirtualAddress */ - 0x0a, /* SizeOfRawData */ - 0, /* PointerToRawData */ - 0, /* PointerToRelocations */ - 0, /* PointerToLinenumbers */ - 0, /* NumberOfRelocations */ - 0, /* NumberOfLinenumbers */ - IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ, /* Characteristics */ -}; - -static void test_Loader(void) -{ - static const struct test_data - { - const void *dos_header; - DWORD size_of_dos_header; - WORD number_of_sections, size_of_optional_header; - DWORD section_alignment, file_alignment; - DWORD size_of_image, size_of_headers; - DWORD errors[4]; /* 0 means LoadLibrary should succeed */ - } td[] = - { - { &dos_header, sizeof(dos_header), - 1, 0, 0, 0, 0, 0, - { ERROR_BAD_EXE_FORMAT } - }, - { &dos_header, sizeof(dos_header), - 1, sizeof(IMAGE_OPTIONAL_HEADER), 0x1000, 0x1000, - sizeof(dos_header) + sizeof(nt_header) + sizeof(IMAGE_SECTION_HEADER) + 0xe00, - sizeof(dos_header) + sizeof(nt_header) + sizeof(IMAGE_SECTION_HEADER), - { ERROR_BAD_EXE_FORMAT } /* XP doesn't like too small image size */ - }, - { &dos_header, sizeof(dos_header), - 1, sizeof(IMAGE_OPTIONAL_HEADER), 0x1000, 0x1000, - sizeof(dos_header) + sizeof(nt_header) + sizeof(IMAGE_SECTION_HEADER) + 0x1000, - sizeof(dos_header) + sizeof(nt_header) + sizeof(IMAGE_SECTION_HEADER), - { ERROR_SUCCESS } - }, - { &dos_header, sizeof(dos_header), - 1, sizeof(IMAGE_OPTIONAL_HEADER), 0x1000, 0x1000, - 0x1f00, - 0x1000, - { ERROR_SUCCESS } - }, - { &dos_header, sizeof(dos_header), - 1, sizeof(IMAGE_OPTIONAL_HEADER), 0x200, 0x200, - sizeof(dos_header) + sizeof(nt_header) + sizeof(IMAGE_SECTION_HEADER) + 0x200, - sizeof(dos_header) + sizeof(nt_header) + sizeof(IMAGE_SECTION_HEADER), - { ERROR_SUCCESS, ERROR_INVALID_ADDRESS } /* vista is more strict */ - }, - { &dos_header, sizeof(dos_header), - 1, sizeof(IMAGE_OPTIONAL_HEADER), 0x200, 0x1000, - sizeof(dos_header) + sizeof(nt_header) + sizeof(IMAGE_SECTION_HEADER) + 0x1000, - sizeof(dos_header) + sizeof(nt_header) + sizeof(IMAGE_SECTION_HEADER), - { ERROR_BAD_EXE_FORMAT } /* XP doesn't like alignments */ - }, - { &dos_header, sizeof(dos_header), - 1, sizeof(IMAGE_OPTIONAL_HEADER), 0x1000, 0x200, - sizeof(dos_header) + sizeof(nt_header) + sizeof(IMAGE_SECTION_HEADER) + 0x1000, - sizeof(dos_header) + sizeof(nt_header) + sizeof(IMAGE_SECTION_HEADER), - { ERROR_SUCCESS } - }, - { &dos_header, sizeof(dos_header), - 1, sizeof(IMAGE_OPTIONAL_HEADER), 0x1000, 0x200, - sizeof(dos_header) + sizeof(nt_header) + sizeof(IMAGE_SECTION_HEADER) + 0x1000, - 0x200, - { ERROR_SUCCESS } - }, - /* Mandatory are all fields up to SizeOfHeaders, everything else - * is really optional (at least that's true for XP). - */ - { &dos_header, sizeof(dos_header), - 1, FIELD_OFFSET(IMAGE_OPTIONAL_HEADER, CheckSum), 0x200, 0x200, - sizeof(dos_header) + sizeof(DWORD) + sizeof(IMAGE_FILE_HEADER) + FIELD_OFFSET(IMAGE_OPTIONAL_HEADER, CheckSum) + sizeof(IMAGE_SECTION_HEADER) + 0x10, - sizeof(dos_header) + sizeof(DWORD) + sizeof(IMAGE_FILE_HEADER) + FIELD_OFFSET(IMAGE_OPTIONAL_HEADER, CheckSum) + sizeof(IMAGE_SECTION_HEADER), - { ERROR_SUCCESS, ERROR_BAD_EXE_FORMAT, ERROR_INVALID_ADDRESS, - ERROR_NOACCESS } - }, - { &dos_header, sizeof(dos_header), - 0, FIELD_OFFSET(IMAGE_OPTIONAL_HEADER, CheckSum), 0x200, 0x200, - 0xd0, /* beyond of the end of file */ - 0xc0, /* beyond of the end of file */ - { ERROR_SUCCESS, ERROR_BAD_EXE_FORMAT } /* vista is more strict */ - }, - { &dos_header, sizeof(dos_header), - 0, FIELD_OFFSET(IMAGE_OPTIONAL_HEADER, CheckSum), 0x200, 0x200, - 0x1000, - 0, - { ERROR_SUCCESS, ERROR_BAD_EXE_FORMAT } /* vista is more strict */ - }, - { &dos_header, sizeof(dos_header), - 0, FIELD_OFFSET(IMAGE_OPTIONAL_HEADER, CheckSum), 0x200, 0x200, - 1, - 0, - { ERROR_SUCCESS, ERROR_BAD_EXE_FORMAT } /* vista is more strict */ - }, -#if 0 /* not power of 2 alignments need more test cases */ - { &dos_header, sizeof(dos_header), - 0, FIELD_OFFSET(IMAGE_OPTIONAL_HEADER, CheckSum), 0x300, 0x300, - 1, - 0, - { ERROR_BAD_EXE_FORMAT } /* alignment is not power of 2 */ - }, -#endif - { &dos_header, sizeof(dos_header), - 0, FIELD_OFFSET(IMAGE_OPTIONAL_HEADER, CheckSum), 4, 4, - 1, - 0, - { ERROR_SUCCESS, ERROR_BAD_EXE_FORMAT } /* vista is more strict */ - }, - { &dos_header, sizeof(dos_header), - 0, FIELD_OFFSET(IMAGE_OPTIONAL_HEADER, CheckSum), 1, 1, - 1, - 0, - { ERROR_SUCCESS, ERROR_BAD_EXE_FORMAT } /* vista is more strict */ - }, - { &dos_header, sizeof(dos_header), - 0, FIELD_OFFSET(IMAGE_OPTIONAL_HEADER, CheckSum), 0x200, 0x200, - 0, - 0, - { ERROR_BAD_EXE_FORMAT } /* image size == 0 -> failure */ - }, - /* the following data mimics the PE image which upack creates */ - { &dos_header, 0x10, - 1, 0x148, 0x1000, 0x200, - sizeof(dos_header) + sizeof(nt_header) + sizeof(IMAGE_SECTION_HEADER) + 0x1000, - 0x200, - { ERROR_SUCCESS } - }, - /* Minimal PE image that XP is able to load: 92 bytes */ - { &dos_header, 0x04, - 0, FIELD_OFFSET(IMAGE_OPTIONAL_HEADER, CheckSum), - 0x04 /* also serves as e_lfanew in the truncated MZ header */, 0x04, - 1, - 0, - { ERROR_SUCCESS, ERROR_BAD_EXE_FORMAT } /* vista is more strict */ - } - }; - static const char filler[0x1000]; - static const char section_data[0x10] = "section data"; - int i; - DWORD dummy, file_size, file_align; - HANDLE hfile; - HMODULE hlib, hlib_as_data_file; - SYSTEM_INFO si; - char temp_path[MAX_PATH]; - char dll_name[MAX_PATH]; - SIZE_T size; - BOOL ret; - - GetSystemInfo(&si); - trace("system page size 0x%04x\n", si.dwPageSize); - - /* prevent displaying of the "Unable to load this DLL" message box */ - SetErrorMode(SEM_FAILCRITICALERRORS); - - GetTempPath(MAX_PATH, temp_path); - - for (i = 0; i < sizeof(td)/sizeof(td[0]); i++) - { - GetTempFileName(temp_path, "ldr", 0, dll_name); - - /*trace("creating %s\n", dll_name);*/ - hfile = CreateFileA(dll_name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - if (hfile == INVALID_HANDLE_VALUE) - { - ok(0, "could not create %s\n", dll_name); - break; - } - - SetLastError(0xdeadbeef); - ret = WriteFile(hfile, td[i].dos_header, td[i].size_of_dos_header, &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); - - nt_header.FileHeader.NumberOfSections = td[i].number_of_sections; - nt_header.FileHeader.SizeOfOptionalHeader = td[i].size_of_optional_header; - - nt_header.OptionalHeader.SectionAlignment = td[i].section_alignment; - nt_header.OptionalHeader.FileAlignment = td[i].file_alignment; - nt_header.OptionalHeader.SizeOfImage = td[i].size_of_image; - nt_header.OptionalHeader.SizeOfHeaders = td[i].size_of_headers; - SetLastError(0xdeadbeef); - ret = WriteFile(hfile, &nt_header, sizeof(DWORD) + sizeof(IMAGE_FILE_HEADER), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); - - if (nt_header.FileHeader.SizeOfOptionalHeader) - { - SetLastError(0xdeadbeef); - ret = WriteFile(hfile, &nt_header.OptionalHeader, - min(nt_header.FileHeader.SizeOfOptionalHeader, sizeof(IMAGE_OPTIONAL_HEADER)), - &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); - if (nt_header.FileHeader.SizeOfOptionalHeader > sizeof(IMAGE_OPTIONAL_HEADER)) - { - file_align = nt_header.FileHeader.SizeOfOptionalHeader - sizeof(IMAGE_OPTIONAL_HEADER); - assert(file_align < sizeof(filler)); - SetLastError(0xdeadbeef); - ret = WriteFile(hfile, filler, file_align, &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); - } - } - - assert(nt_header.FileHeader.NumberOfSections <= 1); - if (nt_header.FileHeader.NumberOfSections) - { - if (nt_header.OptionalHeader.SectionAlignment >= si.dwPageSize) - { - section.PointerToRawData = td[i].size_of_dos_header; - section.VirtualAddress = nt_header.OptionalHeader.SectionAlignment; - section.Misc.VirtualSize = section.SizeOfRawData * 10; - } - else - { - section.PointerToRawData = nt_header.OptionalHeader.SizeOfHeaders; - section.VirtualAddress = nt_header.OptionalHeader.SizeOfHeaders; - section.Misc.VirtualSize = 5; - } - - SetLastError(0xdeadbeef); - ret = WriteFile(hfile, §ion, sizeof(section), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); - - /* section data */ - SetLastError(0xdeadbeef); - ret = WriteFile(hfile, section_data, sizeof(section_data), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); - } - - file_size = GetFileSize(hfile, NULL); - CloseHandle(hfile); - - SetLastError(0xdeadbeef); - hlib = LoadLibrary(dll_name); - if (hlib) - { - MEMORY_BASIC_INFORMATION info; - - ok( td[i].errors[0] == ERROR_SUCCESS, "%d: should have failed\n", i ); - - SetLastError(0xdeadbeef); - size = VirtualQuery(hlib, &info, sizeof(info)); - ok(size == sizeof(info), - "%d: VirtualQuery error %d\n", i, GetLastError()); - ok(info.BaseAddress == hlib, "%d: %p != %p\n", i, info.BaseAddress, hlib); - ok(info.AllocationBase == hlib, "%d: %p != %p\n", i, info.AllocationBase, hlib); - ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%d: %x != PAGE_EXECUTE_WRITECOPY\n", i, info.AllocationProtect); - ok(info.RegionSize == ALIGN_SIZE(nt_header.OptionalHeader.SizeOfImage, si.dwPageSize), "%d: got %lx != expected %x\n", - i, info.RegionSize, ALIGN_SIZE(nt_header.OptionalHeader.SizeOfImage, si.dwPageSize)); - ok(info.State == MEM_COMMIT, "%d: %x != MEM_COMMIT\n", i, info.State); - if (nt_header.OptionalHeader.SectionAlignment < si.dwPageSize) - ok(info.Protect == PAGE_EXECUTE_WRITECOPY, "%d: %x != PAGE_EXECUTE_WRITECOPY\n", i, info.Protect); - else - ok(info.Protect == PAGE_READONLY, "%d: %x != PAGE_READONLY\n", i, info.Protect); - ok(info.Type == SEC_IMAGE, "%d: %x != SEC_IMAGE\n", i, info.Type); - - SetLastError(0xdeadbeef); - size = VirtualQuery((char *)hlib + info.RegionSize, &info, sizeof(info)); - ok(size == sizeof(info), - "%d: VirtualQuery error %d\n", i, GetLastError()); - if (nt_header.OptionalHeader.SectionAlignment == si.dwPageSize || - nt_header.OptionalHeader.SectionAlignment == nt_header.OptionalHeader.FileAlignment) - { - ok(info.BaseAddress == (char *)hlib + ALIGN_SIZE(nt_header.OptionalHeader.SizeOfImage, si.dwPageSize), "%d: got %p != expected %p\n", - i, info.BaseAddress, (char *)hlib + ALIGN_SIZE(nt_header.OptionalHeader.SizeOfImage, si.dwPageSize)); - ok(info.AllocationBase == 0, "%d: %p != 0\n", i, info.AllocationBase); - ok(info.AllocationProtect == 0, "%d: %x != 0\n", i, info.AllocationProtect); - /*ok(info.RegionSize == not_practical_value, "%d: %lx != not_practical_value\n", i, info.RegionSize);*/ - ok(info.State == MEM_FREE, "%d: %x != MEM_FREE\n", i, info.State); - ok(info.Type == 0, "%d: %x != 0\n", i, info.Type); - ok(info.Protect == PAGE_NOACCESS, "%d: %x != PAGE_NOACCESS\n", i, info.Protect); - } - else - { - ok(info.Protect == PAGE_EXECUTE_WRITECOPY, "%d: %x != PAGE_EXECUTE_WRITECOPY\n", i, info.Protect); - ok(info.BaseAddress == hlib, "%d: got %p != expected %p\n", i, info.BaseAddress, hlib); - ok(info.AllocationBase == hlib, "%d: %p != %p\n", i, info.AllocationBase, hlib); - ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%d: %x != PAGE_EXECUTE_WRITECOPY\n", i, info.AllocationProtect); - ok(info.RegionSize == ALIGN_SIZE(file_size, si.dwPageSize), "%d: got %lx != expected %x\n", - i, info.RegionSize, ALIGN_SIZE(file_size, si.dwPageSize)); - ok(info.State == MEM_COMMIT, "%d: %x != MEM_COMMIT\n", i, info.State); - ok(info.Protect == PAGE_READONLY, "%d: %x != PAGE_READONLY\n", i, info.Protect); - ok(info.Type == SEC_IMAGE, "%d: %x != SEC_IMAGE\n", i, info.Type); - } - - /* header: check the zeroing of alignment */ - if (nt_header.OptionalHeader.SectionAlignment >= si.dwPageSize) - { - const char *start; - int size; - - start = (const char *)hlib + nt_header.OptionalHeader.SizeOfHeaders; - size = ALIGN_SIZE((ULONG_PTR)start, si.dwPageSize) - (ULONG_PTR)start; - ok(!memcmp(start, filler, size), "%d: header alignment is not cleared\n", i); - } - - if (nt_header.FileHeader.NumberOfSections) - { - SetLastError(0xdeadbeef); - size = VirtualQuery((char *)hlib + section.VirtualAddress, &info, sizeof(info)); - ok(size == sizeof(info), - "%d: VirtualQuery error %d\n", i, GetLastError()); - if (nt_header.OptionalHeader.SectionAlignment < si.dwPageSize) - { - ok(info.BaseAddress == hlib, "%d: got %p != expected %p\n", i, info.BaseAddress, hlib); - ok(info.RegionSize == ALIGN_SIZE(nt_header.OptionalHeader.SizeOfImage, si.dwPageSize), "%d: got %lx != expected %x\n", - i, info.RegionSize, ALIGN_SIZE(nt_header.OptionalHeader.SizeOfImage, si.dwPageSize)); - ok(info.Protect == PAGE_EXECUTE_WRITECOPY, "%d: %x != PAGE_EXECUTE_WRITECOPY\n", i, info.Protect); - } - else - { - ok(info.BaseAddress == (char *)hlib + section.VirtualAddress, "%d: got %p != expected %p\n", i, info.BaseAddress, (char *)hlib + section.VirtualAddress); - ok(info.RegionSize == ALIGN_SIZE(section.Misc.VirtualSize, si.dwPageSize), "%d: got %lx != expected %x\n", - i, info.RegionSize, ALIGN_SIZE(section.Misc.VirtualSize, si.dwPageSize)); - ok(info.Protect == PAGE_READONLY, "%d: %x != PAGE_READONLY\n", i, info.Protect); - } - ok(info.AllocationBase == hlib, "%d: %p != %p\n", i, info.AllocationBase, hlib); - ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%d: %x != PAGE_EXECUTE_WRITECOPY\n", i, info.AllocationProtect); - ok(info.State == MEM_COMMIT, "%d: %x != MEM_COMMIT\n", i, info.State); - ok(info.Type == SEC_IMAGE, "%d: %x != SEC_IMAGE\n", i, info.Type); - - if (nt_header.OptionalHeader.SectionAlignment >= si.dwPageSize) - ok(!memcmp((const char *)hlib + section.VirtualAddress + section.PointerToRawData, &nt_header, section.SizeOfRawData), "wrong section data\n"); - else - ok(!memcmp((const char *)hlib + section.PointerToRawData, section_data, section.SizeOfRawData), "wrong section data\n"); - - /* check the zeroing of alignment */ - if (nt_header.OptionalHeader.SectionAlignment >= si.dwPageSize) - { - const char *start; - int size; - - start = (const char *)hlib + section.VirtualAddress + section.PointerToRawData + section.SizeOfRawData; - size = ALIGN_SIZE((ULONG_PTR)start, si.dwPageSize) - (ULONG_PTR)start; - ok(memcmp(start, filler, size), "%d: alignment should not be cleared\n", i); - } - } - - SetLastError(0xdeadbeef); - hlib_as_data_file = LoadLibraryEx(dll_name, 0, LOAD_LIBRARY_AS_DATAFILE); - ok(hlib_as_data_file != 0, "LoadLibraryEx error %u\n", GetLastError()); - ok(hlib_as_data_file == hlib, "hlib_as_file and hlib are different\n"); - - SetLastError(0xdeadbeef); - ret = FreeLibrary(hlib); - ok(ret, "FreeLibrary error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - hlib = GetModuleHandle(dll_name); - ok(hlib != 0, "GetModuleHandle error %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = FreeLibrary(hlib_as_data_file); - ok(ret, "FreeLibrary error %d\n", GetLastError()); - - hlib = GetModuleHandle(dll_name); - ok(!hlib, "GetModuleHandle should fail\n"); - - SetLastError(0xdeadbeef); - hlib_as_data_file = LoadLibraryEx(dll_name, 0, LOAD_LIBRARY_AS_DATAFILE); - ok(hlib_as_data_file != 0, "LoadLibraryEx error %u\n", GetLastError()); - ok((ULONG_PTR)hlib_as_data_file & 1, "hlib_as_data_file is even\n"); - - hlib = GetModuleHandle(dll_name); - ok(!hlib, "GetModuleHandle should fail\n"); - - SetLastError(0xdeadbeef); - ret = FreeLibrary(hlib_as_data_file); - ok(ret, "FreeLibrary error %d\n", GetLastError()); - } - else - { - BOOL error_match; - int error_index; - - error_match = FALSE; - for (error_index = 0; - ! error_match && error_index < sizeof(td[i].errors) / sizeof(DWORD); - error_index++) - { - error_match = td[i].errors[error_index] == GetLastError(); - } - ok(error_match, "%d: unexpected error %d\n", i, GetLastError()); - } - - SetLastError(0xdeadbeef); - ret = DeleteFile(dll_name); - ok(ret, "DeleteFile error %d\n", GetLastError()); - } -} - -/* Verify linking style of import descriptors */ -static void test_ImportDescriptors(void) -{ - HMODULE kernel32_module = NULL; - PIMAGE_DOS_HEADER d_header; - PIMAGE_NT_HEADERS nt_headers; - DWORD import_dir_size; - DWORD_PTR dir_offset; - PIMAGE_IMPORT_DESCRIPTOR import_chunk; - - /* Load kernel32 module */ - kernel32_module = GetModuleHandleA("kernel32.dll"); - assert( kernel32_module != NULL ); - - /* Get PE header info from module image */ - d_header = (PIMAGE_DOS_HEADER) kernel32_module; - nt_headers = (PIMAGE_NT_HEADERS) (((char*) d_header) + - d_header->e_lfanew); - - /* Get size of import entry directory */ - import_dir_size = nt_headers->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].Size; - if (!import_dir_size) - { - skip("Unable to continue testing due to missing import directory.\n"); - return; - } - - /* Get address of first import chunk */ - dir_offset = nt_headers->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress; - import_chunk = RVAToAddr(dir_offset, kernel32_module); - ok(import_chunk != 0, "Invalid import_chunk: %p\n", import_chunk); - if (!import_chunk) return; - - /* Iterate through import descriptors and verify set name, - * OriginalFirstThunk, and FirstThunk. Core Windows DLLs, such as - * kernel32.dll, don't use Borland-style linking, where the table of - * imported names is stored directly in FirstThunk and overwritten - * by the relocation, instead of being stored in OriginalFirstThunk. - * */ - for (; import_chunk->FirstThunk; import_chunk++) - { - LPCSTR module_name = RVAToAddr(import_chunk->Name, kernel32_module); - PIMAGE_THUNK_DATA name_table = RVAToAddr( - U(*import_chunk).OriginalFirstThunk, kernel32_module); - PIMAGE_THUNK_DATA iat = RVAToAddr( - import_chunk->FirstThunk, kernel32_module); - ok(module_name != NULL, "Imported module name should not be NULL\n"); - ok(name_table != NULL, - "Name table for imported module %s should not be NULL\n", - module_name); - ok(iat != NULL, "IAT for imported module %s should not be NULL\n", - module_name); - } -} - -static void test_section_access(void) -{ - static const struct test_data - { - DWORD scn_file_access, scn_page_access; - } td[] = - { - { 0, PAGE_NOACCESS }, - { IMAGE_SCN_MEM_READ, PAGE_READONLY }, - { IMAGE_SCN_MEM_WRITE, PAGE_WRITECOPY }, - { IMAGE_SCN_MEM_EXECUTE, PAGE_EXECUTE }, - { IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE, PAGE_WRITECOPY }, - { IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_EXECUTE, PAGE_EXECUTE_READ }, - { IMAGE_SCN_MEM_WRITE | IMAGE_SCN_MEM_EXECUTE, PAGE_EXECUTE_WRITECOPY }, - { IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE | IMAGE_SCN_MEM_EXECUTE, PAGE_EXECUTE_WRITECOPY }, - - { IMAGE_SCN_CNT_INITIALIZED_DATA, PAGE_NOACCESS }, - { IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ, PAGE_READONLY }, - { IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_WRITE, PAGE_WRITECOPY }, - { IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_EXECUTE, PAGE_EXECUTE }, - { IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE, PAGE_WRITECOPY }, - { IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_EXECUTE, PAGE_EXECUTE_READ }, - { IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_WRITE | IMAGE_SCN_MEM_EXECUTE, PAGE_EXECUTE_WRITECOPY }, - { IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE | IMAGE_SCN_MEM_EXECUTE, PAGE_EXECUTE_WRITECOPY }, - - { IMAGE_SCN_CNT_UNINITIALIZED_DATA, PAGE_NOACCESS }, - { IMAGE_SCN_CNT_UNINITIALIZED_DATA | IMAGE_SCN_MEM_READ, PAGE_READONLY }, - { IMAGE_SCN_CNT_UNINITIALIZED_DATA | IMAGE_SCN_MEM_WRITE, PAGE_WRITECOPY }, - { IMAGE_SCN_CNT_UNINITIALIZED_DATA | IMAGE_SCN_MEM_EXECUTE, PAGE_EXECUTE }, - { IMAGE_SCN_CNT_UNINITIALIZED_DATA | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE, PAGE_WRITECOPY }, - { IMAGE_SCN_CNT_UNINITIALIZED_DATA | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_EXECUTE, PAGE_EXECUTE_READ }, - { IMAGE_SCN_CNT_UNINITIALIZED_DATA | IMAGE_SCN_MEM_WRITE | IMAGE_SCN_MEM_EXECUTE, PAGE_EXECUTE_WRITECOPY }, - { IMAGE_SCN_CNT_UNINITIALIZED_DATA | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE | IMAGE_SCN_MEM_EXECUTE, PAGE_EXECUTE_WRITECOPY } - }; - static const char filler[0x1000]; - static const char section_data[0x10] = "section data"; - int i; - DWORD dummy, file_align; - HANDLE hfile; - HMODULE hlib; - SYSTEM_INFO si; - char temp_path[MAX_PATH]; - char dll_name[MAX_PATH]; - SIZE_T size; - MEMORY_BASIC_INFORMATION info; - BOOL ret; - - GetSystemInfo(&si); - trace("system page size %#x\n", si.dwPageSize); - - /* prevent displaying of the "Unable to load this DLL" message box */ - SetErrorMode(SEM_FAILCRITICALERRORS); - - GetTempPath(MAX_PATH, temp_path); - - for (i = 0; i < sizeof(td)/sizeof(td[0]); i++) - { - GetTempFileName(temp_path, "ldr", 0, dll_name); - - /*trace("creating %s\n", dll_name);*/ - hfile = CreateFileA(dll_name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - if (hfile == INVALID_HANDLE_VALUE) - { - ok(0, "could not create %s\n", dll_name); - return; - } - - SetLastError(0xdeadbeef); - ret = WriteFile(hfile, &dos_header, sizeof(dos_header), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); - - nt_header.FileHeader.NumberOfSections = 1; - nt_header.FileHeader.SizeOfOptionalHeader = sizeof(IMAGE_OPTIONAL_HEADER); - - nt_header.OptionalHeader.SectionAlignment = si.dwPageSize; - nt_header.OptionalHeader.FileAlignment = 0x200; - nt_header.OptionalHeader.SizeOfImage = sizeof(dos_header) + sizeof(nt_header) + sizeof(IMAGE_SECTION_HEADER) + si.dwPageSize; - nt_header.OptionalHeader.SizeOfHeaders = sizeof(dos_header) + sizeof(nt_header) + sizeof(IMAGE_SECTION_HEADER); - SetLastError(0xdeadbeef); - ret = WriteFile(hfile, &nt_header, sizeof(DWORD) + sizeof(IMAGE_FILE_HEADER), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = WriteFile(hfile, &nt_header.OptionalHeader, sizeof(IMAGE_OPTIONAL_HEADER), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); - - section.SizeOfRawData = sizeof(section_data); - section.PointerToRawData = nt_header.OptionalHeader.FileAlignment; - section.VirtualAddress = nt_header.OptionalHeader.SectionAlignment; - section.Misc.VirtualSize = section.SizeOfRawData; - section.Characteristics = td[i].scn_file_access; - SetLastError(0xdeadbeef); - ret = WriteFile(hfile, §ion, sizeof(section), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); - - file_align = nt_header.OptionalHeader.FileAlignment - nt_header.OptionalHeader.SizeOfHeaders; - assert(file_align < sizeof(filler)); - SetLastError(0xdeadbeef); - ret = WriteFile(hfile, filler, file_align, &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); - - /* section data */ - SetLastError(0xdeadbeef); - ret = WriteFile(hfile, section_data, sizeof(section_data), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); - - CloseHandle(hfile); - - SetLastError(0xdeadbeef); - hlib = LoadLibrary(dll_name); - ok(ret, "LoadLibrary error %d\n", GetLastError()); - - size = VirtualQuery((char *)hlib + section.VirtualAddress, &info, sizeof(info)); - ok(size == sizeof(info), - "%d: VirtualQuery error %d\n", i, GetLastError()); - ok(info.BaseAddress == (char *)hlib + section.VirtualAddress, "%d: got %p != expected %p\n", i, info.BaseAddress, (char *)hlib + section.VirtualAddress); - ok(info.RegionSize == si.dwPageSize, "%d: got %#lx != expected %#x\n", i, info.RegionSize, si.dwPageSize); - /* FIXME: remove the condition below once Wine is fixed */ - if ((td[i].scn_file_access & IMAGE_SCN_MEM_WRITE) && - (td[i].scn_file_access & IMAGE_SCN_CNT_UNINITIALIZED_DATA)) - todo_wine ok(info.Protect == td[i].scn_page_access, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].scn_page_access); - else - ok(info.Protect == td[i].scn_page_access, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].scn_page_access); - ok(info.AllocationBase == hlib, "%d: %p != %p\n", i, info.AllocationBase, hlib); - ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%d: %#x != PAGE_EXECUTE_WRITECOPY\n", i, info.AllocationProtect); - ok(info.State == MEM_COMMIT, "%d: %#x != MEM_COMMIT\n", i, info.State); - ok(info.Type == SEC_IMAGE, "%d: %#x != SEC_IMAGE\n", i, info.Type); - if (info.Protect != PAGE_NOACCESS) - ok(!memcmp((const char *)info.BaseAddress, section_data, section.SizeOfRawData), "wrong section data\n"); - - SetLastError(0xdeadbeef); - ret = FreeLibrary(hlib); - ok(ret, "FreeLibrary error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = DeleteFile(dll_name); - ok(ret, "DeleteFile error %d\n", GetLastError()); - } -} - -START_TEST(loader) -{ - test_Loader(); - test_ImportDescriptors(); - test_section_access(); -} diff --git a/rostests/winetests/kernel32/locale.c b/rostests/winetests/kernel32/locale.c deleted file mode 100755 index e13247e20cd..00000000000 --- a/rostests/winetests/kernel32/locale.c +++ /dev/null @@ -1,2834 +0,0 @@ -/* - * Unit tests for locale functions - * - * Copyright 2002 YASAR Mehmet - * Copyright 2003 Dmitry Timoshkov - * Copyright 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 - * - * NOTES - * We must pass LOCALE_NOUSEROVERRIDE (NUO) to formatting functions so that - * even when the user has overridden their default i8n settings (e.g. in - * the control panel i8n page), we will still get the expected results. - */ - -#include -#include -#include -#include - -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "winnls.h" - -static inline unsigned int strlenW( const WCHAR *str ) -{ - const WCHAR *s = str; - while (*s) s++; - return s - str; -} - -static 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; -} - -static inline WCHAR *strchrW( const WCHAR *str, WCHAR ch ) -{ - do { if (*str == ch) return (WCHAR *)str; } while (*str++); - return NULL; -} - -static inline int isdigitW( WCHAR wc ) -{ - WORD type; - GetStringTypeW( CT_CTYPE1, &wc, 1, &type ); - return type & C1_DIGIT; -} - -/* Some functions are only in later versions of kernel32.dll */ -static HMODULE hKernel32; -static WORD enumCount; - -static BOOL (WINAPI *pEnumSystemLanguageGroupsA)(LANGUAGEGROUP_ENUMPROC, DWORD, LONG_PTR); -static BOOL (WINAPI *pEnumLanguageGroupLocalesA)(LANGGROUPLOCALE_ENUMPROC, LGRPID, DWORD, LONG_PTR); -static BOOL (WINAPI *pEnumUILanguagesA)(UILANGUAGE_ENUMPROC, DWORD, LONG_PTR); -static BOOL (WINAPI *pEnumSystemLocalesEx)(LOCALE_ENUMPROCEX, DWORD, LPARAM, LPVOID); -static INT (WINAPI *pFoldStringA)(DWORD, LPCSTR, INT, LPSTR, INT); -static INT (WINAPI *pFoldStringW)(DWORD, LPCWSTR, INT, LPWSTR, INT); -static BOOL (WINAPI *pIsValidLanguageGroup)(LGRPID, DWORD); - -static void InitFunctionPointers(void) -{ - hKernel32 = GetModuleHandleA("kernel32"); - pEnumSystemLanguageGroupsA = (void*)GetProcAddress(hKernel32, "EnumSystemLanguageGroupsA"); - pEnumLanguageGroupLocalesA = (void*)GetProcAddress(hKernel32, "EnumLanguageGroupLocalesA"); - pFoldStringA = (void*)GetProcAddress(hKernel32, "FoldStringA"); - pFoldStringW = (void*)GetProcAddress(hKernel32, "FoldStringW"); - pIsValidLanguageGroup = (void*)GetProcAddress(hKernel32, "IsValidLanguageGroup"); - pEnumUILanguagesA = (void*)GetProcAddress(hKernel32, "EnumUILanguagesA"); - pEnumSystemLocalesEx = (void*)GetProcAddress(hKernel32, "EnumSystemLocalesEx"); -} - -#define eq(received, expected, label, type) \ - ok((received) == (expected), "%s: got " type " instead of " type "\n", \ - (label), (received), (expected)) - -#define BUFFER_SIZE 128 -#define COUNTOF(x) (sizeof(x)/sizeof(x)[0]) - -#define STRINGSA(x,y) strcpy(input, x); strcpy(Expected, y); SetLastError(0xdeadbeef); buffer[0] = '\0' -#define EXPECT_LENA ok(ret == lstrlen(Expected)+1, "Expected Len %d, got %d\n", lstrlen(Expected)+1, ret) -#define EXPECT_EQA ok(strncmp(buffer, Expected, strlen(Expected)) == 0, \ - "Expected '%s', got '%s'\n", Expected, buffer) - -#define STRINGSW(x,y) MultiByteToWideChar(CP_ACP,0,x,-1,input,COUNTOF(input)); \ - MultiByteToWideChar(CP_ACP,0,y,-1,Expected,COUNTOF(Expected)); \ - SetLastError(0xdeadbeef); buffer[0] = '\0' -#define EXPECT_LENW ok(ret == lstrlenW(Expected)+1, "Expected Len %d, got %d\n", lstrlenW(Expected)+1, ret) -#define EXPECT_EQW ok(strncmpW(buffer, Expected, strlenW(Expected)) == 0, "Bad conversion\n") - -#define NUO LOCALE_NOUSEROVERRIDE - -static void test_GetLocaleInfoA(void) -{ - int ret; - int len; - LCID lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); - char buffer[BUFFER_SIZE]; - char expected[BUFFER_SIZE]; - - ok(lcid == 0x409, "wrong LCID calculated - %d\n", lcid); - - /* en and ar use SUBLANG_NEUTRAL, but GetLocaleInfo assume SUBLANG_DEFAULT - Same is true for zh on pre-Vista, but on Vista and higher GetLocaleInfo - assumes SUBLANG_NEUTRAL for zh */ - memset(expected, 0, COUNTOF(expected)); - len = GetLocaleInfoA(MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT), LOCALE_SLANGUAGE, expected, COUNTOF(expected)); - SetLastError(0xdeadbeef); - memset(buffer, 0, COUNTOF(buffer)); - ret = GetLocaleInfoA(LANG_ENGLISH, LOCALE_SLANGUAGE, buffer, COUNTOF(buffer)); - ok((ret == len) && !lstrcmpA(buffer, expected), - "got %d with '%s' (expected %d with '%s')\n", - ret, buffer, len, expected); - - memset(expected, 0, COUNTOF(expected)); - len = GetLocaleInfoA(MAKELANGID(LANG_ARABIC, SUBLANG_DEFAULT), LOCALE_SLANGUAGE, expected, COUNTOF(expected)); - if (len) { - SetLastError(0xdeadbeef); - memset(buffer, 0, COUNTOF(buffer)); - ret = GetLocaleInfoA(LANG_ARABIC, LOCALE_SLANGUAGE, buffer, COUNTOF(buffer)); - ok((ret == len) && !lstrcmpA(buffer, expected), - "got %d with '%s' (expected %d with '%s')\n", - ret, buffer, len, expected); - } - else - win_skip("LANG_ARABIC not installed\n"); - - /* SUBLANG_DEFAULT is required for mlang.dll, but optional for GetLocaleInfo */ - memset(expected, 0, COUNTOF(expected)); - len = GetLocaleInfoA(MAKELANGID(LANG_GERMAN, SUBLANG_DEFAULT), LOCALE_SLANGUAGE, expected, COUNTOF(expected)); - SetLastError(0xdeadbeef); - memset(buffer, 0, COUNTOF(buffer)); - ret = GetLocaleInfoA(LANG_GERMAN, LOCALE_SLANGUAGE, buffer, COUNTOF(buffer)); - ok((ret == len) && !lstrcmpA(buffer, expected), - "got %d with '%s' (expected %d with '%s')\n", - ret, buffer, len, expected); - - - /* HTMLKit and "Font xplorer lite" expect GetLocaleInfoA to - * partially fill the buffer even if it is too short. See bug 637. - */ - SetLastError(0xdeadbeef); - memset(buffer, 0, COUNTOF(buffer)); - ret = GetLocaleInfoA(lcid, NUO|LOCALE_SDAYNAME1, buffer, 0); - ok(ret == 7 && !buffer[0], "Expected len=7, got %d\n", ret); - - SetLastError(0xdeadbeef); - memset(buffer, 0, COUNTOF(buffer)); - ret = GetLocaleInfoA(lcid, NUO|LOCALE_SDAYNAME1, buffer, 3); - ok( !ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(!strcmp(buffer, "Mon"), "Expected 'Mon', got '%s'\n", buffer); - - SetLastError(0xdeadbeef); - memset(buffer, 0, COUNTOF(buffer)); - ret = GetLocaleInfoA(lcid, NUO|LOCALE_SDAYNAME1, buffer, 10); - ok(ret == 7, "Expected ret == 7, got %d, error %d\n", ret, GetLastError()); - ok(!strcmp(buffer, "Monday"), "Expected 'Monday', got '%s'\n", buffer); -} - -static void test_GetLocaleInfoW(void) -{ - LCID lcid_en = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); - LCID lcid_ru = MAKELCID(MAKELANGID(LANG_RUSSIAN, SUBLANG_NEUTRAL), SORT_DEFAULT); - WCHAR bufferW[80], buffer2W[80]; - CHAR bufferA[80]; - DWORD ret; - INT i; - - ret = GetLocaleInfoW(lcid_en, LOCALE_SMONTHNAME1, bufferW, COUNTOF(bufferW)); - if (!ret) { - win_skip("GetLocaleInfoW() isn't implemented\n"); - return; - } - ret = GetLocaleInfoW(lcid_ru, LOCALE_SMONTHNAME1, bufferW, COUNTOF(bufferW)); - if (!ret) { - win_skip("LANG_RUSSIAN locale data unavailable\n"); - return; - } - ret = GetLocaleInfoW(lcid_ru, LOCALE_SMONTHNAME1|LOCALE_RETURN_GENITIVE_NAMES, - bufferW, COUNTOF(bufferW)); - if (!ret) { - win_skip("LOCALE_RETURN_GENITIVE_NAMES isn't supported\n"); - return; - } - - /* LOCALE_RETURN_GENITIVE_NAMES isn't supported for GetLocaleInfoA */ - bufferA[0] = 'a'; - SetLastError(0xdeadbeef); - ret = GetLocaleInfoA(lcid_ru, LOCALE_SMONTHNAME1|LOCALE_RETURN_GENITIVE_NAMES, - bufferA, COUNTOF(bufferA)); - ok(ret == 0, "LOCALE_RETURN_GENITIVE_NAMES should fail with GetLocaleInfoA\n"); - ok(bufferA[0] == 'a', "Expected buffer to be untouched\n"); - ok(GetLastError() == ERROR_INVALID_FLAGS, - "Expected ERROR_INVALID_FLAGS, got %x\n", GetLastError()); - - bufferW[0] = 'a'; - SetLastError(0xdeadbeef); - ret = GetLocaleInfoW(lcid_ru, LOCALE_RETURN_GENITIVE_NAMES, - bufferW, COUNTOF(bufferW)); - ok(ret == 0, - "LOCALE_RETURN_GENITIVE_NAMES itself doesn't return anything, got %d\n", ret); - ok(bufferW[0] == 'a', "Expected buffer to be untouched\n"); - ok(GetLastError() == ERROR_INVALID_FLAGS, - "Expected ERROR_INVALID_FLAGS, got %x\n", GetLastError()); - - /* yes, test empty 13 month entry too */ - for (i = 0; i < 12; i++) { - bufferW[0] = 0; - ret = GetLocaleInfoW(lcid_ru, (LOCALE_SMONTHNAME1+i)|LOCALE_RETURN_GENITIVE_NAMES, - bufferW, COUNTOF(bufferW)); - ok(ret, "Expected non zero result\n"); - ok(ret == lstrlenW(bufferW)+1, "Expected actual length, got %d, length %d\n", - ret, lstrlenW(bufferW)); - buffer2W[0] = 0; - ret = GetLocaleInfoW(lcid_ru, LOCALE_SMONTHNAME1+i, - buffer2W, COUNTOF(buffer2W)); - ok(ret, "Expected non zero result\n"); - ok(ret == lstrlenW(buffer2W)+1, "Expected actual length, got %d, length %d\n", - ret, lstrlenW(buffer2W)); - - ok(lstrcmpW(bufferW, buffer2W) != 0, - "Expected genitive name to differ, got the same for month %d\n", i+1); - - /* for locale without genitive names nominative returned in both cases */ - bufferW[0] = 0; - ret = GetLocaleInfoW(lcid_en, (LOCALE_SMONTHNAME1+i)|LOCALE_RETURN_GENITIVE_NAMES, - bufferW, COUNTOF(bufferW)); - ok(ret, "Expected non zero result\n"); - ok(ret == lstrlenW(bufferW)+1, "Expected actual length, got %d, length %d\n", - ret, lstrlenW(bufferW)); - buffer2W[0] = 0; - ret = GetLocaleInfoW(lcid_en, LOCALE_SMONTHNAME1+i, - buffer2W, COUNTOF(buffer2W)); - ok(ret, "Expected non zero result\n"); - ok(ret == lstrlenW(buffer2W)+1, "Expected actual length, got %d, length %d\n", - ret, lstrlenW(buffer2W)); - - ok(lstrcmpW(bufferW, buffer2W) == 0, - "Expected same names, got different for month %d\n", i+1); - } -} - -static void test_GetTimeFormatA(void) -{ - int ret; - SYSTEMTIME curtime; - LCID lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); - char buffer[BUFFER_SIZE], input[BUFFER_SIZE], Expected[BUFFER_SIZE]; - - memset(&curtime, 2, sizeof(SYSTEMTIME)); - STRINGSA("tt HH':'mm'@'ss", ""); /* Invalid time */ - SetLastError(0xdeadbeef); - ret = GetTimeFormatA(lcid, TIME_FORCE24HOURFORMAT, &curtime, input, buffer, COUNTOF(buffer)); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - curtime.wHour = 8; - curtime.wMinute = 56; - curtime.wSecond = 13; - curtime.wMilliseconds = 22; - STRINGSA("tt HH':'mm'@'ss", "AM 08:56@13"); /* Valid time */ - SetLastError(0xdeadbeef); - ret = GetTimeFormatA(lcid, TIME_FORCE24HOURFORMAT, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - /* MSDN: LOCALE_NOUSEROVERRIDE can't be specified with a format string */ - SetLastError(0xdeadbeef); - ret = GetTimeFormatA(lcid, NUO|TIME_FORCE24HOURFORMAT, &curtime, input, buffer, COUNTOF(buffer)); - ok(!ret && GetLastError() == ERROR_INVALID_FLAGS, - "Expected ERROR_INVALID_FLAGS, got %d\n", GetLastError()); - - STRINGSA("tt HH':'mm'@'ss", "A"); /* Insufficient buffer */ - SetLastError(0xdeadbeef); - ret = GetTimeFormatA(lcid, TIME_FORCE24HOURFORMAT, &curtime, input, buffer, 2); - ok( !ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - - STRINGSA("tt HH':'mm'@'ss", "AM 08:56@13"); /* Calculate length only */ - ret = GetTimeFormatA(lcid, TIME_FORCE24HOURFORMAT, &curtime, input, NULL, 0); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; - - STRINGSA("", "8 AM"); /* TIME_NOMINUTESORSECONDS, default format */ - ret = GetTimeFormatA(lcid, NUO|TIME_NOMINUTESORSECONDS, &curtime, NULL, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("m1s2m3s4", ""); /* TIME_NOMINUTESORSECONDS/complex format */ - ret = GetTimeFormatA(lcid, TIME_NOMINUTESORSECONDS, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret == strlen(buffer)+1, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - ok( !strcmp( buffer, "" ) || broken( !strcmp( buffer, "4" )), /* win9x */ - "Expected '', got '%s'\n", buffer ); - - STRINGSA("", "8:56 AM"); /* TIME_NOSECONDS/Default format */ - ret = GetTimeFormatA(lcid, NUO|TIME_NOSECONDS, &curtime, NULL, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("h:m:s tt", "8:56 AM"); /* TIME_NOSECONDS */ - strcpy(Expected, "8:56 AM"); - ret = GetTimeFormatA(lcid, TIME_NOSECONDS, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("h.@:m.@:s.@:tt", "8.@:56AM"); /* Multiple delimiters */ - ret = GetTimeFormatA(lcid, TIME_NOSECONDS, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - ok( !strcmp( buffer, "8.@:56AM" ) || broken( !strcmp( buffer, "8.@:56.@:AM" )) /* win9x */, - "Expected '8.@:56AM', got '%s'\n", buffer ); - - STRINGSA("s1s2s3", ""); /* Duplicate tokens */ - ret = GetTimeFormatA(lcid, TIME_NOSECONDS, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret == strlen(buffer)+1, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - ok( !strcmp( buffer, "" ) || broken( !strcmp( buffer, "3" )), /* win9x */ - "Expected '', got '%s'\n", buffer ); - - STRINGSA("t/tt", "A/AM"); /* AM time marker */ - ret = GetTimeFormatA(lcid, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - curtime.wHour = 13; - STRINGSA("t/tt", "P/PM"); /* PM time marker */ - ret = GetTimeFormatA(lcid, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("h1t2tt3m", "156"); /* TIME_NOTIMEMARKER: removes text around time marker token */ - ret = GetTimeFormatA(lcid, TIME_NOTIMEMARKER, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("h:m:s tt", "13:56:13 PM"); /* TIME_FORCE24HOURFORMAT */ - ret = GetTimeFormatA(lcid, TIME_FORCE24HOURFORMAT, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("h:m:s", "13:56:13"); /* TIME_FORCE24HOURFORMAT doesn't add time marker */ - ret = GetTimeFormatA(lcid, TIME_FORCE24HOURFORMAT, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - curtime.wHour = 14; /* change this to 14 or 2pm */ - curtime.wMinute = 5; - curtime.wSecond = 3; - STRINGSA("h hh H HH m mm s ss t tt", "2 02 14 14 5 05 3 03 P PM"); /* 24 hrs, leading 0 */ - ret = GetTimeFormatA(lcid, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - curtime.wHour = 0; - STRINGSA("h/H/hh/HH", "12/0/12/00"); /* "hh" and "HH" */ - ret = GetTimeFormatA(lcid, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("h:m:s tt", "12:5:3 AM"); /* non-zero flags should fail with format, doesn't */ - ret = GetTimeFormatA(lcid, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - /* try to convert formatting strings with more than two letters - * "h:hh:hhh:H:HH:HHH:m:mm:mmm:M:MM:MMM:s:ss:sss:S:SS:SSS" - * NOTE: We expect any letter for which there is an upper case value - * we should see a replacement. For letters that DO NOT have - * upper case values we should see NO REPLACEMENT. - */ - curtime.wHour = 8; - curtime.wMinute = 56; - curtime.wSecond = 13; - curtime.wMilliseconds = 22; - STRINGSA("h:hh:hhh H:HH:HHH m:mm:mmm M:MM:MMM s:ss:sss S:SS:SSS", - "8:08:08 8:08:08 56:56:56 M:MM:MMM 13:13:13 S:SS:SSS"); - ret = GetTimeFormatA(lcid, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("h", "text"); /* Don't write to buffer if len is 0 */ - strcpy(buffer, "text"); - ret = GetTimeFormatA(lcid, 0, &curtime, input, buffer, 0); - ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError()); - EXPECT_EQA; - - STRINGSA("h 'h' H 'H' HH 'HH' m 'm' s 's' t 't' tt 'tt'", - "8 h 8 H 08 HH 56 m 13 s A t AM tt"); /* "'" preserves tokens */ - ret = GetTimeFormatA(lcid, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("'''", "'"); /* invalid quoted string */ - ret = GetTimeFormatA(lcid, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - /* test that msdn suggested single quotation usage works as expected */ - STRINGSA("''''", "'"); /* single quote mark */ - ret = GetTimeFormatA(lcid, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("''HHHHHH", "08"); /* Normal use */ - ret = GetTimeFormatA(lcid, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - /* and test for normal use of the single quotation mark */ - STRINGSA("'''HHHHHH'", "'HHHHHH"); /* Normal use */ - ret = GetTimeFormatA(lcid, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("'''HHHHHH", "'HHHHHH"); /* Odd use */ - ret = GetTimeFormatA(lcid, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("'123'tt", ""); /* TIME_NOTIMEMARKER drops literals too */ - ret = GetTimeFormatA(lcid, TIME_NOTIMEMARKER, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - curtime.wHour = 25; - STRINGSA("'123'tt", ""); /* Invalid time */ - SetLastError(0xdeadbeef); - ret = GetTimeFormatA(lcid, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - curtime.wHour = 12; - curtime.wMonth = 60; /* Invalid */ - STRINGSA("h:m:s", "12:56:13"); /* Invalid date */ - ret = GetTimeFormatA(lcid, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; -} - -static void test_GetDateFormatA(void) -{ - int ret; - SYSTEMTIME curtime; - LCID lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); - LCID lcid_ru = MAKELCID(MAKELANGID(LANG_RUSSIAN, SUBLANG_NEUTRAL), SORT_DEFAULT); - char buffer[BUFFER_SIZE], input[BUFFER_SIZE], Expected[BUFFER_SIZE]; - char Broken[BUFFER_SIZE]; - char short_day[10], month[10], genitive_month[10]; - - memset(&curtime, 2, sizeof(SYSTEMTIME)); /* Invalid time */ - STRINGSA("ddd',' MMM dd yy",""); - SetLastError(0xdeadbeef); - ret = GetDateFormatA(lcid, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - curtime.wYear = 2002; - curtime.wMonth = 5; - curtime.wDay = 4; - curtime.wDayOfWeek = 3; - STRINGSA("ddd',' MMM dd yy","Sat, May 04 02"); /* Simple case */ - ret = GetDateFormatA(lcid, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - /* Same as above but with LOCALE_NOUSEROVERRIDE */ - STRINGSA("ddd',' MMM dd yy",""); /* Simple case */ - SetLastError(0xdeadbeef); - ret = GetDateFormatA(lcid, NUO, &curtime, input, buffer, COUNTOF(buffer)); - ok(!ret && GetLastError() == ERROR_INVALID_FLAGS, - "Expected ERROR_INVALID_FLAGS, got %d\n", GetLastError()); - EXPECT_EQA; - - STRINGSA("ddd',' MMM dd yy","Sat, May 04 02"); /* Format containing "'" */ - ret = GetDateFormatA(lcid, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - curtime.wHour = 36; /* Invalid */ - STRINGSA("ddd',' MMM dd ''''yy","Sat, May 04 '02"); /* Invalid time */ - ret = GetDateFormatA(lcid, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("ddd',' MMM dd ''''yy",""); /* Get size only */ - ret = GetDateFormatA(lcid, 0, &curtime, input, NULL, 0); - ok(ret == 16, "Expected ret == 16, got %d, error %d\n", ret, GetLastError()); - EXPECT_EQA; - - STRINGSA("ddd',' MMM dd ''''yy",""); /* Buffer too small */ - SetLastError(0xdeadbeef); - ret = GetDateFormatA(lcid, 0, &curtime, input, buffer, 2); - ok( !ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - - STRINGSA("ddd',' MMM dd ''''yy","5/4/2002"); /* Default to DATE_SHORTDATE */ - ret = GetDateFormat(lcid, NUO, &curtime, NULL, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - if (strncmp(buffer, Expected, strlen(Expected)) && strncmp(buffer, "5/4/02", strlen(Expected)) != 0) - ok (0, "Expected '%s' or '5/4/02', got '%s'\n", Expected, buffer); - - STRINGSA("ddd',' MMM dd ''''yy", "Saturday, May 04, 2002"); /* DATE_LONGDATE */ - ret = GetDateFormat(lcid, NUO|DATE_LONGDATE, &curtime, NULL, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - /* test for expected DATE_YEARMONTH behavior with null format */ - /* NT4 returns ERROR_INVALID_FLAGS for DATE_YEARMONTH */ - STRINGSA("ddd',' MMM dd ''''yy", ""); /* DATE_YEARMONTH */ - SetLastError(0xdeadbeef); - ret = GetDateFormat(lcid, NUO|DATE_YEARMONTH, &curtime, input, buffer, COUNTOF(buffer)); - ok(!ret && GetLastError() == ERROR_INVALID_FLAGS, - "Expected ERROR_INVALID_FLAGS, got %d\n", GetLastError()); - EXPECT_EQA; - - /* Test that using invalid DATE_* flags results in the correct error */ - /* and return values */ - STRINGSA("m/d/y", ""); /* Invalid flags */ - SetLastError(0xdeadbeef); - ret = GetDateFormat(lcid, DATE_YEARMONTH|DATE_SHORTDATE|DATE_LONGDATE, - &curtime, input, buffer, COUNTOF(buffer)); - ok(!ret && GetLastError() == ERROR_INVALID_FLAGS, - "Expected ERROR_INVALID_FLAGS, got %d\n", GetLastError()); - - ret = GetDateFormat(lcid_ru, 0, &curtime, "ddMMMM", buffer, COUNTOF(buffer)); - if (!ret) - { - win_skip("LANG_RUSSIAN locale data unavailable\n"); - return; - } - - /* month part should be in genitive form */ - strcpy(genitive_month, buffer + 2); - ret = GetDateFormat(lcid_ru, 0, &curtime, "MMMM", buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - strcpy(month, buffer); - ok(strcmp(genitive_month, month) != 0, "Expected different month forms\n"); - - ret = GetDateFormat(lcid_ru, 0, &curtime, "ddd", buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - strcpy(short_day, buffer); - - STRINGSA("dd MMMMddd dd", ""); - sprintf(Expected, "04 %s%s 04", genitive_month, short_day); - ret = GetDateFormat(lcid_ru, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_EQA; - - STRINGSA("MMMMddd dd", ""); - sprintf(Expected, "%s%s 04", month, short_day); - ret = GetDateFormat(lcid_ru, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_EQA; - - STRINGSA("MMMMddd", ""); - sprintf(Expected, "%s%s", month, short_day); - ret = GetDateFormat(lcid_ru, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_EQA; - - STRINGSA("MMMMdd", ""); - sprintf(Expected, "%s04", genitive_month); - sprintf(Broken, "%s04", month); - ret = GetDateFormat(lcid_ru, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - ok(strncmp(buffer, Expected, strlen(Expected)) == 0 || - broken(strncmp(buffer, Broken, strlen(Broken)) == 0) /* nt4 */, - "Expected '%s', got '%s'\n", Expected, buffer); - - STRINGSA("MMMMdd ddd", ""); - sprintf(Expected, "%s04 %s", genitive_month, short_day); - sprintf(Broken, "%s04 %s", month, short_day); - ret = GetDateFormat(lcid_ru, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - ok(strncmp(buffer, Expected, strlen(Expected)) == 0 || - broken(strncmp(buffer, Broken, strlen(Broken)) == 0) /* nt4 */, - "Expected '%s', got '%s'\n", Expected, buffer); - - STRINGSA("dd dddMMMM", ""); - sprintf(Expected, "04 %s%s", short_day, month); - ret = GetDateFormat(lcid_ru, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_EQA; - - STRINGSA("dd dddMMMM ddd MMMMdd", ""); - sprintf(Expected, "04 %s%s %s %s04", short_day, month, short_day, genitive_month); - sprintf(Broken, "04 %s%s %s %s04", short_day, month, short_day, month); - ret = GetDateFormat(lcid_ru, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - ok(strncmp(buffer, Expected, strlen(Expected)) == 0 || - broken(strncmp(buffer, Broken, strlen(Broken)) == 0) /* nt4 */, - "Expected '%s', got '%s'\n", Expected, buffer); - - /* with literal part */ - STRINGSA("ddd',' MMMM dd", ""); - sprintf(Expected, "%s, %s 04", short_day, genitive_month); - sprintf(Broken, "%s, %s 04", short_day, month); - ret = GetDateFormat(lcid_ru, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - ok(strncmp(buffer, Expected, strlen(Expected)) == 0 || - broken(strncmp(buffer, Broken, strlen(Broken)) == 0) /* nt4 */, - "Expected '%s', got '%s'\n", Expected, buffer); -} - -static void test_GetDateFormatW(void) -{ - int ret; - SYSTEMTIME curtime; - WCHAR buffer[BUFFER_SIZE], input[BUFFER_SIZE], Expected[BUFFER_SIZE]; - LCID lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); - - STRINGSW("",""); /* If flags is not zero then format must be NULL */ - ret = GetDateFormatW(LOCALE_SYSTEM_DEFAULT, DATE_LONGDATE, NULL, - input, buffer, COUNTOF(buffer)); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("GetDateFormatW is not implemented\n"); - return; - } - ok(!ret && GetLastError() == ERROR_INVALID_FLAGS, - "Expected ERROR_INVALID_FLAGS, got %d\n", GetLastError()); - EXPECT_EQW; - - STRINGSW("",""); /* NULL buffer, len > 0 */ - SetLastError(0xdeadbeef); - ret = GetDateFormatW (lcid, 0, NULL, input, NULL, COUNTOF(buffer)); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - STRINGSW("",""); /* NULL buffer, len == 0 */ - ret = GetDateFormatW (lcid, 0, NULL, input, NULL, 0); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENW; EXPECT_EQW; - - curtime.wYear = 2002; - curtime.wMonth = 10; - curtime.wDay = 23; - curtime.wDayOfWeek = 45612; /* Should be 3 - Wednesday */ - curtime.wHour = 65432; /* Invalid */ - curtime.wMinute = 34512; /* Invalid */ - curtime.wSecond = 65535; /* Invalid */ - curtime.wMilliseconds = 12345; - STRINGSW("dddd d MMMM yyyy","Wednesday 23 October 2002"); /* Incorrect DOW and time */ - ret = GetDateFormatW (lcid, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENW; EXPECT_EQW; - - /* Limit tests */ - - curtime.wYear = 1601; - curtime.wMonth = 1; - curtime.wDay = 1; - curtime.wDayOfWeek = 0; /* Irrelevant */ - curtime.wHour = 0; - curtime.wMinute = 0; - curtime.wSecond = 0; - curtime.wMilliseconds = 0; - STRINGSW("dddd d MMMM yyyy","Monday 1 January 1601"); - SetLastError(0xdeadbeef); - ret = GetDateFormatW (lcid, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENW; EXPECT_EQW; - - curtime.wYear = 1600; - curtime.wMonth = 12; - curtime.wDay = 31; - curtime.wDayOfWeek = 0; /* Irrelevant */ - curtime.wHour = 23; - curtime.wMinute = 59; - curtime.wSecond = 59; - curtime.wMilliseconds = 999; - STRINGSW("dddd d MMMM yyyy","Friday 31 December 1600"); - SetLastError(0xdeadbeef); - ret = GetDateFormatW (lcid, 0, &curtime, input, buffer, COUNTOF(buffer)); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); -} - - -#define CY_POS_LEFT 0 -#define CY_POS_RIGHT 1 -#define CY_POS_LEFT_SPACE 2 -#define CY_POS_RIGHT_SPACE 3 - -static void test_GetCurrencyFormatA(void) -{ - static char szDot[] = { '.', '\0' }; - static char szComma[] = { ',', '\0' }; - static char szDollar[] = { '$', '\0' }; - int ret; - LCID lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); - char buffer[BUFFER_SIZE], Expected[BUFFER_SIZE], input[BUFFER_SIZE]; - CURRENCYFMTA format; - - memset(&format, 0, sizeof(format)); - - STRINGSA("23",""); /* NULL output, length > 0 --> Error */ - SetLastError(0xdeadbeef); - ret = GetCurrencyFormatA(lcid, 0, input, NULL, NULL, COUNTOF(buffer)); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - STRINGSA("23,53",""); /* Invalid character --> Error */ - SetLastError(0xdeadbeef); - ret = GetCurrencyFormatA(lcid, 0, input, NULL, buffer, COUNTOF(buffer)); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - STRINGSA("--",""); /* Double '-' --> Error */ - SetLastError(0xdeadbeef); - ret = GetCurrencyFormatA(lcid, 0, input, NULL, buffer, COUNTOF(buffer)); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - STRINGSA("0-",""); /* Trailing '-' --> Error */ - SetLastError(0xdeadbeef); - ret = GetCurrencyFormatA(lcid, 0, input, NULL, buffer, COUNTOF(buffer)); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - STRINGSA("0..",""); /* Double '.' --> Error */ - SetLastError(0xdeadbeef); - ret = GetCurrencyFormatA(lcid, 0, input, NULL, buffer, COUNTOF(buffer)); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - STRINGSA(" 0.1",""); /* Leading space --> Error */ - SetLastError(0xdeadbeef); - ret = GetCurrencyFormatA(lcid, 0, input, NULL, buffer, COUNTOF(buffer)); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - STRINGSA("1234","$"); /* Length too small --> Write up to length chars */ - SetLastError(0xdeadbeef); - ret = GetCurrencyFormatA(lcid, NUO, input, NULL, buffer, 2); - ok( !ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - - STRINGSA("2353",""); /* Format and flags given --> Error */ - SetLastError(0xdeadbeef); - ret = GetCurrencyFormatA(lcid, NUO, input, &format, buffer, COUNTOF(buffer)); - ok( !ret, "Expected ret == 0, got %d\n", ret); - ok( GetLastError() == ERROR_INVALID_FLAGS || GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_FLAGS, got %d\n", GetLastError()); - - STRINGSA("2353",""); /* Invalid format --> Error */ - SetLastError(0xdeadbeef); - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - STRINGSA("2353","$2,353.00"); /* Valid number */ - ret = GetCurrencyFormatA(lcid, NUO, input, NULL, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("-2353","($2,353.00)"); /* Valid negative number */ - ret = GetCurrencyFormatA(lcid, NUO, input, NULL, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("2353.1","$2,353.10"); /* Valid real number */ - ret = GetCurrencyFormatA(lcid, NUO, input, NULL, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("2353.111","$2,353.11"); /* Too many DP --> Truncated */ - ret = GetCurrencyFormatA(lcid, NUO, input, NULL, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("2353.119","$2,353.12"); /* Too many DP --> Rounded */ - ret = GetCurrencyFormatA(lcid, NUO, input, NULL, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.NumDigits = 0; /* No decimal separator */ - format.LeadingZero = 0; - format.Grouping = 0; /* No grouping char */ - format.NegativeOrder = 0; - format.PositiveOrder = CY_POS_LEFT; - format.lpDecimalSep = szDot; - format.lpThousandSep = szComma; - format.lpCurrencySymbol = szDollar; - - STRINGSA("2353","$2353"); /* No decimal or grouping chars expected */ - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.NumDigits = 1; /* 1 DP --> Expect decimal separator */ - STRINGSA("2353","$2353.0"); - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.Grouping = 2; /* Group by 100's */ - STRINGSA("2353","$23,53.0"); - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("235","$235.0"); /* Grouping of a positive number */ - format.Grouping = 3; - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("-235","$-235.0"); /* Grouping of a negative number */ - format.NegativeOrder = 2; - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.LeadingZero = 1; /* Always provide leading zero */ - STRINGSA(".5","$0.5"); - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.PositiveOrder = CY_POS_RIGHT; - STRINGSA("1","1.0$"); - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.PositiveOrder = CY_POS_LEFT_SPACE; - STRINGSA("1","$ 1.0"); - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.PositiveOrder = CY_POS_RIGHT_SPACE; - STRINGSA("1","1.0 $"); - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.NegativeOrder = 0; - STRINGSA("-1","($1.0)"); - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.NegativeOrder = 1; - STRINGSA("-1","-$1.0"); - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.NegativeOrder = 2; - STRINGSA("-1","$-1.0"); - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.NegativeOrder = 3; - STRINGSA("-1","$1.0-"); - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.NegativeOrder = 4; - STRINGSA("-1","(1.0$)"); - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.NegativeOrder = 5; - STRINGSA("-1","-1.0$"); - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.NegativeOrder = 6; - STRINGSA("-1","1.0-$"); - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.NegativeOrder = 7; - STRINGSA("-1","1.0$-"); - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.NegativeOrder = 8; - STRINGSA("-1","-1.0 $"); - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.NegativeOrder = 9; - STRINGSA("-1","-$ 1.0"); - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.NegativeOrder = 10; - STRINGSA("-1","1.0 $-"); - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.NegativeOrder = 11; - STRINGSA("-1","$ 1.0-"); - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.NegativeOrder = 12; - STRINGSA("-1","$ -1.0"); - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.NegativeOrder = 13; - STRINGSA("-1","1.0- $"); - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.NegativeOrder = 14; - STRINGSA("-1","($ 1.0)"); - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.NegativeOrder = 15; - STRINGSA("-1","(1.0 $)"); - ret = GetCurrencyFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; -} - -#define NEG_PARENS 0 /* "(1.1)" */ -#define NEG_LEFT 1 /* "-1.1" */ -#define NEG_LEFT_SPACE 2 /* "- 1.1" */ -#define NEG_RIGHT 3 /* "1.1-" */ -#define NEG_RIGHT_SPACE 4 /* "1.1 -" */ - -static void test_GetNumberFormatA(void) -{ - static char szDot[] = { '.', '\0' }; - static char szComma[] = { ',', '\0' }; - int ret; - LCID lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); - char buffer[BUFFER_SIZE], Expected[BUFFER_SIZE], input[BUFFER_SIZE]; - NUMBERFMTA format; - - memset(&format, 0, sizeof(format)); - - STRINGSA("23",""); /* NULL output, length > 0 --> Error */ - SetLastError(0xdeadbeef); - ret = GetNumberFormatA(lcid, 0, input, NULL, NULL, COUNTOF(buffer)); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - STRINGSA("23,53",""); /* Invalid character --> Error */ - SetLastError(0xdeadbeef); - ret = GetNumberFormatA(lcid, 0, input, NULL, buffer, COUNTOF(buffer)); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - STRINGSA("--",""); /* Double '-' --> Error */ - SetLastError(0xdeadbeef); - ret = GetNumberFormatA(lcid, 0, input, NULL, buffer, COUNTOF(buffer)); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - STRINGSA("0-",""); /* Trailing '-' --> Error */ - SetLastError(0xdeadbeef); - ret = GetNumberFormatA(lcid, 0, input, NULL, buffer, COUNTOF(buffer)); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - STRINGSA("0..",""); /* Double '.' --> Error */ - SetLastError(0xdeadbeef); - ret = GetNumberFormatA(lcid, 0, input, NULL, buffer, COUNTOF(buffer)); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - STRINGSA(" 0.1",""); /* Leading space --> Error */ - SetLastError(0xdeadbeef); - ret = GetNumberFormatA(lcid, 0, input, NULL, buffer, COUNTOF(buffer)); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - STRINGSA("1234","1"); /* Length too small --> Write up to length chars */ - SetLastError(0xdeadbeef); - ret = GetNumberFormatA(lcid, NUO, input, NULL, buffer, 2); - ok( !ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - - STRINGSA("2353",""); /* Format and flags given --> Error */ - SetLastError(0xdeadbeef); - ret = GetNumberFormatA(lcid, NUO, input, &format, buffer, COUNTOF(buffer)); - ok( !ret, "Expected ret == 0, got %d\n", ret); - ok( GetLastError() == ERROR_INVALID_FLAGS || GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_FLAGS, got %d\n", GetLastError()); - - STRINGSA("2353",""); /* Invalid format --> Error */ - SetLastError(0xdeadbeef); - ret = GetNumberFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - STRINGSA("2353","2,353.00"); /* Valid number */ - ret = GetNumberFormatA(lcid, NUO, input, NULL, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("-2353","-2,353.00"); /* Valid negative number */ - ret = GetNumberFormatA(lcid, NUO, input, NULL, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("-353","-353.00"); /* test for off by one error in grouping */ - ret = GetNumberFormatA(lcid, NUO, input, NULL, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("2353.1","2,353.10"); /* Valid real number */ - ret = GetNumberFormatA(lcid, NUO, input, NULL, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("2353.111","2,353.11"); /* Too many DP --> Truncated */ - ret = GetNumberFormatA(lcid, NUO, input, NULL, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("2353.119","2,353.12"); /* Too many DP --> Rounded */ - ret = GetNumberFormatA(lcid, NUO, input, NULL, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.NumDigits = 0; /* No decimal separator */ - format.LeadingZero = 0; - format.Grouping = 0; /* No grouping char */ - format.NegativeOrder = 0; - format.lpDecimalSep = szDot; - format.lpThousandSep = szComma; - - STRINGSA("2353","2353"); /* No decimal or grouping chars expected */ - ret = GetNumberFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.NumDigits = 1; /* 1 DP --> Expect decimal separator */ - STRINGSA("2353","2353.0"); - ret = GetNumberFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.Grouping = 2; /* Group by 100's */ - STRINGSA("2353","23,53.0"); - ret = GetNumberFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("235","235.0"); /* Grouping of a positive number */ - format.Grouping = 3; - ret = GetNumberFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - STRINGSA("-235","-235.0"); /* Grouping of a negative number */ - format.NegativeOrder = NEG_LEFT; - ret = GetNumberFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.LeadingZero = 1; /* Always provide leading zero */ - STRINGSA(".5","0.5"); - ret = GetNumberFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.NegativeOrder = NEG_PARENS; - STRINGSA("-1","(1.0)"); - ret = GetNumberFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.NegativeOrder = NEG_LEFT; - STRINGSA("-1","-1.0"); - ret = GetNumberFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.NegativeOrder = NEG_LEFT_SPACE; - STRINGSA("-1","- 1.0"); - ret = GetNumberFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.NegativeOrder = NEG_RIGHT; - STRINGSA("-1","1.0-"); - ret = GetNumberFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - format.NegativeOrder = NEG_RIGHT_SPACE; - STRINGSA("-1","1.0 -"); - ret = GetNumberFormatA(lcid, 0, input, &format, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - - lcid = MAKELCID(MAKELANGID(LANG_FRENCH, SUBLANG_DEFAULT), SORT_DEFAULT); - - if (IsValidLocale(lcid, 0)) - { - STRINGSA("-12345","-12 345,00"); /* Try French formatting */ - Expected[3] = 160; /* Non breaking space */ - ret = GetNumberFormatA(lcid, NUO, input, NULL, buffer, COUNTOF(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - EXPECT_LENA; EXPECT_EQA; - } -} - - -static void test_CompareStringA(void) -{ - int ret; - LCID lcid = MAKELCID(MAKELANGID(LANG_FRENCH, SUBLANG_DEFAULT), SORT_DEFAULT); - - ret = CompareStringA(lcid, NORM_IGNORECASE, "Salut", -1, "Salute", -1); - ok (ret== 1, "(Salut/Salute) Expected 1, got %d\n", ret); - - ret = CompareStringA(lcid, NORM_IGNORECASE, "Salut", -1, "SaLuT", -1); - ok (ret== 2, "(Salut/SaLuT) Expected 2, got %d\n", ret); - - ret = CompareStringA(lcid, NORM_IGNORECASE, "Salut", -1, "hola", -1); - ok (ret== 3, "(Salut/hola) Expected 3, got %d\n", ret); - - ret = CompareStringA(lcid, NORM_IGNORECASE, "haha", -1, "hoho", -1); - ok (ret== 1, "(haha/hoho) Expected 1, got %d\n", ret); - - lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); - - ret = CompareStringA(lcid, NORM_IGNORECASE, "haha", -1, "hoho", -1); - ok (ret== 1, "(haha/hoho) Expected 1, got %d\n", ret); - - ret = CompareStringA(lcid, NORM_IGNORECASE, "haha", -1, "hoho", 0); - ok (ret== 3, "(haha/hoho) Expected 3, got %d\n", ret); - - ret = CompareStringA(lcid, NORM_IGNORECASE, "Salut", 5, "saLuT", -1); - ok (ret == 2, "(Salut/saLuT) Expected 2, got %d\n", ret); - - /* test for CompareStringA flags */ - SetLastError(0xdeadbeef); - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0x8, "NULL", -1, "NULL", -1); - ok(GetLastError() == ERROR_INVALID_FLAGS, - "unexpected error code %d\n", GetLastError()); - ok(!ret, "CompareStringA must fail with invalid flag\n"); - - SetLastError(0xdeadbeef); - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, LOCALE_USE_CP_ACP, "NULL", -1, "NULL", -1); - ok(GetLastError() == 0xdeadbeef, "unexpected error code %d\n", GetLastError()); - ok(ret == CSTR_EQUAL, "CompareStringA error: %d != CSTR_EQUAL\n", ret); - /* end of test for CompareStringA flags */ - - ret = lstrcmpA("", ""); - ok (ret == 0, "lstrcmpA(\"\", \"\") should return 0, got %d\n", ret); - - ret = lstrcmpA(NULL, NULL); - ok (ret == 0 || broken(ret == -2) /* win9x */, "lstrcmpA(NULL, NULL) should return 0, got %d\n", ret); - - ret = lstrcmpA("", NULL); - ok (ret == 1 || broken(ret == -2) /* win9x */, "lstrcmpA(\"\", NULL) should return 1, got %d\n", ret); - - ret = lstrcmpA(NULL, ""); - ok (ret == -1 || broken(ret == -2) /* win9x */, "lstrcmpA(NULL, \"\") should return -1, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT,0,"EndDialog",-1,"_Property",-1); - ok( ret == 3, "EndDialog vs _Property ... expected 3, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT,0,"osp_vba.sreg0070",-1,"_IEWWBrowserComp",-1); - ok( ret == 3, "osp_vba.sreg0070 vs _IEWWBrowserComp ... expected 3, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT,0,"r",-1,"\\",-1); - ok( ret == 3, "r vs \\ ... expected 3, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT,0,"osp_vba.sreg0031", -1, "OriginalDatabase", -1 ); - ok( ret == 3, "osp_vba.sreg0031 vs OriginalDatabase ... expected 3, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "AAA", -1, "aaa", -1 ); - ok( ret == 3, "AAA vs aaa expected 3, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "AAA", -1, "aab", -1 ); - ok( ret == 1, "AAA vs aab expected 1, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "AAA", -1, "Aab", -1 ); - ok( ret == 1, "AAA vs Aab expected 1, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, ".AAA", -1, "Aab", -1 ); - ok( ret == 1, ".AAA vs Aab expected 1, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, ".AAA", -1, "A.ab", -1 ); - ok( ret == 1, ".AAA vs A.ab expected 1, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "aa", -1, "AB", -1 ); - ok( ret == 1, "aa vs AB expected 1, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "aa", -1, "Aab", -1 ); - ok( ret == 1, "aa vs Aab expected 1, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "aB", -1, "Aab", -1 ); - ok( ret == 3, "aB vs Aab expected 3, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "Ba", -1, "bab", -1 ); - ok( ret == 1, "Ba vs bab expected 1, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "{100}{83}{71}{71}{71}", -1, "Global_DataAccess_JRO", -1 ); - ok( ret == 1, "{100}{83}{71}{71}{71} vs Global_DataAccess_JRO expected 1, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "a", -1, "{", -1 ); - ok( ret == 3, "a vs { expected 3, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "A", -1, "{", -1 ); - ok( ret == 3, "A vs { expected 3, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "3.5", 0, "4.0", -1 ); - ok(ret == 1, "3.5/0 vs 4.0/-1 expected 1, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "3.5", -1, "4.0", -1 ); - ok(ret == 1, "3.5 vs 4.0 expected 1, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "3.520.4403.2", -1, "4.0.2927.10", -1 ); - ok(ret == 1, "3.520.4403.2 vs 4.0.2927.10 expected 1, got %d\n", ret); - - /* hyphen and apostrophe are treated differently depending on - * whether SORT_STRINGSORT specified or not - */ - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "-o", -1, "/m", -1 ); - ok(ret == 3, "-o vs /m expected 3, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "/m", -1, "-o", -1 ); - ok(ret == 1, "/m vs -o expected 1, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, SORT_STRINGSORT, "-o", -1, "/m", -1 ); - ok(ret == 1, "-o vs /m expected 1, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, SORT_STRINGSORT, "/m", -1, "-o", -1 ); - ok(ret == 3, "/m vs -o expected 3, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "'o", -1, "/m", -1 ); - ok(ret == 3, "'o vs /m expected 3, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "/m", -1, "'o", -1 ); - ok(ret == 1, "/m vs 'o expected 1, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, SORT_STRINGSORT, "'o", -1, "/m", -1 ); - ok(ret == 1, "'o vs /m expected 1, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, SORT_STRINGSORT, "/m", -1, "'o", -1 ); - ok(ret == 3, "/m vs 'o expected 3, got %d\n", ret); - - if (0) { /* this requires collation table patch to make it MS compatible */ - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "'o", -1, "-o", -1 ); - ok(ret == 1, "'o vs -o expected 1, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, SORT_STRINGSORT, "'o", -1, "-o", -1 ); - ok(ret == 1, "'o vs -o expected 1, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "'", -1, "-", -1 ); - ok(ret == 1, "' vs - expected 1, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, SORT_STRINGSORT, "'", -1, "-", -1 ); - ok(ret == 1, "' vs - expected 1, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "`o", -1, "/m", -1 ); - ok(ret == 3, "`o vs /m expected 3, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "/m", -1, "`o", -1 ); - ok(ret == 1, "/m vs `o expected 1, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, SORT_STRINGSORT, "`o", -1, "/m", -1 ); - ok(ret == 3, "`o vs /m expected 3, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, SORT_STRINGSORT, "/m", -1, "`o", -1 ); - ok(ret == 1, "/m vs `o expected 1, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "`o", -1, "-m", -1 ); - ok(ret == 1, "`o vs -m expected 1, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, 0, "-m", -1, "`o", -1 ); - ok(ret == 3, "-m vs `o expected 3, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, SORT_STRINGSORT, "`o", -1, "-m", -1 ); - ok(ret == 3, "`o vs -m expected 3, got %d\n", ret); - - ret = CompareStringA(LOCALE_SYSTEM_DEFAULT, SORT_STRINGSORT, "-m", -1, "`o", -1 ); - ok(ret == 1, "-m vs `o expected 1, got %d\n", ret); - } - - ret = CompareStringA(LOCALE_USER_DEFAULT, 0, "aLuZkUtZ", 8, "aLuZkUtZ", 9); - ok(ret == 2, "aLuZkUtZ vs aLuZkUtZ\\0 expected 2, got %d\n", ret); - - ret = CompareStringA(LOCALE_USER_DEFAULT, 0, "aLuZkUtZ", 7, "aLuZkUtZ\0A", 10); - ok(ret == 1, "aLuZkUtZ vs aLuZkUtZ\\0A expected 1, got %d\n", ret); - - /* WinXP handles embedded NULLs differently than earlier versions */ - ret = CompareStringA(LOCALE_USER_DEFAULT, 0, "aLuZkUtZ", 8, "aLuZkUtZ\0A", 10); - ok(ret == 1 || ret == 2, "aLuZkUtZ vs aLuZkUtZ\\0A expected 1 or 2, got %d\n", ret); - - ret = CompareStringA(LOCALE_USER_DEFAULT, 0, "aLu\0ZkUtZ", 8, "aLu\0ZkUtZ\0A", 10); - ok(ret == 1 || ret == 2, "aLu\\0ZkUtZ vs aLu\\0ZkUtZ\\0A expected 1 or 2, got %d\n", ret); - - ret = CompareStringA(lcid, 0, "a\0b", -1, "a", -1); - ok(ret == 2, "a vs a expected 2, got %d\n", ret); - - ret = CompareStringA(lcid, 0, "a\0b", 4, "a", 2); - ok(ret == CSTR_EQUAL || /* win2k */ - ret == CSTR_GREATER_THAN, - "a\\0b vs a expected CSTR_EQUAL or CSTR_GREATER_THAN, got %d\n", ret); - - ret = CompareStringA(lcid, 0, "\2", 2, "\1", 2); - todo_wine ok(ret != 2, "\\2 vs \\1 expected unequal\n"); - - ret = CompareStringA(lcid, NORM_IGNORECASE | LOCALE_USE_CP_ACP, "#", -1, ".", -1); - todo_wine ok(ret == CSTR_LESS_THAN, "\"#\" vs \".\" expected CSTR_LESS_THAN, got %d\n", ret); - - ret = CompareStringA(lcid, NORM_IGNORECASE, "_", -1, ".", -1); - todo_wine ok(ret == CSTR_GREATER_THAN, "\"_\" vs \".\" expected CSTR_GREATER_THAN, got %d\n", ret); - - ret = lstrcmpi("#", "."); - todo_wine ok(ret == -1, "\"#\" vs \".\" expected -1, got %d\n", ret); - - lcid = MAKELCID(MAKELANGID(LANG_POLISH, SUBLANG_DEFAULT), SORT_DEFAULT); - - /* \xB9 character lies between a and b */ - ret = CompareStringA(lcid, 0, "a", 1, "\xB9", 1); - todo_wine ok(ret == CSTR_LESS_THAN, "\'\\xB9\' character should be greater than \'a\'\n"); - ret = CompareStringA(lcid, 0, "\xB9", 1, "b", 1); - ok(ret == CSTR_LESS_THAN, "\'\\xB9\' character should be smaller than \'b\'\n"); -} - -static void test_LCMapStringA(void) -{ - int ret, ret2; - char buf[256], buf2[256]; - static const char upper_case[] = "\tJUST! A, TEST; STRING 1/*+-.\r\n"; - static const char lower_case[] = "\tjust! a, test; string 1/*+-.\r\n"; - static const char symbols_stripped[] = "justateststring1"; - - SetLastError(0xdeadbeef); - ret = LCMapStringA(LOCALE_USER_DEFAULT, LOCALE_USE_CP_ACP | LCMAP_LOWERCASE, - lower_case, -1, buf, sizeof(buf)); - ok(ret == lstrlenA(lower_case) + 1, - "ret %d, error %d, expected value %d\n", - ret, GetLastError(), lstrlenA(lower_case) + 1); - ok(!memcmp(buf, lower_case, ret), "LCMapStringA should return %s, but not %s\n", lower_case, buf); - - ret = LCMapStringA(LOCALE_USER_DEFAULT, LCMAP_LOWERCASE | LCMAP_UPPERCASE, - upper_case, -1, buf, sizeof(buf)); - ok(!ret, "LCMAP_LOWERCASE and LCMAP_UPPERCASE are mutually exclusive\n"); - ok(GetLastError() == ERROR_INVALID_FLAGS, - "unexpected error code %d\n", GetLastError()); - - ret = LCMapStringA(LOCALE_USER_DEFAULT, LCMAP_HIRAGANA | LCMAP_KATAKANA, - upper_case, -1, buf, sizeof(buf)); - ok(!ret, "LCMAP_HIRAGANA and LCMAP_KATAKANA are mutually exclusive\n"); - ok(GetLastError() == ERROR_INVALID_FLAGS, - "unexpected error code %d\n", GetLastError()); - - ret = LCMapStringA(LOCALE_USER_DEFAULT, LCMAP_HALFWIDTH | LCMAP_FULLWIDTH, - upper_case, -1, buf, sizeof(buf)); - ok(!ret, "LCMAP_HALFWIDTH | LCMAP_FULLWIDTH are mutually exclusive\n"); - ok(GetLastError() == ERROR_INVALID_FLAGS, - "unexpected error code %d\n", GetLastError()); - - ret = LCMapStringA(LOCALE_USER_DEFAULT, LCMAP_TRADITIONAL_CHINESE | LCMAP_SIMPLIFIED_CHINESE, - upper_case, -1, buf, sizeof(buf)); - ok(!ret, "LCMAP_TRADITIONAL_CHINESE and LCMAP_SIMPLIFIED_CHINESE are mutually exclusive\n"); - ok(GetLastError() == ERROR_INVALID_FLAGS, - "unexpected error code %d\n", GetLastError()); - - /* SORT_STRINGSORT must be used exclusively with LCMAP_SORTKEY */ - SetLastError(0xdeadbeef); - ret = LCMapStringA(LOCALE_USER_DEFAULT, LCMAP_LOWERCASE | SORT_STRINGSORT, - upper_case, -1, buf, sizeof(buf)); - ok(GetLastError() == ERROR_INVALID_FLAGS, "expected ERROR_INVALID_FLAGS, got %d\n", GetLastError()); - ok(!ret, "SORT_STRINGSORT without LCMAP_SORTKEY must fail\n"); - - /* test LCMAP_LOWERCASE */ - ret = LCMapStringA(LOCALE_USER_DEFAULT, LCMAP_LOWERCASE, - upper_case, -1, buf, sizeof(buf)); - ok(ret == lstrlenA(upper_case) + 1, - "ret %d, error %d, expected value %d\n", - ret, GetLastError(), lstrlenA(upper_case) + 1); - ok(!lstrcmpA(buf, lower_case), "LCMapStringA should return %s, but not %s\n", lower_case, buf); - - /* test LCMAP_UPPERCASE */ - ret = LCMapStringA(LOCALE_USER_DEFAULT, LCMAP_UPPERCASE, - lower_case, -1, buf, sizeof(buf)); - ok(ret == lstrlenA(lower_case) + 1, - "ret %d, error %d, expected value %d\n", - ret, GetLastError(), lstrlenA(lower_case) + 1); - ok(!lstrcmpA(buf, upper_case), "LCMapStringA should return %s, but not %s\n", upper_case, buf); - - /* test buffer overflow */ - SetLastError(0xdeadbeef); - ret = LCMapStringA(LOCALE_USER_DEFAULT, LCMAP_UPPERCASE, - lower_case, -1, buf, 4); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "should return 0 and ERROR_INSUFFICIENT_BUFFER, got %d\n", ret); - - /* LCMAP_UPPERCASE or LCMAP_LOWERCASE should accept src == dst */ - lstrcpyA(buf, lower_case); - ret = LCMapStringA(LOCALE_USER_DEFAULT, LCMAP_UPPERCASE, - buf, -1, buf, sizeof(buf)); - if (!ret) /* Win9x */ - trace("Ignoring LCMapStringA(LCMAP_UPPERCASE, buf, buf) error on Win9x\n"); - else - { - ok(ret == lstrlenA(lower_case) + 1, - "ret %d, error %d, expected value %d\n", - ret, GetLastError(), lstrlenA(lower_case) + 1); - ok(!lstrcmpA(buf, upper_case), "LCMapStringA should return %s, but not %s\n", upper_case, buf); - } - lstrcpyA(buf, upper_case); - ret = LCMapStringA(LOCALE_USER_DEFAULT, LCMAP_LOWERCASE, - buf, -1, buf, sizeof(buf)); - if (!ret) /* Win9x */ - trace("Ignoring LCMapStringA(LCMAP_LOWERCASE, buf, buf) error on Win9x\n"); - else - { - ok(ret == lstrlenA(upper_case) + 1, - "ret %d, error %d, expected value %d\n", - ret, GetLastError(), lstrlenA(lower_case) + 1); - ok(!lstrcmpA(buf, lower_case), "LCMapStringA should return %s, but not %s\n", lower_case, buf); - } - - /* otherwise src == dst should fail */ - SetLastError(0xdeadbeef); - ret = LCMapStringA(LOCALE_USER_DEFAULT, LCMAP_SORTKEY | LCMAP_UPPERCASE, - buf, 10, buf, sizeof(buf)); - ok(GetLastError() == ERROR_INVALID_FLAGS /* NT */ || - GetLastError() == ERROR_INVALID_PARAMETER /* Win9x */, - "unexpected error code %d\n", GetLastError()); - ok(!ret, "src == dst without LCMAP_UPPERCASE or LCMAP_LOWERCASE must fail\n"); - - /* test whether '\0' is always appended */ - ret = LCMapStringA(LOCALE_USER_DEFAULT, LCMAP_SORTKEY, - upper_case, -1, buf, sizeof(buf)); - ok(ret, "LCMapStringA must succeed\n"); - ok(buf[ret-1] == 0, "LCMapStringA not null-terminated\n"); - ret2 = LCMapStringA(LOCALE_USER_DEFAULT, LCMAP_SORTKEY, - upper_case, lstrlenA(upper_case), buf2, sizeof(buf2)); - ok(ret2, "LCMapStringA must succeed\n"); - ok(buf2[ret2-1] == 0, "LCMapStringA not null-terminated\n" ); - ok(ret == ret2, "lengths of sort keys must be equal\n"); - ok(!lstrcmpA(buf, buf2), "sort keys must be equal\n"); - - /* test LCMAP_SORTKEY | NORM_IGNORECASE */ - ret = LCMapStringA(LOCALE_USER_DEFAULT, LCMAP_SORTKEY | NORM_IGNORECASE, - upper_case, -1, buf, sizeof(buf)); - ok(ret, "LCMapStringA must succeed\n"); - ret2 = LCMapStringA(LOCALE_USER_DEFAULT, LCMAP_SORTKEY, - lower_case, -1, buf2, sizeof(buf2)); - ok(ret2, "LCMapStringA must succeed\n"); - ok(ret == ret2, "lengths of sort keys must be equal\n"); - ok(!lstrcmpA(buf, buf2), "sort keys must be equal\n"); - - /* Don't test LCMAP_SORTKEY | NORM_IGNORENONSPACE, produces different - results from plain LCMAP_SORTKEY on Vista */ - - /* test LCMAP_SORTKEY | NORM_IGNORESYMBOLS */ - ret = LCMapStringA(LOCALE_USER_DEFAULT, LCMAP_SORTKEY | NORM_IGNORESYMBOLS, - lower_case, -1, buf, sizeof(buf)); - ok(ret, "LCMapStringA must succeed\n"); - ret2 = LCMapStringA(LOCALE_USER_DEFAULT, LCMAP_SORTKEY, - symbols_stripped, -1, buf2, sizeof(buf2)); - ok(ret2, "LCMapStringA must succeed\n"); - ok(ret == ret2, "lengths of sort keys must be equal\n"); - ok(!lstrcmpA(buf, buf2), "sort keys must be equal\n"); - - /* test NORM_IGNORENONSPACE */ - lstrcpyA(buf, "foo"); - ret = LCMapStringA(LOCALE_USER_DEFAULT, NORM_IGNORENONSPACE, - lower_case, -1, buf, sizeof(buf)); - ok(ret == lstrlenA(lower_case) + 1, "LCMapStringA should return %d, ret = %d\n", - lstrlenA(lower_case) + 1, ret); - ok(!lstrcmpA(buf, lower_case), "LCMapStringA should return %s, but not %s\n", lower_case, buf); - - /* test NORM_IGNORESYMBOLS */ - lstrcpyA(buf, "foo"); - ret = LCMapStringA(LOCALE_USER_DEFAULT, NORM_IGNORESYMBOLS, - lower_case, -1, buf, sizeof(buf)); - ok(ret == lstrlenA(symbols_stripped) + 1, "LCMapStringA should return %d, ret = %d\n", - lstrlenA(symbols_stripped) + 1, ret); - ok(!lstrcmpA(buf, symbols_stripped), "LCMapStringA should return %s, but not %s\n", lower_case, buf); - - /* test srclen = 0 */ - SetLastError(0xdeadbeef); - ret = LCMapStringA(LOCALE_USER_DEFAULT, 0, upper_case, 0, buf, sizeof(buf)); - ok(!ret, "LCMapStringA should fail with srclen = 0\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "unexpected error code %d\n", GetLastError()); -} - -static void test_LCMapStringW(void) -{ - int ret, ret2; - WCHAR buf[256], buf2[256]; - char *p_buf = (char *)buf, *p_buf2 = (char *)buf2; - static const WCHAR upper_case[] = {'\t','J','U','S','T','!',' ','A',',',' ','T','E','S','T',';',' ','S','T','R','I','N','G',' ','1','/','*','+','-','.','\r','\n',0}; - static const WCHAR lower_case[] = {'\t','j','u','s','t','!',' ','a',',',' ','t','e','s','t',';',' ','s','t','r','i','n','g',' ','1','/','*','+','-','.','\r','\n',0}; - static const WCHAR symbols_stripped[] = {'j','u','s','t','a','t','e','s','t','s','t','r','i','n','g','1',0}; - static const WCHAR fooW[] = {'f','o','o',0}; - - ret = LCMapStringW(LOCALE_USER_DEFAULT, LCMAP_LOWERCASE | LCMAP_UPPERCASE, - upper_case, -1, buf, sizeof(buf)/sizeof(WCHAR)); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("LCMapStringW is not implemented\n"); - return; - } - if (broken(ret)) - ok(lstrcmpW(buf, upper_case) == 0, "Expected upper case string\n"); - else - { - ok(!ret, "LCMAP_LOWERCASE and LCMAP_UPPERCASE are mutually exclusive\n"); - ok(GetLastError() == ERROR_INVALID_FLAGS, - "unexpected error code %d\n", GetLastError()); - } - - ret = LCMapStringW(LOCALE_USER_DEFAULT, LCMAP_HIRAGANA | LCMAP_KATAKANA, - upper_case, -1, buf, sizeof(buf)/sizeof(WCHAR)); - ok(!ret, "LCMAP_HIRAGANA and LCMAP_KATAKANA are mutually exclusive\n"); - ok(GetLastError() == ERROR_INVALID_FLAGS, - "unexpected error code %d\n", GetLastError()); - - ret = LCMapStringW(LOCALE_USER_DEFAULT, LCMAP_HALFWIDTH | LCMAP_FULLWIDTH, - upper_case, -1, buf, sizeof(buf)/sizeof(WCHAR)); - ok(!ret, "LCMAP_HALFWIDTH | LCMAP_FULLWIDTH are mutually exclusive\n"); - ok(GetLastError() == ERROR_INVALID_FLAGS, - "unexpected error code %d\n", GetLastError()); - - ret = LCMapStringW(LOCALE_USER_DEFAULT, LCMAP_TRADITIONAL_CHINESE | LCMAP_SIMPLIFIED_CHINESE, - upper_case, -1, buf, sizeof(buf)/sizeof(WCHAR)); - ok(!ret, "LCMAP_TRADITIONAL_CHINESE and LCMAP_SIMPLIFIED_CHINESE are mutually exclusive\n"); - ok(GetLastError() == ERROR_INVALID_FLAGS, - "unexpected error code %d\n", GetLastError()); - - /* SORT_STRINGSORT must be used exclusively with LCMAP_SORTKEY */ - SetLastError(0xdeadbeef); - ret = LCMapStringW(LOCALE_USER_DEFAULT, LCMAP_LOWERCASE | SORT_STRINGSORT, - upper_case, -1, buf, sizeof(buf)/sizeof(WCHAR)); - ok(GetLastError() == ERROR_INVALID_FLAGS, "expected ERROR_INVALID_FLAGS, got %d\n", GetLastError()); - ok(!ret, "SORT_STRINGSORT without LCMAP_SORTKEY must fail\n"); - - /* test LCMAP_LOWERCASE */ - ret = LCMapStringW(LOCALE_USER_DEFAULT, LCMAP_LOWERCASE, - upper_case, -1, buf, sizeof(buf)/sizeof(WCHAR)); - ok(ret == lstrlenW(upper_case) + 1, - "ret %d, error %d, expected value %d\n", - ret, GetLastError(), lstrlenW(upper_case) + 1); - ok(!lstrcmpW(buf, lower_case), "string compare mismatch\n"); - - /* test LCMAP_UPPERCASE */ - ret = LCMapStringW(LOCALE_USER_DEFAULT, LCMAP_UPPERCASE, - lower_case, -1, buf, sizeof(buf)/sizeof(WCHAR)); - ok(ret == lstrlenW(lower_case) + 1, - "ret %d, error %d, expected value %d\n", - ret, GetLastError(), lstrlenW(lower_case) + 1); - ok(!lstrcmpW(buf, upper_case), "string compare mismatch\n"); - - /* test buffer overflow */ - SetLastError(0xdeadbeef); - ret = LCMapStringW(LOCALE_USER_DEFAULT, LCMAP_UPPERCASE, - lower_case, -1, buf, 4); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "should return 0 and ERROR_INSUFFICIENT_BUFFER, got %d\n", ret); - - /* LCMAP_UPPERCASE or LCMAP_LOWERCASE should accept src == dst */ - lstrcpyW(buf, lower_case); - ret = LCMapStringW(LOCALE_USER_DEFAULT, LCMAP_UPPERCASE, - buf, -1, buf, sizeof(buf)/sizeof(WCHAR)); - ok(ret == lstrlenW(lower_case) + 1, - "ret %d, error %d, expected value %d\n", - ret, GetLastError(), lstrlenW(lower_case) + 1); - ok(!lstrcmpW(buf, upper_case), "string compare mismatch\n"); - - lstrcpyW(buf, upper_case); - ret = LCMapStringW(LOCALE_USER_DEFAULT, LCMAP_LOWERCASE, - buf, -1, buf, sizeof(buf)/sizeof(WCHAR)); - ok(ret == lstrlenW(upper_case) + 1, - "ret %d, error %d, expected value %d\n", - ret, GetLastError(), lstrlenW(lower_case) + 1); - ok(!lstrcmpW(buf, lower_case), "string compare mismatch\n"); - - /* otherwise src == dst should fail */ - SetLastError(0xdeadbeef); - ret = LCMapStringW(LOCALE_USER_DEFAULT, LCMAP_SORTKEY | LCMAP_UPPERCASE, - buf, 10, buf, sizeof(buf)); - ok(GetLastError() == ERROR_INVALID_FLAGS /* NT */ || - GetLastError() == ERROR_INVALID_PARAMETER /* Win9x */, - "unexpected error code %d\n", GetLastError()); - ok(!ret, "src == dst without LCMAP_UPPERCASE or LCMAP_LOWERCASE must fail\n"); - - /* test whether '\0' is always appended */ - ret = LCMapStringW(LOCALE_USER_DEFAULT, LCMAP_SORTKEY, - upper_case, -1, buf, sizeof(buf)); - ok(ret, "LCMapStringW must succeed\n"); - ret2 = LCMapStringW(LOCALE_USER_DEFAULT, LCMAP_SORTKEY, - upper_case, lstrlenW(upper_case), buf2, sizeof(buf2)); - ok(ret, "LCMapStringW must succeed\n"); - ok(ret == ret2, "lengths of sort keys must be equal\n"); - ok(!lstrcmpA(p_buf, p_buf2), "sort keys must be equal\n"); - - /* test LCMAP_SORTKEY | NORM_IGNORECASE */ - ret = LCMapStringW(LOCALE_USER_DEFAULT, LCMAP_SORTKEY | NORM_IGNORECASE, - upper_case, -1, buf, sizeof(buf)); - ok(ret, "LCMapStringW must succeed\n"); - ret2 = LCMapStringW(LOCALE_USER_DEFAULT, LCMAP_SORTKEY, - lower_case, -1, buf2, sizeof(buf2)); - ok(ret2, "LCMapStringW must succeed\n"); - ok(ret == ret2, "lengths of sort keys must be equal\n"); - ok(!lstrcmpA(p_buf, p_buf2), "sort keys must be equal\n"); - - /* Don't test LCMAP_SORTKEY | NORM_IGNORENONSPACE, produces different - results from plain LCMAP_SORTKEY on Vista */ - - /* test LCMAP_SORTKEY | NORM_IGNORESYMBOLS */ - ret = LCMapStringW(LOCALE_USER_DEFAULT, LCMAP_SORTKEY | NORM_IGNORESYMBOLS, - lower_case, -1, buf, sizeof(buf)); - ok(ret, "LCMapStringW must succeed\n"); - ret2 = LCMapStringW(LOCALE_USER_DEFAULT, LCMAP_SORTKEY, - symbols_stripped, -1, buf2, sizeof(buf2)); - ok(ret2, "LCMapStringW must succeed\n"); - ok(ret == ret2, "lengths of sort keys must be equal\n"); - ok(!lstrcmpA(p_buf, p_buf2), "sort keys must be equal\n"); - - /* test NORM_IGNORENONSPACE */ - lstrcpyW(buf, fooW); - ret = LCMapStringW(LOCALE_USER_DEFAULT, NORM_IGNORENONSPACE, - lower_case, -1, buf, sizeof(buf)/sizeof(WCHAR)); - ok(ret == lstrlenW(lower_case) + 1, "LCMapStringW should return %d, ret = %d\n", - lstrlenW(lower_case) + 1, ret); - ok(!lstrcmpW(buf, lower_case), "string comparison mismatch\n"); - - /* test NORM_IGNORESYMBOLS */ - lstrcpyW(buf, fooW); - ret = LCMapStringW(LOCALE_USER_DEFAULT, NORM_IGNORESYMBOLS, - lower_case, -1, buf, sizeof(buf)/sizeof(WCHAR)); - ok(ret == lstrlenW(symbols_stripped) + 1, "LCMapStringW should return %d, ret = %d\n", - lstrlenW(symbols_stripped) + 1, ret); - ok(!lstrcmpW(buf, symbols_stripped), "string comparison mismatch\n"); - - /* test srclen = 0 */ - SetLastError(0xdeadbeef); - ret = LCMapStringW(LOCALE_USER_DEFAULT, 0, upper_case, 0, buf, sizeof(buf)/sizeof(WCHAR)); - ok(!ret, "LCMapStringW should fail with srclen = 0\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "unexpected error code %d\n", GetLastError()); -} - -/* this requires collation table patch to make it MS compatible */ -static const char * const strings_sorted[] = -{ -"'", -"-", -"!", -"\"", -".", -":", -"\\", -"_", -"`", -"{", -"}", -"+", -"0", -"1", -"2", -"3", -"4", -"5", -"6", -"7", -"8", -"9", -"a", -"A", -"b", -"B", -"c", -"C" -}; - -static const char * const strings[] = -{ -"C", -"\"", -"9", -"'", -"}", -"-", -"7", -"+", -"`", -"1", -"a", -"5", -"\\", -"8", -"B", -"3", -"_", -"6", -"{", -"2", -"c", -"4", -"!", -"0", -"A", -":", -"b", -"." -}; - -static int compare_string1(const void *e1, const void *e2) -{ - const char *s1 = *(const char *const *)e1; - const char *s2 = *(const char *const *)e2; - - return lstrcmpA(s1, s2); -} - -static int compare_string2(const void *e1, const void *e2) -{ - const char *s1 = *(const char *const *)e1; - const char *s2 = *(const char *const *)e2; - - return CompareStringA(0, 0, s1, -1, s2, -1) - 2; -} - -static int compare_string3(const void *e1, const void *e2) -{ - const char *s1 = *(const char *const *)e1; - const char *s2 = *(const char *const *)e2; - char key1[256], key2[256]; - - LCMapStringA(0, LCMAP_SORTKEY, s1, -1, key1, sizeof(key1)); - LCMapStringA(0, LCMAP_SORTKEY, s2, -1, key2, sizeof(key2)); - return strcmp(key1, key2); -} - -static void test_sorting(void) -{ - char buf[256]; - char **str_buf = (char **)buf; - int i; - - assert(sizeof(buf) >= sizeof(strings)); - - /* 1. sort using lstrcmpA */ - memcpy(buf, strings, sizeof(strings)); - qsort(buf, sizeof(strings)/sizeof(strings[0]), sizeof(strings[0]), compare_string1); - for (i = 0; i < sizeof(strings)/sizeof(strings[0]); i++) - { - ok(!strcmp(strings_sorted[i], str_buf[i]), - "qsort using lstrcmpA failed for element %d\n", i); - } - /* 2. sort using CompareStringA */ - memcpy(buf, strings, sizeof(strings)); - qsort(buf, sizeof(strings)/sizeof(strings[0]), sizeof(strings[0]), compare_string2); - for (i = 0; i < sizeof(strings)/sizeof(strings[0]); i++) - { - ok(!strcmp(strings_sorted[i], str_buf[i]), - "qsort using CompareStringA failed for element %d\n", i); - } - /* 3. sort using sort keys */ - memcpy(buf, strings, sizeof(strings)); - qsort(buf, sizeof(strings)/sizeof(strings[0]), sizeof(strings[0]), compare_string3); - for (i = 0; i < sizeof(strings)/sizeof(strings[0]); i++) - { - ok(!strcmp(strings_sorted[i], str_buf[i]), - "qsort using sort keys failed for element %d\n", i); - } -} - -static void test_FoldStringA(void) -{ - int ret, i, j; - BOOL is_special; - char src[256], dst[256]; - static const char digits_src[] = { 0xB9,0xB2,0xB3,'\0' }; - static const char digits_dst[] = { '1','2','3','\0' }; - static const char composite_src[] = - { - 0x8a,0x8e,0x9a,0x9e,0x9f,0xc0,0xc1,0xc2, - 0xc3,0xc4,0xc5,0xc7,0xc8,0xc9,0xca,0xcb, - 0xcc,0xcd,0xce,0xcf,0xd1,0xd2,0xd3,0xd4, - 0xd5,0xd6,0xd8,0xd9,0xda,0xdb,0xdc,0xdd, - 0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe7,0xe8, - 0xe9,0xea,0xeb,0xec,0xed,0xee,0xef,0xf1, - 0xf2,0xf3,0xf4,0xf5,0xf6,0xf8,0xf9,0xfa, - 0xfb,0xfc,0xfd,0xff,'\0' - }; - static const char composite_dst[] = - { - 0x53,0x3f,0x5a,0x3f,0x73,0x3f,0x7a,0x3f, - 0x59,0xa8,0x41,0x60,0x41,0xb4,0x41,0x5e, - 0x41,0x7e,0x41,0xa8,0x41,0xb0,0x43,0xb8, - 0x45,0x60,0x45,0xb4,0x45,0x5e,0x45,0xa8, - 0x49,0x60,0x49,0xb4,0x49,0x5e,0x49,0xa8, - 0x4e,0x7e,0x4f,0x60,0x4f,0xb4,0x4f,0x5e, - 0x4f,0x7e,0x4f,0xa8,0x4f,0x3f,0x55,0x60, - 0x55,0xb4,0x55,0x5e,0x55,0xa8,0x59,0xb4, - 0x61,0x60,0x61,0xb4,0x61,0x5e,0x61,0x7e, - 0x61,0xa8,0x61,0xb0,0x63,0xb8,0x65,0x60, - 0x65,0xb4,0x65,0x5e,0x65,0xa8,0x69,0x60, - 0x69,0xb4,0x69,0x5e,0x69,0xa8,0x6e,0x7e, - 0x6f,0x60,0x6f,0xb4,0x6f,0x5e,0x6f,0x7e, - 0x6f,0xa8,0x6f,0x3f,0x75,0x60,0x75,0xb4, - 0x75,0x5e,0x75,0xa8,0x79,0xb4,0x79,0xa8,'\0' - }; - static const char composite_dst_alt[] = - { - 0x53,0x3f,0x5a,0x3f,0x73,0x3f,0x7a,0x3f, - 0x59,0xa8,0x41,0x60,0x41,0xb4,0x41,0x5e, - 0x41,0x7e,0x41,0xa8,0x41,0xb0,0x43,0xb8, - 0x45,0x60,0x45,0xb4,0x45,0x5e,0x45,0xa8, - 0x49,0x60,0x49,0xb4,0x49,0x5e,0x49,0xa8, - 0x4e,0x7e,0x4f,0x60,0x4f,0xb4,0x4f,0x5e, - 0x4f,0x7e,0x4f,0xa8,0xd8,0x55,0x60,0x55, - 0xb4,0x55,0x5e,0x55,0xa8,0x59,0xb4,0x61, - 0x60,0x61,0xb4,0x61,0x5e,0x61,0x7e,0x61, - 0xa8,0x61,0xb0,0x63,0xb8,0x65,0x60,0x65, - 0xb4,0x65,0x5e,0x65,0xa8,0x69,0x60,0x69, - 0xb4,0x69,0x5e,0x69,0xa8,0x6e,0x7e,0x6f, - 0x60,0x6f,0xb4,0x6f,0x5e,0x6f,0x7e,0x6f, - 0xa8,0xf8,0x75,0x60,0x75,0xb4,0x75,0x5e, - 0x75,0xa8,0x79,0xb4,0x79,0xa8,'\0' - }; - static const char ligatures_src[] = - { - 0x8C,0x9C,0xC6,0xDE,0xDF,0xE6,0xFE,'\0' - }; - static const char ligatures_dst[] = - { - 'O','E','o','e','A','E','T','H','s','s','a','e','t','h','\0' - }; - static const struct special - { - char src; - char dst[4]; - } foldczone_special[] = - { - /* src dst */ - { 0x85, { 0x2e, 0x2e, 0x2e, 0x00 } }, - { 0x98, { 0x20, 0x7e, 0x00 } }, - { 0x99, { 0x54, 0x4d, 0x00 } }, - { 0xa0, { 0x20, 0x00 } }, - { 0xa8, { 0x20, 0xa8, 0x00 } }, - { 0xaa, { 0x61, 0x00 } }, - { 0xaf, { 0x20, 0xaf, 0x00 } }, - { 0xb2, { 0x32, 0x00 } }, - { 0xb3, { 0x33, 0x00 } }, - { 0xb4, { 0x20, 0xb4, 0x00 } }, - { 0xb8, { 0x20, 0xb8, 0x00 } }, - { 0xb9, { 0x31, 0x00 } }, - { 0xba, { 0x6f, 0x00 } }, - { 0xbc, { 0x31, 0x2f, 0x34, 0x00 } }, - { 0xbd, { 0x31, 0x2f, 0x32, 0x00 } }, - { 0xbe, { 0x33, 0x2f, 0x34, 0x00 } }, - { 0x00 } - }; - - if (!pFoldStringA) - return; /* FoldString is present in NT v3.1+, but not 95/98/Me */ - - /* these tests are locale specific */ - if (GetACP() != 1252) - { - trace("Skipping FoldStringA tests for a not Latin 1 locale\n"); - return; - } - - /* MAP_FOLDDIGITS */ - SetLastError(0); - ret = pFoldStringA(MAP_FOLDDIGITS, digits_src, -1, dst, 256); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("FoldStringA is not implemented\n"); - return; - } - ok(ret == 4, "Expected ret == 4, got %d, error %d\n", ret, GetLastError()); - ok(strcmp(dst, digits_dst) == 0, - "MAP_FOLDDIGITS: Expected '%s', got '%s'\n", digits_dst, dst); - for (i = 1; i < 256; i++) - { - if (!strchr(digits_src, i)) - { - src[0] = i; - src[1] = '\0'; - SetLastError(0); - ret = pFoldStringA(MAP_FOLDDIGITS, src, -1, dst, 256); - ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError()); - ok(dst[0] == src[0], - "MAP_FOLDDIGITS: Expected '%s', got '%s'\n", src, dst); - } - } - - /* MAP_EXPAND_LIGATURES */ - SetLastError(0); - ret = pFoldStringA(MAP_EXPAND_LIGATURES, ligatures_src, -1, dst, 256); - /* NT 4.0 doesn't support MAP_EXPAND_LIGATURES */ - if (!(ret == 0 && GetLastError() == ERROR_INVALID_FLAGS)) { - ok(ret == sizeof(ligatures_dst), "Got %d, error %d\n", ret, GetLastError()); - ok(strcmp(dst, ligatures_dst) == 0, - "MAP_EXPAND_LIGATURES: Expected '%s', got '%s'\n", ligatures_dst, dst); - for (i = 1; i < 256; i++) - { - if (!strchr(ligatures_src, i)) - { - src[0] = i; - src[1] = '\0'; - SetLastError(0); - ret = pFoldStringA(MAP_EXPAND_LIGATURES, src, -1, dst, 256); - if (ret == 3) - { - /* Vista */ - ok((i == 0xDC && lstrcmpA(dst, "UE") == 0) || - (i == 0xFC && lstrcmpA(dst, "ue") == 0), - "Got %s for %d\n", dst, i); - } - else - { - ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError()); - ok(dst[0] == src[0], - "MAP_EXPAND_LIGATURES: Expected '%s', got '%s'\n", src, dst); - } - } - } - } - - /* MAP_COMPOSITE */ - SetLastError(0); - ret = pFoldStringA(MAP_COMPOSITE, composite_src, -1, dst, 256); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - ok(ret == 121 || ret == 119, "Expected 121 or 119, got %d\n", ret); - ok(strcmp(dst, composite_dst) == 0 || strcmp(dst, composite_dst_alt) == 0, - "MAP_COMPOSITE: Mismatch, got '%s'\n", dst); - - for (i = 1; i < 256; i++) - { - if (!strchr(composite_src, i)) - { - src[0] = i; - src[1] = '\0'; - SetLastError(0); - ret = pFoldStringA(MAP_COMPOSITE, src, -1, dst, 256); - ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError()); - ok(dst[0] == src[0], - "0x%02x, 0x%02x,0x%02x,0x%02x,\n", (unsigned char)src[0], - (unsigned char)dst[0],(unsigned char)dst[1],(unsigned char)dst[2]); - } - } - - /* MAP_FOLDCZONE */ - for (i = 1; i < 256; i++) - { - src[0] = i; - src[1] = '\0'; - SetLastError(0); - ret = pFoldStringA(MAP_FOLDCZONE, src, -1, dst, 256); - is_special = FALSE; - for (j = 0; foldczone_special[j].src != 0 && ! is_special; j++) - { - if (foldczone_special[j].src == src[0]) - { - ok(ret == 2 || ret == lstrlenA(foldczone_special[j].dst) + 1, - "Expected ret == 2 or %d, got %d, error %d\n", - lstrlenA(foldczone_special[j].dst) + 1, ret, GetLastError()); - ok(src[0] == dst[0] || lstrcmpA(foldczone_special[j].dst, dst) == 0, - "MAP_FOLDCZONE: string mismatch for 0x%02x\n", - (unsigned char)src[0]); - is_special = TRUE; - } - } - if (! is_special) - { - ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError()); - ok(src[0] == dst[0], - "MAP_FOLDCZONE: Expected 0x%02x, got 0x%02x\n", - (unsigned char)src[0], (unsigned char)dst[0]); - } - } - - /* MAP_PRECOMPOSED */ - for (i = 1; i < 256; i++) - { - src[0] = i; - src[1] = '\0'; - SetLastError(0); - ret = pFoldStringA(MAP_PRECOMPOSED, src, -1, dst, 256); - ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError()); - ok(src[0] == dst[0], - "MAP_PRECOMPOSED: Expected 0x%02x, got 0x%02x\n", - (unsigned char)src[0], (unsigned char)dst[0]); - } -} - -static void test_FoldStringW(void) -{ - int ret; - unsigned int i, j; - WCHAR src[256], dst[256], ch, prev_ch = 1; - static const DWORD badFlags[] = - { - 0, - MAP_PRECOMPOSED|MAP_COMPOSITE, - MAP_PRECOMPOSED|MAP_EXPAND_LIGATURES, - MAP_COMPOSITE|MAP_EXPAND_LIGATURES - }; - /* Ranges of digits 0-9 : Must be sorted! */ - static const WCHAR digitRanges[] = - { - 0x0030, /* '0'-'9' */ - 0x0660, /* Eastern Arabic */ - 0x06F0, /* Arabic - Hindu */ - 0x0966, /* Devengari */ - 0x09E6, /* Bengalii */ - 0x0A66, /* Gurmukhi */ - 0x0AE6, /* Gujarati */ - 0x0B66, /* Oriya */ - 0x0BE6, /* Tamil - No 0 */ - 0x0C66, /* Telugu */ - 0x0CE6, /* Kannada */ - 0x0D66, /* Maylayalam */ - 0x0E50, /* Thai */ - 0x0ED0, /* Laos */ - 0x0F29, /* Tibet - 0 is out of sequence */ - 0x2070, /* Superscript - 1, 2, 3 are out of sequence */ - 0x2080, /* Subscript */ - 0x245F, /* Circled - 0 is out of sequence */ - 0x2473, /* Bracketed */ - 0x2487, /* Full stop */ - 0x2775, /* Inverted circled - No 0 */ - 0x277F, /* Patterned circled - No 0 */ - 0x2789, /* Inverted Patterned circled - No 0 */ - 0x3020, /* Hangzhou */ - 0xff10, /* Pliene chasse (?) */ - 0xffff /* Terminator */ - }; - /* Digits which are represented, but out of sequence */ - static const WCHAR outOfSequenceDigits[] = - { - 0xB9, /* Superscript 1 */ - 0xB2, /* Superscript 2 */ - 0xB3, /* Superscript 3 */ - 0x0F33, /* Tibetan half zero */ - 0x24EA, /* Circled 0 */ - 0x3007, /* Ideographic number zero */ - '\0' /* Terminator */ - }; - /* Digits in digitRanges for which no representation is available */ - static const WCHAR noDigitAvailable[] = - { - 0x0BE6, /* No Tamil 0 */ - 0x0F29, /* No Tibetan half zero (out of sequence) */ - 0x2473, /* No Bracketed 0 */ - 0x2487, /* No 0 Full stop */ - 0x2775, /* No inverted circled 0 */ - 0x277F, /* No patterned circled */ - 0x2789, /* No inverted Patterned circled */ - 0x3020, /* No Hangzhou 0 */ - '\0' /* Terminator */ - }; - static const WCHAR foldczone_src[] = - { - 'W', 'i', 'n', 'e', 0x0348, 0x0551, 0x1323, 0x280d, - 0xff37, 0xff49, 0xff4e, 0xff45, '\0' - }; - static const WCHAR foldczone_dst[] = - { - 'W','i','n','e',0x0348,0x0551,0x1323,0x280d,'W','i','n','e','\0' - }; - static const WCHAR ligatures_src[] = - { - 'W', 'i', 'n', 'e', 0x03a6, 0x03b9, 0x03bd, 0x03b5, - 0x00c6, 0x00de, 0x00df, 0x00e6, 0x00fe, 0x0132, 0x0133, 0x0152, - 0x0153, 0x01c4, 0x01c5, 0x01c6, 0x01c7, 0x01c8, 0x01c9, 0x01ca, - 0x01cb, 0x01cc, 0x01e2, 0x01e3, 0x01f1, 0x01f2, 0x01f3, 0x01fc, - 0x01fd, 0x05f0, 0x05f1, 0x05f2, 0xfb00, 0xfb01, 0xfb02, 0xfb03, - 0xfb04, 0xfb05, 0xfb06, '\0' - }; - static const WCHAR ligatures_dst[] = - { - 'W','i','n','e',0x03a6,0x03b9,0x03bd,0x03b5, - 'A','E','T','H','s','s','a','e','t','h','I','J','i','j','O','E','o','e', - 'D',0x017d,'D',0x017e,'d',0x017e,'L','J','L','j','l','j','N','J','N','j', - 'n','j',0x0100,0x0112,0x0101,0x0113,'D','Z','D','z','d','z',0x00c1,0x00c9, - 0x00e1,0x00e9,0x05d5,0x05d5,0x05d5,0x05d9,0x05d9,0x05d9,'f','f','f','i', - 'f','l','f','f','i','f','f','l',0x017f,'t','s','t','\0' - }; - - if (!pFoldStringW) - { - win_skip("FoldStringW is not available\n"); - return; /* FoldString is present in NT v3.1+, but not 95/98/Me */ - } - - /* Invalid flag combinations */ - for (i = 0; i < sizeof(badFlags)/sizeof(badFlags[0]); i++) - { - src[0] = dst[0] = '\0'; - SetLastError(0); - ret = pFoldStringW(badFlags[i], src, 256, dst, 256); - if (GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("FoldStringW is not implemented\n"); - return; - } - ok(!ret && GetLastError() == ERROR_INVALID_FLAGS, - "Expected ERROR_INVALID_FLAGS, got %d\n", GetLastError()); - } - - /* src & dst cannot be the same */ - SetLastError(0); - ret = pFoldStringW(MAP_FOLDCZONE, src, -1, src, 256); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* src can't be NULL */ - SetLastError(0); - ret = pFoldStringW(MAP_FOLDCZONE, NULL, -1, dst, 256); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* srclen can't be 0 */ - SetLastError(0); - ret = pFoldStringW(MAP_FOLDCZONE, src, 0, dst, 256); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* dstlen can't be < 0 */ - SetLastError(0); - ret = pFoldStringW(MAP_FOLDCZONE, src, -1, dst, -1); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* Ret includes terminating NUL which is appended if srclen = -1 */ - SetLastError(0); - src[0] = 'A'; - src[1] = '\0'; - dst[0] = '\0'; - ret = pFoldStringW(MAP_FOLDCZONE, src, -1, dst, 256); - ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError()); - ok(dst[0] == 'A' && dst[1] == '\0', - "srclen=-1: Expected ret=2 [%d,%d], got ret=%d [%d,%d], err=%d\n", - 'A', '\0', ret, dst[0], dst[1], GetLastError()); - - /* If size is given, result is not NUL terminated */ - SetLastError(0); - src[0] = 'A'; - src[1] = 'A'; - dst[0] = 'X'; - dst[1] = 'X'; - ret = pFoldStringW(MAP_FOLDCZONE, src, 1, dst, 256); - ok(ret == 1, "Expected ret == 1, got %d, error %d\n", ret, GetLastError()); - ok(dst[0] == 'A' && dst[1] == 'X', - "srclen=1: Expected ret=1, [%d,%d], got ret=%d,[%d,%d], err=%d\n", - 'A','X', ret, dst[0], dst[1], GetLastError()); - - /* MAP_FOLDDIGITS */ - for (j = 0; j < sizeof(digitRanges)/sizeof(digitRanges[0]); j++) - { - /* Check everything before this range */ - for (ch = prev_ch; ch < digitRanges[j]; ch++) - { - SetLastError(0); - src[0] = ch; - src[1] = dst[0] = '\0'; - ret = pFoldStringW(MAP_FOLDDIGITS, src, -1, dst, 256); - ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError()); - - ok(dst[0] == ch || strchrW(outOfSequenceDigits, ch) || - /* Wine (correctly) maps all Unicode 4.0+ digits */ - isdigitW(ch) || (ch >= 0x24F5 && ch <= 0x24FD) || ch == 0x24FF || ch == 0x19da || - (ch >= 0x1369 && ch <= 0x1371), - "MAP_FOLDDIGITS: ch %d 0x%04x Expected unchanged got %d\n", ch, ch, dst[0]); - } - - if (digitRanges[j] == 0xffff) - break; /* Finished the whole code point space */ - - for (ch = digitRanges[j]; ch < digitRanges[j] + 10; ch++) - { - WCHAR c; - - /* Map out of sequence characters */ - if (ch == 0x2071) c = 0x00B9; /* Superscript 1 */ - else if (ch == 0x2072) c = 0x00B2; /* Superscript 2 */ - else if (ch == 0x2073) c = 0x00B3; /* Superscript 3 */ - else if (ch == 0x245F) c = 0x24EA; /* Circled 0 */ - else c = ch; - SetLastError(0); - src[0] = c; - src[1] = dst[0] = '\0'; - ret = pFoldStringW(MAP_FOLDDIGITS, src, -1, dst, 256); - ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError()); - - ok((dst[0] == '0' + ch - digitRanges[j] && dst[1] == '\0') || - broken( dst[0] == ch ) || /* old Windows versions don't have all mappings */ - (digitRanges[j] == 0x3020 && dst[0] == ch) || /* Hangzhou not present in all Windows versions */ - (digitRanges[j] == 0x0F29 && dst[0] == ch) || /* Tibetan not present in all Windows versions */ - strchrW(noDigitAvailable, c), - "MAP_FOLDDIGITS: ch %d Expected %d got %d\n", - ch, '0' + digitRanges[j] - ch, dst[0]); - } - prev_ch = ch; - } - - /* MAP_FOLDCZONE */ - SetLastError(0); - ret = pFoldStringW(MAP_FOLDCZONE, foldczone_src, -1, dst, 256); - ok(ret == sizeof(foldczone_dst)/sizeof(foldczone_dst[0]), - "Got %d, error %d\n", ret, GetLastError()); - ok(!memcmp(dst, foldczone_dst, sizeof(foldczone_dst)), - "MAP_FOLDCZONE: Expanded incorrectly\n"); - - /* MAP_EXPAND_LIGATURES */ - SetLastError(0); - ret = pFoldStringW(MAP_EXPAND_LIGATURES, ligatures_src, -1, dst, 256); - /* NT 4.0 doesn't support MAP_EXPAND_LIGATURES */ - if (!(ret == 0 && GetLastError() == ERROR_INVALID_FLAGS)) { - ok(ret == sizeof(ligatures_dst)/sizeof(ligatures_dst[0]), - "Got %d, error %d\n", ret, GetLastError()); - ok(!memcmp(dst, ligatures_dst, sizeof(ligatures_dst)), - "MAP_EXPAND_LIGATURES: Expanded incorrectly\n"); - } - - /* FIXME: MAP_PRECOMPOSED : MAP_COMPOSITE */ -} - - - -#define LCID_OK(l) \ - ok(lcid == l, "Expected lcid = %08x, got %08x\n", l, lcid) -#define MKLCID(x,y,z) MAKELCID(MAKELANGID(x, y), z) -#define LCID_RES(src, res) lcid = ConvertDefaultLocale(src); LCID_OK(res) -#define TEST_LCIDLANG(a,b) LCID_RES(MAKELCID(a,b), MAKELCID(a,b)) -#define TEST_LCID(a,b,c) LCID_RES(MKLCID(a,b,c), MKLCID(a,b,c)) - -static void test_ConvertDefaultLocale(void) -{ - LCID lcid; - - /* Doesn't change lcid, even if non default sublang/sort used */ - TEST_LCID(LANG_ENGLISH, SUBLANG_ENGLISH_US, SORT_DEFAULT); - TEST_LCID(LANG_ENGLISH, SUBLANG_ENGLISH_UK, SORT_DEFAULT); - TEST_LCID(LANG_JAPANESE, SUBLANG_DEFAULT, SORT_DEFAULT); - TEST_LCID(LANG_JAPANESE, SUBLANG_DEFAULT, SORT_JAPANESE_UNICODE); - - /* SUBLANG_NEUTRAL -> SUBLANG_DEFAULT */ - LCID_RES(MKLCID(LANG_ENGLISH, SUBLANG_NEUTRAL, SORT_DEFAULT), - MKLCID(LANG_ENGLISH, SUBLANG_DEFAULT, SORT_DEFAULT)); - LCID_RES(MKLCID(LANG_JAPANESE, SUBLANG_NEUTRAL, SORT_DEFAULT), - MKLCID(LANG_JAPANESE, SUBLANG_DEFAULT, SORT_DEFAULT)); - - /* Invariant language is not treated specially */ - TEST_LCID(LANG_INVARIANT, SUBLANG_DEFAULT, SORT_DEFAULT); - - /* User/system default languages alone are not mapped */ - TEST_LCIDLANG(LANG_SYSTEM_DEFAULT, SORT_JAPANESE_UNICODE); - TEST_LCIDLANG(LANG_USER_DEFAULT, SORT_JAPANESE_UNICODE); - - /* Default lcids */ - LCID_RES(LOCALE_SYSTEM_DEFAULT, GetSystemDefaultLCID()); - LCID_RES(LOCALE_USER_DEFAULT, GetUserDefaultLCID()); - LCID_RES(LOCALE_NEUTRAL, GetUserDefaultLCID()); -} - -static BOOL CALLBACK langgrp_procA(LGRPID lgrpid, LPSTR lpszNum, LPSTR lpszName, - DWORD dwFlags, LONG_PTR lParam) -{ - trace("%08x, %s, %s, %08x, %08lx\n", - lgrpid, lpszNum, lpszName, dwFlags, lParam); - - ok(pIsValidLanguageGroup(lgrpid, dwFlags) == TRUE, - "Enumerated grp %d not valid (flags %d)\n", lgrpid, dwFlags); - - /* If lParam is one, we are calling with flags defaulted from 0 */ - ok(!lParam || (dwFlags == LGRPID_INSTALLED || dwFlags == LGRPID_SUPPORTED), - "Expected dwFlags == LGRPID_INSTALLED || dwFlags == LGRPID_SUPPORTED, got %d\n", dwFlags); - - return TRUE; -} - -static void test_EnumSystemLanguageGroupsA(void) -{ - BOOL ret; - - if (!pEnumSystemLanguageGroupsA || !pIsValidLanguageGroup) - { - win_skip("EnumSystemLanguageGroupsA and/or IsValidLanguageGroup are not available\n"); - return; - } - - /* No enumeration proc */ - SetLastError(0); - ret = pEnumSystemLanguageGroupsA(0, LGRPID_INSTALLED, 0); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("EnumSystemLanguageGroupsA is not implemented\n"); - return; - } - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* Invalid flags */ - SetLastError(0); - pEnumSystemLanguageGroupsA(langgrp_procA, LGRPID_INSTALLED|LGRPID_SUPPORTED, 0); - ok(GetLastError() == ERROR_INVALID_FLAGS, "Expected ERROR_INVALID_FLAGS, got %d\n", GetLastError()); - - /* No flags - defaults to LGRPID_INSTALLED */ - SetLastError(0xdeadbeef); - pEnumSystemLanguageGroupsA(langgrp_procA, 0, 1); - ok(GetLastError() == 0xdeadbeef, "got error %d\n", GetLastError()); - - pEnumSystemLanguageGroupsA(langgrp_procA, LGRPID_INSTALLED, 0); - pEnumSystemLanguageGroupsA(langgrp_procA, LGRPID_SUPPORTED, 0); -} - -static BOOL CALLBACK enum_func( LPWSTR name, DWORD flags, LPARAM lparam ) -{ - trace( "%s %x\n", wine_dbgstr_w(name), flags ); - return TRUE; -} - -static void test_EnumSystemLocalesEx(void) -{ - BOOL ret; - - if (!pEnumSystemLocalesEx) - { - win_skip( "EnumSystemLocalesEx not available\n" ); - return; - } - SetLastError( 0xdeadbeef ); - ret = pEnumSystemLocalesEx( enum_func, LOCALE_ALL, 0, (void *)1 ); - ok( !ret, "should have failed\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); - SetLastError( 0xdeadbeef ); - ret = pEnumSystemLocalesEx( enum_func, 0, 0, NULL ); - ok( ret, "failed err %u\n", GetLastError() ); -} - -static BOOL CALLBACK lgrplocale_procA(LGRPID lgrpid, LCID lcid, LPSTR lpszNum, - LONG_PTR lParam) -{ - trace("%08x, %08x, %s, %08lx\n", lgrpid, lcid, lpszNum, lParam); - - /* invalid locale enumerated on some platforms */ - if (lcid == 0) - return TRUE; - - ok(pIsValidLanguageGroup(lgrpid, LGRPID_SUPPORTED) == TRUE, - "Enumerated grp %d not valid\n", lgrpid); - ok(IsValidLocale(lcid, LCID_SUPPORTED) == TRUE, - "Enumerated grp locale %d not valid\n", lcid); - return TRUE; -} - -static void test_EnumLanguageGroupLocalesA(void) -{ - BOOL ret; - - if (!pEnumLanguageGroupLocalesA || !pIsValidLanguageGroup) - { - win_skip("EnumLanguageGroupLocalesA and/or IsValidLanguageGroup are not available\n"); - return; - } - - /* No enumeration proc */ - SetLastError(0); - ret = pEnumLanguageGroupLocalesA(0, LGRPID_WESTERN_EUROPE, 0, 0); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("EnumLanguageGroupLocalesA is not implemented\n"); - return; - } - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* lgrpid too small */ - SetLastError(0); - ret = pEnumLanguageGroupLocalesA(lgrplocale_procA, 0, 0, 0); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* lgrpid too big */ - SetLastError(0); - ret = pEnumLanguageGroupLocalesA(lgrplocale_procA, LGRPID_ARMENIAN + 1, 0, 0); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* dwFlags is reserved */ - SetLastError(0); - ret = pEnumLanguageGroupLocalesA(0, LGRPID_WESTERN_EUROPE, 0x1, 0); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - pEnumLanguageGroupLocalesA(lgrplocale_procA, LGRPID_WESTERN_EUROPE, 0, 0); -} - -static void test_SetLocaleInfoA(void) -{ - BOOL bRet; - LCID lcid = GetUserDefaultLCID(); - - /* Null data */ - SetLastError(0); - bRet = SetLocaleInfoA(lcid, LOCALE_SDATE, 0); - ok( !bRet && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* IDATE */ - SetLastError(0); - bRet = SetLocaleInfoA(lcid, LOCALE_IDATE, "test_SetLocaleInfoA"); - ok(!bRet && GetLastError() == ERROR_INVALID_FLAGS, - "Expected ERROR_INVALID_FLAGS, got %d\n", GetLastError()); - - /* ILDATE */ - SetLastError(0); - bRet = SetLocaleInfoA(lcid, LOCALE_ILDATE, "test_SetLocaleInfoA"); - ok(!bRet && GetLastError() == ERROR_INVALID_FLAGS, - "Expected ERROR_INVALID_FLAGS, got %d\n", GetLastError()); -} - -static BOOL CALLBACK luilocale_proc1A(LPSTR value, LONG_PTR lParam) -{ - trace("%s %08lx\n", value, lParam); - return(TRUE); -} - -static BOOL CALLBACK luilocale_proc2A(LPSTR value, LONG_PTR lParam) -{ - ok(!enumCount, "callback called again unexpected\n"); - enumCount++; - return(FALSE); -} - -static BOOL CALLBACK luilocale_proc3A(LPSTR value, LONG_PTR lParam) -{ - ok(0,"callback called unexpected\n"); - return(FALSE); -} - -static void test_EnumUILanguageA(void) -{ - BOOL ret; - if (!pEnumUILanguagesA) { - win_skip("EnumUILanguagesA is not available on Win9x or NT4\n"); - return; - } - - SetLastError(ERROR_SUCCESS); - ret = pEnumUILanguagesA(luilocale_proc1A, 0, 0); - if (ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("EnumUILanguagesA is not implemented\n"); - return; - } - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - - enumCount = 0; - SetLastError(ERROR_SUCCESS); - ret = pEnumUILanguagesA(luilocale_proc2A, 0, 0); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); - - SetLastError(ERROR_SUCCESS); - ret = pEnumUILanguagesA(NULL, 0, 0); - ok(!ret, "Expected return value FALSE, got %u\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - SetLastError(ERROR_SUCCESS); - ret = pEnumUILanguagesA(luilocale_proc3A, 0x5a5a5a5a, 0); - ok(!ret, "Expected return value FALSE, got %u\n", ret); - ok(GetLastError() == ERROR_INVALID_FLAGS, "Expected ERROR_INVALID_FLAGS, got %d\n", GetLastError()); - - SetLastError(ERROR_SUCCESS); - ret = pEnumUILanguagesA(NULL, 0x5a5a5a5a, 0); - ok(!ret, "Expected return value FALSE, got %u\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); -} - -static char date_fmt_buf[1024]; - -static BOOL CALLBACK enum_datetime_procA(LPSTR fmt) -{ - lstrcatA(date_fmt_buf, fmt); - lstrcatA(date_fmt_buf, "\n"); - return TRUE; -} - -static void test_EnumDateFormatsA(void) -{ - char *p, buf[256]; - BOOL ret; - LCID lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); - - trace("EnumDateFormatsA 0\n"); - date_fmt_buf[0] = 0; - SetLastError(0xdeadbeef); - ret = EnumDateFormatsA(enum_datetime_procA, lcid, 0); - if (!ret && (GetLastError() == ERROR_INVALID_FLAGS)) - { - win_skip("0 for dwFlags is not supported\n"); - } - else - { - ok(ret, "EnumDateFormatsA(0) error %d\n", GetLastError()); - trace("%s\n", date_fmt_buf); - /* test the 1st enumerated format */ - if ((p = strchr(date_fmt_buf, '\n'))) *p = 0; - ret = GetLocaleInfoA(lcid, LOCALE_SSHORTDATE, buf, sizeof(buf)); - ok(ret, "GetLocaleInfoA(LOCALE_SSHORTDATE) error %d\n", GetLastError()); - ok(!lstrcmpA(date_fmt_buf, buf), "expected \"%s\" got \"%s\"\n", date_fmt_buf, buf); - } - - trace("EnumDateFormatsA LOCALE_USE_CP_ACP\n"); - date_fmt_buf[0] = 0; - SetLastError(0xdeadbeef); - ret = EnumDateFormatsA(enum_datetime_procA, lcid, LOCALE_USE_CP_ACP); - if (!ret && (GetLastError() == ERROR_INVALID_FLAGS)) - { - win_skip("LOCALE_USE_CP_ACP is not supported\n"); - } - else - { - ok(ret, "EnumDateFormatsA(LOCALE_USE_CP_ACP) error %d\n", GetLastError()); - trace("%s\n", date_fmt_buf); - /* test the 1st enumerated format */ - if ((p = strchr(date_fmt_buf, '\n'))) *p = 0; - ret = GetLocaleInfoA(lcid, LOCALE_SSHORTDATE, buf, sizeof(buf)); - ok(ret, "GetLocaleInfoA(LOCALE_SSHORTDATE) error %d\n", GetLastError()); - ok(!lstrcmpA(date_fmt_buf, buf), "expected \"%s\" got \"%s\"\n", date_fmt_buf, buf); - } - - trace("EnumDateFormatsA DATE_SHORTDATE\n"); - date_fmt_buf[0] = 0; - ret = EnumDateFormatsA(enum_datetime_procA, lcid, DATE_SHORTDATE); - ok(ret, "EnumDateFormatsA(DATE_SHORTDATE) error %d\n", GetLastError()); - trace("%s\n", date_fmt_buf); - /* test the 1st enumerated format */ - if ((p = strchr(date_fmt_buf, '\n'))) *p = 0; - ret = GetLocaleInfoA(lcid, LOCALE_SSHORTDATE, buf, sizeof(buf)); - ok(ret, "GetLocaleInfoA(LOCALE_SSHORTDATE) error %d\n", GetLastError()); - ok(!lstrcmpA(date_fmt_buf, buf), "expected \"%s\" got \"%s\"\n", date_fmt_buf, buf); - - trace("EnumDateFormatsA DATE_LONGDATE\n"); - date_fmt_buf[0] = 0; - ret = EnumDateFormatsA(enum_datetime_procA, lcid, DATE_LONGDATE); - ok(ret, "EnumDateFormatsA(DATE_LONGDATE) error %d\n", GetLastError()); - trace("%s\n", date_fmt_buf); - /* test the 1st enumerated format */ - if ((p = strchr(date_fmt_buf, '\n'))) *p = 0; - ret = GetLocaleInfoA(lcid, LOCALE_SLONGDATE, buf, sizeof(buf)); - ok(ret, "GetLocaleInfoA(LOCALE_SLONGDATE) error %d\n", GetLastError()); - ok(!lstrcmpA(date_fmt_buf, buf), "expected \"%s\" got \"%s\"\n", date_fmt_buf, buf); - - trace("EnumDateFormatsA DATE_YEARMONTH\n"); - date_fmt_buf[0] = 0; - SetLastError(0xdeadbeef); - ret = EnumDateFormatsA(enum_datetime_procA, lcid, DATE_YEARMONTH); - if (!ret && (GetLastError() == ERROR_INVALID_FLAGS)) - { - skip("DATE_YEARMONTH is only present on W2K and later\n"); - return; - } - ok(ret, "EnumDateFormatsA(DATE_YEARMONTH) error %d\n", GetLastError()); - trace("%s\n", date_fmt_buf); - /* test the 1st enumerated format */ - if ((p = strchr(date_fmt_buf, '\n'))) *p = 0; - ret = GetLocaleInfoA(lcid, LOCALE_SYEARMONTH, buf, sizeof(buf)); - ok(ret, "GetLocaleInfoA(LOCALE_SYEARMONTH) error %d\n", GetLastError()); - ok(!lstrcmpA(date_fmt_buf, buf) || broken(!buf[0]) /* win9x */, - "expected \"%s\" got \"%s\"\n", date_fmt_buf, buf); -} - -static void test_EnumTimeFormatsA(void) -{ - char *p, buf[256]; - BOOL ret; - LCID lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); - - trace("EnumTimeFormatsA 0\n"); - date_fmt_buf[0] = 0; - ret = EnumTimeFormatsA(enum_datetime_procA, lcid, 0); - ok(ret, "EnumTimeFormatsA(0) error %d\n", GetLastError()); - trace("%s\n", date_fmt_buf); - /* test the 1st enumerated format */ - if ((p = strchr(date_fmt_buf, '\n'))) *p = 0; - ret = GetLocaleInfoA(lcid, LOCALE_STIMEFORMAT, buf, sizeof(buf)); - ok(ret, "GetLocaleInfoA(LOCALE_STIMEFORMAT) error %d\n", GetLastError()); - ok(!lstrcmpA(date_fmt_buf, buf), "expected \"%s\" got \"%s\"\n", date_fmt_buf, buf); - - trace("EnumTimeFormatsA LOCALE_USE_CP_ACP\n"); - date_fmt_buf[0] = 0; - ret = EnumTimeFormatsA(enum_datetime_procA, lcid, LOCALE_USE_CP_ACP); - ok(ret, "EnumTimeFormatsA(LOCALE_USE_CP_ACP) error %d\n", GetLastError()); - trace("%s\n", date_fmt_buf); - /* test the 1st enumerated format */ - if ((p = strchr(date_fmt_buf, '\n'))) *p = 0; - ret = GetLocaleInfoA(lcid, LOCALE_STIMEFORMAT, buf, sizeof(buf)); - ok(ret, "GetLocaleInfoA(LOCALE_STIMEFORMAT) error %d\n", GetLastError()); - ok(!lstrcmpA(date_fmt_buf, buf), "expected \"%s\" got \"%s\"\n", date_fmt_buf, buf); -} - -static void test_GetCPInfo(void) -{ - BOOL ret; - CPINFO cpinfo; - - SetLastError(0xdeadbeef); - ret = GetCPInfo(CP_SYMBOL, &cpinfo); - ok(!ret, "GetCPInfo(CP_SYMBOL) should fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = GetCPInfo(CP_UTF7, &cpinfo); - if (!ret && GetLastError() == ERROR_INVALID_PARAMETER) - { - skip("Codepage CP_UTF7 is not installed/available\n"); - } - else - { - ok(ret, "GetCPInfo(CP_UTF7) error %u\n", GetLastError()); - ok(cpinfo.DefaultChar[0] == 0x3f, "expected 0x3f, got 0x%x\n", cpinfo.DefaultChar[0]); - ok(cpinfo.DefaultChar[1] == 0, "expected 0, got 0x%x\n", cpinfo.DefaultChar[1]); - ok(cpinfo.LeadByte[0] == 0, "expected 0, got 0x%x\n", cpinfo.LeadByte[0]); - ok(cpinfo.LeadByte[1] == 0, "expected 0, got 0x%x\n", cpinfo.LeadByte[1]); - ok(cpinfo.MaxCharSize == 5, "expected 5, got 0x%x\n", cpinfo.MaxCharSize); - } - - SetLastError(0xdeadbeef); - ret = GetCPInfo(CP_UTF8, &cpinfo); - if (!ret && GetLastError() == ERROR_INVALID_PARAMETER) - { - skip("Codepage CP_UTF8 is not installed/available\n"); - } - else - { - ok(ret, "GetCPInfo(CP_UTF8) error %u\n", GetLastError()); - ok(cpinfo.DefaultChar[0] == 0x3f, "expected 0x3f, got 0x%x\n", cpinfo.DefaultChar[0]); - ok(cpinfo.DefaultChar[1] == 0, "expected 0, got 0x%x\n", cpinfo.DefaultChar[1]); - ok(cpinfo.LeadByte[0] == 0, "expected 0, got 0x%x\n", cpinfo.LeadByte[0]); - ok(cpinfo.LeadByte[1] == 0, "expected 0, got 0x%x\n", cpinfo.LeadByte[1]); - ok(cpinfo.MaxCharSize == 4 || broken(cpinfo.MaxCharSize == 3) /* win9x */, - "expected 4, got %u\n", cpinfo.MaxCharSize); - } -} - -/* - * The CT_TYPE1 has varied over windows version. - * The current target for correct behavior is windows 7. - * There was a big shift between windows 2000 (first introduced) and windows Xp - * Most of the old values below are from windows 2000. - * A smaller subset of changes happened between windows Xp and Window vista/7 - */ -static void test_GetStringTypeW(void) -{ - static const WCHAR blanks[] = {0x9, 0x20, 0xa0, 0x3000, 0xfeff}; - static const WORD blanks_new[] = {C1_SPACE | C1_CNTRL | C1_BLANK | C1_DEFINED, - C1_SPACE | C1_BLANK | C1_DEFINED, - C1_SPACE | C1_BLANK | C1_DEFINED, - C1_SPACE | C1_BLANK | C1_DEFINED, - C1_CNTRL | C1_BLANK | C1_DEFINED}; - static const WORD blanks_old[] ={C1_SPACE | C1_CNTRL | C1_BLANK, - C1_SPACE | C1_BLANK, - C1_SPACE | C1_BLANK, - C1_SPACE | C1_BLANK, - C1_SPACE | C1_BLANK}; - - static const WCHAR undefined[] = {0x378, 0x379, 0x604, 0xfff8, 0xfffe}; - - /* Lu, Ll, Lt */ - static const WCHAR alpha[] = {0x47, 0x67, 0x1c5}; - static const WORD alpha_old[] = {C1_UPPER | C1_ALPHA, - C1_LOWER | C1_ALPHA, - C1_UPPER | C1_LOWER | C1_ALPHA, - C1_ALPHA}; - - /* Sk, Sk, Mn, So, Me */ - static const WCHAR oldpunc[] = { 0x2c2, 0x2e5, 0x322, 0x482, 0x6de, - /* Sc, Sm, No,*/ - 0xffe0, 0xffe9, 0x2153}; - - /* Lm, Nl, Cf, 0xad(Cf), 0x1f88 (Lt), Lo, Mc */ - static const WCHAR changed[] = {0x2b0, 0x2160, 0x600, 0xad, 0x1f88, 0x294, 0x903}; - static const WORD changed_old[] = { C1_PUNCT, C1_PUNCT, 0, C1_PUNCT, C1_UPPER | C1_ALPHA, C1_ALPHA, C1_PUNCT }; - static const WORD changed_xp[] = {C1_ALPHA | C1_DEFINED, - C1_ALPHA | C1_DEFINED, - C1_CNTRL | C1_DEFINED, - C1_PUNCT | C1_DEFINED, - C1_UPPER | C1_LOWER | C1_ALPHA | C1_DEFINED, - C1_ALPHA | C1_LOWER | C1_DEFINED, - C1_ALPHA | C1_DEFINED }; - static const WORD changed_new[] = { C1_ALPHA | C1_DEFINED, - C1_ALPHA | C1_DEFINED, - C1_CNTRL | C1_DEFINED, - C1_PUNCT | C1_CNTRL | C1_DEFINED, - C1_UPPER | C1_LOWER | C1_ALPHA | C1_DEFINED, - C1_ALPHA | C1_DEFINED, - C1_DEFINED - }; - /* Pc, Pd, Ps, Pe, Pi, Pf, Po*/ - static const WCHAR punct[] = { 0x5f, 0x2d, 0x28, 0x29, 0xab, 0xbb, 0x21 }; - - static const WCHAR punct_special[] = {0x24, 0x2b, 0x3c, 0x3e, 0x5e, 0x60, - 0x7c, 0x7e, 0xa2, 0xbe, 0xd7, 0xf7}; - static const WCHAR digit_special[] = {0xb2, 0xb3, 0xb9}; - static const WCHAR lower_special[] = {0x2071, 0x207f}; - static const WCHAR cntrl_special[] = {0x070f, 0x200c, 0x200d, - 0x200e, 0x200f, 0x202a, 0x202b, 0x202c, 0x202d, 0x202e, - 0x206a, 0x206b, 0x206c, 0x206d, 0x206e, 0x206f, 0xfeff, - 0xfff9, 0xfffa, 0xfffb}; - static const WCHAR space_special[] = {0x09, 0x0d, 0x85}; - - WORD types[20]; - int i; - - memset(types,0,sizeof(types)); - GetStringTypeW(CT_CTYPE1, blanks, 5, types); - for (i = 0; i < 5; i++) - ok(types[i] == blanks_new[i] || broken(types[i] == blanks_old[i] || broken(types[i] == 0)), "incorrect type1 returned for %x -> (%x != %x)\n",blanks[i],types[i],blanks_new[i]); - - memset(types,0,sizeof(types)); - GetStringTypeW(CT_CTYPE1, alpha, 3, types); - for (i = 0; i < 3; i++) - ok(types[i] == (C1_DEFINED | alpha_old[i]) || broken(types[i] == alpha_old[i]) || broken(types[i] == 0), "incorrect types returned for %x -> (%x != %x)\n",alpha[i], types[i],(C1_DEFINED | alpha_old[i])); - memset(types,0,sizeof(types)); - GetStringTypeW(CT_CTYPE1, undefined, 5, types); - for (i = 0; i < 5; i++) - ok(types[i] == 0, "incorrect types returned for %x -> (%x != 0)\n",undefined[i], types[i]); - - memset(types,0,sizeof(types)); - GetStringTypeW(CT_CTYPE1, oldpunc, 8, types); - for (i = 0; i < 8; i++) - ok(types[i] == C1_DEFINED || broken(types[i] == C1_PUNCT) || broken(types[i] == 0), "incorrect types returned for %x -> (%x != %x)\n",oldpunc[i], types[i], C1_DEFINED); - - memset(types,0,sizeof(types)); - GetStringTypeW(CT_CTYPE1, changed, 7, types); - for (i = 0; i < 7; i++) - ok(types[i] == changed_new[i] || broken(types[i] == changed_old[i]) || broken(types[i] == changed_xp[i]) || broken(types[i] == 0), "incorrect types returned for %x -> (%x != %x)\n",changed[i], types[i], changed_new[i]); - - memset(types,0,sizeof(types)); - GetStringTypeW(CT_CTYPE1, punct, 7, types); - for (i = 0; i < 7; i++) - ok(types[i] == (C1_PUNCT | C1_DEFINED) || broken(types[i] == C1_PUNCT) || broken(types[i] == 0), "incorrect types returned for %x -> (%x != %x)\n",punct[i], types[i], (C1_PUNCT | C1_DEFINED)); - - - memset(types,0,sizeof(types)); - GetStringTypeW(CT_CTYPE1, punct_special, 12, types); - for (i = 0; i < 12; i++) - ok(types[i] & C1_PUNCT || broken(types[i] == 0), "incorrect types returned for %x -> (%x doest not have %x)\n",punct_special[i], types[i], C1_PUNCT); - - memset(types,0,sizeof(types)); - GetStringTypeW(CT_CTYPE1, digit_special, 3, types); - for (i = 0; i < 3; i++) - ok(types[i] & C1_DIGIT || broken(types[i] == 0), "incorrect types returned for %x -> (%x doest not have = %x)\n",digit_special[i], types[i], C1_DIGIT); - - memset(types,0,sizeof(types)); - GetStringTypeW(CT_CTYPE1, lower_special, 2, types); - for (i = 0; i < 2; i++) - ok(types[i] & C1_LOWER || broken(types[i] == C1_PUNCT) || broken(types[i] == 0), "incorrect types returned for %x -> (%x does not have %x)\n",lower_special[i], types[i], C1_LOWER); - - memset(types,0,sizeof(types)); - GetStringTypeW(CT_CTYPE1, cntrl_special, 20, types); - for (i = 0; i < 20; i++) - ok(types[i] & C1_CNTRL || broken(types[i] == (C1_BLANK|C1_SPACE)) || broken(types[i] == C1_PUNCT) || broken(types[i] == 0), "incorrect types returned for %x -> (%x does not have %x)\n",cntrl_special[i], types[i], C1_CNTRL); - - memset(types,0,sizeof(types)); - GetStringTypeW(CT_CTYPE1, space_special, 3, types); - for (i = 0; i < 3; i++) - ok(types[i] & C1_SPACE || broken(types[i] == C1_CNTRL) || broken(types[i] == 0), "incorrect types returned for %x -> (%x does not have %x)\n",space_special[i], types[i], C1_SPACE ); -} - -START_TEST(locale) -{ - InitFunctionPointers(); - - test_EnumTimeFormatsA(); - test_EnumDateFormatsA(); - test_GetLocaleInfoA(); - test_GetLocaleInfoW(); - test_GetTimeFormatA(); - test_GetDateFormatA(); - test_GetDateFormatW(); - test_GetCurrencyFormatA(); /* Also tests the W version */ - test_GetNumberFormatA(); /* Also tests the W version */ - test_CompareStringA(); - test_LCMapStringA(); - test_LCMapStringW(); - test_FoldStringA(); - test_FoldStringW(); - test_ConvertDefaultLocale(); - test_EnumSystemLanguageGroupsA(); - test_EnumSystemLocalesEx(); - test_EnumLanguageGroupLocalesA(); - test_SetLocaleInfoA(); - test_EnumUILanguageA(); - test_GetCPInfo(); - test_GetStringTypeW(); - /* this requires collation table patch to make it MS compatible */ - if (0) test_sorting(); -} diff --git a/rostests/winetests/kernel32/mailslot.c b/rostests/winetests/kernel32/mailslot.c deleted file mode 100755 index fb3ec343bc2..00000000000 --- a/rostests/winetests/kernel32/mailslot.c +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Mailslot regression test - * - * Copyright 2003 Mike McCormack - * - * 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 "wine/test.h" - -static const char szmspath[] = "\\\\.\\mailslot\\wine_mailslot_test"; - -static int mailslot_test(void) -{ - HANDLE hSlot, hSlot2, hWriter, hWriter2; - unsigned char buffer[16]; - DWORD count, dwMax, dwNext, dwMsgCount, dwTimeout; - BOOL ret; - - /* sanity check on GetMailslotInfo */ - dwMax = dwNext = dwMsgCount = dwTimeout = 0; - ok( !GetMailslotInfo( INVALID_HANDLE_VALUE, &dwMax, &dwNext, - &dwMsgCount, &dwTimeout ), "getmailslotinfo succeeded\n"); - - /* open a mailslot that doesn't exist */ - hWriter = CreateFile(szmspath, GENERIC_READ|GENERIC_WRITE, - FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); - ok( hWriter == INVALID_HANDLE_VALUE, "nonexistent mailslot\n"); - - /* open a mailslot without the right name */ - hSlot = CreateMailslot( "blah", 0, 0, NULL ); - ok( hSlot == INVALID_HANDLE_VALUE, - "Created mailslot with invalid name\n"); - ok( GetLastError() == ERROR_INVALID_NAME, - "error should be ERROR_INVALID_NAME\n"); - - /* open a mailslot with a null name */ - hSlot = CreateMailslot( NULL, 0, 0, NULL ); - ok( hSlot == INVALID_HANDLE_VALUE, "Created mailslot with invalid name\n"); - ok( GetLastError() == ERROR_PATH_NOT_FOUND, "error should be ERROR_PATH_NOT_FOUND\n"); - - /* valid open, but with wacky parameters ... then check them */ - hSlot = CreateMailslot( szmspath, -1, -1, NULL ); - ok( hSlot != INVALID_HANDLE_VALUE , "mailslot with valid name failed\n"); - dwMax = dwNext = dwMsgCount = dwTimeout = 0; - ok( GetMailslotInfo( hSlot, &dwMax, &dwNext, &dwMsgCount, &dwTimeout ), - "getmailslotinfo failed\n"); - ok( dwMax == ~0U, "dwMax incorrect\n"); - ok( dwNext == MAILSLOT_NO_MESSAGE, "dwNext incorrect\n"); - ok( dwMsgCount == 0, "dwMsgCount incorrect\n"); - ok( dwTimeout == ~0U, "dwTimeout incorrect\n"); - ok( GetMailslotInfo( hSlot, NULL, NULL, NULL, NULL ), - "getmailslotinfo failed\n"); - ok( CloseHandle(hSlot), "failed to close mailslot\n"); - - /* now open it for real */ - hSlot = CreateMailslot( szmspath, 0, 0, NULL ); - ok( hSlot != INVALID_HANDLE_VALUE , "valid mailslot failed\n"); - - /* try and read/write to it */ - count = 0; - memset(buffer, 0, sizeof buffer); - ret = ReadFile( hSlot, buffer, sizeof buffer, &count, NULL); - ok( !ret, "slot read\n"); - if (!ret) ok( GetLastError() == ERROR_SEM_TIMEOUT, "wrong error %u\n", GetLastError() ); - else ok( count == 0, "wrong count %u\n", count ); - ok( !WriteFile( hSlot, buffer, sizeof buffer, &count, NULL), - "slot write\n"); - ok( GetLastError() == ERROR_ACCESS_DENIED, "wrong error %u\n", GetLastError() ); - - /* now try and open the client, but with the wrong sharing mode */ - hWriter = CreateFile(szmspath, GENERIC_WRITE, - 0, NULL, OPEN_EXISTING, 0, NULL); - ok( hWriter != INVALID_HANDLE_VALUE /* vista */ || GetLastError() == ERROR_SHARING_VIOLATION, - "error should be ERROR_SHARING_VIOLATION got %p / %u\n", hWriter, GetLastError()); - if (hWriter != INVALID_HANDLE_VALUE) CloseHandle( hWriter ); - - /* now open the client with the correct sharing mode */ - hWriter = CreateFile(szmspath, GENERIC_READ|GENERIC_WRITE, - FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); - ok( hWriter != INVALID_HANDLE_VALUE, "existing mailslot err %u\n", GetLastError()); - - /* - * opening a client should make no difference to - * whether we can read or write the mailslot - */ - ret = ReadFile( hSlot, buffer, sizeof buffer/2, &count, NULL); - ok( !ret, "slot read\n"); - if (!ret) ok( GetLastError() == ERROR_SEM_TIMEOUT, "wrong error %u\n", GetLastError() ); - else ok( count == 0, "wrong count %u\n", count ); - ok( !WriteFile( hSlot, buffer, sizeof buffer/2, &count, NULL), - "slot write\n"); - ok( GetLastError() == ERROR_ACCESS_DENIED, "wrong error %u\n", GetLastError() ); - - /* - * we can't read from this client, - * but we should be able to write to it - */ - ok( !ReadFile( hWriter, buffer, sizeof buffer/2, &count, NULL), - "can read client\n"); - ok( GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_ACCESS_DENIED, - "wrong error %u\n", GetLastError() ); - ok( WriteFile( hWriter, buffer, sizeof buffer/2, &count, NULL), - "can't write client\n"); - ok( !ReadFile( hWriter, buffer, sizeof buffer/2, &count, NULL), - "can read client\n"); - ok( GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_ACCESS_DENIED, - "wrong error %u\n", GetLastError() ); - - /* - * seeing as there's something in the slot, - * we should be able to read it once - */ - ok( ReadFile( hSlot, buffer, sizeof buffer, &count, NULL), - "slot read\n"); - ok( count == (sizeof buffer/2), "short read\n" ); - - /* but not again */ - ret = ReadFile( hSlot, buffer, sizeof buffer, &count, NULL); - ok( !ret, "slot read\n"); - if (!ret) ok( GetLastError() == ERROR_SEM_TIMEOUT, "wrong error %u\n", GetLastError() ); - else ok( count == 0, "wrong count %u\n", count ); - - /* now try open another writer... should fail */ - hWriter2 = CreateFile(szmspath, GENERIC_READ|GENERIC_WRITE, - FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); - /* succeeds on vista, don't test */ - if (hWriter2 != INVALID_HANDLE_VALUE) CloseHandle( hWriter2 ); - - /* now try open another as a reader ... also fails */ - hWriter2 = CreateFile(szmspath, GENERIC_READ, - FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); - /* succeeds on vista, don't test */ - if (hWriter2 != INVALID_HANDLE_VALUE) CloseHandle( hWriter2 ); - - /* now try open another as a writer ... still fails */ - hWriter2 = CreateFile(szmspath, GENERIC_WRITE, - FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); - /* succeeds on vista, don't test */ - if (hWriter2 != INVALID_HANDLE_VALUE) CloseHandle( hWriter2 ); - - /* now open another one */ - hSlot2 = CreateMailslot( szmspath, 0, 0, NULL ); - ok( hSlot2 == INVALID_HANDLE_VALUE , "opened two mailslots\n"); - - /* close the client again */ - ok( CloseHandle( hWriter ), "closing the client\n"); - - /* - * now try reopen it with slightly different permissions ... - * shared writing - */ - hWriter = CreateFile(szmspath, GENERIC_WRITE, - FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL); - ok( hWriter != INVALID_HANDLE_VALUE, "sharing writer\n"); - - /* - * now try open another as a writer ... - * but don't share with the first ... fail - */ - hWriter2 = CreateFile(szmspath, GENERIC_WRITE, - FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); - /* succeeds on vista, don't test */ - if (hWriter2 != INVALID_HANDLE_VALUE) CloseHandle( hWriter2 ); - - /* now try open another as a writer ... and share with the first */ - hWriter2 = CreateFile(szmspath, GENERIC_WRITE, - FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL); - ok( hWriter2 != INVALID_HANDLE_VALUE, "2nd sharing writer\n"); - - /* check the mailslot info */ - dwMax = dwNext = dwMsgCount = dwTimeout = 0; - ok( GetMailslotInfo( hSlot, &dwMax, &dwNext, &dwMsgCount, &dwTimeout ), - "getmailslotinfo failed\n"); - ok( dwNext == MAILSLOT_NO_MESSAGE, "dwNext incorrect\n"); - ok( dwMax == 0, "dwMax incorrect\n"); - ok( dwMsgCount == 0, "dwMsgCount incorrect\n"); - ok( dwTimeout == 0, "dwTimeout incorrect\n"); - - /* check there's still no data */ - ret = ReadFile( hSlot, buffer, sizeof buffer, &count, NULL); - ok( !ret, "slot read\n"); - if (!ret) ok( GetLastError() == ERROR_SEM_TIMEOUT, "wrong error %u\n", GetLastError() ); - else ok( count == 0, "wrong count %u\n", count ); - - /* write two messages */ - buffer[0] = 'a'; - ok( WriteFile( hWriter, buffer, 1, &count, NULL), "1st write failed\n"); - - /* check the mailslot info */ - dwNext = dwMsgCount = 0; - ok( GetMailslotInfo( hSlot, NULL, &dwNext, &dwMsgCount, NULL ), - "getmailslotinfo failed\n"); - ok( dwNext == 1, "dwNext incorrect\n"); - ok( dwMsgCount == 1, "dwMsgCount incorrect\n"); - - buffer[0] = 'b'; - buffer[1] = 'c'; - ok( WriteFile( hWriter2, buffer, 2, &count, NULL), "2nd write failed\n"); - - /* check the mailslot info */ - dwNext = dwMsgCount = 0; - ok( GetMailslotInfo( hSlot, NULL, &dwNext, &dwMsgCount, NULL ), - "getmailslotinfo failed\n"); - ok( dwNext == 1, "dwNext incorrect\n"); - todo_wine { - ok( dwMsgCount == 2, "dwMsgCount incorrect\n"); - } - - /* write a 3rd message with zero size */ - ok( WriteFile( hWriter2, buffer, 0, &count, NULL), "3rd write failed\n"); - - /* check the mailslot info */ - dwNext = dwMsgCount = 0; - ok( GetMailslotInfo( hSlot, NULL, &dwNext, &dwMsgCount, NULL ), - "getmailslotinfo failed\n"); - ok( dwNext == 1, "dwNext incorrect\n"); - todo_wine - ok( dwMsgCount == 3, "dwMsgCount incorrect %u\n", dwMsgCount); - - buffer[0]=buffer[1]=0; - - /* - * then check that they come out with the correct order and size, - * then the slot is empty - */ - ok( ReadFile( hSlot, buffer, sizeof buffer, &count, NULL), - "1st slot read failed\n"); - ok( count == 1, "failed to get 1st message\n"); - ok( buffer[0] == 'a', "1st message wrong\n"); - - /* check the mailslot info */ - dwNext = dwMsgCount = 0; - ok( GetMailslotInfo( hSlot, NULL, &dwNext, &dwMsgCount, NULL ), - "getmailslotinfo failed\n"); - ok( dwNext == 2, "dwNext incorrect\n"); - todo_wine { - ok( dwMsgCount == 2, "dwMsgCount incorrect %u\n", dwMsgCount); - } - - /* read the second message */ - ok( ReadFile( hSlot, buffer, sizeof buffer, &count, NULL), - "2nd slot read failed\n"); - ok( count == 2, "failed to get 2nd message\n"); - ok( ( buffer[0] == 'b' ) && ( buffer[1] == 'c' ), "2nd message wrong\n"); - - /* check the mailslot info */ - dwNext = dwMsgCount = 0; - ok( GetMailslotInfo( hSlot, NULL, &dwNext, &dwMsgCount, NULL ), - "getmailslotinfo failed\n"); - ok( dwNext == 0, "dwNext incorrect %u\n", dwNext); - todo_wine { - ok( dwMsgCount == 1, "dwMsgCount incorrect %u\n", dwMsgCount); - } - - /* read the 3rd (zero length) message */ - todo_wine { - ok( ReadFile( hSlot, buffer, sizeof buffer, &count, NULL), - "3rd slot read failed\n"); - } - ok( count == 0, "failed to get 3rd message\n"); - - /* - * now there should be no more messages - * check the mailslot info - */ - dwNext = dwMsgCount = 0; - ok( GetMailslotInfo( hSlot, NULL, &dwNext, &dwMsgCount, NULL ), - "getmailslotinfo failed\n"); - ok( dwNext == MAILSLOT_NO_MESSAGE, "dwNext incorrect\n"); - ok( dwMsgCount == 0, "dwMsgCount incorrect\n"); - - /* check that reads fail */ - ret = ReadFile( hSlot, buffer, sizeof buffer, &count, NULL); - ok( !ret, "3rd slot read succeeded\n"); - if (!ret) ok( GetLastError() == ERROR_SEM_TIMEOUT, "wrong error %u\n", GetLastError() ); - else ok( count == 0, "wrong count %u\n", count ); - - /* finally close the mailslot and its client */ - ok( CloseHandle( hWriter2 ), "closing 2nd client\n"); - ok( CloseHandle( hWriter ), "closing the client\n"); - ok( CloseHandle( hSlot ), "closing the mailslot\n"); - - /* test timeouts */ - hSlot = CreateMailslot( szmspath, 0, 1000, NULL ); - ok( hSlot != INVALID_HANDLE_VALUE , "valid mailslot failed\n"); - count = 0; - memset(buffer, 0, sizeof buffer); - dwTimeout = GetTickCount(); - ok( !ReadFile( hSlot, buffer, sizeof buffer, &count, NULL), "slot read\n"); - ok( GetLastError() == ERROR_SEM_TIMEOUT, "wrong error %u\n", GetLastError() ); - dwTimeout = GetTickCount() - dwTimeout; - ok( dwTimeout >= 990, "timeout too short %u\n", dwTimeout ); - ok( CloseHandle( hSlot ), "closing the mailslot\n"); - - return 0; -} - -START_TEST(mailslot) -{ - mailslot_test(); -} diff --git a/rostests/winetests/kernel32/module.c b/rostests/winetests/kernel32/module.c deleted file mode 100755 index 01fa448a333..00000000000 --- a/rostests/winetests/kernel32/module.c +++ /dev/null @@ -1,404 +0,0 @@ -/* - * Unit tests for module/DLL/library API - * - * Copyright (c) 2004 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/test.h" -#include - -static BOOL is_unicode_enabled = TRUE; - -static BOOL cmpStrAW(const char* a, const WCHAR* b, DWORD lenA, DWORD lenB) -{ - WCHAR aw[1024]; - - DWORD len = MultiByteToWideChar( AreFileApisANSI() ? CP_ACP : CP_OEMCP, 0, - a, lenA, aw, sizeof(aw) / sizeof(aw[0]) ); - if (len != lenB) return FALSE; - return memcmp(aw, b, len * sizeof(WCHAR)) == 0; -} - -static void testGetModuleFileName(const char* name) -{ - HMODULE hMod; - char bufA[MAX_PATH]; - WCHAR bufW[MAX_PATH]; - DWORD len1A, len1W = 0, len2A, len2W = 0; - - hMod = (name) ? GetModuleHandle(name) : NULL; - - /* first test, with enough space in buffer */ - memset(bufA, '-', sizeof(bufA)); - len1A = GetModuleFileNameA(hMod, bufA, sizeof(bufA)); - ok(len1A > 0, "Getting module filename for handle %p\n", hMod); - - if (is_unicode_enabled) - { - memset(bufW, '-', sizeof(bufW)); - len1W = GetModuleFileNameW(hMod, bufW, sizeof(bufW) / sizeof(WCHAR)); - ok(len1W > 0, "Getting module filename for handle %p\n", hMod); - } - - ok(len1A == strlen(bufA), "Unexpected length of GetModuleFilenameA (%d/%d)\n", len1A, lstrlenA(bufA)); - - if (is_unicode_enabled) - { - ok(len1W == lstrlenW(bufW), "Unexpected length of GetModuleFilenameW (%d/%d)\n", len1W, lstrlenW(bufW)); - ok(cmpStrAW(bufA, bufW, len1A, len1W), "Comparing GetModuleFilenameAW results\n"); - } - - /* second test with a buffer too small */ - memset(bufA, '-', sizeof(bufA)); - len2A = GetModuleFileNameA(hMod, bufA, len1A / 2); - ok(len2A > 0, "Getting module filename for handle %p\n", hMod); - - if (is_unicode_enabled) - { - memset(bufW, '-', sizeof(bufW)); - len2W = GetModuleFileNameW(hMod, bufW, len1W / 2); - ok(len2W > 0, "Getting module filename for handle %p\n", hMod); - ok(cmpStrAW(bufA, bufW, len2A, len2W), "Comparing GetModuleFilenameAW results with buffer too small\n" ); - ok(len1W / 2 == len2W, "Correct length in GetModuleFilenameW with buffer too small (%d/%d)\n", len1W / 2, len2W); - } - - ok(len1A / 2 == len2A || - len1A / 2 == len2A + 1, /* Win9x */ - "Correct length in GetModuleFilenameA with buffer too small (%d/%d)\n", len1A / 2, len2A); -} - -static void testGetModuleFileName_Wrong(void) -{ - char bufA[MAX_PATH]; - WCHAR bufW[MAX_PATH]; - - /* test wrong handle */ - if (is_unicode_enabled) - { - bufW[0] = '*'; - ok(GetModuleFileNameW((void*)0xffffffff, bufW, sizeof(bufW) / sizeof(WCHAR)) == 0, "Unexpected success in module handle\n"); - ok(bufW[0] == '*', "When failing, buffer shouldn't be written to\n"); - } - - bufA[0] = '*'; - ok(GetModuleFileNameA((void*)0xffffffff, bufA, sizeof(bufA)) == 0, "Unexpected success in module handle\n"); - ok(bufA[0] == '*' || - bufA[0] == 0 /* Win9x */, - "When failing, buffer shouldn't be written to\n"); -} - -static void testLoadLibraryA(void) -{ - HMODULE hModule, hModule1; - FARPROC fp; - - SetLastError(0xdeadbeef); - hModule = LoadLibraryA("kernel32.dll"); - ok( hModule != NULL, "kernel32.dll should be loadable\n"); - ok( GetLastError() == 0xdeadbeef, "GetLastError should be 0xdeadbeef but is %d\n", GetLastError()); - - fp = GetProcAddress(hModule, "CreateFileA"); - ok( fp != NULL, "CreateFileA should be there\n"); - ok( GetLastError() == 0xdeadbeef, "GetLastError should be 0xdeadbeef but is %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - hModule1 = LoadLibraryA("kernel32 "); - /* Only winNT does this */ - if (GetLastError() != ERROR_DLL_NOT_FOUND) - { - ok( hModule1 != NULL, "\"kernel32 \" should be loadable\n"); - ok( GetLastError() == 0xdeadbeef, "GetLastError should be 0xdeadbeef but is %d\n", GetLastError()); - ok( hModule == hModule1, "Loaded wrong module\n"); - FreeLibrary(hModule1); - } - FreeLibrary(hModule); -} - -static void testNestedLoadLibraryA(void) -{ - static const char dllname[] = "shell32.dll"; - char path1[MAX_PATH], path2[MAX_PATH]; - HMODULE hModule1, hModule2, hModule3; - - /* This is not really a Windows conformance test, but more a Wine - * regression test. Wine's builtin dlls can be loaded from multiple paths, - * and this test tries to make sure that Wine does not get confused and - * really unloads the Unix .so file at the right time. Failure to do so - * will result in the dll being unloadable. - * This test must be done with a dll that can be unloaded, which means: - * - it must not already be loaded - * - it must not have a 16-bit counterpart - */ - GetWindowsDirectory(path1, sizeof(path1)); - strcat(path1, "\\system\\"); - strcat(path1, dllname); - hModule1 = LoadLibraryA(path1); - if (!hModule1) - { - /* We must be on Windows NT, so we cannot test */ - return; - } - - GetWindowsDirectory(path2, sizeof(path2)); - strcat(path2, "\\system32\\"); - strcat(path2, dllname); - hModule2 = LoadLibraryA(path2); - if (!hModule2) - { - /* We must be on Windows 9x, so we cannot test */ - ok(FreeLibrary(hModule1), "FreeLibrary() failed\n"); - return; - } - - /* The first LoadLibrary() call may have registered the dll under the - * system32 path. So load it, again, under the '...\system\...' path so - * Wine does not immediately notice that it is already loaded. - */ - hModule3 = LoadLibraryA(path1); - ok(hModule3 != NULL, "LoadLibrary(%s) failed\n", path1); - - /* Now fully unload the dll */ - ok(FreeLibrary(hModule3), "FreeLibrary() failed\n"); - ok(FreeLibrary(hModule2), "FreeLibrary() failed\n"); - ok(FreeLibrary(hModule1), "FreeLibrary() failed\n"); - ok(GetModuleHandle(dllname) == NULL, "%s was not fully unloaded\n", dllname); - - /* Try to load the dll again, if refcounting is ok, this should work */ - hModule1 = LoadLibraryA(path1); - ok(hModule1 != NULL, "LoadLibrary(%s) failed\n", path1); - if (hModule1 != NULL) - ok(FreeLibrary(hModule1), "FreeLibrary() failed\n"); -} - -static void testLoadLibraryA_Wrong(void) -{ - HMODULE hModule; - - /* Try to load a nonexistent dll */ - SetLastError(0xdeadbeef); - hModule = LoadLibraryA("non_ex_pv.dll"); - ok( !hModule, "non_ex_pv.dll should be not loadable\n"); - ok( GetLastError() == ERROR_MOD_NOT_FOUND || GetLastError() == ERROR_DLL_NOT_FOUND, - "Expected ERROR_MOD_NOT_FOUND or ERROR_DLL_NOT_FOUND (win9x), got %d\n", GetLastError()); - - /* Just in case */ - FreeLibrary(hModule); -} - -static void testGetProcAddress_Wrong(void) -{ - FARPROC fp; - - SetLastError(0xdeadbeef); - fp = GetProcAddress(NULL, "non_ex_call"); - ok( !fp, "non_ex_call should not be found\n"); - ok( GetLastError() == ERROR_PROC_NOT_FOUND || GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_PROC_NOT_FOUND or ERROR_INVALID_HANDLE(win9x), got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - fp = GetProcAddress((HMODULE)0xdeadbeef, "non_ex_call"); - ok( !fp, "non_ex_call should not be found\n"); - ok( GetLastError() == ERROR_MOD_NOT_FOUND || GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_MOD_NOT_FOUND or ERROR_INVALID_HANDLE(win9x), got %d\n", GetLastError()); -} - -static void testLoadLibraryEx(void) -{ - CHAR path[MAX_PATH]; - HMODULE hmodule; - HANDLE hfile; - BOOL ret; - - hfile = CreateFileA("testfile.dll", GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); - ok(hfile != INVALID_HANDLE_VALUE, "Expected a valid file handle\n"); - - /* NULL lpFileName */ - if (is_unicode_enabled) - { - SetLastError(0xdeadbeef); - hmodule = LoadLibraryExA(NULL, NULL, 0); - ok(hmodule == 0, "Expected 0, got %p\n", hmodule); - ok(GetLastError() == ERROR_MOD_NOT_FOUND || - GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ - "Expected ERROR_MOD_NOT_FOUND or ERROR_INVALID_PARAMETER, got %d\n", - GetLastError()); - } - else - win_skip("NULL filename crashes on WinMe\n"); - - /* empty lpFileName */ - SetLastError(0xdeadbeef); - hmodule = LoadLibraryExA("", NULL, 0); - ok(hmodule == 0, "Expected 0, got %p\n", hmodule); - ok(GetLastError() == ERROR_MOD_NOT_FOUND || - GetLastError() == ERROR_DLL_NOT_FOUND, /* win9x */ - "Expected ERROR_MOD_NOT_FOUND or ERROR_DLL_NOT_FOUND, got %d\n", - GetLastError()); - - /* hFile is non-NULL */ - SetLastError(0xdeadbeef); - hmodule = LoadLibraryExA("testfile.dll", hfile, 0); - ok(hmodule == 0, "Expected 0, got %p\n", hmodule); - todo_wine - { - ok(GetLastError() == ERROR_SHARING_VIOLATION || - GetLastError() == ERROR_INVALID_PARAMETER || /* win2k3 */ - GetLastError() == ERROR_FILE_NOT_FOUND, /* win9x */ - "Unexpected last error, got %d\n", GetLastError()); - } - - SetLastError(0xdeadbeef); - hmodule = LoadLibraryExA("testfile.dll", (HANDLE)0xdeadbeef, 0); - ok(hmodule == 0, "Expected 0, got %p\n", hmodule); - todo_wine - { - ok(GetLastError() == ERROR_SHARING_VIOLATION || - GetLastError() == ERROR_INVALID_PARAMETER || /* win2k3 */ - GetLastError() == ERROR_FILE_NOT_FOUND, /* win9x */ - "Unexpected last error, got %d\n", GetLastError()); - } - - /* try to open a file that is locked */ - SetLastError(0xdeadbeef); - hmodule = LoadLibraryExA("testfile.dll", NULL, 0); - ok(hmodule == 0, "Expected 0, got %p\n", hmodule); - todo_wine - { - ok(GetLastError() == ERROR_SHARING_VIOLATION || - GetLastError() == ERROR_FILE_NOT_FOUND, /* win9x */ - "Expected ERROR_SHARING_VIOLATION or ERROR_FILE_NOT_FOUND, got %d\n", - GetLastError()); - } - - /* lpFileName does not matter */ - if (is_unicode_enabled) - { - SetLastError(0xdeadbeef); - hmodule = LoadLibraryExA(NULL, hfile, 0); - ok(hmodule == 0, "Expected 0, got %p\n", hmodule); - ok(GetLastError() == ERROR_MOD_NOT_FOUND || - GetLastError() == ERROR_INVALID_PARAMETER, /* win2k3 */ - "Expected ERROR_MOD_NOT_FOUND or ERROR_INVALID_PARAMETER, got %d\n", - GetLastError()); - } - - CloseHandle(hfile); - - /* load empty file */ - SetLastError(0xdeadbeef); - hmodule = LoadLibraryExA("testfile.dll", NULL, LOAD_LIBRARY_AS_DATAFILE); - ok(hmodule == 0, "Expected 0, got %p\n", hmodule); - todo_wine - { - ok(GetLastError() == ERROR_FILE_INVALID || - GetLastError() == ERROR_BAD_FORMAT, /* win9x */ - "Expected ERROR_FILE_INVALID or ERROR_BAD_FORMAT, got %d\n", - GetLastError()); - } - - DeleteFileA("testfile.dll"); - - GetSystemDirectoryA(path, MAX_PATH); - if (path[lstrlenA(path) - 1] != '\\') - lstrcatA(path, "\\"); - lstrcatA(path, "kernel32.dll"); - - /* load kernel32.dll with an absolute path */ - SetLastError(0xdeadbeef); - hmodule = LoadLibraryExA(path, NULL, LOAD_LIBRARY_AS_DATAFILE); - ok(hmodule != 0, "Expected valid module handle\n"); - ok(GetLastError() == 0xdeadbeef || - GetLastError() == ERROR_SUCCESS, /* win9x */ - "Expected 0xdeadbeef or ERROR_SUCCESS, got %d\n", GetLastError()); - - /* try invalid file handle */ - SetLastError(0xdeadbeef); - hmodule = LoadLibraryExA(path, (HANDLE)0xdeadbeef, 0); - if (!hmodule) /* succeeds on xp and older */ - ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError()); - - CloseHandle(hmodule); - - /* load kernel32.dll with no path */ - SetLastError(0xdeadbeef); - hmodule = LoadLibraryExA("kernel32.dll", NULL, LOAD_LIBRARY_AS_DATAFILE); - ok(hmodule != 0, "Expected valid module handle\n"); - ok(GetLastError() == 0xdeadbeef || - GetLastError() == ERROR_SUCCESS, /* win9x */ - "Expected 0xdeadbeef or ERROR_SUCCESS, got %d\n", GetLastError()); - - CloseHandle(hmodule); - - GetCurrentDirectoryA(MAX_PATH, path); - if (path[lstrlenA(path) - 1] != '\\') - lstrcatA(path, "\\"); - lstrcatA(path, "kernel32.dll"); - - /* load kernel32.dll with an absolute path that does not exist */ - SetLastError(0xdeadbeef); - hmodule = LoadLibraryExA(path, NULL, LOAD_LIBRARY_AS_DATAFILE); - todo_wine - { - ok(hmodule == 0, "Expected 0, got %p\n", hmodule); - } - ok(GetLastError() == ERROR_FILE_NOT_FOUND || - broken(GetLastError() == ERROR_INVALID_HANDLE), /* nt4 */ - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - - /* Free the loaded dll when its the first time this dll is loaded - in process - First time should pass, second fail */ - SetLastError(0xdeadbeef); - hmodule = LoadLibraryExA("comctl32.dll", NULL, LOAD_LIBRARY_AS_DATAFILE); - ok(hmodule != 0, "Expected valid module handle\n"); - - SetLastError(0xdeadbeef); - ret = FreeLibrary(hmodule); - ok(ret, "Expected to be able to free the module, failed with %d\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = FreeLibrary(hmodule); - ok(!ret, "Unexpected ability to free the module, failed with %d\n", GetLastError()); - - CloseHandle(hmodule); - -} - -START_TEST(module) -{ - WCHAR filenameW[MAX_PATH]; - - /* Test if we can use GetModuleFileNameW */ - - SetLastError(0xdeadbeef); - GetModuleFileNameW(NULL, filenameW, MAX_PATH); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("GetModuleFileNameW not existing on this platform, skipping W-calls\n"); - is_unicode_enabled = FALSE; - } - - testGetModuleFileName(NULL); - testGetModuleFileName("kernel32.dll"); - testGetModuleFileName_Wrong(); - - testLoadLibraryA(); - testNestedLoadLibraryA(); - testLoadLibraryA_Wrong(); - testGetProcAddress_Wrong(); - testLoadLibraryEx(); -} diff --git a/rostests/winetests/kernel32/path.c b/rostests/winetests/kernel32/path.c deleted file mode 100755 index ba47910f8e3..00000000000 --- a/rostests/winetests/kernel32/path.c +++ /dev/null @@ -1,1742 +0,0 @@ -/* - * Unit test suite for various Path and Directory Functions - * - * Copyright 2002 Geoffrey Hausheer - * Copyright 2006 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 -#include -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "winerror.h" -#include "winnls.h" - -#define HAS_TRAIL_SLASH_A(string) (string[lstrlenA(string)-1]=='\\') - -#define LONGFILE "Long File test.path" -#define SHORTFILE "pathtest.pth" -#define SHORTDIR "shortdir" -#define LONGDIR "Long Directory" -#define NONFILE_SHORT "noexist.pth" -#define NONFILE_LONG "NonExistent File" -#define NONDIR_SHORT "notadir" -#define NONDIR_LONG "NonExistent Directory" - -#define NOT_A_VALID_DRIVE '@' - -/* the following characters don't work well with GetFullPathNameA - in Win98. I don't know if this is a FAT thing, or if it is an OS thing - but I don't test these characters now. - NOTE: Win2k allows GetFullPathNameA to work with them though - |<>" -*/ -static const CHAR funny_chars[]="!@#$%^&*()=+{}[],?'`"; -static const CHAR is_char_ok[] ="11111110111111111011"; - -static DWORD (WINAPI *pGetLongPathNameA)(LPCSTR,LPSTR,DWORD); -static DWORD (WINAPI *pGetLongPathNameW)(LPWSTR,LPWSTR,DWORD); - -/* Present in Win2003+ */ -static BOOL (WINAPI *pNeedCurrentDirectoryForExePathA)(LPCSTR); -static BOOL (WINAPI *pNeedCurrentDirectoryForExePathW)(LPCWSTR); - -static DWORD (WINAPI *pSearchPathA)(LPCSTR,LPCSTR,LPCSTR,DWORD,LPSTR,LPSTR*); -static DWORD (WINAPI *pSearchPathW)(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,LPWSTR,LPWSTR*); - -/* a structure to deal with wine todos somewhat cleanly */ -typedef struct { - DWORD shortlen; - DWORD shorterror; - DWORD s2llen; - DWORD s2lerror; - DWORD longlen; - DWORD longerror; -} SLpassfail; - -/* function that tests GetFullPathNameA, GetShortPathNameA,GetLongPathNameA */ -/* NOTE: the passfail structure is used to allow customizable todo checking - for wine. It is not very pretty, but it sure beats duplicating this - function lots of times -*/ -static void test_ValidPathA(const CHAR *curdir, const CHAR *subdir, const CHAR *filename, - CHAR *shortstr, SLpassfail *passfail, const CHAR *errstr) -{ - CHAR tmpstr[MAX_PATH], - fullpath[MAX_PATH], /*full path to the file (not short/long) */ - subpath[MAX_PATH], /*relative path to the file */ - fullpathshort[MAX_PATH], /*absolute path to the file (short format) */ - fullpathlong[MAX_PATH], /*absolute path to the file (long format) */ - curdirshort[MAX_PATH], /*absolute path to the current dir (short) */ - curdirlong[MAX_PATH]; /*absolute path to the current dir (long) */ - LPSTR strptr; /*ptr to the filename portion of the path */ - DWORD len; -/* if passfail is NULL, we can perform all checks within this function, - otherwise, we will return the relevant data in the passfail struct, so - we must initialize it first -*/ - if(passfail!=NULL) { - passfail->shortlen=-1;passfail->s2llen=-1;passfail->longlen=-1; - passfail->shorterror=0;passfail->s2lerror=0;passfail->longerror=0; - } -/* GetLongPathNameA is only supported on Win2k+ and Win98+ */ - if(pGetLongPathNameA) { - ok((len=pGetLongPathNameA(curdir,curdirlong,MAX_PATH)), - "%s: GetLongPathNameA failed\n",errstr); -/*GetLongPathNameA can return a trailing '\\' but shouldn't do so here */ - ok(! HAS_TRAIL_SLASH_A(curdirlong), - "%s: GetLongPathNameA should not have a trailing \\\n",errstr); - } - ok((len=GetShortPathNameA(curdir,curdirshort,MAX_PATH)), - "%s: GetShortPathNameA failed\n",errstr); -/*GetShortPathNameA can return a trailing '\\' but shouldn't do so here */ - ok(! HAS_TRAIL_SLASH_A(curdirshort), - "%s: GetShortPathNameA should not have a trailing \\\n",errstr); -/* build relative and absolute paths from inputs */ - if(lstrlenA(subdir)) { - sprintf(subpath,"%s\\%s",subdir,filename); - } else { - lstrcpyA(subpath,filename); - } - sprintf(fullpath,"%s\\%s",curdir,subpath); - sprintf(fullpathshort,"%s\\%s",curdirshort,subpath); - sprintf(fullpathlong,"%s\\%s",curdirlong,subpath); -/* Test GetFullPathNameA functionality */ - len=GetFullPathNameA(subpath,MAX_PATH,tmpstr,&strptr); - ok(len, "GetFullPathNameA failed for: '%s'\n",subpath); - if(HAS_TRAIL_SLASH_A(subpath)) { - ok(strptr==NULL, - "%s: GetFullPathNameA should not return a filename ptr\n",errstr); - ok(lstrcmpiA(fullpath,tmpstr)==0, - "%s: GetFullPathNameA returned '%s' instead of '%s'\n", - errstr,tmpstr,fullpath); - } else { - ok(lstrcmpiA(strptr,filename)==0, - "%s: GetFullPathNameA returned '%s' instead of '%s'\n", - errstr,strptr,filename); - ok(lstrcmpiA(fullpath,tmpstr)==0, - "%s: GetFullPathNameA returned '%s' instead of '%s'\n", - errstr,tmpstr,fullpath); - } -/* Test GetShortPathNameA functionality */ - SetLastError(0); - len=GetShortPathNameA(fullpathshort,shortstr,MAX_PATH); - if(passfail==NULL) { - ok(len, "%s: GetShortPathNameA failed\n",errstr); - } else { - passfail->shortlen=len; - passfail->shorterror=GetLastError(); - } -/* Test GetLongPathNameA functionality - We test both conversion from GetFullPathNameA and from GetShortPathNameA -*/ - if(pGetLongPathNameA) { - if(len!=0) { - SetLastError(0); - len=pGetLongPathNameA(shortstr,tmpstr,MAX_PATH); - if(passfail==NULL) { - ok(len, - "%s: GetLongPathNameA failed during Short->Long conversion\n", errstr); - ok(lstrcmpiA(fullpathlong,tmpstr)==0, - "%s: GetLongPathNameA returned '%s' instead of '%s'\n", - errstr,tmpstr,fullpathlong); - } else { - passfail->s2llen=len; - passfail->s2lerror=GetLastError(); - } - } - SetLastError(0); - len=pGetLongPathNameA(fullpath,tmpstr,MAX_PATH); - if(passfail==NULL) { - ok(len, "%s: GetLongPathNameA failed\n",errstr); - if(HAS_TRAIL_SLASH_A(fullpath)) { - ok(lstrcmpiA(fullpathlong,tmpstr)==0, - "%s: GetLongPathNameA returned '%s' instead of '%s'\n", - errstr,tmpstr,fullpathlong); - } else { - ok(lstrcmpiA(fullpathlong,tmpstr)==0, - "%s: GetLongPathNameA returned '%s' instead of '%s'\n", - errstr,tmpstr,fullpathlong); - } - } else { - passfail->longlen=len; - passfail->longerror=GetLastError(); - } - } -} - -/* split path into leading directory, and 8.3 filename */ -static void test_SplitShortPathA(CHAR *path,CHAR *dir,CHAR *eight,CHAR *three) { - int done,error; - int ext,fil; - int len,i; - len=lstrlenA(path); - ext=len; fil=len; done=0; error=0; -/* walk backwards over path looking for '.' or '\\' separators */ - for(i=len-1;(i>=0) && (!done);i--) { - if(path[i]=='.') - if(ext!=len) error=1; else ext=i; - else if(path[i]=='\\') { - if(i==len-1) { - error=1; - } else { - fil=i; - done=1; - } - } - } -/* Check that we didn't find a trailing '\\' or multiple '.' */ - ok(!error,"Illegal file found in 8.3 path '%s'\n",path); -/* Separate dir, root, and extension */ - if(ext!=len) lstrcpyA(three,path+ext+1); else lstrcpyA(three,""); - if(fil!=len) { - lstrcpynA(eight,path+fil+1,ext-fil); - lstrcpynA(dir,path,fil+1); - } else { - lstrcpynA(eight,path,ext+1); - lstrcpyA(dir,""); - } -/* Validate that root and extension really are 8.3 */ - ok(lstrlenA(eight)<=8 && lstrlenA(three)<=3, - "GetShortPathNAmeA did not return an 8.3 path\n"); -} - -/* Check that GetShortPathNameA returns a valid 8.3 path */ -static void test_LongtoShortA(CHAR *teststr,const CHAR *goodstr, - const CHAR *ext,const CHAR *errstr) { - CHAR dir[MAX_PATH],eight[MAX_PATH],three[MAX_PATH]; - - test_SplitShortPathA(teststr,dir,eight,three); - ok(lstrcmpiA(dir,goodstr)==0, - "GetShortPathNameA returned '%s' instead of '%s'\n",dir,goodstr); - ok(lstrcmpiA(three,ext)==0, - "GetShortPathNameA returned '%s' with incorrect extension\n",three); -} - -/* Test that Get(Short|Long|Full)PathNameA work correctly with interesting - characters in the filename. - 'valid' indicates whether this would be an allowed filename - 'todo' indicates that wine doesn't get this right yet. - NOTE: We always call this routine with a nonexistent filename, so - Get(Short|Long)PathNameA should never pass, but GetFullPathNameA - should. -*/ -static void test_FunnyChars(CHAR *curdir,CHAR *curdir_short,CHAR *filename, INT valid,CHAR *errstr) -{ - CHAR tmpstr[MAX_PATH],tmpstr1[MAX_PATH]; - SLpassfail passfail; - - test_ValidPathA(curdir,"",filename,tmpstr,&passfail,errstr); - if(valid) { - sprintf(tmpstr1,"%s\\%s",curdir_short,filename); - ok((passfail.shortlen==0 && - (passfail.shorterror==ERROR_FILE_NOT_FOUND || passfail.shorterror==ERROR_PATH_NOT_FOUND || !passfail.shorterror)) || - (passfail.shortlen==strlen(tmpstr1) && lstrcmpiA(tmpstr,tmpstr1)==0), - "%s: GetShortPathNameA error: len=%d error=%d tmpstr=[%s]\n", - errstr,passfail.shortlen,passfail.shorterror,tmpstr); - } else { - ok(passfail.shortlen==0 && - (passfail.shorterror==ERROR_INVALID_NAME || passfail.shorterror==ERROR_FILE_NOT_FOUND || !passfail.shorterror), - "%s: GetShortPathA should have failed len=%d, error=%d\n", - errstr,passfail.shortlen,passfail.shorterror); - } - if(pGetLongPathNameA) { - ok(passfail.longlen==0,"GetLongPathNameA passed when it shouldn't have\n"); - if(valid) { - ok(passfail.longerror==ERROR_FILE_NOT_FOUND, - "%s: GetLongPathA returned %d and not %d\n", - errstr,passfail.longerror,ERROR_FILE_NOT_FOUND); - } else { - ok(passfail.longerror==ERROR_INVALID_NAME || - passfail.longerror==ERROR_FILE_NOT_FOUND, - "%s: GetLongPathA returned %d and not %d or %d'\n", - errstr, passfail.longerror,ERROR_INVALID_NAME,ERROR_FILE_NOT_FOUND); - } - } -} - -/* Routine to test that SetCurrentDirectory behaves as expected. */ -static void test_setdir(CHAR *olddir,CHAR *newdir, - CHAR *cmprstr, INT pass, const CHAR *errstr) -{ - CHAR tmppath[MAX_PATH], *dirptr; - DWORD val,len,chklen; - - val=SetCurrentDirectoryA(newdir); - len=GetCurrentDirectoryA(MAX_PATH,tmppath); -/* if 'pass' then the SetDirectoryA was supposed to pass */ - if(pass) { - dirptr=(cmprstr==NULL) ? newdir : cmprstr; - chklen=lstrlenA(dirptr); - ok(val,"%s: SetCurrentDirectoryA failed\n",errstr); - ok(len==chklen, - "%s: SetCurrentDirectory did not change the directory, though it passed\n", - errstr); - ok(lstrcmpiA(dirptr,tmppath)==0, - "%s: SetCurrentDirectory did not change the directory, though it passed\n", - errstr); - ok(SetCurrentDirectoryA(olddir), - "%s: Couldn't set directory to it's original value\n",errstr); - } else { -/* else thest that it fails correctly */ - chklen=lstrlenA(olddir); - ok(val==0, - "%s: SetCurrentDirectoryA passed when it should have failed\n",errstr); - ok(len==chklen, - "%s: SetCurrentDirectory changed the directory, though it failed\n", - errstr); - ok(lstrcmpiA(olddir,tmppath)==0, - "%s: SetCurrentDirectory changed the directory, though it failed\n", - errstr); - } -} -static void test_InitPathA(CHAR *newdir, CHAR *curDrive, CHAR *otherDrive) -{ - CHAR tmppath[MAX_PATH], /*path to TEMP */ - tmpstr[MAX_PATH], - tmpstr1[MAX_PATH], - invalid_dir[MAX_PATH]; - - DWORD len,len1,drives; - INT id; - HANDLE hndl; - BOOL bRes; - UINT unique; - - *curDrive = *otherDrive = NOT_A_VALID_DRIVE; - -/* Get the current drive letter */ - if( GetCurrentDirectoryA( MAX_PATH, tmpstr)) - *curDrive = tmpstr[0]; - else - trace( "Unable to discover current drive, some tests will not be conducted.\n"); - -/* Test GetTempPathA */ - len=GetTempPathA(MAX_PATH,tmppath); - ok(len!=0 && len < MAX_PATH,"GetTempPathA failed\n"); - ok(HAS_TRAIL_SLASH_A(tmppath), - "GetTempPathA returned a path that did not end in '\\'\n"); - lstrcpyA(tmpstr,"aaaaaaaa"); - len1=GetTempPathA(len,tmpstr); - ok(len1==len+1 || broken(len1 == len), /* WinME */ - "GetTempPathA should return string length %d instead of %d\n",len+1,len1); - -/* Test GetTmpFileNameA */ - ok((id=GetTempFileNameA(tmppath,"path",0,newdir)),"GetTempFileNameA failed\n"); - sprintf(tmpstr,"pat%.4x.tmp",id & 0xffff); - sprintf(tmpstr1,"pat%x.tmp",id & 0xffff); - ok(lstrcmpiA(newdir+lstrlenA(tmppath),tmpstr)==0 || - lstrcmpiA(newdir+lstrlenA(tmppath),tmpstr1)==0, - "GetTempFileNameA returned '%s' which doesn't match '%s' or '%s'. id=%x\n", - newdir,tmpstr,tmpstr1,id); - ok(DeleteFileA(newdir),"Couldn't delete the temporary file we just created\n"); - - id=GetTempFileNameA(tmppath,NULL,0,newdir); -/* Windows 95, 98 return 0==id, while Windows 2000, XP return 0!=id */ - if (id) - { - sprintf(tmpstr,"%.4x.tmp",id & 0xffff); - sprintf(tmpstr1,"%x.tmp",id & 0xffff); - ok(lstrcmpiA(newdir+lstrlenA(tmppath),tmpstr)==0 || - lstrcmpiA(newdir+lstrlenA(tmppath),tmpstr1)==0, - "GetTempFileNameA returned '%s' which doesn't match '%s' or '%s'. id=%x\n", - newdir,tmpstr,tmpstr1,id); - ok(DeleteFileA(newdir),"Couldn't delete the temporary file we just created\n"); - } - - for(unique=0;unique<3;unique++) { - /* Nonexistent path */ - sprintf(invalid_dir, "%s\\%s",tmppath,"non_existent_dir_1jwj3y32nb3"); - SetLastError(0xdeadbeef); - ok(!GetTempFileNameA(invalid_dir,"tfn",unique,newdir),"GetTempFileNameA should have failed\n"); - ok(GetLastError()==ERROR_DIRECTORY || broken(GetLastError()==ERROR_PATH_NOT_FOUND)/*win98*/, - "got %d, expected ERROR_DIRECTORY\n", GetLastError()); - - /* Check return value for unique !=0 */ - if(unique) { - ok((GetTempFileNameA(tmppath,"tfn",unique,newdir) == unique),"GetTempFileNameA unexpectedly failed\n"); - /* if unique != 0, the actual temp files are not created: */ - ok(!DeleteFileA(newdir) && GetLastError() == ERROR_FILE_NOT_FOUND,"Deleted a file that shouldn't exist!\n"); - } - } - -/* Find first valid drive letter that is neither newdir[0] nor curDrive */ - drives = GetLogicalDrives() & ~(1<<(newdir[0]-'A')); - if( *curDrive != NOT_A_VALID_DRIVE) - drives &= ~(1<<(*curDrive-'A')); - if( drives) - for( *otherDrive='A'; (drives & 1) == 0; drives>>=1, (*otherDrive)++); - else - trace( "Could not find alternative drive, some tests will not be conducted.\n"); - -/* Do some CreateDirectoryA tests */ -/* It would be nice to do test the SECURITY_ATTRIBUTES, but I don't - really understand how they work. - More formal tests should be done along with CreateFile tests -*/ - ok((id=GetTempFileNameA(tmppath,"path",0,newdir)),"GetTempFileNameA failed\n"); - ok(CreateDirectoryA(newdir,NULL)==0, - "CreateDirectoryA succeeded even though a file of the same name exists\n"); - ok(DeleteFileA(newdir),"Couldn't delete the temporary file we just created\n"); - ok(CreateDirectoryA(newdir,NULL),"CreateDirectoryA failed\n"); -/* Create some files to test other functions. Note, we will test CreateFileA - at some later point -*/ - sprintf(tmpstr,"%s\\%s",newdir,SHORTDIR); - ok(CreateDirectoryA(tmpstr,NULL),"CreateDirectoryA failed\n"); - sprintf(tmpstr,"%s\\%s",newdir,LONGDIR); - ok(CreateDirectoryA(tmpstr,NULL),"CreateDirectoryA failed\n"); - sprintf(tmpstr,"%c:", *curDrive); - bRes = CreateDirectoryA(tmpstr,NULL); - ok(!bRes && (GetLastError() == ERROR_ACCESS_DENIED || - GetLastError() == ERROR_ALREADY_EXISTS), - "CreateDirectoryA(\"%s\" should have failed (%d)\n", tmpstr, GetLastError()); - sprintf(tmpstr,"%c:\\", *curDrive); - bRes = CreateDirectoryA(tmpstr,NULL); - ok(!bRes && (GetLastError() == ERROR_ACCESS_DENIED || - GetLastError() == ERROR_ALREADY_EXISTS), - "CreateDirectoryA(\"%s\" should have failed (%d)\n", tmpstr, GetLastError()); - sprintf(tmpstr,"%s\\%s\\%s",newdir,SHORTDIR,SHORTFILE); - hndl=CreateFileA(tmpstr,GENERIC_WRITE,0,NULL, - CREATE_NEW,FILE_ATTRIBUTE_NORMAL,NULL); - ok(hndl!=INVALID_HANDLE_VALUE,"CreateFileA failed\n"); - ok(CloseHandle(hndl),"CloseHandle failed\n"); - sprintf(tmpstr,"%s\\%s\\%s",newdir,SHORTDIR,LONGFILE); - hndl=CreateFileA(tmpstr,GENERIC_WRITE,0,NULL, - CREATE_NEW,FILE_ATTRIBUTE_NORMAL,NULL); - ok(hndl!=INVALID_HANDLE_VALUE,"CreateFileA failed\n"); - ok(CloseHandle(hndl),"CloseHandle failed\n"); - sprintf(tmpstr,"%s\\%s\\%s",newdir,LONGDIR,SHORTFILE); - hndl=CreateFileA(tmpstr,GENERIC_WRITE,0,NULL, - CREATE_NEW,FILE_ATTRIBUTE_NORMAL,NULL); - ok(hndl!=INVALID_HANDLE_VALUE,"CreateFileA failed\n"); - ok(CloseHandle(hndl),"CloseHandle failed\n"); - sprintf(tmpstr,"%s\\%s\\%s",newdir,LONGDIR,LONGFILE); - hndl=CreateFileA(tmpstr,GENERIC_WRITE,0,NULL, - CREATE_NEW,FILE_ATTRIBUTE_NORMAL,NULL); - ok(hndl!=INVALID_HANDLE_VALUE,"CreateFileA failed\n"); - ok(CloseHandle(hndl),"CloseHandle failed\n"); -} - -/* Test GetCurrentDirectory & SetCurrentDirectory */ -static void test_CurrentDirectoryA(CHAR *origdir, CHAR *newdir) -{ - CHAR tmpstr[MAX_PATH],tmpstr1[MAX_PATH]; - char *buffer; - DWORD len,len1; -/* Save the original directory, so that we can return to it at the end - of the test -*/ - len=GetCurrentDirectoryA(MAX_PATH,origdir); - ok(len!=0 && len < MAX_PATH,"GetCurrentDirectoryA failed\n"); -/* Make sure that CetCurrentDirectoryA doesn't overwrite the buffer when the - buffer size is too small to hold the current directory -*/ - lstrcpyA(tmpstr,"aaaaaaa"); - len1=GetCurrentDirectoryA(len,tmpstr); - ok(len1==len+1, "GetCurrentDirectoryA returned %d instead of %d\n",len1,len+1); - ok(lstrcmpiA(tmpstr,"aaaaaaa")==0, - "GetCurrentDirectoryA should not have modified the buffer\n"); - - buffer = HeapAlloc( GetProcessHeap(), 0, 2 * 65536 ); - SetLastError( 0xdeadbeef ); - strcpy( buffer, "foo" ); - len = GetCurrentDirectoryA( 32767, buffer ); - ok( len != 0 && len < MAX_PATH, "GetCurrentDirectoryA failed %u err %u\n", len, GetLastError() ); - if (len) ok( !strcmp( buffer, origdir ), "wrong result %s\n", buffer ); - SetLastError( 0xdeadbeef ); - strcpy( buffer, "foo" ); - len = GetCurrentDirectoryA( 32768, buffer ); - ok( len != 0 && len < MAX_PATH, "GetCurrentDirectoryA failed %u err %u\n", len, GetLastError() ); - if (len) ok( !strcmp( buffer, origdir ), "wrong result %s\n", buffer ); - SetLastError( 0xdeadbeef ); - strcpy( buffer, "foo" ); - len = GetCurrentDirectoryA( 65535, buffer ); - ok( (len != 0 && len < MAX_PATH) || broken(!len), /* nt4, win2k, xp */ "GetCurrentDirectoryA failed %u err %u\n", len, GetLastError() ); - if (len) ok( !strcmp( buffer, origdir ), "wrong result %s\n", buffer ); - SetLastError( 0xdeadbeef ); - strcpy( buffer, "foo" ); - len = GetCurrentDirectoryA( 65536, buffer ); - ok( (len != 0 && len < MAX_PATH) || broken(!len), /* nt4 */ "GetCurrentDirectoryA failed %u err %u\n", len, GetLastError() ); - if (len) ok( !strcmp( buffer, origdir ), "wrong result %s\n", buffer ); - SetLastError( 0xdeadbeef ); - strcpy( buffer, "foo" ); - len = GetCurrentDirectoryA( 2 * 65536, buffer ); - ok( (len != 0 && len < MAX_PATH) || broken(!len), /* nt4 */ "GetCurrentDirectoryA failed %u err %u\n", len, GetLastError() ); - if (len) ok( !strcmp( buffer, origdir ), "wrong result %s\n", buffer ); - HeapFree( GetProcessHeap(), 0, buffer ); - -/* Check for crash prevention on swapped args. Crashes all but Win9x. -*/ - if (0) - { - GetCurrentDirectoryA( 42, (LPSTR)(MAX_PATH + 42) ); - } - -/* SetCurrentDirectoryA shouldn't care whether the string has a - trailing '\\' or not -*/ - sprintf(tmpstr,"%s\\",newdir); - test_setdir(origdir,tmpstr,newdir,1,"check 1"); - test_setdir(origdir,newdir,NULL,1,"check 2"); -/* Set the directory to the working area. We just tested that this works, - so why check it again. -*/ - SetCurrentDirectoryA(newdir); -/* Check that SetCurrentDirectory fails when a nonexistent dir is specified */ - sprintf(tmpstr,"%s\\%s\\%s",newdir,SHORTDIR,NONDIR_SHORT); - test_setdir(newdir,tmpstr,NULL,0,"check 3"); -/* Check that SetCurrentDirectory fails for a nonexistent lond directory */ - sprintf(tmpstr,"%s\\%s\\%s",newdir,SHORTDIR,NONDIR_LONG); - test_setdir(newdir,tmpstr,NULL,0,"check 4"); -/* Check that SetCurrentDirectory passes with a long directory */ - sprintf(tmpstr,"%s\\%s",newdir,LONGDIR); - test_setdir(newdir,tmpstr,NULL,1,"check 5"); -/* Check that SetCurrentDirectory passes with a short relative directory */ - sprintf(tmpstr,"%s",SHORTDIR); - sprintf(tmpstr1,"%s\\%s",newdir,SHORTDIR); - test_setdir(newdir,tmpstr,tmpstr1,1,"check 6"); -/* starting with a '.' */ - sprintf(tmpstr,".\\%s",SHORTDIR); - test_setdir(newdir,tmpstr,tmpstr1,1,"check 7"); -/* Check that SetCurrentDirectory passes with a short relative directory */ - sprintf(tmpstr,"%s",LONGDIR); - sprintf(tmpstr1,"%s\\%s",newdir,LONGDIR); - test_setdir(newdir,tmpstr,tmpstr1,1,"check 8"); -/* starting with a '.' */ - sprintf(tmpstr,".\\%s",LONGDIR); - test_setdir(newdir,tmpstr,tmpstr1,1,"check 9"); -/* change to root without a trailing backslash. The function call succeeds - but the directory is not changed. -*/ - sprintf(tmpstr, "%c:", newdir[0]); - test_setdir(newdir,tmpstr,newdir,1,"check 10"); -/* works however with a trailing backslash */ - sprintf(tmpstr, "%c:\\", newdir[0]); - test_setdir(newdir,tmpstr,NULL,1,"check 11"); -} - -/* Cleanup the mess we made while executing these tests */ -static void test_CleanupPathA(CHAR *origdir, CHAR *curdir) -{ - CHAR tmpstr[MAX_PATH]; - sprintf(tmpstr,"%s\\%s\\%s",curdir,SHORTDIR,SHORTFILE); - ok(DeleteFileA(tmpstr),"DeleteFileA failed\n"); - sprintf(tmpstr,"%s\\%s\\%s",curdir,SHORTDIR,LONGFILE); - ok(DeleteFileA(tmpstr),"DeleteFileA failed\n"); - sprintf(tmpstr,"%s\\%s\\%s",curdir,LONGDIR,SHORTFILE); - ok(DeleteFileA(tmpstr),"DeleteFileA failed\n"); - sprintf(tmpstr,"%s\\%s\\%s",curdir,LONGDIR,LONGFILE); - ok(DeleteFileA(tmpstr),"DeleteFileA failed\n"); - sprintf(tmpstr,"%s\\%s",curdir,SHORTDIR); - ok(RemoveDirectoryA(tmpstr),"RemoveDirectoryA failed\n"); - sprintf(tmpstr,"%s\\%s",curdir,LONGDIR); - ok(RemoveDirectoryA(tmpstr),"RemoveDirectoryA failed\n"); - ok(SetCurrentDirectoryA(origdir),"SetCurrentDirectoryA failed\n"); - ok(RemoveDirectoryA(curdir),"RemoveDirectoryA failed\n"); -} - -/* test that short path name functions work regardless of case */ -static void test_ShortPathCase(const char *tmpdir, const char *dirname, - const char *filename) -{ - char buf[MAX_PATH], shortbuf[MAX_PATH]; - HANDLE hndl; - int i; - - snprintf(buf,sizeof(buf),"%s\\%s\\%s",tmpdir,dirname,filename); - GetShortPathNameA(buf,shortbuf,sizeof(shortbuf)); - hndl = CreateFileA(shortbuf,GENERIC_READ|GENERIC_WRITE,0,NULL,OPEN_EXISTING,0,NULL); - ok(hndl!=INVALID_HANDLE_VALUE,"CreateFileA failed (%d)\n",GetLastError()); - CloseHandle(hndl); - /* Now for the real test */ - for(i=0;i= len_with_null, "Expected >= %u, got %u\n", len_with_null, len); - - len = GetTempPathA(0, NULL); - ok(len >= len_with_null, "Expected >= %u, got %u\n", len_with_null, len); - - /* The call above gave us the buffer size that Windows thinks is needed - * so the next call should work - */ - lstrcpyA(buf, "foo"); - len = GetTempPathA(len, buf); - ok(lstrcmpiA(buf, tmp_dir) == 0, "expected [%s], got [%s]\n",tmp_dir,buf); - ok(len == strlen(buf), "returned length should be equal to the length of string\n"); -} - -static void test_GetTempPathW(char* tmp_dir) -{ - DWORD len, len_with_null; - WCHAR buf[MAX_PATH]; - WCHAR tmp_dirW[MAX_PATH]; - static const WCHAR fooW[] = {'f','o','o',0}; - - MultiByteToWideChar(CP_ACP,0,tmp_dir,-1,tmp_dirW,sizeof(tmp_dirW)/sizeof(*tmp_dirW)); - len_with_null = lstrlenW(tmp_dirW) + 1; - - /* This one is different from ANSI version: ANSI version doesn't - * touch the buffer, unicode version usually truncates the buffer - * to zero size. NT still exaggerates the required buffer size - * sometimes so we cannot test for an exact match. Finally, the - * 'len_with_null - 1' case is so buggy on Windows it's not testable. - * For instance on NT4 it will sometimes return a path without the - * trailing '\\' and sometimes return an error. - */ - - lstrcpyW(buf, fooW); - len = GetTempPathW(MAX_PATH, buf); - if (len == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("GetTempPathW is not available\n"); - return; - } - ok(lstrcmpiW(buf, tmp_dirW) == 0, "GetTempPathW returned an incorrect temporary path\n"); - ok(len == lstrlenW(buf), "returned length should be equal to the length of string\n"); - - lstrcpyW(buf, fooW); - len = GetTempPathW(1, buf); - ok(buf[0] == 0, "unicode version should truncate the buffer to zero size\n"); - ok(len >= len_with_null, "Expected >= %u, got %u\n", len_with_null, len); - - len = GetTempPathW(0, NULL); - ok(len >= len_with_null, "Expected >= %u, got %u\n", len_with_null, len); - - lstrcpyW(buf, fooW); - len = GetTempPathW(len, buf); - ok(lstrcmpiW(buf, tmp_dirW) == 0, "GetTempPathW returned an incorrect temporary path\n"); - ok(len == lstrlenW(buf), "returned length should be equal to the length of string\n"); -} - -static void test_GetTempPath(void) -{ - char save_TMP[MAX_PATH]; - char windir[MAX_PATH]; - char buf[MAX_PATH]; - - if (!GetEnvironmentVariableA("TMP", save_TMP, sizeof(save_TMP))) save_TMP[0] = 0; - - /* test default configuration */ - trace("TMP=%s\n", save_TMP); - if (save_TMP[0]) - { - strcpy(buf,save_TMP); - if (buf[strlen(buf)-1]!='\\') - strcat(buf,"\\"); - test_GetTempPathA(buf); - test_GetTempPathW(buf); - } - - /* TMP=C:\WINDOWS */ - GetWindowsDirectoryA(windir, sizeof(windir)); - SetEnvironmentVariableA("TMP", windir); - GetEnvironmentVariableA("TMP", buf, sizeof(buf)); - trace("TMP=%s\n", buf); - strcat(windir,"\\"); - test_GetTempPathA(windir); - test_GetTempPathW(windir); - - /* TMP=C:\ */ - GetWindowsDirectoryA(windir, sizeof(windir)); - windir[3] = 0; - SetEnvironmentVariableA("TMP", windir); - GetEnvironmentVariableA("TMP", buf, sizeof(buf)); - trace("TMP=%s\n", buf); - test_GetTempPathA(windir); - test_GetTempPathW(windir); - - /* TMP=C: i.e. use current working directory of the specified drive */ - GetWindowsDirectoryA(windir, sizeof(windir)); - SetCurrentDirectoryA(windir); - windir[2] = 0; - SetEnvironmentVariableA("TMP", windir); - GetEnvironmentVariableA("TMP", buf, sizeof(buf)); - trace("TMP=%s\n", buf); - GetWindowsDirectoryA(windir, sizeof(windir)); - strcat(windir,"\\"); - test_GetTempPathA(windir); - test_GetTempPathW(windir); - - SetEnvironmentVariableA("TMP", save_TMP); -} - -static void test_GetLongPathNameA(void) -{ - DWORD length, explength, hostsize; - char tempfile[MAX_PATH]; - char longpath[MAX_PATH]; - char unc_prefix[MAX_PATH]; - char unc_short[MAX_PATH], unc_long[MAX_PATH]; - char temppath[MAX_PATH], temppath2[MAX_PATH]; - HANDLE file; - - if (!pGetLongPathNameA) - return; - - GetTempPathA(MAX_PATH, tempfile); - lstrcatA(tempfile, "longfilename.longext"); - - file = CreateFileA(tempfile, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - CloseHandle(file); - - /* Test a normal path with a small buffer size */ - memset(temppath, 0, MAX_PATH); - length = pGetLongPathNameA(tempfile, temppath, 4); - /* We have a failure so length should be the minimum plus the terminating '0' */ - ok(length >= lstrlen(tempfile) + 1, "Wrong length\n"); - ok(temppath[0] == 0, "Buffer should not have been touched\n"); - - /* Some UNC syntax tests */ - - memset(temppath, 0, MAX_PATH); - memset(temppath2, 0, MAX_PATH); - lstrcpyA(temppath2, "\\\\?\\"); - lstrcatA(temppath2, tempfile); - explength = length + 4; - - SetLastError(0xdeadbeef); - length = pGetLongPathNameA(temppath2, NULL, 0); - if (length == 0 && GetLastError() == ERROR_BAD_NET_NAME) - { - win_skip("UNC syntax tests don't work on Win98/WinMe\n"); - DeleteFileA(tempfile); - return; - } - ok(length == explength, "Wrong length %d, expected %d\n", length, explength); - - length = pGetLongPathNameA(temppath2, NULL, MAX_PATH); - ok(length == explength, "Wrong length %d, expected %d\n", length, explength); - - length = pGetLongPathNameA(temppath2, temppath, 4); - ok(length == explength, "Wrong length %d, expected %d\n", length, explength); - ok(temppath[0] == 0, "Buffer should not have been touched\n"); - - /* Now an UNC path with the computername */ - lstrcpyA(unc_prefix, "\\\\"); - hostsize = sizeof(unc_prefix) - 2; - GetComputerName(unc_prefix + 2, &hostsize); - lstrcatA(unc_prefix, "\\"); - - /* Create a short syntax for the whole unc path */ - memset(unc_short, 0, MAX_PATH); - GetShortPathNameA(tempfile, temppath, MAX_PATH); - lstrcpyA(unc_short, unc_prefix); - unc_short[lstrlenA(unc_short)] = temppath[0]; - lstrcatA(unc_short, "$\\"); - lstrcatA(unc_short, strchr(temppath, '\\') + 1); - - /* Create a long syntax for reference */ - memset(longpath, 0, MAX_PATH); - pGetLongPathNameA(tempfile, temppath, MAX_PATH); - lstrcpyA(longpath, unc_prefix); - longpath[lstrlenA(longpath)] = temppath[0]; - lstrcatA(longpath, "$\\"); - lstrcatA(longpath, strchr(temppath, '\\') + 1); - - /* NULL test */ - SetLastError(0xdeadbeef); - length = pGetLongPathNameA(unc_short, NULL, 0); - if (length == 0 && GetLastError() == ERROR_BAD_NETPATH) - { - /* Seen on Window XP Home */ - win_skip("UNC with computername is not supported\n"); - DeleteFileA(tempfile); - return; - } - explength = lstrlenA(longpath) + 1; - todo_wine - ok(length == explength, "Wrong length %d, expected %d\n", length, explength); - - length = pGetLongPathNameA(unc_short, NULL, MAX_PATH); - todo_wine - ok(length == explength, "Wrong length %d, expected %d\n", length, explength); - - memset(unc_long, 0, MAX_PATH); - length = pGetLongPathNameA(unc_short, unc_long, lstrlenA(unc_short)); - /* length will include terminating '0' on failure */ - todo_wine - ok(length == explength, "Wrong length %d, expected %d\n", length, explength); - ok(unc_long[0] == 0, "Buffer should not have been touched\n"); - - memset(unc_long, 0, MAX_PATH); - length = pGetLongPathNameA(unc_short, unc_long, length); - /* length doesn't include terminating '0' on success */ - explength--; - todo_wine - { - ok(length == explength, "Wrong length %d, expected %d\n", length, explength); - ok(!lstrcmpiA(unc_long, longpath), "Expected (%s), got (%s)\n", longpath, unc_long); - } - - DeleteFileA(tempfile); -} - -static void test_GetLongPathNameW(void) -{ - DWORD length, expanded; - BOOL ret; - HANDLE file; - WCHAR empty[MAX_PATH]; - WCHAR tempdir[MAX_PATH], name[200]; - WCHAR dirpath[4 + MAX_PATH + 200]; /* To ease removal */ - WCHAR shortpath[4 + MAX_PATH + 200 + 1 + 200]; - static const WCHAR prefix[] = { '\\','\\','?','\\', 0}; - static const WCHAR backslash[] = { '\\', 0}; - static const WCHAR letterX[] = { 'X', 0}; - - if (!pGetLongPathNameW) - return; - - SetLastError(0xdeadbeef); - length = pGetLongPathNameW(NULL,NULL,0); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("GetLongPathNameW is not implemented\n"); - return; - } - ok(0==length,"GetLongPathNameW returned %d but expected 0\n",length); - ok(GetLastError()==ERROR_INVALID_PARAMETER,"GetLastError returned %d but expected ERROR_INVALID_PARAMETER\n",GetLastError()); - - SetLastError(0xdeadbeef); - empty[0]=0; - length = pGetLongPathNameW(empty,NULL,0); - ok(0==length,"GetLongPathNameW returned %d but expected 0\n",length); - ok(GetLastError()==ERROR_PATH_NOT_FOUND,"GetLastError returned %d but expected ERROR_PATH_NOT_FOUND\n",GetLastError()); - - /* Create a long path name. The path needs to exist for these tests to - * succeed so we need the "\\?\" prefix when creating directories and - * files. - */ - name[0] = 0; - while (lstrlenW(name) < (sizeof(name)/sizeof(WCHAR) - 1)) - lstrcatW(name, letterX); - - GetTempPathW(MAX_PATH, tempdir); - - lstrcpyW(shortpath, prefix); - lstrcatW(shortpath, tempdir); - lstrcatW(shortpath, name); - lstrcpyW(dirpath, shortpath); - ret = CreateDirectoryW(shortpath, NULL); - ok(ret, "Could not create the temporary directory : %d\n", GetLastError()); - lstrcatW(shortpath, backslash); - lstrcatW(shortpath, name); - - /* Path does not exist yet and we know it overruns MAX_PATH */ - - /* No prefix */ - SetLastError(0xdeadbeef); - length = pGetLongPathNameW(shortpath + 4, NULL, 0); - ok(length == 0, "Expected 0, got %d\n", length); - todo_wine - ok(GetLastError() == ERROR_PATH_NOT_FOUND, - "Expected ERROR_PATH_NOT_FOUND, got %d\n", GetLastError()); - /* With prefix */ - SetLastError(0xdeadbeef); - length = pGetLongPathNameW(shortpath, NULL, 0); - todo_wine - { - ok(length == 0, "Expected 0, got %d\n", length); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_PATH_NOT_FOUND, got %d\n", GetLastError()); - } - - file = CreateFileW(shortpath, GENERIC_READ|GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - ok(file != INVALID_HANDLE_VALUE, - "Could not create the temporary file : %d.\n", GetLastError()); - CloseHandle(file); - - /* Path exists */ - - /* No prefix */ - SetLastError(0xdeadbeef); - length = pGetLongPathNameW(shortpath + 4, NULL, 0); - todo_wine - { - ok(length == 0, "Expected 0, got %d\n", length); - ok(GetLastError() == ERROR_PATH_NOT_FOUND, "Expected ERROR_PATH_NOT_FOUND, got %d\n", GetLastError()); - } - /* With prefix */ - expanded = 4 + (pGetLongPathNameW(tempdir, NULL, 0) - 1) + lstrlenW(name) + 1 + lstrlenW(name) + 1; - SetLastError(0xdeadbeef); - length = pGetLongPathNameW(shortpath, NULL, 0); - ok(length == expanded, "Expected %d, got %d\n", expanded, length); - - /* NULL buffer with length crashes on Windows */ - if (0) - pGetLongPathNameW(shortpath, NULL, 20); - - ok(DeleteFileW(shortpath), "Could not delete temporary file\n"); - ok(RemoveDirectoryW(dirpath), "Could not delete temporary directory\n"); -} - -static void test_GetShortPathNameW(void) -{ - WCHAR test_path[] = { 'L', 'o', 'n', 'g', 'D', 'i', 'r', 'e', 'c', 't', 'o', 'r', 'y', 'N', 'a', 'm', 'e', 0 }; - WCHAR path[MAX_PATH]; - WCHAR short_path[MAX_PATH]; - DWORD length; - HANDLE file; - int ret; - WCHAR name[] = { 't', 'e', 's', 't', 0 }; - WCHAR backSlash[] = { '\\', 0 }; - - SetLastError(0xdeadbeef); - GetTempPathW( MAX_PATH, path ); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("GetTempPathW is not implemented\n"); - return; - } - - lstrcatW( path, test_path ); - lstrcatW( path, backSlash ); - ret = CreateDirectoryW( path, NULL ); - ok( ret, "Directory was not created. LastError = %d\n", GetLastError() ); - - /* Starting a main part of test */ - length = GetShortPathNameW( path, short_path, 0 ); - ok( length, "GetShortPathNameW returned 0.\n" ); - ret = GetShortPathNameW( path, short_path, length ); - ok( ret, "GetShortPathNameW returned 0.\n" ); - lstrcatW( short_path, name ); - file = CreateFileW( short_path, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL ); - ok( file != INVALID_HANDLE_VALUE, "File was not created.\n" ); - - /* End test */ - CloseHandle( file ); - ret = DeleteFileW( short_path ); - ok( ret, "Cannot delete file.\n" ); - ret = RemoveDirectoryW( path ); - ok( ret, "Cannot delete directory.\n" ); -} - -static void test_GetSystemDirectory(void) -{ - CHAR buffer[MAX_PATH + 4]; - DWORD res; - DWORD total; - - SetLastError(0xdeadbeef); - res = GetSystemDirectory(NULL, 0); - /* res includes the terminating Zero */ - ok(res > 0, "returned %d with %d (expected '>0')\n", res, GetLastError()); - - total = res; - - /* this crashes on XP */ - if (0) - GetSystemDirectory(NULL, total); - - SetLastError(0xdeadbeef); - res = GetSystemDirectory(NULL, total-1); - /* 95+NT: total (includes the terminating Zero) - 98+ME: 0 with ERROR_INVALID_PARAMETER */ - ok( (res == total) || (!res && (GetLastError() == ERROR_INVALID_PARAMETER)), - "returned %d with %d (expected '%d' or: '0' with " - "ERROR_INVALID_PARAMETER)\n", res, GetLastError(), total); - - if (total > MAX_PATH) return; - - buffer[0] = '\0'; - SetLastError(0xdeadbeef); - res = GetSystemDirectory(buffer, total); - /* res does not include the terminating Zero */ - ok( (res == (total-1)) && (buffer[0]), - "returned %d with %d and '%s' (expected '%d' and a string)\n", - res, GetLastError(), buffer, total-1); - - buffer[0] = '\0'; - SetLastError(0xdeadbeef); - res = GetSystemDirectory(buffer, total + 1); - /* res does not include the terminating Zero */ - ok( (res == (total-1)) && (buffer[0]), - "returned %d with %d and '%s' (expected '%d' and a string)\n", - res, GetLastError(), buffer, total-1); - - memset(buffer, '#', total + 1); - buffer[total + 2] = '\0'; - SetLastError(0xdeadbeef); - res = GetSystemDirectory(buffer, total-1); - /* res includes the terminating Zero) */ - ok( res == total, "returned %d with %d and '%s' (expected '%d')\n", - res, GetLastError(), buffer, total); - - memset(buffer, '#', total + 1); - buffer[total + 2] = '\0'; - SetLastError(0xdeadbeef); - res = GetSystemDirectory(buffer, total-2); - /* res includes the terminating Zero) */ - ok( res == total, "returned %d with %d and '%s' (expected '%d')\n", - res, GetLastError(), buffer, total); -} - -static void test_GetWindowsDirectory(void) -{ - CHAR buffer[MAX_PATH + 4]; - DWORD res; - DWORD total; - - SetLastError(0xdeadbeef); - res = GetWindowsDirectory(NULL, 0); - /* res includes the terminating Zero */ - ok(res > 0, "returned %d with %d (expected '>0')\n", res, GetLastError()); - - total = res; - /* this crashes on XP */ - if (0) - GetWindowsDirectory(NULL, total); - - SetLastError(0xdeadbeef); - res = GetWindowsDirectory(NULL, total-1); - /* 95+NT: total (includes the terminating Zero) - 98+ME: 0 with ERROR_INVALID_PARAMETER */ - ok( (res == total) || (!res && (GetLastError() == ERROR_INVALID_PARAMETER)), - "returned %d with %d (expected '%d' or: '0' with " - "ERROR_INVALID_PARAMETER)\n", res, GetLastError(), total); - - if (total > MAX_PATH) return; - - buffer[0] = '\0'; - SetLastError(0xdeadbeef); - res = GetWindowsDirectory(buffer, total); - /* res does not include the terminating Zero */ - ok( (res == (total-1)) && (buffer[0]), - "returned %d with %d and '%s' (expected '%d' and a string)\n", - res, GetLastError(), buffer, total-1); - - buffer[0] = '\0'; - SetLastError(0xdeadbeef); - res = GetWindowsDirectory(buffer, total + 1); - /* res does not include the terminating Zero */ - ok( (res == (total-1)) && (buffer[0]), - "returned %d with %d and '%s' (expected '%d' and a string)\n", - res, GetLastError(), buffer, total-1); - - memset(buffer, '#', total + 1); - buffer[total + 2] = '\0'; - SetLastError(0xdeadbeef); - res = GetWindowsDirectory(buffer, total-1); - /* res includes the terminating Zero) */ - ok( res == total, "returned %d with %d and '%s' (expected '%d')\n", - res, GetLastError(), buffer, total); - - memset(buffer, '#', total + 1); - buffer[total + 2] = '\0'; - SetLastError(0xdeadbeef); - res = GetWindowsDirectory(buffer, total-2); - /* res includes the terminating Zero) */ - ok( res == total, "returned %d with %d and '%s' (expected '%d')\n", - res, GetLastError(), buffer, total); -} - -static void test_NeedCurrentDirectoryForExePathA(void) -{ - if (!pNeedCurrentDirectoryForExePathA) - { - win_skip("NeedCurrentDirectoryForExePathA is not available\n"); - return; - } - - /* Crashes in Windows */ - if (0) - pNeedCurrentDirectoryForExePathA(NULL); - - SetEnvironmentVariableA("NoDefaultCurrentDirectoryInExePath", NULL); - ok(pNeedCurrentDirectoryForExePathA("."), "returned FALSE for \".\"\n"); - ok(pNeedCurrentDirectoryForExePathA("c:\\"), "returned FALSE for \"c:\\\"\n"); - ok(pNeedCurrentDirectoryForExePathA("cmd.exe"), "returned FALSE for \"cmd.exe\"\n"); - - SetEnvironmentVariableA("NoDefaultCurrentDirectoryInExePath", "nya"); - ok(!pNeedCurrentDirectoryForExePathA("."), "returned TRUE for \".\"\n"); - ok(pNeedCurrentDirectoryForExePathA("c:\\"), "returned FALSE for \"c:\\\"\n"); - ok(!pNeedCurrentDirectoryForExePathA("cmd.exe"), "returned TRUE for \"cmd.exe\"\n"); -} - -static void test_NeedCurrentDirectoryForExePathW(void) -{ - const WCHAR thispath[] = {'.', 0}; - const WCHAR fullpath[] = {'c', ':', '\\', 0}; - const WCHAR cmdname[] = {'c', 'm', 'd', '.', 'e', 'x', 'e', 0}; - - if (!pNeedCurrentDirectoryForExePathW) - { - win_skip("NeedCurrentDirectoryForExePathW is not available\n"); - return; - } - - /* Crashes in Windows */ - if (0) - pNeedCurrentDirectoryForExePathW(NULL); - - SetEnvironmentVariableA("NoDefaultCurrentDirectoryInExePath", NULL); - ok(pNeedCurrentDirectoryForExePathW(thispath), "returned FALSE for \".\"\n"); - ok(pNeedCurrentDirectoryForExePathW(fullpath), "returned FALSE for \"c:\\\"\n"); - ok(pNeedCurrentDirectoryForExePathW(cmdname), "returned FALSE for \"cmd.exe\"\n"); - - SetEnvironmentVariableA("NoDefaultCurrentDirectoryInExePath", "nya"); - ok(!pNeedCurrentDirectoryForExePathW(thispath), "returned TRUE for \".\"\n"); - ok(pNeedCurrentDirectoryForExePathW(fullpath), "returned FALSE for \"c:\\\"\n"); - ok(!pNeedCurrentDirectoryForExePathW(cmdname), "returned TRUE for \"cmd.exe\"\n"); -} - -/* Call various path/file name retrieving APIs and check the case of - * the returned drive letter. Some apps (for instance Adobe Photoshop CS3 - * installer) depend on the drive letter being in upper case. - */ -static void test_drive_letter_case(void) -{ - UINT ret; - char buf[MAX_PATH]; - -#define is_upper_case_letter(a) ((a) >= 'A' && (a) <= 'Z') - - memset(buf, 0, sizeof(buf)); - SetLastError(0xdeadbeef); - ret = GetWindowsDirectory(buf, sizeof(buf)); - ok(ret, "GetWindowsDirectory error %u\n", GetLastError()); - ok(ret < sizeof(buf), "buffer should be %u bytes\n", ret); - ok(buf[1] == ':', "expected buf[1] == ':' got %c\n", buf[1]); - ok(is_upper_case_letter(buf[0]), "expected buf[0] upper case letter got %c\n", buf[0]); - - /* re-use the buffer returned by GetFullPathName */ - buf[2] = '/'; - SetLastError(0xdeadbeef); - ret = GetFullPathName(buf + 2, sizeof(buf), buf, NULL); - ok(ret, "GetFullPathName error %u\n", GetLastError()); - ok(ret < sizeof(buf), "buffer should be %u bytes\n", ret); - ok(buf[1] == ':', "expected buf[1] == ':' got %c\n", buf[1]); - ok(is_upper_case_letter(buf[0]), "expected buf[0] upper case letter got %c\n", buf[0]); - - memset(buf, 0, sizeof(buf)); - SetLastError(0xdeadbeef); - ret = GetSystemDirectory(buf, sizeof(buf)); - ok(ret, "GetSystemDirectory error %u\n", GetLastError()); - ok(ret < sizeof(buf), "buffer should be %u bytes\n", ret); - ok(buf[1] == ':', "expected buf[1] == ':' got %c\n", buf[1]); - ok(is_upper_case_letter(buf[0]), "expected buf[0] upper case letter got %c\n", buf[0]); - - memset(buf, 0, sizeof(buf)); - SetLastError(0xdeadbeef); - ret = GetCurrentDirectory(sizeof(buf), buf); - ok(ret, "GetCurrentDirectory error %u\n", GetLastError()); - ok(ret < sizeof(buf), "buffer should be %u bytes\n", ret); - ok(buf[1] == ':', "expected buf[1] == ':' got %c\n", buf[1]); - ok(is_upper_case_letter(buf[0]), "expected buf[0] upper case letter got %c\n", buf[0]); - - /* TEMP is an environment variable, so it can't be tested for case-sensitivity */ - memset(buf, 0, sizeof(buf)); - SetLastError(0xdeadbeef); - ret = GetTempPath(sizeof(buf), buf); - ok(ret, "GetTempPath error %u\n", GetLastError()); - ok(ret < sizeof(buf), "buffer should be %u bytes\n", ret); - if (buf[0]) - { - ok(buf[1] == ':', "expected buf[1] == ':' got %c\n", buf[1]); - ok(buf[strlen(buf)-1] == '\\', "Temporary path (%s) doesn't end in a slash\n", buf); - } - - memset(buf, 0, sizeof(buf)); - SetLastError(0xdeadbeef); - ret = GetFullPathName(".", sizeof(buf), buf, NULL); - ok(ret, "GetFullPathName error %u\n", GetLastError()); - ok(ret < sizeof(buf), "buffer should be %u bytes\n", ret); - ok(buf[1] == ':', "expected buf[1] == ':' got %c\n", buf[1]); - ok(is_upper_case_letter(buf[0]), "expected buf[0] upper case letter got %c\n", buf[0]); - - /* re-use the buffer returned by GetFullPathName */ - SetLastError(0xdeadbeef); - ret = GetShortPathName(buf, buf, sizeof(buf)); - ok(ret, "GetShortPathName error %u\n", GetLastError()); - ok(ret < sizeof(buf), "buffer should be %u bytes\n", ret); - ok(buf[1] == ':', "expected buf[1] == ':' got %c\n", buf[1]); - ok(is_upper_case_letter(buf[0]), "expected buf[0] upper case letter got %c\n", buf[0]); - - if (pGetLongPathNameA) - { - /* re-use the buffer returned by GetShortPathName */ - SetLastError(0xdeadbeef); - ret = pGetLongPathNameA(buf, buf, sizeof(buf)); - ok(ret, "GetLongPathNameA error %u\n", GetLastError()); - ok(ret < sizeof(buf), "buffer should be %u bytes\n", ret); - ok(buf[1] == ':', "expected buf[1] == ':' got %c\n", buf[1]); - ok(is_upper_case_letter(buf[0]), "expected buf[0] upper case letter got %c\n", buf[0]); - } -#undef is_upper_case_letter -} - -static void test_SearchPathA(void) -{ - CHAR pathA[MAX_PATH], fileA[] = "", buffA[MAX_PATH]; - CHAR *ptrA = NULL; - DWORD ret; - - if (!pSearchPathA) - { - win_skip("SearchPathA isn't available\n"); - return; - } - - GetWindowsDirectoryA(pathA, sizeof(pathA)/sizeof(CHAR)); - - /* NULL filename */ - SetLastError(0xdeadbeef); - ret = pSearchPathA(pathA, NULL, NULL, sizeof(buffA)/sizeof(CHAR), buffA, &ptrA); - ok(ret == 0, "Expected failure, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); - - /* empty filename */ - SetLastError(0xdeadbeef); - ret = pSearchPathA(pathA, fileA, NULL, sizeof(buffA)/sizeof(CHAR), buffA, &ptrA); - ok(ret == 0, "Expected failure, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); -} - -static void test_SearchPathW(void) -{ - WCHAR pathW[MAX_PATH], fileW[] = { 0 }, buffW[MAX_PATH]; - WCHAR *ptrW = NULL; - DWORD ret; - - if (!pSearchPathW) - { - win_skip("SearchPathW isn't available\n"); - return; - } - -if (0) -{ - /* NULL filename, crashes on nt4 */ - pSearchPathW(pathW, NULL, NULL, sizeof(buffW)/sizeof(WCHAR), buffW, &ptrW); -} - - /* empty filename */ - SetLastError(0xdeadbeef); - ret = pSearchPathW(pathW, fileW, NULL, sizeof(buffW)/sizeof(WCHAR), buffW, &ptrW); - ok(ret == 0, "Expected failure, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %x\n", GetLastError()); -} - -static void test_GetFullPathNameA(void) -{ - char output[MAX_PATH], *filepart; - DWORD ret; - int i; - - const struct - { - LPCSTR name; - DWORD len; - LPSTR buffer; - LPSTR *lastpart; - } invalid_parameters[] = - { - {NULL, 0, NULL, NULL}, - {NULL, MAX_PATH, NULL, NULL}, - {NULL, MAX_PATH, output, NULL}, - {NULL, MAX_PATH, output, &filepart}, - {"", 0, NULL, NULL}, - {"", MAX_PATH, NULL, NULL}, - {"", MAX_PATH, output, NULL}, - {"", MAX_PATH, output, &filepart}, - }; - - for (i = 0; i < sizeof(invalid_parameters)/sizeof(invalid_parameters[0]); i++) - { - SetLastError(0xdeadbeef); - strcpy(output, "deadbeef"); - filepart = (char *)0xdeadbeef; - ret = GetFullPathNameA(invalid_parameters[i].name, - invalid_parameters[i].len, - invalid_parameters[i].buffer, - invalid_parameters[i].lastpart); - ok(!ret, "[%d] Expected GetFullPathNameA to return 0, got %u\n", i, ret); - ok(!strcmp(output, "deadbeef"), "[%d] Expected the output buffer to be unchanged, got \"%s\"\n", i, output); - ok(filepart == (char *)0xdeadbeef, "[%d] Expected output file part pointer to be untouched, got %p\n", i, filepart); - ok(GetLastError() == 0xdeadbeef || - GetLastError() == ERROR_INVALID_NAME, /* Win7 */ - "[%d] Expected GetLastError() to return 0xdeadbeef, got %u\n", - i, GetLastError()); - } -} - -static void test_GetFullPathNameW(void) -{ - static const WCHAR emptyW[] = {0}; - static const WCHAR deadbeefW[] = {'d','e','a','d','b','e','e','f',0}; - - WCHAR output[MAX_PATH], *filepart; - DWORD ret; - int i; - - const struct - { - LPCWSTR name; - DWORD len; - LPWSTR buffer; - LPWSTR *lastpart; - int win7_expect; - } invalid_parameters[] = - { - {NULL, 0, NULL, NULL}, - {NULL, 0, NULL, &filepart, 1}, - {NULL, MAX_PATH, NULL, NULL}, - {NULL, MAX_PATH, output, NULL}, - {NULL, MAX_PATH, output, &filepart, 1}, - {emptyW, 0, NULL, NULL}, - {emptyW, 0, NULL, &filepart, 1}, - {emptyW, MAX_PATH, NULL, NULL}, - {emptyW, MAX_PATH, output, NULL}, - {emptyW, MAX_PATH, output, &filepart, 1}, - }; - - SetLastError(0xdeadbeef); - ret = GetFullPathNameW(NULL, 0, NULL, NULL); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("GetFullPathNameW is not available\n"); - return; - } - - for (i = 0; i < sizeof(invalid_parameters)/sizeof(invalid_parameters[0]); i++) - { - SetLastError(0xdeadbeef); - lstrcpyW(output, deadbeefW); - filepart = (WCHAR *)0xdeadbeef; - ret = GetFullPathNameW(invalid_parameters[i].name, - invalid_parameters[i].len, - invalid_parameters[i].buffer, - invalid_parameters[i].lastpart); - ok(!ret, "[%d] Expected GetFullPathNameW to return 0, got %u\n", i, ret); - ok(!lstrcmpW(output, deadbeefW), "[%d] Expected the output buffer to be unchanged, got %s\n", i, wine_dbgstr_w(output)); - ok(filepart == (WCHAR *)0xdeadbeef || - (invalid_parameters[i].win7_expect && filepart == NULL), - "[%d] Expected output file part pointer to be untouched, got %p\n", i, filepart); - ok(GetLastError() == 0xdeadbeef || - GetLastError() == ERROR_INVALID_NAME, /* Win7 */ - "[%d] Expected GetLastError() to return 0xdeadbeef, got %u\n", - i, GetLastError()); - } -} - -static void init_pointers(void) -{ - HMODULE hKernel32 = GetModuleHandleA("kernel32.dll"); - -#define MAKEFUNC(f) (p##f = (void*)GetProcAddress(hKernel32, #f)) - MAKEFUNC(GetLongPathNameA); - MAKEFUNC(GetLongPathNameW); - MAKEFUNC(NeedCurrentDirectoryForExePathA); - MAKEFUNC(NeedCurrentDirectoryForExePathW); - MAKEFUNC(SearchPathA); - MAKEFUNC(SearchPathW); -#undef MAKEFUNC -} - -START_TEST(path) -{ - CHAR origdir[MAX_PATH],curdir[MAX_PATH], curDrive, otherDrive; - - init_pointers(); - - /* Report only once */ - if (!pGetLongPathNameA) - win_skip("GetLongPathNameA is not available\n"); - if (!pGetLongPathNameW) - win_skip("GetLongPathNameW is not available\n"); - - test_InitPathA(curdir, &curDrive, &otherDrive); - test_CurrentDirectoryA(origdir,curdir); - test_PathNameA(curdir, curDrive, otherDrive); - test_CleanupPathA(origdir,curdir); - test_GetTempPath(); - test_GetLongPathNameA(); - test_GetLongPathNameW(); - test_GetShortPathNameW(); - test_GetSystemDirectory(); - test_GetWindowsDirectory(); - test_NeedCurrentDirectoryForExePathA(); - test_NeedCurrentDirectoryForExePathW(); - test_drive_letter_case(); - test_SearchPathA(); - test_SearchPathW(); - test_GetFullPathNameA(); - test_GetFullPathNameW(); -} diff --git a/rostests/winetests/kernel32/pipe.c b/rostests/winetests/kernel32/pipe.c deleted file mode 100755 index ed787949289..00000000000 --- a/rostests/winetests/kernel32/pipe.c +++ /dev/null @@ -1,1628 +0,0 @@ -/* - * Unit tests for named pipe functions in Wine - * - * Copyright (c) 2002 Dan Kegel - * - * 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 -#include - -#include "wine/test.h" - -#define PIPENAME "\\\\.\\PiPe\\tests_pipe.c" - -#define NB_SERVER_LOOPS 8 - -static HANDLE alarm_event; -static BOOL (WINAPI *pDuplicateTokenEx)(HANDLE,DWORD,LPSECURITY_ATTRIBUTES, - SECURITY_IMPERSONATION_LEVEL,TOKEN_TYPE,PHANDLE); -static DWORD (WINAPI *pQueueUserAPC)(PAPCFUNC pfnAPC, HANDLE hThread, ULONG_PTR dwData); - -static BOOL user_apc_ran; -static void CALLBACK user_apc(ULONG_PTR param) -{ - user_apc_ran = TRUE; -} - -static void test_CreateNamedPipe(int pipemode) -{ - HANDLE hnp; - HANDLE hFile; - static const char obuf[] = "Bit Bucket"; - static const char obuf2[] = "More bits"; - char ibuf[32], *pbuf; - DWORD written; - DWORD readden; - DWORD avail; - DWORD lpmode; - BOOL ret; - - if (pipemode == PIPE_TYPE_BYTE) - trace("test_CreateNamedPipe starting in byte mode\n"); - else - trace("test_CreateNamedPipe starting in message mode\n"); - /* Bad parameter checks */ - hnp = CreateNamedPipe("not a named pipe", PIPE_ACCESS_DUPLEX, pipemode | PIPE_WAIT, - /* nMaxInstances */ 1, - /* nOutBufSize */ 1024, - /* nInBufSize */ 1024, - /* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT, - /* lpSecurityAttrib */ NULL); - ok(hnp == INVALID_HANDLE_VALUE && GetLastError() == ERROR_INVALID_NAME, - "CreateNamedPipe should fail if name doesn't start with \\\\.\\pipe\n"); - - hnp = CreateNamedPipe(NULL, - PIPE_ACCESS_DUPLEX, pipemode | PIPE_WAIT, - 1, 1024, 1024, NMPWAIT_USE_DEFAULT_WAIT, NULL); - ok(hnp == INVALID_HANDLE_VALUE && GetLastError() == ERROR_PATH_NOT_FOUND, - "CreateNamedPipe should fail if name is NULL\n"); - - hFile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); - ok(hFile == INVALID_HANDLE_VALUE - && GetLastError() == ERROR_FILE_NOT_FOUND, - "connecting to nonexistent named pipe should fail with ERROR_FILE_NOT_FOUND\n"); - - /* Functional checks */ - - hnp = CreateNamedPipe(PIPENAME, PIPE_ACCESS_DUPLEX, pipemode | PIPE_WAIT, - /* nMaxInstances */ 1, - /* nOutBufSize */ 1024, - /* nInBufSize */ 1024, - /* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT, - /* lpSecurityAttrib */ NULL); - ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed\n"); - - ret = WaitNamedPipeA(PIPENAME, 2000); - ok(ret, "WaitNamedPipe failed (%d)\n", GetLastError()); - - hFile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); - ok(hFile != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError()); - - ok(!WaitNamedPipeA(PIPENAME, 1000), "WaitNamedPipe succeeded\n"); - - ok(GetLastError() == ERROR_SEM_TIMEOUT, "wrong error %u\n", GetLastError()); - - /* don't try to do i/o if one side couldn't be opened, as it hangs */ - if (hFile != INVALID_HANDLE_VALUE) { - HANDLE hFile2; - - /* Make sure we can read and write a few bytes in both directions */ - memset(ibuf, 0, sizeof(ibuf)); - ok(WriteFile(hnp, obuf, sizeof(obuf), &written, NULL), "WriteFile\n"); - ok(written == sizeof(obuf), "write file len 1\n"); - ok(PeekNamedPipe(hFile, NULL, 0, NULL, &readden, NULL), "Peek\n"); - ok(readden == sizeof(obuf), "peek 1 got %d bytes\n", readden); - ok(ReadFile(hFile, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile\n"); - ok(readden == sizeof(obuf), "read 1 got %d bytes\n", readden); - ok(memcmp(obuf, ibuf, written) == 0, "content 1 check\n"); - - memset(ibuf, 0, sizeof(ibuf)); - ok(WriteFile(hFile, obuf2, sizeof(obuf2), &written, NULL), "WriteFile\n"); - ok(written == sizeof(obuf2), "write file len 2\n"); - ok(PeekNamedPipe(hnp, NULL, 0, NULL, &readden, NULL), "Peek\n"); - ok(readden == sizeof(obuf2), "peek 2 got %d bytes\n", readden); - ok(PeekNamedPipe(hnp, (LPVOID)1, 0, NULL, &readden, NULL), "Peek\n"); - ok(readden == sizeof(obuf2), "peek 2 got %d bytes\n", readden); - ok(ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile\n"); - ok(readden == sizeof(obuf2), "read 2 got %d bytes\n", readden); - ok(memcmp(obuf2, ibuf, written) == 0, "content 2 check\n"); - - /* Test reading of multiple writes */ - memset(ibuf, 0, sizeof(ibuf)); - ok(WriteFile(hnp, obuf, sizeof(obuf), &written, NULL), "WriteFile3a\n"); - ok(written == sizeof(obuf), "write file len 3a\n"); - ok(WriteFile(hnp, obuf2, sizeof(obuf2), &written, NULL), " WriteFile3b\n"); - ok(written == sizeof(obuf2), "write file len 3b\n"); - ok(PeekNamedPipe(hFile, ibuf, sizeof(ibuf), &readden, &avail, NULL), "Peek3\n"); - if (pipemode == PIPE_TYPE_BYTE) { - if (readden != sizeof(obuf)) /* Linux only returns the first message */ - ok(readden == sizeof(obuf) + sizeof(obuf2), "peek3 got %d bytes\n", readden); - else - todo_wine ok(readden == sizeof(obuf) + sizeof(obuf2), "peek3 got %d bytes\n", readden); - } - else - { - if (readden != sizeof(obuf) + sizeof(obuf2)) /* MacOS returns both messages */ - ok(readden == sizeof(obuf), "peek3 got %d bytes\n", readden); - else - todo_wine ok(readden == sizeof(obuf), "peek3 got %d bytes\n", readden); - } - if (avail != sizeof(obuf)) /* older Linux kernels only return the first write here */ - ok(avail == sizeof(obuf) + sizeof(obuf2), "peek3 got %d bytes available\n", avail); - pbuf = ibuf; - ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "pipe content 3a check\n"); - if (pipemode == PIPE_TYPE_BYTE && readden >= sizeof(obuf)+sizeof(obuf2)) { - pbuf += sizeof(obuf); - ok(memcmp(obuf2, pbuf, sizeof(obuf2)) == 0, "pipe content 3b check\n"); - } - ok(ReadFile(hFile, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile\n"); - ok(readden == sizeof(obuf) + sizeof(obuf2), "read 3 got %d bytes\n", readden); - pbuf = ibuf; - ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 3a check\n"); - pbuf += sizeof(obuf); - ok(memcmp(obuf2, pbuf, sizeof(obuf2)) == 0, "content 3b check\n"); - - /* Multiple writes in the reverse direction */ - memset(ibuf, 0, sizeof(ibuf)); - ok(WriteFile(hFile, obuf, sizeof(obuf), &written, NULL), "WriteFile4a\n"); - ok(written == sizeof(obuf), "write file len 4a\n"); - ok(WriteFile(hFile, obuf2, sizeof(obuf2), &written, NULL), " WriteFile4b\n"); - ok(written == sizeof(obuf2), "write file len 4b\n"); - ok(PeekNamedPipe(hnp, ibuf, sizeof(ibuf), &readden, &avail, NULL), "Peek4\n"); - if (pipemode == PIPE_TYPE_BYTE) { - if (readden != sizeof(obuf)) /* Linux only returns the first message */ - /* should return all 23 bytes */ - ok(readden == sizeof(obuf) + sizeof(obuf2), "peek4 got %d bytes\n", readden); - else - todo_wine ok(readden == sizeof(obuf) + sizeof(obuf2), "peek4 got %d bytes\n", readden); - } - else - { - if (readden != sizeof(obuf) + sizeof(obuf2)) /* MacOS returns both messages */ - ok(readden == sizeof(obuf), "peek4 got %d bytes\n", readden); - else - todo_wine ok(readden == sizeof(obuf), "peek4 got %d bytes\n", readden); - } - if (avail != sizeof(obuf)) /* older Linux kernels only return the first write here */ - ok(avail == sizeof(obuf) + sizeof(obuf2), "peek4 got %d bytes available\n", avail); - pbuf = ibuf; - ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "pipe content 4a check\n"); - if (pipemode == PIPE_TYPE_BYTE && readden >= sizeof(obuf)+sizeof(obuf2)) { - pbuf += sizeof(obuf); - ok(memcmp(obuf2, pbuf, sizeof(obuf2)) == 0, "pipe content 4b check\n"); - } - ok(ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile\n"); - if (pipemode == PIPE_TYPE_BYTE) { - ok(readden == sizeof(obuf) + sizeof(obuf2), "read 4 got %d bytes\n", readden); - } - else { - todo_wine { - ok(readden == sizeof(obuf), "read 4 got %d bytes\n", readden); - } - } - pbuf = ibuf; - ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 4a check\n"); - if (pipemode == PIPE_TYPE_BYTE) { - pbuf += sizeof(obuf); - ok(memcmp(obuf2, pbuf, sizeof(obuf2)) == 0, "content 4b check\n"); - } - - /* Test reading of multiple writes after a mode change - (CreateFile always creates a byte mode pipe) */ - lpmode = PIPE_READMODE_MESSAGE; - if (pipemode == PIPE_TYPE_BYTE) { - /* trying to change the client end of a byte pipe to message mode should fail */ - ok(!SetNamedPipeHandleState(hFile, &lpmode, NULL, NULL), "Change mode\n"); - } - else { - todo_wine { - ok(SetNamedPipeHandleState(hFile, &lpmode, NULL, NULL), "Change mode\n"); - } - - memset(ibuf, 0, sizeof(ibuf)); - ok(WriteFile(hnp, obuf, sizeof(obuf), &written, NULL), "WriteFile5a\n"); - ok(written == sizeof(obuf), "write file len 3a\n"); - ok(WriteFile(hnp, obuf2, sizeof(obuf2), &written, NULL), " WriteFile5b\n"); - ok(written == sizeof(obuf2), "write file len 3b\n"); - ok(PeekNamedPipe(hFile, ibuf, sizeof(ibuf), &readden, &avail, NULL), "Peek5\n"); - if (readden != sizeof(obuf) + sizeof(obuf2)) /* MacOS returns both writes */ - ok(readden == sizeof(obuf), "peek5 got %d bytes\n", readden); - else - todo_wine ok(readden == sizeof(obuf), "peek5 got %d bytes\n", readden); - if (avail != sizeof(obuf)) /* older Linux kernels only return the first write here */ - ok(avail == sizeof(obuf) + sizeof(obuf2), "peek5 got %d bytes available\n", avail); - else - todo_wine ok(avail == sizeof(obuf) + sizeof(obuf2), "peek5 got %d bytes available\n", avail); - pbuf = ibuf; - ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 5a check\n"); - ok(ReadFile(hFile, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile\n"); - todo_wine { - ok(readden == sizeof(obuf), "read 5 got %d bytes\n", readden); - } - pbuf = ibuf; - ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 5a check\n"); - - /* Multiple writes in the reverse direction */ - /* the write of obuf2 from write4 should still be in the buffer */ - ok(PeekNamedPipe(hnp, ibuf, sizeof(ibuf), &readden, &avail, NULL), "Peek6a\n"); - todo_wine { - ok(readden == sizeof(obuf2), "peek6a got %d bytes\n", readden); - ok(avail == sizeof(obuf2), "peek6a got %d bytes available\n", avail); - } - if (avail > 0) { - ok(ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile\n"); - ok(readden == sizeof(obuf2), "read 6a got %d bytes\n", readden); - pbuf = ibuf; - ok(memcmp(obuf2, pbuf, sizeof(obuf2)) == 0, "content 6a check\n"); - } - memset(ibuf, 0, sizeof(ibuf)); - ok(WriteFile(hFile, obuf, sizeof(obuf), &written, NULL), "WriteFile6a\n"); - ok(written == sizeof(obuf), "write file len 6a\n"); - ok(WriteFile(hFile, obuf2, sizeof(obuf2), &written, NULL), " WriteFile6b\n"); - ok(written == sizeof(obuf2), "write file len 6b\n"); - ok(PeekNamedPipe(hnp, ibuf, sizeof(ibuf), &readden, &avail, NULL), "Peek6\n"); - if (readden != sizeof(obuf) + sizeof(obuf2)) /* MacOS returns both writes */ - ok(readden == sizeof(obuf), "peek6 got %d bytes\n", readden); - else - todo_wine ok(readden == sizeof(obuf), "peek6 got %d bytes\n", readden); - if (avail != sizeof(obuf)) /* older Linux kernels only return the first write here */ - ok(avail == sizeof(obuf) + sizeof(obuf2), "peek6b got %d bytes available\n", avail); - pbuf = ibuf; - ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 6a check\n"); - ok(ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL), "ReadFile\n"); - todo_wine { - ok(readden == sizeof(obuf), "read 6b got %d bytes\n", readden); - } - pbuf = ibuf; - ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 6a check\n"); - } - - /* Picky conformance tests */ - - /* Verify that you can't connect to pipe again - * until server calls DisconnectNamedPipe+ConnectNamedPipe - * or creates a new pipe - * case 1: other client not yet closed - */ - hFile2 = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); - ok(hFile2 == INVALID_HANDLE_VALUE, - "connecting to named pipe after other client closes but before DisconnectNamedPipe should fail\n"); - ok(GetLastError() == ERROR_PIPE_BUSY, - "connecting to named pipe before other client closes should fail with ERROR_PIPE_BUSY\n"); - - ok(CloseHandle(hFile), "CloseHandle\n"); - - /* case 2: other client already closed */ - hFile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); - ok(hFile == INVALID_HANDLE_VALUE, - "connecting to named pipe after other client closes but before DisconnectNamedPipe should fail\n"); - ok(GetLastError() == ERROR_PIPE_BUSY, - "connecting to named pipe after other client closes but before DisconnectNamedPipe should fail with ERROR_PIPE_BUSY\n"); - - ok(DisconnectNamedPipe(hnp), "DisconnectNamedPipe\n"); - - /* case 3: server has called DisconnectNamedPipe but not ConnectNamed Pipe */ - hFile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); - ok(hFile == INVALID_HANDLE_VALUE, - "connecting to named pipe after other client closes but before DisconnectNamedPipe should fail\n"); - ok(GetLastError() == ERROR_PIPE_BUSY, - "connecting to named pipe after other client closes but before ConnectNamedPipe should fail with ERROR_PIPE_BUSY\n"); - - /* to be complete, we'd call ConnectNamedPipe here and loop, - * but by default that's blocking, so we'd either have - * to turn on the uncommon nonblocking mode, or - * use another thread. - */ - } - - ok(CloseHandle(hnp), "CloseHandle\n"); - - trace("test_CreateNamedPipe returning\n"); -} - -static void test_CreateNamedPipe_instances_must_match(void) -{ - HANDLE hnp, hnp2; - - /* Check no mismatch */ - hnp = CreateNamedPipe(PIPENAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_WAIT, - /* nMaxInstances */ 2, - /* nOutBufSize */ 1024, - /* nInBufSize */ 1024, - /* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT, - /* lpSecurityAttrib */ NULL); - ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed\n"); - - hnp2 = CreateNamedPipe(PIPENAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_WAIT, - /* nMaxInstances */ 2, - /* nOutBufSize */ 1024, - /* nInBufSize */ 1024, - /* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT, - /* lpSecurityAttrib */ NULL); - ok(hnp2 != INVALID_HANDLE_VALUE, "CreateNamedPipe failed\n"); - - ok(CloseHandle(hnp), "CloseHandle\n"); - ok(CloseHandle(hnp2), "CloseHandle\n"); - - /* Check nMaxInstances */ - hnp = CreateNamedPipe(PIPENAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_WAIT, - /* nMaxInstances */ 1, - /* nOutBufSize */ 1024, - /* nInBufSize */ 1024, - /* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT, - /* lpSecurityAttrib */ NULL); - ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed\n"); - - hnp2 = CreateNamedPipe(PIPENAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_WAIT, - /* nMaxInstances */ 1, - /* nOutBufSize */ 1024, - /* nInBufSize */ 1024, - /* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT, - /* lpSecurityAttrib */ NULL); - ok(hnp2 == INVALID_HANDLE_VALUE - && GetLastError() == ERROR_PIPE_BUSY, "nMaxInstances not obeyed\n"); - - ok(CloseHandle(hnp), "CloseHandle\n"); - - /* Check PIPE_ACCESS_* */ - hnp = CreateNamedPipe(PIPENAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_WAIT, - /* nMaxInstances */ 2, - /* nOutBufSize */ 1024, - /* nInBufSize */ 1024, - /* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT, - /* lpSecurityAttrib */ NULL); - ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed\n"); - - hnp2 = CreateNamedPipe(PIPENAME, PIPE_ACCESS_INBOUND, PIPE_TYPE_BYTE | PIPE_WAIT, - /* nMaxInstances */ 1, - /* nOutBufSize */ 1024, - /* nInBufSize */ 1024, - /* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT, - /* lpSecurityAttrib */ NULL); - ok(hnp2 == INVALID_HANDLE_VALUE - && GetLastError() == ERROR_ACCESS_DENIED, "PIPE_ACCESS_* mismatch allowed\n"); - - ok(CloseHandle(hnp), "CloseHandle\n"); - - /* etc, etc */ -} - -/** implementation of alarm() */ -static DWORD CALLBACK alarmThreadMain(LPVOID arg) -{ - DWORD_PTR timeout = (DWORD_PTR) arg; - trace("alarmThreadMain\n"); - if (WaitForSingleObject( alarm_event, timeout ) == WAIT_TIMEOUT) - { - ok(FALSE, "alarm\n"); - ExitProcess(1); - } - return 1; -} - -static HANDLE hnp = INVALID_HANDLE_VALUE; - -/** Trivial byte echo server - disconnects after each session */ -static DWORD CALLBACK serverThreadMain1(LPVOID arg) -{ - int i; - - trace("serverThreadMain1 start\n"); - /* Set up a simple echo server */ - hnp = CreateNamedPipe(PIPENAME "serverThreadMain1", PIPE_ACCESS_DUPLEX, - PIPE_TYPE_BYTE | PIPE_WAIT, - /* nMaxInstances */ 1, - /* nOutBufSize */ 1024, - /* nInBufSize */ 1024, - /* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT, - /* lpSecurityAttrib */ NULL); - - ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed\n"); - for (i = 0; i < NB_SERVER_LOOPS; i++) { - char buf[512]; - DWORD written; - DWORD readden; - DWORD success; - - /* Wait for client to connect */ - trace("Server calling ConnectNamedPipe...\n"); - ok(ConnectNamedPipe(hnp, NULL) - || GetLastError() == ERROR_PIPE_CONNECTED, "ConnectNamedPipe\n"); - trace("ConnectNamedPipe returned.\n"); - - /* Echo bytes once */ - memset(buf, 0, sizeof(buf)); - - trace("Server reading...\n"); - success = ReadFile(hnp, buf, sizeof(buf), &readden, NULL); - trace("Server done reading.\n"); - ok(success, "ReadFile\n"); - ok(readden, "short read\n"); - - trace("Server writing...\n"); - ok(WriteFile(hnp, buf, readden, &written, NULL), "WriteFile\n"); - trace("Server done writing.\n"); - ok(written == readden, "write file len\n"); - - /* finish this connection, wait for next one */ - ok(FlushFileBuffers(hnp), "FlushFileBuffers\n"); - trace("Server done flushing.\n"); - ok(DisconnectNamedPipe(hnp), "DisconnectNamedPipe\n"); - trace("Server done disconnecting.\n"); - } - return 0; -} - -/** Trivial byte echo server - closes after each connection */ -static DWORD CALLBACK serverThreadMain2(LPVOID arg) -{ - int i; - HANDLE hnpNext = 0; - - trace("serverThreadMain2\n"); - /* Set up a simple echo server */ - hnp = CreateNamedPipe(PIPENAME "serverThreadMain2", PIPE_ACCESS_DUPLEX, - PIPE_TYPE_BYTE | PIPE_WAIT, - /* nMaxInstances */ 2, - /* nOutBufSize */ 1024, - /* nInBufSize */ 1024, - /* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT, - /* lpSecurityAttrib */ NULL); - ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed\n"); - - for (i = 0; i < NB_SERVER_LOOPS; i++) { - char buf[512]; - DWORD written; - DWORD readden; - DWORD success; - - user_apc_ran = FALSE; - if (i == 0 && pQueueUserAPC) { - trace("Queueing an user APC\n"); /* verify the pipe is non alerable */ - ok(pQueueUserAPC(&user_apc, GetCurrentThread(), 0), "QueueUserAPC failed: %d\n", GetLastError()); - } - - /* Wait for client to connect */ - trace("Server calling ConnectNamedPipe...\n"); - ok(ConnectNamedPipe(hnp, NULL) - || GetLastError() == ERROR_PIPE_CONNECTED, "ConnectNamedPipe\n"); - trace("ConnectNamedPipe returned.\n"); - - /* Echo bytes once */ - memset(buf, 0, sizeof(buf)); - - trace("Server reading...\n"); - success = ReadFile(hnp, buf, sizeof(buf), &readden, NULL); - trace("Server done reading.\n"); - ok(success, "ReadFile\n"); - - trace("Server writing...\n"); - ok(WriteFile(hnp, buf, readden, &written, NULL), "WriteFile\n"); - trace("Server done writing.\n"); - ok(written == readden, "write file len\n"); - - /* finish this connection, wait for next one */ - ok(FlushFileBuffers(hnp), "FlushFileBuffers\n"); - ok(DisconnectNamedPipe(hnp), "DisconnectNamedPipe\n"); - - ok(user_apc_ran == FALSE, "UserAPC ran, pipe using alertable io mode\n"); - - if (i == 0 && pQueueUserAPC) - SleepEx(0, TRUE); /* get rid of apc */ - - /* Set up next echo server */ - hnpNext = - CreateNamedPipe(PIPENAME "serverThreadMain2", PIPE_ACCESS_DUPLEX, - PIPE_TYPE_BYTE | PIPE_WAIT, - /* nMaxInstances */ 2, - /* nOutBufSize */ 1024, - /* nInBufSize */ 1024, - /* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT, - /* lpSecurityAttrib */ NULL); - - ok(hnpNext != INVALID_HANDLE_VALUE, "CreateNamedPipe failed\n"); - - ok(CloseHandle(hnp), "CloseHandle\n"); - hnp = hnpNext; - } - return 0; -} - -/** Trivial byte echo server - uses overlapped named pipe calls */ -static DWORD CALLBACK serverThreadMain3(LPVOID arg) -{ - int i; - HANDLE hEvent; - - trace("serverThreadMain3\n"); - /* Set up a simple echo server */ - hnp = CreateNamedPipe(PIPENAME "serverThreadMain3", PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, - PIPE_TYPE_BYTE | PIPE_WAIT, - /* nMaxInstances */ 1, - /* nOutBufSize */ 1024, - /* nInBufSize */ 1024, - /* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT, - /* lpSecurityAttrib */ NULL); - ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed\n"); - - hEvent = CreateEvent(NULL, /* security attribute */ - TRUE, /* manual reset event */ - FALSE, /* initial state */ - NULL); /* name */ - ok(hEvent != NULL, "CreateEvent\n"); - - for (i = 0; i < NB_SERVER_LOOPS; i++) { - char buf[512]; - DWORD written; - DWORD readden; - DWORD dummy; - DWORD success; - OVERLAPPED oOverlap; - int letWFSOEwait = (i & 2); - int letGORwait = (i & 1); - DWORD err; - - memset(&oOverlap, 0, sizeof(oOverlap)); - oOverlap.hEvent = hEvent; - - /* Wait for client to connect */ - if (i == 0) { - trace("Server calling non-overlapped ConnectNamedPipe on overlapped pipe...\n"); - success = ConnectNamedPipe(hnp, NULL); - err = GetLastError(); - ok(success || (err == ERROR_PIPE_CONNECTED), "ConnectNamedPipe failed: %d\n", err); - trace("ConnectNamedPipe operation complete.\n"); - } else { - trace("Server calling overlapped ConnectNamedPipe...\n"); - success = ConnectNamedPipe(hnp, &oOverlap); - err = GetLastError(); - ok(!success && (err == ERROR_IO_PENDING || err == ERROR_PIPE_CONNECTED), "overlapped ConnectNamedPipe\n"); - trace("overlapped ConnectNamedPipe returned.\n"); - if (!success && (err == ERROR_IO_PENDING)) { - if (letWFSOEwait) - { - DWORD ret; - do { - ret = WaitForSingleObjectEx(hEvent, INFINITE, TRUE); - } while (ret == WAIT_IO_COMPLETION); - ok(ret == 0, "wait ConnectNamedPipe returned %x\n", ret); - } - success = GetOverlappedResult(hnp, &oOverlap, &dummy, letGORwait); - if (!letGORwait && !letWFSOEwait && !success) { - ok(GetLastError() == ERROR_IO_INCOMPLETE, "GetOverlappedResult\n"); - success = GetOverlappedResult(hnp, &oOverlap, &dummy, TRUE); - } - } - ok(success || (err == ERROR_PIPE_CONNECTED), "GetOverlappedResult ConnectNamedPipe\n"); - trace("overlapped ConnectNamedPipe operation complete.\n"); - } - - /* Echo bytes once */ - memset(buf, 0, sizeof(buf)); - - trace("Server reading...\n"); - success = ReadFile(hnp, buf, sizeof(buf), &readden, &oOverlap); - trace("Server ReadFile returned...\n"); - err = GetLastError(); - ok(success || err == ERROR_IO_PENDING, "overlapped ReadFile\n"); - trace("overlapped ReadFile returned.\n"); - if (!success && (err == ERROR_IO_PENDING)) { - if (letWFSOEwait) - { - DWORD ret; - do { - ret = WaitForSingleObjectEx(hEvent, INFINITE, TRUE); - } while (ret == WAIT_IO_COMPLETION); - ok(ret == 0, "wait ReadFile returned %x\n", ret); - } - success = GetOverlappedResult(hnp, &oOverlap, &readden, letGORwait); - if (!letGORwait && !letWFSOEwait && !success) { - ok(GetLastError() == ERROR_IO_INCOMPLETE, "GetOverlappedResult\n"); - success = GetOverlappedResult(hnp, &oOverlap, &readden, TRUE); - } - } - trace("Server done reading.\n"); - ok(success, "overlapped ReadFile\n"); - - trace("Server writing...\n"); - success = WriteFile(hnp, buf, readden, &written, &oOverlap); - trace("Server WriteFile returned...\n"); - err = GetLastError(); - ok(success || err == ERROR_IO_PENDING, "overlapped WriteFile\n"); - trace("overlapped WriteFile returned.\n"); - if (!success && (err == ERROR_IO_PENDING)) { - if (letWFSOEwait) - { - DWORD ret; - do { - ret = WaitForSingleObjectEx(hEvent, INFINITE, TRUE); - } while (ret == WAIT_IO_COMPLETION); - ok(ret == 0, "wait WriteFile returned %x\n", ret); - } - success = GetOverlappedResult(hnp, &oOverlap, &written, letGORwait); - if (!letGORwait && !letWFSOEwait && !success) { - ok(GetLastError() == ERROR_IO_INCOMPLETE, "GetOverlappedResult\n"); - success = GetOverlappedResult(hnp, &oOverlap, &written, TRUE); - } - } - trace("Server done writing.\n"); - ok(success, "overlapped WriteFile\n"); - ok(written == readden, "write file len\n"); - - /* finish this connection, wait for next one */ - ok(FlushFileBuffers(hnp), "FlushFileBuffers\n"); - ok(DisconnectNamedPipe(hnp), "DisconnectNamedPipe\n"); - } - return 0; -} - -/** Trivial byte echo server - uses i/o completion ports */ -static DWORD CALLBACK serverThreadMain4(LPVOID arg) -{ - int i; - HANDLE hcompletion; - BOOL ret; - - trace("serverThreadMain4\n"); - /* Set up a simple echo server */ - hnp = CreateNamedPipe(PIPENAME "serverThreadMain4", PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, - PIPE_TYPE_BYTE | PIPE_WAIT, - /* nMaxInstances */ 1, - /* nOutBufSize */ 1024, - /* nInBufSize */ 1024, - /* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT, - /* lpSecurityAttrib */ NULL); - ok(hnp != INVALID_HANDLE_VALUE, "CreateNamedPipe failed\n"); - - hcompletion = CreateIoCompletionPort(hnp, NULL, 12345, 1); - ok(hcompletion != NULL, "CreateIoCompletionPort failed, error=%i\n", GetLastError()); - - for (i = 0; i < NB_SERVER_LOOPS; i++) { - char buf[512]; - DWORD written; - DWORD readden; - DWORD dummy; - DWORD success; - OVERLAPPED oConnect; - OVERLAPPED oRead; - OVERLAPPED oWrite; - OVERLAPPED *oResult; - DWORD err; - ULONG_PTR compkey; - - memset(&oConnect, 0, sizeof(oConnect)); - memset(&oRead, 0, sizeof(oRead)); - memset(&oWrite, 0, sizeof(oWrite)); - - /* Wait for client to connect */ - trace("Server calling overlapped ConnectNamedPipe...\n"); - success = ConnectNamedPipe(hnp, &oConnect); - err = GetLastError(); - ok(!success && (err == ERROR_IO_PENDING || err == ERROR_PIPE_CONNECTED), - "overlapped ConnectNamedPipe got %u err %u\n", success, err ); - if (!success && err == ERROR_IO_PENDING) { - trace("ConnectNamedPipe GetQueuedCompletionStatus\n"); - success = GetQueuedCompletionStatus(hcompletion, &dummy, &compkey, &oResult, 0); - if (!success) - { - ok( GetLastError() == WAIT_TIMEOUT, - "ConnectNamedPipe GetQueuedCompletionStatus wrong error %u\n", GetLastError()); - success = GetQueuedCompletionStatus(hcompletion, &dummy, &compkey, &oResult, 10000); - } - ok(success, "ConnectNamedPipe GetQueuedCompletionStatus failed, errno=%i\n", GetLastError()); - if (success) - { - ok(compkey == 12345, "got completion key %i instead of 12345\n", (int)compkey); - ok(oResult == &oConnect, "got overlapped pointer %p instead of %p\n", oResult, &oConnect); - } - } - trace("overlapped ConnectNamedPipe operation complete.\n"); - - /* Echo bytes once */ - memset(buf, 0, sizeof(buf)); - - trace("Server reading...\n"); - success = ReadFile(hnp, buf, sizeof(buf), &readden, &oRead); - trace("Server ReadFile returned...\n"); - err = GetLastError(); - ok(success || err == ERROR_IO_PENDING, "overlapped ReadFile, err=%i\n", err); - success = GetQueuedCompletionStatus(hcompletion, &readden, &compkey, - &oResult, 10000); - ok(success, "ReadFile GetQueuedCompletionStatus failed, errno=%i\n", GetLastError()); - if (success) - { - ok(compkey == 12345, "got completion key %i instead of 12345\n", (int)compkey); - ok(oResult == &oRead, "got overlapped pointer %p instead of %p\n", oResult, &oRead); - } - trace("Server done reading.\n"); - - trace("Server writing...\n"); - success = WriteFile(hnp, buf, readden, &written, &oWrite); - trace("Server WriteFile returned...\n"); - err = GetLastError(); - ok(success || err == ERROR_IO_PENDING, "overlapped WriteFile failed, err=%u\n", err); - success = GetQueuedCompletionStatus(hcompletion, &written, &compkey, - &oResult, 10000); - ok(success, "WriteFile GetQueuedCompletionStatus failed, errno=%i\n", GetLastError()); - if (success) - { - ok(compkey == 12345, "got completion key %i instead of 12345\n", (int)compkey); - ok(oResult == &oWrite, "got overlapped pointer %p instead of %p\n", oResult, &oWrite); - ok(written == readden, "write file len\n"); - } - trace("Server done writing.\n"); - - /* finish this connection, wait for next one */ - ok(FlushFileBuffers(hnp), "FlushFileBuffers\n"); - success = DisconnectNamedPipe(hnp); - ok(success, "DisconnectNamedPipe failed, err %u\n", GetLastError()); - } - - ret = CloseHandle(hnp); - ok(ret, "CloseHandle named pipe failed, err=%i\n", GetLastError()); - ret = CloseHandle(hcompletion); - ok(ret, "CloseHandle completion failed, err=%i\n", GetLastError()); - - return 0; -} - -static void exercizeServer(const char *pipename, HANDLE serverThread) -{ - int i; - - trace("exercizeServer starting\n"); - for (i = 0; i < NB_SERVER_LOOPS; i++) { - HANDLE hFile=INVALID_HANDLE_VALUE; - static const char obuf[] = "Bit Bucket"; - char ibuf[32]; - DWORD written; - DWORD readden; - int loop; - - for (loop = 0; loop < 3; loop++) { - DWORD err; - trace("Client connecting...\n"); - /* Connect to the server */ - hFile = CreateFileA(pipename, GENERIC_READ | GENERIC_WRITE, 0, - NULL, OPEN_EXISTING, 0, 0); - if (hFile != INVALID_HANDLE_VALUE) - break; - err = GetLastError(); - if (loop == 0) - ok(err == ERROR_PIPE_BUSY || err == ERROR_FILE_NOT_FOUND, "connecting to pipe\n"); - else - ok(err == ERROR_PIPE_BUSY, "connecting to pipe\n"); - trace("connect failed, retrying\n"); - Sleep(200); - } - ok(hFile != INVALID_HANDLE_VALUE, "client opening named pipe\n"); - - /* Make sure it can echo */ - memset(ibuf, 0, sizeof(ibuf)); - trace("Client writing...\n"); - ok(WriteFile(hFile, obuf, sizeof(obuf), &written, NULL), "WriteFile to client end of pipe\n"); - ok(written == sizeof(obuf), "write file len\n"); - trace("Client reading...\n"); - ok(ReadFile(hFile, ibuf, sizeof(obuf), &readden, NULL), "ReadFile from client end of pipe\n"); - ok(readden == sizeof(obuf), "read file len\n"); - ok(memcmp(obuf, ibuf, written) == 0, "content check\n"); - - trace("Client closing...\n"); - ok(CloseHandle(hFile), "CloseHandle\n"); - } - - ok(WaitForSingleObject(serverThread,INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject\n"); - CloseHandle(hnp); - trace("exercizeServer returning\n"); -} - -static void test_NamedPipe_2(void) -{ - HANDLE serverThread; - DWORD serverThreadId; - HANDLE alarmThread; - DWORD alarmThreadId; - - trace("test_NamedPipe_2 starting\n"); - /* Set up a twenty second timeout */ - alarm_event = CreateEvent( NULL, TRUE, FALSE, NULL ); - SetLastError(0xdeadbeef); - alarmThread = CreateThread(NULL, 0, alarmThreadMain, (void *) 20000, 0, &alarmThreadId); - ok(alarmThread != NULL, "CreateThread failed: %d\n", GetLastError()); - - /* The servers we're about to exercise do try to clean up carefully, - * but to reduce the chance of a test failure due to a pipe handle - * leak in the test code, we'll use a different pipe name for each server. - */ - - /* Try server #1 */ - SetLastError(0xdeadbeef); - serverThread = CreateThread(NULL, 0, serverThreadMain1, (void *)8, 0, &serverThreadId); - ok(serverThread != NULL, "CreateThread failed: %d\n", GetLastError()); - exercizeServer(PIPENAME "serverThreadMain1", serverThread); - - /* Try server #2 */ - SetLastError(0xdeadbeef); - serverThread = CreateThread(NULL, 0, serverThreadMain2, 0, 0, &serverThreadId); - ok(serverThread != NULL, "CreateThread failed: %d\n", GetLastError()); - exercizeServer(PIPENAME "serverThreadMain2", serverThread); - - /* Try server #3 */ - SetLastError(0xdeadbeef); - serverThread = CreateThread(NULL, 0, serverThreadMain3, 0, 0, &serverThreadId); - ok(serverThread != NULL, "CreateThread failed: %d\n", GetLastError()); - exercizeServer(PIPENAME "serverThreadMain3", serverThread); - - /* Try server #4 */ - SetLastError(0xdeadbeef); - serverThread = CreateThread(NULL, 0, serverThreadMain4, 0, 0, &serverThreadId); - ok(serverThread != NULL, "CreateThread failed: %d\n", GetLastError()); - exercizeServer(PIPENAME "serverThreadMain4", serverThread); - - ok(SetEvent( alarm_event ), "SetEvent\n"); - CloseHandle( alarm_event ); - trace("test_NamedPipe_2 returning\n"); -} - -static int test_DisconnectNamedPipe(void) -{ - HANDLE hnp; - HANDLE hFile; - static const char obuf[] = "Bit Bucket"; - char ibuf[32]; - DWORD written; - DWORD readden; - DWORD ret; - - SetLastError(0xdeadbeef); - hnp = CreateNamedPipe(PIPENAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_WAIT, - /* nMaxInstances */ 1, - /* nOutBufSize */ 1024, - /* nInBufSize */ 1024, - /* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT, - /* lpSecurityAttrib */ NULL); - if ((hnp == INVALID_HANDLE_VALUE /* Win98 */ || !hnp /* Win95 */) - && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) { - - win_skip("Named pipes are not implemented\n"); - return 1; - } - - ok(WriteFile(hnp, obuf, sizeof(obuf), &written, NULL) == 0 - && GetLastError() == ERROR_PIPE_LISTENING, "WriteFile to not-yet-connected pipe\n"); - ok(ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL) == 0 - && GetLastError() == ERROR_PIPE_LISTENING, "ReadFile from not-yet-connected pipe\n"); - - hFile = CreateFileA(PIPENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); - ok(hFile != INVALID_HANDLE_VALUE, "CreateFile failed\n"); - - /* don't try to do i/o if one side couldn't be opened, as it hangs */ - if (hFile != INVALID_HANDLE_VALUE) { - - /* see what happens if server calls DisconnectNamedPipe - * when there are bytes in the pipe - */ - - ok(WriteFile(hFile, obuf, sizeof(obuf), &written, NULL), "WriteFile\n"); - ok(written == sizeof(obuf), "write file len\n"); - ok(DisconnectNamedPipe(hnp), "DisconnectNamedPipe while messages waiting\n"); - ok(WriteFile(hFile, obuf, sizeof(obuf), &written, NULL) == 0 - && GetLastError() == ERROR_PIPE_NOT_CONNECTED, "WriteFile to disconnected pipe\n"); - ok(ReadFile(hnp, ibuf, sizeof(ibuf), &readden, NULL) == 0 - && GetLastError() == ERROR_PIPE_NOT_CONNECTED, - "ReadFile from disconnected pipe with bytes waiting\n"); - ok(!DisconnectNamedPipe(hnp) && GetLastError() == ERROR_PIPE_NOT_CONNECTED, - "DisconnectNamedPipe worked twice\n"); - ret = WaitForSingleObject(hFile, 0); - ok(ret == WAIT_TIMEOUT, "WaitForSingleObject returned %X\n", ret); - ok(CloseHandle(hFile), "CloseHandle\n"); - } - - ok(CloseHandle(hnp), "CloseHandle\n"); - - return 0; -} -static void test_CreatePipe(void) -{ - SECURITY_ATTRIBUTES pipe_attr; - HANDLE piperead, pipewrite; - DWORD written; - DWORD read; - DWORD i, size; - BYTE *buffer; - char readbuf[32]; - - user_apc_ran = FALSE; - if (pQueueUserAPC) - ok(pQueueUserAPC(user_apc, GetCurrentThread(), 0), "couldn't create user apc\n"); - - pipe_attr.nLength = sizeof(SECURITY_ATTRIBUTES); - pipe_attr.bInheritHandle = TRUE; - pipe_attr.lpSecurityDescriptor = NULL; - ok(CreatePipe(&piperead, &pipewrite, &pipe_attr, 0) != 0, "CreatePipe failed\n"); - ok(WriteFile(pipewrite,PIPENAME,sizeof(PIPENAME), &written, NULL), "Write to anonymous pipe failed\n"); - ok(written == sizeof(PIPENAME), "Write to anonymous pipe wrote %d bytes\n", written); - ok(ReadFile(piperead,readbuf,sizeof(readbuf),&read, NULL), "Read from non empty pipe failed\n"); - ok(read == sizeof(PIPENAME), "Read from anonymous pipe got %d bytes\n", read); - ok(CloseHandle(pipewrite), "CloseHandle for the write pipe failed\n"); - ok(CloseHandle(piperead), "CloseHandle for the read pipe failed\n"); - - /* Now write another chunk*/ - ok(CreatePipe(&piperead, &pipewrite, &pipe_attr, 0) != 0, "CreatePipe failed\n"); - ok(WriteFile(pipewrite,PIPENAME,sizeof(PIPENAME), &written, NULL), "Write to anonymous pipe failed\n"); - ok(written == sizeof(PIPENAME), "Write to anonymous pipe wrote %d bytes\n", written); - /* and close the write end, read should still succeed*/ - ok(CloseHandle(pipewrite), "CloseHandle for the Write Pipe failed\n"); - ok(ReadFile(piperead,readbuf,sizeof(readbuf),&read, NULL), "Read from broken pipe withe with pending data failed\n"); - ok(read == sizeof(PIPENAME), "Read from anonymous pipe got %d bytes\n", read); - /* But now we need to get informed that the pipe is closed */ - ok(ReadFile(piperead,readbuf,sizeof(readbuf),&read, NULL) == 0, "Broken pipe not detected\n"); - ok(CloseHandle(piperead), "CloseHandle for the read pipe failed\n"); - - /* Try bigger chunks */ - size = 32768; - buffer = HeapAlloc( GetProcessHeap(), 0, size ); - for (i = 0; i < size; i++) buffer[i] = i; - ok(CreatePipe(&piperead, &pipewrite, &pipe_attr, (size + 24)) != 0, "CreatePipe failed\n"); - ok(WriteFile(pipewrite, buffer, size, &written, NULL), "Write to anonymous pipe failed\n"); - ok(written == size, "Write to anonymous pipe wrote %d bytes\n", written); - /* and close the write end, read should still succeed*/ - ok(CloseHandle(pipewrite), "CloseHandle for the Write Pipe failed\n"); - memset( buffer, 0, size ); - ok(ReadFile(piperead, buffer, size, &read, NULL), "Read from broken pipe withe with pending data failed\n"); - ok(read == size, "Read from anonymous pipe got %d bytes\n", read); - for (i = 0; i < size; i++) ok( buffer[i] == (BYTE)i, "invalid data %x at %x\n", buffer[i], i ); - /* But now we need to get informed that the pipe is closed */ - ok(ReadFile(piperead,readbuf,sizeof(readbuf),&read, NULL) == 0, "Broken pipe not detected\n"); - ok(CloseHandle(piperead), "CloseHandle for the read pipe failed\n"); - HeapFree(GetProcessHeap(), 0, buffer); - - ok(user_apc_ran == FALSE, "user apc ran, pipe using alertable io mode\n"); - SleepEx(0, TRUE); /* get rid of apc */ -} - -struct named_pipe_client_params -{ - DWORD security_flags; - HANDLE token; - BOOL revert; -}; - -#define PIPE_NAME "\\\\.\\pipe\\named_pipe_test" - -static DWORD CALLBACK named_pipe_client_func(LPVOID p) -{ - struct named_pipe_client_params *params = p; - HANDLE pipe; - BOOL ret; - const char message[] = "Test"; - DWORD bytes_read, bytes_written; - char dummy; - TOKEN_PRIVILEGES *Privileges = NULL; - - if (params->token) - { - if (params->revert) - { - /* modify the token so we can tell if the pipe impersonation - * token reverts to the process token */ - ret = AdjustTokenPrivileges(params->token, TRUE, NULL, 0, NULL, NULL); - ok(ret, "AdjustTokenPrivileges failed with error %d\n", GetLastError()); - } - ret = SetThreadToken(NULL, params->token); - ok(ret, "SetThreadToken failed with error %d\n", GetLastError()); - } - else - { - DWORD Size = 0; - HANDLE process_token; - - ret = OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY|TOKEN_ADJUST_PRIVILEGES, &process_token); - ok(ret, "OpenProcessToken failed with error %d\n", GetLastError()); - - ret = GetTokenInformation(process_token, TokenPrivileges, NULL, 0, &Size); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetTokenInformation(TokenPrivileges) failed with %d\n", GetLastError()); - Privileges = HeapAlloc(GetProcessHeap(), 0, Size); - ret = GetTokenInformation(process_token, TokenPrivileges, Privileges, Size, &Size); - ok(ret, "GetTokenInformation(TokenPrivileges) failed with %d\n", GetLastError()); - - ret = AdjustTokenPrivileges(process_token, TRUE, NULL, 0, NULL, NULL); - ok(ret, "AdjustTokenPrivileges failed with error %d\n", GetLastError()); - - CloseHandle(process_token); - } - - pipe = CreateFile(PIPE_NAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, params->security_flags, NULL); - ok(pipe != INVALID_HANDLE_VALUE, "CreateFile for pipe failed with error %d\n", GetLastError()); - - ret = WriteFile(pipe, message, sizeof(message), &bytes_written, NULL); - ok(ret, "WriteFile failed with error %d\n", GetLastError()); - - ret = ReadFile(pipe, &dummy, sizeof(dummy), &bytes_read, NULL); - ok(ret, "ReadFile failed with error %d\n", GetLastError()); - - if (params->token) - { - if (params->revert) - { - ret = RevertToSelf(); - ok(ret, "RevertToSelf failed with error %d\n", GetLastError()); - } - else - { - ret = AdjustTokenPrivileges(params->token, TRUE, NULL, 0, NULL, NULL); - ok(ret, "AdjustTokenPrivileges failed with error %d\n", GetLastError()); - } - } - else - { - HANDLE process_token; - - ret = OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &process_token); - ok(ret, "OpenProcessToken failed with error %d\n", GetLastError()); - - ret = AdjustTokenPrivileges(process_token, FALSE, Privileges, 0, NULL, NULL); - ok(ret, "AdjustTokenPrivileges failed with error %d\n", GetLastError()); - - HeapFree(GetProcessHeap(), 0, Privileges); - - CloseHandle(process_token); - } - - ret = WriteFile(pipe, message, sizeof(message), &bytes_written, NULL); - ok(ret, "WriteFile failed with error %d\n", GetLastError()); - - ret = ReadFile(pipe, &dummy, sizeof(dummy), &bytes_read, NULL); - ok(ret, "ReadFile failed with error %d\n", GetLastError()); - - CloseHandle(pipe); - - return 0; -} - -static HANDLE make_impersonation_token(DWORD Access, SECURITY_IMPERSONATION_LEVEL ImpersonationLevel) -{ - HANDLE ProcessToken; - HANDLE Token = NULL; - BOOL ret; - - ret = OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE, &ProcessToken); - ok(ret, "OpenProcessToken failed with error %d\n", GetLastError()); - - ret = pDuplicateTokenEx(ProcessToken, Access, NULL, ImpersonationLevel, TokenImpersonation, &Token); - ok(ret, "DuplicateToken failed with error %d\n", GetLastError()); - - CloseHandle(ProcessToken); - - return Token; -} - -static void test_ImpersonateNamedPipeClient(HANDLE hClientToken, DWORD security_flags, BOOL revert, void (*test_func)(int, HANDLE)) -{ - HANDLE hPipeServer; - BOOL ret; - DWORD dwTid; - HANDLE hThread; - char buffer[256]; - DWORD dwBytesRead; - DWORD error; - struct named_pipe_client_params params; - char dummy = 0; - DWORD dwBytesWritten; - HANDLE hToken = NULL; - SECURITY_IMPERSONATION_LEVEL ImpersonationLevel; - DWORD size; - - hPipeServer = CreateNamedPipe(PIPE_NAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT, 1, 100, 100, NMPWAIT_USE_DEFAULT_WAIT, NULL); - ok(hPipeServer != INVALID_HANDLE_VALUE, "CreateNamedPipe failed with error %d\n", GetLastError()); - - params.security_flags = security_flags; - params.token = hClientToken; - params.revert = revert; - hThread = CreateThread(NULL, 0, named_pipe_client_func, ¶ms, 0, &dwTid); - ok(hThread != NULL, "CreateThread failed with error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = ImpersonateNamedPipeClient(hPipeServer); - error = GetLastError(); - ok(ret /* win2k3 */ || (error == ERROR_CANNOT_IMPERSONATE), - "ImpersonateNamedPipeClient should have failed with ERROR_CANNOT_IMPERSONATE instead of %d\n", GetLastError()); - - ret = ConnectNamedPipe(hPipeServer, NULL); - ok(ret || (GetLastError() == ERROR_PIPE_CONNECTED), "ConnectNamedPipe failed with error %d\n", GetLastError()); - - ret = ReadFile(hPipeServer, buffer, sizeof(buffer), &dwBytesRead, NULL); - ok(ret, "ReadFile failed with error %d\n", GetLastError()); - - ret = ImpersonateNamedPipeClient(hPipeServer); - ok(ret, "ImpersonateNamedPipeClient failed with error %d\n", GetLastError()); - - ret = OpenThreadToken(GetCurrentThread(), TOKEN_QUERY, FALSE, &hToken); - ok(ret, "OpenThreadToken failed with error %d\n", GetLastError()); - - (*test_func)(0, hToken); - - ImpersonationLevel = 0xdeadbeef; /* to avoid false positives */ - ret = GetTokenInformation(hToken, TokenImpersonationLevel, &ImpersonationLevel, sizeof(ImpersonationLevel), &size); - ok(ret, "GetTokenInformation(TokenImpersonationLevel) failed with error %d\n", GetLastError()); - ok(ImpersonationLevel == SecurityImpersonation, "ImpersonationLevel should have been SecurityImpersonation(%d) instead of %d\n", SecurityImpersonation, ImpersonationLevel); - - CloseHandle(hToken); - - RevertToSelf(); - - ret = WriteFile(hPipeServer, &dummy, sizeof(dummy), &dwBytesWritten, NULL); - ok(ret, "WriteFile failed with error %d\n", GetLastError()); - - ret = ReadFile(hPipeServer, buffer, sizeof(buffer), &dwBytesRead, NULL); - ok(ret, "ReadFile failed with error %d\n", GetLastError()); - - ret = ImpersonateNamedPipeClient(hPipeServer); - ok(ret, "ImpersonateNamedPipeClient failed with error %d\n", GetLastError()); - - ret = OpenThreadToken(GetCurrentThread(), TOKEN_QUERY, FALSE, &hToken); - ok(ret, "OpenThreadToken failed with error %d\n", GetLastError()); - - (*test_func)(1, hToken); - - CloseHandle(hToken); - - RevertToSelf(); - - ret = WriteFile(hPipeServer, &dummy, sizeof(dummy), &dwBytesWritten, NULL); - ok(ret, "WriteFile failed with error %d\n", GetLastError()); - - WaitForSingleObject(hThread, INFINITE); - - ret = ImpersonateNamedPipeClient(hPipeServer); - ok(ret, "ImpersonateNamedPipeClient failed with error %d\n", GetLastError()); - - RevertToSelf(); - - CloseHandle(hThread); - CloseHandle(hPipeServer); -} - -static BOOL are_all_privileges_disabled(HANDLE hToken) -{ - BOOL ret; - TOKEN_PRIVILEGES *Privileges = NULL; - DWORD Size = 0; - BOOL all_privs_disabled = TRUE; - DWORD i; - - ret = GetTokenInformation(hToken, TokenPrivileges, NULL, 0, &Size); - if (!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER) - { - Privileges = HeapAlloc(GetProcessHeap(), 0, Size); - ret = GetTokenInformation(hToken, TokenPrivileges, Privileges, Size, &Size); - if (!ret) - { - HeapFree(GetProcessHeap(), 0, Privileges); - return FALSE; - } - } - else - return FALSE; - - for (i = 0; i < Privileges->PrivilegeCount; i++) - { - if (Privileges->Privileges[i].Attributes & SE_PRIVILEGE_ENABLED) - { - all_privs_disabled = FALSE; - break; - } - } - - HeapFree(GetProcessHeap(), 0, Privileges); - - return all_privs_disabled; -} - -static DWORD get_privilege_count(HANDLE hToken) -{ - TOKEN_STATISTICS Statistics; - DWORD Size = sizeof(Statistics); - BOOL ret; - - ret = GetTokenInformation(hToken, TokenStatistics, &Statistics, Size, &Size); - ok(ret, "GetTokenInformation(TokenStatistics)\n"); - if (!ret) return -1; - - return Statistics.PrivilegeCount; -} - -static void test_no_sqos_no_token(int call_index, HANDLE hToken) -{ - DWORD priv_count; - - switch (call_index) - { - case 0: - priv_count = get_privilege_count(hToken); - todo_wine - ok(priv_count == 0, "privilege count should have been 0 instead of %d\n", priv_count); - break; - case 1: - priv_count = get_privilege_count(hToken); - ok(priv_count > 0, "privilege count should now be > 0 instead of 0\n"); - ok(!are_all_privileges_disabled(hToken), "impersonated token should not have been modified\n"); - break; - default: - ok(0, "shouldn't happen\n"); - } -} - -static void test_no_sqos(int call_index, HANDLE hToken) -{ - switch (call_index) - { - case 0: - ok(!are_all_privileges_disabled(hToken), "token should be a copy of the process one\n"); - break; - case 1: - todo_wine - ok(are_all_privileges_disabled(hToken), "impersonated token should have been modified\n"); - break; - default: - ok(0, "shouldn't happen\n"); - } -} - -static void test_static_context(int call_index, HANDLE hToken) -{ - switch (call_index) - { - case 0: - ok(!are_all_privileges_disabled(hToken), "token should be a copy of the process one\n"); - break; - case 1: - ok(!are_all_privileges_disabled(hToken), "impersonated token should not have been modified\n"); - break; - default: - ok(0, "shouldn't happen\n"); - } -} - -static void test_dynamic_context(int call_index, HANDLE hToken) -{ - switch (call_index) - { - case 0: - ok(!are_all_privileges_disabled(hToken), "token should be a copy of the process one\n"); - break; - case 1: - todo_wine - ok(are_all_privileges_disabled(hToken), "impersonated token should have been modified\n"); - break; - default: - ok(0, "shouldn't happen\n"); - } -} - -static void test_dynamic_context_no_token(int call_index, HANDLE hToken) -{ - switch (call_index) - { - case 0: - ok(are_all_privileges_disabled(hToken), "token should be a copy of the process one\n"); - break; - case 1: - ok(!are_all_privileges_disabled(hToken), "process token modification should have been detected and impersonation token updated\n"); - break; - default: - ok(0, "shouldn't happen\n"); - } -} - -static void test_no_sqos_revert(int call_index, HANDLE hToken) -{ - DWORD priv_count; - switch (call_index) - { - case 0: - priv_count = get_privilege_count(hToken); - todo_wine - ok(priv_count == 0, "privilege count should have been 0 instead of %d\n", priv_count); - break; - case 1: - priv_count = get_privilege_count(hToken); - ok(priv_count > 0, "privilege count should now be > 0 instead of 0\n"); - ok(!are_all_privileges_disabled(hToken), "impersonated token should not have been modified\n"); - break; - default: - ok(0, "shouldn't happen\n"); - } -} - -static void test_static_context_revert(int call_index, HANDLE hToken) -{ - switch (call_index) - { - case 0: - todo_wine - ok(are_all_privileges_disabled(hToken), "privileges should have been disabled\n"); - break; - case 1: - todo_wine - ok(are_all_privileges_disabled(hToken), "impersonated token should not have been modified\n"); - break; - default: - ok(0, "shouldn't happen\n"); - } -} - -static void test_dynamic_context_revert(int call_index, HANDLE hToken) -{ - switch (call_index) - { - case 0: - todo_wine - ok(are_all_privileges_disabled(hToken), "privileges should have been disabled\n"); - break; - case 1: - ok(!are_all_privileges_disabled(hToken), "impersonated token should now be process token\n"); - break; - default: - ok(0, "shouldn't happen\n"); - } -} - -static void test_impersonation(void) -{ - HANDLE hClientToken; - HANDLE hProcessToken; - BOOL ret; - - if( !pDuplicateTokenEx ) { - skip("DuplicateTokenEx not found\n"); - return; - } - - ret = OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hProcessToken); - if (!ret) - { - skip("couldn't open process token, skipping impersonation tests\n"); - return; - } - - if (!get_privilege_count(hProcessToken) || are_all_privileges_disabled(hProcessToken)) - { - skip("token didn't have any privileges or they were all disabled. token not suitable for impersonation tests\n"); - CloseHandle(hProcessToken); - return; - } - CloseHandle(hProcessToken); - - test_ImpersonateNamedPipeClient(NULL, 0, FALSE, test_no_sqos_no_token); - hClientToken = make_impersonation_token(TOKEN_IMPERSONATE | TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, SecurityImpersonation); - test_ImpersonateNamedPipeClient(hClientToken, 0, FALSE, test_no_sqos); - CloseHandle(hClientToken); - hClientToken = make_impersonation_token(TOKEN_IMPERSONATE | TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, SecurityImpersonation); - test_ImpersonateNamedPipeClient(hClientToken, - SECURITY_SQOS_PRESENT | SECURITY_IMPERSONATION, FALSE, - test_static_context); - CloseHandle(hClientToken); - hClientToken = make_impersonation_token(TOKEN_IMPERSONATE | TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, SecurityImpersonation); - test_ImpersonateNamedPipeClient(hClientToken, - SECURITY_SQOS_PRESENT | SECURITY_CONTEXT_TRACKING | SECURITY_IMPERSONATION, - FALSE, test_dynamic_context); - CloseHandle(hClientToken); - test_ImpersonateNamedPipeClient(NULL, - SECURITY_SQOS_PRESENT | SECURITY_CONTEXT_TRACKING | SECURITY_IMPERSONATION, - FALSE, test_dynamic_context_no_token); - - hClientToken = make_impersonation_token(TOKEN_IMPERSONATE | TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, SecurityImpersonation); - test_ImpersonateNamedPipeClient(hClientToken, 0, TRUE, test_no_sqos_revert); - CloseHandle(hClientToken); - hClientToken = make_impersonation_token(TOKEN_IMPERSONATE | TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, SecurityImpersonation); - test_ImpersonateNamedPipeClient(hClientToken, - SECURITY_SQOS_PRESENT | SECURITY_IMPERSONATION, TRUE, - test_static_context_revert); - CloseHandle(hClientToken); - hClientToken = make_impersonation_token(TOKEN_IMPERSONATE | TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, SecurityImpersonation); - test_ImpersonateNamedPipeClient(hClientToken, - SECURITY_SQOS_PRESENT | SECURITY_CONTEXT_TRACKING | SECURITY_IMPERSONATION, - TRUE, test_dynamic_context_revert); - CloseHandle(hClientToken); -} - -struct overlapped_server_args -{ - HANDLE pipe_created; -}; - -static DWORD CALLBACK overlapped_server(LPVOID arg) -{ - OVERLAPPED ol; - HANDLE pipe; - int ret, err; - struct overlapped_server_args *a = arg; - DWORD num; - char buf[100]; - - pipe = CreateNamedPipeA("\\\\.\\pipe\\my pipe", FILE_FLAG_OVERLAPPED | PIPE_ACCESS_DUPLEX, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE, 1, 0, 0, 100000, NULL); - ok(pipe != NULL, "pipe NULL\n"); - - ol.hEvent = CreateEventA(0, 1, 0, 0); - ok(ol.hEvent != NULL, "event NULL\n"); - ret = ConnectNamedPipe(pipe, &ol); - err = GetLastError(); - ok(ret == 0, "ret %d\n", ret); - ok(err == ERROR_IO_PENDING, "gle %d\n", err); - SetEvent(a->pipe_created); - - ret = WaitForSingleObjectEx(ol.hEvent, INFINITE, 1); - ok(ret == WAIT_OBJECT_0, "ret %x\n", ret); - - ret = GetOverlappedResult(pipe, &ol, &num, 1); - ok(ret == 1, "ret %d\n", ret); - - /* This should block */ - ret = ReadFile(pipe, buf, sizeof(buf), &num, NULL); - ok(ret == 1, "ret %d\n", ret); - - DisconnectNamedPipe(pipe); - CloseHandle(ol.hEvent); - CloseHandle(pipe); - return 1; -} - -static void test_overlapped(void) -{ - DWORD tid, num; - HANDLE thread, pipe; - BOOL ret; - struct overlapped_server_args args; - - args.pipe_created = CreateEventA(0, 1, 0, 0); - thread = CreateThread(NULL, 0, overlapped_server, &args, 0, &tid); - - WaitForSingleObject(args.pipe_created, INFINITE); - pipe = CreateFileA("\\\\.\\pipe\\my pipe", GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); - ok(pipe != INVALID_HANDLE_VALUE, "cf failed\n"); - - /* Sleep to try to get the ReadFile in the server to occur before the following WriteFile */ - Sleep(1); - - ret = WriteFile(pipe, "x", 1, &num, NULL); - ok(ret, "WriteFile failed with error %d\n", GetLastError()); - - WaitForSingleObject(thread, INFINITE); - CloseHandle(pipe); - CloseHandle(args.pipe_created); - CloseHandle(thread); -} - -static void test_NamedPipeHandleState(void) -{ - HANDLE server, client; - BOOL ret; - DWORD state, instances, maxCollectionCount, collectDataTimeout; - char userName[MAX_PATH]; - - server = CreateNamedPipe(PIPENAME, PIPE_ACCESS_DUPLEX, - /* dwOpenMode */ PIPE_TYPE_BYTE | PIPE_WAIT, - /* nMaxInstances */ 1, - /* nOutBufSize */ 1024, - /* nInBufSize */ 1024, - /* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT, - /* lpSecurityAttrib */ NULL); - ok(server != INVALID_HANDLE_VALUE, "cf failed\n"); - ret = GetNamedPipeHandleState(server, NULL, NULL, NULL, NULL, NULL, 0); - todo_wine - ok(ret, "GetNamedPipeHandleState failed: %d\n", GetLastError()); - ret = GetNamedPipeHandleState(server, &state, &instances, NULL, NULL, NULL, - 0); - todo_wine - ok(ret, "GetNamedPipeHandleState failed: %d\n", GetLastError()); - if (ret) - { - ok(state == 0, "unexpected state %08x\n", state); - ok(instances == 1, "expected 1 instances, got %d\n", instances); - } - /* Some parameters have no meaning, and therefore can't be retrieved, - * on a local pipe. - */ - SetLastError(0xdeadbeef); - ret = GetNamedPipeHandleState(server, &state, &instances, - &maxCollectionCount, &collectDataTimeout, userName, - sizeof(userName) / sizeof(userName[0])); - todo_wine - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - /* A byte-mode pipe server can't be changed to message mode. */ - state = PIPE_READMODE_MESSAGE; - SetLastError(0xdeadbeef); - ret = SetNamedPipeHandleState(server, &state, NULL, NULL); - todo_wine - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - client = CreateFileA(PIPENAME, GENERIC_READ|GENERIC_WRITE, 0, NULL, - OPEN_EXISTING, 0, NULL); - ok(client != INVALID_HANDLE_VALUE, "cf failed\n"); - - state = PIPE_READMODE_BYTE; - ret = SetNamedPipeHandleState(client, &state, NULL, NULL); - todo_wine - ok(ret, "SetNamedPipeHandleState failed: %d\n", GetLastError()); - /* A byte-mode pipe client can't be changed to message mode, either. */ - state = PIPE_READMODE_MESSAGE; - SetLastError(0xdeadbeef); - ret = SetNamedPipeHandleState(server, &state, NULL, NULL); - todo_wine - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - CloseHandle(client); - CloseHandle(server); - - server = CreateNamedPipe(PIPENAME, PIPE_ACCESS_DUPLEX, - /* dwOpenMode */ PIPE_TYPE_MESSAGE | PIPE_WAIT, - /* nMaxInstances */ 1, - /* nOutBufSize */ 1024, - /* nInBufSize */ 1024, - /* nDefaultWait */ NMPWAIT_USE_DEFAULT_WAIT, - /* lpSecurityAttrib */ NULL); - ok(server != INVALID_HANDLE_VALUE, "cf failed\n"); - ret = GetNamedPipeHandleState(server, NULL, NULL, NULL, NULL, NULL, 0); - todo_wine - ok(ret, "GetNamedPipeHandleState failed: %d\n", GetLastError()); - ret = GetNamedPipeHandleState(server, &state, &instances, NULL, NULL, NULL, - 0); - todo_wine - ok(ret, "GetNamedPipeHandleState failed: %d\n", GetLastError()); - if (ret) - { - ok(state == 0, "unexpected state %08x\n", state); - ok(instances == 1, "expected 1 instances, got %d\n", instances); - } - /* In contrast to byte-mode pipes, a message-mode pipe server can be - * changed to byte mode. - */ - state = PIPE_READMODE_BYTE; - ret = SetNamedPipeHandleState(server, &state, NULL, NULL); - todo_wine - ok(ret, "SetNamedPipeHandleState failed: %d\n", GetLastError()); - - client = CreateFileA(PIPENAME, GENERIC_READ|GENERIC_WRITE, 0, NULL, - OPEN_EXISTING, 0, NULL); - ok(client != INVALID_HANDLE_VALUE, "cf failed\n"); - - state = PIPE_READMODE_MESSAGE; - ret = SetNamedPipeHandleState(client, &state, NULL, NULL); - todo_wine - ok(ret, "SetNamedPipeHandleState failed: %d\n", GetLastError()); - /* A message-mode pipe client can also be changed to byte mode. - */ - state = PIPE_READMODE_BYTE; - ret = SetNamedPipeHandleState(client, &state, NULL, NULL); - todo_wine - ok(ret, "SetNamedPipeHandleState failed: %d\n", GetLastError()); - - CloseHandle(client); - CloseHandle(server); -} - -START_TEST(pipe) -{ - HMODULE hmod; - - hmod = GetModuleHandle("advapi32.dll"); - pDuplicateTokenEx = (void *) GetProcAddress(hmod, "DuplicateTokenEx"); - hmod = GetModuleHandle("kernel32.dll"); - pQueueUserAPC = (void *) GetProcAddress(hmod, "QueueUserAPC"); - - if (test_DisconnectNamedPipe()) - return; - test_CreateNamedPipe_instances_must_match(); - test_NamedPipe_2(); - test_CreateNamedPipe(PIPE_TYPE_BYTE); - test_CreateNamedPipe(PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE); - test_CreatePipe(); - test_impersonation(); - test_overlapped(); - test_NamedPipeHandleState(); -} diff --git a/rostests/winetests/kernel32/process.c b/rostests/winetests/kernel32/process.c deleted file mode 100755 index b3b8d180cc2..00000000000 --- a/rostests/winetests/kernel32/process.c +++ /dev/null @@ -1,1901 +0,0 @@ -/* - * Unit test suite for process functions - * - * Copyright 2002 Eric Pouech - * Copyright 2006 Dmitry Timoshkov - * - * 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 "ntstatus.h" -#define WIN32_NO_STATUS -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "wincon.h" -#include "winnls.h" -#include "winternl.h" - -#include "wine/test.h" - -#define expect_eq_d(expected, actual) \ - do { \ - int value = (actual); \ - ok((expected) == value, "Expected " #actual " to be %d (" #expected ") is %d\n", \ - (expected), value); \ - } while (0) -#define expect_eq_s(expected, actual) \ - do { \ - LPCSTR value = (actual); \ - ok(lstrcmpA((expected), value) == 0, "Expected " #actual " to be L\"%s\" (" #expected ") is L\"%s\"\n", \ - expected, value); \ - } while (0) -#define expect_eq_ws_i(expected, actual) \ - do { \ - LPCWSTR value = (actual); \ - ok(lstrcmpiW((expected), value) == 0, "Expected " #actual " to be L\"%s\" (" #expected ") is L\"%s\"\n", \ - wine_dbgstr_w(expected), wine_dbgstr_w(value)); \ - } while (0) - -static HINSTANCE hkernel32; -static void (WINAPI *pGetNativeSystemInfo)(LPSYSTEM_INFO); -static BOOL (WINAPI *pGetSystemRegistryQuota)(PDWORD, PDWORD); -static BOOL (WINAPI *pIsWow64Process)(HANDLE,PBOOL); -static LPVOID (WINAPI *pVirtualAllocEx)(HANDLE, LPVOID, SIZE_T, DWORD, DWORD); -static BOOL (WINAPI *pVirtualFreeEx)(HANDLE, LPVOID, SIZE_T, DWORD); -static BOOL (WINAPI *pQueryFullProcessImageNameA)(HANDLE hProcess, DWORD dwFlags, LPSTR lpExeName, PDWORD lpdwSize); -static BOOL (WINAPI *pQueryFullProcessImageNameW)(HANDLE hProcess, DWORD dwFlags, LPWSTR lpExeName, PDWORD lpdwSize); - -/* ############################### */ -static char base[MAX_PATH]; -static char selfname[MAX_PATH]; -static char* exename; -static char resfile[MAX_PATH]; - -static int myARGC; -static char** myARGV; - -/* As some environment variables get very long on Unix, we only test for - * the first 127 bytes. - * Note that increasing this value past 256 may exceed the buffer size - * limitations of the *Profile functions (at least on Wine). - */ -#define MAX_LISTED_ENV_VAR 128 - -/* ---------------- portable memory allocation thingie */ - -static char memory[1024*256]; -static char* memory_index = memory; - -static char* grab_memory(size_t len) -{ - char* ret = memory_index; - /* align on dword */ - len = (len + 3) & ~3; - memory_index += len; - assert(memory_index <= memory + sizeof(memory)); - return ret; -} - -static void release_memory(void) -{ - memory_index = memory; -} - -/* ---------------- simplistic tool to encode/decode strings (to hide \ " ' and such) */ - -static const char* encodeA(const char* str) -{ - char* ptr; - size_t len,i; - - if (!str) return ""; - len = strlen(str) + 1; - ptr = grab_memory(len * 2 + 1); - for (i = 0; i < len; i++) - sprintf(&ptr[i * 2], "%02x", (unsigned char)str[i]); - ptr[2 * len] = '\0'; - return ptr; -} - -static const char* encodeW(const WCHAR* str) -{ - char* ptr; - size_t len,i; - - if (!str) return ""; - len = lstrlenW(str) + 1; - ptr = grab_memory(len * 4 + 1); - assert(ptr); - for (i = 0; i < len; i++) - sprintf(&ptr[i * 4], "%04x", (unsigned int)(unsigned short)str[i]); - ptr[4 * len] = '\0'; - return ptr; -} - -static unsigned decode_char(char c) -{ - if (c >= '0' && c <= '9') return c - '0'; - if (c >= 'a' && c <= 'f') return c - 'a' + 10; - assert(c >= 'A' && c <= 'F'); - return c - 'A' + 10; -} - -static char* decodeA(const char* str) -{ - char* ptr; - size_t len,i; - - len = strlen(str) / 2; - if (!len--) return NULL; - ptr = grab_memory(len + 1); - for (i = 0; i < len; i++) - ptr[i] = (decode_char(str[2 * i]) << 4) | decode_char(str[2 * i + 1]); - ptr[len] = '\0'; - return ptr; -} - -/* This will be needed to decode Unicode strings saved by the child process - * when we test Unicode functions. - */ -static WCHAR* decodeW(const char* str) -{ - size_t len; - WCHAR* ptr; - int i; - - len = strlen(str) / 4; - if (!len--) return NULL; - ptr = (WCHAR*)grab_memory(len * 2 + 1); - for (i = 0; i < len; i++) - ptr[i] = (decode_char(str[4 * i]) << 12) | - (decode_char(str[4 * i + 1]) << 8) | - (decode_char(str[4 * i + 2]) << 4) | - (decode_char(str[4 * i + 3]) << 0); - ptr[len] = '\0'; - return ptr; -} - -/****************************************************************** - * init - * - * generates basic information like: - * base: absolute path to curr dir - * selfname: the way to reinvoke ourselves - * exename: executable without the path - * function-pointers, which are not implemented in all windows versions - */ -static int init(void) -{ - char *p; - - myARGC = winetest_get_mainargs( &myARGV ); - if (!GetCurrentDirectoryA(sizeof(base), base)) return 0; - strcpy(selfname, myARGV[0]); - - /* Strip the path of selfname */ - if ((p = strrchr(selfname, '\\')) != NULL) exename = p + 1; - else exename = selfname; - - if ((p = strrchr(exename, '/')) != NULL) exename = p + 1; - - hkernel32 = GetModuleHandleA("kernel32"); - pGetNativeSystemInfo = (void *) GetProcAddress(hkernel32, "GetNativeSystemInfo"); - pGetSystemRegistryQuota = (void *) GetProcAddress(hkernel32, "GetSystemRegistryQuota"); - pIsWow64Process = (void *) GetProcAddress(hkernel32, "IsWow64Process"); - pVirtualAllocEx = (void *) GetProcAddress(hkernel32, "VirtualAllocEx"); - pVirtualFreeEx = (void *) GetProcAddress(hkernel32, "VirtualFreeEx"); - pQueryFullProcessImageNameA = (void *) GetProcAddress(hkernel32, "QueryFullProcessImageNameA"); - pQueryFullProcessImageNameW = (void *) GetProcAddress(hkernel32, "QueryFullProcessImageNameW"); - return 1; -} - -/****************************************************************** - * get_file_name - * - * generates an absolute file_name for temporary file - * - */ -static void get_file_name(char* buf) -{ - char path[MAX_PATH]; - - buf[0] = '\0'; - GetTempPathA(sizeof(path), path); - GetTempFileNameA(path, "wt", 0, buf); -} - -/****************************************************************** - * static void childPrintf - * - */ -static void childPrintf(HANDLE h, const char* fmt, ...) -{ - va_list valist; - char buffer[1024+4*MAX_LISTED_ENV_VAR]; - DWORD w; - - va_start(valist, fmt); - vsprintf(buffer, fmt, valist); - va_end(valist); - WriteFile(h, buffer, strlen(buffer), &w, NULL); -} - - -/****************************************************************** - * doChild - * - * output most of the information in the child process - */ -static void doChild(const char* file, const char* option) -{ - STARTUPINFOA siA; - STARTUPINFOW siW; - int i; - char *ptrA, *ptrA_save; - WCHAR *ptrW, *ptrW_save; - char bufA[MAX_PATH]; - WCHAR bufW[MAX_PATH]; - HANDLE hFile = CreateFileA(file, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - BOOL ret; - - if (hFile == INVALID_HANDLE_VALUE) return; - - /* output of startup info (Ansi) */ - GetStartupInfoA(&siA); - childPrintf(hFile, - "[StartupInfoA]\ncb=%08ld\nlpDesktop=%s\nlpTitle=%s\n" - "dwX=%lu\ndwY=%lu\ndwXSize=%lu\ndwYSize=%lu\n" - "dwXCountChars=%lu\ndwYCountChars=%lu\ndwFillAttribute=%lu\n" - "dwFlags=%lu\nwShowWindow=%u\n" - "hStdInput=%lu\nhStdOutput=%lu\nhStdError=%lu\n\n", - siA.cb, encodeA(siA.lpDesktop), encodeA(siA.lpTitle), - siA.dwX, siA.dwY, siA.dwXSize, siA.dwYSize, - siA.dwXCountChars, siA.dwYCountChars, siA.dwFillAttribute, - siA.dwFlags, siA.wShowWindow, - (DWORD_PTR)siA.hStdInput, (DWORD_PTR)siA.hStdOutput, (DWORD_PTR)siA.hStdError); - - /* since GetStartupInfoW is only implemented in win2k, - * zero out before calling so we can notice the difference - */ - memset(&siW, 0, sizeof(siW)); - GetStartupInfoW(&siW); - childPrintf(hFile, - "[StartupInfoW]\ncb=%08ld\nlpDesktop=%s\nlpTitle=%s\n" - "dwX=%lu\ndwY=%lu\ndwXSize=%lu\ndwYSize=%lu\n" - "dwXCountChars=%lu\ndwYCountChars=%lu\ndwFillAttribute=%lu\n" - "dwFlags=%lu\nwShowWindow=%u\n" - "hStdInput=%lu\nhStdOutput=%lu\nhStdError=%lu\n\n", - siW.cb, encodeW(siW.lpDesktop), encodeW(siW.lpTitle), - siW.dwX, siW.dwY, siW.dwXSize, siW.dwYSize, - siW.dwXCountChars, siW.dwYCountChars, siW.dwFillAttribute, - siW.dwFlags, siW.wShowWindow, - (DWORD_PTR)siW.hStdInput, (DWORD_PTR)siW.hStdOutput, (DWORD_PTR)siW.hStdError); - - /* Arguments */ - childPrintf(hFile, "[Arguments]\nargcA=%d\n", myARGC); - for (i = 0; i < myARGC; i++) - { - childPrintf(hFile, "argvA%d=%s\n", i, encodeA(myARGV[i])); - } - childPrintf(hFile, "CommandLineA=%s\n", encodeA(GetCommandLineA())); - -#if 0 - int argcW; - WCHAR** argvW; - - /* this is part of shell32... and should be tested there */ - argvW = CommandLineToArgvW(GetCommandLineW(), &argcW); - for (i = 0; i < argcW; i++) - { - childPrintf(hFile, "argvW%d=%s\n", i, encodeW(argvW[i])); - } -#endif - childPrintf(hFile, "CommandLineW=%s\n\n", encodeW(GetCommandLineW())); - - /* output of environment (Ansi) */ - ptrA_save = ptrA = GetEnvironmentStringsA(); - if (ptrA) - { - char env_var[MAX_LISTED_ENV_VAR]; - - childPrintf(hFile, "[EnvironmentA]\n"); - i = 0; - while (*ptrA) - { - lstrcpynA(env_var, ptrA, MAX_LISTED_ENV_VAR); - childPrintf(hFile, "env%d=%s\n", i, encodeA(env_var)); - i++; - ptrA += strlen(ptrA) + 1; - } - childPrintf(hFile, "len=%d\n\n", i); - FreeEnvironmentStringsA(ptrA_save); - } - - /* output of environment (Unicode) */ - ptrW_save = ptrW = GetEnvironmentStringsW(); - if (ptrW) - { - WCHAR env_var[MAX_LISTED_ENV_VAR]; - - childPrintf(hFile, "[EnvironmentW]\n"); - i = 0; - while (*ptrW) - { - lstrcpynW(env_var, ptrW, MAX_LISTED_ENV_VAR - 1); - env_var[MAX_LISTED_ENV_VAR - 1] = '\0'; - childPrintf(hFile, "env%d=%s\n", i, encodeW(env_var)); - i++; - ptrW += lstrlenW(ptrW) + 1; - } - childPrintf(hFile, "len=%d\n\n", i); - FreeEnvironmentStringsW(ptrW_save); - } - - childPrintf(hFile, "[Misc]\n"); - if (GetCurrentDirectoryA(sizeof(bufA), bufA)) - childPrintf(hFile, "CurrDirA=%s\n", encodeA(bufA)); - if (GetCurrentDirectoryW(sizeof(bufW) / sizeof(bufW[0]), bufW)) - childPrintf(hFile, "CurrDirW=%s\n", encodeW(bufW)); - childPrintf(hFile, "\n"); - - if (option && strcmp(option, "console") == 0) - { - CONSOLE_SCREEN_BUFFER_INFO sbi; - HANDLE hConIn = GetStdHandle(STD_INPUT_HANDLE); - HANDLE hConOut = GetStdHandle(STD_OUTPUT_HANDLE); - DWORD modeIn, modeOut; - - childPrintf(hFile, "[Console]\n"); - if (GetConsoleScreenBufferInfo(hConOut, &sbi)) - { - childPrintf(hFile, "SizeX=%d\nSizeY=%d\nCursorX=%d\nCursorY=%d\nAttributes=%d\n", - sbi.dwSize.X, sbi.dwSize.Y, sbi.dwCursorPosition.X, sbi.dwCursorPosition.Y, sbi.wAttributes); - childPrintf(hFile, "winLeft=%d\nwinTop=%d\nwinRight=%d\nwinBottom=%d\n", - sbi.srWindow.Left, sbi.srWindow.Top, sbi.srWindow.Right, sbi.srWindow.Bottom); - childPrintf(hFile, "maxWinWidth=%d\nmaxWinHeight=%d\n", - sbi.dwMaximumWindowSize.X, sbi.dwMaximumWindowSize.Y); - } - childPrintf(hFile, "InputCP=%d\nOutputCP=%d\n", - GetConsoleCP(), GetConsoleOutputCP()); - if (GetConsoleMode(hConIn, &modeIn)) - childPrintf(hFile, "InputMode=%ld\n", modeIn); - if (GetConsoleMode(hConOut, &modeOut)) - childPrintf(hFile, "OutputMode=%ld\n", modeOut); - - /* now that we have written all relevant information, let's change it */ - SetLastError(0xdeadbeef); - ret = SetConsoleCP(1252); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("Setting the codepage is not implemented\n"); - } - else - { - ok(ret, "Setting CP\n"); - ok(SetConsoleOutputCP(1252), "Setting SB CP\n"); - } - - ret = SetConsoleMode(hConIn, modeIn ^ 1); - ok( ret, "Setting mode (%d)\n", GetLastError()); - ret = SetConsoleMode(hConOut, modeOut ^ 1); - ok( ret, "Setting mode (%d)\n", GetLastError()); - sbi.dwCursorPosition.X ^= 1; - sbi.dwCursorPosition.Y ^= 1; - ret = SetConsoleCursorPosition(hConOut, sbi.dwCursorPosition); - ok( ret, "Setting cursor position (%d)\n", GetLastError()); - } - if (option && strcmp(option, "stdhandle") == 0) - { - HANDLE hStdIn = GetStdHandle(STD_INPUT_HANDLE); - HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); - - if (hStdIn != INVALID_HANDLE_VALUE || hStdOut != INVALID_HANDLE_VALUE) - { - char buf[1024]; - DWORD r, w; - - ok(ReadFile(hStdIn, buf, sizeof(buf), &r, NULL) && r > 0, "Reading message from input pipe\n"); - childPrintf(hFile, "[StdHandle]\nmsg=%s\n\n", encodeA(buf)); - ok(WriteFile(hStdOut, buf, r, &w, NULL) && w == r, "Writing message to output pipe\n"); - } - } - - if (option && strcmp(option, "exit_code") == 0) - { - childPrintf(hFile, "[ExitCode]\nvalue=%d\n\n", 123); - CloseHandle(hFile); - ExitProcess(123); - } - - CloseHandle(hFile); -} - -static char* getChildString(const char* sect, const char* key) -{ - char buf[1024+4*MAX_LISTED_ENV_VAR]; - char* ret; - - GetPrivateProfileStringA(sect, key, "-", buf, sizeof(buf), resfile); - if (buf[0] == '\0' || (buf[0] == '-' && buf[1] == '\0')) return NULL; - assert(!(strlen(buf) & 1)); - ret = decodeA(buf); - return ret; -} - -static WCHAR* getChildStringW(const char* sect, const char* key) -{ - char buf[1024+4*MAX_LISTED_ENV_VAR]; - WCHAR* ret; - - GetPrivateProfileStringA(sect, key, "-", buf, sizeof(buf), resfile); - if (buf[0] == '\0' || (buf[0] == '-' && buf[1] == '\0')) return NULL; - assert(!(strlen(buf) & 1)); - ret = decodeW(buf); - return ret; -} - -/* FIXME: this may be moved to the wtmain.c file, because it may be needed by - * others... (windows uses stricmp while Un*x uses strcasecmp...) - */ -static int wtstrcasecmp(const char* p1, const char* p2) -{ - char c1, c2; - - c1 = c2 = '@'; - while (c1 == c2 && c1) - { - c1 = *p1++; c2 = *p2++; - if (c1 != c2) - { - c1 = toupper(c1); c2 = toupper(c2); - } - } - return c1 - c2; -} - -static int strCmp(const char* s1, const char* s2, BOOL sensitive) -{ - if (!s1 && !s2) return 0; - if (!s2) return -1; - if (!s1) return 1; - return (sensitive) ? strcmp(s1, s2) : wtstrcasecmp(s1, s2); -} - -static void ok_child_string( int line, const char *sect, const char *key, - const char *expect, int sensitive ) -{ - char* result = getChildString( sect, key ); - ok_(__FILE__, line)( strCmp(result, expect, sensitive) == 0, "%s:%s expected '%s', got '%s'\n", - sect, key, expect ? expect : "(null)", result ); -} - -static void ok_child_stringWA( int line, const char *sect, const char *key, - const char *expect, int sensitive ) -{ - WCHAR* expectW; - CHAR* resultA; - DWORD len; - WCHAR* result = getChildStringW( sect, key ); - - len = MultiByteToWideChar( CP_ACP, 0, expect, -1, NULL, 0); - expectW = HeapAlloc(GetProcessHeap(),0,len*sizeof(WCHAR)); - MultiByteToWideChar( CP_ACP, 0, expect, -1, expectW, len); - - len = WideCharToMultiByte( CP_ACP, 0, result, -1, NULL, 0, NULL, NULL); - resultA = HeapAlloc(GetProcessHeap(),0,len*sizeof(CHAR)); - WideCharToMultiByte( CP_ACP, 0, result, -1, resultA, len, NULL, NULL); - - if (sensitive) - ok_(__FILE__, line)( lstrcmpW(result, expectW) == 0, "%s:%s expected '%s', got '%s'\n", - sect, key, expect ? expect : "(null)", resultA ); - else - ok_(__FILE__, line)( lstrcmpiW(result, expectW) == 0, "%s:%s expected '%s', got '%s'\n", - sect, key, expect ? expect : "(null)", resultA ); - HeapFree(GetProcessHeap(),0,expectW); - HeapFree(GetProcessHeap(),0,resultA); -} - -#define okChildString(sect, key, expect) ok_child_string(__LINE__, (sect), (key), (expect), 1 ) -#define okChildIString(sect, key, expect) ok_child_string(__LINE__, (sect), (key), (expect), 0 ) -#define okChildStringWA(sect, key, expect) ok_child_stringWA(__LINE__, (sect), (key), (expect), 1 ) - -/* using !expect ensures that the test will fail if the sect/key isn't present - * in result file - */ -#define okChildInt(sect, key, expect) \ - do { \ - UINT result = GetPrivateProfileIntA((sect), (key), !(expect), resfile); \ - ok(result == expect, "%s:%s expected %u, but got %u\n", (sect), (key), (UINT)(expect), result); \ - } while (0) - -static void test_Startup(void) -{ - char buffer[MAX_PATH]; - PROCESS_INFORMATION info; - STARTUPINFOA startup,si; - char *result; - static CHAR title[] = "I'm the title string", - desktop[] = "winsta0\\default", - empty[] = ""; - - /* let's start simplistic */ - memset(&startup, 0, sizeof(startup)); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW; - startup.wShowWindow = SW_SHOWNORMAL; - - get_file_name(resfile); - sprintf(buffer, "\"%s\" tests/process.c \"%s\"", selfname, resfile); - ok(CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info), "CreateProcess\n"); - /* wait for child to terminate */ - ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n"); - /* child process has changed result file, so let profile functions know about it */ - WritePrivateProfileStringA(NULL, NULL, NULL, resfile); - - GetStartupInfoA(&si); - okChildInt("StartupInfoA", "cb", startup.cb); - okChildString("StartupInfoA", "lpDesktop", si.lpDesktop); - okChildInt("StartupInfoA", "dwX", startup.dwX); - okChildInt("StartupInfoA", "dwY", startup.dwY); - okChildInt("StartupInfoA", "dwXSize", startup.dwXSize); - okChildInt("StartupInfoA", "dwYSize", startup.dwYSize); - okChildInt("StartupInfoA", "dwXCountChars", startup.dwXCountChars); - okChildInt("StartupInfoA", "dwYCountChars", startup.dwYCountChars); - okChildInt("StartupInfoA", "dwFillAttribute", startup.dwFillAttribute); - okChildInt("StartupInfoA", "dwFlags", startup.dwFlags); - okChildInt("StartupInfoA", "wShowWindow", startup.wShowWindow); - release_memory(); - assert(DeleteFileA(resfile) != 0); - - /* not so simplistic now */ - memset(&startup, 0, sizeof(startup)); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW; - startup.wShowWindow = SW_SHOWNORMAL; - startup.lpTitle = title; - startup.lpDesktop = desktop; - startup.dwXCountChars = 0x12121212; - startup.dwYCountChars = 0x23232323; - startup.dwX = 0x34343434; - startup.dwY = 0x45454545; - startup.dwXSize = 0x56565656; - startup.dwYSize = 0x67676767; - startup.dwFillAttribute = 0xA55A; - - get_file_name(resfile); - sprintf(buffer, "\"%s\" tests/process.c \"%s\"", selfname, resfile); - ok(CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info), "CreateProcess\n"); - /* wait for child to terminate */ - ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n"); - /* child process has changed result file, so let profile functions know about it */ - WritePrivateProfileStringA(NULL, NULL, NULL, resfile); - - okChildInt("StartupInfoA", "cb", startup.cb); - okChildString("StartupInfoA", "lpDesktop", startup.lpDesktop); - okChildString("StartupInfoA", "lpTitle", startup.lpTitle); - okChildInt("StartupInfoA", "dwX", startup.dwX); - okChildInt("StartupInfoA", "dwY", startup.dwY); - okChildInt("StartupInfoA", "dwXSize", startup.dwXSize); - okChildInt("StartupInfoA", "dwYSize", startup.dwYSize); - okChildInt("StartupInfoA", "dwXCountChars", startup.dwXCountChars); - okChildInt("StartupInfoA", "dwYCountChars", startup.dwYCountChars); - okChildInt("StartupInfoA", "dwFillAttribute", startup.dwFillAttribute); - okChildInt("StartupInfoA", "dwFlags", startup.dwFlags); - okChildInt("StartupInfoA", "wShowWindow", startup.wShowWindow); - release_memory(); - assert(DeleteFileA(resfile) != 0); - - /* not so simplistic now */ - memset(&startup, 0, sizeof(startup)); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW; - startup.wShowWindow = SW_SHOWNORMAL; - startup.lpTitle = title; - startup.lpDesktop = NULL; - startup.dwXCountChars = 0x12121212; - startup.dwYCountChars = 0x23232323; - startup.dwX = 0x34343434; - startup.dwY = 0x45454545; - startup.dwXSize = 0x56565656; - startup.dwYSize = 0x67676767; - startup.dwFillAttribute = 0xA55A; - - get_file_name(resfile); - sprintf(buffer, "\"%s\" tests/process.c \"%s\"", selfname, resfile); - ok(CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info), "CreateProcess\n"); - /* wait for child to terminate */ - ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n"); - /* child process has changed result file, so let profile functions know about it */ - WritePrivateProfileStringA(NULL, NULL, NULL, resfile); - - okChildInt("StartupInfoA", "cb", startup.cb); - okChildString("StartupInfoA", "lpDesktop", si.lpDesktop); - okChildString("StartupInfoA", "lpTitle", startup.lpTitle); - okChildInt("StartupInfoA", "dwX", startup.dwX); - okChildInt("StartupInfoA", "dwY", startup.dwY); - okChildInt("StartupInfoA", "dwXSize", startup.dwXSize); - okChildInt("StartupInfoA", "dwYSize", startup.dwYSize); - okChildInt("StartupInfoA", "dwXCountChars", startup.dwXCountChars); - okChildInt("StartupInfoA", "dwYCountChars", startup.dwYCountChars); - okChildInt("StartupInfoA", "dwFillAttribute", startup.dwFillAttribute); - okChildInt("StartupInfoA", "dwFlags", startup.dwFlags); - okChildInt("StartupInfoA", "wShowWindow", startup.wShowWindow); - release_memory(); - assert(DeleteFileA(resfile) != 0); - - /* not so simplistic now */ - memset(&startup, 0, sizeof(startup)); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW; - startup.wShowWindow = SW_SHOWNORMAL; - startup.lpTitle = title; - startup.lpDesktop = empty; - startup.dwXCountChars = 0x12121212; - startup.dwYCountChars = 0x23232323; - startup.dwX = 0x34343434; - startup.dwY = 0x45454545; - startup.dwXSize = 0x56565656; - startup.dwYSize = 0x67676767; - startup.dwFillAttribute = 0xA55A; - - get_file_name(resfile); - sprintf(buffer, "\"%s\" tests/process.c \"%s\"", selfname, resfile); - ok(CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info), "CreateProcess\n"); - /* wait for child to terminate */ - ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n"); - /* child process has changed result file, so let profile functions know about it */ - WritePrivateProfileStringA(NULL, NULL, NULL, resfile); - - okChildInt("StartupInfoA", "cb", startup.cb); - okChildString("StartupInfoA", "lpDesktop", startup.lpDesktop); - okChildString("StartupInfoA", "lpTitle", startup.lpTitle); - okChildInt("StartupInfoA", "dwX", startup.dwX); - okChildInt("StartupInfoA", "dwY", startup.dwY); - okChildInt("StartupInfoA", "dwXSize", startup.dwXSize); - okChildInt("StartupInfoA", "dwYSize", startup.dwYSize); - okChildInt("StartupInfoA", "dwXCountChars", startup.dwXCountChars); - okChildInt("StartupInfoA", "dwYCountChars", startup.dwYCountChars); - okChildInt("StartupInfoA", "dwFillAttribute", startup.dwFillAttribute); - okChildInt("StartupInfoA", "dwFlags", startup.dwFlags); - okChildInt("StartupInfoA", "wShowWindow", startup.wShowWindow); - release_memory(); - assert(DeleteFileA(resfile) != 0); - - /* not so simplistic now */ - memset(&startup, 0, sizeof(startup)); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW; - startup.wShowWindow = SW_SHOWNORMAL; - startup.lpTitle = NULL; - startup.lpDesktop = desktop; - startup.dwXCountChars = 0x12121212; - startup.dwYCountChars = 0x23232323; - startup.dwX = 0x34343434; - startup.dwY = 0x45454545; - startup.dwXSize = 0x56565656; - startup.dwYSize = 0x67676767; - startup.dwFillAttribute = 0xA55A; - - get_file_name(resfile); - sprintf(buffer, "\"%s\" tests/process.c \"%s\"", selfname, resfile); - ok(CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info), "CreateProcess\n"); - /* wait for child to terminate */ - ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n"); - /* child process has changed result file, so let profile functions know about it */ - WritePrivateProfileStringA(NULL, NULL, NULL, resfile); - - okChildInt("StartupInfoA", "cb", startup.cb); - okChildString("StartupInfoA", "lpDesktop", startup.lpDesktop); - result = getChildString( "StartupInfoA", "lpTitle" ); - ok( broken(!result) || (result && !strCmp( result, selfname, 0 )), - "expected '%s' or null, got '%s'\n", selfname, result ); - okChildInt("StartupInfoA", "dwX", startup.dwX); - okChildInt("StartupInfoA", "dwY", startup.dwY); - okChildInt("StartupInfoA", "dwXSize", startup.dwXSize); - okChildInt("StartupInfoA", "dwYSize", startup.dwYSize); - okChildInt("StartupInfoA", "dwXCountChars", startup.dwXCountChars); - okChildInt("StartupInfoA", "dwYCountChars", startup.dwYCountChars); - okChildInt("StartupInfoA", "dwFillAttribute", startup.dwFillAttribute); - okChildInt("StartupInfoA", "dwFlags", startup.dwFlags); - okChildInt("StartupInfoA", "wShowWindow", startup.wShowWindow); - release_memory(); - assert(DeleteFileA(resfile) != 0); - - /* not so simplistic now */ - memset(&startup, 0, sizeof(startup)); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW; - startup.wShowWindow = SW_SHOWNORMAL; - startup.lpTitle = empty; - startup.lpDesktop = desktop; - startup.dwXCountChars = 0x12121212; - startup.dwYCountChars = 0x23232323; - startup.dwX = 0x34343434; - startup.dwY = 0x45454545; - startup.dwXSize = 0x56565656; - startup.dwYSize = 0x67676767; - startup.dwFillAttribute = 0xA55A; - - get_file_name(resfile); - sprintf(buffer, "\"%s\" tests/process.c \"%s\"", selfname, resfile); - ok(CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info), "CreateProcess\n"); - /* wait for child to terminate */ - ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n"); - /* child process has changed result file, so let profile functions know about it */ - WritePrivateProfileStringA(NULL, NULL, NULL, resfile); - - okChildInt("StartupInfoA", "cb", startup.cb); - okChildString("StartupInfoA", "lpDesktop", startup.lpDesktop); - okChildString("StartupInfoA", "lpTitle", startup.lpTitle); - okChildInt("StartupInfoA", "dwX", startup.dwX); - okChildInt("StartupInfoA", "dwY", startup.dwY); - okChildInt("StartupInfoA", "dwXSize", startup.dwXSize); - okChildInt("StartupInfoA", "dwYSize", startup.dwYSize); - okChildInt("StartupInfoA", "dwXCountChars", startup.dwXCountChars); - okChildInt("StartupInfoA", "dwYCountChars", startup.dwYCountChars); - okChildInt("StartupInfoA", "dwFillAttribute", startup.dwFillAttribute); - okChildInt("StartupInfoA", "dwFlags", startup.dwFlags); - okChildInt("StartupInfoA", "wShowWindow", startup.wShowWindow); - release_memory(); - assert(DeleteFileA(resfile) != 0); - - /* not so simplistic now */ - memset(&startup, 0, sizeof(startup)); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW; - startup.wShowWindow = SW_SHOWNORMAL; - startup.lpTitle = empty; - startup.lpDesktop = empty; - startup.dwXCountChars = 0x12121212; - startup.dwYCountChars = 0x23232323; - startup.dwX = 0x34343434; - startup.dwY = 0x45454545; - startup.dwXSize = 0x56565656; - startup.dwYSize = 0x67676767; - startup.dwFillAttribute = 0xA55A; - - get_file_name(resfile); - sprintf(buffer, "\"%s\" tests/process.c \"%s\"", selfname, resfile); - ok(CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info), "CreateProcess\n"); - /* wait for child to terminate */ - ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n"); - /* child process has changed result file, so let profile functions know about it */ - WritePrivateProfileStringA(NULL, NULL, NULL, resfile); - - okChildInt("StartupInfoA", "cb", startup.cb); - okChildString("StartupInfoA", "lpDesktop", startup.lpDesktop); - okChildString("StartupInfoA", "lpTitle", startup.lpTitle); - okChildInt("StartupInfoA", "dwX", startup.dwX); - okChildInt("StartupInfoA", "dwY", startup.dwY); - okChildInt("StartupInfoA", "dwXSize", startup.dwXSize); - okChildInt("StartupInfoA", "dwYSize", startup.dwYSize); - okChildInt("StartupInfoA", "dwXCountChars", startup.dwXCountChars); - okChildInt("StartupInfoA", "dwYCountChars", startup.dwYCountChars); - okChildInt("StartupInfoA", "dwFillAttribute", startup.dwFillAttribute); - okChildInt("StartupInfoA", "dwFlags", startup.dwFlags); - okChildInt("StartupInfoA", "wShowWindow", startup.wShowWindow); - release_memory(); - assert(DeleteFileA(resfile) != 0); - - /* TODO: test for A/W and W/A and W/W */ -} - -static void test_CommandLine(void) -{ - char buffer[MAX_PATH], fullpath[MAX_PATH], *lpFilePart, *p; - char buffer2[MAX_PATH]; - PROCESS_INFORMATION info; - STARTUPINFOA startup; - BOOL ret; - - memset(&startup, 0, sizeof(startup)); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW; - startup.wShowWindow = SW_SHOWNORMAL; - - /* the basics */ - get_file_name(resfile); - sprintf(buffer, "\"%s\" tests/process.c \"%s\" \"C:\\Program Files\\my nice app.exe\"", selfname, resfile); - ok(CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info), "CreateProcess\n"); - /* wait for child to terminate */ - ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n"); - /* child process has changed result file, so let profile functions know about it */ - WritePrivateProfileStringA(NULL, NULL, NULL, resfile); - - okChildInt("Arguments", "argcA", 4); - okChildString("Arguments", "argvA3", "C:\\Program Files\\my nice app.exe"); - okChildString("Arguments", "argvA4", NULL); - okChildString("Arguments", "CommandLineA", buffer); - release_memory(); - assert(DeleteFileA(resfile) != 0); - - memset(&startup, 0, sizeof(startup)); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW; - startup.wShowWindow = SW_SHOWNORMAL; - - /* from François */ - get_file_name(resfile); - sprintf(buffer, "\"%s\" tests/process.c \"%s\" \"a\\\"b\\\\\" c\\\" d", selfname, resfile); - ok(CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info), "CreateProcess\n"); - /* wait for child to terminate */ - ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n"); - /* child process has changed result file, so let profile functions know about it */ - WritePrivateProfileStringA(NULL, NULL, NULL, resfile); - - okChildInt("Arguments", "argcA", 6); - okChildString("Arguments", "argvA3", "a\"b\\"); - okChildString("Arguments", "argvA4", "c\""); - okChildString("Arguments", "argvA5", "d"); - okChildString("Arguments", "argvA6", NULL); - okChildString("Arguments", "CommandLineA", buffer); - release_memory(); - assert(DeleteFileA(resfile) != 0); - - /* Test for Bug1330 to show that XP doesn't change '/' to '\\' in argv[0]*/ - get_file_name(resfile); - /* Use exename to avoid buffer containing things like 'C:' */ - sprintf(buffer, "./%s tests/process.c \"%s\" \"a\\\"b\\\\\" c\\\" d", exename, resfile); - SetLastError(0xdeadbeef); - ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info); - ok(ret, "CreateProcess (%s) failed : %d\n", buffer, GetLastError()); - /* wait for child to terminate */ - ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n"); - /* child process has changed result file, so let profile functions know about it */ - WritePrivateProfileStringA(NULL, NULL, NULL, resfile); - sprintf(buffer, "./%s", exename); - okChildString("Arguments", "argvA0", buffer); - release_memory(); - assert(DeleteFileA(resfile) != 0); - - get_file_name(resfile); - /* Use exename to avoid buffer containing things like 'C:' */ - sprintf(buffer, ".\\%s tests/process.c \"%s\" \"a\\\"b\\\\\" c\\\" d", exename, resfile); - SetLastError(0xdeadbeef); - ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info); - ok(ret, "CreateProcess (%s) failed : %d\n", buffer, GetLastError()); - /* wait for child to terminate */ - ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n"); - /* child process has changed result file, so let profile functions know about it */ - WritePrivateProfileStringA(NULL, NULL, NULL, resfile); - sprintf(buffer, ".\\%s", exename); - okChildString("Arguments", "argvA0", buffer); - release_memory(); - assert(DeleteFileA(resfile) != 0); - - get_file_name(resfile); - GetFullPathNameA(selfname, MAX_PATH, fullpath, &lpFilePart); - assert ( lpFilePart != 0); - *(lpFilePart -1 ) = 0; - p = strrchr(fullpath, '\\'); - /* Use exename to avoid buffer containing things like 'C:' */ - if (p) sprintf(buffer, "..%s/%s tests/process.c \"%s\" \"a\\\"b\\\\\" c\\\" d", p, exename, resfile); - else sprintf(buffer, "./%s tests/process.c \"%s\" \"a\\\"b\\\\\" c\\\" d", exename, resfile); - SetLastError(0xdeadbeef); - ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info); - ok(ret, "CreateProcess (%s) failed : %d\n", buffer, GetLastError()); - /* wait for child to terminate */ - ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n"); - /* child process has changed result file, so let profile functions know about it */ - WritePrivateProfileStringA(NULL, NULL, NULL, resfile); - if (p) sprintf(buffer, "..%s/%s", p, exename); - else sprintf(buffer, "./%s", exename); - okChildString("Arguments", "argvA0", buffer); - release_memory(); - assert(DeleteFileA(resfile) != 0); - - /* Using AppName */ - get_file_name(resfile); - GetFullPathNameA(selfname, MAX_PATH, fullpath, &lpFilePart); - assert ( lpFilePart != 0); - *(lpFilePart -1 ) = 0; - p = strrchr(fullpath, '\\'); - /* Use exename to avoid buffer containing things like 'C:' */ - if (p) sprintf(buffer, "..%s/%s", p, exename); - else sprintf(buffer, "./%s", exename); - sprintf(buffer2, "dummy tests/process.c \"%s\" \"a\\\"b\\\\\" c\\\" d", resfile); - SetLastError(0xdeadbeef); - ret = CreateProcessA(buffer, buffer2, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info); - ok(ret, "CreateProcess (%s) failed : %d\n", buffer, GetLastError()); - /* wait for child to terminate */ - ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n"); - /* child process has changed result file, so let profile functions know about it */ - WritePrivateProfileStringA(NULL, NULL, NULL, resfile); - sprintf(buffer, "tests/process.c %s", resfile); - okChildString("Arguments", "argvA0", "dummy"); - okChildString("Arguments", "CommandLineA", buffer2); - okChildStringWA("Arguments", "CommandLineW", buffer2); - release_memory(); - assert(DeleteFileA(resfile) != 0); - - if (0) /* Test crashes on NT-based Windows. */ - { - /* Test NULL application name and command line parameters. */ - SetLastError(0xdeadbeef); - ret = CreateProcessA(NULL, NULL, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info); - ok(!ret, "CreateProcessA unexpectedly succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - } - - buffer[0] = '\0'; - - /* Test empty application name parameter. */ - SetLastError(0xdeadbeef); - ret = CreateProcessA(buffer, NULL, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info); - ok(!ret, "CreateProcessA unexpectedly succeeded\n"); - ok(GetLastError() == ERROR_PATH_NOT_FOUND || - broken(GetLastError() == ERROR_FILE_NOT_FOUND) /* Win9x/WinME */ || - broken(GetLastError() == ERROR_ACCESS_DENIED) /* Win98 */, - "Expected ERROR_PATH_NOT_FOUND, got %d\n", GetLastError()); - - buffer2[0] = '\0'; - - /* Test empty application name and command line parameters. */ - SetLastError(0xdeadbeef); - ret = CreateProcessA(buffer, buffer2, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info); - ok(!ret, "CreateProcessA unexpectedly succeeded\n"); - ok(GetLastError() == ERROR_PATH_NOT_FOUND || - broken(GetLastError() == ERROR_FILE_NOT_FOUND) /* Win9x/WinME */ || - broken(GetLastError() == ERROR_ACCESS_DENIED) /* Win98 */, - "Expected ERROR_PATH_NOT_FOUND, got %d\n", GetLastError()); - - /* Test empty command line parameter. */ - SetLastError(0xdeadbeef); - ret = CreateProcessA(NULL, buffer2, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info); - ok(!ret, "CreateProcessA unexpectedly succeeded\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND || - GetLastError() == ERROR_PATH_NOT_FOUND /* NT4 */ || - GetLastError() == ERROR_BAD_PATHNAME /* Win98 */ || - GetLastError() == ERROR_INVALID_PARAMETER /* Win7 */, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - - strcpy(buffer, "doesnotexist.exe"); - strcpy(buffer2, "does not exist.exe"); - - /* Test nonexistent application name. */ - SetLastError(0xdeadbeef); - ret = CreateProcessA(buffer, NULL, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info); - ok(!ret, "CreateProcessA unexpectedly succeeded\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = CreateProcessA(buffer2, NULL, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info); - ok(!ret, "CreateProcessA unexpectedly succeeded\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - - /* Test nonexistent command line parameter. */ - SetLastError(0xdeadbeef); - ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info); - ok(!ret, "CreateProcessA unexpectedly succeeded\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = CreateProcessA(NULL, buffer2, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info); - ok(!ret, "CreateProcessA unexpectedly succeeded\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); -} - -static void test_Directory(void) -{ - char buffer[MAX_PATH]; - PROCESS_INFORMATION info; - STARTUPINFOA startup; - char windir[MAX_PATH]; - static CHAR cmdline[] = "winver.exe"; - - memset(&startup, 0, sizeof(startup)); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW; - startup.wShowWindow = SW_SHOWNORMAL; - - /* the basics */ - get_file_name(resfile); - sprintf(buffer, "\"%s\" tests/process.c \"%s\"", selfname, resfile); - GetWindowsDirectoryA( windir, sizeof(windir) ); - ok(CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, windir, &startup, &info), "CreateProcess\n"); - /* wait for child to terminate */ - ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n"); - /* child process has changed result file, so let profile functions know about it */ - WritePrivateProfileStringA(NULL, NULL, NULL, resfile); - - okChildIString("Misc", "CurrDirA", windir); - release_memory(); - assert(DeleteFileA(resfile) != 0); - - /* search PATH for the exe if directory is NULL */ - ok(CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info), "CreateProcess\n"); - ok(TerminateProcess(info.hProcess, 0), "Child process termination\n"); - - /* if any directory is provided, don't search PATH, error on bad directory */ - SetLastError(0xdeadbeef); - memset(&info, 0, sizeof(info)); - ok(!CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, 0L, - NULL, "non\\existent\\directory", &startup, &info), "CreateProcess\n"); - ok(GetLastError() == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", GetLastError()); - ok(!TerminateProcess(info.hProcess, 0), "Child process should not exist\n"); -} - -static BOOL is_str_env_drive_dir(const char* str) -{ - return str[0] == '=' && str[1] >= 'A' && str[1] <= 'Z' && str[2] == ':' && - str[3] == '=' && str[4] == str[1]; -} - -/* compared expected child's environment (in gesA) from actual - * environment our child got - */ -static void cmpEnvironment(const char* gesA) -{ - int i, clen; - const char* ptrA; - char* res; - char key[32]; - BOOL found; - - clen = GetPrivateProfileIntA("EnvironmentA", "len", 0, resfile); - - /* now look each parent env in child */ - if ((ptrA = gesA) != NULL) - { - while (*ptrA) - { - for (i = 0; i < clen; i++) - { - sprintf(key, "env%d", i); - res = getChildString("EnvironmentA", key); - if (strncmp(ptrA, res, MAX_LISTED_ENV_VAR - 1) == 0) - break; - } - found = i < clen; - ok(found, "Parent-env string %s isn't in child process\n", ptrA); - - ptrA += strlen(ptrA) + 1; - release_memory(); - } - } - /* and each child env in parent */ - for (i = 0; i < clen; i++) - { - sprintf(key, "env%d", i); - res = getChildString("EnvironmentA", key); - if ((ptrA = gesA) != NULL) - { - while (*ptrA) - { - if (strncmp(res, ptrA, MAX_LISTED_ENV_VAR - 1) == 0) - break; - ptrA += strlen(ptrA) + 1; - } - if (!*ptrA) ptrA = NULL; - } - - if (!is_str_env_drive_dir(res)) - { - found = ptrA != NULL; - ok(found, "Child-env string %s isn't in parent process\n", res); - } - /* else => should also test we get the right per drive default directory here... */ - } -} - -static void test_Environment(void) -{ - char buffer[MAX_PATH]; - PROCESS_INFORMATION info; - STARTUPINFOA startup; - char *child_env; - int child_env_len; - char *ptr; - char *ptr2; - char *env; - int slen; - - memset(&startup, 0, sizeof(startup)); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW; - startup.wShowWindow = SW_SHOWNORMAL; - - /* the basics */ - get_file_name(resfile); - sprintf(buffer, "\"%s\" tests/process.c \"%s\"", selfname, resfile); - ok(CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info), "CreateProcess\n"); - /* wait for child to terminate */ - ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n"); - /* child process has changed result file, so let profile functions know about it */ - WritePrivateProfileStringA(NULL, NULL, NULL, resfile); - - env = GetEnvironmentStringsA(); - cmpEnvironment(env); - release_memory(); - assert(DeleteFileA(resfile) != 0); - - memset(&startup, 0, sizeof(startup)); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW; - startup.wShowWindow = SW_SHOWNORMAL; - - /* the basics */ - get_file_name(resfile); - sprintf(buffer, "\"%s\" tests/process.c \"%s\"", selfname, resfile); - - child_env_len = 0; - ptr = env; - while(*ptr) - { - slen = strlen(ptr)+1; - child_env_len += slen; - ptr += slen; - } - /* Add space for additional environment variables */ - child_env_len += 256; - child_env = HeapAlloc(GetProcessHeap(), 0, child_env_len); - - ptr = child_env; - sprintf(ptr, "=%c:=%s", 'C', "C:\\FOO\\BAR"); - ptr += strlen(ptr) + 1; - strcpy(ptr, "PATH=C:\\WINDOWS;C:\\WINDOWS\\SYSTEM;C:\\MY\\OWN\\DIR"); - ptr += strlen(ptr) + 1; - strcpy(ptr, "FOO=BAR"); - ptr += strlen(ptr) + 1; - strcpy(ptr, "BAR=FOOBAR"); - ptr += strlen(ptr) + 1; - /* copy all existing variables except: - * - WINELOADER - * - PATH (already set above) - * - the directory definitions (=[A-Z]:=) - */ - for (ptr2 = env; *ptr2; ptr2 += strlen(ptr2) + 1) - { - if (strncmp(ptr2, "PATH=", 5) != 0 && - strncmp(ptr2, "WINELOADER=", 11) != 0 && - !is_str_env_drive_dir(ptr2)) - { - strcpy(ptr, ptr2); - ptr += strlen(ptr) + 1; - } - } - *ptr = '\0'; - ok(CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, child_env, NULL, &startup, &info), "CreateProcess\n"); - /* wait for child to terminate */ - ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n"); - /* child process has changed result file, so let profile functions know about it */ - WritePrivateProfileStringA(NULL, NULL, NULL, resfile); - - cmpEnvironment(child_env); - - HeapFree(GetProcessHeap(), 0, child_env); - FreeEnvironmentStringsA(env); - release_memory(); - assert(DeleteFileA(resfile) != 0); -} - -static void test_SuspendFlag(void) -{ - char buffer[MAX_PATH]; - PROCESS_INFORMATION info; - STARTUPINFOA startup, us; - DWORD exit_status; - char *result; - - /* let's start simplistic */ - memset(&startup, 0, sizeof(startup)); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW; - startup.wShowWindow = SW_SHOWNORMAL; - - get_file_name(resfile); - sprintf(buffer, "\"%s\" tests/process.c \"%s\"", selfname, resfile); - ok(CreateProcessA(NULL, buffer, NULL, NULL, FALSE, CREATE_SUSPENDED, NULL, NULL, &startup, &info), "CreateProcess\n"); - - ok(GetExitCodeThread(info.hThread, &exit_status) && exit_status == STILL_ACTIVE, "thread still running\n"); - Sleep(8000); - ok(GetExitCodeThread(info.hThread, &exit_status) && exit_status == STILL_ACTIVE, "thread still running\n"); - ok(ResumeThread(info.hThread) == 1, "Resuming thread\n"); - - /* wait for child to terminate */ - ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n"); - /* child process has changed result file, so let profile functions know about it */ - WritePrivateProfileStringA(NULL, NULL, NULL, resfile); - - GetStartupInfoA(&us); - - okChildInt("StartupInfoA", "cb", startup.cb); - okChildString("StartupInfoA", "lpDesktop", us.lpDesktop); - result = getChildString( "StartupInfoA", "lpTitle" ); - ok( broken(!result) || (result && !strCmp( result, selfname, 0 )), - "expected '%s' or null, got '%s'\n", selfname, result ); - okChildInt("StartupInfoA", "dwX", startup.dwX); - okChildInt("StartupInfoA", "dwY", startup.dwY); - okChildInt("StartupInfoA", "dwXSize", startup.dwXSize); - okChildInt("StartupInfoA", "dwYSize", startup.dwYSize); - okChildInt("StartupInfoA", "dwXCountChars", startup.dwXCountChars); - okChildInt("StartupInfoA", "dwYCountChars", startup.dwYCountChars); - okChildInt("StartupInfoA", "dwFillAttribute", startup.dwFillAttribute); - okChildInt("StartupInfoA", "dwFlags", startup.dwFlags); - okChildInt("StartupInfoA", "wShowWindow", startup.wShowWindow); - release_memory(); - assert(DeleteFileA(resfile) != 0); -} - -static void test_DebuggingFlag(void) -{ - char buffer[MAX_PATH]; - void *processbase = NULL; - PROCESS_INFORMATION info; - STARTUPINFOA startup, us; - DEBUG_EVENT de; - unsigned dbg = 0; - char *result; - - /* let's start simplistic */ - memset(&startup, 0, sizeof(startup)); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW; - startup.wShowWindow = SW_SHOWNORMAL; - - get_file_name(resfile); - sprintf(buffer, "\"%s\" tests/process.c \"%s\"", selfname, resfile); - ok(CreateProcessA(NULL, buffer, NULL, NULL, FALSE, DEBUG_PROCESS, NULL, NULL, &startup, &info), "CreateProcess\n"); - - /* get all startup events up to the entry point break exception */ - do - { - ok(WaitForDebugEvent(&de, INFINITE), "reading debug event\n"); - ContinueDebugEvent(de.dwProcessId, de.dwThreadId, DBG_CONTINUE); - if (!dbg) - { - ok(de.dwDebugEventCode == CREATE_PROCESS_DEBUG_EVENT, - "first event: %d\n", de.dwDebugEventCode); - processbase = de.u.CreateProcessInfo.lpBaseOfImage; - } - if (de.dwDebugEventCode != EXCEPTION_DEBUG_EVENT) dbg++; - ok(de.dwDebugEventCode != LOAD_DLL_DEBUG_EVENT || - de.u.LoadDll.lpBaseOfDll != processbase, "got LOAD_DLL for main module\n"); - } while (de.dwDebugEventCode != EXIT_PROCESS_DEBUG_EVENT); - - ok(dbg, "I have seen a debug event\n"); - /* wait for child to terminate */ - ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n"); - /* child process has changed result file, so let profile functions know about it */ - WritePrivateProfileStringA(NULL, NULL, NULL, resfile); - - GetStartupInfoA(&us); - - okChildInt("StartupInfoA", "cb", startup.cb); - okChildString("StartupInfoA", "lpDesktop", us.lpDesktop); - result = getChildString( "StartupInfoA", "lpTitle" ); - ok( broken(!result) || (result && !strCmp( result, selfname, 0 )), - "expected '%s' or null, got '%s'\n", selfname, result ); - okChildInt("StartupInfoA", "dwX", startup.dwX); - okChildInt("StartupInfoA", "dwY", startup.dwY); - okChildInt("StartupInfoA", "dwXSize", startup.dwXSize); - okChildInt("StartupInfoA", "dwYSize", startup.dwYSize); - okChildInt("StartupInfoA", "dwXCountChars", startup.dwXCountChars); - okChildInt("StartupInfoA", "dwYCountChars", startup.dwYCountChars); - okChildInt("StartupInfoA", "dwFillAttribute", startup.dwFillAttribute); - okChildInt("StartupInfoA", "dwFlags", startup.dwFlags); - okChildInt("StartupInfoA", "wShowWindow", startup.wShowWindow); - release_memory(); - assert(DeleteFileA(resfile) != 0); -} - -static BOOL is_console(HANDLE h) -{ - return h != INVALID_HANDLE_VALUE && ((ULONG_PTR)h & 3) == 3; -} - -static void test_Console(void) -{ - char buffer[MAX_PATH]; - PROCESS_INFORMATION info; - STARTUPINFOA startup, us; - SECURITY_ATTRIBUTES sa; - CONSOLE_SCREEN_BUFFER_INFO sbi, sbiC; - DWORD modeIn, modeOut, modeInC, modeOutC; - DWORD cpIn, cpOut, cpInC, cpOutC; - DWORD w; - HANDLE hChildIn, hChildInInh, hChildOut, hChildOutInh, hParentIn, hParentOut; - const char* msg = "This is a std-handle inheritance test."; - unsigned msg_len; - BOOL run_tests = TRUE; - char *result; - - memset(&startup, 0, sizeof(startup)); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW|STARTF_USESTDHANDLES; - startup.wShowWindow = SW_SHOWNORMAL; - - sa.nLength = sizeof(sa); - sa.lpSecurityDescriptor = NULL; - sa.bInheritHandle = TRUE; - - startup.hStdInput = CreateFileA("CONIN$", GENERIC_READ|GENERIC_WRITE, 0, &sa, OPEN_EXISTING, 0, 0); - startup.hStdOutput = CreateFileA("CONOUT$", GENERIC_READ|GENERIC_WRITE, 0, &sa, OPEN_EXISTING, 0, 0); - - /* first, we need to be sure we're attached to a console */ - if (!is_console(startup.hStdInput) || !is_console(startup.hStdOutput)) - { - /* we're not attached to a console, let's do it */ - AllocConsole(); - startup.hStdInput = CreateFileA("CONIN$", GENERIC_READ|GENERIC_WRITE, 0, &sa, OPEN_EXISTING, 0, 0); - startup.hStdOutput = CreateFileA("CONOUT$", GENERIC_READ|GENERIC_WRITE, 0, &sa, OPEN_EXISTING, 0, 0); - } - /* now verify everything's ok */ - ok(startup.hStdInput != INVALID_HANDLE_VALUE, "Opening ConIn\n"); - ok(startup.hStdOutput != INVALID_HANDLE_VALUE, "Opening ConOut\n"); - startup.hStdError = startup.hStdOutput; - - ok(GetConsoleScreenBufferInfo(startup.hStdOutput, &sbi), "Getting sb info\n"); - ok(GetConsoleMode(startup.hStdInput, &modeIn) && - GetConsoleMode(startup.hStdOutput, &modeOut), "Getting console modes\n"); - cpIn = GetConsoleCP(); - cpOut = GetConsoleOutputCP(); - - get_file_name(resfile); - sprintf(buffer, "\"%s\" tests/process.c \"%s\" console", selfname, resfile); - ok(CreateProcessA(NULL, buffer, NULL, NULL, TRUE, 0, NULL, NULL, &startup, &info), "CreateProcess\n"); - - /* wait for child to terminate */ - ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n"); - /* child process has changed result file, so let profile functions know about it */ - WritePrivateProfileStringA(NULL, NULL, NULL, resfile); - - /* now get the modification the child has made, and resets parents expected values */ - ok(GetConsoleScreenBufferInfo(startup.hStdOutput, &sbiC), "Getting sb info\n"); - ok(GetConsoleMode(startup.hStdInput, &modeInC) && - GetConsoleMode(startup.hStdOutput, &modeOutC), "Getting console modes\n"); - - SetConsoleMode(startup.hStdInput, modeIn); - SetConsoleMode(startup.hStdOutput, modeOut); - - cpInC = GetConsoleCP(); - cpOutC = GetConsoleOutputCP(); - - /* Try to set invalid CP */ - SetLastError(0xdeadbeef); - ok(!SetConsoleCP(0), "Shouldn't succeed\n"); - ok(GetLastError()==ERROR_INVALID_PARAMETER || - broken(GetLastError() == ERROR_CALL_NOT_IMPLEMENTED), /* win9x */ - "GetLastError: expecting %u got %u\n", - ERROR_INVALID_PARAMETER, GetLastError()); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - run_tests = FALSE; - - - SetLastError(0xdeadbeef); - ok(!SetConsoleOutputCP(0), "Shouldn't succeed\n"); - ok(GetLastError()==ERROR_INVALID_PARAMETER || - broken(GetLastError() == ERROR_CALL_NOT_IMPLEMENTED), /* win9x */ - "GetLastError: expecting %u got %u\n", - ERROR_INVALID_PARAMETER, GetLastError()); - - SetConsoleCP(cpIn); - SetConsoleOutputCP(cpOut); - - GetStartupInfoA(&us); - - okChildInt("StartupInfoA", "cb", startup.cb); - okChildString("StartupInfoA", "lpDesktop", us.lpDesktop); - result = getChildString( "StartupInfoA", "lpTitle" ); - ok( broken(!result) || (result && !strCmp( result, selfname, 0 )), - "expected '%s' or null, got '%s'\n", selfname, result ); - okChildInt("StartupInfoA", "dwX", startup.dwX); - okChildInt("StartupInfoA", "dwY", startup.dwY); - okChildInt("StartupInfoA", "dwXSize", startup.dwXSize); - okChildInt("StartupInfoA", "dwYSize", startup.dwYSize); - okChildInt("StartupInfoA", "dwXCountChars", startup.dwXCountChars); - okChildInt("StartupInfoA", "dwYCountChars", startup.dwYCountChars); - okChildInt("StartupInfoA", "dwFillAttribute", startup.dwFillAttribute); - okChildInt("StartupInfoA", "dwFlags", startup.dwFlags); - okChildInt("StartupInfoA", "wShowWindow", startup.wShowWindow); - - /* check child correctly inherited the console */ - okChildInt("StartupInfoA", "hStdInput", (DWORD_PTR)startup.hStdInput); - okChildInt("StartupInfoA", "hStdOutput", (DWORD_PTR)startup.hStdOutput); - okChildInt("StartupInfoA", "hStdError", (DWORD_PTR)startup.hStdError); - okChildInt("Console", "SizeX", (DWORD)sbi.dwSize.X); - okChildInt("Console", "SizeY", (DWORD)sbi.dwSize.Y); - okChildInt("Console", "CursorX", (DWORD)sbi.dwCursorPosition.X); - okChildInt("Console", "CursorY", (DWORD)sbi.dwCursorPosition.Y); - okChildInt("Console", "Attributes", sbi.wAttributes); - okChildInt("Console", "winLeft", (DWORD)sbi.srWindow.Left); - okChildInt("Console", "winTop", (DWORD)sbi.srWindow.Top); - okChildInt("Console", "winRight", (DWORD)sbi.srWindow.Right); - okChildInt("Console", "winBottom", (DWORD)sbi.srWindow.Bottom); - okChildInt("Console", "maxWinWidth", (DWORD)sbi.dwMaximumWindowSize.X); - okChildInt("Console", "maxWinHeight", (DWORD)sbi.dwMaximumWindowSize.Y); - okChildInt("Console", "InputCP", cpIn); - okChildInt("Console", "OutputCP", cpOut); - okChildInt("Console", "InputMode", modeIn); - okChildInt("Console", "OutputMode", modeOut); - - if (run_tests) - { - ok(cpInC == 1252, "Wrong console CP (expected 1252 got %d/%d)\n", cpInC, cpIn); - ok(cpOutC == 1252, "Wrong console-SB CP (expected 1252 got %d/%d)\n", cpOutC, cpOut); - } - else - win_skip("Setting the codepage is not implemented\n"); - - ok(modeInC == (modeIn ^ 1), "Wrong console mode\n"); - ok(modeOutC == (modeOut ^ 1), "Wrong console-SB mode\n"); - trace("cursor position(X): %d/%d\n",sbi.dwCursorPosition.X, sbiC.dwCursorPosition.X); - ok(sbiC.dwCursorPosition.Y == (sbi.dwCursorPosition.Y ^ 1), "Wrong cursor position\n"); - - release_memory(); - assert(DeleteFileA(resfile) != 0); - - ok(CreatePipe(&hParentIn, &hChildOut, NULL, 0), "Creating parent-input pipe\n"); - ok(DuplicateHandle(GetCurrentProcess(), hChildOut, GetCurrentProcess(), - &hChildOutInh, 0, TRUE, DUPLICATE_SAME_ACCESS), - "Duplicating as inheritable child-output pipe\n"); - CloseHandle(hChildOut); - - ok(CreatePipe(&hChildIn, &hParentOut, NULL, 0), "Creating parent-output pipe\n"); - ok(DuplicateHandle(GetCurrentProcess(), hChildIn, GetCurrentProcess(), - &hChildInInh, 0, TRUE, DUPLICATE_SAME_ACCESS), - "Duplicating as inheritable child-input pipe\n"); - CloseHandle(hChildIn); - - memset(&startup, 0, sizeof(startup)); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW|STARTF_USESTDHANDLES; - startup.wShowWindow = SW_SHOWNORMAL; - startup.hStdInput = hChildInInh; - startup.hStdOutput = hChildOutInh; - startup.hStdError = hChildOutInh; - - get_file_name(resfile); - sprintf(buffer, "\"%s\" tests/process.c \"%s\" stdhandle", selfname, resfile); - ok(CreateProcessA(NULL, buffer, NULL, NULL, TRUE, DETACHED_PROCESS, NULL, NULL, &startup, &info), "CreateProcess\n"); - ok(CloseHandle(hChildInInh), "Closing handle\n"); - ok(CloseHandle(hChildOutInh), "Closing handle\n"); - - msg_len = strlen(msg) + 1; - ok(WriteFile(hParentOut, msg, msg_len, &w, NULL), "Writing to child\n"); - ok(w == msg_len, "Should have written %u bytes, actually wrote %u\n", msg_len, w); - memset(buffer, 0, sizeof(buffer)); - ok(ReadFile(hParentIn, buffer, sizeof(buffer), &w, NULL), "Reading from child\n"); - ok(strcmp(buffer, msg) == 0, "Should have received '%s'\n", msg); - - /* wait for child to terminate */ - ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n"); - /* child process has changed result file, so let profile functions know about it */ - WritePrivateProfileStringA(NULL, NULL, NULL, resfile); - - okChildString("StdHandle", "msg", msg); - - release_memory(); - assert(DeleteFileA(resfile) != 0); -} - -static void test_ExitCode(void) -{ - char buffer[MAX_PATH]; - PROCESS_INFORMATION info; - STARTUPINFOA startup; - DWORD code; - - /* let's start simplistic */ - memset(&startup, 0, sizeof(startup)); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW; - startup.wShowWindow = SW_SHOWNORMAL; - - get_file_name(resfile); - sprintf(buffer, "\"%s\" tests/process.c \"%s\" exit_code", selfname, resfile); - ok(CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &startup, &info), "CreateProcess\n"); - - /* wait for child to terminate */ - ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n"); - /* child process has changed result file, so let profile functions know about it */ - WritePrivateProfileStringA(NULL, NULL, NULL, resfile); - - ok(GetExitCodeProcess(info.hProcess, &code), "Getting exit code\n"); - okChildInt("ExitCode", "value", code); - - release_memory(); - assert(DeleteFileA(resfile) != 0); -} - -static void test_OpenProcess(void) -{ - HANDLE hproc; - void *addr1; - MEMORY_BASIC_INFORMATION info; - SIZE_T dummy, read_bytes; - BOOL ret; - - /* not exported in all windows versions */ - if ((!pVirtualAllocEx) || (!pVirtualFreeEx)) { - win_skip("VirtualAllocEx not found\n"); - return; - } - - /* without PROCESS_VM_OPERATION */ - hproc = OpenProcess(PROCESS_ALL_ACCESS & ~PROCESS_VM_OPERATION, FALSE, GetCurrentProcessId()); - ok(hproc != NULL, "OpenProcess error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - addr1 = pVirtualAllocEx(hproc, 0, 0xFFFC, MEM_RESERVE, PAGE_NOACCESS); - ok(!addr1, "VirtualAllocEx should fail\n"); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { /* Win9x */ - CloseHandle(hproc); - win_skip("VirtualAllocEx not implemented\n"); - return; - } - ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %d\n", GetLastError()); - - read_bytes = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = ReadProcessMemory(hproc, test_OpenProcess, &dummy, sizeof(dummy), &read_bytes); - ok(ret, "ReadProcessMemory error %d\n", GetLastError()); - ok(read_bytes == sizeof(dummy), "wrong read bytes %ld\n", read_bytes); - - CloseHandle(hproc); - - hproc = OpenProcess(PROCESS_VM_OPERATION, FALSE, GetCurrentProcessId()); - ok(hproc != NULL, "OpenProcess error %d\n", GetLastError()); - - addr1 = pVirtualAllocEx(hproc, 0, 0xFFFC, MEM_RESERVE, PAGE_NOACCESS); - ok(addr1 != NULL, "VirtualAllocEx error %d\n", GetLastError()); - - /* without PROCESS_QUERY_INFORMATION */ - SetLastError(0xdeadbeef); - ok(!VirtualQueryEx(hproc, addr1, &info, sizeof(info)), - "VirtualQueryEx without PROCESS_QUERY_INFORMATION rights should fail\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %d\n", GetLastError()); - - /* without PROCESS_VM_READ */ - read_bytes = 0xdeadbeef; - SetLastError(0xdeadbeef); - ok(!ReadProcessMemory(hproc, addr1, &dummy, sizeof(dummy), &read_bytes), - "ReadProcessMemory without PROCESS_VM_READ rights should fail\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %d\n", GetLastError()); - ok(read_bytes == 0, "wrong read bytes %ld\n", read_bytes); - - CloseHandle(hproc); - - hproc = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, GetCurrentProcessId()); - - memset(&info, 0xcc, sizeof(info)); - read_bytes = VirtualQueryEx(hproc, addr1, &info, sizeof(info)); - ok(read_bytes == sizeof(info), "VirtualQueryEx error %d\n", GetLastError()); - - ok(info.BaseAddress == addr1, "%p != %p\n", info.BaseAddress, addr1); - ok(info.AllocationBase == addr1, "%p != %p\n", info.AllocationBase, addr1); - ok(info.AllocationProtect == PAGE_NOACCESS, "%x != PAGE_NOACCESS\n", info.AllocationProtect); - ok(info.RegionSize == 0x10000, "%lx != 0x10000\n", info.RegionSize); - ok(info.State == MEM_RESERVE, "%x != MEM_RESERVE\n", info.State); - /* NT reports Protect == 0 for a not committed memory block */ - ok(info.Protect == 0 /* NT */ || - info.Protect == PAGE_NOACCESS, /* Win9x */ - "%x != PAGE_NOACCESS\n", info.Protect); - ok(info.Type == MEM_PRIVATE, "%x != MEM_PRIVATE\n", info.Type); - - SetLastError(0xdeadbeef); - ok(!pVirtualFreeEx(hproc, addr1, 0, MEM_RELEASE), - "VirtualFreeEx without PROCESS_VM_OPERATION rights should fail\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %d\n", GetLastError()); - - CloseHandle(hproc); - - ok(VirtualFree(addr1, 0, MEM_RELEASE), "VirtualFree failed\n"); -} - -static void test_GetProcessVersion(void) -{ - static char cmdline[] = "winver.exe"; - PROCESS_INFORMATION pi; - STARTUPINFOA si; - DWORD ret; - - SetLastError(0xdeadbeef); - ret = GetProcessVersion(0); - ok(ret, "GetProcessVersion error %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = GetProcessVersion(GetCurrentProcessId()); - ok(ret, "GetProcessVersion error %u\n", GetLastError()); - - memset(&si, 0, sizeof(si)); - si.cb = sizeof(si); - si.dwFlags = STARTF_USESHOWWINDOW; - si.wShowWindow = SW_HIDE; - ret = CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - SetLastError(0xdeadbeef); - ok(ret, "CreateProcess error %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = GetProcessVersion(pi.dwProcessId); - ok(ret, "GetProcessVersion error %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = TerminateProcess(pi.hProcess, 0); - ok(ret, "TerminateProcess error %u\n", GetLastError()); - - CloseHandle(pi.hProcess); - CloseHandle(pi.hThread); -} - -static void test_ProcessNameA(void) -{ -#define INIT_STR "Just some words" - DWORD length, size; - CHAR buf[1024]; - - if (!pQueryFullProcessImageNameA) - { - win_skip("QueryFullProcessImageNameA unavailable (added in Windows Vista)\n"); - return; - } - /* get the buffer length without \0 terminator */ - length = 1024; - expect_eq_d(TRUE, pQueryFullProcessImageNameA(GetCurrentProcess(), 0, buf, &length)); - expect_eq_d(length, lstrlenA(buf)); - - /* when the buffer is too small - * - function fail with error ERROR_INSUFFICIENT_BUFFER - * - the size variable is not modified - * tested with the biggest too small size - */ - size = length; - sprintf(buf,INIT_STR); - expect_eq_d(FALSE, pQueryFullProcessImageNameA(GetCurrentProcess(), 0, buf, &size)); - expect_eq_d(ERROR_INSUFFICIENT_BUFFER, GetLastError()); - expect_eq_d(length, size); - expect_eq_s(INIT_STR, buf); - - /* retest with smaller buffer size - */ - size = 4; - sprintf(buf,INIT_STR); - expect_eq_d(FALSE, pQueryFullProcessImageNameA(GetCurrentProcess(), 0, buf, &size)); - expect_eq_d(ERROR_INSUFFICIENT_BUFFER, GetLastError()); - expect_eq_d(4, size); - expect_eq_s(INIT_STR, buf); - - /* this is a difference between the ascii and the unicode version - * the unicode version crashes when the size is big enough to hold the result - * ascii version through an error - */ - size = 1024; - expect_eq_d(FALSE, pQueryFullProcessImageNameA(GetCurrentProcess(), 0, NULL, &size)); - expect_eq_d(1024, size); - expect_eq_d(ERROR_INVALID_PARAMETER, GetLastError()); -} - -static void test_ProcessName(void) -{ - HANDLE hSelf; - WCHAR module_name[1024]; - WCHAR deviceW[] = {'\\','D', 'e','v','i','c','e',0}; - WCHAR buf[1024]; - DWORD size; - - if (!pQueryFullProcessImageNameW) - { - win_skip("QueryFullProcessImageNameW unavailable (added in Windows Vista)\n"); - return; - } - - ok(GetModuleFileNameW(NULL, module_name, 1024), "GetModuleFileNameW(NULL, ...) failed\n"); - - /* GetCurrentProcess pseudo-handle */ - size = sizeof(buf) / sizeof(buf[0]); - expect_eq_d(TRUE, pQueryFullProcessImageNameW(GetCurrentProcess(), 0, buf, &size)); - expect_eq_d(lstrlenW(buf), size); - expect_eq_ws_i(buf, module_name); - - hSelf = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, GetCurrentProcessId()); - /* Real handle */ - size = sizeof(buf) / sizeof(buf[0]); - expect_eq_d(TRUE, pQueryFullProcessImageNameW(hSelf, 0, buf, &size)); - expect_eq_d(lstrlenW(buf), size); - expect_eq_ws_i(buf, module_name); - - /* Buffer too small */ - size = lstrlenW(module_name)/2; - lstrcpyW(buf, deviceW); - SetLastError(0xdeadbeef); - expect_eq_d(FALSE, pQueryFullProcessImageNameW(hSelf, 0, buf, &size)); - expect_eq_d(lstrlenW(module_name)/2, size); /* size not changed(!) */ - expect_eq_d(ERROR_INSUFFICIENT_BUFFER, GetLastError()); - expect_eq_ws_i(deviceW, buf); /* buffer not changed */ - - /* Too small - not space for NUL terminator */ - size = lstrlenW(module_name); - SetLastError(0xdeadbeef); - expect_eq_d(FALSE, pQueryFullProcessImageNameW(hSelf, 0, buf, &size)); - expect_eq_d(lstrlenW(module_name), size); /* size not changed(!) */ - expect_eq_d(ERROR_INSUFFICIENT_BUFFER, GetLastError()); - - /* NULL buffer */ - size = 0; - expect_eq_d(FALSE, pQueryFullProcessImageNameW(hSelf, 0, NULL, &size)); - expect_eq_d(0, size); - expect_eq_d(ERROR_INSUFFICIENT_BUFFER, GetLastError()); - - /* native path */ - size = sizeof(buf) / sizeof(buf[0]); - expect_eq_d(TRUE, pQueryFullProcessImageNameW(hSelf, PROCESS_NAME_NATIVE, buf, &size)); - expect_eq_d(lstrlenW(buf), size); - ok(buf[0] == '\\', "NT path should begin with '\\'\n"); - todo_wine ok(memcmp(buf, deviceW, sizeof(WCHAR)*lstrlenW(deviceW)) == 0, "NT path should begin with \\Device\n"); - - /* Buffer too small */ - size = lstrlenW(module_name)/2; - SetLastError(0xdeadbeef); - lstrcpyW(buf, module_name); - expect_eq_d(FALSE, pQueryFullProcessImageNameW(hSelf, 0, buf, &size)); - expect_eq_d(lstrlenW(module_name)/2, size); /* size not changed(!) */ - expect_eq_d(ERROR_INSUFFICIENT_BUFFER, GetLastError()); - expect_eq_ws_i(module_name, buf); /* buffer not changed */ - - CloseHandle(hSelf); -} - -static void test_Handles(void) -{ - HANDLE handle = GetCurrentProcess(); - HANDLE h2, h3; - BOOL ret; - DWORD code; - - ok( handle == (HANDLE)~(ULONG_PTR)0 || - handle == (HANDLE)(ULONG_PTR)0x7fffffff /* win9x */, - "invalid current process handle %p\n", handle ); - ret = GetExitCodeProcess( handle, &code ); - ok( ret, "GetExitCodeProcess failed err %u\n", GetLastError() ); -#ifdef _WIN64 - /* truncated handle */ - SetLastError( 0xdeadbeef ); - handle = (HANDLE)((ULONG_PTR)handle & ~0u); - ret = GetExitCodeProcess( handle, &code ); - ok( !ret, "GetExitCodeProcess succeeded for %p\n", handle ); - ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError() ); - /* sign-extended handle */ - SetLastError( 0xdeadbeef ); - handle = (HANDLE)((LONG_PTR)(int)(ULONG_PTR)handle); - ret = GetExitCodeProcess( handle, &code ); - ok( ret, "GetExitCodeProcess failed err %u\n", GetLastError() ); - /* invalid high-word */ - SetLastError( 0xdeadbeef ); - handle = (HANDLE)(((ULONG_PTR)handle & ~0u) + ((ULONG_PTR)1 << 32)); - ret = GetExitCodeProcess( handle, &code ); - ok( !ret, "GetExitCodeProcess succeeded for %p\n", handle ); - ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError() ); -#endif - - handle = GetStdHandle( STD_ERROR_HANDLE ); - ok( handle != 0, "handle %p\n", handle ); - DuplicateHandle( GetCurrentProcess(), handle, GetCurrentProcess(), &h3, - 0, TRUE, DUPLICATE_SAME_ACCESS ); - SetStdHandle( STD_ERROR_HANDLE, h3 ); - CloseHandle( (HANDLE)STD_ERROR_HANDLE ); - h2 = GetStdHandle( STD_ERROR_HANDLE ); - ok( h2 == 0 || - broken( h2 == h3) || /* nt4, w2k */ - broken( h2 == INVALID_HANDLE_VALUE), /* win9x */ - "wrong handle %p/%p\n", h2, h3 ); - SetStdHandle( STD_ERROR_HANDLE, handle ); -} - -static void test_SystemInfo(void) -{ - SYSTEM_INFO si, nsi; - BOOL is_wow64; - - if (!pGetNativeSystemInfo) - { - win_skip("GetNativeSystemInfo is not available\n"); - return; - } - - if (!pIsWow64Process || !pIsWow64Process( GetCurrentProcess(), &is_wow64 )) is_wow64 = FALSE; - - GetSystemInfo(&si); - pGetNativeSystemInfo(&nsi); - if (is_wow64) - { - if (S(U(si)).wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL) - { - ok(S(U(nsi)).wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64, - "Expected PROCESSOR_ARCHITECTURE_AMD64, got %d\n", - S(U(nsi)).wProcessorArchitecture); - ok(nsi.dwProcessorType == PROCESSOR_AMD_X8664, - "Expected PROCESSOR_AMD_X8664, got %d\n", - nsi.dwProcessorType); - } - } - else - { - ok(S(U(si)).wProcessorArchitecture == S(U(nsi)).wProcessorArchitecture, - "Expected no difference for wProcessorArchitecture, got %d and %d\n", - S(U(si)).wProcessorArchitecture, S(U(nsi)).wProcessorArchitecture); - ok(si.dwProcessorType == nsi.dwProcessorType, - "Expected no difference for dwProcessorType, got %d and %d\n", - si.dwProcessorType, nsi.dwProcessorType); - } -} - -static void test_RegistryQuota(void) -{ - BOOL ret; - DWORD max_quota, used_quota; - - if (!pGetSystemRegistryQuota) - { - win_skip("GetSystemRegistryQuota is not available\n"); - return; - } - - ret = pGetSystemRegistryQuota(NULL, NULL); - ok(ret == TRUE, - "Expected GetSystemRegistryQuota to return TRUE, got %d\n", ret); - - ret = pGetSystemRegistryQuota(&max_quota, NULL); - ok(ret == TRUE, - "Expected GetSystemRegistryQuota to return TRUE, got %d\n", ret); - - ret = pGetSystemRegistryQuota(NULL, &used_quota); - ok(ret == TRUE, - "Expected GetSystemRegistryQuota to return TRUE, got %d\n", ret); - - ret = pGetSystemRegistryQuota(&max_quota, &used_quota); - ok(ret == TRUE, - "Expected GetSystemRegistryQuota to return TRUE, got %d\n", ret); -} - -START_TEST(process) -{ - int b = init(); - ok(b, "Basic init of CreateProcess test\n"); - if (!b) return; - - if (myARGC >= 3) - { - doChild(myARGV[2], (myARGC == 3) ? NULL : myARGV[3]); - return; - } - test_Startup(); - test_CommandLine(); - test_Directory(); - test_Environment(); - test_SuspendFlag(); - test_DebuggingFlag(); - test_Console(); - test_ExitCode(); - test_OpenProcess(); - test_GetProcessVersion(); - test_ProcessNameA(); - test_ProcessName(); - test_Handles(); - test_SystemInfo(); - test_RegistryQuota(); - /* things that can be tested: - * lookup: check the way program to be executed is searched - * handles: check the handle inheritance stuff (+sec options) - * console: check if console creation parameters work - */ -} diff --git a/rostests/winetests/kernel32/profile.c b/rostests/winetests/kernel32/profile.c deleted file mode 100755 index 07b351cf7d8..00000000000 --- a/rostests/winetests/kernel32/profile.c +++ /dev/null @@ -1,1141 +0,0 @@ -/* - * Unit tests for profile functions - * - * Copyright (c) 2003 Stefan Leichter - * - * 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 "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "windows.h" - -#define KEY "ProfileInt" -#define SECTION "Test" -#define TESTFILE ".\\testwine.ini" -#define TESTFILE2 ".\\testwine2.ini" - -struct _profileInt { - LPCSTR section; - LPCSTR key; - LPCSTR value; - LPCSTR iniFile; - INT defaultVal; - UINT result; - UINT result9x; -}; - -static void test_profile_int(void) -{ - struct _profileInt profileInt[]={ - { NULL, NULL, NULL, NULL, 70, 0 , 0}, /* 0 */ - { NULL, NULL, NULL, TESTFILE, -1, 4294967295U, 0}, - { NULL, NULL, NULL, TESTFILE, 1, 1 , 0}, - { SECTION, NULL, NULL, TESTFILE, -1, 4294967295U, 0}, - { SECTION, NULL, NULL, TESTFILE, 1, 1 , 0}, - { NULL, KEY, NULL, TESTFILE, -1, 4294967295U, 0}, /* 5 */ - { NULL, KEY, NULL, TESTFILE, 1, 1 , 0}, - { SECTION, KEY, NULL, TESTFILE, -1, 4294967295U, 4294967295U}, - { SECTION, KEY, NULL, TESTFILE, 1, 1 , 1}, - { SECTION, KEY, "-1", TESTFILE, -1, 4294967295U, 4294967295U}, - { SECTION, KEY, "-1", TESTFILE, 1, 4294967295U, 4294967295U}, /* 10 */ - { SECTION, KEY, "1", TESTFILE, -1, 1 , 1}, - { SECTION, KEY, "1", TESTFILE, 1, 1 , 1}, - { SECTION, KEY, "+1", TESTFILE, -1, 1 , 0}, - { SECTION, KEY, "+1", TESTFILE, 1, 1 , 0}, - { SECTION, KEY, "4294967296", TESTFILE, -1, 0 , 0}, /* 15 */ - { SECTION, KEY, "4294967296", TESTFILE, 1, 0 , 0}, - { SECTION, KEY, "4294967297", TESTFILE, -1, 1 , 1}, - { SECTION, KEY, "4294967297", TESTFILE, 1, 1 , 1}, - { SECTION, KEY, "-4294967297", TESTFILE, -1, 4294967295U, 4294967295U}, - { SECTION, KEY, "-4294967297", TESTFILE, 1, 4294967295U, 4294967295U}, /* 20 */ - { SECTION, KEY, "42A94967297", TESTFILE, -1, 42 , 42}, - { SECTION, KEY, "42A94967297", TESTFILE, 1, 42 , 42}, - { SECTION, KEY, "B4294967297", TESTFILE, -1, 0 , 0}, - { SECTION, KEY, "B4294967297", TESTFILE, 1, 0 , 0}, - }; - int i, num_test = (sizeof(profileInt)/sizeof(struct _profileInt)); - UINT res; - - DeleteFileA( TESTFILE); - - for (i=0; i < num_test; i++) { - if (profileInt[i].value) - WritePrivateProfileStringA(SECTION, KEY, profileInt[i].value, - profileInt[i].iniFile); - - res = GetPrivateProfileIntA(profileInt[i].section, profileInt[i].key, - profileInt[i].defaultVal, profileInt[i].iniFile); - ok((res == profileInt[i].result) || (res == profileInt[i].result9x), - "test<%02d>: ret<%010u> exp<%010u><%010u>\n", - i, res, profileInt[i].result, profileInt[i].result9x); - } - - DeleteFileA( TESTFILE); -} - -static void test_profile_string(void) -{ - static WCHAR emptyW[] = { 0 }; - static WCHAR keyW[] = { 'k','e','y',0 }; - static WCHAR sW[] = { 's',0 }; - static WCHAR TESTFILE2W[] = {'.','\\','t','e','s','t','w','i','n','e','2','.','i','n','i',0}; - static WCHAR valsectionW[] = {'v','a','l','_','e','_','s','e','c','t','i','o','n',0 }; - static WCHAR valnokeyW[] = {'v','a','l','_','n','o','_','k','e','y',0}; - HANDLE h; - int ret; - DWORD count; - char buf[100]; - WCHAR bufW[100]; - char *p; - /* test that lines without an '=' will not be enumerated */ - /* in the case below, name2 is a key while name3 is not. */ - char content[]="[s]\r\nname1=val1\r\nname2=\r\nname3\r\nname4=val4\r\n"; - char content2[]="\r\nkey=val_no_section\r\n[]\r\nkey=val_e_section\r\n" - "[s]\r\n=val_no_key\r\n[t]\r\n"; - DeleteFileA( TESTFILE2); - h = CreateFileA( TESTFILE2, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, NULL); - ok( h != INVALID_HANDLE_VALUE, " cannot create %s\n", TESTFILE2); - if( h == INVALID_HANDLE_VALUE) return; - WriteFile( h, content, sizeof(content), &count, NULL); - CloseHandle( h); - - /* enumerate the keys */ - ret=GetPrivateProfileStringA( "s", NULL, "", buf, sizeof(buf), - TESTFILE2); - for( p = buf + strlen(buf) + 1; *p;p += strlen(p)+1) - p[-1] = ','; - /* and test */ - ok( ret == 18 && !strcmp( buf, "name1,name2,name4"), "wrong keys returned(%d): %s\n", ret, - buf); - - /* add a new key to test that the file is quite usable */ - WritePrivateProfileStringA( "s", "name5", "val5", TESTFILE2); - ret=GetPrivateProfileStringA( "s", NULL, "", buf, sizeof(buf), - TESTFILE2); - for( p = buf + strlen(buf) + 1; *p;p += strlen(p)+1) - p[-1] = ','; - ok( ret == 24 && !strcmp( buf, "name1,name2,name4,name5"), "wrong keys returned(%d): %s\n", - ret, buf); - - h = CreateFileA( TESTFILE2, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, NULL); - ok( h != INVALID_HANDLE_VALUE, " cannot create %s\n", TESTFILE2); - if( h == INVALID_HANDLE_VALUE) return; - WriteFile( h, content2, sizeof(content2), &count, NULL); - CloseHandle( h); - - /* works only in unicode, ascii crashes */ - ret=GetPrivateProfileStringW(emptyW, keyW, emptyW, bufW, - sizeof(bufW)/sizeof(bufW[0]), TESTFILE2W); - todo_wine - ok(ret == 13, "expected 13, got %u\n", ret); - todo_wine - ok(!lstrcmpW(valsectionW,bufW), "expected %s, got %s\n", - wine_dbgstr_w(valsectionW), wine_dbgstr_w(bufW) ); - - /* works only in unicode, ascii crashes */ - ret=GetPrivateProfileStringW(sW, emptyW, emptyW, bufW, - sizeof(bufW)/sizeof(bufW[0]), TESTFILE2W); - todo_wine - ok(ret == 10, "expected 10, got %u\n", ret); - todo_wine - ok(!lstrcmpW(valnokeyW,bufW), "expected %s, got %s\n", - wine_dbgstr_w(valnokeyW), wine_dbgstr_w(bufW) ); - - DeleteFileA( TESTFILE2); -} - -static void test_profile_sections(void) -{ - HANDLE h; - int ret; - DWORD count; - char buf[100]; - char *p; - static const char content[]="[section1]\r\nname1=val1\r\nname2=\r\nname3\r\nname4=val4\r\n[section2]\r\n"; - static const char testfile4[]=".\\testwine4.ini"; - BOOL on_win98 = FALSE; - - DeleteFileA( testfile4 ); - h = CreateFileA( testfile4, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - ok( h != INVALID_HANDLE_VALUE, " cannot create %s\n", testfile4); - if( h == INVALID_HANDLE_VALUE) return; - WriteFile( h, content, sizeof(content), &count, NULL); - CloseHandle( h); - - /* Some parameter checking */ - SetLastError(0xdeadbeef); - ret = GetPrivateProfileSectionA( NULL, NULL, 0, NULL ); - ok( ret == 0, "expected return size 0, got %d\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == 0xdeadbeef /* Win98 */, - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - if (GetLastError() == 0xdeadbeef) on_win98 = TRUE; - - SetLastError(0xdeadbeef); - ret = GetPrivateProfileSectionA( NULL, NULL, 0, testfile4 ); - ok( ret == 0, "expected return size 0, got %d\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == 0xdeadbeef /* Win98 */, - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - if (!on_win98) - { - SetLastError(0xdeadbeef); - ret = GetPrivateProfileSectionA( "section1", NULL, 0, testfile4 ); - ok( ret == 0, "expected return size 0, got %d\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - } - - SetLastError(0xdeadbeef); - ret = GetPrivateProfileSectionA( NULL, buf, sizeof(buf), testfile4 ); - ok( ret == 0, "expected return size 0, got %d\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER || - broken(GetLastError() == 0xdeadbeef), /* Win9x, WinME */ - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = GetPrivateProfileSectionA( "section1", buf, sizeof(buf), NULL ); - ok( ret == 0, "expected return size 0, got %d\n", ret ); - todo_wine - ok( GetLastError() == ERROR_FILE_NOT_FOUND || - broken(GetLastError() == 0xdeadbeef), /* Win9x, WinME */ - "expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - - /* Existing empty section with no keys */ - SetLastError(0xdeadbeef); - ret=GetPrivateProfileSectionA("section2", buf, sizeof(buf), testfile4); - ok( ret == 0, "expected return size 0, got %d\n", ret ); - ok( GetLastError() == ERROR_SUCCESS || - broken(GetLastError() == 0xdeadbeef), /* Win9x, WinME */ - "expected ERROR_SUCCESS, got %d\n", GetLastError()); - - /* Existing section with keys and values*/ - SetLastError(0xdeadbeef); - ret=GetPrivateProfileSectionA("section1", buf, sizeof(buf), testfile4); - for( p = buf + strlen(buf) + 1; *p;p += strlen(p)+1) - p[-1] = ','; - ok( ret == 35 && !strcmp( buf, "name1=val1,name2=,name3,name4=val4"), "wrong section returned(%d): %s\n", - ret, buf); - ok( buf[ret-1] == 0 && buf[ret] == 0, "returned buffer not terminated with double-null\n" ); - ok( GetLastError() == ERROR_SUCCESS || - broken(GetLastError() == 0xdeadbeef), /* Win9x, WinME */ - "expected ERROR_SUCCESS, got %d\n", GetLastError()); - - /* Overflow*/ - ret=GetPrivateProfileSectionA("section1", buf, 24, testfile4); - for( p = buf + strlen(buf) + 1; *p;p += strlen(p)+1) - p[-1] = ','; - ok( ret == 22 && !strcmp( buf, "name1=val1,name2=,name"), "wrong section returned(%d): %s\n", - ret, buf); - ok( buf[ret] == 0 && buf[ret+1] == 0, "returned buffer not terminated with double-null\n" ); - - DeleteFileA( testfile4 ); -} - -static void test_profile_sections_names(void) -{ - HANDLE h; - int ret; - DWORD count; - char buf[100]; - WCHAR bufW[100]; - static const char content[]="[section1]\r\n[section2]\r\n[section3]\r\n"; - static const char testfile3[]=".\\testwine3.ini"; - static const WCHAR testfile3W[]={ '.','\\','t','e','s','t','w','i','n','e','3','.','i','n','i',0 }; - static const WCHAR not_here[] = {'.','\\','n','o','t','_','h','e','r','e','.','i','n','i',0}; - DeleteFileA( testfile3 ); - h = CreateFileA( testfile3, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, NULL); - ok( h != INVALID_HANDLE_VALUE, " cannot create %s\n", testfile3); - if( h == INVALID_HANDLE_VALUE) return; - WriteFile( h, content, sizeof(content), &count, NULL); - CloseHandle( h); - - /* Test with sufficiently large buffer */ - memset(buf, 0xc, sizeof(buf)); - ret = GetPrivateProfileSectionNamesA( buf, 29, testfile3 ); - ok( ret == 27 || - broken(ret == 28), /* Win9x, WinME */ - "expected return size 27, got %d\n", ret ); - ok( (buf[ret-1] == 0 && buf[ret] == 0) || - broken(buf[ret-1] == 0 && buf[ret-2] == 0), /* Win9x, WinME */ - "returned buffer not terminated with double-null\n" ); - - /* Test with exactly fitting buffer */ - memset(buf, 0xc, sizeof(buf)); - ret = GetPrivateProfileSectionNamesA( buf, 28, testfile3 ); - ok( ret == 26 || - broken(ret == 28), /* Win9x, WinME */ - "expected return size 26, got %d\n", ret ); - todo_wine - ok( (buf[ret+1] == 0 && buf[ret] == 0) || /* W2K3 and higher */ - broken(buf[ret+1] == 0xc && buf[ret] == 0) || /* NT4, W2K, WinXP */ - broken(buf[ret-1] == 0 && buf[ret-2] == 0), /* Win9x, WinME */ - "returned buffer not terminated with double-null\n" ); - - /* Test with a buffer too small */ - memset(buf, 0xc, sizeof(buf)); - ret = GetPrivateProfileSectionNamesA( buf, 27, testfile3 ); - ok( ret == 25, "expected return size 25, got %d\n", ret ); - /* Win9x and WinME only fills the buffer with complete section names (double-null terminated) */ - count = strlen("section1") + sizeof(CHAR) + strlen("section2"); - todo_wine - ok( (buf[ret+1] == 0 && buf[ret] == 0) || - broken(buf[count] == 0 && buf[count+1] == 0), /* Win9x, WinME */ - "returned buffer not terminated with double-null\n" ); - - /* Tests on nonexistent file */ - memset(buf, 0xc, sizeof(buf)); - ret = GetPrivateProfileSectionNamesA( buf, 10, ".\\not_here.ini" ); - ok( ret == 0 || - broken(ret == 1), /* Win9x, WinME */ - "expected return size 0, got %d\n", ret ); - ok( buf[0] == 0, "returned buffer not terminated with null\n" ); - ok( buf[1] != 0, "returned buffer terminated with double-null\n" ); - - /* Test with sufficiently large buffer */ - SetLastError(0xdeadbeef); - memset(bufW, 0xcc, sizeof(bufW)); - ret = GetPrivateProfileSectionNamesW( bufW, 29, testfile3W ); - if (ret == 0 && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) - { - win_skip("GetPrivateProfileSectionNamesW is not implemented\n"); - DeleteFileA( testfile3 ); - return; - } - ok( ret == 27, "expected return size 27, got %d\n", ret ); - ok( bufW[ret-1] == 0 && bufW[ret] == 0, "returned buffer not terminated with double-null\n" ); - - /* Test with exactly fitting buffer */ - memset(bufW, 0xcc, sizeof(bufW)); - ret = GetPrivateProfileSectionNamesW( bufW, 28, testfile3W ); - ok( ret == 26, "expected return size 26, got %d\n", ret ); - ok( (bufW[ret+1] == 0 && bufW[ret] == 0) || /* W2K3 and higher */ - broken(bufW[ret+1] == 0xcccc && bufW[ret] == 0), /* NT4, W2K, WinXP */ - "returned buffer not terminated with double-null\n" ); - - /* Test with a buffer too small */ - memset(bufW, 0xcc, sizeof(bufW)); - ret = GetPrivateProfileSectionNamesW( bufW, 27, testfile3W ); - ok( ret == 25, "expected return size 25, got %d\n", ret ); - ok( bufW[ret+1] == 0 && bufW[ret] == 0, "returned buffer not terminated with double-null\n" ); - - DeleteFileA( testfile3 ); - - /* Tests on nonexistent file */ - memset(bufW, 0xcc, sizeof(bufW)); - ret = GetPrivateProfileSectionNamesW( bufW, 10, not_here ); - ok( ret == 0, "expected return size 0, got %d\n", ret ); - ok( bufW[0] == 0, "returned buffer not terminated with null\n" ); - ok( bufW[1] != 0, "returned buffer terminated with double-null\n" ); -} - -/* If the ini-file has already been opened with CreateFile, WritePrivateProfileString failed in wine with an error ERROR_SHARING_VIOLATION, some testing here */ -static void test_profile_existing(void) -{ - static const char *testfile1 = ".\\winesharing1.ini"; - static const char *testfile2 = ".\\winesharing2.ini"; - - static const struct { - DWORD dwDesiredAccess; - DWORD dwShareMode; - DWORD write_error; - BOOL read_error; - DWORD broken_error; - } pe[] = { - {GENERIC_READ, FILE_SHARE_READ, ERROR_SHARING_VIOLATION, FALSE }, - {GENERIC_READ, FILE_SHARE_WRITE, ERROR_SHARING_VIOLATION, TRUE }, - {GENERIC_WRITE, FILE_SHARE_READ, ERROR_SHARING_VIOLATION, FALSE }, - {GENERIC_WRITE, FILE_SHARE_WRITE, ERROR_SHARING_VIOLATION, TRUE }, - {GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ, ERROR_SHARING_VIOLATION, FALSE }, - {GENERIC_READ|GENERIC_WRITE, FILE_SHARE_WRITE, ERROR_SHARING_VIOLATION, TRUE }, - {GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, 0, FALSE, ERROR_SHARING_VIOLATION /* nt4 */}, - {GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, 0, FALSE, ERROR_SHARING_VIOLATION /* nt4 */}, - /*Thief demo (bug 5024) opens .ini file like this*/ - {GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, 0, FALSE, ERROR_SHARING_VIOLATION /* nt4 */} - }; - - int i; - BOOL ret; - DWORD size; - HANDLE h = 0; - char buffer[MAX_PATH]; - - for (i=0; i < sizeof(pe)/sizeof(pe[0]); i++) - { - h = CreateFile(testfile1, pe[i].dwDesiredAccess, pe[i].dwShareMode, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - ok(INVALID_HANDLE_VALUE != h, "%d: CreateFile failed\n",i); - SetLastError(0xdeadbeef); - - ret = WritePrivateProfileString(SECTION, KEY, "12345", testfile1); - if (!pe[i].write_error) - { - if (!ret) - ok( broken(GetLastError() == pe[i].broken_error), - "%d: WritePrivateProfileString failed with error %u\n", i, GetLastError() ); - CloseHandle(h); - size = GetPrivateProfileString(SECTION, KEY, 0, buffer, MAX_PATH, testfile1); - if (ret) - ok( size == 5, "%d: test failed, number of characters copied: %d instead of 5\n", i, size ); - else - ok( !size, "%d: test failed, number of characters copied: %d instead of 0\n", i, size ); - } - else - { - DWORD err = GetLastError(); - ok( !ret, "%d: WritePrivateProfileString succeeded\n", i ); - if (!ret) - ok( err == pe[i].write_error, "%d: WritePrivateProfileString failed with error %u/%u\n", - i, err, pe[i].write_error ); - CloseHandle(h); - size = GetPrivateProfileString(SECTION, KEY, 0, buffer, MAX_PATH, testfile1); - ok( !size, "%d: test failed, number of characters copied: %d instead of 0\n", i, size ); - } - - ok( DeleteFile(testfile1), "delete failed\n" ); - } - - h = CreateFile(testfile2, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - sprintf( buffer, "[%s]\r\n%s=123\r\n", SECTION, KEY ); - ok( WriteFile( h, buffer, strlen(buffer), &size, NULL ), "failed to write\n" ); - CloseHandle( h ); - - for (i=0; i < sizeof(pe)/sizeof(pe[0]); i++) - { - h = CreateFile(testfile2, pe[i].dwDesiredAccess, pe[i].dwShareMode, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - ok(INVALID_HANDLE_VALUE != h, "%d: CreateFile failed\n",i); - SetLastError(0xdeadbeef); - ret = GetPrivateProfileStringA(SECTION, KEY, NULL, buffer, MAX_PATH, testfile2); - /* Win9x and WinME returns 0 for all cases except the first one */ - if (!pe[i].read_error) - ok( ret || - broken(!ret && GetLastError() == 0xdeadbeef), /* Win9x, WinME */ - "%d: GetPrivateProfileString failed with error %u\n", i, GetLastError() ); - else - ok( !ret, "%d: GetPrivateProfileString succeeded\n", i ); - CloseHandle(h); - } - ok( DeleteFile(testfile2), "delete failed\n" ); -} - -static void test_profile_delete_on_close(void) -{ - static CHAR testfile[] = ".\\testwine5.ini"; - HANDLE h; - DWORD size, res; - static const char contents[] = "[" SECTION "]\n" KEY "=123\n"; - - h = CreateFile(testfile, GENERIC_WRITE, FILE_SHARE_READ, NULL, - CREATE_ALWAYS, FILE_FLAG_DELETE_ON_CLOSE, NULL); - ok( WriteFile( h, contents, sizeof contents - 1, &size, NULL ), - "Cannot write test file: %x\n", GetLastError() ); - ok( size == sizeof contents - 1, "Test file: partial write\n"); - - SetLastError(0xdeadbeef); - res = GetPrivateProfileInt(SECTION, KEY, 0, testfile); - ok( res == 123 || - broken(res == 0 && GetLastError() == ERROR_SHARING_VIOLATION), /* Win9x, WinME */ - "Got %d instead of 123\n", res); - - /* This also deletes the file */ - CloseHandle(h); -} - -static void test_profile_refresh(void) -{ - static CHAR testfile[] = ".\\winetest4.ini"; - HANDLE h; - DWORD size, res; - static const char contents1[] = "[" SECTION "]\n" KEY "=123\n"; - static const char contents2[] = "[" SECTION "]\n" KEY "=124\n"; - - h = CreateFile(testfile, GENERIC_WRITE, FILE_SHARE_READ, NULL, - CREATE_ALWAYS, FILE_FLAG_DELETE_ON_CLOSE, NULL); - ok( WriteFile( h, contents1, sizeof contents1 - 1, &size, NULL ), - "Cannot write test file: %x\n", GetLastError() ); - ok( size == sizeof contents1 - 1, "Test file: partial write\n"); - - SetLastError(0xdeadbeef); - res = GetPrivateProfileInt(SECTION, KEY, 0, testfile); - ok( res == 123 || - broken(res == 0 && GetLastError() == ERROR_SHARING_VIOLATION), /* Win9x, WinME */ - "Got %d instead of 123\n", res); - - CloseHandle(h); - - /* Test proper invalidation of wine's profile file cache */ - - h = CreateFile(testfile, GENERIC_WRITE, FILE_SHARE_READ, NULL, - CREATE_ALWAYS, FILE_FLAG_DELETE_ON_CLOSE, NULL); - ok( WriteFile( h, contents2, sizeof contents2 - 1, &size, NULL ), - "Cannot write test file: %x\n", GetLastError() ); - ok( size == sizeof contents2 - 1, "Test file: partial write\n"); - - SetLastError(0xdeadbeef); - res = GetPrivateProfileInt(SECTION, KEY, 0, testfile); - ok( res == 124 || - broken(res == 0 && GetLastError() == 0xdeadbeef), /* Win9x, WinME */ - "Got %d instead of 124\n", res); - - /* This also deletes the file */ - CloseHandle(h); -} - -static void create_test_file(LPCSTR name, LPCSTR data, DWORD size) -{ - HANDLE hfile; - DWORD count; - - hfile = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - ok(hfile != INVALID_HANDLE_VALUE, "cannot create %s\n", name); - WriteFile(hfile, data, size, &count, NULL); - CloseHandle(hfile); -} - -static BOOL emptystr_ok(CHAR emptystr[MAX_PATH]) -{ - int i; - - for(i = 0;i < MAX_PATH;++i) - if(emptystr[i] != 0) - { - trace("emptystr[%d] = %d\n",i,emptystr[i]); - return FALSE; - } - - return TRUE; -} - -static void test_GetPrivateProfileString(const char *content, const char *descript) -{ - DWORD ret, len; - CHAR buf[MAX_PATH]; - CHAR def_val[MAX_PATH]; - CHAR path[MAX_PATH]; - CHAR windir[MAX_PATH]; - /* NT series crashes on r/o empty strings, so pass an r/w - empty string and check for modification */ - CHAR emptystr[MAX_PATH] = ""; - LPSTR tempfile; - - static const char filename[] = ".\\winetest.ini"; - - trace("test_GetPrivateProfileStringA: %s\n", descript); - - if(!lstrcmpA(descript, "CR only")) - { - SetLastError(0xdeadbeef); - ret = GetPrivateProfileStringW(NULL, NULL, NULL, - NULL, 0, NULL); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("Win9x and WinME don't handle 'CR only' correctly\n"); - return; - } - } - - create_test_file(filename, content, lstrlenA(content)); - - /* Run this test series with caching. Wine won't cache profile - files younger than 2.1 seconds. */ - Sleep(2500); - - /* lpAppName is NULL */ - memset(buf, 0xc, sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA(NULL, "name1", "default", - buf, MAX_PATH, filename); - ok(ret == 18 || - broken(ret == 19), /* Win9x and WinME */ - "Expected 18, got %d\n", ret); - len = lstrlenA("section1") + sizeof(CHAR) + lstrlenA("section2") + 2 * sizeof(CHAR); - ok(!memcmp(buf, "section1\0section2\0\0", len), - "Expected \"section1\\0section2\\0\\0\", got \"%s\"\n", buf); - - /* lpAppName is empty */ - memset(buf, 0xc, sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA(emptystr, "name1", "default", - buf, MAX_PATH, filename); - ok(ret == 7, "Expected 7, got %d\n", ret); - ok(!lstrcmpA(buf, "default"), "Expected \"default\", got \"%s\"\n", buf); - ok(emptystr_ok(emptystr), "AppName modified\n"); - - /* lpAppName is missing */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("notasection", "name1", "default", - buf, MAX_PATH, filename); - ok(ret == 7, "Expected 7, got %d\n", ret); - ok(!lstrcmpA(buf, "default"), "Expected \"default\", got \"%s\"\n", buf); - - /* lpAppName is empty, lpDefault is NULL */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA(emptystr, "name1", NULL, - buf, MAX_PATH, filename); - ok(ret == 0, "Expected 0, got %d\n", ret); - ok(!lstrcmpA(buf, "") || - broken(!lstrcmpA(buf, "kumquat")), /* Win9x, WinME */ - "Expected \"\", got \"%s\"\n", buf); - ok(emptystr_ok(emptystr), "AppName modified\n"); - - /* lpAppName is empty, lpDefault is empty */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA(emptystr, "name1", "", - buf, MAX_PATH, filename); - ok(ret == 0, "Expected 0, got %d\n", ret); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(emptystr_ok(emptystr), "AppName modified\n"); - - /* lpAppName is empty, lpDefault has trailing blank characters */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - /* lpDefault must be writable (trailing blanks are removed inplace in win9x) */ - lstrcpyA(def_val, "default "); - ret = GetPrivateProfileStringA(emptystr, "name1", def_val, - buf, MAX_PATH, filename); - ok(ret == 7, "Expected 7, got %d\n", ret); - ok(!lstrcmpA(buf, "default"), "Expected \"default\", got \"%s\"\n", buf); - ok(emptystr_ok(emptystr), "AppName modified\n"); - - /* lpAppName is empty, many blank characters in lpDefault */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - /* lpDefault must be writable (trailing blanks are removed inplace in win9x) */ - lstrcpyA(def_val, "one two "); - ret = GetPrivateProfileStringA(emptystr, "name1", def_val, - buf, MAX_PATH, filename); - ok(ret == 7, "Expected 7, got %d\n", ret); - ok(!lstrcmpA(buf, "one two"), "Expected \"one two\", got \"%s\"\n", buf); - ok(emptystr_ok(emptystr), "AppName modified\n"); - - /* lpAppName is empty, blank character but not trailing in lpDefault */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA(emptystr, "name1", "one two", - buf, MAX_PATH, filename); - ok(ret == 7, "Expected 7, got %d\n", ret); - ok(!lstrcmpA(buf, "one two"), "Expected \"one two\", got \"%s\"\n", buf); - ok(emptystr_ok(emptystr), "AppName modified\n"); - - /* lpKeyName is NULL */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("section1", NULL, "default", - buf, MAX_PATH, filename); - ok(ret == 18, "Expected 18, got %d\n", ret); - ok(!memcmp(buf, "name1\0name2\0name4\0", ret + 1), - "Expected \"name1\\0name2\\0name4\\0\", got \"%s\"\n", buf); - - /* lpKeyName is empty */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("section1", emptystr, "default", - buf, MAX_PATH, filename); - ok(ret == 7, "Expected 7, got %d\n", ret); - ok(!lstrcmpA(buf, "default"), "Expected \"default\", got \"%s\"\n", buf); - ok(emptystr_ok(emptystr), "KeyName modified\n"); - - /* lpKeyName is missing */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("section1", "notakey", "default", - buf, MAX_PATH, filename); - ok(ret == 7, "Expected 7, got %d\n", ret); - ok(!lstrcmpA(buf, "default"), "Expected \"default\", got \"%s\"\n", buf); - - /* lpKeyName is empty, lpDefault is NULL */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("section1", emptystr, NULL, - buf, MAX_PATH, filename); - ok(ret == 0, "Expected 0, got %d\n", ret); - ok(!lstrcmpA(buf, "") || - broken(!lstrcmpA(buf, "kumquat")), /* Win9x, WinME */ - "Expected \"\", got \"%s\"\n", buf); - ok(emptystr_ok(emptystr), "KeyName modified\n"); - - /* lpKeyName is empty, lpDefault is empty */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("section1", emptystr, "", - buf, MAX_PATH, filename); - ok(ret == 0, "Expected 0, got %d\n", ret); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(emptystr_ok(emptystr), "KeyName modified\n"); - - /* lpKeyName is empty, lpDefault has trailing blank characters */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - /* lpDefault must be writable (trailing blanks are removed inplace in win9x) */ - lstrcpyA(def_val, "default "); - ret = GetPrivateProfileStringA("section1", emptystr, def_val, - buf, MAX_PATH, filename); - ok(ret == 7, "Expected 7, got %d\n", ret); - ok(!lstrcmpA(buf, "default"), "Expected \"default\", got \"%s\"\n", buf); - ok(emptystr_ok(emptystr), "KeyName modified\n"); - - if (0) /* crashes */ - { - /* lpReturnedString is NULL */ - ret = GetPrivateProfileStringA("section1", "name1", "default", - NULL, MAX_PATH, filename); - } - - /* lpFileName is NULL */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("section1", "name1", "default", - buf, MAX_PATH, NULL); - ok(ret == 7 || - broken(ret == 0), /* Win9x, WinME */ - "Expected 7, got %d\n", ret); - ok(!lstrcmpA(buf, "default") || - broken(!lstrcmpA(buf, "kumquat")), /* Win9x, WinME */ - "Expected \"default\", got \"%s\"\n", buf); - - /* lpFileName is empty */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("section1", "name1", "default", - buf, MAX_PATH, ""); - ok(ret == 7, "Expected 7, got %d\n", ret); - ok(!lstrcmpA(buf, "default"), "Expected \"default\", got \"%s\"\n", buf); - - /* lpFileName is nonexistent */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("section1", "name1", "default", - buf, MAX_PATH, "nonexistent"); - ok(ret == 7, "Expected 7, got %d\n", ret); - ok(!lstrcmpA(buf, "default"), "Expected \"default\", got \"%s\"\n", buf); - - /* nSize is 0 */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("section1", "name1", "default", - buf, 0, filename); - ok(ret == 0, "Expected 0, got %d\n", ret); - ok(!lstrcmpA(buf, "kumquat"), "Expected buf to be unchanged, got \"%s\"\n", buf); - - /* nSize is exact size of output */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("section1", "name1", "default", - buf, 4, filename); - ok(ret == 3, "Expected 3, got %d\n", ret); - ok(!lstrcmpA(buf, "val"), "Expected \"val\", got \"%s\"\n", buf); - - /* nSize has room for NULL terminator */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("section1", "name1", "default", - buf, 5, filename); - ok(ret == 4, "Expected 4, got %d\n", ret); - ok(!lstrcmpA(buf, "val1"), "Expected \"val1\", got \"%s\"\n", buf); - - /* output is 1 character */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("section1", "name4", "default", - buf, MAX_PATH, filename); - ok(ret == 1, "Expected 1, got %d\n", ret); - ok(!lstrcmpA(buf, "a"), "Expected \"a\", got \"%s\"\n", buf); - - /* output is 1 character, no room for NULL terminator */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("section1", "name4", "default", - buf, 1, filename); - ok(ret == 0, "Expected 0, got %d\n", ret); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - - /* lpAppName is NULL, not enough room for final section name */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA(NULL, "name1", "default", - buf, 16, filename); - ok(ret == 14, "Expected 14, got %d\n", ret); - len = lstrlenA("section1") + 2 * sizeof(CHAR); - todo_wine - ok(!memcmp(buf, "section1\0secti\0\0", ret + 2) || - broken(!memcmp(buf, "section1\0\0", len)), /* Win9x, WinME */ - "Expected \"section1\\0secti\\0\\0\", got \"%s\"\n", buf); - - /* lpKeyName is NULL, not enough room for final key name */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("section1", NULL, "default", - buf, 16, filename); - ok(ret == 14, "Expected 14, got %d\n", ret); - todo_wine - ok(!memcmp(buf, "name1\0name2\0na\0\0", ret + 2) || - broken(!memcmp(buf, "name1\0name2\0n\0\0", ret + 1)), /* Win9x, WinME */ - "Expected \"name1\\0name2\\0na\\0\\0\", got \"%s\"\n", buf); - - /* key value has quotation marks which are stripped */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("section1", "name2", "default", - buf, MAX_PATH, filename); - ok(ret == 4, "Expected 4, got %d\n", ret); - ok(!lstrcmpA(buf, "val2"), "Expected \"val2\", got \"%s\"\n", buf); - - /* case does not match */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("section1", "NaMe1", "default", - buf, MAX_PATH, filename); - ok(ret == 4, "Expected 4, got %d\n", ret); - ok(!lstrcmpA(buf, "val1"), "Expected \"val1\", got \"%s\"\n", buf); - - /* only filename is used */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("section1", "NaMe1", "default", - buf, MAX_PATH, "winetest.ini"); - ok(ret == 7, "Expected 7, got %d\n", ret); - ok(!lstrcmpA(buf, "default"), "Expected \"default\", got \"%s\"\n", buf); - - GetWindowsDirectoryA(windir, MAX_PATH); - SetLastError(0xdeadbeef); - ret = GetTempFileNameA(windir, "pre", 0, path); - if (!ret && GetLastError() == ERROR_ACCESS_DENIED) - { - skip("Not allowed to create a file in the Windows directory\n"); - DeleteFileA(filename); - return; - } - tempfile = strrchr(path, '\\') + 1; - create_test_file(path, content, lstrlenA(content)); - - /* only filename is used, file exists in windows directory */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("section1", "NaMe1", "default", - buf, MAX_PATH, tempfile); - ok(ret == 4, "Expected 4, got %d\n", ret); - ok(!lstrcmpA(buf, "val1"), "Expected \"val1\", got \"%s\"\n", buf); - - /* successful case */ - memset(buf, 0xc,sizeof(buf)); - lstrcpyA(buf, "kumquat"); - ret = GetPrivateProfileStringA("section1", "name1", "default", - buf, MAX_PATH, filename); - ok(ret == 4, "Expected 4, got %d\n", ret); - ok(!lstrcmpA(buf, "val1"), "Expected \"val1\", got \"%s\"\n", buf); - - /* Existing section with no keys in an existing file */ - memset(buf, 0xc,sizeof(buf)); - SetLastError(0xdeadbeef); - ret=GetPrivateProfileStringA("section2", "DoesntExist", "", - buf, MAX_PATH, filename); - ok( ret == 0, "expected return size 0, got %d\n", ret ); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - todo_wine - ok( GetLastError() == 0xdeadbeef || - GetLastError() == ERROR_FILE_NOT_FOUND /* Win 7 */, - "expected 0xdeadbeef or ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - - - DeleteFileA(path); - DeleteFileA(filename); -} - -static BOOL check_binary_file_data(LPCSTR path, const VOID *data, DWORD size) -{ - HANDLE file; - CHAR buf[MAX_PATH]; - BOOL ret; - - file = CreateFileA(path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); - if (file == INVALID_HANDLE_VALUE) - return FALSE; - - if(size != GetFileSize(file, NULL) ) - { - CloseHandle(file); - return FALSE; - } - - ret = ReadFile(file, buf, size, &size, NULL); - CloseHandle(file); - if (!ret) - return FALSE; - - return !memcmp(buf, data, size); -} - -static BOOL check_file_data(LPCSTR path, LPCSTR data) -{ - return check_binary_file_data(path, data, lstrlenA(data)); -} - -static void test_WritePrivateProfileString(void) -{ - BOOL ret; - LPCSTR data; - CHAR path[MAX_PATH]; - CHAR temp[MAX_PATH]; - - SetLastError(0xdeadbeef); - ret = WritePrivateProfileStringW(NULL, NULL, NULL, NULL); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - /* Win9x/WinME needs (variable) timeouts between tests and even long timeouts don't - * guarantee a correct result. - * Win9x/WinMe also produces different ini files where there is always a newline before - * a section start (except for the first one). - */ - win_skip("WritePrivateProfileString on Win9x/WinME is hard to test reliably\n"); - return; - } - - GetTempPathA(MAX_PATH, temp); - GetTempFileNameA(temp, "wine", 0, path); - DeleteFileA(path); - - /* path is not created yet */ - - /* NULL lpAppName */ - SetLastError(0xdeadbeef); - ret = WritePrivateProfileStringA(NULL, "key", "string", path); - ok(ret == FALSE, "Expected FALSE, got %d\n", ret); - ok(GetLastError() == ERROR_FILE_NOT_FOUND || - broken(GetLastError() == ERROR_INVALID_PARAMETER) || /* NT4 */ - broken(GetLastError() == 0xdeadbeef), /* Win9x and WinME */ - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - ok(GetFileAttributesA(path) == INVALID_FILE_ATTRIBUTES, - "Expected path to not exist\n"); - - GetTempFileNameA(temp, "wine", 0, path); - - /* NULL lpAppName, path exists */ - data = ""; - SetLastError(0xdeadbeef); - ret = WritePrivateProfileStringA(NULL, "key", "string", path); - ok(ret == FALSE, "Expected FALSE, got %d\n", ret); - ok(GetLastError() == ERROR_FILE_NOT_FOUND || - broken(GetLastError() == ERROR_INVALID_PARAMETER) || /* NT4 */ - broken(GetLastError() == 0xdeadbeef), /* Win9x and WinME */ - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - ok(check_file_data(path, data), "File doesn't match\n"); - DeleteFileA(path); - - if (0) - { - /* empty lpAppName, crashes on NT4 and higher */ - data = "[]\r\n" - "key=string\r\n"; - ret = WritePrivateProfileStringA("", "key", "string", path); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(check_file_data(path, data), "File doesn't match\n"); - DeleteFileA(path); - } - - /* NULL lpKeyName */ - data = ""; - ret = WritePrivateProfileStringA("App", NULL, "string", path); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - todo_wine - { - ok(check_file_data(path, data), "File doesn't match\n"); - } - DeleteFileA(path); - - if (0) - { - /* empty lpKeyName, crashes on NT4 and higher */ - data = "[App]\r\n" - "=string\r\n"; - ret = WritePrivateProfileStringA("App", "", "string", path); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - todo_wine - { - ok(check_file_data(path, data), "File doesn't match\n"); - } - DeleteFileA(path); - } - - /* NULL lpString */ - data = ""; - ret = WritePrivateProfileStringA("App", "key", NULL, path); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - todo_wine - { - ok(check_file_data(path, data) || - (broken(GetFileAttributesA(path) == INVALID_FILE_ATTRIBUTES)), /* Win9x and WinME */ - "File doesn't match\n"); - } - DeleteFileA(path); - - /* empty lpString */ - data = "[App]\r\n" - "key=\r\n"; - ret = WritePrivateProfileStringA("App", "key", "", path); - ok(ret == TRUE || - broken(!ret), /* Win9x and WinME */ - "Expected TRUE, got %d\n", ret); - ok(check_file_data(path, data) || - (broken(GetFileAttributesA(path) == INVALID_FILE_ATTRIBUTES)), /* Win9x and WinME */ - "File doesn't match\n"); - DeleteFileA(path); - - /* empty lpFileName */ - SetLastError(0xdeadbeef); - ret = WritePrivateProfileStringA("App", "key", "string", ""); - ok(ret == FALSE, "Expected FALSE, got %d\n", ret); - ok(GetLastError() == ERROR_ACCESS_DENIED || - broken(GetLastError() == ERROR_PATH_NOT_FOUND), /* Win9x and WinME */ - "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); - - /* The resulting file will be X:\\%WINDIR%\\win1.tmp */ - GetWindowsDirectoryA(temp, MAX_PATH); - GetTempFileNameA(temp, "win", 1, path); - DeleteFileA(path); - - /* relative path in lpFileName */ - data = "[App]\r\n" - "key=string\r\n"; - ret = WritePrivateProfileStringA("App", "key", "string", "win1.tmp"); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(check_file_data(path, data), "File doesn't match\n"); - DeleteFileA(path); - - GetTempPathA(MAX_PATH, temp); - GetTempFileNameA(temp, "wine", 0, path); - - /* build up an INI file */ - WritePrivateProfileStringA("App1", "key1", "string1", path); - WritePrivateProfileStringA("App1", "key2", "string2", path); - WritePrivateProfileStringA("App1", "key3", "string3", path); - WritePrivateProfileStringA("App2", "key4", "string4", path); - - /* make an addition and verify the INI */ - data = "[App1]\r\n" - "key1=string1\r\n" - "key2=string2\r\n" - "key3=string3\r\n" - "[App2]\r\n" - "key4=string4\r\n" - "[App3]\r\n" - "key5=string5\r\n"; - ret = WritePrivateProfileStringA("App3", "key5", "string5", path); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(check_file_data(path, data), "File doesn't match\n"); - - /* lpString is NULL, key2 key is deleted */ - data = "[App1]\r\n" - "key1=string1\r\n" - "key3=string3\r\n" - "[App2]\r\n" - "key4=string4\r\n" - "[App3]\r\n" - "key5=string5\r\n"; - ret = WritePrivateProfileStringA("App1", "key2", NULL, path); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(check_file_data(path, data), "File doesn't match\n"); - - /* try to delete key2 again */ - data = "[App1]\r\n" - "key1=string1\r\n" - "key3=string3\r\n" - "[App2]\r\n" - "key4=string4\r\n" - "[App3]\r\n" - "key5=string5\r\n"; - ret = WritePrivateProfileStringA("App1", "key2", NULL, path); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(check_file_data(path, data), "File doesn't match\n"); - - /* lpKeyName is NULL, App1 section is deleted */ - data = "[App2]\r\n" - "key4=string4\r\n" - "[App3]\r\n" - "key5=string5\r\n"; - ret = WritePrivateProfileStringA("App1", NULL, "string1", path); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(check_file_data(path, data), "File doesn't match\n"); - - /* lpString is not needed to delete a section */ - data = "[App3]\r\n" - "key5=string5\r\n"; - ret = WritePrivateProfileStringA("App2", NULL, NULL, path); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(check_file_data(path, data), "File doesn't match\n"); - - /* leave just the section */ - data = "[App3]\r\n"; - ret = WritePrivateProfileStringA("App3", "key5", NULL, path); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(check_file_data(path, data), "File doesn't match\n"); - DeleteFileA(path); - - /* NULLs in file before first section. Should be preserved in output */ - data = "Data \0 before \0 first \0 section" /* 31 bytes */ - "\r\n[section1]\r\n" /* 14 bytes */ - "key1=string1\r\n"; /* 14 bytes */ - GetTempFileNameA(temp, "wine", 0, path); - create_test_file(path, data, 31); - ret = WritePrivateProfileStringA("section1", "key1", "string1", path); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - todo_wine - ok( check_binary_file_data(path, data, 59) || - broken( check_binary_file_data(path, /* Windows 9x */ - "Data \0 before \0 first \0 section" /* 31 bytes */ - "\r\n\r\n[section1]\r\n" /* 14 bytes */ - "key1=string1" /* 14 bytes */ - , 59)), "File doesn't match\n"); - DeleteFileA(path); -} - -START_TEST(profile) -{ - test_profile_int(); - test_profile_string(); - test_profile_sections(); - test_profile_sections_names(); - test_profile_existing(); - test_profile_delete_on_close(); - test_profile_refresh(); - test_GetPrivateProfileString( - "[section1]\r\n" - "name1=val1\r\n" - "name2=\"val2\"\r\n" - "name3\r\n" - "name4=a\r\n" - "[section2]\r\n", - "CR+LF"); - test_GetPrivateProfileString( - "[section1]\r" - "name1=val1\r" - "name2=\"val2\"\r" - "name3\r" - "name4=a\r" - "[section2]\r", - "CR only"); - test_WritePrivateProfileString(); -} diff --git a/rostests/winetests/kernel32/resource.c b/rostests/winetests/kernel32/resource.c deleted file mode 100644 index a85e6d2daa1..00000000000 --- a/rostests/winetests/kernel32/resource.c +++ /dev/null @@ -1,523 +0,0 @@ -/* - * Unit test suite for resource functions. - * - * Copyright 2006 Mike McCormack - * - * 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 "wine/test.h" - -static const char filename[] = "test_.exe"; -static DWORD GLE; - -enum constants { - page_size = 0x1000, - rva_rsrc_start = page_size * 3, - max_sections = 3 -}; - -/* rodata @ [0x1000-0x3000) */ -static const IMAGE_SECTION_HEADER sh_rodata_1 = -{ - ".rodata", {2*page_size}, page_size, 2*page_size, page_size, 0, 0, 0, 0, - IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ -}; - -/* rodata @ [0x1000-0x4000) */ -static const IMAGE_SECTION_HEADER sh_rodata_2 = -{ - ".rodata", {3*page_size}, page_size, 3*page_size, page_size, 0, 0, 0, 0, - IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ -}; - -/* rodata @ [0x1000-0x2000) */ -static const IMAGE_SECTION_HEADER sh_rodata_3 = -{ - ".rodata", {page_size}, page_size, page_size, page_size, 0, 0, 0, 0, - IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ -}; - -/* rsrc @ [0x3000-0x4000) */ -static const IMAGE_SECTION_HEADER sh_rsrc_1 = -{ - ".rsrc\0\0", {page_size}, rva_rsrc_start, page_size, rva_rsrc_start, 0, 0, 0, 0, - IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ -}; - -/* rsrc @ [0x4000-0x5000) */ -static const IMAGE_SECTION_HEADER sh_rsrc_2 = -{ - ".rsrc\0\0", {page_size}, 4*page_size, page_size, 4*page_size, 0, 0, 0, 0, - IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ -}; - -/* rsrc @ [0x2000-0x4000) */ -static const IMAGE_SECTION_HEADER sh_rsrc_3 = -{ - ".rsrc\0\0", {2*page_size}, rva_rsrc_start-page_size, 2*page_size, rva_rsrc_start-page_size, 0, 0, 0, 0, - IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ -}; - -/* rsrc @ [0x2000-0x3000) */ -static const IMAGE_SECTION_HEADER sh_rsrc_4 = -{ - ".rsrc\0\0", {page_size}, rva_rsrc_start-page_size, page_size, rva_rsrc_start-page_size, 0, 0, 0, 0, - IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ -}; - -/* rsrc @ [0x3000-0x6000) */ -static const IMAGE_SECTION_HEADER sh_rsrc_5 = -{ - ".rsrc\0\0", {3*page_size}, rva_rsrc_start, 3*page_size, rva_rsrc_start, 0, 0, 0, 0, - IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ -}; - -/* rsrc @ [0x4000-0x7000) */ -static const IMAGE_SECTION_HEADER sh_rsrc_6 = -{ - ".rsrc\0\0", {3*page_size}, 4*page_size, 3*page_size, 4*page_size, 0, 0, 0, 0, - IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ -}; - -/* rsrc @ [0x2000-0x5000) */ -static const IMAGE_SECTION_HEADER sh_rsrc_7 = -{ - ".rsrc\0\0", {3*page_size}, 2*page_size, 3*page_size, 2*page_size, 0, 0, 0, 0, - IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ -}; - -/* rsrc @ [0x3000-0x4000), small SizeOfRawData */ -static const IMAGE_SECTION_HEADER sh_rsrc_8 = -{ - ".rsrc\0\0", {page_size}, rva_rsrc_start, 8, rva_rsrc_start, 0, 0, 0, 0, - IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ -}; - -/* reloc @ [0x4000-0x5000) */ -static const IMAGE_SECTION_HEADER sh_junk = -{ - ".reloc\0", {page_size}, 4*page_size, page_size, 4*page_size, 0, 0, 0, 0, - IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ -}; - -/* reloc @ [0x6000-0x7000) */ -static const IMAGE_SECTION_HEADER sh_junk_2 = -{ - ".reloc\0", {page_size}, 6*page_size, page_size, 6*page_size, 0, 0, 0, 0, - IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ -}; - -typedef struct _sec_build -{ - const IMAGE_SECTION_HEADER *sect_in[max_sections]; -} sec_build; - -typedef struct _sec_verify -{ - const IMAGE_SECTION_HEADER *sect_out[max_sections]; - DWORD length; - int rsrc_section; - DWORD NumberOfNamedEntries, NumberOfIdEntries; -} sec_verify; - -static const struct _sec_variants -{ - sec_build build; - sec_verify chk_none, chk_delete, chk_version, chk_bigdata; -} sec_variants[] = -{ - /* .rsrc is the last section, data directory entry points to whole section */ - { - {{&sh_rodata_1, &sh_rsrc_1, NULL}}, - {{&sh_rodata_1, &sh_rsrc_1, NULL}, 4*page_size, 1, 0, 0}, - {{&sh_rodata_1, &sh_rsrc_1, NULL}, 4*page_size, 1, 0, 0}, - {{&sh_rodata_1, &sh_rsrc_1, NULL}, 4*page_size, 1, 0, 1}, - {{&sh_rodata_1, &sh_rsrc_5, NULL}, 6*page_size, 1, 0, 1} - }, - /* single .rodata section with compatible characteristics, data directory entry points to section end */ - /* Vista+ - existing section isn't used, new section is created at the end of file */ - /* NT4/2000/2003 - image is broken */ -#if 0 - { - {{&sh_rodata_2, NULL, NULL}}, - {{&sh_rodata_2, &sh_rsrc_2, NULL}, 5*page_size, 1, 0, 0}, - {{&sh_rodata_2, &sh_rsrc_2, NULL}, 5*page_size, 1, 0, 0}, - {{&sh_rodata_2, &sh_rsrc_2, NULL}, 5*page_size, 1, 0, 1}, - {{&sh_rodata_2, &sh_rsrc_6, NULL}, 7*page_size, 1, 0, 1} - }, -#endif - /* .rsrc is the last section, data directory entry points to section end */ - /* Vista+ - resources are moved to section start (trashing data that could be there), and section is trimmed */ - /* NT4/2000/2003 - resources are moved to section start (trashing data that could be there); section isn't trimmed */ - { - {{&sh_rodata_3, &sh_rsrc_3, NULL}}, - {{&sh_rodata_3, &sh_rsrc_4, NULL}, 3*page_size, 1, 0, 0}, - {{&sh_rodata_3, &sh_rsrc_4, NULL}, 3*page_size, 1, 0, 0}, - {{&sh_rodata_3, &sh_rsrc_4, NULL}, 3*page_size, 1, 0, 1}, - {{&sh_rodata_3, &sh_rsrc_7, NULL}, 5*page_size, 1, 0, 1} - }, - /* .rsrc is not the last section */ - /* section is reused; sections after .rsrc are shifted to give space to rsrc (in-image offset and RVA!) */ - { - {{&sh_rodata_1, &sh_rsrc_1, &sh_junk}}, - {{&sh_rodata_1, &sh_rsrc_1, &sh_junk}, 5*page_size, 1, 0, 0}, - {{&sh_rodata_1, &sh_rsrc_1, &sh_junk}, 5*page_size, 1, 0, 0}, - {{&sh_rodata_1, &sh_rsrc_1, &sh_junk}, 5*page_size, 1, 0, 1}, - {{&sh_rodata_1, &sh_rsrc_5, &sh_junk_2}, 7*page_size, 1, 0, 1} - }, - /* .rsrc is the last section, data directory entry points to whole section, file size is not aligned on FileAlign */ - { - {{&sh_rodata_1, &sh_rsrc_8, NULL}}, - {{&sh_rodata_1, &sh_rsrc_1, NULL}, 4*page_size, 1, 0, 0}, - {{&sh_rodata_1, &sh_rsrc_1, NULL}, 4*page_size, 1, 0, 0}, - {{&sh_rodata_1, &sh_rsrc_1, NULL}, 4*page_size, 1, 0, 1}, - {{&sh_rodata_1, &sh_rsrc_5, NULL}, 6*page_size, 1, 0, 1} - } -}; - -static int build_exe( const sec_build* sec_descr ) -{ - IMAGE_DOS_HEADER *dos; - IMAGE_NT_HEADERS *nt; - IMAGE_SECTION_HEADER *sec; - IMAGE_OPTIONAL_HEADER *opt; - HANDLE file; - DWORD written, i, file_size; - BYTE page[page_size]; - - memset( page, 0, sizeof page ); - - dos = (void*) page; - dos->e_magic = IMAGE_DOS_SIGNATURE; - dos->e_lfanew = sizeof *dos; - - nt = (void*) &dos[1]; - - nt->Signature = IMAGE_NT_SIGNATURE; - nt->FileHeader.Machine = IMAGE_FILE_MACHINE_I386; - nt->FileHeader.NumberOfSections = 0; - nt->FileHeader.SizeOfOptionalHeader = sizeof nt->OptionalHeader; - nt->FileHeader.Characteristics = IMAGE_FILE_EXECUTABLE_IMAGE | IMAGE_FILE_DLL; - - opt = &nt->OptionalHeader; - - opt->Magic = IMAGE_NT_OPTIONAL_HDR_MAGIC; - opt->MajorLinkerVersion = 1; - opt->BaseOfCode = 0x10; - opt->ImageBase = 0x10000000; - opt->MajorOperatingSystemVersion = 4; - opt->MajorImageVersion = 1; - opt->MajorSubsystemVersion = 4; - opt->SizeOfHeaders = sizeof *dos + sizeof *nt + sizeof *sec * 2; - opt->SizeOfImage = page_size; - opt->Subsystem = IMAGE_SUBSYSTEM_WINDOWS_CUI; - - /* if SectionAlignment and File alignment are not specified */ - /* UpdateResource fails trying to create a huge temporary file */ - opt->SectionAlignment = page_size; - opt->FileAlignment = page_size; - - opt->DataDirectory[IMAGE_FILE_RESOURCE_DIRECTORY].VirtualAddress = rva_rsrc_start; - opt->DataDirectory[IMAGE_FILE_RESOURCE_DIRECTORY].Size = page_size; - - sec = (void*) &nt[1]; - - file_size = 0; - for ( i = 0; i < max_sections; i++ ) - if ( sec_descr->sect_in[i] ) - { - DWORD virt_end_of_section = sec_descr->sect_in[i]->Misc.VirtualSize + - sec_descr->sect_in[i]->VirtualAddress; - DWORD phys_end_of_section = sec_descr->sect_in[i]->SizeOfRawData + - sec_descr->sect_in[i]->PointerToRawData; - memcpy( sec + nt->FileHeader.NumberOfSections, sec_descr->sect_in[i], - sizeof(sec[0]) ); - nt->FileHeader.NumberOfSections++; - if ( opt->SizeOfImage < virt_end_of_section ) - opt->SizeOfImage = virt_end_of_section; - if ( file_size < phys_end_of_section ) - file_size = phys_end_of_section; - } - - file = CreateFile(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - ok (file != INVALID_HANDLE_VALUE, "failed to create file\n"); - - /* write out the header */ - WriteFile( file, page, sizeof page, &written, NULL ); - - /* write out zeroed pages for sections */ - memset( page, 0, sizeof page ); - for ( i = page_size; i < file_size; i += page_size ) - { - DWORD size = min(page_size, file_size - i); - WriteFile( file, page, size, &written, NULL ); - } - - CloseHandle( file ); - - return 0; -} - -static void update_missing_exe( void ) -{ - HANDLE res; - - SetLastError(0xdeadbeef); - res = BeginUpdateResource( filename, TRUE ); - GLE = GetLastError(); - ok( res == NULL, "BeginUpdateResource should fail\n"); -} - -static void update_empty_exe( void ) -{ - HANDLE file, res, test; - BOOL r; - - file = CreateFile(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - ok (file != INVALID_HANDLE_VALUE, "failed to create file\n"); - - CloseHandle( file ); - - res = BeginUpdateResource( filename, TRUE ); - if ( res != NULL || GetLastError() != ERROR_FILE_INVALID ) - { - ok( res != NULL, "BeginUpdateResource failed\n"); - - /* check if it's possible to open the file now */ - test = CreateFile(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0); - ok (test != INVALID_HANDLE_VALUE, "failed to create file\n"); - - CloseHandle( test ); - - r = EndUpdateResource( res, FALSE ); - ok( r == FALSE, "EndUpdateResource failed\n"); - } - else - skip( "Can't update resource in empty file\n" ); - - res = BeginUpdateResource( filename, FALSE ); - ok( res == NULL, "BeginUpdateResource failed\n"); -} - -static void update_resources_none( void ) -{ - HMODULE res; - BOOL r; - - res = BeginUpdateResource( filename, FALSE ); - ok( res != NULL, "BeginUpdateResource failed\n"); - - r = EndUpdateResource( res, FALSE ); - ok( r, "EndUpdateResource failed\n"); -} - -static void update_resources_delete( void ) -{ - HMODULE res; - BOOL r; - - res = BeginUpdateResource( filename, TRUE ); - ok( res != NULL, "BeginUpdateResource failed\n"); - - r = EndUpdateResource( res, FALSE ); - ok( r, "EndUpdateResource failed\n"); -} - -static void update_resources_version( void ) -{ - HANDLE res = NULL; - BOOL r; - char foo[] = "red and white"; - - res = BeginUpdateResource( filename, TRUE ); - ok( res != NULL, "BeginUpdateResource failed\n"); - - if (0) /* this causes subsequent tests to fail on Vista */ - { - r = UpdateResource( res, - MAKEINTRESOURCE(0x1230), - MAKEINTRESOURCE(0x4567), - 0xabcd, - NULL, 0 ); - ok( r == FALSE, "UpdateResource failed\n"); - } - - r = UpdateResource( res, - MAKEINTRESOURCE(0x1230), - MAKEINTRESOURCE(0x4567), - 0xabcd, - foo, sizeof foo ); - ok( r == TRUE, "UpdateResource failed: %d\n", GetLastError()); - - r = EndUpdateResource( res, FALSE ); - ok( r, "EndUpdateResource failed: %d\n", GetLastError()); -} - -static void update_resources_bigdata( void ) -{ - HANDLE res = NULL; - BOOL r; - char foo[2*page_size] = "foobar"; - - res = BeginUpdateResource( filename, TRUE ); - ok( res != NULL, "BeginUpdateResource succeeded\n"); - - r = UpdateResource( res, - MAKEINTRESOURCE(0x3012), - MAKEINTRESOURCE(0x5647), - 0xcdba, - foo, sizeof foo ); - ok( r == TRUE, "UpdateResource failed: %d\n", GetLastError()); - - r = EndUpdateResource( res, FALSE ); - ok( r, "EndUpdateResource failed\n"); -} - -static void check_exe( const sec_verify *verify ) -{ - int i; - IMAGE_DOS_HEADER *dos; - IMAGE_NT_HEADERS *nt; - IMAGE_SECTION_HEADER *sec; - IMAGE_RESOURCE_DIRECTORY *dir; - HANDLE file, mapping; - DWORD length, sec_count = 0; - - file = CreateFile(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0); - ok (file != INVALID_HANDLE_VALUE, "failed to create file (%d)\n", GetLastError()); - - length = GetFileSize( file, NULL ); - ok( length >= verify->length, "file size wrong\n"); - - mapping = CreateFileMapping( file, NULL, PAGE_READONLY, 0, 0, NULL ); - ok (mapping != NULL, "failed to create file\n"); - - dos = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, length ); - ok( dos != NULL, "failed to map file\n"); - - if (!dos) - goto end; - - nt = (void*) ((BYTE*) dos + dos->e_lfanew); - sec = (void*) &nt[1]; - - for(i = 0; i < max_sections; i++) - if (verify->sect_out[i]) - { - ok( !memcmp(&verify->sect_out[i]->Name, &sec[sec_count].Name, 8), "section %d name wrong\n", sec_count); - ok( verify->sect_out[i]->VirtualAddress == sec[sec_count].VirtualAddress, "section %d vaddr wrong\n", sec_count); - ok( verify->sect_out[i]->SizeOfRawData <= sec[sec_count].SizeOfRawData, "section %d SizeOfRawData wrong (%d vs %d)\n", sec_count, verify->sect_out[i]->SizeOfRawData ,sec[sec_count].SizeOfRawData); - ok( verify->sect_out[i]->PointerToRawData == sec[sec_count].PointerToRawData, "section %d PointerToRawData wrong\n", sec_count); - ok( verify->sect_out[i]->Characteristics == sec[sec_count].Characteristics , "section %d characteristics wrong\n", sec_count); - sec_count++; - } - - ok( nt->FileHeader.NumberOfSections == sec_count, "number of sections wrong\n" ); - - if (verify->rsrc_section >= 0 && verify->rsrc_section < nt->FileHeader.NumberOfSections) - { - dir = (void*) ((BYTE*) dos + sec[verify->rsrc_section].VirtualAddress); - - ok( dir->Characteristics == 0, "Characteristics wrong\n"); - ok( dir->TimeDateStamp == 0 || abs( dir->TimeDateStamp - GetTickCount() ) < 1000 /* nt4 */, - "TimeDateStamp wrong %u\n", dir->TimeDateStamp); - ok( dir->MajorVersion == 4, "MajorVersion wrong\n"); - ok( dir->MinorVersion == 0, "MinorVersion wrong\n"); - - ok( dir->NumberOfNamedEntries == verify->NumberOfNamedEntries, "NumberOfNamedEntries should be %d instead of %d\n", - verify->NumberOfNamedEntries, dir->NumberOfNamedEntries); - ok( dir->NumberOfIdEntries == verify->NumberOfIdEntries, "NumberOfIdEntries should be %d instead of %d\n", - verify->NumberOfIdEntries, dir->NumberOfIdEntries); - } - -end: - UnmapViewOfFile( dos ); - - CloseHandle( mapping ); - - CloseHandle( file ); -} - -static void test_find_resource(void) -{ - HRSRC rsrc; - - rsrc = FindResourceW( GetModuleHandle(0), (LPCWSTR)MAKEINTRESOURCE(1), (LPCWSTR)RT_MENU ); - ok( rsrc != 0, "resource not found\n" ); - rsrc = FindResourceExW( GetModuleHandle(0), (LPCWSTR)RT_MENU, (LPCWSTR)MAKEINTRESOURCE(1), - MAKELANGID( LANG_NEUTRAL, SUBLANG_NEUTRAL )); - ok( rsrc != 0, "resource not found\n" ); - rsrc = FindResourceExW( GetModuleHandle(0), (LPCWSTR)RT_MENU, (LPCWSTR)MAKEINTRESOURCE(1), - MAKELANGID( LANG_GERMAN, SUBLANG_DEFAULT )); - ok( rsrc != 0, "resource not found\n" ); - - SetLastError( 0xdeadbeef ); - rsrc = FindResourceW( GetModuleHandle(0), (LPCWSTR)MAKEINTRESOURCE(1), (LPCWSTR)RT_DIALOG ); - ok( !rsrc, "resource found\n" ); - ok( GetLastError() == ERROR_RESOURCE_TYPE_NOT_FOUND, "wrong error %u\n", GetLastError() ); - - SetLastError( 0xdeadbeef ); - rsrc = FindResourceW( GetModuleHandle(0), (LPCWSTR)MAKEINTRESOURCE(2), (LPCWSTR)RT_MENU ); - ok( !rsrc, "resource found\n" ); - ok( GetLastError() == ERROR_RESOURCE_NAME_NOT_FOUND, "wrong error %u\n", GetLastError() ); - - SetLastError( 0xdeadbeef ); - rsrc = FindResourceExW( GetModuleHandle(0), (LPCWSTR)RT_MENU, (LPCWSTR)MAKEINTRESOURCE(1), - MAKELANGID( LANG_ENGLISH, SUBLANG_DEFAULT ) ); - ok( !rsrc, "resource found\n" ); - ok( GetLastError() == ERROR_RESOURCE_LANG_NOT_FOUND, "wrong error %u\n", GetLastError() ); - - SetLastError( 0xdeadbeef ); - rsrc = FindResourceExW( GetModuleHandle(0), (LPCWSTR)RT_MENU, (LPCWSTR)MAKEINTRESOURCE(1), - MAKELANGID( LANG_FRENCH, SUBLANG_DEFAULT ) ); - ok( !rsrc, "resource found\n" ); - ok( GetLastError() == ERROR_RESOURCE_LANG_NOT_FOUND, "wrong error %u\n", GetLastError() ); -} - -START_TEST(resource) -{ - DWORD i; - - DeleteFile( filename ); - update_missing_exe(); - - if (GLE == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("Resource calls are not implemented\n"); - return; - } - - update_empty_exe(); - - for(i=0; i < sizeof( sec_variants ) / sizeof( sec_variants[0] ); i++) - { - const struct _sec_variants *sec = &sec_variants[i]; - build_exe( &sec->build ); - update_resources_none(); - check_exe( &sec->chk_none ); - update_resources_delete(); - check_exe( &sec->chk_delete ); - update_resources_version(); - check_exe( &sec->chk_version ); - update_resources_bigdata(); - check_exe( &sec->chk_bigdata ); - DeleteFile( filename ); - } - test_find_resource(); -} diff --git a/rostests/winetests/kernel32/resource.rc b/rostests/winetests/kernel32/resource.rc deleted file mode 100644 index f40a87819ea..00000000000 --- a/rostests/winetests/kernel32/resource.rc +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Resources for kernel test suite. - * - * Copyright 2008 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 - */ - -#include "windef.h" - -1 MENU LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT -{ - MENUITEM "foo", 1 -} diff --git a/rostests/winetests/kernel32/sync.c b/rostests/winetests/kernel32/sync.c deleted file mode 100755 index 98d996fabe7..00000000000 --- a/rostests/winetests/kernel32/sync.c +++ /dev/null @@ -1,1088 +0,0 @@ -/* - * Synchronization tests - * - * Copyright 2005 Mike McCormack 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 - */ - -#define _WIN32_WINNT 0x500 -#include -#include -#include -#include -#include - -#include "wine/test.h" - -static BOOL (WINAPI *pChangeTimerQueueTimer)(HANDLE, HANDLE, ULONG, ULONG); -static HANDLE (WINAPI *pCreateTimerQueue)(void); -static BOOL (WINAPI *pCreateTimerQueueTimer)(PHANDLE, HANDLE, WAITORTIMERCALLBACK, - PVOID, DWORD, DWORD, ULONG); -static HANDLE (WINAPI *pCreateWaitableTimerA)(SECURITY_ATTRIBUTES*,BOOL,LPCSTR); -static BOOL (WINAPI *pDeleteTimerQueueEx)(HANDLE, HANDLE); -static BOOL (WINAPI *pDeleteTimerQueueTimer)(HANDLE, HANDLE, HANDLE); -static HANDLE (WINAPI *pOpenWaitableTimerA)(DWORD,BOOL,LPCSTR); - -static void test_signalandwait(void) -{ - DWORD (WINAPI *pSignalObjectAndWait)(HANDLE, HANDLE, DWORD, BOOL); - HMODULE kernel32; - DWORD r; - HANDLE event[2], semaphore[2], file; - - kernel32 = GetModuleHandle("kernel32"); - pSignalObjectAndWait = (void*) GetProcAddress(kernel32, "SignalObjectAndWait"); - - if (!pSignalObjectAndWait) - return; - - /* invalid parameters */ - r = pSignalObjectAndWait(NULL, NULL, 0, 0); - if (r == ERROR_INVALID_FUNCTION) - { - win_skip("SignalObjectAndWait is not implemented\n"); - return; /* Win98/ME */ - } - ok( r == WAIT_FAILED, "should fail\n"); - - event[0] = CreateEvent(NULL, 0, 0, NULL); - event[1] = CreateEvent(NULL, 1, 1, NULL); - - ok( event[0] && event[1], "failed to create event flags\n"); - - r = pSignalObjectAndWait(event[0], NULL, 0, FALSE); - ok( r == WAIT_FAILED, "should fail\n"); - - r = pSignalObjectAndWait(NULL, event[0], 0, FALSE); - ok( r == WAIT_FAILED, "should fail\n"); - - - /* valid parameters */ - r = pSignalObjectAndWait(event[0], event[1], 0, FALSE); - ok( r == WAIT_OBJECT_0, "should succeed\n"); - - /* event[0] is now signalled */ - r = pSignalObjectAndWait(event[0], event[0], 0, FALSE); - ok( r == WAIT_OBJECT_0, "should succeed\n"); - - /* event[0] is not signalled */ - r = WaitForSingleObject(event[0], 0); - ok( r == WAIT_TIMEOUT, "event was signalled\n"); - - r = pSignalObjectAndWait(event[0], event[0], 0, FALSE); - ok( r == WAIT_OBJECT_0, "should succeed\n"); - - /* clear event[1] and check for a timeout */ - ok(ResetEvent(event[1]), "failed to clear event[1]\n"); - r = pSignalObjectAndWait(event[0], event[1], 0, FALSE); - ok( r == WAIT_TIMEOUT, "should timeout\n"); - - CloseHandle(event[0]); - CloseHandle(event[1]); - - /* semaphores */ - semaphore[0] = CreateSemaphore( NULL, 0, 1, NULL ); - semaphore[1] = CreateSemaphore( NULL, 1, 1, NULL ); - ok( semaphore[0] && semaphore[1], "failed to create semaphore\n"); - - r = pSignalObjectAndWait(semaphore[0], semaphore[1], 0, FALSE); - ok( r == WAIT_OBJECT_0, "should succeed\n"); - - r = pSignalObjectAndWait(semaphore[0], semaphore[1], 0, FALSE); - ok( r == WAIT_FAILED, "should fail\n"); - - r = ReleaseSemaphore(semaphore[0],1,NULL); - ok( r == FALSE, "should fail\n"); - - r = ReleaseSemaphore(semaphore[1],1,NULL); - ok( r == TRUE, "should succeed\n"); - - CloseHandle(semaphore[0]); - CloseHandle(semaphore[1]); - - /* try a registry key */ - file = CreateFile("x", GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL | FILE_FLAG_DELETE_ON_CLOSE, NULL); - r = pSignalObjectAndWait(file, file, 0, FALSE); - ok( r == WAIT_FAILED, "should fail\n"); - ok( ERROR_INVALID_HANDLE == GetLastError(), "should return invalid handle error\n"); - CloseHandle(file); -} - -static void test_mutex(void) -{ - DWORD wait_ret; - BOOL ret; - HANDLE hCreated; - HANDLE hOpened; - int i; - DWORD failed = 0; - - hCreated = CreateMutex(NULL, FALSE, "WineTestMutex"); - ok(hCreated != NULL, "CreateMutex failed with error %d\n", GetLastError()); - - hOpened = OpenMutex(0, FALSE, "WineTestMutex"); - ok(hOpened == NULL, "OpenMutex succeded\n"); - - hOpened = OpenMutex(GENERIC_EXECUTE, FALSE, "WineTestMutex"); - ok(hOpened != NULL, "OpenMutex failed with error %d\n", GetLastError()); - wait_ret = WaitForSingleObject(hOpened, INFINITE); - ok(wait_ret == WAIT_OBJECT_0, "WaitForSingleObject failed with error %d\n", GetLastError()); - CloseHandle(hOpened); - - for(i=0; i < 31; i++) - { - wait_ret = WaitForSingleObject(hCreated, INFINITE); - ok(wait_ret == WAIT_OBJECT_0, "WaitForSingleObject failed with error 0x%08x\n", wait_ret); - } - - hOpened = OpenMutex(GENERIC_READ | GENERIC_WRITE, FALSE, "WineTestMutex"); - ok(hOpened != NULL, "OpenMutex failed with error %d\n", GetLastError()); - wait_ret = WaitForSingleObject(hOpened, INFINITE); - ok(wait_ret == WAIT_FAILED, "WaitForSingleObject succeeded\n"); - CloseHandle(hOpened); - - for (i = 0; i < 32; i++) - { - hOpened = OpenMutex(0x1 << i, FALSE, "WineTestMutex"); - if(hOpened != NULL) - { - ret = ReleaseMutex(hOpened); - ok(ret, "ReleaseMutex failed with error %d, access %x\n", GetLastError(), 1 << i); - CloseHandle(hOpened); - } - else - { - ReleaseMutex(hCreated); - failed |=0x1 << i; - } - } - - ok( failed == 0x0de0fffe, "open succeded when it shouldn't: %x\n", failed); - - ret = ReleaseMutex(hCreated); - ok(!ret && (GetLastError() == ERROR_NOT_OWNER), - "ReleaseMutex should have failed with ERROR_NOT_OWNER instead of %d\n", GetLastError()); - - /* test case sensitivity */ - - SetLastError(0xdeadbeef); - hOpened = OpenMutex(READ_CONTROL, FALSE, "WINETESTMUTEX"); - ok(!hOpened, "OpenMutex succeeded\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - hOpened = OpenMutex(READ_CONTROL, FALSE, "winetestmutex"); - ok(!hOpened, "OpenMutex succeeded\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - hOpened = CreateMutex(NULL, FALSE, "WineTestMutex"); - ok(hOpened != NULL, "CreateMutex failed with error %d\n", GetLastError()); - ok(GetLastError() == ERROR_ALREADY_EXISTS, "wrong error %u\n", GetLastError()); - CloseHandle(hOpened); - - SetLastError(0xdeadbeef); - hOpened = CreateMutex(NULL, FALSE, "WINETESTMUTEX"); - ok(hOpened != NULL, "CreateMutex failed with error %d\n", GetLastError()); - ok(GetLastError() == 0, "wrong error %u\n", GetLastError()); - CloseHandle(hOpened); - - CloseHandle(hCreated); -} - -static void test_slist(void) -{ - struct item - { - SLIST_ENTRY entry; - int value; - } item1, item2, item3, *pitem; - - SLIST_HEADER slist_header; - PSLIST_ENTRY entry; - USHORT size; - - VOID (WINAPI *pInitializeSListHead)(PSLIST_HEADER); - USHORT (WINAPI *pQueryDepthSList)(PSLIST_HEADER); - PSLIST_ENTRY (WINAPI *pInterlockedFlushSList)(PSLIST_HEADER); - PSLIST_ENTRY (WINAPI *pInterlockedPopEntrySList)(PSLIST_HEADER); - PSLIST_ENTRY (WINAPI *pInterlockedPushEntrySList)(PSLIST_HEADER,PSLIST_ENTRY); - HMODULE kernel32; - - kernel32 = GetModuleHandle("KERNEL32.DLL"); - pInitializeSListHead = (void*) GetProcAddress(kernel32, "InitializeSListHead"); - pQueryDepthSList = (void*) GetProcAddress(kernel32, "QueryDepthSList"); - pInterlockedFlushSList = (void*) GetProcAddress(kernel32, "InterlockedFlushSList"); - pInterlockedPopEntrySList = (void*) GetProcAddress(kernel32, "InterlockedPopEntrySList"); - pInterlockedPushEntrySList = (void*) GetProcAddress(kernel32, "InterlockedPushEntrySList"); - if (pInitializeSListHead == NULL || - pQueryDepthSList == NULL || - pInterlockedFlushSList == NULL || - pInterlockedPopEntrySList == NULL || - pInterlockedPushEntrySList == NULL) - { - win_skip("some required slist entrypoints were not found, skipping tests\n"); - return; - } - - memset(&slist_header, 0xFF, sizeof(slist_header)); - pInitializeSListHead(&slist_header); - size = pQueryDepthSList(&slist_header); - ok(size == 0, "initially created slist has size %d, expected 0\n", size); - - item1.value = 1; - ok(pInterlockedPushEntrySList(&slist_header, &item1.entry) == NULL, - "previous entry in empty slist wasn't NULL\n"); - size = pQueryDepthSList(&slist_header); - ok(size == 1, "slist with 1 item has size %d\n", size); - - item2.value = 2; - entry = pInterlockedPushEntrySList(&slist_header, &item2.entry); - ok(entry != NULL, "previous entry in non-empty slist was NULL\n"); - if (entry != NULL) - { - pitem = (struct item*) entry; - ok(pitem->value == 1, "previous entry in slist wasn't the one added\n"); - } - size = pQueryDepthSList(&slist_header); - ok(size == 2, "slist with 2 items has size %d\n", size); - - item3.value = 3; - entry = pInterlockedPushEntrySList(&slist_header, &item3.entry); - ok(entry != NULL, "previous entry in non-empty slist was NULL\n"); - if (entry != NULL) - { - pitem = (struct item*) entry; - ok(pitem->value == 2, "previous entry in slist wasn't the one added\n"); - } - size = pQueryDepthSList(&slist_header); - ok(size == 3, "slist with 3 items has size %d\n", size); - - entry = pInterlockedPopEntrySList(&slist_header); - ok(entry != NULL, "entry shouldn't be NULL\n"); - if (entry != NULL) - { - pitem = (struct item*) entry; - ok(pitem->value == 3, "unexpected entry removed\n"); - } - size = pQueryDepthSList(&slist_header); - ok(size == 2, "slist with 2 items has size %d\n", size); - - entry = pInterlockedFlushSList(&slist_header); - size = pQueryDepthSList(&slist_header); - ok(size == 0, "flushed slist should be empty, size is %d\n", size); - if (size == 0) - { - ok(pInterlockedPopEntrySList(&slist_header) == NULL, - "popping empty slist didn't return NULL\n"); - } - ok(((struct item*)entry)->value == 2, "item 2 not in front of list\n"); - ok(((struct item*)entry->Next)->value == 1, "item 1 not at the back of list\n"); -} - -static void test_event(void) -{ - HANDLE handle, handle2; - SECURITY_ATTRIBUTES sa; - SECURITY_DESCRIPTOR sd; - ACL acl; - - /* no sd */ - handle = CreateEventA(NULL, FALSE, FALSE, __FILE__ ": Test Event"); - ok(handle != NULL, "CreateEventW with blank sd failed with error %d\n", GetLastError()); - CloseHandle(handle); - - sa.nLength = sizeof(sa); - sa.lpSecurityDescriptor = &sd; - sa.bInheritHandle = FALSE; - - InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION); - - /* blank sd */ - handle = CreateEventA(&sa, FALSE, FALSE, __FILE__ ": Test Event"); - ok(handle != NULL, "CreateEventW with blank sd failed with error %d\n", GetLastError()); - CloseHandle(handle); - - /* sd with NULL dacl */ - SetSecurityDescriptorDacl(&sd, TRUE, NULL, FALSE); - handle = CreateEventA(&sa, FALSE, FALSE, __FILE__ ": Test Event"); - ok(handle != NULL, "CreateEventW with blank sd failed with error %d\n", GetLastError()); - CloseHandle(handle); - - /* sd with empty dacl */ - InitializeAcl(&acl, sizeof(acl), ACL_REVISION); - SetSecurityDescriptorDacl(&sd, TRUE, &acl, FALSE); - handle = CreateEventA(&sa, FALSE, FALSE, __FILE__ ": Test Event"); - ok(handle != NULL, "CreateEventW with blank sd failed with error %d\n", GetLastError()); - CloseHandle(handle); - - /* test case sensitivity */ - - SetLastError(0xdeadbeef); - handle = CreateEventA(NULL, FALSE, FALSE, __FILE__ ": Test Event"); - ok( handle != NULL, "CreateEvent failed with error %u\n", GetLastError()); - ok( GetLastError() == 0, "wrong error %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - handle2 = CreateEventA(NULL, FALSE, FALSE, __FILE__ ": Test Event"); - ok( handle2 != NULL, "CreateEvent failed with error %d\n", GetLastError()); - ok( GetLastError() == ERROR_ALREADY_EXISTS, "wrong error %u\n", GetLastError()); - CloseHandle( handle2 ); - - SetLastError(0xdeadbeef); - handle2 = CreateEventA(NULL, FALSE, FALSE, __FILE__ ": TEST EVENT"); - ok( handle2 != NULL, "CreateEvent failed with error %d\n", GetLastError()); - ok( GetLastError() == 0, "wrong error %u\n", GetLastError()); - CloseHandle( handle2 ); - - SetLastError(0xdeadbeef); - handle2 = OpenEventA( EVENT_ALL_ACCESS, FALSE, __FILE__ ": Test Event"); - ok( handle2 != NULL, "OpenEvent failed with error %d\n", GetLastError()); - CloseHandle( handle2 ); - - SetLastError(0xdeadbeef); - handle2 = OpenEventA( EVENT_ALL_ACCESS, FALSE, __FILE__ ": TEST EVENT"); - ok( !handle2, "OpenEvent succeeded\n"); - ok( GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError()); - - CloseHandle( handle ); -} - -static void test_semaphore(void) -{ - HANDLE handle, handle2; - - /* test case sensitivity */ - - SetLastError(0xdeadbeef); - handle = CreateSemaphoreA(NULL, 0, 1, __FILE__ ": Test Semaphore"); - ok(handle != NULL, "CreateSemaphore failed with error %u\n", GetLastError()); - ok(GetLastError() == 0, "wrong error %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - handle2 = CreateSemaphoreA(NULL, 0, 1, __FILE__ ": Test Semaphore"); - ok( handle2 != NULL, "CreateSemaphore failed with error %d\n", GetLastError()); - ok( GetLastError() == ERROR_ALREADY_EXISTS, "wrong error %u\n", GetLastError()); - CloseHandle( handle2 ); - - SetLastError(0xdeadbeef); - handle2 = CreateSemaphoreA(NULL, 0, 1, __FILE__ ": TEST SEMAPHORE"); - ok( handle2 != NULL, "CreateSemaphore failed with error %d\n", GetLastError()); - ok( GetLastError() == 0, "wrong error %u\n", GetLastError()); - CloseHandle( handle2 ); - - SetLastError(0xdeadbeef); - handle2 = OpenSemaphoreA( SEMAPHORE_ALL_ACCESS, FALSE, __FILE__ ": Test Semaphore"); - ok( handle2 != NULL, "OpenSemaphore failed with error %d\n", GetLastError()); - CloseHandle( handle2 ); - - SetLastError(0xdeadbeef); - handle2 = OpenSemaphoreA( SEMAPHORE_ALL_ACCESS, FALSE, __FILE__ ": TEST SEMAPHORE"); - ok( !handle2, "OpenSemaphore succeeded\n"); - ok( GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError()); - - CloseHandle( handle ); -} - -static void test_waitable_timer(void) -{ - HANDLE handle, handle2; - - if (!pCreateWaitableTimerA || !pOpenWaitableTimerA) - { - win_skip("{Create,Open}WaitableTimerA() is not available\n"); - return; - } - - /* test case sensitivity */ - - SetLastError(0xdeadbeef); - handle = pCreateWaitableTimerA(NULL, FALSE, __FILE__ ": Test WaitableTimer"); - ok(handle != NULL, "CreateWaitableTimer failed with error %u\n", GetLastError()); - ok(GetLastError() == 0, "wrong error %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - handle2 = pCreateWaitableTimerA(NULL, FALSE, __FILE__ ": Test WaitableTimer"); - ok( handle2 != NULL, "CreateWaitableTimer failed with error %d\n", GetLastError()); - ok( GetLastError() == ERROR_ALREADY_EXISTS, "wrong error %u\n", GetLastError()); - CloseHandle( handle2 ); - - SetLastError(0xdeadbeef); - handle2 = pCreateWaitableTimerA(NULL, FALSE, __FILE__ ": TEST WAITABLETIMER"); - ok( handle2 != NULL, "CreateWaitableTimer failed with error %d\n", GetLastError()); - ok( GetLastError() == 0, "wrong error %u\n", GetLastError()); - CloseHandle( handle2 ); - - SetLastError(0xdeadbeef); - handle2 = pOpenWaitableTimerA( TIMER_ALL_ACCESS, FALSE, __FILE__ ": Test WaitableTimer"); - ok( handle2 != NULL, "OpenWaitableTimer failed with error %d\n", GetLastError()); - CloseHandle( handle2 ); - - SetLastError(0xdeadbeef); - handle2 = pOpenWaitableTimerA( TIMER_ALL_ACCESS, FALSE, __FILE__ ": TEST WAITABLETIMER"); - ok( !handle2, "OpenWaitableTimer succeeded\n"); - ok( GetLastError() == ERROR_FILE_NOT_FOUND || - GetLastError() == ERROR_INVALID_NAME, /* win98 */ - "wrong error %u\n", GetLastError()); - - CloseHandle( handle ); -} - -static HANDLE sem = 0; - -static void CALLBACK iocp_callback(DWORD dwErrorCode, DWORD dwNumberOfBytesTransferred, LPOVERLAPPED lpOverlapped) -{ - ReleaseSemaphore(sem, 1, NULL); -} - -static BOOL (WINAPI *p_BindIoCompletionCallback)( HANDLE FileHandle, LPOVERLAPPED_COMPLETION_ROUTINE Function, ULONG Flags) = NULL; - -static void test_iocp_callback(void) -{ - char temp_path[MAX_PATH]; - char filename[MAX_PATH]; - DWORD ret; - BOOL retb; - static const char prefix[] = "pfx"; - HANDLE hFile; - HMODULE hmod = GetModuleHandleA("kernel32.dll"); - DWORD bytesWritten; - const char *buffer = "12345678123456781234567812345678"; - OVERLAPPED overlapped; - - p_BindIoCompletionCallback = (void*)GetProcAddress(hmod, "BindIoCompletionCallback"); - if(!p_BindIoCompletionCallback) { - win_skip("BindIoCompletionCallback not found in this DLL\n"); - return; - } - - sem = CreateSemaphore(NULL, 0, 1, NULL); - ok(sem != INVALID_HANDLE_VALUE, "Creating a semaphore failed\n"); - - ret = GetTempPathA(MAX_PATH, temp_path); - ok(ret != 0, "GetTempPathA error %d\n", GetLastError()); - ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n"); - - ret = GetTempFileNameA(temp_path, prefix, 0, filename); - ok(ret != 0, "GetTempFileNameA error %d\n", GetLastError()); - - hFile = CreateFileA(filename, GENERIC_READ | GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_FLAG_RANDOM_ACCESS, 0); - ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA: error %d\n", GetLastError()); - - retb = p_BindIoCompletionCallback(hFile, iocp_callback, 0); - ok(retb == FALSE, "BindIoCompletionCallback succeeded on a file that wasn't created with FILE_FLAG_OVERLAPPED\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Last error is %d\n", GetLastError()); - - ret = CloseHandle(hFile); - ok( ret, "CloseHandle: error %d\n", GetLastError()); - ret = DeleteFileA(filename); - ok( ret, "DeleteFileA: error %d\n", GetLastError()); - - hFile = CreateFileA(filename, GENERIC_READ | GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_FLAG_RANDOM_ACCESS | FILE_FLAG_OVERLAPPED, 0); - ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA: error %d\n", GetLastError()); - - retb = p_BindIoCompletionCallback(hFile, iocp_callback, 0); - ok(retb == TRUE, "BindIoCompletionCallback failed\n"); - - memset(&overlapped, 0, sizeof(overlapped)); - retb = WriteFile(hFile, buffer, 4, &bytesWritten, &overlapped); - ok(retb == TRUE || GetLastError() == ERROR_IO_PENDING, "WriteFile failed, lastError = %d\n", GetLastError()); - - ret = WaitForSingleObject(sem, 5000); - ok(ret == WAIT_OBJECT_0, "Wait for the IO completion callback failed\n"); - CloseHandle(sem); - - retb = p_BindIoCompletionCallback(hFile, iocp_callback, 0); - ok(retb == FALSE, "BindIoCompletionCallback succeeded when setting the same callback on the file again\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Last error is %d\n", GetLastError()); - retb = p_BindIoCompletionCallback(hFile, NULL, 0); - ok(retb == FALSE, "BindIoCompletionCallback succeeded when setting the callback to NULL\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Last error is %d\n", GetLastError()); - - ret = CloseHandle(hFile); - ok( ret, "CloseHandle: error %d\n", GetLastError()); - ret = DeleteFileA(filename); - ok( ret, "DeleteFileA: error %d\n", GetLastError()); - - /* win2k3 requires the Flags parameter to be zero */ - SetLastError(0xdeadbeef); - hFile = CreateFileA(filename, GENERIC_READ | GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_FLAG_RANDOM_ACCESS | FILE_FLAG_OVERLAPPED, 0); - ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA: error %d\n", GetLastError()); - retb = p_BindIoCompletionCallback(hFile, iocp_callback, 12345); - if (!retb) - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - else - ok(retb == TRUE, "BindIoCompletionCallback failed with Flags != 0\n"); - ret = CloseHandle(hFile); - ok( ret, "CloseHandle: error %d\n", GetLastError()); - ret = DeleteFileA(filename); - ok( ret, "DeleteFileA: error %d\n", GetLastError()); - - retb = p_BindIoCompletionCallback(NULL, iocp_callback, 0); - ok(retb == FALSE, "BindIoCompletionCallback succeeded on a NULL file\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE || - GetLastError() == ERROR_INVALID_PARAMETER, /* vista */ - "Last error is %d\n", GetLastError()); -} - -static void CALLBACK timer_queue_cb1(PVOID p, BOOLEAN timedOut) -{ - int *pn = p; - ok(timedOut, "Timer callbacks should always time out\n"); - ++*pn; -} - -struct timer_queue_data1 -{ - int num_calls; - int max_calls; - HANDLE q, t; -}; - -static void CALLBACK timer_queue_cb2(PVOID p, BOOLEAN timedOut) -{ - struct timer_queue_data1 *d = p; - ok(timedOut, "Timer callbacks should always time out\n"); - if (d->t && ++d->num_calls == d->max_calls) - { - BOOL ret; - SetLastError(0xdeadbeef); - /* Note, XP SP2 does *not* do any deadlock checking, so passing - INVALID_HANDLE_VALUE here will just hang. */ - ret = pDeleteTimerQueueTimer(d->q, d->t, NULL); - ok(!ret, "DeleteTimerQueueTimer\n"); - ok(GetLastError() == ERROR_IO_PENDING, "DeleteTimerQueueTimer\n"); - } -} - -static void CALLBACK timer_queue_cb3(PVOID p, BOOLEAN timedOut) -{ - struct timer_queue_data1 *d = p; - ok(timedOut, "Timer callbacks should always time out\n"); - if (d->t && ++d->num_calls == d->max_calls) - { - /* Basically kill the timer since it won't have time to run - again. */ - BOOL ret = pChangeTimerQueueTimer(d->q, d->t, 10000, 0); - ok(ret, "ChangeTimerQueueTimer\n"); - } -} - -static void CALLBACK timer_queue_cb4(PVOID p, BOOLEAN timedOut) -{ - struct timer_queue_data1 *d = p; - ok(timedOut, "Timer callbacks should always time out\n"); - if (d->t) - { - /* This tests whether a timer gets flagged for deletion before - or after the callback runs. If we start this timer with a - period of zero (run once), then ChangeTimerQueueTimer will - fail if the timer is already flagged. Hence we really run - only once. Otherwise we will run multiple times. */ - BOOL ret = pChangeTimerQueueTimer(d->q, d->t, 50, 50); - ok(ret, "ChangeTimerQueueTimer\n"); - ++d->num_calls; - } -} - -static void CALLBACK timer_queue_cb5(PVOID p, BOOLEAN timedOut) -{ - DWORD_PTR delay = (DWORD_PTR) p; - ok(timedOut, "Timer callbacks should always time out\n"); - if (delay) - Sleep(delay); -} - -static void CALLBACK timer_queue_cb6(PVOID p, BOOLEAN timedOut) -{ - struct timer_queue_data1 *d = p; - ok(timedOut, "Timer callbacks should always time out\n"); - /* This tests an original implementation bug where a deleted timer may get - to run, but it is tricky to set up. */ - if (d->q && d->num_calls++ == 0) - { - /* First run: delete ourselves, then insert and remove a timer - that goes in front of us in the sorted timeout list. Once - removed, we will still timeout at the faster timer's due time, - but this should be a no-op if we are bug-free. There should - not be a second run. We can test the value of num_calls later. */ - BOOL ret; - HANDLE t; - - /* The delete will pend while we are in this callback. */ - SetLastError(0xdeadbeef); - ret = pDeleteTimerQueueTimer(d->q, d->t, NULL); - ok(!ret, "DeleteTimerQueueTimer\n"); - ok(GetLastError() == ERROR_IO_PENDING, "DeleteTimerQueueTimer\n"); - - ret = pCreateTimerQueueTimer(&t, d->q, timer_queue_cb1, NULL, 100, 0, 0); - ok(ret, "CreateTimerQueueTimer\n"); - ok(t != NULL, "CreateTimerQueueTimer\n"); - - ret = pDeleteTimerQueueTimer(d->q, t, INVALID_HANDLE_VALUE); - ok(ret, "DeleteTimerQueueTimer\n"); - - /* Now we stay alive by hanging around in the callback. */ - Sleep(500); - } -} - -static void test_timer_queue(void) -{ - HANDLE q, t1, t2, t3, t4, t5; - int n1, n2, n3, n4, n5; - struct timer_queue_data1 d1, d2, d3, d4; - HANDLE e, et1, et2; - BOOL ret; - - if (!pChangeTimerQueueTimer || !pCreateTimerQueue || !pCreateTimerQueueTimer - || !pDeleteTimerQueueEx || !pDeleteTimerQueueTimer) - { - win_skip("TimerQueue API not present\n"); - return; - } - - /* Test asynchronous deletion of the queue. */ - q = pCreateTimerQueue(); - ok(q != NULL, "CreateTimerQueue\n"); - - SetLastError(0xdeadbeef); - ret = pDeleteTimerQueueEx(q, NULL); - ok(ret /* vista */ || GetLastError() == ERROR_IO_PENDING, - "DeleteTimerQueueEx, GetLastError: expected ERROR_IO_PENDING, got %d\n", - GetLastError()); - - /* Test synchronous deletion of the queue and running timers. */ - q = pCreateTimerQueue(); - ok(q != NULL, "CreateTimerQueue\n"); - - /* Called once. */ - t1 = NULL; - n1 = 0; - ret = pCreateTimerQueueTimer(&t1, q, timer_queue_cb1, &n1, 0, - 0, 0); - ok(ret, "CreateTimerQueueTimer\n"); - ok(t1 != NULL, "CreateTimerQueueTimer\n"); - - /* A slow one. */ - t2 = NULL; - n2 = 0; - ret = pCreateTimerQueueTimer(&t2, q, timer_queue_cb1, &n2, 0, - 100, 0); - ok(ret, "CreateTimerQueueTimer\n"); - ok(t2 != NULL, "CreateTimerQueueTimer\n"); - - /* A fast one. */ - t3 = NULL; - n3 = 0; - ret = pCreateTimerQueueTimer(&t3, q, timer_queue_cb1, &n3, 0, - 10, 0); - ok(ret, "CreateTimerQueueTimer\n"); - ok(t3 != NULL, "CreateTimerQueueTimer\n"); - - /* Start really late (it won't start). */ - t4 = NULL; - n4 = 0; - ret = pCreateTimerQueueTimer(&t4, q, timer_queue_cb1, &n4, 10000, - 10, 0); - ok(ret, "CreateTimerQueueTimer\n"); - ok(t4 != NULL, "CreateTimerQueueTimer\n"); - - /* Start soon, but delay so long it won't run again. */ - t5 = NULL; - n5 = 0; - ret = pCreateTimerQueueTimer(&t5, q, timer_queue_cb1, &n5, 0, - 10000, 0); - ok(ret, "CreateTimerQueueTimer\n"); - ok(t5 != NULL, "CreateTimerQueueTimer\n"); - - /* Give them a chance to do some work. */ - Sleep(500); - - /* Test deleting a once-only timer. */ - ret = pDeleteTimerQueueTimer(q, t1, INVALID_HANDLE_VALUE); - ok(ret, "DeleteTimerQueueTimer\n"); - - /* A periodic timer. */ - ret = pDeleteTimerQueueTimer(q, t2, INVALID_HANDLE_VALUE); - ok(ret, "DeleteTimerQueueTimer\n"); - - ret = pDeleteTimerQueueEx(q, INVALID_HANDLE_VALUE); - ok(ret, "DeleteTimerQueueEx\n"); - ok(n1 == 1, "Timer callback 1\n"); - ok(n2 < n3, "Timer callback 2 should be much slower than 3\n"); - ok(n4 == 0, "Timer callback 4\n"); - ok(n5 == 1, "Timer callback 5\n"); - - /* Test synchronous deletion of the timer/queue with event trigger. */ - e = CreateEvent(NULL, TRUE, FALSE, NULL); - et1 = CreateEvent(NULL, TRUE, FALSE, NULL); - et2 = CreateEvent(NULL, TRUE, FALSE, NULL); - if (!e || !et1 || !et2) - { - skip("Failed to create timer queue descruction event\n"); - return; - } - - q = pCreateTimerQueue(); - ok(q != NULL, "CreateTimerQueue\n"); - - /* Run once and finish quickly (should be done when we delete it). */ - t1 = NULL; - ret = pCreateTimerQueueTimer(&t1, q, timer_queue_cb5, NULL, 0, 0, 0); - ok(ret, "CreateTimerQueueTimer\n"); - ok(t1 != NULL, "CreateTimerQueueTimer\n"); - - /* Run once and finish slowly (shouldn't be done when we delete it). */ - t2 = NULL; - ret = pCreateTimerQueueTimer(&t2, q, timer_queue_cb5, (PVOID) 1000, 0, - 0, 0); - ok(ret, "CreateTimerQueueTimer\n"); - ok(t2 != NULL, "CreateTimerQueueTimer\n"); - - /* Run once and finish quickly (should be done when we delete it). */ - t3 = NULL; - ret = pCreateTimerQueueTimer(&t3, q, timer_queue_cb5, NULL, 0, 0, 0); - ok(ret, "CreateTimerQueueTimer\n"); - ok(t3 != NULL, "CreateTimerQueueTimer\n"); - - /* Run once and finish slowly (shouldn't be done when we delete it). */ - t4 = NULL; - ret = pCreateTimerQueueTimer(&t4, q, timer_queue_cb5, (PVOID) 1000, 0, - 0, 0); - ok(ret, "CreateTimerQueueTimer\n"); - ok(t4 != NULL, "CreateTimerQueueTimer\n"); - - /* Give them a chance to start. */ - Sleep(400); - - /* DeleteTimerQueueTimer always returns PENDING with a NULL event, - even if the timer is finished. */ - SetLastError(0xdeadbeef); - ret = pDeleteTimerQueueTimer(q, t1, NULL); - ok(ret /* vista */ || GetLastError() == ERROR_IO_PENDING, - "DeleteTimerQueueTimer, GetLastError: expected ERROR_IO_PENDING, got %d\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ret = pDeleteTimerQueueTimer(q, t2, NULL); - ok(!ret, "DeleteTimerQueueTimer call was expected to fail\n"); - ok(GetLastError() == ERROR_IO_PENDING, - "DeleteTimerQueueTimer, GetLastError: expected ERROR_IO_PENDING, got %d\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ret = pDeleteTimerQueueTimer(q, t3, et1); - ok(ret, "DeleteTimerQueueTimer call was expected to fail\n"); - ok(GetLastError() == 0xdeadbeef, - "DeleteTimerQueueTimer, GetLastError: expected 0xdeadbeef, got %d\n", - GetLastError()); - ok(WaitForSingleObject(et1, 250) == WAIT_OBJECT_0, - "Timer destruction event not triggered\n"); - - SetLastError(0xdeadbeef); - ret = pDeleteTimerQueueTimer(q, t4, et2); - ok(!ret, "DeleteTimerQueueTimer call was expected to fail\n"); - ok(GetLastError() == ERROR_IO_PENDING, - "DeleteTimerQueueTimer, GetLastError: expected ERROR_IO_PENDING, got %d\n", - GetLastError()); - ok(WaitForSingleObject(et2, 1000) == WAIT_OBJECT_0, - "Timer destruction event not triggered\n"); - - SetLastError(0xdeadbeef); - ret = pDeleteTimerQueueEx(q, e); - ok(ret /* vista */ || GetLastError() == ERROR_IO_PENDING, - "DeleteTimerQueueEx, GetLastError: expected ERROR_IO_PENDING, got %d\n", - GetLastError()); - ok(WaitForSingleObject(e, 250) == WAIT_OBJECT_0, - "Queue destruction event not triggered\n"); - CloseHandle(e); - - /* Test deleting/changing a timer in execution. */ - q = pCreateTimerQueue(); - ok(q != NULL, "CreateTimerQueue\n"); - - /* Test changing a once-only timer before it fires (this is allowed, - whereas after it fires you cannot). */ - n1 = 0; - ret = pCreateTimerQueueTimer(&t1, q, timer_queue_cb1, &n1, 10000, - 0, 0); - ok(ret, "CreateTimerQueueTimer\n"); - ok(t1 != NULL, "CreateTimerQueueTimer\n"); - ret = pChangeTimerQueueTimer(q, t1, 0, 0); - ok(ret, "ChangeTimerQueueTimer\n"); - - d2.t = t2 = NULL; - d2.num_calls = 0; - d2.max_calls = 3; - d2.q = q; - ret = pCreateTimerQueueTimer(&t2, q, timer_queue_cb2, &d2, 10, - 10, 0); - d2.t = t2; - ok(ret, "CreateTimerQueueTimer\n"); - ok(t2 != NULL, "CreateTimerQueueTimer\n"); - - d3.t = t3 = NULL; - d3.num_calls = 0; - d3.max_calls = 4; - d3.q = q; - ret = pCreateTimerQueueTimer(&t3, q, timer_queue_cb3, &d3, 10, - 10, 0); - d3.t = t3; - ok(ret, "CreateTimerQueueTimer\n"); - ok(t3 != NULL, "CreateTimerQueueTimer\n"); - - d4.t = t4 = NULL; - d4.num_calls = 0; - d4.q = q; - ret = pCreateTimerQueueTimer(&t4, q, timer_queue_cb4, &d4, 10, - 0, 0); - d4.t = t4; - ok(ret, "CreateTimerQueueTimer\n"); - ok(t4 != NULL, "CreateTimerQueueTimer\n"); - - Sleep(500); - - ret = pDeleteTimerQueueEx(q, INVALID_HANDLE_VALUE); - ok(ret, "DeleteTimerQueueEx\n"); - ok(n1 == 1, "ChangeTimerQueueTimer\n"); - ok(d2.num_calls == d2.max_calls, "DeleteTimerQueueTimer\n"); - ok(d3.num_calls == d3.max_calls, "ChangeTimerQueueTimer\n"); - ok(d4.num_calls == 1, "Timer flagged for deletion incorrectly\n"); - - /* Test an obscure bug that was in the original implementation. */ - q = pCreateTimerQueue(); - ok(q != NULL, "CreateTimerQueue\n"); - - /* All the work is done in the callback. */ - d1.t = t1 = NULL; - d1.num_calls = 0; - d1.q = q; - ret = pCreateTimerQueueTimer(&t1, q, timer_queue_cb6, &d1, 100, - 100, WT_EXECUTELONGFUNCTION); - d1.t = t1; - ok(ret, "CreateTimerQueueTimer\n"); - ok(t1 != NULL, "CreateTimerQueueTimer\n"); - - Sleep(750); - - SetLastError(0xdeadbeef); - ret = pDeleteTimerQueueEx(q, NULL); - ok(ret /* vista */ || GetLastError() == ERROR_IO_PENDING, - "DeleteTimerQueueEx, GetLastError: expected ERROR_IO_PENDING, got %d\n", - GetLastError()); - ok(d1.num_calls == 1, "DeleteTimerQueueTimer\n"); - - /* Test functions on the default timer queue. */ - t1 = NULL; - n1 = 0; - ret = pCreateTimerQueueTimer(&t1, NULL, timer_queue_cb1, &n1, 1000, - 1000, 0); - ok(ret, "CreateTimerQueueTimer, default queue\n"); - ok(t1 != NULL, "CreateTimerQueueTimer, default queue\n"); - - ret = pChangeTimerQueueTimer(NULL, t1, 2000, 2000); - ok(ret, "ChangeTimerQueueTimer, default queue\n"); - - ret = pDeleteTimerQueueTimer(NULL, t1, INVALID_HANDLE_VALUE); - ok(ret, "DeleteTimerQueueTimer, default queue\n"); - - /* Try mixing default and non-default queues. Apparently this works. */ - q = pCreateTimerQueue(); - ok(q != NULL, "CreateTimerQueue\n"); - - t1 = NULL; - n1 = 0; - ret = pCreateTimerQueueTimer(&t1, q, timer_queue_cb1, &n1, 1000, - 1000, 0); - ok(ret, "CreateTimerQueueTimer\n"); - ok(t1 != NULL, "CreateTimerQueueTimer\n"); - - t2 = NULL; - n2 = 0; - ret = pCreateTimerQueueTimer(&t2, NULL, timer_queue_cb1, &n2, 1000, - 1000, 0); - ok(ret, "CreateTimerQueueTimer\n"); - ok(t2 != NULL, "CreateTimerQueueTimer\n"); - - ret = pChangeTimerQueueTimer(NULL, t1, 2000, 2000); - ok(ret, "ChangeTimerQueueTimer\n"); - - ret = pChangeTimerQueueTimer(q, t2, 2000, 2000); - ok(ret, "ChangeTimerQueueTimer\n"); - - ret = pDeleteTimerQueueTimer(NULL, t1, INVALID_HANDLE_VALUE); - ok(ret, "DeleteTimerQueueTimer\n"); - - ret = pDeleteTimerQueueTimer(q, t2, INVALID_HANDLE_VALUE); - ok(ret, "DeleteTimerQueueTimer\n"); - - /* Try to delete the default queue? In any case: not allowed. */ - SetLastError(0xdeadbeef); - ret = pDeleteTimerQueueEx(NULL, NULL); - ok(!ret, "DeleteTimerQueueEx call was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, - "DeleteTimerQueueEx, GetLastError: expected ERROR_INVALID_HANDLE, got %d\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ret = pDeleteTimerQueueEx(q, NULL); - ok(ret /* vista */ || GetLastError() == ERROR_IO_PENDING, - "DeleteTimerQueueEx, GetLastError: expected ERROR_IO_PENDING, got %d\n", - GetLastError()); -} - -static HANDLE modify_handle(HANDLE handle, DWORD modify) -{ - DWORD tmp = HandleToULong(handle); - tmp |= modify; - return ULongToHandle(tmp); -} - -static void test_WaitForSingleObject(void) -{ - HANDLE signaled, nonsignaled, invalid; - DWORD ret; - - signaled = CreateEventW(NULL, TRUE, TRUE, NULL); - nonsignaled = CreateEventW(NULL, TRUE, FALSE, NULL); - invalid = (HANDLE) 0xdeadbee0; - - /* invalid handle with different values for lower 2 bits */ - SetLastError(0xdeadbeef); - ret = WaitForSingleObject(invalid, 0); - ok(ret == WAIT_FAILED, "expected WAIT_FAILED, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = WaitForSingleObject(modify_handle(invalid, 1), 0); - ok(ret == WAIT_FAILED, "expected WAIT_FAILED, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = WaitForSingleObject(modify_handle(invalid, 2), 0); - ok(ret == WAIT_FAILED, "expected WAIT_FAILED, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = WaitForSingleObject(modify_handle(invalid, 3), 0); - ok(ret == WAIT_FAILED, "expected WAIT_FAILED, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - - /* valid handle with different values for lower 2 bits */ - SetLastError(0xdeadbeef); - ret = WaitForSingleObject(nonsignaled, 0); - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = WaitForSingleObject(modify_handle(nonsignaled, 1), 0); - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = WaitForSingleObject(modify_handle(nonsignaled, 2), 0); - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = WaitForSingleObject(modify_handle(nonsignaled, 3), 0); - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); - - /* valid handle with different values for lower 2 bits */ - SetLastError(0xdeadbeef); - ret = WaitForSingleObject(signaled, 0); - ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = WaitForSingleObject(modify_handle(signaled, 1), 0); - ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = WaitForSingleObject(modify_handle(signaled, 2), 0); - ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = WaitForSingleObject(modify_handle(signaled, 3), 0); - ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); - - CloseHandle(signaled); - CloseHandle(nonsignaled); -} - -static void test_WaitForMultipleObjects(void) -{ - DWORD r; - int i; - HANDLE maxevents[MAXIMUM_WAIT_OBJECTS]; - - /* create the maximum number of events and make sure - * we can wait on that many */ - for (i=0; i - -#define STANDALONE -#include "wine/test.h" - -extern void func_actctx(void); -extern void func_alloc(void); -extern void func_atom(void); -extern void func_change(void); -extern void func_codepage(void); -extern void func_comm(void); -extern void func_console(void); -extern void func_debugger(void); -extern void func_directory(void); -extern void func_drive(void); -extern void func_environ(void); -extern void func_fiber(void); -extern void func_file(void); -extern void func_format_msg(void); -extern void func_generated(void); -extern void func_heap(void); -extern void func_loader(void); -extern void func_locale(void); -extern void func_mailslot(void); -extern void func_module(void); -extern void func_path(void); -extern void func_pipe(void); -extern void func_process(void); -extern void func_profile(void); -extern void func_resource(void); -extern void func_sync(void); -extern void func_thread(void); -extern void func_time(void); -extern void func_timer(void); -extern void func_toolhelp(void); -extern void func_version(void); -extern void func_virtual(void); -extern void func_volume(void); -/* ReactOS */ -extern void func_dosdev(void); -extern void func_interlck(void); - -const struct test winetest_testlist[] = -{ - { "actctx", func_actctx }, - { "alloc", func_alloc }, - { "atom", func_atom }, - { "change", func_change }, - { "codepage", func_codepage }, - { "comm", func_comm }, - { "console", func_console }, - /* ReactOS */ - //{ "debugger", func_debugger }, - { "directory", func_directory }, - { "drive", func_drive }, - { "environ", func_environ }, - { "fiber", func_fiber }, - { "file", func_file }, - { "format_msg", func_format_msg }, - /* ReactOS */ - //{ "generated", func_generated }, - { "heap", func_heap }, - { "loader", func_loader }, - { "locale", func_locale }, - { "mailslot", func_mailslot }, - { "module", func_module }, - { "path", func_path }, - { "pipe", func_pipe }, - { "process", func_process }, - { "profile", func_profile }, - { "resource", func_resource }, - { "sync", func_sync }, - { "thread", func_thread }, - { "time", func_time }, - { "timer", func_timer }, - { "toolhelp", func_toolhelp }, - { "version", func_version }, - { "virtual", func_virtual }, - { "volume", func_volume }, - /* ReactOS */ - { "dosdev", func_dosdev }, - { "interlck", func_interlck }, - { 0, 0 } -}; diff --git a/rostests/winetests/kernel32/thread.c b/rostests/winetests/kernel32/thread.c deleted file mode 100755 index 19726af54b2..00000000000 --- a/rostests/winetests/kernel32/thread.c +++ /dev/null @@ -1,1509 +0,0 @@ -/* - * Unit test suite for thread functions. - * - * Copyright 2002 Geoffrey Hausheer - * - * 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 _WIN32_WINNT to get SetThreadIdealProcessor on Windows */ -#define _WIN32_WINNT 0x0500 - -#include -#include -#include - -#include "wine/test.h" -#include -#include -#include -#include - -/* Specify the number of simultaneous threads to test */ -#define NUM_THREADS 4 -/* Specify whether to test the extended priorities for Win2k/XP */ -#define USE_EXTENDED_PRIORITIES 0 -/* Specify whether to test the stack allocation in CreateThread */ -#define CHECK_STACK 0 - -/* Set CHECK_STACK to 1 if you want to try to test the stack-limit from - CreateThread. So far I have been unable to make this work, and - I am in doubt as to how portable it is. Also, according to MSDN, - you shouldn't mix C-run-time-libraries (i.e. alloca) with CreateThread. - Anyhow, the check is currently commented out -*/ -#if CHECK_STACK -# ifdef __try -# define __TRY __try -# define __EXCEPT __except -# define __ENDTRY -# else -# include "wine/exception.h" -# endif -#endif - -static BOOL (WINAPI *pGetThreadPriorityBoost)(HANDLE,PBOOL); -static HANDLE (WINAPI *pOpenThread)(DWORD,BOOL,DWORD); -static BOOL (WINAPI *pQueueUserWorkItem)(LPTHREAD_START_ROUTINE,PVOID,ULONG); -static DWORD (WINAPI *pSetThreadIdealProcessor)(HANDLE,DWORD); -static BOOL (WINAPI *pSetThreadPriorityBoost)(HANDLE,BOOL); -static BOOL (WINAPI *pRegisterWaitForSingleObject)(PHANDLE,HANDLE,WAITORTIMERCALLBACK,PVOID,ULONG,ULONG); -static BOOL (WINAPI *pUnregisterWait)(HANDLE); -static BOOL (WINAPI *pIsWow64Process)(HANDLE,PBOOL); -static BOOL (WINAPI *pSetThreadErrorMode)(DWORD,PDWORD); -static DWORD (WINAPI *pGetThreadErrorMode)(void); -static DWORD (WINAPI *pRtlGetThreadErrorMode)(void); - -static HANDLE create_target_process(const char *arg) -{ - char **argv; - char cmdline[MAX_PATH]; - PROCESS_INFORMATION pi; - BOOL ret; - STARTUPINFO si = { 0 }; - si.cb = sizeof(si); - - winetest_get_mainargs( &argv ); - sprintf(cmdline, "%s %s %s", argv[0], argv[1], arg); - ret = CreateProcess(NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "error: %u\n", GetLastError()); - ret = CloseHandle(pi.hThread); - ok(ret, "error %u\n", GetLastError()); - return pi.hProcess; -} - -/* Functions not tested yet: - AttachThreadInput - SetThreadContext - SwitchToThread - -In addition there are no checks that the inheritance works properly in -CreateThread -*/ - -/* Functions to ensure that from a group of threads, only one executes - certain chunks of code at a time, and we know which one is executing - it. It basically makes multithreaded execution linear, which defeats - the purpose of multiple threads, but makes testing easy. */ -static HANDLE start_event, stop_event; -static LONG num_synced; - -static void init_thread_sync_helpers(void) -{ - start_event = CreateEvent(NULL, TRUE, FALSE, NULL); - ok(start_event != NULL, "CreateEvent failed\n"); - stop_event = CreateEvent(NULL, TRUE, FALSE, NULL); - ok(stop_event != NULL, "CreateEvent failed\n"); - num_synced = -1; -} - -static BOOL sync_threads_and_run_one(DWORD sync_id, DWORD my_id) -{ - LONG num = InterlockedIncrement(&num_synced); - assert(-1 <= num && num <= 1); - if (num == 1) - { - ResetEvent( stop_event ); - SetEvent( start_event ); - } - else - { - DWORD ret = WaitForSingleObject(start_event, 10000); - ok(ret == WAIT_OBJECT_0, "WaitForSingleObject failed %x\n",ret); - } - return sync_id == my_id; -} - -static void resync_after_run(void) -{ - LONG num = InterlockedDecrement(&num_synced); - assert(-1 <= num && num <= 1); - if (num == -1) - { - ResetEvent( start_event ); - SetEvent( stop_event ); - } - else - { - DWORD ret = WaitForSingleObject(stop_event, 10000); - ok(ret == WAIT_OBJECT_0, "WaitForSingleObject failed\n"); - } -} - -static void cleanup_thread_sync_helpers(void) -{ - CloseHandle(start_event); - CloseHandle(stop_event); -} - -static DWORD tlsIndex; - -typedef struct { - int threadnum; - HANDLE *event; - DWORD *threadmem; -} t1Struct; - -/* WinME supports OpenThread but doesn't know about access restrictions so - we require them to be either completely ignored or always obeyed. -*/ -static INT obeying_ars = 0; /* -1 == no, 0 == dunno yet, 1 == yes */ -#define obey_ar(x) \ - (obeying_ars == 0 \ - ? ((x) \ - ? (obeying_ars = +1) \ - : ((obeying_ars = -1), \ - trace("not restricted, assuming consistent behaviour\n"))) \ - : (obeying_ars < 0) \ - ? ok(!(x), "access restrictions obeyed\n") \ - : ok( (x), "access restrictions not obeyed\n")) - -/* Basic test that simultaneous threads can access shared memory, - that the thread local storage routines work correctly, and that - threads actually run concurrently -*/ -static DWORD WINAPI threadFunc1(LPVOID p) -{ - t1Struct *tstruct = p; - int i; -/* write our thread # into shared memory */ - tstruct->threadmem[tstruct->threadnum]=GetCurrentThreadId(); - ok(TlsSetValue(tlsIndex,(LPVOID)(INT_PTR)(tstruct->threadnum+1))!=0, - "TlsSetValue failed\n"); -/* The threads synchronize before terminating. This is done by - Signaling an event, and waiting for all events to occur -*/ - SetEvent(tstruct->event[tstruct->threadnum]); - WaitForMultipleObjects(NUM_THREADS,tstruct->event,TRUE,INFINITE); -/* Double check that all threads really did run by validating that - they have all written to the shared memory. There should be no race - here, since all threads were synchronized after the write.*/ - for(i=0;ithreadmem[i]==0) ; - } - - /* lstrlenA contains an exception handler so this makes sure exceptions work in threads */ - ok( lstrlenA( (char *)0xdeadbeef ) == 0, "lstrlenA: unexpected success\n" ); - -/* Check that no one changed our tls memory */ - ok((INT_PTR)TlsGetValue(tlsIndex)-1==tstruct->threadnum, - "TlsGetValue failed\n"); - return NUM_THREADS+tstruct->threadnum; -} - -static DWORD WINAPI threadFunc2(LPVOID p) -{ - return 99; -} - -static DWORD WINAPI threadFunc3(LPVOID p) -{ - HANDLE thread; - thread=GetCurrentThread(); - SuspendThread(thread); - return 99; -} - -static DWORD WINAPI threadFunc4(LPVOID p) -{ - HANDLE event = p; - if(event != NULL) { - SetEvent(event); - } - Sleep(99000); - return 0; -} - -#if CHECK_STACK -static DWORD WINAPI threadFunc5(LPVOID p) -{ - DWORD *exitCode = p; - SYSTEM_INFO sysInfo; - sysInfo.dwPageSize=0; - GetSystemInfo(&sysInfo); - *exitCode=0; - __TRY - { - alloca(2*sysInfo.dwPageSize); - } - __EXCEPT(1) { - *exitCode=1; - } - __ENDTRY - return 0; -} -#endif - -static DWORD WINAPI threadFunc_SetEvent(LPVOID p) -{ - SetEvent(p); - return 0; -} - -static DWORD WINAPI threadFunc_CloseHandle(LPVOID p) -{ - CloseHandle(p); - return 0; -} - -static void create_function_addr_events(HANDLE events[2]) -{ - char buffer[256]; - - sprintf(buffer, "threadFunc_SetEvent %p", threadFunc_SetEvent); - events[0] = CreateEvent(NULL, FALSE, FALSE, buffer); - - sprintf(buffer, "threadFunc_CloseHandle %p", threadFunc_CloseHandle); - events[1] = CreateEvent(NULL, FALSE, FALSE, buffer); -} - -/* check CreateRemoteThread */ -static VOID test_CreateRemoteThread(void) -{ - HANDLE hProcess, hThread, hEvent, hRemoteEvent; - DWORD tid, ret, exitcode; - HANDLE hAddrEvents[2]; - - hProcess = create_target_process("sleep"); - ok(hProcess != NULL, "Can't start process\n"); - - /* ensure threadFunc_SetEvent & threadFunc_CloseHandle are the same - * address as in the child process */ - create_function_addr_events(hAddrEvents); - ret = WaitForMultipleObjects(2, hAddrEvents, TRUE, 5000); - if (ret == WAIT_TIMEOUT) - { - skip("child process wasn't mapped at same address, so can't do CreateRemoteThread tests.\n"); - return; - } - ok(ret == WAIT_OBJECT_0 || broken(ret == WAIT_OBJECT_0+1 /* nt4,w2k */), "WaitForAllObjects 2 events %d\n", ret); - - hEvent = CreateEvent(NULL, FALSE, FALSE, NULL); - ok(hEvent != NULL, "Can't create event, err=%u\n", GetLastError()); - ret = DuplicateHandle(GetCurrentProcess(), hEvent, hProcess, &hRemoteEvent, - 0, FALSE, DUPLICATE_SAME_ACCESS); - ok(ret != 0, "DuplicateHandle failed, err=%u\n", GetLastError()); - - /* create suspended remote thread with entry point SetEvent() */ - SetLastError(0xdeadbeef); - hThread = CreateRemoteThread(hProcess, NULL, 0, threadFunc_SetEvent, - hRemoteEvent, CREATE_SUSPENDED, &tid); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("CreateRemoteThread is not implemented\n"); - goto cleanup; - } - ok(hThread != NULL, "CreateRemoteThread failed, err=%u\n", GetLastError()); - ok(tid != 0, "null tid\n"); - ret = SuspendThread(hThread); - ok(ret == 1, "ret=%u, err=%u\n", ret, GetLastError()); - ret = ResumeThread(hThread); - ok(ret == 2, "ret=%u, err=%u\n", ret, GetLastError()); - - /* thread still suspended, so wait times out */ - ret = WaitForSingleObject(hEvent, 1000); - ok(ret == WAIT_TIMEOUT, "wait did not time out, ret=%u\n", ret); - - ret = ResumeThread(hThread); - ok(ret == 1, "ret=%u, err=%u\n", ret, GetLastError()); - - /* wait that doesn't time out */ - ret = WaitForSingleObject(hEvent, 1000); - ok(ret == WAIT_OBJECT_0, "object not signaled, ret=%u\n", ret); - - /* wait for thread end */ - ret = WaitForSingleObject(hThread, 1000); - ok(ret == WAIT_OBJECT_0, "waiting for thread failed, ret=%u\n", ret); - CloseHandle(hThread); - - /* create and wait for remote thread with entry point CloseHandle() */ - hThread = CreateRemoteThread(hProcess, NULL, 0, - threadFunc_CloseHandle, - hRemoteEvent, 0, &tid); - ok(hThread != NULL, "CreateRemoteThread failed, err=%u\n", GetLastError()); - ret = WaitForSingleObject(hThread, 1000); - ok(ret == WAIT_OBJECT_0, "waiting for thread failed, ret=%u\n", ret); - CloseHandle(hThread); - - /* create remote thread with entry point SetEvent() */ - hThread = CreateRemoteThread(hProcess, NULL, 0, - threadFunc_SetEvent, - hRemoteEvent, 0, &tid); - ok(hThread != NULL, "CreateRemoteThread failed, err=%u\n", GetLastError()); - - /* closed handle, so wait times out */ - ret = WaitForSingleObject(hEvent, 1000); - ok(ret == WAIT_TIMEOUT, "wait did not time out, ret=%u\n", ret); - - /* check that remote SetEvent() failed */ - ret = GetExitCodeThread(hThread, &exitcode); - ok(ret != 0, "GetExitCodeThread failed, err=%u\n", GetLastError()); - if (ret) ok(exitcode == 0, "SetEvent succeeded, expected to fail\n"); - CloseHandle(hThread); - -cleanup: - TerminateProcess(hProcess, 0); - CloseHandle(hEvent); - CloseHandle(hProcess); -} - -/* Check basic functionality of CreateThread and Tls* functions */ -static VOID test_CreateThread_basic(void) -{ - HANDLE thread[NUM_THREADS],event[NUM_THREADS]; - DWORD threadid[NUM_THREADS],curthreadId; - DWORD threadmem[NUM_THREADS]; - DWORD exitCode; - t1Struct tstruct[NUM_THREADS]; - int error; - DWORD i,j; - DWORD GLE, ret; - DWORD tid; - BOOL bRet; - - /* lstrlenA contains an exception handler so this makes sure exceptions work in the main thread */ - ok( lstrlenA( (char *)0xdeadbeef ) == 0, "lstrlenA: unexpected success\n" ); - -/* Retrieve current Thread ID for later comparisons */ - curthreadId=GetCurrentThreadId(); -/* Allocate some local storage */ - ok((tlsIndex=TlsAlloc())!=TLS_OUT_OF_INDEXES,"TlsAlloc failed\n"); -/* Create events for thread synchronization */ - for(i=0;i0,"GetSystemInfo should return a valid page size\n"); - thread = CreateThread(NULL,sysInfo.dwPageSize, - threadFunc5,&exitCode, - 0,&threadId); - ok(WaitForSingleObject(thread,5000)==WAIT_OBJECT_0, - "TerminateThread didn't work\n"); - ok(exitCode==1,"CreateThread did not obey stack-size-limit\n"); - ok(CloseHandle(thread)!=0,"CloseHandle failed\n"); -#endif -} - -/* Check whether setting/retrieving thread priorities works */ -static VOID test_thread_priority(void) -{ - HANDLE curthread,access_thread; - DWORD curthreadId,exitCode; - int min_priority=-2,max_priority=2; - BOOL disabled,rc; - int i; - - curthread=GetCurrentThread(); - curthreadId=GetCurrentThreadId(); -/* Check thread priority */ -/* NOTE: on Win2k/XP priority can be from -7 to 6. All other platforms it - is -2 to 2. However, even on a real Win2k system, using thread - priorities beyond the -2 to 2 range does not work. If you want to try - anyway, enable USE_EXTENDED_PRIORITIES -*/ - ok(GetThreadPriority(curthread)==THREAD_PRIORITY_NORMAL, - "GetThreadPriority Failed\n"); - - if (pOpenThread) { -/* check that access control is obeyed */ - access_thread=pOpenThread(THREAD_ALL_ACCESS & - (~THREAD_QUERY_INFORMATION) & (~THREAD_SET_INFORMATION), - 0,curthreadId); - ok(access_thread!=NULL,"OpenThread returned an invalid handle\n"); - if (access_thread!=NULL) { - obey_ar(SetThreadPriority(access_thread,1)==0); - obey_ar(GetThreadPriority(access_thread)==THREAD_PRIORITY_ERROR_RETURN); - obey_ar(GetExitCodeThread(access_thread,&exitCode)==0); - ok(CloseHandle(access_thread),"Error Closing thread handle\n"); - } - } -#if USE_EXTENDED_PRIORITIES - min_priority=-7; max_priority=6; -#endif - for(i=min_priority;i<=max_priority;i++) { - ok(SetThreadPriority(curthread,i)!=0, - "SetThreadPriority Failed for priority: %d\n",i); - ok(GetThreadPriority(curthread)==i, - "GetThreadPriority Failed for priority: %d\n",i); - } - ok(SetThreadPriority(curthread,THREAD_PRIORITY_TIME_CRITICAL)!=0, - "SetThreadPriority Failed\n"); - ok(GetThreadPriority(curthread)==THREAD_PRIORITY_TIME_CRITICAL, - "GetThreadPriority Failed\n"); - ok(SetThreadPriority(curthread,THREAD_PRIORITY_IDLE)!=0, - "SetThreadPriority Failed\n"); - ok(GetThreadPriority(curthread)==THREAD_PRIORITY_IDLE, - "GetThreadPriority Failed\n"); - ok(SetThreadPriority(curthread,0)!=0,"SetThreadPriority Failed\n"); - -/* Check that the thread priority is not changed if SetThreadPriority - is called with a value outside of the max/min range */ - SetThreadPriority(curthread,min_priority); - SetLastError(0xdeadbeef); - rc = SetThreadPriority(curthread,min_priority-1); - - ok(rc == FALSE, "SetThreadPriority passed with a bad argument\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_INVALID_PRIORITY /* Win9x */, - "SetThreadPriority error %d, expected ERROR_INVALID_PARAMETER or ERROR_INVALID_PRIORITY\n", - GetLastError()); - ok(GetThreadPriority(curthread)==min_priority, - "GetThreadPriority didn't return min_priority\n"); - - SetThreadPriority(curthread,max_priority); - SetLastError(0xdeadbeef); - rc = SetThreadPriority(curthread,max_priority+1); - - ok(rc == FALSE, "SetThreadPriority passed with a bad argument\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_INVALID_PRIORITY /* Win9x */, - "SetThreadPriority error %d, expected ERROR_INVALID_PARAMETER or ERROR_INVALID_PRIORITY\n", - GetLastError()); - ok(GetThreadPriority(curthread)==max_priority, - "GetThreadPriority didn't return max_priority\n"); - -/* Check thread priority boost */ - if (!pGetThreadPriorityBoost || !pSetThreadPriorityBoost) - return; /* Win9x */ - - SetLastError(0xdeadbeef); - rc=pGetThreadPriorityBoost(curthread,&disabled); - if (rc==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("GetThreadPriorityBoost is not implemented on WinME\n"); - return; - } - - ok(rc!=0,"error=%d\n",GetLastError()); - - if (pOpenThread) { -/* check that access control is obeyed */ - access_thread=pOpenThread(THREAD_ALL_ACCESS & - (~THREAD_QUERY_INFORMATION) & (~THREAD_SET_INFORMATION), - 0,curthreadId); - ok(access_thread!=NULL,"OpenThread returned an invalid handle\n"); - if (access_thread!=NULL) { - obey_ar(pSetThreadPriorityBoost(access_thread,1)==0); - todo_wine obey_ar(pGetThreadPriorityBoost(access_thread,&disabled)==0); - ok(CloseHandle(access_thread),"Error Closing thread handle\n"); - } - } - - todo_wine { - rc = pSetThreadPriorityBoost(curthread,1); - ok( rc != 0, "error=%d\n",GetLastError()); - rc=pGetThreadPriorityBoost(curthread,&disabled); - ok(rc!=0 && disabled==1, - "rc=%d error=%d disabled=%d\n",rc,GetLastError(),disabled); - - rc = pSetThreadPriorityBoost(curthread,0); - ok( rc != 0, "error=%d\n",GetLastError()); - } - rc=pGetThreadPriorityBoost(curthread,&disabled); - ok(rc!=0 && disabled==0, - "rc=%d error=%d disabled=%d\n",rc,GetLastError(),disabled); -} - -/* check the GetThreadTimes function */ -static VOID test_GetThreadTimes(void) -{ - HANDLE thread,access_thread=NULL; - FILETIME creationTime,exitTime,kernelTime,userTime; - DWORD threadId; - int error; - - thread = CreateThread(NULL,0,threadFunc2,NULL, - CREATE_SUSPENDED,&threadId); - - ok(thread!=NULL,"Create Thread failed\n"); -/* check that access control is obeyed */ - if (pOpenThread) { - access_thread=pOpenThread(THREAD_ALL_ACCESS & - (~THREAD_QUERY_INFORMATION), 0,threadId); - ok(access_thread!=NULL, - "OpenThread returned an invalid handle\n"); - } - ok(ResumeThread(thread)==1,"Resume thread returned an invalid value\n"); - ok(WaitForSingleObject(thread,5000)==WAIT_OBJECT_0, - "ResumeThread didn't work\n"); - creationTime.dwLowDateTime=99; creationTime.dwHighDateTime=99; - exitTime.dwLowDateTime=99; exitTime.dwHighDateTime=99; - kernelTime.dwLowDateTime=99; kernelTime.dwHighDateTime=99; - userTime.dwLowDateTime=99; userTime.dwHighDateTime=99; -/* GetThreadTimes should set all of the parameters passed to it */ - error=GetThreadTimes(thread,&creationTime,&exitTime, - &kernelTime,&userTime); - - if (error == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - win_skip("GetThreadTimes is not implemented\n"); - else { - ok(error!=0,"GetThreadTimes failed\n"); - ok(creationTime.dwLowDateTime!=99 || creationTime.dwHighDateTime!=99, - "creationTime was invalid\n"); - ok(exitTime.dwLowDateTime!=99 || exitTime.dwHighDateTime!=99, - "exitTime was invalid\n"); - ok(kernelTime.dwLowDateTime!=99 || kernelTime.dwHighDateTime!=99, - "kernelTimewas invalid\n"); - ok(userTime.dwLowDateTime!=99 || userTime.dwHighDateTime!=99, - "userTime was invalid\n"); - ok(CloseHandle(thread)!=0,"CloseHandle failed\n"); - if(access_thread!=NULL) - { - error=GetThreadTimes(access_thread,&creationTime,&exitTime, - &kernelTime,&userTime); - obey_ar(error==0); - } - } - if(access_thread!=NULL) { - ok(CloseHandle(access_thread)!=0,"CloseHandle Failed\n"); - } -} - -/* Check the processor affinity functions */ -/* NOTE: These functions should also be checked that they obey access control -*/ -static VOID test_thread_processor(void) -{ - HANDLE curthread,curproc; - DWORD_PTR processMask,systemMask,retMask; - SYSTEM_INFO sysInfo; - int error=0; - BOOL is_wow64; - - if (!pIsWow64Process || !pIsWow64Process( GetCurrentProcess(), &is_wow64 )) is_wow64 = FALSE; - - sysInfo.dwNumberOfProcessors=0; - GetSystemInfo(&sysInfo); - ok(sysInfo.dwNumberOfProcessors>0, - "GetSystemInfo failed to return a valid # of processors\n"); -/* Use the current Thread/process for all tests */ - curthread=GetCurrentThread(); - ok(curthread!=NULL,"GetCurrentThread failed\n"); - curproc=GetCurrentProcess(); - ok(curproc!=NULL,"GetCurrentProcess failed\n"); -/* Check the Affinity Mask functions */ - ok(GetProcessAffinityMask(curproc,&processMask,&systemMask)!=0, - "GetProcessAffinityMask failed\n"); - ok(SetThreadAffinityMask(curthread,processMask)==processMask, - "SetThreadAffinityMask failed\n"); - ok(SetThreadAffinityMask(curthread,processMask+1)==0, - "SetThreadAffinityMask passed for an illegal processor\n"); -/* NOTE: Pre-Vista does not recognize the "all processors" flag (all bits set) */ - retMask = SetThreadAffinityMask(curthread,~0); - ok(broken(retMask==0) || retMask==processMask, - "SetThreadAffinityMask(thread,-1) failed to request all processors.\n"); - if (retMask == processMask && sizeof(ULONG_PTR) > sizeof(ULONG)) - { - /* only the low 32-bits matter */ - retMask = SetThreadAffinityMask(curthread,~(ULONG_PTR)0); - ok(retMask == processMask, "SetThreadAffinityMask failed\n"); - retMask = SetThreadAffinityMask(curthread,~(ULONG_PTR)0 >> 3); - ok(retMask == processMask, "SetThreadAffinityMask failed\n"); - retMask = SetThreadAffinityMask(curthread,~(ULONG_PTR)1); - ok(retMask == 0, "SetThreadAffinityMask succeeded\n"); - } -/* NOTE: This only works on WinNT/2000/XP) */ - if (pSetThreadIdealProcessor) { - SetLastError(0xdeadbeef); - error=pSetThreadIdealProcessor(curthread,0); - if (GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("SetThreadIdealProcessor is not implemented\n"); - return; - } - ok(error!=-1, "SetThreadIdealProcessor failed\n"); - - if (is_wow64) - { - SetLastError(0xdeadbeef); - error=pSetThreadIdealProcessor(curthread,MAXIMUM_PROCESSORS+1); - todo_wine - ok(error!=-1, "SetThreadIdealProcessor failed for %u on Wow64\n", MAXIMUM_PROCESSORS+1); - - SetLastError(0xdeadbeef); - error=pSetThreadIdealProcessor(curthread,65); - ok(error==-1, "SetThreadIdealProcessor succeeded with an illegal processor #\n"); - ok(GetLastError()==ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - } - else - { - SetLastError(0xdeadbeef); - error=pSetThreadIdealProcessor(curthread,MAXIMUM_PROCESSORS+1); - ok(error==-1, "SetThreadIdealProcessor succeeded with an illegal processor #\n"); - ok(GetLastError()==ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - } - - error=pSetThreadIdealProcessor(curthread,MAXIMUM_PROCESSORS); - ok(error!=-1, "SetThreadIdealProcessor failed\n"); - } -} - -static VOID test_GetThreadExitCode(void) -{ - DWORD exitCode, threadid; - DWORD GLE, ret; - HANDLE thread; - - ret = GetExitCodeThread((HANDLE)0x2bad2bad,&exitCode); - ok(ret==0, "GetExitCodeThread returned non zero value: %d\n", ret); - GLE = GetLastError(); - ok(GLE==ERROR_INVALID_HANDLE, "GetLastError returned %d (expected 6)\n", GLE); - - thread = CreateThread(NULL,0,threadFunc2,NULL,0,&threadid); - ret = WaitForSingleObject(thread,100); - ok(ret==WAIT_OBJECT_0, "threadFunc2 did not exit during 100 ms\n"); - ret = GetExitCodeThread(thread,&exitCode); - ok(ret==exitCode || ret==1, - "GetExitCodeThread returned %d (expected 1 or %d)\n", ret, exitCode); - ok(exitCode==99, "threadFunc2 exited with code %d (expected 99)\n", exitCode); - ok(CloseHandle(thread)!=0,"Error closing thread handle\n"); -} - -#ifdef __i386__ - -static int test_value = 0; -static HANDLE event; - -static void WINAPI set_test_val( int val ) -{ - test_value += val; - ExitThread(0); -} - -static DWORD WINAPI threadFunc6(LPVOID p) -{ - SetEvent( event ); - Sleep( 1000 ); - test_value *= (int)p; - return 0; -} - -static void test_SetThreadContext(void) -{ - CONTEXT ctx; - int *stack; - HANDLE thread; - DWORD threadid; - DWORD prevcount; - BOOL ret; - - SetLastError(0xdeadbeef); - event = CreateEvent( NULL, TRUE, FALSE, NULL ); - thread = CreateThread( NULL, 0, threadFunc6, (void *)2, 0, &threadid ); - ok( thread != NULL, "CreateThread failed : (%d)\n", GetLastError() ); - if (!thread) - { - trace("Thread creation failed, skipping rest of test\n"); - return; - } - WaitForSingleObject( event, INFINITE ); - SuspendThread( thread ); - CloseHandle( event ); - - ctx.ContextFlags = CONTEXT_FULL; - SetLastError(0xdeadbeef); - ret = GetThreadContext( thread, &ctx ); - ok( ret, "GetThreadContext failed : (%u)\n", GetLastError() ); - - if (ret) - { - /* simulate a call to set_test_val(10) */ - stack = (int *)ctx.Esp; - stack[-1] = 10; - stack[-2] = ctx.Eip; - ctx.Esp -= 2 * sizeof(int *); - ctx.Eip = (DWORD)set_test_val; - SetLastError(0xdeadbeef); - ret = SetThreadContext( thread, &ctx ); - ok( ret, "SetThreadContext failed : (%d)\n", GetLastError() ); - } - - SetLastError(0xdeadbeef); - prevcount = ResumeThread( thread ); - ok ( prevcount == 1, "Previous suspend count (%d) instead of 1, last error : (%d)\n", - prevcount, GetLastError() ); - - WaitForSingleObject( thread, INFINITE ); - ok( test_value == 10, "test_value %d\n", test_value ); - - ctx.ContextFlags = CONTEXT_FULL; - SetLastError(0xdeadbeef); - ret = GetThreadContext( thread, &ctx ); - ok( !ret, "GetThreadContext succeeded\n" ); - ok( GetLastError() == ERROR_GEN_FAILURE || broken(GetLastError() == ERROR_INVALID_HANDLE), /* win2k */ - "wrong error %u\n", GetLastError() ); - - SetLastError(0xdeadbeef); - ret = SetThreadContext( thread, &ctx ); - ok( !ret, "SetThreadContext succeeded\n" ); - ok( GetLastError() == ERROR_GEN_FAILURE || GetLastError() == ERROR_ACCESS_DENIED || - broken(GetLastError() == ERROR_INVALID_HANDLE), /* win2k */ - "wrong error %u\n", GetLastError() ); - - CloseHandle( thread ); -} - -#endif /* __i386__ */ - -static HANDLE finish_event; -static LONG times_executed; - -static DWORD CALLBACK work_function(void *p) -{ - LONG executed = InterlockedIncrement(×_executed); - - if (executed == 100) - SetEvent(finish_event); - return 0; -} - -static void test_QueueUserWorkItem(void) -{ - INT_PTR i; - DWORD wait_result; - DWORD before, after; - - /* QueueUserWorkItem not present on win9x */ - if (!pQueueUserWorkItem) return; - - finish_event = CreateEvent(NULL, TRUE, FALSE, NULL); - - before = GetTickCount(); - - for (i = 0; i < 100; i++) - { - BOOL ret = pQueueUserWorkItem(work_function, (void *)i, WT_EXECUTEDEFAULT); - ok(ret, "QueueUserWorkItem failed with error %d\n", GetLastError()); - } - - wait_result = WaitForSingleObject(finish_event, 10000); - - after = GetTickCount(); - trace("100 QueueUserWorkItem calls took %dms\n", after - before); - ok(wait_result == WAIT_OBJECT_0, "wait failed with error 0x%x\n", wait_result); - - ok(times_executed == 100, "didn't execute all of the work items\n"); -} - -static void CALLBACK signaled_function(PVOID p, BOOLEAN TimerOrWaitFired) -{ - HANDLE event = p; - SetEvent(event); - ok(!TimerOrWaitFired, "wait shouldn't have timed out\n"); -} - -static void CALLBACK timeout_function(PVOID p, BOOLEAN TimerOrWaitFired) -{ - HANDLE event = p; - SetEvent(event); - ok(TimerOrWaitFired, "wait should have timed out\n"); -} - -static void test_RegisterWaitForSingleObject(void) -{ - BOOL ret; - HANDLE wait_handle; - HANDLE handle; - HANDLE complete_event; - - if (!pRegisterWaitForSingleObject || !pUnregisterWait) - { - win_skip("RegisterWaitForSingleObject or UnregisterWait not implemented\n"); - return; - } - - /* test signaled case */ - - handle = CreateEvent(NULL, TRUE, TRUE, NULL); - complete_event = CreateEvent(NULL, FALSE, FALSE, NULL); - - ret = pRegisterWaitForSingleObject(&wait_handle, handle, signaled_function, complete_event, INFINITE, WT_EXECUTEONLYONCE); - ok(ret, "RegisterWaitForSingleObject failed with error %d\n", GetLastError()); - - WaitForSingleObject(complete_event, INFINITE); - /* give worker thread chance to complete */ - Sleep(100); - - ret = pUnregisterWait(wait_handle); - ok(ret, "UnregisterWait failed with error %d\n", GetLastError()); - - /* test cancel case */ - - ResetEvent(handle); - - ret = pRegisterWaitForSingleObject(&wait_handle, handle, signaled_function, complete_event, INFINITE, WT_EXECUTEONLYONCE); - ok(ret, "RegisterWaitForSingleObject failed with error %d\n", GetLastError()); - - ret = pUnregisterWait(wait_handle); - ok(ret, "UnregisterWait failed with error %d\n", GetLastError()); - - /* test timeout case */ - - ret = pRegisterWaitForSingleObject(&wait_handle, handle, timeout_function, complete_event, 0, WT_EXECUTEONLYONCE); - ok(ret, "RegisterWaitForSingleObject failed with error %d\n", GetLastError()); - - WaitForSingleObject(complete_event, INFINITE); - /* give worker thread chance to complete */ - Sleep(100); - - ret = pUnregisterWait(wait_handle); - ok(ret, "UnregisterWait failed with error %d\n", GetLastError()); -} - -static DWORD TLS_main; -static DWORD TLS_index0, TLS_index1; - -static DWORD WINAPI TLS_InheritanceProc(LPVOID p) -{ - /* We should NOT inherit the TLS values from our parent or from the - main thread. */ - LPVOID val; - - val = TlsGetValue(TLS_main); - ok(val == NULL, "TLS inheritance failed\n"); - - val = TlsGetValue(TLS_index0); - ok(val == NULL, "TLS inheritance failed\n"); - - val = TlsGetValue(TLS_index1); - ok(val == NULL, "TLS inheritance failed\n"); - - return 0; -} - -/* Basic TLS usage test. Make sure we can create slots and the values we - store in them are separate among threads. Also test TLS value - inheritance with TLS_InheritanceProc. */ -static DWORD WINAPI TLS_ThreadProc(LPVOID p) -{ - LONG_PTR id = (LONG_PTR) p; - LPVOID val; - BOOL ret; - - if (sync_threads_and_run_one(0, id)) - { - TLS_index0 = TlsAlloc(); - ok(TLS_index0 != TLS_OUT_OF_INDEXES, "TlsAlloc failed\n"); - } - resync_after_run(); - - if (sync_threads_and_run_one(1, id)) - { - TLS_index1 = TlsAlloc(); - ok(TLS_index1 != TLS_OUT_OF_INDEXES, "TlsAlloc failed\n"); - - /* Slot indices should be different even if created in different - threads. */ - ok(TLS_index0 != TLS_index1, "TlsAlloc failed\n"); - - /* Both slots should be initialized to NULL */ - val = TlsGetValue(TLS_index0); - ok(GetLastError() == ERROR_SUCCESS, "TlsGetValue failed\n"); - ok(val == NULL, "TLS slot not initialized correctly\n"); - - val = TlsGetValue(TLS_index1); - ok(GetLastError() == ERROR_SUCCESS, "TlsGetValue failed\n"); - ok(val == NULL, "TLS slot not initialized correctly\n"); - } - resync_after_run(); - - if (sync_threads_and_run_one(0, id)) - { - val = TlsGetValue(TLS_index0); - ok(GetLastError() == ERROR_SUCCESS, "TlsGetValue failed\n"); - ok(val == NULL, "TLS slot not initialized correctly\n"); - - val = TlsGetValue(TLS_index1); - ok(GetLastError() == ERROR_SUCCESS, "TlsGetValue failed\n"); - ok(val == NULL, "TLS slot not initialized correctly\n"); - - ret = TlsSetValue(TLS_index0, (LPVOID) 1); - ok(ret, "TlsSetValue failed\n"); - - ret = TlsSetValue(TLS_index1, (LPVOID) 2); - ok(ret, "TlsSetValue failed\n"); - - val = TlsGetValue(TLS_index0); - ok(GetLastError() == ERROR_SUCCESS, "TlsGetValue failed\n"); - ok(val == (LPVOID) 1, "TLS slot not initialized correctly\n"); - - val = TlsGetValue(TLS_index1); - ok(GetLastError() == ERROR_SUCCESS, "TlsGetValue failed\n"); - ok(val == (LPVOID) 2, "TLS slot not initialized correctly\n"); - } - resync_after_run(); - - if (sync_threads_and_run_one(1, id)) - { - val = TlsGetValue(TLS_index0); - ok(GetLastError() == ERROR_SUCCESS, "TlsGetValue failed\n"); - ok(val == NULL, "TLS slot not initialized correctly\n"); - - val = TlsGetValue(TLS_index1); - ok(GetLastError() == ERROR_SUCCESS, "TlsGetValue failed\n"); - ok(val == NULL, "TLS slot not initialized correctly\n"); - - ret = TlsSetValue(TLS_index0, (LPVOID) 3); - ok(ret, "TlsSetValue failed\n"); - - ret = TlsSetValue(TLS_index1, (LPVOID) 4); - ok(ret, "TlsSetValue failed\n"); - - val = TlsGetValue(TLS_index0); - ok(GetLastError() == ERROR_SUCCESS, "TlsGetValue failed\n"); - ok(val == (LPVOID) 3, "TLS slot not initialized correctly\n"); - - val = TlsGetValue(TLS_index1); - ok(GetLastError() == ERROR_SUCCESS, "TlsGetValue failed\n"); - ok(val == (LPVOID) 4, "TLS slot not initialized correctly\n"); - } - resync_after_run(); - - if (sync_threads_and_run_one(0, id)) - { - HANDLE thread; - DWORD waitret, tid; - - val = TlsGetValue(TLS_index0); - ok(GetLastError() == ERROR_SUCCESS, "TlsGetValue failed\n"); - ok(val == (LPVOID) 1, "TLS slot not initialized correctly\n"); - - val = TlsGetValue(TLS_index1); - ok(GetLastError() == ERROR_SUCCESS, "TlsGetValue failed\n"); - ok(val == (LPVOID) 2, "TLS slot not initialized correctly\n"); - - thread = CreateThread(NULL, 0, TLS_InheritanceProc, 0, 0, &tid); - ok(thread != NULL, "CreateThread failed\n"); - waitret = WaitForSingleObject(thread, 60000); - ok(waitret == WAIT_OBJECT_0, "WaitForSingleObject failed\n"); - CloseHandle(thread); - - ret = TlsFree(TLS_index0); - ok(ret, "TlsFree failed\n"); - } - resync_after_run(); - - if (sync_threads_and_run_one(1, id)) - { - ret = TlsFree(TLS_index1); - ok(ret, "TlsFree failed\n"); - } - resync_after_run(); - - return 0; -} - -static void test_TLS(void) -{ - HANDLE threads[2]; - LONG_PTR i; - DWORD ret; - BOOL suc; - - init_thread_sync_helpers(); - - /* Allocate a TLS slot in the main thread to test for inheritance. */ - TLS_main = TlsAlloc(); - ok(TLS_main != TLS_OUT_OF_INDEXES, "TlsAlloc failed\n"); - suc = TlsSetValue(TLS_main, (LPVOID) 4114); - ok(suc, "TlsSetValue failed\n"); - - for (i = 0; i < 2; ++i) - { - DWORD tid; - - threads[i] = CreateThread(NULL, 0, TLS_ThreadProc, (LPVOID) i, 0, &tid); - ok(threads[i] != NULL, "CreateThread failed\n"); - } - - ret = WaitForMultipleObjects(2, threads, TRUE, 60000); - ok(ret == WAIT_OBJECT_0 || broken(ret == WAIT_OBJECT_0+1 /* nt4,w2k */), "WaitForAllObjects 2 threads %d\n",ret); - - for (i = 0; i < 2; ++i) - CloseHandle(threads[i]); - - suc = TlsFree(TLS_main); - ok(suc, "TlsFree failed\n"); - cleanup_thread_sync_helpers(); -} - -static void test_ThreadErrorMode(void) -{ - DWORD oldmode; - DWORD mode; - DWORD rtlmode; - BOOL ret; - - if (!pSetThreadErrorMode || !pGetThreadErrorMode) - { - win_skip("SetThreadErrorMode and/or GetThreadErrorMode unavailable (added in Windows 7)\n"); - return; - } - - if (!pRtlGetThreadErrorMode) { - win_skip("RtlGetThreadErrorMode not available\n"); - return; - } - - oldmode = pGetThreadErrorMode(); - - ret = pSetThreadErrorMode(0, &mode); - ok(ret, "SetThreadErrorMode failed\n"); - ok(mode == oldmode, - "SetThreadErrorMode returned old mode 0x%x, expected 0x%x\n", - mode, oldmode); - mode = pGetThreadErrorMode(); - ok(mode == 0, "GetThreadErrorMode returned mode 0x%x, expected 0\n", mode); - rtlmode = pRtlGetThreadErrorMode(); - ok(rtlmode == 0, - "RtlGetThreadErrorMode returned mode 0x%x, expected 0\n", mode); - - ret = pSetThreadErrorMode(SEM_FAILCRITICALERRORS, &mode); - ok(ret, "SetThreadErrorMode failed\n"); - ok(mode == 0, - "SetThreadErrorMode returned old mode 0x%x, expected 0\n", mode); - mode = pGetThreadErrorMode(); - ok(mode == SEM_FAILCRITICALERRORS, - "GetThreadErrorMode returned mode 0x%x, expected SEM_FAILCRITICALERRORS\n", - mode); - rtlmode = pRtlGetThreadErrorMode(); - ok(rtlmode == 0x10, - "RtlGetThreadErrorMode returned mode 0x%x, expected 0x10\n", mode); - - ret = pSetThreadErrorMode(SEM_NOGPFAULTERRORBOX, &mode); - ok(ret, "SetThreadErrorMode failed\n"); - ok(mode == SEM_FAILCRITICALERRORS, - "SetThreadErrorMode returned old mode 0x%x, expected SEM_FAILCRITICALERRORS\n", - mode); - mode = pGetThreadErrorMode(); - ok(mode == SEM_NOGPFAULTERRORBOX, - "GetThreadErrorMode returned mode 0x%x, expected SEM_NOGPFAULTERRORBOX\n", - mode); - rtlmode = pRtlGetThreadErrorMode(); - ok(rtlmode == 0x20, - "RtlGetThreadErrorMode returned mode 0x%x, expected 0x20\n", mode); - - ret = pSetThreadErrorMode(SEM_NOOPENFILEERRORBOX, NULL); - ok(ret, "SetThreadErrorMode failed\n"); - mode = pGetThreadErrorMode(); - ok(mode == SEM_NOOPENFILEERRORBOX, - "GetThreadErrorMode returned mode 0x%x, expected SEM_NOOPENFILEERRORBOX\n", - mode); - rtlmode = pRtlGetThreadErrorMode(); - ok(rtlmode == 0x40, - "RtlGetThreadErrorMode returned mode 0x%x, expected 0x40\n", rtlmode); - - for (mode = 1; mode; mode <<= 1) - { - ret = pSetThreadErrorMode(mode, NULL); - if (mode & (SEM_FAILCRITICALERRORS | - SEM_NOGPFAULTERRORBOX | - SEM_NOOPENFILEERRORBOX)) - { - ok(ret, - "SetThreadErrorMode(0x%x,NULL) failed with error %d\n", - mode, GetLastError()); - } - else - { - DWORD GLE = GetLastError(); - ok(!ret, - "SetThreadErrorMode(0x%x,NULL) succeeded, expected failure\n", - mode); - ok(GLE == ERROR_INVALID_PARAMETER, - "SetThreadErrorMode(0x%x,NULL) failed with %d, " - "expected ERROR_INVALID_PARAMETER\n", - mode, GLE); - } - } - - pSetThreadErrorMode(oldmode, NULL); -} - -#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) -static inline void set_fpu_cw(WORD cw) -{ - __asm__ volatile ("fnclex; fldcw %0" : : "m" (cw)); -} - -static inline WORD get_fpu_cw(void) -{ - WORD cw = 0; - __asm__ volatile ("fnstcw %0" : "=m" (cw)); - return cw; -} - -struct fpu_thread_ctx -{ - WORD cw; - HANDLE finished; -}; - -static DWORD WINAPI fpu_thread(void *param) -{ - struct fpu_thread_ctx *ctx = param; - BOOL ret; - - ctx->cw = get_fpu_cw(); - - ret = SetEvent(ctx->finished); - ok(ret, "SetEvent failed, last error %#x.\n", GetLastError()); - - return 0; -} - -static WORD get_thread_fpu_cw(void) -{ - struct fpu_thread_ctx ctx; - DWORD tid, res; - HANDLE thread; - - ctx.finished = CreateEvent(NULL, FALSE, FALSE, NULL); - ok(!!ctx.finished, "Failed to create event, last error %#x.\n", GetLastError()); - - thread = CreateThread(NULL, 0, fpu_thread, &ctx, 0, &tid); - ok(!!thread, "Failed to create thread, last error %#x.\n", GetLastError()); - - res = WaitForSingleObject(ctx.finished, INFINITE); - ok(res == WAIT_OBJECT_0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); - - res = CloseHandle(ctx.finished); - ok(!!res, "Failed to close event handle, last error %#x.\n", GetLastError()); - - return ctx.cw; -} - -static void test_thread_fpu_cw(void) -{ - WORD initial_cw, cw; - - initial_cw = get_fpu_cw(); - ok(initial_cw == 0x27f, "Expected FPU control word 0x27f, got %#x.\n", initial_cw); - - cw = get_thread_fpu_cw(); - ok(cw == 0x27f, "Expected FPU control word 0x27f, got %#x.\n", cw); - - set_fpu_cw(0xf60); - cw = get_fpu_cw(); - ok(cw == 0xf60, "Expected FPU control word 0xf60, got %#x.\n", cw); - - cw = get_thread_fpu_cw(); - ok(cw == 0x27f, "Expected FPU control word 0x27f, got %#x.\n", cw); - - cw = get_fpu_cw(); - ok(cw == 0xf60, "Expected FPU control word 0xf60, got %#x.\n", cw); - - set_fpu_cw(initial_cw); - cw = get_fpu_cw(); - ok(cw == initial_cw, "Expected FPU control word %#x, got %#x.\n", initial_cw, cw); -} -#endif - -START_TEST(thread) -{ - HINSTANCE lib; - HINSTANCE ntdll; - int argc; - char **argv; - argc = winetest_get_mainargs( &argv ); -/* Neither Cygwin nor mingW export OpenThread, so do a dynamic check - so that the compile passes -*/ - lib=GetModuleHandleA("kernel32.dll"); - ok(lib!=NULL,"Couldn't get a handle for kernel32.dll\n"); - pGetThreadPriorityBoost=(void *)GetProcAddress(lib,"GetThreadPriorityBoost"); - pOpenThread=(void *)GetProcAddress(lib,"OpenThread"); - pQueueUserWorkItem=(void *)GetProcAddress(lib,"QueueUserWorkItem"); - pSetThreadIdealProcessor=(void *)GetProcAddress(lib,"SetThreadIdealProcessor"); - pSetThreadPriorityBoost=(void *)GetProcAddress(lib,"SetThreadPriorityBoost"); - pRegisterWaitForSingleObject=(void *)GetProcAddress(lib,"RegisterWaitForSingleObject"); - pUnregisterWait=(void *)GetProcAddress(lib,"UnregisterWait"); - pIsWow64Process=(void *)GetProcAddress(lib,"IsWow64Process"); - pSetThreadErrorMode=(void *)GetProcAddress(lib,"SetThreadErrorMode"); - pGetThreadErrorMode=(void *)GetProcAddress(lib,"GetThreadErrorMode"); - - ntdll=GetModuleHandleA("ntdll.dll"); - if (ntdll) - { - pRtlGetThreadErrorMode=(void *)GetProcAddress(ntdll,"RtlGetThreadErrorMode"); - } - - if (argc >= 3) - { - if (!strcmp(argv[2], "sleep")) - { - HANDLE hAddrEvents[2]; - create_function_addr_events(hAddrEvents); - SetEvent(hAddrEvents[0]); - SetEvent(hAddrEvents[1]); - Sleep(5000); /* spawned process runs for at most 5 seconds */ - return; - } - while (1) - { - HANDLE hThread; - DWORD tid; - hThread = CreateThread(NULL, 0, threadFunc2, NULL, 0, &tid); - ok(hThread != NULL, "CreateThread failed, error %u\n", - GetLastError()); - ok(WaitForSingleObject(hThread, 200) == WAIT_OBJECT_0, - "Thread did not exit in time\n"); - if (hThread == NULL) break; - CloseHandle(hThread); - } - return; - } - - test_CreateRemoteThread(); - test_CreateThread_basic(); - test_CreateThread_suspended(); - test_SuspendThread(); - test_TerminateThread(); - test_CreateThread_stack(); - test_thread_priority(); - test_GetThreadTimes(); - test_thread_processor(); - test_GetThreadExitCode(); -#ifdef __i386__ - test_SetThreadContext(); -#endif - test_QueueUserWorkItem(); - test_RegisterWaitForSingleObject(); - test_TLS(); - test_ThreadErrorMode(); -#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) - test_thread_fpu_cw(); -#endif -} diff --git a/rostests/winetests/kernel32/time.c b/rostests/winetests/kernel32/time.c deleted file mode 100755 index e8df15bdca4..00000000000 --- a/rostests/winetests/kernel32/time.c +++ /dev/null @@ -1,714 +0,0 @@ -/* - * Unit test suite for time functions - * - * Copyright 2004 Uwe Bonnes - * Copyright 2007 Dmitry Timoshkov - * - * 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/test.h" -#include "winbase.h" -#include "winnls.h" - -static BOOL (WINAPI *pTzSpecificLocalTimeToSystemTime)(LPTIME_ZONE_INFORMATION, LPSYSTEMTIME, LPSYSTEMTIME); -static BOOL (WINAPI *pSystemTimeToTzSpecificLocalTime)(LPTIME_ZONE_INFORMATION, LPSYSTEMTIME, LPSYSTEMTIME); -static int (WINAPI *pGetCalendarInfoA)(LCID,CALID,CALTYPE,LPSTR,int,LPDWORD); -static int (WINAPI *pGetCalendarInfoW)(LCID,CALID,CALTYPE,LPWSTR,int,LPDWORD); - -#define SECSPERMIN 60 -#define SECSPERDAY 86400 -/* 1601 to 1970 is 369 years plus 89 leap days */ -#define SECS_1601_TO_1970 ((369 * 365 + 89) * (ULONGLONG)SECSPERDAY) -#define TICKSPERSEC 10000000 -#define TICKSPERMSEC 10000 -#define TICKS_1601_TO_1970 (SECS_1601_TO_1970 * TICKSPERSEC) - - -#define NEWYEAR_1980_HI 0x01a8e79f -#define NEWYEAR_1980_LO 0xe1d58000 - -#define MAYDAY_2002_HI 0x01c1f107 -#define MAYDAY_2002_LO 0xb82b6000 - -#define ATIME_HI 0x1c2349b -#define ATIME_LOW 0x580716b0 - -#define LOCAL_ATIME_HI 0x01c23471 -#define LOCAL_ATIME_LOW 0x6f310eb0 - -#define DOS_DATE(y,m,d) ( (((y)-1980)<<9) | ((m)<<5) | (d) ) -#define DOS_TIME(h,m,s) ( ((h)<<11) | ((m)<<5) | ((s)>>1) ) - - -#define SETUP_1980(st) \ - (st).wYear = 1980; \ - (st).wMonth = 1; \ - (st).wDay = 1; \ - (st).wHour = 0; \ - (st).wMinute = 0; \ - (st).wSecond = 0; \ - (st).wMilliseconds = 0; - -#define SETUP_2002(st) \ - (st).wYear = 2002; \ - (st).wMonth = 5; \ - (st).wDay = 1; \ - (st).wHour = 12; \ - (st).wMinute = 0; \ - (st).wSecond = 0; \ - (st).wMilliseconds = 0; - -#define SETUP_ATIME(st) \ - (st).wYear = 2002; \ - (st).wMonth = 7; \ - (st).wDay = 26; \ - (st).wHour = 11; \ - (st).wMinute = 55; \ - (st).wSecond = 32; \ - (st).wMilliseconds = 123; - -#define SETUP_ZEROTIME(st) \ - (st).wYear = 1601; \ - (st).wMonth = 1; \ - (st).wDay = 1; \ - (st).wHour = 0; \ - (st).wMinute = 0; \ - (st).wSecond = 0; \ - (st).wMilliseconds = 0; - -#define SETUP_EARLY(st) \ - (st).wYear = 1600; \ - (st).wMonth = 12; \ - (st).wDay = 31; \ - (st).wHour = 23; \ - (st).wMinute = 59; \ - (st).wSecond = 59; \ - (st).wMilliseconds = 999; - - -static void test_conversions(void) -{ - FILETIME ft; - SYSTEMTIME st; - - memset(&ft,0,sizeof ft); - - SetLastError(0xdeadbeef); - SETUP_EARLY(st) - ok (!SystemTimeToFileTime(&st, &ft), "Conversion succeeded EARLY\n"); - ok (GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == 0xdeadbeef, /* win9x */ - "EARLY should be INVALID\n"); - - SETUP_ZEROTIME(st) - ok (SystemTimeToFileTime(&st, &ft), "Conversion failed ZERO_TIME\n"); - ok( (!((ft.dwHighDateTime != 0) || (ft.dwLowDateTime != 0))), - "Wrong time for ATIME: %08x %08x (correct %08x %08x)\n", - ft.dwLowDateTime, ft.dwHighDateTime, 0, 0); - - - SETUP_ATIME(st) - ok (SystemTimeToFileTime(&st,&ft), "Conversion Failed ATIME\n"); - ok( (!((ft.dwHighDateTime != ATIME_HI) || (ft.dwLowDateTime!=ATIME_LOW))), - "Wrong time for ATIME: %08x %08x (correct %08x %08x)\n", - ft.dwLowDateTime, ft.dwHighDateTime, ATIME_LOW, ATIME_HI); - - - SETUP_2002(st) - ok (SystemTimeToFileTime(&st, &ft), "Conversion failed 2002\n"); - - ok( (!((ft.dwHighDateTime != MAYDAY_2002_HI) || - (ft.dwLowDateTime!=MAYDAY_2002_LO))), - "Wrong time for 2002 %08x %08x (correct %08x %08x)\n", ft.dwLowDateTime, - ft.dwHighDateTime, MAYDAY_2002_LO, MAYDAY_2002_HI); - - - SETUP_1980(st) - ok((SystemTimeToFileTime(&st, &ft)), "Conversion failed 1980\n"); - - ok( (!((ft.dwHighDateTime!=NEWYEAR_1980_HI) || - (ft.dwLowDateTime!=NEWYEAR_1980_LO))) , - "Wrong time for 1980 %08x %08x (correct %08x %08x)\n", ft.dwLowDateTime, - ft.dwHighDateTime, NEWYEAR_1980_LO,NEWYEAR_1980_HI ); - - ok(DosDateTimeToFileTime(DOS_DATE(1980,1,1),DOS_TIME(0,0,0),&ft), - "DosDateTimeToFileTime() failed\n"); - - ok( (!((ft.dwHighDateTime!=NEWYEAR_1980_HI) || - (ft.dwLowDateTime!=NEWYEAR_1980_LO))), - "Wrong time DosDateTimeToFileTime %08x %08x (correct %08x %08x)\n", - ft.dwHighDateTime, ft.dwLowDateTime, NEWYEAR_1980_HI, NEWYEAR_1980_LO); - -} - -static void test_invalid_arg(void) -{ - FILETIME ft; - SYSTEMTIME st; - - - /* Invalid argument checks */ - - memset(&ft,0,sizeof ft); - ok( DosDateTimeToFileTime(DOS_DATE(1980,1,1),DOS_TIME(0,0,0),&ft), /* this is 1 Jan 1980 00:00:00 */ - "DosDateTimeToFileTime() failed\n"); - - ok( (ft.dwHighDateTime==NEWYEAR_1980_HI) && (ft.dwLowDateTime==NEWYEAR_1980_LO), - "filetime for 1/1/80 00:00:00 was %08x %08x\n", ft.dwHighDateTime, ft.dwLowDateTime); - - /* now check SystemTimeToFileTime */ - memset(&ft,0,sizeof ft); - - - /* try with a bad month */ - SETUP_1980(st) - st.wMonth = 0; - - ok( !SystemTimeToFileTime(&st, &ft), "bad month\n"); - - /* with a bad hour */ - SETUP_1980(st) - st.wHour = 24; - - ok( !SystemTimeToFileTime(&st, &ft), "bad hour\n"); - - /* with a bad minute */ - SETUP_1980(st) - st.wMinute = 60; - - ok( !SystemTimeToFileTime(&st, &ft), "bad minute\n"); -} - -static LONGLONG system_time_to_minutes(const SYSTEMTIME *st) -{ - BOOL ret; - FILETIME ft; - LONGLONG minutes; - - SetLastError(0xdeadbeef); - ret = SystemTimeToFileTime(st, &ft); - ok(ret, "SystemTimeToFileTime error %u\n", GetLastError()); - - minutes = ((LONGLONG)ft.dwHighDateTime << 32) + ft.dwLowDateTime; - minutes /= (LONGLONG)600000000; /* convert to minutes */ - return minutes; -} - -static LONG get_tz_bias(const TIME_ZONE_INFORMATION *tzinfo, DWORD tz_id) -{ - switch (tz_id) - { - case TIME_ZONE_ID_DAYLIGHT: - if (memcmp(&tzinfo->StandardDate, &tzinfo->DaylightDate, sizeof(tzinfo->DaylightDate)) != 0) - return tzinfo->DaylightBias; - /* fall through */ - - case TIME_ZONE_ID_STANDARD: - return tzinfo->StandardBias; - - default: - trace("unknown time zone id %d\n", tz_id); - /* fall through */ - case TIME_ZONE_ID_UNKNOWN: - return 0; - } -} - -static void test_GetTimeZoneInformation(void) -{ - char std_name[32], dlt_name[32]; - TIME_ZONE_INFORMATION tzinfo, tzinfo1; - BOOL res; - DWORD tz_id; - SYSTEMTIME st, current, utc, local; - FILETIME l_ft, s_ft; - LONGLONG l_time, s_time; - LONG diff; - - GetSystemTime(&st); - s_time = system_time_to_minutes(&st); - - SetLastError(0xdeadbeef); - res = SystemTimeToFileTime(&st, &s_ft); - ok(res, "SystemTimeToFileTime error %u\n", GetLastError()); - SetLastError(0xdeadbeef); - res = FileTimeToLocalFileTime(&s_ft, &l_ft); - ok(res, "FileTimeToLocalFileTime error %u\n", GetLastError()); - SetLastError(0xdeadbeef); - res = FileTimeToSystemTime(&l_ft, &local); - ok(res, "FileTimeToSystemTime error %u\n", GetLastError()); - l_time = system_time_to_minutes(&local); - - tz_id = GetTimeZoneInformation(&tzinfo); - ok(tz_id != TIME_ZONE_ID_INVALID, "GetTimeZoneInformation failed\n"); - - trace("tz_id %u (%s)\n", tz_id, - tz_id == TIME_ZONE_ID_DAYLIGHT ? "TIME_ZONE_ID_DAYLIGHT" : - (tz_id == TIME_ZONE_ID_STANDARD ? "TIME_ZONE_ID_STANDARD" : - (tz_id == TIME_ZONE_ID_UNKNOWN ? "TIME_ZONE_ID_UNKNOWN" : - "TIME_ZONE_ID_INVALID"))); - - WideCharToMultiByte(CP_ACP, 0, tzinfo.StandardName, -1, std_name, sizeof(std_name), NULL, NULL); - WideCharToMultiByte(CP_ACP, 0, tzinfo.DaylightName, -1, dlt_name, sizeof(dlt_name), NULL, NULL); - trace("bias %d, %s - %s\n", tzinfo.Bias, std_name, dlt_name); - trace("standard (d/m/y): %u/%02u/%04u day of week %u %u:%02u:%02u.%03u bias %d\n", - tzinfo.StandardDate.wDay, tzinfo.StandardDate.wMonth, - tzinfo.StandardDate.wYear, tzinfo.StandardDate.wDayOfWeek, - tzinfo.StandardDate.wHour, tzinfo.StandardDate.wMinute, - tzinfo.StandardDate.wSecond, tzinfo.StandardDate.wMilliseconds, - tzinfo.StandardBias); - trace("daylight (d/m/y): %u/%02u/%04u day of week %u %u:%02u:%02u.%03u bias %d\n", - tzinfo.DaylightDate.wDay, tzinfo.DaylightDate.wMonth, - tzinfo.DaylightDate.wYear, tzinfo.DaylightDate.wDayOfWeek, - tzinfo.DaylightDate.wHour, tzinfo.DaylightDate.wMinute, - tzinfo.DaylightDate.wSecond, tzinfo.DaylightDate.wMilliseconds, - tzinfo.DaylightBias); - - diff = (LONG)(s_time - l_time); - ok(diff == tzinfo.Bias + get_tz_bias(&tzinfo, tz_id), - "system/local diff %d != tz bias %d\n", - diff, tzinfo.Bias + get_tz_bias(&tzinfo, tz_id)); - - ok(SetEnvironmentVariableA("TZ","GMT0") != 0, - "SetEnvironmentVariableA failed\n"); - res = GetTimeZoneInformation(&tzinfo1); - ok(res != TIME_ZONE_ID_INVALID, "GetTimeZoneInformation failed\n"); - - ok(((tzinfo.Bias == tzinfo1.Bias) && - (tzinfo.StandardBias == tzinfo1.StandardBias) && - (tzinfo.DaylightBias == tzinfo1.DaylightBias)), - "Bias influenced by TZ variable\n"); - ok(SetEnvironmentVariableA("TZ",NULL) != 0, - "SetEnvironmentVariableA failed\n"); - - if (!pSystemTimeToTzSpecificLocalTime) - { - win_skip("SystemTimeToTzSpecificLocalTime not available\n"); - return; - } - - diff = get_tz_bias(&tzinfo, tz_id); - - utc = st; - SetLastError(0xdeadbeef); - res = pSystemTimeToTzSpecificLocalTime(&tzinfo, &utc, ¤t); - if (!res && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("SystemTimeToTzSpecificLocalTime is not implemented\n"); - return; - } - - ok(res, "SystemTimeToTzSpecificLocalTime error %u\n", GetLastError()); - s_time = system_time_to_minutes(¤t); - - tzinfo.StandardBias -= 123; - tzinfo.DaylightBias += 456; - - res = pSystemTimeToTzSpecificLocalTime(&tzinfo, &utc, &local); - ok(res, "SystemTimeToTzSpecificLocalTime error %u\n", GetLastError()); - l_time = system_time_to_minutes(&local); - ok(l_time - s_time == diff - get_tz_bias(&tzinfo, tz_id), "got %d, expected %d\n", - (LONG)(l_time - s_time), diff - get_tz_bias(&tzinfo, tz_id)); - - /* pretend that there is no transition dates */ - tzinfo.DaylightDate.wDay = 0; - tzinfo.DaylightDate.wMonth = 0; - tzinfo.DaylightDate.wYear = 0; - tzinfo.StandardDate.wDay = 0; - tzinfo.StandardDate.wMonth = 0; - tzinfo.StandardDate.wYear = 0; - - res = pSystemTimeToTzSpecificLocalTime(&tzinfo, &utc, &local); - ok(res, "SystemTimeToTzSpecificLocalTime error %u\n", GetLastError()); - l_time = system_time_to_minutes(&local); - ok(l_time - s_time == diff, "got %d, expected %d\n", - (LONG)(l_time - s_time), diff); -} - -static void test_FileTimeToSystemTime(void) -{ - FILETIME ft; - SYSTEMTIME st; - ULONGLONG time = (ULONGLONG)TICKSPERSEC + TICKS_1601_TO_1970; - BOOL ret; - - ft.dwHighDateTime = 0; - ft.dwLowDateTime = 0; - ret = FileTimeToSystemTime(&ft, &st); - ok( ret, - "FileTimeToSystemTime() failed with Error %d\n",GetLastError()); - ok(((st.wYear == 1601) && (st.wMonth == 1) && (st.wDay == 1) && - (st.wHour == 0) && (st.wMinute == 0) && (st.wSecond == 0) && - (st.wMilliseconds == 0)), - "Got Year %4d Month %2d Day %2d\n", st.wYear, st.wMonth, st.wDay); - - ft.dwHighDateTime = (UINT)(time >> 32); - ft.dwLowDateTime = (UINT)time; - ret = FileTimeToSystemTime(&ft, &st); - ok( ret, - "FileTimeToSystemTime() failed with Error %d\n",GetLastError()); - ok(((st.wYear == 1970) && (st.wMonth == 1) && (st.wDay == 1) && - (st.wHour == 0) && (st.wMinute == 0) && (st.wSecond == 1) && - (st.wMilliseconds == 0)), - "Got Year %4d Month %2d Day %2d Hour %2d Min %2d Sec %2d mSec %3d\n", - st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond, - st.wMilliseconds); -} - -static void test_FileTimeToLocalFileTime(void) -{ - FILETIME ft, lft; - SYSTEMTIME st; - TIME_ZONE_INFORMATION tzinfo; - DWORD res = GetTimeZoneInformation(&tzinfo); - ULONGLONG time = (ULONGLONG)TICKSPERSEC + TICKS_1601_TO_1970 + - (LONGLONG)(tzinfo.Bias + - ( res == TIME_ZONE_ID_STANDARD ? tzinfo.StandardBias : - ( res == TIME_ZONE_ID_DAYLIGHT ? tzinfo.DaylightBias : 0 ))) * - SECSPERMIN *TICKSPERSEC; - BOOL ret; - - ok( res != TIME_ZONE_ID_INVALID , "GetTimeZoneInformation failed\n"); - ft.dwHighDateTime = (UINT)(time >> 32); - ft.dwLowDateTime = (UINT)time; - ret = FileTimeToLocalFileTime(&ft, &lft); - ok( ret, - "FileTimeToLocalFileTime() failed with Error %d\n",GetLastError()); - FileTimeToSystemTime(&lft, &st); - ok(((st.wYear == 1970) && (st.wMonth == 1) && (st.wDay == 1) && - (st.wHour == 0) && (st.wMinute == 0) && (st.wSecond == 1) && - (st.wMilliseconds == 0)), - "Got Year %4d Month %2d Day %2d Hour %2d Min %2d Sec %2d mSec %3d\n", - st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond, - st.wMilliseconds); - - ok(SetEnvironmentVariableA("TZ","GMT") != 0, - "SetEnvironmentVariableA failed\n"); - ok(res != TIME_ZONE_ID_INVALID, "GetTimeZoneInformation failed\n"); - ret = FileTimeToLocalFileTime(&ft, &lft); - ok( ret, - "FileTimeToLocalFileTime() failed with Error %d\n",GetLastError()); - FileTimeToSystemTime(&lft, &st); - ok(((st.wYear == 1970) && (st.wMonth == 1) && (st.wDay == 1) && - (st.wHour == 0) && (st.wMinute == 0) && (st.wSecond == 1) && - (st.wMilliseconds == 0)), - "Got Year %4d Month %2d Day %2d Hour %2d Min %2d Sec %2d mSec %3d\n", - st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond, - st.wMilliseconds); - ok(SetEnvironmentVariableA("TZ",NULL) != 0, - "SetEnvironmentVariableA failed\n"); -} - -typedef struct { - int nr; /* test case number for easier lookup */ - TIME_ZONE_INFORMATION *ptz; /* ptr to timezone */ - SYSTEMTIME slt; /* system/local time to convert */ - WORD ehour; /* expected hour */ -} TZLT2ST_case; - -static void test_TzSpecificLocalTimeToSystemTime(void) -{ - TIME_ZONE_INFORMATION tzE, tzW, tzS; - SYSTEMTIME result; - int i, j, year; - - if (!pTzSpecificLocalTimeToSystemTime || !pSystemTimeToTzSpecificLocalTime) - { - win_skip("TzSpecificLocalTimeToSystemTime or SystemTimeToTzSpecificLocalTime not available\n"); - return; - } - - ZeroMemory( &tzE, sizeof(tzE)); - ZeroMemory( &tzW, sizeof(tzW)); - ZeroMemory( &tzS, sizeof(tzS)); - /* timezone Eastern hemisphere */ - tzE.Bias=-600; - tzE.StandardBias=0; - tzE.DaylightBias=-60; - tzE.StandardDate.wMonth=10; - tzE.StandardDate.wDayOfWeek=0; /* Sunday */ - tzE.StandardDate.wDay=5; /* last (Sunday) of the month */ - tzE.StandardDate.wHour=3; - tzE.DaylightDate.wMonth=3; - tzE.DaylightDate.wDay=5; - tzE.DaylightDate.wHour=2; - /* timezone Western hemisphere */ - tzW.Bias=240; - tzW.StandardBias=0; - tzW.DaylightBias=-60; - tzW.StandardDate.wMonth=10; - tzW.StandardDate.wDayOfWeek=0; /* Sunday */ - tzW.StandardDate.wDay=4; /* 4th (Sunday) of the month */ - tzW.StandardDate.wHour=2; - tzW.DaylightDate.wMonth=4; - tzW.DaylightDate.wDay=1; - tzW.DaylightDate.wHour=2; - /* timezone Southern hemisphere */ - tzS.Bias=240; - tzS.StandardBias=0; - tzS.DaylightBias=-60; - tzS.StandardDate.wMonth=4; - tzS.StandardDate.wDayOfWeek=0; /*Sunday */ - tzS.StandardDate.wDay=1; /* 1st (Sunday) of the month */ - tzS.StandardDate.wHour=2; - tzS.DaylightDate.wMonth=10; - tzS.DaylightDate.wDay=4; - tzS.DaylightDate.wHour=2; - /*tests*/ - /* TzSpecificLocalTimeToSystemTime */ - { TZLT2ST_case cases[] = { - /* standard->daylight transition */ - { 1, &tzE, {2004,3,-1,28,1,0,0,0}, 15 }, - { 2, &tzE, {2004,3,-1,28,1,59,59,999}, 15}, - { 3, &tzE, {2004,3,-1,28,2,0,0,0}, 15}, - /* daylight->standard transition */ - { 4, &tzE, {2004,10,-1,31,2,0,0,0} , 15 }, - { 5, &tzE, {2004,10,-1,31,2,59,59,999}, 15 }, - { 6, &tzE, {2004,10,-1,31,3,0,0,0}, 17 }, - /* West and with fixed weekday of the month */ - { 7, &tzW, {2004,4,-1,4,1,0,0,0}, 5}, - { 8, &tzW, {2004,4,-1,4,1,59,59,999}, 5}, - { 9, &tzW, {2004,4,-1,4,2,0,0,0}, 5}, - { 10, &tzW, {2004,10,-1,24,1,0,0,0}, 4}, - { 11, &tzW, {2004,10,-1,24,1,59,59,999}, 4}, - { 12, &tzW, {2004,10,-1,24,2,0,0,0 }, 6}, - /* and now South */ - { 13, &tzS, {2004,4,-1,4,1,0,0,0}, 4}, - { 14, &tzS, {2004,4,-1,4,1,59,59,999}, 4}, - { 15, &tzS, {2004,4,-1,4,2,0,0,0}, 6}, - { 16, &tzS, {2004,10,-1,24,1,0,0,0}, 5}, - { 17, &tzS, {2004,10,-1,24,1,59,59,999}, 5}, - { 18, &tzS, {2004,10,-1,24,2,0,0,0}, 5}, - {0} - }; - /* days of transitions to put into the cases array */ - int yeardays[][6]= - { - {28,31,4,24,4,24} /* 1999 */ - , {26,29,2,22,2,22} /* 2000 */ - , {25,28,1,28,1,28} /* 2001 */ - , {31,27,7,27,7,27} /* 2002 */ - , {30,26,6,26,6,26} /* 2003 */ - , {28,31,4,24,4,24} /* 2004 */ - , {27,30,3,23,3,23} /* 2005 */ - , {26,29,2,22,2,22} /* 2006 */ - , {25,28,1,28,1,28} /* 2007 */ - , {30,26,6,26,6,26} /* 2008 */ - , {29,25,5,25,5,25} /* 2009 */ - , {28,31,4,24,4,24} /* 2010 */ - , {27,30,3,23,3,23} /* 2011 */ - , {25,28,1,28,1,28} /* 2012 */ - , {31,27,7,27,7,27} /* 2013 */ - , {30,26,6,26,6,26} /* 2014 */ - , {29,25,5,25,5,25} /* 2015 */ - , {27,30,3,23,3,23} /* 2016 */ - , {26,29,2,22,2,22} /* 2017 */ - , {25,28,1,28,1,28} /* 2018 */ - , {31,27,7,27,7,27} /* 2019 */ - ,{0} - }; - for( j=0 , year = 1999; yeardays[j][0] ; j++, year++) { - for (i=0; cases[i].nr; i++) { - if(i) cases[i].nr += 18; - cases[i].slt.wYear = year; - cases[i].slt.wDay = yeardays[j][i/3]; - pTzSpecificLocalTimeToSystemTime( cases[i].ptz, &(cases[i].slt), &result); - ok( result.wHour == cases[i].ehour, - "Test TzSpecificLocalTimeToSystemTime #%d. Got %4d-%02d-%02d %02d:%02d. Expect hour = %02d\n", - cases[i].nr, result.wYear, result.wMonth, result.wDay, - result.wHour, result.wMinute, cases[i].ehour); - } - } - } - /* SystemTimeToTzSpecificLocalTime */ - { TZLT2ST_case cases[] = { - /* standard->daylight transition */ - { 1, &tzE, {2004,3,-1,27,15,0,0,0}, 1 }, - { 2, &tzE, {2004,3,-1,27,15,59,59,999}, 1}, - { 3, &tzE, {2004,3,-1,27,16,0,0,0}, 3}, - /* daylight->standard transition */ - { 4, &tzE, {2004,10,-1,30,15,0,0,0}, 2 }, - { 5, &tzE, {2004,10,-1,30,15,59,59,999}, 2 }, - { 6, &tzE, {2004,10,-1,30,16,0,0,0}, 2 }, - /* West and with fixed weekday of the month */ - { 7, &tzW, {2004,4,-1,4,5,0,0,0}, 1}, - { 8, &tzW, {2004,4,-1,4,5,59,59,999}, 1}, - { 9, &tzW, {2004,4,-1,4,6,0,0,0}, 3}, - { 10, &tzW, {2004,10,-1,24,4,0,0,0}, 1}, - { 11, &tzW, {2004,10,-1,24,4,59,59,999}, 1}, - { 12, &tzW, {2004,10,-1,24,5,0,0,0 }, 1}, - /* and now South */ - { 13, &tzS, {2004,4,-1,4,4,0,0,0}, 1}, - { 14, &tzS, {2004,4,-1,4,4,59,59,999}, 1}, - { 15, &tzS, {2004,4,-1,4,5,0,0,0}, 1}, - { 16, &tzS, {2004,10,-1,24,5,0,0,0}, 1}, - { 17, &tzS, {2004,10,-1,24,5,59,59,999}, 1}, - { 18, &tzS, {2004,10,-1,24,6,0,0,0}, 3}, - - {0} - }; - /* days of transitions to put into the cases array */ - int yeardays[][6]= - { - {27,30,4,24,4,24} /* 1999 */ - , {25,28,2,22,2,22} /* 2000 */ - , {24,27,1,28,1,28} /* 2001 */ - , {30,26,7,27,7,27} /* 2002 */ - , {29,25,6,26,6,26} /* 2003 */ - , {27,30,4,24,4,24} /* 2004 */ - , {26,29,3,23,3,23} /* 2005 */ - , {25,28,2,22,2,22} /* 2006 */ - , {24,27,1,28,1,28} /* 2007 */ - , {29,25,6,26,6,26} /* 2008 */ - , {28,24,5,25,5,25} /* 2009 */ - , {27,30,4,24,4,24} /* 2010 */ - , {26,29,3,23,3,23} /* 2011 */ - , {24,27,1,28,1,28} /* 2012 */ - , {30,26,7,27,7,27} /* 2013 */ - , {29,25,6,26,6,26} /* 2014 */ - , {28,24,5,25,5,25} /* 2015 */ - , {26,29,3,23,3,23} /* 2016 */ - , {25,28,2,22,2,22} /* 2017 */ - , {24,27,1,28,1,28} /* 2018 */ - , {30,26,7,27,7,27} /* 2019 */ - , {0} - }; - for( j=0 , year = 1999; yeardays[j][0] ; j++, year++) { - for (i=0; cases[i].nr; i++) { - if(i) cases[i].nr += 18; - cases[i].slt.wYear = year; - cases[i].slt.wDay = yeardays[j][i/3]; - pSystemTimeToTzSpecificLocalTime( cases[i].ptz, &(cases[i].slt), &result); - ok( result.wHour == cases[i].ehour, - "Test SystemTimeToTzSpecificLocalTime #%d. Got %4d-%02d-%02d %02d:%02d. Expect hour = %02d\n", - cases[i].nr, result.wYear, result.wMonth, result.wDay, - result.wHour, result.wMinute, cases[i].ehour); - } - } - - } -} - -static void test_FileTimeToDosDateTime(void) -{ - FILETIME ft = { 0 }; - WORD fatdate, fattime; - BOOL ret; - - if (0) - { - /* Crashes */ - FileTimeToDosDateTime(NULL, NULL, NULL); - } - /* Parameter checking */ - SetLastError(0xdeadbeef); - ret = FileTimeToDosDateTime(&ft, NULL, NULL); - ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = FileTimeToDosDateTime(&ft, &fatdate, NULL); - ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = FileTimeToDosDateTime(&ft, NULL, &fattime); - ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = FileTimeToDosDateTime(&ft, &fatdate, &fattime); - ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); -} - -static void test_GetCalendarInfo(void) -{ - char bufferA[20]; - WCHAR bufferW[20]; - DWORD val1, val2; - int ret; - - if (!pGetCalendarInfoA || !pGetCalendarInfoW) - { - trace( "GetCalendarInfo missing\n" ); - return; - } - - ret = pGetCalendarInfoA( 0x0409, CAL_GREGORIAN, CAL_ITWODIGITYEARMAX | CAL_RETURN_NUMBER, - NULL, 0, &val1 ); - ok( ret, "GetCalendarInfoA failed err %u\n", GetLastError() ); - ok( ret == sizeof(val1), "wrong size %u\n", ret ); - ok( val1 >= 2000 && val1 < 2100, "wrong value %u\n", val1 ); - - ret = pGetCalendarInfoW( 0x0409, CAL_GREGORIAN, CAL_ITWODIGITYEARMAX | CAL_RETURN_NUMBER, - NULL, 0, &val2 ); - ok( ret, "GetCalendarInfoW failed err %u\n", GetLastError() ); - ok( ret == sizeof(val2)/sizeof(WCHAR), "wrong size %u\n", ret ); - ok( val1 == val2, "A/W mismatch %u/%u\n", val1, val2 ); - - ret = pGetCalendarInfoA( 0x0409, CAL_GREGORIAN, CAL_ITWODIGITYEARMAX, bufferA, sizeof(bufferA), NULL ); - ok( ret, "GetCalendarInfoA failed err %u\n", GetLastError() ); - ok( ret == 5, "wrong size %u\n", ret ); - ok( atoi( bufferA ) == val1, "wrong value %s/%u\n", bufferA, val1 ); - - ret = pGetCalendarInfoW( 0x0409, CAL_GREGORIAN, CAL_ITWODIGITYEARMAX, bufferW, sizeof(bufferW), NULL ); - ok( ret, "GetCalendarInfoW failed err %u\n", GetLastError() ); - ok( ret == 5, "wrong size %u\n", ret ); - memset( bufferA, 0x55, sizeof(bufferA) ); - WideCharToMultiByte( CP_ACP, 0, bufferW, -1, bufferA, sizeof(bufferA), NULL, NULL ); - ok( atoi( bufferA ) == val1, "wrong value %s/%u\n", bufferA, val1 ); - - ret = pGetCalendarInfoA( 0x0409, CAL_GREGORIAN, CAL_ITWODIGITYEARMAX | CAL_RETURN_NUMBER, - NULL, 0, NULL ); - ok( !ret, "GetCalendarInfoA succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); - - ret = pGetCalendarInfoA( 0x0409, CAL_GREGORIAN, CAL_ITWODIGITYEARMAX, NULL, 0, NULL ); - ok( ret, "GetCalendarInfoA failed err %u\n", GetLastError() ); - ok( ret == 5, "wrong size %u\n", ret ); - - ret = pGetCalendarInfoW( 0x0409, CAL_GREGORIAN, CAL_ITWODIGITYEARMAX | CAL_RETURN_NUMBER, - NULL, 0, NULL ); - ok( !ret, "GetCalendarInfoW succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); - - ret = pGetCalendarInfoW( 0x0409, CAL_GREGORIAN, CAL_ITWODIGITYEARMAX, NULL, 0, NULL ); - ok( ret, "GetCalendarInfoW failed err %u\n", GetLastError() ); - ok( ret == 5, "wrong size %u\n", ret ); -} - -START_TEST(time) -{ - HMODULE hKernel = GetModuleHandle("kernel32"); - pTzSpecificLocalTimeToSystemTime = (void *)GetProcAddress(hKernel, "TzSpecificLocalTimeToSystemTime"); - pSystemTimeToTzSpecificLocalTime = (void *)GetProcAddress( hKernel, "SystemTimeToTzSpecificLocalTime"); - pGetCalendarInfoA = (void *)GetProcAddress(hKernel, "GetCalendarInfoA"); - pGetCalendarInfoW = (void *)GetProcAddress(hKernel, "GetCalendarInfoW"); - - test_conversions(); - test_invalid_arg(); - test_GetTimeZoneInformation(); - test_FileTimeToSystemTime(); - test_FileTimeToLocalFileTime(); - test_TzSpecificLocalTimeToSystemTime(); - test_FileTimeToDosDateTime(); - test_GetCalendarInfo(); -} diff --git a/rostests/winetests/kernel32/timer.c b/rostests/winetests/kernel32/timer.c deleted file mode 100755 index 8c233f0d449..00000000000 --- a/rostests/winetests/kernel32/timer.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Unit test suite for timer functions - * - * Copyright 2004 Mike McCormack - * - * 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 _WIN32_WINNT 0x0501 - -#include "wine/test.h" -#include "winbase.h" - -typedef HANDLE (WINAPI *fnCreateWaitableTimerA)( SECURITY_ATTRIBUTES*, BOOL, LPSTR ); -typedef BOOL (WINAPI *fnSetWaitableTimer)(HANDLE, LARGE_INTEGER*, LONG, PTIMERAPCROUTINE, LPVOID, BOOL); - - -static void test_timer(void) -{ - HMODULE hker = GetModuleHandle("kernel32"); - fnCreateWaitableTimerA pCreateWaitableTimerA; - fnSetWaitableTimer pSetWaitableTimer; - HANDLE handle; - BOOL r; - LARGE_INTEGER due; - - pCreateWaitableTimerA = (fnCreateWaitableTimerA) GetProcAddress( hker, "CreateWaitableTimerA"); - if( !pCreateWaitableTimerA ) - { - win_skip("CreateWaitableTimerA is not available\n"); - return; - } - - pSetWaitableTimer = (fnSetWaitableTimer) GetProcAddress( hker, "SetWaitableTimer"); - if( !pSetWaitableTimer ) - { - win_skip("SetWaitableTimer is not available\n"); - return; - } - - /* try once with a positive number */ - handle = pCreateWaitableTimerA( NULL, 0, NULL ); - ok( handle != NULL, "failed to create waitable timer with no name\n" ); - - due.QuadPart = 10000; - r = pSetWaitableTimer( handle, &due, 0x1f4, NULL, NULL, FALSE ); - ok( r, "failed to set timer\n"); - - CloseHandle( handle ); - - /* try once with a negative number */ - handle = pCreateWaitableTimerA( NULL, 0, NULL ); - ok( handle != NULL, "failed to create waitable timer with no name\n" ); - - due.QuadPart = -10000; - r = pSetWaitableTimer( handle, &due, 0x1f4, NULL, NULL, FALSE ); - ok( r, "failed to set timer\n"); - - CloseHandle( handle ); -} - -START_TEST(timer) -{ - test_timer(); -} diff --git a/rostests/winetests/kernel32/toolhelp.c b/rostests/winetests/kernel32/toolhelp.c deleted file mode 100644 index bfa31277400..00000000000 --- a/rostests/winetests/kernel32/toolhelp.c +++ /dev/null @@ -1,347 +0,0 @@ -/* - * Toolhelp - * - * Copyright 2005 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 "windef.h" -#include "winbase.h" -#include "tlhelp32.h" -#include "wine/test.h" -#include "winuser.h" - -static char selfname[MAX_PATH]; - -/* Some functions are only in later versions of kernel32.dll */ -static HANDLE (WINAPI *pCreateToolhelp32Snapshot)(DWORD, DWORD); -static BOOL (WINAPI *pModule32First)(HANDLE, LPMODULEENTRY32); -static BOOL (WINAPI *pModule32Next)(HANDLE, LPMODULEENTRY32); -static BOOL (WINAPI *pProcess32First)(HANDLE, LPPROCESSENTRY32); -static BOOL (WINAPI *pProcess32Next)(HANDLE, LPPROCESSENTRY32); -static BOOL (WINAPI *pThread32First)(HANDLE, LPTHREADENTRY32); -static BOOL (WINAPI *pThread32Next)(HANDLE, LPTHREADENTRY32); - -/* 1 minute should be more than enough */ -#define WAIT_TIME (60 * 1000) - -static DWORD WINAPI sub_thread(void* pmt) -{ - DWORD w = WaitForSingleObject(pmt, WAIT_TIME); - return w; -} - -/****************************************************************** - * init - * - * generates basic information like: - * selfname: the way to reinvoke ourselves - * returns: - * -1 on error - * 0 if parent - * doesn't return if child - */ -static int init(void) -{ - int argc; - char** argv; - HANDLE ev1, ev2, ev3, hThread; - DWORD w, tid; - - argc = winetest_get_mainargs( &argv ); - strcpy(selfname, argv[0]); - - switch (argc) - { - case 2: /* the test program */ - return 0; - case 4: /* the sub-process */ - ev1 = (HANDLE)(INT_PTR)atoi(argv[2]); - ev2 = (HANDLE)(INT_PTR)atoi(argv[3]); - ev3 = CreateEvent(NULL, FALSE, FALSE, NULL); - - if (ev3 == NULL) ExitProcess(WAIT_ABANDONED); - hThread = CreateThread(NULL, 0, sub_thread, ev3, 0, &tid); - if (hThread == NULL) ExitProcess(WAIT_ABANDONED); - if (!LoadLibraryA("shell32.dll")) ExitProcess(WAIT_ABANDONED); - - /* signal init of sub-process is done */ - SetEvent(ev1); - /* wait for parent to have done all its queries */ - w = WaitForSingleObject(ev2, WAIT_TIME); - if (w != WAIT_OBJECT_0) ExitProcess(w); - /* signal sub-thread to terminate */ - SetEvent(ev3); - w = WaitForSingleObject(hThread, WAIT_TIME); - if (w != WAIT_OBJECT_0) ExitProcess(w); - GetExitCodeThread(hThread, &w); - ExitProcess(w); - default: - return -1; - } -} - -static void test_process(DWORD curr_pid, DWORD sub_pcs_pid) -{ - HANDLE hSnapshot; - PROCESSENTRY32 pe; - MODULEENTRY32 me; - unsigned found = 0; - int num = 0; - int childpos = -1; - - hSnapshot = pCreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 ); - ok(hSnapshot != NULL, "Cannot create snapshot\n"); - - /* check that this current process is enumerated */ - pe.dwSize = sizeof(pe); - if (pProcess32First( hSnapshot, &pe )) - { - do - { - if (pe.th32ProcessID == curr_pid) found++; - if (pe.th32ProcessID == sub_pcs_pid) { childpos = num; found++; } - trace("PID=%x %s\n", pe.th32ProcessID, pe.szExeFile); - num++; - } while (pProcess32Next( hSnapshot, &pe )); - } - ok(found == 2, "couldn't find self and/or sub-process in process list\n"); - - /* check that first really resets the enumeration */ - found = 0; - if (pProcess32First( hSnapshot, &pe )) - { - do - { - if (pe.th32ProcessID == curr_pid) found++; - if (pe.th32ProcessID == sub_pcs_pid) found++; - trace("PID=%x %s\n", pe.th32ProcessID, pe.szExeFile); - num--; - } while (pProcess32Next( hSnapshot, &pe )); - } - ok(found == 2, "couldn't find self and/or sub-process in process list\n"); - ok(!num, "mismatch in counting\n"); - - /* one broken program does Process32First() and does not expect anything - * interesting to be there, especially not the just forked off child */ - ok (childpos !=0, "child is not expected to be at position 0.\n"); - - me.dwSize = sizeof(me); - ok(!pModule32First( hSnapshot, &me ), "shouldn't return a module\n"); - - CloseHandle(hSnapshot); - ok(!pProcess32First( hSnapshot, &pe ), "shouldn't return a process\n"); -} - -static void test_thread(DWORD curr_pid, DWORD sub_pcs_pid) -{ - HANDLE hSnapshot; - THREADENTRY32 te; - MODULEENTRY32 me; - int num = 0; - unsigned curr_found = 0; - unsigned sub_found = 0; - - hSnapshot = pCreateToolhelp32Snapshot( TH32CS_SNAPTHREAD, 0 ); - ok(hSnapshot != NULL, "Cannot create snapshot\n"); - - /* check that this current process is enumerated */ - te.dwSize = sizeof(te); - if (pThread32First( hSnapshot, &te )) - { - do - { - if (te.th32OwnerProcessID == curr_pid) curr_found++; - if (te.th32OwnerProcessID == sub_pcs_pid) sub_found++; - if (winetest_debug > 1) - trace("PID=%x TID=%x %d\n", te.th32OwnerProcessID, te.th32ThreadID, te.tpBasePri); - num++; - } while (pThread32Next( hSnapshot, &te )); - } - ok(curr_found == 1, "couldn't find self in thread list\n"); - ok(sub_found == 2, "couldn't find sub-process thread's in thread list\n"); - - /* check that first really resets enumeration */ - curr_found = 0; - sub_found = 0; - if (pThread32First( hSnapshot, &te )) - { - do - { - if (te.th32OwnerProcessID == curr_pid) curr_found++; - if (te.th32OwnerProcessID == sub_pcs_pid) sub_found++; - if (winetest_debug > 1) - trace("PID=%x TID=%x %d\n", te.th32OwnerProcessID, te.th32ThreadID, te.tpBasePri); - num--; - } while (pThread32Next( hSnapshot, &te )); - } - ok(curr_found == 1, "couldn't find self in thread list\n"); - ok(sub_found == 2, "couldn't find sub-process thread's in thread list\n"); - - me.dwSize = sizeof(me); - ok(!pModule32First( hSnapshot, &me ), "shouldn't return a module\n"); - - CloseHandle(hSnapshot); - ok(!pThread32First( hSnapshot, &te ), "shouldn't return a thread\n"); -} - -static const char* curr_expected_modules[] = -{ - "kernel32_test.exe" - "kernel32.dll", - "ntdll.dll", -}; -static const char* sub_expected_modules[] = -{ - "kernel32_test.exe", - "kernel32.dll", - "shell32.dll", - "ntdll.dll", -}; -#define NUM_OF(x) (sizeof(x) / sizeof(x[0])) - -static void test_module(DWORD pid, const char* expected[], unsigned num_expected) -{ - HANDLE hSnapshot; - PROCESSENTRY32 pe; - THREADENTRY32 te; - MODULEENTRY32 me; - unsigned found[32]; - unsigned i; - int num = 0; - - ok(NUM_OF(found) >= num_expected, "Internal: bump found[] size\n"); - - hSnapshot = pCreateToolhelp32Snapshot( TH32CS_SNAPMODULE, pid ); - ok(hSnapshot != NULL, "Cannot create snapshot\n"); - - for (i = 0; i < num_expected; i++) found[i] = 0; - me.dwSize = sizeof(me); - if (pModule32First( hSnapshot, &me )) - { - do - { - trace("PID=%x base=%p size=%x %s %s\n", - me.th32ProcessID, me.modBaseAddr, me.modBaseSize, me.szExePath, me.szModule); - ok(me.th32ProcessID == pid, "wrong returned process id\n"); - for (i = 0; i < num_expected; i++) - if (!lstrcmpi(expected[i], me.szModule)) found[i]++; - num++; - } while (pModule32Next( hSnapshot, &me )); - } - for (i = 0; i < num_expected; i++) - ok(found[i] == 1, "Module %s is %s\n", - expected[i], found[i] ? "listed more than once" : "not listed"); - - /* check that first really resets the enumeration */ - for (i = 0; i < num_expected; i++) found[i] = 0; - me.dwSize = sizeof(me); - if (pModule32First( hSnapshot, &me )) - { - do - { - trace("PID=%x base=%p size=%x %s %s\n", - me.th32ProcessID, me.modBaseAddr, me.modBaseSize, me.szExePath, me.szModule); - for (i = 0; i < num_expected; i++) - if (!lstrcmpi(expected[i], me.szModule)) found[i]++; - num--; - } while (pModule32Next( hSnapshot, &me )); - } - for (i = 0; i < num_expected; i++) - ok(found[i] == 1, "Module %s is %s\n", - expected[i], found[i] ? "listed more than once" : "not listed"); - ok(!num, "mismatch in counting\n"); - - pe.dwSize = sizeof(pe); - ok(!pProcess32First( hSnapshot, &pe ), "shouldn't return a process\n"); - - te.dwSize = sizeof(te); - ok(!pThread32First( hSnapshot, &te ), "shouldn't return a thread\n"); - - CloseHandle(hSnapshot); - ok(!pModule32First( hSnapshot, &me ), "shouldn't return a module\n"); -} - -START_TEST(toolhelp) -{ - DWORD pid = GetCurrentProcessId(); - int r; - char *p, module[MAX_PATH]; - char buffer[MAX_PATH]; - SECURITY_ATTRIBUTES sa; - PROCESS_INFORMATION info; - STARTUPINFOA startup; - HANDLE ev1, ev2; - DWORD w; - HANDLE hkernel32 = GetModuleHandleA("kernel32"); - - pCreateToolhelp32Snapshot = (VOID *) GetProcAddress(hkernel32, "CreateToolhelp32Snapshot"); - pModule32First = (VOID *) GetProcAddress(hkernel32, "Module32First"); - pModule32Next = (VOID *) GetProcAddress(hkernel32, "Module32Next"); - pProcess32First = (VOID *) GetProcAddress(hkernel32, "Process32First"); - pProcess32Next = (VOID *) GetProcAddress(hkernel32, "Process32Next"); - pThread32First = (VOID *) GetProcAddress(hkernel32, "Thread32First"); - pThread32Next = (VOID *) GetProcAddress(hkernel32, "Thread32Next"); - - if (!pCreateToolhelp32Snapshot || - !pModule32First || !pModule32Next || - !pProcess32First || !pProcess32Next || - !pThread32First || !pThread32Next) - { - win_skip("Needed functions are not available, most likely running on Windows NT\n"); - return; - } - - r = init(); - ok(r == 0, "Basic init of sub-process test\n"); - if (r != 0) return; - - sa.nLength = sizeof(sa); - sa.lpSecurityDescriptor = NULL; - sa.bInheritHandle = TRUE; - - ev1 = CreateEvent(&sa, FALSE, FALSE, NULL); - ev2 = CreateEvent(&sa, FALSE, FALSE, NULL); - ok (ev1 != NULL && ev2 != NULL, "Couldn't create events\n"); - memset(&startup, 0, sizeof(startup)); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW; - startup.wShowWindow = SW_SHOWNORMAL; - - sprintf(buffer, "%s tests/toolhelp.c %lu %lu", selfname, (DWORD_PTR)ev1, (DWORD_PTR)ev2); - ok(CreateProcessA(NULL, buffer, NULL, NULL, TRUE, 0, NULL, NULL, &startup, &info), "CreateProcess\n"); - /* wait for child to be initialized */ - w = WaitForSingleObject(ev1, WAIT_TIME); - ok(w == WAIT_OBJECT_0, "Failed to wait on sub-process startup\n"); - - GetModuleFileNameA( 0, module, sizeof(module) ); - if (!(p = strrchr( module, '\\' ))) p = module; - else p++; - curr_expected_modules[0] = p; - sub_expected_modules[0] = p; - - test_process(pid, info.dwProcessId); - test_thread(pid, info.dwProcessId); - test_module(pid, curr_expected_modules, NUM_OF(curr_expected_modules)); - test_module(info.dwProcessId, sub_expected_modules, NUM_OF(sub_expected_modules)); - - SetEvent(ev2); - winetest_wait_child_process( info.hProcess ); -} diff --git a/rostests/winetests/kernel32/version.c b/rostests/winetests/kernel32/version.c deleted file mode 100644 index 9f9b72e564e..00000000000 --- a/rostests/winetests/kernel32/version.c +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Unit test suite for version functions - * - * Copyright 2006 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 - -#include "wine/test.h" -#include "winbase.h" - -static BOOL (WINAPI * pVerifyVersionInfoA)(LPOSVERSIONINFOEXA, DWORD, DWORDLONG); -static ULONGLONG (WINAPI * pVerSetConditionMask)(ULONGLONG, DWORD, BYTE); - -#define KERNEL32_GET_PROC(func) \ - p##func = (void *)GetProcAddress(hKernel32, #func); \ - if(!p##func) trace("GetProcAddress(hKernel32, '%s') failed\n", #func); - -static void init_function_pointers(void) -{ - HMODULE hKernel32; - - pVerifyVersionInfoA = NULL; - pVerSetConditionMask = NULL; - - hKernel32 = GetModuleHandleA("kernel32.dll"); - assert(hKernel32); - KERNEL32_GET_PROC(VerifyVersionInfoA); - KERNEL32_GET_PROC(VerSetConditionMask); -} - -static void test_GetVersionEx(void) -{ - OSVERSIONINFOA infoA; - OSVERSIONINFOEXA infoExA; - BOOL ret; - - if (0) - { - /* Silently crashes on XP */ - GetVersionExA(NULL); - } - - SetLastError(0xdeadbeef); - memset(&infoA,0,sizeof infoA); - ret = GetVersionExA(&infoA); - ok(!ret, "Expected GetVersionExA to fail\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER || - GetLastError() == 0xdeadbeef /* Win9x */, - "Expected ERROR_INSUFFICIENT_BUFFER or 0xdeadbeef (Win9x), got %d\n", - GetLastError()); - - SetLastError(0xdeadbeef); - infoA.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA) / 2; - ret = GetVersionExA(&infoA); - ok(!ret, "Expected GetVersionExA to fail\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER || - GetLastError() == 0xdeadbeef /* Win9x */, - "Expected ERROR_INSUFFICIENT_BUFFER or 0xdeadbeef (Win9x), got %d\n", - GetLastError()); - - SetLastError(0xdeadbeef); - infoA.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA) * 2; - ret = GetVersionExA(&infoA); - ok(!ret, "Expected GetVersionExA to fail\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER || - GetLastError() == 0xdeadbeef /* Win9x */, - "Expected ERROR_INSUFFICIENT_BUFFER or 0xdeadbeef (Win9x), got %d\n", - GetLastError()); - - SetLastError(0xdeadbeef); - infoA.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA); - ret = GetVersionExA(&infoA); - ok(ret, "Expected GetVersionExA to succeed\n"); - ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - infoExA.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); - ret = GetVersionExA((OSVERSIONINFOA *)&infoExA); - ok(ret || - broken(ret == 0), /* win95 */ - "Expected GetVersionExA to succeed\n"); - ok(GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got %d\n", GetLastError()); -} - -static void test_VerifyVersionInfo(void) -{ - OSVERSIONINFOEX info; - BOOL ret; - DWORD servicepack, error; - - if(!pVerifyVersionInfoA || !pVerSetConditionMask) - { - win_skip("Needed functions not available\n"); - return; - } - - /* Before we start doing some tests we should check what the version of - * the ServicePack is. Tests on a box with no ServicePack will fail otherwise. - */ - info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - GetVersionExA((OSVERSIONINFO *)&info); - servicepack = info.wServicePackMajor; - memset(&info, 0, sizeof(info)); - - ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION, - pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL)); - ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = pVerifyVersionInfoA(&info, VER_BUILDNUMBER | VER_MAJORVERSION | - VER_MINORVERSION/* | VER_PLATFORMID | VER_SERVICEPACKMAJOR | - VER_SERVICEPACKMINOR | VER_SUITENAME | VER_PRODUCT_TYPE */, - pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL)); - error = GetLastError(); - ok(!ret, "VerifyVersionInfoA succeeded\n"); - ok(error == ERROR_OLD_WIN_VERSION, - "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); - - /* tests special handling of VER_SUITENAME */ - - ret = pVerifyVersionInfoA(&info, VER_SUITENAME, - pVerSetConditionMask(0, VER_SUITENAME, VER_AND)); - ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); - - ret = pVerifyVersionInfoA(&info, VER_SUITENAME, - pVerSetConditionMask(0, VER_SUITENAME, VER_OR)); - ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); - - /* test handling of version numbers */ - - /* v3.10 is always less than v4.x even - * if the minor version is tested */ - info.dwMajorVersion = 3; - info.dwMinorVersion = 10; - ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, - pVerSetConditionMask(pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL), - VER_MAJORVERSION, VER_GREATER_EQUAL)); - ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); - - info.dwMinorVersion = 0; - info.wServicePackMajor = 10; - ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, - pVerSetConditionMask(pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL), - VER_MAJORVERSION, VER_GREATER_EQUAL)); - ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); - - info.wServicePackMajor = 0; - info.wServicePackMinor = 10; - ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, - pVerSetConditionMask(pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL), - VER_MAJORVERSION, VER_GREATER_EQUAL)); - ok(ret, "VerifyVersionInfoA failed with error %d\n", GetLastError()); - - info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - GetVersionEx((OSVERSIONINFO *)&info); - info.wServicePackMinor++; - SetLastError(0xdeadbeef); - ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, - pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL)); - error = GetLastError(); - ok(!ret, "VerifyVersionInfoA succeeded\n"); - ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some wink2 */, - "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); - - if (servicepack == 0) - { - skip("There is no ServicePack on this system\n"); - } - else - { - info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - GetVersionEx((OSVERSIONINFO *)&info); - info.wServicePackMajor--; - ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, - pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER)); - ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError()); - - info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - GetVersionEx((OSVERSIONINFO *)&info); - info.wServicePackMajor--; - ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, - pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL)); - ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError()); - } - - info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - GetVersionEx((OSVERSIONINFO *)&info); - info.wServicePackMajor++; - ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, - pVerSetConditionMask(0, VER_MINORVERSION, VER_LESS)); - ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError()); - - info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - GetVersionEx((OSVERSIONINFO *)&info); - info.wServicePackMajor++; - ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, - pVerSetConditionMask(0, VER_MINORVERSION, VER_LESS_EQUAL)); - ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError()); - - info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - GetVersionEx((OSVERSIONINFO *)&info); - info.wServicePackMajor--; - SetLastError(0xdeadbeef); - ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, - pVerSetConditionMask(0, VER_MINORVERSION, VER_EQUAL)); - error = GetLastError(); - ok(!ret, "VerifyVersionInfoA succeeded\n"); - ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, - "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); - - /* test the failure hierarchy for the four version fields */ - - info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - GetVersionEx((OSVERSIONINFO *)&info); - info.wServicePackMajor++; - SetLastError(0xdeadbeef); - ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, - pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL)); - error = GetLastError(); - ok(!ret, "VerifyVersionInfoA succeeded\n"); - ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, - "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); - - info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - GetVersionEx((OSVERSIONINFO *)&info); - info.dwMinorVersion++; - SetLastError(0xdeadbeef); - ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, - pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL)); - error = GetLastError(); - ok(!ret, "VerifyVersionInfoA succeeded\n"); - ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, - "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); - - info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - GetVersionEx((OSVERSIONINFO *)&info); - info.dwMajorVersion++; - SetLastError(0xdeadbeef); - ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, - pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL)); - error = GetLastError(); - ok(!ret, "VerifyVersionInfoA succeeded\n"); - ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, - "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); - - ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, - pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL)); - ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError()); - - info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - GetVersionEx((OSVERSIONINFO *)&info); - info.dwBuildNumber++; - SetLastError(0xdeadbeef); - ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, - pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL)); - error = GetLastError(); - ok(!ret, "VerifyVersionInfoA succeeded\n"); - ok(error == ERROR_OLD_WIN_VERSION || broken(error == ERROR_BAD_ARGUMENTS) /* some win2k */, - "VerifyVersionInfoA should have failed with ERROR_OLD_WIN_VERSION instead of %d\n", error); - - ret = pVerifyVersionInfoA(&info, VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, - pVerSetConditionMask(0, VER_MINORVERSION, VER_GREATER_EQUAL)); - ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError()); - - /* test bad dwOSVersionInfoSize */ - info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - GetVersionEx((OSVERSIONINFO *)&info); - info.dwOSVersionInfoSize = 0; - ret = pVerifyVersionInfoA(&info, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR, - pVerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL)); - ok(ret || broken(!ret) /* some win2k */, "VerifyVersionInfoA failed with error %d\n", GetLastError()); -} - -START_TEST(version) -{ - init_function_pointers(); - - test_GetVersionEx(); - test_VerifyVersionInfo(); -} diff --git a/rostests/winetests/kernel32/virtual.c b/rostests/winetests/kernel32/virtual.c deleted file mode 100755 index cd5417c6fcd..00000000000 --- a/rostests/winetests/kernel32/virtual.c +++ /dev/null @@ -1,1431 +0,0 @@ -/* - * Unit test suite for Virtual* family of APIs. - * - * Copyright 2004 Dmitry Timoshkov - * - * 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 "ntstatus.h" -#define WIN32_NO_STATUS -#include "windef.h" -#include "winbase.h" -#include "winternl.h" -#include "winerror.h" -#include "wine/test.h" - -#define NUM_THREADS 4 -#define MAPPING_SIZE 0x100000 - -static HINSTANCE hkernel32; -static LPVOID (WINAPI *pVirtualAllocEx)(HANDLE, LPVOID, SIZE_T, DWORD, DWORD); -static BOOL (WINAPI *pVirtualFreeEx)(HANDLE, LPVOID, SIZE_T, DWORD); -static UINT (WINAPI *pGetWriteWatch)(DWORD,LPVOID,SIZE_T,LPVOID*,ULONG_PTR*,ULONG*); -static UINT (WINAPI *pResetWriteWatch)(LPVOID,SIZE_T); -static NTSTATUS (WINAPI *pNtAreMappedFilesTheSame)(PVOID,PVOID); - -/* ############################### */ - -static HANDLE create_target_process(const char *arg) -{ - char **argv; - char cmdline[MAX_PATH]; - PROCESS_INFORMATION pi; - BOOL ret; - STARTUPINFO si = { 0 }; - si.cb = sizeof(si); - - winetest_get_mainargs( &argv ); - sprintf(cmdline, "%s %s %s", argv[0], argv[1], arg); - ret = CreateProcess(NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "error: %u\n", GetLastError()); - ret = CloseHandle(pi.hThread); - ok(ret, "error %u\n", GetLastError()); - return pi.hProcess; -} - -static void test_VirtualAllocEx(void) -{ - const unsigned int alloc_size = 1<<15; - char *src, *dst; - SIZE_T bytes_written = 0, bytes_read = 0, i; - void *addr1, *addr2; - BOOL b; - DWORD old_prot; - MEMORY_BASIC_INFORMATION info; - HANDLE hProcess; - - /* not exported in all windows-versions */ - if ((!pVirtualAllocEx) || (!pVirtualFreeEx)) { - win_skip("Virtual{Alloc,Free}Ex not available\n"); - return; - } - - hProcess = create_target_process("sleep"); - ok(hProcess != NULL, "Can't start process\n"); - - SetLastError(0xdeadbeef); - addr1 = pVirtualAllocEx(hProcess, NULL, alloc_size, MEM_COMMIT, - PAGE_EXECUTE_READWRITE); - if (!addr1 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { /* Win9x */ - win_skip("VirtualAllocEx not implemented\n"); - TerminateProcess(hProcess, 0); - CloseHandle(hProcess); - return; - } - - src = VirtualAlloc( NULL, alloc_size, MEM_COMMIT, PAGE_READWRITE ); - dst = VirtualAlloc( NULL, alloc_size, MEM_COMMIT, PAGE_READWRITE ); - for (i = 0; i < alloc_size; i++) - src[i] = i & 0xff; - - ok(addr1 != NULL, "VirtualAllocEx error %u\n", GetLastError()); - b = WriteProcessMemory(hProcess, addr1, src, alloc_size, &bytes_written); - ok(b && (bytes_written == alloc_size), "%lu bytes written\n", - bytes_written); - b = ReadProcessMemory(hProcess, addr1, dst, alloc_size, &bytes_read); - ok(b && (bytes_read == alloc_size), "%lu bytes read\n", bytes_read); - ok(!memcmp(src, dst, alloc_size), "Data from remote process differs\n"); - - /* test invalid source buffers */ - - b = VirtualProtect( src + 0x2000, 0x2000, PAGE_NOACCESS, &old_prot ); - ok( b, "VirtualProtect failed error %u\n", GetLastError() ); - b = WriteProcessMemory(hProcess, addr1, src, alloc_size, &bytes_written); - ok( !b, "WriteProcessMemory succeeded\n" ); - ok( GetLastError() == ERROR_NOACCESS || - GetLastError() == ERROR_PARTIAL_COPY, /* vista */ - "wrong error %u\n", GetLastError() ); - ok( bytes_written == 0, "%lu bytes written\n", bytes_written ); - b = ReadProcessMemory(hProcess, addr1, src, alloc_size, &bytes_read); - ok( !b, "ReadProcessMemory succeeded\n" ); - ok( GetLastError() == ERROR_NOACCESS, "wrong error %u\n", GetLastError() ); - ok( bytes_read == 0, "%lu bytes written\n", bytes_read ); - - b = VirtualProtect( src, 0x2000, PAGE_NOACCESS, &old_prot ); - ok( b, "VirtualProtect failed error %u\n", GetLastError() ); - b = WriteProcessMemory(hProcess, addr1, src, alloc_size, &bytes_written); - ok( !b, "WriteProcessMemory succeeded\n" ); - ok( GetLastError() == ERROR_NOACCESS || - GetLastError() == ERROR_PARTIAL_COPY, /* vista */ - "wrong error %u\n", GetLastError() ); - ok( bytes_written == 0, "%lu bytes written\n", bytes_written ); - b = ReadProcessMemory(hProcess, addr1, src, alloc_size, &bytes_read); - ok( !b, "ReadProcessMemory succeeded\n" ); - ok( GetLastError() == ERROR_NOACCESS, "wrong error %u\n", GetLastError() ); - ok( bytes_read == 0, "%lu bytes written\n", bytes_read ); - - b = pVirtualFreeEx(hProcess, addr1, 0, MEM_RELEASE); - ok(b != 0, "VirtualFreeEx, error %u\n", GetLastError()); - - VirtualFree( src, 0, MEM_FREE ); - VirtualFree( dst, 0, MEM_FREE ); - - /* - * The following tests parallel those in test_VirtualAlloc() - */ - - SetLastError(0xdeadbeef); - addr1 = pVirtualAllocEx(hProcess, 0, 0, MEM_RESERVE, PAGE_NOACCESS); - ok(addr1 == NULL, "VirtualAllocEx should fail on zero-sized allocation\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER /* NT */ || - GetLastError() == ERROR_NOT_ENOUGH_MEMORY, /* Win9x */ - "got %u, expected ERROR_INVALID_PARAMETER\n", GetLastError()); - - addr1 = pVirtualAllocEx(hProcess, 0, 0xFFFC, MEM_RESERVE, PAGE_NOACCESS); - ok(addr1 != NULL, "VirtualAllocEx failed\n"); - - /* test a not committed memory */ - memset(&info, 'q', sizeof(info)); - ok(VirtualQueryEx(hProcess, addr1, &info, sizeof(info)) == sizeof(info), "VirtualQueryEx failed\n"); - ok(info.BaseAddress == addr1, "%p != %p\n", info.BaseAddress, addr1); - ok(info.AllocationBase == addr1, "%p != %p\n", info.AllocationBase, addr1); - ok(info.AllocationProtect == PAGE_NOACCESS, "%x != PAGE_NOACCESS\n", info.AllocationProtect); - ok(info.RegionSize == 0x10000, "%lx != 0x10000\n", info.RegionSize); - ok(info.State == MEM_RESERVE, "%x != MEM_RESERVE\n", info.State); - /* NT reports Protect == 0 for a not committed memory block */ - ok(info.Protect == 0 /* NT */ || - info.Protect == PAGE_NOACCESS, /* Win9x */ - "%x != PAGE_NOACCESS\n", info.Protect); - ok(info.Type == MEM_PRIVATE, "%x != MEM_PRIVATE\n", info.Type); - - SetLastError(0xdeadbeef); - ok(!VirtualProtectEx(hProcess, addr1, 0xFFFC, PAGE_READONLY, &old_prot), - "VirtualProtectEx should fail on a not committed memory\n"); - ok(GetLastError() == ERROR_INVALID_ADDRESS /* NT */ || - GetLastError() == ERROR_INVALID_PARAMETER, /* Win9x */ - "got %u, expected ERROR_INVALID_ADDRESS\n", GetLastError()); - - addr2 = pVirtualAllocEx(hProcess, addr1, 0x1000, MEM_COMMIT, PAGE_NOACCESS); - ok(addr1 == addr2, "VirtualAllocEx failed\n"); - - /* test a committed memory */ - ok(VirtualQueryEx(hProcess, addr1, &info, sizeof(info)) == sizeof(info), - "VirtualQueryEx failed\n"); - ok(info.BaseAddress == addr1, "%p != %p\n", info.BaseAddress, addr1); - ok(info.AllocationBase == addr1, "%p != %p\n", info.AllocationBase, addr1); - ok(info.AllocationProtect == PAGE_NOACCESS, "%x != PAGE_NOACCESS\n", info.AllocationProtect); - ok(info.RegionSize == 0x1000, "%lx != 0x1000\n", info.RegionSize); - ok(info.State == MEM_COMMIT, "%x != MEM_COMMIT\n", info.State); - /* this time NT reports PAGE_NOACCESS as well */ - ok(info.Protect == PAGE_NOACCESS, "%x != PAGE_NOACCESS\n", info.Protect); - ok(info.Type == MEM_PRIVATE, "%x != MEM_PRIVATE\n", info.Type); - - /* this should fail, since not the whole range is committed yet */ - SetLastError(0xdeadbeef); - ok(!VirtualProtectEx(hProcess, addr1, 0xFFFC, PAGE_READONLY, &old_prot), - "VirtualProtectEx should fail on a not committed memory\n"); - ok(GetLastError() == ERROR_INVALID_ADDRESS /* NT */ || - GetLastError() == ERROR_INVALID_PARAMETER, /* Win9x */ - "got %u, expected ERROR_INVALID_ADDRESS\n", GetLastError()); - - old_prot = 0; - ok(VirtualProtectEx(hProcess, addr1, 0x1000, PAGE_READONLY, &old_prot), "VirtualProtectEx failed\n"); - ok(old_prot == PAGE_NOACCESS, "wrong old protection: got %04x instead of PAGE_NOACCESS\n", old_prot); - - old_prot = 0; - ok(VirtualProtectEx(hProcess, addr1, 0x1000, PAGE_READWRITE, &old_prot), "VirtualProtectEx failed\n"); - ok(old_prot == PAGE_READONLY, "wrong old protection: got %04x instead of PAGE_READONLY\n", old_prot); - - ok(!pVirtualFreeEx(hProcess, addr1, 0x10000, 0), - "VirtualFreeEx should fail with type 0\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "got %u, expected ERROR_INVALID_PARAMETER\n", GetLastError()); - - ok(pVirtualFreeEx(hProcess, addr1, 0x10000, MEM_DECOMMIT), "VirtualFreeEx failed\n"); - - /* if the type is MEM_RELEASE, size must be 0 */ - ok(!pVirtualFreeEx(hProcess, addr1, 1, MEM_RELEASE), - "VirtualFreeEx should fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "got %u, expected ERROR_INVALID_PARAMETER\n", GetLastError()); - - ok(pVirtualFreeEx(hProcess, addr1, 0, MEM_RELEASE), "VirtualFreeEx failed\n"); - - TerminateProcess(hProcess, 0); - CloseHandle(hProcess); -} - -static void test_VirtualAlloc(void) -{ - void *addr1, *addr2; - DWORD old_prot; - MEMORY_BASIC_INFORMATION info; - - SetLastError(0xdeadbeef); - addr1 = VirtualAlloc(0, 0, MEM_RESERVE, PAGE_NOACCESS); - ok(addr1 == NULL, "VirtualAlloc should fail on zero-sized allocation\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER /* NT */ || - GetLastError() == ERROR_NOT_ENOUGH_MEMORY, /* Win9x */ - "got %d, expected ERROR_INVALID_PARAMETER\n", GetLastError()); - - addr1 = VirtualAlloc(0, 0xFFFC, MEM_RESERVE, PAGE_NOACCESS); - ok(addr1 != NULL, "VirtualAlloc failed\n"); - - /* test a not committed memory */ - ok(VirtualQuery(addr1, &info, sizeof(info)) == sizeof(info), - "VirtualQuery failed\n"); - ok(info.BaseAddress == addr1, "%p != %p\n", info.BaseAddress, addr1); - ok(info.AllocationBase == addr1, "%p != %p\n", info.AllocationBase, addr1); - ok(info.AllocationProtect == PAGE_NOACCESS, "%x != PAGE_NOACCESS\n", info.AllocationProtect); - ok(info.RegionSize == 0x10000, "%lx != 0x10000\n", info.RegionSize); - ok(info.State == MEM_RESERVE, "%x != MEM_RESERVE\n", info.State); - /* NT reports Protect == 0 for a not committed memory block */ - ok(info.Protect == 0 /* NT */ || - info.Protect == PAGE_NOACCESS, /* Win9x */ - "%x != PAGE_NOACCESS\n", info.Protect); - ok(info.Type == MEM_PRIVATE, "%x != MEM_PRIVATE\n", info.Type); - - SetLastError(0xdeadbeef); - ok(!VirtualProtect(addr1, 0xFFFC, PAGE_READONLY, &old_prot), - "VirtualProtect should fail on a not committed memory\n"); - ok(GetLastError() == ERROR_INVALID_ADDRESS /* NT */ || - GetLastError() == ERROR_INVALID_PARAMETER, /* Win9x */ - "got %d, expected ERROR_INVALID_ADDRESS\n", GetLastError()); - - addr2 = VirtualAlloc(addr1, 0x1000, MEM_COMMIT, PAGE_NOACCESS); - ok(addr1 == addr2, "VirtualAlloc failed\n"); - - /* test a committed memory */ - ok(VirtualQuery(addr1, &info, sizeof(info)) == sizeof(info), - "VirtualQuery failed\n"); - ok(info.BaseAddress == addr1, "%p != %p\n", info.BaseAddress, addr1); - ok(info.AllocationBase == addr1, "%p != %p\n", info.AllocationBase, addr1); - ok(info.AllocationProtect == PAGE_NOACCESS, "%x != PAGE_NOACCESS\n", info.AllocationProtect); - ok(info.RegionSize == 0x1000, "%lx != 0x1000\n", info.RegionSize); - ok(info.State == MEM_COMMIT, "%x != MEM_COMMIT\n", info.State); - /* this time NT reports PAGE_NOACCESS as well */ - ok(info.Protect == PAGE_NOACCESS, "%x != PAGE_NOACCESS\n", info.Protect); - ok(info.Type == MEM_PRIVATE, "%x != MEM_PRIVATE\n", info.Type); - - /* this should fail, since not the whole range is committed yet */ - SetLastError(0xdeadbeef); - ok(!VirtualProtect(addr1, 0xFFFC, PAGE_READONLY, &old_prot), - "VirtualProtect should fail on a not committed memory\n"); - ok(GetLastError() == ERROR_INVALID_ADDRESS /* NT */ || - GetLastError() == ERROR_INVALID_PARAMETER, /* Win9x */ - "got %d, expected ERROR_INVALID_ADDRESS\n", GetLastError()); - - ok(VirtualProtect(addr1, 0x1000, PAGE_READONLY, &old_prot), "VirtualProtect failed\n"); - ok(old_prot == PAGE_NOACCESS, - "wrong old protection: got %04x instead of PAGE_NOACCESS\n", old_prot); - - ok(VirtualProtect(addr1, 0x1000, PAGE_READWRITE, &old_prot), "VirtualProtect failed\n"); - ok(old_prot == PAGE_READONLY, - "wrong old protection: got %04x instead of PAGE_READONLY\n", old_prot); - - ok(VirtualQuery(addr1, &info, sizeof(info)) == sizeof(info), - "VirtualQuery failed\n"); - ok(info.RegionSize == 0x1000, "%lx != 0x1000\n", info.RegionSize); - ok(info.State == MEM_COMMIT, "%x != MEM_COMMIT\n", info.State); - ok(info.Protect == PAGE_READWRITE, "%x != PAGE_READWRITE\n", info.Protect); - memset( addr1, 0x55, 20 ); - ok( *(DWORD *)addr1 == 0x55555555, "wrong data %x\n", *(DWORD *)addr1 ); - - addr2 = VirtualAlloc( addr1, 0x1000, MEM_RESET, PAGE_NOACCESS ); - ok( addr2 == addr1 || broken( !addr2 && GetLastError() == ERROR_INVALID_PARAMETER), /* win9x */ - "VirtualAlloc failed err %u\n", GetLastError() ); - ok( *(DWORD *)addr1 == 0x55555555 || *(DWORD *)addr1 == 0, "wrong data %x\n", *(DWORD *)addr1 ); - if (addr2) - { - ok(VirtualQuery(addr1, &info, sizeof(info)) == sizeof(info), - "VirtualQuery failed\n"); - ok(info.RegionSize == 0x1000, "%lx != 0x1000\n", info.RegionSize); - ok(info.State == MEM_COMMIT, "%x != MEM_COMMIT\n", info.State); - ok(info.Protect == PAGE_READWRITE, "%x != PAGE_READWRITE\n", info.Protect); - - addr2 = VirtualAlloc( (char *)addr1 + 0x1000, 0x1000, MEM_RESET, PAGE_NOACCESS ); - ok( (char *)addr2 == (char *)addr1 + 0x1000, "VirtualAlloc failed\n" ); - - ok(VirtualQuery(addr2, &info, sizeof(info)) == sizeof(info), - "VirtualQuery failed\n"); - ok(info.RegionSize == 0xf000, "%lx != 0xf000\n", info.RegionSize); - ok(info.State == MEM_RESERVE, "%x != MEM_RESERVE\n", info.State); - ok(info.Protect == 0, "%x != 0\n", info.Protect); - - addr2 = VirtualAlloc( (char *)addr1 + 0xf000, 0x2000, MEM_RESET, PAGE_NOACCESS ); - ok( !addr2, "VirtualAlloc failed\n" ); - ok( GetLastError() == ERROR_INVALID_ADDRESS, "wrong error %u\n", GetLastError() ); - } - - /* invalid protection values */ - SetLastError(0xdeadbeef); - addr2 = VirtualAlloc(NULL, 0x1000, MEM_RESERVE, 0); - ok(!addr2, "VirtualAlloc succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - addr2 = VirtualAlloc(NULL, 0x1000, MEM_COMMIT, 0); - ok(!addr2, "VirtualAlloc succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - addr2 = VirtualAlloc(addr1, 0x1000, MEM_COMMIT, PAGE_READONLY | PAGE_EXECUTE); - ok(!addr2, "VirtualAlloc succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - ok(!VirtualProtect(addr1, 0x1000, PAGE_READWRITE | PAGE_EXECUTE_WRITECOPY, &old_prot), - "VirtualProtect succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - ok(!VirtualProtect(addr1, 0x1000, 0, &old_prot), "VirtualProtect succeeded\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - ok(!VirtualFree(addr1, 0x10000, 0), "VirtualFree should fail with type 0\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "got %d, expected ERROR_INVALID_PARAMETER\n", GetLastError()); - - ok(VirtualFree(addr1, 0x10000, MEM_DECOMMIT), "VirtualFree failed\n"); - - /* if the type is MEM_RELEASE, size must be 0 */ - ok(!VirtualFree(addr1, 1, MEM_RELEASE), "VirtualFree should fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "got %d, expected ERROR_INVALID_PARAMETER\n", GetLastError()); - - ok(VirtualFree(addr1, 0, MEM_RELEASE), "VirtualFree failed\n"); -} - -static void test_MapViewOfFile(void) -{ - static const char testfile[] = "testfile.xxx"; - const char *name; - HANDLE file, mapping, map2; - void *ptr, *ptr2, *addr; - MEMORY_BASIC_INFORMATION info; - BOOL ret; - - SetLastError(0xdeadbeef); - file = CreateFileA( testfile, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0 ); - ok( file != INVALID_HANDLE_VALUE, "CreateFile error %u\n", GetLastError() ); - SetFilePointer( file, 4096, NULL, FILE_BEGIN ); - SetEndOfFile( file ); - - /* read/write mapping */ - - SetLastError(0xdeadbeef); - mapping = CreateFileMappingA( file, NULL, PAGE_READWRITE, 0, 4096, NULL ); - ok( mapping != 0, "CreateFileMapping error %u\n", GetLastError() ); - - SetLastError(0xdeadbeef); - ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile FILE_MAPE_READ error %u\n", GetLastError() ); - UnmapViewOfFile( ptr ); - - /* this fails on win9x but succeeds on NT */ - SetLastError(0xdeadbeef); - ptr = MapViewOfFile( mapping, FILE_MAP_COPY, 0, 0, 4096 ); - if (ptr) UnmapViewOfFile( ptr ); - else ok( GetLastError() == ERROR_INVALID_PARAMETER, "Wrong error %d\n", GetLastError() ); - - SetLastError(0xdeadbeef); - ptr = MapViewOfFile( mapping, 0, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile 0 error %u\n", GetLastError() ); - UnmapViewOfFile( ptr ); - - SetLastError(0xdeadbeef); - ptr = MapViewOfFile( mapping, FILE_MAP_WRITE, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile FILE_MAP_WRITE error %u\n", GetLastError() ); - UnmapViewOfFile( ptr ); - - ret = DuplicateHandle( GetCurrentProcess(), mapping, GetCurrentProcess(), &map2, - FILE_MAP_READ|FILE_MAP_WRITE, FALSE, 0 ); - ok( ret, "DuplicateHandle failed error %u\n", GetLastError()); - ptr = MapViewOfFile( map2, FILE_MAP_WRITE, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile FILE_MAP_WRITE error %u\n", GetLastError() ); - UnmapViewOfFile( ptr ); - CloseHandle( map2 ); - - ret = DuplicateHandle( GetCurrentProcess(), mapping, GetCurrentProcess(), &map2, - FILE_MAP_READ, FALSE, 0 ); - ok( ret, "DuplicateHandle failed error %u\n", GetLastError()); - ptr = MapViewOfFile( map2, FILE_MAP_WRITE, 0, 0, 4096 ); - if (!ptr) - { - ok( GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %d\n", GetLastError() ); - CloseHandle( map2 ); - ret = DuplicateHandle( GetCurrentProcess(), mapping, GetCurrentProcess(), &map2, 0, FALSE, 0 ); - ok( ret, "DuplicateHandle failed error %u\n", GetLastError()); - ptr = MapViewOfFile( map2, 0, 0, 0, 4096 ); - ok( !ptr, "MapViewOfFile succeeded\n" ); - ok( GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %d\n", GetLastError() ); - CloseHandle( map2 ); - ret = DuplicateHandle( GetCurrentProcess(), mapping, GetCurrentProcess(), &map2, - FILE_MAP_READ, FALSE, 0 ); - ok( ret, "DuplicateHandle failed error %u\n", GetLastError()); - ptr = MapViewOfFile( map2, 0, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile NO_ACCESS error %u\n", GetLastError() ); - } - else win_skip( "no access checks on win9x\n" ); - - UnmapViewOfFile( ptr ); - CloseHandle( map2 ); - CloseHandle( mapping ); - - /* read-only mapping */ - - SetLastError(0xdeadbeef); - mapping = CreateFileMappingA( file, NULL, PAGE_READONLY, 0, 4096, NULL ); - ok( mapping != 0, "CreateFileMapping error %u\n", GetLastError() ); - - SetLastError(0xdeadbeef); - ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile FILE_MAP_READ error %u\n", GetLastError() ); - UnmapViewOfFile( ptr ); - - /* this fails on win9x but succeeds on NT */ - SetLastError(0xdeadbeef); - ptr = MapViewOfFile( mapping, FILE_MAP_COPY, 0, 0, 4096 ); - if (ptr) UnmapViewOfFile( ptr ); - else ok( GetLastError() == ERROR_INVALID_PARAMETER, "Wrong error %d\n", GetLastError() ); - - SetLastError(0xdeadbeef); - ptr = MapViewOfFile( mapping, 0, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile 0 error %u\n", GetLastError() ); - UnmapViewOfFile( ptr ); - - SetLastError(0xdeadbeef); - ptr = MapViewOfFile( mapping, FILE_MAP_WRITE, 0, 0, 4096 ); - ok( !ptr, "MapViewOfFile FILE_MAP_WRITE succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %d\n", GetLastError() ); - CloseHandle( mapping ); - - /* copy-on-write mapping */ - - SetLastError(0xdeadbeef); - mapping = CreateFileMappingA( file, NULL, PAGE_WRITECOPY, 0, 4096, NULL ); - ok( mapping != 0, "CreateFileMapping error %u\n", GetLastError() ); - - SetLastError(0xdeadbeef); - ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile FILE_MAP_READ error %u\n", GetLastError() ); - UnmapViewOfFile( ptr ); - - SetLastError(0xdeadbeef); - ptr = MapViewOfFile( mapping, FILE_MAP_COPY, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile FILE_MAP_COPY error %u\n", GetLastError() ); - UnmapViewOfFile( ptr ); - - SetLastError(0xdeadbeef); - ptr = MapViewOfFile( mapping, 0, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile 0 error %u\n", GetLastError() ); - UnmapViewOfFile( ptr ); - - SetLastError(0xdeadbeef); - ptr = MapViewOfFile( mapping, FILE_MAP_WRITE, 0, 0, 4096 ); - ok( !ptr, "MapViewOfFile FILE_MAP_WRITE succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %d\n", GetLastError() ); - CloseHandle( mapping ); - - /* no access mapping */ - - SetLastError(0xdeadbeef); - mapping = CreateFileMappingA( file, NULL, PAGE_NOACCESS, 0, 4096, NULL ); - /* fails on NT but succeeds on win9x */ - if (!mapping) ok( GetLastError() == ERROR_INVALID_PARAMETER, "Wrong error %d\n", GetLastError() ); - else - { - SetLastError(0xdeadbeef); - ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile FILE_MAP_READ error %u\n", GetLastError() ); - UnmapViewOfFile( ptr ); - - SetLastError(0xdeadbeef); - ptr = MapViewOfFile( mapping, FILE_MAP_COPY, 0, 0, 4096 ); - ok( !ptr, "MapViewOfFile FILE_MAP_COPY succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "Wrong error %d\n", GetLastError() ); - - SetLastError(0xdeadbeef); - ptr = MapViewOfFile( mapping, 0, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile 0 error %u\n", GetLastError() ); - UnmapViewOfFile( ptr ); - - SetLastError(0xdeadbeef); - ptr = MapViewOfFile( mapping, FILE_MAP_WRITE, 0, 0, 4096 ); - ok( !ptr, "MapViewOfFile FILE_MAP_WRITE succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "Wrong error %d\n", GetLastError() ); - - CloseHandle( mapping ); - } - - CloseHandle( file ); - - /* now try read-only file */ - - SetLastError(0xdeadbeef); - file = CreateFileA( testfile, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0 ); - ok( file != INVALID_HANDLE_VALUE, "CreateFile error %u\n", GetLastError() ); - - SetLastError(0xdeadbeef); - mapping = CreateFileMappingA( file, NULL, PAGE_READWRITE, 0, 4096, NULL ); - ok( !mapping, "CreateFileMapping PAGE_READWRITE succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %d\n", GetLastError() ); - - SetLastError(0xdeadbeef); - mapping = CreateFileMappingA( file, NULL, PAGE_WRITECOPY, 0, 4096, NULL ); - ok( mapping != 0, "CreateFileMapping PAGE_WRITECOPY error %u\n", GetLastError() ); - CloseHandle( mapping ); - - SetLastError(0xdeadbeef); - mapping = CreateFileMappingA( file, NULL, PAGE_READONLY, 0, 4096, NULL ); - ok( mapping != 0, "CreateFileMapping PAGE_READONLY error %u\n", GetLastError() ); - CloseHandle( mapping ); - CloseHandle( file ); - - /* now try no access file */ - - SetLastError(0xdeadbeef); - file = CreateFileA( testfile, 0, 0, NULL, OPEN_EXISTING, 0, 0 ); - ok( file != INVALID_HANDLE_VALUE, "CreateFile error %u\n", GetLastError() ); - - SetLastError(0xdeadbeef); - mapping = CreateFileMappingA( file, NULL, PAGE_READWRITE, 0, 4096, NULL ); - ok( !mapping, "CreateFileMapping PAGE_READWRITE succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %d\n", GetLastError() ); - - SetLastError(0xdeadbeef); - mapping = CreateFileMappingA( file, NULL, PAGE_WRITECOPY, 0, 4096, NULL ); - ok( !mapping, "CreateFileMapping PAGE_WRITECOPY succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %d\n", GetLastError() ); - - SetLastError(0xdeadbeef); - mapping = CreateFileMappingA( file, NULL, PAGE_READONLY, 0, 4096, NULL ); - ok( !mapping, "CreateFileMapping PAGE_READONLY succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %d\n", GetLastError() ); - - CloseHandle( file ); - DeleteFileA( testfile ); - - SetLastError(0xdeadbeef); - name = "Local\\Foo"; - file = CreateFileMapping( INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 4096, name ); - /* nt4 doesn't have Local\\ */ - if (!file && GetLastError() == ERROR_PATH_NOT_FOUND) - { - name = "Foo"; - file = CreateFileMapping( INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 4096, name ); - } - ok( file != 0, "CreateFileMapping PAGE_READWRITE error %u\n", GetLastError() ); - - SetLastError(0xdeadbeef); - mapping = OpenFileMapping( FILE_MAP_READ, FALSE, name ); - ok( mapping != 0, "OpenFileMapping FILE_MAP_READ error %u\n", GetLastError() ); - SetLastError(0xdeadbeef); - ptr = MapViewOfFile( mapping, FILE_MAP_WRITE, 0, 0, 0 ); - if (!ptr) - { - ok( GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %d\n", GetLastError() ); - SetLastError(0xdeadbeef); - ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 0 ); - ok( ptr != NULL, "MapViewOfFile FILE_MAP_READ error %u\n", GetLastError() ); - SetLastError(0xdeadbeef); - ok( VirtualQuery( ptr, &info, sizeof(info) ) == sizeof(info), - "VirtualQuery error %u\n", GetLastError() ); - ok( info.BaseAddress == ptr, "%p != %p\n", info.BaseAddress, ptr ); - ok( info.AllocationBase == ptr, "%p != %p\n", info.AllocationBase, ptr ); - ok( info.AllocationProtect == PAGE_READONLY, "%x != PAGE_READONLY\n", info.AllocationProtect ); - ok( info.RegionSize == 4096, "%lx != 4096\n", info.RegionSize ); - ok( info.State == MEM_COMMIT, "%x != MEM_COMMIT\n", info.State ); - ok( info.Protect == PAGE_READONLY, "%x != PAGE_READONLY\n", info.Protect ); - } - else win_skip( "no access checks on win9x\n" ); - UnmapViewOfFile( ptr ); - CloseHandle( mapping ); - - SetLastError(0xdeadbeef); - mapping = OpenFileMapping( FILE_MAP_WRITE, FALSE, name ); - ok( mapping != 0, "OpenFileMapping FILE_MAP_WRITE error %u\n", GetLastError() ); - SetLastError(0xdeadbeef); - ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 0 ); - if (!ptr) - { - ok( GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %d\n", GetLastError() ); - SetLastError(0xdeadbeef); - ptr = MapViewOfFile( mapping, FILE_MAP_WRITE, 0, 0, 0 ); - ok( ptr != NULL, "MapViewOfFile FILE_MAP_WRITE error %u\n", GetLastError() ); - SetLastError(0xdeadbeef); - ok( VirtualQuery( ptr, &info, sizeof(info) ) == sizeof(info), - "VirtualQuery error %u\n", GetLastError() ); - ok( info.BaseAddress == ptr, "%p != %p\n", info.BaseAddress, ptr ); - ok( info.AllocationBase == ptr, "%p != %p\n", info.AllocationBase, ptr ); - ok( info.AllocationProtect == PAGE_READWRITE, "%x != PAGE_READWRITE\n", info.AllocationProtect ); - ok( info.RegionSize == 4096, "%lx != 4096\n", info.RegionSize ); - ok( info.State == MEM_COMMIT, "%x != MEM_COMMIT\n", info.State ); - ok( info.Protect == PAGE_READWRITE, "%x != PAGE_READWRITE\n", info.Protect ); - } - else win_skip( "no access checks on win9x\n" ); - UnmapViewOfFile( ptr ); - CloseHandle( mapping ); - - CloseHandle( file ); - - /* read/write mapping with SEC_RESERVE */ - mapping = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE | SEC_RESERVE, 0, MAPPING_SIZE, NULL); - ok(mapping != INVALID_HANDLE_VALUE, "CreateFileMappingA failed with error %d\n", GetLastError()); - - ptr = MapViewOfFile(mapping, FILE_MAP_WRITE, 0, 0, 0); - ok(ptr != NULL, "MapViewOfFile failed with error %d\n", GetLastError()); - - ptr2 = MapViewOfFile(mapping, FILE_MAP_WRITE, 0, 0, 0); - /* on NT ptr != ptr2 but on Win9x ptr == ptr2 */ - ok(ptr2 != NULL, "MapViewOfFile failed with error %d\n", GetLastError()); - trace("mapping same section resulted in views %p and %p\n", ptr, ptr2); - - ret = VirtualQuery(ptr, &info, sizeof(info)); - ok(ret, "VirtualQuery failed with error %d\n", GetLastError()); - ok(info.BaseAddress == ptr, "BaseAddress should have been %p but was %p instead\n", ptr, info.BaseAddress); - ok(info.AllocationBase == ptr, "AllocationBase should have been %p but was %p instead\n", ptr, info.AllocationBase); - ok(info.RegionSize == MAPPING_SIZE, "RegionSize should have been 0x%x but was 0x%x\n", MAPPING_SIZE, (unsigned int)info.RegionSize); - ok(info.State == MEM_RESERVE, "State should have been MEM_RESERVE instead of 0x%x\n", info.State); - if (info.Type == MEM_PRIVATE) /* win9x is different for uncommitted mappings */ - { - ok(info.AllocationProtect == PAGE_NOACCESS, - "AllocationProtect should have been PAGE_NOACCESS but was 0x%x\n", info.AllocationProtect); - ok(info.Protect == PAGE_NOACCESS, - "Protect should have been PAGE_NOACCESS instead of 0x%x\n", info.Protect); - } - else - { - ok(info.AllocationProtect == PAGE_READWRITE, - "AllocationProtect should have been PAGE_READWRITE but was 0x%x\n", info.AllocationProtect); - ok(info.Protect == 0, "Protect should have been 0 instead of 0x%x\n", info.Protect); - ok(info.Type == MEM_MAPPED, "Type should have been MEM_MAPPED instead of 0x%x\n", info.Type); - } - - if (ptr != ptr2) - { - ret = VirtualQuery(ptr2, &info, sizeof(info)); - ok(ret, "VirtualQuery failed with error %d\n", GetLastError()); - ok(info.BaseAddress == ptr2, - "BaseAddress should have been %p but was %p instead\n", ptr2, info.BaseAddress); - ok(info.AllocationBase == ptr2, - "AllocationBase should have been %p but was %p instead\n", ptr2, info.AllocationBase); - ok(info.AllocationProtect == PAGE_READWRITE, - "AllocationProtect should have been PAGE_READWRITE but was 0x%x\n", info.AllocationProtect); - ok(info.RegionSize == MAPPING_SIZE, - "RegionSize should have been 0x%x but was 0x%x\n", MAPPING_SIZE, (unsigned int)info.RegionSize); - ok(info.State == MEM_RESERVE, - "State should have been MEM_RESERVE instead of 0x%x\n", info.State); - ok(info.Protect == 0, - "Protect should have been 0 instead of 0x%x\n", info.Protect); - ok(info.Type == MEM_MAPPED, - "Type should have been MEM_MAPPED instead of 0x%x\n", info.Type); - } - - ptr = VirtualAlloc(ptr, 0x10000, MEM_COMMIT, PAGE_READONLY); - ok(ptr != NULL, "VirtualAlloc failed with error %d\n", GetLastError()); - - ret = VirtualQuery(ptr, &info, sizeof(info)); - ok(ret, "VirtualQuery failed with error %d\n", GetLastError()); - ok(info.BaseAddress == ptr, "BaseAddress should have been %p but was %p instead\n", ptr, info.BaseAddress); - ok(info.AllocationBase == ptr, "AllocationBase should have been %p but was %p instead\n", ptr, info.AllocationBase); - ok(info.RegionSize == 0x10000, "RegionSize should have been 0x10000 but was 0x%x\n", (unsigned int)info.RegionSize); - ok(info.State == MEM_COMMIT, "State should have been MEM_RESERVE instead of 0x%x\n", info.State); - ok(info.Protect == PAGE_READONLY, "Protect should have been 0 instead of 0x%x\n", info.Protect); - if (info.Type == MEM_PRIVATE) /* win9x is different for uncommitted mappings */ - { - ok(info.AllocationProtect == PAGE_NOACCESS, - "AllocationProtect should have been PAGE_NOACCESS but was 0x%x\n", info.AllocationProtect); - } - else - { - ok(info.AllocationProtect == PAGE_READWRITE, - "AllocationProtect should have been PAGE_READWRITE but was 0x%x\n", info.AllocationProtect); - ok(info.Type == MEM_MAPPED, "Type should have been MEM_MAPPED instead of 0x%x\n", info.Type); - } - - /* shows that the VirtualAlloc above affects the mapping, not just the - * virtual memory in this process - it also affects all other processes - * with a view of the mapping, but that isn't tested here */ - if (ptr != ptr2) - { - ret = VirtualQuery(ptr2, &info, sizeof(info)); - ok(ret, "VirtualQuery failed with error %d\n", GetLastError()); - ok(info.BaseAddress == ptr2, - "BaseAddress should have been %p but was %p instead\n", ptr2, info.BaseAddress); - ok(info.AllocationBase == ptr2, - "AllocationBase should have been %p but was %p instead\n", ptr2, info.AllocationBase); - ok(info.AllocationProtect == PAGE_READWRITE, - "AllocationProtect should have been PAGE_READWRITE but was 0x%x\n", info.AllocationProtect); - ok(info.RegionSize == 0x10000, - "RegionSize should have been 0x10000 but was 0x%x\n", (unsigned int)info.RegionSize); - ok(info.State == MEM_COMMIT, - "State should have been MEM_RESERVE instead of 0x%x\n", info.State); - ok(info.Protect == PAGE_READWRITE, - "Protect should have been 0 instead of 0x%x\n", info.Protect); - ok(info.Type == MEM_MAPPED, "Type should have been MEM_MAPPED instead of 0x%x\n", info.Type); - } - - addr = VirtualAlloc( ptr, MAPPING_SIZE, MEM_RESET, PAGE_READONLY ); - ok( addr == ptr || broken(!addr && GetLastError() == ERROR_INVALID_PARAMETER), /* win9x */ - "VirtualAlloc failed with error %u\n", GetLastError() ); - - ret = VirtualFree( ptr, 0x10000, MEM_DECOMMIT ); - ok( !ret || broken(ret) /* win9x */, "VirtualFree succeeded\n" ); - if (!ret) - ok( GetLastError() == ERROR_INVALID_PARAMETER, "VirtualFree failed with %u\n", GetLastError() ); - - ret = UnmapViewOfFile(ptr2); - ok(ret, "UnmapViewOfFile failed with error %d\n", GetLastError()); - ret = UnmapViewOfFile(ptr); - ok(ret, "UnmapViewOfFile failed with error %d\n", GetLastError()); - CloseHandle(mapping); - - addr = VirtualAlloc(NULL, 0x10000, MEM_COMMIT, PAGE_READONLY ); - ok( addr != NULL, "VirtualAlloc failed with error %u\n", GetLastError() ); - - SetLastError(0xdeadbeef); - ok( !UnmapViewOfFile(addr), "UnmapViewOfFile should fail on VirtualAlloc mem\n" ); - ok( GetLastError() == ERROR_INVALID_ADDRESS, - "got %u, expected ERROR_INVALID_ADDRESS\n", GetLastError()); - SetLastError(0xdeadbeef); - ok( !UnmapViewOfFile((char *)addr + 0x3000), "UnmapViewOfFile should fail on VirtualAlloc mem\n" ); - ok( GetLastError() == ERROR_INVALID_ADDRESS, - "got %u, expected ERROR_INVALID_ADDRESS\n", GetLastError()); - SetLastError(0xdeadbeef); - ok( !UnmapViewOfFile((void *)0xdeadbeef), "UnmapViewOfFile should fail on VirtualAlloc mem\n" ); - ok( GetLastError() == ERROR_INVALID_ADDRESS, - "got %u, expected ERROR_INVALID_ADDRESS\n", GetLastError()); - - ok( VirtualFree(addr, 0, MEM_RELEASE), "VirtualFree failed\n" ); -} - -static DWORD (WINAPI *pNtMapViewOfSection)( HANDLE handle, HANDLE process, PVOID *addr_ptr, - ULONG zero_bits, SIZE_T commit_size, - const LARGE_INTEGER *offset_ptr, SIZE_T *size_ptr, - ULONG inherit, ULONG alloc_type, ULONG protect ); -static DWORD (WINAPI *pNtUnmapViewOfSection)( HANDLE process, PVOID addr ); - -static void test_NtMapViewOfSection(void) -{ - HANDLE hProcess; - - static const char testfile[] = "testfile.xxx"; - static const char data[] = "test data for NtMapViewOfSection"; - char buffer[sizeof(data)]; - HANDLE file, mapping; - void *ptr; - BOOL ret; - DWORD status, written; - SIZE_T size, result; - LARGE_INTEGER offset; - - pNtMapViewOfSection = (void *)GetProcAddress( GetModuleHandle("ntdll.dll"), "NtMapViewOfSection" ); - pNtUnmapViewOfSection = (void *)GetProcAddress( GetModuleHandle("ntdll.dll"), "NtUnmapViewOfSection" ); - if (!pNtMapViewOfSection || !pNtUnmapViewOfSection) - { - win_skip( "NtMapViewOfSection not available\n" ); - return; - } - - file = CreateFileA( testfile, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0 ); - ok( file != INVALID_HANDLE_VALUE, "Failed to create test file\n" ); - WriteFile( file, data, sizeof(data), &written, NULL ); - SetFilePointer( file, 4096, NULL, FILE_BEGIN ); - SetEndOfFile( file ); - - /* read/write mapping */ - - mapping = CreateFileMappingA( file, NULL, PAGE_READWRITE, 0, 4096, NULL ); - ok( mapping != 0, "CreateFileMapping failed\n" ); - - hProcess = create_target_process("sleep"); - ok(hProcess != NULL, "Can't start process\n"); - - ptr = NULL; - size = 0; - offset.QuadPart = 0; - status = pNtMapViewOfSection( mapping, hProcess, &ptr, 0, 0, &offset, &size, 1, 0, PAGE_READWRITE ); - ok( !status, "NtMapViewOfSection failed status %x\n", status ); - - ret = ReadProcessMemory( hProcess, ptr, buffer, sizeof(buffer), &result ); - ok( ret, "ReadProcessMemory failed\n" ); - ok( result == sizeof(buffer), "ReadProcessMemory didn't read all data (%lx)\n", result ); - ok( !memcmp( buffer, data, sizeof(buffer) ), "Wrong data read\n" ); - - status = pNtUnmapViewOfSection( hProcess, ptr ); - ok( !status, "NtUnmapViewOfSection failed status %x\n", status ); - - CloseHandle( mapping ); - CloseHandle( file ); - DeleteFileA( testfile ); - - TerminateProcess(hProcess, 0); - CloseHandle(hProcess); -} - -static void test_NtAreMappedFilesTheSame(void) -{ - static const char testfile[] = "testfile.xxx"; - HANDLE file, file2, mapping, map2; - void *ptr, *ptr2; - NTSTATUS status; - char path[MAX_PATH]; - - if (!pNtAreMappedFilesTheSame) - { - win_skip( "NtAreMappedFilesTheSame not available\n" ); - return; - } - - file = CreateFileA( testfile, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, - NULL, CREATE_ALWAYS, 0, 0 ); - ok( file != INVALID_HANDLE_VALUE, "CreateFile error %u\n", GetLastError() ); - SetFilePointer( file, 4096, NULL, FILE_BEGIN ); - SetEndOfFile( file ); - - mapping = CreateFileMappingA( file, NULL, PAGE_READWRITE, 0, 4096, NULL ); - ok( mapping != 0, "CreateFileMapping error %u\n", GetLastError() ); - - ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile FILE_MAP_READ error %u\n", GetLastError() ); - - file2 = CreateFileA( testfile, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, - NULL, OPEN_EXISTING, 0, 0 ); - ok( file2 != INVALID_HANDLE_VALUE, "CreateFile error %u\n", GetLastError() ); - - map2 = CreateFileMappingA( file2, NULL, PAGE_READONLY, 0, 4096, NULL ); - ok( map2 != 0, "CreateFileMapping error %u\n", GetLastError() ); - ptr2 = MapViewOfFile( map2, FILE_MAP_READ, 0, 0, 4096 ); - ok( ptr2 != NULL, "MapViewOfFile FILE_MAP_READ error %u\n", GetLastError() ); - status = pNtAreMappedFilesTheSame( ptr, ptr2 ); - ok( status == STATUS_NOT_SAME_DEVICE, "NtAreMappedFilesTheSame returned %x\n", status ); - UnmapViewOfFile( ptr2 ); - - ptr2 = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 4096 ); - ok( ptr2 != NULL, "MapViewOfFile FILE_MAP_READ error %u\n", GetLastError() ); - status = pNtAreMappedFilesTheSame( ptr, ptr2 ); - ok( status == STATUS_NOT_SAME_DEVICE, "NtAreMappedFilesTheSame returned %x\n", status ); - UnmapViewOfFile( ptr2 ); - CloseHandle( map2 ); - - map2 = CreateFileMappingA( file, NULL, PAGE_READONLY, 0, 4096, NULL ); - ok( map2 != 0, "CreateFileMapping error %u\n", GetLastError() ); - ptr2 = MapViewOfFile( map2, FILE_MAP_READ, 0, 0, 4096 ); - ok( ptr2 != NULL, "MapViewOfFile FILE_MAP_READ error %u\n", GetLastError() ); - status = pNtAreMappedFilesTheSame( ptr, ptr2 ); - ok( status == STATUS_NOT_SAME_DEVICE, "NtAreMappedFilesTheSame returned %x\n", status ); - UnmapViewOfFile( ptr2 ); - CloseHandle( map2 ); - CloseHandle( file2 ); - - status = pNtAreMappedFilesTheSame( ptr, ptr ); - ok( status == STATUS_NOT_SAME_DEVICE, "NtAreMappedFilesTheSame returned %x\n", status ); - - status = pNtAreMappedFilesTheSame( ptr, (char *)ptr + 30 ); - ok( status == STATUS_NOT_SAME_DEVICE, "NtAreMappedFilesTheSame returned %x\n", status ); - - status = pNtAreMappedFilesTheSame( ptr, GetModuleHandleA("kernel32.dll") ); - ok( status == STATUS_NOT_SAME_DEVICE, "NtAreMappedFilesTheSame returned %x\n", status ); - - status = pNtAreMappedFilesTheSame( ptr, (void *)0xdeadbeef ); - ok( status == STATUS_CONFLICTING_ADDRESSES || status == STATUS_INVALID_ADDRESS, - "NtAreMappedFilesTheSame returned %x\n", status ); - - status = pNtAreMappedFilesTheSame( ptr, NULL ); - ok( status == STATUS_INVALID_ADDRESS, "NtAreMappedFilesTheSame returned %x\n", status ); - - status = pNtAreMappedFilesTheSame( ptr, (void *)GetProcessHeap() ); - ok( status == STATUS_CONFLICTING_ADDRESSES, "NtAreMappedFilesTheSame returned %x\n", status ); - - status = pNtAreMappedFilesTheSame( NULL, NULL ); - ok( status == STATUS_INVALID_ADDRESS, "NtAreMappedFilesTheSame returned %x\n", status ); - - ptr2 = VirtualAlloc( NULL, 0x10000, MEM_COMMIT, PAGE_READWRITE ); - ok( ptr2 != NULL, "VirtualAlloc error %u\n", GetLastError() ); - status = pNtAreMappedFilesTheSame( ptr, ptr2 ); - ok( status == STATUS_CONFLICTING_ADDRESSES, "NtAreMappedFilesTheSame returned %x\n", status ); - VirtualFree( ptr2, 0, MEM_RELEASE ); - - UnmapViewOfFile( ptr ); - CloseHandle( mapping ); - CloseHandle( file ); - - status = pNtAreMappedFilesTheSame( GetModuleHandleA("ntdll.dll"), - GetModuleHandleA("kernel32.dll") ); - ok( status == STATUS_NOT_SAME_DEVICE, "NtAreMappedFilesTheSame returned %x\n", status ); - status = pNtAreMappedFilesTheSame( GetModuleHandleA("kernel32.dll"), - GetModuleHandleA("kernel32.dll") ); - ok( status == STATUS_SUCCESS, "NtAreMappedFilesTheSame returned %x\n", status ); - status = pNtAreMappedFilesTheSame( GetModuleHandleA("kernel32.dll"), - (char *)GetModuleHandleA("kernel32.dll") + 4096 ); - ok( status == STATUS_SUCCESS, "NtAreMappedFilesTheSame returned %x\n", status ); - - GetSystemDirectoryA( path, MAX_PATH ); - strcat( path, "\\kernel32.dll" ); - file = CreateFileA( path, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0 ); - ok( file != INVALID_HANDLE_VALUE, "CreateFile error %u\n", GetLastError() ); - - mapping = CreateFileMappingA( file, NULL, PAGE_READONLY, 0, 4096, NULL ); - ok( mapping != 0, "CreateFileMapping error %u\n", GetLastError() ); - ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 4096 ); - ok( ptr != NULL, "MapViewOfFile FILE_MAP_READ error %u\n", GetLastError() ); - status = pNtAreMappedFilesTheSame( ptr, GetModuleHandleA("kernel32.dll") ); - ok( status == STATUS_NOT_SAME_DEVICE, "NtAreMappedFilesTheSame returned %x\n", status ); - UnmapViewOfFile( ptr ); - CloseHandle( mapping ); - - mapping = CreateFileMappingA( file, NULL, PAGE_READONLY | SEC_IMAGE, 0, 0, NULL ); - ok( mapping != 0, "CreateFileMapping error %u\n", GetLastError() ); - ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 0 ); - ok( ptr != NULL, "MapViewOfFile FILE_MAP_READ error %u\n", GetLastError() ); - status = pNtAreMappedFilesTheSame( ptr, GetModuleHandleA("kernel32.dll") ); - todo_wine - ok( status == STATUS_SUCCESS, "NtAreMappedFilesTheSame returned %x\n", status ); - - file2 = CreateFileA( path, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0 ); - ok( file2 != INVALID_HANDLE_VALUE, "CreateFile error %u\n", GetLastError() ); - map2 = CreateFileMappingA( file2, NULL, PAGE_READONLY | SEC_IMAGE, 0, 0, NULL ); - ok( map2 != 0, "CreateFileMapping error %u\n", GetLastError() ); - ptr2 = MapViewOfFile( map2, FILE_MAP_READ, 0, 0, 0 ); - ok( ptr2 != NULL, "MapViewOfFile FILE_MAP_READ error %u\n", GetLastError() ); - status = pNtAreMappedFilesTheSame( ptr, ptr2 ); - ok( status == STATUS_SUCCESS, "NtAreMappedFilesTheSame returned %x\n", status ); - UnmapViewOfFile( ptr2 ); - CloseHandle( map2 ); - CloseHandle( file2 ); - - UnmapViewOfFile( ptr ); - CloseHandle( mapping ); - - CloseHandle( file ); - DeleteFileA( testfile ); -} - -static void test_CreateFileMapping(void) -{ - HANDLE handle, handle2; - - /* test case sensitivity */ - - SetLastError(0xdeadbeef); - handle = CreateFileMappingA( INVALID_HANDLE_VALUE, NULL, SEC_COMMIT | PAGE_READWRITE, 0, 0x1000, - "Wine Test Mapping"); - ok( handle != NULL, "CreateFileMapping failed with error %u\n", GetLastError()); - ok( GetLastError() == 0, "wrong error %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - handle2 = CreateFileMappingA( INVALID_HANDLE_VALUE, NULL, SEC_COMMIT | PAGE_READWRITE, 0, 0x1000, - "Wine Test Mapping"); - ok( handle2 != NULL, "CreateFileMapping failed with error %d\n", GetLastError()); - ok( GetLastError() == ERROR_ALREADY_EXISTS, "wrong error %u\n", GetLastError()); - CloseHandle( handle2 ); - - SetLastError(0xdeadbeef); - handle2 = CreateFileMappingA( INVALID_HANDLE_VALUE, NULL, SEC_COMMIT | PAGE_READWRITE, 0, 0x1000, - "WINE TEST MAPPING"); - ok( handle2 != NULL, "CreateFileMapping failed with error %d\n", GetLastError()); - ok( GetLastError() == 0, "wrong error %u\n", GetLastError()); - CloseHandle( handle2 ); - - SetLastError(0xdeadbeef); - handle2 = OpenFileMappingA( FILE_MAP_ALL_ACCESS, FALSE, "Wine Test Mapping"); - ok( handle2 != NULL, "OpenFileMapping failed with error %d\n", GetLastError()); - CloseHandle( handle2 ); - - SetLastError(0xdeadbeef); - handle2 = OpenFileMappingA( FILE_MAP_ALL_ACCESS, FALSE, "WINE TEST MAPPING"); - ok( !handle2, "OpenFileMapping succeeded\n"); - ok( GetLastError() == ERROR_FILE_NOT_FOUND || GetLastError() == ERROR_INVALID_NAME /* win9x */, - "wrong error %u\n", GetLastError()); - - CloseHandle( handle ); -} - -static void test_IsBadReadPtr(void) -{ - BOOL ret; - void *ptr = (void *)0xdeadbeef; - char stackvar; - - ret = IsBadReadPtr(NULL, 0); - ok(ret == FALSE, "Expected IsBadReadPtr to return FALSE, got %d\n", ret); - - ret = IsBadReadPtr(NULL, 1); - ok(ret == TRUE, "Expected IsBadReadPtr to return TRUE, got %d\n", ret); - - ret = IsBadReadPtr(ptr, 0); - ok(ret == FALSE, "Expected IsBadReadPtr to return FALSE, got %d\n", ret); - - ret = IsBadReadPtr(ptr, 1); - ok(ret == TRUE, "Expected IsBadReadPtr to return TRUE, got %d\n", ret); - - ret = IsBadReadPtr(&stackvar, 0); - ok(ret == FALSE, "Expected IsBadReadPtr to return FALSE, got %d\n", ret); - - ret = IsBadReadPtr(&stackvar, sizeof(char)); - ok(ret == FALSE, "Expected IsBadReadPtr to return FALSE, got %d\n", ret); -} - -static void test_IsBadWritePtr(void) -{ - BOOL ret; - void *ptr = (void *)0xdeadbeef; - char stackval; - - ret = IsBadWritePtr(NULL, 0); - ok(ret == FALSE, "Expected IsBadWritePtr to return FALSE, got %d\n", ret); - - ret = IsBadWritePtr(NULL, 1); - ok(ret == TRUE, "Expected IsBadWritePtr to return TRUE, got %d\n", ret); - - ret = IsBadWritePtr(ptr, 0); - ok(ret == FALSE, "Expected IsBadWritePtr to return FALSE, got %d\n", ret); - - ret = IsBadWritePtr(ptr, 1); - ok(ret == TRUE, "Expected IsBadWritePtr to return TRUE, got %d\n", ret); - - ret = IsBadWritePtr(&stackval, 0); - ok(ret == FALSE, "Expected IsBadWritePtr to return FALSE, got %d\n", ret); - - ret = IsBadWritePtr(&stackval, sizeof(char)); - ok(ret == FALSE, "Expected IsBadWritePtr to return FALSE, got %d\n", ret); -} - -static void test_IsBadCodePtr(void) -{ - BOOL ret; - void *ptr = (void *)0xdeadbeef; - char stackval; - - ret = IsBadCodePtr(NULL); - ok(ret == TRUE, "Expected IsBadCodePtr to return TRUE, got %d\n", ret); - - ret = IsBadCodePtr(ptr); - ok(ret == TRUE, "Expected IsBadCodePtr to return TRUE, got %d\n", ret); - - ret = IsBadCodePtr((void *)&stackval); - ok(ret == FALSE, "Expected IsBadCodePtr to return FALSE, got %d\n", ret); -} - -static void test_write_watch(void) -{ - char *base; - DWORD ret, size, old_prot; - MEMORY_BASIC_INFORMATION info; - void *results[64]; - ULONG_PTR count; - ULONG pagesize; - - if (!pGetWriteWatch || !pResetWriteWatch) - { - win_skip( "GetWriteWatch not supported\n" ); - return; - } - - size = 0x10000; - base = VirtualAlloc( 0, size, MEM_RESERVE | MEM_COMMIT | MEM_WRITE_WATCH, PAGE_READWRITE ); - if (!base && - (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_NOT_SUPPORTED)) - { - win_skip( "MEM_WRITE_WATCH not supported\n" ); - return; - } - ok( base != NULL, "VirtualAlloc failed %u\n", GetLastError() ); - ret = VirtualQuery( base, &info, sizeof(info) ); - ok(ret, "VirtualQuery failed %u\n", GetLastError()); - ok( info.BaseAddress == base, "BaseAddress %p instead of %p\n", info.BaseAddress, base ); - ok( info.AllocationProtect == PAGE_READWRITE, "wrong AllocationProtect %x\n", info.AllocationProtect ); - ok( info.RegionSize == size, "wrong RegionSize 0x%lx\n", info.RegionSize ); - ok( info.State == MEM_COMMIT, "wrong State 0x%x\n", info.State ); - ok( info.Protect == PAGE_READWRITE, "wrong Protect 0x%x\n", info.Protect ); - ok( info.Type == MEM_PRIVATE, "wrong Type 0x%x\n", info.Type ); - - count = 64; - SetLastError( 0xdeadbeef ); - ret = pGetWriteWatch( 0, NULL, size, results, &count, &pagesize ); - ok( ret == ~0u, "GetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER || - broken( GetLastError() == 0xdeadbeef ), /* win98 */ - "wrong error %u\n", GetLastError() ); - - SetLastError( 0xdeadbeef ); - ret = pGetWriteWatch( 0, GetModuleHandle(0), size, results, &count, &pagesize ); - if (ret) - { - ok( ret == ~0u, "GetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); - } - else /* win98 */ - { - ok( count == 0, "wrong count %lu\n", count ); - } - - ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 0, "wrong count %lu\n", count ); - - base[pagesize + 1] = 0x44; - - count = 64; - ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 1, "wrong count %lu\n", count ); - ok( results[0] == base + pagesize, "wrong result %p\n", results[0] ); - - count = 64; - ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 1, "wrong count %lu\n", count ); - ok( results[0] == base + pagesize, "wrong result %p\n", results[0] ); - - count = 64; - ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 0, "wrong count %lu\n", count ); - - base[2*pagesize + 3] = 0x11; - base[4*pagesize + 8] = 0x11; - - count = 64; - ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 2, "wrong count %lu\n", count ); - ok( results[0] == base + 2*pagesize, "wrong result %p\n", results[0] ); - ok( results[1] == base + 4*pagesize, "wrong result %p\n", results[1] ); - - count = 64; - ret = pGetWriteWatch( 0, base + 3*pagesize, 2*pagesize, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 1, "wrong count %lu\n", count ); - ok( results[0] == base + 4*pagesize, "wrong result %p\n", results[0] ); - - ret = pResetWriteWatch( base, 3*pagesize ); - ok( !ret, "pResetWriteWatch failed %u\n", GetLastError() ); - - count = 64; - ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 1, "wrong count %lu\n", count ); - ok( results[0] == base + 4*pagesize, "wrong result %p\n", results[0] ); - - *(DWORD *)(base + 2*pagesize - 2) = 0xdeadbeef; - - count = 64; - ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 3, "wrong count %lu\n", count ); - ok( results[0] == base + pagesize, "wrong result %p\n", results[0] ); - ok( results[1] == base + 2*pagesize, "wrong result %p\n", results[1] ); - ok( results[2] == base + 4*pagesize, "wrong result %p\n", results[2] ); - - count = 1; - ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 1, "wrong count %lu\n", count ); - ok( results[0] == base + pagesize, "wrong result %p\n", results[0] ); - - count = 64; - ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 2, "wrong count %lu\n", count ); - ok( results[0] == base + 2*pagesize, "wrong result %p\n", results[0] ); - ok( results[1] == base + 4*pagesize, "wrong result %p\n", results[1] ); - - /* changing protections doesn't affect watches */ - - ret = VirtualProtect( base, 3*pagesize, PAGE_READONLY, &old_prot ); - ok( ret, "VirtualProtect failed error %u\n", GetLastError() ); - ok( old_prot == PAGE_READWRITE, "wrong old prot %x\n", old_prot ); - - ret = VirtualQuery( base, &info, sizeof(info) ); - ok(ret, "VirtualQuery failed %u\n", GetLastError()); - ok( info.BaseAddress == base, "BaseAddress %p instead of %p\n", info.BaseAddress, base ); - ok( info.RegionSize == 3*pagesize, "wrong RegionSize 0x%lx\n", info.RegionSize ); - ok( info.State == MEM_COMMIT, "wrong State 0x%x\n", info.State ); - ok( info.Protect == PAGE_READONLY, "wrong Protect 0x%x\n", info.Protect ); - - ret = VirtualProtect( base, 3*pagesize, PAGE_READWRITE, &old_prot ); - ok( ret, "VirtualProtect failed error %u\n", GetLastError() ); - ok( old_prot == PAGE_READONLY, "wrong old prot %x\n", old_prot ); - - count = 64; - ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 2, "wrong count %lu\n", count ); - ok( results[0] == base + 2*pagesize, "wrong result %p\n", results[0] ); - ok( results[1] == base + 4*pagesize, "wrong result %p\n", results[1] ); - - ret = VirtualQuery( base, &info, sizeof(info) ); - ok(ret, "VirtualQuery failed %u\n", GetLastError()); - ok( info.BaseAddress == base, "BaseAddress %p instead of %p\n", info.BaseAddress, base ); - ok( info.RegionSize == size, "wrong RegionSize 0x%lx\n", info.RegionSize ); - ok( info.State == MEM_COMMIT, "wrong State 0x%x\n", info.State ); - ok( info.Protect == PAGE_READWRITE, "wrong Protect 0x%x\n", info.Protect ); - - /* some invalid parameter tests */ - - SetLastError( 0xdeadbeef ); - count = 0; - ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); - if (ret) - { - ok( ret == ~0u, "GetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); - - SetLastError( 0xdeadbeef ); - ret = pGetWriteWatch( 0, base, size, results, NULL, &pagesize ); - ok( ret == ~0u, "GetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == ERROR_NOACCESS, "wrong error %u\n", GetLastError() ); - - SetLastError( 0xdeadbeef ); - count = 64; - ret = pGetWriteWatch( 0, base, size, results, &count, NULL ); - ok( ret == ~0u, "GetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == ERROR_NOACCESS, "wrong error %u\n", GetLastError() ); - - SetLastError( 0xdeadbeef ); - count = 64; - ret = pGetWriteWatch( 0, base, size, NULL, &count, &pagesize ); - ok( ret == ~0u, "GetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == ERROR_NOACCESS, "wrong error %u\n", GetLastError() ); - - SetLastError( 0xdeadbeef ); - count = 0; - ret = pGetWriteWatch( 0, base, size, NULL, &count, &pagesize ); - ok( ret == ~0u, "GetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); - - SetLastError( 0xdeadbeef ); - count = 64; - ret = pGetWriteWatch( 0xdeadbeef, base, size, results, &count, &pagesize ); - ok( ret == ~0u, "GetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); - - SetLastError( 0xdeadbeef ); - count = 64; - ret = pGetWriteWatch( 0, base, 0, results, &count, &pagesize ); - ok( ret == ~0u, "GetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); - - SetLastError( 0xdeadbeef ); - count = 64; - ret = pGetWriteWatch( 0, base, size * 2, results, &count, &pagesize ); - ok( ret == ~0u, "GetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); - - SetLastError( 0xdeadbeef ); - count = 64; - ret = pGetWriteWatch( 0, base + size - pagesize, pagesize + 1, results, &count, &pagesize ); - ok( ret == ~0u, "GetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); - - SetLastError( 0xdeadbeef ); - ret = pResetWriteWatch( base, 0 ); - ok( ret == ~0u, "ResetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); - - SetLastError( 0xdeadbeef ); - ret = pResetWriteWatch( GetModuleHandle(0), size ); - ok( ret == ~0u, "ResetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); - } - else /* win98 is completely different */ - { - SetLastError( 0xdeadbeef ); - count = 64; - ret = pGetWriteWatch( 0, base, size, NULL, &count, &pagesize ); - ok( ret == ERROR_INVALID_PARAMETER, "GetWriteWatch succeeded %u\n", ret ); - ok( GetLastError() == 0xdeadbeef, "wrong error %u\n", GetLastError() ); - - count = 0; - ret = pGetWriteWatch( 0, base, size, NULL, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", ret ); - - count = 64; - ret = pGetWriteWatch( 0xdeadbeef, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", ret ); - - count = 64; - ret = pGetWriteWatch( 0, base, 0, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", ret ); - - ret = pResetWriteWatch( base, 0 ); - ok( !ret, "ResetWriteWatch failed %u\n", ret ); - - ret = pResetWriteWatch( GetModuleHandle(0), size ); - ok( !ret, "ResetWriteWatch failed %u\n", ret ); - } - - VirtualFree( base, 0, MEM_FREE ); - - base = VirtualAlloc( 0, size, MEM_RESERVE | MEM_WRITE_WATCH, PAGE_READWRITE ); - ok( base != NULL, "VirtualAlloc failed %u\n", GetLastError() ); - VirtualFree( base, 0, MEM_FREE ); - - base = VirtualAlloc( 0, size, MEM_WRITE_WATCH, PAGE_READWRITE ); - ok( !base, "VirtualAlloc succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); - - /* initial protect doesn't matter */ - - base = VirtualAlloc( 0, size, MEM_RESERVE | MEM_WRITE_WATCH, PAGE_NOACCESS ); - ok( base != NULL, "VirtualAlloc failed %u\n", GetLastError() ); - base = VirtualAlloc( base, size, MEM_COMMIT, PAGE_NOACCESS ); - ok( base != NULL, "VirtualAlloc failed %u\n", GetLastError() ); - - count = 64; - ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 0, "wrong count %lu\n", count ); - - ret = VirtualProtect( base, 6*pagesize, PAGE_READWRITE, &old_prot ); - ok( ret, "VirtualProtect failed error %u\n", GetLastError() ); - ok( old_prot == PAGE_NOACCESS, "wrong old prot %x\n", old_prot ); - - base[5*pagesize + 200] = 3; - - ret = VirtualProtect( base, 6*pagesize, PAGE_NOACCESS, &old_prot ); - ok( ret, "VirtualProtect failed error %u\n", GetLastError() ); - ok( old_prot == PAGE_READWRITE, "wrong old prot %x\n", old_prot ); - - count = 64; - ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 1, "wrong count %lu\n", count ); - ok( results[0] == base + 5*pagesize, "wrong result %p\n", results[0] ); - - ret = VirtualFree( base, size, MEM_DECOMMIT ); - ok( ret, "VirtualFree failed %u\n", GetLastError() ); - - count = 64; - ret = pGetWriteWatch( 0, base, size, results, &count, &pagesize ); - ok( !ret, "GetWriteWatch failed %u\n", GetLastError() ); - ok( count == 1 || broken(count == 0), /* win98 */ - "wrong count %lu\n", count ); - if (count) ok( results[0] == base + 5*pagesize, "wrong result %p\n", results[0] ); - - VirtualFree( base, 0, MEM_FREE ); -} - -START_TEST(virtual) -{ - int argc; - char **argv; - argc = winetest_get_mainargs( &argv ); - - if (argc >= 3) - { - if (!strcmp(argv[2], "sleep")) - { - Sleep(5000); /* spawned process runs for at most 5 seconds */ - return; - } - while (1) - { - void *mem; - BOOL ret; - mem = VirtualAlloc(NULL, 1<<20, MEM_COMMIT|MEM_RESERVE, - PAGE_EXECUTE_READWRITE); - ok(mem != NULL, "VirtualAlloc failed %u\n", GetLastError()); - if (mem == NULL) break; - ret = VirtualFree(mem, 0, MEM_RELEASE); - ok(ret, "VirtualFree failed %u\n", GetLastError()); - if (!ret) break; - } - return; - } - - hkernel32 = GetModuleHandleA("kernel32.dll"); - pVirtualAllocEx = (void *) GetProcAddress(hkernel32, "VirtualAllocEx"); - pVirtualFreeEx = (void *) GetProcAddress(hkernel32, "VirtualFreeEx"); - pGetWriteWatch = (void *) GetProcAddress(hkernel32, "GetWriteWatch"); - pResetWriteWatch = (void *) GetProcAddress(hkernel32, "ResetWriteWatch"); - pNtAreMappedFilesTheSame = (void *)GetProcAddress( GetModuleHandle("ntdll.dll"), - "NtAreMappedFilesTheSame" ); - - test_VirtualAllocEx(); - test_VirtualAlloc(); - test_MapViewOfFile(); - test_NtMapViewOfSection(); - test_NtAreMappedFilesTheSame(); - test_CreateFileMapping(); - test_IsBadReadPtr(); - test_IsBadWritePtr(); - test_IsBadCodePtr(); - test_write_watch(); -} diff --git a/rostests/winetests/kernel32/volume.c b/rostests/winetests/kernel32/volume.c deleted file mode 100644 index f4a0f143c7d..00000000000 --- a/rostests/winetests/kernel32/volume.c +++ /dev/null @@ -1,755 +0,0 @@ -/* - * Unit test suite for volume functions - * - * Copyright 2006 Stefan Leichter - * - * 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/test.h" -#include "winbase.h" -#include "winioctl.h" -#include - -static HINSTANCE hdll; -static BOOL (WINAPI * pGetVolumeNameForVolumeMountPointA)(LPCSTR, LPSTR, DWORD); -static BOOL (WINAPI * pGetVolumeNameForVolumeMountPointW)(LPCWSTR, LPWSTR, DWORD); -static HANDLE (WINAPI *pFindFirstVolumeA)(LPSTR,DWORD); -static BOOL (WINAPI *pFindNextVolumeA)(HANDLE,LPSTR,DWORD); -static BOOL (WINAPI *pFindVolumeClose)(HANDLE); -static UINT (WINAPI *pGetLogicalDriveStringsA)(UINT,LPSTR); -static UINT (WINAPI *pGetLogicalDriveStringsW)(UINT,LPWSTR); -static BOOL (WINAPI *pGetVolumeInformationA)(LPCSTR, LPSTR, DWORD, LPDWORD, LPDWORD, LPDWORD, LPSTR, DWORD); -static BOOL (WINAPI *pGetVolumePathNamesForVolumeNameA)(LPCSTR, LPSTR, DWORD, LPDWORD); -static BOOL (WINAPI *pGetVolumePathNamesForVolumeNameW)(LPCWSTR, LPWSTR, DWORD, LPDWORD); - -/* ############################### */ - -static void test_query_dos_deviceA(void) -{ - char drivestr[] = "a:"; - char *p, *buffer, buffer2[2000]; - DWORD ret, ret2, buflen=32768; - BOOL found = FALSE; - - buffer = HeapAlloc( GetProcessHeap(), 0, buflen ); - SetLastError(0xdeadbeef); - ret = QueryDosDeviceA( NULL, buffer, buflen ); - ok((ret && GetLastError() != ERROR_INSUFFICIENT_BUFFER), - "QueryDosDeviceA failed to return list, last error %u\n", GetLastError()); - - if (ret && GetLastError() != ERROR_INSUFFICIENT_BUFFER) { - p = buffer; - for (;;) { - if (!strlen(p)) break; - ret2 = QueryDosDeviceA( p, buffer2, sizeof(buffer2) ); - ok(ret2, "QueryDosDeviceA failed to return current mapping for %s, last error %u\n", p, GetLastError()); - p += strlen(p) + 1; - if (ret <= (p-buffer)) break; - } - } - - for (;drivestr[0] <= 'z'; drivestr[0]++) { - /* Older W2K fails with ERROR_INSUFFICIENT_BUFFER when buflen is > 32767 */ - ret = QueryDosDeviceA( drivestr, buffer, buflen - 1); - ok(ret || GetLastError() == ERROR_FILE_NOT_FOUND, - "QueryDosDeviceA failed to return current mapping for %s, last error %u\n", drivestr, GetLastError()); - if(ret) { - for (p = buffer; *p; p++) *p = toupper(*p); - if (strstr(buffer, "HARDDISK") || strstr(buffer, "RAMDISK")) found = TRUE; - } - } - ok(found, "expected at least one devicename to contain HARDDISK or RAMDISK\n"); - HeapFree( GetProcessHeap(), 0, buffer ); -} - -static void test_define_dos_deviceA(void) -{ - char drivestr[3]; - char buf[MAX_PATH]; - DWORD ret; - - /* Find an unused drive letter */ - drivestr[1] = ':'; - drivestr[2] = 0; - for (drivestr[0] = 'a'; drivestr[0] <= 'z'; drivestr[0]++) { - ret = QueryDosDeviceA( drivestr, buf, sizeof(buf)); - if (!ret) break; - } - if (drivestr[0] > 'z') { - skip("can't test creating a dos drive, none available\n"); - return; - } - - /* Map it to point to the current directory */ - ret = GetCurrentDirectory(sizeof(buf), buf); - ok(ret, "GetCurrentDir\n"); - - ret = DefineDosDeviceA(0, drivestr, buf); - todo_wine - ok(ret, "Could not make drive %s point to %s!\n", drivestr, buf); - - if (!ret) { - skip("can't test removing fake drive\n"); - } else { - ret = DefineDosDeviceA(DDD_REMOVE_DEFINITION, drivestr, NULL); - ok(ret, "Could not remove fake drive %s!\n", drivestr); - } -} - -static void test_FindFirstVolume(void) -{ - char volume[51]; - HANDLE handle; - - /* not present before w2k */ - if (!pFindFirstVolumeA) { - win_skip("FindFirstVolumeA not found\n"); - return; - } - - handle = pFindFirstVolumeA( volume, 0 ); - ok( handle == INVALID_HANDLE_VALUE, "succeeded with short buffer\n" ); - ok( GetLastError() == ERROR_MORE_DATA || /* XP */ - GetLastError() == ERROR_FILENAME_EXCED_RANGE, /* Vista */ - "wrong error %u\n", GetLastError() ); - handle = pFindFirstVolumeA( volume, 49 ); - ok( handle == INVALID_HANDLE_VALUE, "succeeded with short buffer\n" ); - ok( GetLastError() == ERROR_FILENAME_EXCED_RANGE, "wrong error %u\n", GetLastError() ); - handle = pFindFirstVolumeA( volume, 51 ); - ok( handle != INVALID_HANDLE_VALUE, "failed err %u\n", GetLastError() ); - if (handle != INVALID_HANDLE_VALUE) - { - do - { - ok( strlen(volume) == 49, "bad volume name %s\n", volume ); - ok( !memcmp( volume, "\\\\?\\Volume{", 11 ), "bad volume name %s\n", volume ); - ok( !memcmp( volume + 47, "}\\", 2 ), "bad volume name %s\n", volume ); - } while (pFindNextVolumeA( handle, volume, MAX_PATH )); - ok( GetLastError() == ERROR_NO_MORE_FILES, "wrong error %u\n", GetLastError() ); - pFindVolumeClose( handle ); - } -} - -static void test_GetVolumeNameForVolumeMountPointA(void) -{ - BOOL ret; - char volume[MAX_PATH], path[] = "c:\\"; - DWORD len = sizeof(volume), reti; - char temp_path[MAX_PATH]; - - /* not present before w2k */ - if (!pGetVolumeNameForVolumeMountPointA) { - win_skip("GetVolumeNameForVolumeMountPointA not found\n"); - return; - } - - reti = GetTempPathA(MAX_PATH, temp_path); - ok(reti != 0, "GetTempPathA error %d\n", GetLastError()); - ok(reti < MAX_PATH, "temp path should fit into MAX_PATH\n"); - - ret = pGetVolumeNameForVolumeMountPointA(path, volume, 0); - ok(ret == FALSE, "GetVolumeNameForVolumeMountPointA succeeded\n"); - ok(GetLastError() == ERROR_FILENAME_EXCED_RANGE || - GetLastError() == ERROR_INVALID_PARAMETER, /* Vista */ - "wrong error, last=%d\n", GetLastError()); - - if (0) { /* these crash on XP */ - ret = pGetVolumeNameForVolumeMountPointA(path, NULL, len); - ok(ret == FALSE, "GetVolumeNameForVolumeMountPointA succeeded\n"); - - ret = pGetVolumeNameForVolumeMountPointA(NULL, volume, len); - ok(ret == FALSE, "GetVolumeNameForVolumeMountPointA succeeded\n"); - } - - ret = pGetVolumeNameForVolumeMountPointA(path, volume, len); - ok(ret == TRUE, "GetVolumeNameForVolumeMountPointA failed\n"); - ok(!strncmp( volume, "\\\\?\\Volume{", 11), - "GetVolumeNameForVolumeMountPointA failed to return valid string <%s>\n", - volume); - - /* test with too small buffer */ - ret = pGetVolumeNameForVolumeMountPointA(path, volume, 10); - ok(ret == FALSE && GetLastError() == ERROR_FILENAME_EXCED_RANGE, - "GetVolumeNameForVolumeMountPointA failed, wrong error returned, was %d, should be ERROR_FILENAME_EXCED_RANGE\n", - GetLastError()); - - /* Try on a arbitrary directory */ - /* On FAT filesystems it seems that GetLastError() is set to - ERROR_INVALID_FUNCTION. */ - ret = pGetVolumeNameForVolumeMountPointA(temp_path, volume, len); - ok(ret == FALSE && (GetLastError() == ERROR_NOT_A_REPARSE_POINT || - GetLastError() == ERROR_INVALID_FUNCTION), - "GetVolumeNameForVolumeMountPointA failed on %s, last=%d\n", - temp_path, GetLastError()); - - /* Try on a nonexistent dos drive */ - path[2] = 0; - for (;path[0] <= 'z'; path[0]++) { - ret = QueryDosDeviceA( path, volume, len); - if(!ret) break; - } - if (path[0] <= 'z') - { - path[2] = '\\'; - ret = pGetVolumeNameForVolumeMountPointA(path, volume, len); - ok(ret == FALSE && GetLastError() == ERROR_FILE_NOT_FOUND, - "GetVolumeNameForVolumeMountPointA failed on %s, last=%d\n", - path, GetLastError()); - - /* Try without trailing \ and on a nonexistent dos drive */ - path[2] = 0; - ret = pGetVolumeNameForVolumeMountPointA(path, volume, len); - ok(ret == FALSE && GetLastError() == ERROR_INVALID_NAME, - "GetVolumeNameForVolumeMountPointA failed on %s, last=%d\n", - path, GetLastError()); - } -} - -static void test_GetVolumeNameForVolumeMountPointW(void) -{ - BOOL ret; - WCHAR volume[MAX_PATH], path[] = {'c',':','\\',0}; - DWORD len = sizeof(volume) / sizeof(WCHAR); - - /* not present before w2k */ - if (!pGetVolumeNameForVolumeMountPointW) { - win_skip("GetVolumeNameForVolumeMountPointW not found\n"); - return; - } - - ret = pGetVolumeNameForVolumeMountPointW(path, volume, 0); - ok(ret == FALSE, "GetVolumeNameForVolumeMountPointA succeeded\n"); - ok(GetLastError() == ERROR_FILENAME_EXCED_RANGE || - GetLastError() == ERROR_INVALID_PARAMETER, /* Vista */ - "wrong error, last=%d\n", GetLastError()); - - if (0) { /* these crash on XP */ - ret = pGetVolumeNameForVolumeMountPointW(path, NULL, len); - ok(ret == FALSE, "GetVolumeNameForVolumeMountPointW succeeded\n"); - - ret = pGetVolumeNameForVolumeMountPointW(NULL, volume, len); - ok(ret == FALSE, "GetVolumeNameForVolumeMountPointW succeeded\n"); - } - - ret = pGetVolumeNameForVolumeMountPointW(path, volume, len); - ok(ret == TRUE, "GetVolumeNameForVolumeMountPointW failed\n"); -} - -static void test_GetLogicalDriveStringsA(void) -{ - UINT size, size2; - char *buf, *ptr; - - ok( pGetLogicalDriveStringsA != NULL, "GetLogicalDriveStringsA not available\n"); - if(!pGetLogicalDriveStringsA) { - return; - } - - size = pGetLogicalDriveStringsA(0, NULL); - ok(size%4 == 1, "size = %d\n", size); - - buf = HeapAlloc(GetProcessHeap(), 0, size); - - *buf = 0; - size2 = pGetLogicalDriveStringsA(2, buf); - ok(size2 == size, "size2 = %d\n", size2); - ok(!*buf, "buf changed\n"); - - size2 = pGetLogicalDriveStringsA(size, buf); - ok(size2 == size-1, "size2 = %d\n", size2); - - for(ptr = buf; ptr < buf+size2; ptr += 4) { - ok(('A' <= *ptr && *ptr <= 'Z'), "device name '%c' is not uppercase\n", *ptr); - ok(ptr[1] == ':', "ptr[1] = %c, expected ':'\n", ptr[1]); - ok(ptr[2] == '\\', "ptr[2] = %c expected '\\'\n", ptr[2]); - ok(!ptr[3], "ptr[3] = %c expected nullbyte\n", ptr[3]); - } - ok(!*ptr, "buf[size2] is not nullbyte\n"); - - HeapFree(GetProcessHeap(), 0, buf); -} - -static void test_GetLogicalDriveStringsW(void) -{ - UINT size, size2; - WCHAR *buf, *ptr; - - ok( pGetLogicalDriveStringsW != NULL, "GetLogicalDriveStringsW not available\n"); - if(!pGetLogicalDriveStringsW) { - return; - } - - SetLastError(0xdeadbeef); - size = pGetLogicalDriveStringsW(0, NULL); - if (size == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) { - win_skip("GetLogicalDriveStringsW not implemented\n"); - return; - } - ok(size%4 == 1, "size = %d\n", size); - - buf = HeapAlloc(GetProcessHeap(), 0, size*sizeof(WCHAR)); - - *buf = 0; - size2 = pGetLogicalDriveStringsW(2, buf); - ok(size2 == size, "size2 = %d\n", size2); - ok(!*buf, "buf changed\n"); - - size2 = pGetLogicalDriveStringsW(size, buf); - ok(size2 == size-1, "size2 = %d\n", size2); - - for(ptr = buf; ptr < buf+size2; ptr += 4) { - ok('A' <= *ptr && *ptr <= 'Z', "device name '%c' is not uppercase\n", *ptr); - ok(ptr[1] == ':', "ptr[1] = %c, expected ':'\n", ptr[1]); - ok(ptr[2] == '\\', "ptr[2] = %c expected '\\'\n", ptr[2]); - ok(!ptr[3], "ptr[3] = %c expected nullbyte\n", ptr[3]); - } - ok(!*ptr, "buf[size2] is not nullbyte\n"); - - HeapFree(GetProcessHeap(), 0, buf); -} - -static void test_GetVolumeInformationA(void) -{ - BOOL ret; - UINT result; - char Root_Colon[]="C:"; - char Root_Slash[]="C:\\"; - char Root_UNC[]="\\\\?\\C:\\"; - char volume[MAX_PATH+1]; - DWORD vol_name_size=MAX_PATH+1, vol_serial_num=-1, max_comp_len=0, fs_flags=0, fs_name_len=MAX_PATH+1; - char vol_name_buf[MAX_PATH+1], fs_name_buf[MAX_PATH+1]; - char windowsdir[MAX_PATH+10]; - char currentdir[MAX_PATH+1]; - - ok( pGetVolumeInformationA != NULL, "GetVolumeInformationA not found\n"); - if(!pGetVolumeInformationA) { - return; - } - - /* get windows drive letter and update strings for testing */ - result = GetWindowsDirectory(windowsdir, sizeof(windowsdir)); - ok(result < sizeof(windowsdir), "windowsdir is abnormally long!\n"); - ok(result != 0, "GetWindowsDirectory: error %d\n", GetLastError()); - Root_Colon[0] = windowsdir[0]; - Root_Slash[0] = windowsdir[0]; - Root_UNC[4] = windowsdir[0]; - - result = GetCurrentDirectory(MAX_PATH, currentdir); - ok(result, "GetCurrentDirectory: error %d\n", GetLastError()); - /* Note that GetCurrentDir yields no trailing slash for subdirs */ - - /* check for NO error on no trailing \ when current dir is root dir */ - ret = SetCurrentDirectory(Root_Slash); - ok(ret, "SetCurrentDirectory: error %d\n", GetLastError()); - ret = pGetVolumeInformationA(Root_Colon, vol_name_buf, vol_name_size, NULL, - NULL, NULL, fs_name_buf, fs_name_len); - ok(ret, "GetVolumeInformationA root failed, last error %u\n", GetLastError()); - - /* check for error on no trailing \ when current dir is subdir (windows) of queried drive */ - ret = SetCurrentDirectory(windowsdir); - ok(ret, "SetCurrentDirectory: error %d\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pGetVolumeInformationA(Root_Colon, vol_name_buf, vol_name_size, NULL, - NULL, NULL, fs_name_buf, fs_name_len); - ok(!ret && (GetLastError() == ERROR_INVALID_NAME), - "GetVolumeInformationA did%s fail, last error %u\n", ret ? " not":"", GetLastError()); - - /* reset current directory */ - ret = SetCurrentDirectory(currentdir); - ok(ret, "SetCurrentDirectory: error %d\n", GetLastError()); - - if (toupper(currentdir[0]) == toupper(windowsdir[0])) { - skip("Please re-run from another device than %c:\n", windowsdir[0]); - /* FIXME: Use GetLogicalDrives to find another device to avoid this skip. */ - } else { - char Root_Env[]="=C:"; /* where MS maintains the per volume directory */ - Root_Env[1] = windowsdir[0]; - - /* C:\windows becomes the current directory on drive C: */ - /* Note that paths to subdirs are stored without trailing slash, like what GetCurrentDir yields. */ - ret = SetEnvironmentVariable(Root_Env, windowsdir); - ok(ret, "SetEnvironmentVariable %s failed\n", Root_Env); - - ret = SetCurrentDirectory(windowsdir); - ok(ret, "SetCurrentDirectory: error %d\n", GetLastError()); - ret = SetCurrentDirectory(currentdir); - ok(ret, "SetCurrentDirectory: error %d\n", GetLastError()); - - /* windows dir is current on the root drive, call fails */ - SetLastError(0xdeadbeef); - ret = pGetVolumeInformationA(Root_Colon, vol_name_buf, vol_name_size, NULL, - NULL, NULL, fs_name_buf, fs_name_len); - ok(!ret && (GetLastError() == ERROR_INVALID_NAME), - "GetVolumeInformationA did%s fail, last error %u\n", ret ? " not":"", GetLastError()); - - /* Try normal drive letter with trailing \ */ - ret = pGetVolumeInformationA(Root_Slash, vol_name_buf, vol_name_size, NULL, - NULL, NULL, fs_name_buf, fs_name_len); - ok(ret, "GetVolumeInformationA with \\ failed, last error %u\n", GetLastError()); - - ret = SetCurrentDirectory(Root_Slash); - ok(ret, "SetCurrentDirectory: error %d\n", GetLastError()); - ret = SetCurrentDirectory(currentdir); - ok(ret, "SetCurrentDirectory: error %d\n", GetLastError()); - - /* windows dir is STILL CURRENT on root drive; the call fails as before, */ - /* proving that SetCurrentDir did not remember the other drive's directory */ - SetLastError(0xdeadbeef); - ret = pGetVolumeInformationA(Root_Colon, vol_name_buf, vol_name_size, NULL, - NULL, NULL, fs_name_buf, fs_name_len); - ok(!ret && (GetLastError() == ERROR_INVALID_NAME), - "GetVolumeInformationA did%s fail, last error %u\n", ret ? " not":"", GetLastError()); - - /* Now C:\ becomes the current directory on drive C: */ - ret = SetEnvironmentVariable(Root_Env, Root_Slash); /* set =C:=C:\ */ - ok(ret, "SetEnvironmentVariable %s failed\n", Root_Env); - - /* \ is current on root drive, call succeeds */ - ret = pGetVolumeInformationA(Root_Colon, vol_name_buf, vol_name_size, NULL, - NULL, NULL, fs_name_buf, fs_name_len); - ok(ret, "GetVolumeInformationA failed, last error %u\n", GetLastError()); - - /* again, SetCurrentDirectory on another drive does not matter */ - ret = SetCurrentDirectory(Root_Slash); - ok(ret, "SetCurrentDirectory: error %d\n", GetLastError()); - ret = SetCurrentDirectory(currentdir); - ok(ret, "SetCurrentDirectory: error %d\n", GetLastError()); - - /* \ is current on root drive, call succeeds */ - ret = pGetVolumeInformationA(Root_Colon, vol_name_buf, vol_name_size, NULL, - NULL, NULL, fs_name_buf, fs_name_len); - ok(ret, "GetVolumeInformationA failed, last error %u\n", GetLastError()); - } - - /* try null root directory to return "root of the current directory" */ - ret = pGetVolumeInformationA(NULL, vol_name_buf, vol_name_size, NULL, - NULL, NULL, fs_name_buf, fs_name_len); - ok(ret, "GetVolumeInformationA failed on null root dir, last error %u\n", GetLastError()); - - /* Try normal drive letter with trailing \ */ - ret = pGetVolumeInformationA(Root_Slash, vol_name_buf, vol_name_size, - &vol_serial_num, &max_comp_len, &fs_flags, fs_name_buf, fs_name_len); - ok(ret, "GetVolumeInformationA failed, root=%s, last error=%u\n", Root_Slash, GetLastError()); - - /* try again with drive letter and the "disable parsing" prefix */ - SetLastError(0xdeadbeef); - ret = pGetVolumeInformationA(Root_UNC, vol_name_buf, vol_name_size, - &vol_serial_num, &max_comp_len, &fs_flags, fs_name_buf, fs_name_len); - ok(ret, "GetVolumeInformationA did%s fail, root=%s, last error=%u\n", ret ? " not":"", Root_UNC, GetLastError()); - - /* try again with device name space */ - Root_UNC[2] = '.'; - SetLastError(0xdeadbeef); - ret = pGetVolumeInformationA(Root_UNC, vol_name_buf, vol_name_size, - &vol_serial_num, &max_comp_len, &fs_flags, fs_name_buf, fs_name_len); - ok(ret, "GetVolumeInformationA did%s fail, root=%s, last error=%u\n", ret ? " not":"", Root_UNC, GetLastError()); - - /* try again with a directory off the root - should generate error */ - if (windowsdir[strlen(windowsdir)-1] != '\\') strcat(windowsdir, "\\"); - SetLastError(0xdeadbeef); - ret = pGetVolumeInformationA(windowsdir, vol_name_buf, vol_name_size, - &vol_serial_num, &max_comp_len, &fs_flags, fs_name_buf, fs_name_len); - ok(!ret && (GetLastError()==ERROR_DIR_NOT_ROOT), - "GetVolumeInformationA did%s fail, root=%s, last error=%u\n", ret ? " not":"", windowsdir, GetLastError()); - /* A subdir with trailing \ yields DIR_NOT_ROOT instead of INVALID_NAME */ - if (windowsdir[strlen(windowsdir)-1] == '\\') windowsdir[strlen(windowsdir)-1] = 0; - SetLastError(0xdeadbeef); - ret = pGetVolumeInformationA(windowsdir, vol_name_buf, vol_name_size, - &vol_serial_num, &max_comp_len, &fs_flags, fs_name_buf, fs_name_len); - ok(!ret && (GetLastError()==ERROR_INVALID_NAME), - "GetVolumeInformationA did%s fail, root=%s, last error=%u\n", ret ? " not":"", windowsdir, GetLastError()); - - if (!pGetVolumeNameForVolumeMountPointA) { - win_skip("GetVolumeNameForVolumeMountPointA not found\n"); - return; - } - /* get the unique volume name for the windows drive */ - ret = pGetVolumeNameForVolumeMountPointA(Root_Slash, volume, MAX_PATH); - ok(ret == TRUE, "GetVolumeNameForVolumeMountPointA failed\n"); - - /* try again with unique volume name */ - ret = pGetVolumeInformationA(volume, vol_name_buf, vol_name_size, - &vol_serial_num, &max_comp_len, &fs_flags, fs_name_buf, fs_name_len); - ok(ret, "GetVolumeInformationA failed, root=%s, last error=%u\n", volume, GetLastError()); -} - -/* Test to check that unique volume name from windows dir mount point */ -/* matches at least one of the unique volume names returned from the */ -/* FindFirstVolumeA/FindNextVolumeA list. */ -static void test_enum_vols(void) -{ - DWORD ret; - HANDLE hFind = INVALID_HANDLE_VALUE; - char Volume_1[MAX_PATH] = {0}; - char Volume_2[MAX_PATH] = {0}; - char path[] = "c:\\"; - BOOL found = FALSE; - char windowsdir[MAX_PATH]; - - if (!pGetVolumeNameForVolumeMountPointA) { - win_skip("GetVolumeNameForVolumeMountPointA not found\n"); - return; - } - - /*get windows drive letter and update strings for testing */ - ret = GetWindowsDirectory( windowsdir, sizeof(windowsdir) ); - ok(ret < sizeof(windowsdir), "windowsdir is abnormally long!\n"); - ok(ret != 0, "GetWindowsDirecory: error %d\n", GetLastError()); - path[0] = windowsdir[0]; - - /* get the unique volume name for the windows drive */ - ret = pGetVolumeNameForVolumeMountPointA( path, Volume_1, MAX_PATH ); - ok(ret == TRUE, "GetVolumeNameForVolumeMountPointA failed\n"); - ok(strlen(Volume_1) == 49, "GetVolumeNameForVolumeMountPointA returned wrong length name %s\n", Volume_1); - - /* get first unique volume name of list */ - hFind = pFindFirstVolumeA( Volume_2, MAX_PATH ); - ok(hFind != INVALID_HANDLE_VALUE, "FindFirstVolume failed, err=%u\n", - GetLastError()); - /* ReactOS */ - if (hFind != INVALID_HANDLE_VALUE) { - do - { - /* validate correct length of unique volume name */ - ok(strlen(Volume_2) == 49, "Find[First/Next]Volume returned wrong length name %s\n", Volume_1); - if (memcmp(Volume_1, Volume_2, 49) == 0) - { - found = TRUE; - break; - } - } while (pFindNextVolumeA( hFind, Volume_2, MAX_PATH )); - ok(found, "volume name %s not found by Find[First/Next]Volume\n", Volume_1); - pFindVolumeClose( hFind ); - } -} - -static void test_disk_extents(void) -{ - BOOL ret; - DWORD size; - HANDLE handle; - static DWORD data[16]; - - handle = CreateFileA( "\\\\.\\c:", GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0 ); - if (handle == INVALID_HANDLE_VALUE) - { - win_skip("can't open c: drive %u\n", GetLastError()); - return; - } - size = 0; - ret = DeviceIoControl( handle, IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS, &data, - sizeof(data), &data, sizeof(data), &size, NULL ); - if (!ret && GetLastError() == ERROR_INVALID_FUNCTION) - { - win_skip("IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS not supported\n"); - CloseHandle( handle ); - return; - } - ok(ret, "DeviceIoControl failed %u\n", GetLastError()); - ok(size == 32, "expected 32, got %u\n", size); - CloseHandle( handle ); -} - -static void test_GetVolumePathNamesForVolumeNameA(void) -{ - BOOL ret; - char volume[MAX_PATH], buffer[MAX_PATH]; - DWORD len, error; - - if (!pGetVolumePathNamesForVolumeNameA || !pGetVolumeNameForVolumeMountPointA) - { - win_skip("required functions not found\n"); - return; - } - - ret = pGetVolumeNameForVolumeMountPointA( "c:\\", volume, sizeof(volume) ); - ok(ret, "failed to get volume name %u\n", GetLastError()); - trace("c:\\ -> %s\n", volume); - - SetLastError( 0xdeadbeef ); - ret = pGetVolumePathNamesForVolumeNameA( NULL, NULL, 0, NULL ); - error = GetLastError(); - ok(!ret, "expected failure\n"); - ok(error == ERROR_INVALID_NAME, "expected ERROR_INVALID_NAME got %u\n", error); - - SetLastError( 0xdeadbeef ); - ret = pGetVolumePathNamesForVolumeNameA( "", NULL, 0, NULL ); - error = GetLastError(); - ok(!ret, "expected failure\n"); - ok(error == ERROR_INVALID_NAME, "expected ERROR_INVALID_NAME got %u\n", error); - - SetLastError( 0xdeadbeef ); - ret = pGetVolumePathNamesForVolumeNameA( volume, NULL, 0, NULL ); - error = GetLastError(); - ok(!ret, "expected failure\n"); - ok(error == ERROR_MORE_DATA, "expected ERROR_MORE_DATA got %u\n", error); - - SetLastError( 0xdeadbeef ); - ret = pGetVolumePathNamesForVolumeNameA( volume, buffer, 0, NULL ); - error = GetLastError(); - ok(!ret, "expected failure\n"); - ok(error == ERROR_MORE_DATA, "expected ERROR_MORE_DATA got %u\n", error); - - memset( buffer, 0xff, sizeof(buffer) ); - ret = pGetVolumePathNamesForVolumeNameA( volume, buffer, sizeof(buffer), NULL ); - ok(ret, "failed to get path names %u\n", GetLastError()); - ok(!strcmp( "C:\\", buffer ), "expected \"\\C:\" got \"%s\"\n", buffer); - ok(!buffer[4], "expected double null-terminated buffer\n"); - - len = 0; - SetLastError( 0xdeadbeef ); - ret = pGetVolumePathNamesForVolumeNameA( NULL, NULL, 0, &len ); - error = GetLastError(); - ok(!ret, "expected failure\n"); - ok(error == ERROR_INVALID_NAME, "expected ERROR_INVALID_NAME got %u\n", error); - - len = 0; - SetLastError( 0xdeadbeef ); - ret = pGetVolumePathNamesForVolumeNameA( NULL, NULL, sizeof(buffer), &len ); - error = GetLastError(); - ok(!ret, "expected failure\n"); - ok(error == ERROR_INVALID_NAME, "expected ERROR_INVALID_NAME got %u\n", error); - - len = 0; - SetLastError( 0xdeadbeef ); - ret = pGetVolumePathNamesForVolumeNameA( NULL, buffer, sizeof(buffer), &len ); - error = GetLastError(); - ok(!ret, "expected failure\n"); - ok(error == ERROR_INVALID_NAME, "expected ERROR_INVALID_NAME got %u\n", error); - - len = 0; - SetLastError( 0xdeadbeef ); - ret = pGetVolumePathNamesForVolumeNameA( NULL, buffer, sizeof(buffer), &len ); - error = GetLastError(); - ok(!ret, "expected failure\n"); - ok(error == ERROR_INVALID_NAME, "expected ERROR_INVALID_NAME got %u\n", error); - - len = 0; - memset( buffer, 0xff, sizeof(buffer) ); - ret = pGetVolumePathNamesForVolumeNameA( volume, buffer, sizeof(buffer), &len ); - ok(ret, "failed to get path names %u\n", GetLastError()); - ok(len == 5 || broken(len == 2), "expected 5 got %u\n", len); - ok(!strcmp( "C:\\", buffer ), "expected \"\\C:\" got \"%s\"\n", buffer); - ok(!buffer[4], "expected double null-terminated buffer\n"); -} - -static void test_GetVolumePathNamesForVolumeNameW(void) -{ - static const WCHAR empty[] = {0}; - static const WCHAR drive_c[] = {'c',':','\\',0}; - static const WCHAR volume_null[] = {'\\','\\','?','\\','V','o','l','u','m','e', - '{','0','0','0','0','0','0','0','0','-','0','0','0','0','-','0','0','0','0', - '-','0','0','0','0','-','0','0','0','0','0','0','0','0','0','0','0','0','}','\\',0}; - BOOL ret; - WCHAR volume[MAX_PATH], buffer[MAX_PATH]; - DWORD len, error; - - if (!pGetVolumePathNamesForVolumeNameW || !pGetVolumeNameForVolumeMountPointW) - { - win_skip("required functions not found\n"); - return; - } - - ret = pGetVolumeNameForVolumeMountPointW( drive_c, volume, sizeof(volume)/sizeof(volume[0]) ); - ok(ret, "failed to get volume name %u\n", GetLastError()); - - SetLastError( 0xdeadbeef ); - ret = pGetVolumePathNamesForVolumeNameW( empty, NULL, 0, NULL ); - error = GetLastError(); - ok(!ret, "expected failure\n"); - ok(error == ERROR_INVALID_NAME, "expected ERROR_INVALID_NAME got %u\n", error); - - SetLastError( 0xdeadbeef ); - ret = pGetVolumePathNamesForVolumeNameW( volume, NULL, 0, NULL ); - error = GetLastError(); - ok(!ret, "expected failure\n"); - ok(error == ERROR_MORE_DATA, "expected ERROR_MORE_DATA got %u\n", error); - - SetLastError( 0xdeadbeef ); - ret = pGetVolumePathNamesForVolumeNameW( volume, buffer, 0, NULL ); - error = GetLastError(); - ok(!ret, "expected failure\n"); - ok(error == ERROR_MORE_DATA, "expected ERROR_MORE_DATA got %u\n", error); - - if (0) { /* crash */ - ret = pGetVolumePathNamesForVolumeNameW( volume, NULL, sizeof(buffer), NULL ); - ok(ret, "failed to get path names %u\n", GetLastError()); - } - - ret = pGetVolumePathNamesForVolumeNameW( volume, buffer, sizeof(buffer), NULL ); - ok(ret, "failed to get path names %u\n", GetLastError()); - - len = 0; - memset( buffer, 0xff, sizeof(buffer) ); - ret = pGetVolumePathNamesForVolumeNameW( volume, buffer, sizeof(buffer), &len ); - ok(ret, "failed to get path names %u\n", GetLastError()); - ok(len == 5, "expected 5 got %u\n", len); - ok(!buffer[4], "expected double null-terminated buffer\n"); - - len = 0; - volume[1] = '?'; - volume[lstrlenW( volume ) - 1] = 0; - SetLastError( 0xdeadbeef ); - ret = pGetVolumePathNamesForVolumeNameW( volume, buffer, sizeof(buffer), &len ); - error = GetLastError(); - ok(!ret, "expected failure\n"); - ok(error == ERROR_INVALID_NAME, "expected ERROR_INVALID_NAME got %u\n", error); - - len = 0; - volume[0] = '\\'; - volume[1] = 0; - SetLastError( 0xdeadbeef ); - ret = pGetVolumePathNamesForVolumeNameW( volume, buffer, sizeof(buffer), &len ); - error = GetLastError(); - ok(!ret, "expected failure\n"); - todo_wine ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %u\n", error); - - len = 0; - lstrcpyW( volume, volume_null ); - SetLastError( 0xdeadbeef ); - ret = pGetVolumePathNamesForVolumeNameW( volume, buffer, sizeof(buffer), &len ); - error = GetLastError(); - ok(!ret, "expected failure\n"); - ok(error == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND got %u\n", error); -} - -START_TEST(volume) -{ - hdll = GetModuleHandleA("kernel32.dll"); - pGetVolumeNameForVolumeMountPointA = (void *) GetProcAddress(hdll, "GetVolumeNameForVolumeMountPointA"); - pGetVolumeNameForVolumeMountPointW = (void *) GetProcAddress(hdll, "GetVolumeNameForVolumeMountPointW"); - pFindFirstVolumeA = (void *) GetProcAddress(hdll, "FindFirstVolumeA"); - pFindNextVolumeA = (void *) GetProcAddress(hdll, "FindNextVolumeA"); - pFindVolumeClose = (void *) GetProcAddress(hdll, "FindVolumeClose"); - pGetLogicalDriveStringsA = (void *) GetProcAddress(hdll, "GetLogicalDriveStringsA"); - pGetLogicalDriveStringsW = (void *) GetProcAddress(hdll, "GetLogicalDriveStringsW"); - pGetVolumeInformationA = (void *) GetProcAddress(hdll, "GetVolumeInformationA"); - pGetVolumePathNamesForVolumeNameA = (void *) GetProcAddress(hdll, "GetVolumePathNamesForVolumeNameA"); - pGetVolumePathNamesForVolumeNameW = (void *) GetProcAddress(hdll, "GetVolumePathNamesForVolumeNameW"); - - test_query_dos_deviceA(); - test_define_dos_deviceA(); - test_FindFirstVolume(); - test_GetVolumeNameForVolumeMountPointA(); - test_GetVolumeNameForVolumeMountPointW(); - test_GetLogicalDriveStringsA(); - test_GetLogicalDriveStringsW(); - test_GetVolumeInformationA(); - test_enum_vols(); - test_disk_extents(); - test_GetVolumePathNamesForVolumeNameA(); - test_GetVolumePathNamesForVolumeNameW(); -} diff --git a/rostests/winetests/localspl/CMakeLists.txt b/rostests/winetests/localspl/CMakeLists.txt deleted file mode 100644 index b7a6d62c927..00000000000 --- a/rostests/winetests/localspl/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -add_executable(localspl_winetest localmon.c testlist.c) -target_link_libraries(localspl_winetest wine) -set_module_type(localspl_winetest win32cui) -add_importlibs(localspl_winetest advapi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET localspl_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/localspl/localmon.c b/rostests/winetests/localspl/localmon.c deleted file mode 100644 index 413a95ab6a1..00000000000 --- a/rostests/winetests/localspl/localmon.c +++ /dev/null @@ -1,1456 +0,0 @@ -/* - * Unit test suite for localspl API functions: local print monitor - * - * Copyright 2006-2007 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 - -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "wingdi.h" -#include "winreg.h" - -#include "winspool.h" -#include "ddk/winsplp.h" - -#include "wine/test.h" - - -/* ##### */ - -static HMODULE hdll; -static HMODULE hlocalmon; -static LPMONITOREX (WINAPI *pInitializePrintMonitor)(LPWSTR); - -static LPMONITOREX pm; -static BOOL (WINAPI *pEnumPorts)(LPWSTR, DWORD, LPBYTE, DWORD, LPDWORD, LPDWORD); -static BOOL (WINAPI *pOpenPort)(LPWSTR, PHANDLE); -static BOOL (WINAPI *pOpenPortEx)(LPWSTR, LPWSTR, PHANDLE, struct _MONITOR *); -static BOOL (WINAPI *pStartDocPort)(HANDLE, LPWSTR, DWORD, DWORD, LPBYTE); -static BOOL (WINAPI *pWritePort)(HANDLE hPort, LPBYTE, DWORD, LPDWORD); -static BOOL (WINAPI *pReadPort)(HANDLE hPort, LPBYTE, DWORD, LPDWORD); -static BOOL (WINAPI *pEndDocPort)(HANDLE); -static BOOL (WINAPI *pClosePort)(HANDLE); -static BOOL (WINAPI *pAddPort)(LPWSTR, HWND, LPWSTR); -static BOOL (WINAPI *pAddPortEx)(LPWSTR, DWORD, LPBYTE, LPWSTR); -static BOOL (WINAPI *pConfigurePort)(LPWSTR, HWND, LPWSTR); -static BOOL (WINAPI *pDeletePort)(LPWSTR, HWND, LPWSTR); -static BOOL (WINAPI *pGetPrinterDataFromPort)(HANDLE, DWORD, LPWSTR, LPWSTR, DWORD, LPWSTR, DWORD, LPDWORD); -static BOOL (WINAPI *pSetPortTimeOuts)(HANDLE, LPCOMMTIMEOUTS, DWORD); -static BOOL (WINAPI *pXcvOpenPort)(LPCWSTR, ACCESS_MASK, PHANDLE phXcv); -static DWORD (WINAPI *pXcvDataPort)(HANDLE, LPCWSTR, PBYTE, DWORD, PBYTE, DWORD, PDWORD); -static BOOL (WINAPI *pXcvClosePort)(HANDLE); - -static HANDLE hXcv; -static HANDLE hXcv_noaccess; - -/* ########################### */ - -static const WCHAR cmd_AddPortW[] = {'A','d','d','P','o','r','t',0}; -static const WCHAR cmd_ConfigureLPTPortCommandOKW[] = {'C','o','n','f','i','g','u','r','e', - 'L','P','T','P','o','r','t', - 'C','o','m','m','a','n','d','O','K',0}; -static WCHAR cmd_DeletePortW[] = {'D','e','l','e','t','e','P','o','r','t',0}; -static WCHAR cmd_GetTransmissionRetryTimeoutW[] = {'G','e','t', - 'T','r','a','n','s','m','i','s','s','i','o','n', - 'R','e','t','r','y','T','i','m','e','o','u','t',0}; - -static WCHAR cmd_MonitorUIW[] = {'M','o','n','i','t','o','r','U','I',0}; -static WCHAR cmd_MonitorUI_lcaseW[] = {'m','o','n','i','t','o','r','u','i',0}; -static WCHAR cmd_PortIsValidW[] = {'P','o','r','t','I','s','V','a','l','i','d',0}; -static WCHAR does_not_existW[] = {'d','o','e','s','_','n','o','t','_','e','x','i','s','t',0}; -static CHAR emptyA[] = ""; -static WCHAR emptyW[] = {0}; -static WCHAR LocalPortW[] = {'L','o','c','a','l',' ','P','o','r','t',0}; -static WCHAR Monitors_LocalPortW[] = { - 'S','y','s','t','e','m','\\', - 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', - 'C','o','n','t','r','o','l','\\', - 'P','r','i','n','t','\\', - 'M','o','n','i','t','o','r','s','\\', - 'L','o','c','a','l',' ','P','o','r','t',0}; - -static CHAR num_0A[] = "0"; -static WCHAR num_0W[] = {'0',0}; -static CHAR num_1A[] = "1"; -static WCHAR num_1W[] = {'1',0}; -static CHAR num_999999A[] = "999999"; -static WCHAR num_999999W[] = {'9','9','9','9','9','9',0}; -static CHAR num_1000000A[] = "1000000"; -static WCHAR num_1000000W[] = {'1','0','0','0','0','0','0',0}; - -static WCHAR portname_comW[] = {'C','O','M',0}; -static WCHAR portname_com1W[] = {'C','O','M','1',':',0}; -static WCHAR portname_com2W[] = {'C','O','M','2',':',0}; -static WCHAR portname_fileW[] = {'F','I','L','E',':',0}; -static WCHAR portname_lptW[] = {'L','P','T',0}; -static WCHAR portname_lpt1W[] = {'L','P','T','1',':',0}; -static WCHAR portname_lpt2W[] = {'L','P','T','2',':',0}; -static WCHAR server_does_not_existW[] = {'\\','\\','d','o','e','s','_','n','o','t','_','e','x','i','s','t',0}; - -static CHAR TransmissionRetryTimeoutA[] = {'T','r','a','n','s','m','i','s','s','i','o','n', - 'R','e','t','r','y','T','i','m','e','o','u','t',0}; - -static CHAR WinNT_CV_WindowsA[] = {'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','\\', - 'W','i','n','d','o','w','s',0}; -static WCHAR wineW[] = {'W','i','n','e',0}; - -static WCHAR tempdirW[MAX_PATH]; -static WCHAR tempfileW[MAX_PATH]; - -#define PORTNAME_PREFIX 3 -#define PORTNAME_MINSIZE 5 -#define PORTNAME_MAXSIZE 10 -static WCHAR have_com[PORTNAME_MAXSIZE]; -static WCHAR have_lpt[PORTNAME_MAXSIZE]; -static WCHAR have_file[PORTNAME_MAXSIZE]; - -/* ########################### */ - -static DWORD delete_port(LPWSTR portname) -{ - DWORD res; - - if (pDeletePort) { - res = pDeletePort(NULL, 0, portname); - } - else - { - res = pXcvDataPort(hXcv, cmd_DeletePortW, (PBYTE) portname, (lstrlenW(portname) + 1) * sizeof(WCHAR), NULL, 0, NULL); - } - return res; -} - -/* ########################### */ - -static void find_installed_ports(void) -{ - PORT_INFO_1W * pi = NULL; - WCHAR nameW[PORTNAME_MAXSIZE]; - DWORD needed; - DWORD returned; - DWORD res; - DWORD id; - - have_com[0] = '\0'; - have_lpt[0] = '\0'; - have_file[0] = '\0'; - - if (!pEnumPorts) return; - - res = pEnumPorts(NULL, 1, NULL, 0, &needed, &returned); - if (!res && (GetLastError() == ERROR_INSUFFICIENT_BUFFER)) { - pi = HeapAlloc(GetProcessHeap(), 0, needed); - } - res = pEnumPorts(NULL, 1, (LPBYTE) pi, needed, &needed, &returned); - - if (!res) { - skip("no ports found\n"); - HeapFree(GetProcessHeap(), 0, pi); - return; - } - - id = 0; - while (id < returned) { - res = lstrlenW(pi[id].pName); - if ((res >= PORTNAME_MINSIZE) && (res < PORTNAME_MAXSIZE) && - (pi[id].pName[res-1] == ':')) { - /* copy only the prefix ("LPT" or "COM") */ - memcpy(&nameW, pi[id].pName, PORTNAME_PREFIX * sizeof(WCHAR)); - nameW[PORTNAME_PREFIX] = '\0'; - - if (!have_com[0] && (lstrcmpiW(nameW, portname_comW) == 0)) { - memcpy(&have_com, pi[id].pName, (res+1) * sizeof(WCHAR)); - } - - if (!have_lpt[0] && (lstrcmpiW(nameW, portname_lptW) == 0)) { - memcpy(&have_lpt, pi[id].pName, (res+1) * sizeof(WCHAR)); - } - - if (!have_file[0] && (lstrcmpiW(pi[id].pName, portname_fileW) == 0)) { - memcpy(&have_file, pi[id].pName, (res+1) * sizeof(WCHAR)); - } - } - id++; - } - - HeapFree(GetProcessHeap(), 0, pi); -} - -/* ########################### */ - -static void test_AddPort(void) -{ - DWORD res; - - /* moved to localui.dll since w2k */ - if (!pAddPort) return; - - if (0) - { - /* NT4 crash on this test */ - res = pAddPort(NULL, 0, NULL); - } - - /* Testing-Results (localmon.dll from NT4.0): - - The Servername is ignored - - Case of MonitorName is ignored - */ - - SetLastError(0xdeadbeef); - res = pAddPort(NULL, 0, emptyW); - ok(!res, "returned %d with %u (expected '0')\n", res, GetLastError()); - - SetLastError(0xdeadbeef); - res = pAddPort(NULL, 0, does_not_existW); - ok(!res, "returned %d with %u (expected '0')\n", res, GetLastError()); - -} - -/* ########################### */ - -static void test_AddPortEx(void) -{ - PORT_INFO_2W pi; - DWORD res; - - if (!pAddPortEx) { - skip("AddPortEx\n"); - return; - } - if ((!pDeletePort) && (!hXcv)) { - skip("No API to delete a Port\n"); - return; - } - - /* start test with clean ports */ - delete_port(tempfileW); - - pi.pPortName = tempfileW; - if (0) { - /* tests crash with native localspl.dll in w2k, - but works with native localspl.dll in wine */ - SetLastError(0xdeadbeef); - res = pAddPortEx(NULL, 1, (LPBYTE) &pi, LocalPortW); - trace("returned %u with %u\n", res, GetLastError() ); - ok( res, "got %u with %u (expected '!= 0')\n", res, GetLastError()); - - /* port already exists: */ - SetLastError(0xdeadbeef); - res = pAddPortEx(NULL, 1, (LPBYTE) &pi, LocalPortW); - trace("returned %u with %u\n", res, GetLastError() ); - ok( !res && (GetLastError() == ERROR_INVALID_PARAMETER), - "got %u with %u (expected '0' with ERROR_INVALID_PARAMETER)\n", - res, GetLastError()); - delete_port(tempfileW); - - - /* NULL for pMonitorName is documented for Printmonitors, but - localspl.dll fails always with ERROR_INVALID_PARAMETER */ - SetLastError(0xdeadbeef); - res = pAddPortEx(NULL, 1, (LPBYTE) &pi, NULL); - trace("returned %u with %u\n", res, GetLastError() ); - ok( !res && (GetLastError() == ERROR_INVALID_PARAMETER), - "got %u with %u (expected '0' with ERROR_INVALID_PARAMETER)\n", - res, GetLastError()); - if (res) delete_port(tempfileW); - - - SetLastError(0xdeadbeef); - res = pAddPortEx(NULL, 1, (LPBYTE) &pi, emptyW); - trace("returned %u with %u\n", res, GetLastError() ); - ok( !res && (GetLastError() == ERROR_INVALID_PARAMETER), - "got %u with %u (expected '0' with ERROR_INVALID_PARAMETER)\n", - res, GetLastError()); - if (res) delete_port(tempfileW); - - - SetLastError(0xdeadbeef); - res = pAddPortEx(NULL, 1, (LPBYTE) &pi, does_not_existW); - trace("returned %u with %u\n", res, GetLastError() ); - ok( !res && (GetLastError() == ERROR_INVALID_PARAMETER), - "got %u with %u (expected '0' with ERROR_INVALID_PARAMETER)\n", - res, GetLastError()); - if (res) delete_port(tempfileW); - } - - pi.pPortName = NULL; - SetLastError(0xdeadbeef); - res = pAddPortEx(NULL, 1, (LPBYTE) &pi, LocalPortW); - ok( !res && (GetLastError() == ERROR_INVALID_PARAMETER), - "got %u with %u (expected '0' with ERROR_INVALID_PARAMETER)\n", - res, GetLastError()); - - /* level 2 is documented as supported for Printmonitors, - but localspl.dll fails always with ERROR_INVALID_LEVEL */ - - pi.pPortName = tempfileW; - pi.pMonitorName = LocalPortW; - pi.pDescription = wineW; - pi.fPortType = PORT_TYPE_WRITE; - - SetLastError(0xdeadbeef); - res = pAddPortEx(NULL, 2, (LPBYTE) &pi, LocalPortW); - ok( !res && (GetLastError() == ERROR_INVALID_LEVEL), - "got %u with %u (expected '0' with ERROR_INVALID_LEVEL)\n", - res, GetLastError()); - if (res) delete_port(tempfileW); - - - /* invalid levels */ - SetLastError(0xdeadbeef); - res = pAddPortEx(NULL, 0, (LPBYTE) &pi, LocalPortW); - ok( !res && (GetLastError() == ERROR_INVALID_LEVEL), - "got %u with %u (expected '0' with ERROR_INVALID_LEVEL)\n", - res, GetLastError()); - if (res) delete_port(tempfileW); - - - SetLastError(0xdeadbeef); - res = pAddPortEx(NULL, 3, (LPBYTE) &pi, LocalPortW); - ok( !res && (GetLastError() == ERROR_INVALID_LEVEL), - "got %u with %u (expected '0' with ERROR_INVALID_LEVEL)\n", - res, GetLastError()); - if (res) delete_port(tempfileW); - - /* cleanup */ - delete_port(tempfileW); -} - -/* ########################### */ - -static void test_ClosePort(void) -{ - HANDLE hPort; - HANDLE hPort2; - LPWSTR nameW = NULL; - DWORD res; - DWORD res2; - - - if (!pOpenPort || !pClosePort) return; - - if (have_com[0]) { - nameW = have_com; - - hPort = (HANDLE) 0xdeadbeef; - res = pOpenPort(nameW, &hPort); - hPort2 = (HANDLE) 0xdeadbeef; - res2 = pOpenPort(nameW, &hPort2); - - if (res2 && (hPort2 != hPort)) { - SetLastError(0xdeadbeef); - res2 = pClosePort(hPort2); - ok(res2, "got %u with %u (expected '!= 0')\n", res2, GetLastError()); - } - - if (res) { - SetLastError(0xdeadbeef); - res = pClosePort(hPort); - ok(res, "got %u with %u (expected '!= 0')\n", res, GetLastError()); - } - } - - - if (have_lpt[0]) { - nameW = have_lpt; - - hPort = (HANDLE) 0xdeadbeef; - res = pOpenPort(nameW, &hPort); - hPort2 = (HANDLE) 0xdeadbeef; - res2 = pOpenPort(nameW, &hPort2); - - if (res2 && (hPort2 != hPort)) { - SetLastError(0xdeadbeef); - res2 = pClosePort(hPort2); - ok(res2, "got %u with %u (expected '!= 0')\n", res2, GetLastError()); - } - - if (res) { - SetLastError(0xdeadbeef); - res = pClosePort(hPort); - ok(res, "got %u with %u (expected '!= 0')\n", res, GetLastError()); - } - } - - - if (have_file[0]) { - nameW = have_file; - - hPort = (HANDLE) 0xdeadbeef; - res = pOpenPort(nameW, &hPort); - hPort2 = (HANDLE) 0xdeadbeef; - res2 = pOpenPort(nameW, &hPort2); - - if (res2 && (hPort2 != hPort)) { - SetLastError(0xdeadbeef); - res2 = pClosePort(hPort2); - ok(res2, "got %u with %u (expected '!= 0')\n", res2, GetLastError()); - } - - if (res) { - SetLastError(0xdeadbeef); - res = pClosePort(hPort); - ok(res, "got %u with %u (expected '!= 0')\n", res, GetLastError()); - } - - } - - if (0) { - /* an invalid HANDLE crash native localspl.dll */ - - SetLastError(0xdeadbeef); - res = pClosePort(NULL); - trace("got %u with %u\n", res, GetLastError()); - - SetLastError(0xdeadbeef); - res = pClosePort( (HANDLE) 0xdeadbeef); - trace("got %u with %u\n", res, GetLastError()); - - SetLastError(0xdeadbeef); - res = pClosePort(INVALID_HANDLE_VALUE); - trace("got %u with %u\n", res, GetLastError()); - } - -} - -/* ########################### */ - -static void test_ConfigurePort(void) -{ - DWORD res; - - /* moved to localui.dll since w2k */ - if (!pConfigurePort) return; - - if (0) - { - /* NT4 crash on this test */ - res = pConfigurePort(NULL, 0, NULL); - } - - /* Testing-Results (localmon.dll from NT4.0): - - Case of Portname is ignored - - "COM1:" and "COM01:" are the same (Compared by value) - - Portname without ":" => Dialog "Nothing to configure" comes up; Success - - "LPT1:", "LPT0:" and "LPT:" are the same (Numbers in "LPT:" are ignored) - - Empty Servername (LPT1:) => Dialog comes up (Servername is ignored) - - "FILE:" => Dialog "Nothing to configure" comes up; Success - - Empty Portname => => Dialog "Nothing to configure" comes up; Success - - Port "does_not_exist" => Dialog "Nothing to configure" comes up; Success - */ - if (winetest_interactive > 0) { - - SetLastError(0xdeadbeef); - res = pConfigurePort(NULL, 0, portname_com1W); - trace("returned %d with %u\n", res, GetLastError()); - - SetLastError(0xdeadbeef); - res = pConfigurePort(NULL, 0, portname_lpt1W); - trace("returned %d with %u\n", res, GetLastError()); - - SetLastError(0xdeadbeef); - res = pConfigurePort(NULL, 0, portname_fileW); - trace("returned %d with %u\n", res, GetLastError()); - } -} - -/* ########################### */ - -static void test_DeletePort(void) -{ - DWORD res; - - /* moved to localui.dll since w2k */ - if (!pDeletePort) return; - - if (0) - { - /* NT4 crash on this test */ - res = pDeletePort(NULL, 0, NULL); - } - - /* Testing-Results (localmon.dll from NT4.0): - - Case of Portname is ignored (returned '1' on Success) - - "COM1:" and "COM01:" are different (Compared as string) - - server_does_not_exist (LPT1:) => Port deleted, Success (Servername is ignored) - - Empty Portname => => FALSE (LastError not changed) - - Port "does_not_exist" => FALSE (LastError not changed) - */ - - SetLastError(0xdeadbeef); - res = pDeletePort(NULL, 0, emptyW); - ok(!res, "returned %d with %u (expected '0')\n", res, GetLastError()); - - SetLastError(0xdeadbeef); - res = pDeletePort(NULL, 0, does_not_existW); - ok(!res, "returned %d with %u (expected '0')\n", res, GetLastError()); - -} - -/* ########################### */ - -static void test_EnumPorts(void) -{ - DWORD res; - DWORD level; - LPBYTE buffer; - DWORD cbBuf; - DWORD pcbNeeded; - DWORD pcReturned; - - if (!pEnumPorts) return; - - /* valid levels are 1 and 2 */ - for(level = 0; level < 4; level++) { - - cbBuf = 0xdeadbeef; - pcReturned = 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pEnumPorts(NULL, level, NULL, 0, &cbBuf, &pcReturned); - - /* use only a short test, when we test with an invalid level */ - if(!level || (level > 2)) { - /* NT4 fails with ERROR_INVALID_LEVEL (as expected) - XP succeeds with ERROR_SUCCESS () */ - ok( (cbBuf == 0) && (pcReturned == 0), - "(%d) returned %d with %u and %d, %d (expected 0, 0)\n", - level, res, GetLastError(), cbBuf, pcReturned); - continue; - } - - ok( !res && (GetLastError() == ERROR_INSUFFICIENT_BUFFER), - "(%d) returned %d with %u and %d, %d (expected '0' with " - "ERROR_INSUFFICIENT_BUFFER)\n", - level, res, GetLastError(), cbBuf, pcReturned); - - buffer = HeapAlloc(GetProcessHeap(), 0, cbBuf * 2); - if (buffer == NULL) continue; - - pcbNeeded = 0xdeadbeef; - pcReturned = 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pEnumPorts(NULL, level, buffer, cbBuf, &pcbNeeded, &pcReturned); - ok( res, "(%d) returned %d with %u and %d, %d (expected '!= 0')\n", - level, res, GetLastError(), pcbNeeded, pcReturned); - /* We can compare the returned Data with the Registry / "win.ini",[Ports] here */ - - pcbNeeded = 0xdeadbeef; - pcReturned = 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pEnumPorts(NULL, level, buffer, cbBuf+1, &pcbNeeded, &pcReturned); - ok( res, "(%d) returned %d with %u and %d, %d (expected '!= 0')\n", - level, res, GetLastError(), pcbNeeded, pcReturned); - - pcbNeeded = 0xdeadbeef; - pcReturned = 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pEnumPorts(NULL, level, buffer, cbBuf-1, &pcbNeeded, &pcReturned); - ok( !res && (GetLastError() == ERROR_INSUFFICIENT_BUFFER), - "(%d) returned %d with %u and %d, %d (expected '0' with " - "ERROR_INSUFFICIENT_BUFFER)\n", - level, res, GetLastError(), pcbNeeded, pcReturned); - - if (0) - { - /* The following tests crash this app with native localmon/localspl */ - res = pEnumPorts(NULL, level, NULL, cbBuf, &pcbNeeded, &pcReturned); - res = pEnumPorts(NULL, level, buffer, cbBuf, NULL, &pcReturned); - res = pEnumPorts(NULL, level, buffer, cbBuf, &pcbNeeded, NULL); - } - - /* The Servername is ignored */ - pcbNeeded = 0xdeadbeef; - pcReturned = 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pEnumPorts(emptyW, level, buffer, cbBuf+1, &pcbNeeded, &pcReturned); - ok( res, "(%d) returned %d with %u and %d, %d (expected '!= 0')\n", - level, res, GetLastError(), pcbNeeded, pcReturned); - - pcbNeeded = 0xdeadbeef; - pcReturned = 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pEnumPorts(server_does_not_existW, level, buffer, cbBuf+1, &pcbNeeded, &pcReturned); - ok( res, "(%d) returned %d with %u and %d, %d (expected '!= 0')\n", - level, res, GetLastError(), pcbNeeded, pcReturned); - - HeapFree(GetProcessHeap(), 0, buffer); - } -} - -/* ########################### */ - - -static void test_InitializePrintMonitor(void) -{ - LPMONITOREX res; - - SetLastError(0xdeadbeef); - res = pInitializePrintMonitor(NULL); - /* The Parameter was unchecked before w2k */ - ok( res || (GetLastError() == ERROR_INVALID_PARAMETER), - "returned %p with %u\n (expected '!= NULL' or: NULL with " - "ERROR_INVALID_PARAMETER)\n", res, GetLastError()); - - SetLastError(0xdeadbeef); - res = pInitializePrintMonitor(emptyW); - ok( res || (GetLastError() == ERROR_INVALID_PARAMETER), - "returned %p with %u\n (expected '!= NULL' or: NULL with " - "ERROR_INVALID_PARAMETER)\n", res, GetLastError()); - - - /* Every call with a non-empty string returns the same Pointer */ - SetLastError(0xdeadbeef); - res = pInitializePrintMonitor(Monitors_LocalPortW); - ok( res == pm, - "returned %p with %u (expected %p)\n", res, GetLastError(), pm); -} - - -/* ########################### */ - -static void test_OpenPort(void) -{ - HANDLE hPort; - HANDLE hPort2; - LPWSTR nameW = NULL; - DWORD res; - DWORD res2; - - if (!pOpenPort || !pClosePort) return; - - if (have_com[0]) { - nameW = have_com; - - hPort = (HANDLE) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pOpenPort(nameW, &hPort); - ok( res, "got %u with %u and %p (expected '!= 0')\n", - res, GetLastError(), hPort); - - /* the same HANDLE is returned for a second OpenPort in native localspl */ - hPort2 = (HANDLE) 0xdeadbeef; - SetLastError(0xdeadbeef); - res2 = pOpenPort(nameW, &hPort2); - ok( res2, "got %u with %u and %p (expected '!= 0')\n", - res2, GetLastError(), hPort2); - - if (res) pClosePort(hPort); - if (res2 && (hPort2 != hPort)) pClosePort(hPort2); - } - - if (have_lpt[0]) { - nameW = have_lpt; - - hPort = (HANDLE) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pOpenPort(nameW, &hPort); - ok( res || (GetLastError() == ERROR_ACCESS_DENIED), - "got %u with %u and %p (expected '!= 0' or '0' with ERROR_ACCESS_DENIED)\n", - res, GetLastError(), hPort); - - /* the same HANDLE is returned for a second OpenPort in native localspl */ - hPort2 = (HANDLE) 0xdeadbeef; - SetLastError(0xdeadbeef); - res2 = pOpenPort(nameW, &hPort2); - ok( res2 || (GetLastError() == ERROR_ACCESS_DENIED), - "got %u with %u and %p (expected '!= 0' or '0' with ERROR_ACCESS_DENIED)\n", - res2, GetLastError(), hPort2); - - if (res) pClosePort(hPort); - if (res2 && (hPort2 != hPort)) pClosePort(hPort2); - } - - if (have_file[0]) { - nameW = have_file; - - hPort = (HANDLE) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pOpenPort(nameW, &hPort); - ok( res, "got %u with %u and %p (expected '!= 0')\n", - res, GetLastError(), hPort); - - /* a different HANDLE is returned for a second OpenPort */ - hPort2 = (HANDLE) 0xdeadbeef; - SetLastError(0xdeadbeef); - res2 = pOpenPort(nameW, &hPort2); - ok( res2 && (hPort2 != hPort), - "got %u with %u and %p (expected '!= 0' and '!= %p')\n", - res2, GetLastError(), hPort2, hPort); - - if (res) pClosePort(hPort); - if (res2 && (hPort2 != hPort)) pClosePort(hPort2); - } - - if (0) { - /* this test crash native localspl (w2k+xp) */ - if (nameW) { - hPort = (HANDLE) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pOpenPort(nameW, NULL); - trace("got %u with %u and %p\n", res, GetLastError(), hPort); - } - } - - hPort = (HANDLE) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pOpenPort(does_not_existW, &hPort); - ok (!res && (hPort == (HANDLE) 0xdeadbeef), - "got %u with 0x%x and %p (expected '0' and 0xdeadbeef)\n", res, GetLastError(), hPort); - if (res) pClosePort(hPort); - - hPort = (HANDLE) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pOpenPort(emptyW, &hPort); - ok (!res && (hPort == (HANDLE) 0xdeadbeef), - "got %u with 0x%x and %p (expected '0' and 0xdeadbeef)\n", res, GetLastError(), hPort); - if (res) pClosePort(hPort); - - - /* NULL as name crash native localspl (w2k+xp) */ - if (0) { - hPort = (HANDLE) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pOpenPort(NULL, &hPort); - trace("got %u with %u and %p\n", res, GetLastError(), hPort); - } - -} - -/* ########################### */ - -static void test_XcvClosePort(void) -{ - DWORD res; - HANDLE hXcv2; - - - if (0) - { - /* crash with native localspl.dll (w2k+xp) */ - res = pXcvClosePort(NULL); - res = pXcvClosePort(INVALID_HANDLE_VALUE); - } - - - SetLastError(0xdeadbeef); - hXcv2 = (HANDLE) 0xdeadbeef; - res = pXcvOpenPort(emptyW, SERVER_ACCESS_ADMINISTER, &hXcv2); - ok(res, "returned %d with %u and %p (expected '!= 0')\n", res, GetLastError(), hXcv2); - - if (res) { - SetLastError(0xdeadbeef); - res = pXcvClosePort(hXcv2); - ok( res, "returned %d with %u (expected '!= 0')\n", res, GetLastError()); - - if (0) - { - /* test for "Double Free": crash with native localspl.dll (w2k+xp) */ - res = pXcvClosePort(hXcv2); - } - } -} - -/* ########################### */ - -static void test_XcvDataPort_AddPort(void) -{ - DWORD res; - - /* - * The following tests crash with native localspl.dll on w2k and xp, - * but it works, when the native dll (w2k and xp) is used in wine. - * also tested (same crash): replacing emptyW with portname_lpt1W - * and replacing "NULL, 0, NULL" with "buffer, MAX_PATH, &needed" - * - * We need to use a different API (AddPortEx) instead - */ - if (0) - { - /* create a Port for a normal, writable file */ - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_AddPortW, (PBYTE) tempfileW, (lstrlenW(tempfileW) + 1) * sizeof(WCHAR), NULL, 0, NULL); - ok( res == ERROR_SUCCESS, "returned %d with %u (expected ERROR_SUCCESS)\n", res, GetLastError()); - - /* add our testport again */ - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_AddPortW, (PBYTE) tempfileW, (lstrlenW(tempfileW) + 1) * sizeof(WCHAR), NULL, 0, NULL); - ok( res == ERROR_ALREADY_EXISTS, "returned %d with %u (expected ERROR_ALREADY_EXISTS)\n", res, GetLastError()); - - /* create a well-known Port */ - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_AddPortW, (PBYTE) portname_lpt1W, (lstrlenW(portname_lpt1W) + 1) * sizeof(WCHAR), NULL, 0, NULL); - ok( res == ERROR_ALREADY_EXISTS, "returned %d with %u (expected ERROR_ALREADY_EXISTS)\n", res, GetLastError()); - - /* ERROR_ALREADY_EXISTS is also returned from native localspl.dll on wine, - when "RPT1:" was already installed for redmonnt.dll: - res = pXcvDataPort(hXcv, cmd_AddPortW, (PBYTE) portname_rpt1W, ... - */ - - /* cleanup */ - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_DeletePortW, (PBYTE) tempfileW, (lstrlenW(tempfileW) + 1) * sizeof(WCHAR), NULL, 0, NULL); - ok( res == ERROR_SUCCESS, "returned %d with %u (expected ERROR_SUCCESS)\n", res, GetLastError()); - } - -} - -/* ########################### */ - -static void test_XcvDataPort_ConfigureLPTPortCommandOK(void) -{ - CHAR org_value[16]; - CHAR buffer[16]; - HKEY hroot = NULL; - DWORD res; - DWORD needed; - - - /* Read the original value from the registry */ - res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, WinNT_CV_WindowsA, 0, KEY_ALL_ACCESS, &hroot); - if (res == ERROR_ACCESS_DENIED) { - skip("ACCESS_DENIED\n"); - return; - } - - if (res != ERROR_SUCCESS) { - /* unable to open the registry: skip the test */ - skip("got %d\n", res); - return; - } - org_value[0] = '\0'; - needed = sizeof(org_value)-1 ; - res = RegQueryValueExA(hroot, TransmissionRetryTimeoutA, NULL, NULL, (PBYTE) org_value, &needed); - ok( (res == ERROR_SUCCESS) || (res == ERROR_FILE_NOT_FOUND), - "returned %u and %u for \"%s\" (expected ERROR_SUCCESS or " - "ERROR_FILE_NOT_FOUND)\n", res, needed, org_value); - - RegDeleteValueA(hroot, TransmissionRetryTimeoutA); - - /* set to "0" */ - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_ConfigureLPTPortCommandOKW, (PBYTE) num_0W, sizeof(num_0W), NULL, 0, &needed); - if (res == ERROR_INVALID_PARAMETER) { - skip("'ConfigureLPTPortCommandOK' not supported\n"); - return; - } - ok( res == ERROR_SUCCESS, "returned %d with %u (expected ERROR_SUCCESS)\n", res, GetLastError()); - needed = sizeof(buffer)-1 ; - res = RegQueryValueExA(hroot, TransmissionRetryTimeoutA, NULL, NULL, (PBYTE) buffer, &needed); - ok( (res == ERROR_SUCCESS) && (lstrcmpA(buffer, num_0A) == 0), - "returned %d and '%s' (expected ERROR_SUCCESS and '%s')\n", - res, buffer, num_0A); - - - /* set to "1" */ - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_ConfigureLPTPortCommandOKW, (PBYTE) num_1W, sizeof(num_1W), NULL, 0, &needed); - ok( res == ERROR_SUCCESS, "returned %d with %u (expected ERROR_SUCCESS)\n", res, GetLastError()); - needed = sizeof(buffer)-1 ; - res = RegQueryValueExA(hroot, TransmissionRetryTimeoutA, NULL, NULL, (PBYTE) buffer, &needed); - ok( (res == ERROR_SUCCESS) && (lstrcmpA(buffer, num_1A) == 0), - "returned %d and '%s' (expected ERROR_SUCCESS and '%s')\n", - res, buffer, num_1A); - - /* set to "999999" */ - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_ConfigureLPTPortCommandOKW, (PBYTE) num_999999W, sizeof(num_999999W), NULL, 0, &needed); - ok( res == ERROR_SUCCESS, "returned %d with %u (expected ERROR_SUCCESS)\n", res, GetLastError()); - needed = sizeof(buffer)-1 ; - res = RegQueryValueExA(hroot, TransmissionRetryTimeoutA, NULL, NULL, (PBYTE) buffer, &needed); - ok( (res == ERROR_SUCCESS) && (lstrcmpA(buffer, num_999999A) == 0), - "returned %d and '%s' (expected ERROR_SUCCESS and '%s')\n", - res, buffer, num_999999A); - - /* set to "1000000" */ - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_ConfigureLPTPortCommandOKW, (PBYTE) num_1000000W, sizeof(num_1000000W), NULL, 0, &needed); - ok( res == ERROR_SUCCESS, "returned %d with %u (expected ERROR_SUCCESS)\n", res, GetLastError()); - needed = sizeof(buffer)-1 ; - res = RegQueryValueExA(hroot, TransmissionRetryTimeoutA, NULL, NULL, (PBYTE) buffer, &needed); - ok( (res == ERROR_SUCCESS) && (lstrcmpA(buffer, num_1000000A) == 0), - "returned %d and '%s' (expected ERROR_SUCCESS and '%s')\n", - res, buffer, num_1000000A); - - /* using cmd_ConfigureLPTPortCommandOKW with does_not_existW: - the string "does_not_exist" is written to the registry */ - - - /* restore the original value */ - RegDeleteValueA(hroot, TransmissionRetryTimeoutA); - if (org_value[0]) { - res = RegSetValueExA(hroot, TransmissionRetryTimeoutA, 0, REG_SZ, (PBYTE)org_value, lstrlenA(org_value)+1); - ok(res == ERROR_SUCCESS, "unable to restore original value (got %u): %s\n", res, org_value); - } - - RegCloseKey(hroot); - -} - -/* ########################### */ - -static void test_XcvDataPort_DeletePort(void) -{ - DWORD res; - DWORD needed; - - - /* cleanup: just to make sure */ - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_DeletePortW, (PBYTE) tempfileW, (lstrlenW(tempfileW) + 1) * sizeof(WCHAR), NULL, 0, &needed); - ok( !res || (res == ERROR_FILE_NOT_FOUND), - "returned %d with %u (expected ERROR_SUCCESS or ERROR_FILE_NOT_FOUND)\n", - res, GetLastError()); - - - /* ToDo: cmd_AddPortW for tempfileW, then cmd_DeletePortW for the existing Port */ - - - /* try to delete a nonexistent Port */ - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_DeletePortW, (PBYTE) tempfileW, (lstrlenW(tempfileW) + 1) * sizeof(WCHAR), NULL, 0, &needed); - ok( res == ERROR_FILE_NOT_FOUND, - "returned %d with %u (expected ERROR_FILE_NOT_FOUND)\n", res, GetLastError()); - - /* emptyW as Portname: ERROR_FILE_NOT_FOUND is returned */ - /* NULL as Portname: Native localspl.dll crashed */ - -} - -/* ########################### */ - -static void test_XcvDataPort_GetTransmissionRetryTimeout(void) -{ - CHAR org_value[16]; - HKEY hroot = NULL; - DWORD buffer[2]; - DWORD res; - DWORD needed; - DWORD len; - - - /* ask for needed size */ - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_GetTransmissionRetryTimeoutW, NULL, 0, NULL, 0, &needed); - if (res == ERROR_INVALID_PARAMETER) { - skip("'GetTransmissionRetryTimeout' not supported\n"); - return; - } - len = sizeof(DWORD); - ok( (res == ERROR_INSUFFICIENT_BUFFER) && (needed == len), - "returned %d with %u and %u (expected ERROR_INSUFFICIENT_BUFFER " - "and '%u')\n", res, GetLastError(), needed, len); - len = needed; - - /* Read the original value from the registry */ - res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, WinNT_CV_WindowsA, 0, KEY_ALL_ACCESS, &hroot); - if (res == ERROR_ACCESS_DENIED) { - skip("ACCESS_DENIED\n"); - return; - } - - if (res != ERROR_SUCCESS) { - /* unable to open the registry: skip the test */ - skip("got %d\n", res); - return; - } - - org_value[0] = '\0'; - needed = sizeof(org_value)-1 ; - res = RegQueryValueExA(hroot, TransmissionRetryTimeoutA, NULL, NULL, (PBYTE) org_value, &needed); - ok( (res == ERROR_SUCCESS) || (res == ERROR_FILE_NOT_FOUND), - "returned %u and %u for \"%s\" (expected ERROR_SUCCESS or " - "ERROR_FILE_NOT_FOUND)\n", res, needed, org_value); - - /* Get default value (documented as 90 in the w2k reskit, but that is wrong) */ - RegDeleteValueA(hroot, TransmissionRetryTimeoutA); - needed = (DWORD) 0xdeadbeef; - buffer[0] = 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_GetTransmissionRetryTimeoutW, NULL, 0, (PBYTE) buffer, len, &needed); - ok( (res == ERROR_SUCCESS) && (buffer[0] == 45), - "returned %d with %u and %u for %d\n (expected ERROR_SUCCESS " - "for '45')\n", res, GetLastError(), needed, buffer[0]); - - /* the default timeout is returned, when the value is empty */ - res = RegSetValueExA(hroot, TransmissionRetryTimeoutA, 0, REG_SZ, (PBYTE)emptyA, 1); - needed = (DWORD) 0xdeadbeef; - buffer[0] = 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_GetTransmissionRetryTimeoutW, NULL, 0, (PBYTE) buffer, len, &needed); - ok( (res == ERROR_SUCCESS) && (buffer[0] == 45), - "returned %d with %u and %u for %d\n (expected ERROR_SUCCESS " - "for '45')\n", res, GetLastError(), needed, buffer[0]); - - /* the dialog is limited (1 - 999999), but that is done somewhere else */ - res = RegSetValueExA(hroot, TransmissionRetryTimeoutA, 0, REG_SZ, (PBYTE)num_0A, lstrlenA(num_0A)+1); - needed = (DWORD) 0xdeadbeef; - buffer[0] = 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_GetTransmissionRetryTimeoutW, NULL, 0, (PBYTE) buffer, len, &needed); - ok( (res == ERROR_SUCCESS) && (buffer[0] == 0), - "returned %d with %u and %u for %d\n (expected ERROR_SUCCESS " - "for '0')\n", res, GetLastError(), needed, buffer[0]); - - - res = RegSetValueExA(hroot, TransmissionRetryTimeoutA, 0, REG_SZ, (PBYTE)num_1A, lstrlenA(num_1A)+1); - needed = (DWORD) 0xdeadbeef; - buffer[0] = 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_GetTransmissionRetryTimeoutW, NULL, 0, (PBYTE) buffer, len, &needed); - ok( (res == ERROR_SUCCESS) && (buffer[0] == 1), - "returned %d with %u and %u for %d\n (expected 'ERROR_SUCCESS' " - "for '1')\n", res, GetLastError(), needed, buffer[0]); - - res = RegSetValueExA(hroot, TransmissionRetryTimeoutA, 0, REG_SZ, (PBYTE)num_999999A, lstrlenA(num_999999A)+1); - needed = (DWORD) 0xdeadbeef; - buffer[0] = 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_GetTransmissionRetryTimeoutW, NULL, 0, (PBYTE) buffer, len, &needed); - ok( (res == ERROR_SUCCESS) && (buffer[0] == 999999), - "returned %d with %u and %u for %d\n (expected ERROR_SUCCESS " - "for '999999')\n", res, GetLastError(), needed, buffer[0]); - - - res = RegSetValueExA(hroot, TransmissionRetryTimeoutA, 0, REG_SZ, (PBYTE)num_1000000A, lstrlenA(num_1000000A)+1); - needed = (DWORD) 0xdeadbeef; - buffer[0] = 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_GetTransmissionRetryTimeoutW, NULL, 0, (PBYTE) buffer, len, &needed); - ok( (res == ERROR_SUCCESS) && (buffer[0] == 1000000), - "returned %d with %u and %u for %d\n (expected ERROR_SUCCESS " - "for '1000000')\n", res, GetLastError(), needed, buffer[0]); - - /* restore the original value */ - RegDeleteValueA(hroot, TransmissionRetryTimeoutA); - if (org_value[0]) { - res = RegSetValueExA(hroot, TransmissionRetryTimeoutA, 0, REG_SZ, (PBYTE)org_value, lstrlenA(org_value)+1); - ok(res == ERROR_SUCCESS, "unable to restore original value (got %u): %s\n", res, org_value); - } - - RegCloseKey(hroot); -} - -/* ########################### */ - -static void test_XcvDataPort_MonitorUI(void) -{ - DWORD res; - BYTE buffer[MAX_PATH + 2]; - DWORD needed; - DWORD len; - - - /* ask for needed size */ - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_MonitorUIW, NULL, 0, NULL, 0, &needed); - if (res == ERROR_INVALID_PARAMETER) { - skip("'MonitorUI' nor supported\n"); - return; - } - ok( (res == ERROR_INSUFFICIENT_BUFFER) && (needed <= MAX_PATH), - "returned %d with %u and 0x%x (expected 'ERROR_INSUFFICIENT_BUFFER' " - " and '<= MAX_PATH')\n", res, GetLastError(), needed); - - if (needed > MAX_PATH) { - skip("buffer overflow (%u)\n", needed); - return; - } - len = needed; - - /* the command is required */ - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, emptyW, NULL, 0, NULL, 0, &needed); - ok( res == ERROR_INVALID_PARAMETER, "returned %d with %u and 0x%x " - "(expected 'ERROR_INVALID_PARAMETER')\n", res, GetLastError(), needed); - - if (0) { - /* crash with native localspl.dll (w2k+xp) */ - res = pXcvDataPort(hXcv, NULL, NULL, 0, buffer, MAX_PATH, &needed); - res = pXcvDataPort(hXcv, cmd_MonitorUIW, NULL, 0, NULL, len, &needed); - res = pXcvDataPort(hXcv, cmd_MonitorUIW, NULL, 0, buffer, len, NULL); - } - - - /* hXcv is ignored for the command "MonitorUI" */ - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(NULL, cmd_MonitorUIW, NULL, 0, buffer, len, &needed); - ok( res == ERROR_SUCCESS, "returned %d with %u and 0x%x " - "(expected 'ERROR_SUCCESS')\n", res, GetLastError(), needed); - - - /* pszDataName is case-sensitive */ - memset(buffer, 0, len); - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_MonitorUI_lcaseW, NULL, 0, buffer, len, &needed); - ok( res == ERROR_INVALID_PARAMETER, "returned %d with %u and 0x%x " - "(expected 'ERROR_INVALID_PARAMETER')\n", res, GetLastError(), needed); - - /* off by one: larger */ - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_MonitorUIW, NULL, 0, buffer, len+1, &needed); - ok( res == ERROR_SUCCESS, "returned %d with %u and 0x%x " - "(expected 'ERROR_SUCCESS')\n", res, GetLastError(), needed); - - - /* off by one: smaller */ - /* the buffer is not modified for NT4, w2k, XP */ - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_MonitorUIW, NULL, 0, buffer, len-1, &needed); - ok( res == ERROR_INSUFFICIENT_BUFFER, "returned %d with %u and 0x%x " - "(expected 'ERROR_INSUFFICIENT_BUFFER')\n", res, GetLastError(), needed); - - /* Normal use. The DLL-Name without a Path is returned */ - memset(buffer, 0, len); - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_MonitorUIW, NULL, 0, buffer, len, &needed); - ok( res == ERROR_SUCCESS, "returned %d with %u and 0x%x " - "(expected 'ERROR_SUCCESS')\n", res, GetLastError(), needed); - - - /* small check without access-rights: */ - if (!hXcv_noaccess) return; - - /* The ACCESS_MASK is ignored for "MonitorUI" */ - memset(buffer, 0, len); - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv_noaccess, cmd_MonitorUIW, NULL, 0, buffer, sizeof(buffer), &needed); - ok( res == ERROR_SUCCESS, "returned %d with %u and 0x%x " - "(expected 'ERROR_SUCCESS')\n", res, GetLastError(), needed); -} - -/* ########################### */ - -static void test_XcvDataPort_PortIsValid(void) -{ - DWORD res; - DWORD needed; - - /* normal use: "LPT1:" */ - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_PortIsValidW, (PBYTE) portname_lpt1W, sizeof(portname_lpt1W), NULL, 0, &needed); - if (res == ERROR_INVALID_PARAMETER) { - skip("'PostIsValid' not supported\n"); - return; - } - ok( res == ERROR_SUCCESS, "returned %d with %u (expected ERROR_SUCCESS)\n", res, GetLastError()); - - - if (0) { - /* crash with native localspl.dll (w2k+xp) */ - res = pXcvDataPort(hXcv, cmd_PortIsValidW, NULL, 0, NULL, 0, &needed); - } - - - /* hXcv is ignored for the command "PortIsValid" */ - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(NULL, cmd_PortIsValidW, (PBYTE) portname_lpt1W, sizeof(portname_lpt1W), NULL, 0, NULL); - ok( res == ERROR_SUCCESS, "returned %d with %u (expected ERROR_SUCCESS)\n", res, GetLastError()); - - /* needed is ignored */ - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_PortIsValidW, (PBYTE) portname_lpt1W, sizeof(portname_lpt1W), NULL, 0, NULL); - ok( res == ERROR_SUCCESS, "returned %d with %u (expected ERROR_SUCCESS)\n", res, GetLastError()); - - - /* cbInputData is ignored */ - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_PortIsValidW, (PBYTE) portname_lpt1W, 0, NULL, 0, &needed); - ok( res == ERROR_SUCCESS, - "returned %d with %u and 0x%x (expected ERROR_SUCCESS)\n", - res, GetLastError(), needed); - - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_PortIsValidW, (PBYTE) portname_lpt1W, 1, NULL, 0, &needed); - ok( res == ERROR_SUCCESS, - "returned %d with %u and 0x%x (expected ERROR_SUCCESS)\n", - res, GetLastError(), needed); - - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_PortIsValidW, (PBYTE) portname_lpt1W, sizeof(portname_lpt1W) -1, NULL, 0, &needed); - ok( res == ERROR_SUCCESS, - "returned %d with %u and 0x%x (expected ERROR_SUCCESS)\n", - res, GetLastError(), needed); - - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_PortIsValidW, (PBYTE) portname_lpt1W, sizeof(portname_lpt1W) -2, NULL, 0, &needed); - ok( res == ERROR_SUCCESS, - "returned %d with %u and 0x%x (expected ERROR_SUCCESS)\n", - res, GetLastError(), needed); - - - /* an empty name is not allowed */ - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_PortIsValidW, (PBYTE) emptyW, sizeof(emptyW), NULL, 0, &needed); - ok( res == ERROR_PATH_NOT_FOUND, - "returned %d with %u and 0x%x (expected ERROR_PATH_NOT_FOUND)\n", - res, GetLastError(), needed); - - - /* a directory is not allowed */ - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_PortIsValidW, (PBYTE) tempdirW, (lstrlenW(tempdirW) + 1) * sizeof(WCHAR), NULL, 0, &needed); - /* XP(admin): ERROR_INVALID_NAME, XP(user): ERROR_PATH_NOT_FOUND, w2k ERROR_ACCESS_DENIED */ - ok( (res == ERROR_INVALID_NAME) || (res == ERROR_PATH_NOT_FOUND) || - (res == ERROR_ACCESS_DENIED), "returned %d with %u and 0x%x " - "(expected ERROR_INVALID_NAME, ERROR_PATH_NOT_FOUND or ERROR_ACCESS_DENIED)\n", - res, GetLastError(), needed); - - - /* test more valid well known Ports: */ - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_PortIsValidW, (PBYTE) portname_lpt2W, sizeof(portname_lpt2W), NULL, 0, &needed); - ok( res == ERROR_SUCCESS, - "returned %d with %u and 0x%x (expected ERROR_SUCCESS)\n", - res, GetLastError(), needed); - - - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_PortIsValidW, (PBYTE) portname_com1W, sizeof(portname_com1W), NULL, 0, &needed); - ok( res == ERROR_SUCCESS, - "returned %d with %u and 0x%x (expected ERROR_SUCCESS)\n", - res, GetLastError(), needed); - - - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_PortIsValidW, (PBYTE) portname_com2W, sizeof(portname_com2W), NULL, 0, &needed); - ok( res == ERROR_SUCCESS, - "returned %d with %u and 0x%x (expected ERROR_SUCCESS)\n", - res, GetLastError(), needed); - - - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_PortIsValidW, (PBYTE) portname_fileW, sizeof(portname_fileW), NULL, 0, &needed); - ok( res == ERROR_SUCCESS, - "returned %d with %u and 0x%x (expected ERROR_SUCCESS)\n", - res, GetLastError(), needed); - - - /* a normal, writable file is allowed */ - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv, cmd_PortIsValidW, (PBYTE) tempfileW, (lstrlenW(tempfileW) + 1) * sizeof(WCHAR), NULL, 0, &needed); - ok( res == ERROR_SUCCESS, - "returned %d with %u and 0x%x (expected ERROR_SUCCESS)\n", - res, GetLastError(), needed); - - - /* small check without access-rights: */ - if (!hXcv_noaccess) return; - - /* The ACCESS_MASK from XcvOpenPort is ignored in "PortIsValid" */ - needed = (DWORD) 0xdeadbeef; - SetLastError(0xdeadbeef); - res = pXcvDataPort(hXcv_noaccess, cmd_PortIsValidW, (PBYTE) portname_lpt1W, sizeof(portname_lpt1W), NULL, 0, &needed); - ok( res == ERROR_SUCCESS, "returned %d with %u (expected ERROR_SUCCESS)\n", res, GetLastError()); - -} - -/* ########################### */ - -static void test_XcvOpenPort(void) -{ - DWORD res; - HANDLE hXcv2; - - - if (0) - { - /* crash with native localspl.dll (w2k+xp) */ - res = pXcvOpenPort(NULL, SERVER_ACCESS_ADMINISTER, &hXcv2); - res = pXcvOpenPort(emptyW, SERVER_ACCESS_ADMINISTER, NULL); - } - - - /* The returned handle is the result from a previous "spoolss.dll,DllAllocSplMem" */ - SetLastError(0xdeadbeef); - hXcv2 = (HANDLE) 0xdeadbeef; - res = pXcvOpenPort(emptyW, SERVER_ACCESS_ADMINISTER, &hXcv2); - ok(res, "returned %d with %u and %p (expected '!= 0')\n", res, GetLastError(), hXcv2); - if (res) pXcvClosePort(hXcv2); - - - /* The ACCESS_MASK is not checked in XcvOpenPort */ - SetLastError(0xdeadbeef); - hXcv2 = (HANDLE) 0xdeadbeef; - res = pXcvOpenPort(emptyW, 0, &hXcv2); - ok(res, "returned %d with %u and %p (expected '!= 0')\n", res, GetLastError(), hXcv2); - if (res) pXcvClosePort(hXcv2); - - - /* A copy of pszObject is saved in the Memory-Block */ - SetLastError(0xdeadbeef); - hXcv2 = (HANDLE) 0xdeadbeef; - res = pXcvOpenPort(portname_lpt1W, SERVER_ALL_ACCESS, &hXcv2); - ok(res, "returned %d with %u and %p (expected '!= 0')\n", res, GetLastError(), hXcv2); - if (res) pXcvClosePort(hXcv2); - - SetLastError(0xdeadbeef); - hXcv2 = (HANDLE) 0xdeadbeef; - res = pXcvOpenPort(portname_fileW, SERVER_ALL_ACCESS, &hXcv2); - ok(res, "returned %d with %u and %p (expected '!= 0')\n", res, GetLastError(), hXcv2); - if (res) pXcvClosePort(hXcv2); - -} - -/* ########################### */ - -#define GET_MONITOR_FUNC(name) \ - if(numentries > 0) { \ - numentries--; \ - p##name = pm->Monitor.pfn##name ; \ - } - - -START_TEST(localmon) -{ - DWORD numentries; - DWORD res; - - LoadLibraryA("winspool.drv"); - /* This DLL does not exist on Win9x */ - hdll = LoadLibraryA("localspl.dll"); - if (!hdll) { - skip("localspl.dll cannot be loaded, most likely running on Win9x\n"); - return; - } - - tempdirW[0] = '\0'; - tempfileW[0] = '\0'; - res = GetTempPathW(MAX_PATH, tempdirW); - ok(res != 0, "with %u\n", GetLastError()); - res = GetTempFileNameW(tempdirW, wineW, 0, tempfileW); - ok(res != 0, "with %u\n", GetLastError()); - - pInitializePrintMonitor = (void *) GetProcAddress(hdll, "InitializePrintMonitor"); - - if (!pInitializePrintMonitor) { - /* The Monitor for "Local Ports" was in a separate dll before w2k */ - hlocalmon = LoadLibraryA("localmon.dll"); - if (hlocalmon) { - pInitializePrintMonitor = (void *) GetProcAddress(hlocalmon, "InitializePrintMonitor"); - } - } - if (!pInitializePrintMonitor) return; - - /* Native localmon.dll / localspl.dll need a valid Port-Entry in: - a) since xp: HKLM\Software\Microsoft\Windows NT\CurrentVersion\Ports - b) up to w2k: Section "Ports" in win.ini - or InitializePrintMonitor fails. */ - pm = pInitializePrintMonitor(Monitors_LocalPortW); - if (pm) { - numentries = (pm->dwMonitorSize ) / sizeof(VOID *); - /* NT4: 14, since w2k: 17 */ - ok( numentries == 14 || numentries == 17, - "dwMonitorSize (%d) => %d Functions\n", pm->dwMonitorSize, numentries); - - GET_MONITOR_FUNC(EnumPorts); - GET_MONITOR_FUNC(OpenPort); - GET_MONITOR_FUNC(OpenPortEx); - GET_MONITOR_FUNC(StartDocPort); - GET_MONITOR_FUNC(WritePort); - GET_MONITOR_FUNC(ReadPort); - GET_MONITOR_FUNC(EndDocPort); - GET_MONITOR_FUNC(ClosePort); - GET_MONITOR_FUNC(AddPort); - GET_MONITOR_FUNC(AddPortEx); - GET_MONITOR_FUNC(ConfigurePort); - GET_MONITOR_FUNC(DeletePort); - GET_MONITOR_FUNC(GetPrinterDataFromPort); - GET_MONITOR_FUNC(SetPortTimeOuts); - GET_MONITOR_FUNC(XcvOpenPort); - GET_MONITOR_FUNC(XcvDataPort); - GET_MONITOR_FUNC(XcvClosePort); - - if ((pXcvOpenPort) && (pXcvDataPort) && (pXcvClosePort)) { - SetLastError(0xdeadbeef); - res = pXcvOpenPort(emptyW, SERVER_ACCESS_ADMINISTER, &hXcv); - ok(res, "hXcv: %d with %u and %p (expected '!= 0')\n", res, GetLastError(), hXcv); - - SetLastError(0xdeadbeef); - res = pXcvOpenPort(emptyW, 0, &hXcv_noaccess); - ok(res, "hXcv_noaccess: %d with %u and %p (expected '!= 0')\n", res, GetLastError(), hXcv_noaccess); - } - } - - test_InitializePrintMonitor(); - - find_installed_ports(); - - test_AddPort(); - test_AddPortEx(); - test_ClosePort(); - test_ConfigurePort(); - test_DeletePort(); - test_EnumPorts(); - test_OpenPort(); - - if ( !hXcv ) { - skip("Xcv not supported\n"); - } - else - { - test_XcvClosePort(); - test_XcvDataPort_AddPort(); - test_XcvDataPort_ConfigureLPTPortCommandOK(); - test_XcvDataPort_DeletePort(); - test_XcvDataPort_GetTransmissionRetryTimeout(); - test_XcvDataPort_MonitorUI(); - test_XcvDataPort_PortIsValid(); - test_XcvOpenPort(); - - pXcvClosePort(hXcv); - } - if (hXcv_noaccess) pXcvClosePort(hXcv_noaccess); - - /* Cleanup our temporary file */ - DeleteFileW(tempfileW); -} diff --git a/rostests/winetests/localspl/localspl.rbuild b/rostests/winetests/localspl/localspl.rbuild deleted file mode 100644 index 95ee6c9f3a6..00000000000 --- a/rostests/winetests/localspl/localspl.rbuild +++ /dev/null @@ -1,10 +0,0 @@ - - include/reactos/wine - . - - localmon.c - testlist.c - wine - advapi32 - ntdll - diff --git a/rostests/winetests/localspl/testlist.c b/rostests/winetests/localspl/testlist.c deleted file mode 100644 index 5e1945fded4..00000000000 --- a/rostests/winetests/localspl/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_localmon(void); - -const struct test winetest_testlist[] = -{ - { "localmon", func_localmon }, - { 0, 0 } -}; diff --git a/rostests/winetests/localui/CMakeLists.txt b/rostests/winetests/localui/CMakeLists.txt deleted file mode 100644 index 59597e060a3..00000000000 --- a/rostests/winetests/localui/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -add_executable(localui_winetest localui.c testlist.c) -target_link_libraries(localui_winetest wine) -set_module_type(localui_winetest win32cui) -add_importlibs(localui_winetest winspool msvcrt kernel32 ntdll) -add_cd_file(TARGET localui_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/localui/localui.c b/rostests/winetests/localui/localui.c deleted file mode 100644 index cb7a1cff248..00000000000 --- a/rostests/winetests/localui/localui.c +++ /dev/null @@ -1,329 +0,0 @@ -/* - * Unit test suite for the Local Printmonitor User Interface - * - * Copyright 2007 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 -#include - -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "wingdi.h" -#include "winnls.h" -#include "winreg.h" - -#include "winspool.h" -#include "ddk/winsplp.h" - -#include "wine/test.h" - - -/* ##### */ - -static HMODULE hdll; -static PMONITORUI (WINAPI *pInitializePrintMonitorUI)(VOID); -static PMONITORUI pui; -static BOOL (WINAPI *pAddPortUI)(PCWSTR, HWND, PCWSTR, PWSTR *); -static BOOL (WINAPI *pConfigurePortUI)(PCWSTR, HWND, PCWSTR); -static BOOL (WINAPI *pDeletePortUI)(PCWSTR, HWND, PCWSTR); - -static WCHAR does_not_existW[] = {'d','o','e','s','_','n','o','t','_','e','x','i','s','t',0}; -static WCHAR emptyW[] = {0}; -static CHAR fmt_comA[] = {'C','O','M','%','u',':',0}; -static CHAR fmt_lptA[] = {'L','P','T','%','u',':',0}; -static WCHAR localportW[] = {'L','o','c','a','l',' ','P','o','r','t',0}; -static WCHAR portname_fileW[] = {'F','I','L','E',':',0}; - -static LPBYTE pi_buffer; -static DWORD pi_numports; -static DWORD pi_needed; - -static PORT_INFO_2W * lpt_present; -static PORT_INFO_2W * com_present; -static PORT_INFO_2W * file_present; - -static LPWSTR lpt_absent; -static LPWSTR com_absent; - -/* ########################### */ - -static PORT_INFO_2W * find_portinfo2(LPWSTR pPort) -{ - PORT_INFO_2W * pi; - DWORD res; - - if (!pi_buffer) { - res = EnumPortsW(NULL, 2, NULL, 0, &pi_needed, &pi_numports); - pi_buffer = HeapAlloc(GetProcessHeap(), 0, pi_needed); - SetLastError(0xdeadbeef); - res = EnumPortsW(NULL, 2, pi_buffer, pi_needed, &pi_needed, &pi_numports); - } - if (pi_buffer) { - pi = (PORT_INFO_2W *) pi_buffer; - res = 0; - while (pi_numports > res) { - if (lstrcmpiW(pi->pPortName, pPort) == 0) { - return pi; - } - pi++; - res++; - } - } - return NULL; -} - - -/* ########################### */ - -static LPCSTR load_functions(void) -{ - LPCSTR ptr; - - ptr = "localui.dll"; - hdll = LoadLibraryA(ptr); - if (!hdll) return ptr; - - ptr = "InitializePrintMonitorUI"; - pInitializePrintMonitorUI = (VOID *) GetProcAddress(hdll, ptr); - if (!pInitializePrintMonitorUI) return ptr; - - return NULL; -} - -/* ########################### - * strdupW [internal] - */ - -static LPWSTR strdupW(LPCWSTR strW) -{ - LPWSTR ptr; - - ptr = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(strW) + 1) * sizeof(WCHAR)); - if (ptr) { - lstrcpyW(ptr, strW); - } - return ptr; -} - -/* ########################### */ - -static void test_AddPortUI(void) -{ - DWORD res; - LPWSTR new_portname; - - /* not present before w2k */ - if (!pAddPortUI) { - skip("AddPortUI not found\n"); - return; - } - - SetLastError(0xdeadbeef); - res = pAddPortUI(NULL, NULL, NULL, NULL); - ok( !res && - ((GetLastError() == ERROR_UNKNOWN_PORT) || (GetLastError() == ERROR_INVALID_PRINTER_NAME)), - "got %d with %u (expected '0' with: ERROR_UNKNOWN_PORT or " - "ERROR_INVALID_PRINTER_NAME)\n", res, GetLastError()); - - SetLastError(0xdeadbeef); - res = pAddPortUI(NULL, NULL, emptyW, NULL); - ok( !res && - ((GetLastError() == ERROR_UNKNOWN_PORT) || (GetLastError() == ERROR_INVALID_PRINTER_NAME)), - "got %d with %u (expected '0' with: ERROR_UNKNOWN_PORT or " - "ERROR_INVALID_PRINTER_NAME)\n", res, GetLastError()); - - SetLastError(0xdeadbeef); - res = pAddPortUI(NULL, NULL, does_not_existW, NULL); - ok( !res && - ((GetLastError() == ERROR_UNKNOWN_PORT) || (GetLastError() == ERROR_INVALID_PRINTER_NAME)), - "got %d with %u (expected '0' with: ERROR_UNKNOWN_PORT or " - "ERROR_INVALID_PRINTER_NAME)\n", res, GetLastError()); - - if (winetest_interactive) { - SetLastError(0xdeadbeef); - new_portname = NULL; - /* - * - On MSDN, you can read, that no dialogs should be displayed, when hWnd - * is NULL, but native localui does not care - * - when the new port already exist, - * TRUE is returned, but new_portname is NULL - * - when the new port starts with "COM" or "LPT", - * FALSE is returned with ERROR_NOT_SUPPORTED in windows - */ - res = pAddPortUI(NULL, NULL, localportW, &new_portname); - ok( res || - (GetLastError() == ERROR_CANCELLED) || - (GetLastError() == ERROR_ACCESS_DENIED) || - (GetLastError() == ERROR_NOT_SUPPORTED), - "got %d with %u and %p (expected '!= 0' or '0' with: " - "ERROR_CANCELLED, ERROR_ACCESS_DENIED or ERROR_NOT_SUPPORTED)\n", - res, GetLastError(), new_portname); - - GlobalFree(new_portname); - } -} - -/* ########################### */ - -static void test_ConfigurePortUI(void) -{ - DWORD res; - - /* not present before w2k */ - if (!pConfigurePortUI) { - skip("ConfigurePortUI not found\n"); - return; - } - - SetLastError(0xdeadbeef); - res = pConfigurePortUI(NULL, NULL, NULL); - ok( !res && - ((GetLastError() == ERROR_UNKNOWN_PORT) || (GetLastError() == ERROR_INVALID_PRINTER_NAME)), - "got %d with %u (expected '0' with: ERROR_UNKNOWN_PORT or " - "ERROR_INVALID_PRINTER_NAME)\n", res, GetLastError()); - - SetLastError(0xdeadbeef); - res = pConfigurePortUI(NULL, NULL, emptyW); - ok( !res && - ((GetLastError() == ERROR_UNKNOWN_PORT) || (GetLastError() == ERROR_INVALID_PRINTER_NAME)), - "got %d with %u (expected '0' with: ERROR_UNKNOWN_PORT or " - "ERROR_INVALID_PRINTER_NAME)\n", res, GetLastError()); - - - SetLastError(0xdeadbeef); - res = pConfigurePortUI(NULL, NULL, does_not_existW); - ok( !res && - ((GetLastError() == ERROR_UNKNOWN_PORT) || (GetLastError() == ERROR_INVALID_PRINTER_NAME)), - "got %d with %u (expected '0' with: ERROR_UNKNOWN_PORT or " - "ERROR_INVALID_PRINTER_NAME)\n", res, GetLastError()); - - if (winetest_interactive && lpt_present) { - SetLastError(0xdeadbeef); - res = pConfigurePortUI(NULL, NULL, lpt_present->pPortName); - ok( res || - (GetLastError() == ERROR_CANCELLED) || (GetLastError() == ERROR_ACCESS_DENIED), - "got %d with %u (expected '!= 0' or '0' with: ERROR_CANCELLED or " - "ERROR_ACCESS_DENIED)\n", res, GetLastError()); - } - - if (lpt_absent) { - SetLastError(0xdeadbeef); - res = pConfigurePortUI(NULL, NULL, lpt_absent); - ok( !res && - ((GetLastError() == ERROR_UNKNOWN_PORT) || (GetLastError() == ERROR_INVALID_PRINTER_NAME)), - "got %d with %u (expected '0' with: ERROR_UNKNOWN_PORT or " - "ERROR_INVALID_PRINTER_NAME)\n", res, GetLastError()); - } - - if (winetest_interactive && com_present) { - SetLastError(0xdeadbeef); - res = pConfigurePortUI(NULL, NULL, com_present->pPortName); - ok( res || - (GetLastError() == ERROR_CANCELLED) || (GetLastError() == ERROR_ACCESS_DENIED), - "got %d with %u (expected '!= 0' or '0' with: ERROR_CANCELLED or " - "ERROR_ACCESS_DENIED)\n", res, GetLastError()); - } - - if (com_absent) { - SetLastError(0xdeadbeef); - res = pConfigurePortUI(NULL, NULL, com_absent); - ok( !res && - ((GetLastError() == ERROR_UNKNOWN_PORT) || (GetLastError() == ERROR_INVALID_PRINTER_NAME)), - "got %d with %u (expected '0' with: ERROR_UNKNOWN_PORT or " - "ERROR_INVALID_PRINTER_NAME)\n", res, GetLastError()); - - } - - if (winetest_interactive && file_present) { - SetLastError(0xdeadbeef); - res = pConfigurePortUI(NULL, NULL, portname_fileW); - ok( !res && - ((GetLastError() == ERROR_CANCELLED) || (GetLastError() == ERROR_ACCESS_DENIED)), - "got %d with %u (expected '0' with: ERROR_CANCELLED or " - "ERROR_ACCESS_DENIED)\n", res, GetLastError()); - } -} - -/* ########################### */ - -START_TEST(localui) -{ - LPCSTR ptr; - DWORD numentries; - PORT_INFO_2W * pi2; - WCHAR bufferW[16]; - CHAR bufferA[16]; - DWORD id; - - /* localui.dll does not exist before w2k */ - ptr = load_functions(); - if (ptr) { - skip("%s not found\n", ptr); - return; - } - - pui = pInitializePrintMonitorUI(); - if (pui) { - numentries = (pui->dwMonitorUISize - sizeof(DWORD)) / sizeof(VOID *); - ok( numentries == 3, - "dwMonitorUISize (%d) => %d Functions\n", pui->dwMonitorUISize, numentries); - - if (numentries > 2) { - pAddPortUI = pui->pfnAddPortUI; - pConfigurePortUI = pui->pfnConfigurePortUI; - pDeletePortUI = pui->pfnDeletePortUI; - } - } - - /* find installed Ports */ - - id = 0; - /* "LPT1:" - "LPT9:" */ - while (((lpt_present == NULL) || (lpt_absent == NULL)) && id < 9) { - id++; - sprintf(bufferA, fmt_lptA, id); - MultiByteToWideChar( CP_ACP, 0, bufferA, -1, bufferW, sizeof(bufferW)/sizeof(WCHAR) ); - pi2 = find_portinfo2(bufferW); - if (pi2 && (lpt_present == NULL)) lpt_present = pi2; - if (!pi2 && (lpt_absent == NULL)) lpt_absent = strdupW(bufferW); - } - - id = 0; - /* "COM1:" - "COM9:" */ - while (((com_present == NULL) || (com_absent == NULL)) && id < 9) { - id++; - sprintf(bufferA, fmt_comA, id); - MultiByteToWideChar( CP_ACP, 0, bufferA, -1, bufferW, sizeof(bufferW)/sizeof(WCHAR) ); - pi2 = find_portinfo2(bufferW); - if (pi2 && (com_present == NULL)) com_present = pi2; - if (!pi2 && (com_absent == NULL)) com_absent = strdupW(bufferW); - } - - /* "FILE:" */ - file_present = find_portinfo2(portname_fileW); - - test_AddPortUI(); - test_ConfigurePortUI(); - - /* cleanup */ - HeapFree(GetProcessHeap(), 0, lpt_absent); - HeapFree(GetProcessHeap(), 0, com_absent); - HeapFree(GetProcessHeap(), 0, pi_buffer); -} diff --git a/rostests/winetests/localui/localui.rbuild b/rostests/winetests/localui/localui.rbuild deleted file mode 100644 index 4897cfec757..00000000000 --- a/rostests/winetests/localui/localui.rbuild +++ /dev/null @@ -1,10 +0,0 @@ - - include/reactos/wine - . - - localui.c - testlist.c - wine - winspool - ntdll - diff --git a/rostests/winetests/localui/testlist.c b/rostests/winetests/localui/testlist.c deleted file mode 100644 index 241a4dd483b..00000000000 --- a/rostests/winetests/localui/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_localui(void); - -const struct test winetest_testlist[] = -{ - { "localui", func_localui }, - { 0, 0 } -}; diff --git a/rostests/winetests/lz32/CMakeLists.txt b/rostests/winetests/lz32/CMakeLists.txt deleted file mode 100644 index e1d03fb05ad..00000000000 --- a/rostests/winetests/lz32/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(lz32_winetest lzexpand_main.c testlist.c) -target_link_libraries(lz32_winetest wine) -set_module_type(lz32_winetest win32cui) -add_importlibs(lz32_winetest lz32 msvcrt kernel32 ntdll) -add_cd_file(TARGET lz32_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/lz32/lz32.rbuild b/rostests/winetests/lz32/lz32.rbuild deleted file mode 100644 index 205c347d865..00000000000 --- a/rostests/winetests/lz32/lz32.rbuild +++ /dev/null @@ -1,13 +0,0 @@ - - - - - . - - lzexpand_main.c - testlist.c - wine - lz32 - ntdll - - diff --git a/rostests/winetests/lz32/lzexpand_main.c b/rostests/winetests/lz32/lzexpand_main.c deleted file mode 100644 index 3e46fb0a47c..00000000000 --- a/rostests/winetests/lz32/lzexpand_main.c +++ /dev/null @@ -1,890 +0,0 @@ -/* - * Unit test suite for lz32 functions - * - * Copyright 2004 Evan Parry, Daniel Kegel - * - * 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 "wine/test.h" - -/* Compressed file names end with underscore. */ -static char filename [] = "testfile.xxx"; -static char filename_[] = "testfile.xx_"; -static WCHAR filenameW [] = {'t','e','s','t','f','i','l','e','.','x','x','x',0}; -static WCHAR filenameW_[] = {'t','e','s','t','f','i','l','e','.','x','x','_',0}; - -static char dotless [] = "dotless"; -static char dotless_[] = "dotless._"; -static WCHAR dotlessW [] = {'d','o','t','l','e','s','s', 0}; -static WCHAR dotlessW_[] = {'d','o','t','l','e','s','s','.','_', 0}; - -static char extless [] = "extless."; -static char extless_[] = "extless._"; -static WCHAR extlessW [] = {'e','x','t','l','e','s','s','.', 0}; -static WCHAR extlessW_[] = {'e','x','t','l','e','s','s','.','_', 0}; - -static char _terminated [] = "_terminated.xxxx_"; -static char _terminated_[] = "_terminated.xxxx_"; -static WCHAR _terminatedW [] = {'_','t','e','r','m','i','n','a','t','e','d','.','x','x','x','x','_', 0}; -static WCHAR _terminatedW_[] = {'_','t','e','r','m','i','n','a','t','e','d','.','x','x','x','x','_', 0}; - -static char filename2[] = "testfile.yyy"; - -/* This is the hex string representation of the file created by compressing - a simple text file with the contents "This is a test file." - - The file was created using COMPRESS.EXE from the Windows Server 2003 - Resource Kit from Microsoft. - */ -static const unsigned char compressed_file[] = - {0x53,0x5A,0x44,0x44,0x88,0xF0,0x27,0x33,0x41, - 0x74,0x75,0x14,0x00,0x00,0xDF,0x54,0x68,0x69, - 0x73,0x20,0xF2,0xF0,0x61,0x20,0xFF,0x74,0x65, - 0x73,0x74,0x20,0x66,0x69,0x6C,0x03,0x65,0x2E}; -static const DWORD compressed_file_size = sizeof(compressed_file); - -static const char uncompressed_data[] = "This is a test file."; -static const DWORD uncompressed_data_size = sizeof(uncompressed_data) - 1; - -static char *buf; - -static void full_file_path_name_in_a_CWD(const char *src, char *dst, BOOL expect_short) -{ - DWORD retval; - char shortname[MAX_PATH]; - - retval = GetCurrentDirectoryA(MAX_PATH, dst); - ok(retval > 0, "GetCurrentDirectoryA returned %d, GLE=%d\n", - retval, GetLastError()); - if(dst[retval-1] != '\\') - /* Append backslash only when it's missing */ - lstrcatA(dst, "\\"); - lstrcatA(dst, src); - if(expect_short) - { - memcpy(shortname, dst, MAX_PATH); - retval = GetShortPathName(shortname, dst, MAX_PATH-1); - ok(retval > 0, "GetShortPathName returned %d for '%s', GLE=%d\n", - retval, dst, GetLastError()); - } -} - -static void create_file(char *fname) -{ - INT file; - OFSTRUCT ofs; - DWORD retval; - - file = LZOpenFileA(fname, &ofs, OF_CREATE); - ok(file >= 0, "LZOpenFileA failed to create '%s'\n", fname); - LZClose(file); - retval = GetFileAttributesA(fname); - ok(retval != INVALID_FILE_ATTRIBUTES, "GetFileAttributesA('%s'): error %d\n", ofs.szPathName, GetLastError()); -} - -static void delete_file(char *fname) -{ - INT file; - OFSTRUCT ofs; - DWORD retval; - - file = LZOpenFileA(fname, &ofs, OF_DELETE); - ok(file >= 0, "LZOpenFileA failed to delete '%s'\n", fname); - LZClose(file); - retval = GetFileAttributesA(fname); - ok(retval == INVALID_FILE_ATTRIBUTES, "GetFileAttributesA succeeded on deleted file ('%s')\n", ofs.szPathName); -} - -static void test_LZOpenFileA_existing_compressed(void) -{ - OFSTRUCT test; - INT file; - char expected[MAX_PATH]; - char short_expected[MAX_PATH]; - char filled_0xA5[OFS_MAXPATHNAME]; - - /* Try to open existing compressed files: */ - create_file(filename_); - create_file(dotless_); - create_file(extless_); - create_file(_terminated_); - - memset(&filled_0xA5, 0xA5, OFS_MAXPATHNAME); - memset(&test, 0xA5, sizeof(test)); - full_file_path_name_in_a_CWD(filename_, expected, FALSE); - SetLastError(0xfaceabee); - - /* a, using 8.3-conformant file name. */ - file = LZOpenFileA(filename, &test, OF_EXIST); - /* If the file "foo.xxx" does not exist, LZOpenFileA should then - check for the file "foo.xx_" and open that -- at least on some - operating systems. Doesn't seem to on my copy of Win98. - */ - if(file != LZERROR_BADINHANDLE) { - ok(file >= 0, "LZOpenFileA returns negative file descriptor for '%s'\n", filename); - ok(test.cBytes == sizeof(OFSTRUCT), - "LZOpenFileA set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == 0, "LZOpenFileA set test.nErrCode to %d\n", - test.nErrCode); - ok(lstrcmpA(test.szPathName, expected) == 0, - "LZOpenFileA returned '%s', but was expected to return '%s'\n", - test.szPathName, expected); - LZClose(file); - } else { /* Win9x */ - ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "GetLastError() returns %d\n", GetLastError()); - ok(test.cBytes == 0xA5, - "LZOpenFileA set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_FILE_NOT_FOUND, - "LZOpenFileA set test.nErrCode to %d\n", test.nErrCode); - ok(strncmp(test.szPathName, filled_0xA5, OFS_MAXPATHNAME) == 0, - "LZOpenFileA returned '%s', but was expected to return '%s'\n", - test.szPathName, filled_0xA5); - } - - memset(&filled_0xA5, 0xA5, OFS_MAXPATHNAME); - memset(&test, 0xA5, sizeof(test)); - full_file_path_name_in_a_CWD(dotless_, expected, FALSE); - SetLastError(0xfaceabee); - - /* b, using dotless file name. */ - file = LZOpenFileA(dotless, &test, OF_EXIST); - if(file != LZERROR_BADINHANDLE) { - ok(file >= 0, "LZOpenFileA returns negative file descriptor for '%s'\n", dotless); - ok(test.cBytes == sizeof(OFSTRUCT), - "LZOpenFileA set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == 0, "LZOpenFileA set test.nErrCode to %d\n", - test.nErrCode); - ok(lstrcmpA(test.szPathName, expected) == 0, - "LZOpenFileA returned '%s', but was expected to return '%s'\n", - test.szPathName, expected); - LZClose(file); - } else { /* Win9x */ - ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "GetLastError() returns %d\n", GetLastError()); - todo_wine - ok(test.cBytes == 0xA5, - "LZOpenFileA set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_FILE_NOT_FOUND, - "LZOpenFileA set test.nErrCode to %d\n", test.nErrCode); - todo_wine - ok(strncmp(test.szPathName, filled_0xA5, OFS_MAXPATHNAME) == 0, - "LZOpenFileA returned '%s', but was expected to return '%s'\n", - test.szPathName, filled_0xA5); - } - - memset(&filled_0xA5, 0xA5, OFS_MAXPATHNAME); - memset(&test, 0xA5, sizeof(test)); - full_file_path_name_in_a_CWD(extless_, expected, FALSE); - SetLastError(0xfaceabee); - - /* c, using extensionless file name. */ - file = LZOpenFileA(extless, &test, OF_EXIST); - if(file != LZERROR_BADINHANDLE) { - ok(file >= 0, "LZOpenFileA returns negative file descriptor for '%s'\n", extless); - ok(test.cBytes == sizeof(OFSTRUCT), - "LZOpenFileA set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == 0, "LZOpenFileA set test.nErrCode to %d\n", - test.nErrCode); - ok(lstrcmpA(test.szPathName, expected) == 0, - "LZOpenFileA returned '%s', but was expected to return '%s'\n", - test.szPathName, expected); - LZClose(file); - } else { /* Win9x */ - ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "GetLastError() returns %d\n", GetLastError()); - ok(test.cBytes == 0xA5, - "LZOpenFileA set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_FILE_NOT_FOUND, - "LZOpenFileA set test.nErrCode to %d\n", test.nErrCode); - ok(strncmp(test.szPathName, filled_0xA5, OFS_MAXPATHNAME) == 0, - "LZOpenFileA returned '%s', but was expected to return '%s'\n", - test.szPathName, filled_0xA5); - } - - memset(&filled_0xA5, 0xA5, OFS_MAXPATHNAME); - memset(&test, 0xA5, sizeof(test)); - full_file_path_name_in_a_CWD(_terminated_, expected, FALSE); - full_file_path_name_in_a_CWD(_terminated_, short_expected, TRUE); - - /* d, using underscore-terminated file name. */ - file = LZOpenFileA(_terminated, &test, OF_EXIST); - ok(file >= 0, "LZOpenFileA failed on switching to a compressed file name\n"); - ok(test.cBytes == sizeof(OFSTRUCT) || - broken(test.cBytes == FIELD_OFFSET(OFSTRUCT, szPathName) + lstrlenA(test.szPathName)), /* win9x */ - "LZOpenFileA set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == 0, "LZOpenFileA set test.nErrCode to %d\n", - test.nErrCode); - ok(lstrcmpA(test.szPathName, expected) == 0 || - lstrcmpA(test.szPathName, short_expected) == 0, /* Win9x */ - "LZOpenFileA returned '%s', but was expected to return '%s' or '%s'\n", - test.szPathName, expected, short_expected); - LZClose(file); - - delete_file(filename_); - delete_file(dotless_); - delete_file(extless_); - delete_file(_terminated_); -} - -static void test_LZOpenFileA_nonexisting_compressed(void) -{ - OFSTRUCT test; - INT file; - char expected[MAX_PATH]; - char filled_0xA5[OFS_MAXPATHNAME]; - - /* Try to open nonexisting compressed files: */ - memset(&filled_0xA5, 0xA5, OFS_MAXPATHNAME); - memset(&test, 0xA5, sizeof(test)); - full_file_path_name_in_a_CWD(filename_, expected, FALSE); - SetLastError(0xfaceabee); - - /* a, using 8.3-conformant file name. */ - file = LZOpenFileA(filename, &test, OF_EXIST); - /* If the file "foo.xxx" does not exist, LZOpenFileA should then - check for the file "foo.xx_" and open that -- at least on some - operating systems. Doesn't seem to on my copy of Win98. - */ - ok(file == LZERROR_BADINHANDLE, - "LZOpenFileA succeeded on nonexistent file\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "GetLastError() returns %d\n", GetLastError()); - todo_wine - ok(test.cBytes == 0xA5, - "LZOpenFileA set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_FILE_NOT_FOUND, - "LZOpenFileA set test.nErrCode to %d\n", test.nErrCode); - ok(lstrcmpA(test.szPathName, expected) == 0 || - strncmp(test.szPathName, filled_0xA5, OFS_MAXPATHNAME) == 0, /* Win9x */ - "LZOpenFileA returned '%s', but was expected to return '%s' or '%s'\n", - test.szPathName, expected, filled_0xA5); - - memset(&filled_0xA5, 0xA5, OFS_MAXPATHNAME); - memset(&test, 0xA5, sizeof(test)); - full_file_path_name_in_a_CWD(dotless_, expected, FALSE); - SetLastError(0xfaceabee); - - /* b, using dotless file name. */ - file = LZOpenFileA(dotless, &test, OF_EXIST); - ok(file == LZERROR_BADINHANDLE, - "LZOpenFileA succeeded on nonexistent file\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "GetLastError() returns %d\n", GetLastError()); - todo_wine - ok(test.cBytes == 0xA5, - "LZOpenFileA set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_FILE_NOT_FOUND, - "LZOpenFileA set test.nErrCode to %d\n", test.nErrCode); - ok(lstrcmpA(test.szPathName, expected) == 0 || - strncmp(test.szPathName, filled_0xA5, OFS_MAXPATHNAME) == 0, /* Win9x */ - "LZOpenFileA returned '%s', but was expected to return '%s' or '%s'\n", - test.szPathName, expected, filled_0xA5); - - memset(&filled_0xA5, 0xA5, OFS_MAXPATHNAME); - memset(&test, 0xA5, sizeof(test)); - full_file_path_name_in_a_CWD(extless_, expected, FALSE); - SetLastError(0xfaceabee); - - /* c, using extensionless file name. */ - file = LZOpenFileA(extless, &test, OF_EXIST); - ok(file == LZERROR_BADINHANDLE, - "LZOpenFileA succeeded on nonexistent file\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "GetLastError() returns %d\n", GetLastError()); - todo_wine - ok(test.cBytes == 0xA5, - "LZOpenFileA set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_FILE_NOT_FOUND, - "LZOpenFileA set test.nErrCode to %d\n", test.nErrCode); - ok(lstrcmpA(test.szPathName, expected) == 0 || - strncmp(test.szPathName, filled_0xA5, OFS_MAXPATHNAME) == 0, /* Win9x */ - "LZOpenFileA returned '%s', but was expected to return '%s' or '%s'\n", - test.szPathName, expected, filled_0xA5); - - memset(&filled_0xA5, 0xA5, OFS_MAXPATHNAME); - memset(&test, 0xA5, sizeof(test)); - full_file_path_name_in_a_CWD(_terminated_, expected, FALSE); - SetLastError(0xfaceabee); - - /* d, using underscore-terminated file name. */ - file = LZOpenFileA(_terminated, &test, OF_EXIST); - ok(file == LZERROR_BADINHANDLE, - "LZOpenFileA succeeded on nonexistent file\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "GetLastError() returns %d\n", GetLastError()); - todo_wine - ok(test.cBytes == 0xA5, - "LZOpenFileA set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_FILE_NOT_FOUND, - "LZOpenFileA set test.nErrCode to %d\n", test.nErrCode); - ok(lstrcmpA(test.szPathName, expected) == 0 || - strncmp(test.szPathName, filled_0xA5, OFS_MAXPATHNAME) == 0, /* Win9x */ - "LZOpenFileA returned '%s', but was expected to return '%s' or '%s'\n", - test.szPathName, expected, filled_0xA5); -} - -static void test_LZOpenFileA(void) -{ - OFSTRUCT test; - DWORD retval; - INT file; - static char badfilename_[] = "badfilename_"; - char expected[MAX_PATH]; - char short_expected[MAX_PATH]; - - SetLastError(0xfaceabee); - /* Check for nonexistent file. */ - file = LZOpenFileA(badfilename_, &test, OF_READ); - ok(file == LZERROR_BADINHANDLE, - "LZOpenFileA succeeded on nonexistent file\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "GetLastError() returns %d\n", GetLastError()); - LZClose(file); - - memset(&test, 0xA5, sizeof(test)); - full_file_path_name_in_a_CWD(filename_, expected, FALSE); - - /* Create an empty file. */ - file = LZOpenFileA(filename_, &test, OF_CREATE); - ok(file >= 0, "LZOpenFileA failed on creation\n"); - ok(test.cBytes == sizeof(OFSTRUCT), - "LZOpenFileA set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_SUCCESS || - broken(test.nErrCode != ERROR_SUCCESS), /* win9x */ - "LZOpenFileA set test.nErrCode to %d\n", test.nErrCode); - ok(lstrcmpA(test.szPathName, expected) == 0, - "LZOpenFileA returned '%s', but was expected to return '%s'\n", - test.szPathName, expected); - LZClose(file); - - retval = GetFileAttributesA(filename_); - ok(retval != INVALID_FILE_ATTRIBUTES, "GetFileAttributesA: error %d\n", - GetLastError()); - - /* Check various opening options: */ - memset(&test, 0xA5, sizeof(test)); - full_file_path_name_in_a_CWD(filename_, short_expected, TRUE); - - /* a, for reading. */ - file = LZOpenFileA(filename_, &test, OF_READ); - ok(file >= 0, "LZOpenFileA failed on read\n"); - ok(test.cBytes == sizeof(OFSTRUCT) || - broken(test.cBytes == FIELD_OFFSET(OFSTRUCT, szPathName) + lstrlenA(test.szPathName)), /* win9x */ - "LZOpenFileA set test.cBytes to %d '%s'('%s')\n", test.cBytes, expected, short_expected); - ok(test.nErrCode == ERROR_SUCCESS, - "LZOpenFileA set test.nErrCode to %d\n", test.nErrCode); - ok(lstrcmpA(test.szPathName, expected) == 0 || - lstrcmpA(test.szPathName, short_expected) == 0, /* Win9x */ - "LZOpenFileA returned '%s', but was expected to return '%s' or '%s'\n", - test.szPathName, expected, short_expected); - LZClose(file); - - memset(&test, 0xA5, sizeof(test)); - - /* b, for writing. */ - file = LZOpenFileA(filename_, &test, OF_WRITE); - ok(file >= 0, "LZOpenFileA failed on write\n"); - ok(test.cBytes == sizeof(OFSTRUCT) || - broken(test.cBytes == FIELD_OFFSET(OFSTRUCT, szPathName) + lstrlenA(test.szPathName)), /* win9x */ - "LZOpenFileA set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_SUCCESS, - "LZOpenFileA set test.nErrCode to %d\n", test.nErrCode); - ok(lstrcmpA(test.szPathName, expected) == 0 || - lstrcmpA(test.szPathName, short_expected) == 0, /* Win9x */ - "LZOpenFileA returned '%s', but was expected to return '%s' or '%s'\n", - test.szPathName, expected, short_expected); - LZClose(file); - - memset(&test, 0xA5, sizeof(test)); - - /* c, for reading and writing. */ - file = LZOpenFileA(filename_, &test, OF_READWRITE); - ok(file >= 0, "LZOpenFileA failed on read/write\n"); - ok(test.cBytes == sizeof(OFSTRUCT) || - broken(test.cBytes == FIELD_OFFSET(OFSTRUCT, szPathName) + lstrlenA(test.szPathName)), /* win9x */ - "LZOpenFileA set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_SUCCESS, - "LZOpenFileA set test.nErrCode to %d\n", test.nErrCode); - ok(lstrcmpA(test.szPathName, expected) == 0 || - lstrcmpA(test.szPathName, short_expected) == 0, /* Win9x */ - "LZOpenFileA returned '%s', but was expected to return '%s' or '%s'\n", - test.szPathName, expected, short_expected); - LZClose(file); - - memset(&test, 0xA5, sizeof(test)); - - /* d, for checking file existence. */ - file = LZOpenFileA(filename_, &test, OF_EXIST); - ok(file >= 0, "LZOpenFileA failed on read/write\n"); - ok(test.cBytes == sizeof(OFSTRUCT) || - broken(test.cBytes == FIELD_OFFSET(OFSTRUCT, szPathName) + lstrlenA(test.szPathName)), /* win9x */ - "LZOpenFileA set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_SUCCESS, - "LZOpenFileA set test.nErrCode to %d\n", test.nErrCode); - ok(lstrcmpA(test.szPathName, expected) == 0 || - lstrcmpA(test.szPathName, short_expected) == 0, /* Win9x */ - "LZOpenFileA returned '%s', but was expected to return '%s' or '%s'\n", - test.szPathName, expected, short_expected); - LZClose(file); - - memset(&test, 0xA5, sizeof(test)); - - /* Delete the file then make sure it doesn't exist anymore. */ - file = LZOpenFileA(filename_, &test, OF_DELETE); - ok(file >= 0, "LZOpenFileA failed on delete\n"); - ok(test.cBytes == sizeof(OFSTRUCT) || - broken(test.cBytes == FIELD_OFFSET(OFSTRUCT, szPathName) + lstrlenA(test.szPathName)), /* win9x */ - "LZOpenFileA set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_SUCCESS, - "LZOpenFileA set test.nErrCode to %d\n", test.nErrCode); - ok(lstrcmpA(test.szPathName, expected) == 0 || - lstrcmpA(test.szPathName, short_expected) == 0, /* Win9x */ - "LZOpenFileA returned '%s', but was expected to return '%s' or '%s'\n", - test.szPathName, expected, short_expected); - LZClose(file); - - retval = GetFileAttributesA(filename_); - ok(retval == INVALID_FILE_ATTRIBUTES, - "GetFileAttributesA succeeded on deleted file\n"); - - test_LZOpenFileA_existing_compressed(); - test_LZOpenFileA_nonexisting_compressed(); -} - -static void test_LZRead(void) -{ - HANDLE file; - DWORD ret; - int cfile; - OFSTRUCT test; - BOOL retok; - - /* Create the compressed file. */ - file = CreateFileA(filename_, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, 0); - ok(file != INVALID_HANDLE_VALUE, "Could not create test file\n"); - retok = WriteFile(file, compressed_file, compressed_file_size, &ret, 0); - ok( retok, "WriteFile: error %d\n", GetLastError()); - ok(ret == compressed_file_size, "Wrote wrong number of bytes with WriteFile?\n"); - CloseHandle(file); - - cfile = LZOpenFileA(filename_, &test, OF_READ); - ok(cfile > 0, "LZOpenFileA failed\n"); - - ret = LZRead(cfile, buf, uncompressed_data_size); - ok(ret == uncompressed_data_size, "Read wrong number of bytes\n"); - - /* Compare what we read with what we think we should read. */ - ok(memcmp(buf, uncompressed_data, uncompressed_data_size) == 0, - "buffer contents mismatch\n"); - - todo_wine { - /* Wine returns the number of bytes actually read instead of an error */ - ret = LZRead(cfile, buf, uncompressed_data_size); - ok(ret == LZERROR_READ, "Expected read-past-EOF to return LZERROR_READ\n"); - } - - LZClose(cfile); - - ret = DeleteFileA(filename_); - ok(ret, "DeleteFileA: error %d\n", GetLastError()); -} - -static void test_LZCopy(void) -{ - HANDLE file; - DWORD ret; - int source, dest; - OFSTRUCT stest, dtest; - BOOL retok; - - /* Create the compressed file. */ - file = CreateFileA(filename_, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, 0); - ok(file != INVALID_HANDLE_VALUE, - "CreateFileA: error %d\n", GetLastError()); - retok = WriteFile(file, compressed_file, compressed_file_size, &ret, 0); - ok( retok, "WriteFile error %d\n", GetLastError()); - ok(ret == compressed_file_size, "Wrote wrong number of bytes\n"); - CloseHandle(file); - - source = LZOpenFileA(filename_, &stest, OF_READ); - ok(source >= 0, "LZOpenFileA failed on compressed file\n"); - dest = LZOpenFileA(filename2, &dtest, OF_CREATE); - ok(dest >= 0, "LZOpenFileA failed on creating new file %d\n", dest); - - ret = LZCopy(source, dest); - ok(ret > 0, "LZCopy error\n"); - - LZClose(source); - LZClose(dest); - - file = CreateFileA(filename2, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0); - ok(file != INVALID_HANDLE_VALUE, - "CreateFileA: error %d\n", GetLastError()); - - retok = ReadFile(file, buf, uncompressed_data_size*2, &ret, 0); - ok( retok && ret == uncompressed_data_size, "ReadFile: error %d\n", GetLastError()); - /* Compare what we read with what we think we should read. */ - ok(!memcmp(buf, uncompressed_data, uncompressed_data_size), - "buffer contents mismatch\n"); - CloseHandle(file); - - ret = DeleteFileA(filename_); - ok(ret, "DeleteFileA: error %d\n", GetLastError()); - ret = DeleteFileA(filename2); - ok(ret, "DeleteFileA: error %d\n", GetLastError()); -} - -static void create_fileW(WCHAR *fnameW) -{ - INT file; - OFSTRUCT ofs; - DWORD retval; - - file = LZOpenFileW(fnameW, &ofs, OF_CREATE); - ok(file >= 0, "LZOpenFileW failed on creation\n"); - LZClose(file); - retval = GetFileAttributesW(fnameW); - ok(retval != INVALID_FILE_ATTRIBUTES, "GetFileAttributesW('%s'): error %d\n", ofs.szPathName, GetLastError()); -} - -static void delete_fileW(WCHAR *fnameW) -{ - INT file; - OFSTRUCT ofs; - DWORD retval; - - file = LZOpenFileW(fnameW, &ofs, OF_DELETE); - ok(file >= 0, "LZOpenFileW failed on delete\n"); - LZClose(file); - retval = GetFileAttributesW(fnameW); - ok(retval == INVALID_FILE_ATTRIBUTES, "GetFileAttributesW succeeded on deleted file ('%s')\n", ofs.szPathName); -} - -static void test_LZOpenFileW_existing_compressed(void) -{ - OFSTRUCT test; - INT file; - char expected[MAX_PATH]; - - /* Try to open existing compressed files: */ - create_fileW(filenameW_); - create_fileW(dotlessW_); - create_fileW(extlessW_); - create_fileW(_terminatedW_); - - full_file_path_name_in_a_CWD(filename_, expected, FALSE); - memset(&test, 0xA5, sizeof(test)); - - /* a, using 8.3-conformant file name. */ - file = LZOpenFileW(filenameW, &test, OF_EXIST); - /* If the file "foo.xxx" does not exist, LZOpenFileW should then - check for the file "foo.xx_" and open that. - */ - ok(file >= 0, "LZOpenFileW failed on switching to a compressed file name\n"); - ok(test.cBytes == sizeof(OFSTRUCT), - "LZOpenFileW set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_SUCCESS, "LZOpenFileW set test.nErrCode to %d\n", - test.nErrCode); - /* Note that W-function returns A-string by a OFSTRUCT.szPathName: */ - ok(lstrcmpA(test.szPathName, expected) == 0, - "LZOpenFileW returned '%s', but was expected to return '%s'\n", - test.szPathName, expected); - LZClose(file); - - memset(&test, 0xA5, sizeof(test)); - full_file_path_name_in_a_CWD(dotless_, expected, FALSE); - - /* b, using dotless file name. */ - file = LZOpenFileW(dotlessW, &test, OF_EXIST); - ok(file >= 0, "LZOpenFileW failed on switching to a compressed file name\n"); - ok(test.cBytes == sizeof(OFSTRUCT), - "LZOpenFileW set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_SUCCESS, "LZOpenFileW set test.nErrCode to %d\n", - test.nErrCode); - /* Note that W-function returns A-string by a OFSTRUCT.szPathName: */ - ok(lstrcmpA(test.szPathName, expected) == 0, - "LZOpenFileW returned '%s', but was expected to return '%s'\n", - test.szPathName, expected); - LZClose(file); - - memset(&test, 0xA5, sizeof(test)); - full_file_path_name_in_a_CWD(extless_, expected, FALSE); - - /* c, using extensionless file name. */ - file = LZOpenFileW(extlessW, &test, OF_EXIST); - ok(file >= 0, "LZOpenFileW failed on switching to a compressed file name\n"); - ok(test.cBytes == sizeof(OFSTRUCT), - "LZOpenFileW set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_SUCCESS, "LZOpenFileW set test.nErrCode to %d\n", - test.nErrCode); - /* Note that W-function returns A-string by a OFSTRUCT.szPathName: */ - ok(lstrcmpA(test.szPathName, expected) == 0, - "LZOpenFileW returned '%s', but was expected to return '%s'\n", - test.szPathName, expected); - LZClose(file); - - memset(&test, 0xA5, sizeof(test)); - full_file_path_name_in_a_CWD(_terminated_, expected, FALSE); - - /* d, using underscore-terminated file name. */ - file = LZOpenFileW(_terminatedW, &test, OF_EXIST); - ok(file >= 0, "LZOpenFileW failed on switching to a compressed file name\n"); - ok(test.cBytes == sizeof(OFSTRUCT), - "LZOpenFileW set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_SUCCESS, "LZOpenFileW set test.nErrCode to %d\n", - test.nErrCode); - /* Note that W-function returns A-string by a OFSTRUCT.szPathName: */ - ok(lstrcmpA(test.szPathName, expected) == 0, - "LZOpenFileW returned '%s', but was expected to return '%s'\n", - test.szPathName, expected); - LZClose(file); - - delete_fileW(filenameW_); - delete_fileW(dotlessW_); - delete_fileW(extlessW_); - delete_fileW(_terminatedW_); -} - -static void test_LZOpenFileW_nonexisting_compressed(void) -{ - OFSTRUCT test; - INT file; - char expected[MAX_PATH]; - char filled_0xA5[OFS_MAXPATHNAME]; - - /* Try to open nonexisting compressed files: */ - memset(&filled_0xA5, 0xA5, OFS_MAXPATHNAME); - memset(&test, 0xA5, sizeof(test)); - full_file_path_name_in_a_CWD(filename_, expected, FALSE); - SetLastError(0xfaceabee); - - /* a, using 8.3-conformant file name. */ - file = LZOpenFileW(filenameW, &test, OF_EXIST); - /* If the file "foo.xxx" does not exist, LZOpenFileA should then - check for the file "foo.xx_" and open that -- at least on some - operating systems. Doesn't seem to on my copy of Win98. - */ - ok(file == LZERROR_BADINHANDLE, - "LZOpenFileW succeeded on nonexistent file\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "GetLastError() returns %d\n", GetLastError()); - todo_wine - ok(test.cBytes == 0xA5, - "LZOpenFileW set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_FILE_NOT_FOUND, - "LZOpenFileW set test.nErrCode to %d\n", test.nErrCode); - ok(lstrcmpA(test.szPathName, expected) == 0, - "LZOpenFileW returned '%s', but was expected to return '%s' or '%s'\n", - test.szPathName, expected, filled_0xA5); - - memset(&filled_0xA5, 0xA5, OFS_MAXPATHNAME); - memset(&test, 0xA5, sizeof(test)); - full_file_path_name_in_a_CWD(dotless_, expected, FALSE); - SetLastError(0xfaceabee); - - /* b, using dotless file name. */ - file = LZOpenFileW(dotlessW, &test, OF_EXIST); - ok(file == LZERROR_BADINHANDLE, - "LZOpenFileW succeeded on nonexistent file\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "GetLastError() returns %d\n", GetLastError()); - todo_wine - ok(test.cBytes == 0xA5, - "LZOpenFileW set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_FILE_NOT_FOUND, - "LZOpenFileW set test.nErrCode to %d\n", test.nErrCode); - ok(lstrcmpA(test.szPathName, expected) == 0, - "LZOpenFileW returned '%s', but was expected to return '%s' or '%s'\n", - test.szPathName, expected, filled_0xA5); - - memset(&filled_0xA5, 0xA5, OFS_MAXPATHNAME); - memset(&test, 0xA5, sizeof(test)); - full_file_path_name_in_a_CWD(extless_, expected, FALSE); - SetLastError(0xfaceabee); - - /* c, using extensionless file name. */ - file = LZOpenFileW(extlessW, &test, OF_EXIST); - ok(file == LZERROR_BADINHANDLE, - "LZOpenFileW succeeded on nonexistent file\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "GetLastError() returns %d\n", GetLastError()); - todo_wine - ok(test.cBytes == 0xA5, - "LZOpenFileW set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_FILE_NOT_FOUND, - "LZOpenFileW set test.nErrCode to %d\n", test.nErrCode); - ok(lstrcmpA(test.szPathName, expected) == 0, - "LZOpenFileW returned '%s', but was expected to return '%s' or '%s'\n", - test.szPathName, expected, filled_0xA5); - - memset(&filled_0xA5, 0xA5, OFS_MAXPATHNAME); - memset(&test, 0xA5, sizeof(test)); - full_file_path_name_in_a_CWD(_terminated_, expected, FALSE); - SetLastError(0xfaceabee); - - /* d, using underscore-terminated file name. */ - file = LZOpenFileW(_terminatedW, &test, OF_EXIST); - ok(file == LZERROR_BADINHANDLE, - "LZOpenFileW succeeded on nonexistent file\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "GetLastError() returns %d\n", GetLastError()); - todo_wine - ok(test.cBytes == 0xA5, - "LZOpenFileW set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_FILE_NOT_FOUND, - "LZOpenFileW set test.nErrCode to %d\n", test.nErrCode); - ok(lstrcmpA(test.szPathName, expected) == 0, - "LZOpenFileW returned '%s', but was expected to return '%s' or '%s'\n", - test.szPathName, expected, filled_0xA5); -} - -static void test_LZOpenFileW(void) -{ - OFSTRUCT test; - DWORD retval; - INT file; - static WCHAR badfilenameW[] = {'b','a','d','f','i','l','e','n','a','m','e','.','x','t','n',0}; - char expected[MAX_PATH]; - - SetLastError(0xfaceabee); - /* Check for nonexistent file. */ - file = LZOpenFileW(badfilenameW, &test, OF_READ); - if(GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("LZOpenFileW call is not implemented\n"); - return; - } - ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "GetLastError() returns %d\n", GetLastError()); - ok(file == LZERROR_BADINHANDLE, "LZOpenFileW succeeded on nonexistent file\n"); - LZClose(file); - - memset(&test, 0xA5, sizeof(test)); - full_file_path_name_in_a_CWD(filename_, expected, FALSE); - - /* Create an empty file. */ - file = LZOpenFileW(filenameW_, &test, OF_CREATE); - ok(file >= 0, "LZOpenFile failed on creation\n"); - ok(test.cBytes == sizeof(OFSTRUCT), - "LZOpenFileW set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_SUCCESS, - "LZOpenFileW set test.nErrCode to %d\n", test.nErrCode); - ok(lstrcmpA(test.szPathName, expected) == 0, - "LZOpenFileW returned '%s', but was expected to return '%s'\n", - test.szPathName, expected); - LZClose(file); - - retval = GetFileAttributesW(filenameW_); - ok(retval != INVALID_FILE_ATTRIBUTES, "GetFileAttributes: error %d\n", - GetLastError()); - - /* Check various opening options: */ - memset(&test, 0xA5, sizeof(test)); - - /* a, for reading. */ - file = LZOpenFileW(filenameW_, &test, OF_READ); - ok(file >= 0, "LZOpenFileW failed on read\n"); - ok(test.cBytes == sizeof(OFSTRUCT), - "LZOpenFileW set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_SUCCESS, - "LZOpenFileW set test.nErrCode to %d\n", test.nErrCode); - ok(lstrcmpA(test.szPathName, expected) == 0, - "LZOpenFileW returned '%s', but was expected to return '%s'\n", - test.szPathName, expected); - LZClose(file); - - memset(&test, 0xA5, sizeof(test)); - - /* b, for writing. */ - file = LZOpenFileW(filenameW_, &test, OF_WRITE); - ok(file >= 0, "LZOpenFileW failed on write\n"); - ok(test.cBytes == sizeof(OFSTRUCT), - "LZOpenFileW set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_SUCCESS, - "LZOpenFileW set test.nErrCode to %d\n", test.nErrCode); - ok(lstrcmpA(test.szPathName, expected) == 0, - "LZOpenFileW returned '%s', but was expected to return '%s'\n", - test.szPathName, expected); - LZClose(file); - - memset(&test, 0xA5, sizeof(test)); - - /* c, for reading and writing. */ - file = LZOpenFileW(filenameW_, &test, OF_READWRITE); - ok(file >= 0, "LZOpenFileW failed on read/write\n"); - ok(test.cBytes == sizeof(OFSTRUCT), - "LZOpenFileW set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_SUCCESS, - "LZOpenFileW set test.nErrCode to %d\n", test.nErrCode); - ok(lstrcmpA(test.szPathName, expected) == 0, - "LZOpenFileW returned '%s', but was expected to return '%s'\n", - test.szPathName, expected); - LZClose(file); - - memset(&test, 0xA5, sizeof(test)); - - /* d, for checking file existence. */ - file = LZOpenFileW(filenameW_, &test, OF_EXIST); - ok(file >= 0, "LZOpenFileW failed on read/write\n"); - ok(test.cBytes == sizeof(OFSTRUCT), - "LZOpenFileW set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_SUCCESS, - "LZOpenFileW set test.nErrCode to %d\n", test.nErrCode); - ok(lstrcmpA(test.szPathName, expected) == 0, - "LZOpenFileW returned '%s', but was expected to return '%s'\n", - test.szPathName, expected); - LZClose(file); - - memset(&test, 0xA5, sizeof(test)); - - /* Delete the file then make sure it doesn't exist anymore. */ - file = LZOpenFileW(filenameW_, &test, OF_DELETE); - ok(file >= 0, "LZOpenFileW failed on delete\n"); - ok(test.cBytes == sizeof(OFSTRUCT), - "LZOpenFileW set test.cBytes to %d\n", test.cBytes); - ok(test.nErrCode == ERROR_SUCCESS, - "LZOpenFileW set test.nErrCode to %d\n", test.nErrCode); - ok(lstrcmpA(test.szPathName, expected) == 0, - "LZOpenFileW returned '%s', but was expected to return '%s'\n", - test.szPathName, expected); - LZClose(file); - - retval = GetFileAttributesW(filenameW_); - ok(retval == INVALID_FILE_ATTRIBUTES, - "GetFileAttributesW succeeded on deleted file\n"); - - test_LZOpenFileW_existing_compressed(); - test_LZOpenFileW_nonexisting_compressed(); -} - - -START_TEST(lzexpand_main) -{ - buf = HeapAlloc(GetProcessHeap(), 0, uncompressed_data_size * 2); - test_LZOpenFileA(); - test_LZOpenFileW(); - test_LZRead(); - test_LZCopy(); - HeapFree(GetProcessHeap(), 0, buf); -} diff --git a/rostests/winetests/lz32/testlist.c b/rostests/winetests/lz32/testlist.c deleted file mode 100644 index f0503e71de7..00000000000 --- a/rostests/winetests/lz32/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_lzexpand_main(void); - -const struct test winetest_testlist[] = -{ - { "lzexpand_main", func_lzexpand_main }, - { 0, 0 } -}; diff --git a/rostests/winetests/mapi32/CMakeLists.txt b/rostests/winetests/mapi32/CMakeLists.txt deleted file mode 100644 index d135148d81d..00000000000 --- a/rostests/winetests/mapi32/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - imalloc.c - prop.c - util.c - testlist.c) - -add_executable(mapi32_winetest ${SOURCE}) -target_link_libraries(mapi32_winetest wine uuid) -set_module_type(mapi32_winetest win32cui) -add_importlibs(mapi32_winetest advapi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET mapi32_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/mapi32/imalloc.c b/rostests/winetests/mapi32/imalloc.c deleted file mode 100644 index 341155cf9d6..00000000000 --- a/rostests/winetests/mapi32/imalloc.c +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Unit test suite for MAPI IMalloc functions - * - * Copyright 2004 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 - */ - -#define COBJMACROS -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "winerror.h" -#include "winnt.h" -#include "mapiutil.h" -#include "mapi32_test.h" - -static HMODULE hMapi32 = 0; - -static SCODE (WINAPI *pScInitMapiUtil)(ULONG); -static LPMALLOC (WINAPI *pMAPIGetDefaultMalloc)(void); - -static void test_IMalloc(void) -{ - LPVOID lpMem; - ULONG ulRef; - int iRet; - HRESULT hRet; - LPMALLOC lpMalloc; - LPVOID lpVoid; - - pMAPIGetDefaultMalloc = (void*)GetProcAddress(hMapi32, - "MAPIGetDefaultMalloc@0"); - if (!pMAPIGetDefaultMalloc) - { - win_skip("MAPIGetDefaultMalloc is not available\n"); - return; - } - - lpMalloc = pMAPIGetDefaultMalloc(); - ok(lpMalloc != NULL, "Expected MAPIGetDefaultMalloc to return non-NULL\n"); - if (!lpMalloc) - { - skip("MAPIGetDefaultMalloc failed\n"); - return; - } - - lpVoid = NULL; - hRet = IMalloc_QueryInterface(lpMalloc, &IID_IUnknown, &lpVoid); - ok (hRet == S_OK && lpVoid != NULL, - "IID_IUnknown: expected S_OK, non-null, got 0x%08x, %p\n", - hRet, lpVoid); - - lpVoid = NULL; - hRet = IMalloc_QueryInterface(lpMalloc, &IID_IMalloc, &lpVoid); - ok (hRet == S_OK && lpVoid != NULL, - "IID_IIMalloc: expected S_OK, non-null, got 0x%08x, %p\n", - hRet, lpVoid); - - /* Prove that native mapi uses LocalAlloc/LocalFree */ - lpMem = IMalloc_Alloc(lpMalloc, 61); - ok (lpMem && IMalloc_GetSize(lpMalloc, lpMem) == LocalSize(lpMem), - "Expected non-null, same size, got %p, %s size\n", lpMem, - lpMem ? "different" : "same"); - - iRet = IMalloc_DidAlloc(lpMalloc, lpMem); - ok (iRet == -1, "DidAlloc, expected -1. got %d\n", iRet); - - IMalloc_HeapMinimize(lpMalloc); - - LocalFree(lpMem); - - ulRef = IMalloc_AddRef(lpMalloc); - ok (ulRef == 1u, "AddRef expected 1, returned %d\n", ulRef); - - ulRef = IMalloc_Release(lpMalloc); - ok (ulRef == 1u, "AddRef expected 1, returned %d\n", ulRef); - - IMalloc_Release(lpMalloc); -} - -START_TEST(imalloc) -{ - SCODE ret; - - if (!HaveDefaultMailClient()) - { - win_skip("No default mail client installed\n"); - return; - } - - hMapi32 = LoadLibraryA("mapi32.dll"); - - pScInitMapiUtil = (void*)GetProcAddress(hMapi32, "ScInitMapiUtil@4"); - if (!pScInitMapiUtil) - { - win_skip("ScInitMapiUtil is not available\n"); - FreeLibrary(hMapi32); - return; - } - - SetLastError(0xdeadbeef); - ret = pScInitMapiUtil(0); - if ((ret != S_OK) && (GetLastError() == ERROR_PROC_NOT_FOUND)) - { - win_skip("ScInitMapiUtil is not implemented\n"); - FreeLibrary(hMapi32); - return; - } - else if ((ret == E_FAIL) && (GetLastError() == ERROR_INVALID_HANDLE)) - { - win_skip("ScInitMapiUtil doesn't work on some Win98 and WinME systems\n"); - FreeLibrary(hMapi32); - return; - } - - test_IMalloc(); - - FreeLibrary(hMapi32); -} diff --git a/rostests/winetests/mapi32/mapi32.rbuild b/rostests/winetests/mapi32/mapi32.rbuild deleted file mode 100644 index 4d27118fbd8..00000000000 --- a/rostests/winetests/mapi32/mapi32.rbuild +++ /dev/null @@ -1,16 +0,0 @@ - - - - - . - - imalloc.c - prop.c - util.c - testlist.c - wine - advapi32 - uuid - ntdll - - diff --git a/rostests/winetests/mapi32/mapi32_test.h b/rostests/winetests/mapi32/mapi32_test.h deleted file mode 100644 index 5002dbc99b3..00000000000 --- a/rostests/winetests/mapi32/mapi32_test.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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 - */ - -/* - * Return FALSE if no default mail client is installed. - */ -static BOOL HaveDefaultMailClient(void) -{ - HKEY Key; - DWORD Type, Size; - BYTE Buffer[64]; - BOOL HasHKCUKey; - - /* We check the default value of both HKCU\Software\Clients\Mail and - * HKLM\Software\Clients\Mail, if one of them is present there is a default - * mail client. If neither of these keys is present, we might be running - * on an old Windows version (W95, NT4) and we assume a default mail client - * might be available. Only if one of the keys is present, but there is - * no default value do we assume there is no default client. */ - if (RegOpenKeyExA(HKEY_CURRENT_USER, "SOFTWARE\\Clients\\Mail", 0, KEY_QUERY_VALUE, &Key) == ERROR_SUCCESS) - { - Size = sizeof(Buffer); - /* Any return value besides ERROR_FILE_NOT_FOUND (including success, - ERROR_MORE_DATA) indicates the value is present */ - if (RegQueryValueExA(Key, NULL, NULL, &Type, Buffer, &Size) != ERROR_FILE_NOT_FOUND) - { - RegCloseKey(Key); - return TRUE; - } - RegCloseKey(Key); - HasHKCUKey = TRUE; - } - else - HasHKCUKey = FALSE; - - if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Clients\\Mail", 0, KEY_QUERY_VALUE, &Key) == ERROR_SUCCESS) - { - Size = sizeof(Buffer); - if (RegQueryValueExA(Key, NULL, NULL, &Type, Buffer, &Size) != ERROR_FILE_NOT_FOUND) - { - RegCloseKey(Key); - return TRUE; - } - RegCloseKey(Key); - return FALSE; - } - - return ! HasHKCUKey; -} diff --git a/rostests/winetests/mapi32/prop.c b/rostests/winetests/mapi32/prop.c deleted file mode 100644 index 15d6d98e4b5..00000000000 --- a/rostests/winetests/mapi32/prop.c +++ /dev/null @@ -1,1478 +0,0 @@ -/* - * Unit test suite for MAPI property functions - * - * Copyright 2004 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 "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "winerror.h" -#include "winnt.h" -#include "initguid.h" -#include "mapiutil.h" -#include "mapitags.h" -#include "mapi32_test.h" - -static HMODULE hMapi32 = 0; - -static SCODE (WINAPI *pScInitMapiUtil)(ULONG); -static void (WINAPI *pDeinitMapiUtil)(void); -static SCODE (WINAPI *pPropCopyMore)(LPSPropValue,LPSPropValue,ALLOCATEMORE*,LPVOID); -static ULONG (WINAPI *pUlPropSize)(LPSPropValue); -static BOOL (WINAPI *pFPropContainsProp)(LPSPropValue,LPSPropValue,ULONG); -static BOOL (WINAPI *pFPropCompareProp)(LPSPropValue,ULONG,LPSPropValue); -static LONG (WINAPI *pLPropCompareProp)(LPSPropValue,LPSPropValue); -static LPSPropValue (WINAPI *pPpropFindProp)(LPSPropValue,ULONG,ULONG); -static SCODE (WINAPI *pScCountProps)(INT,LPSPropValue,ULONG*); -static SCODE (WINAPI *pScCopyProps)(int,LPSPropValue,LPVOID,ULONG*); -static SCODE (WINAPI *pScRelocProps)(int,LPSPropValue,LPVOID,LPVOID,ULONG*); -static LPSPropValue (WINAPI *pLpValFindProp)(ULONG,ULONG,LPSPropValue); -static BOOL (WINAPI *pFBadRglpszA)(LPSTR*,ULONG); -static BOOL (WINAPI *pFBadRglpszW)(LPWSTR*,ULONG); -static BOOL (WINAPI *pFBadRowSet)(LPSRowSet); -static ULONG (WINAPI *pFBadPropTag)(ULONG); -static ULONG (WINAPI *pFBadRow)(LPSRow); -static ULONG (WINAPI *pFBadProp)(LPSPropValue); -static ULONG (WINAPI *pFBadColumnSet)(LPSPropTagArray); -static SCODE (WINAPI *pCreateIProp)(LPCIID,ALLOCATEBUFFER*,ALLOCATEMORE*, - FREEBUFFER*,LPVOID,LPPROPDATA*); -static SCODE (WINAPI *pMAPIAllocateBuffer)(ULONG, LPVOID); -static SCODE (WINAPI *pMAPIAllocateMore)(ULONG, LPVOID, LPVOID); -static SCODE (WINAPI *pMAPIInitialize)(LPVOID); -static SCODE (WINAPI *pMAPIFreeBuffer)(LPVOID); -static void (WINAPI *pMAPIUninitialize)(void); - -static BOOL InitFuncPtrs(void) -{ - hMapi32 = LoadLibraryA("mapi32.dll"); - - pPropCopyMore = (void*)GetProcAddress(hMapi32, "PropCopyMore@16"); - pUlPropSize = (void*)GetProcAddress(hMapi32, "UlPropSize@4"); - pFPropContainsProp = (void*)GetProcAddress(hMapi32, "FPropContainsProp@12"); - pFPropCompareProp = (void*)GetProcAddress(hMapi32, "FPropCompareProp@12"); - pLPropCompareProp = (void*)GetProcAddress(hMapi32, "LPropCompareProp@8"); - pPpropFindProp = (void*)GetProcAddress(hMapi32, "PpropFindProp@12"); - pScCountProps = (void*)GetProcAddress(hMapi32, "ScCountProps@12"); - pScCopyProps = (void*)GetProcAddress(hMapi32, "ScCopyProps@16"); - pScRelocProps = (void*)GetProcAddress(hMapi32, "ScRelocProps@20"); - pLpValFindProp = (void*)GetProcAddress(hMapi32, "LpValFindProp@12"); - pFBadRglpszA = (void*)GetProcAddress(hMapi32, "FBadRglpszA@8"); - pFBadRglpszW = (void*)GetProcAddress(hMapi32, "FBadRglpszW@8"); - pFBadRowSet = (void*)GetProcAddress(hMapi32, "FBadRowSet@4"); - pFBadPropTag = (void*)GetProcAddress(hMapi32, "FBadPropTag@4"); - pFBadRow = (void*)GetProcAddress(hMapi32, "FBadRow@4"); - pFBadProp = (void*)GetProcAddress(hMapi32, "FBadProp@4"); - pFBadColumnSet = (void*)GetProcAddress(hMapi32, "FBadColumnSet@4"); - pCreateIProp = (void*)GetProcAddress(hMapi32, "CreateIProp@24"); - - pScInitMapiUtil = (void*)GetProcAddress(hMapi32, "ScInitMapiUtil@4"); - pDeinitMapiUtil = (void*)GetProcAddress(hMapi32, "DeinitMapiUtil@0"); - pMAPIAllocateBuffer = (void*)GetProcAddress(hMapi32, "MAPIAllocateBuffer"); - pMAPIAllocateMore = (void*)GetProcAddress(hMapi32, "MAPIAllocateMore"); - pMAPIFreeBuffer = (void*)GetProcAddress(hMapi32, "MAPIFreeBuffer"); - pMAPIInitialize = (void*)GetProcAddress(hMapi32, "MAPIInitialize"); - pMAPIUninitialize = (void*)GetProcAddress(hMapi32, "MAPIUninitialize"); - - return pMAPIAllocateBuffer && pMAPIAllocateMore && pMAPIFreeBuffer && - pScInitMapiUtil && pDeinitMapiUtil; -} - -/* FIXME: Test PT_I2, PT_I4, PT_R4, PT_R8, PT_CURRENCY, PT_APPTIME, PT_SYSTIME, - * PT_ERROR, PT_BOOLEAN, PT_I8, and PT_CLSID. */ -static ULONG ptTypes[] = { - PT_STRING8, PT_BINARY, PT_UNICODE -}; - -static inline int strcmpW(const WCHAR *str1, const WCHAR *str2) -{ - while (*str1 && (*str1 == *str2)) { str1++; str2++; } - return *str1 - *str2; -} - -static void test_PropCopyMore(void) -{ - static char szHiA[] = "Hi!"; - static WCHAR szHiW[] = { 'H', 'i', '!', '\0' }; - SPropValue *lpDest = NULL, *lpSrc = NULL; - ULONG i; - SCODE scode; - - if (!pPropCopyMore) - { - win_skip("PropCopyMore is not available\n"); - return; - } - - scode = pMAPIAllocateBuffer(sizeof(SPropValue), &lpDest); - ok(scode == S_OK, "Expected MAPIAllocateBuffer to return S_OK, got 0x%x\n", scode); - if (FAILED(scode)) - { - skip("MAPIAllocateBuffer failed\n"); - return; - } - - scode = pMAPIAllocateMore(sizeof(SPropValue), lpDest, &lpSrc); - ok(scode == S_OK, "Expected MAPIAllocateMore to return S_OK, got 0x%x\n", scode); - if (FAILED(scode)) - { - skip("MAPIAllocateMore failed\n"); - return; - } - - for (i = 0; i < sizeof(ptTypes)/sizeof(ptTypes[0]); i++) - { - lpSrc->ulPropTag = ptTypes[i]; - - switch (ptTypes[i]) - { - case PT_STRING8: - lpSrc->Value.lpszA = szHiA; - break; - case PT_UNICODE: - lpSrc->Value.lpszW = szHiW; - break; - case PT_BINARY: - lpSrc->Value.bin.cb = 4; - lpSrc->Value.bin.lpb = (LPBYTE)szHiA; - break; - } - - memset(lpDest, 0xff, sizeof(SPropValue)); - - scode = pPropCopyMore(lpDest, lpSrc, (ALLOCATEMORE*)pMAPIAllocateMore, lpDest); - ok(!scode && lpDest->ulPropTag == lpSrc->ulPropTag, - "PropCopyMore: Expected 0x0,%d, got 0x%08x,%d\n", - lpSrc->ulPropTag, scode, lpDest->ulPropTag); - if (SUCCEEDED(scode)) - { - switch (ptTypes[i]) - { - case PT_STRING8: - ok(lstrcmpA(lpDest->Value.lpszA, lpSrc->Value.lpszA) == 0, - "PropCopyMore: Ascii string differs\n"); - break; - case PT_UNICODE: - ok(strcmpW(lpDest->Value.lpszW, lpSrc->Value.lpszW) == 0, - "PropCopyMore: Unicode string differs\n"); - break; - case PT_BINARY: - ok(lpDest->Value.bin.cb == 4 && - !memcmp(lpSrc->Value.bin.lpb, lpDest->Value.bin.lpb, 4), - "PropCopyMore: Binary array differs\n"); - break; - } - } - } - - /* Since all allocations are linked, freeing lpDest frees everything */ - scode = pMAPIFreeBuffer(lpDest); - ok(scode == S_OK, "Expected MAPIFreeBuffer to return S_OK, got 0x%x\n", scode); -} - -static void test_UlPropSize(void) -{ - static char szHiA[] = "Hi!"; - static WCHAR szHiW[] = { 'H', 'i', '!', '\0' }; - LPSTR buffa[2]; - LPWSTR buffw[2]; - SBinary buffbin[2]; - ULONG pt, exp, res; - - if (!pUlPropSize) - { - win_skip("UlPropSize is not available\n"); - return; - } - - for (pt = 0; pt < PROP_ID_INVALID; pt++) - { - SPropValue pv; - - memset(&pv, 0 ,sizeof(pv)); - pv.ulPropTag = pt; - - exp = 1u; /* Default to one item for non-MV properties */ - - switch (PROP_TYPE(pt)) - { - case PT_MV_I2: pv.Value.MVi.cValues = exp = 2; - case PT_I2: exp *= sizeof(USHORT); break; - case PT_MV_I4: pv.Value.MVl.cValues = exp = 2; - case PT_I4: exp *= sizeof(LONG); break; - case PT_MV_R4: pv.Value.MVflt.cValues = exp = 2; - case PT_R4: exp *= sizeof(float); break; - case PT_MV_DOUBLE: pv.Value.MVdbl.cValues = exp = 2; - case PT_R8: exp *= sizeof(double); break; - case PT_MV_CURRENCY: pv.Value.MVcur.cValues = exp = 2; - case PT_CURRENCY: exp *= sizeof(CY); break; - case PT_MV_APPTIME: pv.Value.MVat.cValues = exp = 2; - case PT_APPTIME: exp *= sizeof(double); break; - case PT_MV_SYSTIME: pv.Value.MVft.cValues = exp = 2; - case PT_SYSTIME: exp *= sizeof(FILETIME); break; - case PT_ERROR: exp = sizeof(SCODE); break; - case PT_BOOLEAN: exp = sizeof(USHORT); break; - case PT_OBJECT: exp = 0; break; - case PT_MV_I8: pv.Value.MVli.cValues = exp = 2; - case PT_I8: exp *= sizeof(LONG64); break; -#if 0 - /* My version of native mapi returns 0 for PT_MV_CLSID even if a valid - * array is given. This _has_ to be a bug, so Wine does - * the right thing(tm) and we don't test it here. - */ - case PT_MV_CLSID: pv.Value.MVguid.cValues = exp = 2; -#endif - case PT_CLSID: exp *= sizeof(GUID); break; - case PT_STRING8: - pv.Value.lpszA = szHiA; - exp = 4; - break; - case PT_UNICODE: - pv.Value.lpszW = szHiW; - exp = 4 * sizeof(WCHAR); - break; - case PT_BINARY: - pv.Value.bin.cb = exp = 19; - break; - case PT_MV_STRING8: - pv.Value.MVszA.cValues = 2; - pv.Value.MVszA.lppszA = buffa; - buffa[0] = szHiA; - buffa[1] = szHiA; - exp = 8; - break; - case PT_MV_UNICODE: - pv.Value.MVszW.cValues = 2; - pv.Value.MVszW.lppszW = buffw; - buffw[0] = szHiW; - buffw[1] = szHiW; - exp = 8 * sizeof(WCHAR); - break; - case PT_MV_BINARY: - pv.Value.MVbin.cValues = 2; - pv.Value.MVbin.lpbin = buffbin; - buffbin[0].cb = 19; - buffbin[1].cb = 1; - exp = 20; - break; - default: - exp = 0; - } - - res = pUlPropSize(&pv); - ok(res == exp, - "pt= %d: Expected %d, got %d\n", pt, exp, res); - } -} - -static void test_FPropContainsProp(void) -{ - static char szFull[] = "Full String"; - static char szFullLower[] = "full string"; - static char szPrefix[] = "Full"; - static char szPrefixLower[] = "full"; - static char szSubstring[] = "ll St"; - static char szSubstringLower[] = "ll st"; - SPropValue pvLeft, pvRight; - ULONG pt; - BOOL bRet; - - if (!pFPropContainsProp) - { - win_skip("FPropContainsProp is not available\n"); - return; - } - - /* Ensure that only PT_STRING8 and PT_BINARY are handled */ - for (pt = 0; pt < PROP_ID_INVALID; pt++) - { - if (pt == PT_STRING8 || pt == PT_BINARY) - continue; /* test these later */ - - memset(&pvLeft, 0 ,sizeof(pvLeft)); - memset(&pvRight, 0 ,sizeof(pvRight)); - pvLeft.ulPropTag = pvRight.ulPropTag = pt; - - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_FULLSTRING); - ok(bRet == FALSE, "pt= %d: Expected FALSE, got %d\n", pt, bRet); - } - - /* test the various flag combinations */ - pvLeft.ulPropTag = pvRight.ulPropTag = PT_STRING8; - pvLeft.Value.lpszA = szFull; - pvRight.Value.lpszA = szFull; - - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_FULLSTRING); - ok(bRet == TRUE, "(full,full)[] match failed\n"); - pvRight.Value.lpszA = szPrefix; - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_FULLSTRING); - ok(bRet == FALSE, "(full,prefix)[] match failed\n"); - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_PREFIX); - ok(bRet == TRUE, "(full,prefix)[PREFIX] match failed\n"); - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_SUBSTRING); - ok(bRet == TRUE, "(full,prefix)[SUBSTRING] match failed\n"); - pvRight.Value.lpszA = szPrefixLower; - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_PREFIX); - ok(bRet == FALSE, "(full,prefixlow)[PREFIX] match failed\n"); - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_SUBSTRING); - ok(bRet == FALSE, "(full,prefixlow)[SUBSTRING] match failed\n"); - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_PREFIX|FL_IGNORECASE); - ok(bRet == TRUE, "(full,prefixlow)[PREFIX|IGNORECASE] match failed\n"); - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_SUBSTRING|FL_IGNORECASE); - ok(bRet == TRUE, "(full,prefixlow)[SUBSTRING|IGNORECASE] match failed\n"); - pvRight.Value.lpszA = szSubstring; - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_FULLSTRING); - ok(bRet == FALSE, "(full,substr)[] match failed\n"); - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_PREFIX); - ok(bRet == FALSE, "(full,substr)[PREFIX] match failed\n"); - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_SUBSTRING); - ok(bRet == TRUE, "(full,substr)[SUBSTRING] match failed\n"); - pvRight.Value.lpszA = szSubstringLower; - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_PREFIX); - ok(bRet == FALSE, "(full,substrlow)[PREFIX] match failed\n"); - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_SUBSTRING); - ok(bRet == FALSE, "(full,substrlow)[SUBSTRING] match failed\n"); - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_PREFIX|FL_IGNORECASE); - ok(bRet == FALSE, "(full,substrlow)[PREFIX|IGNORECASE] match failed\n"); - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_SUBSTRING|FL_IGNORECASE); - ok(bRet == TRUE, "(full,substrlow)[SUBSTRING|IGNORECASE] match failed\n"); - pvRight.Value.lpszA = szFullLower; - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_FULLSTRING|FL_IGNORECASE); - ok(bRet == TRUE, "(full,fulllow)[IGNORECASE] match failed\n"); - - pvLeft.ulPropTag = pvRight.ulPropTag = PT_BINARY; - pvLeft.Value.bin.lpb = (LPBYTE)szFull; - pvRight.Value.bin.lpb = (LPBYTE)szFull; - pvLeft.Value.bin.cb = pvRight.Value.bin.cb = strlen(szFull); - - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_FULLSTRING); - ok(bRet == TRUE, "bin(full,full)[] match failed\n"); - pvRight.Value.bin.lpb = (LPBYTE)szPrefix; - pvRight.Value.bin.cb = strlen(szPrefix); - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_FULLSTRING); - ok(bRet == FALSE, "bin(full,prefix)[] match failed\n"); - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_PREFIX); - ok(bRet == TRUE, "bin(full,prefix)[PREFIX] match failed\n"); - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_SUBSTRING); - ok(bRet == TRUE, "bin(full,prefix)[SUBSTRING] match failed\n"); - pvRight.Value.bin.lpb = (LPBYTE)szPrefixLower; - pvRight.Value.bin.cb = strlen(szPrefixLower); - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_PREFIX); - ok(bRet == FALSE, "bin(full,prefixlow)[PREFIX] match failed\n"); - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_SUBSTRING); - ok(bRet == FALSE, "bin(full,prefixlow)[SUBSTRING] match failed\n"); - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_PREFIX|FL_IGNORECASE); - ok(bRet == FALSE, "bin(full,prefixlow)[PREFIX|IGNORECASE] match failed\n"); - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_SUBSTRING|FL_IGNORECASE); - ok(bRet == FALSE, "bin(full,prefixlow)[SUBSTRING|IGNORECASE] match failed\n"); - pvRight.Value.bin.lpb = (LPBYTE)szSubstring; - pvRight.Value.bin.cb = strlen(szSubstring); - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_FULLSTRING); - ok(bRet == FALSE, "bin(full,substr)[] match failed\n"); - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_PREFIX); - ok(bRet == FALSE, "bin(full,substr)[PREFIX] match failed\n"); - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_SUBSTRING); - ok(bRet == TRUE, "bin(full,substr)[SUBSTRING] match failed\n"); - pvRight.Value.bin.lpb = (LPBYTE)szSubstringLower; - pvRight.Value.bin.cb = strlen(szSubstringLower); - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_PREFIX); - ok(bRet == FALSE, "bin(full,substrlow)[PREFIX] match failed\n"); - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_SUBSTRING); - ok(bRet == FALSE, "bin(full,substrlow)[SUBSTRING] match failed\n"); - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_PREFIX|FL_IGNORECASE); - ok(bRet == FALSE, "bin(full,substrlow)[PREFIX|IGNORECASE] match failed\n"); - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_SUBSTRING|FL_IGNORECASE); - ok(bRet == FALSE, "bin(full,substrlow)[SUBSTRING|IGNORECASE] match failed\n"); - pvRight.Value.bin.lpb = (LPBYTE)szFullLower; - pvRight.Value.bin.cb = strlen(szFullLower); - bRet = pFPropContainsProp(&pvLeft, &pvRight, FL_FULLSTRING|FL_IGNORECASE); - ok(bRet == FALSE, "bin(full,fulllow)[IGNORECASE] match failed\n"); -} - -typedef struct tagFPropCompareProp_Result -{ - SHORT lVal; - SHORT rVal; - ULONG relOp; - BOOL bRet; -} FPropCompareProp_Result; - -static const FPropCompareProp_Result FPCProp_Results[] = -{ - { 1, 2, RELOP_LT, TRUE }, - { 1, 1, RELOP_LT, FALSE }, - { 2, 1, RELOP_LT, FALSE }, - { 1, 2, RELOP_LE, TRUE }, - { 1, 1, RELOP_LE, TRUE }, - { 2, 1, RELOP_LE, FALSE }, - { 1, 2, RELOP_GT, FALSE }, - { 1, 1, RELOP_GT, FALSE }, - { 2, 1, RELOP_GT, TRUE }, - { 1, 2, RELOP_GE, FALSE }, - { 1, 1, RELOP_GE, TRUE }, - { 2, 1, RELOP_GE, TRUE }, - { 1, 2, RELOP_EQ, FALSE }, - { 1, 1, RELOP_EQ, TRUE }, - { 2, 1, RELOP_EQ, FALSE } -}; - -static const char *relops[] = { "RELOP_LT", "RELOP_LE", "RELOP_GT", "RELOP_GE", "RELOP_EQ" }; - -static void test_FPropCompareProp(void) -{ - SPropValue pvLeft, pvRight; - GUID lguid, rguid; - char lbuffa[2], rbuffa[2]; - WCHAR lbuffw[2], rbuffw[2]; - ULONG i, j; - BOOL bRet, bExp; - - if (!pFPropCompareProp) - { - win_skip("FPropCompareProp is not available\n"); - return; - } - - lbuffa[1] = '\0'; - rbuffa[1] = '\0'; - lbuffw[1] = '\0'; - rbuffw[1] = '\0'; - - for (i = 0; i < sizeof(ptTypes)/sizeof(ptTypes[0]); i++) - { - pvLeft.ulPropTag = pvRight.ulPropTag = ptTypes[i]; - - for (j = 0; j < sizeof(FPCProp_Results)/sizeof(FPCProp_Results[0]); j++) - { - SHORT lVal = FPCProp_Results[j].lVal; - SHORT rVal = FPCProp_Results[j].rVal; - - bExp = FPCProp_Results[j].bRet; - - switch (ptTypes[i]) - { - case PT_BOOLEAN: - /* Boolean values have no concept of less or greater than, only equality */ - if ((lVal == 1 && rVal == 2 && FPCProp_Results[j].relOp == RELOP_LT) || - (lVal == 2 && rVal == 1 && FPCProp_Results[j].relOp == RELOP_LE)|| - (lVal == 2 && rVal == 1 && FPCProp_Results[j].relOp == RELOP_GT)|| - (lVal == 1 && rVal == 2 && FPCProp_Results[j].relOp == RELOP_GE)|| - (lVal == 1 && rVal == 2 && FPCProp_Results[j].relOp == RELOP_EQ)|| - (lVal == 2 && rVal == 1 && FPCProp_Results[j].relOp == RELOP_EQ)) - bExp = !bExp; - /* Fall through ... */ - case PT_I2: - pvLeft.Value.i = lVal; - pvRight.Value.i = rVal; - break; - case PT_ERROR: - case PT_I4: - pvLeft.Value.l = lVal; - pvRight.Value.l = rVal; - break; - case PT_R4: - pvLeft.Value.flt = lVal; - pvRight.Value.flt = rVal; - break; - case PT_APPTIME: - case PT_R8: - pvLeft.Value.dbl = lVal; - pvRight.Value.dbl = rVal; - break; - case PT_CURRENCY: - pvLeft.Value.cur.int64 = lVal; - pvRight.Value.cur.int64 = rVal; - break; - case PT_SYSTIME: - pvLeft.Value.ft.dwLowDateTime = lVal; - pvLeft.Value.ft.dwHighDateTime = 0; - pvRight.Value.ft.dwLowDateTime = rVal; - pvRight.Value.ft.dwHighDateTime = 0; - break; - case PT_I8: - pvLeft.Value.li.u.LowPart = lVal; - pvLeft.Value.li.u.HighPart = 0; - pvRight.Value.li.u.LowPart = rVal; - pvRight.Value.li.u.HighPart = 0; - break; - case PT_CLSID: - memset(&lguid, 0, sizeof(GUID)); - memset(&rguid, 0, sizeof(GUID)); - lguid.Data4[7] = lVal; - rguid.Data4[7] = rVal; - pvLeft.Value.lpguid = &lguid; - pvRight.Value.lpguid = &rguid; - break; - case PT_STRING8: - pvLeft.Value.lpszA = lbuffa; - pvRight.Value.lpszA = rbuffa; - lbuffa[0] = '0' + lVal; - rbuffa[0] = '0' + rVal; - break; - case PT_UNICODE: - pvLeft.Value.lpszW = lbuffw; - pvRight.Value.lpszW = rbuffw; - lbuffw[0] = '0' + lVal; - rbuffw[0] = '0' + rVal; - break; - case PT_BINARY: - pvLeft.Value.bin.cb = 1; - pvRight.Value.bin.cb = 1; - pvLeft.Value.bin.lpb = (LPBYTE)lbuffa; - pvRight.Value.bin.lpb = (LPBYTE)rbuffa; - lbuffa[0] = lVal; - rbuffa[0] = rVal; - break; - } - - bRet = pFPropCompareProp(&pvLeft, FPCProp_Results[j].relOp, &pvRight); - ok(bRet == bExp, - "pt %d (%d,%d,%s): expected %d, got %d\n", ptTypes[i], - FPCProp_Results[j].lVal, FPCProp_Results[j].rVal, - relops[FPCProp_Results[j].relOp], bExp, bRet); - } - } -} - -typedef struct tagLPropCompareProp_Result -{ - SHORT lVal; - SHORT rVal; - INT iRet; -} LPropCompareProp_Result; - -static const LPropCompareProp_Result LPCProp_Results[] = -{ - { 1, 2, -1 }, - { 1, 1, 0 }, - { 2, 1, 1 }, -}; - -static void test_LPropCompareProp(void) -{ - SPropValue pvLeft, pvRight; - GUID lguid, rguid; - char lbuffa[2], rbuffa[2]; - WCHAR lbuffw[2], rbuffw[2]; - ULONG i, j; - INT iRet, iExp; - - if (!pLPropCompareProp) - { - win_skip("LPropCompareProp is not available\n"); - return; - } - - lbuffa[1] = '\0'; - rbuffa[1] = '\0'; - lbuffw[1] = '\0'; - rbuffw[1] = '\0'; - - for (i = 0; i < sizeof(ptTypes)/sizeof(ptTypes[0]); i++) - { - pvLeft.ulPropTag = pvRight.ulPropTag = ptTypes[i]; - - for (j = 0; j < sizeof(LPCProp_Results)/sizeof(LPCProp_Results[0]); j++) - { - SHORT lVal = LPCProp_Results[j].lVal; - SHORT rVal = LPCProp_Results[j].rVal; - - iExp = LPCProp_Results[j].iRet; - - switch (ptTypes[i]) - { - case PT_BOOLEAN: - /* Boolean values have no concept of less or greater than, only equality */ - if (lVal && rVal) - iExp = 0; - /* Fall through ... */ - case PT_I2: - pvLeft.Value.i = lVal; - pvRight.Value.i = rVal; - break; - case PT_ERROR: - case PT_I4: - pvLeft.Value.l = lVal; - pvRight.Value.l = rVal; - break; - case PT_R4: - pvLeft.Value.flt = lVal; - pvRight.Value.flt = rVal; - break; - case PT_APPTIME: - case PT_R8: - pvLeft.Value.dbl = lVal; - pvRight.Value.dbl = rVal; - break; - case PT_CURRENCY: - pvLeft.Value.cur.int64 = lVal; - pvRight.Value.cur.int64 = rVal; - break; - case PT_SYSTIME: - pvLeft.Value.ft.dwLowDateTime = lVal; - pvLeft.Value.ft.dwHighDateTime = 0; - pvRight.Value.ft.dwLowDateTime = rVal; - pvRight.Value.ft.dwHighDateTime = 0; - break; - case PT_I8: - pvLeft.Value.li.u.LowPart = lVal; - pvLeft.Value.li.u.HighPart = 0; - pvRight.Value.li.u.LowPart = rVal; - pvRight.Value.li.u.HighPart = 0; - break; - case PT_CLSID: - memset(&lguid, 0, sizeof(GUID)); - memset(&rguid, 0, sizeof(GUID)); - lguid.Data4[7] = lVal; - rguid.Data4[7] = rVal; - pvLeft.Value.lpguid = &lguid; - pvRight.Value.lpguid = &rguid; - break; - case PT_STRING8: - pvLeft.Value.lpszA = lbuffa; - pvRight.Value.lpszA = rbuffa; - lbuffa[0] = '0' + lVal; - rbuffa[0] = '0' + rVal; - break; - case PT_UNICODE: - pvLeft.Value.lpszW = lbuffw; - pvRight.Value.lpszW = rbuffw; - lbuffw[0] = '0' + lVal; - rbuffw[0] = '0' + rVal; - break; - case PT_BINARY: - pvLeft.Value.bin.cb = 1; - pvRight.Value.bin.cb = 1; - pvLeft.Value.bin.lpb = (LPBYTE)lbuffa; - pvRight.Value.bin.lpb = (LPBYTE)rbuffa; - lbuffa[0] = lVal; - rbuffa[0] = rVal; - break; - } - - iRet = pLPropCompareProp(&pvLeft, &pvRight); - ok(iRet == iExp, - "pt %d (%d,%d): expected %d, got %d\n", ptTypes[i], - LPCProp_Results[j].lVal, LPCProp_Results[j].rVal, iExp, iRet); - } - } -} - -static void test_PpropFindProp(void) -{ - SPropValue pvProp, *pRet; - ULONG i; - - if (!pPpropFindProp) - { - win_skip("PpropFindProp is not available\n"); - return; - } - - for (i = 0; i < sizeof(ptTypes)/sizeof(ptTypes[0]); i++) - { - pvProp.ulPropTag = ptTypes[i]; - - pRet = pPpropFindProp(&pvProp, 1u, ptTypes[i]); - ok(pRet == &pvProp, - "PpropFindProp[%d]: Didn't find existing propery\n", - ptTypes[i]); - - pRet = pPpropFindProp(&pvProp, 1u, i ? ptTypes[i-1] : ptTypes[i+1]); - ok(pRet == NULL, "PpropFindProp[%d]: Found nonexistent propery\n", - ptTypes[i]); - } - - pvProp.ulPropTag = PROP_TAG(PT_I2, 1u); - pRet = pPpropFindProp(&pvProp, 1u, PROP_TAG(PT_UNSPECIFIED, 0u)); - ok(pRet == NULL, "PpropFindProp[UNSPECIFIED]: Matched on different id\n"); - pRet = pPpropFindProp(&pvProp, 1u, PROP_TAG(PT_UNSPECIFIED, 1u)); - ok(pRet == &pvProp, "PpropFindProp[UNSPECIFIED]: Didn't match id\n"); -} - -static void test_ScCountProps(void) -{ - static char szHiA[] = "Hi!"; - static WCHAR szHiW[] = { 'H', 'i', '!', '\0' }; - static const ULONG ULHILEN = 4; /* chars in szHiA/W incl. NUL */ - LPSTR buffa[3]; - LPWSTR buffw[3]; - SBinary buffbin[3]; - GUID iids[4], *iid = iids; - SCODE res; - ULONG pt, exp, ulRet; - int success = 1; - - if (!pScCountProps) - { - win_skip("ScCountProps is not available\n"); - return; - } - - for (pt = 0; pt < PROP_ID_INVALID && success; pt++) - { - SPropValue pv; - - memset(&pv, 0 ,sizeof(pv)); - pv.ulPropTag = PROP_TAG(pt, 1u); - - switch (PROP_TYPE(pt)) - { - case PT_I2: - case PT_I4: - case PT_R4: - case PT_R8: - case PT_CURRENCY: - case PT_APPTIME: - case PT_SYSTIME: - case PT_ERROR: - case PT_BOOLEAN: - case PT_OBJECT: - case PT_I8: - exp = sizeof(pv); - break; - case PT_CLSID: - pv.Value.lpguid = iid; - exp = sizeof(GUID) + sizeof(pv); - break; - case PT_STRING8: - pv.Value.lpszA = szHiA; - exp = 4 + sizeof(pv); - break; - case PT_UNICODE: - pv.Value.lpszW = szHiW; - exp = 4 * sizeof(WCHAR) + sizeof(pv); - break; - case PT_BINARY: - pv.Value.bin.cb = 2; - pv.Value.bin.lpb = (LPBYTE)iid; - exp = 2 + sizeof(pv); - break; - case PT_MV_I2: - pv.Value.MVi.cValues = 3; - pv.Value.MVi.lpi = (SHORT*)iid; - exp = 3 * sizeof(SHORT) + sizeof(pv); - break; - case PT_MV_I4: - pv.Value.MVl.cValues = 3; - pv.Value.MVl.lpl = (LONG*)iid; - exp = 3 * sizeof(LONG) + sizeof(pv); - break; - case PT_MV_I8: - pv.Value.MVli.cValues = 3; - pv.Value.MVli.lpli = (LARGE_INTEGER*)iid; - exp = 3 * sizeof(LARGE_INTEGER) + sizeof(pv); - break; - case PT_MV_R4: - pv.Value.MVflt.cValues = 3; - pv.Value.MVflt.lpflt = (float*)iid; - exp = 3 * sizeof(float) + sizeof(pv); - break; - case PT_MV_APPTIME: - case PT_MV_R8: - pv.Value.MVdbl.cValues = 3; - pv.Value.MVdbl.lpdbl = (double*)iid; - exp = 3 * sizeof(double) + sizeof(pv); - break; - case PT_MV_CURRENCY: - pv.Value.MVcur.cValues = 3; - pv.Value.MVcur.lpcur = (CY*)iid; - exp = 3 * sizeof(CY) + sizeof(pv); - break; - case PT_MV_SYSTIME: - pv.Value.MVft.cValues = 3; - pv.Value.MVft.lpft = (FILETIME*)iid; - exp = 3 * sizeof(CY) + sizeof(pv); - break; - case PT_MV_STRING8: - pv.Value.MVszA.cValues = 3; - pv.Value.MVszA.lppszA = buffa; - buffa[0] = szHiA; - buffa[1] = szHiA; - buffa[2] = szHiA; - exp = ULHILEN * 3 + 3 * sizeof(char*) + sizeof(pv); - break; - case PT_MV_UNICODE: - pv.Value.MVszW.cValues = 3; - pv.Value.MVszW.lppszW = buffw; - buffw[0] = szHiW; - buffw[1] = szHiW; - buffw[2] = szHiW; - exp = ULHILEN * 3 * sizeof(WCHAR) + 3 * sizeof(WCHAR*) + sizeof(pv); - break; - case PT_MV_BINARY: - pv.Value.MVbin.cValues = 3; - pv.Value.MVbin.lpbin = buffbin; - buffbin[0].cb = 17; - buffbin[0].lpb = (LPBYTE)&iid; - buffbin[1].cb = 2; - buffbin[1].lpb = (LPBYTE)&iid; - buffbin[2].cb = 1; - buffbin[2].lpb = (LPBYTE)&iid; - exp = 20 + sizeof(pv) + sizeof(SBinary) * 3; - break; - default: - exp = 0; - } - - ulRet = 0xffffffff; - res = pScCountProps(1, &pv, &ulRet); - if (!exp) { - success = res == MAPI_E_INVALID_PARAMETER && ulRet == 0xffffffff; - ok(success, "pt= %d: Expected failure, got %d, ret=0x%08X\n", - pt, ulRet, res); - } - else { - success = res == S_OK && ulRet == exp; - ok(success, "pt= %d: Expected %d, got %d, ret=0x%08X\n", - pt, exp, ulRet, res); - } - } - -} - -static void test_ScCopyRelocProps(void) -{ - static char szTestA[] = "Test"; - char buffer[512], buffer2[512], *lppszA[1]; - SPropValue pvProp, *lpResProp = (LPSPropValue)buffer; - ULONG ulCount; - SCODE sc; - - if (!pScCopyProps || !pScRelocProps) - { - win_skip("SPropValue copy functions are not available\n"); - return; - } - - pvProp.ulPropTag = PROP_TAG(PT_MV_STRING8, 1u); - - lppszA[0] = szTestA; - pvProp.Value.MVszA.cValues = 1; - pvProp.Value.MVszA.lppszA = lppszA; - ulCount = 0; - - sc = pScCopyProps(1, &pvProp, buffer, &ulCount); - ok(sc == S_OK, "wrong ret %d\n", sc); - if(sc == S_OK) - { - ok(lpResProp->ulPropTag == pvProp.ulPropTag, "wrong tag %x\n",lpResProp->ulPropTag); - ok(lpResProp->Value.MVszA.cValues == 1, "wrong cValues %d\n", lpResProp->Value.MVszA.cValues); - ok(lpResProp->Value.MVszA.lppszA[0] == buffer + sizeof(SPropValue) + sizeof(char*), - "wrong lppszA[0] %p\n",lpResProp->Value.MVszA.lppszA[0]); - ok(ulCount == sizeof(SPropValue) + sizeof(char*) + 5, "wrong count %d\n", ulCount); - ok(!strcmp(lpResProp->Value.MVszA.lppszA[0], szTestA), - "wrong string '%s'\n", lpResProp->Value.MVszA.lppszA[0]); - } - - memcpy(buffer2, buffer, sizeof(buffer)); - - /* Clear the data in the source buffer. Since pointers in the copied buffer - * refer to the source buffer, this proves that native always assumes that - * the copied buffers pointers are bad (needing to be relocated first). - */ - memset(buffer, 0, sizeof(buffer)); - ulCount = 0; - - sc = pScRelocProps(1, (LPSPropValue)buffer2, buffer, buffer2, &ulCount); - lpResProp = (LPSPropValue)buffer2; - - ok(sc == S_OK, "wrong ret %d\n", sc); - if(sc == S_OK) - { - ok(lpResProp->ulPropTag == pvProp.ulPropTag, "wrong tag %x\n",lpResProp->ulPropTag); - ok(lpResProp->Value.MVszA.cValues == 1, "wrong cValues %d\n", lpResProp->Value.MVszA.cValues); - ok(lpResProp->Value.MVszA.lppszA[0] == buffer2 + sizeof(SPropValue) + sizeof(char*), - "wrong lppszA[0] %p\n",lpResProp->Value.MVszA.lppszA[0]); - /* Native has a bug whereby it calculates the size correctly when copying - * but when relocating does not (presumably it uses UlPropSize() which - * ignores multivalue pointers). Wine returns the correct value. - */ - ok(ulCount == sizeof(SPropValue) + sizeof(char*) + 5 || ulCount == sizeof(SPropValue) + 5, - "wrong count %d\n", ulCount); - ok(!strcmp(lpResProp->Value.MVszA.lppszA[0], szTestA), - "wrong string '%s'\n", lpResProp->Value.MVszA.lppszA[0]); - } - - /* Native crashes with lpNew or lpOld set to NULL so skip testing this */ -} - -static void test_LpValFindProp(void) -{ - SPropValue pvProp, *pRet; - ULONG i; - - if (!pLpValFindProp) - { - win_skip("LpValFindProp is not available\n"); - return; - } - - for (i = 0; i < sizeof(ptTypes)/sizeof(ptTypes[0]); i++) - { - pvProp.ulPropTag = PROP_TAG(ptTypes[i], 1u); - - pRet = pLpValFindProp(PROP_TAG(ptTypes[i], 1u), 1u, &pvProp); - ok(pRet == &pvProp, - "LpValFindProp[%d]: Didn't find existing propery id/type\n", - ptTypes[i]); - - pRet = pLpValFindProp(PROP_TAG(ptTypes[i], 0u), 1u, &pvProp); - ok(pRet == NULL, "LpValFindProp[%d]: Found nonexistent propery id\n", - ptTypes[i]); - - pRet = pLpValFindProp(PROP_TAG(PT_NULL, 0u), 1u, &pvProp); - ok(pRet == NULL, "LpValFindProp[%d]: Found nonexistent propery id/type\n", - ptTypes[i]); - - pRet = pLpValFindProp(PROP_TAG(PT_NULL, 1u), 1u, &pvProp); - ok(pRet == &pvProp, - "LpValFindProp[%d]: Didn't find existing propery id\n", - ptTypes[i]); - } -} - -static void test_FBadRglpszA(void) -{ - LPSTR lpStrs[4]; - static CHAR szString[] = "A String"; - BOOL bRet; - - if (!pFBadRglpszA) - { - win_skip("FBadRglpszA is not available\n"); - return; - } - - bRet = pFBadRglpszA(NULL, 10); - ok(bRet == TRUE, "FBadRglpszA(Null): expected TRUE, got FALSE\n"); - - lpStrs[0] = lpStrs[1] = lpStrs[2] = lpStrs[3] = NULL; - bRet = pFBadRglpszA(lpStrs, 4); - ok(bRet == TRUE, "FBadRglpszA(Nulls): expected TRUE, got FALSE\n"); - - lpStrs[0] = lpStrs[1] = lpStrs[2] = szString; - bRet = pFBadRglpszA(lpStrs, 3); - ok(bRet == FALSE, "FBadRglpszA(valid): expected FALSE, got TRUE\n"); - - bRet = pFBadRglpszA(lpStrs, 4); - ok(bRet == TRUE, "FBadRglpszA(1 invalid): expected TRUE, got FALSE\n"); -} - -static void test_FBadRglpszW(void) -{ - LPWSTR lpStrs[4]; - static WCHAR szString[] = { 'A',' ','S','t','r','i','n','g','\0' }; - BOOL bRet; - - if (!pFBadRglpszW) - { - win_skip("FBadRglpszW is not available\n"); - return; - } - - bRet = pFBadRglpszW(NULL, 10); - ok(bRet == TRUE, "FBadRglpszW(Null): expected TRUE, got FALSE\n"); - - lpStrs[0] = lpStrs[1] = lpStrs[2] = lpStrs[3] = NULL; - bRet = pFBadRglpszW(lpStrs, 4); - ok(bRet == TRUE, "FBadRglpszW(Nulls): expected TRUE, got FALSE\n"); - - lpStrs[0] = lpStrs[1] = lpStrs[2] = szString; - bRet = pFBadRglpszW(lpStrs, 3); - ok(bRet == FALSE, "FBadRglpszW(valid): expected FALSE, got TRUE\n"); - - bRet = pFBadRglpszW(lpStrs, 4); - ok(bRet == TRUE, "FBadRglpszW(1 invalid): expected TRUE, got FALSE\n"); -} - -static void test_FBadRowSet(void) -{ - ULONG ulRet; - - if (!pFBadRowSet) - { - win_skip("FBadRowSet is not available\n"); - return; - } - - ulRet = pFBadRowSet(NULL); - ok(ulRet != 0, "FBadRow(null): Expected non-zero, got 0\n"); - - /* FIXME */ -} - -static void test_FBadPropTag(void) -{ - ULONG pt, res; - - if (!pFBadPropTag) - { - win_skip("FBadPropTag is not available\n"); - return; - } - - for (pt = 0; pt < PROP_ID_INVALID; pt++) - { - BOOL bBad = TRUE; - - switch (pt & (~MV_FLAG & PROP_TYPE_MASK)) - { - case PT_UNSPECIFIED: - case PT_NULL: case PT_I2: case PT_I4: case PT_R4: - case PT_R8: case PT_CURRENCY: case PT_APPTIME: - case PT_ERROR: case PT_BOOLEAN: case PT_OBJECT: - case PT_I8: case PT_STRING8: case PT_UNICODE: - case PT_SYSTIME: case PT_CLSID: case PT_BINARY: - bBad = FALSE; - } - - res = pFBadPropTag(pt); - if (bBad) - ok(res != 0, "pt= %d: Expected non-zero, got 0\n", pt); - else - ok(res == 0, - "pt= %d: Expected zero, got %d\n", pt, res); - } -} - -static void test_FBadRow(void) -{ - ULONG ulRet; - - if (!pFBadRow) - { - win_skip("FBadRow is not available\n"); - return; - } - - ulRet = pFBadRow(NULL); - ok(ulRet != 0, "FBadRow(null): Expected non-zero, got 0\n"); - - /* FIXME */ -} - -static void test_FBadProp(void) -{ - static WCHAR szEmpty[] = { '\0' }; - GUID iid; - ULONG pt, res; - SPropValue pv; - - if (!pFBadProp) - { - win_skip("FBadProp is not available\n"); - return; - } - - for (pt = 0; pt < PROP_ID_INVALID; pt++) - { - BOOL bBad = TRUE; - - memset(&pv, 0, sizeof(pv)); - pv.ulPropTag = pt; - - /* Note that MV values are valid below because their array count is 0, - * so no pointers are validated. - */ - switch (PROP_TYPE(pt)) - { - case (MV_FLAG|PT_UNSPECIFIED): - case PT_UNSPECIFIED: - case (MV_FLAG|PT_NULL): - case PT_NULL: - case PT_MV_I2: - case PT_I2: - case PT_MV_I4: - case PT_I4: - case PT_MV_I8: - case PT_I8: - case PT_MV_R4: - case PT_R4: - case PT_MV_R8: - case PT_R8: - case PT_MV_CURRENCY: - case PT_CURRENCY: - case PT_MV_APPTIME: - case PT_APPTIME: - case (MV_FLAG|PT_ERROR): - case PT_ERROR: - case (MV_FLAG|PT_BOOLEAN): - case PT_BOOLEAN: - case (MV_FLAG|PT_OBJECT): - case PT_OBJECT: - case PT_MV_STRING8: - case PT_MV_UNICODE: - case PT_MV_SYSTIME: - case PT_SYSTIME: - case PT_MV_BINARY: - case PT_BINARY: - case PT_MV_CLSID: - bBad = FALSE; - break; - case PT_STRING8: - case PT_UNICODE: - pv.Value.lpszW = szEmpty; - bBad = FALSE; - break; - case PT_CLSID: - pv.Value.lpguid = &iid; - bBad = FALSE; - break; - } - - res = pFBadProp(&pv); - if (bBad) - ok(res != 0, "pt= %d: Expected non-zero, got 0\n", pt); - else - ok(res == 0, - "pt= %d: Expected zero, got %d\n", pt, res); - } -} - -static void test_FBadColumnSet(void) -{ - SPropTagArray pta; - ULONG pt, res; - - if (!pFBadColumnSet) - { - win_skip("FBadColumnSet is not available\n"); - return; - } - - res = pFBadColumnSet(NULL); - ok(res != 0, "(null): Expected non-zero, got 0\n"); - - pta.cValues = 1; - - for (pt = 0; pt < PROP_ID_INVALID; pt++) - { - BOOL bBad = TRUE; - - pta.aulPropTag[0] = pt; - - switch (pt & (~MV_FLAG & PROP_TYPE_MASK)) - { - case PT_UNSPECIFIED: - case PT_NULL: - case PT_I2: - case PT_I4: - case PT_R4: - case PT_R8: - case PT_CURRENCY: - case PT_APPTIME: - case PT_BOOLEAN: - case PT_OBJECT: - case PT_I8: - case PT_STRING8: - case PT_UNICODE: - case PT_SYSTIME: - case PT_CLSID: - case PT_BINARY: - bBad = FALSE; - } - if (pt == (MV_FLAG|PT_ERROR)) - bBad = FALSE; - - res = pFBadColumnSet(&pta); - if (bBad) - ok(res != 0, "pt= %d: Expected non-zero, got 0\n", pt); - else - ok(res == 0, - "pt= %d: Expected zero, got %d\n", pt, res); - } -} - - -static void test_IProp(void) -{ - IPropData *lpIProp; - LPMAPIERROR lpError; - LPSPropProblemArray lpProbs; - LPSPropValue lpProps; - LPSPropTagArray lpTags; - SPropValue pvs[2]; - SizedSPropTagArray(2,tags); - ULONG access[2], count; - SCODE sc; - - if (!pCreateIProp) - { - win_skip("CreateIProp is not available\n"); - return; - } - - memset(&tags, 0 , sizeof(tags)); - - /* Create the object */ - lpIProp = NULL; - sc = pCreateIProp(&IID_IMAPIPropData, (ALLOCATEBUFFER *)pMAPIAllocateBuffer, (ALLOCATEMORE*)pMAPIAllocateMore, - (FREEBUFFER *)pMAPIFreeBuffer, NULL, &lpIProp); - ok(sc == S_OK && lpIProp, - "CreateIProp: expected S_OK, non-null, got 0x%08X,%p\n", sc, lpIProp); - - if (sc != S_OK || !lpIProp) - return; - - /* GetLastError - No errors set */ - lpError = NULL; - IPropData_GetLastError(lpIProp, E_INVALIDARG, 0, &lpError); - ok(sc == S_OK && !lpError, - "GetLastError: Expected S_OK, null, got 0x%08X,%p\n", sc, lpError); - - /* Get prop tags - succeeds returning 0 items */ - lpTags = NULL; - sc = IPropData_GetPropList(lpIProp, 0, &lpTags); - ok(sc == S_OK && lpTags && lpTags->cValues == 0, - "GetPropList(empty): Expected S_OK, non-null, 0, got 0x%08X,%p,%d\n", - sc, lpTags, lpTags ? lpTags->cValues : 0); - if (lpTags) - pMAPIFreeBuffer(lpTags); - - /* Get props - succeeds returning 0 items */ - lpProps = NULL; - count = 0; - tags.cValues = 1; - tags.aulPropTag[0] = PR_IMPORTANCE; - sc = IPropData_GetProps(lpIProp, (LPSPropTagArray)&tags, 0, &count, &lpProps); - ok(sc == MAPI_W_ERRORS_RETURNED && lpProps && count == 1, - "GetProps(empty): Expected ERRORS_RETURNED, non-null, 1, got 0x%08X,%p,%d\n", - sc, lpProps, count); - if (lpProps && count > 0) - { - ok(lpProps[0].ulPropTag == CHANGE_PROP_TYPE(PR_IMPORTANCE,PT_ERROR), - "GetProps(empty): Expected %x, got %x\n", - CHANGE_PROP_TYPE(PR_IMPORTANCE,PT_ERROR), lpProps[0].ulPropTag); - - pMAPIFreeBuffer(lpProps); - } - - /* Add (NULL) - Can't add NULLs */ - lpProbs = NULL; - pvs[0].ulPropTag = PROP_TAG(PT_NULL,0x01); - sc = IPropData_SetProps(lpIProp, 1, pvs, &lpProbs); - ok(sc == MAPI_E_INVALID_PARAMETER && !lpProbs, - "SetProps(): Expected INVALID_PARAMETER, null, got 0x%08X,%p\n", - sc, lpProbs); - - /* Add (OBJECT) - Can't add OBJECTs */ - lpProbs = NULL; - pvs[0].ulPropTag = PROP_TAG(PT_OBJECT,0x01); - sc = IPropData_SetProps(lpIProp, 1, pvs, &lpProbs); - ok(sc == MAPI_E_INVALID_PARAMETER && !lpProbs, - "SetProps(OBJECT): Expected INVALID_PARAMETER, null, got 0x%08X,%p\n", - sc, lpProbs); - - /* Add - Adds value */ - lpProbs = NULL; - pvs[0].ulPropTag = PR_IMPORTANCE; - sc = IPropData_SetProps(lpIProp, 1, pvs, &lpProbs); - ok(sc == S_OK && !lpProbs, - "SetProps(ERROR): Expected S_OK, null, got 0x%08X,%p\n", sc, lpProbs); - - /* Get prop list - returns 1 item */ - lpTags = NULL; - IPropData_GetPropList(lpIProp, 0, &lpTags); - ok(sc == S_OK && lpTags && lpTags->cValues == 1, - "GetPropList: Expected S_OK, non-null, 1, got 0x%08X,%p,%d\n", - sc, lpTags, lpTags ? lpTags->cValues : 0); - if (lpTags && lpTags->cValues > 0) - { - ok(lpTags->aulPropTag[0] == PR_IMPORTANCE, - "GetPropList: Expected %x, got %x\n", - PR_IMPORTANCE, lpTags->aulPropTag[0]); - pMAPIFreeBuffer(lpTags); - } - - /* Set access to read and write */ - sc = IPropData_HrSetObjAccess(lpIProp, IPROP_READWRITE); - ok(sc == S_OK, "SetObjAcess(WRITE): Expected S_OK got 0x%08X\n", sc); - - tags.cValues = 1; - tags.aulPropTag[0] = PR_IMPORTANCE; - - /* Set item access (bad access) - Fails */ - access[0] = 0; - sc = IPropData_HrSetPropAccess(lpIProp, (LPSPropTagArray)&tags, access); - ok(sc == MAPI_E_INVALID_PARAMETER, - "SetPropAcess(0): Expected INVALID_PARAMETER got 0x%08X\n",sc); - access[0] = IPROP_READWRITE; - sc = IPropData_HrSetPropAccess(lpIProp, (LPSPropTagArray)&tags, access); - ok(sc == MAPI_E_INVALID_PARAMETER, - "SetPropAcess(RW): Expected INVALID_PARAMETER got 0x%08X\n",sc); - access[0] = IPROP_CLEAN; - sc = IPropData_HrSetPropAccess(lpIProp, (LPSPropTagArray)&tags, access); - ok(sc == MAPI_E_INVALID_PARAMETER, - "SetPropAcess(C): Expected INVALID_PARAMETER got 0x%08X\n",sc); - - /* Set item access to read/write/clean */ - tags.cValues = 1; - tags.aulPropTag[0] = PR_IMPORTANCE; - access[0] = IPROP_READWRITE|IPROP_CLEAN; - sc = IPropData_HrSetPropAccess(lpIProp, (LPSPropTagArray)&tags, access); - ok(sc == S_OK, "SetPropAcess(RW/C): Expected S_OK got 0x%08X\n",sc); - - /* Set object access to read only */ - sc = IPropData_HrSetObjAccess(lpIProp, IPROP_READONLY); - ok(sc == S_OK, "SetObjAcess(READ): Expected S_OK got 0x%08X\n", sc); - - /* Set item access to read/write/dirty - doesn't care about RO object */ - access[0] = IPROP_READONLY|IPROP_DIRTY; - sc = IPropData_HrSetPropAccess(lpIProp, (LPSPropTagArray)&tags, access); - ok(sc == S_OK, "SetPropAcess(WRITE): Expected S_OK got 0x%08X\n", sc); - - /* Delete any item when set to read only - Error */ - lpProbs = NULL; - tags.aulPropTag[0] = PR_RESPONSE_REQUESTED; - sc = IPropData_DeleteProps(lpIProp, (LPSPropTagArray)&tags, &lpProbs); - ok(sc == E_ACCESSDENIED && !lpProbs, - "DeleteProps(nonexistent): Expected E_ACCESSDENIED null got 0x%08X %p\n", - sc, lpProbs); - - /* Set access to read and write */ - sc = IPropData_HrSetObjAccess(lpIProp, IPROP_READWRITE); - ok(sc == S_OK, "SetObjAcess(WRITE): Expected S_OK got 0x%08X\n", sc); - - /* Delete nonexistent item - No error */ - lpProbs = NULL; - tags.aulPropTag[0] = PR_RESPONSE_REQUESTED; - sc = IPropData_DeleteProps(lpIProp, (LPSPropTagArray)&tags, &lpProbs); - ok(sc == S_OK && !lpProbs, - "DeleteProps(nonexistent): Expected S_OK null got 0x%08X %p\n", - sc, lpProbs); - - /* Delete existing item (r/o) - No error, but lpProbs populated */ - lpProbs = NULL; - tags.aulPropTag[0] = PR_IMPORTANCE; - sc = IPropData_DeleteProps(lpIProp, (LPSPropTagArray)&tags, &lpProbs); - ok(sc == S_OK && lpProbs, - "DeleteProps(RO): Expected S_OK non-null got 0x%08X %p\n", sc, lpProbs); - - if (lpProbs && lpProbs->cProblem > 0) - { - ok(lpProbs->cProblem == 1 && - lpProbs->aProblem[0].ulIndex == 0 && - lpProbs->aProblem[0].ulPropTag == PR_IMPORTANCE && - lpProbs->aProblem[0].scode == E_ACCESSDENIED, - "DeleteProps(RO): Expected (1,0,%x,%x) got (%d,%x,%x)\n", - PR_IMPORTANCE, E_ACCESSDENIED, - lpProbs->aProblem[0].ulIndex, lpProbs->aProblem[0].ulPropTag, - lpProbs->aProblem[0].scode); - pMAPIFreeBuffer(lpProbs); - } - - lpProbs = NULL; - tags.cValues = 1; - tags.aulPropTag[0] = PR_RESPONSE_REQUESTED; - IPropData_HrAddObjProps(lpIProp, (LPSPropTagArray)&tags, &lpProbs); - ok(sc == S_OK && !lpProbs, - "AddObjProps(RO): Expected S_OK null got 0x%08X %p\n", sc, lpProbs); - - /* Get prop list - returns 1 item */ - lpTags = NULL; - IPropData_GetPropList(lpIProp, 0, &lpTags); - ok(sc == S_OK && lpTags && lpTags->cValues == 1, - "GetPropList: Expected S_OK, non-null, 1, got 0x%08X,%p,%d\n", - sc, lpTags, lpTags ? lpTags->cValues : 0); - if (lpTags && lpTags->cValues > 0) - { - ok(lpTags->aulPropTag[0] == PR_IMPORTANCE, - "GetPropList: Expected %x, got %x\n", - PR_IMPORTANCE, lpTags->aulPropTag[0]); - pMAPIFreeBuffer(lpTags); - } - - /* Set item to r/w again */ - access[0] = IPROP_READWRITE|IPROP_DIRTY; - sc = IPropData_HrSetPropAccess(lpIProp, (LPSPropTagArray)&tags, access); - ok(sc == S_OK, "SetPropAcess(WRITE): Expected S_OK got 0x%08X\n", sc); - - /* Delete existing item (r/w) - No error, no problems */ - lpProbs = NULL; - sc = IPropData_DeleteProps(lpIProp, (LPSPropTagArray)&tags, &lpProbs); - ok(sc == S_OK && !lpProbs, - "DeleteProps(RO): Expected S_OK null got 0x%08X %p\n", sc, lpProbs); - - /* Free the list */ - IPropData_Release(lpIProp); -} - -START_TEST(prop) -{ - SCODE ret; - - if (!HaveDefaultMailClient()) - { - win_skip("No default mail client installed\n"); - return; - } - - if(!InitFuncPtrs()) - { - win_skip("Needed functions are not available\n"); - return; - } - - SetLastError(0xdeadbeef); - ret = pScInitMapiUtil(0); - if ((ret != S_OK) && (GetLastError() == ERROR_PROC_NOT_FOUND)) - { - win_skip("ScInitMapiUtil is not implemented\n"); - FreeLibrary(hMapi32); - return; - } - else if ((ret == E_FAIL) && (GetLastError() == ERROR_INVALID_HANDLE)) - { - win_skip("ScInitMapiUtil doesn't work on some Win98 and WinME systems\n"); - FreeLibrary(hMapi32); - return; - } - - test_PropCopyMore(); - test_UlPropSize(); - - /* We call MAPIInitialize here for the benefit of native extended MAPI - * providers which crash in the FPropContainsProp tests when MAPIInitialize - * has not been called. Since MAPIInitialize is irrelevant for FPropContainsProp - * on Wine, we do not care whether MAPIInitialize succeeds. */ - if (pMAPIInitialize) - ret = pMAPIInitialize(NULL); - test_FPropContainsProp(); - if (pMAPIUninitialize && ret == S_OK) - pMAPIUninitialize(); - - test_FPropCompareProp(); - test_LPropCompareProp(); - test_PpropFindProp(); - test_ScCountProps(); - test_ScCopyRelocProps(); - test_LpValFindProp(); - test_FBadRglpszA(); - test_FBadRglpszW(); - test_FBadRowSet(); - test_FBadPropTag(); - test_FBadRow(); - test_FBadProp(); - test_FBadColumnSet(); - - test_IProp(); - - pDeinitMapiUtil(); - FreeLibrary(hMapi32); -} diff --git a/rostests/winetests/mapi32/testlist.c b/rostests/winetests/mapi32/testlist.c deleted file mode 100644 index 97ef6c9bbdb..00000000000 --- a/rostests/winetests/mapi32/testlist.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_imalloc(void); -extern void func_prop(void); -extern void func_util(void); - -const struct test winetest_testlist[] = -{ - { "imalloc", func_imalloc }, - { "prop", func_prop }, - { "util", func_util }, - { 0, 0 } -}; diff --git a/rostests/winetests/mapi32/util.c b/rostests/winetests/mapi32/util.c deleted file mode 100644 index 0edac07aee6..00000000000 --- a/rostests/winetests/mapi32/util.c +++ /dev/null @@ -1,260 +0,0 @@ -/* - * Unit test suite for MAPI utility functions - * - * Copyright 2004 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 "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "winerror.h" -#include "winnt.h" -#include "mapiutil.h" -#include "mapitags.h" -#include "mapi32_test.h" - -static HMODULE hMapi32 = 0; - -static SCODE (WINAPI *pScInitMapiUtil)(ULONG); -static void (WINAPI *pDeinitMapiUtil)(void); -static void (WINAPI *pSwapPword)(PUSHORT,ULONG); -static void (WINAPI *pSwapPlong)(PULONG,ULONG); -static void (WINAPI *pHexFromBin)(LPBYTE,int,LPWSTR); -static BOOL (WINAPI *pFBinFromHex)(LPWSTR,LPBYTE); -static UINT (WINAPI *pUFromSz)(LPCSTR); -static ULONG (WINAPI *pUlFromSzHex)(LPCSTR); -static ULONG (WINAPI *pCbOfEncoded)(LPCSTR); -static BOOL (WINAPI *pIsBadBoundedStringPtr)(LPCSTR,ULONG); -static SCODE (WINAPI *pMAPIInitialize)(LPVOID); -static void (WINAPI *pMAPIUninitialize)(void); - -static void init_function_pointers(void) -{ - hMapi32 = LoadLibraryA("mapi32.dll"); - - pScInitMapiUtil = (void*)GetProcAddress(hMapi32, "ScInitMapiUtil@4"); - pDeinitMapiUtil = (void*)GetProcAddress(hMapi32, "DeinitMapiUtil@0"); - pSwapPword = (void*)GetProcAddress(hMapi32, "SwapPword@8"); - pSwapPlong = (void*)GetProcAddress(hMapi32, "SwapPlong@8"); - pHexFromBin = (void*)GetProcAddress(hMapi32, "HexFromBin@12"); - pFBinFromHex = (void*)GetProcAddress(hMapi32, "FBinFromHex@8"); - pUFromSz = (void*)GetProcAddress(hMapi32, "UFromSz@4"); - pUlFromSzHex = (void*)GetProcAddress(hMapi32, "UlFromSzHex@4"); - pCbOfEncoded = (void*)GetProcAddress(hMapi32, "CbOfEncoded@4"); - pIsBadBoundedStringPtr = (void*)GetProcAddress(hMapi32, "IsBadBoundedStringPtr@8"); - pMAPIInitialize = (void*)GetProcAddress(hMapi32, "MAPIInitialize"); - pMAPIUninitialize = (void*)GetProcAddress(hMapi32, "MAPIUninitialize"); -} - -static void test_SwapPword(void) -{ - USHORT shorts[3]; - - if (!pSwapPword) - { - win_skip("SwapPword is not available\n"); - return; - } - - shorts[0] = 0xff01; - shorts[1] = 0x10ff; - shorts[2] = 0x2001; - pSwapPword(shorts, 2); - ok((shorts[0] == 0x01ff && shorts[1] == 0xff10 && shorts[2] == 0x2001), - "Expected {0x01ff,0xff10,0x2001}, got {0x%04x,0x%04x,0x%04x}\n", - shorts[0], shorts[1], shorts[2]); -} - -static void test_SwapPlong(void) -{ - ULONG longs[3]; - - if (!pSwapPlong) - { - win_skip("SwapPlong is not available\n"); - return; - } - - longs[0] = 0xffff0001; - longs[1] = 0x1000ffff; - longs[2] = 0x20000001; - pSwapPlong(longs, 2); - ok((longs[0] == 0x0100ffff && longs[1] == 0xffff0010 && longs[2] == 0x20000001), - "Expected {0x0100ffff,0xffff0010,0x20000001}, got {0x%08x,0x%08x,0x%08x}\n", - longs[0], longs[1], longs[2]); -} - -static void test_HexFromBin(void) -{ - static char res[] = { "000102030405060708090A0B0C0D0E0F101112131415161" - "718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B" - "3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F6" - "06162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F8081828384" - "85868788898A8B8C8D8E8F909192939495969798999A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A" - "9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBFC0C1C2C3C4C5C6C7C8C9CACBCCCD" - "CECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDFE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F" - "2F3F4F5F6F7F8F9FAFBFCFDFE\0X" }; - BYTE data[255]; - WCHAR strw[256]; - BOOL bOk; - int i; - - if (!pHexFromBin || !pFBinFromHex) - { - win_skip("Hexadecimal conversion functions are not available\n"); - return; - } - - for (i = 0; i < 255; i++) - data[i] = i; - memset(strw, 'X', sizeof(strw)); - pHexFromBin(data, sizeof(data), strw); - - ok(memcmp(strw, res, sizeof(res) - 1) == 0, "HexFromBin: Result differs\n"); - - memset(data, 0, sizeof(data)); - pFBinFromHex((LPWSTR)res, data); - bOk = TRUE; - for (i = 0; i < 255; i++) - if (data[i] != i) - bOk = FALSE; - ok(bOk == TRUE, "FBinFromHex: Result differs\n"); -} - -static void test_UFromSz(void) -{ - if (!pUFromSz) - { - win_skip("UFromSz is not available\n"); - return; - } - - ok(pUFromSz("105679") == 105679u, - "UFromSz: expected 105679, got %d\n", pUFromSz("105679")); - - ok(pUFromSz(" 4") == 0, "UFromSz: exected 0. got %d\n", - pUFromSz(" 4")); -} - -static void test_UlFromSzHex(void) -{ - if (!pUlFromSzHex) - { - win_skip("UlFromSzHex is not available\n"); - return; - } - - ok(pUlFromSzHex("fF") == 0xffu, - "UlFromSzHex: expected 0xff, got 0x%x\n", pUlFromSzHex("fF")); - - ok(pUlFromSzHex(" c") == 0, "UlFromSzHex: exected 0x0. got 0x%x\n", - pUlFromSzHex(" c")); -} - -static void test_CbOfEncoded(void) -{ - char buff[129]; - unsigned int i; - - if (!pCbOfEncoded) - { - win_skip("CbOfEncoded is not available\n"); - return; - } - - for (i = 0; i < sizeof(buff) - 1; i++) - { - ULONG ulRet, ulExpected = (((i | 3) >> 2) + 1) * 3; - - memset(buff, '\0', sizeof(buff)); - memset(buff, '?', i); - ulRet = pCbOfEncoded(buff); - ok(ulRet == ulExpected, - "CbOfEncoded(length %d): expected %d, got %d\n", - i, ulExpected, ulRet); - } -} - -static void test_IsBadBoundedStringPtr(void) -{ - if (!pIsBadBoundedStringPtr) - { - win_skip("IsBadBoundedStringPtr is not available\n"); - return; - } - - ok(pIsBadBoundedStringPtr(NULL, 0) == TRUE, "IsBadBoundedStringPtr: expected TRUE\n"); - ok(pIsBadBoundedStringPtr("TEST", 4) == TRUE, "IsBadBoundedStringPtr: expected TRUE\n"); - ok(pIsBadBoundedStringPtr("TEST", 5) == FALSE, "IsBadBoundedStringPtr: expected FALSE\n"); -} - -START_TEST(util) -{ - SCODE ret; - - if (!HaveDefaultMailClient()) - { - win_skip("No default mail client installed\n"); - return; - } - - init_function_pointers(); - - if (!pScInitMapiUtil || !pDeinitMapiUtil) - { - win_skip("MAPI utility initialization functions are not available\n"); - FreeLibrary(hMapi32); - return; - } - - SetLastError(0xdeadbeef); - ret = pScInitMapiUtil(0); - if ((ret != S_OK) && (GetLastError() == ERROR_PROC_NOT_FOUND)) - { - win_skip("ScInitMapiUtil is not implemented\n"); - FreeLibrary(hMapi32); - return; - } - else if ((ret == E_FAIL) && (GetLastError() == ERROR_INVALID_HANDLE)) - { - win_skip("ScInitMapiUtil doesn't work on some Win98 and WinME systems\n"); - FreeLibrary(hMapi32); - return; - } - - test_SwapPword(); - test_SwapPlong(); - - /* We call MAPIInitialize here for the benefit of native extended MAPI - * providers which crash in the HexFromBin tests when MAPIInitialize has - * not been called. Since MAPIInitialize is irrelevant for HexFromBin on - * Wine, we do not care whether MAPIInitialize succeeds. */ - if (pMAPIInitialize) - ret = pMAPIInitialize(NULL); - test_HexFromBin(); - if (pMAPIUninitialize && ret == S_OK) - pMAPIUninitialize(); - - test_UFromSz(); - test_UlFromSzHex(); - test_CbOfEncoded(); - test_IsBadBoundedStringPtr(); - - pDeinitMapiUtil(); - FreeLibrary(hMapi32); -} diff --git a/rostests/winetests/mlang/CMakeLists.txt b/rostests/winetests/mlang/CMakeLists.txt deleted file mode 100644 index 49345f66e8a..00000000000 --- a/rostests/winetests/mlang/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(mlang_winetest mlang.c testlist.c) -target_link_libraries(mlang_winetest wine uuid) -set_module_type(mlang_winetest win32cui) -add_importlibs(mlang_winetest oleaut32 ole32 gdi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET mlang_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/mlang/mlang.c b/rostests/winetests/mlang/mlang.c deleted file mode 100644 index 2c4e0c17678..00000000000 --- a/rostests/winetests/mlang/mlang.c +++ /dev/null @@ -1,2019 +0,0 @@ -/* - * Unit test suite for MLANG APIs. - * - * Copyright 2004 Dmitry Timoshkov - * Copyright 2009 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 - -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "initguid.h" -#include "mlang.h" - -#include "wine/test.h" - -#ifndef CP_UNICODE -#define CP_UNICODE 1200 -#endif - -/* #define DUMP_CP_INFO */ -/* #define DUMP_SCRIPT_INFO */ - -static BOOL (WINAPI *pGetCPInfoExA)(UINT, DWORD, LPCPINFOEXA); -static HRESULT (WINAPI *pConvertINetMultiByteToUnicode)(LPDWORD, DWORD, LPCSTR, - LPINT, LPWSTR, LPINT); -static HRESULT (WINAPI *pConvertINetUnicodeToMultiByte)(LPDWORD, DWORD, LPCWSTR, - LPINT, LPSTR, LPINT); -static HRESULT (WINAPI *pRfc1766ToLcidA)(LCID *, LPCSTR); -static HRESULT (WINAPI *pLcidToRfc1766A)(LCID, LPSTR, INT); - -typedef struct lcid_tag_table { - LPCSTR rfc1766; - LCID lcid; - HRESULT hr; - LCID broken_lcid; - LPCSTR broken_rfc; -} lcid_table_entry; - -/* en, ar and zh use SUBLANG_NEUTRAL for the rfc1766 name without the country - all others suppress the country with SUBLANG_DEFAULT. - For 3 letter language codes, the rfc1766 is too small for the country */ - -static const lcid_table_entry lcid_table[] = { - {"e", -1, E_FAIL}, - {"", -1, E_FAIL}, - {"-", -1, E_FAIL}, - {"e-", -1, E_FAIL}, - - {"ar", 1, S_OK}, - {"zh", 4, S_OK}, - - {"de", 0x0407, S_OK}, - {"de-ch", 0x0807, S_OK}, - {"de-at", 0x0c07, S_OK}, - {"de-lu", 0x1007, S_OK}, - {"de-li", 0x1407, S_OK}, - - {"en", 9, S_OK}, - {"en-gb", 0x809, S_OK}, - {"en-GB", 0x809, S_OK}, - {"EN-GB", 0x809, S_OK}, - {"en-US", 0x409, S_OK}, - {"en-us", 0x409, S_OK}, - - {"fr", 0x040c, S_OK}, - {"fr-be", 0x080c, S_OK}, - {"fr-ca", 0x0c0c, S_OK}, - {"fr-ch", 0x100c, S_OK}, - {"fr-lu", 0x140c, S_OK}, - {"fr-mc", 0x180c, S_OK, 0x040c, "fr"}, - - {"it", 0x0410, S_OK}, - {"it-ch", 0x0810, S_OK}, - - {"nl", 0x0413, S_OK}, - {"nl-be", 0x0813, S_OK}, - {"pl", 0x0415, S_OK}, - {"ru", 0x0419, S_OK}, - - {"kok", 0x0457, S_OK, 0x0412, "x-kok"} - -}; - -#define TODO_NAME 1 - -typedef struct info_table_tag { - LCID lcid; - LANGID lang; - DWORD todo; - LPCSTR rfc1766; - LPCWSTR localename; - LPCWSTR broken_name; -} info_table_entry; - -static const WCHAR de_en[] = {'E','n','g','l','i','s','c','h',0}; -static const WCHAR de_enca[] = {'E','n','g','l','i','s','c','h',' ', - '(','K','a','n','a','d','a',')',0}; -static const WCHAR de_engb[] = {'E','n','g','l','i','s','c','h',' ', - '(','G','r','o',0xDF,'b','r','i','t','a','n','n','i','e','n',')',0}; -static const WCHAR de_engb2[] ={'E','n','g','l','i','s','c','h',' ', - '(','V','e','r','e','i','n','i','g','t','e','s',' ', - 'K',0xF6,'n','i','g','r','e','i','c',0}; -static const WCHAR de_enus[] = {'E','n','g','l','i','s','c','h',' ', - '(','U','S','A',')',0}; -static const WCHAR de_de[] = {'D','e','u','t','s','c','h',' ', - '(','D','e','u','t','s','c','h','l','a','n','d',')',0}; -static const WCHAR de_deat[] = {'D','e','u','t','s','c','h',' ', - '(',0xD6,'s','t','e','r','r','e','i','c','h',')',0}; -static const WCHAR de_dech[] = {'D','e','u','t','s','c','h',' ', - '(','S','c','h','w','e','i','z',')',0}; - -static const WCHAR en_en[] = {'E','n','g','l','i','s','h',0}; -static const WCHAR en_enca[] = {'E','n','g','l','i','s','h',' ', - '(','C','a','n','a','d','a',')',0}; -static const WCHAR en_engb[] = {'E','n','g','l','i','s','h',' ', - '(','U','n','i','t','e','d',' ','K','i','n','g','d','o','m',')',0}; -static const WCHAR en_enus[] = {'E','n','g','l','i','s','h',' ', - '(','U','n','i','t','e','d',' ','S','t','a','t','e','s',')',0}; -static const WCHAR en_de[] = {'G','e','r','m','a','n',' ', - '(','G','e','r','m','a','n','y',')',0}; -static const WCHAR en_deat[] = {'G','e','r','m','a','n',' ', - '(','A','u','s','t','r','i','a',')',0}; -static const WCHAR en_dech[] = {'G','e','r','m','a','n',' ', - '(','S','w','i','t','z','e','r','l','a','n','d',')',0}; - -static const WCHAR fr_en[] = {'A','n','g','l','a','i','s',0}; -static const WCHAR fr_enca[] = {'A','n','g','l','a','i','s',' ', - '(','C','a','n','a','d','a',')',0}; -static const WCHAR fr_engb[] = {'A','n','g','l','a','i','s',' ', - '(','R','o','y','a','u','m','e','-','U','n','i',')',0}; -static const WCHAR fr_enus[] = {'A','n','g','l','a','i','s',' ', - '(',0xC9, 't','a','t','s','-','U','n','i','s',')',0}; -static const WCHAR fr_enus2[] ={'A','n','g','l','a','i','s',' ', - '(','U','.','S','.',')',0}; -static const WCHAR fr_de[] = {'A','l','l','e','m','a','n','d',' ', - '(','A','l','l','e','m','a','g','n','e',')',0}; -static const WCHAR fr_de2[] = {'A','l','l','e','m','a','n','d',' ', - '(','S','t','a','n','d','a','r','d',')',0}; -static const WCHAR fr_deat[] = {'A','l','l','e','m','a','n','d',' ', - '(','A','u','t','r','i','c','h','e',')',0}; -static const WCHAR fr_dech[] = {'A','l','l','e','m','a','n','d',' ', - '(','S','u','i','s','s','e',')',0}; - -static const info_table_entry info_table[] = { - {MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL), MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL), - 0, "en", en_en}, - {MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT), MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL), - 0, "en-us", en_enus}, - {MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_UK), MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL), - 0, "en-gb", en_engb}, - {MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL), - 0, "en-us", en_enus}, - {MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_CAN), MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL), - 0, "en-ca", en_enca}, - - {MAKELANGID(LANG_GERMAN, SUBLANG_DEFAULT), MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL), - 0, "de", en_de}, - {MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN), MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL), - 0, "de", en_de}, - {MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN_SWISS), MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL), - 0, "de-ch", en_dech}, - {MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN_AUSTRIAN), MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL), - 0, "de-at", en_deat}, - - {MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL), MAKELANGID(LANG_GERMAN, SUBLANG_DEFAULT), - TODO_NAME, "en", de_en}, - {MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT), MAKELANGID(LANG_GERMAN, SUBLANG_DEFAULT), - TODO_NAME, "en-us", de_enus}, - {MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_UK), MAKELANGID(LANG_GERMAN, SUBLANG_DEFAULT), - TODO_NAME, "en-gb", de_engb, de_engb2}, - {MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), MAKELANGID(LANG_GERMAN, SUBLANG_DEFAULT), - TODO_NAME, "en-us", de_enus}, - {MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_CAN), MAKELANGID(LANG_GERMAN, SUBLANG_DEFAULT), - TODO_NAME, "en-ca", de_enca}, - - {MAKELANGID(LANG_GERMAN, SUBLANG_DEFAULT), MAKELANGID(LANG_GERMAN, SUBLANG_DEFAULT), - TODO_NAME, "de", de_de}, - {MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN), MAKELANGID(LANG_GERMAN, SUBLANG_DEFAULT), - TODO_NAME, "de",de_de}, - {MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN_SWISS), MAKELANGID(LANG_GERMAN, SUBLANG_DEFAULT), - TODO_NAME, "de-ch", de_dech}, - {MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN_AUSTRIAN), MAKELANGID(LANG_GERMAN, SUBLANG_DEFAULT), - TODO_NAME, "de-at", de_deat}, - - {MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL), MAKELANGID(LANG_FRENCH, SUBLANG_DEFAULT), - TODO_NAME, "en", fr_en}, - {MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT), MAKELANGID(LANG_FRENCH, SUBLANG_DEFAULT), - TODO_NAME, "en-us", fr_enus, fr_enus2}, - {MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_UK), MAKELANGID(LANG_FRENCH, SUBLANG_DEFAULT), - TODO_NAME, "en-gb", fr_engb}, - {MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), MAKELANGID(LANG_FRENCH, SUBLANG_DEFAULT), - TODO_NAME, "en-us", fr_enus, fr_enus2}, - {MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_CAN), MAKELANGID(LANG_FRENCH, SUBLANG_DEFAULT), - TODO_NAME, "en-ca", fr_enca}, - - {MAKELANGID(LANG_GERMAN, SUBLANG_DEFAULT), MAKELANGID(LANG_FRENCH, SUBLANG_DEFAULT), - TODO_NAME, "de", fr_de, fr_de2}, - {MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN), MAKELANGID(LANG_FRENCH, SUBLANG_DEFAULT), - TODO_NAME, "de", fr_de, fr_de2}, - {MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN_SWISS), MAKELANGID(LANG_FRENCH, SUBLANG_DEFAULT), - TODO_NAME, "de-ch", fr_dech}, - {MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN_AUSTRIAN), MAKELANGID(LANG_FRENCH, SUBLANG_DEFAULT), - TODO_NAME, "de-at", fr_deat} - -}; - -static BOOL init_function_ptrs(void) -{ - HMODULE hMlang; - - hMlang = LoadLibraryA("mlang.dll"); - if (!hMlang) - { - skip("mlang not available\n"); - return FALSE; - } - - pConvertINetMultiByteToUnicode = (void *)GetProcAddress(hMlang, "ConvertINetMultiByteToUnicode"); - pConvertINetUnicodeToMultiByte = (void *)GetProcAddress(hMlang, "ConvertINetUnicodeToMultiByte"); - pRfc1766ToLcidA = (void *)GetProcAddress(hMlang, "Rfc1766ToLcidA"); - pLcidToRfc1766A = (void *)GetProcAddress(hMlang, "LcidToRfc1766A"); - - pGetCPInfoExA = (void *)GetProcAddress(GetModuleHandleA("kernel32.dll"), "GetCPInfoExA"); - - return TRUE; -} - -#define ok_w2(format, szString1, szString2) \ -\ - if (lstrcmpW((szString1), (szString2)) != 0) \ - { \ - CHAR string1[256], string2[256]; \ - WideCharToMultiByte(CP_ACP, 0, (szString1), -1, string1, 256, NULL, NULL); \ - WideCharToMultiByte(CP_ACP, 0, (szString2), -1, string2, 256, NULL, NULL); \ - ok(0, (format), string1, string2); \ - } - -/* lstrcmpW is not supported on Win9x! */ -static int mylstrcmpW(const WCHAR* str1, const WCHAR* str2) -{ - if (!str2) return 1; - while (*str1 && *str1==*str2) { - str1++; - str2++; - } - return *str1-*str2; -} - -/* lstrcpyW is not supported on Win95 */ -static void mylstrcpyW(WCHAR* str1, const WCHAR* str2) -{ - while (str2 && *str2) { - *str1 = *str2; - str1++; - str2++; - } - *str1 = '\0'; -} - -static void test_multibyte_to_unicode_translations(IMultiLanguage2 *iML2) -{ - /* these APIs are broken regarding constness of the input buffer */ - char stringA[] = "Just a test string\0"; /* double 0 for CP_UNICODE tests */ - WCHAR stringW[] = {'J','u','s','t',' ','a',' ','t','e','s','t',' ','s','t','r','i','n','g',0}; - char bufA[256]; - WCHAR bufW[256]; - UINT lenA, lenW, expected_len; - HRESULT ret; - - /* IMultiLanguage2_ConvertStringToUnicode tests */ - - memset(bufW, 'x', sizeof(bufW)); - lenA = 0; - lenW = sizeof(bufW)/sizeof(bufW[0]); - ret = IMultiLanguage2_ConvertStringToUnicode(iML2, NULL, 1252, stringA, &lenA, bufW, &lenW); - ok(ret == S_OK, "IMultiLanguage2_ConvertStringToUnicode failed: %08x\n", ret); - ok(lenA == 0, "expected lenA 0, got %u\n", lenA); - ok(lenW == 0, "expected lenW 0, got %u\n", lenW); - - memset(bufW, 'x', sizeof(bufW)); - lenA = -1; - lenW = sizeof(bufW)/sizeof(bufW[0]); - ret = IMultiLanguage2_ConvertStringToUnicode(iML2, NULL, 1252, stringA, &lenA, bufW, &lenW); - ok(ret == S_OK, "IMultiLanguage2_ConvertStringToUnicode failed: %08x\n", ret); - ok(lenA == lstrlenA(stringA), "expected lenA %u, got %u\n", lstrlenA(stringA), lenA); - ok(lenW == lstrlenW(stringW), "expected lenW %u, got %u\n", lstrlenW(stringW), lenW); - if (lenW < sizeof(bufW)/sizeof(bufW[0])) { - /* can only happen if the convert call fails */ - ok(bufW[lenW] != 0, "buf should not be 0 terminated\n"); - bufW[lenW] = 0; /* -1 doesn't include 0 terminator */ - } - ok(!lstrcmpW(bufW, stringW), "bufW/stringW mismatch\n"); - - memset(bufW, 'x', sizeof(bufW)); - lenA = -1; - lenW = 5; - ret = IMultiLanguage2_ConvertStringToUnicode(iML2, NULL, 1252, stringA, &lenA, bufW, &lenW); - ok(ret == E_FAIL, "IMultiLanguage2_ConvertStringToUnicode should fail: %08x\n", ret); - ok(lenW == 0, "expected lenW 0, got %u\n", lenW); - /* still has to do partial conversion */ - ok(!memcmp(bufW, stringW, 5 * sizeof(WCHAR)), "bufW/stringW mismatch\n"); - - memset(bufW, 'x', sizeof(bufW)); - lenA = -1; - lenW = sizeof(bufW)/sizeof(bufW[0]); - ret = IMultiLanguage2_ConvertStringToUnicode(iML2, NULL, CP_UNICODE, stringA, &lenA, bufW, &lenW); - ok(ret == S_OK, "IMultiLanguage2_ConvertStringToUnicode failed: %08x\n", ret); - ok(lenA == lstrlenA(stringA), "expected lenA %u, got %u\n", lstrlenA(stringA), lenA); - ok(lenW == lstrlenW(stringW)/(int)sizeof(WCHAR), "wrong lenW %u\n", lenW); - ok(bufW[lenW] != 0, "buf should not be 0 terminated\n"); - bufW[lenW] = 0; /* -1 doesn't include 0 terminator */ - ok(!lstrcmpA((LPCSTR)bufW, stringA), "bufW/stringA mismatch\n"); - - memset(bufW, 'x', sizeof(bufW)); - lenA = lstrlenA(stringA); - lenW = 0; - ret = IMultiLanguage2_ConvertStringToUnicode(iML2, NULL, 1252, stringA, &lenA, NULL, &lenW); - ok(ret == S_OK, "IMultiLanguage2_ConvertStringToUnicode failed: %08x\n", ret); - ok(lenA == lstrlenA(stringA), "expected lenA %u, got %u\n", lstrlenA(stringA), lenA); - expected_len = MultiByteToWideChar(1252, 0, stringA, lenA, NULL, 0); - ok(lenW == expected_len, "expected lenW %u, got %u\n", expected_len, lenW); - - memset(bufW, 'x', sizeof(bufW)); - lenA = lstrlenA(stringA); - lenW = sizeof(bufW)/sizeof(bufW[0]); - ret = pConvertINetMultiByteToUnicode(NULL, 1252, stringA, (INT *)&lenA, NULL, (INT *)&lenW); - ok(ret == S_OK, "ConvertINetMultiByteToUnicode failed: %08x\n", ret); - ok(lenA == lstrlenA(stringA), "expected lenA %u, got %u\n", lstrlenA(stringA), lenA); - expected_len = MultiByteToWideChar(1252, 0, stringA, lenA, NULL, 0); - ok(lenW == expected_len, "expected lenW %u, got %u\n", expected_len, lenW); - - memset(bufW, 'x', sizeof(bufW)); - lenA = lstrlenA(stringA); - lenW = 0; - ret = pConvertINetMultiByteToUnicode(NULL, 1252, stringA, (INT *)&lenA, NULL, (INT *)&lenW); - ok(ret == S_OK, "ConvertINetMultiByteToUnicode failed: %08x\n", ret); - ok(lenA == lstrlenA(stringA), "expected lenA %u, got %u\n", lstrlenA(stringA), lenA); - expected_len = MultiByteToWideChar(1252, 0, stringA, lenA, NULL, 0); - ok(lenW == expected_len, "expected lenW %u, got %u\n", expected_len, lenW); - - /* IMultiLanguage2_ConvertStringFromUnicode tests */ - - memset(bufA, 'x', sizeof(bufA)); - lenW = 0; - lenA = sizeof(bufA); - ret = IMultiLanguage2_ConvertStringFromUnicode(iML2, NULL, 1252, stringW, &lenW, bufA, &lenA); - ok(ret == S_OK, "IMultiLanguage2_ConvertStringFromUnicode failed: %08x\n", ret); - ok(lenA == 0, "expected lenA 0, got %u\n", lenA); - ok(lenW == 0, "expected lenW 0, got %u\n", lenW); - - memset(bufA, 'x', sizeof(bufA)); - lenW = -1; - lenA = sizeof(bufA); - ret = IMultiLanguage2_ConvertStringFromUnicode(iML2, NULL, 1252, stringW, &lenW, bufA, &lenA); - ok(ret == S_OK, "IMultiLanguage2_ConvertStringFromUnicode failed: %08x\n", ret); - ok(lenA == lstrlenA(stringA), "expected lenA %u, got %u\n", lstrlenA(stringA), lenA); - ok(lenW == lstrlenW(stringW), "expected lenW %u, got %u\n", lstrlenW(stringW), lenW); - ok(bufA[lenA] != 0, "buf should not be 0 terminated\n"); - bufA[lenA] = 0; /* -1 doesn't include 0 terminator */ - ok(!lstrcmpA(bufA, stringA), "bufA/stringA mismatch\n"); - - memset(bufA, 'x', sizeof(bufA)); - lenW = -1; - lenA = 5; - ret = IMultiLanguage2_ConvertStringFromUnicode(iML2, NULL, 1252, stringW, &lenW, bufA, &lenA); - ok(ret == E_FAIL, "IMultiLanguage2_ConvertStringFromUnicode should fail: %08x\n", ret); - ok(lenA == 0, "expected lenA 0, got %u\n", lenA); - /* still has to do partial conversion */ - ok(!memcmp(bufA, stringA, 5), "bufW/stringW mismatch\n"); - - memset(bufA, 'x', sizeof(bufA)); - lenW = -1; - lenA = sizeof(bufA); - ret = IMultiLanguage2_ConvertStringFromUnicode(iML2, NULL, CP_UNICODE, stringW, &lenW, bufA, &lenA); - ok(ret == S_OK, "IMultiLanguage2_ConvertStringFromUnicode failed: %08x\n", ret); - ok(lenA == lstrlenA(stringA) * (int)sizeof(WCHAR), "wrong lenA %u\n", lenA); - ok(lenW == lstrlenW(stringW), "expected lenW %u, got %u\n", lstrlenW(stringW), lenW); - ok(bufA[lenA] != 0 && bufA[lenA+1] != 0, "buf should not be 0 terminated\n"); - bufA[lenA] = 0; /* -1 doesn't include 0 terminator */ - bufA[lenA+1] = 0; /* sizeof(WCHAR) */ - ok(!lstrcmpW((LPCWSTR)bufA, stringW), "bufA/stringW mismatch\n"); - - memset(bufA, 'x', sizeof(bufA)); - lenW = lstrlenW(stringW); - lenA = 0; - ret = IMultiLanguage2_ConvertStringFromUnicode(iML2, NULL, 1252, stringW, &lenW, NULL, &lenA); - ok(ret == S_OK, "IMultiLanguage2_ConvertStringFromUnicode failed: %08x\n", ret); - ok(lenW == lstrlenW(stringW), "expected lenW %u, got %u\n", lstrlenW(stringW), lenW); - expected_len = WideCharToMultiByte(1252, 0, stringW, lenW, NULL, 0, NULL, NULL); - ok(lenA == expected_len, "expected lenA %u, got %u\n", expected_len, lenA); -} - -static void cpinfo_cmp(MIMECPINFO *cpinfo1, MIMECPINFO *cpinfo2) -{ - ok(cpinfo1->dwFlags == cpinfo2->dwFlags, "dwFlags mismatch: %08x != %08x\n", cpinfo1->dwFlags, cpinfo2->dwFlags); - ok(cpinfo1->uiCodePage == cpinfo2->uiCodePage, "uiCodePage mismatch: %u != %u\n", cpinfo1->uiCodePage, cpinfo2->uiCodePage); - ok(cpinfo1->uiFamilyCodePage == cpinfo2->uiFamilyCodePage, "uiFamilyCodePage mismatch: %u != %u\n", cpinfo1->uiFamilyCodePage, cpinfo2->uiFamilyCodePage); - ok(!lstrcmpW(cpinfo1->wszDescription, cpinfo2->wszDescription), "wszDescription mismatch\n"); - ok(!lstrcmpW(cpinfo1->wszWebCharset, cpinfo2->wszWebCharset), "wszWebCharset mismatch\n"); - ok(!lstrcmpW(cpinfo1->wszHeaderCharset, cpinfo2->wszHeaderCharset), "wszHeaderCharset mismatch\n"); - ok(!lstrcmpW(cpinfo1->wszBodyCharset, cpinfo2->wszBodyCharset), "wszBodyCharset mismatch\n"); - ok(!lstrcmpW(cpinfo1->wszFixedWidthFont, cpinfo2->wszFixedWidthFont), "wszFixedWidthFont mismatch\n"); - ok(!lstrcmpW(cpinfo1->wszProportionalFont, cpinfo2->wszProportionalFont), "wszProportionalFont mismatch\n"); - ok(cpinfo1->bGDICharset == cpinfo2->bGDICharset, "bGDICharset mismatch: %d != %d\n", cpinfo1->bGDICharset, cpinfo2->bGDICharset); -} - -#ifdef DUMP_CP_INFO -static const char *dump_mime_flags(DWORD flags) -{ - static char buf[1024]; - - buf[0] = 0; - - if (flags & MIMECONTF_MAILNEWS) strcat(buf, " MIMECONTF_MAILNEWS"); - if (flags & MIMECONTF_BROWSER) strcat(buf, " MIMECONTF_BROWSER"); - if (flags & MIMECONTF_MINIMAL) strcat(buf, " MIMECONTF_MINIMAL"); - if (flags & MIMECONTF_IMPORT) strcat(buf, " MIMECONTF_IMPORT"); - if (flags & MIMECONTF_SAVABLE_MAILNEWS) strcat(buf, " MIMECONTF_SAVABLE_MAILNEWS"); - if (flags & MIMECONTF_SAVABLE_BROWSER) strcat(buf, " MIMECONTF_SAVABLE_BROWSER"); - if (flags & MIMECONTF_EXPORT) strcat(buf, " MIMECONTF_EXPORT"); - if (flags & MIMECONTF_PRIVCONVERTER) strcat(buf, " MIMECONTF_PRIVCONVERTER"); - if (flags & MIMECONTF_VALID) strcat(buf, " MIMECONTF_VALID"); - if (flags & MIMECONTF_VALID_NLS) strcat(buf, " MIMECONTF_VALID_NLS"); - if (flags & MIMECONTF_MIME_IE4) strcat(buf, " MIMECONTF_MIME_IE4"); - if (flags & MIMECONTF_MIME_LATEST) strcat(buf, " MIMECONTF_MIME_LATEST"); - if (flags & MIMECONTF_MIME_REGISTRY) strcat(buf, " MIMECONTF_MIME_REGISTRY"); - - return buf; -} -#endif - -static HRESULT check_convertible(IMultiLanguage2 *iML2, UINT from, UINT to) -{ - CHAR convert[MAX_PATH]; - BYTE dest[MAX_PATH]; - HRESULT hr; - UINT srcsz, destsz; - - static WCHAR strW[] = {'a','b','c',0}; - - /* Check to see if the target codepage has these characters or not */ - if (from != CP_UTF8) - { - BOOL fDefaultChar; - char ch[10]; - int cb; - cb = WideCharToMultiByte( from, WC_NO_BEST_FIT_CHARS | WC_COMPOSITECHECK | WC_DEFAULTCHAR, - strW, 3, ch, sizeof(ch), NULL, &fDefaultChar); - - if(cb == 0 || fDefaultChar) - { - trace("target codepage %i does not contain 'abc'\n",from); - return E_FAIL; - } - } - - srcsz = lstrlenW(strW) + 1; - destsz = MAX_PATH; - hr = IMultiLanguage2_ConvertStringFromUnicode(iML2, NULL, from, strW, - &srcsz, convert, &destsz); - if (hr != S_OK) - return S_FALSE; - - srcsz = -1; - destsz = MAX_PATH; - hr = IMultiLanguage2_ConvertString(iML2, NULL, from, to, (BYTE *)convert, - &srcsz, dest, &destsz); - if (hr != S_OK) - return S_FALSE; - - return S_OK; -} - -static void test_EnumCodePages(IMultiLanguage2 *iML2, DWORD flags) -{ - IEnumCodePage *iEnumCP = NULL; - MIMECPINFO *cpinfo; - MIMECPINFO cpinfo2; - HRESULT ret; - ULONG i, n; - UINT total; - - total = 0; - ret = IMultiLanguage2_GetNumberOfCodePageInfo(iML2, &total); - ok(ret == S_OK && total != 0, "IMultiLanguage2_GetNumberOfCodePageInfo: expected S_OK/!0, got %08x/%u\n", ret, total); - - trace("total mlang supported codepages %u\n", total); - - ret = IMultiLanguage2_EnumCodePages(iML2, flags, LANG_NEUTRAL, &iEnumCP); - ok(ret == S_OK && iEnumCP, "IMultiLanguage2_EnumCodePages: expected S_OK/!NULL, got %08x/%p\n", ret, iEnumCP); - - ret = IEnumCodePage_Reset(iEnumCP); - ok(ret == S_OK, "IEnumCodePage_Reset: expected S_OK, got %08x\n", ret); - n = 65536; - ret = IEnumCodePage_Next(iEnumCP, 0, NULL, &n); - if (ret == S_FALSE) - ok(n == 0 && ret == S_FALSE, "IEnumCodePage_Next: expected 0/S_FALSE, got %u/%08x\n", n, ret); - else if (ret == E_FAIL) - ok(n == 65536 && ret == E_FAIL, "IEnumCodePage_Next: expected 65536/E_FAIL, got %u/%08x\n", n, ret); - ret = IEnumCodePage_Next(iEnumCP, 0, NULL, NULL); - if (ret == S_FALSE) - ok(ret == S_FALSE, "IEnumCodePage_Next: expected S_FALSE, got %08x\n", ret); - else if (ret == E_FAIL) - ok(n == 65536 && ret == E_FAIL, "IEnumCodePage_Next: expected 65536/E_FAIL, got %u/%08x\n", n, ret); - - cpinfo = HeapAlloc(GetProcessHeap(), 0, sizeof(*cpinfo) * total * 2); - - n = total * 2; - ret = IEnumCodePage_Next(iEnumCP, 0, cpinfo, &n); - ok(ret == S_FALSE && n == 0, "IEnumCodePage_Next: expected S_FALSE/0, got %08x/%u\n", ret, n); - - n = total * 2; - ret = IEnumCodePage_Next(iEnumCP, n, cpinfo, &n); - ok(ret == S_OK && n != 0, "IEnumCodePage_Next: expected S_OK/!0, got %08x/%u\n", ret, n); - - trace("flags %08x, enumerated codepages %u\n", flags, n); - - if (!flags) - { - ok(n == total, "IEnumCodePage_Next: expected %u, got %u\n", total, n); - - flags = MIMECONTF_MIME_LATEST; - } - - total = n; - - for (i = 0; i < n; i++) - { - CHARSETINFO csi; - MIMECSETINFO mcsi; - HRESULT convertible = S_OK; - static const WCHAR autoW[] = {'_','a','u','t','o',0}; - static const WCHAR feffW[] = {'u','n','i','c','o','d','e','F','E','F','F',0}; - -#ifdef DUMP_CP_INFO - trace("MIMECPINFO #%u:\n" - "dwFlags %08x %s\n" - "uiCodePage %u\n" - "uiFamilyCodePage %u\n" - "wszDescription %s\n" - "wszWebCharset %s\n" - "wszHeaderCharset %s\n" - "wszBodyCharset %s\n" - "wszFixedWidthFont %s\n" - "wszProportionalFont %s\n" - "bGDICharset %d\n\n", - i, - cpinfo[i].dwFlags, dump_mime_flags(cpinfo[i].dwFlags), - cpinfo[i].uiCodePage, - cpinfo[i].uiFamilyCodePage, - wine_dbgstr_w(cpinfo[i].wszDescription), - wine_dbgstr_w(cpinfo[i].wszWebCharset), - wine_dbgstr_w(cpinfo[i].wszHeaderCharset), - wine_dbgstr_w(cpinfo[i].wszBodyCharset), - wine_dbgstr_w(cpinfo[i].wszFixedWidthFont), - wine_dbgstr_w(cpinfo[i].wszProportionalFont), - cpinfo[i].bGDICharset); -#endif - ok(cpinfo[i].dwFlags & flags, "enumerated flags %08x do not include requested %08x\n", cpinfo[i].dwFlags, flags); - - if (TranslateCharsetInfo((DWORD *)(INT_PTR)cpinfo[i].uiFamilyCodePage, &csi, TCI_SRCCODEPAGE)) - ok(cpinfo[i].bGDICharset == csi.ciCharset, "%d != %d\n", cpinfo[i].bGDICharset, csi.ciCharset); - else - if (winetest_debug > 1) - trace("TranslateCharsetInfo failed for cp %u\n", cpinfo[i].uiFamilyCodePage); - -#ifdef DUMP_CP_INFO - trace("%u: codepage %u family %u\n", i, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage); -#endif - /* Win95 does not support UTF-7 */ - if (cpinfo[i].uiCodePage == CP_UTF7) continue; - - /* support files for some codepages might be not installed, or - * the codepage is just an alias. - */ - if (IsValidCodePage(cpinfo[i].uiCodePage)) - { - ret = IMultiLanguage2_IsConvertible(iML2, cpinfo[i].uiCodePage, CP_UNICODE); - ok(ret == S_OK, "IMultiLanguage2_IsConvertible(%u -> CP_UNICODE) = %08x\n", cpinfo[i].uiCodePage, ret); - ret = IMultiLanguage2_IsConvertible(iML2, CP_UNICODE, cpinfo[i].uiCodePage); - ok(ret == S_OK, "IMultiLanguage2_IsConvertible(CP_UNICODE -> %u) = %08x\n", cpinfo[i].uiCodePage, ret); - - convertible = check_convertible(iML2, cpinfo[i].uiCodePage, CP_UTF8); - if (convertible != E_FAIL) - { - ret = IMultiLanguage2_IsConvertible(iML2, cpinfo[i].uiCodePage, CP_UTF8); - ok(ret == convertible, "IMultiLanguage2_IsConvertible(%u -> CP_UTF8) = %08x\n", cpinfo[i].uiCodePage, ret); - ret = IMultiLanguage2_IsConvertible(iML2, CP_UTF8, cpinfo[i].uiCodePage); - ok(ret == convertible, "IMultiLanguage2_IsConvertible(CP_UTF8 -> %u) = %08x\n", cpinfo[i].uiCodePage, ret); - } - } - else - if (winetest_debug > 1) - trace("IsValidCodePage failed for cp %u\n", cpinfo[i].uiCodePage); - - if (memcmp(cpinfo[i].wszWebCharset,feffW,sizeof(WCHAR)*11)==0) - skip("Legacy windows bug returning invalid charset of unicodeFEFF\n"); - else - { - ret = IMultiLanguage2_GetCharsetInfo(iML2, cpinfo[i].wszWebCharset, &mcsi); - /* _autoxxx charsets are a fake and GetCharsetInfo fails for them */ - if (memcmp(cpinfo[i].wszWebCharset, autoW, 5 * sizeof(WCHAR))) - { - ok (ret == S_OK, "IMultiLanguage2_GetCharsetInfo failed: %08x\n", ret); -#ifdef DUMP_CP_INFO - trace("%s: %u %u %s\n", wine_dbgstr_w(cpinfo[i].wszWebCharset), mcsi.uiCodePage, mcsi.uiInternetEncoding, wine_dbgstr_w(mcsi.wszCharset)); -#endif - ok(!lstrcmpiW(cpinfo[i].wszWebCharset, mcsi.wszCharset), "%s != %s\n", - wine_dbgstr_w(cpinfo[i].wszWebCharset), wine_dbgstr_w(mcsi.wszCharset)); - - if (0) - { - /* native mlang returns completely messed up encodings in some cases */ - ok(mcsi.uiInternetEncoding == cpinfo[i].uiCodePage || mcsi.uiInternetEncoding == cpinfo[i].uiFamilyCodePage, - "%u != %u || %u\n", mcsi.uiInternetEncoding, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage); - ok(mcsi.uiCodePage == cpinfo[i].uiCodePage || mcsi.uiCodePage == cpinfo[i].uiFamilyCodePage, - "%u != %u || %u\n", mcsi.uiCodePage, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage); - } - } - } - - if (memcmp(cpinfo[i].wszHeaderCharset,feffW,sizeof(WCHAR)*11)==0) - skip("Legacy windows bug returning invalid charset of unicodeFEFF\n"); - else - { - ret = IMultiLanguage2_GetCharsetInfo(iML2, cpinfo[i].wszHeaderCharset, &mcsi); - /* _autoxxx charsets are a fake and GetCharsetInfo fails for them */ - if (memcmp(cpinfo[i].wszHeaderCharset, autoW, 5 * sizeof(WCHAR))) - { - ok (ret == S_OK, "IMultiLanguage2_GetCharsetInfo failed: %08x\n", ret); -#ifdef DUMP_CP_INFO - trace("%s: %u %u %s\n", wine_dbgstr_w(cpinfo[i].wszHeaderCharset), mcsi.uiCodePage, mcsi.uiInternetEncoding, wine_dbgstr_w(mcsi.wszCharset)); -#endif - ok(!lstrcmpiW(cpinfo[i].wszHeaderCharset, mcsi.wszCharset), "%s != %s\n", - wine_dbgstr_w(cpinfo[i].wszHeaderCharset), wine_dbgstr_w(mcsi.wszCharset)); - - if (0) - { - /* native mlang returns completely messed up encodings in some cases */ - ok(mcsi.uiInternetEncoding == cpinfo[i].uiCodePage || mcsi.uiInternetEncoding == cpinfo[i].uiFamilyCodePage, - "%u != %u || %u\n", mcsi.uiInternetEncoding, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage); - ok(mcsi.uiCodePage == cpinfo[i].uiCodePage || mcsi.uiCodePage == cpinfo[i].uiFamilyCodePage, - "%u != %u || %u\n", mcsi.uiCodePage, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage); - } - } - } - - if (memcmp(cpinfo[i].wszBodyCharset,feffW,sizeof(WCHAR)*11)==0) - skip("Legacy windows bug returning invalid charset of unicodeFEFF\n"); - else - { - ret = IMultiLanguage2_GetCharsetInfo(iML2, cpinfo[i].wszBodyCharset, &mcsi); - /* _autoxxx charsets are a fake and GetCharsetInfo fails for them */ - if (memcmp(cpinfo[i].wszBodyCharset, autoW, 5 * sizeof(WCHAR))) - { - ok (ret == S_OK, "IMultiLanguage2_GetCharsetInfo failed: %08x\n", ret); -#ifdef DUMP_CP_INFO - trace("%s: %u %u %s\n", wine_dbgstr_w(cpinfo[i].wszBodyCharset), mcsi.uiCodePage, mcsi.uiInternetEncoding, wine_dbgstr_w(mcsi.wszCharset)); -#endif - ok(!lstrcmpiW(cpinfo[i].wszBodyCharset, mcsi.wszCharset), "%s != %s\n", - wine_dbgstr_w(cpinfo[i].wszBodyCharset), wine_dbgstr_w(mcsi.wszCharset)); - - if (0) - { - /* native mlang returns completely messed up encodings in some cases */ - ok(mcsi.uiInternetEncoding == cpinfo[i].uiCodePage || mcsi.uiInternetEncoding == cpinfo[i].uiFamilyCodePage, - "%u != %u || %u\n", mcsi.uiInternetEncoding, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage); - ok(mcsi.uiCodePage == cpinfo[i].uiCodePage || mcsi.uiCodePage == cpinfo[i].uiFamilyCodePage, - "%u != %u || %u\n", mcsi.uiCodePage, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage); - } - } - } - } - - /* now IEnumCodePage_Next should fail, since pointer is at the end */ - n = 1; - ret = IEnumCodePage_Next(iEnumCP, 1, &cpinfo2, &n); - ok(ret == S_FALSE && n == 0, "IEnumCodePage_Next: expected S_FALSE/0, got %08x/%u\n", ret, n); - - ret = IEnumCodePage_Reset(iEnumCP); - ok(ret == S_OK, "IEnumCodePage_Reset: expected S_OK, got %08x\n", ret); - n = 0; - ret = IEnumCodePage_Next(iEnumCP, 1, &cpinfo2, &n); - ok(n == 1 && ret == S_OK, "IEnumCodePage_Next: expected 1/S_OK, got %u/%08x\n", n, ret); - cpinfo_cmp(&cpinfo[0], &cpinfo2); - - if (0) - { - /* Due to a bug in MS' implementation of IEnumCodePage_Skip - * it's not used here. - */ - ret = IEnumCodePage_Skip(iEnumCP, 1); - ok(ret == S_OK, "IEnumCodePage_Skip: expected S_OK, got %08x\n", ret); - } - for (i = 0; i < total - 1; i++) - { - n = 0; - ret = IEnumCodePage_Next(iEnumCP, 1, &cpinfo2, &n); - ok(n == 1 && ret == S_OK, "IEnumCodePage_Next: expected 1/S_OK, got %u/%08x\n", n, ret); - cpinfo_cmp(&cpinfo[i + 1], &cpinfo2); - } - - HeapFree(GetProcessHeap(), 0, cpinfo); - IEnumCodePage_Release(iEnumCP); -} - -static void scriptinfo_cmp(SCRIPTINFO *sinfo1, SCRIPTINFO *sinfo2) -{ - ok(sinfo1->ScriptId == sinfo2->ScriptId, "ScriptId mismatch: %d != %d\n", sinfo1->ScriptId, sinfo2->ScriptId); - ok(sinfo1->uiCodePage == sinfo2->uiCodePage, "uiCodePage mismatch: %u != %u\n", sinfo1->uiCodePage, sinfo2->uiCodePage); - ok(!lstrcmpW(sinfo1->wszDescription, sinfo2->wszDescription), "wszDescription mismatch\n"); - ok(!lstrcmpW(sinfo1->wszFixedWidthFont, sinfo2->wszFixedWidthFont), "wszFixedWidthFont mismatch\n"); - ok(!lstrcmpW(sinfo1->wszProportionalFont, sinfo2->wszProportionalFont), "wszProportionalFont mismatch\n"); -} - -static void test_EnumScripts(IMultiLanguage2 *iML2, DWORD flags) -{ - IEnumScript *iEnumScript = NULL; - SCRIPTINFO *sinfo; - SCRIPTINFO sinfo2; - HRESULT ret; - ULONG i, n; - UINT total; - - total = 0; - ret = IMultiLanguage2_GetNumberOfScripts(iML2, &total); - ok(ret == S_OK && total != 0, "IMultiLanguage2_GetNumberOfScripts: expected S_OK/!0, got %08x/%u\n", ret, total); - - trace("total mlang supported scripts %u\n", total); - - ret = IMultiLanguage2_EnumScripts(iML2, flags, LANG_NEUTRAL, &iEnumScript); - ok(ret == S_OK && iEnumScript, "IMultiLanguage2_EnumScripts: expected S_OK/!NULL, got %08x/%p\n", ret, iEnumScript); - - ret = IEnumScript_Reset(iEnumScript); - ok(ret == S_OK, "IEnumScript_Reset: expected S_OK, got %08x\n", ret); - n = 65536; - ret = IEnumScript_Next(iEnumScript, 0, NULL, &n); - ok(n == 65536 && ret == E_FAIL, "IEnumScript_Next: expected 65536/E_FAIL, got %u/%08x\n", n, ret); - ret = IEnumScript_Next(iEnumScript, 0, NULL, NULL); - ok(ret == E_FAIL, "IEnumScript_Next: expected E_FAIL, got %08x\n", ret); - - sinfo = HeapAlloc(GetProcessHeap(), 0, sizeof(*sinfo) * total * 2); - - n = total * 2; - ret = IEnumScript_Next(iEnumScript, 0, sinfo, &n); - ok(ret == S_FALSE && n == 0, "IEnumScript_Next: expected S_FALSE/0, got %08x/%u\n", ret, n); - - n = total * 2; - ret = IEnumScript_Next(iEnumScript, n, sinfo, &n); - ok(ret == S_OK && n != 0, "IEnumScript_Next: expected S_OK, got %08x/%u\n", ret, n); - - trace("flags %08x, enumerated scripts %u\n", flags, n); - - if (!flags) - { - ok(n == total, "IEnumScript_Next: expected %u, got %u\n", total, n); - flags = SCRIPTCONTF_SCRIPT_USER | SCRIPTCONTF_SCRIPT_HIDE | SCRIPTCONTF_SCRIPT_SYSTEM; - } - - total = n; - - for (i = 0; pGetCPInfoExA && i < n; i++) - { -#ifdef DUMP_SCRIPT_INFO - trace("SCRIPTINFO #%u:\n" - "ScriptId %08x\n" - "uiCodePage %u\n" - "wszDescription %s\n" - "wszFixedWidthFont %s\n" - "wszProportionalFont %s\n\n", - i, - sinfo[i].ScriptId, - sinfo[i].uiCodePage, - wine_dbgstr_w(sinfo[i].wszDescription), - wine_dbgstr_w(sinfo[i].wszFixedWidthFont), - wine_dbgstr_w(sinfo[i].wszProportionalFont)); - trace("%u codepage %u\n", i, sinfo[i].uiCodePage); -#endif - } - - /* now IEnumScript_Next should fail, since pointer is at the end */ - n = 1; - ret = IEnumScript_Next(iEnumScript, 1, &sinfo2, &n); - ok(ret == S_FALSE && n == 0, "IEnumScript_Next: expected S_FALSE/0, got %08x/%u\n", ret, n); - - ret = IEnumScript_Reset(iEnumScript); - ok(ret == S_OK, "IEnumScript_Reset: expected S_OK, got %08x\n", ret); - n = 0; - ret = IEnumScript_Next(iEnumScript, 1, &sinfo2, &n); - ok(n == 1 && ret == S_OK, "IEnumScript_Next: expected 1/S_OK, got %u/%08x\n", n, ret); - scriptinfo_cmp(&sinfo[0], &sinfo2); - - if (0) - { - /* Due to a bug in MS' implementation of IEnumScript_Skip - * it's not used here. - */ - ret = IEnumScript_Skip(iEnumScript, 1); - ok(ret == S_OK, "IEnumScript_Skip: expected S_OK, got %08x\n", ret); - } - for (i = 0; i < total - 1; i++) - { - n = 0; - ret = IEnumScript_Next(iEnumScript, 1, &sinfo2, &n); - ok(n == 1 && ret == S_OK, "IEnumScript_Next: expected 1/S_OK, got %u/%08x\n", n, ret); - scriptinfo_cmp(&sinfo[i + 1], &sinfo2); - } - - HeapFree(GetProcessHeap(), 0, sinfo); - IEnumScript_Release(iEnumScript); -} - -static void IMLangFontLink_Test(IMLangFontLink* iMLFL) -{ - DWORD dwCodePages, dwManyCodePages; - DWORD dwCmpCodePages; - UINT CodePage; - static const WCHAR str[3] = { 'd', 0x0436, 0xff90 }; - LONG processed; - HRESULT ret; - - dwCodePages = ~0u; - ret = IMLangFontLink_CodePageToCodePages(iMLFL, -1, &dwCodePages); - ok(ret == E_FAIL, "IMLangFontLink_CodePageToCodePages should fail: %x\n", ret); - ok(dwCodePages == 0, "expected 0, got %u\n", dwCodePages); - - dwCodePages = 0; - ret = IMLangFontLink_CodePageToCodePages(iMLFL, 932, &dwCodePages); - ok(ret == S_OK, "IMLangFontLink_CodePageToCodePages error %x\n", ret); - ok(dwCodePages == FS_JISJAPAN, "expected FS_JISJAPAN, got %08x\n", dwCodePages); - CodePage = 0; - ret = IMLangFontLink_CodePagesToCodePage(iMLFL, dwCodePages, 1035, &CodePage); - ok(ret == S_OK, "IMLangFontLink_CodePagesToCodePage error %x\n", ret); - ok(CodePage == 932, "Incorrect CodePage Returned (%i)\n",CodePage); - - dwManyCodePages = 0; - ret = IMLangFontLink_CodePageToCodePages(iMLFL, 1252, &dwManyCodePages); - ok(ret == S_OK, "IMLangFontLink_CodePageToCodePages error %x\n", ret); - ok(dwManyCodePages == FS_LATIN1, "expected FS_LATIN1, got %08x\n", dwManyCodePages); - dwCodePages = 0; - ret = IMLangFontLink_CodePageToCodePages(iMLFL, 1256, &dwCodePages); - ok(ret == S_OK, "IMLangFontLink_CodePageToCodePages error %x\n", ret); - ok(dwCodePages == FS_ARABIC, "expected FS_ARABIC, got %08x\n", dwCodePages); - dwManyCodePages |= dwCodePages; - ret = IMLangFontLink_CodePageToCodePages(iMLFL, 874, &dwCodePages); - ok(ret == S_OK, "IMLangFontLink_CodePageToCodePages error %x\n", ret); - ok(dwCodePages == FS_THAI, "expected FS_THAI, got %08x\n", dwCodePages); - dwManyCodePages |= dwCodePages; - - ret = IMLangFontLink_CodePagesToCodePage(iMLFL, dwManyCodePages, 1256, &CodePage); - ok(ret == S_OK, "IMLangFontLink_CodePagesToCodePage error %x\n", ret); - ok(CodePage == 1256, "Incorrect CodePage Returned (%i)\n",CodePage); - - ret = IMLangFontLink_CodePagesToCodePage(iMLFL, dwManyCodePages, 936, &CodePage); - ok(ret == S_OK, "IMLangFontLink_CodePagesToCodePage error %x\n", ret); - ok(CodePage == 1252, "Incorrect CodePage Returned (%i)\n",CodePage); - - /* Tests for GetCharCodePages */ - - /* Latin 1 */ - dwCmpCodePages = FS_LATIN1 | FS_LATIN2 | FS_CYRILLIC | FS_GREEK | FS_TURKISH - | FS_HEBREW | FS_ARABIC | FS_BALTIC | FS_VIETNAMESE | FS_THAI - | FS_JISJAPAN | FS_CHINESESIMP | FS_WANSUNG | FS_CHINESETRAD; - ret = IMLangFontLink_GetCharCodePages(iMLFL, 'd', &dwCodePages); - ok(ret == S_OK, "IMLangFontLink_GetCharCodePages error %x\n", ret); - ok(dwCodePages == dwCmpCodePages, "expected %x, got %x\n", dwCmpCodePages, dwCodePages); - - dwCodePages = 0; - processed = 0; - ret = IMLangFontLink_GetStrCodePages(iMLFL, &str[0], 1, 0, &dwCodePages, &processed); - ok(ret == S_OK, "IMLangFontLink_GetStrCodePages error %x\n", ret); - ok(dwCodePages == dwCmpCodePages, "expected %x, got %x\n", dwCmpCodePages, dwCodePages); - ok(processed == 1, "expected 1, got %d\n", processed); - - /* Cyrillic */ - dwCmpCodePages = FS_CYRILLIC | FS_JISJAPAN | FS_CHINESESIMP | FS_WANSUNG; - ret = IMLangFontLink_GetCharCodePages(iMLFL, 0x0436, &dwCodePages); - ok(ret == S_OK, "IMLangFontLink_GetCharCodePages error %x\n", ret); - ok(dwCodePages == dwCmpCodePages, "expected %x, got %x\n", dwCmpCodePages, dwCodePages); - - dwCodePages = 0; - processed = 0; - ret = IMLangFontLink_GetStrCodePages(iMLFL, &str[1], 1, 0, &dwCodePages, &processed); - ok(ret == S_OK, "IMLangFontLink_GetStrCodePages error %x\n", ret); - ok(dwCodePages == dwCmpCodePages, "expected %x, got %x\n", dwCmpCodePages, dwCodePages); - ok(processed == 1, "expected 1, got %d\n", processed); - - /* Japanese */ - dwCmpCodePages = FS_JISJAPAN; - ret = IMLangFontLink_GetCharCodePages(iMLFL, 0xff90, &dwCodePages); - ok(ret == S_OK, "IMLangFontLink_GetCharCodePages error %x\n", ret); - ok(dwCodePages == dwCmpCodePages, "expected %x, got %x\n", dwCmpCodePages, dwCodePages); - - dwCodePages = 0; - processed = 0; - ret = IMLangFontLink_GetStrCodePages(iMLFL, &str[2], 1, 0, &dwCodePages, &processed); - ok(ret == S_OK, "IMLangFontLink_GetStrCodePages error %x\n", ret); - ok(dwCodePages == dwCmpCodePages, "expected %x, got %x\n", dwCmpCodePages, dwCodePages); - ok(processed == 1, "expected 1, got %d\n", processed); - - dwCmpCodePages = FS_CYRILLIC | FS_JISJAPAN | FS_CHINESESIMP | FS_WANSUNG; - dwCodePages = 0; - processed = 0; - ret = IMLangFontLink_GetStrCodePages(iMLFL, str, 2, 0, &dwCodePages, &processed); - ok(ret == S_OK, "IMLangFontLink_GetStrCodePages error %x\n", ret); - ok(dwCodePages == dwCmpCodePages, "expected %x, got %x\n", dwCmpCodePages, dwCodePages); - ok(processed == 2, "expected 2, got %d\n", processed); - - dwCmpCodePages = FS_JISJAPAN; - dwCodePages = 0; - processed = 0; - ret = IMLangFontLink_GetStrCodePages(iMLFL, str, 3, 0, &dwCodePages, &processed); - ok(ret == S_OK, "IMLangFontLink_GetStrCodePages error %x\n", ret); - ok(dwCodePages == dwCmpCodePages, "expected %x, got %x\n", dwCmpCodePages, dwCodePages); - ok(processed == 3, "expected 3, got %d\n", processed); - - dwCodePages = 0xffff; - processed = -1; - ret = IMLangFontLink_GetStrCodePages(iMLFL, &str[2], 1, 0, &dwCodePages, &processed); - ok(ret == S_OK, "IMLangFontLink_GetStrCodePages error %x\n", ret); - ok(dwCodePages == dwCmpCodePages, "expected %x, got %x\n", dwCmpCodePages, dwCodePages); - ok(processed == 1, "expected 0, got %d\n", processed); - - ret = IMLangFontLink_GetStrCodePages(iMLFL, &str[2], 1, 0, NULL, NULL); - ok(ret == S_OK, "IMLangFontLink_GetStrCodePages error %x\n", ret); - - dwCodePages = 0xffff; - processed = -1; - ret = IMLangFontLink_GetStrCodePages(iMLFL, str, -1, 0, &dwCodePages, &processed); - ok(ret == E_INVALIDARG, "IMLangFontLink_GetStrCodePages should fail: %x\n", ret); - ok(dwCodePages == 0, "expected %x, got %x\n", dwCmpCodePages, dwCodePages); - ok(processed == 0, "expected 0, got %d\n", processed); - - dwCodePages = 0xffff; - processed = -1; - ret = IMLangFontLink_GetStrCodePages(iMLFL, NULL, 1, 0, &dwCodePages, &processed); - ok(ret == E_INVALIDARG, "IMLangFontLink_GetStrCodePages should fail: %x\n", ret); - ok(dwCodePages == 0, "expected %x, got %x\n", dwCmpCodePages, dwCodePages); - ok(processed == 0, "expected 0, got %d\n", processed); - - dwCodePages = 0xffff; - processed = -1; - ret = IMLangFontLink_GetStrCodePages(iMLFL, str, 0, 0, &dwCodePages, &processed); - ok(ret == E_INVALIDARG, "IMLangFontLink_GetStrCodePages should fail: %x\n", ret); - ok(dwCodePages == 0, "expected %x, got %x\n", dwCmpCodePages, dwCodePages); - ok(processed == 0, "expected 0, got %d\n", processed); -} - -/* copied from libs/wine/string.c */ -static WCHAR *strstrW(const WCHAR *str, const WCHAR *sub) -{ - while (*str) - { - const WCHAR *p1 = str, *p2 = sub; - while (*p1 && *p2 && *p1 == *p2) { p1++; p2++; } - if (!*p2) return (WCHAR *)str; - str++; - } - return NULL; -} - -static void test_rfc1766(IMultiLanguage2 *iML2) -{ - IEnumRfc1766 *pEnumRfc1766; - RFC1766INFO info; - ULONG n; - HRESULT ret; - BSTR rfcstr; - - ret = IMultiLanguage2_EnumRfc1766(iML2, LANG_NEUTRAL, &pEnumRfc1766); - ok(ret == S_OK, "IMultiLanguage2_EnumRfc1766 error %08x\n", ret); - - while (1) - { - ret = IEnumRfc1766_Next(pEnumRfc1766, 1, &info, &n); - if (ret != S_OK) break; - -#ifdef DUMP_CP_INFO - trace("lcid %04x rfc_name %s locale_name %s\n", - info.lcid, wine_dbgstr_w(info.wszRfc1766), wine_dbgstr_w(info.wszLocaleName)); -#endif - - ok(n == 1, "couldn't fetch 1 RFC1766INFO structure\n"); - - /* verify the Rfc1766 value */ - ret = IMultiLanguage2_GetRfc1766FromLcid(iML2, info.lcid, &rfcstr); - ok(ret == S_OK, "Expected S_OK, got %08x\n", ret); - - /* not an exact 1:1 correspondence between lcid and rfc1766 in the - * mlang database, e.g., nb-no -> 1044 -> no */ - ok(strstrW(info.wszRfc1766, rfcstr) != NULL, - "Expected matching locale names\n"); - - SysFreeString(rfcstr); - } - IEnumRfc1766_Release(pEnumRfc1766); -} - -static void test_GetLcidFromRfc1766(IMultiLanguage2 *iML2) -{ - WCHAR rfc1766W[MAX_RFC1766_NAME + 1]; - LCID lcid; - HRESULT ret; - DWORD i; - - static WCHAR en[] = { 'e','n',0 }; - static WCHAR en_them[] = { 'e','n','-','t','h','e','m',0 }; - static WCHAR english[] = { 'e','n','g','l','i','s','h',0 }; - - - for(i = 0; i < sizeof(lcid_table) / sizeof(lcid_table[0]); i++) { - lcid = -1; - MultiByteToWideChar(CP_ACP, 0, lcid_table[i].rfc1766, -1, rfc1766W, MAX_RFC1766_NAME); - ret = IMultiLanguage2_GetLcidFromRfc1766(iML2, &lcid, rfc1766W); - - /* IE <6.0 guess 0x412 (ko) from "kok" */ - ok((ret == lcid_table[i].hr) || - broken(lcid_table[i].broken_lcid && (ret == S_FALSE)), - "#%02d: HRESULT 0x%x (expected 0x%x)\n", i, ret, lcid_table[i].hr); - - ok((lcid == lcid_table[i].lcid) || - broken(lcid == lcid_table[i].broken_lcid), /* IE <6.0 */ - "#%02d: got LCID 0x%x (expected 0x%x)\n", i, lcid, lcid_table[i].lcid); - } - - - ret = IMultiLanguage2_GetLcidFromRfc1766(iML2, NULL, en); - ok(ret == E_INVALIDARG, "GetLcidFromRfc1766 returned: %08x\n", ret); - - ret = IMultiLanguage2_GetLcidFromRfc1766(iML2, &lcid, NULL); - ok(ret == E_INVALIDARG, "GetLcidFromRfc1766 returned: %08x\n", ret); - - ret = IMultiLanguage2_GetLcidFromRfc1766(iML2, &lcid, en_them); - ok((ret == E_FAIL || ret == S_FALSE), "GetLcidFromRfc1766 returned: %08x\n", ret); - if (ret == S_FALSE) - { - BSTR rfcstr; - static WCHAR en[] = {'e','n',0}; - - ret = IMultiLanguage2_GetRfc1766FromLcid(iML2, lcid, &rfcstr); - ok(ret == S_OK, "Expected S_OK, got %08x\n", ret); - ok_w2("Expected \"%s\", got \"%s\"n", en, rfcstr); - } - - ret = IMultiLanguage2_GetLcidFromRfc1766(iML2, &lcid, english); - ok((ret == E_FAIL || ret == S_FALSE), "GetLcidFromRfc1766 returned: %08x\n", ret); - if (ret == S_FALSE) - { - BSTR rfcstr; - static WCHAR en[] = {'e','n',0}; - - ret = IMultiLanguage2_GetRfc1766FromLcid(iML2, lcid, &rfcstr); - ok(ret == S_OK, "Expected S_OK, got %08x\n", ret); - ok_w2("Expected \"%s\", got \"%s\"n", en, rfcstr); - } - -} - -static void test_Rfc1766ToLcid(void) -{ - LCID lcid; - HRESULT ret; - DWORD i; - - for(i = 0; i < sizeof(lcid_table) / sizeof(lcid_table[0]); i++) { - lcid = -1; - ret = pRfc1766ToLcidA(&lcid, lcid_table[i].rfc1766); - - /* IE <6.0 guess 0x412 (ko) from "kok" */ - ok( (ret == lcid_table[i].hr) || - broken(lcid_table[i].broken_lcid && (ret == S_FALSE)), - "#%02d: HRESULT 0x%x (expected 0x%x)\n", i, ret, lcid_table[i].hr); - - ok( (lcid == lcid_table[i].lcid) || - broken(lcid == lcid_table[i].broken_lcid), /* IE <6.0 */ - "#%02d: got LCID 0x%x (expected 0x%x)\n", i, lcid, lcid_table[i].lcid); - } - - ret = pRfc1766ToLcidA(&lcid, NULL); - ok(ret == E_INVALIDARG, "got 0x%08x (expected E_INVALIDARG)\n", ret); - - ret = pRfc1766ToLcidA(NULL, "en"); - ok(ret == E_INVALIDARG, "got 0x%08x (expected E_INVALIDARG)\n", ret); -} - -static void test_GetNumberOfCodePageInfo(IMultiLanguage2 *iML2) -{ - HRESULT hr; - UINT value; - - value = 0xdeadbeef; - hr = IMultiLanguage2_GetNumberOfCodePageInfo(iML2, &value); - ok( (hr == S_OK) && value, - "got 0x%x with %d (expected S_OK with '!= 0')\n", hr, value); - - hr = IMultiLanguage2_GetNumberOfCodePageInfo(iML2, NULL); - ok(hr == E_INVALIDARG, "got 0x%x (expected E_INVALIDARG)\n", hr); - -} - -static void test_GetRfc1766FromLcid(IMultiLanguage2 *iML2) -{ - CHAR expected[MAX_RFC1766_NAME]; - CHAR buffer[MAX_RFC1766_NAME + 1]; - DWORD i; - HRESULT hr; - BSTR rfcstr; - - for(i = 0; i < sizeof(lcid_table) / sizeof(lcid_table[0]); i++) { - buffer[0] = '\0'; - - rfcstr = NULL; - hr = IMultiLanguage2_GetRfc1766FromLcid(iML2, lcid_table[i].lcid, &rfcstr); - ok(hr == lcid_table[i].hr, - "#%02d: HRESULT 0x%x (expected 0x%x)\n", i, hr, lcid_table[i].hr); - - if (hr != S_OK) - continue; /* no result-string created */ - - WideCharToMultiByte(CP_ACP, 0, rfcstr, -1, buffer, sizeof(buffer), NULL, NULL); - LCMapStringA(LOCALE_USER_DEFAULT, LCMAP_LOWERCASE, lcid_table[i].rfc1766, - lstrlenA(lcid_table[i].rfc1766) + 1, expected, MAX_RFC1766_NAME); - - /* IE <6.0 return "x-kok" for LCID 0x457 ("kok") */ - ok( (!lstrcmpA(buffer, expected)) || - broken(!lstrcmpA(buffer, lcid_table[i].broken_rfc)), - "#%02d: got '%s' (expected '%s')\n", i, buffer, expected); - - SysFreeString(rfcstr); - } - - hr = IMultiLanguage2_GetRfc1766FromLcid(iML2, MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), NULL); - ok(hr == E_INVALIDARG, "got 0x%x (expected E_INVALIDARG)\n", hr); -} - -static void test_LcidToRfc1766(void) -{ - CHAR expected[MAX_RFC1766_NAME]; - CHAR buffer[MAX_RFC1766_NAME * 2]; - HRESULT hr; - DWORD i; - - for(i = 0; i < sizeof(lcid_table) / sizeof(lcid_table[0]); i++) { - - memset(buffer, '#', sizeof(buffer)-1); - buffer[sizeof(buffer)-1] = '\0'; - - hr = pLcidToRfc1766A(lcid_table[i].lcid, buffer, MAX_RFC1766_NAME); - - /* IE <5.0 does not recognize 0x180c (fr-mc) and 0x457 (kok) */ - ok( (hr == lcid_table[i].hr) || - broken(lcid_table[i].broken_lcid && (hr == E_FAIL)), - "#%02d: HRESULT 0x%x (expected 0x%x)\n", i, hr, lcid_table[i].hr); - - if (hr != S_OK) - continue; - - LCMapStringA(LOCALE_USER_DEFAULT, LCMAP_LOWERCASE, lcid_table[i].rfc1766, - lstrlenA(lcid_table[i].rfc1766) + 1, expected, MAX_RFC1766_NAME); - - /* IE <6.0 return "x-kok" for LCID 0x457 ("kok") */ - /* IE <5.0 return "fr" for LCID 0x180c ("fr-mc") */ - ok( (!lstrcmpA(buffer, expected)) || - broken(!lstrcmpA(buffer, lcid_table[i].broken_rfc)), - "#%02d: got '%s' (expected '%s')\n", i, buffer, expected); - - } - - memset(buffer, '#', sizeof(buffer)-1); - buffer[sizeof(buffer)-1] = '\0'; - hr = pLcidToRfc1766A(-1, buffer, MAX_RFC1766_NAME); - ok(hr == E_FAIL, "got 0x%08x and '%s' (expected E_FAIL)\n", hr, buffer); - - hr = pLcidToRfc1766A(LANG_ENGLISH, NULL, MAX_RFC1766_NAME); - ok(hr == E_INVALIDARG, "got 0x%08x (expected E_INVALIDARG)\n", hr); - - memset(buffer, '#', sizeof(buffer)-1); - buffer[sizeof(buffer)-1] = '\0'; - hr = pLcidToRfc1766A(LANG_ENGLISH, buffer, -1); - ok(hr == E_INVALIDARG, "got 0x%08x and '%s' (expected E_INVALIDARG)\n", hr, buffer); - - memset(buffer, '#', sizeof(buffer)-1); - buffer[sizeof(buffer)-1] = '\0'; - hr = pLcidToRfc1766A(LANG_ENGLISH, buffer, 0); - ok(hr == E_INVALIDARG, "got 0x%08x and '%s' (expected E_INVALIDARG)\n", hr, buffer); -} - -static void test_GetRfc1766Info(IMultiLanguage2 *iML2) -{ - WCHAR short_broken_name[MAX_LOCALE_NAME]; - CHAR rfc1766A[MAX_RFC1766_NAME + 1]; - BYTE buffer[sizeof(RFC1766INFO) + 4]; - PRFC1766INFO prfc = (RFC1766INFO *) buffer; - HRESULT ret; - DWORD i; - - for(i = 0; i < sizeof(info_table) / sizeof(info_table[0]); i++) { - memset(buffer, 'x', sizeof(RFC1766INFO) + 2); - buffer[sizeof(buffer) -1] = 0; - buffer[sizeof(buffer) -2] = 0; - - ret = IMultiLanguage2_GetRfc1766Info(iML2, info_table[i].lcid, info_table[i].lang, prfc); - WideCharToMultiByte(CP_ACP, 0, prfc->wszRfc1766, -1, rfc1766A, MAX_RFC1766_NAME, NULL, NULL); - ok(ret == S_OK, "#%02d: got 0x%x (expected S_OK)\n", i, ret); - ok(prfc->lcid == info_table[i].lcid, - "#%02d: got 0x%04x (expected 0x%04x)\n", i, prfc->lcid, info_table[i].lcid); - - ok(!lstrcmpA(rfc1766A, info_table[i].rfc1766), - "#%02d: got '%s' (expected '%s')\n", i, rfc1766A, info_table[i].rfc1766); - - /* Some IE versions truncate an oversized name one character to short */ - mylstrcpyW(short_broken_name, info_table[i].broken_name); - short_broken_name[MAX_LOCALE_NAME - 2] = '\0'; - - if (info_table[i].todo & TODO_NAME) { - todo_wine - ok( (!mylstrcmpW(prfc->wszLocaleName, info_table[i].localename)) || - broken(!mylstrcmpW(prfc->wszLocaleName, info_table[i].broken_name)) || /* IE < 6.0 */ - broken(!mylstrcmpW(prfc->wszLocaleName, short_broken_name)), - "#%02d: got %s (expected %s)\n", i, - wine_dbgstr_w(prfc->wszLocaleName), wine_dbgstr_w(info_table[i].localename)); - } - else - ok( (!mylstrcmpW(prfc->wszLocaleName, info_table[i].localename)) || - broken(!mylstrcmpW(prfc->wszLocaleName, info_table[i].broken_name)) || /* IE < 6.0 */ - broken(!mylstrcmpW(prfc->wszLocaleName, short_broken_name)), - "#%02d: got %s (expected %s)\n", i, - wine_dbgstr_w(prfc->wszLocaleName), wine_dbgstr_w(info_table[i].localename)); - - } - - /* SUBLANG_NEUTRAL only allowed for english, arabic, chinese */ - ret = IMultiLanguage2_GetRfc1766Info(iML2, MAKELANGID(LANG_GERMAN, SUBLANG_NEUTRAL), LANG_ENGLISH, prfc); - ok(ret == E_FAIL, "got 0x%x (expected E_FAIL)\n", ret); - - ret = IMultiLanguage2_GetRfc1766Info(iML2, MAKELANGID(LANG_ITALIAN, SUBLANG_NEUTRAL), LANG_ENGLISH, prfc); - ok(ret == E_FAIL, "got 0x%x (expected E_FAIL)\n", ret); - - /* NULL not allowed */ - ret = IMultiLanguage2_GetRfc1766Info(iML2, 0, LANG_ENGLISH, prfc); - ok(ret == E_FAIL, "got 0x%x (expected E_FAIL)\n", ret); - - ret = IMultiLanguage2_GetRfc1766Info(iML2, LANG_ENGLISH, LANG_ENGLISH, NULL); - ok(ret == E_INVALIDARG, "got 0x%x (expected E_INVALIDARG)\n", ret); -} - -static void test_IMultiLanguage2_ConvertStringFromUnicode(IMultiLanguage2 *iML2) -{ - CHAR dest[MAX_PATH]; - CHAR invariate[MAX_PATH]; - UINT srcsz, destsz; - HRESULT hr; - - static WCHAR src[] = {'a','b','c',0}; - - memset(invariate, 'x', sizeof(invariate)); - - /* pSrcStr NULL */ - memset(dest, 'x', sizeof(dest)); - srcsz = lstrlenW(src) + 1; - destsz = sizeof(dest); - hr = IMultiLanguage2_ConvertStringFromUnicode(iML2, NULL, 1252, NULL, - &srcsz, dest, &destsz); - ok(hr == S_OK || hr == E_FAIL,"expected S_OK or E_FAIL, got %08x\n",hr); - if (hr == S_OK) - { - ok(srcsz == lstrlenW(src) + 1, - "Expected %u, got %u\n", lstrlenW(src) + 1, srcsz); - } - else if (hr == E_FAIL) - { - ok(srcsz == 0, - "Expected %u, got %u\n", 0, srcsz); - } - - ok(!memcmp(dest, invariate, sizeof(dest)), - "Expected dest to be unchanged, got %s\n", dest); - ok(destsz == 0, "Expected 0, got %u\n", destsz); - - /* pcSrcSize NULL */ - memset(dest, 'x', sizeof(dest)); - destsz = sizeof(dest); - hr = IMultiLanguage2_ConvertStringFromUnicode(iML2, NULL, 1252, src, - NULL, dest, &destsz); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!strncmp(dest, "abc", 3), - "Expected first three chars to be \"abc\"\n"); - ok(!memcmp(&dest[3], invariate, sizeof(dest) - 3), - "Expected rest of dest to be unchanged, got %s\n", dest); - ok(destsz == lstrlenW(src), - "Expected %u, got %u\n", lstrlenW(src), destsz); - - /* both pSrcStr and pcSrcSize NULL */ - memset(dest, 'x', sizeof(dest)); - destsz = sizeof(dest); - hr = IMultiLanguage2_ConvertStringFromUnicode(iML2, NULL, 1252, NULL, - NULL, dest, &destsz); - ok(hr == S_OK || hr == E_FAIL, "Expected S_OK or E_FAIL, got %08x\n", hr); - ok(!memcmp(dest, invariate, sizeof(dest)), - "Expected dest to be unchanged, got %s\n", dest); - ok(destsz == 0, "Expected 0, got %u\n", destsz); - - /* pDstStr NULL */ - memset(dest, 'x', sizeof(dest)); - srcsz = lstrlenW(src) + 1; - destsz = sizeof(dest); - hr = IMultiLanguage2_ConvertStringFromUnicode(iML2, NULL, 1252, src, - &srcsz, NULL, &destsz); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(srcsz == lstrlenW(src) + 1, - "Expected %u, got %u\n", lstrlenW(src) + 1, srcsz); - ok(destsz == lstrlenW(src) + 1, - "Expected %u, got %u\n", lstrlenW(src) + 1, srcsz); - - /* pcDstSize NULL */ - memset(dest, 'x', sizeof(dest)); - hr = IMultiLanguage2_ConvertStringFromUnicode(iML2, NULL, 1252, src, - &srcsz, dest, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(srcsz == lstrlenW(src) + 1, - "Expected %u, got %u\n", lstrlenW(src) + 1, srcsz); - ok(!memcmp(dest, invariate, sizeof(dest)), - "Expected dest to be unchanged, got %s\n", dest); - - /* pcSrcSize is 0 */ - memset(dest, 'x', sizeof(dest)); - srcsz = 0; - destsz = sizeof(dest); - hr = IMultiLanguage2_ConvertStringFromUnicode(iML2, NULL, 1252, src, - &srcsz, dest, &destsz); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(srcsz == 0, "Expected 0, got %u\n", srcsz); - ok(!memcmp(dest, invariate, sizeof(dest)), - "Expected dest to be unchanged, got %s\n", dest); - ok(destsz == 0, "Expected 0, got %u\n", destsz); - - /* pcSrcSize does not include NULL terminator */ - memset(dest, 'x', sizeof(dest)); - srcsz = lstrlenW(src); - destsz = sizeof(dest); - hr = IMultiLanguage2_ConvertStringFromUnicode(iML2, NULL, 1252, src, - &srcsz, dest, &destsz); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(srcsz == lstrlenW(src), - "Expected %u, got %u\n", lstrlenW(src), srcsz); - ok(!strncmp(dest, "abc", 3), "Expected first three chars to be \"abc\"\n"); - ok(!memcmp(&dest[3], invariate, sizeof(dest) - 3), - "Expected rest of dest to be unchanged, got %s\n", dest); - ok(destsz == lstrlenW(src), - "Expected %u, got %u\n", lstrlenW(src), destsz); - - /* pcSrcSize includes NULL terminator */ - memset(dest, 'x', sizeof(dest)); - srcsz = lstrlenW(src) + 1; - destsz = sizeof(dest); - hr = IMultiLanguage2_ConvertStringFromUnicode(iML2, NULL, 1252, src, - &srcsz, dest, &destsz); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(srcsz == lstrlenW(src) + 1, "Expected 3, got %u\n", srcsz); - ok(!lstrcmpA(dest, "abc"), "Expected \"abc\", got \"%s\"\n", dest); - ok(destsz == lstrlenW(src) + 1, - "Expected %u, got %u\n", lstrlenW(src) + 1, destsz); - - /* pcSrcSize is -1 */ - memset(dest, 'x', sizeof(dest)); - srcsz = -1; - destsz = sizeof(dest); - hr = IMultiLanguage2_ConvertStringFromUnicode(iML2, NULL, 1252, src, - &srcsz, dest, &destsz); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(srcsz == lstrlenW(src), - "Expected %u, got %u\n", lstrlenW(src), srcsz); - ok(!strncmp(dest, "abc", 3), "Expected first three chars to be \"abc\"\n"); - ok(!memcmp(&dest[3], invariate, sizeof(dest) - 3), - "Expected rest of dest to be unchanged, got %s\n", dest); - ok(destsz == lstrlenW(src), - "Expected %u, got %u\n", lstrlenW(src), destsz); - - /* pcDstSize is 0 */ - memset(dest, 'x', sizeof(dest)); - srcsz = lstrlenW(src) + 1; - destsz = 0; - hr = IMultiLanguage2_ConvertStringFromUnicode(iML2, NULL, 1252, src, - &srcsz, dest, &destsz); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(srcsz == lstrlenW(src) + 1, - "Expected %u, got %u\n", lstrlenW(src) + 1, srcsz); - ok(!memcmp(dest, invariate, sizeof(dest)), - "Expected dest to be unchanged, got %s\n", dest); - ok(destsz == lstrlenW(src) + 1, - "Expected %u, got %u\n", lstrlenW(src) + 1, destsz); - - /* pcDstSize is not large enough */ - memset(dest, 'x', sizeof(dest)); - srcsz = lstrlenW(src) + 1; - destsz = lstrlenW(src); - hr = IMultiLanguage2_ConvertStringFromUnicode(iML2, NULL, 1252, src, - &srcsz, dest, &destsz); - ok(hr == E_FAIL, "Expected E_FAIL, got %08x\n", hr); - ok(srcsz == 0, "Expected 0, got %u\n", srcsz); - ok(!strncmp(dest, "abc", 3), "Expected first three chars to be \"abc\"\n"); - ok(!memcmp(&dest[3], invariate, sizeof(dest) - 3), - "Expected rest of dest to be unchanged, got %s\n", dest); - ok(destsz == 0, "Expected 0, got %u\n", srcsz); - - /* pcDstSize (bytes) does not leave room for NULL terminator */ - memset(dest, 'x', sizeof(dest)); - srcsz = lstrlenW(src) + 1; - destsz = lstrlenW(src) * sizeof(WCHAR); - hr = IMultiLanguage2_ConvertStringFromUnicode(iML2, NULL, 1252, src, - &srcsz, dest, &destsz); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(srcsz == lstrlenW(src) + 1, - "Expected %u, got %u\n", lstrlenW(src) + 1, srcsz); - ok(!lstrcmpA(dest, "abc"), "Expected \"abc\", got \"%s\"\n", dest); - ok(destsz == lstrlenW(src) + 1, - "Expected %u, got %u\n", lstrlenW(src) + 1, destsz); -} - -static void test_ConvertINetUnicodeToMultiByte(void) -{ - CHAR dest[MAX_PATH]; - CHAR invariate[MAX_PATH]; - INT srcsz, destsz; - HRESULT hr; - - static WCHAR src[] = {'a','b','c',0}; - - memset(invariate, 'x', sizeof(invariate)); - - /* lpSrcStr NULL */ - memset(dest, 'x', sizeof(dest)); - srcsz = lstrlenW(src) + 1; - destsz = sizeof(dest); - hr = pConvertINetUnicodeToMultiByte(NULL, 1252, NULL, &srcsz, dest, &destsz); - ok(hr == S_OK || hr == E_FAIL, "Expected S_OK or E_FAIL, got %08x\n", hr); - if (hr == S_OK) - ok(srcsz == lstrlenW(src) + 1, - "Expected %u, got %u\n", lstrlenW(src) + 1, srcsz); - else if (hr == E_FAIL) - ok(srcsz == 0, - "Expected %u, got %u\n", 0, srcsz); - ok(!memcmp(dest, invariate, sizeof(dest)), - "Expected dest to be unchanged, got %s\n", dest); - ok(destsz == 0, "Expected 0, got %u\n", destsz); - - /* lpnWideCharCount NULL */ - memset(dest, 'x', sizeof(dest)); - destsz = sizeof(dest); - hr = pConvertINetUnicodeToMultiByte(NULL, 1252, src, NULL, dest, &destsz); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!strncmp(dest, "abc", 3), - "Expected first three chars to be \"abc\"\n"); - ok(!memcmp(&dest[3], invariate, sizeof(dest) - 3), - "Expected rest of dest to be unchanged, got %s\n", dest); - ok(destsz == lstrlenW(src), - "Expected %u, got %u\n", lstrlenW(src), destsz); - - /* both lpSrcStr and lpnWideCharCount NULL */ - memset(dest, 'x', sizeof(dest)); - destsz = sizeof(dest); - hr = pConvertINetUnicodeToMultiByte(NULL, 1252, NULL, NULL, dest, &destsz); - ok(hr == S_OK || hr == E_FAIL, "Expected S_OK or E_FAIL, got %08x\n", hr); - ok(!memcmp(dest, invariate, sizeof(dest)), - "Expected dest to be unchanged, got %s\n", dest); - ok(destsz == 0, "Expected 0, got %u\n", destsz); - - /* lpDstStr NULL */ - memset(dest, 'x', sizeof(dest)); - srcsz = lstrlenW(src) + 1; - destsz = sizeof(dest); - hr = pConvertINetUnicodeToMultiByte(NULL, 1252, src, &srcsz, NULL, &destsz); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(srcsz == lstrlenW(src) + 1, - "Expected %u, got %u\n", lstrlenW(src) + 1, srcsz); - ok(destsz == lstrlenW(src) + 1, - "Expected %u, got %u\n", lstrlenW(src) + 1, srcsz); - - /* lpnMultiCharCount NULL */ - memset(dest, 'x', sizeof(dest)); - hr = pConvertINetUnicodeToMultiByte(NULL, 1252, src, &srcsz, dest, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(srcsz == lstrlenW(src) + 1, - "Expected %u, got %u\n", lstrlenW(src) + 1, srcsz); - ok(!memcmp(dest, invariate, sizeof(dest)), - "Expected dest to be unchanged, got %s\n", dest); - - /* lpnWideCharCount is 0 */ - memset(dest, 'x', sizeof(dest)); - srcsz = 0; - destsz = sizeof(dest); - hr = pConvertINetUnicodeToMultiByte(NULL, 1252, src, &srcsz, dest, &destsz); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(srcsz == 0, "Expected 0, got %u\n", srcsz); - ok(!memcmp(dest, invariate, sizeof(dest)), - "Expected dest to be unchanged, got %s\n", dest); - ok(destsz == 0, "Expected 0, got %u\n", destsz); - - /* lpnWideCharCount does not include NULL terminator */ - memset(dest, 'x', sizeof(dest)); - srcsz = lstrlenW(src); - destsz = sizeof(dest); - hr = pConvertINetUnicodeToMultiByte(NULL, 1252, src, &srcsz, dest, &destsz); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(srcsz == lstrlenW(src), - "Expected %u, got %u\n", lstrlenW(src), srcsz); - ok(!strncmp(dest, "abc", 3), "Expected first three chars to be \"abc\"\n"); - ok(!memcmp(&dest[3], invariate, sizeof(dest) - 3), - "Expected rest of dest to be unchanged, got %s\n", dest); - ok(destsz == lstrlenW(src), - "Expected %u, got %u\n", lstrlenW(src), destsz); - - /* lpnWideCharCount includes NULL terminator */ - memset(dest, 'x', sizeof(dest)); - srcsz = lstrlenW(src) + 1; - destsz = sizeof(dest); - hr = pConvertINetUnicodeToMultiByte(NULL, 1252, src, &srcsz, dest, &destsz); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(srcsz == lstrlenW(src) + 1, "Expected 3, got %u\n", srcsz); - ok(!lstrcmpA(dest, "abc"), "Expected \"abc\", got \"%s\"\n", dest); - ok(destsz == lstrlenW(src) + 1, - "Expected %u, got %u\n", lstrlenW(src) + 1, destsz); - - /* lpnWideCharCount is -1 */ - memset(dest, 'x', sizeof(dest)); - srcsz = -1; - destsz = sizeof(dest); - hr = pConvertINetUnicodeToMultiByte(NULL, 1252, src, &srcsz, dest, &destsz); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(srcsz == lstrlenW(src), - "Expected %u, got %u\n", lstrlenW(src), srcsz); - ok(!strncmp(dest, "abc", 3), "Expected first three chars to be \"abc\"\n"); - ok(!memcmp(&dest[3], invariate, sizeof(dest) - 3), - "Expected rest of dest to be unchanged, got %s\n", dest); - ok(destsz == lstrlenW(src), - "Expected %u, got %u\n", lstrlenW(src), destsz); - - /* lpnMultiCharCount is 0 */ - memset(dest, 'x', sizeof(dest)); - srcsz = lstrlenW(src) + 1; - destsz = 0; - hr = pConvertINetUnicodeToMultiByte(NULL, 1252, src, &srcsz, dest, &destsz); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(srcsz == lstrlenW(src) + 1, - "Expected %u, got %u\n", lstrlenW(src) + 1, srcsz); - ok(!memcmp(dest, invariate, sizeof(dest)), - "Expected dest to be unchanged, got %s\n", dest); - ok(destsz == lstrlenW(src) + 1, - "Expected %u, got %u\n", lstrlenW(src) + 1, destsz); - - /* lpnMultiCharCount is not large enough */ - memset(dest, 'x', sizeof(dest)); - srcsz = lstrlenW(src) + 1; - destsz = lstrlenW(src); - hr = pConvertINetUnicodeToMultiByte(NULL, 1252, src, &srcsz, dest, &destsz); - ok(hr == E_FAIL, "Expected E_FAIL, got %08x\n", hr); - ok(srcsz == 0, "Expected 0, got %u\n", srcsz); - ok(!strncmp(dest, "abc", 3), "Expected first three chars to be \"abc\"\n"); - ok(!memcmp(&dest[3], invariate, sizeof(dest) - 3), - "Expected rest of dest to be unchanged, got %s\n", dest); - ok(destsz == 0, "Expected 0, got %u\n", srcsz); - - /* lpnMultiCharCount (bytes) does not leave room for NULL terminator */ - memset(dest, 'x', sizeof(dest)); - srcsz = lstrlenW(src) + 1; - destsz = lstrlenW(src) * sizeof(WCHAR); - hr = pConvertINetUnicodeToMultiByte(NULL, 1252, src, &srcsz, dest, &destsz); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(srcsz == lstrlenW(src) + 1, - "Expected %u, got %u\n", lstrlenW(src) + 1, srcsz); - ok(!lstrcmpA(dest, "abc"), "Expected \"abc\", got \"%s\"\n", dest); - ok(destsz == lstrlenW(src) + 1, - "Expected %u, got %u\n", lstrlenW(src) + 1, destsz); -} - -static void test_JapaneseConversion(void) -{ - /* Data */ - static WCHAR unc_jp[9][12] = { - {9,0x31,0x20,0x3042,0x3044,0x3046,0x3048,0x304a,0x000d,0x000a}, - {9,0x31,0x20,0x30a2,0x30a4,0x30a6,0x30a8,0x30aa,0x000d,0x000a}, - {9,0x31,0x20,0xff71,0xff72,0xff73,0xff74,0xff75,0x000d,0x000a}, - {9,0x31,0x20,0x3041,0x3043,0x3045,0x3047,0x3049,0x000d,0x000a}, - {9,0x31,0x20,0x30a1,0x30a3,0x30a5,0x30a7,0x30a9,0x000d,0x000a}, - {9,0x31,0x20,0xff67,0xff68,0xff69,0xff6a,0xff6b,0x000d,0x000a}, - {9,0x31,0x20,0x300c,0x65e5,0x672c,0x8a9e,0x300d,0x000d,0x000a}, - {7,0x31,0x20,0x25c7,0x25c7,0x3012,0x000d,0x000a}, - {11,0x31,0x20,0x203b,0x3010,0x0074,0x0065,0x0073,0x0074,0x3011,0x000d,0x000a} - }; - static CHAR jis_jp[9][27] = { - {20,0x31,0x20,0x1b,0x24,0x42,0x24,0x22,0x24,0x24,0x24,0x26,0x24,0x28, - 0x24,0x2a,0x1b,0x28,0x42,0x0d,0x0a}, - {20,0x31,0x20,0x1b,0x24,0x42,0x25,0x22,0x25,0x24,0x25,0x26,0x25,0x28, - 0x25,0x2a,0x1b,0x28,0x42,0x0d,0x0a}, - {20,0x31,0x20,0x1b,0x24,0x42,0x25,0x22,0x25,0x24,0x25,0x26,0x25,0x28, - 0x25,0x2a,0x1b,0x28,0x42,0x0d,0x0a}, - {20,0x31,0x20,0x1b,0x24,0x42,0x24,0x21,0x24,0x23,0x24,0x25,0x24,0x27, - 0x24,0x29,0x1b,0x28,0x42,0x0d,0x0a}, - {20,0x31,0x20,0x1b,0x24,0x42,0x25,0x21,0x25,0x23,0x25,0x25,0x25,0x27, - 0x25,0x29,0x1b,0x28,0x42,0x0d,0x0a}, - {20,0x31,0x20,0x1b,0x24,0x42,0x25,0x21,0x25,0x23,0x25,0x25,0x25,0x27, - 0x25,0x29,0x1b,0x28,0x42,0x0d,0x0a}, - {20,0x31,0x20,0x1b,0x24,0x42,0x21,0x56,0x46,0x7c,0x4b,0x5c,0x38,0x6c, - 0x21,0x57,0x1b,0x28,0x42,0x0d,0x0a}, - {16,0x31,0x20,0x1b,0x24,0x42,0x21,0x7e,0x21,0x7e,0x22,0x29,0x1b,0x28, - 0x42,0x0d,0x0a}, - {26,0x31,0x20,0x1b,0x24,0x42,0x22,0x28,0x21,0x5a,0x1b,0x28,0x42,0x74, - 0x65,0x73,0x74,0x1b,0x24,0x42,0x21,0x5b,0x1b,0x28,0x42,0x0d,0x0a} - }; - static CHAR sjis_jp[9][15] = { - {14,0x31,0x20,0x82,0xa0,0x82,0xa2,0x82,0xa4,0x82,0xa6,0x82,0xa8,0x0d,0x0a}, - {14,0x31,0x20,0x83,0x41,0x83,0x43,0x83,0x45,0x83,0x47,0x83,0x49,0x0d,0x0a}, - {9,0x31,0x20,0xb1,0xb2,0xb3,0xb4,0xb5,0x0d,0x0a}, - {14,0x31,0x20,0x82,0x9f,0x82,0xa1,0x82,0xa3,0x82,0xa5,0x82,0xa7,0x0d,0x0a}, - {14,0x31,0x20,0x83,0x40,0x83,0x42,0x83,0x44,0x83,0x46,0x83,0x48,0x0d,0x0a}, - {9,0x31,0x20,0xa7,0xa8,0xa9,0xaa,0xab,0x0d,0x0a}, - {14,0x31,0x20,0x81,0x75,0x93,0xfa,0x96,0x7b,0x8c,0xea,0x81,0x76,0x0d,0x0a}, - {10,0x31,0x20,0x81,0x9e,0x81,0x9e,0x81,0xa7,0x0d,0x0a}, - {14,0x31,0x20,0x81,0xa6,0x81,0x79,0x74,0x65,0x73,0x74,0x81,0x7a,0x0d,0x0a} - }; - static CHAR euc_jp[9][15] = { - {14,0x31,0x20,0xa4,0xa2,0xa4,0xa4,0xa4,0xa6,0xa4,0xa8,0xa4,0xaa,0x0d,0x0a}, - {14,0x31,0x20,0xa5,0xa2,0xa5,0xa4,0xa5,0xa6,0xa5,0xa8,0xa5,0xaa,0x0d,0x0a}, - {14,0x31,0x20,0x8e,0xb1,0x8e,0xb2,0x8e,0xb3,0x8e,0xb4,0x8e,0xb5,0x0d,0x0a}, - {14,0x31,0x20,0xa4,0xa1,0xa4,0xa3,0xa4,0xa5,0xa4,0xa7,0xa4,0xa9,0x0d,0x0a}, - {14,0x31,0x20,0xa5,0xa1,0xa5,0xa3,0xa5,0xa5,0xa5,0xa7,0xa5,0xa9,0x0d,0x0a}, - {14,0x31,0x20,0x8e,0xa7,0x8e,0xa8,0x8e,0xa9,0x8e,0xaa,0x8e,0xab,0x0d,0x0a}, - {14,0x31,0x20,0xa1,0xd6,0xc6,0xfc,0xcb,0xdc,0xb8,0xec,0xa1,0xd7,0x0d,0x0a}, - {10,0x31,0x20,0xa1,0xfe,0xa1,0xfe,0xa2,0xa9,0x0d,0x0a}, - {14,0x31,0x20,0xa2,0xa8,0xa1,0xda,0x74,0x65,0x73,0x74,0xa1,0xdb,0x0d,0x0a} - }; - - INT srcsz, destsz; - INT i; - HRESULT hr; - CHAR output[30]; - WCHAR outputW[30]; - int outlen; - - /* test unc->jis */ - for (i = 0; i < 9; i++) - { - int j; - destsz = 30; - outlen = jis_jp[i][0]; - srcsz = unc_jp[i][0]; - hr = pConvertINetUnicodeToMultiByte(NULL, 50220, &unc_jp[i][1], &srcsz, output, &destsz); - if (hr == S_FALSE) - { - skip("Code page identifier 50220 is not supported\n"); - break; - } - ok(hr == S_OK,"(%i) Expected S_OK, got %08x\n", i, hr); - ok(destsz == outlen, "(%i) Expected %i, got %i\n",i,outlen,destsz); - ok(srcsz == unc_jp[i][0],"(%i) Expected %i, got %i\n",i,unc_jp[i][0],srcsz); - ok(memcmp(output,&jis_jp[i][1],destsz)==0,"(%i) Strings do not match\n",i); - - /* and back */ - srcsz = outlen; - destsz = 30; - hr = pConvertINetMultiByteToUnicode(NULL, 50220, output, &srcsz, outputW,&destsz); - - /* - * JIS does not have hankata so it get automatically converted to - * zenkata. this means that strings 1 and 2 are identical as well as - * strings 4 and 5. - */ - j = i; - if (i == 2) j = 1; - if (i == 5) j = 4; - - ok(hr == S_OK,"(%i) Expected S_OK, got %08x\n",i, hr); - ok(destsz == unc_jp[j][0],"(%i) Expected %i, got %i\n",i,unc_jp[j][0],destsz); - ok(srcsz == outlen,"(%i) Expected %i, got %i\n",i,outlen,srcsz); - ok(memcmp(outputW,&unc_jp[j][1],destsz)==0,"(%i) Strings do not match\n",i); - } - - /* test unc->sjis */ - for (i = 0; i < 9; i++) - { - destsz = 30; - outlen = sjis_jp[i][0]; - srcsz = unc_jp[i][0]; - - hr = pConvertINetUnicodeToMultiByte(NULL, 932, &unc_jp[i][1], &srcsz, output, &destsz); - if (hr == S_FALSE) - { - skip("Code page identifier 932 is not supported\n"); - break; - } - ok(hr == S_OK,"(%i) Expected S_OK, got %08x\n",i,hr); - ok(destsz == outlen,"(%i) Expected %i, got %i\n",i,outlen,destsz); - ok(srcsz == unc_jp[i][0],"(%i) Expected %i, got %i\n",i,unc_jp[i][0],srcsz); - ok(memcmp(output,&sjis_jp[i][1],outlen)==0,"(%i) Strings do not match\n",i); - - srcsz = outlen; - destsz = 30; - hr = pConvertINetMultiByteToUnicode(NULL, 932, output, &srcsz, outputW,&destsz); - - ok(hr == S_OK,"(%i) Expected S_OK, got %08x\n", i, hr); - ok(destsz == unc_jp[i][0],"(%i) Expected %i, got %i\n",i,unc_jp[i][0],destsz); - ok(srcsz == outlen,"(%i) Expected %i, got %i\n",i,outlen,srcsz); - ok(memcmp(outputW,&unc_jp[i][1],destsz)==0,"(%i) Strings do not match\n",i); - } - - /* test unc->euc */ - for (i = 0; i < 9; i++) - { - destsz = 30; - outlen = euc_jp[i][0]; - srcsz = unc_jp[i][0]; - - hr = pConvertINetUnicodeToMultiByte(NULL, 51932, &unc_jp[i][1], &srcsz, output, &destsz); - if (hr == S_FALSE) - { - skip("Code page identifier 51932 is not supported\n"); - break; - } - ok(hr == S_OK, "(%i) Expected S_OK, got %08x\n",i,hr); - ok(destsz == outlen, "(%i) Expected %i, got %i\n",i,outlen,destsz); - ok(srcsz == unc_jp[i][0],"(%i) Expected %i, got %i\n",i,unc_jp[i][0],destsz); - ok(memcmp(output,&euc_jp[i][1],outlen)==0,"(%i) Strings do not match\n",i); - - srcsz = outlen; - destsz = 30; - hr = pConvertINetMultiByteToUnicode(NULL, 51932, output, &srcsz, outputW,&destsz); - - ok(hr == S_OK,"(%i) Expected S_OK, got %08x\n",i,hr); - ok(destsz == unc_jp[i][0],"(%i) Expected %i, got %i\n",i,unc_jp[i][0],destsz); - ok(srcsz == outlen,"(%i) Expected %i, got %i\n",i,outlen,srcsz); - ok(memcmp(outputW,&unc_jp[i][1],destsz)==0,"(%i) Strings do not match\n",i); - } - - /* Japanese autodetect */ - i = 0; - destsz = 30; - srcsz = jis_jp[i][0]; - hr = pConvertINetMultiByteToUnicode(NULL, 50932, &jis_jp[i][1], &srcsz, outputW, &destsz); - if (hr == S_FALSE) - { - skip("Code page identifier 50932 is not supported\n"); - return; - } - ok(hr == S_OK,"(%i) Expected S_OK, got %08x\n",i,hr); - ok(destsz == unc_jp[i][0],"(%i) Expected %i, got %i\n",i,unc_jp[i][0],destsz); - ok(srcsz == jis_jp[i][0],"(%i) Expected %i, got %i\n",i,jis_jp[i][0],srcsz); - ok(memcmp(outputW,&unc_jp[i][1],destsz)==0,"(%i) Strings do not match\n",i); - - i = 1; - destsz = 30; - srcsz = sjis_jp[i][0]; - hr = pConvertINetMultiByteToUnicode(NULL, 50932, &sjis_jp[i][1], &srcsz, outputW, &destsz); - ok(hr == S_OK,"(%i) Expected S_OK, got %08x\n",i,hr); - ok(destsz == unc_jp[i][0],"(%i) Expected %i, got %i\n",i,unc_jp[i][0],destsz); - ok(srcsz == sjis_jp[i][0],"(%i) Expected %i, got %i\n",i,sjis_jp[i][0],srcsz); - ok(memcmp(outputW,&unc_jp[i][1],destsz)==0,"(%i) Strings do not match\n",i); -} - -static void test_GetScriptFontInfo(IMLangFontLink2 *font_link) -{ - HRESULT hr; - UINT nfonts; - SCRIPTFONTINFO sfi[1]; - - nfonts = 0; - hr = IMLangFontLink2_GetScriptFontInfo(font_link, sidAsciiLatin, 0, &nfonts, NULL); - ok(hr == S_OK, "GetScriptFontInfo failed %u\n", GetLastError()); - ok(nfonts, "unexpected result\n"); - - nfonts = 0; - hr = IMLangFontLink2_GetScriptFontInfo(font_link, sidAsciiLatin, SCRIPTCONTF_FIXED_FONT, &nfonts, NULL); - ok(hr == S_OK, "GetScriptFontInfo failed %u\n", GetLastError()); - ok(nfonts, "unexpected result\n"); - - nfonts = 0; - hr = IMLangFontLink2_GetScriptFontInfo(font_link, sidAsciiLatin, SCRIPTCONTF_PROPORTIONAL_FONT, &nfonts, NULL); - ok(hr == S_OK, "GetScriptFontInfo failed %u\n", GetLastError()); - ok(nfonts, "unexpected result\n"); - - nfonts = 1; - memset(sfi, 0, sizeof(sfi)); - hr = IMLangFontLink2_GetScriptFontInfo(font_link, sidAsciiLatin, SCRIPTCONTF_FIXED_FONT, &nfonts, sfi); - ok(hr == S_OK, "GetScriptFontInfo failed %u\n", GetLastError()); - ok(nfonts == 1, "got %u, expected 1\n", nfonts); - ok(sfi[0].scripts != 0, "unexpected result\n"); - ok(sfi[0].wszFont[0], "unexpected result\n"); - - nfonts = 1; - memset(sfi, 0, sizeof(sfi)); - hr = IMLangFontLink2_GetScriptFontInfo(font_link, sidAsciiLatin, SCRIPTCONTF_PROPORTIONAL_FONT, &nfonts, sfi); - ok(hr == S_OK, "GetScriptFontInfo failed %u\n", GetLastError()); - ok(nfonts == 1, "got %u, expected 1\n", nfonts); - ok(sfi[0].scripts != 0, "unexpected result\n"); - ok(sfi[0].wszFont[0], "unexpected result\n"); -} - -static void test_CodePageToScriptID(IMLangFontLink2 *font_link) -{ - HRESULT hr; - UINT i; - SCRIPT_ID sid; - static const struct - { - UINT cp; - SCRIPT_ID sid; - HRESULT hr; - } - cp_sid[] = - { - {874, sidThai}, - {932, sidKana}, - {936, sidHan}, - {949, sidHangul}, - {950, sidBopomofo}, - {1250, sidAsciiLatin}, - {1251, sidCyrillic}, - {1252, sidAsciiLatin}, - {1253, sidGreek}, - {1254, sidAsciiLatin}, - {1255, sidHebrew}, - {1256, sidArabic}, - {1257, sidAsciiLatin}, - {1258, sidAsciiLatin}, - {CP_UNICODE, 0, E_FAIL} - }; - - for (i = 0; i < sizeof(cp_sid)/sizeof(cp_sid[0]); i++) - { - hr = IMLangFontLink2_CodePageToScriptID(font_link, cp_sid[i].cp, &sid); - ok(hr == cp_sid[i].hr, "%u CodePageToScriptID failed 0x%08x %u\n", i, hr, GetLastError()); - if (SUCCEEDED(hr)) - { - ok(sid == cp_sid[i].sid, - "%u got sid %u for codepage %u, expected %u\n", i, sid, cp_sid[i].cp, cp_sid[i].sid); - } - } -} - -static void test_GetFontUnicodeRanges(IMLangFontLink2 *font_link) -{ - HRESULT hr; - UINT count; - HFONT hfont, old_hfont; - LOGFONTA lf; - HDC hdc; - UNICODERANGE *ur; - - hdc = CreateCompatibleDC(0); - memset(&lf, 0, sizeof(lf)); - lstrcpyA(lf.lfFaceName, "Arial"); - hfont = CreateFontIndirectA(&lf); - old_hfont = SelectObject(hdc, hfont); - - count = 0; - hr = IMLangFontLink2_GetFontUnicodeRanges(font_link, NULL, &count, NULL); - ok(hr == E_FAIL, "expected E_FAIL, got 0x%08x\n", hr); - - hr = IMLangFontLink2_GetFontUnicodeRanges(font_link, hdc, NULL, NULL); - ok(hr == E_INVALIDARG, "expected E_FAIL, got 0x%08x\n", hr); - - count = 0; - hr = IMLangFontLink2_GetFontUnicodeRanges(font_link, hdc, &count, NULL); - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); - ok(count, "expected count > 0\n"); - - ur = HeapAlloc(GetProcessHeap(), 0, sizeof(*ur) * count); - - hr = IMLangFontLink2_GetFontUnicodeRanges(font_link, hdc, &count, ur); - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); - - count--; - hr = IMLangFontLink2_GetFontUnicodeRanges(font_link, hdc, &count, ur); - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); - - HeapFree(GetProcessHeap(), 0, ur); - - SelectObject(hdc, old_hfont); - DeleteObject(hfont); - DeleteDC(hdc); -} - -static void test_IsCodePageInstallable(IMultiLanguage2 *ml2) -{ - UINT i; - HRESULT hr; - - SetLastError(0xdeadbeef); - lstrcmpW(NULL, NULL); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - /* This corruption leads (sometimes) to test failures in oleaut32 but also - * to the inability to use the Regional Settings. - * This only seems to be an issue with Win98 and IE6 (mlang version 6.0.2800.1106). - * - * A reboot restores the codepages again. - */ - win_skip("IsCodePageInstallable could mess up the codepages on Win98\n"); - return; - } - - for (i = 0; i < 0xffff; i++) - { - hr = IMultiLanguage2_IsCodePageInstallable(ml2, i); - - /* it would be better to use IMultiLanguage2_ValidateCodePageEx here but that brings - * up an installation dialog on some platforms, even when specifying CPIOD_PEEK. - */ - if (IsValidCodePage(i)) - ok(hr == S_OK || - broken(hr == S_FALSE) || /* win2k */ - broken(hr == E_INVALIDARG), /* win2k */ - "code page %u is valid but not installable 0x%08x\n", i, hr); - } -} - -START_TEST(mlang) -{ - IMultiLanguage *iML = NULL; - IMultiLanguage2 *iML2 = NULL; - IMLangFontLink *iMLFL = NULL; - IMLangFontLink2 *iMLFL2 = NULL; - HRESULT ret; - - if (!init_function_ptrs()) - return; - - CoInitialize(NULL); - test_Rfc1766ToLcid(); - test_LcidToRfc1766(); - - test_ConvertINetUnicodeToMultiByte(); - test_JapaneseConversion(); - - - trace("IMultiLanguage\n"); - ret = CoCreateInstance(&CLSID_CMultiLanguage, NULL, CLSCTX_INPROC_SERVER, - &IID_IMultiLanguage, (void **)&iML); - if (ret != S_OK || !iML) return; - - test_GetNumberOfCodePageInfo((IMultiLanguage2 *)iML); - IMultiLanguage_Release(iML); - - - /* IMultiLanguage2 (IE5.0 and above) */ - trace("IMultiLanguage2\n"); - ret = CoCreateInstance(&CLSID_CMultiLanguage, NULL, CLSCTX_INPROC_SERVER, - &IID_IMultiLanguage2, (void **)&iML2); - if (ret != S_OK || !iML2) return; - - test_rfc1766(iML2); - test_GetLcidFromRfc1766(iML2); - test_GetRfc1766FromLcid(iML2); - test_GetRfc1766Info(iML2); - test_GetNumberOfCodePageInfo(iML2); - - test_EnumCodePages(iML2, 0); - test_EnumCodePages(iML2, MIMECONTF_MIME_LATEST); - test_EnumCodePages(iML2, MIMECONTF_BROWSER); - test_EnumCodePages(iML2, MIMECONTF_MINIMAL); - test_EnumCodePages(iML2, MIMECONTF_VALID); - /* FIXME: why MIMECONTF_MIME_REGISTRY returns 0 of supported codepages? */ - /*test_EnumCodePages(iML2, MIMECONTF_MIME_REGISTRY);*/ - - test_EnumScripts(iML2, 0); - test_EnumScripts(iML2, SCRIPTCONTF_SCRIPT_USER); - test_EnumScripts(iML2, SCRIPTCONTF_SCRIPT_USER | SCRIPTCONTF_SCRIPT_HIDE | SCRIPTCONTF_SCRIPT_SYSTEM); - - ret = IMultiLanguage2_IsConvertible(iML2, CP_UTF8, CP_UNICODE); - ok(ret == S_OK, "IMultiLanguage2_IsConvertible(CP_UTF8 -> CP_UNICODE) = %08x\n", ret); - ret = IMultiLanguage2_IsConvertible(iML2, CP_UNICODE, CP_UTF8); - ok(ret == S_OK, "IMultiLanguage2_IsConvertible(CP_UNICODE -> CP_UTF8) = %08x\n", ret); - - test_multibyte_to_unicode_translations(iML2); - test_IMultiLanguage2_ConvertStringFromUnicode(iML2); - - test_IsCodePageInstallable(iML2); - - IMultiLanguage2_Release(iML2); - - - /* IMLangFontLink */ - ret = CoCreateInstance(&CLSID_CMultiLanguage, NULL, CLSCTX_INPROC_SERVER, - &IID_IMLangFontLink, (void **)&iMLFL); - if (ret != S_OK || !iMLFL) return; - - IMLangFontLink_Test(iMLFL); - IMLangFontLink_Release(iMLFL); - - /* IMLangFontLink2 */ - ret = CoCreateInstance(&CLSID_CMultiLanguage, NULL, CLSCTX_INPROC_SERVER, - &IID_IMLangFontLink2, (void **)&iMLFL2); - if (ret != S_OK || !iMLFL2) return; - - test_GetScriptFontInfo(iMLFL2); - test_GetFontUnicodeRanges(iMLFL2); - test_CodePageToScriptID(iMLFL2); - IMLangFontLink2_Release(iMLFL2); - - CoUninitialize(); -} diff --git a/rostests/winetests/mlang/mlang.rbuild b/rostests/winetests/mlang/mlang.rbuild deleted file mode 100644 index 05d515cedbe..00000000000 --- a/rostests/winetests/mlang/mlang.rbuild +++ /dev/null @@ -1,16 +0,0 @@ - - - - - . - - mlang.c - testlist.c - wine - uuid - oleaut32 - ole32 - gdi32 - ntdll - - diff --git a/rostests/winetests/mlang/testlist.c b/rostests/winetests/mlang/testlist.c deleted file mode 100644 index db8217cf963..00000000000 --- a/rostests/winetests/mlang/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_mlang(void); - -const struct test winetest_testlist[] = -{ - { "mlang", func_mlang }, - { 0, 0 } -}; diff --git a/rostests/winetests/msacm32/CMakeLists.txt b/rostests/winetests/msacm32/CMakeLists.txt deleted file mode 100644 index 16de00f02bd..00000000000 --- a/rostests/winetests/msacm32/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(msacm32_winetest msacm.c testlist.c) -target_link_libraries(msacm32_winetest wine) -set_module_type(msacm32_winetest win32cui) -add_importlibs(msacm32_winetest msacm32 msvcrt kernel32 ntdll) -add_cd_file(TARGET msacm32_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/msacm32/msacm.c b/rostests/winetests/msacm32/msacm.c deleted file mode 100644 index a961067d71a..00000000000 --- a/rostests/winetests/msacm32/msacm.c +++ /dev/null @@ -1,494 +0,0 @@ -/* - * Unit tests for msacm functions - * - * Copyright (c) 2004 Robert Reif - * - * 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/test.h" -#include "windef.h" -#include "winbase.h" -#include "winnls.h" -#include "mmsystem.h" -#define NOBITMAP -#include "mmreg.h" -#include "msacm.h" - -static BOOL CALLBACK FormatTagEnumProc(HACMDRIVERID hadid, - PACMFORMATTAGDETAILS paftd, - DWORD_PTR dwInstance, - DWORD fdwSupport) -{ - if (winetest_interactive) - trace(" Format 0x%04x: %s\n", paftd->dwFormatTag, paftd->szFormatTag); - - return TRUE; -} - -static BOOL CALLBACK FormatEnumProc(HACMDRIVERID hadid, - LPACMFORMATDETAILS pafd, - DWORD_PTR dwInstance, - DWORD fd) -{ - if (winetest_interactive) - trace(" 0x%04x, %s\n", pafd->dwFormatTag, pafd->szFormat); - - return TRUE; -} - -static BOOL CALLBACK DriverEnumProc(HACMDRIVERID hadid, - DWORD_PTR dwInstance, - DWORD fdwSupport) -{ - MMRESULT rc; - ACMDRIVERDETAILS dd; - HACMDRIVER had; - - DWORD dwDriverPriority; - DWORD dwDriverSupport; - - if (winetest_interactive) { - trace("id: %p\n", hadid); - trace(" Supports:\n"); - if (fdwSupport & ACMDRIVERDETAILS_SUPPORTF_ASYNC) - trace(" async conversions\n"); - if (fdwSupport & ACMDRIVERDETAILS_SUPPORTF_CODEC) - trace(" different format conversions\n"); - if (fdwSupport & ACMDRIVERDETAILS_SUPPORTF_CONVERTER) - trace(" same format conversions\n"); - if (fdwSupport & ACMDRIVERDETAILS_SUPPORTF_FILTER) - trace(" filtering\n"); - } - - /* try an invalid pointer */ - rc = acmDriverDetails(hadid, 0, 0); - ok(rc == MMSYSERR_INVALPARAM, - "acmDriverDetails(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALPARAM); - - /* try an invalid structure size */ - ZeroMemory(&dd, sizeof(dd)); - rc = acmDriverDetails(hadid, &dd, 0); - ok(rc == MMSYSERR_INVALPARAM, - "acmDriverDetails(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALPARAM); - - /* MSDN says this should fail but it doesn't in practice */ - dd.cbStruct = 4; - rc = acmDriverDetails(hadid, &dd, 0); - ok(rc == MMSYSERR_NOERROR || rc == MMSYSERR_NOTSUPPORTED, - "acmDriverDetails(): rc = %08x, should be %08x\n", - rc, MMSYSERR_NOERROR); - - /* try an invalid handle */ - dd.cbStruct = sizeof(dd); - rc = acmDriverDetails((HACMDRIVERID)1, &dd, 0); - ok(rc == MMSYSERR_INVALHANDLE, - "acmDriverDetails(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALHANDLE); - - /* try an invalid handle and pointer */ - rc = acmDriverDetails((HACMDRIVERID)1, 0, 0); - ok(rc == MMSYSERR_INVALPARAM, - "acmDriverDetails(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALPARAM); - - /* try invalid details */ - rc = acmDriverDetails(hadid, &dd, -1); - ok(rc == MMSYSERR_INVALFLAG, - "acmDriverDetails(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALFLAG); - - /* try valid parameters */ - rc = acmDriverDetails(hadid, &dd, 0); - ok(rc == MMSYSERR_NOERROR || rc == MMSYSERR_NOTSUPPORTED, - "acmDriverDetails(): rc = %08x, should be %08x\n", - rc, MMSYSERR_NOERROR); - - /* cbStruct should contain size of returned data (at most sizeof(dd)) - TODO: should it be *exactly* sizeof(dd), as tested here? - */ - if (rc == MMSYSERR_NOERROR) { - ok(dd.cbStruct == sizeof(dd), - "acmDriverDetails(): cbStruct = %08x\n", dd.cbStruct); - } - - if (rc == MMSYSERR_NOERROR && winetest_interactive) { - trace(" Short name: %s\n", dd.szShortName); - trace(" Long name: %s\n", dd.szLongName); - trace(" Copyright: %s\n", dd.szCopyright); - trace(" Licensing: %s\n", dd.szLicensing); - trace(" Features: %s\n", dd.szFeatures); - trace(" Supports %u formats\n", dd.cFormatTags); - trace(" Supports %u filter formats\n", dd.cFilterTags); - } - - /* try bad pointer */ - rc = acmMetrics((HACMOBJ)hadid, ACM_METRIC_DRIVER_PRIORITY, 0); - ok(rc == MMSYSERR_INVALPARAM, - "acmMetrics(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALPARAM); - - /* try bad handle */ - rc = acmMetrics((HACMOBJ)1, ACM_METRIC_DRIVER_PRIORITY, &dwDriverPriority); - ok(rc == MMSYSERR_INVALHANDLE, - "acmMetrics(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALHANDLE); - - /* try bad pointer and handle */ - rc = acmMetrics((HACMOBJ)1, ACM_METRIC_DRIVER_PRIORITY, 0); - ok(rc == MMSYSERR_INVALHANDLE, - "acmMetrics(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALHANDLE); - - /* try valid parameters */ - rc = acmMetrics((HACMOBJ)hadid, ACM_METRIC_DRIVER_PRIORITY, &dwDriverSupport); - ok(rc == MMSYSERR_NOERROR, - "acmMetrics(): rc = %08x, should be %08x\n", - rc, MMSYSERR_NOERROR); - - /* try bad pointer */ - rc = acmMetrics((HACMOBJ)hadid, ACM_METRIC_DRIVER_SUPPORT, 0); - ok(rc == MMSYSERR_INVALPARAM, - "acmMetrics(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALPARAM); - - /* try bad handle */ - rc = acmMetrics((HACMOBJ)1, ACM_METRIC_DRIVER_SUPPORT, &dwDriverSupport); - ok(rc == MMSYSERR_INVALHANDLE, - "acmMetrics(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALHANDLE); - - /* try bad pointer and handle */ - rc = acmMetrics((HACMOBJ)1, ACM_METRIC_DRIVER_SUPPORT, 0); - ok(rc == MMSYSERR_INVALHANDLE, - "acmMetrics(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALHANDLE); - - /* try valid parameters */ - rc = acmMetrics((HACMOBJ)hadid, ACM_METRIC_DRIVER_SUPPORT, &dwDriverSupport); - ok(rc == MMSYSERR_NOERROR, - "acmMetrics(): rc = %08x, should be %08x\n", - rc, MMSYSERR_NOERROR); - - /* try invalid pointer */ - rc = acmDriverOpen(0, hadid, 0); - ok(rc == MMSYSERR_INVALPARAM, - "acmDriverOpen(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALPARAM); - - /* try invalid handle */ - rc = acmDriverOpen(&had, (HACMDRIVERID)1, 0); - ok(rc == MMSYSERR_INVALHANDLE, - "acmDriverOpen(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALHANDLE); - - /* try invalid open */ - rc = acmDriverOpen(&had, hadid, -1); - ok(rc == MMSYSERR_INVALFLAG, - "acmDriverOpen(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALFLAG); - - /* try valid parameters */ - rc = acmDriverOpen(&had, hadid, 0); - ok(rc == MMSYSERR_NOERROR || rc == MMSYSERR_NODRIVER, - "acmDriverOpen(): rc = %08x, should be %08x\n", - rc, MMSYSERR_NOERROR); - - if (rc == MMSYSERR_NOERROR) { - DWORD dwSize; - HACMDRIVERID hid; - - /* try bad pointer */ - rc = acmDriverID((HACMOBJ)had, 0, 0); - ok(rc == MMSYSERR_INVALPARAM, - "acmDriverID(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALPARAM); - - /* try bad handle */ - rc = acmDriverID((HACMOBJ)1, &hid, 0); - ok(rc == MMSYSERR_INVALHANDLE, - "acmDriverID(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALHANDLE); - - /* try bad handle and pointer */ - rc = acmDriverID((HACMOBJ)1, 0, 0); - ok(rc == MMSYSERR_INVALHANDLE, - "acmDriverID(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALHANDLE); - - /* try bad flag */ - rc = acmDriverID((HACMOBJ)had, &hid, 1); - ok(rc == MMSYSERR_INVALFLAG, - "acmDriverID(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALFLAG); - - /* try valid parameters */ - rc = acmDriverID((HACMOBJ)had, &hid, 0); - ok(rc == MMSYSERR_NOERROR, - "acmDriverID(): rc = %08x, should be %08x\n", - rc, MMSYSERR_NOERROR); - ok(hid == hadid, - "acmDriverID() returned ID %p doesn't equal %p\n", - hid, hadid); - - /* try bad pointer */ - rc = acmMetrics((HACMOBJ)had, ACM_METRIC_MAX_SIZE_FORMAT, 0); - ok(rc == MMSYSERR_INVALPARAM, - "acmMetrics(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALPARAM); - - /* try bad handle */ - rc = acmMetrics((HACMOBJ)1, ACM_METRIC_MAX_SIZE_FORMAT, &dwSize); - ok(rc == MMSYSERR_INVALHANDLE, - "acmMetrics(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALHANDLE); - - /* try bad pointer and handle */ - rc = acmMetrics((HACMOBJ)1, ACM_METRIC_MAX_SIZE_FORMAT, 0); - ok(rc == MMSYSERR_INVALHANDLE, - "acmMetrics(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALHANDLE); - - /* try valid parameters */ - rc = acmMetrics((HACMOBJ)had, ACM_METRIC_MAX_SIZE_FORMAT, &dwSize); - ok(rc == MMSYSERR_NOERROR, - "acmMetrics(): rc = %08x, should be %08x\n", - rc, MMSYSERR_NOERROR); - if (rc == MMSYSERR_NOERROR) { - ACMFORMATDETAILS fd; - WAVEFORMATEX * pwfx; - ACMFORMATTAGDETAILS aftd; - - /* try bad pointer */ - rc = acmFormatEnum(had, 0, FormatEnumProc, 0, 0); - ok(rc == MMSYSERR_INVALPARAM, - "acmFormatEnum(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALPARAM); - - /* try bad structure size */ - ZeroMemory(&fd, sizeof(fd)); - rc = acmFormatEnum(had, &fd, FormatEnumProc, 0, 0); - ok(rc == MMSYSERR_INVALPARAM, - "acmFormatEnum(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALPARAM); - - fd.cbStruct = sizeof(fd) - 1; - rc = acmFormatEnum(had, &fd, FormatEnumProc, 0, 0); - ok(rc == MMSYSERR_INVALPARAM, - "acmFormatEnum(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALPARAM); - - if (dwSize < sizeof(WAVEFORMATEX)) - dwSize = sizeof(WAVEFORMATEX); - - pwfx = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dwSize); - - pwfx->cbSize = LOWORD(dwSize) - sizeof(WAVEFORMATEX); - pwfx->wFormatTag = WAVE_FORMAT_UNKNOWN; - - fd.cbStruct = sizeof(fd); - fd.pwfx = pwfx; - fd.cbwfx = dwSize; - fd.dwFormatTag = WAVE_FORMAT_UNKNOWN; - - /* try valid parameters */ - rc = acmFormatEnum(had, &fd, FormatEnumProc, 0, 0); - ok(rc == MMSYSERR_NOERROR, - "acmFormatEnum(): rc = %08x, should be %08x\n", - rc, MMSYSERR_NOERROR); - - /* try bad pointer */ - rc = acmFormatTagEnum(had, 0, FormatTagEnumProc, 0, 0); - ok(rc == MMSYSERR_INVALPARAM, - "acmFormatTagEnum(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALPARAM); - - /* try bad structure size */ - ZeroMemory(&aftd, sizeof(aftd)); - rc = acmFormatTagEnum(had, &aftd, FormatTagEnumProc, 0, 0); - ok(rc == MMSYSERR_INVALPARAM, - "acmFormatTagEnum(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALPARAM); - - aftd.cbStruct = sizeof(aftd) - 1; - rc = acmFormatTagEnum(had, &aftd, FormatTagEnumProc, 0, 0); - ok(rc == MMSYSERR_INVALPARAM, - "acmFormatTagEnum(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALPARAM); - - aftd.cbStruct = sizeof(aftd); - aftd.dwFormatTag = WAVE_FORMAT_UNKNOWN; - - /* try bad flag */ - rc = acmFormatTagEnum(had, &aftd, FormatTagEnumProc, 0, 1); - ok(rc == MMSYSERR_INVALFLAG, - "acmFormatTagEnum(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALFLAG); - - /* try valid parameters */ - rc = acmFormatTagEnum(had, &aftd, FormatTagEnumProc, 0, 0); - ok(rc == MMSYSERR_NOERROR, - "acmFormatTagEnum(): rc = %08x, should be %08x\n", - rc, MMSYSERR_NOERROR); - - HeapFree(GetProcessHeap(), 0, pwfx); - - /* try invalid handle */ - rc = acmDriverClose((HACMDRIVER)1, 0); - ok(rc == MMSYSERR_INVALHANDLE, - "acmDriverClose(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALHANDLE); - - /* try invalid flag */ - rc = acmDriverClose(had, 1); - ok(rc == MMSYSERR_INVALFLAG, - "acmDriverClose(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALFLAG); - - /* try valid parameters */ - rc = acmDriverClose(had, 0); - ok(rc == MMSYSERR_NOERROR, - "acmDriverClose(): rc = %08x, should be %08x\n", - rc, MMSYSERR_NOERROR); - - /* try closing again */ - rc = acmDriverClose(had, 0); - ok(rc == MMSYSERR_INVALHANDLE, - "acmDriverClose(): rc = %08x, should be %08x\n", - rc, MMSYSERR_INVALHANDLE); - } - } - - return TRUE; -} - -static const char * get_metric(UINT uMetric) -{ - switch (uMetric) { - case ACM_METRIC_COUNT_CODECS: - return "ACM_METRIC_COUNT_CODECS"; - case ACM_METRIC_COUNT_CONVERTERS: - return "ACM_METRIC_COUNT_CONVERTERS"; - case ACM_METRIC_COUNT_DISABLED: - return "ACM_METRIC_COUNT_DISABLED"; - case ACM_METRIC_COUNT_DRIVERS: - return "ACM_METRIC_COUNT_DRIVERS"; - case ACM_METRIC_COUNT_FILTERS: - return "ACM_METRIC_COUNT_FILTERS"; - case ACM_METRIC_COUNT_HARDWARE: - return "ACM_METRIC_COUNT_HARDWARE"; - case ACM_METRIC_COUNT_LOCAL_CODECS: - return "ACM_METRIC_COUNT_LOCAL_CODECS"; - case ACM_METRIC_COUNT_LOCAL_CONVERTERS: - return "ACM_METRIC_COUNT_LOCAL_CONVERTERS"; - case ACM_METRIC_COUNT_LOCAL_DISABLED: - return "ACM_METRIC_COUNT_LOCAL_DISABLED"; - case ACM_METRIC_COUNT_LOCAL_DRIVERS: - return "ACM_METRIC_COUNT_LOCAL_DRIVERS"; - case ACM_METRIC_COUNT_LOCAL_FILTERS: - return "ACM_METRIC_COUNT_LOCAL_FILTERS"; - case ACM_METRIC_DRIVER_PRIORITY: - return "ACM_METRIC_DRIVER_PRIORITY"; - case ACM_METRIC_DRIVER_SUPPORT: - return "ACM_METRIC_DRIVER_SUPPORT"; - case ACM_METRIC_HARDWARE_WAVE_INPUT: - return "ACM_METRIC_HARDWARE_WAVE_INPUT"; - case ACM_METRIC_HARDWARE_WAVE_OUTPUT: - return "ACM_METRIC_HARDWARE_WAVE_OUTPUT"; - case ACM_METRIC_MAX_SIZE_FILTER: - return "ACM_METRIC_MAX_SIZE_FILTER"; - case ACM_METRIC_MAX_SIZE_FORMAT: - return "ACM_METRIC_MAX_SIZE_FORMAT"; - } - - return "UNKNOWN"; -} - -static void check_count(UINT uMetric) -{ - DWORD dwMetric; - MMRESULT rc; - - /* try invalid result pointer */ - rc = acmMetrics(NULL, uMetric, 0); - ok(rc == MMSYSERR_INVALPARAM, - "acmMetrics(NULL, %s, 0): rc = 0x%08x, should be 0x%08x\n", - get_metric(uMetric), rc, MMSYSERR_INVALPARAM); - - /* try invalid handle */ - rc = acmMetrics((HACMOBJ)1, uMetric, &dwMetric); - ok(rc == MMSYSERR_INVALHANDLE, - "acmMetrics(1, %s, %p): rc = 0x%08x, should be 0x%08x\n", - get_metric(uMetric), &dwMetric, rc, MMSYSERR_INVALHANDLE); - - /* try invalid result pointer and handle */ - rc = acmMetrics((HACMOBJ)1, uMetric, 0); - ok(rc == MMSYSERR_INVALHANDLE, - "acmMetrics(1, %s, 0): rc = 0x%08x, should be 0x%08x\n", - get_metric(uMetric), rc, MMSYSERR_INVALHANDLE); - - /* try valid parameters */ - rc = acmMetrics(NULL, uMetric, &dwMetric); - ok(rc == MMSYSERR_NOERROR, "acmMetrics() failed: rc = 0x%08x\n", rc); - - if (rc == MMSYSERR_NOERROR && winetest_interactive) - trace("%s: %u\n", get_metric(uMetric), dwMetric); -} - -static void msacm_tests(void) -{ - MMRESULT rc; - DWORD dwACMVersion = acmGetVersion(); - - if (winetest_interactive) { - trace("ACM version = %u.%02u build %u%s\n", - HIWORD(dwACMVersion) >> 8, - HIWORD(dwACMVersion) & 0xff, - LOWORD(dwACMVersion), - LOWORD(dwACMVersion) == 0 ? " (Retail)" : ""); - } - - check_count(ACM_METRIC_COUNT_CODECS); - check_count(ACM_METRIC_COUNT_CONVERTERS); - check_count(ACM_METRIC_COUNT_DISABLED); - check_count(ACM_METRIC_COUNT_DRIVERS); - check_count(ACM_METRIC_COUNT_FILTERS); - check_count(ACM_METRIC_COUNT_HARDWARE); - check_count(ACM_METRIC_COUNT_LOCAL_CODECS); - check_count(ACM_METRIC_COUNT_LOCAL_CONVERTERS); - check_count(ACM_METRIC_COUNT_LOCAL_DISABLED); - check_count(ACM_METRIC_COUNT_LOCAL_DRIVERS); - check_count(ACM_METRIC_COUNT_LOCAL_FILTERS); - - if (winetest_interactive) - trace("enabled drivers:\n"); - - rc = acmDriverEnum(DriverEnumProc, 0, 0); - ok(rc == MMSYSERR_NOERROR, - "acmDriverEnum() failed, rc=%08x, should be 0x%08x\n", - rc, MMSYSERR_NOERROR); -} - -START_TEST(msacm) -{ - msacm_tests(); -} diff --git a/rostests/winetests/msacm32/msacm32.rbuild b/rostests/winetests/msacm32/msacm32.rbuild deleted file mode 100644 index 477d64fdc50..00000000000 --- a/rostests/winetests/msacm32/msacm32.rbuild +++ /dev/null @@ -1,12 +0,0 @@ - - - - - . - - wine - msacm32 - msacm.c - testlist.c - - diff --git a/rostests/winetests/msacm32/testlist.c b/rostests/winetests/msacm32/testlist.c deleted file mode 100644 index 7220247caf4..00000000000 --- a/rostests/winetests/msacm32/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_msacm(void); - -const struct test winetest_testlist[] = -{ - { "msacm", func_msacm }, - { 0, 0 } -}; diff --git a/rostests/winetests/mscms/CMakeLists.txt b/rostests/winetests/mscms/CMakeLists.txt deleted file mode 100644 index bd14d7aeafe..00000000000 --- a/rostests/winetests/mscms/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(mscms_winetest profile.c testlist.c) -target_link_libraries(mscms_winetest wine) -set_module_type(mscms_winetest win32cui) -add_importlibs(mscms_winetest advapi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET mscms_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/mscms/mscms.rbuild b/rostests/winetests/mscms/mscms.rbuild deleted file mode 100644 index 8da6ea1ea1d..00000000000 --- a/rostests/winetests/mscms/mscms.rbuild +++ /dev/null @@ -1,9 +0,0 @@ - - . - - profile.c - testlist.c - wine - advapi32 - ntdll - diff --git a/rostests/winetests/mscms/profile.c b/rostests/winetests/mscms/profile.c deleted file mode 100644 index 91ae97a0912..00000000000 --- a/rostests/winetests/mscms/profile.c +++ /dev/null @@ -1,1416 +0,0 @@ -/* - * Tests for color profile functions - * - * Copyright 2004, 2005, 2006 Hans Leidekker - * - * 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 "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "winnls.h" -#include "wingdi.h" -#include "winuser.h" -#include "icm.h" - -#include "wine/test.h" - -HMODULE hmscms; -HMODULE huser32; - -static BOOL (WINAPI *pAssociateColorProfileWithDeviceA)(PCSTR,PCSTR,PCSTR); -static BOOL (WINAPI *pCloseColorProfile)(HPROFILE); -static BOOL (WINAPI *pDisassociateColorProfileFromDeviceA)(PCSTR,PCSTR,PCSTR); -static BOOL (WINAPI *pGetColorDirectoryA)(PCHAR,PCHAR,PDWORD); -static BOOL (WINAPI *pGetColorDirectoryW)(PWCHAR,PWCHAR,PDWORD); -static BOOL (WINAPI *pGetColorProfileElement)(HPROFILE,TAGTYPE,DWORD,PDWORD,PVOID,PBOOL); -static BOOL (WINAPI *pGetColorProfileElementTag)(HPROFILE,DWORD,PTAGTYPE); -static BOOL (WINAPI *pGetColorProfileFromHandle)(HPROFILE,PBYTE,PDWORD); -static BOOL (WINAPI *pGetColorProfileHeader)(HPROFILE,PPROFILEHEADER); -static BOOL (WINAPI *pGetCountColorProfileElements)(HPROFILE,PDWORD); -static BOOL (WINAPI *pGetStandardColorSpaceProfileA)(PCSTR,DWORD,PSTR,PDWORD); -static BOOL (WINAPI *pGetStandardColorSpaceProfileW)(PCWSTR,DWORD,PWSTR,PDWORD); -static BOOL (WINAPI *pEnumColorProfilesA)(PCSTR,PENUMTYPEA,PBYTE,PDWORD,PDWORD); -static BOOL (WINAPI *pEnumColorProfilesW)(PCWSTR,PENUMTYPEW,PBYTE,PDWORD,PDWORD); -static BOOL (WINAPI *pInstallColorProfileA)(PCSTR,PCSTR); -static BOOL (WINAPI *pInstallColorProfileW)(PCWSTR,PCWSTR); -static BOOL (WINAPI *pIsColorProfileTagPresent)(HPROFILE,TAGTYPE,PBOOL); -static HPROFILE (WINAPI *pOpenColorProfileA)(PPROFILE,DWORD,DWORD,DWORD); -static HPROFILE (WINAPI *pOpenColorProfileW)(PPROFILE,DWORD,DWORD,DWORD); -static BOOL (WINAPI *pSetColorProfileElement)(HPROFILE,TAGTYPE,DWORD,PDWORD,PVOID); -static BOOL (WINAPI *pSetColorProfileHeader)(HPROFILE,PPROFILEHEADER); -static BOOL (WINAPI *pSetStandardColorSpaceProfileA)(PCSTR,DWORD,PSTR); -static BOOL (WINAPI *pSetStandardColorSpaceProfileW)(PCWSTR,DWORD,PWSTR); -static BOOL (WINAPI *pUninstallColorProfileA)(PCSTR,PCSTR,BOOL); -static BOOL (WINAPI *pUninstallColorProfileW)(PCWSTR,PCWSTR,BOOL); - -static BOOL (WINAPI *pEnumDisplayDevicesA)(LPCSTR,DWORD,PDISPLAY_DEVICE,DWORD); - -#define GETFUNCPTR(func) p##func = (void *)GetProcAddress( hmscms, #func ); \ - if (!p##func) return FALSE; - -static BOOL init_function_ptrs( void ) -{ - GETFUNCPTR( AssociateColorProfileWithDeviceA ) - GETFUNCPTR( CloseColorProfile ) - GETFUNCPTR( DisassociateColorProfileFromDeviceA ) - GETFUNCPTR( GetColorDirectoryA ) - GETFUNCPTR( GetColorDirectoryW ) - GETFUNCPTR( GetColorProfileElement ) - GETFUNCPTR( GetColorProfileElementTag ) - GETFUNCPTR( GetColorProfileFromHandle ) - GETFUNCPTR( GetColorProfileHeader ) - GETFUNCPTR( GetCountColorProfileElements ) - GETFUNCPTR( GetStandardColorSpaceProfileA ) - GETFUNCPTR( GetStandardColorSpaceProfileW ) - GETFUNCPTR( EnumColorProfilesA ) - GETFUNCPTR( EnumColorProfilesW ) - GETFUNCPTR( InstallColorProfileA ) - GETFUNCPTR( InstallColorProfileW ) - GETFUNCPTR( IsColorProfileTagPresent ) - GETFUNCPTR( OpenColorProfileA ) - GETFUNCPTR( OpenColorProfileW ) - GETFUNCPTR( SetColorProfileElement ) - GETFUNCPTR( SetColorProfileHeader ) - GETFUNCPTR( SetStandardColorSpaceProfileA ) - GETFUNCPTR( SetStandardColorSpaceProfileW ) - GETFUNCPTR( UninstallColorProfileA ) - GETFUNCPTR( UninstallColorProfileW ) - - pEnumDisplayDevicesA = (void *)GetProcAddress( huser32, "EnumDisplayDevicesA" ); - - return TRUE; -} - -static const char machine[] = "dummy"; -static const WCHAR machineW[] = { 'd','u','m','m','y',0 }; - -/* To do any real functionality testing with this suite you need a copy of - * the freely distributable standard RGB color space profile. It comes - * standard with Windows, but on Wine you probably need to install it yourself - * in one of the locations mentioned below. - */ - -/* Two common places to find the standard color space profile, relative - * to the system directory. - */ -static const char profile1[] = -"\\color\\srgb color space profile.icm"; -static const char profile2[] = -"\\spool\\drivers\\color\\srgb color space profile.icm"; - -static const WCHAR profile1W[] = -{ '\\','c','o','l','o','r','\\','s','r','g','b',' ','c','o','l','o','r',' ', - 's','p','a','c','e',' ','p','r','o','f','i','l','e','.','i','c','m',0 }; -static const WCHAR profile2W[] = -{ '\\','s','p','o','o','l','\\','d','r','i','v','e','r','s','\\', - 'c','o','l','o','r','\\','s','r','g','b',' ','c','o','l','o','r',' ', - 's','p','a','c','e',' ','p','r','o','f','i','l','e','.','i','c','m',0 }; - -static const unsigned char rgbheader[] = -{ 0x48, 0x0c, 0x00, 0x00, 0x6f, 0x6e, 0x69, 0x4c, 0x00, 0x00, 0x10, 0x02, - 0x72, 0x74, 0x6e, 0x6d, 0x20, 0x42, 0x47, 0x52, 0x20, 0x5a, 0x59, 0x58, - 0x02, 0x00, 0xce, 0x07, 0x06, 0x00, 0x09, 0x00, 0x00, 0x00, 0x31, 0x00, - 0x70, 0x73, 0x63, 0x61, 0x54, 0x46, 0x53, 0x4d, 0x00, 0x00, 0x00, 0x00, - 0x20, 0x43, 0x45, 0x49, 0x42, 0x47, 0x52, 0x73, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0xf6, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x2d, 0xd3, 0x00, 0x00, 0x20, 0x20, 0x50, 0x48 }; - -static LPSTR standardprofile; -static LPWSTR standardprofileW; - -static LPSTR testprofile; -static LPWSTR testprofileW; - -#define IS_SEPARATOR(ch) ((ch) == '\\' || (ch) == '/') - -static void MSCMS_basenameA( LPCSTR path, LPSTR name ) -{ - INT i = strlen( path ); - - while (i > 0 && !IS_SEPARATOR(path[i - 1])) i--; - strcpy( name, &path[i] ); -} - -static void MSCMS_basenameW( LPCWSTR path, LPWSTR name ) -{ - INT i = lstrlenW( path ); - - while (i > 0 && !IS_SEPARATOR(path[i - 1])) i--; - lstrcpyW( name, &path[i] ); -} - -static void test_GetColorDirectoryA(void) -{ - BOOL ret; - DWORD size; - char buffer[MAX_PATH]; - - /* Parameter checks */ - - ret = pGetColorDirectoryA( NULL, NULL, NULL ); - ok( !ret, "GetColorDirectoryA() succeeded (%d)\n", GetLastError() ); - - size = 0; - - ret = pGetColorDirectoryA( NULL, NULL, &size ); - ok( !ret && size > 0, "GetColorDirectoryA() succeeded (%d)\n", GetLastError() ); - - size = 0; - - ret = pGetColorDirectoryA( NULL, buffer, &size ); - ok( !ret && size > 0, "GetColorDirectoryA() succeeded (%d)\n", GetLastError() ); - - size = 1; - - ret = pGetColorDirectoryA( NULL, buffer, &size ); - ok( !ret && size > 0, "GetColorDirectoryA() succeeded (%d)\n", GetLastError() ); - - /* Functional checks */ - - size = sizeof(buffer); - - ret = pGetColorDirectoryA( NULL, buffer, &size ); - ok( ret && size > 0, "GetColorDirectoryA() failed (%d)\n", GetLastError() ); -} - -static void test_GetColorDirectoryW(void) -{ - BOOL ret; - DWORD size; - WCHAR buffer[MAX_PATH]; - - /* Parameter checks */ - - /* This one crashes win2k - - ret = pGetColorDirectoryW( NULL, NULL, NULL ); - ok( !ret, "GetColorDirectoryW() succeeded (%d)\n", GetLastError() ); - - */ - - size = 0; - - ret = pGetColorDirectoryW( NULL, NULL, &size ); - ok( !ret && size > 0, "GetColorDirectoryW() succeeded (%d)\n", GetLastError() ); - - size = 0; - - ret = pGetColorDirectoryW( NULL, buffer, &size ); - ok( !ret && size > 0, "GetColorDirectoryW() succeeded (%d)\n", GetLastError() ); - - size = 1; - - ret = pGetColorDirectoryW( NULL, buffer, &size ); - ok( !ret && size > 0, "GetColorDirectoryW() succeeded (%d)\n", GetLastError() ); - - /* Functional checks */ - - size = sizeof(buffer); - - ret = pGetColorDirectoryW( NULL, buffer, &size ); - ok( ret && size > 0, "GetColorDirectoryW() failed (%d)\n", GetLastError() ); -} - -static void test_GetColorProfileElement(void) -{ - if (standardprofile) - { - PROFILE profile; - HPROFILE handle; - BOOL ret, ref; - DWORD size; - TAGTYPE tag = 0x63707274; /* 'cprt' */ - static char buffer[51]; - static const char expect[] = - { 0x74, 0x65, 0x78, 0x74, 0x00, 0x00, 0x00, 0x00, 0x43, 0x6f, 0x70, - 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x28, 0x63, 0x29, 0x20, - 0x31, 0x39, 0x39, 0x38, 0x20, 0x48, 0x65, 0x77, 0x6c, 0x65, 0x74, - 0x74, 0x2d, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x72, 0x64, 0x20, 0x43, - 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x00 }; - - profile.dwType = PROFILE_FILENAME; - profile.pProfileData = standardprofile; - profile.cbDataSize = strlen(standardprofile); - - handle = pOpenColorProfileA( &profile, PROFILE_READ, 0, OPEN_EXISTING ); - ok( handle != NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); - - /* Parameter checks */ - - ret = pGetColorProfileElement( handle, tag, 0, NULL, NULL, &ref ); - ok( !ret, "GetColorProfileElement() succeeded (%d)\n", GetLastError() ); - - ret = pGetColorProfileElement( handle, tag, 0, &size, NULL, NULL ); - ok( !ret, "GetColorProfileElement() succeeded (%d)\n", GetLastError() ); - - size = 0; - - ret = pGetColorProfileElement( handle, tag, 0, &size, NULL, &ref ); - ok( !ret && size > 0, "GetColorProfileElement() succeeded (%d)\n", GetLastError() ); - - size = sizeof(buffer); - - /* Functional checks */ - - ret = pGetColorProfileElement( handle, tag, 0, &size, buffer, &ref ); - ok( ret && size > 0, "GetColorProfileElement() failed (%d)\n", GetLastError() ); - - ok( !memcmp( buffer, expect, sizeof(expect) ), "Unexpected tag data\n" ); - - pCloseColorProfile( handle ); - } -} - -static void test_GetColorProfileElementTag(void) -{ - if (standardprofile) - { - PROFILE profile; - HPROFILE handle; - BOOL ret; - DWORD index = 1; - TAGTYPE tag, expect = 0x63707274; /* 'cprt' */ - - profile.dwType = PROFILE_FILENAME; - profile.pProfileData = standardprofile; - profile.cbDataSize = strlen(standardprofile); - - handle = pOpenColorProfileA( &profile, PROFILE_READ, 0, OPEN_EXISTING ); - ok( handle != NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); - - /* Parameter checks */ - - ret = pGetColorProfileElementTag( NULL, index, &tag ); - ok( !ret, "GetColorProfileElementTag() succeeded (%d)\n", GetLastError() ); - - ret = pGetColorProfileElementTag( handle, 0, &tag ); - ok( !ret, "GetColorProfileElementTag() succeeded (%d)\n", GetLastError() ); - - ret = pGetColorProfileElementTag( handle, index, NULL ); - ok( !ret, "GetColorProfileElementTag() succeeded (%d)\n", GetLastError() ); - - ret = pGetColorProfileElementTag( handle, 18, NULL ); - ok( !ret, "GetColorProfileElementTag() succeeded (%d)\n", GetLastError() ); - - /* Functional checks */ - - ret = pGetColorProfileElementTag( handle, index, &tag ); - ok( ret && tag == expect, "GetColorProfileElementTag() failed (%d)\n", - GetLastError() ); - - pCloseColorProfile( handle ); - } -} - -static void test_GetColorProfileFromHandle(void) -{ - if (testprofile) - { - PROFILE profile; - HPROFILE handle; - DWORD size; - BOOL ret; - static const unsigned char expect[] = - { 0x00, 0x00, 0x0c, 0x48, 0x4c, 0x69, 0x6e, 0x6f, 0x02, 0x10, 0x00, - 0x00, 0x6d, 0x6e, 0x74, 0x72, 0x52, 0x47, 0x42, 0x20, 0x58, 0x59, - 0x5a, 0x20, 0x07, 0xce, 0x00, 0x02, 0x00, 0x09, 0x00, 0x06, 0x00, - 0x31, 0x00, 0x00, 0x61, 0x63, 0x73, 0x70, 0x4d, 0x53, 0x46, 0x54, - 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x43, 0x20, 0x73, 0x52, 0x47, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf6, 0xd6, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x00, 0xd3, 0x2d, 0x48, 0x50, 0x20, 0x20 }; - - unsigned char *buffer; - - profile.dwType = PROFILE_FILENAME; - profile.pProfileData = testprofile; - profile.cbDataSize = strlen(testprofile); - - handle = pOpenColorProfileA( &profile, PROFILE_READ, 0, OPEN_EXISTING ); - ok( handle != NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); - - /* Parameter checks */ - - size = 0; - - ret = pGetColorProfileFromHandle( handle, NULL, &size ); - ok( !ret && size > 0, "GetColorProfileFromHandle() failed (%d)\n", GetLastError() ); - - buffer = HeapAlloc( GetProcessHeap(), 0, size ); - - if (buffer) - { - ret = pGetColorProfileFromHandle( NULL, buffer, &size ); - ok( !ret, "GetColorProfileFromHandle() succeeded (%d)\n", GetLastError() ); - - ret = pGetColorProfileFromHandle( handle, buffer, NULL ); - ok( !ret, "GetColorProfileFromHandle() succeeded (%d)\n", GetLastError() ); - - /* Functional checks */ - - ret = pGetColorProfileFromHandle( handle, buffer, &size ); - ok( ret && size > 0, "GetColorProfileFromHandle() failed (%d)\n", GetLastError() ); - - ok( !memcmp( buffer, expect, sizeof(expect) ), "Unexpected header data\n" ); - - HeapFree( GetProcessHeap(), 0, buffer ); - } - - pCloseColorProfile( handle ); - } -} - -static void test_GetColorProfileHeader(void) -{ - if (testprofile) - { - PROFILE profile; - HPROFILE handle; - BOOL ret; - PROFILEHEADER header; - - profile.dwType = PROFILE_FILENAME; - profile.pProfileData = testprofile; - profile.cbDataSize = strlen(testprofile); - - handle = pOpenColorProfileA( &profile, PROFILE_READ, 0, OPEN_EXISTING ); - ok( handle != NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); - - /* Parameter checks */ - - ret = pGetColorProfileHeader( NULL, NULL ); - ok( !ret, "GetColorProfileHeader() succeeded (%d)\n", GetLastError() ); - - ret = pGetColorProfileHeader( NULL, &header ); - ok( !ret, "GetColorProfileHeader() succeeded (%d)\n", GetLastError() ); - - if (0) /* Crashes on Vista */ - { - ret = pGetColorProfileHeader( handle, NULL ); - ok( !ret, "GetColorProfileHeader() succeeded (%d)\n", GetLastError() ); - } - - /* Functional checks */ - - ret = pGetColorProfileHeader( handle, &header ); - ok( ret, "GetColorProfileHeader() failed (%d)\n", GetLastError() ); - - ok( !memcmp( &header, rgbheader, sizeof(rgbheader) ), "Unexpected header data\n" ); - - pCloseColorProfile( handle ); - } -} - -static void test_GetCountColorProfileElements(void) -{ - if (standardprofile) - { - PROFILE profile; - HPROFILE handle; - BOOL ret; - DWORD count, expect = 17; - - profile.dwType = PROFILE_FILENAME; - profile.pProfileData = standardprofile; - profile.cbDataSize = strlen(standardprofile); - - handle = pOpenColorProfileA( &profile, PROFILE_READ, 0, OPEN_EXISTING ); - ok( handle != NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); - - /* Parameter checks */ - - ret = pGetCountColorProfileElements( NULL, &count ); - ok( !ret, "GetCountColorProfileElements() succeeded (%d)\n", - GetLastError() ); - - ret = pGetCountColorProfileElements( handle, NULL ); - ok( !ret, "GetCountColorProfileElements() succeeded (%d)\n", - GetLastError() ); - - /* Functional checks */ - - ret = pGetCountColorProfileElements( handle, &count ); - ok( ret && count == expect, - "GetCountColorProfileElements() failed (%d)\n", GetLastError() ); - - pCloseColorProfile( handle ); - } -} - -static void test_GetStandardColorSpaceProfileA(void) -{ - BOOL ret; - DWORD size; - CHAR oldprofile[MAX_PATH]; - CHAR newprofile[MAX_PATH]; - const CHAR emptyA[] = ""; - DWORD zero = 0; - DWORD sizeP = sizeof(newprofile); - - /* Parameter checks */ - - /* Single invalid parameter checks: */ - - SetLastError(0xfaceabee); /* 1st param, */ - ret = pGetStandardColorSpaceProfileA(machine, LCS_sRGB, newprofile, &sizeP); - ok( !ret && GetLastError() == ERROR_NOT_SUPPORTED, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); - - SetLastError(0xfaceabee); /* 2nd param, */ - ret = pGetStandardColorSpaceProfileA(NULL, (DWORD)-1, newprofile, &sizeP); - ok( !ret && GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); - - SetLastError(0xfaceabee); /* 4th param, */ - ret = pGetStandardColorSpaceProfileA(NULL, LCS_sRGB, newprofile, NULL); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); - - SetLastError(0xfaceabee); /* 3rd param, */ - ret = pGetStandardColorSpaceProfileA(NULL, LCS_sRGB, NULL, &sizeP); - ok( !ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); - - SetLastError(0xfaceabee); /* dereferenced 4th param, */ - ret = pGetStandardColorSpaceProfileA(NULL, LCS_sRGB, newprofile, &zero); - ok( !ret && (GetLastError() == ERROR_MORE_DATA || GetLastError() == ERROR_INSUFFICIENT_BUFFER), - "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); - - /* Several invalid parameter checks: */ - - SetLastError(0xfaceabee); /* 1st, maybe 2nd and then dereferenced 4th param, */ - ret = pGetStandardColorSpaceProfileA(machine, 0, newprofile, &zero); - ok( !ret && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_NOT_SUPPORTED), - "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); - - SetLastError(0xfaceabee); /* maybe 2nd and then 4th param, */ - ret = pGetStandardColorSpaceProfileA(NULL, 0, newprofile, NULL); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); - - SetLastError(0xfaceabee); /* maybe 2nd, then 3rd and dereferenced 4th param, */ - ret = pGetStandardColorSpaceProfileA(NULL, 0, NULL, &zero); - ok( !ret && (GetLastError() == ERROR_INSUFFICIENT_BUFFER || GetLastError() == ERROR_FILE_NOT_FOUND), - "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); - - SetLastError(0xfaceabee); /* maybe 2nd param. */ - ret = pGetStandardColorSpaceProfileA(NULL, 0, newprofile, &sizeP); - if (!ret) ok( GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); - else ok( !lstrcmpiA( newprofile, emptyA ) && GetLastError() == 0xfaceabee, - "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); - - /* Functional checks */ - - size = sizeof(oldprofile); - ret = pGetStandardColorSpaceProfileA( NULL, LCS_sRGB, oldprofile, &size ); - ok( ret, "GetStandardColorSpaceProfileA() failed (%d)\n", GetLastError() ); - - SetLastError(0xdeadbeef); - ret = pSetStandardColorSpaceProfileA( NULL, LCS_sRGB, standardprofile ); - if (!ret && (GetLastError() == ERROR_ACCESS_DENIED)) - { - skip("Not enough rights for SetStandardColorSpaceProfileA\n"); - return; - } - ok( ret, "SetStandardColorSpaceProfileA() failed (%d)\n", GetLastError() ); - - size = sizeof(newprofile); - ret = pGetStandardColorSpaceProfileA( NULL, LCS_sRGB, newprofile, &size ); - ok( ret, "GetStandardColorSpaceProfileA() failed (%d)\n", GetLastError() ); - - ret = pSetStandardColorSpaceProfileA( NULL, LCS_sRGB, oldprofile ); - ok( ret, "SetStandardColorSpaceProfileA() failed (%d)\n", GetLastError() ); -} - -static void test_GetStandardColorSpaceProfileW(void) -{ - BOOL ret; - DWORD size; - WCHAR oldprofile[MAX_PATH]; - WCHAR newprofile[MAX_PATH]; - CHAR newprofileA[MAX_PATH]; - const CHAR empty[] = ""; - DWORD zero = 0; - DWORD sizeP = sizeof(newprofile); - - /* Parameter checks */ - - /* Single invalid parameter checks: */ - - SetLastError(0xfaceabee); /* 1st param, */ - ret = pGetStandardColorSpaceProfileW(machineW, LCS_sRGB, newprofile, &sizeP); - ok( !ret && GetLastError() == ERROR_NOT_SUPPORTED, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); - - SetLastError(0xfaceabee); /* 2nd param, */ - ret = pGetStandardColorSpaceProfileW(NULL, (DWORD)-1, newprofile, &sizeP); - ok( !ret && GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); - - SetLastError(0xfaceabee); /* 2nd param, */ - ret = pGetStandardColorSpaceProfileW(NULL, 0, newprofile, &sizeP); - ok( (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) || - broken(ret), /* Win98 and WinME */ - "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); - - SetLastError(0xfaceabee); /* 3rd param, */ - ret = pGetStandardColorSpaceProfileW(NULL, LCS_sRGB, NULL, &sizeP); - ok( !ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); - - SetLastError(0xfaceabee); /* 4th param, */ - ret = pGetStandardColorSpaceProfileW(NULL, LCS_sRGB, newprofile, NULL); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); - - SetLastError(0xfaceabee); /* dereferenced 4th param. */ - ret = pGetStandardColorSpaceProfileW(NULL, LCS_sRGB, newprofile, &zero); - ok( !ret && (GetLastError() == ERROR_MORE_DATA || GetLastError() == ERROR_INSUFFICIENT_BUFFER), - "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); - - /* Several invalid parameter checks: */ - - SetLastError(0xfaceabee); /* 1st, maybe 2nd and then dereferenced 4th param, */ - ret = pGetStandardColorSpaceProfileW(machineW, 0, newprofile, &zero); - ok( !ret && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_NOT_SUPPORTED), - "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); - - SetLastError(0xfaceabee); /* maybe 2nd and then 4th param, */ - ret = pGetStandardColorSpaceProfileW(NULL, 0, newprofile, NULL); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); - - SetLastError(0xfaceabee); /* maybe 2nd, then 3rd and dereferenced 4th param, */ - ret = pGetStandardColorSpaceProfileW(NULL, 0, NULL, &zero); - ok( !ret && (GetLastError() == ERROR_INSUFFICIENT_BUFFER || GetLastError() == ERROR_FILE_NOT_FOUND), - "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); - - SetLastError(0xfaceabee); /* maybe 2nd param. */ - ret = pGetStandardColorSpaceProfileW(NULL, 0, newprofile, &sizeP); - if (!ret) ok( GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); - else - { - WideCharToMultiByte(CP_ACP, 0, newprofile, -1, newprofileA, sizeof(newprofileA), NULL, NULL); - ok( !lstrcmpiA( newprofileA, empty ) && GetLastError() == 0xfaceabee, - "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); - } - - /* Functional checks */ - - size = sizeof(oldprofile); - ret = pGetStandardColorSpaceProfileW( NULL, LCS_sRGB, oldprofile, &size ); - ok( ret, "GetStandardColorSpaceProfileW() failed (%d)\n", GetLastError() ); - - SetLastError(0xdeadbeef); - ret = pSetStandardColorSpaceProfileW( NULL, LCS_sRGB, standardprofileW ); - if (!ret && (GetLastError() == ERROR_ACCESS_DENIED)) - { - skip("Not enough rights for SetStandardColorSpaceProfileW\n"); - return; - } - ok( ret, "SetStandardColorSpaceProfileW() failed (%d)\n", GetLastError() ); - - size = sizeof(newprofile); - ret = pGetStandardColorSpaceProfileW( NULL, LCS_sRGB, newprofile, &size ); - ok( ret, "GetStandardColorSpaceProfileW() failed (%d)\n", GetLastError() ); - - ret = pSetStandardColorSpaceProfileW( NULL, LCS_sRGB, oldprofile ); - ok( ret, "SetStandardColorSpaceProfileW() failed (%d)\n", GetLastError() ); -} - -static void test_EnumColorProfilesA(void) -{ - BOOL ret; - DWORD total, size, number; - ENUMTYPEA record; - BYTE *buffer; - - /* Parameter checks */ - - memset( &record, 0, sizeof(ENUMTYPEA) ); - - record.dwSize = sizeof(ENUMTYPEA); - record.dwVersion = ENUM_TYPE_VERSION; - record.dwFields |= ET_DATACOLORSPACE; - record.dwDataColorSpace = SPACE_RGB; - - total = 0; - ret = pEnumColorProfilesA( NULL, &record, NULL, &total, &number ); - ok( !ret, "EnumColorProfilesA() failed (%d)\n", GetLastError() ); - buffer = HeapAlloc( GetProcessHeap(), 0, total ); - - size = total; - ret = pEnumColorProfilesA( machine, &record, buffer, &size, &number ); - ok( !ret, "EnumColorProfilesA() succeeded (%d)\n", GetLastError() ); - - ret = pEnumColorProfilesA( NULL, NULL, buffer, &size, &number ); - ok( !ret, "EnumColorProfilesA() succeeded (%d)\n", GetLastError() ); - - ret = pEnumColorProfilesA( NULL, &record, buffer, NULL, &number ); - ok( !ret, "EnumColorProfilesA() succeeded (%d)\n", GetLastError() ); - - ret = pEnumColorProfilesA( NULL, &record, buffer, &size, &number ); - if (standardprofile) - ok( ret, "EnumColorProfilesA() failed (%d)\n", GetLastError() ); - else - todo_wine ok( ret, "EnumColorProfilesA() failed (%d)\n", GetLastError() ); - - size = 0; - - ret = pEnumColorProfilesA( NULL, &record, buffer, &size, &number ); - ok( !ret, "EnumColorProfilesA() succeeded (%d)\n", GetLastError() ); - - /* Functional checks */ - - size = total; - ret = pEnumColorProfilesA( NULL, &record, buffer, &size, &number ); - if (standardprofile) - ok( ret, "EnumColorProfilesA() failed (%d)\n", GetLastError() ); - else - todo_wine ok( ret, "EnumColorProfilesA() failed (%d)\n", GetLastError() ); - - HeapFree( GetProcessHeap(), 0, buffer ); -} - -static void test_EnumColorProfilesW(void) -{ - BOOL ret; - DWORD total, size, number; - ENUMTYPEW record; - BYTE *buffer; - - /* Parameter checks */ - - memset( &record, 0, sizeof(ENUMTYPEW) ); - - record.dwSize = sizeof(ENUMTYPEW); - record.dwVersion = ENUM_TYPE_VERSION; - record.dwFields |= ET_DATACOLORSPACE; - record.dwDataColorSpace = SPACE_RGB; - - total = 0; - ret = pEnumColorProfilesW( NULL, &record, NULL, &total, &number ); - ok( !ret, "EnumColorProfilesW() failed (%d)\n", GetLastError() ); - buffer = HeapAlloc( GetProcessHeap(), 0, total * sizeof(WCHAR) ); - - size = total; - ret = pEnumColorProfilesW( machineW, &record, buffer, &size, &number ); - ok( !ret, "EnumColorProfilesW() succeeded (%d)\n", GetLastError() ); - - ret = pEnumColorProfilesW( NULL, NULL, buffer, &size, &number ); - ok( !ret, "EnumColorProfilesW() succeeded (%d)\n", GetLastError() ); - - ret = pEnumColorProfilesW( NULL, &record, buffer, NULL, &number ); - ok( !ret, "EnumColorProfilesW() succeeded (%d)\n", GetLastError() ); - - ret = pEnumColorProfilesW( NULL, &record, buffer, &size, &number ); - if (standardprofileW) - ok( ret, "EnumColorProfilesW() failed (%d)\n", GetLastError() ); - else - todo_wine ok( ret, "EnumColorProfilesW() failed (%d)\n", GetLastError() ); - - size = 0; - ret = pEnumColorProfilesW( NULL, &record, buffer, &size, &number ); - ok( !ret, "EnumColorProfilesW() succeeded (%d)\n", GetLastError() ); - - /* Functional checks */ - - size = total; - ret = pEnumColorProfilesW( NULL, &record, buffer, &size, &number ); - if (standardprofileW) - ok( ret, "EnumColorProfilesW() failed (%d)\n", GetLastError() ); - else - todo_wine ok( ret, "EnumColorProfilesW() failed (%d)\n", GetLastError() ); - - HeapFree( GetProcessHeap(), 0, buffer ); -} - -static void test_InstallColorProfileA(void) -{ - BOOL ret; - - /* Parameter checks */ - - ret = pInstallColorProfileA( NULL, NULL ); - ok( !ret, "InstallColorProfileA() succeeded (%d)\n", GetLastError() ); - - ret = pInstallColorProfileA( machine, NULL ); - ok( !ret, "InstallColorProfileA() succeeded (%d)\n", GetLastError() ); - - ret = pInstallColorProfileA( NULL, machine ); - ok( !ret, "InstallColorProfileA() succeeded (%d)\n", GetLastError() ); - - if (standardprofile) - { - ret = pInstallColorProfileA( NULL, standardprofile ); - ok( ret, "InstallColorProfileA() failed (%d)\n", GetLastError() ); - } - - /* Functional checks */ - - if (testprofile) - { - CHAR dest[MAX_PATH], base[MAX_PATH]; - DWORD size = sizeof(dest); - CHAR slash[] = "\\"; - HANDLE handle; - - SetLastError(0xdeadbeef); - ret = pInstallColorProfileA( NULL, testprofile ); - if (!ret && (GetLastError() == ERROR_ACCESS_DENIED)) - { - skip("Not enough rights for InstallColorProfileA\n"); - return; - } - ok( ret, "InstallColorProfileA() failed (%d)\n", GetLastError() ); - - ret = pGetColorDirectoryA( NULL, dest, &size ); - ok( ret, "GetColorDirectoryA() failed (%d)\n", GetLastError() ); - - MSCMS_basenameA( testprofile, base ); - - lstrcatA( dest, slash ); - lstrcatA( dest, base ); - - /* Check if the profile is really there */ - handle = CreateFileA( dest, 0 , 0, NULL, OPEN_EXISTING, 0, NULL ); - ok( handle != INVALID_HANDLE_VALUE, "Couldn't find the profile (%d)\n", GetLastError() ); - CloseHandle( handle ); - - ret = pUninstallColorProfileA( NULL, dest, TRUE ); - ok( ret, "UninstallColorProfileA() failed (%d)\n", GetLastError() ); - } -} - -static void test_InstallColorProfileW(void) -{ - BOOL ret; - - /* Parameter checks */ - - ret = pInstallColorProfileW( NULL, NULL ); - ok( !ret, "InstallColorProfileW() succeeded (%d)\n", GetLastError() ); - - ret = pInstallColorProfileW( machineW, NULL ); - ok( !ret, "InstallColorProfileW() succeeded (%d)\n", GetLastError() ); - - ret = pInstallColorProfileW( NULL, machineW ); - ok( !ret, "InstallColorProfileW() failed (%d)\n", GetLastError() ); - - if (standardprofileW) - { - ret = pInstallColorProfileW( NULL, standardprofileW ); - ok( ret, "InstallColorProfileW() failed (%d)\n", GetLastError() ); - } - - /* Functional checks */ - - if (testprofileW) - { - WCHAR dest[MAX_PATH], base[MAX_PATH]; - DWORD size = sizeof(dest); - WCHAR slash[] = { '\\', 0 }; - HANDLE handle; - - SetLastError(0xdeadbeef); - ret = pInstallColorProfileW( NULL, testprofileW ); - if (!ret && (GetLastError() == ERROR_ACCESS_DENIED)) - { - skip("Not enough rights for InstallColorProfileW\n"); - return; - } - ok( ret, "InstallColorProfileW() failed (%d)\n", GetLastError() ); - - ret = pGetColorDirectoryW( NULL, dest, &size ); - ok( ret, "GetColorDirectoryW() failed (%d)\n", GetLastError() ); - - MSCMS_basenameW( testprofileW, base ); - - lstrcatW( dest, slash ); - lstrcatW( dest, base ); - - /* Check if the profile is really there */ - handle = CreateFileW( dest, 0 , 0, NULL, OPEN_EXISTING, 0, NULL ); - ok( handle != INVALID_HANDLE_VALUE, "Couldn't find the profile (%d)\n", GetLastError() ); - CloseHandle( handle ); - - ret = pUninstallColorProfileW( NULL, dest, TRUE ); - ok( ret, "UninstallColorProfileW() failed (%d)\n", GetLastError() ); - } -} - -static void test_IsColorProfileTagPresent(void) -{ - if (standardprofile) - { - PROFILE profile; - HPROFILE handle; - BOOL ret, present; - TAGTYPE tag; - - profile.dwType = PROFILE_FILENAME; - profile.pProfileData = standardprofile; - profile.cbDataSize = strlen(standardprofile); - - handle = pOpenColorProfileA( &profile, PROFILE_READ, 0, OPEN_EXISTING ); - ok( handle != NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); - - /* Parameter checks */ - - tag = 0; - - ret = pIsColorProfileTagPresent( handle, tag, &present ); - ok( !(ret && present), "IsColorProfileTagPresent() succeeded (%d)\n", GetLastError() ); - - tag = 0x63707274; /* 'cprt' */ - - ret = pIsColorProfileTagPresent( NULL, tag, &present ); - ok( !ret, "IsColorProfileTagPresent() succeeded (%d)\n", GetLastError() ); - - ret = pIsColorProfileTagPresent( handle, tag, NULL ); - ok( !ret, "IsColorProfileTagPresent() succeeded (%d)\n", GetLastError() ); - - /* Functional checks */ - - ret = pIsColorProfileTagPresent( handle, tag, &present ); - ok( ret && present, "IsColorProfileTagPresent() failed (%d)\n", GetLastError() ); - - pCloseColorProfile( handle ); - } -} - -static void test_OpenColorProfileA(void) -{ - PROFILE profile; - HPROFILE handle; - BOOL ret; - - profile.dwType = PROFILE_FILENAME; - profile.pProfileData = NULL; - profile.cbDataSize = 0; - - /* Parameter checks */ - - handle = pOpenColorProfileA( NULL, 0, 0, 0 ); - ok( handle == NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); - - handle = pOpenColorProfileA( &profile, 0, 0, 0 ); - ok( handle == NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); - - handle = pOpenColorProfileA( &profile, PROFILE_READ, 0, 0 ); - ok( handle == NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); - - handle = pOpenColorProfileA( &profile, PROFILE_READWRITE, 0, 0 ); - ok( handle == NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); - - ok ( !pCloseColorProfile( NULL ), "CloseColorProfile() succeeded\n" ); - - if (standardprofile) - { - profile.pProfileData = standardprofile; - profile.cbDataSize = strlen(standardprofile); - - handle = pOpenColorProfileA( &profile, 0, 0, 0 ); - ok( handle == NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); - - handle = pOpenColorProfileA( &profile, PROFILE_READ, 0, 0 ); - ok( handle == NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); - - handle = pOpenColorProfileA( &profile, PROFILE_READ|PROFILE_READWRITE, 0, 0 ); - ok( handle == NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); - - /* Functional checks */ - - handle = pOpenColorProfileA( &profile, PROFILE_READ, 0, OPEN_EXISTING ); - ok( handle != NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); - - ret = pCloseColorProfile( handle ); - ok( ret, "CloseColorProfile() failed (%d)\n", GetLastError() ); - } -} - -static void test_OpenColorProfileW(void) -{ - PROFILE profile; - HPROFILE handle; - BOOL ret; - - profile.dwType = PROFILE_FILENAME; - profile.pProfileData = NULL; - profile.cbDataSize = 0; - - /* Parameter checks */ - - handle = pOpenColorProfileW( NULL, 0, 0, 0 ); - ok( handle == NULL, "OpenColorProfileW() failed (%d)\n", GetLastError() ); - - handle = pOpenColorProfileW( &profile, 0, 0, 0 ); - ok( handle == NULL, "OpenColorProfileW() failed (%d)\n", GetLastError() ); - - handle = pOpenColorProfileW( &profile, PROFILE_READ, 0, 0 ); - ok( handle == NULL, "OpenColorProfileW() failed (%d)\n", GetLastError() ); - - handle = pOpenColorProfileW( &profile, PROFILE_READWRITE, 0, 0 ); - ok( handle == NULL, "OpenColorProfileW() failed (%d)\n", GetLastError() ); - - ok ( !pCloseColorProfile( NULL ), "CloseColorProfile() succeeded\n" ); - - if (standardprofileW) - { - profile.pProfileData = standardprofileW; - profile.cbDataSize = lstrlenW(standardprofileW) * sizeof(WCHAR); - - handle = pOpenColorProfileW( &profile, 0, 0, 0 ); - ok( handle == NULL, "OpenColorProfileW() failed (%d)\n", GetLastError() ); - - handle = pOpenColorProfileW( &profile, PROFILE_READ, 0, 0 ); - ok( handle == NULL, "OpenColorProfileW() failed (%d)\n", GetLastError() ); - - handle = pOpenColorProfileW( &profile, PROFILE_READ|PROFILE_READWRITE, 0, 0 ); - ok( handle == NULL, "OpenColorProfileW() failed (%d)\n", GetLastError() ); - - /* Functional checks */ - - handle = pOpenColorProfileW( &profile, PROFILE_READ, 0, OPEN_EXISTING ); - ok( handle != NULL, "OpenColorProfileW() failed (%d)\n", GetLastError() ); - - ret = pCloseColorProfile( handle ); - ok( ret, "CloseColorProfile() failed (%d)\n", GetLastError() ); - } -} - -static void test_SetColorProfileElement(void) -{ - if (testprofile) - { - PROFILE profile; - HPROFILE handle; - DWORD size; - BOOL ret, ref; - - TAGTYPE tag = 0x63707274; /* 'cprt' */ - static char data[] = "(c) The Wine Project"; - static char buffer[51]; - - profile.dwType = PROFILE_FILENAME; - profile.pProfileData = testprofile; - profile.cbDataSize = strlen(testprofile); - - /* Parameter checks */ - - handle = pOpenColorProfileA( &profile, PROFILE_READ, 0, OPEN_EXISTING ); - ok( handle != NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); - - ret = pSetColorProfileElement( handle, tag, 0, &size, data ); - ok( !ret, "SetColorProfileElement() succeeded (%d)\n", GetLastError() ); - - pCloseColorProfile( handle ); - - handle = pOpenColorProfileA( &profile, PROFILE_READWRITE, 0, OPEN_EXISTING ); - ok( handle != NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); - - ret = pSetColorProfileElement( NULL, 0, 0, NULL, NULL ); - ok( !ret, "SetColorProfileElement() succeeded (%d)\n", GetLastError() ); - - ret = pSetColorProfileElement( handle, 0, 0, NULL, NULL ); - ok( !ret, "SetColorProfileElement() succeeded (%d)\n", GetLastError() ); - - ret = pSetColorProfileElement( handle, tag, 0, NULL, NULL ); - ok( !ret, "SetColorProfileElement() succeeded (%d)\n", GetLastError() ); - - ret = pSetColorProfileElement( handle, tag, 0, &size, NULL ); - ok( !ret, "SetColorProfileElement() succeeded (%d)\n", GetLastError() ); - - /* Functional checks */ - - size = sizeof(data); - - ret = pSetColorProfileElement( handle, tag, 0, &size, data ); - ok( ret, "SetColorProfileElement() failed (%d)\n", GetLastError() ); - - size = sizeof(buffer); - - ret = pGetColorProfileElement( handle, tag, 0, &size, buffer, &ref ); - ok( ret && size > 0, "GetColorProfileElement() failed (%d)\n", GetLastError() ); - - ok( !memcmp( data, buffer, sizeof(data) ), - "Unexpected tag data, expected %s, got %s (%d)\n", - data, buffer, GetLastError() ); - - pCloseColorProfile( handle ); - } -} - -static void test_SetColorProfileHeader(void) -{ - if (testprofile) - { - PROFILE profile; - HPROFILE handle; - BOOL ret; - PROFILEHEADER header; - - profile.dwType = PROFILE_FILENAME; - profile.pProfileData = testprofile; - profile.cbDataSize = strlen(testprofile); - - header.phSize = 0x00000c48; - header.phCMMType = 0x4c696e6f; - header.phVersion = 0x02100000; - header.phClass = 0x6d6e7472; - header.phDataColorSpace = 0x52474220; - header.phConnectionSpace = 0x58595a20; - header.phDateTime[0] = 0x07ce0002; - header.phDateTime[1] = 0x00090006; - header.phDateTime[2] = 0x00310000; - header.phSignature = 0x61637370; - header.phPlatform = 0x4d534654; - header.phProfileFlags = 0x00000000; - header.phManufacturer = 0x49454320; - header.phModel = 0x73524742; - header.phAttributes[0] = 0x00000000; - header.phAttributes[1] = 0x00000000; - header.phRenderingIntent = 0x00000000; - header.phIlluminant.ciexyzX = 0x0000f6d6; - header.phIlluminant.ciexyzY = 0x00010000; - header.phIlluminant.ciexyzZ = 0x0000d32d; - header.phCreator = 0x48502020; - - /* Parameter checks */ - - handle = pOpenColorProfileA( &profile, PROFILE_READ, 0, OPEN_EXISTING ); - ok( handle != NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); - - ret = pSetColorProfileHeader( handle, &header ); - ok( !ret, "SetColorProfileHeader() succeeded (%d)\n", GetLastError() ); - - pCloseColorProfile( handle ); - - handle = pOpenColorProfileA( &profile, PROFILE_READWRITE, 0, OPEN_EXISTING ); - ok( handle != NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); - - ret = pSetColorProfileHeader( NULL, NULL ); - ok( !ret, "SetColorProfileHeader() succeeded (%d)\n", GetLastError() ); - - ret = pSetColorProfileHeader( handle, NULL ); - ok( !ret, "SetColorProfileHeader() succeeded (%d)\n", GetLastError() ); - - ret = pSetColorProfileHeader( NULL, &header ); - ok( !ret, "SetColorProfileHeader() succeeded (%d)\n", GetLastError() ); - - /* Functional checks */ - - ret = pSetColorProfileHeader( handle, &header ); - ok( ret, "SetColorProfileHeader() failed (%d)\n", GetLastError() ); - - ret = pGetColorProfileHeader( handle, &header ); - ok( ret, "GetColorProfileHeader() failed (%d)\n", GetLastError() ); - - ok( !memcmp( &header, rgbheader, sizeof(rgbheader) ), "Unexpected header data\n" ); - - pCloseColorProfile( handle ); - } -} - -static void test_UninstallColorProfileA(void) -{ - BOOL ret; - - /* Parameter checks */ - - ret = pUninstallColorProfileA( NULL, NULL, FALSE ); - ok( !ret, "UninstallColorProfileA() succeeded (%d)\n", GetLastError() ); - - ret = pUninstallColorProfileA( machine, NULL, FALSE ); - ok( !ret, "UninstallColorProfileA() succeeded (%d)\n", GetLastError() ); - - /* Functional checks */ - - if (testprofile) - { - CHAR dest[MAX_PATH], base[MAX_PATH]; - DWORD size = sizeof(dest); - CHAR slash[] = "\\"; - HANDLE handle; - - SetLastError(0xdeadbeef); - ret = pInstallColorProfileA( NULL, testprofile ); - if (!ret && (GetLastError() == ERROR_ACCESS_DENIED)) - { - skip("Not enough rights for InstallColorProfileA\n"); - return; - } - ok( ret, "InstallColorProfileA() failed (%d)\n", GetLastError() ); - - ret = pGetColorDirectoryA( NULL, dest, &size ); - ok( ret, "GetColorDirectoryA() failed (%d)\n", GetLastError() ); - - MSCMS_basenameA( testprofile, base ); - - lstrcatA( dest, slash ); - lstrcatA( dest, base ); - - ret = pUninstallColorProfileA( NULL, dest, TRUE ); - ok( ret, "UninstallColorProfileA() failed (%d)\n", GetLastError() ); - - /* Check if the profile is really gone */ - handle = CreateFileA( dest, 0 , 0, NULL, OPEN_EXISTING, 0, NULL ); - ok( handle == INVALID_HANDLE_VALUE, "Found the profile (%d)\n", GetLastError() ); - CloseHandle( handle ); - } -} - -static void test_UninstallColorProfileW(void) -{ - BOOL ret; - - /* Parameter checks */ - - ret = pUninstallColorProfileW( NULL, NULL, FALSE ); - ok( !ret, "UninstallColorProfileW() succeeded (%d)\n", GetLastError() ); - - ret = pUninstallColorProfileW( machineW, NULL, FALSE ); - ok( !ret, "UninstallColorProfileW() succeeded (%d)\n", GetLastError() ); - - /* Functional checks */ - - if (testprofileW) - { - WCHAR dest[MAX_PATH], base[MAX_PATH]; - char destA[MAX_PATH]; - DWORD size = sizeof(dest); - WCHAR slash[] = { '\\', 0 }; - HANDLE handle; - int bytes_copied; - - SetLastError(0xdeadbeef); - ret = pInstallColorProfileW( NULL, testprofileW ); - if (!ret && (GetLastError() == ERROR_ACCESS_DENIED)) - { - skip("Not enough rights for InstallColorProfileW\n"); - return; - } - ok( ret, "InstallColorProfileW() failed (%d)\n", GetLastError() ); - - ret = pGetColorDirectoryW( NULL, dest, &size ); - ok( ret, "GetColorDirectoryW() failed (%d)\n", GetLastError() ); - - MSCMS_basenameW( testprofileW, base ); - - lstrcatW( dest, slash ); - lstrcatW( dest, base ); - - ret = pUninstallColorProfileW( NULL, dest, TRUE ); - ok( ret, "UninstallColorProfileW() failed (%d)\n", GetLastError() ); - - bytes_copied = WideCharToMultiByte(CP_ACP, 0, dest, -1, destA, MAX_PATH, NULL, NULL); - ok( bytes_copied > 0 , "WideCharToMultiByte() returns %d\n", bytes_copied); - /* Check if the profile is really gone */ - handle = CreateFileA( destA, 0 , 0, NULL, OPEN_EXISTING, 0, NULL ); - ok( handle == INVALID_HANDLE_VALUE, "Found the profile (%d)\n", GetLastError() ); - CloseHandle( handle ); - } -} - -static void test_AssociateColorProfileWithDeviceA(void) -{ - BOOL ret; - char profile[MAX_PATH], basename[MAX_PATH]; - DWORD error, size = sizeof(profile); - DISPLAY_DEVICE display; - BOOL res; - DISPLAY_DEVICE monitor; - - if (testprofile && pEnumDisplayDevicesA) - { - display.cb = sizeof( DISPLAY_DEVICE ); - res = pEnumDisplayDevicesA( NULL, 0, &display, 0 ); - ok( res, "Can't get display info\n" ); - - monitor.cb = sizeof( DISPLAY_DEVICE ); - res = pEnumDisplayDevicesA( display.DeviceName, 0, &monitor, 0 ); - if (res) - { - SetLastError(0xdeadbeef); - ret = pAssociateColorProfileWithDeviceA( "machine", testprofile, NULL ); - error = GetLastError(); - ok( !ret, "AssociateColorProfileWithDevice() succeeded\n" ); - ok( error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error ); - - SetLastError(0xdeadbeef); - ret = pAssociateColorProfileWithDeviceA( "machine", NULL, monitor.DeviceID ); - error = GetLastError(); - ok( !ret, "AssociateColorProfileWithDevice() succeeded\n" ); - ok( error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error ); - - SetLastError(0xdeadbeef); - ret = pAssociateColorProfileWithDeviceA( "machine", testprofile, monitor.DeviceID ); - error = GetLastError(); - ok( !ret, "AssociateColorProfileWithDevice() succeeded\n" ); - ok( error == ERROR_NOT_SUPPORTED, "expected ERROR_NOT_SUPPORTED, got %u\n", error ); - - ret = pInstallColorProfileA( NULL, testprofile ); - ok( ret, "InstallColorProfileA() failed (%u)\n", GetLastError() ); - - ret = pGetColorDirectoryA( NULL, profile, &size ); - ok( ret, "GetColorDirectoryA() failed (%d)\n", GetLastError() ); - - MSCMS_basenameA( testprofile, basename ); - lstrcatA( profile, "\\" ); - lstrcatA( profile, basename ); - - ret = pAssociateColorProfileWithDeviceA( NULL, profile, monitor.DeviceID ); - ok( ret, "AssociateColorProfileWithDevice() failed (%u)\n", GetLastError() ); - - SetLastError(0xdeadbeef); - ret = pDisassociateColorProfileFromDeviceA( "machine", profile, NULL ); - error = GetLastError(); - ok( !ret, "DisassociateColorProfileFromDeviceA() succeeded\n" ); - ok( error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error ); - - SetLastError(0xdeadbeef); - ret = pDisassociateColorProfileFromDeviceA( "machine", NULL, monitor.DeviceID ); - error = GetLastError(); - ok( !ret, "DisassociateColorProfileFromDeviceA() succeeded\n" ); - ok( error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error ); - - SetLastError(0xdeadbeef); - ret = pDisassociateColorProfileFromDeviceA( "machine", profile, monitor.DeviceID ); - error = GetLastError(); - ok( !ret, "DisassociateColorProfileFromDeviceA() succeeded\n" ); - ok( error == ERROR_NOT_SUPPORTED, "expected ERROR_NOT_SUPPORTED, got %u\n", error ); - - ret = pDisassociateColorProfileFromDeviceA( NULL, profile, monitor.DeviceID ); - ok( ret, "DisassociateColorProfileFromDeviceA() failed (%u)\n", GetLastError() ); - - ret = pUninstallColorProfileA( NULL, profile, TRUE ); - ok( ret, "UninstallColorProfileA() failed (%d)\n", GetLastError() ); - } - else - skip("Unable to obtain monitor name\n"); - } -} - -START_TEST(profile) -{ - UINT len; - HANDLE handle; - char path[MAX_PATH], file[MAX_PATH]; - char profilefile1[MAX_PATH], profilefile2[MAX_PATH]; - WCHAR profilefile1W[MAX_PATH], profilefile2W[MAX_PATH]; - WCHAR fileW[MAX_PATH]; - UINT ret; - - hmscms = LoadLibraryA( "mscms.dll" ); - if (!hmscms) return; - - huser32 = LoadLibraryA( "user32.dll" ); - if (!huser32) - { - FreeLibrary( hmscms ); - return; - } - - if (!init_function_ptrs()) - { - FreeLibrary( huser32 ); - FreeLibrary( hmscms ); - return; - } - - /* See if we can find the standard color profile */ - ret = GetSystemDirectoryA( profilefile1, sizeof(profilefile1) ); - ok( ret > 0, "GetSystemDirectoryA() returns %d, LastError = %d\n", ret, GetLastError()); - ok( lstrlenA(profilefile1) > 0 && lstrlenA(profilefile1) < MAX_PATH, - "GetSystemDirectoryA() returns %d, LastError = %d\n", ret, GetLastError()); - MultiByteToWideChar(CP_ACP, 0, profilefile1, -1, profilefile1W, MAX_PATH); - ok( lstrlenW(profilefile1W) > 0 && lstrlenW(profilefile1W) < MAX_PATH, - "GetSystemDirectoryA() returns %d, LastError = %d\n", ret, GetLastError()); - lstrcpyA(profilefile2, profilefile1); - lstrcpyW(profilefile2W, profilefile1W); - - lstrcatA( profilefile1, profile1 ); - lstrcatW( profilefile1W, profile1W ); - handle = CreateFileA( profilefile1, 0 , 0, NULL, OPEN_EXISTING, 0, NULL ); - - if (handle != INVALID_HANDLE_VALUE) - { - standardprofile = profilefile1; - standardprofileW = profilefile1W; - CloseHandle( handle ); - } - - lstrcatA( profilefile2, profile2 ); - lstrcatW( profilefile2W, profile2W ); - handle = CreateFileA( profilefile2, 0 , 0, NULL, OPEN_EXISTING, 0, NULL ); - - if (handle != INVALID_HANDLE_VALUE) - { - standardprofile = profilefile2; - standardprofileW = profilefile2W; - CloseHandle( handle ); - } - - /* If found, create a temporary copy for testing purposes */ - if (standardprofile && GetTempPath( sizeof(path), path )) - { - if (GetTempFileName( path, "rgb", 0, file )) - { - if (CopyFileA( standardprofile, file, FALSE )) - { - testprofile = (LPSTR)&file; - - len = MultiByteToWideChar( CP_ACP, 0, testprofile, -1, NULL, 0 ); - MultiByteToWideChar( CP_ACP, 0, testprofile, -1, fileW, len ); - - testprofileW = (LPWSTR)&fileW; - } - } - } - - test_GetColorDirectoryA(); - test_GetColorDirectoryW(); - - test_GetColorProfileElement(); - test_GetColorProfileElementTag(); - - test_GetColorProfileFromHandle(); - test_GetColorProfileHeader(); - - test_GetCountColorProfileElements(); - - test_GetStandardColorSpaceProfileA(); - test_GetStandardColorSpaceProfileW(); - - test_EnumColorProfilesA(); - test_EnumColorProfilesW(); - - test_InstallColorProfileA(); - test_InstallColorProfileW(); - - test_IsColorProfileTagPresent(); - - test_OpenColorProfileA(); - test_OpenColorProfileW(); - - test_SetColorProfileElement(); - test_SetColorProfileHeader(); - - test_UninstallColorProfileA(); - test_UninstallColorProfileW(); - - test_AssociateColorProfileWithDeviceA(); - - /* Clean up */ - if (testprofile) - DeleteFileA( testprofile ); - - FreeLibrary( huser32 ); - FreeLibrary( hmscms ); -} diff --git a/rostests/winetests/mscms/testlist.c b/rostests/winetests/mscms/testlist.c deleted file mode 100644 index ef2de04f9c7..00000000000 --- a/rostests/winetests/mscms/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_profile(void); - -const struct test winetest_testlist[] = -{ - { "profile", func_profile }, - { 0, 0 } -}; diff --git a/rostests/winetests/msctf/CMakeLists.txt b/rostests/winetests/msctf/CMakeLists.txt deleted file mode 100644 index ee7ecd03690..00000000000 --- a/rostests/winetests/msctf/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ - -add_definitions(-D__ROS_LONG64__) - -add_executable(msctf_winetest inputprocessor.c testlist.c) -target_link_libraries(msctf_winetest wine) - -if(MSVC) - target_link_libraries(msctf_winetest uuid) -endif() - -set_module_type(msctf_winetest win32cui) -add_importlibs(msctf_winetest ole32 user32 msvcrt kernel32 ntdll) -add_cd_file(TARGET msctf_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/msctf/inputprocessor.c b/rostests/winetests/msctf/inputprocessor.c deleted file mode 100644 index c445b41b01e..00000000000 --- a/rostests/winetests/msctf/inputprocessor.c +++ /dev/null @@ -1,2102 +0,0 @@ -/* - * Unit tests for ITfInputProcessor - * - * Copyright 2009 Aric Stewart, 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 - -#define COBJMACROS -#include "wine/test.h" -#include "winuser.h" -#include "initguid.h" -#include "shlwapi.h" -#include "shlguid.h" -#include "comcat.h" -#include "msctf.h" -#include "olectl.h" - -static ITfInputProcessorProfiles* g_ipp; -static LANGID gLangid; -static ITfCategoryMgr * g_cm = NULL; -static ITfThreadMgr* g_tm = NULL; -static ITfDocumentMgr *g_dm = NULL; -static TfClientId cid = 0; -static TfClientId tid = 0; - -static ITextStoreACPSink *ACPSink; - -#define SINK_UNEXPECTED 0 -#define SINK_EXPECTED 1 -#define SINK_FIRED 2 -#define SINK_IGNORE 3 -#define SINK_OPTIONAL 4 - -#define SINK_ACTION_MASK 0xff -#define SINK_OPTION_MASK 0xff00 -#define SINK_EXPECTED_COUNT_MASK 0xff0000 - -#define SINK_OPTION_TODO 0x0100 - -#define FOCUS_IGNORE (ITfDocumentMgr*)0xffffffff - -static BOOL test_ShouldActivate = FALSE; -static BOOL test_ShouldDeactivate = FALSE; - -static DWORD tmSinkCookie; -static DWORD tmSinkRefCount; -static DWORD documentStatus; -static ITfDocumentMgr *test_CurrentFocus = NULL; -static ITfDocumentMgr *test_PrevFocus = NULL; -static INT test_OnSetFocus = SINK_UNEXPECTED; -static INT test_OnInitDocumentMgr = SINK_UNEXPECTED; -static INT test_OnPushContext = SINK_UNEXPECTED; -static INT test_OnPopContext = SINK_UNEXPECTED; -static INT test_KEV_OnSetFocus = SINK_UNEXPECTED; -static INT test_ACP_AdviseSink = SINK_UNEXPECTED; -static INT test_ACP_GetStatus = SINK_UNEXPECTED; -static INT test_ACP_RequestLock = SINK_UNEXPECTED; -static INT test_ACP_GetEndACP = SINK_UNEXPECTED; -static INT test_ACP_GetSelection = SINK_UNEXPECTED; -static INT test_DoEditSession = SINK_UNEXPECTED; -static INT test_ACP_InsertTextAtSelection = SINK_UNEXPECTED; -static INT test_ACP_SetSelection = SINK_UNEXPECTED; -static INT test_OnEndEdit = SINK_UNEXPECTED; - - -static inline int expected_count(int *sink) -{ - return (*sink & SINK_EXPECTED_COUNT_MASK)>>16; -} - -static inline void _sink_fire_ok(INT *sink, const CHAR* name) -{ - int count; - int todo = *sink & SINK_OPTION_TODO; - int action = *sink & SINK_ACTION_MASK; - - if (winetest_interactive) - winetest_trace("firing %s\n",name); - - switch (action) - { - case SINK_OPTIONAL: - case SINK_EXPECTED: - count = expected_count(sink); - if (count > 1) - { - count --; - *sink = (*sink & ~SINK_EXPECTED_COUNT_MASK) + (count << 16); - return; - } - break; - case SINK_IGNORE: - winetest_trace("Ignoring %s\n",name); - return; - default: - if (todo) - todo_wine winetest_ok(0, "Unexpected %s sink\n",name); - else - winetest_ok(0, "Unexpected %s sink\n",name); - } - *sink = SINK_FIRED; -} - -#define sink_fire_ok(a,b) (winetest_set_location(__FILE__,__LINE__), 0) ? 0 : _sink_fire_ok(a,b) - -static inline void _sink_check_ok(INT *sink, const CHAR* name) -{ - int action = *sink & SINK_ACTION_MASK; - int todo = *sink & SINK_OPTION_TODO; - - switch (action) - { - case SINK_OPTIONAL: - if (winetest_interactive) - winetest_trace("optional sink %s not fired\n",name); - case SINK_FIRED: - break; - case SINK_IGNORE: - return; - default: - if (todo) - todo_wine winetest_ok(0, "%s not fired as expected, in state %x\n",name,*sink); - else - winetest_ok(0, "%s not fired as expected, in state %x\n",name,*sink); - } - *sink = SINK_UNEXPECTED; -} - -#define sink_check_ok(a,b) (winetest_set_location(__FILE__,__LINE__), 0) ? 0 : _sink_check_ok(a,b) - -/********************************************************************** - * ITextStoreACP - **********************************************************************/ -typedef struct tagTextStoreACP -{ - const ITextStoreACPVtbl *TextStoreACPVtbl; - LONG refCount; - -} TextStoreACP; - -static void TextStoreACP_Destructor(TextStoreACP *This) -{ - HeapFree(GetProcessHeap(),0,This); -} - -static HRESULT WINAPI TextStoreACP_QueryInterface(ITextStoreACP *iface, REFIID iid, LPVOID *ppvOut) -{ - TextStoreACP *This = (TextStoreACP *)iface; - *ppvOut = NULL; - - if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITextStoreACP)) - { - *ppvOut = This; - } - - if (*ppvOut) - { - IUnknown_AddRef(iface); - return S_OK; - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI TextStoreACP_AddRef(ITextStoreACP *iface) -{ - TextStoreACP *This = (TextStoreACP *)iface; - return InterlockedIncrement(&This->refCount); -} - -static ULONG WINAPI TextStoreACP_Release(ITextStoreACP *iface) -{ - TextStoreACP *This = (TextStoreACP *)iface; - ULONG ret; - - ret = InterlockedDecrement(&This->refCount); - if (ret == 0) - TextStoreACP_Destructor(This); - return ret; -} - -static HRESULT WINAPI TextStoreACP_AdviseSink(ITextStoreACP *iface, - REFIID riid, IUnknown *punk, DWORD dwMask) -{ - HRESULT hr; - - sink_fire_ok(&test_ACP_AdviseSink,"TextStoreACP_AdviseSink"); - - hr = IUnknown_QueryInterface(punk, &IID_ITextStoreACPSink,(LPVOID*)(&ACPSink)); - ok(SUCCEEDED(hr),"Unable to QueryInterface on sink\n"); - return S_OK; -} - -static HRESULT WINAPI TextStoreACP_UnadviseSink(ITextStoreACP *iface, - IUnknown *punk) -{ - trace("\n"); - return S_OK; -} - -static HRESULT WINAPI TextStoreACP_RequestLock(ITextStoreACP *iface, - DWORD dwLockFlags, HRESULT *phrSession) -{ - sink_fire_ok(&test_ACP_RequestLock,"TextStoreACP_RequestLock"); - *phrSession = ITextStoreACPSink_OnLockGranted(ACPSink, dwLockFlags); - return S_OK; -} -static HRESULT WINAPI TextStoreACP_GetStatus(ITextStoreACP *iface, - TS_STATUS *pdcs) -{ - sink_fire_ok(&test_ACP_GetStatus,"TextStoreACP_GetStatus"); - pdcs->dwDynamicFlags = documentStatus; - return S_OK; -} -static HRESULT WINAPI TextStoreACP_QueryInsert(ITextStoreACP *iface, - LONG acpTestStart, LONG acpTestEnd, ULONG cch, LONG *pacpResultStart, - LONG *pacpResultEnd) -{ - trace("\n"); - return S_OK; -} -static HRESULT WINAPI TextStoreACP_GetSelection(ITextStoreACP *iface, - ULONG ulIndex, ULONG ulCount, TS_SELECTION_ACP *pSelection, ULONG *pcFetched) -{ - sink_fire_ok(&test_ACP_GetSelection,"TextStoreACP_GetSelection"); - - pSelection->acpStart = 10; - pSelection->acpEnd = 20; - pSelection->style.fInterimChar = 0; - pSelection->style.ase = TS_AE_NONE; - *pcFetched = 1; - - return S_OK; -} -static HRESULT WINAPI TextStoreACP_SetSelection(ITextStoreACP *iface, - ULONG ulCount, const TS_SELECTION_ACP *pSelection) -{ - sink_fire_ok(&test_ACP_SetSelection,"TextStoreACP_SetSelection"); - return S_OK; -} -static HRESULT WINAPI TextStoreACP_GetText(ITextStoreACP *iface, - LONG acpStart, LONG acpEnd, WCHAR *pchPlain, ULONG cchPlainReq, - ULONG *pcchPlainRet, TS_RUNINFO *prgRunInfo, ULONG cRunInfoReq, - ULONG *pcRunInfoRet, LONG *pacpNext) -{ - trace("\n"); - return S_OK; -} -static HRESULT WINAPI TextStoreACP_SetText(ITextStoreACP *iface, - DWORD dwFlags, LONG acpStart, LONG acpEnd, const WCHAR *pchText, - ULONG cch, TS_TEXTCHANGE *pChange) -{ - trace("\n"); - return S_OK; -} -static HRESULT WINAPI TextStoreACP_GetFormattedText(ITextStoreACP *iface, - LONG acpStart, LONG acpEnd, IDataObject **ppDataObject) -{ - trace("\n"); - return S_OK; -} -static HRESULT WINAPI TextStoreACP_GetEmbedded(ITextStoreACP *iface, - LONG acpPos, REFGUID rguidService, REFIID riid, IUnknown **ppunk) -{ - trace("\n"); - return S_OK; -} -static HRESULT WINAPI TextStoreACP_QueryInsertEmbedded(ITextStoreACP *iface, - const GUID *pguidService, const FORMATETC *pFormatEtc, BOOL *pfInsertable) -{ - trace("\n"); - return S_OK; -} -static HRESULT WINAPI TextStoreACP_InsertEmbedded(ITextStoreACP *iface, - DWORD dwFlags, LONG acpStart, LONG acpEnd, IDataObject *pDataObject, - TS_TEXTCHANGE *pChange) -{ - trace("\n"); - return S_OK; -} -static HRESULT WINAPI TextStoreACP_InsertTextAtSelection(ITextStoreACP *iface, - DWORD dwFlags, const WCHAR *pchText, ULONG cch, LONG *pacpStart, - LONG *pacpEnd, TS_TEXTCHANGE *pChange) -{ - sink_fire_ok(&test_ACP_InsertTextAtSelection,"TextStoreACP_InsertTextAtSelection"); - return S_OK; -} -static HRESULT WINAPI TextStoreACP_InsertEmbeddedAtSelection(ITextStoreACP *iface, - DWORD dwFlags, IDataObject *pDataObject, LONG *pacpStart, LONG *pacpEnd, - TS_TEXTCHANGE *pChange) -{ - trace("\n"); - return S_OK; -} -static HRESULT WINAPI TextStoreACP_RequestSupportedAttrs(ITextStoreACP *iface, - DWORD dwFlags, ULONG cFilterAttrs, const TS_ATTRID *paFilterAttrs) -{ - trace("\n"); - return S_OK; -} -static HRESULT WINAPI TextStoreACP_RequestAttrsAtPosition(ITextStoreACP *iface, - LONG acpPos, ULONG cFilterAttrs, const TS_ATTRID *paFilterAttrs, - DWORD dwFlags) -{ - trace("\n"); - return S_OK; -} -static HRESULT WINAPI TextStoreACP_RequestAttrsTransitioningAtPosition(ITextStoreACP *iface, - LONG acpPos, ULONG cFilterAttrs, const TS_ATTRID *paFilterAttrs, - DWORD dwFlags) -{ - trace("\n"); - return S_OK; -} -static HRESULT WINAPI TextStoreACP_FindNextAttrTransition(ITextStoreACP *iface, - LONG acpStart, LONG acpHalt, ULONG cFilterAttrs, const TS_ATTRID *paFilterAttrs, - DWORD dwFlags, LONG *pacpNext, BOOL *pfFound, LONG *plFoundOffset) -{ - trace("\n"); - return S_OK; -} -static HRESULT WINAPI TextStoreACP_RetrieveRequestedAttrs(ITextStoreACP *iface, - ULONG ulCount, TS_ATTRVAL *paAttrVals, ULONG *pcFetched) -{ - trace("\n"); - return S_OK; -} -static HRESULT WINAPI TextStoreACP_GetEndACP(ITextStoreACP *iface, - LONG *pacp) -{ - sink_fire_ok(&test_ACP_GetEndACP,"TextStoreACP_GetEndACP"); - return S_OK; -} -static HRESULT WINAPI TextStoreACP_GetActiveView(ITextStoreACP *iface, - TsViewCookie *pvcView) -{ - trace("\n"); - return S_OK; -} -static HRESULT WINAPI TextStoreACP_GetACPFromPoint(ITextStoreACP *iface, - TsViewCookie vcView, const POINT *ptScreen, DWORD dwFlags, - LONG *pacp) -{ - trace("\n"); - return S_OK; -} -static HRESULT WINAPI TextStoreACP_GetTextExt(ITextStoreACP *iface, - TsViewCookie vcView, LONG acpStart, LONG acpEnd, RECT *prc, - BOOL *pfClipped) -{ - trace("\n"); - return S_OK; -} -static HRESULT WINAPI TextStoreACP_GetScreenExt(ITextStoreACP *iface, - TsViewCookie vcView, RECT *prc) -{ - trace("\n"); - return S_OK; -} -static HRESULT WINAPI TextStoreACP_GetWnd(ITextStoreACP *iface, - TsViewCookie vcView, HWND *phwnd) -{ - trace("\n"); - return S_OK; -} - -static const ITextStoreACPVtbl TextStoreACP_TextStoreACPVtbl = -{ - TextStoreACP_QueryInterface, - TextStoreACP_AddRef, - TextStoreACP_Release, - - TextStoreACP_AdviseSink, - TextStoreACP_UnadviseSink, - TextStoreACP_RequestLock, - TextStoreACP_GetStatus, - TextStoreACP_QueryInsert, - TextStoreACP_GetSelection, - TextStoreACP_SetSelection, - TextStoreACP_GetText, - TextStoreACP_SetText, - TextStoreACP_GetFormattedText, - TextStoreACP_GetEmbedded, - TextStoreACP_QueryInsertEmbedded, - TextStoreACP_InsertEmbedded, - TextStoreACP_InsertTextAtSelection, - TextStoreACP_InsertEmbeddedAtSelection, - TextStoreACP_RequestSupportedAttrs, - TextStoreACP_RequestAttrsAtPosition, - TextStoreACP_RequestAttrsTransitioningAtPosition, - TextStoreACP_FindNextAttrTransition, - TextStoreACP_RetrieveRequestedAttrs, - TextStoreACP_GetEndACP, - TextStoreACP_GetActiveView, - TextStoreACP_GetACPFromPoint, - TextStoreACP_GetTextExt, - TextStoreACP_GetScreenExt, - TextStoreACP_GetWnd -}; - -static HRESULT TextStoreACP_Constructor(IUnknown **ppOut) -{ - TextStoreACP *This; - - This = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(TextStoreACP)); - if (This == NULL) - return E_OUTOFMEMORY; - - This->TextStoreACPVtbl = &TextStoreACP_TextStoreACPVtbl; - This->refCount = 1; - - *ppOut = (IUnknown *)This; - return S_OK; -} - -/********************************************************************** - * ITfThreadMgrEventSink - **********************************************************************/ -typedef struct tagThreadMgrEventSink -{ - const ITfThreadMgrEventSinkVtbl *ThreadMgrEventSinkVtbl; - LONG refCount; -} ThreadMgrEventSink; - -static void ThreadMgrEventSink_Destructor(ThreadMgrEventSink *This) -{ - HeapFree(GetProcessHeap(),0,This); -} - -static HRESULT WINAPI ThreadMgrEventSink_QueryInterface(ITfThreadMgrEventSink *iface, REFIID iid, LPVOID *ppvOut) -{ - ThreadMgrEventSink *This = (ThreadMgrEventSink *)iface; - *ppvOut = NULL; - - if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfThreadMgrEventSink)) - { - *ppvOut = This; - } - - if (*ppvOut) - { - IUnknown_AddRef(iface); - return S_OK; - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI ThreadMgrEventSink_AddRef(ITfThreadMgrEventSink *iface) -{ - ThreadMgrEventSink *This = (ThreadMgrEventSink *)iface; - ok (tmSinkRefCount == This->refCount,"ThreadMgrEventSink refcount off %i vs %i\n",This->refCount,tmSinkRefCount); - return InterlockedIncrement(&This->refCount); -} - -static ULONG WINAPI ThreadMgrEventSink_Release(ITfThreadMgrEventSink *iface) -{ - ThreadMgrEventSink *This = (ThreadMgrEventSink *)iface; - ULONG ret; - - ok (tmSinkRefCount == This->refCount,"ThreadMgrEventSink refcount off %i vs %i\n",This->refCount,tmSinkRefCount); - ret = InterlockedDecrement(&This->refCount); - if (ret == 0) - ThreadMgrEventSink_Destructor(This); - return ret; -} - -static HRESULT WINAPI ThreadMgrEventSink_OnInitDocumentMgr(ITfThreadMgrEventSink *iface, -ITfDocumentMgr *pdim) -{ - sink_fire_ok(&test_OnInitDocumentMgr,"ThreadMgrEventSink_OnInitDocumentMgr"); - return S_OK; -} - -static HRESULT WINAPI ThreadMgrEventSink_OnUninitDocumentMgr(ITfThreadMgrEventSink *iface, -ITfDocumentMgr *pdim) -{ - trace("\n"); - return S_OK; -} - -static HRESULT WINAPI ThreadMgrEventSink_OnSetFocus(ITfThreadMgrEventSink *iface, -ITfDocumentMgr *pdimFocus, ITfDocumentMgr *pdimPrevFocus) -{ - sink_fire_ok(&test_OnSetFocus,"ThreadMgrEventSink_OnSetFocus"); - if (test_CurrentFocus != FOCUS_IGNORE) - ok(pdimFocus == test_CurrentFocus,"Sink reports wrong focus\n"); - if (test_PrevFocus != FOCUS_IGNORE) - ok(pdimPrevFocus == test_PrevFocus,"Sink reports wrong previous focus\n"); - return S_OK; -} - -static HRESULT WINAPI ThreadMgrEventSink_OnPushContext(ITfThreadMgrEventSink *iface, -ITfContext *pic) -{ - HRESULT hr; - ITfDocumentMgr *docmgr; - ITfContext *test; - - hr = ITfContext_GetDocumentMgr(pic,&docmgr); - ok(SUCCEEDED(hr),"GetDocumenMgr failed\n"); - test = (ITfContext*)0xdeadbeef; - ITfDocumentMgr_Release(docmgr); - hr = ITfDocumentMgr_GetTop(docmgr,&test); - ok(SUCCEEDED(hr),"GetTop failed\n"); - ok(test == pic, "Wrong context is on top\n"); - if (test) - ITfContext_Release(test); - - sink_fire_ok(&test_OnPushContext,"ThreadMgrEventSink_OnPushContext"); - return S_OK; -} - -static HRESULT WINAPI ThreadMgrEventSink_OnPopContext(ITfThreadMgrEventSink *iface, -ITfContext *pic) -{ - HRESULT hr; - ITfDocumentMgr *docmgr; - ITfContext *test; - - hr = ITfContext_GetDocumentMgr(pic,&docmgr); - ok(SUCCEEDED(hr),"GetDocumenMgr failed\n"); - ITfDocumentMgr_Release(docmgr); - test = (ITfContext*)0xdeadbeef; - hr = ITfDocumentMgr_GetTop(docmgr,&test); - ok(SUCCEEDED(hr),"GetTop failed\n"); - ok(test == pic, "Wrong context is on top\n"); - if (test) - ITfContext_Release(test); - - sink_fire_ok(&test_OnPopContext,"ThreadMgrEventSink_OnPopContext"); - return S_OK; -} - -static const ITfThreadMgrEventSinkVtbl ThreadMgrEventSink_ThreadMgrEventSinkVtbl = -{ - ThreadMgrEventSink_QueryInterface, - ThreadMgrEventSink_AddRef, - ThreadMgrEventSink_Release, - - ThreadMgrEventSink_OnInitDocumentMgr, - ThreadMgrEventSink_OnUninitDocumentMgr, - ThreadMgrEventSink_OnSetFocus, - ThreadMgrEventSink_OnPushContext, - ThreadMgrEventSink_OnPopContext -}; - -static HRESULT ThreadMgrEventSink_Constructor(IUnknown **ppOut) -{ - ThreadMgrEventSink *This; - - This = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(ThreadMgrEventSink)); - if (This == NULL) - return E_OUTOFMEMORY; - - This->ThreadMgrEventSinkVtbl = &ThreadMgrEventSink_ThreadMgrEventSinkVtbl; - This->refCount = 1; - - *ppOut = (IUnknown *)This; - return S_OK; -} - - -/******************************************************************************************** - * Stub text service for testing - ********************************************************************************************/ - -static LONG TS_refCount; -static IClassFactory *cf; -static DWORD regid; - -typedef HRESULT (*LPFNCONSTRUCTOR)(IUnknown *pUnkOuter, IUnknown **ppvOut); - -typedef struct tagClassFactory -{ - const IClassFactoryVtbl *vtbl; - LONG ref; - LPFNCONSTRUCTOR ctor; -} ClassFactory; - -typedef struct tagTextService -{ - const ITfTextInputProcessorVtbl *TextInputProcessorVtbl; - LONG refCount; -} TextService; - -static void ClassFactory_Destructor(ClassFactory *This) -{ - HeapFree(GetProcessHeap(),0,This); - TS_refCount--; -} - -static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, LPVOID *ppvOut) -{ - *ppvOut = NULL; - if (IsEqualIID(riid, &IID_IClassFactory) || IsEqualIID(riid, &IID_IUnknown)) - { - IClassFactory_AddRef(iface); - *ppvOut = iface; - return S_OK; - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface) -{ - ClassFactory *This = (ClassFactory *)iface; - return InterlockedIncrement(&This->ref); -} - -static ULONG WINAPI ClassFactory_Release(IClassFactory *iface) -{ - ClassFactory *This = (ClassFactory *)iface; - ULONG ret = InterlockedDecrement(&This->ref); - - if (ret == 0) - ClassFactory_Destructor(This); - return ret; -} - -static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown *punkOuter, REFIID iid, LPVOID *ppvOut) -{ - ClassFactory *This = (ClassFactory *)iface; - HRESULT ret; - IUnknown *obj; - - ret = This->ctor(punkOuter, &obj); - if (FAILED(ret)) - return ret; - ret = IUnknown_QueryInterface(obj, iid, ppvOut); - IUnknown_Release(obj); - return ret; -} - -static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock) -{ - if(fLock) - InterlockedIncrement(&TS_refCount); - else - InterlockedDecrement(&TS_refCount); - - return S_OK; -} - -static const IClassFactoryVtbl ClassFactoryVtbl = { - /* IUnknown */ - ClassFactory_QueryInterface, - ClassFactory_AddRef, - ClassFactory_Release, - - /* IClassFactory*/ - ClassFactory_CreateInstance, - ClassFactory_LockServer -}; - -static HRESULT ClassFactory_Constructor(LPFNCONSTRUCTOR ctor, LPVOID *ppvOut) -{ - ClassFactory *This = HeapAlloc(GetProcessHeap(),0,sizeof(ClassFactory)); - This->vtbl = &ClassFactoryVtbl; - This->ref = 1; - This->ctor = ctor; - *ppvOut = (LPVOID)This; - TS_refCount++; - return S_OK; -} - -static void TextService_Destructor(TextService *This) -{ - HeapFree(GetProcessHeap(),0,This); -} - -static HRESULT WINAPI TextService_QueryInterface(ITfTextInputProcessor *iface, REFIID iid, LPVOID *ppvOut) -{ - TextService *This = (TextService *)iface; - *ppvOut = NULL; - - if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfTextInputProcessor)) - { - *ppvOut = This; - } - - if (*ppvOut) - { - IUnknown_AddRef(iface); - return S_OK; - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI TextService_AddRef(ITfTextInputProcessor *iface) -{ - TextService *This = (TextService *)iface; - return InterlockedIncrement(&This->refCount); -} - -static ULONG WINAPI TextService_Release(ITfTextInputProcessor *iface) -{ - TextService *This = (TextService *)iface; - ULONG ret; - - ret = InterlockedDecrement(&This->refCount); - if (ret == 0) - TextService_Destructor(This); - return ret; -} - -static HRESULT WINAPI TextService_Activate(ITfTextInputProcessor *iface, - ITfThreadMgr *ptim, TfClientId id) -{ - trace("TextService_Activate\n"); - ok(test_ShouldActivate,"Activation came unexpectedly\n"); - tid = id; - return S_OK; -} - -static HRESULT WINAPI TextService_Deactivate(ITfTextInputProcessor *iface) -{ - trace("TextService_Deactivate\n"); - ok(test_ShouldDeactivate,"Deactivation came unexpectedly\n"); - return S_OK; -} - -static const ITfTextInputProcessorVtbl TextService_TextInputProcessorVtbl= -{ - TextService_QueryInterface, - TextService_AddRef, - TextService_Release, - - TextService_Activate, - TextService_Deactivate -}; - -static HRESULT TextService_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut) -{ - TextService *This; - if (pUnkOuter) - return CLASS_E_NOAGGREGATION; - - This = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(TextService)); - if (This == NULL) - return E_OUTOFMEMORY; - - This->TextInputProcessorVtbl= &TextService_TextInputProcessorVtbl; - This->refCount = 1; - - *ppOut = (IUnknown *)This; - return S_OK; -} - -static HRESULT RegisterTextService(REFCLSID rclsid) -{ - ClassFactory_Constructor( TextService_Constructor ,(LPVOID*)&cf); - return CoRegisterClassObject(rclsid, (IUnknown*) cf, CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, ®id); -} - -static HRESULT UnregisterTextService(void) -{ - return CoRevokeClassObject(regid); -} - -/* - * The tests - */ - -DEFINE_GUID(CLSID_FakeService, 0xEDE1A7AD,0x66DE,0x47E0,0xB6,0x20,0x3E,0x92,0xF8,0x24,0x6B,0xF3); -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(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 (GUID_TFCAT_DISPLAYATTRIBUTEPROVIDER, 0x046B8C80,0x1647,0x40F7,0x9B,0x21,0xB9,0x3B,0x81,0xAA,0xBC,0x1B); -DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); -DEFINE_GUID(CLSID_TF_ThreadMgr, 0x529a9e6b,0x6587,0x4f23,0xab,0x9e,0x9c,0x7d,0x68,0x3e,0x3c,0x50); -DEFINE_GUID(CLSID_PreservedKey, 0xA0ED8E55,0xCD3B,0x4274,0xB2,0x95,0xF6,0xC9,0xBA,0x2B,0x84,0x72); -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); - -static HRESULT initialize(void) -{ - HRESULT hr; - CoInitialize(NULL); - hr = CoCreateInstance (&CLSID_TF_InputProcessorProfiles, NULL, - CLSCTX_INPROC_SERVER, &IID_ITfInputProcessorProfiles, (void**)&g_ipp); - if (SUCCEEDED(hr)) - hr = CoCreateInstance (&CLSID_TF_CategoryMgr, NULL, - CLSCTX_INPROC_SERVER, &IID_ITfCategoryMgr, (void**)&g_cm); - if (SUCCEEDED(hr)) - hr = CoCreateInstance (&CLSID_TF_ThreadMgr, NULL, - CLSCTX_INPROC_SERVER, &IID_ITfThreadMgr, (void**)&g_tm); - return hr; -} - -static void cleanup(void) -{ - if (g_ipp) - ITfInputProcessorProfiles_Release(g_ipp); - if (g_cm) - ITfCategoryMgr_Release(g_cm); - if (g_tm) - ITfThreadMgr_Release(g_tm); - CoUninitialize(); -} - -static void test_Register(void) -{ - HRESULT hr; - - static const WCHAR szDesc[] = {'F','a','k','e',' ','W','i','n','e',' ','S','e','r','v','i','c','e',0}; - static const WCHAR szFile[] = {'F','a','k','e',' ','W','i','n','e',' ','S','e','r','v','i','c','e',' ','F','i','l','e',0}; - - hr = ITfInputProcessorProfiles_GetCurrentLanguage(g_ipp,&gLangid); - ok(SUCCEEDED(hr),"Unable to get current language id\n"); - trace("Current Language %x\n",gLangid); - - hr = RegisterTextService(&CLSID_FakeService); - ok(SUCCEEDED(hr),"Unable to register COM for TextService\n"); - hr = ITfInputProcessorProfiles_Register(g_ipp, &CLSID_FakeService); - ok(SUCCEEDED(hr),"Unable to register text service(%x)\n",hr); - hr = ITfInputProcessorProfiles_AddLanguageProfile(g_ipp, &CLSID_FakeService, gLangid, &CLSID_FakeService, szDesc, sizeof(szDesc)/sizeof(WCHAR), szFile, sizeof(szFile)/sizeof(WCHAR), 1); - ok(SUCCEEDED(hr),"Unable to add Language Profile (%x)\n",hr); -} - -static void test_Unregister(void) -{ - HRESULT hr; - hr = ITfInputProcessorProfiles_Unregister(g_ipp, &CLSID_FakeService); - ok(SUCCEEDED(hr),"Unable to unregister text service(%x)\n",hr); - UnregisterTextService(); -} - -static void test_EnumInputProcessorInfo(void) -{ - IEnumGUID *ppEnum; - BOOL found = FALSE; - - if (SUCCEEDED(ITfInputProcessorProfiles_EnumInputProcessorInfo(g_ipp, &ppEnum))) - { - ULONG fetched; - GUID g; - while (IEnumGUID_Next(ppEnum, 1, &g, &fetched) == S_OK) - { - if(IsEqualGUID(&g,&CLSID_FakeService)) - found = TRUE; - } - } - ok(found,"Did not find registered text service\n"); -} - -static void test_EnumLanguageProfiles(void) -{ - BOOL found = FALSE; - IEnumTfLanguageProfiles *ppEnum; - if (SUCCEEDED(ITfInputProcessorProfiles_EnumLanguageProfiles(g_ipp,gLangid,&ppEnum))) - { - TF_LANGUAGEPROFILE profile; - while (IEnumTfLanguageProfiles_Next(ppEnum,1,&profile,NULL)==S_OK) - { - if (IsEqualGUID(&profile.clsid,&CLSID_FakeService)) - { - found = TRUE; - ok(profile.langid == gLangid, "LangId Incorrect\n"); - ok(IsEqualGUID(&profile.catid,&GUID_TFCAT_TIP_KEYBOARD), "CatId Incorrect\n"); - ok(IsEqualGUID(&profile.guidProfile,&CLSID_FakeService), "guidProfile Incorrect\n"); - } - } - } - ok(found,"Registered text service not found\n"); -} - -static void test_RegisterCategory(void) -{ - HRESULT hr; - hr = ITfCategoryMgr_RegisterCategory(g_cm, &CLSID_FakeService, &GUID_TFCAT_TIP_KEYBOARD, &CLSID_FakeService); - ok(SUCCEEDED(hr),"ITfCategoryMgr_RegisterCategory failed\n"); - hr = ITfCategoryMgr_RegisterCategory(g_cm, &CLSID_FakeService, &GUID_TFCAT_DISPLAYATTRIBUTEPROVIDER, &CLSID_FakeService); - ok(SUCCEEDED(hr),"ITfCategoryMgr_RegisterCategory failed\n"); -} - -static void test_UnregisterCategory(void) -{ - HRESULT hr; - hr = ITfCategoryMgr_UnregisterCategory(g_cm, &CLSID_FakeService, &GUID_TFCAT_TIP_KEYBOARD, &CLSID_FakeService); - ok(SUCCEEDED(hr),"ITfCategoryMgr_UnregisterCategory failed\n"); - hr = ITfCategoryMgr_UnregisterCategory(g_cm, &CLSID_FakeService, &GUID_TFCAT_DISPLAYATTRIBUTEPROVIDER, &CLSID_FakeService); - ok(SUCCEEDED(hr),"ITfCategoryMgr_UnregisterCategory failed\n"); -} - -static void test_FindClosestCategory(void) -{ - GUID output; - HRESULT hr; - const GUID *list[3] = {&GUID_TFCAT_TIP_SPEECH, &GUID_TFCAT_TIP_KEYBOARD, &GUID_TFCAT_TIP_HANDWRITING}; - - hr = ITfCategoryMgr_FindClosestCategory(g_cm, &CLSID_FakeService, &output, NULL, 0); - ok(SUCCEEDED(hr),"ITfCategoryMgr_FindClosestCategory failed (%x)\n",hr); - ok(IsEqualGUID(&output,&GUID_TFCAT_DISPLAYATTRIBUTEPROVIDER),"Wrong GUID\n"); - - hr = ITfCategoryMgr_FindClosestCategory(g_cm, &CLSID_FakeService, &output, list, 1); - ok(SUCCEEDED(hr),"ITfCategoryMgr_FindClosestCategory failed (%x)\n",hr); - ok(IsEqualGUID(&output,&GUID_NULL),"Wrong GUID\n"); - - hr = ITfCategoryMgr_FindClosestCategory(g_cm, &CLSID_FakeService, &output, list, 3); - ok(SUCCEEDED(hr),"ITfCategoryMgr_FindClosestCategory failed (%x)\n",hr); - ok(IsEqualGUID(&output,&GUID_TFCAT_TIP_KEYBOARD),"Wrong GUID\n"); -} - -static void test_Enable(void) -{ - HRESULT hr; - BOOL enabled = FALSE; - - hr = ITfInputProcessorProfiles_EnableLanguageProfile(g_ipp,&CLSID_FakeService, gLangid, &CLSID_FakeService, TRUE); - ok(SUCCEEDED(hr),"Failed to enable text service\n"); - hr = ITfInputProcessorProfiles_IsEnabledLanguageProfile(g_ipp,&CLSID_FakeService, gLangid, &CLSID_FakeService, &enabled); - ok(SUCCEEDED(hr),"Failed to get enabled state\n"); - ok(enabled == TRUE,"enabled state incorrect\n"); -} - -static void test_Disable(void) -{ - HRESULT hr; - - trace("Disabling\n"); - hr = ITfInputProcessorProfiles_EnableLanguageProfile(g_ipp,&CLSID_FakeService, gLangid, &CLSID_FakeService, FALSE); - ok(SUCCEEDED(hr),"Failed to disable text service\n"); -} - -static void test_ThreadMgrAdviseSinks(void) -{ - ITfSource *source = NULL; - HRESULT hr; - IUnknown *sink; - - hr = ITfThreadMgr_QueryInterface(g_tm, &IID_ITfSource, (LPVOID*)&source); - ok(SUCCEEDED(hr),"Failed to get IID_ITfSource for ThreadMgr\n"); - if (!source) - return; - - hr = ThreadMgrEventSink_Constructor(&sink); - ok(hr == S_OK, "got %08x\n", hr); - if(FAILED(hr)) return; - - tmSinkRefCount = 1; - tmSinkCookie = 0; - hr = ITfSource_AdviseSink(source,&IID_ITfThreadMgrEventSink, sink, &tmSinkCookie); - ok(SUCCEEDED(hr),"Failed to Advise Sink\n"); - ok(tmSinkCookie!=0,"Failed to get sink cookie\n"); - - /* Advising the sink adds a ref, Relesing here lets the object be deleted - when unadvised */ - tmSinkRefCount = 2; - IUnknown_Release(sink); - ITfSource_Release(source); -} - -static void test_ThreadMgrUnadviseSinks(void) -{ - ITfSource *source = NULL; - HRESULT hr; - - hr = ITfThreadMgr_QueryInterface(g_tm, &IID_ITfSource, (LPVOID*)&source); - ok(SUCCEEDED(hr),"Failed to get IID_ITfSource for ThreadMgr\n"); - if (!source) - return; - - tmSinkRefCount = 1; - hr = ITfSource_UnadviseSink(source, tmSinkCookie); - ok(SUCCEEDED(hr),"Failed to unadvise Sink\n"); - ITfSource_Release(source); -} - -/********************************************************************** - * ITfKeyEventSink - **********************************************************************/ -typedef struct tagKeyEventSink -{ - const ITfKeyEventSinkVtbl *KeyEventSinkVtbl; - LONG refCount; -} KeyEventSink; - -static void KeyEventSink_Destructor(KeyEventSink *This) -{ - HeapFree(GetProcessHeap(),0,This); -} - -static HRESULT WINAPI KeyEventSink_QueryInterface(ITfKeyEventSink *iface, REFIID iid, LPVOID *ppvOut) -{ - KeyEventSink *This = (KeyEventSink *)iface; - *ppvOut = NULL; - - if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfKeyEventSink)) - { - *ppvOut = This; - } - - if (*ppvOut) - { - IUnknown_AddRef(iface); - return S_OK; - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI KeyEventSink_AddRef(ITfKeyEventSink *iface) -{ - KeyEventSink *This = (KeyEventSink *)iface; - return InterlockedIncrement(&This->refCount); -} - -static ULONG WINAPI KeyEventSink_Release(ITfKeyEventSink *iface) -{ - KeyEventSink *This = (KeyEventSink *)iface; - ULONG ret; - - ret = InterlockedDecrement(&This->refCount); - if (ret == 0) - KeyEventSink_Destructor(This); - return ret; -} - -static HRESULT WINAPI KeyEventSink_OnSetFocus(ITfKeyEventSink *iface, - BOOL fForeground) -{ - sink_fire_ok(&test_KEV_OnSetFocus,"KeyEventSink_OnSetFocus"); - return S_OK; -} - -static HRESULT WINAPI KeyEventSink_OnTestKeyDown(ITfKeyEventSink *iface, - ITfContext *pic, WPARAM wParam, LPARAM lParam, BOOL *pfEaten) -{ - trace("\n"); - return S_OK; -} - -static HRESULT WINAPI KeyEventSink_OnTestKeyUp(ITfKeyEventSink *iface, - ITfContext *pic, WPARAM wParam, LPARAM lParam, BOOL *pfEaten) -{ - trace("\n"); - return S_OK; -} - -static HRESULT WINAPI KeyEventSink_OnKeyDown(ITfKeyEventSink *iface, - ITfContext *pic, WPARAM wParam, LPARAM lParam, BOOL *pfEaten) -{ - trace("\n"); - return S_OK; -} - -static HRESULT WINAPI KeyEventSink_OnKeyUp(ITfKeyEventSink *iface, - ITfContext *pic, WPARAM wParam, LPARAM lParam, BOOL *pfEaten) -{ - trace("\n"); - return S_OK; -} - -static HRESULT WINAPI KeyEventSink_OnPreservedKey(ITfKeyEventSink *iface, - ITfContext *pic, REFGUID rguid, BOOL *pfEaten) -{ - trace("\n"); - return S_OK; -} - -static const ITfKeyEventSinkVtbl KeyEventSink_KeyEventSinkVtbl = -{ - KeyEventSink_QueryInterface, - KeyEventSink_AddRef, - KeyEventSink_Release, - - KeyEventSink_OnSetFocus, - KeyEventSink_OnTestKeyDown, - KeyEventSink_OnTestKeyUp, - KeyEventSink_OnKeyDown, - KeyEventSink_OnKeyUp, - KeyEventSink_OnPreservedKey -}; - -static HRESULT KeyEventSink_Constructor(ITfKeyEventSink **ppOut) -{ - KeyEventSink *This; - - This = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(KeyEventSink)); - if (This == NULL) - return E_OUTOFMEMORY; - - This->KeyEventSinkVtbl = &KeyEventSink_KeyEventSinkVtbl; - This->refCount = 1; - - *ppOut = (ITfKeyEventSink*)This; - return S_OK; -} - - -static void test_KeystrokeMgr(void) -{ - ITfKeystrokeMgr *keymgr= NULL; - HRESULT hr; - TF_PRESERVEDKEY tfpk; - BOOL preserved; - ITfKeyEventSink *sink = NULL; - - KeyEventSink_Constructor(&sink); - - hr = ITfThreadMgr_QueryInterface(g_tm, &IID_ITfKeystrokeMgr, (LPVOID*)&keymgr); - ok(SUCCEEDED(hr),"Failed to get IID_ITfKeystrokeMgr for ThreadMgr\n"); - - tfpk.uVKey = 'A'; - tfpk.uModifiers = TF_MOD_SHIFT; - - test_KEV_OnSetFocus = SINK_EXPECTED; - hr = ITfKeystrokeMgr_AdviseKeyEventSink(keymgr,tid,sink,TRUE); - ok(SUCCEEDED(hr),"ITfKeystrokeMgr_AdviseKeyEventSink failed\n"); - sink_check_ok(&test_KEV_OnSetFocus,"KeyEventSink_OnSetFocus"); - hr = ITfKeystrokeMgr_AdviseKeyEventSink(keymgr,tid,sink,TRUE); - ok(hr == CONNECT_E_ADVISELIMIT,"Wrong return, expected CONNECT_E_ADVISELIMIT\n"); - hr = ITfKeystrokeMgr_AdviseKeyEventSink(keymgr,cid,sink,TRUE); - ok(hr == E_INVALIDARG,"Wrong return, expected E_INVALIDARG\n"); - - hr =ITfKeystrokeMgr_PreserveKey(keymgr, 0, &CLSID_PreservedKey, &tfpk, NULL, 0); - ok(hr==E_INVALIDARG,"ITfKeystrokeMgr_PreserveKey inproperly succeeded\n"); - - hr =ITfKeystrokeMgr_PreserveKey(keymgr, tid, &CLSID_PreservedKey, &tfpk, NULL, 0); - ok(SUCCEEDED(hr),"ITfKeystrokeMgr_PreserveKey failed\n"); - - hr =ITfKeystrokeMgr_PreserveKey(keymgr, tid, &CLSID_PreservedKey, &tfpk, NULL, 0); - ok(hr == TF_E_ALREADY_EXISTS,"ITfKeystrokeMgr_PreserveKey inproperly succeeded\n"); - - preserved = FALSE; - hr = ITfKeystrokeMgr_IsPreservedKey(keymgr, &CLSID_PreservedKey, &tfpk, &preserved); - ok(hr == S_OK, "ITfKeystrokeMgr_IsPreservedKey failed\n"); - if (hr == S_OK) ok(preserved == TRUE,"misreporting preserved key\n"); - - hr = ITfKeystrokeMgr_UnpreserveKey(keymgr, &CLSID_PreservedKey,&tfpk); - ok(SUCCEEDED(hr),"ITfKeystrokeMgr_UnpreserveKey failed\n"); - - hr = ITfKeystrokeMgr_IsPreservedKey(keymgr, &CLSID_PreservedKey, &tfpk, &preserved); - ok(hr == S_FALSE, "ITfKeystrokeMgr_IsPreservedKey failed\n"); - if (hr == S_FALSE) ok(preserved == FALSE,"misreporting preserved key\n"); - - hr = ITfKeystrokeMgr_UnpreserveKey(keymgr, &CLSID_PreservedKey,&tfpk); - ok(hr==CONNECT_E_NOCONNECTION,"ITfKeystrokeMgr_UnpreserveKey inproperly succeeded\n"); - - hr = ITfKeystrokeMgr_UnadviseKeyEventSink(keymgr,tid); - ok(SUCCEEDED(hr),"ITfKeystrokeMgr_UnadviseKeyEventSink failed\n"); - - ITfKeystrokeMgr_Release(keymgr); - ITfKeyEventSink_Release(sink); -} - -static void test_Activate(void) -{ - HRESULT hr; - - hr = ITfInputProcessorProfiles_ActivateLanguageProfile(g_ipp,&CLSID_FakeService,gLangid,&CLSID_FakeService); - ok(SUCCEEDED(hr),"Failed to Activate text service\n"); -} - - -static void test_EnumContexts(ITfDocumentMgr *dm, ITfContext *search) -{ - HRESULT hr; - IEnumTfContexts* pEnum; - BOOL found = FALSE; - - hr = ITfDocumentMgr_EnumContexts(dm,&pEnum); - ok(SUCCEEDED(hr),"EnumContexts failed\n"); - if (SUCCEEDED(hr)) - { - ULONG fetched; - ITfContext *cxt; - while (IEnumTfContexts_Next(pEnum, 1, &cxt, &fetched) == S_OK) - { - if (!search) - found = TRUE; - else if (search == cxt) - found = TRUE; - ITfContext_Release(cxt); - } - IEnumTfContexts_Release(pEnum); - } - if (search) - ok(found,"Did not find proper ITfContext\n"); - else - ok(!found,"Found an ITfContext we should should not have\n"); -} - -static void test_EnumDocumentMgr(ITfThreadMgr *tm, ITfDocumentMgr *search, ITfDocumentMgr *absent) -{ - HRESULT hr; - IEnumTfDocumentMgrs* pEnum; - BOOL found = FALSE; - BOOL notfound = TRUE; - - hr = ITfThreadMgr_EnumDocumentMgrs(tm,&pEnum); - ok(SUCCEEDED(hr),"EnumDocumentMgrs failed\n"); - if (SUCCEEDED(hr)) - { - ULONG fetched; - ITfDocumentMgr *dm; - while (IEnumTfDocumentMgrs_Next(pEnum, 1, &dm, &fetched) == S_OK) - { - if (!search) - found = TRUE; - else if (search == dm) - found = TRUE; - if (absent && dm == absent) - notfound = FALSE; - ITfDocumentMgr_Release(dm); - } - IEnumTfDocumentMgrs_Release(pEnum); - } - if (search) - ok(found,"Did not find proper ITfDocumentMgr\n"); - else - ok(!found,"Found an ITfDocumentMgr we should should not have\n"); - if (absent) - ok(notfound,"Found an ITfDocumentMgr we believe should be absent\n"); -} - -static inline int check_context_refcount(ITfContext *iface) -{ - IUnknown_AddRef(iface); - return IUnknown_Release(iface); -} - - -/********************************************************************** - * ITfTextEditSink - **********************************************************************/ -typedef struct tagTextEditSink -{ - const ITfTextEditSinkVtbl *TextEditSinkVtbl; - LONG refCount; -} TextEditSink; - -static void TextEditSink_Destructor(TextEditSink *This) -{ - HeapFree(GetProcessHeap(),0,This); -} - -static HRESULT WINAPI TextEditSink_QueryInterface(ITfTextEditSink *iface, REFIID iid, LPVOID *ppvOut) -{ - TextEditSink *This = (TextEditSink *)iface; - *ppvOut = NULL; - - if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfTextEditSink)) - { - *ppvOut = This; - } - - if (*ppvOut) - { - IUnknown_AddRef(iface); - return S_OK; - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI TextEditSink_AddRef(ITfTextEditSink *iface) -{ - TextEditSink *This = (TextEditSink *)iface; - return InterlockedIncrement(&This->refCount); -} - -static ULONG WINAPI TextEditSink_Release(ITfTextEditSink *iface) -{ - TextEditSink *This = (TextEditSink *)iface; - ULONG ret; - - ret = InterlockedDecrement(&This->refCount); - if (ret == 0) - TextEditSink_Destructor(This); - return ret; -} - -static HRESULT WINAPI TextEditSink_OnEndEdit(ITfTextEditSink *iface, - ITfContext *pic, TfEditCookie ecReadOnly, ITfEditRecord *pEditRecord) -{ - sink_fire_ok(&test_OnEndEdit,"TextEditSink_OnEndEdit"); - return S_OK; -} - -static const ITfTextEditSinkVtbl TextEditSink_TextEditSinkVtbl = -{ - TextEditSink_QueryInterface, - TextEditSink_AddRef, - TextEditSink_Release, - - TextEditSink_OnEndEdit -}; - -static HRESULT TextEditSink_Constructor(ITfTextEditSink **ppOut) -{ - TextEditSink *This; - - *ppOut = NULL; - This = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(TextEditSink)); - if (This == NULL) - return E_OUTOFMEMORY; - - This->TextEditSinkVtbl = &TextEditSink_TextEditSinkVtbl; - This->refCount = 1; - - *ppOut = (ITfTextEditSink*)This; - return S_OK; -} - -static void test_startSession(void) -{ - HRESULT hr; - DWORD cnt; - DWORD editCookie; - ITfDocumentMgr *dmtest; - ITfContext *cxt,*cxt2,*cxt3,*cxtTest; - ITextStoreACP *ts; - TfClientId cid2 = 0; - - hr = ITfThreadMgr_Deactivate(g_tm); - ok(hr == E_UNEXPECTED,"Deactivate should have failed with E_UNEXPECTED\n"); - - test_ShouldActivate = TRUE; - hr = ITfThreadMgr_Activate(g_tm,&cid); - ok(SUCCEEDED(hr),"Failed to Activate\n"); - ok(cid != tid,"TextService id mistakenly matches Client id\n"); - - test_ShouldActivate = FALSE; - hr = ITfThreadMgr_Activate(g_tm,&cid2); - ok(SUCCEEDED(hr),"Failed to Activate\n"); - ok (cid == cid2, "Second activate client ID does not match\n"); - - hr = ITfThreadMgr_Deactivate(g_tm); - ok(SUCCEEDED(hr),"Failed to Deactivate\n"); - - test_EnumDocumentMgr(g_tm,NULL,NULL); - - hr = ITfThreadMgr_CreateDocumentMgr(g_tm,&g_dm); - ok(SUCCEEDED(hr),"CreateDocumentMgr failed\n"); - - test_EnumDocumentMgr(g_tm,g_dm,NULL); - - hr = ITfThreadMgr_CreateDocumentMgr(g_tm,&dmtest); - ok(SUCCEEDED(hr),"CreateDocumentMgr failed\n"); - - test_EnumDocumentMgr(g_tm,dmtest,NULL); - - ITfDocumentMgr_Release(dmtest); - test_EnumDocumentMgr(g_tm,g_dm,dmtest); - - hr = ITfThreadMgr_GetFocus(g_tm,&dmtest); - ok(SUCCEEDED(hr),"GetFocus Failed\n"); - ok(dmtest == NULL,"Initial focus not null\n"); - - test_CurrentFocus = g_dm; - test_PrevFocus = NULL; - test_OnSetFocus = SINK_EXPECTED; - hr = ITfThreadMgr_SetFocus(g_tm,g_dm); - ok(SUCCEEDED(hr),"SetFocus Failed\n"); - sink_check_ok(&test_OnSetFocus,"OnSetFocus"); - - hr = ITfThreadMgr_GetFocus(g_tm,&dmtest); - ok(SUCCEEDED(hr),"GetFocus Failed\n"); - ok(g_dm == dmtest,"Expected DocumentMgr not focused\n"); - - cnt = ITfDocumentMgr_Release(g_dm); - ok(cnt == 2,"DocumentMgr refcount not expected (2 vs %i)\n",cnt); - - hr = ITfThreadMgr_GetFocus(g_tm,&dmtest); - ok(SUCCEEDED(hr),"GetFocus Failed\n"); - ok(g_dm == dmtest,"Expected DocumentMgr not focused\n"); - ITfDocumentMgr_Release(dmtest); - - TextStoreACP_Constructor((IUnknown**)&ts); - - hr = ITfDocumentMgr_CreateContext(g_dm, cid, 0, (IUnknown*)ts, &cxt, &editCookie); - ok(SUCCEEDED(hr),"CreateContext Failed\n"); - - hr = ITfDocumentMgr_CreateContext(g_dm, cid, 0, NULL, &cxt2, &editCookie); - ok(SUCCEEDED(hr),"CreateContext Failed\n"); - - hr = ITfDocumentMgr_CreateContext(g_dm, cid, 0, NULL, &cxt3, &editCookie); - ok(SUCCEEDED(hr),"CreateContext Failed\n"); - - test_EnumContexts(g_dm, NULL); - - hr = ITfContext_GetDocumentMgr(cxt,&dmtest); - ok(hr == S_OK, "ITfContext_GetDocumentMgr failed with %x\n",hr); - ok(dmtest == g_dm, "Wrong documentmgr\n"); - ITfDocumentMgr_Release(dmtest); - - cnt = check_context_refcount(cxt); - test_OnPushContext = SINK_EXPECTED; - test_ACP_AdviseSink = SINK_EXPECTED; - test_OnInitDocumentMgr = SINK_EXPECTED; - hr = ITfDocumentMgr_Push(g_dm, cxt); - ok(SUCCEEDED(hr),"Push Failed\n"); - ok(check_context_refcount(cxt) > cnt, "Ref count did not increase\n"); - sink_check_ok(&test_OnPushContext,"OnPushContext"); - sink_check_ok(&test_OnInitDocumentMgr,"OnInitDocumentMgr"); - sink_check_ok(&test_ACP_AdviseSink,"TextStoreACP_AdviseSink"); - - test_EnumContexts(g_dm, cxt); - - hr = ITfDocumentMgr_GetTop(g_dm, &cxtTest); - ok(SUCCEEDED(hr),"GetTop Failed\n"); - ok(cxtTest == cxt, "Wrong context on top\n"); - ok(check_context_refcount(cxt) > cnt, "Ref count did not increase\n"); - cnt = ITfContext_Release(cxtTest); - - hr = ITfDocumentMgr_GetBase(g_dm, &cxtTest); - ok(SUCCEEDED(hr),"GetBase Failed\n"); - ok(cxtTest == cxt, "Wrong context on Base\n"); - ok(check_context_refcount(cxt) > cnt, "Ref count did not increase\n"); - ITfContext_Release(cxtTest); - - check_context_refcount(cxt2); - test_OnPushContext = SINK_EXPECTED; - hr = ITfDocumentMgr_Push(g_dm, cxt2); - ok(SUCCEEDED(hr),"Push Failed\n"); - sink_check_ok(&test_OnPushContext,"OnPushContext"); - - cnt = check_context_refcount(cxt2); - hr = ITfDocumentMgr_GetTop(g_dm, &cxtTest); - ok(SUCCEEDED(hr),"GetTop Failed\n"); - ok(cxtTest == cxt2, "Wrong context on top\n"); - ok(check_context_refcount(cxt2) > cnt, "Ref count did not increase\n"); - ITfContext_Release(cxtTest); - - cnt = check_context_refcount(cxt); - hr = ITfDocumentMgr_GetBase(g_dm, &cxtTest); - ok(SUCCEEDED(hr),"GetBase Failed\n"); - ok(cxtTest == cxt, "Wrong context on Base\n"); - ok(check_context_refcount(cxt) > cnt, "Ref count did not increase\n"); - ITfContext_Release(cxtTest); - - cnt = check_context_refcount(cxt3); - hr = ITfDocumentMgr_Push(g_dm, cxt3); - ok(FAILED(hr),"Push Succeeded\n"); - ok(check_context_refcount(cxt3) == cnt, "Ref changed\n"); - - cnt = check_context_refcount(cxt2); - hr = ITfDocumentMgr_GetTop(g_dm, &cxtTest); - ok(SUCCEEDED(hr),"GetTop Failed\n"); - ok(cxtTest == cxt2, "Wrong context on top\n"); - ok(check_context_refcount(cxt2) > cnt, "Ref count did not increase\n"); - ITfContext_Release(cxtTest); - - cnt = check_context_refcount(cxt); - hr = ITfDocumentMgr_GetBase(g_dm, &cxtTest); - ok(SUCCEEDED(hr),"GetBase Failed\n"); - ok(cxtTest == cxt, "Wrong context on Base\n"); - ok(check_context_refcount(cxt) > cnt, "Ref count did not increase\n"); - ITfContext_Release(cxtTest); - - cnt = check_context_refcount(cxt2); - test_OnPopContext = SINK_EXPECTED; - hr = ITfDocumentMgr_Pop(g_dm, 0); - ok(SUCCEEDED(hr),"Pop Failed\n"); - ok(check_context_refcount(cxt2) < cnt, "Ref count did not decrease\n"); - sink_check_ok(&test_OnPopContext,"OnPopContext"); - - dmtest = (void *)0xfeedface; - hr = ITfContext_GetDocumentMgr(cxt2,&dmtest); - ok(hr == S_FALSE, "ITfContext_GetDocumentMgr wrong rc %x\n",hr); - ok(dmtest == NULL,"returned documentmgr should be null\n"); - - hr = ITfDocumentMgr_GetTop(g_dm, &cxtTest); - ok(SUCCEEDED(hr),"GetTop Failed\n"); - ok(cxtTest == cxt, "Wrong context on top\n"); - ITfContext_Release(cxtTest); - - hr = ITfDocumentMgr_GetBase(g_dm, &cxtTest); - ok(SUCCEEDED(hr),"GetBase Failed\n"); - ok(cxtTest == cxt, "Wrong context on base\n"); - ITfContext_Release(cxtTest); - - hr = ITfDocumentMgr_Pop(g_dm, 0); - ok(FAILED(hr),"Pop Succeeded\n"); - - hr = ITfDocumentMgr_GetTop(g_dm, &cxtTest); - ok(SUCCEEDED(hr),"GetTop Failed\n"); - ok(cxtTest == cxt, "Wrong context on top\n"); - ITfContext_Release(cxtTest); - - hr = ITfDocumentMgr_GetBase(g_dm, &cxtTest); - ok(SUCCEEDED(hr),"GetBase Failed\n"); - ok(cxtTest == cxt, "Wrong context on base\n"); - ITfContext_Release(cxtTest); - - ITfContext_Release(cxt); - ITfContext_Release(cxt2); - ITfContext_Release(cxt3); -} - -static void test_endSession(void) -{ - HRESULT hr; - test_ShouldDeactivate = TRUE; - test_CurrentFocus = NULL; - test_PrevFocus = g_dm; - test_OnSetFocus = SINK_EXPECTED; - hr = ITfThreadMgr_Deactivate(g_tm); - ok(SUCCEEDED(hr),"Failed to Deactivate\n"); - sink_check_ok(&test_OnSetFocus,"OnSetFocus"); - test_OnSetFocus = SINK_UNEXPECTED; -} - -static void test_TfGuidAtom(void) -{ - GUID gtest,g1; - HRESULT hr; - TfGuidAtom atom1,atom2; - BOOL equal; - - CoCreateGuid(>est); - - /* msdn reports this should return E_INVALIDARG. However my test show it crashing (winxp)*/ - /* - hr = ITfCategoryMgr_RegisterGUID(g_cm,>est,NULL); - ok(hr==E_INVALIDARG,"ITfCategoryMgr_RegisterGUID should have failed\n"); - */ - hr = ITfCategoryMgr_RegisterGUID(g_cm,>est,&atom1); - ok(SUCCEEDED(hr),"ITfCategoryMgr_RegisterGUID failed\n"); - hr = ITfCategoryMgr_RegisterGUID(g_cm,>est,&atom2); - ok(SUCCEEDED(hr),"ITfCategoryMgr_RegisterGUID failed\n"); - ok(atom1 == atom2,"atoms do not match\n"); - hr = ITfCategoryMgr_GetGUID(g_cm,atom2,NULL); - ok(hr==E_INVALIDARG,"ITfCategoryMgr_GetGUID should have failed\n"); - hr = ITfCategoryMgr_GetGUID(g_cm,atom2,&g1); - ok(SUCCEEDED(hr),"ITfCategoryMgr_GetGUID failed\n"); - ok(IsEqualGUID(&g1,>est),"guids do not match\n"); - hr = ITfCategoryMgr_IsEqualTfGuidAtom(g_cm,atom1,>est,NULL); - ok(hr==E_INVALIDARG,"ITfCategoryMgr_IsEqualTfGuidAtom should have failed\n"); - hr = ITfCategoryMgr_IsEqualTfGuidAtom(g_cm,atom1,>est,&equal); - ok(SUCCEEDED(hr),"ITfCategoryMgr_IsEqualTfGuidAtom failed\n"); - ok(equal == TRUE,"Equal value invalid\n"); - - /* show that cid and tid TfClientIds are also TfGuidAtoms */ - hr = ITfCategoryMgr_IsEqualTfGuidAtom(g_cm,tid,&CLSID_FakeService,&equal); - ok(SUCCEEDED(hr),"ITfCategoryMgr_IsEqualTfGuidAtom failed\n"); - ok(equal == TRUE,"Equal value invalid\n"); - hr = ITfCategoryMgr_GetGUID(g_cm,cid,&g1); - ok(SUCCEEDED(hr),"ITfCategoryMgr_GetGUID failed\n"); - ok(!IsEqualGUID(&g1,&GUID_NULL),"guid should not be NULL\n"); -} - -static void test_ClientId(void) -{ - ITfClientId *pcid; - TfClientId id1,id2; - HRESULT hr; - GUID g2; - - hr = ITfThreadMgr_QueryInterface(g_tm, &IID_ITfClientId, (LPVOID*)&pcid); - ok(SUCCEEDED(hr),"Unable to acquire ITfClientId interface\n"); - - CoCreateGuid(&g2); - - hr = ITfClientId_GetClientId(pcid,&GUID_NULL,&id1); - ok(SUCCEEDED(hr),"GetClientId failed\n"); - hr = ITfClientId_GetClientId(pcid,&GUID_NULL,&id2); - ok(SUCCEEDED(hr),"GetClientId failed\n"); - ok(id1==id2,"Id's for GUID_NULL do not match\n"); - hr = ITfClientId_GetClientId(pcid,&CLSID_FakeService,&id2); - ok(SUCCEEDED(hr),"GetClientId failed\n"); - ok(id2!=id1,"Id matches GUID_NULL\n"); - ok(id2==tid,"Id for CLSID_FakeService not matching tid\n"); - ok(id2!=cid,"Id for CLSID_FakeService matching cid\n"); - hr = ITfClientId_GetClientId(pcid,&g2,&id2); - ok(SUCCEEDED(hr),"GetClientId failed\n"); - ok(id2!=id1,"Id matches GUID_NULL\n"); - ok(id2!=tid,"Id for random guid matching tid\n"); - ok(id2!=cid,"Id for random guid matching cid\n"); - ITfClientId_Release(pcid); -} - -/********************************************************************** - * ITfEditSession - **********************************************************************/ -typedef struct tagEditSession -{ - const ITfEditSessionVtbl *EditSessionVtbl; - LONG refCount; -} EditSession; - -static void EditSession_Destructor(EditSession *This) -{ - HeapFree(GetProcessHeap(),0,This); -} - -static HRESULT WINAPI EditSession_QueryInterface(ITfEditSession *iface, REFIID iid, LPVOID *ppvOut) -{ - EditSession *This = (EditSession *)iface; - *ppvOut = NULL; - - if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfEditSession)) - { - *ppvOut = This; - } - - if (*ppvOut) - { - IUnknown_AddRef(iface); - return S_OK; - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI EditSession_AddRef(ITfEditSession *iface) -{ - EditSession *This = (EditSession *)iface; - return InterlockedIncrement(&This->refCount); -} - -static ULONG WINAPI EditSession_Release(ITfEditSession *iface) -{ - EditSession *This = (EditSession *)iface; - ULONG ret; - - ret = InterlockedDecrement(&This->refCount); - if (ret == 0) - EditSession_Destructor(This); - return ret; -} - -static void test_InsertAtSelection(TfEditCookie ec, ITfContext *cxt) -{ - HRESULT hr; - ITfInsertAtSelection *iis; - ITfRange *range=NULL; - static const WCHAR txt[] = {'H','e','l','l','o',' ','W','o','r','l','d',0}; - - hr = ITfContext_QueryInterface(cxt, &IID_ITfInsertAtSelection , (LPVOID*)&iis); - ok(SUCCEEDED(hr),"Failed to get ITfInsertAtSelection interface\n"); - test_ACP_InsertTextAtSelection = SINK_EXPECTED; - hr = ITfInsertAtSelection_InsertTextAtSelection(iis, ec, 0, txt, 11, &range); - ok(SUCCEEDED(hr),"ITfInsertAtSelection_InsertTextAtSelection failed %x\n",hr); - sink_check_ok(&test_ACP_InsertTextAtSelection,"InsertTextAtSelection"); - ok(range != NULL,"No range returned\n"); - ITfRange_Release(range); - ITfInsertAtSelection_Release(iis); -} - -static HRESULT WINAPI EditSession_DoEditSession(ITfEditSession *iface, -TfEditCookie ec) -{ - ITfContext *cxt; - ITfDocumentMgr *dm; - ITfRange *range; - TF_SELECTION selection; - ULONG fetched; - HRESULT hr; - - sink_fire_ok(&test_DoEditSession,"EditSession_DoEditSession"); - sink_check_ok(&test_ACP_RequestLock,"RequestLock"); - - ITfThreadMgr_GetFocus(g_tm, &dm); - ITfDocumentMgr_GetTop(dm,&cxt); - - hr = ITfContext_GetStart(cxt,ec,NULL); - ok(hr == E_INVALIDARG,"Unexpected return code %x\n",hr); - - range = (ITfRange*)0xdeaddead; - hr = ITfContext_GetStart(cxt,0xdeadcafe,&range); - ok(hr == TF_E_NOLOCK,"Unexpected return code %x\n",hr); - ok(range == NULL,"Range not set to NULL\n"); - - hr = ITfContext_GetStart(cxt,ec,&range); - ok(SUCCEEDED(hr),"Unexpected return code %x\n",hr); - ok(range != NULL,"Range set to NULL\n"); - - ITfRange_Release(range); - - hr = ITfContext_GetEnd(cxt,ec,NULL); - ok(hr == E_INVALIDARG,"Unexpected return code %x\n",hr); - - range = (ITfRange*)0xdeaddead; - hr = ITfContext_GetEnd(cxt,0xdeadcafe,&range); - ok(hr == TF_E_NOLOCK,"Unexpected return code %x\n",hr); - ok(range == NULL,"Range not set to NULL\n"); - - test_ACP_GetEndACP = SINK_EXPECTED; - hr = ITfContext_GetEnd(cxt,ec,&range); - ok(SUCCEEDED(hr),"Unexpected return code %x\n",hr); - ok(range != NULL,"Range set to NULL\n"); - sink_check_ok(&test_ACP_GetEndACP,"GetEndACP"); - - ITfRange_Release(range); - - selection.range = NULL; - test_ACP_GetSelection = SINK_EXPECTED; - hr = ITfContext_GetSelection(cxt, ec, TF_DEFAULT_SELECTION, 1, &selection, &fetched); - ok(SUCCEEDED(hr),"ITfContext_GetSelection failed\n"); - ok(fetched == 1,"fetched incorrect\n"); - ok(selection.range != NULL,"NULL range\n"); - sink_check_ok(&test_ACP_GetSelection,"ACP_GetSepection"); - ITfRange_Release(selection.range); - - test_InsertAtSelection(ec, cxt); - - test_ACP_GetEndACP = SINK_EXPECTED; - hr = ITfContext_GetEnd(cxt,ec,&range); - ok(SUCCEEDED(hr),"Unexpected return code %x\n",hr); - ok(range != NULL,"Range set to NULL\n"); - sink_check_ok(&test_ACP_GetEndACP,"GetEndACP"); - - selection.range = range; - selection.style.ase = TF_AE_NONE; - selection.style.fInterimChar = FALSE; - test_ACP_SetSelection = SINK_EXPECTED; - hr = ITfContext_SetSelection(cxt, ec, 1, &selection); - sink_check_ok(&test_ACP_SetSelection,"SetSelection"); - ITfRange_Release(range); - - ITfContext_Release(cxt); - ITfDocumentMgr_Release(dm); - return 0xdeadcafe; -} - -static const ITfEditSessionVtbl EditSession_EditSessionVtbl = -{ - EditSession_QueryInterface, - EditSession_AddRef, - EditSession_Release, - - EditSession_DoEditSession -}; - -static HRESULT EditSession_Constructor(ITfEditSession **ppOut) -{ - EditSession *This; - - *ppOut = NULL; - This = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(EditSession)); - if (This == NULL) - return E_OUTOFMEMORY; - - This->EditSessionVtbl = &EditSession_EditSessionVtbl; - This->refCount = 1; - - *ppOut = (ITfEditSession*)This; - return S_OK; -} - -static void test_TStoApplicationText(void) -{ - HRESULT hr, hrSession; - ITfEditSession *es; - ITfContext *cxt; - ITfDocumentMgr *dm; - ITfTextEditSink *sink; - ITfSource *source = NULL; - DWORD editSinkCookie = -1; - - ITfThreadMgr_GetFocus(g_tm, &dm); - EditSession_Constructor(&es); - ITfDocumentMgr_GetTop(dm,&cxt); - - TextEditSink_Constructor(&sink); - hr = ITfContext_QueryInterface(cxt,&IID_ITfSource,(LPVOID*)&source); - ok(SUCCEEDED(hr),"Failed to get IID_ITfSource for Context\n"); - if (source) - { - hr = ITfSource_AdviseSink(source, &IID_ITfTextEditSink, (LPVOID)sink, &editSinkCookie); - ok(SUCCEEDED(hr),"Failed to advise Sink\n"); - ok(editSinkCookie != -1,"Failed to get sink cookie\n"); - } - - hrSession = 0xfeedface; - /* Test no premissions flags */ - hr = ITfContext_RequestEditSession(cxt, tid, es, TF_ES_SYNC, &hrSession); - ok(hr == E_INVALIDARG,"RequestEditSession should have failed with %x not %x\n",E_INVALIDARG,hr); - ok(hrSession == E_FAIL,"hrSession should be %x not %x\n",E_FAIL,hrSession); - - documentStatus = TS_SD_READONLY; - hrSession = 0xfeedface; - test_ACP_GetStatus = SINK_EXPECTED; - hr = ITfContext_RequestEditSession(cxt, tid, es, TF_ES_SYNC|TF_ES_READWRITE, &hrSession); - ok(SUCCEEDED(hr),"ITfContext_RequestEditSession failed\n"); - ok(hrSession == TS_E_READONLY,"Unexpected hrSession (%x)\n",hrSession); - sink_check_ok(&test_ACP_GetStatus,"GetStatus"); - - /* signal a change to allow readwrite sessions */ - documentStatus = 0; - test_ACP_RequestLock = SINK_EXPECTED; - ITextStoreACPSink_OnStatusChange(ACPSink,documentStatus); - sink_check_ok(&test_ACP_RequestLock,"RequestLock"); - - test_ACP_GetStatus = SINK_EXPECTED; - test_ACP_RequestLock = SINK_EXPECTED; - test_DoEditSession = SINK_EXPECTED; - hrSession = 0xfeedface; - test_OnEndEdit = SINK_EXPECTED; - hr = ITfContext_RequestEditSession(cxt, tid, es, TF_ES_SYNC|TF_ES_READWRITE, &hrSession); - ok(SUCCEEDED(hr),"ITfContext_RequestEditSession failed\n"); - sink_check_ok(&test_OnEndEdit,"OnEndEdit"); - sink_check_ok(&test_DoEditSession,"DoEditSession"); - sink_check_ok(&test_ACP_GetStatus,"GetStatus"); - ok(hrSession == 0xdeadcafe,"Unexpected hrSession (%x)\n",hrSession); - - if (source) - { - hr = ITfSource_UnadviseSink(source, editSinkCookie); - ok(SUCCEEDED(hr),"Failed to unadvise Sink\n"); - ITfTextEditSink_Release(sink); - ITfSource_Release(source); - } - - ITfContext_Release(cxt); - ITfDocumentMgr_Release(dm); - ITfEditSession_Release(es); -} - -static void enum_compartments(ITfCompartmentMgr *cmpmgr, REFGUID present, REFGUID absent) -{ - BOOL found,found2; - IEnumGUID *ppEnum; - found = FALSE; - found2 = FALSE; - if (SUCCEEDED(ITfCompartmentMgr_EnumCompartments(cmpmgr, &ppEnum))) - { - ULONG fetched; - GUID g; - while (IEnumGUID_Next(ppEnum, 1, &g, &fetched) == S_OK) - { - WCHAR str[50]; - CHAR strA[50]; - StringFromGUID2(&g,str,sizeof(str)/sizeof(str[0])); - WideCharToMultiByte(CP_ACP,0,str,-1,strA,sizeof(strA),0,0); - trace("found %s\n",strA); - if (present && IsEqualGUID(present,&g)) - found = TRUE; - if (absent && IsEqualGUID(absent, &g)) - found2 = TRUE; - } - IEnumGUID_Release(ppEnum); - } - if (present) - ok(found,"Did not find compartment\n"); - if (absent) - ok(!found2,"Found compartment that should be absent\n"); -} - -static void test_Compartments(void) -{ - ITfContext *cxt; - ITfDocumentMgr *dm; - ITfCompartmentMgr *cmpmgr; - ITfCompartment *cmp; - HRESULT hr; - - ITfThreadMgr_GetFocus(g_tm, &dm); - ITfDocumentMgr_GetTop(dm,&cxt); - - /* Global */ - hr = ITfThreadMgr_GetGlobalCompartment(g_tm, &cmpmgr); - ok(SUCCEEDED(hr),"GetGlobalCompartment failed\n"); - hr = ITfCompartmentMgr_GetCompartment(cmpmgr, &GUID_COMPARTMENT_SPEECH_OPENCLOSE, &cmp); - ok(SUCCEEDED(hr),"GetCompartment failed\n"); - ITfCompartment_Release(cmp); - enum_compartments(cmpmgr,&GUID_COMPARTMENT_SPEECH_OPENCLOSE,NULL); - ITfCompartmentMgr_Release(cmpmgr); - - /* Thread */ - hr = ITfThreadMgr_QueryInterface(g_tm, &IID_ITfCompartmentMgr, (LPVOID*)&cmpmgr); - ok(SUCCEEDED(hr),"ThreadMgr QI for IID_ITfCompartmentMgr failed\n"); - hr = ITfCompartmentMgr_GetCompartment(cmpmgr, &CLSID_FakeService, &cmp); - ok(SUCCEEDED(hr),"GetCompartment failed\n"); - enum_compartments(cmpmgr,&CLSID_FakeService,&GUID_COMPARTMENT_SPEECH_OPENCLOSE); - ITfCompartmentMgr_ClearCompartment(cmpmgr,tid,&CLSID_FakeService); - enum_compartments(cmpmgr,NULL,&CLSID_FakeService); - ITfCompartmentMgr_Release(cmpmgr); - ITfCompartment_Release(cmp); - - /* DocumentMgr */ - hr = ITfDocumentMgr_QueryInterface(dm, &IID_ITfCompartmentMgr, (LPVOID*)&cmpmgr); - ok(SUCCEEDED(hr),"DocumentMgr QI for IID_ITfCompartmentMgr failed\n"); - - hr = ITfCompartmentMgr_GetCompartment(cmpmgr, &GUID_COMPARTMENT_PERSISTMENUENABLED, &cmp); - ok(SUCCEEDED(hr),"GetCompartment failed\n"); - enum_compartments(cmpmgr,&GUID_COMPARTMENT_PERSISTMENUENABLED,&GUID_COMPARTMENT_SPEECH_OPENCLOSE); - ITfCompartmentMgr_Release(cmpmgr); - - /* Context */ - hr = ITfContext_QueryInterface(cxt, &IID_ITfCompartmentMgr, (LPVOID*)&cmpmgr); - ok(SUCCEEDED(hr),"Context QI for IID_ITfCompartmentMgr failed\n"); - enum_compartments(cmpmgr,NULL,&GUID_COMPARTMENT_PERSISTMENUENABLED); - ITfCompartmentMgr_Release(cmpmgr); - - ITfContext_Release(cxt); - ITfDocumentMgr_Release(dm); -} - -static void processPendingMessages(void) -{ - MSG msg; - while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } -} - -static void test_AssociateFocus(void) -{ - ITfDocumentMgr *dm1, *dm2, *olddm, *dmcheck, *dmorig; - HWND wnd1, wnd2, wnd3; - HRESULT hr; - - ITfThreadMgr_GetFocus(g_tm, &dmorig); - test_CurrentFocus = NULL; - test_PrevFocus = dmorig; - test_OnSetFocus = SINK_EXPECTED; - hr = ITfThreadMgr_SetFocus(g_tm,NULL); - sink_check_ok(&test_OnSetFocus,"OnSetFocus"); - ITfDocumentMgr_Release(dmorig); - - hr = ITfThreadMgr_CreateDocumentMgr(g_tm,&dm1); - ok(SUCCEEDED(hr),"CreateDocumentMgr failed\n"); - - hr = ITfThreadMgr_CreateDocumentMgr(g_tm,&dm2); - ok(SUCCEEDED(hr),"CreateDocumentMgr failed\n"); - - wnd1 = CreateWindow("edit",NULL,WS_POPUP,0,0,200,60,NULL,NULL,NULL,NULL); - ok(wnd1!=NULL,"Unable to create window 1\n"); - wnd2 = CreateWindow("edit",NULL,WS_POPUP,0,65,200,60,NULL,NULL,NULL,NULL); - ok(wnd2!=NULL,"Unable to create window 2\n"); - wnd3 = CreateWindow("edit",NULL,WS_POPUP,0,130,200,60,NULL,NULL,NULL,NULL); - ok(wnd3!=NULL,"Unable to create window 3\n"); - - processPendingMessages(); - - test_OnInitDocumentMgr = SINK_OPTIONAL; /* Vista and greater */ - test_OnPushContext = SINK_OPTIONAL; /* Vista and greater */ - - ShowWindow(wnd1,SW_SHOWNORMAL); - SetFocus(wnd1); - sink_check_ok(&test_OnInitDocumentMgr,"OnInitDocumentMgr"); - sink_check_ok(&test_OnPushContext,"OnPushContext"); - - test_OnSetFocus = SINK_OPTIONAL; /* Vista and greater */ - ITfThreadMgr_GetFocus(g_tm, &test_PrevFocus); - test_CurrentFocus = FOCUS_IGNORE; /* This is a default system context */ - processPendingMessages(); - sink_check_ok(&test_OnSetFocus,"OnSetFocus"); - - test_CurrentFocus = dm1; - test_PrevFocus = FOCUS_IGNORE; - test_OnSetFocus = SINK_EXPECTED; - hr = ITfThreadMgr_AssociateFocus(g_tm,wnd1,dm1,&olddm); - ok(SUCCEEDED(hr),"AssociateFocus failed\n"); - sink_check_ok(&test_OnSetFocus,"OnSetFocus"); - - processPendingMessages(); - - ITfThreadMgr_GetFocus(g_tm, &dmcheck); - ok(dmcheck == dm1, "Expected DocumentMgr not focused\n"); - ITfDocumentMgr_Release(dmcheck); - - hr = ITfThreadMgr_AssociateFocus(g_tm,wnd2,dm2,&olddm); - ok(SUCCEEDED(hr),"AssociateFocus failed\n"); - processPendingMessages(); - ITfThreadMgr_GetFocus(g_tm, &dmcheck); - ok(dmcheck == dm1, "Expected DocumentMgr not focused\n"); - ITfDocumentMgr_Release(dmcheck); - - hr = ITfThreadMgr_AssociateFocus(g_tm,wnd3,dm2,&olddm); - ok(SUCCEEDED(hr),"AssociateFocus failed\n"); - processPendingMessages(); - ITfThreadMgr_GetFocus(g_tm, &dmcheck); - ok(dmcheck == dm1, "Expected DocumentMgr not focused\n"); - ITfDocumentMgr_Release(dmcheck); - - test_CurrentFocus = dm2; - test_PrevFocus = dm1; - test_OnSetFocus = SINK_OPTIONAL; /* wine and Winxp */ - ShowWindow(wnd2,SW_SHOWNORMAL); - SetFocus(wnd2); - sink_check_ok(&test_OnSetFocus,"OnSetFocus"); - test_CurrentFocus = FOCUS_IGNORE; /* occasional wine race */ - test_PrevFocus = FOCUS_IGNORE; /* occasional wine race */ - test_OnSetFocus = SINK_IGNORE; /* occasional wine race */ - processPendingMessages(); - - ShowWindow(wnd3,SW_SHOWNORMAL); - SetFocus(wnd3); - processPendingMessages(); - - test_CurrentFocus = dm1; - test_PrevFocus = dm2; - test_OnSetFocus = SINK_EXPECTED; - SetFocus(wnd1); - processPendingMessages(); - sink_check_ok(&test_OnSetFocus,"OnSetFocus"); - - hr = ITfThreadMgr_AssociateFocus(g_tm,wnd3,NULL,&olddm); - ok(SUCCEEDED(hr),"AssociateFocus failed\n"); - ok(olddm == dm2, "incorrect old DocumentMgr returned\n"); - ITfDocumentMgr_Release(olddm); - - test_CurrentFocus = dmorig; - test_PrevFocus = dm1; - test_OnSetFocus = SINK_EXPECTED; - test_ACP_GetStatus = SINK_EXPECTED; - ITfThreadMgr_SetFocus(g_tm,dmorig); - sink_check_ok(&test_OnSetFocus,"OnSetFocus"); - - test_CurrentFocus = FOCUS_IGNORE; /* NULL on XP, system default on Vista */ - test_PrevFocus = dmorig; - test_OnSetFocus = SINK_EXPECTED; - SetFocus(wnd3); - processPendingMessages(); - sink_check_ok(&test_OnSetFocus,"OnSetFocus"); - - hr = ITfThreadMgr_AssociateFocus(g_tm,wnd2,NULL,&olddm); - ok(SUCCEEDED(hr),"AssociateFocus failed\n"); - ok(olddm == dm2, "incorrect old DocumentMgr returned\n"); - ITfDocumentMgr_Release(olddm); - hr = ITfThreadMgr_AssociateFocus(g_tm,wnd1,NULL,&olddm); - ok(SUCCEEDED(hr),"AssociateFocus failed\n"); - ok(olddm == dm1, "incorrect old DocumentMgr returned\n"); - ITfDocumentMgr_Release(olddm); - - SetFocus(wnd2); - processPendingMessages(); - SetFocus(wnd1); - processPendingMessages(); - - ITfDocumentMgr_Release(dm1); - ITfDocumentMgr_Release(dm2); - - test_CurrentFocus = dmorig; - test_PrevFocus = FOCUS_IGNORE; - test_OnSetFocus = SINK_EXPECTED; - test_ACP_GetStatus = SINK_IGNORE; - ITfThreadMgr_SetFocus(g_tm,dmorig); - sink_check_ok(&test_OnSetFocus,"OnSetFocus"); - - DestroyWindow(wnd1); - DestroyWindow(wnd2); - test_OnPopContext = SINK_OPTIONAL; /* Vista and greater */ - test_OnSetFocus = SINK_OPTIONAL; /* Vista and greater */ - ITfThreadMgr_GetFocus(g_tm, &test_PrevFocus); - test_CurrentFocus = NULL; - DestroyWindow(wnd3); - sink_check_ok(&test_OnSetFocus,"OnSetFocus"); - sink_check_ok(&test_OnPopContext,"OnPopContext"); -} - -START_TEST(inputprocessor) -{ - if (SUCCEEDED(initialize())) - { - test_Register(); - test_RegisterCategory(); - test_EnumLanguageProfiles(); - test_EnumInputProcessorInfo(); - test_Enable(); - test_ThreadMgrAdviseSinks(); - test_Activate(); - test_startSession(); - test_TfGuidAtom(); - test_ClientId(); - test_KeystrokeMgr(); - test_TStoApplicationText(); - test_Compartments(); - test_AssociateFocus(); - test_endSession(); - test_FindClosestCategory(); - test_Disable(); - test_ThreadMgrUnadviseSinks(); - test_UnregisterCategory(); - test_Unregister(); - } - else - skip("Unable to create InputProcessor\n"); - cleanup(); -} diff --git a/rostests/winetests/msctf/msctf.rbuild b/rostests/winetests/msctf/msctf.rbuild deleted file mode 100644 index 537242ad582..00000000000 --- a/rostests/winetests/msctf/msctf.rbuild +++ /dev/null @@ -1,10 +0,0 @@ - - . - - inputprocessor.c - testlist.c - wine - ole32 - user32 - ntdll - diff --git a/rostests/winetests/msctf/testlist.c b/rostests/winetests/msctf/testlist.c deleted file mode 100644 index 8338fa7b8ce..00000000000 --- a/rostests/winetests/msctf/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_inputprocessor(void); - -const struct test winetest_testlist[] = -{ - { "inputprocessor", func_inputprocessor }, - { 0, 0 } -}; diff --git a/rostests/winetests/mshtml/CMakeLists.txt b/rostests/winetests/mshtml/CMakeLists.txt deleted file mode 100644 index 8b6d570b515..00000000000 --- a/rostests/winetests/mshtml/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ - -set_rc_compiler() - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - dom.c - events.c - htmldoc.c - htmllocation.c - misc.c - protocol.c - script.c - testlist.c - rsrc.rc) - -add_executable(mshtml_winetest ${SOURCE}) -target_link_libraries(mshtml_winetest wine uuid strmiids) -set_module_type(mshtml_winetest win32cui) -add_importlibs(mshtml_winetest wininet ole32 oleaut32 user32 gdi32 urlmon advapi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET mshtml_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/mshtml/dom.c b/rostests/winetests/mshtml/dom.c deleted file mode 100644 index 4f954a8ba30..00000000000 --- a/rostests/winetests/mshtml/dom.c +++ /dev/null @@ -1,6822 +0,0 @@ -/* - * Copyright 2007-2008 Jacek Caban for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * 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 - -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "ole2.h" -#include "mshtml.h" -#include "mshtmcid.h" -#include "mshtmhst.h" -#include "docobj.h" -#include "dispex.h" -#include "mshtml_test.h" - -static const char doc_blank[] = ""; -static const char doc_str1[] = "test"; -static const char range_test_str[] = - "test \nabc\t123
it's\r\n \t
text
"; -static const char range_test2_str[] = - "abc
123

def"; -static const char elem_test_str[] = - "test" - "text test" - "link" - "" - "" - "" - "
td1 texttd2 text
" - "" - "" - "" - "" - "
" - ""; -static const char elem_test2_str[] = - "test" - "
" - ""; - -static const char indent_test_str[] = - "testabc
123"; -static const char cond_comment_str[] = - "test" - "" - ""; -static const char frameset_str[] = - "frameset test" - "" - "" - ""; - -static WCHAR characterW[] = {'c','h','a','r','a','c','t','e','r',0}; -static WCHAR texteditW[] = {'t','e','x','t','e','d','i','t',0}; -static WCHAR wordW[] = {'w','o','r','d',0}; - -typedef enum { - ET_NONE, - ET_HTML, - ET_HEAD, - ET_TITLE, - ET_BODY, - ET_A, - ET_INPUT, - ET_SELECT, - ET_TEXTAREA, - ET_OPTION, - ET_STYLE, - ET_BLOCKQUOTE, - ET_P, - ET_BR, - ET_TABLE, - ET_TBODY, - ET_SCRIPT, - ET_TEST, - ET_TESTG, - ET_COMMENT, - ET_IMG, - ET_TR, - ET_TD, - ET_IFRAME, - ET_FORM, - ET_FRAME -} elem_type_t; - -static const IID * const none_iids[] = { - &IID_IUnknown, - NULL -}; - -static const IID * const doc_node_iids[] = { - &IID_IHTMLDOMNode, - &IID_IHTMLDOMNode2, - &IID_IHTMLDocument, - &IID_IHTMLDocument2, - &IID_IHTMLDocument3, - &IID_IHTMLDocument4, - &IID_IHTMLDocument5, - &IID_IDispatchEx, - &IID_IConnectionPointContainer, - &IID_IInternetHostSecurityManager, - NULL -}; - -static const IID * const doc_obj_iids[] = { - &IID_IHTMLDocument, - &IID_IHTMLDocument2, - &IID_IHTMLDocument3, - &IID_IHTMLDocument4, - &IID_IHTMLDocument5, - &IID_IDispatchEx, - &IID_IConnectionPointContainer, - &IID_ICustomDoc, - NULL -}; - -static const IID * const elem_iids[] = { - &IID_IHTMLDOMNode, - &IID_IHTMLDOMNode2, - &IID_IHTMLElement, - &IID_IHTMLElement2, - &IID_IHTMLElement3, - &IID_IDispatchEx, - &IID_IConnectionPointContainer, - NULL -}; - -static const IID * const body_iids[] = { - &IID_IHTMLDOMNode, - &IID_IHTMLDOMNode2, - &IID_IHTMLElement, - &IID_IHTMLElement2, - &IID_IHTMLElement3, - &IID_IHTMLTextContainer, - &IID_IHTMLBodyElement, - &IID_IDispatchEx, - &IID_IConnectionPointContainer, - NULL -}; - -static const IID * const anchor_iids[] = { - &IID_IHTMLDOMNode, - &IID_IHTMLDOMNode2, - &IID_IHTMLElement, - &IID_IHTMLElement2, - &IID_IHTMLElement3, - &IID_IHTMLAnchorElement, - &IID_IDispatchEx, - &IID_IConnectionPointContainer, - NULL -}; - -static const IID * const input_iids[] = { - &IID_IHTMLDOMNode, - &IID_IHTMLDOMNode2, - &IID_IHTMLElement, - &IID_IHTMLElement2, - &IID_IHTMLElement3, - &IID_IHTMLInputElement, - &IID_IHTMLInputTextElement, - &IID_IDispatchEx, - &IID_IConnectionPointContainer, - NULL -}; - -static const IID * const select_iids[] = { - &IID_IHTMLDOMNode, - &IID_IHTMLDOMNode2, - &IID_IHTMLElement, - &IID_IHTMLElement2, - &IID_IHTMLElement3, - &IID_IHTMLSelectElement, - &IID_IDispatchEx, - &IID_IConnectionPointContainer, - NULL -}; - -static const IID * const textarea_iids[] = { - &IID_IHTMLDOMNode, - &IID_IHTMLDOMNode2, - &IID_IHTMLElement, - &IID_IHTMLElement2, - &IID_IHTMLElement3, - &IID_IHTMLTextAreaElement, - &IID_IDispatchEx, - &IID_IConnectionPointContainer, - NULL -}; - -static const IID * const option_iids[] = { - &IID_IHTMLDOMNode, - &IID_IHTMLDOMNode2, - &IID_IHTMLElement, - &IID_IHTMLElement2, - &IID_IHTMLElement3, - &IID_IHTMLOptionElement, - &IID_IDispatchEx, - &IID_IConnectionPointContainer, - NULL -}; - -static const IID * const table_iids[] = { - &IID_IHTMLDOMNode, - &IID_IHTMLDOMNode2, - &IID_IHTMLElement, - &IID_IHTMLElement2, - &IID_IHTMLElement3, - &IID_IHTMLTable, - &IID_IDispatchEx, - &IID_IConnectionPointContainer, - NULL -}; - -static const IID * const script_iids[] = { - &IID_IHTMLDOMNode, - &IID_IHTMLDOMNode2, - &IID_IHTMLElement, - &IID_IHTMLElement2, - &IID_IHTMLElement3, - &IID_IHTMLScriptElement, - &IID_IDispatchEx, - &IID_IConnectionPointContainer, - NULL -}; - -static const IID * const text_iids[] = { - &IID_IHTMLDOMNode, - &IID_IHTMLDOMNode2, - &IID_IHTMLDOMTextNode, - NULL -}; - -static const IID * const location_iids[] = { - &IID_IDispatch, - &IID_IHTMLLocation, - NULL -}; - -static const IID * const window_iids[] = { - &IID_IDispatch, - &IID_IHTMLWindow2, - &IID_IHTMLWindow3, - &IID_IDispatchEx, - NULL -}; - -static const IID * const comment_iids[] = { - &IID_IHTMLDOMNode, - &IID_IHTMLDOMNode2, - &IID_IHTMLElement, - &IID_IHTMLElement2, - &IID_IHTMLElement3, - &IID_IHTMLCommentElement, - &IID_IDispatchEx, - &IID_IConnectionPointContainer, - NULL -}; - -static const IID * const img_iids[] = { - &IID_IHTMLDOMNode, - &IID_IHTMLDOMNode2, - &IID_IHTMLElement, - &IID_IHTMLElement2, - &IID_IHTMLElement3, - &IID_IDispatchEx, - &IID_IHTMLImgElement, - &IID_IConnectionPointContainer, - NULL -}; - -static const IID * const tr_iids[] = { - &IID_IHTMLDOMNode, - &IID_IHTMLDOMNode2, - &IID_IHTMLElement, - &IID_IHTMLElement2, - &IID_IHTMLElement3, - &IID_IDispatchEx, - &IID_IHTMLTableRow, - &IID_IConnectionPointContainer, - NULL -}; - -static const IID * const td_iids[] = { - &IID_IHTMLDOMNode, - &IID_IHTMLDOMNode2, - &IID_IHTMLElement, - &IID_IHTMLElement2, - &IID_IHTMLElement3, - &IID_IDispatchEx, - &IID_IConnectionPointContainer, - NULL -}; - -static const IID * const frame_iids[] = { - &IID_IHTMLDOMNode, - &IID_IHTMLDOMNode2, - &IID_IHTMLElement, - &IID_IHTMLElement2, - &IID_IHTMLElement3, - &IID_IHTMLFrameBase, - &IID_IHTMLFrameBase2, - &IID_IDispatchEx, - &IID_IConnectionPointContainer, - NULL -}; - -static const IID * const iframe_iids[] = { - &IID_IHTMLDOMNode, - &IID_IHTMLDOMNode2, - &IID_IHTMLElement, - &IID_IHTMLElement2, - &IID_IHTMLElement3, - &IID_IHTMLFrameBase, - &IID_IHTMLFrameBase2, - &IID_IHTMLIFrameElement, - &IID_IDispatchEx, - &IID_IConnectionPointContainer, - NULL -}; - -static const IID * const form_iids[] = { - &IID_IHTMLDOMNode, - &IID_IHTMLDOMNode2, - &IID_IHTMLElement, - &IID_IHTMLElement2, - &IID_IHTMLElement3, - &IID_IHTMLFormElement, - &IID_IDispatchEx, - &IID_IConnectionPointContainer, - NULL -}; - -static const IID * const generic_iids[] = { - &IID_IHTMLDOMNode, - &IID_IHTMLDOMNode2, - &IID_IHTMLElement, - &IID_IHTMLElement2, - &IID_IHTMLElement3, - &IID_IHTMLGenericElement, - &IID_IDispatchEx, - &IID_IConnectionPointContainer, - NULL -}; - -static const IID * const style_iids[] = { - &IID_IUnknown, - &IID_IDispatch, - &IID_IDispatchEx, - &IID_IHTMLStyle, - &IID_IHTMLStyle2, - &IID_IHTMLStyle3, - &IID_IHTMLStyle4, - NULL -}; - -static const IID * const cstyle_iids[] = { - &IID_IUnknown, - &IID_IDispatch, - &IID_IDispatchEx, - &IID_IHTMLCurrentStyle, - NULL -}; - -static const IID * const img_factory_iids[] = { - &IID_IUnknown, - &IID_IDispatch, - &IID_IDispatchEx, - &IID_IHTMLImageElementFactory, - NULL -}; - -typedef struct { - const char *tag; - REFIID *iids; - const IID *dispiid; -} elem_type_info_t; - -static const elem_type_info_t elem_type_infos[] = { - {"", none_iids, NULL}, - {"HTML", elem_iids, NULL}, - {"HEAD", elem_iids, NULL}, - {"TITLE", elem_iids, NULL}, - {"BODY", body_iids, &DIID_DispHTMLBody}, - {"A", anchor_iids, &DIID_DispHTMLAnchorElement}, - {"INPUT", input_iids, &DIID_DispHTMLInputElement}, - {"SELECT", select_iids, &DIID_DispHTMLSelectElement}, - {"TEXTAREA", textarea_iids, &DIID_DispHTMLTextAreaElement}, - {"OPTION", option_iids, &DIID_DispHTMLOptionElement}, - {"STYLE", elem_iids, NULL}, - {"BLOCKQUOTE",elem_iids, NULL}, - {"P", elem_iids, NULL}, - {"BR", elem_iids, NULL}, - {"TABLE", table_iids, &DIID_DispHTMLTable}, - {"TBODY", elem_iids, NULL}, - {"SCRIPT", script_iids, &DIID_DispHTMLScriptElement}, - {"TEST", elem_iids, &DIID_DispHTMLUnknownElement}, - {"TEST", generic_iids, &DIID_DispHTMLGenericElement}, - {"!", comment_iids, &DIID_DispHTMLCommentElement}, - {"IMG", img_iids, &DIID_DispHTMLImg}, - {"TR", tr_iids, &DIID_DispHTMLTableRow}, - {"TD", td_iids, NULL}, - {"IFRAME", iframe_iids, &DIID_DispHTMLIFrame}, - {"FORM", form_iids, &DIID_DispHTMLFormElement}, - {"FRAME", frame_iids, &DIID_DispHTMLFrameElement} -}; - -static const char *dbgstr_guid(REFIID riid) -{ - static char buf[50]; - - sprintf(buf, "{%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]); - - return buf; -} - -static int strcmp_wa(LPCWSTR strw, const char *stra) -{ - CHAR buf[512]; - WideCharToMultiByte(CP_ACP, 0, strw, -1, buf, sizeof(buf), NULL, NULL); - return lstrcmpA(stra, buf); -} - -static BSTR a2bstr(const char *str) -{ - BSTR ret; - int len; - - len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); - ret = SysAllocStringLen(NULL, len); - MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len); - - return ret; -} - -static BOOL iface_cmp(IUnknown *iface1, IUnknown *iface2) -{ - IUnknown *unk1, *unk2; - - if(iface1 == iface2) - return TRUE; - - IUnknown_QueryInterface(iface1, &IID_IUnknown, (void**)&unk1); - IUnknown_Release(unk1); - IUnknown_QueryInterface(iface2, &IID_IUnknown, (void**)&unk2); - IUnknown_Release(unk2); - - return unk1 == unk2; -} - -static IHTMLDocument2 *create_document(void) -{ - IHTMLDocument2 *doc; - IHTMLDocument5 *doc5; - HRESULT hres; - - hres = CoCreateInstance(&CLSID_HTMLDocument, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, - &IID_IHTMLDocument2, (void**)&doc); - ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres); - if(FAILED(hres)) - return NULL; - - hres = IHTMLDocument2_QueryInterface(doc, &IID_IHTMLDocument5, (void**)&doc5); - if(FAILED(hres)) { - win_skip("Could not get IHTMLDocument5, probably too old IE\n"); - IHTMLDocument2_Release(doc); - return NULL; - } - - IHTMLDocument5_Release(doc5); - return doc; -} - -#define test_ifaces(i,ids) _test_ifaces(__LINE__,i,ids) -static void _test_ifaces(unsigned line, IUnknown *iface, REFIID *iids) -{ - const IID * const *piid; - IUnknown *unk; - HRESULT hres; - - for(piid = iids; *piid; piid++) { - hres = IDispatch_QueryInterface(iface, *piid, (void**)&unk); - ok_(__FILE__,line) (hres == S_OK, "Could not get %s interface: %08x\n", dbgstr_guid(*piid), hres); - if(SUCCEEDED(hres)) - IUnknown_Release(unk); - } -} - -#define test_get_dispid(u,id) _test_get_dispid(__LINE__,u,id) -static BOOL _test_get_dispid(unsigned line, IUnknown *unk, IID *iid) -{ - IDispatchEx *dispex; - ITypeInfo *typeinfo; - BOOL ret = FALSE; - UINT ticnt; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IDispatchEx, (void**)&dispex); - ok_(__FILE__,line) (hres == S_OK, "Could not get IDispatchEx: %08x\n", hres); - if(FAILED(hres)) - return FALSE; - - ticnt = 0xdeadbeef; - hres = IDispatchEx_GetTypeInfoCount(dispex, &ticnt); - ok_(__FILE__,line) (hres == S_OK, "GetTypeInfoCount failed: %08x\n", hres); - ok_(__FILE__,line) (ticnt == 1, "ticnt=%u\n", ticnt); - - hres = IDispatchEx_GetTypeInfo(dispex, 0, 0, &typeinfo); - ok_(__FILE__,line) (hres == S_OK, "GetTypeInfo failed: %08x\n", hres); - - if(SUCCEEDED(hres)) { - TYPEATTR *type_attr; - - hres = ITypeInfo_GetTypeAttr(typeinfo, &type_attr); - ok_(__FILE__,line) (hres == S_OK, "GetTypeAttr failed: %08x\n", hres); - if(hres == S_OK) { - *iid = type_attr->guid; - ret = TRUE; - } - - ITypeInfo_ReleaseTypeAttr(typeinfo, type_attr); - ITypeInfo_Release(typeinfo); - } - - IDispatchEx_Release(dispex); - return ret; -} - -#define test_disp_value(u) _test_disp_value(__LINE__,u,v) -static void _test_disp_value(unsigned line, IUnknown *unk, const char *val) -{ - DISPPARAMS dp = {NULL,NULL,0,0}; - IDispatchEx *dispex; - EXCEPINFO ei; - VARIANT var; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IDispatchEx, (void**)&dispex); - ok_(__FILE__,line)(hres == S_OK, "Could not get IDispatchEx interface: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IDispatchEx_InvokeEx(dispex, DISPID_VALUE, 0, DISPATCH_PROPERTYGET, &dp, &var, &ei, NULL); - IDispatchEx_Release(dispex); - ok_(__FILE__,line)(hres == S_OK, "InvokeEx(DISPID_VALUE) returned: %08x\n", hres); - - ok_(__FILE__,line)(V_VT(&var) == VT_BSTR, "V_VT(value) = %d\n", V_VT(&var)); - ok_(__FILE__,line)(!strcmp_wa(V_BSTR(&var), val), "value = %s, expected %s\n", wine_dbgstr_w(V_BSTR(&var)), val); - VariantClear(&var); -} - -#define test_disp(u,id,v) _test_disp(__LINE__,u,id,v) -static void _test_disp(unsigned line, IUnknown *unk, const IID *diid, const char *val) -{ - IID iid; - - if(_test_get_dispid(line, unk, &iid)) - ok_(__FILE__,line) (IsEqualGUID(&iid, diid), "unexpected guid %s\n", dbgstr_guid(&iid)); - - if(val) - _test_disp_value(line, unk, val); -} - -#define test_disp2(u,id,id2,v) _test_disp2(__LINE__,u,id,id2,v) -static void _test_disp2(unsigned line, IUnknown *unk, const IID *diid, const IID *diid2, const char *val) -{ - IID iid; - - if(_test_get_dispid(line, unk, &iid)) - ok_(__FILE__,line) (IsEqualGUID(&iid, diid) || broken(IsEqualGUID(&iid, diid2)), - "unexpected guid %s\n", dbgstr_guid(&iid)); - - if(val) - _test_disp_value(line, unk, val); -} - -#define get_elem_iface(u) _get_elem_iface(__LINE__,u) -static IHTMLElement *_get_elem_iface(unsigned line, IUnknown *unk) -{ - IHTMLElement *elem; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IHTMLElement, (void**)&elem); - ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLElement: %08x\n", hres); - return elem; -} - -#define get_elem2_iface(u) _get_elem2_iface(__LINE__,u) -static IHTMLElement2 *_get_elem2_iface(unsigned line, IUnknown *unk) -{ - IHTMLElement2 *elem; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IHTMLElement2, (void**)&elem); - ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLElement2: %08x\n", hres); - return elem; -} - -#define get_elem3_iface(u) _get_elem3_iface(__LINE__,u) -static IHTMLElement3 *_get_elem3_iface(unsigned line, IUnknown *unk) -{ - IHTMLElement3 *elem; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IHTMLElement3, (void**)&elem); - ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLElement3: %08x\n", hres); - return elem; -} - -#define get_node_iface(u) _get_node_iface(__LINE__,u) -static IHTMLDOMNode *_get_node_iface(unsigned line, IUnknown *unk) -{ - IHTMLDOMNode *node; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IHTMLDOMNode, (void**)&node); - ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLDOMNode: %08x\n", hres); - return node; -} - -#define get_node2_iface(u) _get_node2_iface(__LINE__,u) -static IHTMLDOMNode2 *_get_node2_iface(unsigned line, IUnknown *unk) -{ - IHTMLDOMNode2 *node; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IHTMLDOMNode2, (void**)&node); - ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLDOMNode2: %08x\n", hres); - return node; -} - -#define get_img_iface(u) _get_img_iface(__LINE__,u) -static IHTMLImgElement *_get_img_iface(unsigned line, IUnknown *unk) -{ - IHTMLImgElement *img; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IHTMLImgElement, (void**)&img); - ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLImgElement: %08x\n", hres); - return img; -} - -#define get_anchor_iface(u) _get_anchor_iface(__LINE__,u) -static IHTMLAnchorElement *_get_anchor_iface(unsigned line, IUnknown *unk) -{ - IHTMLAnchorElement *anchor; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IHTMLAnchorElement, (void**)&anchor); - ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLAnchorElement: %08x\n", hres); - return anchor; -} - -#define get_textarea_iface(u) _get_textarea_iface(__LINE__,u) -static IHTMLTextAreaElement *_get_textarea_iface(unsigned line, IUnknown *unk) -{ - IHTMLTextAreaElement *textarea; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IHTMLTextAreaElement, (void**)&textarea); - ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLTextAreaElement: %08x\n", hres); - return textarea; -} - -#define get_select_iface(u) _get_select_iface(__LINE__,u) -static IHTMLSelectElement *_get_select_iface(unsigned line, IUnknown *unk) -{ - IHTMLSelectElement *select; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IHTMLSelectElement, (void**)&select); - ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLSelectElement: %08x\n", hres); - return select; -} - -#define get_form_iface(u) _get_form_iface(__LINE__,u) -static IHTMLFormElement *_get_form_iface(unsigned line, IUnknown *unk) -{ - IHTMLFormElement *form; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IHTMLFormElement, (void**)&form); - ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLFormElement: %08x\n", hres); - return form; -} - -#define get_text_iface(u) _get_text_iface(__LINE__,u) -static IHTMLDOMTextNode *_get_text_iface(unsigned line, IUnknown *unk) -{ - IHTMLDOMTextNode *text; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IHTMLDOMTextNode, (void**)&text); - ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLDOMTextNode: %08x\n", hres); - return text; -} - -#define get_comment_iface(u) _get_comment_iface(__LINE__,u) -static IHTMLCommentElement *_get_comment_iface(unsigned line, IUnknown *unk) -{ - IHTMLCommentElement *comment; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IHTMLCommentElement, (void**)&comment); - ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLCommentElement: %08x\n", hres); - return comment; -} - -#define test_node_name(u,n) _test_node_name(__LINE__,u,n) -static void _test_node_name(unsigned line, IUnknown *unk, const char *exname) -{ - IHTMLDOMNode *node = _get_node_iface(line, unk); - BSTR name; - HRESULT hres; - - hres = IHTMLDOMNode_get_nodeName(node, &name); - IHTMLDOMNode_Release(node); - ok_(__FILE__, line) (hres == S_OK, "get_nodeName failed: %08x\n", hres); - ok_(__FILE__, line) (!strcmp_wa(name, exname), "got name: %s, expected %s\n", wine_dbgstr_w(name), exname); - - SysFreeString(name); -} - -#define get_owner_doc(u) _get_owner_doc(__LINE__,u) -static IHTMLDocument2 *_get_owner_doc(unsigned line, IUnknown *unk) -{ - IHTMLDOMNode2 *node = _get_node2_iface(line, unk); - IDispatch *disp = (void*)0xdeadbeef; - IHTMLDocument2 *doc = NULL; - HRESULT hres; - - hres = IHTMLDOMNode2_get_ownerDocument(node, &disp); - IHTMLDOMNode2_Release(node); - ok_(__FILE__,line)(hres == S_OK, "get_ownerDocument failed: %08x\n", hres); - - if(disp) { - hres = IDispatch_QueryInterface(disp, &IID_IHTMLDocument2, (void**)&doc); - IDispatch_Release(disp); - ok_(__FILE__,line)(hres == S_OK, "Could not get IHTMLDocument2 iface: %08x\n", hres); - } - - return doc; -} - -#define get_doc_window(d) _get_doc_window(__LINE__,d) -static IHTMLWindow2 *_get_doc_window(unsigned line, IHTMLDocument2 *doc) -{ - IHTMLWindow2 *window; - HRESULT hres; - - window = NULL; - hres = IHTMLDocument2_get_parentWindow(doc, &window); - ok_(__FILE__,line)(hres == S_OK, "get_parentWindow failed: %08x\n", hres); - ok_(__FILE__,line)(window != NULL, "window == NULL\n"); - - return window; -} - -#define clone_node(n,d) _clone_node(__LINE__,n,d) -static IHTMLDOMNode *_clone_node(unsigned line, IUnknown *unk, VARIANT_BOOL deep) -{ - IHTMLDOMNode *node = _get_node_iface(line, unk); - IHTMLDOMNode *ret = NULL; - HRESULT hres; - - hres = IHTMLDOMNode_cloneNode(node, deep, &ret); - IHTMLDOMNode_Release(node); - ok_(__FILE__,line)(hres == S_OK, "cloneNode failed: %08x\n", hres); - ok_(__FILE__,line)(ret != NULL, "ret == NULL\n"); - - return ret; - -} - -#define test_elem_tag(u,n) _test_elem_tag(__LINE__,u,n) -static void _test_elem_tag(unsigned line, IUnknown *unk, const char *extag) -{ - IHTMLElement *elem = _get_elem_iface(line, unk); - BSTR tag; - HRESULT hres; - - hres = IHTMLElement_get_tagName(elem, &tag); - IHTMLElement_Release(elem); - ok_(__FILE__, line) (hres == S_OK, "get_tagName failed: %08x\n", hres); - ok_(__FILE__, line) (!strcmp_wa(tag, extag), "got tag: %s, expected %s\n", wine_dbgstr_w(tag), extag); - - SysFreeString(tag); -} - -#define test_elem_type(ifc,t) _test_elem_type(__LINE__,ifc,t) -static void _test_elem_type(unsigned line, IUnknown *unk, elem_type_t type) -{ - _test_elem_tag(line, unk, elem_type_infos[type].tag); - _test_ifaces(line, unk, elem_type_infos[type].iids); - - if(elem_type_infos[type].dispiid && type != ET_A) - _test_disp(line, unk, elem_type_infos[type].dispiid, "[object]"); -} - -#define get_node_type(n) _get_node_type(__LINE__,n) -static LONG _get_node_type(unsigned line, IUnknown *unk) -{ - IHTMLDOMNode *node = _get_node_iface(line, unk); - LONG type = -1; - HRESULT hres; - - hres = IHTMLDOMNode_get_nodeType(node, &type); - ok(hres == S_OK, "get_nodeType failed: %08x\n", hres); - - IHTMLDOMNode_Release(node); - - return type; -} - -#define get_child_nodes(u) _get_child_nodes(__LINE__,u) -static IHTMLDOMChildrenCollection *_get_child_nodes(unsigned line, IUnknown *unk) -{ - IHTMLDOMNode *node = _get_node_iface(line, unk); - IHTMLDOMChildrenCollection *col = NULL; - IDispatch *disp; - HRESULT hres; - - hres = IHTMLDOMNode_get_childNodes(node, &disp); - IHTMLDOMNode_Release(node); - ok_(__FILE__,line) (hres == S_OK, "get_childNodes failed: %08x\n", hres); - if(FAILED(hres)) - return NULL; - - hres = IDispatch_QueryInterface(disp, &IID_IHTMLDOMChildrenCollection, (void**)&col); - IDispatch_Release(disp); - ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLDOMChildrenCollection: %08x\n", hres); - - return col; -} - -#define get_child_item(c,i) _get_child_item(__LINE__,c,i) -static IHTMLDOMNode *_get_child_item(unsigned line, IHTMLDOMChildrenCollection *col, LONG idx) -{ - IHTMLDOMNode *node = NULL; - IDispatch *disp; - HRESULT hres; - - hres = IHTMLDOMChildrenCollection_item(col, idx, &disp); - ok(hres == S_OK, "item failed: %08x\n", hres); - - node = _get_node_iface(line, (IUnknown*)disp); - IDispatch_Release(disp); - - return node; -} - -#define test_elem_attr(e,n,v) _test_elem_attr(__LINE__,e,n,v) -static void _test_elem_attr(unsigned line, IHTMLElement *elem, const char *name, const char *exval) -{ - VARIANT value; - BSTR tmp; - HRESULT hres; - - VariantInit(&value); - - tmp = a2bstr(name); - hres = IHTMLElement_getAttribute(elem, tmp, 0, &value); - SysFreeString(tmp); - ok_(__FILE__,line) (hres == S_OK, "getAttribute failed: %08x\n", hres); - - if(exval) { - ok_(__FILE__,line) (V_VT(&value) == VT_BSTR, "vt=%d\n", V_VT(&value)); - ok_(__FILE__,line) (!strcmp_wa(V_BSTR(&value), exval), "unexpected value %s\n", wine_dbgstr_w(V_BSTR(&value))); - }else { - ok_(__FILE__,line) (V_VT(&value) == VT_NULL, "vt=%d\n", V_VT(&value)); - } - - VariantClear(&value); -} - -#define test_elem_offset(u) _test_elem_offset(__LINE__,u) -static void _test_elem_offset(unsigned line, IUnknown *unk) -{ - IHTMLElement *elem = _get_elem_iface(line, unk); - LONG l; - HRESULT hres; - - hres = IHTMLElement_get_offsetTop(elem, &l); - ok_(__FILE__,line) (hres == S_OK, "get_offsetTop failed: %08x\n", hres); - - hres = IHTMLElement_get_offsetHeight(elem, &l); - ok_(__FILE__,line) (hres == S_OK, "get_offsetHeight failed: %08x\n", hres); - - hres = IHTMLElement_get_offsetWidth(elem, &l); - ok_(__FILE__,line) (hres == S_OK, "get_offsetWidth failed: %08x\n", hres); - - IHTMLElement_Release(elem); -} - -#define get_doc_node(d) _get_doc_node(__LINE__,d) -static IHTMLDocument2 *_get_doc_node(unsigned line, IHTMLDocument2 *doc) -{ - IHTMLWindow2 *window; - IHTMLDocument2 *ret; - HRESULT hres; - - hres = IHTMLDocument2_get_parentWindow(doc, &window); - ok_(__FILE__,line)(hres == S_OK, "get_parentWindow failed: %08x\n", hres); - - hres = IHTMLWindow2_get_document(window, &ret); - ok_(__FILE__,line)(hres == S_OK, "get_document failed: %08x\n", hres); - ok_(__FILE__,line)(ret != NULL, "document = NULL\n"); - - return ret; -} - -#define test_window_name(d,e) _test_window_name(__LINE__,d,e) -static void _test_window_name(unsigned line, IHTMLWindow2 *window, const char *exname) -{ - BSTR name; - HRESULT hres; - - hres = IHTMLWindow2_get_name(window, &name); - ok_(__FILE__,line)(hres == S_OK, "get_name failed: %08x\n", hres); - if(exname) - ok_(__FILE__,line)(!strcmp_wa(name, exname), "name = %s\n", wine_dbgstr_w(name)); - else - ok_(__FILE__,line)(!name, "name = %s\n", wine_dbgstr_w(name)); -} - -#define set_window_name(w,n) _set_window_name(__LINE__,w,n) -static void _set_window_name(unsigned line, IHTMLWindow2 *window, const char *name) -{ - BSTR str; - HRESULT hres; - - str = a2bstr(name); - hres = IHTMLWindow2_put_name(window, str); - SysFreeString(str); - ok_(__FILE__,line)(hres == S_OK, "put_name failed: %08x\n", hres); - - _test_window_name(line, window, name); -} - -#define test_window_length(w,l) _test_window_length(__LINE__,w,l) -static void _test_window_length(unsigned line, IHTMLWindow2 *window, LONG exlen) -{ - LONG length = -1; - HRESULT hres; - - hres = IHTMLWindow2_get_length(window, &length); - ok_(__FILE__,line)(hres == S_OK, "get_length failed: %08x\n", hres); - ok_(__FILE__,line)(length == exlen, "length = %d, expected %d\n", length, exlen); -} - -#define get_frame_content_window(e) _get_frame_content_window(__LINE__,e) -static IHTMLWindow2 *_get_frame_content_window(unsigned line, IUnknown *elem) -{ - IHTMLFrameBase2 *base2; - IHTMLWindow2 *window; - HRESULT hres; - - hres = IUnknown_QueryInterface(elem, &IID_IHTMLFrameBase2, (void**)&base2); - ok(hres == S_OK, "Could not get IHTMFrameBase2 iface: %08x\n", hres); - - window = NULL; - hres = IHTMLFrameBase2_get_contentWindow(base2, &window); - IHTMLFrameBase2_Release(base2); - ok(hres == S_OK, "get_contentWindow failed: %08x\n", hres); - ok(window != NULL, "contentWindow = NULL\n"); - - return window; -} - -static void test_get_set_attr(IHTMLDocument2 *doc) -{ - IHTMLElement *elem; - IHTMLDocument3 *doc3; - HRESULT hres; - BSTR bstr; - VARIANT val; - - /* grab an element to test with */ - hres = IHTMLDocument2_QueryInterface(doc, &IID_IHTMLDocument3, (void**)&doc3); - ok(hres == S_OK, "QueryInterface(IID_IHTMLDocument3) failed: %08x\n", hres); - - hres = IHTMLDocument3_get_documentElement(doc3, &elem); - IHTMLDocument3_Release(doc3); - ok(hres == S_OK, "get_documentElement failed: %08x\n", hres); - - /* get a non-present attribute */ - bstr = a2bstr("notAnAttribute"); - hres = IHTMLElement_getAttribute(elem, bstr, 0, &val); - ok(hres == S_OK, "getAttribute failed: %08x\n", hres); - ok(V_VT(&val) == VT_NULL, "variant type should have been VT_NULL (0x%x), was: 0x%x\n", VT_NULL, V_VT(&val)); - VariantClear(&val); - SysFreeString(bstr); - - /* get a present attribute */ - bstr = a2bstr("scrollHeight"); - hres = IHTMLElement_getAttribute(elem, bstr, 0, &val); - ok(hres == S_OK, "getAttribute failed: %08x\n", hres); - ok(V_VT(&val) == VT_I4, "variant type should have been VT_I4 (0x%x), was: 0x%x\n", VT_I4, V_VT(&val)); - VariantClear(&val); - SysFreeString(bstr); - - /* create a new BSTR attribute */ - bstr = a2bstr("newAttribute"); - - V_VT(&val) = VT_BSTR; - V_BSTR(&val) = a2bstr("the value"); - hres = IHTMLElement_setAttribute(elem, bstr, val, 0); - ok(hres == S_OK, "setAttribute failed: %08x\n", hres); - VariantClear(&val); - - hres = IHTMLElement_getAttribute(elem, bstr, 0, &val); - ok(hres == S_OK, "getAttribute failed: %08x\n", hres); - ok(V_VT(&val) == VT_BSTR, "variant type should have been VT_BSTR (0x%x), was: 0x%x\n", VT_BSTR, V_VT(&val)); - ok(strcmp_wa(V_BSTR(&val), "the value") == 0, "variant value should have been L\"the value\", was %s\n", wine_dbgstr_w(V_BSTR(&val))); - VariantClear(&val); - - /* overwrite the attribute with a BOOL */ - V_VT(&val) = VT_BOOL; - V_BOOL(&val) = VARIANT_TRUE; - hres = IHTMLElement_setAttribute(elem, bstr, val, 0); - ok(hres == S_OK, "setAttribute failed: %08x\n", hres); - VariantClear(&val); - - hres = IHTMLElement_getAttribute(elem, bstr, 0, &val); - ok(hres == S_OK, "getAttribute failed: %08x\n", hres); - ok(V_VT(&val) == VT_BOOL, "variant type should have been VT_BOOL (0x%x), was: 0x%x\n", VT_BOOL, V_VT(&val)); - ok(V_BOOL(&val) == VARIANT_TRUE, "variant value should have been VARIANT_TRUE (0x%x), was %d\n", VARIANT_TRUE, V_BOOL(&val)); - VariantClear(&val); - - SysFreeString(bstr); - - /* case-insensitive */ - bstr = a2bstr("newattribute"); - hres = IHTMLElement_getAttribute(elem, bstr, 0, &val); - ok(hres == S_OK, "getAttribute failed: %08x\n", hres); - ok(V_VT(&val) == VT_BOOL, "variant type should have been VT_BOOL (0x%x), was: 0x%x\n", VT_BOOL, V_VT(&val)); - ok(V_BOOL(&val) == VARIANT_TRUE, "variant value should have been VARIANT_TRUE (0x%x), was %d\n", VARIANT_TRUE, V_BOOL(&val)); - VariantClear(&val); - SysFreeString(bstr); - - IHTMLElement_Release(elem); -} - -#define get_doc_elem(d) _get_doc_elem(__LINE__,d) -static IHTMLElement *_get_doc_elem(unsigned line, IHTMLDocument2 *doc) -{ - IHTMLElement *elem; - IHTMLDocument3 *doc3; - HRESULT hres; - - hres = IHTMLDocument2_QueryInterface(doc, &IID_IHTMLDocument3, (void**)&doc3); - ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLDocument3 interface: %08x\n", hres); - hres = IHTMLDocument3_get_documentElement(doc3, &elem); - ok_(__FILE__,line) (hres == S_OK, "get_documentElement failed: %08x\n", hres); - IHTMLDocument3_Release(doc3); - - return elem; -} - -#define test_anchor_href(a,h) _test_anchor_href(__LINE__,a,h) -static void _test_anchor_href(unsigned line, IUnknown *unk, const char *exhref) -{ - IHTMLAnchorElement *anchor = _get_anchor_iface(line, unk); - BSTR str; - HRESULT hres; - - hres = IHTMLAnchorElement_get_href(anchor, &str); - ok_(__FILE__,line)(hres == S_OK, "get_href failed: %08x\n", hres); - ok_(__FILE__,line)(!strcmp_wa(str, exhref), "href = %s, expected %s\n", wine_dbgstr_w(str), exhref); - SysFreeString(str); - - _test_disp_value(line, unk, exhref); -} - -#define test_option_text(o,t) _test_option_text(__LINE__,o,t) -static void _test_option_text(unsigned line, IHTMLOptionElement *option, const char *text) -{ - BSTR bstr; - HRESULT hres; - - hres = IHTMLOptionElement_get_text(option, &bstr); - ok_(__FILE__,line) (hres == S_OK, "get_text failed: %08x\n", hres); - ok_(__FILE__,line) (!strcmp_wa(bstr, text), "text=%s\n", wine_dbgstr_w(bstr)); - SysFreeString(bstr); -} - -#define test_option_put_text(o,t) _test_option_put_text(__LINE__,o,t) -static void _test_option_put_text(unsigned line, IHTMLOptionElement *option, const char *text) -{ - BSTR bstr; - HRESULT hres; - - bstr = a2bstr(text); - hres = IHTMLOptionElement_put_text(option, bstr); - SysFreeString(bstr); - ok(hres == S_OK, "put_text failed: %08x\n", hres); - - _test_option_text(line, option, text); -} - -#define test_option_value(o,t) _test_option_value(__LINE__,o,t) -static void _test_option_value(unsigned line, IHTMLOptionElement *option, const char *value) -{ - BSTR bstr; - HRESULT hres; - - hres = IHTMLOptionElement_get_value(option, &bstr); - ok_(__FILE__,line) (hres == S_OK, "get_value failed: %08x\n", hres); - ok_(__FILE__,line) (!strcmp_wa(bstr, value), "value=%s\n", wine_dbgstr_w(bstr)); - SysFreeString(bstr); -} - -#define test_option_put_value(o,t) _test_option_put_value(__LINE__,o,t) -static void _test_option_put_value(unsigned line, IHTMLOptionElement *option, const char *value) -{ - BSTR bstr; - HRESULT hres; - - bstr = a2bstr(value); - hres = IHTMLOptionElement_put_value(option, bstr); - SysFreeString(bstr); - ok(hres == S_OK, "put_value failed: %08x\n", hres); - - _test_option_value(line, option, value); -} - -#define test_option_selected(o,s) _test_option_selected(__LINE__,o,s) -static void _test_option_selected(unsigned line, IHTMLOptionElement *option, VARIANT_BOOL ex) -{ - VARIANT_BOOL b = 0x100; - HRESULT hres; - - hres = IHTMLOptionElement_get_selected(option, &b); - ok_(__FILE__,line)(hres == S_OK, "get_selected failed: %08x\n", hres); - ok_(__FILE__,line)(b == ex, "selected = %x, expected %x\n", b, ex); -} - -#define test_option_put_selected(o,s) _test_option_put_selected(__LINE__,o,s) -static void _test_option_put_selected(unsigned line, IHTMLOptionElement *option, VARIANT_BOOL b) -{ - HRESULT hres; - - hres = IHTMLOptionElement_put_selected(option, b); - ok_(__FILE__,line)(hres == S_OK, "put_selected failed: %08x\n", hres); - _test_option_selected(line, option, b); -} - -#define test_textarea_value(t,v) _test_textarea_value(__LINE__,t,v) -static void _test_textarea_value(unsigned line, IUnknown *unk, const char *exval) -{ - IHTMLTextAreaElement *textarea = _get_textarea_iface(line, unk); - BSTR value = (void*)0xdeadbeef; - HRESULT hres; - - hres = IHTMLTextAreaElement_get_value(textarea, &value); - IHTMLTextAreaElement_Release(textarea); - ok_(__FILE__,line)(hres == S_OK, "get_value failed: %08x\n", hres); - if(exval) - ok_(__FILE__,line)(!strcmp_wa(value, exval), "value = %s, expected %s\n", wine_dbgstr_w(value), exval); - else - ok_(__FILE__,line)(!value, "value = %p\n", value); - SysFreeString(value); -} - -#define test_textarea_put_value(t,v) _test_textarea_put_value(__LINE__,t,v) -static void _test_textarea_put_value(unsigned line, IUnknown *unk, const char *value) -{ - IHTMLTextAreaElement *textarea = _get_textarea_iface(line, unk); - BSTR tmp = a2bstr(value); - HRESULT hres; - - hres = IHTMLTextAreaElement_put_value(textarea, tmp); - IHTMLTextAreaElement_Release(textarea); - ok_(__FILE__,line)(hres == S_OK, "put_value failed: %08x\n", hres); - SysFreeString(tmp); - - _test_textarea_value(line, unk, value); -} - -#define test_textarea_readonly(t,v) _test_textarea_readonly(__LINE__,t,v) -static void _test_textarea_readonly(unsigned line, IUnknown *unk, VARIANT_BOOL ex) -{ - IHTMLTextAreaElement *textarea = _get_textarea_iface(line, unk); - VARIANT_BOOL b = 0x100; - HRESULT hres; - - hres = IHTMLTextAreaElement_get_readOnly(textarea, &b); - IHTMLTextAreaElement_Release(textarea); - ok_(__FILE__,line)(hres == S_OK, "get_readOnly failed: %08x\n", hres); - ok_(__FILE__,line)(b == ex, "readOnly = %x, expected %x\n", b, ex); -} - -#define test_textarea_put_readonly(t,v) _test_textarea_put_readonly(__LINE__,t,v) -static void _test_textarea_put_readonly(unsigned line, IUnknown *unk, VARIANT_BOOL b) -{ - IHTMLTextAreaElement *textarea = _get_textarea_iface(line, unk); - HRESULT hres; - - hres = IHTMLTextAreaElement_put_readOnly(textarea, b); - IHTMLTextAreaElement_Release(textarea); - ok_(__FILE__,line)(hres == S_OK, "put_readOnly failed: %08x\n", hres); - - _test_textarea_readonly(line, unk, b); -} - -#define test_comment_text(c,t) _test_comment_text(__LINE__,c,t) -static void _test_comment_text(unsigned line, IUnknown *unk, const char *extext) -{ - IHTMLCommentElement *comment = _get_comment_iface(__LINE__,unk); - BSTR text; - HRESULT hres; - - text = a2bstr(extext); - hres = IHTMLCommentElement_get_text(comment, &text); - ok_(__FILE__,line)(hres == S_OK, "get_text failed: %08x\n", hres); - ok_(__FILE__,line)(!strcmp_wa(text, extext), "text = \"%s\", expected \"%s\"\n", wine_dbgstr_w(text), extext); - - IHTMLCommentElement_Release(comment); - SysFreeString(text); -} - -#define create_option_elem(d,t,v) _create_option_elem(__LINE__,d,t,v) -static IHTMLOptionElement *_create_option_elem(unsigned line, IHTMLDocument2 *doc, - const char *txt, const char *val) -{ - IHTMLOptionElementFactory *factory; - IHTMLOptionElement *option; - IHTMLWindow2 *window; - VARIANT text, value, empty; - HRESULT hres; - - hres = IHTMLDocument2_get_parentWindow(doc, &window); - ok_(__FILE__,line) (hres == S_OK, "get_parentElement failed: %08x\n", hres); - - hres = IHTMLWindow2_get_Option(window, &factory); - IHTMLWindow2_Release(window); - ok_(__FILE__,line) (hres == S_OK, "get_Option failed: %08x\n", hres); - - V_VT(&text) = VT_BSTR; - V_BSTR(&text) = a2bstr(txt); - V_VT(&value) = VT_BSTR; - V_BSTR(&value) = a2bstr(val); - V_VT(&empty) = VT_EMPTY; - - hres = IHTMLOptionElementFactory_create(factory, text, value, empty, empty, &option); - ok_(__FILE__,line) (hres == S_OK, "create failed: %08x\n", hres); - - IHTMLOptionElementFactory_Release(factory); - VariantClear(&text); - VariantClear(&value); - - _test_option_text(line, option, txt); - _test_option_value(line, option, val); - _test_option_selected(line, option, VARIANT_FALSE); - - return option; -} - -#define test_img_width(o,w) _test_img_width(__LINE__,o,w) -static void _test_img_width(unsigned line, IHTMLImgElement *img, const LONG exp) -{ - LONG found = -1; - HRESULT hres; - - hres = IHTMLImgElement_get_width(img, &found); - ok_(__FILE__,line) (hres == S_OK, "get_width failed: %08x\n", hres); - ok_(__FILE__,line) (found == exp, "width=%d\n", found); -} - -#define test_img_put_width(o,w) _test_img_put_width(__LINE__,o,w) -static void _test_img_put_width(unsigned line, IHTMLImgElement *img, const LONG width) -{ - HRESULT hres; - - hres = IHTMLImgElement_put_width(img, width); - ok(hres == S_OK, "put_width failed: %08x\n", hres); - - _test_img_width(line, img, width); -} - -#define test_img_height(o,h) _test_img_height(__LINE__,o,h) -static void _test_img_height(unsigned line, IHTMLImgElement *img, const LONG exp) -{ - LONG found = -1; - HRESULT hres; - - hres = IHTMLImgElement_get_height(img, &found); - ok_(__FILE__,line) (hres == S_OK, "get_height failed: %08x\n", hres); - ok_(__FILE__,line) (found == exp, "height=%d\n", found); -} - -#define test_img_put_height(o,w) _test_img_put_height(__LINE__,o,w) -static void _test_img_put_height(unsigned line, IHTMLImgElement *img, const LONG height) -{ - HRESULT hres; - - hres = IHTMLImgElement_put_height(img, height); - ok(hres == S_OK, "put_height failed: %08x\n", hres); - - _test_img_height(line, img, height); -} - -#define create_img_elem(d,t,v) _create_img_elem(__LINE__,d,t,v) -static IHTMLImgElement *_create_img_elem(unsigned line, IHTMLDocument2 *doc, - LONG wdth, LONG hght) -{ - IHTMLImageElementFactory *factory; - IHTMLImgElement *img; - IHTMLWindow2 *window; - VARIANT width, height; - char buf[16]; - HRESULT hres; - - hres = IHTMLDocument2_get_parentWindow(doc, &window); - ok_(__FILE__,line) (hres == S_OK, "get_parentElement failed: %08x\n", hres); - - hres = IHTMLWindow2_get_Image(window, &factory); - IHTMLWindow2_Release(window); - ok_(__FILE__,line) (hres == S_OK, "get_Image failed: %08x\n", hres); - - test_ifaces((IUnknown*)factory, img_factory_iids); - test_disp((IUnknown*)factory, &IID_IHTMLImageElementFactory, "[object]"); - - if(wdth >= 0){ - snprintf(buf, 16, "%d", wdth); - V_VT(&width) = VT_BSTR; - V_BSTR(&width) = a2bstr(buf); - }else{ - V_VT(&width) = VT_EMPTY; - wdth = 0; - } - - if(hght >= 0){ - snprintf(buf, 16, "%d", hght); - V_VT(&height) = VT_BSTR; - V_BSTR(&height) = a2bstr(buf); - }else{ - V_VT(&height) = VT_EMPTY; - hght = 0; - } - - hres = IHTMLImageElementFactory_create(factory, width, height, &img); - ok_(__FILE__,line) (hres == S_OK, "create failed: %08x\n", hres); - - IHTMLImageElementFactory_Release(factory); - VariantClear(&width); - VariantClear(&height); - - if(SUCCEEDED(hres)) { - _test_img_width(line, img, wdth); - _test_img_height(line, img, hght); - return img; - } - - return NULL; -} - -#define test_select_length(s,l) _test_select_length(__LINE__,s,l) -static void _test_select_length(unsigned line, IHTMLSelectElement *select, LONG length) -{ - LONG len = 0xdeadbeef; - HRESULT hres; - - hres = IHTMLSelectElement_get_length(select, &len); - ok_(__FILE__,line) (hres == S_OK, "get_length failed: %08x\n", hres); - ok_(__FILE__,line) (len == length, "len=%d, expected %d\n", len, length); -} - -#define test_select_put_length(s,l) _test_select_put_length(__LINE__,s,l) -static void _test_select_put_length(unsigned line, IUnknown *unk, LONG length) -{ - IHTMLSelectElement *select = _get_select_iface(line, unk); - HRESULT hres; - - hres = IHTMLSelectElement_put_length(select, length); - ok_(__FILE__,line) (hres == S_OK, "put_length failed: %08x\n", hres); - _test_select_length(line, select, length); - IHTMLSelectElement_Release(select); -} - -#define test_select_selidx(s,i) _test_select_selidx(__LINE__,s,i) -static void _test_select_selidx(unsigned line, IHTMLSelectElement *select, LONG index) -{ - LONG idx = 0xdeadbeef; - HRESULT hres; - - hres = IHTMLSelectElement_get_selectedIndex(select, &idx); - ok_(__FILE__,line) (hres == S_OK, "get_selectedIndex failed: %08x\n", hres); - ok_(__FILE__,line) (idx == index, "idx=%d, expected %d\n", idx, index); -} - -#define test_select_put_selidx(s,i) _test_select_put_selidx(__LINE__,s,i) -static void _test_select_put_selidx(unsigned line, IHTMLSelectElement *select, LONG index) -{ - HRESULT hres; - - hres = IHTMLSelectElement_put_selectedIndex(select, index); - ok_(__FILE__,line) (hres == S_OK, "get_selectedIndex failed: %08x\n", hres); - _test_select_selidx(line, select, index); -} - -#define test_select_value(s,v) _test_select_value(__LINE__,s,v) -static void _test_select_value(unsigned line, IHTMLSelectElement *select, const char *exval) -{ - BSTR val; - HRESULT hres; - - hres = IHTMLSelectElement_get_value(select, &val); - ok_(__FILE__,line) (hres == S_OK, "get_value failed: %08x\n", hres); - if(exval) - ok_(__FILE__,line) (!strcmp_wa(val, exval), "unexpected value %s\n", wine_dbgstr_w(val)); - else - ok_(__FILE__,line) (val == NULL, "val=%s, expected NULL\n", wine_dbgstr_w(val)); -} - -#define test_select_set_value(s,v) _test_select_set_value(__LINE__,s,v) -static void _test_select_set_value(unsigned line, IHTMLSelectElement *select, const char *val) -{ - BSTR bstr; - HRESULT hres; - - bstr = a2bstr(val); - hres = IHTMLSelectElement_put_value(select, bstr); - SysFreeString(bstr); - ok_(__FILE__,line) (hres == S_OK, "put_value failed: %08x\n", hres); -} - -#define test_select_type(s,t) _test_select_type(__LINE__,s,t) -static void _test_select_type(unsigned line, IHTMLSelectElement *select, const char *extype) -{ - BSTR type; - HRESULT hres; - - hres = IHTMLSelectElement_get_type(select, &type); - ok_(__FILE__,line) (hres == S_OK, "get_type failed: %08x\n", hres); - ok_(__FILE__,line) (!strcmp_wa(type, extype), "type=%s, expected %s\n", wine_dbgstr_w(type), extype); -} - -#define test_range_text(r,t) _test_range_text(__LINE__,r,t) -static void _test_range_text(unsigned line, IHTMLTxtRange *range, const char *extext) -{ - BSTR text; - HRESULT hres; - - hres = IHTMLTxtRange_get_text(range, &text); - ok_(__FILE__, line) (hres == S_OK, "get_text failed: %08x\n", hres); - - if(extext) { - ok_(__FILE__, line) (text != NULL, "text == NULL\n"); - ok_(__FILE__, line) (!strcmp_wa(text, extext), "text=%s, expected %s\n", wine_dbgstr_w(text), extext); - }else { - ok_(__FILE__, line) (text == NULL, "text=%s, expected NULL\n", wine_dbgstr_w(text)); - } - - SysFreeString(text); - -} - -#define test_range_collapse(r,b) _test_range_collapse(__LINE__,r,b) -static void _test_range_collapse(unsigned line, IHTMLTxtRange *range, BOOL b) -{ - HRESULT hres; - - hres = IHTMLTxtRange_collapse(range, b); - ok_(__FILE__, line) (hres == S_OK, "collapse failed: %08x\n", hres); - _test_range_text(line, range, NULL); -} - -#define test_range_expand(r,u,b,t) _test_range_expand(__LINE__,r,u,b,t) -static void _test_range_expand(unsigned line, IHTMLTxtRange *range, LPWSTR unit, - VARIANT_BOOL exb, const char *extext) -{ - VARIANT_BOOL b = 0xe0e0; - HRESULT hres; - - hres = IHTMLTxtRange_expand(range, unit, &b); - ok_(__FILE__,line) (hres == S_OK, "expand failed: %08x\n", hres); - ok_(__FILE__,line) (b == exb, "b=%x, expected %x\n", b, exb); - _test_range_text(line, range, extext); -} - -#define test_range_move(r,u,c,e) _test_range_move(__LINE__,r,u,c,e) -static void _test_range_move(unsigned line, IHTMLTxtRange *range, LPWSTR unit, LONG cnt, LONG excnt) -{ - LONG c = 0xdeadbeef; - HRESULT hres; - - hres = IHTMLTxtRange_move(range, unit, cnt, &c); - ok_(__FILE__,line) (hres == S_OK, "move failed: %08x\n", hres); - ok_(__FILE__,line) (c == excnt, "count=%d, expected %d\n", c, excnt); - _test_range_text(line, range, NULL); -} - -#define test_range_movestart(r,u,c,e) _test_range_movestart(__LINE__,r,u,c,e) -static void _test_range_movestart(unsigned line, IHTMLTxtRange *range, - LPWSTR unit, LONG cnt, LONG excnt) -{ - LONG c = 0xdeadbeef; - HRESULT hres; - - hres = IHTMLTxtRange_moveStart(range, unit, cnt, &c); - ok_(__FILE__,line) (hres == S_OK, "move failed: %08x\n", hres); - ok_(__FILE__,line) (c == excnt, "count=%d, expected %d\n", c, excnt); -} - -#define test_range_moveend(r,u,c,e) _test_range_moveend(__LINE__,r,u,c,e) -static void _test_range_moveend(unsigned line, IHTMLTxtRange *range, LPWSTR unit, LONG cnt, LONG excnt) -{ - LONG c = 0xdeadbeef; - HRESULT hres; - - hres = IHTMLTxtRange_moveEnd(range, unit, cnt, &c); - ok_(__FILE__,line) (hres == S_OK, "move failed: %08x\n", hres); - ok_(__FILE__,line) (c == excnt, "count=%d, expected %d\n", c, excnt); -} - -#define test_range_put_text(r,t) _test_range_put_text(__LINE__,r,t) -static void _test_range_put_text(unsigned line, IHTMLTxtRange *range, const char *text) -{ - HRESULT hres; - BSTR bstr = a2bstr(text); - - hres = IHTMLTxtRange_put_text(range, bstr); - ok_(__FILE__,line) (hres == S_OK, "put_text failed: %08x\n", hres); - SysFreeString(bstr); - _test_range_text(line, range, NULL); -} - -#define test_range_inrange(r1,r2,b) _test_range_inrange(__LINE__,r1,r2,b) -static void _test_range_inrange(unsigned line, IHTMLTxtRange *range1, IHTMLTxtRange *range2, VARIANT_BOOL exb) -{ - VARIANT_BOOL b; - HRESULT hres; - - b = 0xe0e0; - hres = IHTMLTxtRange_inRange(range1, range2, &b); - ok_(__FILE__,line) (hres == S_OK, "(1->2) isEqual failed: %08x\n", hres); - ok_(__FILE__,line) (b == exb, "(1->2) b=%x, expected %x\n", b, exb); -} - -#define test_range_isequal(r1,r2,b) _test_range_isequal(__LINE__,r1,r2,b) -static void _test_range_isequal(unsigned line, IHTMLTxtRange *range1, IHTMLTxtRange *range2, VARIANT_BOOL exb) -{ - VARIANT_BOOL b; - HRESULT hres; - - b = 0xe0e0; - hres = IHTMLTxtRange_isEqual(range1, range2, &b); - ok_(__FILE__,line) (hres == S_OK, "(1->2) isEqual failed: %08x\n", hres); - ok_(__FILE__,line) (b == exb, "(1->2) b=%x, expected %x\n", b, exb); - - b = 0xe0e0; - hres = IHTMLTxtRange_isEqual(range2, range1, &b); - ok_(__FILE__,line) (hres == S_OK, "(2->1) isEqual failed: %08x\n", hres); - ok_(__FILE__,line) (b == exb, "(2->1) b=%x, expected %x\n", b, exb); - - if(exb) { - test_range_inrange(range1, range2, VARIANT_TRUE); - test_range_inrange(range2, range1, VARIANT_TRUE); - } -} - -#define test_range_parent(r,t) _test_range_parent(__LINE__,r,t) -static void _test_range_parent(unsigned line, IHTMLTxtRange *range, elem_type_t type) -{ - IHTMLElement *elem; - HRESULT hres; - - hres = IHTMLTxtRange_parentElement(range, &elem); - ok_(__FILE__,line) (hres == S_OK, "parentElement failed: %08x\n", hres); - - _test_elem_type(line, (IUnknown*)elem, type); - - IHTMLElement_Release(elem); -} - -#define test_elem_collection(c,t,l) _test_elem_collection(__LINE__,c,t,l) -static void _test_elem_collection(unsigned line, IUnknown *unk, - const elem_type_t *elem_types, LONG exlen) -{ - IHTMLElementCollection *col; - LONG len; - DWORD i; - VARIANT name, index; - IDispatch *disp, *disp2; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IHTMLElementCollection, (void**)&col); - ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLElementCollection: %08x\n", hres); - - test_disp((IUnknown*)col, &DIID_DispHTMLElementCollection, "[object]"); - - hres = IHTMLElementCollection_get_length(col, &len); - ok_(__FILE__,line) (hres == S_OK, "get_length failed: %08x\n", hres); - ok_(__FILE__,line) (len == exlen, "len=%d, expected %d\n", len, exlen); - - if(len > exlen) - len = exlen; - - V_VT(&index) = VT_EMPTY; - - for(i=0; itest
"); - doc_write(content_doc, TRUE, ""); - - hres = IHTMLDocument2_get_all(content_doc, &col); - ok(hres == S_OK, "get_all failed: %08x\n", hres); - test_elem_collection((IUnknown*)col, all_types, sizeof(all_types)/sizeof(all_types[0])); - IHTMLElementCollection_Release(col); - - hres = IHTMLDocument2_close(content_doc); - ok(hres == S_OK, "close failed: %08x\n", hres); - - owner_doc = get_owner_doc((IUnknown*)content_doc); - ok(!owner_doc, "owner_doc = %p\n", owner_doc); - - IHTMLDocument2_Release(content_doc); -} - -static void test_stylesheet(IDispatch *disp) -{ - IHTMLStyleSheetRulesCollection *col = NULL; - IHTMLStyleSheet *stylesheet; - HRESULT hres; - - hres = IDispatch_QueryInterface(disp, &IID_IHTMLStyleSheet, (void**)&stylesheet); - ok(hres == S_OK, "Could not get IHTMLStyleSheet: %08x\n", hres); - - hres = IHTMLStyleSheet_get_rules(stylesheet, &col); - ok(hres == S_OK, "get_rules failed: %08x\n", hres); - ok(col != NULL, "col == NULL\n"); - - IHTMLStyleSheetRulesCollection_Release(col); - IHTMLStyleSheet_Release(stylesheet); -} - -static void test_stylesheets(IHTMLDocument2 *doc) -{ - IHTMLStyleSheetsCollection *col = NULL; - VARIANT idx, res; - LONG len = 0; - HRESULT hres; - - hres = IHTMLDocument2_get_styleSheets(doc, &col); - ok(hres == S_OK, "get_styleSheets failed: %08x\n", hres); - ok(col != NULL, "col == NULL\n"); - - hres = IHTMLStyleSheetsCollection_get_length(col, &len); - ok(hres == S_OK, "get_length failed: %08x\n", hres); - ok(len == 1, "len=%d\n", len); - - VariantInit(&res); - V_VT(&idx) = VT_I4; - V_I4(&idx) = 0; - - hres = IHTMLStyleSheetsCollection_item(col, &idx, &res); - ok(hres == S_OK, "item failed: %08x\n", hres); - ok(V_VT(&res) == VT_DISPATCH, "V_VT(res) = %d\n", V_VT(&res)); - ok(V_DISPATCH(&res) != NULL, "V_DISPATCH(&res) == NULL\n"); - test_stylesheet(V_DISPATCH(&res)); - VariantClear(&res); - - V_VT(&res) = VT_I4; - V_VT(&idx) = VT_I4; - V_I4(&idx) = 1; - - hres = IHTMLStyleSheetsCollection_item(col, &idx, &res); - ok(hres == E_INVALIDARG, "item failed: %08x, expected E_INVALIDARG\n", hres); - ok(V_VT(&res) == VT_EMPTY, "V_VT(res) = %d\n", V_VT(&res)); - ok(V_DISPATCH(&res) != NULL, "V_DISPATCH(&res) == NULL\n"); - VariantClear(&res); - - IHTMLStyleSheetsCollection_Release(col); -} - -static void test_child_col_disp(IHTMLDOMChildrenCollection *col) -{ - IDispatchEx *dispex; - IHTMLDOMNode *node; - DISPPARAMS dp = {NULL, NULL, 0, 0}; - VARIANT var; - EXCEPINFO ei; - LONG type; - DISPID id; - BSTR bstr; - HRESULT hres; - - static const WCHAR w0[] = {'0',0}; - static const WCHAR w100[] = {'1','0','0',0}; - - hres = IHTMLDOMChildrenCollection_QueryInterface(col, &IID_IDispatchEx, (void**)&dispex); - ok(hres == S_OK, "Could not get IDispatchEx: %08x\n", hres); - - bstr = SysAllocString(w0); - hres = IDispatchEx_GetDispID(dispex, bstr, fdexNameCaseSensitive, &id); - ok(hres == S_OK, "GetDispID failed: %08x\n", hres); - SysFreeString(bstr); - - VariantInit(&var); - hres = IDispatchEx_InvokeEx(dispex, id, LOCALE_NEUTRAL, INVOKE_PROPERTYGET, &dp, &var, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); - ok(V_VT(&var) == VT_DISPATCH, "V_VT(var)=%d\n", V_VT(&var)); - ok(V_DISPATCH(&var) != NULL, "V_DISPATCH(var) == NULL\n"); - node = get_node_iface((IUnknown*)V_DISPATCH(&var)); - type = get_node_type((IUnknown*)node); - ok(type == 3, "type=%d\n", type); - IHTMLDOMNode_Release(node); - VariantClear(&var); - - bstr = SysAllocString(w100); - hres = IDispatchEx_GetDispID(dispex, bstr, fdexNameCaseSensitive, &id); - ok(hres == DISP_E_UNKNOWNNAME, "GetDispID failed: %08x, expected DISP_E_UNKNOWNNAME\n", hres); - SysFreeString(bstr); - - IDispatchEx_Release(dispex); -} - - - -static void test_elems(IHTMLDocument2 *doc) -{ - IHTMLElementCollection *col; - IHTMLDOMChildrenCollection *child_col; - IHTMLElement *elem, *elem2, *elem3; - IHTMLDOMNode *node, *node2; - IHTMLWindow2 *window; - IDispatch *disp; - LONG type; - HRESULT hres; - IHTMLElementCollection *collection; - IHTMLDocument3 *doc3; - BSTR str; - - static const elem_type_t all_types[] = { - ET_HTML, - ET_HEAD, - ET_TITLE, - ET_STYLE, - ET_BODY, - ET_COMMENT, - ET_A, - ET_INPUT, - ET_SELECT, - ET_OPTION, - ET_OPTION, - ET_TEXTAREA, - ET_TABLE, - ET_TBODY, - ET_TR, - ET_TR, - ET_TD, - ET_TD, - ET_SCRIPT, - ET_TEST, - ET_IMG, - ET_IFRAME, - ET_FORM - }; - - static const elem_type_t item_types[] = { - ET_A, - ET_OPTION, - ET_TEXTAREA - }; - - hres = IHTMLDocument2_get_all(doc, &col); - ok(hres == S_OK, "get_all failed: %08x\n", hres); - test_elem_collection((IUnknown*)col, all_types, sizeof(all_types)/sizeof(all_types[0])); - test_elem_col_item(col, "x", item_types, sizeof(item_types)/sizeof(item_types[0])); - IHTMLElementCollection_Release(col); - - hres = IHTMLDocument2_get_images(doc, &collection); - ok(hres == S_OK, "get_images failed: %08x\n", hres); - if(hres == S_OK) - { - static const elem_type_t images_types[] = {ET_IMG}; - test_elem_collection((IUnknown*)collection, images_types, 1); - - IHTMLElementCollection_Release(collection); - } - - hres = IHTMLDocument2_get_links(doc, &collection); - ok(hres == S_OK, "get_links failed: %08x\n", hres); - if(hres == S_OK) - { - static const elem_type_t images_types[] = {ET_A}; - test_elem_collection((IUnknown*)collection, images_types, 1); - - IHTMLElementCollection_Release(collection); - } - - hres = IHTMLDocument2_get_anchors(doc, &collection); - ok(hres == S_OK, "get_anchors failed: %08x\n", hres); - if(hres == S_OK) - { - static const elem_type_t anchor_types[] = {ET_A}; - test_elem_collection((IUnknown*)collection, anchor_types, 1); - - IHTMLElementCollection_Release(collection); - } - - elem = get_doc_elem(doc); - test_elem_all((IUnknown*)elem, all_types+1, sizeof(all_types)/sizeof(all_types[0])-1); - IHTMLElement_Release(elem); - - get_elem_by_id(doc, "xxx", FALSE); - elem = get_doc_elem_by_id(doc, "xxx"); - ok(!elem, "elem != NULL\n"); - - elem = get_doc_elem_by_id(doc, "s"); - ok(elem != NULL, "elem == NULL\n"); - if(elem) { - test_elem_type((IUnknown*)elem, ET_SELECT); - test_elem_attr(elem, "xxx", NULL); - test_elem_attr(elem, "id", "s"); - test_elem_class((IUnknown*)elem, NULL); - test_elem_set_class((IUnknown*)elem, "cl"); - test_elem_set_class((IUnknown*)elem, NULL); - test_elem_tabindex((IUnknown*)elem, 0); - test_elem_set_tabindex((IUnknown*)elem, 1); - test_elem_filters((IUnknown*)elem); - - node = test_node_get_parent((IUnknown*)elem); - ok(node != NULL, "node == NULL\n"); - test_node_name((IUnknown*)node, "BODY"); - node2 = test_node_get_parent((IUnknown*)node); - IHTMLDOMNode_Release(node); - ok(node2 != NULL, "node == NULL\n"); - test_node_name((IUnknown*)node2, "HTML"); - node = test_node_get_parent((IUnknown*)node2); - IHTMLDOMNode_Release(node2); - ok(node != NULL, "node == NULL\n"); - if (node) - { - test_node_name((IUnknown*)node, "#document"); - type = get_node_type((IUnknown*)node); - ok(type == 9, "type=%d, expected 9\n", type); - node2 = test_node_get_parent((IUnknown*)node); - IHTMLDOMNode_Release(node); - ok(node2 == NULL, "node != NULL\n"); - } - - elem2 = test_elem_get_parent((IUnknown*)elem); - ok(elem2 != NULL, "elem2 == NULL\n"); - test_node_name((IUnknown*)elem2, "BODY"); - elem3 = test_elem_get_parent((IUnknown*)elem2); - IHTMLElement_Release(elem2); - ok(elem3 != NULL, "elem3 == NULL\n"); - test_node_name((IUnknown*)elem3, "HTML"); - elem2 = test_elem_get_parent((IUnknown*)elem3); - IHTMLElement_Release(elem3); - ok(elem2 == NULL, "elem2 != NULL\n"); - - test_elem_getelembytag((IUnknown*)elem, ET_OPTION, 2); - test_elem_getelembytag((IUnknown*)elem, ET_SELECT, 0); - test_elem_getelembytag((IUnknown*)elem, ET_HTML, 0); - - test_elem_innertext(elem, "opt1opt2"); - - IHTMLElement_Release(elem); - } - - elem = get_elem_by_id(doc, "s", TRUE); - if(elem) { - IHTMLSelectElement *select = get_select_iface((IUnknown*)elem); - IHTMLDocument2 *doc_node, *elem_doc; - - test_select_elem(select); - - test_elem_title((IUnknown*)select, NULL); - test_elem_set_title((IUnknown*)select, "Title"); - test_elem_title((IUnknown*)select, "Title"); - test_elem_offset((IUnknown*)select); - - node = get_first_child((IUnknown*)select); - ok(node != NULL, "node == NULL\n"); - if(node) { - test_elem_type((IUnknown*)node, ET_OPTION); - IHTMLDOMNode_Release(node); - } - - type = get_node_type((IUnknown*)select); - ok(type == 1, "type=%d\n", type); - - IHTMLSelectElement_Release(select); - - elem_doc = get_elem_doc((IUnknown*)elem); - - doc_node = get_doc_node(doc); - ok(iface_cmp((IUnknown*)elem_doc, (IUnknown*)doc_node), "disp != doc\n"); - IHTMLDocument2_Release(doc_node); - IHTMLDocument2_Release(elem_doc); - - IHTMLElement_Release(elem); - } - - elem = get_elem_by_id(doc, "sc", TRUE); - if(elem) { - IHTMLScriptElement *script; - BSTR type; - - hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLScriptElement, (void**)&script); - ok(hres == S_OK, "Could not get IHTMLScriptElement interface: %08x\n", hres); - - if(hres == S_OK) - { - VARIANT_BOOL vb; - - hres = IHTMLScriptElement_put_type (script, NULL); - ok(hres == S_OK, "put_type failed: %08x\n", hres); - hres = IHTMLScriptElement_get_type(script, &type); - ok(hres == S_OK, "get_type failed: %08x\n", hres); - ok(type == NULL, "Unexpected type %s\n", wine_dbgstr_w(type)); - - hres = IHTMLScriptElement_put_type (script, a2bstr ("text/javascript")); - ok(hres == S_OK, "put_type failed: %08x\n", hres); - hres = IHTMLScriptElement_get_type(script, &type); - ok(hres == S_OK, "get_type failed: %08x\n", hres); - ok(!strcmp_wa(type, "text/javascript"), "Unexpected type %s\n", wine_dbgstr_w(type)); - - SysFreeString(type); - - /* test defer */ - hres = IHTMLScriptElement_put_defer(script, VARIANT_TRUE); - ok(hres == S_OK, "put_defer failed: %08x\n", hres); - - hres = IHTMLScriptElement_get_defer(script, &vb); - ok(hres == S_OK, "get_defer failed: %08x\n", hres); - ok(vb == VARIANT_TRUE, "get_defer result is %08x\n", hres); - - hres = IHTMLScriptElement_put_defer(script, VARIANT_FALSE); - ok(hres == S_OK, "put_defer failed: %08x\n", hres); - } - - IHTMLScriptElement_Release(script); - } - - elem = get_elem_by_id(doc, "in", TRUE); - if(elem) { - IHTMLInputElement *input; - - hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLInputElement, (void**)&input); - ok(hres == S_OK, "Could not get IHTMLInputElement: %08x\n", hres); - - test_elem_id((IUnknown*)elem, "in"); - test_elem_put_id((IUnknown*)elem, "newin"); - test_input_get_disabled(input, VARIANT_FALSE); - test_input_set_disabled(input, VARIANT_TRUE); - test_input_set_disabled(input, VARIANT_FALSE); - test_elem3_set_disabled((IUnknown*)input, VARIANT_TRUE); - test_input_get_disabled(input, VARIANT_TRUE); - test_elem3_set_disabled((IUnknown*)input, VARIANT_FALSE); - test_input_get_disabled(input, VARIANT_FALSE); - test_elem_client_size((IUnknown*)elem); - test_input_type(input, "text"); - - test_node_get_value_str((IUnknown*)elem, NULL); - test_node_put_value_str((IUnknown*)elem, "test"); - test_node_get_value_str((IUnknown*)elem, NULL); - test_input_value((IUnknown*)elem, NULL); - test_input_put_value((IUnknown*)elem, "test"); - test_input_value((IUnknown*)elem, NULL); - test_elem_class((IUnknown*)elem, "testclass"); - test_elem_tabindex((IUnknown*)elem, 2); - test_elem_set_tabindex((IUnknown*)elem, 3); - test_elem_title((IUnknown*)elem, "test title"); - - test_input_get_defaultchecked(input, VARIANT_FALSE); - test_input_set_defaultchecked(input, VARIANT_TRUE); - test_input_set_defaultchecked(input, VARIANT_FALSE); - - test_input_get_checked(input, VARIANT_FALSE); - test_input_set_checked(input, VARIANT_TRUE); - test_input_set_checked(input, VARIANT_FALSE); - - test_input_name(input, NULL); - test_input_set_name(input, "test"); - - test_input_src(input, NULL); - test_input_set_src(input, "about:blank"); - - IHTMLInputElement_Release(input); - IHTMLElement_Release(elem); - } - - elem = get_elem_by_id(doc, "imgid", TRUE); - if(elem) { - test_img_src((IUnknown*)elem, ""); - test_img_set_src((IUnknown*)elem, "about:blank"); - test_img_alt((IUnknown*)elem, NULL); - test_img_set_alt((IUnknown*)elem, "alt test"); - test_img_name((IUnknown*)elem, "WineImg"); - IHTMLElement_Release(elem); - } - - elem = get_doc_elem_by_id(doc, "tbl"); - ok(elem != NULL, "elem == NULL\n"); - if(elem) { - test_table_elem(elem); - IHTMLElement_Release(elem); - } - - elem = get_doc_elem_by_id(doc, "row2"); - ok(elem != NULL, "elem == NULL\n"); - if(elem) { - test_tr_elem(elem); - IHTMLElement_Release(elem); - } - - elem = get_doc_elem_by_id(doc, "ifr"); - ok(elem != NULL, "elem == NULL\n"); - if(elem) { - test_iframe_elem(elem); - IHTMLElement_Release(elem); - } - - elem = get_elem_by_id(doc, "a", TRUE); - if(elem) { - test_anchor_href((IUnknown*)elem, "http://test/"); - IHTMLElement_Release(elem); - } - - hres = IHTMLDocument2_get_body(doc, &elem); - ok(hres == S_OK, "get_body failed: %08x\n", hres); - - node = get_first_child((IUnknown*)elem); - ok(node != NULL, "node == NULL\n"); - if(node) { - test_ifaces((IUnknown*)node, text_iids); - test_disp((IUnknown*)node, &DIID_DispHTMLDOMTextNode, "[object]"); - - node2 = get_first_child((IUnknown*)node); - ok(!node2, "node2 != NULL\n"); - - type = get_node_type((IUnknown*)node); - ok(type == 3, "type=%d\n", type); - - test_node_get_value_str((IUnknown*)node, "text test"); - test_node_put_value_str((IUnknown*)elem, "test text"); - test_node_get_value_str((IUnknown*)node, "text test"); - - IHTMLDOMNode_Release(node); - } - - child_col = get_child_nodes((IUnknown*)elem); - ok(child_col != NULL, "child_coll == NULL\n"); - if(child_col) { - LONG length = 0; - - test_disp((IUnknown*)child_col, &DIID_DispDOMChildrenCollection, "[object]"); - - hres = IHTMLDOMChildrenCollection_get_length(child_col, &length); - ok(hres == S_OK, "get_length failed: %08x\n", hres); - ok(length, "length=0\n"); - - node2 = NULL; - node = get_child_item(child_col, 0); - ok(node != NULL, "node == NULL\n"); - if(node) { - type = get_node_type((IUnknown*)node); - ok(type == 3, "type=%d\n", type); - node2 = node_get_next((IUnknown*)node); - IHTMLDOMNode_Release(node); - } - - node = get_child_item(child_col, 1); - ok(node != NULL, "node == NULL\n"); - if(node) { - type = get_node_type((IUnknown*)node); - ok(type == 8, "type=%d\n", type); - - test_elem_id((IUnknown*)node, NULL); - ok(iface_cmp((IUnknown*)node2, (IUnknown*)node), "node2 != node\n"); - IHTMLDOMNode_Release(node2); - IHTMLDOMNode_Release(node); - } - - hres = IHTMLDOMChildrenCollection_item(child_col, length - 1, NULL); - ok(hres == E_POINTER, "item failed: %08x, expected E_POINTER\n", hres); - - hres = IHTMLDOMChildrenCollection_item(child_col, length, NULL); - ok(hres == E_POINTER, "item failed: %08x, expected E_POINTER\n", hres); - - hres = IHTMLDOMChildrenCollection_item(child_col, 6000, &disp); - ok(hres == E_INVALIDARG, "item failed: %08x, expected E_INVALIDARG\n", hres); - - hres = IHTMLDOMChildrenCollection_item(child_col, length, &disp); - ok(hres == E_INVALIDARG, "item failed: %08x, expected E_INVALIDARG\n", hres); - - test_child_col_disp(child_col); - - IHTMLDOMChildrenCollection_Release(child_col); - } - - test_elem3_get_disabled((IUnknown*)elem, VARIANT_FALSE); - test_elem3_set_disabled((IUnknown*)elem, VARIANT_TRUE); - test_elem3_set_disabled((IUnknown*)elem, VARIANT_FALSE); - - IHTMLElement_Release(elem); - - elem = get_doc_elem_by_id(doc, "frm"); - ok(elem != NULL, "elem == NULL\n"); - if(elem) { - test_form_length((IUnknown*)elem, 0); - IHTMLElement_Release(elem); - } - - test_stylesheets(doc); - test_create_option_elem(doc); - test_create_img_elem(doc); - - elem = get_doc_elem_by_id(doc, "tbl"); - ok(elem != NULL, "elem = NULL\n"); - test_elem_set_innertext(elem, "inner text"); - IHTMLElement_Release(elem); - - test_doc_title(doc, "test"); - test_doc_set_title(doc, "test title"); - test_doc_title(doc, "test title"); - - disp = NULL; - hres = IHTMLDocument2_get_Script(doc, &disp); - ok(hres == S_OK, "get_Script failed: %08x\n", hres); - if(hres == S_OK) - { - IDispatchEx *dispex; - hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex); - ok(hres == S_OK, "IDispatch_QueryInterface failed: %08x\n", hres); - if(hres == S_OK) - { - DISPID pid = -1; - BSTR str = a2bstr("Testing"); - hres = IDispatchEx_GetDispID(dispex, str, 1, &pid); - ok(hres == S_OK, "GetDispID failed: %08x\n", hres); - ok(pid != -1, "pid == -1\n"); - SysFreeString(str); - IDispatchEx_Release(dispex); - } - } - IDispatch_Release(disp); - - hres = IHTMLDocument2_QueryInterface(doc, &IID_IHTMLDocument3, (void**)&doc3); - ok(hres == S_OK, "Could not get IHTMLDocument3 iface: %08x\n", hres); - - str = a2bstr("img"); - hres = IHTMLDocument3_getElementsByTagName(doc3, str, &col); - ok(hres == S_OK, "getElementsByTagName(%s) failed: %08x\n", wine_dbgstr_w(str), hres); - SysFreeString(str); - if(hres == S_OK) - { - static const elem_type_t img_types[] = { ET_IMG }; - - test_elem_collection((IUnknown*)col, img_types, sizeof(img_types)/sizeof(img_types[0])); - IHTMLElementCollection_Release(col); - } - - elem = get_doc_elem_by_id(doc, "y"); - test_elem_set_innerhtml((IUnknown*)elem, "inner html"); - test_elem_innerhtml((IUnknown*)elem, "inner html"); - test_elem_set_innerhtml((IUnknown*)elem, ""); - test_elem_innerhtml((IUnknown*)elem, NULL); - node = node_get_next((IUnknown*)elem); - ok(!node, "node = %p\n", node); - - elem2 = get_doc_elem_by_id(doc, "x"); - test_elem_tag((IUnknown*)elem2, "A"); - node = node_get_next((IUnknown*)elem2); - IHTMLDOMNode_Release(node); - IHTMLElement_Release(elem2); - IHTMLElement_Release(elem); - - IHTMLDocument3_Release(doc3); - - elem = get_elem_by_id(doc, "s", TRUE); - if(elem) { - static const elem_type_t select_types[] = { ET_OPTION, ET_OPTION, ET_OPTION }; - - test_select_put_length((IUnknown*)elem, 3); - test_elem_all((IUnknown*)elem, select_types, sizeof(select_types)/sizeof(*select_types)); - test_select_put_length((IUnknown*)elem, 1); - test_elem_all((IUnknown*)elem, select_types, 1); - IHTMLElement_Release(elem); - } - - window = get_doc_window(doc); - test_window_name(window, NULL); - set_window_name(window, "test name"); - test_window_length(window, 1); - IHTMLWindow2_Release(window); -} - -static void test_elems2(IHTMLDocument2 *doc) -{ - IHTMLElement *elem, *elem2, *div; - - static const elem_type_t outer_types[] = { - ET_BR, - ET_A - }; - - div = get_doc_elem_by_id(doc, "divid"); - - test_elem_set_innerhtml((IUnknown*)div, "
"); - elem2 = get_doc_elem_by_id(doc, "innerid"); - ok(elem2 != NULL, "elem2 == NULL\n"); - test_elem_set_outerhtml((IUnknown*)elem2, "
a"); - test_elem_all((IUnknown*)div, outer_types, sizeof(outer_types)/sizeof(*outer_types)); - IHTMLElement_Release(elem2); - - elem2 = get_doc_elem_by_id(doc, "aid"); - ok(elem2 != NULL, "elem2 == NULL\n"); - test_elem_set_outerhtml((IUnknown*)elem2, ""); - test_elem_all((IUnknown*)div, outer_types, 1); - IHTMLElement_Release(elem2); - - test_elem_set_innerhtml((IUnknown*)div, ""); - elem = get_elem_by_id(doc, "ta", TRUE); - if(elem) { - test_textarea_value((IUnknown*)elem, NULL); - test_textarea_put_value((IUnknown*)elem, "test"); - test_textarea_readonly((IUnknown*)elem, VARIANT_FALSE); - test_textarea_put_readonly((IUnknown*)elem, VARIANT_TRUE); - test_textarea_put_readonly((IUnknown*)elem, VARIANT_FALSE); - IHTMLElement_Release(elem); - } - - test_elem_set_innerhtml((IUnknown*)div, - "
"); - elem = get_elem_by_id(doc, "form", TRUE); - if(elem) { - test_form_length((IUnknown*)elem, 2); - test_form_item(elem); - test_form_action((IUnknown*)elem, NULL); - test_form_put_action((IUnknown*)elem, "about:blank"); - IHTMLElement_Release(elem); - } - - IHTMLElement_Release(div); -} - -static void test_create_elems(IHTMLDocument2 *doc) -{ - IHTMLElement *elem, *body, *elem2; - IHTMLDOMNode *node, *node2, *node3, *comment; - IHTMLDocument5 *doc5; - IDispatch *disp; - VARIANT var; - LONG type; - HRESULT hres; - BSTR str; - - static const elem_type_t types1[] = { ET_TESTG }; - - elem = test_create_elem(doc, "TEST"); - test_elem_tag((IUnknown*)elem, "TEST"); - type = get_node_type((IUnknown*)elem); - ok(type == 1, "type=%d\n", type); - test_ifaces((IUnknown*)elem, elem_iids); - test_disp((IUnknown*)elem, &DIID_DispHTMLGenericElement, "[object]"); - - hres = IHTMLDocument2_get_body(doc, &body); - ok(hres == S_OK, "get_body failed: %08x\n", hres); - test_node_has_child((IUnknown*)body, VARIANT_FALSE); - - node = test_node_append_child((IUnknown*)body, (IUnknown*)elem); - test_node_has_child((IUnknown*)body, VARIANT_TRUE); - elem2 = get_elem_iface((IUnknown*)node); - IHTMLElement_Release(elem2); - - hres = IHTMLElement_get_all(body, &disp); - ok(hres == S_OK, "get_all failed: %08x\n", hres); - test_elem_collection((IUnknown*)disp, types1, sizeof(types1)/sizeof(types1[0])); - IDispatch_Release(disp); - - test_node_remove_child((IUnknown*)body, node); - - hres = IHTMLElement_get_all(body, &disp); - ok(hres == S_OK, "get_all failed: %08x\n", hres); - test_elem_collection((IUnknown*)disp, NULL, 0); - IDispatch_Release(disp); - test_node_has_child((IUnknown*)body, VARIANT_FALSE); - - IHTMLElement_Release(elem); - IHTMLDOMNode_Release(node); - - node = test_create_text(doc, "test"); - test_ifaces((IUnknown*)node, text_iids); - test_disp((IUnknown*)node, &DIID_DispHTMLDOMTextNode, "[object]"); - test_text_length((IUnknown*)node, 4); - - V_VT(&var) = VT_NULL; - node2 = test_node_insertbefore((IUnknown*)body, node, &var); - IHTMLDOMNode_Release(node); - - node = test_create_text(doc, "insert "); - - V_VT(&var) = VT_DISPATCH; - V_DISPATCH(&var) = (IDispatch*)node2; - node3 = test_node_insertbefore((IUnknown*)body, node, &var); - IHTMLDOMNode_Release(node); - IHTMLDOMNode_Release(node2); - IHTMLDOMNode_Release(node3); - - test_elem_innertext(body, "insert test"); - test_elem_innerhtml((IUnknown*)body, "insert test"); - - hres = IHTMLDocument2_QueryInterface(doc, &IID_IHTMLDocument5, (void**)&doc5); - if(hres == S_OK) - { - str = a2bstr("testing"); - hres = IHTMLDocument5_createComment(doc5, str, &comment); - SysFreeString(str); - ok(hres == S_OK, "createComment failed: %08x\n", hres); - if(hres == S_OK) - { - type = get_node_type((IUnknown*)comment); - ok(type == 8, "type=%d, expected 8\n", type); - - test_node_get_value_str((IUnknown*)comment, "testing"); - test_elem_title((IUnknown*)comment, NULL); - test_elem_set_title((IUnknown*)comment, "comment title"); - test_elem_title((IUnknown*)comment, "comment title"); - test_comment_text((IUnknown*)comment, ""); - test_elem_outerhtml((IUnknown*)comment, ""); - - IHTMLDOMNode_Release(comment); - } - - IHTMLDocument5_Release(doc5); - } - - IHTMLElement_Release(body); -} - -static void test_null_write(IHTMLDocument2 *doc) -{ - HRESULT hres; - - doc_write(doc, FALSE, NULL); - doc_write(doc, TRUE, NULL); - - hres = IHTMLDocument2_write(doc, NULL); - ok(hres == S_OK, - "Expected IHTMLDocument2::write to return S_OK, got 0x%08x\n", hres); - - hres = IHTMLDocument2_writeln(doc, NULL); - ok(hres == S_OK, - "Expected IHTMLDocument2::writeln to return S_OK, got 0x%08x\n", hres); -} - -static void test_exec(IUnknown *unk, const GUID *grpid, DWORD cmdid, VARIANT *in, VARIANT *out) -{ - IOleCommandTarget *cmdtrg; - HRESULT hres; - - hres = IHTMLTxtRange_QueryInterface(unk, &IID_IOleCommandTarget, (void**)&cmdtrg); - ok(hres == S_OK, "Could not get IOleCommandTarget interface: %08x\n", hres); - - hres = IOleCommandTarget_Exec(cmdtrg, grpid, cmdid, 0, in, out); - ok(hres == S_OK, "Exec failed: %08x\n", hres); - - IOleCommandTarget_Release(cmdtrg); -} - -static void test_indent(IHTMLDocument2 *doc) -{ - IHTMLElementCollection *col; - IHTMLTxtRange *range; - HRESULT hres; - - static const elem_type_t all_types[] = { - ET_HTML, - ET_HEAD, - ET_TITLE, - ET_BODY, - ET_BR, - ET_A, - }; - - static const elem_type_t indent_types[] = { - ET_HTML, - ET_HEAD, - ET_TITLE, - ET_BODY, - ET_BLOCKQUOTE, - ET_P, - ET_BR, - ET_A, - }; - - hres = IHTMLDocument2_get_all(doc, &col); - ok(hres == S_OK, "get_all failed: %08x\n", hres); - test_elem_collection((IUnknown*)col, all_types, sizeof(all_types)/sizeof(all_types[0])); - IHTMLElementCollection_Release(col); - - range = test_create_body_range(doc); - test_exec((IUnknown*)range, &CGID_MSHTML, IDM_INDENT, NULL, NULL); - IHTMLTxtRange_Release(range); - - hres = IHTMLDocument2_get_all(doc, &col); - ok(hres == S_OK, "get_all failed: %08x\n", hres); - test_elem_collection((IUnknown*)col, indent_types, sizeof(indent_types)/sizeof(indent_types[0])); - IHTMLElementCollection_Release(col); -} - -static void test_cond_comment(IHTMLDocument2 *doc) -{ - IHTMLElementCollection *col; - HRESULT hres; - - static const elem_type_t all_types[] = { - ET_HTML, - ET_HEAD, - ET_TITLE, - ET_BODY, - ET_BR - }; - - hres = IHTMLDocument2_get_all(doc, &col); - ok(hres == S_OK, "get_all failed: %08x\n", hres); - test_elem_collection((IUnknown*)col, all_types, sizeof(all_types)/sizeof(all_types[0])); - IHTMLElementCollection_Release(col); -} - -static void test_frame(IDispatch *disp, const char *exp_id) -{ - IHTMLWindow2 *frame2, *parent, *top; - IHTMLDocument2 *parent_doc, *top_doc; - IHTMLWindow4 *frame; - IHTMLFrameBase *frame_elem; - HRESULT hres; - - hres = IDispatch_QueryInterface(disp, &IID_IHTMLWindow4, (void**)&frame); - ok(hres == S_OK, "Could not get IHTMLWindow4 interface: 0x%08x\n", hres); - if(FAILED(hres)) - return; - - hres = IHTMLWindow4_get_frameElement(frame, &frame_elem); - ok(hres == S_OK, "IHTMLWindow4_get_frameElement failed: 0x%08x\n", hres); - IHTMLWindow4_Release(frame); - if(FAILED(hres)) - return; - - test_elem_type((IUnknown*)frame_elem, ET_FRAME); - test_frame_doc((IUnknown*)frame_elem, FALSE); - test_elem_id((IUnknown*)frame_elem, exp_id); - IHTMLElement_Release(frame_elem); - - hres = IDispatch_QueryInterface(disp, &IID_IHTMLWindow2, (void**)&frame2); - ok(hres == S_OK, "Could not get IHTMLWindow2 interface: 0x%08x\n", hres); - if(FAILED(hres)) - return; - - hres = IHTMLWindow2_get_parent(frame2, &parent); - ok(hres == S_OK, "IHTMLWindow2_get_parent failed: 0x%08x\n", hres); - if(FAILED(hres)){ - IHTMLWindow2_Release(frame2); - return; - } - - hres = IHTMLWindow2_get_document(parent, &parent_doc); - ok(hres == S_OK, "IHTMLWindow2_get_document failed: 0x%08x\n", hres); - IHTMLWindow2_Release(parent); - if(FAILED(hres)){ - IHTMLWindow2_Release(frame2); - return; - } - - test_doc_title(parent_doc, "frameset test"); - IHTMLDocument2_Release(parent_doc); - - /* test get_top */ - hres = IHTMLWindow2_get_top(frame2, &top); - ok(hres == S_OK, "IHTMLWindow2_get_top failed: 0x%08x\n", hres); - IHTMLWindow2_Release(frame2); - if(FAILED(hres)) - return; - - hres = IHTMLWindow2_get_document(top, &top_doc); - ok(hres == S_OK, "IHTMLWindow2_get_document failed: 0x%08x\n", hres); - IHTMLWindow2_Release(top); - if(FAILED(hres)) - return; - - test_doc_title(top_doc, "frameset test"); - IHTMLDocument2_Release(top_doc); -} - -static void test_frameset(IHTMLDocument2 *doc) -{ - IHTMLWindow2 *window; - IHTMLFramesCollection2 *frames; - IHTMLElement *elem; - IHTMLFrameBase *fbase; - LONG length; - VARIANT index_var, result_var; - BSTR str; - HRESULT hres; - - window = get_doc_window(doc); - - /* test using IHTMLFramesCollection object */ - - hres = IHTMLWindow2_get_frames(window, &frames); - ok(hres == S_OK, "IHTMLWindow2_get_frames failed: 0x%08x\n", hres); - IHTMLWindow2_Release(window); - if(FAILED(hres)) - return; - - /* test result length */ - hres = IHTMLFramesCollection2_get_length(frames, &length); - ok(hres == S_OK, "IHTMLFramesCollection2_get_length failed: 0x%08x\n", hres); - ok(length == 3, "IHTMLFramesCollection2_get_length should have been 3, was: %d\n", length); - - /* test first frame */ - V_VT(&index_var) = VT_I4; - V_I4(&index_var) = 0; - hres = IHTMLFramesCollection2_item(frames, &index_var, &result_var); - ok(hres == S_OK, "IHTMLFramesCollection2_item failed: 0x%08x\n", hres); - if(SUCCEEDED(hres)) { - ok(V_VT(&result_var) == VT_DISPATCH, "result type should have been VT_DISPATCH, was: 0x%x\n", V_VT(&result_var)); - test_frame((IDispatch*)V_DISPATCH(&result_var), "fr1"); - } - VariantClear(&result_var); - - /* test second frame */ - V_I4(&index_var) = 1; - hres = IHTMLFramesCollection2_item(frames, &index_var, &result_var); - ok(hres == S_OK, "IHTMLFramesCollection2_item failed: 0x%08x\n", hres); - if(SUCCEEDED(hres)) { - ok(V_VT(&result_var) == VT_DISPATCH, "result type should have been VT_DISPATCH, was: 0x%x\n", V_VT(&result_var)); - test_frame((IDispatch*)V_DISPATCH(&result_var), "fr2"); - } - VariantClear(&result_var); - - /* fail on next frame */ - V_I4(&index_var) = 3; - hres = IHTMLFramesCollection2_item(frames, &index_var, &result_var); - ok(hres == DISP_E_MEMBERNOTFOUND, "IHTMLFramesCollection2_item should have" - "failed with DISP_E_MEMBERNOTFOUND, instead: 0x%08x\n", hres); - VariantClear(&result_var); - - /* string argument (element id lookup) */ - V_VT(&index_var) = VT_BSTR; - V_BSTR(&index_var) = a2bstr("fr1"); - hres = IHTMLFramesCollection2_item(frames, &index_var, &result_var); - ok(hres == S_OK, "IHTMLFramesCollection2_item failed: 0x%08x\n", hres); - if(SUCCEEDED(hres)) { - ok(V_VT(&result_var) == VT_DISPATCH, "result type should have been VT_DISPATCH, was: 0x%x\n", V_VT(&result_var)); - test_frame(V_DISPATCH(&result_var), "fr1"); - } - VariantClear(&result_var); - VariantClear(&index_var); - - /* invalid argument */ - V_VT(&index_var) = VT_BOOL; - V_BOOL(&index_var) = VARIANT_TRUE; - hres = IHTMLFramesCollection2_item(frames, &index_var, &result_var); - ok(hres == E_INVALIDARG, "IHTMLFramesCollection2_item should have" - "failed with E_INVALIDARG, instead: 0x%08x\n", hres); - VariantClear(&result_var); - - IHTMLFramesCollection2_Release(frames); - - /* test using IHTMLWindow2 inheritance */ - - /* test result length */ - hres = IHTMLWindow2_get_length(window, &length); - ok(hres == S_OK, "IHTMLWindow2_get_length failed: 0x%08x\n", hres); - ok(length == 3, "IHTMLWindow2_get_length should have been 3, was: %d\n", length); - - /* test first frame */ - V_VT(&index_var) = VT_I4; - V_I4(&index_var) = 0; - hres = IHTMLWindow2_item(window, &index_var, &result_var); - ok(hres == S_OK, "IHTMLWindow2_item failed: 0x%08x\n", hres); - if(SUCCEEDED(hres)) { - ok(V_VT(&result_var) == VT_DISPATCH, "result type should have been VT_DISPATCH, was: 0x%x\n", V_VT(&result_var)); - test_frame((IDispatch*)V_DISPATCH(&result_var), "fr1"); - } - VariantClear(&result_var); - - /* test second frame */ - V_I4(&index_var) = 1; - hres = IHTMLWindow2_item(window, &index_var, &result_var); - ok(hres == S_OK, "IHTMLWindow2_item failed: 0x%08x\n", hres); - if(SUCCEEDED(hres)) { - ok(V_VT(&result_var) == VT_DISPATCH, "result type should have been VT_DISPATCH, was: 0x%x\n", V_VT(&result_var)); - test_frame((IDispatch*)V_DISPATCH(&result_var), "fr2"); - } - VariantClear(&result_var); - - /* fail on next frame */ - V_I4(&index_var) = 3; - hres = IHTMLWindow2_item(window, &index_var, &result_var); - ok(hres == DISP_E_MEMBERNOTFOUND, "IHTMLWindow2_item should have" - "failed with DISP_E_MEMBERNOTFOUND, instead: 0x%08x\n", hres); - VariantClear(&result_var); - - /* string argument (element id lookup) */ - V_VT(&index_var) = VT_BSTR; - V_BSTR(&index_var) = a2bstr("fr2"); - hres = IHTMLWindow2_item(window, &index_var, &result_var); - ok(hres == S_OK, "IHTMLWindow2_item failed: 0x%08x\n", hres); - if(SUCCEEDED(hres)) { - ok(V_VT(&result_var) == VT_DISPATCH, "result type should have been VT_DISPATCH, was: 0x%x\n", V_VT(&result_var)); - test_frame((IDispatch*)V_DISPATCH(&result_var), "fr2"); - } - VariantClear(&result_var); - VariantClear(&index_var); - - /* invalid argument */ - V_VT(&index_var) = VT_BOOL; - V_BOOL(&index_var) = VARIANT_TRUE; - hres = IHTMLWindow2_item(window, &index_var, &result_var); - ok(hres == E_INVALIDARG, "IHTMLWindow2_item should have" - "failed with E_INVALIDARG, instead: 0x%08x\n", hres); - VariantClear(&result_var); - - /* getElementById with node name attributes */ - elem = get_doc_elem_by_id(doc, "nm1"); - test_elem_id((IUnknown*)elem, "fr1"); - - /* get/put scrolling */ - hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLFrameBase, (void**)&fbase); - ok(hres == S_OK, "Could not get IHTMLFrameBase interface: 0x%08x\n", hres); - - hres = IHTMLFrameBase_get_scrolling(fbase, &str); - ok(hres == S_OK, "IHTMLFrameBase_get_scrolling failed: 0x%08x\n", hres); - ok(!strcmp_wa(str, "auto"), "get_scrolling should have given 'auto', gave: %s\n", wine_dbgstr_w(str)); - SysFreeString(str); - - str = a2bstr("no"); - hres = IHTMLFrameBase_put_scrolling(fbase, str); - ok(hres == S_OK, "IHTMLFrameBase_put_scrolling failed: 0x%08x\n", hres); - SysFreeString(str); - - hres = IHTMLFrameBase_get_scrolling(fbase, &str); - ok(hres == S_OK, "IHTMLFrameBase_get_scrolling failed: 0x%08x\n", hres); - ok(!strcmp_wa(str, "no"), "get_scrolling should have given 'no', gave: %s\n", wine_dbgstr_w(str)); - SysFreeString(str); - - str = a2bstr("junk"); - hres = IHTMLFrameBase_put_scrolling(fbase, str); - ok(hres == E_INVALIDARG, "IHTMLFrameBase_put_scrolling should have failed " - "with E_INVALIDARG, instead: 0x%08x\n", hres); - SysFreeString(str); - - hres = IHTMLFrameBase_get_scrolling(fbase, &str); - ok(hres == S_OK, "IHTMLFrameBase_get_scrolling failed: 0x%08x\n", hres); - ok(!strcmp_wa(str, "no"), "get_scrolling should have given 'no', gave: %s\n", wine_dbgstr_w(str)); - SysFreeString(str); - - /* get_name */ - hres = IHTMLFrameBase_get_name(fbase, &str); - ok(hres == S_OK, "IHTMLFrameBase_get_name failed: 0x%08x\n", hres); - ok(!strcmp_wa(str, "nm1"), "get_name should have given 'nm1', gave: %s\n", wine_dbgstr_w(str)); - SysFreeString(str); - - IHTMLFrameBase_Release(fbase); - IHTMLElement_Release(elem); - - /* get_name with no name attr */ - elem = get_doc_elem_by_id(doc, "fr3"); - hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLFrameBase, (void**)&fbase); - ok(hres == S_OK, "Could not get IHTMLFrameBase interface: 0x%08x\n", hres); - - hres = IHTMLFrameBase_get_name(fbase, &str); - ok(hres == S_OK, "IHTMLFrameBase_get_name failed: 0x%08x\n", hres); - ok(str == NULL, "get_name should have given 'null', gave: %s\n", wine_dbgstr_w(str)); - SysFreeString(str); - - IHTMLFrameBase_Release(fbase); - IHTMLElement_Release(elem); -} - -static IHTMLDocument2 *notif_doc; -static BOOL doc_complete; - -static HRESULT WINAPI PropertyNotifySink_QueryInterface(IPropertyNotifySink *iface, - REFIID riid, void**ppv) -{ - if(IsEqualGUID(&IID_IPropertyNotifySink, riid)) { - *ppv = iface; - return S_OK; - } - - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI PropertyNotifySink_AddRef(IPropertyNotifySink *iface) -{ - return 2; -} - -static ULONG WINAPI PropertyNotifySink_Release(IPropertyNotifySink *iface) -{ - return 1; -} - -static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, DISPID dispID) -{ - if(dispID == DISPID_READYSTATE){ - BSTR state; - HRESULT hres; - - hres = IHTMLDocument2_get_readyState(notif_doc, &state); - ok(hres == S_OK, "get_readyState failed: %08x\n", hres); - - if(!strcmp_wa(state, "complete")) - doc_complete = TRUE; - - SysFreeString(state); - } - - return S_OK; -} - -static HRESULT WINAPI PropertyNotifySink_OnRequestEdit(IPropertyNotifySink *iface, DISPID dispID) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static IPropertyNotifySinkVtbl PropertyNotifySinkVtbl = { - PropertyNotifySink_QueryInterface, - PropertyNotifySink_AddRef, - PropertyNotifySink_Release, - PropertyNotifySink_OnChanged, - PropertyNotifySink_OnRequestEdit -}; - -static IPropertyNotifySink PropertyNotifySink = { &PropertyNotifySinkVtbl }; - -static IHTMLDocument2 *create_doc_with_string(const char *str) -{ - IPersistStreamInit *init; - IStream *stream; - IHTMLDocument2 *doc; - HGLOBAL mem; - SIZE_T len; - - notif_doc = doc = create_document(); - if(!doc) - return NULL; - - doc_complete = FALSE; - len = strlen(str); - mem = GlobalAlloc(0, len); - memcpy(mem, str, len); - CreateStreamOnHGlobal(mem, TRUE, &stream); - - IHTMLDocument2_QueryInterface(doc, &IID_IPersistStreamInit, (void**)&init); - - IPersistStreamInit_Load(init, stream); - IPersistStreamInit_Release(init); - IStream_Release(stream); - - return doc; -} - -static void do_advise(IUnknown *unk, REFIID riid, IUnknown *unk_advise) -{ - IConnectionPointContainer *container; - IConnectionPoint *cp; - DWORD cookie; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IConnectionPointContainer, (void**)&container); - ok(hres == S_OK, "QueryInterface(IID_IConnectionPointContainer) failed: %08x\n", hres); - - hres = IConnectionPointContainer_FindConnectionPoint(container, riid, &cp); - IConnectionPointContainer_Release(container); - ok(hres == S_OK, "FindConnectionPoint failed: %08x\n", hres); - - hres = IConnectionPoint_Advise(cp, unk_advise, &cookie); - IConnectionPoint_Release(cp); - ok(hres == S_OK, "Advise failed: %08x\n", hres); -} - -typedef void (*domtest_t)(IHTMLDocument2*); - -static void run_domtest(const char *str, domtest_t test) -{ - IHTMLDocument2 *doc; - ULONG ref; - MSG msg; - - doc = create_doc_with_string(str); - if(!doc) - return; - - do_advise((IUnknown*)doc, &IID_IPropertyNotifySink, (IUnknown*)&PropertyNotifySink); - - while(!doc_complete && GetMessage(&msg, NULL, 0, 0)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - test(doc); - - ref = IHTMLDocument2_Release(doc); - ok(!ref || - ref == 1, /* Vista */ - "ref = %d\n", ref); -} - -START_TEST(dom) -{ - CoInitialize(NULL); - - run_domtest(doc_str1, test_doc_elem); - run_domtest(doc_str1, test_get_set_attr); - run_domtest(range_test_str, test_txtrange); - run_domtest(range_test2_str, test_txtrange2); - if (winetest_interactive || ! is_ie_hardened()) { - run_domtest(elem_test_str, test_elems); - }else { - skip("IE running in Enhanced Security Configuration\n"); - } - run_domtest(elem_test2_str, test_elems2); - run_domtest(doc_blank, test_create_elems); - run_domtest(doc_blank, test_defaults); - run_domtest(doc_blank, test_null_write); - run_domtest(indent_test_str, test_indent); - run_domtest(cond_comment_str, test_cond_comment); - run_domtest(frameset_str, test_frameset); - - CoUninitialize(); -} diff --git a/rostests/winetests/mshtml/events.c b/rostests/winetests/mshtml/events.c deleted file mode 100644 index deafd54180c..00000000000 --- a/rostests/winetests/mshtml/events.c +++ /dev/null @@ -1,2034 +0,0 @@ -/* - * Copyright 2008-2009 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 - */ - -#define COBJMACROS -#define CONST_VTABLE - -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "ole2.h" -#include "mshtml.h" -#include "mshtmdid.h" -#include "docobj.h" -#include "hlink.h" -#include "dispex.h" - -#define DEFINE_EXPECT(func) \ - static BOOL expect_ ## func = FALSE, called_ ## func = FALSE - -#define SET_EXPECT(func) \ - do { called_ ## func = FALSE; expect_ ## func = TRUE; } while(0) - -#define CHECK_EXPECT2(func) \ - do { \ - trace(#func "\n"); \ - ok(expect_ ##func, "unexpected call " #func "\n"); \ - called_ ## func = TRUE; \ - }while(0) - -#define CHECK_EXPECT(func) \ - do { \ - CHECK_EXPECT2(func); \ - expect_ ## func = FALSE; \ - }while(0) - -#define CHECK_CALLED(func) \ - do { \ - ok(called_ ## func, "expected " #func "\n"); \ - expect_ ## func = called_ ## func = FALSE; \ - }while(0) - -DEFINE_EXPECT(document_onclick); -DEFINE_EXPECT(body_onclick); -DEFINE_EXPECT(div_onclick); -DEFINE_EXPECT(div_onclick_attached); -DEFINE_EXPECT(timeout); -DEFINE_EXPECT(doccp_onclick); -DEFINE_EXPECT(div_onclick_disp); -DEFINE_EXPECT(iframe_onreadystatechange_loading); -DEFINE_EXPECT(iframe_onreadystatechange_interactive); -DEFINE_EXPECT(iframe_onreadystatechange_complete); -DEFINE_EXPECT(iframedoc_onreadystatechange); -DEFINE_EXPECT(img_onload); - -static HWND container_hwnd = NULL; -static IHTMLWindow2 *window; -static IOleDocumentView *view; -static BOOL xy_todo; - -typedef struct { - LONG x; - LONG y; - LONG offset_x; - LONG offset_y; -} xy_test_t; - -static const xy_test_t no_xy = {-10,-10,-10,-10}; -static const xy_test_t zero_xy = {0,0,0,0}; - -static const char empty_doc_str[] = - ""; - -static const char click_doc_str[] = - "" - "
click here
" - ""; - -static const char readystate_doc_str[] = - ""; - -static const char img_doc_str[] = - ""; - -static const char *debugstr_guid(REFIID riid) -{ - static char buf[50]; - - sprintf(buf, "{%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]); - - return buf; -} - -static int strcmp_wa(LPCWSTR strw, const char *stra) -{ - CHAR buf[512]; - WideCharToMultiByte(CP_ACP, 0, strw, -1, buf, sizeof(buf), NULL, NULL); - return lstrcmpA(stra, buf); -} - -static BSTR a2bstr(const char *str) -{ - BSTR ret; - int len; - - len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); - ret = SysAllocStringLen(NULL, len-1); - MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len); - - return ret; -} - -static BOOL iface_cmp(IUnknown *iface1, IUnknown *iface2) -{ - IUnknown *unk1, *unk2; - - if(iface1 == iface2) - return TRUE; - - IUnknown_QueryInterface(iface1, &IID_IUnknown, (void**)&unk1); - IUnknown_Release(unk1); - IUnknown_QueryInterface(iface1, &IID_IUnknown, (void**)&unk2); - IUnknown_Release(unk2); - - return unk1 == unk2; -} - -#define test_disp(u,id) _test_disp(__LINE__,u,id) -static void _test_disp(unsigned line, IUnknown *unk, const IID *diid) -{ - IDispatchEx *dispex; - ITypeInfo *typeinfo; - UINT ticnt; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IDispatchEx, (void**)&dispex); - ok_(__FILE__,line) (hres == S_OK, "Could not get IDispatch: %08x\n", hres); - if(FAILED(hres)) - return; - - ticnt = 0xdeadbeef; - hres = IDispatchEx_GetTypeInfoCount(dispex, &ticnt); - ok_(__FILE__,line) (hres == S_OK, "GetTypeInfoCount failed: %08x\n", hres); - ok_(__FILE__,line) (ticnt == 1, "ticnt=%u\n", ticnt); - - hres = IDispatchEx_GetTypeInfo(dispex, 0, 0, &typeinfo); - ok_(__FILE__,line) (hres == S_OK, "GetTypeInfo failed: %08x\n", hres); - - if(SUCCEEDED(hres)) { - TYPEATTR *type_attr; - - hres = ITypeInfo_GetTypeAttr(typeinfo, &type_attr); - ok_(__FILE__,line) (hres == S_OK, "GetTypeAttr failed: %08x\n", hres); - ok_(__FILE__,line) (IsEqualGUID(&type_attr->guid, diid), "unexpected guid %s\n", - debugstr_guid(&type_attr->guid)); - - ITypeInfo_ReleaseTypeAttr(typeinfo, type_attr); - ITypeInfo_Release(typeinfo); - } - - IDispatchEx_Release(dispex); -} - -#define get_doc3_iface(u) _get_doc3_iface(__LINE__,u) -static IHTMLDocument3 *_get_doc3_iface(unsigned line, IUnknown *unk) -{ - IHTMLDocument3 *doc3; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IHTMLDocument3, (void**)&doc3); - ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLDocument3 iface: %08x\n", hres); - - return doc3; -} - -#define get_elem_iface(u) _get_elem_iface(__LINE__,u) -static IHTMLElement *_get_elem_iface(unsigned line, IUnknown *unk) -{ - IHTMLElement *elem; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IHTMLElement, (void**)&elem); - ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLElement iface: %08x\n", hres); - - return elem; -} - -#define get_elem2_iface(u) _get_elem2_iface(__LINE__,u) -static IHTMLElement2 *_get_elem2_iface(unsigned line, IUnknown *unk) -{ - IHTMLElement2 *elem2; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IHTMLElement2, (void**)&elem2); - ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLElement2 iface: %08x\n", hres); - - return elem2; -} - -#define get_elem3_iface(u) _get_elem3_iface(__LINE__,u) -static IHTMLElement3 *_get_elem3_iface(unsigned line, IUnknown *unk) -{ - IHTMLElement3 *elem3; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IHTMLElement3, (void**)&elem3); - ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLElement3 iface: %08x\n", hres); - - return elem3; -} - -#define doc_get_body(d) _doc_get_body(__LINE__,d) -static IHTMLElement *_doc_get_body(unsigned line, IHTMLDocument2 *doc) -{ - IHTMLElement *body = NULL; - HRESULT hres; - - hres = IHTMLDocument2_get_body(doc, &body); - ok_(__FILE__,line) (hres == S_OK, "get_body failed: %08x\n", hres); - ok_(__FILE__,line) (body != NULL, "body == NULL\n"); - - return body; -} - -#define get_elem_id(d,i) _get_elem_id(__LINE__,d,i) -static IHTMLElement *_get_elem_id(unsigned line, IHTMLDocument2 *doc, const char *id) -{ - IHTMLDocument3 *doc3 = _get_doc3_iface(line, (IUnknown*)doc); - IHTMLElement *elem; - BSTR str; - HRESULT hres; - - str = a2bstr(id); - hres = IHTMLDocument3_getElementById(doc3, str, &elem); - SysFreeString(str); - IHTMLDocument3_Release(doc3); - ok_(__FILE__,line) (hres == S_OK, "getElementById failed: %08x\n", hres); - - return elem; -} - -#define test_elem_tag(u,n) _test_elem_tag(__LINE__,u,n) -static void _test_elem_tag(unsigned line, IUnknown *unk, const char *extag) -{ - IHTMLElement *elem = _get_elem_iface(line, unk); - BSTR tag; - HRESULT hres; - - hres = IHTMLElement_get_tagName(elem, &tag); - IHTMLElement_Release(elem); - ok_(__FILE__, line) (hres == S_OK, "get_tagName failed: %08x\n", hres); - ok_(__FILE__, line) (!strcmp_wa(tag, extag), "got tag: %s, expected %s\n", wine_dbgstr_w(tag), extag); - - SysFreeString(tag); -} - -#define get_event_obj() _get_event_obj(__LINE__) -static IHTMLEventObj *_get_event_obj(unsigned line) -{ - IHTMLEventObj *event = NULL; - HRESULT hres; - - hres = IHTMLWindow2_get_event(window, &event); - ok_(__FILE__,line) (hres == S_OK, "get_event failed: %08x\n", hres); - ok_(__FILE__,line) (event != NULL, "event = NULL\n"); - _test_disp(line, (IUnknown*)event, &DIID_DispCEventObj); - - return event; -} - -#define elem_fire_event(a,b,c) _elem_fire_event(__LINE__,a,b,c) -static void _elem_fire_event(unsigned line, IUnknown *unk, const char *event, VARIANT *evobj) -{ - IHTMLElement3 *elem3 = _get_elem3_iface(line, unk); - VARIANT_BOOL b; - BSTR str; - HRESULT hres; - - b = 100; - str = a2bstr(event); - hres = IHTMLElement3_fireEvent(elem3, str, evobj, &b); - SysFreeString(str); - ok_(__FILE__,line)(hres == S_OK, "fireEvent failed: %08x\n", hres); - ok_(__FILE__,line)(b == VARIANT_TRUE, "fireEvent returned %x\n", b); -} - -#define test_event_args(a,b,c,d,e,f,g) _test_event_args(__LINE__,a,b,c,d,e,f,g) -static void _test_event_args(unsigned line, const IID *dispiid, DISPID id, WORD wFlags, DISPPARAMS *pdp, - VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) -{ - ok_(__FILE__,line) (id == DISPID_VALUE, "id = %d\n", id); - ok_(__FILE__,line) (wFlags == DISPATCH_METHOD, "wFlags = %x\n", wFlags); - ok_(__FILE__,line) (pdp != NULL, "pdp == NULL\n"); - ok_(__FILE__,line) (pdp->cArgs == 1, "pdp->cArgs = %d\n", pdp->cArgs); - ok_(__FILE__,line) (pdp->cNamedArgs == 1, "pdp->cNamedArgs = %d\n", pdp->cNamedArgs); - ok_(__FILE__,line) (pdp->rgdispidNamedArgs[0] == DISPID_THIS, "pdp->rgdispidNamedArgs[0] = %d\n", - pdp->rgdispidNamedArgs[0]); - ok_(__FILE__,line) (V_VT(pdp->rgvarg) == VT_DISPATCH, "V_VT(rgvarg) = %d\n", V_VT(pdp->rgvarg)); - ok_(__FILE__,line) (pvarRes != NULL, "pvarRes == NULL\n"); - ok_(__FILE__,line) (pei != NULL, "pei == NULL"); - ok_(__FILE__,line) (!pspCaller, "pspCaller != NULL\n"); - - if(dispiid) - _test_disp(line, (IUnknown*)V_DISPATCH(pdp->rgvarg), dispiid); -} - -#define test_attached_event_args(a,b,c,d,e) _test_attached_event_args(__LINE__,a,b,c,d,e) -static void _test_attached_event_args(unsigned line, DISPID id, WORD wFlags, DISPPARAMS *pdp, - VARIANT *pvarRes, EXCEPINFO *pei) -{ - IHTMLEventObj *event; - - ok(id == DISPID_VALUE, "id = %d\n", id); - ok(wFlags == DISPATCH_METHOD, "wFlags = %x\n", wFlags); - ok(pdp != NULL, "pDispParams == NULL\n"); - ok(pdp->cArgs == 1, "pdp->cArgs = %d\n", pdp->cArgs); - ok(!pdp->cNamedArgs, "pdp->cNamedArgs = %d\n", pdp->cNamedArgs); - ok(!pdp->rgdispidNamedArgs, "pdp->rgdispidNamedArgs = %p\n", pdp->rgdispidNamedArgs); - ok(pdp->rgvarg != NULL, "rgvarg = NULL\n"); - ok(pvarRes != NULL, "pvarRes = NULL\n"); - ok(pei != NULL, "pei = NULL\n"); - ok(V_VT(pvarRes) == VT_EMPTY, "V_VT(pVarRes) = %d\n", V_VT(pvarRes)); - ok(V_VT(pdp->rgvarg) == VT_DISPATCH, "V_VT(pdp->rgvarg) = %d\n", V_VT(pdp->rgvarg)); - ok(V_DISPATCH(pdp->rgvarg) != NULL, "V_DISPATCH(pdp->rgvarg) = %p\n", V_DISPATCH(pdp->rgvarg)); - - event = _get_event_obj(line); - ok(iface_cmp((IUnknown*)event, (IUnknown*)V_DISPATCH(pdp->rgvarg)), "event != arg0\n"); - IHTMLEventObj_Release(event); -} - -#define get_event_src() _get_event_src(__LINE__) -static IHTMLElement *_get_event_src(unsigned line) -{ - IHTMLEventObj *event = _get_event_obj(line); - IHTMLElement *src_elem = NULL; - HRESULT hres; - - hres = IHTMLEventObj_get_srcElement(event, &src_elem); - IHTMLEventObj_Release(event); - ok_(__FILE__,line) (hres == S_OK, "get_srcElement failed: %08x\n", hres); - - return src_elem; -} - -#define test_event_src(t) _test_event_src(__LINE__,t) -static void _test_event_src(unsigned line, const char *src_tag) -{ - IHTMLElement *src_elem = _get_event_src(line); - - if(src_tag) { - ok_(__FILE__,line) (src_elem != NULL, "src_elem = NULL\n"); - _test_elem_tag(line, (IUnknown*)src_elem, src_tag); - IHTMLElement_Release(src_elem); - }else { - ok_(__FILE__,line) (!src_elem, "src_elem != NULL\n"); - } -} - -static void _test_event_altkey(unsigned line, IHTMLEventObj *event, VARIANT_BOOL exval) -{ - VARIANT_BOOL b; - HRESULT hres; - - hres = IHTMLEventObj_get_altKey(event, &b); - ok_(__FILE__,line)(hres == S_OK, "get_altKey failed: %08x\n", hres); - ok_(__FILE__,line)(b == exval, "altKey = %x, expected %x\n", b, exval); -} - -static void _test_event_ctrlkey(unsigned line, IHTMLEventObj *event, VARIANT_BOOL exval) -{ - VARIANT_BOOL b; - HRESULT hres; - - hres = IHTMLEventObj_get_ctrlKey(event, &b); - ok_(__FILE__,line)(hres == S_OK, "get_ctrlKey failed: %08x\n", hres); - ok_(__FILE__,line)(b == exval, "ctrlKey = %x, expected %x\n", b, exval); -} - -static void _test_event_shiftkey(unsigned line, IHTMLEventObj *event, VARIANT_BOOL exval) -{ - VARIANT_BOOL b; - HRESULT hres; - - hres = IHTMLEventObj_get_shiftKey(event, &b); - ok_(__FILE__,line)(hres == S_OK, "get_shiftKey failed: %08x\n", hres); - ok_(__FILE__,line)(b == exval, "shiftKey = %x, expected %x\n", b, exval); -} - -static void _test_event_cancelbubble(unsigned line, IHTMLEventObj *event, VARIANT_BOOL exval) -{ - VARIANT_BOOL b; - HRESULT hres; - - hres = IHTMLEventObj_get_cancelBubble(event, &b); - ok_(__FILE__,line)(hres == S_OK, "get_cancelBubble failed: %08x\n", hres); - ok_(__FILE__,line)(b == exval, "cancelBubble = %x, expected %x\n", b, exval); -} - -static void _test_event_fromelem(unsigned line, IHTMLEventObj *event, const char *from_tag) -{ - IHTMLElement *elem; - HRESULT hres; - - hres = IHTMLEventObj_get_fromElement(event, &elem); - ok_(__FILE__,line)(hres == S_OK, "get_fromElement failed: %08x\n", hres); - if(from_tag) - _test_elem_tag(line, (IUnknown*)elem, from_tag); - else - ok_(__FILE__,line)(elem == NULL, "fromElement != NULL\n"); - if(elem) - IHTMLElement_Release(elem); -} - -static void _test_event_toelem(unsigned line, IHTMLEventObj *event, const char *to_tag) -{ - IHTMLElement *elem; - HRESULT hres; - - hres = IHTMLEventObj_get_toElement(event, &elem); - ok_(__FILE__,line)(hres == S_OK, "get_toElement failed: %08x\n", hres); - if(to_tag) - _test_elem_tag(line, (IUnknown*)elem, to_tag); - else - ok_(__FILE__,line)(elem == NULL, "toElement != NULL\n"); - if(elem) - IHTMLElement_Release(elem); -} - -static void _test_event_keycode(unsigned line, IHTMLEventObj *event, LONG exl) -{ - LONG l; - HRESULT hres; - - hres = IHTMLEventObj_get_keyCode(event, &l); - ok_(__FILE__,line)(hres == S_OK, "get_keyCode failed: %08x\n", hres); - ok_(__FILE__,line)(l == exl, "keyCode = %x, expected %x\n", l, exl); -} - -static void _test_event_button(unsigned line, IHTMLEventObj *event, LONG exl) -{ - LONG l; - HRESULT hres; - - hres = IHTMLEventObj_get_button(event, &l); - ok_(__FILE__,line)(hres == S_OK, "get_button failed: %08x\n", hres); - ok_(__FILE__,line)(l == exl, "button = %x, expected %x\n", l, exl); -} - -static void _test_event_reason(unsigned line, IHTMLEventObj *event, LONG exl) -{ - LONG l; - HRESULT hres; - - hres = IHTMLEventObj_get_reason(event, &l); - ok_(__FILE__,line)(hres == S_OK, "get_reason failed: %08x\n", hres); - ok_(__FILE__,line)(l == exl, "reason = %x, expected %x\n", l, exl); -} - -static void _test_event_x(unsigned line, IHTMLEventObj *event, LONG exl) -{ - LONG l; - HRESULT hres; - - hres = IHTMLEventObj_get_x(event, &l); - ok_(__FILE__,line)(hres == S_OK, "get_x failed: %08x\n", hres); - if(exl != -10) /* don't test the exact value */ - ok_(__FILE__,line)(l == exl, "x = %d, expected %d\n", l, exl); -} - -static void _test_event_y(unsigned line, IHTMLEventObj *event, LONG exl) -{ - LONG l; - HRESULT hres; - - hres = IHTMLEventObj_get_y(event, &l); - ok_(__FILE__,line)(hres == S_OK, "get_y failed: %08x\n", hres); - if(exl != -10) /* don't test the exact value */ - ok_(__FILE__,line)(l == exl, "y = %d, expected %d\n", l, exl); -} - -static void _test_event_clientx(unsigned line, IHTMLEventObj *event, LONG exl) -{ - LONG l; - HRESULT hres; - - hres = IHTMLEventObj_get_clientX(event, &l); - ok_(__FILE__,line)(hres == S_OK, "get_clientX failed: %08x\n", hres); - if(exl != -10) /* don't test the exact value */ - ok_(__FILE__,line)(l == exl, "clientX = %d, expected %d\n", l, exl); -} - -static void _test_event_clienty(unsigned line, IHTMLEventObj *event, LONG exl) -{ - LONG l; - HRESULT hres; - - hres = IHTMLEventObj_get_clientY(event, &l); - ok_(__FILE__,line)(hres == S_OK, "get_clientY failed: %08x\n", hres); - if(exl != -10) /* don't test the exact value */ - ok_(__FILE__,line)(l == exl, "clientY = %d, expected %d\n", l, exl); -} - -static void _test_event_offsetx(unsigned line, IHTMLEventObj *event, LONG exl) -{ - LONG l; - HRESULT hres; - - hres = IHTMLEventObj_get_offsetX(event, &l); - ok_(__FILE__,line)(hres == S_OK, "get_offsetX failed: %08x\n", hres); - if(exl != -10) /* don't test the exact value */ - ok_(__FILE__,line)(l == exl, "offsetX = %d, expected %d\n", l, exl); -} - -static void _test_event_offsety(unsigned line, IHTMLEventObj *event, LONG exl) -{ - LONG l; - HRESULT hres; - - hres = IHTMLEventObj_get_offsetY(event, &l); - ok_(__FILE__,line)(hres == S_OK, "get_offsetY failed: %08x\n", hres); - if(exl != -10) /* don't test the exact value */ - ok_(__FILE__,line)(l == exl, "offsetY = %d, expected %d\n", l, exl); -} - -static void _test_event_screenx(unsigned line, IHTMLEventObj *event, LONG exl) -{ - LONG l; - HRESULT hres; - - hres = IHTMLEventObj_get_screenX(event, &l); - ok_(__FILE__,line)(hres == S_OK, "get_screenX failed: %08x\n", hres); - if(exl != -10) /* don't test the exact value */ - ok_(__FILE__,line)(l == exl, "screenX = %d, expected %d\n", l, exl); -} - -static void _test_event_screeny(unsigned line, IHTMLEventObj *event, LONG exl) -{ - LONG l; - HRESULT hres; - - hres = IHTMLEventObj_get_screenY(event, &l); - ok_(__FILE__,line)(hres == S_OK, "get_screenY failed: %08x\n", hres); - if(exl != -10) /* don't test the exact value for -10 */ - ok_(__FILE__,line)(l == exl, "screenY = %d, expected %d\n", l, exl); -} - -static void _test_event_type(unsigned line, IHTMLEventObj *event, const char *exstr) -{ - BSTR str; - HRESULT hres; - - hres = IHTMLEventObj_get_type(event, &str); - ok_(__FILE__,line)(hres == S_OK, "get_type failed: %08x\n", hres); - ok_(__FILE__,line)(!strcmp_wa(str, exstr), "type = %s, expected %s\n", wine_dbgstr_w(str), exstr); -} - -static void _test_event_qualifier(unsigned line, IHTMLEventObj *event, const char *exstr) -{ - BSTR str; - HRESULT hres; - - hres = IHTMLEventObj_get_qualifier(event, &str); - ok_(__FILE__,line)(hres == S_OK, "get_qualifier failed: %08x\n", hres); - if(exstr) - ok_(__FILE__,line)(!strcmp_wa(str, exstr), "qualifier = %s, expected %s\n", wine_dbgstr_w(str), exstr); - else - ok_(__FILE__,line)(!str, "qualifier != NULL\n"); -} - -static void _test_event_srcfilter(unsigned line, IHTMLEventObj *event) -{ - IDispatch *disp; - HRESULT hres; - - hres = IHTMLEventObj_get_srcFilter(event, &disp); - ok_(__FILE__,line)(hres == S_OK, "get_srcFilter failed: %08x\n", hres); - ok_(__FILE__,line)(!disp, "srcFilter != NULL\n"); -} - -#define test_event_obj(t,x) _test_event_obj(__LINE__,t,x) -static void _test_event_obj(unsigned line, const char *type, const xy_test_t *xy) -{ - IHTMLEventObj *event = _get_event_obj(line); - VARIANT v; - HRESULT hres; - - _test_event_altkey(line, event, VARIANT_FALSE); - _test_event_ctrlkey(line, event, VARIANT_FALSE); - _test_event_shiftkey(line, event, VARIANT_FALSE); - _test_event_cancelbubble(line, event, VARIANT_FALSE); - _test_event_fromelem(line, event, NULL); - _test_event_toelem(line, event, NULL); - _test_event_keycode(line, event, 0); - _test_event_button(line, event, 0); - _test_event_type(line, event, type); - _test_event_qualifier(line, event, NULL); - _test_event_reason(line, event, 0); - _test_event_srcfilter(line, event); - _test_event_x(line, event, xy->x); - _test_event_y(line, event, xy->y); - _test_event_clientx(line, event, -10); - _test_event_clienty(line, event, -10); - _test_event_offsetx(line, event, xy->offset_x); - _test_event_offsety(line, event, xy->offset_y); - _test_event_screenx(line, event, -10); - _test_event_screeny(line, event, -10); - - hres = IHTMLEventObj_get_returnValue(event, &v); - ok_(__FILE__,line)(hres == S_OK, "get_returnValue failed: %08x\n", hres); - ok_(__FILE__,line)(V_VT(&v) == VT_EMPTY, "V_VT(returnValue) = %d\n", V_VT(&v)); - - IHTMLEventObj_Release(event); -} - -#define elem_attach_event(a,b,c) _elem_attach_event(__LINE__,a,b,c) -static void _elem_attach_event(unsigned line, IUnknown *unk, const char *namea, IDispatch *disp) -{ - IHTMLElement2 *elem = _get_elem2_iface(line, unk); - VARIANT_BOOL res; - BSTR name; - HRESULT hres; - - name = a2bstr(namea); - hres = IHTMLElement2_attachEvent(elem, name, disp, &res); - IHTMLElement2_Release(elem); - SysFreeString(name); - ok_(__FILE__,line)(hres == S_OK, "attachEvent failed: %08x\n", hres); - ok_(__FILE__,line)(res == VARIANT_TRUE, "attachEvent returned %x\n", res); -} - -#define elem_detach_event(a,b,c) _elem_detach_event(__LINE__,a,b,c) -static void _elem_detach_event(unsigned line, IUnknown *unk, const char *namea, IDispatch *disp) -{ - IHTMLElement2 *elem = _get_elem2_iface(line, unk); - BSTR name; - HRESULT hres; - - name = a2bstr(namea); - hres = IHTMLElement2_detachEvent(elem, name, disp); - IHTMLElement2_Release(elem); - SysFreeString(name); - ok_(__FILE__,line)(hres == S_OK, "detachEvent failed: %08x\n", hres); -} - -static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv) -{ - *ppv = NULL; - - if(IsEqualGUID(riid, &IID_IUnknown) - || IsEqualGUID(riid, &IID_IDispatch) - || IsEqualGUID(riid, &IID_IDispatchEx)) - *ppv = iface; - else { - ok(0, "unexpected riid %s\n", debugstr_guid(riid)); - return E_NOINTERFACE; - } - - return S_OK; -} - -static HRESULT WINAPI Dispatch_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv) -{ - *ppv = NULL; - - if(IsEqualGUID(riid, &IID_IUnknown) - || IsEqualGUID(riid, &IID_IDispatch)) { - *ppv = iface; - }else if(IsEqualGUID(riid, &IID_IDispatchEx)) { - return E_NOINTERFACE; - }else { - ok(0, "unexpected riid %s\n", debugstr_guid(riid)); - return E_NOINTERFACE; - } - - return S_OK; -} - -static ULONG WINAPI DispatchEx_AddRef(IDispatchEx *iface) -{ - return 2; -} - -static ULONG WINAPI DispatchEx_Release(IDispatchEx *iface) -{ - return 1; -} - -static HRESULT WINAPI DispatchEx_GetTypeInfoCount(IDispatchEx *iface, UINT *pctinfo) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetIDsOfNames(IDispatchEx *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, - LCID lcid, DISPID *rgDispId) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, - VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex) -{ - ok(0, "unexpected call %s %x\n", wine_dbgstr_w(bstrName), grfdex); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID id) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetMemberName(IDispatchEx *iface, DISPID id, BSTR *pbstrName) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetNextDispID(IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetNameSpaceParent(IDispatchEx *iface, IUnknown **ppunk) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -#define EVENT_HANDLER_FUNC_OBJ(event) \ - static IDispatchExVtbl event ## FuncVtbl = { \ - DispatchEx_QueryInterface, \ - DispatchEx_AddRef, \ - DispatchEx_Release, \ - DispatchEx_GetTypeInfoCount, \ - DispatchEx_GetTypeInfo, \ - DispatchEx_GetIDsOfNames, \ - DispatchEx_Invoke, \ - DispatchEx_GetDispID, \ - event, \ - DispatchEx_DeleteMemberByName, \ - DispatchEx_DeleteMemberByDispID, \ - DispatchEx_GetMemberProperties, \ - DispatchEx_GetMemberName, \ - DispatchEx_GetNextDispID, \ - DispatchEx_GetNameSpaceParent \ - }; \ - static IDispatchEx event ## _obj = { &event ## FuncVtbl }; - -static HRESULT WINAPI document_onclick(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, - VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) -{ - IHTMLDocument3 *doc3; - CHECK_EXPECT(document_onclick); - test_event_args(NULL, id, wFlags, pdp, pvarRes, pei, pspCaller); - doc3 = get_doc3_iface((IUnknown*)V_DISPATCH(pdp->rgvarg)); - IHTMLDocument3_Release(doc3); - test_event_src("DIV"); - test_event_obj("click", &no_xy); - return S_OK; -} - -EVENT_HANDLER_FUNC_OBJ(document_onclick); - -static HRESULT WINAPI div_onclick(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, - VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) -{ - CHECK_EXPECT(div_onclick); - test_event_args(NULL, id, wFlags, pdp, pvarRes, pei, pspCaller); - test_event_src("DIV"); - return S_OK; -} - -EVENT_HANDLER_FUNC_OBJ(div_onclick); - -static HRESULT WINAPI div_onclick_attached(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, - VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) -{ - CHECK_EXPECT(div_onclick_attached); - - test_attached_event_args(id, wFlags, pdp, pvarRes, pei); - test_event_src("DIV"); - return S_OK; -} - -EVENT_HANDLER_FUNC_OBJ(div_onclick_attached); - -static HRESULT WINAPI body_onclick(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, - VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) -{ - CHECK_EXPECT(body_onclick); - test_event_args(&DIID_DispHTMLBody, id, wFlags, pdp, pvarRes, pei, pspCaller); - test_event_src("DIV"); - return S_OK; -} - -EVENT_HANDLER_FUNC_OBJ(body_onclick); - -static HRESULT WINAPI img_onload(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, - VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) -{ - CHECK_EXPECT(img_onload); - test_event_args(&DIID_DispHTMLImg, id, wFlags, pdp, pvarRes, pei, pspCaller); - test_event_src("IMG"); - return S_OK; -} - -EVENT_HANDLER_FUNC_OBJ(img_onload); - -static HRESULT WINAPI iframedoc_onreadystatechange(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, - VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) -{ - IHTMLEventObj *event = NULL; - HRESULT hres; - - CHECK_EXPECT2(iframedoc_onreadystatechange); - test_event_args(&DIID_DispHTMLDocument, id, wFlags, pdp, pvarRes, pei, pspCaller); - - event = (void*)0xdeadbeef; - hres = IHTMLWindow2_get_event(window, &event); - ok(hres == S_OK, "get_event failed: %08x\n", hres); - ok(!event, "event = %p\n", event); - - return S_OK; -} - -EVENT_HANDLER_FUNC_OBJ(iframedoc_onreadystatechange); - -static HRESULT WINAPI iframe_onreadystatechange(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, - VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) -{ - IHTMLWindow2 *iframe_window; - IHTMLDocument2 *iframe_doc; - IHTMLFrameBase2 *iframe; - IHTMLElement2 *elem2; - IHTMLElement *elem; - VARIANT v; - BSTR str, str2; - HRESULT hres; - - test_event_args(&DIID_DispHTMLIFrame, id, wFlags, pdp, pvarRes, pei, pspCaller); - test_event_src("IFRAME"); - - elem = get_event_src(); - elem2 = get_elem2_iface((IUnknown*)elem); - IHTMLElement_Release(elem); - - V_VT(&v) = VT_EMPTY; - hres = IHTMLElement2_get_readyState(elem2, &v); - ok(hres == S_OK, "get_readyState failed: %08x\n", hres); - ok(V_VT(&v) == VT_BSTR, "V_VT(readyState) = %d\n", V_VT(&v)); - - hres = IHTMLElement2_QueryInterface(elem2, &IID_IHTMLFrameBase2, (void**)&iframe); - IHTMLElement2_Release(elem2); - ok(hres == S_OK, "Could not get IHTMLFrameBase2 iface: %08x\n", hres); - - str = NULL; - hres = IHTMLFrameBase2_get_readyState(iframe, &str); - IHTMLFrameBase2_Release(iframe); - ok(hres == S_OK, "get_readyState failed: %08x\n", hres); - ok(str != NULL, "readyState == NULL\n"); - ok(!lstrcmpW(str, V_BSTR(&v)), "ready states differ\n"); - VariantClear(&v); - - hres = IHTMLFrameBase2_get_contentWindow(iframe, &iframe_window); - ok(hres == S_OK, "get_contentDocument failed: %08x\n", hres); - - hres = IHTMLWindow2_get_document(iframe_window, &iframe_doc); - IHTMLWindow2_Release(iframe_window); - ok(hres == S_OK, "get_document failed: %08x\n", hres); - - hres = IHTMLDocument2_get_readyState(iframe_doc, &str2); - ok(!lstrcmpW(str, str2), "unexpected document readyState %s\n", wine_dbgstr_w(str2)); - SysFreeString(str2); - - if(!strcmp_wa(str, "loading")) { - CHECK_EXPECT(iframe_onreadystatechange_loading); - - V_VT(&v) = VT_DISPATCH; - V_DISPATCH(&v) = (IDispatch*)&iframedoc_onreadystatechange_obj; - hres = IHTMLDocument2_put_onreadystatechange(iframe_doc, v); - ok(hres == S_OK, "put_onreadystatechange: %08x\n", hres); - }else if(!strcmp_wa(str, "interactive")) - CHECK_EXPECT(iframe_onreadystatechange_interactive); - else if(!strcmp_wa(str, "complete")) - CHECK_EXPECT(iframe_onreadystatechange_complete); - else - ok(0, "unexpected state %s\n", wine_dbgstr_w(str)); - - IHTMLDocument2_Release(iframe_doc); - IHTMLFrameBase2_Release(iframe); - return S_OK; -} - -EVENT_HANDLER_FUNC_OBJ(iframe_onreadystatechange); - -static HRESULT WINAPI nocall(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, - VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) -{ - ok(0, "unexpected call\n"); - return S_OK; -} - -EVENT_HANDLER_FUNC_OBJ(nocall); - -#define CONNECTION_POINT_OBJ(cpname, diid) \ - static HRESULT WINAPI cpname ## _QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv) \ - { \ - *ppv = NULL; \ - if(IsEqualGUID(riid, &IID_IUnknown) \ - || IsEqualGUID(riid, &IID_IDispatch) \ - || IsEqualGUID(riid, &diid)) \ - *ppv = iface; \ - else { \ - ok(0, "unexpected riid %s\n", debugstr_guid(riid)); \ - return E_NOINTERFACE; \ - } \ - return S_OK; \ - } \ - static IDispatchExVtbl cpname ## Vtbl = { \ - cpname ## _QueryInterface, \ - DispatchEx_AddRef, \ - DispatchEx_Release, \ - DispatchEx_GetTypeInfoCount, \ - DispatchEx_GetTypeInfo, \ - DispatchEx_GetIDsOfNames, \ - cpname, \ - DispatchEx_GetDispID, \ - DispatchEx_InvokeEx, \ - DispatchEx_DeleteMemberByName, \ - DispatchEx_DeleteMemberByDispID, \ - DispatchEx_GetMemberProperties, \ - DispatchEx_GetMemberName, \ - DispatchEx_GetNextDispID, \ - DispatchEx_GetNameSpaceParent \ - }; \ - static IDispatchEx cpname ## _obj = { &cpname ## Vtbl } - -#define test_cp_args(a,b,c,d,e,f) _test_cp_args(__LINE__,a,b,c,d,e,f) -static void _test_cp_args(unsigned line, REFIID riid, WORD flags, DISPPARAMS *dp, VARIANT *vres, EXCEPINFO *ei, UINT *argerr) -{ - ok_(__FILE__,line)(IsEqualGUID(&IID_NULL, riid), "riid = %s\n", debugstr_guid(riid)); - ok_(__FILE__,line)(flags == DISPATCH_METHOD, "flags = %x\n", flags); - ok_(__FILE__,line)(dp != NULL, "dp == NULL\n"); - ok_(__FILE__,line)(!dp->cArgs, "dp->cArgs = %d\n", dp->cArgs); - ok_(__FILE__,line)(!dp->rgvarg, "dp->rgvarg = %p\n", dp->rgvarg); - ok_(__FILE__,line)(!dp->cNamedArgs, "dp->cNamedArgs = %d\n", dp->cNamedArgs); - ok_(__FILE__,line)(!dp->rgdispidNamedArgs, "dp->rgdispidNamedArgs = %p\n", dp->rgdispidNamedArgs); - ok_(__FILE__,line)(vres != NULL, "vres == NULL\n"); - ok_(__FILE__,line)(V_VT(vres) == VT_EMPTY, "V_VT(vres) = %d\n", V_VT(vres)); - ok_(__FILE__,line)(ei != NULL, "ei == NULL\n"); - ok_(__FILE__,line)(argerr != NULL, "argerr == NULL\n"); -} - -static HRESULT WINAPI doccp(IDispatchEx *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pdp, - VARIANT *pVarResult, EXCEPINFO *pei, UINT *puArgErr) -{ - switch(dispIdMember) { - case DISPID_HTMLDOCUMENTEVENTS_ONCLICK: - CHECK_EXPECT(doccp_onclick); - test_cp_args(riid, wFlags, pdp, pVarResult, pei, puArgErr); - break; - default: - ok(0, "unexpected call %d\n", dispIdMember); - return E_NOTIMPL; - } - - return S_OK; -} - -CONNECTION_POINT_OBJ(doccp, DIID_HTMLDocumentEvents); - -static HRESULT WINAPI timeoutFunc_Invoke(IDispatchEx *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - CHECK_EXPECT(timeout); - - ok(dispIdMember == DISPID_VALUE, "dispIdMember = %d\n", dispIdMember); - ok(IsEqualGUID(&IID_NULL, riid), "riid = %s\n", debugstr_guid(riid)); - ok(wFlags == DISPATCH_METHOD, "wFlags = %x\n", wFlags); - ok(!lcid, "lcid = %x\n", lcid); - ok(pDispParams != NULL, "pDispParams == NULL\n"); - ok(!pDispParams->cArgs, "pdp->cArgs = %d\n", pDispParams->cArgs); - ok(!pDispParams->cNamedArgs, "pdp->cNamedArgs = %d\n", pDispParams->cNamedArgs); - ok(!pDispParams->rgdispidNamedArgs, "pdp->rgdispidNamedArgs = %p\n", pDispParams->rgdispidNamedArgs); - ok(!pDispParams->rgvarg, "rgvarg = %p\n", pDispParams->rgvarg); - ok(pVarResult != NULL, "pVarResult = NULL\n"); - ok(pExcepInfo != NULL, "pExcepInfo = NULL\n"); - ok(!puArgErr, "puArgErr = %p\n", puArgErr); - ok(V_VT(pVarResult) == VT_EMPTY, "V_VT(pVarResult) = %d\n", V_VT(pVarResult)); - - return S_OK; -} - -static IDispatchExVtbl timeoutFuncVtbl = { - DispatchEx_QueryInterface, - DispatchEx_AddRef, - DispatchEx_Release, - DispatchEx_GetTypeInfoCount, - DispatchEx_GetTypeInfo, - DispatchEx_GetIDsOfNames, - timeoutFunc_Invoke, - DispatchEx_GetDispID, - DispatchEx_InvokeEx, - DispatchEx_DeleteMemberByName, - DispatchEx_DeleteMemberByDispID, - DispatchEx_GetMemberProperties, - DispatchEx_GetMemberName, - DispatchEx_GetNextDispID, - DispatchEx_GetNameSpaceParent -}; - -static IDispatchEx timeoutFunc = { &timeoutFuncVtbl }; - -static HRESULT WINAPI div_onclick_disp_Invoke(IDispatchEx *iface, DISPID id, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pdp, - VARIANT *pvarRes, EXCEPINFO *pei, UINT *puArgErr) -{ - CHECK_EXPECT(div_onclick_disp); - - test_attached_event_args(id, wFlags, pdp, pvarRes, pei); - - ok(IsEqualGUID(&IID_NULL, riid), "riid = %s\n", debugstr_guid(riid)); - ok(!puArgErr, "puArgErr = %p\n", puArgErr); - - return S_OK; -} - -static IDispatchExVtbl div_onclick_dispVtbl = { - Dispatch_QueryInterface, - DispatchEx_AddRef, - DispatchEx_Release, - DispatchEx_GetTypeInfoCount, - DispatchEx_GetTypeInfo, - DispatchEx_GetIDsOfNames, - div_onclick_disp_Invoke, -}; - -static IDispatchEx div_onclick_disp = { &div_onclick_dispVtbl }; - -static void pump_msgs(BOOL *b) -{ - MSG msg; - while(!*b && GetMessage(&msg, NULL, 0, 0)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } -} - -static IConnectionPoint *get_cp(IUnknown *unk, REFIID riid) -{ - IConnectionPointContainer *cp_container; - IConnectionPoint *cp; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IConnectionPointContainer, (void**)&cp_container); - ok(hres == S_OK, "Could not get IConnectionPointContainer: %08x\n", hres); - - hres = IConnectionPointContainer_FindConnectionPoint(cp_container, riid, &cp); - IConnectionPointContainer_Release(cp_container); - ok(hres == S_OK, "FindConnectionPoint failed: %08x\n", hres); - - return cp; -} - -static DWORD register_cp(IUnknown *unk, REFIID riid, IUnknown *sink) -{ - IConnectionPoint *cp; - DWORD cookie; - HRESULT hres; - - cp = get_cp(unk, riid); - hres = IConnectionPoint_Advise(cp, sink, &cookie); - IConnectionPoint_Release(cp); - ok(hres == S_OK, "Advise failed: %08x\n", hres); - - return cookie; -} - -static void unregister_cp(IUnknown *unk, REFIID riid, DWORD cookie) -{ - IConnectionPoint *cp; - HRESULT hres; - - cp = get_cp(unk, riid); - hres = IConnectionPoint_Unadvise(cp, cookie); - IConnectionPoint_Release(cp); - ok(hres == S_OK, "Unadvise failed: %08x\n", hres); -} - -static void test_onclick(IHTMLDocument2 *doc) -{ - IHTMLElement *div, *body; - DWORD cp_cookie; - VARIANT v; - HRESULT hres; - - div = get_elem_id(doc, "clickdiv"); - - elem_attach_event((IUnknown*)div, "abcde", (IDispatch*)&nocall_obj); - elem_attach_event((IUnknown*)div, "onclick", (IDispatch*)&div_onclick_attached_obj); - - V_VT(&v) = VT_EMPTY; - hres = IHTMLElement_get_onclick(div, &v); - ok(hres == S_OK, "get_onclick failed: %08x\n", hres); - ok(V_VT(&v) == VT_NULL, "V_VT(onclick) = %d\n", V_VT(&v)); - - V_VT(&v) = VT_EMPTY; - hres = IHTMLElement_put_onclick(div, v); - ok(hres == E_NOTIMPL, "put_onclick failed: %08x\n", hres); - - V_VT(&v) = VT_DISPATCH; - V_DISPATCH(&v) = (IDispatch*)&div_onclick_obj; - hres = IHTMLElement_put_onclick(div, v); - ok(hres == S_OK, "put_onclick failed: %08x\n", hres); - - V_VT(&v) = VT_NULL; - hres = IHTMLElement_put_ondblclick(div, v); - ok(hres == S_OK, "put_ondblclick failed: %08x\n", hres); - - V_VT(&v) = VT_EMPTY; - hres = IHTMLElement_get_onclick(div, &v); - ok(hres == S_OK, "get_onclick failed: %08x\n", hres); - ok(V_VT(&v) == VT_DISPATCH, "V_VT(onclick) = %d\n", V_VT(&v)); - ok(V_DISPATCH(&v) == (IDispatch*)&div_onclick_obj, "V_DISPATCH(onclick) != onclickFunc\n"); - VariantClear(&v); - - V_VT(&v) = VT_EMPTY; - hres = IHTMLDocument2_get_onclick(doc, &v); - ok(hres == S_OK, "get_onclick failed: %08x\n", hres); - ok(V_VT(&v) == VT_NULL, "V_VT(onclick) = %d\n", V_VT(&v)); - - V_VT(&v) = VT_DISPATCH; - V_DISPATCH(&v) = (IDispatch*)&document_onclick_obj; - hres = IHTMLDocument2_put_onclick(doc, v); - ok(hres == S_OK, "put_onclick failed: %08x\n", hres); - - V_VT(&v) = VT_EMPTY; - hres = IHTMLDocument2_get_onclick(doc, &v); - ok(hres == S_OK, "get_onclick failed: %08x\n", hres); - ok(V_VT(&v) == VT_DISPATCH, "V_VT(onclick) = %d\n", V_VT(&v)); - ok(V_DISPATCH(&v) == (IDispatch*)&document_onclick_obj, "V_DISPATCH(onclick) != onclickFunc\n"); - VariantClear(&v); - - body = doc_get_body(doc); - - V_VT(&v) = VT_DISPATCH; - V_DISPATCH(&v) = (IDispatch*)&body_onclick_obj; - hres = IHTMLElement_put_onclick(body, v); - ok(hres == S_OK, "put_onclick failed: %08x\n", hres); - - if(winetest_interactive) { - SET_EXPECT(div_onclick); - SET_EXPECT(div_onclick_attached); - SET_EXPECT(body_onclick); - SET_EXPECT(document_onclick); - pump_msgs(&called_document_onclick); - CHECK_CALLED(div_onclick); - CHECK_CALLED(div_onclick_attached); - CHECK_CALLED(body_onclick); - CHECK_CALLED(document_onclick); - } - - xy_todo = TRUE; - - SET_EXPECT(div_onclick); - SET_EXPECT(div_onclick_attached); - SET_EXPECT(body_onclick); - SET_EXPECT(document_onclick); - - hres = IHTMLElement_click(div); - ok(hres == S_OK, "click failed: %08x\n", hres); - - CHECK_CALLED(div_onclick); - CHECK_CALLED(div_onclick_attached); - CHECK_CALLED(body_onclick); - CHECK_CALLED(document_onclick); - - SET_EXPECT(div_onclick); - SET_EXPECT(div_onclick_attached); - SET_EXPECT(body_onclick); - SET_EXPECT(document_onclick); - - V_VT(&v) = VT_EMPTY; - elem_fire_event((IUnknown*)div, "onclick", &v); - - CHECK_CALLED(div_onclick); - CHECK_CALLED(div_onclick_attached); - CHECK_CALLED(body_onclick); - CHECK_CALLED(document_onclick); - - cp_cookie = register_cp((IUnknown*)doc, &DIID_HTMLDocumentEvents, (IUnknown*)&doccp_obj); - elem_attach_event((IUnknown*)div, "onclick", (IDispatch*)&div_onclick_disp); - - SET_EXPECT(div_onclick); - SET_EXPECT(div_onclick_disp); - SET_EXPECT(div_onclick_attached); - SET_EXPECT(body_onclick); - SET_EXPECT(document_onclick); - SET_EXPECT(doccp_onclick); - - hres = IHTMLElement_click(div); - ok(hres == S_OK, "click failed: %08x\n", hres); - - CHECK_CALLED(div_onclick); - CHECK_CALLED(div_onclick_disp); - CHECK_CALLED(div_onclick_attached); - CHECK_CALLED(body_onclick); - CHECK_CALLED(document_onclick); - CHECK_CALLED(doccp_onclick); - - unregister_cp((IUnknown*)doc, &DIID_HTMLDocumentEvents, cp_cookie); - - V_VT(&v) = VT_NULL; - hres = IHTMLElement_put_onclick(div, v); - ok(hres == S_OK, "put_onclick failed: %08x\n", hres); - - hres = IHTMLElement_get_onclick(div, &v); - ok(hres == S_OK, "get_onclick failed: %08x\n", hres); - ok(V_VT(&v) == VT_NULL, "get_onclick returned vt %d\n", V_VT(&v)); - - elem_detach_event((IUnknown*)div, "onclick", (IDispatch*)&div_onclick_disp); - elem_detach_event((IUnknown*)div, "onclick", (IDispatch*)&div_onclick_disp); - elem_detach_event((IUnknown*)div, "test", (IDispatch*)&div_onclick_disp); - - SET_EXPECT(div_onclick_attached); - SET_EXPECT(body_onclick); - SET_EXPECT(document_onclick); - - hres = IHTMLElement_click(div); - ok(hres == S_OK, "click failed: %08x\n", hres); - - CHECK_CALLED(div_onclick_attached); - CHECK_CALLED(body_onclick); - CHECK_CALLED(document_onclick); - - IHTMLElement_Release(div); - IHTMLElement_Release(body); -} - -static void test_onreadystatechange(IHTMLDocument2 *doc) -{ - IHTMLFrameBase *iframe; - IHTMLElement2 *elem2; - IHTMLElement *elem; - VARIANT v; - BSTR str; - HRESULT hres; - - elem = get_elem_id(doc, "iframe"); - elem2 = get_elem2_iface((IUnknown*)elem); - IHTMLElement_Release(elem); - - V_VT(&v) = VT_EMPTY; - hres = IHTMLElement2_get_onreadystatechange(elem2, &v); - ok(hres == S_OK, "get_onreadystatechange failed: %08x\n", hres); - ok(V_VT(&v) == VT_NULL, "V_VT(onreadystatechange) = %d\n", V_VT(&v)); - - V_VT(&v) = VT_DISPATCH; - V_DISPATCH(&v) = (IDispatch*)&iframe_onreadystatechange_obj; - hres = IHTMLElement2_put_onreadystatechange(elem2, v); - ok(hres == S_OK, "put_onreadystatechange failed: %08x\n", hres); - - V_VT(&v) = VT_EMPTY; - hres = IHTMLElement2_get_onreadystatechange(elem2, &v); - ok(hres == S_OK, "get_onreadystatechange failed: %08x\n", hres); - ok(V_VT(&v) == VT_DISPATCH, "V_VT(onreadystatechange) = %d\n", V_VT(&v)); - ok(V_DISPATCH(&v) == (IDispatch*)&iframe_onreadystatechange_obj, "unexpected onreadystatechange value\n"); - - hres = IHTMLElement2_QueryInterface(elem2, &IID_IHTMLFrameBase, (void**)&iframe); - IHTMLElement2_Release(elem2); - ok(hres == S_OK, "Could not get IHTMLFrameBase iface: %08x\n", hres); - - hres = IHTMLFrameBase_put_src(iframe, (str = a2bstr("about:blank"))); - SysFreeString(str); - ok(hres == S_OK, "put_src failed: %08x\n", hres); - - SET_EXPECT(iframe_onreadystatechange_loading); - SET_EXPECT(iframedoc_onreadystatechange); - SET_EXPECT(iframe_onreadystatechange_interactive); - SET_EXPECT(iframe_onreadystatechange_complete); - pump_msgs(&called_iframe_onreadystatechange_complete); - CHECK_CALLED(iframe_onreadystatechange_loading); - CHECK_CALLED(iframedoc_onreadystatechange); - CHECK_CALLED(iframe_onreadystatechange_interactive); - CHECK_CALLED(iframe_onreadystatechange_complete); - - IHTMLFrameBase_Release(iframe); -} - -static void test_imgload(IHTMLDocument2 *doc) -{ - IHTMLImgElement *img; - IHTMLElement *elem; - VARIANT v; - BSTR str; - HRESULT hres; - - elem = get_elem_id(doc, "imgid"); - hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLImgElement, (void**)&img); - IHTMLElement_Release(elem); - ok(hres == S_OK, "Could not get IHTMLImgElement iface: %08x\n", hres); - - V_VT(&v) = VT_EMPTY; - hres = IHTMLImgElement_get_onload(img, &v); - ok(hres == S_OK, "get_onload failed: %08x\n", hres); - ok(V_VT(&v) == VT_NULL, "V_VT(onload) = %d\n", V_VT(&v)); - - V_VT(&v) = VT_DISPATCH; - V_DISPATCH(&v) = (IDispatch*)&img_onload_obj; - hres = IHTMLImgElement_put_onload(img, v); - ok(hres == S_OK, "put_onload failed: %08x\n", hres); - - V_VT(&v) = VT_EMPTY; - hres = IHTMLImgElement_get_onload(img, &v); - ok(hres == S_OK, "get_onload failed: %08x\n", hres); - ok(V_VT(&v) == VT_DISPATCH, "V_VT(onload) = %d\n", V_VT(&v)); - ok(V_DISPATCH(&v) == (IDispatch*)&img_onload_obj, "V_DISPATCH(onload) != onloadkFunc\n"); - VariantClear(&v); - - str = a2bstr("http://www.winehq.org/images/winehq_logo_text.png"); - hres = IHTMLImgElement_put_src(img, str); - ok(hres == S_OK, "put_src failed: %08x\n", hres); - SysFreeString(str); - - SET_EXPECT(img_onload); - pump_msgs(&called_img_onload); - CHECK_CALLED(img_onload); - - IHTMLImgElement_Release(img); -} - -static void test_timeout(IHTMLDocument2 *doc) -{ - IHTMLWindow3 *win3; - VARIANT expr, var; - LONG id; - HRESULT hres; - - hres = IHTMLWindow2_QueryInterface(window, &IID_IHTMLWindow3, (void**)&win3); - ok(hres == S_OK, "Could not get IHTMLWindow3 iface: %08x\n", hres); - - V_VT(&expr) = VT_DISPATCH; - V_DISPATCH(&expr) = (IDispatch*)&timeoutFunc; - V_VT(&var) = VT_EMPTY; - id = 0; - hres = IHTMLWindow3_setTimeout(win3, &expr, 0, &var, &id); - ok(hres == S_OK, "setTimeout failed: %08x\n", hres); - ok(id, "id = 0\n"); - - SET_EXPECT(timeout); - pump_msgs(&called_timeout); - CHECK_CALLED(timeout); - - V_VT(&expr) = VT_DISPATCH; - V_DISPATCH(&expr) = (IDispatch*)&timeoutFunc; - V_VT(&var) = VT_EMPTY; - id = 0; - hres = IHTMLWindow3_setTimeout(win3, &expr, 0, &var, &id); - ok(hres == S_OK, "setTimeout failed: %08x\n", hres); - ok(id, "id = 0\n"); - - hres = IHTMLWindow2_clearTimeout(window, id); - ok(hres == S_OK, "clearTimeout failed: %08x\n", hres); - - IHTMLWindow3_Release(win3); -} - -static HRESULT QueryInterface(REFIID,void**); - -static HRESULT WINAPI InPlaceFrame_QueryInterface(IOleInPlaceFrame *iface, REFIID riid, void **ppv) -{ - return E_NOINTERFACE; -} - -static ULONG WINAPI InPlaceFrame_AddRef(IOleInPlaceFrame *iface) -{ - return 2; -} - -static ULONG WINAPI InPlaceFrame_Release(IOleInPlaceFrame *iface) -{ - return 1; -} - -static HRESULT WINAPI InPlaceFrame_GetWindow(IOleInPlaceFrame *iface, HWND *phwnd) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_ContextSensitiveHelp(IOleInPlaceFrame *iface, BOOL fEnterMode) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_GetBorder(IOleInPlaceFrame *iface, LPRECT lprectBorder) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_RequestBorderSpace(IOleInPlaceFrame *iface, - LPCBORDERWIDTHS pborderwidths) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_SetBorderSpace(IOleInPlaceFrame *iface, - LPCBORDERWIDTHS pborderwidths) -{ - return S_OK; -} - -static HRESULT WINAPI InPlaceUIWindow_SetActiveObject(IOleInPlaceFrame *iface, - IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName) -{ - return S_OK; -} - -static HRESULT WINAPI InPlaceFrame_SetActiveObject(IOleInPlaceFrame *iface, - IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName) -{ - return S_OK; -} - -static HRESULT WINAPI InPlaceFrame_InsertMenus(IOleInPlaceFrame *iface, HMENU hmenuShared, - LPOLEMENUGROUPWIDTHS lpMenuWidths) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_SetMenu(IOleInPlaceFrame *iface, HMENU hmenuShared, - HOLEMENU holemenu, HWND hwndActiveObject) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_RemoveMenus(IOleInPlaceFrame *iface, HMENU hmenuShared) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_SetStatusText(IOleInPlaceFrame *iface, LPCOLESTR pszStatusText) -{ - return S_OK; -} - -static HRESULT WINAPI InPlaceFrame_EnableModeless(IOleInPlaceFrame *iface, BOOL fEnable) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_TranslateAccelerator(IOleInPlaceFrame *iface, LPMSG lpmsg, WORD wID) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static const IOleInPlaceFrameVtbl InPlaceFrameVtbl = { - InPlaceFrame_QueryInterface, - InPlaceFrame_AddRef, - InPlaceFrame_Release, - InPlaceFrame_GetWindow, - InPlaceFrame_ContextSensitiveHelp, - InPlaceFrame_GetBorder, - InPlaceFrame_RequestBorderSpace, - InPlaceFrame_SetBorderSpace, - InPlaceFrame_SetActiveObject, - InPlaceFrame_InsertMenus, - InPlaceFrame_SetMenu, - InPlaceFrame_RemoveMenus, - InPlaceFrame_SetStatusText, - InPlaceFrame_EnableModeless, - InPlaceFrame_TranslateAccelerator -}; - -static IOleInPlaceFrame InPlaceFrame = { &InPlaceFrameVtbl }; - -static const IOleInPlaceFrameVtbl InPlaceUIWindowVtbl = { - InPlaceFrame_QueryInterface, - InPlaceFrame_AddRef, - InPlaceFrame_Release, - InPlaceFrame_GetWindow, - InPlaceFrame_ContextSensitiveHelp, - InPlaceFrame_GetBorder, - InPlaceFrame_RequestBorderSpace, - InPlaceFrame_SetBorderSpace, - InPlaceUIWindow_SetActiveObject, -}; - -static IOleInPlaceFrame InPlaceUIWindow = { &InPlaceUIWindowVtbl }; - -static HRESULT WINAPI InPlaceSite_QueryInterface(IOleInPlaceSite *iface, REFIID riid, void **ppv) -{ - return QueryInterface(riid, ppv); -} - -static ULONG WINAPI InPlaceSite_AddRef(IOleInPlaceSite *iface) -{ - return 2; -} - -static ULONG WINAPI InPlaceSite_Release(IOleInPlaceSite *iface) -{ - return 1; -} - -static HRESULT WINAPI InPlaceSite_GetWindow(IOleInPlaceSite *iface, HWND *phwnd) -{ - *phwnd = container_hwnd; - return S_OK; -} - -static HRESULT WINAPI InPlaceSite_ContextSensitiveHelp(IOleInPlaceSite *iface, BOOL fEnterMode) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSite_CanInPlaceActivate(IOleInPlaceSite *iface) -{ - return S_OK; -} - -static HRESULT WINAPI InPlaceSite_OnInPlaceActivate(IOleInPlaceSite *iface) -{ - return S_OK; -} - -static HRESULT WINAPI InPlaceSite_OnUIActivate(IOleInPlaceSite *iface) -{ - return S_OK; -} - -static HRESULT WINAPI InPlaceSite_GetWindowContext(IOleInPlaceSite *iface, - IOleInPlaceFrame **ppFrame, IOleInPlaceUIWindow **ppDoc, LPRECT lprcPosRect, - LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo) -{ - static const RECT rect = {0,0,300,300}; - - *ppFrame = &InPlaceFrame; - *ppDoc = (IOleInPlaceUIWindow*)&InPlaceUIWindow; - *lprcPosRect = rect; - *lprcClipRect = rect; - - lpFrameInfo->cb = sizeof(*lpFrameInfo); - lpFrameInfo->fMDIApp = FALSE; - lpFrameInfo->hwndFrame = container_hwnd; - lpFrameInfo->haccel = NULL; - lpFrameInfo->cAccelEntries = 0; - - return S_OK; -} - -static HRESULT WINAPI InPlaceSite_Scroll(IOleInPlaceSite *iface, SIZE scrollExtant) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSite_OnUIDeactivate(IOleInPlaceSite *iface, BOOL fUndoable) -{ - return S_OK; -} - -static HRESULT WINAPI InPlaceSite_OnInPlaceDeactivate(IOleInPlaceSite *iface) -{ - return S_OK; -} - -static HRESULT WINAPI InPlaceSite_DiscardUndoState(IOleInPlaceSite *iface) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSite_DeactivateAndUndo(IOleInPlaceSite *iface) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSite_OnPosRectChange(IOleInPlaceSite *iface, LPCRECT lprcPosRect) -{ - return E_NOTIMPL; -} - -static const IOleInPlaceSiteVtbl InPlaceSiteVtbl = { - InPlaceSite_QueryInterface, - InPlaceSite_AddRef, - InPlaceSite_Release, - InPlaceSite_GetWindow, - InPlaceSite_ContextSensitiveHelp, - InPlaceSite_CanInPlaceActivate, - InPlaceSite_OnInPlaceActivate, - InPlaceSite_OnUIActivate, - InPlaceSite_GetWindowContext, - InPlaceSite_Scroll, - InPlaceSite_OnUIDeactivate, - InPlaceSite_OnInPlaceDeactivate, - InPlaceSite_DiscardUndoState, - InPlaceSite_DeactivateAndUndo, - InPlaceSite_OnPosRectChange, -}; - -static IOleInPlaceSite InPlaceSite = { &InPlaceSiteVtbl }; - -static HRESULT WINAPI ClientSite_QueryInterface(IOleClientSite *iface, REFIID riid, void **ppv) -{ - return QueryInterface(riid, ppv); -} - -static ULONG WINAPI ClientSite_AddRef(IOleClientSite *iface) -{ - return 2; -} - -static ULONG WINAPI ClientSite_Release(IOleClientSite *iface) -{ - return 1; -} - -static HRESULT WINAPI ClientSite_SaveObject(IOleClientSite *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ClientSite_GetMoniker(IOleClientSite *iface, DWORD dwAssign, DWORD dwWhichMoniker, - IMoniker **ppmon) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ClientSite_GetContainer(IOleClientSite *iface, IOleContainer **ppContainer) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI ClientSite_ShowObject(IOleClientSite *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ClientSite_OnShowWindow(IOleClientSite *iface, BOOL fShow) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ClientSite_RequestNewObjectLayout(IOleClientSite *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static const IOleClientSiteVtbl ClientSiteVtbl = { - ClientSite_QueryInterface, - ClientSite_AddRef, - ClientSite_Release, - ClientSite_SaveObject, - ClientSite_GetMoniker, - ClientSite_GetContainer, - ClientSite_ShowObject, - ClientSite_OnShowWindow, - ClientSite_RequestNewObjectLayout -}; - -static IOleClientSite ClientSite = { &ClientSiteVtbl }; - -static HRESULT WINAPI DocumentSite_QueryInterface(IOleDocumentSite *iface, REFIID riid, void **ppv) -{ - return QueryInterface(riid, ppv); -} - -static ULONG WINAPI DocumentSite_AddRef(IOleDocumentSite *iface) -{ - return 2; -} - -static ULONG WINAPI DocumentSite_Release(IOleDocumentSite *iface) -{ - return 1; -} - -static HRESULT WINAPI DocumentSite_ActivateMe(IOleDocumentSite *iface, IOleDocumentView *pViewToActivate) -{ - RECT rect = {0,0,300,300}; - IOleDocument *document; - HRESULT hres; - - hres = IOleDocumentView_QueryInterface(pViewToActivate, &IID_IOleDocument, (void**)&document); - ok(hres == S_OK, "could not get IOleDocument: %08x\n", hres); - - hres = IOleDocument_CreateView(document, &InPlaceSite, NULL, 0, &view); - IOleDocument_Release(document); - ok(hres == S_OK, "CreateView failed: %08x\n", hres); - - hres = IOleDocumentView_SetInPlaceSite(view, &InPlaceSite); - ok(hres == S_OK, "SetInPlaceSite failed: %08x\n", hres); - - hres = IOleDocumentView_UIActivate(view, TRUE); - ok(hres == S_OK, "UIActivate failed: %08x\n", hres); - - hres = IOleDocumentView_SetRect(view, &rect); - ok(hres == S_OK, "SetRect failed: %08x\n", hres); - - hres = IOleDocumentView_Show(view, TRUE); - ok(hres == S_OK, "Show failed: %08x\n", hres); - - return S_OK; -} - -static const IOleDocumentSiteVtbl DocumentSiteVtbl = { - DocumentSite_QueryInterface, - DocumentSite_AddRef, - DocumentSite_Release, - DocumentSite_ActivateMe -}; - -static IOleDocumentSite DocumentSite = { &DocumentSiteVtbl }; - -static HRESULT QueryInterface(REFIID riid, void **ppv) -{ - *ppv = NULL; - - if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IOleClientSite, riid)) - *ppv = &ClientSite; - else if(IsEqualGUID(&IID_IOleDocumentSite, riid)) - *ppv = &DocumentSite; - else if(IsEqualGUID(&IID_IOleWindow, riid) || IsEqualGUID(&IID_IOleInPlaceSite, riid)) - *ppv = &InPlaceSite; - - return *ppv ? S_OK : E_NOINTERFACE; -} - -static IHTMLDocument2 *notif_doc; -static BOOL doc_complete; - -static HRESULT WINAPI PropertyNotifySink_QueryInterface(IPropertyNotifySink *iface, - REFIID riid, void**ppv) -{ - if(IsEqualGUID(&IID_IPropertyNotifySink, riid)) { - *ppv = iface; - return S_OK; - } - - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI PropertyNotifySink_AddRef(IPropertyNotifySink *iface) -{ - return 2; -} - -static ULONG WINAPI PropertyNotifySink_Release(IPropertyNotifySink *iface) -{ - return 1; -} - -static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, DISPID dispID) -{ - if(dispID == DISPID_READYSTATE){ - BSTR state; - HRESULT hres; - - hres = IHTMLDocument2_get_readyState(notif_doc, &state); - ok(hres == S_OK, "get_readyState failed: %08x\n", hres); - - if(!strcmp_wa(state, "complete")) - doc_complete = TRUE; - - SysFreeString(state); - } - - return S_OK; -} - -static HRESULT WINAPI PropertyNotifySink_OnRequestEdit(IPropertyNotifySink *iface, DISPID dispID) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static IPropertyNotifySinkVtbl PropertyNotifySinkVtbl = { - PropertyNotifySink_QueryInterface, - PropertyNotifySink_AddRef, - PropertyNotifySink_Release, - PropertyNotifySink_OnChanged, - PropertyNotifySink_OnRequestEdit -}; - -static IPropertyNotifySink PropertyNotifySink = { &PropertyNotifySinkVtbl }; - -static void doc_load_string(IHTMLDocument2 *doc, const char *str) -{ - IPersistStreamInit *init; - IStream *stream; - HGLOBAL mem; - SIZE_T len; - - notif_doc = doc; - - doc_complete = FALSE; - len = strlen(str); - mem = GlobalAlloc(0, len); - memcpy(mem, str, len); - CreateStreamOnHGlobal(mem, TRUE, &stream); - - IHTMLDocument2_QueryInterface(doc, &IID_IPersistStreamInit, (void**)&init); - - IPersistStreamInit_Load(init, stream); - IPersistStreamInit_Release(init); - IStream_Release(stream); -} - -static void do_advise(IUnknown *unk, REFIID riid, IUnknown *unk_advise) -{ - IConnectionPointContainer *container; - IConnectionPoint *cp; - DWORD cookie; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IConnectionPointContainer, (void**)&container); - ok(hres == S_OK, "QueryInterface(IID_IConnectionPointContainer) failed: %08x\n", hres); - - hres = IConnectionPointContainer_FindConnectionPoint(container, riid, &cp); - IConnectionPointContainer_Release(container); - ok(hres == S_OK, "FindConnectionPoint failed: %08x\n", hres); - - hres = IConnectionPoint_Advise(cp, unk_advise, &cookie); - IConnectionPoint_Release(cp); - ok(hres == S_OK, "Advise failed: %08x\n", hres); -} - -static void set_client_site(IHTMLDocument2 *doc, BOOL set) -{ - IOleObject *oleobj; - HRESULT hres; - - if(!set && view) { - IOleDocumentView_Show(view, FALSE); - IOleDocumentView_CloseView(view, 0); - IOleDocumentView_SetInPlaceSite(view, NULL); - IOleDocumentView_Release(view); - view = NULL; - } - - hres = IHTMLDocument2_QueryInterface(doc, &IID_IOleObject, (void**)&oleobj); - ok(hres == S_OK, "Could not et IOleObject: %08x\n", hres); - - hres = IOleObject_SetClientSite(oleobj, set ? &ClientSite : NULL); - ok(hres == S_OK, "SetClientSite failed: %08x\n", hres); - - if(set) { - IHlinkTarget *hlink; - - hres = IOleObject_QueryInterface(oleobj, &IID_IHlinkTarget, (void**)&hlink); - ok(hres == S_OK, "Could not get IHlinkTarget iface: %08x\n", hres); - - hres = IHlinkTarget_Navigate(hlink, 0, NULL); - ok(hres == S_OK, "Navgate failed: %08x\n", hres); - - IHlinkTarget_Release(hlink); - } - - IOleObject_Release(oleobj); -} -static IHTMLDocument2 *create_document(void) -{ - IHTMLDocument2 *doc; - IHTMLDocument5 *doc5; - HRESULT hres; - - hres = CoCreateInstance(&CLSID_HTMLDocument, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, - &IID_IHTMLDocument2, (void**)&doc); - ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres); - if (FAILED(hres)) - return NULL; - - hres = IHTMLDocument2_QueryInterface(doc, &IID_IHTMLDocument5, (void**)&doc5); - if(FAILED(hres)) { - win_skip("Could not get IHTMLDocument5 interface, probably too old IE\n"); - IHTMLDocument2_Release(doc); - return NULL; - } - - IHTMLDocument5_Release(doc5); - return doc; -} - - -typedef void (*testfunc_t)(IHTMLDocument2*); - -static void run_test(const char *str, testfunc_t test) -{ - IHTMLDocument2 *doc; - IHTMLElement *body = NULL; - MSG msg; - HRESULT hres; - - xy_todo = FALSE; - doc = create_document(); - if (!doc) - return; - set_client_site(doc, TRUE); - doc_load_string(doc, str); - do_advise((IUnknown*)doc, &IID_IPropertyNotifySink, (IUnknown*)&PropertyNotifySink); - - while(!doc_complete && GetMessage(&msg, NULL, 0, 0)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - hres = IHTMLDocument2_get_body(doc, &body); - ok(hres == S_OK, "get_body failed: %08x\n", hres); - - if(body) { - IHTMLElement_Release(body); - - hres = IHTMLDocument2_get_parentWindow(doc, &window); - ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres); - ok(window != NULL, "window == NULL\n"); - - test(doc); - - IHTMLWindow2_Release(window); - window = NULL; - }else { - skip("Could not get document body. Assuming no Gecko installed.\n"); - } - - set_client_site(doc, FALSE); - IHTMLDocument2_Release(doc); -} - -static LRESULT WINAPI wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - return DefWindowProc(hwnd, msg, wParam, lParam); -} - -static HWND create_container_window(void) -{ - static const CHAR szHTMLDocumentTest[] = "HTMLDocumentTest"; - static WNDCLASSEXA wndclass = { - sizeof(WNDCLASSEXA), - 0, - wnd_proc, - 0, 0, NULL, NULL, NULL, NULL, NULL, - szHTMLDocumentTest, - NULL - }; - - RegisterClassExA(&wndclass); - return CreateWindowA(szHTMLDocumentTest, szHTMLDocumentTest, - WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, - 300, 300, NULL, NULL, NULL, NULL); -} - -START_TEST(events) -{ - CoInitialize(NULL); - container_hwnd = create_container_window(); - - if(winetest_interactive) - ShowWindow(container_hwnd, SW_SHOW); - - run_test(empty_doc_str, test_timeout); - run_test(click_doc_str, test_onclick); - run_test(readystate_doc_str, test_onreadystatechange); - run_test(img_doc_str, test_imgload); - - DestroyWindow(container_hwnd); - CoUninitialize(); -} diff --git a/rostests/winetests/mshtml/htmldoc.c b/rostests/winetests/mshtml/htmldoc.c deleted file mode 100644 index 65451b1793a..00000000000 --- a/rostests/winetests/mshtml/htmldoc.c +++ /dev/null @@ -1,5302 +0,0 @@ -/* - * Copyright 2005-2009 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 - */ - -#define COBJMACROS -#define CONST_VTABLE - -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "initguid.h" -#include "ole2.h" -#include "mshtml.h" -#include "docobj.h" -#include "wininet.h" -#include "mshtmhst.h" -#include "mshtmdid.h" -#include "mshtmcid.h" -#include "hlink.h" -#include "dispex.h" -#include "idispids.h" -#include "shlguid.h" -#include "perhist.h" -#include "shobjidl.h" -#include "mshtml_test.h" - -DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); -DEFINE_GUID(IID_IProxyManager,0x00000008,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); -DEFINE_OLEGUID(CGID_DocHostCmdPriv, 0x000214D4L, 0, 0); - -#define DEFINE_EXPECT(func) \ - static BOOL expect_ ## func = FALSE, called_ ## func = FALSE - -#define SET_EXPECT(func) \ - expect_ ## func = TRUE - -#define SET_CALLED(func) \ - called_ ## func = TRUE - -#define CHECK_EXPECT2(func) \ - do { \ - ok(expect_ ##func, "unexpected call " #func "\n"); \ - called_ ## func = TRUE; \ - }while(0) - -#define CHECK_EXPECT(func) \ - do { \ - CHECK_EXPECT2(func); \ - expect_ ## func = FALSE; \ - }while(0) - -#define CHECK_CALLED(func) \ - do { \ - ok(called_ ## func, "expected " #func "\n"); \ - expect_ ## func = called_ ## func = FALSE; \ - }while(0) - -static IOleDocumentView *view = NULL; -static HWND container_hwnd = NULL, hwnd = NULL, last_hwnd = NULL; - -DEFINE_EXPECT(LockContainer); -DEFINE_EXPECT(SetActiveObject); -DEFINE_EXPECT(SetActiveObject_null); -DEFINE_EXPECT(GetWindow); -DEFINE_EXPECT(CanInPlaceActivate); -DEFINE_EXPECT(OnInPlaceActivate); -DEFINE_EXPECT(OnInPlaceActivateEx); -DEFINE_EXPECT(OnUIActivate); -DEFINE_EXPECT(GetWindowContext); -DEFINE_EXPECT(OnUIDeactivate); -DEFINE_EXPECT(OnInPlaceDeactivate); -DEFINE_EXPECT(OnInPlaceDeactivateEx); -DEFINE_EXPECT(GetContainer); -DEFINE_EXPECT(ShowUI); -DEFINE_EXPECT(ActivateMe); -DEFINE_EXPECT(GetHostInfo); -DEFINE_EXPECT(HideUI); -DEFINE_EXPECT(GetOptionKeyPath); -DEFINE_EXPECT(GetOverrideKeyPath); -DEFINE_EXPECT(SetStatusText); -DEFINE_EXPECT(QueryStatus_SETPROGRESSTEXT); -DEFINE_EXPECT(QueryStatus_OPEN); -DEFINE_EXPECT(QueryStatus_NEW); -DEFINE_EXPECT(Exec_SETPROGRESSMAX); -DEFINE_EXPECT(Exec_SETPROGRESSPOS); -DEFINE_EXPECT(Exec_HTTPEQUIV_DONE); -DEFINE_EXPECT(Exec_SETDOWNLOADSTATE_0); -DEFINE_EXPECT(Exec_SETDOWNLOADSTATE_1); -DEFINE_EXPECT(Exec_ShellDocView_37); -DEFINE_EXPECT(Exec_ShellDocView_63); -DEFINE_EXPECT(Exec_ShellDocView_67); -DEFINE_EXPECT(Exec_ShellDocView_84); -DEFINE_EXPECT(Exec_ShellDocView_103); -DEFINE_EXPECT(Exec_ShellDocView_105); -DEFINE_EXPECT(Exec_ShellDocView_140); -DEFINE_EXPECT(Exec_UPDATECOMMANDS); -DEFINE_EXPECT(Exec_SETTITLE); -DEFINE_EXPECT(Exec_HTTPEQUIV); -DEFINE_EXPECT(Exec_MSHTML_PARSECOMPLETE); -DEFINE_EXPECT(Exec_Explorer_69); -DEFINE_EXPECT(Exec_DOCCANNAVIGATE); -DEFINE_EXPECT(Invoke_AMBIENT_USERMODE); -DEFINE_EXPECT(Invoke_AMBIENT_DLCONTROL); -DEFINE_EXPECT(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); -DEFINE_EXPECT(Invoke_AMBIENT_SILENT); -DEFINE_EXPECT(Invoke_AMBIENT_USERAGENT); -DEFINE_EXPECT(Invoke_AMBIENT_PALETTE); -DEFINE_EXPECT(GetDropTarget); -DEFINE_EXPECT(UpdateUI); -DEFINE_EXPECT(Navigate); -DEFINE_EXPECT(OnFrameWindowActivate); -DEFINE_EXPECT(OnChanged_READYSTATE); -DEFINE_EXPECT(OnChanged_1005); -DEFINE_EXPECT(OnChanged_1012); -DEFINE_EXPECT(GetDisplayName); -DEFINE_EXPECT(BindToStorage); -DEFINE_EXPECT(IsSystemMoniker); -DEFINE_EXPECT(GetBindResult); -DEFINE_EXPECT(GetClassID); -DEFINE_EXPECT(Abort); -DEFINE_EXPECT(Read); -DEFINE_EXPECT(CreateInstance); -DEFINE_EXPECT(Start); -DEFINE_EXPECT(Terminate); -DEFINE_EXPECT(Protocol_Read); -DEFINE_EXPECT(LockRequest); -DEFINE_EXPECT(UnlockRequest); -DEFINE_EXPECT(OnFocus_TRUE); -DEFINE_EXPECT(OnFocus_FALSE); -DEFINE_EXPECT(RequestUIActivate); -DEFINE_EXPECT(InPlaceFrame_SetBorderSpace); -DEFINE_EXPECT(InPlaceUIWindow_SetActiveObject); -DEFINE_EXPECT(GetExternal); -DEFINE_EXPECT(EnableModeless_TRUE); -DEFINE_EXPECT(EnableModeless_FALSE); -DEFINE_EXPECT(Frame_EnableModeless_TRUE); -DEFINE_EXPECT(Frame_EnableModeless_FALSE); -DEFINE_EXPECT(Frame_GetWindow); -DEFINE_EXPECT(TranslateUrl); -DEFINE_EXPECT(Advise_Close); -DEFINE_EXPECT(OnViewChange); -DEFINE_EXPECT(EvaluateNewWindow); - -static IUnknown *doc_unk; -static IMoniker *doc_mon; -static BOOL expect_LockContainer_fLock; -static BOOL expect_InPlaceUIWindow_SetActiveObject_active = TRUE; -static BOOL ipsex, ipsw; -static BOOL set_clientsite, container_locked, navigated_load; -static BOOL readystate_set_loading = FALSE, readystate_set_interactive = FALSE, load_from_stream; -static BOOL editmode = FALSE, show_failed; -static BOOL inplace_deactivated, open_call; -static int stream_read, protocol_read; -static enum load_state_t { - LD_DOLOAD, - LD_LOADING, - LD_LOADED, - LD_INTERACTIVE, - LD_COMPLETE, - LD_NO -} load_state; - -static LPCOLESTR expect_status_text = NULL; - -static const char html_page[] = -"" -"" -"test" -""; - -static const char css_data[] = "body {color: red}"; - -static const WCHAR http_urlW[] = - {'h','t','t','p',':','/','/','w','w','w','.','w','i','n','e','h','q','.','o','r','g',0}; - -static const WCHAR doc_url[] = {'w','i','n','e','t','e','s','t',':','d','o','c',0}; -static const WCHAR about_blank_url[] = {'a','b','o','u','t',':','b','l','a','n','k',0}; - -#define DOCHOST_DOCCANNAVIGATE 0 - -static HRESULT QueryInterface(REFIID riid, void **ppv); -static void test_MSHTML_QueryStatus(IHTMLDocument2*,DWORD); - -#define test_readyState(u) _test_readyState(__LINE__,u) -static void _test_readyState(unsigned,IUnknown*); - -static const WCHAR wszTimesNewRoman[] = - {'T','i','m','e','s',' ','N','e','w',' ','R','o','m','a','n',0}; -static const WCHAR wszArial[] = - {'A','r','i','a','l',0}; - -static const char *debugstr_guid(REFIID riid) -{ - static char buf[50]; - - if(!riid) - return "(null)"; - - sprintf(buf, "{%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]); - - return buf; -} - -static int strcmp_wa(LPCWSTR strw, const char *stra) -{ - CHAR buf[512]; - WideCharToMultiByte(CP_ACP, 0, strw, -1, buf, sizeof(buf), NULL, NULL); - return lstrcmpA(stra, buf); -} - -static const WCHAR *strstrW( const WCHAR *str, const WCHAR *sub ) -{ - while (*str) - { - const WCHAR *p1 = str, *p2 = sub; - while (*p1 && *p2 && *p1 == *p2) { p1++; p2++; } - if (!*p2) return str; - str++; - } - return NULL; -} - -static BSTR a2bstr(const char *str) -{ - BSTR ret; - int len; - - len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); - ret = SysAllocStringLen(NULL, len); - MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len); - - return ret; -} - -static BOOL is_english(void) -{ - return PRIMARYLANGID(GetSystemDefaultLangID()) == LANG_ENGLISH - && PRIMARYLANGID(GetUserDefaultLangID()) == LANG_ENGLISH; -} - -#define EXPECT_UPDATEUI 1 -#define EXPECT_SETTITLE 2 - -static void test_timer(DWORD flags) -{ - BOOL *b = &called_Exec_SETTITLE; - MSG msg; - - if(flags & EXPECT_UPDATEUI) { - SET_EXPECT(UpdateUI); - SET_EXPECT(Exec_UPDATECOMMANDS); - b = &called_UpdateUI; - } - if(flags & EXPECT_SETTITLE) - SET_EXPECT(Exec_SETTITLE); - - while(!*b && GetMessage(&msg, hwnd, 0, 0)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - if(flags & EXPECT_UPDATEUI) { - CHECK_CALLED(UpdateUI); - CHECK_CALLED(Exec_UPDATECOMMANDS); - } - if(flags & EXPECT_SETTITLE) - CHECK_CALLED(Exec_SETTITLE); -} - -static IMoniker Moniker; - -#define test_GetCurMoniker(u,m,v) _test_GetCurMoniker(__LINE__,u,m,v) -static void _test_GetCurMoniker(unsigned line, IUnknown *unk, IMoniker *exmon, LPCWSTR exurl) -{ - IHTMLDocument2 *doc; - IPersistMoniker *permon; - IMoniker *mon = (void*)0xdeadbeef; - BSTR doc_url = (void*)0xdeadbeef; - HRESULT hres; - - if(open_call) - return; /* FIXME */ - - hres = IUnknown_QueryInterface(unk, &IID_IPersistMoniker, (void**)&permon); - ok(hres == S_OK, "QueryInterface(IID_IPersistMoniker) failed: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IUnknown_QueryInterface(unk, &IID_IHTMLDocument2, (void**)&doc); - ok(hres == S_OK, "QueryInterface(IID_IHTMLDocument2) failed: %08x\n", hres); - - hres = IHTMLDocument2_get_URL(doc, &doc_url); - ok(hres == S_OK, "get_URL failed: %08x\n", hres); - - hres = IPersistMoniker_GetCurMoniker(permon, &mon); - IPersistMoniker_Release(permon); - - if(exmon) { - LPOLESTR url; - BOOL exb = expect_GetDisplayName; - BOOL clb = called_GetDisplayName; - - ok_(__FILE__,line)(hres == S_OK, "GetCurrentMoniker failed: %08x\n", hres); - ok_(__FILE__,line)(mon == exmon, "mon(%p) != exmon(%p)\n", mon, exmon); - - if(mon == &Moniker) - SET_EXPECT(GetDisplayName); - hres = IMoniker_GetDisplayName(mon, NULL, NULL, &url); - ok(hres == S_OK, "GetDisplayName failed: %08x\n", hres); - if(mon == &Moniker) - CHECK_CALLED(GetDisplayName); - expect_GetDisplayName = exb; - called_GetDisplayName = clb; - - ok(!lstrcmpW(url, doc_url), "url != doc_url\n"); - CoTaskMemFree(url); - }else if(exurl) { - LPOLESTR url; - - ok_(__FILE__,line)(hres == S_OK, "GetCurrentMoniker failed: %08x\n", hres); - - hres = IMoniker_GetDisplayName(mon, NULL, NULL, &url); - ok(hres == S_OK, "GetDisplayName failed: %08x\n", hres); - - ok(!lstrcmpW(url, exurl), "unexpected url %s\n", wine_dbgstr_w(url)); - ok(!lstrcmpW(url, doc_url), "url != doc_url\n"); - - CoTaskMemFree(url); - }else { - ok(hres == E_UNEXPECTED, - "GetCurrentMoniker failed: %08x, expected E_UNEXPECTED\n", hres); - ok(mon == (IMoniker*)0xdeadbeef, "mon=%p\n", mon); - ok(!lstrcmpW(doc_url, about_blank_url), "doc_url is not about:blank\n"); - } - - SysFreeString(doc_url); - IHTMLDocument_Release(doc); - if(mon && mon != (void*)0xdeadbeef) - IMoniker_Release(mon); -} - -DEFINE_GUID(IID_External_unk,0x30510406,0x98B5,0x11CF,0xBB,0x82,0x00,0xAA,0x00,0xBD,0xCE,0x0B); - -static HRESULT WINAPI External_QueryInterface(IDispatch *iface, REFIID riid, void **ppv) -{ - *ppv = NULL; - - if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IDispatch, riid)) { - *ppv = iface; - return S_OK; - } - - if(IsEqualGUID(&IID_IProxyManager, riid)) - return E_NOINTERFACE; /* TODO */ - if(IsEqualGUID(&IID_IDispatchEx, riid)) - return E_NOINTERFACE; /* TODO */ - if(IsEqualGUID(&IID_External_unk, riid)) - return E_NOINTERFACE; /* TODO */ - - ok(0, "unexpected riid: %s\n", debugstr_guid(riid)); - return E_NOINTERFACE; -} - -static ULONG WINAPI Dispatch_AddRef(IDispatch *iface) -{ - return 2; -} - -static ULONG WINAPI Dispatch_Release(IDispatch *iface) -{ - return 1; -} - -static HRESULT WINAPI Dispatch_GetTypeInfoCount(IDispatch *iface, UINT *pctinfo) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Dispatch_GetTypeInfo(IDispatch *iface, UINT iTInfo, LCID lcid, - ITypeInfo **ppTInfo) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Dispatch_GetIDsOfNames(IDispatch *iface, REFIID riid, LPOLESTR *rgszNames, - UINT cNames, LCID lcid, DISPID *rgDispId) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI External_Invoke(IDispatch *iface, DISPID dispIdMember, REFIID riid, - LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, - EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static const IDispatchVtbl ExternalVtbl = { - External_QueryInterface, - Dispatch_AddRef, - Dispatch_Release, - Dispatch_GetTypeInfoCount, - Dispatch_GetTypeInfo, - Dispatch_GetIDsOfNames, - External_Invoke -}; - -static IDispatch External = { &ExternalVtbl }; - -static HRESULT WINAPI Protocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv) -{ - if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IInternetProtocol, riid)) { - *ppv = iface; - return S_OK; - } - - *ppv = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI Protocol_AddRef(IInternetProtocol *iface) -{ - return 2; -} - -static ULONG WINAPI Protocol_Release(IInternetProtocol *iface) -{ - return 1; -} - -static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, - IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, - DWORD grfPI, HANDLE_PTR dwReserved) -{ - BINDINFO bindinfo; - DWORD bindf = 0; - HRESULT hres; - - static const WCHAR wszTextCss[] = {'t','e','x','t','/','c','s','s',0}; - static const WCHAR empty_str = {0}; - - CHECK_EXPECT(Start); - - ok(pOIProtSink != NULL, "pOIProtSink == NULL\n"); - ok(pOIBindInfo != NULL, "pOIBindInfo == NULL\n"); - ok(!grfPI, "grfPI = %x\n", grfPI); - ok(!dwReserved, "dwReserved = %lx\n", dwReserved); - - memset(&bindinfo, 0, sizeof(bindinfo)); - bindinfo.cbSize = sizeof(bindinfo); - hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &bindf, &bindinfo); - ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); - ok(bindf == (BINDF_FROMURLMON|BINDF_PULLDATA|BINDF_NEEDFILE|BINDF_ASYNCSTORAGE|BINDF_ASYNCHRONOUS), - "bindf = %x\n", bindf); - - ok(bindinfo.cbSize == sizeof(bindinfo), "bindinfo.cbSize=%d\n", bindinfo.cbSize); - ok(bindinfo.szExtraInfo == NULL, "bindinfo.szExtraInfo=%p\n", bindinfo.szExtraInfo); - /* TODO: test stgmedData */ - ok(bindinfo.grfBindInfoF == 0, "bindinfo.grfBinfInfoF=%08x\n", bindinfo.grfBindInfoF); - ok(bindinfo.dwBindVerb == 0, "bindinfo.dwBindVerb=%d\n", bindinfo.dwBindVerb); - ok(bindinfo.szCustomVerb == 0, "bindinfo.szCustomVerb=%p\n", bindinfo.szCustomVerb); - ok(bindinfo.cbstgmedData == 0, "bindinfo.cbstgmedData=%d\n", bindinfo.cbstgmedData); - ok(bindinfo.dwOptions == 0x80000 || - bindinfo.dwOptions == 0x4080000, /* win2k3 */ - "bindinfo.dwOptions=%x\n", bindinfo.dwOptions); - ok(bindinfo.dwOptionsFlags == 0, "bindinfo.dwOptionsFlags=%d\n", bindinfo.dwOptionsFlags); - /* TODO: test dwCodePage */ - /* TODO: test securityAttributes */ - ok(IsEqualGUID(&IID_NULL, &bindinfo.iid), "unexpected bindinfo.iid\n"); - ok(bindinfo.pUnk == NULL, "bindinfo.pUnk=%p\n", bindinfo.pUnk); - ok(bindinfo.dwReserved == 0, "bindinfo.dwReserved=%d\n", bindinfo.dwReserved); - - hres = IInternetProtocolSink_ReportProgress(pOIProtSink, - BINDSTATUS_CACHEFILENAMEAVAILABLE, &empty_str); - ok(hres == S_OK, "ReportProgress(BINDSTATUS_CACHEFILENAMEAVAILABLE) failed: %08x\n", hres); - - hres = IInternetProtocolSink_ReportProgress(pOIProtSink, - BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE, wszTextCss); - ok(hres == S_OK, - "ReportProgress(BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE) failed: %08x\n", hres); - - hres = IInternetProtocolSink_ReportData(pOIProtSink, - BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION, 13, 13); - ok(hres == S_OK, "ReportData failed: %08x\n", hres); - - hres = IInternetProtocolSink_ReportResult(pOIProtSink, S_OK, 0, NULL); - ok(hres == S_OK, "ReportResult failed: %08x\n", hres); - - return S_OK; -} - -static HRESULT WINAPI Protocol_Continue(IInternetProtocol *iface, - PROTOCOLDATA *pProtocolData) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Protocol_Abort(IInternetProtocol *iface, HRESULT hrReason, - DWORD dwOptions) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Protocol_Terminate(IInternetProtocol *iface, DWORD dwOptions) -{ - CHECK_EXPECT(Terminate); - return S_OK; -} - -static HRESULT WINAPI Protocol_Suspend(IInternetProtocol *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Protocol_Resume(IInternetProtocol *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Protocol_Read(IInternetProtocol *iface, void *pv, - ULONG cb, ULONG *pcbRead) -{ - CHECK_EXPECT2(Protocol_Read); - - ok(pv != NULL, "pv == NULL\n"); - ok(cb > sizeof(css_data), "cb < sizeof(css_data)\n"); - ok(pcbRead != NULL, "pcbRead == NULL\n"); - ok(!*pcbRead, "*pcbRead=%d\n", *pcbRead); - - if(protocol_read) - return S_FALSE; - - protocol_read += *pcbRead = sizeof(css_data)-1; - memcpy(pv, css_data, sizeof(css_data)-1); - return S_OK; -} - -static HRESULT WINAPI Protocol_Seek(IInternetProtocol *iface, - LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Protocol_LockRequest(IInternetProtocol *iface, DWORD dwOptions) -{ - CHECK_EXPECT(LockRequest); - return S_OK; -} - -static HRESULT WINAPI Protocol_UnlockRequest(IInternetProtocol *iface) -{ - CHECK_EXPECT(UnlockRequest); - return S_OK; -} - -static const IInternetProtocolVtbl ProtocolVtbl = { - Protocol_QueryInterface, - Protocol_AddRef, - Protocol_Release, - Protocol_Start, - Protocol_Continue, - Protocol_Abort, - Protocol_Terminate, - Protocol_Suspend, - Protocol_Resume, - Protocol_Read, - Protocol_Seek, - Protocol_LockRequest, - Protocol_UnlockRequest -}; - -static IInternetProtocol Protocol = { &ProtocolVtbl }; - -static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv) -{ - if(!IsEqualGUID(&IID_IInternetProtocolInfo, riid)) - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface) -{ - return 2; -} - -static ULONG WINAPI ClassFactory_Release(IClassFactory *iface) -{ - return 1; -} - -static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown *pOuter, - REFIID riid, void **ppv) -{ - if(IsEqualGUID(&IID_IInternetProtocolInfo, riid)) - return E_NOINTERFACE; - - CHECK_EXPECT(CreateInstance); - ok(ppv != NULL, "ppv == NULL\n"); - - *ppv = &Protocol; - return S_OK; -} - -static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL dolock) -{ - ok(0, "unexpected call\n"); - return S_OK; -} - -static const IClassFactoryVtbl ClassFactoryVtbl = { - ClassFactory_QueryInterface, - ClassFactory_AddRef, - ClassFactory_Release, - ClassFactory_CreateInstance, - ClassFactory_LockServer -}; - -static IClassFactory ClassFactory = { &ClassFactoryVtbl }; - -static HRESULT WINAPI HlinkFrame_QueryInterface(IHlinkFrame *iface, REFIID riid, void **ppv) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static ULONG WINAPI HlinkFrame_AddRef(IHlinkFrame *iface) -{ - return 2; -} - -static ULONG WINAPI HlinkFrame_Release(IHlinkFrame *iface) -{ - return 1; -} - -static HRESULT WINAPI HlinkFrame_SetBrowseContext(IHlinkFrame *iface, - IHlinkBrowseContext *pihlbc) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI HlinkFrame_GetBrowseContext(IHlinkFrame *iface, - IHlinkBrowseContext **ppihlbc) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI HlinkFrame_Navigate(IHlinkFrame *iface, DWORD grfHLNF, LPBC pbc, - IBindStatusCallback *pibsc, IHlink *pihlNavigate) -{ - HRESULT hres; - - CHECK_EXPECT(Navigate); - - ok(grfHLNF == 0, "grfHLNF=%d, expected 0\n", grfHLNF); - ok(pbc != NULL, "pbc == NULL\n"); - ok(pibsc != NULL, "pubsc == NULL\n"); - ok(pihlNavigate != NULL, "puhlNavigate == NULL\n"); - - if(pihlNavigate) { - LPWSTR frame_name = (LPWSTR)0xdeadbeef; - LPWSTR location = (LPWSTR)0xdeadbeef; - IHlinkSite *site; - IMoniker *mon = NULL; - DWORD site_data = 0xdeadbeef; - - hres = IHlink_GetTargetFrameName(pihlNavigate, &frame_name); - todo_wine - ok(hres == S_FALSE, "GetTargetFrameName failed: %08x\n", hres); - ok(frame_name == NULL, "frame_name = %p\n", frame_name); - - hres = IHlink_GetMonikerReference(pihlNavigate, 1, &mon, &location); - ok(hres == S_OK, "GetMonikerReference failed: %08x\n", hres); - ok(location == NULL, "location = %p\n", location); - ok(mon != NULL, "mon == NULL\n"); - - hres = IHlink_GetHlinkSite(pihlNavigate, &site, &site_data); - ok(hres == S_OK, "GetHlinkSite failed: %08x\n", hres); - ok(site == NULL, "site = %p\n, expected NULL\n", site); - todo_wine - ok(site_data == 0xdeadbeef, "site_data = %x\n", site_data); - } - - return S_OK; -} - -static HRESULT WINAPI HlinkFrame_OnNavigate(IHlinkFrame *iface, DWORD grfHLNF, - IMoniker *pimkTarget, LPCWSTR pwzLocation, LPCWSTR pwzFriendlyName, DWORD dwreserved) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI HlinkFrame_UpdateHlink(IHlinkFrame *iface, ULONG uHLID, - IMoniker *pimkTarget, LPCWSTR pwzLocation, LPCWSTR pwzFriendlyName) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static const IHlinkFrameVtbl HlinkFrameVtbl = { - HlinkFrame_QueryInterface, - HlinkFrame_AddRef, - HlinkFrame_Release, - HlinkFrame_SetBrowseContext, - HlinkFrame_GetBrowseContext, - HlinkFrame_Navigate, - HlinkFrame_OnNavigate, - HlinkFrame_UpdateHlink -}; - -static IHlinkFrame HlinkFrame = { &HlinkFrameVtbl }; - -static HRESULT WINAPI NewWindowManager_QueryInterface(INewWindowManager *iface, REFIID riid, void **ppv) -{ - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI NewWindowManager_AddRef(INewWindowManager *iface) -{ - return 2; -} - -static ULONG WINAPI NewWindowManager_Release(INewWindowManager *iface) -{ - return 1; -} - -static HRESULT WINAPI NewWindowManager_EvaluateNewWindow(INewWindowManager *iface, LPCWSTR pszUrl, - LPCWSTR pszName, LPCWSTR pszUrlContext, LPCWSTR pszFeatures, BOOL fReplace, DWORD dwFlags, - DWORD dwUserActionTime) -{ - CHECK_EXPECT(EvaluateNewWindow); - - ok(!strcmp_wa(pszUrl, "about:blank"), "pszUrl = %s\n", wine_dbgstr_w(pszUrl)); - ok(!strcmp_wa(pszName, "test"), "pszName = %s\n", wine_dbgstr_w(pszName)); - ok(!strcmp_wa(pszUrlContext, "about:blank"), "pszUrlContext = %s\n", wine_dbgstr_w(pszUrlContext)); - ok(!pszFeatures, "pszFeatures = %s\n", wine_dbgstr_w(pszFeatures)); - ok(!fReplace, "fReplace = %x\n", fReplace); - ok(dwFlags == NWMF_FIRST, "dwFlags = %x\n", dwFlags); - ok(!dwUserActionTime, "dwUserActionime = %d\n", dwUserActionTime); - - return E_FAIL; -} - -static const INewWindowManagerVtbl NewWindowManagerVtbl = { - NewWindowManager_QueryInterface, - NewWindowManager_AddRef, - NewWindowManager_Release, - NewWindowManager_EvaluateNewWindow -}; - -static INewWindowManager NewWindowManager = { &NewWindowManagerVtbl }; - -static HRESULT WINAPI PropertyNotifySink_QueryInterface(IPropertyNotifySink *iface, - REFIID riid, void**ppv) -{ - if(IsEqualGUID(&IID_IPropertyNotifySink, riid)) { - *ppv = iface; - return S_OK; - } - - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI PropertyNotifySink_AddRef(IPropertyNotifySink *iface) -{ - return 2; -} - -static ULONG WINAPI PropertyNotifySink_Release(IPropertyNotifySink *iface) -{ - return 1; -} - -static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, DISPID dispID) -{ - switch(dispID) { - case DISPID_READYSTATE: - CHECK_EXPECT2(OnChanged_READYSTATE); - - if(!readystate_set_interactive) - test_MSHTML_QueryStatus(NULL, OLECMDF_SUPPORTED - | (editmode && (load_state == LD_INTERACTIVE || load_state == LD_COMPLETE) - ? OLECMDF_ENABLED : 0)); - - if(readystate_set_loading) { - readystate_set_loading = FALSE; - load_state = LD_LOADING; - } - if(!editmode || load_state != LD_LOADING || !called_Exec_Explorer_69) - test_readyState(NULL); - return S_OK; - case 1005: - CHECK_EXPECT(OnChanged_1005); - if(!editmode) - test_readyState(NULL); - readystate_set_interactive = (load_state != LD_INTERACTIVE); - return S_OK; - case 1012: - CHECK_EXPECT(OnChanged_1012); - return S_OK; - case 1030: - case 3000029: - case 3000030: - /* TODO */ - return S_OK; - } - - ok(0, "unexpected id %d\n", dispID); - return E_NOTIMPL; -} - -static HRESULT WINAPI PropertyNotifySink_OnRequestEdit(IPropertyNotifySink *iface, DISPID dispID) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static IPropertyNotifySinkVtbl PropertyNotifySinkVtbl = { - PropertyNotifySink_QueryInterface, - PropertyNotifySink_AddRef, - PropertyNotifySink_Release, - PropertyNotifySink_OnChanged, - PropertyNotifySink_OnRequestEdit -}; - -static IPropertyNotifySink PropertyNotifySink = { &PropertyNotifySinkVtbl }; - -static HRESULT WINAPI Stream_QueryInterface(IStream *iface, REFIID riid, void **ppv) -{ - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI Stream_AddRef(IStream *iface) -{ - return 2; -} - -static ULONG WINAPI Stream_Release(IStream *iface) -{ - return 1; -} - -static HRESULT WINAPI Stream_Read(IStream *iface, void *pv, - ULONG cb, ULONG *pcbRead) -{ - CHECK_EXPECT2(Read); - ok(pv != NULL, "pv == NULL\n"); - ok(cb > sizeof(html_page), "cb = %d\n", cb); - ok(pcbRead != NULL, "pcbRead == NULL\n"); - ok(!*pcbRead, "*pcbRead = %d\n", *pcbRead); - - if(stream_read) - return S_FALSE; - - memcpy(pv, html_page, sizeof(html_page)-1); - stream_read += *pcbRead = sizeof(html_page)-1; - return S_OK; -} - -static HRESULT WINAPI Stream_Write(IStream *iface, const void *pv, - ULONG cb, ULONG *pcbWritten) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Stream_Seek(IStream *iface, LARGE_INTEGER dlibMove, - DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Stream_SetSize(IStream *iface, ULARGE_INTEGER libNewSize) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Stream_CopyTo(IStream *iface, IStream *pstm, - ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Stream_Commit(IStream *iface, DWORD grfCommitFlags) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Stream_Revert(IStream *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Stream_LockRegion(IStream *iface, ULARGE_INTEGER libOffset, - ULARGE_INTEGER cb, DWORD dwLockType) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Stream_UnlockRegion(IStream *iface, - ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Stream_Stat(IStream *iface, STATSTG *pstatstg, - DWORD dwStatFlag) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Stream_Clone(IStream *iface, IStream **ppstm) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static const IStreamVtbl StreamVtbl = { - Stream_QueryInterface, - Stream_AddRef, - Stream_Release, - Stream_Read, - Stream_Write, - Stream_Seek, - Stream_SetSize, - Stream_CopyTo, - Stream_Commit, - Stream_Revert, - Stream_LockRegion, - Stream_UnlockRegion, - Stream_Stat, - Stream_Clone -}; - -static IStream Stream = { &StreamVtbl }; - -static HRESULT WINAPI Binding_QueryInterface(IBinding *iface, REFIID riid, void **ppv) -{ - if(IsEqualGUID(&IID_IWinInetHttpInfo, riid)) - return E_NOINTERFACE; /* TODO */ - - if(IsEqualGUID(&IID_IWinInetInfo, riid)) - return E_NOINTERFACE; /* TODO */ - - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI Binding_AddRef(IBinding *iface) -{ - return 2; -} - -static ULONG WINAPI Binding_Release(IBinding *iface) -{ - return 1; -} - -static HRESULT WINAPI Binding_Abort(IBinding *iface) -{ - CHECK_EXPECT(Abort); - return S_OK; -} - -static HRESULT WINAPI Binding_Suspend(IBinding *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Binding_Resume(IBinding *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Binding_SetPriority(IBinding *iface, LONG nPriority) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Binding_GetPriority(IBinding *iface, LONG *pnPriority) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Binding_GetBindResult(IBinding *iface, CLSID *pclsidProtocol, - DWORD *pdwResult, LPOLESTR *pszResult, DWORD *pdwReserved) -{ - CHECK_EXPECT(GetBindResult); - return E_NOTIMPL; -} - -static const IBindingVtbl BindingVtbl = { - Binding_QueryInterface, - Binding_AddRef, - Binding_Release, - Binding_Abort, - Binding_Suspend, - Binding_Resume, - Binding_SetPriority, - Binding_GetPriority, - Binding_GetBindResult -}; - -static IBinding Binding = { &BindingVtbl }; - -DEFINE_GUID(IID_IMoniker_unk,0xA158A630,0xED6F,0x45FB,0xB9,0x87,0xF6,0x86,0x76,0xF5,0x77,0x52); -DEFINE_GUID(IID_IMoniker_unk2, 0x79EAC9D3,0xBAF9,0x11CE,0x8C,0x82,0x00,0xAA,0x00,0x4B,0xA9,0x0B); - -static HRESULT WINAPI Moniker_QueryInterface(IMoniker *iface, REFIID riid, void **ppv) -{ - *ppv = NULL; - - if(IsEqualGUID(&IID_IMoniker_unk, riid)) - return E_NOINTERFACE; /* TODO */ - if(IsEqualGUID(&IID_IMoniker_unk2, riid)) - return E_NOINTERFACE; /* TODO */ - - ok(0, "unexpected riid: %s\n", debugstr_guid(riid)); - return E_NOINTERFACE; -} - -static ULONG WINAPI Moniker_AddRef(IMoniker *iface) -{ - return 2; -} - -static ULONG WINAPI Moniker_Release(IMoniker *iface) -{ - return 1; -} - -static HRESULT WINAPI Moniker_GetClassID(IMoniker *iface, CLSID *pClassID) -{ - CHECK_EXPECT(GetClassID); - ok(IsEqualGUID(pClassID, &IID_NULL), "pClassID = %s\n", debugstr_guid(pClassID)); - return E_FAIL; -} - -static HRESULT WINAPI Moniker_IsDirty(IMoniker *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_Load(IMoniker *iface, IStream *pStm) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_Save(IMoniker *iface, IStream *pStm, BOOL fClearDirty) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_GetSizeMax(IMoniker *iface, ULARGE_INTEGER *pcbSize) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_BindToObject(IMoniker *iface, IBindCtx *pcb, IMoniker *pmkToLeft, - REFIID riidResult, void **ppvResult) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_BindToStorage(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, - REFIID riid, void **ppv) -{ - IBindStatusCallback *callback = NULL; - FORMATETC formatetc = {0xc02d, NULL, 1, -1, TYMED_ISTREAM}; - STGMEDIUM stgmedium; - BINDINFO bindinfo; - DWORD bindf; - HRESULT hres; - - static OLECHAR BSCBHolder[] = { '_','B','S','C','B','_','H','o','l','d','e','r','_',0 }; - static const WCHAR wszTextHtml[] = {'t','e','x','t','/','h','t','m','l',0}; - - CHECK_EXPECT(BindToStorage); - - load_state = LD_LOADING; - - ok(pbc != NULL, "pbc == NULL\n"); - ok(pmkToLeft == NULL, "pmkToLeft=%p\n", pmkToLeft); - ok(IsEqualGUID(&IID_IStream, riid), "unexpected riid\n"); - ok(ppv != NULL, "ppv == NULL\n"); - ok(*ppv == NULL, "*ppv=%p\n", *ppv); - - hres = IBindCtx_GetObjectParam(pbc, BSCBHolder, (IUnknown**)&callback); - ok(hres == S_OK, "GetObjectParam failed: %08x\n", hres); - ok(callback != NULL, "callback == NULL\n"); - - memset(&bindinfo, 0xf0, sizeof(bindinfo)); - bindinfo.cbSize = sizeof(bindinfo); - - hres = IBindStatusCallback_GetBindInfo(callback, &bindf, &bindinfo); - ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); - ok(bindf == (BINDF_PULLDATA|BINDF_ASYNCSTORAGE|BINDF_ASYNCHRONOUS), "bindf = %08x\n", bindf); - ok(bindinfo.cbSize == sizeof(bindinfo), "bindinfo.cbSize=%d\n", bindinfo.cbSize); - ok(bindinfo.szExtraInfo == NULL, "bindinfo.szExtraInfo=%p\n", bindinfo.szExtraInfo); - /* TODO: test stgmedData */ - ok(bindinfo.grfBindInfoF == 0, "bindinfo.grfBinfInfoF=%08x\n", bindinfo.grfBindInfoF); - ok(bindinfo.dwBindVerb == 0, "bindinfo.dwBindVerb=%d\n", bindinfo.dwBindVerb); - ok(bindinfo.szCustomVerb == 0, "bindinfo.szCustomVerb=%p\n", bindinfo.szCustomVerb); - ok(bindinfo.cbstgmedData == 0, "bindinfo.cbstgmedData=%d\n", bindinfo.cbstgmedData); - ok(bindinfo.dwOptions == 0x80000 || bindinfo.dwOptions == 0x4080000, - "bindinfo.dwOptions=%x\n", bindinfo.dwOptions); - ok(bindinfo.dwOptionsFlags == 0, "bindinfo.dwOptionsFlags=%d\n", bindinfo.dwOptionsFlags); - /* TODO: test dwCodePage */ - /* TODO: test securityAttributes */ - ok(IsEqualGUID(&IID_NULL, &bindinfo.iid), "unexpected bindinfo.iid\n"); - ok(bindinfo.pUnk == NULL, "bindinfo.pUnk=%p\n", bindinfo.pUnk); - ok(bindinfo.dwReserved == 0, "bindinfo.dwReserved=%d\n", bindinfo.dwReserved); - - hres = IBindStatusCallback_OnStartBinding(callback, 0, &Binding); - ok(hres == S_OK, "OnStartBinding failed: %08x\n", hres); - - hres = IBindStatusCallback_OnProgress(callback, 0, 0, BINDSTATUS_MIMETYPEAVAILABLE, - wszTextHtml); - ok(hres == S_OK, "OnProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08x\n", hres); - - hres = IBindStatusCallback_OnProgress(callback, sizeof(html_page)-1, sizeof(html_page)-1, - BINDSTATUS_BEGINDOWNLOADDATA, doc_url); - ok(hres == S_OK, "OnProgress(BINDSTATUS_BEGINDOWNLOADDATA) failed: %08x\n", hres); - - SET_EXPECT(Read); - stgmedium.tymed = TYMED_ISTREAM; - U(stgmedium).pstm = &Stream; - stgmedium.pUnkForRelease = (IUnknown*)iface; - hres = IBindStatusCallback_OnDataAvailable(callback, - BSCF_FIRSTDATANOTIFICATION|BSCF_LASTDATANOTIFICATION, - sizeof(html_page)-1, &formatetc, &stgmedium); - ok(hres == S_OK, "OnDataAvailable failed: %08x\n", hres); - CHECK_CALLED(Read); - - hres = IBindStatusCallback_OnProgress(callback, sizeof(html_page)-1, sizeof(html_page)-1, - BINDSTATUS_ENDDOWNLOADDATA, NULL); - ok(hres == S_OK, "OnProgress(BINDSTATUS_ENDDOWNLOADDATA) failed: %08x\n", hres); - - SET_EXPECT(GetBindResult); - hres = IBindStatusCallback_OnStopBinding(callback, S_OK, NULL); - ok(hres == S_OK, "OnStopBinding failed: %08x\n", hres); - SET_CALLED(GetBindResult); /* IE7 */ - - IBindStatusCallback_Release(callback); - - return S_OK; -} - -static HRESULT WINAPI Moniker_Reduce(IMoniker *iface, IBindCtx *pbc, DWORD dwReduceHowFar, - IMoniker **ppmkToLeft, IMoniker **ppmkReduced) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_ComposeWith(IMoniker *iface, IMoniker *pmkRight, - BOOL fOnlyIfNotGeneric, IMoniker **ppnkComposite) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_Enum(IMoniker *iface, BOOL fForwrd, IEnumMoniker **ppenumMoniker) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_IsEqual(IMoniker *iface, IMoniker *pmkOtherMoniker) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_Hash(IMoniker *iface, DWORD *pdwHash) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_IsRunning(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, - IMoniker *pmkNewlyRunning) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_GetTimeOfLastChange(IMoniker *iface, IBindCtx *pbc, - IMoniker *pmkToLeft, FILETIME *pFileTime) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_Inverse(IMoniker *iface, IMoniker **ppmk) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_CommonPrefixWith(IMoniker *iface, IMoniker *pmkOther, - IMoniker **ppmkPrefix) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_RelativePathTo(IMoniker *iface, IMoniker *pmkOther, - IMoniker **pmkRelPath) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_GetDisplayName(IMoniker *iface, IBindCtx *pbc, - IMoniker *pmkToLeft, LPOLESTR *ppszDisplayName) -{ - CHECK_EXPECT2(GetDisplayName); - - /* ok(pbc != NULL, "pbc == NULL\n"); */ - ok(pmkToLeft == NULL, "pmkToLeft=%p\n", pmkToLeft); - ok(ppszDisplayName != NULL, "ppszDisplayName == NULL\n"); - - *ppszDisplayName = CoTaskMemAlloc(sizeof(doc_url)); - memcpy(*ppszDisplayName, doc_url, sizeof(doc_url)); - - return S_OK; -} - -static HRESULT WINAPI Moniker_ParseDisplayName(IMoniker *iface, IBindCtx *pbc, - IMoniker *pmkToLeft, LPOLESTR pszDisplayName, ULONG *pchEaten, IMoniker **ppmkOut) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Moniker_IsSystemMoniker(IMoniker *iface, DWORD *pdwMksys) -{ - CHECK_EXPECT(IsSystemMoniker); - return E_NOTIMPL; -} - -static const IMonikerVtbl MonikerVtbl = { - Moniker_QueryInterface, - Moniker_AddRef, - Moniker_Release, - Moniker_GetClassID, - Moniker_IsDirty, - Moniker_Load, - Moniker_Save, - Moniker_GetSizeMax, - Moniker_BindToObject, - Moniker_BindToStorage, - Moniker_Reduce, - Moniker_ComposeWith, - Moniker_Enum, - Moniker_IsEqual, - Moniker_Hash, - Moniker_IsRunning, - Moniker_GetTimeOfLastChange, - Moniker_Inverse, - Moniker_CommonPrefixWith, - Moniker_RelativePathTo, - Moniker_GetDisplayName, - Moniker_ParseDisplayName, - Moniker_IsSystemMoniker -}; - -static IMoniker Moniker = { &MonikerVtbl }; - -static HRESULT WINAPI OleContainer_QueryInterface(IOleContainer *iface, REFIID riid, void **ppv) -{ - return QueryInterface(riid, ppv); -} - -static ULONG WINAPI OleContainer_AddRef(IOleContainer *iface) -{ - return 2; -} - -static ULONG WINAPI OleContainer_Release(IOleContainer *iface) -{ - return 1; -} - -static HRESULT WINAPI OleContainer_ParseDisplayName(IOleContainer *iface, IBindCtx *pbc, - LPOLESTR pszDiaplayName, ULONG *pchEaten, IMoniker **ppmkOut) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI OleContainer_EnumObjects(IOleContainer *iface, DWORD grfFlags, - IEnumUnknown **ppenum) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI OleContainer_LockContainer(IOleContainer *iface, BOOL fLock) -{ - CHECK_EXPECT(LockContainer); - ok(expect_LockContainer_fLock == fLock, "fLock=%x, expected %x\n", fLock, expect_LockContainer_fLock); - return S_OK; -} - -static const IOleContainerVtbl OleContainerVtbl = { - OleContainer_QueryInterface, - OleContainer_AddRef, - OleContainer_Release, - OleContainer_ParseDisplayName, - OleContainer_EnumObjects, - OleContainer_LockContainer -}; - -static IOleContainer OleContainer = { &OleContainerVtbl }; - -static HRESULT WINAPI ClientSite_QueryInterface(IOleClientSite *iface, REFIID riid, void **ppv) -{ - return QueryInterface(riid, ppv); -} - -static ULONG WINAPI ClientSite_AddRef(IOleClientSite *iface) -{ - return 2; -} - -static ULONG WINAPI ClientSite_Release(IOleClientSite *iface) -{ - return 1; -} - -static HRESULT WINAPI ClientSite_SaveObject(IOleClientSite *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ClientSite_GetMoniker(IOleClientSite *iface, DWORD dwAssign, DWORD dwWhichMoniker, - IMoniker **ppmon) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ClientSite_GetContainer(IOleClientSite *iface, IOleContainer **ppContainer) -{ - CHECK_EXPECT(GetContainer); - ok(ppContainer != NULL, "ppContainer = NULL\n"); - *ppContainer = &OleContainer; - return S_OK; -} - -static HRESULT WINAPI ClientSite_ShowObject(IOleClientSite *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ClientSite_OnShowWindow(IOleClientSite *iface, BOOL fShow) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ClientSite_RequestNewObjectLayout(IOleClientSite *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static const IOleClientSiteVtbl ClientSiteVtbl = { - ClientSite_QueryInterface, - ClientSite_AddRef, - ClientSite_Release, - ClientSite_SaveObject, - ClientSite_GetMoniker, - ClientSite_GetContainer, - ClientSite_ShowObject, - ClientSite_OnShowWindow, - ClientSite_RequestNewObjectLayout -}; - -static IOleClientSite ClientSite = { &ClientSiteVtbl }; - -static HRESULT WINAPI InPlaceFrame_QueryInterface(IOleInPlaceFrame *iface, REFIID riid, void **ppv) -{ - static const GUID undocumented_frame_iid = {0xfbece6c9,0x48d7,0x4a37,{0x8f,0xe3,0x6a,0xd4,0x27,0x2f,0xdd,0xac}}; - - if(!IsEqualGUID(&undocumented_frame_iid, riid)) - ok(0, "unexpected riid %s\n", debugstr_guid(riid)); - - *ppv = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI InPlaceFrame_AddRef(IOleInPlaceFrame *iface) -{ - return 2; -} - -static ULONG WINAPI InPlaceFrame_Release(IOleInPlaceFrame *iface) -{ - return 1; -} - -static HRESULT WINAPI InPlaceFrame_GetWindow(IOleInPlaceFrame *iface, HWND *phwnd) -{ - CHECK_EXPECT(Frame_GetWindow); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_ContextSensitiveHelp(IOleInPlaceFrame *iface, BOOL fEnterMode) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_GetBorder(IOleInPlaceFrame *iface, LPRECT lprectBorder) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_RequestBorderSpace(IOleInPlaceFrame *iface, - LPCBORDERWIDTHS pborderwidths) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_SetBorderSpace(IOleInPlaceFrame *iface, - LPCBORDERWIDTHS pborderwidths) -{ - CHECK_EXPECT(InPlaceFrame_SetBorderSpace); - return S_OK; -} - -static HRESULT WINAPI InPlaceUIWindow_SetActiveObject(IOleInPlaceFrame *iface, - IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName) -{ - static const WCHAR wszHTML_Document[] = - {'H','T','M','L',' ','D','o','c','u','m','e','n','t',0}; - - CHECK_EXPECT2(InPlaceUIWindow_SetActiveObject); - - if(expect_InPlaceUIWindow_SetActiveObject_active) { - ok(pActiveObject != NULL, "pActiveObject = NULL\n"); - if(pActiveObject && is_english()) - ok(!lstrcmpW(wszHTML_Document, pszObjName), "pszObjName != \"HTML Document\"\n"); - } - else { - ok(pActiveObject == NULL, "pActiveObject=%p, expected NULL\n", pActiveObject); - ok(pszObjName == NULL, "pszObjName=%p, expected NULL\n", pszObjName); - } - expect_InPlaceUIWindow_SetActiveObject_active = !expect_InPlaceUIWindow_SetActiveObject_active; - return S_OK; -} - -static HRESULT WINAPI InPlaceFrame_SetActiveObject(IOleInPlaceFrame *iface, - IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName) -{ - static const WCHAR wszHTML_Document[] = - {'H','T','M','L',' ','D','o','c','u','m','e','n','t',0}; - - if(pActiveObject) { - CHECK_EXPECT2(SetActiveObject); - - if(pActiveObject && is_english()) - ok(!lstrcmpW(wszHTML_Document, pszObjName), "pszObjName != \"HTML Document\"\n"); - }else { - CHECK_EXPECT(SetActiveObject_null); - - ok(pActiveObject == NULL, "pActiveObject=%p, expected NULL\n", pActiveObject); - ok(pszObjName == NULL, "pszObjName=%p, expected NULL\n", pszObjName); - } - - return S_OK; -} - -static HRESULT WINAPI InPlaceFrame_InsertMenus(IOleInPlaceFrame *iface, HMENU hmenuShared, - LPOLEMENUGROUPWIDTHS lpMenuWidths) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_SetMenu(IOleInPlaceFrame *iface, HMENU hmenuShared, - HOLEMENU holemenu, HWND hwndActiveObject) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_RemoveMenus(IOleInPlaceFrame *iface, HMENU hmenuShared) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_SetStatusText(IOleInPlaceFrame *iface, LPCOLESTR pszStatusText) -{ - CHECK_EXPECT2(SetStatusText); - if(!expect_status_text) - ok(pszStatusText == NULL, "pszStatusText=%p, expected NULL\n", pszStatusText); - return S_OK; -} - -static HRESULT WINAPI InPlaceFrame_EnableModeless(IOleInPlaceFrame *iface, BOOL fEnable) -{ - if(fEnable) - CHECK_EXPECT2(Frame_EnableModeless_TRUE); - else - CHECK_EXPECT2(Frame_EnableModeless_FALSE); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_TranslateAccelerator(IOleInPlaceFrame *iface, LPMSG lpmsg, WORD wID) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static const IOleInPlaceFrameVtbl InPlaceFrameVtbl = { - InPlaceFrame_QueryInterface, - InPlaceFrame_AddRef, - InPlaceFrame_Release, - InPlaceFrame_GetWindow, - InPlaceFrame_ContextSensitiveHelp, - InPlaceFrame_GetBorder, - InPlaceFrame_RequestBorderSpace, - InPlaceFrame_SetBorderSpace, - InPlaceFrame_SetActiveObject, - InPlaceFrame_InsertMenus, - InPlaceFrame_SetMenu, - InPlaceFrame_RemoveMenus, - InPlaceFrame_SetStatusText, - InPlaceFrame_EnableModeless, - InPlaceFrame_TranslateAccelerator -}; - -static IOleInPlaceFrame InPlaceFrame = { &InPlaceFrameVtbl }; - -static const IOleInPlaceFrameVtbl InPlaceUIWindowVtbl = { - InPlaceFrame_QueryInterface, - InPlaceFrame_AddRef, - InPlaceFrame_Release, - InPlaceFrame_GetWindow, - InPlaceFrame_ContextSensitiveHelp, - InPlaceFrame_GetBorder, - InPlaceFrame_RequestBorderSpace, - InPlaceFrame_SetBorderSpace, - InPlaceUIWindow_SetActiveObject, -}; - -static IOleInPlaceFrame InPlaceUIWindow = { &InPlaceUIWindowVtbl }; - -static HRESULT WINAPI InPlaceSiteWindowless_QueryInterface(IOleInPlaceSiteWindowless *iface, REFIID riid, void **ppv) -{ - return QueryInterface(riid, ppv); -} - -static ULONG WINAPI InPlaceSiteWindowless_AddRef(IOleInPlaceSiteWindowless *iface) -{ - return 2; -} - -static ULONG WINAPI InPlaceSiteWindowless_Release(IOleInPlaceSiteWindowless *iface) -{ - return 1; -} - -static HRESULT WINAPI InPlaceSiteWindowless_GetWindow( - IOleInPlaceSiteWindowless *iface, HWND *phwnd) -{ - IOleClientSite *client_site; - IOleObject *ole_obj; - HRESULT hres; - - CHECK_EXPECT2(GetWindow); - ok(phwnd != NULL, "phwnd = NULL\n"); - *phwnd = container_hwnd; - - hres = IUnknown_QueryInterface(doc_unk, &IID_IOleObject, (void**)&ole_obj); - ok(hres == S_OK, "Could not get IOleObject: %08x\n", hres); - - hres = IOleObject_GetClientSite(ole_obj, &client_site); - IOleObject_Release(ole_obj); - ok(hres == S_OK, "GetClientSite failed: %08x\n", hres); - ok(client_site == &ClientSite, "client_site != ClientSite\n"); - IOleClientSite_Release(client_site); - - return S_OK; -} - -static HRESULT WINAPI InPlaceSiteWindowless_ContextSensitiveHelp( - IOleInPlaceSiteWindowless *iface, BOOL fEnterMode) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSiteWindowless_CanInPlaceActivate( - IOleInPlaceSiteWindowless *iface) -{ - CHECK_EXPECT(CanInPlaceActivate); - return S_OK; -} - -static HRESULT WINAPI InPlaceSiteWindowless_OnInPlaceActivate( - IOleInPlaceSiteWindowless *iface) -{ - CHECK_EXPECT(OnInPlaceActivate); - inplace_deactivated = FALSE; - return S_OK; -} - -static HRESULT WINAPI InPlaceSiteWindowless_OnUIActivate( - IOleInPlaceSiteWindowless *iface) -{ - CHECK_EXPECT(OnUIActivate); - return S_OK; -} - -static HRESULT WINAPI InPlaceSiteWindowless_GetWindowContext( - IOleInPlaceSiteWindowless *iface, IOleInPlaceFrame **ppFrame, - IOleInPlaceUIWindow **ppDoc, LPRECT lprcPosRect, - LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo) -{ - static const RECT rect = {0,0,500,500}; - - CHECK_EXPECT(GetWindowContext); - - ok(ppFrame != NULL, "ppFrame = NULL\n"); - if(ppFrame) - *ppFrame = &InPlaceFrame; - ok(ppDoc != NULL, "ppDoc = NULL\n"); - if(ppDoc) - *ppDoc = (IOleInPlaceUIWindow*)&InPlaceUIWindow; - ok(lprcPosRect != NULL, "lprcPosRect = NULL\n"); - if(lprcPosRect) - memcpy(lprcPosRect, &rect, sizeof(RECT)); - ok(lprcClipRect != NULL, "lprcClipRect = NULL\n"); - if(lprcClipRect) - memcpy(lprcClipRect, &rect, sizeof(RECT)); - ok(lpFrameInfo != NULL, "lpFrameInfo = NULL\n"); - if(lpFrameInfo) { - lpFrameInfo->cb = sizeof(*lpFrameInfo); - lpFrameInfo->fMDIApp = FALSE; - lpFrameInfo->hwndFrame = container_hwnd; - lpFrameInfo->haccel = NULL; - lpFrameInfo->cAccelEntries = 0; - } - - return S_OK; -} - -static HRESULT WINAPI InPlaceSiteWindowless_Scroll( - IOleInPlaceSiteWindowless *iface, SIZE scrollExtent) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSiteWindowless_OnUIDeactivate( - IOleInPlaceSiteWindowless *iface, BOOL fUndoable) -{ - CHECK_EXPECT(OnUIDeactivate); - ok(!fUndoable, "fUndoable = TRUE\n"); - return S_OK; -} - -static HRESULT WINAPI InPlaceSiteWindowless_OnInPlaceDeactivate( - IOleInPlaceSiteWindowless *iface) -{ - CHECK_EXPECT(OnInPlaceDeactivate); - inplace_deactivated = TRUE; - return S_OK; -} - -static HRESULT WINAPI InPlaceSiteWindowless_DiscardUndoState( - IOleInPlaceSiteWindowless *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSiteWindowless_DeactivateAndUndo( - IOleInPlaceSiteWindowless *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSiteWindowless_OnPosRectChange( - IOleInPlaceSiteWindowless *iface, LPCRECT lprcPosRect) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSiteWindowless_OnInPlaceActivateEx( - IOleInPlaceSiteWindowless *iface, BOOL *pfNoRedraw, DWORD dwFlags) -{ - CHECK_EXPECT(OnInPlaceActivateEx); - - ok(pfNoRedraw != NULL, "pfNoRedraw == NULL\n"); - ok(!*pfNoRedraw, "*pfNoRedraw == TRUE\n"); - ok(dwFlags == 0, "dwFlags = %08x\n", dwFlags); - - return S_OK; -} - -static HRESULT WINAPI InPlaceSiteWindowless_OnInPlaceDeactivateEx( - IOleInPlaceSiteWindowless *iface, BOOL fNoRedraw) -{ - CHECK_EXPECT(OnInPlaceDeactivateEx); - - ok(fNoRedraw, "fNoRedraw == FALSE\n"); - - return S_OK; -} - -static HRESULT WINAPI InPlaceSiteWindowless_RequestUIActivate( - IOleInPlaceSiteWindowless *iface) -{ - CHECK_EXPECT2(RequestUIActivate); - return S_OK; -} - -static HRESULT WINAPI InPlaceSiteWindowless_CanWindowlessActivate( - IOleInPlaceSiteWindowless *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSiteWindowless_GetCapture( - IOleInPlaceSiteWindowless *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSiteWindowless_SetCapture( - IOleInPlaceSiteWindowless *iface, BOOL fCapture) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSiteWindowless_GetFocus( - IOleInPlaceSiteWindowless *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSiteWindowless_SetFocus( - IOleInPlaceSiteWindowless *iface, BOOL fFocus) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSiteWindowless_GetDC( - IOleInPlaceSiteWindowless *iface, LPCRECT pRect, - DWORD grfFlags, HDC *phDC) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSiteWindowless_ReleaseDC( - IOleInPlaceSiteWindowless *iface, HDC hDC) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSiteWindowless_InvalidateRect( - IOleInPlaceSiteWindowless *iface, LPCRECT pRect, BOOL fErase) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSiteWindowless_InvalidateRgn( - IOleInPlaceSiteWindowless *iface, HRGN hRGN, BOOL fErase) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSiteWindowless_ScrollRect( - IOleInPlaceSiteWindowless *iface, INT dx, INT dy, - LPCRECT pRectScroll, LPCRECT pRectClip) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSiteWindowless_AdjustRect( - IOleInPlaceSiteWindowless *iface, LPRECT prc) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSiteWindowless_OnDefWindowMessage( - IOleInPlaceSiteWindowless *iface, UINT msg, - WPARAM wParam, LPARAM lParam, LRESULT *plResult) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static const IOleInPlaceSiteWindowlessVtbl InPlaceSiteWindowlessVtbl = { - InPlaceSiteWindowless_QueryInterface, - InPlaceSiteWindowless_AddRef, - InPlaceSiteWindowless_Release, - InPlaceSiteWindowless_GetWindow, - InPlaceSiteWindowless_ContextSensitiveHelp, - InPlaceSiteWindowless_CanInPlaceActivate, - InPlaceSiteWindowless_OnInPlaceActivate, - InPlaceSiteWindowless_OnUIActivate, - InPlaceSiteWindowless_GetWindowContext, - InPlaceSiteWindowless_Scroll, - InPlaceSiteWindowless_OnUIDeactivate, - InPlaceSiteWindowless_OnInPlaceDeactivate, - InPlaceSiteWindowless_DiscardUndoState, - InPlaceSiteWindowless_DeactivateAndUndo, - InPlaceSiteWindowless_OnPosRectChange, - InPlaceSiteWindowless_OnInPlaceActivateEx, - InPlaceSiteWindowless_OnInPlaceDeactivateEx, - InPlaceSiteWindowless_RequestUIActivate, - InPlaceSiteWindowless_CanWindowlessActivate, - InPlaceSiteWindowless_GetCapture, - InPlaceSiteWindowless_SetCapture, - InPlaceSiteWindowless_GetFocus, - InPlaceSiteWindowless_SetFocus, - InPlaceSiteWindowless_GetDC, - InPlaceSiteWindowless_ReleaseDC, - InPlaceSiteWindowless_InvalidateRect, - InPlaceSiteWindowless_InvalidateRgn, - InPlaceSiteWindowless_ScrollRect, - InPlaceSiteWindowless_AdjustRect, - InPlaceSiteWindowless_OnDefWindowMessage -}; - -static IOleInPlaceSiteWindowless InPlaceSiteWindowless = { &InPlaceSiteWindowlessVtbl }; - -static HRESULT WINAPI DocumentSite_QueryInterface(IOleDocumentSite *iface, REFIID riid, void **ppv) -{ - return QueryInterface(riid, ppv); -} - -static ULONG WINAPI DocumentSite_AddRef(IOleDocumentSite *iface) -{ - return 2; -} - -static ULONG WINAPI DocumentSite_Release(IOleDocumentSite *iface) -{ - return 1; -} - -typedef enum -{ - CallUIActivate_None, - CallUIActivate_ActivateMe, - CallUIActivate_AfterShow, -} CallUIActivate; - -static BOOL call_UIActivate = CallUIActivate_ActivateMe; -static HRESULT WINAPI DocumentSite_ActivateMe(IOleDocumentSite *iface, IOleDocumentView *pViewToActivate) -{ - IOleDocument *document; - HRESULT hres; - - CHECK_EXPECT(ActivateMe); - ok(pViewToActivate != NULL, "pViewToActivate = NULL\n"); - - hres = IOleDocumentView_QueryInterface(pViewToActivate, &IID_IOleDocument, (void**)&document); - ok(hres == S_OK, "could not get IOleDocument: %08x\n", hres); - - if(SUCCEEDED(hres)) { - hres = IOleDocument_CreateView(document, (IOleInPlaceSite*)&InPlaceSiteWindowless, NULL, 0, &view); - ok(hres == S_OK, "CreateView failed: %08x\n", hres); - - if(SUCCEEDED(hres)) { - IOleInPlaceActiveObject *activeobj = NULL; - IOleInPlaceSite *inplacesite = NULL; - HWND tmp_hwnd = NULL; - static RECT rect = {0,0,400,500}; - - hres = IOleDocumentView_GetInPlaceSite(view, &inplacesite); - ok(hres == S_OK, "GetInPlaceSite failed: %08x\n", hres); - ok(inplacesite == (IOleInPlaceSite*)&InPlaceSiteWindowless, "inplacesite=%p, expected %p\n", - inplacesite, &InPlaceSiteWindowless); - - hres = IOleDocumentView_SetInPlaceSite(view, (IOleInPlaceSite*)&InPlaceSiteWindowless); - ok(hres == S_OK, "SetInPlaceSite failed: %08x\n", hres); - - hres = IOleDocumentView_GetInPlaceSite(view, &inplacesite); - ok(hres == S_OK, "GetInPlaceSite failed: %08x\n", hres); - ok(inplacesite == (IOleInPlaceSite*)&InPlaceSiteWindowless, "inplacesite=%p, expected %p\n", - inplacesite, &InPlaceSiteWindowless); - - hres = IOleDocumentView_QueryInterface(view, &IID_IOleInPlaceActiveObject, (void**)&activeobj); - ok(hres == S_OK, "Could not get IOleInPlaceActiveObject: %08x\n", hres); - - if(activeobj) { - IOleInPlaceActiveObject_GetWindow(activeobj, &hwnd); - ok(hres == S_OK, "GetWindow failed: %08x\n", hres); - ok(hwnd == NULL, "hwnd=%p, expeted NULL\n", hwnd); - } - - if(call_UIActivate == CallUIActivate_ActivateMe) { - SET_EXPECT(CanInPlaceActivate); - SET_EXPECT(GetWindowContext); - SET_EXPECT(GetWindow); - if(ipsex) - SET_EXPECT(OnInPlaceActivateEx); - else - SET_EXPECT(OnInPlaceActivate); - SET_EXPECT(SetStatusText); - SET_EXPECT(Exec_SETPROGRESSMAX); - SET_EXPECT(Exec_SETPROGRESSPOS); - SET_EXPECT(OnUIActivate); - SET_EXPECT(SetActiveObject); - SET_EXPECT(ShowUI); - expect_status_text = NULL; - - hres = IOleDocumentView_UIActivate(view, TRUE); - ok(hres == S_OK, "UIActivate failed: %08x\n", hres); - - CHECK_CALLED(CanInPlaceActivate); - CHECK_CALLED(GetWindowContext); - CHECK_CALLED(GetWindow); - if(ipsex) - CHECK_CALLED(OnInPlaceActivateEx); - else - CHECK_CALLED(OnInPlaceActivate); - CHECK_CALLED(SetStatusText); - CHECK_CALLED(Exec_SETPROGRESSMAX); - CHECK_CALLED(Exec_SETPROGRESSPOS); - CHECK_CALLED(OnUIActivate); - CHECK_CALLED(SetActiveObject); - CHECK_CALLED(ShowUI); - - if(activeobj) { - hres = IOleInPlaceActiveObject_GetWindow(activeobj, &hwnd); - ok(hres == S_OK, "GetWindow failed: %08x\n", hres); - ok(hwnd != NULL, "hwnd == NULL\n"); - if(last_hwnd) - ok(hwnd == last_hwnd, "hwnd != last_hwnd\n"); - } - - hres = IOleDocumentView_UIActivate(view, TRUE); - ok(hres == S_OK, "UIActivate failed: %08x\n", hres); - - if(activeobj) { - hres = IOleInPlaceActiveObject_GetWindow(activeobj, &tmp_hwnd); - ok(hres == S_OK, "GetWindow failed: %08x\n", hres); - ok(tmp_hwnd == hwnd, "tmp_hwnd=%p, expected %p\n", tmp_hwnd, hwnd); - } - } - - hres = IOleDocumentView_SetRect(view, &rect); - ok(hres == S_OK, "SetRect failed: %08x\n", hres); - - if(call_UIActivate == CallUIActivate_ActivateMe) { - hres = IOleDocumentView_Show(view, TRUE); - ok(hres == S_OK, "Show failed: %08x\n", hres); - }else { - SET_EXPECT(CanInPlaceActivate); - SET_EXPECT(GetWindowContext); - SET_EXPECT(GetWindow); - if(ipsex) - SET_EXPECT(OnInPlaceActivateEx); - else - SET_EXPECT(OnInPlaceActivate); - SET_EXPECT(SetStatusText); - SET_EXPECT(Exec_SETPROGRESSMAX); - SET_EXPECT(Exec_SETPROGRESSPOS); - SET_EXPECT(OnUIActivate); - expect_status_text = (load_state == LD_COMPLETE ? (LPCOLESTR)0xdeadbeef : NULL); - - hres = IOleDocumentView_Show(view, TRUE); - if(FAILED(hres)) { - win_skip("Show failed\n"); - if(activeobj) - IOleInPlaceActiveObject_Release(activeobj); - IOleDocument_Release(document); - show_failed = TRUE; - return S_OK; - } - ok(hres == S_OK, "Show failed: %08x\n", hres); - - CHECK_CALLED(CanInPlaceActivate); - CHECK_CALLED(GetWindowContext); - CHECK_CALLED(GetWindow); - if(ipsex) - CHECK_CALLED(OnInPlaceActivateEx); - else - CHECK_CALLED(OnInPlaceActivate); - CHECK_CALLED(SetStatusText); - CHECK_CALLED(Exec_SETPROGRESSMAX); - CHECK_CALLED(Exec_SETPROGRESSPOS); - - if(activeobj) { - hres = IOleInPlaceActiveObject_GetWindow(activeobj, &hwnd); - ok(hres == S_OK, "GetWindow failed: %08x\n", hres); - ok(hwnd != NULL, "hwnd == NULL\n"); - if(last_hwnd) - ok(hwnd == last_hwnd, "hwnd != last_hwnd\n"); - } - } - - test_timer(EXPECT_UPDATEUI | ((load_state == LD_LOADING) ? EXPECT_SETTITLE : 0)); - - if(activeobj) - IOleInPlaceActiveObject_Release(activeobj); - } - - IOleDocument_Release(document); - } - - return S_OK; -} - -static const IOleDocumentSiteVtbl DocumentSiteVtbl = { - DocumentSite_QueryInterface, - DocumentSite_AddRef, - DocumentSite_Release, - DocumentSite_ActivateMe -}; - -static IOleDocumentSite DocumentSite = { &DocumentSiteVtbl }; - -static HRESULT WINAPI OleControlSite_QueryInterface(IOleControlSite *iface, REFIID riid, void **ppv) -{ - return QueryInterface(riid, ppv); -} - -static ULONG WINAPI OleControlSite_AddRef(IOleControlSite *iface) -{ - return 2; -} - -static ULONG WINAPI OleControlSite_Release(IOleControlSite *iface) -{ - return 1; -} - -static HRESULT WINAPI OleControlSite_OnControlInfoChanged(IOleControlSite *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI OleControlSite_LockInPlaceActive(IOleControlSite *iface, BOOL fLock) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI OleControlSite_GetExtendedControl(IOleControlSite *iface, IDispatch **ppDisp) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI OleControlSite_TransformCoords(IOleControlSite *iface, POINTL *pPtHimetric, - POINTF *pPtfContainer, DWORD dwFlags) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI OleControlSite_TranslateAccelerator(IOleControlSite *iface, - MSG *pMsg, DWORD grfModifiers) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI OleControlSite_OnFocus(IOleControlSite *iface, BOOL fGotFocus) -{ - if(fGotFocus) - CHECK_EXPECT(OnFocus_TRUE); - else - CHECK_EXPECT2(OnFocus_FALSE); - return S_OK; -} - -static HRESULT WINAPI OleControlSite_ShowPropertyFrame(IOleControlSite *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static const IOleControlSiteVtbl OleControlSiteVtbl = { - OleControlSite_QueryInterface, - OleControlSite_AddRef, - OleControlSite_Release, - OleControlSite_OnControlInfoChanged, - OleControlSite_LockInPlaceActive, - OleControlSite_GetExtendedControl, - OleControlSite_TransformCoords, - OleControlSite_TranslateAccelerator, - OleControlSite_OnFocus, - OleControlSite_ShowPropertyFrame -}; - -static IOleControlSite OleControlSite = { &OleControlSiteVtbl }; - -static HRESULT WINAPI DocHostUIHandler_QueryInterface(IDocHostUIHandler2 *iface, REFIID riid, void **ppv) -{ - return QueryInterface(riid, ppv); -} - -static ULONG WINAPI DocHostUIHandler_AddRef(IDocHostUIHandler2 *iface) -{ - return 2; -} - -static ULONG WINAPI DocHostUIHandler_Release(IDocHostUIHandler2 *iface) -{ - return 1; -} - -static HRESULT WINAPI DocHostUIHandler_ShowContextMenu(IDocHostUIHandler2 *iface, DWORD dwID, POINT *ppt, - IUnknown *pcmdtReserved, IDispatch *pdicpReserved) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_GetHostInfo(IDocHostUIHandler2 *iface, DOCHOSTUIINFO *pInfo) -{ - CHECK_EXPECT(GetHostInfo); - ok(pInfo != NULL, "pInfo=NULL\n"); - if(pInfo) { - ok(pInfo->cbSize == sizeof(DOCHOSTUIINFO), "pInfo->cbSize=%u\n", pInfo->cbSize); - ok(!pInfo->dwFlags, "pInfo->dwFlags=%08x, expected 0\n", pInfo->dwFlags); - pInfo->dwFlags = DOCHOSTUIFLAG_DISABLE_HELP_MENU | DOCHOSTUIFLAG_DISABLE_SCRIPT_INACTIVE - | DOCHOSTUIFLAG_ACTIVATE_CLIENTHIT_ONLY | DOCHOSTUIFLAG_ENABLE_INPLACE_NAVIGATION - | DOCHOSTUIFLAG_IME_ENABLE_RECONVERSION; - ok(!pInfo->dwDoubleClick, "pInfo->dwDoubleClick=%08x, expected 0\n", pInfo->dwDoubleClick); - ok(!pInfo->pchHostCss, "pInfo->pchHostCss=%p, expected NULL\n", pInfo->pchHostCss); - ok(!pInfo->pchHostNS, "pInfo->pchhostNS=%p, expected NULL\n", pInfo->pchHostNS); - } - return S_OK; -} - -static HRESULT WINAPI DocHostUIHandler_ShowUI(IDocHostUIHandler2 *iface, DWORD dwID, - IOleInPlaceActiveObject *pActiveObject, IOleCommandTarget *pCommandTarget, - IOleInPlaceFrame *pFrame, IOleInPlaceUIWindow *pDoc) -{ - CHECK_EXPECT(ShowUI); - - if (editmode) - ok(dwID == DOCHOSTUITYPE_AUTHOR, "dwID=%d, expected DOCHOSTUITYPE_AUTHOR\n", dwID); - else - ok(dwID == DOCHOSTUITYPE_BROWSE, "dwID=%d, expected DOCHOSTUITYPE_BROWSE\n", dwID); - ok(pActiveObject != NULL, "pActiveObject = NULL\n"); - ok(pCommandTarget != NULL, "pCommandTarget = NULL\n"); - ok(pFrame == &InPlaceFrame, "pFrame=%p, expected %p\n", pFrame, &InPlaceFrame); - if (expect_InPlaceUIWindow_SetActiveObject_active) - ok(pDoc == (IOleInPlaceUIWindow *)&InPlaceUIWindow, "pDoc=%p, expected %p\n", pDoc, &InPlaceUIWindow); - else - ok(pDoc == NULL, "pDoc=%p, expected NULL\n", pDoc); - - return S_OK; -} - -static HRESULT WINAPI DocHostUIHandler_HideUI(IDocHostUIHandler2 *iface) -{ - CHECK_EXPECT(HideUI); - return S_OK; -} - -static HRESULT WINAPI DocHostUIHandler_UpdateUI(IDocHostUIHandler2 *iface) -{ - CHECK_EXPECT(UpdateUI); - return S_OK; -} - -static HRESULT WINAPI DocHostUIHandler_EnableModeless(IDocHostUIHandler2 *iface, BOOL fEnable) -{ - if(fEnable) - CHECK_EXPECT2(EnableModeless_TRUE); - else - CHECK_EXPECT2(EnableModeless_FALSE); - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_OnDocWindowActivate(IDocHostUIHandler2 *iface, BOOL fActivate) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static BOOL expect_OnFrameWindowActivate_fActivate; -static HRESULT WINAPI DocHostUIHandler_OnFrameWindowActivate(IDocHostUIHandler2 *iface, BOOL fActivate) -{ - CHECK_EXPECT2(OnFrameWindowActivate); - ok(fActivate == expect_OnFrameWindowActivate_fActivate, "fActivate=%x\n", fActivate); - return S_OK; -} - -static HRESULT WINAPI DocHostUIHandler_ResizeBorder(IDocHostUIHandler2 *iface, LPCRECT prcBorder, - IOleInPlaceUIWindow *pUIWindow, BOOL fRameWindow) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_TranslateAccelerator(IDocHostUIHandler2 *iface, LPMSG lpMsg, - const GUID *pguidCmdGroup, DWORD nCmdID) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_GetOptionKeyPath(IDocHostUIHandler2 *iface, - LPOLESTR *pchKey, DWORD dw) -{ - CHECK_EXPECT(GetOptionKeyPath); - ok(pchKey != NULL, "pchKey = NULL\n"); - ok(!dw, "dw=%d, expected 0\n", dw); - if(pchKey) - ok(!*pchKey, "*pchKey=%p, expected NULL\n", *pchKey); - return S_OK; -} - -static HRESULT WINAPI DocHostUIHandler_GetDropTarget(IDocHostUIHandler2 *iface, - IDropTarget *pDropTarget, IDropTarget **ppDropTarget) -{ - CHECK_EXPECT(GetDropTarget); - /* TODO */ - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_GetExternal(IDocHostUIHandler2 *iface, IDispatch **ppDispatch) -{ - CHECK_EXPECT(GetExternal); - *ppDispatch = &External; - return S_FALSE; -} - -static HRESULT WINAPI DocHostUIHandler_TranslateUrl(IDocHostUIHandler2 *iface, DWORD dwTranslate, - OLECHAR *pchURLIn, OLECHAR **ppchURLOut) -{ - CHECK_EXPECT(TranslateUrl); - ok(!dwTranslate, "dwTranslate = %x\n", dwTranslate); - ok(!strcmp_wa(pchURLIn, "about:blank"), "pchURLIn = %s\n", wine_dbgstr_w(pchURLIn)); - ok(ppchURLOut != NULL, "ppchURLOut == NULL\n"); - ok(!*ppchURLOut, "*ppchURLOut = %p\n", *ppchURLOut); - - return S_FALSE; -} - -static HRESULT WINAPI DocHostUIHandler_FilterDataObject(IDocHostUIHandler2 *iface, IDataObject *pDO, - IDataObject **ppPORet) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_GetOverrideKeyPath(IDocHostUIHandler2 *iface, - LPOLESTR *pchKey, DWORD dw) -{ - CHECK_EXPECT(GetOverrideKeyPath); - ok(pchKey != NULL, "pchKey = NULL\n"); - if(pchKey) - ok(!*pchKey, "*pchKey=%p, expected NULL\n", *pchKey); - ok(!dw, "dw=%d, xepected 0\n", dw); - return S_OK; -} - -static const IDocHostUIHandler2Vtbl DocHostUIHandlerVtbl = { - DocHostUIHandler_QueryInterface, - DocHostUIHandler_AddRef, - DocHostUIHandler_Release, - DocHostUIHandler_ShowContextMenu, - DocHostUIHandler_GetHostInfo, - DocHostUIHandler_ShowUI, - DocHostUIHandler_HideUI, - DocHostUIHandler_UpdateUI, - DocHostUIHandler_EnableModeless, - DocHostUIHandler_OnDocWindowActivate, - DocHostUIHandler_OnFrameWindowActivate, - DocHostUIHandler_ResizeBorder, - DocHostUIHandler_TranslateAccelerator, - DocHostUIHandler_GetOptionKeyPath, - DocHostUIHandler_GetDropTarget, - DocHostUIHandler_GetExternal, - DocHostUIHandler_TranslateUrl, - DocHostUIHandler_FilterDataObject, - DocHostUIHandler_GetOverrideKeyPath -}; - -static IDocHostUIHandler2 DocHostUIHandler = { &DocHostUIHandlerVtbl }; - -static HRESULT WINAPI OleCommandTarget_QueryInterface(IOleCommandTarget *iface, - REFIID riid, void **ppv) -{ - return QueryInterface(riid, ppv); -} - -static ULONG WINAPI OleCommandTarget_AddRef(IOleCommandTarget *iface) -{ - return 2; -} - -static ULONG WINAPI OleCommandTarget_Release(IOleCommandTarget *iface) -{ - return 1; -} - -static HRESULT WINAPI OleCommandTarget_QueryStatus(IOleCommandTarget *iface, const GUID *pguidCmdGroup, - ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText) -{ - ok(!pguidCmdGroup, "pguidCmdGroup != MULL\n"); - ok(cCmds == 1, "cCmds=%d, expected 1\n", cCmds); - ok(!pCmdText, "pCmdText != NULL\n"); - - switch(prgCmds[0].cmdID) { - case OLECMDID_SETPROGRESSTEXT: - CHECK_EXPECT(QueryStatus_SETPROGRESSTEXT); - prgCmds[0].cmdf = OLECMDF_ENABLED; - return S_OK; - case OLECMDID_OPEN: - CHECK_EXPECT(QueryStatus_OPEN); - prgCmds[0].cmdf = 0; - return S_OK; - case OLECMDID_NEW: - CHECK_EXPECT(QueryStatus_NEW); - prgCmds[0].cmdf = 0; - return S_OK; - default: - ok(0, "unexpected command %d\n", prgCmds[0].cmdID); - }; - - return E_FAIL; -} - -static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID *pguidCmdGroup, - DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) -{ - if((!pguidCmdGroup || !IsEqualGUID(pguidCmdGroup, &CGID_Explorer)) - && (!pguidCmdGroup || !IsEqualGUID(&CGID_ShellDocView, pguidCmdGroup) || nCmdID != 63)) - test_readyState(NULL); - - if(!pguidCmdGroup) { - switch(nCmdID) { - case OLECMDID_SETPROGRESSMAX: - CHECK_EXPECT2(Exec_SETPROGRESSMAX); - ok(nCmdexecopt == OLECMDEXECOPT_DONTPROMPTUSER, "nCmdexecopts=%08x\n", nCmdexecopt); - ok(pvaIn != NULL, "pvaIn == NULL\n"); - if(pvaIn) { - ok(V_VT(pvaIn) == VT_I4, "V_VT(pvaIn)=%d, expected VT_I4\n", V_VT(pvaIn)); - if(load_state == LD_NO) - ok(V_I4(pvaIn) == 0, "V_I4(pvaIn)=%d, expected 0\n", V_I4(pvaIn)); - } - ok(pvaOut == NULL, "pvaOut=%p, expected NULL\n", pvaOut); - return S_OK; - case OLECMDID_SETPROGRESSPOS: - CHECK_EXPECT2(Exec_SETPROGRESSPOS); - ok(nCmdexecopt == OLECMDEXECOPT_DONTPROMPTUSER, "nCmdexecopts=%08x\n", nCmdexecopt); - ok(pvaIn != NULL, "pvaIn == NULL\n"); - if(pvaIn) { - ok(V_VT(pvaIn) == VT_I4, "V_VT(pvaIn)=%d, expected VT_I4\n", V_VT(pvaIn)); - if(load_state == LD_NO) - ok(V_I4(pvaIn) == 0, "V_I4(pvaIn)=%d, expected 0\n", V_I4(pvaIn)); - } - ok(pvaOut == NULL, "pvaOut=%p, expected NULL\n", pvaOut); - return S_OK; - case OLECMDID_HTTPEQUIV_DONE: - CHECK_EXPECT(Exec_HTTPEQUIV_DONE); - ok(nCmdexecopt == 0, "nCmdexecopts=%08x\n", nCmdexecopt); - ok(pvaOut == NULL, "pvaOut=%p\n", pvaOut); - ok(pvaIn == NULL, "pvaIn=%p\n", pvaIn); - readystate_set_loading = FALSE; - readystate_set_interactive = FALSE; - load_state = LD_COMPLETE; - return S_OK; - case OLECMDID_SETDOWNLOADSTATE: - ok(nCmdexecopt == OLECMDEXECOPT_DONTPROMPTUSER, "nCmdexecopts=%08x\n", nCmdexecopt); - ok(pvaOut == NULL, "pvaOut=%p\n", pvaOut); - ok(pvaIn != NULL, "pvaIn == NULL\n"); - ok(V_VT(pvaIn) == VT_I4, "V_VT(pvaIn)=%d\n", V_VT(pvaIn)); - - switch(V_I4(pvaIn)) { - case 0: - CHECK_EXPECT(Exec_SETDOWNLOADSTATE_0); - load_state = LD_INTERACTIVE; - break; - case 1: - CHECK_EXPECT(Exec_SETDOWNLOADSTATE_1); - readystate_set_interactive = (load_state != LD_INTERACTIVE); - break; - default: - ok(0, "unexpevted V_I4(pvaIn)=%d\n", V_I4(pvaIn)); - } - - return S_OK; - case OLECMDID_UPDATECOMMANDS: - CHECK_EXPECT(Exec_UPDATECOMMANDS); - ok(nCmdexecopt == OLECMDEXECOPT_DONTPROMPTUSER, "nCmdexecopts=%08x\n", nCmdexecopt); - ok(pvaIn == NULL, "pvaIn=%p\n", pvaIn); - ok(pvaOut == NULL, "pvaOut=%p\n", pvaOut); - return S_OK; - case OLECMDID_SETTITLE: - CHECK_EXPECT2(Exec_SETTITLE); - ok(nCmdexecopt == OLECMDEXECOPT_DONTPROMPTUSER, "nCmdexecopts=%08x\n", nCmdexecopt); - ok(pvaIn != NULL, "pvaIn == NULL\n"); - ok(pvaOut == NULL, "pvaOut=%p\n", pvaOut); - ok(V_VT(pvaIn) == VT_BSTR, "V_VT(pvaIn)=%d\n", V_VT(pvaIn)); - ok(V_BSTR(pvaIn) != NULL, "V_BSTR(pvaIn) == NULL\n"); /* TODO */ - return S_OK; - case OLECMDID_HTTPEQUIV: - CHECK_EXPECT2(Exec_HTTPEQUIV); - ok(!nCmdexecopt, "nCmdexecopts=%08x\n", nCmdexecopt); - ok(pvaIn != NULL, "pvaIn == NULL\n"); - ok(pvaOut == NULL, "pvaOut=%p\n", pvaOut); - ok(V_VT(pvaIn) == VT_BSTR, "V_VT(pvaIn)=%d\n", V_VT(pvaIn)); - ok(V_BSTR(pvaIn) != NULL, "V_BSTR(pvaIn) = NULL\n"); - test_readyState(NULL); - return S_OK; - case OLECMDID_UPDATETRAVELENTRY_DATARECOVERY: - return E_FAIL; /* FIXME */ - default: - ok(0, "unexpected command %d\n", nCmdID); - return E_FAIL; - }; - } - - if(IsEqualGUID(&CGID_ShellDocView, pguidCmdGroup)) { - ok(nCmdexecopt == 0, "nCmdexecopts=%08x\n", nCmdexecopt); - - switch(nCmdID) { - case 37: - CHECK_EXPECT2(Exec_ShellDocView_37); - - if(load_from_stream || navigated_load) - test_GetCurMoniker(doc_unk, NULL, about_blank_url); - else if(!editmode) - test_GetCurMoniker(doc_unk, doc_mon, NULL); - - ok(pvaOut == NULL, "pvaOut=%p, expected NULL\n", pvaOut); - ok(pvaIn != NULL, "pvaIn == NULL\n"); - if(pvaIn) { - ok(V_VT(pvaIn) == VT_I4, "V_VT(pvaIn)=%d, expected VT_I4\n", V_VT(pvaIn)); - ok(V_I4(pvaIn) == 0, "V_I4(pvaIn)=%d, expected 0\n", V_I4(pvaIn)); - } - return S_OK; - - case 63: { - IHTMLPrivateWindow *priv_window; - HRESULT hres; - - CHECK_EXPECT(Exec_ShellDocView_63); - ok(pvaIn != NULL, "pvaIn == NULL\n"); - ok(V_VT(pvaIn) == VT_UNKNOWN, "V_VT(pvaIn) = %d\n", V_VT(pvaIn)); - ok(V_UNKNOWN(pvaIn) != NULL, "VPUNKNOWN(pvaIn) = NULL\n"); - ok(pvaOut != NULL, "pvaOut == NULL\n"); - ok(V_VT(pvaOut) == VT_EMPTY, "V_VT(pvaOut) = %d\n", V_VT(pvaOut)); - - hres = IUnknown_QueryInterface(V_UNKNOWN(pvaIn), &IID_IHTMLPrivateWindow, (void**)&priv_window); - ok(hres == S_OK, "Could not get IHTMLPrivateWindow: %08x\n", hres); - if(SUCCEEDED(hres)) - IHTMLPrivateWindow_Release(priv_window); - - load_state = LD_LOADING; - return S_OK; /* TODO */ - } - - case 67: - CHECK_EXPECT(Exec_ShellDocView_67); - ok(pvaIn != NULL, "pvaIn == NULL\n"); - ok(V_VT(pvaIn) == VT_BSTR, "V_VT(pvaIn) = %d\n", V_VT(pvaIn)); - ok(!strcmp_wa(V_BSTR(pvaIn), "about:blank"), "V_BSTR(pvaIn) = %s\n", wine_dbgstr_w(V_BSTR(pvaIn))); - ok(pvaOut != NULL, "pvaOut == NULL\n"); - ok(V_VT(pvaOut) == VT_BOOL, "V_VT(pvaOut) = %d\n", V_VT(pvaOut)); - ok(V_BOOL(pvaOut) == VARIANT_TRUE, "V_BOOL(pvaOut) = %x\n", V_BOOL(pvaOut)); - load_state = LD_DOLOAD; - return S_OK; - - case 84: - CHECK_EXPECT2(Exec_ShellDocView_84); - - ok(pvaIn == NULL, "pvaIn != NULL\n"); - ok(pvaOut != NULL, "pvaOut == NULL\n"); - if(pvaIn) - ok(V_VT(pvaOut) == VT_EMPTY, "V_VT(pvaOut)=%d\n", V_VT(pvaOut)); - - return E_NOTIMPL; - - case 103: - CHECK_EXPECT2(Exec_ShellDocView_103); - - ok(pvaIn == NULL, "pvaIn != NULL\n"); - ok(pvaOut == NULL, "pvaOut != NULL\n"); - - return E_NOTIMPL; - - case 105: - CHECK_EXPECT2(Exec_ShellDocView_105); - - ok(pvaIn != NULL, "pvaIn == NULL\n"); - ok(pvaOut == NULL, "pvaOut != NULL\n"); - - return E_NOTIMPL; - - case 140: - CHECK_EXPECT2(Exec_ShellDocView_140); - - ok(pvaIn == NULL, "pvaIn != NULL\n"); - ok(pvaOut == NULL, "pvaOut != NULL\n"); - - return E_NOTIMPL; - - default: - ok(0, "unexpected command %d\n", nCmdID); - return E_FAIL; - }; - } - - if(IsEqualGUID(&CGID_MSHTML, pguidCmdGroup)) { - ok(nCmdexecopt == 0, "nCmdexecopts=%08x\n", nCmdexecopt); - - switch(nCmdID) { - case IDM_PARSECOMPLETE: - CHECK_EXPECT(Exec_MSHTML_PARSECOMPLETE); - ok(pvaIn == NULL, "pvaIn != NULL\n"); - ok(pvaOut == NULL, "pvaOut != NULL\n"); - return S_OK; - default: - ok(0, "unexpected command %d\n", nCmdID); - }; - } - - if(IsEqualGUID(&CGID_DocHostCmdPriv, pguidCmdGroup)) { - switch(nCmdID) { - case DOCHOST_DOCCANNAVIGATE: - CHECK_EXPECT(Exec_DOCCANNAVIGATE); - ok(pvaIn != NULL, "pvaIn == NULL\n"); - ok(pvaOut == NULL, "pvaOut != NULL\n"); - ok(V_VT(pvaIn) == VT_UNKNOWN, "V_VT(pvaIn) != VT_UNKNOWN\n"); - /* FIXME: test V_UNKNOWN(pvaIn) == window */ - return S_OK; - default: - return E_FAIL; /* TODO */ - } - } - - if(IsEqualGUID(&CGID_Explorer, pguidCmdGroup)) { - ok(nCmdexecopt == 0, "nCmdexecopts=%08x\n", nCmdexecopt); - - switch(nCmdID) { - case 69: - CHECK_EXPECT2(Exec_Explorer_69); - ok(pvaIn == NULL, "pvaIn != NULL\n"); - ok(pvaOut != NULL, "pvaOut == NULL\n"); - return E_NOTIMPL; - default: - ok(0, "unexpected cmd %d of CGID_Explorer\n", nCmdID); - } - return E_NOTIMPL; - } - - if(IsEqualGUID(&CGID_DocHostCommandHandler, pguidCmdGroup)) { - switch (nCmdID) { - case OLECMDID_PAGEACTIONBLOCKED: /* win2k3 */ - SET_EXPECT(SetStatusText); - ok(pvaIn == NULL, "pvaIn != NULL\n"); - ok(pvaOut == NULL, "pvaOut != NULL\n"); - return S_OK; - case OLECMDID_SHOWSCRIPTERROR: - /* TODO */ - return S_OK; - default: - ok(0, "unexpected command %d\n", nCmdID); - return E_FAIL; - } - } - - ok(0, "unexpected pguidCmdGroup: %s\n", debugstr_guid(pguidCmdGroup)); - return E_NOTIMPL; -} - -static IOleCommandTargetVtbl OleCommandTargetVtbl = { - OleCommandTarget_QueryInterface, - OleCommandTarget_AddRef, - OleCommandTarget_Release, - OleCommandTarget_QueryStatus, - OleCommandTarget_Exec -}; - -static IOleCommandTarget OleCommandTarget = { &OleCommandTargetVtbl }; - -static HRESULT WINAPI Dispatch_QueryInterface(IDispatch *iface, REFIID riid, void **ppv) -{ - return QueryInterface(riid, ppv); -} - -static HRESULT WINAPI Dispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REFIID riid, - LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, - EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - ok(IsEqualGUID(&IID_NULL, riid), "riid != IID_NULL\n"); - ok(pDispParams != NULL, "pDispParams == NULL\n"); - ok(pExcepInfo == NULL, "pExcepInfo=%p, expected NULL\n", pExcepInfo); - ok(puArgErr != NULL, "puArgErr == NULL\n"); - ok(V_VT(pVarResult) == 0, "V_VT(pVarResult)=%d, expected 0\n", V_VT(pVarResult)); - ok(wFlags == DISPATCH_PROPERTYGET, "wFlags=%08x, expected DISPATCH_PROPERTYGET\n", wFlags); - test_readyState(NULL); - - switch(dispIdMember) { - case DISPID_AMBIENT_USERMODE: - CHECK_EXPECT2(Invoke_AMBIENT_USERMODE); - V_VT(pVarResult) = VT_BOOL; - V_BOOL(pVarResult) = VARIANT_TRUE; - return S_OK; - case DISPID_AMBIENT_DLCONTROL: - CHECK_EXPECT2(Invoke_AMBIENT_DLCONTROL); - return E_FAIL; - case DISPID_AMBIENT_OFFLINEIFNOTCONNECTED: - CHECK_EXPECT2(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); - return E_FAIL; - case DISPID_AMBIENT_SILENT: - CHECK_EXPECT2(Invoke_AMBIENT_SILENT); - V_VT(pVarResult) = VT_BOOL; - V_BOOL(pVarResult) = VARIANT_FALSE; - return S_OK; - case DISPID_AMBIENT_USERAGENT: - CHECK_EXPECT(Invoke_AMBIENT_USERAGENT); - return E_FAIL; - case DISPID_AMBIENT_PALETTE: - CHECK_EXPECT(Invoke_AMBIENT_PALETTE); - return E_FAIL; - }; - - ok(0, "unexpected dispid %d\n", dispIdMember); - return E_FAIL; -} - -static IDispatchVtbl DispatchVtbl = { - Dispatch_QueryInterface, - Dispatch_AddRef, - Dispatch_Release, - Dispatch_GetTypeInfoCount, - Dispatch_GetTypeInfo, - Dispatch_GetIDsOfNames, - Dispatch_Invoke -}; - -static IDispatch Dispatch = { &DispatchVtbl }; - -static HRESULT WINAPI ServiceProvider_QueryInterface(IServiceProvider *iface, - REFIID riid, void **ppv) -{ - return QueryInterface(riid, ppv); -} - -static ULONG WINAPI ServiceProvider_AddRef(IServiceProvider *iface) -{ - return 2; -} - -static ULONG WINAPI ServiceProvider_Release(IServiceProvider *iface) -{ - return 1; -} - -static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, - REFIID riid, void **ppv) -{ - /* - * Services used by HTMLDocument: - * - * IOleUndoManager - * IInternetSecurityManager - * ITargetFrame - * {D5F78C80-5252-11CF-90FA-00AA0042106E} - * HTMLFrameBase - * IShellObject - * {3050F312-98B5-11CF-BB82-00AA00BDCE0B} - * {53A2D5B1-D2FC-11D0-84E0-006097C9987D} - * {AD7F6C62-F6BD-11D2-959B-006097C553C8} - * DefView (?) - * {6D12FE80-7911-11CF-9534-0000C05BAE0B} - * IElementBehaviorFactory - * {3050F429-98B5-11CF-BB82-00AA00BDCE0B} - * STopLevelBrowser - * IHTMLWindow2 - * IInternetProtocol - * IWebBrowserApp - * UrlHostory - * IHTMLEditHost - * IHlinkFrame - */ - - if(IsEqualGUID(&IID_IHlinkFrame, guidService)) { - ok(IsEqualGUID(&IID_IHlinkFrame, riid), "unexpected riid\n"); - *ppv = &HlinkFrame; - return S_OK; - } - - if(IsEqualGUID(&SID_SNewWindowManager, guidService)) { - ok(IsEqualGUID(&IID_INewWindowManager, riid), "unexpected riid\n"); - *ppv = &NewWindowManager; - return S_OK; - } - - return E_NOINTERFACE; -} - -static const IServiceProviderVtbl ServiceProviderVtbl = { - ServiceProvider_QueryInterface, - ServiceProvider_AddRef, - ServiceProvider_Release, - ServiceProvider_QueryService -}; - -static IServiceProvider ServiceProvider = { &ServiceProviderVtbl }; - -static HRESULT WINAPI AdviseSink_QueryInterface(IAdviseSinkEx *iface, - REFIID riid, void **ppv) -{ - return QueryInterface(riid, ppv); -} - -static ULONG WINAPI AdviseSink_AddRef(IAdviseSinkEx *iface) -{ - return 2; -} - -static ULONG WINAPI AdviseSink_Release(IAdviseSinkEx *iface) -{ - return 1; -} - -static void WINAPI AdviseSink_OnDataChange(IAdviseSinkEx *iface, - FORMATETC *pFormatetc, STGMEDIUM *pStgmed) -{ - ok(0, "unexpected call\n"); -} - -static void WINAPI AdviseSink_OnViewChange(IAdviseSinkEx *iface, - DWORD dwAspect, LONG lindex) -{ - ok(0, "unexpected call\n"); -} - -static void WINAPI AdviseSink_OnRename(IAdviseSinkEx *iface, IMoniker *pmk) -{ - ok(0, "unexpected call\n"); -} - -static void WINAPI AdviseSink_OnSave(IAdviseSinkEx *iface) -{ - ok(0, "unexpected call\n"); -} - -static void WINAPI AdviseSink_OnClose(IAdviseSinkEx *iface) -{ - ok(0, "unexpected call\n"); -} - -static void WINAPI AdviseSinkEx_OnViewStatusChange(IAdviseSinkEx *iface, DWORD dwViewStatus) -{ - ok(0, "unexpected call\n"); -} - -static void WINAPI ObjectAdviseSink_OnClose(IAdviseSinkEx *iface) -{ - CHECK_EXPECT(Advise_Close); -} - -static const IAdviseSinkExVtbl AdviseSinkVtbl = { - AdviseSink_QueryInterface, - AdviseSink_AddRef, - AdviseSink_Release, - AdviseSink_OnDataChange, - AdviseSink_OnViewChange, - AdviseSink_OnRename, - AdviseSink_OnSave, - ObjectAdviseSink_OnClose, - AdviseSinkEx_OnViewStatusChange -}; - -static IAdviseSinkEx AdviseSink = { &AdviseSinkVtbl }; - -static HRESULT WINAPI ViewAdviseSink_QueryInterface(IAdviseSinkEx *iface, - REFIID riid, void **ppv) -{ - if(IsEqualGUID(&IID_IAdviseSinkEx, riid)) { - *ppv = iface; - return S_OK; - } - - ok(0, "unexpected riid %s\n", debugstr_guid(riid)); - *ppv = NULL; - return E_NOINTERFACE; -} - -static void WINAPI ViewAdviseSink_OnViewChange(IAdviseSinkEx *iface, - DWORD dwAspect, LONG lindex) -{ - CHECK_EXPECT2(OnViewChange); - - ok(dwAspect == DVASPECT_CONTENT, "dwAspect = %d\n", dwAspect); - ok(lindex == -1, "lindex = %d\n", lindex); -} - -static const IAdviseSinkExVtbl ViewAdviseSinkVtbl = { - ViewAdviseSink_QueryInterface, - AdviseSink_AddRef, - AdviseSink_Release, - AdviseSink_OnDataChange, - ViewAdviseSink_OnViewChange, - AdviseSink_OnRename, - AdviseSink_OnSave, - AdviseSink_OnClose, - AdviseSinkEx_OnViewStatusChange -}; - -static IAdviseSinkEx ViewAdviseSink = { &ViewAdviseSinkVtbl }; - -DEFINE_GUID(IID_unk1, 0xD48A6EC6,0x6A4A,0x11CF,0x94,0xA7,0x44,0x45,0x53,0x54,0x00,0x00); /* HTMLWindow2 ? */ -DEFINE_GUID(IID_IThumbnailView, 0x7BB0B520,0xB1A7,0x11D2,0xBB,0x23,0x00,0xC0,0x4F,0x79,0xAB,0xCD); -DEFINE_GUID(IID_IRenMailEditor, 0x000670BA,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); -DEFINE_GUID(IID_unk4, 0x305104a6,0x98b5,0x11cf,0xbb,0x82,0x00,0xaa,0x00,0xbd,0xce,0x0b); -DEFINE_GUID(IID_IDocHostUIHandlerPriv, 0xf0d241d1,0x5d0e,0x4e85,0xbc,0xb4,0xfa,0xd7,0xf7,0xc5,0x52,0x8c); - -static HRESULT QueryInterface(REFIID riid, void **ppv) -{ - *ppv = NULL; - - if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IOleClientSite, riid)) - *ppv = &ClientSite; - else if(IsEqualGUID(&IID_IOleDocumentSite, riid)) - *ppv = &DocumentSite; - else if(IsEqualGUID(&IID_IDocHostUIHandler, riid) || IsEqualGUID(&IID_IDocHostUIHandler2, riid)) - *ppv = &DocHostUIHandler; - else if(IsEqualGUID(&IID_IOleContainer, riid)) - *ppv = &OleContainer; - else if(IsEqualGUID(&IID_IOleWindow, riid) || IsEqualGUID(&IID_IOleInPlaceSite, riid)) - *ppv = &InPlaceSiteWindowless; - else if(IsEqualGUID(&IID_IOleCommandTarget , riid)) - *ppv = &OleCommandTarget; - else if(IsEqualGUID(&IID_IDispatch, riid)) - *ppv = &Dispatch; - else if(IsEqualGUID(&IID_IServiceProvider, riid)) - *ppv = &ServiceProvider; - else if(IsEqualGUID(&IID_IOleInPlaceSiteEx, riid)) - *ppv = ipsex ? &InPlaceSiteWindowless : NULL; - else if(IsEqualGUID(&IID_IOleInPlaceSiteWindowless, riid)) - *ppv = ipsw ? &InPlaceSiteWindowless : NULL; - else if(IsEqualGUID(&IID_IOleControlSite, riid)) - *ppv = &OleControlSite; - else if(IsEqualGUID(&IID_IDocHostShowUI, riid)) - return E_NOINTERFACE; /* TODO */ - else if(IsEqualGUID(&IID_IProxyManager, riid)) - return E_NOINTERFACE; /* ? */ - else if(IsEqualGUID(&IID_unk1, riid)) - return E_NOINTERFACE; /* HTMLWindow2 ? */ - else if(IsEqualGUID(&IID_IThumbnailView, riid)) - return E_NOINTERFACE; /* ? */ - else if(IsEqualGUID(&IID_IRenMailEditor, riid)) - return E_NOINTERFACE; /* ? */ - else if(IsEqualGUID(&IID_unk4, riid)) - return E_NOINTERFACE; /* ? */ - else if(IsEqualGUID(&IID_IDocHostUIHandlerPriv, riid)) - return E_NOINTERFACE; /* ? */ - else - ok(0, "unexpected riid %s\n", debugstr_guid(riid)); - - if(*ppv) - return S_OK; - return E_NOINTERFACE; -} - -static LRESULT WINAPI wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - return DefWindowProc(hwnd, msg, wParam, lParam); -} - -static void test_doscroll(IUnknown *unk) -{ - IHTMLDocument3 *doc; - IHTMLElement2 *elem2; - IHTMLElement *elem; - VARIANT v; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IHTMLDocument3, (void**)&doc); - ok(hres == S_OK, "Could not get IHTMLDocument3 iface: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IHTMLDocument3_get_documentElement(doc, &elem); - IHTMLDocument3_Release(doc); - ok(hres == S_OK, "get_documentElement failed: %08x\n", hres); - switch(load_state) { - case LD_DOLOAD: - case LD_NO: - if(!navigated_load) - ok(!elem, "elem != NULL\n"); - default: - break; - case LD_INTERACTIVE: - case LD_COMPLETE: - ok(elem != NULL, "elem == NULL\n"); - } - if(!elem) - return; - - hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLElement2, (void**)&elem2); - IHTMLElement_Release(elem); - ok(hres == S_OK, "Could not get IHTMLElement2 iface: %08x\n", hres); - - V_VT(&v) = VT_BSTR; - V_BSTR(&v) = a2bstr("left"); - hres = IHTMLElement2_doScroll(elem2, v); - SysFreeString(V_BSTR(&v)); - IHTMLElement2_Release(elem2); - - if(inplace_deactivated) - ok(hres == E_PENDING, "doScroll failed: %08x\n", hres); - else if(load_state == LD_COMPLETE) - ok(hres == S_OK, "doScroll failed: %08x\n", hres); - else - ok(hres == E_PENDING || hres == S_OK, "doScroll failed: %08x\n", hres); -} - -static void _test_readyState(unsigned line, IUnknown *unk) -{ - IHTMLDocument2 *htmldoc; - DISPPARAMS dispparams; - IHTMLElement *elem; - BSTR state; - VARIANT out; - HRESULT hres; - - static const LPCSTR expected_state[] = { - "uninitialized", - "loading", - NULL, - "interactive", - "complete", - "uninitialized" - }; - - if(open_call) - return; /* FIXME */ - - if(!unk) - unk = doc_unk; - - hres = IUnknown_QueryInterface(unk, &IID_IHTMLDocument2, (void**)&htmldoc); - ok(hres == S_OK, "QueryInterface(IID_IHTMLDocument2) failed: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IHTMLDocument2_get_readyState(htmldoc, NULL); - ok(hres == E_POINTER, "get_readyState failed: %08x, expected\n", hres); - - hres = IHTMLDocument2_get_readyState(htmldoc, &state); - ok(hres == S_OK, "get_ReadyState failed: %08x\n", hres); - - if(!strcmp_wa(state, "interactive") && load_state == LD_LOADING) - load_state = LD_INTERACTIVE; - - ok_(__FILE__, line) - (!strcmp_wa(state, expected_state[load_state]), "unexpected state %s, expected %d\n", - wine_dbgstr_w(state), load_state); - SysFreeString(state); - - hres = IHTMLDocument2_get_body(htmldoc, &elem); - ok_(__FILE__,line)(hres == S_OK, "get_body failed: %08x\n", hres); - if(elem) { - IHTMLElement2 *elem2; - VARIANT var; - - hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLElement2, (void**)&elem2); - IHTMLElement_Release(elem); - ok(hres == S_OK, "Could not get IHTMLElement2 iface: %08x\n", hres); - - hres = IHTMLElement2_get_readyState(elem2, &var); - IHTMLElement2_Release(elem2); - ok(hres == S_OK, "get_readyState failed: %08x\n", hres); - ok(V_VT(&var) == VT_BSTR, "V_VT(state) = %d\n", V_VT(&var)); - ok(!strcmp_wa(V_BSTR(&var), "complete"), "unexpected body state %s\n", wine_dbgstr_w(V_BSTR(&var))); - VariantClear(&var); - }else { - ok_(__FILE__,line)(load_state != LD_COMPLETE, "body is NULL in complete state\n"); - } - - dispparams.cArgs = 0; - dispparams.cNamedArgs = 0; - dispparams.rgdispidNamedArgs = NULL; - dispparams.rgvarg = NULL; - - VariantInit(&out); - - hres = IHTMLDocument2_Invoke(htmldoc, DISPID_READYSTATE, &IID_NULL, 0, DISPATCH_PROPERTYGET, - &dispparams, &out, NULL, NULL); - ok(hres == S_OK, "Invoke(DISPID_READYSTATE) failed: %08x\n", hres); - - ok_(__FILE__,line) (V_VT(&out) == VT_I4, "V_VT(out)=%d\n", V_VT(&out)); - ok_(__FILE__,line) (V_I4(&out) == load_state%5, "VT_I4(out)=%d, expected %d\n", V_I4(&out), load_state%5); - - test_doscroll((IUnknown*)htmldoc); - - IHTMLDocument2_Release(htmldoc); -} - -static void test_ViewAdviseSink(IHTMLDocument2 *doc) -{ - IViewObject *view; - HRESULT hres; - - hres = IHTMLDocument2_QueryInterface(doc, &IID_IViewObject, (void**)&view); - ok(hres == S_OK, "QueryInterface(IID_IViewObject) failed: %08x\n", hres); - - hres = IViewObject_SetAdvise(view, DVASPECT_CONTENT, ADVF_PRIMEFIRST, (IAdviseSink*)&ViewAdviseSink); - ok(hres == S_OK, "SetAdvise failed: %08x\n", hres); - - IViewObject_Release(view); -} - -static void test_ConnectionPoint(IConnectionPointContainer *container, REFIID riid) -{ - IConnectionPointContainer *tmp_container = NULL; - IConnectionPoint *cp; - IID iid; - HRESULT hres; - - hres = IConnectionPointContainer_FindConnectionPoint(container, riid, &cp); - ok(hres == S_OK, "FindConnectionPoint failed: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IConnectionPoint_GetConnectionInterface(cp, &iid); - ok(hres == S_OK, "GetConnectionInterface failed: %08x\n", hres); - ok(IsEqualGUID(riid, &iid), "wrong iid\n"); - - hres = IConnectionPoint_GetConnectionInterface(cp, NULL); - ok(hres == E_POINTER, "GetConnectionInterface failed: %08x, expected E_POINTER\n", hres); - - hres = IConnectionPoint_GetConnectionPointContainer(cp, &tmp_container); - ok(hres == S_OK, "GetConnectionPointContainer failed: %08x\n", hres); - ok(tmp_container == container, "container != tmp_container\n"); - if(SUCCEEDED(hres)) - IConnectionPointContainer_Release(tmp_container); - - hres = IConnectionPoint_GetConnectionPointContainer(cp, NULL); - ok(hres == E_POINTER, "GetConnectionPointContainer failed: %08x, expected E_POINTER\n", hres); - - if(IsEqualGUID(&IID_IPropertyNotifySink, riid)) { - DWORD cookie; - - hres = IConnectionPoint_Advise(cp, (IUnknown*)&PropertyNotifySink, &cookie); - ok(hres == S_OK, "Advise failed: %08x\n", hres); - } - - IConnectionPoint_Release(cp); -} - -static void test_ConnectionPointContainer(IHTMLDocument2 *doc) -{ - IConnectionPointContainer *container; - HRESULT hres; - - hres = IUnknown_QueryInterface(doc, &IID_IConnectionPointContainer, (void**)&container); - ok(hres == S_OK, "QueryInterface(IID_IConnectionPointContainer) failed: %08x\n", hres); - if(FAILED(hres)) - return; - - test_ConnectionPoint(container, &IID_IDispatch); - test_ConnectionPoint(container, &IID_IPropertyNotifySink); - test_ConnectionPoint(container, &DIID_HTMLDocumentEvents); - test_ConnectionPoint(container, &DIID_HTMLDocumentEvents2); - - IConnectionPointContainer_Release(container); -} - -static void test_Load(IPersistMoniker *persist, IMoniker *mon) -{ - IBindCtx *bind; - HRESULT hres; - WCHAR sz_html_clientsite_objectparam[MAX_PATH]; - - lstrcpyW(sz_html_clientsite_objectparam, SZ_HTML_CLIENTSITE_OBJECTPARAM); - - test_readyState((IUnknown*)persist); - - doc_mon = mon; - - CreateBindCtx(0, &bind); - IBindCtx_RegisterObjectParam(bind, sz_html_clientsite_objectparam, - (IUnknown*)&ClientSite); - - if(mon == &Moniker) - SET_EXPECT(GetDisplayName); - if(!set_clientsite) { - SET_EXPECT(Invoke_AMBIENT_USERMODE); - SET_EXPECT(GetHostInfo); - SET_EXPECT(Invoke_AMBIENT_DLCONTROL); - SET_EXPECT(Invoke_AMBIENT_SILENT); - SET_EXPECT(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); - SET_EXPECT(Invoke_AMBIENT_USERAGENT); - SET_EXPECT(Invoke_AMBIENT_PALETTE); - SET_EXPECT(GetOptionKeyPath); - SET_EXPECT(GetOverrideKeyPath); - SET_EXPECT(GetWindow); - SET_EXPECT(Exec_DOCCANNAVIGATE); - SET_EXPECT(QueryStatus_SETPROGRESSTEXT); - SET_EXPECT(Exec_SETPROGRESSMAX); - SET_EXPECT(Exec_SETPROGRESSPOS); - SET_EXPECT(Exec_ShellDocView_37); - } - if(!container_locked) { - SET_EXPECT(GetContainer); - SET_EXPECT(LockContainer); - } - SET_EXPECT(OnChanged_READYSTATE); - SET_EXPECT(Exec_ShellDocView_84); - SET_EXPECT(IsSystemMoniker); - if(mon == &Moniker) - SET_EXPECT(BindToStorage); - SET_EXPECT(SetActiveObject); - if(set_clientsite) { - SET_EXPECT(Invoke_AMBIENT_SILENT); - SET_EXPECT(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); - SET_EXPECT(Exec_ShellDocView_37); - } - load_state = LD_DOLOAD; - expect_LockContainer_fLock = TRUE; - readystate_set_loading = TRUE; - - hres = IPersistMoniker_Load(persist, FALSE, mon, bind, 0x12); - ok(hres == S_OK, "Load failed: %08x\n", hres); - - if(mon == &Moniker) - CHECK_CALLED(GetDisplayName); - if(!set_clientsite) { - CHECK_CALLED(Invoke_AMBIENT_USERMODE); - CHECK_CALLED(GetHostInfo); - CHECK_CALLED(Invoke_AMBIENT_DLCONTROL); - CHECK_CALLED(Invoke_AMBIENT_SILENT); - CHECK_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); - CHECK_CALLED(Invoke_AMBIENT_USERAGENT); - CHECK_CALLED(Invoke_AMBIENT_PALETTE); - CHECK_CALLED(GetOptionKeyPath); - CHECK_CALLED(GetOverrideKeyPath); - CHECK_CALLED(GetWindow); - CHECK_CALLED(Exec_DOCCANNAVIGATE); - CHECK_CALLED(QueryStatus_SETPROGRESSTEXT); - CHECK_CALLED(Exec_SETPROGRESSMAX); - CHECK_CALLED(Exec_SETPROGRESSPOS); - CHECK_CALLED(Exec_ShellDocView_37); - } - if(!container_locked) { - CHECK_CALLED(GetContainer); - CHECK_CALLED(LockContainer); - container_locked = TRUE; - } - CHECK_CALLED(OnChanged_READYSTATE); - SET_CALLED(IsSystemMoniker); /* IE7 */ - SET_CALLED(Exec_ShellDocView_84); - if(mon == &Moniker) - CHECK_CALLED(BindToStorage); - SET_CALLED(SetActiveObject); /* FIXME */ - if(set_clientsite) { - CHECK_CALLED(Invoke_AMBIENT_SILENT); - CHECK_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); - CHECK_CALLED(Exec_ShellDocView_37); - } - - set_clientsite = container_locked = TRUE; - - test_GetCurMoniker((IUnknown*)persist, mon, NULL); - - IBindCtx_Release(bind); - - test_readyState((IUnknown*)persist); -} - -#define DWL_VERBDONE 0x0001 -#define DWL_CSS 0x0002 -#define DWL_TRYCSS 0x0004 -#define DWL_HTTP 0x0008 -#define DWL_EMPTY 0x0010 - -static void test_download(DWORD flags) -{ - HWND hwnd; - MSG msg; - - hwnd = FindWindowA("Internet Explorer_Hidden", NULL); - ok(hwnd != NULL, "Could not find hidden window\n"); - - test_readyState(NULL); - - if(flags & (DWL_VERBDONE|DWL_HTTP)) - SET_EXPECT(Exec_SETPROGRESSMAX); - if((flags & DWL_VERBDONE) && !load_from_stream) - SET_EXPECT(GetHostInfo); - SET_EXPECT(SetStatusText); - if(!(flags & DWL_EMPTY)) - SET_EXPECT(Exec_SETDOWNLOADSTATE_1); - SET_EXPECT(OnViewChange); - SET_EXPECT(GetDropTarget); - if(flags & DWL_TRYCSS) - SET_EXPECT(Exec_ShellDocView_84); - if(flags & DWL_CSS) { - SET_EXPECT(CreateInstance); - SET_EXPECT(Start); - SET_EXPECT(LockRequest); - SET_EXPECT(Terminate); - SET_EXPECT(Protocol_Read); - SET_EXPECT(UnlockRequest); - } - SET_EXPECT(Exec_Explorer_69); - SET_EXPECT(EnableModeless_TRUE); /* IE7 */ - SET_EXPECT(Frame_EnableModeless_TRUE); /* IE7 */ - SET_EXPECT(EnableModeless_FALSE); /* IE7 */ - SET_EXPECT(Frame_EnableModeless_FALSE); /* IE7 */ - if(navigated_load) - SET_EXPECT(Exec_ShellDocView_37); - if(flags & DWL_HTTP) { - SET_EXPECT(OnChanged_1012); - SET_EXPECT(Exec_HTTPEQUIV); - SET_EXPECT(Exec_SETTITLE); - } - SET_EXPECT(OnChanged_1005); - SET_EXPECT(OnChanged_READYSTATE); - SET_EXPECT(Exec_SETPROGRESSPOS); - if(!(flags & DWL_EMPTY)) - SET_EXPECT(Exec_SETDOWNLOADSTATE_0); - SET_EXPECT(Exec_ShellDocView_103); - SET_EXPECT(Exec_ShellDocView_105); - SET_EXPECT(Exec_ShellDocView_140); - SET_EXPECT(Exec_MSHTML_PARSECOMPLETE); - SET_EXPECT(Exec_HTTPEQUIV_DONE); - SET_EXPECT(SetStatusText); - if(navigated_load) { - SET_EXPECT(UpdateUI); - SET_EXPECT(Exec_UPDATECOMMANDS); - SET_EXPECT(Exec_SETTITLE); - } - expect_status_text = (LPWSTR)0xdeadbeef; /* TODO */ - - while(!called_Exec_HTTPEQUIV_DONE && GetMessage(&msg, NULL, 0, 0)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - if(flags & DWL_VERBDONE) - CHECK_CALLED(Exec_SETPROGRESSMAX); - if(flags & DWL_HTTP) - SET_CALLED(Exec_SETPROGRESSMAX); - if((flags & DWL_VERBDONE) && !load_from_stream) { - if(navigated_load) - todo_wine CHECK_CALLED(GetHostInfo); - else - CHECK_CALLED(GetHostInfo); - } - CHECK_CALLED(SetStatusText); - if(!(flags & DWL_EMPTY)) - CHECK_CALLED(Exec_SETDOWNLOADSTATE_1); - CHECK_CALLED(OnViewChange); - if(navigated_load) - CHECK_CALLED(GetDropTarget); - else - SET_CALLED(GetDropTarget); - if(flags & DWL_TRYCSS) - SET_CALLED(Exec_ShellDocView_84); - if(flags & DWL_CSS) { - CHECK_CALLED(CreateInstance); - CHECK_CALLED(Start); - CHECK_CALLED(LockRequest); - CHECK_CALLED(Terminate); - CHECK_CALLED(Protocol_Read); - CHECK_CALLED(UnlockRequest); - } - SET_CALLED(Exec_Explorer_69); - SET_CALLED(EnableModeless_TRUE); /* IE7 */ - SET_CALLED(Frame_EnableModeless_TRUE); /* IE7 */ - SET_CALLED(EnableModeless_FALSE); /* IE7 */ - SET_CALLED(Frame_EnableModeless_FALSE); /* IE7 */ - if(navigated_load) - todo_wine CHECK_CALLED(Exec_ShellDocView_37); - if(flags & DWL_HTTP) todo_wine { - CHECK_CALLED(OnChanged_1012); - CHECK_CALLED(Exec_HTTPEQUIV); - CHECK_CALLED(Exec_SETTITLE); - } - CHECK_CALLED(OnChanged_1005); - CHECK_CALLED(OnChanged_READYSTATE); - CHECK_CALLED(Exec_SETPROGRESSPOS); - if(!(flags & DWL_EMPTY)) - CHECK_CALLED(Exec_SETDOWNLOADSTATE_0); - SET_CALLED(Exec_ShellDocView_103); - SET_CALLED(Exec_ShellDocView_105); - SET_CALLED(Exec_ShellDocView_140); - CHECK_CALLED(Exec_MSHTML_PARSECOMPLETE); - CHECK_CALLED(Exec_HTTPEQUIV_DONE); - SET_CALLED(SetStatusText); - if(navigated_load) { /* avoiding race, FIXME: fund better way */ - SET_CALLED(UpdateUI); - SET_CALLED(Exec_UPDATECOMMANDS); - SET_CALLED(Exec_SETTITLE); - } - - load_state = LD_COMPLETE; - - test_readyState(NULL); -} - -static void test_Persist(IHTMLDocument2 *doc, IMoniker *mon) -{ - IPersistMoniker *persist_mon; - IPersistFile *persist_file; - GUID guid; - HRESULT hres; - - hres = IUnknown_QueryInterface(doc, &IID_IPersistFile, (void**)&persist_file); - ok(hres == S_OK, "QueryInterface(IID_IPersist) failed: %08x\n", hres); - if(SUCCEEDED(hres)) { - hres = IPersist_GetClassID(persist_file, NULL); - ok(hres == E_INVALIDARG, "GetClassID returned: %08x, expected E_INVALIDARG\n", hres); - - hres = IPersist_GetClassID(persist_file, &guid); - ok(hres == S_OK, "GetClassID failed: %08x\n", hres); - ok(IsEqualGUID(&CLSID_HTMLDocument, &guid), "guid != CLSID_HTMLDocument\n"); - - IPersist_Release(persist_file); - } - - hres = IUnknown_QueryInterface(doc, &IID_IPersistMoniker, (void**)&persist_mon); - ok(hres == S_OK, "QueryInterface(IID_IPersistMoniker) failed: %08x\n", hres); - if(SUCCEEDED(hres)) { - hres = IPersistMoniker_GetClassID(persist_mon, NULL); - ok(hres == E_INVALIDARG, "GetClassID returned: %08x, expected E_INVALIDARG\n", hres); - - hres = IPersistMoniker_GetClassID(persist_mon, &guid); - ok(hres == S_OK, "GetClassID failed: %08x\n", hres); - ok(IsEqualGUID(&CLSID_HTMLDocument, &guid), "guid != CLSID_HTMLDocument\n"); - - if(load_state == LD_DOLOAD) - test_Load(persist_mon, mon); - - test_readyState((IUnknown*)doc); - - IPersistMoniker_Release(persist_mon); - } -} - -static void test_put_href(IHTMLDocument2 *doc) -{ - IHTMLPrivateWindow *priv_window; - IHTMLWindow2 *window; - IHTMLLocation *location; - BSTR str, str2; - VARIANT vempty; - HRESULT hres; - - location = NULL; - hres = IHTMLDocument2_get_location(doc, &location); - ok(hres == S_OK, "get_location failed: %08x\n", hres); - ok(location != NULL, "location == NULL\n"); - - SET_EXPECT(TranslateUrl); - SET_EXPECT(Navigate); - str = a2bstr("about:blank"); - hres = IHTMLLocation_put_href(location, str); - ok(hres == S_OK, "put_href failed: %08x\n", hres); - CHECK_CALLED(TranslateUrl); - CHECK_CALLED(Navigate); - - IHTMLLocation_Release(location); - - hres = IHTMLDocument2_get_parentWindow(doc, &window); - ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres); - - hres = IHTMLWindow2_QueryInterface(window, &IID_IHTMLPrivateWindow, (void**)&priv_window); - IHTMLWindow2_Release(window); - ok(hres == S_OK, "QueryInterface(IID_IHTMLPrivateWindow) failed: %08x\n", hres); - - readystate_set_loading = TRUE; - navigated_load = TRUE; - SET_EXPECT(TranslateUrl); - SET_EXPECT(Exec_ShellDocView_67); - SET_EXPECT(Invoke_AMBIENT_SILENT); - SET_EXPECT(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); - SET_EXPECT(OnChanged_READYSTATE); - SET_EXPECT(Exec_ShellDocView_63); - - str2 = a2bstr(""); - V_VT(&vempty) = VT_EMPTY; - hres = IHTMLPrivateWindow_SuperNavigate(priv_window, str, str2, NULL, NULL, &vempty, &vempty, 0); - SysFreeString(str); - SysFreeString(str2); - ok(hres == S_OK, "SuperNavigate failed: %08x\n", hres); - - CHECK_CALLED(TranslateUrl); - CHECK_CALLED(Exec_ShellDocView_67); - CHECK_CALLED(Invoke_AMBIENT_SILENT); - CHECK_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); - SET_CALLED(OnChanged_READYSTATE); /* not always called */ - CHECK_CALLED(Exec_ShellDocView_63); - - test_GetCurMoniker(doc_unk, doc_mon, NULL); - IHTMLPrivateWindow_Release(priv_window); - - test_download(DWL_VERBDONE); -} - -static void test_open_window(IHTMLDocument2 *doc) -{ - IHTMLWindow2 *window, *new_window; - BSTR name, url; - HRESULT hres; - - hres = IHTMLDocument2_get_parentWindow(doc, &window); - ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres); - - url = a2bstr("about:blank"); - name = a2bstr("test"); - new_window = (void*)0xdeadbeef; - - open_call = TRUE; - - SET_EXPECT(TranslateUrl); - SET_EXPECT(EvaluateNewWindow); - - hres = IHTMLWindow2_open(window, url, name, NULL, VARIANT_FALSE, &new_window); - todo_wine - ok(hres == S_OK, "open failed: %08x\n", hres); - todo_wine - ok(new_window == NULL, "new_window != NULL\n"); - - todo_wine - CHECK_CALLED(TranslateUrl); - todo_wine - CHECK_CALLED(EvaluateNewWindow); - - open_call = FALSE; - SysFreeString(url); - SysFreeString(name); - - IHTMLWindow2_Release(window); - SysFreeString(name); -} - -static void test_clear(IHTMLDocument2 *doc) -{ - HRESULT hres; - - hres = IHTMLDocument2_clear(doc); - ok(hres == S_OK, "clear failed: %08x\n", hres); -} - -static const OLECMDF expect_cmds[OLECMDID_GETPRINTTEMPLATE+1] = { - 0, - OLECMDF_SUPPORTED, /* OLECMDID_OPEN */ - OLECMDF_SUPPORTED, /* OLECMDID_NEW */ - OLECMDF_SUPPORTED, /* OLECMDID_SAVE */ - OLECMDF_SUPPORTED|OLECMDF_ENABLED, /* OLECMDID_SAVEAS */ - OLECMDF_SUPPORTED, /* OLECMDID_SAVECOPYAS */ - OLECMDF_SUPPORTED|OLECMDF_ENABLED, /* OLECMDID_PRINT */ - OLECMDF_SUPPORTED|OLECMDF_ENABLED, /* OLECMDID_PRINTPREVIEW */ - OLECMDF_SUPPORTED|OLECMDF_ENABLED, /* OLECMDID_PAGESETUP */ - OLECMDF_SUPPORTED, /* OLECMDID_SPELL */ - OLECMDF_SUPPORTED|OLECMDF_ENABLED, /* OLECMDID_PROPERTIES */ - OLECMDF_SUPPORTED, /* OLECMDID_CUT */ - OLECMDF_SUPPORTED, /* OLECMDID_COPY */ - OLECMDF_SUPPORTED, /* OLECMDID_PASTE */ - OLECMDF_SUPPORTED, /* OLECMDID_PASTESPECIAL */ - OLECMDF_SUPPORTED, /* OLECMDID_UNDO */ - OLECMDF_SUPPORTED, /* OLECMDID_REDO */ - OLECMDF_SUPPORTED|OLECMDF_ENABLED, /* OLECMDID_SELECTALL */ - OLECMDF_SUPPORTED, /* OLECMDID_CLEARSELECTION */ - OLECMDF_SUPPORTED, /* OLECMDID_ZOOM */ - OLECMDF_SUPPORTED, /* OLECMDID_GETZOOMRANGE */ - 0, - OLECMDF_SUPPORTED|OLECMDF_ENABLED, /* OLECMDID_REFRESH */ - OLECMDF_SUPPORTED|OLECMDF_ENABLED, /* OLECMDID_STOP */ - 0,0,0,0,0,0, - OLECMDF_SUPPORTED, /* OLECMDID_STOPDOWNLOAD */ - 0,0, - OLECMDF_SUPPORTED, /* OLECMDID_DELETE */ - 0,0, - OLECMDF_SUPPORTED, /* OLECMDID_ENABLE_INTERACTION */ - OLECMDF_SUPPORTED, /* OLECMDID_ONUNLOAD */ - 0,0,0,0,0, - OLECMDF_SUPPORTED, /* OLECMDID_SHOWPAGESETUP */ - OLECMDF_SUPPORTED, /* OLECMDID_SHOWPRINT */ - 0,0, - OLECMDF_SUPPORTED, /* OLECMDID_CLOSE */ - 0,0,0, - OLECMDF_SUPPORTED, /* OLECMDID_SETPRINTTEMPLATE */ - OLECMDF_SUPPORTED /* OLECMDID_GETPRINTTEMPLATE */ -}; - -#define test_QueryStatus(u,cgid,cmdid,cmdf) _test_QueryStatus(__LINE__,u,cgid,cmdid,cmdf) -static void _test_QueryStatus(unsigned line, IUnknown *unk, REFIID cgid, ULONG cmdid, DWORD cmdf) -{ - IOleCommandTarget *cmdtrg; - OLECMD olecmd = {cmdid, 0}; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IOleCommandTarget, (void**)&cmdtrg); - ok_(__FILE__,line) (hres == S_OK, "QueryInterface(IID_IOleCommandTarget failed: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IOleCommandTarget_QueryStatus(cmdtrg, cgid, 1, &olecmd, NULL); - ok(hres == S_OK, "QueryStatus(%u) failed: %08x\n", cmdid, hres); - - IOleCommandTarget_Release(cmdtrg); - - ok_(__FILE__,line) (olecmd.cmdID == cmdid, "cmdID changed\n"); - ok_(__FILE__,line) (olecmd.cmdf == cmdf, "(%u) cmdf=%08x, expected %08x\n", cmdid, olecmd.cmdf, cmdf); -} - -static void test_MSHTML_QueryStatus(IHTMLDocument2 *doc, DWORD cmdf) -{ - IUnknown *unk = doc ? (IUnknown*)doc : doc_unk; - - test_QueryStatus(unk, &CGID_MSHTML, IDM_FONTNAME, cmdf); - test_QueryStatus(unk, &CGID_MSHTML, IDM_FONTSIZE, cmdf); - test_QueryStatus(unk, &CGID_MSHTML, IDM_SELECTALL, cmdf|OLECMDF_ENABLED); - test_QueryStatus(unk, &CGID_MSHTML, IDM_BOLD, cmdf); - test_QueryStatus(unk, &CGID_MSHTML, IDM_FORECOLOR, cmdf); - test_QueryStatus(unk, &CGID_MSHTML, IDM_JUSTIFYCENTER, cmdf); - test_QueryStatus(unk, &CGID_MSHTML, IDM_JUSTIFYLEFT, cmdf); - test_QueryStatus(unk, &CGID_MSHTML, IDM_JUSTIFYRIGHT, cmdf); - test_QueryStatus(unk, &CGID_MSHTML, IDM_ITALIC, cmdf); - test_QueryStatus(unk, &CGID_MSHTML, IDM_UNDERLINE, cmdf); - test_QueryStatus(unk, &CGID_MSHTML, IDM_HORIZONTALLINE, cmdf); - test_QueryStatus(unk, &CGID_MSHTML, IDM_ORDERLIST, cmdf); - test_QueryStatus(unk, &CGID_MSHTML, IDM_UNORDERLIST, cmdf); - test_QueryStatus(unk, &CGID_MSHTML, IDM_INDENT, cmdf); - test_QueryStatus(unk, &CGID_MSHTML, IDM_OUTDENT, cmdf); - test_QueryStatus(unk, &CGID_MSHTML, IDM_DELETE, cmdf); -} - -static void test_OleCommandTarget(IHTMLDocument2 *doc) -{ - IOleCommandTarget *cmdtrg; - OLECMD cmds[OLECMDID_GETPRINTTEMPLATE]; - int i; - HRESULT hres; - - hres = IUnknown_QueryInterface(doc, &IID_IOleCommandTarget, (void**)&cmdtrg); - ok(hres == S_OK, "QueryInterface(IID_IOleCommandTarget failed: %08x\n", hres); - if(FAILED(hres)) - return; - - for(i=0; i - -#include "mshtml.h" -#include "wininet.h" - -struct location_test { - const char *name; - const char *url; - - const char *href; - const char *protocol; - const char *host; - const char *hostname; - const char *port; - const char *pathname; - const char *search; - const char *hash; -}; - -static const struct location_test location_tests[] = { - { - "HTTP", - "http://www.winehq.org?search#hash", - "http://www.winehq.org/?search#hash", - "http:", - "www.winehq.org:80", - "www.winehq.org", - "80", - "", - "?search", - "#hash" - }, - { - "HTTP with file", - "http://www.winehq.org/file?search#hash", - "http://www.winehq.org/file?search#hash", - "http:", - "www.winehq.org:80", - "www.winehq.org", - "80", - "file", - "?search", - "#hash" - }, - { - "FTP", - "ftp://ftp.winehq.org/", - "ftp://ftp.winehq.org/", - "ftp:", - "ftp.winehq.org:21", - "ftp.winehq.org", - "21", - "", - NULL, - NULL - }, - { - "FTP with file", - "ftp://ftp.winehq.org/file", - "ftp://ftp.winehq.org/file", - "ftp:", - "ftp.winehq.org:21", - "ftp.winehq.org", - "21", - "file", - NULL, - NULL - }, - { - "FILE", - "file://C:\\windows\\win.ini", - "file:///C:/windows/win.ini", - "file:", - NULL, - NULL, - "", - "C:\\windows\\win.ini", - NULL, - NULL - } -}; - -static int str_eq_wa(LPCWSTR strw, const char *stra) -{ - CHAR buf[512]; - - if(strw == NULL || stra == NULL){ - if((void*)strw == (void*)stra) - return 1; - return 0; - } - - WideCharToMultiByte(CP_ACP, 0, strw, -1, buf, sizeof(buf), NULL, NULL); - return !lstrcmpA(stra, buf); -} - -static void test_href(IHTMLLocation *loc, const struct location_test *test) -{ - HRESULT hres; - BSTR str; - - hres = IHTMLLocation_get_href(loc, NULL); - ok(hres == E_POINTER, - "%s: get_href should have failed with E_POINTER (0x%08x), was: 0x%08x\n", - test->name, E_POINTER, hres); - - hres = IHTMLLocation_get_href(loc, &str); - ok(hres == S_OK, "%s: get_href failed: 0x%08x\n", test->name, hres); - if(hres == S_OK) - ok(str_eq_wa(str, test->href), - "%s: expected retrieved href to be L\"%s\", was: %s\n", - test->name, test->href, wine_dbgstr_w(str)); -} - -static void test_protocol(IHTMLLocation *loc, const struct location_test *test) -{ - HRESULT hres; - BSTR str; - - hres = IHTMLLocation_get_protocol(loc, NULL); - ok(hres == E_POINTER, - "%s: get_protocol should have failed with E_POINTER (0x%08x), was: 0x%08x\n", - test->name, E_POINTER, hres); - - hres = IHTMLLocation_get_protocol(loc, &str); - ok(hres == S_OK, "%s: get_protocol failed: 0x%08x\n", test->name, hres); - if(hres == S_OK) - ok(str_eq_wa(str, test->protocol), - "%s: expected retrieved protocol to be L\"%s\", was: %s\n", - test->name, test->protocol, wine_dbgstr_w(str)); -} - -static void test_host(IHTMLLocation *loc, const struct location_test *test) -{ - HRESULT hres; - BSTR str; - - hres = IHTMLLocation_get_host(loc, NULL); - ok(hres == E_POINTER, - "%s: get_host should have failed with E_POINTER (0x%08x), was: 0x%08x\n", - test->name, E_POINTER, hres); - - hres = IHTMLLocation_get_host(loc, &str); - ok(hres == S_OK, "%s: get_host failed: 0x%08x\n", test->name, hres); - if(hres == S_OK) - ok(str_eq_wa(str, test->host), - "%s: expected retrieved host to be L\"%s\", was: %s\n", - test->name, test->host, wine_dbgstr_w(str)); -} - -static void test_hostname(IHTMLLocation *loc, const struct location_test *test) -{ - HRESULT hres; - BSTR str; - - hres = IHTMLLocation_get_hostname(loc, NULL); - ok(hres == E_POINTER, - "%s: get_hostname should have failed with E_POINTER (0x%08x), was: 0x%08x\n", - test->name, E_POINTER, hres); - - hres = IHTMLLocation_get_hostname(loc, &str); - ok(hres == S_OK, "%s: get_hostname failed: 0x%08x\n", test->name, hres); - if(hres == S_OK) - ok(str_eq_wa(str, test->hostname), - "%s: expected retrieved hostname to be L\"%s\", was: %s\n", - test->name, test->hostname, wine_dbgstr_w(str)); -} - -static void test_port(IHTMLLocation *loc, const struct location_test *test) -{ - HRESULT hres; - BSTR str; - - hres = IHTMLLocation_get_port(loc, NULL); - ok(hres == E_POINTER, - "%s: get_port should have failed with E_POINTER (0x%08x), was: 0x%08x\n", - test->name, E_POINTER, hres); - - hres = IHTMLLocation_get_port(loc, &str); - ok(hres == S_OK, "%s: get_port failed: 0x%08x\n", test->name, hres); - if(hres == S_OK) - ok(str_eq_wa(str, test->port), - "%s: expected retrieved port to be L\"%s\", was: %s\n", - test->name, test->port, wine_dbgstr_w(str)); -} - -static void test_pathname(IHTMLLocation *loc, const struct location_test *test) -{ - HRESULT hres; - BSTR str; - - hres = IHTMLLocation_get_pathname(loc, NULL); - ok(hres == E_POINTER, - "%s: get_pathname should have failed with E_POINTER (0x%08x), was: 0x%08x\n", - test->name, E_POINTER, hres); - - hres = IHTMLLocation_get_pathname(loc, &str); - ok(hres == S_OK, "%s: get_pathname failed: 0x%08x\n", test->name, hres); - if(hres == S_OK) - ok(str_eq_wa(str, test->pathname), - "%s: expected retrieved pathname to be L\"%s\", was: %s\n", - test->name, test->pathname, wine_dbgstr_w(str)); -} - -static void test_search(IHTMLLocation *loc, const struct location_test *test) -{ - HRESULT hres; - BSTR str; - - hres = IHTMLLocation_get_search(loc, NULL); - ok(hres == E_POINTER, - "%s: get_search should have failed with E_POINTER (0x%08x), was: 0x%08x\n", - test->name, E_POINTER, hres); - - hres = IHTMLLocation_get_search(loc, &str); - ok(hres == S_OK, "%s: get_search failed: 0x%08x\n", test->name, hres); - if(hres == S_OK) - ok(str_eq_wa(str, test->search), - "%s: expected retrieved search to be L\"%s\", was: %s\n", - test->name, test->search, wine_dbgstr_w(str)); -} - -static void test_hash(IHTMLLocation *loc, const struct location_test *test) -{ - HRESULT hres; - BSTR str; - - hres = IHTMLLocation_get_hash(loc, NULL); - ok(hres == E_POINTER, - "%s: get_hash should have failed with E_POINTER (0x%08x), was: 0x%08x\n", - test->name, E_POINTER, hres); - - hres = IHTMLLocation_get_hash(loc, &str); - ok(hres == S_OK, "%s: get_hash failed: 0x%08x\n", test->name, hres); - if(hres == S_OK) - ok(str_eq_wa(str, test->hash), - "%s: expected retrieved hash to be L\"%s\", was: %s\n", - test->name, test->hash, wine_dbgstr_w(str)); -} - -static void perform_test(const struct location_test* test) -{ - WCHAR url[INTERNET_MAX_URL_LENGTH]; - HRESULT hres; - IBindCtx *bc; - IMoniker *url_mon; - IPersistMoniker *persist_mon; - IHTMLDocument2 *doc; - IHTMLDocument6 *doc6; - IHTMLLocation *location; - - hres = CreateBindCtx(0, &bc); - ok(hres == S_OK, "%s: CreateBindCtx failed: 0x%08x\n", test->name, hres); - if(FAILED(hres)) - return; - - MultiByteToWideChar(CP_ACP, 0, test->url, -1, url, sizeof(url)/sizeof(WCHAR)); - hres = CreateURLMoniker(NULL, url, &url_mon); - ok(hres == S_OK, "%s: CreateURLMoniker failed: 0x%08x\n", test->name, hres); - if(FAILED(hres)){ - IBindCtx_Release(bc); - return; - } - - hres = CoCreateInstance(&CLSID_HTMLDocument, NULL, - CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER, &IID_IHTMLDocument2, - (void**)&doc); - ok(hres == S_OK, "%s: CoCreateInstance failed: 0x%08x\n", test->name, hres); - if(FAILED(hres)){ - IMoniker_Release(url_mon); - IBindCtx_Release(bc); - return; - } - - hres = IHTMLDocument2_QueryInterface(doc, &IID_IHTMLDocument6, (void**)&doc6); - if(hres == S_OK){ - IHTMLDocument6_Release(doc6); - }else{ - win_skip("%s: Could not get IHTMLDocument6, probably too old IE. Requires IE 8+\n", test->name); - IMoniker_Release(url_mon); - IBindCtx_Release(bc); - return; - } - - hres = IHTMLDocument2_QueryInterface(doc, &IID_IPersistMoniker, - (void**)&persist_mon); - ok(hres == S_OK, "%s: IHTMlDocument2_QueryInterface failed: 0x%08x\n", test->name, hres); - if(FAILED(hres)){ - IHTMLDocument2_Release(doc); - IMoniker_Release(url_mon); - IBindCtx_Release(bc); - return; - } - - hres = IPersistMoniker_Load(persist_mon, FALSE, url_mon, bc, - STGM_SHARE_EXCLUSIVE | STGM_READWRITE); - ok(hres == S_OK, "%s: IPersistMoniker_Load failed: 0x%08x\n", test->name, hres); - if(FAILED(hres)){ - IPersistMoniker_Release(persist_mon); - IHTMLDocument2_Release(doc); - IMoniker_Release(url_mon); - IBindCtx_Release(bc); - return; - } - - hres = IHTMLDocument2_get_location(doc, &location); - ok(hres == S_OK, "%s: IHTMLDocument2_get_location failed: 0x%08x\n", test->name, hres); - if(FAILED(hres)){ - IPersistMoniker_Release(persist_mon); - IHTMLDocument2_Release(doc); - IMoniker_Release(url_mon); - IBindCtx_Release(bc); - return; - } - - test_href(location, test); - test_protocol(location, test); - test_host(location, test); - test_hostname(location, test); - test_port(location, test); - test_pathname(location, test); - test_search(location, test); - test_hash(location, test); - - IHTMLLocation_Release(location); - IPersistMoniker_Release(persist_mon); - IHTMLDocument2_Release(doc); - IMoniker_Release(url_mon); - IBindCtx_Release(bc); -} - -START_TEST(htmllocation) -{ - int i; - - CoInitialize(NULL); - - for(i=0; i < sizeof(location_tests)/sizeof(*location_tests); i++) - perform_test(location_tests+i); - - CoUninitialize(); -} diff --git a/rostests/winetests/mshtml/jstest.html b/rostests/winetests/mshtml/jstest.html deleted file mode 100644 index 3363c5ae8ca..00000000000 --- a/rostests/winetests/mshtml/jstest.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - -
- - - diff --git a/rostests/winetests/mshtml/misc.c b/rostests/winetests/mshtml/misc.c deleted file mode 100644 index ed8de36b9a3..00000000000 --- a/rostests/winetests/mshtml/misc.c +++ /dev/null @@ -1,116 +0,0 @@ -/* - * 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 - */ - -#define COBJMACROS - -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "ole2.h" -#include "initguid.h" -#include "optary.h" - -static void test_HTMLLoadOptions(void) -{ - IHtmlLoadOptions *loadopts; - BYTE buf[100]; - DWORD size, i, data = 0xdeadbeef; - HRESULT hres; - - hres = CoCreateInstance(&CLSID_HTMLLoadOptions, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, - &IID_IHtmlLoadOptions, (void**)&loadopts); - ok(hres == S_OK, "creating HTMLLoadOptions failed: %08x\n", hres); - if(FAILED(hres)) - return; - - for(i=0; i <= HTMLLOADOPTION_FRAMELOAD+3; i++) { - size = 0xdeadbeef; - memset(buf, 0xdd, sizeof(buf)); - hres = IHtmlLoadOptions_QueryOption(loadopts, i, NULL, &size); - ok(hres == S_OK, "QueryOption failed: %08x\n", hres); - ok(size == 0, "size = %d\n", size); - ok(buf[0] == 0xdd, "buf changed\n"); - } - - size = 0xdeadbeef; - hres = IHtmlLoadOptions_QueryOption(loadopts, HTMLLOADOPTION_CODEPAGE, NULL, &size); - ok(hres == S_OK, "QueryOption failed: %08x\n", hres); - ok(size == 0, "size = %d\n", size); - - hres = IHtmlLoadOptions_SetOption(loadopts, HTMLLOADOPTION_CODEPAGE, &data, sizeof(data)); - ok(hres == S_OK, "SetOption failed: %08x\n", hres); - - size = sizeof(data); - memset(buf, 0xdd, sizeof(buf)); - hres = IHtmlLoadOptions_QueryOption(loadopts, HTMLLOADOPTION_CODEPAGE, buf, &size); - ok(hres == S_OK, "QueryOption failed: %08x\n", hres); - ok(size == sizeof(data), "size = %d\n", size); - ok(*(DWORD*)buf == data, "unexpected buf\n"); - - size = sizeof(data)-1; - memset(buf, 0xdd, sizeof(buf)); - hres = IHtmlLoadOptions_QueryOption(loadopts, HTMLLOADOPTION_CODEPAGE, buf, &size); - ok(hres == E_FAIL, "QueryOption failed: %08x\n", hres); - ok(size == sizeof(data) || !size, "size = %d\n", size); - ok(buf[0] == 0xdd, "buf changed\n"); - - data = 100; - hres = IHtmlLoadOptions_SetOption(loadopts, HTMLLOADOPTION_CODEPAGE, &data, 0); - ok(hres == S_OK, "SetOption failed: %08x\n", hres); - - size = 0xdeadbeef; - memset(buf, 0xdd, sizeof(buf)); - hres = IHtmlLoadOptions_QueryOption(loadopts, HTMLLOADOPTION_CODEPAGE, buf, &size); - ok(hres == S_OK, "QueryOption failed: %08x\n", hres); - ok(size == 0, "size = %d\n", size); - ok(buf[0] == 0xdd, "buf changed\n"); - - hres = IHtmlLoadOptions_SetOption(loadopts, HTMLLOADOPTION_CODEPAGE, NULL, 0); - ok(hres == S_OK, "SetOption failed: %08x\n", hres); - - hres = IHtmlLoadOptions_SetOption(loadopts, 1000, &data, sizeof(data)); - ok(hres == S_OK, "SetOption failed: %08x\n", hres); - - size = sizeof(data); - memset(buf, 0xdd, sizeof(buf)); - hres = IHtmlLoadOptions_QueryOption(loadopts, 1000, buf, &size); - ok(hres == S_OK, "QueryOption failed: %08x\n", hres); - ok(size == sizeof(data), "size = %d\n", size); - ok(*(DWORD*)buf == data, "unexpected buf\n"); - - hres = IHtmlLoadOptions_SetOption(loadopts, 1000, buf, sizeof(buf)); - ok(hres == S_OK, "SetOption failed: %08x\n", hres); - - size = 0xdeadbeef; - hres = IHtmlLoadOptions_QueryOption(loadopts, 1000, buf, &size); - ok(hres == S_OK, "QueryOption failed: %08x\n", hres); - ok(size == sizeof(buf), "size = %d\n", size); - - IHtmlLoadOptions_Release(loadopts); -} - -START_TEST(misc) -{ - CoInitialize(NULL); - - test_HTMLLoadOptions(); - - CoUninitialize(); -} diff --git a/rostests/winetests/mshtml/mshtml.rbuild b/rostests/winetests/mshtml/mshtml.rbuild deleted file mode 100644 index 90696e467e8..00000000000 --- a/rostests/winetests/mshtml/mshtml.rbuild +++ /dev/null @@ -1,28 +0,0 @@ - - - - - . - - dom.c - events.c - htmldoc.c - htmllocation.c - misc.c - protocol.c - script.c - testlist.c - rsrc.rc - wine - uuid - strmiids - wininet - ole32 - oleaut32 - user32 - gdi32 - urlmon - advapi32 - ntdll - - diff --git a/rostests/winetests/mshtml/mshtml_test.h b/rostests/winetests/mshtml/mshtml_test.h deleted file mode 100644 index 7f2cdf2eef3..00000000000 --- a/rostests/winetests/mshtml/mshtml_test.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2009 Ge van Geldorp for VMware, Inc. - * - * 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 - */ - -/* Check if Internet Explorer is configured to run in "Enhanced Security Configuration" (aka hardened mode) */ -/* Note: this code is duplicated in dlls/mshtml/tests/mshtml_test.h and dlls/urlmon/tests/sec_mgr.c */ -static BOOL is_ie_hardened(void) -{ - HKEY zone_map; - DWORD ie_harden, type, size; - - ie_harden = 0; - if(RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap", - 0, KEY_QUERY_VALUE, &zone_map) == ERROR_SUCCESS) { - size = sizeof(DWORD); - if (RegQueryValueEx(zone_map, "IEHarden", NULL, &type, (LPBYTE) &ie_harden, &size) != ERROR_SUCCESS || - type != REG_DWORD) { - ie_harden = 0; - } - RegCloseKey(zone_map); - } - - return ie_harden != 0; -} diff --git a/rostests/winetests/mshtml/protocol.c b/rostests/winetests/mshtml/protocol.c deleted file mode 100644 index 1369ff73621..00000000000 --- a/rostests/winetests/mshtml/protocol.c +++ /dev/null @@ -1,901 +0,0 @@ -/* - * Copyright 2005 Jacek 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 - */ - -#define COBJMACROS - -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "ole2.h" -#include "urlmon.h" -#include "shlwapi.h" - -#include "initguid.h" - -#define DEFINE_EXPECT(func) \ - static BOOL expect_ ## func = FALSE, called_ ## func = FALSE - -#define SET_EXPECT(func) \ - expect_ ## func = TRUE - -#define CHECK_EXPECT(func) \ - do { \ - ok(expect_ ##func, "unexpected call " #func "\n"); \ - expect_ ## func = FALSE; \ - called_ ## func = TRUE; \ - }while(0) - -#define CHECK_EXPECT2(func) \ - do { \ - ok(expect_ ##func, "unexpected call " #func "\n"); \ - called_ ## func = TRUE; \ - }while(0) - -#define CHECK_CALLED(func) \ - do { \ - ok(called_ ## func, "expected " #func "\n"); \ - expect_ ## func = called_ ## func = FALSE; \ - }while(0) - -DEFINE_GUID(CLSID_ResProtocol, 0x3050F3BC, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B); -DEFINE_GUID(CLSID_AboutProtocol, 0x3050F406, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B); -DEFINE_GUID(CLSID_JSProtocol, 0x3050F3B2, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B); - -DEFINE_EXPECT(GetBindInfo); -DEFINE_EXPECT(ReportProgress); -DEFINE_EXPECT(ReportData); -DEFINE_EXPECT(ReportResult); - -static HRESULT expect_hrResult; -static BOOL expect_hr_win32err = FALSE; -static DWORD bindf; - -static const WCHAR about_blank_url[] = {'a','b','o','u','t',':','b','l','a','n','k',0}; -static const WCHAR about_test_url[] = {'a','b','o','u','t',':','t','e','s','t',0}; -static const WCHAR about_res_url[] = {'r','e','s',':','b','l','a','n','k',0}; -static const WCHAR javascript_test_url[] = {'j','a','v','a','s','c','r','i','p','t',':','t','e','s','t','(',')',0}; - -static const char *debugstr_guid(REFIID riid) -{ - static char buf[50]; - - sprintf(buf, "{%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]); - - return buf; -} - -static HRESULT WINAPI ProtocolSink_QueryInterface(IInternetProtocolSink *iface, REFIID riid, void **ppv) -{ - if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IInternetProtocolSink, riid)) { - *ppv = iface; - return S_OK; - } - - *ppv = NULL; - ok(0, "unexpected riid %s\n", debugstr_guid(riid)); - return E_NOINTERFACE; -} - -static ULONG WINAPI ProtocolSink_AddRef(IInternetProtocolSink *iface) -{ - return 2; -} - -static ULONG WINAPI ProtocolSink_Release(IInternetProtocolSink *iface) -{ - return 1; -} - -static HRESULT WINAPI ProtocolSink_Switch(IInternetProtocolSink *iface, PROTOCOLDATA *pProtocolData) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ProtocolSink_ReportProgress(IInternetProtocolSink *iface, ULONG ulStatusCode, - LPCWSTR szStatusText) -{ - static const WCHAR text_html[] = {'t','e','x','t','/','h','t','m','l',0}; - - CHECK_EXPECT(ReportProgress); - - ok(ulStatusCode == BINDSTATUS_MIMETYPEAVAILABLE - || ulStatusCode == BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE, - "ulStatusCode=%d\n", ulStatusCode); - ok(!lstrcmpW(szStatusText, text_html), "szStatusText != text/html\n"); - - return S_OK; -} - -static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWORD grfBSCF, ULONG ulProgress, - ULONG ulProgressMax) -{ - CHECK_EXPECT(ReportData); - - ok(ulProgress == ulProgressMax, "ulProgress != ulProgressMax\n"); - ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION | BSCF_DATAFULLYAVAILABLE), - "grcf = %08x\n", grfBSCF); - - return S_OK; -} - -static HRESULT WINAPI ProtocolSink_ReportResult(IInternetProtocolSink *iface, HRESULT hrResult, DWORD dwError, - LPCWSTR szResult) -{ - CHECK_EXPECT(ReportResult); - - if(expect_hr_win32err) - ok((hrResult&0xffff0000) == ((FACILITY_WIN32 << 16)|0x80000000) || expect_hrResult, - "expected win32 err or %08x got: %08x\n", expect_hrResult, hrResult); - else - ok(hrResult == expect_hrResult || ((expect_hrResult == E_INVALIDARG || - expect_hrResult == HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND)) && - hrResult == MK_E_SYNTAX), "expected: %08x got: %08x\n", expect_hrResult, hrResult); - ok(dwError == 0, "dwError = %d\n", dwError); - ok(!szResult, "szResult != NULL\n"); - - return S_OK; -} - -static IInternetProtocolSinkVtbl protocol_sink_vtbl = { - ProtocolSink_QueryInterface, - ProtocolSink_AddRef, - ProtocolSink_Release, - ProtocolSink_Switch, - ProtocolSink_ReportProgress, - ProtocolSink_ReportData, - ProtocolSink_ReportResult -}; - -static IInternetProtocolSink protocol_sink = { - &protocol_sink_vtbl -}; - -static HRESULT WINAPI BindInfo_QueryInterface(IInternetBindInfo *iface, REFIID riid, void **ppv) -{ - if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IInternetBindInfo, riid)) { - *ppv = iface; - return S_OK; - } - - *ppv = NULL; - ok(0, "unexpected riid %s\n", debugstr_guid(riid)); - return E_NOINTERFACE; -} - -static ULONG WINAPI BindInfo_AddRef(IInternetBindInfo *iface) -{ - return 2; -} - -static ULONG WINAPI BindInfo_Release(IInternetBindInfo *iface) -{ - return 1; -} - -static HRESULT WINAPI BindInfo_GetBindInfo(IInternetBindInfo *iface, DWORD *grfBINDF, BINDINFO *pbindinfo) -{ - CHECK_EXPECT(GetBindInfo); - - ok(grfBINDF != NULL, "grfBINDF == NULL\n"); - ok(pbindinfo != NULL, "pbindinfo == NULL\n"); - ok(pbindinfo->cbSize == sizeof(BINDINFO), "wrong size of pbindinfo: %d\n", pbindinfo->cbSize); - - *grfBINDF = bindf; - return S_OK; -} - -static HRESULT WINAPI BindInfo_GetBindString(IInternetBindInfo *iface, ULONG ulStringType, LPOLESTR *ppwzStr, - ULONG cEl, ULONG *pcElFetched) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static IInternetBindInfoVtbl bind_info_vtbl = { - BindInfo_QueryInterface, - BindInfo_AddRef, - BindInfo_Release, - BindInfo_GetBindInfo, - BindInfo_GetBindString -}; - -static IInternetBindInfo bind_info = { - &bind_info_vtbl -}; - -static void test_protocol_fail(IInternetProtocol *protocol, LPCWSTR url, HRESULT expected_hres, - BOOL expect_win32err) -{ - HRESULT hres; - - SET_EXPECT(GetBindInfo); - SET_EXPECT(ReportResult); - - expect_hrResult = expected_hres; - expect_hr_win32err = expect_win32err; - hres = IInternetProtocol_Start(protocol, url, &protocol_sink, &bind_info, 0, 0); - if(expect_win32err) - ok((hres&0xffff0000) == ((FACILITY_WIN32 << 16)|0x80000000) || hres == expect_hrResult, - "expected win32 err or %08x got: %08x\n", expected_hres, hres); - else - ok(hres == expected_hres || ((expected_hres == E_INVALIDARG || - expected_hres == HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND)) && hres == MK_E_SYNTAX), - "expected: %08x got: %08x\n", expected_hres, hres); - - CHECK_CALLED(GetBindInfo); - CHECK_CALLED(ReportResult); -} - -static void protocol_start(IInternetProtocol *protocol, LPCWSTR url) -{ - HRESULT hres; - - SET_EXPECT(GetBindInfo); - SET_EXPECT(ReportResult); - SET_EXPECT(ReportProgress); - SET_EXPECT(ReportData); - expect_hrResult = S_OK; - expect_hr_win32err = FALSE; - - hres = IInternetProtocol_Start(protocol, url, &protocol_sink, &bind_info, 0, 0); - ok(hres == S_OK, "Start failed: %08x\n", hres); - - CHECK_CALLED(GetBindInfo); - CHECK_CALLED(ReportProgress); - CHECK_CALLED(ReportData); - CHECK_CALLED(ReportResult); -} - -static void res_sec_url_cmp(LPCWSTR url, DWORD size, LPCWSTR file) -{ - WCHAR buf[MAX_PATH]; - DWORD len; - - static const WCHAR fileW[] = {'f','i','l','e',':','/','/'}; - - if(size < sizeof(fileW)/sizeof(WCHAR) || memcmp(url, fileW, sizeof(fileW))) { - ok(0, "wrong URL protocol\n"); - return; - } - - SetLastError(0xdeadbeef); - len = SearchPathW(NULL, file, NULL, sizeof(buf)/sizeof(WCHAR), buf, NULL); - if(!len) { - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - win_skip("SearchPathW is not implemented\n"); - else - ok(0, "SearchPath failed: %u\n", GetLastError()); - return; - } - - len += sizeof(fileW)/sizeof(WCHAR)+1; - ok(len == size, "wrong size %u, expected %u\n", size, len); - ok(!lstrcmpW(url + sizeof(fileW)/sizeof(WCHAR), buf), "wrong file part %s\n", wine_dbgstr_w(url)); -} - -static void test_res_protocol(void) -{ - IInternetProtocolInfo *protocol_info; - IUnknown *unk; - IClassFactory *factory; - HRESULT hres; - - static const WCHAR blank_url[] = - {'r','e','s',':','/','/','m','s','h','t','m','l','.','d','l','l','/','b','l','a','n','k','.','h','t','m',0}; - static const WCHAR test_part_url[] = {'r','e','s',':','/','/','C','S','S','/','t','e','s','t',0}; - static const WCHAR wrong_url1[] = - {'m','s','h','t','m','l','.','d','l','l','/','b','l','a','n','k','.','m','t','h',0}; - static const WCHAR wrong_url2[] = - {'r','e','s',':','/','/','m','s','h','t','m','l','.','d','l','l',0}; - static const WCHAR wrong_url3[] = - {'r','e','s',':','/','/','m','s','h','t','m','l','.','d','l','l','/','x','x','.','h','t','m',0}; - static const WCHAR wrong_url4[] = - {'r','e','s',':','/','/','x','x','.','d','l','l','/','b','l','a','n','k','.','h','t','m',0}; - static const WCHAR wrong_url5[] = - {'r','e','s',':','/','/','s','h','t','m','l','.','d','l','l','/','b','l','a','n','k','.','h','t','m',0}; - static const WCHAR mshtml_dllW[] = {'m','s','h','t','m','l','.','d','l','l',0}; - - hres = CoGetClassObject(&CLSID_ResProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk); - ok(hres == S_OK, "CoGetClassObject failed: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (void**)&protocol_info); - ok(hres == S_OK, "Could not get IInternetProtocolInfo interface: %08x\n", hres); - if(SUCCEEDED(hres)) { - WCHAR buf[128]; - DWORD size; - int i; - - for(i = PARSE_CANONICALIZE; i <= PARSE_UNESCAPE; i++) { - if(i != PARSE_SECURITY_URL && i != PARSE_DOMAIN) { - hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, i, 0, buf, - sizeof(buf)/sizeof(buf[0]), &size, 0); - ok(hres == INET_E_DEFAULT_ACTION, - "[%d] failed: %08x, expected INET_E_DEFAULT_ACTION\n", i, hres); - } - } - - hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, PARSE_SECURITY_URL, 0, buf, - sizeof(buf)/sizeof(buf[0]), &size, 0); - ok(hres == S_OK, "ParseUrl failed: %08x\n", hres); - res_sec_url_cmp(buf, size, mshtml_dllW); - - size = 0; - hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, PARSE_SECURITY_URL, 0, buf, - 3, &size, 0); - ok(hres == S_FALSE, "ParseUrl failed: %08x, expected S_FALSE\n", hres); - ok(size, "size=0\n"); - - hres = IInternetProtocolInfo_ParseUrl(protocol_info, wrong_url1, PARSE_SECURITY_URL, 0, buf, - sizeof(buf)/sizeof(buf[0]), &size, 0); - ok(hres == MK_E_SYNTAX || hres == E_INVALIDARG, - "ParseUrl failed: %08x, expected MK_E_SYNTAX\n", hres); - - hres = IInternetProtocolInfo_ParseUrl(protocol_info, wrong_url5, PARSE_SECURITY_URL, 0, buf, - sizeof(buf)/sizeof(buf[0]), &size, 0); - ok(hres == MK_E_SYNTAX, "ParseUrl failed: %08x, expected MK_E_SYNTAX\n", hres); - - size = 0xdeadbeef; - buf[0] = '?'; - hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, PARSE_DOMAIN, 0, buf, - sizeof(buf)/sizeof(buf[0]), &size, 0); - ok(hres == S_OK || hres == E_FAIL, "ParseUrl failed: %08x\n", hres); - ok(buf[0] == '?', "buf changed\n"); - ok(size == sizeof(blank_url)/sizeof(WCHAR) || - size == sizeof(buf)/sizeof(buf[0]), /* IE8 */ - "size=%d\n", size); - - size = 0xdeadbeef; - hres = IInternetProtocolInfo_ParseUrl(protocol_info, wrong_url1, PARSE_DOMAIN, 0, buf, - sizeof(buf)/sizeof(buf[0]), &size, 0); - ok(hres == S_OK || hres == E_FAIL, "ParseUrl failed: %08x\n", hres); - ok(buf[0] == '?', "buf changed\n"); - ok(size == sizeof(wrong_url1)/sizeof(WCHAR) || - size == sizeof(buf)/sizeof(buf[0]), /* IE8 */ - "size=%d\n", size); - - if (0) - { - /* Crashes on win9x */ - size = 0xdeadbeef; - buf[0] = '?'; - hres = IInternetProtocolInfo_ParseUrl(protocol_info, NULL, PARSE_DOMAIN, 0, buf, - sizeof(buf)/sizeof(buf[0]), &size, 0); - ok(hres == E_FAIL, "ParseUrl failed: %08x\n", hres); - ok(buf[0] == '?', "buf changed\n"); - ok(size == 1, "size=%u, expected 1\n", size); - - buf[0] = '?'; - hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, PARSE_DOMAIN, 0, buf, - sizeof(buf)/sizeof(buf[0]), NULL, 0); - ok(hres == E_POINTER, "ParseUrl failed: %08x\n", hres); - ok(buf[0] == '?', "buf changed\n"); - - buf[0] = '?'; - hres = IInternetProtocolInfo_ParseUrl(protocol_info, NULL, PARSE_DOMAIN, 0, buf, - sizeof(buf)/sizeof(buf[0]), NULL, 0); - ok(hres == E_POINTER, "ParseUrl failed: %08x\n", hres); - ok(buf[0] == '?', "buf changed\n"); - } - - buf[0] = '?'; - hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, PARSE_UNESCAPE+1, 0, buf, - sizeof(buf)/sizeof(buf[0]), &size, 0); - ok(hres == INET_E_DEFAULT_ACTION, - "ParseUrl failed: %08x, expected INET_E_DEFAULT_ACTION\n", hres); - ok(buf[0] == '?', "buf changed\n"); - - size = 0xdeadbeef; - hres = IInternetProtocolInfo_CombineUrl(protocol_info, blank_url, test_part_url, - 0, buf, sizeof(buf)/sizeof(buf[0]), &size, 0); - ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres); - ok(size == 0xdeadbeef, "size=%d\n", size); - - size = 0xdeadbeef; - hres = IInternetProtocolInfo_CombineUrl(protocol_info, blank_url, test_part_url, - URL_FILE_USE_PATHURL, buf, sizeof(buf)/sizeof(buf[0]), &size, 0); - ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres); - ok(size == 0xdeadbeef, "size=%d\n", size); - - size = 0xdeadbeef; - hres = IInternetProtocolInfo_CombineUrl(protocol_info, NULL, NULL, - URL_FILE_USE_PATHURL, NULL, 0xdeadbeef, NULL, 0); - ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres); - ok(size == 0xdeadbeef, "size=%d\n", size); - - hres = IInternetProtocolInfo_CompareUrl(protocol_info, blank_url, blank_url, 0); - ok(hres == E_NOTIMPL, "CompareUrl failed: %08x\n", hres); - - hres = IInternetProtocolInfo_CompareUrl(protocol_info, NULL, NULL, 0xdeadbeef); - ok(hres == E_NOTIMPL, "CompareUrl failed: %08x\n", hres); - - for(i=0; i<30; i++) { - if(i == QUERY_USES_NETWORK || i == QUERY_IS_SECURE || i == QUERY_IS_SAFE) - continue; - - hres = IInternetProtocolInfo_QueryInfo(protocol_info, blank_url, i, 0, - buf, sizeof(buf), &size, 0); - ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, - "QueryInfo(%d) returned: %08x, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", i, hres); - } - - size = 0xdeadbeef; - memset(buf, '?', sizeof(buf)); - hres = IInternetProtocolInfo_QueryInfo(protocol_info, blank_url, QUERY_USES_NETWORK, 0, - buf, sizeof(buf), &size, 0); - ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08x\n", hres); - ok(size == sizeof(DWORD), "size=%d\n", size); - ok(!*(DWORD*)buf, "buf=%d\n", *(DWORD*)buf); - - memset(buf, '?', sizeof(buf)); - hres = IInternetProtocolInfo_QueryInfo(protocol_info, blank_url, QUERY_USES_NETWORK, 0, - buf, sizeof(buf), NULL, 0); - ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08x\n", hres); - ok(!*(DWORD*)buf, "buf=%d\n", *(DWORD*)buf); - - hres = IInternetProtocolInfo_QueryInfo(protocol_info, blank_url, QUERY_USES_NETWORK, 0, - buf, 3, &size, 0); - ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08x, expected E_FAIL\n", hres); - - size = 0xdeadbeef; - memset(buf, '?', sizeof(buf)); - hres = IInternetProtocolInfo_QueryInfo(protocol_info, NULL, QUERY_USES_NETWORK, 0, - buf, sizeof(buf), &size, 0); - ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08x, expected E_FAIL\n", hres); - ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08x\n", hres); - ok(size == sizeof(DWORD), "size=%d\n", size); - ok(!*(DWORD*)buf, "buf=%d\n", *(DWORD*)buf); - - hres = IInternetProtocolInfo_QueryInfo(protocol_info, blank_url, QUERY_USES_NETWORK, 0, - NULL, sizeof(buf), &size, 0); - ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08x, expected E_FAIL\n", hres); - - hres = IInternetProtocolInfo_QueryInfo(protocol_info, blank_url, 60, 0, - NULL, sizeof(buf), &size, 0); - ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, - "QueryInfo failed: %08x, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", hres); - - IInternetProtocolInfo_Release(protocol_info); - } - - hres = IUnknown_QueryInterface(unk, &IID_IClassFactory, (void**)&factory); - ok(hres == S_OK, "Could not get IClassFactory interface\n"); - if(SUCCEEDED(hres)) { - IInternetProtocol *protocol; - BYTE buf[512]; - ULONG cb; - hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol); - ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); - - if(SUCCEEDED(hres)) { - IInternetPriority *priority; - - hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetPriority, (void**)&priority); - ok(hres == E_NOINTERFACE, - "QueryInterface(IInternetPriority) returned %08x, expected E_NOINTEFACE\n", hres); - - test_protocol_fail(protocol, wrong_url1, E_INVALIDARG, FALSE); - test_protocol_fail(protocol, wrong_url2, - HRESULT_FROM_WIN32(ERROR_RESOURCE_TYPE_NOT_FOUND), FALSE); - test_protocol_fail(protocol, wrong_url3, E_FAIL, TRUE); - test_protocol_fail(protocol, wrong_url4, E_FAIL, TRUE); - - cb = 0xdeadbeef; - hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); - ok(hres == E_FAIL, "Read returned %08x expected E_FAIL\n", hres); - ok(cb == 0xdeadbeef, "cb=%u expected 0xdeadbeef\n", cb); - - protocol_start(protocol, blank_url); - hres = IInternetProtocol_Read(protocol, buf, 2, &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - ok(cb == 2, "cb=%u expected 2\n", cb); - hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); - ok(hres == S_FALSE, "Read failed: %08x expected S_FALSE\n", hres); - ok(cb == 0, "cb=%u expected 0\n", cb); - hres = IInternetProtocol_UnlockRequest(protocol); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); - - protocol_start(protocol, blank_url); - hres = IInternetProtocol_Read(protocol, buf, 2, &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - hres = IInternetProtocol_LockRequest(protocol, 0); - ok(hres == S_OK, "LockRequest failed: %08x\n", hres); - hres = IInternetProtocol_UnlockRequest(protocol); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); - hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - - protocol_start(protocol, blank_url); - hres = IInternetProtocol_LockRequest(protocol, 0); - ok(hres == S_OK, "LockRequest failed: %08x\n", hres); - hres = IInternetProtocol_Terminate(protocol, 0); - ok(hres == S_OK, "Terminate failed: %08x\n", hres); - hres = IInternetProtocol_Read(protocol, buf, 2, &cb); - ok(hres == S_OK, "Read failed: %08x\n\n", hres); - hres = IInternetProtocol_UnlockRequest(protocol); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); - hres = IInternetProtocol_Read(protocol, buf, 2, &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - hres = IInternetProtocol_Terminate(protocol, 0); - ok(hres == S_OK, "Terminate failed: %08x\n", hres); - hres = IInternetProtocol_Read(protocol, buf, 2, &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - ok(cb == 2, "cb=%u expected 2\n", cb); - - protocol_start(protocol, blank_url); - hres = IInternetProtocol_LockRequest(protocol, 0); - ok(hres == S_OK, "LockRequest failed: %08x\n", hres); - hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - protocol_start(protocol, blank_url); - hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - hres = IInternetProtocol_Terminate(protocol, 0); - ok(hres == S_OK, "Terminate failed: %08x\n", hres); - - IInternetProtocol_Release(protocol); - } - - IClassFactory_Release(factory); - } - - IUnknown_Release(unk); -} - -static void do_test_about_protocol(IClassFactory *factory, DWORD bf) -{ - IInternetProtocol *protocol; - IInternetPriority *priority; - BYTE buf[512]; - ULONG cb; - HRESULT hres; - - static const WCHAR blank_html[] = {0xfeff,'<','H','T','M','L','>','<','/','H','T','M','L','>',0}; - static const WCHAR test_html[] = - {0xfeff,'<','H','T','M','L','>','t','e','s','t','<','/','H','T','M','L','>',0}; - - bindf = bf; - - hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol); - ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetPriority, (void**)&priority); - ok(hres == E_NOINTERFACE, - "QueryInterface(IInternetPriority) returned %08x, expected E_NOINTEFACE\n", hres); - - protocol_start(protocol, about_blank_url); - hres = IInternetProtocol_LockRequest(protocol, 0); - ok(hres == S_OK, "LockRequest failed: %08x\n", hres); - hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - ok(cb == sizeof(blank_html), "cb=%d\n", cb); - ok(!memcmp(buf, blank_html, cb), "Readed wrong data\n"); - hres = IInternetProtocol_UnlockRequest(protocol); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); - - protocol_start(protocol, about_test_url); - hres = IInternetProtocol_LockRequest(protocol, 0); - ok(hres == S_OK, "LockRequest failed: %08x\n", hres); - hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - ok(cb == sizeof(test_html), "cb=%d\n", cb); - ok(!memcmp(buf, test_html, cb), "Readed wrong data\n"); - hres = IInternetProtocol_UnlockRequest(protocol); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); - - protocol_start(protocol, about_res_url); - hres = IInternetProtocol_LockRequest(protocol, 0); - ok(hres == S_OK, "LockRequest failed: %08x\n", hres); - hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - ok(cb == sizeof(blank_html), "cb=%d\n", cb); - ok(!memcmp(buf, blank_html, cb), "Readed wrong data\n"); - hres = IInternetProtocol_UnlockRequest(protocol); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); - - IInternetProtocol_Release(protocol); -} - -static void test_about_protocol(void) -{ - IInternetProtocolInfo *protocol_info; - IUnknown *unk; - IClassFactory *factory; - HRESULT hres; - - hres = CoGetClassObject(&CLSID_AboutProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk); - ok(hres == S_OK, "CoGetClassObject failed: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (void**)&protocol_info); - ok(hres == S_OK, "Could not get IInternetProtocolInfo interface: %08x\n", hres); - if(SUCCEEDED(hres)) { - WCHAR buf[128]; - DWORD size; - int i; - - for(i = PARSE_CANONICALIZE; i <= PARSE_UNESCAPE; i++) { - if(i != PARSE_SECURITY_URL && i != PARSE_DOMAIN) { - hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_blank_url, i, 0, buf, - sizeof(buf)/sizeof(buf[0]), &size, 0); - ok(hres == INET_E_DEFAULT_ACTION, - "[%d] failed: %08x, expected INET_E_DEFAULT_ACTION\n", i, hres); - } - } - - hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_blank_url, PARSE_SECURITY_URL, 0, buf, - sizeof(buf)/sizeof(buf[0]), &size, 0); - ok(hres == S_OK, "ParseUrl failed: %08x\n", hres); - ok(!lstrcmpW(about_blank_url, buf), "buf != blank_url\n"); - - hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_blank_url, PARSE_SECURITY_URL, 0, buf, - 3, &size, 0); - ok(hres == S_FALSE, "ParseUrl failed: %08x, expected S_FALSE\n", hres); - - hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_test_url, PARSE_SECURITY_URL, 0, buf, - sizeof(buf)/sizeof(buf[0]), &size, 0); - ok(hres == S_OK, "ParseUrl failed: %08x\n", hres); - ok(!lstrcmpW(about_test_url, buf), "buf != test_url\n"); - - size = 0xdeadbeef; - buf[0] = '?'; - hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_blank_url, PARSE_DOMAIN, 0, buf, - sizeof(buf)/sizeof(buf[0]), &size, 0); - ok(hres == S_OK || hres == E_FAIL, "ParseUrl failed: %08x\n", hres); - ok(buf[0] == '?', "buf changed\n"); - ok(size == sizeof(about_blank_url)/sizeof(WCHAR) || - size == sizeof(buf)/sizeof(buf[0]), /* IE8 */ - "size=%d\n", size); - - if (0) - { - /* Crashes on win9x */ - size = 0xdeadbeef; - buf[0] = '?'; - hres = IInternetProtocolInfo_ParseUrl(protocol_info, NULL, PARSE_DOMAIN, 0, buf, - sizeof(buf)/sizeof(buf[0]), &size, 0); - ok(hres == E_FAIL, "ParseUrl failed: %08x\n", hres); - ok(buf[0] == '?', "buf changed\n"); - ok(size == 1, "size=%u, expected 1\n", size); - - buf[0] = '?'; - hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_blank_url, PARSE_DOMAIN, 0, buf, - sizeof(buf)/sizeof(buf[0]), NULL, 0); - ok(hres == E_POINTER, "ParseUrl failed: %08x\n", hres); - ok(buf[0] == '?', "buf changed\n"); - - buf[0] = '?'; - hres = IInternetProtocolInfo_ParseUrl(protocol_info, NULL, PARSE_DOMAIN, 0, buf, - sizeof(buf)/sizeof(buf[0]), NULL, 0); - ok(hres == E_POINTER, "ParseUrl failed: %08x\n", hres); - ok(buf[0] == '?', "buf changed\n"); - } - - hres = IInternetProtocolInfo_ParseUrl(protocol_info, about_blank_url, PARSE_UNESCAPE+1, 0, buf, - sizeof(buf)/sizeof(buf[0]), &size, 0); - ok(hres == INET_E_DEFAULT_ACTION, - "ParseUrl failed: %08x, expected INET_E_DEFAULT_ACTION\n", hres); - - size = 0xdeadbeef; - hres = IInternetProtocolInfo_CombineUrl(protocol_info, about_blank_url, about_test_url, - 0, buf, sizeof(buf)/sizeof(buf[0]), &size, 0); - ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres); - ok(size == 0xdeadbeef, "size=%d\n", size); - - size = 0xdeadbeef; - hres = IInternetProtocolInfo_CombineUrl(protocol_info, about_blank_url, about_test_url, - URL_FILE_USE_PATHURL, buf, sizeof(buf)/sizeof(buf[0]), &size, 0); - ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres); - ok(size == 0xdeadbeef, "size=%d\n", size); - - size = 0xdeadbeef; - hres = IInternetProtocolInfo_CombineUrl(protocol_info, NULL, NULL, - URL_FILE_USE_PATHURL, buf, sizeof(buf)/sizeof(buf[0]), &size, 0); - ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres); - ok(size == 0xdeadbeef, "size=%d\n", size); - - hres = IInternetProtocolInfo_CompareUrl(protocol_info, about_blank_url, about_blank_url, 0); - ok(hres == E_NOTIMPL, "CompareUrl failed: %08x\n", hres); - - hres = IInternetProtocolInfo_CompareUrl(protocol_info, NULL, NULL, 0xdeadbeef); - ok(hres == E_NOTIMPL, "CompareUrl failed: %08x\n", hres); - - for(i=0; i<30; i++) { - switch(i) { - case QUERY_CAN_NAVIGATE: - case QUERY_USES_NETWORK: - case QUERY_IS_CACHED: - case QUERY_IS_INSTALLEDENTRY: - case QUERY_IS_CACHED_OR_MAPPED: - case QUERY_IS_SECURE: - case QUERY_IS_SAFE: - case QUERY_USES_HISTORYFOLDER: - break; - default: - hres = IInternetProtocolInfo_QueryInfo(protocol_info, about_blank_url, i, 0, - buf, sizeof(buf), &size, 0); - ok(hres == E_FAIL, "QueryInfo(%d) returned: %08x, expected E_FAIL\n", i, hres); - } - } - - hres = IInternetProtocolInfo_QueryInfo(protocol_info, about_blank_url, QUERY_CAN_NAVIGATE, 0, - buf, sizeof(buf), &size, 0); - ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER || - hres == E_FAIL, /* win2k */ - "QueryInfo returned: %08x, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER or E_FAIL\n", hres); - - size = 0xdeadbeef; - memset(buf, '?', sizeof(buf)); - hres = IInternetProtocolInfo_QueryInfo(protocol_info, about_blank_url, QUERY_USES_NETWORK, 0, - buf, sizeof(buf), &size, 0); - ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08x\n", hres); - ok(size == sizeof(DWORD), "size=%d\n", size); - ok(!*(DWORD*)buf, "buf=%d\n", *(DWORD*)buf); - - memset(buf, '?', sizeof(buf)); - hres = IInternetProtocolInfo_QueryInfo(protocol_info, about_blank_url, QUERY_USES_NETWORK, 0, - buf, sizeof(buf), NULL, 0); - ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08x\n", hres); - ok(!*(DWORD*)buf, "buf=%d\n", *(DWORD*)buf); - - hres = IInternetProtocolInfo_QueryInfo(protocol_info, about_blank_url, QUERY_USES_NETWORK, 0, - buf, 3, &size, 0); - ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08x, expected E_FAIL\n", hres); - - hres = IInternetProtocolInfo_QueryInfo(protocol_info, about_blank_url, QUERY_USES_NETWORK, 0, - NULL, sizeof(buf), &size, 0); - ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08x, expected E_FAIL\n", hres); - - hres = IInternetProtocolInfo_QueryInfo(protocol_info, about_blank_url, 60, 0, - NULL, sizeof(buf), &size, 0); - ok(hres == E_FAIL, "QueryInfo failed: %08x, expected E_FAIL\n", hres); - - IInternetProtocolInfo_Release(protocol_info); - } - - hres = IUnknown_QueryInterface(unk, &IID_IClassFactory, (void**)&factory); - ok(hres == S_OK, "Could not get IClassFactory interface\n"); - if(SUCCEEDED(hres)) { - do_test_about_protocol(factory, 0); - do_test_about_protocol(factory, - BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON | BINDF_NEEDFILE); - - IClassFactory_Release(factory); - } - - IUnknown_Release(unk); -} - -static void test_javascript_protocol(void) -{ - IInternetProtocolInfo *protocol_info; - IUnknown *unk; - IClassFactory *factory; - HRESULT hres; - - hres = CoGetClassObject(&CLSID_JSProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk); - ok(hres == S_OK, "CoGetClassObject failed: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (void**)&protocol_info); - ok(hres == S_OK, "Could not get IInternetProtocolInfo interface: %08x\n", hres); - if(SUCCEEDED(hres)) { - WCHAR buf[128]; - DWORD size; - int i; - - for(i = PARSE_CANONICALIZE; i <= PARSE_UNESCAPE; i++) { - if(i != PARSE_SECURITY_URL && i != PARSE_DOMAIN) { - hres = IInternetProtocolInfo_ParseUrl(protocol_info, javascript_test_url, i, 0, buf, - sizeof(buf)/sizeof(buf[0]), &size, 0); - ok(hres == INET_E_DEFAULT_ACTION, - "[%d] failed: %08x, expected INET_E_DEFAULT_ACTION\n", i, hres); - } - } - - hres = IInternetProtocolInfo_ParseUrl(protocol_info, javascript_test_url, PARSE_UNESCAPE+1, 0, buf, - sizeof(buf)/sizeof(buf[0]), &size, 0); - ok(hres == INET_E_DEFAULT_ACTION, - "ParseUrl failed: %08x, expected INET_E_DEFAULT_ACTION\n", hres); - - size = 0xdeadbeef; - hres = IInternetProtocolInfo_CombineUrl(protocol_info, javascript_test_url, javascript_test_url, - 0, buf, sizeof(buf)/sizeof(buf[0]), &size, 0); - ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, "CombineUrl failed: %08x\n", hres); - ok(size == 0xdeadbeef, "size=%d\n", size); - - hres = IInternetProtocolInfo_CompareUrl(protocol_info, javascript_test_url, javascript_test_url, 0); - ok(hres == E_NOTIMPL, "CompareUrl failed: %08x\n", hres); - - for(i=0; i<30; i++) { - switch(i) { - case QUERY_USES_NETWORK: - case QUERY_IS_SECURE: - break; - default: - hres = IInternetProtocolInfo_QueryInfo(protocol_info, javascript_test_url, i, 0, - buf, sizeof(buf), &size, 0); - ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, - "QueryInfo(%d) returned: %08x, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", i, hres); - } - } - - - memset(buf, '?', sizeof(buf)); - hres = IInternetProtocolInfo_QueryInfo(protocol_info, javascript_test_url, QUERY_USES_NETWORK, 0, - buf, sizeof(buf), &size, 0); - ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08x\n", hres); - ok(size == sizeof(DWORD), "size=%d\n", size); - ok(!*(DWORD*)buf, "buf=%d\n", *(DWORD*)buf); - - memset(buf, '?', sizeof(buf)); - hres = IInternetProtocolInfo_QueryInfo(protocol_info, javascript_test_url, QUERY_USES_NETWORK, 0, - buf, sizeof(buf), NULL, 0); - ok(hres == S_OK, "QueryInfo(QUERY_USES_NETWORK) failed: %08x\n", hres); - ok(!*(DWORD*)buf, "buf=%d\n", *(DWORD*)buf); - - hres = IInternetProtocolInfo_QueryInfo(protocol_info, javascript_test_url, QUERY_USES_NETWORK, 0, - buf, 3, &size, 0); - ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08x, expected E_FAIL\n", hres); - - hres = IInternetProtocolInfo_QueryInfo(protocol_info, javascript_test_url, QUERY_USES_NETWORK, 0, - NULL, sizeof(buf), &size, 0); - ok(hres == E_FAIL, "QueryInfo(QUERY_USES_NETWORK) failed: %08x, expected E_FAIL\n", hres); - - hres = IInternetProtocolInfo_QueryInfo(protocol_info, javascript_test_url, 60, 0, - NULL, sizeof(buf), &size, 0); - ok(hres == INET_E_USE_DEFAULT_PROTOCOLHANDLER, - "QueryInfo failed: %08x, expected INET_E_USE_DEFAULT_PROTOCOLHANDLER\n", hres); - - /* FIXME: test QUERY_IS_SECURE */ - - IInternetProtocolInfo_Release(protocol_info); - } - - hres = IUnknown_QueryInterface(unk, &IID_IClassFactory, (void**)&factory); - ok(hres == S_OK, "Could not get IClassFactory interface\n"); - if(SUCCEEDED(hres)) - IClassFactory_Release(factory); - - IUnknown_Release(unk); -} - -START_TEST(protocol) -{ - OleInitialize(NULL); - - test_res_protocol(); - test_about_protocol(); - test_javascript_protocol(); - - OleUninitialize(); -} diff --git a/rostests/winetests/mshtml/rsrc.rc b/rostests/winetests/mshtml/rsrc.rc deleted file mode 100644 index 70925ca8022..00000000000 --- a/rostests/winetests/mshtml/rsrc.rc +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2009 Jacek 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 - */ - -/* @makedep: jstest.html */ -jstest.html HTML "jstest.html" diff --git a/rostests/winetests/mshtml/script.c b/rostests/winetests/mshtml/script.c deleted file mode 100644 index 23f1ab861c7..00000000000 --- a/rostests/winetests/mshtml/script.c +++ /dev/null @@ -1,2445 +0,0 @@ -/* - * Copyright 2008-2009 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 - */ - -#define COBJMACROS -#define CONST_VTABLE - -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "ole2.h" -#include "wininet.h" -#include "docobj.h" -#include "dispex.h" -#include "hlink.h" -#include "mshtml.h" -#include "mshtmhst.h" -#include "initguid.h" -#include "activscp.h" -#include "activdbg.h" -#include "objsafe.h" -#include "mshtmdid.h" -#include "mshtml_test.h" - -DEFINE_GUID(CLSID_IdentityUnmarshal,0x0000001b,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); - -/* Defined as extern in urlmon.idl, but not exported by uuid.lib */ -const GUID GUID_CUSTOM_CONFIRMOBJECTSAFETY = - {0x10200490,0xfa38,0x11d0,{0xac,0x0e,0x00,0xa0,0xc9,0xf,0xff,0xc0}}; - -#ifdef _WIN64 - -#define CTXARG_T DWORDLONG -#define IActiveScriptParseVtbl IActiveScriptParse64Vtbl -#define IActiveScriptParseProcedure2Vtbl IActiveScriptParseProcedure2_64Vtbl - -#else - -#define CTXARG_T DWORD -#define IActiveScriptParseVtbl IActiveScriptParse32Vtbl -#define IActiveScriptParseProcedure2Vtbl IActiveScriptParseProcedure2_32Vtbl - -#endif - -#define DEFINE_EXPECT(func) \ - static BOOL expect_ ## func = FALSE, called_ ## func = FALSE - -#define SET_EXPECT(func) \ - do { called_ ## func = FALSE; expect_ ## func = TRUE; } while(0) - -#define CHECK_EXPECT2(func) \ - do { \ - ok(expect_ ##func, "unexpected call " #func "\n"); \ - called_ ## func = TRUE; \ - }while(0) - -#define CHECK_EXPECT(func) \ - do { \ - CHECK_EXPECT2(func); \ - expect_ ## func = FALSE; \ - }while(0) - -#define CHECK_CALLED(func) \ - do { \ - ok(called_ ## func, "expected " #func "\n"); \ - expect_ ## func = called_ ## func = FALSE; \ - }while(0) - -#define CHECK_CALLED_BROKEN(func) \ - do { \ - ok(called_ ## func || broken(!called_ ## func), "expected " #func "\n"); \ - expect_ ## func = called_ ## func = FALSE; \ - }while(0) - -#define CHECK_NOT_CALLED(func) \ - do { \ - ok(!called_ ## func, "unexpected " #func "\n"); \ - expect_ ## func = called_ ## func = FALSE; \ - }while(0) - -#define CLEAR_CALLED(func) \ - expect_ ## func = called_ ## func = FALSE - - -DEFINE_EXPECT(CreateInstance); -DEFINE_EXPECT(GetInterfaceSafetyOptions); -DEFINE_EXPECT(SetInterfaceSafetyOptions); -DEFINE_EXPECT(InitNew); -DEFINE_EXPECT(Close); -DEFINE_EXPECT(SetProperty_HACK_TRIDENTEVENTSINK); -DEFINE_EXPECT(SetProperty_INVOKEVERSIONING); -DEFINE_EXPECT(SetProperty_ABBREVIATE_GLOBALNAME_RESOLUTION); -DEFINE_EXPECT(SetScriptSite); -DEFINE_EXPECT(GetScriptState); -DEFINE_EXPECT(SetScriptState_STARTED); -DEFINE_EXPECT(SetScriptState_CONNECTED); -DEFINE_EXPECT(SetScriptState_DISCONNECTED); -DEFINE_EXPECT(AddNamedItem); -DEFINE_EXPECT(ParseScriptText); -DEFINE_EXPECT(GetScriptDispatch); -DEFINE_EXPECT(funcDisp); -DEFINE_EXPECT(script_divid_d); -DEFINE_EXPECT(script_testprop_d); -DEFINE_EXPECT(script_testprop_i); -DEFINE_EXPECT(script_testprop2_d); -DEFINE_EXPECT(AXQueryInterface_IActiveScript); -DEFINE_EXPECT(AXQueryInterface_IObjectSafety); -DEFINE_EXPECT(AXGetInterfaceSafetyOptions); -DEFINE_EXPECT(AXSetInterfaceSafetyOptions_IDispatch); -DEFINE_EXPECT(AXSetInterfaceSafetyOptions_IDispatchEx); -DEFINE_EXPECT(external_success); - -#define TESTSCRIPT_CLSID "{178fc163-f585-4e24-9c13-4bb7faf80746}" -#define TESTACTIVEX_CLSID "{178fc163-f585-4e24-9c13-4bb7faf80646}" - -#define DISPID_SCRIPT_TESTPROP 0x100000 -#define DISPID_SCRIPT_TESTPROP2 0x100001 - -#define DISPID_EXTERNAL_OK 0x300000 -#define DISPID_EXTERNAL_TRACE 0x300001 -#define DISPID_EXTERNAL_REPORTSUCCESS 0x300002 - -static const GUID CLSID_TestScript = - {0x178fc163,0xf585,0x4e24,{0x9c,0x13,0x4b,0xb7,0xfa,0xf8,0x07,0x46}}; -static const GUID CLSID_TestActiveX = - {0x178fc163,0xf585,0x4e24,{0x9c,0x13,0x4b,0xb7,0xfa,0xf8,0x06,0x46}}; - -static IHTMLDocument2 *notif_doc; -static IOleDocumentView *view; -static IDispatchEx *window_dispex; -static BOOL doc_complete; -static IDispatch *script_disp; -static BOOL ax_objsafe; -static HWND container_hwnd; -static HRESULT ax_getopt_hres = S_OK, ax_setopt_dispex_hres = S_OK, ax_setopt_disp_hres = S_OK; -static DWORD ax_setopt; - -static const char *debugstr_guid(REFIID riid) -{ - static char buf[50]; - - sprintf(buf, "{%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]); - - return buf; -} - -static int strcmp_wa(LPCWSTR strw, const char *stra) -{ - CHAR buf[512]; - WideCharToMultiByte(CP_ACP, 0, strw, -1, buf, sizeof(buf), NULL, NULL); - return lstrcmpA(stra, buf); -} - -static BSTR a2bstr(const char *str) -{ - BSTR ret; - int len; - - len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); - ret = SysAllocStringLen(NULL, len); - MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len); - - return ret; -} - -static BOOL init_key(const char *key_name, const char *def_value, BOOL init) -{ - HKEY hkey; - DWORD res; - - if(!init) { - RegDeleteKey(HKEY_CLASSES_ROOT, key_name); - return TRUE; - } - - res = RegCreateKeyA(HKEY_CLASSES_ROOT, key_name, &hkey); - if(res != ERROR_SUCCESS) - return FALSE; - - if(def_value) - res = RegSetValueA(hkey, NULL, REG_SZ, def_value, strlen(def_value)); - - RegCloseKey(hkey); - - return res == ERROR_SUCCESS; -} - -static HRESULT WINAPI PropertyNotifySink_QueryInterface(IPropertyNotifySink *iface, - REFIID riid, void**ppv) -{ - if(IsEqualGUID(&IID_IPropertyNotifySink, riid)) { - *ppv = iface; - return S_OK; - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI PropertyNotifySink_AddRef(IPropertyNotifySink *iface) -{ - return 2; -} - -static ULONG WINAPI PropertyNotifySink_Release(IPropertyNotifySink *iface) -{ - return 1; -} - -static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, DISPID dispID) -{ - if(dispID == DISPID_READYSTATE){ - BSTR state; - HRESULT hres; - - static const WCHAR completeW[] = {'c','o','m','p','l','e','t','e',0}; - - hres = IHTMLDocument2_get_readyState(notif_doc, &state); - ok(hres == S_OK, "get_readyState failed: %08x\n", hres); - - if(!lstrcmpW(state, completeW)) - doc_complete = TRUE; - - SysFreeString(state); - } - - return S_OK; -} - -static HRESULT WINAPI PropertyNotifySink_OnRequestEdit(IPropertyNotifySink *iface, DISPID dispID) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static IPropertyNotifySinkVtbl PropertyNotifySinkVtbl = { - PropertyNotifySink_QueryInterface, - PropertyNotifySink_AddRef, - PropertyNotifySink_Release, - PropertyNotifySink_OnChanged, - PropertyNotifySink_OnRequestEdit -}; - -static IPropertyNotifySink PropertyNotifySink = { &PropertyNotifySinkVtbl }; - -static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv) -{ - *ppv = NULL; - - if(IsEqualGUID(riid, &IID_IUnknown) - || IsEqualGUID(riid, &IID_IDispatch) - || IsEqualGUID(riid, &IID_IDispatchEx)) - *ppv = iface; - else - return E_NOINTERFACE; - - return S_OK; -} - -static ULONG WINAPI DispatchEx_AddRef(IDispatchEx *iface) -{ - return 2; -} - -static ULONG WINAPI DispatchEx_Release(IDispatchEx *iface) -{ - return 1; -} - -static HRESULT WINAPI DispatchEx_GetTypeInfoCount(IDispatchEx *iface, UINT *pctinfo) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, - LCID lcid, ITypeInfo **ppTInfo) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetIDsOfNames(IDispatchEx *iface, REFIID riid, - LPOLESTR *rgszNames, UINT cNames, - LCID lcid, DISPID *rgDispId) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember, - REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, - VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex) -{ - ok(0, "unexpected call %s %x\n", wine_dbgstr_w(bstrName), grfdex); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID id) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetMemberName(IDispatchEx *iface, DISPID id, BSTR *pbstrName) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetNextDispID(IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetNameSpaceParent(IDispatchEx *iface, IUnknown **ppunk) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI funcDisp_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, - VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) -{ - CHECK_EXPECT(funcDisp); - - ok(id == DISPID_VALUE, "id = %d\n", id); - ok(lcid == 0, "lcid = %x\n", lcid); - ok(wFlags == DISPATCH_METHOD, "wFlags = %x\n", wFlags); - ok(pdp != NULL, "pdp == NULL\n"); - ok(pdp->cArgs == 2, "pdp->cArgs = %d\n", pdp->cArgs); - ok(pdp->cNamedArgs == 1, "pdp->cNamedArgs = %d\n", pdp->cNamedArgs); - ok(pdp->rgdispidNamedArgs[0] == DISPID_THIS, "pdp->rgdispidNamedArgs[0] = %d\n", pdp->rgdispidNamedArgs[0]); - ok(V_VT(pdp->rgvarg) == VT_DISPATCH, "V_VT(rgvarg) = %d\n", V_VT(pdp->rgvarg)); - ok(V_VT(pdp->rgvarg+1) == VT_BOOL, "V_VT(rgvarg[1]) = %d\n", V_VT(pdp->rgvarg)); - ok(V_BOOL(pdp->rgvarg+1) == VARIANT_TRUE, "V_BOOL(rgvarg[1]) = %x\n", V_BOOL(pdp->rgvarg)); - ok(pvarRes != NULL, "pvarRes == NULL\n"); - ok(pei != NULL, "pei == NULL\n"); - ok(!pspCaller, "pspCaller != NULL\n"); - - V_VT(pvarRes) = VT_I4; - V_I4(pvarRes) = 100; - return S_OK; -} - -static IDispatchExVtbl testObjVtbl = { - DispatchEx_QueryInterface, - DispatchEx_AddRef, - DispatchEx_Release, - DispatchEx_GetTypeInfoCount, - DispatchEx_GetTypeInfo, - DispatchEx_GetIDsOfNames, - DispatchEx_Invoke, - DispatchEx_GetDispID, - funcDisp_InvokeEx, - DispatchEx_DeleteMemberByName, - DispatchEx_DeleteMemberByDispID, - DispatchEx_GetMemberProperties, - DispatchEx_GetMemberName, - DispatchEx_GetNextDispID, - DispatchEx_GetNameSpaceParent -}; - -static IDispatchEx funcDisp = { &testObjVtbl }; - -static HRESULT WINAPI scriptDisp_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid) -{ - if(!strcmp_wa(bstrName, "testProp")) { - CHECK_EXPECT(script_testprop_d); - ok(grfdex == fdexNameCaseSensitive, "grfdex = %x\n", grfdex); - *pid = DISPID_SCRIPT_TESTPROP; - return S_OK; - } - - if(!strcmp_wa(bstrName, "testProp2")) { - CHECK_EXPECT(script_testprop2_d); - ok(grfdex == fdexNameCaseSensitive, "grfdex = %x\n", grfdex); - *pid = DISPID_SCRIPT_TESTPROP2; - return S_OK; - } - - if(!strcmp_wa(bstrName, "divid")) { - CHECK_EXPECT(script_divid_d); - ok(grfdex == fdexNameCaseSensitive, "grfdex = %x\n", grfdex); - return E_FAIL; - } - - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI scriptDisp_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, - VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) -{ - switch(id) { - case DISPID_SCRIPT_TESTPROP: - CHECK_EXPECT(script_testprop_i); - - ok(lcid == 0, "lcid = %x\n", lcid); - ok(wFlags == DISPATCH_PROPERTYGET, "wFlags = %x\n", wFlags); - ok(pdp != NULL, "pdp == NULL\n"); - ok(pdp->cArgs == 0, "pdp->cArgs = %d\n", pdp->cArgs); - ok(pdp->cNamedArgs == 0, "pdp->cNamedArgs = %d\n", pdp->cNamedArgs); - ok(!pdp->rgdispidNamedArgs, "pdp->rgdispidNamedArgs != NULL\n"); - ok(!pdp->rgvarg, "rgvarg != NULL\n"); - ok(pvarRes != NULL, "pvarRes == NULL\n"); - ok(pei != NULL, "pei == NULL\n"); - ok(!pspCaller, "pspCaller != NULL\n"); - - V_VT(pvarRes) = VT_NULL; - break; - default: - ok(0, "unexpected call\n"); - return E_NOTIMPL; - } - - return S_OK; -} - -static IDispatchExVtbl scriptDispVtbl = { - DispatchEx_QueryInterface, - DispatchEx_AddRef, - DispatchEx_Release, - DispatchEx_GetTypeInfoCount, - DispatchEx_GetTypeInfo, - DispatchEx_GetIDsOfNames, - DispatchEx_Invoke, - scriptDisp_GetDispID, - scriptDisp_InvokeEx, - DispatchEx_DeleteMemberByName, - DispatchEx_DeleteMemberByDispID, - DispatchEx_GetMemberProperties, - DispatchEx_GetMemberName, - DispatchEx_GetNextDispID, - DispatchEx_GetNameSpaceParent -}; - -static IDispatchEx scriptDisp = { &scriptDispVtbl }; - -static HRESULT WINAPI externalDisp_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid) -{ - if(!strcmp_wa(bstrName, "ok")) { - *pid = DISPID_EXTERNAL_OK; - return S_OK; - } - if(!strcmp_wa(bstrName, "trace")) { - *pid = DISPID_EXTERNAL_TRACE; - return S_OK; - } - if(!strcmp_wa(bstrName, "reportSuccess")) { - *pid = DISPID_EXTERNAL_REPORTSUCCESS; - return S_OK; - } - - ok(0, "unexpected name %s\n", wine_dbgstr_w(bstrName)); - return DISP_E_UNKNOWNNAME; -} - -static HRESULT WINAPI externalDisp_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, - VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) -{ - switch(id) { - case DISPID_EXTERNAL_OK: - ok(wFlags == INVOKE_FUNC || wFlags == (INVOKE_FUNC|INVOKE_PROPERTYGET), "wFlags = %x\n", wFlags); - ok(pdp != NULL, "pdp == NULL\n"); - ok(pdp->rgvarg != NULL, "rgvarg == NULL\n"); - ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n"); - ok(pdp->cArgs == 2, "cArgs = %d\n", pdp->cArgs); - ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs); - ok(pei != NULL, "pei == NULL\n"); - - ok(V_VT(pdp->rgvarg) == VT_BSTR, "V_VT(psp->rgvargs) = %d\n", V_VT(pdp->rgvarg)); - ok(V_VT(pdp->rgvarg+1) == VT_BOOL, "V_VT(psp->rgvargs+1) = %d\n", V_VT(pdp->rgvarg)); - ok(V_BOOL(pdp->rgvarg+1), "%s\n", wine_dbgstr_w(V_BSTR(pdp->rgvarg))); - - return S_OK; - - case DISPID_EXTERNAL_TRACE: - ok(wFlags == INVOKE_FUNC, "wFlags = %x\n", wFlags); - ok(pdp != NULL, "pdp == NULL\n"); - ok(pdp->rgvarg != NULL, "rgvarg == NULL\n"); - ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n"); - ok(pdp->cArgs == 1, "cArgs = %d\n", pdp->cArgs); - ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs); - ok(!pvarRes, "pvarRes != NULL\n"); - ok(pei != NULL, "pei == NULL\n"); - - ok(V_VT(pdp->rgvarg) == VT_BSTR, "V_VT(psp->rgvargs) = %d\n", V_VT(pdp->rgvarg)); - if(V_VT(pdp->rgvarg) == VT_BSTR) - trace("%s\n", wine_dbgstr_w(V_BSTR(pdp->rgvarg))); - - return S_OK; - - case DISPID_EXTERNAL_REPORTSUCCESS: - CHECK_EXPECT(external_success); - - ok(wFlags == INVOKE_FUNC, "wFlags = %x\n", wFlags); - ok(pdp != NULL, "pdp == NULL\n"); - ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n"); - ok(pdp->cArgs == 0, "cArgs = %d\n", pdp->cArgs); - ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs); - ok(!pvarRes, "pvarRes != NULL\n"); - ok(pei != NULL, "pei == NULL\n"); - - return S_OK; - - default: - ok(0, "unexpected call\n"); - return E_NOTIMPL; - } - - return S_OK; -} - -static IDispatchExVtbl externalDispVtbl = { - DispatchEx_QueryInterface, - DispatchEx_AddRef, - DispatchEx_Release, - DispatchEx_GetTypeInfoCount, - DispatchEx_GetTypeInfo, - DispatchEx_GetIDsOfNames, - DispatchEx_Invoke, - externalDisp_GetDispID, - externalDisp_InvokeEx, - DispatchEx_DeleteMemberByName, - DispatchEx_DeleteMemberByDispID, - DispatchEx_GetMemberProperties, - DispatchEx_GetMemberName, - DispatchEx_GetNextDispID, - DispatchEx_GetNameSpaceParent -}; - -static IDispatchEx externalDisp = { &externalDispVtbl }; - -static HRESULT QueryInterface(REFIID,void**); - -static HRESULT WINAPI DocHostUIHandler_QueryInterface(IDocHostUIHandler2 *iface, REFIID riid, void **ppv) -{ - return QueryInterface(riid, ppv); -} - -static ULONG WINAPI DocHostUIHandler_AddRef(IDocHostUIHandler2 *iface) -{ - return 2; -} - -static ULONG WINAPI DocHostUIHandler_Release(IDocHostUIHandler2 *iface) -{ - return 1; -} - -static HRESULT WINAPI DocHostUIHandler_ShowContextMenu(IDocHostUIHandler2 *iface, DWORD dwID, POINT *ppt, - IUnknown *pcmdtReserved, IDispatch *pdicpReserved) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_GetHostInfo(IDocHostUIHandler2 *iface, DOCHOSTUIINFO *pInfo) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_ShowUI(IDocHostUIHandler2 *iface, DWORD dwID, - IOleInPlaceActiveObject *pActiveObject, IOleCommandTarget *pCommandTarget, - IOleInPlaceFrame *pFrame, IOleInPlaceUIWindow *pDoc) -{ - return S_OK; -} - -static HRESULT WINAPI DocHostUIHandler_HideUI(IDocHostUIHandler2 *iface) -{ - return S_OK; -} - -static HRESULT WINAPI DocHostUIHandler_UpdateUI(IDocHostUIHandler2 *iface) -{ - return S_OK; -} - -static HRESULT WINAPI DocHostUIHandler_EnableModeless(IDocHostUIHandler2 *iface, BOOL fEnable) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_OnDocWindowActivate(IDocHostUIHandler2 *iface, BOOL fActivate) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_OnFrameWindowActivate(IDocHostUIHandler2 *iface, BOOL fActivate) -{ - return S_OK; -} - -static HRESULT WINAPI DocHostUIHandler_ResizeBorder(IDocHostUIHandler2 *iface, LPCRECT prcBorder, - IOleInPlaceUIWindow *pUIWindow, BOOL fRameWindow) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_TranslateAccelerator(IDocHostUIHandler2 *iface, LPMSG lpMsg, - const GUID *pguidCmdGroup, DWORD nCmdID) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_GetOptionKeyPath(IDocHostUIHandler2 *iface, - LPOLESTR *pchKey, DWORD dw) -{ - return S_OK; -} - -static HRESULT WINAPI DocHostUIHandler_GetDropTarget(IDocHostUIHandler2 *iface, - IDropTarget *pDropTarget, IDropTarget **ppDropTarget) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_GetExternal(IDocHostUIHandler2 *iface, IDispatch **ppDispatch) -{ - *ppDispatch = (IDispatch*)&externalDisp; - return S_OK; -} - -static HRESULT WINAPI DocHostUIHandler_TranslateUrl(IDocHostUIHandler2 *iface, DWORD dwTranslate, - OLECHAR *pchURLIn, OLECHAR **ppchURLOut) -{ - return S_FALSE; -} - -static HRESULT WINAPI DocHostUIHandler_FilterDataObject(IDocHostUIHandler2 *iface, IDataObject *pDO, - IDataObject **ppPORet) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_GetOverrideKeyPath(IDocHostUIHandler2 *iface, - LPOLESTR *pchKey, DWORD dw) -{ - return E_NOTIMPL; -} - -static const IDocHostUIHandler2Vtbl DocHostUIHandlerVtbl = { - DocHostUIHandler_QueryInterface, - DocHostUIHandler_AddRef, - DocHostUIHandler_Release, - DocHostUIHandler_ShowContextMenu, - DocHostUIHandler_GetHostInfo, - DocHostUIHandler_ShowUI, - DocHostUIHandler_HideUI, - DocHostUIHandler_UpdateUI, - DocHostUIHandler_EnableModeless, - DocHostUIHandler_OnDocWindowActivate, - DocHostUIHandler_OnFrameWindowActivate, - DocHostUIHandler_ResizeBorder, - DocHostUIHandler_TranslateAccelerator, - DocHostUIHandler_GetOptionKeyPath, - DocHostUIHandler_GetDropTarget, - DocHostUIHandler_GetExternal, - DocHostUIHandler_TranslateUrl, - DocHostUIHandler_FilterDataObject, - DocHostUIHandler_GetOverrideKeyPath -}; - -static IDocHostUIHandler2 DocHostUIHandler = { &DocHostUIHandlerVtbl }; - -static HRESULT WINAPI InPlaceFrame_QueryInterface(IOleInPlaceFrame *iface, REFIID riid, void **ppv) -{ - return E_NOINTERFACE; -} - -static ULONG WINAPI InPlaceFrame_AddRef(IOleInPlaceFrame *iface) -{ - return 2; -} - -static ULONG WINAPI InPlaceFrame_Release(IOleInPlaceFrame *iface) -{ - return 1; -} - -static HRESULT WINAPI InPlaceFrame_GetWindow(IOleInPlaceFrame *iface, HWND *phwnd) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_ContextSensitiveHelp(IOleInPlaceFrame *iface, BOOL fEnterMode) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_GetBorder(IOleInPlaceFrame *iface, LPRECT lprectBorder) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_RequestBorderSpace(IOleInPlaceFrame *iface, - LPCBORDERWIDTHS pborderwidths) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_SetBorderSpace(IOleInPlaceFrame *iface, - LPCBORDERWIDTHS pborderwidths) -{ - return S_OK; -} - -static HRESULT WINAPI InPlaceFrame_SetActiveObject(IOleInPlaceFrame *iface, - IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName) -{ - return S_OK; -} - -static HRESULT WINAPI InPlaceFrame_InsertMenus(IOleInPlaceFrame *iface, HMENU hmenuShared, - LPOLEMENUGROUPWIDTHS lpMenuWidths) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_SetMenu(IOleInPlaceFrame *iface, HMENU hmenuShared, - HOLEMENU holemenu, HWND hwndActiveObject) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_RemoveMenus(IOleInPlaceFrame *iface, HMENU hmenuShared) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_SetStatusText(IOleInPlaceFrame *iface, LPCOLESTR pszStatusText) -{ - return S_OK; -} - -static HRESULT WINAPI InPlaceFrame_EnableModeless(IOleInPlaceFrame *iface, BOOL fEnable) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_TranslateAccelerator(IOleInPlaceFrame *iface, LPMSG lpmsg, WORD wID) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static const IOleInPlaceFrameVtbl InPlaceFrameVtbl = { - InPlaceFrame_QueryInterface, - InPlaceFrame_AddRef, - InPlaceFrame_Release, - InPlaceFrame_GetWindow, - InPlaceFrame_ContextSensitiveHelp, - InPlaceFrame_GetBorder, - InPlaceFrame_RequestBorderSpace, - InPlaceFrame_SetBorderSpace, - InPlaceFrame_SetActiveObject, - InPlaceFrame_InsertMenus, - InPlaceFrame_SetMenu, - InPlaceFrame_RemoveMenus, - InPlaceFrame_SetStatusText, - InPlaceFrame_EnableModeless, - InPlaceFrame_TranslateAccelerator -}; - -static IOleInPlaceFrame InPlaceFrame = { &InPlaceFrameVtbl }; - -static HRESULT WINAPI InPlaceSite_QueryInterface(IOleInPlaceSite *iface, REFIID riid, void **ppv) -{ - return QueryInterface(riid, ppv); -} - -static ULONG WINAPI InPlaceSite_AddRef(IOleInPlaceSite *iface) -{ - return 2; -} - -static ULONG WINAPI InPlaceSite_Release(IOleInPlaceSite *iface) -{ - return 1; -} - -static HRESULT WINAPI InPlaceSite_GetWindow(IOleInPlaceSite *iface, HWND *phwnd) -{ - *phwnd = container_hwnd; - return S_OK; -} - -static HRESULT WINAPI InPlaceSite_ContextSensitiveHelp(IOleInPlaceSite *iface, BOOL fEnterMode) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSite_CanInPlaceActivate(IOleInPlaceSite *iface) -{ - return S_OK; -} - -static HRESULT WINAPI InPlaceSite_OnInPlaceActivate(IOleInPlaceSite *iface) -{ - return S_OK; -} - -static HRESULT WINAPI InPlaceSite_OnUIActivate(IOleInPlaceSite *iface) -{ - return S_OK; -} - -static HRESULT WINAPI InPlaceSite_GetWindowContext(IOleInPlaceSite *iface, - IOleInPlaceFrame **ppFrame, IOleInPlaceUIWindow **ppDoc, LPRECT lprcPosRect, - LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo) -{ - static const RECT rect = {0,0,300,300}; - - *ppFrame = &InPlaceFrame; - *ppDoc = (IOleInPlaceUIWindow*)&InPlaceFrame; - *lprcPosRect = rect; - *lprcClipRect = rect; - - lpFrameInfo->cb = sizeof(*lpFrameInfo); - lpFrameInfo->fMDIApp = FALSE; - lpFrameInfo->hwndFrame = container_hwnd; - lpFrameInfo->haccel = NULL; - lpFrameInfo->cAccelEntries = 0; - - return S_OK; -} - -static HRESULT WINAPI InPlaceSite_Scroll(IOleInPlaceSite *iface, SIZE scrollExtant) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSite_OnUIDeactivate(IOleInPlaceSite *iface, BOOL fUndoable) -{ - return S_OK; -} - -static HRESULT WINAPI InPlaceSite_OnInPlaceDeactivate(IOleInPlaceSite *iface) -{ - return S_OK; -} - -static HRESULT WINAPI InPlaceSite_DiscardUndoState(IOleInPlaceSite *iface) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSite_DeactivateAndUndo(IOleInPlaceSite *iface) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSite_OnPosRectChange(IOleInPlaceSite *iface, LPCRECT lprcPosRect) -{ - return E_NOTIMPL; -} - -static const IOleInPlaceSiteVtbl InPlaceSiteVtbl = { - InPlaceSite_QueryInterface, - InPlaceSite_AddRef, - InPlaceSite_Release, - InPlaceSite_GetWindow, - InPlaceSite_ContextSensitiveHelp, - InPlaceSite_CanInPlaceActivate, - InPlaceSite_OnInPlaceActivate, - InPlaceSite_OnUIActivate, - InPlaceSite_GetWindowContext, - InPlaceSite_Scroll, - InPlaceSite_OnUIDeactivate, - InPlaceSite_OnInPlaceDeactivate, - InPlaceSite_DiscardUndoState, - InPlaceSite_DeactivateAndUndo, - InPlaceSite_OnPosRectChange, -}; - -static IOleInPlaceSite InPlaceSite = { &InPlaceSiteVtbl }; - -static HRESULT WINAPI ClientSite_QueryInterface(IOleClientSite *iface, REFIID riid, void **ppv) -{ - return QueryInterface(riid, ppv); -} - -static ULONG WINAPI ClientSite_AddRef(IOleClientSite *iface) -{ - return 2; -} - -static ULONG WINAPI ClientSite_Release(IOleClientSite *iface) -{ - return 1; -} - -static HRESULT WINAPI ClientSite_SaveObject(IOleClientSite *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ClientSite_GetMoniker(IOleClientSite *iface, DWORD dwAssign, DWORD dwWhichMoniker, - IMoniker **ppmon) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ClientSite_GetContainer(IOleClientSite *iface, IOleContainer **ppContainer) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI ClientSite_ShowObject(IOleClientSite *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ClientSite_OnShowWindow(IOleClientSite *iface, BOOL fShow) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ClientSite_RequestNewObjectLayout(IOleClientSite *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static const IOleClientSiteVtbl ClientSiteVtbl = { - ClientSite_QueryInterface, - ClientSite_AddRef, - ClientSite_Release, - ClientSite_SaveObject, - ClientSite_GetMoniker, - ClientSite_GetContainer, - ClientSite_ShowObject, - ClientSite_OnShowWindow, - ClientSite_RequestNewObjectLayout -}; - -static IOleClientSite ClientSite = { &ClientSiteVtbl }; - -static HRESULT WINAPI DocumentSite_QueryInterface(IOleDocumentSite *iface, REFIID riid, void **ppv) -{ - return QueryInterface(riid, ppv); -} - -static ULONG WINAPI DocumentSite_AddRef(IOleDocumentSite *iface) -{ - return 2; -} - -static ULONG WINAPI DocumentSite_Release(IOleDocumentSite *iface) -{ - return 1; -} - -static HRESULT WINAPI DocumentSite_ActivateMe(IOleDocumentSite *iface, IOleDocumentView *pViewToActivate) -{ - RECT rect = {0,0,300,300}; - IOleDocument *document; - HRESULT hres; - - hres = IOleDocumentView_QueryInterface(pViewToActivate, &IID_IOleDocument, (void**)&document); - ok(hres == S_OK, "could not get IOleDocument: %08x\n", hres); - - hres = IOleDocument_CreateView(document, &InPlaceSite, NULL, 0, &view); - IOleDocument_Release(document); - ok(hres == S_OK, "CreateView failed: %08x\n", hres); - - hres = IOleDocumentView_SetInPlaceSite(view, &InPlaceSite); - ok(hres == S_OK, "SetInPlaceSite failed: %08x\n", hres); - - hres = IOleDocumentView_UIActivate(view, TRUE); - ok(hres == S_OK, "UIActivate failed: %08x\n", hres); - - hres = IOleDocumentView_SetRect(view, &rect); - ok(hres == S_OK, "SetRect failed: %08x\n", hres); - - hres = IOleDocumentView_Show(view, TRUE); - ok(hres == S_OK, "Show failed: %08x\n", hres); - - return S_OK; -} - -static const IOleDocumentSiteVtbl DocumentSiteVtbl = { - DocumentSite_QueryInterface, - DocumentSite_AddRef, - DocumentSite_Release, - DocumentSite_ActivateMe -}; - -static IOleDocumentSite DocumentSite = { &DocumentSiteVtbl }; - -static HRESULT QueryInterface(REFIID riid, void **ppv) -{ - *ppv = NULL; - - if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IOleClientSite, riid)) - *ppv = &ClientSite; - else if(IsEqualGUID(&IID_IOleDocumentSite, riid)) - *ppv = &DocumentSite; - else if(IsEqualGUID(&IID_IOleWindow, riid) || IsEqualGUID(&IID_IOleInPlaceSite, riid)) - *ppv = &InPlaceSite; - else if(IsEqualGUID(&IID_IDocHostUIHandler, riid) || IsEqualGUID(&IID_IDocHostUIHandler2, riid)) - *ppv = &DocHostUIHandler; - - return *ppv ? S_OK : E_NOINTERFACE; -} - -static IHTMLDocument2 *create_document(void) -{ - IHTMLDocument2 *doc; - IHTMLDocument5 *doc5; - HRESULT hres; - - hres = CoCreateInstance(&CLSID_HTMLDocument, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, - &IID_IHTMLDocument2, (void**)&doc); - ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres); - if (hres != S_OK) return NULL; - - hres = IHTMLDocument2_QueryInterface(doc, &IID_IHTMLDocument5, (void**)&doc5); - if(FAILED(hres)) { - win_skip("Could not get IHTMLDocument5, probably too old IE\n"); - IHTMLDocument2_Release(doc); - return NULL; - } - - IHTMLDocument5_Release(doc5); - return doc; -} - -static void load_string(IHTMLDocument2 *doc, const char *str) -{ - IPersistStreamInit *init; - IStream *stream; - HGLOBAL mem; - SIZE_T len; - - doc_complete = FALSE; - len = strlen(str); - mem = GlobalAlloc(0, len); - memcpy(mem, str, len); - CreateStreamOnHGlobal(mem, TRUE, &stream); - - IHTMLDocument2_QueryInterface(doc, &IID_IPersistStreamInit, (void**)&init); - - IPersistStreamInit_Load(init, stream); - IPersistStreamInit_Release(init); - IStream_Release(stream); -} - -static void do_advise(IHTMLDocument2 *doc, REFIID riid, IUnknown *unk_advise) -{ - IConnectionPointContainer *container; - IConnectionPoint *cp; - DWORD cookie; - HRESULT hres; - - hres = IHTMLDocument2_QueryInterface(doc, &IID_IConnectionPointContainer, (void**)&container); - ok(hres == S_OK, "QueryInterface(IID_IConnectionPointContainer) failed: %08x\n", hres); - - hres = IConnectionPointContainer_FindConnectionPoint(container, riid, &cp); - IConnectionPointContainer_Release(container); - ok(hres == S_OK, "FindConnectionPoint failed: %08x\n", hres); - - notif_doc = doc; - - hres = IConnectionPoint_Advise(cp, unk_advise, &cookie); - IConnectionPoint_Release(cp); - ok(hres == S_OK, "Advise failed: %08x\n", hres); -} - -static void set_client_site(IHTMLDocument2 *doc, BOOL set) -{ - IOleObject *oleobj; - HRESULT hres; - - if(!set && view) { - IOleDocumentView_Show(view, FALSE); - IOleDocumentView_CloseView(view, 0); - IOleDocumentView_SetInPlaceSite(view, NULL); - IOleDocumentView_Release(view); - view = NULL; - } - - hres = IHTMLDocument2_QueryInterface(doc, &IID_IOleObject, (void**)&oleobj); - ok(hres == S_OK, "Could not et IOleObject: %08x\n", hres); - - hres = IOleObject_SetClientSite(oleobj, set ? &ClientSite : NULL); - ok(hres == S_OK, "SetClientSite failed: %08x\n", hres); - - if(set) { - IHlinkTarget *hlink; - - hres = IOleObject_QueryInterface(oleobj, &IID_IHlinkTarget, (void**)&hlink); - ok(hres == S_OK, "Could not get IHlinkTarget iface: %08x\n", hres); - - hres = IHlinkTarget_Navigate(hlink, 0, NULL); - ok(hres == S_OK, "Navgate failed: %08x\n", hres); - - IHlinkTarget_Release(hlink); - } - - IOleObject_Release(oleobj); -} - -typedef void (*domtest_t)(IHTMLDocument2*); - -static void load_doc(IHTMLDocument2 *doc, const char *str) -{ - IHTMLElement *body = NULL; - MSG msg; - HRESULT hres; - static const WCHAR ucPtr[] = {'b','a','c','k','g','r','o','u','n','d',0}; - DISPID dispID = -1; - OLECHAR *name; - - load_string(doc, str); - do_advise(doc, &IID_IPropertyNotifySink, (IUnknown*)&PropertyNotifySink); - - while(!doc_complete && GetMessage(&msg, NULL, 0, 0)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - hres = IHTMLDocument2_get_body(doc, &body); - ok(hres == S_OK, "get_body failed: %08x\n", hres); - - /* Check we can query for function on the IHTMLElementBody interface */ - name = (WCHAR*)ucPtr; - hres = IHTMLElement_GetIDsOfNames(body, &IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &dispID); - ok(hres == S_OK, "GetIDsOfNames(background) failed %08x\n", hres); - ok(dispID == DISPID_IHTMLBODYELEMENT_BACKGROUND, "Incorrect dispID got (%d)\n", dispID); - - IHTMLElement_Release(body); -} - -static IActiveScriptSite *site; -static SCRIPTSTATE state; - -static HRESULT WINAPI ObjectSafety_QueryInterface(IObjectSafety *iface, REFIID riid, void **ppv) -{ - *ppv = NULL; - ok(0, "unexpected call %s\n", debugstr_guid(riid)); - return E_NOINTERFACE; -} - -static ULONG WINAPI ObjectSafety_AddRef(IObjectSafety *iface) -{ - return 2; -} - -static ULONG WINAPI ObjectSafety_Release(IObjectSafety *iface) -{ - return 1; -} - -static HRESULT WINAPI ObjectSafety_GetInterfaceSafetyOptions(IObjectSafety *iface, REFIID riid, - DWORD *pdwSupportedOptions, DWORD *pdwEnabledOptions) -{ - CHECK_EXPECT(GetInterfaceSafetyOptions); - - ok(IsEqualGUID(&IID_IActiveScriptParse, riid), "unexpected riid %s\n", debugstr_guid(riid)); - ok(pdwSupportedOptions != NULL, "pdwSupportedOptions == NULL\n"); - ok(pdwEnabledOptions != NULL, "pdwEnabledOptions == NULL\n"); - - *pdwSupportedOptions = INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER; - *pdwEnabledOptions = INTERFACE_USES_DISPEX; - - return S_OK; -} - -static HRESULT WINAPI ObjectSafety_SetInterfaceSafetyOptions(IObjectSafety *iface, REFIID riid, - DWORD dwOptionSetMask, DWORD dwEnabledOptions) -{ - CHECK_EXPECT(SetInterfaceSafetyOptions); - - ok(IsEqualGUID(&IID_IActiveScriptParse, riid), "unexpected riid %s\n", debugstr_guid(riid)); - - ok(dwOptionSetMask == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER), - "dwOptionSetMask=%x\n", dwOptionSetMask); - ok(dwEnabledOptions == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER), - "dwEnabledOptions=%x\n", dwOptionSetMask); - - return S_OK; -} - -static const IObjectSafetyVtbl ObjectSafetyVtbl = { - ObjectSafety_QueryInterface, - ObjectSafety_AddRef, - ObjectSafety_Release, - ObjectSafety_GetInterfaceSafetyOptions, - ObjectSafety_SetInterfaceSafetyOptions -}; - -static IObjectSafety ObjectSafety = { &ObjectSafetyVtbl }; - -static HRESULT WINAPI AXObjectSafety_QueryInterface(IObjectSafety *iface, REFIID riid, void **ppv) -{ - *ppv = NULL; - - if(IsEqualGUID(&IID_IActiveScript, riid)) { - CHECK_EXPECT(AXQueryInterface_IActiveScript); - return E_NOINTERFACE; - } - - if(IsEqualGUID(&IID_IObjectSafety, riid)) { - CHECK_EXPECT(AXQueryInterface_IObjectSafety); - if(!ax_objsafe) - return E_NOINTERFACE; - *ppv = iface; - return S_OK; - } - - ok(0, "unexpected call %s\n", debugstr_guid(riid)); - return E_NOINTERFACE; -} - -static HRESULT WINAPI AXObjectSafety_GetInterfaceSafetyOptions(IObjectSafety *iface, REFIID riid, - DWORD *pdwSupportedOptions, DWORD *pdwEnabledOptions) -{ - CHECK_EXPECT(AXGetInterfaceSafetyOptions); - - ok(IsEqualGUID(&IID_IDispatchEx, riid), "unexpected riid %s\n", debugstr_guid(riid)); - ok(pdwSupportedOptions != NULL, "pdwSupportedOptions == NULL\n"); - ok(pdwEnabledOptions != NULL, "pdwEnabledOptions == NULL\n"); - - if(SUCCEEDED(ax_getopt_hres)) { - *pdwSupportedOptions = INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER; - *pdwEnabledOptions = INTERFACE_USES_DISPEX; - } - - return ax_getopt_hres; -} - -static HRESULT WINAPI AXObjectSafety_SetInterfaceSafetyOptions(IObjectSafety *iface, REFIID riid, - DWORD dwOptionSetMask, DWORD dwEnabledOptions) -{ - if(IsEqualGUID(&IID_IDispatchEx, riid)) { - CHECK_EXPECT(AXSetInterfaceSafetyOptions_IDispatchEx); - ok(dwOptionSetMask == ax_setopt, "dwOptionSetMask=%x, expected %x\n", dwOptionSetMask, ax_setopt); - ok(dwEnabledOptions == ax_setopt, "dwEnabledOptions=%x, expected %x\n", dwOptionSetMask, ax_setopt); - return ax_setopt_dispex_hres; - } - - if(IsEqualGUID(&IID_IDispatch, riid)) { - DWORD exopt = ax_setopt & ~INTERFACE_USES_SECURITY_MANAGER; - - CHECK_EXPECT(AXSetInterfaceSafetyOptions_IDispatch); - ok(dwOptionSetMask == exopt, "dwOptionSetMask=%x, expected %x\n", dwOptionSetMask, exopt); - ok(dwEnabledOptions == exopt, "dwEnabledOptions=%x, expected %x\n", dwOptionSetMask, exopt); - return ax_setopt_disp_hres; - } - - ok(0, "unexpected riid %s\n", debugstr_guid(riid)); - return E_NOINTERFACE; -} - -static const IObjectSafetyVtbl AXObjectSafetyVtbl = { - AXObjectSafety_QueryInterface, - ObjectSafety_AddRef, - ObjectSafety_Release, - AXObjectSafety_GetInterfaceSafetyOptions, - AXObjectSafety_SetInterfaceSafetyOptions -}; - -static IObjectSafety AXObjectSafety = { &AXObjectSafetyVtbl }; - -static BOOL set_safe_reg(BOOL init) -{ - return init_key("CLSID\\"TESTACTIVEX_CLSID"\\Implemented Categories\\{7dd95801-9882-11cf-9fa9-00aa006c42c4}", - NULL, init); -} - -static void test_security(void) -{ - IInternetHostSecurityManager *sec_mgr; - IServiceProvider *sp; - DWORD policy, policy_size; - struct CONFIRMSAFETY cs; - BYTE *ppolicy; - HRESULT hres; - - ax_setopt = INTERFACESAFE_FOR_UNTRUSTED_CALLER|INTERFACE_USES_SECURITY_MANAGER; - - hres = IActiveScriptSite_QueryInterface(site, &IID_IServiceProvider, (void**)&sp); - ok(hres == S_OK, "Could not get IServiceProvider iface: %08x\n", hres); - - hres = IServiceProvider_QueryService(sp, &SID_SInternetHostSecurityManager, - &IID_IInternetHostSecurityManager, (void**)&sec_mgr); - IServiceProvider_Release(sp); - ok(hres == S_OK, "QueryService failed: %08x\n", hres); - - hres = IInternetHostSecurityManager_ProcessUrlAction(sec_mgr, URLACTION_ACTIVEX_RUN, (BYTE*)&policy, sizeof(policy), - (BYTE*)&CLSID_TestActiveX, sizeof(CLSID), 0, 0); - ok(hres == S_OK, "ProcessUrlAction failed: %08x\n", hres); - ok(policy == URLPOLICY_ALLOW, "policy = %x\n", policy); - - cs.clsid = CLSID_TestActiveX; - cs.pUnk = (IUnknown*)&AXObjectSafety; - cs.dwFlags = 0; - - ax_objsafe = TRUE; - SET_EXPECT(AXQueryInterface_IActiveScript); - SET_EXPECT(AXQueryInterface_IObjectSafety); - SET_EXPECT(AXGetInterfaceSafetyOptions); - SET_EXPECT(AXSetInterfaceSafetyOptions_IDispatchEx); - hres = IInternetHostSecurityManager_QueryCustomPolicy(sec_mgr, &GUID_CUSTOM_CONFIRMOBJECTSAFETY, - &ppolicy, &policy_size, (BYTE*)&cs, sizeof(cs), 0); - CHECK_CALLED(AXQueryInterface_IActiveScript); - CHECK_CALLED(AXQueryInterface_IObjectSafety); - CHECK_CALLED(AXGetInterfaceSafetyOptions); - CHECK_CALLED(AXSetInterfaceSafetyOptions_IDispatchEx); - - ok(hres == S_OK, "QueryCusromPolicy failed: %08x\n", hres); - ok(policy_size == sizeof(DWORD), "policy_size = %d\n", policy_size); - ok(*(DWORD*)ppolicy == URLPOLICY_ALLOW, "policy = %x\n", *(DWORD*)ppolicy); - CoTaskMemFree(ppolicy); - - ax_objsafe = FALSE; - SET_EXPECT(AXQueryInterface_IActiveScript); - SET_EXPECT(AXQueryInterface_IObjectSafety); - hres = IInternetHostSecurityManager_QueryCustomPolicy(sec_mgr, &GUID_CUSTOM_CONFIRMOBJECTSAFETY, - &ppolicy, &policy_size, (BYTE*)&cs, sizeof(cs), 0); - CHECK_CALLED(AXQueryInterface_IActiveScript); - CHECK_CALLED(AXQueryInterface_IObjectSafety); - - ok(hres == S_OK, "QueryCusromPolicy failed: %08x\n", hres); - ok(policy_size == sizeof(DWORD), "policy_size = %d\n", policy_size); - ok(*(DWORD*)ppolicy == URLPOLICY_DISALLOW, "policy = %x\n", *(DWORD*)ppolicy); - CoTaskMemFree(ppolicy); - - if(set_safe_reg(TRUE)) { - ax_objsafe = FALSE; - SET_EXPECT(AXQueryInterface_IActiveScript); - SET_EXPECT(AXQueryInterface_IObjectSafety); - hres = IInternetHostSecurityManager_QueryCustomPolicy(sec_mgr, &GUID_CUSTOM_CONFIRMOBJECTSAFETY, - &ppolicy, &policy_size, (BYTE*)&cs, sizeof(cs), 0); - CHECK_CALLED(AXQueryInterface_IActiveScript); - CHECK_CALLED(AXQueryInterface_IObjectSafety); - - ok(hres == S_OK, "QueryCusromPolicy failed: %08x\n", hres); - ok(policy_size == sizeof(DWORD), "policy_size = %d\n", policy_size); - ok(*(DWORD*)ppolicy == URLPOLICY_ALLOW, "policy = %x\n", *(DWORD*)ppolicy); - CoTaskMemFree(ppolicy); - - ax_objsafe = TRUE; - SET_EXPECT(AXQueryInterface_IActiveScript); - SET_EXPECT(AXQueryInterface_IObjectSafety); - SET_EXPECT(AXGetInterfaceSafetyOptions); - SET_EXPECT(AXSetInterfaceSafetyOptions_IDispatchEx); - hres = IInternetHostSecurityManager_QueryCustomPolicy(sec_mgr, &GUID_CUSTOM_CONFIRMOBJECTSAFETY, - &ppolicy, &policy_size, (BYTE*)&cs, sizeof(cs), 0); - CHECK_CALLED(AXQueryInterface_IActiveScript); - CHECK_CALLED(AXQueryInterface_IObjectSafety); - CHECK_CALLED(AXGetInterfaceSafetyOptions); - CHECK_CALLED(AXSetInterfaceSafetyOptions_IDispatchEx); - - ok(hres == S_OK, "QueryCusromPolicy failed: %08x\n", hres); - ok(policy_size == sizeof(DWORD), "policy_size = %d\n", policy_size); - ok(*(DWORD*)ppolicy == URLPOLICY_ALLOW, "policy = %x\n", *(DWORD*)ppolicy); - CoTaskMemFree(ppolicy); - - set_safe_reg(FALSE); - }else { - skip("Could not set safety registry\n"); - } - - ax_objsafe = TRUE; - - ax_setopt_dispex_hres = E_NOINTERFACE; - SET_EXPECT(AXQueryInterface_IActiveScript); - SET_EXPECT(AXQueryInterface_IObjectSafety); - SET_EXPECT(AXGetInterfaceSafetyOptions); - SET_EXPECT(AXSetInterfaceSafetyOptions_IDispatchEx); - SET_EXPECT(AXSetInterfaceSafetyOptions_IDispatch); - hres = IInternetHostSecurityManager_QueryCustomPolicy(sec_mgr, &GUID_CUSTOM_CONFIRMOBJECTSAFETY, - &ppolicy, &policy_size, (BYTE*)&cs, sizeof(cs), 0); - CHECK_CALLED(AXQueryInterface_IActiveScript); - CHECK_CALLED(AXQueryInterface_IObjectSafety); - CHECK_CALLED(AXGetInterfaceSafetyOptions); - CHECK_CALLED(AXSetInterfaceSafetyOptions_IDispatchEx); - CHECK_CALLED(AXSetInterfaceSafetyOptions_IDispatch); - - ok(hres == S_OK, "QueryCusromPolicy failed: %08x\n", hres); - ok(policy_size == sizeof(DWORD), "policy_size = %d\n", policy_size); - ok(*(DWORD*)ppolicy == URLPOLICY_ALLOW, "policy = %x\n", *(DWORD*)ppolicy); - CoTaskMemFree(ppolicy); - - ax_setopt_dispex_hres = E_FAIL; - ax_setopt_disp_hres = E_NOINTERFACE; - SET_EXPECT(AXQueryInterface_IActiveScript); - SET_EXPECT(AXQueryInterface_IObjectSafety); - SET_EXPECT(AXGetInterfaceSafetyOptions); - SET_EXPECT(AXSetInterfaceSafetyOptions_IDispatchEx); - SET_EXPECT(AXSetInterfaceSafetyOptions_IDispatch); - hres = IInternetHostSecurityManager_QueryCustomPolicy(sec_mgr, &GUID_CUSTOM_CONFIRMOBJECTSAFETY, - &ppolicy, &policy_size, (BYTE*)&cs, sizeof(cs), 0); - CHECK_CALLED(AXQueryInterface_IActiveScript); - CHECK_CALLED(AXQueryInterface_IObjectSafety); - CHECK_CALLED(AXGetInterfaceSafetyOptions); - CHECK_CALLED(AXSetInterfaceSafetyOptions_IDispatchEx); - CHECK_CALLED(AXSetInterfaceSafetyOptions_IDispatch); - - ok(hres == S_OK, "QueryCusromPolicy failed: %08x\n", hres); - ok(policy_size == sizeof(DWORD), "policy_size = %d\n", policy_size); - ok(*(DWORD*)ppolicy == URLPOLICY_DISALLOW, "policy = %x\n", *(DWORD*)ppolicy); - CoTaskMemFree(ppolicy); - - ax_setopt_dispex_hres = E_FAIL; - ax_setopt_disp_hres = S_OK; - ax_getopt_hres = E_NOINTERFACE; - ax_setopt = INTERFACESAFE_FOR_UNTRUSTED_CALLER; - SET_EXPECT(AXQueryInterface_IActiveScript); - SET_EXPECT(AXQueryInterface_IObjectSafety); - SET_EXPECT(AXGetInterfaceSafetyOptions); - SET_EXPECT(AXSetInterfaceSafetyOptions_IDispatchEx); - SET_EXPECT(AXSetInterfaceSafetyOptions_IDispatch); - hres = IInternetHostSecurityManager_QueryCustomPolicy(sec_mgr, &GUID_CUSTOM_CONFIRMOBJECTSAFETY, - &ppolicy, &policy_size, (BYTE*)&cs, sizeof(cs), 0); - CHECK_CALLED(AXQueryInterface_IActiveScript); - CHECK_CALLED(AXQueryInterface_IObjectSafety); - CHECK_CALLED(AXGetInterfaceSafetyOptions); - CHECK_CALLED(AXSetInterfaceSafetyOptions_IDispatchEx); - CHECK_CALLED(AXSetInterfaceSafetyOptions_IDispatch); - - ok(hres == S_OK, "QueryCusromPolicy failed: %08x\n", hres); - ok(policy_size == sizeof(DWORD), "policy_size = %d\n", policy_size); - ok(*(DWORD*)ppolicy == URLPOLICY_ALLOW, "policy = %x\n", *(DWORD*)ppolicy); - CoTaskMemFree(ppolicy); - - IInternetHostSecurityManager_Release(sec_mgr); -} - -static HRESULT WINAPI ActiveScriptProperty_QueryInterface(IActiveScriptProperty *iface, REFIID riid, void **ppv) -{ - *ppv = NULL; - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI ActiveScriptProperty_AddRef(IActiveScriptProperty *iface) -{ - return 2; -} - -static ULONG WINAPI ActiveScriptProperty_Release(IActiveScriptProperty *iface) -{ - return 1; -} - -static HRESULT WINAPI ActiveScriptProperty_GetProperty(IActiveScriptProperty *iface, DWORD dwProperty, - VARIANT *pvarIndex, VARIANT *pvarValue) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ActiveScriptProperty_SetProperty(IActiveScriptProperty *iface, DWORD dwProperty, - VARIANT *pvarIndex, VARIANT *pvarValue) -{ - switch(dwProperty) { - case SCRIPTPROP_HACK_TRIDENTEVENTSINK: - CHECK_EXPECT(SetProperty_HACK_TRIDENTEVENTSINK); - ok(V_VT(pvarValue) == VT_BOOL, "V_VT(pvarValue)=%d\n", V_VT(pvarValue)); - ok(V_BOOL(pvarValue) == VARIANT_TRUE, "V_BOOL(pvarValue)=%x\n", V_BOOL(pvarValue)); - break; - case SCRIPTPROP_INVOKEVERSIONING: - CHECK_EXPECT(SetProperty_INVOKEVERSIONING); - ok(V_VT(pvarValue) == VT_I4, "V_VT(pvarValue)=%d\n", V_VT(pvarValue)); - ok(V_I4(pvarValue) == 1, "V_I4(pvarValue)=%d\n", V_I4(pvarValue)); - break; - case SCRIPTPROP_ABBREVIATE_GLOBALNAME_RESOLUTION: - CHECK_EXPECT(SetProperty_ABBREVIATE_GLOBALNAME_RESOLUTION); - ok(V_VT(pvarValue) == VT_BOOL, "V_VT(pvarValue)=%d\n", V_VT(pvarValue)); - ok(V_BOOL(pvarValue) == VARIANT_TRUE, "V_BOOL(pvarValue)=%x\n", V_BOOL(pvarValue)); - break; - default: - ok(0, "unexpected property %x\n", dwProperty); - return E_NOTIMPL; - } - - ok(!pvarIndex, "pvarIndex != NULL\n"); - ok(pvarValue != NULL, "pvarValue == NULL\n"); - - return S_OK; -} - -static const IActiveScriptPropertyVtbl ActiveScriptPropertyVtbl = { - ActiveScriptProperty_QueryInterface, - ActiveScriptProperty_AddRef, - ActiveScriptProperty_Release, - ActiveScriptProperty_GetProperty, - ActiveScriptProperty_SetProperty -}; - -static IActiveScriptProperty ActiveScriptProperty = { &ActiveScriptPropertyVtbl }; - -static HRESULT WINAPI ActiveScriptParseProcedure_QueryInterface(IActiveScriptParseProcedure2 *iface, REFIID riid, void **ppv) -{ - *ppv = NULL; - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI ActiveScriptParseProcedure_AddRef(IActiveScriptParseProcedure2 *iface) -{ - return 2; -} - -static ULONG WINAPI ActiveScriptParseProcedure_Release(IActiveScriptParseProcedure2 *iface) -{ - return 1; -} - -static HRESULT WINAPI ActiveScriptParseProcedure_ParseProcedureText(IActiveScriptParseProcedure2 *iface, - LPCOLESTR pstrCode, LPCOLESTR pstrFormalParams, LPCOLESTR pstrProcedureName, - LPCOLESTR pstrItemName, IUnknown *punkContext, LPCOLESTR pstrDelimiter, - CTXARG_T dwSourceContextCookie, ULONG ulStartingLineNumber, DWORD dwFlags, IDispatch **ppdisp) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static const IActiveScriptParseProcedure2Vtbl ActiveScriptParseProcedureVtbl = { - ActiveScriptParseProcedure_QueryInterface, - ActiveScriptParseProcedure_AddRef, - ActiveScriptParseProcedure_Release, - ActiveScriptParseProcedure_ParseProcedureText -}; - -static IActiveScriptParseProcedure2 ActiveScriptParseProcedure = { &ActiveScriptParseProcedureVtbl }; - -static HRESULT WINAPI ActiveScriptParse_QueryInterface(IActiveScriptParse *iface, REFIID riid, void **ppv) -{ - *ppv = NULL; - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI ActiveScriptParse_AddRef(IActiveScriptParse *iface) -{ - return 2; -} - -static ULONG WINAPI ActiveScriptParse_Release(IActiveScriptParse *iface) -{ - return 1; -} - -static HRESULT WINAPI ActiveScriptParse_InitNew(IActiveScriptParse *iface) -{ - CHECK_EXPECT(InitNew); - return S_OK; -} - -static HRESULT WINAPI ActiveScriptParse_AddScriptlet(IActiveScriptParse *iface, - LPCOLESTR pstrDefaultName, LPCOLESTR pstrCode, LPCOLESTR pstrItemName, - LPCOLESTR pstrSubItemName, LPCOLESTR pstrEventName, LPCOLESTR pstrDelimiter, - CTXARG_T dwSourceContextCookie, ULONG ulStartingLineNumber, DWORD dwFlags, - BSTR *pbstrName, EXCEPINFO *pexcepinfo) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT dispex_propput(IDispatchEx *obj, DISPID id, DWORD flags, VARIANT *var) -{ - DISPID propput_arg = DISPID_PROPERTYPUT; - DISPPARAMS dp = {var, &propput_arg, 1, 1}; - EXCEPINFO ei = {0}; - - return IDispatchEx_InvokeEx(obj, id, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT|flags, &dp, NULL, &ei, NULL); -} - -static void test_func(IDispatchEx *obj) -{ - DISPID id; - IDispatchEx *dispex; - IDispatch *disp; - EXCEPINFO ei; - DISPPARAMS dp; - BSTR str; - VARIANT var; - HRESULT hres; - - str = a2bstr("toString"); - hres = IDispatchEx_GetDispID(obj, str, fdexNameCaseSensitive, &id); - SysFreeString(str); - ok(hres == S_OK, "GetDispID failed: %08x\n", hres); - ok(id == DISPID_IOMNAVIGATOR_TOSTRING, "id = %x\n", id); - - memset(&dp, 0, sizeof(dp)); - memset(&ei, 0, sizeof(ei)); - VariantInit(&var); - hres = IDispatchEx_InvokeEx(obj, id, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dp, &var, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); - ok(V_VT(&var) == VT_DISPATCH, "V_VT(var)=%d\n", V_VT(&var)); - ok(V_DISPATCH(&var) != NULL, "V_DISPATCH(var) == NULL\n"); - disp = V_DISPATCH(&var); - - hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex); - IDispatch_Release(disp); - ok(hres == S_OK, "Could not get IDispatchEx iface: %08x\n", hres); - - /* FIXME: Test InvokeEx(DISPATCH_METHOD) */ - - memset(&dp, 0, sizeof(dp)); - memset(&ei, 0, sizeof(ei)); - VariantInit(&var); - hres = IDispatchEx_Invoke(dispex, DISPID_VALUE, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dp, &var, &ei, NULL); - ok(hres == S_OK || broken(E_ACCESSDENIED), "InvokeEx failed: %08x\n", hres); - if(SUCCEEDED(hres)) { - ok(V_VT(&var) == VT_BSTR, "V_VT(var)=%d\n", V_VT(&var)); - ok(!strcmp_wa(V_BSTR(&var), "[object]"), "V_BSTR(var) = %s\n", wine_dbgstr_w(V_BSTR(&var))); - VariantClear(&var); - } - - V_VT(&var) = VT_I4; - V_I4(&var) = 100; - hres = dispex_propput(obj, id, 0, &var); - ok(hres == E_NOTIMPL, "InvokeEx failed: %08x\n", hres); - - IDispatchEx_Release(dispex); -} - -static void test_nextdispid(IDispatchEx *dispex) -{ - DISPID last_id = DISPID_STARTENUM, id, dyn_id; - BSTR name; - VARIANT var; - HRESULT hres; - - name = a2bstr("dynVal"); - hres = IDispatchEx_GetDispID(dispex, name, fdexNameCaseSensitive|fdexNameEnsure, &dyn_id); - ok(hres == S_OK, "GetDispID failed: %08x\n", hres); - SysFreeString(name); - - V_VT(&var) = VT_EMPTY; - hres = dispex_propput(dispex, dyn_id, 0, &var); - - while(last_id != dyn_id) { - hres = IDispatchEx_GetNextDispID(dispex, fdexEnumAll, last_id, &id); - ok(hres == S_OK, "GetNextDispID returned: %08x\n", hres); - ok(id != DISPID_STARTENUM, "id == DISPID_STARTENUM\n"); - ok(id != DISPID_IOMNAVIGATOR_TOSTRING, "id == DISPID_IOMNAVIGATOR_TOSTRING\n"); - - hres = IDispatchEx_GetMemberName(dispex, id, &name); - ok(hres == S_OK, "GetMemberName failed: %08x\n", hres); - - if(id == dyn_id) - ok(!strcmp_wa(name, "dynVal"), "name = %s\n", wine_dbgstr_w(name)); - else if(id == DISPID_IOMNAVIGATOR_PLATFORM) - ok(!strcmp_wa(name, "platform"), "name = %s\n", wine_dbgstr_w(name)); - - SysFreeString(name); - last_id = id; - } - - hres = IDispatchEx_GetNextDispID(dispex, 0, id, &id); - ok(hres == S_FALSE, "GetNextDispID returned: %08x\n", hres); - ok(id == DISPID_STARTENUM, "id != DISPID_STARTENUM\n"); -} - -static void test_global_id(void) -{ - VARIANT var; - DISPPARAMS dp; - EXCEPINFO ei; - BSTR tmp; - DISPID id; - HRESULT hres; - - SET_EXPECT(GetScriptDispatch); - SET_EXPECT(script_divid_d); - tmp = a2bstr("divid"); - hres = IDispatchEx_GetDispID(window_dispex, tmp, fdexNameCaseSensitive, &id); - ok(hres == S_OK, "GetDispID failed: %08x\n", hres); - SysFreeString(tmp); - CHECK_CALLED(GetScriptDispatch); - CHECK_CALLED(script_divid_d); - - VariantInit(&var); - memset(&ei, 0, sizeof(ei)); - memset(&dp, 0, sizeof(dp)); - hres = IDispatchEx_InvokeEx(window_dispex, id, 0, DISPATCH_PROPERTYGET, &dp, &var, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); - ok(V_VT(&var) == VT_DISPATCH, "V_VT(var) = %d\n", V_VT(&var)); - VariantClear(&var); -} - -static HRESULT WINAPI ActiveScriptParse_ParseScriptText(IActiveScriptParse *iface, - LPCOLESTR pstrCode, LPCOLESTR pstrItemName, IUnknown *punkContext, - LPCOLESTR pstrDelimiter, CTXARG_T dwSourceContextCookie, ULONG ulStartingLine, - DWORD dwFlags, VARIANT *pvarResult, EXCEPINFO *pexcepinfo) -{ - IDispatchEx *document, *dispex; - IHTMLWindow2 *window; - IOmNavigator *navigator; - IUnknown *unk; - VARIANT var, arg; - DISPPARAMS dp; - EXCEPINFO ei; - DISPID id; - BSTR tmp; - HRESULT hres; - - static const WCHAR documentW[] = {'d','o','c','u','m','e','n','t',0}; - static const WCHAR testW[] = {'t','e','s','t',0}; - static const WCHAR funcW[] = {'f','u','n','c',0}; - - CHECK_EXPECT(ParseScriptText); - - SET_EXPECT(GetScriptDispatch); - - tmp = SysAllocString(documentW); - hres = IDispatchEx_GetDispID(window_dispex, tmp, fdexNameCaseSensitive, &id); - SysFreeString(tmp); - ok(hres == S_OK, "GetDispID(document) failed: %08x\n", hres); - ok(id == DISPID_IHTMLWINDOW2_DOCUMENT, "id=%x\n", id); - - CHECK_CALLED(GetScriptDispatch); - - VariantInit(&var); - memset(&dp, 0, sizeof(dp)); - memset(&ei, 0, sizeof(ei)); - - hres = IDispatchEx_InvokeEx(window_dispex, id, LOCALE_NEUTRAL, INVOKE_PROPERTYGET, &dp, &var, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); - ok(V_VT(&var) == VT_DISPATCH, "V_VT(var)=%d\n", V_VT(&var)); - ok(V_DISPATCH(&var) != NULL, "V_DISPATCH(&var) == NULL\n"); - - hres = IDispatch_QueryInterface(V_DISPATCH(&var), &IID_IDispatchEx, (void**)&document); - VariantClear(&var); - ok(hres == S_OK, "Could not get DispatchEx: %08x\n", hres); - - tmp = SysAllocString(testW); - hres = IDispatchEx_GetDispID(document, tmp, fdexNameCaseSensitive, &id); - ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(document) failed: %08x, expected DISP_E_UNKNOWNNAME\n", hres); - hres = IDispatchEx_GetDispID(document, tmp, fdexNameCaseSensitive | fdexNameImplicit, &id); - ok(hres == DISP_E_UNKNOWNNAME, "GetDispID(document) failed: %08x, expected DISP_E_UNKNOWNNAME\n", hres); - SysFreeString(tmp); - - id = 0; - tmp = SysAllocString(testW); - hres = IDispatchEx_GetDispID(document, tmp, fdexNameCaseSensitive|fdexNameEnsure, &id); - SysFreeString(tmp); - ok(hres == S_OK, "GetDispID(document) failed: %08x\n", hres); - ok(id, "id == 0\n"); - - V_VT(&var) = VT_I4; - V_I4(&var) = 100; - hres = dispex_propput(document, id, 0, &var); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); - - tmp = SysAllocString(testW); - hres = IDispatchEx_GetDispID(document, tmp, fdexNameCaseSensitive, &id); - SysFreeString(tmp); - ok(hres == S_OK, "GetDispID(document) failed: %08x\n", hres); - - VariantInit(&var); - memset(&dp, 0, sizeof(dp)); - memset(&ei, 0, sizeof(ei)); - hres = IDispatchEx_InvokeEx(document, id, LOCALE_NEUTRAL, INVOKE_PROPERTYGET, &dp, &var, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); - ok(V_VT(&var) == VT_I4, "V_VT(var)=%d\n", V_VT(&var)); - ok(V_I4(&var) == 100, "V_I4(&var) = %d\n", V_I4(&var)); - - V_VT(&var) = VT_I4; - V_I4(&var) = 200; - hres = dispex_propput(document, id, DISPATCH_PROPERTYPUTREF, &var); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); - - VariantInit(&var); - memset(&dp, 0, sizeof(dp)); - memset(&ei, 0, sizeof(ei)); - hres = IDispatchEx_InvokeEx(document, id, LOCALE_NEUTRAL, INVOKE_PROPERTYGET, &dp, &var, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); - ok(V_VT(&var) == VT_I4, "V_VT(var)=%d\n", V_VT(&var)); - ok(V_I4(&var) == 200, "V_I4(&var) = %d\n", V_I4(&var)); - - memset(&dp, 0, sizeof(dp)); - memset(&ei, 0, sizeof(ei)); - V_VT(&var) = VT_I4; - V_I4(&var) = 300; - dp.cArgs = 1; - dp.rgvarg = &var; - hres = IDispatchEx_InvokeEx(document, id, LOCALE_NEUTRAL, INVOKE_PROPERTYPUT, &dp, NULL, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); - - VariantInit(&var); - memset(&dp, 0, sizeof(dp)); - memset(&ei, 0, sizeof(ei)); - hres = IDispatchEx_InvokeEx(document, id, LOCALE_NEUTRAL, INVOKE_PROPERTYGET, &dp, &var, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); - ok(V_VT(&var) == VT_I4, "V_VT(var)=%d\n", V_VT(&var)); - ok(V_I4(&var) == 300, "V_I4(&var) = %d\n", V_I4(&var)); - - unk = (void*)0xdeadbeef; - hres = IDispatchEx_GetNameSpaceParent(window_dispex, &unk); - ok(hres == S_OK, "GetNameSpaceParent failed: %08x\n", hres); - ok(!unk, "unk=%p, expected NULL\n", unk); - - id = 0; - tmp = SysAllocString(funcW); - hres = IDispatchEx_GetDispID(document, tmp, fdexNameCaseSensitive|fdexNameEnsure, &id); - SysFreeString(tmp); - ok(hres == S_OK, "GetDispID(func) failed: %08x\n", hres); - ok(id, "id == 0\n"); - - dp.cArgs = 1; - dp.rgvarg = &var; - dp.cNamedArgs = 0; - dp.rgdispidNamedArgs = NULL; - V_VT(&var) = VT_DISPATCH; - V_DISPATCH(&var) = (IDispatch*)&funcDisp; - hres = IDispatchEx_InvokeEx(document, id, LOCALE_NEUTRAL, INVOKE_PROPERTYPUT, &dp, NULL, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); - - VariantInit(&var); - memset(&dp, 0, sizeof(dp)); - memset(&ei, 0, sizeof(ei)); - V_VT(&arg) = VT_BOOL; - V_BOOL(&arg) = VARIANT_TRUE; - dp.cArgs = 1; - dp.rgvarg = &arg; - - SET_EXPECT(funcDisp); - hres = IDispatchEx_InvokeEx(document, id, LOCALE_NEUTRAL, INVOKE_FUNC, &dp, &var, &ei, NULL); - CHECK_CALLED(funcDisp); - - ok(hres == S_OK, "InvokeEx(INVOKE_FUNC) failed: %08x\n", hres); - ok(V_VT(&var) == VT_I4, "V_VT(var)=%d\n", V_VT(&var)); - ok(V_I4(&var) == 100, "V_I4(&var) == NULL\n"); - - IDispatchEx_Release(document); - - hres = IDispatchEx_QueryInterface(window_dispex, &IID_IHTMLWindow2, (void**)&window); - ok(hres == S_OK, "Could not get IHTMLWindow2 iface: %08x\n", hres); - - hres = IHTMLWindow2_get_navigator(window, &navigator); - IHTMLWindow2_Release(window); - ok(hres == S_OK, "get_navigator failed: %08x\n", hres); - - hres = IOmNavigator_QueryInterface(navigator, &IID_IDispatchEx, (void**)&dispex); - IOmNavigator_Release(navigator); - ok(hres == S_OK, "Could not get IDispatchEx iface: %08x\n", hres); - - test_func(dispex); - test_nextdispid(dispex); - - tmp = a2bstr("test"); - hres = IDispatchEx_DeleteMemberByName(dispex, tmp, fdexNameCaseSensitive); - ok(hres == E_NOTIMPL, "DeleteMemberByName failed: %08x\n", hres); - - IDispatchEx_Release(dispex); - - script_disp = (IDispatch*)&scriptDisp; - - SET_EXPECT(GetScriptDispatch); - SET_EXPECT(script_testprop_d); - tmp = a2bstr("testProp"); - hres = IDispatchEx_GetDispID(window_dispex, tmp, fdexNameCaseSensitive, &id); - ok(hres == S_OK, "GetDispID failed: %08x\n", hres); - ok(id != DISPID_SCRIPT_TESTPROP, "id == DISPID_SCRIPT_TESTPROP\n"); - CHECK_CALLED(GetScriptDispatch); - CHECK_CALLED(script_testprop_d); - SysFreeString(tmp); - - tmp = a2bstr("testProp"); - hres = IDispatchEx_GetDispID(window_dispex, tmp, fdexNameCaseSensitive, &id); - ok(hres == S_OK, "GetDispID failed: %08x\n", hres); - ok(id != DISPID_SCRIPT_TESTPROP, "id == DISPID_SCRIPT_TESTPROP\n"); - SysFreeString(tmp); - - SET_EXPECT(GetScriptDispatch); - SET_EXPECT(script_testprop_i); - memset(&ei, 0, sizeof(ei)); - memset(&dp, 0, sizeof(dp)); - hres = IDispatchEx_InvokeEx(window_dispex, id, 0, DISPATCH_PROPERTYGET, &dp, &var, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); - ok(V_VT(&var) == VT_NULL, "V_VT(var) = %d\n", V_VT(&var)); - CHECK_CALLED(GetScriptDispatch); - CHECK_CALLED(script_testprop_i); - - SET_EXPECT(GetScriptDispatch); - SET_EXPECT(script_testprop2_d); - tmp = a2bstr("testProp2"); - hres = IDispatchEx_GetDispID(window_dispex, tmp, fdexNameCaseSensitive|fdexNameEnsure, &id); - ok(hres == S_OK, "GetDispID failed: %08x\n", hres); - ok(id != DISPID_SCRIPT_TESTPROP2, "id == DISPID_SCRIPT_TESTPROP2\n"); - CHECK_CALLED(GetScriptDispatch); - CHECK_CALLED(script_testprop2_d); - SysFreeString(tmp); - - tmp = a2bstr("test"); - hres = IDispatchEx_DeleteMemberByName(window_dispex, tmp, fdexNameCaseSensitive); - ok(hres == E_NOTIMPL, "DeleteMemberByName failed: %08x\n", hres); - - test_global_id(); - - test_security(); - - return S_OK; -} - -static const IActiveScriptParseVtbl ActiveScriptParseVtbl = { - ActiveScriptParse_QueryInterface, - ActiveScriptParse_AddRef, - ActiveScriptParse_Release, - ActiveScriptParse_InitNew, - ActiveScriptParse_AddScriptlet, - ActiveScriptParse_ParseScriptText -}; - -static IActiveScriptParse ActiveScriptParse = { &ActiveScriptParseVtbl }; - -static HRESULT WINAPI ActiveScript_QueryInterface(IActiveScript *iface, REFIID riid, void **ppv) -{ - *ppv = NULL; - - if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IActiveScript, riid)) { - *ppv = iface; - return S_OK; - } - - if(IsEqualGUID(&IID_IActiveScriptParse, riid)) { - *ppv = &ActiveScriptParse; - return S_OK; - } - - if(IsEqualGUID(&IID_IActiveScriptParseProcedure2, riid)) { - *ppv = &ActiveScriptParseProcedure; - return S_OK; - } - - if(IsEqualGUID(&IID_IActiveScriptProperty, riid)) { - *ppv = &ActiveScriptProperty; - return S_OK; - } - - if(IsEqualGUID(&IID_IObjectSafety, riid)) { - *ppv = &ObjectSafety; - return S_OK; - } - - if(IsEqualGUID(&IID_IActiveScriptDebug, riid)) - return E_NOINTERFACE; - - ok(0, "unexpected riid %s\n", debugstr_guid(riid)); - return E_NOINTERFACE; -} - -static ULONG WINAPI ActiveScript_AddRef(IActiveScript *iface) -{ - return 2; -} - -static ULONG WINAPI ActiveScript_Release(IActiveScript *iface) -{ - return 1; -} - -static HRESULT WINAPI ActiveScript_SetScriptSite(IActiveScript *iface, IActiveScriptSite *pass) -{ - IActiveScriptSiteInterruptPoll *poll; - IActiveScriptSiteDebug *debug; - IServiceProvider *service; - ICanHandleException *canexpection; - LCID lcid; - HRESULT hres; - - CHECK_EXPECT(SetScriptSite); - - ok(pass != NULL, "pass == NULL\n"); - - hres = IActiveScriptSite_QueryInterface(pass, &IID_IActiveScriptSiteInterruptPoll, (void**)&poll); - ok(hres == S_OK, "Could not get IActiveScriptSiteInterruptPoll interface: %08x\n", hres); - if(FAILED(hres)) - IActiveScriptSiteInterruptPoll_Release(poll); - - hres = IActiveScriptSite_GetLCID(pass, &lcid); - ok(hres == S_OK, "GetLCID failed: %08x\n", hres); - - hres = IActiveScriptSite_OnStateChange(pass, (state = SCRIPTSTATE_INITIALIZED)); - ok(hres == S_OK, "OnStateChange failed: %08x\n", hres); - - hres = IActiveScriptSite_QueryInterface(pass, &IID_IActiveScriptSiteDebug, (void**)&debug); - ok(hres == S_OK, "Could not get IActiveScriptSiteDebug interface: %08x\n", hres); - if(SUCCEEDED(hres)) - IActiveScriptSiteDebug32_Release(debug); - - hres = IActiveScriptSite_QueryInterface(pass, &IID_ICanHandleException, (void**)&canexpection); - ok(hres == E_NOINTERFACE, "Could not get IID_ICanHandleException interface: %08x\n", hres); - - hres = IActiveScriptSite_QueryInterface(pass, &IID_IServiceProvider, (void**)&service); - ok(hres == S_OK, "Could not get IServiceProvider interface: %08x\n", hres); - if(SUCCEEDED(hres)) - IServiceProvider_Release(service); - - site = pass; - IActiveScriptSite_AddRef(site); - return S_OK; -} - -static HRESULT WINAPI ActiveScript_GetScriptSite(IActiveScript *iface, REFIID riid, - void **ppvObject) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ActiveScript_SetScriptState(IActiveScript *iface, SCRIPTSTATE ss) -{ - HRESULT hres; - - switch(ss) { - case SCRIPTSTATE_STARTED: - CHECK_EXPECT(SetScriptState_STARTED); - break; - case SCRIPTSTATE_CONNECTED: - CHECK_EXPECT(SetScriptState_CONNECTED); - break; - case SCRIPTSTATE_DISCONNECTED: - CHECK_EXPECT(SetScriptState_DISCONNECTED); - break; - default: - ok(0, "unexpected state %d\n", ss); - return E_NOTIMPL; - } - - hres = IActiveScriptSite_OnStateChange(site, (state = ss)); - ok(hres == S_OK, "OnStateChange failed: %08x\n", hres); - - return S_OK; -} - -static HRESULT WINAPI ActiveScript_GetScriptState(IActiveScript *iface, SCRIPTSTATE *pssState) -{ - CHECK_EXPECT(GetScriptState); - - *pssState = state; - return S_OK; -} - -static HRESULT WINAPI ActiveScript_Close(IActiveScript *iface) -{ - CHECK_EXPECT(Close); - return E_NOTIMPL; -} - -static HRESULT WINAPI ActiveScript_AddNamedItem(IActiveScript *iface, - LPCOLESTR pstrName, DWORD dwFlags) -{ - IDispatch *disp; - IUnknown *unk = NULL, *unk2; - HRESULT hres; - - static const WCHAR windowW[] = {'w','i','n','d','o','w',0}; - - static const IID unknown_iid = {0x719C3050,0xF9D3,0x11CF,{0xA4,0x93,0x00,0x40,0x05,0x23,0xA8,0xA0}}; - - CHECK_EXPECT(AddNamedItem); - - ok(!lstrcmpW(pstrName, windowW), "pstrName=%s\n", wine_dbgstr_w(pstrName)); - ok(dwFlags == (SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|SCRIPTITEM_GLOBALMEMBERS), "dwFlags=%x\n", dwFlags); - - hres = IActiveScriptSite_GetItemInfo(site, windowW, SCRIPTINFO_IUNKNOWN, &unk, NULL); - ok(hres == S_OK, "GetItemInfo failed: %08x\n", hres); - ok(unk != NULL, "unk == NULL\n"); - - hres = IUnknown_QueryInterface(unk, &IID_IDispatch, (void**)&disp); - ok(hres == S_OK, "Could not get IDispatch interface: %08x\n", hres); - if(SUCCEEDED(hres)) - IDispatch_Release(disp); - - hres = IUnknown_QueryInterface(unk, &unknown_iid, (void**)&unk2); - ok(hres == E_NOINTERFACE, "Got ?? interface: %p\n", unk2); - if(SUCCEEDED(hres)) - IUnknown_Release(unk2); - - hres = IUnknown_QueryInterface(unk, &IID_IDispatchEx, (void**)&window_dispex); - ok(hres == S_OK, "Could not get IDispatchEx interface: %08x\n", hres); - - IUnknown_Release(unk); - return S_OK; -} - -static HRESULT WINAPI ActiveScript_AddTypeLib(IActiveScript *iface, REFGUID rguidTypeLib, - DWORD dwMajor, DWORD dwMinor, DWORD dwFlags) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ActiveScript_GetScriptDispatch(IActiveScript *iface, LPCOLESTR pstrItemName, - IDispatch **ppdisp) -{ - CHECK_EXPECT(GetScriptDispatch); - - ok(!strcmp_wa(pstrItemName, "window"), "pstrItemName = %s\n", wine_dbgstr_w(pstrItemName)); - - if(!script_disp) - return E_NOTIMPL; - - *ppdisp = script_disp; - return S_OK; -} - -static HRESULT WINAPI ActiveScript_GetCurrentScriptThreadID(IActiveScript *iface, - SCRIPTTHREADID *pstridThread) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ActiveScript_GetScriptThreadID(IActiveScript *iface, - DWORD dwWin32ThreadId, SCRIPTTHREADID *pstidThread) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ActiveScript_GetScriptThreadState(IActiveScript *iface, - SCRIPTTHREADID stidThread, SCRIPTTHREADSTATE *pstsState) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ActiveScript_InterruptScriptThread(IActiveScript *iface, - SCRIPTTHREADID stidThread, const EXCEPINFO *pexcepinfo, DWORD dwFlags) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ActiveScript_Clone(IActiveScript *iface, IActiveScript **ppscript) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static const IActiveScriptVtbl ActiveScriptVtbl = { - ActiveScript_QueryInterface, - ActiveScript_AddRef, - ActiveScript_Release, - ActiveScript_SetScriptSite, - ActiveScript_GetScriptSite, - ActiveScript_SetScriptState, - ActiveScript_GetScriptState, - ActiveScript_Close, - ActiveScript_AddNamedItem, - ActiveScript_AddTypeLib, - ActiveScript_GetScriptDispatch, - ActiveScript_GetCurrentScriptThreadID, - ActiveScript_GetScriptThreadID, - ActiveScript_GetScriptThreadState, - ActiveScript_InterruptScriptThread, - ActiveScript_Clone -}; - -static IActiveScript ActiveScript = { &ActiveScriptVtbl }; - -static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv) -{ - *ppv = NULL; - - if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IClassFactory, riid)) { - *ppv = iface; - return S_OK; - } - - if(IsEqualGUID(&IID_IMarshal, riid)) - return E_NOINTERFACE; - if(IsEqualGUID(&CLSID_IdentityUnmarshal, riid)) - return E_NOINTERFACE; - - ok(0, "unexpected riid %s\n", debugstr_guid(riid)); - return E_NOTIMPL; -} - -static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface) -{ - return 2; -} - -static ULONG WINAPI ClassFactory_Release(IClassFactory *iface) -{ - return 1; -} - -static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) -{ - CHECK_EXPECT(CreateInstance); - - ok(!outer, "outer = %p\n", outer); - ok(IsEqualGUID(&IID_IActiveScript, riid), "unexpected riid %s\n", debugstr_guid(riid)); - *ppv = &ActiveScript; - return S_OK; -} - -static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL dolock) -{ - ok(0, "unexpected call\n"); - return S_OK; -} - -static const IClassFactoryVtbl ClassFactoryVtbl = { - ClassFactory_QueryInterface, - ClassFactory_AddRef, - ClassFactory_Release, - ClassFactory_CreateInstance, - ClassFactory_LockServer -}; - -static IClassFactory script_cf = { &ClassFactoryVtbl }; - -static const char simple_script_str[] = - "" - "
" - "" - ""; - -static void test_simple_script(void) -{ - IHTMLDocument2 *doc; - - doc = create_document(); - if(!doc) - return; - - SET_EXPECT(CreateInstance); - SET_EXPECT(GetInterfaceSafetyOptions); - SET_EXPECT(SetInterfaceSafetyOptions); - SET_EXPECT(SetProperty_INVOKEVERSIONING); /* IE8 */ - SET_EXPECT(SetProperty_HACK_TRIDENTEVENTSINK); - SET_EXPECT(InitNew); - SET_EXPECT(SetScriptSite); - SET_EXPECT(GetScriptState); - SET_EXPECT(SetScriptState_STARTED); - SET_EXPECT(AddNamedItem); - SET_EXPECT(SetProperty_ABBREVIATE_GLOBALNAME_RESOLUTION); /* IE8 */ - SET_EXPECT(ParseScriptText); - SET_EXPECT(SetScriptState_CONNECTED); - - load_doc(doc, simple_script_str); - - CHECK_CALLED(CreateInstance); - CHECK_CALLED(GetInterfaceSafetyOptions); - CHECK_CALLED(SetInterfaceSafetyOptions); - CHECK_CALLED_BROKEN(SetProperty_INVOKEVERSIONING); /* IE8 */ - CHECK_CALLED(SetProperty_HACK_TRIDENTEVENTSINK); - CHECK_CALLED(InitNew); - CHECK_CALLED(SetScriptSite); - CHECK_CALLED(GetScriptState); - CHECK_CALLED(SetScriptState_STARTED); - CHECK_CALLED(AddNamedItem); - CHECK_CALLED_BROKEN(SetProperty_ABBREVIATE_GLOBALNAME_RESOLUTION); /* IE8 */ - CHECK_CALLED(ParseScriptText); - CHECK_CALLED(SetScriptState_CONNECTED); - - if(site) - IActiveScriptSite_Release(site); - if(window_dispex) - IDispatchEx_Release(window_dispex); - - SET_EXPECT(SetScriptState_DISCONNECTED); - SET_EXPECT(Close); - - IHTMLDocument2_Release(doc); - - CHECK_CALLED(SetScriptState_DISCONNECTED); - CHECK_CALLED(Close); -} - -static void run_js_script(const char *test_name) -{ - WCHAR url[INTERNET_MAX_URL_LENGTH]; - char urlA[INTERNET_MAX_URL_LENGTH]; - IPersistMoniker *persist; - IHTMLDocument2 *doc; - IMoniker *mon; - MSG msg; - HRESULT hres; - - static const char res[] = "res://"; - - trace("running %s...\n", test_name); - - doc = create_document(); - if(!doc) - return; - - set_client_site(doc, TRUE); - do_advise(doc, &IID_IPropertyNotifySink, (IUnknown*)&PropertyNotifySink); - - lstrcpyA(urlA, res); - GetModuleFileNameA(NULL, urlA + lstrlenA(res), sizeof(urlA) - lstrlenA(res)); - lstrcatA(urlA, "/"); - lstrcatA(urlA, test_name); - MultiByteToWideChar(CP_ACP, 0, urlA, -1, url, sizeof(url)/sizeof(WCHAR)); - - hres = CreateURLMoniker(NULL, url, &mon); - ok(hres == S_OK, "CreateURLMoniker failed: %08x\n", hres); - - hres = IHTMLDocument2_QueryInterface(doc, &IID_IPersistMoniker, (void**)&persist); - ok(hres == S_OK, "Could not get IPersistMoniker iface: %08x\n", hres); - - hres = IPersistMoniker_Load(persist, FALSE, mon, NULL, 0); - ok(hres == S_OK, "Load failed: %08x\n", hres); - - IMoniker_Release(mon); - IPersistMoniker_Release(persist); - - SET_EXPECT(external_success); - - while(!called_external_success && GetMessage(&msg, NULL, 0, 0)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - CHECK_CALLED(external_success); - - set_client_site(doc, FALSE); - IHTMLDocument2_Release(doc); -} - -static void run_js_tests(void) -{ - run_js_script("jstest.html"); -} - -static BOOL init_registry(BOOL init) -{ - return init_key("TestScript\\CLSID", TESTSCRIPT_CLSID, init) - && init_key("CLSID\\"TESTSCRIPT_CLSID"\\Implemented Categories\\{F0B7A1A1-9847-11CF-8F20-00805F2CD064}", - NULL, init) - && init_key("CLSID\\"TESTSCRIPT_CLSID"\\Implemented Categories\\{F0B7A1A2-9847-11CF-8F20-00805F2CD064}", - NULL, init); -} - -static BOOL register_script_engine(void) -{ - DWORD regid; - HRESULT hres; - - if(!init_registry(TRUE)) { - init_registry(FALSE); - return FALSE; - } - - hres = CoRegisterClassObject(&CLSID_TestScript, (IUnknown *)&script_cf, - CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, ®id); - ok(hres == S_OK, "Could not register screipt engine: %08x\n", hres); - - return TRUE; -} - -static LRESULT WINAPI wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - return DefWindowProc(hwnd, msg, wParam, lParam); -} - -static HWND create_container_window(void) -{ - static const CHAR szHTMLDocumentTest[] = "HTMLDocumentTest"; - static WNDCLASSEXA wndclass = { - sizeof(WNDCLASSEXA), - 0, - wnd_proc, - 0, 0, NULL, NULL, NULL, NULL, NULL, - szHTMLDocumentTest, - NULL - }; - - RegisterClassExA(&wndclass); - return CreateWindowA(szHTMLDocumentTest, szHTMLDocumentTest, - WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, - 300, 300, NULL, NULL, NULL, NULL); -} - -START_TEST(script) -{ - CoInitialize(NULL); - container_hwnd = create_container_window(); - - if(winetest_interactive || ! is_ie_hardened()) { - if(register_script_engine()) { - test_simple_script(); - run_js_tests(); - init_registry(FALSE); - }else { - skip("Could not register TestScript engine\n"); - } - }else { - skip("IE running in Enhanced Security Configuration\n"); - } - - DestroyWindow(container_hwnd); - CoUninitialize(); -} diff --git a/rostests/winetests/mshtml/testlist.c b/rostests/winetests/mshtml/testlist.c deleted file mode 100644 index 55823446f28..00000000000 --- a/rostests/winetests/mshtml/testlist.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_dom(void); -extern void func_events(void); -extern void func_htmldoc(void); -extern void func_htmllocation(void); -extern void func_misc(void); -extern void func_protocol(void); -extern void func_script(void); - -const struct test winetest_testlist[] = -{ - { "dom", func_dom }, - { "events", func_events }, - { "htmldoc", func_htmldoc }, - { "htmllocation", func_htmllocation }, - { "misc", func_misc }, - { "protocol", func_protocol }, - { "script", func_script }, - { 0, 0 } -}; diff --git a/rostests/winetests/msi/CMakeLists.txt b/rostests/winetests/msi/CMakeLists.txt deleted file mode 100644 index c395e4d55ae..00000000000 --- a/rostests/winetests/msi/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - automation.c - db.c - format.c - install.c - msi.c - package.c - patch.c - record.c - source.c - suminfo.c - testlist.c) - -add_executable(msi_winetest ${SOURCE}) -target_link_libraries(msi_winetest wine uuid) -set_module_type(msi_winetest win32cui) -add_importlibs(msi_winetest cabinet msi shell32 ole32 oleaut32 user32 advapi32 version msvcrt kernel32 ntdll) -add_cd_file(TARGET msi_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/msi/automation.c b/rostests/winetests/msi/automation.c deleted file mode 100644 index bad4882fac7..00000000000 --- a/rostests/winetests/msi/automation.c +++ /dev/null @@ -1,2703 +0,0 @@ -/* - * Copyright (C) 2007 Mike McCormack for CodeWeavers - * Copyright (C) 2007 Misha Koshelev - * - * A test program for Microsoft Installer OLE automation functionality. - * - * 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 - -#include - -#include -#include -#include -#include -#include -#include - -#include "wine/test.h" - -DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); - -static const char *msifile = "winetest-automation.msi"; -static const WCHAR szMsifile[] = {'w','i','n','e','t','e','s','t','-','a','u','t','o','m','a','t','i','o','n','.','m','s','i',0}; -static const WCHAR szMSITEST[] = { 'M','S','I','T','E','S','T',0 }; -static const WCHAR szProductCode[] = { '{','F','1','C','3','A','F','5','0','-','8','B','5','6','-','4','A','6','9','-','A','0','0','C','-','0','0','7','7','3','F','E','4','2','F','3','0','}',0 }; -static const WCHAR szUpgradeCode[] = { '{','C','E','0','6','7','E','8','D','-','2','E','1','A','-','4','3','6','7','-','B','7','3','4','-','4','E','B','2','B','D','A','D','6','5','6','5','}',0 }; -static const WCHAR szProductInfoException[] = { 'P','r','o','d','u','c','t','I','n','f','o',',','P','r','o','d','u','c','t',',','A','t','t','r','i','b','u','t','e',0 }; -static const WCHAR WINE_INSTALLPROPERTY_PACKAGENAMEW[] = {'P','a','c','k','a','g','e','N','a','m','e',0}; -static const WCHAR WINE_INSTALLPROPERTY_PRODUCTNAMEW[] = {'P','r','o','d','u','c','t','N','a','m','e',0}; -static FILETIME systemtime; -static CHAR CURR_DIR[MAX_PATH]; -static EXCEPINFO excepinfo; - -/* - * OLE automation data - **/ -static const WCHAR szProgId[] = { 'W','i','n','d','o','w','s','I','n','s','t','a','l','l','e','r','.','I','n','s','t','a','l','l','e','r',0 }; -static IDispatch *pInstaller; - -/* msi database data */ - -static const CHAR component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "Five\t{8CC92E9D-14B2-4CA4-B2AA-B11D02078087}\tNEWDIR\t2\t\tfive.txt\n" - "Four\t{FD37B4EA-7209-45C0-8917-535F35A2F080}\tCABOUTDIR\t2\t\tfour.txt\n" - "One\t{783B242E-E185-4A56-AF86-C09815EC053C}\tMSITESTDIR\t2\t\tone.txt\n" - "Three\t{010B6ADD-B27D-4EDD-9B3D-34C4F7D61684}\tCHANGEDDIR\t2\t\tthree.txt\n" - "Two\t{BF03D1A6-20DA-4A65-82F3-6CAC995915CE}\tFIRSTDIR\t2\t\ttwo.txt\n" - "dangler\t{6091DF25-EF96-45F1-B8E9-A9B1420C7A3C}\tTARGETDIR\t4\t\tregdata\n" - "component\t\tMSITESTDIR\t0\t1\tfile\n"; - -static const CHAR directory_dat[] = "Directory\tDirectory_Parent\tDefaultDir\n" - "s72\tS72\tl255\n" - "Directory\tDirectory\n" - "CABOUTDIR\tMSITESTDIR\tcabout\n" - "CHANGEDDIR\tMSITESTDIR\tchanged:second\n" - "FIRSTDIR\tMSITESTDIR\tfirst\n" - "MSITESTDIR\tProgramFilesFolder\tmsitest\n" - "NEWDIR\tCABOUTDIR\tnew\n" - "ProgramFilesFolder\tTARGETDIR\t.\n" - "TARGETDIR\t\tSourceDir"; - -static const CHAR feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" - "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" - "Feature\tFeature\n" - "Five\t\tFive\tThe Five Feature\t5\t3\tNEWDIR\t0\n" - "Four\t\tFour\tThe Four Feature\t4\t3\tCABOUTDIR\t0\n" - "One\t\tOne\tThe One Feature\t1\t3\tMSITESTDIR\t0\n" - "Three\tOne\tThree\tThe Three Feature\t3\t3\tCHANGEDDIR\t0\n" - "Two\tOne\tTwo\tThe Two Feature\t2\t3\tFIRSTDIR\t0\n" - "feature\t\t\t\t2\t1\tTARGETDIR\t0\n"; - -static const CHAR feature_comp_dat[] = "Feature_\tComponent_\n" - "s38\ts72\n" - "FeatureComponents\tFeature_\tComponent_\n" - "Five\tFive\n" - "Four\tFour\n" - "One\tOne\n" - "Three\tThree\n" - "Two\tTwo\n" - "feature\tcomponent\n"; - -static const CHAR file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "five.txt\tFive\tfive.txt\t1000\t\t\t0\t5\n" - "four.txt\tFour\tfour.txt\t1000\t\t\t0\t4\n" - "one.txt\tOne\tone.txt\t1000\t\t\t0\t1\n" - "three.txt\tThree\tthree.txt\t1000\t\t\t0\t3\n" - "two.txt\tTwo\ttwo.txt\t1000\t\t\t0\t2\n" - "file\tcomponent\tfilename\t100\t\t\t8192\t1\n"; - -static const CHAR install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "AllocateRegistrySpace\tNOT Installed\t1550\n" - "CostFinalize\t\t1000\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "InstallFiles\t\t4000\n" - "RegisterProduct\t\t6100\n" - "PublishProduct\t\t6400\n" - "InstallFinalize\t\t6600\n" - "InstallInitialize\t\t1500\n" - "InstallValidate\t\t1400\n" - "LaunchConditions\t\t100\n" - "WriteRegistryValues\tSourceDir And SOURCEDIR\t5000"; - -static const CHAR media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n" - "i2\ti4\tL64\tS255\tS32\tS72\n" - "Media\tDiskId\n" - "1\t5\t\t\tDISK1\t\n"; - -static const CHAR property_dat[] = "Property\tValue\n" - "s72\tl0\n" - "Property\tProperty\n" - "DefaultUIFont\tDlgFont8\n" - "HASUIRUN\t0\n" - "INSTALLLEVEL\t3\n" - "InstallMode\tTypical\n" - "Manufacturer\tWine\n" - "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n" - "ProductCode\t{F1C3AF50-8B56-4A69-A00C-00773FE42F30}\n" - "ProductID\tnone\n" - "ProductLanguage\t1033\n" - "ProductName\tMSITEST\n" - "ProductVersion\t1.1.1\n" - "PROMPTROLLBACKCOST\tP\n" - "Setup\tSetup\n" - "UpgradeCode\t{CE067E8D-2E1A-4367-B734-4EB2BDAD6565}"; - -static const CHAR registry_dat[] = "Registry\tRoot\tKey\tName\tValue\tComponent_\n" - "s72\ti2\tl255\tL255\tL0\ts72\n" - "Registry\tRegistry\n" - "Apples\t2\tSOFTWARE\\Wine\\msitest\tName\timaname\tOne\n" - "Oranges\t2\tSOFTWARE\\Wine\\msitest\tnumber\t#314\tTwo\n" - "regdata\t2\tSOFTWARE\\Wine\\msitest\tblah\tbad\tdangler\n" - "OrderTest\t2\tSOFTWARE\\Wine\\msitest\tOrderTestName\tOrderTestValue\tcomponent"; - -typedef struct _msi_table -{ - const CHAR *filename; - const CHAR *data; - int size; -} msi_table; - -#define ADD_TABLE(x) {#x".idt", x##_dat, sizeof(x##_dat)} - -static const msi_table tables[] = -{ - ADD_TABLE(component), - ADD_TABLE(directory), - ADD_TABLE(feature), - ADD_TABLE(feature_comp), - ADD_TABLE(file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(property), - ADD_TABLE(registry) -}; - -typedef struct _msi_summary_info -{ - UINT property; - UINT datatype; - INT iValue; - FILETIME *pftValue; - const CHAR *szValue; -} msi_summary_info; - -#define ADD_INFO_I2(property, iValue) {property, VT_I2, iValue, NULL, NULL} -#define ADD_INFO_I4(property, iValue) {property, VT_I4, iValue, NULL, NULL} -#define ADD_INFO_LPSTR(property, szValue) {property, VT_LPSTR, 0, NULL, szValue} -#define ADD_INFO_FILETIME(property, pftValue) {property, VT_FILETIME, 0, pftValue, NULL} - -static const msi_summary_info summary_info[] = -{ - ADD_INFO_LPSTR(PID_TEMPLATE, ";1033"), - ADD_INFO_LPSTR(PID_REVNUMBER, "{004757CA-5092-49c2-AD20-28E1CE0DF5F2}"), - ADD_INFO_I4(PID_PAGECOUNT, 100), - ADD_INFO_I4(PID_WORDCOUNT, 0), - ADD_INFO_FILETIME(PID_CREATE_DTM, &systemtime), - ADD_INFO_FILETIME(PID_LASTPRINTED, &systemtime) -}; - -/* - * Database Helpers - */ - -static void write_file(const CHAR *filename, const char *data, int data_size) -{ - DWORD size; - - HANDLE hf = CreateFile(filename, GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - - WriteFile(hf, data, data_size, &size, NULL); - CloseHandle(hf); -} - -static void write_msi_summary_info(MSIHANDLE db, const msi_summary_info *info, int num_info) -{ - MSIHANDLE summary; - UINT r; - int j; - - r = MsiGetSummaryInformationA(db, NULL, num_info, &summary); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - /* import summary information into the stream */ - for (j = 0; j < num_info; j++) - { - const msi_summary_info *entry = &info[j]; - - r = MsiSummaryInfoSetPropertyA(summary, entry->property, entry->datatype, - entry->iValue, entry->pftValue, entry->szValue); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - } - - /* write the summary changes back to the stream */ - r = MsiSummaryInfoPersist(summary); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - MsiCloseHandle(summary); -} - -static void create_database(const CHAR *name, const msi_table *tables, int num_tables, - const msi_summary_info *info, int num_info) -{ - MSIHANDLE db; - UINT r; - int j; - - r = MsiOpenDatabaseA(name, MSIDBOPEN_CREATE, &db); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - /* import the tables into the database */ - for (j = 0; j < num_tables; j++) - { - const msi_table *table = &tables[j]; - - write_file(table->filename, table->data, (table->size - 1) * sizeof(char)); - - r = MsiDatabaseImportA(db, CURR_DIR, table->filename); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - DeleteFileA(table->filename); - } - - write_msi_summary_info(db, info, num_info); - - r = MsiDatabaseCommit(db); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - MsiCloseHandle(db); -} - -static BOOL create_package(LPWSTR path) -{ - DWORD len; - - /* Prepare package */ - create_database(msifile, tables, - sizeof(tables) / sizeof(msi_table), summary_info, - sizeof(summary_info) / sizeof(msi_summary_info)); - - len = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, - CURR_DIR, -1, path, MAX_PATH); - ok(len, "MultiByteToWideChar returned error %d\n", GetLastError()); - if (!len) - return FALSE; - - /* lstrcatW does not work on win95 */ - path[len - 1] = '\\'; - memcpy(&path[len], szMsifile, sizeof(szMsifile)); - return TRUE; -} - -/* - * Installation helpers - */ - -static char PROG_FILES_DIR[MAX_PATH]; - -static BOOL get_program_files_dir(LPSTR buf) -{ - HKEY hkey; - DWORD type = REG_EXPAND_SZ, size; - - if (RegOpenKey(HKEY_LOCAL_MACHINE, - "Software\\Microsoft\\Windows\\CurrentVersion", &hkey)) - return FALSE; - - size = MAX_PATH; - if (RegQueryValueEx(hkey, "ProgramFilesDir (x86)", 0, &type, (LPBYTE)buf, &size) && - RegQueryValueEx(hkey, "ProgramFilesDir", 0, &type, (LPBYTE)buf, &size)) - return FALSE; - - RegCloseKey(hkey); - return TRUE; -} - -static void create_file(const CHAR *name, DWORD size) -{ - HANDLE file; - DWORD written, left; - - file = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "Failure to open file %s\n", name); - WriteFile(file, name, strlen(name), &written, NULL); - WriteFile(file, "\n", strlen("\n"), &written, NULL); - - left = size - lstrlen(name) - 1; - - SetFilePointer(file, left, NULL, FILE_CURRENT); - SetEndOfFile(file); - - CloseHandle(file); -} - -static void create_test_files(void) -{ - CreateDirectoryA("msitest", NULL); - create_file("msitest\\one.txt", 100); - CreateDirectoryA("msitest\\first", NULL); - create_file("msitest\\first\\two.txt", 100); - CreateDirectoryA("msitest\\second", NULL); - create_file("msitest\\second\\three.txt", 100); - CreateDirectoryA("msitest\\cabout",NULL); - create_file("msitest\\cabout\\four.txt", 100); - CreateDirectoryA("msitest\\cabout\\new",NULL); - create_file("msitest\\cabout\\new\\five.txt", 100); - create_file("msitest\\filename", 100); -} - -static BOOL delete_pf(const CHAR *rel_path, BOOL is_file) -{ - CHAR path[MAX_PATH]; - - lstrcpyA(path, PROG_FILES_DIR); - lstrcatA(path, "\\"); - lstrcatA(path, rel_path); - - if (is_file) - return DeleteFileA(path); - else - return RemoveDirectoryA(path); -} - -static void delete_test_files(void) -{ - DeleteFileA(msifile); - DeleteFileA("msitest\\cabout\\new\\five.txt"); - DeleteFileA("msitest\\cabout\\four.txt"); - DeleteFileA("msitest\\second\\three.txt"); - DeleteFileA("msitest\\first\\two.txt"); - DeleteFileA("msitest\\one.txt"); - DeleteFileA("msitest\\filename"); - RemoveDirectoryA("msitest\\cabout\\new"); - RemoveDirectoryA("msitest\\cabout"); - RemoveDirectoryA("msitest\\second"); - RemoveDirectoryA("msitest\\first"); - RemoveDirectoryA("msitest"); -} - -/* - * Automation helpers and tests - */ - -/* ok-like statement which takes two unicode strings or one unicode and one ANSI string as arguments */ -static CHAR string1[MAX_PATH], string2[MAX_PATH]; - -/* lstrcmpW is not supported on Win9x */ -static int strcmp_ww(const WCHAR* str1, const WCHAR* str2) -{ - CHAR str1A[MAX_PATH], str2A[MAX_PATH]; - - WideCharToMultiByte(CP_ACP, 0, str1, -1, str1A, MAX_PATH, NULL, NULL); - WideCharToMultiByte(CP_ACP, 0, str2, -1, str2A, MAX_PATH, NULL, NULL); - - return lstrcmpA(str1A, str2A); -} - -#define ok_w2(format, szString1, szString2) \ -\ - do { \ - WideCharToMultiByte(CP_ACP, 0, szString1, -1, string1, MAX_PATH, NULL, NULL); \ - WideCharToMultiByte(CP_ACP, 0, szString2, -1, string2, MAX_PATH, NULL, NULL); \ - if (lstrcmpA(string1, string2) != 0) \ - ok(0, format, string1, string2); \ - } while(0); - -#define ok_w2n(format, szString1, szString2, len) \ -\ - if (memcmp(szString1, szString2, len * sizeof(WCHAR)) != 0) \ - { \ - WideCharToMultiByte(CP_ACP, 0, szString1, -1, string1, MAX_PATH, NULL, NULL); \ - WideCharToMultiByte(CP_ACP, 0, szString2, -1, string2, MAX_PATH, NULL, NULL); \ - ok(0, format, string1, string2); \ - } - -#define ok_aw(format, aString, wString) \ -\ - WideCharToMultiByte(CP_ACP, 0, wString, -1, string1, MAX_PATH, NULL, NULL); \ - if (lstrcmpA(string1, aString) != 0) \ - ok(0, format, string1, aString); \ - -#define ok_awplus(format, extra, aString, wString) \ -\ - WideCharToMultiByte(CP_ACP, 0, wString, -1, string1, MAX_PATH, NULL, NULL); \ - if (lstrcmpA(string1, aString) != 0) \ - ok(0, format, extra, string1, aString); \ - -/* exception checker */ -static WCHAR szSource[] = {'M','s','i',' ','A','P','I',' ','E','r','r','o','r',0}; - -#define ok_exception(hr, szDescription) \ - if (hr == DISP_E_EXCEPTION) \ - { \ - /* Compare wtype, source, and destination */ \ - ok(excepinfo.wCode == 1000, "Exception info was %d, expected 1000\n", excepinfo.wCode); \ -\ - ok(excepinfo.bstrSource != NULL, "Exception source was NULL\n"); \ - if (excepinfo.bstrSource) \ - ok_w2("Exception source was \"%s\" but expected to be \"%s\"\n", excepinfo.bstrSource, szSource); \ -\ - ok(excepinfo.bstrDescription != NULL, "Exception description was NULL\n"); \ - if (excepinfo.bstrDescription) \ - ok_w2("Exception description was \"%s\" but expected to be \"%s\"\n", excepinfo.bstrDescription, szDescription); \ -\ - SysFreeString(excepinfo.bstrSource); \ - SysFreeString(excepinfo.bstrDescription); \ - SysFreeString(excepinfo.bstrHelpFile); \ - } - -static DISPID get_dispid( IDispatch *disp, const char *name ) -{ - LPOLESTR str; - UINT len; - DISPID id = -1; - HRESULT r; - - len = MultiByteToWideChar(CP_ACP, 0, name, -1, NULL, 0 ); - str = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR) ); - if (str) - { - len = MultiByteToWideChar(CP_ACP, 0, name, -1, str, len ); - r = IDispatch_GetIDsOfNames( disp, &IID_NULL, &str, 1, 0, &id ); - HeapFree(GetProcessHeap(), 0, str); - if (r != S_OK) - return -1; - } - - return id; -} - -static void test_dispid(void) -{ - DISPID dispid; - - dispid = get_dispid(pInstaller, "CreateRecord"); - ok(dispid == 1, "Expected 1, got %d\n", dispid); - dispid = get_dispid(pInstaller, "OpenPackage"); - ok(dispid == 2, "Expected 2, got %d\n", dispid); - dispid = get_dispid(pInstaller, "OpenProduct"); - ok(dispid == 3, "Expected 3, got %d\n", dispid); - dispid = get_dispid(pInstaller, "OpenDatabase"); - ok(dispid == 4, "Expected 4, got %d\n", dispid); - dispid = get_dispid(pInstaller, "SummaryInformation"); - ok(dispid == 5, "Expected 5, got %d\n", dispid); - dispid = get_dispid( pInstaller, "UILevel" ); - ok(dispid == 6, "Expected 6, got %d\n", dispid); - dispid = get_dispid(pInstaller, "EnableLog"); - ok(dispid == 7, "Expected 7, got %d\n", dispid); - dispid = get_dispid(pInstaller, "InstallProduct"); - ok(dispid == 8, "Expected 8, got %d\n", dispid); - dispid = get_dispid(pInstaller, "Version"); - ok(dispid == 9, "Expected 9, got %d\n", dispid); - dispid = get_dispid(pInstaller, "LastErrorRecord"); - ok(dispid == 10, "Expected 10, got %d\n", dispid); - dispid = get_dispid(pInstaller, "RegistryValue"); - ok(dispid == 11, "Expected 11, got %d\n", dispid); - dispid = get_dispid(pInstaller, "Environment"); - ok(dispid == 12, "Expected 12, got %d\n", dispid); - dispid = get_dispid(pInstaller, "FileAttributes"); - ok(dispid == 13, "Expected 13, got %d\n", dispid); - dispid = get_dispid(pInstaller, "FileSize"); - ok(dispid == 15, "Expected 15, got %d\n", dispid); - dispid = get_dispid(pInstaller, "FileVersion"); - ok(dispid == 16, "Expected 16, got %d\n", dispid); - dispid = get_dispid(pInstaller, "ProductState"); - ok(dispid == 17, "Expected 17, got %d\n", dispid); - dispid = get_dispid(pInstaller, "ProductInfo"); - ok(dispid == 18, "Expected 18, got %d\n", dispid); - todo_wine - { - dispid = get_dispid(pInstaller, "ConfigureProduct"); - ok(dispid == 19, "Expected 19, got %d\n", dispid); - dispid = get_dispid(pInstaller, "ReinstallProduct"); - ok(dispid == 20 , "Expected 20, got %d\n", dispid); - dispid = get_dispid(pInstaller, "CollectUserInfo"); - ok(dispid == 21, "Expected 21, got %d\n", dispid); - dispid = get_dispid(pInstaller, "ApplyPatch"); - ok(dispid == 22, "Expected 22, got %d\n", dispid); - dispid = get_dispid(pInstaller, "FeatureParent"); - ok(dispid == 23, "Expected 23, got %d\n", dispid); - dispid = get_dispid(pInstaller, "FeatureState"); - ok(dispid == 24, "Expected 24, got %d\n", dispid); - dispid = get_dispid(pInstaller, "UseFeature"); - ok(dispid == 25, "Expected 25, got %d\n", dispid); - dispid = get_dispid(pInstaller, "FeatureUsageCount"); - ok(dispid == 26, "Expected 26, got %d\n", dispid); - dispid = get_dispid(pInstaller, "FeatureUsageDate"); - ok(dispid == 27, "Expected 27, got %d\n", dispid); - dispid = get_dispid(pInstaller, "ConfigureFeature"); - ok(dispid == 28, "Expected 28, got %d\n", dispid); - dispid = get_dispid(pInstaller, "ReinstallFeature"); - ok(dispid == 29, "Expected 29, got %d\n", dispid); - dispid = get_dispid(pInstaller, "ProvideComponent"); - ok(dispid == 30, "Expected 30, got %d\n", dispid); - dispid = get_dispid(pInstaller, "ComponentPath"); - ok(dispid == 31, "Expected 31, got %d\n", dispid); - dispid = get_dispid(pInstaller, "ProvideQualifiedComponent"); - ok(dispid == 32, "Expected 32, got %d\n", dispid); - dispid = get_dispid(pInstaller, "QualifierDescription"); - ok(dispid == 33, "Expected 33, got %d\n", dispid); - dispid = get_dispid(pInstaller, "ComponentQualifiers"); - ok(dispid == 34, "Expected 34, got %d\n", dispid); - } - dispid = get_dispid(pInstaller, "Products"); - ok(dispid == 35, "Expected 35, got %d\n", dispid); - todo_wine - { - dispid = get_dispid(pInstaller, "Features"); - ok(dispid == 36, "Expected 36, got %d\n", dispid); - dispid = get_dispid(pInstaller, "Components"); - ok(dispid == 37, "Expected 37, got %d\n", dispid); - dispid = get_dispid(pInstaller, "ComponentClients"); - ok(dispid == 38, "Expected 38, got %d\n", dispid); - dispid = get_dispid(pInstaller, "Patches"); - ok(dispid == 39, "Expected 39, got %d\n", dispid); - } - dispid = get_dispid(pInstaller, "RelatedProducts"); - ok(dispid == 40, "Expected 40, got %d\n", dispid); - todo_wine - { - dispid = get_dispid(pInstaller, "PatchInfo"); - ok(dispid == 41, "Expected 41, got %d\n", dispid); - dispid = get_dispid(pInstaller, "PatchTransforms"); - ok(dispid == 42, "Expected 42, got %d\n", dispid); - dispid = get_dispid(pInstaller, "AddSource"); - ok(dispid == 43, "Expected 43, got %d\n", dispid); - dispid = get_dispid(pInstaller, "ClearSourceList"); - ok(dispid == 44, "Expected 44, got %d\n", dispid); - dispid = get_dispid(pInstaller, "ForceSourceListResolution"); - ok(dispid == 45, "Expected 45, got %d\n", dispid); - dispid = get_dispid(pInstaller, "ShortcutTarget"); - ok(dispid == 46, "Expected 46, got %d\n", dispid); - dispid = get_dispid(pInstaller, "FileHash"); - ok(dispid == 47, "Expected 47, got %d\n", dispid); - dispid = get_dispid(pInstaller, "FileSignatureInfo"); - ok(dispid == 48, "Expected 48, got %d\n", dispid); - } - dispid = get_dispid(pInstaller, "RemovePatches"); - ok(dispid == 49 || dispid == -1, "Expected 49 or -1, got %d\n", dispid); - dispid = get_dispid(pInstaller, "ApplyMultiplePatches"); - ok(dispid == 51 || dispid == -1, "Expected 51 or -1, got %d\n", dispid); - dispid = get_dispid(pInstaller, "ProductsEx"); - ok(dispid == 52 || dispid == -1, "Expected 52 or -1, got %d\n", dispid); - dispid = get_dispid(pInstaller, "PatchesEx"); - ok(dispid == 55 || dispid == -1, "Expected 55 or -1, got %d\n", dispid); - dispid = get_dispid(pInstaller, "ExtractPatchXMLData"); - ok(dispid == 57 || dispid == -1, "Expected 57 or -1, got %d\n", dispid); - dispid = get_dispid( pInstaller, "ProductElevated" ); - ok(dispid == 59 || dispid == -1, "Expected 59 or -1, got %d\n", dispid); - dispid = get_dispid( pInstaller, "ProvideAssembly" ); - ok(dispid == 60 || dispid == -1, "Expected 60 or -1, got %d\n", dispid); - dispid = get_dispid( pInstaller, "ProductInfoFromScript" ); - ok(dispid == 61 || dispid == -1, "Expected 61 or -1, got %d\n", dispid); - dispid = get_dispid( pInstaller, "AdvertiseProduct" ); - ok(dispid == 62 || dispid == -1, "Expected 62 or -1, got %d\n", dispid); - dispid = get_dispid( pInstaller, "CreateAdvertiseScript" ); - ok(dispid == 63 || dispid == -1, "Expected 63 or -1, got %d\n", dispid); - dispid = get_dispid( pInstaller, "PatchFiles" ); - ok(dispid == 65 || dispid == -1, "Expected 65 or -1, got %d\n", dispid); -} - -/* Test basic IDispatch functions */ -static void test_dispatch(void) -{ - static WCHAR szOpenPackage[] = { 'O','p','e','n','P','a','c','k','a','g','e',0 }; - static WCHAR szOpenPackageException[] = {'O','p','e','n','P','a','c','k','a','g','e',',','P','a','c','k','a','g','e','P','a','t','h',',','O','p','t','i','o','n','s',0}; - static WCHAR szProductState[] = { 'P','r','o','d','u','c','t','S','t','a','t','e',0 }; - HRESULT hr; - DISPID dispid; - OLECHAR *name; - VARIANT varresult; - VARIANTARG vararg[3]; - WCHAR path[MAX_PATH]; - DISPPARAMS dispparams = {NULL, NULL, 0, 0}; - - /* Test getting ID of a function name that does not exist */ - name = (WCHAR *)szMsifile; - hr = IDispatch_GetIDsOfNames(pInstaller, &IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &dispid); - ok(hr == DISP_E_UNKNOWNNAME, "IDispatch::GetIDsOfNames returned 0x%08x\n", hr); - - /* Test invoking this function */ - hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, NULL, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); - - /* Test getting ID of a function name that does exist */ - name = szOpenPackage; - hr = IDispatch_GetIDsOfNames(pInstaller, &IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &dispid); - ok(hr == S_OK, "IDispatch::GetIDsOfNames returned 0x%08x\n", hr); - - /* Test invoking this function (without parameters passed) */ - if (0) /* All of these crash MSI on Windows XP */ - { - hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, NULL, NULL, NULL, NULL); - hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, NULL, NULL, &excepinfo, NULL); - VariantInit(&varresult); - hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, NULL, &varresult, &excepinfo, NULL); - } - - /* Try with NULL params */ - hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned 0x%08x\n", hr); - - /* Try one empty parameter */ - dispparams.rgvarg = vararg; - dispparams.cArgs = 1; - VariantInit(&vararg[0]); - hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned 0x%08x\n", hr); - - /* Try two empty parameters */ - dispparams.cArgs = 2; - VariantInit(&vararg[0]); - VariantInit(&vararg[1]); - hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned 0x%08x\n", hr); - - /* Try one parameter, the required BSTR. Second parameter is optional. - * NOTE: The specified package does not exist, which is why the call fails. - */ - dispparams.cArgs = 1; - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_BSTR; - V_BSTR(&vararg[0]) = SysAllocString(szMsifile); - hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_EXCEPTION, "IDispatch::Invoke returned 0x%08x\n", hr); - ok_exception(hr, szOpenPackageException); - VariantClear(&vararg[0]); - - /* Provide the required BSTR and an empty second parameter. - * NOTE: The specified package does not exist, which is why the call fails. - */ - dispparams.cArgs = 2; - VariantInit(&vararg[1]); - V_VT(&vararg[1]) = VT_BSTR; - V_BSTR(&vararg[1]) = SysAllocString(szMsifile); - VariantInit(&vararg[0]); - hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_EXCEPTION, "IDispatch::Invoke returned 0x%08x\n", hr); - ok_exception(hr, szOpenPackageException); - VariantClear(&vararg[1]); - - /* Provide the required BSTR and two empty parameters. - * NOTE: The specified package does not exist, which is why the call fails. - */ - dispparams.cArgs = 3; - VariantInit(&vararg[2]); - V_VT(&vararg[2]) = VT_BSTR; - V_BSTR(&vararg[2]) = SysAllocString(szMsifile); - VariantInit(&vararg[1]); - VariantInit(&vararg[0]); - hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_EXCEPTION, "IDispatch::Invoke returned 0x%08x\n", hr); - ok_exception(hr, szOpenPackageException); - VariantClear(&vararg[2]); - - /* Provide the required BSTR and a second parameter with the wrong type. */ - dispparams.cArgs = 2; - VariantInit(&vararg[1]); - V_VT(&vararg[1]) = VT_BSTR; - V_BSTR(&vararg[1]) = SysAllocString(szMsifile); - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_BSTR; - V_BSTR(&vararg[0]) = SysAllocString(szMsifile); - hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned 0x%08x\n", hr); - VariantClear(&vararg[0]); - VariantClear(&vararg[1]); - - /* Create a proper installer package. */ - create_package(path); - - /* Try one parameter, the required BSTR. Second parameter is optional. - * Proper installer package exists. Path to the package is relative. - */ - dispparams.cArgs = 1; - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_BSTR; - V_BSTR(&vararg[0]) = SysAllocString(szMsifile); - hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - todo_wine ok(hr == DISP_E_EXCEPTION, "IDispatch::Invoke returned 0x%08x\n", hr); - ok_exception(hr, szOpenPackageException); - VariantClear(&vararg[0]); - if (hr != DISP_E_EXCEPTION) - VariantClear(&varresult); - - /* Try one parameter, the required BSTR. Second parameter is optional. - * Proper installer package exists. Path to the package is absolute. - */ - dispparams.cArgs = 1; - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_BSTR; - V_BSTR(&vararg[0]) = SysAllocString(path); - hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == S_OK, "IDispatch::Invoke returned 0x%08x\n", hr); - VariantClear(&vararg[0]); - VariantClear(&varresult); - - /* Provide the required BSTR and an empty second parameter. Proper - * installation package exists. - */ - dispparams.cArgs = 2; - VariantInit(&vararg[1]); - V_VT(&vararg[1]) = VT_BSTR; - V_BSTR(&vararg[1]) = SysAllocString(path); - VariantInit(&vararg[0]); - hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == S_OK, "IDispatch::Invoke returned 0x%08x\n", hr); - VariantClear(&vararg[1]); - VariantClear(&varresult); - - /* Provide the required BSTR and two empty parameters. Proper - * installation package exists. - */ - dispparams.cArgs = 3; - VariantInit(&vararg[2]); - V_VT(&vararg[2]) = VT_BSTR; - V_BSTR(&vararg[2]) = SysAllocString(path); - VariantInit(&vararg[1]); - VariantInit(&vararg[0]); - hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == S_OK, "IDispatch::Invoke returned 0x%08x\n", hr); - VariantClear(&vararg[2]); - VariantClear(&varresult); - - /* Provide the required BSTR and a second parameter with the wrong type. */ - dispparams.cArgs = 2; - VariantInit(&vararg[1]); - V_VT(&vararg[1]) = VT_BSTR; - V_BSTR(&vararg[1]) = SysAllocString(path); - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_BSTR; - V_BSTR(&vararg[0]) = SysAllocString(path); - hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned 0x%08x\n", hr); - VariantClear(&vararg[0]); - VariantClear(&vararg[1]); - - /* Provide the required BSTR and a second parameter that can be coerced to - * VT_I4. - */ - dispparams.cArgs = 2; - VariantInit(&vararg[1]); - V_VT(&vararg[1]) = VT_BSTR; - V_BSTR(&vararg[1]) = SysAllocString(path); - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_I2; - V_BSTR(&vararg[0]) = 0; - hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == S_OK, "IDispatch::Invoke returned 0x%08x\n", hr); - VariantClear(&vararg[1]); - VariantClear(&varresult); - - DeleteFileW(path); - - /* Test invoking a method as a DISPATCH_PROPERTYGET or DISPATCH_PROPERTYPUT */ - VariantInit(&vararg[0]); - hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); - - VariantInit(&vararg[0]); - hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); - - /* Test invoking a read-only property as DISPATCH_PROPERTYPUT or as a DISPATCH_METHOD */ - name = szProductState; - hr = IDispatch_GetIDsOfNames(pInstaller, &IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &dispid); - ok(hr == S_OK, "IDispatch::GetIDsOfNames returned 0x%08x\n", hr); - - dispparams.rgvarg = NULL; - dispparams.cArgs = 0; - hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); - - dispparams.rgvarg = NULL; - dispparams.cArgs = 0; - hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "IDispatch::Invoke returned 0x%08x\n", hr); -} - -/* invocation helper function */ -static int _invoke_todo_vtResult = 0; - -static HRESULT invoke(IDispatch *pDispatch, LPCSTR szName, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, VARTYPE vtResult) -{ - OLECHAR *name = NULL; - DISPID dispid; - HRESULT hr; - UINT i; - UINT len; - - memset(pVarResult, 0, sizeof(VARIANT)); - VariantInit(pVarResult); - - len = MultiByteToWideChar(CP_ACP, 0, szName, -1, NULL, 0 ); - name = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR) ); - if (!name) return E_FAIL; - len = MultiByteToWideChar(CP_ACP, 0, szName, -1, name, len ); - hr = IDispatch_GetIDsOfNames(pDispatch, &IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &dispid); - HeapFree(GetProcessHeap(), 0, name); - ok(hr == S_OK, "IDispatch::GetIDsOfNames returned 0x%08x\n", hr); - if (!hr == S_OK) return hr; - - memset(&excepinfo, 0, sizeof(excepinfo)); - hr = IDispatch_Invoke(pDispatch, dispid, &IID_NULL, LOCALE_NEUTRAL, wFlags, pDispParams, pVarResult, &excepinfo, NULL); - - if (hr == S_OK) - { - if (_invoke_todo_vtResult) todo_wine - ok(V_VT(pVarResult) == vtResult, "Variant result type is %d, expected %d\n", V_VT(pVarResult), vtResult); - else - ok(V_VT(pVarResult) == vtResult, "Variant result type is %d, expected %d\n", V_VT(pVarResult), vtResult); - if (vtResult != VT_EMPTY) - { - hr = VariantChangeTypeEx(pVarResult, pVarResult, LOCALE_NEUTRAL, 0, vtResult); - ok(hr == S_OK, "VariantChangeTypeEx returned 0x%08x\n", hr); - } - } - - for (i=0; icArgs; i++) - VariantClear(&pDispParams->rgvarg[i]); - - return hr; -} - -/* Object_Property helper functions */ - -static HRESULT Installer_CreateRecord(int count, IDispatch **pRecord) -{ - VARIANT varresult; - VARIANTARG vararg[1]; - DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0}; - HRESULT hr; - - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_I4; - V_I4(&vararg[0]) = count; - - hr = invoke(pInstaller, "CreateRecord", DISPATCH_METHOD, &dispparams, &varresult, VT_DISPATCH); - *pRecord = V_DISPATCH(&varresult); - return hr; -} - -static HRESULT Installer_RegistryValue(HKEY hkey, LPCWSTR szKey, VARIANT vValue, VARIANT *pVarResult, VARTYPE vtExpect) -{ - VARIANTARG vararg[3]; - DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0}; - - VariantInit(&vararg[2]); - V_VT(&vararg[2]) = VT_I4; - V_I4(&vararg[2]) = (INT_PTR)hkey; - VariantInit(&vararg[1]); - V_VT(&vararg[1]) = VT_BSTR; - V_BSTR(&vararg[1]) = SysAllocString(szKey); - VariantInit(&vararg[0]); - VariantCopy(&vararg[0], &vValue); - VariantClear(&vValue); - - return invoke(pInstaller, "RegistryValue", DISPATCH_METHOD, &dispparams, pVarResult, vtExpect); -} - -static HRESULT Installer_RegistryValueE(HKEY hkey, LPCWSTR szKey, BOOL *pBool) -{ - VARIANT varresult; - VARIANTARG vararg; - HRESULT hr; - - VariantInit(&vararg); - V_VT(&vararg) = VT_EMPTY; - hr = Installer_RegistryValue(hkey, szKey, vararg, &varresult, VT_BOOL); - *pBool = V_BOOL(&varresult); - VariantClear(&varresult); - return hr; -} - -static HRESULT Installer_RegistryValueW(HKEY hkey, LPCWSTR szKey, LPCWSTR szValue, LPWSTR szString) -{ - VARIANT varresult; - VARIANTARG vararg; - HRESULT hr; - - VariantInit(&vararg); - V_VT(&vararg) = VT_BSTR; - V_BSTR(&vararg) = SysAllocString(szValue); - - hr = Installer_RegistryValue(hkey, szKey, vararg, &varresult, VT_BSTR); - if (V_BSTR(&varresult)) - /* lstrcpyW is not implemented on Win95 (lstrlenW is though) */ - memcpy(szString, V_BSTR(&varresult), (lstrlenW(V_BSTR(&varresult)) + 1) * sizeof(WCHAR)); - VariantClear(&varresult); - return hr; -} - -static HRESULT Installer_RegistryValueI(HKEY hkey, LPCWSTR szKey, int iValue, LPWSTR szString, VARTYPE vtResult) -{ - VARIANT varresult; - VARIANTARG vararg; - HRESULT hr; - - VariantInit(&vararg); - V_VT(&vararg) = VT_I4; - V_I4(&vararg) = iValue; - - hr = Installer_RegistryValue(hkey, szKey, vararg, &varresult, vtResult); - if (SUCCEEDED(hr) && vtResult == VT_BSTR) - memcpy(szString, V_BSTR(&varresult), (lstrlenW(V_BSTR(&varresult)) + 1) * sizeof(WCHAR)); - VariantClear(&varresult); - return hr; -} - -static HRESULT Installer_OpenPackage(LPCWSTR szPackagePath, int options, IDispatch **pSession) -{ - VARIANT varresult; - VARIANTARG vararg[2]; - DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0}; - HRESULT hr; - - VariantInit(&vararg[1]); - V_VT(&vararg[1]) = VT_BSTR; - V_BSTR(&vararg[1]) = SysAllocString(szPackagePath); - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_I4; - V_I4(&vararg[0]) = options; - - hr = invoke(pInstaller, "OpenPackage", DISPATCH_METHOD, &dispparams, &varresult, VT_DISPATCH); - *pSession = V_DISPATCH(&varresult); - return hr; -} - -static HRESULT Installer_OpenDatabase(LPCWSTR szDatabasePath, int openmode, IDispatch **pDatabase) -{ - VARIANT varresult; - VARIANTARG vararg[2]; - DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0}; - HRESULT hr; - - VariantInit(&vararg[1]); - V_VT(&vararg[1]) = VT_BSTR; - V_BSTR(&vararg[1]) = SysAllocString(szDatabasePath); - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_I4; - V_I4(&vararg[0]) = openmode; - - hr = invoke(pInstaller, "OpenDatabase", DISPATCH_METHOD, &dispparams, &varresult, VT_DISPATCH); - *pDatabase = V_DISPATCH(&varresult); - return hr; -} - -static HRESULT Installer_InstallProduct(LPCWSTR szPackagePath, LPCWSTR szPropertyValues) -{ - VARIANT varresult; - VARIANTARG vararg[2]; - DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0}; - - VariantInit(&vararg[1]); - V_VT(&vararg[1]) = VT_BSTR; - V_BSTR(&vararg[1]) = SysAllocString(szPackagePath); - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_BSTR; - V_BSTR(&vararg[0]) = SysAllocString(szPropertyValues); - - return invoke(pInstaller, "InstallProduct", DISPATCH_METHOD, &dispparams, &varresult, VT_EMPTY); -} - -static HRESULT Installer_ProductState(LPCWSTR szProduct, int *pInstallState) -{ - VARIANT varresult; - VARIANTARG vararg[1]; - DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0}; - HRESULT hr; - - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_BSTR; - V_BSTR(&vararg[0]) = SysAllocString(szProduct); - - hr = invoke(pInstaller, "ProductState", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_I4); - *pInstallState = V_I4(&varresult); - VariantClear(&varresult); - return hr; -} - -static HRESULT Installer_ProductInfo(LPCWSTR szProduct, LPCWSTR szAttribute, LPWSTR szString) -{ - VARIANT varresult; - VARIANTARG vararg[2]; - DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0}; - HRESULT hr; - - VariantInit(&vararg[1]); - V_VT(&vararg[1]) = VT_BSTR; - V_BSTR(&vararg[1]) = SysAllocString(szProduct); - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_BSTR; - V_BSTR(&vararg[0]) = SysAllocString(szAttribute); - - hr = invoke(pInstaller, "ProductInfo", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_BSTR); - if (V_BSTR(&varresult)) - memcpy(szString, V_BSTR(&varresult), (lstrlenW(V_BSTR(&varresult)) + 1) * sizeof(WCHAR)); - VariantClear(&varresult); - return hr; -} - -static HRESULT Installer_Products(IDispatch **pStringList) -{ - VARIANT varresult; - DISPPARAMS dispparams = {NULL, NULL, 0, 0}; - HRESULT hr; - - hr = invoke(pInstaller, "Products", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_DISPATCH); - *pStringList = V_DISPATCH(&varresult); - return hr; -} - -static HRESULT Installer_RelatedProducts(LPCWSTR szProduct, IDispatch **pStringList) -{ - VARIANT varresult; - VARIANTARG vararg[1]; - DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0}; - HRESULT hr; - - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_BSTR; - V_BSTR(&vararg[0]) = SysAllocString(szProduct); - - hr = invoke(pInstaller, "RelatedProducts", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_DISPATCH); - *pStringList = V_DISPATCH(&varresult); - return hr; -} - -static HRESULT Installer_VersionGet(LPWSTR szVersion) -{ - VARIANT varresult; - DISPPARAMS dispparams = {NULL, NULL, 0, 0}; - HRESULT hr; - - hr = invoke(pInstaller, "Version", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_BSTR); - if (V_BSTR(&varresult)) - memcpy(szVersion, V_BSTR(&varresult), (lstrlenW(V_BSTR(&varresult)) + 1) * sizeof(WCHAR)); - VariantClear(&varresult); - return hr; -} - -static HRESULT Session_Installer(IDispatch *pSession, IDispatch **pInst) -{ - VARIANT varresult; - DISPPARAMS dispparams = {NULL, NULL, 0, 0}; - HRESULT hr; - - hr = invoke(pSession, "Installer", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_DISPATCH); - *pInst = V_DISPATCH(&varresult); - return hr; -} - -static HRESULT Session_PropertyGet(IDispatch *pSession, LPCWSTR szName, LPWSTR szReturn) -{ - VARIANT varresult; - VARIANTARG vararg[1]; - DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0}; - HRESULT hr; - - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_BSTR; - V_BSTR(&vararg[0]) = SysAllocString(szName); - - hr = invoke(pSession, "Property", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_BSTR); - if (V_BSTR(&varresult)) - memcpy(szReturn, V_BSTR(&varresult), (lstrlenW(V_BSTR(&varresult)) + 1) * sizeof(WCHAR)); - VariantClear(&varresult); - return hr; -} - -static HRESULT Session_PropertyPut(IDispatch *pSession, LPCWSTR szName, LPCWSTR szValue) -{ - VARIANT varresult; - VARIANTARG vararg[2]; - DISPID dispid = DISPID_PROPERTYPUT; - DISPPARAMS dispparams = {vararg, &dispid, sizeof(vararg)/sizeof(VARIANTARG), 1}; - - VariantInit(&vararg[1]); - V_VT(&vararg[1]) = VT_BSTR; - V_BSTR(&vararg[1]) = SysAllocString(szName); - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_BSTR; - V_BSTR(&vararg[0]) = SysAllocString(szValue); - - return invoke(pSession, "Property", DISPATCH_PROPERTYPUT, &dispparams, &varresult, VT_EMPTY); -} - -static HRESULT Session_LanguageGet(IDispatch *pSession, UINT *pLangId) -{ - VARIANT varresult; - DISPPARAMS dispparams = {NULL, NULL, 0, 0}; - HRESULT hr; - - hr = invoke(pSession, "Language", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_I4); - *pLangId = V_I4(&varresult); - VariantClear(&varresult); - return hr; -} - -static HRESULT Session_ModeGet(IDispatch *pSession, int iFlag, BOOL *pMode) -{ - VARIANT varresult; - VARIANTARG vararg[1]; - DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0}; - HRESULT hr; - - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_I4; - V_I4(&vararg[0]) = iFlag; - - hr = invoke(pSession, "Mode", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_BOOL); - *pMode = V_BOOL(&varresult); - VariantClear(&varresult); - return hr; -} - -static HRESULT Session_ModePut(IDispatch *pSession, int iFlag, BOOL bMode) -{ - VARIANT varresult; - VARIANTARG vararg[2]; - DISPID dispid = DISPID_PROPERTYPUT; - DISPPARAMS dispparams = {vararg, &dispid, sizeof(vararg)/sizeof(VARIANTARG), 1}; - - VariantInit(&vararg[1]); - V_VT(&vararg[1]) = VT_I4; - V_I4(&vararg[1]) = iFlag; - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_BOOL; - V_BOOL(&vararg[0]) = bMode; - - return invoke(pSession, "Mode", DISPATCH_PROPERTYPUT, &dispparams, &varresult, VT_EMPTY); -} - -static HRESULT Session_Database(IDispatch *pSession, IDispatch **pDatabase) -{ - VARIANT varresult; - DISPPARAMS dispparams = {NULL, NULL, 0, 0}; - HRESULT hr; - - hr = invoke(pSession, "Database", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_DISPATCH); - *pDatabase = V_DISPATCH(&varresult); - return hr; -} - -static HRESULT Session_DoAction(IDispatch *pSession, LPCWSTR szAction, int *iReturn) -{ - VARIANT varresult; - VARIANTARG vararg[1]; - DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0}; - HRESULT hr; - - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_BSTR; - V_BSTR(&vararg[0]) = SysAllocString(szAction); - - hr = invoke(pSession, "DoAction", DISPATCH_METHOD, &dispparams, &varresult, VT_I4); - *iReturn = V_I4(&varresult); - VariantClear(&varresult); - return hr; -} - -static HRESULT Session_EvaluateCondition(IDispatch *pSession, LPCWSTR szCondition, int *iReturn) -{ - VARIANT varresult; - VARIANTARG vararg[1]; - DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0}; - HRESULT hr; - - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_BSTR; - V_BSTR(&vararg[0]) = SysAllocString(szCondition); - - hr = invoke(pSession, "EvaluateCondition", DISPATCH_METHOD, &dispparams, &varresult, VT_I4); - *iReturn = V_I4(&varresult); - VariantClear(&varresult); - return hr; -} - -static HRESULT Session_Message(IDispatch *pSession, LONG kind, IDispatch *record, int *ret) -{ - VARIANT varresult; - VARIANTARG vararg[2]; - DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0}; - HRESULT hr; - - VariantInit(&varresult); - V_VT(vararg) = VT_DISPATCH; - V_DISPATCH(vararg) = record; - V_VT(vararg+1) = VT_I4; - V_I4(vararg+1) = kind; - - hr = invoke(pSession, "Message", DISPATCH_METHOD, &dispparams, &varresult, VT_I4); - - ok(V_VT(&varresult) == VT_I4, "V_VT(varresult) = %d\n", V_VT(&varresult)); - *ret = V_I4(&varresult); - - return hr; -} - -static HRESULT Session_SetInstallLevel(IDispatch *pSession, LONG iInstallLevel) -{ - VARIANT varresult; - VARIANTARG vararg[1]; - DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0}; - - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_I4; - V_I4(&vararg[0]) = iInstallLevel; - - return invoke(pSession, "SetInstallLevel", DISPATCH_METHOD, &dispparams, &varresult, VT_EMPTY); -} - -static HRESULT Session_FeatureCurrentState(IDispatch *pSession, LPCWSTR szName, int *pState) -{ - VARIANT varresult; - VARIANTARG vararg[1]; - DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0}; - HRESULT hr; - - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_BSTR; - V_BSTR(&vararg[0]) = SysAllocString(szName); - - hr = invoke(pSession, "FeatureCurrentState", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_I4); - *pState = V_I4(&varresult); - VariantClear(&varresult); - return hr; -} - -static HRESULT Session_FeatureRequestStateGet(IDispatch *pSession, LPCWSTR szName, int *pState) -{ - VARIANT varresult; - VARIANTARG vararg[1]; - DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0}; - HRESULT hr; - - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_BSTR; - V_BSTR(&vararg[0]) = SysAllocString(szName); - - hr = invoke(pSession, "FeatureRequestState", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_I4); - *pState = V_I4(&varresult); - VariantClear(&varresult); - return hr; -} - -static HRESULT Session_FeatureRequestStatePut(IDispatch *pSession, LPCWSTR szName, int iState) -{ - VARIANT varresult; - VARIANTARG vararg[2]; - DISPID dispid = DISPID_PROPERTYPUT; - DISPPARAMS dispparams = {vararg, &dispid, sizeof(vararg)/sizeof(VARIANTARG), 1}; - - VariantInit(&vararg[1]); - V_VT(&vararg[1]) = VT_BSTR; - V_BSTR(&vararg[1]) = SysAllocString(szName); - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_I4; - V_I4(&vararg[0]) = iState; - - return invoke(pSession, "FeatureRequestState", DISPATCH_PROPERTYPUT, &dispparams, &varresult, VT_EMPTY); -} - -static HRESULT Database_OpenView(IDispatch *pDatabase, LPCWSTR szSql, IDispatch **pView) -{ - VARIANT varresult; - VARIANTARG vararg[1]; - DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0}; - HRESULT hr; - - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_BSTR; - V_BSTR(&vararg[0]) = SysAllocString(szSql); - - hr = invoke(pDatabase, "OpenView", DISPATCH_METHOD, &dispparams, &varresult, VT_DISPATCH); - *pView = V_DISPATCH(&varresult); - return hr; -} - -static HRESULT Database_SummaryInformation(IDispatch *pDatabase, int iUpdateCount, IDispatch **pSummaryInfo) -{ - VARIANT varresult; - VARIANTARG vararg[1]; - DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0}; - HRESULT hr; - - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_I4; - V_I4(&vararg[0]) = iUpdateCount; - - hr = invoke(pDatabase, "SummaryInformation", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_DISPATCH); - *pSummaryInfo = V_DISPATCH(&varresult); - return hr; -} - -static HRESULT View_Execute(IDispatch *pView, IDispatch *pRecord) -{ - VARIANT varresult; - VARIANTARG vararg[1]; - DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0}; - - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_DISPATCH; - V_DISPATCH(&vararg[0]) = pRecord; - - return invoke(pView, "Execute", DISPATCH_METHOD, &dispparams, &varresult, VT_EMPTY); -} - -static HRESULT View_Fetch(IDispatch *pView, IDispatch **ppRecord) -{ - VARIANT varresult; - DISPPARAMS dispparams = {NULL, NULL, 0, 0}; - HRESULT hr = invoke(pView, "Fetch", DISPATCH_METHOD, &dispparams, &varresult, VT_DISPATCH); - *ppRecord = V_DISPATCH(&varresult); - return hr; -} - -static HRESULT View_Modify(IDispatch *pView, int iMode, IDispatch *pRecord) -{ - VARIANT varresult; - VARIANTARG vararg[2]; - DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0}; - - VariantInit(&vararg[1]); - V_VT(&vararg[1]) = VT_I4; - V_I4(&vararg[1]) = iMode; - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_DISPATCH; - V_DISPATCH(&vararg[0]) = pRecord; - if (pRecord) - IDispatch_AddRef(pRecord); /* VariantClear in invoke will call IDispatch_Release */ - - return invoke(pView, "Modify", DISPATCH_METHOD, &dispparams, &varresult, VT_EMPTY); -} - -static HRESULT View_Close(IDispatch *pView) -{ - VARIANT varresult; - DISPPARAMS dispparams = {NULL, NULL, 0, 0}; - return invoke(pView, "Close", DISPATCH_METHOD, &dispparams, &varresult, VT_EMPTY); -} - -static HRESULT Record_FieldCountGet(IDispatch *pRecord, int *pFieldCount) -{ - VARIANT varresult; - DISPPARAMS dispparams = {NULL, NULL, 0, 0}; - HRESULT hr = invoke(pRecord, "FieldCount", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_I4); - *pFieldCount = V_I4(&varresult); - VariantClear(&varresult); - return hr; -} - -static HRESULT Record_StringDataGet(IDispatch *pRecord, int iField, LPWSTR szString) -{ - VARIANT varresult; - VARIANTARG vararg[1]; - DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0}; - HRESULT hr; - - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_I4; - V_I4(&vararg[0]) = iField; - - hr = invoke(pRecord, "StringData", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_BSTR); - if (V_BSTR(&varresult)) - memcpy(szString, V_BSTR(&varresult), (lstrlenW(V_BSTR(&varresult)) + 1) * sizeof(WCHAR)); - VariantClear(&varresult); - return hr; -} - -static HRESULT Record_StringDataPut(IDispatch *pRecord, int iField, LPCWSTR szString) -{ - VARIANT varresult; - VARIANTARG vararg[2]; - DISPID dispid = DISPID_PROPERTYPUT; - DISPPARAMS dispparams = {vararg, &dispid, sizeof(vararg)/sizeof(VARIANTARG), 1}; - - VariantInit(&vararg[1]); - V_VT(&vararg[1]) = VT_I4; - V_I4(&vararg[1]) = iField; - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_BSTR; - V_BSTR(&vararg[0]) = SysAllocString(szString); - - return invoke(pRecord, "StringData", DISPATCH_PROPERTYPUT, &dispparams, &varresult, VT_EMPTY); -} - -static HRESULT Record_IntegerDataGet(IDispatch *pRecord, int iField, int *pValue) -{ - VARIANT varresult; - VARIANTARG vararg[1]; - DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0}; - HRESULT hr; - - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_I4; - V_I4(&vararg[0]) = iField; - - hr = invoke(pRecord, "IntegerData", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_I4); - *pValue = V_I4(&varresult); - VariantClear(&varresult); - return hr; -} - -static HRESULT Record_IntegerDataPut(IDispatch *pRecord, int iField, int iValue) -{ - VARIANT varresult; - VARIANTARG vararg[2]; - DISPID dispid = DISPID_PROPERTYPUT; - DISPPARAMS dispparams = {vararg, &dispid, sizeof(vararg)/sizeof(VARIANTARG), 1}; - - VariantInit(&vararg[1]); - V_VT(&vararg[1]) = VT_I4; - V_I4(&vararg[1]) = iField; - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_I4; - V_I4(&vararg[0]) = iValue; - - return invoke(pRecord, "IntegerData", DISPATCH_PROPERTYPUT, &dispparams, &varresult, VT_EMPTY); -} - -static HRESULT StringList__NewEnum(IDispatch *pList, IUnknown **ppEnumVARIANT) -{ - VARIANT varresult; - DISPPARAMS dispparams = {NULL, NULL, 0, 0}; - HRESULT hr = invoke(pList, "_NewEnum", DISPATCH_METHOD, &dispparams, &varresult, VT_UNKNOWN); - *ppEnumVARIANT = V_UNKNOWN(&varresult); - return hr; -} - -static HRESULT StringList_Item(IDispatch *pStringList, int iIndex, LPWSTR szString) -{ - VARIANT varresult; - VARIANTARG vararg[1]; - DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0}; - HRESULT hr; - - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_I4; - V_I4(&vararg[0]) = iIndex; - - hr = invoke(pStringList, "Item", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_BSTR); - if (V_BSTR(&varresult)) - memcpy(szString, V_BSTR(&varresult), (lstrlenW(V_BSTR(&varresult)) + 1) * sizeof(WCHAR)); - VariantClear(&varresult); - return hr; -} - -static HRESULT StringList_Count(IDispatch *pStringList, int *pCount) -{ - VARIANT varresult; - DISPPARAMS dispparams = {NULL, NULL, 0, 0}; - HRESULT hr = invoke(pStringList, "Count", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_I4); - *pCount = V_I4(&varresult); - VariantClear(&varresult); - return hr; -} - -static HRESULT SummaryInfo_PropertyGet(IDispatch *pSummaryInfo, int pid, VARIANT *pVarResult, VARTYPE vtExpect) -{ - VARIANTARG vararg[1]; - DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0}; - - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_I4; - V_I4(&vararg[0]) = pid; - return invoke(pSummaryInfo, "Property", DISPATCH_PROPERTYGET, &dispparams, pVarResult, vtExpect); -} - -static HRESULT SummaryInfo_PropertyPut(IDispatch *pSummaryInfo, int pid, VARIANT *pVariant) -{ - VARIANT varresult; - VARIANTARG vararg[2]; - DISPID dispid = DISPID_PROPERTYPUT; - DISPPARAMS dispparams = {vararg, &dispid, sizeof(vararg)/sizeof(VARIANTARG), 1}; - - VariantInit(&vararg[1]); - V_VT(&vararg[1]) = VT_I4; - V_I4(&vararg[1]) = pid; - VariantInit(&vararg[0]); - VariantCopyInd(vararg, pVariant); - - return invoke(pSummaryInfo, "Property", DISPATCH_PROPERTYPUT, &dispparams, &varresult, VT_EMPTY); -} - -static HRESULT SummaryInfo_PropertyCountGet(IDispatch *pSummaryInfo, int *pCount) -{ - VARIANT varresult; - DISPPARAMS dispparams = {NULL, NULL, 0, 0}; - HRESULT hr; - - hr = invoke(pSummaryInfo, "PropertyCount", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_I4); - *pCount = V_I4(&varresult); - VariantClear(&varresult); - return hr; -} - -/* Test the various objects */ - -#define TEST_SUMMARYINFO_PROPERTIES_MODIFIED 4 - -static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *info, int num_info, BOOL readonly) -{ - static const WCHAR szPropertyException[] = { 'P','r','o','p','e','r','t','y',',','P','i','d',0 }; - static const WCHAR szTitle[] = { 'T','i','t','l','e',0 }; - VARIANT varresult, var; - SYSTEMTIME st; - HRESULT hr; - int j; - - /* SummaryInfo::PropertyCount */ - hr = SummaryInfo_PropertyCountGet(pSummaryInfo, &j); - ok(hr == S_OK, "SummaryInfo_PropertyCount failed, hresult 0x%08x\n", hr); - ok(j == num_info, "SummaryInfo_PropertyCount returned %d, expected %d\n", j, num_info); - - /* SummaryInfo::Property, get for properties we have set */ - for (j = 0; j < num_info; j++) - { - const msi_summary_info *entry = &info[j]; - - int vt = entry->datatype; - if (vt == VT_LPSTR) vt = VT_BSTR; - else if (vt == VT_FILETIME) vt = VT_DATE; - else if (vt == VT_I2) vt = VT_I4; - - hr = SummaryInfo_PropertyGet(pSummaryInfo, entry->property, &varresult, vt); - ok(hr == S_OK, "SummaryInfo_Property (pid %d) failed, hresult 0x%08x\n", entry->property, hr); - if (V_VT(&varresult) != vt) - skip("Skipping property tests due to type mismatch\n"); - else if (vt == VT_I4) - ok(V_I4(&varresult) == entry->iValue, "SummaryInfo_Property (pid %d) I4 result expected to be %d, but was %d\n", - entry->property, entry->iValue, V_I4(&varresult)); - else if (vt == VT_DATE) - { - FILETIME ft; - DATE d; - - FileTimeToLocalFileTime(entry->pftValue, &ft); - FileTimeToSystemTime(&ft, &st); - SystemTimeToVariantTime(&st, &d); - ok(d == V_DATE(&varresult), "SummaryInfo_Property (pid %d) DATE result expected to be %lf, but was %lf\n", entry->property, d, V_DATE(&varresult)); - } - else if (vt == VT_BSTR) - { - ok_awplus("SummaryInfo_Property (pid %d) BSTR result expected to be %s, but was %s\n", entry->property, entry->szValue, V_BSTR(&varresult)); - } - else - skip("SummaryInfo_Property (pid %d) unhandled result type %d\n", entry->property, vt); - - VariantClear(&varresult); - } - - /* SummaryInfo::Property, get; invalid arguments */ - - /* Invalid pids */ - hr = SummaryInfo_PropertyGet(pSummaryInfo, -1, &varresult, VT_EMPTY); - ok(hr == DISP_E_EXCEPTION, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr); - ok_exception(hr, szPropertyException); - - hr = SummaryInfo_PropertyGet(pSummaryInfo, 1000, &varresult, VT_EMPTY); - ok(hr == DISP_E_EXCEPTION, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr); - ok_exception(hr, szPropertyException); - - /* Unsupported pids */ - hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_DICTIONARY, &varresult, VT_EMPTY); - ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr); - - hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_THUMBNAIL, &varresult, VT_EMPTY); - ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr); - - /* Pids we have not set, one for each type */ - hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_CODEPAGE, &varresult, VT_EMPTY); - ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr); - - hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_TITLE, &varresult, VT_EMPTY); - ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr); - - hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_EDITTIME, &varresult, VT_EMPTY); - ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr); - - hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_CHARCOUNT, &varresult, VT_EMPTY); - ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr); - - if (!readonly) - { - /* SummaryInfo::Property, put; one for each type */ - - /* VT_I2 */ - VariantInit(&var); - V_VT(&var) = VT_I2; - V_I2(&var) = 1; - hr = SummaryInfo_PropertyPut(pSummaryInfo, PID_CODEPAGE, &var); - ok(hr == S_OK, "SummaryInfo_PropertyPut failed, hresult 0x%08x\n", hr); - - hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_CODEPAGE, &varresult, VT_I4 /* NOT VT_I2 */); - ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr); - ok(V_I2(&var) == V_I2(&varresult), "SummaryInfo_PropertyGet expected %d, but returned %d\n", V_I2(&var), V_I2(&varresult)); - VariantClear(&varresult); - VariantClear(&var); - - /* VT_BSTR */ - V_VT(&var) = VT_BSTR; - V_BSTR(&var) = SysAllocString(szTitle); - hr = SummaryInfo_PropertyPut(pSummaryInfo, PID_TITLE, &var); - ok(hr == S_OK, "SummaryInfo_PropertyPut failed, hresult 0x%08x\n", hr); - - hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_TITLE, &varresult, V_VT(&var)); - ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr); - ok_w2("SummaryInfo_PropertyGet expected %s, but returned %s\n", V_BSTR(&var), V_BSTR(&varresult)); - VariantClear(&varresult); - VariantClear(&var); - - /* VT_DATE */ - V_VT(&var) = VT_DATE; - FileTimeToSystemTime(&systemtime, &st); - SystemTimeToVariantTime(&st, &V_DATE(&var)); - hr = SummaryInfo_PropertyPut(pSummaryInfo, PID_LASTSAVE_DTM, &var); - ok(hr == S_OK, "SummaryInfo_PropertyPut failed, hresult 0x%08x\n", hr); - - hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_LASTSAVE_DTM, &varresult, V_VT(&var)); - ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr); - ok(V_DATE(&var) == V_DATE(&varresult), "SummaryInfo_PropertyGet expected %lf, but returned %lf\n", V_DATE(&var), V_DATE(&varresult)); - VariantClear(&varresult); - VariantClear(&var); - - /* VT_I4 */ - V_VT(&var) = VT_I4; - V_I4(&var) = 1000; - hr = SummaryInfo_PropertyPut(pSummaryInfo, PID_CHARCOUNT, &var); - ok(hr == S_OK, "SummaryInfo_PropertyPut failed, hresult 0x%08x\n", hr); - - hr = SummaryInfo_PropertyGet(pSummaryInfo, PID_CHARCOUNT, &varresult, V_VT(&var)); - ok(hr == S_OK, "SummaryInfo_PropertyGet failed, hresult 0x%08x\n", hr); - ok(V_I4(&var) == V_I4(&varresult), "SummaryInfo_PropertyGet expected %d, but returned %d\n", V_I4(&var), V_I4(&varresult)); - VariantClear(&varresult); - VariantClear(&var); - - /* SummaryInfo::PropertyCount */ - hr = SummaryInfo_PropertyCountGet(pSummaryInfo, &j); - ok(hr == S_OK, "SummaryInfo_PropertyCount failed, hresult 0x%08x\n", hr); - ok(j == num_info+4, "SummaryInfo_PropertyCount returned %d, expected %d\n", j, num_info); - } -} - -static void test_Database(IDispatch *pDatabase, BOOL readonly) -{ - static WCHAR szSql[] = { 'S','E','L','E','C','T',' ','`','F','e','a','t','u','r','e','`',' ','F','R','O','M',' ','`','F','e','a','t','u','r','e','`',' ','W','H','E','R','E',' ','`','F','e','a','t','u','r','e','_','P','a','r','e','n','t','`','=','\'','O','n','e','\'',0 }; - static WCHAR szThree[] = { 'T','h','r','e','e',0 }; - static WCHAR szTwo[] = { 'T','w','o',0 }; - static WCHAR szStringDataField[] = { 'S','t','r','i','n','g','D','a','t','a',',','F','i','e','l','d',0 }; - static WCHAR szModifyModeRecord[] = { 'M','o','d','i','f','y',',','M','o','d','e',',','R','e','c','o','r','d',0 }; - IDispatch *pView = NULL, *pSummaryInfo = NULL; - HRESULT hr; - - hr = Database_OpenView(pDatabase, szSql, &pView); - ok(hr == S_OK, "Database_OpenView failed, hresult 0x%08x\n", hr); - if (hr == S_OK) - { - IDispatch *pRecord = NULL; - WCHAR szString[MAX_PATH]; - - /* View::Execute */ - hr = View_Execute(pView, NULL); - ok(hr == S_OK, "View_Execute failed, hresult 0x%08x\n", hr); - - /* View::Fetch */ - hr = View_Fetch(pView, &pRecord); - ok(hr == S_OK, "View_Fetch failed, hresult 0x%08x\n", hr); - ok(pRecord != NULL, "View_Fetch should not have returned NULL record\n"); - if (pRecord) - { - /* Record::StringDataGet */ - memset(szString, 0, sizeof(szString)); - hr = Record_StringDataGet(pRecord, 1, szString); - ok(hr == S_OK, "Record_StringDataGet failed, hresult 0x%08x\n", hr); - ok_w2("Record_StringDataGet result was %s but expected %s\n", szString, szThree); - - /* Record::StringDataPut with correct index */ - hr = Record_StringDataPut(pRecord, 1, szTwo); - ok(hr == S_OK, "Record_StringDataPut failed, hresult 0x%08x\n", hr); - - /* Record::StringDataGet */ - memset(szString, 0, sizeof(szString)); - hr = Record_StringDataGet(pRecord, 1, szString); - ok(hr == S_OK, "Record_StringDataGet failed, hresult 0x%08x\n", hr); - ok_w2("Record_StringDataGet result was %s but expected %s\n", szString, szTwo); - - /* Record::StringDataPut with incorrect index */ - hr = Record_StringDataPut(pRecord, -1, szString); - ok(hr == DISP_E_EXCEPTION, "Record_StringDataPut failed, hresult 0x%08x\n", hr); - ok_exception(hr, szStringDataField); - - /* View::Modify with incorrect parameters */ - hr = View_Modify(pView, -5, NULL); - ok(hr == DISP_E_EXCEPTION, "View_Modify failed, hresult 0x%08x\n", hr); - ok_exception(hr, szModifyModeRecord); - - hr = View_Modify(pView, -5, pRecord); - ok(hr == DISP_E_EXCEPTION, "View_Modify failed, hresult 0x%08x\n", hr); - ok_exception(hr, szModifyModeRecord); - - hr = View_Modify(pView, MSIMODIFY_REFRESH, NULL); - ok(hr == DISP_E_EXCEPTION, "View_Modify failed, hresult 0x%08x\n", hr); - ok_exception(hr, szModifyModeRecord); - - hr = View_Modify(pView, MSIMODIFY_REFRESH, pRecord); - ok(hr == S_OK, "View_Modify failed, hresult 0x%08x\n", hr); - - /* Record::StringDataGet, confirm that the record is back to its unmodified value */ - memset(szString, 0, sizeof(szString)); - hr = Record_StringDataGet(pRecord, 1, szString); - ok(hr == S_OK, "Record_StringDataGet failed, hresult 0x%08x\n", hr); - todo_wine ok_w2("Record_StringDataGet result was %s but expected %s\n", szString, szThree); - - IDispatch_Release(pRecord); - } - - /* View::Fetch */ - hr = View_Fetch(pView, &pRecord); - ok(hr == S_OK, "View_Fetch failed, hresult 0x%08x\n", hr); - ok(pRecord != NULL, "View_Fetch should not have returned NULL record\n"); - if (pRecord) - { - /* Record::StringDataGet */ - memset(szString, 0, sizeof(szString)); - hr = Record_StringDataGet(pRecord, 1, szString); - ok(hr == S_OK, "Record_StringDataGet failed, hresult 0x%08x\n", hr); - ok_w2("Record_StringDataGet result was %s but expected %s\n", szString, szTwo); - - IDispatch_Release(pRecord); - } - - /* View::Fetch */ - hr = View_Fetch(pView, &pRecord); - ok(hr == S_OK, "View_Fetch failed, hresult 0x%08x\n", hr); - ok(pRecord == NULL, "View_Fetch should have returned NULL record\n"); - if (pRecord) - IDispatch_Release(pRecord); - - /* View::Close */ - hr = View_Close(pView); - ok(hr == S_OK, "View_Close failed, hresult 0x%08x\n", hr); - - IDispatch_Release(pView); - } - - /* Database::SummaryInformation */ - hr = Database_SummaryInformation(pDatabase, TEST_SUMMARYINFO_PROPERTIES_MODIFIED, &pSummaryInfo); - ok(hr == S_OK, "Database_SummaryInformation failed, hresult 0x%08x\n", hr); - ok(pSummaryInfo != NULL, "Database_SummaryInformation should not have returned NULL record\n"); - if (pSummaryInfo) - { - test_SummaryInfo(pSummaryInfo, summary_info, sizeof(summary_info)/sizeof(msi_summary_info), readonly); - IDispatch_Release(pSummaryInfo); - } -} - -static void test_Session(IDispatch *pSession) -{ - static WCHAR szProductName[] = { 'P','r','o','d','u','c','t','N','a','m','e',0 }; - static WCHAR szOne[] = { 'O','n','e',0 }; - static WCHAR szOneStateFalse[] = { '!','O','n','e','>','0',0 }; - static WCHAR szOneStateTrue[] = { '!','O','n','e','=','-','1',0 }; - static WCHAR szOneActionFalse[] = { '$','O','n','e','=','-','1',0 }; - static WCHAR szOneActionTrue[] = { '$','O','n','e','>','0',0 }; - static WCHAR szCostInitialize[] = { 'C','o','s','t','I','n','i','t','i','a','l','i','z','e',0 }; - static WCHAR szEmpty[] = { 0 }; - static WCHAR szEquals[] = { '=',0 }; - static WCHAR szPropertyName[] = { 'P','r','o','p','e','r','t','y',',','N','a','m','e',0 }; - static WCHAR szModeFlag[] = { 'M','o','d','e',',','F','l','a','g',0 }; - WCHAR stringw[MAX_PATH]; - CHAR string[MAX_PATH]; - UINT len; - BOOL bool; - int myint; - IDispatch *pDatabase = NULL, *pInst = NULL, *record = NULL; - ULONG refs_before, refs_after; - HRESULT hr; - - /* Session::Installer */ - hr = Session_Installer(pSession, &pInst); - ok(hr == S_OK, "Session_Installer failed, hresult 0x%08x\n", hr); - ok(pInst != NULL, "Session_Installer returned NULL IDispatch pointer\n"); - ok(pInst == pInstaller, "Session_Installer does not match Installer instance from CoCreateInstance\n"); - refs_before = IDispatch_AddRef(pInst); - - hr = Session_Installer(pSession, &pInst); - ok(hr == S_OK, "Session_Installer failed, hresult 0x%08x\n", hr); - ok(pInst != NULL, "Session_Installer returned NULL IDispatch pointer\n"); - ok(pInst == pInstaller, "Session_Installer does not match Installer instance from CoCreateInstance\n"); - refs_after = IDispatch_Release(pInst); - ok(refs_before == refs_after, "got %u and %u\n", refs_before, refs_after); - - /* Session::Property, get */ - memset(stringw, 0, sizeof(stringw)); - hr = Session_PropertyGet(pSession, szProductName, stringw); - ok(hr == S_OK, "Session_PropertyGet failed, hresult 0x%08x\n", hr); - if (strcmp_ww(stringw, szMSITEST) != 0) - { - len = WideCharToMultiByte(CP_ACP, 0, stringw, -1, string, MAX_PATH, NULL, NULL); - ok(len, "WideCharToMultiByteChar returned error %d\n", GetLastError()); - ok(0, "Property \"ProductName\" expected to be \"MSITEST\" but was \"%s\"\n", string); - } - - /* Session::Property, put */ - hr = Session_PropertyPut(pSession, szProductName, szProductName); - ok(hr == S_OK, "Session_PropertyPut failed, hresult 0x%08x\n", hr); - memset(stringw, 0, sizeof(stringw)); - hr = Session_PropertyGet(pSession, szProductName, stringw); - ok(hr == S_OK, "Session_PropertyGet failed, hresult 0x%08x\n", hr); - if (strcmp_ww(stringw, szProductName) != 0) - { - len = WideCharToMultiByte(CP_ACP, 0, stringw, -1, string, MAX_PATH, NULL, NULL); - ok(len, "WideCharToMultiByteChar returned error %d\n", GetLastError()); - ok(0, "Property \"ProductName\" expected to be \"ProductName\" but was \"%s\"\n", string); - } - - /* Try putting a property using empty property identifier */ - hr = Session_PropertyPut(pSession, szEmpty, szProductName); - ok(hr == DISP_E_EXCEPTION, "Session_PropertyPut failed, hresult 0x%08x\n", hr); - ok_exception(hr, szPropertyName); - - /* Try putting a property using illegal property identifier */ - hr = Session_PropertyPut(pSession, szEquals, szProductName); - ok(hr == S_OK, "Session_PropertyPut failed, hresult 0x%08x\n", hr); - - /* Session::Language, get */ - hr = Session_LanguageGet(pSession, &len); - ok(hr == S_OK, "Session_LanguageGet failed, hresult 0x%08x\n", hr); - /* Not sure how to check the language is correct */ - - /* Session::Mode, get */ - hr = Session_ModeGet(pSession, MSIRUNMODE_REBOOTATEND, &bool); - ok(hr == S_OK, "Session_ModeGet failed, hresult 0x%08x\n", hr); - ok(!bool, "Reboot at end session mode is %d\n", bool); - - hr = Session_ModeGet(pSession, MSIRUNMODE_MAINTENANCE, &bool); - ok(hr == S_OK, "Session_ModeGet failed, hresult 0x%08x\n", hr); - ok(!bool, "Maintenance mode is %d\n", bool); - - /* Session::Mode, put */ - hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTATEND, TRUE); - ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr); - hr = Session_ModeGet(pSession, MSIRUNMODE_REBOOTATEND, &bool); - ok(hr == S_OK, "Session_ModeGet failed, hresult 0x%08x\n", hr); - ok(bool, "Reboot at end session mode is %d, expected 1\n", bool); - hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTATEND, FALSE); /* set it again so we don't reboot */ - ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr); - - hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTNOW, TRUE); - todo_wine ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr); - if (hr == DISP_E_EXCEPTION) ok_exception(hr, szModeFlag); - - hr = Session_ModeGet(pSession, MSIRUNMODE_REBOOTNOW, &bool); - ok(hr == S_OK, "Session_ModeGet failed, hresult 0x%08x\n", hr); - ok(bool, "Reboot now mode is %d, expected 1\n", bool); - - hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTNOW, FALSE); /* set it again so we don't reboot */ - todo_wine ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr); - if (hr == DISP_E_EXCEPTION) ok_exception(hr, szModeFlag); - - hr = Session_ModePut(pSession, MSIRUNMODE_MAINTENANCE, TRUE); - ok(hr == DISP_E_EXCEPTION, "Session_ModePut failed, hresult 0x%08x\n", hr); - ok_exception(hr, szModeFlag); - - /* Session::Database, get */ - hr = Session_Database(pSession, &pDatabase); - ok(hr == S_OK, "Session_Database failed, hresult 0x%08x\n", hr); - if (hr == S_OK) - { - test_Database(pDatabase, TRUE); - IDispatch_Release(pDatabase); - } - - /* Session::EvaluateCondition */ - hr = Session_EvaluateCondition(pSession, NULL, &myint); - ok(hr == S_OK, "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); - ok(myint == MSICONDITION_NONE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); - - hr = Session_EvaluateCondition(pSession, szEmpty, &myint); - ok(hr == S_OK, "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); - ok(myint == MSICONDITION_NONE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); - - hr = Session_EvaluateCondition(pSession, szEquals, &myint); - ok(hr == S_OK, "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); - ok(myint == MSICONDITION_ERROR, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); - - /* Session::DoAction(CostInitialize) must occur before the next statements */ - hr = Session_DoAction(pSession, szCostInitialize, &myint); - ok(hr == S_OK, "Session_DoAction failed, hresult 0x%08x\n", hr); - ok(myint == IDOK, "DoAction(CostInitialize) returned %d, %d expected\n", myint, IDOK); - - /* Session::SetInstallLevel */ - hr = Session_SetInstallLevel(pSession, INSTALLLEVEL_MINIMUM); - ok(hr == S_OK, "Session_SetInstallLevel failed, hresult 0x%08x\n", hr); - - /* Session::FeatureCurrentState, get */ - hr = Session_FeatureCurrentState(pSession, szOne, &myint); - ok(hr == S_OK, "Session_FeatureCurrentState failed, hresult 0x%08x\n", hr); - ok(myint == INSTALLSTATE_UNKNOWN, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); - - /* Session::Message */ - hr = Installer_CreateRecord(0, &record); - ok(hr == S_OK, "Installer_CreateRecord failed: %08x\n", hr); - hr = Session_Message(pSession, INSTALLMESSAGE_INFO, record, &myint); - ok(hr == S_OK, "Session_Message failed: %08x\n", hr); - ok(myint == 0, "Session_Message returned %x\n", myint); - - /* Session::EvaluateCondition */ - hr = Session_EvaluateCondition(pSession, szOneStateFalse, &myint); - ok(hr == S_OK, "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); - ok(myint == MSICONDITION_FALSE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); - - hr = Session_EvaluateCondition(pSession, szOneStateTrue, &myint); - ok(hr == S_OK, "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); - ok(myint == MSICONDITION_TRUE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); - - /* Session::FeatureRequestState, put */ - hr = Session_FeatureRequestStatePut(pSession, szOne, INSTALLSTATE_ADVERTISED); - ok(hr == S_OK, "Session_FeatureRequestStatePut failed, hresult 0x%08x\n", hr); - hr = Session_FeatureRequestStateGet(pSession, szOne, &myint); - ok(hr == S_OK, "Session_FeatureRequestStateGet failed, hresult 0x%08x\n", hr); - ok(myint == INSTALLSTATE_ADVERTISED, "Feature request state was %d but expected %d\n", myint, INSTALLSTATE_ADVERTISED); - - /* Session::EvaluateCondition */ - hr = Session_EvaluateCondition(pSession, szOneActionFalse, &myint); - ok(hr == S_OK, "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); - ok(myint == MSICONDITION_FALSE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); - - hr = Session_EvaluateCondition(pSession, szOneActionTrue, &myint); - ok(hr == S_OK, "Session_EvaluateCondition failed, hresult 0x%08x\n", hr); - ok(myint == MSICONDITION_TRUE, "Feature current state was %d but expected %d\n", myint, INSTALLSTATE_UNKNOWN); -} - -/* delete key and all its subkeys */ -static DWORD delete_key( HKEY hkey ) -{ - char name[MAX_PATH]; - DWORD ret; - - while (!(ret = RegEnumKeyA(hkey, 0, name, sizeof(name)))) - { - HKEY tmp; - if (!(ret = RegOpenKeyExA( hkey, name, 0, KEY_ENUMERATE_SUB_KEYS, &tmp ))) - { - ret = delete_key( tmp ); - RegCloseKey( tmp ); - } - if (ret) break; - } - if (ret != ERROR_NO_MORE_ITEMS) return ret; - RegDeleteKeyA( hkey, "" ); - return 0; -} - -static void test_Installer_RegistryValue(void) -{ - static const DWORD qw[2] = { 0x12345678, 0x87654321 }; - static const WCHAR szKey[] = { 'S','o','f','t','w','a','r','e','\\','W','i','n','e','\\','T','e','s','t',0 }; - static const WCHAR szOne[] = { 'O','n','e',0 }; - static const WCHAR szTwo[] = { 'T','w','o',0 }; - static const WCHAR szThree[] = { 'T','h','r','e','e',0 }; - static const WCHAR szREG_BINARY[] = { '(','R','E','G','_','B','I','N','A','R','Y',')',0 }; - static const WCHAR szFour[] = { 'F','o','u','r',0 }; - static const WCHAR szExpand[] = { '%','M','S','I','T','E','S','T','%',0 }; - static const WCHAR szFive[] = { 'F','i','v','e',0,'H','i',0,0 }; - static const WCHAR szFiveHi[] = { 'F','i','v','e','\n','H','i',0 }; - static const WCHAR szSix[] = { 'S','i','x',0 }; - static const WCHAR szREG_[] = { '(','R','E','G','_',']',0 }; - static const WCHAR szSeven[] = { 'S','e','v','e','n',0 }; - static const WCHAR szEight[] = { 'E','i','g','h','t',0 }; - static const WCHAR szBlank[] = { 0 }; - VARIANT varresult; - VARIANTARG vararg; - WCHAR szString[MAX_PATH]; - HKEY hkey, hkey_sub; - HKEY curr_user = (HKEY)1; - HRESULT hr; - BOOL bRet; - LONG lRet; - - /* Delete keys */ - SetLastError(0xdeadbeef); - lRet = RegOpenKeyW( HKEY_CURRENT_USER, szKey, &hkey ); - if (!lRet && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("Needed W-functions are not implemented\n"); - return; - } - if (!lRet) - delete_key( hkey ); - - /* Does our key exist? Shouldn't; check with all three possible value parameter types */ - hr = Installer_RegistryValueE(curr_user, szKey, &bRet); - ok(hr == S_OK, "Installer_RegistryValueE failed, hresult 0x%08x\n", hr); - ok(!bRet, "Registry key expected to not exist, but Installer_RegistryValue claims it does\n"); - - memset(szString, 0, sizeof(szString)); - hr = Installer_RegistryValueW(curr_user, szKey, NULL, szString); - ok(hr == DISP_E_BADINDEX, "Installer_RegistryValueW failed, hresult 0x%08x\n", hr); - - memset(szString, 0, sizeof(szString)); - hr = Installer_RegistryValueI(curr_user, szKey, 0, szString, VT_BSTR); - ok(hr == DISP_E_BADINDEX, "Installer_RegistryValueI failed, hresult 0x%08x\n", hr); - - /* Create key */ - ok(!RegCreateKeyW( HKEY_CURRENT_USER, szKey, &hkey ), "RegCreateKeyW failed\n"); - - ok(!RegSetValueExW(hkey,szOne,0,REG_SZ, (const BYTE *)szOne, sizeof(szOne)), - "RegSetValueExW failed\n"); - ok(!RegSetValueExW(hkey,szTwo,0,REG_DWORD, (const BYTE *)qw, 4), - "RegSetValueExW failed\n"); - ok(!RegSetValueExW(hkey,szThree,0,REG_BINARY, (const BYTE *)qw, 4), - "RegSetValueExW failed\n"); - ok(SetEnvironmentVariableA("MSITEST", "Four"), "SetEnvironmentVariableA failed %d\n", GetLastError()); - ok(!RegSetValueExW(hkey,szFour,0,REG_EXPAND_SZ, (const BYTE *)szExpand, sizeof(szExpand)), - "RegSetValueExW failed\n"); - ok(!RegSetValueExW(hkey,szFive,0,REG_MULTI_SZ, (const BYTE *)szFive, sizeof(szFive)), - "RegSetValueExW failed\n"); - ok(!RegSetValueExW(hkey,szSix,0,REG_QWORD, (const BYTE *)qw, 8), - "RegSetValueExW failed\n"); - ok(!RegSetValueExW(hkey,szSeven,0,REG_NONE, NULL, 0), - "RegSetValueExW failed\n"); - - ok(!RegSetValueExW(hkey,NULL,0,REG_SZ, (const BYTE *)szOne, sizeof(szOne)), - "RegSetValueExW failed\n"); - - ok(!RegCreateKeyW( hkey, szEight, &hkey_sub ), "RegCreateKeyW failed\n"); - - /* Does our key exist? It should, and make sure we retrieve the correct default value */ - bRet = FALSE; - hr = Installer_RegistryValueE(curr_user, szKey, &bRet); - ok(hr == S_OK, "Installer_RegistryValueE failed, hresult 0x%08x\n", hr); - ok(bRet, "Registry key expected to exist, but Installer_RegistryValue claims it does not\n"); - - memset(szString, 0, sizeof(szString)); - hr = Installer_RegistryValueW(curr_user, szKey, NULL, szString); - ok(hr == S_OK, "Installer_RegistryValueW failed, hresult 0x%08x\n", hr); - ok_w2("Default registry value \"%s\" does not match expected \"%s\"\n", szString, szOne); - - /* Ask for the value of a nonexistent key */ - memset(szString, 0, sizeof(szString)); - hr = Installer_RegistryValueW(curr_user, szKey, szExpand, szString); - ok(hr == DISP_E_BADINDEX, "Installer_RegistryValueW failed, hresult 0x%08x\n", hr); - - /* Get values of keys */ - memset(szString, 0, sizeof(szString)); - hr = Installer_RegistryValueW(curr_user, szKey, szOne, szString); - ok(hr == S_OK, "Installer_RegistryValueW failed, hresult 0x%08x\n", hr); - ok_w2("Registry value \"%s\" does not match expected \"%s\"\n", szString, szOne); - - VariantInit(&vararg); - V_VT(&vararg) = VT_BSTR; - V_BSTR(&vararg) = SysAllocString(szTwo); - hr = Installer_RegistryValue(curr_user, szKey, vararg, &varresult, VT_I4); - ok(hr == S_OK, "Installer_RegistryValue failed, hresult 0x%08x\n", hr); - ok(V_I4(&varresult) == 305419896, "Registry value %d does not match expected value\n", V_I4(&varresult)); - VariantClear(&varresult); - - memset(szString, 0, sizeof(szString)); - hr = Installer_RegistryValueW(curr_user, szKey, szThree, szString); - ok(hr == S_OK, "Installer_RegistryValueW failed, hresult 0x%08x\n", hr); - ok_w2("Registry value \"%s\" does not match expected \"%s\"\n", szString, szREG_BINARY); - - memset(szString, 0, sizeof(szString)); - hr = Installer_RegistryValueW(curr_user, szKey, szFour, szString); - ok(hr == S_OK, "Installer_RegistryValueW failed, hresult 0x%08x\n", hr); - ok_w2("Registry value \"%s\" does not match expected \"%s\"\n", szString, szFour); - - /* Vista does not NULL-terminate this case */ - memset(szString, 0, sizeof(szString)); - hr = Installer_RegistryValueW(curr_user, szKey, szFive, szString); - ok(hr == S_OK, "Installer_RegistryValueW failed, hresult 0x%08x\n", hr); - ok_w2n("Registry value \"%s\" does not match expected \"%s\"\n", - szString, szFiveHi, lstrlenW(szFiveHi)); - - memset(szString, 0, sizeof(szString)); - hr = Installer_RegistryValueW(curr_user, szKey, szSix, szString); - ok(hr == S_OK, "Installer_RegistryValueW failed, hresult 0x%08x\n", hr); - ok_w2("Registry value \"%s\" does not match expected \"%s\"\n", szString, szREG_); - - VariantInit(&vararg); - V_VT(&vararg) = VT_BSTR; - V_BSTR(&vararg) = SysAllocString(szSeven); - hr = Installer_RegistryValue(curr_user, szKey, vararg, &varresult, VT_EMPTY); - ok(hr == S_OK, "Installer_RegistryValue failed, hresult 0x%08x\n", hr); - - /* Get string class name for the key */ - memset(szString, 0, sizeof(szString)); - hr = Installer_RegistryValueI(curr_user, szKey, 0, szString, VT_BSTR); - ok(hr == S_OK, "Installer_RegistryValueI failed, hresult 0x%08x\n", hr); - ok_w2("Registry name \"%s\" does not match expected \"%s\"\n", szString, szBlank); - - /* Get name of a value by positive number (RegEnumValue like), valid index */ - memset(szString, 0, sizeof(szString)); - hr = Installer_RegistryValueI(curr_user, szKey, 2, szString, VT_BSTR); - ok(hr == S_OK, "Installer_RegistryValueI failed, hresult 0x%08x\n", hr); - /* RegEnumValue order seems different on wine */ - todo_wine ok_w2("Registry name \"%s\" does not match expected \"%s\"\n", szString, szTwo); - - /* Get name of a value by positive number (RegEnumValue like), invalid index */ - memset(szString, 0, sizeof(szString)); - hr = Installer_RegistryValueI(curr_user, szKey, 10, szString, VT_EMPTY); - ok(hr == S_OK, "Installer_RegistryValueI failed, hresult 0x%08x\n", hr); - - /* Get name of a subkey by negative number (RegEnumValue like), valid index */ - memset(szString, 0, sizeof(szString)); - hr = Installer_RegistryValueI(curr_user, szKey, -1, szString, VT_BSTR); - ok(hr == S_OK, "Installer_RegistryValueI failed, hresult 0x%08x\n", hr); - ok_w2("Registry name \"%s\" does not match expected \"%s\"\n", szString, szEight); - - /* Get name of a subkey by negative number (RegEnumValue like), invalid index */ - memset(szString, 0, sizeof(szString)); - hr = Installer_RegistryValueI(curr_user, szKey, -10, szString, VT_EMPTY); - ok(hr == S_OK, "Installer_RegistryValueI failed, hresult 0x%08x\n", hr); - - /* clean up */ - delete_key(hkey); -} - -static void test_Installer_Products(BOOL bProductInstalled) -{ - WCHAR szString[MAX_PATH]; - HRESULT hr; - int idx; - IUnknown *pUnk = NULL; - IEnumVARIANT *pEnum = NULL; - VARIANT var; - ULONG celt; - int iCount, iValue; - IDispatch *pStringList = NULL; - BOOL bProductFound = FALSE; - - /* Installer::Products */ - hr = Installer_Products(&pStringList); - ok(hr == S_OK, "Installer_Products failed, hresult 0x%08x\n", hr); - if (hr == S_OK) - { - /* StringList::_NewEnum */ - hr = StringList__NewEnum(pStringList, &pUnk); - ok(hr == S_OK, "StringList_NewEnum failed, hresult 0x%08x\n", hr); - if (hr == S_OK) - { - hr = IUnknown_QueryInterface(pUnk, &IID_IEnumVARIANT, (void **)&pEnum); - ok (hr == S_OK, "IUnknown::QueryInterface returned 0x%08x\n", hr); - } - if (!pEnum) - skip("IEnumVARIANT tests\n"); - - /* StringList::Count */ - hr = StringList_Count(pStringList, &iCount); - ok(hr == S_OK, "StringList_Count failed, hresult 0x%08x\n", hr); - - for (idx=0; idx - -#include -#include -#include -#include - -#include - -#include "wine/test.h" - -static const char *msifile = "winetest-db.msi"; -static const char *msifile2 = "winetst2-db.msi"; -static const char *mstfile = "winetst-db.mst"; -static const WCHAR msifileW[] = {'w','i','n','e','t','e','s','t','-','d','b','.','m','s','i',0}; - -static void test_msidatabase(void) -{ - MSIHANDLE hdb = 0, hdb2 = 0; - UINT res; - - DeleteFile(msifile); - - res = MsiOpenDatabase( msifile, msifile2, &hdb ); - ok( res == ERROR_OPEN_FAILED, "expected failure\n"); - - res = MsiOpenDatabase( msifile, (LPSTR) 0xff, &hdb ); - ok( res == ERROR_INVALID_PARAMETER, "expected failure\n"); - - res = MsiCloseHandle( hdb ); - ok( res == ERROR_SUCCESS , "Failed to close database\n" ); - - /* create an empty database */ - res = MsiOpenDatabase(msifile, MSIDBOPEN_CREATE, &hdb ); - ok( res == ERROR_SUCCESS , "Failed to create database\n" ); - - res = MsiDatabaseCommit( hdb ); - ok( res == ERROR_SUCCESS , "Failed to commit database\n" ); - - ok( INVALID_FILE_ATTRIBUTES != GetFileAttributes( msifile ), "database should exist\n"); - - res = MsiCloseHandle( hdb ); - ok( res == ERROR_SUCCESS , "Failed to close database\n" ); - res = MsiOpenDatabase( msifile, msifile2, &hdb2 ); - ok( res == ERROR_SUCCESS , "Failed to open database\n" ); - - ok( INVALID_FILE_ATTRIBUTES != GetFileAttributes( msifile2 ), "database should exist\n"); - - res = MsiDatabaseCommit( hdb2 ); - ok( res == ERROR_SUCCESS , "Failed to commit database\n" ); - - res = MsiCloseHandle( hdb2 ); - ok( res == ERROR_SUCCESS , "Failed to close database\n" ); - - res = MsiOpenDatabase( msifile, msifile2, &hdb2 ); - ok( res == ERROR_SUCCESS , "Failed to open database\n" ); - - res = MsiCloseHandle( hdb2 ); - ok( res == ERROR_SUCCESS , "Failed to close database\n" ); - - ok( INVALID_FILE_ATTRIBUTES == GetFileAttributes( msifile2 ), "uncommitted database should not exist\n"); - - res = MsiOpenDatabase( msifile, msifile2, &hdb2 ); - ok( res == ERROR_SUCCESS , "Failed to close database\n" ); - - res = MsiDatabaseCommit( hdb2 ); - ok( res == ERROR_SUCCESS , "Failed to commit database\n" ); - - res = MsiCloseHandle( hdb2 ); - ok( res == ERROR_SUCCESS , "Failed to close database\n" ); - - ok( INVALID_FILE_ATTRIBUTES != GetFileAttributes( msifile2 ), "committed database should exist\n"); - - res = MsiOpenDatabase( msifile, MSIDBOPEN_READONLY, &hdb ); - ok( res == ERROR_SUCCESS , "Failed to open database\n" ); - - res = MsiCloseHandle( hdb ); - ok( res == ERROR_SUCCESS , "Failed to close database\n" ); - - res = MsiOpenDatabase( msifile, MSIDBOPEN_DIRECT, &hdb ); - ok( res == ERROR_SUCCESS , "Failed to open database\n" ); - - res = MsiCloseHandle( hdb ); - ok( res == ERROR_SUCCESS , "Failed to close database\n" ); - - res = MsiOpenDatabase( msifile, MSIDBOPEN_TRANSACT, &hdb ); - ok( res == ERROR_SUCCESS , "Failed to open database\n" ); - - res = MsiCloseHandle( hdb ); - ok( res == ERROR_SUCCESS , "Failed to close database\n" ); - ok( INVALID_FILE_ATTRIBUTES != GetFileAttributes( msifile ), "database should exist\n"); - - /* MSIDBOPEN_CREATE deletes the database if MsiCommitDatabase isn't called */ - res = MsiOpenDatabase( msifile, MSIDBOPEN_CREATE, &hdb ); - ok( res == ERROR_SUCCESS , "Failed to open database\n" ); - - ok( INVALID_FILE_ATTRIBUTES != GetFileAttributes( msifile ), "database should exist\n"); - - res = MsiCloseHandle( hdb ); - ok( res == ERROR_SUCCESS , "Failed to close database\n" ); - - ok( INVALID_FILE_ATTRIBUTES == GetFileAttributes( msifile ), "database should exist\n"); - - res = MsiOpenDatabase( msifile, MSIDBOPEN_CREATE, &hdb ); - ok( res == ERROR_SUCCESS , "Failed to open database\n" ); - - res = MsiDatabaseCommit( hdb ); - ok( res == ERROR_SUCCESS , "Failed to commit database\n" ); - - ok( INVALID_FILE_ATTRIBUTES != GetFileAttributes( msifile ), "database should exist\n"); - - res = MsiCloseHandle( hdb ); - ok( res == ERROR_SUCCESS , "Failed to close database\n" ); - - res = DeleteFile( msifile2 ); - ok( res == TRUE, "Failed to delete database\n" ); - - res = DeleteFile( msifile ); - ok( res == TRUE, "Failed to delete database\n" ); -} - -static UINT do_query(MSIHANDLE hdb, const char *query, MSIHANDLE *phrec) -{ - MSIHANDLE hview = 0; - UINT r, ret; - - if (phrec) - *phrec = 0; - - /* open a select query */ - r = MsiDatabaseOpenView(hdb, query, &hview); - if (r != ERROR_SUCCESS) - return r; - r = MsiViewExecute(hview, 0); - if (r != ERROR_SUCCESS) - return r; - ret = MsiViewFetch(hview, phrec); - r = MsiViewClose(hview); - if (r != ERROR_SUCCESS) - return r; - r = MsiCloseHandle(hview); - if (r != ERROR_SUCCESS) - return r; - return ret; -} - -static UINT run_query( MSIHANDLE hdb, MSIHANDLE hrec, const char *query ) -{ - MSIHANDLE hview = 0; - UINT r; - - r = MsiDatabaseOpenView(hdb, query, &hview); - if( r != ERROR_SUCCESS ) - return r; - - r = MsiViewExecute(hview, hrec); - if( r == ERROR_SUCCESS ) - r = MsiViewClose(hview); - MsiCloseHandle(hview); - return r; -} - -static UINT create_component_table( MSIHANDLE hdb ) -{ - return run_query( hdb, 0, - "CREATE TABLE `Component` ( " - "`Component` CHAR(72) NOT NULL, " - "`ComponentId` CHAR(38), " - "`Directory_` CHAR(72) NOT NULL, " - "`Attributes` SHORT NOT NULL, " - "`Condition` CHAR(255), " - "`KeyPath` CHAR(72) " - "PRIMARY KEY `Component`)" ); -} - -static UINT create_custom_action_table( MSIHANDLE hdb ) -{ - return run_query( hdb, 0, - "CREATE TABLE `CustomAction` ( " - "`Action` CHAR(72) NOT NULL, " - "`Type` SHORT NOT NULL, " - "`Source` CHAR(72), " - "`Target` CHAR(255) " - "PRIMARY KEY `Action`)" ); -} - -static UINT create_directory_table( MSIHANDLE hdb ) -{ - return run_query( hdb, 0, - "CREATE TABLE `Directory` ( " - "`Directory` CHAR(255) NOT NULL, " - "`Directory_Parent` CHAR(255), " - "`DefaultDir` CHAR(255) NOT NULL " - "PRIMARY KEY `Directory`)" ); -} - -static UINT create_feature_components_table( MSIHANDLE hdb ) -{ - return run_query( hdb, 0, - "CREATE TABLE `FeatureComponents` ( " - "`Feature_` CHAR(38) NOT NULL, " - "`Component_` CHAR(72) NOT NULL " - "PRIMARY KEY `Feature_`, `Component_` )" ); -} - -static UINT create_std_dlls_table( MSIHANDLE hdb ) -{ - return run_query( hdb, 0, - "CREATE TABLE `StdDlls` ( " - "`File` CHAR(255) NOT NULL, " - "`Binary_` CHAR(72) NOT NULL " - "PRIMARY KEY `File` )" ); -} - -static UINT create_binary_table( MSIHANDLE hdb ) -{ - return run_query( hdb, 0, - "CREATE TABLE `Binary` ( " - "`Name` CHAR(72) NOT NULL, " - "`Data` CHAR(72) NOT NULL " - "PRIMARY KEY `Name` )" ); -} - -#define make_add_entry(type, qtext) \ - static UINT add##_##type##_##entry( MSIHANDLE hdb, const char *values ) \ - { \ - char insert[] = qtext; \ - char *query; \ - UINT sz, r; \ - sz = strlen(values) + sizeof insert; \ - query = HeapAlloc(GetProcessHeap(),0,sz); \ - sprintf(query,insert,values); \ - r = run_query( hdb, 0, query ); \ - HeapFree(GetProcessHeap(), 0, query); \ - return r; \ - } - -make_add_entry(component, - "INSERT INTO `Component` " - "(`Component`, `ComponentId`, `Directory_`, " - "`Attributes`, `Condition`, `KeyPath`) VALUES( %s )") - -make_add_entry(custom_action, - "INSERT INTO `CustomAction` " - "(`Action`, `Type`, `Source`, `Target`) VALUES( %s )") - -make_add_entry(feature_components, - "INSERT INTO `FeatureComponents` " - "(`Feature_`, `Component_`) VALUES( %s )") - -make_add_entry(std_dlls, - "INSERT INTO `StdDlls` (`File`, `Binary_`) VALUES( %s )") - -make_add_entry(binary, - "INSERT INTO `Binary` (`Name`, `Data`) VALUES( %s )") - -static void test_msiinsert(void) -{ - MSIHANDLE hdb = 0, hview = 0, hrec = 0; - UINT r; - const char *query; - char buf[80]; - DWORD sz; - - DeleteFile(msifile); - - /* just MsiOpenDatabase should not create a file */ - r = MsiOpenDatabase(msifile, MSIDBOPEN_CREATE, &hdb); - ok(r == ERROR_SUCCESS, "MsiOpenDatabase failed\n"); - - /* create a table */ - query = "CREATE TABLE `phone` ( " - "`id` INT, `name` CHAR(32), `number` CHAR(32) " - "PRIMARY KEY `id`)"; - r = MsiDatabaseOpenView(hdb, query, &hview); - ok(r == ERROR_SUCCESS, "MsiDatabaseOpenView failed\n"); - r = MsiViewExecute(hview, 0); - ok(r == ERROR_SUCCESS, "MsiViewExecute failed\n"); - r = MsiViewClose(hview); - ok(r == ERROR_SUCCESS, "MsiViewClose failed\n"); - r = MsiCloseHandle(hview); - ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); - - /* insert a value into it */ - query = "INSERT INTO `phone` ( `id`, `name`, `number` )" - "VALUES('1', 'Abe', '8675309')"; - r = MsiDatabaseOpenView(hdb, query, &hview); - ok(r == ERROR_SUCCESS, "MsiDatabaseOpenView failed\n"); - r = MsiViewExecute(hview, 0); - ok(r == ERROR_SUCCESS, "MsiViewExecute failed\n"); - r = MsiViewClose(hview); - ok(r == ERROR_SUCCESS, "MsiViewClose failed\n"); - r = MsiCloseHandle(hview); - ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); - - query = "SELECT * FROM `phone` WHERE `id` = 1"; - r = do_query(hdb, query, &hrec); - ok(r == ERROR_SUCCESS, "MsiViewFetch failed\n"); - - /* check the record contains what we put in it */ - r = MsiRecordGetFieldCount(hrec); - ok(r == 3, "record count wrong\n"); - - r = MsiRecordIsNull(hrec, 0); - ok(r == FALSE, "field 0 not null\n"); - - r = MsiRecordGetInteger(hrec, 1); - ok(r == 1, "field 1 contents wrong\n"); - sz = sizeof buf; - r = MsiRecordGetString(hrec, 2, buf, &sz); - ok(r == ERROR_SUCCESS, "field 2 content fetch failed\n"); - ok(!strcmp(buf,"Abe"), "field 2 content incorrect\n"); - sz = sizeof buf; - r = MsiRecordGetString(hrec, 3, buf, &sz); - ok(r == ERROR_SUCCESS, "field 3 content fetch failed\n"); - ok(!strcmp(buf,"8675309"), "field 3 content incorrect\n"); - - r = MsiCloseHandle(hrec); - ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); - - /* open a select query */ - hrec = 100; - query = "SELECT * FROM `phone` WHERE `id` >= 10"; - r = do_query(hdb, query, &hrec); - ok(r == ERROR_NO_MORE_ITEMS, "MsiViewFetch failed\n"); - ok(hrec == 0, "hrec should be null\n"); - - r = MsiCloseHandle(hrec); - ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); - - query = "SELECT * FROM `phone` WHERE `id` < 0"; - r = do_query(hdb, query, &hrec); - ok(r == ERROR_NO_MORE_ITEMS, "MsiViewFetch failed\n"); - - query = "SELECT * FROM `phone` WHERE `id` <= 0"; - r = do_query(hdb, query, &hrec); - ok(r == ERROR_NO_MORE_ITEMS, "MsiViewFetch failed\n"); - - query = "SELECT * FROM `phone` WHERE `id` <> 1"; - r = do_query(hdb, query, &hrec); - ok(r == ERROR_NO_MORE_ITEMS, "MsiViewFetch failed\n"); - - query = "SELECT * FROM `phone` WHERE `id` > 10"; - r = do_query(hdb, query, &hrec); - ok(r == ERROR_NO_MORE_ITEMS, "MsiViewFetch failed\n"); - - /* now try a few bad INSERT xqueries */ - query = "INSERT INTO `phone` ( `id`, `name`, `number` )" - "VALUES(?, ?)"; - r = MsiDatabaseOpenView(hdb, query, &hview); - ok(r == ERROR_BAD_QUERY_SYNTAX, "MsiDatabaseOpenView failed\n"); - - /* construct a record to insert */ - hrec = MsiCreateRecord(4); - r = MsiRecordSetInteger(hrec, 1, 2); - ok(r == ERROR_SUCCESS, "MsiRecordSetInteger failed\n"); - r = MsiRecordSetString(hrec, 2, "Adam"); - ok(r == ERROR_SUCCESS, "MsiRecordSetString failed\n"); - r = MsiRecordSetString(hrec, 3, "96905305"); - ok(r == ERROR_SUCCESS, "MsiRecordSetString failed\n"); - - /* insert another value, using a record and wildcards */ - query = "INSERT INTO `phone` ( `id`, `name`, `number` )" - "VALUES(?, ?, ?)"; - r = MsiDatabaseOpenView(hdb, query, &hview); - ok(r == ERROR_SUCCESS, "MsiDatabaseOpenView failed\n"); - - if (r == ERROR_SUCCESS) - { - r = MsiViewExecute(hview, hrec); - ok(r == ERROR_SUCCESS, "MsiViewExecute failed\n"); - r = MsiViewClose(hview); - ok(r == ERROR_SUCCESS, "MsiViewClose failed\n"); - r = MsiCloseHandle(hview); - ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); - } - r = MsiCloseHandle(hrec); - ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); - - r = MsiViewFetch(0, NULL); - ok(r == ERROR_INVALID_PARAMETER, "MsiViewFetch failed\n"); - - r = MsiDatabaseCommit(hdb); - ok(r == ERROR_SUCCESS, "MsiDatabaseCommit failed\n"); - - r = MsiCloseHandle(hdb); - ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); - - r = DeleteFile(msifile); - ok(r == TRUE, "file didn't exist after commit\n"); -} - -typedef UINT (WINAPI *fnMsiDecomposeDescriptorA)(LPCSTR, LPCSTR, LPSTR, LPSTR, DWORD *); -static fnMsiDecomposeDescriptorA pMsiDecomposeDescriptorA; - -static void test_msidecomposedesc(void) -{ - char prod[MAX_FEATURE_CHARS+1], comp[MAX_FEATURE_CHARS+1], feature[MAX_FEATURE_CHARS+1]; - const char *desc; - UINT r; - DWORD len; - HMODULE hmod; - - hmod = GetModuleHandle("msi.dll"); - pMsiDecomposeDescriptorA = (fnMsiDecomposeDescriptorA) - GetProcAddress(hmod, "MsiDecomposeDescriptorA"); - if (!pMsiDecomposeDescriptorA) - return; - - /* test a valid feature descriptor */ - desc = "']gAVn-}f(ZXfeAR6.jiFollowTheWhiteRabbit>3w2x^IGfe?CxI5heAvk."; - len = 0; - r = pMsiDecomposeDescriptorA(desc, prod, feature, comp, &len); - ok(r == ERROR_SUCCESS, "returned an error\n"); - ok(len == strlen(desc), "length was wrong\n"); - ok(strcmp(prod,"{90110409-6000-11D3-8CFE-0150048383C9}")==0, "product wrong\n"); - ok(strcmp(feature,"FollowTheWhiteRabbit")==0, "feature wrong\n"); - ok(strcmp(comp,"{A7CD68DB-EF74-49C8-FBB2-A7C463B2AC24}")==0,"component wrong\n"); - - /* test an invalid feature descriptor with too many characters */ - desc = "']gAVn-}f(ZXfeAR6.ji" - "ThisWillFailIfTheresMoreThanAGuidsChars>" - "3w2x^IGfe?CxI5heAvk."; - len = 0; - r = pMsiDecomposeDescriptorA(desc, prod, feature, comp, &len); - ok(r == ERROR_INVALID_PARAMETER, "returned wrong error\n"); - - /* - * Test a valid feature descriptor with the - * maximum number of characters and some trailing characters. - */ - desc = "']gAVn-}f(ZXfeAR6.ji" - "ThisWillWorkIfTheresLTEThanAGuidsChars>" - "3w2x^IGfe?CxI5heAvk." - "extra"; - len = 0; - r = pMsiDecomposeDescriptorA(desc, prod, feature, comp, &len); - ok(r == ERROR_SUCCESS, "returned wrong error\n"); - ok(len == (strlen(desc) - strlen("extra")), "length wrong\n"); - - len = 0; - r = pMsiDecomposeDescriptorA(desc, prod, feature, NULL, &len); - ok(r == ERROR_SUCCESS, "returned wrong error\n"); - ok(len == (strlen(desc) - strlen("extra")), "length wrong\n"); - - len = 0; - r = pMsiDecomposeDescriptorA(desc, prod, NULL, NULL, &len); - ok(r == ERROR_SUCCESS, "returned wrong error\n"); - ok(len == (strlen(desc) - strlen("extra")), "length wrong\n"); - - len = 0; - r = pMsiDecomposeDescriptorA(desc, NULL, NULL, NULL, &len); - ok(r == ERROR_SUCCESS, "returned wrong error\n"); - ok(len == (strlen(desc) - strlen("extra")), "length wrong\n"); - - len = 0; - r = pMsiDecomposeDescriptorA(NULL, NULL, NULL, NULL, &len); - ok(r == ERROR_INVALID_PARAMETER, "returned wrong error\n"); - ok(len == 0, "length wrong\n"); - - r = pMsiDecomposeDescriptorA(desc, NULL, NULL, NULL, NULL); - ok(r == ERROR_SUCCESS, "returned wrong error\n"); -} - -static UINT try_query_param( MSIHANDLE hdb, LPCSTR szQuery, MSIHANDLE hrec ) -{ - MSIHANDLE htab = 0; - UINT res; - - res = MsiDatabaseOpenView( hdb, szQuery, &htab ); - if(res == ERROR_SUCCESS ) - { - UINT r; - - r = MsiViewExecute( htab, hrec ); - if(r != ERROR_SUCCESS ) - res = r; - - r = MsiViewClose( htab ); - if(r != ERROR_SUCCESS ) - res = r; - - r = MsiCloseHandle( htab ); - if(r != ERROR_SUCCESS ) - res = r; - } - return res; -} - -static UINT try_query( MSIHANDLE hdb, LPCSTR szQuery ) -{ - return try_query_param( hdb, szQuery, 0 ); -} - -static UINT try_insert_query( MSIHANDLE hdb, LPCSTR szQuery ) -{ - MSIHANDLE hrec = 0; - UINT r; - - hrec = MsiCreateRecord( 1 ); - MsiRecordSetString( hrec, 1, "Hello"); - - r = try_query_param( hdb, szQuery, hrec ); - - MsiCloseHandle( hrec ); - return r; -} - -static void test_msibadqueries(void) -{ - MSIHANDLE hdb = 0; - UINT r; - - DeleteFile(msifile); - - /* just MsiOpenDatabase should not create a file */ - r = MsiOpenDatabase(msifile, MSIDBOPEN_CREATE, &hdb); - ok(r == ERROR_SUCCESS, "MsiOpenDatabase failed\n"); - - r = MsiDatabaseCommit( hdb ); - ok(r == ERROR_SUCCESS , "Failed to commit database\n"); - - r = MsiCloseHandle( hdb ); - ok(r == ERROR_SUCCESS , "Failed to close database\n"); - - /* open it readonly */ - r = MsiOpenDatabase(msifile, MSIDBOPEN_READONLY, &hdb ); - ok(r == ERROR_SUCCESS , "Failed to open database r/o\n"); - - /* add a table to it */ - r = try_query( hdb, "select * from _Tables"); - ok(r == ERROR_SUCCESS , "query 1 failed\n"); - - r = MsiCloseHandle( hdb ); - ok(r == ERROR_SUCCESS , "Failed to close database r/o\n"); - - /* open it read/write */ - r = MsiOpenDatabase(msifile, MSIDBOPEN_TRANSACT, &hdb ); - ok(r == ERROR_SUCCESS , "Failed to open database r/w\n"); - - /* a bunch of test queries that fail with the native MSI */ - - r = try_query( hdb, "CREATE TABLE"); - ok(r == ERROR_BAD_QUERY_SYNTAX , "invalid query 2a return code\n"); - - r = try_query( hdb, "CREATE TABLE `a`"); - ok(r == ERROR_BAD_QUERY_SYNTAX , "invalid query 2b return code\n"); - - r = try_query( hdb, "CREATE TABLE `a` ()"); - ok(r == ERROR_BAD_QUERY_SYNTAX , "invalid query 2c return code\n"); - - r = try_query( hdb, "CREATE TABLE `a` (`b`)"); - ok(r == ERROR_BAD_QUERY_SYNTAX , "invalid query 2d return code\n"); - - r = try_query( hdb, "CREATE TABLE `a` (`b` CHAR(72) )"); - ok(r == ERROR_BAD_QUERY_SYNTAX , "invalid query 2e return code\n"); - - r = try_query( hdb, "CREATE TABLE `a` (`b` CHAR(72) NOT NULL)"); - ok(r == ERROR_BAD_QUERY_SYNTAX , "invalid query 2f return code\n"); - - r = try_query( hdb, "CREATE TABLE `a` (`b` CHAR(72) NOT NULL PRIMARY)"); - ok(r == ERROR_BAD_QUERY_SYNTAX , "invalid query 2g return code\n"); - - r = try_query( hdb, "CREATE TABLE `a` (`b` CHAR(72) NOT NULL PRIMARY KEY)"); - ok(r == ERROR_BAD_QUERY_SYNTAX , "invalid query 2h return code\n"); - - r = try_query( hdb, "CREATE TABLE `a` (`b` CHAR(72) NOT NULL PRIMARY KEY)"); - ok(r == ERROR_BAD_QUERY_SYNTAX , "invalid query 2i return code\n"); - - r = try_query( hdb, "CREATE TABLE `a` (`b` CHAR(72) NOT NULL PRIMARY KEY 'b')"); - ok(r == ERROR_BAD_QUERY_SYNTAX , "invalid query 2j return code\n"); - - r = try_query( hdb, "CREATE TABLE `a` (`b` CHAR(72) NOT NULL PRIMARY KEY `b')"); - ok(r == ERROR_BAD_QUERY_SYNTAX , "invalid query 2k return code\n"); - - r = try_query( hdb, "CREATE TABLE `a` (`b` CHAR(72) NOT NULL PRIMARY KEY `b')"); - ok(r == ERROR_BAD_QUERY_SYNTAX , "invalid query 2l return code\n"); - - r = try_query( hdb, "CREATE TABLE `a` (`b` CHA(72) NOT NULL PRIMARY KEY `b`)"); - ok(r == ERROR_BAD_QUERY_SYNTAX , "invalid query 2m return code\n"); - - r = try_query( hdb, "CREATE TABLE `a` (`b` CHAR(-1) NOT NULL PRIMARY KEY `b`)"); - ok(r == ERROR_BAD_QUERY_SYNTAX , "invalid query 2n return code\n"); - - r = try_query( hdb, "CREATE TABLE `a` (`b` CHAR(720) NOT NULL PRIMARY KEY `b`)"); - ok(r == ERROR_BAD_QUERY_SYNTAX , "invalid query 2o return code\n"); - - r = try_query( hdb, "CREATE TABLE `a` (`b` CHAR(72) NOT NULL KEY `b`)"); - ok(r == ERROR_BAD_QUERY_SYNTAX , "invalid query 2p return code\n"); - - r = try_query( hdb, "CREATE TABLE `a` (`` CHAR(72) NOT NULL PRIMARY KEY `b`)"); - ok(r == ERROR_BAD_QUERY_SYNTAX , "invalid query 2p return code\n"); - - r = try_query( hdb, "CREATE TABLE `a` (`b` CHAR(72) NOT NULL PRIMARY KEY `b`)"); - ok(r == ERROR_SUCCESS , "valid query 2z failed\n"); - - r = try_query( hdb, "CREATE TABLE `a` (`b` CHAR(72) NOT NULL PRIMARY KEY `b`)"); - ok(r == ERROR_BAD_QUERY_SYNTAX , "created same table again\n"); - - r = try_query( hdb, "CREATE TABLE `aa` (`b` CHAR(72) NOT NULL, `c` " - "CHAR(72), `d` CHAR(255) NOT NULL LOCALIZABLE PRIMARY KEY `b`)"); - ok(r == ERROR_SUCCESS , "query 4 failed\n"); - - r = MsiDatabaseCommit( hdb ); - ok(r == ERROR_SUCCESS , "Failed to commit database after write\n"); - - r = try_query( hdb, "CREATE TABLE `blah` (`foo` CHAR(72) NOT NULL " - "PRIMARY KEY `foo`)"); - ok(r == ERROR_SUCCESS , "query 4 failed\n"); - - r = try_insert_query( hdb, "insert into a ( `b` ) VALUES ( ? )"); - ok(r == ERROR_SUCCESS , "failed to insert record in db\n"); - - r = MsiDatabaseCommit( hdb ); - ok(r == ERROR_SUCCESS , "Failed to commit database after write\n"); - - r = try_query( hdb, "CREATE TABLE `boo` (`foo` CHAR(72) NOT NULL " - "PRIMARY KEY `ba`)"); - ok(r != ERROR_SUCCESS , "query 5 succeeded\n"); - - r = try_query( hdb,"CREATE TABLE `bee` (`foo` CHAR(72) NOT NULL )"); - ok(r != ERROR_SUCCESS , "query 6 succeeded\n"); - - r = try_query( hdb, "CREATE TABLE `temp` (`t` CHAR(72) NOT NULL " - "PRIMARY KEY `t`)"); - ok(r == ERROR_SUCCESS , "query 7 failed\n"); - - r = try_query( hdb, "CREATE TABLE `c` (`b` CHAR NOT NULL PRIMARY KEY `b`)"); - ok(r == ERROR_SUCCESS , "query 8 failed\n"); - - r = try_query( hdb, "select * from c"); - ok(r == ERROR_SUCCESS , "query failed\n"); - - r = try_query( hdb, "select * from c where b = 'x"); - ok(r == ERROR_BAD_QUERY_SYNTAX, "query failed\n"); - - r = try_query( hdb, "select * from c where b = 'x'"); - ok(r == ERROR_SUCCESS, "query failed\n"); - - r = try_query( hdb, "select * from 'c'"); - ok(r == ERROR_BAD_QUERY_SYNTAX, "query failed\n"); - - r = try_query( hdb, "select * from ''"); - ok(r == ERROR_BAD_QUERY_SYNTAX, "query failed\n"); - - r = try_query( hdb, "select * from c where b = x"); - ok(r == ERROR_BAD_QUERY_SYNTAX, "query failed\n"); - - r = try_query( hdb, "select * from c where b = \"x\""); - ok(r == ERROR_BAD_QUERY_SYNTAX, "query failed\n"); - - r = try_query( hdb, "select * from c where b = 'x'"); - ok(r == ERROR_SUCCESS, "query failed\n"); - - r = try_query( hdb, "select * from c where b = '\"x'"); - ok(r == ERROR_SUCCESS, "query failed\n"); - - if (0) /* FIXME: this query causes trouble with other tests */ - { - r = try_query( hdb, "select * from c where b = '\\\'x'"); - ok(r == ERROR_BAD_QUERY_SYNTAX, "query failed\n"); - } - - r = try_query( hdb, "select * from 'c'"); - ok(r == ERROR_BAD_QUERY_SYNTAX, "query failed\n"); - - r = try_query( hdb, "CREATE TABLE `\5a` (`b` CHAR NOT NULL PRIMARY KEY `b`)" ); - ok( r == ERROR_SUCCESS , "query failed: %u\n", r ); - - r = try_query( hdb, "SELECT * FROM \5a" ); - ok( r == ERROR_SUCCESS , "query failed: %u\n", r ); - - r = try_query( hdb, "CREATE TABLE `a\5` (`b` CHAR NOT NULL PRIMARY KEY `b`)" ); - ok( r == ERROR_SUCCESS , "query failed: %u\n", r ); - - r = try_query( hdb, "SELECT * FROM a\5" ); - ok( r == ERROR_SUCCESS , "query failed: %u\n", r ); - - r = try_query( hdb, "CREATE TABLE `-a` (`b` CHAR NOT NULL PRIMARY KEY `b`)" ); - ok( r == ERROR_SUCCESS , "query failed: %u\n", r ); - - r = try_query( hdb, "SELECT * FROM -a" ); - todo_wine ok( r == ERROR_SUCCESS , "query failed: %u\n", r ); - - r = try_query( hdb, "CREATE TABLE `a-` (`b` CHAR NOT NULL PRIMARY KEY `b`)" ); - ok( r == ERROR_SUCCESS , "query failed: %u\n", r ); - - r = try_query( hdb, "SELECT * FROM a-" ); - ok( r == ERROR_SUCCESS , "query failed: %u\n", r ); - - r = MsiCloseHandle( hdb ); - ok(r == ERROR_SUCCESS , "Failed to close database transact\n"); - - r = DeleteFile( msifile ); - ok(r == TRUE, "file didn't exist after commit\n"); -} - -static void test_viewmodify(void) -{ - MSIHANDLE hdb = 0, hview = 0, hrec = 0; - UINT r; - MSIDBERROR err; - const char *query; - char buffer[0x100]; - DWORD sz; - - DeleteFile(msifile); - - /* just MsiOpenDatabase should not create a file */ - r = MsiOpenDatabase(msifile, MSIDBOPEN_CREATE, &hdb); - ok(r == ERROR_SUCCESS, "MsiOpenDatabase failed\n"); - - query = "CREATE TABLE `phone` ( " - "`id` INT, `name` CHAR(32), `number` CHAR(32) " - "PRIMARY KEY `id`)"; - r = run_query( hdb, 0, query ); - ok(r == ERROR_SUCCESS, "query failed\n"); - - /* check what the error function reports without doing anything */ - sz = 0; - /* passing NULL as the 3rd param make function to crash on older platforms */ - err = MsiViewGetError( 0, NULL, &sz ); - ok(err == MSIDBERROR_INVALIDARG, "MsiViewGetError return\n"); - - /* open a view */ - query = "SELECT * FROM `phone`"; - r = MsiDatabaseOpenView(hdb, query, &hview); - ok(r == ERROR_SUCCESS, "MsiDatabaseOpenView failed\n"); - - /* see what happens with a good hview and bad args */ - err = MsiViewGetError( hview, NULL, NULL ); - ok(err == MSIDBERROR_INVALIDARG || err == MSIDBERROR_NOERROR, - "MsiViewGetError returns %u (expected -3)\n", err); - err = MsiViewGetError( hview, buffer, NULL ); - ok(err == MSIDBERROR_INVALIDARG, "MsiViewGetError return\n"); - - /* see what happens with a zero length buffer */ - sz = 0; - buffer[0] = 'x'; - err = MsiViewGetError( hview, buffer, &sz ); - ok(err == MSIDBERROR_MOREDATA, "MsiViewGetError return\n"); - ok(buffer[0] == 'x', "buffer cleared\n"); - ok(sz == 0, "size not zero\n"); - - /* ok this one is strange */ - sz = 0; - err = MsiViewGetError( hview, NULL, &sz ); - ok(err == MSIDBERROR_NOERROR, "MsiViewGetError return\n"); - ok(sz == 0, "size not zero\n"); - - /* see if it really has an error */ - sz = sizeof buffer; - buffer[0] = 'x'; - err = MsiViewGetError( hview, buffer, &sz ); - ok(err == MSIDBERROR_NOERROR, "MsiViewGetError return\n"); - ok(buffer[0] == 0, "buffer not cleared\n"); - ok(sz == 0, "size not zero\n"); - - r = MsiViewExecute(hview, 0); - ok(r == ERROR_SUCCESS, "MsiViewExecute failed\n"); - - /* try some invalid records */ - r = MsiViewModify(hview, MSIMODIFY_INSERT, 0 ); - ok(r == ERROR_INVALID_HANDLE, "MsiViewModify failed\n"); - r = MsiViewModify(hview, -1, 0 ); - ok(r == ERROR_INVALID_HANDLE, "MsiViewModify failed\n"); - - /* try an small record */ - hrec = MsiCreateRecord(1); - r = MsiViewModify(hview, -1, hrec ); - ok(r == ERROR_INVALID_DATA, "MsiViewModify failed\n"); - - r = MsiCloseHandle(hrec); - ok(r == ERROR_SUCCESS, "failed to close record\n"); - - /* insert a valid record */ - hrec = MsiCreateRecord(3); - - r = MsiRecordSetInteger(hrec, 1, 1); - ok(r == ERROR_SUCCESS, "failed to set integer\n"); - r = MsiRecordSetString(hrec, 2, "bob"); - ok(r == ERROR_SUCCESS, "failed to set string\n"); - r = MsiRecordSetString(hrec, 3, "7654321"); - ok(r == ERROR_SUCCESS, "failed to set string\n"); - - r = MsiViewExecute(hview, 0); - ok(r == ERROR_SUCCESS, "MsiViewExecute failed\n"); - r = MsiViewModify(hview, MSIMODIFY_INSERT_TEMPORARY, hrec ); - ok(r == ERROR_SUCCESS, "MsiViewModify failed\n"); - - /* insert the same thing again */ - r = MsiViewExecute(hview, 0); - ok(r == ERROR_SUCCESS, "MsiViewExecute failed\n"); - - /* should fail ... */ - r = MsiViewModify(hview, MSIMODIFY_INSERT_TEMPORARY, hrec ); - ok(r == ERROR_FUNCTION_FAILED, "MsiViewModify failed\n"); - - r = MsiCloseHandle(hrec); - ok(r == ERROR_SUCCESS, "failed to close record\n"); - - r = MsiViewClose(hview); - ok(r == ERROR_SUCCESS, "MsiViewClose failed\n"); - r = MsiCloseHandle(hview); - ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); - - query = "SELECT * FROM `phone`"; - r = MsiDatabaseOpenView(hdb, query, &hview); - ok(r == ERROR_SUCCESS, "MsiDatabaseOpenView failed\n"); - - r = MsiViewExecute(hview, 0); - ok(r == ERROR_SUCCESS, "MsiViewExecute failed\n"); - - r = MsiViewFetch(hview, &hrec); - ok(r == ERROR_SUCCESS, "MsiViewFetch failed\n"); - - r = MsiRecordGetInteger(hrec, 1); - ok(r == 1, "Expected 1, got %d\n", r); - - sz = sizeof(buffer); - r = MsiRecordGetString(hrec, 2, buffer, &sz); - ok(r == ERROR_SUCCESS, "MsiRecordGetString failed\n"); - ok(!lstrcmp(buffer, "bob"), "Expected bob, got %s\n", buffer); - - sz = sizeof(buffer); - r = MsiRecordGetString(hrec, 3, buffer, &sz); - ok(r == ERROR_SUCCESS, "MsiRecordGetString failed\n"); - ok(!lstrcmp(buffer, "7654321"), "Expected 7654321, got %s\n", buffer); - - /* update the view, non-primary key */ - r = MsiRecordSetString(hrec, 3, "3141592"); - ok(r == ERROR_SUCCESS, "MsiRecordSetString failed\n"); - - r = MsiViewModify(hview, MSIMODIFY_UPDATE, hrec); - ok(r == ERROR_SUCCESS, "MsiViewModify failed\n"); - - /* do it again */ - r = MsiViewModify(hview, MSIMODIFY_UPDATE, hrec); - ok(r == ERROR_SUCCESS, "MsiViewModify failed: %d\n", r); - - /* update the view, primary key */ - r = MsiRecordSetInteger(hrec, 1, 5); - ok(r == ERROR_SUCCESS, "MsiRecordSetInteger failed\n"); - - r = MsiViewModify(hview, MSIMODIFY_UPDATE, hrec); - ok(r == ERROR_FUNCTION_FAILED, "MsiViewModify failed\n"); - - r = MsiCloseHandle(hrec); - ok(r == ERROR_SUCCESS, "failed to close record\n"); - - r = MsiViewClose(hview); - ok(r == ERROR_SUCCESS, "MsiViewClose failed\n"); - r = MsiCloseHandle(hview); - ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); - - query = "SELECT * FROM `phone`"; - r = MsiDatabaseOpenView(hdb, query, &hview); - ok(r == ERROR_SUCCESS, "MsiDatabaseOpenView failed\n"); - - r = MsiViewExecute(hview, 0); - ok(r == ERROR_SUCCESS, "MsiViewExecute failed\n"); - - r = MsiViewFetch(hview, &hrec); - ok(r == ERROR_SUCCESS, "MsiViewFetch failed\n"); - - r = MsiRecordGetInteger(hrec, 1); - ok(r == 1, "Expected 1, got %d\n", r); - - sz = sizeof(buffer); - r = MsiRecordGetString(hrec, 2, buffer, &sz); - ok(r == ERROR_SUCCESS, "MsiRecordGetString failed\n"); - ok(!lstrcmp(buffer, "bob"), "Expected bob, got %s\n", buffer); - - sz = sizeof(buffer); - r = MsiRecordGetString(hrec, 3, buffer, &sz); - ok(r == ERROR_SUCCESS, "MsiRecordGetString failed\n"); - ok(!lstrcmp(buffer, "3141592"), "Expected 3141592, got %s\n", buffer); - - r = MsiCloseHandle(hrec); - ok(r == ERROR_SUCCESS, "failed to close record\n"); - - /* use a record that doesn't come from a view fetch */ - hrec = MsiCreateRecord(3); - ok(hrec != 0, "MsiCreateRecord failed\n"); - - r = MsiRecordSetInteger(hrec, 1, 3); - ok(r == ERROR_SUCCESS, "failed to set integer\n"); - r = MsiRecordSetString(hrec, 2, "jane"); - ok(r == ERROR_SUCCESS, "failed to set string\n"); - r = MsiRecordSetString(hrec, 3, "112358"); - ok(r == ERROR_SUCCESS, "failed to set string\n"); - - r = MsiViewModify(hview, MSIMODIFY_UPDATE, hrec); - ok(r == ERROR_FUNCTION_FAILED, "Expected ERROR_FUNCTION_FAILED, got %d\n", r); - - r = MsiCloseHandle(hrec); - ok(r == ERROR_SUCCESS, "failed to close record\n"); - - /* use a record that doesn't come from a view fetch, primary key matches */ - hrec = MsiCreateRecord(3); - ok(hrec != 0, "MsiCreateRecord failed\n"); - - r = MsiRecordSetInteger(hrec, 1, 1); - ok(r == ERROR_SUCCESS, "failed to set integer\n"); - r = MsiRecordSetString(hrec, 2, "jane"); - ok(r == ERROR_SUCCESS, "failed to set string\n"); - r = MsiRecordSetString(hrec, 3, "112358"); - ok(r == ERROR_SUCCESS, "failed to set string\n"); - - r = MsiViewModify(hview, MSIMODIFY_UPDATE, hrec); - ok(r == ERROR_FUNCTION_FAILED, "MsiViewModify failed\n"); - - r = MsiCloseHandle(hrec); - ok(r == ERROR_SUCCESS, "failed to close record\n"); - - hrec = MsiCreateRecord(3); - - r = MsiRecordSetInteger(hrec, 1, 2); - ok(r == ERROR_SUCCESS, "failed to set integer\n"); - r = MsiRecordSetString(hrec, 2, "nick"); - ok(r == ERROR_SUCCESS, "failed to set string\n"); - r = MsiRecordSetString(hrec, 3, "141421"); - ok(r == ERROR_SUCCESS, "failed to set string\n"); - - r = MsiViewExecute(hview, 0); - ok(r == ERROR_SUCCESS, "MsiViewExecute failed\n"); - r = MsiViewModify(hview, MSIMODIFY_INSERT_TEMPORARY, hrec ); - ok(r == ERROR_SUCCESS, "MsiViewModify failed\n"); - - r = MsiCloseHandle(hrec); - ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); - r = MsiViewClose(hview); - ok(r == ERROR_SUCCESS, "MsiViewClose failed\n"); - r = MsiCloseHandle(hview); - ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); - - query = "SELECT * FROM `phone` WHERE `id` = 1"; - r = MsiDatabaseOpenView(hdb, query, &hview); - ok(r == ERROR_SUCCESS, "MsiDatabaseOpenView failed\n"); - r = MsiViewExecute(hview, 0); - ok(r == ERROR_SUCCESS, "MsiViewExecute failed\n"); - r = MsiViewFetch(hview, &hrec); - ok(r == ERROR_SUCCESS, "MsiViewFetch failed\n"); - - /* change the id to match the second row */ - r = MsiRecordSetInteger(hrec, 1, 2); - ok(r == ERROR_SUCCESS, "failed to set integer\n"); - r = MsiRecordSetString(hrec, 2, "jerry"); - ok(r == ERROR_SUCCESS, "failed to set string\n"); - - r = MsiViewModify(hview, MSIMODIFY_UPDATE, hrec); - ok(r == ERROR_FUNCTION_FAILED, "MsiViewModify failed\n"); - - r = MsiCloseHandle(hrec); - ok(r == ERROR_SUCCESS, "failed to close record\n"); - r = MsiViewClose(hview); - ok(r == ERROR_SUCCESS, "MsiViewClose failed\n"); - r = MsiCloseHandle(hview); - ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); - - /* broader search */ - query = "SELECT * FROM `phone` ORDER BY `id`"; - r = MsiDatabaseOpenView(hdb, query, &hview); - ok(r == ERROR_SUCCESS, "MsiDatabaseOpenView failed\n"); - r = MsiViewExecute(hview, 0); - ok(r == ERROR_SUCCESS, "MsiViewExecute failed\n"); - r = MsiViewFetch(hview, &hrec); - ok(r == ERROR_SUCCESS, "MsiViewFetch failed\n"); - - /* change the id to match the second row */ - r = MsiRecordSetInteger(hrec, 1, 2); - ok(r == ERROR_SUCCESS, "failed to set integer\n"); - r = MsiRecordSetString(hrec, 2, "jerry"); - ok(r == ERROR_SUCCESS, "failed to set string\n"); - - r = MsiViewModify(hview, MSIMODIFY_UPDATE, hrec); - ok(r == ERROR_FUNCTION_FAILED, "MsiViewModify failed\n"); - - r = MsiCloseHandle(hrec); - ok(r == ERROR_SUCCESS, "failed to close record\n"); - r = MsiViewClose(hview); - ok(r == ERROR_SUCCESS, "MsiViewClose failed\n"); - r = MsiCloseHandle(hview); - ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); - - r = MsiCloseHandle( hdb ); - ok(r == ERROR_SUCCESS, "MsiOpenDatabase close failed\n"); -} - -static MSIHANDLE create_db(void) -{ - MSIHANDLE hdb = 0; - UINT res; - - DeleteFile(msifile); - - /* create an empty database */ - res = MsiOpenDatabase(msifile, MSIDBOPEN_CREATE, &hdb ); - ok( res == ERROR_SUCCESS , "Failed to create database\n" ); - if( res != ERROR_SUCCESS ) - return hdb; - - res = MsiDatabaseCommit( hdb ); - ok( res == ERROR_SUCCESS , "Failed to commit database\n" ); - - return hdb; -} - -static void test_getcolinfo(void) -{ - MSIHANDLE hdb, hview = 0, rec = 0; - UINT r; - DWORD sz; - char buffer[0x20]; - - /* create an empty db */ - hdb = create_db(); - ok( hdb, "failed to create db\n"); - - /* tables should be present */ - r = MsiDatabaseOpenView(hdb, "select * from _Tables", &hview); - ok( r == ERROR_SUCCESS, "failed to open query\n"); - - r = MsiViewExecute(hview, 0); - ok( r == ERROR_SUCCESS, "failed to execute query\n"); - - /* check that NAMES works */ - rec = 0; - r = MsiViewGetColumnInfo( hview, MSICOLINFO_NAMES, &rec ); - ok( r == ERROR_SUCCESS, "failed to get names\n"); - sz = sizeof buffer; - r = MsiRecordGetString(rec, 1, buffer, &sz ); - ok( r == ERROR_SUCCESS, "failed to get string\n"); - ok( !strcmp(buffer,"Name"), "_Tables has wrong column name\n"); - r = MsiCloseHandle( rec ); - ok( r == ERROR_SUCCESS, "failed to close record handle\n"); - - /* check that TYPES works */ - rec = 0; - r = MsiViewGetColumnInfo( hview, MSICOLINFO_TYPES, &rec ); - ok( r == ERROR_SUCCESS, "failed to get names\n"); - sz = sizeof buffer; - r = MsiRecordGetString(rec, 1, buffer, &sz ); - ok( r == ERROR_SUCCESS, "failed to get string\n"); - ok( !strcmp(buffer,"s64"), "_Tables has wrong column type\n"); - r = MsiCloseHandle( rec ); - ok( r == ERROR_SUCCESS, "failed to close record handle\n"); - - /* check that invalid values fail */ - rec = 0; - r = MsiViewGetColumnInfo( hview, 100, &rec ); - ok( r == ERROR_INVALID_PARAMETER, "wrong error code\n"); - ok( rec == 0, "returned a record\n"); - - r = MsiViewGetColumnInfo( hview, MSICOLINFO_TYPES, NULL ); - ok( r == ERROR_INVALID_PARAMETER, "wrong error code\n"); - - r = MsiViewGetColumnInfo( 0, MSICOLINFO_TYPES, &rec ); - ok( r == ERROR_INVALID_HANDLE, "wrong error code\n"); - - r = MsiViewClose(hview); - ok( r == ERROR_SUCCESS, "failed to close view\n"); - r = MsiCloseHandle(hview); - ok( r == ERROR_SUCCESS, "failed to close view handle\n"); - r = MsiCloseHandle(hdb); - ok( r == ERROR_SUCCESS, "failed to close database\n"); -} - -static MSIHANDLE get_column_info(MSIHANDLE hdb, const char *query, MSICOLINFO type) -{ - MSIHANDLE hview = 0, rec = 0; - UINT r; - - r = MsiDatabaseOpenView(hdb, query, &hview); - if( r != ERROR_SUCCESS ) - return r; - - r = MsiViewExecute(hview, 0); - if( r == ERROR_SUCCESS ) - { - MsiViewGetColumnInfo( hview, type, &rec ); - } - MsiViewClose(hview); - MsiCloseHandle(hview); - return rec; -} - -static UINT get_columns_table_type(MSIHANDLE hdb, const char *table, UINT field) -{ - MSIHANDLE hview = 0, rec = 0; - UINT r, type = 0; - char query[0x100]; - - sprintf(query, "select * from `_Columns` where `Table` = '%s'", table ); - - r = MsiDatabaseOpenView(hdb, query, &hview); - if( r != ERROR_SUCCESS ) - return r; - - r = MsiViewExecute(hview, 0); - if( r == ERROR_SUCCESS ) - { - while (1) - { - r = MsiViewFetch( hview, &rec ); - if( r != ERROR_SUCCESS) - break; - r = MsiRecordGetInteger( rec, 2 ); - if (r == field) - type = MsiRecordGetInteger( rec, 4 ); - MsiCloseHandle( rec ); - } - } - MsiViewClose(hview); - MsiCloseHandle(hview); - return type; -} - -static BOOL check_record( MSIHANDLE rec, UINT field, LPCSTR val ) -{ - CHAR buffer[0x20]; - UINT r; - DWORD sz; - - sz = sizeof buffer; - r = MsiRecordGetString( rec, field, buffer, &sz ); - return (r == ERROR_SUCCESS ) && !strcmp(val, buffer); -} - -static void test_viewgetcolumninfo(void) -{ - MSIHANDLE hdb = 0, rec; - UINT r; - - hdb = create_db(); - ok( hdb, "failed to create db\n"); - - r = run_query( hdb, 0, - "CREATE TABLE `Properties` " - "( `Property` CHAR(255), " - " `Value` CHAR(1), " - " `Intvalue` INT, " - " `Integervalue` INTEGER, " - " `Shortvalue` SHORT, " - " `Longvalue` LONG, " - " `Longcharvalue` LONGCHAR " - " PRIMARY KEY `Property`)" ); - ok( r == ERROR_SUCCESS , "Failed to create table\n" ); - - /* check the column types */ - rec = get_column_info( hdb, "select * from `Properties`", MSICOLINFO_TYPES ); - ok( rec, "failed to get column info record\n" ); - - ok( check_record( rec, 1, "S255"), "wrong record type\n"); - ok( check_record( rec, 2, "S1"), "wrong record type\n"); - ok( check_record( rec, 3, "I2"), "wrong record type\n"); - ok( check_record( rec, 4, "I2"), "wrong record type\n"); - ok( check_record( rec, 5, "I2"), "wrong record type\n"); - ok( check_record( rec, 6, "I4"), "wrong record type\n"); - ok( check_record( rec, 7, "S0"), "wrong record type\n"); - - MsiCloseHandle( rec ); - - /* check the type in _Columns */ - ok( 0x3dff == get_columns_table_type(hdb, "Properties", 1 ), "_columns table wrong\n"); - ok( 0x1d01 == get_columns_table_type(hdb, "Properties", 2 ), "_columns table wrong\n"); - ok( 0x1502 == get_columns_table_type(hdb, "Properties", 3 ), "_columns table wrong\n"); - ok( 0x1502 == get_columns_table_type(hdb, "Properties", 4 ), "_columns table wrong\n"); - ok( 0x1502 == get_columns_table_type(hdb, "Properties", 5 ), "_columns table wrong\n"); - ok( 0x1104 == get_columns_table_type(hdb, "Properties", 6 ), "_columns table wrong\n"); - ok( 0x1d00 == get_columns_table_type(hdb, "Properties", 7 ), "_columns table wrong\n"); - - /* now try the names */ - rec = get_column_info( hdb, "select * from `Properties`", MSICOLINFO_NAMES ); - ok( rec, "failed to get column info record\n" ); - - ok( check_record( rec, 1, "Property"), "wrong record type\n"); - ok( check_record( rec, 2, "Value"), "wrong record type\n"); - ok( check_record( rec, 3, "Intvalue"), "wrong record type\n"); - ok( check_record( rec, 4, "Integervalue"), "wrong record type\n"); - ok( check_record( rec, 5, "Shortvalue"), "wrong record type\n"); - ok( check_record( rec, 6, "Longvalue"), "wrong record type\n"); - ok( check_record( rec, 7, "Longcharvalue"), "wrong record type\n"); - - MsiCloseHandle( rec ); - - r = run_query( hdb, 0, - "CREATE TABLE `Binary` " - "( `Name` CHAR(255), `Data` OBJECT PRIMARY KEY `Name`)" ); - ok( r == ERROR_SUCCESS , "Failed to create table\n" ); - - /* check the column types */ - rec = get_column_info( hdb, "select * from `Binary`", MSICOLINFO_TYPES ); - ok( rec, "failed to get column info record\n" ); - - ok( check_record( rec, 1, "S255"), "wrong record type\n"); - ok( check_record( rec, 2, "V0"), "wrong record type\n"); - - MsiCloseHandle( rec ); - - /* check the type in _Columns */ - ok( 0x3dff == get_columns_table_type(hdb, "Binary", 1 ), "_columns table wrong\n"); - ok( 0x1900 == get_columns_table_type(hdb, "Binary", 2 ), "_columns table wrong\n"); - - /* now try the names */ - rec = get_column_info( hdb, "select * from `Binary`", MSICOLINFO_NAMES ); - ok( rec, "failed to get column info record\n" ); - - ok( check_record( rec, 1, "Name"), "wrong record type\n"); - ok( check_record( rec, 2, "Data"), "wrong record type\n"); - MsiCloseHandle( rec ); - - r = run_query( hdb, 0, - "CREATE TABLE `UIText` " - "( `Key` CHAR(72) NOT NULL, `Text` CHAR(255) LOCALIZABLE PRIMARY KEY `Key`)" ); - ok( r == ERROR_SUCCESS , "Failed to create table\n" ); - - ok( 0x2d48 == get_columns_table_type(hdb, "UIText", 1 ), "_columns table wrong\n"); - ok( 0x1fff == get_columns_table_type(hdb, "UIText", 2 ), "_columns table wrong\n"); - - rec = get_column_info( hdb, "select * from `UIText`", MSICOLINFO_NAMES ); - ok( rec, "failed to get column info record\n" ); - ok( check_record( rec, 1, "Key"), "wrong record type\n"); - ok( check_record( rec, 2, "Text"), "wrong record type\n"); - MsiCloseHandle( rec ); - - rec = get_column_info( hdb, "select * from `UIText`", MSICOLINFO_TYPES ); - ok( rec, "failed to get column info record\n" ); - ok( check_record( rec, 1, "s72"), "wrong record type\n"); - ok( check_record( rec, 2, "L255"), "wrong record type\n"); - MsiCloseHandle( rec ); - - MsiCloseHandle( hdb ); -} - -static void test_msiexport(void) -{ - MSIHANDLE hdb = 0, hview = 0; - UINT r; - const char *query; - char path[MAX_PATH]; - const char file[] = "phone.txt"; - HANDLE handle; - char buffer[0x100]; - DWORD length; - const char expected[] = - "id\tname\tnumber\r\n" - "I2\tS32\tS32\r\n" - "phone\tid\r\n" - "1\tAbe\t8675309\r\n"; - - DeleteFile(msifile); - - /* just MsiOpenDatabase should not create a file */ - r = MsiOpenDatabase(msifile, MSIDBOPEN_CREATE, &hdb); - ok(r == ERROR_SUCCESS, "MsiOpenDatabase failed\n"); - - /* create a table */ - query = "CREATE TABLE `phone` ( " - "`id` INT, `name` CHAR(32), `number` CHAR(32) " - "PRIMARY KEY `id`)"; - r = MsiDatabaseOpenView(hdb, query, &hview); - ok(r == ERROR_SUCCESS, "MsiDatabaseOpenView failed\n"); - r = MsiViewExecute(hview, 0); - ok(r == ERROR_SUCCESS, "MsiViewExecute failed\n"); - r = MsiViewClose(hview); - ok(r == ERROR_SUCCESS, "MsiViewClose failed\n"); - r = MsiCloseHandle(hview); - ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); - - /* insert a value into it */ - query = "INSERT INTO `phone` ( `id`, `name`, `number` )" - "VALUES('1', 'Abe', '8675309')"; - r = MsiDatabaseOpenView(hdb, query, &hview); - ok(r == ERROR_SUCCESS, "MsiDatabaseOpenView failed\n"); - r = MsiViewExecute(hview, 0); - ok(r == ERROR_SUCCESS, "MsiViewExecute failed\n"); - r = MsiViewClose(hview); - ok(r == ERROR_SUCCESS, "MsiViewClose failed\n"); - r = MsiCloseHandle(hview); - ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); - - GetCurrentDirectory(MAX_PATH, path); - - r = MsiDatabaseExport(hdb, "phone", path, file); - ok(r == ERROR_SUCCESS, "MsiDatabaseExport failed\n"); - - MsiCloseHandle(hdb); - - lstrcat(path, "\\"); - lstrcat(path, file); - - /* check the data that was written */ - length = 0; - memset(buffer, 0, sizeof buffer); - handle = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL); - if (handle != INVALID_HANDLE_VALUE) - { - ReadFile(handle, buffer, sizeof buffer, &length, NULL); - CloseHandle(handle); - DeleteFile(path); - } - else - ok(0, "failed to open file %s\n", path); - - ok( length == strlen(expected), "length of data wrong\n"); - ok( !lstrcmp(buffer, expected), "data doesn't match\n"); - DeleteFile(msifile); -} - -static void test_longstrings(void) -{ - const char insert_query[] = - "INSERT INTO `strings` ( `id`, `val` ) VALUES('1', 'Z')"; - char *str; - MSIHANDLE hdb = 0, hview = 0, hrec = 0; - DWORD len; - UINT r; - const DWORD STRING_LENGTH = 0x10005; - - DeleteFile(msifile); - /* just MsiOpenDatabase should not create a file */ - r = MsiOpenDatabase(msifile, MSIDBOPEN_CREATE, &hdb); - ok(r == ERROR_SUCCESS, "MsiOpenDatabase failed\n"); - - /* create a table */ - r = try_query( hdb, - "CREATE TABLE `strings` ( `id` INT, `val` CHAR(0) PRIMARY KEY `id`)"); - ok(r == ERROR_SUCCESS, "query failed\n"); - - /* try a insert a very long string */ - str = HeapAlloc(GetProcessHeap(), 0, STRING_LENGTH+sizeof insert_query); - len = strchr(insert_query, 'Z') - insert_query; - strcpy(str, insert_query); - memset(str+len, 'Z', STRING_LENGTH); - strcpy(str+len+STRING_LENGTH, insert_query+len+1); - r = try_query( hdb, str ); - ok(r == ERROR_SUCCESS, "MsiDatabaseOpenView failed\n"); - - HeapFree(GetProcessHeap(), 0, str); - - MsiDatabaseCommit(hdb); - ok(r == ERROR_SUCCESS, "MsiDatabaseCommit failed\n"); - MsiCloseHandle(hdb); - - r = MsiOpenDatabase(msifile, MSIDBOPEN_READONLY, &hdb); - ok(r == ERROR_SUCCESS, "MsiOpenDatabase failed\n"); - - r = MsiDatabaseOpenView(hdb, "select * from `strings` where `id` = 1", &hview); - ok(r == ERROR_SUCCESS, "MsiDatabaseOpenView failed\n"); - - r = MsiViewExecute(hview, 0); - ok(r == ERROR_SUCCESS, "MsiViewExecute failed\n"); - - r = MsiViewFetch(hview, &hrec); - ok(r == ERROR_SUCCESS, "MsiViewFetch failed\n"); - - MsiViewClose(hview); - MsiCloseHandle(hview); - - r = MsiRecordGetString(hrec, 2, NULL, &len); - ok(r == ERROR_SUCCESS, "MsiViewFetch failed\n"); - ok(len == STRING_LENGTH, "string length wrong\n"); - - MsiCloseHandle(hrec); - MsiCloseHandle(hdb); - DeleteFile(msifile); -} - -static void create_file_data(LPCSTR name, LPCSTR data, DWORD size) -{ - HANDLE file; - DWORD written; - - file = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - if (file == INVALID_HANDLE_VALUE) - return; - - WriteFile(file, data, strlen(data), &written, NULL); - WriteFile(file, "\n", strlen("\n"), &written, NULL); - - if (size) - { - SetFilePointer(file, size, NULL, FILE_BEGIN); - SetEndOfFile(file); - } - - CloseHandle(file); -} - -#define create_file(name) create_file_data(name, name, 0) - -static void test_streamtable(void) -{ - MSIHANDLE hdb = 0, rec, view, hsi; - char file[MAX_PATH]; - char buf[MAX_PATH]; - DWORD size; - UINT r; - - hdb = create_db(); - ok( hdb, "failed to create db\n"); - - r = run_query( hdb, 0, - "CREATE TABLE `Properties` " - "( `Property` CHAR(255), `Value` CHAR(1) PRIMARY KEY `Property`)" ); - ok( r == ERROR_SUCCESS , "Failed to create table\n" ); - - r = run_query( hdb, 0, - "INSERT INTO `Properties` " - "( `Value`, `Property` ) VALUES ( 'Prop', 'value' )" ); - ok( r == ERROR_SUCCESS, "Failed to add to table\n" ); - - r = MsiDatabaseCommit( hdb ); - ok( r == ERROR_SUCCESS , "Failed to commit database\n" ); - - MsiCloseHandle( hdb ); - - r = MsiOpenDatabase(msifile, MSIDBOPEN_TRANSACT, &hdb ); - ok( r == ERROR_SUCCESS , "Failed to open database\n" ); - - /* check the column types */ - rec = get_column_info( hdb, "select * from `_Streams`", MSICOLINFO_TYPES ); - ok( rec, "failed to get column info record\n" ); - - ok( check_record( rec, 1, "s62"), "wrong record type\n"); - ok( check_record( rec, 2, "V0"), "wrong record type\n"); - - MsiCloseHandle( rec ); - - /* now try the names */ - rec = get_column_info( hdb, "select * from `_Streams`", MSICOLINFO_NAMES ); - ok( rec, "failed to get column info record\n" ); - - ok( check_record( rec, 1, "Name"), "wrong record type\n"); - ok( check_record( rec, 2, "Data"), "wrong record type\n"); - - MsiCloseHandle( rec ); - - r = MsiDatabaseOpenView( hdb, - "SELECT * FROM `_Streams` WHERE `Name` = '\5SummaryInformation'", &view ); - ok( r == ERROR_SUCCESS, "Failed to open database view: %u\n", r ); - - r = MsiViewExecute( view, 0 ); - ok( r == ERROR_SUCCESS, "Failed to execute view: %u\n", r ); - - r = MsiViewFetch( view, &rec ); - ok( r == ERROR_NO_MORE_ITEMS, "Unexpected result: %u\n", r ); - - MsiCloseHandle( rec ); - MsiViewClose( view ); - MsiCloseHandle( view ); - - /* create a summary information stream */ - r = MsiGetSummaryInformationA( hdb, NULL, 1, &hsi ); - ok( r == ERROR_SUCCESS, "Failed to get summary information handle: %u\n", r ); - - r = MsiSummaryInfoSetPropertyA( hsi, PID_SECURITY, VT_I4, 2, NULL, NULL ); - ok( r == ERROR_SUCCESS, "Failed to set property: %u\n", r ); - - r = MsiSummaryInfoPersist( hsi ); - ok( r == ERROR_SUCCESS, "Failed to save summary information: %u\n", r ); - - MsiCloseHandle( hsi ); - - r = MsiDatabaseOpenView( hdb, - "SELECT * FROM `_Streams` WHERE `Name` = '\5SummaryInformation'", &view ); - ok( r == ERROR_SUCCESS, "Failed to open database view: %u\n", r ); - - r = MsiViewExecute( view, 0 ); - ok( r == ERROR_SUCCESS, "Failed to execute view: %u\n", r ); - - r = MsiViewFetch( view, &rec ); - ok( r == ERROR_SUCCESS, "Unexpected result: %u\n", r ); - - MsiCloseHandle( rec ); - MsiViewClose( view ); - MsiCloseHandle( view ); - - /* insert a file into the _Streams table */ - create_file( "test.txt" ); - - rec = MsiCreateRecord( 2 ); - MsiRecordSetString( rec, 1, "data" ); - - r = MsiRecordSetStream( rec, 2, "test.txt" ); - ok( r == ERROR_SUCCESS, "Failed to add stream data to the record: %d\n", r); - - DeleteFile("test.txt"); - - r = MsiDatabaseOpenView( hdb, - "INSERT INTO `_Streams` ( `Name`, `Data` ) VALUES ( ?, ? )", &view ); - ok( r == ERROR_SUCCESS, "Failed to open database view: %d\n", r); - - r = MsiViewExecute( view, rec ); - ok( r == ERROR_SUCCESS, "Failed to execute view: %d\n", r); - - MsiCloseHandle( rec ); - MsiViewClose( view ); - MsiCloseHandle( view ); - - /* insert another one */ - create_file( "test1.txt" ); - - rec = MsiCreateRecord( 2 ); - MsiRecordSetString( rec, 1, "data1" ); - - r = MsiRecordSetStream( rec, 2, "test1.txt" ); - ok( r == ERROR_SUCCESS, "Failed to add stream data to the record: %d\n", r); - - DeleteFile("test1.txt"); - - r = MsiDatabaseOpenView( hdb, - "INSERT INTO `_Streams` ( `Name`, `Data` ) VALUES ( ?, ? )", &view ); - ok( r == ERROR_SUCCESS, "Failed to open database view: %d\n", r); - - r = MsiViewExecute( view, rec ); - ok( r == ERROR_SUCCESS, "Failed to execute view: %d\n", r); - - MsiCloseHandle( rec ); - MsiViewClose( view ); - MsiCloseHandle( view ); - - r = MsiDatabaseOpenView( hdb, - "SELECT `Name`, `Data` FROM `_Streams` WHERE `Name` = 'data'", &view ); - ok( r == ERROR_SUCCESS, "Failed to open database view: %d\n", r); - - r = MsiViewExecute( view, 0 ); - ok( r == ERROR_SUCCESS, "Failed to execute view: %d\n", r); - - r = MsiViewFetch( view, &rec ); - ok( r == ERROR_SUCCESS, "Failed to fetch record: %d\n", r); - - size = MAX_PATH; - r = MsiRecordGetString( rec, 1, file, &size ); - ok( r == ERROR_SUCCESS, "Failed to get string: %d\n", r); - ok( !lstrcmp(file, "data"), "Expected 'data', got %s\n", file); - - size = MAX_PATH; - memset(buf, 0, MAX_PATH); - r = MsiRecordReadStream( rec, 2, buf, &size ); - ok( r == ERROR_SUCCESS, "Failed to get stream: %d\n", r); - ok( !lstrcmp(buf, "test.txt\n"), "Expected 'test.txt\\n', got %s\n", buf); - - MsiCloseHandle( rec ); - MsiViewClose( view ); - MsiCloseHandle( view ); - - r = MsiDatabaseOpenView( hdb, - "SELECT `Name`, `Data` FROM `_Streams` WHERE `Name` = 'data1'", &view ); - ok( r == ERROR_SUCCESS, "Failed to open database view: %d\n", r); - - r = MsiViewExecute( view, 0 ); - ok( r == ERROR_SUCCESS, "Failed to execute view: %d\n", r); - - r = MsiViewFetch( view, &rec ); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - size = MAX_PATH; - r = MsiRecordGetString( rec, 1, file, &size ); - ok( r == ERROR_SUCCESS, "Failed to get string: %d\n", r); - ok( !lstrcmp(file, "data1"), "Expected 'data1', got %s\n", file); - - size = MAX_PATH; - memset(buf, 0, MAX_PATH); - r = MsiRecordReadStream( rec, 2, buf, &size ); - ok( r == ERROR_SUCCESS, "Failed to get stream: %d\n", r); - ok( !lstrcmp(buf, "test1.txt\n"), "Expected 'test1.txt\\n', got %s\n", buf); - - MsiCloseHandle( rec ); - MsiViewClose( view ); - MsiCloseHandle( view ); - - /* perform an update */ - create_file( "test2.txt" ); - rec = MsiCreateRecord( 1 ); - - r = MsiRecordSetStream( rec, 1, "test2.txt" ); - ok( r == ERROR_SUCCESS, "Failed to add stream data to the record: %d\n", r); - - DeleteFile("test2.txt"); - - r = MsiDatabaseOpenView( hdb, - "UPDATE `_Streams` SET `Data` = ? WHERE `Name` = 'data1'", &view ); - ok( r == ERROR_SUCCESS, "Failed to open database view: %d\n", r); - - r = MsiViewExecute( view, rec ); - ok( r == ERROR_SUCCESS, "Failed to execute view: %d\n", r); - - MsiCloseHandle( rec ); - MsiViewClose( view ); - MsiCloseHandle( view ); - - r = MsiDatabaseOpenView( hdb, - "SELECT `Name`, `Data` FROM `_Streams` WHERE `Name` = 'data1'", &view ); - ok( r == ERROR_SUCCESS, "Failed to open database view: %d\n", r); - - r = MsiViewExecute( view, 0 ); - ok( r == ERROR_SUCCESS, "Failed to execute view: %d\n", r); - - r = MsiViewFetch( view, &rec ); - ok( r == ERROR_SUCCESS, "Failed to fetch record: %d\n", r); - - size = MAX_PATH; - r = MsiRecordGetString( rec, 1, file, &size ); - ok( r == ERROR_SUCCESS, "Failed to get string: %d\n", r); - ok( !lstrcmp(file, "data1"), "Expected 'data1', got %s\n", file); - - size = MAX_PATH; - memset(buf, 0, MAX_PATH); - r = MsiRecordReadStream( rec, 2, buf, &size ); - ok( r == ERROR_SUCCESS, "Failed to get stream: %d\n", r); - todo_wine ok( !lstrcmp(buf, "test2.txt\n"), "Expected 'test2.txt\\n', got %s\n", buf); - - MsiCloseHandle( rec ); - MsiViewClose( view ); - MsiCloseHandle( view ); - MsiCloseHandle( hdb ); - DeleteFile(msifile); -} - -static void test_binary(void) -{ - MSIHANDLE hdb = 0, rec; - char file[MAX_PATH]; - char buf[MAX_PATH]; - DWORD size; - LPCSTR query; - UINT r; - - /* insert a file into the Binary table */ - r = MsiOpenDatabase(msifile, MSIDBOPEN_CREATE, &hdb ); - ok( r == ERROR_SUCCESS , "Failed to open database\n" ); - - query = "CREATE TABLE `Binary` ( `Name` CHAR(72) NOT NULL, `ID` INT NOT NULL, `Data` OBJECT PRIMARY KEY `Name`, `ID`)"; - r = run_query( hdb, 0, query ); - ok( r == ERROR_SUCCESS, "Cannot create Binary table: %d\n", r ); - - create_file( "test.txt" ); - rec = MsiCreateRecord( 1 ); - r = MsiRecordSetStream( rec, 1, "test.txt" ); - ok( r == ERROR_SUCCESS, "Failed to add stream data to the record: %d\n", r); - DeleteFile( "test.txt" ); - - query = "INSERT INTO `Binary` ( `Name`, `ID`, `Data` ) VALUES ( 'filename1', 1, ? )"; - r = run_query( hdb, rec, query ); - ok( r == ERROR_SUCCESS, "Insert into Binary table failed: %d\n", r ); - - r = MsiCloseHandle( rec ); - ok( r == ERROR_SUCCESS , "Failed to close record handle\n" ); - - r = MsiDatabaseCommit( hdb ); - ok( r == ERROR_SUCCESS , "Failed to commit database\n" ); - - r = MsiCloseHandle( hdb ); - ok( r == ERROR_SUCCESS , "Failed to close database\n" ); - - /* read file from the Stream table */ - r = MsiOpenDatabase( msifile, MSIDBOPEN_READONLY, &hdb ); - ok( r == ERROR_SUCCESS , "Failed to open database\n" ); - - query = "SELECT * FROM `_Streams`"; - r = do_query( hdb, query, &rec ); - ok( r == ERROR_SUCCESS, "SELECT query failed: %d\n", r ); - - size = MAX_PATH; - r = MsiRecordGetString( rec, 1, file, &size ); - ok( r == ERROR_SUCCESS, "Failed to get string: %d\n", r ); - ok( !lstrcmp(file, "Binary.filename1.1"), "Expected 'Binary.filename1.1', got %s\n", file ); - - size = MAX_PATH; - memset( buf, 0, MAX_PATH ); - r = MsiRecordReadStream( rec, 2, buf, &size ); - ok( r == ERROR_SUCCESS, "Failed to get stream: %d\n", r ); - ok( !lstrcmp(buf, "test.txt\n"), "Expected 'test.txt\\n', got %s\n", buf ); - - r = MsiCloseHandle( rec ); - ok( r == ERROR_SUCCESS , "Failed to close record handle\n" ); - - /* read file from the Binary table */ - query = "SELECT * FROM `Binary`"; - r = do_query( hdb, query, &rec ); - ok( r == ERROR_SUCCESS, "SELECT query failed: %d\n", r ); - - size = MAX_PATH; - r = MsiRecordGetString( rec, 1, file, &size ); - ok( r == ERROR_SUCCESS, "Failed to get string: %d\n", r ); - ok( !lstrcmp(file, "filename1"), "Expected 'filename1', got %s\n", file ); - - size = MAX_PATH; - memset( buf, 0, MAX_PATH ); - r = MsiRecordReadStream( rec, 3, buf, &size ); - ok( r == ERROR_SUCCESS, "Failed to get stream: %d\n", r ); - ok( !lstrcmp(buf, "test.txt\n"), "Expected 'test.txt\\n', got %s\n", buf ); - - r = MsiCloseHandle( rec ); - ok( r == ERROR_SUCCESS , "Failed to close record handle\n" ); - - r = MsiCloseHandle( hdb ); - ok( r == ERROR_SUCCESS , "Failed to close database\n" ); - - DeleteFile( msifile ); -} - -static void test_where_not_in_selected(void) -{ - MSIHANDLE hdb = 0, rec, view; - LPCSTR query; - UINT r; - - hdb = create_db(); - ok( hdb, "failed to create db\n"); - - r = run_query(hdb, 0, - "CREATE TABLE `IESTable` (" - "`Action` CHAR(64), " - "`Condition` CHAR(64), " - "`Sequence` LONG PRIMARY KEY `Sequence`)"); - ok( r == S_OK, "Cannot create IESTable table: %d\n", r); - - r = run_query(hdb, 0, - "CREATE TABLE `CATable` (" - "`Action` CHAR(64), " - "`Type` LONG PRIMARY KEY `Type`)"); - ok( r == S_OK, "Cannot create CATable table: %d\n", r); - - r = run_query(hdb, 0, "INSERT INTO `IESTable` " - "( `Action`, `Condition`, `Sequence`) " - "VALUES ( 'clean', 'cond4', 4)"); - ok( r == S_OK, "cannot add entry to IESTable table:%d\n", r ); - - r = run_query(hdb, 0, "INSERT INTO `IESTable` " - "( `Action`, `Condition`, `Sequence`) " - "VALUES ( 'depends', 'cond1', 1)"); - ok( r == S_OK, "cannot add entry to IESTable table:%d\n", r ); - - r = run_query(hdb, 0, "INSERT INTO `IESTable` " - "( `Action`, `Condition`, `Sequence`) " - "VALUES ( 'build', 'cond2', 2)"); - ok( r == S_OK, "cannot add entry to IESTable table:%d\n", r ); - - r = run_query(hdb, 0, "INSERT INTO `IESTable` " - "( `Action`, `Condition`, `Sequence`) " - "VALUES ( 'build2', 'cond6', 6)"); - ok( r == S_OK, "cannot add entry to IESTable table:%d\n", r ); - - r = run_query(hdb, 0, "INSERT INTO `IESTable` " - "( `Action`, `Condition`, `Sequence`) " - "VALUES ( 'build', 'cond3', 3)"); - ok(r == S_OK, "cannot add entry to IESTable table:%d\n", r ); - - r = run_query(hdb, 0, "INSERT INTO `CATable` " - "( `Action`, `Type` ) " - "VALUES ( 'build', 32)"); - ok(r == S_OK, "cannot add entry to CATable table:%d\n", r ); - - r = run_query(hdb, 0, "INSERT INTO `CATable` " - "( `Action`, `Type` ) " - "VALUES ( 'depends', 64)"); - ok(r == S_OK, "cannot add entry to CATable table:%d\n", r ); - - r = run_query(hdb, 0, "INSERT INTO `CATable` " - "( `Action`, `Type` ) " - "VALUES ( 'clean', 63)"); - ok(r == S_OK, "cannot add entry to CATable table:%d\n", r ); - - r = run_query(hdb, 0, "INSERT INTO `CATable` " - "( `Action`, `Type` ) " - "VALUES ( 'build2', 34)"); - ok(r == S_OK, "cannot add entry to CATable table:%d\n", r ); - query = "Select IESTable.Condition from CATable, IESTable where " - "CATable.Action = IESTable.Action and CATable.Type = 32"; - r = MsiDatabaseOpenView(hdb, query, &view); - ok( r == ERROR_SUCCESS, "failed to open view: %d\n", r ); - - r = MsiViewExecute(view, 0); - ok( r == ERROR_SUCCESS, "failed to execute view: %d\n", r ); - - r = MsiViewFetch(view, &rec); - ok( r == ERROR_SUCCESS, "failed to fetch view: %d\n", r ); - - ok( check_record( rec, 1, "cond2"), "wrong condition\n"); - - MsiCloseHandle( rec ); - r = MsiViewFetch(view, &rec); - ok( r == ERROR_SUCCESS, "failed to fetch view: %d\n", r ); - - ok( check_record( rec, 1, "cond3"), "wrong condition\n"); - - MsiCloseHandle( rec ); - MsiViewClose(view); - MsiCloseHandle(view); - - MsiCloseHandle( hdb ); - DeleteFile(msifile); - -} - - -static void test_where(void) -{ - MSIHANDLE hdb = 0, rec, view; - LPCSTR query; - UINT r; - DWORD size; - CHAR buf[MAX_PATH]; - UINT count; - - hdb = create_db(); - ok( hdb, "failed to create db\n"); - - r = run_query( hdb, 0, - "CREATE TABLE `Media` (" - "`DiskId` SHORT NOT NULL, " - "`LastSequence` LONG, " - "`DiskPrompt` CHAR(64) LOCALIZABLE, " - "`Cabinet` CHAR(255), " - "`VolumeLabel` CHAR(32), " - "`Source` CHAR(72) " - "PRIMARY KEY `DiskId`)" ); - ok( r == S_OK, "cannot create Media table: %d\n", r ); - - r = run_query( hdb, 0, "INSERT INTO `Media` " - "( `DiskId`, `LastSequence`, `DiskPrompt`, `Cabinet`, `VolumeLabel`, `Source` ) " - "VALUES ( 1, 0, '', 'zero.cab', '', '' )" ); - ok( r == S_OK, "cannot add file to the Media table: %d\n", r ); - - r = run_query( hdb, 0, "INSERT INTO `Media` " - "( `DiskId`, `LastSequence`, `DiskPrompt`, `Cabinet`, `VolumeLabel`, `Source` ) " - "VALUES ( 2, 1, '', 'one.cab', '', '' )" ); - ok( r == S_OK, "cannot add file to the Media table: %d\n", r ); - - r = run_query( hdb, 0, "INSERT INTO `Media` " - "( `DiskId`, `LastSequence`, `DiskPrompt`, `Cabinet`, `VolumeLabel`, `Source` ) " - "VALUES ( 3, 2, '', 'two.cab', '', '' )" ); - ok( r == S_OK, "cannot add file to the Media table: %d\n", r ); - - query = "SELECT * FROM `Media`"; - r = do_query(hdb, query, &rec); - ok(r == ERROR_SUCCESS, "MsiViewFetch failed: %d\n", r); - ok( check_record( rec, 4, "zero.cab"), "wrong cabinet\n"); - MsiCloseHandle( rec ); - - query = "SELECT * FROM `Media` WHERE `LastSequence` >= 1"; - r = do_query(hdb, query, &rec); - ok(r == ERROR_SUCCESS, "MsiViewFetch failed: %d\n", r); - ok( check_record( rec, 4, "one.cab"), "wrong cabinet\n"); - - r = MsiRecordGetInteger(rec, 1); - ok( 2 == r, "field wrong\n"); - r = MsiRecordGetInteger(rec, 2); - ok( 1 == r, "field wrong\n"); - MsiCloseHandle( rec ); - - query = "SELECT `DiskId` FROM `Media` WHERE `LastSequence` >= 1 AND DiskId >= 0"; - r = MsiDatabaseOpenView(hdb, query, &view); - ok( r == ERROR_SUCCESS, "failed to open view: %d\n", r ); - - r = MsiViewExecute(view, 0); - ok( r == ERROR_SUCCESS, "failed to execute view: %d\n", r ); - - r = MsiViewFetch(view, &rec); - ok( r == ERROR_SUCCESS, "failed to fetch view: %d\n", r ); - - count = MsiRecordGetFieldCount( rec ); - ok( count == 1, "Expected 1 record fields, got %d\n", count ); - - size = MAX_PATH; - r = MsiRecordGetString( rec, 1, buf, &size ); - ok( r == ERROR_SUCCESS, "failed to get record string: %d\n", r ); - ok( !lstrcmp( buf, "2" ), - "For (row %d, column 1) expected '%d', got %s\n", 0, 2, buf ); - MsiCloseHandle( rec ); - - r = MsiViewFetch(view, &rec); - ok( r == ERROR_SUCCESS, "failed to fetch view: %d\n", r ); - - size = MAX_PATH; - r = MsiRecordGetString( rec, 1, buf, &size ); - ok( r == ERROR_SUCCESS, "failed to get record string: %d\n", r ); - ok( !lstrcmp( buf, "3" ), - "For (row %d, column 1) expected '%d', got %s\n", 1, 3, buf ); - MsiCloseHandle( rec ); - - r = MsiViewFetch(view, &rec); - ok( r == ERROR_NO_MORE_ITEMS, "expected no more items: %d\n", r ); - - MsiViewClose(view); - MsiCloseHandle(view); - - MsiCloseHandle( rec ); - - rec = 0; - query = "SELECT * FROM `Media` WHERE `DiskPrompt` IS NULL"; - r = do_query(hdb, query, &rec); - ok( r == ERROR_SUCCESS, "query failed: %d\n", r ); - MsiCloseHandle( rec ); - - rec = 0; - query = "SELECT * FROM `Media` WHERE `DiskPrompt` < 'Cabinet'"; - r = do_query(hdb, query, &rec); - ok( r == ERROR_BAD_QUERY_SYNTAX, "query failed: %d\n", r ); - MsiCloseHandle( rec ); - - rec = 0; - query = "SELECT * FROM `Media` WHERE `DiskPrompt` > 'Cabinet'"; - r = do_query(hdb, query, &rec); - ok( r == ERROR_BAD_QUERY_SYNTAX, "query failed: %d\n", r ); - MsiCloseHandle( rec ); - - rec = 0; - query = "SELECT * FROM `Media` WHERE `DiskPrompt` <> 'Cabinet'"; - r = do_query(hdb, query, &rec); - ok( r == ERROR_SUCCESS, "query failed: %d\n", r ); - MsiCloseHandle( rec ); - - rec = 0; - query = "SELECT * FROM `Media` WHERE `DiskPrompt` = 'Cabinet'"; - r = do_query(hdb, query, &rec); - ok( r == ERROR_NO_MORE_ITEMS, "query failed: %d\n", r ); - MsiCloseHandle( rec ); - - rec = MsiCreateRecord(1); - MsiRecordSetString(rec, 1, ""); - - query = "SELECT * FROM `Media` WHERE `DiskPrompt` = ?"; - r = MsiDatabaseOpenView(hdb, query, &view); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - r = MsiViewExecute(view, rec); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - MsiCloseHandle(rec); - - r = MsiViewFetch(view, &rec); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - MsiCloseHandle(rec); - MsiViewClose(view); - MsiCloseHandle(view); - - MsiCloseHandle( hdb ); - DeleteFile(msifile); -} - -static CHAR CURR_DIR[MAX_PATH]; - -static const CHAR test_data[] = "FirstPrimaryColumn\tSecondPrimaryColumn\tShortInt\tShortIntNullable\tLongInt\tLongIntNullable\tString\tLocalizableString\tLocalizableStringNullable\n" - "s255\ti2\ti2\tI2\ti4\tI4\tS255\tS0\ts0\n" - "TestTable\tFirstPrimaryColumn\n" - "stringage\t5\t2\t\t2147483640\t-2147483640\tanother string\tlocalizable\tduh\n"; - -static const CHAR two_primary[] = "PrimaryOne\tPrimaryTwo\n" - "s255\ts255\n" - "TwoPrimary\tPrimaryOne\tPrimaryTwo\n" - "papaya\tleaf\n" - "papaya\tflower\n"; - -static const CHAR endlines1[] = "A\tB\tC\tD\tE\tF\r\n" - "s72\ts72\ts72\ts72\ts72\ts72\n" - "Table\tA\r\n" - "a\tb\tc\td\te\tf\n" - "g\th\ti\t\rj\tk\tl\r\n"; - -static const CHAR endlines2[] = "A\tB\tC\tD\tE\tF\r" - "s72\ts72\ts72\ts72\ts72\ts72\n" - "Table2\tA\r\n" - "a\tb\tc\td\te\tf\n" - "g\th\ti\tj\tk\tl\r\n"; - -static const CHAR suminfo[] = "PropertyId\tValue\n" - "i2\tl255\n" - "_SummaryInformation\tPropertyId\n" - "1\t1252\n" - "2\tInstaller Database\n" - "3\tInstaller description\n" - "4\tWineHQ\n" - "5\tInstaller\n" - "6\tInstaller comments\n" - "7\tIntel;1033\n" - "9\t{12345678-1234-1234-1234-123456789012}\n" - "12\t2009/04/12 15:46:11\n" - "13\t2009/04/12 15:46:11\n" - "14\t200\n" - "15\t2\n" - "18\tVim\n" - "19\t2\n"; - -static void write_file(const CHAR *filename, const char *data, int data_size) -{ - DWORD size; - - HANDLE hf = CreateFile(filename, GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - - WriteFile(hf, data, data_size, &size, NULL); - CloseHandle(hf); -} - -static UINT add_table_to_db(MSIHANDLE hdb, LPCSTR table_data) -{ - UINT r; - - write_file("temp_file", table_data, (lstrlen(table_data) - 1) * sizeof(char)); - r = MsiDatabaseImportA(hdb, CURR_DIR, "temp_file"); - DeleteFileA("temp_file"); - - return r; -} - -static void test_suminfo_import(void) -{ - MSIHANDLE hdb, hsi, view = 0; - LPCSTR query; - UINT r, count, size, type; - char str_value[50]; - INT int_value; - FILETIME ft_value; - - GetCurrentDirectoryA(MAX_PATH, CURR_DIR); - - r = MsiOpenDatabaseA(msifile, MSIDBOPEN_CREATE, &hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - r = add_table_to_db(hdb, suminfo); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - /* _SummaryInformation is not imported as a regular table... */ - - query = "SELECT * FROM `_SummaryInformation`"; - r = MsiDatabaseOpenViewA(hdb, query, &view); - ok(r == ERROR_BAD_QUERY_SYNTAX, "Expected ERROR_BAD_QUERY_SYNTAX, got %u\n", r); - MsiCloseHandle(view); - - /* ...its data is added to the special summary information stream */ - - r = MsiGetSummaryInformationA(hdb, NULL, 0, &hsi); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - r = MsiSummaryInfoGetPropertyCount(hsi, &count); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(count == 14, "Expected 14, got %u\n", count); - - r = MsiSummaryInfoGetPropertyA(hsi, PID_CODEPAGE, &type, &int_value, NULL, NULL, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(type == VT_I2, "Expected VT_I2, got %u\n", type); - ok(int_value == 1252, "Expected 1252, got %d\n", int_value); - - size = sizeof(str_value); - r = MsiSummaryInfoGetPropertyA(hsi, PID_TITLE, &type, NULL, NULL, str_value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(type == VT_LPSTR, "Expected VT_LPSTR, got %u\n", type); - ok(size == 18, "Expected 18, got %u\n", size); - ok(!strcmp(str_value, "Installer Database"), - "Expected \"Installer Database\", got %s\n", str_value); - - size = sizeof(str_value); - r = MsiSummaryInfoGetPropertyA(hsi, PID_SUBJECT, &type, NULL, NULL, str_value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(type == VT_LPSTR, "Expected VT_LPSTR, got %u\n", type); - ok(!strcmp(str_value, "Installer description"), - "Expected \"Installer description\", got %s\n", str_value); - - size = sizeof(str_value); - r = MsiSummaryInfoGetPropertyA(hsi, PID_AUTHOR, &type, NULL, NULL, str_value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(type == VT_LPSTR, "Expected VT_LPSTR, got %u\n", type); - ok(!strcmp(str_value, "WineHQ"), - "Expected \"WineHQ\", got %s\n", str_value); - - size = sizeof(str_value); - r = MsiSummaryInfoGetPropertyA(hsi, PID_KEYWORDS, &type, NULL, NULL, str_value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(type == VT_LPSTR, "Expected VT_LPSTR, got %u\n", type); - ok(!strcmp(str_value, "Installer"), - "Expected \"Installer\", got %s\n", str_value); - - size = sizeof(str_value); - r = MsiSummaryInfoGetPropertyA(hsi, PID_COMMENTS, &type, NULL, NULL, str_value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(type == VT_LPSTR, "Expected VT_LPSTR, got %u\n", type); - ok(!strcmp(str_value, "Installer comments"), - "Expected \"Installer comments\", got %s\n", str_value); - - size = sizeof(str_value); - r = MsiSummaryInfoGetPropertyA(hsi, PID_TEMPLATE, &type, NULL, NULL, str_value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(type == VT_LPSTR, "Expected VT_LPSTR, got %u\n", type); - ok(!strcmp(str_value, "Intel;1033"), - "Expected \"Intel;1033\", got %s\n", str_value); - - size = sizeof(str_value); - r = MsiSummaryInfoGetPropertyA(hsi, PID_REVNUMBER, &type, NULL, NULL, str_value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(type == VT_LPSTR, "Expected VT_LPSTR, got %u\n", type); - ok(!strcmp(str_value, "{12345678-1234-1234-1234-123456789012}"), - "Expected \"{12345678-1234-1234-1234-123456789012}\", got %s\n", str_value); - - r = MsiSummaryInfoGetPropertyA(hsi, PID_CREATE_DTM, &type, NULL, &ft_value, NULL, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(type == VT_FILETIME, "Expected VT_FILETIME, got %u\n", type); - - r = MsiSummaryInfoGetPropertyA(hsi, PID_LASTSAVE_DTM, &type, NULL, &ft_value, NULL, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(type == VT_FILETIME, "Expected VT_FILETIME, got %u\n", type); - - r = MsiSummaryInfoGetPropertyA(hsi, PID_PAGECOUNT, &type, &int_value, NULL, NULL, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(type == VT_I4, "Expected VT_I4, got %u\n", type); - ok(int_value == 200, "Expected 200, got %d\n", int_value); - - r = MsiSummaryInfoGetPropertyA(hsi, PID_WORDCOUNT, &type, &int_value, NULL, NULL, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(type == VT_I4, "Expected VT_I4, got %u\n", type); - ok(int_value == 2, "Expected 2, got %d\n", int_value); - - r = MsiSummaryInfoGetPropertyA(hsi, PID_SECURITY, &type, &int_value, NULL, NULL, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(type == VT_I4, "Expected VT_I4, got %u\n", type); - ok(int_value == 2, "Expected 2, got %d\n", int_value); - - size = sizeof(str_value); - r = MsiSummaryInfoGetPropertyA(hsi, PID_APPNAME, &type, NULL, NULL, str_value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(type == VT_LPSTR, "Expected VT_LPSTR, got %u\n", type); - ok(!strcmp(str_value, "Vim"), "Expected \"Vim\", got %s\n", str_value); - - MsiCloseHandle(hsi); - MsiCloseHandle(hdb); - DeleteFileA(msifile); -} - -static void test_msiimport(void) -{ - MSIHANDLE hdb, view, rec; - LPCSTR query; - UINT r, count; - signed int i; - - GetCurrentDirectoryA(MAX_PATH, CURR_DIR); - - r = MsiOpenDatabaseA(msifile, MSIDBOPEN_CREATE, &hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_table_to_db(hdb, test_data); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_table_to_db(hdb, two_primary); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_table_to_db(hdb, endlines1); - if (r == ERROR_FUNCTION_FAILED) - { - /* win9x doesn't handle this case */ - skip("endlines not handled correctly.\n"); - MsiCloseHandle(hdb); - DeleteFileA(msifile); - return; - } - - r = add_table_to_db(hdb, endlines2); - ok(r == ERROR_FUNCTION_FAILED, - "Expected ERROR_FUNCTION_FAILED, got %d\n", r); - - query = "SELECT * FROM `TestTable`"; - r = MsiDatabaseOpenView(hdb, query, &view); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiViewGetColumnInfo(view, MSICOLINFO_NAMES, &rec); - count = MsiRecordGetFieldCount(rec); - ok(count == 9, "Expected 9, got %d\n", count); - ok(check_record(rec, 1, "FirstPrimaryColumn"), "Expected FirstPrimaryColumn\n"); - ok(check_record(rec, 2, "SecondPrimaryColumn"), "Expected SecondPrimaryColumn\n"); - ok(check_record(rec, 3, "ShortInt"), "Expected ShortInt\n"); - ok(check_record(rec, 4, "ShortIntNullable"), "Expected ShortIntNullalble\n"); - ok(check_record(rec, 5, "LongInt"), "Expected LongInt\n"); - ok(check_record(rec, 6, "LongIntNullable"), "Expected LongIntNullalble\n"); - ok(check_record(rec, 7, "String"), "Expected String\n"); - ok(check_record(rec, 8, "LocalizableString"), "Expected LocalizableString\n"); - ok(check_record(rec, 9, "LocalizableStringNullable"), "Expected LocalizableStringNullable\n"); - MsiCloseHandle(rec); - - r = MsiViewGetColumnInfo(view, MSICOLINFO_TYPES, &rec); - count = MsiRecordGetFieldCount(rec); - ok(count == 9, "Expected 9, got %d\n", count); - ok(check_record(rec, 1, "s255"), "Expected s255\n"); - ok(check_record(rec, 2, "i2"), "Expected i2\n"); - ok(check_record(rec, 3, "i2"), "Expected i2\n"); - ok(check_record(rec, 4, "I2"), "Expected I2\n"); - ok(check_record(rec, 5, "i4"), "Expected i4\n"); - ok(check_record(rec, 6, "I4"), "Expected I4\n"); - ok(check_record(rec, 7, "S255"), "Expected S255\n"); - ok(check_record(rec, 8, "S0"), "Expected S0\n"); - ok(check_record(rec, 9, "s0"), "Expected s0\n"); - MsiCloseHandle(rec); - - query = "SELECT * FROM `TestTable`"; - r = do_query(hdb, query, &rec); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(check_record(rec, 1, "stringage"), "Expected 'stringage'\n"); - ok(check_record(rec, 7, "another string"), "Expected 'another string'\n"); - ok(check_record(rec, 8, "localizable"), "Expected 'localizable'\n"); - ok(check_record(rec, 9, "duh"), "Expected 'duh'\n"); - - i = MsiRecordGetInteger(rec, 2); - ok(i == 5, "Expected 5, got %d\n", i); - - i = MsiRecordGetInteger(rec, 3); - ok(i == 2, "Expected 2, got %d\n", i); - - i = MsiRecordGetInteger(rec, 4); - ok(i == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", i); - - i = MsiRecordGetInteger(rec, 5); - ok(i == 2147483640, "Expected 2147483640, got %d\n", i); - - i = MsiRecordGetInteger(rec, 6); - ok(i == -2147483640, "Expected -2147483640, got %d\n", i); - - MsiCloseHandle(rec); - MsiViewClose(view); - MsiCloseHandle(view); - - query = "SELECT * FROM `TwoPrimary`"; - r = MsiDatabaseOpenView(hdb, query, &view); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiViewGetColumnInfo(view, MSICOLINFO_NAMES, &rec); - count = MsiRecordGetFieldCount(rec); - ok(count == 2, "Expected 2, got %d\n", count); - ok(check_record(rec, 1, "PrimaryOne"), "Expected PrimaryOne\n"); - ok(check_record(rec, 2, "PrimaryTwo"), "Expected PrimaryTwo\n"); - - MsiCloseHandle(rec); - - r = MsiViewGetColumnInfo(view, MSICOLINFO_TYPES, &rec); - count = MsiRecordGetFieldCount(rec); - ok(count == 2, "Expected 2, got %d\n", count); - ok(check_record(rec, 1, "s255"), "Expected s255\n"); - ok(check_record(rec, 2, "s255"), "Expected s255\n"); - MsiCloseHandle(rec); - - r = MsiViewExecute(view, 0); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiViewFetch(view, &rec); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - ok(check_record(rec, 1, "papaya"), "Expected 'papaya'\n"); - ok(check_record(rec, 2, "leaf"), "Expected 'leaf'\n"); - - MsiCloseHandle(rec); - - r = MsiViewFetch(view, &rec); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - ok(check_record(rec, 1, "papaya"), "Expected 'papaya'\n"); - ok(check_record(rec, 2, "flower"), "Expected 'flower'\n"); - - MsiCloseHandle(rec); - - r = MsiViewFetch(view, &rec); - ok(r == ERROR_NO_MORE_ITEMS, - "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - - r = MsiViewClose(view); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - MsiCloseHandle(view); - - query = "SELECT * FROM `Table`"; - r = MsiDatabaseOpenView(hdb, query, &view); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiViewGetColumnInfo(view, MSICOLINFO_NAMES, &rec); - count = MsiRecordGetFieldCount(rec); - ok(count == 6, "Expected 6, got %d\n", count); - ok(check_record(rec, 1, "A"), "Expected A\n"); - ok(check_record(rec, 2, "B"), "Expected B\n"); - ok(check_record(rec, 3, "C"), "Expected C\n"); - ok(check_record(rec, 4, "D"), "Expected D\n"); - ok(check_record(rec, 5, "E"), "Expected E\n"); - ok(check_record(rec, 6, "F"), "Expected F\n"); - MsiCloseHandle(rec); - - r = MsiViewGetColumnInfo(view, MSICOLINFO_TYPES, &rec); - count = MsiRecordGetFieldCount(rec); - ok(count == 6, "Expected 6, got %d\n", count); - ok(check_record(rec, 1, "s72"), "Expected s72\n"); - ok(check_record(rec, 2, "s72"), "Expected s72\n"); - ok(check_record(rec, 3, "s72"), "Expected s72\n"); - ok(check_record(rec, 4, "s72"), "Expected s72\n"); - ok(check_record(rec, 5, "s72"), "Expected s72\n"); - ok(check_record(rec, 6, "s72"), "Expected s72\n"); - MsiCloseHandle(rec); - - MsiViewClose(view); - MsiCloseHandle(view); - - query = "SELECT * FROM `Table`"; - r = MsiDatabaseOpenView(hdb, query, &view); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiViewExecute(view, 0); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiViewFetch(view, &rec); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(check_record(rec, 1, "a"), "Expected 'a'\n"); - ok(check_record(rec, 2, "b"), "Expected 'b'\n"); - ok(check_record(rec, 3, "c"), "Expected 'c'\n"); - ok(check_record(rec, 4, "d"), "Expected 'd'\n"); - ok(check_record(rec, 5, "e"), "Expected 'e'\n"); - ok(check_record(rec, 6, "f"), "Expected 'f'\n"); - - MsiCloseHandle(rec); - - r = MsiViewFetch(view, &rec); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(check_record(rec, 1, "g"), "Expected 'g'\n"); - ok(check_record(rec, 2, "h"), "Expected 'h'\n"); - ok(check_record(rec, 3, "i"), "Expected 'i'\n"); - ok(check_record(rec, 4, "j"), "Expected 'j'\n"); - ok(check_record(rec, 5, "k"), "Expected 'k'\n"); - ok(check_record(rec, 6, "l"), "Expected 'l'\n"); - - MsiCloseHandle(rec); - - r = MsiViewFetch(view, &rec); - ok(r == ERROR_NO_MORE_ITEMS, - "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - - MsiViewClose(view); - MsiCloseHandle(view); - MsiCloseHandle(hdb); - DeleteFileA(msifile); -} - -static const CHAR bin_import_dat[] = "Name\tData\r\n" - "s72\tV0\r\n" - "Binary\tName\r\n" - "filename1\tfilename1.ibd\r\n"; - -static void test_binary_import(void) -{ - MSIHANDLE hdb = 0, rec; - char file[MAX_PATH]; - char buf[MAX_PATH]; - char path[MAX_PATH]; - DWORD size; - LPCSTR query; - UINT r; - - /* create files to import */ - write_file("bin_import.idt", bin_import_dat, - (sizeof(bin_import_dat) - 1) * sizeof(char)); - CreateDirectory("bin_import", NULL); - create_file_data("bin_import/filename1.ibd", "just some words", 15); - - /* import files into database */ - r = MsiOpenDatabase(msifile, MSIDBOPEN_CREATE, &hdb); - ok( r == ERROR_SUCCESS , "Failed to open database\n"); - - GetCurrentDirectory(MAX_PATH, path); - r = MsiDatabaseImport(hdb, path, "bin_import.idt"); - ok(r == ERROR_SUCCESS , "Failed to import Binary table\n"); - - /* read file from the Binary table */ - query = "SELECT * FROM `Binary`"; - r = do_query(hdb, query, &rec); - ok(r == ERROR_SUCCESS, "SELECT query failed: %d\n", r); - - size = MAX_PATH; - r = MsiRecordGetString(rec, 1, file, &size); - ok(r == ERROR_SUCCESS, "Failed to get string: %d\n", r); - ok(!lstrcmp(file, "filename1"), "Expected 'filename1', got %s\n", file); - - size = MAX_PATH; - memset(buf, 0, MAX_PATH); - r = MsiRecordReadStream(rec, 2, buf, &size); - ok(r == ERROR_SUCCESS, "Failed to get stream: %d\n", r); - ok(!lstrcmp(buf, "just some words"), - "Expected 'just some words', got %s\n", buf); - - r = MsiCloseHandle(rec); - ok(r == ERROR_SUCCESS , "Failed to close record handle\n"); - - r = MsiCloseHandle(hdb); - ok(r == ERROR_SUCCESS , "Failed to close database\n"); - - DeleteFile("bin_import/filename1.ibd"); - RemoveDirectory("bin_import"); - DeleteFile("bin_import.idt"); -} - -static void test_markers(void) -{ - MSIHANDLE hdb, rec; - LPCSTR query; - UINT r; - - hdb = create_db(); - ok( hdb, "failed to create db\n"); - - rec = MsiCreateRecord(3); - MsiRecordSetString(rec, 1, "Table"); - MsiRecordSetString(rec, 2, "Apples"); - MsiRecordSetString(rec, 3, "Oranges"); - - /* try a legit create */ - query = "CREATE TABLE `Table` ( `One` SHORT NOT NULL, `Two` CHAR(255) PRIMARY KEY `One`)"; - r = run_query(hdb, 0, query); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - MsiCloseHandle(rec); - - /* try table name as marker */ - rec = MsiCreateRecord(1); - MsiRecordSetString(rec, 1, "Fable"); - query = "CREATE TABLE `?` ( `One` SHORT NOT NULL, `Two` CHAR(255) PRIMARY KEY `One`)"; - r = run_query(hdb, rec, query); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* verify that we just created a table called '?', not 'Fable' */ - r = try_query(hdb, "SELECT * from `Fable`"); - ok(r == ERROR_BAD_QUERY_SYNTAX, "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r); - - r = try_query(hdb, "SELECT * from `?`"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* try table name as marker without backticks */ - MsiRecordSetString(rec, 1, "Mable"); - query = "CREATE TABLE ? ( `One` SHORT NOT NULL, `Two` CHAR(255) PRIMARY KEY `One`)"; - r = run_query(hdb, rec, query); - ok(r == ERROR_BAD_QUERY_SYNTAX, "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r); - - /* try one column name as marker */ - MsiRecordSetString(rec, 1, "One"); - query = "CREATE TABLE `Mable` ( `?` SHORT NOT NULL, `Two` CHAR(255) PRIMARY KEY `One`)"; - r = run_query(hdb, rec, query); - ok(r == ERROR_BAD_QUERY_SYNTAX, "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r); - MsiCloseHandle(rec); - - /* try column names as markers */ - rec = MsiCreateRecord(2); - MsiRecordSetString(rec, 1, "One"); - MsiRecordSetString(rec, 2, "Two"); - query = "CREATE TABLE `Mable` ( `?` SHORT NOT NULL, `?` CHAR(255) PRIMARY KEY `One`)"; - r = run_query(hdb, rec, query); - ok(r == ERROR_BAD_QUERY_SYNTAX, "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r); - MsiCloseHandle(rec); - - /* try names with backticks */ - rec = MsiCreateRecord(3); - MsiRecordSetString(rec, 1, "One"); - MsiRecordSetString(rec, 2, "Two"); - MsiRecordSetString(rec, 3, "One"); - query = "CREATE TABLE `Mable` ( `?` SHORT NOT NULL, `?` CHAR(255) PRIMARY KEY `?`)"; - r = run_query(hdb, rec, query); - ok(r == ERROR_BAD_QUERY_SYNTAX, "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r); - - /* try names with backticks, minus definitions */ - query = "CREATE TABLE `Mable` ( `?`, `?` PRIMARY KEY `?`)"; - r = run_query(hdb, rec, query); - ok(r == ERROR_BAD_QUERY_SYNTAX, "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r); - - /* try names without backticks */ - query = "CREATE TABLE `Mable` ( ? SHORT NOT NULL, ? CHAR(255) PRIMARY KEY ?)"; - r = run_query(hdb, rec, query); - ok(r == ERROR_BAD_QUERY_SYNTAX, "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r); - MsiCloseHandle(rec); - - /* try one long marker */ - rec = MsiCreateRecord(1); - MsiRecordSetString(rec, 1, "`One` SHORT NOT NULL, `Two` CHAR(255) PRIMARY KEY `One`"); - query = "CREATE TABLE `Mable` ( ? )"; - r = run_query(hdb, rec, query); - ok(r == ERROR_BAD_QUERY_SYNTAX, "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r); - MsiCloseHandle(rec); - - /* try all names as markers */ - rec = MsiCreateRecord(4); - MsiRecordSetString(rec, 1, "Mable"); - MsiRecordSetString(rec, 2, "One"); - MsiRecordSetString(rec, 3, "Two"); - MsiRecordSetString(rec, 4, "One"); - query = "CREATE TABLE `?` ( `?` SHORT NOT NULL, `?` CHAR(255) PRIMARY KEY `?`)"; - r = run_query(hdb, rec, query); - ok(r == ERROR_BAD_QUERY_SYNTAX, "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r); - MsiCloseHandle(rec); - - /* try a legit insert */ - query = "INSERT INTO `Table` ( `One`, `Two` ) VALUES ( 5, 'hello' )"; - r = run_query(hdb, 0, query); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = try_query(hdb, "SELECT * from `Table`"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* try values as markers */ - rec = MsiCreateRecord(2); - MsiRecordSetInteger(rec, 1, 4); - MsiRecordSetString(rec, 2, "hi"); - query = "INSERT INTO `Table` ( `One`, `Two` ) VALUES ( ?, '?' )"; - r = run_query(hdb, rec, query); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - MsiCloseHandle(rec); - - /* try column names and values as markers */ - rec = MsiCreateRecord(4); - MsiRecordSetString(rec, 1, "One"); - MsiRecordSetString(rec, 2, "Two"); - MsiRecordSetInteger(rec, 3, 5); - MsiRecordSetString(rec, 4, "hi"); - query = "INSERT INTO `Table` ( `?`, `?` ) VALUES ( ?, '?' )"; - r = run_query(hdb, rec, query); - ok(r == ERROR_BAD_QUERY_SYNTAX, "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r); - MsiCloseHandle(rec); - - /* try column names as markers */ - rec = MsiCreateRecord(2); - MsiRecordSetString(rec, 1, "One"); - MsiRecordSetString(rec, 2, "Two"); - query = "INSERT INTO `Table` ( `?`, `?` ) VALUES ( 3, 'yellow' )"; - r = run_query(hdb, rec, query); - ok(r == ERROR_BAD_QUERY_SYNTAX, "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r); - MsiCloseHandle(rec); - - /* try table name as a marker */ - rec = MsiCreateRecord(1); - MsiRecordSetString(rec, 1, "Table"); - query = "INSERT INTO `?` ( `One`, `Two` ) VALUES ( 2, 'green' )"; - r = run_query(hdb, rec, query); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - MsiCloseHandle(rec); - - /* try table name and values as markers */ - rec = MsiCreateRecord(3); - MsiRecordSetString(rec, 1, "Table"); - MsiRecordSetInteger(rec, 2, 10); - MsiRecordSetString(rec, 3, "haha"); - query = "INSERT INTO `?` ( `One`, `Two` ) VALUES ( ?, '?' )"; - r = run_query(hdb, rec, query); - ok(r == ERROR_FUNCTION_FAILED, "Expected ERROR_FUNCTION_FAILED, got %d\n", r); - MsiCloseHandle(rec); - - /* try all markers */ - rec = MsiCreateRecord(5); - MsiRecordSetString(rec, 1, "Table"); - MsiRecordSetString(rec, 1, "One"); - MsiRecordSetString(rec, 1, "Two"); - MsiRecordSetInteger(rec, 2, 10); - MsiRecordSetString(rec, 3, "haha"); - query = "INSERT INTO `?` ( `?`, `?` ) VALUES ( ?, '?' )"; - r = run_query(hdb, rec, query); - ok(r == ERROR_BAD_QUERY_SYNTAX, "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r); - MsiCloseHandle(rec); - - /* insert an integer as a string */ - rec = MsiCreateRecord(2); - MsiRecordSetString(rec, 1, "11"); - MsiRecordSetString(rec, 2, "hi"); - query = "INSERT INTO `Table` ( `One`, `Two` ) VALUES ( ?, '?' )"; - r = run_query(hdb, rec, query); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - MsiCloseHandle(rec); - - /* leave off the '' for the string */ - rec = MsiCreateRecord(2); - MsiRecordSetInteger(rec, 1, 12); - MsiRecordSetString(rec, 2, "hi"); - query = "INSERT INTO `Table` ( `One`, `Two` ) VALUES ( ?, ? )"; - r = run_query(hdb, rec, query); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - MsiCloseHandle(rec); - - MsiCloseHandle(hdb); - DeleteFileA(msifile); -} - -#define MY_NVIEWS 4000 /* Largest installer I've seen uses < 2k */ -static void test_handle_limit(void) -{ - int i; - MSIHANDLE hdb; - MSIHANDLE hviews[MY_NVIEWS]; - UINT r; - - /* create an empty db */ - hdb = create_db(); - ok( hdb, "failed to create db\n"); - - memset(hviews, 0, sizeof(hviews)); - - for (i=0; i | D | C | A | E | B | - * --------------------- --------------------- - * - * set primary key `E` - * --------------------- --------------------- - * | D | C | A | E | B | -> | D | E | A | C | B | - * --------------------- --------------------- - */ - - query = "CREATE TABLE `T` ( `B` SHORT NOT NULL, `C` SHORT NOT NULL, " - "`A` CHAR(255), `E` INT, `D` CHAR(255) NOT NULL " - "PRIMARY KEY `D`, `E`)"; - r = run_query(hdb, 0, query); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - query = "SELECT * FROM `T`"; - r = MsiDatabaseOpenView(hdb, query, &view); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiViewGetColumnInfo(view, MSICOLINFO_TYPES, &rec); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 1, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("s255", buf), "Expected \"s255\", got \"%s\"\n", buf); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 2, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("I2", buf), "Expected \"I2\", got \"%s\"\n", buf); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 3, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("S255", buf), "Expected \"S255\", got \"%s\"\n", buf); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 4, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("i2", buf), "Expected \"i2\", got \"%s\"\n", buf); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 5, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("i2", buf), "Expected \"i2\", got \"%s\"\n", buf); - - MsiCloseHandle(rec); - - r = MsiViewGetColumnInfo(view, MSICOLINFO_NAMES, &rec); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 1, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("D", buf), "Expected \"D\", got \"%s\"\n", buf); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 2, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("E", buf), "Expected \"E\", got \"%s\"\n", buf); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 3, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("A", buf), "Expected \"A\", got \"%s\"\n", buf); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 4, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("C", buf), "Expected \"C\", got \"%s\"\n", buf); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 5, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("B", buf), "Expected \"B\", got \"%s\"\n", buf); - - MsiCloseHandle(rec); - MsiViewClose(view); - MsiCloseHandle(view); - - query = "INSERT INTO `T` ( `B`, `C`, `A`, `E`, `D` ) " - "VALUES ( 1, 2, 'a', 3, 'bc' )"; - r = run_query(hdb, 0, query); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - query = "SELECT * FROM `T`"; - r = do_query(hdb, query, &rec); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 1, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("bc", buf), "Expected \"bc\", got \"%s\"\n", buf); - - r = MsiRecordGetInteger(rec, 2); - ok(r == 3, "Expected 3, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 3, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("a", buf), "Expected \"a\", got \"%s\"\n", buf); - - r = MsiRecordGetInteger(rec, 4); - ok(r == 2, "Expected 2, got %d\n", r); - - r = MsiRecordGetInteger(rec, 5); - ok(r == 1, "Expected 1, got %d\n", r); - - MsiCloseHandle(rec); - - query = "SELECT * FROM `_Columns` WHERE `Table` = 'T'"; - r = MsiDatabaseOpenView(hdb, query, &view); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - r = MsiViewExecute(view, 0); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiViewFetch(view, &rec); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 1, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("T", buf), "Expected \"T\", got \"%s\"\n", buf); - - r = MsiRecordGetInteger(rec, 2); - ok(r == 1, "Expected 1, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 3, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("D", buf), "Expected \"D\", got \"%s\"\n", buf); - - MsiCloseHandle(rec); - - r = MsiViewFetch(view, &rec); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 1, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("T", buf), "Expected \"T\", got \"%s\"\n", buf); - - r = MsiRecordGetInteger(rec, 2); - ok(r == 2, "Expected 2, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 3, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("E", buf), "Expected \"E\", got \"%s\"\n", buf); - - MsiCloseHandle(rec); - - r = MsiViewFetch(view, &rec); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 1, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("T", buf), "Expected \"T\", got \"%s\"\n", buf); - - r = MsiRecordGetInteger(rec, 2); - ok(r == 3, "Expected 3, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 3, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("A", buf), "Expected \"A\", got \"%s\"\n", buf); - - MsiCloseHandle(rec); - - r = MsiViewFetch(view, &rec); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 1, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("T", buf), "Expected \"T\", got \"%s\"\n", buf); - - r = MsiRecordGetInteger(rec, 2); - ok(r == 4, "Expected 4, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 3, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("C", buf), "Expected \"C\", got \"%s\"\n", buf); - - MsiCloseHandle(rec); - - r = MsiViewFetch(view, &rec); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 1, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("T", buf), "Expected \"T\", got \"%s\"\n", buf); - - r = MsiRecordGetInteger(rec, 2); - ok(r == 5, "Expected 5, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 3, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("B", buf), "Expected \"B\", got \"%s\"\n", buf); - - MsiCloseHandle(rec); - - r = MsiViewFetch(view, &rec); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - - MsiViewClose(view); - MsiCloseHandle(view); - - query = "CREATE TABLE `Z` ( `B` SHORT NOT NULL, `C` SHORT NOT NULL, " - "`A` CHAR(255), `E` INT, `D` CHAR(255) NOT NULL " - "PRIMARY KEY `C`, `A`, `D`)"; - r = run_query(hdb, 0, query); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - query = "SELECT * FROM `Z`"; - r = MsiDatabaseOpenView(hdb, query, &view); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiViewGetColumnInfo(view, MSICOLINFO_TYPES, &rec); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 1, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("i2", buf), "Expected \"i2\", got \"%s\"\n", buf); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 2, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("S255", buf), "Expected \"S255\", got \"%s\"\n", buf); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 3, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("s255", buf), "Expected \"s255\", got \"%s\"\n", buf); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 4, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("I2", buf), "Expected \"I2\", got \"%s\"\n", buf); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 5, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("i2", buf), "Expected \"i2\", got \"%s\"\n", buf); - - MsiCloseHandle(rec); - - r = MsiViewGetColumnInfo(view, MSICOLINFO_NAMES, &rec); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 1, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("C", buf), "Expected \"C\", got \"%s\"\n", buf); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 2, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("A", buf), "Expected \"A\", got \"%s\"\n", buf); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 3, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("D", buf), "Expected \"D\", got \"%s\"\n", buf); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 4, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("E", buf), "Expected \"E\", got \"%s\"\n", buf); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 5, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("B", buf), "Expected \"B\", got \"%s\"\n", buf); - - MsiCloseHandle(rec); - MsiViewClose(view); - MsiCloseHandle(view); - - query = "INSERT INTO `Z` ( `B`, `C`, `A`, `E`, `D` ) " - "VALUES ( 1, 2, 'a', 3, 'bc' )"; - r = run_query(hdb, 0, query); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - query = "SELECT * FROM `Z`"; - r = do_query(hdb, query, &rec); - - r = MsiRecordGetInteger(rec, 1); - ok(r == 2, "Expected 2, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 2, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("a", buf), "Expected \"a\", got \"%s\"\n", buf); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 3, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("bc", buf), "Expected \"bc\", got \"%s\"\n", buf); - - r = MsiRecordGetInteger(rec, 4); - ok(r == 3, "Expected 3, got %d\n", r); - - r = MsiRecordGetInteger(rec, 5); - ok(r == 1, "Expected 1, got %d\n", r); - - MsiCloseHandle(rec); - - query = "SELECT * FROM `_Columns` WHERE `Table` = 'T'"; - r = MsiDatabaseOpenView(hdb, query, &view); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - r = MsiViewExecute(view, 0); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiViewFetch(view, &rec); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 1, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("T", buf), "Expected \"T\", got \"%s\"\n", buf); - - r = MsiRecordGetInteger(rec, 2); - ok(r == 1, "Expected 1, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 3, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("D", buf), "Expected \"D\", got \"%s\"\n", buf); - - MsiCloseHandle(rec); - - r = MsiViewFetch(view, &rec); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 1, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("T", buf), "Expected \"T\", got \"%s\"\n", buf); - - r = MsiRecordGetInteger(rec, 2); - ok(r == 2, "Expected 2, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 3, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("E", buf), "Expected \"E\", got \"%s\"\n", buf); - - MsiCloseHandle(rec); - - r = MsiViewFetch(view, &rec); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 1, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("T", buf), "Expected \"T\", got \"%s\"\n", buf); - - r = MsiRecordGetInteger(rec, 2); - ok(r == 3, "Expected 3, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 3, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("A", buf), "Expected \"A\", got \"%s\"\n", buf); - - MsiCloseHandle(rec); - - r = MsiViewFetch(view, &rec); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 1, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("T", buf), "Expected \"T\", got \"%s\"\n", buf); - - r = MsiRecordGetInteger(rec, 2); - ok(r == 4, "Expected 4, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 3, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("C", buf), "Expected \"C\", got \"%s\"\n", buf); - - MsiCloseHandle(rec); - - r = MsiViewFetch(view, &rec); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 1, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("T", buf), "Expected \"T\", got \"%s\"\n", buf); - - r = MsiRecordGetInteger(rec, 2); - ok(r == 5, "Expected 5, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "kiwi"); - r = MsiRecordGetString(rec, 3, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA("B", buf), "Expected \"B\", got \"%s\"\n", buf); - - MsiCloseHandle(rec); - - r = MsiViewFetch(view, &rec); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - - MsiViewClose(view); - MsiCloseHandle(view); - - MsiCloseHandle(hdb); - DeleteFileA(msifile); -} - -static void test_createtable(void) -{ - MSIHANDLE hdb, htab = 0, hrec = 0; - LPCSTR query; - UINT res; - DWORD size; - char buffer[0x20]; - - hdb = create_db(); - ok(hdb, "failed to create db\n"); - - query = "CREATE TABLE `blah` (`foo` CHAR(72) NOT NULL PRIMARY KEY `foo`)"; - res = MsiDatabaseOpenView( hdb, query, &htab ); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - if(res == ERROR_SUCCESS ) - { - res = MsiViewExecute( htab, hrec ); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = MsiViewGetColumnInfo( htab, MSICOLINFO_NAMES, &hrec ); - todo_wine ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - size = sizeof(buffer); - res = MsiRecordGetString(hrec, 1, buffer, &size ); - todo_wine ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = MsiViewClose( htab ); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = MsiCloseHandle( htab ); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - } - - query = "CREATE TABLE `a` (`b` INT PRIMARY KEY `b`)"; - res = MsiDatabaseOpenView( hdb, query, &htab ); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - if(res == ERROR_SUCCESS ) - { - res = MsiViewExecute( htab, 0 ); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = MsiViewClose( htab ); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = MsiCloseHandle( htab ); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - query = "SELECT * FROM `a`"; - res = MsiDatabaseOpenView( hdb, query, &htab ); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = MsiViewGetColumnInfo( htab, MSICOLINFO_NAMES, &hrec ); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - size = sizeof(buffer); - res = MsiRecordGetString(hrec, 1, buffer, &size ); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!strcmp(buffer,"b"), "b != %s\n", buffer); - - res = MsiViewClose( htab ); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = MsiCloseHandle( htab ); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = MsiDatabaseCommit(hdb); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = MsiCloseHandle(hdb); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = MsiOpenDatabase(msifile, MSIDBOPEN_TRANSACT, &hdb ); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - query = "SELECT * FROM `a`"; - res = MsiDatabaseOpenView( hdb, query, &htab ); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = MsiViewGetColumnInfo( htab, MSICOLINFO_NAMES, &hrec ); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - size = sizeof(buffer); - res = MsiRecordGetString(hrec, 1, buffer, &size ); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - todo_wine ok(!strcmp(buffer,"b"), "b != %s\n", buffer); - - res = MsiCloseHandle( hrec ); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = MsiViewClose( htab ); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = MsiCloseHandle( htab ); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - } - - res = MsiDatabaseCommit(hdb); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = MsiCloseHandle(hdb); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - DeleteFileA(msifile); -} - - -START_TEST(db) -{ - test_msidatabase(); - test_msiinsert(); - test_msidecomposedesc(); - test_msibadqueries(); - test_viewmodify(); - test_viewgetcolumninfo(); - test_getcolinfo(); - test_msiexport(); - test_longstrings(); - test_streamtable(); - test_binary(); - test_where_not_in_selected(); - test_where(); - test_msiimport(); - test_binary_import(); - test_markers(); - test_handle_limit(); - test_try_transform(); - test_join(); - test_temporary_table(); - test_alter(); - test_integers(); - test_update(); - test_special_tables(); - test_tables_order(); - test_rows_order(); - test_select_markers(); - test_viewmodify_update(); - test_viewmodify_assign(); - test_stringtable(); - test_viewmodify_delete(); - test_defaultdatabase(); - test_order(); - test_viewmodify_delete_temporary(); - test_deleterow(); - test_quotes(); - test_carriagereturn(); - test_noquotes(); - test_forcecodepage(); - test_viewmodify_refresh(); - test_where_viewmodify(); - test_storages_table(); - test_dbtopackage(); - test_droptable(); - test_dbmerge(); - test_select_with_tablenames(); - test_insertorder(); - test_columnorder(); - test_suminfo_import(); - test_createtable(); -} diff --git a/rostests/winetests/msi/format.c b/rostests/winetests/msi/format.c deleted file mode 100644 index 3d4029cb0ac..00000000000 --- a/rostests/winetests/msi/format.c +++ /dev/null @@ -1,2413 +0,0 @@ -/* - * Copyright (C) 2005 Mike McCormack for CodeWeavers - * Copyright (C) 2005 Aric Stewart for CodeWeavers - * - * A test program for MSI record formatting - * - * 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 "wine/test.h" - -static const char msifile[] = "winetest-format.msi"; - -static UINT run_query( MSIHANDLE hdb, const char *query ) -{ - MSIHANDLE hview = 0; - UINT r; - - r = MsiDatabaseOpenView(hdb, query, &hview); - if( r != ERROR_SUCCESS ) - return r; - - r = MsiViewExecute(hview, 0); - if( r == ERROR_SUCCESS ) - r = MsiViewClose(hview); - MsiCloseHandle(hview); - return r; -} - -static UINT create_feature_table( MSIHANDLE hdb ) -{ - return run_query( hdb, - "CREATE TABLE `Feature` ( " - "`Feature` CHAR(38) NOT NULL, " - "`Feature_Parent` CHAR(38), " - "`Title` CHAR(64), " - "`Description` CHAR(255), " - "`Display` SHORT NOT NULL, " - "`Level` SHORT NOT NULL, " - "`Directory_` CHAR(72), " - "`Attributes` SHORT NOT NULL " - "PRIMARY KEY `Feature`)" ); -} - -static UINT create_component_table( MSIHANDLE hdb ) -{ - return run_query( hdb, - "CREATE TABLE `Component` ( " - "`Component` CHAR(72) NOT NULL, " - "`ComponentId` CHAR(38), " - "`Directory_` CHAR(72) NOT NULL, " - "`Attributes` SHORT NOT NULL, " - "`Condition` CHAR(255), " - "`KeyPath` CHAR(72) " - "PRIMARY KEY `Component`)" ); -} - -static UINT create_feature_components_table( MSIHANDLE hdb ) -{ - return run_query( hdb, - "CREATE TABLE `FeatureComponents` ( " - "`Feature_` CHAR(38) NOT NULL, " - "`Component_` CHAR(72) NOT NULL " - "PRIMARY KEY `Feature_`, `Component_` )" ); -} - -static UINT create_file_table( MSIHANDLE hdb ) -{ - return run_query( hdb, - "CREATE TABLE `File` (" - "`File` CHAR(72) NOT NULL, " - "`Component_` CHAR(72) NOT NULL, " - "`FileName` CHAR(255) NOT NULL, " - "`FileSize` LONG NOT NULL, " - "`Version` CHAR(72), " - "`Language` CHAR(20), " - "`Attributes` SHORT, " - "`Sequence` SHORT NOT NULL " - "PRIMARY KEY `File`)" ); -} - -static UINT create_custom_action_table( MSIHANDLE hdb ) -{ - return run_query( hdb, - "CREATE TABLE `CustomAction` (" - "`Action` CHAR(72) NOT NULL, " - "`Type` SHORT NOT NULL, " - "`Source` CHAR(75), " - "`Target` CHAR(255) " - "PRIMARY KEY `Action`)" ); -} - -#define make_add_entry(type, qtext) \ - static UINT add##_##type##_##entry( MSIHANDLE hdb, const char *values ) \ - { \ - char insert[] = qtext; \ - char *query; \ - UINT sz, r; \ - sz = strlen(values) + sizeof insert; \ - query = HeapAlloc(GetProcessHeap(),0,sz); \ - sprintf(query,insert,values); \ - r = run_query( hdb, query ); \ - HeapFree(GetProcessHeap(), 0, query); \ - return r; \ - } - -make_add_entry(feature, - "INSERT INTO `Feature` " - "(`Feature`, `Feature_Parent`, `Title`, `Description`, " - "`Display`, `Level`, `Directory_`, `Attributes`) VALUES( %s )") - -make_add_entry(component, - "INSERT INTO `Component` " - "(`Component`, `ComponentId`, `Directory_`, " - "`Attributes`, `Condition`, `KeyPath`) VALUES( %s )") - -make_add_entry(feature_components, - "INSERT INTO `FeatureComponents` " - "(`Feature_`, `Component_`) VALUES( %s )") - -make_add_entry(file, - "INSERT INTO `File` " - "(`File`, `Component_`, `FileName`, `FileSize`, " - "`Version`, `Language`, `Attributes`, `Sequence`) VALUES( %s )") - -make_add_entry(directory, - "INSERT INTO `Directory` " - "(`Directory`,`Directory_Parent`,`DefaultDir`) VALUES( %s )") - -make_add_entry(custom_action, - "INSERT INTO `CustomAction` " - "(`Action`, `Type`, `Source`, `Target`) VALUES( %s )") - -static UINT set_summary_info(MSIHANDLE hdb) -{ - UINT res; - MSIHANDLE suminfo; - - /* build summary info */ - res = MsiGetSummaryInformation(hdb, NULL, 7, &suminfo); - ok( res == ERROR_SUCCESS , "Failed to open summaryinfo\n" ); - - res = MsiSummaryInfoSetProperty(suminfo,2, VT_LPSTR, 0,NULL, - "Installation Database"); - ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - - res = MsiSummaryInfoSetProperty(suminfo,3, VT_LPSTR, 0,NULL, - "Installation Database"); - ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - - res = MsiSummaryInfoSetProperty(suminfo,4, VT_LPSTR, 0,NULL, - "Wine Hackers"); - ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - - res = MsiSummaryInfoSetProperty(suminfo,7, VT_LPSTR, 0,NULL, - ";1033"); - ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - - res = MsiSummaryInfoSetProperty(suminfo,9, VT_LPSTR, 0,NULL, - "{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}"); - ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - - res = MsiSummaryInfoSetProperty(suminfo, 14, VT_I4, 100, NULL, NULL); - ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - - res = MsiSummaryInfoSetProperty(suminfo, 15, VT_I4, 0, NULL, NULL); - ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - - res = MsiSummaryInfoPersist(suminfo); - ok( res == ERROR_SUCCESS , "Failed to make summary info persist\n" ); - - res = MsiCloseHandle( suminfo); - ok( res == ERROR_SUCCESS , "Failed to close suminfo\n" ); - - return res; -} - -static MSIHANDLE create_package_db(void) -{ - MSIHANDLE hdb = 0; - UINT res; - - DeleteFile(msifile); - - /* create an empty database */ - res = MsiOpenDatabase(msifile, MSIDBOPEN_CREATE, &hdb ); - ok( res == ERROR_SUCCESS , "Failed to create database\n" ); - if( res != ERROR_SUCCESS ) - return hdb; - - res = MsiDatabaseCommit( hdb ); - ok( res == ERROR_SUCCESS , "Failed to commit database\n" ); - - res = set_summary_info(hdb); - - res = run_query( hdb, - "CREATE TABLE `Directory` ( " - "`Directory` CHAR(255) NOT NULL, " - "`Directory_Parent` CHAR(255), " - "`DefaultDir` CHAR(255) NOT NULL " - "PRIMARY KEY `Directory`)" ); - ok( res == ERROR_SUCCESS , "Failed to create directory table\n" ); - - return hdb; -} - -static MSIHANDLE package_from_db(MSIHANDLE hdb) -{ - UINT res; - CHAR szPackage[10]; - MSIHANDLE hPackage; - - sprintf(szPackage,"#%i",hdb); - res = MsiOpenPackage(szPackage,&hPackage); - ok( res == ERROR_SUCCESS , "Failed to open package\n" ); - - res = MsiCloseHandle(hdb); - ok( res == ERROR_SUCCESS , "Failed to close db handle\n" ); - - return hPackage; -} - -static void create_test_file(const CHAR *name) -{ - HANDLE file; - DWORD written; - - file = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "Failure to open file %s\n", name); - WriteFile(file, name, strlen(name), &written, NULL); - WriteFile(file, "\n", strlen("\n"), &written, NULL); - CloseHandle(file); -} - -static MSIHANDLE helper_createpackage( const char *szName ) -{ - MSIHANDLE hdb = 0; - UINT res; - CHAR szPackage[10]; - MSIHANDLE hPackage; - MSIHANDLE suminfo; - - DeleteFile(szName); - - /* create an empty database */ - res = MsiOpenDatabase(szName, MSIDBOPEN_CREATE, &hdb ); - ok( res == ERROR_SUCCESS , "Failed to create database\n" ); - - res = MsiDatabaseCommit( hdb ); - ok( res == ERROR_SUCCESS , "Failed to commit database\n" ); - - /* build summary info */ - res = MsiGetSummaryInformation(hdb, NULL, 7, &suminfo); - ok( res == ERROR_SUCCESS , "Failed to open summaryinfo\n" ); - - res = MsiSummaryInfoSetProperty(suminfo,2, VT_LPSTR, 0,NULL, - "Installation Database"); - ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - - res = MsiSummaryInfoSetProperty(suminfo,3, VT_LPSTR, 0,NULL, - "Installation Database"); - ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - - res = MsiSummaryInfoSetProperty(suminfo,4, VT_LPSTR, 0,NULL, - "Wine Hackers"); - ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - - res = MsiSummaryInfoSetProperty(suminfo,7, VT_LPSTR, 0,NULL, - ";1033"); - ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - - res = MsiSummaryInfoSetProperty(suminfo,9, VT_LPSTR, 0,NULL, - "{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}"); - ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - - res = MsiSummaryInfoSetProperty(suminfo, 14, VT_I4, 100, NULL, NULL); - ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - - res = MsiSummaryInfoSetProperty(suminfo, 15, VT_I4, 0, NULL, NULL); - ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - - res = MsiSummaryInfoPersist(suminfo); - ok( res == ERROR_SUCCESS , "Failed to make summary info persist\n" ); - - res = MsiCloseHandle( suminfo); - ok( res == ERROR_SUCCESS , "Failed to close suminfo\n" ); - - sprintf(szPackage,"#%i",hdb); - res = MsiOpenPackage(szPackage,&hPackage); - ok( res == ERROR_SUCCESS , "Failed to open package\n" ); - - res = MsiCloseHandle( hdb ); - ok( res == ERROR_SUCCESS , "Failed to close database\n" ); - - return hPackage; -} - -static void test_createpackage(void) -{ - MSIHANDLE hPackage = 0; - UINT res; - - hPackage = helper_createpackage( msifile ); - ok ( hPackage != 0, " Failed to create package\n"); - - res = MsiCloseHandle( hPackage); - ok( res == ERROR_SUCCESS , "Failed to close package\n" ); - - DeleteFile( msifile ); -} - -static void test_formatrecord(void) -{ - char buffer[100]; - MSIHANDLE hrec; - UINT r; - DWORD sz; - - r = MsiFormatRecord(0, 0, NULL, NULL ); - ok( r == ERROR_INVALID_HANDLE, "wrong error\n"); - - hrec = MsiCreateRecord(0); - ok( hrec, "failed to create record\n"); - - /* format an empty record on a record with no parameters */ - sz = sizeof(buffer); - r = MsiFormatRecordA(0, hrec, buffer, &sz ); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 0, "size wrong\n"); - - MsiCloseHandle( hrec ); - - hrec = MsiCreateRecord(4); - ok( hrec, "failed to create record\n"); - - /* format an empty record */ - r = MsiFormatRecord(0, hrec, NULL, NULL ); - ok( r == ERROR_SUCCESS, "format failed\n"); - buffer[0] = 'x'; - buffer[1] = 0; - sz=0; - r = MsiFormatRecord(0, hrec, buffer+1, &sz); - ok( r == ERROR_MORE_DATA && buffer[0] == 'x', "format failed measuring with buffer\n"); - ok( sz == 16, "size wrong\n"); - sz=100; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed with empty buffer\n"); - ok( sz == 16, "size wrong\n"); - ok( 0 == strcmp(buffer,"1: 2: 3: 4: "), "wrong output\n"); - - r = MsiCloseHandle(hrec); - ok(r==ERROR_SUCCESS, "Unable to close record\n"); - - hrec = MsiCreateRecord(6); - ok( hrec, "failed to create record\n"); - - sz = 100; - buffer[0] = 'x'; - buffer[1] = 0; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed with empty buffer\n"); - ok( sz == 24, "size wrong\n"); - ok( 0 == strcmp(buffer,"1: 2: 3: 4: 5: 6: "), "wrong output\n"); - - - /* format a format string with everything else empty */ - r = MsiRecordSetString(hrec, 0, "%1"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - r = MsiFormatRecord(0, hrec, NULL, NULL ); - ok( r == ERROR_SUCCESS, "format failed\n"); - r = MsiFormatRecord(0, hrec, buffer, NULL); - ok( r == ERROR_INVALID_PARAMETER, "wrong error\n"); - - sz = 123; - r = MsiFormatRecord(0, hrec, NULL, &sz); - ok( r == ERROR_SUCCESS, "format failed with empty buffer\n"); - ok( sz == 2, "size wrong (%i)\n",sz); - sz = sizeof buffer; - buffer[0] = 'x'; - buffer[1] = 0; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed with empty buffer\n"); - ok( sz == 2, "size wrong\n"); - ok( 0 == strcmp(buffer,"%1"), "wrong output\n"); - - /* make the buffer too small */ - sz = 0; - buffer[0] = 'x'; - buffer[1] = 0; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_MORE_DATA, "format failed with empty buffer\n"); - ok( sz == 2, "size wrong\n"); - ok( 0 == strcmp(buffer,"x"), "wrong output\n"); - - /* make the buffer a little bit bigger */ - sz = 1; - buffer[0] = 'x'; - buffer[1] = 0; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_MORE_DATA, "format failed with empty buffer\n"); - ok( sz == 2, "size wrong\n"); - ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer); - - /* and again */ - sz = 2; - buffer[0] = 'x'; - buffer[1] = 0; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_MORE_DATA, "format failed with empty buffer\n"); - ok( sz == 2, "size wrong\n"); - ok( 0 == strcmp(buffer,"%"), "wrong output\n"); - - /* and again */ - sz = 3; - buffer[0] = 'x'; - buffer[1] = 0; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed with empty buffer\n"); - ok( sz == 2, "size wrong\n"); - ok( 0 == strcmp(buffer,"%1"), "wrong output\n"); - - /* now try a real format string */ - r = MsiRecordSetString(hrec, 0, "[1]"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 0, "size wrong\n"); - ok( 0 == strcmp(buffer,""), "wrong output\n"); - - /* now put something in the first field */ - r = MsiRecordSetString(hrec, 1, "boo hoo"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 7, "size wrong\n"); - ok( 0 == strcmp(buffer,"boo hoo"), "wrong output\n"); - - /* now put something in the first field */ - r = MsiRecordSetString(hrec, 0, "[1] [2]"); - r = MsiRecordSetString(hrec, 1, "boo"); - r = MsiRecordSetString(hrec, 2, "hoo"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 7, "size wrong\n"); - ok( 0 == strcmp(buffer,"boo hoo"), "wrong output\n"); - - /* empty string */ - r = MsiRecordSetString(hrec, 0, ""); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 30, "size wrong %i\n",sz); - ok( 0 == strcmp(buffer,"1: boo 2: hoo 3: 4: 5: 6: "), - "wrong output(%s)\n",buffer); - - /* play games with recursive lookups */ - r = MsiRecordSetString(hrec, 0, "[[1]] [2]"); - r = MsiRecordSetString(hrec, 1, "2"); - r = MsiRecordSetString(hrec, 2, "hey"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 7, "size wrong,(%i)\n",sz); - ok( 0 == strcmp(buffer,"hey hey"), "wrong output (%s)\n",buffer); - - r = MsiRecordSetString(hrec, 0, "[[1]] [2]"); - r = MsiRecordSetString(hrec, 1, "[2]"); - r = MsiRecordSetString(hrec, 2, "hey"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 9, "size wrong,(%i)\n",sz); - ok( 0 == strcmp(buffer,"[[2]] hey"), "wrong output (%s)\n",buffer); - - r = MsiRecordSetString(hrec, 0, "[[[3]]] [2]"); - r = MsiRecordSetString(hrec, 1, "2"); - r = MsiRecordSetString(hrec, 2, "hey"); - r = MsiRecordSetString(hrec, 3, "1"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 7, "size wrong,(%i)\n",sz); - ok( 0 == strcmp(buffer,"hey hey"), "wrong output (%s)\n",buffer); - - r = MsiCloseHandle(hrec); - ok(r==ERROR_SUCCESS, "Unable to close record\n"); - hrec = MsiCreateRecord(12); - ok( hrec, "failed to create record\n"); - - r = MsiRecordSetString(hrec, 0, "[[3][1]] [2]"); - r = MsiRecordSetString(hrec, 1, "2"); - r = MsiRecordSetString(hrec, 2, "hey"); - r = MsiRecordSetString(hrec, 3, "1"); - r = MsiRecordSetString(hrec, 12, "big"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 7, "size wrong,(%i)\n",sz); - ok( 0 == strcmp(buffer,"big hey"), "wrong output (%s)\n",buffer); - - r = MsiRecordSetString(hrec, 0, "[[3][4][1]] [2]"); - r = MsiRecordSetString(hrec, 1, "2"); - r = MsiRecordSetString(hrec, 2, "hey"); - r = MsiRecordSetString(hrec, 3, "1"); - r = MsiRecordSetString(hrec, 4, NULL); - r = MsiRecordSetString(hrec, 12, "big"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 7, "size wrong,(%i)\n",sz); - ok( 0 == strcmp(buffer,"big hey"), "wrong output (%s)\n",buffer); - - r = MsiRecordSetString(hrec, 0, "[[3][[4]][1]] [2]"); - r = MsiRecordSetString(hrec, 1, "2"); - r = MsiRecordSetString(hrec, 2, "hey"); - r = MsiRecordSetString(hrec, 3, "1"); - r = MsiRecordSetString(hrec, 4, NULL); - r = MsiRecordSetString(hrec, 12, "big"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 10, "size wrong,(%i)\n",sz); - ok( 0 == strcmp(buffer,"[1[]2] hey"), "wrong output (%s)\n",buffer); - - /* incorrect formats */ - r = MsiRecordSetString(hrec, 0, "[[[3][[4]][1]] [2]"); - r = MsiRecordSetString(hrec, 1, "2"); - r = MsiRecordSetString(hrec, 2, "hey"); - r = MsiRecordSetString(hrec, 3, "1"); - r = MsiRecordSetString(hrec, 4, NULL); - r = MsiRecordSetString(hrec, 12, "big"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 18, "size wrong,(%i)\n",sz); - ok( 0 == strcmp(buffer,"[[[3][[4]][1]] [2]"), "wrong output (%s)\n",buffer); - - r = MsiRecordSetString(hrec, 0, "[[3][[4]][1]] [2]]"); - r = MsiRecordSetString(hrec, 1, "2"); - r = MsiRecordSetString(hrec, 2, "hey"); - r = MsiRecordSetString(hrec, 3, "1"); - r = MsiRecordSetString(hrec, 4, NULL); - r = MsiRecordSetString(hrec, 12, "big"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 11, "size wrong,(%i)\n",sz); - ok( 0 == strcmp(buffer,"[1[]2] hey]"), "wrong output (%s)\n",buffer); - - - /* play games with {} */ - - r = MsiRecordSetString(hrec, 0, "{[3][1]} [2]"); - r = MsiRecordSetString(hrec, 1, "2"); - r = MsiRecordSetString(hrec, 2, "hey"); - r = MsiRecordSetString(hrec, 3, "1"); - r = MsiRecordSetString(hrec, 4, NULL); - r = MsiRecordSetString(hrec, 12, "big"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 6, "size wrong,(%i)\n",sz); - ok( 0 == strcmp(buffer,"12 hey"), "wrong output (%s)\n",buffer); - - r = MsiRecordSetString(hrec, 0, "[{[3][1]}] [2]"); - r = MsiRecordSetString(hrec, 1, "2"); - r = MsiRecordSetString(hrec, 2, "hey"); - r = MsiRecordSetString(hrec, 3, "1"); - r = MsiRecordSetString(hrec, 4, NULL); - r = MsiRecordSetString(hrec, 12, "big"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 8, "size wrong,(%i)\n",sz); - ok( 0 == strcmp(buffer,"[12] hey"), "wrong output (%s)\n",buffer); - - - r = MsiRecordSetString(hrec, 0, "{test} [2]"); - r = MsiRecordSetString(hrec, 1, "2"); - r = MsiRecordSetString(hrec, 2, "hey"); - r = MsiRecordSetString(hrec, 3, "1"); - r = MsiRecordSetString(hrec, 4, NULL); - r = MsiRecordSetString(hrec, 12, "big"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 10, "size wrong,(%i)\n",sz); - ok( 0 == strcmp(buffer,"{test} hey"), "wrong output (%s)\n",buffer); - - r = MsiRecordSetString(hrec, 0, "{[test]} [2]"); - r = MsiRecordSetString(hrec, 1, "2"); - r = MsiRecordSetString(hrec, 2, "hey"); - r = MsiRecordSetString(hrec, 3, "1"); - r = MsiRecordSetString(hrec, 4, NULL); - r = MsiRecordSetString(hrec, 12, "big"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 12, "size wrong,(%i)\n",sz); - ok( 0 == strcmp(buffer,"{[test]} hey"), "wrong output (%s)\n",buffer); - - r = MsiRecordSetString(hrec, 0, "{[1][2][3][4]} [2]"); - r = MsiRecordSetString(hrec, 1, "2"); - r = MsiRecordSetString(hrec, 2, "hey"); - r = MsiRecordSetString(hrec, 3, "1"); - r = MsiRecordSetString(hrec, 4, NULL); - r = MsiRecordSetString(hrec, 12, "big"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 4, "size wrong,(%i)\n",sz); - ok( 0 == strcmp(buffer," hey"), "wrong output (%s)\n",buffer); - - r = MsiRecordSetString(hrec, 0, "{[1][2][3][dummy]} [2]"); - r = MsiRecordSetString(hrec, 1, "2"); - r = MsiRecordSetString(hrec, 2, "hey"); - r = MsiRecordSetString(hrec, 3, "1"); - r = MsiRecordSetString(hrec, 4, NULL); - r = MsiRecordSetString(hrec, 12, "big"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 18, "size wrong,(%i)\n",sz); - ok( 0 == strcmp(buffer,"{2hey1[dummy]} hey"), "wrong output (%s)\n",buffer); - - r = MsiRecordSetString(hrec, 0, "{[1][2][3][4][dummy]} [2]"); - r = MsiRecordSetString(hrec, 1, "2"); - r = MsiRecordSetString(hrec, 2, "hey"); - r = MsiRecordSetString(hrec, 3, "1"); - r = MsiRecordSetString(hrec, 4, NULL); - r = MsiRecordSetString(hrec, 12, "big"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 18, "size wrong,(%i)\n",sz); - ok( 0 == strcmp(buffer,"{2hey1[dummy]} hey"), "wrong output (%s)\n",buffer); - - r = MsiRecordSetString(hrec, 0, "{{[1][2]}[3][4][dummy]}"); - r = MsiRecordSetString(hrec, 1, "2"); - r = MsiRecordSetString(hrec, 2, "hey"); - r = MsiRecordSetString(hrec, 3, "1"); - r = MsiRecordSetString(hrec, 4, NULL); - r = MsiRecordSetString(hrec, 12, "big"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 16, "size wrong,(%i)\n",sz); - ok( 0 == strcmp(buffer,"{{2hey}1[dummy]}"), "wrong output (%s)\n",buffer); - - r = MsiRecordSetString(hrec, 0, "{{[1][2]}[3]{[4][dummy]}}"); - r = MsiRecordSetString(hrec, 1, "2"); - r = MsiRecordSetString(hrec, 2, "hey"); - r = MsiRecordSetString(hrec, 3, "1"); - r = MsiRecordSetString(hrec, 4, NULL); - r = MsiRecordSetString(hrec, 12, "big"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 0, "size wrong,(%i)\n",sz); - ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer); - - r = MsiRecordSetString(hrec, 0, "{{[1][2]}[3]} {[1][2]}"); - r = MsiRecordSetString(hrec, 1, "1"); - r = MsiRecordSetString(hrec, 2, "2"); - r = MsiRecordSetString(hrec, 3, "3"); - r = MsiRecordSetString(hrec, 4, NULL); - r = MsiRecordSetString(hrec, 12, "big"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 12, "size wrong,(%i)\n",sz); - ok( 0 == strcmp(buffer,"{{12}3} {12}"), "wrong output (%s)\n",buffer); - - r = MsiRecordSetString(hrec, 0, "{[1][2]} {{[1][2]}[3]} {[1][2]}"); - r = MsiRecordSetString(hrec, 1, "1"); - r = MsiRecordSetString(hrec, 2, "2"); - r = MsiRecordSetString(hrec, 3, "3"); - r = MsiRecordSetString(hrec, 4, NULL); - r = MsiRecordSetString(hrec, 12, "big"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 15, "size wrong,(%i)\n",sz); - ok( 0 == strcmp(buffer,"12 {{12}3} {12}"), "wrong output (%s)\n",buffer); - - r = MsiRecordSetString(hrec, 0, "{[4]}{[1][2]} {{[1][2]}[3]} {[1][2]}"); - r = MsiRecordSetString(hrec, 1, "1"); - r = MsiRecordSetString(hrec, 2, "2"); - r = MsiRecordSetString(hrec, 3, "3"); - r = MsiRecordSetString(hrec, 4, NULL); - r = MsiRecordSetString(hrec, 12, "big"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 15, "size wrong,(%i)\n",sz); - ok( 0 == strcmp(buffer,"12 {{12}3} {12}"), "wrong output (%s)\n",buffer); - - r = MsiRecordSetString(hrec, 0, "{blah} {[4]}{[1][2]} {{[1][2]}[3]} {[1][2]}"); - r = MsiRecordSetString(hrec, 1, "1"); - r = MsiRecordSetString(hrec, 2, "2"); - r = MsiRecordSetString(hrec, 3, "3"); - r = MsiRecordSetString(hrec, 4, NULL); - r = MsiRecordSetString(hrec, 12, "big"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 22, "size wrong,(%i)\n",sz); - ok( 0 == strcmp(buffer,"{blah} 12 {{12}3} {12}"), "wrong output (%s)\n",buffer); - - r = MsiRecordSetString(hrec, 0, "{{[1]}[2]} {[4]}{[1][2]}"); - r = MsiRecordSetString(hrec, 1, "1"); - r = MsiRecordSetString(hrec, 2, "2"); - r = MsiRecordSetString(hrec, 3, "3"); - r = MsiRecordSetString(hrec, 4, NULL); - r = MsiRecordSetString(hrec, 12, "big"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 13, "size wrong,(%i)\n",sz); - ok( 0 == strcmp(buffer,"{{1}2} {}{12}"), "wrong output (%s)\n",buffer); - - r = MsiRecordSetString(hrec, 0, "{{[1]}} {[4]}{[1][2]}"); - r = MsiRecordSetString(hrec, 1, "1"); - r = MsiRecordSetString(hrec, 2, "2"); - r = MsiRecordSetString(hrec, 3, "3"); - r = MsiRecordSetString(hrec, 4, NULL); - r = MsiRecordSetString(hrec, 12, "big"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 3, "size wrong,(%i)\n",sz); - ok( 0 == strcmp(buffer," 12"), "wrong output (%s)\n",buffer); - - r = MsiRecordSetString(hrec, 0, "{{{[1]}} {[4]}{[1][2]}"); - r = MsiRecordSetString(hrec, 1, "1"); - r = MsiRecordSetString(hrec, 2, "2"); - r = MsiRecordSetString(hrec, 3, "3"); - r = MsiRecordSetString(hrec, 4, NULL); - r = MsiRecordSetString(hrec, 12, "big"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - todo_wine{ - ok( sz == 3, "size wrong,(%i)\n",sz); - ok( 0 == strcmp(buffer," 12"), "wrong output (%s)\n",buffer); - } - - /* now put play games with escaping */ - r = MsiRecordSetString(hrec, 0, "[1] [2] [\\3asdf]"); - r = MsiRecordSetString(hrec, 1, "boo"); - r = MsiRecordSetString(hrec, 2, "hoo"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 16, "size wrong\n"); - ok( 0 == strcmp(buffer,"boo hoo [\\3asdf]"), "wrong output\n"); - - /* now put play games with escaping */ - r = MsiRecordSetString(hrec, 0, "[1] [2] [\\x]"); - r = MsiRecordSetString(hrec, 1, "boo"); - r = MsiRecordSetString(hrec, 2, "hoo"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 12, "size wrong\n"); - ok( 0 == strcmp(buffer,"boo hoo [\\x]"), "wrong output\n"); - - MsiRecordSetString(hrec, 0, "[\\x]"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 4, "size wrong: %d\n", sz); - ok( 0 == strcmp(buffer,"[\\x]"), "wrong output: %s\n", buffer); - - MsiRecordSetString(hrec, 0, "{\\x}"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 4, "size wrong: %d\n", sz); - ok( 0 == strcmp(buffer,"{\\x}"), "wrong output: %s\n", buffer); - - MsiRecordSetString(hrec, 0, "[abc\\x]"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 7, "size wrong: %d\n", sz); - ok( 0 == strcmp(buffer,"[abc\\x]"), "wrong output: %s\n", buffer); - - MsiRecordSetString(hrec, 0, "[\\[]Bracket Text[\\]]"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 20, "size wrong: %d\n", sz); - ok( 0 == strcmp(buffer,"[\\[]Bracket Text[\\]]"), "wrong output: %s\n", buffer); - - /* now try other formats without a package */ - r = MsiRecordSetString(hrec, 0, "[1] [2] [property]"); - r = MsiRecordSetString(hrec, 1, "boo"); - r = MsiRecordSetString(hrec, 2, "hoo"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 18, "size wrong\n"); - ok( 0 == strcmp(buffer,"boo hoo [property]"), "wrong output\n"); - - r = MsiRecordSetString(hrec, 0, "[1] [~] [2]"); - r = MsiRecordSetString(hrec, 1, "boo"); - r = MsiRecordSetString(hrec, 2, "hoo"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 11, "size wrong\n"); - ok( 0 == strcmp(buffer,"boo [~] hoo"), "wrong output (%s)\n",buffer); - - r = MsiRecordSetString(hrec, 0, "[1]"); - r = MsiRecordSetInteger(hrec, 1, 123456); - ok( r == ERROR_SUCCESS, "set integer failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 6, "size wrong\n"); - ok( 0 == strcmp(buffer,"123456"), "wrong output (%s)\n",buffer); - - r = MsiRecordSetString(hrec, 0, "[~]"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 3, "size wrong\n"); - ok( 0 == strcmp(buffer,"[~]"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "[]"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 2, "size wrong\n"); - ok( 0 == strcmp(buffer,"[]"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - /* MsiFormatRecord doesn't seem to handle a negative too well */ - r = MsiRecordSetString(hrec, 0, "[-1]"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 4, "size wrong\n"); - ok( 0 == strcmp(buffer,"[-1]"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{[]}"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 4, "size wrong\n"); - ok( 0 == strcmp(buffer,"{[]}"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "[0]"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 3, "size wrong\n"); - ok( 0 == strcmp(buffer,"[0]"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "[100]"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 0, "size wrong\n"); - ok( 0 == strcmp(buffer,""), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{[1] [2]}"); - r = MsiRecordSetString(hrec, 1, "boo"); - r = MsiRecordSetString(hrec, 2, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 7, "size wrong\n"); - ok( 0 == strcmp(buffer,"boo hoo"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{}"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 0, "size wrong\n"); - ok( 0 == strcmp(buffer,""), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{foo}"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 5, "size wrong\n"); - ok( 0 == strcmp(buffer,"{foo}"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{boo [1]}"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 7, "size wrong\n"); - ok( 0 == strcmp(buffer,"boo hoo"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{{[1]}}"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 0, "size wrong\n"); - ok( 0 == strcmp(buffer,""), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{ {[1]}}"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - todo_wine - { - ok( 0 == strcmp(buffer," {hoo}"), "wrong output\n"); - ok( sz == 6, "size wrong\n"); - } - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{{[1]} }"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 8, "size wrong\n"); - ok( 0 == strcmp(buffer,"{{hoo} }"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{{ [1]}}"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 0, "size wrong\n"); - ok( 0 == strcmp(buffer,""), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{{[1] }}"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 0, "size wrong\n"); - ok( 0 == strcmp(buffer,""), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{{a}{b}{c }{ d}{any text}}"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 0, "size wrong\n"); - ok( 0 == strcmp(buffer,""), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{{a} }"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 6, "size wrong\n"); - ok( 0 == strcmp(buffer,"{{a} }"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{{a} {b}}"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 0, "size wrong\n"); - ok( 0 == strcmp(buffer,""), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - todo_wine { - r = MsiRecordSetString(hrec, 0, "{{a} b}}"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 0, "size wrong\n"); - ok( 0 == strcmp(buffer,""), "wrong output\n"); - } - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{{a b}}"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 0, "size wrong\n"); - ok( 0 == strcmp(buffer,""), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{ }"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 3, "size wrong\n"); - ok( 0 == strcmp(buffer,"{ }"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, " {{a}}}"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 2, "size wrong\n"); - ok( 0 == strcmp(buffer," }"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - todo_wine { - r = MsiRecordSetString(hrec, 0, "{{ almost {{ any }} text }}"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 8, "size wrong\n"); - ok( 0 == strcmp(buffer," text }}"), "wrong output\n"); - } - ok( r == ERROR_SUCCESS, "format failed\n"); - - todo_wine { - r = MsiRecordSetString(hrec, 0, "{{ } { hidden ][ [ }}"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 0, "size wrong\n"); - ok( 0 == strcmp(buffer,""), "wrong output\n"); - } - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "[ 1]"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 4, "size wrong\n"); - ok( 0 == strcmp(buffer,"[ 1]"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "[01]"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 3, "size wrong\n"); - ok( 0 == strcmp(buffer,"hoo"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - todo_wine { - r = MsiRecordSetString(hrec, 0, "{{test}} [01"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 4, "size wrong\n"); - ok( 0 == strcmp(buffer," [01"), "wrong output\n"); - } - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "[\\[]"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 4, "size wrong\n"); - ok( 0 == strcmp(buffer,"[\\[]"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - MsiRecordSetString(hrec, 0, "[\\[]"); - MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof(buffer); - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 4, "Expected 4, got %d\n", sz); - ok(!lstrcmpA(buffer, "[\\[]"), "Expected \"[\\[]\", got \"%s\"\n", buffer); - - r = MsiRecordSetString(hrec, 0, "[foo]"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 5, "size wrong\n"); - ok( 0 == strcmp(buffer,"[foo]"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "[01.]"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 5, "size wrong\n"); - ok( 0 == strcmp(buffer,"[01.]"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - SetEnvironmentVariable("FOO", "BAR"); - r = MsiRecordSetString(hrec, 0, "[%FOO]"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 6, "size wrong\n"); - ok( 0 == strcmp(buffer,"[%FOO]"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{{[1]}"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 6, "size wrong\n"); - ok( 0 == strcmp(buffer,"{{hoo}"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{{ {[1]}"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 8, "size wrong\n"); - ok( 0 == strcmp(buffer,"{{ {hoo}"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{{ {[1]}"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 8, "size wrong\n"); - ok( 0 == strcmp(buffer,"{{ {hoo}"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{{ {{[1]}"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 9, "size wrong\n"); - ok( 0 == strcmp(buffer,"{{ {{hoo}"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "[1]}"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 4, "size wrong\n"); - ok( 0 == strcmp(buffer,"hoo}"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{{ {{a}"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 7, "size wrong\n"); - ok( 0 == strcmp(buffer,"{{ {{a}"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{{ {{a}"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 7, "size wrong\n"); - ok( 0 == strcmp(buffer,"{{ {{a}"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "0{1{2{3{4[1]5}6}7}8}9"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - todo_wine - { - ok( sz == 19, "size wrong\n"); - ok( 0 == strcmp(buffer,"01{2{3{4hoo56}7}8}9"), "wrong output\n"); - } - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "0{1{2[1]3}4"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - todo_wine - { - ok( sz == 9, "size wrong\n"); - ok( 0 == strcmp(buffer,"01{2hoo34"), "wrong output\n"); - } - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "0{1{2[1]3}4"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - todo_wine - { - ok( sz == 9, "size wrong\n"); - ok( 0 == strcmp(buffer,"01{2hoo34"), "wrong output\n"); - } - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{[1.} [1]"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 9, "size wrong\n"); - todo_wine - { - ok( 0 == strcmp(buffer,"{[1.} hoo"), "wrong output\n"); - } - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{[{[1]}]}"); - r = MsiRecordSetString(hrec, 1, "2"); - r = MsiRecordSetString(hrec, 2, "foo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - todo_wine - { - ok( sz == 9, "size wrong\n"); - ok( 0 == strcmp(buffer,"{[{[1]}]}"), "wrong output\n"); - } - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{[1][}"); - r = MsiRecordSetString(hrec, 1, "2"); - r = MsiRecordSetString(hrec, 2, "foo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - todo_wine - { - ok( sz == 2, "size wrong\n"); - ok( 0 == strcmp(buffer,"2["), "wrong output\n"); - } - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "[1]"); - r = MsiRecordSetString(hrec, 1, "[2]"); - r = MsiRecordSetString(hrec, 2, "foo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 3, "size wrong\n"); - ok( 0 == strcmp(buffer,"[2]"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "[{{boo}}1]"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 3, "size wrong\n"); - todo_wine - { - ok( 0 == strcmp(buffer,"[1]"), "wrong output: %s\n", buffer); - } - - r = MsiRecordSetString(hrec, 0, "[{{boo}}1]"); - r = MsiRecordSetString(hrec, 0, "[1{{boo}}]"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 3, "size wrong\n"); - ok( 0 == strcmp(buffer,"[1]"), "wrong output\n"); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{[1]{{boo} }}"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - todo_wine - { - ok( sz == 11, "size wrong\n"); - ok( 0 == strcmp(buffer,"hoo{{boo }}"), "wrong output\n"); - } - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{[1{{boo}}]}"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - todo_wine - { - ok( sz == 12, "size wrong: got %u, expected 12\n", sz); - ok( 0 == strcmp(buffer,"{[1{{boo}}]}"), "wrong output: got %s, expected [1]\n", buffer); - } - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{{[1]}"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 6, "size wrong: got %u, expected 3\n", sz); - ok( 0 == strcmp(buffer,"{{hoo}"), "wrong output: got %s, expected [1]\n", buffer); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{[1{{bo}o}}]}"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 13, "size wrong\n"); - ok( 0 == strcmp(buffer,"{[1{{bo}o}}]}"), "wrong output %s\n",buffer); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{[1{{b{o}o}}]}"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - todo_wine - { - ok( sz == 14, "size wrong\n"); - ok( 0 == strcmp(buffer,"{[1{{b{o}o}}]}"), "wrong output %s\n",buffer); - } - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{ {[1]}"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - todo_wine - { - ok( sz == 5, "size wrong\n"); - ok( 0 == strcmp(buffer," {hoo"), "wrong output %s\n",buffer); - } - ok( r == ERROR_SUCCESS, "format failed\n"); - - /* {} inside a substitution does strange things... */ - r = MsiRecordSetString(hrec, 0, "[[1]{}]"); - r = MsiRecordSetString(hrec, 1, "2"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - todo_wine - { - ok( sz == 5, "size wrong\n"); - ok( 0 == strcmp(buffer,"[[1]]"), "wrong output %s\n",buffer); - } - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "[[1]{}[1]]"); - r = MsiRecordSetString(hrec, 1, "2"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - todo_wine - { - ok( sz == 6, "size wrong\n"); - ok( 0 == strcmp(buffer,"[[1]2]"), "wrong output %s\n",buffer); - } - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "[a[1]b[1]c{}d[1]e]"); - r = MsiRecordSetString(hrec, 1, "2"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - todo_wine - { - ok( sz == 14, "size wrong\n"); - ok( 0 == strcmp(buffer,"[a[1]b[1]cd2e]"), "wrong output %s\n",buffer); - } - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "[a[1]b"); - r = MsiRecordSetString(hrec, 1, "2"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 6, "size wrong\n"); - ok( 0 == strcmp(buffer,"[a[1]b"), "wrong output %s\n",buffer); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "a[1]b]"); - r = MsiRecordSetString(hrec, 1, "2"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 4, "size wrong\n"); - ok( 0 == strcmp(buffer,"a2b]"), "wrong output %s\n",buffer); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "]a[1]b"); - r = MsiRecordSetString(hrec, 1, "2"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 4, "size wrong\n"); - ok( 0 == strcmp(buffer,"]a2b"), "wrong output %s\n",buffer); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "]a[1]b"); - r = MsiRecordSetString(hrec, 1, "2"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 4, "size wrong\n"); - ok( 0 == strcmp(buffer,"]a2b"), "wrong output %s\n",buffer); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "\\[1]"); - r = MsiRecordSetString(hrec, 1, "2"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 2, "size wrong\n"); - ok( 0 == strcmp(buffer,"\\2"), "wrong output %s\n",buffer); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "\\{[1]}"); - r = MsiRecordSetString(hrec, 1, "2"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 2, "size wrong\n"); - ok( 0 == strcmp(buffer,"\\2"), "wrong output %s\n",buffer); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "a{b[1]c}d"); - r = MsiRecordSetString(hrec, 1, NULL); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 2, "size wrong\n"); - ok( 0 == strcmp(buffer,"ad"), "wrong output %s\n",buffer); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{a[0]b}"); - r = MsiRecordSetString(hrec, 1, "foo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 9, "size wrong\n"); - ok( 0 == strcmp(buffer,"a{a[0]b}b"), "wrong output %s\n",buffer); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "[foo]"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( sz == 5, "size wrong\n"); - ok( 0 == strcmp(buffer,"[foo]"), "wrong output %s\n",buffer); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "{[1][-1][1]}"); - r = MsiRecordSetString(hrec, 1, "foo"); - sz = sizeof buffer; - r = MsiFormatRecord(0, hrec, buffer, &sz); - todo_wine - { - ok( sz == 12, "size wrong\n"); - ok( 0 == strcmp(buffer,"{foo[-1]foo}"), "wrong output %s\n",buffer); - } - ok( r == ERROR_SUCCESS, "format failed\n"); - - /* nested braces */ - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{abcd}"); - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 6, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"{abcd}"), "wrong output (%s)\n",buffer); - - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{a[one]bc[two]de[one]f}"); - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 23, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"{a[one]bc[two]de[one]f}"), "wrong output (%s)\n",buffer); - - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{a[one]bc[bad]de[two]f}"); - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 23, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"{a[one]bc[bad]de[two]f}"), "wrong output (%s)\n",buffer); - - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{[bad]}"); - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 7, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"{[bad]}"), "wrong output (%s)\n",buffer); - - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{abc{d[one]ef}"); /* missing final brace */ - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 14, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"{abc{d[one]ef}"), "wrong output (%s)\n",buffer); - - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{abc{d[one]ef}}"); - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 15, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"{abc{d[one]ef}}"), "wrong output (%s)\n",buffer); - - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{abc}{{def}hi{j[one]k}}"); - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 5, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"{abc}"), "wrong output (%s)\n",buffer); - - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{{def}hi{j[one]k}}"); - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 0, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer); - - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{{def}hi{jk}}"); - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 0, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer); - - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{{{def}}hi{jk}}"); - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - todo_wine - { - ok( sz == 7, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"hi{jk}}"), "wrong output (%s)\n",buffer); - } - - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{{def}hi{{jk}}}"); - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - todo_wine - { - ok( sz == 1, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"}"), "wrong output (%s)\n",buffer); - } - - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{{def}{jk}}"); - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 0, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer); - - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{{def}}"); - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 0, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer); - - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{a{b}c}"); - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 7, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"{a{b}c}"), "wrong output (%s)\n",buffer); - - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{a{b}}"); - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 6, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"{a{b}}"), "wrong output (%s)\n",buffer); - - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{{b}c}"); - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 6, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"{{b}c}"), "wrong output (%s)\n",buffer); - - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{{{{}}}}"); - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - todo_wine - { - ok( sz == 2, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"}}"), "wrong output (%s)\n",buffer); - } - - sz = sizeof buffer; - MsiRecordSetInteger(hrec, 1, 100); - MsiRecordSetInteger(hrec, 2, -100); - MsiRecordSetString(hrec, 0, "[1] [2]"); - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 8, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"100 -100"), "wrong output (%s)\n",buffer); - - sz = sizeof(buffer); - MsiRecordSetString(hrec, 0, "[1] {[noprop] [twoprop]} {abcdef}"); - MsiRecordSetString(hrec, 1, "one"); - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 33, "Expected 33, got %d\n",sz); - ok(!lstrcmpA(buffer, "one {[noprop] [twoprop]} {abcdef}"), - "Expected \"one {[noprop] [twoprop]} {abcdef}\", got \"%s\"\n", buffer); - - sz = sizeof(buffer); - MsiRecordSetString(hrec, 0, "[1] {[noprop] [one]} {abcdef}"); - MsiRecordSetString(hrec, 1, "one"); - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 29, "Expected 29, got %d\n",sz); - ok(!lstrcmpA(buffer, "one {[noprop] [one]} {abcdef}"), - "Expected \"one {[noprop] [one]} {abcdef}\", got \"%s\"\n", buffer); - - sz = sizeof(buffer); - MsiRecordSetString(hrec, 0, "[1] {[one]} {abcdef}"); - MsiRecordSetString(hrec, 1, "one"); - r = MsiFormatRecord(0, hrec, buffer, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 20, "Expected 20, got %d\n",sz); - ok(!lstrcmpA(buffer, "one {[one]} {abcdef}"), - "Expected \"one {[one]} {abcdef}\", got \"%s\"\n", buffer); - - MsiCloseHandle( hrec ); -} - -static void test_formatrecord_package(void) -{ - char buffer[100]; - MSIHANDLE hrec; - MSIHANDLE package; - UINT r; - DWORD sz=100; - - package = helper_createpackage( msifile ); - ok(package!=0, "Unable to create package\n"); - - hrec = MsiCreateRecord(12); - ok( hrec, "failed to create record\n"); - - r = MsiFormatRecord(package, 0, NULL, NULL ); - ok( r == ERROR_INVALID_HANDLE, "wrong error\n"); - - r = MsiFormatRecord(package, hrec, NULL, NULL ); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec,0,NULL); - r = MsiRecordSetString(hrec,1,NULL); - r = MsiRecordSetString(hrec,2,NULL); - r = MsiRecordSetString(hrec,3,NULL); - r = MsiRecordSetString(hrec,4,NULL); - r = MsiRecordSetString(hrec,5,NULL); - r = MsiRecordSetString(hrec,6,NULL); - r = MsiRecordSetString(hrec,7,NULL); - r = MsiRecordSetString(hrec,8,NULL); - r = MsiRecordSetString(hrec,9,NULL); - r = MsiRecordSetString(hrec,10,NULL); - r = MsiRecordSetString(hrec,11,NULL); - r = MsiRecordSetString(hrec,12,NULL); - ok( r == ERROR_SUCCESS, "set string failed\n"); - - sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed with empty buffer (%i)\n",r); - ok( sz == 51, "size wrong (%i)\n",sz); - ok( 0 == strcmp(buffer,"1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: "), "wrong output(%s)\n",buffer); - - r = MsiSetProperty(package, "prop", "val"); - ok( r == ERROR_SUCCESS, "failed to set propertY: %d\n", r); - - r = MsiRecordSetString(hrec, 0, NULL); - r = MsiRecordSetString(hrec, 1, "[2]"); - r = MsiRecordSetString(hrec, 2, "stuff"); - r = MsiRecordSetString(hrec, 3, "prop"); - r = MsiRecordSetString(hrec, 4, "[prop]"); - r = MsiRecordSetString(hrec, 5, "[noprop]"); - sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed with empty buffer (%i)\n",r); - todo_wine - { - ok( sz == 66, "size wrong (%i)\n",sz); - ok( !lstrcmpA(buffer, - "1: [2] 2: stuff 3: prop 4: val 5: 6: 7: 8: 9: 10: 11: 12: "), - "wrong output(%s)\n",buffer); - } - - /* now put play games with escaping */ - r = MsiRecordSetString(hrec, 0, "[1] [2] [\\3asdf]"); - r = MsiRecordSetString(hrec, 1, "boo"); - r = MsiRecordSetString(hrec, 2, "hoo"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 9, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"boo hoo 3"), "wrong output (%s)\n",buffer); - - r = MsiRecordSetString(hrec, 0, "[1] [2] [\\x]"); - r = MsiRecordSetString(hrec, 1, "boo"); - r = MsiRecordSetString(hrec, 2, "hoo"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 9, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"boo hoo x"), "wrong output (%s)\n",buffer); - - MsiRecordSetString(hrec, 0, "[\\x]"); - sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 1, "size wrong: %d\n", sz); - ok( 0 == strcmp(buffer,"x"), "wrong output: %s\n", buffer); - - MsiRecordSetString(hrec, 0, "{\\x}"); - sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 4, "size wrong: %d\n", sz); - ok( 0 == strcmp(buffer,"{\\x}"), "wrong output: %s\n", buffer); - - MsiRecordSetString(hrec, 0, "[abc\\x]"); - sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 0, "size wrong: %d\n", sz); - ok( 0 == strcmp(buffer,""), "wrong output: %s\n", buffer); - - MsiRecordSetString(hrec, 0, "[abc\\xdef]"); - sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 0, "size wrong: %d\n", sz); - ok( 0 == strcmp(buffer,""), "wrong output: %s\n", buffer); - - MsiRecordSetString(hrec, 0, "\\x"); - sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 2, "Expected 2, got %d\n", sz); - ok(!lstrcmpA(buffer, "\\x"), "Expected \"\\x\", got \"%s\"\n", buffer); - - MsiRecordSetString(hrec, 0, "[\\["); - sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 3, "Expected 3, got %d\n", sz); - ok(!lstrcmpA(buffer, "[\\["), "Expected \"[\\[\", got \"%s\"\n", buffer); - - MsiRecordSetString(hrec, 0, "[\\[]"); - sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 1, "Expected 1, got %d\n", sz); - ok(!lstrcmpA(buffer, "["), "Expected \"[\", got \"%s\"\n", buffer); - - MsiRecordSetString(hrec, 0, "[[]"); - sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 3, "Expected 3, got %d\n", sz); - ok(!lstrcmpA(buffer, "[[]"), "Expected \"[]\", got \"%s\"\n", buffer); - - MsiRecordSetString(hrec, 0, "[\\[]]"); - sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 2, "Expected 2, got %d\n", sz); - ok(!lstrcmpA(buffer, "[]"), "Expected \"[]\", got \"%s\"\n", buffer); - - MsiRecordSetString(hrec, 0, "[\\[a]"); - sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 1, "Expected 1, got %d\n", sz); - ok(!lstrcmpA(buffer, "["), "Expected \"[\", got \"%s\"\n", buffer); - - MsiRecordSetString(hrec, 0, "[\\a[]"); - sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - todo_wine - { - ok(sz == 1, "Expected 1, got %d\n", sz); - ok(!lstrcmpA(buffer, "a"), "Expected \"a\", got \"%s\"\n", buffer); - } - - MsiRecordSetString(hrec, 0, "[prop]"); - sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 3, "Expected 3, got %d\n", sz); - ok(!lstrcmpA(buffer, "val"), "Expected \"val\", got \"%s\"\n", buffer); - - MsiRecordSetString(hrec, 0, "[prop] [pro\\pblah] [prop]"); - sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 8, "Expected 8, got %d\n", sz); - ok(!lstrcmpA(buffer, "val val"), "Expected \"val val\", got \"%s\"\n", buffer); - - MsiSetPropertyA(package, "b", "ball"); - MsiRecordSetString(hrec, 0, "[\\b]"); - sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 1, "Expected 1, got %d\n", sz); - ok(!lstrcmpA(buffer, "b"), "Expected \"b\", got \"%s\"\n", buffer); - - MsiRecordSetString(hrec, 0, "[\\c]"); - sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 1, "Expected 1, got %d\n", sz); - ok(!lstrcmpA(buffer, "c"), "Expected \"c\", got \"%s\"\n", buffer); - - MsiRecordSetString(hrec, 0, "[\\[]prop]"); - sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 6, "Expected 6, got %d\n", sz); - ok(!lstrcmpA(buffer, "[prop]"), "Expected \"[prop]\", got \"%s\"\n", buffer); - - MsiRecordSetString(hrec, 0, "[\\a]prop]"); - sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 6, "Expected 6, got %d\n", sz); - ok(!lstrcmpA(buffer, "aprop]"), "Expected \"aprop]\", got \"%s\"\n", buffer); - - MsiRecordSetString(hrec, 0, "[\\[]Bracket Text[\\]]"); - sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 14, "size wrong: %d\n", sz); - ok( 0 == strcmp(buffer,"[Bracket Text]"), "wrong output: %s\n", buffer); - - /* null characters */ - r = MsiRecordSetString(hrec, 0, "[1] [~] [2]"); - r = MsiRecordSetString(hrec, 1, "boo"); - r = MsiRecordSetString(hrec, 2, "hoo"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 9, "size wrong: %d\n", sz); - ok( 0 == strcmp(buffer,"boo "), "wrong output: %s\n", buffer); - ok(!lstrcmpA(&buffer[5], " hoo"), - "Expected \" hoo\", got \"%s\"\n", &buffer[5]); - - MsiRecordSetString(hrec, 0, "[1] [~abc] [2]"); - MsiRecordSetString(hrec, 1, "boo"); - MsiRecordSetString(hrec, 2, "hoo"); - sz = sizeof(buffer); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 8, "Expected 8, got %d\n", sz); - ok(!lstrcmpA(buffer, "boo hoo"), "Expected \"boo hoo\", got \"%s\"\n", buffer); - - /* properties */ - r = MsiSetProperty(package,"dummy","Bork"); - ok( r == ERROR_SUCCESS, "set property failed\n"); - r = MsiRecordSetString(hrec, 0, "[1] [dummy] [2]"); - r = MsiRecordSetString(hrec, 1, "boo"); - r = MsiRecordSetString(hrec, 2, "hoo"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 12, "size wrong\n"); - ok( 0 == strcmp(buffer,"boo Bork hoo"), "wrong output\n"); - - r = MsiRecordSetString(hrec, 0, "[1] [invalid] [2]"); - r = MsiRecordSetString(hrec, 1, "boo"); - r = MsiRecordSetString(hrec, 2, "hoo"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 8, "size wrong\n"); - ok( 0 == strcmp(buffer,"boo hoo"), "wrong output\n"); - - /* nesting tests */ - r = MsiSetProperty(package,"dummya","foo"); - r = MsiSetProperty(package,"dummyb","baa"); - r = MsiSetProperty(package,"adummyc","whoa"); - ok( r == ERROR_SUCCESS, "set property failed\n"); - r = MsiRecordSetString(hrec, 0, "[dummy[1]] [dummy[2]] [[1]dummy[3]]"); - r = MsiRecordSetString(hrec, 1, "a"); - r = MsiRecordSetString(hrec, 2, "b"); - r = MsiRecordSetString(hrec, 3, "c"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 12, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"foo baa whoa"), "wrong output (%s)\n",buffer); - - r = MsiSetProperty(package,"dummya","1"); - r = MsiSetProperty(package,"dummyb","[2]"); - ok( r == ERROR_SUCCESS, "set property failed\n"); - r = MsiRecordSetString(hrec, 0, "[dummya] [[dummya]] [dummyb]"); - r = MsiRecordSetString(hrec, 1, "aaa"); - r = MsiRecordSetString(hrec, 2, "bbb"); - r = MsiRecordSetString(hrec, 3, "ccc"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - todo_wine - { - ok( sz == 9, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"1 [1] [2]"), "wrong output (%s)\n",buffer); - } - - r = MsiSetProperty(package,"dummya","1"); - r = MsiSetProperty(package,"dummyb","a"); - r = MsiSetProperty(package,"dummyc","\\blath"); - r = MsiSetProperty(package,"dummyd","[\\blath]"); - ok( r == ERROR_SUCCESS, "set property failed\n"); - r = MsiRecordSetString(hrec, 0, "[dummyc] [[dummyc]] [dummy[dummyb]]"); - r = MsiRecordSetString(hrec, 1, "aaa"); - r = MsiRecordSetString(hrec, 2, "bbb"); - r = MsiRecordSetString(hrec, 3, "ccc"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 10, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"\\blath b 1"), "wrong output (%s)\n",buffer); - - r = MsiRecordSetString(hrec, 0, "[1] [2] [[\\3asdf]]"); - r = MsiRecordSetString(hrec, 1, "boo"); - r = MsiRecordSetString(hrec, 2, "hoo"); - r = MsiRecordSetString(hrec, 3, "yeah"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - todo_wine - { - ok( sz == 11, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"boo hoo [3]"), "wrong output (%s)\n",buffer); - } - - r = MsiRecordSetString(hrec, 0, "[1] [2] [[3]]"); - r = MsiRecordSetString(hrec, 1, "boo"); - r = MsiRecordSetString(hrec, 2, "hoo"); - r = MsiRecordSetString(hrec, 3, "\\help"); - ok( r == ERROR_SUCCESS, "set string failed\n"); - sz = sizeof buffer; - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 9, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"boo hoo h"), "wrong output (%s)\n",buffer); - - /* nested properties */ - MsiSetProperty(package, "PropA", "surprise"); - MsiSetProperty(package, "PropB", "[PropA]"); - MsiSetProperty(package, "PropC", "[PropB]"); - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "[PropC]"); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 7, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"[PropB]"), "wrong output (%s)\n",buffer); - - MsiSetProperty(package, "PropA", "surprise"); - MsiSetProperty(package, "PropB", "PropA"); - MsiSetProperty(package, "PropC", "PropB"); - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "[PropC]"); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 5, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"PropB"), "wrong output (%s)\n",buffer); - - MsiSetProperty(package, "PropA", "surprise"); - MsiSetProperty(package, "PropB", "[PropA]"); - MsiSetProperty(package, "PropC", "[PropB]"); - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "[[PropC]]"); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 0, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer); - - MsiSetProperty(package, "PropA", "surprise"); - MsiSetProperty(package, "PropB", "[PropA]"); - MsiSetProperty(package, "PropC", "PropB"); - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "[[PropC]]"); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 7, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"[PropA]"), "wrong output (%s)\n",buffer); - - MsiSetProperty(package, "PropA", "surprise"); - MsiSetProperty(package, "PropB", "PropA"); - MsiSetProperty(package, "PropC", "PropB"); - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "[[PropC]]"); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 5, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"PropA"), "wrong output (%s)\n",buffer); - - MsiSetProperty(package, "PropA", "surprise"); - MsiSetProperty(package, "PropB", "PropA"); - MsiSetProperty(package, "PropC", "PropB"); - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "[[[PropC]]]"); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 8, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"surprise"), "wrong output (%s)\n",buffer); - - /* properties inside braces */ - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{abcd}"); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 6, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"{abcd}"), "wrong output (%s)\n",buffer); - - MsiSetProperty(package, "one", "mercury"); - MsiSetProperty(package, "two", "venus"); - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{a[one]bc[two]de[one]f}"); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed: %d\n", r); - ok( sz == 25, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"amercurybcvenusdemercuryf"), "wrong output (%s)\n",buffer); - - MsiSetProperty(package, "one", "mercury"); - MsiSetProperty(package, "two", "venus"); - MsiSetProperty(package, "bad", ""); - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{a[one]bc[bad]de[two]f}"); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 0, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer); - - MsiSetProperty(package, "bad", ""); - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{[bad]}"); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 0, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer); - - MsiSetProperty(package, "one", "mercury"); - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{abc{d[one]ef}"); /* missing final brace */ - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - todo_wine - { - ok( sz == 14, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"abc{dmercuryef"), "wrong output (%s)\n",buffer); - } - - MsiSetProperty(package, "one", "mercury"); - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{abc{d[one]ef}}"); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - todo_wine - { - ok( sz == 15, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"abc{dmercuryef}"), "wrong output (%s)\n",buffer); - } - - MsiSetProperty(package, "one", "mercury"); - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{abc}{{def}hi{j[one]k}}"); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 5, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,"{abc}"), "wrong output (%s)\n",buffer); - - MsiSetProperty(package, "one", "mercury"); - - sz = sizeof buffer; - MsiRecordSetString(hrec, 0, "{{def}hi{j[one]k}}"); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok( r == ERROR_SUCCESS, "format failed\n"); - ok( sz == 0, "size wrong(%i)\n",sz); - ok( 0 == strcmp(buffer,""), "wrong output (%s)\n",buffer); - - sz = sizeof(buffer); - MsiRecordSetString(hrec, 0, "[1] {[noprop] [twoprop]} {abcdef}"); - MsiRecordSetString(hrec, 1, "one"); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 13, "Expected 13, got %d\n",sz); - ok(!lstrcmpA(buffer, "one {abcdef}"), - "Expected \"one {abcdef}\", got \"%s\"\n", buffer); - - sz = sizeof(buffer); - MsiRecordSetString(hrec, 0, "[1] {[noprop] [one]} {abcdef}"); - MsiRecordSetString(hrec, 1, "one"); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 13, "Expected 13, got %d\n",sz); - ok(!lstrcmpA(buffer, "one {abcdef}"), - "Expected \"one {abcdef}\", got \"%s\"\n", buffer); - - sz = sizeof(buffer); - MsiRecordSetString(hrec, 0, "[1] {[one]} {abcdef}"); - MsiRecordSetString(hrec, 1, "one"); - r = MsiFormatRecord(package, hrec, buffer, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 20, "Expected 20, got %d\n",sz); - ok(!lstrcmpA(buffer, "one mercury {abcdef}"), - "Expected \"one mercury {abcdef}\", got \"%s\"\n", buffer); - - MsiCloseHandle(hrec); - - r = MsiCloseHandle(package); - ok(r==ERROR_SUCCESS, "Unable to close package\n"); - - DeleteFile( msifile ); -} - -static void test_formatrecord_tables(void) -{ - MSIHANDLE hdb, hpkg, hrec; - CHAR buf[MAX_PATH]; - CHAR curr_dir[MAX_PATH]; - CHAR expected[MAX_PATH]; - CHAR root[MAX_PATH]; - DWORD size; - UINT r; - - GetCurrentDirectory( MAX_PATH, curr_dir ); - - hdb = create_package_db(); - ok ( hdb, "failed to create package database\n"); - - r = add_directory_entry( hdb, "'TARGETDIR', '', 'SourceDir'" ); - ok( r == ERROR_SUCCESS, "cannot add directory: %d\n", r); - - r = add_directory_entry( hdb, "'ReallyLongDir', 'TARGETDIR', " - "'I am a really long directory'" ); - ok( r == ERROR_SUCCESS, "cannot add directory: %d\n", r); - - r = create_feature_table( hdb ); - ok( r == ERROR_SUCCESS, "cannot create Feature table: %d\n", r); - - r = add_feature_entry( hdb, "'occipitofrontalis', '', '', '', 2, 1, '', 0" ); - ok( r == ERROR_SUCCESS, "cannot add feature: %d\n", r ); - - r = create_component_table( hdb ); - ok( r == ERROR_SUCCESS, "cannot create Component table: %d\n", r); - - r = add_component_entry( hdb, "'frontal', '', 'TARGETDIR', 0, '', 'frontal_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r); - - r = add_component_entry( hdb, "'parietal', '', 'TARGETDIR', 1, '', 'parietal_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r); - - r = add_component_entry( hdb, "'temporal', '', 'ReallyLongDir', 0, '', 'temporal_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r); - - r = create_feature_components_table( hdb ); - ok( r == ERROR_SUCCESS, "cannot create FeatureComponents table: %d\n", r); - - r = add_feature_components_entry( hdb, "'occipitofrontalis', 'frontal'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r); - - r = add_feature_components_entry( hdb, "'occipitofrontalis', 'parietal'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r); - - r = add_feature_components_entry( hdb, "'occipitofrontalis', 'temporal'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r); - - r = create_file_table( hdb ); - ok( r == ERROR_SUCCESS, "cannot create File table: %d\n", r); - - r = add_file_entry( hdb, "'frontal_file', 'frontal', 'frontal.txt', 0, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'parietal_file', 'parietal', 'parietal.txt', 0, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'temporal_file', 'temporal', 'temporal.txt', 0, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = create_custom_action_table( hdb ); - ok( r == ERROR_SUCCESS, "cannot create CustomAction table: %d\n", r); - - r = add_custom_action_entry( hdb, "'MyCustom', 51, 'prop', '[!temporal_file]'" ); - ok( r == ERROR_SUCCESS, "cannt add custom action: %d\n", r); - - r = add_custom_action_entry( hdb, "'EscapeIt1', 51, 'prop', '[\\[]Bracket Text[\\]]'" ); - ok( r == ERROR_SUCCESS, "cannt add custom action: %d\n", r); - - r = add_custom_action_entry( hdb, "'EscapeIt2', 51, 'prop', '[\\xabcd]'" ); - ok( r == ERROR_SUCCESS, "cannt add custom action: %d\n", r); - - r = add_custom_action_entry( hdb, "'EscapeIt3', 51, 'prop', '[abcd\\xefgh]'" ); - ok( r == ERROR_SUCCESS, "cannt add custom action: %d\n", r); - - hpkg = package_from_db( hdb ); - ok( hpkg, "failed to create package\n"); - - MsiCloseHandle( hdb ); - - r = MsiSetPropertyA( hpkg, "imaprop", "ringer" ); - ok( r == ERROR_SUCCESS, "cannot set property: %d\n", r); - - hrec = MsiCreateRecord( 1 ); - - /* property doesn't exist */ - size = MAX_PATH; - /*MsiRecordSetString( hrec, 0, "[1]" ); */ - MsiRecordSetString( hrec, 1, "[idontexist]" ); - r = MsiFormatRecord( hpkg, hrec, buf, &size ); - ok( r == ERROR_SUCCESS, "format record failed: %d\n", r); - ok( !lstrcmp( buf, "1: " ), "Expected '1: ', got %s\n", buf ); - - /* property exists */ - size = MAX_PATH; - MsiRecordSetString( hrec, 1, "[imaprop]" ); - r = MsiFormatRecord( hpkg, hrec, buf, &size ); - ok( r == ERROR_SUCCESS, "format record failed: %d\n", r); - ok( !lstrcmp( buf, "1: ringer " ), "Expected '1: ringer ', got %s\n", buf ); - - /* environment variable doesn't exist */ - size = MAX_PATH; - MsiRecordSetString( hrec, 1, "[%idontexist]" ); - r = MsiFormatRecord( hpkg, hrec, buf, &size ); - ok( r == ERROR_SUCCESS, "format record failed: %d\n", r); - ok( !lstrcmp( buf, "1: " ), "Expected '1: ', got %s\n", buf ); - - /* environment variable exists */ - size = MAX_PATH; - SetEnvironmentVariable( "crazyvar", "crazyval" ); - MsiRecordSetString( hrec, 1, "[%crazyvar]" ); - r = MsiFormatRecord( hpkg, hrec, buf, &size ); - ok( r == ERROR_SUCCESS, "format record failed: %d\n", r); - ok( !lstrcmp( buf, "1: crazyval " ), "Expected '1: crazyval ', got %s\n", buf ); - - /* file key before CostInitialize */ - size = MAX_PATH; - MsiRecordSetString( hrec, 1, "[#frontal_file]" ); - r = MsiFormatRecord( hpkg, hrec, buf, &size ); - ok( r == ERROR_SUCCESS, "format record failed: %d\n", r); - ok( !lstrcmp( buf, "1: " ), "Expected '1: ', got %s\n", buf ); - - r = MsiDoAction(hpkg, "CostInitialize"); - ok( r == ERROR_SUCCESS, "CostInitialize failed: %d\n", r); - - r = MsiDoAction(hpkg, "FileCost"); - ok( r == ERROR_SUCCESS, "FileCost failed: %d\n", r); - - r = MsiDoAction(hpkg, "CostFinalize"); - ok( r == ERROR_SUCCESS, "CostFinalize failed: %d\n", r); - - size = MAX_PATH; - MsiGetProperty( hpkg, "ROOTDRIVE", root, &size ); - - sprintf( expected, "1: %sfrontal.txt ", root); - - /* frontal full file key */ - size = MAX_PATH; - MsiRecordSetString( hrec, 1, "[#frontal_file]" ); - r = MsiFormatRecord( hpkg, hrec, buf, &size ); - ok( r == ERROR_SUCCESS, "format record failed: %d\n", r); - ok( !lstrcmp( buf, expected ), "Expected \"%s\", got \"%s\"\n", expected, buf); - - /* frontal short file key */ - size = MAX_PATH; - MsiRecordSetString( hrec, 1, "[!frontal_file]" ); - r = MsiFormatRecord( hpkg, hrec, buf, &size ); - ok( r == ERROR_SUCCESS, "format record failed: %d\n", r); - ok( !lstrcmp( buf, expected ), "Expected \"%s\", got \"%s\"\n", expected, buf); - - sprintf( expected, "1: %sI am a really long directory\\temporal.txt ", root); - - /* temporal full file key */ - size = MAX_PATH; - MsiRecordSetString( hrec, 1, "[#temporal_file]" ); - r = MsiFormatRecord( hpkg, hrec, buf, &size ); - ok( r == ERROR_SUCCESS, "format record failed: %d\n", r); - ok( !lstrcmp( buf, expected ), "Expected \"%s\", got \"%s\"\n", expected, buf); - - /* temporal short file key */ - size = MAX_PATH; - MsiRecordSetString( hrec, 1, "[!temporal_file]" ); - r = MsiFormatRecord( hpkg, hrec, buf, &size ); - ok( r == ERROR_SUCCESS, "format record failed: %d\n", r); - ok( !lstrcmp( buf, expected ), "Expected \"%s\", got \"%s\"\n", expected, buf); - - /* custom action 51, files don't exist */ - r = MsiDoAction( hpkg, "MyCustom" ); - ok( r == ERROR_SUCCESS, "MyCustom failed: %d\n", r); - - sprintf( expected, "%sI am a really long directory\\temporal.txt", root); - - size = MAX_PATH; - r = MsiGetProperty( hpkg, "prop", buf, &size ); - ok( r == ERROR_SUCCESS, "get property failed: %d\n", r); - ok( !lstrcmp( buf, expected ), "Expected \"%s\", got \"%s\"\n", expected, buf); - - sprintf( buf, "%sI am a really long directory", root ); - CreateDirectory( buf, NULL ); - - lstrcat( buf, "\\temporal.txt" ); - create_test_file( buf ); - - /* custom action 51, files exist */ - r = MsiDoAction( hpkg, "MyCustom" ); - ok( r == ERROR_SUCCESS, "MyCustom failed: %d\n", r); - - size = MAX_PATH; - r = MsiGetProperty( hpkg, "prop", buf, &size ); - ok( r == ERROR_SUCCESS, "get property failed: %d\n", r); - todo_wine - { - ok( !lstrcmp( buf, expected ), "Expected \"%s\", got \"%s\"\n", expected, buf); - } - - /* custom action 51, escaped text 1 */ - r = MsiDoAction( hpkg, "EscapeIt1" ); - ok( r == ERROR_SUCCESS, "EscapeIt failed: %d\n", r); - - size = MAX_PATH; - r = MsiGetProperty( hpkg, "prop", buf, &size ); - ok( r == ERROR_SUCCESS, "get property failed: %d\n", r); - ok( !lstrcmp( buf, "[Bracket Text]" ), "Expected '[Bracket Text]', got %s\n", buf); - - /* custom action 51, escaped text 2 */ - r = MsiDoAction( hpkg, "EscapeIt2" ); - ok( r == ERROR_SUCCESS, "EscapeIt failed: %d\n", r); - - size = MAX_PATH; - r = MsiGetProperty( hpkg, "prop", buf, &size ); - ok( r == ERROR_SUCCESS, "get property failed: %d\n", r); - ok( !lstrcmp( buf, "x" ), "Expected 'x', got %s\n", buf); - - /* custom action 51, escaped text 3 */ - r = MsiDoAction( hpkg, "EscapeIt3" ); - ok( r == ERROR_SUCCESS, "EscapeIt failed: %d\n", r); - - size = MAX_PATH; - r = MsiGetProperty( hpkg, "prop", buf, &size ); - ok( r == ERROR_SUCCESS, "get property failed: %d\n", r); - ok( !lstrcmp( buf, "" ), "Expected '', got %s\n", buf); - - sprintf( expected, "1: %sI am a really long directory\\ ", root); - - /* component with INSTALLSTATE_LOCAL */ - size = MAX_PATH; - MsiRecordSetString( hrec, 1, "[$temporal]" ); - r = MsiFormatRecord( hpkg, hrec, buf, &size ); - ok( r == ERROR_SUCCESS, "format record failed: %d\n", r); - ok( !lstrcmp( buf, expected ), "Expected \"%s\", got \"%s\"\n", expected, buf); - - r = MsiSetComponentState( hpkg, "temporal", INSTALLSTATE_SOURCE ); - ok( r == ERROR_SUCCESS, "failed to set install state: %d\n", r); - - /* component with INSTALLSTATE_SOURCE */ - lstrcpy( expected, "1: " ); - lstrcat( expected, curr_dir ); - if (strlen(curr_dir) > 3) - lstrcat( expected, "\\" ); - lstrcat( expected, " " ); - size = MAX_PATH; - MsiRecordSetString( hrec, 1, "[$parietal]" ); - r = MsiFormatRecord( hpkg, hrec, buf, &size ); - ok( r == ERROR_SUCCESS, "format record failed: %d\n", r); - ok( !lstrcmp( buf, expected ), "Expected '%s', got '%s'\n", expected, buf); - - sprintf( buf, "%sI am a really long directory\\temporal.txt", root ); - DeleteFile( buf ); - - sprintf( buf, "%sI am a really long directory", root ); - RemoveDirectory( buf ); - - MsiCloseHandle( hrec ); - MsiCloseHandle( hpkg ); - DeleteFile( msifile ); -} - -static void test_processmessage(void) -{ - MSIHANDLE hrec; - MSIHANDLE package; - int r; - - package = helper_createpackage( msifile ); - ok(package!=0, "Unable to create package\n"); - - hrec = MsiCreateRecord(3); - ok( hrec, "failed to create record\n"); - - r = MsiRecordSetString(hrec, 1, ""); - ok( r == ERROR_SUCCESS, "set string failed\n"); - - r = MsiProcessMessage(package, INSTALLMESSAGE_ACTIONSTART, hrec); - ok( r == IDOK, "expected IDOK, got %i\n", r); - - MsiCloseHandle(hrec); - MsiCloseHandle(package); - - DeleteFile(msifile); -} - -START_TEST(format) -{ - test_createpackage(); - test_formatrecord(); - test_formatrecord_package(); - test_formatrecord_tables(); - test_processmessage(); -} diff --git a/rostests/winetests/msi/install.c b/rostests/winetests/msi/install.c deleted file mode 100644 index 365c8a68184..00000000000 --- a/rostests/winetests/msi/install.c +++ /dev/null @@ -1,9630 +0,0 @@ -/* - * Copyright (C) 2006 James Hawkins - * - * A test program for installing MSI products. - * - * 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 _WIN32_MSI 300 -#define COBJMACROS - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "wine/test.h" - -static UINT (WINAPI *pMsiQueryComponentStateA) - (LPCSTR, LPCSTR, MSIINSTALLCONTEXT, LPCSTR, INSTALLSTATE*); -static UINT (WINAPI *pMsiSetExternalUIRecord) - (INSTALLUI_HANDLER_RECORD, DWORD, LPVOID, PINSTALLUI_HANDLER_RECORD); -static UINT (WINAPI *pMsiSourceListEnumSourcesA) - (LPCSTR, LPCSTR, MSIINSTALLCONTEXT, DWORD, DWORD, LPSTR, LPDWORD); -static UINT (WINAPI *pMsiSourceListGetInfoA) - (LPCSTR, LPCSTR, MSIINSTALLCONTEXT, DWORD, LPCSTR, LPSTR, LPDWORD); - -static BOOL (WINAPI *pConvertSidToStringSidA)(PSID, LPSTR*); - -static HMODULE hsrclient = 0; -static BOOL (WINAPI *pSRRemoveRestorePoint)(DWORD); -static BOOL (WINAPI *pSRSetRestorePointA)(RESTOREPOINTINFOA*, STATEMGRSTATUS*); - -static BOOL on_win9x = FALSE; - -static const char *msifile = "msitest.msi"; -static const char *msifile2 = "winetest2.msi"; -static const char *mstfile = "winetest.mst"; -static CHAR CURR_DIR[MAX_PATH]; -static CHAR PROG_FILES_DIR[MAX_PATH]; -static CHAR COMMON_FILES_DIR[MAX_PATH]; -static CHAR APP_DATA_DIR[MAX_PATH]; -static CHAR WINDOWS_DIR[MAX_PATH]; - -/* msi database data */ - -static const CHAR component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "Five\t{8CC92E9D-14B2-4CA4-B2AA-B11D02078087}\tNEWDIR\t2\t\tfive.txt\n" - "Four\t{FD37B4EA-7209-45C0-8917-535F35A2F080}\tCABOUTDIR\t2\t\tfour.txt\n" - "One\t{783B242E-E185-4A56-AF86-C09815EC053C}\tMSITESTDIR\t2\tNOT REINSTALL\tone.txt\n" - "Three\t{010B6ADD-B27D-4EDD-9B3D-34C4F7D61684}\tCHANGEDDIR\t2\t\tthree.txt\n" - "Two\t{BF03D1A6-20DA-4A65-82F3-6CAC995915CE}\tFIRSTDIR\t2\t\ttwo.txt\n" - "dangler\t{6091DF25-EF96-45F1-B8E9-A9B1420C7A3C}\tTARGETDIR\t4\t\tregdata\n" - "component\t\tMSITESTDIR\t0\t1\tfile\n" - "service_comp\t\tMSITESTDIR\t0\t1\tservice_file"; - -static const CHAR directory_dat[] = "Directory\tDirectory_Parent\tDefaultDir\n" - "s72\tS72\tl255\n" - "Directory\tDirectory\n" - "CABOUTDIR\tMSITESTDIR\tcabout\n" - "CHANGEDDIR\tMSITESTDIR\tchanged:second\n" - "FIRSTDIR\tMSITESTDIR\tfirst\n" - "MSITESTDIR\tProgramFilesFolder\tmsitest\n" - "NEWDIR\tCABOUTDIR\tnew\n" - "ProgramFilesFolder\tTARGETDIR\t.\n" - "TARGETDIR\t\tSourceDir"; - -static const CHAR feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" - "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" - "Feature\tFeature\n" - "Five\t\tFive\tThe Five Feature\t5\t3\tNEWDIR\t0\n" - "Four\t\tFour\tThe Four Feature\t4\t3\tCABOUTDIR\t0\n" - "One\t\tOne\tThe One Feature\t1\t3\tMSITESTDIR\t0\n" - "Three\t\tThree\tThe Three Feature\t3\t3\tCHANGEDDIR\t0\n" - "Two\t\tTwo\tThe Two Feature\t2\t3\tFIRSTDIR\t0\n" - "feature\t\t\t\t2\t1\tTARGETDIR\t0\n" - "service_feature\t\t\t\t2\t1\tTARGETDIR\t0"; - -static const CHAR feature_comp_dat[] = "Feature_\tComponent_\n" - "s38\ts72\n" - "FeatureComponents\tFeature_\tComponent_\n" - "Five\tFive\n" - "Four\tFour\n" - "One\tOne\n" - "Three\tThree\n" - "Two\tTwo\n" - "feature\tcomponent\n" - "service_feature\tservice_comp\n"; - -static const CHAR file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "five.txt\tFive\tfive.txt\t1000\t\t\t16384\t5\n" - "four.txt\tFour\tfour.txt\t1000\t\t\t16384\t4\n" - "one.txt\tOne\tone.txt\t1000\t\t\t0\t1\n" - "three.txt\tThree\tthree.txt\t1000\t\t\t0\t3\n" - "two.txt\tTwo\ttwo.txt\t1000\t\t\t0\t2\n" - "file\tcomponent\tfilename\t100\t\t\t8192\t1\n" - "service_file\tservice_comp\tservice.exe\t100\t\t\t8192\t1"; - -static const CHAR install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "AllocateRegistrySpace\tNOT Installed\t1550\n" - "CostFinalize\t\t1000\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "ResolveSource\t\t950\n" - "MoveFiles\t\t1700\n" - "InstallFiles\t\t4000\n" - "DuplicateFiles\t\t4500\n" - "WriteEnvironmentStrings\t\t4550\n" - "CreateShortcuts\t\t4600\n" - "InstallServices\t\t5000\n" - "InstallFinalize\t\t6600\n" - "InstallInitialize\t\t1500\n" - "InstallValidate\t\t1400\n" - "LaunchConditions\t\t100\n" - "WriteRegistryValues\tSourceDir And SOURCEDIR\t5000"; - -static const CHAR media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n" - "i2\ti4\tL64\tS255\tS32\tS72\n" - "Media\tDiskId\n" - "1\t3\t\t\tDISK1\t\n" - "2\t5\t\tmsitest.cab\tDISK2\t\n"; - -static const CHAR property_dat[] = "Property\tValue\n" - "s72\tl0\n" - "Property\tProperty\n" - "DefaultUIFont\tDlgFont8\n" - "HASUIRUN\t0\n" - "INSTALLLEVEL\t3\n" - "InstallMode\tTypical\n" - "Manufacturer\tWine\n" - "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n" - "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n" - "ProductID\tnone\n" - "ProductLanguage\t1033\n" - "ProductName\tMSITEST\n" - "ProductVersion\t1.1.1\n" - "PROMPTROLLBACKCOST\tP\n" - "Setup\tSetup\n" - "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n" - "AdminProperties\tPOSTADMIN\n" - "ROOTDRIVE\tC:\\\n" - "SERVNAME\tTestService\n" - "SERVDISP\tTestServiceDisp\n"; - -static const CHAR aup_property_dat[] = "Property\tValue\n" - "s72\tl0\n" - "Property\tProperty\n" - "DefaultUIFont\tDlgFont8\n" - "HASUIRUN\t0\n" - "ALLUSERS\t1\n" - "INSTALLLEVEL\t3\n" - "InstallMode\tTypical\n" - "Manufacturer\tWine\n" - "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n" - "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n" - "ProductID\tnone\n" - "ProductLanguage\t1033\n" - "ProductName\tMSITEST\n" - "ProductVersion\t1.1.1\n" - "PROMPTROLLBACKCOST\tP\n" - "Setup\tSetup\n" - "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n" - "AdminProperties\tPOSTADMIN\n" - "ROOTDRIVE\tC:\\\n" - "SERVNAME\tTestService\n" - "SERVDISP\tTestServiceDisp\n"; - -static const CHAR aup2_property_dat[] = "Property\tValue\n" - "s72\tl0\n" - "Property\tProperty\n" - "DefaultUIFont\tDlgFont8\n" - "HASUIRUN\t0\n" - "ALLUSERS\t2\n" - "INSTALLLEVEL\t3\n" - "InstallMode\tTypical\n" - "Manufacturer\tWine\n" - "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n" - "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n" - "ProductID\tnone\n" - "ProductLanguage\t1033\n" - "ProductName\tMSITEST\n" - "ProductVersion\t1.1.1\n" - "PROMPTROLLBACKCOST\tP\n" - "Setup\tSetup\n" - "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n" - "AdminProperties\tPOSTADMIN\n" - "ROOTDRIVE\tC:\\\n" - "SERVNAME\tTestService\n" - "SERVDISP\tTestServiceDisp\n"; - -static const CHAR icon_property_dat[] = "Property\tValue\n" - "s72\tl0\n" - "Property\tProperty\n" - "DefaultUIFont\tDlgFont8\n" - "HASUIRUN\t0\n" - "INSTALLLEVEL\t3\n" - "InstallMode\tTypical\n" - "Manufacturer\tWine\n" - "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n" - "ProductCode\t{7DF88A49-996F-4EC8-A022-BF956F9B2CBB}\n" - "ProductID\tnone\n" - "ProductLanguage\t1033\n" - "ProductName\tMSITEST\n" - "ProductVersion\t1.1.1\n" - "PROMPTROLLBACKCOST\tP\n" - "Setup\tSetup\n" - "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n" - "AdminProperties\tPOSTADMIN\n" - "ROOTDRIVE\tC:\\\n" - "SERVNAME\tTestService\n" - "SERVDISP\tTestServiceDisp\n"; - -static const CHAR shortcut_dat[] = "Shortcut\tDirectory_\tName\tComponent_\tTarget\tArguments\tDescription\tHotkey\tIcon_\tIconIndex\tShowCmd\tWkDir\n" - "s72\ts72\tl128\ts72\ts72\tS255\tL255\tI2\tS72\tI2\tI2\tS72\n" - "Shortcut\tShortcut\n" - "Shortcut\tMSITESTDIR\tShortcut\tcomponent\tShortcut\t\tShortcut\t\t\t\t\t\n"; - -static const CHAR environment_dat[] = "Environment\tName\tValue\tComponent_\n" - "s72\tl255\tL255\ts72\n" - "Environment\tEnvironment\n" - "Var1\t=-MSITESTVAR1\t1\tOne\n" - "Var2\tMSITESTVAR2\t1\tOne\n" - "Var3\t=-MSITESTVAR3\t1\tOne\n" - "Var4\tMSITESTVAR4\t1\tOne\n" - "Var5\t-MSITESTVAR5\t\tOne\n" - "Var6\tMSITESTVAR6\t\tOne\n" - "Var7\t!-MSITESTVAR7\t\tOne\n" - "Var8\t!-*MSITESTVAR8\t\tOne\n" - "Var9\t=-MSITESTVAR9\t\tOne\n" - "Var10\t=MSITESTVAR10\t\tOne\n" - "Var11\t+-MSITESTVAR11\t[~];1\tOne\n" - "Var12\t+-MSITESTVAR11\t[~];2\tOne\n" - "Var13\t+-MSITESTVAR12\t[~];1\tOne\n" - "Var14\t=MSITESTVAR13\t[~];1\tOne\n" - "Var15\t=MSITESTVAR13\t[~];2\tOne\n" - "Var16\t=MSITESTVAR14\t;1;\tOne\n" - "Var17\t=MSITESTVAR15\t;;1;;\tOne\n" - "Var18\t=MSITESTVAR16\t 1 \tOne\n" - "Var19\t+-MSITESTVAR17\t1\tOne\n" - "Var20\t+-MSITESTVAR17\t;;2;;[~]\tOne\n" - "Var21\t+-MSITESTVAR18\t1\tOne\n" - "Var22\t+-MSITESTVAR18\t[~];;2;;\tOne\n" - "Var23\t+-MSITESTVAR19\t1\tOne\n" - "Var24\t+-MSITESTVAR19\t[~]2\tOne\n" - "Var25\t+-MSITESTVAR20\t1\tOne\n" - "Var26\t+-MSITESTVAR20\t2[~]\tOne\n"; - -/* Expected results, starting from MSITESTVAR11 onwards */ -static const CHAR *environment_dat_results[] = {"1;2", /*MSITESTVAR11*/ - "1", /*MSITESTVAR12*/ - "1;2", /*MSITESTVAR13*/ - ";1;", /*MSITESTVAR14*/ - ";;1;;", /*MSITESTVAR15*/ - " 1 ", /*MSITESTVAR16*/ - ";;2;;1", /*MSITESTVAR17*/ - "1;;2;;", /*MSITESTVAR18*/ - "1", /*MSITESTVAR19*/ - "1", /*MSITESTVAR20*/ - NULL}; - -static const CHAR condition_dat[] = "Feature_\tLevel\tCondition\n" - "s38\ti2\tS255\n" - "Condition\tFeature_\tLevel\n" - "One\t4\t1\n"; - -static const CHAR up_property_dat[] = "Property\tValue\n" - "s72\tl0\n" - "Property\tProperty\n" - "DefaultUIFont\tDlgFont8\n" - "HASUIRUN\t0\n" - "INSTALLLEVEL\t3\n" - "InstallMode\tTypical\n" - "Manufacturer\tWine\n" - "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n" - "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n" - "ProductID\tnone\n" - "ProductLanguage\t1033\n" - "ProductName\tMSITEST\n" - "ProductVersion\t1.1.1\n" - "PROMPTROLLBACKCOST\tP\n" - "Setup\tSetup\n" - "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n" - "AdminProperties\tPOSTADMIN\n" - "ROOTDRIVE\tC:\\\n" - "SERVNAME\tTestService\n" - "SERVDISP\tTestServiceDisp\n" - "RemovePreviousVersions\t1\n"; - -static const CHAR up2_property_dat[] = "Property\tValue\n" - "s72\tl0\n" - "Property\tProperty\n" - "DefaultUIFont\tDlgFont8\n" - "HASUIRUN\t0\n" - "INSTALLLEVEL\t3\n" - "InstallMode\tTypical\n" - "Manufacturer\tWine\n" - "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n" - "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n" - "ProductID\tnone\n" - "ProductLanguage\t1033\n" - "ProductName\tMSITEST\n" - "ProductVersion\t1.1.2\n" - "PROMPTROLLBACKCOST\tP\n" - "Setup\tSetup\n" - "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n" - "AdminProperties\tPOSTADMIN\n" - "ROOTDRIVE\tC:\\\n" - "SERVNAME\tTestService\n" - "SERVDISP\tTestServiceDisp\n"; - -static const CHAR up3_property_dat[] = "Property\tValue\n" - "s72\tl0\n" - "Property\tProperty\n" - "DefaultUIFont\tDlgFont8\n" - "HASUIRUN\t0\n" - "INSTALLLEVEL\t3\n" - "InstallMode\tTypical\n" - "Manufacturer\tWine\n" - "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n" - "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n" - "ProductID\tnone\n" - "ProductLanguage\t1033\n" - "ProductName\tMSITEST\n" - "ProductVersion\t1.1.2\n" - "PROMPTROLLBACKCOST\tP\n" - "Setup\tSetup\n" - "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n" - "AdminProperties\tPOSTADMIN\n" - "ROOTDRIVE\tC:\\\n" - "SERVNAME\tTestService\n" - "SERVDISP\tTestServiceDisp\n" - "RemovePreviousVersions\t1\n"; - -static const CHAR registry_dat[] = "Registry\tRoot\tKey\tName\tValue\tComponent_\n" - "s72\ti2\tl255\tL255\tL0\ts72\n" - "Registry\tRegistry\n" - "Apples\t2\tSOFTWARE\\Wine\\msitest\tName\timaname\tOne\n" - "Oranges\t2\tSOFTWARE\\Wine\\msitest\tnumber\t#314\tTwo\n" - "regdata\t2\tSOFTWARE\\Wine\\msitest\tblah\tbad\tdangler\n" - "OrderTest\t2\tSOFTWARE\\Wine\\msitest\tOrderTestName\tOrderTestValue\tcomponent"; - -static const CHAR service_install_dat[] = "ServiceInstall\tName\tDisplayName\tServiceType\tStartType\tErrorControl\t" - "LoadOrderGroup\tDependencies\tStartName\tPassword\tArguments\tComponent_\tDescription\n" - "s72\ts255\tL255\ti4\ti4\ti4\tS255\tS255\tS255\tS255\tS255\ts72\tL255\n" - "ServiceInstall\tServiceInstall\n" - "TestService\t[SERVNAME]\t[SERVDISP]\t2\t3\t0\t\t\tTestService\t\t\tservice_comp\t\t"; - -static const CHAR service_control_dat[] = "ServiceControl\tName\tEvent\tArguments\tWait\tComponent_\n" - "s72\tl255\ti2\tL255\tI2\ts72\n" - "ServiceControl\tServiceControl\n" - "ServiceControl\tTestService\t8\t\t0\tservice_comp"; - -static const CHAR sss_service_control_dat[] = "ServiceControl\tName\tEvent\tArguments\tWait\tComponent_\n" - "s72\tl255\ti2\tL255\tI2\ts72\n" - "ServiceControl\tServiceControl\n" - "ServiceControl\tSpooler\t1\t\t0\tservice_comp"; - -static const CHAR sss_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "CostFinalize\t\t1000\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "ResolveSource\t\t950\n" - "MoveFiles\t\t1700\n" - "InstallFiles\t\t4000\n" - "DuplicateFiles\t\t4500\n" - "WriteEnvironmentStrings\t\t4550\n" - "CreateShortcuts\t\t4600\n" - "StartServices\t\t5000\n" - "DeleteServices\t\t5500\n" - "InstallFinalize\t\t6600\n" - "InstallInitialize\t\t1500\n" - "InstallValidate\t\t1400\n" - "LaunchConditions\t\t100\n"; - -/* tables for test_continuouscabs */ -static const CHAR cc_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "maximus\t\tMSITESTDIR\t0\t1\tmaximus\n" - "augustus\t\tMSITESTDIR\t0\t1\taugustus\n" - "caesar\t\tMSITESTDIR\t0\t1\tcaesar\n"; - -static const CHAR cc2_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "maximus\t\tMSITESTDIR\t0\t1\tmaximus\n" - "augustus\t\tMSITESTDIR\t0\t0\taugustus\n" - "caesar\t\tMSITESTDIR\t0\t1\tcaesar\n"; - -static const CHAR cc_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" - "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" - "Feature\tFeature\n" - "feature\t\t\t\t2\t1\tTARGETDIR\t0"; - -static const CHAR cc_feature_comp_dat[] = "Feature_\tComponent_\n" - "s38\ts72\n" - "FeatureComponents\tFeature_\tComponent_\n" - "feature\tmaximus\n" - "feature\taugustus\n" - "feature\tcaesar"; - -static const CHAR cc_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "maximus\tmaximus\tmaximus\t500\t\t\t16384\t1\n" - "augustus\taugustus\taugustus\t50000\t\t\t16384\t2\n" - "caesar\tcaesar\tcaesar\t500\t\t\t16384\t12"; - -static const CHAR cc2_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "maximus\tmaximus\tmaximus\t500\t\t\t16384\t1\n" - "augustus\taugustus\taugustus\t50000\t\t\t16384\t2\n" - "tiberius\tmaximus\ttiberius\t500\t\t\t16384\t3\n" - "caesar\tcaesar\tcaesar\t500\t\t\t16384\t12"; - -static const CHAR cc_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n" - "i2\ti4\tL64\tS255\tS32\tS72\n" - "Media\tDiskId\n" - "1\t10\t\ttest1.cab\tDISK1\t\n" - "2\t2\t\ttest2.cab\tDISK2\t\n" - "3\t12\t\ttest3.cab\tDISK3\t\n"; - -static const CHAR co_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "maximus\tmaximus\tmaximus\t500\t\t\t16384\t1\n" - "augustus\taugustus\taugustus\t50000\t\t\t16384\t2\n" - "caesar\tcaesar\tcaesar\t500\t\t\t16384\t3"; - -static const CHAR co_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n" - "i2\ti4\tL64\tS255\tS32\tS72\n" - "Media\tDiskId\n" - "1\t10\t\ttest1.cab\tDISK1\t\n" - "2\t2\t\ttest2.cab\tDISK2\t\n" - "3\t3\t\ttest3.cab\tDISK3\t\n"; - -static const CHAR co2_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n" - "i2\ti4\tL64\tS255\tS32\tS72\n" - "Media\tDiskId\n" - "1\t10\t\ttest1.cab\tDISK1\t\n" - "2\t12\t\ttest3.cab\tDISK3\t\n" - "3\t2\t\ttest2.cab\tDISK2\t\n"; - -static const CHAR mm_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "maximus\tmaximus\tmaximus\t500\t\t\t512\t1\n" - "augustus\taugustus\taugustus\t500\t\t\t512\t2\n" - "caesar\tcaesar\tcaesar\t500\t\t\t16384\t3"; - -static const CHAR mm_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n" - "i2\ti4\tL64\tS255\tS32\tS72\n" - "Media\tDiskId\n" - "1\t3\t\ttest1.cab\tDISK1\t\n"; - -static const CHAR ss_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n" - "i2\ti4\tL64\tS255\tS32\tS72\n" - "Media\tDiskId\n" - "1\t2\t\ttest1.cab\tDISK1\t\n" - "2\t2\t\ttest2.cab\tDISK2\t\n" - "3\t12\t\ttest3.cab\tDISK3\t\n"; - -/* tables for test_uiLevelFlags */ -static const CHAR ui_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "maximus\t\tMSITESTDIR\t0\tHASUIRUN=1\tmaximus\n" - "augustus\t\tMSITESTDIR\t0\t1\taugustus\n" - "caesar\t\tMSITESTDIR\t0\t1\tcaesar\n"; - -static const CHAR ui_install_ui_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallUISequence\tAction\n" - "SetUIProperty\t\t5\n" - "ExecuteAction\t\t1100\n"; - -static const CHAR ui_custom_action_dat[] = "Action\tType\tSource\tTarget\tISComments\n" - "s72\ti2\tS64\tS0\tS255\n" - "CustomAction\tAction\n" - "SetUIProperty\t51\tHASUIRUN\t1\t\n"; - -static const CHAR rof_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "maximus\t\tMSITESTDIR\t0\t1\tmaximus\n"; - -static const CHAR rof_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" - "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" - "Feature\tFeature\n" - "feature\t\tFeature\tFeature\t2\t1\tTARGETDIR\t0\n" - "montecristo\t\tFeature\tFeature\t2\t1\tTARGETDIR\t0"; - -static const CHAR rof_feature_comp_dat[] = "Feature_\tComponent_\n" - "s38\ts72\n" - "FeatureComponents\tFeature_\tComponent_\n" - "feature\tmaximus\n" - "montecristo\tmaximus"; - -static const CHAR rof_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "maximus\tmaximus\tmaximus\t500\t\t\t8192\t1"; - -static const CHAR rof_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n" - "i2\ti4\tL64\tS255\tS32\tS72\n" - "Media\tDiskId\n" - "1\t1\t\t\tDISK1\t\n"; - -static const CHAR rofc_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "maximus\tmaximus\tmaximus\t500\t\t\t16384\t1"; - -static const CHAR rofc_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n" - "i2\ti4\tL64\tS255\tS32\tS72\n" - "Media\tDiskId\n" - "1\t1\t\ttest1.cab\tDISK1\t\n"; - -static const CHAR lus2_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n" - "i2\ti4\tL64\tS255\tS32\tS72\n" - "Media\tDiskId\n" - "1\t1\t\t#test1.cab\tDISK1\t\n"; - -static const CHAR sdp_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "AllocateRegistrySpace\tNOT Installed\t1550\n" - "CostFinalize\t\t1000\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "InstallFiles\t\t4000\n" - "InstallFinalize\t\t6600\n" - "InstallInitialize\t\t1500\n" - "InstallValidate\t\t1400\n" - "LaunchConditions\t\t100\n" - "SetDirProperty\t\t950"; - -static const CHAR sdp_custom_action_dat[] = "Action\tType\tSource\tTarget\tISComments\n" - "s72\ti2\tS64\tS0\tS255\n" - "CustomAction\tAction\n" - "SetDirProperty\t51\tMSITESTDIR\t[CommonFilesFolder]msitest\\\t\n"; - -static const CHAR cie_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "maximus\t\tMSITESTDIR\t0\t1\tmaximus\n" - "augustus\t\tMSITESTDIR\t0\t1\taugustus\n" - "caesar\t\tMSITESTDIR\t0\t1\tcaesar\n" - "gaius\t\tMSITESTDIR\t0\t1\tgaius\n"; - -static const CHAR cie_feature_comp_dat[] = "Feature_\tComponent_\n" - "s38\ts72\n" - "FeatureComponents\tFeature_\tComponent_\n" - "feature\tmaximus\n" - "feature\taugustus\n" - "feature\tcaesar\n" - "feature\tgaius"; - -static const CHAR cie_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "maximus\tmaximus\tmaximus\t500\t\t\t16384\t1\n" - "augustus\taugustus\taugustus\t50000\t\t\t16384\t2\n" - "caesar\tcaesar\tcaesar\t500\t\t\t16384\t12\n" - "gaius\tgaius\tgaius\t500\t\t\t8192\t11"; - -static const CHAR cie_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n" - "i2\ti4\tL64\tS255\tS32\tS72\n" - "Media\tDiskId\n" - "1\t1\t\ttest1.cab\tDISK1\t\n" - "2\t2\t\ttest2.cab\tDISK2\t\n" - "3\t12\t\ttest3.cab\tDISK3\t\n"; - -static const CHAR ci_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "CostFinalize\t\t1000\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "InstallFiles\t\t4000\n" - "InstallServices\t\t5000\n" - "InstallFinalize\t\t6600\n" - "InstallInitialize\t\t1500\n" - "RunInstall\t\t1600\n" - "InstallValidate\t\t1400\n" - "LaunchConditions\t\t100"; - -static const CHAR ci_custom_action_dat[] = "Action\tType\tSource\tTarget\tISComments\n" - "s72\ti2\tS64\tS0\tS255\n" - "CustomAction\tAction\n" - "RunInstall\t87\tmsitest\\concurrent.msi\tMYPROP=[UILevel]\t\n"; - -static const CHAR ci_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "maximus\t{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}\tMSITESTDIR\t0\tUILevel=5\tmaximus\n"; - -static const CHAR ci2_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "augustus\t\tMSITESTDIR\t0\tUILevel=3 AND MYPROP=5\taugustus\n"; - -static const CHAR ci2_feature_comp_dat[] = "Feature_\tComponent_\n" - "s38\ts72\n" - "FeatureComponents\tFeature_\tComponent_\n" - "feature\taugustus"; - -static const CHAR ci2_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "augustus\taugustus\taugustus\t500\t\t\t8192\t1"; - -static const CHAR spf_custom_action_dat[] = "Action\tType\tSource\tTarget\tISComments\n" - "s72\ti2\tS64\tS0\tS255\n" - "CustomAction\tAction\n" - "SetFolderProp\t51\tMSITESTDIR\t[ProgramFilesFolder]\\msitest\\added\t\n"; - -static const CHAR spf_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "CostFinalize\t\t1000\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "SetFolderProp\t\t950\n" - "InstallFiles\t\t4000\n" - "InstallServices\t\t5000\n" - "InstallFinalize\t\t6600\n" - "InstallInitialize\t\t1500\n" - "InstallValidate\t\t1400\n" - "LaunchConditions\t\t100"; - -static const CHAR spf_install_ui_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallUISequence\tAction\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "CostFinalize\t\t1000\n" - "ExecuteAction\t\t1100\n"; - -static const CHAR pp_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "ValidateProductID\t\t700\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "CostFinalize\t\t1000\n" - "InstallValidate\t\t1400\n" - "InstallInitialize\t\t1500\n" - "ProcessComponents\tPROCESS_COMPONENTS=1 Or FULL=1\t1600\n" - "UnpublishFeatures\tUNPUBLISH_FEATURES=1 Or FULL=1\t1800\n" - "RemoveFiles\t\t3500\n" - "InstallFiles\t\t4000\n" - "RegisterUser\tREGISTER_USER=1 Or FULL=1\t6000\n" - "RegisterProduct\tREGISTER_PRODUCT=1 Or FULL=1\t6100\n" - "PublishFeatures\tPUBLISH_FEATURES=1 Or FULL=1\t6300\n" - "PublishProduct\tPUBLISH_PRODUCT=1 Or FULL=1\t6400\n" - "InstallFinalize\t\t6600"; - -static const CHAR ppc_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "maximus\t{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}\tMSITESTDIR\t0\tUILevel=5\tmaximus\n" - "augustus\t{5AD3C142-CEF8-490D-B569-784D80670685}\tMSITESTDIR\t1\t\taugustus\n"; - -static const CHAR ppc_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "maximus\tmaximus\tmaximus\t500\t\t\t8192\t1\n" - "augustus\taugustus\taugustus\t500\t\t\t8192\t2"; - -static const CHAR ppc_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n" - "i2\ti4\tL64\tS255\tS32\tS72\n" - "Media\tDiskId\n" - "1\t2\t\t\tDISK1\t\n"; - -static const CHAR ppc_feature_comp_dat[] = "Feature_\tComponent_\n" - "s38\ts72\n" - "FeatureComponents\tFeature_\tComponent_\n" - "feature\tmaximus\n" - "feature\taugustus\n" - "montecristo\tmaximus"; - -static const CHAR tp_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "augustus\t\tMSITESTDIR\t0\tprop=\"val\"\taugustus\n"; - -static const CHAR cwd_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "augustus\t\tMSITESTDIR\t0\t\taugustus\n"; - -static const CHAR adm_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "augustus\t\tMSITESTDIR\t0\tPOSTADMIN=1\taugustus"; - -static const CHAR adm_custom_action_dat[] = "Action\tType\tSource\tTarget\tISComments\n" - "s72\ti2\tS64\tS0\tS255\n" - "CustomAction\tAction\n" - "SetPOSTADMIN\t51\tPOSTADMIN\t1\t\n"; - -static const CHAR adm_admin_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "AdminExecuteSequence\tAction\n" - "CostFinalize\t\t1000\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "SetPOSTADMIN\t\t950\n" - "InstallFiles\t\t4000\n" - "InstallFinalize\t\t6600\n" - "InstallInitialize\t\t1500\n" - "InstallValidate\t\t1400\n" - "LaunchConditions\t\t100"; - -static const CHAR amp_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "augustus\t\tMSITESTDIR\t0\tMYPROP=2718 and MyProp=42\taugustus\n"; - -static const CHAR rem_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "hydrogen\t{C844BD1E-1907-4C00-8BC9-150BD70DF0A1}\tMSITESTDIR\t0\t\thydrogen\n" - "helium\t{5AD3C142-CEF8-490D-B569-784D80670685}\tMSITESTDIR\t1\t\thelium\n" - "lithium\t\tMSITESTDIR\t2\t\tlithium\n"; - -static const CHAR rem_feature_comp_dat[] = "Feature_\tComponent_\n" - "s38\ts72\n" - "FeatureComponents\tFeature_\tComponent_\n" - "feature\thydrogen\n" - "feature\thelium\n" - "feature\tlithium"; - -static const CHAR rem_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "hydrogen\thydrogen\thydrogen\t0\t\t\t8192\t1\n" - "helium\thelium\thelium\t0\t\t\t8192\t1\n" - "lithium\tlithium\tlithium\t0\t\t\t8192\t1"; - -static const CHAR rem_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "ValidateProductID\t\t700\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "CostFinalize\t\t1000\n" - "InstallValidate\t\t1400\n" - "InstallInitialize\t\t1500\n" - "ProcessComponents\t\t1600\n" - "UnpublishFeatures\t\t1800\n" - "RemoveFiles\t\t3500\n" - "InstallFiles\t\t4000\n" - "RegisterProduct\t\t6100\n" - "PublishFeatures\t\t6300\n" - "PublishProduct\t\t6400\n" - "InstallFinalize\t\t6600"; - -static const CHAR rem_remove_files_dat[] = "FileKey\tComponent_\tFileName\tDirProperty\tInstallMode\n" - "s72\ts72\tS255\ts72\tI2\n" - "RemoveFile\tFileKey\n" - "furlong\thydrogen\tfurlong\tMSITESTDIR\t1\n" - "firkin\thelium\tfirkin\tMSITESTDIR\t1\n" - "fortnight\tlithium\tfortnight\tMSITESTDIR\t1\n" - "becquerel\thydrogen\tbecquerel\tMSITESTDIR\t2\n" - "dioptre\thelium\tdioptre\tMSITESTDIR\t2\n" - "attoparsec\tlithium\tattoparsec\tMSITESTDIR\t2\n" - "storeys\thydrogen\tstoreys\tMSITESTDIR\t3\n" - "block\thelium\tblock\tMSITESTDIR\t3\n" - "siriometer\tlithium\tsiriometer\tMSITESTDIR\t3\n" - "nanoacre\thydrogen\t\tCABOUTDIR\t3\n"; - -static const CHAR mov_move_file_dat[] = "FileKey\tComponent_\tSourceName\tDestName\tSourceFolder\tDestFolder\tOptions\n" - "s72\ts72\tS255\tS255\tS72\ts72\ti2\n" - "MoveFile\tFileKey\n" - "abkhazia\taugustus\tnonexistent\tdest\tSourceDir\tMSITESTDIR\t0\n" - "bahamas\taugustus\tnonexistent\tdest\tSourceDir\tMSITESTDIR\t1\n" - "cambodia\taugustus\tcameroon\tcanada\tSourceDir\tMSITESTDIR\t0\n" - "denmark\taugustus\tdjibouti\tdominica\tSourceDir\tMSITESTDIR\t1\n" - "ecuador\taugustus\tegypt\telsalvador\tNotAProp\tMSITESTDIR\t1\n" - "fiji\taugustus\tfinland\tfrance\tSourceDir\tNotAProp\t1\n" - "gabon\taugustus\tgambia\tgeorgia\tSOURCEFULL\tMSITESTDIR\t1\n" - "haiti\taugustus\thonduras\thungary\tSourceDir\tDESTFULL\t1\n" - "iceland\taugustus\tindia\tindonesia\tMSITESTDIR\tMSITESTDIR\t1\n" - "jamaica\taugustus\tjapan\tjordan\tFILEPATHBAD\tMSITESTDIR\t1\n" - "kazakhstan\taugustus\t\tkiribati\tFILEPATHGOOD\tMSITESTDIR\t1\n" - "laos\taugustus\tlatvia\tlebanon\tSourceDir\tMSITESTDIR\t1\n" - "namibia\taugustus\tnauru\tkiribati\tSourceDir\tMSITESTDIR\t1\n" - "pakistan\taugustus\tperu\tsfn|poland\tSourceDir\tMSITESTDIR\t1\n" - "wildcard\taugustus\tapp*\twildcard\tSourceDir\tMSITESTDIR\t1\n" - "single\taugustus\tf?o\tsingle\tSourceDir\tMSITESTDIR\t1\n" - "wildcardnodest\taugustus\tbudd*\t\tSourceDir\tMSITESTDIR\t1\n" - "singlenodest\taugustus\tb?r\t\tSourceDir\tMSITESTDIR\t1\n"; - -static const CHAR mc_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "maximus\t\tMSITESTDIR\t0\t1\tmaximus\n" - "augustus\t\tMSITESTDIR\t0\t1\taugustus\n" - "caesar\t\tMSITESTDIR\t0\t1\tcaesar\n" - "gaius\t\tMSITESTDIR\t0\tGAIUS=1\tgaius\n"; - -static const CHAR mc_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "maximus\tmaximus\tmaximus\t500\t\t\t16384\t1\n" - "augustus\taugustus\taugustus\t500\t\t\t0\t2\n" - "caesar\tcaesar\tcaesar\t500\t\t\t16384\t3\n" - "gaius\tgaius\tgaius\t500\t\t\t16384\t4"; - -static const CHAR mc_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n" - "i2\ti4\tL64\tS255\tS32\tS72\n" - "Media\tDiskId\n" - "1\t1\t\ttest1.cab\tDISK1\t\n" - "2\t2\t\ttest2.cab\tDISK2\t\n" - "3\t3\t\ttest3.cab\tDISK3\t\n" - "4\t4\t\ttest3.cab\tDISK3\t\n"; - -static const CHAR mc_file_hash_dat[] = "File_\tOptions\tHashPart1\tHashPart2\tHashPart3\tHashPart4\n" - "s72\ti2\ti4\ti4\ti4\ti4\n" - "MsiFileHash\tFile_\n" - "caesar\t0\t850433704\t-241429251\t675791761\t-1221108824"; - -static const CHAR df_directory_dat[] = "Directory\tDirectory_Parent\tDefaultDir\n" - "s72\tS72\tl255\n" - "Directory\tDirectory\n" - "THIS\tMSITESTDIR\tthis\n" - "DOESNOT\tTHIS\tdoesnot\n" - "NONEXISTENT\tDOESNOT\texist\n" - "MSITESTDIR\tProgramFilesFolder\tmsitest\n" - "ProgramFilesFolder\tTARGETDIR\t.\n" - "TARGETDIR\t\tSourceDir"; - -static const CHAR df_duplicate_file_dat[] = "FileKey\tComponent_\tFile_\tDestName\tDestFolder\n" - "s72\ts72\ts72\tS255\tS72\n" - "DuplicateFile\tFileKey\n" - "maximus\tmaximus\tmaximus\taugustus\t\n" - "caesar\tmaximus\tmaximus\t\tNONEXISTENT\n" - "augustus\tnosuchcomponent\tmaximus\t\tMSITESTDIR\n"; - -static const CHAR wrv_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "augustus\t\tMSITESTDIR\t0\t\taugustus\n"; - -static const CHAR wrv_registry_dat[] = "Registry\tRoot\tKey\tName\tValue\tComponent_\n" - "s72\ti2\tl255\tL255\tL0\ts72\n" - "Registry\tRegistry\n" - "regdata\t2\tSOFTWARE\\Wine\\msitest\tValue\t[~]one[~]two[~]three\taugustus"; - -static const CHAR ca51_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "augustus\t\tMSITESTDIR\t0\tMYPROP=42\taugustus\n"; - -static const CHAR ca51_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "ValidateProductID\t\t700\n" - "GoodSetProperty\t\t725\n" - "BadSetProperty\t\t750\n" - "CostInitialize\t\t800\n" - "ResolveSource\t\t810\n" - "FileCost\t\t900\n" - "SetSourceDir\tSRCDIR\t910\n" - "CostFinalize\t\t1000\n" - "InstallValidate\t\t1400\n" - "InstallInitialize\t\t1500\n" - "InstallFiles\t\t4000\n" - "InstallFinalize\t\t6600"; - -static const CHAR ca51_custom_action_dat[] = "Action\tType\tSource\tTarget\n" - "s72\ti2\tS64\tS0\n" - "CustomAction\tAction\n" - "GoodSetProperty\t51\tMYPROP\t42\n" - "BadSetProperty\t51\t\tMYPROP\n" - "SetSourceDir\t51\tSourceDir\t[SRCDIR]\n"; - -static const CHAR is_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" - "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" - "Feature\tFeature\n" - "one\t\t\t\t2\t1\t\t0\n" /* favorLocal */ - "two\t\t\t\t2\t1\t\t1\n" /* favorSource */ - "three\t\t\t\t2\t1\t\t4\n" /* favorAdvertise */ - "four\t\t\t\t2\t0\t\t0"; /* disabled */ - -static const CHAR is_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "alpha\t\tMSITESTDIR\t0\t\talpha_file\n" /* favorLocal:Local */ - "beta\t\tMSITESTDIR\t1\t\tbeta_file\n" /* favorLocal:Source */ - "gamma\t\tMSITESTDIR\t2\t\tgamma_file\n" /* favorLocal:Optional */ - "theta\t\tMSITESTDIR\t0\t\ttheta_file\n" /* favorSource:Local */ - "delta\t\tMSITESTDIR\t1\t\tdelta_file\n" /* favorSource:Source */ - "epsilon\t\tMSITESTDIR\t2\t\tepsilon_file\n" /* favorSource:Optional */ - "zeta\t\tMSITESTDIR\t0\t\tzeta_file\n" /* favorAdvertise:Local */ - "iota\t\tMSITESTDIR\t1\t\tiota_file\n" /* favorAdvertise:Source */ - "eta\t\tMSITESTDIR\t2\t\teta_file\n" /* favorAdvertise:Optional */ - "kappa\t\tMSITESTDIR\t0\t\tkappa_file\n" /* disabled:Local */ - "lambda\t\tMSITESTDIR\t1\t\tlambda_file\n" /* disabled:Source */ - "mu\t\tMSITESTDIR\t2\t\tmu_file\n"; /* disabled:Optional */ - -static const CHAR is_feature_comp_dat[] = "Feature_\tComponent_\n" - "s38\ts72\n" - "FeatureComponents\tFeature_\tComponent_\n" - "one\talpha\n" - "one\tbeta\n" - "one\tgamma\n" - "two\ttheta\n" - "two\tdelta\n" - "two\tepsilon\n" - "three\tzeta\n" - "three\tiota\n" - "three\teta\n" - "four\tkappa\n" - "four\tlambda\n" - "four\tmu"; - -static const CHAR is_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "alpha_file\talpha\talpha\t500\t\t\t8192\t1\n" - "beta_file\tbeta\tbeta\t500\t\t\t8291\t2\n" - "gamma_file\tgamma\tgamma\t500\t\t\t8192\t3\n" - "theta_file\ttheta\ttheta\t500\t\t\t8192\t4\n" - "delta_file\tdelta\tdelta\t500\t\t\t8192\t5\n" - "epsilon_file\tepsilon\tepsilon\t500\t\t\t8192\t6\n" - "zeta_file\tzeta\tzeta\t500\t\t\t8192\t7\n" - "iota_file\tiota\tiota\t500\t\t\t8192\t8\n" - "eta_file\teta\teta\t500\t\t\t8192\t9\n" - "kappa_file\tkappa\tkappa\t500\t\t\t8192\t10\n" - "lambda_file\tlambda\tlambda\t500\t\t\t8192\t11\n" - "mu_file\tmu\tmu\t500\t\t\t8192\t12"; - -static const CHAR is_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n" - "i2\ti4\tL64\tS255\tS32\tS72\n" - "Media\tDiskId\n" - "1\t12\t\t\tDISK1\t\n"; - -static const CHAR sp_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "augustus\t\tTWODIR\t0\t\taugustus\n"; - -static const CHAR sp_directory_dat[] = "Directory\tDirectory_Parent\tDefaultDir\n" - "s72\tS72\tl255\n" - "Directory\tDirectory\n" - "TARGETDIR\t\tSourceDir\n" - "ProgramFilesFolder\tTARGETDIR\t.\n" - "MSITESTDIR\tProgramFilesFolder\tmsitest:.\n" - "ONEDIR\tMSITESTDIR\t.:shortone|longone\n" - "TWODIR\tONEDIR\t.:shorttwo|longtwo"; - -static const CHAR mcp_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "hydrogen\t{C844BD1E-1907-4C00-8BC9-150BD70DF0A1}\tMSITESTDIR\t2\t\thydrogen\n" - "helium\t{5AD3C142-CEF8-490D-B569-784D80670685}\tMSITESTDIR\t2\t\thelium\n" - "lithium\t{4AF28FFC-71C7-4307-BDE4-B77C5338F56F}\tMSITESTDIR\t2\tPROPVAR=42\tlithium\n"; - -static const CHAR mcp_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" - "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" - "Feature\tFeature\n" - "hydroxyl\t\thydroxyl\thydroxyl\t2\t1\tTARGETDIR\t0\n" - "heliox\t\theliox\theliox\t2\t5\tTARGETDIR\t0\n" - "lithia\t\tlithia\tlithia\t2\t10\tTARGETDIR\t0"; - -static const CHAR mcp_feature_comp_dat[] = "Feature_\tComponent_\n" - "s38\ts72\n" - "FeatureComponents\tFeature_\tComponent_\n" - "hydroxyl\thydrogen\n" - "heliox\thelium\n" - "lithia\tlithium"; - -static const CHAR mcomp_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "hydrogen\thydrogen\thydrogen\t0\t\t\t8192\t1\n" - "helium\thelium\thelium\t0\t\t\t8192\t1\n" - "lithium\tlithium\tlithium\t0\t\t\t8192\t1\n" - "beryllium\tmissingcomp\tberyllium\t0\t\t\t8192\t1"; - -static const CHAR ai_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "five.txt\tFive\tfive.txt\t1000\t\t\t16384\t5\n" - "four.txt\tFour\tfour.txt\t1000\t\t\t16384\t4\n" - "one.txt\tOne\tone.txt\t1000\t\t\t16384\t1\n" - "three.txt\tThree\tthree.txt\t1000\t\t\t16384\t3\n" - "two.txt\tTwo\ttwo.txt\t1000\t\t\t16384\t2\n" - "file\tcomponent\tfilename\t100\t\t\t8192\t1\n" - "service_file\tservice_comp\tservice.exe\t100\t\t\t8192\t1"; - -static const CHAR ip_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "CostFinalize\t\t1000\n" - "ValidateProductID\t\t700\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "RemoveFiles\t\t3500\n" - "InstallFiles\t\t4000\n" - "RegisterUser\t\t6000\n" - "RegisterProduct\t\t6100\n" - "PublishFeatures\t\t6300\n" - "PublishProduct\t\t6400\n" - "InstallFinalize\t\t6600\n" - "InstallInitialize\t\t1500\n" - "ProcessComponents\t\t1600\n" - "UnpublishFeatures\t\t1800\n" - "InstallValidate\t\t1400\n" - "LaunchConditions\t\t100\n" - "TestInstalledProp\tInstalled AND NOT REMOVE\t950\n"; - -static const CHAR ip_custom_action_dat[] = "Action\tType\tSource\tTarget\tISComments\n" - "s72\ti2\tS64\tS0\tS255\n" - "CustomAction\tAction\n" - "TestInstalledProp\t19\t\tTest failed\t\n"; - -static const CHAR aup_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "CostFinalize\t\t1000\n" - "ValidateProductID\t\t700\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "RemoveFiles\t\t3500\n" - "InstallFiles\t\t4000\n" - "RegisterUser\t\t6000\n" - "RegisterProduct\t\t6100\n" - "PublishFeatures\t\t6300\n" - "PublishProduct\t\t6400\n" - "InstallFinalize\t\t6600\n" - "InstallInitialize\t\t1500\n" - "ProcessComponents\t\t1600\n" - "UnpublishFeatures\t\t1800\n" - "InstallValidate\t\t1400\n" - "LaunchConditions\t\t100\n" - "TestAllUsersProp\tALLUSERS AND NOT REMOVE\t50\n"; - -static const CHAR aup2_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "CostFinalize\t\t1000\n" - "ValidateProductID\t\t700\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "RemoveFiles\t\t3500\n" - "InstallFiles\t\t4000\n" - "RegisterUser\t\t6000\n" - "RegisterProduct\t\t6100\n" - "PublishFeatures\t\t6300\n" - "PublishProduct\t\t6400\n" - "InstallFinalize\t\t6600\n" - "InstallInitialize\t\t1500\n" - "ProcessComponents\t\t1600\n" - "UnpublishFeatures\t\t1800\n" - "InstallValidate\t\t1400\n" - "LaunchConditions\t\t100\n" - "TestAllUsersProp\tALLUSERS=2 AND NOT REMOVE\t50\n"; - -static const CHAR aup3_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "CostFinalize\t\t1000\n" - "ValidateProductID\t\t700\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "RemoveFiles\t\t3500\n" - "InstallFiles\t\t4000\n" - "RegisterUser\t\t6000\n" - "RegisterProduct\t\t6100\n" - "PublishFeatures\t\t6300\n" - "PublishProduct\t\t6400\n" - "InstallFinalize\t\t6600\n" - "InstallInitialize\t\t1500\n" - "ProcessComponents\t\t1600\n" - "UnpublishFeatures\t\t1800\n" - "InstallValidate\t\t1400\n" - "LaunchConditions\t\t100\n" - "TestAllUsersProp\tALLUSERS=1 AND NOT REMOVE\t50\n"; - -static const CHAR aup_custom_action_dat[] = "Action\tType\tSource\tTarget\tISComments\n" - "s72\ti2\tS64\tS0\tS255\n" - "CustomAction\tAction\n" - "TestAllUsersProp\t19\t\tTest failed\t\n"; - -static const CHAR cf_create_folders_dat[] = "Directory_\tComponent_\n" - "s72\ts72\n" - "CreateFolder\tDirectory_\tComponent_\n" - "FIRSTDIR\tOne\n"; - -static const CHAR cf_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "CostFinalize\t\t1000\n" - "ValidateProductID\t\t700\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "RemoveFiles\t\t3500\n" - "CreateFolders\t\t3700\n" - "InstallExecute\t\t3800\n" - "TestCreateFolders\t\t3900\n" - "InstallFiles\t\t4000\n" - "RegisterUser\t\t6000\n" - "RegisterProduct\t\t6100\n" - "PublishFeatures\t\t6300\n" - "PublishProduct\t\t6400\n" - "InstallFinalize\t\t6600\n" - "InstallInitialize\t\t1500\n" - "ProcessComponents\t\t1600\n" - "UnpublishFeatures\t\t1800\n" - "InstallValidate\t\t1400\n" - "LaunchConditions\t\t100\n"; - -static const CHAR cf_custom_action_dat[] = "Action\tType\tSource\tTarget\tISComments\n" - "s72\ti2\tS64\tS0\tS255\n" - "CustomAction\tAction\n" - "TestCreateFolders\t19\t\tHalts installation\t\n"; - -static const CHAR rf_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "CostFinalize\t\t1000\n" - "ValidateProductID\t\t700\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "RemoveFiles\t\t3500\n" - "CreateFolders\t\t3600\n" - "RemoveFolders\t\t3700\n" - "InstallExecute\t\t3800\n" - "TestCreateFolders\t\t3900\n" - "InstallFiles\t\t4000\n" - "RegisterUser\t\t6000\n" - "RegisterProduct\t\t6100\n" - "PublishFeatures\t\t6300\n" - "PublishProduct\t\t6400\n" - "InstallFinalize\t\t6600\n" - "InstallInitialize\t\t1500\n" - "ProcessComponents\t\t1600\n" - "UnpublishFeatures\t\t1800\n" - "InstallValidate\t\t1400\n" - "LaunchConditions\t\t100\n"; - - -static const CHAR sr_selfreg_dat[] = "File_\tCost\n" - "s72\tI2\n" - "SelfReg\tFile_\n" - "one.txt\t1\n"; - -static const CHAR sr_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "CostFinalize\t\t1000\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "ResolveSource\t\t950\n" - "MoveFiles\t\t1700\n" - "SelfUnregModules\t\t3900\n" - "InstallFiles\t\t4000\n" - "DuplicateFiles\t\t4500\n" - "WriteEnvironmentStrings\t\t4550\n" - "CreateShortcuts\t\t4600\n" - "InstallFinalize\t\t6600\n" - "InstallInitialize\t\t1500\n" - "InstallValidate\t\t1400\n" - "LaunchConditions\t\t100\n"; - -static const CHAR font_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n" - "i2\ti4\tL64\tS255\tS32\tS72\n" - "Media\tDiskId\n" - "1\t3\t\t\tDISK1\t\n"; - -static const CHAR font_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "font.ttf\tfonts\tfont.ttf\t1000\t\t\t8192\t1\n"; - -static const CHAR font_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" - "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" - "Feature\tFeature\n" - "fonts\t\t\tfont feature\t1\t2\tMSITESTDIR\t0\n"; - -static const CHAR font_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "fonts\t{F5920ED0-1183-4B8F-9330-86CE56557C05}\tMSITESTDIR\t0\t\tfont.ttf\n"; - -static const CHAR font_feature_comp_dat[] = "Feature_\tComponent_\n" - "s38\ts72\n" - "FeatureComponents\tFeature_\tComponent_\n" - "fonts\tfonts\n"; - -static const CHAR font_dat[] = "File_\tFontTitle\n" - "s72\tS128\n" - "Font\tFile_\n" - "font.ttf\tmsi test font\n"; - -static const CHAR font_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "ValidateProductID\t\t700\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "CostFinalize\t\t1000\n" - "InstallValidate\t\t1400\n" - "InstallInitialize\t\t1500\n" - "ProcessComponents\t\t1600\n" - "UnpublishFeatures\t\t1800\n" - "RemoveFiles\t\t3500\n" - "InstallFiles\t\t4000\n" - "RegisterFonts\t\t4100\n" - "UnregisterFonts\t\t4200\n" - "RegisterUser\t\t6000\n" - "RegisterProduct\t\t6100\n" - "PublishFeatures\t\t6300\n" - "PublishProduct\t\t6400\n" - "InstallFinalize\t\t6600"; - -static const CHAR vp_property_dat[] = "Property\tValue\n" - "s72\tl0\n" - "Property\tProperty\n" - "HASUIRUN\t0\n" - "INSTALLLEVEL\t3\n" - "InstallMode\tTypical\n" - "Manufacturer\tWine\n" - "PIDTemplate\t###-#######\n" - "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n" - "ProductLanguage\t1033\n" - "ProductName\tMSITEST\n" - "ProductVersion\t1.1.1\n" - "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"; - -static const CHAR vp_custom_action_dat[] = "Action\tType\tSource\tTarget\tISComments\n" - "s72\ti2\tS64\tS0\tS255\n" - "CustomAction\tAction\n" - "SetProductID1\t51\tProductID\t1\t\n" - "SetProductID2\t51\tProductID\t2\t\n" - "TestProductID1\t19\t\t\tHalts installation\n" - "TestProductID2\t19\t\t\tHalts installation\n"; - -static const CHAR vp_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "LaunchConditions\t\t100\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "CostFinalize\t\t1000\n" - "InstallValidate\t\t1400\n" - "InstallInitialize\t\t1500\n" - "SetProductID1\tSET_PRODUCT_ID=1\t3000\n" - "SetProductID2\tSET_PRODUCT_ID=2\t3100\n" - "ValidateProductID\t\t3200\n" - "InstallExecute\t\t3300\n" - "TestProductID1\tProductID=1\t3400\n" - "TestProductID2\tProductID=\"123-1234567\"\t3500\n" - "InstallFiles\t\t4000\n" - "InstallFinalize\t\t6000\n"; - -static const CHAR odbc_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "ODBCdriver.dll\todbc\tODBCdriver.dll\t1000\t\t\t8192\t1\n" - "ODBCdriver2.dll\todbc\tODBCdriver2.dll\t1000\t\t\t8192\t2\n" - "ODBCtranslator.dll\todbc\tODBCtranslator.dll\t1000\t\t\t8192\t3\n" - "ODBCtranslator2.dll\todbc\tODBCtranslator2.dll\t1000\t\t\t8192\t4\n" - "ODBCsetup.dll\todbc\tODBCsetup.dll\t1000\t\t\t8192\t5\n"; - -static const CHAR odbc_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" - "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" - "Feature\tFeature\n" - "odbc\t\t\todbc feature\t1\t2\tMSITESTDIR\t0\n"; - -static const CHAR odbc_feature_comp_dat[] = "Feature_\tComponent_\n" - "s38\ts72\n" - "FeatureComponents\tFeature_\tComponent_\n" - "odbc\todbc\n"; - -static const CHAR odbc_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "odbc\t{B6F3E4AE-35D1-4B72-9044-989F03E20A43}\tMSITESTDIR\t0\t\tODBCdriver.dll\n"; - -static const CHAR odbc_driver_dat[] = "Driver\tComponent_\tDescription\tFile_\tFile_Setup\n" - "s72\ts72\ts255\ts72\tS72\n" - "ODBCDriver\tDriver\n" - "ODBC test driver\todbc\tODBC test driver\tODBCdriver.dll\t\n" - "ODBC test driver2\todbc\tODBC test driver2\tODBCdriver2.dll\tODBCsetup.dll\n"; - -static const CHAR odbc_translator_dat[] = "Translator\tComponent_\tDescription\tFile_\tFile_Setup\n" - "s72\ts72\ts255\ts72\tS72\n" - "ODBCTranslator\tTranslator\n" - "ODBC test translator\todbc\tODBC test translator\tODBCtranslator.dll\t\n" - "ODBC test translator2\todbc\tODBC test translator2\tODBCtranslator2.dll\tODBCsetup.dll\n"; - -static const CHAR odbc_datasource_dat[] = "DataSource\tComponent_\tDescription\tDriverDescription\tRegistration\n" - "s72\ts72\ts255\ts255\ti2\n" - "ODBCDataSource\tDataSource\n" - "ODBC data source\todbc\tODBC data source\tODBC driver\t0\n"; - -static const CHAR odbc_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "LaunchConditions\t\t100\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "CostFinalize\t\t1000\n" - "InstallValidate\t\t1400\n" - "InstallInitialize\t\t1500\n" - "ProcessComponents\t\t1600\n" - "InstallODBC\t\t3000\n" - "RemoveODBC\t\t3100\n" - "RemoveFiles\t\t3900\n" - "InstallFiles\t\t4000\n" - "RegisterProduct\t\t5000\n" - "PublishFeatures\t\t5100\n" - "PublishProduct\t\t5200\n" - "InstallFinalize\t\t6000\n"; - -static const CHAR odbc_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n" - "i2\ti4\tL64\tS255\tS32\tS72\n" - "Media\tDiskId\n" - "1\t5\t\t\tDISK1\t\n"; - -static const CHAR tl_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "typelib.dll\ttypelib\ttypelib.dll\t1000\t\t\t8192\t1\n"; - -static const CHAR tl_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" - "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" - "Feature\tFeature\n" - "typelib\t\t\ttypelib feature\t1\t2\tMSITESTDIR\t0\n"; - -static const CHAR tl_feature_comp_dat[] = "Feature_\tComponent_\n" - "s38\ts72\n" - "FeatureComponents\tFeature_\tComponent_\n" - "typelib\ttypelib\n"; - -static const CHAR tl_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "typelib\t{BB4C26FD-89D8-4E49-AF1C-DB4DCB5BF1B0}\tMSITESTDIR\t0\t\ttypelib.dll\n"; - -static const CHAR tl_typelib_dat[] = "LibID\tLanguage\tComponent_\tVersion\tDescription\tDirectory_\tFeature_\tCost\n" - "s38\ti2\ts72\tI4\tL128\tS72\ts38\tI4\n" - "TypeLib\tLibID\tLanguage\tComponent_\n" - "{EAC5166A-9734-4D91-878F-1DD02304C66C}\t0\ttypelib\t1793\t\tMSITESTDIR\ttypelib\t\n"; - -static const CHAR tl_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "LaunchConditions\t\t100\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "CostFinalize\t\t1000\n" - "InstallValidate\t\t1400\n" - "InstallInitialize\t\t1500\n" - "ProcessComponents\t\t1600\n" - "RemoveFiles\t\t1700\n" - "InstallFiles\t\t2000\n" - "RegisterTypeLibraries\tREGISTER_TYPELIB=1\t3000\n" - "UnregisterTypeLibraries\t\t3100\n" - "RegisterProduct\t\t5100\n" - "PublishFeatures\t\t5200\n" - "PublishProduct\t\t5300\n" - "InstallFinalize\t\t6000\n"; - -static const CHAR crs_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "target.txt\tshortcut\ttarget.txt\t1000\t\t\t8192\t1\n"; - -static const CHAR crs_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" - "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" - "Feature\tFeature\n" - "shortcut\t\t\tshortcut feature\t1\t2\tMSITESTDIR\t0\n"; - -static const CHAR crs_feature_comp_dat[] = "Feature_\tComponent_\n" - "s38\ts72\n" - "FeatureComponents\tFeature_\tComponent_\n" - "shortcut\tshortcut\n"; - -static const CHAR crs_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "shortcut\t{5D20E3C6-7206-498F-AC28-87AF2F9AD4CC}\tMSITESTDIR\t0\t\ttarget.txt\n"; - -static const CHAR crs_shortcut_dat[] = "Shortcut\tDirectory_\tName\tComponent_\tTarget\tArguments\tDescription\tHotkey\tIcon_\tIconIndex\tShowCmd\tWkDir\n" - "s72\ts72\tl128\ts72\ts72\tL255\tL255\tI2\tS72\tI2\tI2\tS72\n" - "Shortcut\tShortcut\n" - "shortcut\tMSITESTDIR\tshortcut\tshortcut\t[MSITESTDIR]target.txt\t\t\t\t\t\t\t\n"; - -static const CHAR crs_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "LaunchConditions\t\t100\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "CostFinalize\t\t1000\n" - "InstallValidate\t\t1400\n" - "InstallInitialize\t\t1500\n" - "ProcessComponents\t\t1600\n" - "RemoveFiles\t\t1700\n" - "InstallFiles\t\t2000\n" - "RemoveShortcuts\t\t3000\n" - "CreateShortcuts\t\t3100\n" - "RegisterProduct\t\t5000\n" - "PublishFeatures\t\t5100\n" - "PublishProduct\t\t5200\n" - "InstallFinalize\t\t6000\n"; - -static const CHAR fo_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "override.txt\toverride\toverride.txt\t1000\t\t\t8192\t1\n" - "preselected.txt\tpreselected\tpreselected.txt\t1000\t\t\t8192\t2\n" - "notpreselected.txt\tnotpreselected\tnotpreselected.txt\t1000\t\t\t8192\t3\n"; - -static const CHAR fo_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" - "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" - "Feature\tFeature\n" - "override\t\t\toverride feature\t1\t1\tMSITESTDIR\t0\n" - "preselected\t\t\tpreselected feature\t1\t1\tMSITESTDIR\t0\n" - "notpreselected\t\t\tnotpreselected feature\t1\t1\tMSITESTDIR\t0\n"; - -static const CHAR fo_condition_dat[] = "Feature_\tLevel\tCondition\n" - "s38\ti2\tS255\n" - "Condition\tFeature_\tLevel\n" - "preselected\t0\tPreselected\n" - "notpreselected\t0\tNOT Preselected\n"; - -static const CHAR fo_feature_comp_dat[] = "Feature_\tComponent_\n" - "s38\ts72\n" - "FeatureComponents\tFeature_\tComponent_\n" - "override\toverride\n" - "preselected\tpreselected\n" - "notpreselected\tnotpreselected\n"; - -static const CHAR fo_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "override\t{0A00FB1D-97B0-4B42-ADF0-BB8913416623}\tMSITESTDIR\t0\t\toverride.txt\n" - "preselected\t{44E1DB75-605A-43DD-8CF5-CAB17F1BBD60}\tMSITESTDIR\t0\t\tpreselected.txt\n" - "notpreselected\t{E1647733-5E75-400A-A92E-5E60B4D4EF9F}\tMSITESTDIR\t0\t\tnotpreselected.txt\n"; - -static const CHAR fo_custom_action_dat[] = "Action\tType\tSource\tTarget\tISComments\n" - "s72\ti2\tS64\tS0\tS255\n" - "CustomAction\tAction\n" - "SetPreselected\t51\tPreselected\t1\t\n"; - -static const CHAR fo_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "LaunchConditions\t\t100\n" - "SetPreselected\tpreselect=1\t200\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "CostFinalize\t\t1000\n" - "InstallValidate\t\t1400\n" - "InstallInitialize\t\t1500\n" - "ProcessComponents\t\t1600\n" - "RemoveFiles\t\t1700\n" - "InstallFiles\t\t2000\n" - "RegisterProduct\t\t5000\n" - "PublishFeatures\t\t5100\n" - "PublishProduct\t\t5200\n" - "InstallFinalize\t\t6000\n"; - -static const CHAR pub_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "english.txt\tpublish\tenglish.txt\t1000\t\t\t8192\t1\n"; - -static const CHAR pub_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" - "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" - "Feature\tFeature\n" - "publish\t\t\tpublish feature\t1\t2\tMSITESTDIR\t0\n"; - -static const CHAR pub_feature_comp_dat[] = "Feature_\tComponent_\n" - "s38\ts72\n" - "FeatureComponents\tFeature_\tComponent_\n" - "publish\tpublish\n"; - -static const CHAR pub_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "publish\t{B4EA0ACF-6238-426E-9C6D-7869F0F9C768}\tMSITESTDIR\t0\t\tenglish.txt\n"; - -static const CHAR pub_publish_component_dat[] = "ComponentId\tQualifier\tComponent_\tAppData\tFeature_\n" - "s38\ts255\ts72\tL255\ts38\n" - "PublishComponent\tComponentId\tQualifier\tComponent_\n" - "{92AFCBC0-9CA6-4270-8454-47C5EE2B8FAA}\tenglish.txt\tpublish\t\tpublish\n"; - -static const CHAR pub_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "LaunchConditions\t\t100\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "CostFinalize\t\t1000\n" - "InstallValidate\t\t1400\n" - "InstallInitialize\t\t1500\n" - "ProcessComponents\t\t1600\n" - "RemoveFiles\t\t1700\n" - "InstallFiles\t\t2000\n" - "PublishComponents\t\t3000\n" - "UnpublishComponents\t\t3100\n" - "RegisterProduct\t\t5000\n" - "PublishFeatures\t\t5100\n" - "PublishProduct\t\t5200\n" - "InstallFinalize\t\t6000\n"; - -static const CHAR rd_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "original.txt\tduplicate\toriginal.txt\t1000\t\t\t8192\t1\n" - "original2.txt\tduplicate\toriginal2.txt\t1000\t\t\t8192\t2\n" - "original3.txt\tduplicate2\toriginal3.txt\t1000\t\t\t8192\t3\n"; - -static const CHAR rd_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" - "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" - "Feature\tFeature\n" - "duplicate\t\t\tduplicate feature\t1\t2\tMSITESTDIR\t0\n"; - -static const CHAR rd_feature_comp_dat[] = "Feature_\tComponent_\n" - "s38\ts72\n" - "FeatureComponents\tFeature_\tComponent_\n" - "duplicate\tduplicate\n"; - -static const CHAR rd_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "duplicate\t{EB45D06A-ADFE-44E3-8D41-B7DE150E41AD}\tMSITESTDIR\t0\t\toriginal.txt\n" - "duplicate2\t{B8BA60E0-B2E9-488E-9D0E-E60F25F04F97}\tMSITESTDIR\t0\tDUPLICATE2=1\toriginal3.txt\n"; - -static const CHAR rd_duplicate_file_dat[] = "FileKey\tComponent_\tFile_\tDestName\tDestFolder\n" - "s72\ts72\ts72\tS255\tS72\n" - "DuplicateFile\tFileKey\n" - "duplicate\tduplicate\toriginal.txt\tduplicate.txt\t\n" - "duplicate2\tduplicate\toriginal2.txt\t\tMSITESTDIR\n" - "duplicate3\tduplicate2\toriginal3.txt\tduplicate2.txt\t\n"; - -static const CHAR rd_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "LaunchConditions\t\t100\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "CostFinalize\t\t1000\n" - "InstallValidate\t\t1400\n" - "InstallInitialize\t\t1500\n" - "ProcessComponents\t\t1600\n" - "RemoveDuplicateFiles\t\t1900\n" - "InstallFiles\t\t2000\n" - "DuplicateFiles\t\t2100\n" - "RegisterProduct\t\t5000\n" - "PublishFeatures\t\t5100\n" - "PublishProduct\t\t5200\n" - "InstallFinalize\t\t6000\n"; - -static const CHAR rrv_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "registry.txt\tregistry\tregistry.txt\t1000\t\t\t8192\t1\n"; - -static const CHAR rrv_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" - "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" - "Feature\tFeature\n" - "registry\t\t\tregistry feature\t1\t2\tMSITESTDIR\t0\n"; - -static const CHAR rrv_feature_comp_dat[] = "Feature_\tComponent_\n" - "s38\ts72\n" - "FeatureComponents\tFeature_\tComponent_\n" - "registry\tregistry\n"; - -static const CHAR rrv_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "registry\t{DA97585B-962D-45EB-AD32-DA15E60CA9EE}\tMSITESTDIR\t0\t\tregistry.txt\n"; - -static const CHAR rrv_registry_dat[] = "Registry\tRoot\tKey\tName\tValue\tComponent_\n" - "s72\ti2\tl255\tL255\tL0\ts72\n" - "Registry\tRegistry\n" - "reg1\t2\tSOFTWARE\\Wine\\keyA\t\tA\tregistry\n" - "reg2\t2\tSOFTWARE\\Wine\\keyA\tvalueA\tA\tregistry\n" - "reg3\t2\tSOFTWARE\\Wine\\key1\t-\t\tregistry\n"; - -static const CHAR rrv_remove_registry_dat[] = "RemoveRegistry\tRoot\tKey\tName\tComponent_\n" - "s72\ti2\tl255\tL255\ts72\n" - "RemoveRegistry\tRemoveRegistry\n" - "reg1\t2\tSOFTWARE\\Wine\\keyB\t\tregistry\n" - "reg2\t2\tSOFTWARE\\Wine\\keyB\tValueB\tregistry\n" - "reg3\t2\tSOFTWARE\\Wine\\key2\t-\tregistry\n"; - -static const CHAR rrv_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "LaunchConditions\t\t100\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "CostFinalize\t\t1000\n" - "InstallValidate\t\t1400\n" - "InstallInitialize\t\t1500\n" - "ProcessComponents\t\t1600\n" - "RemoveFiles\t\t1700\n" - "InstallFiles\t\t2000\n" - "RemoveRegistryValues\t\t3000\n" - "RegisterProduct\t\t5000\n" - "PublishFeatures\t\t5100\n" - "PublishProduct\t\t5200\n" - "InstallFinalize\t\t6000\n"; - -static const CHAR frp_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "product.txt\tproduct\tproduct.txt\t1000\t\t\t8192\t1\n"; - -static const CHAR frp_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" - "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" - "Feature\tFeature\n" - "product\t\t\tproduct feature\t1\t2\tMSITESTDIR\t0\n"; - -static const CHAR frp_feature_comp_dat[] = "Feature_\tComponent_\n" - "s38\ts72\n" - "FeatureComponents\tFeature_\tComponent_\n" - "product\tproduct\n"; - -static const CHAR frp_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "product\t{44725EE0-EEA8-40BD-8162-A48224A2FEA1}\tMSITESTDIR\t0\t\tproduct.txt\n"; - -static const CHAR frp_custom_action_dat[] = "Action\tType\tSource\tTarget\tISComments\n" - "s72\ti2\tS64\tS0\tS255\n" - "CustomAction\tAction\n" - "TestProp\t19\t\t\tPROP set\n"; - -static const CHAR frp_upgrade_dat[] = "UpgradeCode\tVersionMin\tVersionMax\tLanguage\tAttributes\tRemove\tActionProperty\n" - "s38\tS20\tS20\tS255\ti4\tS255\ts72\n" - "Upgrade\tUpgradeCode\tVersionMin\tVersionMax\tLanguage\tAttributes\n" - "{4C0EAA15-0264-4E5A-8758-609EF142B92D}\t1.1.1\t2.2.2\t\t768\t\tPROP\n"; - -static const CHAR frp_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "FindRelatedProducts\t\t50\n" - "TestProp\tPROP AND NOT REMOVE\t51\n" - "LaunchConditions\t\t100\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "CostFinalize\t\t1000\n" - "InstallValidate\t\t1400\n" - "InstallInitialize\t\t1500\n" - "ProcessComponents\t\t1600\n" - "RemoveFiles\t\t1700\n" - "InstallFiles\t\t2000\n" - "RegisterProduct\t\t5000\n" - "PublishFeatures\t\t5100\n" - "PublishProduct\t\t5200\n" - "InstallFinalize\t\t6000\n"; - -static const CHAR riv_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "inifile.txt\tinifile\tinifile.txt\t1000\t\t\t8192\t1\n"; - -static const CHAR riv_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" - "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" - "Feature\tFeature\n" - "inifile\t\t\tinifile feature\t1\t2\tMSITESTDIR\t0\n"; - -static const CHAR riv_feature_comp_dat[] = "Feature_\tComponent_\n" - "s38\ts72\n" - "FeatureComponents\tFeature_\tComponent_\n" - "inifile\tinifile\n"; - -static const CHAR riv_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "inifile\t{A0F15705-4F57-4437-88C4-6C8B37ACC6DE}\tMSITESTDIR\t0\t\tinifile.txt\n"; - -static const CHAR riv_ini_file_dat[] = "IniFile\tFileName\tDirProperty\tSection\tKey\tValue\tAction\tComponent_\n" - "s72\tl255\tS72\tl96\tl128\tl255\ti2\ts72\n" - "IniFile\tIniFile\n" - "inifile1\ttest.ini\tMSITESTDIR\tsection1\tkey1\tvalue1\t0\tinifile\n"; - -static const CHAR riv_remove_ini_file_dat[] = "RemoveIniFile\tFileName\tDirProperty\tSection\tKey\tValue\tAction\tComponent_\n" - "s72\tl255\tS72\tl96\tl128\tL255\ti2\ts72\n" - "RemoveIniFile\tRemoveIniFile\n" - "inifile1\ttest.ini\tMSITESTDIR\tsectionA\tkeyA\tvalueA\t2\tinifile\n"; - -static const CHAR riv_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "LaunchConditions\t\t100\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "CostFinalize\t\t1000\n" - "InstallValidate\t\t1400\n" - "InstallInitialize\t\t1500\n" - "ProcessComponents\t\t1600\n" - "RemoveFiles\t\t1700\n" - "InstallFiles\t\t2000\n" - "RemoveIniValues\t\t3000\n" - "RegisterProduct\t\t5000\n" - "PublishFeatures\t\t5100\n" - "PublishProduct\t\t5200\n" - "InstallFinalize\t\t6000\n"; - -static const CHAR res_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "envvar.txt\tenvvar\tenvvar.txt\t1000\t\t\t8192\t1\n"; - -static const CHAR res_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" - "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" - "Feature\tFeature\n" - "envvar\t\t\tenvvar feature\t1\t2\tMSITESTDIR\t0\n"; - -static const CHAR res_feature_comp_dat[] = "Feature_\tComponent_\n" - "s38\ts72\n" - "FeatureComponents\tFeature_\tComponent_\n" - "envvar\tenvvar\n"; - -static const CHAR res_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "envvar\t{45EE9AF4-E5D1-445F-8BB7-B22D4EEBD29E}\tMSITESTDIR\t0\t\tenvvar.txt\n"; - -static const CHAR res_environment_dat[] = "Environment\tName\tValue\tComponent_\n" - "s72\tl255\tL255\ts72\n" - "Environment\tEnvironment\n" - "var1\t=-MSITESTVAR1\t1\tenvvar\n" - "var2\t=+-MSITESTVAR2\t1\tenvvar\n" - "var3\t=MSITESTVAR3\t1\tenvvar\n" - "var4\t=-MSITESTVAR4\t\tenvvar\n" - "var5\t=MSITESTVAR5\t\tenvvar\n"; - -static const CHAR res_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "LaunchConditions\t\t100\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "CostFinalize\t\t1000\n" - "InstallValidate\t\t1400\n" - "InstallInitialize\t\t1500\n" - "ProcessComponents\t\t1600\n" - "RemoveFiles\t\t1700\n" - "InstallFiles\t\t2000\n" - "RemoveEnvironmentStrings\t\t3000\n" - "RegisterProduct\t\t5000\n" - "PublishFeatures\t\t5100\n" - "PublishProduct\t\t5200\n" - "InstallFinalize\t\t6000\n"; - -static const CHAR rci_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "class.txt\tclass\tclass.txt\t1000\t\t\t8192\t1\n"; - -static const CHAR rci_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" - "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" - "Feature\tFeature\n" - "class\t\t\tclass feature\t1\t2\tMSITESTDIR\t0\n"; - -static const CHAR rci_feature_comp_dat[] = "Feature_\tComponent_\n" - "s38\ts72\n" - "FeatureComponents\tFeature_\tComponent_\n" - "class\tclass\n"; - -static const CHAR rci_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "class\t{89A98345-F8A1-422E-A48B-0250B5809F2D}\tMSITESTDIR\t0\t\tclass.txt\n"; - -static const CHAR rci_appid_dat[] = "AppId\tRemoteServerName\tLocalService\tServiceParameters\tDllSurrogate\tActivateAtStorage\tRunAsInteractiveUser\n" - "s38\tS255\tS255\tS255\tS255\tI2\tI2\n" - "AppId\tAppId\n" - "{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}\t\t\t\t\t\t\n"; - -static const CHAR rci_class_dat[] = "CLSID\tContext\tComponent_\tProgId_Default\tDescription\tAppId_\tFileTypeMask\tIcon_\tIconIndex\tDefInprocHandler\tArgument\tFeature_\tAttributes\n" - "s38\ts32\ts72\tS255\tL255\tS38\tS255\tS72\tI2\tS32\tS255\ts38\tI2\n" - "Class\tCLSID\tContext\tComponent_\n" - "{110913E7-86D1-4BF3-9922-BA103FCDDDFA}\tLocalServer\tclass\t\tdescription\t{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}\tmask1;mask2\t\t\t2\t\tclass\t\n"; - -static const CHAR rci_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "LaunchConditions\t\t100\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "CostFinalize\t\t1000\n" - "InstallValidate\t\t1400\n" - "InstallInitialize\t\t1500\n" - "ProcessComponents\t\t1600\n" - "RemoveFiles\t\t1700\n" - "InstallFiles\t\t2000\n" - "UnregisterClassInfo\t\t3000\n" - "RegisterClassInfo\t\t4000\n" - "RegisterProduct\t\t5000\n" - "PublishFeatures\t\t5100\n" - "PublishProduct\t\t5200\n" - "InstallFinalize\t\t6000\n"; - -static const CHAR rei_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "extension.txt\textension\textension.txt\t1000\t\t\t8192\t1\n"; - -static const CHAR rei_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" - "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" - "Feature\tFeature\n" - "extension\t\t\textension feature\t1\t2\tMSITESTDIR\t0\n"; - -static const CHAR rei_feature_comp_dat[] = "Feature_\tComponent_\n" - "s38\ts72\n" - "FeatureComponents\tFeature_\tComponent_\n" - "extension\textension\n"; - -static const CHAR rei_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "extension\t{9A3060D4-60BA-4A82-AB55-9FB148AD013C}\tMSITESTDIR\t0\t\textension.txt\n"; - -static const CHAR rei_extension_dat[] = "Extension\tComponent_\tProgId_\tMIME_\tFeature_\n" - "s255\ts72\tS255\tS64\ts38\n" - "Extension\tExtension\tComponent_\n" - "extension\textension\tProg.Id.1\t\textension\n"; - -static const CHAR rei_verb_dat[] = "Extension_\tVerb\tSequence\tCommand\tArgument\n" - "s255\ts32\tI2\tL255\tL255\n" - "Verb\tExtension_\tVerb\n" - "extension\tOpen\t1\t&Open\t/argument\n"; - -static const CHAR rei_progid_dat[] = "ProgId\tProgId_Parent\tClass_\tDescription\tIcon_\tIconIndex\n" - "s255\tS255\tS38\tL255\tS72\tI2\n" - "ProgId\tProgId\n" - "Prog.Id.1\t\t\tdescription\t\t\n"; - -static const CHAR rei_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "LaunchConditions\t\t100\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "CostFinalize\t\t1000\n" - "InstallValidate\t\t1400\n" - "InstallInitialize\t\t1500\n" - "ProcessComponents\t\t1600\n" - "RemoveFiles\t\t1700\n" - "InstallFiles\t\t2000\n" - "UnregisterExtensionInfo\t\t3000\n" - "RegisterExtensionInfo\t\t4000\n" - "RegisterProduct\t\t5000\n" - "PublishFeatures\t\t5100\n" - "PublishProduct\t\t5200\n" - "InstallFinalize\t\t6000\n"; - -static const CHAR rmi_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "mime.txt\tmime\tmime.txt\t1000\t\t\t8192\t1\n"; - -static const CHAR rmi_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" - "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" - "Feature\tFeature\n" - "mime\t\t\tmime feature\t1\t2\tMSITESTDIR\t0\n"; - -static const CHAR rmi_feature_comp_dat[] = "Feature_\tComponent_\n" - "s38\ts72\n" - "FeatureComponents\tFeature_\tComponent_\n" - "mime\tmime\n"; - -static const CHAR rmi_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "mime\t{A1D630CE-13A7-4882-AFDD-148E2BBAFC6D}\tMSITESTDIR\t0\t\tmime.txt\n"; - -static const CHAR rmi_extension_dat[] = "Extension\tComponent_\tProgId_\tMIME_\tFeature_\n" - "s255\ts72\tS255\tS64\ts38\n" - "Extension\tExtension\tComponent_\n" - "mime\tmime\t\tmime/type\tmime\n"; - -static const CHAR rmi_verb_dat[] = "Extension_\tVerb\tSequence\tCommand\tArgument\n" - "s255\ts32\tI2\tL255\tL255\n" - "Verb\tExtension_\tVerb\n" - "mime\tOpen\t1\t&Open\t/argument\n"; - -static const CHAR rmi_mime_dat[] = "ContentType\tExtension_\tCLSID\n" - "s64\ts255\tS38\n" - "MIME\tContentType\n" - "mime/type\tmime\t\n"; - -static const CHAR rmi_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "LaunchConditions\t\t100\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "CostFinalize\t\t1000\n" - "InstallValidate\t\t1400\n" - "InstallInitialize\t\t1500\n" - "ProcessComponents\t\t1600\n" - "RemoveFiles\t\t1700\n" - "InstallFiles\t\t2000\n" - "UnregisterExtensionInfo\t\t3000\n" - "UnregisterMIMEInfo\t\t3500\n" - "RegisterExtensionInfo\t\t4000\n" - "RegisterMIMEInfo\t\t4500\n" - "RegisterProduct\t\t5000\n" - "PublishFeatures\t\t5100\n" - "PublishProduct\t\t5200\n" - "InstallFinalize\t\t6000\n"; - -typedef struct _msi_table -{ - const CHAR *filename; - const CHAR *data; - int size; -} msi_table; - -#define ADD_TABLE(x) {#x".idt", x##_dat, sizeof(x##_dat)} - -static const msi_table tables[] = -{ - ADD_TABLE(component), - ADD_TABLE(directory), - ADD_TABLE(feature), - ADD_TABLE(feature_comp), - ADD_TABLE(file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(property), - ADD_TABLE(registry), - ADD_TABLE(service_install), - ADD_TABLE(service_control) -}; - -static const msi_table sc_tables[] = -{ - ADD_TABLE(component), - ADD_TABLE(directory), - ADD_TABLE(feature), - ADD_TABLE(feature_comp), - ADD_TABLE(file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(property), - ADD_TABLE(shortcut) -}; - -static const msi_table ps_tables[] = -{ - ADD_TABLE(component), - ADD_TABLE(directory), - ADD_TABLE(feature), - ADD_TABLE(feature_comp), - ADD_TABLE(file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(property), - ADD_TABLE(condition) -}; - -static const msi_table env_tables[] = -{ - ADD_TABLE(component), - ADD_TABLE(directory), - ADD_TABLE(feature), - ADD_TABLE(feature_comp), - ADD_TABLE(file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(property), - ADD_TABLE(environment) -}; - -static const msi_table up_tables[] = -{ - ADD_TABLE(component), - ADD_TABLE(directory), - ADD_TABLE(feature), - ADD_TABLE(feature_comp), - ADD_TABLE(file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(up_property), - ADD_TABLE(registry), - ADD_TABLE(service_install), - ADD_TABLE(service_control) -}; - -static const msi_table up2_tables[] = -{ - ADD_TABLE(component), - ADD_TABLE(directory), - ADD_TABLE(feature), - ADD_TABLE(feature_comp), - ADD_TABLE(file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(up2_property), - ADD_TABLE(registry), - ADD_TABLE(service_install), - ADD_TABLE(service_control) -}; - -static const msi_table up3_tables[] = -{ - ADD_TABLE(component), - ADD_TABLE(directory), - ADD_TABLE(feature), - ADD_TABLE(feature_comp), - ADD_TABLE(file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(up3_property), - ADD_TABLE(registry), - ADD_TABLE(service_install), - ADD_TABLE(service_control) -}; - -static const msi_table up4_tables[] = -{ - ADD_TABLE(component), - ADD_TABLE(directory), - ADD_TABLE(feature), - ADD_TABLE(feature_comp), - ADD_TABLE(file), - ADD_TABLE(pp_install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(property), - ADD_TABLE(registry), - ADD_TABLE(service_install), - ADD_TABLE(service_control) -}; - -static const msi_table up5_tables[] = -{ - ADD_TABLE(component), - ADD_TABLE(directory), - ADD_TABLE(feature), - ADD_TABLE(feature_comp), - ADD_TABLE(file), - ADD_TABLE(pp_install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(up_property), - ADD_TABLE(registry), - ADD_TABLE(service_install), - ADD_TABLE(service_control) -}; - -static const msi_table up6_tables[] = -{ - ADD_TABLE(component), - ADD_TABLE(directory), - ADD_TABLE(feature), - ADD_TABLE(feature_comp), - ADD_TABLE(file), - ADD_TABLE(pp_install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(up2_property), - ADD_TABLE(registry), - ADD_TABLE(service_install), - ADD_TABLE(service_control) -}; - -static const msi_table up7_tables[] = -{ - ADD_TABLE(component), - ADD_TABLE(directory), - ADD_TABLE(feature), - ADD_TABLE(feature_comp), - ADD_TABLE(file), - ADD_TABLE(pp_install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(up3_property), - ADD_TABLE(registry), - ADD_TABLE(service_install), - ADD_TABLE(service_control) -}; - -static const msi_table cc_tables[] = -{ - ADD_TABLE(cc_component), - ADD_TABLE(directory), - ADD_TABLE(cc_feature), - ADD_TABLE(cc_feature_comp), - ADD_TABLE(cc_file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(cc_media), - ADD_TABLE(property), -}; - -static const msi_table cc2_tables[] = -{ - ADD_TABLE(cc2_component), - ADD_TABLE(directory), - ADD_TABLE(cc_feature), - ADD_TABLE(cc_feature_comp), - ADD_TABLE(cc2_file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(cc_media), - ADD_TABLE(property), -}; - -static const msi_table co_tables[] = -{ - ADD_TABLE(cc_component), - ADD_TABLE(directory), - ADD_TABLE(cc_feature), - ADD_TABLE(cc_feature_comp), - ADD_TABLE(co_file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(co_media), - ADD_TABLE(property), -}; - -static const msi_table co2_tables[] = -{ - ADD_TABLE(cc_component), - ADD_TABLE(directory), - ADD_TABLE(cc_feature), - ADD_TABLE(cc_feature_comp), - ADD_TABLE(cc_file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(co2_media), - ADD_TABLE(property), -}; - -static const msi_table mm_tables[] = -{ - ADD_TABLE(cc_component), - ADD_TABLE(directory), - ADD_TABLE(cc_feature), - ADD_TABLE(cc_feature_comp), - ADD_TABLE(mm_file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(mm_media), - ADD_TABLE(property), -}; - -static const msi_table ss_tables[] = -{ - ADD_TABLE(cc_component), - ADD_TABLE(directory), - ADD_TABLE(cc_feature), - ADD_TABLE(cc_feature_comp), - ADD_TABLE(cc_file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(ss_media), - ADD_TABLE(property), -}; - -static const msi_table ui_tables[] = -{ - ADD_TABLE(ui_component), - ADD_TABLE(directory), - ADD_TABLE(cc_feature), - ADD_TABLE(cc_feature_comp), - ADD_TABLE(cc_file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(ui_install_ui_seq), - ADD_TABLE(ui_custom_action), - ADD_TABLE(cc_media), - ADD_TABLE(property), -}; - -static const msi_table rof_tables[] = -{ - ADD_TABLE(rof_component), - ADD_TABLE(directory), - ADD_TABLE(rof_feature), - ADD_TABLE(rof_feature_comp), - ADD_TABLE(rof_file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(rof_media), - ADD_TABLE(property), -}; - -static const msi_table rofc_tables[] = -{ - ADD_TABLE(rof_component), - ADD_TABLE(directory), - ADD_TABLE(rof_feature), - ADD_TABLE(rof_feature_comp), - ADD_TABLE(rofc_file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(rofc_media), - ADD_TABLE(property), -}; - -static const msi_table sdp_tables[] = -{ - ADD_TABLE(rof_component), - ADD_TABLE(directory), - ADD_TABLE(rof_feature), - ADD_TABLE(rof_feature_comp), - ADD_TABLE(rof_file), - ADD_TABLE(sdp_install_exec_seq), - ADD_TABLE(sdp_custom_action), - ADD_TABLE(rof_media), - ADD_TABLE(property), -}; - -static const msi_table cie_tables[] = -{ - ADD_TABLE(cie_component), - ADD_TABLE(directory), - ADD_TABLE(cc_feature), - ADD_TABLE(cie_feature_comp), - ADD_TABLE(cie_file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(cie_media), - ADD_TABLE(property), -}; - -static const msi_table ci_tables[] = -{ - ADD_TABLE(ci_component), - ADD_TABLE(directory), - ADD_TABLE(rof_feature), - ADD_TABLE(rof_feature_comp), - ADD_TABLE(rof_file), - ADD_TABLE(ci_install_exec_seq), - ADD_TABLE(rof_media), - ADD_TABLE(property), - ADD_TABLE(ci_custom_action), -}; - -static const msi_table ci2_tables[] = -{ - ADD_TABLE(ci2_component), - ADD_TABLE(directory), - ADD_TABLE(rof_feature), - ADD_TABLE(ci2_feature_comp), - ADD_TABLE(ci2_file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(rof_media), - ADD_TABLE(property), -}; - -static const msi_table spf_tables[] = -{ - ADD_TABLE(ci_component), - ADD_TABLE(directory), - ADD_TABLE(rof_feature), - ADD_TABLE(rof_feature_comp), - ADD_TABLE(rof_file), - ADD_TABLE(spf_install_exec_seq), - ADD_TABLE(rof_media), - ADD_TABLE(property), - ADD_TABLE(spf_custom_action), - ADD_TABLE(spf_install_ui_seq), -}; - -static const msi_table pp_tables[] = -{ - ADD_TABLE(ci_component), - ADD_TABLE(directory), - ADD_TABLE(rof_feature), - ADD_TABLE(rof_feature_comp), - ADD_TABLE(rof_file), - ADD_TABLE(pp_install_exec_seq), - ADD_TABLE(rof_media), - ADD_TABLE(property), -}; - -static const msi_table ppc_tables[] = -{ - ADD_TABLE(ppc_component), - ADD_TABLE(directory), - ADD_TABLE(rof_feature), - ADD_TABLE(ppc_feature_comp), - ADD_TABLE(ppc_file), - ADD_TABLE(pp_install_exec_seq), - ADD_TABLE(ppc_media), - ADD_TABLE(property), -}; - -static const msi_table lus0_tables[] = -{ - ADD_TABLE(ci_component), - ADD_TABLE(directory), - ADD_TABLE(rof_feature), - ADD_TABLE(rof_feature_comp), - ADD_TABLE(rof_file), - ADD_TABLE(pp_install_exec_seq), - ADD_TABLE(rof_media), - ADD_TABLE(property), -}; - -static const msi_table lus1_tables[] = -{ - ADD_TABLE(ci_component), - ADD_TABLE(directory), - ADD_TABLE(rof_feature), - ADD_TABLE(rof_feature_comp), - ADD_TABLE(rof_file), - ADD_TABLE(pp_install_exec_seq), - ADD_TABLE(rofc_media), - ADD_TABLE(property), -}; - -static const msi_table lus2_tables[] = -{ - ADD_TABLE(ci_component), - ADD_TABLE(directory), - ADD_TABLE(rof_feature), - ADD_TABLE(rof_feature_comp), - ADD_TABLE(rof_file), - ADD_TABLE(pp_install_exec_seq), - ADD_TABLE(lus2_media), - ADD_TABLE(property), -}; - -static const msi_table tp_tables[] = -{ - ADD_TABLE(tp_component), - ADD_TABLE(directory), - ADD_TABLE(rof_feature), - ADD_TABLE(ci2_feature_comp), - ADD_TABLE(ci2_file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(rof_media), - ADD_TABLE(property), -}; - -static const msi_table cwd_tables[] = -{ - ADD_TABLE(cwd_component), - ADD_TABLE(directory), - ADD_TABLE(rof_feature), - ADD_TABLE(ci2_feature_comp), - ADD_TABLE(ci2_file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(rof_media), - ADD_TABLE(property), -}; - -static const msi_table adm_tables[] = -{ - ADD_TABLE(adm_component), - ADD_TABLE(directory), - ADD_TABLE(rof_feature), - ADD_TABLE(ci2_feature_comp), - ADD_TABLE(ci2_file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(rof_media), - ADD_TABLE(property), - ADD_TABLE(adm_custom_action), - ADD_TABLE(adm_admin_exec_seq), -}; - -static const msi_table amp_tables[] = -{ - ADD_TABLE(amp_component), - ADD_TABLE(directory), - ADD_TABLE(rof_feature), - ADD_TABLE(ci2_feature_comp), - ADD_TABLE(ci2_file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(rof_media), - ADD_TABLE(property), -}; - -static const msi_table rem_tables[] = -{ - ADD_TABLE(rem_component), - ADD_TABLE(directory), - ADD_TABLE(rof_feature), - ADD_TABLE(rem_feature_comp), - ADD_TABLE(rem_file), - ADD_TABLE(rem_install_exec_seq), - ADD_TABLE(rof_media), - ADD_TABLE(property), - ADD_TABLE(rem_remove_files), -}; - -static const msi_table mov_tables[] = -{ - ADD_TABLE(cwd_component), - ADD_TABLE(directory), - ADD_TABLE(rof_feature), - ADD_TABLE(ci2_feature_comp), - ADD_TABLE(ci2_file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(rof_media), - ADD_TABLE(property), - ADD_TABLE(mov_move_file), -}; - -static const msi_table mc_tables[] = -{ - ADD_TABLE(mc_component), - ADD_TABLE(directory), - ADD_TABLE(cc_feature), - ADD_TABLE(cie_feature_comp), - ADD_TABLE(mc_file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(mc_media), - ADD_TABLE(property), - ADD_TABLE(mc_file_hash), -}; - -static const msi_table df_tables[] = -{ - ADD_TABLE(rof_component), - ADD_TABLE(df_directory), - ADD_TABLE(rof_feature), - ADD_TABLE(rof_feature_comp), - ADD_TABLE(rof_file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(rof_media), - ADD_TABLE(property), - ADD_TABLE(df_duplicate_file), -}; - -static const msi_table wrv_tables[] = -{ - ADD_TABLE(wrv_component), - ADD_TABLE(directory), - ADD_TABLE(rof_feature), - ADD_TABLE(ci2_feature_comp), - ADD_TABLE(ci2_file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(rof_media), - ADD_TABLE(property), - ADD_TABLE(wrv_registry), -}; - -static const msi_table sf_tables[] = -{ - ADD_TABLE(wrv_component), - ADD_TABLE(directory), - ADD_TABLE(rof_feature), - ADD_TABLE(ci2_feature_comp), - ADD_TABLE(ci2_file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(rof_media), - ADD_TABLE(property), -}; - -static const msi_table ca51_tables[] = -{ - ADD_TABLE(ca51_component), - ADD_TABLE(directory), - ADD_TABLE(rof_feature), - ADD_TABLE(ci2_feature_comp), - ADD_TABLE(ci2_file), - ADD_TABLE(ca51_install_exec_seq), - ADD_TABLE(rof_media), - ADD_TABLE(property), - ADD_TABLE(ca51_custom_action), -}; - -static const msi_table is_tables[] = -{ - ADD_TABLE(is_component), - ADD_TABLE(directory), - ADD_TABLE(is_feature), - ADD_TABLE(is_feature_comp), - ADD_TABLE(is_file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(is_media), - ADD_TABLE(property), -}; - -static const msi_table sp_tables[] = -{ - ADD_TABLE(sp_component), - ADD_TABLE(sp_directory), - ADD_TABLE(rof_feature), - ADD_TABLE(ci2_feature_comp), - ADD_TABLE(ci2_file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(rof_media), - ADD_TABLE(property), -}; - -static const msi_table mcp_tables[] = -{ - ADD_TABLE(mcp_component), - ADD_TABLE(directory), - ADD_TABLE(mcp_feature), - ADD_TABLE(mcp_feature_comp), - ADD_TABLE(rem_file), - ADD_TABLE(rem_install_exec_seq), - ADD_TABLE(rof_media), - ADD_TABLE(property), -}; - -static const msi_table mcomp_tables[] = -{ - ADD_TABLE(mcp_component), - ADD_TABLE(directory), - ADD_TABLE(mcp_feature), - ADD_TABLE(mcp_feature_comp), - ADD_TABLE(mcomp_file), - ADD_TABLE(rem_install_exec_seq), - ADD_TABLE(rof_media), - ADD_TABLE(property), -}; - -static const msi_table ai_tables[] = -{ - ADD_TABLE(component), - ADD_TABLE(directory), - ADD_TABLE(feature), - ADD_TABLE(feature_comp), - ADD_TABLE(ai_file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(property) -}; - -static const msi_table pc_tables[] = -{ - ADD_TABLE(ca51_component), - ADD_TABLE(directory), - ADD_TABLE(rof_feature), - ADD_TABLE(ci2_feature_comp), - ADD_TABLE(ci2_file), - ADD_TABLE(install_exec_seq), - ADD_TABLE(rof_media), - ADD_TABLE(property) -}; - -static const msi_table ip_tables[] = -{ - ADD_TABLE(component), - ADD_TABLE(directory), - ADD_TABLE(feature), - ADD_TABLE(feature_comp), - ADD_TABLE(file), - ADD_TABLE(ip_install_exec_seq), - ADD_TABLE(ip_custom_action), - ADD_TABLE(media), - ADD_TABLE(property) -}; - -static const msi_table aup_tables[] = -{ - ADD_TABLE(component), - ADD_TABLE(directory), - ADD_TABLE(feature), - ADD_TABLE(feature_comp), - ADD_TABLE(file), - ADD_TABLE(aup_install_exec_seq), - ADD_TABLE(aup_custom_action), - ADD_TABLE(media), - ADD_TABLE(property) -}; - -static const msi_table aup2_tables[] = -{ - ADD_TABLE(component), - ADD_TABLE(directory), - ADD_TABLE(feature), - ADD_TABLE(feature_comp), - ADD_TABLE(file), - ADD_TABLE(aup2_install_exec_seq), - ADD_TABLE(aup_custom_action), - ADD_TABLE(media), - ADD_TABLE(aup_property) -}; - -static const msi_table aup3_tables[] = -{ - ADD_TABLE(component), - ADD_TABLE(directory), - ADD_TABLE(feature), - ADD_TABLE(feature_comp), - ADD_TABLE(file), - ADD_TABLE(aup2_install_exec_seq), - ADD_TABLE(aup_custom_action), - ADD_TABLE(media), - ADD_TABLE(aup2_property) -}; - -static const msi_table aup4_tables[] = -{ - ADD_TABLE(component), - ADD_TABLE(directory), - ADD_TABLE(feature), - ADD_TABLE(feature_comp), - ADD_TABLE(file), - ADD_TABLE(aup3_install_exec_seq), - ADD_TABLE(aup_custom_action), - ADD_TABLE(media), - ADD_TABLE(aup2_property) -}; - -static const msi_table fiu_tables[] = -{ - ADD_TABLE(rof_component), - ADD_TABLE(directory), - ADD_TABLE(rof_feature), - ADD_TABLE(rof_feature_comp), - ADD_TABLE(rof_file), - ADD_TABLE(pp_install_exec_seq), - ADD_TABLE(rof_media), - ADD_TABLE(property), -}; - -static const msi_table fiuc_tables[] = -{ - ADD_TABLE(rof_component), - ADD_TABLE(directory), - ADD_TABLE(rof_feature), - ADD_TABLE(rof_feature_comp), - ADD_TABLE(rofc_file), - ADD_TABLE(pp_install_exec_seq), - ADD_TABLE(rofc_media), - ADD_TABLE(property), -}; - -static const msi_table cf_tables[] = -{ - ADD_TABLE(component), - ADD_TABLE(directory), - ADD_TABLE(feature), - ADD_TABLE(feature_comp), - ADD_TABLE(file), - ADD_TABLE(cf_create_folders), - ADD_TABLE(cf_install_exec_seq), - ADD_TABLE(cf_custom_action), - ADD_TABLE(media), - ADD_TABLE(property) -}; - -static const msi_table rf_tables[] = -{ - ADD_TABLE(component), - ADD_TABLE(directory), - ADD_TABLE(feature), - ADD_TABLE(feature_comp), - ADD_TABLE(file), - ADD_TABLE(cf_create_folders), - ADD_TABLE(rf_install_exec_seq), - ADD_TABLE(cf_custom_action), - ADD_TABLE(media), - ADD_TABLE(property) -}; - -static const msi_table sss_tables[] = -{ - ADD_TABLE(component), - ADD_TABLE(directory), - ADD_TABLE(feature), - ADD_TABLE(feature_comp), - ADD_TABLE(file), - ADD_TABLE(sss_install_exec_seq), - ADD_TABLE(sss_service_control), - ADD_TABLE(media), - ADD_TABLE(property) -}; - -static const msi_table sds_tables[] = -{ - ADD_TABLE(component), - ADD_TABLE(directory), - ADD_TABLE(feature), - ADD_TABLE(feature_comp), - ADD_TABLE(file), - ADD_TABLE(sss_install_exec_seq), - ADD_TABLE(service_control), - ADD_TABLE(media), - ADD_TABLE(property) -}; - -static const msi_table sr_tables[] = -{ - ADD_TABLE(component), - ADD_TABLE(directory), - ADD_TABLE(feature), - ADD_TABLE(feature_comp), - ADD_TABLE(file), - ADD_TABLE(sr_selfreg), - ADD_TABLE(sr_install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(property) -}; - -static const msi_table font_tables[] = -{ - ADD_TABLE(font_component), - ADD_TABLE(directory), - ADD_TABLE(font_feature), - ADD_TABLE(font_feature_comp), - ADD_TABLE(font_file), - ADD_TABLE(font), - ADD_TABLE(font_install_exec_seq), - ADD_TABLE(font_media), - ADD_TABLE(property) -}; - -static const msi_table vp_tables[] = -{ - ADD_TABLE(component), - ADD_TABLE(directory), - ADD_TABLE(feature), - ADD_TABLE(feature_comp), - ADD_TABLE(file), - ADD_TABLE(vp_custom_action), - ADD_TABLE(vp_install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(vp_property) -}; - -static const msi_table odbc_tables[] = -{ - ADD_TABLE(odbc_component), - ADD_TABLE(directory), - ADD_TABLE(odbc_feature), - ADD_TABLE(odbc_feature_comp), - ADD_TABLE(odbc_file), - ADD_TABLE(odbc_driver), - ADD_TABLE(odbc_translator), - ADD_TABLE(odbc_datasource), - ADD_TABLE(odbc_install_exec_seq), - ADD_TABLE(odbc_media), - ADD_TABLE(property) -}; - -static const msi_table tl_tables[] = -{ - ADD_TABLE(tl_component), - ADD_TABLE(directory), - ADD_TABLE(tl_feature), - ADD_TABLE(tl_feature_comp), - ADD_TABLE(tl_file), - ADD_TABLE(tl_typelib), - ADD_TABLE(tl_install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(property) -}; - -static const msi_table crs_tables[] = -{ - ADD_TABLE(crs_component), - ADD_TABLE(directory), - ADD_TABLE(crs_feature), - ADD_TABLE(crs_feature_comp), - ADD_TABLE(crs_file), - ADD_TABLE(crs_shortcut), - ADD_TABLE(crs_install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(property) -}; - -static const msi_table pub_tables[] = -{ - ADD_TABLE(directory), - ADD_TABLE(pub_component), - ADD_TABLE(pub_feature), - ADD_TABLE(pub_feature_comp), - ADD_TABLE(pub_file), - ADD_TABLE(pub_publish_component), - ADD_TABLE(pub_install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(property) -}; - -static const msi_table rd_tables[] = -{ - ADD_TABLE(directory), - ADD_TABLE(rd_component), - ADD_TABLE(rd_feature), - ADD_TABLE(rd_feature_comp), - ADD_TABLE(rd_file), - ADD_TABLE(rd_duplicate_file), - ADD_TABLE(rd_install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(property) -}; - -static const msi_table rrv_tables[] = -{ - ADD_TABLE(directory), - ADD_TABLE(rrv_component), - ADD_TABLE(rrv_feature), - ADD_TABLE(rrv_feature_comp), - ADD_TABLE(rrv_file), - ADD_TABLE(rrv_registry), - ADD_TABLE(rrv_remove_registry), - ADD_TABLE(rrv_install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(property) -}; - -static const msi_table frp_tables[] = -{ - ADD_TABLE(directory), - ADD_TABLE(frp_component), - ADD_TABLE(frp_feature), - ADD_TABLE(frp_feature_comp), - ADD_TABLE(frp_file), - ADD_TABLE(frp_upgrade), - ADD_TABLE(frp_custom_action), - ADD_TABLE(frp_install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(property) -}; - -static const msi_table riv_tables[] = -{ - ADD_TABLE(directory), - ADD_TABLE(riv_component), - ADD_TABLE(riv_feature), - ADD_TABLE(riv_feature_comp), - ADD_TABLE(riv_file), - ADD_TABLE(riv_ini_file), - ADD_TABLE(riv_remove_ini_file), - ADD_TABLE(riv_install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(property) -}; - -static const msi_table res_tables[] = -{ - ADD_TABLE(directory), - ADD_TABLE(res_component), - ADD_TABLE(res_feature), - ADD_TABLE(res_feature_comp), - ADD_TABLE(res_file), - ADD_TABLE(res_environment), - ADD_TABLE(res_install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(property) -}; - -static const msi_table rci_tables[] = -{ - ADD_TABLE(directory), - ADD_TABLE(rci_component), - ADD_TABLE(rci_feature), - ADD_TABLE(rci_feature_comp), - ADD_TABLE(rci_file), - ADD_TABLE(rci_appid), - ADD_TABLE(rci_class), - ADD_TABLE(rci_install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(property) -}; - -static const msi_table rei_tables[] = -{ - ADD_TABLE(directory), - ADD_TABLE(rei_component), - ADD_TABLE(rei_feature), - ADD_TABLE(rei_feature_comp), - ADD_TABLE(rei_file), - ADD_TABLE(rei_extension), - ADD_TABLE(rei_verb), - ADD_TABLE(rei_progid), - ADD_TABLE(rei_install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(property) -}; - -static const msi_table rmi_tables[] = -{ - ADD_TABLE(directory), - ADD_TABLE(rmi_component), - ADD_TABLE(rmi_feature), - ADD_TABLE(rmi_feature_comp), - ADD_TABLE(rmi_file), - ADD_TABLE(rmi_extension), - ADD_TABLE(rmi_verb), - ADD_TABLE(rmi_mime), - ADD_TABLE(rmi_install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(property) -}; - -static const msi_table fo_tables[] = -{ - ADD_TABLE(directory), - ADD_TABLE(fo_file), - ADD_TABLE(fo_component), - ADD_TABLE(fo_feature), - ADD_TABLE(fo_condition), - ADD_TABLE(fo_feature_comp), - ADD_TABLE(fo_custom_action), - ADD_TABLE(fo_install_exec_seq), - ADD_TABLE(media), - ADD_TABLE(property) -}; - -static const msi_table icon_base_tables[] = -{ - ADD_TABLE(ci_component), - ADD_TABLE(directory), - ADD_TABLE(rof_feature), - ADD_TABLE(rof_feature_comp), - ADD_TABLE(rof_file), - ADD_TABLE(pp_install_exec_seq), - ADD_TABLE(rof_media), - ADD_TABLE(icon_property), -}; - -/* cabinet definitions */ - -/* make the max size large so there is only one cab file */ -#define MEDIA_SIZE 0x7FFFFFFF -#define FOLDER_THRESHOLD 900000 - -/* the FCI callbacks */ - -static void * CDECL mem_alloc(ULONG cb) -{ - return HeapAlloc(GetProcessHeap(), 0, cb); -} - -static void CDECL mem_free(void *memory) -{ - HeapFree(GetProcessHeap(), 0, memory); -} - -static BOOL CDECL get_next_cabinet(PCCAB pccab, ULONG cbPrevCab, void *pv) -{ - sprintf(pccab->szCab, pv, pccab->iCab); - return TRUE; -} - -static LONG CDECL progress(UINT typeStatus, ULONG cb1, ULONG cb2, void *pv) -{ - return 0; -} - -static int CDECL file_placed(PCCAB pccab, char *pszFile, LONG cbFile, - BOOL fContinuation, void *pv) -{ - return 0; -} - -static INT_PTR CDECL fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv) -{ - HANDLE handle; - DWORD dwAccess = 0; - DWORD dwShareMode = 0; - DWORD dwCreateDisposition = OPEN_EXISTING; - - dwAccess = GENERIC_READ | GENERIC_WRITE; - /* FILE_SHARE_DELETE is not supported by Windows Me/98/95 */ - dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE; - - if (GetFileAttributesA(pszFile) != INVALID_FILE_ATTRIBUTES) - dwCreateDisposition = OPEN_EXISTING; - else - dwCreateDisposition = CREATE_NEW; - - handle = CreateFileA(pszFile, dwAccess, dwShareMode, NULL, - dwCreateDisposition, 0, NULL); - - ok(handle != INVALID_HANDLE_VALUE, "Failed to CreateFile %s\n", pszFile); - - return (INT_PTR)handle; -} - -static UINT CDECL fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) -{ - HANDLE handle = (HANDLE)hf; - DWORD dwRead; - BOOL res; - - res = ReadFile(handle, memory, cb, &dwRead, NULL); - ok(res, "Failed to ReadFile\n"); - - return dwRead; -} - -static UINT CDECL fci_write(INT_PTR hf, void *memory, UINT cb, int *err, void *pv) -{ - HANDLE handle = (HANDLE)hf; - DWORD dwWritten; - BOOL res; - - res = WriteFile(handle, memory, cb, &dwWritten, NULL); - ok(res, "Failed to WriteFile\n"); - - return dwWritten; -} - -static int CDECL fci_close(INT_PTR hf, int *err, void *pv) -{ - HANDLE handle = (HANDLE)hf; - ok(CloseHandle(handle), "Failed to CloseHandle\n"); - - return 0; -} - -static LONG CDECL fci_seek(INT_PTR hf, LONG dist, int seektype, int *err, void *pv) -{ - HANDLE handle = (HANDLE)hf; - DWORD ret; - - ret = SetFilePointer(handle, dist, NULL, seektype); - ok(ret != INVALID_SET_FILE_POINTER, "Failed to SetFilePointer\n"); - - return ret; -} - -static int CDECL fci_delete(char *pszFile, int *err, void *pv) -{ - BOOL ret = DeleteFileA(pszFile); - ok(ret, "Failed to DeleteFile %s\n", pszFile); - - return 0; -} - -static void init_functionpointers(void) -{ - HMODULE hmsi = GetModuleHandleA("msi.dll"); - HMODULE hadvapi32 = GetModuleHandleA("advapi32.dll"); - -#define GET_PROC(mod, func) \ - p ## func = (void*)GetProcAddress(mod, #func); \ - if(!p ## func) \ - trace("GetProcAddress(%s) failed\n", #func); - - GET_PROC(hmsi, MsiQueryComponentStateA); - GET_PROC(hmsi, MsiSetExternalUIRecord); - GET_PROC(hmsi, MsiSourceListEnumSourcesA); - GET_PROC(hmsi, MsiSourceListGetInfoA); - - GET_PROC(hadvapi32, ConvertSidToStringSidA); - - hsrclient = LoadLibraryA("srclient.dll"); - GET_PROC(hsrclient, SRRemoveRestorePoint); - GET_PROC(hsrclient, SRSetRestorePointA); - -#undef GET_PROC -} - -static BOOL check_win9x(void) -{ - SC_HANDLE scm; - - scm = OpenSCManager(NULL, NULL, GENERIC_ALL); - if (!scm && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) - return TRUE; - - CloseServiceHandle(scm); - - return FALSE; -} - -static LPSTR get_user_sid(LPSTR *usersid) -{ - HANDLE token; - BYTE buf[1024]; - DWORD size; - PTOKEN_USER user; - - if (!pConvertSidToStringSidA) - { - win_skip("ConvertSidToStringSidA is not available\n"); - return NULL; - } - - *usersid = NULL; - OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token); - size = sizeof(buf); - GetTokenInformation(token, TokenUser, buf, size, &size); - user = (PTOKEN_USER)buf; - pConvertSidToStringSidA(user->User.Sid, usersid); - ok(*usersid != NULL, "pConvertSidToStringSidA failed lre=%d\n", GetLastError()); - CloseHandle(token); - return *usersid; -} - -static BOOL check_record(MSIHANDLE rec, UINT field, LPCSTR val) -{ - CHAR buffer[0x20]; - UINT r; - DWORD sz; - - sz = sizeof buffer; - r = MsiRecordGetString(rec, field, buffer, &sz); - return (r == ERROR_SUCCESS ) && !strcmp(val, buffer); -} - -static BOOL CDECL get_temp_file(char *pszTempName, int cbTempName, void *pv) -{ - LPSTR tempname; - - tempname = HeapAlloc(GetProcessHeap(), 0, MAX_PATH); - GetTempFileNameA(".", "xx", 0, tempname); - - if (tempname && (strlen(tempname) < (unsigned)cbTempName)) - { - lstrcpyA(pszTempName, tempname); - HeapFree(GetProcessHeap(), 0, tempname); - return TRUE; - } - - HeapFree(GetProcessHeap(), 0, tempname); - - return FALSE; -} - -static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime, - USHORT *pattribs, int *err, void *pv) -{ - BY_HANDLE_FILE_INFORMATION finfo; - FILETIME filetime; - HANDLE handle; - DWORD attrs; - BOOL res; - - handle = CreateFile(pszName, GENERIC_READ, FILE_SHARE_READ, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL); - - ok(handle != INVALID_HANDLE_VALUE, "Failed to CreateFile %s\n", pszName); - - res = GetFileInformationByHandle(handle, &finfo); - ok(res, "Expected GetFileInformationByHandle to succeed\n"); - - FileTimeToLocalFileTime(&finfo.ftLastWriteTime, &filetime); - FileTimeToDosDateTime(&filetime, pdate, ptime); - - attrs = GetFileAttributes(pszName); - ok(attrs != INVALID_FILE_ATTRIBUTES, "Failed to GetFileAttributes\n"); - - return (INT_PTR)handle; -} - -static BOOL add_file(HFCI hfci, const char *file, TCOMP compress) -{ - char path[MAX_PATH]; - char filename[MAX_PATH]; - - lstrcpyA(path, CURR_DIR); - lstrcatA(path, "\\"); - lstrcatA(path, file); - - lstrcpyA(filename, file); - - return FCIAddFile(hfci, path, filename, FALSE, get_next_cabinet, - progress, get_open_info, compress); -} - -static void set_cab_parameters(PCCAB pCabParams, const CHAR *name, DWORD max_size) -{ - ZeroMemory(pCabParams, sizeof(CCAB)); - - pCabParams->cb = max_size; - pCabParams->cbFolderThresh = FOLDER_THRESHOLD; - pCabParams->setID = 0xbeef; - pCabParams->iCab = 1; - lstrcpyA(pCabParams->szCabPath, CURR_DIR); - lstrcatA(pCabParams->szCabPath, "\\"); - lstrcpyA(pCabParams->szCab, name); -} - -static void create_cab_file(const CHAR *name, DWORD max_size, const CHAR *files) -{ - CCAB cabParams; - LPCSTR ptr; - HFCI hfci; - ERF erf; - BOOL res; - - set_cab_parameters(&cabParams, name, max_size); - - hfci = FCICreate(&erf, file_placed, mem_alloc, mem_free, fci_open, - fci_read, fci_write, fci_close, fci_seek, fci_delete, - get_temp_file, &cabParams, NULL); - - ok(hfci != NULL, "Failed to create an FCI context\n"); - - ptr = files; - while (*ptr) - { - res = add_file(hfci, ptr, tcompTYPE_MSZIP); - ok(res, "Failed to add file: %s\n", ptr); - ptr += lstrlen(ptr) + 1; - } - - res = FCIFlushCabinet(hfci, FALSE, get_next_cabinet, progress); - ok(res, "Failed to flush the cabinet\n"); - - res = FCIDestroy(hfci); - ok(res, "Failed to destroy the cabinet\n"); -} - -static BOOL get_user_dirs(void) -{ - HKEY hkey; - DWORD type, size; - - if(RegOpenKey(HKEY_CURRENT_USER, - "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", - &hkey)) - return FALSE; - - size = MAX_PATH; - if(RegQueryValueExA(hkey, "AppData", 0, &type, (LPBYTE)APP_DATA_DIR, &size)){ - RegCloseKey(hkey); - return FALSE; - } - - RegCloseKey(hkey); - return TRUE; -} - -static BOOL get_system_dirs(void) -{ - HKEY hkey; - DWORD type, size; - - if (RegOpenKey(HKEY_LOCAL_MACHINE, - "Software\\Microsoft\\Windows\\CurrentVersion", &hkey)) - return FALSE; - - size = MAX_PATH; - if (RegQueryValueExA(hkey, "ProgramFilesDir (x86)", 0, &type, (LPBYTE)PROG_FILES_DIR, &size) && - RegQueryValueExA(hkey, "ProgramFilesDir", 0, &type, (LPBYTE)PROG_FILES_DIR, &size)) { - RegCloseKey(hkey); - return FALSE; - } - - size = MAX_PATH; - if (RegQueryValueExA(hkey, "CommonFilesDir", 0, &type, (LPBYTE)COMMON_FILES_DIR, &size)) { - RegCloseKey(hkey); - return FALSE; - } - - RegCloseKey(hkey); - - if(GetWindowsDirectoryA(WINDOWS_DIR, MAX_PATH) != ERROR_SUCCESS) - return FALSE; - - return TRUE; -} - -static void create_file_data(LPCSTR name, LPCSTR data, DWORD size) -{ - HANDLE file; - DWORD written; - - file = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - if (file == INVALID_HANDLE_VALUE) - return; - - WriteFile(file, data, strlen(data), &written, NULL); - - if (size) - { - SetFilePointer(file, size, NULL, FILE_BEGIN); - SetEndOfFile(file); - } - - CloseHandle(file); -} - -#define create_file(name, size) create_file_data(name, name, size) - -static void create_test_files(void) -{ - CreateDirectoryA("msitest", NULL); - create_file("msitest\\one.txt", 100); - CreateDirectoryA("msitest\\first", NULL); - create_file("msitest\\first\\two.txt", 100); - CreateDirectoryA("msitest\\second", NULL); - create_file("msitest\\second\\three.txt", 100); - - create_file("four.txt", 100); - create_file("five.txt", 100); - create_cab_file("msitest.cab", MEDIA_SIZE, "four.txt\0five.txt\0"); - - create_file("msitest\\filename", 100); - create_file("msitest\\service.exe", 100); - - DeleteFileA("four.txt"); - DeleteFileA("five.txt"); -} - -static BOOL delete_pf(const CHAR *rel_path, BOOL is_file) -{ - CHAR path[MAX_PATH]; - - lstrcpyA(path, PROG_FILES_DIR); - lstrcatA(path, "\\"); - lstrcatA(path, rel_path); - - if (is_file) - return DeleteFileA(path); - else - return RemoveDirectoryA(path); -} - -static BOOL delete_cf(const CHAR *rel_path, BOOL is_file) -{ - CHAR path[MAX_PATH]; - - lstrcpyA(path, COMMON_FILES_DIR); - lstrcatA(path, "\\"); - lstrcatA(path, rel_path); - - if (is_file) - return DeleteFileA(path); - else - return RemoveDirectoryA(path); -} - -static void delete_test_files(void) -{ - DeleteFileA("msitest.msi"); - DeleteFileA("msitest.cab"); - DeleteFileA("msitest\\second\\three.txt"); - DeleteFileA("msitest\\first\\two.txt"); - DeleteFileA("msitest\\one.txt"); - DeleteFileA("msitest\\service.exe"); - DeleteFileA("msitest\\filename"); - RemoveDirectoryA("msitest\\second"); - RemoveDirectoryA("msitest\\first"); - RemoveDirectoryA("msitest"); -} - -static void write_file(const CHAR *filename, const char *data, int data_size) -{ - DWORD size; - - HANDLE hf = CreateFile(filename, GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - - WriteFile(hf, data, data_size, &size, NULL); - CloseHandle(hf); -} - -static void write_msi_summary_info(MSIHANDLE db, INT wordcount) -{ - MSIHANDLE summary; - UINT r; - - r = MsiGetSummaryInformationA(db, NULL, 5, &summary); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - r = MsiSummaryInfoSetPropertyA(summary, PID_TEMPLATE, VT_LPSTR, 0, NULL, ";1033"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - r = MsiSummaryInfoSetPropertyA(summary, PID_REVNUMBER, VT_LPSTR, 0, NULL, - "{004757CA-5092-49c2-AD20-28E1CE0DF5F2}"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - r = MsiSummaryInfoSetPropertyA(summary, PID_PAGECOUNT, VT_I4, 100, NULL, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - r = MsiSummaryInfoSetPropertyA(summary, PID_WORDCOUNT, VT_I4, wordcount, NULL, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - r = MsiSummaryInfoSetPropertyA(summary, PID_TITLE, VT_LPSTR, 0, NULL, "MSITEST"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - /* write the summary changes back to the stream */ - r = MsiSummaryInfoPersist(summary); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - MsiCloseHandle(summary); -} - -#define create_database(name, tables, num_tables) \ - create_database_wordcount(name, tables, num_tables, 0); - -static void create_database_wordcount(const CHAR *name, const msi_table *tables, - int num_tables, INT wordcount) -{ - MSIHANDLE db; - UINT r; - int j; - - r = MsiOpenDatabaseA(name, MSIDBOPEN_CREATE, &db); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - /* import the tables into the database */ - for (j = 0; j < num_tables; j++) - { - const msi_table *table = &tables[j]; - - write_file(table->filename, table->data, (table->size - 1) * sizeof(char)); - - r = MsiDatabaseImportA(db, CURR_DIR, table->filename); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - DeleteFileA(table->filename); - } - - write_msi_summary_info(db, wordcount); - - r = MsiDatabaseCommit(db); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - MsiCloseHandle(db); -} - -static void check_service_is_installed(void) -{ - SC_HANDLE scm, service; - BOOL res; - - scm = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); - ok(scm != NULL, "Failed to open the SC Manager\n"); - - service = OpenService(scm, "TestService", SC_MANAGER_ALL_ACCESS); - ok(service != NULL, "Failed to open TestService\n"); - - res = DeleteService(service); - ok(res, "Failed to delete TestService\n"); - - CloseServiceHandle(service); - CloseServiceHandle(scm); -} - -static BOOL notify_system_change(DWORD event_type, STATEMGRSTATUS *status) -{ - RESTOREPOINTINFOA spec; - - spec.dwEventType = event_type; - spec.dwRestorePtType = APPLICATION_INSTALL; - spec.llSequenceNumber = status->llSequenceNumber; - lstrcpyA(spec.szDescription, "msitest restore point"); - - return pSRSetRestorePointA(&spec, status); -} - -static void remove_restore_point(DWORD seq_number) -{ - DWORD res; - - res = pSRRemoveRestorePoint(seq_number); - if (res != ERROR_SUCCESS) - trace("Failed to remove the restore point : %08x\n", res); -} - -static void test_MsiInstallProduct(void) -{ - UINT r; - CHAR path[MAX_PATH]; - LONG res; - HKEY hkey; - DWORD num, size, type; - - if (on_win9x) - { - win_skip("Services are not implemented on Win9x and WinMe\n"); - return; - } - - /* szPackagePath is NULL */ - r = MsiInstallProductA(NULL, "INSTALL=ALL"); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* both szPackagePath and szCommandLine are NULL */ - r = MsiInstallProductA(NULL, NULL); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* szPackagePath is empty */ - r = MsiInstallProductA("", "INSTALL=ALL"); - ok(r == ERROR_PATH_NOT_FOUND, - "Expected ERROR_PATH_NOT_FOUND, got %d\n", r); - - create_test_files(); - create_database(msifile, tables, sizeof(tables) / sizeof(msi_table)); - - /* install, don't publish */ - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout\\new", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\changed", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\first", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\filename", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - res = RegOpenKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - size = MAX_PATH; - type = REG_SZ; - res = RegQueryValueExA(hkey, "Name", NULL, &type, (LPBYTE)path, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(path, "imaname"), "Expected imaname, got %s\n", path); - - size = MAX_PATH; - type = REG_SZ; - res = RegQueryValueExA(hkey, "blah", NULL, &type, (LPBYTE)path, &size); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - size = sizeof(num); - type = REG_DWORD; - res = RegQueryValueExA(hkey, "number", NULL, &type, (LPBYTE)&num, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(num == 314, "Expected 314, got %d\n", num); - - size = MAX_PATH; - type = REG_SZ; - res = RegQueryValueExA(hkey, "OrderTestName", NULL, &type, (LPBYTE)path, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(path, "OrderTestValue"), "Expected OrderTestValue, got %s\n", path); - - check_service_is_installed(); - - RegDeleteKeyA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest"); - - /* not published, reinstall */ - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout\\new", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\changed", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\first", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\filename", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - res = RegOpenKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - RegDeleteKeyA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest"); - - create_database(msifile, up_tables, sizeof(up_tables) / sizeof(msi_table)); - - /* not published, RemovePreviousVersions set */ - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout\\new", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\changed", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\first", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\filename", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - res = RegOpenKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - RegDeleteKeyA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest"); - - create_database(msifile, up2_tables, sizeof(up2_tables) / sizeof(msi_table)); - - /* not published, version number bumped */ - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout\\new", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\changed", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\first", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\filename", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - res = RegOpenKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - RegDeleteKeyA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest"); - - create_database(msifile, up3_tables, sizeof(up3_tables) / sizeof(msi_table)); - - /* not published, RemovePreviousVersions set and version number bumped */ - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout\\new", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\changed", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\first", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\filename", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - res = RegOpenKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - RegDeleteKeyA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest"); - - create_database(msifile, up4_tables, sizeof(up4_tables) / sizeof(msi_table)); - - /* install, publish product */ - r = MsiInstallProductA(msifile, "PUBLISH_PRODUCT=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout\\new", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\changed", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\first", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\filename", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - res = RegOpenKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - create_database(msifile, up4_tables, sizeof(up4_tables) / sizeof(msi_table)); - - /* published, reinstall */ - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout\\new", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\changed", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\first", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\filename", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - res = RegOpenKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - create_database(msifile, up5_tables, sizeof(up5_tables) / sizeof(msi_table)); - - /* published product, RemovePreviousVersions set */ - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout\\new", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\changed", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\first", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\filename", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - res = RegOpenKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - create_database(msifile, up6_tables, sizeof(up6_tables) / sizeof(msi_table)); - - /* published product, version number bumped */ - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout\\new", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\changed", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\first", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\filename", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - res = RegOpenKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - create_database(msifile, up7_tables, sizeof(up7_tables) / sizeof(msi_table)); - - /* published product, RemovePreviousVersions set and version number bumped */ - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout\\new", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\changed", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\first", FALSE), "File not installed\n"); - ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\filename", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - res = RegOpenKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - r = MsiInstallProductA(msifile, "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - delete_test_files(); -} - -static void test_MsiSetComponentState(void) -{ - INSTALLSTATE installed, action; - MSIHANDLE package; - char path[MAX_PATH]; - UINT r; - - create_database(msifile, tables, sizeof(tables) / sizeof(msi_table)); - - CoInitialize(NULL); - - lstrcpy(path, CURR_DIR); - lstrcat(path, "\\"); - lstrcat(path, msifile); - - r = MsiOpenPackage(path, &package); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - r = MsiDoAction(package, "CostInitialize"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - r = MsiDoAction(package, "FileCost"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - r = MsiDoAction(package, "CostFinalize"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - r = MsiGetComponentState(package, "dangler", &installed, &action); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(installed == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", installed); - ok(action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - r = MsiSetComponentState(package, "dangler", INSTALLSTATE_SOURCE); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - MsiCloseHandle(package); - CoUninitialize(); - - DeleteFileA(msifile); -} - -static void test_packagecoltypes(void) -{ - MSIHANDLE hdb, view, rec; - char path[MAX_PATH]; - LPCSTR query; - UINT r, count; - - create_database(msifile, tables, sizeof(tables) / sizeof(msi_table)); - - CoInitialize(NULL); - - lstrcpy(path, CURR_DIR); - lstrcat(path, "\\"); - lstrcat(path, msifile); - - r = MsiOpenDatabase(path, MSIDBOPEN_READONLY, &hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - query = "SELECT * FROM `Media`"; - r = MsiDatabaseOpenView( hdb, query, &view ); - ok(r == ERROR_SUCCESS, "MsiDatabaseOpenView failed\n"); - - r = MsiViewGetColumnInfo( view, MSICOLINFO_NAMES, &rec ); - count = MsiRecordGetFieldCount( rec ); - ok(r == ERROR_SUCCESS, "MsiViewGetColumnInfo failed\n"); - ok(count == 6, "Expected 6, got %d\n", count); - ok(check_record(rec, 1, "DiskId"), "wrong column label\n"); - ok(check_record(rec, 2, "LastSequence"), "wrong column label\n"); - ok(check_record(rec, 3, "DiskPrompt"), "wrong column label\n"); - ok(check_record(rec, 4, "Cabinet"), "wrong column label\n"); - ok(check_record(rec, 5, "VolumeLabel"), "wrong column label\n"); - ok(check_record(rec, 6, "Source"), "wrong column label\n"); - MsiCloseHandle(rec); - - r = MsiViewGetColumnInfo( view, MSICOLINFO_TYPES, &rec ); - count = MsiRecordGetFieldCount( rec ); - ok(r == ERROR_SUCCESS, "MsiViewGetColumnInfo failed\n"); - ok(count == 6, "Expected 6, got %d\n", count); - ok(check_record(rec, 1, "i2"), "wrong column label\n"); - ok(check_record(rec, 2, "i4"), "wrong column label\n"); - ok(check_record(rec, 3, "L64"), "wrong column label\n"); - ok(check_record(rec, 4, "S255"), "wrong column label\n"); - ok(check_record(rec, 5, "S32"), "wrong column label\n"); - ok(check_record(rec, 6, "S72"), "wrong column label\n"); - - MsiCloseHandle(rec); - MsiCloseHandle(view); - MsiCloseHandle(hdb); - CoUninitialize(); - - DeleteFile(msifile); -} - -static void create_cc_test_files(void) -{ - CCAB cabParams; - HFCI hfci; - ERF erf; - static CHAR cab_context[] = "test%d.cab"; - BOOL res; - - create_file("maximus", 500); - create_file("augustus", 50000); - create_file("tiberius", 500); - create_file("caesar", 500); - - set_cab_parameters(&cabParams, "test1.cab", 40000); - - hfci = FCICreate(&erf, file_placed, mem_alloc, mem_free, fci_open, - fci_read, fci_write, fci_close, fci_seek, fci_delete, - get_temp_file, &cabParams, cab_context); - ok(hfci != NULL, "Failed to create an FCI context\n"); - - res = add_file(hfci, "maximus", tcompTYPE_NONE); - ok(res, "Failed to add file maximus\n"); - - res = add_file(hfci, "augustus", tcompTYPE_NONE); - ok(res, "Failed to add file augustus\n"); - - res = add_file(hfci, "tiberius", tcompTYPE_NONE); - ok(res, "Failed to add file tiberius\n"); - - res = FCIFlushCabinet(hfci, FALSE, get_next_cabinet, progress); - ok(res, "Failed to flush the cabinet\n"); - - res = FCIDestroy(hfci); - ok(res, "Failed to destroy the cabinet\n"); - - create_cab_file("test3.cab", MEDIA_SIZE, "caesar\0"); - - DeleteFile("maximus"); - DeleteFile("augustus"); - DeleteFile("tiberius"); - DeleteFile("caesar"); -} - -static void delete_cab_files(void) -{ - SHFILEOPSTRUCT shfl; - CHAR path[MAX_PATH+10]; - - lstrcpyA(path, CURR_DIR); - lstrcatA(path, "\\*.cab"); - path[strlen(path) + 1] = '\0'; - - shfl.hwnd = NULL; - shfl.wFunc = FO_DELETE; - shfl.pFrom = path; - shfl.pTo = NULL; - shfl.fFlags = FOF_FILESONLY | FOF_NOCONFIRMATION | FOF_NORECURSION | FOF_SILENT; - - SHFileOperation(&shfl); -} - -static void test_continuouscabs(void) -{ - UINT r; - - create_cc_test_files(); - create_database(msifile, cc_tables, sizeof(cc_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - r = MsiInstallProductA(msifile, NULL); - if (r == ERROR_SUCCESS) /* win9x has a problem with this */ - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\caesar", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - } - - delete_cab_files(); - DeleteFile(msifile); - - create_cc_test_files(); - create_database(msifile, cc2_tables, sizeof(cc2_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); - ok(!delete_pf("msitest\\augustus", TRUE), "File installed\n"); - ok(delete_pf("msitest\\tiberius", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\caesar", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - delete_cab_files(); - DeleteFile(msifile); -} - -static void test_caborder(void) -{ - UINT r; - - create_file("imperator", 100); - create_file("maximus", 500); - create_file("augustus", 50000); - create_file("caesar", 500); - - create_database(msifile, cc_tables, sizeof(cc_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - create_cab_file("test1.cab", MEDIA_SIZE, "maximus\0"); - create_cab_file("test2.cab", MEDIA_SIZE, "augustus\0"); - create_cab_file("test3.cab", MEDIA_SIZE, "caesar\0"); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r); - ok(!delete_pf("msitest\\augustus", TRUE), "File is installed\n"); - ok(!delete_pf("msitest\\caesar", TRUE), "File is installed\n"); - todo_wine - { - ok(!delete_pf("msitest\\maximus", TRUE), "File is installed\n"); - ok(!delete_pf("msitest", FALSE), "File is installed\n"); - } - - delete_cab_files(); - - create_cab_file("test1.cab", MEDIA_SIZE, "imperator\0"); - create_cab_file("test2.cab", MEDIA_SIZE, "maximus\0augustus\0"); - create_cab_file("test3.cab", MEDIA_SIZE, "caesar\0"); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r); - ok(!delete_pf("msitest\\maximus", TRUE), "File is installed\n"); - ok(!delete_pf("msitest\\augustus", TRUE), "File is installed\n"); - ok(!delete_pf("msitest\\caesar", TRUE), "File is installed\n"); - ok(!delete_pf("msitest", FALSE), "File is installed\n"); - - delete_cab_files(); - DeleteFile(msifile); - - create_cc_test_files(); - create_database(msifile, co_tables, sizeof(co_tables) / sizeof(msi_table)); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r); - ok(!delete_pf("msitest\\caesar", TRUE), "File is installed\n"); - ok(!delete_pf("msitest", FALSE), "File is installed\n"); - todo_wine - { - ok(!delete_pf("msitest\\augustus", TRUE), "File is installed\n"); - ok(!delete_pf("msitest\\maximus", TRUE), "File is installed\n"); - } - - delete_cab_files(); - DeleteFile(msifile); - - create_cc_test_files(); - create_database(msifile, co2_tables, sizeof(co2_tables) / sizeof(msi_table)); - - r = MsiInstallProductA(msifile, NULL); - ok(!delete_pf("msitest\\caesar", TRUE), "File is installed\n"); - ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r); - todo_wine - { - ok(!delete_pf("msitest\\augustus", TRUE), "File is installed\n"); - ok(!delete_pf("msitest\\maximus", TRUE), "File is installed\n"); - ok(!delete_pf("msitest", FALSE), "File is installed\n"); - } - - delete_cab_files(); - DeleteFile("imperator"); - DeleteFile("maximus"); - DeleteFile("augustus"); - DeleteFile("caesar"); - DeleteFile(msifile); -} - -static void test_mixedmedia(void) -{ - UINT r; - - CreateDirectoryA("msitest", NULL); - create_file("msitest\\maximus", 500); - create_file("msitest\\augustus", 500); - create_file("caesar", 500); - - create_database(msifile, mm_tables, sizeof(mm_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - create_cab_file("test1.cab", MEDIA_SIZE, "caesar\0"); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\caesar", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - /* Delete the files in the temp (current) folder */ - DeleteFile("msitest\\maximus"); - DeleteFile("msitest\\augustus"); - RemoveDirectory("msitest"); - DeleteFile("caesar"); - DeleteFile("test1.cab"); - DeleteFile(msifile); -} - -static void test_samesequence(void) -{ - UINT r; - - create_cc_test_files(); - create_database(msifile, ss_tables, sizeof(ss_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - r = MsiInstallProductA(msifile, NULL); - if (r == ERROR_SUCCESS) /* win9x has a problem with this */ - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\caesar", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - } - - delete_cab_files(); - DeleteFile(msifile); -} - -static void test_uiLevelFlags(void) -{ - UINT r; - - create_cc_test_files(); - create_database(msifile, ui_tables, sizeof(ui_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE | INSTALLUILEVEL_SOURCERESONLY, NULL); - - r = MsiInstallProductA(msifile, NULL); - if (r == ERROR_SUCCESS) /* win9x has a problem with this */ - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(!delete_pf("msitest\\maximus", TRUE), "UI install occurred, but execute-only was requested.\n"); - ok(delete_pf("msitest\\caesar", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - } - - delete_cab_files(); - DeleteFile(msifile); -} - -static BOOL file_matches(LPSTR path) -{ - CHAR buf[MAX_PATH]; - HANDLE file; - DWORD size; - - file = CreateFile(path, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, OPEN_EXISTING, 0, NULL); - - ZeroMemory(buf, MAX_PATH); - ReadFile(file, buf, 15, &size, NULL); - CloseHandle(file); - - return !lstrcmp(buf, "msitest\\maximus"); -} - -static void test_readonlyfile(void) -{ - UINT r; - DWORD size; - HANDLE file; - CHAR path[MAX_PATH]; - - CreateDirectoryA("msitest", NULL); - create_file("msitest\\maximus", 500); - create_database(msifile, rof_tables, sizeof(rof_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - lstrcpy(path, PROG_FILES_DIR); - lstrcat(path, "\\msitest"); - CreateDirectory(path, NULL); - - lstrcat(path, "\\maximus"); - file = CreateFile(path, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, CREATE_NEW, FILE_ATTRIBUTE_READONLY, NULL); - - WriteFile(file, "readonlyfile", strlen("readonlyfile"), &size, NULL); - CloseHandle(file); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(file_matches(path), "Expected file to be overwritten\n"); - ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - /* Delete the files in the temp (current) folder */ - DeleteFile("msitest\\maximus"); - RemoveDirectory("msitest"); - DeleteFile(msifile); -} - -static void test_readonlyfile_cab(void) -{ - UINT r; - DWORD size; - HANDLE file; - CHAR path[MAX_PATH]; - CHAR buf[16]; - - CreateDirectoryA("msitest", NULL); - create_file("maximus", 500); - create_cab_file("test1.cab", MEDIA_SIZE, "maximus\0"); - DeleteFile("maximus"); - - create_database(msifile, rofc_tables, sizeof(rofc_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - lstrcpy(path, PROG_FILES_DIR); - lstrcat(path, "\\msitest"); - CreateDirectory(path, NULL); - - lstrcat(path, "\\maximus"); - file = CreateFile(path, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, CREATE_NEW, FILE_ATTRIBUTE_READONLY, NULL); - - WriteFile(file, "readonlyfile", strlen("readonlyfile"), &size, NULL); - CloseHandle(file); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - memset( buf, 0, sizeof(buf) ); - if ((file = CreateFile(path, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, OPEN_EXISTING, 0, NULL)) != INVALID_HANDLE_VALUE) - { - ReadFile(file, buf, sizeof(buf) - 1, &size, NULL); - CloseHandle(file); - } - ok(!memcmp( buf, "maximus", sizeof("maximus")-1 ), "Expected file to be overwritten, got '%s'\n", buf); - ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - /* Delete the files in the temp (current) folder */ - delete_cab_files(); - DeleteFile("msitest\\maximus"); - RemoveDirectory("msitest"); - DeleteFile(msifile); -} - -static BOOL add_cabinet_storage(LPCSTR db, LPCSTR cabinet) -{ - WCHAR dbW[MAX_PATH], cabinetW[MAX_PATH]; - IStorage *stg; - IStream *stm; - HRESULT hr; - HANDLE handle; - - MultiByteToWideChar(CP_ACP, 0, db, -1, dbW, MAX_PATH); - hr = StgOpenStorage(dbW, NULL, STGM_DIRECT|STGM_READWRITE|STGM_SHARE_EXCLUSIVE, NULL, 0, &stg); - if (FAILED(hr)) - return FALSE; - - MultiByteToWideChar(CP_ACP, 0, cabinet, -1, cabinetW, MAX_PATH); - hr = IStorage_CreateStream(stg, cabinetW, STGM_WRITE|STGM_SHARE_EXCLUSIVE, 0, 0, &stm); - if (FAILED(hr)) - { - IStorage_Release(stg); - return FALSE; - } - - handle = CreateFileW(cabinetW, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL); - if (handle != INVALID_HANDLE_VALUE) - { - DWORD count; - char buffer[1024]; - if (ReadFile(handle, buffer, sizeof(buffer), &count, NULL)) - IStream_Write(stm, buffer, count, &count); - CloseHandle(handle); - } - - IStream_Release(stm); - IStorage_Release(stg); - - return TRUE; -} - -static void test_lastusedsource(void) -{ - static char prodcode[] = "{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"; - - UINT r; - char value[MAX_PATH], path[MAX_PATH]; - DWORD size; - - if (!pMsiSourceListGetInfoA) - { - win_skip("MsiSourceListGetInfoA is not available\n"); - return; - } - - CreateDirectoryA("msitest", NULL); - create_file("maximus", 500); - create_cab_file("test1.cab", MEDIA_SIZE, "maximus\0"); - DeleteFile("maximus"); - - create_database("msifile0.msi", lus0_tables, sizeof(lus0_tables) / sizeof(msi_table)); - create_database("msifile1.msi", lus1_tables, sizeof(lus1_tables) / sizeof(msi_table)); - create_database("msifile2.msi", lus2_tables, sizeof(lus2_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - /* no cabinet file */ - - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCE, value, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %u\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value); - - r = MsiInstallProductA("msifile0.msi", "PUBLISH_PRODUCT=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - lstrcpyA(path, CURR_DIR); - lstrcatA(path, "\\"); - - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCE, value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - todo_wine - { - ok(!lstrcmpA(value, path), "Expected \"%s\", got \"%s\"\n", path, value); - ok(size == lstrlenA(path), "Expected %d, got %d\n", lstrlenA(path), size); - } - - r = MsiInstallProductA("msifile0.msi", "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - /* separate cabinet file */ - - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCE, value, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %u\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value); - - r = MsiInstallProductA("msifile1.msi", "PUBLISH_PRODUCT=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - lstrcpyA(path, CURR_DIR); - lstrcatA(path, "\\"); - - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCE, value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - todo_wine - { - ok(!lstrcmpA(value, path), "Expected \"%s\", got \"%s\"\n", path, value); - ok(size == lstrlenA(path), "Expected %d, got %d\n", lstrlenA(path), size); - } - - r = MsiInstallProductA("msifile1.msi", "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCE, value, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %u\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value); - - /* embedded cabinet stream */ - - add_cabinet_storage("msifile2.msi", "test1.cab"); - - r = MsiInstallProductA("msifile2.msi", "PUBLISH_PRODUCT=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCE, value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - todo_wine - { - ok(!lstrcmpA(value, path), "Expected \"%s\", got \"%s\"\n", path, value); - ok(size == lstrlenA(path), "Expected %d, got %d\n", lstrlenA(path), size); - } - - r = MsiInstallProductA("msifile2.msi", "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCE, value, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %u\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value); - - /* Delete the files in the temp (current) folder */ - delete_cab_files(); - DeleteFile("msitest\\maximus"); - RemoveDirectory("msitest"); - DeleteFile("msifile0.msi"); - DeleteFile("msifile1.msi"); - DeleteFile("msifile2.msi"); -} - -static void test_setdirproperty(void) -{ - UINT r; - - CreateDirectoryA("msitest", NULL); - create_file("msitest\\maximus", 500); - create_database(msifile, sdp_tables, sizeof(sdp_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(delete_cf("msitest\\maximus", TRUE), "File not installed\n"); - ok(delete_cf("msitest", FALSE), "File not installed\n"); - - /* Delete the files in the temp (current) folder */ - DeleteFile(msifile); - DeleteFile("msitest\\maximus"); - RemoveDirectory("msitest"); -} - -static void test_cabisextracted(void) -{ - UINT r; - - CreateDirectoryA("msitest", NULL); - create_file("msitest\\gaius", 500); - create_file("maximus", 500); - create_file("augustus", 500); - create_file("caesar", 500); - - create_cab_file("test1.cab", MEDIA_SIZE, "maximus\0"); - create_cab_file("test2.cab", MEDIA_SIZE, "augustus\0"); - create_cab_file("test3.cab", MEDIA_SIZE, "caesar\0"); - - create_database(msifile, cie_tables, sizeof(cie_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\caesar", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\gaius", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - /* Delete the files in the temp (current) folder */ - delete_cab_files(); - DeleteFile(msifile); - DeleteFile("maximus"); - DeleteFile("augustus"); - DeleteFile("caesar"); - DeleteFile("msitest\\gaius"); - RemoveDirectory("msitest"); -} - -static void test_concurrentinstall(void) -{ - UINT r; - CHAR path[MAX_PATH]; - - CreateDirectoryA("msitest", NULL); - CreateDirectoryA("msitest\\msitest", NULL); - create_file("msitest\\maximus", 500); - create_file("msitest\\msitest\\augustus", 500); - - create_database(msifile, ci_tables, sizeof(ci_tables) / sizeof(msi_table)); - - lstrcpyA(path, CURR_DIR); - lstrcatA(path, "\\msitest\\concurrent.msi"); - create_database(path, ci2_tables, sizeof(ci2_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_FULL, NULL); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - if (!delete_pf("msitest\\augustus", TRUE)) - trace("concurrent installs not supported\n"); - ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - DeleteFile(path); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); - ok(!delete_pf("msitest\\augustus", TRUE), "File installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - DeleteFile(msifile); - DeleteFile("msitest\\msitest\\augustus"); - DeleteFile("msitest\\maximus"); - RemoveDirectory("msitest\\msitest"); - RemoveDirectory("msitest"); -} - -static void test_setpropertyfolder(void) -{ - UINT r; - CHAR path[MAX_PATH]; - DWORD attr; - - lstrcpyA(path, PROG_FILES_DIR); - lstrcatA(path, "\\msitest\\added"); - - CreateDirectoryA("msitest", NULL); - create_file("msitest\\maximus", 500); - - create_database(msifile, spf_tables, sizeof(spf_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_FULL, NULL); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - attr = GetFileAttributesA(path); - if (attr != INVALID_FILE_ATTRIBUTES && (attr & FILE_ATTRIBUTE_DIRECTORY)) - { - ok(delete_pf("msitest\\added\\maximus", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\added", FALSE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - } - else - { - trace("changing folder property not supported\n"); - ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - } - - /* Delete the files in the temp (current) folder */ - DeleteFile(msifile); - DeleteFile("msitest\\maximus"); - RemoveDirectory("msitest"); -} - -static BOOL file_exists(LPCSTR file) -{ - return GetFileAttributes(file) != INVALID_FILE_ATTRIBUTES; -} - -static BOOL pf_exists(LPCSTR file) -{ - CHAR path[MAX_PATH]; - - lstrcpyA(path, PROG_FILES_DIR); - lstrcatA(path, "\\"); - lstrcatA(path, file); - - return file_exists(path); -} - -static void delete_pfmsitest_files(void) -{ - SHFILEOPSTRUCT shfl; - CHAR path[MAX_PATH+11]; - - lstrcpyA(path, PROG_FILES_DIR); - lstrcatA(path, "\\msitest\\*"); - path[strlen(path) + 1] = '\0'; - - shfl.hwnd = NULL; - shfl.wFunc = FO_DELETE; - shfl.pFrom = path; - shfl.pTo = NULL; - shfl.fFlags = FOF_FILESONLY | FOF_NOCONFIRMATION | FOF_NORECURSION | FOF_SILENT; - - SHFileOperation(&shfl); - - lstrcpyA(path, PROG_FILES_DIR); - lstrcatA(path, "\\msitest"); - RemoveDirectoryA(path); -} - -static void check_reg_str(HKEY prodkey, LPCSTR name, LPCSTR expected, BOOL bcase, DWORD line) -{ - char val[MAX_PATH]; - DWORD size, type; - LONG res; - - size = MAX_PATH; - val[0] = '\0'; - res = RegQueryValueExA(prodkey, name, NULL, &type, (LPBYTE)val, &size); - - if (res != ERROR_SUCCESS || - (type != REG_SZ && type != REG_EXPAND_SZ && type != REG_MULTI_SZ)) - { - ok_(__FILE__, line)(FALSE, "Key doesn't exist or wrong type\n"); - return; - } - - if (!expected) - ok_(__FILE__, line)(lstrlenA(val) == 0, "Expected empty string, got %s\n", val); - else - { - if (bcase) - ok_(__FILE__, line)(!lstrcmpA(val, expected), "Expected %s, got %s\n", expected, val); - else - ok_(__FILE__, line)(!lstrcmpiA(val, expected), "Expected %s, got %s\n", expected, val); - } -} - -static void check_reg_dword(HKEY prodkey, LPCSTR name, DWORD expected, DWORD line) -{ - DWORD val, size, type; - LONG res; - - size = sizeof(DWORD); - res = RegQueryValueExA(prodkey, name, NULL, &type, (LPBYTE)&val, &size); - - if (res != ERROR_SUCCESS || type != REG_DWORD) - { - ok_(__FILE__, line)(FALSE, "Key doesn't exist or wrong type\n"); - return; - } - - ok_(__FILE__, line)(val == expected, "Expected %d, got %d\n", expected, val); -} - -static void check_reg_dword2(HKEY prodkey, LPCSTR name, DWORD expected1, DWORD expected2, DWORD line) -{ - DWORD val, size, type; - LONG res; - - size = sizeof(DWORD); - res = RegQueryValueExA(prodkey, name, NULL, &type, (LPBYTE)&val, &size); - - if (res != ERROR_SUCCESS || type != REG_DWORD) - { - ok_(__FILE__, line)(FALSE, "Key doesn't exist or wrong type\n"); - return; - } - - ok_(__FILE__, line)(val == expected1 || val == expected2, "Expected %d or %d, got %d\n", expected1, expected2, val); -} - -static void check_reg_dword3(HKEY prodkey, LPCSTR name, DWORD expected1, DWORD expected2, DWORD expected3, DWORD line) -{ - DWORD val, size, type; - LONG res; - - size = sizeof(DWORD); - res = RegQueryValueExA(prodkey, name, NULL, &type, (LPBYTE)&val, &size); - - if (res != ERROR_SUCCESS || type != REG_DWORD) - { - ok_(__FILE__, line)(FALSE, "Key doesn't exist or wrong type\n"); - return; - } - - ok_(__FILE__, line)(val == expected1 || val == expected2 || val == expected3, - "Expected %d, %d or %d, got %d\n", expected1, expected2, expected3, val); -} - -#define CHECK_REG_STR(prodkey, name, expected) \ - check_reg_str(prodkey, name, expected, TRUE, __LINE__); - -#define CHECK_DEL_REG_STR(prodkey, name, expected) \ - check_reg_str(prodkey, name, expected, TRUE, __LINE__); \ - RegDeleteValueA(prodkey, name); - -#define CHECK_REG_ISTR(prodkey, name, expected) \ - check_reg_str(prodkey, name, expected, FALSE, __LINE__); - -#define CHECK_DEL_REG_ISTR(prodkey, name, expected) \ - check_reg_str(prodkey, name, expected, FALSE, __LINE__); \ - RegDeleteValueA(prodkey, name); - -#define CHECK_REG_DWORD(prodkey, name, expected) \ - check_reg_dword(prodkey, name, expected, __LINE__); - -#define CHECK_DEL_REG_DWORD(prodkey, name, expected) \ - check_reg_dword(prodkey, name, expected, __LINE__); \ - RegDeleteValueA(prodkey, name); - -#define CHECK_REG_DWORD2(prodkey, name, expected1, expected2) \ - check_reg_dword2(prodkey, name, expected1, expected2, __LINE__); - -#define CHECK_DEL_REG_DWORD2(prodkey, name, expected1, expected2) \ - check_reg_dword2(prodkey, name, expected1, expected2, __LINE__); \ - RegDeleteValueA(prodkey, name); - -#define CHECK_REG_DWORD3(prodkey, name, expected1, expected2, expected3) \ - check_reg_dword3(prodkey, name, expected1, expected2, expected3, __LINE__); - -#define CHECK_DEL_REG_DWORD3(prodkey, name, expected1, expected2, expected3) \ - check_reg_dword3(prodkey, name, expected1, expected2, expected3, __LINE__); \ - RegDeleteValueA(prodkey, name); - -static void get_date_str(LPSTR date) -{ - SYSTEMTIME systime; - - static const char date_fmt[] = "%d%02d%02d"; - GetLocalTime(&systime); - sprintf(date, date_fmt, systime.wYear, systime.wMonth, systime.wDay); -} - -static void test_publish_registerproduct(void) -{ - UINT r; - LONG res; - HKEY hkey; - HKEY props, usage; - LPSTR usersid; - char date[MAX_PATH]; - char temp[MAX_PATH]; - char keypath[MAX_PATH]; - - static const CHAR uninstall[] = "Software\\Microsoft\\Windows\\CurrentVersion" - "\\Uninstall\\{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"; - static const CHAR userdata[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Installer" - "\\UserData\\%s\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB"; - static const CHAR ugkey[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Installer" - "\\UpgradeCodes\\51AAE0C44620A5E4788506E91F249BD2"; - static const CHAR userugkey[] = "Software\\Microsoft\\Installer\\UpgradeCodes" - "\\51AAE0C44620A5E4788506E91F249BD2"; - - if (!get_user_sid(&usersid)) - return; - - get_date_str(date); - GetTempPath(MAX_PATH, temp); - - CreateDirectoryA("msitest", NULL); - create_file("msitest\\maximus", 500); - - create_database(msifile, pp_tables, sizeof(pp_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_FULL, NULL); - - /* RegisterProduct */ - r = MsiInstallProductA(msifile, "REGISTER_PRODUCT=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - res = RegOpenKeyA(HKEY_CURRENT_USER, userugkey, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, uninstall, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_DEL_REG_STR(hkey, "DisplayName", "MSITEST"); - CHECK_DEL_REG_STR(hkey, "DisplayVersion", "1.1.1"); - CHECK_DEL_REG_STR(hkey, "InstallDate", date); - CHECK_DEL_REG_STR(hkey, "InstallSource", temp); - CHECK_DEL_REG_ISTR(hkey, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_DEL_REG_STR(hkey, "Publisher", "Wine"); - CHECK_DEL_REG_STR(hkey, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_DEL_REG_STR(hkey, "AuthorizedCDFPrefix", NULL); - CHECK_DEL_REG_STR(hkey, "Comments", NULL); - CHECK_DEL_REG_STR(hkey, "Contact", NULL); - CHECK_DEL_REG_STR(hkey, "HelpLink", NULL); - CHECK_DEL_REG_STR(hkey, "HelpTelephone", NULL); - CHECK_DEL_REG_STR(hkey, "InstallLocation", NULL); - CHECK_DEL_REG_STR(hkey, "Readme", NULL); - CHECK_DEL_REG_STR(hkey, "Size", NULL); - CHECK_DEL_REG_STR(hkey, "URLInfoAbout", NULL); - CHECK_DEL_REG_STR(hkey, "URLUpdateInfo", NULL); - CHECK_DEL_REG_DWORD(hkey, "Language", 1033); - CHECK_DEL_REG_DWORD(hkey, "Version", 0x1010001); - CHECK_DEL_REG_DWORD(hkey, "VersionMajor", 1); - CHECK_DEL_REG_DWORD(hkey, "VersionMinor", 1); - CHECK_DEL_REG_DWORD(hkey, "WindowsInstaller", 1); - todo_wine - { - CHECK_DEL_REG_DWORD3(hkey, "EstimatedSize", 12, -12, 4); - } - - RegDeleteKeyA(hkey, ""); - RegCloseKey(hkey); - - sprintf(keypath, userdata, usersid); - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, keypath, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = RegOpenKeyA(hkey, "InstallProperties", &props); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - RegDeleteValueA(props, "LocalPackage"); /* LocalPackage is nondeterministic */ - CHECK_DEL_REG_STR(props, "DisplayName", "MSITEST"); - CHECK_DEL_REG_STR(props, "DisplayVersion", "1.1.1"); - CHECK_DEL_REG_STR(props, "InstallDate", date); - CHECK_DEL_REG_STR(props, "InstallSource", temp); - CHECK_DEL_REG_ISTR(props, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_DEL_REG_STR(props, "Publisher", "Wine"); - CHECK_DEL_REG_STR(props, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_DEL_REG_STR(props, "AuthorizedCDFPrefix", NULL); - CHECK_DEL_REG_STR(props, "Comments", NULL); - CHECK_DEL_REG_STR(props, "Contact", NULL); - CHECK_DEL_REG_STR(props, "HelpLink", NULL); - CHECK_DEL_REG_STR(props, "HelpTelephone", NULL); - CHECK_DEL_REG_STR(props, "InstallLocation", NULL); - CHECK_DEL_REG_STR(props, "Readme", NULL); - CHECK_DEL_REG_STR(props, "Size", NULL); - CHECK_DEL_REG_STR(props, "URLInfoAbout", NULL); - CHECK_DEL_REG_STR(props, "URLUpdateInfo", NULL); - CHECK_DEL_REG_DWORD(props, "Language", 1033); - CHECK_DEL_REG_DWORD(props, "Version", 0x1010001); - CHECK_DEL_REG_DWORD(props, "VersionMajor", 1); - CHECK_DEL_REG_DWORD(props, "VersionMinor", 1); - CHECK_DEL_REG_DWORD(props, "WindowsInstaller", 1); - todo_wine - { - CHECK_DEL_REG_DWORD3(props, "EstimatedSize", 12, -12, 4); - } - - RegDeleteKeyA(props, ""); - RegCloseKey(props); - - res = RegOpenKeyA(hkey, "Usage", &usage); - todo_wine - { - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - } - - RegDeleteKeyA(usage, ""); - RegCloseKey(usage); - RegDeleteKeyA(hkey, ""); - RegCloseKey(hkey); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, ugkey, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL); - - RegDeleteKeyA(hkey, ""); - RegCloseKey(hkey); - - /* RegisterProduct, machine */ - r = MsiInstallProductA(msifile, "REGISTER_PRODUCT=1 ALLUSERS=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, userugkey, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, uninstall, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_DEL_REG_STR(hkey, "DisplayName", "MSITEST"); - CHECK_DEL_REG_STR(hkey, "DisplayVersion", "1.1.1"); - CHECK_DEL_REG_STR(hkey, "InstallDate", date); - CHECK_DEL_REG_STR(hkey, "InstallSource", temp); - CHECK_DEL_REG_ISTR(hkey, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_DEL_REG_STR(hkey, "Publisher", "Wine"); - CHECK_DEL_REG_STR(hkey, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_DEL_REG_STR(hkey, "AuthorizedCDFPrefix", NULL); - CHECK_DEL_REG_STR(hkey, "Comments", NULL); - CHECK_DEL_REG_STR(hkey, "Contact", NULL); - CHECK_DEL_REG_STR(hkey, "HelpLink", NULL); - CHECK_DEL_REG_STR(hkey, "HelpTelephone", NULL); - CHECK_DEL_REG_STR(hkey, "InstallLocation", NULL); - CHECK_DEL_REG_STR(hkey, "Readme", NULL); - CHECK_DEL_REG_STR(hkey, "Size", NULL); - CHECK_DEL_REG_STR(hkey, "URLInfoAbout", NULL); - CHECK_DEL_REG_STR(hkey, "URLUpdateInfo", NULL); - CHECK_DEL_REG_DWORD(hkey, "Language", 1033); - CHECK_DEL_REG_DWORD(hkey, "Version", 0x1010001); - CHECK_DEL_REG_DWORD(hkey, "VersionMajor", 1); - CHECK_DEL_REG_DWORD(hkey, "VersionMinor", 1); - CHECK_DEL_REG_DWORD(hkey, "WindowsInstaller", 1); - todo_wine - { - CHECK_DEL_REG_DWORD3(hkey, "EstimatedSize", 12, -12, 4); - } - - RegDeleteKeyA(hkey, ""); - RegCloseKey(hkey); - - sprintf(keypath, userdata, "S-1-5-18"); - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, keypath, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = RegOpenKeyA(hkey, "InstallProperties", &props); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - RegDeleteValueA(props, "LocalPackage"); /* LocalPackage is nondeterministic */ - CHECK_DEL_REG_STR(props, "DisplayName", "MSITEST"); - CHECK_DEL_REG_STR(props, "DisplayVersion", "1.1.1"); - CHECK_DEL_REG_STR(props, "InstallDate", date); - CHECK_DEL_REG_STR(props, "InstallSource", temp); - CHECK_DEL_REG_ISTR(props, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_DEL_REG_STR(props, "Publisher", "Wine"); - CHECK_DEL_REG_STR(props, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_DEL_REG_STR(props, "AuthorizedCDFPrefix", NULL); - CHECK_DEL_REG_STR(props, "Comments", NULL); - CHECK_DEL_REG_STR(props, "Contact", NULL); - CHECK_DEL_REG_STR(props, "HelpLink", NULL); - CHECK_DEL_REG_STR(props, "HelpTelephone", NULL); - CHECK_DEL_REG_STR(props, "InstallLocation", NULL); - CHECK_DEL_REG_STR(props, "Readme", NULL); - CHECK_DEL_REG_STR(props, "Size", NULL); - CHECK_DEL_REG_STR(props, "URLInfoAbout", NULL); - CHECK_DEL_REG_STR(props, "URLUpdateInfo", NULL); - CHECK_DEL_REG_DWORD(props, "Language", 1033); - CHECK_DEL_REG_DWORD(props, "Version", 0x1010001); - CHECK_DEL_REG_DWORD(props, "VersionMajor", 1); - CHECK_DEL_REG_DWORD(props, "VersionMinor", 1); - CHECK_DEL_REG_DWORD(props, "WindowsInstaller", 1); - todo_wine - { - CHECK_DEL_REG_DWORD3(props, "EstimatedSize", 12, -12, 4); - } - - RegDeleteKeyA(props, ""); - RegCloseKey(props); - - res = RegOpenKeyA(hkey, "Usage", &usage); - todo_wine - { - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - } - - RegDeleteKeyA(usage, ""); - RegCloseKey(usage); - RegDeleteKeyA(hkey, ""); - RegCloseKey(hkey); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, ugkey, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL); - - RegDeleteKeyA(hkey, ""); - RegCloseKey(hkey); - - DeleteFile(msifile); - DeleteFile("msitest\\maximus"); - RemoveDirectory("msitest"); - HeapFree(GetProcessHeap(), 0, usersid); -} - -static void test_publish_publishproduct(void) -{ - UINT r; - LONG res; - LPSTR usersid; - HKEY sourcelist, net, props; - HKEY hkey, patches, media; - CHAR keypath[MAX_PATH]; - CHAR temp[MAX_PATH]; - CHAR path[MAX_PATH]; - BOOL old_installer = FALSE; - - static const CHAR prodpath[] = "Software\\Microsoft\\Windows\\CurrentVersion" - "\\Installer\\UserData\\%s\\Products" - "\\84A88FD7F6998CE40A22FB59F6B9C2BB"; - static const CHAR cuprodpath[] = "Software\\Microsoft\\Installer\\Products" - "\\84A88FD7F6998CE40A22FB59F6B9C2BB"; - static const CHAR cuupgrades[] = "Software\\Microsoft\\Installer\\UpgradeCodes" - "\\51AAE0C44620A5E4788506E91F249BD2"; - static const CHAR badprod[] = "Software\\Microsoft\\Windows\\CurrentVersion" - "\\Installer\\Products" - "\\84A88FD7F6998CE40A22FB59F6B9C2BB"; - static const CHAR machprod[] = "Installer\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB"; - static const CHAR machup[] = "Installer\\UpgradeCodes\\51AAE0C44620A5E4788506E91F249BD2"; - - if (!get_user_sid(&usersid)) - return; - - GetTempPath(MAX_PATH, temp); - - CreateDirectoryA("msitest", NULL); - create_file("msitest\\maximus", 500); - - create_database(msifile, pp_tables, sizeof(pp_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_FULL, NULL); - - /* PublishProduct, current user */ - r = MsiInstallProductA(msifile, "PUBLISH_PRODUCT=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, badprod, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - sprintf(keypath, prodpath, usersid); - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, keypath, &hkey); - if (res == ERROR_FILE_NOT_FOUND) - { - res = RegOpenKeyA(HKEY_CURRENT_USER, cuprodpath, &hkey); - if (res == ERROR_SUCCESS) - { - win_skip("Windows Installer < 3.0 detected\n"); - RegCloseKey(hkey); - old_installer = TRUE; - goto currentuser; - } - else - { - win_skip("Install failed, no need to continue\n"); - return; - } - } - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = RegOpenKeyA(hkey, "InstallProperties", &props); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - res = RegOpenKeyA(hkey, "Patches", &patches); - todo_wine - { - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_DEL_REG_STR(patches, "AllPatches", NULL); - } - - RegDeleteKeyA(patches, ""); - RegCloseKey(patches); - RegDeleteKeyA(hkey, ""); - RegCloseKey(hkey); - -currentuser: - res = RegOpenKeyA(HKEY_CURRENT_USER, cuprodpath, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_DEL_REG_STR(hkey, "ProductName", "MSITEST"); - CHECK_DEL_REG_STR(hkey, "PackageCode", "AC75740029052c94DA02821EECD05F2F"); - CHECK_DEL_REG_DWORD(hkey, "Language", 1033); - CHECK_DEL_REG_DWORD(hkey, "Version", 0x1010001); - if (!old_installer) - CHECK_DEL_REG_DWORD(hkey, "AuthorizedLUAApp", 0); - CHECK_DEL_REG_DWORD(hkey, "Assignment", 0); - CHECK_DEL_REG_DWORD(hkey, "AdvertiseFlags", 0x184); - CHECK_DEL_REG_DWORD(hkey, "InstanceType", 0); - CHECK_DEL_REG_STR(hkey, "Clients", ":"); - - res = RegOpenKeyA(hkey, "SourceList", &sourcelist); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - lstrcpyA(path, "n;1;"); - lstrcatA(path, temp); - CHECK_DEL_REG_STR(sourcelist, "LastUsedSource", path); - CHECK_DEL_REG_STR(sourcelist, "PackageName", "msitest.msi"); - - res = RegOpenKeyA(sourcelist, "Net", &net); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_DEL_REG_STR(net, "1", temp); - - RegDeleteKeyA(net, ""); - RegCloseKey(net); - - res = RegOpenKeyA(sourcelist, "Media", &media); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_DEL_REG_STR(media, "1", "DISK1;"); - - RegDeleteKeyA(media, ""); - RegCloseKey(media); - RegDeleteKeyA(sourcelist, ""); - RegCloseKey(sourcelist); - RegDeleteKeyA(hkey, ""); - RegCloseKey(hkey); - - res = RegOpenKeyA(HKEY_CURRENT_USER, cuupgrades, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL); - - RegDeleteKeyA(hkey, ""); - RegCloseKey(hkey); - - /* PublishProduct, machine */ - r = MsiInstallProductA(msifile, "PUBLISH_PRODUCT=1 ALLUSERS=1"); - if (old_installer) - goto machprod; - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, badprod, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - sprintf(keypath, prodpath, "S-1-5-18"); - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, keypath, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = RegOpenKeyA(hkey, "InstallProperties", &props); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - res = RegOpenKeyA(hkey, "Patches", &patches); - todo_wine - { - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_DEL_REG_STR(patches, "AllPatches", NULL); - } - - RegDeleteKeyA(patches, ""); - RegCloseKey(patches); - RegDeleteKeyA(hkey, ""); - RegCloseKey(hkey); - -machprod: - res = RegOpenKeyA(HKEY_CLASSES_ROOT, machprod, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_DEL_REG_STR(hkey, "ProductName", "MSITEST"); - CHECK_DEL_REG_STR(hkey, "PackageCode", "AC75740029052c94DA02821EECD05F2F"); - CHECK_DEL_REG_DWORD(hkey, "Language", 1033); - CHECK_DEL_REG_DWORD(hkey, "Version", 0x1010001); - if (!old_installer) - CHECK_DEL_REG_DWORD(hkey, "AuthorizedLUAApp", 0); - todo_wine CHECK_DEL_REG_DWORD(hkey, "Assignment", 1); - CHECK_DEL_REG_DWORD(hkey, "AdvertiseFlags", 0x184); - CHECK_DEL_REG_DWORD(hkey, "InstanceType", 0); - CHECK_DEL_REG_STR(hkey, "Clients", ":"); - - res = RegOpenKeyA(hkey, "SourceList", &sourcelist); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - lstrcpyA(path, "n;1;"); - lstrcatA(path, temp); - CHECK_DEL_REG_STR(sourcelist, "LastUsedSource", path); - CHECK_DEL_REG_STR(sourcelist, "PackageName", "msitest.msi"); - - res = RegOpenKeyA(sourcelist, "Net", &net); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_DEL_REG_STR(net, "1", temp); - - RegDeleteKeyA(net, ""); - RegCloseKey(net); - - res = RegOpenKeyA(sourcelist, "Media", &media); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_DEL_REG_STR(media, "1", "DISK1;"); - - RegDeleteKeyA(media, ""); - RegCloseKey(media); - RegDeleteKeyA(sourcelist, ""); - RegCloseKey(sourcelist); - RegDeleteKeyA(hkey, ""); - RegCloseKey(hkey); - - res = RegOpenKeyA(HKEY_CLASSES_ROOT, machup, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL); - - RegDeleteKeyA(hkey, ""); - RegCloseKey(hkey); - - DeleteFile(msifile); - DeleteFile("msitest\\maximus"); - RemoveDirectory("msitest"); - HeapFree(GetProcessHeap(), 0, usersid); -} - -static void test_publish_publishfeatures(void) -{ - UINT r; - LONG res; - HKEY hkey; - LPSTR usersid; - CHAR keypath[MAX_PATH]; - - static const CHAR cupath[] = "Software\\Microsoft\\Installer\\Features" - "\\84A88FD7F6998CE40A22FB59F6B9C2BB"; - static const CHAR udpath[] = "Software\\Microsoft\\Windows\\CurrentVersion" - "\\Installer\\UserData\\%s\\Products" - "\\84A88FD7F6998CE40A22FB59F6B9C2BB\\Features"; - static const CHAR featkey[] = "Software\\Microsoft\\Windows\\CurrentVersion" - "\\Installer\\Features"; - static const CHAR classfeat[] = "Software\\Classes\\Installer\\Features" - "\\84A88FD7F6998CE40A22FB59F6B9C2BB"; - - if (!get_user_sid(&usersid)) - return; - - CreateDirectoryA("msitest", NULL); - create_file("msitest\\maximus", 500); - - create_database(msifile, pp_tables, sizeof(pp_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_FULL, NULL); - - /* PublishFeatures, current user */ - r = MsiInstallProductA(msifile, "PUBLISH_FEATURES=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, featkey, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, classfeat, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - res = RegOpenKeyA(HKEY_CURRENT_USER, cupath, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_REG_STR(hkey, "feature", ""); - CHECK_REG_STR(hkey, "montecristo", ""); - - RegDeleteValueA(hkey, "feature"); - RegDeleteValueA(hkey, "montecristo"); - RegDeleteKeyA(hkey, ""); - RegCloseKey(hkey); - - sprintf(keypath, udpath, usersid); - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, keypath, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_REG_STR(hkey, "feature", "VGtfp^p+,?82@JU1j_KE"); - CHECK_REG_STR(hkey, "montecristo", "VGtfp^p+,?82@JU1j_KE"); - - RegDeleteValueA(hkey, "feature"); - RegDeleteValueA(hkey, "montecristo"); - RegDeleteKeyA(hkey, ""); - RegCloseKey(hkey); - - /* PublishFeatures, machine */ - r = MsiInstallProductA(msifile, "PUBLISH_FEATURES=1 ALLUSERS=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, featkey, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - res = RegOpenKeyA(HKEY_CURRENT_USER, cupath, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, classfeat, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_REG_STR(hkey, "feature", ""); - CHECK_REG_STR(hkey, "montecristo", ""); - - RegDeleteValueA(hkey, "feature"); - RegDeleteValueA(hkey, "montecristo"); - RegDeleteKeyA(hkey, ""); - RegCloseKey(hkey); - - sprintf(keypath, udpath, "S-1-5-18"); - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, keypath, &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_REG_STR(hkey, "feature", "VGtfp^p+,?82@JU1j_KE"); - CHECK_REG_STR(hkey, "montecristo", "VGtfp^p+,?82@JU1j_KE"); - - RegDeleteValueA(hkey, "feature"); - RegDeleteValueA(hkey, "montecristo"); - RegDeleteKeyA(hkey, ""); - RegCloseKey(hkey); - - DeleteFile(msifile); - DeleteFile("msitest\\maximus"); - RemoveDirectory("msitest"); - HeapFree(GetProcessHeap(), 0, usersid); -} - -static LPSTR reg_get_val_str(HKEY hkey, LPCSTR name) -{ - DWORD len = 0; - LPSTR val; - LONG r; - - r = RegQueryValueExA(hkey, name, NULL, NULL, NULL, &len); - if (r != ERROR_SUCCESS) - return NULL; - - len += sizeof (WCHAR); - val = HeapAlloc(GetProcessHeap(), 0, len); - if (!val) return NULL; - val[0] = 0; - RegQueryValueExA(hkey, name, NULL, NULL, (LPBYTE)val, &len); - return val; -} - -static void get_owner_company(LPSTR *owner, LPSTR *company) -{ - LONG res; - HKEY hkey; - - *owner = *company = NULL; - - res = RegOpenKeyA(HKEY_CURRENT_USER, - "Software\\Microsoft\\MS Setup (ACME)\\User Info", &hkey); - if (res == ERROR_SUCCESS) - { - *owner = reg_get_val_str(hkey, "DefName"); - *company = reg_get_val_str(hkey, "DefCompany"); - RegCloseKey(hkey); - } - - if (!*owner || !*company) - { - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, - "Software\\Microsoft\\Windows\\CurrentVersion", &hkey); - if (res == ERROR_SUCCESS) - { - *owner = reg_get_val_str(hkey, "RegisteredOwner"); - *company = reg_get_val_str(hkey, "RegisteredOrganization"); - RegCloseKey(hkey); - } - } - - if (!*owner || !*company) - { - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, - "Software\\Microsoft\\Windows NT\\CurrentVersion", &hkey); - if (res == ERROR_SUCCESS) - { - *owner = reg_get_val_str(hkey, "RegisteredOwner"); - *company = reg_get_val_str(hkey, "RegisteredOrganization"); - RegCloseKey(hkey); - } - } -} - -static void test_publish_registeruser(void) -{ - UINT r; - LONG res; - HKEY props; - LPSTR usersid; - LPSTR owner, company; - CHAR keypath[MAX_PATH]; - - static const CHAR keyfmt[] = - "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\" - "UserData\\%s\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB\\InstallProperties"; - - if (!get_user_sid(&usersid)) - return; - - get_owner_company(&owner, &company); - - CreateDirectoryA("msitest", NULL); - create_file("msitest\\maximus", 500); - - create_database(msifile, pp_tables, sizeof(pp_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_FULL, NULL); - - /* RegisterUser, per-user */ - r = MsiInstallProductA(msifile, "REGISTER_USER=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - sprintf(keypath, keyfmt, usersid); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, keypath, &props); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_REG_STR(props, "ProductID", "none"); - CHECK_REG_STR(props, "RegCompany", company); - CHECK_REG_STR(props, "RegOwner", owner); - - RegDeleteValueA(props, "ProductID"); - RegDeleteValueA(props, "RegCompany"); - RegDeleteValueA(props, "RegOwner"); - RegDeleteKeyA(props, ""); - RegCloseKey(props); - - /* RegisterUser, machine */ - r = MsiInstallProductA(msifile, "REGISTER_USER=1 ALLUSERS=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - sprintf(keypath, keyfmt, "S-1-5-18"); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, keypath, &props); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_REG_STR(props, "ProductID", "none"); - CHECK_REG_STR(props, "RegCompany", company); - CHECK_REG_STR(props, "RegOwner", owner); - - RegDeleteValueA(props, "ProductID"); - RegDeleteValueA(props, "RegCompany"); - RegDeleteValueA(props, "RegOwner"); - RegDeleteKeyA(props, ""); - RegCloseKey(props); - - HeapFree(GetProcessHeap(), 0, company); - HeapFree(GetProcessHeap(), 0, owner); - - DeleteFile(msifile); - DeleteFile("msitest\\maximus"); - RemoveDirectory("msitest"); - LocalFree(usersid); -} - -static void test_publish_processcomponents(void) -{ - UINT r; - LONG res; - DWORD size; - HKEY comp, hkey; - LPSTR usersid; - CHAR val[MAX_PATH]; - CHAR keypath[MAX_PATH]; - CHAR program_files_maximus[MAX_PATH]; - - static const CHAR keyfmt[] = - "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\" - "UserData\\%s\\Components\\%s"; - static const CHAR compkey[] = - "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Components"; - - if (!get_user_sid(&usersid)) - return; - - CreateDirectoryA("msitest", NULL); - create_file("msitest\\maximus", 500); - - create_database(msifile, ppc_tables, sizeof(ppc_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_FULL, NULL); - - /* ProcessComponents, per-user */ - r = MsiInstallProductA(msifile, "PROCESS_COMPONENTS=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - sprintf(keypath, keyfmt, usersid, "CBABC2FDCCB35E749A8944D8C1C098B5"); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, keypath, &comp); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - size = MAX_PATH; - res = RegQueryValueExA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB", - NULL, NULL, (LPBYTE)val, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - lstrcpyA(program_files_maximus,PROG_FILES_DIR); - lstrcatA(program_files_maximus,"\\msitest\\maximus"); - - ok(!lstrcmpiA(val, program_files_maximus), - "Expected \"%s\", got \"%s\"\n", program_files_maximus, val); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, compkey, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - RegDeleteValueA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB"); - RegDeleteKeyA(comp, ""); - RegCloseKey(comp); - - sprintf(keypath, keyfmt, usersid, "241C3DA58FECD0945B9687D408766058"); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, keypath, &comp); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - size = MAX_PATH; - res = RegQueryValueExA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB", - NULL, NULL, (LPBYTE)val, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(val, "01\\msitest\\augustus"), - "Expected \"01\\msitest\\augustus\", got \"%s\"\n", val); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, compkey, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - RegDeleteValueA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB"); - RegDeleteKeyA(comp, ""); - RegCloseKey(comp); - - /* ProcessComponents, machine */ - r = MsiInstallProductA(msifile, "PROCESS_COMPONENTS=1 ALLUSERS=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "File not installed\n"); - - sprintf(keypath, keyfmt, "S-1-5-18", "CBABC2FDCCB35E749A8944D8C1C098B5"); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, keypath, &comp); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - size = MAX_PATH; - res = RegQueryValueExA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB", - NULL, NULL, (LPBYTE)val, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpiA(val, program_files_maximus), - "Expected \"%s\", got \"%s\"\n", program_files_maximus, val); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, compkey, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - RegDeleteValueA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB"); - RegDeleteKeyA(comp, ""); - RegCloseKey(comp); - - sprintf(keypath, keyfmt, "S-1-5-18", "241C3DA58FECD0945B9687D408766058"); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, keypath, &comp); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - size = MAX_PATH; - res = RegQueryValueExA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB", - NULL, NULL, (LPBYTE)val, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(val, "01\\msitest\\augustus"), - "Expected \"01\\msitest\\augustus\", got \"%s\"\n", val); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, compkey, &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - RegDeleteValueA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB"); - RegDeleteKeyA(comp, ""); - RegCloseKey(comp); - - DeleteFile(msifile); - DeleteFile("msitest\\maximus"); - RemoveDirectory("msitest"); - LocalFree(usersid); -} - -static void test_publish(void) -{ - UINT r; - LONG res; - HKEY uninstall, prodkey; - INSTALLSTATE state; - CHAR prodcode[] = "{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"; - char date[MAX_PATH]; - char temp[MAX_PATH]; - - static const CHAR subkey[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall"; - - if (!pMsiQueryComponentStateA) - { - win_skip("MsiQueryComponentStateA is not available\n"); - return; - } - - get_date_str(date); - GetTempPath(MAX_PATH, temp); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, subkey, &uninstall); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CreateDirectoryA("msitest", NULL); - create_file("msitest\\maximus", 500); - - create_database(msifile, pp_tables, sizeof(pp_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_FULL, NULL); - - state = MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - res = RegOpenKeyA(uninstall, prodcode, &prodkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - /* nothing published */ - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(pf_exists("msitest\\maximus"), "File not installed\n"); - ok(pf_exists("msitest"), "File not installed\n"); - - state = MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - res = RegOpenKeyA(uninstall, prodcode, &prodkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - /* PublishProduct and RegisterProduct */ - r = MsiInstallProductA(msifile, "REGISTER_PRODUCT=1 PUBLISH_PRODUCT=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(pf_exists("msitest\\maximus"), "File not installed\n"); - ok(pf_exists("msitest"), "File not installed\n"); - - state = MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - res = RegOpenKeyA(uninstall, prodcode, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_REG_STR(prodkey, "DisplayName", "MSITEST"); - CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1"); - CHECK_REG_STR(prodkey, "InstallDate", date); - CHECK_REG_STR(prodkey, "InstallSource", temp); - CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_REG_STR(prodkey, "Publisher", "Wine"); - CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", NULL); - CHECK_REG_STR(prodkey, "Comments", NULL); - CHECK_REG_STR(prodkey, "Contact", NULL); - CHECK_REG_STR(prodkey, "HelpLink", NULL); - CHECK_REG_STR(prodkey, "HelpTelephone", NULL); - CHECK_REG_STR(prodkey, "InstallLocation", NULL); - CHECK_REG_STR(prodkey, "Readme", NULL); - CHECK_REG_STR(prodkey, "Size", NULL); - CHECK_REG_STR(prodkey, "URLInfoAbout", NULL); - CHECK_REG_STR(prodkey, "URLUpdateInfo", NULL); - CHECK_REG_DWORD(prodkey, "Language", 1033); - CHECK_REG_DWORD(prodkey, "Version", 0x1010001); - CHECK_REG_DWORD(prodkey, "VersionMajor", 1); - CHECK_REG_DWORD(prodkey, "VersionMinor", 1); - CHECK_REG_DWORD(prodkey, "WindowsInstaller", 1); - todo_wine - { - CHECK_REG_DWORD2(prodkey, "EstimatedSize", 12, -12); - } - - RegCloseKey(prodkey); - - r = MsiInstallProductA(msifile, "FULL=1 REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(pf_exists("msitest\\maximus"), "File deleted\n"); - ok(pf_exists("msitest"), "File deleted\n"); - - state = MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - res = RegOpenKeyA(uninstall, prodcode, &prodkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - /* complete install */ - r = MsiInstallProductA(msifile, "FULL=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(pf_exists("msitest\\maximus"), "File not installed\n"); - ok(pf_exists("msitest"), "File not installed\n"); - - state = MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature"); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - res = RegOpenKeyA(uninstall, prodcode, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_REG_STR(prodkey, "DisplayName", "MSITEST"); - CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1"); - CHECK_REG_STR(prodkey, "InstallDate", date); - CHECK_REG_STR(prodkey, "InstallSource", temp); - CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_REG_STR(prodkey, "Publisher", "Wine"); - CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", NULL); - CHECK_REG_STR(prodkey, "Comments", NULL); - CHECK_REG_STR(prodkey, "Contact", NULL); - CHECK_REG_STR(prodkey, "HelpLink", NULL); - CHECK_REG_STR(prodkey, "HelpTelephone", NULL); - CHECK_REG_STR(prodkey, "InstallLocation", NULL); - CHECK_REG_STR(prodkey, "Readme", NULL); - CHECK_REG_STR(prodkey, "Size", NULL); - CHECK_REG_STR(prodkey, "URLInfoAbout", NULL); - CHECK_REG_STR(prodkey, "URLUpdateInfo", NULL); - CHECK_REG_DWORD(prodkey, "Language", 1033); - CHECK_REG_DWORD(prodkey, "Version", 0x1010001); - CHECK_REG_DWORD(prodkey, "VersionMajor", 1); - CHECK_REG_DWORD(prodkey, "VersionMinor", 1); - CHECK_REG_DWORD(prodkey, "WindowsInstaller", 1); - todo_wine - { - CHECK_REG_DWORD2(prodkey, "EstimatedSize", 12, -12); - } - - RegCloseKey(prodkey); - - /* no UnpublishFeatures */ - r = MsiInstallProductA(msifile, "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!pf_exists("msitest\\maximus"), "File not deleted\n"); - ok(!pf_exists("msitest"), "Directory not deleted\n"); - - state = MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - res = RegOpenKeyA(uninstall, prodcode, &prodkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - /* complete install */ - r = MsiInstallProductA(msifile, "FULL=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(pf_exists("msitest\\maximus"), "File not installed\n"); - ok(pf_exists("msitest"), "File not installed\n"); - - state = MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature"); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - res = RegOpenKeyA(uninstall, prodcode, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_REG_STR(prodkey, "DisplayName", "MSITEST"); - CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1"); - CHECK_REG_STR(prodkey, "InstallDate", date); - CHECK_REG_STR(prodkey, "InstallSource", temp); - CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_REG_STR(prodkey, "Publisher", "Wine"); - CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", NULL); - CHECK_REG_STR(prodkey, "Comments", NULL); - CHECK_REG_STR(prodkey, "Contact", NULL); - CHECK_REG_STR(prodkey, "HelpLink", NULL); - CHECK_REG_STR(prodkey, "HelpTelephone", NULL); - CHECK_REG_STR(prodkey, "InstallLocation", NULL); - CHECK_REG_STR(prodkey, "Readme", NULL); - CHECK_REG_STR(prodkey, "Size", NULL); - CHECK_REG_STR(prodkey, "URLInfoAbout", NULL); - CHECK_REG_STR(prodkey, "URLUpdateInfo", NULL); - CHECK_REG_DWORD(prodkey, "Language", 1033); - CHECK_REG_DWORD(prodkey, "Version", 0x1010001); - CHECK_REG_DWORD(prodkey, "VersionMajor", 1); - CHECK_REG_DWORD(prodkey, "VersionMinor", 1); - CHECK_REG_DWORD(prodkey, "WindowsInstaller", 1); - todo_wine - { - CHECK_REG_DWORD2(prodkey, "EstimatedSize", 12, -12); - } - - RegCloseKey(prodkey); - - /* UnpublishFeatures, only feature removed. Only works when entire product is removed */ - r = MsiInstallProductA(msifile, "UNPUBLISH_FEATURES=1 REMOVE=feature"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - todo_wine ok(pf_exists("msitest\\maximus"), "File deleted\n"); - todo_wine ok(pf_exists("msitest"), "Directory deleted\n"); - - state = MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature"); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - res = RegOpenKeyA(uninstall, prodcode, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_REG_STR(prodkey, "DisplayName", "MSITEST"); - CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1"); - CHECK_REG_STR(prodkey, "InstallDate", date); - CHECK_REG_STR(prodkey, "InstallSource", temp); - CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_REG_STR(prodkey, "Publisher", "Wine"); - CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", NULL); - CHECK_REG_STR(prodkey, "Comments", NULL); - CHECK_REG_STR(prodkey, "Contact", NULL); - CHECK_REG_STR(prodkey, "HelpLink", NULL); - CHECK_REG_STR(prodkey, "HelpTelephone", NULL); - CHECK_REG_STR(prodkey, "InstallLocation", NULL); - CHECK_REG_STR(prodkey, "Readme", NULL); - CHECK_REG_STR(prodkey, "Size", NULL); - CHECK_REG_STR(prodkey, "URLInfoAbout", NULL); - CHECK_REG_STR(prodkey, "URLUpdateInfo", NULL); - CHECK_REG_DWORD(prodkey, "Language", 1033); - CHECK_REG_DWORD(prodkey, "Version", 0x1010001); - CHECK_REG_DWORD(prodkey, "VersionMajor", 1); - CHECK_REG_DWORD(prodkey, "VersionMinor", 1); - CHECK_REG_DWORD(prodkey, "WindowsInstaller", 1); - todo_wine - { - CHECK_REG_DWORD2(prodkey, "EstimatedSize", 12, -12); - } - - RegCloseKey(prodkey); - - /* complete install */ - r = MsiInstallProductA(msifile, "FULL=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(pf_exists("msitest\\maximus"), "File not installed\n"); - ok(pf_exists("msitest"), "File not installed\n"); - - state = MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature"); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - res = RegOpenKeyA(uninstall, prodcode, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_REG_STR(prodkey, "DisplayName", "MSITEST"); - CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1"); - CHECK_REG_STR(prodkey, "InstallDate", date); - CHECK_REG_STR(prodkey, "InstallSource", temp); - CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_REG_STR(prodkey, "Publisher", "Wine"); - CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", NULL); - CHECK_REG_STR(prodkey, "Comments", NULL); - CHECK_REG_STR(prodkey, "Contact", NULL); - CHECK_REG_STR(prodkey, "HelpLink", NULL); - CHECK_REG_STR(prodkey, "HelpTelephone", NULL); - CHECK_REG_STR(prodkey, "InstallLocation", NULL); - CHECK_REG_STR(prodkey, "Readme", NULL); - CHECK_REG_STR(prodkey, "Size", NULL); - CHECK_REG_STR(prodkey, "URLInfoAbout", NULL); - CHECK_REG_STR(prodkey, "URLUpdateInfo", NULL); - CHECK_REG_DWORD(prodkey, "Language", 1033); - CHECK_REG_DWORD(prodkey, "Version", 0x1010001); - CHECK_REG_DWORD(prodkey, "VersionMajor", 1); - CHECK_REG_DWORD(prodkey, "VersionMinor", 1); - CHECK_REG_DWORD(prodkey, "WindowsInstaller", 1); - todo_wine - { - CHECK_REG_DWORD2(prodkey, "EstimatedSize", 12, -20); - } - - RegCloseKey(prodkey); - - /* UnpublishFeatures, both features removed */ - r = MsiInstallProductA(msifile, "UNPUBLISH_FEATURES=1 REMOVE=feature,montecristo"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!pf_exists("msitest\\maximus"), "File not deleted\n"); - ok(!pf_exists("msitest"), "Directory not deleted\n"); - - state = MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - res = RegOpenKeyA(uninstall, prodcode, &prodkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - /* complete install */ - r = MsiInstallProductA(msifile, "FULL=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(pf_exists("msitest\\maximus"), "File not installed\n"); - ok(pf_exists("msitest"), "File not installed\n"); - - state = MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature"); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - res = RegOpenKeyA(uninstall, prodcode, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_REG_STR(prodkey, "DisplayName", "MSITEST"); - CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1"); - CHECK_REG_STR(prodkey, "InstallDate", date); - CHECK_REG_STR(prodkey, "InstallSource", temp); - CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_REG_STR(prodkey, "Publisher", "Wine"); - CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", NULL); - CHECK_REG_STR(prodkey, "Comments", NULL); - CHECK_REG_STR(prodkey, "Contact", NULL); - CHECK_REG_STR(prodkey, "HelpLink", NULL); - CHECK_REG_STR(prodkey, "HelpTelephone", NULL); - CHECK_REG_STR(prodkey, "InstallLocation", NULL); - CHECK_REG_STR(prodkey, "Readme", NULL); - CHECK_REG_STR(prodkey, "Size", NULL); - CHECK_REG_STR(prodkey, "URLInfoAbout", NULL); - CHECK_REG_STR(prodkey, "URLUpdateInfo", NULL); - CHECK_REG_DWORD(prodkey, "Language", 1033); - CHECK_REG_DWORD(prodkey, "Version", 0x1010001); - CHECK_REG_DWORD(prodkey, "VersionMajor", 1); - CHECK_REG_DWORD(prodkey, "VersionMinor", 1); - CHECK_REG_DWORD(prodkey, "WindowsInstaller", 1); - todo_wine - { - CHECK_REG_DWORD2(prodkey, "EstimatedSize", 12, -12); - } - - RegCloseKey(prodkey); - - /* complete uninstall */ - r = MsiInstallProductA(msifile, "FULL=1 REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!pf_exists("msitest\\maximus"), "File not deleted\n"); - ok(!pf_exists("msitest"), "Directory not deleted\n"); - - state = MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - res = RegOpenKeyA(uninstall, prodcode, &prodkey); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - /* make sure 'Program Files\msitest' is removed */ - delete_pfmsitest_files(); - - RegCloseKey(uninstall); - DeleteFile(msifile); - DeleteFile("msitest\\maximus"); - RemoveDirectory("msitest"); -} - -static void test_publishsourcelist(void) -{ - UINT r; - DWORD size; - CHAR value[MAX_PATH]; - CHAR path[MAX_PATH]; - CHAR prodcode[] = "{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"; - - if (!pMsiSourceListEnumSourcesA || !pMsiSourceListGetInfoA) - { - win_skip("MsiSourceListEnumSourcesA and/or MsiSourceListGetInfoA are not available\n"); - return; - } - - CreateDirectoryA("msitest", NULL); - create_file("msitest\\maximus", 500); - - create_database(msifile, pp_tables, sizeof(pp_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_FULL, NULL); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(pf_exists("msitest\\maximus"), "File not installed\n"); - ok(pf_exists("msitest"), "File not installed\n"); - - /* nothing published */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, value, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size); - ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value); - - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size); - ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value); - - r = MsiInstallProductA(msifile, "REGISTER_PRODUCT=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(pf_exists("msitest\\maximus"), "File not installed\n"); - ok(pf_exists("msitest"), "File not installed\n"); - - /* after RegisterProduct */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, value, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size); - ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value); - - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size); - ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value); - - r = MsiInstallProductA(msifile, "PROCESS_COMPONENTS=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(pf_exists("msitest\\maximus"), "File not installed\n"); - ok(pf_exists("msitest"), "File not installed\n"); - - /* after ProcessComponents */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, value, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size); - ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value); - - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size); - ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value); - - r = MsiInstallProductA(msifile, "PUBLISH_FEATURES=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(pf_exists("msitest\\maximus"), "File not installed\n"); - ok(pf_exists("msitest"), "File not installed\n"); - - /* after PublishFeatures */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, value, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size); - ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value); - - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size); - ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value); - - r = MsiInstallProductA(msifile, "PUBLISH_PRODUCT=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - ok(pf_exists("msitest\\maximus"), "File not installed\n"); - ok(pf_exists("msitest"), "File not installed\n"); - - /* after PublishProduct */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "msitest.msi"), "Expected 'msitest.msi', got %s\n", value); - ok(size == 11, "Expected 11, got %d\n", size); - - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_MEDIAPACKAGEPATH, value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, ""), "Expected \"\", got \"%s\"\n", value); - ok(size == 0, "Expected 0, got %d\n", size); - - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_DISKPROMPT, value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, ""), "Expected \"\", got \"%s\"\n", value); - ok(size == 0, "Expected 0, got %d\n", size); - - lstrcpyA(path, CURR_DIR); - lstrcatA(path, "\\"); - - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCE, value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, path), "Expected \"%s\", got \"%s\"\n", path, value); - ok(size == lstrlenA(path), "Expected %d, got %d\n", lstrlenA(path), size); - - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDTYPE, value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "n"), "Expected \"n\", got \"%s\"\n", value); - ok(size == 1, "Expected 1, got %d\n", size); - - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, path), "Expected \"%s\", got \"%s\"\n", path, value); - ok(size == lstrlenA(path), "Expected %d, got %d\n", lstrlenA(path), size); - - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 1, value, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - /* complete uninstall */ - r = MsiInstallProductA(msifile, "FULL=1 REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!pf_exists("msitest\\maximus"), "File not deleted\n"); - ok(!pf_exists("msitest"), "Directory not deleted\n"); - - /* make sure 'Program Files\msitest' is removed */ - delete_pfmsitest_files(); - - DeleteFile(msifile); - DeleteFile("msitest\\maximus"); - RemoveDirectory("msitest"); -} - -static UINT run_query(MSIHANDLE hdb, MSIHANDLE hrec, const char *query) -{ - MSIHANDLE hview = 0; - UINT r; - - r = MsiDatabaseOpenView(hdb, query, &hview); - if(r != ERROR_SUCCESS) - return r; - - r = MsiViewExecute(hview, hrec); - if(r == ERROR_SUCCESS) - r = MsiViewClose(hview); - MsiCloseHandle(hview); - return r; -} - -static void set_transform_summary_info(void) -{ - UINT r; - MSIHANDLE suminfo = 0; - - /* build summary info */ - r = MsiGetSummaryInformation(0, mstfile, 3, &suminfo); - ok(r == ERROR_SUCCESS , "Failed to open summaryinfo\n"); - - r = MsiSummaryInfoSetProperty(suminfo, PID_TITLE, VT_LPSTR, 0, NULL, "MSITEST"); - ok(r == ERROR_SUCCESS, "Failed to set summary info\n"); - - r = MsiSummaryInfoSetProperty(suminfo, PID_REVNUMBER, VT_LPSTR, 0, NULL, - "{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}1.1.1;" - "{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}1.1.1;" - "{4C0EAA15-0264-4E5A-8758-609EF142B92D}"); - ok(r == ERROR_SUCCESS , "Failed to set summary info\n"); - - r = MsiSummaryInfoSetProperty(suminfo, PID_PAGECOUNT, VT_I4, 100, NULL, NULL); - ok(r == ERROR_SUCCESS, "Failed to set summary info\n"); - - r = MsiSummaryInfoPersist(suminfo); - ok(r == ERROR_SUCCESS , "Failed to make summary info persist\n"); - - r = MsiCloseHandle(suminfo); - ok(r == ERROR_SUCCESS , "Failed to close suminfo\n"); -} - -static void generate_transform(void) -{ - MSIHANDLE hdb1, hdb2; - LPCSTR query; - UINT r; - - /* start with two identical databases */ - CopyFile(msifile, msifile2, FALSE); - - r = MsiOpenDatabase(msifile2, MSIDBOPEN_TRANSACT, &hdb1); - ok(r == ERROR_SUCCESS , "Failed to create database\n"); - - r = MsiDatabaseCommit(hdb1); - ok(r == ERROR_SUCCESS , "Failed to commit database\n"); - - r = MsiOpenDatabase(msifile, MSIDBOPEN_READONLY, &hdb2); - ok(r == ERROR_SUCCESS , "Failed to create database\n"); - - query = "INSERT INTO `Property` ( `Property`, `Value` ) VALUES ( 'prop', 'val' )"; - r = run_query(hdb1, 0, query); - ok(r == ERROR_SUCCESS, "failed to add property\n"); - - /* database needs to be committed */ - MsiDatabaseCommit(hdb1); - - r = MsiDatabaseGenerateTransform(hdb1, hdb2, mstfile, 0, 0); - ok(r == ERROR_SUCCESS, "return code %d, should be ERROR_SUCCESS\n", r); - -#if 0 /* not implemented in wine yet */ - r = MsiCreateTransformSummaryInfo(hdb2, hdb2, mstfile, 0, 0); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); -#endif - - MsiCloseHandle(hdb1); - MsiCloseHandle(hdb2); -} - -/* data for generating a transform */ - -/* tables transform names - encoded as they would be in an msi database file */ -static const WCHAR name1[] = { 0x4840, 0x3f3f, 0x4577, 0x446c, 0x3b6a, 0x45e4, 0x4824, 0 }; /* _StringData */ -static const WCHAR name2[] = { 0x4840, 0x3f3f, 0x4577, 0x446c, 0x3e6a, 0x44b2, 0x482f, 0 }; /* _StringPool */ -static const WCHAR name3[] = { 0x4840, 0x4559, 0x44f2, 0x4568, 0x4737, 0 }; /* Property */ - -/* data in each table */ -static const char data1[] = /* _StringData */ - "propval"; /* all the strings squashed together */ - -static const WCHAR data2[] = { /* _StringPool */ -/* len, refs */ - 0, 0, /* string 0 '' */ - 4, 1, /* string 1 'prop' */ - 3, 1, /* string 2 'val' */ -}; - -static const WCHAR data3[] = { /* Property */ - 0x0201, 0x0001, 0x0002, -}; - -static const struct { - LPCWSTR name; - const void *data; - DWORD size; -} table_transform_data[] = -{ - { name1, data1, sizeof data1 - 1 }, - { name2, data2, sizeof data2 }, - { name3, data3, sizeof data3 }, -}; - -#define NUM_TRANSFORM_TABLES (sizeof table_transform_data/sizeof table_transform_data[0]) - -static void generate_transform_manual(void) -{ - IStorage *stg = NULL; - IStream *stm; - WCHAR name[0x20]; - HRESULT r; - DWORD i, count; - const DWORD mode = STGM_CREATE|STGM_READWRITE|STGM_DIRECT|STGM_SHARE_EXCLUSIVE; - - const CLSID CLSID_MsiTransform = { 0xc1082,0,0,{0xc0,0,0,0,0,0,0,0x46}}; - - MultiByteToWideChar(CP_ACP, 0, mstfile, -1, name, 0x20); - - r = StgCreateDocfile(name, mode, 0, &stg); - ok(r == S_OK, "failed to create storage\n"); - if (!stg) - return; - - r = IStorage_SetClass(stg, &CLSID_MsiTransform); - ok(r == S_OK, "failed to set storage type\n"); - - for (i=0; i %s (%u)\n", src, dst, GetLastError()); - } - else - ok(DeleteFileA(src), "Failed to delete file %s (%u)\n", src, GetLastError()); - } - - ok(found, "Expected a 'msitest' entry\n"); - - if (*buf2) - { - buf2len++; - RegSetValueExA(hkey, rename_ops, 0, REG_MULTI_SZ, (LPBYTE)buf2, buf2len); - } - else - RegDeleteValueA(hkey, rename_ops); - - HeapFree(GetProcessHeap(), 0, buf); - HeapFree(GetProcessHeap(), 0, buf2); -} - -static BOOL file_matches_data(LPCSTR file, LPCSTR data) -{ - DWORD len, data_len = strlen(data); - HANDLE handle; - char buf[128]; - - handle = CreateFile(file, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); - ok(handle != INVALID_HANDLE_VALUE, "failed to open %s (%u)\n", file, GetLastError()); - - if (ReadFile(handle, buf, sizeof(buf), &len, NULL) && len >= data_len) - { - CloseHandle(handle); - return !memcmp(buf, data, data_len); - } - CloseHandle(handle); - return FALSE; -} - -static void test_file_in_use(void) -{ - UINT r; - HANDLE file; - HKEY hkey; - char path[MAX_PATH]; - - if (on_win9x) - { - win_skip("Pending file renaming is implemented differently on Win9x and WinMe\n"); - return; - } - - RegOpenKeyExA(HKEY_LOCAL_MACHINE, session_manager, 0, KEY_ALL_ACCESS, &hkey); - - CreateDirectoryA("msitest", NULL); - create_file("msitest\\maximus", 500); - create_database(msifile, fiu_tables, sizeof(fiu_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - lstrcpy(path, PROG_FILES_DIR); - lstrcat(path, "\\msitest"); - CreateDirectoryA(path, NULL); - - lstrcat(path, "\\maximus"); - file = CreateFileA(path, GENERIC_READ, FILE_SHARE_READ, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL); - - r = MsiInstallProductA(msifile, "REBOOT=ReallySuppress FULL=1"); - ok(r == ERROR_SUCCESS_REBOOT_REQUIRED, "Expected ERROR_SUCCESS_REBOOT_REQUIRED got %u\n", r); - ok(!file_matches_data(path, "msitest\\maximus"), "Expected file not to match\n"); - CloseHandle(file); - ok(!file_matches_data(path, "msitest\\maximus"), "Expected file not to match\n"); - - process_pending_renames(hkey); - RegCloseKey(hkey); - - ok(file_matches_data(path, "msitest\\maximus"), "Expected file to match\n"); - ok(delete_pf("msitest\\maximus", TRUE), "File not present\n"); - ok(delete_pf("msitest", FALSE), "Directory not present or not empty\n"); - - r = MsiInstallProductA(msifile, "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - DeleteFileA("msitest\\maximus"); - delete_test_files(); -} - -static void test_file_in_use_cab(void) -{ - UINT r; - HANDLE file; - HKEY hkey; - char path[MAX_PATH]; - - if (on_win9x) - { - win_skip("Pending file renaming is implemented differently on Win9x and WinMe\n"); - return; - } - - RegOpenKeyExA(HKEY_LOCAL_MACHINE, session_manager, 0, KEY_ALL_ACCESS, &hkey); - - CreateDirectoryA("msitest", NULL); - create_file("maximus", 500); - create_cab_file("test1.cab", MEDIA_SIZE, "maximus\0"); - DeleteFile("maximus"); - - create_database(msifile, fiuc_tables, sizeof(fiuc_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - lstrcpy(path, PROG_FILES_DIR); - lstrcat(path, "\\msitest"); - CreateDirectoryA(path, NULL); - - lstrcat(path, "\\maximus"); - file = CreateFileA(path, GENERIC_READ, FILE_SHARE_READ, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL); - - r = MsiInstallProductA(msifile, "REBOOT=ReallySuppress FULL=1"); - ok(r == ERROR_SUCCESS_REBOOT_REQUIRED, "Expected ERROR_SUCCESS_REBOOT_REQUIRED got %u\n", r); - ok(!file_matches_data(path, "maximus"), "Expected file not to match\n"); - CloseHandle(file); - ok(!file_matches_data(path, "maximus"), "Expected file not to match\n"); - - process_pending_renames(hkey); - RegCloseKey(hkey); - - ok(file_matches_data(path, "maximus"), "Expected file to match\n"); - ok(delete_pf("msitest\\maximus", TRUE), "File not present\n"); - ok(delete_pf("msitest", FALSE), "Directory not present or not empty\n"); - - r = MsiInstallProductA(msifile, "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - delete_cab_files(); - delete_test_files(); -} - -static INT CALLBACK handler_a(LPVOID context, UINT type, LPCSTR msg) -{ - return IDOK; -} - -static INT CALLBACK handler_w(LPVOID context, UINT type, LPCWSTR msg) -{ - return IDOK; -} - -static INT CALLBACK handler_record(LPVOID context, UINT type, MSIHANDLE record) -{ - return IDOK; -} - -static void test_MsiSetExternalUI(void) -{ - INSTALLUI_HANDLERA ret_a; - INSTALLUI_HANDLERW ret_w; - INSTALLUI_HANDLER_RECORD prev; - UINT error; - - ret_a = MsiSetExternalUIA(handler_a, INSTALLLOGMODE_ERROR, NULL); - ok(ret_a == NULL, "expected NULL, got %p\n", ret_a); - - ret_a = MsiSetExternalUIA(NULL, 0, NULL); - ok(ret_a == handler_a, "expected %p, got %p\n", handler_a, ret_a); - - /* Not present before Installer 3.1 */ - if (!pMsiSetExternalUIRecord) { - win_skip("MsiSetExternalUIRecord is not available\n"); - return; - } - - error = pMsiSetExternalUIRecord(handler_record, INSTALLLOGMODE_ERROR, NULL, &prev); - ok(!error, "MsiSetExternalUIRecord failed %u\n", error); - ok(prev == NULL, "expected NULL, got %p\n", prev); - - prev = (INSTALLUI_HANDLER_RECORD)0xdeadbeef; - error = pMsiSetExternalUIRecord(NULL, INSTALLLOGMODE_ERROR, NULL, &prev); - ok(!error, "MsiSetExternalUIRecord failed %u\n", error); - ok(prev == handler_record, "expected %p, got %p\n", handler_record, prev); - - ret_w = MsiSetExternalUIW(handler_w, INSTALLLOGMODE_ERROR, NULL); - ok(ret_w == NULL, "expected NULL, got %p\n", ret_w); - - ret_w = MsiSetExternalUIW(NULL, 0, NULL); - ok(ret_w == handler_w, "expected %p, got %p\n", handler_w, ret_w); - - ret_a = MsiSetExternalUIA(handler_a, INSTALLLOGMODE_ERROR, NULL); - ok(ret_a == NULL, "expected NULL, got %p\n", ret_a); - - ret_w = MsiSetExternalUIW(handler_w, INSTALLLOGMODE_ERROR, NULL); - ok(ret_w == NULL, "expected NULL, got %p\n", ret_w); - - prev = (INSTALLUI_HANDLER_RECORD)0xdeadbeef; - error = pMsiSetExternalUIRecord(handler_record, INSTALLLOGMODE_ERROR, NULL, &prev); - ok(!error, "MsiSetExternalUIRecord failed %u\n", error); - ok(prev == NULL, "expected NULL, got %p\n", prev); - - ret_a = MsiSetExternalUIA(NULL, 0, NULL); - ok(ret_a == NULL, "expected NULL, got %p\n", ret_a); - - ret_w = MsiSetExternalUIW(NULL, 0, NULL); - ok(ret_w == NULL, "expected NULL, got %p\n", ret_w); - - prev = (INSTALLUI_HANDLER_RECORD)0xdeadbeef; - error = pMsiSetExternalUIRecord(NULL, 0, NULL, &prev); - ok(!error, "MsiSetExternalUIRecord failed %u\n", error); - ok(prev == handler_record, "expected %p, got %p\n", handler_record, prev); - - error = pMsiSetExternalUIRecord(handler_record, INSTALLLOGMODE_ERROR, NULL, NULL); - ok(!error, "MsiSetExternalUIRecord failed %u\n", error); - - error = pMsiSetExternalUIRecord(NULL, 0, NULL, NULL); - ok(!error, "MsiSetExternalUIRecord failed %u\n", error); -} - -static void test_feature_override(void) -{ - UINT r; - - create_test_files(); - create_file("msitest\\override.txt", 1000); - create_file("msitest\\preselected.txt", 1000); - create_file("msitest\\notpreselected.txt", 1000); - create_database(msifile, fo_tables, sizeof(fo_tables) / sizeof(msi_table)); - - r = MsiInstallProductA(msifile, "ADDLOCAL=override"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(pf_exists("msitest\\override.txt"), "file not installed\n"); - ok(!pf_exists("msitest\\preselected.txt"), "file installed\n"); - ok(!pf_exists("msitest\\notpreselected.txt"), "file installed\n"); - - r = MsiInstallProductA(msifile, "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(!delete_pf("msitest\\override.txt", TRUE), "file not removed\n"); - - r = MsiInstallProductA(msifile, "preselect=1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(pf_exists("msitest\\override.txt"), "file not installed\n"); - ok(pf_exists("msitest\\preselected.txt"), "file not installed\n"); - ok(!pf_exists("msitest\\notpreselected.txt"), "file installed\n"); - - r = MsiInstallProductA(msifile, "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(!delete_pf("msitest\\override.txt", TRUE), "file not removed\n"); - todo_wine { - ok(delete_pf("msitest\\preselected.txt", TRUE), "file removed\n"); - ok(delete_pf("msitest", FALSE), "directory removed\n"); - } - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(pf_exists("msitest\\override.txt"), "file not installed\n"); - ok(pf_exists("msitest\\preselected.txt"), "file not installed\n"); - ok(!pf_exists("msitest\\notpreselected.txt"), "file installed\n"); - - r = MsiInstallProductA(msifile, "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(!delete_pf("msitest\\override.txt", TRUE), "file not removed\n"); - todo_wine { - ok(delete_pf("msitest\\preselected.txt", TRUE), "file removed\n"); - ok(delete_pf("msitest", FALSE), "directory removed\n"); - } - - DeleteFileA("msitest\\override.txt"); - DeleteFileA("msitest\\preselected.txt"); - DeleteFileA("msitest\\notpreselected.txt"); - RegDeleteKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\msitest"); - delete_test_files(); -} - -static void test_create_folder(void) -{ - UINT r; - - create_test_files(); - create_database(msifile, cf_tables, sizeof(cf_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r); - - ok(!delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File installed\n"); - ok(!delete_pf("msitest\\cabout\\new", FALSE), "Directory created\n"); - ok(!delete_pf("msitest\\cabout\\four.txt", TRUE), "File installed\n"); - ok(!delete_pf("msitest\\cabout", FALSE), "Directory created\n"); - ok(!delete_pf("msitest\\changed\\three.txt", TRUE), "File installed\n"); - ok(!delete_pf("msitest\\changed", FALSE), "Directory created\n"); - ok(!delete_pf("msitest\\first\\two.txt", TRUE), "File installed\n"); - ok(!delete_pf("msitest\\first", FALSE), "Directory created\n"); - ok(!delete_pf("msitest\\filename", TRUE), "File installed\n"); - ok(!delete_pf("msitest\\one.txt", TRUE), "File installed\n"); - ok(!delete_pf("msitest\\service.exe", TRUE), "File installed\n"); - ok(!delete_pf("msitest", FALSE), "Directory created\n"); - - r = MsiInstallProductA(msifile, "LOCAL=Two"); - ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r); - - ok(!delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File installed\n"); - ok(!delete_pf("msitest\\cabout\\new", FALSE), "Directory created\n"); - ok(!delete_pf("msitest\\cabout\\four.txt", TRUE), "File installed\n"); - ok(!delete_pf("msitest\\cabout", FALSE), "Directory created\n"); - ok(!delete_pf("msitest\\changed\\three.txt", TRUE), "File installed\n"); - ok(!delete_pf("msitest\\changed", FALSE), "Directory created\n"); - ok(!delete_pf("msitest\\first\\two.txt", TRUE), "File installed\n"); - ok(!delete_pf("msitest\\first", FALSE), "Directory created\n"); - ok(!delete_pf("msitest\\filename", TRUE), "File installed\n"); - ok(!delete_pf("msitest\\one.txt", TRUE), "File installed\n"); - ok(!delete_pf("msitest\\service.exe", TRUE), "File installed\n"); - ok(!delete_pf("msitest", FALSE), "Directory created\n"); - - delete_test_files(); -} - -static void test_remove_folder(void) -{ - UINT r; - - create_test_files(); - create_database(msifile, rf_tables, sizeof(rf_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r); - - ok(!delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File installed\n"); - ok(!delete_pf("msitest\\cabout\\new", FALSE), "Directory created\n"); - ok(!delete_pf("msitest\\cabout\\four.txt", TRUE), "File installed\n"); - ok(!delete_pf("msitest\\cabout", FALSE), "Directory created\n"); - ok(!delete_pf("msitest\\changed\\three.txt", TRUE), "File installed\n"); - ok(!delete_pf("msitest\\changed", FALSE), "Directory created\n"); - ok(!delete_pf("msitest\\first\\two.txt", TRUE), "File installed\n"); - ok(!delete_pf("msitest\\first", FALSE), "Directory created\n"); - ok(!delete_pf("msitest\\filename", TRUE), "File installed\n"); - ok(!delete_pf("msitest\\one.txt", TRUE), "File installed\n"); - ok(!delete_pf("msitest\\service.exe", TRUE), "File installed\n"); - ok(!delete_pf("msitest", FALSE), "Directory created\n"); - - r = MsiInstallProductA(msifile, "LOCAL=Two"); - ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r); - - ok(!delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File installed\n"); - ok(!delete_pf("msitest\\cabout\\new", FALSE), "Directory created\n"); - ok(!delete_pf("msitest\\cabout\\four.txt", TRUE), "File installed\n"); - ok(!delete_pf("msitest\\cabout", FALSE), "Directory created\n"); - ok(!delete_pf("msitest\\changed\\three.txt", TRUE), "File installed\n"); - ok(!delete_pf("msitest\\changed", FALSE), "Directory created\n"); - ok(!delete_pf("msitest\\first\\two.txt", TRUE), "File installed\n"); - ok(!delete_pf("msitest\\first", FALSE), "Directory created\n"); - ok(!delete_pf("msitest\\filename", TRUE), "File installed\n"); - ok(!delete_pf("msitest\\one.txt", TRUE), "File installed\n"); - ok(!delete_pf("msitest\\service.exe", TRUE), "File installed\n"); - ok(!delete_pf("msitest", FALSE), "Directory created\n"); - - delete_test_files(); -} - -static void test_start_services(void) -{ - UINT r; - SC_HANDLE scm, service; - BOOL ret; - DWORD error = ERROR_SUCCESS; - - if (on_win9x) - { - win_skip("Services are not implemented on Win9x and WinMe\n"); - return; - } - scm = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); - ok(scm != NULL, "Failed to open the SC Manager\n"); - if (!scm) return; - - service = OpenService(scm, "Spooler", SC_MANAGER_ALL_ACCESS); - if (!service && GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST) - { - win_skip("The 'Spooler' service does not exist\n"); - CloseServiceHandle(scm); - return; - } - ok(service != NULL, "Failed to open Spooler, error %d\n", GetLastError()); - if (!service) { - CloseServiceHandle(scm); - return; - } - - ret = StartService(service, 0, NULL); - if (!ret && (error = GetLastError()) != ERROR_SERVICE_ALREADY_RUNNING) - { - skip("Terminal service not available, skipping test\n"); - CloseServiceHandle(service); - CloseServiceHandle(scm); - return; - } - - CloseServiceHandle(service); - CloseServiceHandle(scm); - - create_test_files(); - create_database(msifile, sss_tables, sizeof(sss_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n"); - ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n"); - ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n"); - ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\first", FALSE), "Directory not created\n"); - ok(delete_pf("msitest\\filename", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "Directory not created\n"); - - delete_test_files(); - - if (error == ERROR_SUCCESS) - { - SERVICE_STATUS status; - - scm = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); - service = OpenService(scm, "Spooler", SC_MANAGER_ALL_ACCESS); - - ret = ControlService(service, SERVICE_CONTROL_STOP, &status); - ok(ret, "ControlService failed %u\n", GetLastError()); - - CloseServiceHandle(service); - CloseServiceHandle(scm); - } -} - -static void test_delete_services(void) -{ - UINT r; - - create_test_files(); - create_database(msifile, sds_tables, sizeof(sds_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n"); - ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n"); - ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n"); - ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\first", FALSE), "Directory not created\n"); - ok(delete_pf("msitest\\filename", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "Directory not created\n"); - - delete_test_files(); -} - -static void test_self_registration(void) -{ - UINT r; - - create_test_files(); - create_database(msifile, sr_tables, sizeof(sr_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n"); - ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n"); - ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n"); - ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\first", FALSE), "Directory not created\n"); - ok(delete_pf("msitest\\filename", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "Directory not created\n"); - - delete_test_files(); -} - -static void test_register_font(void) -{ - static const char regfont1[] = "Software\\Microsoft\\Windows NT\\CurrentVersion\\Fonts"; - static const char regfont2[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Fonts"; - LONG ret; - HKEY key; - UINT r; - - create_test_files(); - create_file("msitest\\font.ttf", 1000); - create_database(msifile, font_tables, sizeof(font_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ret = RegOpenKeyA(HKEY_LOCAL_MACHINE, regfont1, &key); - if (ret) - RegOpenKeyA(HKEY_LOCAL_MACHINE, regfont2, &key); - - ret = RegQueryValueExA(key, "msi test font", NULL, NULL, NULL, NULL); - ok(ret != ERROR_FILE_NOT_FOUND, "unexpected result %d\n", ret); - - r = MsiInstallProductA(msifile, "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(!delete_pf("msitest", FALSE), "directory not removed\n"); - - ret = RegQueryValueExA(key, "msi test font", NULL, NULL, NULL, NULL); - ok(ret == ERROR_FILE_NOT_FOUND, "unexpected result %d\n", ret); - - RegDeleteValueA(key, "msi test font"); - RegCloseKey(key); - DeleteFileA("msitest\\font.ttf"); - delete_test_files(); -} - -static void test_validate_product_id(void) -{ - UINT r; - - create_test_files(); - create_database(msifile, vp_tables, sizeof(vp_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - r = MsiInstallProductA(msifile, "SET_PRODUCT_ID=1"); - ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r); - - r = MsiInstallProductA(msifile, "SET_PRODUCT_ID=2"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - r = MsiInstallProductA(msifile, "PIDKEY=123-1234567"); - ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r); - - ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n"); - ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n"); - ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n"); - ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\first", FALSE), "Directory not created\n"); - ok(delete_pf("msitest\\filename", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "Directory not created\n"); - - delete_test_files(); -} - -static void test_install_remove_odbc(void) -{ - UINT r; - - create_test_files(); - create_file("msitest\\ODBCdriver.dll", 1000); - create_file("msitest\\ODBCdriver2.dll", 1000); - create_file("msitest\\ODBCtranslator.dll", 1000); - create_file("msitest\\ODBCtranslator2.dll", 1000); - create_file("msitest\\ODBCsetup.dll", 1000); - create_database(msifile, odbc_tables, sizeof(odbc_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(pf_exists("msitest\\ODBCdriver.dll"), "file not created\n"); - ok(pf_exists("msitest\\ODBCdriver2.dll"), "file not created\n"); - ok(pf_exists("msitest\\ODBCtranslator.dll"), "file not created\n"); - ok(pf_exists("msitest\\ODBCtranslator2.dll"), "file not created\n"); - ok(pf_exists("msitest\\ODBCsetup.dll"), "file not created\n"); - - r = MsiInstallProductA(msifile, "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(!delete_pf("msitest\\ODBCdriver.dll", TRUE), "file not removed\n"); - ok(!delete_pf("msitest\\ODBCdriver2.dll", TRUE), "file not removed\n"); - ok(!delete_pf("msitest\\ODBCtranslator.dll", TRUE), "file not removed\n"); - ok(!delete_pf("msitest\\ODBCtranslator2.dll", TRUE), "file not removed\n"); - ok(!delete_pf("msitest\\ODBCsetup.dll", TRUE), "file not removed\n"); - ok(!delete_pf("msitest", FALSE), "directory not removed\n"); - - DeleteFileA("msitest\\ODBCdriver.dll"); - DeleteFileA("msitest\\ODBCdriver2.dll"); - DeleteFileA("msitest\\ODBCtranslator.dll"); - DeleteFileA("msitest\\ODBCtranslator2.dll"); - DeleteFileA("msitest\\ODBCsetup.dll"); - delete_test_files(); -} - -static void test_register_typelib(void) -{ - UINT r; - - create_test_files(); - create_file("msitest\\typelib.dll", 1000); - create_database(msifile, tl_tables, sizeof(tl_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - r = MsiInstallProductA(msifile, "REGISTER_TYPELIB=1"); - ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - r = MsiInstallProductA(msifile, "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(!delete_pf("msitest\\typelib.dll", TRUE), "file not removed\n"); - ok(!delete_pf("msitest", FALSE), "directory not removed\n"); - - DeleteFileA("msitest\\typelib.dll"); - delete_test_files(); -} - -static void test_create_remove_shortcut(void) -{ - UINT r; - - create_test_files(); - create_file("msitest\\target.txt", 1000); - create_database(msifile, crs_tables, sizeof(crs_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(pf_exists("msitest\\target.txt"), "file not created\n"); - ok(pf_exists("msitest\\shortcut.lnk"), "file not created\n"); - - r = MsiInstallProductA(msifile, "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(!delete_pf("msitest\\shortcut.lnk", TRUE), "file not removed\n"); - ok(!delete_pf("msitest\\target.txt", TRUE), "file not removed\n"); - todo_wine ok(!delete_pf("msitest", FALSE), "directory not removed\n"); - - DeleteFileA("msitest\\target.txt"); - delete_test_files(); -} - -static void test_publish_components(void) -{ - static char keypath[] = - "Software\\Microsoft\\Installer\\Components\\0CBCFA296AC907244845745CEEB2F8AA"; - - UINT r; - LONG res; - HKEY key; - - create_test_files(); - create_file("msitest\\english.txt", 1000); - create_database(msifile, pub_tables, sizeof(pub_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - res = RegOpenKeyA(HKEY_CURRENT_USER, keypath, &key); - ok(res == ERROR_SUCCESS, "components key not created %d\n", res); - - res = RegQueryValueExA(key, "english.txt", NULL, NULL, NULL, NULL); - ok(res == ERROR_SUCCESS, "value not found %d\n", res); - RegCloseKey(key); - - r = MsiInstallProductA(msifile, "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - res = RegOpenKeyA(HKEY_CURRENT_USER, keypath, &key); - ok(res == ERROR_FILE_NOT_FOUND, "unexpected result %d\n", res); - - ok(!delete_pf("msitest\\english.txt", TRUE), "file not removed\n"); - ok(!delete_pf("msitest", FALSE), "directory not removed\n"); - - DeleteFileA("msitest\\english.txt"); - delete_test_files(); -} - -static void test_remove_duplicate_files(void) -{ - UINT r; - - create_test_files(); - create_file("msitest\\original.txt", 1000); - create_file("msitest\\original2.txt", 1000); - create_file("msitest\\original3.txt", 1000); - create_database(msifile, rd_tables, sizeof(rd_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(pf_exists("msitest\\original.txt"), "file not created\n"); - ok(pf_exists("msitest\\original2.txt"), "file not created\n"); - ok(!pf_exists("msitest\\original3.txt"), "file created\n"); - ok(pf_exists("msitest\\duplicate.txt"), "file not created\n"); - ok(!pf_exists("msitest\\duplicate2.txt"), "file created\n"); - - r = MsiInstallProductA(msifile, "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(delete_pf("msitest\\original.txt", TRUE), "file removed\n"); - ok(!delete_pf("msitest\\original2.txt", TRUE), "file not removed\n"); - ok(!delete_pf("msitest\\original3.txt", TRUE), "file not removed\n"); - ok(!delete_pf("msitest\\duplicate.txt", TRUE), "file not removed\n"); - ok(!delete_pf("msitest\\duplicate2.txt", TRUE), "file not removed\n"); - ok(delete_pf("msitest", FALSE), "directory removed\n"); - - DeleteFileA("msitest\\original.txt"); - DeleteFileA("msitest\\original2.txt"); - DeleteFileA("msitest\\original3.txt"); - delete_test_files(); -} - -static void test_remove_registry_values(void) -{ - UINT r; - LONG res; - HKEY key; - - create_test_files(); - create_file("msitest\\registry.txt", 1000); - create_database(msifile, rrv_tables, sizeof(rrv_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - RegCreateKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\key1", &key); - RegSetValueExA(key, "value1", 0, REG_SZ, (const BYTE *)"1", 2); - RegCloseKey(key); - - RegCreateKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\key2", &key); - RegSetValueExA(key, "value2", 0, REG_SZ, (const BYTE *)"2", 2); - RegCloseKey(key); - - RegCreateKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\keyA", &key); - RegSetValueExA(key, "", 0, REG_SZ, (const BYTE *)"default", 8); - RegSetValueExA(key, "valueA", 0, REG_SZ, (const BYTE *)"A", 2); - RegSetValueExA(key, "valueB", 0, REG_SZ, (const BYTE *)"B", 2); - RegCloseKey(key); - - RegCreateKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\keyB", &key); - RegSetValueExA(key, "", 0, REG_SZ, (const BYTE *)"default", 8); - RegSetValueExA(key, "valueB", 0, REG_SZ, (const BYTE *)"B", 2); - RegCloseKey(key); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\key1", &key); - ok(res == ERROR_SUCCESS, "key removed\n"); - RegCloseKey(key); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\key2", &key); - ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n"); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\key2", &key); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - RegCloseKey(key); - - r = MsiInstallProductA(msifile, "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\key1", &key); - ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n"); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\key2", &key); - ok(res == ERROR_SUCCESS, "key removed\n"); - RegCloseKey(key); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\keyA", &key); - ok(res == ERROR_SUCCESS, "key removed\n"); - RegCloseKey(key); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\keyB", &key); - ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n"); - - RegDeleteKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\keyA"); - RegDeleteKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\key2"); - RegDeleteKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine"); - - ok(!delete_pf("msitest\\registry.txt", TRUE), "file not removed\n"); - ok(!delete_pf("msitest", FALSE), "directory not removed\n"); - - DeleteFileA("msitest\\registry.txt"); - delete_test_files(); -} - -static void test_find_related_products(void) -{ - UINT r; - - create_test_files(); - create_file("msitest\\product.txt", 1000); - create_database(msifile, frp_tables, sizeof(frp_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - /* install again, so it finds the upgrade code */ - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - r = MsiInstallProductA(msifile, "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - ok(!delete_pf("msitest\\product.txt", TRUE), "file not removed\n"); - ok(!delete_pf("msitest", FALSE), "directory not removed\n"); - - DeleteFileA("msitest\\product.txt"); - delete_test_files(); -} - -static void test_remove_ini_values(void) -{ - UINT r; - DWORD len; - char inifile[MAX_PATH], buf[0x10]; - HANDLE file; - BOOL ret; - - create_test_files(); - create_file("msitest\\inifile.txt", 1000); - create_database(msifile, riv_tables, sizeof(riv_tables) / sizeof(msi_table)); - - lstrcpyA(inifile, PROG_FILES_DIR); - lstrcatA(inifile, "\\msitest"); - CreateDirectoryA(inifile, NULL); - lstrcatA(inifile, "\\test.ini"); - file = CreateFileA(inifile, GENERIC_WRITE|GENERIC_READ, 0, NULL, CREATE_ALWAYS, 0, NULL); - CloseHandle(file); - - ret = WritePrivateProfileStringA("section1", "key1", "value1", inifile); - ok(ret, "failed to write profile string %u\n", GetLastError()); - - ret = WritePrivateProfileStringA("sectionA", "keyA", "valueA", inifile); - ok(ret, "failed to write profile string %u\n", GetLastError()); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - len = GetPrivateProfileStringA("section1", "key1", NULL, buf, sizeof(buf), inifile); - ok(len == 6, "got %u expected 6\n", len); - - len = GetPrivateProfileStringA("sectionA", "keyA", NULL, buf, sizeof(buf), inifile); - ok(!len, "got %u expected 0\n", len); - - r = MsiInstallProductA(msifile, "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - len = GetPrivateProfileStringA("section1", "key1", NULL, buf, sizeof(buf), inifile); - ok(!len, "got %u expected 0\n", len); - - len = GetPrivateProfileStringA("sectionA", "keyA", NULL, buf, sizeof(buf), inifile); - ok(!len, "got %u expected 0\n", len); - - todo_wine ok(!delete_pf("msitest\\test.ini", TRUE), "file removed\n"); - ok(!delete_pf("msitest\\inifile.txt", TRUE), "file not removed\n"); - ok(delete_pf("msitest", FALSE), "directory removed\n"); - - DeleteFileA("msitest\\inifile.txt"); - delete_test_files(); -} - -static void test_remove_env_strings(void) -{ - UINT r; - LONG res; - HKEY key; - DWORD type, size; - char buffer[0x10]; - - if (on_win9x) - { - win_skip("Environment variables are handled differently on win9x and winme\n"); - return; - } - - create_test_files(); - create_file("msitest\\envvar.txt", 1000); - create_database(msifile, res_tables, sizeof(res_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - res = RegOpenKeyA(HKEY_CURRENT_USER, "Environment", &key); - ok(!res, "failed to open environment key %d\n", res); - - RegSetValueExA(key, "MSITESTVAR1", 0, REG_SZ, (const BYTE *)"1", 2); - RegSetValueExA(key, "MSITESTVAR2", 0, REG_SZ, (const BYTE *)"1", 2); - RegSetValueExA(key, "MSITESTVAR3", 0, REG_SZ, (const BYTE *)"1", 2); - RegSetValueExA(key, "MSITESTVAR4", 0, REG_SZ, (const BYTE *)"1", 2); - RegSetValueExA(key, "MSITESTVAR5", 0, REG_SZ, (const BYTE *)"1", 2); - - RegCloseKey(key); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - res = RegOpenKeyA(HKEY_CURRENT_USER, "Environment", &key); - ok(!res, "failed to open environment key %d\n", res); - - type = REG_NONE; - buffer[0] = 0; - size = sizeof(buffer); - res = RegQueryValueExA(key, "MSITESTVAR1", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(type == REG_SZ, "expected REG_SZ, got %u\n", type); - ok(!lstrcmp(buffer, "1"), "expected \"1\", got \"%s\"\n", buffer); - - type = REG_NONE; - buffer[0] = 0; - size = sizeof(buffer); - res = RegQueryValueExA(key, "MSITESTVAR2", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(type == REG_SZ, "expected REG_SZ, got %u\n", type); - ok(!lstrcmp(buffer, "1"), "expected \"1\", got \"%s\"\n", buffer); - - type = REG_NONE; - buffer[0] = 0; - size = sizeof(buffer); - res = RegQueryValueExA(key, "MSITESTVAR3", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(type == REG_SZ, "expected REG_SZ, got %u\n", type); - ok(!lstrcmp(buffer, "1"), "expected \"1\", got \"%s\"\n", buffer); - - type = REG_NONE; - buffer[0] = 0; - size = sizeof(buffer); - res = RegQueryValueExA(key, "MSITESTVAR4", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(type == REG_SZ, "expected REG_SZ, got %u\n", type); - ok(!lstrcmp(buffer, "1"), "expected \"1\", got \"%s\"\n", buffer); - - type = REG_NONE; - buffer[0] = 0; - size = sizeof(buffer); - res = RegQueryValueExA(key, "MSITESTVAR5", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(type == REG_SZ, "expected REG_SZ, got %u\n", type); - ok(!lstrcmp(buffer, "1"), "expected \"1\", got \"%s\"\n", buffer); - - RegCloseKey(key); - - r = MsiInstallProductA(msifile, "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - res = RegOpenKeyA(HKEY_CURRENT_USER, "Environment", &key); - ok(!res, "failed to open environment key %d\n", res); - - res = RegQueryValueExA(key, "MSITESTVAR1", NULL, NULL, NULL, NULL); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - res = RegQueryValueExA(key, "MSITESTVAR2", NULL, NULL, NULL, NULL); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - type = REG_NONE; - buffer[0] = 0; - size = sizeof(buffer); - res = RegQueryValueExA(key, "MSITESTVAR3", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(type == REG_SZ, "expected REG_SZ, got %u\n", type); - ok(!lstrcmp(buffer, "1"), "expected \"1\", got \"%s\"\n", buffer); - RegDeleteValueA(key, "MSITESTVAR3"); - - res = RegQueryValueExA(key, "MSITESTVAR4", NULL, NULL, NULL, NULL); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - type = REG_NONE; - buffer[0] = 0; - size = sizeof(buffer); - res = RegQueryValueExA(key, "MSITESTVAR5", NULL, &type, (LPBYTE)buffer, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(type == REG_SZ, "expected REG_SZ, got %u\n", type); - ok(!lstrcmp(buffer, "1"), "expected \"1\", got \"%s\"\n", buffer); - RegDeleteValueA(key, "MSITESTVAR5"); - - RegCloseKey(key); - - ok(!delete_pf("msitest\\envvar.txt", TRUE), "file not removed\n"); - ok(!delete_pf("msitest", FALSE), "directory not removed\n"); - - DeleteFileA("msitest\\envvar.txt"); - delete_test_files(); -} - -static void test_register_class_info(void) -{ - UINT r; - LONG res; - HKEY hkey; - - create_test_files(); - create_file("msitest\\class.txt", 1000); - create_database(msifile, rci_tables, sizeof(rci_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - res = RegOpenKeyA(HKEY_CLASSES_ROOT, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey); - ok(res == ERROR_SUCCESS, "key not created\n"); - RegCloseKey(hkey); - - res = RegOpenKeyA(HKEY_CLASSES_ROOT, "FileType\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey); - ok(res == ERROR_SUCCESS, "key not created\n"); - RegCloseKey(hkey); - - res = RegOpenKeyA(HKEY_CLASSES_ROOT, "AppID\\{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}", &hkey); - ok(res == ERROR_SUCCESS, "key not created\n"); - RegCloseKey(hkey); - - r = MsiInstallProductA(msifile, "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - res = RegOpenKeyA(HKEY_CLASSES_ROOT, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n"); - - res = RegOpenKeyA(HKEY_CLASSES_ROOT, "FileType\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n"); - - res = RegOpenKeyA(HKEY_CLASSES_ROOT, "AppID\\{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}", &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n"); - - ok(!delete_pf("msitest\\class.txt", TRUE), "file not removed\n"); - ok(!delete_pf("msitest", FALSE), "directory not removed\n"); - - DeleteFileA("msitest\\class.txt"); - delete_test_files(); -} - -static void test_register_extension_info(void) -{ - UINT r; - LONG res; - HKEY hkey; - - create_test_files(); - create_file("msitest\\extension.txt", 1000); - create_database(msifile, rei_tables, sizeof(rei_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - res = RegOpenKeyA(HKEY_CLASSES_ROOT, ".extension", &hkey); - ok(res == ERROR_SUCCESS, "key not created\n"); - RegCloseKey(hkey); - - res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Prog.Id.1\\shell\\Open\\command", &hkey); - ok(res == ERROR_SUCCESS, "key not created\n"); - RegCloseKey(hkey); - - r = MsiInstallProductA(msifile, "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - res = RegOpenKeyA(HKEY_CLASSES_ROOT, ".extension", &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n"); - - res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Prog.Id.1", &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n"); - - ok(!delete_pf("msitest\\extension.txt", TRUE), "file not removed\n"); - ok(!delete_pf("msitest", FALSE), "directory not removed\n"); - - DeleteFileA("msitest\\extension.txt"); - delete_test_files(); -} - -static void test_register_mime_info(void) -{ - UINT r; - LONG res; - HKEY hkey; - - create_test_files(); - create_file("msitest\\mime.txt", 1000); - create_database(msifile, rmi_tables, sizeof(rmi_tables) / sizeof(msi_table)); - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - r = MsiInstallProductA(msifile, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - res = RegOpenKeyA(HKEY_CLASSES_ROOT, "MIME\\Database\\Content Type\\mime/type", &hkey); - ok(res == ERROR_SUCCESS, "key not created\n"); - RegCloseKey(hkey); - - r = MsiInstallProductA(msifile, "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - res = RegOpenKeyA(HKEY_CLASSES_ROOT, "MIME\\Database\\Content Type\\mime/type", &hkey); - ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n"); - - ok(!delete_pf("msitest\\mime.txt", TRUE), "file not removed\n"); - ok(!delete_pf("msitest", FALSE), "directory not removed\n"); - - DeleteFileA("msitest\\mime.txt"); - delete_test_files(); -} - -static void test_icon_table(void) -{ - MSIHANDLE hdb = 0, record; - LPCSTR query; - UINT res; - CHAR path[MAX_PATH], win9xpath[MAX_PATH]; - static const char prodcode[] = "{7DF88A49-996F-4EC8-A022-BF956F9B2CBB}"; - - create_database(msifile, icon_base_tables, sizeof(icon_base_tables) / sizeof(msi_table)); - - res = MsiOpenDatabase(msifile, MSIDBOPEN_TRANSACT, &hdb); - ok(res == ERROR_SUCCESS, "failed to open db: %d\n", res); - - query = "CREATE TABLE `Icon` (`Name` CHAR(72) NOT NULL, `Data` OBJECT NOT NULL PRIMARY KEY `Name`)"; - res = run_query( hdb, 0, query ); - ok(res == ERROR_SUCCESS, "Can't create Icon table: %d\n", res); - - create_file("icon.ico", 100); - record = MsiCreateRecord(1); - res = MsiRecordSetStream(record, 1, "icon.ico"); - ok(res == ERROR_SUCCESS, "Failed to add stream data to record: %d\n", res); - DeleteFile("icon.ico"); - - query = "INSERT INTO `Icon` (`Name`, `Data`) VALUES ('testicon', ?)"; - res = run_query(hdb, record, query); - ok(res == ERROR_SUCCESS, "Insert into Icon table failed: %d\n", res); - - res = MsiCloseHandle(record); - ok(res == ERROR_SUCCESS, "Failed to close record handle: %d\n", res); - res = MsiDatabaseCommit(hdb); - ok(res == ERROR_SUCCESS, "Failed to commit database: %d\n", res); - res = MsiCloseHandle(hdb); - ok(res == ERROR_SUCCESS, "Failed to close database: %d\n", res); - - /* per-user */ - res = MsiInstallProductA(msifile, "PUBLISH_PRODUCT=1"); - ok(res == ERROR_SUCCESS, "Failed to do per-user install: %d\n", res); - - lstrcpyA(path, APP_DATA_DIR); - lstrcatA(path, "\\"); - lstrcatA(path, "Microsoft\\Installer\\"); - lstrcatA(path, prodcode); - lstrcatA(path, "\\testicon"); - ok(file_exists(path), "Per-user icon file isn't where it's expected (%s)\n", path); - - res = MsiInstallProductA(msifile, "REMOVE=ALL"); - ok(res == ERROR_SUCCESS, "Failed to uninstall per-user\n"); - - /* system-wide */ - res = MsiInstallProductA(msifile, "PUBLISH_PRODUCT=1 ALLUSERS=1"); - ok(res == ERROR_SUCCESS, "Failed to system-wide install: %d\n", res); - - /* win9x with MSI 2.0 installs the icon to a different folder, same as above */ - lstrcpyA(win9xpath, APP_DATA_DIR); - lstrcatA(path, "\\"); - lstrcatA(path, "Microsoft\\Installer\\"); - lstrcatA(path, prodcode); - lstrcatA(path, "\\testicon"); - - lstrcpyA(path, WINDOWS_DIR); - lstrcatA(path, "\\"); - lstrcatA(path, "Installer\\"); - lstrcatA(path, prodcode); - lstrcatA(path, "\\testicon"); - ok(file_exists(path) || file_exists(win9xpath), - "System-wide icon file isn't where it's expected (%s)\n", path); - - res = MsiInstallProductA(msifile, "REMOVE=ALL"); - ok(res == ERROR_SUCCESS, "Failed to uninstall system-wide\n"); - - delete_pfmsitest_files(); - - DeleteFile(msifile); -} - -START_TEST(install) -{ - DWORD len; - char temp_path[MAX_PATH], prev_path[MAX_PATH], log_file[MAX_PATH]; - STATEMGRSTATUS status; - BOOL ret = FALSE; - - init_functionpointers(); - - on_win9x = check_win9x(); - - GetCurrentDirectoryA(MAX_PATH, prev_path); - GetTempPath(MAX_PATH, temp_path); - SetCurrentDirectoryA(temp_path); - - lstrcpyA(CURR_DIR, temp_path); - len = lstrlenA(CURR_DIR); - - if(len && (CURR_DIR[len - 1] == '\\')) - CURR_DIR[len - 1] = 0; - - get_system_dirs(); - get_user_dirs(); - - /* Create a restore point ourselves so we circumvent the multitude of restore points - * that would have been created by all the installation and removal tests. - */ - if (pSRSetRestorePointA) - { - memset(&status, 0, sizeof(status)); - ret = notify_system_change(BEGIN_NESTED_SYSTEM_CHANGE, &status); - } - - /* Create only one log file and don't append. We have to pass something - * for the log mode for this to work. The logfile needs to have an absolute - * path otherwise we still end up with some extra logfiles as some tests - * change the current directory. - */ - lstrcpyA(log_file, temp_path); - lstrcatA(log_file, "\\msitest.log"); - MsiEnableLogA(INSTALLLOGMODE_FATALEXIT, log_file, 0); - - test_MsiInstallProduct(); - test_MsiSetComponentState(); - test_packagecoltypes(); - test_continuouscabs(); - test_caborder(); - test_mixedmedia(); - test_samesequence(); - test_uiLevelFlags(); - test_readonlyfile(); - test_readonlyfile_cab(); - test_setdirproperty(); - test_cabisextracted(); - test_concurrentinstall(); - test_setpropertyfolder(); - test_publish_registerproduct(); - test_publish_publishproduct(); - test_publish_publishfeatures(); - test_publish_registeruser(); - test_publish_processcomponents(); - test_publish(); - test_publishsourcelist(); - test_transformprop(); - test_currentworkingdir(); - test_admin(); - test_adminprops(); - test_removefiles(); - test_movefiles(); - test_missingcab(); - test_duplicatefiles(); - test_writeregistryvalues(); - test_sourcefolder(); - test_customaction51(); - test_installstate(); - test_sourcepath(); - test_MsiConfigureProductEx(); - test_missingcomponent(); - test_sourcedirprop(); - test_adminimage(); - test_propcase(); - test_int_widths(); - test_shortcut(); - test_envvar(); - test_lastusedsource(); - test_preselected(); - test_installed_prop(); - test_file_in_use(); - test_file_in_use_cab(); - test_MsiSetExternalUI(); - test_allusers_prop(); - test_feature_override(); - test_create_folder(); - test_remove_folder(); - test_start_services(); - test_delete_services(); - test_self_registration(); - test_register_font(); - test_validate_product_id(); - test_install_remove_odbc(); - test_register_typelib(); - test_create_remove_shortcut(); - test_publish_components(); - test_remove_duplicate_files(); - test_remove_registry_values(); - test_find_related_products(); - test_remove_ini_values(); - test_remove_env_strings(); - test_register_class_info(); - test_register_extension_info(); - test_register_mime_info(); - test_icon_table(); - - DeleteFileA(log_file); - - if (pSRSetRestorePointA && ret) - { - ret = notify_system_change(END_NESTED_SYSTEM_CHANGE, &status); - if (ret) - remove_restore_point(status.llSequenceNumber); - } - FreeLibrary(hsrclient); - - SetCurrentDirectoryA(prev_path); -} diff --git a/rostests/winetests/msi/msi.c b/rostests/winetests/msi/msi.c deleted file mode 100644 index b377320131e..00000000000 --- a/rostests/winetests/msi/msi.c +++ /dev/null @@ -1,11369 +0,0 @@ -/* - * tests for Microsoft Installer functionality - * - * Copyright 2005 Mike McCormack 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 - */ - -#define _WIN32_MSI 300 - -#include -#include -#include -#include -#include -#include - -#include "wine/test.h" - -static const char msifile[] = "winetest.msi"; - -static BOOL (WINAPI *pConvertSidToStringSidA)(PSID, LPSTR*); - -static INSTALLSTATE (WINAPI *pMsiGetComponentPathA) - (LPCSTR, LPCSTR, LPSTR, DWORD*); -static UINT (WINAPI *pMsiGetFileHashA) - (LPCSTR, DWORD, PMSIFILEHASHINFO); -static UINT (WINAPI *pMsiGetProductInfoExA) - (LPCSTR, LPCSTR, MSIINSTALLCONTEXT, LPCSTR, LPSTR, LPDWORD); -static UINT (WINAPI *pMsiOpenPackageExA) - (LPCSTR, DWORD, MSIHANDLE*); -static UINT (WINAPI *pMsiOpenPackageExW) - (LPCWSTR, DWORD, MSIHANDLE*); -static UINT (WINAPI *pMsiEnumPatchesExA) - (LPCSTR, LPCSTR, DWORD, DWORD, DWORD, LPSTR, LPSTR, - MSIINSTALLCONTEXT*, LPSTR, LPDWORD); -static UINT (WINAPI *pMsiQueryComponentStateA) - (LPCSTR, LPCSTR, MSIINSTALLCONTEXT, LPCSTR, INSTALLSTATE*); -static INSTALLSTATE (WINAPI *pMsiUseFeatureExA) - (LPCSTR, LPCSTR ,DWORD, DWORD); -static UINT (WINAPI *pMsiGetPatchInfoExA) - (LPCSTR, LPCSTR, LPCSTR, MSIINSTALLCONTEXT, LPCSTR, LPSTR, DWORD *); - -static void init_functionpointers(void) -{ - HMODULE hmsi = GetModuleHandleA("msi.dll"); - HMODULE hadvapi32 = GetModuleHandleA("advapi32.dll"); - -#define GET_PROC(dll, func) \ - p ## func = (void *)GetProcAddress(dll, #func); \ - if(!p ## func) \ - trace("GetProcAddress(%s) failed\n", #func); - - GET_PROC(hmsi, MsiGetComponentPathA) - GET_PROC(hmsi, MsiGetFileHashA) - GET_PROC(hmsi, MsiGetProductInfoExA) - GET_PROC(hmsi, MsiOpenPackageExA) - GET_PROC(hmsi, MsiOpenPackageExW) - GET_PROC(hmsi, MsiEnumPatchesExA) - GET_PROC(hmsi, MsiQueryComponentStateA) - GET_PROC(hmsi, MsiUseFeatureExA) - GET_PROC(hmsi, MsiGetPatchInfoExA) - - GET_PROC(hadvapi32, ConvertSidToStringSidA) - -#undef GET_PROC -} - -static UINT run_query(MSIHANDLE hdb, const char *query) -{ - MSIHANDLE hview = 0; - UINT r; - - r = MsiDatabaseOpenView(hdb, query, &hview); - if (r != ERROR_SUCCESS) - return r; - - r = MsiViewExecute(hview, 0); - if (r == ERROR_SUCCESS) - r = MsiViewClose(hview); - MsiCloseHandle(hview); - return r; -} - -static UINT set_summary_info(MSIHANDLE hdb, LPSTR prodcode) -{ - UINT res; - MSIHANDLE suminfo; - - /* build summary info */ - res = MsiGetSummaryInformation(hdb, NULL, 7, &suminfo); - ok(res == ERROR_SUCCESS, "Failed to open summaryinfo\n"); - - res = MsiSummaryInfoSetProperty(suminfo, 2, VT_LPSTR, 0, NULL, - "Installation Database"); - ok(res == ERROR_SUCCESS, "Failed to set summary info\n"); - - res = MsiSummaryInfoSetProperty(suminfo, 3, VT_LPSTR, 0, NULL, - "Installation Database"); - ok(res == ERROR_SUCCESS, "Failed to set summary info\n"); - - res = MsiSummaryInfoSetProperty(suminfo, 4, VT_LPSTR, 0, NULL, - "Wine Hackers"); - ok(res == ERROR_SUCCESS, "Failed to set summary info\n"); - - res = MsiSummaryInfoSetProperty(suminfo, 7, VT_LPSTR, 0, NULL, - ";1033"); - ok(res == ERROR_SUCCESS, "Failed to set summary info\n"); - - res = MsiSummaryInfoSetProperty(suminfo, PID_REVNUMBER, VT_LPSTR, 0, NULL, - "{A2078D65-94D6-4205-8DEE-F68D6FD622AA}"); - ok(res == ERROR_SUCCESS, "Failed to set summary info\n"); - - res = MsiSummaryInfoSetProperty(suminfo, 14, VT_I4, 100, NULL, NULL); - ok(res == ERROR_SUCCESS, "Failed to set summary info\n"); - - res = MsiSummaryInfoSetProperty(suminfo, 15, VT_I4, 0, NULL, NULL); - ok(res == ERROR_SUCCESS, "Failed to set summary info\n"); - - res = MsiSummaryInfoPersist(suminfo); - ok(res == ERROR_SUCCESS, "Failed to make summary info persist\n"); - - res = MsiCloseHandle(suminfo); - ok(res == ERROR_SUCCESS, "Failed to close suminfo\n"); - - return res; -} - -static MSIHANDLE create_package_db(LPSTR prodcode) -{ - MSIHANDLE hdb = 0; - CHAR query[MAX_PATH]; - UINT res; - - DeleteFile(msifile); - - /* create an empty database */ - res = MsiOpenDatabase(msifile, MSIDBOPEN_CREATE, &hdb); - ok( res == ERROR_SUCCESS , "Failed to create database\n" ); - if (res != ERROR_SUCCESS) - return hdb; - - res = MsiDatabaseCommit(hdb); - ok(res == ERROR_SUCCESS, "Failed to commit database\n"); - - set_summary_info(hdb, prodcode); - - res = run_query(hdb, - "CREATE TABLE `Directory` ( " - "`Directory` CHAR(255) NOT NULL, " - "`Directory_Parent` CHAR(255), " - "`DefaultDir` CHAR(255) NOT NULL " - "PRIMARY KEY `Directory`)"); - ok(res == ERROR_SUCCESS , "Failed to create directory table\n"); - - res = run_query(hdb, - "CREATE TABLE `Property` ( " - "`Property` CHAR(72) NOT NULL, " - "`Value` CHAR(255) " - "PRIMARY KEY `Property`)"); - ok(res == ERROR_SUCCESS , "Failed to create directory table\n"); - - sprintf(query, "INSERT INTO `Property` " - "(`Property`, `Value`) " - "VALUES( 'ProductCode', '%s' )", prodcode); - res = run_query(hdb, query); - ok(res == ERROR_SUCCESS , "Failed\n"); - - res = MsiDatabaseCommit(hdb); - ok(res == ERROR_SUCCESS, "Failed to commit database\n"); - - return hdb; -} - -static void test_usefeature(void) -{ - INSTALLSTATE r; - - if (!pMsiUseFeatureExA) - { - win_skip("MsiUseFeatureExA not implemented\n"); - return; - } - - r = MsiQueryFeatureState(NULL,NULL); - ok( r == INSTALLSTATE_INVALIDARG, "wrong return val\n"); - - r = MsiQueryFeatureState("{9085040-6000-11d3-8cfe-0150048383c9}" ,NULL); - ok( r == INSTALLSTATE_INVALIDARG, "wrong return val\n"); - - r = pMsiUseFeatureExA(NULL,NULL,0,0); - ok( r == INSTALLSTATE_INVALIDARG, "wrong return val\n"); - - r = pMsiUseFeatureExA(NULL, "WORDVIEWFiles", -2, 1 ); - ok( r == INSTALLSTATE_INVALIDARG, "wrong return val\n"); - - r = pMsiUseFeatureExA("{90850409-6000-11d3-8cfe-0150048383c9}", - NULL, -2, 0 ); - ok( r == INSTALLSTATE_INVALIDARG, "wrong return val\n"); - - r = pMsiUseFeatureExA("{9085040-6000-11d3-8cfe-0150048383c9}", - "WORDVIEWFiles", -2, 0 ); - ok( r == INSTALLSTATE_INVALIDARG, "wrong return val\n"); - - r = pMsiUseFeatureExA("{0085040-6000-11d3-8cfe-0150048383c9}", - "WORDVIEWFiles", -2, 0 ); - ok( r == INSTALLSTATE_INVALIDARG, "wrong return val\n"); - - r = pMsiUseFeatureExA("{90850409-6000-11d3-8cfe-0150048383c9}", - "WORDVIEWFiles", -2, 1 ); - ok( r == INSTALLSTATE_INVALIDARG, "wrong return val\n"); -} - -static void test_null(void) -{ - MSIHANDLE hpkg; - UINT r; - HKEY hkey; - DWORD dwType, cbData; - LPBYTE lpData = NULL; - INSTALLSTATE state; - - r = pMsiOpenPackageExW(NULL, 0, &hpkg); - ok( r == ERROR_INVALID_PARAMETER,"wrong error\n"); - - state = MsiQueryProductStateW(NULL); - ok( state == INSTALLSTATE_INVALIDARG, "wrong return\n"); - - r = MsiEnumFeaturesW(NULL,0,NULL,NULL); - ok( r == ERROR_INVALID_PARAMETER,"wrong error\n"); - - r = MsiConfigureFeatureW(NULL, NULL, 0); - ok( r == ERROR_INVALID_PARAMETER, "wrong error\n"); - - r = MsiConfigureFeatureA("{00000000-0000-0000-0000-000000000000}", NULL, 0); - ok( r == ERROR_INVALID_PARAMETER, "wrong error\n"); - - r = MsiConfigureFeatureA("{00000000-0000-0000-0000-000000000001}", "foo", 0); - ok( r == ERROR_INVALID_PARAMETER, "wrong error %d\n", r); - - r = MsiConfigureFeatureA("{00000000-0000-0000-0000-000000000002}", "foo", INSTALLSTATE_DEFAULT); - ok( r == ERROR_UNKNOWN_PRODUCT, "wrong error %d\n", r); - - /* make sure empty string to MsiGetProductInfo is not a handle to default registry value, saving and restoring the - * necessary registry values */ - - /* empty product string */ - r = RegOpenKeyA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall", &hkey); - ok( r == ERROR_SUCCESS, "wrong error %d\n", r); - - r = RegQueryValueExA(hkey, NULL, 0, &dwType, lpData, &cbData); - ok ( r == ERROR_SUCCESS || r == ERROR_FILE_NOT_FOUND, "wrong error %d\n", r); - if ( r == ERROR_SUCCESS ) - { - lpData = HeapAlloc(GetProcessHeap(), 0, cbData); - if (!lpData) - skip("Out of memory\n"); - else - { - r = RegQueryValueExA(hkey, NULL, 0, &dwType, lpData, &cbData); - ok ( r == ERROR_SUCCESS, "wrong error %d\n", r); - } - } - - r = RegSetValueA(hkey, NULL, REG_SZ, "test", strlen("test")); - ok( r == ERROR_SUCCESS, "wrong error %d\n", r); - - r = MsiGetProductInfoA("", "", NULL, NULL); - ok ( r == ERROR_INVALID_PARAMETER, "wrong error %d\n", r); - - if (lpData) - { - r = RegSetValueExA(hkey, NULL, 0, dwType, lpData, cbData); - ok ( r == ERROR_SUCCESS, "wrong error %d\n", r); - - HeapFree(GetProcessHeap(), 0, lpData); - } - else - { - r = RegDeleteValueA(hkey, NULL); - ok ( r == ERROR_SUCCESS, "wrong error %d\n", r); - } - - r = RegCloseKey(hkey); - ok( r == ERROR_SUCCESS, "wrong error %d\n", r); - - /* empty attribute */ - r = RegCreateKeyA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{F1C3AF50-8B56-4A69-A00C-00773FE42F30}", &hkey); - ok( r == ERROR_SUCCESS, "wrong error %d\n", r); - - r = RegSetValueA(hkey, NULL, REG_SZ, "test", strlen("test")); - ok( r == ERROR_SUCCESS, "wrong error %d\n", r); - - r = MsiGetProductInfoA("{F1C3AF50-8B56-4A69-A00C-00773FE42F30}", "", NULL, NULL); - ok ( r == ERROR_UNKNOWN_PROPERTY, "wrong error %d\n", r); - - r = RegCloseKey(hkey); - ok( r == ERROR_SUCCESS, "wrong error %d\n", r); - - r = RegDeleteKeyA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{F1C3AF50-8B56-4A69-A00C-00773FE42F30}"); - ok( r == ERROR_SUCCESS, "wrong error %d\n", r); -} - -static void test_getcomponentpath(void) -{ - INSTALLSTATE r; - char buffer[0x100]; - DWORD sz; - - if(!pMsiGetComponentPathA) - return; - - r = pMsiGetComponentPathA( NULL, NULL, NULL, NULL ); - ok( r == INSTALLSTATE_INVALIDARG, "wrong return value\n"); - - r = pMsiGetComponentPathA( "bogus", "bogus", NULL, NULL ); - ok( r == INSTALLSTATE_INVALIDARG, "wrong return value\n"); - - r = pMsiGetComponentPathA( "bogus", "{00000000-0000-0000-000000000000}", NULL, NULL ); - ok( r == INSTALLSTATE_INVALIDARG, "wrong return value\n"); - - sz = sizeof buffer; - buffer[0]=0; - r = pMsiGetComponentPathA( "bogus", "{00000000-0000-0000-000000000000}", buffer, &sz ); - ok( r == INSTALLSTATE_INVALIDARG, "wrong return value\n"); - - r = pMsiGetComponentPathA( "{00000000-78E1-11D2-B60F-006097C998E7}", - "{00000000-0000-0000-0000-000000000000}", buffer, &sz ); - ok( r == INSTALLSTATE_UNKNOWN, "wrong return value\n"); - - r = pMsiGetComponentPathA( "{00000409-78E1-11D2-B60F-006097C998E7}", - "{00000000-0000-0000-0000-00000000}", buffer, &sz ); - ok( r == INSTALLSTATE_INVALIDARG, "wrong return value\n"); - - r = pMsiGetComponentPathA( "{00000409-78E1-11D2-B60F-006097C998E7}", - "{029E403D-A86A-1D11-5B5B0006799C897E}", buffer, &sz ); - ok( r == INSTALLSTATE_INVALIDARG, "wrong return value\n"); - - r = pMsiGetComponentPathA( "{00000000-78E1-11D2-B60F-006097C9987e}", - "{00000000-A68A-11d1-5B5B-0006799C897E}", buffer, &sz ); - ok( r == INSTALLSTATE_UNKNOWN, "wrong return value\n"); -} - -static void create_file(LPCSTR name, LPCSTR data, DWORD size) -{ - HANDLE file; - DWORD written; - - file = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "Failure to open file %s\n", name); - WriteFile(file, data, strlen(data), &written, NULL); - - if (size) - { - SetFilePointer(file, size, NULL, FILE_BEGIN); - SetEndOfFile(file); - } - - CloseHandle(file); -} - -#define HASHSIZE sizeof(MSIFILEHASHINFO) - -static const struct -{ - LPCSTR data; - DWORD size; - MSIFILEHASHINFO hash; -} hash_data[] = -{ - { "abc", 0, - { HASHSIZE, - { 0x98500190, 0xb04fd23c, 0x7d3f96d6, 0x727fe128 }, - }, - }, - - { "C:\\Program Files\\msitest\\caesar\n", 0, - { HASHSIZE, - { 0x2b566794, 0xfd42181b, 0x2514d6e4, 0x5768b4e2 }, - }, - }, - - { "C:\\Program Files\\msitest\\caesar\n", 500, - { HASHSIZE, - { 0x58095058, 0x805efeff, 0x10f3483e, 0x0147d653 }, - }, - }, -}; - -static void test_MsiGetFileHash(void) -{ - const char name[] = "msitest.bin"; - UINT r; - MSIFILEHASHINFO hash; - DWORD i; - - if (!pMsiGetFileHashA) - { - win_skip("MsiGetFileHash not implemented\n"); - return; - } - - hash.dwFileHashInfoSize = sizeof(MSIFILEHASHINFO); - - /* szFilePath is NULL */ - r = pMsiGetFileHashA(NULL, 0, &hash); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* szFilePath is empty */ - r = pMsiGetFileHashA("", 0, &hash); - ok(r == ERROR_PATH_NOT_FOUND || r == ERROR_BAD_PATHNAME, - "Expected ERROR_PATH_NOT_FOUND or ERROR_BAD_PATHNAME, got %d\n", r); - - /* szFilePath is nonexistent */ - r = pMsiGetFileHashA(name, 0, &hash); - ok(r == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", r); - - /* dwOptions is non-zero */ - r = pMsiGetFileHashA(name, 1, &hash); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* pHash.dwFileHashInfoSize is not correct */ - hash.dwFileHashInfoSize = 0; - r = pMsiGetFileHashA(name, 0, &hash); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* pHash is NULL */ - r = pMsiGetFileHashA(name, 0, NULL); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - for (i = 0; i < sizeof(hash_data) / sizeof(hash_data[0]); i++) - { - int ret; - - create_file(name, hash_data[i].data, hash_data[i].size); - - memset(&hash, 0, sizeof(MSIFILEHASHINFO)); - hash.dwFileHashInfoSize = sizeof(MSIFILEHASHINFO); - - r = pMsiGetFileHashA(name, 0, &hash); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - ret = memcmp(&hash, &hash_data[i].hash, HASHSIZE); - ok(ret == 0 || - broken(ret != 0), /* win95 */ - "Hash incorrect\n"); - - DeleteFile(name); - } -} - -/* copied from dlls/msi/registry.c */ -static BOOL squash_guid(LPCWSTR in, LPWSTR out) -{ - DWORD i,n=1; - GUID guid; - - if (FAILED(CLSIDFromString((LPCOLESTR)in, &guid))) - return FALSE; - - for(i=0; i<8; i++) - out[7-i] = in[n++]; - n++; - for(i=0; i<4; i++) - out[11-i] = in[n++]; - n++; - for(i=0; i<4; i++) - out[15-i] = in[n++]; - n++; - for(i=0; i<2; i++) - { - out[17+i*2] = in[n++]; - out[16+i*2] = in[n++]; - } - n++; - for( ; i<8; i++) - { - out[17+i*2] = in[n++]; - out[16+i*2] = in[n++]; - } - out[32]=0; - return TRUE; -} - -static void create_test_guid(LPSTR prodcode, LPSTR squashed) -{ - WCHAR guidW[MAX_PATH]; - WCHAR squashedW[MAX_PATH]; - GUID guid; - HRESULT hr; - int size; - - hr = CoCreateGuid(&guid); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); - - size = StringFromGUID2(&guid, guidW, MAX_PATH); - ok(size == 39, "Expected 39, got %d\n", hr); - - WideCharToMultiByte(CP_ACP, 0, guidW, size, prodcode, MAX_PATH, NULL, NULL); - squash_guid(guidW, squashedW); - WideCharToMultiByte(CP_ACP, 0, squashedW, -1, squashed, MAX_PATH, NULL, NULL); -} - -static void get_user_sid(LPSTR *usersid) -{ - HANDLE token; - DWORD size; - PTOKEN_USER user; - - OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token); - - size = 0; - GetTokenInformation(token, TokenUser, NULL, size, &size); - user = HeapAlloc(GetProcessHeap(), 0, size); - - GetTokenInformation(token, TokenUser, user, size, &size); - pConvertSidToStringSidA(user->User.Sid, usersid); - - HeapFree(GetProcessHeap(), 0, user); - CloseHandle(token); -} - -static void test_MsiQueryProductState(void) -{ - CHAR prodcode[MAX_PATH]; - CHAR prod_squashed[MAX_PATH]; - CHAR keypath[MAX_PATH*2]; - LPSTR usersid; - INSTALLSTATE state; - LONG res; - HKEY userkey, localkey, props; - HKEY prodkey; - DWORD data; - - create_test_guid(prodcode, prod_squashed); - get_user_sid(&usersid); - - /* NULL prodcode */ - state = MsiQueryProductStateA(NULL); - ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state); - - /* empty prodcode */ - state = MsiQueryProductStateA(""); - ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state); - - /* garbage prodcode */ - state = MsiQueryProductStateA("garbage"); - ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state); - - /* guid without brackets */ - state = MsiQueryProductStateA("6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D"); - ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state); - - /* guid with brackets */ - state = MsiQueryProductStateA("{6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D}"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - /* same length as guid, but random */ - state = MsiQueryProductStateA("A938G02JF-2NF3N93-VN3-2NNF-3KGKALDNF93"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - /* MSIINSTALLCONTEXT_USERUNMANAGED */ - - state = MsiQueryProductStateA(prodcode); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user product key exists */ - state = MsiQueryProductStateA(prodcode); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"); - lstrcatA(keypath, prodcode); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &localkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local uninstall key exists */ - state = MsiQueryProductStateA(prodcode); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - data = 1; - res = RegSetValueExA(localkey, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&data, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* WindowsInstaller value exists */ - state = MsiQueryProductStateA(prodcode); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - RegDeleteValueA(localkey, "WindowsInstaller"); - RegDeleteKeyA(localkey, ""); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &localkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local product key exists */ - state = MsiQueryProductStateA(prodcode); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - res = RegCreateKeyA(localkey, "InstallProperties", &props); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* install properties key exists */ - state = MsiQueryProductStateA(prodcode); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - data = 1; - res = RegSetValueExA(props, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&data, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* WindowsInstaller value exists */ - state = MsiQueryProductStateA(prodcode); - ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); - - data = 2; - res = RegSetValueExA(props, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&data, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* WindowsInstaller value is not 1 */ - state = MsiQueryProductStateA(prodcode); - ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); - - RegDeleteKeyA(userkey, ""); - - /* user product key does not exist */ - state = MsiQueryProductStateA(prodcode); - ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - - RegDeleteValueA(props, "WindowsInstaller"); - RegDeleteKeyA(props, ""); - RegCloseKey(props); - RegDeleteKeyA(localkey, ""); - RegCloseKey(localkey); - RegDeleteKeyA(userkey, ""); - RegCloseKey(userkey); - - /* MSIINSTALLCONTEXT_USERMANAGED */ - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryProductStateA(prodcode); - ok(state == INSTALLSTATE_ADVERTISED, - "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &localkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryProductStateA(prodcode); - ok(state == INSTALLSTATE_ADVERTISED, - "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - res = RegCreateKeyA(localkey, "InstallProperties", &props); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryProductStateA(prodcode); - ok(state == INSTALLSTATE_ADVERTISED, - "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - data = 1; - res = RegSetValueExA(props, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&data, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* WindowsInstaller value exists */ - state = MsiQueryProductStateA(prodcode); - ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); - - RegDeleteValueA(props, "WindowsInstaller"); - RegDeleteKeyA(props, ""); - RegCloseKey(props); - RegDeleteKeyA(localkey, ""); - RegCloseKey(localkey); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - - /* MSIINSTALLCONTEXT_MACHINE */ - - lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryProductStateA(prodcode); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, "S-1-5-18\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &localkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryProductStateA(prodcode); - ok(state == INSTALLSTATE_ADVERTISED, - "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - res = RegCreateKeyA(localkey, "InstallProperties", &props); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryProductStateA(prodcode); - ok(state == INSTALLSTATE_ADVERTISED, - "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - data = 1; - res = RegSetValueExA(props, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&data, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* WindowsInstaller value exists */ - state = MsiQueryProductStateA(prodcode); - ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); - - RegDeleteValueA(props, "WindowsInstaller"); - RegDeleteKeyA(props, ""); - RegCloseKey(props); - RegDeleteKeyA(localkey, ""); - RegCloseKey(localkey); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - - LocalFree(usersid); -} - -static const char table_enc85[] = -"!$%&'()*+,-.0123456789=?@ABCDEFGHIJKLMNO" -"PQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwx" -"yz{}~"; - -/* - * Encodes a base85 guid given a GUID pointer - * Caller should provide a 21 character buffer for the encoded string. - */ -static void encode_base85_guid( GUID *guid, LPWSTR str ) -{ - unsigned int x, *p, i; - - p = (unsigned int*) guid; - for( i=0; i<4; i++ ) - { - x = p[i]; - *str++ = table_enc85[x%85]; - x = x/85; - *str++ = table_enc85[x%85]; - x = x/85; - *str++ = table_enc85[x%85]; - x = x/85; - *str++ = table_enc85[x%85]; - x = x/85; - *str++ = table_enc85[x%85]; - } - *str = 0; -} - -static void compose_base85_guid(LPSTR component, LPSTR comp_base85, LPSTR squashed) -{ - WCHAR guidW[MAX_PATH]; - WCHAR base85W[MAX_PATH]; - WCHAR squashedW[MAX_PATH]; - GUID guid; - HRESULT hr; - int size; - - hr = CoCreateGuid(&guid); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); - - size = StringFromGUID2(&guid, guidW, MAX_PATH); - ok(size == 39, "Expected 39, got %d\n", hr); - - WideCharToMultiByte(CP_ACP, 0, guidW, size, component, MAX_PATH, NULL, NULL); - encode_base85_guid(&guid, base85W); - WideCharToMultiByte(CP_ACP, 0, base85W, -1, comp_base85, MAX_PATH, NULL, NULL); - squash_guid(guidW, squashedW); - WideCharToMultiByte(CP_ACP, 0, squashedW, -1, squashed, MAX_PATH, NULL, NULL); -} - -static void test_MsiQueryFeatureState(void) -{ - HKEY userkey, localkey, compkey, compkey2; - CHAR prodcode[MAX_PATH]; - CHAR prod_squashed[MAX_PATH]; - CHAR component[MAX_PATH]; - CHAR comp_base85[MAX_PATH]; - CHAR comp_squashed[MAX_PATH], comp_squashed2[MAX_PATH]; - CHAR keypath[MAX_PATH*2]; - INSTALLSTATE state; - LPSTR usersid; - LONG res; - - create_test_guid(prodcode, prod_squashed); - compose_base85_guid(component, comp_base85, comp_squashed); - compose_base85_guid(component, comp_base85 + 20, comp_squashed2); - get_user_sid(&usersid); - - /* NULL prodcode */ - state = MsiQueryFeatureStateA(NULL, "feature"); - ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state); - - /* empty prodcode */ - state = MsiQueryFeatureStateA("", "feature"); - ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state); - - /* garbage prodcode */ - state = MsiQueryFeatureStateA("garbage", "feature"); - ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state); - - /* guid without brackets */ - state = MsiQueryFeatureStateA("6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D", "feature"); - ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state); - - /* guid with brackets */ - state = MsiQueryFeatureStateA("{6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D}", "feature"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - /* same length as guid, but random */ - state = MsiQueryFeatureStateA("A938G02JF-2NF3N93-VN3-2NNF-3KGKALDNF93", "feature"); - ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state); - - /* NULL szFeature */ - state = MsiQueryFeatureStateA(prodcode, NULL); - ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state); - - /* empty szFeature */ - state = MsiQueryFeatureStateA(prodcode, ""); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - /* feature key does not exist yet */ - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - /* MSIINSTALLCONTEXT_USERUNMANAGED */ - - lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Features\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* feature key exists */ - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - res = RegSetValueExA(userkey, "feature", 0, REG_SZ, (const BYTE *)"", 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* feature value exists */ - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Products\\"); - lstrcatA(keypath, prod_squashed); - lstrcatA(keypath, "\\Features"); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &localkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* userdata features key exists */ - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)"aaaaaaaaaaaaaaaaaaa", 20); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_BADCONFIG, "Expected INSTALLSTATE_BADCONFIG, got %d\n", state); - - res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)"aaaaaaaaaaaaaaaaaaaa", 21); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)"aaaaaaaaaaaaaaaaaaaaa", 22); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)comp_base85, 41); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Components\\"); - lstrcatA(keypath, comp_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &compkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Components\\"); - lstrcatA(keypath, comp_squashed2); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &compkey2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"", 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"apple", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - res = RegSetValueExA(compkey2, prod_squashed, 0, REG_SZ, (const BYTE *)"orange", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* INSTALLSTATE_LOCAL */ - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"01\\", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* INSTALLSTATE_SOURCE */ - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"01", 3); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* bad INSTALLSTATE_SOURCE */ - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"01a", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* INSTALLSTATE_SOURCE */ - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"01", 3); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* bad INSTALLSTATE_SOURCE */ - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - RegDeleteValueA(compkey, prod_squashed); - RegDeleteValueA(compkey2, prod_squashed); - RegDeleteKeyA(compkey, ""); - RegDeleteKeyA(compkey2, ""); - RegDeleteValueA(localkey, "feature"); - RegDeleteValueA(userkey, "feature"); - RegDeleteKeyA(userkey, ""); - RegCloseKey(compkey); - RegCloseKey(compkey2); - RegCloseKey(localkey); - RegCloseKey(userkey); - - /* MSIINSTALLCONTEXT_USERMANAGED */ - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Installer\\Features\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* feature key exists */ - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - res = RegSetValueExA(userkey, "feature", 0, REG_SZ, (const BYTE *)"", 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* feature value exists */ - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Products\\"); - lstrcatA(keypath, prod_squashed); - lstrcatA(keypath, "\\Features"); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &localkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* userdata features key exists */ - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)"aaaaaaaaaaaaaaaaaaa", 20); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_BADCONFIG, "Expected INSTALLSTATE_BADCONFIG, got %d\n", state); - - res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)"aaaaaaaaaaaaaaaaaaaa", 21); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)"aaaaaaaaaaaaaaaaaaaaa", 22); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)comp_base85, 41); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Components\\"); - lstrcatA(keypath, comp_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &compkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Components\\"); - lstrcatA(keypath, comp_squashed2); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &compkey2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"", 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"apple", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - res = RegSetValueExA(compkey2, prod_squashed, 0, REG_SZ, (const BYTE *)"orange", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - RegDeleteValueA(compkey, prod_squashed); - RegDeleteValueA(compkey2, prod_squashed); - RegDeleteKeyA(compkey, ""); - RegDeleteKeyA(compkey2, ""); - RegDeleteValueA(localkey, "feature"); - RegDeleteValueA(userkey, "feature"); - RegDeleteKeyA(userkey, ""); - RegCloseKey(compkey); - RegCloseKey(compkey2); - RegCloseKey(localkey); - RegCloseKey(userkey); - - /* MSIINSTALLCONTEXT_MACHINE */ - - lstrcpyA(keypath, "Software\\Classes\\Installer\\Features\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* feature key exists */ - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - res = RegSetValueExA(userkey, "feature", 0, REG_SZ, (const BYTE *)"", 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* feature value exists */ - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, "S-1-5-18\\Products\\"); - lstrcatA(keypath, prod_squashed); - lstrcatA(keypath, "\\Features"); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &localkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* userdata features key exists */ - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)"aaaaaaaaaaaaaaaaaaa", 20); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_BADCONFIG, "Expected INSTALLSTATE_BADCONFIG, got %d\n", state); - - res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)"aaaaaaaaaaaaaaaaaaaa", 21); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)"aaaaaaaaaaaaaaaaaaaaa", 22); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)comp_base85, 41); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, "S-1-5-18\\Components\\"); - lstrcatA(keypath, comp_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &compkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, "S-1-5-18\\Components\\"); - lstrcatA(keypath, comp_squashed2); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &compkey2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"", 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"apple", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); - - res = RegSetValueExA(compkey2, prod_squashed, 0, REG_SZ, (const BYTE *)"orange", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MsiQueryFeatureStateA(prodcode, "feature"); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - RegDeleteValueA(compkey, prod_squashed); - RegDeleteValueA(compkey2, prod_squashed); - RegDeleteKeyA(compkey, ""); - RegDeleteKeyA(compkey2, ""); - RegDeleteValueA(localkey, "feature"); - RegDeleteValueA(userkey, "feature"); - RegDeleteKeyA(userkey, ""); - RegCloseKey(compkey); - RegCloseKey(compkey2); - RegCloseKey(localkey); - RegCloseKey(userkey); - LocalFree(usersid); -} - -static void test_MsiQueryComponentState(void) -{ - HKEY compkey, prodkey; - CHAR prodcode[MAX_PATH]; - CHAR prod_squashed[MAX_PATH]; - CHAR component[MAX_PATH]; - CHAR comp_base85[MAX_PATH]; - CHAR comp_squashed[MAX_PATH]; - CHAR keypath[MAX_PATH]; - INSTALLSTATE state; - LPSTR usersid; - LONG res; - UINT r; - - static const INSTALLSTATE MAGIC_ERROR = 0xdeadbeef; - - if (!pMsiQueryComponentStateA) - { - win_skip("MsiQueryComponentStateA not implemented\n"); - return; - } - - create_test_guid(prodcode, prod_squashed); - compose_base85_guid(component, comp_base85, comp_squashed); - get_user_sid(&usersid); - - /* NULL szProductCode */ - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA(NULL, NULL, MSIINSTALLCONTEXT_MACHINE, component, &state); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(state == MAGIC_ERROR, "Expected 0xdeadbeef, got %d\n", state); - - /* empty szProductCode */ - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA("", NULL, MSIINSTALLCONTEXT_MACHINE, component, &state); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(state == MAGIC_ERROR, "Expected 0xdeadbeef, got %d\n", state); - - /* random szProductCode */ - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA("random", NULL, MSIINSTALLCONTEXT_MACHINE, component, &state); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(state == MAGIC_ERROR, "Expected 0xdeadbeef, got %d\n", state); - - /* GUID-length szProductCode */ - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA("DJANE93KNDNAS-2KN2NR93KMN3LN13=L1N3KDE", NULL, MSIINSTALLCONTEXT_MACHINE, component, &state); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(state == MAGIC_ERROR, "Expected 0xdeadbeef, got %d\n", state); - - /* GUID-length with brackets */ - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA("{JANE93KNDNAS-2KN2NR93KMN3LN13=L1N3KD}", NULL, MSIINSTALLCONTEXT_MACHINE, component, &state); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(state == MAGIC_ERROR, "Expected 0xdeadbeef, got %d\n", state); - - /* actual GUID */ - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, component, &state); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(state == MAGIC_ERROR, "Expected 0xdeadbeef, got %d\n", state); - - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, component, &state); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(state == MAGIC_ERROR, "Expected 0xdeadbeef, got %d\n", state); - - lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, component, &state); - ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - - /* create local system product key */ - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\S-1-5-18\\Products\\"); - lstrcatA(keypath, prod_squashed); - lstrcatA(keypath, "\\InstallProperties"); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local system product key exists */ - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, component, &state); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(state == MAGIC_ERROR, "Expected 0xdeadbeef, got %d\n", state); - - res = RegSetValueExA(prodkey, "LocalPackage", 0, REG_SZ, (const BYTE *)"msitest.msi", 11); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* LocalPackage value exists */ - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, component, &state); - ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\S-1-5-18\\Components\\"); - lstrcatA(keypath, comp_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &compkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* component key exists */ - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, component, &state); - ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"", 0); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* component\product exists */ - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, component, &state); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(state == INSTALLSTATE_NOTUSED || state == INSTALLSTATE_LOCAL, - "Expected INSTALLSTATE_NOTUSED or INSTALLSTATE_LOCAL, got %d\n", state); - - /* NULL component, product exists */ - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, NULL, &state); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(state == MAGIC_ERROR, "Expected state not changed, got %d\n", state); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"hi", 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* INSTALLSTATE_LOCAL */ - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, component, &state); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"01\\", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* INSTALLSTATE_SOURCE */ - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, component, &state); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"01", 3); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* bad INSTALLSTATE_SOURCE */ - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, component, &state); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"01a", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* INSTALLSTATE_SOURCE */ - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, component, &state); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"01", 3); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* bad INSTALLSTATE_SOURCE */ - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, component, &state); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - RegDeleteValueA(prodkey, "LocalPackage"); - RegDeleteKeyA(prodkey, ""); - RegDeleteValueA(compkey, prod_squashed); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - RegCloseKey(compkey); - - /* MSIINSTALLCONTEXT_USERUNMANAGED */ - - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, component, &state); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(state == MAGIC_ERROR, "Expected 0xdeadbeef, got %d\n", state); - - lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, component, &state); - ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Products\\"); - lstrcatA(keypath, prod_squashed); - lstrcatA(keypath, "\\InstallProperties"); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = RegSetValueExA(prodkey, "LocalPackage", 0, REG_SZ, (const BYTE *)"msitest.msi", 11); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - RegCloseKey(prodkey); - - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, component, &state); - ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Components\\"); - lstrcatA(keypath, comp_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &compkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* component key exists */ - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, component, &state); - ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"", 0); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* component\product exists */ - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, component, &state); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(state == INSTALLSTATE_NOTUSED || state == INSTALLSTATE_LOCAL, - "Expected INSTALLSTATE_NOTUSED or INSTALLSTATE_LOCAL, got %d\n", state); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"hi", 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, component, &state); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - /* MSIINSTALLCONTEXT_USERMANAGED */ - - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERMANAGED, component, &state); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(state == MAGIC_ERROR, "Expected 0xdeadbeef, got %d\n", state); - - lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERMANAGED, component, &state); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(state == MAGIC_ERROR, "Expected 0xdeadbeef, got %d\n", state); - - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERMANAGED, component, &state); - ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Products\\"); - lstrcatA(keypath, prod_squashed); - lstrcatA(keypath, "\\InstallProperties"); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = RegSetValueExA(prodkey, "ManagedLocalPackage", 0, REG_SZ, (const BYTE *)"msitest.msi", 11); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - state = MAGIC_ERROR; - r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERMANAGED, component, &state); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - RegDeleteValueA(prodkey, "LocalPackage"); - RegDeleteValueA(prodkey, "ManagedLocalPackage"); - RegDeleteKeyA(prodkey, ""); - RegDeleteValueA(compkey, prod_squashed); - RegDeleteKeyA(compkey, ""); - RegCloseKey(prodkey); - RegCloseKey(compkey); - LocalFree(usersid); -} - -static void test_MsiGetComponentPath(void) -{ - HKEY compkey, prodkey, installprop; - CHAR prodcode[MAX_PATH]; - CHAR prod_squashed[MAX_PATH]; - CHAR component[MAX_PATH]; - CHAR comp_base85[MAX_PATH]; - CHAR comp_squashed[MAX_PATH]; - CHAR keypath[MAX_PATH]; - CHAR path[MAX_PATH]; - INSTALLSTATE state; - LPSTR usersid; - DWORD size, val; - LONG res; - - create_test_guid(prodcode, prod_squashed); - compose_base85_guid(component, comp_base85, comp_squashed); - get_user_sid(&usersid); - - /* NULL szProduct */ - size = MAX_PATH; - state = MsiGetComponentPathA(NULL, component, path, &size); - ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* NULL szComponent */ - size = MAX_PATH; - state = MsiGetComponentPathA(prodcode, NULL, path, &size); - ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - size = MAX_PATH; - state = MsiLocateComponentA(NULL, path, &size); - ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* NULL lpPathBuf */ - size = MAX_PATH; - state = MsiGetComponentPathA(prodcode, component, NULL, &size); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - size = MAX_PATH; - state = MsiLocateComponentA(component, NULL, &size); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* NULL pcchBuf */ - size = MAX_PATH; - state = MsiGetComponentPathA(prodcode, component, path, NULL); - ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - size = MAX_PATH; - state = MsiLocateComponentA(component, path, NULL); - ok(state == INSTALLSTATE_INVALIDARG, "Expected INSTALLSTATE_INVALIDARG, got %d\n", state); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* all params valid */ - size = MAX_PATH; - state = MsiGetComponentPathA(prodcode, component, path, &size); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - size = MAX_PATH; - state = MsiLocateComponentA(component, path, &size); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\UserData\\S-1-5-18\\Components\\"); - lstrcatA(keypath, comp_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &compkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local system component key exists */ - size = MAX_PATH; - state = MsiGetComponentPathA(prodcode, component, path, &size); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - size = MAX_PATH; - state = MsiLocateComponentA(component, path, &size); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"C:\\imapath", 10); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* product value exists */ - path[0] = 0; - size = MAX_PATH; - state = MsiGetComponentPathA(prodcode, component, path, &size); - ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - path[0] = 0; - size = MAX_PATH; - state = MsiLocateComponentA(component, path, &size); - ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\UserData\\S-1-5-18\\Products\\"); - lstrcatA(keypath, prod_squashed); - lstrcatA(keypath, "\\InstallProperties"); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &installprop); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - val = 1; - res = RegSetValueExA(installprop, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* install properties key exists */ - path[0] = 0; - size = MAX_PATH; - state = MsiGetComponentPathA(prodcode, component, path, &size); - ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - path[0] = 0; - size = MAX_PATH; - state = MsiLocateComponentA(component, path, &size); - ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - create_file("C:\\imapath", "C:\\imapath", 11); - - /* file exists */ - path[0] = 0; - size = MAX_PATH; - state = MsiGetComponentPathA(prodcode, component, path, &size); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - path[0] = 0; - size = MAX_PATH; - state = MsiLocateComponentA(component, path, &size); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - RegDeleteValueA(compkey, prod_squashed); - RegDeleteKeyA(compkey, ""); - RegDeleteValueA(installprop, "WindowsInstaller"); - RegDeleteKeyA(installprop, ""); - RegCloseKey(compkey); - RegCloseKey(installprop); - DeleteFileA("C:\\imapath"); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Components\\"); - lstrcatA(keypath, comp_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &compkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user managed component key exists */ - size = MAX_PATH; - state = MsiGetComponentPathA(prodcode, component, path, &size); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - size = MAX_PATH; - state = MsiLocateComponentA(component, path, &size); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"C:\\imapath", 10); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* product value exists */ - path[0] = 0; - size = MAX_PATH; - state = MsiGetComponentPathA(prodcode, component, path, &size); - ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - path[0] = 0; - size = MAX_PATH; - state = MsiLocateComponentA(component, path, &size); - ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\UserData\\S-1-5-18\\Products\\"); - lstrcatA(keypath, prod_squashed); - lstrcatA(keypath, "\\InstallProperties"); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &installprop); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - val = 1; - res = RegSetValueExA(installprop, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* install properties key exists */ - path[0] = 0; - size = MAX_PATH; - state = MsiGetComponentPathA(prodcode, component, path, &size); - ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - path[0] = 0; - size = MAX_PATH; - state = MsiLocateComponentA(component, path, &size); - ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - create_file("C:\\imapath", "C:\\imapath", 11); - - /* file exists */ - path[0] = 0; - size = MAX_PATH; - state = MsiGetComponentPathA(prodcode, component, path, &size); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - path[0] = 0; - size = MAX_PATH; - state = MsiLocateComponentA(component, path, &size); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - RegDeleteValueA(compkey, prod_squashed); - RegDeleteKeyA(compkey, ""); - RegDeleteValueA(installprop, "WindowsInstaller"); - RegDeleteKeyA(installprop, ""); - RegCloseKey(compkey); - RegCloseKey(installprop); - DeleteFileA("C:\\imapath"); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\Managed\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user managed product key exists */ - size = MAX_PATH; - state = MsiGetComponentPathA(prodcode, component, path, &size); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - size = MAX_PATH; - state = MsiLocateComponentA(component, path, &size); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Components\\"); - lstrcatA(keypath, comp_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &compkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user managed component key exists */ - size = MAX_PATH; - state = MsiGetComponentPathA(prodcode, component, path, &size); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - size = MAX_PATH; - state = MsiLocateComponentA(component, path, &size); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"C:\\imapath", 10); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* product value exists */ - path[0] = 0; - size = MAX_PATH; - state = MsiGetComponentPathA(prodcode, component, path, &size); - ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - path[0] = 0; - size = MAX_PATH; - state = MsiLocateComponentA(component, path, &size); - ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\UserData\\S-1-5-18\\Products\\"); - lstrcatA(keypath, prod_squashed); - lstrcatA(keypath, "\\InstallProperties"); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &installprop); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - val = 1; - res = RegSetValueExA(installprop, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* install properties key exists */ - path[0] = 0; - size = MAX_PATH; - state = MsiGetComponentPathA(prodcode, component, path, &size); - ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - path[0] = 0; - size = MAX_PATH; - state = MsiLocateComponentA(component, path, &size); - ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - create_file("C:\\imapath", "C:\\imapath", 11); - - /* file exists */ - path[0] = 0; - size = MAX_PATH; - state = MsiGetComponentPathA(prodcode, component, path, &size); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - path[0] = 0; - size = MAX_PATH; - state = MsiLocateComponentA(component, path, &size); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - RegDeleteValueA(compkey, prod_squashed); - RegDeleteKeyA(prodkey, ""); - RegDeleteKeyA(compkey, ""); - RegDeleteValueA(installprop, "WindowsInstaller"); - RegDeleteKeyA(installprop, ""); - RegCloseKey(prodkey); - RegCloseKey(compkey); - RegCloseKey(installprop); - DeleteFileA("C:\\imapath"); - - lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user unmanaged product key exists */ - size = MAX_PATH; - state = MsiGetComponentPathA(prodcode, component, path, &size); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - size = MAX_PATH; - state = MsiLocateComponentA(component, path, &size); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Components\\"); - lstrcatA(keypath, comp_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &compkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user unmanaged component key exists */ - size = MAX_PATH; - state = MsiGetComponentPathA(prodcode, component, path, &size); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - size = MAX_PATH; - state = MsiLocateComponentA(component, path, &size); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"C:\\imapath", 10); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* product value exists */ - path[0] = 0; - size = MAX_PATH; - state = MsiGetComponentPathA(prodcode, component, path, &size); - ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - path[0] = 0; - size = MAX_PATH; - state = MsiLocateComponentA(component, path, &size); - ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - create_file("C:\\imapath", "C:\\imapath", 11); - - /* file exists */ - path[0] = 0; - size = MAX_PATH; - state = MsiGetComponentPathA(prodcode, component, path, &size); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - path[0] = 0; - size = MAX_PATH; - state = MsiLocateComponentA(component, path, &size); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - RegDeleteValueA(compkey, prod_squashed); - RegDeleteKeyA(prodkey, ""); - RegDeleteKeyA(compkey, ""); - RegCloseKey(prodkey); - RegCloseKey(compkey); - DeleteFileA("C:\\imapath"); - - lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local classes product key exists */ - size = MAX_PATH; - state = MsiGetComponentPathA(prodcode, component, path, &size); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - size = MAX_PATH; - state = MsiLocateComponentA(component, path, &size); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\UserData\\S-1-5-18\\Components\\"); - lstrcatA(keypath, comp_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &compkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local user component key exists */ - size = MAX_PATH; - state = MsiGetComponentPathA(prodcode, component, path, &size); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - size = MAX_PATH; - state = MsiLocateComponentA(component, path, &size); - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"C:\\imapath", 10); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* product value exists */ - path[0] = 0; - size = MAX_PATH; - state = MsiGetComponentPathA(prodcode, component, path, &size); - ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - path[0] = 0; - size = MAX_PATH; - state = MsiLocateComponentA(component, path, &size); - ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - create_file("C:\\imapath", "C:\\imapath", 11); - - /* file exists */ - path[0] = 0; - size = MAX_PATH; - state = MsiGetComponentPathA(prodcode, component, path, &size); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - path[0] = 0; - size = MAX_PATH; - state = MsiLocateComponentA(component, path, &size); - ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok(!lstrcmpA(path, "C:\\imapath"), "Expected C:\\imapath, got %s\n", path); - ok(size == 10, "Expected 10, got %d\n", size); - - RegDeleteValueA(compkey, prod_squashed); - RegDeleteKeyA(prodkey, ""); - RegDeleteKeyA(compkey, ""); - RegCloseKey(prodkey); - RegCloseKey(compkey); - DeleteFileA("C:\\imapath"); - LocalFree(usersid); -} - -static void test_MsiGetProductCode(void) -{ - HKEY compkey, prodkey; - CHAR prodcode[MAX_PATH]; - CHAR prod_squashed[MAX_PATH]; - CHAR prodcode2[MAX_PATH]; - CHAR prod2_squashed[MAX_PATH]; - CHAR component[MAX_PATH]; - CHAR comp_base85[MAX_PATH]; - CHAR comp_squashed[MAX_PATH]; - CHAR keypath[MAX_PATH]; - CHAR product[MAX_PATH]; - LPSTR usersid; - LONG res; - UINT r; - - create_test_guid(prodcode, prod_squashed); - create_test_guid(prodcode2, prod2_squashed); - compose_base85_guid(component, comp_base85, comp_squashed); - get_user_sid(&usersid); - - /* szComponent is NULL */ - lstrcpyA(product, "prod"); - r = MsiGetProductCodeA(NULL, product); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(product, "prod"), "Expected product to be unchanged, got %s\n", product); - - /* szComponent is empty */ - lstrcpyA(product, "prod"); - r = MsiGetProductCodeA("", product); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(product, "prod"), "Expected product to be unchanged, got %s\n", product); - - /* garbage szComponent */ - lstrcpyA(product, "prod"); - r = MsiGetProductCodeA("garbage", product); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(product, "prod"), "Expected product to be unchanged, got %s\n", product); - - /* guid without brackets */ - lstrcpyA(product, "prod"); - r = MsiGetProductCodeA("6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D", product); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(product, "prod"), "Expected product to be unchanged, got %s\n", product); - - /* guid with brackets */ - lstrcpyA(product, "prod"); - r = MsiGetProductCodeA("{6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D}", product); - ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r); - ok(!lstrcmpA(product, "prod"), "Expected product to be unchanged, got %s\n", product); - - /* same length as guid, but random */ - lstrcpyA(product, "prod"); - r = MsiGetProductCodeA("A938G02JF-2NF3N93-VN3-2NNF-3KGKALDNF93", product); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(product, "prod"), "Expected product to be unchanged, got %s\n", product); - - /* all params correct, szComponent not published */ - lstrcpyA(product, "prod"); - r = MsiGetProductCodeA(component, product); - ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r); - ok(!lstrcmpA(product, "prod"), "Expected product to be unchanged, got %s\n", product); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Components\\"); - lstrcatA(keypath, comp_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &compkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user unmanaged component key exists */ - lstrcpyA(product, "prod"); - r = MsiGetProductCodeA(component, product); - ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r); - ok(!lstrcmpA(product, "prod"), "Expected product to be unchanged, got %s\n", product); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"C:\\imapath", 10); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* product value exists */ - lstrcpyA(product, "prod"); - r = MsiGetProductCodeA(component, product); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(product, prodcode), "Expected %s, got %s\n", prodcode, product); - - res = RegSetValueExA(compkey, prod2_squashed, 0, REG_SZ, (const BYTE *)"C:\\another", 10); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\Managed\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user managed product key of first product exists */ - lstrcpyA(product, "prod"); - r = MsiGetProductCodeA(component, product); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(product, prodcode), "Expected %s, got %s\n", prodcode, product); - - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - - lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user unmanaged product key exists */ - lstrcpyA(product, "prod"); - r = MsiGetProductCodeA(component, product); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(product, prodcode), "Expected %s, got %s\n", prodcode, product); - - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - - lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local classes product key exists */ - lstrcpyA(product, "prod"); - r = MsiGetProductCodeA(component, product); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(product, prodcode), "Expected %s, got %s\n", prodcode, product); - - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\Managed\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Installer\\Products\\"); - lstrcatA(keypath, prod2_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user managed product key of second product exists */ - lstrcpyA(product, "prod"); - r = MsiGetProductCodeA(component, product); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(product, prodcode2), "Expected %s, got %s\n", prodcode2, product); - - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - RegDeleteValueA(compkey, prod_squashed); - RegDeleteValueA(compkey, prod2_squashed); - RegDeleteKeyA(compkey, ""); - RegCloseKey(compkey); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\UserData\\S-1-5-18\\Components\\"); - lstrcatA(keypath, comp_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &compkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local user component key exists */ - lstrcpyA(product, "prod"); - r = MsiGetProductCodeA(component, product); - ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r); - ok(!lstrcmpA(product, "prod"), "Expected product to be unchanged, got %s\n", product); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"C:\\imapath", 10); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* product value exists */ - lstrcpyA(product, "prod"); - r = MsiGetProductCodeA(component, product); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(product, prodcode), "Expected %s, got %s\n", prodcode, product); - - res = RegSetValueExA(compkey, prod2_squashed, 0, REG_SZ, (const BYTE *)"C:\\another", 10); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\Managed\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user managed product key of first product exists */ - lstrcpyA(product, "prod"); - r = MsiGetProductCodeA(component, product); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(product, prodcode), "Expected %s, got %s\n", prodcode, product); - - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - - lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user unmanaged product key exists */ - lstrcpyA(product, "prod"); - r = MsiGetProductCodeA(component, product); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(product, prodcode), "Expected %s, got %s\n", prodcode, product); - - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - - lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local classes product key exists */ - lstrcpyA(product, "prod"); - r = MsiGetProductCodeA(component, product); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(product, prodcode), "Expected %s, got %s\n", prodcode, product); - - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\Managed\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Installer\\Products\\"); - lstrcatA(keypath, prod2_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user managed product key of second product exists */ - lstrcpyA(product, "prod"); - r = MsiGetProductCodeA(component, product); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(product, prodcode2), "Expected %s, got %s\n", prodcode2, product); - - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - RegDeleteValueA(compkey, prod_squashed); - RegDeleteValueA(compkey, prod2_squashed); - RegDeleteKeyA(compkey, ""); - RegCloseKey(compkey); - LocalFree(usersid); -} - -static void test_MsiEnumClients(void) -{ - HKEY compkey; - CHAR prodcode[MAX_PATH]; - CHAR prod_squashed[MAX_PATH]; - CHAR prodcode2[MAX_PATH]; - CHAR prod2_squashed[MAX_PATH]; - CHAR component[MAX_PATH]; - CHAR comp_base85[MAX_PATH]; - CHAR comp_squashed[MAX_PATH]; - CHAR product[MAX_PATH]; - CHAR keypath[MAX_PATH]; - LPSTR usersid; - LONG res; - UINT r; - - create_test_guid(prodcode, prod_squashed); - create_test_guid(prodcode2, prod2_squashed); - compose_base85_guid(component, comp_base85, comp_squashed); - get_user_sid(&usersid); - - /* NULL szComponent */ - product[0] = '\0'; - r = MsiEnumClientsA(NULL, 0, product); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(product, ""), "Expected product to be unchanged, got %s\n", product); - - /* empty szComponent */ - product[0] = '\0'; - r = MsiEnumClientsA("", 0, product); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(product, ""), "Expected product to be unchanged, got %s\n", product); - - /* NULL lpProductBuf */ - r = MsiEnumClientsA(component, 0, NULL); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* all params correct, component missing */ - product[0] = '\0'; - r = MsiEnumClientsA(component, 0, product); - ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r); - ok(!lstrcmpA(product, ""), "Expected product to be unchanged, got %s\n", product); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Components\\"); - lstrcatA(keypath, comp_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &compkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user unmanaged component key exists */ - product[0] = '\0'; - r = MsiEnumClientsA(component, 0, product); - ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r); - ok(!lstrcmpA(product, ""), "Expected product to be unchanged, got %s\n", product); - - /* index > 0, no products exist */ - product[0] = '\0'; - r = MsiEnumClientsA(component, 1, product); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(product, ""), "Expected product to be unchanged, got %s\n", product); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"C:\\imapath", 10); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* product value exists */ - r = MsiEnumClientsA(component, 0, product); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(product, prodcode), "Expected %s, got %s\n", prodcode, product); - - /* try index 0 again */ - product[0] = '\0'; - r = MsiEnumClientsA(component, 0, product); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(product, prodcode), "Expected %s, got %s\n", prodcode, product); - - /* try index 1, second product value does not exist */ - product[0] = '\0'; - r = MsiEnumClientsA(component, 1, product); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(product, ""), "Expected product to be unchanged, got %s\n", product); - - res = RegSetValueExA(compkey, prod2_squashed, 0, REG_SZ, (const BYTE *)"C:\\another", 10); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* try index 1, second product value does exist */ - product[0] = '\0'; - r = MsiEnumClientsA(component, 1, product); - todo_wine - { - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(product, ""), "Expected product to be unchanged, got %s\n", product); - } - - /* start the enumeration over */ - product[0] = '\0'; - r = MsiEnumClientsA(component, 0, product); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(product, prodcode) || !lstrcmpA(product, prodcode2), - "Expected %s or %s, got %s\n", prodcode, prodcode2, product); - - /* correctly query second product */ - product[0] = '\0'; - r = MsiEnumClientsA(component, 1, product); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(product, prodcode) || !lstrcmpA(product, prodcode2), - "Expected %s or %s, got %s\n", prodcode, prodcode2, product); - - RegDeleteValueA(compkey, prod_squashed); - RegDeleteValueA(compkey, prod2_squashed); - RegDeleteKeyA(compkey, ""); - RegCloseKey(compkey); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\UserData\\S-1-5-18\\Components\\"); - lstrcatA(keypath, comp_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &compkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user local component key exists */ - product[0] = '\0'; - r = MsiEnumClientsA(component, 0, product); - ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r); - ok(!lstrcmpA(product, ""), "Expected product to be unchanged, got %s\n", product); - - /* index > 0, no products exist */ - product[0] = '\0'; - r = MsiEnumClientsA(component, 1, product); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(product, ""), "Expected product to be unchanged, got %s\n", product); - - res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"C:\\imapath", 10); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* product value exists */ - product[0] = '\0'; - r = MsiEnumClientsA(component, 0, product); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(product, prodcode), "Expected %s, got %s\n", prodcode, product); - - /* try index 0 again */ - product[0] = '\0'; - r = MsiEnumClientsA(component, 0, product); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* try index 1, second product value does not exist */ - product[0] = '\0'; - r = MsiEnumClientsA(component, 1, product); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(product, ""), "Expected product to be unchanged, got %s\n", product); - - res = RegSetValueExA(compkey, prod2_squashed, 0, REG_SZ, (const BYTE *)"C:\\another", 10); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* try index 1, second product value does exist */ - product[0] = '\0'; - r = MsiEnumClientsA(component, 1, product); - todo_wine - { - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(product, ""), "Expected product to be unchanged, got %s\n", product); - } - - /* start the enumeration over */ - product[0] = '\0'; - r = MsiEnumClientsA(component, 0, product); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(product, prodcode) || !lstrcmpA(product, prodcode2), - "Expected %s or %s, got %s\n", prodcode, prodcode2, product); - - /* correctly query second product */ - product[0] = '\0'; - r = MsiEnumClientsA(component, 1, product); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(product, prodcode) || !lstrcmpA(product, prodcode2), - "Expected %s or %s, got %s\n", prodcode, prodcode2, product); - - RegDeleteValueA(compkey, prod_squashed); - RegDeleteValueA(compkey, prod2_squashed); - RegDeleteKeyA(compkey, ""); - RegCloseKey(compkey); - LocalFree(usersid); -} - -static void get_version_info(LPSTR path, LPSTR *vercheck, LPDWORD verchecksz, - LPSTR *langcheck, LPDWORD langchecksz) -{ - LPSTR version; - VS_FIXEDFILEINFO *ffi; - DWORD size = GetFileVersionInfoSizeA(path, NULL); - USHORT *lang; - - version = HeapAlloc(GetProcessHeap(), 0, size); - GetFileVersionInfoA(path, 0, size, version); - - VerQueryValueA(version, "\\", (LPVOID *)&ffi, &size); - *vercheck = HeapAlloc(GetProcessHeap(), 0, MAX_PATH); - sprintf(*vercheck, "%d.%d.%d.%d", HIWORD(ffi->dwFileVersionMS), - LOWORD(ffi->dwFileVersionMS), HIWORD(ffi->dwFileVersionLS), - LOWORD(ffi->dwFileVersionLS)); - *verchecksz = lstrlenA(*vercheck); - - VerQueryValue(version, "\\VarFileInfo\\Translation", (void **)&lang, &size); - *langcheck = HeapAlloc(GetProcessHeap(), 0, MAX_PATH); - sprintf(*langcheck, "%d", *lang); - *langchecksz = lstrlenA(*langcheck); - - HeapFree(GetProcessHeap(), 0, version); -} - -static void test_MsiGetFileVersion(void) -{ - UINT r; - DWORD versz, langsz; - char version[MAX_PATH]; - char lang[MAX_PATH]; - char path[MAX_PATH]; - LPSTR vercheck, langcheck; - DWORD verchecksz, langchecksz; - - /* NULL szFilePath */ - versz = MAX_PATH; - langsz = MAX_PATH; - lstrcpyA(version, "version"); - lstrcpyA(lang, "lang"); - r = MsiGetFileVersionA(NULL, version, &versz, lang, &langsz); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(version, "version"), - "Expected version to be unchanged, got %s\n", version); - ok(versz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, versz); - ok(!lstrcmpA(lang, "lang"), - "Expected lang to be unchanged, got %s\n", lang); - ok(langsz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, langsz); - - /* empty szFilePath */ - versz = MAX_PATH; - langsz = MAX_PATH; - lstrcpyA(version, "version"); - lstrcpyA(lang, "lang"); - r = MsiGetFileVersionA("", version, &versz, lang, &langsz); - ok(r == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", r); - ok(!lstrcmpA(version, "version"), - "Expected version to be unchanged, got %s\n", version); - ok(versz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, versz); - ok(!lstrcmpA(lang, "lang"), - "Expected lang to be unchanged, got %s\n", lang); - ok(langsz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, langsz); - - /* nonexistent szFilePath */ - versz = MAX_PATH; - langsz = MAX_PATH; - lstrcpyA(version, "version"); - lstrcpyA(lang, "lang"); - r = MsiGetFileVersionA("nonexistent", version, &versz, lang, &langsz); - ok(r == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", r); - ok(!lstrcmpA(version, "version"), - "Expected version to be unchanged, got %s\n", version); - ok(versz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, versz); - ok(!lstrcmpA(lang, "lang"), - "Expected lang to be unchanged, got %s\n", lang); - ok(langsz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, langsz); - - /* nonexistent szFilePath, valid lpVersionBuf, NULL pcchVersionBuf */ - versz = MAX_PATH; - langsz = MAX_PATH; - lstrcpyA(version, "version"); - lstrcpyA(lang, "lang"); - r = MsiGetFileVersionA("nonexistent", version, NULL, lang, &langsz); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(version, "version"), - "Expected version to be unchanged, got %s\n", version); - ok(versz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, versz); - ok(!lstrcmpA(lang, "lang"), - "Expected lang to be unchanged, got %s\n", lang); - ok(langsz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, langsz); - - /* nonexistent szFilePath, valid lpLangBuf, NULL pcchLangBuf */ - versz = MAX_PATH; - langsz = MAX_PATH; - lstrcpyA(version, "version"); - lstrcpyA(lang, "lang"); - r = MsiGetFileVersionA("nonexistent", version, &versz, lang, NULL); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(version, "version"), - "Expected version to be unchanged, got %s\n", version); - ok(versz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, versz); - ok(!lstrcmpA(lang, "lang"), - "Expected lang to be unchanged, got %s\n", lang); - ok(langsz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, langsz); - - /* nonexistent szFilePath, valid lpVersionBuf, pcchVersionBuf is zero */ - versz = 0; - langsz = MAX_PATH; - lstrcpyA(version, "version"); - lstrcpyA(lang, "lang"); - r = MsiGetFileVersionA("nonexistent", version, &versz, lang, &langsz); - ok(r == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", r); - ok(!lstrcmpA(version, "version"), - "Expected version to be unchanged, got %s\n", version); - ok(versz == 0, "Expected 0, got %d\n", versz); - ok(!lstrcmpA(lang, "lang"), - "Expected lang to be unchanged, got %s\n", lang); - ok(langsz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, langsz); - - /* nonexistent szFilePath, valid lpLangBuf, pcchLangBuf is zero */ - versz = MAX_PATH; - langsz = 0; - lstrcpyA(version, "version"); - lstrcpyA(lang, "lang"); - r = MsiGetFileVersionA("nonexistent", version, &versz, lang, &langsz); - ok(r == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", r); - ok(!lstrcmpA(version, "version"), - "Expected version to be unchanged, got %s\n", version); - ok(versz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, versz); - ok(!lstrcmpA(lang, "lang"), - "Expected lang to be unchanged, got %s\n", lang); - ok(langsz == 0, "Expected 0, got %d\n", langsz); - - /* nonexistent szFilePath, rest NULL */ - r = MsiGetFileVersionA("nonexistent", NULL, NULL, NULL, NULL); - ok(r == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", r); - - create_file("ver.txt", "ver.txt", 20); - - /* file exists, no version information */ - versz = MAX_PATH; - langsz = MAX_PATH; - lstrcpyA(version, "version"); - lstrcpyA(lang, "lang"); - r = MsiGetFileVersionA("ver.txt", version, &versz, lang, &langsz); - ok(versz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, versz); - ok(!lstrcmpA(version, "version"), - "Expected version to be unchanged, got %s\n", version); - ok(langsz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, langsz); - ok(!lstrcmpA(lang, "lang"), - "Expected lang to be unchanged, got %s\n", lang); - ok(r == ERROR_FILE_INVALID, - "Expected ERROR_FILE_INVALID, got %d\n", r); - - DeleteFileA("ver.txt"); - - /* relative path, has version information */ - versz = MAX_PATH; - langsz = MAX_PATH; - lstrcpyA(version, "version"); - lstrcpyA(lang, "lang"); - r = MsiGetFileVersionA("kernel32.dll", version, &versz, lang, &langsz); - todo_wine - { - ok(r == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", r); - ok(!lstrcmpA(version, "version"), - "Expected version to be unchanged, got %s\n", version); - ok(versz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, versz); - ok(!lstrcmpA(lang, "lang"), - "Expected lang to be unchanged, got %s\n", lang); - ok(langsz == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, langsz); - } - - GetSystemDirectoryA(path, MAX_PATH); - lstrcatA(path, "\\kernel32.dll"); - - get_version_info(path, &vercheck, &verchecksz, &langcheck, &langchecksz); - - /* absolute path, has version information */ - versz = MAX_PATH; - langsz = MAX_PATH; - lstrcpyA(version, "version"); - lstrcpyA(lang, "lang"); - r = MsiGetFileVersionA(path, version, &versz, lang, &langsz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(versz == verchecksz, "Expected %d, got %d\n", verchecksz, versz); - ok(strstr(lang, langcheck) != NULL, "Expected %s in %s\n", langcheck, lang); - ok(!lstrcmpA(version, vercheck), - "Expected %s, got %s\n", vercheck, version); - - /* only check version */ - versz = MAX_PATH; - lstrcpyA(version, "version"); - r = MsiGetFileVersionA(path, version, &versz, NULL, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(versz == verchecksz, "Expected %d, got %d\n", verchecksz, versz); - ok(!lstrcmpA(version, vercheck), - "Expected %s, got %s\n", vercheck, version); - - /* only check language */ - langsz = MAX_PATH; - lstrcpyA(lang, "lang"); - r = MsiGetFileVersionA(path, NULL, NULL, lang, &langsz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(strstr(lang, langcheck) != NULL, "Expected %s in %s\n", langcheck, lang); - - /* check neither version nor language */ - r = MsiGetFileVersionA(path, NULL, NULL, NULL, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* get pcchVersionBuf */ - versz = MAX_PATH; - r = MsiGetFileVersionA(path, NULL, &versz, NULL, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(versz == verchecksz, "Expected %d, got %d\n", verchecksz, versz); - - /* get pcchLangBuf */ - langsz = MAX_PATH; - r = MsiGetFileVersionA(path, NULL, NULL, NULL, &langsz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(langsz >= langchecksz, "Expected %d >= %d\n", langsz, langchecksz); - - /* pcchVersionBuf not big enough */ - versz = 5; - lstrcpyA(version, "version"); - r = MsiGetFileVersionA(path, version, &versz, NULL, NULL); - ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r); - ok(!strncmp(version, vercheck, 4), - "Expected first 4 characters of %s, got %s\n", vercheck, version); - ok(versz == verchecksz, "Expected %d, got %d\n", verchecksz, versz); - - /* pcchLangBuf not big enough */ - langsz = 3; - lstrcpyA(lang, "lang"); - r = MsiGetFileVersionA(path, NULL, NULL, lang, &langsz); - ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r); - ok(!strncmp(lang, langcheck, 2), - "Expected first character of %s, got %s\n", langcheck, lang); - ok(langsz >= langchecksz, "Expected %d >= %d\n", langsz, langchecksz); - - HeapFree(GetProcessHeap(), 0, vercheck); - HeapFree(GetProcessHeap(), 0, langcheck); -} - -static void test_MsiGetProductInfo(void) -{ - UINT r; - LONG res; - HKEY propkey, source; - HKEY prodkey, localkey; - CHAR prodcode[MAX_PATH]; - CHAR prod_squashed[MAX_PATH]; - CHAR packcode[MAX_PATH]; - CHAR pack_squashed[MAX_PATH]; - CHAR buf[MAX_PATH]; - CHAR keypath[MAX_PATH]; - LPSTR usersid; - DWORD sz, val = 42; - - create_test_guid(prodcode, prod_squashed); - create_test_guid(packcode, pack_squashed); - get_user_sid(&usersid); - - /* NULL szProduct */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(NULL, INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - /* empty szProduct */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA("", INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - /* garbage szProduct */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA("garbage", INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - /* guid without brackets */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA("6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D", - INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - /* guid with brackets */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA("{6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D}", - INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - /* same length as guid, but random */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA("A938G02JF-2NF3N93-VN3-2NNF-3KGKALDNF93", - INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - /* not installed, NULL szAttribute */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, NULL, buf, &sz); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - /* not installed, NULL lpValueBuf */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, NULL, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - /* not installed, NULL pcchValueBuf */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, NULL); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - /* created guid cannot possibly be an installed product code */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* managed product code exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &localkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local user product code exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* both local and managed product code exist */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegCreateKeyA(localkey, "InstallProperties", &propkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallProperties key exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - res = RegSetValueExA(propkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* HelpLink value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "link"), "Expected \"link\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - /* pcchBuf is NULL */ - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, NULL, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* lpValueBuf is NULL */ - sz = MAX_PATH; - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, NULL, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 4, "Expected 4, got %d\n", sz); - - /* lpValueBuf is NULL, pcchValueBuf is too small */ - sz = 2; - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, NULL, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 4, "Expected 4, got %d\n", sz); - - /* lpValueBuf is non-NULL, pcchValueBuf is too small */ - sz = 2; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(!lstrcmpA(buf, "apple"), "Expected buf to remain unchanged, got \"%s\"\n", buf); - ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r); - ok(sz == 4, "Expected 4, got %d\n", sz); - - /* lpValueBuf is non-NULL, pcchValueBuf is exactly 4 */ - sz = 4; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), - "Expected buf to remain unchanged, got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(propkey, "IMadeThis", 0, REG_SZ, (LPBYTE)"random", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* random property not supported by MSI, value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, "IMadeThis", buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - RegDeleteValueA(propkey, "IMadeThis"); - RegDeleteValueA(propkey, "HelpLink"); - RegDeleteKeyA(propkey, ""); - RegDeleteKeyA(localkey, ""); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(propkey); - RegCloseKey(localkey); - RegCloseKey(prodkey); - - lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user product key exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &localkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local user product key exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegCreateKeyA(localkey, "InstallProperties", &propkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallProperties key exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - res = RegSetValueExA(propkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* HelpLink value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "link"), "Expected \"link\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - RegDeleteValueA(propkey, "HelpLink"); - RegDeleteKeyA(propkey, ""); - RegDeleteKeyA(localkey, ""); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(propkey); - RegCloseKey(localkey); - RegCloseKey(prodkey); - - lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* classes product key exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &localkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local user product key exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegCreateKeyA(localkey, "InstallProperties", &propkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallProperties key exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - RegDeleteKeyA(propkey, ""); - RegDeleteKeyA(localkey, ""); - RegCloseKey(propkey); - RegCloseKey(localkey); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, "S-1-5-18\\\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &localkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Local System product key exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegCreateKeyA(localkey, "InstallProperties", &propkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallProperties key exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - res = RegSetValueExA(propkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* HelpLink value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "link"), "Expected \"link\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(propkey, "HelpLink", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* HelpLink type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "DisplayName", 0, REG_SZ, (LPBYTE)"name", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* DisplayName value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTALLEDPRODUCTNAME, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "name"), "Expected \"name\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(propkey, "DisplayName", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* DisplayName type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTALLEDPRODUCTNAME, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "DisplayVersion", 0, REG_SZ, (LPBYTE)"1.1.1", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* DisplayVersion value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSIONSTRING, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "1.1.1"), "Expected \"1.1.1\", got \"%s\"\n", buf); - ok(sz == 5, "Expected 5, got %d\n", sz); - - res = RegSetValueExA(propkey, "DisplayVersion", 0, - REG_DWORD, (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* DisplayVersion type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSIONSTRING, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "HelpTelephone", 0, REG_SZ, (LPBYTE)"tele", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* HelpTelephone value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPTELEPHONE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "tele"), "Expected \"tele\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(propkey, "HelpTelephone", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* HelpTelephone type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPTELEPHONE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "InstallLocation", 0, REG_SZ, (LPBYTE)"loc", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallLocation value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTALLLOCATION, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "loc"), "Expected \"loc\", got \"%s\"\n", buf); - ok(sz == 3, "Expected 3, got %d\n", sz); - - res = RegSetValueExA(propkey, "InstallLocation", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallLocation type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTALLLOCATION, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "InstallSource", 0, REG_SZ, (LPBYTE)"source", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallSource value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTALLSOURCE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "source"), "Expected \"source\", got \"%s\"\n", buf); - ok(sz == 6, "Expected 6, got %d\n", sz); - - res = RegSetValueExA(propkey, "InstallSource", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallSource type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTALLSOURCE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "InstallDate", 0, REG_SZ, (LPBYTE)"date", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallDate value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTALLDATE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "date"), "Expected \"date\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(propkey, "InstallDate", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallDate type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTALLDATE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "Publisher", 0, REG_SZ, (LPBYTE)"pub", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Publisher value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PUBLISHER, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "pub"), "Expected \"pub\", got \"%s\"\n", buf); - ok(sz == 3, "Expected 3, got %d\n", sz); - - res = RegSetValueExA(propkey, "Publisher", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Publisher type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PUBLISHER, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "LocalPackage", 0, REG_SZ, (LPBYTE)"pack", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* LocalPackage value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_LOCALPACKAGE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "pack"), "Expected \"pack\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(propkey, "LocalPackage", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* LocalPackage type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_LOCALPACKAGE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "UrlInfoAbout", 0, REG_SZ, (LPBYTE)"about", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* UrlInfoAbout value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_URLINFOABOUT, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "about"), "Expected \"about\", got \"%s\"\n", buf); - ok(sz == 5, "Expected 5, got %d\n", sz); - - res = RegSetValueExA(propkey, "UrlInfoAbout", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* UrlInfoAbout type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_URLINFOABOUT, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "UrlUpdateInfo", 0, REG_SZ, (LPBYTE)"info", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* UrlUpdateInfo value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_URLUPDATEINFO, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "info"), "Expected \"info\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(propkey, "UrlUpdateInfo", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* UrlUpdateInfo type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_URLUPDATEINFO, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "VersionMinor", 0, REG_SZ, (LPBYTE)"1", 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* VersionMinor value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSIONMINOR, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "1"), "Expected \"1\", got \"%s\"\n", buf); - ok(sz == 1, "Expected 1, got %d\n", sz); - - res = RegSetValueExA(propkey, "VersionMinor", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* VersionMinor type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSIONMINOR, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "VersionMajor", 0, REG_SZ, (LPBYTE)"1", 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* VersionMajor value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSIONMAJOR, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "1"), "Expected \"1\", got \"%s\"\n", buf); - ok(sz == 1, "Expected 1, got %d\n", sz); - - res = RegSetValueExA(propkey, "VersionMajor", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* VersionMajor type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSIONMAJOR, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "ProductID", 0, REG_SZ, (LPBYTE)"id", 3); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductID value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTID, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "id"), "Expected \"id\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "ProductID", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductID type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTID, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "RegCompany", 0, REG_SZ, (LPBYTE)"comp", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* RegCompany value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_REGCOMPANY, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "comp"), "Expected \"comp\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(propkey, "RegCompany", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* RegCompany type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_REGCOMPANY, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "RegOwner", 0, REG_SZ, (LPBYTE)"own", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* RegOwner value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_REGOWNER, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "own"), "Expected \"own\", got \"%s\"\n", buf); - ok(sz == 3, "Expected 3, got %d\n", sz); - - res = RegSetValueExA(propkey, "RegOwner", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* RegOwner type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_REGOWNER, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "InstanceType", 0, REG_SZ, (LPBYTE)"type", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstanceType value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTANCETYPE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - res = RegSetValueExA(propkey, "InstanceType", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstanceType type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTANCETYPE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - res = RegSetValueExA(prodkey, "InstanceType", 0, REG_SZ, (LPBYTE)"type", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstanceType value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTANCETYPE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "type"), "Expected \"type\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(prodkey, "InstanceType", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstanceType type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_INSTANCETYPE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "Transforms", 0, REG_SZ, (LPBYTE)"tforms", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Transforms value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_TRANSFORMS, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - res = RegSetValueExA(propkey, "Transforms", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Transforms type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_TRANSFORMS, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - res = RegSetValueExA(prodkey, "Transforms", 0, REG_SZ, (LPBYTE)"tforms", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Transforms value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_TRANSFORMS, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "tforms"), "Expected \"tforms\", got \"%s\"\n", buf); - ok(sz == 6, "Expected 6, got %d\n", sz); - - res = RegSetValueExA(prodkey, "Transforms", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Transforms type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_TRANSFORMS, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "Language", 0, REG_SZ, (LPBYTE)"lang", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Language value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_LANGUAGE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - res = RegSetValueExA(propkey, "Language", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Language type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_LANGUAGE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - res = RegSetValueExA(prodkey, "Language", 0, REG_SZ, (LPBYTE)"lang", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Language value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_LANGUAGE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "lang"), "Expected \"lang\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(prodkey, "Language", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Language type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_LANGUAGE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "ProductName", 0, REG_SZ, (LPBYTE)"name", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductName value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTNAME, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - res = RegSetValueExA(propkey, "ProductName", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductName type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTNAME, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - res = RegSetValueExA(prodkey, "ProductName", 0, REG_SZ, (LPBYTE)"name", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductName value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTNAME, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "name"), "Expected \"name\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(prodkey, "ProductName", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductName type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTNAME, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "Assignment", 0, REG_SZ, (LPBYTE)"at", 3); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Assignment value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_ASSIGNMENTTYPE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - res = RegSetValueExA(propkey, "Assignment", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Assignment type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_ASSIGNMENTTYPE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - res = RegSetValueExA(prodkey, "Assignment", 0, REG_SZ, (LPBYTE)"at", 3); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Assignment value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_ASSIGNMENTTYPE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "at"), "Expected \"at\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(prodkey, "Assignment", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Assignment type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_ASSIGNMENTTYPE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "PackageCode", 0, REG_SZ, (LPBYTE)"code", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* PackageCode value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PACKAGECODE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - res = RegSetValueExA(propkey, "PackageCode", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* PackageCode type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PACKAGECODE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - res = RegSetValueExA(prodkey, "PackageCode", 0, REG_SZ, (LPBYTE)"code", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* PackageCode value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PACKAGECODE, buf, &sz); - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - ok(!lstrcmpA(buf, "code"), "Expected \"code\", got \"%s\"\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "PackageCode", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* PackageCode type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PACKAGECODE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(prodkey, "PackageCode", 0, REG_SZ, (LPBYTE)pack_squashed, 33); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* PackageCode value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PACKAGECODE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, packcode), "Expected \"%s\", got \"%s\"\n", packcode, buf); - ok(sz == 38, "Expected 38, got %d\n", sz); - - res = RegSetValueExA(propkey, "Version", 0, REG_SZ, (LPBYTE)"ver", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Version value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSION, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - res = RegSetValueExA(propkey, "Version", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Version type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSION, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - res = RegSetValueExA(prodkey, "Version", 0, REG_SZ, (LPBYTE)"ver", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Version value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSION, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "ver"), "Expected \"ver\", got \"%s\"\n", buf); - ok(sz == 3, "Expected 3, got %d\n", sz); - - res = RegSetValueExA(prodkey, "Version", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Version type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_VERSION, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "ProductIcon", 0, REG_SZ, (LPBYTE)"ico", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductIcon value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTICON, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - res = RegSetValueExA(propkey, "ProductIcon", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductIcon type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTICON, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - res = RegSetValueExA(prodkey, "ProductIcon", 0, REG_SZ, (LPBYTE)"ico", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductIcon value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTICON, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "ico"), "Expected \"ico\", got \"%s\"\n", buf); - ok(sz == 3, "Expected 3, got %d\n", sz); - - res = RegSetValueExA(prodkey, "ProductIcon", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductIcon type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PRODUCTICON, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - /* SourceList key does not exist */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PACKAGENAME, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), - "Expected buf to be unchanged, got \"%s\"\n", buf); - ok(sz == MAX_PATH, "Expected sz to be unchanged, got %d\n", sz); - - res = RegCreateKeyA(prodkey, "SourceList", &source); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* SourceList key exists, but PackageName val does not exist */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PACKAGENAME, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - res = RegSetValueExA(source, "PackageName", 0, REG_SZ, (LPBYTE)"packname", 9); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* PackageName val exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PACKAGENAME, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "packname"), "Expected \"packname\", got \"%s\"\n", buf); - ok(sz == 8, "Expected 8, got %d\n", sz); - - res = RegSetValueExA(source, "PackageName", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* PackageName type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_PACKAGENAME, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "AuthorizedLUAApp", 0, REG_SZ, (LPBYTE)"auth", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Authorized value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_AUTHORIZED_LUA_APP, buf, &sz); - if (r != ERROR_UNKNOWN_PROPERTY) - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - } - - res = RegSetValueExA(propkey, "AuthorizedLUAApp", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* AuthorizedLUAApp type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_AUTHORIZED_LUA_APP, buf, &sz); - if (r != ERROR_UNKNOWN_PROPERTY) - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - } - - res = RegSetValueExA(prodkey, "AuthorizedLUAApp", 0, REG_SZ, (LPBYTE)"auth", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Authorized value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_AUTHORIZED_LUA_APP, buf, &sz); - if (r != ERROR_UNKNOWN_PROPERTY) - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "auth"), "Expected \"auth\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - } - - res = RegSetValueExA(prodkey, "AuthorizedLUAApp", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* AuthorizedLUAApp type is REG_DWORD */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_AUTHORIZED_LUA_APP, buf, &sz); - if (r != ERROR_UNKNOWN_PROPERTY) - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "42"), "Expected \"42\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - } - - RegDeleteValueA(propkey, "HelpLink"); - RegDeleteValueA(propkey, "DisplayName"); - RegDeleteValueA(propkey, "DisplayVersion"); - RegDeleteValueA(propkey, "HelpTelephone"); - RegDeleteValueA(propkey, "InstallLocation"); - RegDeleteValueA(propkey, "InstallSource"); - RegDeleteValueA(propkey, "InstallDate"); - RegDeleteValueA(propkey, "Publisher"); - RegDeleteValueA(propkey, "LocalPackage"); - RegDeleteValueA(propkey, "UrlInfoAbout"); - RegDeleteValueA(propkey, "UrlUpdateInfo"); - RegDeleteValueA(propkey, "VersionMinor"); - RegDeleteValueA(propkey, "VersionMajor"); - RegDeleteValueA(propkey, "ProductID"); - RegDeleteValueA(propkey, "RegCompany"); - RegDeleteValueA(propkey, "RegOwner"); - RegDeleteValueA(propkey, "InstanceType"); - RegDeleteValueA(propkey, "Transforms"); - RegDeleteValueA(propkey, "Language"); - RegDeleteValueA(propkey, "ProductName"); - RegDeleteValueA(propkey, "Assignment"); - RegDeleteValueA(propkey, "PackageCode"); - RegDeleteValueA(propkey, "Version"); - RegDeleteValueA(propkey, "ProductIcon"); - RegDeleteValueA(propkey, "AuthorizedLUAApp"); - RegDeleteKeyA(propkey, ""); - RegDeleteKeyA(localkey, ""); - RegDeleteValueA(prodkey, "InstanceType"); - RegDeleteValueA(prodkey, "Transforms"); - RegDeleteValueA(prodkey, "Language"); - RegDeleteValueA(prodkey, "ProductName"); - RegDeleteValueA(prodkey, "Assignment"); - RegDeleteValueA(prodkey, "PackageCode"); - RegDeleteValueA(prodkey, "Version"); - RegDeleteValueA(prodkey, "ProductIcon"); - RegDeleteValueA(prodkey, "AuthorizedLUAApp"); - RegDeleteValueA(source, "PackageName"); - RegDeleteKeyA(source, ""); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(propkey); - RegCloseKey(localkey); - RegCloseKey(source); - RegCloseKey(prodkey); - LocalFree(usersid); -} - -static void test_MsiGetProductInfoEx(void) -{ - UINT r; - LONG res; - HKEY propkey, userkey; - HKEY prodkey, localkey; - CHAR prodcode[MAX_PATH]; - CHAR prod_squashed[MAX_PATH]; - CHAR packcode[MAX_PATH]; - CHAR pack_squashed[MAX_PATH]; - CHAR buf[MAX_PATH]; - CHAR keypath[MAX_PATH]; - LPSTR usersid; - DWORD sz; - - if (!pMsiGetProductInfoExA) - { - win_skip("MsiGetProductInfoExA is not available\n"); - return; - } - - create_test_guid(prodcode, prod_squashed); - create_test_guid(packcode, pack_squashed); - get_user_sid(&usersid); - - /* NULL szProductCode */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(NULL, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_PRODUCTSTATE, buf, &sz); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - /* empty szProductCode */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA("", usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_PRODUCTSTATE, buf, &sz); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - /* garbage szProductCode */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA("garbage", usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_PRODUCTSTATE, buf, &sz); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - /* guid without brackets */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA("6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D", usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_PRODUCTSTATE, buf, &sz); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - /* guid with brackets */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA("{6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D}", usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_PRODUCTSTATE, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - /* szValue is non-NULL while pcchValue is NULL */ - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_PRODUCTSTATE, buf, NULL); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - - /* dwContext is out of range */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, 42, - INSTALLPROPERTY_PRODUCTSTATE, buf, &sz); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - /* szProperty is NULL */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - NULL, buf, &sz); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - /* szProperty is empty */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - "", buf, &sz); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - /* szProperty is not a valid property */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - "notvalid", buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - /* same length as guid, but random */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA("A938G02JF-2NF3N93-VN3-2NNF-3KGKALDNF93", usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_PRODUCTSTATE, buf, &sz); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - /* MSIINSTALLCONTEXT_USERUNMANAGED */ - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &localkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local user product key exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_PRODUCTSTATE, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegCreateKeyA(localkey, "InstallProperties", &propkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallProperties key exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_PRODUCTSTATE, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "LocalPackage", 0, REG_SZ, (LPBYTE)"local", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* LocalPackage value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_PRODUCTSTATE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "5"), "Expected \"5\", got \"%s\"\n", buf); - ok(sz == 1, "Expected 1, got %d\n", sz); - - RegDeleteValueA(propkey, "LocalPackage"); - - /* LocalPackage value must exist */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "LocalPackage", 0, REG_SZ, (LPBYTE)"local", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* LocalPackage exists, but HelpLink does not exist */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - res = RegSetValueExA(propkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* HelpLink value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "link"), "Expected \"link\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(propkey, "HelpTelephone", 0, REG_SZ, (LPBYTE)"phone", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* HelpTelephone value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_HELPTELEPHONE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "phone"), "Expected \"phone\", got \"%s\"\n", buf); - ok(sz == 5, "Expected 5, got %d\n", sz); - - /* szValue and pcchValue are NULL */ - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_HELPTELEPHONE, NULL, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* pcchValue is exactly 5 */ - sz = 5; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_HELPTELEPHONE, buf, &sz); - ok(r == ERROR_MORE_DATA, - "Expected ERROR_MORE_DATA, got %d\n", r); - ok(sz == 10, "Expected 10, got %d\n", sz); - - /* szValue is NULL, pcchValue is exactly 5 */ - sz = 5; - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_HELPTELEPHONE, NULL, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 10, "Expected 10, got %d\n", sz); - - /* szValue is NULL, pcchValue is MAX_PATH */ - sz = MAX_PATH; - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_HELPTELEPHONE, NULL, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(sz == 10, "Expected 10, got %d\n", sz); - - /* pcchValue is exactly 0 */ - sz = 0; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_HELPTELEPHONE, buf, &sz); - ok(r == ERROR_MORE_DATA, - "Expected ERROR_MORE_DATA, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected \"apple\", got \"%s\"\n", buf); - ok(sz == 10, "Expected 10, got %d\n", sz); - - res = RegSetValueExA(propkey, "notvalid", 0, REG_SZ, (LPBYTE)"invalid", 8); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* szProperty is not a valid property */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - "notvalid", buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "InstallDate", 0, REG_SZ, (LPBYTE)"date", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallDate value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_INSTALLDATE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "date"), "Expected \"date\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(propkey, "DisplayName", 0, REG_SZ, (LPBYTE)"name", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* DisplayName value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_INSTALLEDPRODUCTNAME, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "name"), "Expected \"name\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(propkey, "InstallLocation", 0, REG_SZ, (LPBYTE)"loc", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallLocation value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_INSTALLLOCATION, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "loc"), "Expected \"loc\", got \"%s\"\n", buf); - ok(sz == 3, "Expected 3, got %d\n", sz); - - res = RegSetValueExA(propkey, "InstallSource", 0, REG_SZ, (LPBYTE)"source", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallSource value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_INSTALLSOURCE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "source"), "Expected \"source\", got \"%s\"\n", buf); - ok(sz == 6, "Expected 6, got %d\n", sz); - - res = RegSetValueExA(propkey, "LocalPackage", 0, REG_SZ, (LPBYTE)"local", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* LocalPackage value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "local"), "Expected \"local\", got \"%s\"\n", buf); - ok(sz == 5, "Expected 5, got %d\n", sz); - - res = RegSetValueExA(propkey, "Publisher", 0, REG_SZ, (LPBYTE)"pub", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Publisher value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_PUBLISHER, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "pub"), "Expected \"pub\", got \"%s\"\n", buf); - ok(sz == 3, "Expected 3, got %d\n", sz); - - res = RegSetValueExA(propkey, "URLInfoAbout", 0, REG_SZ, (LPBYTE)"about", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* URLInfoAbout value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_URLINFOABOUT, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "about"), "Expected \"about\", got \"%s\"\n", buf); - ok(sz == 5, "Expected 5, got %d\n", sz); - - res = RegSetValueExA(propkey, "URLUpdateInfo", 0, REG_SZ, (LPBYTE)"update", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* URLUpdateInfo value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_URLUPDATEINFO, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "update"), "Expected \"update\", got \"%s\"\n", buf); - ok(sz == 6, "Expected 6, got %d\n", sz); - - res = RegSetValueExA(propkey, "VersionMinor", 0, REG_SZ, (LPBYTE)"2", 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* VersionMinor value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_VERSIONMINOR, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "2"), "Expected \"2\", got \"%s\"\n", buf); - ok(sz == 1, "Expected 1, got %d\n", sz); - - res = RegSetValueExA(propkey, "VersionMajor", 0, REG_SZ, (LPBYTE)"3", 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* VersionMajor value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_VERSIONMAJOR, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "3"), "Expected \"3\", got \"%s\"\n", buf); - ok(sz == 1, "Expected 1, got %d\n", sz); - - res = RegSetValueExA(propkey, "DisplayVersion", 0, REG_SZ, (LPBYTE)"3.2.1", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* DisplayVersion value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_VERSIONSTRING, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "3.2.1"), "Expected \"3.2.1\", got \"%s\"\n", buf); - ok(sz == 5, "Expected 5, got %d\n", sz); - - res = RegSetValueExA(propkey, "ProductID", 0, REG_SZ, (LPBYTE)"id", 3); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductID value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_PRODUCTID, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "id"), "Expected \"id\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "RegCompany", 0, REG_SZ, (LPBYTE)"comp", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* RegCompany value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_REGCOMPANY, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "comp"), "Expected \"comp\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(propkey, "RegOwner", 0, REG_SZ, (LPBYTE)"owner", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* RegOwner value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_REGOWNER, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "owner"), "Expected \"owner\", got \"%s\"\n", buf); - ok(sz == 5, "Expected 5, got %d\n", sz); - - res = RegSetValueExA(propkey, "Transforms", 0, REG_SZ, (LPBYTE)"trans", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Transforms value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_TRANSFORMS, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "Language", 0, REG_SZ, (LPBYTE)"lang", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Language value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_LANGUAGE, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "ProductName", 0, REG_SZ, (LPBYTE)"name", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductName value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_PRODUCTNAME, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "AssignmentType", 0, REG_SZ, (LPBYTE)"type", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* FIXME */ - - /* AssignmentType value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_ASSIGNMENTTYPE, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "PackageCode", 0, REG_SZ, (LPBYTE)"code", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* PackageCode value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_PACKAGECODE, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "Version", 0, REG_SZ, (LPBYTE)"ver", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Version value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_VERSION, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "ProductIcon", 0, REG_SZ, (LPBYTE)"icon", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductIcon value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_PRODUCTICON, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "PackageName", 0, REG_SZ, (LPBYTE)"name", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* PackageName value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_PACKAGENAME, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "AuthorizedLUAApp", 0, REG_SZ, (LPBYTE)"auth", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* AuthorizedLUAApp value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_AUTHORIZED_LUA_APP, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - RegDeleteValueA(propkey, "AuthorizedLUAApp"); - RegDeleteValueA(propkey, "PackageName"); - RegDeleteValueA(propkey, "ProductIcon"); - RegDeleteValueA(propkey, "Version"); - RegDeleteValueA(propkey, "PackageCode"); - RegDeleteValueA(propkey, "AssignmentType"); - RegDeleteValueA(propkey, "ProductName"); - RegDeleteValueA(propkey, "Language"); - RegDeleteValueA(propkey, "Transforms"); - RegDeleteValueA(propkey, "RegOwner"); - RegDeleteValueA(propkey, "RegCompany"); - RegDeleteValueA(propkey, "ProductID"); - RegDeleteValueA(propkey, "DisplayVersion"); - RegDeleteValueA(propkey, "VersionMajor"); - RegDeleteValueA(propkey, "VersionMinor"); - RegDeleteValueA(propkey, "URLUpdateInfo"); - RegDeleteValueA(propkey, "URLInfoAbout"); - RegDeleteValueA(propkey, "Publisher"); - RegDeleteValueA(propkey, "LocalPackage"); - RegDeleteValueA(propkey, "InstallSource"); - RegDeleteValueA(propkey, "InstallLocation"); - RegDeleteValueA(propkey, "DisplayName"); - RegDeleteValueA(propkey, "InstallDate"); - RegDeleteValueA(propkey, "HelpTelephone"); - RegDeleteValueA(propkey, "HelpLink"); - RegDeleteValueA(propkey, "LocalPackage"); - RegDeleteKeyA(propkey, ""); - RegCloseKey(propkey); - RegDeleteKeyA(localkey, ""); - RegCloseKey(localkey); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user product key exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_PRODUCTSTATE, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - RegDeleteKeyA(userkey, ""); - RegCloseKey(userkey); - - lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_PRODUCTSTATE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "1"), "Expected \"1\", got \"%s\"\n", buf); - ok(sz == 1, "Expected 1, got %d\n", sz); - - res = RegSetValueExA(prodkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* HelpLink value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "HelpTelephone", 0, REG_SZ, (LPBYTE)"phone", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* HelpTelephone value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_HELPTELEPHONE, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "InstallDate", 0, REG_SZ, (LPBYTE)"date", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallDate value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_INSTALLDATE, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "DisplayName", 0, REG_SZ, (LPBYTE)"name", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* DisplayName value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_INSTALLEDPRODUCTNAME, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "InstallLocation", 0, REG_SZ, (LPBYTE)"loc", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallLocation value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_INSTALLLOCATION, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "InstallSource", 0, REG_SZ, (LPBYTE)"source", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallSource value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_INSTALLSOURCE, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "LocalPackage", 0, REG_SZ, (LPBYTE)"local", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* LocalPackage value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "Publisher", 0, REG_SZ, (LPBYTE)"pub", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Publisher value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_PUBLISHER, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "URLInfoAbout", 0, REG_SZ, (LPBYTE)"about", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* URLInfoAbout value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_URLINFOABOUT, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "URLUpdateInfo", 0, REG_SZ, (LPBYTE)"update", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* URLUpdateInfo value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_URLUPDATEINFO, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "VersionMinor", 0, REG_SZ, (LPBYTE)"2", 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* VersionMinor value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_VERSIONMINOR, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "VersionMajor", 0, REG_SZ, (LPBYTE)"3", 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* VersionMajor value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_VERSIONMAJOR, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "DisplayVersion", 0, REG_SZ, (LPBYTE)"3.2.1", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* DisplayVersion value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_VERSIONSTRING, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "ProductID", 0, REG_SZ, (LPBYTE)"id", 3); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductID value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_PRODUCTID, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "RegCompany", 0, REG_SZ, (LPBYTE)"comp", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* RegCompany value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_REGCOMPANY, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "RegOwner", 0, REG_SZ, (LPBYTE)"owner", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* RegOwner value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_REGOWNER, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "Transforms", 0, REG_SZ, (LPBYTE)"trans", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Transforms value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_TRANSFORMS, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "trans"), "Expected \"trans\", got \"%s\"\n", buf); - ok(sz == 5, "Expected 5, got %d\n", sz); - - res = RegSetValueExA(prodkey, "Language", 0, REG_SZ, (LPBYTE)"lang", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Language value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_LANGUAGE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "lang"), "Expected \"lang\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(prodkey, "ProductName", 0, REG_SZ, (LPBYTE)"name", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductName value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_PRODUCTNAME, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "name"), "Expected \"name\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(prodkey, "AssignmentType", 0, REG_SZ, (LPBYTE)"type", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* FIXME */ - - /* AssignmentType value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_ASSIGNMENTTYPE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - res = RegSetValueExA(prodkey, "PackageCode", 0, REG_SZ, (LPBYTE)"code", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* FIXME */ - - /* PackageCode value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_PACKAGECODE, buf, &sz); - todo_wine - { - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - } - - res = RegSetValueExA(prodkey, "Version", 0, REG_SZ, (LPBYTE)"ver", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Version value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_VERSION, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "ver"), "Expected \"ver\", got \"%s\"\n", buf); - ok(sz == 3, "Expected 3, got %d\n", sz); - - res = RegSetValueExA(prodkey, "ProductIcon", 0, REG_SZ, (LPBYTE)"icon", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductIcon value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_PRODUCTICON, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "icon"), "Expected \"icon\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(prodkey, "PackageName", 0, REG_SZ, (LPBYTE)"name", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* PackageName value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_PACKAGENAME, buf, &sz); - todo_wine - { - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - } - - res = RegSetValueExA(prodkey, "AuthorizedLUAApp", 0, REG_SZ, (LPBYTE)"auth", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* AuthorizedLUAApp value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_AUTHORIZED_LUA_APP, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "auth"), "Expected \"auth\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - RegDeleteValueA(prodkey, "AuthorizedLUAApp"); - RegDeleteValueA(prodkey, "PackageName"); - RegDeleteValueA(prodkey, "ProductIcon"); - RegDeleteValueA(prodkey, "Version"); - RegDeleteValueA(prodkey, "PackageCode"); - RegDeleteValueA(prodkey, "AssignmentType"); - RegDeleteValueA(prodkey, "ProductName"); - RegDeleteValueA(prodkey, "Language"); - RegDeleteValueA(prodkey, "Transforms"); - RegDeleteValueA(prodkey, "RegOwner"); - RegDeleteValueA(prodkey, "RegCompany"); - RegDeleteValueA(prodkey, "ProductID"); - RegDeleteValueA(prodkey, "DisplayVersion"); - RegDeleteValueA(prodkey, "VersionMajor"); - RegDeleteValueA(prodkey, "VersionMinor"); - RegDeleteValueA(prodkey, "URLUpdateInfo"); - RegDeleteValueA(prodkey, "URLInfoAbout"); - RegDeleteValueA(prodkey, "Publisher"); - RegDeleteValueA(prodkey, "LocalPackage"); - RegDeleteValueA(prodkey, "InstallSource"); - RegDeleteValueA(prodkey, "InstallLocation"); - RegDeleteValueA(prodkey, "DisplayName"); - RegDeleteValueA(prodkey, "InstallDate"); - RegDeleteValueA(prodkey, "HelpTelephone"); - RegDeleteValueA(prodkey, "HelpLink"); - RegDeleteValueA(prodkey, "LocalPackage"); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - - /* MSIINSTALLCONTEXT_USERMANAGED */ - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &localkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local user product key exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_PRODUCTSTATE, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegCreateKeyA(localkey, "InstallProperties", &propkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallProperties key exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_PRODUCTSTATE, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "ManagedLocalPackage", 0, REG_SZ, (LPBYTE)"local", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ManagedLocalPackage value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_PRODUCTSTATE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "5"), "Expected \"5\", got \"%s\"\n", buf); - ok(sz == 1, "Expected 1, got %d\n", sz); - - res = RegSetValueExA(propkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* HelpLink value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "link"), "Expected \"link\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(propkey, "HelpTelephone", 0, REG_SZ, (LPBYTE)"phone", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* HelpTelephone value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_HELPTELEPHONE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "phone"), "Expected \"phone\", got \"%s\"\n", buf); - ok(sz == 5, "Expected 5, got %d\n", sz); - - res = RegSetValueExA(propkey, "InstallDate", 0, REG_SZ, (LPBYTE)"date", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallDate value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_INSTALLDATE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "date"), "Expected \"date\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(propkey, "DisplayName", 0, REG_SZ, (LPBYTE)"name", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* DisplayName value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_INSTALLEDPRODUCTNAME, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "name"), "Expected \"name\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(propkey, "InstallLocation", 0, REG_SZ, (LPBYTE)"loc", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallLocation value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_INSTALLLOCATION, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "loc"), "Expected \"loc\", got \"%s\"\n", buf); - ok(sz == 3, "Expected 3, got %d\n", sz); - - res = RegSetValueExA(propkey, "InstallSource", 0, REG_SZ, (LPBYTE)"source", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallSource value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_INSTALLSOURCE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "source"), "Expected \"source\", got \"%s\"\n", buf); - ok(sz == 6, "Expected 6, got %d\n", sz); - - res = RegSetValueExA(propkey, "LocalPackage", 0, REG_SZ, (LPBYTE)"local", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* LocalPackage value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "local"), "Expected \"local\", got \"%s\"\n", buf); - ok(sz == 5, "Expected 5, got %d\n", sz); - - res = RegSetValueExA(propkey, "Publisher", 0, REG_SZ, (LPBYTE)"pub", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Publisher value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_PUBLISHER, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "pub"), "Expected \"pub\", got \"%s\"\n", buf); - ok(sz == 3, "Expected 3, got %d\n", sz); - - res = RegSetValueExA(propkey, "URLInfoAbout", 0, REG_SZ, (LPBYTE)"about", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* URLInfoAbout value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_URLINFOABOUT, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "about"), "Expected \"about\", got \"%s\"\n", buf); - ok(sz == 5, "Expected 5, got %d\n", sz); - - res = RegSetValueExA(propkey, "URLUpdateInfo", 0, REG_SZ, (LPBYTE)"update", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* URLUpdateInfo value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_URLUPDATEINFO, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "update"), "Expected \"update\", got \"%s\"\n", buf); - ok(sz == 6, "Expected 6, got %d\n", sz); - - res = RegSetValueExA(propkey, "VersionMinor", 0, REG_SZ, (LPBYTE)"2", 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* VersionMinor value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_VERSIONMINOR, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "2"), "Expected \"2\", got \"%s\"\n", buf); - ok(sz == 1, "Expected 1, got %d\n", sz); - - res = RegSetValueExA(propkey, "VersionMajor", 0, REG_SZ, (LPBYTE)"3", 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* VersionMajor value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_VERSIONMAJOR, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "3"), "Expected \"3\", got \"%s\"\n", buf); - ok(sz == 1, "Expected 1, got %d\n", sz); - - res = RegSetValueExA(propkey, "DisplayVersion", 0, REG_SZ, (LPBYTE)"3.2.1", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* DisplayVersion value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_VERSIONSTRING, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "3.2.1"), "Expected \"3.2.1\", got \"%s\"\n", buf); - ok(sz == 5, "Expected 5, got %d\n", sz); - - res = RegSetValueExA(propkey, "ProductID", 0, REG_SZ, (LPBYTE)"id", 3); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductID value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_PRODUCTID, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "id"), "Expected \"id\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "RegCompany", 0, REG_SZ, (LPBYTE)"comp", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* RegCompany value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_REGCOMPANY, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "comp"), "Expected \"comp\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(propkey, "RegOwner", 0, REG_SZ, (LPBYTE)"owner", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* RegOwner value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_REGOWNER, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "owner"), "Expected \"owner\", got \"%s\"\n", buf); - ok(sz == 5, "Expected 5, got %d\n", sz); - - res = RegSetValueExA(propkey, "Transforms", 0, REG_SZ, (LPBYTE)"trans", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Transforms value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_TRANSFORMS, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "Language", 0, REG_SZ, (LPBYTE)"lang", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Language value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LANGUAGE, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "ProductName", 0, REG_SZ, (LPBYTE)"name", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductName value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_PRODUCTNAME, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "AssignmentType", 0, REG_SZ, (LPBYTE)"type", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* FIXME */ - - /* AssignmentType value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_ASSIGNMENTTYPE, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "PackageCode", 0, REG_SZ, (LPBYTE)"code", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* PackageCode value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_PACKAGECODE, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "Version", 0, REG_SZ, (LPBYTE)"ver", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Version value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_VERSION, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "ProductIcon", 0, REG_SZ, (LPBYTE)"icon", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductIcon value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_PRODUCTICON, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "PackageName", 0, REG_SZ, (LPBYTE)"name", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* PackageName value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_PACKAGENAME, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "AuthorizedLUAApp", 0, REG_SZ, (LPBYTE)"auth", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* AuthorizedLUAApp value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_AUTHORIZED_LUA_APP, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - RegDeleteValueA(propkey, "AuthorizedLUAApp"); - RegDeleteValueA(propkey, "PackageName"); - RegDeleteValueA(propkey, "ProductIcon"); - RegDeleteValueA(propkey, "Version"); - RegDeleteValueA(propkey, "PackageCode"); - RegDeleteValueA(propkey, "AssignmentType"); - RegDeleteValueA(propkey, "ProductName"); - RegDeleteValueA(propkey, "Language"); - RegDeleteValueA(propkey, "Transforms"); - RegDeleteValueA(propkey, "RegOwner"); - RegDeleteValueA(propkey, "RegCompany"); - RegDeleteValueA(propkey, "ProductID"); - RegDeleteValueA(propkey, "DisplayVersion"); - RegDeleteValueA(propkey, "VersionMajor"); - RegDeleteValueA(propkey, "VersionMinor"); - RegDeleteValueA(propkey, "URLUpdateInfo"); - RegDeleteValueA(propkey, "URLInfoAbout"); - RegDeleteValueA(propkey, "Publisher"); - RegDeleteValueA(propkey, "LocalPackage"); - RegDeleteValueA(propkey, "InstallSource"); - RegDeleteValueA(propkey, "InstallLocation"); - RegDeleteValueA(propkey, "DisplayName"); - RegDeleteValueA(propkey, "InstallDate"); - RegDeleteValueA(propkey, "HelpTelephone"); - RegDeleteValueA(propkey, "HelpLink"); - RegDeleteValueA(propkey, "ManagedLocalPackage"); - RegDeleteKeyA(propkey, ""); - RegCloseKey(propkey); - RegDeleteKeyA(localkey, ""); - RegCloseKey(localkey); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user product key exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_PRODUCTSTATE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "1"), "Expected \"1\", got \"%s\"\n", buf); - ok(sz == 1, "Expected 1, got %d\n", sz); - - RegDeleteKeyA(userkey, ""); - RegCloseKey(userkey); - - lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* current user product key exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_PRODUCTSTATE, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* HelpLink value exists, user product key does not exist */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = RegSetValueExA(userkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* HelpLink value exists, user product key does exist */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(userkey, "HelpTelephone", 0, REG_SZ, (LPBYTE)"phone", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* HelpTelephone value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_HELPTELEPHONE, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(userkey, "InstallDate", 0, REG_SZ, (LPBYTE)"date", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallDate value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_INSTALLDATE, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(userkey, "DisplayName", 0, REG_SZ, (LPBYTE)"name", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* DisplayName value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_INSTALLEDPRODUCTNAME, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(userkey, "InstallLocation", 0, REG_SZ, (LPBYTE)"loc", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallLocation value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_INSTALLLOCATION, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(userkey, "InstallSource", 0, REG_SZ, (LPBYTE)"source", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallSource value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_INSTALLSOURCE, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(userkey, "LocalPackage", 0, REG_SZ, (LPBYTE)"local", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* LocalPackage value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(userkey, "Publisher", 0, REG_SZ, (LPBYTE)"pub", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Publisher value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_PUBLISHER, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(userkey, "URLInfoAbout", 0, REG_SZ, (LPBYTE)"about", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* URLInfoAbout value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_URLINFOABOUT, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(userkey, "URLUpdateInfo", 0, REG_SZ, (LPBYTE)"update", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* URLUpdateInfo value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_URLUPDATEINFO, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(userkey, "VersionMinor", 0, REG_SZ, (LPBYTE)"2", 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* VersionMinor value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_VERSIONMINOR, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(userkey, "VersionMajor", 0, REG_SZ, (LPBYTE)"3", 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* VersionMajor value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_VERSIONMAJOR, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(userkey, "DisplayVersion", 0, REG_SZ, (LPBYTE)"3.2.1", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* DisplayVersion value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_VERSIONSTRING, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(userkey, "ProductID", 0, REG_SZ, (LPBYTE)"id", 3); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductID value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_PRODUCTID, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(userkey, "RegCompany", 0, REG_SZ, (LPBYTE)"comp", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* RegCompany value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_REGCOMPANY, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(userkey, "RegOwner", 0, REG_SZ, (LPBYTE)"owner", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* RegOwner value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_REGOWNER, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(userkey, "Transforms", 0, REG_SZ, (LPBYTE)"trans", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Transforms value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_TRANSFORMS, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "trans"), "Expected \"trans\", got \"%s\"\n", buf); - ok(sz == 5, "Expected 5, got %d\n", sz); - - res = RegSetValueExA(userkey, "Language", 0, REG_SZ, (LPBYTE)"lang", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Language value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LANGUAGE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "lang"), "Expected \"lang\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(userkey, "ProductName", 0, REG_SZ, (LPBYTE)"name", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductName value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_PRODUCTNAME, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "name"), "Expected \"name\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(userkey, "AssignmentType", 0, REG_SZ, (LPBYTE)"type", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* FIXME */ - - /* AssignmentType value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_ASSIGNMENTTYPE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - res = RegSetValueExA(userkey, "PackageCode", 0, REG_SZ, (LPBYTE)"code", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* FIXME */ - - /* PackageCode value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_PACKAGECODE, buf, &sz); - todo_wine - { - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - } - - res = RegSetValueExA(userkey, "Version", 0, REG_SZ, (LPBYTE)"ver", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Version value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_VERSION, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "ver"), "Expected \"ver\", got \"%s\"\n", buf); - ok(sz == 3, "Expected 3, got %d\n", sz); - - res = RegSetValueExA(userkey, "ProductIcon", 0, REG_SZ, (LPBYTE)"icon", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductIcon value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_PRODUCTICON, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "icon"), "Expected \"icon\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(userkey, "PackageName", 0, REG_SZ, (LPBYTE)"name", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* PackageName value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_PACKAGENAME, buf, &sz); - todo_wine - { - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - } - - res = RegSetValueExA(userkey, "AuthorizedLUAApp", 0, REG_SZ, (LPBYTE)"auth", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* AuthorizedLUAApp value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_AUTHORIZED_LUA_APP, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "auth"), "Expected \"auth\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - RegDeleteValueA(userkey, "AuthorizedLUAApp"); - RegDeleteValueA(userkey, "PackageName"); - RegDeleteValueA(userkey, "ProductIcon"); - RegDeleteValueA(userkey, "Version"); - RegDeleteValueA(userkey, "PackageCode"); - RegDeleteValueA(userkey, "AssignmentType"); - RegDeleteValueA(userkey, "ProductName"); - RegDeleteValueA(userkey, "Language"); - RegDeleteValueA(userkey, "Transforms"); - RegDeleteValueA(userkey, "RegOwner"); - RegDeleteValueA(userkey, "RegCompany"); - RegDeleteValueA(userkey, "ProductID"); - RegDeleteValueA(userkey, "DisplayVersion"); - RegDeleteValueA(userkey, "VersionMajor"); - RegDeleteValueA(userkey, "VersionMinor"); - RegDeleteValueA(userkey, "URLUpdateInfo"); - RegDeleteValueA(userkey, "URLInfoAbout"); - RegDeleteValueA(userkey, "Publisher"); - RegDeleteValueA(userkey, "LocalPackage"); - RegDeleteValueA(userkey, "InstallSource"); - RegDeleteValueA(userkey, "InstallLocation"); - RegDeleteValueA(userkey, "DisplayName"); - RegDeleteValueA(userkey, "InstallDate"); - RegDeleteValueA(userkey, "HelpTelephone"); - RegDeleteValueA(userkey, "HelpLink"); - RegDeleteKeyA(userkey, ""); - RegCloseKey(userkey); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - - /* MSIINSTALLCONTEXT_MACHINE */ - - /* szUserSid is non-NULL */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, usersid, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_PRODUCTSTATE, buf, &sz); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\S-1-5-18\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &localkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local system product key exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_PRODUCTSTATE, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegCreateKeyA(localkey, "InstallProperties", &propkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallProperties key exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_PRODUCTSTATE, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "LocalPackage", 0, REG_SZ, (LPBYTE)"local", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* LocalPackage value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_PRODUCTSTATE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "5"), "Expected \"5\", got \"%s\"\n", buf); - ok(sz == 1, "Expected 1, got %d\n", sz); - - res = RegSetValueExA(propkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* HelpLink value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "link"), "Expected \"link\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(propkey, "HelpTelephone", 0, REG_SZ, (LPBYTE)"phone", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* HelpTelephone value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_HELPTELEPHONE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "phone"), "Expected \"phone\", got \"%s\"\n", buf); - ok(sz == 5, "Expected 5, got %d\n", sz); - - res = RegSetValueExA(propkey, "InstallDate", 0, REG_SZ, (LPBYTE)"date", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallDate value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_INSTALLDATE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "date"), "Expected \"date\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(propkey, "DisplayName", 0, REG_SZ, (LPBYTE)"name", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* DisplayName value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_INSTALLEDPRODUCTNAME, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "name"), "Expected \"name\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(propkey, "InstallLocation", 0, REG_SZ, (LPBYTE)"loc", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallLocation value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_INSTALLLOCATION, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "loc"), "Expected \"loc\", got \"%s\"\n", buf); - ok(sz == 3, "Expected 3, got %d\n", sz); - - res = RegSetValueExA(propkey, "InstallSource", 0, REG_SZ, (LPBYTE)"source", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallSource value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_INSTALLSOURCE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "source"), "Expected \"source\", got \"%s\"\n", buf); - ok(sz == 6, "Expected 6, got %d\n", sz); - - res = RegSetValueExA(propkey, "LocalPackage", 0, REG_SZ, (LPBYTE)"local", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* LocalPackage value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_LOCALPACKAGE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "local"), "Expected \"local\", got \"%s\"\n", buf); - ok(sz == 5, "Expected 5, got %d\n", sz); - - res = RegSetValueExA(propkey, "Publisher", 0, REG_SZ, (LPBYTE)"pub", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Publisher value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_PUBLISHER, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "pub"), "Expected \"pub\", got \"%s\"\n", buf); - ok(sz == 3, "Expected 3, got %d\n", sz); - - res = RegSetValueExA(propkey, "URLInfoAbout", 0, REG_SZ, (LPBYTE)"about", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* URLInfoAbout value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_URLINFOABOUT, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "about"), "Expected \"about\", got \"%s\"\n", buf); - ok(sz == 5, "Expected 5, got %d\n", sz); - - res = RegSetValueExA(propkey, "URLUpdateInfo", 0, REG_SZ, (LPBYTE)"update", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* URLUpdateInfo value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_URLUPDATEINFO, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "update"), "Expected \"update\", got \"%s\"\n", buf); - ok(sz == 6, "Expected 6, got %d\n", sz); - - res = RegSetValueExA(propkey, "VersionMinor", 0, REG_SZ, (LPBYTE)"2", 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* VersionMinor value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_VERSIONMINOR, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "2"), "Expected \"2\", got \"%s\"\n", buf); - ok(sz == 1, "Expected 1, got %d\n", sz); - - res = RegSetValueExA(propkey, "VersionMajor", 0, REG_SZ, (LPBYTE)"3", 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* VersionMajor value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_VERSIONMAJOR, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "3"), "Expected \"3\", got \"%s\"\n", buf); - ok(sz == 1, "Expected 1, got %d\n", sz); - - res = RegSetValueExA(propkey, "DisplayVersion", 0, REG_SZ, (LPBYTE)"3.2.1", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* DisplayVersion value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_VERSIONSTRING, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "3.2.1"), "Expected \"3.2.1\", got \"%s\"\n", buf); - ok(sz == 5, "Expected 5, got %d\n", sz); - - res = RegSetValueExA(propkey, "ProductID", 0, REG_SZ, (LPBYTE)"id", 3); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductID value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_PRODUCTID, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "id"), "Expected \"id\", got \"%s\"\n", buf); - ok(sz == 2, "Expected 2, got %d\n", sz); - - res = RegSetValueExA(propkey, "RegCompany", 0, REG_SZ, (LPBYTE)"comp", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* RegCompany value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_REGCOMPANY, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "comp"), "Expected \"comp\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(propkey, "RegOwner", 0, REG_SZ, (LPBYTE)"owner", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* RegOwner value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_REGOWNER, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "owner"), "Expected \"owner\", got \"%s\"\n", buf); - ok(sz == 5, "Expected 5, got %d\n", sz); - - res = RegSetValueExA(propkey, "Transforms", 0, REG_SZ, (LPBYTE)"trans", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Transforms value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_TRANSFORMS, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "Language", 0, REG_SZ, (LPBYTE)"lang", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Language value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_LANGUAGE, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "ProductName", 0, REG_SZ, (LPBYTE)"name", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductName value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_PRODUCTNAME, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "AssignmentType", 0, REG_SZ, (LPBYTE)"type", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* FIXME */ - - /* AssignmentType value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_ASSIGNMENTTYPE, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "PackageCode", 0, REG_SZ, (LPBYTE)"code", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* PackageCode value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_PACKAGECODE, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "Version", 0, REG_SZ, (LPBYTE)"ver", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Version value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_VERSION, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "ProductIcon", 0, REG_SZ, (LPBYTE)"icon", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductIcon value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_PRODUCTICON, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "PackageName", 0, REG_SZ, (LPBYTE)"name", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* PackageName value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_PACKAGENAME, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(propkey, "AuthorizedLUAApp", 0, REG_SZ, (LPBYTE)"auth", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* AuthorizedLUAApp value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_AUTHORIZED_LUA_APP, buf, &sz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - RegDeleteValueA(propkey, "AuthorizedLUAApp"); - RegDeleteValueA(propkey, "PackageName"); - RegDeleteValueA(propkey, "ProductIcon"); - RegDeleteValueA(propkey, "Version"); - RegDeleteValueA(propkey, "PackageCode"); - RegDeleteValueA(propkey, "AssignmentType"); - RegDeleteValueA(propkey, "ProductName"); - RegDeleteValueA(propkey, "Language"); - RegDeleteValueA(propkey, "Transforms"); - RegDeleteValueA(propkey, "RegOwner"); - RegDeleteValueA(propkey, "RegCompany"); - RegDeleteValueA(propkey, "ProductID"); - RegDeleteValueA(propkey, "DisplayVersion"); - RegDeleteValueA(propkey, "VersionMajor"); - RegDeleteValueA(propkey, "VersionMinor"); - RegDeleteValueA(propkey, "URLUpdateInfo"); - RegDeleteValueA(propkey, "URLInfoAbout"); - RegDeleteValueA(propkey, "Publisher"); - RegDeleteValueA(propkey, "LocalPackage"); - RegDeleteValueA(propkey, "InstallSource"); - RegDeleteValueA(propkey, "InstallLocation"); - RegDeleteValueA(propkey, "DisplayName"); - RegDeleteValueA(propkey, "InstallDate"); - RegDeleteValueA(propkey, "HelpTelephone"); - RegDeleteValueA(propkey, "HelpLink"); - RegDeleteValueA(propkey, "LocalPackage"); - RegDeleteKeyA(propkey, ""); - RegCloseKey(propkey); - RegDeleteKeyA(localkey, ""); - RegCloseKey(localkey); - - lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local classes product key exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_PRODUCTSTATE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "1"), "Expected \"1\", got \"%s\"\n", buf); - ok(sz == 1, "Expected 1, got %d\n", sz); - - res = RegSetValueExA(prodkey, "HelpLink", 0, REG_SZ, (LPBYTE)"link", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* HelpLink value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_HELPLINK, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "HelpTelephone", 0, REG_SZ, (LPBYTE)"phone", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* HelpTelephone value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_HELPTELEPHONE, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "InstallDate", 0, REG_SZ, (LPBYTE)"date", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallDate value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_INSTALLDATE, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "DisplayName", 0, REG_SZ, (LPBYTE)"name", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* DisplayName value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_INSTALLEDPRODUCTNAME, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "InstallLocation", 0, REG_SZ, (LPBYTE)"loc", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallLocation value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_INSTALLLOCATION, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "InstallSource", 0, REG_SZ, (LPBYTE)"source", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallSource value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_INSTALLSOURCE, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "LocalPackage", 0, REG_SZ, (LPBYTE)"local", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* LocalPackage value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_LOCALPACKAGE, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "Publisher", 0, REG_SZ, (LPBYTE)"pub", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Publisher value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_PUBLISHER, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "URLInfoAbout", 0, REG_SZ, (LPBYTE)"about", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* URLInfoAbout value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_URLINFOABOUT, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "URLUpdateInfo", 0, REG_SZ, (LPBYTE)"update", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* URLUpdateInfo value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_URLUPDATEINFO, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "VersionMinor", 0, REG_SZ, (LPBYTE)"2", 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* VersionMinor value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_VERSIONMINOR, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "VersionMajor", 0, REG_SZ, (LPBYTE)"3", 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* VersionMajor value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_VERSIONMAJOR, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "DisplayVersion", 0, REG_SZ, (LPBYTE)"3.2.1", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* DisplayVersion value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_VERSIONSTRING, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "ProductID", 0, REG_SZ, (LPBYTE)"id", 3); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductID value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_PRODUCTID, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "RegCompany", 0, REG_SZ, (LPBYTE)"comp", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* RegCompany value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_REGCOMPANY, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "RegOwner", 0, REG_SZ, (LPBYTE)"owner", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* RegOwner value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_REGOWNER, buf, &sz); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - - res = RegSetValueExA(prodkey, "Transforms", 0, REG_SZ, (LPBYTE)"trans", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Transforms value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_TRANSFORMS, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "trans"), "Expected \"trans\", got \"%s\"\n", buf); - ok(sz == 5, "Expected 5, got %d\n", sz); - - res = RegSetValueExA(prodkey, "Language", 0, REG_SZ, (LPBYTE)"lang", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Language value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_LANGUAGE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "lang"), "Expected \"lang\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(prodkey, "ProductName", 0, REG_SZ, (LPBYTE)"name", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductName value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_PRODUCTNAME, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "name"), "Expected \"name\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(prodkey, "AssignmentType", 0, REG_SZ, (LPBYTE)"type", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* FIXME */ - - /* AssignmentType value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_ASSIGNMENTTYPE, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - res = RegSetValueExA(prodkey, "PackageCode", 0, REG_SZ, (LPBYTE)"code", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* FIXME */ - - /* PackageCode value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_PACKAGECODE, buf, &sz); - todo_wine - { - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - } - - res = RegSetValueExA(prodkey, "Version", 0, REG_SZ, (LPBYTE)"ver", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Version value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_VERSION, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "ver"), "Expected \"ver\", got \"%s\"\n", buf); - ok(sz == 3, "Expected 3, got %d\n", sz); - - res = RegSetValueExA(prodkey, "ProductIcon", 0, REG_SZ, (LPBYTE)"icon", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductIcon value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_PRODUCTICON, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "icon"), "Expected \"icon\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - res = RegSetValueExA(prodkey, "PackageName", 0, REG_SZ, (LPBYTE)"name", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* PackageName value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_PACKAGENAME, buf, &sz); - todo_wine - { - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(buf, "apple"), "Expected buf to be unchanged, got %s\n", buf); - ok(sz == MAX_PATH, "Expected MAX_PATH, got %d\n", sz); - } - - res = RegSetValueExA(prodkey, "AuthorizedLUAApp", 0, REG_SZ, (LPBYTE)"auth", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* AuthorizedLUAApp value exists */ - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = pMsiGetProductInfoExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_AUTHORIZED_LUA_APP, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "auth"), "Expected \"auth\", got \"%s\"\n", buf); - ok(sz == 4, "Expected 4, got %d\n", sz); - - RegDeleteValueA(prodkey, "AuthorizedLUAApp"); - RegDeleteValueA(prodkey, "PackageName"); - RegDeleteValueA(prodkey, "ProductIcon"); - RegDeleteValueA(prodkey, "Version"); - RegDeleteValueA(prodkey, "PackageCode"); - RegDeleteValueA(prodkey, "AssignmentType"); - RegDeleteValueA(prodkey, "ProductName"); - RegDeleteValueA(prodkey, "Language"); - RegDeleteValueA(prodkey, "Transforms"); - RegDeleteValueA(prodkey, "RegOwner"); - RegDeleteValueA(prodkey, "RegCompany"); - RegDeleteValueA(prodkey, "ProductID"); - RegDeleteValueA(prodkey, "DisplayVersion"); - RegDeleteValueA(prodkey, "VersionMajor"); - RegDeleteValueA(prodkey, "VersionMinor"); - RegDeleteValueA(prodkey, "URLUpdateInfo"); - RegDeleteValueA(prodkey, "URLInfoAbout"); - RegDeleteValueA(prodkey, "Publisher"); - RegDeleteValueA(prodkey, "LocalPackage"); - RegDeleteValueA(prodkey, "InstallSource"); - RegDeleteValueA(prodkey, "InstallLocation"); - RegDeleteValueA(prodkey, "DisplayName"); - RegDeleteValueA(prodkey, "InstallDate"); - RegDeleteValueA(prodkey, "HelpTelephone"); - RegDeleteValueA(prodkey, "HelpLink"); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - LocalFree(usersid); -} - -#define INIT_USERINFO() \ - lstrcpyA(user, "apple"); \ - lstrcpyA(org, "orange"); \ - lstrcpyA(serial, "banana"); \ - usersz = orgsz = serialsz = MAX_PATH; - -static void test_MsiGetUserInfo(void) -{ - USERINFOSTATE state; - CHAR user[MAX_PATH]; - CHAR org[MAX_PATH]; - CHAR serial[MAX_PATH]; - DWORD usersz, orgsz, serialsz; - CHAR keypath[MAX_PATH * 2]; - CHAR prodcode[MAX_PATH]; - CHAR prod_squashed[MAX_PATH]; - HKEY prodkey, userprod, props; - LPSTR usersid; - LONG res; - - create_test_guid(prodcode, prod_squashed); - get_user_sid(&usersid); - - /* NULL szProduct */ - INIT_USERINFO(); - state = MsiGetUserInfoA(NULL, user, &usersz, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_INVALIDARG, - "Expected USERINFOSTATE_INVALIDARG, got %d\n", state); - ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user); - ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz); - ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz); - ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz); - - /* empty szProductCode */ - INIT_USERINFO(); - state = MsiGetUserInfoA("", user, &usersz, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_INVALIDARG, - "Expected USERINFOSTATE_INVALIDARG, got %d\n", state); - ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user); - ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz); - ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz); - ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz); - - /* garbage szProductCode */ - INIT_USERINFO(); - state = MsiGetUserInfoA("garbage", user, &usersz, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_INVALIDARG, - "Expected USERINFOSTATE_INVALIDARG, got %d\n", state); - ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user); - ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz); - ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz); - ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz); - - /* guid without brackets */ - INIT_USERINFO(); - state = MsiGetUserInfoA("6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D", - user, &usersz, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_INVALIDARG, - "Expected USERINFOSTATE_INVALIDARG, got %d\n", state); - ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user); - ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz); - ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz); - ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz); - - /* guid with brackets */ - INIT_USERINFO(); - state = MsiGetUserInfoA("{6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D}", - user, &usersz, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_UNKNOWN, - "Expected USERINFOSTATE_UNKNOWN, got %d\n", state); - ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user); - ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz); - ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz); - ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz); - - /* NULL lpUserNameBuf */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, NULL, &usersz, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_UNKNOWN, - "Expected USERINFOSTATE_UNKNOWN, got %d\n", state); - ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz); - ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz); - ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz); - - /* NULL pcchUserNameBuf */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, user, NULL, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_INVALIDARG, - "Expected USERINFOSTATE_INVALIDARG, got %d\n", state); - ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user); - ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz); - ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz); - - /* both lpUserNameBuf and pcchUserNameBuf NULL */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, NULL, NULL, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_UNKNOWN, - "Expected USERINFOSTATE_UNKNOWN, got %d\n", state); - ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz); - ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz); - - /* NULL lpOrgNameBuf */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, user, &usersz, NULL, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_UNKNOWN, - "Expected USERINFOSTATE_UNKNOWN, got %d\n", state); - ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz); - ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz); - ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz); - - /* NULL pcchOrgNameBuf */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, user, &usersz, org, NULL, serial, &serialsz); - ok(state == USERINFOSTATE_INVALIDARG, - "Expected USERINFOSTATE_INVALIDARG, got %d\n", state); - ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user); - ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz); - ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz); - - /* both lpOrgNameBuf and pcchOrgNameBuf NULL */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, user, &usersz, NULL, NULL, serial, &serialsz); - ok(state == USERINFOSTATE_UNKNOWN, - "Expected USERINFOSTATE_UNKNOWN, got %d\n", state); - ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz); - ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz); - - /* NULL lpSerialBuf */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, user, &usersz, org, &orgsz, NULL, &serialsz); - ok(state == USERINFOSTATE_UNKNOWN, - "Expected USERINFOSTATE_UNKNOWN, got %d\n", state); - ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user); - ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org); - ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz); - ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz); - ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz); - - /* NULL pcchSerialBuf */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, user, &usersz, org, &orgsz, serial, NULL); - ok(state == USERINFOSTATE_INVALIDARG, - "Expected USERINFOSTATE_INVALIDARG, got %d\n", state); - ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user); - ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz); - ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz); - - /* both lpSerialBuf and pcchSerialBuf NULL */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, user, &usersz, org, &orgsz, NULL, NULL); - ok(state == USERINFOSTATE_UNKNOWN, - "Expected USERINFOSTATE_UNKNOWN, got %d\n", state); - ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user); - ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org); - ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz); - ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz); - - /* MSIINSTALLCONTEXT_USERMANAGED */ - - /* create local system product key */ - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* managed product key exists */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, user, &usersz, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_ABSENT, - "Expected USERINFOSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user); - ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz); - ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz); - ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &userprod); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = RegCreateKeyA(userprod, "InstallProperties", &props); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallProperties key exists */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, user, &usersz, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_ABSENT, - "Expected USERINFOSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user); - ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(usersz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", usersz); - ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz); - ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz); - - /* RegOwner doesn't exist, lpUserNameBuf and pcchUserNameBuf are NULL */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, NULL, NULL, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_ABSENT, - "Expected USERINFOSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(org, ""), "Expected empty string, got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(orgsz == 0, "Expected 0, got %d\n", orgsz); - ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", serialsz); - - /* RegOwner, RegCompany don't exist, out params are NULL */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, NULL, NULL, NULL, NULL, serial, &serialsz); - ok(state == USERINFOSTATE_ABSENT, - "Expected USERINFOSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", serialsz); - - res = RegSetValueExA(props, "RegOwner", 0, REG_SZ, (LPBYTE)"owner", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* RegOwner value exists */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, user, &usersz, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_ABSENT, - "Expected USERINFOSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(user, "owner"), "Expected \"owner\", got \"%s\"\n", user); - ok(!lstrcmpA(org, ""), "Expected empty string, got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(usersz == 5, "Expected 5, got %d\n", usersz); - ok(orgsz == 0, "Expected 0, got %d\n", orgsz); - ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", serialsz); - - res = RegSetValueExA(props, "RegCompany", 0, REG_SZ, (LPBYTE)"company", 8); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* RegCompany value exists */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, user, &usersz, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_ABSENT, - "Expected USERINFOSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(user, "owner"), "Expected \"owner\", got \"%s\"\n", user); - ok(!lstrcmpA(org, "company"), "Expected \"company\", got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(usersz == 5, "Expected 5, got %d\n", usersz); - ok(orgsz == 7, "Expected 7, got %d\n", orgsz); - ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", serialsz); - - res = RegSetValueExA(props, "ProductID", 0, REG_SZ, (LPBYTE)"ID", 3); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductID value exists */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, user, &usersz, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_PRESENT, - "Expected USERINFOSTATE_PRESENT, got %d\n", state); - ok(!lstrcmpA(user, "owner"), "Expected \"owner\", got \"%s\"\n", user); - ok(!lstrcmpA(org, "company"), "Expected \"company\", got \"%s\"\n", org); - ok(!lstrcmpA(serial, "ID"), "Expected \"ID\", got \"%s\"\n", serial); - ok(usersz == 5, "Expected 5, got %d\n", usersz); - ok(orgsz == 7, "Expected 7, got %d\n", orgsz); - ok(serialsz == 2, "Expected 2, got %d\n", serialsz); - - /* pcchUserNameBuf is too small */ - INIT_USERINFO(); - usersz = 0; - state = MsiGetUserInfoA(prodcode, user, &usersz, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_MOREDATA, - "Expected USERINFOSTATE_MOREDATA, got %d\n", state); - ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user); - ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(usersz == 5, "Expected 5, got %d\n", usersz); - ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz); - ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz); - - /* pcchUserNameBuf has no room for NULL terminator */ - INIT_USERINFO(); - usersz = 5; - state = MsiGetUserInfoA(prodcode, user, &usersz, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_MOREDATA, - "Expected USERINFOSTATE_MOREDATA, got %d\n", state); - todo_wine - { - ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user); - } - ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(usersz == 5, "Expected 5, got %d\n", usersz); - ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz); - ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz); - - /* pcchUserNameBuf is too small, lpUserNameBuf is NULL */ - INIT_USERINFO(); - usersz = 0; - state = MsiGetUserInfoA(prodcode, NULL, &usersz, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_PRESENT, - "Expected USERINFOSTATE_PRESENT, got %d\n", state); - ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user); - ok(!lstrcmpA(org, "company"), "Expected \"company\", got \"%s\"\n", org); - ok(!lstrcmpA(serial, "ID"), "Expected \"ID\", got \"%s\"\n", serial); - ok(usersz == 5, "Expected 5, got %d\n", usersz); - ok(orgsz == 7, "Expected 7, got %d\n", orgsz); - ok(serialsz == 2, "Expected 2, got %d\n", serialsz); - - RegDeleteValueA(props, "ProductID"); - RegDeleteValueA(props, "RegCompany"); - RegDeleteValueA(props, "RegOwner"); - RegDeleteKeyA(props, ""); - RegCloseKey(props); - RegDeleteKeyA(userprod, ""); - RegCloseKey(userprod); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - - /* MSIINSTALLCONTEXT_USERUNMANAGED */ - - /* create local system product key */ - lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* product key exists */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, user, &usersz, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_ABSENT, - "Expected USERINFOSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user); - ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz); - ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz); - ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &userprod); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = RegCreateKeyA(userprod, "InstallProperties", &props); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallProperties key exists */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, user, &usersz, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_ABSENT, - "Expected USERINFOSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user); - ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(usersz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", usersz); - ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz); - ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz); - - /* RegOwner doesn't exist, lpUserNameBuf and pcchUserNameBuf are NULL */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, NULL, NULL, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_ABSENT, - "Expected USERINFOSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(org, ""), "Expected empty string, got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(orgsz == 0, "Expected 0, got %d\n", orgsz); - ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", serialsz); - - /* RegOwner, RegCompany don't exist, out params are NULL */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, NULL, NULL, NULL, NULL, serial, &serialsz); - ok(state == USERINFOSTATE_ABSENT, - "Expected USERINFOSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", serialsz); - - res = RegSetValueExA(props, "RegOwner", 0, REG_SZ, (LPBYTE)"owner", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* RegOwner value exists */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, user, &usersz, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_ABSENT, - "Expected USERINFOSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(user, "owner"), "Expected \"owner\", got \"%s\"\n", user); - ok(!lstrcmpA(org, ""), "Expected empty string, got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(usersz == 5, "Expected 5, got %d\n", usersz); - ok(orgsz == 0, "Expected 0, got %d\n", orgsz); - ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", serialsz); - - res = RegSetValueExA(props, "RegCompany", 0, REG_SZ, (LPBYTE)"company", 8); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* RegCompany value exists */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, user, &usersz, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_ABSENT, - "Expected USERINFOSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(user, "owner"), "Expected \"owner\", got \"%s\"\n", user); - ok(!lstrcmpA(org, "company"), "Expected \"company\", got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(usersz == 5, "Expected 5, got %d\n", usersz); - ok(orgsz == 7, "Expected 7, got %d\n", orgsz); - ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", serialsz); - - res = RegSetValueExA(props, "ProductID", 0, REG_SZ, (LPBYTE)"ID", 3); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductID value exists */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, user, &usersz, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_PRESENT, - "Expected USERINFOSTATE_PRESENT, got %d\n", state); - ok(!lstrcmpA(user, "owner"), "Expected \"owner\", got \"%s\"\n", user); - ok(!lstrcmpA(org, "company"), "Expected \"company\", got \"%s\"\n", org); - ok(!lstrcmpA(serial, "ID"), "Expected \"ID\", got \"%s\"\n", serial); - ok(usersz == 5, "Expected 5, got %d\n", usersz); - ok(orgsz == 7, "Expected 7, got %d\n", orgsz); - ok(serialsz == 2, "Expected 2, got %d\n", serialsz); - - RegDeleteValueA(props, "ProductID"); - RegDeleteValueA(props, "RegCompany"); - RegDeleteValueA(props, "RegOwner"); - RegDeleteKeyA(props, ""); - RegCloseKey(props); - RegDeleteKeyA(userprod, ""); - RegCloseKey(userprod); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - - /* MSIINSTALLCONTEXT_MACHINE */ - - /* create local system product key */ - lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* product key exists */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, user, &usersz, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_ABSENT, - "Expected USERINFOSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user); - ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(usersz == MAX_PATH, "Expected MAX_PATH, got %d\n", usersz); - ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz); - ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\UserData\\S-1-5-18"); - lstrcatA(keypath, "\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &userprod); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = RegCreateKeyA(userprod, "InstallProperties", &props); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallProperties key exists */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, user, &usersz, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_ABSENT, - "Expected USERINFOSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(user, "apple"), "Expected user to be unchanged, got \"%s\"\n", user); - ok(!lstrcmpA(org, "orange"), "Expected org to be unchanged, got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(usersz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", usersz); - ok(orgsz == MAX_PATH, "Expected MAX_PATH, got %d\n", orgsz); - ok(serialsz == MAX_PATH, "Expected MAX_PATH, got %d\n", serialsz); - - /* RegOwner doesn't exist, lpUserNameBuf and pcchUserNameBuf are NULL */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, NULL, NULL, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_ABSENT, - "Expected USERINFOSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(org, ""), "Expected empty string, got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(orgsz == 0, "Expected 0, got %d\n", orgsz); - ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", serialsz); - - /* RegOwner, RegCompany don't exist, out params are NULL */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, NULL, NULL, NULL, NULL, serial, &serialsz); - ok(state == USERINFOSTATE_ABSENT, - "Expected USERINFOSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", serialsz); - - res = RegSetValueExA(props, "RegOwner", 0, REG_SZ, (LPBYTE)"owner", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* RegOwner value exists */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, user, &usersz, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_ABSENT, - "Expected USERINFOSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(user, "owner"), "Expected \"owner\", got \"%s\"\n", user); - ok(!lstrcmpA(org, ""), "Expected empty string, got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(usersz == 5, "Expected 5, got %d\n", usersz); - ok(orgsz == 0, "Expected 0, got %d\n", orgsz); - ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", serialsz); - - res = RegSetValueExA(props, "RegCompany", 0, REG_SZ, (LPBYTE)"company", 8); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* RegCompany value exists */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, user, &usersz, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_ABSENT, - "Expected USERINFOSTATE_ABSENT, got %d\n", state); - ok(!lstrcmpA(user, "owner"), "Expected \"owner\", got \"%s\"\n", user); - ok(!lstrcmpA(org, "company"), "Expected \"company\", got \"%s\"\n", org); - ok(!lstrcmpA(serial, "banana"), "Expected serial to be unchanged, got \"%s\"\n", serial); - ok(usersz == 5, "Expected 5, got %d\n", usersz); - ok(orgsz == 7, "Expected 7, got %d\n", orgsz); - ok(serialsz == MAX_PATH - 1, "Expected MAX_PATH - 1, got %d\n", serialsz); - - res = RegSetValueExA(props, "ProductID", 0, REG_SZ, (LPBYTE)"ID", 3); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ProductID value exists */ - INIT_USERINFO(); - state = MsiGetUserInfoA(prodcode, user, &usersz, org, &orgsz, serial, &serialsz); - ok(state == USERINFOSTATE_PRESENT, - "Expected USERINFOSTATE_PRESENT, got %d\n", state); - ok(!lstrcmpA(user, "owner"), "Expected \"owner\", got \"%s\"\n", user); - ok(!lstrcmpA(org, "company"), "Expected \"company\", got \"%s\"\n", org); - ok(!lstrcmpA(serial, "ID"), "Expected \"ID\", got \"%s\"\n", serial); - ok(usersz == 5, "Expected 5, got %d\n", usersz); - ok(orgsz == 7, "Expected 7, got %d\n", orgsz); - ok(serialsz == 2, "Expected 2, got %d\n", serialsz); - - RegDeleteValueA(props, "ProductID"); - RegDeleteValueA(props, "RegCompany"); - RegDeleteValueA(props, "RegOwner"); - RegDeleteKeyA(props, ""); - RegCloseKey(props); - RegDeleteKeyA(userprod, ""); - RegCloseKey(userprod); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - LocalFree(usersid); -} - -static void test_MsiOpenProduct(void) -{ - MSIHANDLE hprod, hdb; - CHAR val[MAX_PATH]; - CHAR path[MAX_PATH]; - CHAR keypath[MAX_PATH*2]; - CHAR prodcode[MAX_PATH]; - CHAR prod_squashed[MAX_PATH]; - HKEY prodkey, userkey, props; - LPSTR usersid; - DWORD size; - LONG res; - UINT r; - - GetCurrentDirectoryA(MAX_PATH, path); - lstrcatA(path, "\\"); - - create_test_guid(prodcode, prod_squashed); - get_user_sid(&usersid); - - hdb = create_package_db(prodcode); - MsiCloseHandle(hdb); - - /* NULL szProduct */ - hprod = 0xdeadbeef; - r = MsiOpenProductA(NULL, &hprod); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(hprod == 0xdeadbeef, "Expected hprod to be unchanged\n"); - - /* empty szProduct */ - hprod = 0xdeadbeef; - r = MsiOpenProductA("", &hprod); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(hprod == 0xdeadbeef, "Expected hprod to be unchanged\n"); - - /* garbage szProduct */ - hprod = 0xdeadbeef; - r = MsiOpenProductA("garbage", &hprod); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(hprod == 0xdeadbeef, "Expected hprod to be unchanged\n"); - - /* guid without brackets */ - hprod = 0xdeadbeef; - r = MsiOpenProductA("6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D", &hprod); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(hprod == 0xdeadbeef, "Expected hprod to be unchanged\n"); - - /* guid with brackets */ - hprod = 0xdeadbeef; - r = MsiOpenProductA("{6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D}", &hprod); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(hprod == 0xdeadbeef, "Expected hprod to be unchanged\n"); - - /* same length as guid, but random */ - hprod = 0xdeadbeef; - r = MsiOpenProductA("A938G02JF-2NF3N93-VN3-2NNF-3KGKALDNF93", &hprod); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(hprod == 0xdeadbeef, "Expected hprod to be unchanged\n"); - - /* hProduct is NULL */ - hprod = 0xdeadbeef; - r = MsiOpenProductA(prodcode, NULL); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(hprod == 0xdeadbeef, "Expected hprod to be unchanged\n"); - - /* MSIINSTALLCONTEXT_USERMANAGED */ - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\Managed\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* managed product key exists */ - hprod = 0xdeadbeef; - r = MsiOpenProductA(prodcode, &hprod); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(hprod == 0xdeadbeef, "Expected hprod to be unchanged\n"); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user product key exists */ - hprod = 0xdeadbeef; - r = MsiOpenProductA(prodcode, &hprod); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(hprod == 0xdeadbeef, "Expected hprod to be unchanged\n"); - - res = RegCreateKeyA(userkey, "InstallProperties", &props); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallProperties key exists */ - hprod = 0xdeadbeef; - r = MsiOpenProductA(prodcode, &hprod); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(hprod == 0xdeadbeef, "Expected hprod to be unchanged\n"); - - lstrcpyA(val, path); - lstrcatA(val, "\\winetest.msi"); - res = RegSetValueExA(props, "ManagedLocalPackage", 0, REG_SZ, - (const BYTE *)val, lstrlenA(val) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ManagedLocalPackage value exists */ - hprod = 0xdeadbeef; - r = MsiOpenProductA(prodcode, &hprod); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(hprod != 0 && hprod != 0xdeadbeef, "Expected a valid product handle\n"); - - size = MAX_PATH; - r = MsiGetPropertyA(hprod, "ProductCode", val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, prodcode), "Expected \"%s\", got \"%s\"\n", prodcode, val); - ok(size == lstrlenA(prodcode), "Expected %d, got %d\n", lstrlenA(prodcode), size); - - MsiCloseHandle(hprod); - - RegDeleteValueA(props, "ManagedLocalPackage"); - RegDeleteKeyA(props, ""); - RegCloseKey(props); - RegDeleteKeyA(userkey, ""); - RegCloseKey(userkey); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - - /* MSIINSTALLCONTEXT_USERUNMANAGED */ - - lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* unmanaged product key exists */ - hprod = 0xdeadbeef; - r = MsiOpenProductA(prodcode, &hprod); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(hprod == 0xdeadbeef, "Expected hprod to be unchanged\n"); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user product key exists */ - hprod = 0xdeadbeef; - r = MsiOpenProductA(prodcode, &hprod); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(hprod == 0xdeadbeef, "Expected hprod to be unchanged\n"); - - res = RegCreateKeyA(userkey, "InstallProperties", &props); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallProperties key exists */ - hprod = 0xdeadbeef; - r = MsiOpenProductA(prodcode, &hprod); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(hprod == 0xdeadbeef, "Expected hprod to be unchanged\n"); - - lstrcpyA(val, path); - lstrcatA(val, "\\winetest.msi"); - res = RegSetValueExA(props, "LocalPackage", 0, REG_SZ, - (const BYTE *)val, lstrlenA(val) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* LocalPackage value exists */ - hprod = 0xdeadbeef; - r = MsiOpenProductA(prodcode, &hprod); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(hprod != 0 && hprod != 0xdeadbeef, "Expected a valid product handle\n"); - - size = MAX_PATH; - r = MsiGetPropertyA(hprod, "ProductCode", val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, prodcode), "Expected \"%s\", got \"%s\"\n", prodcode, val); - ok(size == lstrlenA(prodcode), "Expected %d, got %d\n", lstrlenA(prodcode), size); - - MsiCloseHandle(hprod); - - RegDeleteValueA(props, "LocalPackage"); - RegDeleteKeyA(props, ""); - RegCloseKey(props); - RegDeleteKeyA(userkey, ""); - RegCloseKey(userkey); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - - /* MSIINSTALLCONTEXT_MACHINE */ - - lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* managed product key exists */ - hprod = 0xdeadbeef; - r = MsiOpenProductA(prodcode, &hprod); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(hprod == 0xdeadbeef, "Expected hprod to be unchanged\n"); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\UserData\\S-1-5-18\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user product key exists */ - hprod = 0xdeadbeef; - r = MsiOpenProductA(prodcode, &hprod); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(hprod == 0xdeadbeef, "Expected hprod to be unchanged\n"); - - res = RegCreateKeyA(userkey, "InstallProperties", &props); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallProperties key exists */ - hprod = 0xdeadbeef; - r = MsiOpenProductA(prodcode, &hprod); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(hprod == 0xdeadbeef, "Expected hprod to be unchanged\n"); - - lstrcpyA(val, path); - lstrcatA(val, "\\winetest.msi"); - res = RegSetValueExA(props, "LocalPackage", 0, REG_SZ, - (const BYTE *)val, lstrlenA(val) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* LocalPackage value exists */ - hprod = 0xdeadbeef; - r = MsiOpenProductA(prodcode, &hprod); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(hprod != 0 && hprod != 0xdeadbeef, "Expected a valid product handle\n"); - - size = MAX_PATH; - r = MsiGetPropertyA(hprod, "ProductCode", val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, prodcode), "Expected \"%s\", got \"%s\"\n", prodcode, val); - ok(size == lstrlenA(prodcode), "Expected %d, got %d\n", lstrlenA(prodcode), size); - - MsiCloseHandle(hprod); - - res = RegSetValueExA(props, "LocalPackage", 0, REG_SZ, - (const BYTE *)"winetest.msi", 13); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* LocalPackage has just the package name */ - hprod = 0xdeadbeef; - r = MsiOpenProductA(prodcode, &hprod); - ok(r == ERROR_INSTALL_PACKAGE_OPEN_FAILED || r == ERROR_SUCCESS, - "Expected ERROR_INSTALL_PACKAGE_OPEN_FAILED or ERROR_SUCCESS, got %d\n", r); - if (r == ERROR_SUCCESS) - MsiCloseHandle(hprod); - else - ok(hprod == 0xdeadbeef, "Expected hprod to be unchanged\n"); - - lstrcpyA(val, path); - lstrcatA(val, "\\winetest.msi"); - res = RegSetValueExA(props, "LocalPackage", 0, REG_SZ, - (const BYTE *)val, lstrlenA(val) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - DeleteFileA(msifile); - - /* local package does not exist */ - hprod = 0xdeadbeef; - r = MsiOpenProductA(prodcode, &hprod); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(hprod == 0xdeadbeef, "Expected hprod to be unchanged\n"); - - RegDeleteValueA(props, "LocalPackage"); - RegDeleteKeyA(props, ""); - RegCloseKey(props); - RegDeleteKeyA(userkey, ""); - RegCloseKey(userkey); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - - DeleteFileA(msifile); - LocalFree(usersid); -} - -static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid) -{ - MSIINSTALLCONTEXT context; - CHAR keypath[MAX_PATH], patch[MAX_PATH]; - CHAR patch_squashed[MAX_PATH], patchcode[MAX_PATH]; - CHAR targetsid[MAX_PATH], targetprod[MAX_PATH]; - CHAR prodcode[MAX_PATH], prod_squashed[MAX_PATH]; - HKEY prodkey, patches, udprod, udpatch, hpatch; - DWORD size, data; - LONG res; - UINT r; - - create_test_guid(prodcode, prod_squashed); - create_test_guid(patch, patch_squashed); - - /* MSIPATCHSTATE_APPLIED */ - - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\"); - lstrcatA(keypath, expectedsid); - lstrcatA(keypath, "\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* managed product key exists */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegCreateKeyA(prodkey, "Patches", &patches); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* patches key exists */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(patches, "Patches", 0, REG_SZ, - (const BYTE *)patch_squashed, - lstrlenA(patch_squashed) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches value exists, is not REG_MULTI_SZ */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(patches, "Patches", 0, REG_MULTI_SZ, - (const BYTE *)"a\0b\0c\0\0", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches value exists, is not a squashed guid */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - patch_squashed[lstrlenA(patch_squashed) + 1] = '\0'; - res = RegSetValueExA(patches, "Patches", 0, REG_MULTI_SZ, - (const BYTE *)patch_squashed, - lstrlenA(patch_squashed) + 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches value exists */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(patches, patch_squashed, 0, REG_SZ, - (const BYTE *)"whatever", 9); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* patch squashed value exists */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patchcode, patch), - "Expected \"%s\", got \"%s\"\n", patch, patchcode); - ok(!lstrcmpA(targetprod, prodcode), - "Expected \"%s\", got \"%s\"\n", prodcode, targetprod); - ok(context == MSIINSTALLCONTEXT_USERMANAGED, - "Expected MSIINSTALLCONTEXT_USERMANAGED, got %d\n", context); - ok(!lstrcmpA(targetsid, expectedsid), - "Expected \"%s\", got \"%s\"\n", expectedsid, targetsid); - ok(size == lstrlenA(expectedsid), - "Expected %d, got %d\n", lstrlenA(expectedsid), size); - - /* increase the index */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSIPATCHSTATE_APPLIED, 1, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* increase again */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSIPATCHSTATE_APPLIED, 2, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* szPatchCode is NULL */ - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSIPATCHSTATE_APPLIED, 0, NULL, targetprod, - &context, targetsid, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(targetprod, prodcode), - "Expected \"%s\", got \"%s\"\n", prodcode, targetprod); - ok(context == MSIINSTALLCONTEXT_USERMANAGED, - "Expected MSIINSTALLCONTEXT_USERMANAGED, got %d\n", context); - ok(!lstrcmpA(targetsid, expectedsid), - "Expected \"%s\", got \"%s\"\n", expectedsid, targetsid); - ok(size == lstrlenA(expectedsid), - "Expected %d, got %d\n", lstrlenA(expectedsid), size); - - /* szTargetProductCode is NULL */ - lstrcpyA(patchcode, "apple"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSIPATCHSTATE_APPLIED, 0, patchcode, NULL, - &context, targetsid, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patchcode, patch), - "Expected \"%s\", got \"%s\"\n", patch, patchcode); - ok(context == MSIINSTALLCONTEXT_USERMANAGED, - "Expected MSIINSTALLCONTEXT_USERMANAGED, got %d\n", context); - ok(!lstrcmpA(targetsid, expectedsid), - "Expected \"%s\", got \"%s\"\n", expectedsid, targetsid); - ok(size == lstrlenA(expectedsid), - "Expected %d, got %d\n", lstrlenA(expectedsid), size); - - /* pdwTargetProductContext is NULL */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - NULL, targetsid, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patchcode, patch), - "Expected \"%s\", got \"%s\"\n", patch, patchcode); - ok(!lstrcmpA(targetprod, prodcode), - "Expected \"%s\", got \"%s\"\n", prodcode, targetprod); - ok(!lstrcmpA(targetsid, expectedsid), - "Expected \"%s\", got \"%s\"\n", expectedsid, targetsid); - ok(size == lstrlenA(expectedsid), - "Expected %d, got %d\n", lstrlenA(expectedsid), size); - - /* szTargetUserSid is NULL */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, NULL, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patchcode, patch), - "Expected \"%s\", got \"%s\"\n", patch, patchcode); - ok(!lstrcmpA(targetprod, prodcode), - "Expected \"%s\", got \"%s\"\n", prodcode, targetprod); - ok(context == MSIINSTALLCONTEXT_USERMANAGED, - "Expected MSIINSTALLCONTEXT_USERMANAGED, got %d\n", context); - ok(size == lstrlenA(expectedsid) * sizeof(WCHAR), - "Expected %d*sizeof(WCHAR), got %d\n", lstrlenA(expectedsid), size); - - /* pcchTargetUserSid is exactly the length of szTargetUserSid */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = lstrlenA(expectedsid); - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r); - ok(!lstrcmpA(patchcode, patch), - "Expected \"%s\", got \"%s\"\n", patch, patchcode); - ok(!lstrcmpA(targetprod, prodcode), - "Expected \"%s\", got \"%s\"\n", prodcode, targetprod); - ok(context == MSIINSTALLCONTEXT_USERMANAGED, - "Expected MSIINSTALLCONTEXT_USERMANAGED, got %d\n", context); - ok(!strncmp(targetsid, expectedsid, lstrlenA(expectedsid) - 1), - "Expected \"%s\", got \"%s\"\n", expectedsid, targetsid); - ok(size == lstrlenA(expectedsid) * sizeof(WCHAR), - "Expected %d*sizeof(WCHAR), got %d\n", lstrlenA(expectedsid), size); - - /* pcchTargetUserSid has enough room for NULL terminator */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = lstrlenA(expectedsid) + 1; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patchcode, patch), - "Expected \"%s\", got \"%s\"\n", patch, patchcode); - ok(!lstrcmpA(targetprod, prodcode), - "Expected \"%s\", got \"%s\"\n", prodcode, targetprod); - ok(context == MSIINSTALLCONTEXT_USERMANAGED, - "Expected MSIINSTALLCONTEXT_USERMANAGED, got %d\n", context); - ok(!lstrcmpA(targetsid, expectedsid), - "Expected \"%s\", got \"%s\"\n", expectedsid, targetsid); - ok(size == lstrlenA(expectedsid), - "Expected %d, got %d\n", lstrlenA(expectedsid), size); - - /* both szTargetuserSid and pcchTargetUserSid are NULL */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, NULL, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patchcode, patch), - "Expected \"%s\", got \"%s\"\n", patch, patchcode); - ok(!lstrcmpA(targetprod, prodcode), - "Expected \"%s\", got \"%s\"\n", prodcode, targetprod); - ok(context == MSIINSTALLCONTEXT_USERMANAGED, - "Expected MSIINSTALLCONTEXT_USERMANAGED, got %d\n", context); - - /* MSIPATCHSTATE_SUPERSEDED */ - - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSIPATCHSTATE_SUPERSEDED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, expectedsid); - lstrcatA(keypath, "\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &udprod); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* UserData product key exists */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSIPATCHSTATE_SUPERSEDED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegCreateKeyA(udprod, "Patches", &udpatch); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* UserData patches key exists */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSIPATCHSTATE_SUPERSEDED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegCreateKeyA(udpatch, patch_squashed, &hpatch); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* specific UserData patch key exists */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSIPATCHSTATE_SUPERSEDED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - data = MSIPATCHSTATE_SUPERSEDED; - res = RegSetValueExA(hpatch, "State", 0, REG_DWORD, - (const BYTE *)&data, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* State value exists */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSIPATCHSTATE_SUPERSEDED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patchcode, patch), - "Expected \"%s\", got \"%s\"\n", patch, patchcode); - ok(!lstrcmpA(targetprod, prodcode), - "Expected \"%s\", got \"%s\"\n", prodcode, targetprod); - ok(context == MSIINSTALLCONTEXT_USERMANAGED, - "Expected MSIINSTALLCONTEXT_USERMANAGED, got %d\n", context); - ok(!lstrcmpA(targetsid, expectedsid), - "Expected \"%s\", got \"%s\"\n", expectedsid, targetsid); - ok(size == lstrlenA(expectedsid), - "Expected %d, got %d\n", lstrlenA(expectedsid), size); - - /* MSIPATCHSTATE_OBSOLETED */ - - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSIPATCHSTATE_OBSOLETED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - data = MSIPATCHSTATE_OBSOLETED; - res = RegSetValueExA(hpatch, "State", 0, REG_DWORD, - (const BYTE *)&data, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* State value is obsoleted */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSIPATCHSTATE_OBSOLETED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patchcode, patch), - "Expected \"%s\", got \"%s\"\n", patch, patchcode); - ok(!lstrcmpA(targetprod, prodcode), - "Expected \"%s\", got \"%s\"\n", prodcode, targetprod); - ok(context == MSIINSTALLCONTEXT_USERMANAGED, - "Expected MSIINSTALLCONTEXT_USERMANAGED, got %d\n", context); - ok(!lstrcmpA(targetsid, expectedsid), - "Expected \"%s\", got \"%s\"\n", expectedsid, targetsid); - ok(size == lstrlenA(expectedsid), - "Expected %d, got %d\n", lstrlenA(expectedsid), size); - - /* MSIPATCHSTATE_REGISTERED */ - /* FIXME */ - - /* MSIPATCHSTATE_ALL */ - - /* 1st */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSIPATCHSTATE_ALL, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patchcode, patch), - "Expected \"%s\", got \"%s\"\n", patch, patchcode); - ok(!lstrcmpA(targetprod, prodcode), - "Expected \"%s\", got \"%s\"\n", prodcode, targetprod); - ok(context == MSIINSTALLCONTEXT_USERMANAGED, - "Expected MSIINSTALLCONTEXT_USERMANAGED, got %d\n", context); - ok(!lstrcmpA(targetsid, expectedsid), - "Expected \"%s\", got \"%s\"\n", expectedsid, targetsid); - ok(size == lstrlenA(expectedsid), - "Expected %d, got %d\n", lstrlenA(expectedsid), size); - - /* same patch in multiple places, only one is enumerated */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSIPATCHSTATE_ALL, 1, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - RegDeleteValueA(hpatch, "State"); - RegDeleteKeyA(hpatch, ""); - RegCloseKey(hpatch); - RegDeleteKeyA(udpatch, ""); - RegCloseKey(udpatch); - RegDeleteKeyA(udprod, ""); - RegCloseKey(udprod); - RegDeleteValueA(patches, "Patches"); - RegDeleteKeyA(patches, ""); - RegCloseKey(patches); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); -} - -static void test_MsiEnumPatchesEx_userunmanaged(LPCSTR usersid, LPCSTR expectedsid) -{ - MSIINSTALLCONTEXT context; - CHAR keypath[MAX_PATH], patch[MAX_PATH]; - CHAR patch_squashed[MAX_PATH], patchcode[MAX_PATH]; - CHAR targetsid[MAX_PATH], targetprod[MAX_PATH]; - CHAR prodcode[MAX_PATH], prod_squashed[MAX_PATH]; - HKEY prodkey, patches, udprod, udpatch; - HKEY userkey, hpatch; - DWORD size, data; - LONG res; - UINT r; - - create_test_guid(prodcode, prod_squashed); - create_test_guid(patch, patch_squashed); - - /* MSIPATCHSTATE_APPLIED */ - - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* current user product key exists */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegCreateKeyA(prodkey, "Patches", &patches); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches key exists */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(patches, "Patches", 0, REG_SZ, - (const BYTE *)patch_squashed, - lstrlenA(patch_squashed) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches value exists, is not REG_MULTI_SZ */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(patches, "Patches", 0, REG_MULTI_SZ, - (const BYTE *)"a\0b\0c\0\0", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches value exists, is not a squashed guid */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(patches, "Patches", 0, REG_MULTI_SZ, - (const BYTE *)patch_squashed, - lstrlenA(patch_squashed) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches value exists */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS || - broken(r == ERROR_BAD_CONFIGURATION), /* Windows Installer 3.0 */ - "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(patches, patch_squashed, 0, REG_SZ, - (const BYTE *)"whatever", 9); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* patch code value exists */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS || - broken(r == ERROR_BAD_CONFIGURATION), /* Windows Installer 3.0 */ - "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, expectedsid); - lstrcatA(keypath, "\\Patches\\"); - lstrcatA(keypath, patch_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* userdata patch key exists */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patchcode, patch), - "Expected \"%s\", got \"%s\"\n", patch, patchcode); - ok(!lstrcmpA(targetprod, prodcode), - "Expected \"%s\", got \"%s\"\n", prodcode, targetprod); - ok(context == MSIINSTALLCONTEXT_USERUNMANAGED, - "Expected MSIINSTALLCONTEXT_USERUNMANAGED, got %d\n", context); - ok(!lstrcmpA(targetsid, expectedsid), - "Expected \"%s\", got \"%s\"\n", expectedsid, targetsid); - ok(size == lstrlenA(expectedsid), - "Expected %d, got %d\n", lstrlenA(expectedsid), size); - - /* MSIPATCHSTATE_SUPERSEDED */ - - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSIPATCHSTATE_SUPERSEDED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, expectedsid); - lstrcatA(keypath, "\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &udprod); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* UserData product key exists */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSIPATCHSTATE_SUPERSEDED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegCreateKeyA(udprod, "Patches", &udpatch); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* UserData patches key exists */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSIPATCHSTATE_SUPERSEDED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegCreateKeyA(udpatch, patch_squashed, &hpatch); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* specific UserData patch key exists */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSIPATCHSTATE_SUPERSEDED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - data = MSIPATCHSTATE_SUPERSEDED; - res = RegSetValueExA(hpatch, "State", 0, REG_DWORD, - (const BYTE *)&data, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* State value exists */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSIPATCHSTATE_SUPERSEDED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patchcode, patch), - "Expected \"%s\", got \"%s\"\n", patch, patchcode); - ok(!lstrcmpA(targetprod, prodcode), - "Expected \"%s\", got \"%s\"\n", prodcode, targetprod); - ok(context == MSIINSTALLCONTEXT_USERUNMANAGED, - "Expected MSIINSTALLCONTEXT_USERUNMANAGED, got %d\n", context); - ok(!lstrcmpA(targetsid, expectedsid), - "Expected \"%s\", got \"%s\"\n", expectedsid, targetsid); - ok(size == lstrlenA(expectedsid), - "Expected %d, got %d\n", lstrlenA(expectedsid), size); - - /* MSIPATCHSTATE_OBSOLETED */ - - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSIPATCHSTATE_OBSOLETED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - data = MSIPATCHSTATE_OBSOLETED; - res = RegSetValueExA(hpatch, "State", 0, REG_DWORD, - (const BYTE *)&data, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* State value is obsoleted */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSIPATCHSTATE_OBSOLETED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patchcode, patch), - "Expected \"%s\", got \"%s\"\n", patch, patchcode); - ok(!lstrcmpA(targetprod, prodcode), - "Expected \"%s\", got \"%s\"\n", prodcode, targetprod); - ok(context == MSIINSTALLCONTEXT_USERUNMANAGED, - "Expected MSIINSTALLCONTEXT_USERUNMANAGED, got %d\n", context); - ok(!lstrcmpA(targetsid, expectedsid), - "Expected \"%s\", got \"%s\"\n", expectedsid, targetsid); - ok(size == lstrlenA(expectedsid), - "Expected %d, got %d\n", lstrlenA(expectedsid), size); - - /* MSIPATCHSTATE_REGISTERED */ - /* FIXME */ - - /* MSIPATCHSTATE_ALL */ - - /* 1st */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSIPATCHSTATE_ALL, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patchcode, patch), - "Expected \"%s\", got \"%s\"\n", patch, patchcode); - ok(!lstrcmpA(targetprod, prodcode), - "Expected \"%s\", got \"%s\"\n", prodcode, targetprod); - ok(context == MSIINSTALLCONTEXT_USERUNMANAGED, - "Expected MSIINSTALLCONTEXT_USERUNMANAGED, got %d\n", context); - ok(!lstrcmpA(targetsid, expectedsid), - "Expected \"%s\", got \"%s\"\n", expectedsid, targetsid); - ok(size == lstrlenA(expectedsid), - "Expected %d, got %d\n", lstrlenA(expectedsid), size); - - /* same patch in multiple places, only one is enumerated */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSIPATCHSTATE_ALL, 1, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - RegDeleteValueA(hpatch, "State"); - RegDeleteKeyA(hpatch, ""); - RegCloseKey(hpatch); - RegDeleteKeyA(udpatch, ""); - RegCloseKey(udpatch); - RegDeleteKeyA(udprod, ""); - RegCloseKey(udprod); - RegDeleteKeyA(userkey, ""); - RegCloseKey(userkey); - RegDeleteValueA(patches, patch_squashed); - RegDeleteValueA(patches, "Patches"); - RegDeleteKeyA(patches, ""); - RegCloseKey(patches); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); -} - -static void test_MsiEnumPatchesEx_machine(void) -{ - CHAR keypath[MAX_PATH], patch[MAX_PATH]; - CHAR patch_squashed[MAX_PATH], patchcode[MAX_PATH]; - CHAR targetsid[MAX_PATH], targetprod[MAX_PATH]; - CHAR prodcode[MAX_PATH], prod_squashed[MAX_PATH]; - HKEY prodkey, patches, udprod, udpatch; - HKEY hpatch; - MSIINSTALLCONTEXT context; - DWORD size, data; - LONG res; - UINT r; - - create_test_guid(prodcode, prod_squashed); - create_test_guid(patch, patch_squashed); - - /* MSIPATCHSTATE_APPLIED */ - - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local product key exists */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegCreateKeyA(prodkey, "Patches", &patches); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches key exists */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(patches, "Patches", 0, REG_SZ, - (const BYTE *)patch_squashed, - lstrlenA(patch_squashed) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches value exists, is not REG_MULTI_SZ */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(patches, "Patches", 0, REG_MULTI_SZ, - (const BYTE *)"a\0b\0c\0\0", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches value exists, is not a squashed guid */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - patch_squashed[lstrlenA(patch_squashed) + 1] = '\0'; - res = RegSetValueExA(patches, "Patches", 0, REG_MULTI_SZ, - (const BYTE *)patch_squashed, - lstrlenA(patch_squashed) + 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches value exists */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(patches, patch_squashed, 0, REG_SZ, - (const BYTE *)"whatever", 9); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* patch code value exists */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patchcode, patch), - "Expected \"%s\", got \"%s\"\n", patch, patchcode); - ok(!lstrcmpA(targetprod, prodcode), - "Expected \"%s\", got \"%s\"\n", prodcode, targetprod); - ok(context == MSIINSTALLCONTEXT_MACHINE, - "Expected MSIINSTALLCONTEXT_MACHINE, got %d\n", context); - ok(!lstrcmpA(targetsid, ""), "Expected \"\", got \"%s\"\n", targetsid); - ok(size == 0, "Expected 0, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\UserData\\S-1-5-18\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &udprod); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local UserData product key exists */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patchcode, patch), - "Expected \"%s\", got \"%s\"\n", patch, patchcode); - ok(!lstrcmpA(targetprod, prodcode), - "Expected \"%s\", got \"%s\"\n", prodcode, targetprod); - ok(context == MSIINSTALLCONTEXT_MACHINE, - "Expected MSIINSTALLCONTEXT_MACHINE, got %d\n", context); - ok(!lstrcmpA(targetsid, ""), - "Expected \"\", got \"%s\"\n", targetsid); - ok(size == 0, "Expected 0, got %d\n", size); - - res = RegCreateKeyA(udprod, "Patches", &udpatch); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local UserData Patches key exists */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patchcode, patch), - "Expected \"%s\", got \"%s\"\n", patch, patchcode); - ok(!lstrcmpA(targetprod, prodcode), - "Expected \"%s\", got \"%s\"\n", prodcode, targetprod); - ok(context == MSIINSTALLCONTEXT_MACHINE, - "Expected MSIINSTALLCONTEXT_MACHINE, got %d\n", context); - ok(!lstrcmpA(targetsid, ""), - "Expected \"\", got \"%s\"\n", targetsid); - ok(size == 0, "Expected 0, got %d\n", size); - - res = RegCreateKeyA(udpatch, patch_squashed, &hpatch); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local UserData Product patch key exists */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - data = MSIPATCHSTATE_APPLIED; - res = RegSetValueExA(hpatch, "State", 0, REG_DWORD, - (const BYTE *)&data, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* State value exists */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, - MSIPATCHSTATE_APPLIED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patchcode, patch), - "Expected \"%s\", got \"%s\"\n", patch, patchcode); - ok(!lstrcmpA(targetprod, prodcode), - "Expected \"%s\", got \"%s\"\n", prodcode, targetprod); - ok(context == MSIINSTALLCONTEXT_MACHINE, - "Expected MSIINSTALLCONTEXT_MACHINE, got %d\n", context); - ok(!lstrcmpA(targetsid, ""), - "Expected \"\", got \"%s\"\n", targetsid); - ok(size == 0, "Expected 0, got %d\n", size); - - /* MSIPATCHSTATE_SUPERSEDED */ - - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, - MSIPATCHSTATE_SUPERSEDED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - data = MSIPATCHSTATE_SUPERSEDED; - res = RegSetValueExA(hpatch, "State", 0, REG_DWORD, - (const BYTE *)&data, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* State value is MSIPATCHSTATE_SUPERSEDED */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, - MSIPATCHSTATE_SUPERSEDED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patchcode, patch), - "Expected \"%s\", got \"%s\"\n", patch, patchcode); - ok(!lstrcmpA(targetprod, prodcode), - "Expected \"%s\", got \"%s\"\n", prodcode, targetprod); - ok(context == MSIINSTALLCONTEXT_MACHINE, - "Expected MSIINSTALLCONTEXT_MACHINE, got %d\n", context); - ok(!lstrcmpA(targetsid, ""), "Expected \"\", got \"%s\"\n", targetsid); - ok(size == 0, "Expected 0, got %d\n", size); - - /* MSIPATCHSTATE_OBSOLETED */ - - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, - MSIPATCHSTATE_OBSOLETED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - data = MSIPATCHSTATE_OBSOLETED; - res = RegSetValueExA(hpatch, "State", 0, REG_DWORD, - (const BYTE *)&data, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* State value is obsoleted */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, - MSIPATCHSTATE_OBSOLETED, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patchcode, patch), - "Expected \"%s\", got \"%s\"\n", patch, patchcode); - ok(!lstrcmpA(targetprod, prodcode), - "Expected \"%s\", got \"%s\"\n", prodcode, targetprod); - ok(context == MSIINSTALLCONTEXT_MACHINE, - "Expected MSIINSTALLCONTEXT_MACHINE, got %d\n", context); - ok(!lstrcmpA(targetsid, ""), "Expected \"\", got \"%s\"\n", targetsid); - ok(size == 0, "Expected 0, got %d\n", size); - - /* MSIPATCHSTATE_REGISTERED */ - /* FIXME */ - - /* MSIPATCHSTATE_ALL */ - - /* 1st */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, - MSIPATCHSTATE_ALL, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patchcode, patch), - "Expected \"%s\", got \"%s\"\n", patch, patchcode); - ok(!lstrcmpA(targetprod, prodcode), - "Expected \"%s\", got \"%s\"\n", prodcode, targetprod); - ok(context == MSIINSTALLCONTEXT_MACHINE, - "Expected MSIINSTALLCONTEXT_MACHINE, got %d\n", context); - ok(!lstrcmpA(targetsid, ""), "Expected \"\", got \"%s\"\n", targetsid); - ok(size == 0, "Expected 0, got %d\n", size); - - /* same patch in multiple places, only one is enumerated */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, - MSIPATCHSTATE_ALL, 1, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - RegDeleteValueA(patches, patch_squashed); - RegDeleteValueA(patches, "Patches"); - RegDeleteKeyA(patches, ""); - RegCloseKey(patches); - RegDeleteValueA(hpatch, "State"); - RegDeleteKeyA(hpatch, ""); - RegCloseKey(hpatch); - RegDeleteKeyA(udpatch, ""); - RegCloseKey(udpatch); - RegDeleteKeyA(udprod, ""); - RegCloseKey(udprod); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); -} - -static void test_MsiEnumPatchesEx(void) -{ - CHAR targetsid[MAX_PATH], targetprod[MAX_PATH]; - CHAR prodcode[MAX_PATH], prod_squashed[MAX_PATH]; - CHAR patchcode[MAX_PATH]; - MSIINSTALLCONTEXT context; - LPSTR usersid; - DWORD size; - UINT r; - - if (!pMsiEnumPatchesExA) - { - win_skip("MsiEnumPatchesExA not implemented\n"); - return; - } - - create_test_guid(prodcode, prod_squashed); - get_user_sid(&usersid); - - /* empty szProductCode */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA("", usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSIPATCHSTATE_ALL, 0, patchcode, targetprod, &context, - targetsid, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* garbage szProductCode */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA("garbage", usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSIPATCHSTATE_ALL, 0, patchcode, targetprod, &context, - targetsid, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* guid without brackets */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA("6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D", usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, MSIPATCHSTATE_ALL, - 0, patchcode, targetprod, &context, - targetsid, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* guid with brackets */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA("{6700E8CF-95AB-4D9C-BC2C-15840DDA7A5D}", usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, MSIPATCHSTATE_ALL, - 0, patchcode, targetprod, &context, - targetsid, &size); - ok(r == ERROR_NO_MORE_ITEMS, - "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* szUserSid is S-1-5-18 */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, "S-1-5-18", - MSIINSTALLCONTEXT_USERUNMANAGED, MSIPATCHSTATE_ALL, - 0, patchcode, targetprod, &context, - targetsid, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* dwContext is MSIINSTALLCONTEXT_MACHINE, but szUserSid is non-NULL */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_MACHINE, - MSIPATCHSTATE_ALL, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* dwContext is out of bounds */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, 0, - MSIPATCHSTATE_ALL, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* dwContext is out of bounds */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_ALL + 1, - MSIPATCHSTATE_ALL, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* dwFilter is out of bounds */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSIPATCHSTATE_INVALID, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* dwFilter is out of bounds */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - size = MAX_PATH; - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSIPATCHSTATE_ALL + 1, 0, patchcode, targetprod, - &context, targetsid, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* pcchTargetUserSid is NULL while szTargetUserSid is non-NULL */ - lstrcpyA(patchcode, "apple"); - lstrcpyA(targetprod, "banana"); - context = 0xdeadbeef; - lstrcpyA(targetsid, "kiwi"); - r = pMsiEnumPatchesExA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSIPATCHSTATE_ALL, 0, patchcode, targetprod, - &context, targetsid, NULL); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(patchcode, "apple"), - "Expected patchcode to be unchanged, got %s\n", patchcode); - ok(!lstrcmpA(targetprod, "banana"), - "Expected targetprod to be unchanged, got %s\n", targetprod); - ok(context == 0xdeadbeef, - "Expected context to be unchanged, got %d\n", context); - ok(!lstrcmpA(targetsid, "kiwi"), - "Expected targetsid to be unchanged, got %s\n", targetsid); - - test_MsiEnumPatchesEx_usermanaged(usersid, usersid); - test_MsiEnumPatchesEx_usermanaged(NULL, usersid); - test_MsiEnumPatchesEx_usermanaged("S-1-2-34", "S-1-2-34"); - test_MsiEnumPatchesEx_userunmanaged(usersid, usersid); - test_MsiEnumPatchesEx_userunmanaged(NULL, usersid); - /* FIXME: Successfully test userunmanaged with a different user */ - test_MsiEnumPatchesEx_machine(); - LocalFree(usersid); -} - -static void test_MsiEnumPatches(void) -{ - CHAR keypath[MAX_PATH], patch[MAX_PATH]; - CHAR patchcode[MAX_PATH], patch_squashed[MAX_PATH]; - CHAR prodcode[MAX_PATH], prod_squashed[MAX_PATH]; - CHAR transforms[MAX_PATH]; - WCHAR patchW[MAX_PATH], prodcodeW[MAX_PATH], transformsW[MAX_PATH]; - HKEY prodkey, patches, udprod; - HKEY userkey, hpatch, udpatch; - DWORD size, data; - LPSTR usersid; - LONG res; - UINT r; - - create_test_guid(prodcode, prod_squashed); - create_test_guid(patchcode, patch_squashed); - get_user_sid(&usersid); - - /* NULL szProduct */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(NULL, 0, patch, transforms, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(patch, "apple"), - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* empty szProduct */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA("", 0, patch, transforms, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(patch, "apple"), - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* garbage szProduct */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA("garbage", 0, patch, transforms, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(patch, "apple"), - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* guid without brackets */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA("6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D", 0, patch, - transforms, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(patch, "apple"), - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* guid with brackets */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA("{6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D}", 0, patch, - transforms, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(patch, "apple"), - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* same length as guid, but random */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA("A938G02JF-2NF3N93-VN3-2NNF-3KGKALDNF93", 0, patch, - transforms, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(patch, "apple"), - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* MSIINSTALLCONTEXT_USERMANAGED */ - - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(patch, "apple"), - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* managed product key exists */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patch, "apple"), - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegCreateKeyA(prodkey, "Patches", &patches); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* patches key exists */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_NO_MORE_ITEMS || - broken(r == ERROR_FILE_NOT_FOUND), /* Windows Installer < 3.0 */ - "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patch, "apple"), - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(patches, "Patches", 0, REG_SZ, - (const BYTE *)patch_squashed, - lstrlenA(patch_squashed) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches value exists, is not REG_MULTI_SZ */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_BAD_CONFIGURATION || - broken(r == ERROR_SUCCESS), /* Windows Installer < 3.0 */ - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - ok(!lstrcmpA(patch, "apple"), - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(patches, "Patches", 0, REG_MULTI_SZ, - (const BYTE *)"a\0b\0c\0\0", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches value exists, is not a squashed guid */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - ok(!lstrcmpA(patch, "apple"), - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - patch_squashed[lstrlenA(patch_squashed) + 1] = '\0'; - res = RegSetValueExA(patches, "Patches", 0, REG_MULTI_SZ, - (const BYTE *)patch_squashed, - lstrlenA(patch_squashed) + 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches value exists */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_NO_MORE_ITEMS || - broken(r == ERROR_FILE_NOT_FOUND), /* Windows Installer < 3.0 */ - "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patch, "apple") || - broken(!lstrcmpA(patch, patchcode)), /* Windows Installer < 3.0 */ - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(patches, patch_squashed, 0, REG_SZ, - (const BYTE *)"whatever", 9); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* patch squashed value exists */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patch, patchcode), - "Expected \"%s\", got \"%s\"\n", patchcode, patch); - ok(!lstrcmpA(transforms, "whatever"), - "Expected \"whatever\", got \"%s\"\n", transforms); - ok(size == 8 || size == MAX_PATH, "Expected 8 or MAX_PATH, got %d\n", size); - - /* lpPatchBuf is NULL */ - size = MAX_PATH; - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, NULL, transforms, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* lpTransformsBuf is NULL, pcchTransformsBuf is not */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - r = MsiEnumPatchesA(prodcode, 0, patch, NULL, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(patch, "apple"), - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* pcchTransformsBuf is NULL, lpTransformsBuf is not */ - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, NULL); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(patch, "apple"), - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - - /* pcchTransformsBuf is too small */ - size = 6; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r); - ok(!lstrcmpA(patch, patchcode), - "Expected \"%s\", got \"%s\"\n", patchcode, patch); - ok(!lstrcmpA(transforms, "whate") || - broken(!lstrcmpA(transforms, "banana")), /* Windows Installer < 3.0 */ - "Expected \"whate\", got \"%s\"\n", transforms); - ok(size == 8 || size == 16, "Expected 8 or 16, got %d\n", size); - - /* increase the index */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 1, patch, transforms, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patch, "apple"), - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* increase again */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 2, patch, transforms, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patch, "apple"), - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - RegDeleteValueA(patches, "Patches"); - RegDeleteKeyA(patches, ""); - RegCloseKey(patches); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - - /* MSIINSTALLCONTEXT_USERUNMANAGED */ - - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(patch, "apple"), - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* current user product key exists */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patch, "apple"), - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegCreateKeyA(prodkey, "Patches", &patches); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches key exists */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_NO_MORE_ITEMS || - broken(r == ERROR_FILE_NOT_FOUND), /* Windows Installer < 3.0 */ - "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patch, "apple"), - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(patches, "Patches", 0, REG_SZ, - (const BYTE *)patch_squashed, - lstrlenA(patch_squashed) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches value exists, is not REG_MULTI_SZ */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_BAD_CONFIGURATION || - broken(r == ERROR_SUCCESS), /* Windows Installer < 3.0 */ - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - ok(!lstrcmpA(patch, "apple"), - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(patches, "Patches", 0, REG_MULTI_SZ, - (const BYTE *)"a\0b\0c\0\0", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches value exists, is not a squashed guid */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - ok(!lstrcmpA(patch, "apple"), - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - patch_squashed[lstrlenA(patch_squashed) + 1] = '\0'; - res = RegSetValueExA(patches, "Patches", 0, REG_MULTI_SZ, - (const BYTE *)patch_squashed, - lstrlenA(patch_squashed) + 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches value exists */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_NO_MORE_ITEMS || - broken(r == ERROR_FILE_NOT_FOUND), /* Windows Installer < 3.0 */ - "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patch, "apple") || - broken(!lstrcmpA(patch, patchcode)), /* Windows Installer < 3.0 */ - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(patches, patch_squashed, 0, REG_SZ, - (const BYTE *)"whatever", 9); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* patch code value exists */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_NO_MORE_ITEMS || - broken(r == ERROR_SUCCESS), /* Windows Installer < 3.0 */ - "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patch, "apple") || - broken(!lstrcmpA(patch, patchcode)), /* Windows Installer < 3.0 */ - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana") || - broken(!lstrcmpA(transforms, "whatever")), /* Windows Installer < 3.0 */ - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Patches\\"); - lstrcatA(keypath, patch_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* userdata patch key exists */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patch, patchcode), - "Expected \"%s\", got \"%s\"\n", patchcode, patch); - ok(!lstrcmpA(transforms, "whatever"), - "Expected \"whatever\", got \"%s\"\n", transforms); - ok(size == 8 || size == MAX_PATH, "Expected 8 or MAX_PATH, got %d\n", size); - - RegDeleteKeyA(userkey, ""); - RegCloseKey(userkey); - RegDeleteValueA(patches, patch_squashed); - RegDeleteValueA(patches, "Patches"); - RegDeleteKeyA(patches, ""); - RegCloseKey(patches); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - - /* MSIINSTALLCONTEXT_MACHINE */ - - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(patch, "apple"), - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local product key exists */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patch, "apple"), - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegCreateKeyA(prodkey, "Patches", &patches); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches key exists */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_NO_MORE_ITEMS || - broken(r == ERROR_FILE_NOT_FOUND), /* Windows Installer < 3.0 */ - "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patch, "apple"), - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(patches, "Patches", 0, REG_SZ, - (const BYTE *)patch_squashed, - lstrlenA(patch_squashed) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches value exists, is not REG_MULTI_SZ */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_BAD_CONFIGURATION || - broken(r == ERROR_SUCCESS), /* Windows Installer < 3.0 */ - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - ok(!lstrcmpA(patch, "apple"), - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(patches, "Patches", 0, REG_MULTI_SZ, - (const BYTE *)"a\0b\0c\0\0", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches value exists, is not a squashed guid */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - ok(!lstrcmpA(patch, "apple"), - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - patch_squashed[lstrlenA(patch_squashed) + 1] = '\0'; - res = RegSetValueExA(patches, "Patches", 0, REG_MULTI_SZ, - (const BYTE *)patch_squashed, - lstrlenA(patch_squashed) + 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches value exists */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_NO_MORE_ITEMS || - broken(r == ERROR_FILE_NOT_FOUND), /* Windows Installer < 3.0 */ - "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patch, "apple") || - broken(!lstrcmpA(patch, patchcode)), /* Windows Installer < 3.0 */ - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana"), - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(patches, patch_squashed, 0, REG_SZ, - (const BYTE *)"whatever", 9); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* patch code value exists */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patch, patchcode), - "Expected \"%s\", got \"%s\"\n", patchcode, patch); - ok(!lstrcmpA(transforms, "whatever"), - "Expected \"whatever\", got \"%s\"\n", transforms); - ok(size == 8 || size == MAX_PATH, "Expected 8 or MAX_PATH, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\UserData\\S-1-5-18\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &udprod); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local UserData product key exists */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patch, patchcode), - "Expected \"%s\", got \"%s\"\n", patchcode, patch); - ok(!lstrcmpA(transforms, "whatever"), - "Expected \"whatever\", got \"%s\"\n", transforms); - ok(size == 8 || size == MAX_PATH, "Expected 8 or MAX_PATH, got %d\n", size); - - res = RegCreateKeyA(udprod, "Patches", &udpatch); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local UserData Patches key exists */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patch, patchcode), - "Expected \"%s\", got \"%s\"\n", patchcode, patch); - ok(!lstrcmpA(transforms, "whatever"), - "Expected \"whatever\", got \"%s\"\n", transforms); - ok(size == 8 || size == MAX_PATH, "Expected 8 or MAX_PATH, got %d\n", size); - - res = RegCreateKeyA(udpatch, patch_squashed, &hpatch); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local UserData Product patch key exists */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_NO_MORE_ITEMS || - broken(r == ERROR_SUCCESS), /* Windows Installer < 3.0 */ - "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(patch, "apple") || - broken(!lstrcmpA(patch, patchcode)), /* Windows Installer < 3.0 */ - "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch); - ok(!lstrcmpA(transforms, "banana") || - broken(!lstrcmpA(transforms, "whatever")), /* Windows Installer < 3.0 */ - "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - data = MSIPATCHSTATE_APPLIED; - res = RegSetValueExA(hpatch, "State", 0, REG_DWORD, - (const BYTE *)&data, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* State value exists */ - size = MAX_PATH; - lstrcpyA(patch, "apple"); - lstrcpyA(transforms, "banana"); - r = MsiEnumPatchesA(prodcode, 0, patch, transforms, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(patch, patchcode), - "Expected \"%s\", got \"%s\"\n", patchcode, patch); - ok(!lstrcmpA(transforms, "whatever"), - "Expected \"whatever\", got \"%s\"\n", transforms); - ok(size == 8 || size == MAX_PATH, "Expected 8 or MAX_PATH, got %d\n", size); - - /* now duplicate some of the tests for the W version */ - - /* pcchTransformsBuf is too small */ - size = 6; - MultiByteToWideChar( CP_ACP, 0, prodcode, -1, prodcodeW, MAX_PATH ); - MultiByteToWideChar( CP_ACP, 0, "apple", -1, patchW, MAX_PATH ); - MultiByteToWideChar( CP_ACP, 0, "banana", -1, transformsW, MAX_PATH ); - r = MsiEnumPatchesW(prodcodeW, 0, patchW, transformsW, &size); - ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r); - WideCharToMultiByte( CP_ACP, 0, patchW, -1, patch, MAX_PATH, NULL, NULL ); - WideCharToMultiByte( CP_ACP, 0, transformsW, -1, transforms, MAX_PATH, NULL, NULL ); - ok(!lstrcmpA(patch, patchcode), - "Expected \"%s\", got \"%s\"\n", patchcode, patch); - ok(!lstrcmpA(transforms, "whate") || - broken(!lstrcmpA(transforms, "banana")), /* Windows Installer < 3.0 */ - "Expected \"whate\", got \"%s\"\n", transforms); - ok(size == 8, "Expected 8, got %d\n", size); - - /* patch code value exists */ - size = MAX_PATH; - MultiByteToWideChar( CP_ACP, 0, "apple", -1, patchW, MAX_PATH ); - MultiByteToWideChar( CP_ACP, 0, "banana", -1, transformsW, MAX_PATH ); - r = MsiEnumPatchesW(prodcodeW, 0, patchW, transformsW, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - WideCharToMultiByte( CP_ACP, 0, patchW, -1, patch, MAX_PATH, NULL, NULL ); - WideCharToMultiByte( CP_ACP, 0, transformsW, -1, transforms, MAX_PATH, NULL, NULL ); - ok(!lstrcmpA(patch, patchcode), - "Expected \"%s\", got \"%s\"\n", patchcode, patch); - ok(!lstrcmpA(transforms, "whatever"), - "Expected \"whatever\", got \"%s\"\n", transforms); - ok(size == 8 || size == MAX_PATH, "Expected 8 or MAX_PATH, got %d\n", size); - - RegDeleteValueA(patches, patch_squashed); - RegDeleteValueA(patches, "Patches"); - RegDeleteKeyA(patches, ""); - RegCloseKey(patches); - RegDeleteValueA(hpatch, "State"); - RegDeleteKeyA(hpatch, ""); - RegCloseKey(hpatch); - RegDeleteKeyA(udpatch, ""); - RegCloseKey(udpatch); - RegDeleteKeyA(udprod, ""); - RegCloseKey(udprod); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - LocalFree(usersid); -} - -static void test_MsiGetPatchInfoEx(void) -{ - CHAR keypath[MAX_PATH], val[MAX_PATH]; - CHAR patchcode[MAX_PATH], patch_squashed[MAX_PATH]; - CHAR prodcode[MAX_PATH], prod_squashed[MAX_PATH]; - HKEY prodkey, patches, udprod, props; - HKEY hpatch, udpatch, prodpatches; - LPSTR usersid; - DWORD size; - LONG res; - UINT r; - - if (!pMsiGetPatchInfoExA) - { - win_skip("MsiGetPatchInfoEx not implemented\n"); - return; - } - - create_test_guid(prodcode, prod_squashed); - create_test_guid(patchcode, patch_squashed); - get_user_sid(&usersid); - - /* NULL szPatchCode */ - lstrcpyA(val, "apple"); - size = MAX_PATH; - r = pMsiGetPatchInfoExA(NULL, prodcode, NULL, MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* empty szPatchCode */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA("", prodcode, NULL, MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* garbage szPatchCode */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA("garbage", prodcode, NULL, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* guid without brackets */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA("6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D", prodcode, - NULL, MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* guid with brackets */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA("{6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D}", prodcode, - NULL, MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* same length as guid, but random */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA("A938G02JF-2NF3N93-VN3-2NNF-3KGKALDNF93", prodcode, - NULL, MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* NULL szProductCode */ - lstrcpyA(val, "apple"); - size = MAX_PATH; - r = pMsiGetPatchInfoExA(patchcode, NULL, NULL, MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* empty szProductCode */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, "", NULL, MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* garbage szProductCode */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, "garbage", NULL, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* guid without brackets */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, "6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D", - NULL, MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* guid with brackets */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, "{6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D}", - NULL, MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* same length as guid, but random */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, "A938G02JF-2NF3N93-VN3-2NNF-3KGKALDNF93", - NULL, MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* szUserSid cannot be S-1-5-18 for MSIINSTALLCONTEXT_USERMANAGED */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, "S-1-5-18", - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* szUserSid cannot be S-1-5-18 for MSIINSTALLCONTEXT_USERUNMANAGED */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, "S-1-5-18", - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* szUserSid cannot be S-1-5-18 for MSIINSTALLCONTEXT_MACHINE */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, "S-1-5-18", - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* szUserSid must be NULL for MSIINSTALLCONTEXT_MACHINE */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* dwContext is out of range */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_NONE, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* dwContext is out of range */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_ALL, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* dwContext is invalid */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, 3, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* MSIINSTALLCONTEXT_USERMANAGED */ - - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &udprod); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local UserData product key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegCreateKeyA(udprod, "InstallProperties", &props); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallProperties key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegCreateKeyA(udprod, "Patches", &patches); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegCreateKeyA(patches, patch_squashed, &hpatch); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* managed product key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegCreateKeyA(prodkey, "Patches", &prodpatches); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(prodpatches, patch_squashed, 0, REG_SZ, - (const BYTE *)"transforms", 11); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* specific patch value exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Patches\\"); - lstrcatA(keypath, patch_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &udpatch); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* UserData Patches key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, ""), "Expected \"\", got \"%s\"\n", val); - ok(size == 0, "Expected 0, got %d\n", size); - - res = RegSetValueExA(udpatch, "ManagedLocalPackage", 0, REG_SZ, - (const BYTE *)"pack", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* ManagedLocalPatch value exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, "pack"), "Expected \"pack\", got \"%s\"\n", val); - ok(size == 4, "Expected 4, got %d\n", size); - - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_TRANSFORMS, val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, "transforms"), "Expected \"transforms\", got \"%s\"\n", val); - ok(size == 10, "Expected 10, got %d\n", size); - - res = RegSetValueExA(hpatch, "Installed", 0, REG_SZ, - (const BYTE *)"mydate", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Installed value exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_INSTALLDATE, val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, "mydate"), "Expected \"mydate\", got \"%s\"\n", val); - ok(size == 6, "Expected 6, got %d\n", size); - - res = RegSetValueExA(hpatch, "Uninstallable", 0, REG_SZ, - (const BYTE *)"yes", 4); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Uninstallable value exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_UNINSTALLABLE, val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, "yes"), "Expected \"yes\", got \"%s\"\n", val); - ok(size == 3, "Expected 3, got %d\n", size); - - res = RegSetValueExA(hpatch, "State", 0, REG_SZ, - (const BYTE *)"good", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* State value exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_PATCHSTATE, val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, "good"), "Expected \"good\", got \"%s\"\n", val); - ok(size == 4, "Expected 4, got %d\n", size); - - size = 1; - res = RegSetValueExA(hpatch, "State", 0, REG_DWORD, - (const BYTE *)&size, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* State value exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_PATCHSTATE, val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - todo_wine ok(!lstrcmpA(val, "1"), "Expected \"1\", got \"%s\"\n", val); - ok(size == 1, "Expected 1, got %d\n", size); - - res = RegSetValueExA(hpatch, "DisplayName", 0, REG_SZ, - (const BYTE *)"display", 8); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* DisplayName value exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_DISPLAYNAME, val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, "display"), "Expected \"display\", got \"%s\"\n", val); - ok(size == 7, "Expected 7, got %d\n", size); - - res = RegSetValueExA(hpatch, "MoreInfoURL", 0, REG_SZ, - (const BYTE *)"moreinfo", 9); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* MoreInfoURL value exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_MOREINFOURL, val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, "moreinfo"), "Expected \"moreinfo\", got \"%s\"\n", val); - ok(size == 8, "Expected 8, got %d\n", size); - - /* szProperty is invalid */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - "IDontExist", val, &size); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(!lstrcmpA(val, "apple"), "Expected \"apple\", got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - /* lpValue is NULL, while pcchValue is non-NULL */ - size = MAX_PATH; - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_MOREINFOURL, NULL, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(size == 16, "Expected 16, got %d\n", size); - - /* pcchValue is NULL, while lpValue is non-NULL */ - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_MOREINFOURL, val, NULL); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(val, "apple"), "Expected \"apple\", got \"%s\"\n", val); - - /* both lpValue and pcchValue are NULL */ - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_MOREINFOURL, NULL, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* pcchValue doesn't have enough room for NULL terminator */ - size = 8; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_MOREINFOURL, val, &size); - ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r); - ok(!lstrcmpA(val, "moreinf"), - "Expected \"moreinf\", got \"%s\"\n", val); - ok(size == 16, "Expected 16, got %d\n", size); - - /* pcchValue has exactly enough room for NULL terminator */ - size = 9; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_MOREINFOURL, val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, "moreinfo"), - "Expected \"moreinfo\", got \"%s\"\n", val); - ok(size == 8, "Expected 8, got %d\n", size); - - /* pcchValue is too small, lpValue is NULL */ - size = 0; - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_MOREINFOURL, NULL, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(size == 16, "Expected 16, got %d\n", size); - - RegDeleteValueA(prodpatches, patch_squashed); - RegDeleteKeyA(prodpatches, ""); - RegCloseKey(prodpatches); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - - /* UserData is sufficient for all properties - * except INSTALLPROPERTY_TRANSFORMS - */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, "pack"), "Expected \"pack\", got \"%s\"\n", val); - ok(size == 4, "Expected 4, got %d\n", size); - - /* UserData is sufficient for all properties - * except INSTALLPROPERTY_TRANSFORMS - */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_TRANSFORMS, val, &size); - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r); - ok(!lstrcmpA(val, "apple"), "Expected \"apple\", got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - RegDeleteValueA(hpatch, "MoreInfoURL"); - RegDeleteValueA(hpatch, "Display"); - RegDeleteValueA(hpatch, "State"); - RegDeleteValueA(hpatch, "Uninstallable"); - RegDeleteValueA(hpatch, "Installed"); - RegDeleteValueA(udpatch, "ManagedLocalPackage"); - RegDeleteKeyA(udpatch, ""); - RegCloseKey(udpatch); - RegDeleteKeyA(hpatch, ""); - RegCloseKey(hpatch); - RegDeleteKeyA(patches, ""); - RegCloseKey(patches); - RegDeleteKeyA(props, ""); - RegCloseKey(props); - RegDeleteKeyA(udprod, ""); - RegCloseKey(udprod); - - /* MSIINSTALLCONTEXT_USERUNMANAGED */ - - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &udprod); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local UserData product key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegCreateKeyA(udprod, "InstallProperties", &props); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallProperties key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegCreateKeyA(udprod, "Patches", &patches); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegCreateKeyA(patches, patch_squashed, &hpatch); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* current user product key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegCreateKeyA(prodkey, "Patches", &prodpatches); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(prodpatches, patch_squashed, 0, REG_SZ, - (const BYTE *)"transforms", 11); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* specific patch value exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Patches\\"); - lstrcatA(keypath, patch_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &udpatch); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* UserData Patches key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, ""), "Expected \"\", got \"%s\"\n", val); - ok(size == 0, "Expected 0, got %d\n", size); - - res = RegSetValueExA(udpatch, "LocalPackage", 0, REG_SZ, - (const BYTE *)"pack", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* LocalPatch value exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, "pack"), "Expected \"pack\", got \"%s\"\n", val); - ok(size == 4, "Expected 4, got %d\n", size); - - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_TRANSFORMS, val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, "transforms"), "Expected \"transforms\", got \"%s\"\n", val); - ok(size == 10, "Expected 10, got %d\n", size); - - RegDeleteValueA(prodpatches, patch_squashed); - RegDeleteKeyA(prodpatches, ""); - RegCloseKey(prodpatches); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - - /* UserData is sufficient for all properties - * except INSTALLPROPERTY_TRANSFORMS - */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, "pack"), "Expected \"pack\", got \"%s\"\n", val); - ok(size == 4, "Expected 4, got %d\n", size); - - /* UserData is sufficient for all properties - * except INSTALLPROPERTY_TRANSFORMS - */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_TRANSFORMS, val, &size); - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r); - ok(!lstrcmpA(val, "apple"), "Expected \"apple\", got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - RegDeleteValueA(udpatch, "LocalPackage"); - RegDeleteKeyA(udpatch, ""); - RegCloseKey(udpatch); - RegDeleteKeyA(hpatch, ""); - RegCloseKey(hpatch); - RegDeleteKeyA(patches, ""); - RegCloseKey(patches); - RegDeleteKeyA(props, ""); - RegCloseKey(props); - RegDeleteKeyA(udprod, ""); - RegCloseKey(udprod); - - /* MSIINSTALLCONTEXT_MACHINE */ - - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer"); - lstrcatA(keypath, "\\UserData\\S-1-5-18\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &udprod); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local UserData product key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegCreateKeyA(udprod, "InstallProperties", &props); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* InstallProperties key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegCreateKeyA(udprod, "Patches", &patches); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegCreateKeyA(patches, patch_squashed, &hpatch); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* local product key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegCreateKeyA(prodkey, "Patches", &prodpatches); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Patches key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - res = RegSetValueExA(prodpatches, patch_squashed, 0, REG_SZ, - (const BYTE *)"transforms", 11); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* specific patch value exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer"); - lstrcatA(keypath, "\\UserData\\S-1-5-18\\Patches\\"); - lstrcatA(keypath, patch_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &udpatch); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* UserData Patches key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, ""), "Expected \"\", got \"%s\"\n", val); - ok(size == 0, "Expected 0, got %d\n", size); - - res = RegSetValueExA(udpatch, "LocalPackage", 0, REG_SZ, - (const BYTE *)"pack", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* LocalPatch value exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, "pack"), "Expected \"pack\", got \"%s\"\n", val); - ok(size == 4, "Expected 4, got %d\n", size); - - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_TRANSFORMS, val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, "transforms"), "Expected \"transforms\", got \"%s\"\n", val); - ok(size == 10, "Expected 10, got %d\n", size); - - RegDeleteValueA(prodpatches, patch_squashed); - RegDeleteKeyA(prodpatches, ""); - RegCloseKey(prodpatches); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - - /* UserData is sufficient for all properties - * except INSTALLPROPERTY_TRANSFORMS - */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_LOCALPACKAGE, val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, "pack"), "Expected \"pack\", got \"%s\"\n", val); - ok(size == 4, "Expected 4, got %d\n", size); - - /* UserData is sufficient for all properties - * except INSTALLPROPERTY_TRANSFORMS - */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = pMsiGetPatchInfoExA(patchcode, prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_TRANSFORMS, val, &size); - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r); - ok(!lstrcmpA(val, "apple"), "Expected \"apple\", got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - RegDeleteValueA(udpatch, "LocalPackage"); - RegDeleteKeyA(udpatch, ""); - RegCloseKey(udpatch); - RegDeleteKeyA(hpatch, ""); - RegCloseKey(hpatch); - RegDeleteKeyA(patches, ""); - RegCloseKey(patches); - RegDeleteKeyA(props, ""); - RegCloseKey(props); - RegDeleteKeyA(udprod, ""); - RegCloseKey(udprod); - LocalFree(usersid); -} - -static void test_MsiGetPatchInfo(void) -{ - UINT r; - char prod_code[MAX_PATH], prod_squashed[MAX_PATH], val[MAX_PATH]; - char patch_code[MAX_PATH], patch_squashed[MAX_PATH], keypath[MAX_PATH]; - WCHAR valW[MAX_PATH], patch_codeW[MAX_PATH]; - HKEY hkey_product, hkey_patch, hkey_patches, hkey_udprops, hkey_udproduct; - HKEY hkey_udpatch, hkey_udpatches, hkey_udproductpatches, hkey_udproductpatch; - DWORD size; - LONG res; - - create_test_guid(patch_code, patch_squashed); - create_test_guid(prod_code, prod_squashed); - MultiByteToWideChar(CP_ACP, 0, patch_code, -1, patch_codeW, MAX_PATH); - - r = MsiGetPatchInfoA(NULL, NULL, NULL, NULL); - ok(r == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", r); - - r = MsiGetPatchInfoA(patch_code, NULL, NULL, NULL); - ok(r == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", r); - - r = MsiGetPatchInfoA(patch_code, INSTALLPROPERTY_LOCALPACKAGEA, NULL, NULL); - ok(r == ERROR_UNKNOWN_PRODUCT, "expected ERROR_UNKNOWN_PRODUCT, got %u\n", r); - - size = 0; - r = MsiGetPatchInfoA(patch_code, NULL, NULL, &size); - ok(r == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", r); - - r = MsiGetPatchInfoA(patch_code, "", NULL, &size); - ok(r == ERROR_UNKNOWN_PROPERTY, "expected ERROR_UNKNOWN_PROPERTY, got %u\n", r); - - lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &hkey_product); - ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS got %d\n", res); - - /* product key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = MsiGetPatchInfoA(patch_code, INSTALLPROPERTY_LOCALPACKAGEA, val, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, "expected ERROR_UNKNOWN_PRODUCT got %u\n", r); - ok(!lstrcmpA(val, "apple"), "expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "expected size to be unchanged got %u\n", size); - - res = RegCreateKeyA(hkey_product, "Patches", &hkey_patches); - ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS got %d\n", res); - - /* patches key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = MsiGetPatchInfoA(patch_code, INSTALLPROPERTY_LOCALPACKAGEA, val, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, "expected ERROR_UNKNOWN_PRODUCT got %u\n", r); - ok(!lstrcmpA(val, "apple"), "expected val to be unchanged got \"%s\"\n", val); - ok(size == MAX_PATH, "expected size to be unchanged got %u\n", size); - - res = RegCreateKeyA(hkey_patches, patch_squashed, &hkey_patch); - ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS got %d\n", res); - - /* patch key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = MsiGetPatchInfoA(patch_code, INSTALLPROPERTY_LOCALPACKAGEA, val, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, "expected ERROR_UNKNOWN_PRODUCT got %u\n", r); - ok(!lstrcmpA(val, "apple"), "expected val to be unchanged got \"%s\"\n", val); - ok(size == MAX_PATH, "expected size to be unchanged got %u\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer"); - lstrcatA(keypath, "\\UserData\\S-1-5-18\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &hkey_udproduct); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS got %d\n", res); - - /* UserData product key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = MsiGetPatchInfoA(patch_code, INSTALLPROPERTY_LOCALPACKAGEA, val, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, "expected ERROR_UNKNOWN_PRODUCT got %u\n", r); - ok(!lstrcmpA(val, "apple"), "expected val to be unchanged got \"%s\"\n", val); - ok(size == MAX_PATH, "expected size to be unchanged got %u\n", size); - - res = RegCreateKeyA(hkey_udproduct, "InstallProperties", &hkey_udprops); - ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS got %d\n", res); - - /* InstallProperties key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = MsiGetPatchInfoA(patch_code, INSTALLPROPERTY_LOCALPACKAGEA, val, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, "expected ERROR_UNKNOWN_PRODUCT got %u\n", r); - ok(!lstrcmpA(val, "apple"), "expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "expected size to be unchanged got %u\n", size); - - res = RegCreateKeyA(hkey_udproduct, "Patches", &hkey_udpatches); - ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS got %d\n", res); - - /* UserData Patches key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = MsiGetPatchInfoA(patch_code, INSTALLPROPERTY_LOCALPACKAGEA, val, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, "expected ERROR_UNKNOWN_PRODUCT got %u\n", r); - ok(!lstrcmpA(val, "apple"), "expected val to be unchanged got \"%s\"\n", val); - ok(size == MAX_PATH, "expected size to be unchanged got %u\n", size); - - res = RegCreateKeyA(hkey_udproduct, "Patches", &hkey_udproductpatches); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = RegCreateKeyA(hkey_udproductpatches, patch_squashed, &hkey_udproductpatch); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* UserData product patch key exists */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = MsiGetPatchInfoA(patch_code, INSTALLPROPERTY_LOCALPACKAGEA, val, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, "expected ERROR_UNKNOWN_PRODUCT got %u\n", r); - ok(!lstrcmpA(val, "apple"), "expected val to be unchanged got \"%s\"\n", val); - ok(size == MAX_PATH, "expected size to be unchanged got %u\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer"); - lstrcatA(keypath, "\\UserData\\S-1-5-18\\Patches\\"); - lstrcatA(keypath, patch_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &hkey_udpatch); - ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS got %d\n", res); - - res = RegSetValueExA(hkey_udpatch, "LocalPackage", 0, REG_SZ, (const BYTE *)"c:\\test.msp", 12); - ok(res == ERROR_SUCCESS, "expected ERROR_SUCCESS got %d\n", res); - - /* UserData Patch key exists */ - size = 0; - lstrcpyA(val, "apple"); - r = MsiGetPatchInfoA(patch_code, INSTALLPROPERTY_LOCALPACKAGEA, val, &size); - ok(r == ERROR_MORE_DATA, "expected ERROR_MORE_DATA got %u\n", r); - ok(!lstrcmpA(val, "apple"), "expected \"apple\", got \"%s\"\n", val); - ok(size == 11, "expected 11 got %u\n", size); - - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = MsiGetPatchInfoA(patch_code, INSTALLPROPERTY_LOCALPACKAGEA, val, &size); - ok(r == ERROR_SUCCESS, "expected ERROR_SUCCESS got %u\n", r); - ok(!lstrcmpA(val, "c:\\test.msp"), "expected \"c:\\test.msp\", got \"%s\"\n", val); - ok(size == 11, "expected 11 got %u\n", size); - - size = 0; - valW[0] = 0; - r = MsiGetPatchInfoW(patch_codeW, INSTALLPROPERTY_LOCALPACKAGEW, valW, &size); - ok(r == ERROR_MORE_DATA, "expected ERROR_MORE_DATA got %u\n", r); - ok(!valW[0], "expected 0 got %u\n", valW[0]); - ok(size == 11, "expected 11 got %u\n", size); - - size = MAX_PATH; - valW[0] = 0; - r = MsiGetPatchInfoW(patch_codeW, INSTALLPROPERTY_LOCALPACKAGEW, valW, &size); - ok(r == ERROR_SUCCESS, "expected ERROR_SUCCESS got %u\n", r); - ok(valW[0], "expected > 0 got %u\n", valW[0]); - ok(size == 11, "expected 11 got %u\n", size); - - RegDeleteKeyA(hkey_udproductpatch, ""); - RegCloseKey(hkey_udproductpatch); - RegDeleteKeyA(hkey_udproductpatches, ""); - RegCloseKey(hkey_udproductpatches); - RegDeleteKeyA(hkey_udpatch, ""); - RegCloseKey(hkey_udpatch); - RegDeleteKeyA(hkey_patches, ""); - RegCloseKey(hkey_patches); - RegDeleteKeyA(hkey_product, ""); - RegCloseKey(hkey_product); - RegDeleteKeyA(hkey_patch, ""); - RegCloseKey(hkey_patch); - RegDeleteKeyA(hkey_udpatches, ""); - RegCloseKey(hkey_udpatches); - RegDeleteKeyA(hkey_udprops, ""); - RegCloseKey(hkey_udprops); - RegDeleteKeyA(hkey_udproduct, ""); - RegCloseKey(hkey_udproduct); -} - -static void test_MsiEnumProducts(void) -{ - UINT r; - int found1, found2, found3; - DWORD index; - char product1[39], product2[39], product3[39], guid[39]; - char product_squashed1[33], product_squashed2[33], product_squashed3[33]; - char keypath1[MAX_PATH], keypath2[MAX_PATH], keypath3[MAX_PATH]; - char *usersid; - HKEY key1, key2, key3; - - create_test_guid(product1, product_squashed1); - create_test_guid(product2, product_squashed2); - create_test_guid(product3, product_squashed3); - get_user_sid(&usersid); - - strcpy(keypath1, "Software\\Classes\\Installer\\Products\\"); - strcat(keypath1, product_squashed1); - - r = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath1, &key1); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - strcpy(keypath2, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\"); - strcat(keypath2, usersid); - strcat(keypath2, "\\Installer\\Products\\"); - strcat(keypath2, product_squashed2); - - r = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath2, &key2); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - strcpy(keypath3, "Software\\Microsoft\\Installer\\Products\\"); - strcat(keypath3, product_squashed3); - - r = RegCreateKeyA(HKEY_CURRENT_USER, keypath3, &key3); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - index = 0; - r = MsiEnumProductsA(index, guid); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - r = MsiEnumProductsA(index, NULL); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %u\n", r); - - index = 2; - r = MsiEnumProductsA(index, guid); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %u\n", r); - - index = 0; - r = MsiEnumProductsA(index, guid); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - found1 = found2 = found3 = 0; - while ((r = MsiEnumProductsA(index, guid)) == ERROR_SUCCESS) - { - if (!strcmp(product1, guid)) found1 = 1; - if (!strcmp(product2, guid)) found2 = 1; - if (!strcmp(product3, guid)) found3 = 1; - index++; - } - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %u\n", r); - ok(found1, "product1 not found\n"); - ok(found2, "product2 not found\n"); - ok(found3, "product3 not found\n"); - - RegDeleteKeyA(key1, ""); - RegDeleteKeyA(key2, ""); - RegDeleteKeyA(key3, ""); - RegCloseKey(key1); - RegCloseKey(key2); - RegCloseKey(key3); - LocalFree(usersid); -} - -START_TEST(msi) -{ - init_functionpointers(); - - test_usefeature(); - test_null(); - test_getcomponentpath(); - test_MsiGetFileHash(); - - if (!pConvertSidToStringSidA) - win_skip("ConvertSidToStringSidA not implemented\n"); - else - { - /* These tests rely on get_user_sid that needs ConvertSidToStringSidA */ - test_MsiQueryProductState(); - test_MsiQueryFeatureState(); - test_MsiQueryComponentState(); - test_MsiGetComponentPath(); - test_MsiGetProductCode(); - test_MsiEnumClients(); - test_MsiGetProductInfo(); - test_MsiGetProductInfoEx(); - test_MsiGetUserInfo(); - test_MsiOpenProduct(); - test_MsiEnumPatchesEx(); - test_MsiEnumPatches(); - test_MsiGetPatchInfoEx(); - test_MsiGetPatchInfo(); - test_MsiEnumProducts(); - } - - test_MsiGetFileVersion(); -} diff --git a/rostests/winetests/msi/msi.rbuild b/rostests/winetests/msi/msi.rbuild deleted file mode 100644 index 67a8c078752..00000000000 --- a/rostests/winetests/msi/msi.rbuild +++ /dev/null @@ -1,30 +0,0 @@ - - - - - . - - automation.c - db.c - format.c - install.c - msi.c - package.c - patch.c - record.c - source.c - suminfo.c - testlist.c - wine - uuid - cabinet - msi - shell32 - ole32 - oleaut32 - user32 - advapi32 - version - ntdll - - diff --git a/rostests/winetests/msi/package.c b/rostests/winetests/msi/package.c deleted file mode 100644 index d2514ce5a7f..00000000000 --- a/rostests/winetests/msi/package.c +++ /dev/null @@ -1,12017 +0,0 @@ -/* - * tests for Microsoft Installer functionality - * - * Copyright 2005 Mike McCormack for CodeWeavers - * Copyright 2005 Aric Stewart 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 - */ - -#define COBJMACROS - -#include -#include -#include -#include -#include -#include - -#include "wine/test.h" - -static const char msifile[] = "winetest-package.msi"; -char CURR_DIR[MAX_PATH]; - -static UINT (WINAPI *pMsiApplyMultiplePatchesA)(LPCSTR, LPCSTR, LPCSTR); - -static BOOL (WINAPI *pConvertSidToStringSidA)(PSID, LPSTR*); - -static BOOL (WINAPI *pSRRemoveRestorePoint)(DWORD); -static BOOL (WINAPI *pSRSetRestorePointA)(RESTOREPOINTINFOA*, STATEMGRSTATUS*); - -static void init_functionpointers(void) -{ - HMODULE hmsi = GetModuleHandleA("msi.dll"); - HMODULE hadvapi32 = GetModuleHandleA("advapi32.dll"); - HMODULE hsrclient; - -#define GET_PROC(mod, func) \ - p ## func = (void*)GetProcAddress(mod, #func); - - GET_PROC(hmsi, MsiApplyMultiplePatchesA); - - GET_PROC(hadvapi32, ConvertSidToStringSidA); - - hsrclient = LoadLibraryA("srclient.dll"); - GET_PROC(hsrclient, SRRemoveRestorePoint); - GET_PROC(hsrclient, SRSetRestorePointA); -#undef GET_PROC -} - - -static LPSTR get_user_sid(LPSTR *usersid) -{ - HANDLE token; - BYTE buf[1024]; - DWORD size; - PTOKEN_USER user; - - if (!pConvertSidToStringSidA) - { - win_skip("ConvertSidToStringSidA is not available\n"); - return NULL; - } - - *usersid = NULL; - OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token); - size = sizeof(buf); - GetTokenInformation(token, TokenUser, buf, size, &size); - user = (PTOKEN_USER)buf; - pConvertSidToStringSidA(user->User.Sid, usersid); - ok(*usersid != NULL, "pConvertSidToStringSidA failed lre=%d\n", GetLastError()); - CloseHandle(token); - return *usersid; -} - -/* RegDeleteTreeW from dlls/advapi32/registry.c */ -static LSTATUS package_RegDeleteTreeW(HKEY hKey, LPCWSTR lpszSubKey) -{ - LONG ret; - DWORD dwMaxSubkeyLen, dwMaxValueLen; - DWORD dwMaxLen, dwSize; - WCHAR szNameBuf[MAX_PATH], *lpszName = szNameBuf; - HKEY hSubKey = hKey; - - if(lpszSubKey) - { - ret = RegOpenKeyExW(hKey, lpszSubKey, 0, KEY_READ, &hSubKey); - if (ret) return ret; - } - - ret = RegQueryInfoKeyW(hSubKey, NULL, NULL, NULL, NULL, - &dwMaxSubkeyLen, NULL, NULL, &dwMaxValueLen, NULL, NULL, NULL); - if (ret) goto cleanup; - - dwMaxSubkeyLen++; - dwMaxValueLen++; - dwMaxLen = max(dwMaxSubkeyLen, dwMaxValueLen); - if (dwMaxLen > sizeof(szNameBuf)/sizeof(WCHAR)) - { - /* Name too big: alloc a buffer for it */ - if (!(lpszName = HeapAlloc( GetProcessHeap(), 0, dwMaxLen*sizeof(WCHAR)))) - { - ret = ERROR_NOT_ENOUGH_MEMORY; - goto cleanup; - } - } - - /* Recursively delete all the subkeys */ - while (TRUE) - { - dwSize = dwMaxLen; - if (RegEnumKeyExW(hSubKey, 0, lpszName, &dwSize, NULL, - NULL, NULL, NULL)) break; - - ret = package_RegDeleteTreeW(hSubKey, lpszName); - if (ret) goto cleanup; - } - - if (lpszSubKey) - ret = RegDeleteKeyW(hKey, lpszSubKey); - else - while (TRUE) - { - dwSize = dwMaxLen; - if (RegEnumValueW(hKey, 0, lpszName, &dwSize, - NULL, NULL, NULL, NULL)) break; - - ret = RegDeleteValueW(hKey, lpszName); - if (ret) goto cleanup; - } - -cleanup: - if (lpszName != szNameBuf) - HeapFree(GetProcessHeap(), 0, lpszName); - if(lpszSubKey) - RegCloseKey(hSubKey); - return ret; -} - -static BOOL squash_guid(LPCWSTR in, LPWSTR out) -{ - DWORD i,n=1; - GUID guid; - - if (FAILED(CLSIDFromString((LPCOLESTR)in, &guid))) - return FALSE; - - for(i=0; i<8; i++) - out[7-i] = in[n++]; - n++; - for(i=0; i<4; i++) - out[11-i] = in[n++]; - n++; - for(i=0; i<4; i++) - out[15-i] = in[n++]; - n++; - for(i=0; i<2; i++) - { - out[17+i*2] = in[n++]; - out[16+i*2] = in[n++]; - } - n++; - for( ; i<8; i++) - { - out[17+i*2] = in[n++]; - out[16+i*2] = in[n++]; - } - out[32]=0; - return TRUE; -} - -static void create_test_guid(LPSTR prodcode, LPSTR squashed) -{ - WCHAR guidW[MAX_PATH]; - WCHAR squashedW[MAX_PATH]; - GUID guid; - HRESULT hr; - int size; - - hr = CoCreateGuid(&guid); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); - - size = StringFromGUID2(&guid, guidW, MAX_PATH); - ok(size == 39, "Expected 39, got %d\n", hr); - - WideCharToMultiByte(CP_ACP, 0, guidW, size, prodcode, MAX_PATH, NULL, NULL); - squash_guid(guidW, squashedW); - WideCharToMultiByte(CP_ACP, 0, squashedW, -1, squashed, MAX_PATH, NULL, NULL); -} - -static void set_component_path(LPCSTR filename, MSIINSTALLCONTEXT context, - LPCSTR guid, LPSTR usersid, BOOL dir) -{ - WCHAR guidW[MAX_PATH]; - WCHAR squashedW[MAX_PATH]; - CHAR squashed[MAX_PATH]; - CHAR comppath[MAX_PATH]; - CHAR prodpath[MAX_PATH]; - CHAR path[MAX_PATH]; - LPCSTR prod = NULL; - HKEY hkey; - - MultiByteToWideChar(CP_ACP, 0, guid, -1, guidW, MAX_PATH); - squash_guid(guidW, squashedW); - WideCharToMultiByte(CP_ACP, 0, squashedW, -1, squashed, MAX_PATH, NULL, NULL); - - if (context == MSIINSTALLCONTEXT_MACHINE) - { - prod = "3D0DAE300FACA1300AD792060BCDAA92"; - sprintf(comppath, - "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\" - "Installer\\UserData\\S-1-5-18\\Components\\%s", squashed); - lstrcpyA(prodpath, - "SOFTWARE\\Classes\\Installer\\" - "Products\\3D0DAE300FACA1300AD792060BCDAA92"); - } - else if (context == MSIINSTALLCONTEXT_USERUNMANAGED) - { - prod = "7D2F387510109040002000060BECB6AB"; - sprintf(comppath, - "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\" - "Installer\\UserData\\%s\\Components\\%s", usersid, squashed); - sprintf(prodpath, - "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\" - "Installer\\%s\\Installer\\Products\\" - "7D2F387510109040002000060BECB6AB", usersid); - } - else if (context == MSIINSTALLCONTEXT_USERMANAGED) - { - prod = "7D2F387510109040002000060BECB6AB"; - sprintf(comppath, - "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\" - "Installer\\UserData\\%s\\Components\\%s", usersid, squashed); - sprintf(prodpath, - "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\" - "Installer\\Managed\\%s\\Installer\\Products\\" - "7D2F387510109040002000060BECB6AB", usersid); - } - - RegCreateKeyA(HKEY_LOCAL_MACHINE, comppath, &hkey); - - lstrcpyA(path, CURR_DIR); - lstrcatA(path, "\\"); - if (!dir) lstrcatA(path, filename); - - RegSetValueExA(hkey, prod, 0, REG_SZ, (LPBYTE)path, lstrlenA(path)); - RegCloseKey(hkey); - - RegCreateKeyA(HKEY_LOCAL_MACHINE, prodpath, &hkey); - RegCloseKey(hkey); -} - -static void delete_component_path(LPCSTR guid, MSIINSTALLCONTEXT context, LPSTR usersid) -{ - WCHAR guidW[MAX_PATH]; - WCHAR squashedW[MAX_PATH]; - WCHAR substrW[MAX_PATH]; - CHAR squashed[MAX_PATH]; - CHAR comppath[MAX_PATH]; - CHAR prodpath[MAX_PATH]; - - MultiByteToWideChar(CP_ACP, 0, guid, -1, guidW, MAX_PATH); - squash_guid(guidW, squashedW); - WideCharToMultiByte(CP_ACP, 0, squashedW, -1, squashed, MAX_PATH, NULL, NULL); - - if (context == MSIINSTALLCONTEXT_MACHINE) - { - sprintf(comppath, - "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\" - "Installer\\UserData\\S-1-5-18\\Components\\%s", squashed); - lstrcpyA(prodpath, - "SOFTWARE\\Classes\\Installer\\" - "Products\\3D0DAE300FACA1300AD792060BCDAA92"); - } - else if (context == MSIINSTALLCONTEXT_USERUNMANAGED) - { - sprintf(comppath, - "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\" - "Installer\\UserData\\%s\\Components\\%s", usersid, squashed); - sprintf(prodpath, - "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\" - "Installer\\%s\\Installer\\Products\\" - "7D2F387510109040002000060BECB6AB", usersid); - } - else if (context == MSIINSTALLCONTEXT_USERMANAGED) - { - sprintf(comppath, - "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\" - "Installer\\UserData\\%s\\Components\\%s", usersid, squashed); - sprintf(prodpath, - "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\" - "Installer\\Managed\\%s\\Installer\\Products\\" - "7D2F387510109040002000060BECB6AB", usersid); - } - - MultiByteToWideChar(CP_ACP, 0, comppath, -1, substrW, MAX_PATH); - package_RegDeleteTreeW(HKEY_LOCAL_MACHINE, substrW); - - MultiByteToWideChar(CP_ACP, 0, prodpath, -1, substrW, MAX_PATH); - package_RegDeleteTreeW(HKEY_LOCAL_MACHINE, substrW); -} - -static UINT do_query(MSIHANDLE hdb, const char *query, MSIHANDLE *phrec) -{ - MSIHANDLE hview = 0; - UINT r, ret; - - /* open a select query */ - r = MsiDatabaseOpenView(hdb, query, &hview); - if (r != ERROR_SUCCESS) - return r; - r = MsiViewExecute(hview, 0); - if (r != ERROR_SUCCESS) - return r; - ret = MsiViewFetch(hview, phrec); - r = MsiViewClose(hview); - if (r != ERROR_SUCCESS) - return r; - r = MsiCloseHandle(hview); - if (r != ERROR_SUCCESS) - return r; - return ret; -} - -static UINT run_query( MSIHANDLE hdb, const char *query ) -{ - MSIHANDLE hview = 0; - UINT r; - - r = MsiDatabaseOpenView(hdb, query, &hview); - if( r != ERROR_SUCCESS ) - return r; - - r = MsiViewExecute(hview, 0); - if( r == ERROR_SUCCESS ) - r = MsiViewClose(hview); - MsiCloseHandle(hview); - return r; -} - -static UINT create_component_table( MSIHANDLE hdb ) -{ - return run_query( hdb, - "CREATE TABLE `Component` ( " - "`Component` CHAR(72) NOT NULL, " - "`ComponentId` CHAR(38), " - "`Directory_` CHAR(72) NOT NULL, " - "`Attributes` SHORT NOT NULL, " - "`Condition` CHAR(255), " - "`KeyPath` CHAR(72) " - "PRIMARY KEY `Component`)" ); -} - -static UINT create_feature_table( MSIHANDLE hdb ) -{ - return run_query( hdb, - "CREATE TABLE `Feature` ( " - "`Feature` CHAR(38) NOT NULL, " - "`Feature_Parent` CHAR(38), " - "`Title` CHAR(64), " - "`Description` CHAR(255), " - "`Display` SHORT NOT NULL, " - "`Level` SHORT NOT NULL, " - "`Directory_` CHAR(72), " - "`Attributes` SHORT NOT NULL " - "PRIMARY KEY `Feature`)" ); -} - -static UINT create_feature_components_table( MSIHANDLE hdb ) -{ - return run_query( hdb, - "CREATE TABLE `FeatureComponents` ( " - "`Feature_` CHAR(38) NOT NULL, " - "`Component_` CHAR(72) NOT NULL " - "PRIMARY KEY `Feature_`, `Component_` )" ); -} - -static UINT create_file_table( MSIHANDLE hdb ) -{ - return run_query( hdb, - "CREATE TABLE `File` (" - "`File` CHAR(72) NOT NULL, " - "`Component_` CHAR(72) NOT NULL, " - "`FileName` CHAR(255) NOT NULL, " - "`FileSize` LONG NOT NULL, " - "`Version` CHAR(72), " - "`Language` CHAR(20), " - "`Attributes` SHORT, " - "`Sequence` SHORT NOT NULL " - "PRIMARY KEY `File`)" ); -} - -static UINT create_remove_file_table( MSIHANDLE hdb ) -{ - return run_query( hdb, - "CREATE TABLE `RemoveFile` (" - "`FileKey` CHAR(72) NOT NULL, " - "`Component_` CHAR(72) NOT NULL, " - "`FileName` CHAR(255) LOCALIZABLE, " - "`DirProperty` CHAR(72) NOT NULL, " - "`InstallMode` SHORT NOT NULL " - "PRIMARY KEY `FileKey`)" ); -} - -static UINT create_appsearch_table( MSIHANDLE hdb ) -{ - return run_query( hdb, - "CREATE TABLE `AppSearch` (" - "`Property` CHAR(72) NOT NULL, " - "`Signature_` CHAR(72) NOT NULL " - "PRIMARY KEY `Property`, `Signature_`)" ); -} - -static UINT create_reglocator_table( MSIHANDLE hdb ) -{ - return run_query( hdb, - "CREATE TABLE `RegLocator` (" - "`Signature_` CHAR(72) NOT NULL, " - "`Root` SHORT NOT NULL, " - "`Key` CHAR(255) NOT NULL, " - "`Name` CHAR(255), " - "`Type` SHORT " - "PRIMARY KEY `Signature_`)" ); -} - -static UINT create_signature_table( MSIHANDLE hdb ) -{ - return run_query( hdb, - "CREATE TABLE `Signature` (" - "`Signature` CHAR(72) NOT NULL, " - "`FileName` CHAR(255) NOT NULL, " - "`MinVersion` CHAR(20), " - "`MaxVersion` CHAR(20), " - "`MinSize` LONG, " - "`MaxSize` LONG, " - "`MinDate` LONG, " - "`MaxDate` LONG, " - "`Languages` CHAR(255) " - "PRIMARY KEY `Signature`)" ); -} - -static UINT create_launchcondition_table( MSIHANDLE hdb ) -{ - return run_query( hdb, - "CREATE TABLE `LaunchCondition` (" - "`Condition` CHAR(255) NOT NULL, " - "`Description` CHAR(255) NOT NULL " - "PRIMARY KEY `Condition`)" ); -} - -static UINT create_property_table( MSIHANDLE hdb ) -{ - return run_query( hdb, - "CREATE TABLE `Property` (" - "`Property` CHAR(72) NOT NULL, " - "`Value` CHAR(0) " - "PRIMARY KEY `Property`)" ); -} - -static UINT create_install_execute_sequence_table( MSIHANDLE hdb ) -{ - return run_query( hdb, - "CREATE TABLE `InstallExecuteSequence` (" - "`Action` CHAR(72) NOT NULL, " - "`Condition` CHAR(255), " - "`Sequence` SHORT " - "PRIMARY KEY `Action`)" ); -} - -static UINT create_media_table( MSIHANDLE hdb ) -{ - return run_query( hdb, - "CREATE TABLE `Media` (" - "`DiskId` SHORT NOT NULL, " - "`LastSequence` SHORT NOT NULL, " - "`DiskPrompt` CHAR(64), " - "`Cabinet` CHAR(255), " - "`VolumeLabel` CHAR(32), " - "`Source` CHAR(72) " - "PRIMARY KEY `DiskId`)" ); -} - -static UINT create_ccpsearch_table( MSIHANDLE hdb ) -{ - return run_query( hdb, - "CREATE TABLE `CCPSearch` (" - "`Signature_` CHAR(72) NOT NULL " - "PRIMARY KEY `Signature_`)" ); -} - -static UINT create_drlocator_table( MSIHANDLE hdb ) -{ - return run_query( hdb, - "CREATE TABLE `DrLocator` (" - "`Signature_` CHAR(72) NOT NULL, " - "`Parent` CHAR(72), " - "`Path` CHAR(255), " - "`Depth` SHORT " - "PRIMARY KEY `Signature_`, `Parent`, `Path`)" ); -} - -static UINT create_complocator_table( MSIHANDLE hdb ) -{ - return run_query( hdb, - "CREATE TABLE `CompLocator` (" - "`Signature_` CHAR(72) NOT NULL, " - "`ComponentId` CHAR(38) NOT NULL, " - "`Type` SHORT " - "PRIMARY KEY `Signature_`)" ); -} - -static UINT create_inilocator_table( MSIHANDLE hdb ) -{ - return run_query( hdb, - "CREATE TABLE `IniLocator` (" - "`Signature_` CHAR(72) NOT NULL, " - "`FileName` CHAR(255) NOT NULL, " - "`Section` CHAR(96)NOT NULL, " - "`Key` CHAR(128)NOT NULL, " - "`Field` SHORT, " - "`Type` SHORT " - "PRIMARY KEY `Signature_`)" ); -} - -#define make_add_entry(type, qtext) \ - static UINT add##_##type##_##entry( MSIHANDLE hdb, const char *values ) \ - { \ - char insert[] = qtext; \ - char *query; \ - UINT sz, r; \ - sz = strlen(values) + sizeof insert; \ - query = HeapAlloc(GetProcessHeap(),0,sz); \ - sprintf(query,insert,values); \ - r = run_query( hdb, query ); \ - HeapFree(GetProcessHeap(), 0, query); \ - return r; \ - } - -make_add_entry(component, - "INSERT INTO `Component` " - "(`Component`, `ComponentId`, `Directory_`, " - "`Attributes`, `Condition`, `KeyPath`) VALUES( %s )") - -make_add_entry(directory, - "INSERT INTO `Directory` " - "(`Directory`,`Directory_Parent`,`DefaultDir`) VALUES( %s )") - -make_add_entry(feature, - "INSERT INTO `Feature` " - "(`Feature`, `Feature_Parent`, `Title`, `Description`, " - "`Display`, `Level`, `Directory_`, `Attributes`) VALUES( %s )") - -make_add_entry(feature_components, - "INSERT INTO `FeatureComponents` " - "(`Feature_`, `Component_`) VALUES( %s )") - -make_add_entry(file, - "INSERT INTO `File` " - "(`File`, `Component_`, `FileName`, `FileSize`, " - "`Version`, `Language`, `Attributes`, `Sequence`) VALUES( %s )") - -make_add_entry(appsearch, - "INSERT INTO `AppSearch` " - "(`Property`, `Signature_`) VALUES( %s )") - -make_add_entry(reglocator, - "INSERT INTO `RegLocator` " - "(`Signature_`, `Root`, `Key`, `Name`, `Type`) VALUES( %s )") - -make_add_entry(signature, - "INSERT INTO `Signature` " - "(`Signature`, `FileName`, `MinVersion`, `MaxVersion`," - " `MinSize`, `MaxSize`, `MinDate`, `MaxDate`, `Languages`) " - "VALUES( %s )") - -make_add_entry(launchcondition, - "INSERT INTO `LaunchCondition` " - "(`Condition`, `Description`) VALUES( %s )") - -make_add_entry(property, - "INSERT INTO `Property` (`Property`, `Value`) VALUES( %s )") - -make_add_entry(install_execute_sequence, - "INSERT INTO `InstallExecuteSequence` " - "(`Action`, `Condition`, `Sequence`) VALUES( %s )") - -make_add_entry(media, - "INSERT INTO `Media` " - "(`DiskId`, `LastSequence`, `DiskPrompt`, " - "`Cabinet`, `VolumeLabel`, `Source`) VALUES( %s )") - -make_add_entry(ccpsearch, - "INSERT INTO `CCPSearch` (`Signature_`) VALUES( %s )") - -make_add_entry(drlocator, - "INSERT INTO `DrLocator` " - "(`Signature_`, `Parent`, `Path`, `Depth`) VALUES( %s )") - -make_add_entry(complocator, - "INSERT INTO `CompLocator` " - "(`Signature_`, `ComponentId`, `Type`) VALUES( %s )") - -make_add_entry(inilocator, - "INSERT INTO `IniLocator` " - "(`Signature_`, `FileName`, `Section`, `Key`, `Field`, `Type`) " - "VALUES( %s )") - -static UINT set_summary_info(MSIHANDLE hdb) -{ - UINT res; - MSIHANDLE suminfo; - - /* build summary info */ - res = MsiGetSummaryInformation(hdb, NULL, 7, &suminfo); - ok( res == ERROR_SUCCESS , "Failed to open summaryinfo\n" ); - - res = MsiSummaryInfoSetProperty(suminfo,2, VT_LPSTR, 0,NULL, - "Installation Database"); - ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - - res = MsiSummaryInfoSetProperty(suminfo,3, VT_LPSTR, 0,NULL, - "Installation Database"); - ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - - res = MsiSummaryInfoSetProperty(suminfo,4, VT_LPSTR, 0,NULL, - "Wine Hackers"); - ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - - res = MsiSummaryInfoSetProperty(suminfo,7, VT_LPSTR, 0,NULL, - ";1033"); - ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - - res = MsiSummaryInfoSetProperty(suminfo,9, VT_LPSTR, 0,NULL, - "{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}"); - ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - - res = MsiSummaryInfoSetProperty(suminfo, 14, VT_I4, 100, NULL, NULL); - ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - - res = MsiSummaryInfoSetProperty(suminfo, 15, VT_I4, 0, NULL, NULL); - ok( res == ERROR_SUCCESS , "Failed to set summary info\n" ); - - res = MsiSummaryInfoPersist(suminfo); - ok( res == ERROR_SUCCESS , "Failed to make summary info persist\n" ); - - res = MsiCloseHandle( suminfo); - ok( res == ERROR_SUCCESS , "Failed to close suminfo\n" ); - - return res; -} - - -static MSIHANDLE create_package_db(void) -{ - MSIHANDLE hdb = 0; - UINT res; - - DeleteFile(msifile); - - /* create an empty database */ - res = MsiOpenDatabase(msifile, MSIDBOPEN_CREATE, &hdb ); - ok( res == ERROR_SUCCESS , "Failed to create database\n" ); - if( res != ERROR_SUCCESS ) - return hdb; - - res = MsiDatabaseCommit( hdb ); - ok( res == ERROR_SUCCESS , "Failed to commit database\n" ); - - res = set_summary_info(hdb); - - res = run_query( hdb, - "CREATE TABLE `Directory` ( " - "`Directory` CHAR(255) NOT NULL, " - "`Directory_Parent` CHAR(255), " - "`DefaultDir` CHAR(255) NOT NULL " - "PRIMARY KEY `Directory`)" ); - ok( res == ERROR_SUCCESS , "Failed to create directory table\n" ); - - return hdb; -} - -static MSIHANDLE package_from_db(MSIHANDLE hdb) -{ - UINT res; - CHAR szPackage[10]; - MSIHANDLE hPackage; - - sprintf(szPackage,"#%i",hdb); - res = MsiOpenPackage(szPackage,&hPackage); - if (res != ERROR_SUCCESS) - return 0; - - res = MsiCloseHandle(hdb); - if (res != ERROR_SUCCESS) - return 0; - - return hPackage; -} - -static void create_test_file(const CHAR *name) -{ - HANDLE file; - DWORD written; - - file = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "Failure to open file %s\n", name); - WriteFile(file, name, strlen(name), &written, NULL); - WriteFile(file, "\n", strlen("\n"), &written, NULL); - CloseHandle(file); -} - -typedef struct _tagVS_VERSIONINFO -{ - WORD wLength; - WORD wValueLength; - WORD wType; - WCHAR szKey[1]; - WORD wPadding1[1]; - VS_FIXEDFILEINFO Value; - WORD wPadding2[1]; - WORD wChildren[1]; -} VS_VERSIONINFO; - -#define roundoffs(a, b, r) (((BYTE *)(b) - (BYTE *)(a) + ((r) - 1)) & ~((r) - 1)) -#define roundpos(a, b, r) (((BYTE *)(a)) + roundoffs(a, b, r)) - -static BOOL create_file_with_version(const CHAR *name, LONG ms, LONG ls) -{ - VS_VERSIONINFO *pVerInfo; - VS_FIXEDFILEINFO *pFixedInfo; - LPBYTE buffer, ofs; - CHAR path[MAX_PATH]; - DWORD handle, size; - HANDLE resource; - BOOL ret = FALSE; - - GetSystemDirectory(path, MAX_PATH); - /* Some dlls can't be updated on Vista/W2K8 */ - lstrcatA(path, "\\version.dll"); - - CopyFileA(path, name, FALSE); - - size = GetFileVersionInfoSize(path, &handle); - buffer = HeapAlloc(GetProcessHeap(), 0, size); - - GetFileVersionInfoA(path, 0, size, buffer); - - pVerInfo = (VS_VERSIONINFO *)buffer; - ofs = (BYTE *)&pVerInfo->szKey[lstrlenW(pVerInfo->szKey) + 1]; - pFixedInfo = (VS_FIXEDFILEINFO *)roundpos(pVerInfo, ofs, 4); - - pFixedInfo->dwFileVersionMS = ms; - pFixedInfo->dwFileVersionLS = ls; - pFixedInfo->dwProductVersionMS = ms; - pFixedInfo->dwProductVersionLS = ls; - - resource = BeginUpdateResource(name, FALSE); - if (!resource) - goto done; - - if (!UpdateResource(resource, RT_VERSION, MAKEINTRESOURCE(VS_VERSION_INFO), - MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), buffer, size)) - goto done; - - if (!EndUpdateResource(resource, FALSE)) - goto done; - - ret = TRUE; - -done: - HeapFree(GetProcessHeap(), 0, buffer); - return ret; -} - -static BOOL notify_system_change(DWORD event_type, STATEMGRSTATUS *status) -{ - RESTOREPOINTINFOA spec; - - spec.dwEventType = event_type; - spec.dwRestorePtType = APPLICATION_INSTALL; - spec.llSequenceNumber = status->llSequenceNumber; - lstrcpyA(spec.szDescription, "msitest restore point"); - - return pSRSetRestorePointA(&spec, status); -} - -static void remove_restore_point(DWORD seq_number) -{ - DWORD res; - - res = pSRRemoveRestorePoint(seq_number); - if (res != ERROR_SUCCESS) - trace("Failed to remove the restore point : %08x\n", res); -} - -static void test_createpackage(void) -{ - MSIHANDLE hPackage = 0; - UINT res; - - hPackage = package_from_db(create_package_db()); - ok( hPackage != 0, " Failed to create package\n"); - - res = MsiCloseHandle( hPackage); - ok( res == ERROR_SUCCESS , "Failed to close package\n" ); - DeleteFile(msifile); -} - -static void test_doaction( void ) -{ - MSIHANDLE hpkg; - UINT r; - - r = MsiDoAction( -1, NULL ); - ok( r == ERROR_INVALID_PARAMETER, "wrong return val\n"); - - hpkg = package_from_db(create_package_db()); - ok( hpkg, "failed to create package\n"); - - r = MsiDoAction(hpkg, NULL); - ok( r == ERROR_INVALID_PARAMETER, "wrong return val\n"); - - r = MsiDoAction(0, "boo"); - ok( r == ERROR_INVALID_HANDLE, "wrong return val\n"); - - r = MsiDoAction(hpkg, "boo"); - ok( r == ERROR_FUNCTION_NOT_CALLED, "wrong return val\n"); - - MsiCloseHandle( hpkg ); - DeleteFile(msifile); -} - -static void test_gettargetpath_bad(void) -{ - static const WCHAR boo[] = {'b','o','o',0}; - static const WCHAR empty[] = {0}; - char buffer[0x80]; - WCHAR bufferW[0x80]; - MSIHANDLE hpkg; - DWORD sz; - UINT r; - - hpkg = package_from_db(create_package_db()); - ok( hpkg, "failed to create package\n"); - - r = MsiGetTargetPath( 0, NULL, NULL, NULL ); - ok( r == ERROR_INVALID_PARAMETER, "wrong return val\n"); - - r = MsiGetTargetPath( 0, NULL, NULL, &sz ); - ok( r == ERROR_INVALID_PARAMETER, "wrong return val\n"); - - r = MsiGetTargetPath( 0, "boo", NULL, NULL ); - ok( r == ERROR_INVALID_HANDLE, "wrong return val\n"); - - r = MsiGetTargetPath( 0, "boo", NULL, NULL ); - ok( r == ERROR_INVALID_HANDLE, "wrong return val\n"); - - r = MsiGetTargetPath( hpkg, "boo", NULL, NULL ); - ok( r == ERROR_DIRECTORY, "wrong return val\n"); - - r = MsiGetTargetPath( hpkg, "boo", buffer, NULL ); - ok( r == ERROR_DIRECTORY, "wrong return val\n"); - - sz = 0; - r = MsiGetTargetPath( hpkg, "", buffer, &sz ); - ok( r == ERROR_DIRECTORY, "wrong return val\n"); - - r = MsiGetTargetPathW( 0, NULL, NULL, NULL ); - ok( r == ERROR_INVALID_PARAMETER, "wrong return val\n"); - - r = MsiGetTargetPathW( 0, NULL, NULL, &sz ); - ok( r == ERROR_INVALID_PARAMETER, "wrong return val\n"); - - r = MsiGetTargetPathW( 0, boo, NULL, NULL ); - ok( r == ERROR_INVALID_HANDLE, "wrong return val\n"); - - r = MsiGetTargetPathW( 0, boo, NULL, NULL ); - ok( r == ERROR_INVALID_HANDLE, "wrong return val\n"); - - r = MsiGetTargetPathW( hpkg, boo, NULL, NULL ); - ok( r == ERROR_DIRECTORY, "wrong return val\n"); - - r = MsiGetTargetPathW( hpkg, boo, bufferW, NULL ); - ok( r == ERROR_DIRECTORY, "wrong return val\n"); - - sz = 0; - r = MsiGetTargetPathW( hpkg, empty, bufferW, &sz ); - ok( r == ERROR_DIRECTORY, "wrong return val\n"); - - MsiCloseHandle( hpkg ); - DeleteFile(msifile); -} - -static void query_file_path(MSIHANDLE hpkg, LPCSTR file, LPSTR buff) -{ - UINT r; - DWORD size; - MSIHANDLE rec; - - rec = MsiCreateRecord( 1 ); - ok(rec, "MsiCreate record failed\n"); - - r = MsiRecordSetString( rec, 0, file ); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r ); - - size = MAX_PATH; - r = MsiFormatRecord( hpkg, rec, buff, &size ); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r ); - - MsiCloseHandle( rec ); -} - -static void test_settargetpath(void) -{ - char tempdir[MAX_PATH+8], buffer[MAX_PATH], file[MAX_PATH]; - DWORD sz; - MSIHANDLE hpkg; - UINT r; - MSIHANDLE hdb; - - hdb = create_package_db(); - ok ( hdb, "failed to create package database\n" ); - - r = add_directory_entry( hdb, "'TARGETDIR', '', 'SourceDir'" ); - ok( r == S_OK, "failed to add directory entry: %d\n" , r ); - - r = create_component_table( hdb ); - ok( r == S_OK, "cannot create Component table: %d\n", r ); - - r = add_component_entry( hdb, "'RootComp', '{83e2694d-0864-4124-9323-6d37630912a1}', 'TARGETDIR', 8, '', 'RootFile'" ); - ok( r == S_OK, "cannot add dummy component: %d\n", r ); - - r = add_component_entry( hdb, "'TestComp', '{A3FB59C8-C293-4F7E-B8C5-F0E1D8EEE4E5}', 'TestDir', 0, '', 'TestFile'" ); - ok( r == S_OK, "cannot add test component: %d\n", r ); - - r = create_feature_table( hdb ); - ok( r == S_OK, "cannot create Feature table: %d\n", r ); - - r = add_feature_entry( hdb, "'TestFeature', '', '', '', 0, 1, '', 0" ); - ok( r == ERROR_SUCCESS, "cannot add TestFeature to Feature table: %d\n", r ); - - r = create_feature_components_table( hdb ); - ok( r == S_OK, "cannot create FeatureComponents table: %d\n", r ); - - r = add_feature_components_entry( hdb, "'TestFeature', 'RootComp'" ); - ok( r == S_OK, "cannot insert component into FeatureComponents table: %d\n", r ); - - r = add_feature_components_entry( hdb, "'TestFeature', 'TestComp'" ); - ok( r == S_OK, "cannot insert component into FeatureComponents table: %d\n", r ); - - add_directory_entry( hdb, "'TestParent', 'TARGETDIR', 'TestParent'" ); - add_directory_entry( hdb, "'TestDir', 'TestParent', 'TestDir'" ); - - r = create_file_table( hdb ); - ok( r == S_OK, "cannot create File table: %d\n", r ); - - r = add_file_entry( hdb, "'RootFile', 'RootComp', 'rootfile.txt', 0, '', '1033', 8192, 1" ); - ok( r == S_OK, "cannot add file to the File table: %d\n", r ); - - r = add_file_entry( hdb, "'TestFile', 'TestComp', 'testfile.txt', 0, '', '1033', 8192, 1" ); - ok( r == S_OK, "cannot add file to the File table: %d\n", r ); - - hpkg = package_from_db( hdb ); - ok( hpkg, "failed to create package\n"); - - r = MsiDoAction( hpkg, "CostInitialize"); - ok( r == ERROR_SUCCESS, "cost init failed\n"); - - r = MsiDoAction( hpkg, "FileCost"); - ok( r == ERROR_SUCCESS, "file cost failed\n"); - - r = MsiDoAction( hpkg, "CostFinalize"); - ok( r == ERROR_SUCCESS, "cost finalize failed\n"); - - r = MsiSetTargetPath( 0, NULL, NULL ); - ok( r == ERROR_INVALID_PARAMETER, "wrong return val\n"); - - r = MsiSetTargetPath( 0, "boo", "C:\\bogusx" ); - ok( r == ERROR_INVALID_HANDLE, "wrong return val\n"); - - r = MsiSetTargetPath( hpkg, "boo", NULL ); - ok( r == ERROR_INVALID_PARAMETER, "wrong return val\n"); - - r = MsiSetTargetPath( hpkg, "boo", "c:\\bogusx" ); - ok( r == ERROR_DIRECTORY, "wrong return val\n"); - - sz = sizeof tempdir - 1; - r = MsiGetTargetPath( hpkg, "TARGETDIR", tempdir, &sz ); - sprintf( file, "%srootfile.txt", tempdir ); - buffer[0] = 0; - query_file_path( hpkg, "[#RootFile]", buffer ); - ok( r == ERROR_SUCCESS, "failed to get target path: %d\n", r); - ok( !lstrcmp(buffer, file), "Expected %s, got %s\n", file, buffer ); - - GetTempFileName( tempdir, "_wt", 0, buffer ); - sprintf( tempdir, "%s\\subdir", buffer ); - - r = MsiSetTargetPath( hpkg, "TARGETDIR", buffer ); - ok( r == ERROR_SUCCESS || r == ERROR_DIRECTORY, - "MsiSetTargetPath on file returned %d\n", r ); - - r = MsiSetTargetPath( hpkg, "TARGETDIR", tempdir ); - ok( r == ERROR_SUCCESS || r == ERROR_DIRECTORY, - "MsiSetTargetPath on 'subdir' of file returned %d\n", r ); - - DeleteFile( buffer ); - - r = MsiSetTargetPath( hpkg, "TARGETDIR", buffer ); - ok( r == ERROR_SUCCESS, "MsiSetTargetPath returned %d\n", r ); - - r = GetFileAttributes( buffer ); - ok ( r == INVALID_FILE_ATTRIBUTES, "file/directory exists after MsiSetTargetPath. Attributes: %08X\n", r ); - - r = MsiSetTargetPath( hpkg, "TARGETDIR", tempdir ); - ok( r == ERROR_SUCCESS, "MsiSetTargetPath on subsubdir returned %d\n", r ); - - sz = sizeof buffer - 1; - lstrcat( tempdir, "\\" ); - r = MsiGetTargetPath( hpkg, "TARGETDIR", buffer, &sz ); - ok( r == ERROR_SUCCESS, "failed to get target path: %d\n", r); - ok( !lstrcmp(buffer, tempdir), "Expected %s, got %s\n", tempdir, buffer); - - sprintf( file, "%srootfile.txt", tempdir ); - query_file_path( hpkg, "[#RootFile]", buffer ); - ok( !lstrcmp(buffer, file), "Expected %s, got %s\n", file, buffer); - - r = MsiSetTargetPath( hpkg, "TestParent", "C:\\one\\two" ); - ok( r == ERROR_SUCCESS, "MsiSetTargetPath returned %d\n", r ); - - query_file_path( hpkg, "[#TestFile]", buffer ); - ok( !lstrcmpi(buffer, "C:\\one\\two\\TestDir\\testfile.txt"), - "Expected C:\\one\\two\\TestDir\\testfile.txt, got %s\n", buffer ); - - sz = sizeof buffer - 1; - r = MsiGetTargetPath( hpkg, "TestParent", buffer, &sz ); - ok( r == ERROR_SUCCESS, "failed to get target path: %d\n", r); - ok( !lstrcmpi(buffer, "C:\\one\\two\\"), "Expected C:\\one\\two\\, got %s\n", buffer); - - r = MsiSetTargetPath( hpkg, "TestParent", "C:\\one\\two\\three" ); - ok( r == ERROR_SUCCESS, "MsiSetTargetPath returned %d\n", r ); - - sz = sizeof buffer - 1; - r = MsiGetTargetPath( hpkg, "TestParent", buffer, &sz ); - ok( r == ERROR_SUCCESS, "failed to get target path: %d\n", r); - ok( !lstrcmpi(buffer, "C:\\one\\two\\three\\"), "Expected C:\\one\\two\\three\\, got %s\n", buffer); - - MsiCloseHandle( hpkg ); -} - -static void test_condition(void) -{ - MSICONDITION r; - MSIHANDLE hpkg; - - hpkg = package_from_db(create_package_db()); - ok( hpkg, "failed to create package\n"); - - r = MsiEvaluateCondition(0, NULL); - ok( r == MSICONDITION_ERROR, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, NULL); - ok( r == MSICONDITION_NONE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, ""); - ok( r == MSICONDITION_NONE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "1"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "0"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "-1"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "0 = 0"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "0 <> 0"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "0 = 1"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "0 > 1"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "0 ~> 1"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "1 > 1"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "1 ~> 1"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "0 >= 1"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "0 ~>= 1"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "1 >= 1"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "1 ~>= 1"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "0 < 1"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "0 ~< 1"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "1 < 1"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "1 ~< 1"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "0 <= 1"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "0 ~<= 1"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "1 <= 1"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "1 ~<= 1"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "0 >="); - ok( r == MSICONDITION_ERROR, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, " "); - ok( r == MSICONDITION_NONE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "LicView <> \"1\""); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "LicView <> \"0\""); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "LicView <> LicView"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "not 0"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "not LicView"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "\"Testing\" ~<< \"Testing\""); - ok (r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "LicView ~<< \"Testing\""); - ok (r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "Not LicView ~<< \"Testing\""); - ok (r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "not \"A\""); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "~not \"A\""); - ok( r == MSICONDITION_ERROR, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "\"0\""); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "1 and 2"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "not 0 and 3"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "not 0 and 0"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "not 0 or 1"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "(0)"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "(((((1))))))"); - ok( r == MSICONDITION_ERROR, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "(((((1)))))"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, " \"A\" < \"B\" "); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, " \"A\" > \"B\" "); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, " \"1\" > \"12\" "); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, " \"100\" < \"21\" "); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "0 < > 0"); - ok( r == MSICONDITION_ERROR, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "(1<<1) == 2"); - ok( r == MSICONDITION_ERROR, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, " \"A\" = \"a\" "); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, " \"A\" ~ = \"a\" "); - ok( r == MSICONDITION_ERROR, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, " \"A\" ~= \"a\" "); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, " \"A\" ~= 1 "); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, " \"A\" = 1 "); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, " 1 ~= 1 "); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, " 1 ~= \"1\" "); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, " 1 = \"1\" "); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, " 0 = \"1\" "); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, " 0 < \"100\" "); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, " 100 > \"0\" "); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "1 XOR 1"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "1 IMP 1"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "1 IMP 0"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "0 IMP 0"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "0 EQV 0"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "0 EQV 1"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "1 IMP 1 OR 0"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "1 IMPL 1"); - ok( r == MSICONDITION_ERROR, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "\"ASFD\" >< \"S\" "); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "\"ASFD\" ~>< \"s\" "); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "\"ASFD\" ~>< \"\" "); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "\"ASFD\" ~>< \"sss\" "); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "mm", "5" ); - - r = MsiEvaluateCondition(hpkg, "mm = 5"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "mm < 6"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "mm <= 5"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "mm > 4"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "mm < 12"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "mm = \"5\""); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "0 = \"\""); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "0 AND \"\""); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "1 AND \"\""); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "1 AND \"1\""); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "3 >< 1"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "3 >< 4"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "NOT 0 AND 0"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "NOT 0 AND 1"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "NOT 1 OR 0"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "0 AND 1 OR 1"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "0 AND 0 OR 1"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "NOT 0 AND 1 OR 0"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "_1 = _1"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "( 1 AND 1 ) = 2"); - ok( r == MSICONDITION_ERROR, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "NOT ( 1 AND 1 )"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "NOT A AND (BBBBBBBBBB=2 OR CCC=1) AND Ddddddddd"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "Installed<>\"\""); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "NOT 1 AND 0"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "bandalmael=0"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "bandalmael<>0"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "bandalmael<0"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "bandalmael>0"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "bandalmael>=0"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "bandalmael<=0"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - r = MsiEvaluateCondition(hpkg, "bandalmael~<>0"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - MsiSetProperty(hpkg, "bandalmael", "0" ); - r = MsiEvaluateCondition(hpkg, "bandalmael=0"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - MsiSetProperty(hpkg, "bandalmael", "" ); - r = MsiEvaluateCondition(hpkg, "bandalmael=0"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "bandalmael", "asdf" ); - r = MsiEvaluateCondition(hpkg, "bandalmael=0"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "bandalmael", "0asdf" ); - r = MsiEvaluateCondition(hpkg, "bandalmael=0"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "bandalmael", "0 " ); - r = MsiEvaluateCondition(hpkg, "bandalmael=0"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "bandalmael", "-0" ); - r = MsiEvaluateCondition(hpkg, "bandalmael=0"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - MsiSetProperty(hpkg, "bandalmael", "0000000000000" ); - r = MsiEvaluateCondition(hpkg, "bandalmael=0"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - MsiSetProperty(hpkg, "bandalmael", "--0" ); - r = MsiEvaluateCondition(hpkg, "bandalmael=0"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "bandalmael", "0x00" ); - r = MsiEvaluateCondition(hpkg, "bandalmael=0"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "bandalmael", "-" ); - r = MsiEvaluateCondition(hpkg, "bandalmael=0"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "bandalmael", "+0" ); - r = MsiEvaluateCondition(hpkg, "bandalmael=0"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "bandalmael", "0.0" ); - r = MsiEvaluateCondition(hpkg, "bandalmael=0"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - r = MsiEvaluateCondition(hpkg, "bandalmael<>0"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", "hi"); - MsiSetProperty(hpkg, "two", "hithere"); - r = MsiEvaluateCondition(hpkg, "one >< two"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", "hithere"); - MsiSetProperty(hpkg, "two", "hi"); - r = MsiEvaluateCondition(hpkg, "one >< two"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", "hello"); - MsiSetProperty(hpkg, "two", "hi"); - r = MsiEvaluateCondition(hpkg, "one >< two"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", "hellohithere"); - MsiSetProperty(hpkg, "two", "hi"); - r = MsiEvaluateCondition(hpkg, "one >< two"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", ""); - MsiSetProperty(hpkg, "two", "hi"); - r = MsiEvaluateCondition(hpkg, "one >< two"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", "hi"); - MsiSetProperty(hpkg, "two", ""); - r = MsiEvaluateCondition(hpkg, "one >< two"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", ""); - MsiSetProperty(hpkg, "two", ""); - r = MsiEvaluateCondition(hpkg, "one >< two"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", "1234"); - MsiSetProperty(hpkg, "two", "1"); - r = MsiEvaluateCondition(hpkg, "one >< two"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", "one 1234"); - MsiSetProperty(hpkg, "two", "1"); - r = MsiEvaluateCondition(hpkg, "one >< two"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", "hithere"); - MsiSetProperty(hpkg, "two", "hi"); - r = MsiEvaluateCondition(hpkg, "one << two"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", "hi"); - MsiSetProperty(hpkg, "two", "hithere"); - r = MsiEvaluateCondition(hpkg, "one << two"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", "hi"); - MsiSetProperty(hpkg, "two", "hi"); - r = MsiEvaluateCondition(hpkg, "one << two"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", "abcdhithere"); - MsiSetProperty(hpkg, "two", "hi"); - r = MsiEvaluateCondition(hpkg, "one << two"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", ""); - MsiSetProperty(hpkg, "two", "hi"); - r = MsiEvaluateCondition(hpkg, "one << two"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", "hithere"); - MsiSetProperty(hpkg, "two", ""); - r = MsiEvaluateCondition(hpkg, "one << two"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", ""); - MsiSetProperty(hpkg, "two", ""); - r = MsiEvaluateCondition(hpkg, "one << two"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", "1234"); - MsiSetProperty(hpkg, "two", "1"); - r = MsiEvaluateCondition(hpkg, "one << two"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", "1234 one"); - MsiSetProperty(hpkg, "two", "1"); - r = MsiEvaluateCondition(hpkg, "one << two"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", "hithere"); - MsiSetProperty(hpkg, "two", "there"); - r = MsiEvaluateCondition(hpkg, "one >> two"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", "hithere"); - MsiSetProperty(hpkg, "two", "hi"); - r = MsiEvaluateCondition(hpkg, "one >> two"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", "there"); - MsiSetProperty(hpkg, "two", "hithere"); - r = MsiEvaluateCondition(hpkg, "one >> two"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", "there"); - MsiSetProperty(hpkg, "two", "there"); - r = MsiEvaluateCondition(hpkg, "one >> two"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", "abcdhithere"); - MsiSetProperty(hpkg, "two", "hi"); - r = MsiEvaluateCondition(hpkg, "one >> two"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", ""); - MsiSetProperty(hpkg, "two", "there"); - r = MsiEvaluateCondition(hpkg, "one >> two"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", "there"); - MsiSetProperty(hpkg, "two", ""); - r = MsiEvaluateCondition(hpkg, "one >> two"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", ""); - MsiSetProperty(hpkg, "two", ""); - r = MsiEvaluateCondition(hpkg, "one >> two"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", "1234"); - MsiSetProperty(hpkg, "two", "4"); - r = MsiEvaluateCondition(hpkg, "one >> two"); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "one", "one 1234"); - MsiSetProperty(hpkg, "two", "4"); - r = MsiEvaluateCondition(hpkg, "one >> two"); - ok( r == MSICONDITION_TRUE, "wrong return val\n"); - - MsiSetProperty(hpkg, "MsiNetAssemblySupport", NULL); /* make sure it's empty */ - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"1.1.4322\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport > \"1.1.4322\""); - ok( r == MSICONDITION_FALSE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport >= \"1.1.4322\""); - ok( r == MSICONDITION_FALSE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport <= \"1.1.4322\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport <> \"1.1.4322\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport ~< \"1.1.4322\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"abcd\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"a1.1.4322\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"1.1.4322a\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"0000001.1.4322\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"1.1.4322.1\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"1.1.4322.1.1\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "\"2\" < \"1.1"); - ok( r == MSICONDITION_ERROR, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "\"2\" < \"1.1\""); - ok( r == MSICONDITION_FALSE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "\"2\" < \"12.1\""); - ok( r == MSICONDITION_FALSE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "\"02.1\" < \"2.11\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "\"02.1.1\" < \"2.1\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"1.1\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"1\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"0\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"-1\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"a\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"!\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"!\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"/\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \" \""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"azAZ_\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"a[a]\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"a[a]a\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"[a]\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"[a]a\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"{a}\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"{a\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"[a\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"a{\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"a]\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"A\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - MsiSetProperty(hpkg, "MsiNetAssemblySupport", "1.1.4322"); - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"1.1.4322\""); - ok( r == MSICONDITION_FALSE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"1.1.14322\""); - ok( r == MSICONDITION_FALSE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"1.1.5\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"1.1\""); - ok( r == MSICONDITION_FALSE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "MsiNetAssemblySupport < \"1\""); - ok( r == MSICONDITION_FALSE, "wrong return val (%d)\n", r); - - MsiSetProperty(hpkg, "one", "1"); - r = MsiEvaluateCondition(hpkg, "one < \"1\""); - ok( r == MSICONDITION_FALSE, "wrong return val\n"); - - MsiSetProperty(hpkg, "X", "5.0"); - - r = MsiEvaluateCondition(hpkg, "X != \"\""); - ok( r == MSICONDITION_ERROR, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "X =\"5.0\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "X =\"5.1\""); - ok( r == MSICONDITION_FALSE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "X =\"6.0\""); - ok( r == MSICONDITION_FALSE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "X =\"5.0\" or X =\"5.1\" or X =\"6.0\""); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "(X =\"5.0\" or X =\"5.1\" or X =\"6.0\")"); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "X !=\"\" and (X =\"5.0\" or X =\"5.1\" or X =\"6.0\")"); - ok( r == MSICONDITION_ERROR, "wrong return val (%d)\n", r); - - /* feature doesn't exist */ - r = MsiEvaluateCondition(hpkg, "&nofeature"); - ok( r == MSICONDITION_FALSE, "wrong return val (%d)\n", r); - - MsiSetProperty(hpkg, "A", "2"); - MsiSetProperty(hpkg, "X", "50"); - - r = MsiEvaluateCondition(hpkg, "2 <= X"); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "A <= X"); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "A <= 50"); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - MsiSetProperty(hpkg, "X", "50val"); - - r = MsiEvaluateCondition(hpkg, "2 <= X"); - ok( r == MSICONDITION_FALSE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "A <= X"); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - MsiSetProperty(hpkg, "A", "7"); - MsiSetProperty(hpkg, "X", "50"); - - r = MsiEvaluateCondition(hpkg, "7 <= X"); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "A <= X"); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "A <= 50"); - ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r); - - MsiSetProperty(hpkg, "X", "50val"); - - r = MsiEvaluateCondition(hpkg, "2 <= X"); - ok( r == MSICONDITION_FALSE, "wrong return val (%d)\n", r); - - r = MsiEvaluateCondition(hpkg, "A <= X"); - ok( r == MSICONDITION_FALSE, "wrong return val (%d)\n", r); - - MsiCloseHandle( hpkg ); - DeleteFile(msifile); -} - -static BOOL check_prop_empty( MSIHANDLE hpkg, const char * prop) -{ - UINT r; - DWORD sz; - char buffer[2]; - - sz = sizeof buffer; - strcpy(buffer,"x"); - r = MsiGetProperty( hpkg, prop, buffer, &sz ); - return r == ERROR_SUCCESS && buffer[0] == 0 && sz == 0; -} - -static void test_props(void) -{ - MSIHANDLE hpkg, hdb; - UINT r; - DWORD sz; - char buffer[0x100]; - - hdb = create_package_db(); - r = run_query( hdb, - "CREATE TABLE `Property` ( " - "`Property` CHAR(255) NOT NULL, " - "`Value` CHAR(255) " - "PRIMARY KEY `Property`)" ); - ok( r == ERROR_SUCCESS , "Failed\n" ); - - r = run_query(hdb, - "INSERT INTO `Property` " - "(`Property`, `Value`) " - "VALUES( 'MetadataCompName', 'Photoshop.dll' )"); - ok( r == ERROR_SUCCESS , "Failed\n" ); - - hpkg = package_from_db( hdb ); - ok( hpkg, "failed to create package\n"); - - /* test invalid values */ - r = MsiGetProperty( 0, NULL, NULL, NULL ); - ok( r == ERROR_INVALID_PARAMETER, "wrong return val\n"); - - r = MsiGetProperty( hpkg, NULL, NULL, NULL ); - ok( r == ERROR_INVALID_PARAMETER, "wrong return val\n"); - - r = MsiGetProperty( hpkg, "boo", NULL, NULL ); - ok( r == ERROR_SUCCESS, "wrong return val\n"); - - r = MsiGetProperty( hpkg, "boo", buffer, NULL ); - ok( r == ERROR_INVALID_PARAMETER, "wrong return val\n"); - - /* test retrieving an empty/nonexistent property */ - sz = sizeof buffer; - r = MsiGetProperty( hpkg, "boo", NULL, &sz ); - ok( r == ERROR_SUCCESS, "wrong return val\n"); - ok( sz == 0, "wrong size returned\n"); - - check_prop_empty( hpkg, "boo"); - sz = 0; - strcpy(buffer,"x"); - r = MsiGetProperty( hpkg, "boo", buffer, &sz ); - ok( r == ERROR_MORE_DATA, "wrong return val\n"); - ok( !strcmp(buffer,"x"), "buffer was changed\n"); - ok( sz == 0, "wrong size returned\n"); - - sz = 1; - strcpy(buffer,"x"); - r = MsiGetProperty( hpkg, "boo", buffer, &sz ); - ok( r == ERROR_SUCCESS, "wrong return val\n"); - ok( buffer[0] == 0, "buffer was not changed\n"); - ok( sz == 0, "wrong size returned\n"); - - /* set the property to something */ - r = MsiSetProperty( 0, NULL, NULL ); - ok( r == ERROR_INVALID_HANDLE, "wrong return val\n"); - - r = MsiSetProperty( hpkg, NULL, NULL ); - ok( r == ERROR_INVALID_PARAMETER, "wrong return val\n"); - - r = MsiSetProperty( hpkg, "", NULL ); - ok( r == ERROR_SUCCESS, "wrong return val\n"); - - /* try set and get some illegal property identifiers */ - r = MsiSetProperty( hpkg, "", "asdf" ); - ok( r == ERROR_FUNCTION_FAILED, "wrong return val\n"); - - r = MsiSetProperty( hpkg, "=", "asdf" ); - ok( r == ERROR_SUCCESS, "wrong return val\n"); - - r = MsiSetProperty( hpkg, " ", "asdf" ); - ok( r == ERROR_SUCCESS, "wrong return val\n"); - - r = MsiSetProperty( hpkg, "'", "asdf" ); - ok( r == ERROR_SUCCESS, "wrong return val\n"); - - sz = sizeof buffer; - buffer[0]=0; - r = MsiGetProperty( hpkg, "'", buffer, &sz ); - ok( r == ERROR_SUCCESS, "wrong return val\n"); - ok( !strcmp(buffer,"asdf"), "buffer was not changed\n"); - - /* set empty values */ - r = MsiSetProperty( hpkg, "boo", NULL ); - ok( r == ERROR_SUCCESS, "wrong return val\n"); - ok( check_prop_empty( hpkg, "boo"), "prop wasn't empty\n"); - - r = MsiSetProperty( hpkg, "boo", "" ); - ok( r == ERROR_SUCCESS, "wrong return val\n"); - ok( check_prop_empty( hpkg, "boo"), "prop wasn't empty\n"); - - /* set a non-empty value */ - r = MsiSetProperty( hpkg, "boo", "xyz" ); - ok( r == ERROR_SUCCESS, "wrong return val\n"); - - sz = 1; - strcpy(buffer,"x"); - r = MsiGetProperty( hpkg, "boo", buffer, &sz ); - ok( r == ERROR_MORE_DATA, "wrong return val\n"); - ok( buffer[0] == 0, "buffer was not changed\n"); - ok( sz == 3, "wrong size returned\n"); - - sz = 4; - strcpy(buffer,"x"); - r = MsiGetProperty( hpkg, "boo", buffer, &sz ); - ok( r == ERROR_SUCCESS, "wrong return val\n"); - ok( !strcmp(buffer,"xyz"), "buffer was not changed\n"); - ok( sz == 3, "wrong size returned\n"); - - sz = 3; - strcpy(buffer,"x"); - r = MsiGetProperty( hpkg, "boo", buffer, &sz ); - ok( r == ERROR_MORE_DATA, "wrong return val\n"); - ok( !strcmp(buffer,"xy"), "buffer was not changed\n"); - ok( sz == 3, "wrong size returned\n"); - - r = MsiSetProperty(hpkg, "SourceDir", "foo"); - ok( r == ERROR_SUCCESS, "wrong return val\n"); - - sz = 4; - r = MsiGetProperty(hpkg, "SOURCEDIR", buffer, &sz); - ok( r == ERROR_SUCCESS, "wrong return val\n"); - ok( !strcmp(buffer,""), "buffer wrong\n"); - ok( sz == 0, "wrong size returned\n"); - - sz = 4; - r = MsiGetProperty(hpkg, "SOMERANDOMNAME", buffer, &sz); - ok( r == ERROR_SUCCESS, "wrong return val\n"); - ok( !strcmp(buffer,""), "buffer wrong\n"); - ok( sz == 0, "wrong size returned\n"); - - sz = 4; - r = MsiGetProperty(hpkg, "SourceDir", buffer, &sz); - ok( r == ERROR_SUCCESS, "wrong return val\n"); - ok( !strcmp(buffer,"foo"), "buffer wrong\n"); - ok( sz == 3, "wrong size returned\n"); - - r = MsiSetProperty(hpkg, "MetadataCompName", "Photoshop.dll"); - ok( r == ERROR_SUCCESS, "wrong return val\n"); - - sz = 0; - r = MsiGetProperty(hpkg, "MetadataCompName", NULL, &sz ); - ok( r == ERROR_SUCCESS, "return wrong\n"); - ok( sz == 13, "size wrong (%d)\n", sz); - - sz = 13; - r = MsiGetProperty(hpkg, "MetadataCompName", buffer, &sz ); - ok( r == ERROR_MORE_DATA, "return wrong\n"); - ok( !strcmp(buffer,"Photoshop.dl"), "buffer wrong\n"); - - r = MsiSetProperty(hpkg, "property", "value"); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - sz = 6; - r = MsiGetProperty(hpkg, "property", buffer, &sz); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok( !strcmp(buffer, "value"), "Expected value, got %s\n", buffer); - - r = MsiSetProperty(hpkg, "property", NULL); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - sz = 6; - r = MsiGetProperty(hpkg, "property", buffer, &sz); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok( !strlen(buffer), "Expected empty string, got %s\n", buffer); - - MsiCloseHandle( hpkg ); - DeleteFile(msifile); -} - -static BOOL find_prop_in_property(MSIHANDLE hdb, LPCSTR prop, LPCSTR val) -{ - MSIHANDLE hview, hrec; - BOOL found; - CHAR buffer[MAX_PATH]; - DWORD sz; - UINT r; - - r = MsiDatabaseOpenView(hdb, "SELECT * FROM `_Property`", &hview); - ok(r == ERROR_SUCCESS, "MsiDatabaseOpenView failed\n"); - r = MsiViewExecute(hview, 0); - ok(r == ERROR_SUCCESS, "MsiViewExecute failed\n"); - - found = FALSE; - while (r == ERROR_SUCCESS && !found) - { - r = MsiViewFetch(hview, &hrec); - if (r != ERROR_SUCCESS) break; - - sz = MAX_PATH; - r = MsiRecordGetString(hrec, 1, buffer, &sz); - if (r == ERROR_SUCCESS && !lstrcmpA(buffer, prop)) - { - sz = MAX_PATH; - r = MsiRecordGetString(hrec, 2, buffer, &sz); - if (r == ERROR_SUCCESS && !lstrcmpA(buffer, val)) - found = TRUE; - } - - MsiCloseHandle(hrec); - } - - MsiViewClose(hview); - MsiCloseHandle(hview); - - return found; -} - -static void test_property_table(void) -{ - const char *query; - UINT r; - MSIHANDLE hpkg, hdb, hrec; - char buffer[MAX_PATH], package[10]; - DWORD sz; - BOOL found; - - hdb = create_package_db(); - ok( hdb, "failed to create package\n"); - - hpkg = package_from_db(hdb); - ok( hpkg, "failed to create package\n"); - - MsiCloseHandle(hdb); - - hdb = MsiGetActiveDatabase(hpkg); - - query = "CREATE TABLE `_Property` ( " - "`foo` INT NOT NULL, `bar` INT LOCALIZABLE PRIMARY KEY `foo`)"; - r = run_query(hdb, query); - ok(r == ERROR_BAD_QUERY_SYNTAX, "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r); - - MsiCloseHandle(hdb); - MsiCloseHandle(hpkg); - DeleteFile(msifile); - - hdb = create_package_db(); - ok( hdb, "failed to create package\n"); - - query = "CREATE TABLE `_Property` ( " - "`foo` INT NOT NULL, `bar` INT LOCALIZABLE PRIMARY KEY `foo`)"; - r = run_query(hdb, query); - ok(r == ERROR_SUCCESS, "failed to create table\n"); - - query = "ALTER `_Property` ADD `foo` INTEGER"; - r = run_query(hdb, query); - ok(r == ERROR_BAD_QUERY_SYNTAX, "failed to add column\n"); - - query = "ALTER TABLE `_Property` ADD `foo` INTEGER"; - r = run_query(hdb, query); - ok(r == ERROR_BAD_QUERY_SYNTAX, "failed to add column\n"); - - query = "ALTER TABLE `_Property` ADD `extra` INTEGER"; - r = run_query(hdb, query); - ok(r == ERROR_SUCCESS, "failed to add column\n"); - - sprintf(package, "#%i", hdb); - r = MsiOpenPackage(package, &hpkg); - todo_wine ok(r != ERROR_SUCCESS, "MsiOpenPackage succeeded\n"); - if (r == ERROR_SUCCESS) - MsiCloseHandle(hpkg); - - r = MsiCloseHandle(hdb); - ok(r == ERROR_SUCCESS, "MsiCloseHandle failed %u\n", r); - - hdb = create_package_db(); - ok (hdb, "failed to create package database\n"); - - r = create_property_table(hdb); - ok(r == ERROR_SUCCESS, "cannot create Property table: %d\n", r); - - r = add_property_entry(hdb, "'prop', 'val'"); - ok(r == ERROR_SUCCESS, "cannot add property: %d\n", r); - - hpkg = package_from_db(hdb); - ok(hpkg, "failed to create package\n"); - - MsiCloseHandle(hdb); - - sz = MAX_PATH; - r = MsiGetProperty(hpkg, "prop", buffer, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmp(buffer, "val"), "Expected val, got %s\n", buffer); - - hdb = MsiGetActiveDatabase(hpkg); - - found = find_prop_in_property(hdb, "prop", "val"); - ok(found, "prop should be in the _Property table\n"); - - r = add_property_entry(hdb, "'dantes', 'mercedes'"); - ok(r == ERROR_SUCCESS, "cannot add property: %d\n", r); - - query = "SELECT * FROM `_Property` WHERE `Property` = 'dantes'"; - r = do_query(hdb, query, &hrec); - ok(r == ERROR_BAD_QUERY_SYNTAX, "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r); - - found = find_prop_in_property(hdb, "dantes", "mercedes"); - ok(found == FALSE, "dantes should not be in the _Property table\n"); - - sz = MAX_PATH; - lstrcpy(buffer, "aaa"); - r = MsiGetProperty(hpkg, "dantes", buffer, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(lstrlenA(buffer) == 0, "Expected empty string, got %s\n", buffer); - - r = MsiSetProperty(hpkg, "dantes", "mercedes"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - found = find_prop_in_property(hdb, "dantes", "mercedes"); - ok(found == TRUE, "dantes should be in the _Property table\n"); - - MsiCloseHandle(hdb); - MsiCloseHandle(hpkg); - DeleteFile(msifile); -} - -static UINT try_query_param( MSIHANDLE hdb, LPCSTR szQuery, MSIHANDLE hrec ) -{ - MSIHANDLE htab = 0; - UINT res; - - res = MsiDatabaseOpenView( hdb, szQuery, &htab ); - if( res == ERROR_SUCCESS ) - { - UINT r; - - r = MsiViewExecute( htab, hrec ); - if( r != ERROR_SUCCESS ) - { - res = r; - fprintf(stderr,"MsiViewExecute failed %08x\n", res); - } - - r = MsiViewClose( htab ); - if( r != ERROR_SUCCESS ) - res = r; - - r = MsiCloseHandle( htab ); - if( r != ERROR_SUCCESS ) - res = r; - } - return res; -} - -static UINT try_query( MSIHANDLE hdb, LPCSTR szQuery ) -{ - return try_query_param( hdb, szQuery, 0 ); -} - -static void set_summary_str(MSIHANDLE hdb, DWORD pid, LPCSTR value) -{ - MSIHANDLE summary; - UINT r; - - r = MsiGetSummaryInformationA(hdb, NULL, 1, &summary); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiSummaryInfoSetPropertyA(summary, pid, VT_LPSTR, 0, NULL, value); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - r = MsiSummaryInfoPersist(summary); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - MsiCloseHandle(summary); -} - -static void set_summary_dword(MSIHANDLE hdb, DWORD pid, DWORD value) -{ - MSIHANDLE summary; - UINT r; - - r = MsiGetSummaryInformationA(hdb, NULL, 1, &summary); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiSummaryInfoSetPropertyA(summary, pid, VT_I4, value, NULL, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - r = MsiSummaryInfoPersist(summary); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - MsiCloseHandle(summary); -} - -static void test_msipackage(void) -{ - MSIHANDLE hdb = 0, hpack = 100; - UINT r; - const char *query; - char name[10]; - - /* NULL szPackagePath */ - r = MsiOpenPackage(NULL, &hpack); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* empty szPackagePath */ - r = MsiOpenPackage("", &hpack); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - } - - if (r == ERROR_SUCCESS) - MsiCloseHandle(hpack); - - /* nonexistent szPackagePath */ - r = MsiOpenPackage("nonexistent", &hpack); - ok(r == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", r); - - /* NULL hProduct */ - r = MsiOpenPackage(msifile, NULL); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - name[0]='#'; - name[1]=0; - r = MsiOpenPackage(name, &hpack); - ok(r == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", r); - - r = MsiOpenDatabase(msifile, MSIDBOPEN_CREATE, &hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* database exists, but is emtpy */ - sprintf(name, "#%d", hdb); - r = MsiOpenPackage(name, &hpack); - ok(r == ERROR_INSTALL_PACKAGE_INVALID, - "Expected ERROR_INSTALL_PACKAGE_INVALID, got %d\n", r); - - query = "CREATE TABLE `Property` ( " - "`Property` CHAR(72), `Value` CHAR(0) " - "PRIMARY KEY `Property`)"; - r = try_query(hdb, query); - ok(r == ERROR_SUCCESS, "failed to create Properties table\n"); - - query = "CREATE TABLE `InstallExecuteSequence` (" - "`Action` CHAR(72), `Condition` CHAR(0), `Sequence` INTEGER " - "PRIMARY KEY `Action`)"; - r = try_query(hdb, query); - ok(r == ERROR_SUCCESS, "failed to create InstallExecuteSequence table\n"); - - /* a few key tables exist */ - sprintf(name, "#%d", hdb); - r = MsiOpenPackage(name, &hpack); - ok(r == ERROR_INSTALL_PACKAGE_INVALID, - "Expected ERROR_INSTALL_PACKAGE_INVALID, got %d\n", r); - - MsiCloseHandle(hdb); - DeleteFile(msifile); - - /* start with a clean database to show what constitutes a valid package */ - r = MsiOpenDatabase(msifile, MSIDBOPEN_CREATE, &hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - sprintf(name, "#%d", hdb); - - /* The following summary information props must exist: - * - PID_REVNUMBER - * - PID_PAGECOUNT - */ - - set_summary_dword(hdb, PID_PAGECOUNT, 100); - r = MsiOpenPackage(name, &hpack); - ok(r == ERROR_INSTALL_PACKAGE_INVALID, - "Expected ERROR_INSTALL_PACKAGE_INVALID, got %d\n", r); - - set_summary_str(hdb, PID_REVNUMBER, "{004757CD-5092-49c2-AD20-28E1CE0DF5F2}"); - r = MsiOpenPackage(name, &hpack); - ok(r == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got %d\n", r); - - MsiCloseHandle(hpack); - MsiCloseHandle(hdb); - DeleteFile(msifile); -} - -static void test_formatrecord2(void) -{ - MSIHANDLE hpkg, hrec ; - char buffer[0x100]; - DWORD sz; - UINT r; - - hpkg = package_from_db(create_package_db()); - ok( hpkg, "failed to create package\n"); - - r = MsiSetProperty(hpkg, "Manufacturer", " " ); - ok( r == ERROR_SUCCESS, "set property failed\n"); - - hrec = MsiCreateRecord(2); - ok(hrec, "create record failed\n"); - - r = MsiRecordSetString( hrec, 0, "[ProgramFilesFolder][Manufacturer]\\asdf"); - ok( r == ERROR_SUCCESS, "format record failed\n"); - - buffer[0] = 0; - sz = sizeof buffer; - r = MsiFormatRecord( hpkg, hrec, buffer, &sz ); - - r = MsiRecordSetString(hrec, 0, "[foo][1]"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(hpkg, hrec, buffer, &sz); - ok( sz == 3, "size wrong\n"); - ok( 0 == strcmp(buffer,"hoo"), "wrong output %s\n",buffer); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "x[~]x"); - sz = sizeof buffer; - r = MsiFormatRecord(hpkg, hrec, buffer, &sz); - ok( sz == 3, "size wrong\n"); - ok( 0 == strcmp(buffer,"x"), "wrong output %s\n",buffer); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "[foo.$%}][1]"); - r = MsiRecordSetString(hrec, 1, "hoo"); - sz = sizeof buffer; - r = MsiFormatRecord(hpkg, hrec, buffer, &sz); - ok( sz == 3, "size wrong\n"); - ok( 0 == strcmp(buffer,"hoo"), "wrong output %s\n",buffer); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "[\\[]"); - sz = sizeof buffer; - r = MsiFormatRecord(hpkg, hrec, buffer, &sz); - ok( sz == 1, "size wrong\n"); - ok( 0 == strcmp(buffer,"["), "wrong output %s\n",buffer); - ok( r == ERROR_SUCCESS, "format failed\n"); - - SetEnvironmentVariable("FOO", "BAR"); - r = MsiRecordSetString(hrec, 0, "[%FOO]"); - sz = sizeof buffer; - r = MsiFormatRecord(hpkg, hrec, buffer, &sz); - ok( sz == 3, "size wrong\n"); - ok( 0 == strcmp(buffer,"BAR"), "wrong output %s\n",buffer); - ok( r == ERROR_SUCCESS, "format failed\n"); - - r = MsiRecordSetString(hrec, 0, "[[1]]"); - r = MsiRecordSetString(hrec, 1, "%FOO"); - sz = sizeof buffer; - r = MsiFormatRecord(hpkg, hrec, buffer, &sz); - ok( sz == 3, "size wrong\n"); - ok( 0 == strcmp(buffer,"BAR"), "wrong output %s\n",buffer); - ok( r == ERROR_SUCCESS, "format failed\n"); - - MsiCloseHandle( hrec ); - MsiCloseHandle( hpkg ); - DeleteFile(msifile); -} - -static void test_states(void) -{ - MSIHANDLE hpkg; - UINT r; - MSIHANDLE hdb; - INSTALLSTATE state, action; - - static const CHAR msifile2[] = "winetest2-package.msi"; - static const CHAR msifile3[] = "winetest3-package.msi"; - static const CHAR msifile4[] = "winetest4-package.msi"; - - hdb = create_package_db(); - ok ( hdb, "failed to create package database\n" ); - - r = add_directory_entry( hdb, "'TARGETDIR', '', 'SourceDir'"); - ok( r == ERROR_SUCCESS, "cannot add directory: %d\n", r ); - - r = create_property_table( hdb ); - ok( r == ERROR_SUCCESS, "cannot create Property table: %d\n", r ); - - r = add_property_entry( hdb, "'ProductCode', '{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}'" ); - ok( r == ERROR_SUCCESS, "cannot add property entry: %d\n", r ); - - r = add_property_entry( hdb, "'ProductLanguage', '1033'" ); - ok( r == ERROR_SUCCESS, "cannot add property entry: %d\n", r ); - - r = add_property_entry( hdb, "'ProductName', 'MSITEST'" ); - ok( r == ERROR_SUCCESS, "cannot add property entry: %d\n", r ); - - r = add_property_entry( hdb, "'ProductVersion', '1.1.1'" ); - ok( r == ERROR_SUCCESS, "cannot add property entry: %d\n", r ); - - r = create_install_execute_sequence_table( hdb ); - ok( r == ERROR_SUCCESS, "cannot create InstallExecuteSequence table: %d\n", r ); - - r = add_install_execute_sequence_entry( hdb, "'CostInitialize', '', '800'" ); - ok( r == ERROR_SUCCESS, "cannot add install execute sequence entry: %d\n", r ); - - r = add_install_execute_sequence_entry( hdb, "'FileCost', '', '900'" ); - ok( r == ERROR_SUCCESS, "cannot add install execute sequence entry: %d\n", r ); - - r = add_install_execute_sequence_entry( hdb, "'CostFinalize', '', '1000'" ); - ok( r == ERROR_SUCCESS, "cannot add install execute sequence entry: %d\n", r ); - - r = add_install_execute_sequence_entry( hdb, "'InstallValidate', '', '1400'" ); - ok( r == ERROR_SUCCESS, "cannot add install execute sequence entry: %d\n", r ); - - r = add_install_execute_sequence_entry( hdb, "'InstallInitialize', '', '1500'" ); - ok( r == ERROR_SUCCESS, "cannot add install execute sequence entry: %d\n", r ); - - r = add_install_execute_sequence_entry( hdb, "'ProcessComponents', '', '1600'" ); - ok( r == ERROR_SUCCESS, "cannot add install execute sequence entry: %d\n", r ); - - r = add_install_execute_sequence_entry( hdb, "'UnpublishFeatures', '', '1800'" ); - ok( r == ERROR_SUCCESS, "cannot add install execute sequence entry: %d\n", r ); - - r = add_install_execute_sequence_entry( hdb, "'RegisterProduct', '', '6100'" ); - ok( r == ERROR_SUCCESS, "cannot add install execute sequence entry: %d\n", r ); - - r = add_install_execute_sequence_entry( hdb, "'PublishFeatures', '', '6300'" ); - ok( r == ERROR_SUCCESS, "cannot add install execute sequence entry: %d\n", r ); - - r = add_install_execute_sequence_entry( hdb, "'PublishProduct', '', '6400'" ); - ok( r == ERROR_SUCCESS, "cannot add install execute sequence entry: %d\n", r ); - - r = add_install_execute_sequence_entry( hdb, "'InstallFinalize', '', '6600'" ); - ok( r == ERROR_SUCCESS, "cannot add install execute sequence entry: %d\n", r ); - - r = create_media_table( hdb ); - ok( r == ERROR_SUCCESS, "cannot create media table: %d\n", r ); - - r = add_media_entry( hdb, "'1', '3', '', '', 'DISK1', ''"); - ok( r == ERROR_SUCCESS, "cannot add media entry: %d\n", r ); - - r = create_feature_table( hdb ); - ok( r == ERROR_SUCCESS, "cannot create Feature table: %d\n", r ); - - r = create_component_table( hdb ); - ok( r == ERROR_SUCCESS, "cannot create Component table: %d\n", r ); - - /* msidbFeatureAttributesFavorLocal */ - r = add_feature_entry( hdb, "'one', '', '', '', 2, 1, '', 0" ); - ok( r == ERROR_SUCCESS, "cannot add feature: %d\n", r ); - - /* msidbFeatureAttributesFavorLocal:msidbComponentAttributesLocalOnly */ - r = add_component_entry( hdb, "'alpha', '{467EC132-739D-4784-A37B-677AA43DBC94}', 'TARGETDIR', 0, '', 'alpha_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorLocal:msidbComponentAttributesSourceOnly */ - r = add_component_entry( hdb, "'beta', '{2C1F189C-24A6-4C34-B26B-994A6C026506}', 'TARGETDIR', 1, '', 'beta_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorLocal:msidbComponentAttributesOptional */ - r = add_component_entry( hdb, "'gamma', '{C271E2A4-DE2E-4F70-86D1-6984AF7DE2CA}', 'TARGETDIR', 2, '', 'gamma_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorLocal:msidbComponentAttributesSharedDllRefCount */ - r = add_component_entry( hdb, "'theta', '{4EB3129D-81A8-48D5-9801-75600FED3DD9}', 'TARGETDIR', 8, '', 'theta_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorSource */ - r = add_feature_entry( hdb, "'two', '', '', '', 2, 1, '', 1" ); - ok( r == ERROR_SUCCESS, "cannot add feature: %d\n", r ); - - /* msidbFeatureAttributesFavorSource:msidbComponentAttributesLocalOnly */ - r = add_component_entry( hdb, "'delta', '{938FD4F2-C648-4259-A03C-7AA3B45643F3}', 'TARGETDIR', 0, '', 'delta_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorSource:msidbComponentAttributesSourceOnly */ - r = add_component_entry( hdb, "'epsilon', '{D59713B6-C11D-47F2-A395-1E5321781190}', 'TARGETDIR', 1, '', 'epsilon_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorSource:msidbComponentAttributesOptional */ - r = add_component_entry( hdb, "'zeta', '{377D33AB-2FAA-42B9-A629-0C0DAE9B9C7A}', 'TARGETDIR', 2, '', 'zeta_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorSource:msidbComponentAttributesSharedDllRefCount */ - r = add_component_entry( hdb, "'iota', '{5D36F871-B5ED-4801-9E0F-C46B9E5C9669}', 'TARGETDIR', 8, '', 'iota_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorSource */ - r = add_feature_entry( hdb, "'three', '', '', '', 2, 1, '', 1" ); - ok( r == ERROR_SUCCESS, "cannot add feature: %d\n", r ); - - /* msidbFeatureAttributesFavorLocal */ - r = add_feature_entry( hdb, "'four', '', '', '', 2, 1, '', 0" ); - ok( r == ERROR_SUCCESS, "cannot add feature: %d\n", r ); - - /* disabled */ - r = add_feature_entry( hdb, "'five', '', '', '', 2, 0, '', 1" ); - ok( r == ERROR_SUCCESS, "cannot add feature: %d\n", r ); - - /* msidbFeatureAttributesFavorSource:msidbComponentAttributesSourceOnly */ - r = add_component_entry( hdb, "'eta', '{DD89003F-0DD4-41B8-81C0-3411A7DA2695}', 'TARGETDIR', 1, '', 'eta_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* no feature parent:msidbComponentAttributesLocalOnly */ - r = add_component_entry( hdb, "'kappa', '{D6B93DC3-8DA5-4769-9888-42BFE156BB8B}', 'TARGETDIR', 1, '', 'kappa_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorLocal:removed */ - r = add_feature_entry( hdb, "'six', '', '', '', 2, 1, '', 0" ); - ok( r == ERROR_SUCCESS, "cannot add feature: %d\n", r ); - - /* msidbFeatureAttributesFavorLocal:removed:msidbComponentAttributesLocalOnly */ - r = add_component_entry( hdb, "'lambda', '{6528C5E4-02A4-4636-A214-7A66A6C35B64}', 'TARGETDIR', 0, '', 'lambda_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorLocal:removed:msidbComponentAttributesSourceOnly */ - r = add_component_entry( hdb, "'mu', '{97014BAB-6C56-4013-9A63-2BF913B42519}', 'TARGETDIR', 1, '', 'mu_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorLocal:removed:msidbComponentAttributesOptional */ - r = add_component_entry( hdb, "'nu', '{943DD0D8-5808-4954-8526-3B8493FEDDCD}', 'TARGETDIR', 2, '', 'nu_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorLocal:removed:msidbComponentAttributesSharedDllRefCount */ - r = add_component_entry( hdb, "'xi', '{D6CF9EF7-6FCF-4930-B34B-F938AEFF9BDB}', 'TARGETDIR', 8, '', 'xi_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorSource:removed */ - r = add_feature_entry( hdb, "'seven', '', '', '', 2, 1, '', 1" ); - ok( r == ERROR_SUCCESS, "cannot add feature: %d\n", r ); - - /* msidbFeatureAttributesFavorSource:removed:msidbComponentAttributesLocalOnly */ - r = add_component_entry( hdb, "'omicron', '{7B57521D-15DB-4141-9AA6-01D934A4433F}', 'TARGETDIR', 0, '', 'omicron_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorSource:removed:msidbComponentAttributesSourceOnly */ - r = add_component_entry( hdb, "'pi', '{FB85346B-378E-4492-8769-792305471C81}', 'TARGETDIR', 1, '', 'pi_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorSource:removed:msidbComponentAttributesOptional */ - r = add_component_entry( hdb, "'rho', '{798F2047-7B0C-4783-8BB0-D703E554114B}', 'TARGETDIR', 2, '', 'rho_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorSource:removed:msidbComponentAttributesSharedDllRefCount */ - r = add_component_entry( hdb, "'sigma', '{5CE9DDA8-B67B-4736-9D93-99D61C5B93E7}', 'TARGETDIR', 8, '', 'sigma_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorLocal */ - r = add_feature_entry( hdb, "'eight', '', '', '', 2, 1, '', 0" ); - ok( r == ERROR_SUCCESS, "cannot add feature: %d\n", r ); - - r = add_component_entry( hdb, "'tau', '{07DEB510-677C-4A6F-A0A6-7CD8EFEA77ED}', 'TARGETDIR', 1, '', 'tau_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorSource */ - r = add_feature_entry( hdb, "'nine', '', '', '', 2, 1, '', 1" ); - ok( r == ERROR_SUCCESS, "cannot add feature: %d\n", r ); - - r = add_component_entry( hdb, "'phi', '{9F0594C5-35AD-43EA-94DD-8DF73FAA664D}', 'TARGETDIR', 1, '', 'phi_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorAdvertise */ - r = add_feature_entry( hdb, "'ten', '', '', '', 2, 1, '', 4" ); - ok( r == ERROR_SUCCESS, "cannot add feature: %d\n", r ); - - r = add_component_entry( hdb, "'chi', '{E6B539AB-5DA9-4236-A2D2-E341A50B4C38}', 'TARGETDIR', 1, '', 'chi_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - r = create_feature_components_table( hdb ); - ok( r == ERROR_SUCCESS, "cannot create FeatureComponents table: %d\n", r ); - - r = add_feature_components_entry( hdb, "'one', 'alpha'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'one', 'beta'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'one', 'gamma'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'one', 'theta'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'two', 'delta'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'two', 'epsilon'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'two', 'zeta'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'two', 'iota'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'three', 'eta'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'four', 'eta'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'five', 'eta'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'six', 'lambda'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'six', 'mu'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'six', 'nu'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'six', 'xi'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'seven', 'omicron'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'seven', 'pi'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'seven', 'rho'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'seven', 'sigma'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'eight', 'tau'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'nine', 'phi'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'ten', 'chi'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = create_file_table( hdb ); - ok( r == ERROR_SUCCESS, "cannot create File table: %d\n", r ); - - r = add_file_entry( hdb, "'alpha_file', 'alpha', 'alpha.txt', 100, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'beta_file', 'beta', 'beta.txt', 0, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'gamma_file', 'gamma', 'gamma.txt', 0, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'theta_file', 'theta', 'theta.txt', 0, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'delta_file', 'delta', 'delta.txt', 0, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'epsilon_file', 'epsilon', 'epsilon.txt', 0, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'zeta_file', 'zeta', 'zeta.txt', 0, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'iota_file', 'iota', 'iota.txt', 0, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - /* compressed file */ - r = add_file_entry( hdb, "'eta_file', 'eta', 'eta.txt', 0, '', '1033', 16384, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'kappa_file', 'kappa', 'kappa.txt', 0, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'lambda_file', 'lambda', 'lambda.txt', 100, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'mu_file', 'mu', 'mu.txt', 100, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'nu_file', 'nu', 'nu.txt', 100, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'xi_file', 'xi', 'xi.txt', 100, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'omicron_file', 'omicron', 'omicron.txt', 100, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'pi_file', 'pi', 'pi.txt', 100, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'rho_file', 'rho', 'rho.txt', 100, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'sigma_file', 'sigma', 'sigma.txt', 100, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'tau_file', 'tau', 'tau.txt', 100, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'phi_file', 'phi', 'phi.txt', 100, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'chi_file', 'chi', 'chi.txt', 100, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - MsiDatabaseCommit(hdb); - - /* these properties must not be in the saved msi file */ - r = add_property_entry( hdb, "'ADDLOCAL', 'one,four'"); - ok( r == ERROR_SUCCESS, "cannot add property: %d\n", r ); - - r = add_property_entry( hdb, "'ADDSOURCE', 'two,three'"); - ok( r == ERROR_SUCCESS, "cannot add property: %d\n", r ); - - r = add_property_entry( hdb, "'REMOVE', 'six,seven'"); - ok( r == ERROR_SUCCESS, "cannot add property: %d\n", r ); - - r = add_property_entry( hdb, "'REINSTALL', 'eight,nine,ten'"); - ok( r == ERROR_SUCCESS, "cannot add property: %d\n", r ); - - r = add_property_entry( hdb, "'REINSTALLMODE', 'omus'"); - ok( r == ERROR_SUCCESS, "cannot add property: %d\n", r ); - - hpkg = package_from_db( hdb ); - ok( hpkg, "failed to create package\n"); - - MsiCloseHandle(hdb); - - CopyFileA(msifile, msifile2, FALSE); - CopyFileA(msifile, msifile3, FALSE); - CopyFileA(msifile, msifile4, FALSE); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "one", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "two", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "three", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "four", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "five", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "six", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "seven", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "eight", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "nine", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "ten", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "alpha", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "beta", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "gamma", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "theta", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "delta", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "epsilon", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "zeta", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "iota", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "eta", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "kappa", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "lambda", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "mu", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "nu", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "xi", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "omicron", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "pi", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "rho", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "sigma", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "tau", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "phi", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "chi", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - r = MsiDoAction( hpkg, "CostInitialize"); - ok( r == ERROR_SUCCESS, "cost init failed\n"); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "one", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "two", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "three", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "four", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "five", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "six", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "seven", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "eight", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "nine", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "ten", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "alpha", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "beta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "gamma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "theta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "delta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "epsilon", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "zeta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "iota", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "eta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "kappa", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "lambda", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "mu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "nu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "xi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "omicron", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "pi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "rho", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "sigma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "tau", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "phi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "chi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - r = MsiDoAction( hpkg, "FileCost"); - ok( r == ERROR_SUCCESS, "file cost failed\n"); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "one", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "two", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "three", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "four", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "five", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "six", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "seven", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "eight", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "nine", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "ten", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "alpha", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "beta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "gamma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "theta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "delta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "epsilon", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "zeta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "iota", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "eta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "kappa", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "lambda", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "mu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "nu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "xi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "omicron", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "pi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "rho", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "sigma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "tau", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "phi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "chi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - r = MsiDoAction( hpkg, "CostFinalize"); - ok( r == ERROR_SUCCESS, "cost finalize failed: %d\n", r); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "one", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "two", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "three", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "four", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "five", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "six", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "seven", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "eight", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "nine", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "ten", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "alpha", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "beta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "gamma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "theta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "delta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "epsilon", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "zeta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "iota", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "eta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "kappa", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "lambda", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "mu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "nu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "xi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "omicron", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "pi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "rho", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "sigma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "tau", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "phi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "chi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - MsiCloseHandle( hpkg ); - - /* publish the features and components */ - r = MsiInstallProduct(msifile, "ADDLOCAL=one,four ADDSOURCE=two,three REMOVE=six,seven REINSTALL=eight,nine,ten"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiOpenDatabase(msifile, MSIDBOPEN_DIRECT, &hdb); - ok(r == ERROR_SUCCESS, "failed to open database: %d\n", r); - - /* these properties must not be in the saved msi file */ - r = add_property_entry( hdb, "'ADDLOCAL', 'one,four'"); - ok( r == ERROR_SUCCESS, "cannot add property: %d\n", r ); - - r = add_property_entry( hdb, "'ADDSOURCE', 'two,three'"); - ok( r == ERROR_SUCCESS, "cannot add property: %d\n", r ); - - r = add_property_entry( hdb, "'REMOVE', 'six,seven'"); - ok( r == ERROR_SUCCESS, "cannot add property: %d\n", r ); - - r = add_property_entry( hdb, "'REINSTALL', 'eight,nine,ten'"); - ok( r == ERROR_SUCCESS, "cannot add property: %d\n", r ); - - hpkg = package_from_db( hdb ); - ok( hpkg, "failed to create package\n"); - - MsiCloseHandle(hdb); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "one", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "two", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "three", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "four", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "five", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "six", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "seven", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "eight", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "nine", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "ten", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "alpha", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "beta", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "gamma", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "theta", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "delta", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "epsilon", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "zeta", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "iota", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "eta", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "kappa", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "lambda", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "mu", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "nu", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "xi", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "omicron", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "pi", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "rho", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "sigma", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "tau", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "phi", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "chi", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - r = MsiDoAction( hpkg, "CostInitialize"); - ok( r == ERROR_SUCCESS, "cost init failed\n"); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "one", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "two", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "three", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "four", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "five", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "six", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "seven", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "eight", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "nine", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "ten", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "alpha", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "beta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "gamma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "theta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "delta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "epsilon", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "zeta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "iota", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "eta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "kappa", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "lambda", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "mu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "nu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "xi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "omicron", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "pi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "rho", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "sigma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "tau", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "phi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "chi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - r = MsiDoAction( hpkg, "FileCost"); - ok( r == ERROR_SUCCESS, "file cost failed\n"); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "one", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "two", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "three", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "four", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "five", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "six", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "seven", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "eight", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "nine", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "alpha", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "beta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "gamma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "theta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "delta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "epsilon", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "zeta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "iota", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "eta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "kappa", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "lambda", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "mu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "nu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "xi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "omicron", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "pi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "rho", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "sigma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "tau", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "phi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "chi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - r = MsiDoAction( hpkg, "CostFinalize"); - ok( r == ERROR_SUCCESS, "cost finalize failed: %d\n", r); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "one", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "two", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "three", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "four", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "five", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "six", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "seven", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "eight", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "nine", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "ten", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "alpha", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "beta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "gamma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "theta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "delta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "epsilon", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "zeta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "iota", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "eta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "kappa", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "lambda", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "mu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "nu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "xi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "omicron", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "pi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "rho", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "sigma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "tau", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "phi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "chi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - MsiCloseHandle(hpkg); - - /* uninstall the product */ - r = MsiInstallProduct(msifile, "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* all features installed locally */ - r = MsiInstallProduct(msifile2, "ADDLOCAL=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiOpenDatabase(msifile2, MSIDBOPEN_DIRECT, &hdb); - ok(r == ERROR_SUCCESS, "failed to open database: %d\n", r); - - /* these properties must not be in the saved msi file */ - r = add_property_entry( hdb, "'ADDLOCAL', 'one,two,three,four,five,six,seven,eight,nine,ten'"); - ok( r == ERROR_SUCCESS, "cannot add property: %d\n", r ); - - hpkg = package_from_db( hdb ); - ok( hpkg, "failed to create package\n"); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "one", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "two", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "three", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "four", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "five", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "six", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "seven", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "eight", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "nine", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "ten", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "alpha", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "beta", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "gamma", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "theta", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "delta", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "epsilon", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "zeta", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "iota", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "eta", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "kappa", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "lambda", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "mu", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "nu", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "xi", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "omicron", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "pi", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "rho", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "sigma", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "tau", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "phi", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "chi", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - r = MsiDoAction( hpkg, "CostInitialize"); - ok( r == ERROR_SUCCESS, "cost init failed\n"); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "one", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "two", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "three", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "four", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "five", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "six", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "seven", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "eight", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "nine", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "ten", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "alpha", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "beta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "gamma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "theta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "delta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "epsilon", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "zeta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "iota", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "eta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "kappa", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "lambda", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "mu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "nu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "xi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "omicron", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "pi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "rho", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "sigma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "tau", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "phi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "chi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - r = MsiDoAction( hpkg, "FileCost"); - ok( r == ERROR_SUCCESS, "file cost failed\n"); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "one", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "two", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "three", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "four", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "five", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "six", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "seven", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "eight", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "nine", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "ten", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "alpha", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "beta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "gamma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "theta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "delta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "epsilon", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "zeta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "iota", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "eta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "kappa", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "lambda", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "mu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "nu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "xi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "omicron", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "pi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "rho", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "sigma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "tau", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "phi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "chi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - r = MsiDoAction( hpkg, "CostFinalize"); - ok( r == ERROR_SUCCESS, "cost finalize failed: %d\n", r); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "one", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "two", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "three", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "four", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "five", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "six", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "seven", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "eight", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - todo_wine ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "nine", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - todo_wine ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "ten", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - todo_wine ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "alpha", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "beta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "gamma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "theta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "delta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "epsilon", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "zeta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "iota", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "eta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "kappa", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "lambda", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "mu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "nu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "xi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "omicron", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "pi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "rho", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "sigma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "tau", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "phi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "chi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - MsiCloseHandle(hpkg); - - /* uninstall the product */ - r = MsiInstallProduct(msifile2, "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* all features installed from source */ - r = MsiInstallProduct(msifile3, "ADDSOURCE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiOpenDatabase(msifile3, MSIDBOPEN_DIRECT, &hdb); - ok(r == ERROR_SUCCESS, "failed to open database: %d\n", r); - - /* this property must not be in the saved msi file */ - r = add_property_entry( hdb, "'ADDSOURCE', 'one,two,three,four,five,six,seven,eight,nine,ten'"); - ok( r == ERROR_SUCCESS, "cannot add property: %d\n", r ); - - hpkg = package_from_db( hdb ); - ok( hpkg, "failed to create package\n"); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "one", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "two", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "three", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "four", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "five", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "six", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "seven", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "eight", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "nine", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "ten", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "alpha", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "beta", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "gamma", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "theta", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "delta", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "epsilon", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "zeta", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "iota", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "eta", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "kappa", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "lambda", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "mu", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "nu", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "xi", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "omicron", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "pi", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "rho", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "sigma", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "tau", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "phi", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "chi", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - r = MsiDoAction( hpkg, "CostInitialize"); - ok( r == ERROR_SUCCESS, "cost init failed\n"); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "one", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "two", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "three", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "four", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "five", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "six", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "seven", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "eight", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "nine", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "ten", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "alpha", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "beta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "gamma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "theta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "delta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "epsilon", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "zeta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "iota", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "eta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "kappa", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "lambda", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "mu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "nu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "xi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "omicron", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "pi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "rho", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "sigma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "tau", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "phi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "chi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - r = MsiDoAction( hpkg, "FileCost"); - ok( r == ERROR_SUCCESS, "file cost failed\n"); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "one", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "two", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "three", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "four", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "five", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "six", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "seven", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "eight", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "nine", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "ten", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "alpha", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "beta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "gamma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "theta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "delta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "epsilon", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "zeta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "iota", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "eta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "kappa", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "lambda", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "mu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "nu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "xi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "omicron", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "pi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "rho", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "sigma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "tau", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "phi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "chi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - r = MsiDoAction( hpkg, "CostFinalize"); - ok( r == ERROR_SUCCESS, "cost finalize failed: %d\n", r); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "one", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "two", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "three", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "four", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "five", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "six", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "seven", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "eight", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "nine", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "ten", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "alpha", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "beta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "gamma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "theta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "delta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "epsilon", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "zeta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "iota", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "eta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "kappa", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "lambda", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "mu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "nu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "xi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "omicron", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "pi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "rho", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "sigma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "tau", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "phi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "chi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - MsiCloseHandle(hpkg); - - /* reinstall the product */ - r = MsiInstallProduct(msifile3, "REINSTALL=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiOpenDatabase(msifile4, MSIDBOPEN_DIRECT, &hdb); - ok(r == ERROR_SUCCESS, "failed to open database: %d\n", r); - - /* this property must not be in the saved msi file */ - r = add_property_entry( hdb, "'ADDSOURCE', 'one,two,three,four,five,six,seven,eight,nine,ten'"); - ok( r == ERROR_SUCCESS, "cannot add property: %d\n", r ); - - hpkg = package_from_db( hdb ); - ok( hpkg, "failed to create package\n"); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "one", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "two", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "three", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "four", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "five", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "six", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "seven", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "eight", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "nine", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "ten", &state, &action); - ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "alpha", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "beta", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "gamma", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "theta", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "delta", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "epsilon", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "zeta", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "iota", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "eta", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "kappa", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "lambda", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "mu", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "nu", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "xi", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "omicron", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "pi", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "rho", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "sigma", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "tau", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "phi", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "chi", &state, &action); - ok( r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r ); - ok( state == 0xdeadbee, "Expected 0xdeadbee, got %d\n", state); - ok( action == 0xdeadbee, "Expected 0xdeadbee, got %d\n", action); - - r = MsiDoAction( hpkg, "CostInitialize"); - ok( r == ERROR_SUCCESS, "cost init failed\n"); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "one", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "two", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "three", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "four", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "five", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "six", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "seven", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "eight", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "nine", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "ten", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "alpha", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "beta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "gamma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "theta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "delta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "epsilon", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "zeta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "iota", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "eta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "kappa", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "lambda", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "mu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "nu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "xi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "omicron", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "pi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "rho", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "sigma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "tau", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "phi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "chi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - r = MsiDoAction( hpkg, "FileCost"); - ok( r == ERROR_SUCCESS, "file cost failed\n"); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "one", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "two", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "three", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "four", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "five", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "six", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "seven", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "eight", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "nine", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "ten", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "alpha", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "beta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "gamma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "theta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "delta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "epsilon", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "zeta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "iota", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "eta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "kappa", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "lambda", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "mu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "nu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "xi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "omicron", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "pi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "rho", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "sigma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "tau", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "phi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "chi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - r = MsiDoAction( hpkg, "CostFinalize"); - ok( r == ERROR_SUCCESS, "cost finalize failed: %d\n", r); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "one", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "two", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "three", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "four", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "five", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "six", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "seven", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "eight", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "nine", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "ten", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "alpha", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "beta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "gamma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "theta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "delta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "epsilon", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "zeta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "iota", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "eta", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "kappa", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "lambda", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "mu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "nu", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "xi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "omicron", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "pi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "rho", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "sigma", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "tau", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "phi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "chi", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state); - - MsiCloseHandle(hpkg); - - /* uninstall the product */ - r = MsiInstallProduct(msifile4, "REMOVE=ALL"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - DeleteFileA(msifile); - DeleteFileA(msifile2); - DeleteFileA(msifile3); - DeleteFileA(msifile4); -} - -static void test_getproperty(void) -{ - MSIHANDLE hPackage = 0; - char prop[100]; - static CHAR empty[] = ""; - DWORD size; - UINT r; - - hPackage = package_from_db(create_package_db()); - ok( hPackage != 0, " Failed to create package\n"); - - /* set the property */ - r = MsiSetProperty(hPackage, "Name", "Value"); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* retrieve the size, NULL pointer */ - size = 0; - r = MsiGetProperty(hPackage, "Name", NULL, &size); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok( size == 5, "Expected 5, got %d\n", size); - - /* retrieve the size, empty string */ - size = 0; - r = MsiGetProperty(hPackage, "Name", empty, &size); - ok( r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r); - ok( size == 5, "Expected 5, got %d\n", size); - - /* don't change size */ - r = MsiGetProperty(hPackage, "Name", prop, &size); - ok( r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r); - ok( size == 5, "Expected 5, got %d\n", size); - ok( !lstrcmp(prop, "Valu"), "Expected Valu, got %s\n", prop); - - /* increase the size by 1 */ - size++; - r = MsiGetProperty(hPackage, "Name", prop, &size); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok( size == 5, "Expected 5, got %d\n", size); - ok( !lstrcmp(prop, "Value"), "Expected Value, got %s\n", prop); - - r = MsiCloseHandle( hPackage); - ok( r == ERROR_SUCCESS , "Failed to close package\n" ); - DeleteFile(msifile); -} - -static void test_removefiles(void) -{ - MSIHANDLE hpkg; - UINT r; - MSIHANDLE hdb; - - hdb = create_package_db(); - ok ( hdb, "failed to create package database\n" ); - - r = add_directory_entry( hdb, "'TARGETDIR', '', 'SourceDir'"); - ok( r == ERROR_SUCCESS, "cannot add directory: %d\n", r ); - - r = create_feature_table( hdb ); - ok( r == ERROR_SUCCESS, "cannot create Feature table: %d\n", r ); - - r = create_component_table( hdb ); - ok( r == ERROR_SUCCESS, "cannot create Component table: %d\n", r ); - - r = add_feature_entry( hdb, "'one', '', '', '', 2, 1, '', 0" ); - ok( r == ERROR_SUCCESS, "cannot add feature: %d\n", r ); - - r = add_component_entry( hdb, "'hydrogen', '', 'TARGETDIR', 0, '', 'hydrogen_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - r = add_component_entry( hdb, "'helium', '', 'TARGETDIR', 0, '', 'helium_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - r = add_component_entry( hdb, "'lithium', '', 'TARGETDIR', 0, '', 'lithium_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - r = add_component_entry( hdb, "'beryllium', '', 'TARGETDIR', 0, '', 'beryllium_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - r = add_component_entry( hdb, "'boron', '', 'TARGETDIR', 0, '', 'boron_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - r = add_component_entry( hdb, "'carbon', '', 'TARGETDIR', 0, '', 'carbon_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - r = create_feature_components_table( hdb ); - ok( r == ERROR_SUCCESS, "cannot create FeatureComponents table: %d\n", r ); - - r = add_feature_components_entry( hdb, "'one', 'hydrogen'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'one', 'helium'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'one', 'lithium'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'one', 'beryllium'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'one', 'boron'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'one', 'carbon'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = create_file_table( hdb ); - ok( r == ERROR_SUCCESS, "cannot create File table: %d\n", r ); - - r = add_file_entry( hdb, "'hydrogen_file', 'hydrogen', 'hydrogen.txt', 0, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'helium_file', 'helium', 'helium.txt', 0, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'lithium_file', 'lithium', 'lithium.txt', 0, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'beryllium_file', 'beryllium', 'beryllium.txt', 0, '', '1033', 16384, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'boron_file', 'boron', 'boron.txt', 0, '', '1033', 16384, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'carbon_file', 'carbon', 'carbon.txt', 0, '', '1033', 16384, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = create_remove_file_table( hdb ); - ok( r == ERROR_SUCCESS, "cannot create Remove File table: %d\n", r); - - hpkg = package_from_db( hdb ); - ok( hpkg, "failed to create package\n"); - - MsiCloseHandle( hdb ); - - create_test_file( "hydrogen.txt" ); - create_test_file( "helium.txt" ); - create_test_file( "lithium.txt" ); - create_test_file( "beryllium.txt" ); - create_test_file( "boron.txt" ); - create_test_file( "carbon.txt" ); - - r = MsiSetProperty( hpkg, "TARGETDIR", CURR_DIR ); - ok( r == ERROR_SUCCESS, "set property failed\n"); - - r = MsiDoAction( hpkg, "CostInitialize"); - ok( r == ERROR_SUCCESS, "cost init failed\n"); - - r = MsiDoAction( hpkg, "FileCost"); - ok( r == ERROR_SUCCESS, "cost finalize failed\n"); - - r = MsiDoAction( hpkg, "CostFinalize"); - ok( r == ERROR_SUCCESS, "cost finalize failed\n"); - - r = MsiDoAction( hpkg, "InstallValidate"); - ok( r == ERROR_SUCCESS, "cost finalize failed\n"); - - r = MsiSetComponentState( hpkg, "hydrogen", INSTALLSTATE_ABSENT ); - ok( r == ERROR_SUCCESS, "failed to set component state: %d\n", r); - - r = MsiSetComponentState( hpkg, "helium", INSTALLSTATE_LOCAL ); - ok( r == ERROR_SUCCESS, "failed to set component state: %d\n", r); - - r = MsiSetComponentState( hpkg, "lithium", INSTALLSTATE_SOURCE ); - ok( r == ERROR_SUCCESS, "failed to set component state: %d\n", r); - - r = MsiSetComponentState( hpkg, "beryllium", INSTALLSTATE_ABSENT ); - ok( r == ERROR_SUCCESS, "failed to set component state: %d\n", r); - - r = MsiSetComponentState( hpkg, "boron", INSTALLSTATE_LOCAL ); - ok( r == ERROR_SUCCESS, "failed to set component state: %d\n", r); - - r = MsiSetComponentState( hpkg, "carbon", INSTALLSTATE_SOURCE ); - ok( r == ERROR_SUCCESS, "failed to set component state: %d\n", r); - - r = MsiDoAction( hpkg, "RemoveFiles"); - ok( r == ERROR_SUCCESS, "remove files failed\n"); - - ok(DeleteFileA("hydrogen.txt"), "Expected hydrogen.txt to exist\n"); - ok(DeleteFileA("lithium.txt"), "Expected lithium.txt to exist\n"); - ok(DeleteFileA("beryllium.txt"), "Expected beryllium.txt to exist\n"); - ok(DeleteFileA("carbon.txt"), "Expected carbon.txt to exist\n"); - ok(DeleteFileA("helium.txt"), "Expected helium.txt to exist\n"); - ok(DeleteFileA("boron.txt"), "Expected boron.txt to exist\n"); - - MsiCloseHandle( hpkg ); - DeleteFileA(msifile); -} - -static void test_appsearch(void) -{ - MSIHANDLE hpkg; - UINT r; - MSIHANDLE hdb; - CHAR prop[MAX_PATH]; - DWORD size = MAX_PATH; - - hdb = create_package_db(); - ok ( hdb, "failed to create package database\n" ); - - r = create_appsearch_table( hdb ); - ok( r == ERROR_SUCCESS, "cannot create AppSearch table: %d\n", r ); - - r = add_appsearch_entry( hdb, "'WEBBROWSERPROG', 'NewSignature1'" ); - ok( r == ERROR_SUCCESS, "cannot add entry: %d\n", r ); - - r = create_reglocator_table( hdb ); - ok( r == ERROR_SUCCESS, "cannot create RegLocator table: %d\n", r ); - - r = add_reglocator_entry( hdb, "'NewSignature1', 0, 'htmlfile\\shell\\open\\command', '', 1" ); - ok( r == ERROR_SUCCESS, "cannot create RegLocator table: %d\n", r ); - - r = create_signature_table( hdb ); - ok( r == ERROR_SUCCESS, "cannot create Signature table: %d\n", r ); - - r = add_signature_entry( hdb, "'NewSignature1', 'FileName', '', '', '', '', '', '', ''" ); - ok( r == ERROR_SUCCESS, "cannot create Signature table: %d\n", r ); - - hpkg = package_from_db( hdb ); - ok( hpkg, "failed to create package\n"); - - MsiCloseHandle( hdb ); - - r = MsiDoAction( hpkg, "AppSearch" ); - ok( r == ERROR_SUCCESS, "AppSearch failed: %d\n", r); - - r = MsiGetPropertyA( hpkg, "WEBBROWSERPROG", prop, &size ); - ok( r == ERROR_SUCCESS, "get property failed: %d\n", r); - todo_wine - { - ok( lstrlenA(prop) != 0, "Expected non-zero length\n"); - } - - MsiCloseHandle( hpkg ); - DeleteFileA(msifile); -} - -static void test_appsearch_complocator(void) -{ - MSIHANDLE hpkg, hdb; - CHAR path[MAX_PATH]; - CHAR prop[MAX_PATH]; - LPSTR usersid; - DWORD size; - UINT r; - - if (!get_user_sid(&usersid)) - return; - - create_test_file("FileName1"); - create_test_file("FileName4"); - set_component_path("FileName1", MSIINSTALLCONTEXT_MACHINE, - "{A8AE6692-96BA-4198-8399-145D7D1D0D0E}", NULL, FALSE); - - create_test_file("FileName2"); - set_component_path("FileName2", MSIINSTALLCONTEXT_USERUNMANAGED, - "{1D2CE6F3-E81C-4949-AB81-78D7DAD2AF2E}", usersid, FALSE); - - create_test_file("FileName3"); - set_component_path("FileName3", MSIINSTALLCONTEXT_USERMANAGED, - "{19E0B999-85F5-4973-A61B-DBE4D66ECB1D}", usersid, FALSE); - - create_test_file("FileName5"); - set_component_path("FileName5", MSIINSTALLCONTEXT_MACHINE, - "{F0CCA976-27A3-4808-9DDD-1A6FD50A0D5A}", NULL, TRUE); - - create_test_file("FileName6"); - set_component_path("FileName6", MSIINSTALLCONTEXT_MACHINE, - "{C0ECD96F-7898-4410-9667-194BD8C1B648}", NULL, TRUE); - - create_test_file("FileName7"); - set_component_path("FileName7", MSIINSTALLCONTEXT_MACHINE, - "{DB20F535-9C26-4127-9C2B-CC45A8B51DA1}", NULL, FALSE); - - /* dir is FALSE, but we're pretending it's a directory */ - set_component_path("IDontExist\\", MSIINSTALLCONTEXT_MACHINE, - "{91B7359B-07F2-4221-AA8D-DE102BB87A5F}", NULL, FALSE); - - create_file_with_version("FileName8.dll", MAKELONG(2, 1), MAKELONG(4, 3)); - set_component_path("FileName8.dll", MSIINSTALLCONTEXT_MACHINE, - "{4A2E1B5B-4034-4177-833B-8CC35F1B3EF1}", NULL, FALSE); - - create_file_with_version("FileName9.dll", MAKELONG(1, 2), MAKELONG(3, 4)); - set_component_path("FileName9.dll", MSIINSTALLCONTEXT_MACHINE, - "{A204DF48-7346-4635-BA2E-66247DBAC9DF}", NULL, FALSE); - - create_file_with_version("FileName10.dll", MAKELONG(2, 1), MAKELONG(4, 3)); - set_component_path("FileName10.dll", MSIINSTALLCONTEXT_MACHINE, - "{EC30CE73-4CF9-4908-BABD-1ED82E1515FD}", NULL, FALSE); - - hdb = create_package_db(); - ok(hdb, "Expected a valid database handle\n"); - - r = create_appsearch_table(hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP1', 'NewSignature1'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP2', 'NewSignature2'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP3', 'NewSignature3'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP4', 'NewSignature4'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP5', 'NewSignature5'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP6', 'NewSignature6'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP7', 'NewSignature7'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP8', 'NewSignature8'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP9', 'NewSignature9'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP10', 'NewSignature10'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP11', 'NewSignature11'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP12', 'NewSignature12'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = create_complocator_table(hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* published component, machine, file, signature, misdbLocatorTypeFile */ - r = add_complocator_entry(hdb, "'NewSignature1', '{A8AE6692-96BA-4198-8399-145D7D1D0D0E}', 1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* published component, user-unmanaged, file, signature, misdbLocatorTypeFile */ - r = add_complocator_entry(hdb, "'NewSignature2', '{1D2CE6F3-E81C-4949-AB81-78D7DAD2AF2E}', 1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* published component, user-managed, file, signature, misdbLocatorTypeFile */ - r = add_complocator_entry(hdb, "'NewSignature3', '{19E0B999-85F5-4973-A61B-DBE4D66ECB1D}', 1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* published component, machine, file, signature, misdbLocatorTypeDirectory */ - r = add_complocator_entry(hdb, "'NewSignature4', '{A8AE6692-96BA-4198-8399-145D7D1D0D0E}', 0"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* published component, machine, dir, signature, misdbLocatorTypeDirectory */ - r = add_complocator_entry(hdb, "'NewSignature5', '{F0CCA976-27A3-4808-9DDD-1A6FD50A0D5A}', 0"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* published component, machine, dir, no signature, misdbLocatorTypeDirectory */ - r = add_complocator_entry(hdb, "'NewSignature6', '{C0ECD96F-7898-4410-9667-194BD8C1B648}', 0"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* published component, machine, file, no signature, misdbLocatorTypeFile */ - r = add_complocator_entry(hdb, "'NewSignature7', '{DB20F535-9C26-4127-9C2B-CC45A8B51DA1}', 1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* unpublished component, no signature, misdbLocatorTypeDir */ - r = add_complocator_entry(hdb, "'NewSignature8', '{FB671D5B-5083-4048-90E0-481C48D8F3A5}', 0"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* published component, no signature, dir does not exist misdbLocatorTypeDir */ - r = add_complocator_entry(hdb, "'NewSignature9', '{91B7359B-07F2-4221-AA8D-DE102BB87A5F}', 0"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* published component, signature w/ ver, misdbLocatorTypeFile */ - r = add_complocator_entry(hdb, "'NewSignature10', '{4A2E1B5B-4034-4177-833B-8CC35F1B3EF1}', 1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* published component, signature w/ ver, ver > max, misdbLocatorTypeFile */ - r = add_complocator_entry(hdb, "'NewSignature11', '{A204DF48-7346-4635-BA2E-66247DBAC9DF}', 1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* published component, signature w/ ver, sig->name ignored, misdbLocatorTypeFile */ - r = add_complocator_entry(hdb, "'NewSignature12', '{EC30CE73-4CF9-4908-BABD-1ED82E1515FD}', 1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = create_signature_table(hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_signature_entry(hdb, "'NewSignature1', 'FileName1', '', '', '', '', '', '', ''"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_signature_entry(hdb, "'NewSignature2', 'FileName2', '', '', '', '', '', '', ''"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_signature_entry(hdb, "'NewSignature3', 'FileName3', '', '', '', '', '', '', ''"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_signature_entry(hdb, "'NewSignature4', 'FileName4', '', '', '', '', '', '', ''"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_signature_entry(hdb, "'NewSignature5', 'FileName5', '', '', '', '', '', '', ''"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_signature_entry(hdb, "'NewSignature10', 'FileName8.dll', '1.1.1.1', '2.1.1.1', '', '', '', '', ''"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_signature_entry(hdb, "'NewSignature11', 'FileName9.dll', '1.1.1.1', '2.1.1.1', '', '', '', '', ''"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_signature_entry(hdb, "'NewSignature12', 'ignored', '1.1.1.1', '2.1.1.1', '', '', '', '', ''"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - hpkg = package_from_db(hdb); - ok(hpkg, "Expected a valid package handle\n"); - - r = MsiSetPropertyA(hpkg, "SIGPROP8", "october"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiDoAction(hpkg, "AppSearch"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - size = MAX_PATH; - sprintf(path, "%s\\FileName1", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP1", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - sprintf(path, "%s\\FileName2", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP2", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - sprintf(path, "%s\\FileName3", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP3", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - sprintf(path, "%s\\FileName4", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP4", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop); - - size = MAX_PATH; - sprintf(path, "%s\\FileName5", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP5", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - sprintf(path, "%s\\", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP6", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - sprintf(path, "%s\\", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP7", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP8", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, "october"), "Expected \"october\", got \"%s\"\n", prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP9", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop); - - size = MAX_PATH; - sprintf(path, "%s\\FileName8.dll", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP10", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP11", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop); - - size = MAX_PATH; - sprintf(path, "%s\\FileName10.dll", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP12", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - delete_component_path("{A8AE6692-96BA-4198-8399-145D7D1D0D0E}", - MSIINSTALLCONTEXT_MACHINE, NULL); - delete_component_path("{1D2CE6F3-E81C-4949-AB81-78D7DAD2AF2E}", - MSIINSTALLCONTEXT_USERUNMANAGED, usersid); - delete_component_path("{19E0B999-85F5-4973-A61B-DBE4D66ECB1D}", - MSIINSTALLCONTEXT_USERMANAGED, usersid); - delete_component_path("{F0CCA976-27A3-4808-9DDD-1A6FD50A0D5A}", - MSIINSTALLCONTEXT_MACHINE, NULL); - delete_component_path("{C0ECD96F-7898-4410-9667-194BD8C1B648}", - MSIINSTALLCONTEXT_MACHINE, NULL); - delete_component_path("{DB20F535-9C26-4127-9C2B-CC45A8B51DA1}", - MSIINSTALLCONTEXT_MACHINE, NULL); - delete_component_path("{91B7359B-07F2-4221-AA8D-DE102BB87A5F}", - MSIINSTALLCONTEXT_MACHINE, NULL); - delete_component_path("{4A2E1B5B-4034-4177-833B-8CC35F1B3EF1}", - MSIINSTALLCONTEXT_MACHINE, NULL); - delete_component_path("{A204DF48-7346-4635-BA2E-66247DBAC9DF}", - MSIINSTALLCONTEXT_MACHINE, NULL); - delete_component_path("{EC30CE73-4CF9-4908-BABD-1ED82E1515FD}", - MSIINSTALLCONTEXT_MACHINE, NULL); - - DeleteFileA("FileName1"); - DeleteFileA("FileName2"); - DeleteFileA("FileName3"); - DeleteFileA("FileName4"); - DeleteFileA("FileName5"); - DeleteFileA("FileName6"); - DeleteFileA("FileName7"); - DeleteFileA("FileName8.dll"); - DeleteFileA("FileName9.dll"); - DeleteFileA("FileName10.dll"); - MsiCloseHandle(hpkg); - DeleteFileA(msifile); - LocalFree(usersid); -} - -static void test_appsearch_reglocator(void) -{ - MSIHANDLE hpkg, hdb; - CHAR path[MAX_PATH]; - CHAR prop[MAX_PATH]; - DWORD binary[2]; - DWORD size, val; - BOOL space, version; - HKEY hklm, classes; - HKEY hkcu, users; - LPSTR pathdata; - LPSTR pathvar; - LPCSTR str; - LPSTR ptr; - LONG res; - UINT r; - - version = TRUE; - if (!create_file_with_version("test.dll", MAKELONG(2, 1), MAKELONG(4, 3))) - version = FALSE; - - DeleteFileA("test.dll"); - - res = RegCreateKeyA(HKEY_CLASSES_ROOT, "Software\\Wine", &classes); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = RegSetValueExA(classes, "Value1", 0, REG_SZ, - (const BYTE *)"regszdata", 10); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = RegCreateKeyA(HKEY_CURRENT_USER, "Software\\Wine", &hkcu); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = RegSetValueExA(hkcu, "Value1", 0, REG_SZ, - (const BYTE *)"regszdata", 10); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - users = 0; - res = RegCreateKeyA(HKEY_USERS, "S-1-5-18\\Software\\Wine", &users); - ok(res == ERROR_SUCCESS || - broken(res == ERROR_INVALID_PARAMETER), - "Expected ERROR_SUCCESS, got %d\n", res); - - if (res == ERROR_SUCCESS) - { - res = RegSetValueExA(users, "Value1", 0, REG_SZ, - (const BYTE *)"regszdata", 10); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - } - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine", &hklm); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = RegSetValueA(hklm, NULL, REG_SZ, "defvalue", 8); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = RegSetValueExA(hklm, "Value1", 0, REG_SZ, - (const BYTE *)"regszdata", 10); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - val = 42; - res = RegSetValueExA(hklm, "Value2", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - val = -42; - res = RegSetValueExA(hklm, "Value3", 0, REG_DWORD, - (const BYTE *)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = RegSetValueExA(hklm, "Value4", 0, REG_EXPAND_SZ, - (const BYTE *)"%PATH%", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = RegSetValueExA(hklm, "Value5", 0, REG_EXPAND_SZ, - (const BYTE *)"my%NOVAR%", 10); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = RegSetValueExA(hklm, "Value6", 0, REG_MULTI_SZ, - (const BYTE *)"one\0two\0", 9); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - binary[0] = 0x1234abcd; - binary[1] = 0x567890ef; - res = RegSetValueExA(hklm, "Value7", 0, REG_BINARY, - (const BYTE *)binary, sizeof(binary)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = RegSetValueExA(hklm, "Value8", 0, REG_SZ, - (const BYTE *)"#regszdata", 11); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - create_test_file("FileName1"); - sprintf(path, "%s\\FileName1", CURR_DIR); - res = RegSetValueExA(hklm, "Value9", 0, REG_SZ, - (const BYTE *)path, lstrlenA(path) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - sprintf(path, "%s\\FileName2", CURR_DIR); - res = RegSetValueExA(hklm, "Value10", 0, REG_SZ, - (const BYTE *)path, lstrlenA(path) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - lstrcpyA(path, CURR_DIR); - res = RegSetValueExA(hklm, "Value11", 0, REG_SZ, - (const BYTE *)path, lstrlenA(path) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = RegSetValueExA(hklm, "Value12", 0, REG_SZ, - (const BYTE *)"", 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - create_file_with_version("FileName3.dll", MAKELONG(2, 1), MAKELONG(4, 3)); - sprintf(path, "%s\\FileName3.dll", CURR_DIR); - res = RegSetValueExA(hklm, "Value13", 0, REG_SZ, - (const BYTE *)path, lstrlenA(path) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - create_file_with_version("FileName4.dll", MAKELONG(1, 2), MAKELONG(3, 4)); - sprintf(path, "%s\\FileName4.dll", CURR_DIR); - res = RegSetValueExA(hklm, "Value14", 0, REG_SZ, - (const BYTE *)path, lstrlenA(path) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - create_file_with_version("FileName5.dll", MAKELONG(2, 1), MAKELONG(4, 3)); - sprintf(path, "%s\\FileName5.dll", CURR_DIR); - res = RegSetValueExA(hklm, "Value15", 0, REG_SZ, - (const BYTE *)path, lstrlenA(path) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - sprintf(path, "\"%s\\FileName1\" -option", CURR_DIR); - res = RegSetValueExA(hklm, "value16", 0, REG_SZ, - (const BYTE *)path, lstrlenA(path) + 1); - - space = (strchr(CURR_DIR, ' ')) ? TRUE : FALSE; - sprintf(path, "%s\\FileName1 -option", CURR_DIR); - res = RegSetValueExA(hklm, "value17", 0, REG_SZ, - (const BYTE *)path, lstrlenA(path) + 1); - - hdb = create_package_db(); - ok(hdb, "Expected a valid database handle\n"); - - r = create_appsearch_table(hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP1', 'NewSignature1'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP2', 'NewSignature2'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP3', 'NewSignature3'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP4', 'NewSignature4'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP5', 'NewSignature5'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP6', 'NewSignature6'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP7', 'NewSignature7'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP8', 'NewSignature8'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP9', 'NewSignature9'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP10', 'NewSignature10'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP11', 'NewSignature11'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP12', 'NewSignature12'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP13', 'NewSignature13'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP14', 'NewSignature14'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP15', 'NewSignature15'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP16', 'NewSignature16'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP17', 'NewSignature17'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP18', 'NewSignature18'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP19', 'NewSignature19'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP20', 'NewSignature20'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP21', 'NewSignature21'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP22', 'NewSignature22'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP23', 'NewSignature23'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP24', 'NewSignature24'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP25', 'NewSignature25'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP26', 'NewSignature26'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP27', 'NewSignature27'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP28', 'NewSignature28'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP29', 'NewSignature29'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP30', 'NewSignature30'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = create_reglocator_table(hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeRawValue, REG_SZ */ - str = "'NewSignature1', 2, 'Software\\Wine', 'Value1', 2"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeRawValue, positive DWORD */ - str = "'NewSignature2', 2, 'Software\\Wine', 'Value2', 2"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeRawValue, negative DWORD */ - str = "'NewSignature3', 2, 'Software\\Wine', 'Value3', 2"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeRawValue, REG_EXPAND_SZ */ - str = "'NewSignature4', 2, 'Software\\Wine', 'Value4', 2"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeRawValue, REG_EXPAND_SZ */ - str = "'NewSignature5', 2, 'Software\\Wine', 'Value5', 2"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeRawValue, REG_MULTI_SZ */ - str = "'NewSignature6', 2, 'Software\\Wine', 'Value6', 2"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeRawValue, REG_BINARY */ - str = "'NewSignature7', 2, 'Software\\Wine', 'Value7', 2"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeRawValue, REG_SZ first char is # */ - str = "'NewSignature8', 2, 'Software\\Wine', 'Value8', 2"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeFileName, signature, file exists */ - str = "'NewSignature9', 2, 'Software\\Wine', 'Value9', 1"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeFileName, signature, file does not exist */ - str = "'NewSignature10', 2, 'Software\\Wine', 'Value10', 1"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeFileName, no signature */ - str = "'NewSignature11', 2, 'Software\\Wine', 'Value9', 1"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeDirectory, no signature, file exists */ - str = "'NewSignature12', 2, 'Software\\Wine', 'Value9', 0"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeDirectory, no signature, directory exists */ - str = "'NewSignature13', 2, 'Software\\Wine', 'Value11', 0"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeDirectory, signature, file exists */ - str = "'NewSignature14', 2, 'Software\\Wine', 'Value9', 0"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKCR, msidbLocatorTypeRawValue, REG_SZ */ - str = "'NewSignature15', 0, 'Software\\Wine', 'Value1', 2"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKCU, msidbLocatorTypeRawValue, REG_SZ */ - str = "'NewSignature16', 1, 'Software\\Wine', 'Value1', 2"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKU, msidbLocatorTypeRawValue, REG_SZ */ - str = "'NewSignature17', 3, 'S-1-5-18\\Software\\Wine', 'Value1', 2"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeRawValue, REG_SZ, NULL Name */ - str = "'NewSignature18', 2, 'Software\\Wine', '', 2"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeRawValue, REG_SZ, key does not exist */ - str = "'NewSignature19', 2, 'Software\\IDontExist', '', 2"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeRawValue, REG_SZ, value is empty */ - str = "'NewSignature20', 2, 'Software\\Wine', 'Value12', 2"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeFileName, signature, file exists w/ version */ - str = "'NewSignature21', 2, 'Software\\Wine', 'Value13', 1"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeFileName, file exists w/ version, version > max */ - str = "'NewSignature22', 2, 'Software\\Wine', 'Value14', 1"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeFileName, file exists w/ version, sig->name ignored */ - str = "'NewSignature23', 2, 'Software\\Wine', 'Value15', 1"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeFileName, no signature, directory exists */ - str = "'NewSignature24', 2, 'Software\\Wine', 'Value11', 1"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeFileName, no signature, file does not exist */ - str = "'NewSignature25', 2, 'Software\\Wine', 'Value10', 1"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeDirectory, signature, directory exists */ - str = "'NewSignature26', 2, 'Software\\Wine', 'Value11', 0"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeDirectory, signature, file does not exist */ - str = "'NewSignature27', 2, 'Software\\Wine', 'Value10', 0"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeDirectory, no signature, file does not exist */ - str = "'NewSignature28', 2, 'Software\\Wine', 'Value10', 0"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeFile, file exists, in quotes */ - str = "'NewSignature29', 2, 'Software\\Wine', 'Value16', 1"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* HKLM, msidbLocatorTypeFile, file exists, no quotes */ - str = "'NewSignature30', 2, 'Software\\Wine', 'Value17', 1"; - r = add_reglocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = create_signature_table(hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - str = "'NewSignature9', 'FileName1', '', '', '', '', '', '', ''"; - r = add_signature_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - str = "'NewSignature10', 'FileName2', '', '', '', '', '', '', ''"; - r = add_signature_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - str = "'NewSignature14', 'FileName1', '', '', '', '', '', '', ''"; - r = add_signature_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - str = "'NewSignature21', 'FileName3.dll', '1.1.1.1', '2.1.1.1', '', '', '', '', ''"; - r = add_signature_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - str = "'NewSignature22', 'FileName4.dll', '1.1.1.1', '2.1.1.1', '', '', '', '', ''"; - r = add_signature_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - str = "'NewSignature23', 'ignored', '1.1.1.1', '2.1.1.1', '', '', '', '', ''"; - r = add_signature_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - ptr = strrchr(CURR_DIR, '\\') + 1; - sprintf(path, "'NewSignature26', '%s', '', '', '', '', '', '', ''", ptr); - r = add_signature_entry(hdb, path); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - str = "'NewSignature27', 'FileName2', '', '', '', '', '', '', ''"; - r = add_signature_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - str = "'NewSignature29', 'FileName1', '', '', '', '', '', '', ''"; - r = add_signature_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - str = "'NewSignature30', 'FileName1', '', '', '', '', '', '', ''"; - r = add_signature_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - hpkg = package_from_db(hdb); - ok(hpkg, "Expected a valid package handle\n"); - - r = MsiDoAction(hpkg, "AppSearch"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP1", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, "regszdata"), - "Expected \"regszdata\", got \"%s\"\n", prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP2", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, "#42"), "Expected \"#42\", got \"%s\"\n", prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP3", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, "#-42"), "Expected \"#-42\", got \"%s\"\n", prop); - - size = ExpandEnvironmentStringsA("%PATH%", NULL, 0); - if (size == 0 && GetLastError() == ERROR_INVALID_PARAMETER) - { - /* Workaround for Win95 */ - CHAR tempbuf[1]; - size = ExpandEnvironmentStringsA("%PATH%", tempbuf, 0); - } - pathvar = HeapAlloc(GetProcessHeap(), 0, size); - ExpandEnvironmentStringsA("%PATH%", pathvar, size); - - size = 0; - r = MsiGetPropertyA(hpkg, "SIGPROP4", NULL, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - pathdata = HeapAlloc(GetProcessHeap(), 0, ++size); - r = MsiGetPropertyA(hpkg, "SIGPROP4", pathdata, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(pathdata, pathvar), - "Expected \"%s\", got \"%s\"\n", pathvar, pathdata); - - HeapFree(GetProcessHeap(), 0, pathvar); - HeapFree(GetProcessHeap(), 0, pathdata); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP5", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, - "my%NOVAR%"), "Expected \"my%%NOVAR%%\", got \"%s\"\n", prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP6", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - todo_wine - { - ok(!memcmp(prop, "\0one\0two\0\0", 10), - "Expected \"\\0one\\0two\\0\\0\"\n"); - } - - size = MAX_PATH; - lstrcpyA(path, "#xCDAB3412EF907856"); - r = MsiGetPropertyA(hpkg, "SIGPROP7", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP8", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, "##regszdata"), - "Expected \"##regszdata\", got \"%s\"\n", prop); - - size = MAX_PATH; - sprintf(path, "%s\\FileName1", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP9", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP10", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop); - - size = MAX_PATH; - sprintf(path, "%s\\", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP11", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP12", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop); - - size = MAX_PATH; - sprintf(path, "%s\\", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP13", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP14", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP15", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, "regszdata"), - "Expected \"regszdata\", got \"%s\"\n", prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP16", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, "regszdata"), - "Expected \"regszdata\", got \"%s\"\n", prop); - - if (users) - { - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP17", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, "regszdata"), - "Expected \"regszdata\", got \"%s\"\n", prop); - } - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP18", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, "defvalue"), - "Expected \"defvalue\", got \"%s\"\n", prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP19", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP20", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop); - - if (version) - { - size = MAX_PATH; - sprintf(path, "%s\\FileName3.dll", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP21", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP22", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop); - - size = MAX_PATH; - sprintf(path, "%s\\FileName5.dll", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP23", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - } - - size = MAX_PATH; - lstrcpyA(path, CURR_DIR); - ptr = strrchr(path, '\\') + 1; - *ptr = '\0'; - r = MsiGetPropertyA(hpkg, "SIGPROP24", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - sprintf(path, "%s\\", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP25", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP26", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP27", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP28", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop); - - size = MAX_PATH; - sprintf(path, "%s\\FileName1", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP29", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - sprintf(path, "%s\\FileName1", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP30", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - if (space) - ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop); - else - todo_wine ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - RegSetValueA(hklm, NULL, REG_SZ, "", 0); - RegDeleteValueA(hklm, "Value1"); - RegDeleteValueA(hklm, "Value2"); - RegDeleteValueA(hklm, "Value3"); - RegDeleteValueA(hklm, "Value4"); - RegDeleteValueA(hklm, "Value5"); - RegDeleteValueA(hklm, "Value6"); - RegDeleteValueA(hklm, "Value7"); - RegDeleteValueA(hklm, "Value8"); - RegDeleteValueA(hklm, "Value9"); - RegDeleteValueA(hklm, "Value10"); - RegDeleteValueA(hklm, "Value11"); - RegDeleteValueA(hklm, "Value12"); - RegDeleteValueA(hklm, "Value13"); - RegDeleteValueA(hklm, "Value14"); - RegDeleteValueA(hklm, "Value15"); - RegDeleteValueA(hklm, "Value16"); - RegDeleteValueA(hklm, "Value17"); - RegDeleteKeyA(hklm, ""); - RegCloseKey(hklm); - - RegDeleteValueA(classes, "Value1"); - RegDeleteKeyA(classes, ""); - RegCloseKey(classes); - - RegDeleteValueA(hkcu, "Value1"); - RegDeleteKeyA(hkcu, ""); - RegCloseKey(hkcu); - - RegDeleteValueA(users, "Value1"); - RegDeleteKeyA(users, ""); - RegCloseKey(users); - - DeleteFileA("FileName1"); - DeleteFileA("FileName3.dll"); - DeleteFileA("FileName4.dll"); - DeleteFileA("FileName5.dll"); - MsiCloseHandle(hpkg); - DeleteFileA(msifile); -} - -static void delete_win_ini(LPCSTR file) -{ - CHAR path[MAX_PATH]; - - GetWindowsDirectoryA(path, MAX_PATH); - lstrcatA(path, "\\"); - lstrcatA(path, file); - - DeleteFileA(path); -} - -static void test_appsearch_inilocator(void) -{ - MSIHANDLE hpkg, hdb; - CHAR path[MAX_PATH]; - CHAR prop[MAX_PATH]; - BOOL version; - LPCSTR str; - LPSTR ptr; - DWORD size; - UINT r; - - version = TRUE; - if (!create_file_with_version("test.dll", MAKELONG(2, 1), MAKELONG(4, 3))) - version = FALSE; - - DeleteFileA("test.dll"); - - WritePrivateProfileStringA("Section", "Key", "keydata,field2", "IniFile.ini"); - - create_test_file("FileName1"); - sprintf(path, "%s\\FileName1", CURR_DIR); - WritePrivateProfileStringA("Section", "Key2", path, "IniFile.ini"); - - WritePrivateProfileStringA("Section", "Key3", CURR_DIR, "IniFile.ini"); - - sprintf(path, "%s\\IDontExist", CURR_DIR); - WritePrivateProfileStringA("Section", "Key4", path, "IniFile.ini"); - - create_file_with_version("FileName2.dll", MAKELONG(2, 1), MAKELONG(4, 3)); - sprintf(path, "%s\\FileName2.dll", CURR_DIR); - WritePrivateProfileStringA("Section", "Key5", path, "IniFile.ini"); - - create_file_with_version("FileName3.dll", MAKELONG(1, 2), MAKELONG(3, 4)); - sprintf(path, "%s\\FileName3.dll", CURR_DIR); - WritePrivateProfileStringA("Section", "Key6", path, "IniFile.ini"); - - create_file_with_version("FileName4.dll", MAKELONG(2, 1), MAKELONG(4, 3)); - sprintf(path, "%s\\FileName4.dll", CURR_DIR); - WritePrivateProfileStringA("Section", "Key7", path, "IniFile.ini"); - - hdb = create_package_db(); - ok(hdb, "Expected a valid database handle\n"); - - r = create_appsearch_table(hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP1', 'NewSignature1'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP2', 'NewSignature2'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP3', 'NewSignature3'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP4', 'NewSignature4'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP5', 'NewSignature5'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP6', 'NewSignature6'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP7', 'NewSignature7'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP8', 'NewSignature8'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP9', 'NewSignature9'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP10', 'NewSignature10'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP11', 'NewSignature11'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP12', 'NewSignature12'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = create_inilocator_table(hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* msidbLocatorTypeRawValue, field 1 */ - str = "'NewSignature1', 'IniFile.ini', 'Section', 'Key', 1, 2"; - r = add_inilocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* msidbLocatorTypeRawValue, field 2 */ - str = "'NewSignature2', 'IniFile.ini', 'Section', 'Key', 2, 2"; - r = add_inilocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* msidbLocatorTypeRawValue, entire field */ - str = "'NewSignature3', 'IniFile.ini', 'Section', 'Key', 0, 2"; - r = add_inilocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* msidbLocatorTypeFile */ - str = "'NewSignature4', 'IniFile.ini', 'Section', 'Key2', 1, 1"; - r = add_inilocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* msidbLocatorTypeDirectory, file */ - str = "'NewSignature5', 'IniFile.ini', 'Section', 'Key2', 1, 0"; - r = add_inilocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* msidbLocatorTypeDirectory, directory */ - str = "'NewSignature6', 'IniFile.ini', 'Section', 'Key3', 1, 0"; - r = add_inilocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* msidbLocatorTypeFile, file, no signature */ - str = "'NewSignature7', 'IniFile.ini', 'Section', 'Key2', 1, 1"; - r = add_inilocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* msidbLocatorTypeFile, dir, no signature */ - str = "'NewSignature8', 'IniFile.ini', 'Section', 'Key3', 1, 1"; - r = add_inilocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* msidbLocatorTypeFile, file does not exist */ - str = "'NewSignature9', 'IniFile.ini', 'Section', 'Key4', 1, 1"; - r = add_inilocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* msidbLocatorTypeFile, signature with version */ - str = "'NewSignature10', 'IniFile.ini', 'Section', 'Key5', 1, 1"; - r = add_inilocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* msidbLocatorTypeFile, signature with version, ver > max */ - str = "'NewSignature11', 'IniFile.ini', 'Section', 'Key6', 1, 1"; - r = add_inilocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* msidbLocatorTypeFile, signature with version, sig->name ignored */ - str = "'NewSignature12', 'IniFile.ini', 'Section', 'Key7', 1, 1"; - r = add_inilocator_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = create_signature_table(hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_signature_entry(hdb, "'NewSignature4', 'FileName1', '', '', '', '', '', '', ''"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_signature_entry(hdb, "'NewSignature9', 'IDontExist', '', '', '', '', '', '', ''"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_signature_entry(hdb, "'NewSignature10', 'FileName2.dll', '1.1.1.1', '2.1.1.1', '', '', '', '', ''"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_signature_entry(hdb, "'NewSignature11', 'FileName3.dll', '1.1.1.1', '2.1.1.1', '', '', '', '', ''"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_signature_entry(hdb, "'NewSignature12', 'ignored', '1.1.1.1', '2.1.1.1', '', '', '', '', ''"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - hpkg = package_from_db(hdb); - ok(hpkg, "Expected a valid package handle\n"); - - r = MsiDoAction(hpkg, "AppSearch"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP1", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, "keydata"), "Expected \"keydata\", got \"%s\"\n", prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP2", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, "field2"), "Expected \"field2\", got \"%s\"\n", prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP3", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, "keydata,field2"), - "Expected \"keydata,field2\", got \"%s\"\n", prop); - - size = MAX_PATH; - sprintf(path, "%s\\FileName1", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP4", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP5", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop); - - size = MAX_PATH; - sprintf(path, "%s\\", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP6", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - sprintf(path, "%s\\", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP7", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - lstrcpyA(path, CURR_DIR); - ptr = strrchr(path, '\\'); - *(ptr + 1) = '\0'; - r = MsiGetPropertyA(hpkg, "SIGPROP8", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP9", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop); - - if (version) - { - size = MAX_PATH; - sprintf(path, "%s\\FileName2.dll", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP10", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP11", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop); - - size = MAX_PATH; - sprintf(path, "%s\\FileName4.dll", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP12", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - } - - delete_win_ini("IniFile.ini"); - DeleteFileA("FileName1"); - DeleteFileA("FileName2.dll"); - DeleteFileA("FileName3.dll"); - DeleteFileA("FileName4.dll"); - MsiCloseHandle(hpkg); - DeleteFileA(msifile); -} - -/* - * MSI AppSearch action on DrLocator table always returns absolute paths. - * If a relative path was set, it returns the first absolute path that - * matches or an empty string if it didn't find anything. - * This helper function replicates this behaviour. - */ -static void search_absolute_directory(LPSTR absolute, LPCSTR relative) -{ - int i, size; - DWORD attr, drives; - - size = lstrlenA(relative); - drives = GetLogicalDrives(); - lstrcpyA(absolute, "A:\\"); - for (i = 0; i < 26; absolute[0] = '\0', i++) - { - if (!(drives & (1 << i))) - continue; - - absolute[0] = 'A' + i; - if (GetDriveType(absolute) != DRIVE_FIXED) - continue; - - lstrcpynA(absolute + 3, relative, size + 1); - attr = GetFileAttributesA(absolute); - if (attr != INVALID_FILE_ATTRIBUTES && - (attr & FILE_ATTRIBUTE_DIRECTORY)) - { - if (absolute[3 + size - 1] != '\\') - lstrcatA(absolute, "\\"); - break; - } - absolute[3] = '\0'; - } -} - -static void test_appsearch_drlocator(void) -{ - MSIHANDLE hpkg, hdb; - CHAR path[MAX_PATH]; - CHAR prop[MAX_PATH]; - BOOL version; - LPCSTR str; - DWORD size; - UINT r; - - version = TRUE; - if (!create_file_with_version("test.dll", MAKELONG(2, 1), MAKELONG(4, 3))) - version = FALSE; - - DeleteFileA("test.dll"); - - create_test_file("FileName1"); - CreateDirectoryA("one", NULL); - CreateDirectoryA("one\\two", NULL); - CreateDirectoryA("one\\two\\three", NULL); - create_test_file("one\\two\\three\\FileName2"); - CreateDirectoryA("another", NULL); - create_file_with_version("FileName3.dll", MAKELONG(2, 1), MAKELONG(4, 3)); - create_file_with_version("FileName4.dll", MAKELONG(1, 2), MAKELONG(3, 4)); - create_file_with_version("FileName5.dll", MAKELONG(2, 1), MAKELONG(4, 3)); - - hdb = create_package_db(); - ok(hdb, "Expected a valid database handle\n"); - - r = create_appsearch_table(hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP1', 'NewSignature1'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP2', 'NewSignature2'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP3', 'NewSignature3'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP4', 'NewSignature4'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP5', 'NewSignature5'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP6', 'NewSignature6'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP7', 'NewSignature7'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP8', 'NewSignature8'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP9', 'NewSignature9'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP10', 'NewSignature10'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP11', 'NewSignature11'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'SIGPROP13', 'NewSignature13'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = create_drlocator_table(hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* no parent, full path, depth 0, signature */ - sprintf(path, "'NewSignature1', '', '%s', 0", CURR_DIR); - r = add_drlocator_entry(hdb, path); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* no parent, full path, depth 0, no signature */ - sprintf(path, "'NewSignature2', '', '%s', 0", CURR_DIR); - r = add_drlocator_entry(hdb, path); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* no parent, relative path, depth 0, no signature */ - sprintf(path, "'NewSignature3', '', '%s', 0", CURR_DIR + 3); - r = add_drlocator_entry(hdb, path); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* no parent, full path, depth 2, signature */ - sprintf(path, "'NewSignature4', '', '%s', 2", CURR_DIR); - r = add_drlocator_entry(hdb, path); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* no parent, full path, depth 3, signature */ - sprintf(path, "'NewSignature5', '', '%s', 3", CURR_DIR); - r = add_drlocator_entry(hdb, path); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* no parent, full path, depth 1, signature is dir */ - sprintf(path, "'NewSignature6', '', '%s', 1", CURR_DIR); - r = add_drlocator_entry(hdb, path); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* parent is in DrLocator, relative path, depth 0, signature */ - sprintf(path, "'NewSignature7', 'NewSignature1', 'one\\two\\three', 1"); - r = add_drlocator_entry(hdb, path); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* no parent, full path, depth 0, signature w/ version */ - sprintf(path, "'NewSignature8', '', '%s', 0", CURR_DIR); - r = add_drlocator_entry(hdb, path); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* no parent, full path, depth 0, signature w/ version, ver > max */ - sprintf(path, "'NewSignature9', '', '%s', 0", CURR_DIR); - r = add_drlocator_entry(hdb, path); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* no parent, full path, depth 0, signature w/ version, sig->name not ignored */ - sprintf(path, "'NewSignature10', '', '%s', 0", CURR_DIR); - r = add_drlocator_entry(hdb, path); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* no parent, relative empty path, depth 0, no signature */ - sprintf(path, "'NewSignature11', '', '', 0"); - r = add_drlocator_entry(hdb, path); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = create_reglocator_table(hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* parent */ - r = add_reglocator_entry(hdb, "'NewSignature12', 2, 'htmlfile\\shell\\open\\nonexistent', '', 1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* parent is in RegLocator, no path, depth 0, no signature */ - sprintf(path, "'NewSignature13', 'NewSignature12', '', 0"); - r = add_drlocator_entry(hdb, path); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = create_signature_table(hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - str = "'NewSignature1', 'FileName1', '', '', '', '', '', '', ''"; - r = add_signature_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - str = "'NewSignature4', 'FileName2', '', '', '', '', '', '', ''"; - r = add_signature_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - str = "'NewSignature5', 'FileName2', '', '', '', '', '', '', ''"; - r = add_signature_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - str = "'NewSignature6', 'another', '', '', '', '', '', '', ''"; - r = add_signature_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - str = "'NewSignature7', 'FileName2', '', '', '', '', '', '', ''"; - r = add_signature_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - str = "'NewSignature8', 'FileName3.dll', '1.1.1.1', '2.1.1.1', '', '', '', '', ''"; - r = add_signature_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - str = "'NewSignature9', 'FileName4.dll', '1.1.1.1', '2.1.1.1', '', '', '', '', ''"; - r = add_signature_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - str = "'NewSignature10', 'necessary', '1.1.1.1', '2.1.1.1', '', '', '', '', ''"; - r = add_signature_entry(hdb, str); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - hpkg = package_from_db(hdb); - ok(hpkg, "Expected a valid package handle\n"); - - r = MsiDoAction(hpkg, "AppSearch"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - size = MAX_PATH; - sprintf(path, "%s\\FileName1", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP1", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - sprintf(path, "%s\\", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP2", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - search_absolute_directory(path, CURR_DIR + 3); - r = MsiGetPropertyA(hpkg, "SIGPROP3", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpiA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP4", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop); - - size = MAX_PATH; - sprintf(path, "%s\\one\\two\\three\\FileName2", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP5", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP6", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop); - - size = MAX_PATH; - sprintf(path, "%s\\one\\two\\three\\FileName2", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP7", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - if (version) - { - size = MAX_PATH; - sprintf(path, "%s\\FileName3.dll", CURR_DIR); - r = MsiGetPropertyA(hpkg, "SIGPROP8", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP9", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "SIGPROP10", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected \"\", got \"%s\"\n", prop); - } - - size = MAX_PATH; - search_absolute_directory(path, ""); - r = MsiGetPropertyA(hpkg, "SIGPROP11", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpiA(prop, path), "Expected \"%s\", got \"%s\"\n", path, prop); - - size = MAX_PATH; - strcpy(path, "c:\\"); - r = MsiGetPropertyA(hpkg, "SIGPROP13", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!prop[0], "Expected \"\", got \"%s\"\n", prop); - - DeleteFileA("FileName1"); - DeleteFileA("FileName3.dll"); - DeleteFileA("FileName4.dll"); - DeleteFileA("FileName5.dll"); - DeleteFileA("one\\two\\three\\FileName2"); - RemoveDirectoryA("one\\two\\three"); - RemoveDirectoryA("one\\two"); - RemoveDirectoryA("one"); - RemoveDirectoryA("another"); - MsiCloseHandle(hpkg); - DeleteFileA(msifile); -} - -static void test_featureparents(void) -{ - MSIHANDLE hpkg; - UINT r; - MSIHANDLE hdb; - INSTALLSTATE state, action; - - hdb = create_package_db(); - ok ( hdb, "failed to create package database\n" ); - - r = add_directory_entry( hdb, "'TARGETDIR', '', 'SourceDir'"); - ok( r == ERROR_SUCCESS, "cannot add directory: %d\n", r ); - - r = create_feature_table( hdb ); - ok( r == ERROR_SUCCESS, "cannot create Feature table: %d\n", r ); - - r = create_component_table( hdb ); - ok( r == ERROR_SUCCESS, "cannot create Component table: %d\n", r ); - - r = create_feature_components_table( hdb ); - ok( r == ERROR_SUCCESS, "cannot create FeatureComponents table: %d\n", r ); - - r = create_file_table( hdb ); - ok( r == ERROR_SUCCESS, "cannot create File table: %d\n", r ); - - /* msidbFeatureAttributesFavorLocal */ - r = add_feature_entry( hdb, "'zodiac', '', '', '', 2, 1, '', 0" ); - ok( r == ERROR_SUCCESS, "cannot add feature: %d\n", r ); - - /* msidbFeatureAttributesFavorSource */ - r = add_feature_entry( hdb, "'perseus', '', '', '', 2, 1, '', 1" ); - ok( r == ERROR_SUCCESS, "cannot add feature: %d\n", r ); - - /* msidbFeatureAttributesFavorLocal */ - r = add_feature_entry( hdb, "'orion', '', '', '', 2, 1, '', 0" ); - ok( r == ERROR_SUCCESS, "cannot add feature: %d\n", r ); - - /* disabled because of install level */ - r = add_feature_entry( hdb, "'waters', '', '', '', 15, 101, '', 9" ); - ok( r == ERROR_SUCCESS, "cannot add feature: %d\n", r ); - - /* child feature of disabled feature */ - r = add_feature_entry( hdb, "'bayer', 'waters', '', '', 14, 1, '', 9" ); - ok( r == ERROR_SUCCESS, "cannot add feature: %d\n", r ); - - /* component of disabled feature (install level) */ - r = add_component_entry( hdb, "'delphinus', '', 'TARGETDIR', 0, '', 'delphinus_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* component of disabled child feature (install level) */ - r = add_component_entry( hdb, "'hydrus', '', 'TARGETDIR', 0, '', 'hydrus_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorLocal:msidbComponentAttributesLocalOnly */ - r = add_component_entry( hdb, "'leo', '', 'TARGETDIR', 0, '', 'leo_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorLocal:msidbComponentAttributesSourceOnly */ - r = add_component_entry( hdb, "'virgo', '', 'TARGETDIR', 1, '', 'virgo_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorLocal:msidbComponentAttributesOptional */ - r = add_component_entry( hdb, "'libra', '', 'TARGETDIR', 2, '', 'libra_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorSource:msidbComponentAttributesLocalOnly */ - r = add_component_entry( hdb, "'cassiopeia', '', 'TARGETDIR', 0, '', 'cassiopeia_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorSource:msidbComponentAttributesSourceOnly */ - r = add_component_entry( hdb, "'cepheus', '', 'TARGETDIR', 1, '', 'cepheus_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorSource:msidbComponentAttributesOptional */ - r = add_component_entry( hdb, "'andromeda', '', 'TARGETDIR', 2, '', 'andromeda_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorLocal:msidbComponentAttributesLocalOnly */ - r = add_component_entry( hdb, "'canis', '', 'TARGETDIR', 0, '', 'canis_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorLocal:msidbComponentAttributesSourceOnly */ - r = add_component_entry( hdb, "'monoceros', '', 'TARGETDIR', 1, '', 'monoceros_file'" ); - ok( r == ERROR_SUCCESS, "cannot add component: %d\n", r ); - - /* msidbFeatureAttributesFavorLocal:msidbComponentAttributesOptional */ - r = add_component_entry( hdb, "'lepus', '', 'TARGETDIR', 2, '', 'lepus_file'" ); - - r = add_feature_components_entry( hdb, "'zodiac', 'leo'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'zodiac', 'virgo'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'zodiac', 'libra'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'perseus', 'cassiopeia'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'perseus', 'cepheus'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'perseus', 'andromeda'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'orion', 'leo'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'orion', 'virgo'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'orion', 'libra'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'orion', 'cassiopeia'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'orion', 'cepheus'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'orion', 'andromeda'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'orion', 'canis'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'orion', 'monoceros'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'orion', 'lepus'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'waters', 'delphinus'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_feature_components_entry( hdb, "'bayer', 'hydrus'" ); - ok( r == ERROR_SUCCESS, "cannot add feature components: %d\n", r ); - - r = add_file_entry( hdb, "'leo_file', 'leo', 'leo.txt', 100, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'virgo_file', 'virgo', 'virgo.txt', 0, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'libra_file', 'libra', 'libra.txt', 0, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'cassiopeia_file', 'cassiopeia', 'cassiopeia.txt', 0, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'cepheus_file', 'cepheus', 'cepheus.txt', 0, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'andromeda_file', 'andromeda', 'andromeda.txt', 0, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'canis_file', 'canis', 'canis.txt', 0, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'monoceros_file', 'monoceros', 'monoceros.txt', 0, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'lepus_file', 'lepus', 'lepus.txt', 0, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'delphinus_file', 'delphinus', 'delphinus.txt', 0, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - r = add_file_entry( hdb, "'hydrus_file', 'hydrus', 'hydrus.txt', 0, '', '1033', 8192, 1" ); - ok( r == ERROR_SUCCESS, "cannot add file: %d\n", r); - - hpkg = package_from_db( hdb ); - ok( hpkg, "failed to create package\n"); - - MsiCloseHandle( hdb ); - - r = MsiDoAction( hpkg, "CostInitialize"); - ok( r == ERROR_SUCCESS, "cost init failed\n"); - - r = MsiDoAction( hpkg, "FileCost"); - ok( r == ERROR_SUCCESS, "file cost failed\n"); - - r = MsiDoAction( hpkg, "CostFinalize"); - ok( r == ERROR_SUCCESS, "cost finalize failed\n"); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "zodiac", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "perseus", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "orion", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "waters", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "bayer", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "leo", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "virgo", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected virgo INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_SOURCE, "Expected virgo INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "libra", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected libra INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected libra INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "cassiopeia", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected cassiopeia INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected cassiopeia INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "cepheus", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected cepheus INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_SOURCE, "Expected cepheus INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "andromeda", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected andromeda INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected andromeda INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "canis", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected canis INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected canis INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "monoceros", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected monoceros INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_SOURCE, "Expected monoceros INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "lepus", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected lepus INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected lepus INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "delphinus", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected delphinus INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected delphinus INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "hydrus", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected hydrus INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected hydrus INSTALLSTATE_UNKNOWN, got %d\n", action); - - r = MsiSetFeatureState(hpkg, "orion", INSTALLSTATE_ABSENT); - ok( r == ERROR_SUCCESS, "failed to set feature state: %d\n", r); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "zodiac", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected zodiac INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected zodiac INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "perseus", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected perseus INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_SOURCE, "Expected perseus INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetFeatureState(hpkg, "orion", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_ABSENT, "Expected orion INSTALLSTATE_ABSENT, got %d\n", state); - ok( action == INSTALLSTATE_ABSENT, "Expected orion INSTALLSTATE_ABSENT, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "leo", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected leo INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected leo INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "virgo", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected virgo INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_SOURCE, "Expected virgo INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "libra", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected libra INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected libra INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "cassiopeia", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected cassiopeia INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_LOCAL, "Expected cassiopeia INSTALLSTATE_LOCAL, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "cepheus", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected cepheus INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_SOURCE, "Expected cepheus INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "andromeda", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected andromeda INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_SOURCE, "Expected andromeda INSTALLSTATE_SOURCE, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "canis", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected canis INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected canis INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "monoceros", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected monoceros INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected monoceros INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "lepus", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected lepus INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected lepus INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "delphinus", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected delphinus INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected delphinus INSTALLSTATE_UNKNOWN, got %d\n", action); - - state = 0xdeadbee; - action = 0xdeadbee; - r = MsiGetComponentState(hpkg, "hydrus", &state, &action); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r ); - ok( state == INSTALLSTATE_UNKNOWN, "Expected hydrus INSTALLSTATE_UNKNOWN, got %d\n", state); - ok( action == INSTALLSTATE_UNKNOWN, "Expected hydrus INSTALLSTATE_UNKNOWN, got %d\n", action); - - MsiCloseHandle(hpkg); - DeleteFileA(msifile); -} - -static void test_installprops(void) -{ - MSIHANDLE hpkg, hdb; - CHAR path[MAX_PATH]; - CHAR buf[MAX_PATH]; - DWORD size, type; - LANGID langid; - HKEY hkey1, hkey2; - int res; - UINT r; - - GetCurrentDirectory(MAX_PATH, path); - lstrcat(path, "\\"); - lstrcat(path, msifile); - - hdb = create_package_db(); - ok( hdb, "failed to create database\n"); - - hpkg = package_from_db(hdb); - ok( hpkg, "failed to create package\n"); - - MsiCloseHandle(hdb); - - size = MAX_PATH; - r = MsiGetProperty(hpkg, "DATABASE", buf, &size); - ok( r == ERROR_SUCCESS, "failed to get property: %d\n", r); - ok( !lstrcmp(buf, path), "Expected %s, got %s\n", path, buf); - - RegOpenKey(HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\MS Setup (ACME)\\User Info", &hkey1); - - RegOpenKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", &hkey2); - - size = MAX_PATH; - type = REG_SZ; - *path = '\0'; - if (RegQueryValueEx(hkey1, "DefName", NULL, &type, (LPBYTE)path, &size) != ERROR_SUCCESS) - { - size = MAX_PATH; - type = REG_SZ; - RegQueryValueEx(hkey2, "RegisteredOwner", NULL, &type, (LPBYTE)path, &size); - } - - /* win9x doesn't set this */ - if (*path) - { - size = MAX_PATH; - r = MsiGetProperty(hpkg, "USERNAME", buf, &size); - ok( r == ERROR_SUCCESS, "failed to get property: %d\n", r); - ok( !lstrcmp(buf, path), "Expected %s, got %s\n", path, buf); - } - - size = MAX_PATH; - type = REG_SZ; - *path = '\0'; - if (RegQueryValueEx(hkey1, "DefCompany", NULL, &type, (LPBYTE)path, &size) != ERROR_SUCCESS) - { - size = MAX_PATH; - type = REG_SZ; - RegQueryValueEx(hkey2, "RegisteredOrganization", NULL, &type, (LPBYTE)path, &size); - } - - if (*path) - { - size = MAX_PATH; - r = MsiGetProperty(hpkg, "COMPANYNAME", buf, &size); - ok( r == ERROR_SUCCESS, "failed to get property: %d\n", r); - ok( !lstrcmp(buf, path), "Expected %s, got %s\n", path, buf); - } - - size = MAX_PATH; - r = MsiGetProperty(hpkg, "VersionDatabase", buf, &size); - ok( r == ERROR_SUCCESS, "failed to get property: %d\n", r); - trace("VersionDatabase = %s\n", buf); - - size = MAX_PATH; - r = MsiGetProperty(hpkg, "VersionMsi", buf, &size); - ok( r == ERROR_SUCCESS, "failed to get property: %d\n", r); - trace("VersionMsi = %s\n", buf); - - size = MAX_PATH; - r = MsiGetProperty(hpkg, "Date", buf, &size); - ok( r == ERROR_SUCCESS, "failed to get property: %d\n", r); - trace("Date = %s\n", buf); - - size = MAX_PATH; - r = MsiGetProperty(hpkg, "Time", buf, &size); - ok( r == ERROR_SUCCESS, "failed to get property: %d\n", r); - trace("Time = %s\n", buf); - - size = MAX_PATH; - r = MsiGetProperty(hpkg, "PackageCode", buf, &size); - ok( r == ERROR_SUCCESS, "failed to get property: %d\n", r); - trace("PackageCode = %s\n", buf); - - langid = GetUserDefaultLangID(); - sprintf(path, "%d", langid); - - size = MAX_PATH; - r = MsiGetProperty(hpkg, "UserLanguageID", buf, &size); - ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS< got %d\n", r); - ok( !lstrcmpA(buf, path), "Expected \"%s\", got \"%s\"\n", path, buf); - - res = GetSystemMetrics(SM_CXSCREEN); - size = MAX_PATH; - r = MsiGetProperty(hpkg, "ScreenX", buf, &size); - ok(atol(buf) == res, "Expected %d, got %ld\n", res, atol(buf)); - - res = GetSystemMetrics(SM_CYSCREEN); - size = MAX_PATH; - r = MsiGetProperty(hpkg, "ScreenY", buf, &size); - ok(atol(buf) == res, "Expected %d, got %ld\n", res, atol(buf)); - - CloseHandle(hkey1); - CloseHandle(hkey2); - MsiCloseHandle(hpkg); - DeleteFile(msifile); -} - -static void test_launchconditions(void) -{ - MSIHANDLE hpkg; - MSIHANDLE hdb; - UINT r; - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - hdb = create_package_db(); - ok( hdb, "failed to create package database\n" ); - - r = create_launchcondition_table( hdb ); - ok( r == ERROR_SUCCESS, "cannot create LaunchCondition table: %d\n", r ); - - r = add_launchcondition_entry( hdb, "'X = \"1\"', 'one'" ); - ok( r == ERROR_SUCCESS, "cannot add launch condition: %d\n", r ); - - /* invalid condition */ - r = add_launchcondition_entry( hdb, "'X != \"1\"', 'one'" ); - ok( r == ERROR_SUCCESS, "cannot add launch condition: %d\n", r ); - - hpkg = package_from_db( hdb ); - ok( hpkg, "failed to create package\n"); - - MsiCloseHandle( hdb ); - - r = MsiSetProperty( hpkg, "X", "1" ); - ok( r == ERROR_SUCCESS, "failed to set property\n" ); - - /* invalid conditions are ignored */ - r = MsiDoAction( hpkg, "LaunchConditions" ); - ok( r == ERROR_SUCCESS, "cost init failed\n" ); - - /* verify LaunchConditions still does some verification */ - r = MsiSetProperty( hpkg, "X", "2" ); - ok( r == ERROR_SUCCESS, "failed to set property\n" ); - - r = MsiDoAction( hpkg, "LaunchConditions" ); - ok( r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %d\n", r ); - - MsiCloseHandle( hpkg ); - DeleteFile( msifile ); -} - -static void test_ccpsearch(void) -{ - MSIHANDLE hdb, hpkg; - CHAR prop[MAX_PATH]; - DWORD size = MAX_PATH; - UINT r; - - MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); - - hdb = create_package_db(); - ok(hdb, "failed to create package database\n"); - - r = create_ccpsearch_table(hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_ccpsearch_entry(hdb, "'CCP_random'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_ccpsearch_entry(hdb, "'RMCCP_random'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = create_reglocator_table(hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_reglocator_entry(hdb, "'CCP_random', 0, 'htmlfile\\shell\\open\\nonexistent', '', 1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = create_drlocator_table(hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_drlocator_entry(hdb, "'RMCCP_random', '', 'C:\\', '0'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = create_signature_table(hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - hpkg = package_from_db(hdb); - ok(hpkg, "failed to create package\n"); - - MsiCloseHandle(hdb); - - r = MsiDoAction(hpkg, "CCPSearch"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiGetPropertyA(hpkg, "CCP_Success", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, "1"), "Expected 1, got %s\n", prop); - - MsiCloseHandle(hpkg); - DeleteFileA(msifile); -} - -static void test_complocator(void) -{ - MSIHANDLE hdb, hpkg; - UINT r; - CHAR prop[MAX_PATH]; - CHAR expected[MAX_PATH]; - DWORD size = MAX_PATH; - - hdb = create_package_db(); - ok(hdb, "failed to create package database\n"); - - r = create_appsearch_table(hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'ABELISAURUS', 'abelisaurus'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'BACTROSAURUS', 'bactrosaurus'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'CAMELOTIA', 'camelotia'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'DICLONIUS', 'diclonius'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'ECHINODON', 'echinodon'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'FALCARIUS', 'falcarius'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'GALLIMIMUS', 'gallimimus'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'HAGRYPHUS', 'hagryphus'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'IGUANODON', 'iguanodon'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'JOBARIA', 'jobaria'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'KAKURU', 'kakuru'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'LABOCANIA', 'labocania'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'MEGARAPTOR', 'megaraptor'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'NEOSODON', 'neosodon'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'OLOROTITAN', 'olorotitan'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_appsearch_entry(hdb, "'PANTYDRACO', 'pantydraco'"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = create_complocator_table(hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_complocator_entry(hdb, "'abelisaurus', '{E3619EED-305A-418C-B9C7-F7D7377F0934}', 1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_complocator_entry(hdb, "'bactrosaurus', '{D56B688D-542F-42Ef-90FD-B6DA76EE8119}', 0"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_complocator_entry(hdb, "'camelotia', '{8211BE36-2466-47E3-AFB7-6AC72E51AED2}', 1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_complocator_entry(hdb, "'diclonius', '{5C767B20-A33C-45A4-B80B-555E512F01AE}', 0"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_complocator_entry(hdb, "'echinodon', '{A19E16C5-C75D-4699-8111-C4338C40C3CB}', 1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_complocator_entry(hdb, "'falcarius', '{17762FA1-A7AE-4CC6-8827-62873C35361D}', 0"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_complocator_entry(hdb, "'gallimimus', '{75EBF568-C959-41E0-A99E-9050638CF5FB}', 1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_complocator_entry(hdb, "'hagrphus', '{D4969B72-17D9-4AB6-BE49-78F2FEE857AC}', 0"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_complocator_entry(hdb, "'iguanodon', '{8E0DA02E-F6A7-4A8F-B25D-6F564C492308}', 1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_complocator_entry(hdb, "'jobaria', '{243C22B1-8C51-4151-B9D1-1AE5265E079E}', 0"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_complocator_entry(hdb, "'kakuru', '{5D0F03BA-50BC-44F2-ABB1-72C972F4E514}', 1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_complocator_entry(hdb, "'labocania', '{C7DDB60C-7828-4046-A6F8-699D5E92F1ED}', 0"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_complocator_entry(hdb, "'megaraptor', '{8B1034B7-BD5E-41ac-B52C-0105D3DFD74D}', 1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_complocator_entry(hdb, "'neosodon', '{0B499649-197A-48EF-93D2-AF1C17ED6E90}', 0"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_complocator_entry(hdb, "'olorotitan', '{54E9E91F-AED2-46D5-A25A-7E50AFA24513}', 1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_complocator_entry(hdb, "'pantydraco', '{2A989951-5565-4FA7-93A7-E800A3E67D71}', 0"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = create_signature_table(hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_signature_entry(hdb, "'abelisaurus', 'abelisaurus', '', '', '', '', '', '', ''"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_signature_entry(hdb, "'bactrosaurus', 'bactrosaurus', '', '', '', '', '', '', ''"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_signature_entry(hdb, "'camelotia', 'camelotia', '', '', '', '', '', '', ''"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_signature_entry(hdb, "'diclonius', 'diclonius', '', '', '', '', '', '', ''"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_signature_entry(hdb, "'iguanodon', 'iguanodon', '', '', '', '', '', '', ''"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_signature_entry(hdb, "'jobaria', 'jobaria', '', '', '', '', '', '', ''"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_signature_entry(hdb, "'kakuru', 'kakuru', '', '', '', '', '', '', ''"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = add_signature_entry(hdb, "'labocania', 'labocania', '', '', '', '', '', '', ''"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - hpkg = package_from_db(hdb); - ok(hpkg, "failed to create package\n"); - - MsiCloseHandle(hdb); - - create_test_file("abelisaurus"); - create_test_file("bactrosaurus"); - create_test_file("camelotia"); - create_test_file("diclonius"); - create_test_file("echinodon"); - create_test_file("falcarius"); - create_test_file("gallimimus"); - create_test_file("hagryphus"); - CreateDirectoryA("iguanodon", NULL); - CreateDirectoryA("jobaria", NULL); - CreateDirectoryA("kakuru", NULL); - CreateDirectoryA("labocania", NULL); - CreateDirectoryA("megaraptor", NULL); - CreateDirectoryA("neosodon", NULL); - CreateDirectoryA("olorotitan", NULL); - CreateDirectoryA("pantydraco", NULL); - - set_component_path("abelisaurus", MSIINSTALLCONTEXT_MACHINE, - "{E3619EED-305A-418C-B9C7-F7D7377F0934}", NULL, FALSE); - set_component_path("bactrosaurus", MSIINSTALLCONTEXT_MACHINE, - "{D56B688D-542F-42Ef-90FD-B6DA76EE8119}", NULL, FALSE); - set_component_path("echinodon", MSIINSTALLCONTEXT_MACHINE, - "{A19E16C5-C75D-4699-8111-C4338C40C3CB}", NULL, FALSE); - set_component_path("falcarius", MSIINSTALLCONTEXT_MACHINE, - "{17762FA1-A7AE-4CC6-8827-62873C35361D}", NULL, FALSE); - set_component_path("iguanodon", MSIINSTALLCONTEXT_MACHINE, - "{8E0DA02E-F6A7-4A8F-B25D-6F564C492308}", NULL, FALSE); - set_component_path("jobaria", MSIINSTALLCONTEXT_MACHINE, - "{243C22B1-8C51-4151-B9D1-1AE5265E079E}", NULL, FALSE); - set_component_path("megaraptor", MSIINSTALLCONTEXT_MACHINE, - "{8B1034B7-BD5E-41ac-B52C-0105D3DFD74D}", NULL, FALSE); - set_component_path("neosodon", MSIINSTALLCONTEXT_MACHINE, - "{0B499649-197A-48EF-93D2-AF1C17ED6E90}", NULL, FALSE); - - r = MsiDoAction(hpkg, "AppSearch"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "ABELISAURUS", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - lstrcpyA(expected, CURR_DIR); - lstrcatA(expected, "\\abelisaurus"); - ok(!lstrcmpA(prop, expected) || !lstrcmpA(prop, ""), - "Expected %s or empty string, got %s\n", expected, prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "BACTROSAURUS", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected , got %s\n", prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "CAMELOTIA", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected , got %s\n", prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "DICLONIUS", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected , got %s\n", prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "ECHINODON", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - lstrcpyA(expected, CURR_DIR); - lstrcatA(expected, "\\"); - ok(!lstrcmpA(prop, expected) || !lstrcmpA(prop, ""), - "Expected %s or empty string, got %s\n", expected, prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "FALCARIUS", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected , got %s\n", prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "GALLIMIMUS", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected , got %s\n", prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "HAGRYPHUS", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected , got %s\n", prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "IGUANODON", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected , got %s\n", prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "JOBARIA", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected , got %s\n", prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "KAKURU", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected , got %s\n", prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "LABOCANIA", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected , got %s\n", prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "MEGARAPTOR", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - lstrcpyA(expected, CURR_DIR); - lstrcatA(expected, "\\"); - ok(!lstrcmpA(prop, expected) || !lstrcmpA(prop, ""), - "Expected %s or empty string, got %s\n", expected, prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "NEOSODON", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - lstrcpyA(expected, CURR_DIR); - lstrcatA(expected, "\\neosodon\\"); - ok(!lstrcmpA(prop, expected) || !lstrcmpA(prop, ""), - "Expected %s or empty string, got %s\n", expected, prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "OLOROTITAN", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected , got %s\n", prop); - - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "PANTYDRACO", prop, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(prop, ""), "Expected , got %s\n", prop); - - MsiCloseHandle(hpkg); - DeleteFileA("abelisaurus"); - DeleteFileA("bactrosaurus"); - DeleteFileA("camelotia"); - DeleteFileA("diclonius"); - DeleteFileA("echinodon"); - DeleteFileA("falcarius"); - DeleteFileA("gallimimus"); - DeleteFileA("hagryphus"); - RemoveDirectoryA("iguanodon"); - RemoveDirectoryA("jobaria"); - RemoveDirectoryA("kakuru"); - RemoveDirectoryA("labocania"); - RemoveDirectoryA("megaraptor"); - RemoveDirectoryA("neosodon"); - RemoveDirectoryA("olorotitan"); - RemoveDirectoryA("pantydraco"); - delete_component_path("{E3619EED-305A-418C-B9C7-F7D7377F0934}", - MSIINSTALLCONTEXT_MACHINE, NULL); - delete_component_path("{D56B688D-542F-42Ef-90FD-B6DA76EE8119}", - MSIINSTALLCONTEXT_MACHINE, NULL); - delete_component_path("{A19E16C5-C75D-4699-8111-C4338C40C3CB}", - MSIINSTALLCONTEXT_MACHINE, NULL); - delete_component_path("{17762FA1-A7AE-4CC6-8827-62873C35361D}", - MSIINSTALLCONTEXT_MACHINE, NULL); - delete_component_path("{8E0DA02E-F6A7-4A8F-B25D-6F564C492308}", - MSIINSTALLCONTEXT_MACHINE, NULL); - delete_component_path("{243C22B1-8C51-4151-B9D1-1AE5265E079E}", - MSIINSTALLCONTEXT_MACHINE, NULL); - delete_component_path("{8B1034B7-BD5E-41ac-B52C-0105D3DFD74D}", - MSIINSTALLCONTEXT_MACHINE, NULL); - delete_component_path("{0B499649-197A-48EF-93D2-AF1C17ED6E90}", - MSIINSTALLCONTEXT_MACHINE, NULL); - DeleteFileA(msifile); -} - -static void set_suminfo_prop(MSIHANDLE db, DWORD prop, DWORD val) -{ - MSIHANDLE summary; - UINT r; - - r = MsiGetSummaryInformationA(db, NULL, 1, &summary); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiSummaryInfoSetPropertyA(summary, prop, VT_I4, val, NULL, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiSummaryInfoPersist(summary); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - - MsiCloseHandle(summary); -} - -static void test_MsiGetSourcePath(void) -{ - MSIHANDLE hdb, hpkg; - CHAR path[MAX_PATH]; - CHAR cwd[MAX_PATH]; - CHAR subsrc[MAX_PATH]; - CHAR sub2[MAX_PATH]; - DWORD size; - UINT r; - - lstrcpyA(cwd, CURR_DIR); - lstrcatA(cwd, "\\"); - - lstrcpyA(subsrc, cwd); - lstrcatA(subsrc, "subsource"); - lstrcatA(subsrc, "\\"); - - lstrcpyA(sub2, subsrc); - lstrcatA(sub2, "sub2"); - lstrcatA(sub2, "\\"); - - /* uncompressed source */ - - hdb = create_package_db(); - ok( hdb, "failed to create database\n"); - - set_suminfo_prop(hdb, PID_WORDCOUNT, 0); - - r = add_directory_entry(hdb, "'TARGETDIR', '', 'SourceDir'"); - ok(r == S_OK, "failed\n"); - - r = add_directory_entry(hdb, "'SubDir', 'TARGETDIR', 'subtarget:subsource'"); - ok(r == S_OK, "failed\n"); - - r = add_directory_entry(hdb, "'SubDir2', 'SubDir', 'sub2'"); - ok(r == S_OK, "failed\n"); - - r = MsiDatabaseCommit(hdb); - ok(r == ERROR_SUCCESS , "Failed to commit database\n"); - - hpkg = package_from_db(hdb); - ok(hpkg, "failed to create package\n"); - - MsiCloseHandle(hdb); - - /* invalid database handle */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(-1, "TARGETDIR", path, &size); - ok(r == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* NULL szFolder */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, NULL, path, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* empty szFolder */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "", path, &size); - ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* try TARGETDIR */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "TARGETDIR", path, &size); - ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* try SourceDir */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SourceDir", path, &size); - ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* try SOURCEDIR */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* source path does not exist, but the property exists */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path); - ok(size == 0, "Expected 0, got %d\n", size); - - /* try SubDir */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir", path, &size); - ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* try SubDir2 */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir2", path, &size); - ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - r = MsiDoAction(hpkg, "CostInitialize"); - ok(r == ERROR_SUCCESS, "cost init failed\n"); - - /* try TARGETDIR after CostInitialize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "TARGETDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SourceDir after CostInitialize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SourceDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SOURCEDIR after CostInitialize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* source path does not exist, but the property exists */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - todo_wine - { - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - } - - /* try SubDir after CostInitialize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path); - ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size); - - /* try SubDir2 after CostInitialize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir2", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, sub2), "Expected \"%s\", got \"%s\"\n", sub2, path); - ok(size == lstrlenA(sub2), "Expected %d, got %d\n", lstrlenA(sub2), size); - - r = MsiDoAction(hpkg, "ResolveSource"); - ok(r == ERROR_SUCCESS, "file cost failed\n"); - - /* try TARGETDIR after ResolveSource */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "TARGETDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SourceDir after ResolveSource */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SourceDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SOURCEDIR after ResolveSource */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* source path does not exist, but the property exists */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SubDir after ResolveSource */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path); - ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size); - - /* try SubDir2 after ResolveSource */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir2", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, sub2), "Expected \"%s\", got \"%s\"\n", sub2, path); - ok(size == lstrlenA(sub2), "Expected %d, got %d\n", lstrlenA(sub2), size); - - r = MsiDoAction(hpkg, "FileCost"); - ok(r == ERROR_SUCCESS, "file cost failed\n"); - - /* try TARGETDIR after FileCost */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "TARGETDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SourceDir after FileCost */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SourceDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SOURCEDIR after FileCost */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* source path does not exist, but the property exists */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SubDir after FileCost */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path); - ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size); - - /* try SubDir2 after FileCost */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir2", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, sub2), "Expected \"%s\", got \"%s\"\n", sub2, path); - ok(size == lstrlenA(sub2), "Expected %d, got %d\n", lstrlenA(sub2), size); - - r = MsiDoAction(hpkg, "CostFinalize"); - ok(r == ERROR_SUCCESS, "file cost failed\n"); - - /* try TARGETDIR after CostFinalize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "TARGETDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SourceDir after CostFinalize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SourceDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SOURCEDIR after CostFinalize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* source path does not exist, but the property exists */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SubDir after CostFinalize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path); - ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size); - - /* try SubDir2 after CostFinalize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir2", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, sub2), "Expected \"%s\", got \"%s\"\n", sub2, path); - ok(size == lstrlenA(sub2), "Expected %d, got %d\n", lstrlenA(sub2), size); - - /* nonexistent directory */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "IDontExist", path, &size); - ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* NULL szPathBuf */ - size = MAX_PATH; - r = MsiGetSourcePath(hpkg, "SourceDir", NULL, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* NULL pcchPathBuf */ - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SourceDir", path, NULL); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - - /* pcchPathBuf is 0 */ - size = 0; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SourceDir", path, &size); - ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* pcchPathBuf does not have room for NULL terminator */ - size = lstrlenA(cwd); - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SourceDir", path, &size); - ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r); - ok(!strncmp(path, cwd, lstrlenA(cwd) - 1), - "Expected path with no backslash, got \"%s\"\n", path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* pcchPathBuf has room for NULL terminator */ - size = lstrlenA(cwd) + 1; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SourceDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - MsiCloseHandle(hpkg); - - /* compressed source */ - - r = MsiOpenDatabase(msifile, MSIDBOPEN_DIRECT, &hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - set_suminfo_prop(hdb, PID_WORDCOUNT, msidbSumInfoSourceTypeCompressed); - - hpkg = package_from_db(hdb); - ok(hpkg, "failed to create package\n"); - - /* try TARGETDIR */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "TARGETDIR", path, &size); - ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* try SourceDir */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SourceDir", path, &size); - ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* try SOURCEDIR */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* source path nor the property exist */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path); - ok(size == 0, "Expected 0, got %d\n", size); - - /* try SubDir */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir", path, &size); - ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* try SubDir2 */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir2", path, &size); - ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - r = MsiDoAction(hpkg, "CostInitialize"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* try TARGETDIR after CostInitialize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "TARGETDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SourceDir after CostInitialize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SourceDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SOURCEDIR after CostInitialize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SOURCEDIR", path, &size); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - } - - /* source path does not exist, but the property exists */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - todo_wine - { - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - } - - /* try SubDir after CostInitialize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SubDir2 after CostInitialize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir2", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - r = MsiDoAction(hpkg, "ResolveSource"); - ok(r == ERROR_SUCCESS, "file cost failed\n"); - - /* try TARGETDIR after ResolveSource */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "TARGETDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SourceDir after ResolveSource */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SourceDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SOURCEDIR after ResolveSource */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SOURCEDIR", path, &size); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - } - - /* source path and the property exist */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SubDir after ResolveSource */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SubDir2 after ResolveSource */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir2", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - r = MsiDoAction(hpkg, "FileCost"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* try TARGETDIR after CostFinalize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "TARGETDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SourceDir after CostFinalize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SourceDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SOURCEDIR after CostFinalize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SOURCEDIR", path, &size); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - } - - /* source path and the property exist */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SubDir after CostFinalize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SubDir2 after CostFinalize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir2", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - r = MsiDoAction(hpkg, "CostFinalize"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* try TARGETDIR after CostFinalize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "TARGETDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SourceDir after CostFinalize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SourceDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SOURCEDIR after CostFinalize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SOURCEDIR", path, &size); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - } - - /* source path and the property exist */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SubDir after CostFinalize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* try SubDir2 after CostFinalize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir2", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - MsiCloseHandle(hpkg); - DeleteFile(msifile); -} - -static void test_shortlongsource(void) -{ - MSIHANDLE hdb, hpkg; - CHAR path[MAX_PATH]; - CHAR cwd[MAX_PATH]; - CHAR subsrc[MAX_PATH]; - DWORD size; - UINT r; - - lstrcpyA(cwd, CURR_DIR); - lstrcatA(cwd, "\\"); - - lstrcpyA(subsrc, cwd); - lstrcatA(subsrc, "long"); - lstrcatA(subsrc, "\\"); - - /* long file names */ - - hdb = create_package_db(); - ok( hdb, "failed to create database\n"); - - set_suminfo_prop(hdb, PID_WORDCOUNT, 0); - - r = add_directory_entry(hdb, "'TARGETDIR', '', 'SourceDir'"); - ok(r == S_OK, "failed\n"); - - r = add_directory_entry(hdb, "'SubDir', 'TARGETDIR', 'short|long'"); - ok(r == S_OK, "failed\n"); - - /* CostInitialize:short */ - r = add_directory_entry(hdb, "'SubDir2', 'TARGETDIR', 'one|two'"); - ok(r == S_OK, "failed\n"); - - /* CostInitialize:long */ - r = add_directory_entry(hdb, "'SubDir3', 'TARGETDIR', 'three|four'"); - ok(r == S_OK, "failed\n"); - - /* FileCost:short */ - r = add_directory_entry(hdb, "'SubDir4', 'TARGETDIR', 'five|six'"); - ok(r == S_OK, "failed\n"); - - /* FileCost:long */ - r = add_directory_entry(hdb, "'SubDir5', 'TARGETDIR', 'seven|eight'"); - ok(r == S_OK, "failed\n"); - - /* CostFinalize:short */ - r = add_directory_entry(hdb, "'SubDir6', 'TARGETDIR', 'nine|ten'"); - ok(r == S_OK, "failed\n"); - - /* CostFinalize:long */ - r = add_directory_entry(hdb, "'SubDir7', 'TARGETDIR', 'eleven|twelve'"); - ok(r == S_OK, "failed\n"); - - MsiDatabaseCommit(hdb); - - hpkg = package_from_db(hdb); - ok(hpkg, "failed to create package\n"); - - MsiCloseHandle(hdb); - - CreateDirectoryA("one", NULL); - CreateDirectoryA("four", NULL); - - r = MsiDoAction(hpkg, "CostInitialize"); - ok(r == ERROR_SUCCESS, "file cost failed\n"); - - CreateDirectory("five", NULL); - CreateDirectory("eight", NULL); - - r = MsiDoAction(hpkg, "FileCost"); - ok(r == ERROR_SUCCESS, "file cost failed\n"); - - CreateDirectory("nine", NULL); - CreateDirectory("twelve", NULL); - - r = MsiDoAction(hpkg, "CostFinalize"); - ok(r == ERROR_SUCCESS, "file cost failed\n"); - - /* neither short nor long source directories exist */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path); - ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size); - - CreateDirectoryA("short", NULL); - - /* short source directory exists */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path); - ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size); - - CreateDirectoryA("long", NULL); - - /* both short and long source directories exist */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path); - ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size); - - lstrcpyA(subsrc, cwd); - lstrcatA(subsrc, "two"); - lstrcatA(subsrc, "\\"); - - /* short dir exists before CostInitialize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir2", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path); - ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size); - - lstrcpyA(subsrc, cwd); - lstrcatA(subsrc, "four"); - lstrcatA(subsrc, "\\"); - - /* long dir exists before CostInitialize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir3", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path); - ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size); - - lstrcpyA(subsrc, cwd); - lstrcatA(subsrc, "six"); - lstrcatA(subsrc, "\\"); - - /* short dir exists before FileCost */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir4", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path); - ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size); - - lstrcpyA(subsrc, cwd); - lstrcatA(subsrc, "eight"); - lstrcatA(subsrc, "\\"); - - /* long dir exists before FileCost */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir5", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path); - ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size); - - lstrcpyA(subsrc, cwd); - lstrcatA(subsrc, "ten"); - lstrcatA(subsrc, "\\"); - - /* short dir exists before CostFinalize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir6", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path); - ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size); - - lstrcpyA(subsrc, cwd); - lstrcatA(subsrc, "twelve"); - lstrcatA(subsrc, "\\"); - - /* long dir exists before CostFinalize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir7", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path); - ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size); - - MsiCloseHandle(hpkg); - RemoveDirectoryA("short"); - RemoveDirectoryA("long"); - RemoveDirectoryA("one"); - RemoveDirectoryA("four"); - RemoveDirectoryA("five"); - RemoveDirectoryA("eight"); - RemoveDirectoryA("nine"); - RemoveDirectoryA("twelve"); - - /* short file names */ - - r = MsiOpenDatabase(msifile, MSIDBOPEN_DIRECT, &hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - set_suminfo_prop(hdb, PID_WORDCOUNT, msidbSumInfoSourceTypeSFN); - - hpkg = package_from_db(hdb); - ok(hpkg, "failed to create package\n"); - - MsiCloseHandle(hdb); - - CreateDirectoryA("one", NULL); - CreateDirectoryA("four", NULL); - - r = MsiDoAction(hpkg, "CostInitialize"); - ok(r == ERROR_SUCCESS, "file cost failed\n"); - - CreateDirectory("five", NULL); - CreateDirectory("eight", NULL); - - r = MsiDoAction(hpkg, "FileCost"); - ok(r == ERROR_SUCCESS, "file cost failed\n"); - - CreateDirectory("nine", NULL); - CreateDirectory("twelve", NULL); - - r = MsiDoAction(hpkg, "CostFinalize"); - ok(r == ERROR_SUCCESS, "file cost failed\n"); - - lstrcpyA(subsrc, cwd); - lstrcatA(subsrc, "short"); - lstrcatA(subsrc, "\\"); - - /* neither short nor long source directories exist */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path); - ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size); - - CreateDirectoryA("short", NULL); - - /* short source directory exists */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path); - ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size); - - CreateDirectoryA("long", NULL); - - /* both short and long source directories exist */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path); - ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size); - - lstrcpyA(subsrc, cwd); - lstrcatA(subsrc, "one"); - lstrcatA(subsrc, "\\"); - - /* short dir exists before CostInitialize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir2", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path); - ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size); - - lstrcpyA(subsrc, cwd); - lstrcatA(subsrc, "three"); - lstrcatA(subsrc, "\\"); - - /* long dir exists before CostInitialize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir3", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path); - ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size); - - lstrcpyA(subsrc, cwd); - lstrcatA(subsrc, "five"); - lstrcatA(subsrc, "\\"); - - /* short dir exists before FileCost */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir4", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path); - ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size); - - lstrcpyA(subsrc, cwd); - lstrcatA(subsrc, "seven"); - lstrcatA(subsrc, "\\"); - - /* long dir exists before FileCost */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir5", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path); - ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size); - - lstrcpyA(subsrc, cwd); - lstrcatA(subsrc, "nine"); - lstrcatA(subsrc, "\\"); - - /* short dir exists before CostFinalize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir6", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path); - ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size); - - lstrcpyA(subsrc, cwd); - lstrcatA(subsrc, "eleven"); - lstrcatA(subsrc, "\\"); - - /* long dir exists before CostFinalize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SubDir7", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, subsrc), "Expected \"%s\", got \"%s\"\n", subsrc, path); - ok(size == lstrlenA(subsrc), "Expected %d, got %d\n", lstrlenA(subsrc), size); - - MsiCloseHandle(hpkg); - RemoveDirectoryA("short"); - RemoveDirectoryA("long"); - RemoveDirectoryA("one"); - RemoveDirectoryA("four"); - RemoveDirectoryA("five"); - RemoveDirectoryA("eight"); - RemoveDirectoryA("nine"); - RemoveDirectoryA("twelve"); - DeleteFileA(msifile); -} - -static void test_sourcedir(void) -{ - MSIHANDLE hdb, hpkg; - CHAR package[10]; - CHAR path[MAX_PATH]; - CHAR cwd[MAX_PATH]; - CHAR subsrc[MAX_PATH]; - DWORD size; - UINT r; - - lstrcpyA(cwd, CURR_DIR); - lstrcatA(cwd, "\\"); - - lstrcpyA(subsrc, cwd); - lstrcatA(subsrc, "long"); - lstrcatA(subsrc, "\\"); - - hdb = create_package_db(); - ok( hdb, "failed to create database\n"); - - r = add_directory_entry(hdb, "'TARGETDIR', '', 'SourceDir'"); - ok(r == S_OK, "failed\n"); - - sprintf(package, "#%i", hdb); - r = MsiOpenPackage(package, &hpkg); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* properties only */ - - /* SourceDir prop */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SourceDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path); - ok(size == 0, "Expected 0, got %d\n", size); - - /* SOURCEDIR prop */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path); - ok(size == 0, "Expected 0, got %d\n", size); - - r = MsiDoAction(hpkg, "CostInitialize"); - ok(r == ERROR_SUCCESS, "file cost failed\n"); - - /* SourceDir after CostInitialize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SourceDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path); - ok(size == 0, "Expected 0, got %d\n", size); - - /* SOURCEDIR after CostInitialize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path); - ok(size == 0, "Expected 0, got %d\n", size); - - r = MsiDoAction(hpkg, "FileCost"); - ok(r == ERROR_SUCCESS, "file cost failed\n"); - - /* SourceDir after FileCost */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SourceDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path); - ok(size == 0, "Expected 0, got %d\n", size); - - /* SOURCEDIR after FileCost */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path); - ok(size == 0, "Expected 0, got %d\n", size); - - r = MsiDoAction(hpkg, "CostFinalize"); - ok(r == ERROR_SUCCESS, "file cost failed\n"); - - /* SourceDir after CostFinalize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SourceDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path); - ok(size == 0, "Expected 0, got %d\n", size); - - /* SOURCEDIR after CostFinalize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path); - ok(size == 0, "Expected 0, got %d\n", size); - - r = MsiDoAction(hpkg, "ResolveSource"); - ok(r == ERROR_SUCCESS, "file cost failed\n"); - - /* SourceDir after ResolveSource */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SourceDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* SOURCEDIR after ResolveSource */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* random casing */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SoUrCeDiR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path); - ok(size == 0, "Expected 0, got %d\n", size); - - MsiCloseHandle(hpkg); - - /* reset the package state */ - sprintf(package, "#%i", hdb); - r = MsiOpenPackage(package, &hpkg); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* test how MsiGetSourcePath affects the properties */ - - /* SourceDir prop */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SourceDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - todo_wine - { - ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path); - ok(size == 0, "Expected 0, got %d\n", size); - } - - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SourceDir", path, &size); - ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* SourceDir after MsiGetSourcePath */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SourceDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - todo_wine - { - ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path); - ok(size == 0, "Expected 0, got %d\n", size); - } - - /* SOURCEDIR prop */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - todo_wine - { - ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path); - ok(size == 0, "Expected 0, got %d\n", size); - } - - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* SOURCEDIR prop after MsiGetSourcePath */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - todo_wine - { - ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path); - ok(size == 0, "Expected 0, got %d\n", size); - } - - r = MsiDoAction(hpkg, "CostInitialize"); - ok(r == ERROR_SUCCESS, "file cost failed\n"); - - /* SourceDir after CostInitialize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SourceDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - todo_wine - { - ok(!lstrcmpA(path, ""), "Expected \"\", got \"%s\"\n", path); - ok(size == 0, "Expected 0, got %d\n", size); - } - - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SourceDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* SourceDir after MsiGetSourcePath */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SourceDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* SOURCEDIR after CostInitialize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* SOURCEDIR source path still does not exist */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - r = MsiDoAction(hpkg, "FileCost"); - ok(r == ERROR_SUCCESS, "file cost failed\n"); - - /* SourceDir after FileCost */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SourceDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* SOURCEDIR after FileCost */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* SOURCEDIR source path still does not exist */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - r = MsiDoAction(hpkg, "CostFinalize"); - ok(r == ERROR_SUCCESS, "file cost failed\n"); - - /* SourceDir after CostFinalize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SourceDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* SOURCEDIR after CostFinalize */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* SOURCEDIR source path still does not exist */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - r = MsiDoAction(hpkg, "ResolveSource"); - ok(r == ERROR_SUCCESS, "file cost failed\n"); - - /* SourceDir after ResolveSource */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SourceDir", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* SOURCEDIR after ResolveSource */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetProperty(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(path, cwd), "Expected \"%s\", got \"%s\"\n", cwd, path); - ok(size == lstrlenA(cwd), "Expected %d, got %d\n", lstrlenA(cwd), size); - - /* SOURCEDIR source path still does not exist */ - size = MAX_PATH; - lstrcpyA(path, "kiwi"); - r = MsiGetSourcePath(hpkg, "SOURCEDIR", path, &size); - ok(r == ERROR_DIRECTORY, "Expected ERROR_DIRECTORY, got %d\n", r); - ok(!lstrcmpA(path, "kiwi"), - "Expected path to be unchanged, got \"%s\"\n", path); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - MsiCloseHandle(hdb); - MsiCloseHandle(hpkg); - DeleteFileA(msifile); -} - -struct access_res -{ - BOOL gothandle; - DWORD lasterr; - BOOL ignore; -}; - -static const struct access_res create[16] = -{ - { TRUE, ERROR_SUCCESS, TRUE }, - { TRUE, ERROR_SUCCESS, TRUE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { TRUE, ERROR_SUCCESS, TRUE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { TRUE, ERROR_SUCCESS, TRUE } -}; - -static const struct access_res create_commit[16] = -{ - { TRUE, ERROR_SUCCESS, TRUE }, - { TRUE, ERROR_SUCCESS, TRUE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { TRUE, ERROR_SUCCESS, TRUE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { TRUE, ERROR_SUCCESS, TRUE } -}; - -static const struct access_res create_close[16] = -{ - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS } -}; - -static void _test_file_access(LPCSTR file, const struct access_res *ares, DWORD line) -{ - DWORD access = 0, share = 0; - DWORD lasterr; - HANDLE hfile; - int i, j, idx = 0; - - for (i = 0; i < 4; i++) - { - if (i == 0) access = 0; - if (i == 1) access = GENERIC_READ; - if (i == 2) access = GENERIC_WRITE; - if (i == 3) access = GENERIC_READ | GENERIC_WRITE; - - for (j = 0; j < 4; j++) - { - if (ares[idx].ignore) - continue; - - if (j == 0) share = 0; - if (j == 1) share = FILE_SHARE_READ; - if (j == 2) share = FILE_SHARE_WRITE; - if (j == 3) share = FILE_SHARE_READ | FILE_SHARE_WRITE; - - SetLastError(0xdeadbeef); - hfile = CreateFileA(file, access, share, NULL, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, 0); - lasterr = GetLastError(); - - ok((hfile != INVALID_HANDLE_VALUE) == ares[idx].gothandle, - "(%d, handle, %d): Expected %d, got %d\n", - line, idx, ares[idx].gothandle, - (hfile != INVALID_HANDLE_VALUE)); - - ok(lasterr == ares[idx].lasterr || - lasterr == 0xdeadbeef, /* win9x */ - "(%d, lasterr, %d): Expected %d, got %d\n", - line, idx, ares[idx].lasterr, lasterr); - - CloseHandle(hfile); - idx++; - } - } -} - -#define test_file_access(file, ares) _test_file_access(file, ares, __LINE__) - -static void test_access(void) -{ - MSIHANDLE hdb; - UINT r; - - r = MsiOpenDatabaseA(msifile, MSIDBOPEN_CREATE, &hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - test_file_access(msifile, create); - - r = MsiDatabaseCommit(hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - test_file_access(msifile, create_commit); - - MsiCloseHandle(hdb); - - test_file_access(msifile, create_close); - - DeleteFileA(msifile); - - r = MsiOpenDatabaseA(msifile, MSIDBOPEN_CREATEDIRECT, &hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - test_file_access(msifile, create); - - r = MsiDatabaseCommit(hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - test_file_access(msifile, create_commit); - - MsiCloseHandle(hdb); - - test_file_access(msifile, create_close); - - DeleteFileA(msifile); -} - -static void test_emptypackage(void) -{ - MSIHANDLE hpkg = 0, hdb = 0, hsuminfo = 0; - MSIHANDLE hview = 0, hrec = 0; - MSICONDITION condition; - CHAR buffer[MAX_PATH]; - DWORD size; - UINT r; - - r = MsiOpenPackageA("", &hpkg); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - } - - hdb = MsiGetActiveDatabase(hpkg); - todo_wine - { - ok(hdb != 0, "Expected a valid database handle\n"); - } - - r = MsiDatabaseOpenView(hdb, "SELECT * FROM `_Tables`", &hview); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - } - r = MsiViewExecute(hview, 0); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - } - - r = MsiViewFetch(hview, &hrec); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - } - - buffer[0] = 0; - size = MAX_PATH; - r = MsiRecordGetString(hrec, 1, buffer, &size); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buffer, "_Property"), - "Expected \"_Property\", got \"%s\"\n", buffer); - } - - MsiCloseHandle(hrec); - - r = MsiViewFetch(hview, &hrec); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - } - - size = MAX_PATH; - r = MsiRecordGetString(hrec, 1, buffer, &size); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buffer, "#_FolderCache"), - "Expected \"_Property\", got \"%s\"\n", buffer); - } - - MsiCloseHandle(hrec); - MsiViewClose(hview); - MsiCloseHandle(hview); - - condition = MsiDatabaseIsTablePersistentA(hdb, "_Property"); - todo_wine - { - ok(condition == MSICONDITION_FALSE, - "Expected MSICONDITION_FALSE, got %d\n", condition); - } - - r = MsiDatabaseOpenView(hdb, "SELECT * FROM `_Property`", &hview); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - } - r = MsiViewExecute(hview, 0); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - } - - /* _Property table is not empty */ - r = MsiViewFetch(hview, &hrec); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - } - - MsiCloseHandle(hrec); - MsiViewClose(hview); - MsiCloseHandle(hview); - - condition = MsiDatabaseIsTablePersistentA(hdb, "#_FolderCache"); - todo_wine - { - ok(condition == MSICONDITION_FALSE, - "Expected MSICONDITION_FALSE, got %d\n", condition); - } - - r = MsiDatabaseOpenView(hdb, "SELECT * FROM `#_FolderCache`", &hview); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - } - r = MsiViewExecute(hview, 0); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - } - - /* #_FolderCache is not empty */ - r = MsiViewFetch(hview, &hrec); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - } - - MsiCloseHandle(hrec); - MsiViewClose(hview); - MsiCloseHandle(hview); - - r = MsiDatabaseOpenView(hdb, "SELECT * FROM `_Streams`", &hview); - todo_wine - { - ok(r == ERROR_BAD_QUERY_SYNTAX, - "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r); - } - - r = MsiDatabaseOpenView(hdb, "SELECT * FROM `_Storages`", &hview); - todo_wine - { - ok(r == ERROR_BAD_QUERY_SYNTAX, - "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r); - } - - r = MsiGetSummaryInformationA(hdb, NULL, 0, &hsuminfo); - todo_wine - { - ok(r == ERROR_INSTALL_PACKAGE_INVALID, - "Expected ERROR_INSTALL_PACKAGE_INVALID, got %d\n", r); - } - - MsiCloseHandle(hsuminfo); - - r = MsiDatabaseCommit(hdb); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - } - - MsiCloseHandle(hdb); - MsiCloseHandle(hpkg); -} - -static void test_MsiGetProductProperty(void) -{ - MSIHANDLE hprod, hdb; - CHAR val[MAX_PATH]; - CHAR path[MAX_PATH]; - CHAR query[MAX_PATH]; - CHAR keypath[MAX_PATH*2]; - CHAR prodcode[MAX_PATH]; - CHAR prod_squashed[MAX_PATH]; - HKEY prodkey, userkey, props; - DWORD size; - LONG res; - UINT r; - SC_HANDLE scm; - - scm = OpenSCManager(NULL, NULL, SC_MANAGER_CONNECT); - if (!scm && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) - { - win_skip("Different registry keys on Win9x and WinMe\n"); - return; - } - CloseServiceHandle(scm); - - GetCurrentDirectoryA(MAX_PATH, path); - lstrcatA(path, "\\"); - - create_test_guid(prodcode, prod_squashed); - - r = MsiOpenDatabase(msifile, MSIDBOPEN_CREATE, &hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiDatabaseCommit(hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = set_summary_info(hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = run_query(hdb, - "CREATE TABLE `Directory` ( " - "`Directory` CHAR(255) NOT NULL, " - "`Directory_Parent` CHAR(255), " - "`DefaultDir` CHAR(255) NOT NULL " - "PRIMARY KEY `Directory`)"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = run_query(hdb, - "CREATE TABLE `Property` ( " - "`Property` CHAR(72) NOT NULL, " - "`Value` CHAR(255) " - "PRIMARY KEY `Property`)"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - sprintf(query, "INSERT INTO `Property` " - "(`Property`, `Value`) " - "VALUES( 'ProductCode', '%s' )", prodcode); - r = run_query(hdb, query); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiDatabaseCommit(hdb); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - MsiCloseHandle(hdb); - - lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\"); - lstrcatA(keypath, "Installer\\UserData\\S-1-5-18\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &userkey); - if (res == ERROR_ACCESS_DENIED) - { - skip("Not enough rights to perform tests\n"); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - return; - } - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = RegCreateKeyA(userkey, "InstallProperties", &props); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - lstrcpyA(val, path); - lstrcatA(val, "\\"); - lstrcatA(val, msifile); - res = RegSetValueExA(props, "LocalPackage", 0, REG_SZ, - (const BYTE *)val, lstrlenA(val) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - hprod = 0xdeadbeef; - r = MsiOpenProductA(prodcode, &hprod); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(hprod != 0 && hprod != 0xdeadbeef, "Expected a valid product handle\n"); - - /* hProduct is invalid */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = MsiGetProductPropertyA(0xdeadbeef, "ProductCode", val, &size); - ok(r == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* szProperty is NULL */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = MsiGetProductPropertyA(hprod, NULL, val, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == MAX_PATH, "Expected size to be unchanged, got %d\n", size); - - /* szProperty is empty */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = MsiGetProductPropertyA(hprod, "", val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, ""), "Expected \"\", got \"%s\"\n", val); - ok(size == 0, "Expected 0, got %d\n", size); - - /* get the property */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = MsiGetProductPropertyA(hprod, "ProductCode", val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, prodcode), - "Expected \"%s\", got \"%s\"\n", prodcode, val); - ok(size == lstrlenA(prodcode), - "Expected %d, got %d\n", lstrlenA(prodcode), size); - - /* lpValueBuf is NULL */ - size = MAX_PATH; - r = MsiGetProductPropertyA(hprod, "ProductCode", NULL, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(size == lstrlenA(prodcode), - "Expected %d, got %d\n", lstrlenA(prodcode), size); - - /* pcchValueBuf is NULL */ - lstrcpyA(val, "apple"); - r = MsiGetProductPropertyA(hprod, "ProductCode", val, NULL); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(val, "apple"), - "Expected val to be unchanged, got \"%s\"\n", val); - ok(size == lstrlenA(prodcode), - "Expected %d, got %d\n", lstrlenA(prodcode), size); - - /* pcchValueBuf is too small */ - size = 4; - lstrcpyA(val, "apple"); - r = MsiGetProductPropertyA(hprod, "ProductCode", val, &size); - ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r); - ok(!strncmp(val, prodcode, 3), - "Expected first 3 chars of \"%s\", got \"%s\"\n", prodcode, val); - ok(size == lstrlenA(prodcode), - "Expected %d, got %d\n", lstrlenA(prodcode), size); - - /* pcchValueBuf does not leave room for NULL terminator */ - size = lstrlenA(prodcode); - lstrcpyA(val, "apple"); - r = MsiGetProductPropertyA(hprod, "ProductCode", val, &size); - ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r); - ok(!strncmp(val, prodcode, lstrlenA(prodcode) - 1), - "Expected first 37 chars of \"%s\", got \"%s\"\n", prodcode, val); - ok(size == lstrlenA(prodcode), - "Expected %d, got %d\n", lstrlenA(prodcode), size); - - /* pcchValueBuf has enough room for NULL terminator */ - size = lstrlenA(prodcode) + 1; - lstrcpyA(val, "apple"); - r = MsiGetProductPropertyA(hprod, "ProductCode", val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, prodcode), - "Expected \"%s\", got \"%s\"\n", prodcode, val); - ok(size == lstrlenA(prodcode), - "Expected %d, got %d\n", lstrlenA(prodcode), size); - - /* nonexistent property */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = MsiGetProductPropertyA(hprod, "IDontExist", val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, ""), "Expected \"\", got \"%s\"\n", val); - ok(size == 0, "Expected 0, got %d\n", size); - - r = MsiSetPropertyA(hprod, "NewProperty", "value"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* non-product property set */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = MsiGetProductPropertyA(hprod, "NewProperty", val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, ""), "Expected \"\", got \"%s\"\n", val); - ok(size == 0, "Expected 0, got %d\n", size); - - r = MsiSetPropertyA(hprod, "ProductCode", "value"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* non-product property that is also a product property set */ - size = MAX_PATH; - lstrcpyA(val, "apple"); - r = MsiGetProductPropertyA(hprod, "ProductCode", val, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(val, prodcode), - "Expected \"%s\", got \"%s\"\n", prodcode, val); - ok(size == lstrlenA(prodcode), - "Expected %d, got %d\n", lstrlenA(prodcode), size); - - MsiCloseHandle(hprod); - - RegDeleteValueA(props, "LocalPackage"); - RegDeleteKeyA(props, ""); - RegCloseKey(props); - RegDeleteKeyA(userkey, ""); - RegCloseKey(userkey); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - DeleteFileA(msifile); -} - -static void test_MsiSetProperty(void) -{ - MSIHANDLE hpkg, hdb, hrec; - CHAR buf[MAX_PATH]; - LPCSTR query; - DWORD size; - UINT r; - - hpkg = package_from_db(create_package_db()); - ok(hpkg != 0, "Expected a valid package\n"); - - /* invalid hInstall */ - r = MsiSetPropertyA(0, "Prop", "Val"); - ok(r == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", r); - - /* invalid hInstall */ - r = MsiSetPropertyA(0xdeadbeef, "Prop", "Val"); - ok(r == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", r); - - /* szName is NULL */ - r = MsiSetPropertyA(hpkg, NULL, "Val"); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* both szName and szValue are NULL */ - r = MsiSetPropertyA(hpkg, NULL, NULL); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* szName is empty */ - r = MsiSetPropertyA(hpkg, "", "Val"); - ok(r == ERROR_FUNCTION_FAILED, - "Expected ERROR_FUNCTION_FAILED, got %d\n", r); - - /* szName is empty and szValue is NULL */ - r = MsiSetPropertyA(hpkg, "", NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* set a property */ - r = MsiSetPropertyA(hpkg, "Prop", "Val"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* get the property */ - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "Prop", buf, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "Val"), "Expected \"Val\", got \"%s\"\n", buf); - ok(size == 3, "Expected 3, got %d\n", size); - - /* update the property */ - r = MsiSetPropertyA(hpkg, "Prop", "Nuvo"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* get the property */ - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "Prop", buf, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "Nuvo"), "Expected \"Nuvo\", got \"%s\"\n", buf); - ok(size == 4, "Expected 4, got %d\n", size); - - hdb = MsiGetActiveDatabase(hpkg); - ok(hdb != 0, "Expected a valid database handle\n"); - - /* set prop is not in the _Property table */ - query = "SELECT * FROM `_Property` WHERE `Property` = 'Prop'"; - r = do_query(hdb, query, &hrec); - ok(r == ERROR_BAD_QUERY_SYNTAX, - "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r); - - /* set prop is not in the Property table */ - query = "SELECT * FROM `Property` WHERE `Property` = 'Prop'"; - r = do_query(hdb, query, &hrec); - ok(r == ERROR_BAD_QUERY_SYNTAX, - "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r); - - MsiCloseHandle(hdb); - - /* szValue is an empty string */ - r = MsiSetPropertyA(hpkg, "Prop", ""); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* try to get the property */ - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "Prop", buf, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(size == 0, "Expected 0, got %d\n", size); - - /* reset the property */ - r = MsiSetPropertyA(hpkg, "Prop", "BlueTap"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* delete the property */ - r = MsiSetPropertyA(hpkg, "Prop", NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* try to get the property */ - size = MAX_PATH; - r = MsiGetPropertyA(hpkg, "Prop", buf, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(size == 0, "Expected 0, got %d\n", size); - - MsiCloseHandle(hpkg); - DeleteFileA(msifile); -} - -static void test_MsiApplyMultiplePatches(void) -{ - UINT r, type = GetDriveType(NULL); - - if (!pMsiApplyMultiplePatchesA) { - win_skip("MsiApplyMultiplePatchesA not found\n"); - return; - } - - r = pMsiApplyMultiplePatchesA(NULL, NULL, NULL); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %u\n", r); - - r = pMsiApplyMultiplePatchesA("", NULL, NULL); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %u\n", r); - - r = pMsiApplyMultiplePatchesA(";", NULL, NULL); - todo_wine - { - if (type == DRIVE_FIXED) - ok(r == ERROR_PATH_NOT_FOUND, - "Expected ERROR_PATH_NOT_FOUND, got %u\n", r); - else - ok(r == ERROR_INVALID_NAME, - "Expected ERROR_INVALID_NAME, got %u\n", r); - } - - r = pMsiApplyMultiplePatchesA(" ;", NULL, NULL); - todo_wine - { - if (type == DRIVE_FIXED) - ok(r == ERROR_PATCH_PACKAGE_OPEN_FAILED, - "Expected ERROR_PATCH_PACKAGE_OPEN_FAILED, got %u\n", r); - else - ok(r == ERROR_INVALID_NAME, - "Expected ERROR_INVALID_NAME, got %u\n", r); - } - - r = pMsiApplyMultiplePatchesA(";;", NULL, NULL); - todo_wine - { - if (type == DRIVE_FIXED) - ok(r == ERROR_PATH_NOT_FOUND, - "Expected ERROR_PATH_NOT_FOUND, got %u\n", r); - else - ok(r == ERROR_INVALID_NAME, - "Expected ERROR_INVALID_NAME, got %u\n", r); - } - - r = pMsiApplyMultiplePatchesA("nosuchpatchpackage;", NULL, NULL); - todo_wine ok(r == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %u\n", r); - - r = pMsiApplyMultiplePatchesA(";nosuchpatchpackage", NULL, NULL); - todo_wine - { - if (type == DRIVE_FIXED) - ok(r == ERROR_PATH_NOT_FOUND, - "Expected ERROR_PATH_NOT_FOUND, got %u\n", r); - else - ok(r == ERROR_INVALID_NAME, - "Expected ERROR_INVALID_NAME, got %u\n", r); - } - - r = pMsiApplyMultiplePatchesA("nosuchpatchpackage;nosuchpatchpackage", NULL, NULL); - todo_wine ok(r == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %u\n", r); - - r = pMsiApplyMultiplePatchesA(" nosuchpatchpackage ; nosuchpatchpackage ", NULL, NULL); - todo_wine ok(r == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %u\n", r); -} - -static void test_MsiApplyPatch(void) -{ - UINT r; - - r = MsiApplyPatch(NULL, NULL, INSTALLTYPE_DEFAULT, NULL); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %u\n", r); - - r = MsiApplyPatch("", NULL, INSTALLTYPE_DEFAULT, NULL); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %u\n", r); -} - -START_TEST(package) -{ - STATEMGRSTATUS status; - BOOL ret = FALSE; - - init_functionpointers(); - - GetCurrentDirectoryA(MAX_PATH, CURR_DIR); - - /* Create a restore point ourselves so we circumvent the multitude of restore points - * that would have been created by all the installation and removal tests. - */ - if (pSRSetRestorePointA) - { - memset(&status, 0, sizeof(status)); - ret = notify_system_change(BEGIN_NESTED_SYSTEM_CHANGE, &status); - } - - test_createpackage(); - test_doaction(); - test_gettargetpath_bad(); - test_settargetpath(); - test_props(); - test_property_table(); - test_condition(); - test_msipackage(); - test_formatrecord2(); - test_states(); - test_getproperty(); - test_removefiles(); - test_appsearch(); - test_appsearch_complocator(); - test_appsearch_reglocator(); - test_appsearch_inilocator(); - test_appsearch_drlocator(); - test_featureparents(); - test_installprops(); - test_launchconditions(); - test_ccpsearch(); - test_complocator(); - test_MsiGetSourcePath(); - test_shortlongsource(); - test_sourcedir(); - test_access(); - test_emptypackage(); - test_MsiGetProductProperty(); - test_MsiSetProperty(); - test_MsiApplyMultiplePatches(); - test_MsiApplyPatch(); - - if (pSRSetRestorePointA && ret) - { - ret = notify_system_change(END_NESTED_SYSTEM_CHANGE, &status); - if (ret) - remove_restore_point(status.llSequenceNumber); - } -} diff --git a/rostests/winetests/msi/patch.c b/rostests/winetests/msi/patch.c deleted file mode 100644 index 4e10505eb08..00000000000 --- a/rostests/winetests/msi/patch.c +++ /dev/null @@ -1,1179 +0,0 @@ -/* - * Copyright 2010 Hans Leidekker for CodeWeavers - * - * A test program for patching MSI products. - * - * 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 _WIN32_MSI 300 -#define COBJMACROS - -#include - -#include -#include -#include -#include - -#include "wine/test.h" - -static UINT (WINAPI *pMsiApplyPatchA)( LPCSTR, LPCSTR, INSTALLTYPE, LPCSTR ); -static UINT (WINAPI *pMsiGetPatchInfoExA)( LPCSTR, LPCSTR, LPCSTR, MSIINSTALLCONTEXT, - LPCSTR, LPSTR, DWORD * ); -static UINT (WINAPI *pMsiEnumPatchesExA)( LPCSTR, LPCSTR, DWORD, DWORD, DWORD, LPSTR, - LPSTR, MSIINSTALLCONTEXT *, LPSTR, LPDWORD ); - -static const char *msifile = "winetest-patch.msi"; -static const char *mspfile = "winetest-patch.msp"; - -static char CURR_DIR[MAX_PATH]; -static char PROG_FILES_DIR[MAX_PATH]; -static char COMMON_FILES_DIR[MAX_PATH]; - -/* msi database data */ - -static const char property_dat[] = - "Property\tValue\n" - "s72\tl0\n" - "Property\tProperty\n" - "Manufacturer\tWineHQ\n" - "ProductCode\t{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}\n" - "UpgradeCode\t{A2E3D643-4E2C-477F-A309-F76F552D5F43}\n" - "ProductLanguage\t1033\n" - "ProductName\tmsitest\n" - "ProductVersion\t1.1.1\n" - "PATCHNEWSUMMARYSUBJECT\tInstaller Database\n"; - -static const char media_dat[] = - "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n" - "i2\ti4\tL64\tS255\tS32\tS72\n" - "Media\tDiskId\n" - "1\t1\t\t\tDISK1\t\n"; - -static const char file_dat[] = - "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" - "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" - "File\tFile\n" - "patch.txt\tpatch\tpatch.txt\t1000\t\t\t0\t1\n"; - -static const char directory_dat[] = - "Directory\tDirectory_Parent\tDefaultDir\n" - "s72\tS72\tl255\n" - "Directory\tDirectory\n" - "MSITESTDIR\tProgramFilesFolder\tmsitest\n" - "ProgramFilesFolder\tTARGETDIR\t.\n" - "TARGETDIR\t\tSourceDir"; - -static const char component_dat[] = - "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" - "s72\tS38\ts72\ti2\tS255\tS72\n" - "Component\tComponent\n" - "patch\t{4B79D87E-6D28-4FD3-92D6-CD9B26AF64F1}\tMSITESTDIR\t0\t\tpatch.txt\n"; - -static const char feature_dat[] = - "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" - "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" - "Feature\tFeature\n" - "patch\t\t\tpatch feature\t1\t1\tMSITESTDIR\t0\n"; - -static const char feature_comp_dat[] = - "Feature_\tComponent_\n" - "s38\ts72\n" - "FeatureComponents\tFeature_\tComponent_\n" - "patch\tpatch\n"; - -static const char install_exec_seq_dat[] = - "Action\tCondition\tSequence\n" - "s72\tS255\tI2\n" - "InstallExecuteSequence\tAction\n" - "LaunchConditions\t\t100\n" - "CostInitialize\t\t800\n" - "FileCost\t\t900\n" - "CostFinalize\t\t1000\n" - "InstallValidate\t\t1400\n" - "InstallInitialize\t\t1500\n" - "ProcessComponents\t\t1600\n" - "RemoveFiles\t\t1700\n" - "InstallFiles\t\t2000\n" - "RegisterUser\t\t3000\n" - "RegisterProduct\t\t3100\n" - "PublishFeatures\t\t5100\n" - "PublishProduct\t\t5200\n" - "InstallFinalize\t\t6000\n"; - -struct msi_table -{ - const char *filename; - const char *data; - int size; -}; - -#define ADD_TABLE( x ) { #x".idt", x##_dat, sizeof(x##_dat) } - -static const struct msi_table tables[] = -{ - ADD_TABLE( directory ), - ADD_TABLE( file ), - ADD_TABLE( component ), - ADD_TABLE( feature ), - ADD_TABLE( feature_comp ), - ADD_TABLE( property ), - ADD_TABLE( install_exec_seq ), - ADD_TABLE( media ) -}; - -static void init_function_pointers( void ) -{ - HMODULE hmsi = GetModuleHandleA( "msi.dll" ); - -#define GET_PROC( mod, func ) \ - p ## func = (void *)GetProcAddress( mod, #func ); \ - if (!p ## func) \ - trace( "GetProcAddress(%s) failed\n", #func ); - - GET_PROC( hmsi, MsiApplyPatchA ); - GET_PROC( hmsi, MsiGetPatchInfoExA ); - GET_PROC( hmsi, MsiEnumPatchesExA ); -#undef GET_PROC -} - -static BOOL get_program_files_dir( char *buf, char *buf2 ) -{ - HKEY hkey; - DWORD type, size; - - if (RegOpenKey( HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion", &hkey )) - return FALSE; - - size = MAX_PATH; - if (RegQueryValueExA( hkey, "ProgramFilesDir (x86)", 0, &type, (LPBYTE)buf, &size ) && - RegQueryValueExA( hkey, "ProgramFilesDir", 0, &type, (LPBYTE)buf, &size )) - { - RegCloseKey( hkey ); - return FALSE; - } - size = MAX_PATH; - if (RegQueryValueExA( hkey, "CommonFilesDir", 0, &type, (LPBYTE)buf2, &size )) - { - RegCloseKey( hkey ); - return FALSE; - } - RegCloseKey( hkey ); - return TRUE; -} - -static void create_file_data( const char *filename, const char *data, DWORD size ) -{ - HANDLE file; - DWORD written; - - file = CreateFileA( filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL ); - if (file == INVALID_HANDLE_VALUE) - return; - - WriteFile( file, data, strlen( data ), &written, NULL ); - if (size) - { - SetFilePointer( file, size, NULL, FILE_BEGIN ); - SetEndOfFile( file ); - } - CloseHandle( file ); -} - -#define create_file( name, size ) create_file_data( name, name, size ) - -static BOOL delete_pf( const char *rel_path, BOOL is_file ) -{ - char path[MAX_PATH]; - - strcpy( path, PROG_FILES_DIR ); - strcat( path, "\\" ); - strcat( path, rel_path ); - - if (is_file) - return DeleteFileA( path ); - else - return RemoveDirectoryA( path ); -} - -static DWORD get_pf_file_size( const char *filename ) -{ - char path[MAX_PATH]; - HANDLE file; - DWORD size; - - strcpy( path, PROG_FILES_DIR ); - strcat( path, "\\"); - strcat( path, filename ); - - file = CreateFileA( path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL ); - if (file == INVALID_HANDLE_VALUE) - return INVALID_FILE_SIZE; - - size = GetFileSize( file, NULL ); - CloseHandle( file ); - return size; -} - -static void write_file( const char *filename, const char *data, DWORD data_size ) -{ - DWORD size; - HANDLE file = CreateFile( filename, GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL ); - WriteFile( file, data, data_size, &size, NULL ); - CloseHandle( file ); -} - -static void set_suminfo( const char *filename ) -{ - UINT r; - MSIHANDLE hsi, hdb; - - r = MsiOpenDatabaseA( filename, MSIDBOPEN_DIRECT, &hdb ); - ok( r == ERROR_SUCCESS, "failed to open database %u\n", r ); - - r = MsiGetSummaryInformation( hdb, NULL, 7, &hsi ); - ok( r == ERROR_SUCCESS, "failed to open summaryinfo %u\n", r ); - - r = MsiSummaryInfoSetProperty( hsi, 2, VT_LPSTR, 0, NULL, "Installation Database" ); - ok( r == ERROR_SUCCESS, "failed to set summary info %u\n", r ); - - r = MsiSummaryInfoSetProperty( hsi, 3, VT_LPSTR, 0, NULL, "Installation Database" ); - ok( r == ERROR_SUCCESS, "failed to set summary info %u\n", r ); - - r = MsiSummaryInfoSetProperty( hsi, 4, VT_LPSTR, 0, NULL, "WineHQ" ); - ok( r == ERROR_SUCCESS, "failed to set summary info %u\n", r ); - - r = MsiSummaryInfoSetProperty( hsi, 7, VT_LPSTR, 0, NULL, ";1033" ); - ok( r == ERROR_SUCCESS, "failed to set summary info %u\n", r ); - - r = MsiSummaryInfoSetProperty( hsi, 9, VT_LPSTR, 0, NULL, "{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}" ); - ok( r == ERROR_SUCCESS, "failed to set summary info %u\n", r ); - - r = MsiSummaryInfoSetProperty( hsi, 14, VT_I4, 100, NULL, NULL ); - ok( r == ERROR_SUCCESS, "failed to set summary info %u\n", r ); - - r = MsiSummaryInfoSetProperty( hsi, 15, VT_I4, 0, NULL, NULL ); - ok( r == ERROR_SUCCESS, "failed to set summary info %u\n", r ); - - r = MsiSummaryInfoPersist( hsi ); - ok( r == ERROR_SUCCESS, "failed to persist suminfo %u\n", r ); - - r = MsiCloseHandle( hsi ); - ok( r == ERROR_SUCCESS, "failed to close suminfo %u\n", r ); - - r = MsiCloseHandle( hdb ); - ok( r == ERROR_SUCCESS, "failed to close database %u\n", r ); -} - -static void create_database( const char *filename, const struct msi_table *tables, UINT num_tables ) -{ - MSIHANDLE hdb; - UINT r, i; - - r = MsiOpenDatabaseA( filename, MSIDBOPEN_CREATE, &hdb ); - ok(r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r); - - /* import the tables into the database */ - for (i = 0; i < num_tables; i++) - { - const struct msi_table *table = &tables[i]; - - write_file( table->filename, table->data, (table->size - 1) * sizeof(char) ); - - r = MsiDatabaseImportA( hdb, CURR_DIR, table->filename ); - ok(r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r); - - DeleteFileA( table->filename ); - } - - r = MsiDatabaseCommit( hdb ); - ok(r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r); - - MsiCloseHandle( hdb ); - set_suminfo( filename ); -} - -/* data for generating a patch */ - -/* table names - encoded as in an msi database file */ -static const WCHAR p_name0[] = { 0x4840, 0x3b3f, 0x43f2, 0x4438, 0x45b1, 0 }; /* _Columns */ -static const WCHAR p_name1[] = { 0x4840, 0x3f7f, 0x4164, 0x422f, 0x4836, 0 }; /* _Tables */ -static const WCHAR p_name2[] = { 0x4840, 0x3f3f, 0x4577, 0x446c, 0x3b6a, 0x45e4, 0x4824, 0 }; /* _StringData */ -static const WCHAR p_name3[] = { 0x4840, 0x3f3f, 0x4577, 0x446c, 0x3e6a, 0x44b2, 0x482f, 0 }; /* _StringPool */ -static const WCHAR p_name4[] = { 0x3a8c, 0x47cb, 0x45b0, 0x45ec, 0x45a8, 0x4837, 0}; /* CAB_msitest */ -static const WCHAR p_name5[] = { 0x4840, 0x4596, 0x3e6c, 0x45e4, 0x42e6, 0x421c, 0x4634, 0x4468, 0x4226, 0 }; /* MsiPatchSequence */ -static const WCHAR p_name6[] = { 0x0005, 0x0053, 0x0075, 0x006d, 0x006d, 0x0061, 0x0072, - 0x0079, 0x0049, 0x006e, 0x0066, 0x006f, 0x0072, 0x006d, - 0x0061, 0x0074, 0x0069, 0x006f, 0x006e, 0 }; /* SummaryInformation */ -/* substorage names */ -static const WCHAR p_name7[] = { 0x0074, 0x0061, 0x0072, 0x0067, 0x0065, 0x0074, 0x0054, 0x006f, 0x0075, 0x0070, - 0x0067, 0x0072, 0x0061, 0x0064, 0x0065, 0x0064, 0 }; /* targetToupgraded */ -static const WCHAR p_name8[] = { 0x0023, 0x0074, 0x0061, 0x0072, 0x0067, 0x0065, 0x0074, 0x0054, 0x006f, 0x0075, - 0x0070, 0x0067, 0x0072, 0x0061, 0x0064, 0x0065, 0x0064, 0 }; /* #targetToupgraded */ - -/* data in each table */ -static const WCHAR p_data0[] = { /* _Columns */ - 0x0001, 0x0001, 0x0001, 0x0001, 0x8001, 0x8002, 0x8003, 0x8004, - 0x0002, 0x0003, 0x0004, 0x0005, 0xad00, 0xbd26, 0x8d00, 0x9502 -}; -static const WCHAR p_data1[] = { /* _Tables */ - 0x0001 -}; -static const char p_data2[] = { /* _StringData */ - "MsiPatchSequencePatchFamilyProductCodeSequenceAttributes1.1.19388.37230913B8D18FBB64CACA239C74C11E3FA74" -}; -static const WCHAR p_data3[] = { /* _StringPool */ -/* len, refs */ - 0, 0, /* string 0 '' */ - 16, 5, /* string 1 'MsiPatchSequence' */ - 11, 1, /* string 2 'PatchFamily' */ - 11, 1, /* string 3 'ProductCode' */ - 8, 1, /* string 4 'Sequence' */ - 10, 1, /* string 5 'Attributes' */ - 15, 1, /* string 6 '1.1.19388.37230' */ - 32, 1, /* string 7 '913B8D18FBB64CACA239C74C11E3FA74' */ -}; -static const char p_data4[] = { /* CAB_msitest */ - 0x4d, 0x53, 0x43, 0x46, 0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x03, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x9e, - 0x03, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x12, - 0xea, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, - 0x3c, 0xd4, 0x80, 0x20, 0x00, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, - 0x74, 0x78, 0x74, 0x00, 0x0b, 0x3c, 0xd6, 0xc1, 0x4a, 0x00, 0xea, - 0x03, 0x5b, 0x80, 0x80, 0x8d, 0x00, 0x10, 0xa1, 0x3e, 0x00, 0x00, - 0x00, 0x00, 0x03, 0x00, 0x40, 0x30, 0x0c, 0x43, 0xf8, 0xb4, 0x85, - 0x4d, 0x96, 0x08, 0x0a, 0x92, 0xf0, 0x52, 0xfb, 0xbb, 0x82, 0xf9, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0e, 0x31, 0x7d, - 0x56, 0xdf, 0xf7, 0x48, 0x7c, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x41, 0x80, 0xdf, 0xf7, 0xd8, 0x72, 0xbf, 0xb9, 0x63, - 0x91, 0x0e, 0x57, 0x1f, 0xfa, 0x1a, 0x66, 0x54, 0x55 -}; -static const WCHAR p_data5[] = { /* MsiPatchSequence */ - 0x0007, 0x0000, 0x0006, 0x8000 -}; -static const char p_data6[] = { /* SummaryInformation */ - 0xfe, 0xff, 0x00, 0x00, 0x05, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe0, 0x85, 0x9f, 0xf2, 0xf9, - 0x4f, 0x68, 0x10, 0xab, 0x91, 0x08, 0x00, 0x2b, 0x27, 0xb3, 0xd9, - 0x30, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, - 0x00, 0x09, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x07, 0x00, - 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x90, - 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, - 0x0f, 0x00, 0x00, 0x00, 0xd8, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, - 0x00, 0x27, 0x00, 0x00, 0x00, 0x7b, 0x30, 0x46, 0x39, 0x36, 0x43, - 0x44, 0x43, 0x30, 0x2d, 0x34, 0x43, 0x44, 0x46, 0x2d, 0x34, 0x33, - 0x30, 0x34, 0x2d, 0x42, 0x32, 0x38, 0x33, 0x2d, 0x37, 0x42, 0x39, - 0x32, 0x36, 0x34, 0x38, 0x38, 0x39, 0x45, 0x46, 0x37, 0x7d, 0x00, - 0x00, 0x1e, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x7b, 0x39, - 0x31, 0x33, 0x42, 0x38, 0x44, 0x31, 0x38, 0x2d, 0x46, 0x42, 0x42, - 0x36, 0x2d, 0x34, 0x43, 0x41, 0x43, 0x2d, 0x41, 0x32, 0x33, 0x39, - 0x2d, 0x43, 0x37, 0x34, 0x43, 0x31, 0x31, 0x45, 0x33, 0x46, 0x41, - 0x37, 0x34, 0x7d, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x25, 0x00, - 0x00, 0x00, 0x3a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x6f, - 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x3b, 0x3a, 0x23, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x6f, 0x75, 0x70, 0x67, - 0x72, 0x61, 0x64, 0x65, 0x64, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x50, 0x61, 0x74, 0x63, 0x68, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 -}; - -struct table_data { - LPCWSTR name; - const void *data; - DWORD size; -}; - -static const struct table_data table_patch_data[] = { - { p_name0, p_data0, sizeof p_data0 }, - { p_name1, p_data1, sizeof p_data1 }, - { p_name2, p_data2, sizeof p_data2 - 1 }, - { p_name3, p_data3, sizeof p_data3 }, - { p_name4, p_data4, sizeof p_data4 }, - { p_name5, p_data5, sizeof p_data5 }, - { p_name6, p_data6, sizeof p_data6 } -}; - -#define NUM_PATCH_TABLES (sizeof table_patch_data/sizeof table_patch_data[0]) - -static const WCHAR t1_name0[] = { 0x4840, 0x430f, 0x422f, 0 }; /* File */ -static const WCHAR t1_name1[] = { 0x4840, 0x3f3f, 0x4577, 0x446c, 0x3b6a, 0x45e4, 0x4824, 0 }; /* _StringData */ -static const WCHAR t1_name2[] = { 0x4840, 0x3f3f, 0x4577, 0x446c, 0x3e6a, 0x44b2, 0x482f, 0 }; /* _StringPool */ -static const WCHAR t1_name3[] = { 0x0005, 0x0053, 0x0075, 0x006d, 0x006d, 0x0061, 0x0072, - 0x0079, 0x0049, 0x006e, 0x0066, 0x006f, 0x0072, 0x006d, - 0x0061, 0x0074, 0x0069, 0x006f, 0x006e, 0 }; /* SummaryInformation */ - -static const WCHAR t1_data0[] = { /* File */ - 0x0008, 0x0001, 0x03ea, 0x8000 -}; -static const char t1_data1[] = { /* _StringData */ - "patch.txt" -}; -static const WCHAR t1_data2[] = { /* _StringPool */ -/* len, refs */ - 0, 0, /* string 0 '' */ - 9, 1, /* string 1 'patch.txt' */ -}; -static const char t1_data3[] = { /* SummaryInformation */ - 0xfe, 0xff, 0x00, 0x00, 0x05, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe0, 0x85, 0x9f, 0xf2, 0xf9, - 0x4f, 0x68, 0x10, 0xab, 0x91, 0x08, 0x00, 0x2b, 0x27, 0xb3, 0xd9, - 0x30, 0x00, 0x00, 0x00, 0x9c, 0x01, 0x00, 0x00, 0x0c, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, - 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xa8, - 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, - 0x06, 0x00, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, - 0x00, 0xd0, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0xdc, 0x00, - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, 0x08, - 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, - 0x04, 0x01, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x8c, 0x01, 0x00, - 0x00, 0x10, 0x00, 0x00, 0x00, 0x94, 0x01, 0x00, 0x00, 0x1e, 0x00, - 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x44, 0x61, 0x74, - 0x61, 0x62, 0x61, 0x73, 0x65, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, - 0x00, 0x16, 0x00, 0x00, 0x00, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x44, 0x61, 0x74, 0x61, - 0x62, 0x61, 0x73, 0x65, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x57, 0x69, 0x6e, 0x65, 0x48, 0x51, 0x00, - 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x1e, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x3b, 0x31, - 0x30, 0x33, 0x33, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x06, - 0x00, 0x00, 0x00, 0x3b, 0x31, 0x30, 0x33, 0x33, 0x00, 0x00, 0x00, - 0x1e, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x7b, 0x39, 0x31, - 0x33, 0x42, 0x38, 0x44, 0x31, 0x38, 0x2d, 0x46, 0x42, 0x42, 0x36, - 0x2d, 0x34, 0x43, 0x41, 0x43, 0x2d, 0x41, 0x32, 0x33, 0x39, 0x2d, - 0x43, 0x37, 0x34, 0x43, 0x31, 0x31, 0x45, 0x33, 0x46, 0x41, 0x37, - 0x34, 0x7d, 0x31, 0x2e, 0x31, 0x2e, 0x31, 0x3b, 0x7b, 0x39, 0x31, - 0x33, 0x42, 0x38, 0x44, 0x31, 0x38, 0x2d, 0x46, 0x42, 0x42, 0x36, - 0x2d, 0x34, 0x43, 0x41, 0x43, 0x2d, 0x41, 0x32, 0x33, 0x39, 0x2d, - 0x43, 0x37, 0x34, 0x43, 0x31, 0x31, 0x45, 0x33, 0x46, 0x41, 0x37, - 0x34, 0x7d, 0x31, 0x2e, 0x31, 0x2e, 0x31, 0x3b, 0x7b, 0x41, 0x32, - 0x45, 0x33, 0x44, 0x36, 0x34, 0x33, 0x2d, 0x34, 0x45, 0x32, 0x43, - 0x2d, 0x34, 0x37, 0x37, 0x46, 0x2d, 0x41, 0x33, 0x30, 0x39, 0x2d, - 0x46, 0x37, 0x36, 0x46, 0x35, 0x35, 0x32, 0x44, 0x35, 0x46, 0x34, - 0x33, 0x7d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, - 0x00, 0x03, 0x00, 0x00, 0x00, 0x17, 0x00, 0x22, 0x09 -}; - -static const struct table_data table_transform1_data[] = { - { t1_name0, t1_data0, sizeof t1_data0 }, - { t1_name1, t1_data1, sizeof t1_data1 - 1 }, - { t1_name2, t1_data2, sizeof t1_data2 }, - { t1_name3, t1_data3, sizeof t1_data3 } -}; - -#define NUM_TRANSFORM1_TABLES (sizeof table_transform1_data/sizeof table_transform1_data[0]) - -static const WCHAR t2_name0[] = { 0x4840, 0x430f, 0x422f, 0 }; /* File */ -static const WCHAR t2_name1[] = { 0x4840, 0x4216, 0x4327, 0x4824, 0 }; /* Media */ -static const WCHAR t2_name2[] = { 0x4840, 0x3b3f, 0x43f2, 0x4438, 0x45b1, 0 }; /* _Columns */ -static const WCHAR t2_name3[] = { 0x4840, 0x3f7f, 0x4164, 0x422f, 0x4836, 0 }; /* _Tables */ -static const WCHAR t2_name4[] = { 0x4840, 0x4559, 0x44f2, 0x4568, 0x4737, 0 }; /* Property */ -static const WCHAR t2_name5[] = { 0x4840, 0x4119, 0x41b7, 0x3e6b, 0x41a4, 0x412e, 0x422a, 0 }; /* PatchPackage */ -static const WCHAR t2_name6[] = { 0x4840, 0x4452, 0x45f6, 0x43e4, 0x3baf, 0x423b, 0x4626, - 0x4237, 0x421c, 0x4634, 0x4468, 0x4226, 0 }; /* InstallExecuteSequence */ -static const WCHAR t2_name7[] = { 0x4840, 0x3f3f, 0x4577, 0x446c, 0x3b6a, 0x45e4, 0x4824, 0 }; /* _StringData */ -static const WCHAR t2_name8[] = { 0x4840, 0x3f3f, 0x4577, 0x446c, 0x3e6a, 0x44b2, 0x482f, 0 }; /* _StringPool */ -static const WCHAR t2_name9[] = { 0x0005, 0x0053, 0x0075, 0x006d, 0x006d, 0x0061, 0x0072, - 0x0079, 0x0049, 0x006e, 0x0066, 0x006f, 0x0072, 0x006d, - 0x0061, 0x0074, 0x0069, 0x006f, 0x006e, 0 }; /* SummaryInformation */ - -static const WCHAR t2_data0[] = { /* File */ - 0x00c0, 0x0001, 0x9000, 0x83e8 -}; -static const WCHAR t2_data1[] = { /* Media */ - 0x0601, 0x8002, 0x03e9, 0x8000, 0x0000, 0x0007, 0x0000, 0x0008 -}; -static const WCHAR t2_data2[] = { /* _Columns */ - 0x0401, 0x0009, 0x0000, 0x000a, 0xad48, 0x0401, 0x0009, 0x0000, /* 0x0401 = add row (1), 4 shorts */ - 0x000b, 0xa502, 0x0401, 0x0009, 0x0000, 0x000c, 0x8104, 0x0401, - 0x0009, 0x0000, 0x000d, 0x8502, 0x0401, 0x0009, 0x0000, 0x000e, - 0x9900, 0x0401, 0x0009, 0x0000, 0x000f, 0x9d48, 0x0401, 0x0010, - 0x0000, 0x0011, 0xad26, 0x0401, 0x0010, 0x0000, 0x0012, 0x8502, - 0x0401, 0x0014, 0x0000, 0x0015, 0xad26, 0x0401, 0x0014, 0x0000, - 0x000e, 0x8900 -}; -static const WCHAR t2_data3[] = { /* _Tables */ - 0x0101, 0x0009, 0x0101, 0x0010, 0x0101, 0x0014 -}; -static const WCHAR t2_data4[] = { /* Property */ - 0x0201, 0x0002, 0x0003, 0x0201, 0x0004, 0x0005 -}; -static const WCHAR t2_data5[] = { /* PatchPackage */ - 0x0201, 0x0013, 0x8002 -}; -static const WCHAR t2_data6[] = { /* InstallExecuteSequence */ - 0x0301, 0x0006, 0x0000, 0x87d1 -}; -static const char t2_data7[] = { /* _StringData */ - "patch.txtPATCHNEWSUMMARYSUBJECTInstallation DatabasePATCHNEWPACKAGECODE{42A14A82-12F8-4E6D-970E-1B4EE7BE28B0}" - "PatchFiles#CAB_msitestpropPatchFile_SequencePatchSizeAttributesHeaderStreamRef_PatchPackagePatchIdMedia_" - "{0F96CDC0-4CDF-4304-B283-7B9264889EF7}MsiPatchHeadersStreamRef" -}; -static const WCHAR t2_data8[] = { /* _StringPool */ -/* len, refs */ - 0, 0, /* string 0 '' */ - 9, 1, /* string 1 'patch.txt' */ - 22, 1, /* string 2 'PATCHNEWSUMMARYSUBJECT' */ - 21, 1, /* string 3 'Installation Database' */ - 19, 1, /* string 4 'PATCHNEWPACKAGECODE' */ - 38, 1, /* string 5 '{42A14A82-12F8-4E6D-970E-1B4EE7BE28B0}' */ - 10, 1, /* string 6 'PatchFiles' */ - 12, 1, /* string 7 '#CAB_msitest' */ - 4, 1, /* string 8 'prop' */ - 5, 7, /* string 9 'Patch' */ - 5, 1, /* string 10 'File_' */ - 8, 1, /* string 11 'Sequence' */ - 9, 1, /* string 12 'PatchSize' */ - 10, 1, /* string 13 'Attributes' */ - 6, 2, /* string 14 'Header' */ - 10, 1, /* string 15 'StreamRef_' */ - 12, 3, /* string 16 'PatchPackage' */ - 7, 1, /* string 17 'PatchId' */ - 6, 1, /* string 18 'Media_' */ - 38, 1, /* string 19 '{0F96CDC0-4CDF-4304-B283-7B9264889EF7}' */ - 15, 3, /* string 20 'MsiPatchHeaders' */ - 9, 1 /* string 21 'StreamRef' */ -}; -static const char t2_data9[] = { /* SummaryInformation */ - 0xfe, 0xff, 0x00, 0x00, 0x05, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe0, 0x85, 0x9f, 0xf2, 0xf9, - 0x4f, 0x68, 0x10, 0xab, 0x91, 0x08, 0x00, 0x2b, 0x27, 0xb3, 0xd9, - 0x30, 0x00, 0x00, 0x00, 0x5c, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x00, - 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x78, - 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, - 0x00, 0x9c, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xa8, 0x00, - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x09, - 0x00, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, - 0x4c, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x54, 0x01, 0x00, - 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x3b, 0x31, 0x30, 0x33, 0x33, 0x00, 0x00, - 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x7b, - 0x39, 0x31, 0x33, 0x42, 0x38, 0x44, 0x31, 0x38, 0x2d, 0x46, 0x42, - 0x42, 0x36, 0x2d, 0x34, 0x43, 0x41, 0x43, 0x2d, 0x41, 0x32, 0x33, - 0x39, 0x2d, 0x43, 0x37, 0x34, 0x43, 0x31, 0x31, 0x45, 0x33, 0x46, - 0x41, 0x37, 0x34, 0x7d, 0x31, 0x2e, 0x31, 0x2e, 0x31, 0x3b, 0x7b, - 0x39, 0x31, 0x33, 0x42, 0x38, 0x44, 0x31, 0x38, 0x2d, 0x46, 0x42, - 0x42, 0x36, 0x2d, 0x34, 0x43, 0x41, 0x43, 0x2d, 0x41, 0x32, 0x33, - 0x39, 0x2d, 0x43, 0x37, 0x34, 0x43, 0x31, 0x31, 0x45, 0x33, 0x46, - 0x41, 0x37, 0x34, 0x7d, 0x31, 0x2e, 0x31, 0x2e, 0x31, 0x3b, 0x7b, - 0x41, 0x32, 0x45, 0x33, 0x44, 0x36, 0x34, 0x33, 0x2d, 0x34, 0x45, - 0x32, 0x43, 0x2d, 0x34, 0x37, 0x37, 0x46, 0x2d, 0x41, 0x33, 0x30, - 0x39, 0x2d, 0x46, 0x37, 0x36, 0x46, 0x35, 0x35, 0x32, 0x44, 0x35, - 0x46, 0x34, 0x33, 0x7d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2d, - 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x17, 0x00, 0x27, 0x09 -}; - -static const struct table_data table_transform2_data[] = { - { t2_name0, t2_data0, sizeof t2_data0 }, - { t2_name1, t2_data1, sizeof t2_data1 }, - { t2_name2, t2_data2, sizeof t2_data2 }, - { t2_name3, t2_data3, sizeof t2_data3 }, - { t2_name4, t2_data4, sizeof t2_data4 }, - { t2_name5, t2_data5, sizeof t2_data5 }, - { t2_name6, t2_data6, sizeof t2_data6 }, - { t2_name7, t2_data7, sizeof t2_data7 - 1 }, - { t2_name8, t2_data8, sizeof t2_data8 }, - { t2_name9, t2_data9, sizeof t2_data9 } -}; - -#define NUM_TRANSFORM2_TABLES (sizeof table_transform2_data/sizeof table_transform2_data[0]) - -static void write_tables( IStorage *stg, const struct table_data *tables, UINT num_tables ) -{ - IStream *stm; - DWORD i, count; - HRESULT r; - - for (i = 0; i < num_tables; i++) - { - r = IStorage_CreateStream( stg, tables[i].name, STGM_WRITE|STGM_SHARE_EXCLUSIVE, 0, 0, &stm ); - if (FAILED( r )) - { - ok( 0, "failed to create stream 0x%08x\n", r ); - continue; - } - - r = IStream_Write( stm, tables[i].data, tables[i].size, &count ); - if (FAILED( r ) || count != tables[i].size) - ok( 0, "failed to write stream\n" ); - IStream_Release( stm ); - } -} - -static void create_patch( const char *filename ) -{ - IStorage *stg = NULL, *stg1 = NULL, *stg2 = NULL; - WCHAR *filenameW; - HRESULT r; - int len; - const DWORD mode = STGM_CREATE|STGM_READWRITE|STGM_DIRECT|STGM_SHARE_EXCLUSIVE; - - const CLSID CLSID_MsiPatch = {0xc1086, 0, 0, {0xc0, 0, 0, 0, 0, 0, 0, 0x46}}; - const CLSID CLSID_MsiTransform = {0xc1082, 0, 0, {0xc0, 0, 0, 0, 0, 0, 0, 0x46}}; - - len = MultiByteToWideChar( CP_ACP, 0, filename, -1, NULL, 0 ); - filenameW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ); - MultiByteToWideChar( CP_ACP, 0, filename, -1, filenameW, len ); - - r = StgCreateDocfile( filenameW, mode, 0, &stg ); - HeapFree( GetProcessHeap(), 0, filenameW ); - ok( r == S_OK, "failed to create storage 0x%08x\n", r ); - if (!stg) - return; - - r = IStorage_SetClass( stg, &CLSID_MsiPatch ); - ok( r == S_OK, "failed to set storage type 0x%08x\n", r ); - - write_tables( stg, table_patch_data, NUM_PATCH_TABLES ); - - r = IStorage_CreateStorage( stg, p_name7, mode, 0, 0, &stg1 ); - ok( r == S_OK, "failed to create substorage 0x%08x\n", r ); - - r = IStorage_SetClass( stg1, &CLSID_MsiTransform ); - ok( r == S_OK, "failed to set storage type 0x%08x\n", r ); - - write_tables( stg1, table_transform1_data, NUM_TRANSFORM1_TABLES ); - IStorage_Release( stg1 ); - - r = IStorage_CreateStorage( stg, p_name8, mode, 0, 0, &stg2 ); - ok( r == S_OK, "failed to create substorage 0x%08x\n", r ); - - r = IStorage_SetClass( stg2, &CLSID_MsiTransform ); - ok( r == S_OK, "failed to set storage type 0x%08x\n", r ); - - write_tables( stg2, table_transform2_data, NUM_TRANSFORM2_TABLES ); - IStorage_Release( stg2 ); - IStorage_Release( stg ); -} - -static void test_simple_patch( void ) -{ - UINT r; - DWORD size; - char path[MAX_PATH], install_source[MAX_PATH]; - const char *query; - MSIHANDLE hpackage, hdb, hview, hrec; - - if (!pMsiApplyPatchA) - { - win_skip("MsiApplyPatchA is not available\n"); - return; - } - - CreateDirectoryA( "msitest", NULL ); - create_file( "msitest\\patch.txt", 1000 ); - - create_database( msifile, tables, sizeof(tables) / sizeof(struct msi_table) ); - create_patch( mspfile ); - - MsiSetInternalUI( INSTALLUILEVEL_NONE, NULL ); - - r = MsiInstallProductA( msifile, NULL ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - size = get_pf_file_size( "msitest\\patch.txt" ); - ok( size == 1000, "expected 1000, got %u\n", size ); - - size = sizeof(install_source); - r = MsiGetProductInfoA( "{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}", - "InstallSource", install_source, &size ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - strcpy( path, CURR_DIR ); - strcat( path, "\\" ); - strcat( path, msifile ); - - r = MsiOpenPackageA( path, &hpackage ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - hdb = MsiGetActiveDatabase( hpackage ); - ok( hdb, "failed to get database handle\n" ); - - query = "SELECT * FROM `Property` where `Property` = 'PATCHNEWPACKAGECODE'"; - r = MsiDatabaseOpenView( hdb, query, &hview ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - r = MsiViewExecute( hview, 0 ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - r = MsiViewFetch( hview, &hrec ); - ok( r == ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %u\n", r ); - - MsiCloseHandle( hrec ); - MsiViewClose( hview ); - MsiCloseHandle( hview ); - - query = "SELECT * FROM `Property` WHERE `Property` = 'PATCHNEWSUMMARYSUBJECT' " - "AND `Value` = 'Installer Database'"; - r = MsiDatabaseOpenView( hdb, query, &hview ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - r = MsiViewExecute( hview, 0 ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - r = MsiViewFetch( hview, &hrec ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - MsiCloseHandle( hrec ); - MsiViewClose( hview ); - MsiCloseHandle( hview ); - - MsiCloseHandle( hdb ); - MsiCloseHandle( hpackage ); - - r = MsiApplyPatchA( mspfile, NULL, INSTALLTYPE_DEFAULT, NULL ); - ok( r == ERROR_SUCCESS || broken( r == ERROR_PATCH_PACKAGE_INVALID ), /* version 2.0 */ - "expected ERROR_SUCCESS, got %u\n", r ); - - if (r == ERROR_PATCH_PACKAGE_INVALID) - { - win_skip("Windows Installer < 3.0 detected\n"); - return; - } - - size = get_pf_file_size( "msitest\\patch.txt" ); - ok( size == 1002, "expected 1002, got %u\n", size ); - - /* show that MsiOpenPackage applies registered patches */ - r = MsiOpenPackageA( path, &hpackage ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - hdb = MsiGetActiveDatabase( hpackage ); - ok( hdb, "failed to get database handle\n" ); - - query = "SELECT * FROM `Property` where `Property` = 'PATCHNEWPACKAGECODE'"; - r = MsiDatabaseOpenView( hdb, query, &hview ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - r = MsiViewExecute( hview, 0 ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - r = MsiViewFetch( hview, &hrec ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - MsiCloseHandle( hrec ); - MsiViewClose( hview ); - MsiCloseHandle( hview ); - - query = "SELECT * FROM `Property` WHERE `Property` = 'PATCHNEWSUMMARYSUBJECT' " - "AND `Value` = 'Installation Database'"; - r = MsiDatabaseOpenView( hdb, query, &hview ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - r = MsiViewExecute( hview, 0 ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - r = MsiViewFetch( hview, &hrec ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - MsiCloseHandle( hrec ); - MsiViewClose( hview ); - MsiCloseHandle( hview ); - - MsiCloseHandle( hdb ); - MsiCloseHandle( hpackage ); - - /* show that patches are not committed to the local package database */ - size = sizeof(path); - r = MsiGetProductInfoA( "{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}", - "LocalPackage", path, &size ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - r = MsiOpenDatabaseA( path, MSIDBOPEN_READONLY, &hdb ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - r = MsiDatabaseOpenView( hdb, query, &hview ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - r = MsiViewExecute( hview, 0 ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - r = MsiViewFetch( hview, &hrec ); - ok( r == ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %u\n", r ); - - MsiCloseHandle( hrec ); - MsiViewClose( hview ); - MsiCloseHandle( hview ); - MsiCloseHandle( hdb ); - - size = sizeof(path); - r = MsiGetProductInfoA( "{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}", - "InstallSource", path, &size ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - ok( !strcasecmp( path, install_source ), "wrong path %s\n", path ); - - r = MsiInstallProductA( msifile, "REMOVE=ALL" ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - ok( !delete_pf( "msitest\\patch.txt", TRUE ), "file not removed\n" ); - ok( !delete_pf( "msitest", FALSE ), "directory not removed\n" ); - - DeleteFileA( msifile ); - DeleteFileA( mspfile ); - RemoveDirectoryA( "msitest" ); -} - -static void test_MsiOpenDatabase( void ) -{ - UINT r; - MSIHANDLE hdb; - - r = MsiOpenDatabase( mspfile, MSIDBOPEN_CREATE, &hdb ); - ok(r == ERROR_SUCCESS, "failed to open database %u\n", r); - - r = MsiDatabaseCommit( hdb ); - ok(r == ERROR_SUCCESS, "failed to commit database %u\n", r); - MsiCloseHandle( hdb ); - - r = MsiOpenDatabase( mspfile, MSIDBOPEN_READONLY + MSIDBOPEN_PATCHFILE, &hdb ); - ok(r == ERROR_OPEN_FAILED, "expected ERROR_OPEN_FAILED, got %u\n", r); - DeleteFileA( mspfile ); - - r = MsiOpenDatabase( mspfile, MSIDBOPEN_CREATE + MSIDBOPEN_PATCHFILE, &hdb ); - ok(r == ERROR_SUCCESS , "failed to open database %u\n", r); - - r = MsiDatabaseCommit( hdb ); - ok(r == ERROR_SUCCESS, "failed to commit database %u\n", r); - MsiCloseHandle( hdb ); - - r = MsiOpenDatabase( mspfile, MSIDBOPEN_READONLY + MSIDBOPEN_PATCHFILE, &hdb ); - ok(r == ERROR_SUCCESS, "failed to open database %u\n", r); - MsiCloseHandle( hdb ); - DeleteFileA( mspfile ); - - create_database( msifile, tables, sizeof(tables) / sizeof(struct msi_table) ); - create_patch( mspfile ); - - r = MsiOpenDatabase( msifile, MSIDBOPEN_READONLY + MSIDBOPEN_PATCHFILE, &hdb ); - ok(r == ERROR_OPEN_FAILED, "failed to open database %u\n", r ); - - r = MsiOpenDatabase( mspfile, MSIDBOPEN_READONLY + MSIDBOPEN_PATCHFILE, &hdb ); - ok(r == ERROR_SUCCESS, "failed to open database %u\n", r ); - MsiCloseHandle( hdb ); - - DeleteFileA( msifile ); - DeleteFileA( mspfile ); -} - -static UINT find_entry( MSIHANDLE hdb, const char *table, const char *entry ) -{ - static char fmt[] = "SELECT * FROM `%s` WHERE `Name` = '%s'"; - char query[0x100]; - UINT r; - MSIHANDLE hview, hrec; - - sprintf( query, fmt, table, entry ); - r = MsiDatabaseOpenView( hdb, query, &hview ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - r = MsiViewExecute( hview, 0 ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - r = MsiViewFetch( hview, &hrec ); - MsiViewClose( hview ); - MsiCloseHandle( hview ); - MsiCloseHandle( hrec ); - return r; -} - -static void test_system_tables( void ) -{ - UINT r; - const char *query; - MSIHANDLE hproduct, hdb, hview, hrec; - - if (!pMsiApplyPatchA) - { - win_skip("MsiApplyPatchA is not available\n"); - return; - } - - CreateDirectoryA( "msitest", NULL ); - create_file( "msitest\\patch.txt", 1000 ); - - create_database( msifile, tables, sizeof(tables) / sizeof(struct msi_table) ); - create_patch( mspfile ); - - MsiSetInternalUI( INSTALLUILEVEL_NONE, NULL ); - - r = MsiInstallProductA( msifile, NULL ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - r = MsiOpenProductA( "{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}", &hproduct ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - hdb = MsiGetActiveDatabase( hproduct ); - ok( hdb, "failed to get database handle\n" ); - - r = find_entry( hdb, "_Streams", "\5SummaryInformation" ); - ok( r == ERROR_SUCCESS, "failed to find entry %u\n", r ); - - query = "SELECT * FROM `_Storages`"; - r = MsiDatabaseOpenView( hdb, query, &hview ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - r = MsiViewExecute( hview, 0 ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - r = MsiViewFetch( hview, &hrec ); - ok( r == ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %u\n", r ); - - r = find_entry( hdb, "_Tables", "Directory" ); - ok( r == ERROR_SUCCESS, "failed to find entry %u\n", r ); - - r = find_entry( hdb, "_Tables", "File" ); - ok( r == ERROR_SUCCESS, "failed to find entry %u\n", r ); - - r = find_entry( hdb, "_Tables", "Component" ); - ok( r == ERROR_SUCCESS, "failed to find entry %u\n", r ); - - r = find_entry( hdb, "_Tables", "Feature" ); - ok( r == ERROR_SUCCESS, "failed to find entry %u\n", r ); - - r = find_entry( hdb, "_Tables", "FeatureComponents" ); - ok( r == ERROR_SUCCESS, "failed to find entry %u\n", r ); - - r = find_entry( hdb, "_Tables", "Property" ); - ok( r == ERROR_SUCCESS, "failed to find entry %u\n", r ); - - r = find_entry( hdb, "_Tables", "InstallExecuteSequence" ); - ok( r == ERROR_SUCCESS, "failed to find entry %u\n", r ); - - r = find_entry( hdb, "_Tables", "Media" ); - ok( r == ERROR_SUCCESS, "failed to find entry %u\n", r ); - - r = find_entry( hdb, "_Tables", "_Property" ); - ok( r == ERROR_SUCCESS, "failed to find entry %u\n", r ); - - MsiCloseHandle( hrec ); - MsiViewClose( hview ); - MsiCloseHandle( hview ); - MsiCloseHandle( hdb ); - MsiCloseHandle( hproduct ); - - r = MsiApplyPatchA( mspfile, NULL, INSTALLTYPE_DEFAULT, NULL ); - ok( r == ERROR_SUCCESS || broken( r == ERROR_PATCH_PACKAGE_INVALID ), /* version 2.0 */ - "expected ERROR_SUCCESS, got %u\n", r ); - - if (r == ERROR_PATCH_PACKAGE_INVALID) - { - win_skip("Windows Installer < 3.0 detected\n"); - return; - } - - r = MsiOpenProductA( "{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}", &hproduct ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - hdb = MsiGetActiveDatabase( hproduct ); - ok( hdb, "failed to get database handle\n" ); - - r = find_entry( hdb, "_Streams", "\5SummaryInformation" ); - ok( r == ERROR_SUCCESS, "failed to find entry %u\n", r ); - - query = "SELECT * FROM `_Storages`"; - r = MsiDatabaseOpenView( hdb, query, &hview ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - r = MsiViewExecute( hview, 0 ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - r = MsiViewFetch( hview, &hrec ); - ok( r == ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %u\n", r ); - - r = find_entry( hdb, "_Tables", "Directory" ); - ok( r == ERROR_SUCCESS, "failed to find entry %u\n", r ); - - r = find_entry( hdb, "_Tables", "File" ); - ok( r == ERROR_SUCCESS, "failed to find entry %u\n", r ); - - r = find_entry( hdb, "_Tables", "Component" ); - ok( r == ERROR_SUCCESS, "failed to find entry %u\n", r ); - - r = find_entry( hdb, "_Tables", "Feature" ); - ok( r == ERROR_SUCCESS, "failed to find entry %u\n", r ); - - r = find_entry( hdb, "_Tables", "FeatureComponents" ); - ok( r == ERROR_SUCCESS, "failed to find entry %u\n", r ); - - r = find_entry( hdb, "_Tables", "Property" ); - ok( r == ERROR_SUCCESS, "failed to find entry %u\n", r ); - - r = find_entry( hdb, "_Tables", "InstallExecuteSequence" ); - ok( r == ERROR_SUCCESS, "failed to find entry %u\n", r ); - - r = find_entry( hdb, "_Tables", "Media" ); - ok( r == ERROR_SUCCESS, "failed to find entry %u\n", r ); - - r = find_entry( hdb, "_Tables", "_Property" ); - ok( r == ERROR_SUCCESS, "failed to find entry %u\n", r ); - - r = find_entry( hdb, "_Tables", "MsiPatchHeaders" ); - ok( r == ERROR_SUCCESS, "failed to find entry %u\n", r ); - - r = find_entry( hdb, "_Tables", "Patch" ); - ok( r == ERROR_SUCCESS, "failed to find entry %u\n", r ); - - r = find_entry( hdb, "_Tables", "PatchPackage" ); - ok( r == ERROR_SUCCESS, "failed to find entry %u\n", r ); - - MsiCloseHandle( hrec ); - MsiViewClose( hview ); - MsiCloseHandle( hview ); - MsiCloseHandle( hdb ); - MsiCloseHandle( hproduct ); - - r = MsiInstallProductA( msifile, "REMOVE=ALL" ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - DeleteFileA( msifile ); - DeleteFileA( mspfile ); - RemoveDirectoryA( "msitest" ); -} - -static void test_patch_registration( void ) -{ - UINT r, size; - char buffer[MAX_PATH], patch_code[39]; - - if (!pMsiApplyPatchA || !pMsiGetPatchInfoExA || !pMsiEnumPatchesExA) - { - win_skip("required functions not available\n"); - return; - } - - CreateDirectoryA( "msitest", NULL ); - create_file( "msitest\\patch.txt", 1000 ); - - create_database( msifile, tables, sizeof(tables) / sizeof(struct msi_table) ); - create_patch( mspfile ); - - MsiSetInternalUI( INSTALLUILEVEL_NONE, NULL ); - - r = MsiInstallProductA( msifile, NULL ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - r = MsiApplyPatchA( mspfile, NULL, INSTALLTYPE_DEFAULT, NULL ); - ok( r == ERROR_SUCCESS || broken( r == ERROR_PATCH_PACKAGE_INVALID ), /* version 2.0 */ - "expected ERROR_SUCCESS, got %u\n", r ); - - if (r == ERROR_PATCH_PACKAGE_INVALID) - { - win_skip("Windows Installer < 3.0 detected\n"); - return; - } - - buffer[0] = 0; - size = sizeof(buffer); - r = pMsiGetPatchInfoExA( "{0F96CDC0-4CDF-4304-B283-7B9264889EF7}", - "{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}", - NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, buffer, &size ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - ok( buffer[0], "buffer empty\n" ); - - buffer[0] = 0; - size = sizeof(buffer); - r = pMsiGetPatchInfoExA( "{0F96CDC0-4CDF-4304-B283-7B9264889EF7}", - "{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}", - NULL, MSIINSTALLCONTEXT_MACHINE, - INSTALLPROPERTY_LOCALPACKAGE, buffer, &size ); - ok( r == ERROR_UNKNOWN_PRODUCT, "expected ERROR_UNKNOWN_PRODUCT, got %u\n", r ); - - buffer[0] = 0; - size = sizeof(buffer); - r = pMsiGetPatchInfoExA( "{0F96CDC0-4CDF-4304-B283-7B9264889EF7}", - "{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}", - NULL, MSIINSTALLCONTEXT_USERMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, buffer, &size ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - ok( !buffer[0], "got %s\n", buffer ); - - r = pMsiEnumPatchesExA( "{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}", - NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSIPATCHSTATE_APPLIED, - 0, patch_code, NULL, NULL, NULL, NULL ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - ok( !strcmp( patch_code, "{0F96CDC0-4CDF-4304-B283-7B9264889EF7}" ), "wrong patch code\n" ); - - r = pMsiEnumPatchesExA( "{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}", - NULL, MSIINSTALLCONTEXT_MACHINE, MSIPATCHSTATE_APPLIED, - 0, patch_code, NULL, NULL, NULL, NULL ); - ok( r == ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %u\n", r ); - - r = pMsiEnumPatchesExA( "{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}", - NULL, MSIINSTALLCONTEXT_USERMANAGED, MSIPATCHSTATE_APPLIED, - 0, patch_code, NULL, NULL, NULL, NULL ); - ok( r == ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %u\n", r ); - - r = MsiInstallProductA( msifile, "REMOVE=ALL" ); - ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r ); - - buffer[0] = 0; - size = sizeof(buffer); - r = pMsiGetPatchInfoExA( "{0F96CDC0-4CDF-4304-B283-7B9264889EF7}", - "{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}", - NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - INSTALLPROPERTY_LOCALPACKAGE, buffer, &size ); - ok( r == ERROR_UNKNOWN_PRODUCT, "expected ERROR_UNKNOWN_PRODUCT, got %u\n", r ); - - DeleteFileA( msifile ); - DeleteFileA( mspfile ); - RemoveDirectoryA( "msitest" ); -} - -START_TEST(patch) -{ - DWORD len; - char temp_path[MAX_PATH], prev_path[MAX_PATH]; - - init_function_pointers(); - - GetCurrentDirectoryA( MAX_PATH, prev_path ); - GetTempPath( MAX_PATH, temp_path ); - SetCurrentDirectoryA( temp_path ); - - strcpy( CURR_DIR, temp_path ); - len = strlen( CURR_DIR ); - - if (len && (CURR_DIR[len - 1] == '\\')) - CURR_DIR[len - 1] = 0; - - get_program_files_dir( PROG_FILES_DIR, COMMON_FILES_DIR ); - - test_simple_patch(); - test_MsiOpenDatabase(); - test_system_tables(); - test_patch_registration(); - - SetCurrentDirectoryA( prev_path ); -} diff --git a/rostests/winetests/msi/record.c b/rostests/winetests/msi/record.c deleted file mode 100644 index 0b807797215..00000000000 --- a/rostests/winetests/msi/record.c +++ /dev/null @@ -1,619 +0,0 @@ -/* - * Copyright (C) 2005 Mike McCormack for CodeWeavers - * - * A test program for MSI records - * - * 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 "wine/test.h" - -static const char *msifile = "winetest-record.msi"; - -static BOOL create_temp_file(char *name) -{ - UINT r; - unsigned char buffer[26], i; - DWORD sz; - HANDLE handle; - - r = GetTempFileName(".", "msitest",0,name); - if(!r) - return r; - handle = CreateFile(name, GENERIC_READ|GENERIC_WRITE, - 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - if(handle==INVALID_HANDLE_VALUE) - return 0; - for(i=0; i<26; i++) - buffer[i]=i+'a'; - r = WriteFile(handle,buffer,sizeof buffer,&sz,NULL); - CloseHandle(handle); - return r; -} - -static void test_msirecord(void) -{ - DWORD r, sz; - INT i; - MSIHANDLE h; - char buf[10]; - WCHAR bufW[10]; - const char str[] = "hello"; - const WCHAR strW[] = { 'h','e','l','l','o',0}; - char filename[MAX_PATH]; - - /* check behaviour with an invalid record */ - r = MsiRecordGetFieldCount(0); - ok(r==-1, "field count for invalid record not -1\n"); - SetLastError(0); - r = MsiRecordIsNull(0, 0); - ok(r==0, "invalid handle not considered to be non-null...\n"); - ok(GetLastError()==0, "MsiRecordIsNull set LastError\n"); - r = MsiRecordGetInteger(0,0); - ok(r == MSI_NULL_INTEGER, "got integer from invalid record\n"); - r = MsiRecordSetInteger(0,0,0); - ok(r == ERROR_INVALID_HANDLE, "MsiRecordSetInteger returned wrong error\n"); - r = MsiRecordSetInteger(0,-1,0); - ok(r == ERROR_INVALID_HANDLE, "MsiRecordSetInteger returned wrong error\n"); - SetLastError(0); - h = MsiCreateRecord(-1); - ok(h==0, "created record with -1 elements\n"); - h = MsiCreateRecord(0x10000); - ok(h==0, "created record with 0x10000 elements\n"); - /* doesn't set LastError */ - ok(GetLastError()==0, "MsiCreateRecord set last error\n"); - r = MsiRecordClearData(0); - ok(r == ERROR_INVALID_HANDLE, "MsiRecordClearData returned wrong error\n"); - r = MsiRecordDataSize(0,0); - ok(r == 0, "MsiRecordDataSize returned wrong error\n"); - - - /* check behaviour of a record with 0 elements */ - h = MsiCreateRecord(0); - ok(h!=0, "couldn't create record with zero elements\n"); - r = MsiRecordGetFieldCount(h); - ok(r==0, "field count should be zero\n"); - r = MsiRecordIsNull(h,0); - ok(r, "new record wasn't null\n"); - r = MsiRecordIsNull(h,1); - ok(r, "out of range record wasn't null\n"); - r = MsiRecordIsNull(h,-1); - ok(r, "out of range record wasn't null\n"); - r = MsiRecordDataSize(h,0); - ok(r==0, "size of null record is 0\n"); - sz = sizeof buf; - strcpy(buf,"x"); - r = MsiRecordGetString(h, 0, buf, &sz); - ok(r==ERROR_SUCCESS, "failed to get null string\n"); - ok(sz==0, "null string too long\n"); - ok(buf[0]==0, "null string not set\n"); - - /* same record, but add an integer to it */ - r = MsiRecordSetInteger(h, 0, 0); - ok(r == ERROR_SUCCESS, "Failed to set integer at 0 to 0\n"); - r = MsiRecordIsNull(h,0); - ok(r==0, "new record is null after setting an integer\n"); - r = MsiRecordDataSize(h,0); - ok(r==sizeof(DWORD), "size of integer record is 4\n"); - r = MsiRecordSetInteger(h, 0, 1); - ok(r == ERROR_SUCCESS, "Failed to set integer at 0 to 1\n"); - r = MsiRecordSetInteger(h, 1, 1); - ok(r == ERROR_INVALID_PARAMETER, "set integer at 1\n"); - r = MsiRecordSetInteger(h, -1, 0); - ok(r == ERROR_INVALID_PARAMETER, "set integer at -1\n"); - r = MsiRecordIsNull(h,0); - ok(r==0, "new record is null after setting an integer\n"); - r = MsiRecordGetInteger(h, 0); - ok(r == 1, "failed to get integer\n"); - - /* same record, but add a null or empty string to it */ - r = MsiRecordSetString(h, 0, NULL); - ok(r == ERROR_SUCCESS, "Failed to set null string at 0\n"); - r = MsiRecordIsNull(h, 0); - ok(r == TRUE, "null string not null field\n"); - r = MsiRecordDataSize(h, 0); - ok(r == 0, "size of string record is strlen\n"); - buf[0] = 0; - sz = sizeof buf; - r = MsiRecordGetStringA(h, 0, buf, &sz); - ok(r == ERROR_SUCCESS, "Failed to get string at 0\n"); - ok(buf[0] == 0, "MsiRecordGetStringA returned the wrong string\n"); - ok(sz == 0, "MsiRecordGetStringA returned the wrong length\n"); - bufW[0] = 0; - sz = sizeof bufW / sizeof bufW[0]; - r = MsiRecordGetStringW(h, 0, bufW, &sz); - ok(r == ERROR_SUCCESS, "Failed to get string at 0\n"); - ok(bufW[0] == 0, "MsiRecordGetStringW returned the wrong string\n"); - ok(sz == 0, "MsiRecordGetStringW returned the wrong length\n"); - r = MsiRecordSetString(h, 0, ""); - ok(r == ERROR_SUCCESS, "Failed to set empty string at 0\n"); - r = MsiRecordIsNull(h, 0); - ok(r == TRUE, "null string not null field\n"); - r = MsiRecordDataSize(h, 0); - ok(r == 0, "size of string record is strlen\n"); - buf[0] = 0; - sz = sizeof buf; - r = MsiRecordGetStringA(h, 0, buf, &sz); - ok(r == ERROR_SUCCESS, "Failed to get string at 0\n"); - ok(buf[0] == 0, "MsiRecordGetStringA returned the wrong string\n"); - ok(sz == 0, "MsiRecordGetStringA returned the wrong length\n"); - bufW[0] = 0; - sz = sizeof bufW / sizeof bufW[0]; - r = MsiRecordGetStringW(h, 0, bufW, &sz); - ok(r == ERROR_SUCCESS, "Failed to get string at 0\n"); - ok(bufW[0] == 0, "MsiRecordGetStringW returned the wrong string\n"); - ok(sz == 0, "MsiRecordGetStringW returned the wrong length\n"); - - /* same record, but add a string to it */ - r = MsiRecordSetString(h,0,str); - ok(r == ERROR_SUCCESS, "Failed to set string at 0\n"); - r = MsiRecordGetInteger(h, 0); - ok(r == MSI_NULL_INTEGER, "should get invalid integer\n"); - r = MsiRecordDataSize(h,0); - ok(r==sizeof str-1, "size of string record is strlen\n"); - buf[0]=0; - sz = sizeof buf; - r = MsiRecordGetString(h,0,buf,&sz); - ok(r == ERROR_SUCCESS, "Failed to get string at 0\n"); - ok(0==strcmp(buf,str), "MsiRecordGetString returned the wrong string\n"); - ok(sz == sizeof str-1, "MsiRecordGetString returned the wrong length\n"); - buf[0]=0; - sz = sizeof str - 2; - r = MsiRecordGetString(h,0,buf,&sz); - ok(r == ERROR_MORE_DATA, "small buffer should yield ERROR_MORE_DATA\n"); - ok(sz == sizeof str-1, "MsiRecordGetString returned the wrong length\n"); - ok(0==strncmp(buf,str,sizeof str-3), "MsiRecordGetString returned the wrong string\n"); - ok(buf[sizeof str - 3]==0, "string wasn't nul terminated\n"); - - buf[0]=0; - sz = sizeof str; - r = MsiRecordGetString(h,0,buf,&sz); - ok(r == ERROR_SUCCESS, "wrong error\n"); - ok(sz == sizeof str-1, "MsiRecordGetString returned the wrong length\n"); - ok(0==strcmp(buf,str), "MsiRecordGetString returned the wrong string\n"); - - - memset(bufW, 0, sizeof bufW); - sz = 5; - r = MsiRecordGetStringW(h,0,bufW,&sz); - ok(r == ERROR_MORE_DATA, "wrong error\n"); - ok(sz == 5, "MsiRecordGetString returned the wrong length\n"); - ok(0==memcmp(bufW,strW,8), "MsiRecordGetString returned the wrong string\n"); - - sz = 0; - bufW[0] = 'x'; - r = MsiRecordGetStringW(h,0,bufW,&sz); - ok(r == ERROR_MORE_DATA, "wrong error\n"); - ok(sz == 5, "MsiRecordGetString returned the wrong length\n"); - ok('x'==bufW[0], "MsiRecordGetString returned the wrong string\n"); - - memset(buf, 0, sizeof buf); - sz = 5; - r = MsiRecordGetStringA(h,0,buf,&sz); - ok(r == ERROR_MORE_DATA, "wrong error\n"); - ok(sz == 5, "MsiRecordGetString returned the wrong length\n"); - ok(0==memcmp(buf,str,4), "MsiRecordGetString returned the wrong string\n"); - - sz = 0; - buf[0] = 'x'; - r = MsiRecordGetStringA(h,0,buf,&sz); - ok(r == ERROR_MORE_DATA, "wrong error\n"); - ok(sz == 5, "MsiRecordGetString returned the wrong length\n"); - ok('x'==buf[0], "MsiRecordGetString returned the wrong string\n"); - - /* same record, check we can wipe all the data */ - r = MsiRecordClearData(h); - ok(r == ERROR_SUCCESS, "Failed to clear record\n"); - r = MsiRecordClearData(h); - ok(r == ERROR_SUCCESS, "Failed to clear record again\n"); - r = MsiRecordIsNull(h,0); - ok(r, "cleared record wasn't null\n"); - - /* same record, try converting strings to integers */ - i = MsiRecordSetString(h,0,"42"); - ok(i == ERROR_SUCCESS, "Failed to set string at 0\n"); - i = MsiRecordGetInteger(h, 0); - ok(i == 42, "should get invalid integer\n"); - i = MsiRecordSetString(h,0,"-42"); - ok(i == ERROR_SUCCESS, "Failed to set string at 0\n"); - i = MsiRecordGetInteger(h, 0); - ok(i == -42, "should get invalid integer\n"); - i = MsiRecordSetString(h,0," 42"); - ok(i == ERROR_SUCCESS, "Failed to set string at 0\n"); - i = MsiRecordGetInteger(h, 0); - ok(i == MSI_NULL_INTEGER, "should get invalid integer\n"); - i = MsiRecordSetString(h,0,"42 "); - ok(i == ERROR_SUCCESS, "Failed to set string at 0\n"); - i = MsiRecordGetInteger(h, 0); - ok(i == MSI_NULL_INTEGER, "should get invalid integer\n"); - i = MsiRecordSetString(h,0,"42.0"); - ok(i == ERROR_SUCCESS, "Failed to set string at 0\n"); - i = MsiRecordGetInteger(h, 0); - ok(i == MSI_NULL_INTEGER, "should get invalid integer\n"); - i = MsiRecordSetString(h,0,"0x42"); - ok(i == ERROR_SUCCESS, "Failed to set string at 0\n"); - i = MsiRecordGetInteger(h, 0); - ok(i == MSI_NULL_INTEGER, "should get invalid integer\n"); - i = MsiRecordSetString(h,0,"1000000000000000"); - ok(i == ERROR_SUCCESS, "Failed to set string at 0\n"); - i = MsiRecordGetInteger(h, 0); - ok(i == -1530494976, "should get truncated integer\n"); - i = MsiRecordSetString(h,0,"2147483647"); - ok(i == ERROR_SUCCESS, "Failed to set string at 0\n"); - i = MsiRecordGetInteger(h, 0); - ok(i == 2147483647, "should get maxint\n"); - i = MsiRecordSetString(h,0,"-2147483647"); - ok(i == ERROR_SUCCESS, "Failed to set string at 0\n"); - i = MsiRecordGetInteger(h, 0); - ok(i == -2147483647, "should get -maxint-1\n"); - i = MsiRecordSetString(h,0,"4294967297"); - ok(i == ERROR_SUCCESS, "Failed to set string at 0\n"); - i = MsiRecordGetInteger(h, 0); - ok(i == 1, "should get one\n"); - i = MsiRecordSetString(h,0,"foo"); - ok(i == ERROR_SUCCESS, "Failed to set string at 0\n"); - i = MsiRecordGetInteger(h, 0); - ok(i == MSI_NULL_INTEGER, "should get zero\n"); - i = MsiRecordSetString(h,0,""); - ok(i == ERROR_SUCCESS, "Failed to set string at 0\n"); - i = MsiRecordGetInteger(h, 0); - ok(i == MSI_NULL_INTEGER, "should get zero\n"); - i = MsiRecordSetString(h,0,"+1"); - ok(i == ERROR_SUCCESS, "Failed to set string at 0\n"); - i = MsiRecordGetInteger(h, 0); - ok(i == MSI_NULL_INTEGER, "should get zero\n"); - - /* same record, try converting integers to strings */ - r = MsiRecordSetInteger(h, 0, 32); - ok(r == ERROR_SUCCESS, "Failed to set integer at 0 to 32\n"); - sz = 1; - r = MsiRecordGetString(h, 0, NULL, &sz); - ok(r == ERROR_SUCCESS, "failed to get string from integer\n"); - ok(sz == 2, "length wrong\n"); - buf[0]=0; - sz = sizeof buf; - r = MsiRecordGetString(h, 0, buf, &sz); - ok(r == ERROR_SUCCESS, "failed to get string from integer\n"); - ok(0==strcmp(buf,"32"), "failed to get string from integer\n"); - r = MsiRecordSetInteger(h, 0, -32); - ok(r == ERROR_SUCCESS, "Failed to set integer at 0 to 32\n"); - buf[0]=0; - sz = 1; - r = MsiRecordGetString(h, 0, NULL, &sz); - ok(r == ERROR_SUCCESS, "failed to get string from integer\n"); - ok(sz == 3, "length wrong\n"); - sz = sizeof buf; - r = MsiRecordGetString(h, 0, buf, &sz); - ok(r == ERROR_SUCCESS, "failed to get string from integer\n"); - ok(0==strcmp(buf,"-32"), "failed to get string from integer\n"); - buf[0]=0; - - /* same record, now try streams */ - r = MsiRecordSetStream(h, 0, NULL); - ok(r == ERROR_INVALID_PARAMETER, "set NULL stream\n"); - sz = sizeof buf; - r = MsiRecordReadStream(h, 0, buf, &sz); - ok(r == ERROR_INVALID_DATATYPE, "read non-stream type\n"); - ok(sz == sizeof buf, "set sz\n"); - r = MsiRecordDataSize( h, -1); - ok(r == 0,"MsiRecordDataSize returned wrong size\n"); - r = MsiRecordDataSize( h, 0); - ok(r == 4,"MsiRecordDataSize returned wrong size\n"); - - /* same record, now close it */ - r = MsiCloseHandle(h); - ok(r == ERROR_SUCCESS, "Failed to close handle\n"); - - /* now try streams in a new record - need to create a file to play with */ - r = create_temp_file(filename); - if(!r) - return; - - /* streams can't be inserted in field 0 for some reason */ - h = MsiCreateRecord(2); - ok(h, "couldn't create a two field record\n"); - r = MsiRecordSetStream(h, 0, filename); - ok(r == ERROR_INVALID_PARAMETER, "added stream to field 0\n"); - r = MsiRecordSetStream(h, 1, filename); - ok(r == ERROR_SUCCESS, "failed to add stream to record\n"); - r = MsiRecordReadStream(h, 1, buf, NULL); - ok(r == ERROR_INVALID_PARAMETER, "should return error\n"); - DeleteFile(filename); /* Windows 98 doesn't like this at all, so don't check return. */ - r = MsiRecordReadStream(h, 1, NULL, NULL); - ok(r == ERROR_INVALID_PARAMETER, "should return error\n"); - sz = sizeof buf; - r = MsiRecordReadStream(h, 1, NULL, &sz); - ok(r == ERROR_SUCCESS, "failed to read stream\n"); - ok(sz==26,"couldn't get size of stream\n"); - sz = 0; - r = MsiRecordReadStream(h, 1, buf, &sz); - ok(r == ERROR_SUCCESS, "failed to read stream\n"); - ok(sz==0,"short read\n"); - sz = sizeof buf; - r = MsiRecordReadStream(h, 1, buf, &sz); - ok(r == ERROR_SUCCESS, "failed to read stream\n"); - ok(sz==sizeof buf,"short read\n"); - ok(!strncmp(buf,"abcdefghij",10), "read the wrong thing\n"); - sz = sizeof buf; - r = MsiRecordReadStream(h, 1, buf, &sz); - ok(r == ERROR_SUCCESS, "failed to read stream\n"); - ok(sz==sizeof buf,"short read\n"); - ok(!strncmp(buf,"klmnopqrst",10), "read the wrong thing\n"); - memset(buf,0,sizeof buf); - sz = sizeof buf; - r = MsiRecordReadStream(h, 1, buf, &sz); - ok(r == ERROR_SUCCESS, "failed to read stream\n"); - ok(sz==6,"short read\n"); - ok(!strcmp(buf,"uvwxyz"), "read the wrong thing\n"); - memset(buf,0,sizeof buf); - sz = sizeof buf; - r = MsiRecordReadStream(h, 1, buf, &sz); - ok(r == ERROR_SUCCESS, "failed to read stream\n"); - ok(sz==0,"size non-zero at end of stream\n"); - ok(buf[0]==0, "read something at end of the stream\n"); - r = MsiRecordSetStream(h, 1, NULL); - ok(r == ERROR_SUCCESS, "failed to reset stream\n"); - sz = 0; - r = MsiRecordReadStream(h, 1, NULL, &sz); - ok(r == ERROR_SUCCESS, "bytes left wrong after reset\n"); - ok(sz==26,"couldn't get size of stream\n"); - r = MsiRecordDataSize(h,1); - ok(r == 26,"MsiRecordDataSize returned wrong size\n"); - - /* now close the stream record */ - r = MsiCloseHandle(h); - ok(r == ERROR_SUCCESS, "Failed to close handle\n"); - DeleteFile(filename); /* Delete it for sure, when everything else is closed. */ -} - -static void test_MsiRecordGetString(void) -{ - MSIHANDLE rec; - CHAR buf[MAX_PATH]; - DWORD sz; - UINT r; - - rec = MsiCreateRecord(2); - ok(rec != 0, "Expected a valid handle\n"); - - sz = MAX_PATH; - r = MsiRecordGetString(rec, 1, NULL, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n",r); - ok(sz == 0, "Expected 0, got %d\n",sz); - - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiRecordGetString(rec, 1, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiRecordGetString(rec, 10, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expected 0, got %d\n", sz); - - MsiCloseHandle(rec); - - rec = MsiCreateRecord(1); - ok(rec != 0, "Expected a valid handle\n"); - - r = MsiRecordSetInteger(rec, 1, 5); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - sz = MAX_PATH; - r = MsiRecordGetString(rec, 1, NULL, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n",r); - ok(sz == 1, "Expected 1, got %d\n",sz); - - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiRecordGetString(rec, 1, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "5"), "Expected \"5\", got \"%s\"\n", buf); - ok(sz == 1, "Expectd 1, got %d\n", sz); - - r = MsiRecordSetInteger(rec, 1, -5); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiRecordGetString(rec, 1, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "-5"), "Expected \"-5\", got \"%s\"\n", buf); - ok(sz == 2, "Expectd 2, got %d\n", sz); - - MsiCloseHandle(rec); -} - -static void test_MsiRecordGetInteger(void) -{ - MSIHANDLE rec; - INT val; - UINT r; - - rec = MsiCreateRecord(1); - ok(rec != 0, "Expected a valid handle\n"); - - r = MsiRecordSetString(rec, 1, "5"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - val = MsiRecordGetInteger(rec, 1); - ok(val == 5, "Expected 5, got %d\n", val); - - r = MsiRecordSetString(rec, 1, "-5"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - val = MsiRecordGetInteger(rec, 1); - ok(val == -5, "Expected -5, got %d\n", val); - - r = MsiRecordSetString(rec, 1, "5apple"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - val = MsiRecordGetInteger(rec, 1); - ok(val == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", val); - - MsiCloseHandle(rec); -} - -static void test_fieldzero(void) -{ - MSIHANDLE hdb, hview, rec; - CHAR buf[MAX_PATH]; - LPCSTR query; - DWORD sz; - UINT r; - - rec = MsiCreateRecord(1); - ok(rec != 0, "Expected a valid handle\n"); - - r = MsiRecordGetInteger(rec, 0); - ok(r == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiRecordGetString(rec, 0, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expectd 0, got %d\n", sz); - - r = MsiRecordIsNull(rec, 0); - ok(r == TRUE, "Expected TRUE, got %d\n", r); - - r = MsiRecordGetInteger(rec, 1); - ok(r == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", r); - - r = MsiRecordSetInteger(rec, 1, 42); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiRecordGetInteger(rec, 0); - ok(r == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiRecordGetString(rec, 0, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expectd 0, got %d\n", sz); - - r = MsiRecordIsNull(rec, 0); - ok(r == TRUE, "Expected TRUE, got %d\n", r); - - r = MsiRecordGetInteger(rec, 1); - ok(r == 42, "Expected 42, got %d\n", r); - - r = MsiRecordSetString(rec, 1, "bologna"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiRecordGetInteger(rec, 0); - ok(r == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiRecordGetString(rec, 0, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, ""), "Expected \"\", got \"%s\"\n", buf); - ok(sz == 0, "Expectd 0, got %d\n", sz); - - r = MsiRecordIsNull(rec, 0); - ok(r == TRUE, "Expected TRUE, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiRecordGetString(rec, 1, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "bologna"), "Expected \"bologna\", got \"%s\"\n", buf); - ok(sz == 7, "Expectd 7, got %d\n", sz); - - MsiCloseHandle(rec); - - r = MsiOpenDatabase(msifile, MSIDBOPEN_CREATE, &hdb); - ok(r == ERROR_SUCCESS, "MsiOpenDatabase failed\n"); - - query = "CREATE TABLE `drone` ( " - "`id` INT, `name` CHAR(32), `number` CHAR(32) " - "PRIMARY KEY `id`)"; - r = MsiDatabaseOpenView(hdb, query, &hview); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - r = MsiViewExecute(hview, 0); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - r = MsiViewClose(hview); - ok(r == ERROR_SUCCESS, "MsiViewClose failed\n"); - r = MsiCloseHandle(hview); - ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); - - query = "INSERT INTO `drone` ( `id`, `name`, `number` )" - "VALUES('1', 'Abe', '8675309')"; - r = MsiDatabaseOpenView(hdb, query, &hview); - ok(r == ERROR_SUCCESS, "MsiDatabaseOpenView failed\n"); - r = MsiViewExecute(hview, 0); - ok(r == ERROR_SUCCESS, "MsiViewExecute failed\n"); - r = MsiViewClose(hview); - ok(r == ERROR_SUCCESS, "MsiViewClose failed\n"); - r = MsiCloseHandle(hview); - ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); - - r = MsiDatabaseGetPrimaryKeysA(hdb, "drone", &rec); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiRecordGetInteger(rec, 0); - ok(r == MSI_NULL_INTEGER, "Expected MSI_NULL_INTEGER, got %d\n", r); - - sz = MAX_PATH; - lstrcpyA(buf, "apple"); - r = MsiRecordGetString(rec, 0, buf, &sz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(buf, "drone"), "Expected \"drone\", got \"%s\"\n", buf); - ok(sz == 5, "Expectd 5, got %d\n", sz); - - r = MsiRecordIsNull(rec, 0); - ok(r == FALSE, "Expected FALSE, got %d\n", r); - - MsiCloseHandle(rec); - - query = "SELECT * FROM `drone` WHERE `id` = 1"; - r = MsiDatabaseOpenView(hdb, query, &hview); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - r = MsiViewExecute(hview, 0); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - r = MsiViewFetch(hview, &rec); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - r = MsiRecordGetInteger(rec, 0); - ok(r != MSI_NULL_INTEGER && r != 0, "Expected non-NULL value, got %d\n", r); - - r = MsiRecordIsNull(rec, 0); - ok(r == FALSE, "Expected FALSE, got %d\n", r); - - r = MsiCloseHandle(hview); - ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); - MsiCloseHandle(rec); - MsiCloseHandle(hdb); - DeleteFileA(msifile); -} - -START_TEST(record) -{ - test_msirecord(); - test_MsiRecordGetString(); - test_MsiRecordGetInteger(); - test_fieldzero(); -} diff --git a/rostests/winetests/msi/source.c b/rostests/winetests/msi/source.c deleted file mode 100644 index 1826f2175be..00000000000 --- a/rostests/winetests/msi/source.c +++ /dev/null @@ -1,3391 +0,0 @@ -/* - * Tests for MSI Source functions - * - * Copyright (C) 2006 James Hawkins - * - * 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 _WIN32_MSI 300 - -#include - -#include -#include -#include -#include -#include -#include - -#include "wine/test.h" - -static BOOL (WINAPI *pConvertSidToStringSidA)(PSID, LPSTR*); -static BOOLEAN (WINAPI *pGetUserNameExA)(EXTENDED_NAME_FORMAT, LPSTR, PULONG); -static UINT (WINAPI *pMsiSourceListAddMediaDiskA) - (LPCSTR, LPCSTR, MSIINSTALLCONTEXT, DWORD, DWORD, LPCSTR, LPCSTR); -static UINT (WINAPI *pMsiSourceListAddSourceExA) - (LPCSTR, LPCSTR, MSIINSTALLCONTEXT, DWORD, LPCSTR, DWORD); -static UINT (WINAPI *pMsiSourceListEnumMediaDisksA) - (LPCSTR, LPCSTR, MSIINSTALLCONTEXT, DWORD, DWORD, LPDWORD, LPSTR, - LPDWORD, LPSTR, LPDWORD); -static UINT (WINAPI *pMsiSourceListEnumSourcesA) - (LPCSTR, LPCSTR, MSIINSTALLCONTEXT, DWORD, DWORD, LPSTR, LPDWORD); -static UINT (WINAPI *pMsiSourceListGetInfoA) - (LPCSTR, LPCSTR, MSIINSTALLCONTEXT, DWORD, LPCSTR, LPSTR, LPDWORD); -static UINT (WINAPI *pMsiSourceListSetInfoA) - (LPCSTR, LPCSTR, MSIINSTALLCONTEXT, DWORD,LPCSTR, LPCSTR); -static UINT (WINAPI *pMsiSourceListAddSourceA) - (LPCSTR, LPCSTR, DWORD, LPCSTR); - -static void init_functionpointers(void) -{ - HMODULE hmsi = GetModuleHandleA("msi.dll"); - HMODULE hadvapi32 = GetModuleHandleA("advapi32.dll"); - HMODULE hsecur32 = LoadLibraryA("secur32.dll"); - -#define GET_PROC(dll, func) \ - p ## func = (void *)GetProcAddress(dll, #func); \ - if(!p ## func) \ - trace("GetProcAddress(%s) failed\n", #func); - - GET_PROC(hmsi, MsiSourceListAddMediaDiskA) - GET_PROC(hmsi, MsiSourceListAddSourceExA) - GET_PROC(hmsi, MsiSourceListEnumMediaDisksA) - GET_PROC(hmsi, MsiSourceListEnumSourcesA) - GET_PROC(hmsi, MsiSourceListGetInfoA) - GET_PROC(hmsi, MsiSourceListSetInfoA) - GET_PROC(hmsi, MsiSourceListAddSourceA) - - GET_PROC(hadvapi32, ConvertSidToStringSidA) - - GET_PROC(hsecur32, GetUserNameExA) - -#undef GET_PROC -} - -/* copied from dlls/msi/registry.c */ -static BOOL squash_guid(LPCWSTR in, LPWSTR out) -{ - DWORD i,n=1; - GUID guid; - - if (FAILED(CLSIDFromString((LPCOLESTR)in, &guid))) - return FALSE; - - for(i=0; i<8; i++) - out[7-i] = in[n++]; - n++; - for(i=0; i<4; i++) - out[11-i] = in[n++]; - n++; - for(i=0; i<4; i++) - out[15-i] = in[n++]; - n++; - for(i=0; i<2; i++) - { - out[17+i*2] = in[n++]; - out[16+i*2] = in[n++]; - } - n++; - for( ; i<8; i++) - { - out[17+i*2] = in[n++]; - out[16+i*2] = in[n++]; - } - out[32]=0; - return TRUE; -} - -static void create_test_guid(LPSTR prodcode, LPSTR squashed) -{ - WCHAR guidW[MAX_PATH]; - WCHAR squashedW[MAX_PATH]; - GUID guid; - HRESULT hr; - int size; - - hr = CoCreateGuid(&guid); - ok(hr == S_OK, "Expected S_OK, got %d\n", hr); - - size = StringFromGUID2(&guid, guidW, MAX_PATH); - ok(size == 39, "Expected 39, got %d\n", hr); - - WideCharToMultiByte(CP_ACP, 0, guidW, size, prodcode, MAX_PATH, NULL, NULL); - squash_guid(guidW, squashedW); - WideCharToMultiByte(CP_ACP, 0, squashedW, -1, squashed, MAX_PATH, NULL, NULL); -} - -static int get_user_sid(LPSTR *usersid) -{ - HANDLE token; - BYTE buf[1024]; - DWORD size; - PTOKEN_USER user; - BOOL rc; - - if (!pConvertSidToStringSidA) - return 0; - rc=OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token); - if (!rc && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - return 0; - size = sizeof(buf); - GetTokenInformation(token, TokenUser, buf, size, &size); - user = (PTOKEN_USER)buf; - pConvertSidToStringSidA(user->User.Sid, usersid); - CloseHandle(token); - return 1; -} - -static void check_reg_str(HKEY prodkey, LPCSTR name, LPCSTR expected, BOOL bcase, DWORD line) -{ - char val[MAX_PATH]; - DWORD size, type; - LONG res; - - size = MAX_PATH; - val[0] = '\0'; - res = RegQueryValueExA(prodkey, name, NULL, &type, (LPBYTE)val, &size); - - if (res != ERROR_SUCCESS || (type != REG_SZ && type != REG_EXPAND_SZ)) - { - ok_(__FILE__, line)(FALSE, "Key doesn't exist or wrong type\n"); - return; - } - - if (!expected) - ok_(__FILE__, line)(lstrlenA(val) == 0, "Expected empty string, got %s\n", val); - else - { - if (bcase) - ok_(__FILE__, line)(!lstrcmpA(val, expected), "Expected %s, got %s\n", expected, val); - else - ok_(__FILE__, line)(!lstrcmpiA(val, expected), "Expected %s, got %s\n", expected, val); - } -} - -#define CHECK_REG_STR(prodkey, name, expected) \ - check_reg_str(prodkey, name, expected, TRUE, __LINE__); - -static void test_MsiSourceListGetInfo(void) -{ - CHAR prodcode[MAX_PATH]; - CHAR prod_squashed[MAX_PATH]; - CHAR keypath[MAX_PATH*2]; - CHAR value[MAX_PATH]; - LPSTR usersid; - LPCSTR data; - LONG res; - UINT r; - HKEY userkey, hkey, media; - DWORD size; - - if (!pMsiSourceListGetInfoA) - { - win_skip("Skipping MsiSourceListGetInfoA tests\n"); - return; - } - - create_test_guid(prodcode, prod_squashed); - if (!get_user_sid(&usersid)) - { - skip("User SID not available -> skipping MsiSourceListGetInfoA tests\n"); - return; - } - - /* NULL szProductCodeOrPatchCode */ - r = pMsiSourceListGetInfoA(NULL, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, NULL, NULL); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* empty szProductCodeOrPatchCode */ - r = pMsiSourceListGetInfoA("", usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, NULL, NULL); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* garbage szProductCodeOrPatchCode */ - r = pMsiSourceListGetInfoA("garbage", usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, NULL, NULL); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* szProductCodeOrPatchCode */ - r = pMsiSourceListGetInfoA("garbage", usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, NULL, NULL); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* guid without brackets */ - r = pMsiSourceListGetInfoA("51CD2AD5-0482-4C46-8DDD-0ED1022AA1AA", usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, NULL, NULL); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* guid with brackets */ - r = pMsiSourceListGetInfoA("{51CD2AD5-0482-4C46-8DDD-0ED1022AA1AA}", usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, NULL, NULL); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - - /* same length as guid, but random */ - r = pMsiSourceListGetInfoA("ADKD-2KSDFF2-DKK1KNFJASD9GLKWME-1I3KAD", usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, NULL, NULL); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* invalid context */ - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_NONE, - MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, NULL, NULL); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* another invalid context */ - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_ALLUSERMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, NULL, NULL); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* yet another invalid context */ - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_ALL, - MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, NULL, NULL); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* mix two valid contexts */ - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED | MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, NULL, NULL); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* invalid option */ - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - 4, INSTALLPROPERTY_PACKAGENAME, NULL, NULL); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - - /* NULL property */ - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, NULL, NULL, NULL); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* empty property */ - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, "", NULL, NULL); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - - /* value is non-NULL while size is NULL */ - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, value, NULL); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* size is non-NULL while value is NULL */ - size = MAX_PATH; - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, NULL, &size); - ok(r == ERROR_UNKNOWN_PRODUCT || r == ERROR_INVALID_PARAMETER, - "Expected ERROR_UNKNOWN_PRODUCT or ERROR_INVALID_PARAMETER, got %d\n", r); - - lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user product key exists */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, value, &size); - ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value); - - res = RegCreateKeyA(userkey, "SourceList", &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* SourceList key exists */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(size == 0, "Expected 0, got %d\n", size); - ok(!lstrcmpA(value, ""), "Expected \"\", got \"%s\"\n", value); - - data = "msitest.msi"; - res = RegSetValueExA(hkey, "PackageName", 0, REG_SZ, (const BYTE *)data, lstrlenA(data) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* PackageName value exists */ - size = 0xdeadbeef; - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, NULL, &size); - ok(r == ERROR_SUCCESS || r == ERROR_INVALID_PARAMETER, - "Expected ERROR_SUCCESS or ERROR_INVALID_PARAMETER, got %d\n", r); - ok(size == 11 || r != ERROR_SUCCESS, "Expected 11, got %d\n", size); - - /* read the value, don't change size */ - size = 11; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, value, &size); - ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected 'aaa', got %s\n", value); - ok(size == 11, "Expected 11, got %d\n", size); - - /* read the value, fix size */ - size++; - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAME, value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "msitest.msi"), "Expected 'msitest.msi', got %s\n", value); - ok(size == 11, "Expected 11, got %d\n", size); - - /* empty property now that product key exists */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, "", value, &size); - ok(r == ERROR_UNKNOWN_PROPERTY, "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size); - ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value); - - /* nonexistent property now that product key exists */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, "nonexistent", value, &size); - ok(r == ERROR_UNKNOWN_PROPERTY, "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size); - ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value); - - data = "tester"; - res = RegSetValueExA(hkey, "nonexistent", 0, REG_SZ, (const BYTE *)data, lstrlenA(data) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* nonexistent property now that nonexistent value exists */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, "nonexistent", value, &size); - ok(r == ERROR_UNKNOWN_PROPERTY, "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size); - ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value); - - /* invalid option now that product key exists */ - size = MAX_PATH; - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - 4, INSTALLPROPERTY_PACKAGENAME, value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(size == 11, "Expected 11, got %d\n", size); - - /* INSTALLPROPERTY_MEDIAPACKAGEPATH, media key does not exist */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_MEDIAPACKAGEPATH, - value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, ""), "Expected \"\", got \"%s\"\n", value); - ok(size == 0, "Expected 0, got %d\n", size); - - res = RegCreateKeyA(hkey, "Media", &media); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - data = "path"; - res = RegSetValueExA(media, "MediaPackage", 0, REG_SZ, - (const BYTE *)data, lstrlenA(data) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* INSTALLPROPERTY_MEDIAPACKAGEPATH */ - size = MAX_PATH; - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_MEDIAPACKAGEPATH, - value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "path"), "Expected \"path\", got \"%s\"\n", value); - ok(size == 4, "Expected 4, got %d\n", size); - - /* INSTALLPROPERTY_DISKPROMPT */ - data = "prompt"; - res = RegSetValueExA(media, "DiskPrompt", 0, REG_SZ, - (const BYTE *)data, lstrlenA(data) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - size = MAX_PATH; - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_DISKPROMPT, - value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "prompt"), "Expected \"prompt\", got \"%s\"\n", value); - ok(size == 6, "Expected 6, got %d\n", size); - - data = ""; - res = RegSetValueExA(hkey, "LastUsedSource", 0, REG_SZ, - (const BYTE *)data, lstrlenA(data) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* INSTALLPROPERTY_LASTUSEDSOURCE, source is empty */ - size = MAX_PATH; - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCE, - value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, ""), "Expected \"\", got \"%s\"\n", value); - ok(size == 0, "Expected 0, got %d\n", size); - - data = "source"; - res = RegSetValueExA(hkey, "LastUsedSource", 0, REG_SZ, - (const BYTE *)data, lstrlenA(data) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* INSTALLPROPERTY_LASTUSEDSOURCE */ - size = MAX_PATH; - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCE, - value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "source"), "Expected \"source\", got \"%s\"\n", value); - ok(size == 6, "Expected 6, got %d\n", size); - - /* INSTALLPROPERTY_LASTUSEDSOURCE, size is too short */ - size = 4; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCE, - value, &size); - ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got \"%s\"\n", value); - ok(size == 6, "Expected 6, got %d\n", size); - - /* INSTALLPROPERTY_LASTUSEDSOURCE, size is exactly 6 */ - size = 6; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCE, - value, &size); - ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got \"%s\"\n", value); - ok(size == 6, "Expected 6, got %d\n", size); - - data = "a;source"; - res = RegSetValueExA(hkey, "LastUsedSource", 0, REG_SZ, - (const BYTE *)data, lstrlenA(data) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* INSTALLPROPERTY_LASTUSEDSOURCE, one semi-colon */ - size = MAX_PATH; - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCE, - value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "source"), "Expected \"source\", got \"%s\"\n", value); - ok(size == 6, "Expected 6, got %d\n", size); - - data = "a:source"; - res = RegSetValueExA(hkey, "LastUsedSource", 0, REG_SZ, - (const BYTE *)data, lstrlenA(data) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* INSTALLPROPERTY_LASTUSEDSOURCE, one colon */ - size = MAX_PATH; - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCE, - value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "a:source"), "Expected \"a:source\", got \"%s\"\n", value); - ok(size == 8, "Expected 8, got %d\n", size); - - /* INSTALLPROPERTY_LASTUSEDTYPE, invalid source format */ - size = MAX_PATH; - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDTYPE, - value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, ""), "Expected \"\", got \"%s\"\n", value); - ok(size == 0, "Expected 0, got %d\n", size); - - data = "x;y;z"; - res = RegSetValueExA(hkey, "LastUsedSource", 0, REG_SZ, - (const BYTE *)data, lstrlenA(data) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* INSTALLPROPERTY_LASTUSEDTYPE, invalid source format */ - size = MAX_PATH; - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDTYPE, - value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, ""), "Expected \"\", got \"%s\"\n", value); - ok(size == 0, "Expected 0, got %d\n", size); - - data = "n;y;z"; - res = RegSetValueExA(hkey, "LastUsedSource", 0, REG_SZ, - (const BYTE *)data, lstrlenA(data) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* INSTALLPROPERTY_LASTUSEDTYPE */ - size = MAX_PATH; - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDTYPE, - value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "n"), "Expected \"n\", got \"%s\"\n", value); - ok(size == 1, "Expected 1, got %d\n", size); - - data = "negatory"; - res = RegSetValueExA(hkey, "LastUsedSource", 0, REG_SZ, - (const BYTE *)data, lstrlenA(data) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* INSTALLPROPERTY_LASTUSEDTYPE */ - size = MAX_PATH; - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDTYPE, - value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "n"), "Expected \"n\", got \"%s\"\n", value); - ok(size == 1, "Expected 1, got %d\n", size); - - data = "megatron"; - res = RegSetValueExA(hkey, "LastUsedSource", 0, REG_SZ, - (const BYTE *)data, lstrlenA(data) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* INSTALLPROPERTY_LASTUSEDTYPE */ - size = MAX_PATH; - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDTYPE, - value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "m"), "Expected \"m\", got \"%s\"\n", value); - ok(size == 1, "Expected 1, got %d\n", size); - - data = "useless"; - res = RegSetValueExA(hkey, "LastUsedSource", 0, REG_SZ, - (const BYTE *)data, lstrlenA(data) + 1); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* INSTALLPROPERTY_LASTUSEDTYPE */ - size = MAX_PATH; - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDTYPE, - value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "u"), "Expected \"u\", got \"%s\"\n", value); - ok(size == 1, "Expected 1, got %d\n", size); - - RegDeleteValueA(media, "MediaPackage"); - RegDeleteValueA(media, "DiskPrompt"); - RegDeleteKeyA(media, ""); - RegDeleteValueA(hkey, "LastUsedSource"); - RegDeleteValueA(hkey, "nonexistent"); - RegDeleteValueA(hkey, "PackageName"); - RegDeleteKeyA(hkey, ""); - RegDeleteKeyA(userkey, ""); - RegCloseKey(hkey); - RegCloseKey(userkey); - - /* try a patch */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PATCH, INSTALLPROPERTY_PACKAGENAME, value, &size); - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r); - ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size); - ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value); - - lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Patches\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* patch key exists - * NOTE: using prodcode guid, but it really doesn't matter - */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PATCH, INSTALLPROPERTY_PACKAGENAME, value, &size); - ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - ok(size == MAX_PATH, "Expected %d, got %d\n", MAX_PATH, size); - ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value); - - res = RegCreateKeyA(userkey, "SourceList", &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* SourceList key exists */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListGetInfoA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PATCH, INSTALLPROPERTY_PACKAGENAME, value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, ""), "Expected \"\", got \"%s\"\n", value); - ok(size == 0, "Expected 0, got %d\n", size); - - RegDeleteKeyA(hkey, ""); - RegDeleteKeyA(userkey, ""); - RegCloseKey(hkey); - RegCloseKey(userkey); - LocalFree(usersid); -} - -static void test_MsiSourceListAddSourceEx(void) -{ - CHAR prodcode[MAX_PATH]; - CHAR prod_squashed[MAX_PATH]; - CHAR keypath[MAX_PATH*2]; - CHAR value[MAX_PATH]; - LPSTR usersid; - LONG res; - UINT r; - HKEY prodkey, userkey, hkey; - HKEY url, net; - DWORD size; - - if (!pMsiSourceListAddSourceExA) - { - win_skip("Skipping MsiSourceListAddSourceExA tests\n"); - return; - } - - create_test_guid(prodcode, prod_squashed); - if (!get_user_sid(&usersid)) - { - skip("User SID not available -> skipping MsiSourceListAddSourceExA tests\n"); - return; - } - - /* GetLastError is not set by the function */ - - /* NULL szProductCodeOrPatchCode */ - r = pMsiSourceListAddSourceExA(NULL, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, "C:\\source", 0); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* empty szProductCodeOrPatchCode */ - r = pMsiSourceListAddSourceExA("", usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, "C:\\source", 0); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* garbage szProductCodeOrPatchCode */ - r = pMsiSourceListAddSourceExA("garbage", usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, "C:\\source", 0); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* guid without brackets */ - r = pMsiSourceListAddSourceExA("51CD2AD5-0482-4C46-8DDD-0ED1022AA1AA", usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, "C:\\source", 0); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* guid with brackets */ - r = pMsiSourceListAddSourceExA("{51CD2AD5-0482-4C46-8DDD-0ED1022AA1AA}", usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, "C:\\source", 0); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - - /* MSIINSTALLCONTEXT_USERUNMANAGED */ - - r = pMsiSourceListAddSourceExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, "C:\\source", 0); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - - lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user product key exists */ - r = pMsiSourceListAddSourceExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, "C:\\source", 0); - ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - - res = RegCreateKeyA(userkey, "SourceList", &url); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - RegCloseKey(url); - - /* SourceList key exists */ - r = pMsiSourceListAddSourceExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, "C:\\source", 0); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - res = RegOpenKeyA(userkey, "SourceList\\URL", &url); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - size = MAX_PATH; - res = RegQueryValueExA(url, "1", NULL, NULL, (LPBYTE)value, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(value, "C:\\source/"), "Expected 'C:\\source/', got %s\n", value); - ok(size == 11, "Expected 11, got %d\n", size); - - /* add another source, index 0 */ - r = pMsiSourceListAddSourceExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, "another", 0); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - size = MAX_PATH; - res = RegQueryValueExA(url, "1", NULL, NULL, (LPBYTE)value, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(value, "C:\\source/"), "Expected 'C:\\source/', got %s\n", value); - ok(size == 11, "Expected 11, got %d\n", size); - - size = MAX_PATH; - res = RegQueryValueExA(url, "2", NULL, NULL, (LPBYTE)value, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(value, "another/"), "Expected 'another/', got %s\n", value); - ok(size == 9, "Expected 9, got %d\n", size); - - /* add another source, index 1 */ - r = pMsiSourceListAddSourceExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, "third/", 1); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - size = MAX_PATH; - res = RegQueryValueExA(url, "1", NULL, NULL, (LPBYTE)value, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(value, "third/"), "Expected 'third/', got %s\n", value); - ok(size == 7, "Expected 7, got %d\n", size); - - size = MAX_PATH; - res = RegQueryValueExA(url, "2", NULL, NULL, (LPBYTE)value, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(value, "C:\\source/"), "Expected 'C:\\source/', got %s\n", value); - ok(size == 11, "Expected 11, got %d\n", size); - - size = MAX_PATH; - res = RegQueryValueExA(url, "3", NULL, NULL, (LPBYTE)value, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(value, "another/"), "Expected 'another/', got %s\n", value); - ok(size == 9, "Expected 9, got %d\n", size); - - /* add another source, index > N */ - r = pMsiSourceListAddSourceExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, "last/", 5); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - size = MAX_PATH; - res = RegQueryValueExA(url, "1", NULL, NULL, (LPBYTE)value, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(value, "third/"), "Expected 'third/', got %s\n", value); - ok(size == 7, "Expected 7, got %d\n", size); - - size = MAX_PATH; - res = RegQueryValueExA(url, "2", NULL, NULL, (LPBYTE)value, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(value, "C:\\source/"), "Expected 'C:\\source/', got %s\n", value); - ok(size == 11, "Expected 11, got %d\n", size); - - size = MAX_PATH; - res = RegQueryValueExA(url, "3", NULL, NULL, (LPBYTE)value, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(value, "another/"), "Expected 'another/', got %s\n", value); - ok(size == 9, "Expected 9, got %d\n", size); - - size = MAX_PATH; - res = RegQueryValueExA(url, "4", NULL, NULL, (LPBYTE)value, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(value, "last/"), "Expected 'last/', got %s\n", value); - ok(size == 6, "Expected 6, got %d\n", size); - - /* just MSISOURCETYPE_NETWORK */ - r = pMsiSourceListAddSourceExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSISOURCETYPE_NETWORK, "source", 0); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - res = RegOpenKeyA(userkey, "SourceList\\Net", &net); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - size = MAX_PATH; - res = RegQueryValueExA(net, "1", NULL, NULL, (LPBYTE)value, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(value, "source\\"), "Expected 'source\\', got %s\n", value); - ok(size == 8, "Expected 8, got %d\n", size); - - /* just MSISOURCETYPE_URL */ - r = pMsiSourceListAddSourceExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSISOURCETYPE_URL, "source", 0); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - size = MAX_PATH; - res = RegQueryValueExA(url, "1", NULL, NULL, (LPBYTE)value, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(value, "third/"), "Expected 'third/', got %s\n", value); - ok(size == 7, "Expected 7, got %d\n", size); - - size = MAX_PATH; - res = RegQueryValueExA(url, "2", NULL, NULL, (LPBYTE)value, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(value, "C:\\source/"), "Expected 'C:\\source/', got %s\n", value); - ok(size == 11, "Expected 11, got %d\n", size); - - size = MAX_PATH; - res = RegQueryValueExA(url, "3", NULL, NULL, (LPBYTE)value, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(value, "another/"), "Expected 'another/', got %s\n", value); - ok(size == 9, "Expected 9, got %d\n", size); - - size = MAX_PATH; - res = RegQueryValueExA(url, "4", NULL, NULL, (LPBYTE)value, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(value, "last/"), "Expected 'last/', got %s\n", value); - ok(size == 6, "Expected 6, got %d\n", size); - - size = MAX_PATH; - res = RegQueryValueExA(url, "5", NULL, NULL, (LPBYTE)value, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(value, "source/"), "Expected 'source/', got %s\n", value); - ok(size == 8, "Expected 8, got %d\n", size); - - /* NULL szUserSid */ - r = pMsiSourceListAddSourceExA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSISOURCETYPE_NETWORK, "nousersid", 0); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - size = MAX_PATH; - res = RegQueryValueExA(net, "1", NULL, NULL, (LPBYTE)value, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(value, "source\\"), "Expected 'source\\', got %s\n", value); - ok(size == 8, "Expected 8, got %d\n", size); - - size = MAX_PATH; - res = RegQueryValueExA(net, "2", NULL, NULL, (LPBYTE)value, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(value, "nousersid\\"), "Expected 'nousersid\\', got %s\n", value); - ok(size == 11, "Expected 11, got %d\n", size); - - /* invalid options, must have source type */ - r = pMsiSourceListAddSourceExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, "source", 0); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - r = pMsiSourceListAddSourceExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PATCH, "source", 0); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* NULL szSource */ - r = pMsiSourceListAddSourceExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSISOURCETYPE_URL, NULL, 1); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* empty szSource */ - r = pMsiSourceListAddSourceExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSISOURCETYPE_URL, "", 1); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* MSIINSTALLCONTEXT_USERMANAGED, non-NULL szUserSid */ - - r = pMsiSourceListAddSourceExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, "C:\\source", 0); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* product key exists */ - r = pMsiSourceListAddSourceExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, "C:\\source", 0); - ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - - res = RegCreateKeyA(prodkey, "SourceList", &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - RegCloseKey(hkey); - - /* SourceList exists */ - r = pMsiSourceListAddSourceExA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, "C:\\source", 0); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - res = RegOpenKeyA(prodkey, "SourceList\\URL", &url); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - size = MAX_PATH; - res = RegQueryValueExA(url, "1", NULL, NULL, (LPBYTE)value, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(value, "C:\\source/"), "Expected 'C:\\source/', got %s\n", value); - ok(size == 11, "Expected 11, got %d\n", size); - - RegCloseKey(url); - - /* MSIINSTALLCONTEXT_USERMANAGED, NULL szUserSid */ - - r = pMsiSourceListAddSourceExA(prodcode, NULL, - MSIINSTALLCONTEXT_USERMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, "another", 0); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - res = RegOpenKeyA(prodkey, "SourceList\\URL", &url); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - size = MAX_PATH; - res = RegQueryValueExA(url, "1", NULL, NULL, (LPBYTE)value, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(value, "C:\\source/"), "Expected 'C:\\source/', got %s\n", value); - ok(size == 11, "Expected 11, got %d\n", size); - - size = MAX_PATH; - res = RegQueryValueExA(url, "2", NULL, NULL, (LPBYTE)value, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(value, "another/"), "Expected 'another/', got %s\n", value); - ok(size == 9, "Expected 9, got %d\n", size); - - RegCloseKey(url); - RegCloseKey(prodkey); - - /* MSIINSTALLCONTEXT_MACHINE */ - - /* szUserSid must be NULL for MSIINSTALLCONTEXT_MACHINE */ - r = pMsiSourceListAddSourceExA(prodcode, usersid, - MSIINSTALLCONTEXT_MACHINE, - MSICODE_PRODUCT | MSISOURCETYPE_URL, "C:\\source", 0); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - r = pMsiSourceListAddSourceExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - MSICODE_PRODUCT | MSISOURCETYPE_URL, "C:\\source", 0); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* product key exists */ - r = pMsiSourceListAddSourceExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - MSICODE_PRODUCT | MSISOURCETYPE_URL, "C:\\source", 0); - ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - - res = RegCreateKeyA(prodkey, "SourceList", &hkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - RegCloseKey(hkey); - - /* SourceList exists */ - r = pMsiSourceListAddSourceExA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - MSICODE_PRODUCT | MSISOURCETYPE_URL, "C:\\source", 0); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - res = RegOpenKeyA(prodkey, "SourceList\\URL", &url); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - size = MAX_PATH; - res = RegQueryValueExA(url, "1", NULL, NULL, (LPBYTE)value, &size); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - ok(!lstrcmpA(value, "C:\\source/"), "Expected 'C:\\source/', got %s\n", value); - ok(size == 11, "Expected 11, got %d\n", size); - - RegCloseKey(url); - RegCloseKey(prodkey); - HeapFree(GetProcessHeap(), 0, usersid); -} - -static void test_MsiSourceListEnumSources(void) -{ - CHAR prodcode[MAX_PATH]; - CHAR prod_squashed[MAX_PATH]; - CHAR keypath[MAX_PATH*2]; - CHAR value[MAX_PATH]; - LPSTR usersid; - LONG res; - UINT r; - HKEY prodkey, userkey; - HKEY url, net, source; - DWORD size; - - if (!pMsiSourceListEnumSourcesA) - { - win_skip("MsiSourceListEnumSourcesA is not available\n"); - return; - } - - create_test_guid(prodcode, prod_squashed); - if (!get_user_sid(&usersid)) - { - skip("User SID not available -> skipping MsiSourceListEnumSourcesA tests\n"); - return; - } - - /* GetLastError is not set by the function */ - - /* NULL szProductCodeOrPatchCode */ - size = 0xdeadbeef; - r = pMsiSourceListEnumSourcesA(NULL, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(size == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", size); - - /* empty szProductCodeOrPatchCode */ - size = 0xdeadbeef; - r = pMsiSourceListEnumSourcesA("", usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(size == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", size); - - /* garbage szProductCodeOrPatchCode */ - size = 0xdeadbeef; - r = pMsiSourceListEnumSourcesA("garbage", usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(size == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", size); - - /* guid without brackets */ - size = 0xdeadbeef; - r = pMsiSourceListEnumSourcesA("51CD2AD5-0482-4C46-8DDD-0ED1022AA1AA", - usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(size == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", size); - - /* guid with brackets */ - size = 0xdeadbeef; - r = pMsiSourceListEnumSourcesA("{51CD2AD5-0482-4C46-8DDD-0ED1022AA1AA}", - usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(size == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", size); - - /* MSIINSTALLCONTEXT_USERUNMANAGED */ - - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user product key exists */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - res = RegCreateKeyA(userkey, "SourceList", &source); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* SourceList key exists */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - res = RegCreateKeyA(source, "URL", &url); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* URL key exists */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - res = RegSetValueExA(url, "1", 0, REG_SZ, (LPBYTE)"first", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = RegSetValueExA(url, "2", 0, REG_SZ, (LPBYTE)"second", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - res = RegSetValueExA(url, "4", 0, REG_SZ, (LPBYTE)"fourth", 7); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* sources exist */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); - ok(size == 5, "Expected 5, got %d\n", size); - - /* try index 0 again */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); - ok(size == 5, "Expected 5, got %d\n", size); - - /* both szSource and pcchSource are NULL, index 0 */ - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, NULL, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* both szSource and pcchSource are NULL, index 1 */ - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 1, NULL, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* size is exactly 5 */ - size = 5; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got %s\n", value); - ok(size == 5, "Expected 5, got %d\n", size); - - /* szSource is non-NULL while pcchSource is NULL */ - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, NULL); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got %s\n", value); - - /* try index 1 after failure */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 1, value, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - /* reset the enumeration */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); - ok(size == 5, "Expected 5, got %d\n", size); - - /* try index 1 */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 1, value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "second"), "Expected \"second\", got %s\n", value); - ok(size == 6, "Expected 6, got %d\n", size); - - /* try index 1 again */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 1, value, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - /* try index 2 */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 2, value, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - /* try index < 0 */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, -1, value, &size); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - /* NULL szUserSid */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); - ok(size == 5, "Expected 5, got %d\n", size); - - /* invalid dwOptions, must be one of MSICODE_ and MSISOURCETYPE_ */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, value, &size); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - /* invalid dwOptions, must be one of MSICODE_ and MSISOURCETYPE_ */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PATCH, 0, value, &size); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - /* invalid dwOptions, must be one of MSICODE_ and MSISOURCETYPE_ */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSICODE_PATCH | MSISOURCETYPE_URL, - 0, value, &size); - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - /* invalid dwOptions, must be one of MSICODE_ and MSISOURCETYPE_ */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK | MSISOURCETYPE_URL, - 0, value, &size); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - RegDeleteValueA(url, "1"); - RegDeleteValueA(url, "2"); - RegDeleteValueA(url, "4"); - RegDeleteKeyA(url, ""); - RegCloseKey(url); - - /* SourceList key exists */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - res = RegCreateKeyA(source, "Net", &net); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Net key exists */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - res = RegSetValueExA(net, "1", 0, REG_SZ, (LPBYTE)"first", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* sources exist */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); - ok(size == 5, "Expected 5, got %d\n", size); - - RegDeleteValueA(net, "1"); - RegDeleteKeyA(net, ""); - RegCloseKey(net); - RegDeleteKeyA(source, ""); - RegCloseKey(source); - RegDeleteKeyA(userkey, ""); - RegCloseKey(userkey); - - /* MSIINSTALLCONTEXT_USERMANAGED */ - - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user product key exists */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - res = RegCreateKeyA(userkey, "SourceList", &source); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* SourceList key exists */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - res = RegCreateKeyA(source, "URL", &url); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* URL key exists */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - res = RegSetValueExA(url, "1", 0, REG_SZ, (LPBYTE)"first", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* sources exist */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); - ok(size == 5, "Expected 5, got %d\n", size); - - /* NULL szUserSid */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, NULL, - MSIINSTALLCONTEXT_USERMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); - ok(size == 5, "Expected 5, got %d\n", size); - - RegDeleteValueA(url, "1"); - RegDeleteKeyA(url, ""); - RegCloseKey(url); - - /* SourceList key exists */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - res = RegCreateKeyA(source, "Net", &net); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Net key exists */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - res = RegSetValueExA(net, "1", 0, REG_SZ, (LPBYTE)"first", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* sources exist */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); - ok(size == 5, "Expected 5, got %d\n", size); - - RegDeleteValueA(net, "1"); - RegDeleteKeyA(net, ""); - RegCloseKey(net); - RegDeleteKeyA(source, ""); - RegCloseKey(source); - RegDeleteKeyA(userkey, ""); - RegCloseKey(userkey); - - /* MSIINSTALLCONTEXT_MACHINE */ - - /* szUserSid is non-NULL */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, usersid, - MSIINSTALLCONTEXT_MACHINE, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - /* szUserSid is non-NULL */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user product key exists */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - res = RegCreateKeyA(prodkey, "SourceList", &source); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* SourceList key exists */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - res = RegCreateKeyA(source, "URL", &url); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* URL key exists */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - res = RegSetValueExA(url, "1", 0, REG_SZ, (LPBYTE)"first", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* sources exist */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); - ok(size == 5, "Expected 5, got %d\n", size); - - /* NULL szUserSid */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - MSICODE_PRODUCT | MSISOURCETYPE_URL, 0, value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); - ok(size == 5, "Expected 5, got %d\n", size); - - RegDeleteValueA(url, "1"); - RegDeleteKeyA(url, ""); - RegCloseKey(url); - - /* SourceList key exists */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - res = RegCreateKeyA(source, "Net", &net); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Net key exists */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value); - ok(size == MAX_PATH, "Expected MAX_PATH, got %d\n", size); - - res = RegSetValueExA(net, "1", 0, REG_SZ, (LPBYTE)"first", 6); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* sources exist */ - size = MAX_PATH; - lstrcpyA(value, "aaa"); - r = pMsiSourceListEnumSourcesA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, 0, value, &size); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(value, "first"), "Expected \"first\", got %s\n", value); - ok(size == 5, "Expected 5, got %d\n", size); - - RegDeleteValueA(net, "1"); - RegDeleteKeyA(net, ""); - RegCloseKey(net); - RegDeleteKeyA(source, ""); - RegCloseKey(source); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - LocalFree(usersid); -} - -static void test_MsiSourceListSetInfo(void) -{ - CHAR prodcode[MAX_PATH]; - CHAR prod_squashed[MAX_PATH]; - CHAR keypath[MAX_PATH*2]; - HKEY prodkey, userkey; - HKEY net, url, media, source; - LPSTR usersid; - LONG res; - UINT r; - - if (!pMsiSourceListSetInfoA) - { - win_skip("MsiSourceListSetInfoA is not available\n"); - return; - } - - create_test_guid(prodcode, prod_squashed); - if (!get_user_sid(&usersid)) - { - skip("User SID not available -> skipping MsiSourceListSetInfoA tests\n"); - return; - } - - /* GetLastError is not set by the function */ - - /* NULL szProductCodeOrPatchCode */ - r = pMsiSourceListSetInfoA(NULL, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, - INSTALLPROPERTY_MEDIAPACKAGEPATH, "path"); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* empty szProductCodeOrPatchCode */ - r = pMsiSourceListSetInfoA("", usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, - INSTALLPROPERTY_MEDIAPACKAGEPATH, "path"); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* garbage szProductCodeOrPatchCode */ - r = pMsiSourceListSetInfoA("garbage", usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, - INSTALLPROPERTY_MEDIAPACKAGEPATH, "path"); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* guid without brackets */ - r = pMsiSourceListSetInfoA("51CD2AD5-0482-4C46-8DDD-0ED1022AA1AA", - usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, - INSTALLPROPERTY_MEDIAPACKAGEPATH, "path"); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* guid with brackets */ - r = pMsiSourceListSetInfoA("{51CD2AD5-0482-4C46-8DDD-0ED1022AA1AA}", - usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, - INSTALLPROPERTY_MEDIAPACKAGEPATH, "path"); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - - /* dwOptions is MSICODE_PRODUCT */ - r = pMsiSourceListSetInfoA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, - INSTALLPROPERTY_MEDIAPACKAGEPATH, "path"); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - - /* dwOptions is MSICODE_PATCH */ - r = pMsiSourceListSetInfoA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PATCH, - INSTALLPROPERTY_MEDIAPACKAGEPATH, "path"); - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r); - - /* dwOptions is both MSICODE_PRODUCT and MSICODE_PATCH */ - r = pMsiSourceListSetInfoA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSICODE_PATCH | MSISOURCETYPE_URL, - INSTALLPROPERTY_MEDIAPACKAGEPATH, "path"); - ok(r == ERROR_UNKNOWN_PATCH, "Expected ERROR_UNKNOWN_PATCH, got %d\n", r); - - /* dwOptions has both MSISOURCETYPE_NETWORK and MSISOURCETYPE_URL */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK | MSISOURCETYPE_URL, - INSTALLPROPERTY_MEDIAPACKAGEPATH, "path"); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - - /* LastUsedSource and dwOptions has both - * MSISOURCETYPE_NETWORK and MSISOURCETYPE_URL - */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK | MSISOURCETYPE_URL, - INSTALLPROPERTY_LASTUSEDSOURCE, "path"); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - - /* LastUsedSource and dwOptions has no source type */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, - INSTALLPROPERTY_LASTUSEDSOURCE, "path"); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - - /* MSIINSTALLCONTEXT_USERUNMANAGED */ - - lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user product key exists */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, - INSTALLPROPERTY_MEDIAPACKAGEPATH, "path"); - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - - res = RegCreateKeyA(userkey, "SourceList", &source); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* SourceList key exists, no source type */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, - INSTALLPROPERTY_MEDIAPACKAGEPATH, "path"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* Media key is created by MsiSourceListSetInfo */ - res = RegOpenKeyA(source, "Media", &media); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - CHECK_REG_STR(media, "MediaPackage", "path"); - - /* set the info again */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, - INSTALLPROPERTY_MEDIAPACKAGEPATH, "path2"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - CHECK_REG_STR(media, "MediaPackage", "path2"); - - /* NULL szProperty */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, - NULL, "path"); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* empty szProperty */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, - "", "path"); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - - /* NULL szValue */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, - INSTALLPROPERTY_MEDIAPACKAGEPATH, NULL); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - - /* empty szValue */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, - INSTALLPROPERTY_MEDIAPACKAGEPATH, ""); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - CHECK_REG_STR(media, "MediaPackage", ""); - - /* INSTALLPROPERTY_MEDIAPACKAGEPATH, MSISOURCETYPE_NETWORK */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, - INSTALLPROPERTY_MEDIAPACKAGEPATH, "path"); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* INSTALLPROPERTY_MEDIAPACKAGEPATH, MSISOURCETYPE_URL */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, - INSTALLPROPERTY_MEDIAPACKAGEPATH, "path"); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* INSTALLPROPERTY_DISKPROMPT */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, - INSTALLPROPERTY_DISKPROMPT, "prompt"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - CHECK_REG_STR(media, "DiskPrompt", "prompt"); - - /* INSTALLPROPERTY_DISKPROMPT, MSISOURCETYPE_NETWORK */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, - INSTALLPROPERTY_DISKPROMPT, "prompt"); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* INSTALLPROPERTY_DISKPROMPT, MSISOURCETYPE_URL */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, - INSTALLPROPERTY_DISKPROMPT, "prompt"); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* INSTALLPROPERTY_LASTUSEDSOURCE */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, - INSTALLPROPERTY_LASTUSEDSOURCE, "source"); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* INSTALLPROPERTY_LASTUSEDSOURCE, MSISOURCETYPE_NETWORK */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, - INSTALLPROPERTY_LASTUSEDSOURCE, "source"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* Net key is created by MsiSourceListSetInfo */ - res = RegOpenKeyA(source, "Net", &net); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - CHECK_REG_STR(net, "1", "source\\") - CHECK_REG_STR(source, "LastUsedSource", "n;1;source"); - - /* source has forward slash */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, - INSTALLPROPERTY_LASTUSEDSOURCE, "source/"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - CHECK_REG_STR(net, "1", "source\\"); - CHECK_REG_STR(net, "2", "source/\\"); - CHECK_REG_STR(source, "LastUsedSource", "n;2;source/"); - - /* INSTALLPROPERTY_LASTUSEDSOURCE, MSISOURCETYPE_URL */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, - INSTALLPROPERTY_LASTUSEDSOURCE, "source"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* URL key is created by MsiSourceListSetInfo */ - res = RegOpenKeyA(source, "URL", &url); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - CHECK_REG_STR(url, "1", "source/"); - CHECK_REG_STR(source, "LastUsedSource", "u;1;source"); - - /* source has backslash */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, - INSTALLPROPERTY_LASTUSEDSOURCE, "source\\"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - CHECK_REG_STR(url, "1", "source/"); - CHECK_REG_STR(url, "2", "source\\/"); - CHECK_REG_STR(source, "LastUsedSource", "u;2;source\\"); - - /* INSTALLPROPERTY_LASTUSEDSOURCE, MSISOURCETYPE_MEDIA */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_MEDIA, - INSTALLPROPERTY_LASTUSEDSOURCE, "source"); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* INSTALLPROPERTY_PACKAGENAME */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, - INSTALLPROPERTY_PACKAGENAME, "name"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - CHECK_REG_STR(source, "PackageName", "name"); - - /* INSTALLPROPERTY_PACKAGENAME, MSISOURCETYPE_NETWORK */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, - INSTALLPROPERTY_PACKAGENAME, "name"); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* INSTALLPROPERTY_PACKAGENAME, MSISOURCETYPE_URL */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, - INSTALLPROPERTY_PACKAGENAME, "name"); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* INSTALLPROPERTY_LASTUSEDTYPE */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, - INSTALLPROPERTY_LASTUSEDTYPE, "type"); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - - /* definitely unknown property */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, - "unknown", "val"); - ok(r == ERROR_UNKNOWN_PROPERTY, - "Expected ERROR_UNKNOWN_PROPERTY, got %d\n", r); - - RegDeleteValueA(net, "1"); - RegDeleteKeyA(net, ""); - RegCloseKey(net); - RegDeleteValueA(url, "1"); - RegDeleteKeyA(url, ""); - RegCloseKey(url); - RegDeleteValueA(media, "MediaPackage"); - RegDeleteValueA(media, "DiskPrompt"); - RegDeleteKeyA(media, ""); - RegCloseKey(media); - RegDeleteValueA(source, "PackageName"); - RegDeleteKeyA(source, ""); - RegCloseKey(source); - RegDeleteKeyA(userkey, ""); - RegCloseKey(userkey); - - /* MSIINSTALLCONTEXT_USERMANAGED */ - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user product key exists */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERMANAGED, MSICODE_PRODUCT, - INSTALLPROPERTY_MEDIAPACKAGEPATH, "path"); - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - - res = RegCreateKeyA(userkey, "SourceList", &source); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* SourceList key exists, no source type */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_USERMANAGED, MSICODE_PRODUCT, - INSTALLPROPERTY_MEDIAPACKAGEPATH, "path"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* Media key is created by MsiSourceListSetInfo */ - res = RegOpenKeyA(source, "Media", &media); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - CHECK_REG_STR(media, "MediaPackage", "path"); - - RegDeleteValueA(media, "MediaPackage"); - RegDeleteKeyA(media, ""); - RegCloseKey(media); - RegDeleteKeyA(source, ""); - RegCloseKey(source); - RegDeleteKeyA(userkey, ""); - RegCloseKey(userkey); - - /* MSIINSTALLCONTEXT_MACHINE */ - - lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user product key exists */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, MSICODE_PRODUCT, - INSTALLPROPERTY_MEDIAPACKAGEPATH, "path"); - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - - res = RegCreateKeyA(prodkey, "SourceList", &source); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* SourceList key exists, no source type */ - r = pMsiSourceListSetInfoA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, MSICODE_PRODUCT, - INSTALLPROPERTY_MEDIAPACKAGEPATH, "path"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* Media key is created by MsiSourceListSetInfo */ - res = RegOpenKeyA(source, "Media", &media); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - CHECK_REG_STR(media, "MediaPackage", "path"); - - /* szUserSid is non-NULL */ - r = pMsiSourceListSetInfoA(prodcode, usersid, - MSIINSTALLCONTEXT_MACHINE, MSICODE_PRODUCT, - INSTALLPROPERTY_MEDIAPACKAGEPATH, "path"); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - RegDeleteValueA(media, "MediaPackage"); - RegDeleteKeyA(media, ""); - RegCloseKey(media); - RegDeleteKeyA(source, ""); - RegCloseKey(source); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - LocalFree(usersid); -} - -static void test_MsiSourceListAddMediaDisk(void) -{ - CHAR prodcode[MAX_PATH]; - CHAR prod_squashed[MAX_PATH]; - CHAR keypath[MAX_PATH*2]; - HKEY prodkey, userkey; - HKEY media, source; - LPSTR usersid; - LONG res; - UINT r; - - if (!pMsiSourceListAddMediaDiskA) - { - win_skip("MsiSourceListAddMediaDiskA is not available\n"); - return; - } - - create_test_guid(prodcode, prod_squashed); - if (!get_user_sid(&usersid)) - { - skip("User SID not available -> skipping MsiSourceListAddMediaDiskA tests\n"); - return; - } - - /* GetLastError is not set by the function */ - - /* NULL szProductCodeOrPatchCode */ - r = pMsiSourceListAddMediaDiskA(NULL, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 1, "label", "prompt"); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* empty szProductCodeOrPatchCode */ - r = pMsiSourceListAddMediaDiskA("", usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 1, "label", "prompt"); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* garbage szProductCodeOrPatchCode */ - r = pMsiSourceListAddMediaDiskA("garbage", usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 1, "label", "prompt"); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* guid without brackets */ - r = pMsiSourceListAddMediaDiskA("51CD2AD5-0482-4C46-8DDD-0ED1022AA1AA", - usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 1, "label", "prompt"); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* guid with brackets */ - r = pMsiSourceListAddMediaDiskA("{51CD2AD5-0482-4C46-8DDD-0ED1022AA1AA}", - usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 1, "label", "prompt"); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - - /* dwOptions has MSISOURCETYPE_NETWORK */ - r = pMsiSourceListAddMediaDiskA("{51CD2AD5-0482-4C46-8DDD-0ED1022AA1AA}", - usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, - 1, "label", "prompt"); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* dwOptions has MSISOURCETYPE_URL */ - r = pMsiSourceListAddMediaDiskA("{51CD2AD5-0482-4C46-8DDD-0ED1022AA1AA}", - usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, - 1, "label", "prompt"); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* dwOptions has MSISOURCETYPE_MEDIA */ - r = pMsiSourceListAddMediaDiskA("{51CD2AD5-0482-4C46-8DDD-0ED1022AA1AA}", - usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_MEDIA, - 1, "label", "prompt"); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* MSIINSTALLCONTEXT_USERUNMANAGED */ - - lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user product key exists */ - r = pMsiSourceListAddMediaDiskA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 1, "label", "prompt"); - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - - res = RegCreateKeyA(userkey, "SourceList", &source); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* SourceList key exists */ - r = pMsiSourceListAddMediaDiskA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 1, "label", "prompt"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* Media subkey is created by MsiSourceListAddMediaDisk */ - res = RegOpenKeyA(source, "Media", &media); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_REG_STR(media, "1", "label;prompt"); - - /* dwDiskId is random */ - r = pMsiSourceListAddMediaDiskA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 42, "label42", "prompt42"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - CHECK_REG_STR(media, "1", "label;prompt"); - CHECK_REG_STR(media, "42", "label42;prompt42"); - - /* dwDiskId is 0 */ - r = pMsiSourceListAddMediaDiskA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, "label0", "prompt0"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - CHECK_REG_STR(media, "0", "label0;prompt0"); - CHECK_REG_STR(media, "1", "label;prompt"); - CHECK_REG_STR(media, "42", "label42;prompt42"); - - /* dwDiskId is < 0 */ - r = pMsiSourceListAddMediaDiskA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, -1, "label-1", "prompt-1"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - CHECK_REG_STR(media, "-1", "label-1;prompt-1"); - CHECK_REG_STR(media, "0", "label0;prompt0"); - CHECK_REG_STR(media, "1", "label;prompt"); - CHECK_REG_STR(media, "42", "label42;prompt42"); - - /* update dwDiskId 1 */ - r = pMsiSourceListAddMediaDiskA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 1, "newlabel", "newprompt"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - CHECK_REG_STR(media, "-1", "label-1;prompt-1"); - CHECK_REG_STR(media, "0", "label0;prompt0"); - CHECK_REG_STR(media, "1", "newlabel;newprompt"); - CHECK_REG_STR(media, "42", "label42;prompt42"); - - /* update dwDiskId 1, szPrompt is NULL */ - r = pMsiSourceListAddMediaDiskA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 1, "etiqueta", NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - CHECK_REG_STR(media, "-1", "label-1;prompt-1"); - CHECK_REG_STR(media, "0", "label0;prompt0"); - CHECK_REG_STR(media, "1", "etiqueta;"); - CHECK_REG_STR(media, "42", "label42;prompt42"); - - /* update dwDiskId 1, szPrompt is empty */ - r = pMsiSourceListAddMediaDiskA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 1, "etikett", ""); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* update dwDiskId 1, szVolumeLabel is NULL */ - r = pMsiSourceListAddMediaDiskA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 1, NULL, "provocar"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - CHECK_REG_STR(media, "-1", "label-1;prompt-1"); - CHECK_REG_STR(media, "0", "label0;prompt0"); - CHECK_REG_STR(media, "1", ";provocar"); - CHECK_REG_STR(media, "42", "label42;prompt42"); - - /* update dwDiskId 1, szVolumeLabel is empty */ - r = pMsiSourceListAddMediaDiskA(prodcode, usersid, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 1, "", "provoquer"); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* szUserSid is NULL */ - r = pMsiSourceListAddMediaDiskA(prodcode, NULL, - MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 1, NULL, "provoquer"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - CHECK_REG_STR(media, "-1", "label-1;prompt-1"); - CHECK_REG_STR(media, "0", "label0;prompt0"); - CHECK_REG_STR(media, "1", ";provoquer"); - CHECK_REG_STR(media, "42", "label42;prompt42"); - - RegDeleteValueA(media, "-1"); - RegDeleteValueA(media, "0"); - RegDeleteValueA(media, "1"); - RegDeleteValueA(media, "42"); - RegDeleteKeyA(media, ""); - RegCloseKey(media); - RegDeleteKeyA(source, ""); - RegCloseKey(source); - RegDeleteKeyA(userkey, ""); - RegCloseKey(userkey); - - /* MSIINSTALLCONTEXT_USERMANAGED */ - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user product key exists */ - r = pMsiSourceListAddMediaDiskA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - MSICODE_PRODUCT, 1, "label", "prompt"); - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - - res = RegCreateKeyA(userkey, "SourceList", &source); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* SourceList key exists */ - r = pMsiSourceListAddMediaDiskA(prodcode, usersid, - MSIINSTALLCONTEXT_USERMANAGED, - MSICODE_PRODUCT, 1, "label", "prompt"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* Media subkey is created by MsiSourceListAddMediaDisk */ - res = RegOpenKeyA(source, "Media", &media); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_REG_STR(media, "1", "label;prompt"); - - RegDeleteValueA(media, "1"); - RegDeleteKeyA(media, ""); - RegCloseKey(media); - RegDeleteKeyA(source, ""); - RegCloseKey(source); - RegDeleteKeyA(userkey, ""); - RegCloseKey(userkey); - - /* MSIINSTALLCONTEXT_MACHINE */ - - lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* machine product key exists */ - r = pMsiSourceListAddMediaDiskA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - MSICODE_PRODUCT, 1, "label", "prompt"); - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - - res = RegCreateKeyA(prodkey, "SourceList", &source); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* SourceList key exists */ - r = pMsiSourceListAddMediaDiskA(prodcode, NULL, - MSIINSTALLCONTEXT_MACHINE, - MSICODE_PRODUCT, 1, "label", "prompt"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* Media subkey is created by MsiSourceListAddMediaDisk */ - res = RegOpenKeyA(source, "Media", &media); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_REG_STR(media, "1", "label;prompt"); - - /* szUserSid is non-NULL */ - r = pMsiSourceListAddMediaDiskA(prodcode, usersid, - MSIINSTALLCONTEXT_MACHINE, - MSICODE_PRODUCT, 1, "label", "prompt"); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - RegDeleteValueA(media, "1"); - RegDeleteKeyA(media, ""); - RegCloseKey(media); - RegDeleteKeyA(source, ""); - RegCloseKey(source); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - LocalFree(usersid); -} - -static void test_MsiSourceListEnumMediaDisks(void) -{ - CHAR prodcode[MAX_PATH]; - CHAR prod_squashed[MAX_PATH]; - CHAR keypath[MAX_PATH*2]; - CHAR label[MAX_PATH]; - CHAR prompt[MAX_PATH]; - HKEY prodkey, userkey; - HKEY media, source; - DWORD labelsz, promptsz; - LPSTR usersid; - DWORD val; - DWORD id; - LONG res; - UINT r; - - if (!pMsiSourceListEnumMediaDisksA) - { - win_skip("MsiSourceListEnumMediaDisksA is not available\n"); - return; - } - - create_test_guid(prodcode, prod_squashed); - if (!get_user_sid(&usersid)) - { - skip("User SID not available -> skipping MsiSourceListEnumMediaDisksA tests\n"); - return; - } - - /* GetLastError is not set by the function */ - - /* NULL szProductCodeOrPatchCode */ - labelsz = sizeof(label); - promptsz = sizeof(prompt); - r = pMsiSourceListEnumMediaDisksA(NULL, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* empty szProductCodeOrPatchCode */ - labelsz = sizeof(label); - promptsz = sizeof(prompt); - r = pMsiSourceListEnumMediaDisksA("", usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* garbage szProductCodeOrPatchCode */ - labelsz = sizeof(label); - promptsz = sizeof(prompt); - r = pMsiSourceListEnumMediaDisksA("garbage", usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* guid without brackets */ - labelsz = sizeof(label); - promptsz = sizeof(prompt); - r = pMsiSourceListEnumMediaDisksA("51CD2AD5-0482-4C46-8DDD-0ED1022AA1AA", - usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* guid with brackets */ - labelsz = sizeof(label); - promptsz = sizeof(prompt); - r = pMsiSourceListEnumMediaDisksA("{51CD2AD5-0482-4C46-8DDD-0ED1022AA1AA}", - usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_UNKNOWN_PRODUCT, - "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - - /* dwOptions has MSISOURCETYPE_NETWORK */ - labelsz = sizeof(label); - promptsz = sizeof(prompt); - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_NETWORK, - 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* dwOptions has MSISOURCETYPE_URL */ - labelsz = sizeof(label); - promptsz = sizeof(prompt); - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT | MSISOURCETYPE_URL, - 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* dwIndex is non-zero */ - labelsz = sizeof(label); - promptsz = sizeof(prompt); - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 1, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* MSIINSTALLCONTEXT_USERUNMANAGED */ - - lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user product key exists */ - labelsz = sizeof(label); - promptsz = sizeof(prompt); - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - - res = RegCreateKeyA(userkey, "SourceList", &source); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* SourceList key exists */ - id = 0xbeef; - lstrcpyA(label, "aaa"); - labelsz = 0xdeadbeef; - lstrcpyA(prompt, "bbb"); - promptsz = 0xdeadbeef; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_NO_MORE_ITEMS, - "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id); - ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label); - ok(labelsz == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt); - ok(promptsz == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", promptsz); - - res = RegCreateKeyA(source, "Media", &media); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Media key exists */ - id = 0xbeef; - lstrcpyA(label, "aaa"); - labelsz = 0xdeadbeef; - lstrcpyA(prompt, "bbb"); - promptsz = 0xdeadbeef; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_NO_MORE_ITEMS, - "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id); - ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label); - ok(labelsz == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt); - ok(promptsz == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", promptsz); - - res = RegSetValueExA(media, "1", 0, REG_SZ, (LPBYTE)"label;prompt", 13); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* disk exists */ - id = 0; - lstrcpyA(label, "aaa"); - labelsz = MAX_PATH; - lstrcpyA(prompt, "bbb"); - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(id == 1, "Expected 1, got %d\n", id); - ok(!lstrcmpA(label, "label"), "Expected \"label\", got \"%s\"\n", label); - ok(labelsz == 5, "Expected 5, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt); - ok(promptsz == 6, "Expected 6, got %d\n", promptsz); - - res = RegSetValueExA(media, "2", 0, REG_SZ, (LPBYTE)"one;two", 8); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* now disk 2 exists, get the sizes */ - id = 0; - labelsz = MAX_PATH; - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 1, &id, NULL, &labelsz, - NULL, &promptsz); - ok(r == ERROR_SUCCESS || r == ERROR_INVALID_PARAMETER, - "Expected ERROR_SUCCESS or ERROR_INVALID_PARAMETER, got %d\n", r); - if (r == ERROR_SUCCESS) - { - ok(id == 2, "Expected 2, got %d\n", id); - ok(labelsz == 3, "Expected 3, got %d\n", labelsz); - ok(promptsz == 3, "Expected 3, got %d\n", promptsz); - } - - /* now fill in the values */ - id = 0xbeef; - lstrcpyA(label, "aaa"); - labelsz = MAX_PATH; - lstrcpyA(prompt, "bbb"); - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 1, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_SUCCESS || r == ERROR_INVALID_PARAMETER, - "Expected ERROR_SUCCESS or ERROR_INVALID_PARAMETER, got %d\n", r); - if (r == ERROR_SUCCESS) - { - ok(id == 2, "Expected 2, got %d\n", id); - ok(!lstrcmpA(label, "one"), "Expected \"one\", got \"%s\"\n", label); - ok(labelsz == 3, "Expected 3, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "two"), "Expected \"two\", got \"%s\"\n", prompt); - ok(promptsz == 3, "Expected 3, got %d\n", promptsz); - } - else if (r == ERROR_INVALID_PARAMETER) - { - ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id); - ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label); - ok(labelsz == MAX_PATH, "Expected MAX_PATH, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt); - ok(promptsz == MAX_PATH, "Expected MAX_PATH, got %d\n", promptsz); - } - - res = RegSetValueExA(media, "4", 0, REG_SZ, (LPBYTE)"three;four", 11); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* disks 1, 2, 4 exist, reset the enumeration */ - id = 0; - lstrcpyA(label, "aaa"); - labelsz = MAX_PATH; - lstrcpyA(prompt, "bbb"); - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(id == 1, "Expected 1, got %d\n", id); - ok(!lstrcmpA(label, "label"), "Expected \"label\", got \"%s\"\n", label); - ok(labelsz == 5, "Expected 5, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt); - ok(promptsz == 6, "Expected 6, got %d\n", promptsz); - - /* disks 1, 2, 4 exist, index 1 */ - id = 0; - lstrcpyA(label, "aaa"); - labelsz = MAX_PATH; - lstrcpyA(prompt, "bbb"); - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 1, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(id == 2, "Expected 2, got %d\n", id); - ok(!lstrcmpA(label, "one"), "Expected \"one\", got \"%s\"\n", label); - ok(labelsz == 3, "Expected 3, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "two"), "Expected \"two\", got \"%s\"\n", prompt); - ok(promptsz == 3, "Expected 3, got %d\n", promptsz); - - /* disks 1, 2, 4 exist, index 2 */ - id = 0; - lstrcpyA(label, "aaa"); - labelsz = MAX_PATH; - lstrcpyA(prompt, "bbb"); - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 2, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(id == 4, "Expected 4, got %d\n", id); - ok(!lstrcmpA(label, "three"), "Expected \"three\", got \"%s\"\n", label); - ok(labelsz == 5, "Expected 5, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "four"), "Expected \"four\", got \"%s\"\n", prompt); - ok(promptsz == 4, "Expected 4, got %d\n", promptsz); - - /* disks 1, 2, 4 exist, index 3, invalid */ - id = 0xbeef; - lstrcpyA(label, "aaa"); - labelsz = MAX_PATH; - lstrcpyA(prompt, "bbb"); - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 3, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_NO_MORE_ITEMS, - "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id); - ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label); - ok(labelsz == MAX_PATH, "Expected MAX_PATH, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt); - ok(promptsz == MAX_PATH, "Expected MAX_PATH, got %d\n", promptsz); - - /* disks 1, 2, 4 exist, reset the enumeration */ - id = 0; - lstrcpyA(label, "aaa"); - labelsz = MAX_PATH; - lstrcpyA(prompt, "bbb"); - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(id == 1, "Expected 1, got %d\n", id); - ok(!lstrcmpA(label, "label"), "Expected \"label\", got \"%s\"\n", label); - ok(labelsz == 5, "Expected 5, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt); - ok(promptsz == 6, "Expected 6, got %d\n", promptsz); - - /* try index 0 again */ - id = 0; - lstrcpyA(label, "aaa"); - labelsz = MAX_PATH; - lstrcpyA(prompt, "bbb"); - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(id == 1, "Expected 1, got %d\n", id); - ok(!lstrcmpA(label, "label"), "Expected \"label\", got \"%s\"\n", label); - ok(labelsz == 5, "Expected 5, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt); - ok(promptsz == 6, "Expected 6, got %d\n", promptsz); - - /* jump to index 2 */ - id = 0xbeef; - lstrcpyA(label, "aaa"); - labelsz = MAX_PATH; - lstrcpyA(prompt, "bbb"); - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 2, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id); - ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label); - ok(labelsz == MAX_PATH, "Expected MAX_PATH, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt); - ok(promptsz == MAX_PATH, "Expected MAX_PATH, got %d\n", promptsz); - - /* after error, try index 1 */ - id = 0xbeef; - lstrcpyA(label, "aaa"); - labelsz = MAX_PATH; - lstrcpyA(prompt, "bbb"); - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 1, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(id == 2, "Expected 2, got %d\n", id); - ok(!lstrcmpA(label, "one"), "Expected \"one\", got \"%s\"\n", label); - ok(labelsz == 3, "Expected 3, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "two"), "Expected \"two\", got \"%s\"\n", prompt); - ok(promptsz == 3, "Expected 3, got %d\n", promptsz); - - /* try index 1 again */ - id = 0xbeef; - lstrcpyA(label, "aaa"); - labelsz = MAX_PATH; - lstrcpyA(prompt, "bbb"); - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 1, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id); - ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label); - ok(labelsz == MAX_PATH, "Expected MAX_PATH, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt); - ok(promptsz == MAX_PATH, "Expected MAX_PATH, got %d\n", promptsz); - - /* NULL pdwDiskId */ - lstrcpyA(label, "aaa"); - labelsz = MAX_PATH; - lstrcpyA(prompt, "bbb"); - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, NULL, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmpA(label, "label"), "Expected \"label\", got \"%s\"\n", label); - ok(labelsz == 5, "Expected 5, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt); - ok(promptsz == 6, "Expected 6, got %d\n", promptsz); - - /* szVolumeLabel is NULL */ - id = 0; - labelsz = MAX_PATH; - lstrcpyA(prompt, "bbb"); - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, &id, NULL, &labelsz, - prompt, &promptsz); - ok(r == ERROR_SUCCESS || r == ERROR_INVALID_PARAMETER, - "Expected ERROR_SUCCESS or ERROR_INVALID_PARAMETER, got %d\n", r); - if (r == ERROR_SUCCESS) - { - ok(id == 1, "Expected 1, got %d\n", id); - ok(labelsz == 5, "Expected 5, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt); - ok(promptsz == 6, "Expected 6, got %d\n", promptsz); - } - - /* szVolumeLabel and pcchVolumeLabel are NULL */ - id = 0; - lstrcpyA(prompt, "bbb"); - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, &id, NULL, NULL, - prompt, &promptsz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(id == 1, "Expected 1, got %d\n", id); - ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt); - ok(promptsz == 6, "Expected 6, got %d\n", promptsz); - - /* szVolumeLabel is non-NULL while pcchVolumeLabel is NULL */ - id = 0xbeef; - lstrcpyA(label, "aaa"); - lstrcpyA(prompt, "bbb"); - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, &id, label, NULL, - prompt, &promptsz); - ok(r == ERROR_SUCCESS || r == ERROR_INVALID_PARAMETER, - "Expected ERROR_SUCCESS or ERROR_INVALID_PARAMETER, got %d\n", r); - if (r == ERROR_SUCCESS) - { - ok(id == 1, "Expected 1, got %d\n", id); - ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label); - ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt); - ok(promptsz == 6, "Expected 6, got %d\n", promptsz); - } - - /* szDiskPrompt is NULL */ - id = 0; - lstrcpyA(label, "aaa"); - labelsz = MAX_PATH; - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - NULL, &promptsz); - ok(r == ERROR_SUCCESS || r == ERROR_INVALID_PARAMETER, "Expected ERROR_SUCCESS, got %d\n", r); - if (r == ERROR_SUCCESS) - { - ok(id == 1, "Expected 1, got %d\n", id); - ok(!lstrcmpA(label, "label"), "Expected \"label\", got \"%s\"\n", label); - ok(labelsz == 5, "Expected 5, got %d\n", labelsz); - ok(promptsz == 6, "Expected 6, got %d\n", promptsz); - } - - /* szDiskPrompt and pcchDiskPrompt are NULL */ - id = 0; - lstrcpyA(label, "aaa"); - labelsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - NULL, NULL); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(id == 1, "Expected 1, got %d\n", id); - ok(!lstrcmpA(label, "label"), "Expected \"label\", got \"%s\"\n", label); - ok(labelsz == 5, "Expected 5, got %d\n", labelsz); - - /* szDiskPrompt is non-NULL while pcchDiskPrompt is NULL */ - id = 0xbeef; - lstrcpyA(label, "aaa"); - labelsz = MAX_PATH; - lstrcpyA(prompt, "bbb"); - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, NULL); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id); - ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label); - ok(labelsz == MAX_PATH, "Expected MAX_PATH, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt); - - /* pcchVolumeLabel is exactly 5 */ - lstrcpyA(label, "aaa"); - labelsz = 5; - lstrcpyA(prompt, "bbb"); - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, NULL, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r); - ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label); - ok(labelsz == 5, "Expected 5, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt); - ok(promptsz == 6, "Expected 6, got %d\n", promptsz); - - /* pcchDiskPrompt is exactly 6 */ - lstrcpyA(label, "aaa"); - labelsz = MAX_PATH; - lstrcpyA(prompt, "bbb"); - promptsz = 6; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, NULL, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r); - ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label); - ok(labelsz == 5, "Expected 5, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt); - ok(promptsz == 6, "Expected 6, got %d\n", promptsz); - - res = RegSetValueExA(media, "1", 0, REG_SZ, (LPBYTE)"label", 13); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* no semicolon */ - id = 0; - lstrcpyA(label, "aaa"); - labelsz = MAX_PATH; - lstrcpyA(prompt, "bbb"); - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(id == 1, "Expected 1, got %d\n", id); - ok(!lstrcmpA(label, "label"), "Expected \"label\", got \"%s\"\n", label); - ok(labelsz == 5, "Expected 5, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "label"), "Expected \"label\", got \"%s\"\n", prompt); - ok(promptsz == 5, "Expected 5, got %d\n", promptsz); - - res = RegSetValueExA(media, "1", 0, REG_SZ, (LPBYTE)"label;", 13); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* semicolon, no disk prompt */ - id = 0; - lstrcpyA(label, "aaa"); - labelsz = MAX_PATH; - lstrcpyA(prompt, "bbb"); - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(id == 1, "Expected 1, got %d\n", id); - ok(!lstrcmpA(label, "label"), "Expected \"label\", got \"%s\"\n", label); - ok(labelsz == 5, "Expected 5, got %d\n", labelsz); - ok(!lstrcmpA(prompt, ""), "Expected \"\", got \"%s\"\n", prompt); - ok(promptsz == 0, "Expected 0, got %d\n", promptsz); - - res = RegSetValueExA(media, "1", 0, REG_SZ, (LPBYTE)";prompt", 13); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* semicolon, label doesn't exist */ - id = 0; - lstrcpyA(label, "aaa"); - labelsz = MAX_PATH; - lstrcpyA(prompt, "bbb"); - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(id == 1, "Expected 1, got %d\n", id); - ok(!lstrcmpA(label, ""), "Expected \"\", got \"%s\"\n", label); - ok(labelsz == 0, "Expected 0, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt); - ok(promptsz == 6, "Expected 6, got %d\n", promptsz); - - res = RegSetValueExA(media, "1", 0, REG_SZ, (LPBYTE)";", 13); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* semicolon, neither label nor disk prompt exist */ - id = 0; - lstrcpyA(label, "aaa"); - labelsz = MAX_PATH; - lstrcpyA(prompt, "bbb"); - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(id == 1, "Expected 1, got %d\n", id); - ok(!lstrcmpA(label, ""), "Expected \"\", got \"%s\"\n", label); - ok(labelsz == 0, "Expected 0, got %d\n", labelsz); - ok(!lstrcmpA(prompt, ""), "Expected \"\", got \"%s\"\n", prompt); - ok(promptsz == 0, "Expected 0, got %d\n", promptsz); - - val = 42; - res = RegSetValueExA(media, "1", 0, REG_DWORD, (LPBYTE)&val, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* type is REG_DWORD */ - id = 0; - lstrcpyA(label, "aaa"); - labelsz = MAX_PATH; - lstrcpyA(prompt, "bbb"); - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(id == 1, "Expected 1, got %d\n", id); - ok(!lstrcmpA(label, "#42"), "Expected \"#42\", got \"%s\"\n", label); - ok(labelsz == 3, "Expected 3, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "#42"), "Expected \"#42\", got \"%s\"\n", prompt); - ok(promptsz == 3, "Expected 3, got %d\n", promptsz); - - RegDeleteValueA(media, "1"); - RegDeleteValueA(media, "2"); - RegDeleteValueA(media, "4"); - RegDeleteKeyA(media, ""); - RegCloseKey(media); - RegDeleteKeyA(source, ""); - RegCloseKey(source); - RegDeleteKeyA(userkey, ""); - RegCloseKey(userkey); - - /* MSIINSTALLCONTEXT_USERMANAGED */ - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user product key exists */ - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - - res = RegCreateKeyA(userkey, "SourceList", &source); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* SourceList key exists */ - id = 0xbeef; - lstrcpyA(label, "aaa"); - labelsz = 0xdeadbeef; - lstrcpyA(prompt, "bbb"); - promptsz = 0xdeadbeef; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_NO_MORE_ITEMS, - "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id); - ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label); - ok(labelsz == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt); - ok(promptsz == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", promptsz); - - res = RegCreateKeyA(source, "Media", &media); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Media key exists */ - id = 0xbeef; - lstrcpyA(label, "aaa"); - labelsz = 0xdeadbeef; - lstrcpyA(prompt, "bbb"); - promptsz = 0xdeadbeef; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_NO_MORE_ITEMS, - "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id); - ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label); - ok(labelsz == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt); - ok(promptsz == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", promptsz); - - res = RegSetValueExA(media, "2", 0, REG_SZ, (LPBYTE)"label;prompt", 13); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* disk exists, but no id 1 */ - id = 0; - lstrcpyA(label, "aaa"); - labelsz = MAX_PATH; - lstrcpyA(prompt, "bbb"); - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_USERMANAGED, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(id == 2, "Expected 2, got %d\n", id); - ok(!lstrcmpA(label, "label"), "Expected \"label\", got \"%s\"\n", label); - ok(labelsz == 5, "Expected 5, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt); - ok(promptsz == 6, "Expected 6, got %d\n", promptsz); - - RegDeleteValueA(media, "2"); - RegDeleteKeyA(media, ""); - RegCloseKey(media); - RegDeleteKeyA(source, ""); - RegCloseKey(source); - RegDeleteKeyA(userkey, ""); - RegCloseKey(userkey); - - /* MSIINSTALLCONTEXT_MACHINE */ - - lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* machine product key exists */ - r = pMsiSourceListEnumMediaDisksA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - - res = RegCreateKeyA(prodkey, "SourceList", &source); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* SourceList key exists */ - id = 0xbeef; - lstrcpyA(label, "aaa"); - labelsz = 0xdeadbeef; - lstrcpyA(prompt, "bbb"); - promptsz = 0xdeadbeef; - r = pMsiSourceListEnumMediaDisksA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_NO_MORE_ITEMS, - "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id); - ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label); - ok(labelsz == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt); - ok(promptsz == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", promptsz); - - res = RegCreateKeyA(source, "Media", &media); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* Media key exists */ - id = 0xbeef; - lstrcpyA(label, "aaa"); - labelsz = 0xdeadbeef; - lstrcpyA(prompt, "bbb"); - promptsz = 0xdeadbeef; - r = pMsiSourceListEnumMediaDisksA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_NO_MORE_ITEMS, - "Expected ERROR_NO_MORE_ITEMS, got %d\n", r); - ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id); - ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label); - ok(labelsz == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt); - ok(promptsz == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", promptsz); - - res = RegSetValueExA(media, "2", 0, REG_SZ, (LPBYTE)"label;prompt", 13); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* disk exists, but no id 1 */ - id = 0; - lstrcpyA(label, "aaa"); - labelsz = MAX_PATH; - lstrcpyA(prompt, "bbb"); - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(id == 2, "Expected 2, got %d\n", id); - ok(!lstrcmpA(label, "label"), "Expected \"label\", got \"%s\"\n", label); - ok(labelsz == 5, "Expected 5, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt); - ok(promptsz == 6, "Expected 6, got %d\n", promptsz); - - /* szUserSid is non-NULL */ - id = 0xbeef; - lstrcpyA(label, "aaa"); - labelsz = MAX_PATH; - lstrcpyA(prompt, "bbb"); - promptsz = MAX_PATH; - r = pMsiSourceListEnumMediaDisksA(prodcode, usersid, MSIINSTALLCONTEXT_MACHINE, - MSICODE_PRODUCT, 0, &id, label, &labelsz, - prompt, &promptsz); - ok(r == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id); - ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label); - ok(labelsz == MAX_PATH, "Expected MAX_PATH, got %d\n", labelsz); - ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt); - ok(promptsz == MAX_PATH, "Expected MAX_PATH, got %d\n", promptsz); - - RegDeleteValueA(media, "2"); - RegDeleteKeyA(media, ""); - RegCloseKey(media); - RegDeleteKeyA(source, ""); - RegCloseKey(source); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - LocalFree(usersid); -} - -static void test_MsiSourceListAddSource(void) -{ - CHAR prodcode[MAX_PATH]; - CHAR prod_squashed[MAX_PATH]; - CHAR keypath[MAX_PATH*2]; - CHAR username[MAX_PATH]; - LPSTR usersid, ptr; - LONG res; - UINT r; - HKEY prodkey, userkey; - HKEY net, source; - DWORD size; - - if (!pMsiSourceListAddSourceA) - { - win_skip("Skipping MsiSourceListAddSourceA tests\n"); - return; - } - - create_test_guid(prodcode, prod_squashed); - if (!get_user_sid(&usersid)) - { - skip("User SID not available -> skipping MsiSourceListAddSourceA tests\n"); - return; - } - - /* MACHINENAME\username */ - size = MAX_PATH; - if (pGetUserNameExA != NULL) - pGetUserNameExA(NameSamCompatible, username, &size); - else - { - GetComputerNameA(username, &size); - lstrcatA(username, "\\"); - ptr = username + lstrlenA(username); - size = MAX_PATH - (ptr - username); - GetUserNameA(ptr, &size); - } - trace("username: %s\n", username); - - /* GetLastError is not set by the function */ - - /* NULL szProduct */ - r = pMsiSourceListAddSourceA(NULL, username, 0, "source"); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* empty szProduct */ - r = pMsiSourceListAddSourceA("", username, 0, "source"); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* garbage szProduct */ - r = pMsiSourceListAddSourceA("garbage", username, 0, "source"); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* guid without brackets */ - r = pMsiSourceListAddSourceA("51CD2AD5-0482-4C46-8DDD-0ED1022AA1AA", username, 0, "source"); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* guid with brackets */ - r = pMsiSourceListAddSourceA("{51CD2AD5-0482-4C46-8DDD-0ED1022AA1AA}", username, 0, "source"); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - - /* dwReserved is not 0 */ - r = pMsiSourceListAddSourceA(prodcode, username, 42, "source"); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* szSource is NULL */ - r = pMsiSourceListAddSourceA(prodcode, username, 0, NULL); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* szSource is empty */ - r = pMsiSourceListAddSourceA(prodcode, username, 0, ""); - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - - /* MSIINSTALLCONTEXT_USERMANAGED */ - - r = pMsiSourceListAddSourceA(prodcode, username, 0, "source"); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - - lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\"); - lstrcatA(keypath, usersid); - lstrcatA(keypath, "\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user product key exists */ - r = pMsiSourceListAddSourceA(prodcode, username, 0, "source"); - ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - - res = RegCreateKeyA(userkey, "SourceList", &source); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* SourceList key exists */ - r = pMsiSourceListAddSourceA(prodcode, username, 0, "source"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* Net key is created */ - res = RegOpenKeyA(source, "Net", &net); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* LastUsedSource does not exist and it is not created */ - res = RegQueryValueExA(source, "LastUsedSource", 0, NULL, NULL, NULL); - ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - - CHECK_REG_STR(net, "1", "source\\"); - - RegDeleteValueA(net, "1"); - RegDeleteKeyA(net, ""); - RegCloseKey(net); - - res = RegSetValueExA(source, "LastUsedSource", 0, REG_SZ, (LPBYTE)"blah", 5); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* LastUsedSource value exists */ - r = pMsiSourceListAddSourceA(prodcode, username, 0, "source"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* Net key is created */ - res = RegOpenKeyA(source, "Net", &net); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_REG_STR(source, "LastUsedSource", "blah"); - CHECK_REG_STR(net, "1", "source\\"); - - RegDeleteValueA(net, "1"); - RegDeleteKeyA(net, ""); - RegCloseKey(net); - - res = RegSetValueExA(source, "LastUsedSource", 0, REG_SZ, (LPBYTE)"5", 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* LastUsedSource is an integer */ - r = pMsiSourceListAddSourceA(prodcode, username, 0, "source"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* Net key is created */ - res = RegOpenKeyA(source, "Net", &net); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_REG_STR(source, "LastUsedSource", "5"); - CHECK_REG_STR(net, "1", "source\\"); - - /* Add a second source, has trailing backslash */ - r = pMsiSourceListAddSourceA(prodcode, username, 0, "another\\"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - CHECK_REG_STR(source, "LastUsedSource", "5"); - CHECK_REG_STR(net, "1", "source\\"); - CHECK_REG_STR(net, "2", "another\\"); - - res = RegSetValueExA(source, "LastUsedSource", 0, REG_SZ, (LPBYTE)"2", 2); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* LastUsedSource is in the source list */ - r = pMsiSourceListAddSourceA(prodcode, username, 0, "third/"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - CHECK_REG_STR(source, "LastUsedSource", "2"); - CHECK_REG_STR(net, "1", "source\\"); - CHECK_REG_STR(net, "2", "another\\"); - CHECK_REG_STR(net, "3", "third/\\"); - - RegDeleteValueA(net, "1"); - RegDeleteValueA(net, "2"); - RegDeleteValueA(net, "3"); - RegDeleteKeyA(net, ""); - RegCloseKey(net); - RegDeleteKeyA(source, ""); - RegCloseKey(source); - RegDeleteKeyA(userkey, ""); - RegCloseKey(userkey); - - /* MSIINSTALLCONTEXT_USERUNMANAGED */ - - r = pMsiSourceListAddSourceA(prodcode, username, 0, "source"); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - - lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &userkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* user product key exists */ - r = pMsiSourceListAddSourceA(prodcode, username, 0, "source"); - ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - - res = RegCreateKeyA(userkey, "SourceList", &source); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* SourceList key exists */ - r = pMsiSourceListAddSourceA(prodcode, username, 0, "source"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* Net key is created */ - res = RegOpenKeyA(source, "Net", &net); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_REG_STR(net, "1", "source\\"); - - RegDeleteValueA(net, "1"); - RegDeleteKeyA(net, ""); - RegCloseKey(net); - RegDeleteKeyA(source, ""); - RegCloseKey(source); - RegDeleteKeyA(userkey, ""); - RegCloseKey(userkey); - - /* MSIINSTALLCONTEXT_MACHINE */ - - r = pMsiSourceListAddSourceA(prodcode, NULL, 0, "source"); - ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); - - lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\"); - lstrcatA(keypath, prod_squashed); - - res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &prodkey); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* machine product key exists */ - r = pMsiSourceListAddSourceA(prodcode, NULL, 0, "source"); - ok(r == ERROR_BAD_CONFIGURATION, "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - - res = RegCreateKeyA(prodkey, "SourceList", &source); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - /* SourceList key exists */ - r = pMsiSourceListAddSourceA(prodcode, NULL, 0, "source"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - /* Net key is created */ - res = RegOpenKeyA(source, "Net", &net); - ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - - CHECK_REG_STR(net, "1", "source\\"); - - /* empty szUserName */ - r = pMsiSourceListAddSourceA(prodcode, "", 0, "another"); - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - - CHECK_REG_STR(net, "1", "source\\"); - CHECK_REG_STR(net, "2", "another\\"); - - RegDeleteValueA(net, "2"); - RegDeleteValueA(net, "1"); - RegDeleteKeyA(net, ""); - RegCloseKey(net); - RegDeleteKeyA(source, ""); - RegCloseKey(source); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - LocalFree(usersid); -} - -START_TEST(source) -{ - init_functionpointers(); - - test_MsiSourceListGetInfo(); - test_MsiSourceListAddSourceEx(); - test_MsiSourceListEnumSources(); - test_MsiSourceListSetInfo(); - test_MsiSourceListAddMediaDisk(); - test_MsiSourceListEnumMediaDisks(); - test_MsiSourceListAddSource(); -} diff --git a/rostests/winetests/msi/suminfo.c b/rostests/winetests/msi/suminfo.c deleted file mode 100644 index a0b225b6bd9..00000000000 --- a/rostests/winetests/msi/suminfo.c +++ /dev/null @@ -1,454 +0,0 @@ -/* - * Copyright (C) 2005 Mike McCormack for CodeWeavers - * - * A test program for MSI database files. - * - * 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 - -#include -#include -#include -#include -#include - -#include "wine/test.h" - -/* - * The following are defined in Windows SDK's msidefs.h - * but that file doesn't exist in the msvc6 header set. - * - * Some are already defined in PropIdl.h - undefine them - */ -#undef PID_DICTIONARY -#undef PID_CODEPAGE -#undef PID_SUBJECT -#undef PID_SECURITY - -#define PID_DICTIONARY 0 -#define PID_CODEPAGE 1 -#define PID_TITLE 2 -#define PID_SUBJECT 3 -#define PID_AUTHOR 4 -#define PID_KEYWORDS 5 -#define PID_COMMENTS 6 -#define PID_TEMPLATE 7 -#define PID_LASTAUTHOR 8 -#define PID_REVNUMBER 9 -#define PID_EDITTINE 10 -#define PID_LASTPRINTED 11 -#define PID_CREATE_DTM 12 -#define PID_LASTSAVE_DTM 13 -#define PID_PAGECOUNT 14 -#define PID_WORDCOUNT 15 -#define PID_CHARCOUNT 16 -#define PID_THUMBNAIL 17 -#define PID_APPNAME 18 -#define PID_SECURITY 19 -#define PID_MSIVERSION PID_PAGECOUNT -#define PID_MSISOURCE PID_WORDCOUNT -#define PID_MSIRESTRICT PID_CHARCOUNT - -const char *msifile = "winetest-suminfo.msi"; -static const WCHAR msifileW[] = { - 'w','i','n','e','t','e','s','t','-','s','u','m','i','n','f','o','.','m','s','i',0 }; - -static void test_suminfo(void) -{ - MSIHANDLE hdb = 0, hsuminfo; - UINT r, count, type; - DWORD sz; - INT val; - FILETIME ft; - char buf[0x10]; - - DeleteFile(msifile); - - /* just MsiOpenDatabase should not create a file */ - r = MsiOpenDatabase(msifile, MSIDBOPEN_CREATE, &hdb); - ok(r == ERROR_SUCCESS, "MsiOpenDatabase failed\n"); - - r = MsiGetSummaryInformation(hdb, NULL, 0, NULL); - ok(r == ERROR_INVALID_PARAMETER, "MsiGetSummaryInformation wrong error\n"); - - r = MsiGetSummaryInformation(hdb, NULL, 0, &hsuminfo); - ok(r == ERROR_SUCCESS, "MsiGetSummaryInformation failed\n"); - - r = MsiSummaryInfoGetPropertyCount(0, NULL); - ok(r == ERROR_INVALID_HANDLE, "getpropcount failed\n"); - - r = MsiSummaryInfoGetPropertyCount(hsuminfo, NULL); - ok(r == ERROR_SUCCESS, "getpropcount failed\n"); - - count = -1; - r = MsiSummaryInfoGetPropertyCount(hsuminfo, &count); - ok(r == ERROR_SUCCESS, "getpropcount failed\n"); - ok(count == 0, "count should be zero\n"); - - r = MsiSummaryInfoGetProperty(hsuminfo, 0, NULL, NULL, NULL, 0, NULL); - ok(r == ERROR_SUCCESS, "getpropcount failed\n"); - - r = MsiSummaryInfoGetProperty(hsuminfo, -1, NULL, NULL, NULL, 0, NULL); - ok(r == ERROR_UNKNOWN_PROPERTY, "MsiSummaryInfoGetProperty wrong error\n"); - - r = MsiSummaryInfoGetProperty(hsuminfo, PID_SECURITY+1, NULL, NULL, NULL, 0, NULL); - ok(r == ERROR_UNKNOWN_PROPERTY, "MsiSummaryInfoGetProperty wrong error\n"); - - type = -1; - r = MsiSummaryInfoGetProperty(hsuminfo, 0, &type, NULL, NULL, 0, NULL); - ok(r == ERROR_SUCCESS, "getpropcount failed\n"); - ok(type == 0, "wrong type\n"); - - type = -1; - val = 1234; - r = MsiSummaryInfoGetProperty(hsuminfo, 0, &type, &val, NULL, 0, NULL); - ok(r == ERROR_SUCCESS, "getpropcount failed\n"); - ok(type == 0, "wrong type\n"); - ok(val == 1234, "wrong val\n"); - - buf[0]='x'; - buf[1]=0; - sz = 0x10; - r = MsiSummaryInfoGetProperty(hsuminfo, PID_REVNUMBER, &type, &val, NULL, buf, &sz); - ok(r == ERROR_SUCCESS, "getpropcount failed\n"); - ok(buf[0]=='x', "cleared buffer\n"); - ok(sz == 0x10, "count wasn't zero\n"); - ok(type == VT_EMPTY, "should be empty\n"); - - r = MsiSummaryInfoSetProperty(hsuminfo, PID_TITLE, VT_LPSTR, 0, NULL, "Mike"); - ok(r == ERROR_FUNCTION_FAILED, "MsiSummaryInfoSetProperty wrong error\n"); - - r = MsiSummaryInfoSetProperty(hsuminfo, PID_TITLE, VT_LPSTR, 1, NULL, "JungAh"); - ok(r == ERROR_FUNCTION_FAILED, "MsiSummaryInfoSetProperty wrong error\n"); - - r = MsiSummaryInfoSetProperty(hsuminfo, PID_TITLE, VT_LPSTR, 1, &ft, "Mike"); - ok(r == ERROR_FUNCTION_FAILED, "MsiSummaryInfoSetProperty wrong error\n"); - - r = MsiSummaryInfoSetProperty(hsuminfo, PID_CODEPAGE, VT_I2, 1, &ft, "JungAh"); - ok(r == ERROR_FUNCTION_FAILED, "MsiSummaryInfoSetProperty wrong error\n"); - - r = MsiCloseHandle(hsuminfo); - ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); - - /* try again with the update count set */ - r = MsiGetSummaryInformation(hdb, NULL, 1, &hsuminfo); - ok(r == ERROR_SUCCESS, "MsiGetSummaryInformation failed\n"); - - r = MsiSummaryInfoSetProperty(hsuminfo, 0, VT_LPSTR, 1, NULL, NULL); - ok(r == ERROR_DATATYPE_MISMATCH, "MsiSummaryInfoSetProperty wrong error\n"); - - r = MsiSummaryInfoSetProperty(hsuminfo, PID_CODEPAGE, VT_LPSTR, 1, NULL, NULL); - ok(r == ERROR_DATATYPE_MISMATCH, "MsiSummaryInfoSetProperty wrong error\n"); - - r = MsiSummaryInfoSetProperty(hsuminfo, PID_TITLE, VT_I4, 0, NULL, "Mike"); - ok(r == ERROR_DATATYPE_MISMATCH, "MsiSummaryInfoSetProperty wrong error\n"); - - r = MsiSummaryInfoSetProperty(hsuminfo, PID_AUTHOR, VT_I4, 0, NULL, "JungAh"); - ok(r == ERROR_DATATYPE_MISMATCH, "MsiSummaryInfoSetProperty wrong error\n"); - - r = MsiSummaryInfoSetProperty(hsuminfo, PID_KEYWORDS, VT_I2, 0, NULL, "Mike"); - ok(r == ERROR_DATATYPE_MISMATCH, "MsiSummaryInfoSetProperty wrong error\n"); - - r = MsiSummaryInfoSetProperty(hsuminfo, PID_COMMENTS, VT_FILETIME, 0, NULL, "JungAh"); - ok(r == ERROR_DATATYPE_MISMATCH, "MsiSummaryInfoSetProperty wrong error\n"); - - r = MsiSummaryInfoSetProperty(hsuminfo, PID_TEMPLATE, VT_I2, 0, NULL, "Mike"); - ok(r == ERROR_DATATYPE_MISMATCH, "MsiSummaryInfoSetProperty wrong error\n"); - - r = MsiSummaryInfoSetProperty(hsuminfo, PID_LASTAUTHOR, VT_LPSTR, 0, NULL, NULL); - ok(r == ERROR_INVALID_PARAMETER, "MsiSummaryInfoSetProperty wrong error\n"); - - r = MsiSummaryInfoSetProperty(hsuminfo, PID_LASTSAVE_DTM, VT_FILETIME, 0, NULL, NULL); - ok(r == ERROR_INVALID_PARAMETER, "MsiSummaryInfoSetProperty wrong error\n"); - - r = MsiSummaryInfoSetProperty(hsuminfo, PID_LASTAUTHOR, VT_LPWSTR, 0, NULL, "h\0i\0\0"); - ok(r == ERROR_DATATYPE_MISMATCH, "MsiSummaryInfoSetProperty wrong error\n"); - - r = MsiSummaryInfoSetProperty(hsuminfo, PID_REVNUMBER, VT_I4, 0, NULL, "Jungah"); - ok(r == ERROR_DATATYPE_MISMATCH, "MsiSummaryInfoSetProperty wrong error\n"); - - r = MsiSummaryInfoSetProperty(hsuminfo, PID_PAGECOUNT, VT_LPSTR, 1, NULL, NULL); - ok(r == ERROR_DATATYPE_MISMATCH, "MsiSummaryInfoSetProperty wrong error\n"); - - r = MsiSummaryInfoSetProperty(hsuminfo, PID_TITLE, VT_LPSTR, 0, NULL, "Mike"); - ok(r == ERROR_SUCCESS, "MsiSummaryInfoSetProperty failed\n"); - - sz = 2; - strcpy(buf,"x"); - r = MsiSummaryInfoGetProperty(hsuminfo, PID_TITLE, &type, NULL, NULL, buf, &sz ); - ok(r == ERROR_MORE_DATA, "MsiSummaryInfoSetProperty failed\n"); - ok(sz == 4, "count was wrong\n"); - ok(type == VT_LPSTR, "type was wrong\n"); - ok(!strcmp(buf,"M"), "buffer was wrong\n"); - - sz = 4; - strcpy(buf,"x"); - r = MsiSummaryInfoGetProperty(hsuminfo, PID_TITLE, &type, NULL, NULL, buf, &sz ); - ok(r == ERROR_MORE_DATA, "MsiSummaryInfoSetProperty failed\n"); - ok(sz == 4, "count was wrong\n"); - ok(type == VT_LPSTR, "type was wrong\n"); - ok(!strcmp(buf,"Mik"), "buffer was wrong\n"); - - r = MsiSummaryInfoSetProperty(hsuminfo, PID_TITLE, VT_LPSTR, 0, NULL, "JungAh"); - ok(r == ERROR_SUCCESS, "MsiSummaryInfoSetProperty failed\n"); - - r = MsiSummaryInfoSetProperty(hsuminfo, PID_CODEPAGE, VT_I2, 1, &ft, "Mike"); - ok(r == ERROR_FUNCTION_FAILED, "MsiSummaryInfoSetProperty wrong error\n"); - - r = MsiCloseHandle(hsuminfo); - ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); - - /* try again with a higher update count */ - r = MsiGetSummaryInformation(hdb, NULL, 10, &hsuminfo); - ok(r == ERROR_SUCCESS, "MsiGetSummaryInformation failed\n"); - - r = MsiSummaryInfoSetProperty(hsuminfo, PID_TITLE, VT_LPSTR, 0, NULL, "JungAh"); - ok(r == ERROR_SUCCESS, "MsiSummaryInfoSetProperty failed\n"); - - r = MsiSummaryInfoSetProperty(hsuminfo, PID_CODEPAGE, VT_LPSTR, 1, NULL, NULL); - ok(r == ERROR_DATATYPE_MISMATCH, "MsiSummaryInfoSetProperty wrong error\n"); - - r = MsiSummaryInfoSetProperty(hsuminfo, PID_CODEPAGE, VT_I2, 1, NULL, NULL); - ok(r == ERROR_SUCCESS, "MsiSummaryInfoSetProperty wrong error\n"); - - r = MsiSummaryInfoSetProperty(hsuminfo, PID_CODEPAGE, VT_I2, 1, &ft, "Mike"); - ok(r == ERROR_SUCCESS, "MsiSummaryInfoSetProperty wrong error\n"); - - r = MsiSummaryInfoSetProperty(hsuminfo, PID_AUTHOR, VT_LPSTR, 1, &ft, "Mike"); - ok(r == ERROR_SUCCESS, "MsiSummaryInfoSetProperty wrong error\n"); - - r = MsiSummaryInfoPersist(hsuminfo); - ok(r == ERROR_SUCCESS, "MsiSummaryInfoPersist failed\n"); - - MsiDatabaseCommit(hdb); - - r = MsiCloseHandle(hsuminfo); - ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); - - r = MsiCloseHandle(hdb); - ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); - - /* filename, non-zero update count */ - MsiGetSummaryInformation(0, msifile, 1, &hsuminfo); - ok(r == ERROR_SUCCESS, "MsiGetSummaryInformation failed\n"); - - r = MsiSummaryInfoSetProperty(hsuminfo, PID_AUTHOR, VT_LPSTR, 1, &ft, "Mike"); - ok(r == ERROR_SUCCESS, "MsiSummaryInfoSetProperty wrong error\n"); - - r = MsiSummaryInfoPersist(hsuminfo); - ok(r == ERROR_SUCCESS, "MsiSummaryInfoPersist failed %u\n", r); - - r = MsiCloseHandle(hsuminfo); - ok(r == ERROR_SUCCESS, "MsiCloseHandle failed %u\n", r); - - /* filename, zero update count */ - MsiGetSummaryInformation(0, msifile, 0, &hsuminfo); - ok(r == ERROR_SUCCESS, "MsiGetSummaryInformation failed %u\n", r); - - r = MsiSummaryInfoSetProperty(hsuminfo, PID_AUTHOR, VT_LPSTR, 1, &ft, "Mike"); - todo_wine ok(r == ERROR_FUNCTION_FAILED, "MsiSummaryInfoSetProperty wrong error, %u\n", r); - - r = MsiSummaryInfoPersist(hsuminfo); - ok(r == ERROR_FUNCTION_FAILED, "MsiSummaryInfoPersist wrong error %u\n", r); - - r = MsiCloseHandle(hsuminfo); - ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); - - r = DeleteFile(msifile); - ok(r, "DeleteFile failed\n"); -} - -static const WCHAR tb[] = { 0x4840, 0x3f7f, 0x4164, 0x422f, 0x4836, 0 }; /* _Tables */ -static const WCHAR sd[] = { 0x4840, 0x3f3f, 0x4577, 0x446c, 0x3b6a, 0x45e4, 0x4824, 0 }; /* _StringData */ -static const WCHAR sp[] = { 0x4840, 0x3f3f, 0x4577, 0x446c, 0x3e6a, 0x44b2, 0x482f, 0 }; /* _StringPool */ - -#define LOSE_CONST(x) ((LPSTR)(UINT_PTR)(x)) - -static void test_create_database_binary(void) -{ - static const CLSID CLSID_MsiDatabase = - { 0xc1084, 0, 0, {0xc0, 0, 0, 0, 0, 0, 0, 0x46 } }; - static const CLSID IID_IPropertySetStorage = - { 0x13a, 0, 0, {0xc0, 0, 0, 0, 0, 0, 0, 0x46 } }; - static const CLSID FMTID_SummaryInformation = - { 0xf29f85e0, 0x4ff9, 0x1068, {0xab, 0x91, 0x08, 0x00, 0x2b, 0x27, 0xb3, 0xd9}}; - DWORD mode = STGM_CREATE | STGM_READWRITE | STGM_DIRECT | STGM_SHARE_EXCLUSIVE; - IPropertySetStorage *pss = NULL; - IPropertyStorage *ps = NULL; - IStorage *stg = NULL; - IStream *stm = NULL; - HRESULT r; - PROPSPEC propspec[10]; - PROPVARIANT propvar[10]; - USHORT data[2] = { 0, 0 }; - - r = StgCreateDocfile( msifileW, mode, 0, &stg ); - ok( r == S_OK, "failed to create database\n"); - - r = IStorage_SetClass( stg, &CLSID_MsiDatabase ); - ok( r == S_OK, "failed to set clsid\n"); - - /* create the _StringData stream */ - r = IStorage_CreateStream( stg, sd, STGM_WRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm ); - ok( r == S_OK, "failed to create stream\n"); - - IStream_Release( stm ); - - /* create the _StringPool stream */ - r = IStorage_CreateStream( stg, sp, STGM_WRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm ); - ok( r == S_OK, "failed to create stream\n"); - - r = IStream_Write( stm, data, sizeof data, NULL ); - ok( r == S_OK, "failed to write stream\n"); - - IStream_Release( stm ); - - /* create the _Tables stream */ - r = IStorage_CreateStream( stg, tb, STGM_WRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm ); - ok( r == S_OK, "failed to create stream\n"); - - IStream_Release( stm ); - - r = IStorage_QueryInterface( stg, &IID_IPropertySetStorage, (void**) &pss ); - ok( r == S_OK, "failed to set clsid\n"); - - r = IPropertySetStorage_Create( pss, &FMTID_SummaryInformation, NULL, 0, mode, &ps ); - ok( r == S_OK, "failed to create property set\n"); - - r = IPropertyStorage_SetClass( ps, &FMTID_SummaryInformation ); - ok( r == S_OK, "failed to set class\n"); - - propspec[0].ulKind = PRSPEC_PROPID; - U(propspec[0]).propid = PID_TITLE; - propvar[0].vt = VT_LPSTR; - U(propvar[0]).pszVal = LOSE_CONST("test title"); - - propspec[1].ulKind = PRSPEC_PROPID; - U(propspec[1]).propid = PID_SUBJECT; - propvar[1].vt = VT_LPSTR; - U(propvar[1]).pszVal = LOSE_CONST("msi suminfo / property storage test"); - - propspec[2].ulKind = PRSPEC_PROPID; - U(propspec[2]).propid = PID_AUTHOR; - propvar[2].vt = VT_LPSTR; - U(propvar[2]).pszVal = LOSE_CONST("mike_m"); - - propspec[3].ulKind = PRSPEC_PROPID; - U(propspec[3]).propid = PID_TEMPLATE; - propvar[3].vt = VT_LPSTR; - U(propvar[3]).pszVal = LOSE_CONST(";1033"); /* actually the string table's codepage */ - - propspec[4].ulKind = PRSPEC_PROPID; - U(propspec[4]).propid = PID_REVNUMBER; - propvar[4].vt = VT_LPSTR; - U(propvar[4]).pszVal = LOSE_CONST("{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}"); - - propspec[5].ulKind = PRSPEC_PROPID; - U(propspec[5]).propid = PID_PAGECOUNT; - propvar[5].vt = VT_I4; - U(propvar[5]).lVal = 100; - - propspec[6].ulKind = PRSPEC_PROPID; - U(propspec[6]).propid = PID_WORDCOUNT; - propvar[6].vt = VT_I4; - U(propvar[6]).lVal = 0; - - /* MSDN says that PID_LASTPRINTED should be a VT_FILETIME... */ - propspec[7].ulKind = PRSPEC_PROPID; - U(propspec[7]).propid = PID_LASTPRINTED; - propvar[7].vt = VT_LPSTR; - U(propvar[7]).pszVal = LOSE_CONST("7/1/1999 5:17"); - - r = IPropertyStorage_WriteMultiple( ps, 8, propspec, propvar, PID_FIRST_USABLE ); - ok( r == S_OK, "failed to write properties\n"); - - IPropertyStorage_Commit( ps, STGC_DEFAULT ); - - IPropertyStorage_Release( ps ); - IPropertySetStorage_Release( pss ); - - IStorage_Commit( stg, STGC_DEFAULT ); - IStorage_Release( stg ); -} - -static void test_summary_binary(void) -{ - MSIHANDLE hdb = 0, hsuminfo = 0; - UINT r, type, count; - INT ival; - DWORD sz; - char sval[20]; - - DeleteFile( msifile ); - - test_create_database_binary(); - - ok( INVALID_FILE_ATTRIBUTES != GetFileAttributes(msifile), "file doesn't exist!\n"); - - /* just MsiOpenDatabase should not create a file */ - r = MsiOpenDatabase(msifile, MSIDBOPEN_READONLY, &hdb); - ok(r == ERROR_SUCCESS, "MsiOpenDatabase failed\n"); - - r = MsiGetSummaryInformation(hdb, NULL, 0, &hsuminfo); - ok(r == ERROR_SUCCESS, "MsiGetSummaryInformation failed\n"); - - /* - * Check what reading PID_LASTPRINTED does... - * The string value is written to the msi file - * but it appears that we're not allowed to read it back again. - * We can still read its type though...? - */ - sz = sizeof sval; - sval[0] = 0; - type = 0; - r = MsiSummaryInfoGetProperty(hsuminfo, PID_LASTPRINTED, &type, NULL, NULL, sval, &sz); - ok(r == ERROR_SUCCESS, "MsiSummaryInfoGetProperty failed\n"); - ok(!lstrcmpA(sval, "") || !lstrcmpA(sval, "7"), - "Expected empty string or \"7\", got \"%s\"\n", sval); - todo_wine { - ok(type == VT_LPSTR, "Expected VT_LPSTR, got %d\n", type); - ok(sz == 0 || sz == 1, "Expected 0 or 1, got %d\n", sz); - } - - ival = -1; - r = MsiSummaryInfoGetProperty(hsuminfo, PID_WORDCOUNT, &type, &ival, NULL, NULL, NULL); - ok(r == ERROR_SUCCESS, "MsiSummaryInfoGetProperty failed\n"); - todo_wine ok( ival == 0, "value incorrect\n"); - - /* looks like msi adds some of its own values in here */ - count = 0; - r = MsiSummaryInfoGetPropertyCount( hsuminfo, &count ); - ok(r == ERROR_SUCCESS, "getpropcount failed\n"); - todo_wine ok(count == 10, "prop count incorrect\n"); - - r = MsiSummaryInfoSetProperty( hsuminfo, PID_TITLE, VT_LPSTR, 0, NULL, "Mike" ); - ok(r == ERROR_FUNCTION_FAILED, "MsiSummaryInfoSetProperty failed %u\n", r); - - r = MsiSummaryInfoPersist( hsuminfo ); - ok(r == ERROR_FUNCTION_FAILED, "MsiSummaryInfoPersist failed %u\n", r); - - MsiCloseHandle( hsuminfo ); - MsiCloseHandle( hdb ); - - DeleteFile( msifile ); -} - -START_TEST(suminfo) -{ - test_suminfo(); - test_summary_binary(); -} diff --git a/rostests/winetests/msi/testlist.c b/rostests/winetests/msi/testlist.c deleted file mode 100644 index 0691e873085..00000000000 --- a/rostests/winetests/msi/testlist.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_automation(void); -extern void func_db(void); -extern void func_format(void); -extern void func_install(void); -extern void func_msi(void); -extern void func_package(void); -extern void func_patch(void); -extern void func_record(void); -extern void func_source(void); -extern void func_suminfo(void); - - -const struct test winetest_testlist[] = -{ - { "automation", func_automation }, - { "db", func_db }, - { "format", func_format }, - { "install", func_install }, - { "msi", func_msi }, - { "package", func_package }, - { "patch", func_patch }, - { "record", func_record }, - { "source", func_source }, - { "suminfo", func_suminfo }, - { 0, 0 } -}; diff --git a/rostests/winetests/mstask/CMakeLists.txt b/rostests/winetests/mstask/CMakeLists.txt deleted file mode 100644 index e030eb2edfa..00000000000 --- a/rostests/winetests/mstask/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ - -add_definitions(-D__ROS_LONG64__) - -list(APPEND SOURCE - task.c - task_scheduler.c - task_trigger.c - testlist.c) - -add_executable(mstask_winetest ${SOURCE}) -target_link_libraries(mstask_winetest wine) - -if(MSVC) - target_link_libraries(mstask_winetest uuid) -endif() - -set_module_type(mstask_winetest win32cui) -add_importlibs(mstask_winetest ole32 msvcrt kernel32 ntdll) -add_cd_file(TARGET mstask_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/mstask/mstask.rbuild b/rostests/winetests/mstask/mstask.rbuild deleted file mode 100644 index 9085f9ca1ce..00000000000 --- a/rostests/winetests/mstask/mstask.rbuild +++ /dev/null @@ -1,15 +0,0 @@ - - - - - . - - task.c - task_scheduler.c - task_trigger.c - testlist.c - wine - ole32 - ntdll - - diff --git a/rostests/winetests/mstask/task.c b/rostests/winetests/mstask/task.c deleted file mode 100644 index d1392070399..00000000000 --- a/rostests/winetests/mstask/task.c +++ /dev/null @@ -1,509 +0,0 @@ -/* - * Test suite for Task interface - * - * Copyright (C) 2008 Google (Roy Shea) - * - * 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 - -#include "corerror.h" -#include "mstask.h" -#include "wine/test.h" - -static ITaskScheduler *test_task_scheduler; -static ITask *test_task; -static const WCHAR empty[] = {0}; - -static BOOL setup_task(void) -{ - HRESULT hres; - const WCHAR task_name[] = {'T','e','s','t','i','n','g', 0}; - - hres = CoCreateInstance(&CLSID_CTaskScheduler, NULL, CLSCTX_INPROC_SERVER, - &IID_ITaskScheduler, (void **) &test_task_scheduler); - if(hres != S_OK) - return FALSE; - hres = ITaskScheduler_NewWorkItem(test_task_scheduler, task_name, &CLSID_CTask, - &IID_ITask, (IUnknown**)&test_task); - if(hres != S_OK) - { - ITaskScheduler_Release(test_task_scheduler); - return FALSE; - } - return TRUE; -} - -static void cleanup_task(void) -{ - ITask_Release(test_task); - ITaskScheduler_Release(test_task_scheduler); -} - -static LPCWSTR path_resolve_name(LPCWSTR base_name) -{ - static WCHAR buffer[MAX_PATH]; - int len; - - len = SearchPathW(NULL, base_name, NULL, 0, NULL, NULL); - if (len == 0) - return base_name; - else if (len < MAX_PATH) - { - SearchPathW(NULL, base_name, NULL, MAX_PATH, buffer, NULL); - return buffer; - } - return NULL; -} - -static void test_SetApplicationName_GetApplicationName(void) -{ - BOOL setup; - HRESULT hres; - LPWSTR stored_name; - LPCWSTR full_name; - const WCHAR non_application_name[] = {'N','o','S','u','c','h', - 'A','p','p','l','i','c','a','t','i','o','n', 0}; - const WCHAR notepad_exe[] = { - 'n','o','t','e','p','a','d','.','e','x','e', 0}; - const WCHAR notepad[] = {'n','o','t','e','p','a','d', 0}; - - setup = setup_task(); - ok(setup, "Failed to setup test_task\n"); - if (!setup) - { - skip("Failed to create task. Skipping tests.\n"); - return; - } - - /* Attempt getting before setting application name */ - hres = ITask_GetApplicationName(test_task, &stored_name); - ok(hres == S_OK, "GetApplicationName failed: %08x\n", hres); - if (hres == S_OK) - { - ok(!lstrcmpiW(stored_name, empty), - "Got %s, expected empty string\n", wine_dbgstr_w(stored_name)); - CoTaskMemFree(stored_name); - } - - /* Set application name to a nonexistent application and then get - * the application name that is actually stored */ - hres = ITask_SetApplicationName(test_task, non_application_name); - ok(hres == S_OK, "Failed setting name %s: %08x\n", - wine_dbgstr_w(non_application_name), hres); - hres = ITask_GetApplicationName(test_task, &stored_name); - ok(hres == S_OK, "GetApplicationName failed: %08x\n", hres); - if (hres == S_OK) - { - full_name = path_resolve_name(non_application_name); - ok(!lstrcmpiW(stored_name, full_name), "Got %s, expected %s\n", - wine_dbgstr_w(stored_name), wine_dbgstr_w(full_name)); - CoTaskMemFree(stored_name); - } - - /* Set a valid application name with program type extension and then - * get the stored name */ - hres = ITask_SetApplicationName(test_task, notepad_exe); - ok(hres == S_OK, "Failed setting name %s: %08x\n", - wine_dbgstr_w(notepad_exe), hres); - hres = ITask_GetApplicationName(test_task, &stored_name); - ok(hres == S_OK, "GetApplicationName failed: %08x\n", hres); - if (hres == S_OK) - { - full_name = path_resolve_name(notepad_exe); - ok(!lstrcmpiW(stored_name, full_name), "Got %s, expected %s\n", - wine_dbgstr_w(stored_name), wine_dbgstr_w(full_name)); - CoTaskMemFree(stored_name); - } - - /* Set a valid application name without program type extension and - * then get the stored name */ - hres = ITask_SetApplicationName(test_task, notepad); - ok(hres == S_OK, "Failed setting name %s: %08x\n", wine_dbgstr_w(notepad), hres); - hres = ITask_GetApplicationName(test_task, &stored_name); - ok(hres == S_OK, "GetApplicationName failed: %08x\n", hres); - if (hres == S_OK) - { - full_name = path_resolve_name(notepad_exe); /* XP SP1 appends .exe */ - if (lstrcmpiW(stored_name, full_name) != 0) - { - full_name = path_resolve_name(notepad); - ok(!lstrcmpiW(stored_name, full_name), "Got %s, expected %s\n", - wine_dbgstr_w(stored_name), wine_dbgstr_w(full_name)); - } - CoTaskMemFree(stored_name); - } - - /* After having a valid application name set, set application the name - * to a nonexistent application and then get the name that is - * actually stored */ - hres = ITask_SetApplicationName(test_task, non_application_name); - ok(hres == S_OK, "Failed setting name %s: %08x\n", - wine_dbgstr_w(non_application_name), hres); - hres = ITask_GetApplicationName(test_task, &stored_name); - ok(hres == S_OK, "GetApplicationName failed: %08x\n", hres); - if (hres == S_OK) - { - full_name = path_resolve_name(non_application_name); - ok(!lstrcmpiW(stored_name, full_name), "Got %s, expected %s\n", - wine_dbgstr_w(stored_name), wine_dbgstr_w(full_name)); - CoTaskMemFree(stored_name); - } - - /* Clear application name */ - hres = ITask_SetApplicationName(test_task, empty); - ok(hres == S_OK, "Failed setting name %s: %08x\n", wine_dbgstr_w(empty), hres); - hres = ITask_GetApplicationName(test_task, &stored_name); - ok(hres == S_OK, "GetApplicationName failed: %08x\n", hres); - if (hres == S_OK) - { - ok(!lstrcmpiW(stored_name, empty), - "Got %s, expected empty string\n", wine_dbgstr_w(stored_name)); - CoTaskMemFree(stored_name); - } - - cleanup_task(); - return; -} - -static void test_CreateTrigger(void) -{ - BOOL setup; - HRESULT hres; - WORD trigger_index; - ITaskTrigger *test_trigger; - - setup = setup_task(); - ok(setup, "Failed to setup test_task\n"); - if (!setup) - { - skip("Failed to create task. Skipping tests.\n"); - return; - } - - hres = ITask_CreateTrigger(test_task, &trigger_index, &test_trigger); - ok(hres == S_OK, "Failed to create trigger: 0x%08x\n", hres); - if (hres != S_OK) - { - cleanup_task(); - return; - } - - ITaskTrigger_Release(test_trigger); - cleanup_task(); - return; -} - -static void test_SetParameters_GetParameters(void) -{ - BOOL setup; - HRESULT hres; - LPWSTR parameters; - const WCHAR parameters_a[] = {'f','o','o','.','t','x','t', 0}; - const WCHAR parameters_b[] = {'f','o','o','.','t','x','t',' ', - 'b','a','r','.','t','x','t', 0}; - - setup = setup_task(); - ok(setup, "Failed to setup test_task\n"); - if (!setup) - { - skip("Failed to create task. Skipping tests.\n"); - return; - } - - /* Get parameters before setting them */ - hres = ITask_GetParameters(test_task, ¶meters); - ok(hres == S_OK, "GetParameters failed: %08x\n", hres); - if (hres == S_OK) - { - ok(!lstrcmpW(parameters, empty), - "Got %s, expected empty string\n", wine_dbgstr_w(parameters)); - CoTaskMemFree(parameters); - } - - /* Set parameters to a simple string */ - hres = ITask_SetParameters(test_task, parameters_a); - ok(hres == S_OK, "Failed setting parameters %s: %08x\n", - wine_dbgstr_w(parameters_a), hres); - hres = ITask_GetParameters(test_task, ¶meters); - ok(hres == S_OK, "GetParameters failed: %08x\n", hres); - if (hres == S_OK) - { - ok(!lstrcmpW(parameters, parameters_a), "Got %s, expected %s\n", - wine_dbgstr_w(parameters), wine_dbgstr_w(parameters_a)); - CoTaskMemFree(parameters); - } - - /* Update parameters to a different simple string */ - hres = ITask_SetParameters(test_task, parameters_b); - ok(hres == S_OK, "Failed setting parameters %s: %08x\n", - wine_dbgstr_w(parameters_b), hres); - hres = ITask_GetParameters(test_task, ¶meters); - ok(hres == S_OK, "GetParameters failed: %08x\n", hres); - if (hres == S_OK) - { - ok(!lstrcmpW(parameters, parameters_b), "Got %s, expected %s\n", - wine_dbgstr_w(parameters), wine_dbgstr_w(parameters_b)); - CoTaskMemFree(parameters); - } - - /* Clear parameters */ - hres = ITask_SetParameters(test_task, empty); - ok(hres == S_OK, "Failed setting parameters %s: %08x\n", - wine_dbgstr_w(empty), hres); - hres = ITask_GetParameters(test_task, ¶meters); - ok(hres == S_OK, "GetParameters failed: %08x\n", hres); - if (hres == S_OK) - { - ok(!lstrcmpW(parameters, empty), - "Got %s, expected empty string\n", wine_dbgstr_w(parameters)); - CoTaskMemFree(parameters); - } - - cleanup_task(); - return; -} - -static void test_SetComment_GetComment(void) -{ - BOOL setup; - HRESULT hres; - LPWSTR comment; - const WCHAR comment_a[] = {'C','o','m','m','e','n','t','.', 0}; - const WCHAR comment_b[] = {'L','o','n','g','e','r',' ', - 'c','o','m','m','e','n','t','.', 0}; - - setup = setup_task(); - ok(setup, "Failed to setup test_task\n"); - if (!setup) - { - skip("Failed to create task. Skipping tests.\n"); - return; - } - - /* Get comment before setting it*/ - hres = ITask_GetComment(test_task, &comment); - ok(hres == S_OK, "GetComment failed: %08x\n", hres); - if (hres == S_OK) - { - ok(!lstrcmpW(comment, empty), - "Got %s, expected empty string\n", wine_dbgstr_w(comment)); - CoTaskMemFree(comment); - } - - /* Set comment to a simple string */ - hres = ITask_SetComment(test_task, comment_a); - ok(hres == S_OK, "Failed setting comment %s: %08x\n", - wine_dbgstr_w(comment_a), hres); - hres = ITask_GetComment(test_task, &comment); - ok(hres == S_OK, "GetComment failed: %08x\n", hres); - if (hres == S_OK) - { - ok(!lstrcmpW(comment, comment_a), "Got %s, expected %s\n", - wine_dbgstr_w(comment), wine_dbgstr_w(comment_a)); - CoTaskMemFree(comment); - } - - /* Update comment to a different simple string */ - hres = ITask_SetComment(test_task, comment_b); - ok(hres == S_OK, "Failed setting comment %s: %08x\n", - wine_dbgstr_w(comment_b), hres); - hres = ITask_GetComment(test_task, &comment); - ok(hres == S_OK, "GetComment failed: %08x\n", hres); - if (hres == S_OK) - { - ok(!lstrcmpW(comment, comment_b), "Got %s, expected %s\n", - wine_dbgstr_w(comment), wine_dbgstr_w(comment_b)); - CoTaskMemFree(comment); - } - - /* Clear comment */ - hres = ITask_SetComment(test_task, empty); - ok(hres == S_OK, "Failed setting comment %s: %08x\n", - wine_dbgstr_w(empty), hres); - hres = ITask_GetComment(test_task, &comment); - ok(hres == S_OK, "GetComment failed: %08x\n", hres); - if (hres == S_OK) - { - ok(!lstrcmpW(comment, empty), - "Got %s, expected empty string\n", wine_dbgstr_w(comment)); - CoTaskMemFree(comment); - } - - cleanup_task(); - return; -} - -static void test_SetMaxRunTime_GetMaxRunTime(void) -{ - BOOL setup; - HRESULT hres; - DWORD max_run_time; - - setup = setup_task(); - ok(setup, "Failed to setup test_task\n"); - if (!setup) - { - skip("Failed to create task. Skipping tests.\n"); - return; - } - - /* Default time is 3 days: - * 3 days * 24 hours * 60 minutes * 60 seconds * 1000 ms = 259200000 */ - max_run_time = 0; - hres = ITask_GetMaxRunTime(test_task, &max_run_time); - ok(hres == S_OK, "Failed to get max runtime: 0x%08x\n", hres); - ok(max_run_time == 259200000, "Expected 259200000: %d\n", max_run_time); - - /* Basic set test */ - max_run_time = 0; - hres = ITask_SetMaxRunTime(test_task, 1234); - ok(hres == S_OK, "Failed to set max runtime: 0x%08x\n", hres); - hres = ITask_GetMaxRunTime(test_task, &max_run_time); - ok(hres == S_OK, "Failed to get max runtime: 0x%08x\n", hres); - ok(max_run_time == 1234, "Expected 1234: %d\n", max_run_time); - - /* Verify that time can be set to zero */ - max_run_time = 1; - hres = ITask_SetMaxRunTime(test_task, 0); - ok(hres == S_OK, "Failed to set max runtime: 0x%08x\n", hres); - hres = ITask_GetMaxRunTime(test_task, &max_run_time); - ok(hres == S_OK, "Failed to get max runtime: 0x%08x\n", hres); - ok(max_run_time == 0, "Expected 0: %d\n", max_run_time); - - /* Check resolution by setting time to one */ - max_run_time = 0; - hres = ITask_SetMaxRunTime(test_task, 1); - ok(hres == S_OK, "Failed to set max runtime: 0x%08x\n", hres); - hres = ITask_GetMaxRunTime(test_task, &max_run_time); - ok(hres == S_OK, "Failed to get max runtime: 0x%08x\n", hres); - ok(max_run_time == 1, "Expected 1: %d\n", max_run_time); - - /* Verify that time can be set to INFINITE */ - max_run_time = 0; - hres = ITask_SetMaxRunTime(test_task, INFINITE); - ok(hres == S_OK, "Failed to set max runtime: 0x%08x\n", hres); - hres = ITask_GetMaxRunTime(test_task, &max_run_time); - ok(hres == S_OK, "Failed to get max runtime: 0x%08x\n", hres); - ok(max_run_time == INFINITE, "Expected INFINITE: %d\n", max_run_time); - - cleanup_task(); - return; -} - -static void test_SetAccountInformation_GetAccountInformation(void) -{ - BOOL setup; - HRESULT hres; - LPWSTR account_name; - const WCHAR dummy_account_name[] = {'N', 'o', 'S', 'u', 'c', 'h', - 'A', 'c', 'c', 'o', 'u', 'n', 't', 0}; - const WCHAR dummy_account_name_b[] = {'N', 'o', 'S', 'u', 'c', 'h', - 'A', 'c', 'c', 'o', 'u', 'n', 't', 'B', 0}; - - setup = setup_task(); - ok(setup, "Failed to setup test_task\n"); - if (!setup) - { - skip("Failed to create task. Skipping tests.\n"); - return; - } - - /* Get account information before it is set */ - hres = ITask_GetAccountInformation(test_task, &account_name); - /* WinXP returns HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND): 0x80070002 but - * Win2K returns SCHED_E_CANNOT_OPEN_TASK: 0x8004130d - * Win9x doesn't support security services */ - if (hres == SCHED_E_NO_SECURITY_SERVICES || hres == SCHED_E_SERVICE_NOT_RUNNING) - { - win_skip("Security services are not supported\n"); - cleanup_task(); - return; - } - ok(hres == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || - hres == SCHED_E_CANNOT_OPEN_TASK, - "Unset account name generated: 0x%08x\n", hres); - - /* Attempt to set to a dummy account without a password */ - /* This test passes on WinXP but fails on Win2K */ - hres = ITask_SetAccountInformation(test_task, dummy_account_name, NULL); - ok(hres == S_OK, - "Failed setting dummy account with no password: %08x\n", hres); - hres = ITask_GetAccountInformation(test_task, &account_name); - ok(hres == S_OK || - broken(hres == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || - hres == SCHED_E_CANNOT_OPEN_TASK || - hres == 0x200), /* win2k */ - "GetAccountInformation failed: %08x\n", hres); - if (hres == S_OK) - { - ok(!lstrcmpW(account_name, dummy_account_name), - "Got %s, expected %s\n", wine_dbgstr_w(account_name), - wine_dbgstr_w(dummy_account_name)); - CoTaskMemFree(account_name); - } - - /* Attempt to set to a dummy account with a (invalid) password */ - /* This test passes on WinXP but fails on Win2K */ - hres = ITask_SetAccountInformation(test_task, dummy_account_name_b, - dummy_account_name_b); - ok(hres == S_OK, - "Failed setting dummy account with password: %08x\n", hres); - hres = ITask_GetAccountInformation(test_task, &account_name); - ok(hres == S_OK || - broken(hres == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || - hres == SCHED_E_CANNOT_OPEN_TASK || - hres == 0x200), /* win2k */ - "GetAccountInformation failed: %08x\n", hres); - if (hres == S_OK) - { - ok(!lstrcmpW(account_name, dummy_account_name_b), - "Got %s, expected %s\n", wine_dbgstr_w(account_name), - wine_dbgstr_w(dummy_account_name_b)); - CoTaskMemFree(account_name); - } - - /* Attempt to set to the local system account */ - hres = ITask_SetAccountInformation(test_task, empty, NULL); - ok(hres == S_OK, "Failed setting system account: %08x\n", hres); - hres = ITask_GetAccountInformation(test_task, &account_name); - ok(hres == S_OK || - broken(hres == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || - hres == SCHED_E_CANNOT_OPEN_TASK || - hres == 0x200), /* win2k */ - "GetAccountInformation failed: %08x\n", hres); - if (hres == S_OK) - { - ok(!lstrcmpW(account_name, empty), - "Got %s, expected empty string\n", wine_dbgstr_w(account_name)); - CoTaskMemFree(account_name); - } - - cleanup_task(); - return; -} - -START_TEST(task) -{ - CoInitialize(NULL); - test_SetApplicationName_GetApplicationName(); - test_CreateTrigger(); - test_SetParameters_GetParameters(); - test_SetComment_GetComment(); - test_SetMaxRunTime_GetMaxRunTime(); - test_SetAccountInformation_GetAccountInformation(); - CoUninitialize(); -} diff --git a/rostests/winetests/mstask/task_scheduler.c b/rostests/winetests/mstask/task_scheduler.c deleted file mode 100644 index 2de0e160496..00000000000 --- a/rostests/winetests/mstask/task_scheduler.c +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Test suite for TaskScheduler interface - * - * Copyright (C) 2008 Google (Roy Shea) - * - * 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 - -#include "corerror.h" - -#include "initguid.h" -#include "mstask.h" -#include "wine/test.h" - -static ITaskScheduler *test_task_scheduler; - -static void test_NewWorkItem(void) -{ - HRESULT hres; - ITask *task; - const WCHAR task_name[] = {'T', 'e', 's', 't', 'i', 'n', 'g', 0}; - GUID GUID_BAD; - - /* Initialize a GUID that will not be a recognized CLSID or a IID */ - CoCreateGuid(&GUID_BAD); - - /* Create TaskScheduler */ - hres = CoCreateInstance(&CLSID_CTaskScheduler, NULL, CLSCTX_INPROC_SERVER, - &IID_ITaskScheduler, (void **) &test_task_scheduler); - ok(hres == S_OK, "CTaskScheduler CoCreateInstance failed: %08x\n", hres); - if (hres != S_OK) - { - skip("Failed to create task scheduler. Skipping tests.\n"); - return; - } - - /* Test basic task creation */ - hres = ITaskScheduler_NewWorkItem(test_task_scheduler, task_name, - &CLSID_CTask, &IID_ITask, (IUnknown**)&task); - ok(hres == S_OK, "NewNetworkItem failed: %08x\n", hres); - if (hres == S_OK) - ITask_Release(task); - - /* Task creation attempt using invalid work item class ID */ - hres = ITaskScheduler_NewWorkItem(test_task_scheduler, task_name, - &GUID_BAD, &IID_ITask, (IUnknown**)&task); - ok(hres == CLASS_E_CLASSNOTAVAILABLE, - "Expected CLASS_E_CLASSNOTAVAILABLE: %08x\n", hres); - - /* Task creation attempt using invalid interface ID */ - hres = ITaskScheduler_NewWorkItem(test_task_scheduler, task_name, - &CLSID_CTask, &GUID_BAD, (IUnknown**)&task); - ok(hres == E_NOINTERFACE, "Expected E_NOINTERFACE: %08x\n", hres); - - /* Task creation attempt using invalid work item class and interface ID */ - hres = ITaskScheduler_NewWorkItem(test_task_scheduler, task_name, - &GUID_BAD, &GUID_BAD, (IUnknown**)&task); - ok(hres == CLASS_E_CLASSNOTAVAILABLE, - "Expected CLASS_E_CLASSNOTAVAILABLE: %08x\n", hres); - - ITaskScheduler_Release(test_task_scheduler); - return; -} - -static void test_Activate(void) -{ - HRESULT hres; - ITask *task = NULL; - const WCHAR not_task_name[] = - {'N', 'o', 'S', 'u', 'c', 'h', 'T', 'a', 's', 'k', 0}; - - /* Create TaskScheduler */ - hres = CoCreateInstance(&CLSID_CTaskScheduler, NULL, CLSCTX_INPROC_SERVER, - &IID_ITaskScheduler, (void **) &test_task_scheduler); - ok(hres == S_OK, "CTaskScheduler CoCreateInstance failed: %08x\n", hres); - if (hres != S_OK) - { - skip("Failed to create task scheduler. Skipping tests.\n"); - return; - } - - /* Attempt to activate a nonexistent task */ - hres = ITaskScheduler_Activate(test_task_scheduler, not_task_name, - &IID_ITask, (IUnknown**)&task); - ok(hres == COR_E_FILENOTFOUND, "Expected COR_E_FILENOTFOUND: %08x\n", hres); - - ITaskScheduler_Release(test_task_scheduler); - return; -} - -START_TEST(task_scheduler) -{ - CoInitialize(NULL); - test_NewWorkItem(); - test_Activate(); - CoUninitialize(); -} diff --git a/rostests/winetests/mstask/task_trigger.c b/rostests/winetests/mstask/task_trigger.c deleted file mode 100644 index 7f1c57799be..00000000000 --- a/rostests/winetests/mstask/task_trigger.c +++ /dev/null @@ -1,380 +0,0 @@ -/* - * Test suite for Task interface - * - * Copyright (C) 2008 Google (Roy Shea) - * - * 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 - -#include - -#include "mstask.h" -#include "wine/test.h" - -static ITaskScheduler *test_task_scheduler; -static ITask *test_task; -static ITaskTrigger *test_trigger; -static WORD trigger_index; - -static BOOL setup_trigger(void) -{ - HRESULT hres; - const WCHAR task_name[] = {'T','e','s','t','i','n','g', 0}; - - hres = CoCreateInstance(&CLSID_CTaskScheduler, NULL, CLSCTX_INPROC_SERVER, - &IID_ITaskScheduler, (void **) &test_task_scheduler); - if(hres != S_OK) - return FALSE; - hres = ITaskScheduler_NewWorkItem(test_task_scheduler, task_name, - &CLSID_CTask, &IID_ITask, (IUnknown**)&test_task); - if(hres != S_OK) - { - ITaskScheduler_Release(test_task_scheduler); - return FALSE; - } - hres = ITask_CreateTrigger(test_task, &trigger_index, &test_trigger); - if(hres != S_OK) - { - ITask_Release(test_task); - ITaskScheduler_Release(test_task_scheduler); - return FALSE; - } - return TRUE; -} - -static void cleanup_trigger(void) -{ - ITaskTrigger_Release(test_trigger); - ITask_Release(test_task); - ITaskScheduler_Release(test_task_scheduler); -} - -static BOOL compare_trigger_state(TASK_TRIGGER found_state, - TASK_TRIGGER expected_state) -{ - ok(found_state.cbTriggerSize == expected_state.cbTriggerSize, - "cbTriggerSize: Found %d but expected %d\n", - found_state.cbTriggerSize, expected_state.cbTriggerSize); - - ok(found_state.Reserved1 == expected_state.Reserved1, - "Reserved1: Found %d but expected %d\n", - found_state.Reserved1, expected_state.Reserved1); - - ok(found_state.wBeginYear == expected_state.wBeginYear, - "wBeginYear: Found %d but expected %d\n", - found_state.wBeginYear, expected_state.wBeginYear); - - ok(found_state.wBeginMonth == expected_state.wBeginMonth, - "wBeginMonth: Found %d but expected %d\n", - found_state.wBeginMonth, expected_state.wBeginMonth); - - ok(found_state.wBeginDay == expected_state.wBeginDay, - "wBeginDay: Found %d but expected %d\n", - found_state.wBeginDay, expected_state.wBeginDay); - - ok(found_state.wEndYear == expected_state.wEndYear, - "wEndYear: Found %d but expected %d\n", - found_state.wEndYear, expected_state.wEndYear); - - ok(found_state.wEndMonth == expected_state.wEndMonth, - "wEndMonth: Found %d but expected %d\n", - found_state.wEndMonth, expected_state.wEndMonth); - - ok(found_state.wEndDay == expected_state.wEndDay, - "wEndDay: Found %d but expected %d\n", - found_state.wEndDay, expected_state.wEndDay); - - ok(found_state.wStartHour == expected_state.wStartHour, - "wStartHour: Found %d but expected %d\n", - found_state.wStartHour, expected_state.wStartHour); - - ok(found_state.wStartMinute == expected_state.wStartMinute, - "wStartMinute: Found %d but expected %d\n", - found_state.wStartMinute, expected_state.wStartMinute); - - ok(found_state.MinutesDuration == expected_state.MinutesDuration, - "MinutesDuration: Found %d but expected %d\n", - found_state.MinutesDuration, expected_state.MinutesDuration); - - ok(found_state.MinutesInterval == expected_state.MinutesInterval, - "MinutesInterval: Found %d but expected %d\n", - found_state.MinutesInterval, expected_state.MinutesInterval); - - ok(found_state.rgFlags == expected_state.rgFlags, - "rgFlags: Found %d but expected %d\n", - found_state.rgFlags, expected_state.rgFlags); - - ok(found_state.TriggerType == expected_state.TriggerType, - "TriggerType: Found %d but expected %d\n", - found_state.TriggerType, expected_state.TriggerType); - - ok(found_state.Type.Daily.DaysInterval == expected_state.Type.Daily.DaysInterval, - "Type.Daily.DaysInterval: Found %d but expected %d\n", - found_state.Type.Daily.DaysInterval, expected_state.Type.Daily.DaysInterval); - - ok(found_state.Reserved2 == expected_state.Reserved2, - "Reserved2: Found %d but expected %d\n", - found_state.Reserved2, expected_state.Reserved2); - - ok(found_state.wRandomMinutesInterval == expected_state.wRandomMinutesInterval, - "wRandomMinutesInterval: Found %d but expected %d\n", - found_state.wRandomMinutesInterval, expected_state.wRandomMinutesInterval); - - return TRUE; -} - -static void test_SetTrigger_GetTrigger(void) -{ - BOOL setup; - HRESULT hres; - TASK_TRIGGER trigger_state; - TASK_TRIGGER empty_trigger_state = { - sizeof(trigger_state), 0, - 0, 0, 0, - 0, 0, 0, - 0, 0, 0, 0, - TASK_TRIGGER_FLAG_DISABLED, TASK_TIME_TRIGGER_DAILY, {{1}}, - 0, 0 - }; - TASK_TRIGGER normal_trigger_state = { - sizeof(trigger_state), 0, - 1980, 1, 1, - 2980, 2, 2, - 3, 3, - 0, 0, - TASK_TRIGGER_FLAG_DISABLED, TASK_TIME_TRIGGER_DAILY, {{1}}, - 0, 0 - }; - SYSTEMTIME time; - - setup = setup_trigger(); - ok(setup, "Failed to setup test_task\n"); - if (!setup) - { - skip("Failed to create task. Skipping tests.\n"); - return; - } - - /* Setup a trigger with base values for this test run */ - GetLocalTime(&time); - empty_trigger_state.wStartHour = time.wHour; - empty_trigger_state.wStartMinute = time.wMinute; - empty_trigger_state.wBeginYear = time.wYear; - empty_trigger_state.wBeginMonth = time.wMonth; - empty_trigger_state.wBeginDay = time.wDay; - - /* Test trigger state after trigger creation but before setting * state */ - memset(&trigger_state, 0xcf, sizeof(trigger_state)); - trigger_state.cbTriggerSize = sizeof(trigger_state); - hres = ITaskTrigger_GetTrigger(test_trigger, &trigger_state); - ok(hres == S_OK, "Failed to set trigger: 0x%08x\n", hres); - compare_trigger_state(trigger_state, empty_trigger_state); - - /* Test setting basic empty trigger */ - hres = ITaskTrigger_SetTrigger(test_trigger, &empty_trigger_state); - ok(hres == S_OK, "Failed to set trigger: 0x%08x\n", hres); - memset(&trigger_state, 0xcf, sizeof(trigger_state)); - trigger_state.cbTriggerSize = sizeof(trigger_state); - hres = ITaskTrigger_GetTrigger(test_trigger, &trigger_state); - ok(hres == S_OK, "Failed to GetTrigger\n"); - compare_trigger_state(trigger_state, empty_trigger_state); - - /* Test setting basic non-empty trigger */ - hres = ITaskTrigger_SetTrigger(test_trigger, &normal_trigger_state); - ok(hres == S_OK, "Failed to set trigger: 0x%08x\n", hres); - memset(&trigger_state, 0xcf, sizeof(trigger_state)); - trigger_state.cbTriggerSize = sizeof(trigger_state); - hres = ITaskTrigger_GetTrigger(test_trigger, &trigger_state); - ok(hres == S_OK, "Failed to GetTrigger\n"); - compare_trigger_state(trigger_state, normal_trigger_state); - - /* The following tests modify the normal_trigger_state structure - * before each test, and return the normal_trigger_state structure - * back to its original valid state after each test. This keeps - * each test run independent. */ - - /* Test setting trigger with invalid cbTriggerSize */ - normal_trigger_state.cbTriggerSize = sizeof(trigger_state) - 1; - hres = ITaskTrigger_SetTrigger(test_trigger, &normal_trigger_state); - ok(hres == E_INVALIDARG, "Expected E_INVALIDARG: 0x%08x\n", hres); - normal_trigger_state.cbTriggerSize = sizeof(trigger_state) + 1; - hres = ITaskTrigger_SetTrigger(test_trigger, &normal_trigger_state); - ok(hres == E_INVALIDARG, "Expected E_INVALIDARG: 0x%08x\n", hres); - normal_trigger_state.cbTriggerSize = sizeof(trigger_state); - - /* Test setting trigger with invalid Reserved fields */ - normal_trigger_state.Reserved1 = 80; - normal_trigger_state.Reserved2 = 80; - hres = ITaskTrigger_SetTrigger(test_trigger, &normal_trigger_state); - ok(hres == S_OK, "Failed to set trigger: 0x%08x\n", hres); - memset(&trigger_state, 0xcf, sizeof(trigger_state)); - trigger_state.cbTriggerSize = sizeof(trigger_state); - hres = ITaskTrigger_GetTrigger(test_trigger, &trigger_state); - ok(trigger_state.Reserved1 == 0 && trigger_state.Reserved2 == 0, - "Reserved fields should be set to zero\n"); - normal_trigger_state.Reserved1 = 0; - normal_trigger_state.Reserved2 = 0; - - /* Test setting trigger with invalid month */ - normal_trigger_state.wBeginMonth = 0; - hres = ITaskTrigger_SetTrigger(test_trigger, &normal_trigger_state); - ok(hres == E_INVALIDARG, "Expected E_INVALIDARG: 0x%08x\n", hres); - normal_trigger_state.wBeginMonth = 13; - hres = ITaskTrigger_SetTrigger(test_trigger, &normal_trigger_state); - ok(hres == E_INVALIDARG, "Expected E_INVALIDARG: 0x%08x\n", hres); - normal_trigger_state.wBeginMonth = 1; - - /* Test setting trigger with invalid begin date */ - normal_trigger_state.wBeginDay = 0; - hres = ITaskTrigger_SetTrigger(test_trigger, &normal_trigger_state); - ok(hres == E_INVALIDARG, "Expected E_INVALIDARG: 0x%08x\n", hres); - normal_trigger_state.wBeginDay = 32; - hres = ITaskTrigger_SetTrigger(test_trigger, &normal_trigger_state); - ok(hres == E_INVALIDARG, "Expected E_INVALIDARG: 0x%08x\n", hres); - normal_trigger_state.wBeginMonth = 2; - normal_trigger_state.wBeginDay = 30; - hres = ITaskTrigger_SetTrigger(test_trigger, &normal_trigger_state); - ok(hres == E_INVALIDARG, "Expected E_INVALIDARG: 0x%08x\n", hres); - normal_trigger_state.wBeginMonth = 1; - normal_trigger_state.wBeginDay = 1; - - /* Test setting trigger invalid end date */ - normal_trigger_state.wEndYear = 0; - normal_trigger_state.wEndMonth = 200; - normal_trigger_state.wEndDay = 200; - hres = ITaskTrigger_SetTrigger(test_trigger, &normal_trigger_state); - ok(hres == S_OK, "Failed to set trigger: 0x%08x\n", hres); - memset(&trigger_state, 0xcf, sizeof(trigger_state)); - trigger_state.cbTriggerSize = sizeof(trigger_state); - hres = ITaskTrigger_GetTrigger(test_trigger, &trigger_state); - ok(trigger_state.wEndYear == 0, "End year should be 0: %d\n", - trigger_state.wEndYear); - ok(trigger_state.wEndMonth == 200, "End month should be 200: %d\n", - trigger_state.wEndMonth); - ok(trigger_state.wEndDay == 200, "End day should be 200: %d\n", - trigger_state.wEndDay); - normal_trigger_state.rgFlags = - TASK_TRIGGER_FLAG_DISABLED | TASK_TRIGGER_FLAG_HAS_END_DATE; - hres = ITaskTrigger_SetTrigger(test_trigger, &normal_trigger_state); - ok(hres == E_INVALIDARG, "Expected E_INVALIDARG: 0x%08x\n", hres); - normal_trigger_state.rgFlags = TASK_TRIGGER_FLAG_DISABLED; - normal_trigger_state.wEndYear = 2980; - normal_trigger_state.wEndMonth = 1; - normal_trigger_state.wEndDay = 1; - - /* Test setting trigger with invalid hour or minute*/ - normal_trigger_state.wStartHour = 24; - hres = ITaskTrigger_SetTrigger(test_trigger, &normal_trigger_state); - ok(hres == E_INVALIDARG, "Expected E_INVALIDARG: 0x%08x\n", hres); - normal_trigger_state.wStartHour = 3; - normal_trigger_state.wStartHour = 60; - hres = ITaskTrigger_SetTrigger(test_trigger, &normal_trigger_state); - ok(hres == E_INVALIDARG, "Expected E_INVALIDARG: 0x%08x\n", hres); - normal_trigger_state.wStartHour = 3; - - /* Test setting trigger with invalid duration / interval pairs */ - normal_trigger_state.MinutesDuration = 5; - normal_trigger_state.MinutesInterval = 5; - hres = ITaskTrigger_SetTrigger(test_trigger, &normal_trigger_state); - ok(hres == E_INVALIDARG, "Expected E_INVALIDARG: 0x%08x\n", hres); - normal_trigger_state.MinutesDuration = 5; - normal_trigger_state.MinutesInterval = 6; - hres = ITaskTrigger_SetTrigger(test_trigger, &normal_trigger_state); - ok(hres == E_INVALIDARG, "Expected E_INVALIDARG: 0x%08x\n", hres); - normal_trigger_state.MinutesDuration = 0; - normal_trigger_state.MinutesInterval = 6; - hres = ITaskTrigger_SetTrigger(test_trigger, &normal_trigger_state); - ok(hres == E_INVALIDARG, "Expected E_INVALIDARG: 0x%08x\n", hres); - normal_trigger_state.MinutesDuration = 5; - normal_trigger_state.MinutesInterval = 0; - ok(hres == E_INVALIDARG, "Expected E_INVALIDARG: 0x%08x\n", hres); - normal_trigger_state.MinutesDuration = 0; - normal_trigger_state.MinutesInterval = 0; - - /* Test setting trigger with end date before start date */ - normal_trigger_state.wEndYear = 1979; - hres = ITaskTrigger_SetTrigger(test_trigger, &normal_trigger_state); - ok(hres == S_OK, "Failed to set trigger: 0x%08x\n", hres); - normal_trigger_state.rgFlags = - TASK_TRIGGER_FLAG_DISABLED | TASK_TRIGGER_FLAG_HAS_END_DATE; - hres = ITaskTrigger_SetTrigger(test_trigger, &normal_trigger_state); - ok(hres == S_OK, "Failed to set trigger: 0x%08x\n", hres); - normal_trigger_state.rgFlags = TASK_TRIGGER_FLAG_DISABLED; - normal_trigger_state.wEndYear = 2980; - normal_trigger_state.wEndMonth = 1; - normal_trigger_state.wEndDay = 1; - - - /* Test setting trigger with invalid TriggerType and Type */ - normal_trigger_state.TriggerType = TASK_TIME_TRIGGER_ONCE; - normal_trigger_state.Type.Weekly.WeeksInterval = 2; - normal_trigger_state.Type.Weekly.rgfDaysOfTheWeek = (TASK_MONDAY | TASK_TUESDAY); - hres = ITaskTrigger_SetTrigger(test_trigger, &normal_trigger_state); - ok(hres == S_OK, "Failed to set trigger: 0x%08x\n", hres); - memset(&trigger_state, 0xcf, sizeof(trigger_state)); - trigger_state.cbTriggerSize = sizeof(trigger_state); - hres = ITaskTrigger_GetTrigger(test_trigger, &trigger_state); - ok(trigger_state.Type.Weekly.WeeksInterval == 0xcfcf, - "Expected WeeksInterval set remain untouched: %d\n", - trigger_state.Type.Weekly.WeeksInterval); - ok(trigger_state.Type.Weekly.rgfDaysOfTheWeek == 0xcfcf, - "Expected WeeksInterval set remain untouched: %d\n", - trigger_state.Type.Weekly.rgfDaysOfTheWeek); - normal_trigger_state.TriggerType = TASK_TIME_TRIGGER_DAILY; - normal_trigger_state.Type.Daily.DaysInterval = 1; - hres = ITaskTrigger_SetTrigger(test_trigger, &normal_trigger_state); - - /* Test setting trigger with set wRandomMinutesInterval */ - normal_trigger_state.wRandomMinutesInterval = 5; - hres = ITaskTrigger_SetTrigger(test_trigger, &normal_trigger_state); - ok(hres == S_OK, "Failed to set trigger: 0x%08x\n", hres); - memset(&trigger_state, 0xcf, sizeof(trigger_state)); - trigger_state.cbTriggerSize = sizeof(trigger_state); - hres = ITaskTrigger_GetTrigger(test_trigger, &trigger_state); - ok(trigger_state.wRandomMinutesInterval == 0, - "wRandomMinutesInterval should be set to zero\n"); - normal_trigger_state.wRandomMinutesInterval = 0; - - /* Test GetTrigger using invalid cbTriggerSiz in pTrigger. In - * contrast to available documentation, this succeeds in practice. */ - hres = ITaskTrigger_SetTrigger(test_trigger, &normal_trigger_state); - ok(hres == S_OK, "Failed to set trigger: 0x%08x\n", hres); - memset(&trigger_state, 0xcf, sizeof(trigger_state)); - trigger_state.cbTriggerSize = sizeof(trigger_state) - 1; - hres = ITaskTrigger_GetTrigger(test_trigger, &trigger_state); - ok(hres == S_OK, "Failed to GetTrigger\n"); - ok(compare_trigger_state(trigger_state, normal_trigger_state), - "Invalid state\n"); - memset(&trigger_state, 0xcf, sizeof(trigger_state)); - trigger_state.cbTriggerSize = 0; - hres = ITaskTrigger_GetTrigger(test_trigger, &trigger_state); - ok(hres == S_OK, "Failed to GetTrigger\n"); - ok(compare_trigger_state(trigger_state, normal_trigger_state), - "Invalid state\n"); - - - cleanup_trigger(); - return; -} - - -START_TEST(task_trigger) -{ - CoInitialize(NULL); - test_SetTrigger_GetTrigger(); - CoUninitialize(); -} diff --git a/rostests/winetests/mstask/testlist.c b/rostests/winetests/mstask/testlist.c deleted file mode 100644 index f27d0222901..00000000000 --- a/rostests/winetests/mstask/testlist.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_task(void); -extern void func_task_scheduler(void); -extern void func_task_trigger(void); - -const struct test winetest_testlist[] = -{ - { "task", func_task }, - { "task_scheduler", func_task_scheduler }, - { "task_trigger", func_task_trigger }, - { 0, 0 } -}; diff --git a/rostests/winetests/msvcrt/CMakeLists.txt b/rostests/winetests/msvcrt/CMakeLists.txt deleted file mode 100644 index eedc741b1f0..00000000000 --- a/rostests/winetests/msvcrt/CMakeLists.txt +++ /dev/null @@ -1,33 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_CRT_NONSTDC_NO_DEPRECATE) - -list(APPEND SOURCE - cpp.c - data.c - dir.c - environ.c - file.c - headers.c - heap.c - locale.c - misc.c - printf.c - scanf.c - signal.c - string.c - testlist.c - time.c) - -add_executable(msvcrt_winetest ${SOURCE}) - -if(MSVC) - target_link_libraries(msvcrt_winetest oldnames) -else() - add_target_compile_flags(msvcrt_winetest "-Wno-format") -endif() - -set_module_type(msvcrt_winetest win32cui) -add_importlibs(msvcrt_winetest msvcrt kernel32 ntdll) -add_cd_file(TARGET msvcrt_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/msvcrt/cpp.c b/rostests/winetests/msvcrt/cpp.c deleted file mode 100644 index bb6ba166de9..00000000000 --- a/rostests/winetests/msvcrt/cpp.c +++ /dev/null @@ -1,1095 +0,0 @@ -/* Unit test suite for msvcrt C++ objects - * - * Copyright 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 - * - * NOTES - * This tests is only valid for ix86 platforms, on others it's a no-op. - * Some tests cannot be checked with ok(), for example the dtors. We simply - * call them to ensure we don't crash ;-) - * - * If we build this test with VC++ in debug mode, we will fail in _chkstk() - * or at program exit malloc() checking if these methods haven't been - * implemented correctly (they have). - * - * Tested with a range of native msvcrt's from v4 -> v7. - */ -#include "wine/test.h" -#include "winbase.h" -#include "winnt.h" - -#ifndef __i386__ -/* Skip these tests for non x86 platforms */ -START_TEST(cpp) -{ -} -#else - -typedef struct __exception -{ - void *vtable; - char *name; - int do_free; -} exception; - -typedef struct __type_info -{ - void *vtable; - char *name; - char mangled[16]; -} type_info; - -/* Function pointers. We need to use these to call these funcs as __thiscall */ -static HMODULE hMsvcrt; - -static void* (__cdecl *poperator_new)(unsigned int); -static void (__cdecl *poperator_delete)(void*); -static void* (__cdecl *pmalloc)(unsigned int); -static void (__cdecl *pfree)(void*); - -/* exception */ -static void (WINAPI *pexception_ctor)(exception*,LPCSTR*); -static void (WINAPI *pexception_copy_ctor)(exception*,exception*); -static void (WINAPI *pexception_default_ctor)(exception*); -static void (WINAPI *pexception_dtor)(exception*); -static exception* (WINAPI *pexception_opequals)(exception*,exception*); -static char* (WINAPI *pexception_what)(exception*); -static void* (WINAPI *pexception_vtable)(exception*); -static void (WINAPI *pexception_vector_dtor)(exception*,unsigned int); -static void (WINAPI *pexception_scalar_dtor)(exception*,unsigned int); - -/* bad_typeid */ -static void (WINAPI *pbad_typeid_ctor)(exception*,LPCSTR); -static void (WINAPI *pbad_typeid_ctor_closure)(exception*); -static void (WINAPI *pbad_typeid_copy_ctor)(exception*,exception*); -static void (WINAPI *pbad_typeid_dtor)(exception*); -static exception* (WINAPI *pbad_typeid_opequals)(exception*,exception*); -static char* (WINAPI *pbad_typeid_what)(exception*); -static void* (WINAPI *pbad_typeid_vtable)(exception*); -static void (WINAPI *pbad_typeid_vector_dtor)(exception*,unsigned int); -static void (WINAPI *pbad_typeid_scalar_dtor)(exception*,unsigned int); - -/* bad_cast */ -static void (WINAPI *pbad_cast_ctor)(exception*,LPCSTR*); -static void (WINAPI *pbad_cast_ctor2)(exception*,LPCSTR); -static void (WINAPI *pbad_cast_ctor_closure)(exception*); -static void (WINAPI *pbad_cast_copy_ctor)(exception*,exception*); -static void (WINAPI *pbad_cast_dtor)(exception*); -static exception* (WINAPI *pbad_cast_opequals)(exception*,exception*); -static char* (WINAPI *pbad_cast_what)(exception*); -static void* (WINAPI *pbad_cast_vtable)(exception*); -static void (WINAPI *pbad_cast_vector_dtor)(exception*,unsigned int); -static void (WINAPI *pbad_cast_scalar_dtor)(exception*,unsigned int); - -/* __non_rtti_object */ -static void (WINAPI *p__non_rtti_object_ctor)(exception*,LPCSTR); -static void (WINAPI *p__non_rtti_object_copy_ctor)(exception*,exception*); -static void (WINAPI *p__non_rtti_object_dtor)(exception*); -static exception* (WINAPI *p__non_rtti_object_opequals)(exception*,exception*); -static char* (WINAPI *p__non_rtti_object_what)(exception*); -static void* (WINAPI *p__non_rtti_object_vtable)(exception*); -static void (WINAPI *p__non_rtti_object_vector_dtor)(exception*,unsigned int); -static void (WINAPI *p__non_rtti_object_scalar_dtor)(exception*,unsigned int); - -/* type_info */ -static void (WINAPI *ptype_info_dtor)(type_info*); -static char* (WINAPI *ptype_info_raw_name)(type_info*); -static char* (WINAPI *ptype_info_name)(type_info*); -static int (WINAPI *ptype_info_before)(type_info*,type_info*); -static int (WINAPI *ptype_info_opequals_equals)(type_info*,type_info*); -static int (WINAPI *ptype_info_opnot_equals)(type_info*,type_info*); - -/* RTTI */ -static type_info* (__cdecl *p__RTtypeid)(void*); -static void* (__cdecl *p__RTCastToVoid)(void*); -static void* (__cdecl *p__RTDynamicCast)(void*,int,void*,void*,int); - -/*Demangle*/ -static char* (__cdecl *p__unDName)(char*,const char*,int,void*,void*,unsigned short int); - - -/* _very_ early native versions have serious RTTI bugs, so we check */ -static void* bAncientVersion; - -/* Emulate a __thiscall */ -#ifdef _MSC_VER -static inline void* do_call_func1(void *func, void *_this) -{ - volatile void* retval = 0; - __asm - { - push ecx - mov ecx, _this - call func - mov retval, eax - pop ecx - } - return (void*)retval; -} - -static inline void* do_call_func2(void *func, void *_this, const void* arg) -{ - volatile void* retval = 0; - __asm - { - push ecx - push arg - mov ecx, _this - call func - mov retval, eax - pop ecx - } - return (void*)retval; -} -#else -static void* do_call_func1(void *func, void *_this) -{ - void *ret, *dummy; - __asm__ __volatile__ ("call *%2" - : "=a" (ret), "=c" (dummy) - : "g" (func), "1" (_this) - : "edx", "memory" ); - return ret; -} -static void* do_call_func2(void *func, void *_this, const void* arg) -{ - void *ret, *dummy; - __asm__ __volatile__ ("pushl %3\n\tcall *%2" - : "=a" (ret), "=c" (dummy) - : "r" (func), "r" (arg), "1" (_this) - : "edx", "memory" ); - return ret; -} -#endif - -#define call_func1(x,y) do_call_func1((void*)x,(void*)y) -#define call_func2(x,y,z) do_call_func2((void*)x,(void*)y,(const void*)z) - -/* Some exports are only available in later versions */ -#define SETNOFAIL(x,y) x = (void*)GetProcAddress(hMsvcrt,y) -#define SET(x,y) do { SETNOFAIL(x,y); ok(x != NULL, "Export '%s' not found\n", y); } while(0) - -static void InitFunctionPtrs(void) -{ - hMsvcrt = GetModuleHandleA("msvcrt.dll"); - if (!hMsvcrt) - hMsvcrt = GetModuleHandleA("msvcrtd.dll"); - ok(hMsvcrt != 0, "GetModuleHandleA failed\n"); - if (hMsvcrt) - { - if (sizeof(void *) > sizeof(int)) /* 64-bit has different names */ - { - SETNOFAIL(poperator_new, "??_U@YAPEAX_K@Z"); - SETNOFAIL(poperator_delete, "??_V@YAXPEAX@Z"); - } - else - { - SETNOFAIL(poperator_new, "??_U@YAPAXI@Z"); - SETNOFAIL(poperator_delete, "??_V@YAXPAX@Z"); - } - SET(pmalloc, "malloc"); - SET(pfree, "free"); - - if (!poperator_new) - poperator_new = pmalloc; - if (!poperator_delete) - poperator_delete = pfree; - - SET(pexception_ctor, "??0exception@@QAE@ABQBD@Z"); - SET(pexception_copy_ctor, "??0exception@@QAE@ABV0@@Z"); - SET(pexception_default_ctor, "??0exception@@QAE@XZ"); - SET(pexception_dtor, "??1exception@@UAE@XZ"); - SET(pexception_opequals, "??4exception@@QAEAAV0@ABV0@@Z"); - SET(pexception_what, "?what@exception@@UBEPBDXZ"); - SET(pexception_vtable, "??_7exception@@6B@"); - SET(pexception_vector_dtor, "??_Eexception@@UAEPAXI@Z"); - SET(pexception_scalar_dtor, "??_Gexception@@UAEPAXI@Z"); - - SET(pbad_typeid_ctor, "??0bad_typeid@@QAE@PBD@Z"); - SETNOFAIL(pbad_typeid_ctor_closure, "??_Fbad_typeid@@QAEXXZ"); - SET(pbad_typeid_copy_ctor, "??0bad_typeid@@QAE@ABV0@@Z"); - SET(pbad_typeid_dtor, "??1bad_typeid@@UAE@XZ"); - SET(pbad_typeid_opequals, "??4bad_typeid@@QAEAAV0@ABV0@@Z"); - SET(pbad_typeid_what, "?what@exception@@UBEPBDXZ"); - SET(pbad_typeid_vtable, "??_7bad_typeid@@6B@"); - SET(pbad_typeid_vector_dtor, "??_Ebad_typeid@@UAEPAXI@Z"); - SET(pbad_typeid_scalar_dtor, "??_Gbad_typeid@@UAEPAXI@Z"); - - SETNOFAIL(pbad_cast_ctor, "??0bad_cast@@QAE@ABQBD@Z"); - if (!pbad_cast_ctor) - SET(pbad_cast_ctor, "??0bad_cast@@AAE@PBQBD@Z"); - SETNOFAIL(pbad_cast_ctor2, "??0bad_cast@@QAE@PBD@Z"); - SETNOFAIL(pbad_cast_ctor_closure, "??_Fbad_cast@@QAEXXZ"); - SET(pbad_cast_copy_ctor, "??0bad_cast@@QAE@ABV0@@Z"); - SET(pbad_cast_dtor, "??1bad_cast@@UAE@XZ"); - SET(pbad_cast_opequals, "??4bad_cast@@QAEAAV0@ABV0@@Z"); - SET(pbad_cast_what, "?what@exception@@UBEPBDXZ"); - SET(pbad_cast_vtable, "??_7bad_cast@@6B@"); - SET(pbad_cast_vector_dtor, "??_Ebad_cast@@UAEPAXI@Z"); - SET(pbad_cast_scalar_dtor, "??_Gbad_cast@@UAEPAXI@Z"); - - SET(p__non_rtti_object_ctor, "??0__non_rtti_object@@QAE@PBD@Z"); - SET(p__non_rtti_object_copy_ctor, "??0__non_rtti_object@@QAE@ABV0@@Z"); - SET(p__non_rtti_object_dtor, "??1__non_rtti_object@@UAE@XZ"); - SET(p__non_rtti_object_opequals, "??4__non_rtti_object@@QAEAAV0@ABV0@@Z"); - SET(p__non_rtti_object_what, "?what@exception@@UBEPBDXZ"); - SET(p__non_rtti_object_vtable, "??_7__non_rtti_object@@6B@"); - SET(p__non_rtti_object_vector_dtor, "??_E__non_rtti_object@@UAEPAXI@Z"); - SET(p__non_rtti_object_scalar_dtor, "??_G__non_rtti_object@@UAEPAXI@Z"); - - SET(ptype_info_dtor, "??1type_info@@UAE@XZ"); - SET(ptype_info_raw_name, "?raw_name@type_info@@QBEPBDXZ"); - SET(ptype_info_name, "?name@type_info@@QBEPBDXZ"); - SET(ptype_info_before, "?before@type_info@@QBEHABV1@@Z"); - SET(ptype_info_opequals_equals, "??8type_info@@QBEHABV0@@Z"); - SET(ptype_info_opnot_equals, "??9type_info@@QBEHABV0@@Z"); - - SET(p__RTtypeid, "__RTtypeid"); - SET(p__RTCastToVoid, "__RTCastToVoid"); - SET(p__RTDynamicCast, "__RTDynamicCast"); - - SET(p__unDName,"__unDName"); - - /* Extremely early versions export logic_error, and crash in RTTI */ - SETNOFAIL(bAncientVersion, "??0logic_error@@QAE@ABQBD@Z"); - } -} - -static void test_exception(void) -{ - static const char* e_name = "An exception name"; - char* name; - exception e, e2, e3, *pe; - - if (!poperator_new || !poperator_delete || - !pexception_ctor || !pexception_copy_ctor || !pexception_default_ctor || - !pexception_dtor || !pexception_opequals || !pexception_what || - !pexception_vtable || !pexception_vector_dtor || !pexception_scalar_dtor) - return; - - /* 'const char*&' ctor */ - memset(&e, 0, sizeof(e)); - call_func2(pexception_ctor, &e, &e_name); - ok(e.vtable != NULL, "Null exception vtable for e\n"); - ok(e.name && e.name != e_name && !strcmp(e.name, "An exception name"), "Bad name '%s' for e\n", e.name); - ok(e.do_free == 1, "do_free set to %d for e\n", e.do_free); - - /* Copy ctor */ - memset(&e2, 0, sizeof(e2)); - call_func2(pexception_copy_ctor, &e2, &e); - ok(e2.vtable != NULL, "Null exception vtable for e2\n"); - ok(e2.name && e2.name != e.name && !strcmp(e2.name, "An exception name"), "Bad exception name for e2\n"); - ok(e2.do_free == 1, "do_free set to %d for e2\n", e2.do_free); - - /* Default ctor */ - memset(&e3, 1, sizeof(e3)); - call_func1(pexception_default_ctor, &e3); - ok(e3.vtable != NULL, "Null exception vtable for e3\n"); - ok(e3.name == NULL, "Bad exception name for e3\n"); - ok(e3.do_free == 0, "do_free set to %d for e3\n", e3.do_free); - - ok(e.vtable == e2.vtable && e.vtable == e3.vtable, "exception vtables differ!\n"); - - /* Test calling the dtors */ - call_func1(pexception_dtor, &e2); - call_func1(pexception_dtor, &e3); - - /* Operator equals */ - memset(&e2, 0, sizeof(e2)); - call_func1(pexception_default_ctor, &e2); - pe = call_func2(pexception_opequals, &e2, &e); - ok(e2.vtable != NULL, "Null exception vtable for e2\n"); - ok(e2.name && e2.name != e.name && !strcmp(e2.name, "An exception name"), "Bad exception name for e2\n"); - ok(e2.do_free == 1, "do_free set to %d for e2\n", e2.do_free); - ok(pe == &e2, "opequals didn't return e2\n"); - - /* what() */ - name = call_func1(pexception_what, &e2); - ok(e2.name == name, "Bad exception name from e2::what()\n"); - - /* vtable ptr */ - ok(e2.vtable == pexception_vtable, "Bad vtable for e2\n"); - call_func1(pexception_dtor, &e2); - - /* new() */ - pe = poperator_new(sizeof(exception)); - ok(pe != NULL, "new() failed\n"); - if (pe) - { - call_func2(pexception_ctor, pe, &e_name); - /* scalar dtor */ - call_func2(pexception_scalar_dtor, pe, 0); /* Shouldn't delete pe */ - pe->name = NULL; - pe->do_free = 0; - call_func2(pexception_scalar_dtor, pe, 1); /* Should delete pe */ - } - - pe = poperator_new(sizeof(exception)); - ok(pe != NULL, "new() failed\n"); - if (pe) - { - /* vector dtor, single element */ - call_func2(pexception_ctor, pe, &e_name); - call_func2(pexception_vector_dtor, pe, 1); /* Should delete pe as single element*/ - } - - pe = poperator_new(sizeof(exception) * 4 + sizeof(int)); - ok(pe != NULL, "new() failed\n"); - if (pe) - { - /* vector dtor, multiple elements */ - char name[] = "a constant"; - *((int*)pe) = 3; - pe = (exception*)((int*)pe + 1); - call_func2(pexception_ctor, &pe[0], &e_name); - call_func2(pexception_ctor, &pe[1], &e_name); - call_func2(pexception_ctor, &pe[2], &e_name); - pe[3].name = name; - pe[3].do_free = 1; /* Crash if we try to free this */ - call_func2(pexception_vector_dtor, pe, 3); /* Should delete all 3 and then pe block */ - } - - /* test our exported vtable is kosher */ - pe = (void*)pexception_vtable; /* Use the exception struct to get vtable ptrs */ - pexception_vector_dtor = (void*)pe->vtable; - pexception_what = (void*)pe->name; - - name = call_func1(pexception_what, &e); - ok(e.name == name, "Bad exception name from vtable e::what()\n"); - - if (p__RTtypeid && !bAncientVersion) - { - /* Check the rtti */ - type_info *ti = p__RTtypeid(&e); - ok (ti && ti->mangled && - !strcmp(ti->mangled, ".?AVexception@@"), "bad rtti for e\n"); - - if (ti) - { - /* Check the returned type_info has rtti too */ - type_info *ti2 = p__RTtypeid(ti); - ok (ti2 != NULL && !strcmp(ti2->mangled, ".?AVtype_info@@"), "bad rtti for e's type_info\n"); - } - } - - call_func2(pexception_vector_dtor, &e, 0); /* Should delete e.name, but not e */ -} - -/* This test is basically a cut 'n' paste of the exception test. but it verifies that - * bad_typeid works the exact same way... */ -static void test_bad_typeid(void) -{ - static const char* e_name = "A bad_typeid name"; - char* name; - exception e, e2, e3, *pe; - - if (!poperator_new || !poperator_delete || - !pbad_typeid_ctor || !pbad_typeid_copy_ctor || - !pbad_typeid_dtor || !pbad_typeid_opequals || !pbad_typeid_what || - !pbad_typeid_vtable || !pbad_typeid_vector_dtor || !pbad_typeid_scalar_dtor) - return; - - /* 'const char*' ctor */ - memset(&e, 0, sizeof(e)); - call_func2(pbad_typeid_ctor, &e, e_name); - ok(e.vtable != NULL, "Null bad_typeid vtable for e\n"); - ok(e.name && e.name != e_name && !strcmp(e.name, "A bad_typeid name"), "Bad name '%s' for e\n", e.name); - ok(e.do_free == 1, "do_free set to %d for e\n", e.do_free); - - /* Copy ctor */ - memset(&e2, 0, sizeof(e2)); - call_func2(pbad_typeid_copy_ctor, &e2, &e); - ok(e2.vtable != NULL, "Null bad_typeid vtable for e2\n"); - ok(e2.name && e2.name != e.name && !strcmp(e2.name, "A bad_typeid name"), "Bad name '%s' for e2\n", e2.name); - ok(e2.do_free == 1, "do_free set to %d for e2\n", e2.do_free); - - /* Ctor closure */ - if (pbad_typeid_ctor_closure) - { - memset(&e3, 1, sizeof(e3)); - call_func1(pbad_typeid_ctor_closure, &e3); - ok(e3.vtable != NULL, "Null bad_typeid vtable for e3\n"); - ok(e3.name && !strcmp(e3.name, "bad typeid"), "Bad bad_typeid name for e3\n"); - ok(e3.do_free == 1, "do_free set to %d for e3\n", e3.do_free); - ok(e.vtable == e3.vtable, "bad_typeid closure vtables differ!\n"); - call_func1(pbad_typeid_dtor, &e3); - } - ok(e.vtable == e2.vtable, "bad_typeid vtables differ!\n"); - - /* Test calling the dtors */ - call_func1(pbad_typeid_dtor, &e2); - - /* Operator equals */ - memset(&e2, 1, sizeof(e2)); - call_func1(pexception_default_ctor, &e2); - pe = call_func2(pbad_typeid_opequals, &e2, &e); - ok(e2.vtable != NULL, "Null bad_typeid vtable for e2\n"); - ok(e2.name && e2.name != e.name && !strcmp(e2.name, "A bad_typeid name"), "Bad bad_typeid name for e2\n"); - ok(e2.do_free == 1, "do_free set to %d for e2\n", e2.do_free); - ok(pe == &e2, "opequals didn't return e2\n"); - - /* what() */ - name = call_func1(pbad_typeid_what, &e2); - ok(e2.name == name, "Bad bad_typeid name from e2::what()\n"); - - /* vtable ptr */ - ok(e2.vtable == pexception_vtable, "Bad vtable for e2\n"); - call_func1(pbad_typeid_dtor, &e2); - - /* new() */ - pe = poperator_new(sizeof(exception)); - ok(pe != NULL, "new() failed\n"); - if (pe) - { - call_func2(pbad_typeid_ctor, pe, e_name); - /* scalar dtor */ - call_func2(pbad_typeid_scalar_dtor, pe, 0); /* Shouldn't delete pe */ - pe->name = NULL; - pe->do_free = 0; - call_func2(pbad_typeid_scalar_dtor, pe, 1); /* Should delete pe */ - } - - pe = poperator_new(sizeof(exception)); - ok(pe != NULL, "new() failed\n"); - if (pe) - { - /* vector dtor, single element */ - call_func2(pbad_typeid_ctor, pe, e_name); - call_func2(pbad_typeid_vector_dtor, pe, 1); /* Should delete pe as single element*/ - } - - pe = poperator_new(sizeof(exception) * 4 + sizeof(int)); - ok(pe != NULL, "new() failed\n"); - if (pe) - { - /* vector dtor, multiple elements */ - *((int*)pe) = 3; - pe = (exception*)((int*)pe + 1); - call_func2(pbad_typeid_ctor, &pe[0], e_name); - call_func2(pbad_typeid_ctor, &pe[1], e_name); - call_func2(pbad_typeid_ctor, &pe[2], e_name); - pe[3].name = 0; - pe[3].do_free = 1; /* Crash if we try to free this element */ - call_func2(pbad_typeid_vector_dtor, pe, 3); /* Should delete all 3 and then pe block */ - } - - /* test our exported vtable is kosher */ - pe = (void*)pbad_typeid_vtable; /* Use the exception struct to get vtable ptrs */ - pbad_typeid_vector_dtor = (void*)pe->vtable; - pbad_typeid_what = (void*)pe->name; - - name = call_func1(pbad_typeid_what, &e); - ok(e.name == name, "Bad bad_typeid name from vtable e::what()\n"); - - if (p__RTtypeid && !bAncientVersion) - { - /* Check the rtti */ - type_info *ti = p__RTtypeid(&e); - ok (ti != NULL && !strcmp(ti->mangled, ".?AVbad_typeid@@"), "bad rtti for e (%s)\n", - !ti ? "null" : ti->mangled); - } - - call_func2(pbad_typeid_vector_dtor, &e, 0); /* Should delete e.name, but not e */ -} - - -/* Ditto for this test... */ -static void test_bad_cast(void) -{ - static const char* e_name = "A bad_cast name"; - char* name; - exception e, e2, e3, *pe; - - if (!poperator_new || !poperator_delete || - !pbad_cast_ctor || !pbad_cast_copy_ctor || - !pbad_cast_dtor || !pbad_cast_opequals || !pbad_cast_what || - !pbad_cast_vtable || !pbad_cast_vector_dtor || !pbad_cast_scalar_dtor) - return; - - if (pbad_cast_ctor2) - { - /* 'const char*' ctor */ - memset(&e, 0, sizeof(e)); - call_func2(pbad_cast_ctor2, &e, e_name); - ok(e.vtable != NULL, "Null bad_cast vtable for e\n"); - ok(e.name && e.name != e_name && !strcmp(e.name, "A bad_cast name"), "Bad name '%s' for e\n", e.name); - ok(e.do_free == 1, "do_free set to %d for e\n", e.do_free); - call_func1(pbad_cast_dtor, &e); - } - - /* 'const char*&' ctor */ - memset(&e, 0, sizeof(e)); - call_func2(pbad_cast_ctor, &e, &e_name); - ok(e.vtable != NULL, "Null bad_cast vtable for e\n"); - ok(e.name && e.name != e_name && !strcmp(e.name, "A bad_cast name"), "Bad name '%s' for e\n", e.name); - ok(e.do_free == 1, "do_free set to %d for e\n", e.do_free); - - /* Copy ctor */ - memset(&e2, 0, sizeof(e2)); - call_func2(pbad_cast_copy_ctor, &e2, &e); - ok(e2.vtable != NULL, "Null bad_cast vtable for e2\n"); - ok(e2.name && e2.name != e.name && !strcmp(e2.name, "A bad_cast name"), "Bad name '%s' for e2\n", e2.name); - ok(e2.do_free == 1, "do_free set to %d for e2\n", e2.do_free); - - /* Ctor closure */ - if (pbad_cast_ctor_closure) - { - memset(&e3, 1, sizeof(e3)); - call_func1(pbad_cast_ctor_closure, &e3); - ok(e3.vtable != NULL, "Null bad_cast vtable for e3\n"); - ok(e3.name && !strcmp(e3.name, "bad cast"), "Bad bad_cast name for e3\n"); - ok(e3.do_free == 1, "do_free set to %d for e3\n", e3.do_free); - ok(e.vtable == e3.vtable, "bad_cast closure vtables differ!\n"); - call_func1(pbad_cast_dtor, &e3); - } - ok(e.vtable == e2.vtable, "bad_cast vtables differ!\n"); - - /* Test calling the dtors */ - call_func1(pbad_cast_dtor, &e2); - - /* Operator equals */ - memset(&e2, 1, sizeof(e2)); - call_func1(pexception_default_ctor, &e2); - pe = call_func2(pbad_cast_opequals, &e2, &e); - ok(e2.vtable != NULL, "Null bad_cast vtable for e2\n"); - ok(e2.name && e2.name != e.name && !strcmp(e2.name, "A bad_cast name"), "Bad bad_cast name for e2\n"); - ok(e2.do_free == 1, "do_free set to %d for e2\n", e2.do_free); - ok(pe == &e2, "opequals didn't return e2\n"); - - /* what() */ - name = call_func1(pbad_cast_what, &e2); - ok(e2.name == name, "Bad bad_cast name from e2::what()\n"); - - /* vtable ptr */ - ok(e2.vtable == pexception_vtable, "Bad vtable for e2\n"); - call_func1(pbad_cast_dtor, &e2); - - /* new() */ - pe = poperator_new(sizeof(exception)); - ok(pe != NULL, "new() failed\n"); - if (pe) - { - call_func2(pbad_cast_ctor, pe, &e_name); - /* scalar dtor */ - call_func2(pbad_cast_scalar_dtor, pe, 0); /* Shouldn't delete pe */ - pe->name = NULL; - pe->do_free = 0; - call_func2(pbad_cast_scalar_dtor, pe, 1); /* Should delete pe */ - } - - pe = poperator_new(sizeof(exception)); - ok(pe != NULL, "new() failed\n"); - if (pe) - { - /* vector dtor, single element */ - call_func2(pbad_cast_ctor, pe, &e_name); - call_func2(pbad_cast_vector_dtor, pe, 1); /* Should delete pe as single element*/ - } - - pe = poperator_new(sizeof(exception) * 4 + sizeof(int)); - ok(pe != NULL, "new() failed\n"); - if (pe) - { - /* vector dtor, multiple elements */ - *((int*)pe) = 3; - pe = (exception*)((int*)pe + 1); - call_func2(pbad_cast_ctor, &pe[0], &e_name); - call_func2(pbad_cast_ctor, &pe[1], &e_name); - call_func2(pbad_cast_ctor, &pe[2], &e_name); - pe[3].name = 0; - pe[3].do_free = 1; /* Crash if we try to free this element */ - call_func2(pbad_cast_vector_dtor, pe, 3); /* Should delete all 3 and then pe block */ - } - - /* test our exported vtable is kosher */ - pe = (void*)pbad_cast_vtable; /* Use the exception struct to get vtable ptrs */ - pbad_cast_vector_dtor = (void*)pe->vtable; - pbad_cast_what = (void*)pe->name; - - name = call_func1(pbad_cast_what, &e); - ok(e.name == name, "Bad bad_cast name from vtable e::what()\n"); - - if (p__RTtypeid && !bAncientVersion) - { - /* Check the rtti */ - type_info *ti = p__RTtypeid(&e); - ok (ti != NULL && !strcmp(ti->mangled, ".?AVbad_cast@@"), "bad rtti for e\n"); - } - call_func2(pbad_cast_vector_dtor, &e, 0); /* Should delete e.name, but not e */ -} - -/* ... and this one */ -static void test___non_rtti_object(void) -{ - static const char* e_name = "A __non_rtti_object name"; - char* name; - exception e, e2, *pe; - - if (!poperator_new || !poperator_delete || - !p__non_rtti_object_ctor || !p__non_rtti_object_copy_ctor || - !p__non_rtti_object_dtor || !p__non_rtti_object_opequals || !p__non_rtti_object_what || - !p__non_rtti_object_vtable || !p__non_rtti_object_vector_dtor || !p__non_rtti_object_scalar_dtor) - return; - - /* 'const char*' ctor */ - memset(&e, 0, sizeof(e)); - call_func2(p__non_rtti_object_ctor, &e, e_name); - ok(e.vtable != NULL, "Null __non_rtti_object vtable for e\n"); - ok(e.name && e.name != e_name && !strcmp(e.name, "A __non_rtti_object name"), "Bad name '%s' for e\n", e.name); - ok(e.do_free == 1, "do_free set to %d for e\n", e.do_free); - - /* Copy ctor */ - memset(&e2, 0, sizeof(e2)); - call_func2(p__non_rtti_object_copy_ctor, &e2, &e); - ok(e2.vtable != NULL, "Null __non_rtti_object vtable for e2\n"); - ok(e2.name && e2.name != e.name && !strcmp(e2.name, "A __non_rtti_object name"), "Bad name '%s' for e2\n", e2.name); - ok(e2.do_free == 1, "do_free set to %d for e2\n", e2.do_free); - ok(e.vtable == e2.vtable, "__non_rtti_object vtables differ!\n"); - - /* Test calling the dtors */ - call_func1(p__non_rtti_object_dtor, &e2); - - /* Operator equals */ - memset(&e2, 1, sizeof(e2)); - call_func1(pexception_default_ctor, &e2); - pe = call_func2(p__non_rtti_object_opequals, &e2, &e); - ok(e2.vtable != NULL, "Null __non_rtti_object vtable for e2\n"); - ok(e2.name && e2.name != e.name && !strcmp(e2.name, "A __non_rtti_object name"), "Bad __non_rtti_object name for e2\n"); - ok(e2.do_free == 1, "do_free set to %d for e2\n", e2.do_free); - ok(pe == &e2, "opequals didn't return e2\n"); - - /* what() */ - name = call_func1(p__non_rtti_object_what, &e2); - ok(e2.name == name, "Bad __non_rtti_object name from e2::what()\n"); - - /* vtable ptr */ - ok(e2.vtable == pexception_vtable, "Bad vtable for e2\n"); - call_func1(p__non_rtti_object_dtor, &e2); - - /* new() */ - pe = poperator_new(sizeof(exception)); - ok(pe != NULL, "new() failed\n"); - if (pe) - { - call_func2(p__non_rtti_object_ctor, pe, e_name); - /* scalar dtor */ - call_func2(p__non_rtti_object_scalar_dtor, pe, 0); /* Shouldn't delete pe */ - pe->name = NULL; - pe->do_free = 0; - call_func2(p__non_rtti_object_scalar_dtor, pe, 1); /* Should delete pe */ - } - - pe = poperator_new(sizeof(exception)); - ok(pe != NULL, "new() failed\n"); - if (pe) - { - /* vector dtor, single element */ - call_func2(p__non_rtti_object_ctor, pe, e_name); - call_func2(p__non_rtti_object_vector_dtor, pe, 1); /* Should delete pe as single element*/ - } - - pe = poperator_new(sizeof(exception) * 4 + sizeof(int)); - ok(pe != NULL, "new() failed\n"); - if (pe) - { - /* vector dtor, multiple elements */ - *((int*)pe) = 3; - pe = (exception*)((int*)pe + 1); - call_func2(p__non_rtti_object_ctor, &pe[0], e_name); - call_func2(p__non_rtti_object_ctor, &pe[1], e_name); - call_func2(p__non_rtti_object_ctor, &pe[2], e_name); - pe[3].name = 0; - pe[3].do_free = 1; /* Crash if we try to free this element */ - call_func2(p__non_rtti_object_vector_dtor, pe, 3); /* Should delete all 3 and then pe block */ - } - - /* test our exported vtable is kosher */ - pe = (void*)p__non_rtti_object_vtable; /* Use the exception struct to get vtable ptrs */ - p__non_rtti_object_vector_dtor = (void*)pe->vtable; - p__non_rtti_object_what = (void*)pe->name; - - name = call_func1(p__non_rtti_object_what, &e); - ok(e.name == name, "Bad __non_rtti_object name from vtable e::what()\n"); - - if (p__RTtypeid && !bAncientVersion) - { - /* Check the rtti */ - type_info *ti = p__RTtypeid(&e); - ok (ti != NULL && !strcmp(ti->mangled, ".?AV__non_rtti_object@@"), "bad rtti for e\n"); - } - call_func2(p__non_rtti_object_vector_dtor, &e, 0); /* Should delete e.name, but not e */ -} - - -static void test_type_info(void) -{ - static type_info t1 = { NULL, NULL,{'.','?','A','V','t','e','s','t','1','@','@',0,0,0,0,0 } }; - static type_info t1_1 = { NULL, NULL,{'?','?','A','V','t','e','s','t','1','@','@',0,0,0,0,0 } }; - static type_info t2 = { NULL, NULL, {'.','?','A','V','t','e','s','t','2','@','@',0,0,0,0,0 } }; - char* name; - int res; - - if (!pmalloc || !pfree || !ptype_info_dtor || !ptype_info_raw_name || - !ptype_info_name || !ptype_info_before || - !ptype_info_opequals_equals || !ptype_info_opnot_equals) - return; - - /* Test calling the dtors */ - call_func1(ptype_info_dtor, &t1); /* No effect, since name is NULL */ - t1.name = pmalloc(64); - strcpy(t1.name, "foo"); - call_func1(ptype_info_dtor, &t1); /* Frees t1.name using 'free' */ - - /* raw_name */ - t1.name = NULL; - name = call_func1(ptype_info_raw_name, &t1); - - /* FIXME: This fails on native; it shouldn't though - native bug? - * ok(name && !strcmp(name, t1.mangled), "bad raw_name '%s' for t1 (expected '%s')\n", name, t1.mangled); - */ - ok(t1.name == NULL, "raw_name() set name for t1\n"); - - /* name */ - t1.name = NULL; - name = call_func1(ptype_info_name, &t1); - ok(name && t1.name && !strcmp(name, t1.name), "bad name '%s' for t1\n", name); - - ok(t1.name && !strcmp(t1.name, "class test1"), "demangled to '%s' for t1\n", t1.name); - call_func1(ptype_info_dtor, &t1); - - /* before */ - t1.name = NULL; - res = (int)call_func2(ptype_info_before, &t1, &t1); - ok(res == 0, "expected 0, got %d\n", res); - res = (int)call_func2(ptype_info_before, &t2, &t1); - ok(res == 0, "expected 0, got %d\n", res); - res = (int)call_func2(ptype_info_before, &t1, &t2); - ok(res == 1, "expected 1, got %d\n", res); - /* Doesn't check first char */ - res = (int)call_func2(ptype_info_before, &t1, &t1_1); - ok(res == 0, "expected 0, got %d\n", res); - - /* opequals_equals */ - t1.name = NULL; - res = (int)call_func2(ptype_info_opequals_equals, &t1, &t1); - ok(res == 1, "expected 1, got %d\n", res); - res = (int)call_func2(ptype_info_opequals_equals, &t1, &t2); - ok(res == 0, "expected 0, got %d\n", res); - res = (int)call_func2(ptype_info_opequals_equals, &t2, &t1); - ok(res == 0, "expected 0, got %d\n", res); - - /* opnot_equals */ - t1.name = NULL; - res = (int)call_func2(ptype_info_opnot_equals, &t1, &t1); - ok(res == 0, "expected 0, got %d\n", res); - res = (int)call_func2(ptype_info_opnot_equals, &t1, &t2); - ok(res == 1, "expected 1, got %d\n", res); - res = (int)call_func2(ptype_info_opnot_equals, &t2, &t1); - ok(res == 1, "expected 1, got %d\n", res); -} - -/* Test RTTI functions */ -static void test_rtti(void) -{ - static const char* e_name = "name"; - type_info *ti,*bti; - exception e,b; - void *casted; - - if (bAncientVersion || - !p__RTCastToVoid || !p__RTtypeid || !pexception_ctor || !pbad_typeid_ctor - || !p__RTDynamicCast || !pexception_dtor || !pbad_typeid_dtor) - return; - - call_func2(pexception_ctor, &e, &e_name); - call_func2(pbad_typeid_ctor, &b, e_name); - - /* dynamic_cast to void* */ - casted = p__RTCastToVoid(&e); - ok (casted == (void*)&e, "failed cast to void\n"); - - /* dynamic_cast up */ - ti = p__RTtypeid(&e); - bti = p__RTtypeid(&b); - - casted = p__RTDynamicCast(&b, 0, NULL, ti, 0); - if (casted) - { - /* New versions do not allow this conversion due to compiler changes */ - ok (casted == (void*)&b, "failed cast from bad_typeid to exception\n"); - } - - /* dynamic_cast down */ - casted = p__RTDynamicCast(&e, 0, NULL, bti, 0); - ok (casted == NULL, "Cast succeeded\n"); - - call_func1(pexception_dtor, &e); - call_func1(pbad_typeid_dtor, &b); -} - -struct _demangle { - LPCSTR mangled; - LPCSTR result; - BOOL test_in_wine; -}; - -static void test_demangle_datatype(void) -{ - char * name; - struct _demangle demangle[]={ -/* { "BlaBla"," ?? ::Bla", FALSE}, */ - { "ABVVec4@ref2@dice@@","class dice::ref2::Vec4 const &",TRUE}, - { "?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$0H@@@", "class CDB_GEN_BIG_ENUM_FLAG", TRUE}, - { "?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$0HO@@@", "class CDB_GEN_BIG_ENUM_FLAG",TRUE}, - { "?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$0HOA@@@", "class CDB_GEN_BIG_ENUM_FLAG",TRUE}, - { "?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$0HOAA@@@", "class CDB_GEN_BIG_ENUM_FLAG",TRUE}, - { "?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$01@@@", "?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$01@@@", FALSE}, -/* { "?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$011@@@", "?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$011@@@",FALSE}, */ - }; - int i, num_test = (sizeof(demangle)/sizeof(struct _demangle)); - - for (i = 0; i < num_test; i++) - { - name = p__unDName(0, demangle[i].mangled, 0, pmalloc, pfree, 0x2800); - if (demangle[i].test_in_wine) - ok(name != NULL && !strcmp(name,demangle[i].result), "Got name \"%s\" for %d\n", name, i); - else - todo_wine ok(name != NULL && !strcmp(name,demangle[i].result), "Got name %s for %d\n", name, i); - if(name) - pfree(name); - } -} - -/* Compare two strings treating multiple spaces (' ', ascii 0x20) in s2 - as single space. Needed for test_demangle as __unDName() returns sometimes - two spaces instead of one in some older native msvcrt dlls. */ -static int strcmp_space(const char *s1, const char *s2) -{ - const char* s2start = s2; - do { - while (*s1 == *s2 && *s1) { - s1++; - s2++; - } - if (*s2 == ' ' && s2 > s2start && *(s2 - 1) == ' ') - s2++; - else - break; - } while (*s1 && *s2); - return *s1 - *s2; -} - -static void test_demangle(void) -{ - static struct {const char* in; const char* out; const char *broken; unsigned int flags;} test[] = { -/* 0 */ {"??0bad_alloc@std@@QAE@ABV01@@Z", - "public: __thiscall std::bad_alloc::bad_alloc(class std::bad_alloc const &)", - "public: __thiscall std::bad_alloc::bad_alloc(class bad_alloc::bad_alloc const &)"}, -/* 1 */ {"??0bad_alloc@std@@QAE@PBD@Z", - "public: __thiscall std::bad_alloc::bad_alloc(char const *)"}, -/* 2 */ {"??0bad_cast@@AAE@PBQBD@Z", - "private: __thiscall bad_cast::bad_cast(char const * const *)"}, -/* 3 */ {"??0bad_cast@@QAE@ABQBD@Z", - "public: __thiscall bad_cast::bad_cast(char const * const &)"}, -/* 4 */ {"??0bad_cast@@QAE@ABV0@@Z", - "public: __thiscall bad_cast::bad_cast(class bad_cast const &)"}, -/* 5 */ {"??0bad_exception@std@@QAE@ABV01@@Z", - "public: __thiscall std::bad_exception::bad_exception(class std::bad_exception const &)", - "public: __thiscall std::bad_exception::bad_exception(class bad_exception::bad_exception const &)"}, -/* 6 */ {"??0bad_exception@std@@QAE@PBD@Z", - "public: __thiscall std::bad_exception::bad_exception(char const *)"}, -/* 7 */ {"??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@ABV01@@Z", - "public: __thiscall std::basic_filebuf >::basic_filebuf >(class std::basic_filebuf > const &)", - "public: __thiscall std::basic_filebuf >::basic_filebuf >(class basic_filebuf >::basic_filebuf > const &)"}, -/* 8 */ {"??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z", - "public: __thiscall std::basic_filebuf >::basic_filebuf >(struct _iobuf *)"}, -/* 9 */ {"??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z", - "public: __thiscall std::basic_filebuf >::basic_filebuf >(enum std::_Uninitialized)", - "public: __thiscall std::basic_filebuf >::basic_filebuf >(enum basic_filebuf >::_Uninitialized)"}, -/* 10 */ {"??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@ABV01@@Z", - "public: __thiscall std::basic_filebuf >::basic_filebuf >(class std::basic_filebuf > const &)", - "public: __thiscall std::basic_filebuf >::basic_filebuf >(class basic_filebuf >::basic_filebuf > const &)"}, -/* 11 */ {"??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z", - "public: __thiscall std::basic_filebuf >::basic_filebuf >(struct _iobuf *)"}, -/* 12 */ {"??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z", - "public: __thiscall std::basic_filebuf >::basic_filebuf >(enum std::_Uninitialized)", - "public: __thiscall std::basic_filebuf >::basic_filebuf >(enum basic_filebuf >::_Uninitialized)"}, -/* 13 */ {"??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z", - "public: __thiscall std::basic_stringstream,class std::allocator >::basic_stringstream,class std::allocator >(class std::basic_stringstream,class std::allocator > const &)", - "public: __thiscall std::basic_stringstream,class std::allocator >::basic_stringstream,class std::allocator >(class basic_stringstream,class std::allocator >::basic_stringstream,class std::allocator > const &)"}, -/* 14 */ {"??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z", - "public: __thiscall std::basic_stringstream,class std::allocator >::basic_stringstream,class std::allocator >(class std::basic_string,class std::allocator > const &,int)", - "public: __thiscall std::basic_stringstream,class std::allocator >::basic_stringstream,class std::allocator >(class basic_stringstream,class std::allocator >::basic_string,class std::allocator > const &,int)"}, -/* 15 */ {"??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z", - "public: __thiscall std::basic_stringstream,class std::allocator >::basic_stringstream,class std::allocator >(int)"}, -/* 16 */ {"??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV01@@Z", - "public: __thiscall std::basic_stringstream,class std::allocator >::basic_stringstream,class std::allocator >(class std::basic_stringstream,class std::allocator > const &)", - "public: __thiscall std::basic_stringstream,class std::allocator >::basic_stringstream,class std::allocator >(class basic_stringstream,class std::allocator >::basic_stringstream,class std::allocator > const &)"}, -/* 17 */ {"??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z", - "public: __thiscall std::basic_stringstream,class std::allocator >::basic_stringstream,class std::allocator >(class std::basic_string,class std::allocator > const &,int)", - "public: __thiscall std::basic_stringstream,class std::allocator >::basic_stringstream,class std::allocator >(class basic_stringstream,class std::allocator >::basic_string,class std::allocator > const &,int)"}, -/* 18 */ {"??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z", - "public: __thiscall std::basic_stringstream,class std::allocator >::basic_stringstream,class std::allocator >(int)"}, -/* 19 */ {"??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z", - "public: __thiscall std::num_get > >::num_get > >(class std::_Locinfo const &,unsigned int)", - "public: __thiscall std::num_get > >::num_get > >(class num_get > >::_Locinfo const &,unsigned int)"}, -/* 20 */ {"??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z", - "public: __thiscall std::num_get > >::num_get > >(unsigned int)"}, -/* 21 */ {"??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z", - "public: __thiscall std::num_get > >::num_get > >(class std::_Locinfo const &,unsigned int)", - "public: __thiscall std::num_get > >::num_get > >(class num_get > >::_Locinfo const &,unsigned int)"}, -/* 22 */ {"??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z", "public: __thiscall std::num_get > >::num_get > >(unsigned int)"}, -/* 23 */ {"??0streambuf@@QAE@ABV0@@Z", "public: __thiscall streambuf::streambuf(class streambuf const &)"}, -/* 24 */ {"??0strstreambuf@@QAE@ABV0@@Z", "public: __thiscall strstreambuf::strstreambuf(class strstreambuf const &)"}, -/* 25 */ {"??0strstreambuf@@QAE@H@Z", "public: __thiscall strstreambuf::strstreambuf(int)"}, -/* 26 */ {"??0strstreambuf@@QAE@P6APAXJ@ZP6AXPAX@Z@Z", "public: __thiscall strstreambuf::strstreambuf(void * (__cdecl*)(long),void (__cdecl*)(void *))"}, -/* 27 */ {"??0strstreambuf@@QAE@PADH0@Z", "public: __thiscall strstreambuf::strstreambuf(char *,int,char *)"}, -/* 28 */ {"??0strstreambuf@@QAE@PAEH0@Z", "public: __thiscall strstreambuf::strstreambuf(unsigned char *,int,unsigned char *)"}, -/* 29 */ {"??0strstreambuf@@QAE@XZ", "public: __thiscall strstreambuf::strstreambuf(void)"}, -/* 30 */ {"??1__non_rtti_object@std@@UAE@XZ", "public: virtual __thiscall std::__non_rtti_object::~__non_rtti_object(void)"}, -/* 31 */ {"??1__non_rtti_object@@UAE@XZ", "public: virtual __thiscall __non_rtti_object::~__non_rtti_object(void)"}, -/* 32 */ {"??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UAE@XZ", "public: virtual __thiscall std::num_get > >::~num_get > >(void)"}, -/* 33 */ {"??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UAE@XZ", "public: virtual __thiscall std::num_get > >::~num_get > >(void)"}, -/* 34 */ {"??4istream_withassign@@QAEAAV0@ABV0@@Z", "public: class istream_withassign & __thiscall istream_withassign::operator=(class istream_withassign const &)"}, -/* 35 */ {"??4istream_withassign@@QAEAAVistream@@ABV1@@Z", "public: class istream & __thiscall istream_withassign::operator=(class istream const &)"}, -/* 36 */ {"??4istream_withassign@@QAEAAVistream@@PAVstreambuf@@@Z", "public: class istream & __thiscall istream_withassign::operator=(class streambuf *)"}, -/* 37 */ {"??5std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAC@Z", "class std::basic_istream > & __cdecl std::operator>>(class std::basic_istream > &,signed char &)"}, -/* 38 */ {"??5std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAD@Z", "class std::basic_istream > & __cdecl std::operator>>(class std::basic_istream > &,char &)"}, -/* 39 */ {"??5std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAE@Z", "class std::basic_istream > & __cdecl std::operator>>(class std::basic_istream > &,unsigned char &)"}, -/* 40 */ {"??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z", "public: class std::basic_ostream > & __thiscall std::basic_ostream >::operator<<(class std::ios_base & (__cdecl*)(class std::ios_base &))"}, -/* 41 */ {"??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z", "public: class std::basic_ostream > & __thiscall std::basic_ostream >::operator<<(class std::basic_streambuf > *)"}, -/* 42 */ {"??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PBX@Z", "public: class std::basic_ostream > & __thiscall std::basic_ostream >::operator<<(void const *)"}, -/* 43 */ {"??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@", "const std::basic_fstream >::`vbtable'{for `std::basic_ostream >'}"}, -/* 44 */ {"??_8?$basic_fstream@GU?$char_traits@G@std@@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@", "const std::basic_fstream >::`vbtable'{for `std::basic_istream >'}"}, -/* 45 */ {"??_8?$basic_fstream@GU?$char_traits@G@std@@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@", "const std::basic_fstream >::`vbtable'{for `std::basic_ostream >'}"}, -/* 46 */ {"??9std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z", "bool __cdecl std::operator!=(char const *,class std::basic_string,class std::allocator > const &)"}, -/* 47 */ {"??9std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z", "bool __cdecl std::operator!=(unsigned short const *,class std::basic_string,class std::allocator > const &)"}, -/* 48 */ {"??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z", "public: char & __thiscall std::basic_string,class std::allocator >::operator[](unsigned int)"}, -/* 49 */ {"??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z", "public: char const & __thiscall std::basic_string,class std::allocator >::operator[](unsigned int)const "}, -/* 50 */ {"??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAGI@Z", "public: unsigned short & __thiscall std::basic_string,class std::allocator >::operator[](unsigned int)"}, -/* 51 */ {"??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEABGI@Z", "public: unsigned short const & __thiscall std::basic_string,class std::allocator >::operator[](unsigned int)const "}, -/* 52 */ {"?abs@std@@YAMABV?$complex@M@1@@Z", "float __cdecl std::abs(class std::complex const &)"}, -/* 53 */ {"?abs@std@@YANABV?$complex@N@1@@Z", "double __cdecl std::abs(class std::complex const &)"}, -/* 54 */ {"?abs@std@@YAOABV?$complex@O@1@@Z", "long double __cdecl std::abs(class std::complex const &)"}, -/* 55 */ {"?cin@std@@3V?$basic_istream@DU?$char_traits@D@std@@@1@A", "class std::basic_istream > std::cin"}, -/* 56 */ {"?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAG@Z", "protected: virtual class std::istreambuf_iterator > __thiscall std::num_get > >::do_get(class std::istreambuf_iterator >,class std::istreambuf_iterator >,class std::ios_base &,int &,unsigned short &)const "}, -/* 57 */ {"?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAI@Z", "protected: virtual class std::istreambuf_iterator > __thiscall std::num_get > >::do_get(class std::istreambuf_iterator >,class std::istreambuf_iterator >,class std::ios_base &,int &,unsigned int &)const "}, -/* 58 */ {"?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAJ@Z", "protected: virtual class std::istreambuf_iterator > __thiscall std::num_get > >::do_get(class std::istreambuf_iterator >,class std::istreambuf_iterator >,class std::ios_base &,int &,long &)const "}, -/* 59 */ {"?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAK@Z", "protected: virtual class std::istreambuf_iterator > __thiscall std::num_get > >::do_get(class std::istreambuf_iterator >,class std::istreambuf_iterator >,class std::ios_base &,int &,unsigned long &)const "}, -/* 60 */ {"?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAM@Z", "protected: virtual class std::istreambuf_iterator > __thiscall std::num_get > >::do_get(class std::istreambuf_iterator >,class std::istreambuf_iterator >,class std::ios_base &,int &,float &)const "}, -/* 61 */ {"?_query_new_handler@@YAP6AHI@ZXZ", "int (__cdecl*__cdecl _query_new_handler(void))(unsigned int)"}, -/* 62 */ {"?register_callback@ios_base@std@@QAEXP6AXW4event@12@AAV12@H@ZH@Z", "public: void __thiscall std::ios_base::register_callback(void (__cdecl*)(enum std::ios_base::event,class std::ios_base &,int),int)"}, -/* 63 */ {"?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@JW4seekdir@ios_base@2@@Z", "public: class std::basic_istream > & __thiscall std::basic_istream >::seekg(long,enum std::ios_base::seekdir)"}, -/* 64 */ {"?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z", "public: class std::basic_istream > & __thiscall std::basic_istream >::seekg(class std::fpos)"}, -/* 65 */ {"?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@JW4seekdir@ios_base@2@@Z", "public: class std::basic_istream > & __thiscall std::basic_istream >::seekg(long,enum std::ios_base::seekdir)"}, -/* 66 */ {"?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z", "public: class std::basic_istream > & __thiscall std::basic_istream >::seekg(class std::fpos)"}, -/* 67 */ {"?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z", "protected: virtual class std::fpos __thiscall std::basic_filebuf >::seekoff(long,enum std::ios_base::seekdir,int)"}, -/* 68 */ {"?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z", "protected: virtual class std::fpos __thiscall std::basic_filebuf >::seekoff(long,enum std::ios_base::seekdir,int)"}, -/* 69 */ {"?set_new_handler@@YAP6AXXZP6AXXZ@Z", "void (__cdecl*__cdecl set_new_handler(void (__cdecl*)(void)))(void)"}, -/* 70 */ {"?str@?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z", "public: void __thiscall std::basic_istringstream,class std::allocator >::str(class std::basic_string,class std::allocator > const &)"}, -/* 71 */ {"?str@?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ", "public: class std::basic_string,class std::allocator > __thiscall std::basic_istringstream,class std::allocator >::str(void)const "}, -/* 72 */ {"?str@?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z", "public: void __thiscall std::basic_istringstream,class std::allocator >::str(class std::basic_string,class std::allocator > const &)"}, -/* 73 */ {"?str@?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ", "public: class std::basic_string,class std::allocator > __thiscall std::basic_istringstream,class std::allocator >::str(void)const "}, -/* 74 */ {"?str@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z", "public: void __thiscall std::basic_ostringstream,class std::allocator >::str(class std::basic_string,class std::allocator > const &)"}, -/* 75 */ {"?str@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ", "public: class std::basic_string,class std::allocator > __thiscall std::basic_ostringstream,class std::allocator >::str(void)const "}, -/* 76 */ {"?str@?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z", "public: void __thiscall std::basic_ostringstream,class std::allocator >::str(class std::basic_string,class std::allocator > const &)"}, -/* 77 */ {"?str@?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ", "public: class std::basic_string,class std::allocator > __thiscall std::basic_ostringstream,class std::allocator >::str(void)const "}, -/* 78 */ {"?str@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z", "public: void __thiscall std::basic_stringbuf,class std::allocator >::str(class std::basic_string,class std::allocator > const &)"}, -/* 79 */ {"?str@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ", "public: class std::basic_string,class std::allocator > __thiscall std::basic_stringbuf,class std::allocator >::str(void)const "}, -/* 80 */ {"?str@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z", "public: void __thiscall std::basic_stringbuf,class std::allocator >::str(class std::basic_string,class std::allocator > const &)"}, -/* 81 */ {"?str@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ", "public: class std::basic_string,class std::allocator > __thiscall std::basic_stringbuf,class std::allocator >::str(void)const "}, -/* 82 */ {"?str@?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z", "public: void __thiscall std::basic_stringstream,class std::allocator >::str(class std::basic_string,class std::allocator > const &)"}, -/* 83 */ {"?str@?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ", "public: class std::basic_string,class std::allocator > __thiscall std::basic_stringstream,class std::allocator >::str(void)const "}, -/* 84 */ {"?str@?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z", "public: void __thiscall std::basic_stringstream,class std::allocator >::str(class std::basic_string,class std::allocator > const &)"}, -/* 85 */ {"?str@?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ", "public: class std::basic_string,class std::allocator > __thiscall std::basic_stringstream,class std::allocator >::str(void)const "}, -/* 86 */ {"?_Sync@ios_base@std@@0_NA", "private: static bool std::ios_base::_Sync"}, -/* 87 */ {"??_U@YAPAXI@Z", "void * __cdecl operator new[](unsigned int)"}, -/* 88 */ {"??_V@YAXPAX@Z", "void __cdecl operator delete[](void *)"}, -/* 89 */ {"??X?$_Complex_base@M@std@@QAEAAV01@ABM@Z", "public: class std::_Complex_base & __thiscall std::_Complex_base::operator*=(float const &)"}, -/* 90 */ {"??Xstd@@YAAAV?$complex@M@0@AAV10@ABV10@@Z", "class std::complex & __cdecl std::operator*=(class std::complex &,class std::complex const &)"}, -/* 91 */ {"?aaa@@YAHAAUbbb@@@Z", "int __cdecl aaa(struct bbb &)"}, -/* 92 */ {"?aaa@@YAHBAUbbb@@@Z", "int __cdecl aaa(struct bbb & volatile)"}, -/* 93 */ {"?aaa@@YAHPAUbbb@@@Z", "int __cdecl aaa(struct bbb *)"}, -/* 94 */ {"?aaa@@YAHQAUbbb@@@Z", "int __cdecl aaa(struct bbb * const)"}, -/* 95 */ {"?aaa@@YAHRAUbbb@@@Z", "int __cdecl aaa(struct bbb * volatile)"}, -/* 96 */ {"?aaa@@YAHSAUbbb@@@Z", "int __cdecl aaa(struct bbb * const volatile)"}, -/* 97 */ {"??0aa.a@@QAE@XZ", "??0aa.a@@QAE@XZ"}, -/* 98 */ {"??0aa$_3a@@QAE@XZ", "public: __thiscall aa$_3a::aa$_3a(void)"}, -/* 99 */ {"??2?$aaa@AAUbbb@@AAUccc@@AAU2@@ddd@1eee@2@QAEHXZ", "public: int __thiscall eee::eee::ddd::ddd::aaa::operator new(void)"}, -/* 100 */ {"?pSW@@3P6GHKPAX0PAU_tagSTACKFRAME@@0P6GH0K0KPAK@ZP6GPAX0K@ZP6GK0K@ZP6GK00PAU_tagADDRESS@@@Z@ZA", "int (__stdcall* pSW)(unsigned long,void *,void *,struct _tagSTACKFRAME *,void *,int (__stdcall*)(void *,unsigned long,void *,unsigned long,unsigned long *),void * (__stdcall*)(void *,unsigned long),unsigned long (__stdcall*)(void *,unsigned long),unsigned long (__stdcall*)(void *,void *,struct _tagADDRESS *))"}, -/* 101 */ {"?$_aaa@Vbbb@@", "_aaa"}, -/* 102 */ {"?$aaa@Vbbb@ccc@@Vddd@2@", "aaa"}, -/* 103 */ { "??0?$Foo@P6GHPAX0@Z@@QAE@PAD@Z", "public: __thiscall Foo::Foo(char *)"}, -/* 104 */ { "??0?$Foo@P6GHPAX0@Z@@QAE@PAD@Z", "__thiscall Foo::Foo(char *)", NULL, 0x880}, -/* 105 */ { "?Qux@Bar@@0PAP6AHPAV1@AAH1PAH@ZA", "private: static int (__cdecl** Bar::Qux)(class Bar *,int &,int &,int *)" }, -/* 106 */ { "?Qux@Bar@@0PAP6AHPAV1@AAH1PAH@ZA", "Bar::Qux", NULL, 0x1800}, -/* 107 */ {"?$AAA@$DBAB@", "AAA<`template-parameter257'>"}, -/* 108 */ {"?$AAA@?C@", "AAA<`template-parameter-2'>"}, -/* 109 */ {"?$AAA@PAUBBB@@", "AAA"}, -/* 110 */ {"??$ccccc@PAVaaa@@@bar@bb@foo@@DGPAV0@PAV0@PAVee@@IPAPAVaaa@@1@Z", - "private: static class bar * __stdcall foo::bb::bar::ccccc(class bar *,class ee *,unsigned int,class aaa * *,class ee *)", - "??$ccccc@PAVaaa@@@bar@bb@foo@@DGPAV0@PAV0@PAVee@@IPAPAVaaa@@1@Z"}, -/* 111 */ {"?f@T@@QAEHQCY1BE@BO@D@Z", "public: int __thiscall T::f(char (volatile * const)[20][30])"}, -/* 112 */ {"?f@T@@QAEHQAY2BE@BO@CI@D@Z", "public: int __thiscall T::f(char (* const)[20][30][40])"}, -/* 113 */ {"?f@T@@QAEHQAY1BE@BO@$$CBD@Z", "public: int __thiscall T::f(char const (* const)[20][30])"}, -/* 114 */ {"??0?$Foo@U?$vector_c@H$00$01$0?1$0A@$0A@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@@mpl@boost@@@@QAE@XZ", - "public: __thiscall Foo >::Foo >(void)"}, -/* 115 */ {"?swprintf@@YAHPAGIPBGZZ", "int __cdecl swprintf(unsigned short *,unsigned int,unsigned short const *,...)"}, -/* 116 */ {"?vswprintf@@YAHPAGIPBGPAD@Z", "int __cdecl vswprintf(unsigned short *,unsigned int,unsigned short const *,char *)"}, -/* 117 */ {"?vswprintf@@YAHPA_WIPB_WPAD@Z", "int __cdecl vswprintf(wchar_t *,unsigned int,wchar_t const *,char *)"}, -/* 118 */ {"?swprintf@@YAHPA_WIPB_WZZ", "int __cdecl swprintf(wchar_t *,unsigned int,wchar_t const *,...)"}, -/* 119 */ {"??Xstd@@YAAEAV?$complex@M@0@AEAV10@AEBV10@@Z", "class std::complex & __ptr64 __cdecl std::operator*=(class std::complex & __ptr64,class std::complex const & __ptr64)"}, -/* 120 */ {"?_Doraise@bad_cast@std@@MEBAXXZ", "protected: virtual void __cdecl std::bad_cast::_Doraise(void)const __ptr64"}, -/* 121 */ {"??$?DM@std@@YA?AV?$complex@M@0@ABMABV10@@Z", - "class std::complex __cdecl std::operator*(float const &,class std::complex const &)", - "??$?DM@std@@YA?AV?$complex@M@0@ABMABV10@@Z"}, -/* 122 */ {"?_R2@?BN@???$_Fabs@N@std@@YANAEBV?$complex@N@1@PEAH@Z@4NB", - "double const `double __cdecl std::_Fabs(class std::complex const & __ptr64,int * __ptr64)'::`29'::_R2", - "?_R2@?BN@???$_Fabs@N@std@@YANAEBV?$complex@N@1@PEAH@Z@4NB"}, - - }; - int i, num_test = (sizeof(test)/sizeof(test[0])); - char* name; - - for (i = 0; i < num_test; i++) - { - name = p__unDName(0, test[i].in, 0, pmalloc, pfree, test[i].flags); - ok(name != NULL, "%u: unDName failed\n", i); - if (!name) continue; - ok( !strcmp_space(test[i].out, name) || - broken(test[i].broken && !strcmp_space(test[i].broken, name)), - "%u: Got name \"%s\"\n", i, name ); - ok( !strcmp_space(test[i].out, name) || - broken(test[i].broken && !strcmp_space(test[i].broken, name)), - "%u: Expected \"%s\"\n", i, test[i].out ); - pfree(name); - } -} - -START_TEST(cpp) -{ - InitFunctionPtrs(); - - test_exception(); - test_bad_typeid(); - test_bad_cast(); - test___non_rtti_object(); - test_type_info(); - test_rtti(); - test_demangle_datatype(); - test_demangle(); -} -#endif /* __i386__ */ diff --git a/rostests/winetests/msvcrt/data.c b/rostests/winetests/msvcrt/data.c deleted file mode 100644 index c20be18df3e..00000000000 --- a/rostests/winetests/msvcrt/data.c +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Tests msvcrt/data.c - * - * Copyright 2006 Andrew Ziem - * - * 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/test.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -typedef void (__cdecl *_INITTERMFUN)(void); -static void (__cdecl *p_initterm)(_INITTERMFUN *start, _INITTERMFUN *end); - -static int (__cdecl *p_get_pgmptr)(char **p); - -static int callbacked; - -static void __cdecl initcallback(void) -{ - callbacked++; -} - -#define initterm_test(start, end, expected) \ - callbacked = 0; \ - p_initterm(start, end); \ - ok(expected == callbacked,"_initterm: callbacks count mismatch: got %i, expected %i\n", callbacked, expected); - -static void test_initterm(void) -{ - int i; - static _INITTERMFUN callbacks[4]; - - if (!p_initterm) - return; - - for (i = 0; i < 4; i++) - { - callbacks[i] = initcallback; - } - - initterm_test(&callbacks[0], &callbacks[1], 1); - initterm_test(&callbacks[0], &callbacks[2], 2); - initterm_test(&callbacks[0], &callbacks[3], 3); - - callbacks[1] = NULL; - initterm_test(&callbacks[0], &callbacks[3], 2); -} - -static void test_initvar( HMODULE hmsvcrt ) -{ - OSVERSIONINFO osvi = { sizeof(OSVERSIONINFO) }; - int *pp_winver = (int*)GetProcAddress(hmsvcrt, "_winver"); - int *pp_winmajor = (int*)GetProcAddress(hmsvcrt, "_winmajor"); - int *pp_winminor = (int*)GetProcAddress(hmsvcrt, "_winminor"); - int *pp_osver = (int*)GetProcAddress(hmsvcrt, "_osver"); - int *pp_osplatform = (int*)GetProcAddress(hmsvcrt, "_osplatform"); - unsigned int winver, winmajor, winminor, osver, osplatform; - - if( !( pp_winmajor && pp_winminor && pp_winver)) { - win_skip("_winver variables are not available\n"); - return; - } - winver = *pp_winver; - winminor = *pp_winminor; - winmajor = *pp_winmajor; - GetVersionEx( &osvi); - ok( winminor == osvi.dwMinorVersion, "Wrong value for _winminor %02x expected %02x\n", - winminor, osvi.dwMinorVersion); - ok( winmajor == osvi.dwMajorVersion, "Wrong value for _winmajor %02x expected %02x\n", - winmajor, osvi.dwMajorVersion); - ok( winver == ((osvi.dwMajorVersion << 8) | osvi.dwMinorVersion), - "Wrong value for _winver %02x expected %02x\n", - winver, ((osvi.dwMajorVersion << 8) | osvi.dwMinorVersion)); - if( !pp_osver || !pp_osplatform ) { - win_skip("_osver variables are not available\n"); - return; - } - osver = *pp_osver; - osplatform = *pp_osplatform; - ok( osver == (osvi.dwBuildNumber & 0xffff) || - ((osvi.dwBuildNumber >> 24) == osvi.dwMajorVersion && - ((osvi.dwBuildNumber >> 16) & 0xff) == osvi.dwMinorVersion), /* 95/98/ME */ - "Wrong value for _osver %04x expected %04x\n", - osver, osvi.dwBuildNumber); - ok(osplatform == osvi.dwPlatformId, - "Wrong value for _osplatform %x exprected %x\n", - osplatform, osvi.dwPlatformId); -} - -static void test_get_pgmptr(void) -{ - char *pgm = NULL; - int res; - - if (!p_get_pgmptr) - return; - - res = p_get_pgmptr(&pgm); - - ok( res == 0, "Wrong _get_pgmptr return value %d expected 0\n", res); - ok( pgm != NULL, "_get_pgmptr returned a NULL pointer\n" ); -} - -START_TEST(data) -{ - HMODULE hmsvcrt; - - hmsvcrt = GetModuleHandleA("msvcrt.dll"); - if (!hmsvcrt) - hmsvcrt = GetModuleHandleA("msvcrtd.dll"); - if (hmsvcrt) - { - p_initterm=(void*)GetProcAddress(hmsvcrt, "_initterm"); - p_get_pgmptr=(void*)GetProcAddress(hmsvcrt, "_get_pgmptr"); - } - test_initterm(); - test_initvar(hmsvcrt); - test_get_pgmptr(); -} diff --git a/rostests/winetests/msvcrt/dir.c b/rostests/winetests/msvcrt/dir.c deleted file mode 100644 index 83c533b5e52..00000000000 --- a/rostests/winetests/msvcrt/dir.c +++ /dev/null @@ -1,400 +0,0 @@ -/* - * Unit test suite for dir functions - * - * Copyright 2006 CodeWeavers, Aric Stewart - * - * 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/test.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static int (__cdecl *p_makepath_s)(char *, size_t, const char *, const char *, const char *, const char *); -static int (__cdecl *p_wmakepath_s)(wchar_t *, size_t, const wchar_t *,const wchar_t *, const wchar_t *, const wchar_t *); - -static void init(void) -{ - HMODULE hmod = GetModuleHandleA("msvcrt.dll"); - - p_makepath_s = (void *)GetProcAddress(hmod, "_makepath_s"); - p_wmakepath_s = (void *)GetProcAddress(hmod, "_wmakepath_s"); -} - -typedef struct -{ - const char* buffer; - const char* drive; - const char* dir; - const char* file; - const char* ext; - const char* expected; -} makepath_case; - -#define USE_BUFF ((char*)~0ul) -static const makepath_case makepath_cases[] = -{ - { NULL, NULL, NULL, NULL, NULL, "" }, /* 0 */ - { NULL, "c", NULL, NULL, NULL, "c:" }, - { NULL, "c:", NULL, NULL, NULL, "c:" }, - { NULL, "c:\\", NULL, NULL, NULL, "c:" }, - { NULL, NULL, "dir", NULL, NULL, "dir\\" }, - { NULL, NULL, "dir\\", NULL, NULL, "dir\\" }, - { NULL, NULL, "\\dir", NULL, NULL, "\\dir\\" }, - { NULL, NULL, NULL, "file", NULL, "file" }, - { NULL, NULL, NULL, "\\file", NULL, "\\file" }, - { NULL, NULL, NULL, "file", NULL, "file" }, - { NULL, NULL, NULL, NULL, "ext", ".ext" }, /* 10 */ - { NULL, NULL, NULL, NULL, ".ext", ".ext" }, - { "foo", NULL, NULL, NULL, NULL, "" }, - { "foo", USE_BUFF, NULL, NULL, NULL, "f:" }, - { "foo", NULL, USE_BUFF, NULL, NULL, "foo\\" }, - { "foo", NULL, NULL, USE_BUFF, NULL, "foo" }, - { "foo", NULL, USE_BUFF, "file", NULL, "foo\\file" }, - { "foo", NULL, USE_BUFF, "file", "ext", "foo\\file.ext" }, - { "foo", NULL, NULL, USE_BUFF, "ext", "foo.ext" }, - /* remaining combinations of USE_BUFF crash native */ - { NULL, "c", "dir", "file", "ext", "c:dir\\file.ext" }, - { NULL, "c:", "dir", "file", "ext", "c:dir\\file.ext" }, /* 20 */ - { NULL, "c:\\", "dir", "file", "ext", "c:dir\\file.ext" } -}; - -static void test_makepath(void) -{ - WCHAR driveW[MAX_PATH]; - WCHAR dirW[MAX_PATH]; - WCHAR fileW[MAX_PATH]; - WCHAR extW[MAX_PATH]; - WCHAR bufferW[MAX_PATH]; - char buffer[MAX_PATH]; - - unsigned int i, n; - - for (i = 0; i < sizeof(makepath_cases)/sizeof(makepath_cases[0]); ++i) - { - const makepath_case* p = &makepath_cases[i]; - - memset(buffer, 'X', MAX_PATH); - if (p->buffer) - strcpy(buffer, p->buffer); - - /* Ascii */ - _makepath(buffer, - p->drive == USE_BUFF ? buffer : p->drive, - p->dir == USE_BUFF ? buffer : p->dir, - p->file == USE_BUFF? buffer : p->file, - p->ext == USE_BUFF ? buffer : p->ext); - - buffer[MAX_PATH - 1] = '\0'; - ok(!strcmp(p->expected, buffer), "got '%s' for case %d\n", buffer, i); - - /* Unicode */ - if (p->drive != USE_BUFF) MultiByteToWideChar(CP_ACP, 0, p->drive, -1, driveW, MAX_PATH); - if (p->dir != USE_BUFF) MultiByteToWideChar(CP_ACP, 0, p->dir, -1, dirW, MAX_PATH); - if (p->file != USE_BUFF) MultiByteToWideChar(CP_ACP, 0, p->file, -1, fileW, MAX_PATH); - if (p->ext != USE_BUFF) MultiByteToWideChar(CP_ACP, 0, p->ext, -1, extW, MAX_PATH); - - memset(buffer, 0, MAX_PATH); - for (n = 0; n < MAX_PATH; ++n) - bufferW[n] = 'X'; - if (p->buffer) MultiByteToWideChar( CP_ACP, 0, p->buffer, -1, bufferW, MAX_PATH); - - _wmakepath(bufferW, - p->drive == USE_BUFF ? bufferW : p->drive ? driveW : NULL, - p->dir == USE_BUFF ? bufferW : p->dir ? dirW : NULL, - p->file == USE_BUFF? bufferW : p->file ? fileW : NULL, - p->ext == USE_BUFF ? bufferW : p->ext ? extW : NULL); - - bufferW[MAX_PATH - 1] = '\0'; - WideCharToMultiByte(CP_ACP, 0, bufferW, -1, buffer, MAX_PATH, NULL, NULL); - ok(!strcmp(p->expected, buffer), "got '%s' for unicode case %d\n", buffer, i); - } -} - -static const WCHAR expected0[] = {'\0','X','X','X','X','X','X','X','X','X','X','X','X'}; -static const WCHAR expected1[] = {'\0','X','X','X','X','X','X','X','X','X','X','X','X'}; -static const WCHAR expected2[] = {'\0',':','X','X','X','X','X','X','X','X','X','X','X'}; -static const WCHAR expected3[] = {'\0',':','d','X','X','X','X','X','X','X','X','X','X'}; -static const WCHAR expected4[] = {'\0',':','d','\\','X','X','X','X','X','X','X','X','X'}; -static const WCHAR expected5[] = {'\0',':','d','\\','f','X','X','X','X','X','X','X','X'}; -static const WCHAR expected6[] = {'\0',':','d','\\','f','i','X','X','X','X','X','X','X'}; -static const WCHAR expected7[] = {'\0',':','d','\\','f','i','l','X','X','X','X','X','X'}; -static const WCHAR expected8[] = {'\0',':','d','\\','f','i','l','e','X','X','X','X','X'}; -static const WCHAR expected9[] = {'\0',':','d','\\','f','i','l','e','.','X','X','X','X'}; -static const WCHAR expected10[] = {'\0',':','d','\\','f','i','l','e','.','e','X','X','X'}; -static const WCHAR expected11[] = {'\0',':','d','\\','f','i','l','e','.','e','x','X','X'}; - -static const WCHAR expected12[] = {'\0',':','X','X','X','X','X','X','X','X'}; -static const WCHAR expected13[] = {'\0',':','d','X','X','X','X','X','X','X'}; -static const WCHAR expected14[] = {'\0',':','d','i','X','X','X','X','X','X'}; -static const WCHAR expected15[] = {'\0',':','d','i','r','X','X','X','X','X'}; -static const WCHAR expected16[] = {'\0',':','d','i','r','\\','X','X','X','X'}; - -static const WCHAR expected17[] = {'\0','o','o'}; -static const WCHAR expected18[] = {'\0','o','o','\0','X'}; -static const WCHAR expected19[] = {'\0','o','o','\0'}; -static const WCHAR expected20[] = {'\0','o','o','\0','X','X','X','X','X'}; -static const WCHAR expected21[] = {'\0','o','o','\\','f','i','l','X','X'}; -static const WCHAR expected22[] = {'\0','o','o','\0','X','X','X','X','X','X','X','X','X'}; -static const WCHAR expected23[] = {'\0','o','o','\\','f','i','l','X','X','X','X','X','X'}; -static const WCHAR expected24[] = {'\0','o','o','\\','f','i','l','e','.','e','x','X','X'}; -static const WCHAR expected25[] = {'\0','o','o','\0','X','X','X','X'}; -static const WCHAR expected26[] = {'\0','o','o','.','e','x','X','X'}; - -typedef struct -{ - const char* buffer; - size_t length; - const char* drive; - const char* dir; - const char* file; - const char* ext; - const char* expected; - const WCHAR *expected_unicode; - size_t expected_length; -} makepath_s_case; - -static const makepath_s_case makepath_s_cases[] = -{ - /* Behavior with directory parameter containing backslash. */ - {NULL, 1, "c:", "d\\", "file", "ext", "\0XXXXXXXXXXXX", expected0, 13}, - {NULL, 2, "c:", "d\\", "file", "ext", "\0XXXXXXXXXXXX", expected1, 13}, - {NULL, 3, "c:", "d\\", "file", "ext", "\0:XXXXXXXXXXX", expected2, 13}, - {NULL, 4, "c:", "d\\", "file", "ext", "\0:dXXXXXXXXXX", expected3, 13}, - {NULL, 5, "c:", "d\\", "file", "ext", "\0:d\\XXXXXXXXX", expected4, 13}, - {NULL, 6, "c:", "d\\", "file", "ext", "\0:d\\fXXXXXXXX", expected5, 13}, - {NULL, 7, "c:", "d\\", "file", "ext", "\0:d\\fiXXXXXXX", expected6, 13}, - {NULL, 8, "c:", "d\\", "file", "ext", "\0:d\\filXXXXXX", expected7, 13}, - {NULL, 9, "c:", "d\\", "file", "ext", "\0:d\\fileXXXXX", expected8, 13}, - {NULL, 10, "c:", "d\\", "file", "ext", "\0:d\\file.XXXX", expected9, 13}, - {NULL, 11, "c:", "d\\", "file", "ext", "\0:d\\file.eXXX", expected10, 13}, - {NULL, 12, "c:", "d\\", "file", "ext", "\0:d\\file.exXX", expected11, 13}, - /* Behavior with directory parameter lacking backslash. */ - {NULL, 3, "c:", "dir", "f", "ext", "\0:XXXXXXXX", expected12, 10}, - {NULL, 4, "c:", "dir", "f", "ext", "\0:dXXXXXXX", expected13, 10}, - {NULL, 5, "c:", "dir", "f", "ext", "\0:diXXXXXX", expected14, 10}, - {NULL, 6, "c:", "dir", "f", "ext", "\0:dirXXXXX", expected15, 10}, - {NULL, 7, "c:", "dir", "f", "ext", "\0:dir\\XXXX", expected16, 10}, - /* Behavior with overlapped buffer. */ - {"foo", 2, USE_BUFF, NULL, NULL, NULL, "\0oo", expected17, 3}, - {"foo", 4, NULL, USE_BUFF, NULL, NULL, "\0oo\0X", expected18, 5}, - {"foo", 3, NULL, NULL, USE_BUFF, NULL, "\0oo\0", expected19, 4}, - {"foo", 4, NULL, USE_BUFF, "file", NULL, "\0oo\0XXXXX", expected20, 9}, - {"foo", 8, NULL, USE_BUFF, "file", NULL, "\0oo\\filXX", expected21, 9}, - {"foo", 4, NULL, USE_BUFF, "file", "ext", "\0oo\0XXXXXXXXX", expected22, 13}, - {"foo", 8, NULL, USE_BUFF, "file", "ext", "\0oo\\filXXXXXX", expected23, 13}, - {"foo", 12, NULL, USE_BUFF, "file", "ext", "\0oo\\file.exXX", expected24, 13}, - {"foo", 4, NULL, NULL, USE_BUFF, "ext", "\0oo\0XXXX", expected25, 8}, - {"foo", 7, NULL, NULL, USE_BUFF, "ext", "\0oo.exXX", expected26, 8}, -}; - -static void test_makepath_s(void) -{ - WCHAR driveW[MAX_PATH]; - WCHAR dirW[MAX_PATH]; - WCHAR fileW[MAX_PATH]; - WCHAR extW[MAX_PATH]; - WCHAR bufferW[MAX_PATH]; - char buffer[MAX_PATH]; - int ret; - unsigned int i, n; - - if (!p_makepath_s || !p_wmakepath_s) - { - win_skip("Safe makepath functions are not available\n"); - return; - } - - errno = EBADF; - ret = p_makepath_s(NULL, 0, NULL, NULL, NULL, NULL); - ok(ret == EINVAL, "Expected _makepath_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - - errno = EBADF; - ret = p_makepath_s(buffer, 0, NULL, NULL, NULL, NULL); - ok(ret == EINVAL, "Expected _makepath_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - - errno = EBADF; - ret = p_wmakepath_s(NULL, 0, NULL, NULL, NULL, NULL); - ok(ret == EINVAL, "Expected _wmakepath_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - - errno = EBADF; - ret = p_wmakepath_s(bufferW, 0, NULL, NULL, NULL, NULL); - ok(ret == EINVAL, "Expected _wmakepath_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - - /* Test with the normal _makepath cases. */ - for (i = 0; i < sizeof(makepath_cases)/sizeof(makepath_cases[0]); i++) - { - const makepath_case *p = makepath_cases + i; - - memset(buffer, 'X', MAX_PATH); - if (p->buffer) - strcpy(buffer, p->buffer); - - /* Ascii */ - ret = p_makepath_s(buffer, MAX_PATH, - p->drive == USE_BUFF ? buffer : p->drive, - p->dir == USE_BUFF ? buffer : p->dir, - p->file == USE_BUFF? buffer : p->file, - p->ext == USE_BUFF ? buffer : p->ext); - ok(ret == 0, "[%d] Expected _makepath_s to return 0, got %d\n", i, ret); - - buffer[MAX_PATH - 1] = '\0'; - ok(!strcmp(p->expected, buffer), "got '%s' for case %d\n", buffer, i); - - /* Unicode */ - if (p->drive != USE_BUFF) MultiByteToWideChar(CP_ACP, 0, p->drive, -1, driveW, MAX_PATH); - if (p->dir != USE_BUFF) MultiByteToWideChar(CP_ACP, 0, p->dir, -1, dirW, MAX_PATH); - if (p->file != USE_BUFF) MultiByteToWideChar(CP_ACP, 0, p->file, -1, fileW, MAX_PATH); - if (p->ext != USE_BUFF) MultiByteToWideChar(CP_ACP, 0, p->ext, -1, extW, MAX_PATH); - - memset(buffer, 0, MAX_PATH); - for (n = 0; n < MAX_PATH; ++n) - bufferW[n] = 'X'; - if (p->buffer) MultiByteToWideChar( CP_ACP, 0, p->buffer, -1, bufferW, MAX_PATH); - - ret = p_wmakepath_s(bufferW, MAX_PATH, - p->drive == USE_BUFF ? bufferW : p->drive ? driveW : NULL, - p->dir == USE_BUFF ? bufferW : p->dir ? dirW : NULL, - p->file == USE_BUFF? bufferW : p->file ? fileW : NULL, - p->ext == USE_BUFF ? bufferW : p->ext ? extW : NULL); - ok(ret == 0, "[%d] Expected _wmakepath_s to return 0, got %d\n", i, ret); - - bufferW[MAX_PATH - 1] = '\0'; - WideCharToMultiByte(CP_ACP, 0, bufferW, -1, buffer, MAX_PATH, NULL, NULL); - ok(!strcmp(p->expected, buffer), "got '%s' for unicode case %d\n", buffer, i); - } - - /* Try insufficient length cases. */ - for (i = 0; i < sizeof(makepath_s_cases)/sizeof(makepath_s_cases[0]); i++) - { - const makepath_s_case *p = makepath_s_cases + i; - - memset(buffer, 'X', MAX_PATH); - if (p->buffer) - strcpy(buffer, p->buffer); - - /* Ascii */ - errno = EBADF; - ret = p_makepath_s(buffer, p->length, - p->drive == USE_BUFF ? buffer : p->drive, - p->dir == USE_BUFF ? buffer : p->dir, - p->file == USE_BUFF? buffer : p->file, - p->ext == USE_BUFF ? buffer : p->ext); - ok(ret == ERANGE, "[%d] Expected _makepath_s to return ERANGE, got %d\n", i, ret); - ok(errno == ERANGE, "[%d] Expected errno to be ERANGE, got %d\n", i, errno); - ok(!memcmp(p->expected, buffer, p->expected_length), "unexpected output for case %d\n", i); - - /* Unicode */ - if (p->drive != USE_BUFF) MultiByteToWideChar(CP_ACP, 0, p->drive, -1, driveW, MAX_PATH); - if (p->dir != USE_BUFF) MultiByteToWideChar(CP_ACP, 0, p->dir, -1, dirW, MAX_PATH); - if (p->file != USE_BUFF) MultiByteToWideChar(CP_ACP, 0, p->file, -1, fileW, MAX_PATH); - if (p->ext != USE_BUFF) MultiByteToWideChar(CP_ACP, 0, p->ext, -1, extW, MAX_PATH); - - memset(buffer, 0, MAX_PATH); - for (n = 0; n < MAX_PATH; ++n) - bufferW[n] = 'X'; - if (p->buffer) MultiByteToWideChar( CP_ACP, 0, p->buffer, -1, bufferW, MAX_PATH); - - errno = EBADF; - ret = p_wmakepath_s(bufferW, p->length, - p->drive == USE_BUFF ? bufferW : p->drive ? driveW : NULL, - p->dir == USE_BUFF ? bufferW : p->dir ? dirW : NULL, - p->file == USE_BUFF? bufferW : p->file ? fileW : NULL, - p->ext == USE_BUFF ? bufferW : p->ext ? extW : NULL); - ok(ret == ERANGE, "[%d] Expected _wmakepath_s to return ERANGE, got %d\n", i, ret); - ok(errno == ERANGE, "[%d] Expected errno to be ERANGE, got %d\n", i, errno); - - ok(!memcmp(p->expected_unicode, bufferW, p->expected_length * sizeof(WCHAR)), "unexpected output for case %d\n", i); - } -} - -static void test_fullpath(void) -{ - char full[MAX_PATH]; - char tmppath[MAX_PATH]; - char prevpath[MAX_PATH]; - char level1[MAX_PATH]; - char level2[MAX_PATH]; - char teststring[MAX_PATH]; - char *freeme; - BOOL rc,free1,free2; - - free1=free2=TRUE; - GetCurrentDirectory(MAX_PATH, prevpath); - GetTempPath(MAX_PATH,tmppath); - strcpy(level1,tmppath); - strcat(level1,"msvcrt-test\\"); - - rc = CreateDirectory(level1,NULL); - if (!rc && GetLastError()==ERROR_ALREADY_EXISTS) - free1=FALSE; - - strcpy(level2,level1); - strcat(level2,"nextlevel\\"); - rc = CreateDirectory(level2,NULL); - if (!rc && GetLastError()==ERROR_ALREADY_EXISTS) - free2=FALSE; - SetCurrentDirectory(level2); - - ok(_fullpath(full,"test", MAX_PATH)!=NULL,"_fullpath failed\n"); - strcpy(teststring,level2); - strcat(teststring,"test"); - ok(strcmp(full,teststring)==0,"Invalid Path returned %s\n",full); - ok(_fullpath(full,"\\test", MAX_PATH)!=NULL,"_fullpath failed\n"); - strncpy(teststring,level2,3); - teststring[3]=0; - strcat(teststring,"test"); - ok(strcmp(full,teststring)==0,"Invalid Path returned %s\n",full); - ok(_fullpath(full,"..\\test", MAX_PATH)!=NULL,"_fullpath failed\n"); - strcpy(teststring,level1); - strcat(teststring,"test"); - ok(strcmp(full,teststring)==0,"Invalid Path returned %s\n",full); - ok(_fullpath(full,"..\\test", 10)==NULL,"_fullpath failed to generate error\n"); - - freeme = _fullpath(NULL,"test", 0); - ok(freeme!=NULL,"No path returned\n"); - strcpy(teststring,level2); - strcat(teststring,"test"); - ok(strcmp(freeme,teststring)==0,"Invalid Path returned %s\n",freeme); - free(freeme); - - SetCurrentDirectory(prevpath); - if (free2) - RemoveDirectory(level2); - if (free1) - RemoveDirectory(level1); -} - -START_TEST(dir) -{ - init(); - - test_fullpath(); - test_makepath(); - test_makepath_s(); -} diff --git a/rostests/winetests/msvcrt/environ.c b/rostests/winetests/msvcrt/environ.c deleted file mode 100644 index fdfe81f5eec..00000000000 --- a/rostests/winetests/msvcrt/environ.c +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Unit tests for C library environment routines - * - * Copyright 2004 Mike Hearn - * - * 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/test.h" -#include - -static const char *a_very_long_env_string = - "LIBRARY_PATH=" - "C:/Program Files/GLBasic/Compiler/platform/Win32/Bin/../lib/gcc/mingw32/3.4.2/;" - "C:/Program Files/GLBasic/Compiler/platform/Win32/Bin/../lib/gcc/;" - "/mingw/lib/gcc/mingw32/3.4.2/;" - "/usr/lib/gcc/mingw32/3.4.2/;" - "C:/Program Files/GLBasic/Compiler/platform/Win32/Bin/../lib/gcc/mingw32/3.4.2/../../../../mingw32/lib/mingw32/3.4.2/;" - "C:/Program Files/GLBasic/Compiler/platform/Win32/Bin/../lib/gcc/mingw32/3.4.2/../../../../mingw32/lib/;" - "/mingw/mingw32/lib/mingw32/3.4.2/;" - "/mingw/mingw32/lib/;" - "/mingw/lib/mingw32/3.4.2/;" - "/mingw/lib/;" - "C:/Program Files/GLBasic/Compiler/platform/Win32/Bin/../lib/gcc/mingw32/3.4.2/../../../mingw32/3.4.2/;" - "C:/Program Files/GLBasic/Compiler/platform/Win32/Bin/../lib/gcc/mingw32/3.4.2/../../../;" - "/mingw/lib/mingw32/3.4.2/;" - "/mingw/lib/;" - "/lib/mingw32/3.4.2/;" - "/lib/;" - "/usr/lib/mingw32/3.4.2/;" - "/usr/lib/"; - -void __cdecl __getmainargs(int *, char ***, char ***, int, int *); -void __cdecl __wgetmainargs(int *, wchar_t ***, wchar_t ***, int, int *); - -static char ***(__cdecl *p__p__environ)(void); -static WCHAR ***(__cdecl *p__p__wenviron)(void); - -static char ***p_environ; -static WCHAR ***p_wenviron; - -static void init(void) -{ - HMODULE hmod = GetModuleHandleA("msvcrt.dll"); - - p__p__environ = (void *)GetProcAddress(hmod, "__p__environ"); - p__p__wenviron = (void *)GetProcAddress(hmod, "__p__wenviron"); - p_environ = (void *)GetProcAddress(hmod, "_environ"); - p_wenviron = (void *)GetProcAddress(hmod, "_wenviron"); -} - -static void test_system(void) -{ - int ret = system(NULL); - ok(ret == 1, "Expected system to return 1, got %d\n", ret); - - ret = system("echo OK"); - ok(ret == 0, "Expected system to return 0, got %d\n", ret); -} - -static void test__environ(void) -{ - int argc; - char **argv, **envp = NULL; - int i, mode = 0; - - ok( p_environ != NULL, "Expected the pointer to _environ to be non-NULL\n" ); - if (p_environ) - ok( *p_environ != NULL, "Expected _environ to be initialized on startup\n" ); - - if (!p_environ || !*p_environ) - { - skip( "_environ pointers are not valid\n" ); - return; - } - - /* Examine the returned pointer from __p__environ(), if available. */ - if (p__p__environ) - { - ok( *p__p__environ() == *p_environ, - "Expected _environ pointers to be identical\n" ); - } - else - win_skip( "__p__environ() is not available\n" ); - - /* Note that msvcrt from Windows versions older than Vista - * expects the mode pointer parameter to be valid.*/ - __getmainargs(&argc, &argv, &envp, 0, &mode); - - ok( envp != NULL, "Expected initial environment block pointer to be non-NULL\n" ); - if (!envp) - { - skip( "Initial environment block pointer is not valid\n" ); - return; - } - - for (i = 0; ; i++) - { - if ((*p_environ)[i]) - { - ok( envp[i] != NULL, "Expected environment block pointer element to be non-NULL\n" ); - ok( !strcmp((*p_environ)[i], envp[i]), - "Expected _environ and environment block pointer strings (%s vs. %s) to match\n", - (*p_environ)[i], envp[i] ); - } - else - { - ok( !envp[i], "Expected environment block pointer element to be NULL, got %p\n", envp[i] ); - break; - } - } -} - -static void test__wenviron(void) -{ - static const WCHAR cat_eq_dogW[] = {'c','a','t','=','d','o','g',0}; - static const WCHAR cat_eqW[] = {'c','a','t','=',0}; - - int argc; - char **argv, **envp = NULL; - WCHAR **wargv, **wenvp = NULL; - int i, mode = 0; - - ok( p_wenviron != NULL, "Expected the pointer to _wenviron to be non-NULL\n" ); - if (p_wenviron) - ok( *p_wenviron == NULL, "Expected _wenviron to be NULL, got %p\n", *p_wenviron ); - else - { - win_skip( "Pointer to _wenviron is not valid\n" ); - return; - } - - /* Examine the returned pointer from __p__wenviron(), if available. */ - if (p__p__wenviron) - { - ok( *p__p__wenviron() == NULL, - "Expected _wenviron pointers to be NULL\n" ); - } - else - win_skip( "__p__wenviron() is not available\n" ); - - /* __getmainargs doesn't initialize _wenviron. */ - __getmainargs(&argc, &argv, &envp, 0, &mode); - - ok( *p_wenviron == NULL, "Expected _wenviron to be NULL, got %p\n", *p_wenviron); - ok( envp != NULL, "Expected initial environment block pointer to be non-NULL\n" ); - if (!envp) - { - skip( "Initial environment block pointer is not valid\n" ); - return; - } - - /* Neither does calling the non-Unicode environment manipulation functions. */ - ok( _putenv("cat=dog") == 0, "failed setting cat=dog\n" ); - ok( *p_wenviron == NULL, "Expected _wenviron to be NULL, got %p\n", *p_wenviron); - ok( _putenv("cat=") == 0, "failed deleting cat\n" ); - - /* _wenviron isn't initialized until __wgetmainargs is called or - * one of the Unicode environment manipulation functions is called. */ - ok( _wputenv(cat_eq_dogW) == 0, "failed setting cat=dog\n" ); - ok( *p_wenviron != NULL, "Expected _wenviron to be non-NULL\n" ); - ok( _wputenv(cat_eqW) == 0, "failed deleting cat\n" ); - - __wgetmainargs(&argc, &wargv, &wenvp, 0, &mode); - - ok( *p_wenviron != NULL, "Expected _wenviron to be non-NULL\n" ); - ok( wenvp != NULL, "Expected initial environment block pointer to be non-NULL\n" ); - if (!wenvp) - { - skip( "Initial environment block pointer is not valid\n" ); - return; - } - - /* Examine the returned pointer from __p__wenviron(), - * if available, after _wenviron is initialized. */ - if (p__p__wenviron) - { - ok( *p__p__wenviron() == *p_wenviron, - "Expected _wenviron pointers to be identical\n" ); - } - - for (i = 0; ; i++) - { - if ((*p_wenviron)[i]) - { - ok( wenvp[i] != NULL, "Expected environment block pointer element to be non-NULL\n" ); - ok( !winetest_strcmpW((*p_wenviron)[i], wenvp[i]), - "Expected _wenviron and environment block pointer strings (%s vs. %s) to match\n", - wine_dbgstr_w((*p_wenviron)[i]), wine_dbgstr_w(wenvp[i]) ); - } - else - { - ok( !wenvp[i], "Expected environment block pointer element to be NULL, got %p\n", wenvp[i] ); - break; - } - } -} - -static void test_environment_manipulation(void) -{ - ok( _putenv("cat=") == 0, "_putenv failed on deletion of nonexistent environment variable\n" ); - ok( _putenv("cat=dog") == 0, "failed setting cat=dog\n" ); - ok( strcmp(getenv("cat"), "dog") == 0, "getenv did not return 'dog'\n" ); - ok( _putenv("cat=") == 0, "failed deleting cat\n" ); - - ok( _putenv("=") == -1, "should not accept '=' as input\n" ); - ok( _putenv("=dog") == -1, "should not accept '=dog' as input\n" ); - ok( _putenv(a_very_long_env_string) == 0, "_putenv failed for long environment string\n"); - - ok( getenv("nonexistent") == NULL, "getenv should fail with nonexistent var name\n" ); -} - -START_TEST(environ) -{ - init(); - - /* The environ tests should always be run first, as they assume - * that the process has not manipulated the environment. */ - test__environ(); - test__wenviron(); - test_environment_manipulation(); - test_system(); -} diff --git a/rostests/winetests/msvcrt/file.c b/rostests/winetests/msvcrt/file.c deleted file mode 100644 index e7b735346bb..00000000000 --- a/rostests/winetests/msvcrt/file.c +++ /dev/null @@ -1,1586 +0,0 @@ -/* - * Unit test suite for file functions - * - * Copyright 2002 Bill Currie - * Copyright 2005 Paul Rupe - * - * 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/test.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static HANDLE proc_handles[2]; - -static int (__cdecl *p_fopen_s)(FILE**, const char*, const char*); -static int (__cdecl *p__wfopen_s)(FILE**, const wchar_t*, const wchar_t*); - -static void init(void) -{ - HMODULE hmod = GetModuleHandleA("msvcrt.dll"); - - p_fopen_s = (void*)GetProcAddress(hmod, "fopen_s"); - p__wfopen_s = (void*)GetProcAddress(hmod, "_wfopen_s"); -} - -static void test_filbuf( void ) -{ - FILE *fp; - int c; - fpos_t pos; - - fp = fopen("filbuf.tst", "wb"); - fwrite("\n\n\n\n", 1, 4, fp); - fclose(fp); - - fp = fopen("filbuf.tst", "rt"); - c = _filbuf(fp); - ok(c == '\n', "read wrong byte\n"); - /* See bug 16970 for why we care about _filbuf. - * ftell returns screwy values on files with lots - * of bare LFs in ascii mode because it assumes - * that ascii files contain only CRLFs, removes - * the CR's early in _filbuf, and adjusts the return - * value of ftell to compensate. - * native _filbuf will read the whole file, then consume and return - * the first one. That leaves fp->_fd at offset 4, and fp->_ptr - * pointing to a buffer of three bare LFs, so - * ftell will return 4 - 3 - 3 = -2. - */ - ok(ftell(fp) == -2, "ascii crlf removal does not match native\n"); - ok(fgetpos(fp, &pos) == 0, "fgetpos fail\n"); - ok(pos == -2, "ftell does not match fgetpos\n"); - fclose(fp); - unlink("filbuf.tst"); -} - -static void test_fdopen( void ) -{ - static const char buffer[] = {0,1,2,3,4,5,6,7,8,9}; - char ibuf[10]; - int fd; - FILE *file; - - fd = open ("fdopen.tst", O_WRONLY | O_CREAT | O_BINARY, _S_IREAD |_S_IWRITE); - write (fd, buffer, sizeof (buffer)); - close (fd); - - fd = open ("fdopen.tst", O_RDONLY | O_BINARY); - lseek (fd, 5, SEEK_SET); - file = fdopen (fd, "rb"); - ok (fread (ibuf, 1, sizeof (buffer), file) == 5, "read wrong byte count\n"); - ok (memcmp (ibuf, buffer + 5, 5) == 0, "read wrong bytes\n"); - fclose (file); - unlink ("fdopen.tst"); -} - -static void test_fileops( void ) -{ - static const char outbuffer[] = "0,1,2,3,4,5,6,7,8,9"; - char buffer[256]; - WCHAR wbuffer[256]; - int fd; - FILE *file; - fpos_t pos; - int i, c, bufmode; - static const int bufmodes[] = {_IOFBF,_IONBF}; - - fd = open ("fdopen.tst", O_WRONLY | O_CREAT | O_BINARY, _S_IREAD |_S_IWRITE); - write (fd, outbuffer, sizeof (outbuffer)); - close (fd); - - for (bufmode=0; bufmode < sizeof(bufmodes)/sizeof(bufmodes[0]); bufmode++) - { - fd = open ("fdopen.tst", O_RDONLY | O_BINARY); - file = fdopen (fd, "rb"); - setvbuf(file,NULL,bufmodes[bufmode],2048); - ok(strlen(outbuffer) == (sizeof(outbuffer)-1),"strlen/sizeof error for bufmode=%x\n", bufmodes[bufmode]); - ok(fgets(buffer,sizeof(buffer),file) !=0,"fgets failed unexpected for bufmode=%x\n", bufmodes[bufmode]); - ok(fgets(buffer,sizeof(buffer),file) ==0,"fgets didn't signal EOF for bufmode=%x\n", bufmodes[bufmode]); - ok(feof(file) !=0,"feof doesn't signal EOF for bufmode=%x\n", bufmodes[bufmode]); - rewind(file); - ok(fgets(buffer,strlen(outbuffer),file) !=0,"fgets failed unexpected for bufmode=%x\n", bufmodes[bufmode]); - ok(lstrlenA(buffer) == lstrlenA(outbuffer) -1,"fgets didn't read right size for bufmode=%x\n", bufmodes[bufmode]); - ok(fgets(buffer,sizeof(outbuffer),file) !=0,"fgets failed unexpected for bufmode=%x\n", bufmodes[bufmode]); - ok(strlen(buffer) == 1,"fgets dropped chars for bufmode=%x\n", bufmodes[bufmode]); - ok(buffer[0] == outbuffer[strlen(outbuffer)-1],"fgets exchanged chars for bufmode=%x\n", bufmodes[bufmode]); - - rewind(file); - for (i = 0; i < sizeof(outbuffer); i++) - { - ok(fgetc(file) == outbuffer[i], "fgetc returned wrong data for bufmode=%x\n", bufmodes[bufmode]); - } - ok((c = fgetc(file)) == EOF, "getc did not return EOF for bufmode=%x\n", bufmodes[bufmode]); - ok(feof(file), "feof did not return EOF for bufmode=%x\n", bufmodes[bufmode]); - ok(ungetc(c, file) == EOF, "ungetc(EOF) did not return EOF for bufmode=%x\n", bufmodes[bufmode]); - ok(feof(file), "feof after ungetc(EOF) did not return EOF for bufmode=%x\n", bufmodes[bufmode]); - ok(fgetc(file) == EOF, "getc did not return EOF for bufmode=%x\n", bufmodes[bufmode]); - c = outbuffer[sizeof(outbuffer) - 1]; - ok(ungetc(c, file) == c, "ungetc did not return its input for bufmode=%x\n", bufmodes[bufmode]); - ok(!feof(file), "feof after ungetc returned EOF for bufmode=%x\n", bufmodes[bufmode]); - ok((c = fgetc(file)) != EOF, "getc after ungetc returned EOF for bufmode=%x\n", bufmodes[bufmode]); - ok(c == outbuffer[sizeof(outbuffer) - 1], - "getc did not return ungetc'd data for bufmode=%x\n", bufmodes[bufmode]); - ok(!feof(file), "feof after getc returned EOF prematurely for bufmode=%x\n", bufmodes[bufmode]); - ok(fgetc(file) == EOF, "getc did not return EOF for bufmode=%x\n", bufmodes[bufmode]); - ok(feof(file), "feof after getc did not return EOF for bufmode=%x\n", bufmodes[bufmode]); - - rewind(file); - ok(fgetpos(file,&pos) == 0, "fgetpos failed unexpected for bufmode=%x\n", bufmodes[bufmode]); - ok(pos == 0, "Unexpected result of fgetpos %x%08x for bufmode=%x\n", (DWORD)(pos >> 32), (DWORD)pos, bufmodes[bufmode]); - pos = sizeof (outbuffer); - ok(fsetpos(file, &pos) == 0, "fsetpos failed unexpected for bufmode=%x\n", bufmodes[bufmode]); - ok(fgetpos(file,&pos) == 0, "fgetpos failed unexpected for bufmode=%x\n", bufmodes[bufmode]); - ok(pos == sizeof (outbuffer), "Unexpected result of fgetpos %x%08x for bufmode=%x\n", (DWORD)(pos >> 32), (DWORD)pos, bufmodes[bufmode]); - - fclose (file); - } - fd = open ("fdopen.tst", O_RDONLY | O_TEXT); - file = fdopen (fd, "rt"); /* open in TEXT mode */ - ok(fgetws(wbuffer,sizeof(wbuffer)/sizeof(wbuffer[0]),file) !=0,"fgetws failed unexpected\n"); - ok(fgetws(wbuffer,sizeof(wbuffer)/sizeof(wbuffer[0]),file) ==0,"fgetws didn't signal EOF\n"); - ok(feof(file) !=0,"feof doesn't signal EOF\n"); - rewind(file); - ok(fgetws(wbuffer,strlen(outbuffer),file) !=0,"fgetws failed unexpected\n"); - ok(lstrlenW(wbuffer) == (lstrlenA(outbuffer) -1),"fgetws didn't read right size\n"); - ok(fgetws(wbuffer,sizeof(outbuffer)/sizeof(outbuffer[0]),file) !=0,"fgets failed unexpected\n"); - ok(lstrlenW(wbuffer) == 1,"fgets dropped chars\n"); - fclose (file); - - file = fopen("fdopen.tst", "rb"); - ok( file != NULL, "fopen failed\n"); - /* sizeof(buffer) > content of file */ - ok(fread(buffer, sizeof(buffer), 1, file) == 0, "fread test failed\n"); - /* feof should be set now */ - ok(feof(file), "feof after fread failed\n"); - fclose (file); - - unlink ("fdopen.tst"); -} - -#define IOMODE (ao?"ascii mode":"binary mode") -static void test_readmode( BOOL ascii_mode ) -{ - static const char outbuffer[] = "0,1,2,3,4,5,6,7,8,9\r\n\r\nA,B,C,D,E\r\nX,Y,Z"; - static const char padbuffer[] = "ghjghjghjghj"; - static const char nlbuffer[] = "\r\n"; - char buffer[2*BUFSIZ+256]; - const char *optr; - int fd; - FILE *file; - const int *ip; - int i, j, m, ao, pl; - unsigned int fp; - LONG l; - - fd = open ("fdopen.tst", O_WRONLY | O_CREAT | O_BINARY, _S_IREAD |_S_IWRITE); - /* an internal buffer of BUFSIZ is maintained, so make a file big - * enough to test operations that cross the buffer boundary - */ - j = (2*BUFSIZ-4)/strlen(padbuffer); - for (i=0; i=0; i--) { - ok((c = fgetc(fp)) == '0'+ i, "fgetc after fseek with neg Offset failed in line %d\n", i); - fseek(fp, -4 ,SEEK_CUR); - } - /* Show what happens if fseek positions filepointer on \\r */ - fclose(fp); - fp = fopen("ascii.tst", "r"); - fseek(fp, 3 ,SEEK_SET); - ok((c = fgetc(fp)) == '1', "fgetc fails to read next char when positioned on \\r\n"); - fclose(fp); - - unlink("ascii.tst"); -} - -static void test_asciimode2(void) -{ - /* Error sequence from one app was getchar followed by small fread - * with one \r removed had last byte of buffer filled with - * next byte of *unbuffered* data rather than next byte from buffer - * Test case is a short string of one byte followed by a newline - * followed by filler to fill out the sector, then a sector of - * some different byte. - */ - - FILE *fp; - char ibuf[4]; - int i; - static const char obuf[] = -"00\n" -"000000000000000000000000000000000000000000000000000000000000000000000000000000\n" -"000000000000000000000000000000000000000000000000000000000000000000000000000000\n" -"000000000000000000000000000000000000000000000000000000000000000000000000000000\n" -"000000000000000000000000000000000000000000000000000000000000000000000000000000\n" -"000000000000000000000000000000000000000000000000000000000000000000000000000000\n" -"000000000000000000000000000000000000000000000000000000000000000000000000000000\n" -"000000000000000000\n" -"1111111111111111111"; - - fp = fopen("ascii2.tst", "wt"); - fwrite(obuf, 1, sizeof(obuf), fp); - fclose(fp); - - fp = fopen("ascii2.tst", "rt"); - ok(getc(fp) == '0', "first char not 0\n"); - memset(ibuf, 0, sizeof(ibuf)); - i = fread(ibuf, 1, sizeof(ibuf), fp); - ok(i == sizeof(ibuf), "fread i %d != sizeof(ibuf)\n", i); - ok(0 == strncmp(ibuf, obuf+1, sizeof(ibuf)), "ibuf != obuf\n"); - fclose(fp); - unlink("ascii2.tst"); -} - -static WCHAR* AtoW( const char* p ) -{ - WCHAR* buffer; - DWORD len = MultiByteToWideChar( CP_ACP, 0, p, -1, NULL, 0 ); - buffer = malloc( len * sizeof(WCHAR) ); - MultiByteToWideChar( CP_ACP, 0, p, -1, buffer, len ); - return buffer; -} - -/* Test reading in text mode when the 512'th character read is \r*/ -static void test_readboundary(void) -{ - FILE *fp; - char buf[513], rbuf[513]; - int i, j; - for (i = 0; i < 511; i++) - { - j = (i%('~' - ' ')+ ' '); - buf[i] = j; - } - buf[511] = '\n'; - buf[512] =0; - fp = fopen("boundary.tst", "wt"); - fwrite(buf, 512,1,fp); - fclose(fp); - fp = fopen("boundary.tst", "rt"); - for(i=0; i<512; i++) - { - fseek(fp,0 , SEEK_CUR); - rbuf[i] = fgetc(fp); - } - rbuf[512] =0; - fclose(fp); - unlink("boundary.tst"); - - ok(strcmp(buf, rbuf) == 0,"CRLF on buffer boundary failure\n"); - } - -static void test_fgetc( void ) -{ - char* tempf; - FILE *tempfh; - int ich=0xe0, ret; - - tempf=_tempnam(".","wne"); - tempfh = fopen(tempf,"w+"); - fputc(ich, tempfh); - fputc(ich, tempfh); - rewind(tempfh); - ret = fgetc(tempfh); - ok(ich == ret, "First fgetc expected %x got %x\n", ich, ret); - ret = fgetc(tempfh); - ok(ich == ret, "Second fgetc expected %x got %x\n", ich, ret); - fclose(tempfh); - tempfh = fopen(tempf,"wt"); - fputc('\n', tempfh); - fclose(tempfh); - tempfh = fopen(tempf,"wt"); - setbuf(tempfh, NULL); - ret = fgetc(tempfh); - ok(ret == -1, "Unbuffered fgetc in text mode must failed on \\r\\n\n"); - fclose(tempfh); - unlink(tempf); - free(tempf); -} - -static void test_fputc( void ) -{ - char* tempf; - FILE *tempfh; - int ret; - - tempf=_tempnam(".","wne"); - tempfh = fopen(tempf,"wb"); - ret = fputc(0,tempfh); - ok(0 == ret, "fputc(0,tempfh) expected %x got %x\n", 0, ret); - ret = fputc(0xff,tempfh); - ok(0xff == ret, "fputc(0xff,tempfh) expected %x got %x\n", 0xff, ret); - ret = fputc(0xffffffff,tempfh); - ok(0xff == ret, "fputc(0xffffffff,tempfh) expected %x got %x\n", 0xff, ret); - fclose(tempfh); - - tempfh = fopen(tempf,"rb"); - ret = fputc(0,tempfh); - ok(EOF == ret, "fputc(0,tempfh) on r/o file expected %x got %x\n", EOF, ret); - fclose(tempfh); - - unlink(tempf); - free(tempf); -} - -static void test_flsbuf( void ) -{ - char* tempf; - FILE *tempfh; - int c; - int ret; - int bufmode; - static const int bufmodes[] = {_IOFBF,_IONBF}; - - tempf=_tempnam(".","wne"); - for (bufmode=0; bufmode < sizeof(bufmodes)/sizeof(bufmodes[0]); bufmode++) - { - tempfh = fopen(tempf,"wb"); - setvbuf(tempfh,NULL,bufmodes[bufmode],2048); - ret = _flsbuf(0,tempfh); - ok(0 == ret, "_flsbuf(0,tempfh) with bufmode %x expected %x got %x\n", - bufmodes[bufmode], 0, ret); - ret = _flsbuf(0xff,tempfh); - ok(0xff == ret, "_flsbuf(0xff,tempfh) with bufmode %x expected %x got %x\n", - bufmodes[bufmode], 0, ret); - ret = _flsbuf(0xffffffff,tempfh); - ok(0xff == ret, "_flsbuf(0xffffffff,tempfh) with bufmode %x expected %x got %x\n", - bufmodes[bufmode], 0, ret); - fclose(tempfh); - } - - tempfh = fopen(tempf,"rb"); - ret = _flsbuf(0,tempfh); - ok(EOF == ret, "_flsbuf(0,tempfh) on r/o file expected %x got %x\n", EOF, ret); - fclose(tempfh); - - /* See bug 17123, exposed by WinAVR's make */ - tempfh = fopen(tempf,"w"); - ok(tempfh->_cnt == 0, "_cnt on freshly opened file was %d\n", tempfh->_cnt); - setbuf(tempfh, NULL); - ok(tempfh->_cnt == 0, "_cnt on unbuffered file was %d\n", tempfh->_cnt); - /* Inlined putchar sets _cnt to -1. Native seems to ignore the value... */ - tempfh->_cnt = 1234; - ret = _flsbuf('Q',tempfh); - ok('Q' == ret, "_flsbuf('Q',tempfh) expected %x got %x\n", 'Q', ret); - /* ... and reset it to zero */ - ok(tempfh->_cnt == 0, "after unbuf _flsbuf, _cnt was %d\n", tempfh->_cnt); - fclose(tempfh); - /* And just for grins, make sure the file is correct */ - tempfh = fopen(tempf,"r"); - c = fgetc(tempfh); - ok(c == 'Q', "first byte should be 'Q'\n"); - c = fgetc(tempfh); - ok(c == EOF, "there should only be one byte\n"); - fclose(tempfh); - - unlink(tempf); - free(tempf); -} - -static void test_fgetwc( void ) -{ -#define LLEN 512 - - char* tempf; - FILE *tempfh; - static const char mytext[]= "This is test_fgetwc\r\n"; - WCHAR wtextW[BUFSIZ+LLEN+1]; - WCHAR *mytextW = NULL, *aptr, *wptr; - BOOL diff_found = FALSE; - int j; - unsigned int i; - LONG l; - - tempf=_tempnam(".","wne"); - tempfh = fopen(tempf,"wb"); - j = 'a'; - /* pad to almost the length of the internal buffer */ - for (i=0; ilpReserved2 = block; - startup->cbReserved2 = sizeof(unsigned) + (sizeof(char) + sizeof(HANDLE)) * count; - wxflag_ptr = block + sizeof(unsigned); - handle_ptr = (HANDLE *)(wxflag_ptr + count); - - *(unsigned*)block = count; - for (i = 0; i < count; i++) - { - wxflag_ptr[i] = 0x81; - handle_ptr[i] = handles[i]; - } -} - -static const char *read_file( HANDLE file ) -{ - static char buffer[128]; - DWORD ret; - SetFilePointer( file, 0, NULL, FILE_BEGIN ); - if (!ReadFile( file, buffer, sizeof(buffer) - 1, &ret, NULL)) ret = 0; - buffer[ret] = 0; - return buffer; -} - -static void test_stdout_handle( STARTUPINFO *startup, char *cmdline, HANDLE hstdout, BOOL expect_stdout, - const char *descr ) -{ - const char *data; - HANDLE hErrorFile; - SECURITY_ATTRIBUTES sa; - PROCESS_INFORMATION proc; - - /* make file handle inheritable */ - sa.nLength = sizeof(sa); - sa.lpSecurityDescriptor = NULL; - sa.bInheritHandle = TRUE; - - hErrorFile = CreateFileA( "fdopen.err", GENERIC_READ|GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, &sa, CREATE_ALWAYS, 0, NULL ); - startup->dwFlags = STARTF_USESTDHANDLES; - startup->hStdInput = GetStdHandle( STD_INPUT_HANDLE ); - startup->hStdOutput = hErrorFile; - startup->hStdError = GetStdHandle( STD_ERROR_HANDLE ); - - CreateProcessA( NULL, cmdline, NULL, NULL, TRUE, - CREATE_DEFAULT_ERROR_MODE | NORMAL_PRIORITY_CLASS, NULL, NULL, startup, &proc ); - winetest_wait_child_process( proc.hProcess ); - - data = read_file( hErrorFile ); - if (expect_stdout) - ok( strcmp( data, "Success" ), "%s: Error file shouldn't contain data\n", descr ); - else - ok( !strcmp( data, "Success" ), "%s: Wrong error data (%s)\n", descr, data ); - - if (hstdout) - { - data = read_file( hstdout ); - if (expect_stdout) - ok( !strcmp( data, "Success" ), "%s: Wrong stdout data (%s)\n", descr, data ); - else - ok( strcmp( data, "Success" ), "%s: Stdout file shouldn't contain data\n", descr ); - } - - CloseHandle( hErrorFile ); - DeleteFile( "fdopen.err" ); -} - -static void test_file_inherit( const char* selfname ) -{ - int fd; - const char* arg_v[5]; - char buffer[16]; - char cmdline[MAX_PATH]; - STARTUPINFO startup; - SECURITY_ATTRIBUTES sa; - HANDLE handles[3]; - - fd = open ("fdopen.tst", O_CREAT | O_RDWR | O_BINARY, _S_IREAD |_S_IWRITE); - ok(fd != -1, "Couldn't create test file\n"); - arg_v[0] = selfname; - arg_v[1] = "tests/file.c"; - arg_v[2] = "inherit"; - arg_v[3] = buffer; sprintf(buffer, "%d", fd); - arg_v[4] = 0; - _spawnvp(_P_WAIT, selfname, arg_v); - ok(tell(fd) == 8, "bad position %u expecting 8\n", tell(fd)); - lseek(fd, 0, SEEK_SET); - ok(read(fd, buffer, sizeof (buffer)) == 8 && memcmp(buffer, "Success", 8) == 0, "Couldn't read back the data\n"); - close (fd); - ok(unlink("fdopen.tst") == 0, "Couldn't unlink\n"); - - fd = open ("fdopen.tst", O_CREAT | O_RDWR | O_BINARY | O_NOINHERIT, _S_IREAD |_S_IWRITE); - ok(fd != -1, "Couldn't create test file\n"); - arg_v[0] = selfname; - arg_v[1] = "tests/file.c"; - arg_v[2] = "inherit_no"; - arg_v[3] = buffer; sprintf(buffer, "%d", fd); - arg_v[4] = 0; - _spawnvp(_P_WAIT, selfname, arg_v); - ok(tell(fd) == 0, "bad position %u expecting 0\n", tell(fd)); - ok(read(fd, buffer, sizeof (buffer)) == 0, "Found unexpected data (%s)\n", buffer); - close (fd); - ok(unlink("fdopen.tst") == 0, "Couldn't unlink\n"); - - /* make file handle inheritable */ - sa.nLength = sizeof(sa); - sa.lpSecurityDescriptor = NULL; - sa.bInheritHandle = TRUE; - sprintf(cmdline, "%s file inherit 1", selfname); - - /* init an empty Reserved2, which should not be recognized as inherit-block */ - ZeroMemory(&startup, sizeof(STARTUPINFO)); - startup.cb = sizeof(startup); - create_io_inherit_block( &startup, 0, NULL ); - test_stdout_handle( &startup, cmdline, 0, FALSE, "empty block" ); - - /* test with valid inheritblock */ - handles[0] = GetStdHandle( STD_INPUT_HANDLE ); - handles[1] = CreateFileA( "fdopen.tst", GENERIC_READ|GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, &sa, CREATE_ALWAYS, 0, NULL ); - handles[2] = GetStdHandle( STD_ERROR_HANDLE ); - create_io_inherit_block( &startup, 3, handles ); - test_stdout_handle( &startup, cmdline, handles[1], TRUE, "valid block" ); - CloseHandle( handles[1] ); - DeleteFile("fdopen.tst"); - - /* test inherit block starting with unsigned zero */ - handles[1] = CreateFileA( "fdopen.tst", GENERIC_READ|GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, &sa, CREATE_ALWAYS, 0, NULL ); - create_io_inherit_block( &startup, 3, handles ); - *(unsigned int *)startup.lpReserved2 = 0; - test_stdout_handle( &startup, cmdline, handles[1], FALSE, "zero count block" ); - CloseHandle( handles[1] ); - DeleteFile("fdopen.tst"); - - /* test inherit block with smaller size */ - handles[1] = CreateFileA( "fdopen.tst", GENERIC_READ|GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, &sa, CREATE_ALWAYS, 0, NULL ); - create_io_inherit_block( &startup, 3, handles ); - startup.cbReserved2 -= 3; - test_stdout_handle( &startup, cmdline, handles[1], TRUE, "small size block" ); - CloseHandle( handles[1] ); - DeleteFile("fdopen.tst"); - - /* test inherit block with even smaller size */ - handles[1] = CreateFileA( "fdopen.tst", GENERIC_READ|GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, &sa, CREATE_ALWAYS, 0, NULL ); - create_io_inherit_block( &startup, 3, handles ); - startup.cbReserved2 = sizeof(unsigned int) + sizeof(HANDLE) + sizeof(char); - test_stdout_handle( &startup, cmdline, handles[1], FALSE, "smaller size block" ); - CloseHandle( handles[1] ); - DeleteFile("fdopen.tst"); - - /* test inherit block with larger size */ - handles[1] = CreateFileA( "fdopen.tst", GENERIC_READ|GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, &sa, CREATE_ALWAYS, 0, NULL ); - create_io_inherit_block( &startup, 3, handles ); - startup.cbReserved2 += 7; - test_stdout_handle( &startup, cmdline, handles[1], TRUE, "large size block" ); - CloseHandle( handles[1] ); - DeleteFile("fdopen.tst"); -} - -static void test_tmpnam( void ) -{ - char name[MAX_PATH] = "abc"; - char *res; - - res = tmpnam(NULL); - ok(res != NULL, "tmpnam returned NULL\n"); - ok(res[0] == '\\', "first character is not a backslash\n"); - ok(strchr(res+1, '\\') == 0, "file not in the root directory\n"); - ok(res[strlen(res)-1] == '.', "first call - last character is not a dot\n"); - - res = tmpnam(name); - ok(res != NULL, "tmpnam returned NULL\n"); - ok(res == name, "supplied buffer was not used\n"); - ok(res[0] == '\\', "first character is not a backslash\n"); - ok(strchr(res+1, '\\') == 0, "file not in the root directory\n"); - ok(res[strlen(res)-1] != '.', "second call - last character is a dot\n"); -} - -static void test_chsize( void ) -{ - int fd; - LONG cur, pos, count; - char temptext[] = "012345678"; - char *tempfile = _tempnam( ".", "tst" ); - - ok( tempfile != NULL, "Couldn't create test file: %s\n", tempfile ); - - fd = _open( tempfile, _O_CREAT|_O_TRUNC|_O_RDWR, _S_IREAD|_S_IWRITE ); - ok( fd > 0, "Couldn't open test file\n" ); - - count = _write( fd, temptext, sizeof(temptext) ); - ok( count > 0, "Couldn't write to test file\n" ); - - /* get current file pointer */ - cur = _lseek( fd, 0, SEEK_CUR ); - - /* make the file smaller */ - ok( _chsize( fd, sizeof(temptext) / 2 ) == 0, "_chsize() failed\n" ); - - pos = _lseek( fd, 0, SEEK_CUR ); - ok( cur == pos, "File pointer changed from: %d to: %d\n", cur, pos ); - ok( _filelength( fd ) == sizeof(temptext) / 2, "Wrong file size\n" ); - - /* enlarge the file */ - ok( _chsize( fd, sizeof(temptext) * 2 ) == 0, "_chsize() failed\n" ); - - pos = _lseek( fd, 0, SEEK_CUR ); - ok( cur == pos, "File pointer changed from: %d to: %d\n", cur, pos ); - ok( _filelength( fd ) == sizeof(temptext) * 2, "Wrong file size\n" ); - - _close( fd ); - _unlink( tempfile ); - free( tempfile ); -} - -static void test_fopen_fclose_fcloseall( void ) -{ - char fname1[] = "empty1"; - char fname2[] = "empty2"; - char fname3[] = "empty3"; - FILE *stream1, *stream2, *stream3, *stream4; - int ret, numclosed; - - /* testing fopen() */ - stream1 = fopen(fname1, "w+"); - ok(stream1 != NULL, "The file '%s' was not opened\n", fname1); - stream2 = fopen(fname2, "w "); - ok(stream2 != NULL, "The file '%s' was not opened\n", fname2 ); - _unlink(fname3); - stream3 = fopen(fname3, "r"); - ok(stream3 == NULL, "The file '%s' shouldn't exist before\n", fname3 ); - stream3 = fopen(fname3, "w+"); - ok(stream3 != NULL, "The file '%s' should be opened now\n", fname3 ); - errno = 0xfaceabad; - stream4 = fopen("", "w+"); - ok(stream4 == NULL && (errno == EINVAL || errno == ENOENT), - "filename is empty, errno = %d (expected 2 or 22)\n", errno); - errno = 0xfaceabad; - stream4 = fopen(NULL, "w+"); - ok(stream4 == NULL && (errno == EINVAL || errno == ENOENT), - "filename is NULL, errno = %d (expected 2 or 22)\n", errno); - - /* testing fclose() */ - ret = fclose(stream2); - ok(ret == 0, "The file '%s' was not closed\n", fname2); - ret = fclose(stream3); - ok(ret == 0, "The file '%s' was not closed\n", fname3); - ret = fclose(stream2); - ok(ret == EOF, "Closing file '%s' returned %d\n", fname2, ret); - ret = fclose(stream3); - ok(ret == EOF, "Closing file '%s' returned %d\n", fname3, ret); - - /* testing fcloseall() */ - numclosed = _fcloseall(); - /* fname1 should be closed here */ - ok(numclosed == 1, "Number of files closed by fcloseall(): %u\n", numclosed); - numclosed = _fcloseall(); - ok(numclosed == 0, "Number of files closed by fcloseall(): %u\n", numclosed); - - ok(_unlink(fname1) == 0, "Couldn't unlink file named '%s'\n", fname1); - ok(_unlink(fname2) == 0, "Couldn't unlink file named '%s'\n", fname2); - ok(_unlink(fname3) == 0, "Couldn't unlink file named '%s'\n", fname3); -} - -static void test_fopen_s( void ) -{ - const char name[] = "empty1"; - char buff[16]; - FILE *file; - int ret; - int len; - - if (!p_fopen_s) - { - win_skip("Skipping fopen_s test\n"); - return; - } - /* testing fopen_s */ - ret = p_fopen_s(&file, name, "w"); - ok(ret == 0, "fopen_s failed with %d\n", ret); - ok(file != 0, "fopen_s failed to return value\n"); - fwrite(name, sizeof(name), 1, file); - - ret = fclose(file); - ok(ret != EOF, "File failed to close\n"); - - file = fopen(name, "r"); - ok(file != 0, "fopen failed\n"); - len = fread(buff, 1, sizeof(name), file); - ok(len == sizeof(name), "File length is %d\n", len); - buff[sizeof(name)] = '\0'; - ok(strcmp(name, buff) == 0, "File content mismatch! Got %s, expected %s\n", buff, name); - - ret = fclose(file); - ok(ret != EOF, "File failed to close\n"); - - ok(_unlink(name) == 0, "Couldn't unlink file named '%s'\n", name); -} - -static void test__wfopen_s( void ) -{ - const char name[] = "empty1"; - const WCHAR wname[] = { - 'e','m','p','t','y','1',0 - }; - const WCHAR wmode[] = { - 'w',0 - }; - char buff[16]; - FILE *file; - int ret; - int len; - - if (!p__wfopen_s) - { - win_skip("Skipping _wfopen_s test\n"); - return; - } - /* testing _wfopen_s */ - ret = p__wfopen_s(&file, wname, wmode); - ok(ret == 0, "_wfopen_s failed with %d\n", ret); - ok(file != 0, "_wfopen_s failed to return value\n"); - fwrite(name, sizeof(name), 1, file); - - ret = fclose(file); - ok(ret != EOF, "File failed to close\n"); - - file = fopen(name, "r"); - ok(file != 0, "fopen failed\n"); - len = fread(buff, 1, sizeof(name), file); - ok(len == sizeof(name), "File length is %d\n", len); - buff[sizeof(name)] = '\0'; - ok(strcmp(name, buff) == 0, "File content mismatch! Got %s, expected %s\n", buff, name); - - ret = fclose(file); - ok(ret != EOF, "File failed to close\n"); - - ok(_unlink(name) == 0, "Couldn't unlink file named '%s'\n", name); -} - -static void test_get_osfhandle(void) -{ - int fd; - char fname[] = "t_get_osfhanle"; - DWORD bytes_written; - HANDLE handle; - - fd = _sopen(fname, _O_CREAT|_O_RDWR, _SH_DENYRW, _S_IREAD | _S_IWRITE); - handle = (HANDLE)_get_osfhandle(fd); - WriteFile(handle, "bar", 3, &bytes_written, NULL); - _close(fd); - fd = _open(fname, _O_RDONLY, 0); - ok(fd != -1, "Couldn't open '%s' after _get_osfhandle()\n", fname); - - _close(fd); - _unlink(fname); -} - -static void test_setmaxstdio(void) -{ - ok(2048 == _setmaxstdio(2048),"_setmaxstdio returned %d instead of 2048\n",_setmaxstdio(2048)); - ok(-1 == _setmaxstdio(2049),"_setmaxstdio returned %d instead of -1\n",_setmaxstdio(2049)); -} - -static void test_stat(void) -{ - int fd; - int pipes[2]; - int ret; - struct stat buf; - - /* Tests for a file */ - fd = open("stat.tst", O_WRONLY | O_CREAT | O_BINARY, _S_IREAD |_S_IWRITE); - if (fd >= 0) - { - ret = fstat(fd, &buf); - ok(!ret, "fstat failed: errno=%d\n", errno); - ok((buf.st_mode & _S_IFMT) == _S_IFREG, "bad format = %06o\n", buf.st_mode); - ok((buf.st_mode & 0777) == 0666, "bad st_mode = %06o\n", buf.st_mode); - ok(buf.st_dev == 0, "st_dev is %d, expected 0\n", buf.st_dev); - ok(buf.st_dev == buf.st_rdev, "st_dev (%d) and st_rdev (%d) differ\n", buf.st_dev, buf.st_rdev); - ok(buf.st_nlink == 1, "st_nlink is %d, expected 1\n", buf.st_nlink); - ok(buf.st_size == 0, "st_size is %d, expected 0\n", buf.st_size); - - ret = stat("stat.tst", &buf); - ok(!ret, "stat failed: errno=%d\n", errno); - ok((buf.st_mode & _S_IFMT) == _S_IFREG, "bad format = %06o\n", buf.st_mode); - ok((buf.st_mode & 0777) == 0666, "bad st_mode = %06o\n", buf.st_mode); - ok(buf.st_dev == buf.st_rdev, "st_dev (%d) and st_rdev (%d) differ\n", buf.st_dev, buf.st_rdev); - ok(buf.st_nlink == 1, "st_nlink is %d, expected 1\n", buf.st_nlink); - ok(buf.st_size == 0, "st_size is %d, expected 0\n", buf.st_size); - - close(fd); - remove("stat.tst"); - } - else - skip("open failed with errno %d\n", errno); - - /* Tests for a char device */ - if (_dup2(0, 10) == 0) - { - ret = fstat(10, &buf); - ok(!ret, "fstat(stdin) failed: errno=%d\n", errno); - if ((buf.st_mode & _S_IFMT) == _S_IFCHR) - { - ok(buf.st_mode == _S_IFCHR, "bad st_mode=%06o\n", buf.st_mode); - ok(buf.st_dev == 10, "st_dev is %d, expected 10\n", buf.st_dev); - ok(buf.st_rdev == 10, "st_rdev is %d, expected 10\n", buf.st_rdev); - ok(buf.st_nlink == 1, "st_nlink is %d, expected 1\n", buf.st_nlink); - } - else - skip("stdin is not a char device? st_mode=%06o\n", buf.st_mode); - close(10); - } - else - skip("_dup2 failed with errno %d\n", errno); - - /* Tests for pipes */ - if (_pipe(pipes, 1024, O_BINARY) == 0) - { - ret = fstat(pipes[0], &buf); - ok(!ret, "fstat(pipe) failed: errno=%d\n", errno); - ok(buf.st_mode == _S_IFIFO, "bad st_mode=%06o\n", buf.st_mode); - ok(buf.st_dev == pipes[0], "st_dev is %d, expected %d\n", buf.st_dev, pipes[0]); - ok(buf.st_rdev == pipes[0], "st_rdev is %d, expected %d\n", buf.st_rdev, pipes[0]); - ok(buf.st_nlink == 1, "st_nlink is %d, expected 1\n", buf.st_nlink); - close(pipes[0]); - close(pipes[1]); - } - else - skip("pipe failed with errno %d\n", errno); -} - -static const char* pipe_string="Hello world"; - -/* How many messages to transfer over the pipe */ -#define N_TEST_MESSAGES 3 - -static void test_pipes_child(int argc, char** args) -{ - int fd; - int nwritten; - int i; - - if (argc < 5) - { - ok(0, "not enough parameters: %d\n", argc); - return; - } - - fd=atoi(args[3]); - i=close(fd); - ok(!i, "unable to close %d: %d\n", fd, errno); - - fd=atoi(args[4]); - - for (i=0; i 0) - buf[r]='\0'; - ok(strcmp(buf, pipe_string) == 0, "expected to read '%s', got '%s'\n", pipe_string, buf); - } - - r=read(pipes[0], buf, sizeof(buf)-1); - ok(r == 0, "expected to read 0 bytes, got %d\n", r); - i=close(pipes[0]); - ok(!i, "unable to close %d: %d\n", pipes[0], errno); - - /* Test reading from a pipe with fread() */ - if (_pipe(pipes, 1024, O_BINARY) < 0) - { - ok(0, "pipe failed with errno %d\n", errno); - return; - } - - arg_v[0] = selfname; - arg_v[1] = "tests/file.c"; - arg_v[2] = "pipes"; - arg_v[3] = str_fdr; sprintf(str_fdr, "%d", pipes[0]); - arg_v[4] = str_fdw; sprintf(str_fdw, "%d", pipes[1]); - arg_v[5] = NULL; - proc_handles[1] = (HANDLE)_spawnvp(_P_NOWAIT, selfname, arg_v); - i=close(pipes[1]); - ok(!i, "unable to close %d: %d\n", pipes[1], errno); - file=fdopen(pipes[0], "r"); - - /* In blocking mode, fread will keep calling read() until it gets - * enough bytes, or EOF, even on Unix. (If this were a Unix terminal - * in cooked mode instead of a pipe, it would also stop on EOL.) - */ - expected[0] = 0; - for (i=0; i 0) - buf[r]='\0'; - ok(strcmp(buf, expected) == 0, "got '%s' expected '%s'\n", buf, expected); - - /* Let child close the file before we read, so we can sense EOF reliably */ - Sleep(100); - r=fread(buf, 1, sizeof(buf)-1, file); - ok(r == 0, "fread() returned %d instead of 0\n", r); - ok(ferror(file) == 0, "got ferror() = %d\n", ferror(file)); - ok(feof(file), "feof() is false!\n"); - - i=fclose(file); - ok(!i, "unable to close the pipe: %d\n", errno); -} - -static void test_unlink(void) -{ - FILE* file; - ok(mkdir("test_unlink") == 0, "unable to create test dir\n"); - file = fopen("test_unlink\\empty", "w"); - ok(file != NULL, "unable to create test file\n"); - if(file) - fclose(file); - ok(_unlink("test_unlink") != 0, "unlinking a non-empty directory must fail\n"); - unlink("test_unlink\\empty"); - rmdir("test_unlink"); -} - -static void test_dup2(void) -{ - ok(-1 == _dup2(0, -1), "expected _dup2 to fail when second arg is negative\n" ); -} - -START_TEST(file) -{ - int arg_c; - char** arg_v; - - init(); - - arg_c = winetest_get_mainargs( &arg_v ); - - /* testing low-level I/O */ - if (arg_c >= 3) - { - if (strcmp(arg_v[2], "inherit") == 0) - test_file_inherit_child(arg_v[3]); - else if (strcmp(arg_v[2], "inherit_no") == 0) - test_file_inherit_child_no(arg_v[3]); - else if (strcmp(arg_v[2], "pipes") == 0) - test_pipes_child(arg_c, arg_v); - else - ok(0, "invalid argument '%s'\n", arg_v[2]); - return; - } - test_dup2(); - test_file_inherit(arg_v[0]); - test_file_write_read(); - test_chsize(); - test_stat(); - test_unlink(); - - /* testing stream I/O */ - test_filbuf(); - test_fdopen(); - test_fopen_fclose_fcloseall(); - test_fopen_s(); - test__wfopen_s(); - test_fileops(); - test_asciimode(); - test_asciimode2(); - test_readmode(FALSE); /* binary mode */ - test_readmode(TRUE); /* ascii mode */ - test_readboundary(); - test_fgetc(); - test_fputc(); - test_flsbuf(); - test_fgetwc(); - test_ctrlz(); - test_file_put_get(); - test_tmpnam(); - test_get_osfhandle(); - test_setmaxstdio(); - test_pipes(arg_v[0]); - - /* Wait for the (_P_NOWAIT) spawned processes to finish to make sure the report - * file contains lines in the correct order - */ - WaitForMultipleObjects(sizeof(proc_handles)/sizeof(proc_handles[0]), proc_handles, TRUE, 5000); -} diff --git a/rostests/winetests/msvcrt/headers.c b/rostests/winetests/msvcrt/headers.c deleted file mode 100644 index 7c102b4c319..00000000000 --- a/rostests/winetests/msvcrt/headers.c +++ /dev/null @@ -1,472 +0,0 @@ -/* - * Copyright 2004 Dimitrie O. Paun - * - * 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 - * - * This file contains tests to ensure the consistency between symbols - * defined in the regular msvcrt headers, and the corresponding duplicated - * symbols defined in msvcrt.h (prefixed by MSVCRT_). - */ - -#include "dos.h" -#include "math.h" -#include "stdlib.h" -#include "io.h" -#include "errno.h" -#include "fcntl.h" -#include "malloc.h" -#include "limits.h" -#include "mbctype.h" -#include "stdio.h" -#include "wchar.h" -#include "ctype.h" -#include "crtdbg.h" -#include "share.h" -#include "search.h" -#include "wctype.h" -#include "float.h" -#include "stddef.h" -#include "mbstring.h" -#include "sys/locking.h" -#include "sys/utime.h" -#include "sys/types.h" -#include "sys/stat.h" -#include "sys/timeb.h" -#include "direct.h" -#include "conio.h" -#include "process.h" -#include "string.h" -#include "signal.h" -#include "time.h" -#include "locale.h" -#include "setjmp.h" -#include "wine/test.h" - -#ifdef __WINE_USE_MSVCRT -/* Wine-specific msvcrt headers */ -#define __WINE_MSVCRT_TEST -#include "eh.h" -#include "msvcrt.h" - -#ifdef __GNUC__ -#define TYPEOF(type) typeof(type) -#else -#define TYPEOF(type) int -#endif -#define MSVCRT(x) MSVCRT_##x -#define OFFSET(T,F) ((unsigned int)((char *)&((struct T *)0L)->F - (char *)0L)) -#define CHECK_SIZE(e) ok(sizeof(e) == sizeof(MSVCRT(e)), "Element has different sizes\n") -#define CHECK_TYPE(t) { TYPEOF(t) a = 0; TYPEOF(MSVCRT(t)) b = a; a = b; CHECK_SIZE(t); } -#define CHECK_STRUCT(s) ok(sizeof(struct s) == sizeof(struct MSVCRT(s)), "Struct has different sizes\n") -#define CHECK_FIELD(s,e) ok(OFFSET(s,e) == OFFSET(MSVCRT(s),e), "Bad offset\n") -#define CHECK_DEF(d) ok(d == MSVCRT_##d, "Defines (MSVCRT_)" #d " are different: %d vs. %d\n", d, MSVCRT_##d) - -/************* Checking types ***************/ -static void test_types(void) -{ - CHECK_TYPE(wchar_t); - CHECK_TYPE(wint_t); - CHECK_TYPE(wctype_t); - CHECK_TYPE(_ino_t); - CHECK_TYPE(_fsize_t); - CHECK_TYPE(size_t); - CHECK_TYPE(intptr_t); - CHECK_TYPE(uintptr_t); - CHECK_TYPE(_dev_t); - CHECK_TYPE(_off_t); - CHECK_TYPE(clock_t); - CHECK_TYPE(__time32_t); - CHECK_TYPE(__time64_t); - CHECK_TYPE(fpos_t); - CHECK_SIZE(FILE); - CHECK_TYPE(terminate_handler); - CHECK_TYPE(terminate_function); - CHECK_TYPE(unexpected_handler); - CHECK_TYPE(unexpected_function); - CHECK_TYPE(_se_translator_function); - CHECK_TYPE(_beginthread_start_routine_t); - CHECK_TYPE(_onexit_t); - CHECK_TYPE(__sighandler_t); -} - -/************* Checking structs ***************/ -static void test_structs(void) -{ - CHECK_STRUCT(tm); - CHECK_FIELD(tm, tm_sec); - CHECK_FIELD(tm, tm_min); - CHECK_FIELD(tm, tm_hour); - CHECK_FIELD(tm, tm_mday); - CHECK_FIELD(tm, tm_mon); - CHECK_FIELD(tm, tm_year); - CHECK_FIELD(tm, tm_wday); - CHECK_FIELD(tm, tm_yday); - CHECK_FIELD(tm, tm_isdst); - CHECK_STRUCT(__timeb32); - CHECK_FIELD(__timeb32, time); - CHECK_FIELD(__timeb32, millitm); - CHECK_FIELD(__timeb32, timezone); - CHECK_FIELD(__timeb32, dstflag); - CHECK_STRUCT(__timeb64); - CHECK_FIELD(__timeb64, time); - CHECK_FIELD(__timeb64, millitm); - CHECK_FIELD(__timeb64, timezone); - CHECK_FIELD(__timeb64, dstflag); - CHECK_STRUCT(_iobuf); - CHECK_FIELD(_iobuf, _ptr); - CHECK_FIELD(_iobuf, _cnt); - CHECK_FIELD(_iobuf, _base); - CHECK_FIELD(_iobuf, _flag); - CHECK_FIELD(_iobuf, _file); - CHECK_FIELD(_iobuf, _charbuf); - CHECK_FIELD(_iobuf, _bufsiz); - CHECK_FIELD(_iobuf, _tmpfname); - CHECK_STRUCT(lconv); - CHECK_FIELD(lconv, decimal_point); - CHECK_FIELD(lconv, thousands_sep); - CHECK_FIELD(lconv, grouping); - CHECK_FIELD(lconv, int_curr_symbol); - CHECK_FIELD(lconv, currency_symbol); - CHECK_FIELD(lconv, mon_decimal_point); - CHECK_FIELD(lconv, mon_thousands_sep); - CHECK_FIELD(lconv, mon_grouping); - CHECK_FIELD(lconv, positive_sign); - CHECK_FIELD(lconv, negative_sign); - CHECK_FIELD(lconv, int_frac_digits); - CHECK_FIELD(lconv, frac_digits); - CHECK_FIELD(lconv, p_cs_precedes); - CHECK_FIELD(lconv, p_sep_by_space); - CHECK_FIELD(lconv, n_cs_precedes); - CHECK_FIELD(lconv, n_sep_by_space); - CHECK_FIELD(lconv, p_sign_posn); - CHECK_FIELD(lconv, n_sign_posn); - CHECK_STRUCT(_exception); - CHECK_FIELD(_exception, type); - CHECK_FIELD(_exception, name); - CHECK_FIELD(_exception, arg1); - CHECK_FIELD(_exception, arg2); - CHECK_FIELD(_exception, retval); - CHECK_STRUCT(_complex); - CHECK_FIELD(_complex, x); - CHECK_FIELD(_complex, y); - CHECK_STRUCT(_div_t); - CHECK_FIELD(_div_t, quot); - CHECK_FIELD(_div_t, rem); - CHECK_STRUCT(_ldiv_t); - CHECK_FIELD(_ldiv_t, quot); - CHECK_FIELD(_ldiv_t, rem); - CHECK_STRUCT(_heapinfo); - CHECK_FIELD(_heapinfo, _pentry); - CHECK_FIELD(_heapinfo, _size); - CHECK_FIELD(_heapinfo, _useflag); -#ifdef __i386__ - CHECK_STRUCT(__JUMP_BUFFER); - CHECK_FIELD(__JUMP_BUFFER, Ebp); - CHECK_FIELD(__JUMP_BUFFER, Ebx); - CHECK_FIELD(__JUMP_BUFFER, Edi); - CHECK_FIELD(__JUMP_BUFFER, Esi); - CHECK_FIELD(__JUMP_BUFFER, Esp); - CHECK_FIELD(__JUMP_BUFFER, Eip); - CHECK_FIELD(__JUMP_BUFFER, Registration); - CHECK_FIELD(__JUMP_BUFFER, TryLevel); - CHECK_FIELD(__JUMP_BUFFER, Cookie); - CHECK_FIELD(__JUMP_BUFFER, UnwindFunc); - CHECK_FIELD(__JUMP_BUFFER, UnwindData[6]); -#endif - CHECK_STRUCT(_diskfree_t); - CHECK_FIELD(_diskfree_t, total_clusters); - CHECK_FIELD(_diskfree_t, avail_clusters); - CHECK_FIELD(_diskfree_t, sectors_per_cluster); - CHECK_FIELD(_diskfree_t, bytes_per_sector); - CHECK_STRUCT(_finddata_t); - CHECK_FIELD(_finddata_t, attrib); - CHECK_FIELD(_finddata_t, time_create); - CHECK_FIELD(_finddata_t, time_access); - CHECK_FIELD(_finddata_t, time_write); - CHECK_FIELD(_finddata_t, size); - CHECK_FIELD(_finddata_t, name[260]); - CHECK_STRUCT(_finddatai64_t); - CHECK_FIELD(_finddatai64_t, attrib); - CHECK_FIELD(_finddatai64_t, time_create); - CHECK_FIELD(_finddatai64_t, time_access); - CHECK_FIELD(_finddatai64_t, time_write); - CHECK_FIELD(_finddatai64_t, size); - CHECK_FIELD(_finddatai64_t, name[260]); - CHECK_STRUCT(_wfinddata_t); - CHECK_FIELD(_wfinddata_t, attrib); - CHECK_FIELD(_wfinddata_t, time_create); - CHECK_FIELD(_wfinddata_t, time_access); - CHECK_FIELD(_wfinddata_t, time_write); - CHECK_FIELD(_wfinddata_t, size); - CHECK_FIELD(_wfinddata_t, name[260]); - CHECK_STRUCT(_wfinddatai64_t); - CHECK_FIELD(_wfinddatai64_t, attrib); - CHECK_FIELD(_wfinddatai64_t, time_create); - CHECK_FIELD(_wfinddatai64_t, time_access); - CHECK_FIELD(_wfinddatai64_t, time_write); - CHECK_FIELD(_wfinddatai64_t, size); - CHECK_FIELD(_wfinddatai64_t, name[260]); - CHECK_STRUCT(__utimbuf32); - CHECK_FIELD(__utimbuf32, actime); - CHECK_FIELD(__utimbuf32, modtime); - CHECK_STRUCT(__utimbuf64); - CHECK_FIELD(__utimbuf64, actime); - CHECK_FIELD(__utimbuf64, modtime); - CHECK_STRUCT(_stat); - CHECK_FIELD(_stat, st_dev); - CHECK_FIELD(_stat, st_ino); - CHECK_FIELD(_stat, st_mode); - CHECK_FIELD(_stat, st_nlink); - CHECK_FIELD(_stat, st_uid); - CHECK_FIELD(_stat, st_gid); - CHECK_FIELD(_stat, st_rdev); - CHECK_FIELD(_stat, st_size); - CHECK_FIELD(_stat, st_atime); - CHECK_FIELD(_stat, st_mtime); - CHECK_FIELD(_stat, st_ctime); - CHECK_STRUCT(_stati64); - CHECK_FIELD(_stati64, st_dev); - CHECK_FIELD(_stati64, st_ino); - CHECK_FIELD(_stati64, st_mode); - CHECK_FIELD(_stati64, st_nlink); - CHECK_FIELD(_stati64, st_uid); - CHECK_FIELD(_stati64, st_gid); - CHECK_FIELD(_stati64, st_rdev); - CHECK_FIELD(_stati64, st_size); - CHECK_FIELD(_stati64, st_atime); - CHECK_FIELD(_stati64, st_mtime); - CHECK_FIELD(_stati64, st_ctime); - CHECK_STRUCT(_stat64); - CHECK_FIELD(_stat64, st_dev); - CHECK_FIELD(_stat64, st_ino); - CHECK_FIELD(_stat64, st_mode); - CHECK_FIELD(_stat64, st_nlink); - CHECK_FIELD(_stat64, st_uid); - CHECK_FIELD(_stat64, st_gid); - CHECK_FIELD(_stat64, st_rdev); - CHECK_FIELD(_stat64, st_size); - CHECK_FIELD(_stat64, st_atime); - CHECK_FIELD(_stat64, st_mtime); - CHECK_FIELD(_stat64, st_ctime); - CHECK_SIZE(_CRT_FLOAT); -} - -/************* Checking defines ***************/ -static void test_defines(void) -{ - CHECK_DEF(WEOF); - CHECK_DEF(EOF); - CHECK_DEF(TMP_MAX); - CHECK_DEF(RAND_MAX); - CHECK_DEF(BUFSIZ); - CHECK_DEF(STDIN_FILENO); - CHECK_DEF(STDOUT_FILENO); - CHECK_DEF(STDERR_FILENO); - CHECK_DEF(_IOFBF); - CHECK_DEF(_IONBF); - CHECK_DEF(_IOLBF); - CHECK_DEF(FILENAME_MAX); - CHECK_DEF(_P_WAIT); - CHECK_DEF(_P_NOWAIT); - CHECK_DEF(_P_OVERLAY); - CHECK_DEF(_P_NOWAITO); - CHECK_DEF(_P_DETACH); - CHECK_DEF(EPERM); - CHECK_DEF(ENOENT); - CHECK_DEF(ESRCH); - CHECK_DEF(EINTR); - CHECK_DEF(EIO); - CHECK_DEF(ENXIO); - CHECK_DEF(E2BIG); - CHECK_DEF(ENOEXEC); - CHECK_DEF(EBADF); - CHECK_DEF(ECHILD); - CHECK_DEF(EAGAIN); - CHECK_DEF(ENOMEM); - CHECK_DEF(EACCES); - CHECK_DEF(EFAULT); - CHECK_DEF(EBUSY); - CHECK_DEF(EEXIST); - CHECK_DEF(EXDEV); - CHECK_DEF(ENODEV); - CHECK_DEF(ENOTDIR); - CHECK_DEF(EISDIR); - CHECK_DEF(EINVAL); - CHECK_DEF(ENFILE); - CHECK_DEF(EMFILE); - CHECK_DEF(ENOTTY); - CHECK_DEF(EFBIG); - CHECK_DEF(ENOSPC); - CHECK_DEF(ESPIPE); - CHECK_DEF(EROFS); - CHECK_DEF(EMLINK); - CHECK_DEF(EPIPE); - CHECK_DEF(EDOM); - CHECK_DEF(ERANGE); - CHECK_DEF(EDEADLK); - CHECK_DEF(EDEADLOCK); - CHECK_DEF(ENAMETOOLONG); - CHECK_DEF(ENOLCK); - CHECK_DEF(ENOSYS); - CHECK_DEF(ENOTEMPTY); - CHECK_DEF(EILSEQ); - CHECK_DEF(LC_ALL); - CHECK_DEF(LC_COLLATE); - CHECK_DEF(LC_CTYPE); - CHECK_DEF(LC_MONETARY); - CHECK_DEF(LC_NUMERIC); - CHECK_DEF(LC_TIME); - CHECK_DEF(LC_MIN); - CHECK_DEF(LC_MAX); - CHECK_DEF(CLOCKS_PER_SEC); - CHECK_DEF(_HEAPEMPTY); - CHECK_DEF(_HEAPOK); - CHECK_DEF(_HEAPBADBEGIN); - CHECK_DEF(_HEAPBADNODE); - CHECK_DEF(_HEAPEND); - CHECK_DEF(_HEAPBADPTR); - CHECK_DEF(_FREEENTRY); - CHECK_DEF(_USEDENTRY); - CHECK_DEF(_OUT_TO_DEFAULT); - CHECK_DEF(_OUT_TO_STDERR); - CHECK_DEF(_OUT_TO_MSGBOX); - CHECK_DEF(_REPORT_ERRMODE); - CHECK_DEF(_UPPER); - CHECK_DEF(_LOWER); - CHECK_DEF(_DIGIT); - CHECK_DEF(_SPACE); - CHECK_DEF(_PUNCT); - CHECK_DEF(_CONTROL); - CHECK_DEF(_BLANK); - CHECK_DEF(_HEX); - CHECK_DEF(_LEADBYTE); - CHECK_DEF(_ALPHA); - CHECK_DEF(_IOREAD); - CHECK_DEF(_IOWRT); - CHECK_DEF(_IOMYBUF); - CHECK_DEF(_IOEOF); - CHECK_DEF(_IOERR); - CHECK_DEF(_IOSTRG); - CHECK_DEF(_IORW); - CHECK_DEF(_S_IEXEC); - CHECK_DEF(_S_IWRITE); - CHECK_DEF(_S_IREAD); - CHECK_DEF(_S_IFIFO); - CHECK_DEF(_S_IFCHR); - CHECK_DEF(_S_IFDIR); - CHECK_DEF(_S_IFREG); - CHECK_DEF(_S_IFMT); - CHECK_DEF(_LK_UNLCK); - CHECK_DEF(_LK_LOCK); - CHECK_DEF(_LK_NBLCK); - CHECK_DEF(_LK_RLCK); - CHECK_DEF(_LK_NBRLCK); - CHECK_DEF(_O_RDONLY); - CHECK_DEF(_O_WRONLY); - CHECK_DEF(_O_RDWR); - CHECK_DEF(_O_ACCMODE); - CHECK_DEF(_O_APPEND); - CHECK_DEF(_O_RANDOM); - CHECK_DEF(_O_SEQUENTIAL); - CHECK_DEF(_O_TEMPORARY); - CHECK_DEF(_O_NOINHERIT); - CHECK_DEF(_O_CREAT); - CHECK_DEF(_O_TRUNC); - CHECK_DEF(_O_EXCL); - CHECK_DEF(_O_SHORT_LIVED); - CHECK_DEF(_O_TEXT); - CHECK_DEF(_O_BINARY); - CHECK_DEF(_O_RAW); - CHECK_DEF(_SW_INEXACT); - CHECK_DEF(_SW_UNDERFLOW); - CHECK_DEF(_SW_OVERFLOW); - CHECK_DEF(_SW_ZERODIVIDE); - CHECK_DEF(_SW_INVALID); - CHECK_DEF(_SW_UNEMULATED); - CHECK_DEF(_SW_SQRTNEG); - CHECK_DEF(_SW_STACKOVERFLOW); - CHECK_DEF(_SW_STACKUNDERFLOW); - CHECK_DEF(_SW_DENORMAL); - CHECK_DEF(_FPCLASS_SNAN); - CHECK_DEF(_FPCLASS_QNAN); - CHECK_DEF(_FPCLASS_NINF); - CHECK_DEF(_FPCLASS_NN); - CHECK_DEF(_FPCLASS_ND); - CHECK_DEF(_FPCLASS_NZ); - CHECK_DEF(_FPCLASS_PZ); - CHECK_DEF(_FPCLASS_PD); - CHECK_DEF(_FPCLASS_PN); - CHECK_DEF(_FPCLASS_PINF); - CHECK_DEF(SIGINT); - CHECK_DEF(SIGILL); - CHECK_DEF(SIGFPE); - CHECK_DEF(SIGSEGV); - CHECK_DEF(SIGTERM); - CHECK_DEF(SIGBREAK); - CHECK_DEF(SIGABRT); - CHECK_DEF(NSIG); - CHECK_DEF(_FPE_INVALID); - CHECK_DEF(_FPE_DENORMAL); - CHECK_DEF(_FPE_ZERODIVIDE); - CHECK_DEF(_FPE_OVERFLOW); - CHECK_DEF(_FPE_UNDERFLOW); - CHECK_DEF(_FPE_INEXACT); - CHECK_DEF(_FPE_UNEMULATED); - CHECK_DEF(_FPE_SQRTNEG); - CHECK_DEF(_FPE_STACKOVERFLOW); - CHECK_DEF(_FPE_STACKUNDERFLOW); - CHECK_DEF(_FPE_EXPLICITGEN); - CHECK_DEF(_MCW_EM); - CHECK_DEF(_MCW_IC); - CHECK_DEF(_MCW_RC); - CHECK_DEF(_MCW_PC); - CHECK_DEF(_MCW_DN); - CHECK_DEF(_EM_INVALID); - CHECK_DEF(_EM_DENORMAL); - CHECK_DEF(_EM_ZERODIVIDE); - CHECK_DEF(_EM_OVERFLOW); - CHECK_DEF(_EM_UNDERFLOW); - CHECK_DEF(_EM_INEXACT); - CHECK_DEF(_IC_AFFINE); - CHECK_DEF(_IC_PROJECTIVE); - CHECK_DEF(_RC_CHOP); - CHECK_DEF(_RC_UP); - CHECK_DEF(_RC_DOWN); - CHECK_DEF(_RC_NEAR); - CHECK_DEF(_PC_24); - CHECK_DEF(_PC_53); - CHECK_DEF(_PC_64); - CHECK_DEF(_DN_SAVE); - CHECK_DEF(_DN_FLUSH); - CHECK_DEF(_DN_FLUSH_OPERANDS_SAVE_RESULTS); - CHECK_DEF(_DN_SAVE_OPERANDS_FLUSH_RESULTS); - CHECK_DEF(_EM_AMBIGUOUS); - CHECK_DEF(_OVERFLOW); - CHECK_DEF(_UNDERFLOW); - CHECK_DEF(_WRITE_ABORT_MSG); - CHECK_DEF(_CALL_REPORTFAULT); - CHECK_DEF(_TWO_DIGIT_EXPONENT); -} - -#endif /* __WINE_USE_MSVCRT */ - -START_TEST(headers) -{ -#ifdef __WINE_USE_MSVCRT - test_types(); - test_structs(); - test_defines(); -#endif -} diff --git a/rostests/winetests/msvcrt/heap.c b/rostests/winetests/msvcrt/heap.c deleted file mode 100644 index 3587e0e56f5..00000000000 --- a/rostests/winetests/msvcrt/heap.c +++ /dev/null @@ -1,439 +0,0 @@ -/* - * Unit test suite for memory functions - * - * Copyright 2003 Dimitrie O. Paun - * - * 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 "wine/test.h" - -static void (__cdecl *p_aligned_free)(void*) = NULL; -static void * (__cdecl *p_aligned_malloc)(size_t,size_t) = NULL; -static void * (__cdecl *p_aligned_offset_malloc)(size_t,size_t,size_t) = NULL; -static void * (__cdecl *p_aligned_realloc)(void*,size_t,size_t) = NULL; -static void * (__cdecl *p_aligned_offset_realloc)(void*,size_t,size_t,size_t) = NULL; - -static void test_aligned_malloc(unsigned int size, unsigned int alignment) -{ - void *mem; - - mem = p_aligned_malloc(size, alignment); - - if ((alignment & (alignment - 1)) == 0) - ok(mem != NULL, "_aligned_malloc(%d, %d) failed\n", size, alignment); - else - ok(mem == NULL, "_aligned_malloc(%d, %d) should have failed\n", size, alignment); - - if (mem) - { - ok(((DWORD_PTR)mem & (alignment ? alignment - 1 : 0)) == 0, - "_aligned_malloc(%d, %d) not aligned: %p\n", size, alignment, mem); - if (winetest_debug > 1) - { - void *saved; - saved = *(void **)((DWORD_PTR)((char *)mem - sizeof(void *)) & ~(sizeof(void *) - 1)); - trace("_aligned_malloc(%3d, %3d) returns %p, saved = %p\n", size, alignment, mem, saved ); - } - p_aligned_free(mem); - } - else - ok(errno == EINVAL, "_aligned_malloc(%d, %d) errno: %d != %d\n", size, alignment, errno, EINVAL); -} - -static void test_aligned_offset_malloc(unsigned int size, unsigned int alignment, unsigned int offset) -{ - void *mem; - - mem = p_aligned_offset_malloc(size, alignment, offset); - - if ((alignment & (alignment - 1)) == 0) - if (offset < size) - ok(mem != NULL, "_aligned_offset_malloc(%d, %d, %d) failed\n", size, alignment, offset); - else - ok(errno == EINVAL, "_aligned_offset_malloc(%d, %d, %d) errno: %d != %d\n", size, alignment, offset, errno, EINVAL); - else - ok(mem == NULL, "_aligned_offset_malloc(%d, %d, %d) should have failed\n", size, alignment, offset); - - if (mem) - { - ok(((DWORD_PTR)((char *)mem + offset) & (alignment ? alignment - 1 : 0)) == 0, - "_aligned_offset_malloc(%d, %d, %d) not aligned: %p\n", size, alignment, offset, mem); - if (winetest_debug > 1) - { - void *saved; - saved = *(void **)((DWORD_PTR)((char *)mem - sizeof(void *)) & ~(sizeof(void *) - 1)); - trace("_aligned_offset_malloc(%3d, %3d, %3d) returns %p, saved = %p\n", - size, alignment, offset, mem, saved); - } - p_aligned_free(mem); - } - else - ok(errno == EINVAL, "_aligned_offset_malloc(%d, %d, %d) errno: %d != %d\n", size, alignment, offset, errno, EINVAL); -} - -static void test_aligned_realloc(unsigned int size1, unsigned int size2, unsigned int alignment) -{ - void *mem, *mem1, *mem2; - - mem = p_aligned_malloc(size1, alignment); - - if ((alignment & (alignment - 1)) == 0) - ok(mem != NULL, "_aligned_malloc(%d, %d) failed\n", size1, alignment); - else - ok(mem == NULL, "_aligned_malloc(%d, %d) should have failed\n", size1, alignment); - - if (mem) - { - mem1 = malloc(size1); - if (mem1) - { - unsigned int i; - for (i = 0; i < size1; i++) - ((char *)mem)[i] = i + 1; - memcpy(mem1, mem, size1); - } - - ok(((DWORD_PTR)mem & (alignment ? alignment - 1 : 0)) == 0, - "_aligned_malloc(%d, %d) not aligned: %p\n", size1, alignment, mem); - if (winetest_debug > 1) - { - void *saved; - saved = *(void **)((DWORD_PTR)((char *)mem - sizeof(void *)) & ~(sizeof(void *) - 1)); - trace("_aligned_malloc(%3d, %3d) returns %p, saved = %p\n", size1, alignment, mem, saved); - } - - mem2 = p_aligned_realloc(mem, size2, alignment); - - ok(mem2 != NULL, "_aligned_realloc(%p, %d, %d) failed\n", mem, size2, alignment); - - if (mem2) - { - ok(((DWORD_PTR)mem2 & (alignment ? alignment - 1 : 0)) == 0, - "_aligned_realloc(%p, %d, %d) not aligned: %p\n", mem, size2, alignment, mem2); - if (winetest_debug > 1) - { - void *saved; - saved = *(void **)((DWORD_PTR)((char *)mem2 - sizeof(void *)) & ~(sizeof(void *) - 1)); - trace("_aligned_realloc(%p, %3d, %3d) returns %p, saved = %p\n", - mem, size2, alignment, mem2, saved); - } - if (mem1) - { - ok(memcmp(mem2, mem1, min(size1, size2))==0, "_aligned_realloc(%p, %d, %d) has different data\n", mem, size2, alignment); - if (memcmp(mem2, mem1, min(size1, size2)) && winetest_debug > 1) - { - unsigned int i; - for (i = 0; i < min(size1, size2); i++) - { - if (((char *)mem2)[i] != ((char *)mem1)[i]) - trace("%d: %02x != %02x\n", i, ((char *)mem2)[i] & 0xff, ((char *)mem1)[i] & 0xff); - } - } - } - p_aligned_free(mem2); - } else { - ok(errno == EINVAL, "_aligned_realloc(%p, %d, %d) errno: %d != %d\n", mem, size2, alignment, errno, EINVAL); - p_aligned_free(mem); - } - - free(mem1); - } - else - ok(errno == EINVAL, "_aligned_malloc(%d, %d) errno: %d != %d\n", size1, alignment, errno, EINVAL); -} - -static void test_aligned_offset_realloc(unsigned int size1, unsigned int size2, - unsigned int alignment, unsigned int offset) -{ - void *mem, *mem1, *mem2; - - mem = p_aligned_offset_malloc(size1, alignment, offset); - - if ((alignment & (alignment - 1)) == 0) - ok(mem != NULL, "_aligned_offset_malloc(%d, %d, %d) failed\n", size1, alignment, offset); - else - ok(mem == NULL, "_aligned_offset_malloc(%d, %d, %d) should have failed\n", size1, alignment, offset); - - if (mem) - { - mem1 = malloc(size1); - if (mem1) - { - unsigned int i; - for (i = 0; i < size1; i++) - ((char *)mem)[i] = i + 1; - memcpy(mem1, mem, size1); - } - - ok(((DWORD_PTR)((char *)mem + offset) & (alignment ? alignment - 1 : 0)) == 0, - "_aligned_offset_malloc(%d, %d, %d) not aligned: %p\n", size1, alignment, offset, mem); - if (winetest_debug > 1) - { - void *saved; - saved = *(void **)((DWORD_PTR)((char *)mem - sizeof(void *)) & ~(sizeof(void *) - 1)); - trace("_aligned_offset_malloc(%3d, %3d, %3d) returns %p, saved = %p\n", - size1, alignment, offset, mem, saved); - } - - mem2 = p_aligned_offset_realloc(mem, size2, alignment, offset); - - ok(mem2 != NULL, "_aligned_offset_realloc(%p, %d, %d, %d) failed\n", mem, size2, alignment, offset); - - if (mem2) - { - ok(((DWORD_PTR)((char *)mem + offset) & (alignment ? alignment - 1 : 0)) == 0, - "_aligned_offset_realloc(%p, %d, %d, %d) not aligned: %p\n", mem, size2, alignment, offset, mem2); - if (winetest_debug > 1) - { - void *saved; - saved = *(void **)((DWORD_PTR)((char *)mem2 - sizeof(void *)) & ~(sizeof(void *) - 1)); - trace("_aligned_offset_realloc(%p, %3d, %3d, %3d) returns %p, saved = %p\n", - mem, size2, alignment, offset, mem2, saved); - } - if (mem1) - { - ok(memcmp(mem2, mem1, min(size1, size2))==0, "_aligned_offset_realloc(%p, %d, %d, %d) has different data\n", mem, size2, alignment, offset); - if (memcmp(mem2, mem1, min(size1, size2)) && winetest_debug > 1) - { - unsigned int i; - for (i = 0; i < min(size1, size2); i++) - { - if (((char *)mem2)[i] != ((char *)mem1)[i]) - trace("%d: %02x != %02x\n", i, ((char *)mem2)[i] & 0xff, ((char *)mem1)[i] & 0xff); - } - } - } - p_aligned_free(mem2); - } else { - ok(errno == EINVAL, "_aligned_offset_realloc(%p, %d, %d, %d) errno: %d != %d\n", mem, size2, alignment, offset, errno, EINVAL); - p_aligned_free(mem); - } - - free(mem1); - } - else - ok(errno == EINVAL, "_aligned_offset_malloc(%d, %d) errno: %d != %d\n", size1, alignment, errno, EINVAL); -} - -static void test_aligned(void) -{ - HMODULE msvcrt = GetModuleHandle("msvcrt.dll"); - - if (msvcrt == NULL) - return; - - p_aligned_free = (void*)GetProcAddress(msvcrt, "_aligned_free"); - p_aligned_malloc = (void*)GetProcAddress(msvcrt, "_aligned_malloc"); - p_aligned_offset_malloc = (void*)GetProcAddress(msvcrt, "_aligned_offset_malloc"); - p_aligned_realloc = (void*)GetProcAddress(msvcrt, "_aligned_realloc"); - p_aligned_offset_realloc = (void*)GetProcAddress(msvcrt, "_aligned_offset_realloc"); - - if (!p_aligned_free || !p_aligned_malloc || !p_aligned_offset_malloc || !p_aligned_realloc || !p_aligned_offset_realloc) - { - skip("aligned memory tests skipped\n"); - return; - } - - test_aligned_malloc(256, 0); - test_aligned_malloc(256, 1); - test_aligned_malloc(256, 2); - test_aligned_malloc(256, 3); - test_aligned_malloc(256, 4); - test_aligned_malloc(256, 8); - test_aligned_malloc(256, 16); - test_aligned_malloc(256, 32); - test_aligned_malloc(256, 64); - test_aligned_malloc(256, 127); - test_aligned_malloc(256, 128); - - test_aligned_offset_malloc(256, 0, 0); - test_aligned_offset_malloc(256, 1, 0); - test_aligned_offset_malloc(256, 2, 0); - test_aligned_offset_malloc(256, 3, 0); - test_aligned_offset_malloc(256, 4, 0); - test_aligned_offset_malloc(256, 8, 0); - test_aligned_offset_malloc(256, 16, 0); - test_aligned_offset_malloc(256, 32, 0); - test_aligned_offset_malloc(256, 64, 0); - test_aligned_offset_malloc(256, 127, 0); - test_aligned_offset_malloc(256, 128, 0); - - test_aligned_offset_malloc(256, 0, 4); - test_aligned_offset_malloc(256, 1, 4); - test_aligned_offset_malloc(256, 2, 4); - test_aligned_offset_malloc(256, 3, 4); - test_aligned_offset_malloc(256, 4, 4); - test_aligned_offset_malloc(256, 8, 4); - test_aligned_offset_malloc(256, 16, 4); - test_aligned_offset_malloc(256, 32, 4); - test_aligned_offset_malloc(256, 64, 4); - test_aligned_offset_malloc(256, 127, 4); - test_aligned_offset_malloc(256, 128, 4); - - test_aligned_offset_malloc(256, 8, 7); - test_aligned_offset_malloc(256, 8, 9); - test_aligned_offset_malloc(256, 8, 16); - test_aligned_offset_malloc(256, 8, 17); - test_aligned_offset_malloc(256, 8, 254); - test_aligned_offset_malloc(256, 8, 255); - test_aligned_offset_malloc(256, 8, 256); - test_aligned_offset_malloc(256, 8, 512); - - test_aligned_realloc(256, 512, 0); - test_aligned_realloc(256, 128, 0); - test_aligned_realloc(256, 512, 4); - test_aligned_realloc(256, 128, 4); - test_aligned_realloc(256, 512, 8); - test_aligned_realloc(256, 128, 8); - test_aligned_realloc(256, 512, 16); - test_aligned_realloc(256, 128, 16); - test_aligned_realloc(256, 512, 32); - test_aligned_realloc(256, 128, 32); - test_aligned_realloc(256, 512, 64); - test_aligned_realloc(256, 128, 64); - - test_aligned_offset_realloc(256, 512, 0, 0); - test_aligned_offset_realloc(256, 128, 0, 0); - test_aligned_offset_realloc(256, 512, 4, 0); - test_aligned_offset_realloc(256, 128, 4, 0); - test_aligned_offset_realloc(256, 512, 8, 0); - test_aligned_offset_realloc(256, 128, 8, 0); - test_aligned_offset_realloc(256, 512, 16, 0); - test_aligned_offset_realloc(256, 128, 16, 0); - test_aligned_offset_realloc(256, 512, 32, 0); - test_aligned_offset_realloc(256, 128, 32, 0); - test_aligned_offset_realloc(256, 512, 64, 0); - test_aligned_offset_realloc(256, 128, 64, 0); - - test_aligned_offset_realloc(256, 512, 0, 4); - test_aligned_offset_realloc(256, 128, 0, 4); - test_aligned_offset_realloc(256, 512, 4, 4); - test_aligned_offset_realloc(256, 128, 4, 4); - test_aligned_offset_realloc(256, 512, 8, 4); - test_aligned_offset_realloc(256, 128, 8, 4); - test_aligned_offset_realloc(256, 512, 16, 4); - test_aligned_offset_realloc(256, 128, 16, 4); - test_aligned_offset_realloc(256, 512, 32, 4); - test_aligned_offset_realloc(256, 128, 32, 4); - test_aligned_offset_realloc(256, 512, 64, 4); - test_aligned_offset_realloc(256, 128, 64, 4); - - test_aligned_offset_realloc(256, 512, 0, 8); - test_aligned_offset_realloc(256, 128, 0, 8); - test_aligned_offset_realloc(256, 512, 4, 8); - test_aligned_offset_realloc(256, 128, 4, 8); - test_aligned_offset_realloc(256, 512, 8, 8); - test_aligned_offset_realloc(256, 128, 8, 8); - test_aligned_offset_realloc(256, 512, 16, 8); - test_aligned_offset_realloc(256, 128, 16, 8); - test_aligned_offset_realloc(256, 512, 32, 8); - test_aligned_offset_realloc(256, 128, 32, 8); - test_aligned_offset_realloc(256, 512, 64, 8); - test_aligned_offset_realloc(256, 128, 64, 8); - - test_aligned_offset_realloc(256, 512, 0, 16); - test_aligned_offset_realloc(256, 128, 0, 16); - test_aligned_offset_realloc(256, 512, 4, 16); - test_aligned_offset_realloc(256, 128, 4, 16); - test_aligned_offset_realloc(256, 512, 8, 16); - test_aligned_offset_realloc(256, 128, 8, 16); - test_aligned_offset_realloc(256, 512, 16, 16); - test_aligned_offset_realloc(256, 128, 16, 16); - test_aligned_offset_realloc(256, 512, 32, 16); - test_aligned_offset_realloc(256, 128, 32, 16); - test_aligned_offset_realloc(256, 512, 64, 16); - test_aligned_offset_realloc(256, 128, 64, 16); - - test_aligned_offset_realloc(256, 512, 0, 32); - test_aligned_offset_realloc(256, 128, 0, 32); - test_aligned_offset_realloc(256, 512, 4, 32); - test_aligned_offset_realloc(256, 128, 4, 32); - test_aligned_offset_realloc(256, 512, 8, 32); - test_aligned_offset_realloc(256, 128, 8, 32); - test_aligned_offset_realloc(256, 512, 16, 32); - test_aligned_offset_realloc(256, 128, 16, 32); - test_aligned_offset_realloc(256, 512, 32, 32); - test_aligned_offset_realloc(256, 128, 32, 32); - test_aligned_offset_realloc(256, 512, 64, 32); - test_aligned_offset_realloc(256, 128, 64, 32); - - test_aligned_offset_realloc(256, 512, 0, 64); - test_aligned_offset_realloc(256, 128, 0, 64); - test_aligned_offset_realloc(256, 512, 4, 64); - test_aligned_offset_realloc(256, 128, 4, 64); - test_aligned_offset_realloc(256, 512, 8, 64); - test_aligned_offset_realloc(256, 128, 8, 64); - test_aligned_offset_realloc(256, 512, 16, 64); - test_aligned_offset_realloc(256, 128, 16, 64); - test_aligned_offset_realloc(256, 512, 32, 64); - test_aligned_offset_realloc(256, 128, 32, 64); - test_aligned_offset_realloc(256, 512, 64, 64); - test_aligned_offset_realloc(256, 128, 64, 64); - - test_aligned_offset_realloc(256, 512, 0, 96); - test_aligned_offset_realloc(256, 128, 0, 96); - test_aligned_offset_realloc(256, 512, 4, 96); - test_aligned_offset_realloc(256, 128, 4, 96); - test_aligned_offset_realloc(256, 512, 8, 96); - test_aligned_offset_realloc(256, 128, 8, 96); - test_aligned_offset_realloc(256, 512, 16, 96); - test_aligned_offset_realloc(256, 128, 16, 96); - test_aligned_offset_realloc(256, 512, 32, 96); - test_aligned_offset_realloc(256, 128, 32, 96); - test_aligned_offset_realloc(256, 512, 64, 96); - test_aligned_offset_realloc(256, 128, 64, 96); - - test_aligned_offset_realloc(256, 512, 0, 112); - test_aligned_offset_realloc(256, 128, 0, 112); - test_aligned_offset_realloc(256, 512, 4, 112); - test_aligned_offset_realloc(256, 128, 4, 112); - test_aligned_offset_realloc(256, 512, 8, 112); - test_aligned_offset_realloc(256, 128, 8, 112); - test_aligned_offset_realloc(256, 512, 16, 112); - test_aligned_offset_realloc(256, 128, 16, 112); - test_aligned_offset_realloc(256, 512, 32, 112); - test_aligned_offset_realloc(256, 128, 32, 112); - test_aligned_offset_realloc(256, 512, 64, 112); - test_aligned_offset_realloc(256, 128, 64, 112); -} - -START_TEST(heap) -{ - void *mem; - - mem = malloc(0); - ok(mem != NULL, "memory not allocated for size 0\n"); - free(mem); - - mem = realloc(NULL, 10); - ok(mem != NULL, "memory not allocated\n"); - - mem = realloc(mem, 20); - ok(mem != NULL, "memory not reallocated\n"); - - mem = realloc(mem, 0); - ok(mem == NULL, "memory not freed\n"); - - mem = realloc(NULL, 0); - ok(mem != NULL, "memory not (re)allocated for size 0\n"); - - free(mem); - - test_aligned(); -} diff --git a/rostests/winetests/msvcrt/locale.c b/rostests/winetests/msvcrt/locale.c deleted file mode 100644 index 0e8d0dd84a2..00000000000 --- a/rostests/winetests/msvcrt/locale.c +++ /dev/null @@ -1,625 +0,0 @@ -/* - * Unit test suite for locale functions. - * - * Copyright 2010 Piotr 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 - -#include "wine/test.h" -#include "winnls.h" - -static BOOL (__cdecl *p__crtGetStringTypeW)(DWORD, DWORD, const wchar_t*, int, WORD*); -static int (__cdecl *pmemcpy_s)(void *, size_t, void*, size_t); - -static void init(void) -{ - HMODULE hmod = GetModuleHandleA("msvcrt.dll"); - - p__crtGetStringTypeW = (void*)GetProcAddress(hmod, "__crtGetStringTypeW"); - pmemcpy_s = (void*)GetProcAddress(hmod, "memcpy_s"); -} - -static void test_setlocale(void) -{ - static const char lc_all[] = "LC_COLLATE=C;LC_CTYPE=C;" - "LC_MONETARY=Greek_Greece.1253;LC_NUMERIC=Polish_Poland.1250;LC_TIME=C"; - - char *ret, buf[100]; - - ret = setlocale(20, "C"); - ok(ret == NULL, "ret = %s\n", ret); - - ret = setlocale(LC_ALL, ""); - ok(ret != NULL, "ret == NULL\n"); - - ret = setlocale(LC_ALL, "C"); - ok(!strcmp(ret, "C"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, NULL); - ok(!strcmp(ret, "C"), "ret = %s\n", ret); - - if(!setlocale(LC_NUMERIC, "Polish") - || !setlocale(LC_NUMERIC, "Greek") - || !setlocale(LC_NUMERIC, "German") - || !setlocale(LC_NUMERIC, "English")) { - win_skip("System with limited locales\n"); - return; - } - - ret = setlocale(LC_NUMERIC, "Polish"); - ok(!strcmp(ret, "Polish_Poland.1250"), "ret = %s\n", ret); - - ret = setlocale(LC_MONETARY, "Greek"); - ok(!strcmp(ret, "Greek_Greece.1253"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, NULL); - ok(!strcmp(ret, lc_all), "ret = %s\n", ret); - - strcpy(buf, ret); - ret = setlocale(LC_ALL, buf); - ok(!strcmp(ret, lc_all), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "German"); - ok(!strcmp(ret, "German_Germany.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "american"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "English_United States.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "american english"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "English_United States.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "american-english"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "English_United States.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "australian"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "English_Australia.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "belgian"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Dutch_Belgium.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "canadian"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "English_Canada.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "chinese"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Chinese (Simplified)_People's Republic of China.936") - || broken(!strcmp(ret, "Chinese_Taiwan.950")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "chinese-simplified"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Chinese (Simplified)_People's Republic of China.936") - || broken(!strcmp(ret, "Chinese_People's Republic of China.936")) - || broken(!strcmp(ret, "Chinese_Taiwan.950")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "chinese-traditional"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Chinese (Traditional)_Taiwan.950") - || broken(!strcmp(ret, "Chinese_Taiwan.950")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "chs"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Chinese (Simplified)_People's Republic of China.936") - || broken(!strcmp(ret, "Chinese_People's Republic of China.936")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "cht"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Chinese (Traditional)_Taiwan.950") - || broken(!strcmp(ret, "Chinese_Taiwan.950")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "csy"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Czech_Czech Republic.1250"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "czech"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Czech_Czech Republic.1250"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "dan"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Danish_Denmark.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "danish"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Danish_Denmark.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "dea"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "German_Austria.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "des"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "German_Switzerland.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "deu"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "German_Germany.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "dutch"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Dutch_Netherlands.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "dutch-belgian"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Dutch_Belgium.1252") - || broken(!strcmp(ret, "Dutch_Netherlands.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "ena"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "English_Australia.1252") - || broken(!strcmp(ret, "English_United States.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "ell"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Greek_Greece.1253"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "enc"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "English_Canada.1252") - || broken(!strcmp(ret, "English_United States.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "eng"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "English_United Kingdom.1252") - || broken(!strcmp(ret, "English_United States.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "enu"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "English_United States.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "enz"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "English_New Zealand.1252") - || broken(!strcmp(ret, "English_United States.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "english"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "English_United States.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "english-american"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "English_United States.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "english-aus"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "English_Australia.1252") - || broken(!strcmp(ret, "English_United States.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "english-can"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "English_Canada.1252") - || broken(!strcmp(ret, "English_United States.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "english-nz"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "English_New Zealand.1252") - || broken(!strcmp(ret, "English_United States.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "english-uk"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "English_United Kingdom.1252") - || broken(!strcmp(ret, "English_United States.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "english-us"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "English_United States.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "english-usa"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "English_United States.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "esm"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Spanish_Mexico.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "esn"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Spanish_Spain.1252") - || broken(!strcmp(ret, "Spanish - Modern Sort_Spain.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "esp"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Spanish_Spain.1252") - || broken(!strcmp(ret, "Spanish - Traditional Sort_Spain.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "fin"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Finnish_Finland.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "finnish"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Finnish_Finland.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "fra"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "French_France.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "frb"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "French_Belgium.1252") - || broken(!strcmp(ret, "French_France.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "frc"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "French_Canada.1252") - || broken(!strcmp(ret, "French_France.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "french"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "French_France.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "french-belgian"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "French_Belgium.1252") - || broken(!strcmp(ret, "French_France.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "french-canadian"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "French_Canada.1252") - || broken(!strcmp(ret, "French_France.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "french-swiss"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "French_Switzerland.1252") - || broken(!strcmp(ret, "French_France.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "frs"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "French_Switzerland.1252") - || broken(!strcmp(ret, "French_France.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "german"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "German_Germany.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "german-austrian"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "German_Austria.1252") - || broken(!strcmp(ret, "German_Germany.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "german-swiss"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "German_Switzerland.1252") - || broken(!strcmp(ret, "German_Germany.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "greek"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Greek_Greece.1253"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "hun"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Hungarian_Hungary.1250"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "hungarian"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Hungarian_Hungary.1250"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "icelandic"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Icelandic_Iceland.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "isl"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Icelandic_Iceland.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "ita"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Italian_Italy.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "italian"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Italian_Italy.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "italian-swiss"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Italian_Switzerland.1252") - || broken(!strcmp(ret, "Italian_Italy.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "its"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Italian_Switzerland.1252") - || broken(!strcmp(ret, "Italian_Italy.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "japanese"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Japanese_Japan.932"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "jpn"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Japanese_Japan.932"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "korean"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Korean_Korea.949"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "korean"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Korean_Korea.949"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "nlb"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Dutch_Belgium.1252") - || broken(!strcmp(ret, "Dutch_Netherlands.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "nld"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Dutch_Netherlands.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "non"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp( ret, "Norwegian-Nynorsk_Norway.1252") - || !strcmp(ret, "Norwegian (Nynorsk)_Norway.1252") - || broken(!strcmp(ret, "Norwegian (Bokm\xe5l)_Norway.1252")) - || broken(!strcmp(ret, "Norwegian_Norway.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "nor"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Norwegian (Bokm\xe5l)_Norway.1252") - || !strcmp(ret, "Norwegian (Bokmal)_Norway.1252") - || broken(!strcmp(ret, "Norwegian_Norway.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "norwegian-bokmal"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Norwegian (Bokm\xe5l)_Norway.1252") - || !strcmp(ret, "Norwegian (Bokmal)_Norway.1252") - || broken(!strcmp(ret, "Norwegian_Norway.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "norwegian-nynorsk"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Norwegian-Nynorsk_Norway.1252") - || !strcmp(ret, "Norwegian (Nynorsk)_Norway.1252") - || broken(!strcmp(ret, "Norwegian_Norway.1252")) - || broken(!strcmp(ret, "Norwegian (Bokmal)_Norway.1252")) - || broken(!strcmp(ret, "Norwegian (Bokm\xe5l)_Norway.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "plk"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Polish_Poland.1250"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "polish"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Polish_Poland.1250"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "portugese"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Portuguese_Brazil.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "portuguese-brazil"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Portuguese_Brazil.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "ptb"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Portuguese_Brazil.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "ptg"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Portuguese_Portugal.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "rus"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Russian_Russia.1251"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "russian"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Russian_Russia.1251"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "sky"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Slovak_Slovakia.1250"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "slovak"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Slovak_Slovakia.1250"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "spanish"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Spanish_Spain.1252") - || broken(!strcmp(ret, "Spanish - Traditional Sort_Spain.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "spanish-mexican"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Spanish_Mexico.1252") - || broken(!strcmp(ret, "Spanish_Spain.1252")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "spanish-modern"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Spanish - Modern Sort_Spain.1252") - || !strcmp(ret, "Spanish_Spain.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "sve"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Swedish_Sweden.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "swedish"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Swedish_Sweden.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "swiss"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "German_Switzerland.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "trk"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Turkish_Turkey.1254"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "turkish"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "Turkish_Turkey.1254"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "uk"); - ok(ret != NULL, "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "English_United Kingdom.1252") - || broken(!strcmp(ret, "Ukrainian_Ukraine.1251")), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "us"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "English_United States.1252"), "ret = %s\n", ret); - - ret = setlocale(LC_ALL, "usa"); - ok(ret != NULL || broken (ret == NULL), "ret == NULL\n"); - if(ret) - ok(!strcmp(ret, "English_United States.1252"), "ret = %s\n", ret); -} - -static void test_crtGetStringTypeW(void) -{ - static const wchar_t str0[] = { '0', '\0' }; - static const wchar_t strA[] = { 'A', '\0' }; - static const wchar_t str_space[] = { ' ', '\0' }; - static const wchar_t str_null[] = { '\0', '\0' }; - static const wchar_t str_rand[] = { 1234, '\0' }; - - const wchar_t *str[] = { str0, strA, str_space, str_null, str_rand }; - - WORD out_crt, out; - BOOL ret_crt, ret; - int i; - - if(!p__crtGetStringTypeW) { - win_skip("Skipping __crtGetStringTypeW tests\n"); - return; - } - - if(!pmemcpy_s) { - win_skip("Too old version of msvcrt.dll\n"); - return; - } - - for(i=0; i -#include "msvcrt.h" - -static int (__cdecl *prand_s)(unsigned int *); -static int (__cdecl *pmemcpy_s)(void *, MSVCRT_size_t, void*, MSVCRT_size_t); -static int (__cdecl *pI10_OUTPUT)(long double, int, int, void*); -static int (__cdecl *pstrerror_s)(char *, MSVCRT_size_t, int); -static int (__cdecl *p_get_doserrno)(int *); -static int (__cdecl *p_get_errno)(int *); -static int (__cdecl *p_set_doserrno)(int); -static int (__cdecl *p_set_errno)(int); - -static void init(void) -{ - HMODULE hmod = GetModuleHandleA("msvcrt.dll"); - - prand_s = (void *)GetProcAddress(hmod, "rand_s"); - pmemcpy_s = (void*)GetProcAddress(hmod, "memcpy_s"); - pI10_OUTPUT = (void*)GetProcAddress(hmod, "$I10_OUTPUT"); - pstrerror_s = (void *)GetProcAddress(hmod, "strerror_s"); - p_get_doserrno = (void *)GetProcAddress(hmod, "_get_doserrno"); - p_get_errno = (void *)GetProcAddress(hmod, "_get_errno"); - p_set_doserrno = (void *)GetProcAddress(hmod, "_set_doserrno"); - p_set_errno = (void *)GetProcAddress(hmod, "_set_errno"); -} - -static void test_rand_s(void) -{ - int ret; - unsigned int rand; - - if (!prand_s) - { - win_skip("rand_s is not available\n"); - return; - } - - errno = EBADF; - ret = prand_s(NULL); - ok(ret == EINVAL, "Expected rand_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to return EINVAL, got %d\n", errno); - - ret = prand_s(&rand); - ok(ret == 0, "Expected rand_s to return 0, got %d\n", ret); -} - -static void test_memcpy_s(void) -{ - static char data[] = "data\0to\0be\0copied"; - static char dest[32]; - int ret; - - if(!pmemcpy_s) - { - win_skip("memcpy_s is not available\n"); - return; - } - - errno = 0xdeadbeef; - ret = pmemcpy_s(NULL, 0, NULL, 0); - ok(ret == 0, "ret = %x\n", ret); - ok(errno == 0xdeadbeef, "errno = %x\n", errno); - - errno = 0xdeadbeef; - dest[0] = 'x'; - ret = pmemcpy_s(dest, 10, NULL, 0); - ok(ret == 0, "ret = %x\n", ret); - ok(errno == 0xdeadbeef, "errno = %x\n", errno); - ok(dest[0] == 'x', "dest[0] != \'x\'\n"); - - errno = 0xdeadbeef; - ret = pmemcpy_s(NULL, 10, data, 10); - ok(ret == EINVAL, "ret = %x\n", ret); - ok(errno == EINVAL, "errno = %x\n", errno); - - errno = 0xdeadbeef; - dest[7] = 'x'; - ret = pmemcpy_s(dest, 10, data, 5); - ok(ret == 0, "ret = %x\n", ret); - ok(errno == 0xdeadbeef, "errno = %x\n", errno); - ok(memcmp(dest, data, 10), "All data copied\n"); - ok(!memcmp(dest, data, 5), "First five bytes are different\n"); - - errno = 0xdeadbeef; - ret = pmemcpy_s(data, 10, data, 10); - ok(ret == 0, "ret = %x\n", ret); - ok(errno == 0xdeadbeef, "errno = %x\n", errno); - ok(!memcmp(dest, data, 5), "data was destroyed during overwriting\n"); - - errno = 0xdeadbeef; - dest[0] = 'x'; - ret = pmemcpy_s(dest, 5, data, 10); - ok(ret == ERANGE, "ret = %x\n", ret); - ok(errno == ERANGE, "errno = %x\n", errno); - ok(dest[0] == '\0', "dest[0] != \'\\0\'\n"); -} - -typedef struct _I10_OUTPUT_data { - short pos; - char sign; - BYTE len; - char str[100]; -} I10_OUTPUT_data; - -typedef struct _I10_OUTPUT_test { - long double d; - int size; - int flags; - - I10_OUTPUT_data out; - int ret; - const char *remain; -} I10_OUTPUT_test; - -static const I10_OUTPUT_test I10_OUTPUT_tests[] = { - /* arg3 = 0 */ - { 0.0, 10, 0, {0, ' ', 1, "0"}, 1, "" }, - { 1.0, 10, 0, {1, ' ', 1, "1"}, 1, "000000009" }, - { -1.0, 10, 0, {1, '-', 1, "1"}, 1, "000000009" }, - { 1.23, 10, 0, {1, ' ', 3, "123"}, 1, "0000009" }, - { 1e13, 10, 0, {14, ' ', 1, "1"}, 1, "000000009" }, - { 1e30, 30, 0, {31, ' ', 21, "100000000000000001988"}, 1, "" }, - { 1e-13, 10, 0, {-12, ' ', 1, "1"}, 1, "000000000" }, - { 0.25, 10, 0, {0, ' ', 2, "25"}, 1, "00000000" }, - { 1.0000001, 10, 0, {1, ' ', 8, "10000001"}, 1, "00" }, - /* arg3 = 1 */ - { 0.0, 10, 1, {0, ' ', 1, "0"}, 1, "" }, - { 1.0, 10, 1, {1, ' ', 1, "1"}, 1, "0000000009" }, - { -1.0, 10, 1, {1, '-', 1, "1"}, 1, "0000000009" }, - { 1.23, 10, 1, {1, ' ', 3, "123"}, 1, "00000009" }, - { 1e13, 10, 1, {14, ' ', 1, "1"}, 1, "00000000000000000009" }, - { 1e30, 30, 1, {31, ' ', 21, "100000000000000001988"}, 1, "" }, - { 1e-13, 10, 1, {0, ' ', 1, "0"}, 1, "" }, - { 1e-7, 10, 1, {-6, ' ', 1, "1"}, 1, "09" }, - { 0.25, 10, 1, {0, ' ', 2, "25"}, 1, "00000000" }, - { 1.0000001, 10, 1, {1, ' ', 8, "10000001"}, 1, "000" }, - /* too small buffer */ - { 0.0, 0, 0, {0, ' ', 1, "0"}, 1, "" }, - { 0.0, 0, 1, {0, ' ', 1, "0"}, 1, "" }, - { 123.0, 2, 0, {3, ' ', 2, "12"}, 1, "" }, - { 123.0, 0, 0, {0, ' ', 1, "0"}, 1, "" }, - { 123.0, 2, 1, {3, ' ', 3, "123"}, 1, "09" }, - { 0.99, 1, 0, {1, ' ', 1, "1"}, 1, "" }, - { 1264567.0, 2, 0, {7, ' ', 2, "13"}, 1, "" }, - { 1264567.0, 2, 1, {7, ' ', 7, "1264567"}, 1, "00" }, - { 1234567891.0, 2, 1, {10, ' ', 10, "1234567891"}, 1, "09" } -}; - -static void test_I10_OUTPUT(void) -{ - I10_OUTPUT_data out; - int i, j = sizeof(long double), ret; - - if(!pI10_OUTPUT) { - win_skip("I10_OUTPUT not available\n"); - return; - } - if (j != 12) - trace("sizeof(long double) = %d on this machine\n", j); - - for(i=0; i - -#include "windef.h" -#include "winbase.h" - -#define MSVCRT_LONG_MAX 0x7fffffffL -#define MSVCRT_ULONG_MAX 0xffffffffUL -#define MSVCRT_I64_MAX (((__int64)0x7fffffff << 32) | 0xffffffff) -#define MSVCRT_I64_MIN (-MSVCRT_I64_MAX-1) -#define MSVCRT_UI64_MAX (((unsigned __int64)0xffffffff << 32) | 0xffffffff) - -#define MSVCRT__MAX_DRIVE 3 -#define MSVCRT__MAX_DIR 256 -#define MSVCRT__MAX_FNAME 256 -#define MSVCRT__MAX_EXT 256 - -typedef unsigned short MSVCRT_wchar_t; -typedef unsigned short MSVCRT_wint_t; -typedef unsigned short MSVCRT_wctype_t; -typedef unsigned short MSVCRT__ino_t; -typedef unsigned int MSVCRT__fsize_t; -typedef int MSVCRT_long; -typedef unsigned int MSVCRT_ulong; -#ifdef _WIN64 -typedef unsigned __int64 MSVCRT_size_t; -typedef __int64 MSVCRT_intptr_t; -typedef unsigned __int64 MSVCRT_uintptr_t; -#else -typedef unsigned long MSVCRT_size_t; -typedef long MSVCRT_intptr_t; -typedef unsigned long MSVCRT_uintptr_t; -#endif -typedef unsigned int MSVCRT__dev_t; -typedef int MSVCRT__off_t; -typedef int MSVCRT_clock_t; -typedef int MSVCRT___time32_t; -typedef __int64 DECLSPEC_ALIGN(8) MSVCRT___time64_t; -typedef __int64 DECLSPEC_ALIGN(8) MSVCRT_fpos_t; -typedef int MSVCRT_mbstate_t; - -typedef void (__cdecl *MSVCRT_terminate_handler)(void); -typedef void (__cdecl *MSVCRT_terminate_function)(void); -typedef void (__cdecl *MSVCRT_unexpected_handler)(void); -typedef void (__cdecl *MSVCRT_unexpected_function)(void); -typedef void (__cdecl *MSVCRT__se_translator_function)(unsigned int code, struct _EXCEPTION_POINTERS *info); -typedef void (__cdecl *MSVCRT__beginthread_start_routine_t)(void *); -typedef unsigned int (__stdcall *MSVCRT__beginthreadex_start_routine_t)(void *); -typedef int (__cdecl *MSVCRT__onexit_t)(void); -typedef void (__cdecl *MSVCRT_invalid_parameter_handler)(const MSVCRT_wchar_t*, const MSVCRT_wchar_t*, const MSVCRT_wchar_t*, unsigned, MSVCRT_uintptr_t); -typedef void (__cdecl *MSVCRT_purecall_handler)(void); -typedef void (__cdecl *MSVCRT_security_error_handler)(int, void *); - -typedef struct {ULONG x80[3];} MSVCRT__LDOUBLE; /* Intel 80 bit FP format has sizeof() 12 */ - -struct MSVCRT_tm { - int tm_sec; - int tm_min; - int tm_hour; - int tm_mday; - int tm_mon; - int tm_year; - int tm_wday; - int tm_yday; - int tm_isdst; -}; - -typedef struct MSVCRT_tagLC_ID { - unsigned short wLanguage; - unsigned short wCountry; - unsigned short wCodePage; -} MSVCRT_LC_ID, *MSVCRT_LPLC_ID; - -typedef struct MSVCRT_threadlocaleinfostruct { - int refcount; - unsigned int lc_codepage; - unsigned int lc_collate_cp; - MSVCRT_ulong lc_handle[6]; - MSVCRT_LC_ID lc_id[6]; - struct { - char *locale; - wchar_t *wlocale; - int *refcount; - int *wrefcount; - } lc_category[6]; - int lc_clike; - int mb_cur_max; - int *lconv_intl_refcount; - int *lconv_num_refcount; - int *lconv_mon_refcount; - struct MSVCRT_lconv *lconv; - int *ctype1_refcount; - unsigned short *ctype1; - unsigned short *pctype; - unsigned char *pclmap; - unsigned char *pcumap; - struct MSVCRT___lc_time_data *lc_time_curr; -} MSVCRT_threadlocinfo; - -typedef struct MSVCRT_threadmbcinfostruct { - int refcount; - int mbcodepage; - int ismbcodepage; - int mblcid; - unsigned short mbulinfo[6]; - unsigned char mbctype[257]; - unsigned char mbcasemap[256]; -} MSVCRT_threadmbcinfo; - -typedef struct MSVCRT_threadlocaleinfostruct *MSVCRT_pthreadlocinfo; -typedef struct MSVCRT_threadmbcinfostruct *MSVCRT_pthreadmbcinfo; - -typedef struct MSVCRT_localeinfo_struct -{ - MSVCRT_pthreadlocinfo locinfo; - MSVCRT_pthreadmbcinfo mbcinfo; -} MSVCRT__locale_tstruct, *MSVCRT__locale_t; - - -/* TLS data */ -extern DWORD msvcrt_tls_index; - -/* Keep in sync with msvcr90/tests/msvcr90.c */ -struct __thread_data { - DWORD tid; - HANDLE handle; - int thread_errno; - MSVCRT_ulong thread_doserrno; - int unk1; - unsigned int random_seed; /* seed for rand() */ - char *strtok_next; /* next ptr for strtok() */ - MSVCRT_wchar_t *wcstok_next; /* next ptr for wcstok() */ - unsigned char *mbstok_next; /* next ptr for mbstok() */ - char *strerror_buffer; /* buffer for strerror */ - MSVCRT_wchar_t *wcserror_buffer; /* buffer for wcserror */ - char *tmpnam_buffer; /* buffer for tmpname() */ - MSVCRT_wchar_t *wtmpnam_buffer; /* buffer for wtmpname() */ - void *unk2[2]; - char *asctime_buffer; /* buffer for asctime */ - MSVCRT_wchar_t *wasctime_buffer; /* buffer for wasctime */ - struct MSVCRT_tm *time_buffer; /* buffer for localtime/gmtime */ - char *efcvt_buffer; /* buffer for ecvt/fcvt */ - int unk3[2]; - void *unk4[4]; - int fpecode; - MSVCRT_pthreadmbcinfo mbcinfo; - MSVCRT_pthreadlocinfo locinfo; - BOOL have_locale; - int unk5[1]; - MSVCRT_terminate_function terminate_handler; - MSVCRT_unexpected_function unexpected_handler; - MSVCRT__se_translator_function se_translator; - void *unk6[3]; - int unk7; - EXCEPTION_RECORD *exc_record; - void *unk8[100]; -}; - -typedef struct __thread_data thread_data_t; - -extern thread_data_t *msvcrt_get_thread_data(void); - -LCID MSVCRT_locale_to_LCID(const char *); -extern MSVCRT__locale_t MSVCRT_locale; -extern int MSVCRT___lc_codepage; -extern int MSVCRT___lc_collate_cp; -extern WORD MSVCRT__ctype [257]; - -void msvcrt_set_errno(int); - -void __cdecl _purecall(void); -void __cdecl _amsg_exit(int errnum); - -extern char **MSVCRT__environ; -extern MSVCRT_wchar_t **MSVCRT__wenviron; - -extern char ** msvcrt_SnapshotOfEnvironmentA(char **); -extern MSVCRT_wchar_t ** msvcrt_SnapshotOfEnvironmentW(MSVCRT_wchar_t **); - -MSVCRT_wchar_t *msvcrt_wstrdupa(const char *); - -/* FIXME: This should be declared in new.h but it's not an extern "C" so - * it would not be much use anyway. Even for Winelib applications. - */ -int __cdecl MSVCRT__set_new_mode(int mode); - -void* __cdecl MSVCRT_operator_new(MSVCRT_size_t); -void __cdecl MSVCRT_operator_delete(void*); - -typedef void* (__cdecl *malloc_func_t)(MSVCRT_size_t); -typedef void (__cdecl *free_func_t)(void*); - -extern char* __cdecl __unDName(char *,const char*,int,malloc_func_t,free_func_t,unsigned short int); -extern char* __cdecl __unDNameEx(char *,const char*,int,malloc_func_t,free_func_t,void *,unsigned short int); - -/* Setup and teardown multi threaded locks */ -extern void msvcrt_init_mt_locks(void); -extern void msvcrt_free_mt_locks(void); - -extern BOOL msvcrt_init_locale(void); -extern void msvcrt_init_math(void); -extern void msvcrt_init_io(void); -extern void msvcrt_free_io(void); -extern void msvcrt_init_console(void); -extern void msvcrt_free_console(void); -extern void msvcrt_init_args(void); -extern void msvcrt_free_args(void); -extern void msvcrt_init_signals(void); -extern void msvcrt_free_signals(void); - -extern unsigned msvcrt_create_io_inherit_block(WORD*, BYTE**); - -extern unsigned int __cdecl _control87(unsigned int, unsigned int); - -/* run-time error codes */ -#define _RT_STACK 0 -#define _RT_NULLPTR 1 -#define _RT_FLOAT 2 -#define _RT_INTDIV 3 -#define _RT_EXECMEM 5 -#define _RT_EXECFORM 6 -#define _RT_EXECENV 7 -#define _RT_SPACEARG 8 -#define _RT_SPACEENV 9 -#define _RT_ABORT 10 -#define _RT_NPTR 12 -#define _RT_FPTR 13 -#define _RT_BREAK 14 -#define _RT_INT 15 -#define _RT_THREAD 16 -#define _RT_LOCK 17 -#define _RT_HEAP 18 -#define _RT_OPENCON 19 -#define _RT_QWIN 20 -#define _RT_NOMAIN 21 -#define _RT_NONCONT 22 -#define _RT_INVALDISP 23 -#define _RT_ONEXIT 24 -#define _RT_PUREVIRT 25 -#define _RT_STDIOINIT 26 -#define _RT_LOWIOINIT 27 -#define _RT_HEAPINIT 28 -#define _RT_DOMAIN 120 -#define _RT_SING 121 -#define _RT_TLOSS 122 -#define _RT_CRNL 252 -#define _RT_BANNER 255 - -struct MSVCRT___timeb32 { - MSVCRT___time32_t time; - unsigned short millitm; - short timezone; - short dstflag; -}; - -struct MSVCRT___timeb64 { - MSVCRT___time64_t time; - unsigned short millitm; - short timezone; - short dstflag; -}; - -struct MSVCRT__iobuf { - char* _ptr; - int _cnt; - char* _base; - int _flag; - int _file; - int _charbuf; - int _bufsiz; - char* _tmpfname; -}; - -typedef struct MSVCRT__iobuf MSVCRT_FILE; - -struct MSVCRT_lconv { - char* decimal_point; - char* thousands_sep; - char* grouping; - char* int_curr_symbol; - char* currency_symbol; - char* mon_decimal_point; - char* mon_thousands_sep; - char* mon_grouping; - char* positive_sign; - char* negative_sign; - char int_frac_digits; - char frac_digits; - char p_cs_precedes; - char p_sep_by_space; - char n_cs_precedes; - char n_sep_by_space; - char p_sign_posn; - char n_sign_posn; -}; - -struct MSVCRT__exception { - int type; - char* name; - double arg1; - double arg2; - double retval; -}; - -struct MSVCRT__complex { - double x; /* Real part */ - double y; /* Imaginary part */ -}; - -typedef struct MSVCRT__div_t { - int quot; /* quotient */ - int rem; /* remainder */ -} MSVCRT_div_t; - -typedef struct MSVCRT__ldiv_t { - MSVCRT_long quot; /* quotient */ - MSVCRT_long rem; /* remainder */ -} MSVCRT_ldiv_t; - -struct MSVCRT__heapinfo { - int* _pentry; - MSVCRT_size_t _size; - int _useflag; -}; - -#ifdef __i386__ -struct MSVCRT___JUMP_BUFFER { - unsigned long Ebp; - unsigned long Ebx; - unsigned long Edi; - unsigned long Esi; - unsigned long Esp; - unsigned long Eip; - unsigned long Registration; - unsigned long TryLevel; - /* Start of new struct members */ - unsigned long Cookie; - unsigned long UnwindFunc; - unsigned long UnwindData[6]; -}; -#elif defined(__x86_64__) -struct MSVCRT__SETJMP_FLOAT128 -{ - unsigned __int64 DECLSPEC_ALIGN(16) Part[2]; -}; -struct MSVCRT___JUMP_BUFFER -{ - unsigned __int64 Frame; - unsigned __int64 Rbx; - unsigned __int64 Rsp; - unsigned __int64 Rbp; - unsigned __int64 Rsi; - unsigned __int64 Rdi; - unsigned __int64 R12; - unsigned __int64 R13; - unsigned __int64 R14; - unsigned __int64 R15; - unsigned __int64 Rip; - unsigned __int64 Spare; - struct MSVCRT__SETJMP_FLOAT128 Xmm6; - struct MSVCRT__SETJMP_FLOAT128 Xmm7; - struct MSVCRT__SETJMP_FLOAT128 Xmm8; - struct MSVCRT__SETJMP_FLOAT128 Xmm9; - struct MSVCRT__SETJMP_FLOAT128 Xmm10; - struct MSVCRT__SETJMP_FLOAT128 Xmm11; - struct MSVCRT__SETJMP_FLOAT128 Xmm12; - struct MSVCRT__SETJMP_FLOAT128 Xmm13; - struct MSVCRT__SETJMP_FLOAT128 Xmm14; - struct MSVCRT__SETJMP_FLOAT128 Xmm15; -}; -#endif /* __i386__ */ - -struct MSVCRT__diskfree_t { - unsigned int total_clusters; - unsigned int avail_clusters; - unsigned int sectors_per_cluster; - unsigned int bytes_per_sector; -}; - -struct MSVCRT__finddata32_t { - unsigned int attrib; - MSVCRT___time32_t time_create; - MSVCRT___time32_t time_access; - MSVCRT___time32_t time_write; - MSVCRT__fsize_t size; - char name[260]; -}; - -struct MSVCRT__finddata32i64_t { - unsigned int attrib; - MSVCRT___time32_t time_create; - MSVCRT___time32_t time_access; - MSVCRT___time32_t time_write; - __int64 DECLSPEC_ALIGN(8) size; - char name[260]; -}; - -struct MSVCRT__finddata64i32_t { - unsigned int attrib; - MSVCRT___time64_t time_create; - MSVCRT___time64_t time_access; - MSVCRT___time64_t time_write; - MSVCRT__fsize_t size; - char name[260]; -}; - -struct MSVCRT__finddata64_t { - unsigned int attrib; - MSVCRT___time64_t time_create; - MSVCRT___time64_t time_access; - MSVCRT___time64_t time_write; - __int64 DECLSPEC_ALIGN(8) size; - char name[260]; -}; - -struct MSVCRT__wfinddata32_t { - unsigned int attrib; - MSVCRT___time32_t time_create; - MSVCRT___time32_t time_access; - MSVCRT___time32_t time_write; - MSVCRT__fsize_t size; - MSVCRT_wchar_t name[260]; -}; - -struct MSVCRT__wfinddata32i64_t { - unsigned int attrib; - MSVCRT___time32_t time_create; - MSVCRT___time32_t time_access; - MSVCRT___time32_t time_write; - __int64 DECLSPEC_ALIGN(8) size; - MSVCRT_wchar_t name[260]; -}; - -struct MSVCRT__wfinddata64i32_t { - unsigned int attrib; - MSVCRT___time64_t time_create; - MSVCRT___time64_t time_access; - MSVCRT___time64_t time_write; - MSVCRT__fsize_t size; - MSVCRT_wchar_t name[260]; -}; - -struct MSVCRT__wfinddata64_t { - unsigned int attrib; - MSVCRT___time64_t time_create; - MSVCRT___time64_t time_access; - MSVCRT___time64_t time_write; - __int64 DECLSPEC_ALIGN(8) size; - MSVCRT_wchar_t name[260]; -}; - -struct MSVCRT___utimbuf32 -{ - MSVCRT___time32_t actime; - MSVCRT___time32_t modtime; -}; - -struct MSVCRT___utimbuf64 -{ - MSVCRT___time64_t actime; - MSVCRT___time64_t modtime; -}; - -/* for FreeBSD */ -#undef st_atime -#undef st_ctime -#undef st_mtime - -struct MSVCRT__stat32 { - MSVCRT__dev_t st_dev; - MSVCRT__ino_t st_ino; - unsigned short st_mode; - short st_nlink; - short st_uid; - short st_gid; - MSVCRT__dev_t st_rdev; - MSVCRT__off_t st_size; - MSVCRT___time32_t st_atime; - MSVCRT___time32_t st_mtime; - MSVCRT___time32_t st_ctime; -}; - -struct MSVCRT__stat32i64 { - MSVCRT__dev_t st_dev; - MSVCRT__ino_t st_ino; - unsigned short st_mode; - short st_nlink; - short st_uid; - short st_gid; - MSVCRT__dev_t st_rdev; - __int64 DECLSPEC_ALIGN(8) st_size; - MSVCRT___time32_t st_atime; - MSVCRT___time32_t st_mtime; - MSVCRT___time32_t st_ctime; -}; - -struct MSVCRT__stat64i32 { - MSVCRT__dev_t st_dev; - MSVCRT__ino_t st_ino; - unsigned short st_mode; - short st_nlink; - short st_uid; - short st_gid; - MSVCRT__dev_t st_rdev; - MSVCRT__off_t st_size; - MSVCRT___time64_t st_atime; - MSVCRT___time64_t st_mtime; - MSVCRT___time64_t st_ctime; -}; - -struct MSVCRT__stat64 { - MSVCRT__dev_t st_dev; - MSVCRT__ino_t st_ino; - unsigned short st_mode; - short st_nlink; - short st_uid; - short st_gid; - MSVCRT__dev_t st_rdev; - __int64 DECLSPEC_ALIGN(8) st_size; - MSVCRT___time64_t st_atime; - MSVCRT___time64_t st_mtime; - MSVCRT___time64_t st_ctime; -}; - -#ifdef _WIN64 -#define MSVCRT__finddata_t MSVCRT__finddata64i32_t -#define MSVCRT__finddatai64_t MSVCRT__finddata64_t -#define MSVCRT__wfinddata_t MSVCRT__wfinddata64i32_t -#define MSVCRT__wfinddatai64_t MSVCRT__wfinddata64_t -#define MSVCRT__stat MSVCRT__stat64i32 -#define MSVCRT__stati64 MSVCRT__stat64 -#else -#define MSVCRT__finddata_t MSVCRT__finddata32_t -#define MSVCRT__finddatai64_t MSVCRT__finddata32i64_t -#define MSVCRT__wfinddata_t MSVCRT__wfinddata32_t -#define MSVCRT__wfinddatai64_t MSVCRT__wfinddata32i64_t -#define MSVCRT__stat MSVCRT__stat32 -#define MSVCRT__stati64 MSVCRT__stat32i64 -#endif - -#define MSVCRT_WEOF (MSVCRT_wint_t)(0xFFFF) -#define MSVCRT_EOF (-1) -#define MSVCRT_TMP_MAX 0x7fff -#define MSVCRT_RAND_MAX 0x7fff -#define MSVCRT_BUFSIZ 512 - -#define MSVCRT_STDIN_FILENO 0 -#define MSVCRT_STDOUT_FILENO 1 -#define MSVCRT_STDERR_FILENO 2 - -/* more file._flag flags, but these conflict with Unix */ -#define MSVCRT__IOFBF 0x0000 -#define MSVCRT__IONBF 0x0004 -#define MSVCRT__IOLBF 0x0040 - -#define MSVCRT_FILENAME_MAX 260 -#define MSVCRT_DRIVE_MAX 3 -#define MSVCRT_FNAME_MAX 256 -#define MSVCRT_DIR_MAX 256 -#define MSVCRT_EXT_MAX 256 -#define MSVCRT_PATH_MAX 260 -#define MSVCRT_stdin (MSVCRT__iob+MSVCRT_STDIN_FILENO) -#define MSVCRT_stdout (MSVCRT__iob+MSVCRT_STDOUT_FILENO) -#define MSVCRT_stderr (MSVCRT__iob+MSVCRT_STDERR_FILENO) - -#define MSVCRT__P_WAIT 0 -#define MSVCRT__P_NOWAIT 1 -#define MSVCRT__P_OVERLAY 2 -#define MSVCRT__P_NOWAITO 3 -#define MSVCRT__P_DETACH 4 - -#define MSVCRT_EPERM 1 -#define MSVCRT_ENOENT 2 -#define MSVCRT_ESRCH 3 -#define MSVCRT_EINTR 4 -#define MSVCRT_EIO 5 -#define MSVCRT_ENXIO 6 -#define MSVCRT_E2BIG 7 -#define MSVCRT_ENOEXEC 8 -#define MSVCRT_EBADF 9 -#define MSVCRT_ECHILD 10 -#define MSVCRT_EAGAIN 11 -#define MSVCRT_ENOMEM 12 -#define MSVCRT_EACCES 13 -#define MSVCRT_EFAULT 14 -#define MSVCRT_EBUSY 16 -#define MSVCRT_EEXIST 17 -#define MSVCRT_EXDEV 18 -#define MSVCRT_ENODEV 19 -#define MSVCRT_ENOTDIR 20 -#define MSVCRT_EISDIR 21 -#define MSVCRT_EINVAL 22 -#define MSVCRT_ENFILE 23 -#define MSVCRT_EMFILE 24 -#define MSVCRT_ENOTTY 25 -#define MSVCRT_EFBIG 27 -#define MSVCRT_ENOSPC 28 -#define MSVCRT_ESPIPE 29 -#define MSVCRT_EROFS 30 -#define MSVCRT_EMLINK 31 -#define MSVCRT_EPIPE 32 -#define MSVCRT_EDOM 33 -#define MSVCRT_ERANGE 34 -#define MSVCRT_EDEADLK 36 -#define MSVCRT_EDEADLOCK MSVCRT_EDEADLK -#define MSVCRT_ENAMETOOLONG 38 -#define MSVCRT_ENOLCK 39 -#define MSVCRT_ENOSYS 40 -#define MSVCRT_ENOTEMPTY 41 -#define MSVCRT_EILSEQ 42 -#define MSVCRT_STRUNCATE 80 - -#define MSVCRT_LC_ALL 0 -#define MSVCRT_LC_COLLATE 1 -#define MSVCRT_LC_CTYPE 2 -#define MSVCRT_LC_MONETARY 3 -#define MSVCRT_LC_NUMERIC 4 -#define MSVCRT_LC_TIME 5 -#define MSVCRT_LC_MIN MSVCRT_LC_ALL -#define MSVCRT_LC_MAX MSVCRT_LC_TIME - -#define MSVCRT__HEAPEMPTY -1 -#define MSVCRT__HEAPOK -2 -#define MSVCRT__HEAPBADBEGIN -3 -#define MSVCRT__HEAPBADNODE -4 -#define MSVCRT__HEAPEND -5 -#define MSVCRT__HEAPBADPTR -6 - -#define MSVCRT__FREEENTRY 0 -#define MSVCRT__USEDENTRY 1 - -#define MSVCRT__OUT_TO_DEFAULT 0 -#define MSVCRT__OUT_TO_STDERR 1 -#define MSVCRT__OUT_TO_MSGBOX 2 -#define MSVCRT__REPORT_ERRMODE 3 - -/* ASCII char classification table - binary compatible */ -#define MSVCRT__UPPER 0x0001 /* C1_UPPER */ -#define MSVCRT__LOWER 0x0002 /* C1_LOWER */ -#define MSVCRT__DIGIT 0x0004 /* C1_DIGIT */ -#define MSVCRT__SPACE 0x0008 /* C1_SPACE */ -#define MSVCRT__PUNCT 0x0010 /* C1_PUNCT */ -#define MSVCRT__CONTROL 0x0020 /* C1_CNTRL */ -#define MSVCRT__BLANK 0x0040 /* C1_BLANK */ -#define MSVCRT__HEX 0x0080 /* C1_XDIGIT */ -#define MSVCRT__LEADBYTE 0x8000 -#define MSVCRT__ALPHA (0x0100|MSVCRT__UPPER|MSVCRT__LOWER) /* (C1_ALPHA|_UPPER|_LOWER) */ - -#define MSVCRT__IOREAD 0x0001 -#define MSVCRT__IOWRT 0x0002 -#define MSVCRT__IOMYBUF 0x0008 -#define MSVCRT__IOEOF 0x0010 -#define MSVCRT__IOERR 0x0020 -#define MSVCRT__IOSTRG 0x0040 -#define MSVCRT__IORW 0x0080 - -#define MSVCRT__S_IEXEC 0x0040 -#define MSVCRT__S_IWRITE 0x0080 -#define MSVCRT__S_IREAD 0x0100 -#define MSVCRT__S_IFIFO 0x1000 -#define MSVCRT__S_IFCHR 0x2000 -#define MSVCRT__S_IFDIR 0x4000 -#define MSVCRT__S_IFREG 0x8000 -#define MSVCRT__S_IFMT 0xF000 - -#define MSVCRT__LK_UNLCK 0 -#define MSVCRT__LK_LOCK 1 -#define MSVCRT__LK_NBLCK 2 -#define MSVCRT__LK_RLCK 3 -#define MSVCRT__LK_NBRLCK 4 - -#define MSVCRT__SH_COMPAT 0x00 /* Compatibility */ -#define MSVCRT__SH_DENYRW 0x10 /* Deny read/write */ -#define MSVCRT__SH_DENYWR 0x20 /* Deny write */ -#define MSVCRT__SH_DENYRD 0x30 /* Deny read */ -#define MSVCRT__SH_DENYNO 0x40 /* Deny nothing */ - -#define MSVCRT__O_RDONLY 0 -#define MSVCRT__O_WRONLY 1 -#define MSVCRT__O_RDWR 2 -#define MSVCRT__O_ACCMODE (MSVCRT__O_RDONLY|MSVCRT__O_WRONLY|MSVCRT__O_RDWR) -#define MSVCRT__O_APPEND 0x0008 -#define MSVCRT__O_RANDOM 0x0010 -#define MSVCRT__O_SEQUENTIAL 0x0020 -#define MSVCRT__O_TEMPORARY 0x0040 -#define MSVCRT__O_NOINHERIT 0x0080 -#define MSVCRT__O_CREAT 0x0100 -#define MSVCRT__O_TRUNC 0x0200 -#define MSVCRT__O_EXCL 0x0400 -#define MSVCRT__O_SHORT_LIVED 0x1000 -#define MSVCRT__O_TEXT 0x4000 -#define MSVCRT__O_BINARY 0x8000 -#define MSVCRT__O_RAW MSVCRT__O_BINARY - -/* _statusfp bit flags */ -#define MSVCRT__SW_INEXACT 0x00000001 /* inexact (precision) */ -#define MSVCRT__SW_UNDERFLOW 0x00000002 /* underflow */ -#define MSVCRT__SW_OVERFLOW 0x00000004 /* overflow */ -#define MSVCRT__SW_ZERODIVIDE 0x00000008 /* zero divide */ -#define MSVCRT__SW_INVALID 0x00000010 /* invalid */ - -#define MSVCRT__SW_UNEMULATED 0x00000040 /* unemulated instruction */ -#define MSVCRT__SW_SQRTNEG 0x00000080 /* square root of a neg number */ -#define MSVCRT__SW_STACKOVERFLOW 0x00000200 /* FP stack overflow */ -#define MSVCRT__SW_STACKUNDERFLOW 0x00000400 /* FP stack underflow */ - -#define MSVCRT__SW_DENORMAL 0x00080000 /* denormal status bit */ - -/* fpclass constants */ -#define MSVCRT__FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */ -#define MSVCRT__FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */ -#define MSVCRT__FPCLASS_NINF 0x0004 /* Negative Infinity */ -#define MSVCRT__FPCLASS_NN 0x0008 /* Negative Normal */ -#define MSVCRT__FPCLASS_ND 0x0010 /* Negative Denormal */ -#define MSVCRT__FPCLASS_NZ 0x0020 /* Negative Zero */ -#define MSVCRT__FPCLASS_PZ 0x0040 /* Positive Zero */ -#define MSVCRT__FPCLASS_PD 0x0080 /* Positive Denormal */ -#define MSVCRT__FPCLASS_PN 0x0100 /* Positive Normal */ -#define MSVCRT__FPCLASS_PINF 0x0200 /* Positive Infinity */ - -#define MSVCRT__MCW_EM 0x0008001f -#define MSVCRT__MCW_IC 0x00040000 -#define MSVCRT__MCW_RC 0x00000300 -#define MSVCRT__MCW_PC 0x00030000 -#define MSVCRT__MCW_DN 0x03000000 - -#define MSVCRT__EM_INVALID 0x00000010 -#define MSVCRT__EM_DENORMAL 0x00080000 -#define MSVCRT__EM_ZERODIVIDE 0x00000008 -#define MSVCRT__EM_OVERFLOW 0x00000004 -#define MSVCRT__EM_UNDERFLOW 0x00000002 -#define MSVCRT__EM_INEXACT 0x00000001 -#define MSVCRT__IC_AFFINE 0x00040000 -#define MSVCRT__IC_PROJECTIVE 0x00000000 -#define MSVCRT__RC_CHOP 0x00000300 -#define MSVCRT__RC_UP 0x00000200 -#define MSVCRT__RC_DOWN 0x00000100 -#define MSVCRT__RC_NEAR 0x00000000 -#define MSVCRT__PC_24 0x00020000 -#define MSVCRT__PC_53 0x00010000 -#define MSVCRT__PC_64 0x00000000 -#define MSVCRT__DN_SAVE 0x00000000 -#define MSVCRT__DN_FLUSH 0x01000000 -#define MSVCRT__DN_FLUSH_OPERANDS_SAVE_RESULTS 0x02000000 -#define MSVCRT__DN_SAVE_OPERANDS_FLUSH_RESULTS 0x03000000 -#define MSVCRT__EM_AMBIGUOUS 0x80000000 - -#define MSVCRT_CLOCKS_PER_SEC 1000 - -/* signals */ -#define MSVCRT_SIGINT 2 -#define MSVCRT_SIGILL 4 -#define MSVCRT_SIGFPE 8 -#define MSVCRT_SIGSEGV 11 -#define MSVCRT_SIGTERM 15 -#define MSVCRT_SIGBREAK 21 -#define MSVCRT_SIGABRT 22 -#define MSVCRT_NSIG (MSVCRT_SIGABRT + 1) - -typedef void (__cdecl *MSVCRT___sighandler_t)(int); - -#define MSVCRT_SIG_DFL ((MSVCRT___sighandler_t)0) -#define MSVCRT_SIG_IGN ((MSVCRT___sighandler_t)1) -#define MSVCRT_SIG_ERR ((MSVCRT___sighandler_t)-1) - -#define MSVCRT__FPE_INVALID 0x81 -#define MSVCRT__FPE_DENORMAL 0x82 -#define MSVCRT__FPE_ZERODIVIDE 0x83 -#define MSVCRT__FPE_OVERFLOW 0x84 -#define MSVCRT__FPE_UNDERFLOW 0x85 -#define MSVCRT__FPE_INEXACT 0x86 -#define MSVCRT__FPE_UNEMULATED 0x87 -#define MSVCRT__FPE_SQRTNEG 0x88 -#define MSVCRT__FPE_STACKOVERFLOW 0x8a -#define MSVCRT__FPE_STACKUNDERFLOW 0x8b -#define MSVCRT__FPE_EXPLICITGEN 0x8c - -#define _MS 0x01 -#define _MP 0x02 -#define _M1 0x04 -#define _M2 0x08 - -#define _SBUP 0x10 -#define _SBLOW 0x20 - -#define _MBC_SINGLE 0 -#define _MBC_LEAD 1 -#define _MBC_TRAIL 2 -#define _MBC_ILLEGAL -1 - -#define _MB_CP_SBCS 0 -#define _MB_CP_OEM -2 -#define _MB_CP_ANSI -3 -#define _MB_CP_LOCALE -4 - -#define MSVCRT__TRUNCATE ((MSVCRT_size_t)-1) - -#define _MAX__TIME64_T (((MSVCRT___time64_t)0x00000007 << 32) | 0x93406FFF) - -/* _set_abort_behavior codes */ -#define MSVCRT__WRITE_ABORT_MSG 1 -#define MSVCRT__CALL_REPORTFAULT 2 - -/* _get_output_format return code */ -#define MSVCRT__TWO_DIGIT_EXPONENT 0x1 - -void __cdecl MSVCRT_free(void*); -void* __cdecl MSVCRT_malloc(MSVCRT_size_t); -void* __cdecl MSVCRT_calloc(MSVCRT_size_t,MSVCRT_size_t); -void* __cdecl MSVCRT_realloc(void*,MSVCRT_size_t); - -int __cdecl MSVCRT_iswalpha(MSVCRT_wint_t); -int __cdecl MSVCRT_iswspace(MSVCRT_wint_t); -int __cdecl MSVCRT_iswdigit(MSVCRT_wint_t); -int __cdecl MSVCRT_isleadbyte(int); -int __cdecl MSVCRT__isleadbyte_l(int, MSVCRT__locale_t); - -void __cdecl MSVCRT__lock_file(MSVCRT_FILE*); -void __cdecl MSVCRT__unlock_file(MSVCRT_FILE*); -int __cdecl MSVCRT_fgetc(MSVCRT_FILE*); -int __cdecl MSVCRT_ungetc(int,MSVCRT_FILE*); -MSVCRT_wint_t __cdecl MSVCRT_fgetwc(MSVCRT_FILE*); -MSVCRT_wint_t __cdecl MSVCRT_ungetwc(MSVCRT_wint_t,MSVCRT_FILE*); -void __cdecl MSVCRT__exit(int); -void __cdecl MSVCRT_abort(void); -MSVCRT_ulong* __cdecl MSVCRT___doserrno(void); -int* __cdecl MSVCRT__errno(void); -char* __cdecl MSVCRT_getenv(const char*); -int __cdecl MSVCRT_fclose(MSVCRT_FILE*); -void __cdecl MSVCRT_terminate(void); -MSVCRT_FILE* __cdecl MSVCRT__iob_func(void); -MSVCRT_clock_t __cdecl MSVCRT_clock(void); -MSVCRT___time32_t __cdecl MSVCRT__time32(MSVCRT___time32_t*); -MSVCRT___time64_t __cdecl MSVCRT__time64(MSVCRT___time64_t*); -MSVCRT_FILE* __cdecl MSVCRT__fdopen(int, const char *); -MSVCRT_FILE* __cdecl MSVCRT__wfdopen(int, const MSVCRT_wchar_t *); -int __cdecl MSVCRT_vsnprintf(char *str, MSVCRT_size_t len, const char *format, __ms_va_list valist); -int __cdecl MSVCRT_vsnwprintf(MSVCRT_wchar_t *str, MSVCRT_size_t len, - const MSVCRT_wchar_t *format, __ms_va_list valist ); -int __cdecl MSVCRT__snwprintf(MSVCRT_wchar_t*, unsigned int, const MSVCRT_wchar_t*, ...); -int __cdecl MSVCRT_sprintf(char*,const char*,...); -int __cdecl MSVCRT__scprintf(const char*,...); -int __cdecl MSVCRT_raise(int sig); - -#define MSVCRT__ENABLE_PER_THREAD_LOCALE 1 -#define MSVCRT__DISABLE_PER_THREAD_LOCALE 2 - -extern MSVCRT__locale_t MSVCRT_locale; -MSVCRT_pthreadlocinfo get_locinfo(void); -MSVCRT_pthreadmbcinfo get_mbcinfo(void); -void __cdecl MSVCRT__free_locale(MSVCRT__locale_t); -void free_locinfo(MSVCRT_pthreadlocinfo); -void free_mbcinfo(MSVCRT_pthreadmbcinfo); -int _setmbcp_l(int, LCID, MSVCRT_pthreadmbcinfo); - -#ifndef __WINE_MSVCRT_TEST -int __cdecl MSVCRT__write(int,const void*,unsigned int); -int __cdecl _getch(void); -int __cdecl _ismbblead(unsigned int); -int __cdecl _ismbstrail(const unsigned char* start, const unsigned char* str); -MSVCRT_size_t __cdecl MSVCRT_mbstowcs(MSVCRT_wchar_t*,const char*,MSVCRT_size_t); -MSVCRT_intptr_t __cdecl MSVCRT__spawnve(int,const char*,const char* const *,const char* const *); -MSVCRT_intptr_t __cdecl MSVRT__spawnvpe(int,const char*,const char* const *,const char* const *); -MSVCRT_intptr_t __cdecl MSVCRT__wspawnve(int,const MSVCRT_wchar_t*,const MSVCRT_wchar_t* const *,const MSVCRT_wchar_t* const *); -MSVCRT_intptr_t __cdecl MSVCRT__wspawnvpe(int,const MSVCRT_wchar_t*,const MSVCRT_wchar_t* const *,const MSVCRT_wchar_t* const *); -void __cdecl MSVCRT__searchenv(const char*,const char*,char*); -int __cdecl MSVCRT__getdrive(void); -char* __cdecl MSVCRT__strdup(const char*); -char* __cdecl MSVCRT__strnset(char*,int,MSVCRT_size_t); -char* __cdecl _strset(char*,int); -int __cdecl _ungetch(int); -int __cdecl _cputs(const char*); -int __cdecl _cprintf(const char*,...); -int __cdecl _cwprintf(const MSVCRT_wchar_t*,...); -char*** __cdecl MSVCRT___p__environ(void); -int* __cdecl __p___mb_cur_max(void); -unsigned int* __cdecl __p__fmode(void); -MSVCRT_wchar_t* __cdecl MSVCRT__wcsdup(const MSVCRT_wchar_t*); -MSVCRT_wchar_t*** __cdecl MSVCRT___p__wenviron(void); -char* __cdecl MSVCRT__strdate(char* date); -char* __cdecl MSVCRT__strtime(char* date); -int __cdecl _setmbcp(int); -int __cdecl MSVCRT__close(int); -int __cdecl MSVCRT__dup(int); -int __cdecl MSVCRT__dup2(int, int); -int __cdecl MSVCRT__pipe(int *, unsigned int, int); -MSVCRT_wchar_t* __cdecl MSVCRT__wgetenv(const MSVCRT_wchar_t*); -void __cdecl MSVCRT__wsearchenv(const MSVCRT_wchar_t*, const MSVCRT_wchar_t*, MSVCRT_wchar_t*); -MSVCRT_intptr_t __cdecl MSVCRT__spawnvpe(int, const char*, const char* const*, const char* const*); -void __cdecl MSVCRT__invalid_parameter(const MSVCRT_wchar_t *expr, const MSVCRT_wchar_t *func, - const MSVCRT_wchar_t *file, unsigned int line, MSVCRT_uintptr_t arg); -int __cdecl MSVCRT__toupper_l(int,MSVCRT__locale_t); -int __cdecl MSVCRT__tolower_l(int,MSVCRT__locale_t); - -/* Maybe one day we'll enable the invalid parameter handlers with the full set of information (msvcrXXd) - * #define MSVCRT_INVALID_PMT(x) MSVCRT_call_invalid_parameter_handler(x, __FUNCTION__, __FILE__, __LINE__, 0) - * #define MSVCRT_CHECK_PMT(x) ((x) ? TRUE : MSVCRT_INVALID_PMT(#x),FALSE) - * Until this is done, just keep the same semantics for CHECK_PMT(), but without generating / sending - * any information - * NB : MSVCRT_call_invalid_parameter_handler is a wrapper around MSVCRT__invalid_parameter in order - * to do the Ansi to Unicode transformation - */ -#define MSVCRT_INVALID_PMT(x) MSVCRT__invalid_parameter(NULL, NULL, NULL, 0, 0) -#define MSVCRT_CHECK_PMT(x) ((x) || (MSVCRT_INVALID_PMT(0),FALSE)) -#endif - -#define MSVCRT__ARGMAX 100 -typedef int (*puts_clbk_a)(void*, int, const char*); -typedef int (*puts_clbk_w)(void*, int, const MSVCRT_wchar_t*); -typedef union _printf_arg -{ - void *get_ptr; - int get_int; - LONGLONG get_longlong; - double get_double; -} printf_arg; -typedef printf_arg (*args_clbk)(void*, int, int, __ms_va_list*); -int pf_printf_a(puts_clbk_a, void*, const char*, MSVCRT__locale_t, - BOOL, BOOL, args_clbk, void*, __ms_va_list*); -int pf_printf_w(puts_clbk_w, void*, const MSVCRT_wchar_t*, MSVCRT__locale_t, - BOOL, BOOL, args_clbk, void*, __ms_va_list*); -printf_arg arg_clbk_valist(void*, int, int, __ms_va_list*); - -#define MSVCRT__OVERFLOW 3 -#define MSVCRT__UNDERFLOW 4 - -typedef struct -{ - float f; -} MSVCRT__CRT_FLOAT; - -#endif /* __WINE_MSVCRT_H */ diff --git a/rostests/winetests/msvcrt/msvcrt.rbuild b/rostests/winetests/msvcrt/msvcrt.rbuild deleted file mode 100644 index 659684eee7c..00000000000 --- a/rostests/winetests/msvcrt/msvcrt.rbuild +++ /dev/null @@ -1,40 +0,0 @@ - - - - - . - include/reactos/wine/msvcrt - - - msvcrt - - - _open - _close - _tell - _unlink - _fdopen - _lseek - _read - _write - _mkdir - _rmdir - _putenv - - cpp.c - data.c - dir.c - environ.c - file.c - headers.c - heap.c - locale.c - misc.c - printf.c - scanf.c - signal.c - string.c - testlist.c - time.c - - diff --git a/rostests/winetests/msvcrt/msvcrt_test.dsp b/rostests/winetests/msvcrt/msvcrt_test.dsp deleted file mode 100644 index 1e27830971b..00000000000 --- a/rostests/winetests/msvcrt/msvcrt_test.dsp +++ /dev/null @@ -1,107 +0,0 @@ -# Microsoft Developer Studio Project File - Name="msvcrt_test" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=msvcrt_test - Win32 Wine Headers -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "msvcrt_test.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "msvcrt_test.mak" CFG="msvcrt_test - Win32 Wine Headers" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "msvcrt_test - Win32 MSVC Headers" (based on "Win32 (x86) Console Application") -!MESSAGE "msvcrt_test - Win32 Wine Headers" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe -!IF "$(CFG)" == "msvcrt_test - Win32 MSVC Headers" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Output\Win32_MSVC_Headers" -# PROP BASE Intermediate_Dir "Output\Win32_MSVC_Headers" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Output\Win32_MSVC_Headers" -# PROP Intermediate_Dir "Output\Win32_MSVC_Headers" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WINVER=0x0501" /D "_WIN32_WINNT=0x0501" /D "_WIN32_IE=0x0600" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I ..\..\..\Output\\Win32_MSVC_Headers /D "WINVER=0x0501" /D "_WIN32_WINNT=0x0501" /D "_WIN32_IE=0x0600" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_MSVCRT_TEST_" /D "__WINE_USE_NATIVE_HEADERS" /D __WINETEST_OUTPUT_DIR=\"Output\\Win32_MSVC_Headers\" /D "__i386__" /D "_X86_" /D inline=__inline /FR /FD /GZ /c -# ADD BASE RSC /l 0x41d /d "_DEBUG" -# ADD RSC /l 0x41d /i "..\..\..\Output\\Win32_MSVC_Headers" /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ELSEIF "$(CFG)" == "msvcrt_test - Win32 Wine Headers" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Output\Win32_Wine_Headers" -# PROP BASE Intermediate_Dir "Output\Win32_Wine_Headers" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Output\Win32_Wine_Headers" -# PROP Intermediate_Dir "Output\Win32_Wine_Headers" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WINVER=0x0501" /D "_WIN32_WINNT=0x0501" /D "_WIN32_IE=0x0600" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I ..\..\..\Output\\Win32_Wine_Headers /I ..\..\..\include /D "WINVER=0x0501" /D "_WIN32_WINNT=0x0501" /D "_WIN32_IE=0x0600" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_MSVCRT_TEST_" /D __WINETEST_OUTPUT_DIR=\"Output\\Win32_Wine_Headers\" /D "__i386__" /D "_X86_" /D inline=__inline /FR /FD /GZ /c -# ADD BASE RSC /l 0x41d /d "_DEBUG" -# ADD RSC /l 0x41d /i "..\..\..\Output\\Win32_Wine_Headers" /i "..\..\..\include" /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "msvcrt_test - Win32 MSVC Headers" -# Name "msvcrt_test - Win32 Wine Headers" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\cpp.c -# End Source File -# Begin Source File - -SOURCE=.\\ -# End Source File -# Begin Source File - -SOURCE=.\testlist.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/rostests/winetests/msvcrt/printf.c b/rostests/winetests/msvcrt/printf.c deleted file mode 100644 index 978b5123b15..00000000000 --- a/rostests/winetests/msvcrt/printf.c +++ /dev/null @@ -1,1249 +0,0 @@ -/* - * Conformance tests for *printf functions. - * - * Copyright 2002 Uwe Bonnes - * Copyright 2004 Aneurin Price - * Copyright 2005 Mike McCormack - * - * 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 - */ - -/* With Visual Studio >= 2005, swprintf() takes an extra parameter unless - * the following macro is defined. - */ -#define _CRT_NON_CONFORMING_SWPRINTFS - -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "winnls.h" - -#include "wine/test.h" - -static int (__cdecl *p__vscprintf)(const char *format, __ms_va_list valist); -static int (__cdecl *p__vscwprintf)(const wchar_t *format, __ms_va_list valist); -static int (__cdecl *p__vsnwprintf_s)(wchar_t *str, size_t sizeOfBuffer, - size_t count, const wchar_t *format, - __ms_va_list valist); -static int (__cdecl *p__ecvt_s)(char *buffer, size_t length, double number, - int ndigits, int *decpt, int *sign); -static int (__cdecl *p__fcvt_s)(char *buffer, size_t length, double number, - int ndigits, int *decpt, int *sign); -static unsigned int (__cdecl *p__get_output_format)(void); -static int (__cdecl *p__vsprintf_p)(char*, size_t, const char*, __ms_va_list); -static int (__cdecl *p_vswprintf)(wchar_t *str, const wchar_t *format, __ms_va_list valist); -static int (__cdecl *p__vswprintf)(wchar_t *str, const wchar_t *format, __ms_va_list valist); -static int (__cdecl *p__vswprintf_l)(wchar_t *str, const wchar_t *format, - void *locale, __ms_va_list valist); -static int (__cdecl *p__vswprintf_c)(wchar_t *str, size_t size, const wchar_t *format, - __ms_va_list valist); -static int (__cdecl *p__vswprintf_c_l)(wchar_t *str, size_t size, const wchar_t *format, - void *locale, __ms_va_list valist); -static int (__cdecl *p__vswprintf_p_l)(wchar_t *str, size_t size, const wchar_t *format, - void *locale, __ms_va_list valist); - -static void init( void ) -{ - HMODULE hmod = GetModuleHandleA("msvcrt.dll"); - - p__vscprintf = (void *)GetProcAddress(hmod, "_vscprintf"); - p__vscwprintf = (void *)GetProcAddress(hmod, "_vscwprintf"); - p__vsnwprintf_s = (void *)GetProcAddress(hmod, "_vsnwprintf_s"); - p__ecvt_s = (void *)GetProcAddress(hmod, "_ecvt_s"); - p__fcvt_s = (void *)GetProcAddress(hmod, "_fcvt_s"); - p__get_output_format = (void *)GetProcAddress(hmod, "_get_output_format"); - p__vsprintf_p = (void*)GetProcAddress(hmod, "_vsprintf_p"); - p_vswprintf = (void*)GetProcAddress(hmod, "vswprintf"); - p__vswprintf = (void*)GetProcAddress(hmod, "_vswprintf"); - p__vswprintf_l = (void*)GetProcAddress(hmod, "_vswprintf_l"); - p__vswprintf_c = (void*)GetProcAddress(hmod, "_vswprintf_c"); - p__vswprintf_c_l = (void*)GetProcAddress(hmod, "_vswprintf_c_l"); - p__vswprintf_p_l = (void*)GetProcAddress(hmod, "_vswprintf_p_l"); -} - -static void test_sprintf( void ) -{ - char buffer[100]; - const char *format; - double pnumber=789456123; - int x, r; - WCHAR wide[] = { 'w','i','d','e',0}; - - format = "%+#23.15e"; - r = sprintf(buffer,format,pnumber); - ok(!strcmp(buffer,"+7.894561230000000e+008"),"+#23.15e failed: '%s'\n", buffer); - ok( r==23, "return count wrong\n"); - - format = "%-#23.15e"; - r = sprintf(buffer,format,pnumber); - ok(!strcmp(buffer,"7.894561230000000e+008 "),"-#23.15e failed: '%s'\n", buffer); - ok( r==23, "return count wrong\n"); - - format = "%#23.15e"; - r = sprintf(buffer,format,pnumber); - ok(!strcmp(buffer," 7.894561230000000e+008"),"#23.15e failed: '%s'\n", buffer); - ok( r==23, "return count wrong\n"); - - format = "%#1.1g"; - r = sprintf(buffer,format,pnumber); - ok(!strcmp(buffer,"8.e+008"),"#1.1g failed: '%s'\n", buffer); - ok( r==7, "return count wrong\n"); - - format = "%I64d"; - r = sprintf(buffer,format,((ULONGLONG)0xffffffff)*0xffffffff); - ok(!strcmp(buffer,"-8589934591"),"Problem with long long\n"); - ok( r==11, "return count wrong\n"); - - format = "%+8I64d"; - r = sprintf(buffer,format,(LONGLONG)100); - ok(!strcmp(buffer," +100") && r==8,"+8I64d failed: '%s'\n", buffer); - - format = "%+.8I64d"; - r = sprintf(buffer,format,(LONGLONG)100); - ok(!strcmp(buffer,"+00000100") && r==9,"+.8I64d failed: '%s'\n", buffer); - - format = "%+10.8I64d"; - r = sprintf(buffer,format,(LONGLONG)100); - ok(!strcmp(buffer," +00000100") && r==10,"+10.8I64d failed: '%s'\n", buffer); - format = "%_1I64d"; - r = sprintf(buffer,format,(LONGLONG)100); - ok(!strcmp(buffer,"_1I64d") && r==6,"_1I64d failed\n"); - - format = "%-1.5I64d"; - r = sprintf(buffer,format,(LONGLONG)-100); - ok(!strcmp(buffer,"-00100") && r==6,"-1.5I64d failed: '%s'\n", buffer); - - format = "%5I64d"; - r = sprintf(buffer,format,(LONGLONG)100); - ok(!strcmp(buffer," 100") && r==5,"5I64d failed: '%s'\n", buffer); - - format = "%5I64d"; - r = sprintf(buffer,format,(LONGLONG)-100); - ok(!strcmp(buffer," -100") && r==5,"5I64d failed: '%s'\n", buffer); - - format = "%-5I64d"; - r = sprintf(buffer,format,(LONGLONG)100); - ok(!strcmp(buffer,"100 ") && r==5,"-5I64d failed: '%s'\n", buffer); - - format = "%-5I64d"; - r = sprintf(buffer,format,(LONGLONG)-100); - ok(!strcmp(buffer,"-100 ") && r==5,"-5I64d failed: '%s'\n", buffer); - - format = "%-.5I64d"; - r = sprintf(buffer,format,(LONGLONG)100); - ok(!strcmp(buffer,"00100") && r==5,"-.5I64d failed: '%s'\n", buffer); - - format = "%-.5I64d"; - r = sprintf(buffer,format,(LONGLONG)-100); - ok(!strcmp(buffer,"-00100") && r==6,"-.5I64d failed: '%s'\n", buffer); - - format = "%-8.5I64d"; - r = sprintf(buffer,format,(LONGLONG)100); - ok(!strcmp(buffer,"00100 ") && r==8,"-8.5I64d failed: '%s'\n", buffer); - - format = "%-8.5I64d"; - r = sprintf(buffer,format,(LONGLONG)-100); - ok(!strcmp(buffer,"-00100 ") && r==8,"-8.5I64d failed: '%s'\n", buffer); - - format = "%05I64d"; - r = sprintf(buffer,format,(LONGLONG)100); - ok(!strcmp(buffer,"00100") && r==5,"05I64d failed: '%s'\n", buffer); - - format = "%05I64d"; - r = sprintf(buffer,format,(LONGLONG)-100); - ok(!strcmp(buffer,"-0100") && r==5,"05I64d failed: '%s'\n", buffer); - - format = "% I64d"; - r = sprintf(buffer,format,(LONGLONG)100); - ok(!strcmp(buffer," 100") && r==4,"' I64d' failed: '%s'\n", buffer); - - format = "% I64d"; - r = sprintf(buffer,format,(LONGLONG)-100); - ok(!strcmp(buffer,"-100") && r==4,"' I64d' failed: '%s'\n", buffer); - - format = "% 5I64d"; - r = sprintf(buffer,format,(LONGLONG)100); - ok(!strcmp(buffer," 100") && r==5,"' 5I64d' failed: '%s'\n", buffer); - - format = "% 5I64d"; - r = sprintf(buffer,format,(LONGLONG)-100); - ok(!strcmp(buffer," -100") && r==5,"' 5I64d' failed: '%s'\n", buffer); - - format = "% .5I64d"; - r = sprintf(buffer,format,(LONGLONG)100); - ok(!strcmp(buffer," 00100") && r==6,"' .5I64d' failed: '%s'\n", buffer); - - format = "% .5I64d"; - r = sprintf(buffer,format,(LONGLONG)-100); - ok(!strcmp(buffer,"-00100") && r==6,"' .5I64d' failed: '%s'\n", buffer); - - format = "% 8.5I64d"; - r = sprintf(buffer,format,(LONGLONG)100); - ok(!strcmp(buffer," 00100") && r==8,"' 8.5I64d' failed: '%s'\n", buffer); - - format = "% 8.5I64d"; - r = sprintf(buffer,format,(LONGLONG)-100); - ok(!strcmp(buffer," -00100") && r==8,"' 8.5I64d' failed: '%s'\n", buffer); - - format = "%.0I64d"; - r = sprintf(buffer,format,(LONGLONG)0); - ok(r==0,".0I64d failed: '%s'\n", buffer); - - format = "%#+21.18I64x"; - r = sprintf(buffer,format,(LONGLONG)-100); - ok(!strcmp(buffer," 0x00ffffffffffffff9c") && r==21,"#+21.18I64x failed: '%s'\n", buffer); - - format = "%#.25I64o"; - r = sprintf(buffer,format,(LONGLONG)-100); - ok(!strcmp(buffer,"0001777777777777777777634") && r==25,"#.25I64o failed: '%s'\n", buffer); - - format = "%#+24.20I64o"; - r = sprintf(buffer,format,(LONGLONG)-100); - ok(!strcmp(buffer," 01777777777777777777634") && r==24,"#+24.20I64o failed: '%s'\n", buffer); - - format = "%#+18.21I64X"; - r = sprintf(buffer,format,(LONGLONG)-100); - ok(!strcmp(buffer,"0X00000FFFFFFFFFFFFFF9C") && r==23,"#+18.21I64X failed: '%s '\n", buffer); - - format = "%#+20.24I64o"; - r = sprintf(buffer,format,(LONGLONG)-100); - ok(!strcmp(buffer,"001777777777777777777634") && r==24,"#+20.24I64o failed: '%s'\n", buffer); - - format = "%#+25.22I64u"; - r = sprintf(buffer,format,(LONGLONG)-1); - ok(!strcmp(buffer," 0018446744073709551615") && r==25,"#+25.22I64u conversion failed: '%s'\n", buffer); - - format = "%#+25.22I64u"; - r = sprintf(buffer,format,(LONGLONG)-1); - ok(!strcmp(buffer," 0018446744073709551615") && r==25,"#+25.22I64u failed: '%s'\n", buffer); - - format = "%#+30.25I64u"; - r = sprintf(buffer,format,(LONGLONG)-1); - ok(!strcmp(buffer," 0000018446744073709551615") && r==30,"#+30.25I64u failed: '%s'\n", buffer); - - format = "%+#25.22I64d"; - r = sprintf(buffer,format,(LONGLONG)-1); - ok(!strcmp(buffer," -0000000000000000000001") && r==25,"+#25.22I64d failed: '%s'\n", buffer); - - format = "%#-8.5I64o"; - r = sprintf(buffer,format,(LONGLONG)100); - ok(!strcmp(buffer,"00144 ") && r==8,"-8.5I64o failed: '%s'\n", buffer); - - format = "%#-+ 08.5I64d"; - r = sprintf(buffer,format,(LONGLONG)100); - ok(!strcmp(buffer,"+00100 ") && r==8,"'#-+ 08.5I64d failed: '%s'\n", buffer); - - format = "%#-+ 08.5I64d"; - r = sprintf(buffer,format,(LONGLONG)100); - ok(!strcmp(buffer,"+00100 ") && r==8,"#-+ 08.5I64d failed: '%s'\n", buffer); - - format = "%.80I64d"; - r = sprintf(buffer,format,(LONGLONG)1); - ok(r==80,"%s format failed\n", format); - - format = "% .80I64d"; - r = sprintf(buffer,format,(LONGLONG)1); - ok(r==81,"%s format failed\n", format); - - format = "% .80d"; - r = sprintf(buffer,format,1); - ok(r==81,"%s format failed\n", format); - - format = "%lld"; - r = sprintf(buffer,format,((ULONGLONG)0xffffffff)*0xffffffff); - ok( r == 1 || r == 11, "return count wrong %d\n", r); - if (r == 11) /* %ll works on Vista */ - ok(!strcmp(buffer, "-8589934591"), "Problem with \"ll\" interpretation '%s'\n", buffer); - else - ok(!strcmp(buffer, "1"), "Problem with \"ll\" interpretation '%s'\n", buffer); - - format = "%I"; - r = sprintf(buffer,format,1); - ok(!strcmp(buffer, "I"), "Problem with \"I\" interpretation\n"); - ok( r==1, "return count wrong\n"); - - format = "%I0d"; - r = sprintf(buffer,format,1); - ok(!strcmp(buffer,"I0d"),"I0d failed\n"); - ok( r==3, "return count wrong\n"); - - format = "%I32d"; - r = sprintf(buffer,format,1); - if (r == 1) - { - ok(!strcmp(buffer,"1"),"I32d failed, got '%s'\n",buffer); - } - else - { - /* Older versions don't grok I32 format */ - ok(r == 4 && !strcmp(buffer,"I32d"),"I32d failed, got '%s',%d\n",buffer,r); - } - - format = "%I64D"; - r = sprintf(buffer,format,(LONGLONG)-1); - ok(!strcmp(buffer,"D"),"I64D failed: %s\n",buffer); - ok( r==1, "return count wrong\n"); - - format = "% d"; - r = sprintf(buffer,format,1); - ok(!strcmp(buffer, " 1"),"Problem with sign place-holder: '%s'\n",buffer); - ok( r==2, "return count wrong\n"); - - format = "%+ d"; - r = sprintf(buffer,format,1); - ok(!strcmp(buffer, "+1"),"Problem with sign flags: '%s'\n",buffer); - ok( r==2, "return count wrong\n"); - - format = "%S"; - r = sprintf(buffer,format,wide); - ok(!strcmp(buffer,"wide"),"Problem with wide string format\n"); - ok( r==4, "return count wrong\n"); - - format = "%04c"; - r = sprintf(buffer,format,'1'); - ok(!strcmp(buffer,"0001"),"Character not zero-prefixed \"%s\"\n",buffer); - ok( r==4, "return count wrong\n"); - - format = "%-04c"; - r = sprintf(buffer,format,'1'); - ok(!strcmp(buffer,"1 "),"Character zero-padded and/or not left-adjusted \"%s\"\n",buffer); - ok( r==4, "return count wrong\n"); - - if (sizeof(void *) == 8) - { - format = "%p"; - r = sprintf(buffer,format,(void *)57); - ok(!strcmp(buffer,"0000000000000039"),"Pointer formatted incorrectly \"%s\"\n",buffer); - ok( r==16, "return count wrong\n"); - - format = "%#020p"; - r = sprintf(buffer,format,(void *)57); - ok(!strcmp(buffer," 0X0000000000000039"),"Pointer formatted incorrectly\n"); - ok( r==20, "return count wrong\n"); - - format = "%Fp"; - r = sprintf(buffer,format,(void *)57); - ok(!strcmp(buffer,"0000000000000039"),"Pointer formatted incorrectly \"%s\"\n",buffer); - ok( r==16, "return count wrong\n"); - - format = "%#-020p"; - r = sprintf(buffer,format,(void *)57); - ok(!strcmp(buffer,"0X0000000000000039 "),"Pointer formatted incorrectly\n"); - ok( r==20, "return count wrong\n"); - } - else - { - format = "%p"; - r = sprintf(buffer,format,(void *)57); - ok(!strcmp(buffer,"00000039"),"Pointer formatted incorrectly \"%s\"\n",buffer); - ok( r==8, "return count wrong\n"); - - format = "%#012p"; - r = sprintf(buffer,format,(void *)57); - ok(!strcmp(buffer," 0X00000039"),"Pointer formatted incorrectly\n"); - ok( r==12, "return count wrong\n"); - - format = "%Fp"; - r = sprintf(buffer,format,(void *)57); - ok(!strcmp(buffer,"00000039"),"Pointer formatted incorrectly \"%s\"\n",buffer); - ok( r==8, "return count wrong\n"); - - format = "%#-012p"; - r = sprintf(buffer,format,(void *)57); - ok(!strcmp(buffer,"0X00000039 "),"Pointer formatted incorrectly\n"); - ok( r==12, "return count wrong\n"); - } - - format = "%04s"; - r = sprintf(buffer,format,"foo"); - ok(!strcmp(buffer,"0foo"),"String not zero-prefixed \"%s\"\n",buffer); - ok( r==4, "return count wrong\n"); - - format = "%.1s"; - r = sprintf(buffer,format,"foo"); - ok(!strcmp(buffer,"f"),"Precision ignored \"%s\"\n",buffer); - ok( r==1, "return count wrong\n"); - - format = "%.*s"; - r = sprintf(buffer,format,1,"foo"); - ok(!strcmp(buffer,"f"),"Precision ignored \"%s\"\n",buffer); - ok( r==1, "return count wrong\n"); - - format = "%*s"; - r = sprintf(buffer,format,-5,"foo"); - ok(!strcmp(buffer,"foo "),"Negative field width ignored \"%s\"\n",buffer); - ok( r==5, "return count wrong\n"); - - format = "hello"; - r = sprintf(buffer, format); - ok(!strcmp(buffer,"hello"), "failed\n"); - ok( r==5, "return count wrong\n"); - - format = "%ws"; - r = sprintf(buffer, format, wide); - ok(!strcmp(buffer,"wide"), "failed\n"); - ok( r==4, "return count wrong\n"); - - format = "%-10ws"; - r = sprintf(buffer, format, wide ); - ok(!strcmp(buffer,"wide "), "failed\n"); - ok( r==10, "return count wrong\n"); - - format = "%10ws"; - r = sprintf(buffer, format, wide ); - ok(!strcmp(buffer," wide"), "failed\n"); - ok( r==10, "return count wrong\n"); - - format = "%#+ -03whlls"; - r = sprintf(buffer, format, wide ); - ok(!strcmp(buffer,"wide"), "failed\n"); - ok( r==4, "return count wrong\n"); - - format = "%w0s"; - r = sprintf(buffer, format, wide ); - ok(!strcmp(buffer,"0s"), "failed\n"); - ok( r==2, "return count wrong\n"); - - format = "%w-s"; - r = sprintf(buffer, format, wide ); - ok(!strcmp(buffer,"-s"), "failed\n"); - ok( r==2, "return count wrong\n"); - - format = "%ls"; - r = sprintf(buffer, format, wide ); - ok(!strcmp(buffer,"wide"), "failed\n"); - ok( r==4, "return count wrong\n"); - - format = "%Ls"; - r = sprintf(buffer, format, "not wide" ); - ok(!strcmp(buffer,"not wide"), "failed\n"); - ok( r==8, "return count wrong\n"); - - format = "%b"; - r = sprintf(buffer, format); - ok(!strcmp(buffer,"b"), "failed\n"); - ok( r==1, "return count wrong\n"); - - format = "%3c"; - r = sprintf(buffer, format,'a'); - ok(!strcmp(buffer," a"), "failed\n"); - ok( r==3, "return count wrong\n"); - - format = "%3d"; - r = sprintf(buffer, format,1234); - ok(!strcmp(buffer,"1234"), "failed\n"); - ok( r==4, "return count wrong\n"); - - format = "%3h"; - r = sprintf(buffer, format); - ok(!strcmp(buffer,""), "failed\n"); - ok( r==0, "return count wrong\n"); - - format = "%j%k%m%q%r%t%v%y%z"; - r = sprintf(buffer, format); - ok(!strcmp(buffer,"jkmqrtvyz"), "failed\n"); - ok( r==9, "return count wrong\n"); - - format = "asdf%n"; - x = 0; - r = sprintf(buffer, format, &x ); - if (r == -1) - { - /* %n format is disabled by default on vista */ - /* FIXME: should test with _set_printf_count_output */ - ok(x == 0, "should not write to x: %d\n", x); - } - else - { - ok(x == 4, "should write to x: %d\n", x); - ok(!strcmp(buffer,"asdf"), "failed\n"); - ok( r==4, "return count wrong: %d\n", r); - } - - format = "%-1d"; - r = sprintf(buffer, format,2); - ok(!strcmp(buffer,"2"), "failed\n"); - ok( r==1, "return count wrong\n"); - - format = "%2.4f"; - r = sprintf(buffer, format,8.6); - ok(!strcmp(buffer,"8.6000"), "failed\n"); - ok( r==6, "return count wrong\n"); - - format = "%0f"; - r = sprintf(buffer, format,0.6); - ok(!strcmp(buffer,"0.600000"), "failed\n"); - ok( r==8, "return count wrong\n"); - - format = "%.0f"; - r = sprintf(buffer, format,0.6); - ok(!strcmp(buffer,"1"), "failed\n"); - ok( r==1, "return count wrong\n"); - - format = "%2.4e"; - r = sprintf(buffer, format,8.6); - ok(!strcmp(buffer,"8.6000e+000"), "failed\n"); - ok( r==11, "return count wrong\n"); - - format = "%2.4g"; - r = sprintf(buffer, format,8.6); - ok(!strcmp(buffer,"8.6"), "failed\n"); - ok( r==3, "return count wrong\n"); - - format = "%-i"; - r = sprintf(buffer, format,-1); - ok(!strcmp(buffer,"-1"), "failed\n"); - ok( r==2, "return count wrong\n"); - - format = "%-i"; - r = sprintf(buffer, format,1); - ok(!strcmp(buffer,"1"), "failed\n"); - ok( r==1, "return count wrong\n"); - - format = "%+i"; - r = sprintf(buffer, format,1); - ok(!strcmp(buffer,"+1"), "failed\n"); - ok( r==2, "return count wrong\n"); - - format = "%o"; - r = sprintf(buffer, format,10); - ok(!strcmp(buffer,"12"), "failed\n"); - ok( r==2, "return count wrong\n"); - - format = "%p"; - r = sprintf(buffer, format,0); - if (sizeof(void *) == 8) - { - ok(!strcmp(buffer,"0000000000000000"), "failed\n"); - ok( r==16, "return count wrong\n"); - } - else - { - ok(!strcmp(buffer,"00000000"), "failed\n"); - ok( r==8, "return count wrong\n"); - } - - format = "%s"; - r = sprintf(buffer, format,0); - ok(!strcmp(buffer,"(null)"), "failed\n"); - ok( r==6, "return count wrong\n"); - - format = "%s"; - r = sprintf(buffer, format,"%%%%"); - ok(!strcmp(buffer,"%%%%"), "failed\n"); - ok( r==4, "return count wrong\n"); - - format = "%u"; - r = sprintf(buffer, format,-1); - ok(!strcmp(buffer,"4294967295"), "failed\n"); - ok( r==10, "return count wrong\n"); - - format = "%w"; - r = sprintf(buffer, format,-1); - ok(!strcmp(buffer,""), "failed\n"); - ok( r==0, "return count wrong\n"); - - format = "%h"; - r = sprintf(buffer, format,-1); - ok(!strcmp(buffer,""), "failed\n"); - ok( r==0, "return count wrong\n"); - - format = "%z"; - r = sprintf(buffer, format,-1); - ok(!strcmp(buffer,"z"), "failed\n"); - ok( r==1, "return count wrong\n"); - - format = "%j"; - r = sprintf(buffer, format,-1); - ok(!strcmp(buffer,"j"), "failed\n"); - ok( r==1, "return count wrong\n"); - - format = "%F"; - r = sprintf(buffer, format,-1); - ok(!strcmp(buffer,""), "failed\n"); - ok( r==0, "return count wrong\n"); - - format = "%H"; - r = sprintf(buffer, format,-1); - ok(!strcmp(buffer,"H"), "failed\n"); - ok( r==1, "return count wrong\n"); - - format = "x%cx"; - r = sprintf(buffer, format, 0x100+'X'); - ok(!strcmp(buffer,"xXx"), "failed\n"); - ok( r==3, "return count wrong\n"); - - format = "%%0"; - r = sprintf(buffer, format); - ok(!strcmp(buffer,"%0"), "failed: \"%s\"\n", buffer); - ok( r==2, "return count wrong\n"); -} - -static void test_swprintf( void ) -{ - wchar_t buffer[100]; - const wchar_t I64d[] = {'%','I','6','4','d',0}; - double pnumber=789456123; - const wchar_t TwentyThreePoint15e[]= {'%','+','#','2','3','.','1','5','e',0}; - const wchar_t e008[] = {'e','+','0','0','8',0}; - const wchar_t string_w[] = {'s','t','r','i','n','g',0}; - const char string[] = "string"; - const wchar_t S[]={'%','S',0}; - const wchar_t hs[] = {'%', 'h', 's', 0}; - - swprintf(buffer,TwentyThreePoint15e,pnumber); - ok(wcsstr(buffer,e008) != 0,"Sprintf different\n"); - swprintf(buffer,I64d,((ULONGLONG)0xffffffff)*0xffffffff); - ok(wcslen(buffer) == 11,"Problem with long long\n"); - swprintf(buffer,S,string); - ok(wcslen(buffer) == 6,"Problem with \"%%S\" interpretation\n"); - swprintf(buffer, hs, string); - ok( wcscmp(string_w,buffer) == 0, "swprintf failed with %%hs\n"); -} - -static void test_snprintf (void) -{ - struct snprintf_test { - const char *format; - int expected; - }; - /* Pre-2.1 libc behaviour, not C99 compliant. */ - const struct snprintf_test tests[] = {{"short", 5}, - {"justfit", 7}, - {"justfits", 8}, - {"muchlonger", -1}}; - char buffer[8]; - const int bufsiz = sizeof buffer; - unsigned int i; - - for (i = 0; i < sizeof tests / sizeof tests[0]; i++) { - const char *fmt = tests[i].format; - const int expect = tests[i].expected; - const int n = _snprintf (buffer, bufsiz, fmt); - const int valid = n < 0 ? bufsiz : (n == bufsiz ? n : n+1); - - ok (n == expect, "\"%s\": expected %d, returned %d\n", - fmt, expect, n); - ok (!memcmp (fmt, buffer, valid), - "\"%s\": rendered \"%.*s\"\n", fmt, valid, buffer); - }; -} - -static void test_fprintf(void) -{ - static char file_name[] = "fprintf.tst"; - FILE *fp = fopen(file_name, "wb"); - char buf[1024]; - int ret; - - ret = fprintf(fp, "simple test\n"); - ok(ret == 12, "ret = %d\n", ret); - ret = ftell(fp); - ok(ret == 12, "ftell returned %d\n", ret); - - ret = fprintf(fp, "contains%cnull\n", '\0'); - ok(ret == 14, "ret = %d\n", ret); - ret = ftell(fp); - ok(ret == 26, "ftell returned %d\n", ret); - - fclose(fp); - - fp = fopen(file_name, "rb"); - ret = fscanf(fp, "%[^\n] ", buf); - ok(ret == 1, "ret = %d\n", ret); - ret = ftell(fp); - ok(ret == 12, "ftell returned %d\n", ret); - ok(!strcmp(buf, "simple test"), "buf = %s\n", buf); - - fgets(buf, sizeof(buf), fp); - ret = ftell(fp); - ok(ret == 26, "ret = %d\n", ret); - ok(!memcmp(buf, "contains\0null\n", 14), "buf = %s\n", buf); - - fclose(fp); - unlink(file_name); -} - -static void test_fcvt(void) -{ - char *str; - int dec=100, sign=100; - - /* Numbers less than 1.0 with different precisions */ - str = _fcvt(0.0001, 1, &dec, &sign ); - ok( 0 == strcmp(str,""), "bad return '%s'\n", str); - ok( -3 == dec, "dec wrong %d\n", dec); - ok( 0 == sign, "sign wrong\n"); - - str = _fcvt(0.0001, -10, &dec, &sign ); - ok( 0 == strcmp(str,""), "bad return '%s'\n", str); - ok( -3 == dec, "dec wrong %d\n", dec); - ok( 0 == sign, "sign wrong\n"); - - str = _fcvt(0.0001, 10, &dec, &sign ); - ok( 0 == strcmp(str,"1000000"), "bad return '%s'\n", str); - ok( -3 == dec, "dec wrong %d\n", dec); - ok( 0 == sign, "sign wrong\n"); - - /* Basic sign test */ - str = _fcvt(-111.0001, 5, &dec, &sign ); - ok( 0 == strcmp(str,"11100010"), "bad return '%s'\n", str); - ok( 3 == dec, "dec wrong %d\n", dec); - ok( 1 == sign, "sign wrong\n"); - - str = _fcvt(111.0001, 5, &dec, &sign ); - ok( 0 == strcmp(str,"11100010"), "bad return '%s'\n", str); - ok( 3 == dec, "dec wrong\n"); - ok( 0 == sign, "sign wrong\n"); - - /* 0.0 with different precisions */ - str = _fcvt(0.0, 5, &dec, &sign ); - ok( 0 == strcmp(str,"00000"), "bad return '%s'\n", str); - ok( 0 == dec, "dec wrong %d\n", dec); - ok( 0 == sign, "sign wrong\n"); - - str = _fcvt(0.0, 0, &dec, &sign ); - ok( 0 == strcmp(str,""), "bad return '%s'\n", str); - ok( 0 == dec, "dec wrong %d\n", dec); - ok( 0 == sign, "sign wrong\n"); - - str = _fcvt(0.0, -1, &dec, &sign ); - ok( 0 == strcmp(str,""), "bad return '%s'\n", str); - ok( 0 == dec, "dec wrong %d\n", dec); - ok( 0 == sign, "sign wrong\n"); - - /* Numbers > 1.0 with 0 or -ve precision */ - str = _fcvt(-123.0001, 0, &dec, &sign ); - ok( 0 == strcmp(str,"123"), "bad return '%s'\n", str); - ok( 3 == dec, "dec wrong %d\n", dec); - ok( 1 == sign, "sign wrong\n"); - - str = _fcvt(-123.0001, -1, &dec, &sign ); - ok( 0 == strcmp(str,"12"), "bad return '%s'\n", str); - ok( 3 == dec, "dec wrong %d\n", dec); - ok( 1 == sign, "sign wrong\n"); - - str = _fcvt(-123.0001, -2, &dec, &sign ); - ok( 0 == strcmp(str,"1"), "bad return '%s'\n", str); - ok( 3 == dec, "dec wrong %d\n", dec); - ok( 1 == sign, "sign wrong\n"); - - str = _fcvt(-123.0001, -3, &dec, &sign ); - ok( 0 == strcmp(str,""), "bad return '%s'\n", str); - ok( 3 == dec, "dec wrong %d\n", dec); - ok( 1 == sign, "sign wrong\n"); - - /* Numbers > 1.0, but with rounding at the point of precision */ - str = _fcvt(99.99, 1, &dec, &sign ); - ok( 0 == strcmp(str,"1000"), "bad return '%s'\n", str); - ok( 3 == dec, "dec wrong %d\n", dec); - ok( 0 == sign, "sign wrong\n"); - - /* Numbers < 1.0 where rounding occurs at the point of precision */ - str = _fcvt(0.00636, 2, &dec, &sign ); - ok( 0 == strcmp(str,"1"), "bad return '%s'\n", str); - ok( -1 == dec, "dec wrong %d\n", dec); - ok( 0 == sign, "sign wrong\n"); - - str = _fcvt(0.00636, 3, &dec, &sign ); - ok( 0 == strcmp(str,"6"), "bad return '%s'\n", str); - ok( -2 == dec, "dec wrong %d\n", dec); - ok( 0 == sign, "sign wrong\n"); - - str = _fcvt(0.09999999996, 2, &dec, &sign ); - ok( 0 == strcmp(str,"10"), "bad return '%s'\n", str); - ok( 0 == dec, "dec wrong %d\n", dec); - ok( 0 == sign, "sign wrong\n"); - - str = _fcvt(0.6, 0, &dec, &sign ); - ok( 0 == strcmp(str,"1"), "bad return '%s'\n", str); - ok( 1 == dec, "dec wrong %d\n", dec); - ok( 0 == sign, "sign wrong\n"); -} - -/* Don't test nrdigits < 0, msvcrt on Win9x and NT4 will corrupt memory by - * writing outside allocated memory */ -static struct { - double value; - int nrdigits; - const char *expstr_e; - const char *expstr_f; - int expdecpt_e; - int expdecpt_f; - int expsign; -} test_cvt_testcases[] = { - { 45.0, 2, "45", "4500", 2, 2, 0 }, - /* Numbers less than 1.0 with different precisions */ - { 0.0001, 1, "1", "", -3, -3, 0 }, - { 0.0001, 10,"1000000000", "1000000", -3, -3, 0 }, - /* Basic sign test */ - { -111.0001, 5, "11100", "11100010", 3, 3, 1 }, - { 111.0001, 5, "11100", "11100010", 3, 3, 0 }, - /* big numbers with low precision */ - { 3333.3, 2, "33", "333330", 4, 4, 0 }, - {999999999999.9, 3, "100","999999999999900", 13, 12, 0 }, - /* 0.0 with different precisions */ - { 0.0, 5, "00000", "00000", 0, 0, 0 }, - { 0.0, 0, "", "", 0, 0, 0 }, - { 0.0, -1, "", "", 0, 0, 0 }, - /* Numbers > 1.0 with 0 or -ve precision */ - { -123.0001, 0, "", "123", 3, 3, 1 }, - { -123.0001, -1, "", "12", 3, 3, 1 }, - { -123.0001, -2, "", "1", 3, 3, 1 }, - { -123.0001, -3, "", "", 3, 3, 1 }, - /* Numbers > 1.0, but with rounding at the point of precision */ - { 99.99, 1, "1", "1000", 3, 3, 0 }, - /* Numbers < 1.0 where rounding occurs at the point of precision */ - { 0.0063, 2, "63", "1", -2, -1, 0 }, - { 0.0063, 3, "630", "6", -2, -2, 0 }, - { 0.09999999996, 2, "10", "10", 0, 0, 0 }, - { 0.6, 1, "6", "6", 0, 0, 0 }, - { 0.6, 0, "", "1", 1, 1, 0 }, - { 0.4, 0, "", "", 0, 0, 0 }, - { 0.49, 0, "", "", 0, 0, 0 }, - { 0.51, 0, "", "1", 1, 1, 0 }, - /* ask for ridiculous precision, ruin formatting this table */ - { 1.0, 30, "100000000000000000000000000000", - "1000000000000000000000000000000", 1, 1, 0}, - { 123456789012345678901.0, 30, "123456789012345680000000000000", - "123456789012345680000000000000000000000000000000000", 21, 21, 0}, - /* end marker */ - { 0, 0, "END"} -}; - -static void test_xcvt(void) -{ - char *str; - int i, decpt, sign, err; - - for( i = 0; strcmp( test_cvt_testcases[i].expstr_e, "END"); i++){ - decpt = sign = 100; - str = _ecvt( test_cvt_testcases[i].value, - test_cvt_testcases[i].nrdigits, - &decpt, - &sign); - ok( 0 == strncmp( str, test_cvt_testcases[i].expstr_e, 15), - "_ecvt() bad return, got \n'%s' expected \n'%s'\n", str, - test_cvt_testcases[i].expstr_e); - ok( decpt == test_cvt_testcases[i].expdecpt_e, - "_ecvt() decimal point wrong, got %d expected %d\n", decpt, - test_cvt_testcases[i].expdecpt_e); - ok( sign == test_cvt_testcases[i].expsign, - "_ecvt() sign wrong, got %d expected %d\n", sign, - test_cvt_testcases[i].expsign); - } - for( i = 0; strcmp( test_cvt_testcases[i].expstr_e, "END"); i++){ - decpt = sign = 100; - str = _fcvt( test_cvt_testcases[i].value, - test_cvt_testcases[i].nrdigits, - &decpt, - &sign); - ok( 0 == strncmp( str, test_cvt_testcases[i].expstr_f, 15), - "_fcvt() bad return, got \n'%s' expected \n'%s'\n", str, - test_cvt_testcases[i].expstr_f); - ok( decpt == test_cvt_testcases[i].expdecpt_f, - "_fcvt() decimal point wrong, got %d expected %d\n", decpt, - test_cvt_testcases[i].expdecpt_f); - ok( sign == test_cvt_testcases[i].expsign, - "_fcvt() sign wrong, got %d expected %d\n", sign, - test_cvt_testcases[i].expsign); - } - - if (p__ecvt_s) - { - str = malloc(1024); - for( i = 0; strcmp( test_cvt_testcases[i].expstr_e, "END"); i++){ - decpt = sign = 100; - err = p__ecvt_s(str, 1024, test_cvt_testcases[i].value, test_cvt_testcases[i].nrdigits, &decpt, &sign); - ok(err == 0, "_ecvt_s() failed with error code %d\n", err); - ok( 0 == strncmp( str, test_cvt_testcases[i].expstr_e, 15), - "_ecvt_s() bad return, got \n'%s' expected \n'%s'\n", str, - test_cvt_testcases[i].expstr_e); - ok( decpt == test_cvt_testcases[i].expdecpt_e, - "_ecvt_s() decimal point wrong, got %d expected %d\n", decpt, - test_cvt_testcases[i].expdecpt_e); - ok( sign == test_cvt_testcases[i].expsign, - "_ecvt_s() sign wrong, got %d expected %d\n", sign, - test_cvt_testcases[i].expsign); - } - free(str); - } - else - win_skip("_ecvt_s not available\n"); - - if (p__fcvt_s) - { - int i; - - str = malloc(1024); - - /* invalid arguments */ - err = p__fcvt_s(NULL, 0, 0.0, 0, &i, &i); - ok(err == EINVAL, "got %d, expected EINVAL\n", err); - - err = p__fcvt_s(str, 0, 0.0, 0, &i, &i); - ok(err == EINVAL, "got %d, expected EINVAL\n", err); - - str[0] = ' '; - str[1] = 0; - err = p__fcvt_s(str, -1, 0.0, 0, &i, &i); - ok(err == 0, "got %d, expected 0\n", err); - ok(str[0] == 0, "got %c, expected 0\n", str[0]); - ok(str[1] == 0, "got %c, expected 0\n", str[1]); - - err = p__fcvt_s(str, 1, 0.0, 0, NULL, &i); - ok(err == EINVAL, "got %d, expected EINVAL\n", err); - - err = p__fcvt_s(str, 1, 0.0, 0, &i, NULL); - ok(err == EINVAL, "got %d, expected EINVAL\n", err); - - for( i = 0; strcmp( test_cvt_testcases[i].expstr_e, "END"); i++){ - decpt = sign = 100; - err = p__fcvt_s(str, 1024, test_cvt_testcases[i].value, test_cvt_testcases[i].nrdigits, &decpt, &sign); - ok(err == 0, "_fcvt_s() failed with error code %d\n", err); - ok( 0 == strncmp( str, test_cvt_testcases[i].expstr_f, 15), - "_fcvt_s() bad return, got '%s' expected '%s'. test %d\n", str, - test_cvt_testcases[i].expstr_f, i); - ok( decpt == test_cvt_testcases[i].expdecpt_f, - "_fcvt_s() decimal point wrong, got %d expected %d\n", decpt, - test_cvt_testcases[i].expdecpt_f); - ok( sign == test_cvt_testcases[i].expsign, - "_fcvt_s() sign wrong, got %d expected %d\n", sign, - test_cvt_testcases[i].expsign); - } - free(str); - } - else - win_skip("_fcvt_s not available\n"); -} - -static int __cdecl _vsnwprintf_wrapper(wchar_t *str, size_t len, const wchar_t *format, ...) -{ - int ret; - __ms_va_list valist; - __ms_va_start(valist, format); - ret = _vsnwprintf(str, len, format, valist); - __ms_va_end(valist); - return ret; -} - -static void test_vsnwprintf(void) -{ - const wchar_t format[] = {'%','w','s','%','w','s','%','w','s',0}; - const wchar_t one[] = {'o','n','e',0}; - const wchar_t two[] = {'t','w','o',0}; - const wchar_t three[] = {'t','h','r','e','e',0}; - - int ret; - wchar_t str[32]; - char buf[32]; - - ret = _vsnwprintf_wrapper( str, sizeof(str)/sizeof(str[0]), format, one, two, three ); - - ok( ret == 11, "got %d expected 11\n", ret ); - WideCharToMultiByte( CP_ACP, 0, str, -1, buf, sizeof(buf), NULL, NULL ); - ok( !strcmp(buf, "onetwothree"), "got %s expected 'onetwothree'\n", buf ); -} - -static int __cdecl vswprintf_wrapper(wchar_t *str, const wchar_t *format, ...) -{ - int ret; - __ms_va_list valist; - __ms_va_start(valist, format); - ret = p_vswprintf(str, format, valist); - __ms_va_end(valist); - return ret; -} - -static int __cdecl _vswprintf_wrapper(wchar_t *str, const wchar_t *format, ...) -{ - int ret; - __ms_va_list valist; - __ms_va_start(valist, format); - ret = p__vswprintf(str, format, valist); - __ms_va_end(valist); - return ret; -} - -static int __cdecl _vswprintf_l_wrapper(wchar_t *str, const wchar_t *format, void *locale, ...) -{ - int ret; - __ms_va_list valist; - __ms_va_start(valist, locale); - ret = p__vswprintf_l(str, format, locale, valist); - __ms_va_end(valist); - return ret; -} - -static int __cdecl _vswprintf_c_wrapper(wchar_t *str, size_t size, const wchar_t *format, ...) -{ - int ret; - __ms_va_list valist; - __ms_va_start(valist, format); - ret = p__vswprintf_c(str, size, format, valist); - __ms_va_end(valist); - return ret; -} - -static int __cdecl _vswprintf_c_l_wrapper(wchar_t *str, size_t size, const wchar_t *format, void *locale, ...) -{ - int ret; - __ms_va_list valist; - __ms_va_start(valist, locale); - ret = p__vswprintf_c_l(str, size, format, locale, valist); - __ms_va_end(valist); - return ret; -} - -static int __cdecl _vswprintf_p_l_wrapper(wchar_t *str, size_t size, const wchar_t *format, void *locale, ...) -{ - int ret; - __ms_va_list valist; - __ms_va_start(valist, locale); - ret = p__vswprintf_p_l(str, size, format, locale, valist); - __ms_va_end(valist); - return ret; -} - -static void test_vswprintf(void) -{ - const wchar_t format[] = {'%','s',' ','%','d',0}; - const wchar_t number[] = {'n','u','m','b','e','r',0}; - const wchar_t out[] = {'n','u','m','b','e','r',' ','1','2','3',0}; - wchar_t buf[20]; - - int ret; - - if (!p_vswprintf || !p__vswprintf || !p__vswprintf_l ||!p__vswprintf_c - || !p__vswprintf_c_l || !p__vswprintf_p_l) - { - win_skip("_vswprintf or vswprintf not available\n"); - return; - } - - ret = vswprintf_wrapper(buf, format, number, 123); - ok(ret == 10, "got %d, expected 10\n", ret); - ok(!memcmp(buf, out, sizeof(out)), "buf = %s\n", wine_dbgstr_w(buf)); - - memset(buf, 0, sizeof(buf)); - ret = _vswprintf_wrapper(buf, format, number, 123); - ok(ret == 10, "got %d, expected 10\n", ret); - ok(!memcmp(buf, out, sizeof(out)), "buf = %s\n", wine_dbgstr_w(buf)); - - memset(buf, 0, sizeof(buf)); - ret = _vswprintf_l_wrapper(buf, format, NULL, number, 123); - ok(ret == 10, "got %d, expected 10\n", ret); - ok(!memcmp(buf, out, sizeof(out)), "buf = %s\n", wine_dbgstr_w(buf)); - - memset(buf, 0, sizeof(buf)); - ret = _vswprintf_c_wrapper(buf, 20, format, number, 123); - ok(ret == 10, "got %d, expected 10\n", ret); - ok(!memcmp(buf, out, sizeof(out)), "buf = %s\n", wine_dbgstr_w(buf)); - - memset(buf, 0, sizeof(buf)); - ret = _vswprintf_c_l_wrapper(buf, 20, format, NULL, number, 123); - ok(ret == 10, "got %d, expected 10\n", ret); - ok(!memcmp(buf, out, sizeof(out)), "buf = %s\n", wine_dbgstr_w(buf)); - - memset(buf, 0, sizeof(buf)); - ret = _vswprintf_p_l_wrapper(buf, 20, format, NULL, number, 123); - ok(ret == 10, "got %d, expected 10\n", ret); - ok(!memcmp(buf, out, sizeof(out)), "buf = %s\n", wine_dbgstr_w(buf)); -} - -static int __cdecl _vscprintf_wrapper(const char *format, ...) -{ - int ret; - __ms_va_list valist; - __ms_va_start(valist, format); - ret = p__vscprintf(format, valist); - __ms_va_end(valist); - return ret; -} - -static void test_vscprintf(void) -{ - int ret; - - if (!p__vscprintf) - { - win_skip("_vscprintf not available\n"); - return; - } - - ret = _vscprintf_wrapper( "%s %d", "number", 1 ); - ok( ret == 8, "got %d expected 8\n", ret ); -} - -static int __cdecl _vscwprintf_wrapper(const wchar_t *format, ...) -{ - int ret; - __ms_va_list valist; - __ms_va_start(valist, format); - ret = p__vscwprintf(format, valist); - __ms_va_end(valist); - return ret; -} - -static void test_vscwprintf(void) -{ - const wchar_t format[] = {'%','s',' ','%','d',0}; - const wchar_t number[] = {'n','u','m','b','e','r',0}; - - int ret; - - if (!p__vscwprintf) - { - win_skip("_vscwprintf not available\n"); - return; - } - - ret = _vscwprintf_wrapper( format, number, 1 ); - ok( ret == 8, "got %d expected 8\n", ret ); -} - -static int __cdecl _vsnwprintf_s_wrapper(wchar_t *str, size_t sizeOfBuffer, - size_t count, const wchar_t *format, ...) -{ - int ret; - __ms_va_list valist; - __ms_va_start(valist, format); - ret = p__vsnwprintf_s(str, sizeOfBuffer, count, format, valist); - __ms_va_end(valist); - return ret; -} - -static void test_vsnwprintf_s(void) -{ - const wchar_t format[] = { 'A','B','%','u','C',0 }; - const wchar_t out7[] = { 'A','B','1','2','3','C',0 }; - const wchar_t out6[] = { 'A','B','1','2','3',0 }; - const wchar_t out2[] = { 'A',0 }; - const wchar_t out1[] = { 0 }; - wchar_t buffer[14] = { 0 }; - int exp, got; - - if (!p__vsnwprintf_s) - { - win_skip("_vsnwprintf_s not available\n"); - return; - } - - /* Enough room. */ - exp = wcslen(out7); - - got = _vsnwprintf_s_wrapper(buffer, 14, _TRUNCATE, format, 123); - ok( exp == got, "length wrong, expect=%d, got=%d\n", exp, got); - ok( !wcscmp(out7, buffer), "buffer wrong, got=%s\n", wine_dbgstr_w(buffer)); - - got = _vsnwprintf_s_wrapper(buffer, 12, _TRUNCATE, format, 123); - ok( exp == got, "length wrong, expect=%d, got=%d\n", exp, got); - ok( !wcscmp(out7, buffer), "buffer wrong, got=%s\n", wine_dbgstr_w(buffer)); - - got = _vsnwprintf_s_wrapper(buffer, 7, _TRUNCATE, format, 123); - ok( exp == got, "length wrong, expect=%d, got=%d\n", exp, got); - ok( !wcscmp(out7, buffer), "buffer wrong, got=%s\n", wine_dbgstr_w(buffer)); - - /* Not enough room. */ - exp = -1; - - got = _vsnwprintf_s_wrapper(buffer, 6, _TRUNCATE, format, 123); - ok( exp == got, "length wrong, expect=%d, got=%d\n", exp, got); - ok( !wcscmp(out6, buffer), "buffer wrong, got=%s\n", wine_dbgstr_w(buffer)); - - got = _vsnwprintf_s_wrapper(buffer, 2, _TRUNCATE, format, 123); - ok( exp == got, "length wrong, expect=%d, got=%d\n", exp, got); - ok( !wcscmp(out2, buffer), "buffer wrong, got=%s\n", wine_dbgstr_w(buffer)); - - got = _vsnwprintf_s_wrapper(buffer, 1, _TRUNCATE, format, 123); - ok( exp == got, "length wrong, expect=%d, got=%d\n", exp, got); - ok( !wcscmp(out1, buffer), "buffer wrong, got=%s\n", wine_dbgstr_w(buffer)); -} - -static int __cdecl _vsprintf_p_wrapper(char *str, size_t sizeOfBuffer, - const char *format, ...) -{ - int ret; - __ms_va_list valist; - __ms_va_start(valist, format); - ret = p__vsprintf_p(str, sizeOfBuffer, format, valist); - __ms_va_end(valist); - return ret; -} - -static void test_vsprintf_p(void) -{ - char buf[1024]; - int ret; - - if(!p__vsprintf_p) { - win_skip("vsprintf_p not available\n"); - return; - } - - ret = _vsprintf_p_wrapper(buf, sizeof(buf), "%s %d", "test", 1234); - ok(ret == 9, "ret = %d\n", ret); - ok(!memcmp(buf, "test 1234", 10), "buf = %s\n", buf); - - ret = _vsprintf_p_wrapper(buf, sizeof(buf), "%1$d", 1234, "additional param"); - ok(ret == 4, "ret = %d\n", ret); - ok(!memcmp(buf, "1234", 5), "buf = %s\n", buf); - - ret = _vsprintf_p_wrapper(buf, sizeof(buf), "%2$s %1$d", 1234, "test"); - ok(ret == 9, "ret = %d\n", ret); - ok(!memcmp(buf, "test 1234", 10), "buf = %s\n", buf); - - ret = _vsprintf_p_wrapper(buf, sizeof(buf), "%2$*3$s %2$.*1$s", 2, "test", 3); - ok(ret == 7, "ret = %d\n", ret); - ok(!memcmp(buf, "test te", 8), "buf = %s\n", buf); - - /* Following test invokes invalid parameter handler */ - /* ret = _vsprintf_p_wrapper(buf, sizeof(buf), "%d %1$d", 1234); */ -} - -static void test__get_output_format(void) -{ - unsigned int ret; - - if (!p__get_output_format) - { - win_skip("_get_output_format not available\n"); - return; - } - - ret = p__get_output_format(); - ok(ret == 0, "got %d\n", ret); -} - -START_TEST(printf) -{ - init(); - - test_sprintf(); - test_swprintf(); - test_snprintf(); - test_fprintf(); - test_fcvt(); - test_xcvt(); - test_vsnwprintf(); - test_vscprintf(); - test_vscwprintf(); - test_vswprintf(); - test_vsnwprintf_s(); - test_vsprintf_p(); - test__get_output_format(); -} diff --git a/rostests/winetests/msvcrt/scanf.c b/rostests/winetests/msvcrt/scanf.c deleted file mode 100644 index cbfb1844193..00000000000 --- a/rostests/winetests/msvcrt/scanf.c +++ /dev/null @@ -1,250 +0,0 @@ -/* - * Unit test suite for *scanf functions. - * - * Copyright 2002 Uwe Bonnes - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -#include "wine/test.h" - -static void test_sscanf( void ) -{ - char buffer[100], buffer1[100]; - char format[20]; - int result, ret; - char c; - void *ptr; - float res1= -82.6267f, res2= 27.76f, res11, res12; - static const char pname[]=" St. Petersburg, Florida\n"; - int hour=21,min=59,sec=20; - int number,number_so_far; - - - /* check EOF */ - strcpy(buffer,""); - ret = sscanf(buffer, "%d", &result); - ok( ret == EOF,"sscanf returns %x instead of %x\n", ret, EOF ); - - /* check %p */ - ok( sscanf("000000000046F170", "%p", &ptr) == 1, "sscanf failed\n" ); - ok( ptr == (void *)0x46F170,"sscanf reads %p instead of %x\n", ptr, 0x46F170 ); - - ok( sscanf("0046F171", "%p", &ptr) == 1, "sscanf failed\n" ); - ok( ptr == (void *)0x46F171,"sscanf reads %p instead of %x\n", ptr, 0x46F171 ); - - ok( sscanf("46F172", "%p", &ptr) == 1, "sscanf failed\n" ); - ok( ptr == (void *)0x46F172,"sscanf reads %p instead of %x\n", ptr, 0x46F172 ); - - ok( sscanf("0x46F173", "%p", &ptr) == 1, "sscanf failed\n" ); - ok( ptr == NULL,"sscanf reads %p instead of %x\n", ptr, 0 ); - - ok( sscanf("-46F174", "%p", &ptr) == 1, "sscanf failed\n" ); - ok( ptr == (void *)(ULONG_PTR)-0x46f174,"sscanf reads %p instead of %p\n", - ptr, (void *)(ULONG_PTR)-0x46f174 ); - - ok( sscanf("+46F175", "%p", &ptr) == 1, "sscanf failed\n" ); - ok( ptr == (void *)0x46F175,"sscanf reads %p instead of %x\n", ptr, 0x46F175 ); - - /* check %p with no hex digits */ - ok( sscanf("1233", "%p", &ptr) == 1, "sscanf failed\n" ); - ok( ptr == (void *)0x1233,"sscanf reads %p instead of %x\n", ptr, 0x1233 ); - - ok( sscanf("1234", "%P", &ptr) == 1, "sscanf failed\n" ); - ok( ptr == (void *)0x1234,"sscanf reads %p instead of %x\n", ptr, 0x1234 ); - - /* check %x */ - strcpy(buffer,"0x519"); - ok( sscanf(buffer, "%x", &result) == 1, "sscanf failed\n" ); - ok( result == 0x519,"sscanf reads %x instead of %x\n", result, 0x519 ); - - strcpy(buffer,"0x51a"); - ok( sscanf(buffer, "%x", &result) == 1, "sscanf failed\n" ); - ok( result == 0x51a ,"sscanf reads %x instead of %x\n", result, 0x51a ); - - strcpy(buffer,"0x51g"); - ok( sscanf(buffer, "%x", &result) == 1, "sscanf failed\n" ); - ok( result == 0x51, "sscanf reads %x instead of %x\n", result, 0x51 ); - - result = 0; - ret = sscanf("-1", "%x", &result); - ok(ret == 1, "Wrong number of arguments read: %d (expected 1)\n", ret); - ok(result == -1, "Read %d, expected -1\n", result); - - /* check % followed by any char */ - strcpy(buffer,"\"%12@"); - strcpy(format,"%\"%%%d%@"); /* work around gcc format check */ - ok( sscanf(buffer, format, &result) == 1, "sscanf failed\n" ); - ok( result == 12, "sscanf reads %x instead of %x\n", result, 12 ); - - /* Check float */ - ret = sprintf(buffer,"%f %f",res1, res2); - ok( ret == 20, "expected 20, got %u\n", ret); - ret = sscanf(buffer,"%f%f",&res11, &res12); - ok( ret == 2, "expected 2, got %u\n", ret); - ok( (res11 == res1) && (res12 == res2), "Error reading floats\n"); - - /* check strings */ - ret = sprintf(buffer," %s", pname); - ok( ret == 26, "expected 26, got %u\n", ret); - ret = sscanf(buffer,"%*c%[^\n]",buffer1); - ok( ret == 1, "Error with format \"%s\"\n","%*c%[^\n]"); - ok( strncmp(pname,buffer1,strlen(buffer1)) == 0, "Error with \"%s\" \"%s\"\n",pname, buffer1); - - ret = sscanf("abcefgdh","%*[a-cg-e]%c",&buffer[0]); - ok( ret == 1, "Error with format \"%s\"\n","%*[a-cg-e]%c"); - ok( buffer[0] == 'd', "Error with \"abcefgdh\" \"%c\"\n", buffer[0]); - - ret = sscanf("abcefgdh","%*[a-cd-dg-e]%c",&buffer[0]); - ok( ret == 1, "Error with format \"%s\"\n","%*[a-cd-dg-e]%c"); - ok( buffer[0] == 'h', "Error with \"abcefgdh\" \"%c\"\n", buffer[0]); - - /* check digits */ - ret = sprintf(buffer,"%d:%d:%d",hour,min,sec); - ok( ret == 8, "expected 8, got %u\n", ret); - ret = sscanf(buffer,"%d%n",&number,&number_so_far); - ok(ret == 1 , "problem with format arg \"%%d%%n\"\n"); - ok(number == hour,"Read wrong arg %d instead of %d\n",number, hour); - ok(number_so_far == 2,"Read wrong arg for \"%%n\" %d instead of 2\n",number_so_far); - - ret = sscanf(buffer+2,"%*c%n",&number_so_far); - ok(ret == 0 , "problem with format arg \"%%*c%%n\"\n"); - ok(number_so_far == 1,"Read wrong arg for \"%%n\" %d instead of 2\n",number_so_far); - - /* Check %i according to bug 1878 */ - strcpy(buffer,"123"); - ret = sscanf(buffer, "%i", &result); - ok(ret == 1, "Wrong number of arguments read: %d\n", ret); - ok(result == 123, "Wrong number read\n"); - result = 0; - ret = sscanf("-1", "%i", &result); - ok(ret == 1, "Wrong number of arguments read: %d (expected 1)\n", ret); - ok(result == -1, "Read %d, expected -1\n", result); - ret = sscanf(buffer, "%d", &result); - ok(ret == 1, "Wrong number of arguments read: %d\n", ret); - ok(result == 123, "Wrong number read\n"); - result = 0; - ret = sscanf("-1", "%d", &result); - ok(ret == 1, "Wrong number of arguments read: %d (expected 1)\n", ret); - ok(result == -1, "Read %d, expected -1\n", result); - - /* Check %i for octal and hexadecimal input */ - result = 0; - strcpy(buffer,"017"); - ret = sscanf(buffer, "%i", &result); - ok(ret == 1, "Wrong number of arguments read: %d\n", ret); - ok(result == 15, "Wrong number read\n"); - result = 0; - strcpy(buffer,"0x17"); - ret = sscanf(buffer, "%i", &result); - ok(ret == 1, "Wrong number of arguments read: %d\n", ret); - ok(result == 23, "Wrong number read\n"); - - /* %o */ - result = 0; - ret = sscanf("-1", "%o", &result); - ok(ret == 1, "Wrong number of arguments read: %d (expected 1)\n", ret); - ok(result == -1, "Read %d, expected -1\n", result); - - /* %u */ - result = 0; - ret = sscanf("-1", "%u", &result); - ok(ret == 1, "Wrong number of arguments read: %d (expected 1)\n", ret); - ok(result == -1, "Read %d, expected -1\n", result); - - /* Check %c */ - strcpy(buffer,"a"); - c = 0x55; - ret = sscanf(buffer, "%c", &c); - ok(ret == 1, "Wrong number of arguments read: %d\n", ret); - ok(c == 'a', "Field incorrect: '%c'\n", c); - - strcpy(buffer," a"); - c = 0x55; - ret = sscanf(buffer, "%c", &c); - ok(ret == 1, "Wrong number of arguments read: %d\n", ret); - ok(c == ' ', "Field incorrect: '%c'\n", c); - - strcpy(buffer,"18:59"); - c = 0x55; - ret = sscanf(buffer, "%d:%d%c", &hour, &min, &c); - ok(ret == 2, "Wrong number of arguments read: %d\n", ret); - ok(hour == 18, "Field 1 incorrect: %d\n", hour); - ok(min == 59, "Field 2 incorrect: %d\n", min); - ok(c == 0x55, "Field 3 incorrect: 0x%02x\n", c); - - /* Check %n (also whitespace in format strings and %s) */ - buffer[0]=0; buffer1[0]=0; - ret = sscanf("abc def", "%s %n%s", buffer, &number_so_far, buffer1); - ok(strcmp(buffer, "abc")==0, "First %%s read incorrectly: %s\n", buffer); - ok(strcmp(buffer1,"def")==0, "Second %%s read incorrectly: %s\n", buffer1); - ok(number_so_far==6, "%%n yielded wrong result: %d\n", number_so_far); - ok(ret == 2, "%%n shouldn't count as a conversion: %d\n", ret); - - /* Check where %n matches to EOF in buffer */ - strcpy(buffer, "3:45"); - ret = sscanf(buffer, "%d:%d%n", &hour, &min, &number_so_far); - ok(ret == 2, "Wrong number of arguments read: %d\n", ret); - ok(number_so_far == 4, "%%n yielded wrong result: %d\n", number_so_far); -} - -static void test_sscanf_s(void) -{ - int (__cdecl *psscanf_s)(const char*,const char*,...); - HMODULE hmod = GetModuleHandleA("msvcrt.dll"); - int i, ret; - char buf[100]; - - psscanf_s = (void*)GetProcAddress(hmod, "sscanf_s"); - if(!psscanf_s) { - win_skip("sscanf_s not available\n"); - return; - } - - ret = psscanf_s("123", "%d", &i); - ok(ret == 1, "Wrong number of arguments read: %d\n", ret); - ok(i == 123, "i = %d\n", i); - - ret = psscanf_s("123", "%s", buf, 100); - ok(ret == 1, "Wrong number of arguments read: %d\n", ret); - ok(!strcmp("123", buf), "buf = %s\n", buf); - - ret = psscanf_s("123", "%s", buf, 3); - ok(ret == 0, "Wrong number of arguments read: %d\n", ret); - ok(buf[0]=='\0', "buf = %s\n", buf); - - buf[0] = 'a'; - ret = psscanf_s("123", "%3c", buf, 2); - ok(ret == 0, "Wrong number of arguments read: %d\n", ret); - ok(buf[0]=='\0', "buf = %s\n", buf); - - i = 1; - ret = psscanf_s("123 123", "%s %d", buf, 2, &i); - ok(ret == 0, "Wrong number of arguments read: %d\n", ret); - ok(i==1, "i = %d\n", i); - - i = 1; - ret = psscanf_s("123 123", "%d %s", &i, buf, 2); - ok(ret == 1, "Wrong number of arguments read: %d\n", ret); - ok(i==123, "i = %d\n", i); -} - -START_TEST(scanf) -{ - test_sscanf(); - test_sscanf_s(); -} diff --git a/rostests/winetests/msvcrt/signal.c b/rostests/winetests/msvcrt/signal.c deleted file mode 100644 index d33498bd537..00000000000 --- a/rostests/winetests/msvcrt/signal.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Unit test suite for signal function. - * - * Copyright 2009 Peter Rosin - * - * 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/test.h" -#include -#include - -static int test_value = 0; - -static void __cdecl sighandler(int signum) -{ - ++test_value; -} - -static void test_signal(void) -{ - void (__cdecl *old)(int); - int res; - - old = signal(SIGBREAK, sighandler); - ok(old != SIG_ERR, "Failed to install signal handler for SIGBREAK\n"); - test_value = 0; - res = raise(SIGBREAK); - ok(res == 0, "Failed to raise SIGBREAK\n"); - ok(test_value == 1, "SIGBREAK handler not invoked\n"); -} - -START_TEST(signal) -{ - test_signal(); -} diff --git a/rostests/winetests/msvcrt/string.c b/rostests/winetests/msvcrt/string.c deleted file mode 100644 index b6c4738da78..00000000000 --- a/rostests/winetests/msvcrt/string.c +++ /dev/null @@ -1,2129 +0,0 @@ -/* - * Unit test suite for string functions. - * - * Copyright 2004 Uwe Bonnes - * - * 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/test.h" -#include "winbase.h" -#include "winnls.h" -#include -#include -#include -#include -#include -#include -#include -#include - -/* ReactOS */ -typedef unsigned int __msvcrt_ulong; - -static char *buf_to_string(const unsigned char *bin, int len, int nr) -{ - static char buf[2][1024]; - char *w = buf[nr]; - int i; - - for (i = 0; i < len; i++) - { - sprintf(w, "%02x ", (unsigned char)bin[i]); - w += strlen(w); - } - return buf[nr]; -} - -static void __cdecl test_invalid_parameter_handler(const wchar_t *expression, - const wchar_t *function, const wchar_t *file, - unsigned line, uintptr_t arg) -{ - /* we just ignore handler calls */ -} - -#define expect_eq(expr, value, type, format) { type ret = (expr); ok((value) == ret, #expr " expected " format " got " format "\n", value, ret); } -#define expect_bin(buf, value, len) { ok(memcmp((buf), value, len) == 0, "Binary buffer mismatch - expected %s, got %s\n", buf_to_string((unsigned char *)value, len, 1), buf_to_string((buf), len, 0)); } - -static void* (__cdecl *pmemcpy)(void *, const void *, size_t n); -static int* (__cdecl *pmemcmp)(void *, const void *, size_t n); -static int (__cdecl *pstrcpy_s)(char *dst, size_t len, const char *src); -static int (__cdecl *pstrcat_s)(char *dst, size_t len, const char *src); -static int (__cdecl *p_mbsnbcat_s)(unsigned char *dst, size_t size, const unsigned char *src, size_t count); -static int (__cdecl *p_mbsnbcpy_s)(unsigned char * dst, size_t size, const unsigned char * src, size_t count); -static int (__cdecl *p_wcscpy_s)(wchar_t *wcDest, size_t size, const wchar_t *wcSrc); -static int (__cdecl *p_wcsncpy_s)(wchar_t *wcDest, size_t size, const wchar_t *wcSrc, size_t count); -static int (__cdecl *p_wcsncat_s)(wchar_t *dst, size_t elem, const wchar_t *src, size_t count); -static int (__cdecl *p_wcsupr_s)(wchar_t *str, size_t size); -static size_t (__cdecl *p_strnlen)(const char *, size_t); -static __int64 (__cdecl *p_strtoi64)(const char *, char **, int); -static unsigned __int64 (__cdecl *p_strtoui64)(const char *, char **, int); -static int (__cdecl *pwcstombs_s)(size_t*,char*,size_t,const wchar_t*,size_t); -static int (__cdecl *pmbstowcs_s)(size_t*,wchar_t*,size_t,const char*,size_t); -static size_t (__cdecl *pwcsrtombs)(char*, const wchar_t**, size_t, int*); -static errno_t (__cdecl *p_gcvt_s)(char*,size_t,double,int); -static errno_t (__cdecl *p_itoa_s)(int,char*,size_t,int); -static errno_t (__cdecl *p_strlwr_s)(char*,size_t); -static errno_t (__cdecl *p_ultoa_s)(__msvcrt_ulong,char*,size_t,int); -static int *p__mb_cur_max; -static unsigned char *p_mbctype; -static _invalid_parameter_handler (__cdecl *p_set_invalid_parameter_handler)(_invalid_parameter_handler); -static int (__cdecl *p_wcslwr_s)(wchar_t*,size_t); -static errno_t (__cdecl *p_mbsupr_s)(unsigned char *str, size_t numberOfElements); -static errno_t (__cdecl *p_mbslwr_s)(unsigned char *str, size_t numberOfElements); -static int (__cdecl *p_wctob)(wint_t); -static int (__cdecl *p_tolower)(int); - -#define SETNOFAIL(x,y) x = (void*)GetProcAddress(hMsvcrt,y) -#define SET(x,y) SETNOFAIL(x,y); ok(x != NULL, "Export '%s' not found\n", y) - -static HMODULE hMsvcrt; - -static void test_swab( void ) { - char original[] = "BADCFEHGJILKNMPORQTSVUXWZY@#"; - char expected1[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ@#"; - char expected2[] = "ABCDEFGHIJKLMNOPQRSTUVWX$"; - char expected3[] = "$"; - - char from[30]; - char to[30]; - - int testsize; - - /* Test 1 - normal even case */ - memset(to,'$', sizeof(to)); - memset(from,'@', sizeof(from)); - testsize = 26; - memcpy(from, original, testsize); - _swab( from, to, testsize ); - ok(memcmp(to,expected1,testsize) == 0, "Testing even size %d returned '%*.*s'\n", testsize, testsize, testsize, to); - - /* Test 2 - uneven case */ - memset(to,'$', sizeof(to)); - memset(from,'@', sizeof(from)); - testsize = 25; - memcpy(from, original, testsize); - _swab( from, to, testsize ); - ok(memcmp(to,expected2,testsize) == 0, "Testing odd size %d returned '%*.*s'\n", testsize, testsize, testsize, to); - - /* Test 3 - from = to */ - memset(to,'$', sizeof(to)); - memset(from,'@', sizeof(from)); - testsize = 26; - memcpy(to, original, testsize); - _swab( to, to, testsize ); - ok(memcmp(to,expected1,testsize) == 0, "Testing overlapped size %d returned '%*.*s'\n", testsize, testsize, testsize, to); - - /* Test 4 - 1 bytes */ - memset(to,'$', sizeof(to)); - memset(from,'@', sizeof(from)); - testsize = 1; - memcpy(from, original, testsize); - _swab( from, to, testsize ); - ok(memcmp(to,expected3,testsize) == 0, "Testing small size %d returned '%*.*s'\n", testsize, testsize, testsize, to); -} - -#if 0 /* use this to generate more tests */ - -static void test_codepage(int cp) -{ - int i; - int prev; - int count = 1; - - ok(_setmbcp(cp) == 0, "Couldn't set mbcp\n"); - - prev = p_mbctype[0]; - printf("static int result_cp_%d_mbctype[] = { ", cp); - for (i = 1; i < 257; i++) - { - if (p_mbctype[i] != prev) - { - printf("0x%x,%d, ", prev, count); - prev = p_mbctype[i]; - count = 1; - } - else - count++; - } - printf("0x%x,%d };\n", prev, count); -} - -#else - -/* RLE-encoded mbctype tables for given codepages */ -static int result_cp_932_mbctype[] = { 0x0,65, 0x8,1, 0x18,26, 0x8,6, 0x28,26, 0x8,4, - 0x0,1, 0x8,1, 0xc,31, 0x8,1, 0xa,5, 0x9,58, 0xc,29, 0,3 }; -static int result_cp_936_mbctype[] = { 0x0,65, 0x8,1, 0x18,26, 0x8,6, 0x28,26, 0x8,6, - 0xc,126, 0,1 }; -static int result_cp_949_mbctype[] = { 0x0,66, 0x18,26, 0x8,6, 0x28,26, 0x8,6, 0xc,126, - 0,1 }; -static int result_cp_950_mbctype[] = { 0x0,65, 0x8,1, 0x18,26, 0x8,6, 0x28,26, 0x8,4, - 0x0,2, 0x4,32, 0xc,94, 0,1 }; - -static void test_cp_table(int cp, int *result) -{ - int i; - int count = 0; - int curr = 0; - _setmbcp(cp); - for (i = 0; i < 256; i++) - { - if (count == 0) - { - curr = result[0]; - count = result[1]; - result += 2; - } - ok(p_mbctype[i] == curr, "CP%d: Mismatch in ctype for character %d - %d instead of %d\n", cp, i-1, p_mbctype[i], curr); - count--; - } -} - -#define test_codepage(num) test_cp_table(num, result_cp_##num##_mbctype); - -#endif - -static void test_mbcp(void) -{ - int mb_orig_max = *p__mb_cur_max; - int curr_mbcp = _getmbcp(); - unsigned char *mbstring = (unsigned char *)"\xb0\xb1\xb2 \xb3\xb4 \xb5"; /* incorrect string */ - unsigned char *mbstring2 = (unsigned char *)"\xb0\xb1\xb2\xb3Q\xb4\xb5"; /* correct string */ - unsigned char *mbsonlylead = (unsigned char *)"\xb0\0\xb1\xb2 \xb3"; - unsigned char buf[16]; - int step; - CPINFO cp_info; - - /* _mbtype tests */ - - /* An SBCS codepage test. The ctype of characters on e.g. CP1252 or CP1250 differs slightly - * between versions of Windows. Also Windows 9x seems to ignore the codepage and always uses - * CP1252 (or the ACP?) so we test only a few ASCII characters */ - _setmbcp(1252); - expect_eq(p_mbctype[10], 0, char, "%x"); - expect_eq(p_mbctype[50], 0, char, "%x"); - expect_eq(p_mbctype[66], _SBUP, char, "%x"); - expect_eq(p_mbctype[100], _SBLOW, char, "%x"); - expect_eq(p_mbctype[128], 0, char, "%x"); - _setmbcp(1250); - expect_eq(p_mbctype[10], 0, char, "%x"); - expect_eq(p_mbctype[50], 0, char, "%x"); - expect_eq(p_mbctype[66], _SBUP, char, "%x"); - expect_eq(p_mbctype[100], _SBLOW, char, "%x"); - expect_eq(p_mbctype[128], 0, char, "%x"); - - /* double byte code pages */ - test_codepage(932); - test_codepage(936); - test_codepage(949); - test_codepage(950); - - _setmbcp(936); - ok(*p__mb_cur_max == mb_orig_max, "__mb_cur_max shouldn't be updated (is %d != %d)\n", *p__mb_cur_max, mb_orig_max); - ok(_ismbblead('\354'), "\354 should be a lead byte\n"); - ok(_ismbblead(' ') == FALSE, "' ' should not be a lead byte\n"); - ok(_ismbblead(0x1234b0), "0x1234b0 should not be a lead byte\n"); - ok(_ismbblead(0x123420) == FALSE, "0x123420 should not be a lead byte\n"); - ok(_ismbbtrail('\xb0'), "\xa0 should be a trail byte\n"); - ok(_ismbbtrail(' ') == FALSE, "' ' should not be a trail byte\n"); - - /* _ismbslead */ - expect_eq(_ismbslead(mbstring, &mbstring[0]), -1, int, "%d"); - expect_eq(_ismbslead(mbstring, &mbstring[1]), FALSE, int, "%d"); - expect_eq(_ismbslead(mbstring, &mbstring[2]), -1, int, "%d"); - expect_eq(_ismbslead(mbstring, &mbstring[3]), FALSE, int, "%d"); - expect_eq(_ismbslead(mbstring, &mbstring[4]), -1, int, "%d"); - expect_eq(_ismbslead(mbstring, &mbstring[5]), FALSE, int, "%d"); - expect_eq(_ismbslead(mbstring, &mbstring[6]), FALSE, int, "%d"); - expect_eq(_ismbslead(mbstring, &mbstring[7]), -1, int, "%d"); - expect_eq(_ismbslead(mbstring, &mbstring[8]), FALSE, int, "%d"); - - expect_eq(_ismbslead(mbsonlylead, &mbsonlylead[0]), -1, int, "%d"); - expect_eq(_ismbslead(mbsonlylead, &mbsonlylead[1]), FALSE, int, "%d"); - expect_eq(_ismbslead(mbsonlylead, &mbsonlylead[2]), FALSE, int, "%d"); - expect_eq(_ismbslead(mbsonlylead, &mbsonlylead[5]), FALSE, int, "%d"); - - /* _ismbstrail */ - expect_eq(_ismbstrail(mbstring, &mbstring[0]), FALSE, int, "%d"); - expect_eq(_ismbstrail(mbstring, &mbstring[1]), -1, int, "%d"); - expect_eq(_ismbstrail(mbstring, &mbstring[2]), FALSE, int, "%d"); - expect_eq(_ismbstrail(mbstring, &mbstring[3]), -1, int, "%d"); - expect_eq(_ismbstrail(mbstring, &mbstring[4]), FALSE, int, "%d"); - expect_eq(_ismbstrail(mbstring, &mbstring[5]), -1, int, "%d"); - expect_eq(_ismbstrail(mbstring, &mbstring[6]), FALSE, int, "%d"); - expect_eq(_ismbstrail(mbstring, &mbstring[7]), FALSE, int, "%d"); - expect_eq(_ismbstrail(mbstring, &mbstring[8]), -1, int, "%d"); - - expect_eq(_ismbstrail(mbsonlylead, &mbsonlylead[0]), FALSE, int, "%d"); - expect_eq(_ismbstrail(mbsonlylead, &mbsonlylead[1]), -1, int, "%d"); - expect_eq(_ismbstrail(mbsonlylead, &mbsonlylead[2]), FALSE, int, "%d"); - expect_eq(_ismbstrail(mbsonlylead, &mbsonlylead[3]), FALSE, int, "%d"); - expect_eq(_ismbstrail(mbsonlylead, &mbsonlylead[4]), FALSE, int, "%d"); - expect_eq(_ismbstrail(mbsonlylead, &mbsonlylead[5]), FALSE, int, "%d"); - - /* _mbsbtype */ - expect_eq(_mbsbtype(mbstring, 0), _MBC_LEAD, int, "%d"); - expect_eq(_mbsbtype(mbstring, 1), _MBC_TRAIL, int, "%d"); - expect_eq(_mbsbtype(mbstring, 2), _MBC_LEAD, int, "%d"); - expect_eq(_mbsbtype(mbstring, 3), _MBC_ILLEGAL, int, "%d"); - expect_eq(_mbsbtype(mbstring, 4), _MBC_LEAD, int, "%d"); - expect_eq(_mbsbtype(mbstring, 5), _MBC_TRAIL, int, "%d"); - expect_eq(_mbsbtype(mbstring, 6), _MBC_SINGLE, int, "%d"); - expect_eq(_mbsbtype(mbstring, 7), _MBC_LEAD, int, "%d"); - expect_eq(_mbsbtype(mbstring, 8), _MBC_ILLEGAL, int, "%d"); - - expect_eq(_mbsbtype(mbsonlylead, 0), _MBC_LEAD, int, "%d"); - expect_eq(_mbsbtype(mbsonlylead, 1), _MBC_ILLEGAL, int, "%d"); - expect_eq(_mbsbtype(mbsonlylead, 2), _MBC_ILLEGAL, int, "%d"); - expect_eq(_mbsbtype(mbsonlylead, 3), _MBC_ILLEGAL, int, "%d"); - expect_eq(_mbsbtype(mbsonlylead, 4), _MBC_ILLEGAL, int, "%d"); - expect_eq(_mbsbtype(mbsonlylead, 5), _MBC_ILLEGAL, int, "%d"); - - /* _mbsnextc */ - expect_eq(_mbsnextc(mbstring), 0xb0b1, int, "%x"); - expect_eq(_mbsnextc(&mbstring[2]), 0xb220, int, "%x"); /* lead + invalid tail */ - expect_eq(_mbsnextc(&mbstring[3]), 0x20, int, "%x"); /* single char */ - - /* _mbclen/_mbslen */ - expect_eq(_mbclen(mbstring), 2, int, "%d"); - expect_eq(_mbclen(&mbstring[2]), 2, int, "%d"); - expect_eq(_mbclen(&mbstring[3]), 1, int, "%d"); - expect_eq(_mbslen(mbstring2), 4, int, "%d"); - expect_eq(_mbslen(mbsonlylead), 0, int, "%d"); /* lead + NUL not counted as character */ - expect_eq(_mbslen(mbstring), 4, int, "%d"); /* lead + invalid trail counted */ - - /* _mbccpy/_mbsncpy */ - memset(buf, 0xff, sizeof(buf)); - _mbccpy(buf, mbstring); - expect_bin(buf, "\xb0\xb1\xff", 3); - - memset(buf, 0xff, sizeof(buf)); - _mbsncpy(buf, mbstring, 1); - expect_bin(buf, "\xb0\xb1\xff", 3); - memset(buf, 0xff, sizeof(buf)); - _mbsncpy(buf, mbstring, 2); - expect_bin(buf, "\xb0\xb1\xb2 \xff", 5); - memset(buf, 0xff, sizeof(buf)); - _mbsncpy(buf, mbstring, 3); - expect_bin(buf, "\xb0\xb1\xb2 \xb3\xb4\xff", 7); - memset(buf, 0xff, sizeof(buf)); - _mbsncpy(buf, mbstring, 4); - expect_bin(buf, "\xb0\xb1\xb2 \xb3\xb4 \xff", 8); - memset(buf, 0xff, sizeof(buf)); - _mbsncpy(buf, mbstring, 5); - expect_bin(buf, "\xb0\xb1\xb2 \xb3\xb4 \0\0\xff", 10); - memset(buf, 0xff, sizeof(buf)); - _mbsncpy(buf, mbsonlylead, 6); - expect_bin(buf, "\0\0\0\0\0\0\0\xff", 8); - - memset(buf, 0xff, sizeof(buf)); - _mbsnbcpy(buf, mbstring2, 2); - expect_bin(buf, "\xb0\xb1\xff", 3); - _mbsnbcpy(buf, mbstring2, 3); - expect_bin(buf, "\xb0\xb1\0\xff", 4); - _mbsnbcpy(buf, mbstring2, 4); - expect_bin(buf, "\xb0\xb1\xb2\xb3\xff", 5); - memset(buf, 0xff, sizeof(buf)); - _mbsnbcpy(buf, mbsonlylead, 5); - expect_bin(buf, "\0\0\0\0\0\xff", 6); - - /* _mbsinc/mbsdec */ - step = _mbsinc(mbstring) - mbstring; - ok(step == 2, "_mbsinc adds %d (exp. 2)\n", step); - step = _mbsinc(&mbstring[2]) - &mbstring[2]; /* lead + invalid tail */ - ok(step == 2, "_mbsinc adds %d (exp. 2)\n", step); - - step = _mbsninc(mbsonlylead, 1) - mbsonlylead; - ok(step == 0, "_mbsninc adds %d (exp. 0)\n", step); - step = _mbsninc(mbsonlylead, 2) - mbsonlylead; /* lead + NUL byte + lead + char */ - ok(step == 0, "_mbsninc adds %d (exp. 0)\n", step); - step = _mbsninc(mbstring2, 0) - mbstring2; - ok(step == 0, "_mbsninc adds %d (exp. 2)\n", step); - step = _mbsninc(mbstring2, 1) - mbstring2; - ok(step == 2, "_mbsninc adds %d (exp. 2)\n", step); - step = _mbsninc(mbstring2, 2) - mbstring2; - ok(step == 4, "_mbsninc adds %d (exp. 4)\n", step); - step = _mbsninc(mbstring2, 3) - mbstring2; - ok(step == 5, "_mbsninc adds %d (exp. 5)\n", step); - step = _mbsninc(mbstring2, 4) - mbstring2; - ok(step == 7, "_mbsninc adds %d (exp. 7)\n", step); - step = _mbsninc(mbstring2, 5) - mbstring2; - ok(step == 7, "_mbsninc adds %d (exp. 7)\n", step); - step = _mbsninc(mbstring2, 17) - mbstring2; - ok(step == 7, "_mbsninc adds %d (exp. 7)\n", step); - - /* functions that depend on locale codepage, not mbcp. - * we hope the current locale to be SBCS because setlocale(LC_ALL, ".1252") seems not to work yet - * (as of Wine 0.9.43) - */ - GetCPInfo(GetACP(), &cp_info); - if (cp_info.MaxCharSize == 1) - { - expect_eq(mblen((char *)mbstring, 3), 1, int, "%x"); - expect_eq(_mbstrlen((char *)mbstring2), 7, int, "%d"); - } - else - skip("Current locale has double-byte charset - could lead to false positives\n"); - - _setmbcp(1361); - expect_eq(_ismbblead(0x80), 0, int, "%d"); - todo_wine { - expect_eq(_ismbblead(0x81), 1, int, "%d"); - expect_eq(_ismbblead(0x83), 1, int, "%d"); - } - expect_eq(_ismbblead(0x84), 1, int, "%d"); - expect_eq(_ismbblead(0xd3), 1, int, "%d"); - expect_eq(_ismbblead(0xd7), 0, int, "%d"); - todo_wine { - expect_eq(_ismbblead(0xd8), 1, int, "%d"); - } - expect_eq(_ismbblead(0xd9), 1, int, "%d"); - - expect_eq(_ismbbtrail(0x30), 0, int, "%d"); - expect_eq(_ismbbtrail(0x31), 1, int, "%d"); - expect_eq(_ismbbtrail(0x7e), 1, int, "%d"); - expect_eq(_ismbbtrail(0x7f), 0, int, "%d"); - expect_eq(_ismbbtrail(0x80), 0, int, "%d"); - expect_eq(_ismbbtrail(0x81), 1, int, "%d"); - expect_eq(_ismbbtrail(0xfe), 1, int, "%d"); - expect_eq(_ismbbtrail(0xff), 0, int, "%d"); - - _setmbcp(curr_mbcp); -} - -static void test_mbsspn( void) -{ - unsigned char str1[]="cabernet"; - unsigned char str2[]="shiraz"; - unsigned char set[]="abc"; - unsigned char empty[]=""; - int ret; - ret=_mbsspn( str1, set); - ok( ret==3, "_mbsspn returns %d should be 3\n", ret); - ret=_mbsspn( str2, set); - ok( ret==0, "_mbsspn returns %d should be 0\n", ret); - ret=_mbsspn( str1, empty); - ok( ret==0, "_mbsspn returns %d should be 0\n", ret); -} - -static void test_mbsspnp( void) -{ - unsigned char str1[]="cabernet"; - unsigned char str2[]="shiraz"; - unsigned char set[]="abc"; - unsigned char empty[]=""; - unsigned char full[]="abcenrt"; - unsigned char* ret; - ret=_mbsspnp( str1, set); - ok( ret[0]=='e', "_mbsspnp returns %c should be e\n", ret[0]); - ret=_mbsspnp( str2, set); - ok( ret[0]=='s', "_mbsspnp returns %c should be s\n", ret[0]); - ret=_mbsspnp( str1, empty); - ok( ret[0]=='c', "_mbsspnp returns %c should be c\n", ret[0]); - ret=_mbsspnp( str1, full); - ok( ret==NULL, "_mbsspnp returns %p should be NULL\n", ret); -} - -static void test_strdup(void) -{ - char *str; - str = _strdup( 0 ); - ok( str == 0, "strdup returns %s should be 0\n", str); - free( str ); -} - -static void test_strcpy_s(void) -{ - char dest[8]; - const char *small = "small"; - const char *big = "atoolongstringforthislittledestination"; - int ret; - - if(!pstrcpy_s) - { - skip("strcpy_s not found\n"); - return; - } - - memset(dest, 'X', sizeof(dest)); - ret = pstrcpy_s(dest, sizeof(dest), small); - ok(ret == 0, "Copying a string into a big enough destination returned %d, expected 0\n", ret); - ok(dest[0] == 's' && dest[1] == 'm' && dest[2] == 'a' && dest[3] == 'l' && - dest[4] == 'l' && dest[5] == '\0'&& dest[6] == 'X' && dest[7] == 'X', - "Unexpected return data from strcpy_s: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n", - dest[0], dest[1], dest[2], dest[3], dest[4], dest[5], dest[6], dest[7]); - - memset(dest, 'X', sizeof(dest)); - ret = pstrcpy_s(dest, 0, big); - ok(ret == EINVAL, "Copying into a destination of size 0 returned %d, expected EINVAL\n", ret); - ok(dest[0] == 'X' && dest[1] == 'X' && dest[2] == 'X' && dest[3] == 'X' && - dest[4] == 'X' && dest[5] == 'X' && dest[6] == 'X' && dest[7] == 'X', - "Unexpected return data from strcpy_s: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n", - dest[0], dest[1], dest[2], dest[3], dest[4], dest[5], dest[6], dest[7]); - ret = pstrcpy_s(dest, 0, NULL); - ok(ret == EINVAL, "Copying into a destination of size 0 returned %d, expected EINVAL\n", ret); - ok(dest[0] == 'X' && dest[1] == 'X' && dest[2] == 'X' && dest[3] == 'X' && - dest[4] == 'X' && dest[5] == 'X' && dest[6] == 'X' && dest[7] == 'X', - "Unexpected return data from strcpy_s: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n", - dest[0], dest[1], dest[2], dest[3], dest[4], dest[5], dest[6], dest[7]); - - memset(dest, 'X', sizeof(dest)); - ret = pstrcpy_s(dest, sizeof(dest), big); - ok(ret == ERANGE, "Copying a big string in a small location returned %d, expected ERANGE\n", ret); - ok(dest[0] == '\0'&& dest[1] == 't' && dest[2] == 'o' && dest[3] == 'o' && - dest[4] == 'l' && dest[5] == 'o' && dest[6] == 'n' && dest[7] == 'g', - "Unexpected return data from strcpy_s: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n", - dest[0], dest[1], dest[2], dest[3], dest[4], dest[5], dest[6], dest[7]); - - memset(dest, 'X', sizeof(dest)); - ret = pstrcpy_s(dest, sizeof(dest), NULL); - ok(ret == EINVAL, "Copying from a NULL source string returned %d, expected EINVAL\n", ret); - ok(dest[0] == '\0'&& dest[1] == 'X' && dest[2] == 'X' && dest[3] == 'X' && - dest[4] == 'X' && dest[5] == 'X' && dest[6] == 'X' && dest[7] == 'X', - "Unexpected return data from strcpy_s: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n", - dest[0], dest[1], dest[2], dest[3], dest[4], dest[5], dest[6], dest[7]); - - ret = pstrcpy_s(NULL, sizeof(dest), small); - ok(ret == EINVAL, "Copying a big string a NULL dest returned %d, expected EINVAL\n", ret); -} - -static void test_strcat_s(void) -{ - char dest[8]; - const char *small = "sma"; - int ret; - - if(!pstrcat_s) - { - skip("strcat_s not found\n"); - return; - } - - memset(dest, 'X', sizeof(dest)); - dest[0] = '\0'; - ret = pstrcat_s(dest, sizeof(dest), small); - ok(ret == 0, "strcat_s: Copying a string into a big enough destination returned %d, expected 0\n", ret); - ok(dest[0] == 's' && dest[1] == 'm' && dest[2] == 'a' && dest[3] == '\0'&& - dest[4] == 'X' && dest[5] == 'X' && dest[6] == 'X' && dest[7] == 'X', - "Unexpected return data from strcpy_s: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n", - dest[0], dest[1], dest[2], dest[3], dest[4], dest[5], dest[6], dest[7]); - ret = pstrcat_s(dest, sizeof(dest), small); - ok(ret == 0, "strcat_s: Attaching a string to a big enough destination returned %d, expected 0\n", ret); - ok(dest[0] == 's' && dest[1] == 'm' && dest[2] == 'a' && dest[3] == 's' && - dest[4] == 'm' && dest[5] == 'a' && dest[6] == '\0'&& dest[7] == 'X', - "Unexpected return data from strcpy_s: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n", - dest[0], dest[1], dest[2], dest[3], dest[4], dest[5], dest[6], dest[7]); - - ret = pstrcat_s(dest, sizeof(dest), small); - ok(ret == ERANGE, "strcat_s: Attaching a string to a filled up destination returned %d, expected ERANGE\n", ret); - ok(dest[0] == '\0'&& dest[1] == 'm' && dest[2] == 'a' && dest[3] == 's' && - dest[4] == 'm' && dest[5] == 'a' && dest[6] == 's' && dest[7] == 'm', - "Unexpected return data from strcpy_s: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n", - dest[0], dest[1], dest[2], dest[3], dest[4], dest[5], dest[6], dest[7]); - - memset(dest, 'X', sizeof(dest)); - dest[0] = 'a'; - dest[1] = '\0'; - - ret = pstrcat_s(dest, 0, small); - ok(ret == EINVAL, "strcat_s: Source len = 0 returned %d, expected EINVAL\n", ret); - ok(dest[0] == 'a' && dest[1] == '\0'&& dest[2] == 'X' && dest[3] == 'X' && - dest[4] == 'X' && dest[5] == 'X' && dest[6] == 'X' && dest[7] == 'X', - "Unexpected return data from strcpy_s: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n", - dest[0], dest[1], dest[2], dest[3], dest[4], dest[5], dest[6], dest[7]); - - ret = pstrcat_s(dest, 0, NULL); - ok(ret == EINVAL, "strcat_s: len = 0 and src = NULL returned %d, expected EINVAL\n", ret); - ok(dest[0] == 'a' && dest[1] == '\0'&& dest[2] == 'X' && dest[3] == 'X' && - dest[4] == 'X' && dest[5] == 'X' && dest[6] == 'X' && dest[7] == 'X', - "Unexpected return data from strcpy_s: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n", - dest[0], dest[1], dest[2], dest[3], dest[4], dest[5], dest[6], dest[7]); - - ret = pstrcat_s(dest, sizeof(dest), NULL); - ok(ret == EINVAL, "strcat_s: Sourcing from NULL returned %d, expected EINVAL\n", ret); - ok(dest[0] == '\0'&& dest[1] == '\0'&& dest[2] == 'X' && dest[3] == 'X' && - dest[4] == 'X' && dest[5] == 'X' && dest[6] == 'X' && dest[7] == 'X', - "Unexpected return data from strcpy_s: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n", - dest[0], dest[1], dest[2], dest[3], dest[4], dest[5], dest[6], dest[7]); - - ret = pstrcat_s(NULL, sizeof(dest), small); - ok(ret == EINVAL, "strcat_s: Writing to a NULL string returned %d, expected EINVAL\n", ret); -} - -static void test__mbsnbcpy_s(void) -{ - unsigned char dest[8]; - const unsigned char big[] = "atoolongstringforthislittledestination"; - const unsigned char small[] = "small"; - int ret; - - if(!p_mbsnbcpy_s) - { - skip("_mbsnbcpy_s not found\n"); - return; - } - - memset(dest, 'X', sizeof(dest)); - ret = p_mbsnbcpy_s(dest, sizeof(dest), small, sizeof(small)); - ok(ret == 0, "_mbsnbcpy_s: Copying a string into a big enough destination returned %d, expected 0\n", ret); - ok(dest[0] == 's' && dest[1] == 'm' && dest[2] == 'a' && dest[3] == 'l' && - dest[4] == 'l' && dest[5] == '\0'&& dest[6] == 'X' && dest[7] == 'X', - "Unexpected return data from _mbsnbcpy_s: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n", - dest[0], dest[1], dest[2], dest[3], dest[4], dest[5], dest[6], dest[7]); - - /* WTF? */ - memset(dest, 'X', sizeof(dest)); - ret = p_mbsnbcpy_s(dest, sizeof(dest) - 2, big, sizeof(small)); - ok(ret == ERANGE, "_mbsnbcpy_s: Copying a too long string returned %d, expected ERANGE\n", ret); - ok(dest[0] == '\0'&& dest[1] == 't' && dest[2] == 'o' && dest[3] == 'o' && - dest[4] == 'l' && dest[5] == 'o' && dest[6] == 'X' && dest[7] == 'X', - "Unexpected return data from _mbsnbcpy_s: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n", - dest[0], dest[1], dest[2], dest[3], dest[4], dest[5], dest[6], dest[7]); - - memset(dest, 'X', sizeof(dest)); - ret = p_mbsnbcpy_s(dest, sizeof(dest) - 2, big, 4); - ok(ret == 0, "_mbsnbcpy_s: Copying a too long string with a count cap returned %d, expected 0\n", ret); - ok(dest[0] == 'a' && dest[1] == 't' && dest[2] == 'o' && dest[3] == 'o' && - dest[4] == '\0'&& dest[5] == 'X' && dest[6] == 'X' && dest[7] == 'X', - "Unexpected return data from _mbsnbcpy_s: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n", - dest[0], dest[1], dest[2], dest[3], dest[4], dest[5], dest[6], dest[7]); - - memset(dest, 'X', sizeof(dest)); - ret = p_mbsnbcpy_s(dest, sizeof(dest) - 2, small, sizeof(small) + 10); - ok(ret == 0, "_mbsnbcpy_s: Copying more data than the source string len returned %d, expected 0\n", ret); - ok(dest[0] == 's' && dest[1] == 'm' && dest[2] == 'a' && dest[3] == 'l' && - dest[4] == 'l' && dest[5] == '\0'&& dest[6] == 'X' && dest[7] == 'X', - "Unexpected return data from _mbsnbcpy_s: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n", - dest[0], dest[1], dest[2], dest[3], dest[4], dest[5], dest[6], dest[7]); -} - -static void test_wcscpy_s(void) -{ - static const WCHAR szLongText[] = { 'T','h','i','s','A','L','o','n','g','s','t','r','i','n','g',0 }; - static WCHAR szDest[18]; - static WCHAR szDestShort[8]; - int ret; - - if(!p_wcscpy_s) - { - win_skip("wcscpy_s not found\n"); - return; - } - - /* Test NULL Dest */ - ret = p_wcscpy_s(NULL, 18, szLongText); - ok(ret == EINVAL, "p_wcscpy_s expect EINVAL got %d\n", ret); - - /* Test NULL Source */ - szDest[0] = 'A'; - ret = p_wcscpy_s(szDest, 18, NULL); - ok(ret == EINVAL, "expected EINVAL got %d\n", ret); - ok(szDest[0] == 0, "szDest[0] not 0\n"); - - /* Test invalid size */ - szDest[0] = 'A'; - ret = p_wcscpy_s(szDest, 0, szLongText); - /* Later versions changed the return value for this case to EINVAL, - * and don't modify the result if the dest size is 0. - */ - ok(ret == ERANGE || ret == EINVAL, "expected ERANGE/EINVAL got %d\n", ret); - ok(szDest[0] == 0 || ret == EINVAL, "szDest[0] not 0\n"); - - /* Copy same buffer size */ - ret = p_wcscpy_s(szDest, 18, szLongText); - ok(ret == 0, "expected 0 got %d\n", ret); - ok(lstrcmpW(szDest, szLongText) == 0, "szDest != szLongText\n"); - - /* Copy smaller buffer size */ - szDest[0] = 'A'; - ret = p_wcscpy_s(szDestShort, 8, szLongText); - ok(ret == ERANGE || ret == EINVAL, "expected ERANGE/EINVAL got %d\n", ret); - ok(szDestShort[0] == 0, "szDestShort[0] not 0\n"); - - if(!p_wcsncpy_s) - { - win_skip("wcsncpy_s not found\n"); - return; - } - - ret = p_wcsncpy_s(NULL, 18, szLongText, sizeof(szLongText)/sizeof(WCHAR)); - ok(ret == EINVAL, "p_wcsncpy_s expect EINVAL got %d\n", ret); - - szDest[0] = 'A'; - ret = p_wcsncpy_s(szDest, 18, NULL, 1); - ok(ret == EINVAL, "expected EINVAL got %d\n", ret); - ok(szDest[0] == 0, "szDest[0] not 0\n"); - - szDest[0] = 'A'; - ret = p_wcsncpy_s(szDest, 18, NULL, 0); - ok(ret == 0, "expected ERROR_SUCCESS got %d\n", ret); - ok(szDest[0] == 0, "szDest[0] not 0\n"); - - szDest[0] = 'A'; - ret = p_wcsncpy_s(szDest, 0, szLongText, sizeof(szLongText)/sizeof(WCHAR)); - ok(ret == ERANGE || ret == EINVAL, "expected ERANGE/EINVAL got %d\n", ret); - ok(szDest[0] == 0 || ret == EINVAL, "szDest[0] not 0\n"); - - ret = p_wcsncpy_s(szDest, 18, szLongText, sizeof(szLongText)/sizeof(WCHAR)); - ok(ret == 0, "expected 0 got %d\n", ret); - ok(lstrcmpW(szDest, szLongText) == 0, "szDest != szLongText\n"); - - szDest[0] = 'A'; - ret = p_wcsncpy_s(szDestShort, 8, szLongText, sizeof(szLongText)/sizeof(WCHAR)); - ok(ret == ERANGE || ret == EINVAL, "expected ERANGE/EINVAL got %d\n", ret); - ok(szDestShort[0] == 0, "szDestShort[0] not 0\n"); -} - -static void test__wcsupr_s(void) -{ - static const WCHAR mixedString[] = {'M', 'i', 'X', 'e', 'D', 'l', 'o', 'w', - 'e', 'r', 'U', 'P', 'P', 'E', 'R', 0}; - static const WCHAR expectedString[] = {'M', 'I', 'X', 'E', 'D', 'L', 'O', - 'W', 'E', 'R', 'U', 'P', 'P', 'E', - 'R', 0}; - WCHAR testBuffer[2*sizeof(mixedString)/sizeof(WCHAR)]; - int ret; - - if (!p_wcsupr_s) - { - win_skip("_wcsupr_s not found\n"); - return; - } - - /* Test NULL input string and invalid size. */ - errno = EBADF; - ret = p_wcsupr_s(NULL, 0); - ok(ret == EINVAL, "Expected _wcsupr_s to fail with EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - - /* Test NULL input string and valid size. */ - errno = EBADF; - ret = p_wcsupr_s(NULL, sizeof(testBuffer)/sizeof(WCHAR)); - ok(ret == EINVAL, "Expected _wcsupr_s to fail with EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - - /* Test empty string with zero size. */ - errno = EBADF; - testBuffer[0] = '\0'; - ret = p_wcsupr_s(testBuffer, 0); - ok(ret == EINVAL, "Expected _wcsupr_s to fail with EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - ok(testBuffer[0] == '\0', "Expected the buffer to be unchanged\n"); - - /* Test empty string with size of one. */ - testBuffer[0] = '\0'; - ret = p_wcsupr_s(testBuffer, 1); - ok(ret == 0, "Expected _wcsupr_s to succeed, got %d\n", ret); - ok(testBuffer[0] == '\0', "Expected the buffer to be unchanged\n"); - - /* Test one-byte buffer with zero size. */ - errno = EBADF; - testBuffer[0] = 'x'; - ret = p_wcsupr_s(testBuffer, 0); - ok(ret == EINVAL, "Expected _wcsupr_s to fail with EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - ok(testBuffer[0] == '\0', "Expected the first buffer character to be null\n"); - - /* Test one-byte buffer with size of one. */ - errno = EBADF; - testBuffer[0] = 'x'; - ret = p_wcsupr_s(testBuffer, 1); - ok(ret == EINVAL, "Expected _wcsupr_s to fail with EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - ok(testBuffer[0] == '\0', "Expected the first buffer character to be null\n"); - - /* Test invalid size. */ - wcscpy(testBuffer, mixedString); - errno = EBADF; - ret = p_wcsupr_s(testBuffer, 0); - ok(ret == EINVAL, "Expected _wcsupr_s to fail with EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - ok(testBuffer[0] == '\0', "Expected the first buffer character to be null\n"); - - /* Test normal string uppercasing. */ - wcscpy(testBuffer, mixedString); - ret = p_wcsupr_s(testBuffer, sizeof(mixedString)/sizeof(WCHAR)); - ok(ret == 0, "Expected _wcsupr_s to succeed, got %d\n", ret); - ok(!wcscmp(testBuffer, expectedString), "Expected the string to be fully upper-case\n"); - - /* Test uppercasing with a shorter buffer size count. */ - wcscpy(testBuffer, mixedString); - errno = EBADF; - ret = p_wcsupr_s(testBuffer, sizeof(mixedString)/sizeof(WCHAR) - 1); - ok(ret == EINVAL, "Expected _wcsupr_s to fail with EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - ok(testBuffer[0] == '\0', "Expected the first buffer character to be null\n"); - - /* Test uppercasing with a longer buffer size count. */ - wcscpy(testBuffer, mixedString); - ret = p_wcsupr_s(testBuffer, sizeof(testBuffer)/sizeof(WCHAR)); - ok(ret == 0, "Expected _wcsupr_s to succeed, got %d\n", ret); - ok(!wcscmp(testBuffer, expectedString), "Expected the string to be fully upper-case\n"); -} - -static void test__wcslwr_s(void) -{ - static const WCHAR mixedString[] = {'M', 'i', 'X', 'e', 'D', 'l', 'o', 'w', - 'e', 'r', 'U', 'P', 'P', 'E', 'R', 0}; - static const WCHAR expectedString[] = {'m', 'i', 'x', 'e', 'd', 'l', 'o', - 'w', 'e', 'r', 'u', 'p', 'p', 'e', - 'r', 0}; - WCHAR buffer[2*sizeof(mixedString)/sizeof(WCHAR)]; - int ret; - - if (!p_wcslwr_s) - { - win_skip("_wcslwr_s not found\n"); - return; - } - - /* Test NULL input string and invalid size. */ - errno = EBADF; - ret = p_wcslwr_s(NULL, 0); - ok(ret == EINVAL, "expected EINVAL, got %d\n", ret); - ok(errno == EINVAL, "expected errno EINVAL, got %d\n", errno); - - /* Test NULL input string and valid size. */ - errno = EBADF; - ret = p_wcslwr_s(NULL, sizeof(buffer)/sizeof(wchar_t)); - ok(ret == EINVAL, "expected EINVAL, got %d\n", ret); - ok(errno == EINVAL, "expected errno EINVAL, got %d\n", errno); - - /* Test empty string with zero size. */ - errno = EBADF; - buffer[0] = 'a'; - ret = p_wcslwr_s(buffer, 0); - ok(ret == EINVAL, "expected EINVAL, got %d\n", ret); - ok(errno == EINVAL, "expected errno EINVAL, got %d\n", errno); - ok(buffer[0] == 0, "expected empty string\n"); - - /* Test empty string with size of one. */ - buffer[0] = 0; - ret = p_wcslwr_s(buffer, 1); - ok(ret == 0, "got %d\n", ret); - ok(buffer[0] == 0, "expected buffer to be unchanged\n"); - - /* Test one-byte buffer with zero size. */ - errno = EBADF; - buffer[0] = 'x'; - ret = p_wcslwr_s(buffer, 0); - ok(ret == EINVAL, "expected EINVAL, got %d\n", ret); - ok(errno == EINVAL, "expected errno to be EINVAL, got %d\n", errno); - ok(buffer[0] == '\0', "expected empty string\n"); - - /* Test one-byte buffer with size of one. */ - errno = EBADF; - buffer[0] = 'x'; - ret = p_wcslwr_s(buffer, 1); - ok(ret == EINVAL, "expected EINVAL, got %d\n", ret); - ok(errno == EINVAL, "expected errno to be EINVAL, got %d\n", errno); - ok(buffer[0] == '\0', "expected empty string\n"); - - /* Test invalid size. */ - wcscpy(buffer, mixedString); - errno = EBADF; - ret = p_wcslwr_s(buffer, 0); - ok(ret == EINVAL, "Expected EINVAL, got %d\n", ret); - ok(errno == EINVAL, "expected errno to be EINVAL, got %d\n", errno); - ok(buffer[0] == '\0', "expected empty string\n"); - - /* Test normal string uppercasing. */ - wcscpy(buffer, mixedString); - ret = p_wcslwr_s(buffer, sizeof(mixedString)/sizeof(WCHAR)); - ok(ret == 0, "expected 0, got %d\n", ret); - ok(!wcscmp(buffer, expectedString), "expected lowercase\n"); - - /* Test uppercasing with a shorter buffer size count. */ - wcscpy(buffer, mixedString); - errno = EBADF; - ret = p_wcslwr_s(buffer, sizeof(mixedString)/sizeof(WCHAR) - 1); - ok(ret == EINVAL, "expected EINVAL, got %d\n", ret); - ok(errno == EINVAL, "expected errno to be EINVAL, got %d\n", errno); - ok(buffer[0] == '\0', "expected empty string\n"); - - /* Test uppercasing with a longer buffer size count. */ - wcscpy(buffer, mixedString); - ret = p_wcslwr_s(buffer, sizeof(buffer)/sizeof(WCHAR)); - ok(ret == 0, "expected 0, got %d\n", ret); - ok(!wcscmp(buffer, expectedString), "expected lowercase\n"); -} - -static void test_mbcjisjms(void) -{ - /* List of value-pairs to test. The test assumes the last pair to be {0, ..} */ - unsigned int jisjms[][2] = { {0x2020, 0}, {0x2021, 0}, {0x2120, 0}, {0x2121, 0x8140}, - {0x7f7f, 0}, {0x7f7e, 0}, {0x7e7f, 0}, {0x7e7e, 0xeffc}, - {0x2121FFFF, 0}, {0x2223, 0x81a1}, {0x237e, 0x829e}, {0, 0}}; - unsigned int ret, exp, i; - - i = 0; - do - { - ret = _mbcjistojms(jisjms[i][0]); - - if(_getmbcp() == 932) /* Japanese codepage? */ - exp = jisjms[i][1]; - else - exp = jisjms[i][0]; /* If not, no conversion */ - - ok(ret == exp, "Expected 0x%x, got 0x%x\n", exp, ret); - } while(jisjms[i++][0] != 0); -} - -static void test_mbctombb(void) -{ - static const unsigned int mbcmbb_932[][2] = { - {0x829e, 0x829e}, {0x829f, 0xa7}, {0x82f1, 0xdd}, {0x82f2, 0x82f2}, - {0x833f, 0x833f}, {0x8340, 0xa7}, {0x837e, 0xd0}, {0x837f, 0x837f}, - {0x8380, 0xd1}, {0x8396, 0xb9}, {0x8397, 0x8397}, {0x813f, 0x813f}, - {0x8140, 0x20}, {0x814c, 0x814c}, {0x814f, 0x5e}, {0x8197, 0x40}, - {0x8198, 0x8198}, {0x8258, 0x39}, {0x8259, 0x8259}, {0x825f, 0x825f}, - {0x8260, 0x41}, {0x82f1, 0xdd}, {0x82f2, 0x82f2}, {0,0}}; - unsigned int exp, ret, i; - unsigned int prev_cp = _getmbcp(); - - _setmbcp(932); - for (i = 0; mbcmbb_932[i][0] != 0; i++) - { - ret = _mbctombb(mbcmbb_932[i][0]); - exp = mbcmbb_932[i][1]; - ok(ret == exp, "Expected 0x%x, got 0x%x\n", exp, ret); - } - _setmbcp(prev_cp); -} - -static void test_ismbclegal(void) { - unsigned int prev_cp = _getmbcp(); - int ret, exp, err; - unsigned int i; - - _setmbcp(932); /* Japanese */ - err = 0; - for(i = 0; i < 0x10000; i++) { - ret = _ismbclegal(i); - exp = ((HIBYTE(i) >= 0x81 && HIBYTE(i) <= 0x9F) || - (HIBYTE(i) >= 0xE0 && HIBYTE(i) <= 0xFC)) && - ((LOBYTE(i) >= 0x40 && LOBYTE(i) <= 0x7E) || - (LOBYTE(i) >= 0x80 && LOBYTE(i) <= 0xFC)); - if(ret != exp) { - err = 1; - break; - } - } - ok(!err, "_ismbclegal (932) : Expected 0x%x, got 0x%x (0x%x)\n", exp, ret, i); - _setmbcp(936); /* Chinese (GBK) */ - err = 0; - for(i = 0; i < 0x10000; i++) { - ret = _ismbclegal(i); - exp = HIBYTE(i) >= 0x81 && HIBYTE(i) <= 0xFE && - LOBYTE(i) >= 0x40 && LOBYTE(i) <= 0xFE; - if(ret != exp) { - err = 1; - break; - } - } - ok(!err, "_ismbclegal (936) : Expected 0x%x, got 0x%x (0x%x)\n", exp, ret, i); - _setmbcp(949); /* Korean */ - err = 0; - for(i = 0; i < 0x10000; i++) { - ret = _ismbclegal(i); - exp = HIBYTE(i) >= 0x81 && HIBYTE(i) <= 0xFE && - LOBYTE(i) >= 0x41 && LOBYTE(i) <= 0xFE; - if(ret != exp) { - err = 1; - break; - } - } - ok(!err, "_ismbclegal (949) : Expected 0x%x, got 0x%x (0x%x)\n", exp, ret, i); - _setmbcp(950); /* Chinese (Big5) */ - err = 0; - for(i = 0; i < 0x10000; i++) { - ret = _ismbclegal(i); - exp = HIBYTE(i) >= 0x81 && HIBYTE(i) <= 0xFE && - ((LOBYTE(i) >= 0x40 && LOBYTE(i) <= 0x7E) || - (LOBYTE(i) >= 0xA1 && LOBYTE(i) <= 0xFE)); - if(ret != exp) { - err = 1; - break; - } - } - ok(!err, "_ismbclegal (950) : Expected 0x%x, got 0x%x (0x%x)\n", exp, ret, i); - _setmbcp(1361); /* Korean (Johab) */ - err = 0; - for(i = 0; i < 0x10000; i++) { - ret = _ismbclegal(i); - exp = ((HIBYTE(i) >= 0x81 && HIBYTE(i) <= 0xD3) || - (HIBYTE(i) >= 0xD8 && HIBYTE(i) <= 0xF9)) && - ((LOBYTE(i) >= 0x31 && LOBYTE(i) <= 0x7E) || - (LOBYTE(i) >= 0x81 && LOBYTE(i) <= 0xFE)) && - HIBYTE(i) != 0xDF; - if(ret != exp) { - err = 1; - break; - } - } - todo_wine ok(!err, "_ismbclegal (1361) : Expected 0x%x, got 0x%x (0x%x)\n", exp, ret, i); - - _setmbcp(prev_cp); -} - -static const struct { - const char* string; - const char* delimiter; - int exp_offsetret1; /* returned offset from string after first call to strtok() - -1 means NULL */ - int exp_offsetret2; /* returned offset from string after second call to strtok() - -1 means NULL */ - int exp_offsetret3; /* returned offset from string after third call to strtok() - -1 means NULL */ -} testcases_strtok[] = { - { "red cabernet", " ", 0, 4, -1 }, - { "sparkling white riesling", " ", 0, 10, 16 }, - { " pale cream sherry", "e ", 1, 6, 9 }, - /* end mark */ - { 0} -}; - -static void test_strtok(void) -{ - int i; - char *strret; - char teststr[100]; - for( i = 0; testcases_strtok[i].string; i++){ - strcpy( teststr, testcases_strtok[i].string); - strret = strtok( teststr, testcases_strtok[i].delimiter); - ok( (int)(strret - teststr) == testcases_strtok[i].exp_offsetret1 || - (!strret && testcases_strtok[i].exp_offsetret1 == -1), - "string (%p) \'%s\' return %p\n", - teststr, testcases_strtok[i].string, strret); - if( !strret) continue; - strret = strtok( NULL, testcases_strtok[i].delimiter); - ok( (int)(strret - teststr) == testcases_strtok[i].exp_offsetret2 || - (!strret && testcases_strtok[i].exp_offsetret2 == -1), - "second call string (%p) \'%s\' return %p\n", - teststr, testcases_strtok[i].string, strret); - if( !strret) continue; - strret = strtok( NULL, testcases_strtok[i].delimiter); - ok( (int)(strret - teststr) == testcases_strtok[i].exp_offsetret3 || - (!strret && testcases_strtok[i].exp_offsetret3 == -1), - "third call string (%p) \'%s\' return %p\n", - teststr, testcases_strtok[i].string, strret); - } -} - -static void test_strtol(void) -{ - char* e; - LONG l; - ULONG ul; - - /* errno is only set in case of error, so reset errno to EBADF to check for errno modification */ - /* errno is modified on W2K8+ */ - errno = EBADF; - l = strtol("-1234", &e, 0); - ok(l==-1234, "wrong value %d\n", l); - ok(errno == EBADF || broken(errno == 0), "wrong errno %d\n", errno); - errno = EBADF; - ul = strtoul("1234", &e, 0); - ok(ul==1234, "wrong value %u\n", ul); - ok(errno == EBADF || broken(errno == 0), "wrong errno %d\n", errno); - - errno = EBADF; - l = strtol("2147483647L", &e, 0); - ok(l==2147483647, "wrong value %d\n", l); - ok(errno == EBADF || broken(errno == 0), "wrong errno %d\n", errno); - errno = EBADF; - l = strtol("-2147483648L", &e, 0); - ok(l==-2147483647L - 1, "wrong value %d\n", l); - ok(errno == EBADF || broken(errno == 0), "wrong errno %d\n", errno); - errno = EBADF; - ul = strtoul("4294967295UL", &e, 0); - ok(ul==4294967295ul, "wrong value %u\n", ul); - ok(errno == EBADF || broken(errno == 0), "wrong errno %d\n", errno); - - errno = 0; - l = strtol("9223372036854775807L", &e, 0); - ok(l==2147483647, "wrong value %d\n", l); - ok(errno == ERANGE, "wrong errno %d\n", errno); - errno = 0; - ul = strtoul("9223372036854775807L", &e, 0); - ok(ul==4294967295ul, "wrong value %u\n", ul); - ok(errno == ERANGE, "wrong errno %d\n", errno); -} - -static void test_strnlen(void) -{ - static const char str[] = "string"; - size_t res; - - if(!p_strnlen) { - win_skip("strnlen not found\n"); - return; - } - - res = p_strnlen(str, 20); - ok(res == 6, "Returned length = %d\n", (int)res); - - res = p_strnlen(str, 3); - ok(res == 3, "Returned length = %d\n", (int)res); - - res = p_strnlen(NULL, 0); - ok(res == 0, "Returned length = %d\n", (int)res); -} - -static void test__strtoi64(void) -{ - static const char no1[] = "31923"; - static const char no2[] = "-213312"; - static const char no3[] = "12aa"; - static const char no4[] = "abc12"; - static const char overflow[] = "99999999999999999999"; - static const char neg_overflow[] = "-99999999999999999999"; - static const char hex[] = "0x123"; - static const char oct[] = "000123"; - static const char blanks[] = " 12 212.31"; - - __int64 res; - unsigned __int64 ures; - char *endpos; - - if(!p_strtoi64 || !p_strtoui64) { - win_skip("_strtoi64 or _strtoui64 not found\n"); - return; - } - - errno = 0xdeadbeef; - res = p_strtoi64(no1, NULL, 10); - ok(res == 31923, "res != 31923\n"); - res = p_strtoi64(no2, NULL, 10); - ok(res == -213312, "res != -213312\n"); - res = p_strtoi64(no3, NULL, 10); - ok(res == 12, "res != 12\n"); - res = p_strtoi64(no4, &endpos, 10); - ok(res == 0, "res != 0\n"); - ok(endpos == no4, "Scanning was not stopped on first character\n"); - res = p_strtoi64(hex, &endpos, 10); - ok(res == 0, "res != 0\n"); - ok(endpos == hex+1, "Incorrect endpos (%p-%p)\n", hex, endpos); - res = p_strtoi64(oct, &endpos, 10); - ok(res == 123, "res != 123\n"); - ok(endpos == oct+strlen(oct), "Incorrect endpos (%p-%p)\n", oct, endpos); - res = p_strtoi64(blanks, &endpos, 10); - ok(res == 12, "res != 12\n"); - ok(endpos == blanks+10, "Incorrect endpos (%p-%p)\n", blanks, endpos); - ok(errno == 0xdeadbeef, "errno = %x\n", errno); - - errno = 0xdeadbeef; - res = p_strtoi64(overflow, &endpos, 10); - ok(res == _I64_MAX, "res != _I64_MAX\n"); - ok(endpos == overflow+strlen(overflow), "Incorrect endpos (%p-%p)\n", overflow, endpos); - ok(errno == ERANGE, "errno = %x\n", errno); - - errno = 0xdeadbeef; - res = p_strtoi64(neg_overflow, &endpos, 10); - ok(res == _I64_MIN, "res != _I64_MIN\n"); - ok(endpos == neg_overflow+strlen(neg_overflow), "Incorrect endpos (%p-%p)\n", neg_overflow, endpos); - ok(errno == ERANGE, "errno = %x\n", errno); - - errno = 0xdeadbeef; - res = p_strtoi64(no1, &endpos, 16); - ok(res == 203043, "res != 203043\n"); - ok(endpos == no1+strlen(no1), "Incorrect endpos (%p-%p)\n", no1, endpos); - res = p_strtoi64(no2, &endpos, 16); - ok(res == -2175762, "res != -2175762\n"); - ok(endpos == no2+strlen(no2), "Incorrect endpos (%p-%p)\n", no2, endpos); - res = p_strtoi64(no3, &endpos, 16); - ok(res == 4778, "res != 4778\n"); - ok(endpos == no3+strlen(no3), "Incorrect endpos (%p-%p)\n", no3, endpos); - res = p_strtoi64(no4, &endpos, 16); - ok(res == 703506, "res != 703506\n"); - ok(endpos == no4+strlen(no4), "Incorrect endpos (%p-%p)\n", no4, endpos); - res = p_strtoi64(hex, &endpos, 16); - ok(res == 291, "res != 291\n"); - ok(endpos == hex+strlen(hex), "Incorrect endpos (%p-%p)\n", hex, endpos); - res = p_strtoi64(oct, &endpos, 16); - ok(res == 291, "res != 291\n"); - ok(endpos == oct+strlen(oct), "Incorrect endpos (%p-%p)\n", oct, endpos); - res = p_strtoi64(blanks, &endpos, 16); - ok(res == 18, "res != 18\n"); - ok(endpos == blanks+10, "Incorrect endpos (%p-%p)\n", blanks, endpos); - ok(errno == 0xdeadbeef, "errno = %x\n", errno); - - errno = 0xdeadbeef; - res = p_strtoi64(hex, &endpos, 36); - ok(res == 1541019, "res != 1541019\n"); - ok(endpos == hex+strlen(hex), "Incorrect endpos (%p-%p)\n", hex, endpos); - ok(errno == 0xdeadbeef, "errno = %x\n", errno); - - errno = 0xdeadbeef; - res = p_strtoi64(no1, &endpos, 0); - ok(res == 31923, "res != 31923\n"); - ok(endpos == no1+strlen(no1), "Incorrect endpos (%p-%p)\n", no1, endpos); - res = p_strtoi64(no2, &endpos, 0); - ok(res == -213312, "res != -213312\n"); - ok(endpos == no2+strlen(no2), "Incorrect endpos (%p-%p)\n", no2, endpos); - res = p_strtoi64(no3, &endpos, 10); - ok(res == 12, "res != 12\n"); - ok(endpos == no3+2, "Incorrect endpos (%p-%p)\n", no3, endpos); - res = p_strtoi64(no4, &endpos, 10); - ok(res == 0, "res != 0\n"); - ok(endpos == no4, "Incorrect endpos (%p-%p)\n", no4, endpos); - res = p_strtoi64(hex, &endpos, 10); - ok(res == 0, "res != 0\n"); - ok(endpos == hex+1, "Incorrect endpos (%p-%p)\n", hex, endpos); - res = p_strtoi64(oct, &endpos, 10); - ok(res == 123, "res != 123\n"); - ok(endpos == oct+strlen(oct), "Incorrect endpos (%p-%p)\n", oct, endpos); - res = p_strtoi64(blanks, &endpos, 10); - ok(res == 12, "res != 12\n"); - ok(endpos == blanks+10, "Incorrect endpos (%p-%p)\n", blanks, endpos); - ok(errno == 0xdeadbeef, "errno = %x\n", errno); - - errno = 0xdeadbeef; - ures = p_strtoui64(no1, &endpos, 0); - ok(ures == 31923, "ures != 31923\n"); - ok(endpos == no1+strlen(no1), "Incorrect endpos (%p-%p)\n", no1, endpos); - ures = p_strtoui64(no2, &endpos, 0); - ok(ures == -213312, "ures != -213312\n"); - ok(endpos == no2+strlen(no2), "Incorrect endpos (%p-%p)\n", no2, endpos); - ures = p_strtoui64(no3, &endpos, 10); - ok(ures == 12, "ures != 12\n"); - ok(endpos == no3+2, "Incorrect endpos (%p-%p)\n", no3, endpos); - ures = p_strtoui64(no4, &endpos, 10); - ok(ures == 0, "ures != 0\n"); - ok(endpos == no4, "Incorrect endpos (%p-%p)\n", no4, endpos); - ures = p_strtoui64(hex, &endpos, 10); - ok(ures == 0, "ures != 0\n"); - ok(endpos == hex+1, "Incorrect endpos (%p-%p)\n", hex, endpos); - ures = p_strtoui64(oct, &endpos, 10); - ok(ures == 123, "ures != 123\n"); - ok(endpos == oct+strlen(oct), "Incorrect endpos (%p-%p)\n", oct, endpos); - ures = p_strtoui64(blanks, &endpos, 10); - ok(ures == 12, "ures != 12\n"); - ok(endpos == blanks+10, "Incorrect endpos (%p-%p)\n", blanks, endpos); - ok(errno == 0xdeadbeef, "errno = %x\n", errno); - - errno = 0xdeadbeef; - ures = p_strtoui64(overflow, &endpos, 10); - ok(ures == _UI64_MAX, "ures != _UI64_MAX\n"); - ok(endpos == overflow+strlen(overflow), "Incorrect endpos (%p-%p)\n", overflow, endpos); - ok(errno == ERANGE, "errno = %x\n", errno); - - errno = 0xdeadbeef; - ures = p_strtoui64(neg_overflow, &endpos, 10); - ok(ures == 1, "ures != 1\n"); - ok(endpos == neg_overflow+strlen(neg_overflow), "Incorrect endpos (%p-%p)\n", neg_overflow, endpos); - ok(errno == ERANGE, "errno = %x\n", errno); -} - -static inline BOOL almost_equal(double d1, double d2) { - if(d1-d2>-1e-30 && d1-d2<1e-30) - return TRUE; - return FALSE; -} - -static void test__strtod(void) -{ - const char double1[] = "12.1"; - const char double2[] = "-13.721"; - const char double3[] = "INF"; - const char double4[] = ".21e12"; - const char double5[] = "214353e-3"; - const char overflow[] = "1d9999999999999999999"; - const char white_chars[] = " d10"; - - char *end; - double d; - - d = strtod(double1, &end); - ok(almost_equal(d, 12.1), "d = %lf\n", d); - ok(end == double1+4, "incorrect end (%d)\n", (int)(end-double1)); - - d = strtod(double2, &end); - ok(almost_equal(d, -13.721), "d = %lf\n", d); - ok(end == double2+7, "incorrect end (%d)\n", (int)(end-double2)); - - d = strtod(double3, &end); - ok(almost_equal(d, 0), "d = %lf\n", d); - ok(end == double3, "incorrect end (%d)\n", (int)(end-double3)); - - d = strtod(double4, &end); - ok(almost_equal(d, 210000000000.0), "d = %lf\n", d); - ok(end == double4+6, "incorrect end (%d)\n", (int)(end-double4)); - - d = strtod(double5, &end); - ok(almost_equal(d, 214.353), "d = %lf\n", d); - ok(end == double5+9, "incorrect end (%d)\n", (int)(end-double5)); - - d = strtod("12.1d2", NULL); - ok(almost_equal(d, 12.1e2), "d = %lf\n", d); - - d = strtod(white_chars, &end); - ok(almost_equal(d, 0), "d = %lf\n", d); - ok(end == white_chars, "incorrect end (%d)\n", (int)(end-white_chars)); - - /* Set locale with non '.' decimal point (',') */ - if(!setlocale(LC_ALL, "Polish")) { - win_skip("system with limited locales\n"); - return; - } - - d = strtod("12.1", NULL); - ok(almost_equal(d, 12.0), "d = %lf\n", d); - - d = strtod("12,1", NULL); - ok(almost_equal(d, 12.1), "d = %lf\n", d); - - setlocale(LC_ALL, "C"); - - /* Precision tests */ - d = strtod("0.1", NULL); - ok(almost_equal(d, 0.1), "d = %lf\n", d); - d = strtod("-0.1", NULL); - ok(almost_equal(d, -0.1), "d = %lf\n", d); - d = strtod("0.1281832188491894198128921", NULL); - ok(almost_equal(d, 0.1281832188491894198128921), "d = %lf\n", d); - d = strtod("0.82181281288121", NULL); - ok(almost_equal(d, 0.82181281288121), "d = %lf\n", d); - d = strtod("21921922352523587651128218821", NULL); - ok(almost_equal(d, 21921922352523587651128218821.0), "d = %lf\n", d); - d = strtod("0.1d238", NULL); - ok(almost_equal(d, 0.1e238L), "d = %lf\n", d); - d = strtod("0.1D-4736", NULL); - ok(almost_equal(d, 0.1e-4736L), "d = %lf\n", d); - - errno = 0xdeadbeef; - strtod(overflow, &end); - ok(errno == ERANGE, "errno = %x\n", errno); - ok(end == overflow+21, "incorrect end (%d)\n", (int)(end-overflow)); - - errno = 0xdeadbeef; - strtod("-1d309", NULL); - ok(errno == ERANGE, "errno = %x\n", errno); -} - -static void test_mbstowcs(void) -{ - static const wchar_t wSimple[] = { 't','e','x','t',0 }; - static const wchar_t wHiragana[] = { 0x3042,0x3043,0 }; - static const char mSimple[] = "text"; - static const char mHiragana[] = { 0x82,0xa0,0x82,0xa1,0 }; - - const wchar_t *pwstr; - wchar_t wOut[6]; - char mOut[6]; - size_t ret; - int err; - - wOut[4] = '!'; wOut[5] = '\0'; - mOut[4] = '!'; mOut[5] = '\0'; - - ret = mbstowcs(NULL, mSimple, 0); - ok(ret == 4, "mbstowcs did not return 4\n"); - - ret = mbstowcs(wOut, mSimple, 4); - ok(ret == 4, "mbstowcs did not return 4\n"); - ok(!memcmp(wOut, wSimple, 4*sizeof(wchar_t)), "wOut = %s\n", wine_dbgstr_w(wOut)); - ok(wOut[4] == '!', "wOut[4] != \'!\'\n"); - - ret = wcstombs(NULL, wSimple, 0); - ok(ret == 4, "wcstombs did not return 4\n"); - - ret = wcstombs(mOut, wSimple, 6); - ok(ret == 4, "wcstombs did not return 4\n"); - ok(!memcmp(mOut, mSimple, 5*sizeof(char)), "mOut = %s\n", mOut); - - ret = wcstombs(mOut, wSimple, 2); - ok(ret == 2, "wcstombs did not return 2\n"); - ok(!memcmp(mOut, mSimple, 5*sizeof(char)), "mOut = %s\n", mOut); - - if(!setlocale(LC_ALL, "Japanese_Japan.932")) { - win_skip("Japanese_Japan.932 locale not available\n"); - return; - } - - ret = mbstowcs(wOut, mHiragana, 6); - ok(ret == 2, "mbstowcs did not return 2\n"); - ok(!memcmp(wOut, wHiragana, sizeof(wHiragana)), "wOut = %s\n", wine_dbgstr_w(wOut)); - - ret = wcstombs(mOut, wHiragana, 6); - ok(ret == 4, "wcstombs did not return 4\n"); - ok(!memcmp(mOut, mHiragana, sizeof(mHiragana)), "mOut = %s\n", mOut); - - if(!pmbstowcs_s || !pwcstombs_s) { - setlocale(LC_ALL, "C"); - win_skip("mbstowcs_s or wcstombs_s not available\n"); - return; - } - - err = pmbstowcs_s(&ret, wOut, 6, mSimple, _TRUNCATE); - ok(err == 0, "err = %d\n", err); - ok(ret == 5, "mbstowcs_s did not return 5\n"); - ok(!memcmp(wOut, wSimple, sizeof(wSimple)), "wOut = %s\n", wine_dbgstr_w(wOut)); - - err = pmbstowcs_s(&ret, wOut, 6, mHiragana, _TRUNCATE); - ok(err == 0, "err = %d\n", err); - ok(ret == 3, "mbstowcs_s did not return 3\n"); - ok(!memcmp(wOut, wHiragana, sizeof(wHiragana)), "wOut = %s\n", wine_dbgstr_w(wOut)); - - err = pmbstowcs_s(&ret, NULL, 0, mHiragana, 1); - ok(err == 0, "err = %d\n", err); - ok(ret == 3, "mbstowcs_s did not return 3\n"); - - err = pwcstombs_s(&ret, mOut, 6, wSimple, _TRUNCATE); - ok(err == 0, "err = %d\n", err); - ok(ret == 5, "wcstombs_s did not return 5\n"); - ok(!memcmp(mOut, mSimple, sizeof(mSimple)), "mOut = %s\n", mOut); - - err = pwcstombs_s(&ret, mOut, 6, wHiragana, _TRUNCATE); - ok(err == 0, "err = %d\n", err); - ok(ret == 5, "wcstombs_s did not return 5\n"); - ok(!memcmp(mOut, mHiragana, sizeof(mHiragana)), "mOut = %s\n", mOut); - - err = pwcstombs_s(&ret, NULL, 0, wHiragana, 1); - ok(err == 0, "err = %d\n", err); - ok(ret == 5, "wcstombs_s did not return 5\n"); - - if(!pwcsrtombs) { - setlocale(LC_ALL, "C"); - win_skip("wcsrtombs not available\n"); - return; - } - - pwstr = wSimple; - err = -3; - ret = pwcsrtombs(mOut, &pwstr, 4, &err); - ok(ret == 4, "wcsrtombs did not return 4\n"); - ok(err == 0, "err = %d\n", err); - ok(pwstr == wSimple+4, "pwstr = %p (wszSimple = %p)\n", pwstr, wSimple); - ok(!memcmp(mOut, mSimple, ret), "mOut = %s\n", mOut); - - pwstr = wSimple; - ret = pwcsrtombs(mOut, &pwstr, 5, NULL); - ok(ret == 4, "wcsrtombs did not return 4\n"); - ok(pwstr == NULL, "pwstr != NULL\n"); - ok(!memcmp(mOut, mSimple, sizeof(mSimple)), "mOut = %s\n", mOut); - - setlocale(LC_ALL, "C"); -} - -static void test_gcvt(void) -{ - char buf[1024], *res; - errno_t err; - - if(!p_gcvt_s) { - win_skip("Skipping _gcvt tests\n"); - return; - } - - errno = 0; - res = _gcvt(1.2, -1, buf); - ok(res == NULL, "res != NULL\n"); - ok(errno == ERANGE, "errno = %d\n", errno); - - errno = 0; - res = _gcvt(1.2, 5, NULL); - ok(res == NULL, "res != NULL\n"); - ok(errno == EINVAL, "errno = %d\n", errno); - - res = gcvt(1.2, 5, buf); - ok(res == buf, "res != buf\n"); - ok(!strcmp(buf, "1.2"), "buf = %s\n", buf); - - buf[0] = 'x'; - err = p_gcvt_s(buf, 5, 1.2, 10); - ok(err == ERANGE, "err = %d\n", err); - ok(buf[0] == '\0', "buf[0] = %c\n", buf[0]); - - buf[0] = 'x'; - err = p_gcvt_s(buf, 4, 123456, 2); - ok(err == ERANGE, "err = %d\n", err); - ok(buf[0] == '\0', "buf[0] = %c\n", buf[0]); -} - -static void test__itoa_s(void) -{ - errno_t ret; - char buffer[33]; - - if (!p_itoa_s) - { - win_skip("Skipping _itoa_s tests\n"); - return; - } - - if (p_set_invalid_parameter_handler) - ok(p_set_invalid_parameter_handler(test_invalid_parameter_handler) == NULL, - "Invalid parameter handler was already set\n"); - - errno = EBADF; - ret = p_itoa_s(0, NULL, 0, 0); - ok(ret == EINVAL, "Expected _itoa_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - - memset(buffer, 'X', sizeof(buffer)); - errno = EBADF; - ret = p_itoa_s(0, buffer, 0, 0); - ok(ret == EINVAL, "Expected _itoa_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - ok(buffer[0] == 'X', "Expected the output buffer to be untouched\n"); - - memset(buffer, 'X', sizeof(buffer)); - errno = EBADF; - ret = p_itoa_s(0, buffer, sizeof(buffer), 0); - ok(ret == EINVAL, "Expected _itoa_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - ok(buffer[0] == '\0', "Expected the output buffer to be null terminated\n"); - - memset(buffer, 'X', sizeof(buffer)); - errno = EBADF; - ret = p_itoa_s(0, buffer, sizeof(buffer), 64); - ok(ret == EINVAL, "Expected _itoa_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - ok(buffer[0] == '\0', "Expected the output buffer to be null terminated\n"); - - memset(buffer, 'X', sizeof(buffer)); - errno = EBADF; - ret = p_itoa_s(12345678, buffer, 4, 10); - ok(ret == ERANGE, "Expected _itoa_s to return ERANGE, got %d\n", ret); - ok(errno == ERANGE, "Expected errno to be ERANGE, got %d\n", errno); - ok(!memcmp(buffer, "\000765", 4), - "Expected the output buffer to be null terminated with truncated output\n"); - - memset(buffer, 'X', sizeof(buffer)); - errno = EBADF; - ret = p_itoa_s(12345678, buffer, 8, 10); - ok(ret == ERANGE, "Expected _itoa_s to return ERANGE, got %d\n", ret); - ok(errno == ERANGE, "Expected errno to be ERANGE, got %d\n", errno); - ok(!memcmp(buffer, "\0007654321", 8), - "Expected the output buffer to be null terminated with truncated output\n"); - - memset(buffer, 'X', sizeof(buffer)); - errno = EBADF; - ret = p_itoa_s(-12345678, buffer, 9, 10); - ok(ret == ERANGE, "Expected _itoa_s to return ERANGE, got %d\n", ret); - ok(errno == ERANGE, "Expected errno to be ERANGE, got %d\n", errno); - ok(!memcmp(buffer, "\00087654321", 9), - "Expected the output buffer to be null terminated with truncated output\n"); - - ret = p_itoa_s(12345678, buffer, 9, 10); - ok(ret == 0, "Expected _itoa_s to return 0, got %d\n", ret); - ok(!strcmp(buffer, "12345678"), - "Expected output buffer string to be \"12345678\", got \"%s\"\n", - buffer); - - ret = p_itoa_s(43690, buffer, sizeof(buffer), 2); - ok(ret == 0, "Expected _itoa_s to return 0, got %d\n", ret); - ok(!strcmp(buffer, "1010101010101010"), - "Expected output buffer string to be \"1010101010101010\", got \"%s\"\n", - buffer); - - ret = p_itoa_s(1092009, buffer, sizeof(buffer), 36); - ok(ret == 0, "Expected _itoa_s to return 0, got %d\n", ret); - ok(!strcmp(buffer, "nell"), - "Expected output buffer string to be \"nell\", got \"%s\"\n", - buffer); - - ret = p_itoa_s(5704, buffer, sizeof(buffer), 18); - ok(ret == 0, "Expected _itoa_s to return 0, got %d\n", ret); - ok(!strcmp(buffer, "hag"), - "Expected output buffer string to be \"hag\", got \"%s\"\n", - buffer); - - ret = p_itoa_s(-12345678, buffer, sizeof(buffer), 10); - ok(ret == 0, "Expected _itoa_s to return 0, got %d\n", ret); - ok(!strcmp(buffer, "-12345678"), - "Expected output buffer string to be \"-12345678\", got \"%s\"\n", - buffer); - if (p_set_invalid_parameter_handler) - ok(p_set_invalid_parameter_handler(NULL) == test_invalid_parameter_handler, - "Cannot reset invalid parameter handler\n"); -} - -static void test__strlwr_s(void) -{ - errno_t ret; - char buffer[20]; - - if (!p_strlwr_s) - { - win_skip("Skipping _strlwr_s tests\n"); - return; - } - - errno = EBADF; - ret = p_strlwr_s(NULL, 0); - ok(ret == EINVAL, "Expected _strlwr_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - - errno = EBADF; - ret = p_strlwr_s(NULL, sizeof(buffer)); - ok(ret == EINVAL, "Expected _strlwr_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - - errno = EBADF; - ret = p_strlwr_s(buffer, 0); - ok(ret == EINVAL, "Expected _strlwr_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - - strcpy(buffer, "GoRrIsTeR"); - errno = EBADF; - ret = p_strlwr_s(buffer, 5); - ok(ret == EINVAL, "Expected _strlwr_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - ok(!memcmp(buffer, "\0oRrIsTeR", sizeof("\0oRrIsTeR")), - "Expected the output buffer to be \"gorrIsTeR\"\n"); - - strcpy(buffer, "GoRrIsTeR"); - errno = EBADF; - ret = p_strlwr_s(buffer, sizeof("GoRrIsTeR") - 1); - ok(ret == EINVAL, "Expected _strlwr_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - ok(!memcmp(buffer, "\0oRrIsTeR", sizeof("\0oRrIsTeR")), - "Expected the output buffer to be \"gorrIsTeR\"\n"); - - strcpy(buffer, "GoRrIsTeR"); - ret = p_strlwr_s(buffer, sizeof("GoRrIsTeR")); - ok(ret == 0, "Expected _strlwr_s to return 0, got %d\n", ret); - ok(!strcmp(buffer, "gorrister"), - "Expected the output buffer to be \"gorrister\", got \"%s\"\n", - buffer); - - memcpy(buffer, "GoRrIsTeR\0ELLEN", sizeof("GoRrIsTeR\0ELLEN")); - ret = p_strlwr_s(buffer, sizeof(buffer)); - ok(ret == 0, "Expected _strlwr_s to return 0, got %d\n", ret); - ok(!memcmp(buffer, "gorrister\0ELLEN", sizeof("gorrister\0ELLEN")), - "Expected the output buffer to be \"gorrister\\0ELLEN\", got \"%s\"\n", - buffer); -} - -static void test_wcsncat_s(void) -{ - static wchar_t abcW[] = {'a','b','c',0}; - int ret; - wchar_t dst[4]; - wchar_t src[4]; - - if (!p_wcsncat_s) - { - win_skip("skipping wcsncat_s tests\n"); - return; - } - - if (p_set_invalid_parameter_handler) - ok(p_set_invalid_parameter_handler(test_invalid_parameter_handler) == NULL, - "Invalid parameter handler was already set\n"); - - memcpy(src, abcW, sizeof(abcW)); - dst[0] = 0; - ret = p_wcsncat_s(NULL, 4, src, 4); - ok(ret == EINVAL, "err = %d\n", ret); - ret = p_wcsncat_s(dst, 0, src, 4); - ok(ret == EINVAL, "err = %d\n", ret); - ret = p_wcsncat_s(dst, 0, src, _TRUNCATE); - ok(ret == EINVAL, "err = %d\n", ret); - ret = p_wcsncat_s(dst, 4, NULL, 0); - ok(ret == 0, "err = %d\n", ret); - - dst[0] = 0; - ret = p_wcsncat_s(dst, 2, src, 4); - ok(ret == ERANGE, "err = %d\n", ret); - - dst[0] = 0; - ret = p_wcsncat_s(dst, 2, src, _TRUNCATE); - ok(ret == STRUNCATE, "err = %d\n", ret); - ok(dst[0] == 'a' && dst[1] == 0, "dst is %s\n", wine_dbgstr_w(dst)); - - memcpy(dst, abcW, sizeof(abcW)); - dst[3] = 'd'; - ret = p_wcsncat_s(dst, 4, src, 4); - ok(ret == EINVAL, "err = %d\n", ret); - - if (p_set_invalid_parameter_handler) - ok(p_set_invalid_parameter_handler(NULL) == test_invalid_parameter_handler, - "Cannot reset invalid parameter handler\n"); -} - -static void test__mbsnbcat_s(void) -{ - unsigned char dest[16]; - const unsigned char first[] = "dinosaur"; - const unsigned char second[] = "duck"; - int ret; - - if (!p_mbsnbcat_s) - { - win_skip("Skipping _mbsnbcat_s tests\n"); - return; - } - - /* Test invalid arguments. */ - ret = p_mbsnbcat_s(NULL, 0, NULL, 0); - ok(ret == 0, "Expected _mbsnbcat_s to return 0, got %d\n", ret); - - errno = EBADF; - ret = p_mbsnbcat_s(NULL, 10, NULL, 0); - ok(ret == EINVAL, "Expected _mbsnbcat_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - - errno = EBADF; - ret = p_mbsnbcat_s(NULL, 0, NULL, 10); - ok(ret == EINVAL, "Expected _mbsnbcat_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - - memset(dest, 'X', sizeof(dest)); - errno = EBADF; - ret = p_mbsnbcat_s(dest, 0, NULL, 0); - ok(ret == EINVAL, "Expected _mbsnbcat_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - ok(dest[0] == 'X', "Expected the output buffer to be untouched\n"); - - memset(dest, 'X', sizeof(dest)); - errno = EBADF; - ret = p_mbsnbcat_s(dest, 0, second, 0); - ok(ret == EINVAL, "Expected _mbsnbcat_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - ok(dest[0] == 'X', "Expected the output buffer to be untouched\n"); - - memset(dest, 'X', sizeof(dest)); - errno = EBADF; - ret = p_mbsnbcat_s(dest, sizeof(dest), NULL, 0); - ok(ret == EINVAL, "Expected _mbsnbcat_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - ok(dest[0] == '\0', "Expected the output buffer to be null terminated\n"); - - memset(dest, 'X', sizeof(dest)); - errno = EBADF; - ret = p_mbsnbcat_s(dest, sizeof(dest), NULL, 10); - ok(ret == EINVAL, "Expected _mbsnbcat_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - ok(dest[0] == '\0', "Expected the output buffer to be null terminated\n"); - - memset(dest, 'X', sizeof(dest)); - dest[0] = '\0'; - ret = p_mbsnbcat_s(dest, sizeof(dest), second, sizeof(second)); - ok(ret == 0, "Expected _mbsnbcat_s to return 0, got %d\n", ret); - ok(!memcmp(dest, second, sizeof(second)), - "Expected the output buffer string to be \"duck\"\n"); - - /* Test source truncation behavior. */ - memset(dest, 'X', sizeof(dest)); - memcpy(dest, first, sizeof(first)); - ret = p_mbsnbcat_s(dest, sizeof(dest), second, 0); - ok(ret == 0, "Expected _mbsnbcat_s to return 0, got %d\n", ret); - ok(!memcmp(dest, first, sizeof(first)), - "Expected the output buffer string to be \"dinosaur\"\n"); - - memset(dest, 'X', sizeof(dest)); - memcpy(dest, first, sizeof(first)); - ret = p_mbsnbcat_s(dest, sizeof(dest), second, sizeof(second)); - ok(ret == 0, "Expected _mbsnbcat_s to return 0, got %d\n", ret); - ok(!memcmp(dest, "dinosaurduck", sizeof("dinosaurduck")), - "Expected the output buffer string to be \"dinosaurduck\"\n"); - - memset(dest, 'X', sizeof(dest)); - memcpy(dest, first, sizeof(first)); - ret = p_mbsnbcat_s(dest, sizeof(dest), second, sizeof(second) + 1); - ok(ret == 0, "Expected _mbsnbcat_s to return 0, got %d\n", ret); - ok(!memcmp(dest, "dinosaurduck", sizeof("dinosaurduck")), - "Expected the output buffer string to be \"dinosaurduck\"\n"); - - memset(dest, 'X', sizeof(dest)); - memcpy(dest, first, sizeof(first)); - ret = p_mbsnbcat_s(dest, sizeof(dest), second, sizeof(second) - 1); - ok(ret == 0, "Expected _mbsnbcat_s to return 0, got %d\n", ret); - ok(!memcmp(dest, "dinosaurduck", sizeof("dinosaurduck")), - "Expected the output buffer string to be \"dinosaurduck\"\n"); - - memset(dest, 'X', sizeof(dest)); - memcpy(dest, first, sizeof(first)); - ret = p_mbsnbcat_s(dest, sizeof(dest), second, sizeof(second) - 2); - ok(ret == 0, "Expected _mbsnbcat_s to return 0, got %d\n", ret); - ok(!memcmp(dest, "dinosaurduc", sizeof("dinosaurduc")), - "Expected the output buffer string to be \"dinosaurduc\"\n"); - - /* Test destination truncation behavior. */ - memset(dest, 'X', sizeof(dest)); - memcpy(dest, first, sizeof(first)); - errno = EBADF; - ret = p_mbsnbcat_s(dest, sizeof(first) - 1, second, sizeof(second)); - ok(ret == EINVAL, "Expected _mbsnbcat_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - ok(!memcmp(dest, "\0inosaur", sizeof("\0inosaur") - 1), - "Expected the output buffer string to be \"\\0inosaur\" without ending null terminator\n"); - - memset(dest, 'X', sizeof(dest)); - memcpy(dest, first, sizeof(first)); - errno = EBADF; - ret = p_mbsnbcat_s(dest, sizeof(first), second, sizeof(second)); - ok(ret == ERANGE, "Expected _mbsnbcat_s to return ERANGE, got %d\n", ret); - ok(errno == ERANGE, "Expected errno to be ERANGE, got %d\n", errno); - ok(!memcmp(dest, "\0inosaurd", sizeof("\0inosaurd") - 1), - "Expected the output buffer string to be \"\\0inosaurd\" without ending null terminator\n"); - - memset(dest, 'X', sizeof(dest)); - memcpy(dest, first, sizeof(first)); - errno = EBADF; - ret = p_mbsnbcat_s(dest, sizeof(first) + 1, second, sizeof(second)); - ok(ret == ERANGE, "Expected _mbsnbcat_s to return ERANGE, got %d\n", ret); - ok(errno == ERANGE, "Expected errno to be ERANGE, got %d\n", errno); - ok(!memcmp(dest, "\0inosaurdu", sizeof("\0inosaurdu") - 1), - "Expected the output buffer string to be \"\\0inosaurdu\" without ending null terminator\n"); -} - -static void test__mbsupr_s(void) -{ - errno_t ret; - unsigned char buffer[20]; - - if (!p_mbsupr_s) - { - win_skip("Skipping _mbsupr_s tests\n"); - return; - } - - errno = EBADF; - ret = p_mbsupr_s(NULL, 0); - ok(ret == 0, "Expected _mbsupr_s to return 0, got %d\n", ret); - - errno = EBADF; - ret = p_mbsupr_s(NULL, sizeof(buffer)); - ok(ret == EINVAL, "Expected _mbsupr_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - - errno = EBADF; - ret = p_mbsupr_s(buffer, 0); - ok(ret == EINVAL, "Expected _mbsupr_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - - memcpy(buffer, "abcdefgh", sizeof("abcdefgh")); - errno = EBADF; - ret = p_mbsupr_s(buffer, sizeof("abcdefgh")); - ok(ret == 0, "Expected _mbsupr_s to return 0, got %d\n", ret); - ok(!memcmp(buffer, "ABCDEFGH", sizeof("ABCDEFGH")), - "Expected the output buffer to be \"ABCDEFGH\", got \"%s\"\n", - buffer); - - memcpy(buffer, "abcdefgh", sizeof("abcdefgh")); - errno = EBADF; - ret = p_mbsupr_s(buffer, sizeof(buffer)); - ok(ret == 0, "Expected _mbsupr_s to return 0, got %d\n", ret); - ok(!memcmp(buffer, "ABCDEFGH", sizeof("ABCDEFGH")), - "Expected the output buffer to be \"ABCDEFGH\", got \"%s\"\n", - buffer); - - memcpy(buffer, "abcdefgh", sizeof("abcdefgh")); - errno = EBADF; - ret = p_mbsupr_s(buffer, 4); - ok(ret == EINVAL, "Expected _mbsupr_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - - memcpy(buffer, "abcdefgh\0ijklmnop", sizeof("abcdefgh\0ijklmnop")); - errno = EBADF; - ret = p_mbsupr_s(buffer, sizeof(buffer)); - ok(ret == 0, "Expected _mbsupr_s to return 0, got %d\n", ret); - ok(!memcmp(buffer, "ABCDEFGH\0ijklmnop", sizeof("ABCDEFGH\0ijklmnop")), - "Expected the output buffer to be \"ABCDEFGH\\0ijklmnop\", got \"%s\"\n", - buffer); - -} - -static void test__mbslwr_s(void) -{ - errno_t ret; - unsigned char buffer[20]; - - if (!p_mbslwr_s) - { - win_skip("Skipping _mbslwr_s tests\n"); - return; - } - - errno = EBADF; - ret = p_mbslwr_s(NULL, 0); - ok(ret == 0, "Expected _mbslwr_s to return 0, got %d\n", ret); - - errno = EBADF; - ret = p_mbslwr_s(NULL, sizeof(buffer)); - ok(ret == EINVAL, "Expected _mbslwr_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - - errno = EBADF; - ret = p_mbslwr_s(buffer, 0); - ok(ret == EINVAL, "Expected _mbslwr_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - - memcpy(buffer, "ABCDEFGH", sizeof("ABCDEFGH")); - errno = EBADF; - ret = p_mbslwr_s(buffer, sizeof("ABCDEFGH")); - ok(ret == 0, "Expected _mbslwr_s to return 0, got %d\n", ret); - ok(!memcmp(buffer, "abcdefgh", sizeof("abcdefgh")), - "Expected the output buffer to be \"abcdefgh\", got \"%s\"\n", - buffer); - - memcpy(buffer, "ABCDEFGH", sizeof("ABCDEFGH")); - errno = EBADF; - ret = p_mbslwr_s(buffer, sizeof(buffer)); - ok(ret == 0, "Expected _mbslwr_s to return 0, got %d\n", ret); - ok(!memcmp(buffer, "abcdefgh", sizeof("abcdefgh")), - "Expected the output buffer to be \"abcdefgh\", got \"%s\"\n", - buffer); - - memcpy(buffer, "ABCDEFGH", sizeof("ABCDEFGH")); - errno = EBADF; - ret = p_mbslwr_s(buffer, 4); - ok(ret == EINVAL, "Expected _mbslwr_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - - memcpy(buffer, "ABCDEFGH\0IJKLMNOP", sizeof("ABCDEFGH\0IJKLMNOP")); - errno = EBADF; - ret = p_mbslwr_s(buffer, sizeof(buffer)); - ok(ret == 0, "Expected _mbslwr_s to return 0, got %d\n", ret); - ok(!memcmp(buffer, "abcdefgh\0IJKLMNOP", sizeof("abcdefgh\0IJKLMNOP")), - "Expected the output buffer to be \"abcdefgh\\0IJKLMNOP\", got \"%s\"\n", - buffer); -} - -static void test__ultoa_s(void) -{ - errno_t ret; - char buffer[33]; - - if (!p_ultoa_s) - { - win_skip("Skipping _ultoa_s tests\n"); - return; - } - - errno = EBADF; - ret = p_ultoa_s(0, NULL, 0, 0); - ok(ret == EINVAL, "Expected _ultoa_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - - memset(buffer, 'X', sizeof(buffer)); - errno = EBADF; - ret = p_ultoa_s(0, buffer, 0, 0); - ok(ret == EINVAL, "Expected _ultoa_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - ok(buffer[0] == 'X', "Expected the output buffer to be untouched\n"); - - memset(buffer, 'X', sizeof(buffer)); - errno = EBADF; - ret = p_ultoa_s(0, buffer, sizeof(buffer), 0); - ok(ret == EINVAL, "Expected _ultoa_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - ok(buffer[0] == '\0', "Expected the output buffer to be null terminated\n"); - - memset(buffer, 'X', sizeof(buffer)); - errno = EBADF; - ret = p_ultoa_s(0, buffer, sizeof(buffer), 64); - ok(ret == EINVAL, "Expected _ultoa_s to return EINVAL, got %d\n", ret); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - ok(buffer[0] == '\0', "Expected the output buffer to be null terminated\n"); - - memset(buffer, 'X', sizeof(buffer)); - errno = EBADF; - ret = p_ultoa_s(12345678, buffer, 4, 10); - ok(ret == ERANGE, "Expected _ultoa_s to return ERANGE, got %d\n", ret); - ok(errno == ERANGE, "Expected errno to be ERANGE, got %d\n", errno); - ok(!memcmp(buffer, "\000765", 4), - "Expected the output buffer to be null terminated with truncated output\n"); - - memset(buffer, 'X', sizeof(buffer)); - errno = EBADF; - ret = p_ultoa_s(12345678, buffer, 8, 10); - ok(ret == ERANGE, "Expected _ultoa_s to return ERANGE, got %d\n", ret); - ok(errno == ERANGE, "Expected errno to be ERANGE, got %d\n", errno); - ok(!memcmp(buffer, "\0007654321", 8), - "Expected the output buffer to be null terminated with truncated output\n"); - - ret = p_ultoa_s(12345678, buffer, 9, 10); - ok(ret == 0, "Expected _ultoa_s to return 0, got %d\n", ret); - ok(!strcmp(buffer, "12345678"), - "Expected output buffer string to be \"12345678\", got \"%s\"\n", - buffer); - - ret = p_ultoa_s(43690, buffer, sizeof(buffer), 2); - ok(ret == 0, "Expected _ultoa_s to return 0, got %d\n", ret); - ok(!strcmp(buffer, "1010101010101010"), - "Expected output buffer string to be \"1010101010101010\", got \"%s\"\n", - buffer); - - ret = p_ultoa_s(1092009, buffer, sizeof(buffer), 36); - ok(ret == 0, "Expected _ultoa_s to return 0, got %d\n", ret); - ok(!strcmp(buffer, "nell"), - "Expected output buffer string to be \"nell\", got \"%s\"\n", - buffer); - - ret = p_ultoa_s(5704, buffer, sizeof(buffer), 18); - ok(ret == 0, "Expected _ultoa_s to return 0, got %d\n", ret); - ok(!strcmp(buffer, "hag"), - "Expected output buffer string to be \"hag\", got \"%s\"\n", - buffer); -} - -static void test_wctob(void) -{ - int ret; - - if(!p_wctob || !setlocale(LC_ALL, "chinese-traditional")) { - win_skip("Skipping wctob tests\n"); - return; - } - - ret = p_wctob(0x8141); - ok(ret == EOF, "ret = %x\n", ret); - - ret = p_wctob(0x81); - ok(ret == EOF, "ret = %x\n", ret); - - ret = p_wctob(0xe0); - ok(ret == 0x61, "ret = %x\n", ret); - - _setmbcp(1250); - ret = p_wctob(0x81); - ok(ret == EOF, "ret = %x\n", ret); - - setlocale(LC_ALL, "C"); - ret = p_wctob(0x8141); - ok(ret == EOF, "ret = %x\n", ret); - - ret = p_wctob(0x81); - ok(ret == (int)(char)0x81, "ret = %x\n", ret); - - ret = p_wctob(0xe0); - ok(ret == (int)(char)0xe0, "ret = %x\n", ret); -} - -static void test_tolower(void) -{ - int ret; - - ret = p_tolower(0x41); - ok(ret == 0x61, "ret = %x\n", ret); - - ret = p_tolower(0xF4); - ok(ret == 0xF4, "ret = %x\n", ret); - - ret = p_tolower((char)0xF4); - ok(ret==0xF4/*Vista+*/ || ret==(char)0xF4, "ret = %x\n", ret); - - /* is it using different locale (CP_ACP) for negative values?? */ - /* current implementation matches msvcr90 behaviour */ - ret = p_tolower((char)0xD0); - todo_wine ok(ret==0xF0/*Vista+*/ || ret==(char)0xD0, "ret = %x\n", ret); - - ret = p_tolower(0xD0); - ok(ret == 0xD0, "ret = %x\n", ret); - - if(!setlocale(LC_ALL, "us")) { - win_skip("skipping tolower tests that depends on locale\n"); - return; - } - - ret = p_tolower((char)0xD0); - ok(ret == 0xF0, "ret = %x\n", ret); - - ret = p_tolower(0xD0); - ok(ret == 0xF0, "ret = %x\n", ret); - - setlocale(LC_ALL, "C"); -} - -START_TEST(string) -{ - char mem[100]; - static const char xilstring[]="c:/xilinx"; - int nLen; - - hMsvcrt = GetModuleHandleA("msvcrt.dll"); - if (!hMsvcrt) - hMsvcrt = GetModuleHandleA("msvcrtd.dll"); - ok(hMsvcrt != 0, "GetModuleHandleA failed\n"); - SET(pmemcpy,"memcpy"); - SET(pmemcmp,"memcmp"); - SET(p_mbctype,"_mbctype"); - SET(p__mb_cur_max,"__mb_cur_max"); - pstrcpy_s = (void *)GetProcAddress( hMsvcrt,"strcpy_s" ); - pstrcat_s = (void *)GetProcAddress( hMsvcrt,"strcat_s" ); - p_mbsnbcat_s = (void *)GetProcAddress( hMsvcrt,"_mbsnbcat_s" ); - p_mbsnbcpy_s = (void *)GetProcAddress( hMsvcrt,"_mbsnbcpy_s" ); - p_wcscpy_s = (void *)GetProcAddress( hMsvcrt,"wcscpy_s" ); - p_wcsncpy_s = (void *)GetProcAddress( hMsvcrt,"wcsncpy_s" ); - p_wcsncat_s = (void *)GetProcAddress( hMsvcrt,"wcsncat_s" ); - p_wcsupr_s = (void *)GetProcAddress( hMsvcrt,"_wcsupr_s" ); - p_strnlen = (void *)GetProcAddress( hMsvcrt,"strnlen" ); - p_strtoi64 = (void *)GetProcAddress(hMsvcrt, "_strtoi64"); - p_strtoui64 = (void *)GetProcAddress(hMsvcrt, "_strtoui64"); - pmbstowcs_s = (void *)GetProcAddress(hMsvcrt, "mbstowcs_s"); - pwcstombs_s = (void *)GetProcAddress(hMsvcrt, "wcstombs_s"); - pwcsrtombs = (void *)GetProcAddress(hMsvcrt, "wcsrtombs"); - p_gcvt_s = (void *)GetProcAddress(hMsvcrt, "_gcvt_s"); - p_itoa_s = (void *)GetProcAddress(hMsvcrt, "_itoa_s"); - p_strlwr_s = (void *)GetProcAddress(hMsvcrt, "_strlwr_s"); - p_ultoa_s = (void *)GetProcAddress(hMsvcrt, "_ultoa_s"); - p_set_invalid_parameter_handler = (void *) GetProcAddress(hMsvcrt, "_set_invalid_parameter_handler"); - p_wcslwr_s = (void*)GetProcAddress(hMsvcrt, "_wcslwr_s"); - p_mbsupr_s = (void*)GetProcAddress(hMsvcrt, "_mbsupr_s"); - p_mbslwr_s = (void*)GetProcAddress(hMsvcrt, "_mbslwr_s"); - p_wctob = (void*)GetProcAddress(hMsvcrt, "wctob"); - p_tolower = (void*)GetProcAddress(hMsvcrt, "tolower"); - - /* MSVCRT memcpy behaves like memmove for overlapping moves, - MFC42 CString::Insert seems to rely on that behaviour */ - strcpy(mem,xilstring); - nLen=strlen(xilstring); - pmemcpy(mem+5, mem,nLen+1); - ok(pmemcmp(mem+5,xilstring, nLen) == 0, - "Got result %s\n",mem+5); - - /* Test _swab function */ - test_swab(); - - /* Test ismbblead*/ - test_mbcp(); - /* test _mbsspn */ - test_mbsspn(); - test_mbsspnp(); - /* test _strdup */ - test_strdup(); - test_strcpy_s(); - test_strcat_s(); - test__mbsnbcpy_s(); - test_mbcjisjms(); - test_mbctombb(); - test_ismbclegal(); - test_strtok(); - test_wcscpy_s(); - test__wcsupr_s(); - test_strtol(); - test_strnlen(); - test__strtoi64(); - test__strtod(); - test_mbstowcs(); - test_gcvt(); - test__itoa_s(); - test__strlwr_s(); - test_wcsncat_s(); - test__mbsnbcat_s(); - test__ultoa_s(); - test__wcslwr_s(); - test__mbsupr_s(); - test__mbslwr_s(); - test_wctob(); - test_tolower(); -} diff --git a/rostests/winetests/msvcrt/testlist.c b/rostests/winetests/msvcrt/testlist.c deleted file mode 100644 index a4d020fe124..00000000000 --- a/rostests/winetests/msvcrt/testlist.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_cpp(void); -extern void func_data(void); -extern void func_dir(void); -extern void func_environ(void); -extern void func_file(void); -extern void func_headers(void); -extern void func_heap(void); -extern void func_locale(void); -extern void func_misc(void); -extern void func_printf(void); -extern void func_scanf(void); -extern void func_signal(void); -extern void func_string(void); -extern void func_time(void); - -const struct test winetest_testlist[] = -{ - { "cpp", func_cpp }, - { "data", func_data }, - { "dir", func_dir }, - { "environ", func_environ }, - { "file", func_file }, - { "headers", func_headers }, - { "heap", func_heap }, - { "locale", func_locale }, - { "misc", func_misc }, - { "printf", func_printf }, - { "scanf", func_scanf }, - { "signal", func_signal }, - { "string", func_string }, - { "time", func_time }, - { 0, 0 } -}; diff --git a/rostests/winetests/msvcrt/time.c b/rostests/winetests/msvcrt/time.c deleted file mode 100644 index 950042c2899..00000000000 --- a/rostests/winetests/msvcrt/time.c +++ /dev/null @@ -1,586 +0,0 @@ -/* - * Unit test suite for time functions. - * - * Copyright 2004 Uwe Bonnes - * - * 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/test.h" -#include "winbase.h" -#include "winnls.h" -#include "time.h" - -#include /*setenv*/ -#include /*printf*/ -#include - -#define _MAX__TIME64_T (((__time64_t)0x00000007 << 32) | 0x93406FFF) - -#define SECSPERDAY 86400 -#define SECSPERHOUR 3600 -#define SECSPERMIN 60 -#define MINSPERHOUR 60 -#define HOURSPERDAY 24 - -static __time32_t (__cdecl *p_mkgmtime32)(struct tm*); -static struct tm* (__cdecl *p_gmtime32)(__time32_t*); -static errno_t (__cdecl *p_gmtime32_s)(struct tm*, __time32_t*); -static errno_t (__cdecl *p_strtime_s)(char*,size_t); -static errno_t (__cdecl *p_strdate_s)(char*,size_t); -static errno_t (__cdecl *p_localtime32_s)(struct tm*, __time32_t*); -static errno_t (__cdecl *p_localtime64_s)(struct tm*, __time64_t*); -static int* (__cdecl *p__daylight)(void); -static int* (__cdecl *p___p__daylight)(void); - -static void init(void) -{ - HMODULE hmod = GetModuleHandleA("msvcrt.dll"); - - p_gmtime32 = (void*)GetProcAddress(hmod, "_gmtime32"); - p_gmtime32_s = (void*)GetProcAddress(hmod, "_gmtime32_s"); - p_mkgmtime32 = (void*)GetProcAddress(hmod, "_mkgmtime32"); - p_strtime_s = (void*)GetProcAddress(hmod, "_strtime_s"); - p_strdate_s = (void*)GetProcAddress(hmod, "_strdate_s"); - p_localtime32_s = (void*)GetProcAddress(hmod, "_localtime32_s"); - p_localtime64_s = (void*)GetProcAddress(hmod, "_localtime64_s"); - p__daylight = (void*)GetProcAddress(hmod, "__daylight"); - p___p__daylight = (void*)GetProcAddress(hmod, "__p__daylight"); -} - -static int get_test_year(time_t *start) -{ - time_t now = time(NULL); - struct tm *tm = localtime(&now); - - /* compute start of year in seconds */ - *start = SECSPERDAY * ((tm->tm_year - 70) * 365 + - (tm->tm_year - 69) / 4 - - (tm->tm_year - 1) / 100 + - (tm->tm_year + 299) / 400); - return tm->tm_year; -} - -static void test_ctime(void) -{ - time_t badtime = -1; - char* ret; - ret = ctime(&badtime); - ok(ret == NULL, "expected ctime to return NULL, got %s\n", ret); -} -static void test_gmtime(void) -{ - __time32_t valid, gmt; - struct tm* gmt_tm, gmt_tm_s; - errno_t err; - - if(!p_gmtime32) { - win_skip("Skipping _gmtime32 tests\n"); - return; - } - - gmt_tm = p_gmtime32(NULL); - ok(gmt_tm == NULL, "gmt_tm != NULL\n"); - - gmt = -1; - gmt_tm = p_gmtime32(&gmt); - ok(gmt_tm == NULL, "gmt_tm != NULL\n"); - - gmt = valid = 0; - gmt_tm = p_gmtime32(&gmt); - if(!gmt_tm) { - ok(0, "_gmtime32() failed\n"); - return; - } - - ok(((gmt_tm->tm_year == 70) && (gmt_tm->tm_mon == 0) && (gmt_tm->tm_yday == 0) && - (gmt_tm->tm_mday == 1) && (gmt_tm->tm_wday == 4) && (gmt_tm->tm_hour == 0) && - (gmt_tm->tm_min == 0) && (gmt_tm->tm_sec == 0) && (gmt_tm->tm_isdst == 0)), - "Wrong date:Year %4d mon %2d yday %3d mday %2d wday %1d hour%2d min %2d sec %2d dst %2d\n", - gmt_tm->tm_year, gmt_tm->tm_mon, gmt_tm->tm_yday, gmt_tm->tm_mday, gmt_tm->tm_wday, - gmt_tm->tm_hour, gmt_tm->tm_min, gmt_tm->tm_sec, gmt_tm->tm_isdst); - - if(!p_mkgmtime32) { - win_skip("Skipping _mkgmtime32 tests\n"); - return; - } - - gmt_tm->tm_wday = gmt_tm->tm_yday = 0; - gmt = p_mkgmtime32(gmt_tm); - ok(gmt == valid, "gmt = %u\n", gmt); - ok(gmt_tm->tm_wday == 4, "gmt_tm->tm_wday = %d\n", gmt_tm->tm_wday); - ok(gmt_tm->tm_yday == 0, "gmt_tm->tm_yday = %d\n", gmt_tm->tm_yday); - - gmt_tm->tm_wday = gmt_tm->tm_yday = 0; - gmt_tm->tm_isdst = -1; - gmt = p_mkgmtime32(gmt_tm); - ok(gmt == valid, "gmt = %u\n", gmt); - ok(gmt_tm->tm_wday == 4, "gmt_tm->tm_wday = %d\n", gmt_tm->tm_wday); - ok(gmt_tm->tm_yday == 0, "gmt_tm->tm_yday = %d\n", gmt_tm->tm_yday); - - gmt_tm->tm_wday = gmt_tm->tm_yday = 0; - gmt_tm->tm_isdst = 1; - gmt = p_mkgmtime32(gmt_tm); - ok(gmt == valid, "gmt = %u\n", gmt); - ok(gmt_tm->tm_wday == 4, "gmt_tm->tm_wday = %d\n", gmt_tm->tm_wday); - ok(gmt_tm->tm_yday == 0, "gmt_tm->tm_yday = %d\n", gmt_tm->tm_yday); - - gmt = valid = 173921; - gmt_tm = p_gmtime32(&gmt); - if(!gmt_tm) { - ok(0, "_gmtime32() failed\n"); - return; - } - - gmt_tm->tm_isdst = -1; - gmt = p_mkgmtime32(gmt_tm); - ok(gmt == valid, "gmt = %u\n", gmt); - ok(gmt_tm->tm_wday == 6, "gmt_tm->tm_wday = %d\n", gmt_tm->tm_wday); - ok(gmt_tm->tm_yday == 2, "gmt_tm->tm_yday = %d\n", gmt_tm->tm_yday); - - gmt_tm->tm_isdst = 1; - gmt = p_mkgmtime32(gmt_tm); - ok(gmt == valid, "gmt = %u\n", gmt); - - if(!p_gmtime32_s) { - win_skip("Skipping _gmtime32_s tests\n"); - return; - } - - errno = 0; - gmt = 0; - err = p_gmtime32_s(NULL, &gmt); - ok(err == EINVAL, "err = %d\n", err); - ok(errno == EINVAL, "errno = %d\n", errno); - - errno = 0; - gmt = -1; - err = p_gmtime32_s(&gmt_tm_s, &gmt); - ok(err == EINVAL, "err = %d\n", err); - ok(errno == EINVAL, "errno = %d\n", errno); - ok(gmt_tm_s.tm_year == -1, "tm_year = %d\n", gmt_tm_s.tm_year); -} - -static void test_mktime(void) -{ - TIME_ZONE_INFORMATION tzinfo; - DWORD res = GetTimeZoneInformation(&tzinfo); - struct tm my_tm, sav_tm; - time_t nulltime, local_time; - char TZ_env[256]; - char buffer[64]; - int year; - time_t ref, secs; - - year = get_test_year( &ref ); - ref += SECSPERDAY; - - ok (res != TIME_ZONE_ID_INVALID, "GetTimeZoneInformation failed\n"); - WideCharToMultiByte( CP_ACP, 0, tzinfo.StandardName, -1, buffer, sizeof(buffer), NULL, NULL ); - trace( "bias %d std %d dst %d zone %s\n", - tzinfo.Bias, tzinfo.StandardBias, tzinfo.DaylightBias, buffer ); - /* Bias may be positive or negative, to use offset of one day */ - my_tm = *localtime(&ref); /* retrieve current dst flag */ - secs = SECSPERDAY - tzinfo.Bias * SECSPERMIN; - secs -= (my_tm.tm_isdst ? tzinfo.DaylightBias : tzinfo.StandardBias) * SECSPERMIN; - my_tm.tm_mday = 1 + secs/SECSPERDAY; - secs = secs % SECSPERDAY; - my_tm.tm_hour = secs / SECSPERHOUR; - secs = secs % SECSPERHOUR; - my_tm.tm_min = secs / SECSPERMIN; - secs = secs % SECSPERMIN; - my_tm.tm_sec = secs; - - my_tm.tm_year = year; - my_tm.tm_mon = 0; - - sav_tm = my_tm; - - local_time = mktime(&my_tm); - ok(local_time == ref, "mktime returned %u, expected %u\n", - (DWORD)local_time, (DWORD)ref); - /* now test some unnormalized struct tm's */ - my_tm = sav_tm; - my_tm.tm_sec += 60; - my_tm.tm_min -= 1; - local_time = mktime(&my_tm); - ok(local_time == ref, "Unnormalized mktime returned %u, expected %u\n", - (DWORD)local_time, (DWORD)ref); - ok( my_tm.tm_year == sav_tm.tm_year && my_tm.tm_mon == sav_tm.tm_mon && - my_tm.tm_mday == sav_tm.tm_mday && my_tm.tm_hour == sav_tm.tm_hour && - my_tm.tm_sec == sav_tm.tm_sec, - "mktime returned %2d-%02d-%02d %02d:%02d expected %2d-%02d-%02d %02d:%02d\n", - my_tm.tm_year,my_tm.tm_mon,my_tm.tm_mday, - my_tm.tm_hour,my_tm.tm_sec, - sav_tm.tm_year,sav_tm.tm_mon,sav_tm.tm_mday, - sav_tm.tm_hour,sav_tm.tm_sec); - my_tm = sav_tm; - my_tm.tm_min -= 60; - my_tm.tm_hour += 1; - local_time = mktime(&my_tm); - ok(local_time == ref, "Unnormalized mktime returned %u, expected %u\n", - (DWORD)local_time, (DWORD)ref); - ok( my_tm.tm_year == sav_tm.tm_year && my_tm.tm_mon == sav_tm.tm_mon && - my_tm.tm_mday == sav_tm.tm_mday && my_tm.tm_hour == sav_tm.tm_hour && - my_tm.tm_sec == sav_tm.tm_sec, - "mktime returned %2d-%02d-%02d %02d:%02d expected %2d-%02d-%02d %02d:%02d\n", - my_tm.tm_year,my_tm.tm_mon,my_tm.tm_mday, - my_tm.tm_hour,my_tm.tm_sec, - sav_tm.tm_year,sav_tm.tm_mon,sav_tm.tm_mday, - sav_tm.tm_hour,sav_tm.tm_sec); - my_tm = sav_tm; - my_tm.tm_mon -= 12; - my_tm.tm_year += 1; - local_time = mktime(&my_tm); - ok(local_time == ref, "Unnormalized mktime returned %u, expected %u\n", - (DWORD)local_time, (DWORD)ref); - ok( my_tm.tm_year == sav_tm.tm_year && my_tm.tm_mon == sav_tm.tm_mon && - my_tm.tm_mday == sav_tm.tm_mday && my_tm.tm_hour == sav_tm.tm_hour && - my_tm.tm_sec == sav_tm.tm_sec, - "mktime returned %2d-%02d-%02d %02d:%02d expected %2d-%02d-%02d %02d:%02d\n", - my_tm.tm_year,my_tm.tm_mon,my_tm.tm_mday, - my_tm.tm_hour,my_tm.tm_sec, - sav_tm.tm_year,sav_tm.tm_mon,sav_tm.tm_mday, - sav_tm.tm_hour,sav_tm.tm_sec); - my_tm = sav_tm; - my_tm.tm_mon += 12; - my_tm.tm_year -= 1; - local_time = mktime(&my_tm); - ok(local_time == ref, "Unnormalized mktime returned %u, expected %u\n", - (DWORD)local_time, (DWORD)ref); - ok( my_tm.tm_year == sav_tm.tm_year && my_tm.tm_mon == sav_tm.tm_mon && - my_tm.tm_mday == sav_tm.tm_mday && my_tm.tm_hour == sav_tm.tm_hour && - my_tm.tm_sec == sav_tm.tm_sec, - "mktime returned %2d-%02d-%02d %02d:%02d expected %2d-%02d-%02d %02d:%02d\n", - my_tm.tm_year,my_tm.tm_mon,my_tm.tm_mday, - my_tm.tm_hour,my_tm.tm_sec, - sav_tm.tm_year,sav_tm.tm_mon,sav_tm.tm_mday, - sav_tm.tm_hour,sav_tm.tm_sec); - /* now a bad time example */ - my_tm = sav_tm; - my_tm.tm_year = 69; - local_time = mktime(&my_tm); - ok((local_time == -1), "(bad time) mktime returned %d, expected -1\n", (int)local_time); - - my_tm = sav_tm; - /* TEST that we are independent from the TZ variable */ - /*Argh, msvcrt doesn't have setenv() */ - _snprintf(TZ_env,255,"TZ=%s",(getenv("TZ")?getenv("TZ"):"")); - putenv("TZ=GMT"); - nulltime = mktime(&my_tm); - ok(nulltime == ref,"mktime returned 0x%08x\n",(DWORD)nulltime); - putenv(TZ_env); -} - -static void test_localtime(void) -{ - TIME_ZONE_INFORMATION tzinfo; - DWORD res = GetTimeZoneInformation(&tzinfo); - time_t gmt, ref; - - char TZ_env[256]; - struct tm* lt; - int year = get_test_year( &ref ); - int is_leap = !(year % 4) && ((year % 100) || !((year + 300) % 400)); - - gmt = ref + SECSPERDAY + tzinfo.Bias * SECSPERMIN; - ok (res != TIME_ZONE_ID_INVALID, "GetTimeZoneInformation failed\n"); - lt = localtime(&gmt); - gmt += (lt->tm_isdst ? tzinfo.DaylightBias : tzinfo.StandardBias) * SECSPERMIN; - lt = localtime(&gmt); - ok(((lt->tm_year == year) && (lt->tm_mon == 0) && (lt->tm_yday == 1) && - (lt->tm_mday == 2) && (lt->tm_hour == 0) && - (lt->tm_min == 0) && (lt->tm_sec == 0)), - "Wrong date:Year %d mon %d yday %d mday %d wday %d hour %d min %d sec %d dst %d\n", - lt->tm_year, lt->tm_mon, lt->tm_yday, lt->tm_mday, lt->tm_wday, lt->tm_hour, - lt->tm_min, lt->tm_sec, lt->tm_isdst); - - _snprintf(TZ_env,255,"TZ=%s",(getenv("TZ")?getenv("TZ"):"")); - putenv("TZ=GMT"); - lt = localtime(&gmt); - ok(((lt->tm_year == year) && (lt->tm_mon == 0) && (lt->tm_yday == 1) && - (lt->tm_mday == 2) && (lt->tm_hour == 0) && - (lt->tm_min == 0) && (lt->tm_sec == 0)), - "Wrong date:Year %d mon %d yday %d mday %d wday %d hour %d min %d sec %d dst %d\n", - lt->tm_year, lt->tm_mon, lt->tm_yday, lt->tm_mday, lt->tm_wday, lt->tm_hour, - lt->tm_min, lt->tm_sec, lt->tm_isdst); - putenv(TZ_env); - - /* June 22 */ - gmt = ref + 202 * SECSPERDAY + tzinfo.Bias * SECSPERMIN; - lt = localtime(&gmt); - gmt += (lt->tm_isdst ? tzinfo.DaylightBias : tzinfo.StandardBias) * SECSPERMIN; - lt = localtime(&gmt); - ok(((lt->tm_year == year) && (lt->tm_mon == 6) && (lt->tm_yday == 202) && - (lt->tm_mday == 22 - is_leap) && (lt->tm_hour == 0) && - (lt->tm_min == 0) && (lt->tm_sec == 0)), - "Wrong date:Year %d mon %d yday %d mday %d wday %d hour %d min %d sec %d dst %d\n", - lt->tm_year, lt->tm_mon, lt->tm_yday, lt->tm_mday, lt->tm_wday, lt->tm_hour, - lt->tm_min, lt->tm_sec, lt->tm_isdst); -} - -static void test_strdate(void) -{ - char date[16], * result; - int month, day, year, count, len; - errno_t err; - - result = _strdate(date); - ok(result == date, "Wrong return value\n"); - len = strlen(date); - ok(len == 8, "Wrong length: returned %d, should be 8\n", len); - count = sscanf(date, "%02d/%02d/%02d", &month, &day, &year); - ok(count == 3, "Wrong format: count = %d, should be 3\n", count); - - if(!p_strdate_s) { - win_skip("Skipping _strdate_s tests\n"); - return; - } - - errno = 0; - err = p_strdate_s(NULL, 1); - ok(err == EINVAL, "err = %d\n", err); - ok(errno == EINVAL, "errno = %d\n", errno); - - date[0] = 'x'; - date[1] = 'x'; - err = p_strdate_s(date, 8); - ok(err == ERANGE, "err = %d\n", err); - ok(errno == ERANGE, "errno = %d\n", errno); - ok(date[0] == '\0', "date[0] != '\\0'\n"); - ok(date[1] == 'x', "date[1] != 'x'\n"); - - err = p_strdate_s(date, 9); - ok(err == 0, "err = %x\n", err); -} - -static void test_strtime(void) -{ - char time[16], * result; - int hour, minute, second, count, len; - errno_t err; - - result = _strtime(time); - ok(result == time, "Wrong return value\n"); - len = strlen(time); - ok(len == 8, "Wrong length: returned %d, should be 8\n", len); - count = sscanf(time, "%02d:%02d:%02d", &hour, &minute, &second); - ok(count == 3, "Wrong format: count = %d, should be 3\n", count); - - if(!p_strtime_s) { - win_skip("Skipping _strtime_s tests\n"); - return; - } - - errno = 0; - err = p_strtime_s(NULL, 0); - ok(err == EINVAL, "err = %d\n", err); - ok(errno == EINVAL, "errno = %d\n", errno); - - err = p_strtime_s(NULL, 1); - ok(err == EINVAL, "err = %d\n", err); - ok(errno == EINVAL, "errno = %d\n", errno); - - time[0] = 'x'; - err = p_strtime_s(time, 8); - ok(err == ERANGE, "err = %d\n", err); - ok(errno == ERANGE, "errno = %d\n", errno); - ok(time[0] == '\0', "time[0] != '\\0'\n"); - - err = p_strtime_s(time, 9); - ok(err == 0, "err = %x\n", err); -} - -static void test_wstrdate(void) -{ - wchar_t date[16], * result; - int month, day, year, count, len; - wchar_t format[] = { '%','0','2','d','/','%','0','2','d','/','%','0','2','d',0 }; - - result = _wstrdate(date); - ok(result == date, "Wrong return value\n"); - len = wcslen(date); - ok(len == 8, "Wrong length: returned %d, should be 8\n", len); - count = swscanf(date, format, &month, &day, &year); - ok(count == 3, "Wrong format: count = %d, should be 3\n", count); -} - -static void test_wstrtime(void) -{ - wchar_t time[16], * result; - int hour, minute, second, count, len; - wchar_t format[] = { '%','0','2','d',':','%','0','2','d',':','%','0','2','d',0 }; - - result = _wstrtime(time); - ok(result == time, "Wrong return value\n"); - len = wcslen(time); - ok(len == 8, "Wrong length: returned %d, should be 8\n", len); - count = swscanf(time, format, &hour, &minute, &second); - ok(count == 3, "Wrong format: count = %d, should be 3\n", count); -} - -static void test_localtime32_s(void) -{ - struct tm tm; - __time32_t time; - errno_t err; - - if (!p_localtime32_s) - { - win_skip("Skipping _localtime32_s tests\n"); - return; - } - - errno = EBADF; - err = p_localtime32_s(NULL, NULL); - ok(err == EINVAL, "Expected _localtime32_s to return EINVAL, got %d\n", err); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - - errno = EBADF; - time = 0x12345678; - err = p_localtime32_s(NULL, &time); - ok(err == EINVAL, "Expected _localtime32_s to return EINVAL, got %d\n", err); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - - memset(&tm, 0, sizeof(tm)); - errno = EBADF; - err = p_localtime32_s(&tm, NULL); - ok(err == EINVAL, "Expected _localtime32_s to return EINVAL, got %d\n", err); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - ok(tm.tm_sec == -1 && tm.tm_min == -1 && tm.tm_hour == -1 && - tm.tm_mday == -1 && tm.tm_mon == -1 && tm.tm_year == -1 && - tm.tm_wday == -1 && tm.tm_yday == -1 && tm.tm_isdst == -1, - "Expected tm structure members to be initialized to -1, got " - "(%d, %d, %d, %d, %d, %d, %d, %d, %d)\n", tm.tm_sec, tm.tm_min, - tm.tm_hour, tm.tm_mday, tm.tm_mon, tm.tm_year, tm.tm_wday, tm.tm_yday, - tm.tm_isdst); - - memset(&tm, 0, sizeof(tm)); - time = -1; - errno = EBADF; - err = p_localtime32_s(&tm, &time); - ok(err == EINVAL, "Expected _localtime32_s to return EINVAL, got %d\n", err); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - ok(tm.tm_sec == -1 && tm.tm_min == -1 && tm.tm_hour == -1 && - tm.tm_mday == -1 && tm.tm_mon == -1 && tm.tm_year == -1 && - tm.tm_wday == -1 && tm.tm_yday == -1 && tm.tm_isdst == -1, - "Expected tm structure members to be initialized to -1, got " - "(%d, %d, %d, %d, %d, %d, %d, %d, %d)\n", tm.tm_sec, tm.tm_min, - tm.tm_hour, tm.tm_mday, tm.tm_mon, tm.tm_year, tm.tm_wday, tm.tm_yday, - tm.tm_isdst); -} - -static void test_localtime64_s(void) -{ - struct tm tm; - __time64_t time; - errno_t err; - - if (!p_localtime64_s) - { - win_skip("Skipping _localtime64_s tests\n"); - return; - } - - errno = EBADF; - err = p_localtime64_s(NULL, NULL); - ok(err == EINVAL, "Expected _localtime64_s to return EINVAL, got %d\n", err); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - - errno = EBADF; - time = 0xdeadbeef; - err = p_localtime64_s(NULL, &time); - ok(err == EINVAL, "Expected _localtime64_s to return EINVAL, got %d\n", err); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - - memset(&tm, 0, sizeof(tm)); - errno = EBADF; - err = p_localtime64_s(&tm, NULL); - ok(err == EINVAL, "Expected _localtime64_s to return EINVAL, got %d\n", err); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - ok(tm.tm_sec == -1 && tm.tm_min == -1 && tm.tm_hour == -1 && - tm.tm_mday == -1 && tm.tm_mon == -1 && tm.tm_year == -1 && - tm.tm_wday == -1 && tm.tm_yday == -1 && tm.tm_isdst == -1, - "Expected tm structure members to be initialized to -1, got " - "(%d, %d, %d, %d, %d, %d, %d, %d, %d)\n", tm.tm_sec, tm.tm_min, - tm.tm_hour, tm.tm_mday, tm.tm_mon, tm.tm_year, tm.tm_wday, tm.tm_yday, - tm.tm_isdst); - - memset(&tm, 0, sizeof(tm)); - time = -1; - errno = EBADF; - err = p_localtime64_s(&tm, &time); - ok(err == EINVAL, "Expected _localtime64_s to return EINVAL, got %d\n", err); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - ok(tm.tm_sec == -1 && tm.tm_min == -1 && tm.tm_hour == -1 && - tm.tm_mday == -1 && tm.tm_mon == -1 && tm.tm_year == -1 && - tm.tm_wday == -1 && tm.tm_yday == -1 && tm.tm_isdst == -1, - "Expected tm structure members to be initialized to -1, got " - "(%d, %d, %d, %d, %d, %d, %d, %d, %d)\n", tm.tm_sec, tm.tm_min, - tm.tm_hour, tm.tm_mday, tm.tm_mon, tm.tm_year, tm.tm_wday, tm.tm_yday, - tm.tm_isdst); - - memset(&tm, 0, sizeof(tm)); - time = _MAX__TIME64_T + 1; - errno = EBADF; - err = p_localtime64_s(&tm, &time); - ok(err == EINVAL, "Expected _localtime64_s to return EINVAL, got %d\n", err); - ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno); - ok(tm.tm_sec == -1 && tm.tm_min == -1 && tm.tm_hour == -1 && - tm.tm_mday == -1 && tm.tm_mon == -1 && tm.tm_year == -1 && - tm.tm_wday == -1 && tm.tm_yday == -1 && tm.tm_isdst == -1, - "Expected tm structure members to be initialized to -1, got " - "(%d, %d, %d, %d, %d, %d, %d, %d, %d)\n", tm.tm_sec, tm.tm_min, - tm.tm_hour, tm.tm_mday, tm.tm_mon, tm.tm_year, tm.tm_wday, tm.tm_yday, - tm.tm_isdst); -} - -static void test_daylight(void) -{ - int *ret1, *ret2; - - if (!p__daylight) - { - win_skip("__daylight() not available\n"); - return; - } - - if (!p___p__daylight) - { - win_skip("__p__daylight not available\n"); - return; - } - - ret1 = p__daylight(); - ret2 = p___p__daylight(); - ok(ret1 && ret1 == ret2, "got %p\n", ret1); -} - -START_TEST(time) -{ - init(); - - test_ctime(); - test_gmtime(); - test_mktime(); - test_localtime(); - test_strdate(); - test_strtime(); - test_wstrdate(); - test_wstrtime(); - test_localtime32_s(); - test_localtime64_s(); - test_daylight(); -} diff --git a/rostests/winetests/msvcrtd/CMakeLists.txt b/rostests/winetests/msvcrtd/CMakeLists.txt deleted file mode 100644 index b656065e677..00000000000 --- a/rostests/winetests/msvcrtd/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(msvcrtd_winetest debug.c testlist.c) -target_link_libraries(msvcrtd_winetest wine) -set_module_type(msvcrtd_winetest win32cui) -add_importlibs(msvcrtd_winetest msvcrt kernel32 ntdll) -add_cd_file(TARGET msvcrtd_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/msvcrtd/debug.c b/rostests/winetests/msvcrtd/debug.c deleted file mode 100644 index 40fceac05cd..00000000000 --- a/rostests/winetests/msvcrtd/debug.c +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Unit test suite for debug functions. - * - * Copyright 2004 Patrik Stridvall - * - * 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 "windef.h" -#include "winbase.h" -#include "winnt.h" - -#include "crtdbg.h" - -#include "wine/test.h" - -/**********************************************************************/ - -static void * (__cdecl *pMSVCRTD_operator_new_dbg)(size_t, int, const char *, int) = NULL; - -/* Some exports are only available in later versions */ -#define SETNOFAIL(x,y) x = (void*)GetProcAddress(hModule,y) -#define SET(x,y) SETNOFAIL(x,y); ok(x != NULL, "Export '%s' not found\n", y) - -static int init_functions(void) -{ - HMODULE hModule = LoadLibraryA("msvcrtd.dll"); - - if (!hModule) { - trace("LoadLibraryA failed to load msvcrtd.dll with GLE=%d\n", GetLastError()); - return FALSE; - } - - SET(pMSVCRTD_operator_new_dbg, "??2@YAPAXIHPBDH@Z"); - if (pMSVCRTD_operator_new_dbg == NULL) - return FALSE; - - return TRUE; -} - -/**********************************************************************/ - -static void test_new(void) -{ - void *mem; - - mem = pMSVCRTD_operator_new_dbg(42, _NORMAL_BLOCK, __FILE__, __LINE__); - ok(mem != NULL, "memory not allocated\n"); - HeapFree(GetProcessHeap(), 0, mem); -} - -/**********************************************************************/ - -START_TEST(debug) -{ - if (!init_functions()) - return; - - test_new(); -} diff --git a/rostests/winetests/msvcrtd/msvcrtd.rbuild b/rostests/winetests/msvcrtd/msvcrtd.rbuild deleted file mode 100644 index 3c77e151cbc..00000000000 --- a/rostests/winetests/msvcrtd/msvcrtd.rbuild +++ /dev/null @@ -1,8 +0,0 @@ - - . - - debug.c - testlist.c - wine - ntdll - diff --git a/rostests/winetests/msvcrtd/testlist.c b/rostests/winetests/msvcrtd/testlist.c deleted file mode 100644 index e17c0185376..00000000000 --- a/rostests/winetests/msvcrtd/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_debug(void); - -const struct test winetest_testlist[] = -{ - { "debug", func_debug }, - { 0, 0 } -}; diff --git a/rostests/winetests/msvfw32/CMakeLists.txt b/rostests/winetests/msvfw32/CMakeLists.txt deleted file mode 100644 index db1b17f8a1c..00000000000 --- a/rostests/winetests/msvfw32/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(msvfw32_winetest msvfw.c testlist.c) -target_link_libraries(msvfw32_winetest wine) -set_module_type(msvfw32_winetest win32cui) -add_importlibs(msvfw32_winetest msvfw32 msvcrt kernel32 ntdll) -add_cd_file(TARGET msvfw32_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/msvfw32/msvfw.c b/rostests/winetests/msvfw32/msvfw.c deleted file mode 100644 index b0d820815a1..00000000000 --- a/rostests/winetests/msvfw32/msvfw.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Unit tests for video playback - * - * Copyright 2008 Jörg Höhle - * Copyright 2008 Austin English - * - * 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 WIN32_LEAN_AND_MEAN -#include -#include - -#include "wine/test.h" - -static void test_OpenCase(void) -{ - HIC h; - /* Open a compressor with combinations of lowercase - * and uppercase compressortype and handler. - */ - h = ICOpen(mmioFOURCC('v','i','d','c'),mmioFOURCC('m','s','v','c'),ICMODE_DECOMPRESS); - ok(0!=h,"ICOpen(vidc.msvc) failed\n"); - if (h) { - ok(ICClose(h)==ICERR_OK,"ICClose failed\n"); - } - h = ICOpen(mmioFOURCC('v','i','d','c'),mmioFOURCC('M','S','V','C'),ICMODE_DECOMPRESS); - ok(0!=h,"ICOpen(vidc.MSVC) failed\n"); - if (h) { - ok(ICClose(h)==ICERR_OK,"ICClose failed\n"); - } - h = ICOpen(mmioFOURCC('V','I','D','C'),mmioFOURCC('m','s','v','c'),ICMODE_DECOMPRESS); - ok(0!=h,"ICOpen(VIDC.msvc) failed\n"); - if (h) { - ok(ICClose(h)==ICERR_OK,"ICClose failed\n"); - } - h = ICOpen(mmioFOURCC('V','I','D','C'),mmioFOURCC('M','S','V','C'),ICMODE_DECOMPRESS); - ok(0!=h,"ICOpen(VIDC.MSVC) failed\n"); - if (h) { - ok(ICClose(h)==ICERR_OK,"ICClose failed\n"); - } - h = ICOpen(mmioFOURCC('v','i','d','c'),mmioFOURCC('m','S','v','C'),ICMODE_DECOMPRESS); - ok(0!=h,"ICOpen(vidc.mSvC) failed\n"); - if (h) { - ok(ICClose(h)==ICERR_OK,"ICClose failed\n"); - } - h = ICOpen(mmioFOURCC('v','I','d','C'),mmioFOURCC('m','s','v','c'),ICMODE_DECOMPRESS); - ok(0!=h,"ICOpen(vIdC.msvc) failed\n"); - if (h) { - ok(ICClose(h)==ICERR_OK,"ICClose failed\n"); - } -} - -START_TEST(msvfw) -{ - test_OpenCase(); -} diff --git a/rostests/winetests/msvfw32/msvfw32.rbuild b/rostests/winetests/msvfw32/msvfw32.rbuild deleted file mode 100644 index 2328b4f5b33..00000000000 --- a/rostests/winetests/msvfw32/msvfw32.rbuild +++ /dev/null @@ -1,9 +0,0 @@ - - . - - msvfw.c - testlist.c - wine - msvfw32 - ntdll - diff --git a/rostests/winetests/msvfw32/testlist.c b/rostests/winetests/msvfw32/testlist.c deleted file mode 100644 index 1aa529c6574..00000000000 --- a/rostests/winetests/msvfw32/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_msvfw(void); - -const struct test winetest_testlist[] = -{ - { "msvfw", func_msvfw }, - { 0, 0 } -}; diff --git a/rostests/winetests/msxml3/CMakeLists.txt b/rostests/winetests/msxml3/CMakeLists.txt deleted file mode 100644 index 64b8a9b3bd3..00000000000 --- a/rostests/winetests/msxml3/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - domdoc.c - saxreader.c - schema.c - testlist.c - xmldoc.c - xmlelem.c) - -add_executable(msxml3_winetest ${SOURCE}) -target_link_libraries(msxml3_winetest wine) -set_module_type(msxml3_winetest win32cui) -add_importlibs(msxml3_winetest user32 ole32 oleaut32 msvcrt kernel32 ntdll) -add_cd_file(TARGET msxml3_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/msxml3/domdoc.c b/rostests/winetests/msxml3/domdoc.c deleted file mode 100644 index 21e8178b7f4..00000000000 --- a/rostests/winetests/msxml3/domdoc.c +++ /dev/null @@ -1,5654 +0,0 @@ -/* - * XML test - * - * Copyright 2005 Mike McCormack for CodeWeavers - * Copyright 2007-2008 Alistair Leslie-Hughes - * - * 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 - -#include "windows.h" -#include "ole2.h" -#include "objsafe.h" -#include "xmldom.h" -#include "msxml2.h" -#include "msxml2did.h" -#include "dispex.h" -#include -#include - -#include "wine/test.h" - -#include "initguid.h" - -DEFINE_GUID(IID_IObjectSafety, 0xcb5bdc81, 0x93c1, 0x11cf, 0x8f,0x20, 0x00,0x80,0x5f,0x2c,0xd0,0x64); - -static const WCHAR szEmpty[] = { 0 }; -static const WCHAR szIncomplete[] = { - '<','?','x','m','l',' ', - 'v','e','r','s','i','o','n','=','\'','1','.','0','\'','?','>','\n',0 -}; -static const WCHAR szComplete1[] = { - '<','?','x','m','l',' ', - 'v','e','r','s','i','o','n','=','\'','1','.','0','\'','?','>','\n', - '<','o','p','e','n','>','<','/','o','p','e','n','>','\n',0 -}; -static const WCHAR szComplete2[] = { - '<','?','x','m','l',' ', - 'v','e','r','s','i','o','n','=','\'','1','.','0','\'','?','>','\n', - '<','o','>','<','/','o','>','\n',0 -}; -static const WCHAR szComplete3[] = { - '<','?','x','m','l',' ', - 'v','e','r','s','i','o','n','=','\'','1','.','0','\'','?','>','\n', - '<','a','>','<','/','a','>','\n',0 -}; -static const WCHAR szComplete4[] = { - '<','?','x','m','l',' ','v','e','r','s','i','o','n','=','\'','1','.','0','\'','?','>','\n', - '<','l','c',' ','d','l','=','\'','s','t','r','1','\'','>','\n', - '<','b','s',' ','v','r','=','\'','s','t','r','2','\'',' ','s','z','=','\'','1','2','3','4','\'','>', - 'f','n','1','.','t','x','t','\n', - '<','/','b','s','>','\n', - '<','p','r',' ','i','d','=','\'','s','t','r','3','\'',' ','v','r','=','\'','1','.','2','.','3','\'',' ', - 'p','n','=','\'','w','i','n','e',' ','2','0','0','5','0','8','0','4','\'','>','\n', - 'f','n','2','.','t','x','t','\n', - '<','/','p','r','>','\n', - '<','e','m','p','t','y','>','<','/','e','m','p','t','y','>','\n', - '<','f','o','>','\n', - '<','b','a','>','\n', - 'f','1','\n', - '<','/','b','a','>','\n', - '<','/','f','o','>','\n', - '<','/','l','c','>','\n',0 -}; -static const WCHAR szComplete5[] = { - '<','S',':','s','e','a','r','c','h',' ','x','m','l','n','s',':','D','=','"','D','A','V',':','"',' ', - 'x','m','l','n','s',':','C','=','"','u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','o','f','f','i','c','e',':','c','l','i','p','g','a','l','l','e','r','y','"', - ' ','x','m','l','n','s',':','S','=','"','u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','o','f','f','i','c','e',':','c','l','i','p','g','a','l','l','e','r','y',':','s','e','a','r','c','h','"','>', - '<','S',':','s','c','o','p','e','>', - '<','S',':','d','e','e','p','>','/','<','/','S',':','d','e','e','p','>', - '<','/','S',':','s','c','o','p','e','>', - '<','S',':','c','o','n','t','e','n','t','f','r','e','e','t','e','x','t','>', - '<','C',':','t','e','x','t','o','r','p','r','o','p','e','r','t','y','/','>', - 'c','o','m','p','u','t','e','r', - '<','/','S',':','c','o','n','t','e','n','t','f','r','e','e','t','e','x','t','>', - '<','/','S',':','s','e','a','r','c','h','>',0 -}; - -static const WCHAR szComplete6[] = { - '<','?','x','m','l',' ','v','e','r','s','i','o','n','=','\'','1','.','0','\'',' ', - 'e','n','c','o','d','i','n','g','=','\'','W','i','n','d','o','w','s','-','1','2','5','2','\'','?','>','\n', - '<','o','p','e','n','>','<','/','o','p','e','n','>','\n',0 -}; - -static const CHAR szNonUnicodeXML[] = -"\n" -"\n"; - -static const CHAR szExampleXML[] = -"\n" -"\n" -" \n" -" A1 field\n" -" B1 field\n" -" C1 field\n" -" \n" -" \n" -" This is a description. \n" -" \n" -" \n" -" \n" -"\n" -" \n" -" A2 field\n" -" B2 field\n" -" C2 field\n" -" \n" -"\n" -" \n" -" A3 field\n" -" B3 field\n" -" C3 field\n" -" \n" -"\n" -" \n" -" A4 field\n" -" B4 field\n" -" C4 field\n" -" \n" -"\n"; - -static const CHAR szTransformXML[] = -"\n" -"\n" -"Hello World\n" -""; - -static const CHAR szTransformSSXML[] = -"\n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -"

\n" -" \n" -"

\n" -" \n" -" \n" -"
\n" -"
"; - -static const CHAR szTransformOutput[] = -"

" -"Hello World" -"

"; - -static const CHAR szTypeValueXML[] = -"\n" -"\n" -" Wine\n" -" String\n" -" 12.44\n" -" -3.71e3\n" -" -13\n" -" 7322.9371\n" -" 1\n" -" 2009-11-18T03:21:33.12\n" -" 2003-07-11T11:13:57+03:00\n" -" 3721-11-01\n" -" \n" -" 23:21:01.13+03:21\n" -" -13\n" -" 31915\n" -" -312232\n" -" 123\n" -" 48282\n" -" 949281\n" -" 213124.0\n" -" 0.412\n" -" 41221.421\n" -" 333C7BC4-460F-11D0-BC04-0080C7055a83\n" -" fffca012003c\n" -" YmFzZTY0IHRlc3Q=\n" -""; - -static const CHAR szBasicTransformSSXMLPart1[] = -"" -"" -"\n" -"" -"" -" " -" " -" " -"
" -"
" -"" -" " -"" -"" -" " -"" -"" -" " -"" -"
"; - -static const CHAR szBasicTransformXML[] = -"Wine$25.00"; - -static const CHAR szBasicTransformOutput[] = -"
Wine$25.00
"; - -static const WCHAR szNonExistentFile[] = { - 'c', ':', '\\', 'N', 'o', 'n', 'e', 'x', 'i', 's', 't', 'e', 'n', 't', '.', 'x', 'm', 'l', 0 -}; -static const WCHAR szNonExistentAttribute[] = { - 'n','o','n','E','x','i','s','i','t','i','n','g','A','t','t','r','i','b','u','t','e',0 -}; -static const WCHAR szDocument[] = { - '#', 'd', 'o', 'c', 'u', 'm', 'e', 'n', 't', 0 -}; - -static const WCHAR szOpen[] = { 'o','p','e','n',0 }; -static WCHAR szdl[] = { 'd','l',0 }; -static const WCHAR szvr[] = { 'v','r',0 }; -static const WCHAR szlc[] = { 'l','c',0 }; -static WCHAR szbs[] = { 'b','s',0 }; -static const WCHAR szstr1[] = { 's','t','r','1',0 }; -static const WCHAR szstr2[] = { 's','t','r','2',0 }; -static const WCHAR szstar[] = { '*',0 }; -static const WCHAR szfn1_txt[] = {'f','n','1','.','t','x','t',0}; - -static WCHAR szComment[] = {'A',' ','C','o','m','m','e','n','t',0 }; -static WCHAR szCommentXML[] = {'<','!','-','-','A',' ','C','o','m','m','e','n','t','-','-','>',0 }; -static WCHAR szCommentNodeText[] = {'#','c','o','m','m','e','n','t',0 }; - -static WCHAR szElement[] = {'E','l','e','T','e','s','t', 0 }; -static WCHAR szElementXML[] = {'<','E','l','e','T','e','s','t','/','>',0 }; -static WCHAR szElementXML2[] = {'<','E','l','e','T','e','s','t',' ','A','t','t','r','=','"','"','/','>',0 }; -static WCHAR szElementXML3[] = {'<','E','l','e','T','e','s','t',' ','A','t','t','r','=','"','"','>', - 'T','e','s','t','i','n','g','N','o','d','e','<','/','E','l','e','T','e','s','t','>',0 }; -static WCHAR szElementXML4[] = {'<','E','l','e','T','e','s','t',' ','A','t','t','r','=','"','"','>', - '&','a','m','p',';','x',' ',0x2103,'<','/','E','l','e','T','e','s','t','>',0 }; - -static WCHAR szAttribute[] = {'A','t','t','r',0 }; -static WCHAR szAttributeXML[] = {'A','t','t','r','=','"','"',0 }; - -static WCHAR szCData[] = {'[','1',']','*','2','=','3',';',' ','&','g','e','e',' ','t','h','a','t','s', - ' ','n','o','t',' ','r','i','g','h','t','!', 0}; -static WCHAR szCDataXML[] = {'<','!','[','C','D','A','T','A','[','[','1',']','*','2','=','3',';',' ','&', - 'g','e','e',' ','t','h','a','t','s',' ','n','o','t',' ','r','i','g','h','t', - '!',']',']','>',0}; -static WCHAR szCDataNodeText[] = {'#','c','d','a','t','a','-','s','e','c','t','i','o','n',0 }; -static WCHAR szDocFragmentText[] = {'#','d','o','c','u','m','e','n','t','-','f','r','a','g','m','e','n','t',0 }; - -static WCHAR szEntityRef[] = {'e','n','t','i','t','y','r','e','f',0 }; -static WCHAR szEntityRefXML[] = {'&','e','n','t','i','t','y','r','e','f',';',0 }; -static WCHAR szStrangeChars[] = {'&','x',' ',0x2103, 0}; - -#define expect_bstr_eq_and_free(bstr, expect) { \ - BSTR bstrExp = alloc_str_from_narrow(expect); \ - ok(lstrcmpW(bstr, bstrExp) == 0, "String differs\n"); \ - SysFreeString(bstr); \ - SysFreeString(bstrExp); \ -} - -#define expect_eq(expr, value, type, format) { type ret = (expr); ok((value) == ret, #expr " expected " format " got " format "\n", value, ret); } - -#define ole_check(expr) { \ - HRESULT r = expr; \ - ok(r == S_OK, #expr " returned %x\n", r); \ -} - -#define ole_expect(expr, expect) { \ - HRESULT r = expr; \ - ok(r == (expect), #expr " returned %x, expected %x\n", r, expect); \ -} - -#define double_eq(x, y) ok((x)-(y)<=1e-14*(x) && (x)-(y)>=-1e-14*(x), "expected %.16g, got %.16g\n", x, y) - -static BSTR alloc_str_from_narrow(const char *str) -{ - int len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); - BSTR ret = SysAllocStringLen(NULL, len - 1); /* NUL character added automatically */ - MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len); - return ret; -} - -BSTR alloced_bstrs[256]; -int alloced_bstrs_count = 0; - -static BSTR _bstr_(const char *str) -{ - assert(alloced_bstrs_count < sizeof(alloced_bstrs)/sizeof(alloced_bstrs[0])); - alloced_bstrs[alloced_bstrs_count] = alloc_str_from_narrow(str); - return alloced_bstrs[alloced_bstrs_count++]; -} - -static void free_bstrs(void) -{ - int i; - for (i = 0; i < alloced_bstrs_count; i++) - SysFreeString(alloced_bstrs[i]); - alloced_bstrs_count = 0; -} - -static VARIANT _variantbstr_(const char *str) -{ - VARIANT v; - V_VT(&v) = VT_BSTR; - V_BSTR(&v) = _bstr_(str); - return v; -} - -static BOOL compareIgnoreReturns(BSTR sLeft, BSTR sRight) -{ - for (;;) - { - while (*sLeft == '\r' || *sLeft == '\n') sLeft++; - while (*sRight == '\r' || *sRight == '\n') sRight++; - if (*sLeft != *sRight) return FALSE; - if (!*sLeft) return TRUE; - sLeft++; - sRight++; - } -} - -static BOOL compareIgnoreReturnsWhitespace(BSTR sLeft, BSTR sRight) -{ - /* MSXML3 inserts whitespace where as libxml doesn't. */ - for (;;) - { - while (*sLeft == '\r' || *sLeft == '\n' || *sLeft == ' ') sLeft++; - while (*sRight == '\r' || *sRight == '\n' || *sRight == ' ') sRight++; - if (*sLeft != *sRight) return FALSE; - if (!*sLeft) return TRUE; - sLeft++; - sRight++; - } -} - -static void get_str_for_type(DOMNodeType type, char *buf) -{ - switch (type) - { - case NODE_ATTRIBUTE: - strcpy(buf, "A"); - break; - case NODE_ELEMENT: - strcpy(buf, "E"); - break; - case NODE_DOCUMENT: - strcpy(buf, "D"); - break; - default: - wsprintfA(buf, "[%d]", type); - } -} - -#define test_disp(u) _test_disp(__LINE__,u) -static void _test_disp(unsigned line, IUnknown *unk) -{ - DISPID dispid = DISPID_XMLDOM_NODELIST_RESET; - IDispatchEx *dispex; - DWORD dwProps = 0; - BSTR sName; - UINT ticnt; - IUnknown *pUnk; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IDispatchEx, (void**)&dispex); - ok_(__FILE__,line) (hres == S_OK, "Could not get IDispatch: %08x\n", hres); - if(FAILED(hres)) - return; - - ticnt = 0xdeadbeef; - hres = IDispatchEx_GetTypeInfoCount(dispex, &ticnt); - ok_(__FILE__,line) (hres == S_OK, "GetTypeInfoCount failed: %08x\n", hres); - ok_(__FILE__,line) (ticnt == 1, "ticnt=%u\n", ticnt); - - sName = SysAllocString( szstar ); - hres = IDispatchEx_DeleteMemberByName(dispex, sName, fdexNameCaseSensitive); - ok(hres == E_NOTIMPL, "expected E_NOTIMPL got %08x\n", hres); - SysFreeString( sName ); - - hres = IDispatchEx_DeleteMemberByDispID(dispex, dispid); - ok(hres == E_NOTIMPL, "expected E_NOTIMPL got %08x\n", hres); - - hres = IDispatchEx_GetMemberProperties(dispex, dispid, grfdexPropCanAll, &dwProps); - ok(hres == E_NOTIMPL, "expected E_NOTIMPL got %08x\n", hres); - ok(dwProps == 0, "expected 0 got %d\n", dwProps); - - hres = IDispatchEx_GetMemberName(dispex, dispid, &sName); - ok(hres == E_NOTIMPL, "expected E_NOTIMPL got %08x\n", hres); - if(SUCCEEDED(hres)) - SysFreeString(sName); - - hres = IDispatchEx_GetNextDispID(dispex, fdexEnumDefault, DISPID_XMLDOM_NODELIST_RESET, &dispid); - ok(hres == E_NOTIMPL, "expected E_NOTIMPL got %08x\n", hres); - - hres = IDispatchEx_GetNameSpaceParent(dispex, &pUnk); - ok(hres == E_NOTIMPL, "expected E_NOTIMPL got %08x\n", hres); - if(hres == S_OK && pUnk) - IUnknown_Release(pUnk); - - IDispatchEx_Release(dispex); -} - -static int get_node_position(IXMLDOMNode *node) -{ - HRESULT r; - int pos = 0; - - IXMLDOMNode_AddRef(node); - do - { - IXMLDOMNode *new_node; - - pos++; - r = IXMLDOMNode_get_previousSibling(node, &new_node); - ok(SUCCEEDED(r), "get_previousSibling failed\n"); - IXMLDOMNode_Release(node); - node = new_node; - } while (r == S_OK); - return pos; -} - -static void node_to_string(IXMLDOMNode *node, char *buf) -{ - HRESULT r = S_OK; - DOMNodeType type; - - if (node == NULL) - { - lstrcpyA(buf, "(null)"); - return; - } - - IXMLDOMNode_AddRef(node); - while (r == S_OK) - { - IXMLDOMNode *new_node; - - ole_check(IXMLDOMNode_get_nodeType(node, &type)); - get_str_for_type(type, buf); - buf+=strlen(buf); - - if (type == NODE_ATTRIBUTE) - { - BSTR bstr; - ole_check(IXMLDOMNode_get_nodeName(node, &bstr)); - *(buf++) = '\''; - wsprintfA(buf, "%ws", bstr); - buf += strlen(buf); - *(buf++) = '\''; - SysFreeString(bstr); - - r = IXMLDOMNode_selectSingleNode(node, _bstr_(".."), &new_node); - } - else - { - r = IXMLDOMNode_get_parentNode(node, &new_node); - wsprintf(buf, "%d", get_node_position(node)); - buf += strlen(buf); - } - - ok(SUCCEEDED(r), "get_parentNode failed (%08x)\n", r); - IXMLDOMNode_Release(node); - node = new_node; - if (r == S_OK) - *(buf++) = '.'; - } - - *buf = 0; -} - -static char *list_to_string(IXMLDOMNodeList *list) -{ - static char buf[4096]; - char *pos = buf; - LONG len = 0; - int i; - - if (list == NULL) - { - lstrcpyA(buf, "(null)"); - return buf; - } - ole_check(IXMLDOMNodeList_get_length(list, &len)); - for (i = 0; i < len; i++) - { - IXMLDOMNode *node; - if (i > 0) - *(pos++) = ' '; - ole_check(IXMLDOMNodeList_nextNode(list, &node)); - node_to_string(node, pos); - pos += strlen(pos); - IXMLDOMNode_Release(node); - } - *pos = 0; - return buf; -} - -#define expect_node(node, expstr) { char str[4096]; node_to_string(node, str); ok(strcmp(str, expstr)==0, "Invalid node: %s, expected %s\n", str, expstr); } -#define expect_list_and_release(list, expstr) { char *str = list_to_string(list); ok(strcmp(str, expstr)==0, "Invalid node list: %s, expected %s\n", str, expstr); if (list) IXMLDOMNodeList_Release(list); } - -static void test_domdoc( void ) -{ - HRESULT r; - IXMLDOMDocument *doc = NULL; - IXMLDOMParseError *error; - IXMLDOMElement *element = NULL; - IXMLDOMNode *node; - IXMLDOMText *nodetext = NULL; - IXMLDOMComment *node_comment = NULL; - IXMLDOMAttribute *node_attr = NULL; - IXMLDOMNode *nodeChild = NULL; - IXMLDOMProcessingInstruction *nodePI = NULL; - ISupportErrorInfo *support_error = NULL; - VARIANT_BOOL b; - VARIANT var; - BSTR str; - LONG code; - LONG nLength = 0; - WCHAR buff[100]; - - r = CoCreateInstance( &CLSID_DOMDocument, NULL, - CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (LPVOID*)&doc ); - ok( r == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", r ); - if( r != S_OK ) - return; - - test_disp((IUnknown*)doc); - -if (0) -{ - /* crashes on native */ - r = IXMLDOMDocument_loadXML( doc, (BSTR)0x1, NULL ); -} - - /* try some stupid things */ - r = IXMLDOMDocument_loadXML( doc, NULL, NULL ); - ok( r == S_FALSE, "loadXML succeeded\n"); - - b = VARIANT_TRUE; - r = IXMLDOMDocument_loadXML( doc, NULL, &b ); - ok( r == S_FALSE, "loadXML succeeded\n"); - ok( b == VARIANT_FALSE, "failed to load XML string\n"); - - /* try to load a document from a nonexistent file */ - b = VARIANT_TRUE; - str = SysAllocString( szNonExistentFile ); - VariantInit(&var); - V_VT(&var) = VT_BSTR; - V_BSTR(&var) = str; - - r = IXMLDOMDocument_load( doc, var, &b); - ok( r == S_FALSE, "loadXML succeeded\n"); - ok( b == VARIANT_FALSE, "succeeded in loading XML string\n"); - SysFreeString( str ); - - /* try load an empty document */ - b = VARIANT_TRUE; - str = SysAllocString( szEmpty ); - r = IXMLDOMDocument_loadXML( doc, str, &b ); - ok( r == S_FALSE, "loadXML succeeded\n"); - ok( b == VARIANT_FALSE, "succeeded in loading XML string\n"); - SysFreeString( str ); - - r = IXMLDOMDocument_get_async( doc, &b ); - ok( r == S_OK, "get_async failed (%08x)\n", r); - ok( b == VARIANT_TRUE, "Wrong default value\n"); - - /* check that there's no document element */ - element = NULL; - r = IXMLDOMDocument_get_documentElement( doc, &element ); - ok( r == S_FALSE, "should be no document element\n"); - - /* try finding a node */ - node = NULL; - str = SysAllocString( szstr1 ); - r = IXMLDOMDocument_selectSingleNode( doc, str, &node ); - ok( r == S_FALSE, "ret %08x\n", r ); - SysFreeString( str ); - - b = VARIANT_TRUE; - str = SysAllocString( szIncomplete ); - r = IXMLDOMDocument_loadXML( doc, str, &b ); - ok( r == S_FALSE, "loadXML succeeded\n"); - ok( b == VARIANT_FALSE, "succeeded in loading XML string\n"); - SysFreeString( str ); - - /* check that there's no document element */ - element = (IXMLDOMElement*)1; - r = IXMLDOMDocument_get_documentElement( doc, &element ); - ok( r == S_FALSE, "should be no document element\n"); - ok( element == NULL, "Element should be NULL\n"); - - /* test for BSTR handling, pass broken BSTR */ - memcpy(&buff[2], szComplete1, sizeof(szComplete1)); - /* just a big length */ - *(DWORD*)buff = 0xf0f0; - b = VARIANT_FALSE; - r = IXMLDOMDocument_loadXML( doc, &buff[2], &b ); - ok( r == S_OK, "loadXML failed\n"); - ok( b == VARIANT_TRUE, "failed to load XML string\n"); - - /* loadXML ignores the encoding attribute and always expects Unicode */ - b = VARIANT_FALSE; - str = SysAllocString( szComplete6 ); - r = IXMLDOMDocument_loadXML( doc, str, &b ); - ok( r == S_OK, "loadXML failed\n"); - ok( b == VARIANT_TRUE, "failed to load XML string\n"); - SysFreeString( str ); - - /* try a BSTR containing a Windows-1252 document */ - b = VARIANT_TRUE; - str = SysAllocStringByteLen( szNonUnicodeXML, sizeof(szNonUnicodeXML) - 1 ); - r = IXMLDOMDocument_loadXML( doc, str, &b ); - ok( r == S_FALSE, "loadXML succeeded\n"); - ok( b == VARIANT_FALSE, "succeeded in loading XML string\n"); - SysFreeString( str ); - - /* try to load something valid */ - b = VARIANT_FALSE; - str = SysAllocString( szComplete1 ); - r = IXMLDOMDocument_loadXML( doc, str, &b ); - ok( r == S_OK, "loadXML failed\n"); - ok( b == VARIANT_TRUE, "failed to load XML string\n"); - SysFreeString( str ); - - /* check if nodename is correct */ - r = IXMLDOMDocument_get_nodeName( doc, NULL ); - ok ( r == E_INVALIDARG, "get_nodeName (NULL) wrong code\n"); - - str = (BSTR)0xdeadbeef; - r = IXMLDOMDocument_get_baseName( doc, &str ); - ok ( r == S_FALSE, "got 0x%08x\n", r); - ok (str == NULL, "got %p\n", str); - - /* content doesn't matter here */ - str = NULL; - r = IXMLDOMDocument_get_nodeName( doc, &str ); - ok ( r == S_OK, "get_nodeName wrong code\n"); - ok ( str != NULL, "str is null\n"); - ok( !lstrcmpW( str, szDocument ), "incorrect nodeName\n"); - SysFreeString( str ); - - /* test put_text */ - r = IXMLDOMDocument_put_text( doc, _bstr_("Should Fail") ); - ok( r == E_FAIL, "ret %08x\n", r ); - - /* check that there's a document element */ - element = NULL; - r = IXMLDOMDocument_get_documentElement( doc, &element ); - ok( r == S_OK, "should be a document element\n"); - if( element ) - { - IObjectIdentity *ident; - BSTR tag = NULL; - - test_disp((IUnknown*)element); - - r = IXMLDOMElement_QueryInterface( element, &IID_IObjectIdentity, (LPVOID*)&ident ); - ok( r == E_NOINTERFACE, "ret %08x\n", r); - - r = IXMLDOMElement_get_tagName( element, NULL ); - ok( r == E_INVALIDARG, "ret %08x\n", r); - - /* check if the tag is correct */ - r = IXMLDOMElement_get_tagName( element, &tag ); - ok( r == S_OK, "couldn't get tag name\n"); - ok( tag != NULL, "tag was null\n"); - ok( !lstrcmpW( tag, szOpen ), "incorrect tag name\n"); - SysFreeString( tag ); - - /* figure out what happens if we try to reload the document */ - str = SysAllocString( szComplete2 ); - r = IXMLDOMDocument_loadXML( doc, str, &b ); - ok( r == S_OK, "loadXML failed\n"); - ok( b == VARIANT_TRUE, "failed to load XML string\n"); - SysFreeString( str ); - - /* check if the tag is still correct */ - tag = NULL; - r = IXMLDOMElement_get_tagName( element, &tag ); - ok( r == S_OK, "couldn't get tag name\n"); - ok( tag != NULL, "tag was null\n"); - ok( !lstrcmpW( tag, szOpen ), "incorrect tag name\n"); - SysFreeString( tag ); - - IXMLDOMElement_Release( element ); - element = NULL; - } - - /* as soon as we call loadXML again, the document element will disappear */ - b = 2; - r = IXMLDOMDocument_loadXML( doc, NULL, NULL ); - ok( r == S_FALSE, "loadXML failed\n"); - ok( b == 2, "variant modified\n"); - r = IXMLDOMDocument_get_documentElement( doc, &element ); - ok( r == S_FALSE, "should be no document element\n"); - - /* try to load something else simple and valid */ - b = VARIANT_FALSE; - str = SysAllocString( szComplete3 ); - r = IXMLDOMDocument_loadXML( doc, str, &b ); - ok( r == S_OK, "loadXML failed\n"); - ok( b == VARIANT_TRUE, "failed to load XML string\n"); - SysFreeString( str ); - - /* try something a little more complicated */ - b = FALSE; - str = SysAllocString( szComplete4 ); - r = IXMLDOMDocument_loadXML( doc, str, &b ); - ok( r == S_OK, "loadXML failed\n"); - ok( b == VARIANT_TRUE, "failed to load XML string\n"); - SysFreeString( str ); - - r = IXMLDOMDocument_get_parseError( doc, &error ); - ok( r == S_OK, "returns %08x\n", r ); - - r = IXMLDOMParseError_get_errorCode( error, &code ); - ok( r == S_FALSE, "returns %08x\n", r ); - ok( code == 0, "code %d\n", code ); - IXMLDOMParseError_Release( error ); - - /* test createTextNode */ - r = IXMLDOMDocument_createTextNode(doc, _bstr_(""), &nodetext); - ok( r == S_OK, "returns %08x\n", r ); - IXMLDOMText_Release(nodetext); - - str = SysAllocString( szOpen ); - r = IXMLDOMDocument_createTextNode(doc, str, NULL); - ok( r == E_INVALIDARG, "returns %08x\n", r ); - r = IXMLDOMDocument_createTextNode(doc, str, &nodetext); - ok( r == S_OK, "returns %08x\n", r ); - SysFreeString( str ); - if(nodetext) - { - IXMLDOMNamedNodeMap *pAttribs; - - r = IXMLDOMText_QueryInterface(nodetext, &IID_IXMLDOMElement, (LPVOID*)&element); - ok(r == E_NOINTERFACE, "ret %08x\n", r ); - - /* Text Last Child Checks */ - r = IXMLDOMText_get_lastChild(nodetext, NULL); - ok(r == E_INVALIDARG, "ret %08x\n", r ); - - nodeChild = (IXMLDOMNode*)0x1; - r = IXMLDOMText_get_lastChild(nodetext, &nodeChild); - ok(r == S_FALSE, "ret %08x\n", r ); - ok(nodeChild == NULL, "nodeChild not NULL\n"); - - /* test get_attributes */ - r = IXMLDOMText_get_attributes( nodetext, NULL ); - ok( r == E_INVALIDARG, "get_attributes returned wrong code\n"); - - pAttribs = (IXMLDOMNamedNodeMap*)0x1; - r = IXMLDOMText_get_attributes( nodetext, &pAttribs); - ok(r == S_FALSE, "ret %08x\n", r ); - ok( pAttribs == NULL, "pAttribs not NULL\n"); - - /* test get_dataType */ - r = IXMLDOMText_get_dataType(nodetext, &var); - ok(r == S_FALSE, "ret %08x\n", r ); - ok( V_VT(&var) == VT_NULL, "incorrect dataType type\n"); - VariantClear(&var); - - /* test length property */ - r = IXMLDOMText_get_length(nodetext, NULL); - ok(r == E_INVALIDARG, "ret %08x\n", r ); - - r = IXMLDOMText_get_length(nodetext, &nLength); - ok(r == S_OK, "ret %08x\n", r ); - ok(nLength == 4, "expected 4 got %d\n", nLength); - - /* test nodeTypeString */ - r = IXMLDOMText_get_nodeTypeString(nodetext, &str); - ok(r == S_OK, "ret %08x\n", r ); - ok( !lstrcmpW( str, _bstr_("text") ), "incorrect nodeTypeString string\n"); - SysFreeString(str); - - /* put data Tests */ - r = IXMLDOMText_put_data(nodetext, _bstr_("This &is a ; test <>\\")); - ok(r == S_OK, "ret %08x\n", r ); - - /* get data Tests */ - r = IXMLDOMText_get_data(nodetext, &str); - ok(r == S_OK, "ret %08x\n", r ); - ok( !lstrcmpW( str, _bstr_("This &is a ; test <>\\") ), "incorrect put_data string\n"); - SysFreeString(str); - - /* Confirm XML text is good */ - r = IXMLDOMText_get_xml(nodetext, &str); - ok(r == S_OK, "ret %08x\n", r ); - ok( !lstrcmpW( str, _bstr_("This &is a ; test <>\\") ), "incorrect xml string\n"); - SysFreeString(str); - - /* Confirm we get the put_data Text back */ - r = IXMLDOMText_get_text(nodetext, &str); - ok(r == S_OK, "ret %08x\n", r ); - ok( !lstrcmpW( str, _bstr_("This &is a ; test <>\\") ), "incorrect xml string\n"); - SysFreeString(str); - - /* test substringData */ - r = IXMLDOMText_substringData(nodetext, 0, 4, NULL); - ok(r == E_INVALIDARG, "ret %08x\n", r ); - - /* test substringData - Invalid offset */ - str = (BSTR)&szElement; - r = IXMLDOMText_substringData(nodetext, -1, 4, &str); - ok(r == E_INVALIDARG, "ret %08x\n", r ); - ok( str == NULL, "incorrect string\n"); - - /* test substringData - Invalid offset */ - str = (BSTR)&szElement; - r = IXMLDOMText_substringData(nodetext, 30, 0, &str); - ok(r == S_FALSE, "ret %08x\n", r ); - ok( str == NULL, "incorrect string\n"); - - /* test substringData - Invalid size */ - str = (BSTR)&szElement; - r = IXMLDOMText_substringData(nodetext, 0, -1, &str); - ok(r == E_INVALIDARG, "ret %08x\n", r ); - ok( str == NULL, "incorrect string\n"); - - /* test substringData - Invalid size */ - str = (BSTR)&szElement; - r = IXMLDOMText_substringData(nodetext, 2, 0, &str); - ok(r == S_FALSE, "ret %08x\n", r ); - ok( str == NULL, "incorrect string\n"); - - /* test substringData - Start of string */ - r = IXMLDOMText_substringData(nodetext, 0, 4, &str); - ok(r == S_OK, "ret %08x\n", r ); - ok( !lstrcmpW( str, _bstr_("This") ), "incorrect substringData string\n"); - SysFreeString(str); - - /* test substringData - Middle of string */ - r = IXMLDOMText_substringData(nodetext, 13, 4, &str); - ok(r == S_OK, "ret %08x\n", r ); - ok( !lstrcmpW( str, _bstr_("test") ), "incorrect substringData string\n"); - SysFreeString(str); - - /* test substringData - End of string */ - r = IXMLDOMText_substringData(nodetext, 20, 4, &str); - ok(r == S_OK, "ret %08x\n", r ); - ok( !lstrcmpW( str, _bstr_("\\") ), "incorrect substringData string\n"); - SysFreeString(str); - - /* test appendData */ - r = IXMLDOMText_appendData(nodetext, NULL); - ok(r == S_OK, "ret %08x\n", r ); - - r = IXMLDOMText_appendData(nodetext, _bstr_("")); - ok(r == S_OK, "ret %08x\n", r ); - - r = IXMLDOMText_appendData(nodetext, _bstr_("Append")); - ok(r == S_OK, "ret %08x\n", r ); - - r = IXMLDOMText_get_text(nodetext, &str); - ok(r == S_OK, "ret %08x\n", r ); - ok( !lstrcmpW( str, _bstr_("This &is a ; test <>\\Append") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* test insertData */ - str = SysAllocStringLen(NULL, 0); - r = IXMLDOMText_insertData(nodetext, -1, str); - ok(r == S_OK, "ret %08x\n", r ); - - r = IXMLDOMText_insertData(nodetext, -1, NULL); - ok(r == S_OK, "ret %08x\n", r ); - - r = IXMLDOMText_insertData(nodetext, 1000, str); - ok(r == S_OK, "ret %08x\n", r ); - - r = IXMLDOMText_insertData(nodetext, 1000, NULL); - ok(r == S_OK, "ret %08x\n", r ); - - r = IXMLDOMText_insertData(nodetext, 0, NULL); - ok(r == S_OK, "ret %08x\n", r ); - - r = IXMLDOMText_insertData(nodetext, 0, str); - ok(r == S_OK, "ret %08x\n", r ); - SysFreeString(str); - - r = IXMLDOMText_insertData(nodetext, -1, _bstr_("Inserting")); - ok(r == E_INVALIDARG, "ret %08x\n", r ); - - r = IXMLDOMText_insertData(nodetext, 1000, _bstr_("Inserting")); - ok(r == E_INVALIDARG, "ret %08x\n", r ); - - r = IXMLDOMText_insertData(nodetext, 0, _bstr_("Begin ")); - ok(r == S_OK, "ret %08x\n", r ); - - r = IXMLDOMText_insertData(nodetext, 17, _bstr_("Middle")); - ok(r == S_OK, "ret %08x\n", r ); - - r = IXMLDOMText_insertData(nodetext, 39, _bstr_(" End")); - ok(r == S_OK, "ret %08x\n", r ); - - r = IXMLDOMText_get_text(nodetext, &str); - ok(r == S_OK, "ret %08x\n", r ); - ok( !lstrcmpW( str, _bstr_("Begin This &is a Middle; test <>\\Append End") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* delete data */ - /* invalid arguments */ - r = IXMLDOMText_deleteData(nodetext, -1, 1); - ok(r == E_INVALIDARG, "ret %08x\n", r ); - - r = IXMLDOMText_deleteData(nodetext, 0, 0); - ok(r == S_OK, "ret %08x\n", r ); - - r = IXMLDOMText_deleteData(nodetext, 0, -1); - ok(r == E_INVALIDARG, "ret %08x\n", r ); - - r = IXMLDOMText_get_length(nodetext, &nLength); - ok(r == S_OK, "ret %08x\n", r ); - ok(nLength == 43, "expected 43 got %d\n", nLength); - - r = IXMLDOMText_deleteData(nodetext, nLength, 1); - ok(r == S_OK, "ret %08x\n", r ); - - r = IXMLDOMText_deleteData(nodetext, nLength+1, 1); - ok(r == E_INVALIDARG, "ret %08x\n", r ); - - /* delete from start */ - r = IXMLDOMText_deleteData(nodetext, 0, 5); - ok(r == S_OK, "ret %08x\n", r ); - - r = IXMLDOMText_get_length(nodetext, &nLength); - ok(r == S_OK, "ret %08x\n", r ); - ok(nLength == 38, "expected 38 got %d\n", nLength); - - r = IXMLDOMText_get_text(nodetext, &str); - ok(r == S_OK, "ret %08x\n", r ); - /* whitespace preserving needs to be handled here */ - todo_wine ok( !lstrcmpW( str, _bstr_("This &is a Middle; test <>\\Append End") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* delete from end */ - r = IXMLDOMText_deleteData(nodetext, 35, 3); - ok(r == S_OK, "ret %08x\n", r ); - - r = IXMLDOMText_get_length(nodetext, &nLength); - ok(r == S_OK, "ret %08x\n", r ); - ok(nLength == 35, "expected 35 got %d\n", nLength); - - r = IXMLDOMText_get_text(nodetext, &str); - ok(r == S_OK, "ret %08x\n", r ); - todo_wine ok( !lstrcmpW( str, _bstr_("This &is a Middle; test <>\\Append") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* delete from inside */ - r = IXMLDOMText_deleteData(nodetext, 1, 33); - ok(r == S_OK, "ret %08x\n", r ); - - r = IXMLDOMText_get_length(nodetext, &nLength); - ok(r == S_OK, "ret %08x\n", r ); - ok(nLength == 2, "expected 2 got %d\n", nLength); - - r = IXMLDOMText_get_text(nodetext, &str); - ok(r == S_OK, "ret %08x\n", r ); - todo_wine ok( !lstrcmpW( str, _bstr_("") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* delete whole data ... */ - r = IXMLDOMText_get_length(nodetext, &nLength); - ok(r == S_OK, "ret %08x\n", r ); - - r = IXMLDOMText_deleteData(nodetext, 0, nLength); - ok(r == S_OK, "ret %08x\n", r ); - /* ... and try again with empty string */ - r = IXMLDOMText_deleteData(nodetext, 0, nLength); - ok(r == S_OK, "ret %08x\n", r ); - - /* test put_data */ - V_VT(&var) = VT_BSTR; - V_BSTR(&var) = SysAllocString(szstr1); - r = IXMLDOMText_put_nodeValue(nodetext, var); - ok(r == S_OK, "ret %08x\n", r ); - VariantClear(&var); - - r = IXMLDOMText_get_text(nodetext, &str); - ok(r == S_OK, "ret %08x\n", r ); - ok( !lstrcmpW( str, szstr1 ), "incorrect get_text string\n"); - SysFreeString(str); - - /* test put_data */ - V_VT(&var) = VT_I4; - V_I4(&var) = 99; - r = IXMLDOMText_put_nodeValue(nodetext, var); - ok(r == S_OK, "ret %08x\n", r ); - VariantClear(&var); - - r = IXMLDOMText_get_text(nodetext, &str); - ok(r == S_OK, "ret %08x\n", r ); - ok( !lstrcmpW( str, _bstr_("99") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* ::replaceData() */ - V_VT(&var) = VT_BSTR; - V_BSTR(&var) = SysAllocString(szstr1); - r = IXMLDOMText_put_nodeValue(nodetext, var); - ok(r == S_OK, "ret %08x\n", r ); - VariantClear(&var); - - r = IXMLDOMText_replaceData(nodetext, 6, 0, NULL); - ok(r == E_INVALIDARG, "ret %08x\n", r ); - r = IXMLDOMText_get_text(nodetext, &str); - ok(r == S_OK, "ret %08x\n", r ); - ok( !lstrcmpW( str, _bstr_("str1") ), "incorrect get_text string\n"); - SysFreeString(str); - - r = IXMLDOMText_replaceData(nodetext, 0, 0, NULL); - ok(r == S_OK, "ret %08x\n", r ); - r = IXMLDOMText_get_text(nodetext, &str); - ok(r == S_OK, "ret %08x\n", r ); - ok( !lstrcmpW( str, _bstr_("str1") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* NULL pointer means delete */ - r = IXMLDOMText_replaceData(nodetext, 0, 1, NULL); - ok(r == S_OK, "ret %08x\n", r ); - r = IXMLDOMText_get_text(nodetext, &str); - ok(r == S_OK, "ret %08x\n", r ); - ok( !lstrcmpW( str, _bstr_("tr1") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* empty string means delete */ - r = IXMLDOMText_replaceData(nodetext, 0, 1, _bstr_("")); - ok(r == S_OK, "ret %08x\n", r ); - r = IXMLDOMText_get_text(nodetext, &str); - ok(r == S_OK, "ret %08x\n", r ); - ok( !lstrcmpW( str, _bstr_("r1") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* zero count means insert */ - r = IXMLDOMText_replaceData(nodetext, 0, 0, _bstr_("a")); - ok(r == S_OK, "ret %08x\n", r ); - r = IXMLDOMText_get_text(nodetext, &str); - ok(r == S_OK, "ret %08x\n", r ); - ok( !lstrcmpW( str, _bstr_("ar1") ), "incorrect get_text string\n"); - SysFreeString(str); - - r = IXMLDOMText_replaceData(nodetext, 0, 2, NULL); - ok(r == S_OK, "ret %08x\n", r ); - - r = IXMLDOMText_insertData(nodetext, 0, _bstr_("m")); - ok(r == S_OK, "ret %08x\n", r ); - r = IXMLDOMText_get_text(nodetext, &str); - ok(r == S_OK, "ret %08x\n", r ); - ok( !lstrcmpW( str, _bstr_("m1") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* nonempty string, count greater than its length */ - r = IXMLDOMText_replaceData(nodetext, 0, 2, _bstr_("a1.2")); - ok(r == S_OK, "ret %08x\n", r ); - r = IXMLDOMText_get_text(nodetext, &str); - ok(r == S_OK, "ret %08x\n", r ); - ok( !lstrcmpW( str, _bstr_("a1.2") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* nonempty string, count less than its length */ - r = IXMLDOMText_replaceData(nodetext, 0, 1, _bstr_("wine")); - ok(r == S_OK, "ret %08x\n", r ); - r = IXMLDOMText_get_text(nodetext, &str); - ok(r == S_OK, "ret %08x\n", r ); - ok( !lstrcmpW( str, _bstr_("wine1.2") ), "incorrect get_text string\n"); - SysFreeString(str); - - IXMLDOMText_Release( nodetext ); - } - - /* test Create Comment */ - r = IXMLDOMDocument_createComment(doc, NULL, NULL); - ok( r == E_INVALIDARG, "returns %08x\n", r ); - node_comment = (IXMLDOMComment*)0x1; - - /* empty comment */ - r = IXMLDOMDocument_createComment(doc, _bstr_(""), &node_comment); - ok( r == S_OK, "returns %08x\n", r ); - str = (BSTR)0x1; - r = IXMLDOMComment_get_data(node_comment, &str); - ok( r == S_OK, "returns %08x\n", r ); - ok( str && SysStringLen(str) == 0, "expected empty string data\n"); - IXMLDOMComment_Release(node_comment); - SysFreeString(str); - - r = IXMLDOMDocument_createComment(doc, NULL, &node_comment); - ok( r == S_OK, "returns %08x\n", r ); - str = (BSTR)0x1; - r = IXMLDOMComment_get_data(node_comment, &str); - ok( r == S_OK, "returns %08x\n", r ); - ok( str && (SysStringLen(str) == 0), "expected empty string data\n"); - IXMLDOMComment_Release(node_comment); - SysFreeString(str); - - str = SysAllocString(szComment); - r = IXMLDOMDocument_createComment(doc, str, &node_comment); - SysFreeString(str); - ok( r == S_OK, "returns %08x\n", r ); - if(node_comment) - { - /* Last Child Checks */ - r = IXMLDOMComment_get_lastChild(node_comment, NULL); - ok(r == E_INVALIDARG, "ret %08x\n", r ); - - nodeChild = (IXMLDOMNode*)0x1; - r = IXMLDOMComment_get_lastChild(node_comment, &nodeChild); - ok(r == S_FALSE, "ret %08x\n", r ); - ok(nodeChild == NULL, "pLastChild not NULL\n"); - - /* baseName */ - str = (BSTR)0xdeadbeef; - IXMLDOMComment_get_baseName(node_comment, &str); - ok(r == S_FALSE, "ret %08x\n", r ); - ok(str == NULL, "Expected NULL\n"); - - IXMLDOMComment_Release( node_comment ); - } - - /* test Create Attribute */ - str = SysAllocString(szAttribute); - r = IXMLDOMDocument_createAttribute(doc, NULL, NULL); - ok( r == E_INVALIDARG, "returns %08x\n", r ); - r = IXMLDOMDocument_createAttribute(doc, str, &node_attr); - ok( r == S_OK, "returns %08x\n", r ); - IXMLDOMText_Release( node_attr); - SysFreeString(str); - - /* test Processing Instruction */ - str = SysAllocStringLen(NULL, 0); - r = IXMLDOMDocument_createProcessingInstruction(doc, str, str, NULL); - ok( r == E_INVALIDARG, "returns %08x\n", r ); - r = IXMLDOMDocument_createProcessingInstruction(doc, NULL, str, &nodePI); - ok( r == E_FAIL, "returns %08x\n", r ); - r = IXMLDOMDocument_createProcessingInstruction(doc, str, str, &nodePI); - ok( r == E_FAIL, "returns %08x\n", r ); - SysFreeString(str); - - r = IXMLDOMDocument_createProcessingInstruction(doc, _bstr_("xml"), _bstr_("version=\"1.0\""), &nodePI); - ok( r == S_OK, "returns %08x\n", r ); - if(nodePI) - { - /* Last Child Checks */ - r = IXMLDOMProcessingInstruction_get_lastChild(nodePI, NULL); - ok(r == E_INVALIDARG, "ret %08x\n", r ); - - nodeChild = (IXMLDOMNode*)0x1; - r = IXMLDOMProcessingInstruction_get_lastChild(nodePI, &nodeChild); - ok(r == S_FALSE, "ret %08x\n", r ); - ok(nodeChild == NULL, "nodeChild not NULL\n"); - - r = IXMLDOMProcessingInstruction_get_dataType(nodePI, &var); - ok(r == S_FALSE, "ret %08x\n", r ); - ok( V_VT(&var) == VT_NULL, "incorrect dataType type\n"); - VariantClear(&var); - - /* test nodeName */ - r = IXMLDOMProcessingInstruction_get_nodeName(nodePI, &str); - ok(r == S_OK, "ret %08x\n", r ); - ok( !lstrcmpW( str, _bstr_("xml") ), "incorrect nodeName string\n"); - SysFreeString(str); - - /* test baseName */ - str = (BSTR)0x1; - r = IXMLDOMProcessingInstruction_get_baseName(nodePI, &str); - ok(r == S_OK, "ret %08x\n", r ); - ok( !lstrcmpW( str, _bstr_("xml") ), "incorrect nodeName string\n"); - SysFreeString(str); - - /* test Target */ - r = IXMLDOMProcessingInstruction_get_target(nodePI, &str); - ok(r == S_OK, "ret %08x\n", r ); - ok( !lstrcmpW( str, _bstr_("xml") ), "incorrect target string\n"); - SysFreeString(str); - - /* test nodeTypeString */ - r = IXMLDOMProcessingInstruction_get_nodeTypeString(nodePI, &str); - ok(r == S_OK, "ret %08x\n", r ); - ok( !lstrcmpW( str, _bstr_("processinginstruction") ), "incorrect nodeTypeString string\n"); - SysFreeString(str); - - /* test get_nodeValue */ - r = IXMLDOMProcessingInstruction_get_nodeValue(nodePI, &var); - ok(r == S_OK, "ret %08x\n", r ); - ok( !lstrcmpW( V_BSTR(&var), _bstr_("version=\"1.0\"") ), "incorrect data string\n"); - VariantClear(&var); - - /* test get_data */ - r = IXMLDOMProcessingInstruction_get_data(nodePI, &str); - ok(r == S_OK, "ret %08x\n", r ); - ok( !lstrcmpW( str, _bstr_("version=\"1.0\"") ), "incorrect data string\n"); - SysFreeString(str); - - /* test put_data */ - r = IXMLDOMProcessingInstruction_put_data(nodePI, _bstr_("version=\"1.0\" encoding=\"UTF-8\"")); - ok(r == E_FAIL, "ret %08x\n", r ); - - /* test put_data */ - V_VT(&var) = VT_BSTR; - V_BSTR(&var) = SysAllocString(szOpen); /* Doesn't matter what the string is, cannot set an xml node. */ - r = IXMLDOMProcessingInstruction_put_nodeValue(nodePI, var); - ok(r == E_FAIL, "ret %08x\n", r ); - VariantClear(&var); - - /* test get nodeName */ - r = IXMLDOMProcessingInstruction_get_nodeName(nodePI, &str); - ok( !lstrcmpW( str, _bstr_("xml") ), "incorrect nodeName string\n"); - ok(r == S_OK, "ret %08x\n", r ); - SysFreeString(str); - - IXMLDOMProcessingInstruction_Release(nodePI); - } - - r = IXMLDOMDocument_QueryInterface( doc, &IID_ISupportErrorInfo, (LPVOID*)&support_error ); - ok( r == S_OK, "ret %08x\n", r ); - if(r == S_OK) - { - r = ISupportErrorInfo_InterfaceSupportsErrorInfo( support_error, &IID_IXMLDOMDocument ); - todo_wine ok( r == S_OK, "ret %08x\n", r ); - ISupportErrorInfo_Release( support_error ); - } - - r = IXMLDOMDocument_Release( doc ); - ok( r == 0, "document ref count incorrect\n"); - - free_bstrs(); -} - -static void test_persiststreaminit(void) -{ - IXMLDOMDocument *doc; - IPersistStreamInit *streaminit; - HRESULT hr; - - hr = CoCreateInstance( &CLSID_DOMDocument, NULL, - CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (void**)&doc ); - ok( hr == S_OK, "failed with 0x%08x\n", hr ); - if( hr != S_OK ) - return; - - hr = IXMLDOMDocument_QueryInterface(doc, &IID_IPersistStreamInit, (void**)&streaminit); - ok( hr == S_OK, "failed with 0x%08x\n", hr ); - - hr = IPersistStreamInit_InitNew(streaminit); - ok( hr == S_OK, "failed with 0x%08x\n", hr ); - - IXMLDOMDocument_Release(doc); -} - -static void test_domnode( void ) -{ - HRESULT r; - IXMLDOMDocument *doc = NULL, *owner = NULL; - IXMLDOMElement *element = NULL; - IXMLDOMNamedNodeMap *map = NULL; - IXMLDOMNode *node = NULL, *next = NULL; - IXMLDOMNodeList *list = NULL; - IXMLDOMAttribute *attr = NULL; - DOMNodeType type = NODE_INVALID; - VARIANT_BOOL b; - BSTR str; - VARIANT var; - LONG count; - - r = CoCreateInstance( &CLSID_DOMDocument, NULL, - CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (LPVOID*)&doc ); - ok( r == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", r ); - if( r != S_OK ) - return; - - b = FALSE; - str = SysAllocString( szComplete4 ); - r = IXMLDOMDocument_loadXML( doc, str, &b ); - ok( r == S_OK, "loadXML failed\n"); - ok( b == VARIANT_TRUE, "failed to load XML string\n"); - SysFreeString( str ); - - b = 1; - r = IXMLDOMNode_hasChildNodes( doc, &b ); - ok( r == S_OK, "hasChildNoes bad return\n"); - ok( b == VARIANT_TRUE, "hasChildNoes wrong result\n"); - - r = IXMLDOMDocument_get_documentElement( doc, &element ); - ok( r == S_OK, "should be a document element\n"); - ok( element != NULL, "should be an element\n"); - - VariantInit(&var); - ok( V_VT(&var) == VT_EMPTY, "variant init failed\n"); - - r = IXMLDOMNode_get_nodeValue( doc, NULL ); - ok(r == E_INVALIDARG, "get_nodeValue ret %08x\n", r ); - - r = IXMLDOMNode_get_nodeValue( doc, &var ); - ok( r == S_FALSE, "nextNode returned wrong code\n"); - ok( V_VT(&var) == VT_NULL, "variant wasn't empty\n"); - ok( V_BSTR(&var) == NULL, "variant value wasn't null\n"); - - if (element) - { - owner = NULL; - r = IXMLDOMNode_get_ownerDocument( element, &owner ); - ok( r == S_OK, "get_ownerDocument return code\n"); - ok( owner != doc, "get_ownerDocument return\n"); - IXMLDOMDocument_Release(owner); - - type = NODE_INVALID; - r = IXMLDOMNode_get_nodeType( element, &type); - ok( r == S_OK, "getNamedItem returned wrong code\n"); - ok( type == NODE_ELEMENT, "node not an element\n"); - - str = NULL; - r = IXMLDOMNode_get_baseName( element, &str ); - ok( r == S_OK, "get_baseName returned wrong code\n"); - ok( lstrcmpW(str,szlc) == 0, "basename was wrong\n"); - SysFreeString(str); - - /* check if nodename is correct */ - r = IXMLDOMElement_get_nodeName( element, NULL ); - ok ( r == E_INVALIDARG, "get_nodeName (NULL) wrong code\n"); - - /* content doesn't matter here */ - str = NULL; - r = IXMLDOMElement_get_nodeName( element, &str ); - ok ( r == S_OK, "get_nodeName wrong code\n"); - ok ( str != NULL, "str is null\n"); - ok( !lstrcmpW( str, szlc ), "incorrect nodeName\n"); - SysFreeString( str ); - - str = SysAllocString( szNonExistentFile ); - V_VT(&var) = VT_I4; - V_I4(&var) = 0x1234; - r = IXMLDOMElement_getAttribute( element, str, &var ); - ok( r == E_FAIL, "getAttribute ret %08x\n", r ); - ok( V_VT(&var) == VT_NULL || V_VT(&var) == VT_EMPTY, "vt = %x\n", V_VT(&var)); - VariantClear(&var); - - r = IXMLDOMElement_getAttributeNode( element, str, NULL); - ok( r == E_FAIL, "getAttributeNode ret %08x\n", r ); - - attr = (IXMLDOMAttribute*)0xdeadbeef; - r = IXMLDOMElement_getAttributeNode( element, str, &attr); - ok( r == E_FAIL, "getAttributeNode ret %08x\n", r ); - ok( attr == NULL, "getAttributeNode ret %p, expected NULL\n", attr ); - SysFreeString( str ); - - attr = (IXMLDOMAttribute*)0xdeadbeef; - str = SysAllocString( szNonExistentAttribute ); - r = IXMLDOMElement_getAttributeNode( element, str, &attr); - ok( r == S_FALSE, "getAttributeNode ret %08x\n", r ); - ok( attr == NULL, "getAttributeNode ret %p, expected NULL\n", attr ); - SysFreeString( str ); - - str = SysAllocString( szdl ); - V_VT(&var) = VT_I4; - V_I4(&var) = 0x1234; - r = IXMLDOMElement_getAttribute( element, str, &var ); - ok( r == S_OK, "getAttribute ret %08x\n", r ); - ok( V_VT(&var) == VT_BSTR, "vt = %x\n", V_VT(&var)); - ok( !lstrcmpW(V_BSTR(&var), szstr1), "wrong attr value\n"); - VariantClear( &var ); - - r = IXMLDOMElement_getAttribute( element, NULL, &var ); - ok( r == E_INVALIDARG, "getAttribute ret %08x\n", r ); - - r = IXMLDOMElement_getAttribute( element, str, NULL ); - ok( r == E_INVALIDARG, "getAttribute ret %08x\n", r ); - - attr = NULL; - r = IXMLDOMElement_getAttributeNode( element, str, &attr); - ok( r == S_OK, "GetAttributeNode ret %08x\n", r ); - ok( attr != NULL, "getAttributeNode returned NULL\n" ); - if (attr) - { - r = IXMLDOMAttribute_get_parentNode( attr, NULL ); - ok( r == E_INVALIDARG, "Expected E_INVALIDARG, ret %08x\n", r ); - - /* attribute doesn't have a parent in msxml interpretation */ - node = (IXMLDOMNode*)0xdeadbeef; - r = IXMLDOMAttribute_get_parentNode( attr, &node ); - ok( r == S_FALSE, "Expected S_FALSE, ret %08x\n", r ); - ok( node == NULL, "Expected NULL, got %p\n", node ); - - IXMLDOMAttribute_Release(attr); - } - - SysFreeString( str ); - - r = IXMLDOMElement_get_attributes( element, &map ); - ok( r == S_OK, "get_attributes returned wrong code\n"); - ok( map != NULL, "should be attributes\n"); - - b = 1; - r = IXMLDOMNode_hasChildNodes( element, &b ); - ok( r == S_OK, "hasChildNoes bad return\n"); - ok( b == VARIANT_TRUE, "hasChildNoes wrong result\n"); - } - else - ok( FALSE, "no element\n"); - - if (map) - { - ISupportErrorInfo *support_error; - r = IXMLDOMNamedNodeMap_QueryInterface( map, &IID_ISupportErrorInfo, (LPVOID*)&support_error ); - ok( r == S_OK, "ret %08x\n", r ); - - r = ISupportErrorInfo_InterfaceSupportsErrorInfo( support_error, &IID_IXMLDOMNamedNodeMap ); -todo_wine -{ - ok( r == S_OK, "ret %08x\n", r ); -} - ISupportErrorInfo_Release( support_error ); - - str = SysAllocString( szdl ); - r = IXMLDOMNamedNodeMap_getNamedItem( map, str, &node ); - ok( r == S_OK, "getNamedItem returned wrong code\n"); - ok( node != NULL, "should be attributes\n"); - IXMLDOMNode_Release(node); - SysFreeString( str ); - - str = SysAllocString( szdl ); - r = IXMLDOMNamedNodeMap_getNamedItem( map, str, NULL ); - ok( r == E_INVALIDARG, "getNamedItem should return E_INVALIDARG\n"); - SysFreeString( str ); - - /* something that isn't in szComplete4 */ - str = SysAllocString( szOpen ); - node = (IXMLDOMNode *) 1; - r = IXMLDOMNamedNodeMap_getNamedItem( map, str, &node ); - ok( r == S_FALSE, "getNamedItem found a node that wasn't there\n"); - ok( node == NULL, "getNamedItem should have returned NULL\n"); - SysFreeString( str ); - - /* test indexed access of attributes */ - r = IXMLDOMNamedNodeMap_get_length( map, NULL ); - ok ( r == E_INVALIDARG, "get_length should return E_INVALIDARG\n"); - - r = IXMLDOMNamedNodeMap_get_length( map, &count ); - ok ( r == S_OK, "get_length wrong code\n"); - ok ( count == 1, "get_length != 1\n"); - - node = NULL; - r = IXMLDOMNamedNodeMap_get_item( map, -1, &node); - ok ( r == S_FALSE, "get_item (-1) wrong code\n"); - ok ( node == NULL, "there is no node\n"); - - node = NULL; - r = IXMLDOMNamedNodeMap_get_item( map, 1, &node); - ok ( r == S_FALSE, "get_item (1) wrong code\n"); - ok ( node == NULL, "there is no attribute\n"); - - node = NULL; - r = IXMLDOMNamedNodeMap_get_item( map, 0, &node); - ok ( r == S_OK, "get_item (0) wrong code\n"); - ok ( node != NULL, "should be attribute\n"); - - r = IXMLDOMNode_get_nodeName( node, NULL ); - ok ( r == E_INVALIDARG, "get_nodeName (NULL) wrong code\n"); - - /* content doesn't matter here */ - str = NULL; - r = IXMLDOMNode_get_nodeName( node, &str ); - ok ( r == S_OK, "get_nodeName wrong code\n"); - ok ( str != NULL, "str is null\n"); - ok( !lstrcmpW( str, szdl ), "incorrect node name\n"); - SysFreeString( str ); - - /* test sequential access of attributes */ - node = NULL; - r = IXMLDOMNamedNodeMap_nextNode( map, &node ); - ok ( r == S_OK, "nextNode (first time) wrong code\n"); - ok ( node != NULL, "nextNode, should be attribute\n"); - - r = IXMLDOMNamedNodeMap_nextNode( map, &node ); - ok ( r != S_OK, "nextNode (second time) wrong code\n"); - ok ( node == NULL, "nextNode, there is no attribute\n"); - - r = IXMLDOMNamedNodeMap_reset( map ); - ok ( r == S_OK, "reset should return S_OK\n"); - - r = IXMLDOMNamedNodeMap_nextNode( map, &node ); - ok ( r == S_OK, "nextNode (third time) wrong code\n"); - ok ( node != NULL, "nextNode, should be attribute\n"); - } - else - ok( FALSE, "no map\n"); - - if (node) - { - type = NODE_INVALID; - r = IXMLDOMNode_get_nodeType( node, &type); - ok( r == S_OK, "getNamedItem returned wrong code\n"); - ok( type == NODE_ATTRIBUTE, "node not an attribute\n"); - - str = NULL; - r = IXMLDOMNode_get_baseName( node, NULL ); - ok( r == E_INVALIDARG, "get_baseName returned wrong code\n"); - - str = NULL; - r = IXMLDOMNode_get_baseName( node, &str ); - ok( r == S_OK, "get_baseName returned wrong code\n"); - ok( lstrcmpW(str,szdl) == 0, "basename was wrong\n"); - SysFreeString( str ); - - r = IXMLDOMNode_get_nodeValue( node, &var ); - ok( r == S_OK, "returns %08x\n", r ); - ok( V_VT(&var) == VT_BSTR, "vt %x\n", V_VT(&var)); - ok( !lstrcmpW(V_BSTR(&var), szstr1), "nodeValue incorrect\n"); - VariantClear(&var); - - r = IXMLDOMNode_get_childNodes( node, NULL ); - ok( r == E_INVALIDARG, "get_childNodes returned wrong code\n"); - - r = IXMLDOMNode_get_childNodes( node, &list ); - ok( r == S_OK, "get_childNodes returned wrong code\n"); - - if (list) - { - r = IXMLDOMNodeList_nextNode( list, &next ); - ok( r == S_OK, "nextNode returned wrong code\n"); - } - else - ok( FALSE, "no childlist\n"); - - if (next) - { - b = 1; - r = IXMLDOMNode_hasChildNodes( next, &b ); - ok( r == S_FALSE, "hasChildNoes bad return\n"); - ok( b == VARIANT_FALSE, "hasChildNoes wrong result\n"); - - type = NODE_INVALID; - r = IXMLDOMNode_get_nodeType( next, &type); - ok( r == S_OK, "getNamedItem returned wrong code\n"); - ok( type == NODE_TEXT, "node not text\n"); - - str = (BSTR) 1; - r = IXMLDOMNode_get_baseName( next, &str ); - ok( r == S_FALSE, "get_baseName returned wrong code\n"); - ok( str == NULL, "basename was wrong\n"); - SysFreeString(str); - } - else - ok( FALSE, "no next\n"); - - if (next) - IXMLDOMNode_Release( next ); - next = NULL; - if (list) - IXMLDOMNodeList_Release( list ); - list = NULL; - if (node) - IXMLDOMNode_Release( node ); - } - else - ok( FALSE, "no node\n"); - node = NULL; - - if (map) - IXMLDOMNamedNodeMap_Release( map ); - - /* now traverse the tree from the root element */ - if (element) - { - r = IXMLDOMNode_get_childNodes( element, &list ); - ok( r == S_OK, "get_childNodes returned wrong code\n"); - - /* using get_item for child list doesn't advance the position */ - ole_check(IXMLDOMNodeList_get_item(list, 1, &node)); - expect_node(node, "E2.E2.D1"); - IXMLDOMNode_Release(node); - ole_check(IXMLDOMNodeList_nextNode(list, &node)); - expect_node(node, "E1.E2.D1"); - IXMLDOMNode_Release(node); - ole_check(IXMLDOMNodeList_reset(list)); - - IXMLDOMNodeList_AddRef(list); - expect_list_and_release(list, "E1.E2.D1 E2.E2.D1 E3.E2.D1 E4.E2.D1"); - ole_check(IXMLDOMNodeList_reset(list)); - - node = (void*)0xdeadbeef; - str = SysAllocString(szdl); - r = IXMLDOMNode_selectSingleNode( element, str, &node ); - SysFreeString(str); - ok( r == S_FALSE, "ret %08x\n", r ); - ok( node == NULL, "node %p\n", node ); - - str = SysAllocString(szbs); - r = IXMLDOMNode_selectSingleNode( element, str, &node ); - SysFreeString(str); - ok( r == S_OK, "ret %08x\n", r ); - r = IXMLDOMNode_Release( node ); - ok( r == 0, "ret %08x\n", r ); - } - else - ok( FALSE, "no element\n"); - - if (list) - { - r = IXMLDOMNodeList_QueryInterface(list, &IID_IDispatch, NULL); - ok( r == E_INVALIDARG || r == E_POINTER, "ret %08x\n", r ); - - r = IXMLDOMNodeList_get_item(list, 0, NULL); - ok(r == E_INVALIDARG, "Exected E_INVALIDARG got %08x\n", r); - - r = IXMLDOMNodeList_get_length(list, NULL); - ok(r == E_INVALIDARG, "Exected E_INVALIDARG got %08x\n", r); - - r = IXMLDOMNodeList_get_length( list, &count ); - ok( r == S_OK, "get_length returns %08x\n", r ); - ok( count == 4, "get_length got %d\n", count ); - - r = IXMLDOMNodeList_nextNode(list, NULL); - ok(r == E_INVALIDARG, "Exected E_INVALIDARG got %08x\n", r); - - r = IXMLDOMNodeList_nextNode( list, &node ); - ok( r == S_OK, "nextNode returned wrong code\n"); - } - else - ok( FALSE, "no list\n"); - - if (node) - { - type = NODE_INVALID; - r = IXMLDOMNode_get_nodeType( node, &type); - ok( r == S_OK, "getNamedItem returned wrong code\n"); - ok( type == NODE_ELEMENT, "node not text\n"); - - VariantInit(&var); - ok( V_VT(&var) == VT_EMPTY, "variant init failed\n"); - r = IXMLDOMNode_get_nodeValue( node, &var ); - ok( r == S_FALSE, "nextNode returned wrong code\n"); - ok( V_VT(&var) == VT_NULL, "variant wasn't empty\n"); - ok( V_BSTR(&var) == NULL, "variant value wasn't null\n"); - - r = IXMLDOMNode_hasChildNodes( node, NULL ); - ok( r == E_INVALIDARG, "hasChildNoes bad return\n"); - - b = 1; - r = IXMLDOMNode_hasChildNodes( node, &b ); - ok( r == S_OK, "hasChildNoes bad return\n"); - ok( b == VARIANT_TRUE, "hasChildNoes wrong result\n"); - - str = NULL; - r = IXMLDOMNode_get_baseName( node, &str ); - ok( r == S_OK, "get_baseName returned wrong code\n"); - ok( lstrcmpW(str,szbs) == 0, "basename was wrong\n"); - SysFreeString(str); - } - else - ok( FALSE, "no node\n"); - - if (node) - IXMLDOMNode_Release( node ); - if (list) - IXMLDOMNodeList_Release( list ); - if (element) - IXMLDOMElement_Release( element ); - - b = FALSE; - str = SysAllocString( szComplete5 ); - r = IXMLDOMDocument_loadXML( doc, str, &b ); - ok( r == S_OK, "loadXML failed\n"); - ok( b == VARIANT_TRUE, "failed to load XML string\n"); - SysFreeString( str ); - - b = 1; - r = IXMLDOMNode_hasChildNodes( doc, &b ); - ok( r == S_OK, "hasChildNoes bad return\n"); - ok( b == VARIANT_TRUE, "hasChildNoes wrong result\n"); - - r = IXMLDOMDocument_get_documentElement( doc, &element ); - ok( r == S_OK, "should be a document element\n"); - ok( element != NULL, "should be an element\n"); - - if (element) - { - static const WCHAR szSSearch[] = {'S',':','s','e','a','r','c','h',0}; - BSTR tag = NULL; - - /* check if the tag is correct */ - r = IXMLDOMElement_get_tagName( element, &tag ); - ok( r == S_OK, "couldn't get tag name\n"); - ok( tag != NULL, "tag was null\n"); - ok( !lstrcmpW( tag, szSSearch ), "incorrect tag name\n"); - SysFreeString( tag ); - } - - if (element) - IXMLDOMElement_Release( element ); - ok(IXMLDOMDocument_Release( doc ) == 0, "document is not destroyed\n"); -} - -static void test_refs(void) -{ - HRESULT r; - BSTR str; - VARIANT_BOOL b; - IXMLDOMDocument *doc = NULL; - IXMLDOMElement *element = NULL; - IXMLDOMNode *node = NULL, *node2; - IXMLDOMNodeList *node_list = NULL; - LONG ref; - IUnknown *unk, *unk2; - - r = CoCreateInstance( &CLSID_DOMDocument, NULL, - CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (LPVOID*)&doc ); - ok( r == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", r ); - if( r != S_OK ) - return; - ref = IXMLDOMDocument_Release(doc); - ok( ref == 0, "ref %d\n", ref); - - r = CoCreateInstance( &CLSID_DOMDocument, NULL, - CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (LPVOID*)&doc ); - ok( r == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", r ); - if( r != S_OK ) - return; - - str = SysAllocString( szComplete4 ); - r = IXMLDOMDocument_loadXML( doc, str, &b ); - ok( r == S_OK, "loadXML failed\n"); - ok( b == VARIANT_TRUE, "failed to load XML string\n"); - SysFreeString( str ); - - ref = IXMLDOMDocument_AddRef( doc ); - ok( ref == 2, "ref %d\n", ref ); - ref = IXMLDOMDocument_AddRef( doc ); - ok( ref == 3, "ref %d\n", ref ); - IXMLDOMDocument_Release( doc ); - IXMLDOMDocument_Release( doc ); - - r = IXMLDOMDocument_get_documentElement( doc, &element ); - ok( r == S_OK, "should be a document element\n"); - ok( element != NULL, "should be an element\n"); - - ref = IXMLDOMDocument_AddRef( doc ); - ok( ref == 2, "ref %d\n", ref ); - IXMLDOMDocument_Release( doc ); - - r = IXMLDOMElement_get_childNodes( element, &node_list ); - ok( r == S_OK, "rets %08x\n", r); - - ref = IXMLDOMNodeList_AddRef( node_list ); - ok( ref == 2, "ref %d\n", ref ); - IXMLDOMNodeList_Release( node_list ); - - IXMLDOMNodeList_get_item( node_list, 0, &node ); - ok( r == S_OK, "rets %08x\n", r); - - IXMLDOMNodeList_get_item( node_list, 0, &node2 ); - ok( r == S_OK, "rets %08x\n", r); - - ref = IXMLDOMNode_AddRef( node ); - ok( ref == 2, "ref %d\n", ref ); - IXMLDOMNode_Release( node ); - - ref = IXMLDOMNode_Release( node ); - ok( ref == 0, "ref %d\n", ref ); - ref = IXMLDOMNode_Release( node2 ); - ok( ref == 0, "ref %d\n", ref ); - - ref = IXMLDOMNodeList_Release( node_list ); - ok( ref == 0, "ref %d\n", ref ); - - ok( node != node2, "node %p node2 %p\n", node, node2 ); - - ref = IXMLDOMDocument_Release( doc ); - ok( ref == 0, "ref %d\n", ref ); - - ref = IXMLDOMElement_AddRef( element ); - todo_wine { - ok( ref == 3, "ref %d\n", ref ); - } - IXMLDOMElement_Release( element ); - - /* IUnknown must be unique however we obtain it */ - r = IXMLDOMElement_QueryInterface( element, &IID_IUnknown, (LPVOID*)&unk ); - ok( r == S_OK, "rets %08x\n", r ); - r = IXMLDOMElement_QueryInterface( element, &IID_IXMLDOMNode, (LPVOID*)&node ); - ok( r == S_OK, "rets %08x\n", r ); - r = IXMLDOMNode_QueryInterface( node, &IID_IUnknown, (LPVOID*)&unk2 ); - ok( r == S_OK, "rets %08x\n", r ); - ok( unk == unk2, "unk %p unk2 %p\n", unk, unk2 ); - - IUnknown_Release( unk2 ); - IUnknown_Release( unk ); - IXMLDOMNode_Release( node ); - - IXMLDOMElement_Release( element ); - -} - -static void test_create(void) -{ - static const WCHAR szOne[] = {'1',0}; - static const WCHAR szOneGarbage[] = {'1','G','a','r','b','a','g','e',0}; - HRESULT r; - VARIANT var; - BSTR str, name; - IXMLDOMDocument *doc; - IXMLDOMElement *element; - IXMLDOMComment *comment; - IXMLDOMText *text; - IXMLDOMCDATASection *cdata; - IXMLDOMNode *root, *node, *child; - IXMLDOMNamedNodeMap *attr_map; - IUnknown *unk; - LONG ref; - LONG num; - - r = CoCreateInstance( &CLSID_DOMDocument, NULL, - CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (LPVOID*)&doc ); - ok( r == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", r ); - if( r != S_OK ) - return; - - /* types not supported for creation */ - V_VT(&var) = VT_I1; - V_I1(&var) = NODE_DOCUMENT; - node = (IXMLDOMNode*)0x1; - r = IXMLDOMDocument_createNode( doc, var, NULL, NULL, &node ); - ok( r == E_INVALIDARG, "returns %08x\n", r ); - ok( node == (void*)0x1, "expected same ptr, got %p\n", node); - - V_VT(&var) = VT_I1; - V_I1(&var) = NODE_DOCUMENT_TYPE; - node = (IXMLDOMNode*)0x1; - r = IXMLDOMDocument_createNode( doc, var, NULL, NULL, &node ); - ok( r == E_INVALIDARG, "returns %08x\n", r ); - ok( node == (void*)0x1, "expected same ptr, got %p\n", node); - - V_VT(&var) = VT_I1; - V_I1(&var) = NODE_ENTITY; - node = (IXMLDOMNode*)0x1; - r = IXMLDOMDocument_createNode( doc, var, NULL, NULL, &node ); - ok( r == E_INVALIDARG, "returns %08x\n", r ); - ok( node == (void*)0x1, "expected same ptr, got %p\n", node); - - V_VT(&var) = VT_I1; - V_I1(&var) = NODE_NOTATION; - node = (IXMLDOMNode*)0x1; - r = IXMLDOMDocument_createNode( doc, var, NULL, NULL, &node ); - ok( r == E_INVALIDARG, "returns %08x\n", r ); - ok( node == (void*)0x1, "expected same ptr, got %p\n", node); - - /* NODE_COMMENT */ - V_VT(&var) = VT_I1; - V_I1(&var) = NODE_COMMENT; - node = NULL; - r = IXMLDOMDocument_createNode( doc, var, NULL, NULL, &node ); - ok( r == S_OK, "returns %08x\n", r ); - ok( node != NULL, "\n"); - - r = IXMLDOMNode_QueryInterface(node, &IID_IXMLDOMComment, (void**)&comment); - ok( r == S_OK, "returns %08x\n", r ); - IXMLDOMNode_Release(node); - - str = NULL; - r = IXMLDOMComment_get_data(comment, &str); - ok( r == S_OK, "returns %08x\n", r ); - ok( str && SysStringLen(str) == 0, "expected empty comment, %p\n", str); - IXMLDOMComment_Release(comment); - SysFreeString(str); - - node = (IXMLDOMNode*)0x1; - r = IXMLDOMDocument_createNode( doc, var, _bstr_(""), NULL, &node ); - ok( r == S_OK, "returns %08x\n", r ); - - r = IXMLDOMNode_QueryInterface(node, &IID_IXMLDOMComment, (void**)&comment); - ok( r == S_OK, "returns %08x\n", r ); - IXMLDOMNode_Release(node); - - str = NULL; - r = IXMLDOMComment_get_data(comment, &str); - ok( r == S_OK, "returns %08x\n", r ); - ok( str && SysStringLen(str) == 0, "expected empty comment, %p\n", str); - IXMLDOMComment_Release(comment); - SysFreeString(str); - - node = (IXMLDOMNode*)0x1; - r = IXMLDOMDocument_createNode( doc, var, _bstr_("blah"), NULL, &node ); - ok( r == S_OK, "returns %08x\n", r ); - - r = IXMLDOMNode_QueryInterface(node, &IID_IXMLDOMComment, (void**)&comment); - ok( r == S_OK, "returns %08x\n", r ); - IXMLDOMNode_Release(node); - - str = NULL; - r = IXMLDOMComment_get_data(comment, &str); - ok( r == S_OK, "returns %08x\n", r ); - ok( str && SysStringLen(str) == 0, "expected empty comment, %p\n", str); - IXMLDOMComment_Release(comment); - SysFreeString(str); - - /* NODE_TEXT */ - V_VT(&var) = VT_I1; - V_I1(&var) = NODE_TEXT; - node = NULL; - r = IXMLDOMDocument_createNode( doc, var, NULL, NULL, &node ); - ok( r == S_OK, "returns %08x\n", r ); - ok( node != NULL, "\n"); - - r = IXMLDOMNode_QueryInterface(node, &IID_IXMLDOMText, (void**)&text); - ok( r == S_OK, "returns %08x\n", r ); - IXMLDOMNode_Release(node); - - str = NULL; - r = IXMLDOMText_get_data(text, &str); - ok( r == S_OK, "returns %08x\n", r ); - ok( str && SysStringLen(str) == 0, "expected empty comment, %p\n", str); - IXMLDOMText_Release(text); - SysFreeString(str); - - node = (IXMLDOMNode*)0x1; - r = IXMLDOMDocument_createNode( doc, var, _bstr_(""), NULL, &node ); - ok( r == S_OK, "returns %08x\n", r ); - - r = IXMLDOMNode_QueryInterface(node, &IID_IXMLDOMText, (void**)&text); - ok( r == S_OK, "returns %08x\n", r ); - IXMLDOMNode_Release(node); - - str = NULL; - r = IXMLDOMText_get_data(text, &str); - ok( r == S_OK, "returns %08x\n", r ); - ok( str && SysStringLen(str) == 0, "expected empty comment, %p\n", str); - IXMLDOMText_Release(text); - SysFreeString(str); - - node = (IXMLDOMNode*)0x1; - r = IXMLDOMDocument_createNode( doc, var, _bstr_("blah"), NULL, &node ); - ok( r == S_OK, "returns %08x\n", r ); - - r = IXMLDOMNode_QueryInterface(node, &IID_IXMLDOMText, (void**)&text); - ok( r == S_OK, "returns %08x\n", r ); - IXMLDOMNode_Release(node); - - str = NULL; - r = IXMLDOMText_get_data(text, &str); - ok( r == S_OK, "returns %08x\n", r ); - ok( str && SysStringLen(str) == 0, "expected empty comment, %p\n", str); - IXMLDOMText_Release(text); - SysFreeString(str); - - /* NODE_CDATA_SECTION */ - V_VT(&var) = VT_I1; - V_I1(&var) = NODE_CDATA_SECTION; - node = NULL; - r = IXMLDOMDocument_createNode( doc, var, NULL, NULL, &node ); - ok( r == S_OK, "returns %08x\n", r ); - ok( node != NULL, "\n"); - - r = IXMLDOMNode_QueryInterface(node, &IID_IXMLDOMCDATASection, (void**)&cdata); - ok( r == S_OK, "returns %08x\n", r ); - IXMLDOMNode_Release(node); - - str = NULL; - r = IXMLDOMCDATASection_get_data(cdata, &str); - ok( r == S_OK, "returns %08x\n", r ); - ok( str && SysStringLen(str) == 0, "expected empty comment, %p\n", str); - IXMLDOMCDATASection_Release(cdata); - SysFreeString(str); - - node = (IXMLDOMNode*)0x1; - r = IXMLDOMDocument_createNode( doc, var, _bstr_(""), NULL, &node ); - ok( r == S_OK, "returns %08x\n", r ); - - r = IXMLDOMNode_QueryInterface(node, &IID_IXMLDOMCDATASection, (void**)&cdata); - ok( r == S_OK, "returns %08x\n", r ); - IXMLDOMNode_Release(node); - - str = NULL; - r = IXMLDOMCDATASection_get_data(cdata, &str); - ok( r == S_OK, "returns %08x\n", r ); - ok( str && SysStringLen(str) == 0, "expected empty comment, %p\n", str); - IXMLDOMCDATASection_Release(cdata); - SysFreeString(str); - - node = (IXMLDOMNode*)0x1; - r = IXMLDOMDocument_createNode( doc, var, _bstr_("blah"), NULL, &node ); - ok( r == S_OK, "returns %08x\n", r ); - - r = IXMLDOMNode_QueryInterface(node, &IID_IXMLDOMCDATASection, (void**)&cdata); - ok( r == S_OK, "returns %08x\n", r ); - IXMLDOMNode_Release(node); - - str = NULL; - r = IXMLDOMCDATASection_get_data(cdata, &str); - ok( r == S_OK, "returns %08x\n", r ); - ok( str && SysStringLen(str) == 0, "expected empty comment, %p\n", str); - IXMLDOMCDATASection_Release(cdata); - SysFreeString(str); - - /* NODE_ATTRIBUTE */ - V_VT(&var) = VT_I1; - V_I1(&var) = NODE_ATTRIBUTE; - node = (IXMLDOMNode*)0x1; - r = IXMLDOMDocument_createNode( doc, var, NULL, NULL, &node ); - ok( r == E_FAIL, "returns %08x\n", r ); - ok( node == (void*)0x1, "expected same ptr, got %p\n", node); - - V_VT(&var) = VT_I1; - V_I1(&var) = NODE_ATTRIBUTE; - node = (IXMLDOMNode*)0x1; - r = IXMLDOMDocument_createNode( doc, var, _bstr_(""), NULL, &node ); - ok( r == E_FAIL, "returns %08x\n", r ); - ok( node == (void*)0x1, "expected same ptr, got %p\n", node); - - V_VT(&var) = VT_I1; - V_I1(&var) = NODE_ATTRIBUTE; - str = SysAllocString( szlc ); - r = IXMLDOMDocument_createNode( doc, var, str, NULL, &node ); - ok( r == S_OK, "returns %08x\n", r ); - if( SUCCEEDED(r) ) IXMLDOMNode_Release( node ); - SysFreeString(str); - - /* a name is required for attribute, try a BSTR with first null wchar */ - V_VT(&var) = VT_I1; - V_I1(&var) = NODE_ATTRIBUTE; - str = SysAllocString( szstr1 ); - str[0] = 0; - node = (IXMLDOMNode*)0x1; - r = IXMLDOMDocument_createNode( doc, var, str, NULL, &node ); - ok( r == E_FAIL, "returns %08x\n", r ); - ok( node == (void*)0x1, "expected same ptr, got %p\n", node); - SysFreeString(str); - - /* NODE_PROCESSING_INSTRUCTION */ - V_VT(&var) = VT_I1; - V_I1(&var) = NODE_PROCESSING_INSTRUCTION; - node = (IXMLDOMNode*)0x1; - r = IXMLDOMDocument_createNode( doc, var, NULL, NULL, &node ); - ok( r == E_FAIL, "returns %08x\n", r ); - ok( node == (void*)0x1, "expected same ptr, got %p\n", node); - - V_VT(&var) = VT_I1; - V_I1(&var) = NODE_PROCESSING_INSTRUCTION; - node = (IXMLDOMNode*)0x1; - r = IXMLDOMDocument_createNode( doc, var, _bstr_(""), NULL, &node ); - ok( r == E_FAIL, "returns %08x\n", r ); - ok( node == (void*)0x1, "expected same ptr, got %p\n", node); - - V_VT(&var) = VT_I1; - V_I1(&var) = NODE_PROCESSING_INSTRUCTION; - r = IXMLDOMDocument_createNode( doc, var, _bstr_("pi"), NULL, NULL ); - ok( r == E_INVALIDARG, "returns %08x\n", r ); - - /* NODE_ENTITY_REFERENCE */ - V_VT(&var) = VT_I1; - V_I1(&var) = NODE_ENTITY_REFERENCE; - node = (IXMLDOMNode*)0x1; - r = IXMLDOMDocument_createNode( doc, var, NULL, NULL, &node ); - ok( r == E_FAIL, "returns %08x\n", r ); - ok( node == (void*)0x1, "expected same ptr, got %p\n", node); - - V_VT(&var) = VT_I1; - V_I1(&var) = NODE_ENTITY_REFERENCE; - node = (IXMLDOMNode*)0x1; - r = IXMLDOMDocument_createNode( doc, var, _bstr_(""), NULL, &node ); - ok( r == E_FAIL, "returns %08x\n", r ); - ok( node == (void*)0x1, "expected same ptr, got %p\n", node); - - /* NODE_ELEMENT */ - V_VT(&var) = VT_I1; - V_I1(&var) = NODE_ELEMENT; - node = (IXMLDOMNode*)0x1; - r = IXMLDOMDocument_createNode( doc, var, NULL, NULL, &node ); - ok( r == E_FAIL, "returns %08x\n", r ); - ok( node == (void*)0x1, "expected same ptr, got %p\n", node); - - V_VT(&var) = VT_I1; - V_I1(&var) = NODE_ELEMENT; - node = (IXMLDOMNode*)0x1; - r = IXMLDOMDocument_createNode( doc, var, _bstr_(""), NULL, &node ); - ok( r == E_FAIL, "returns %08x\n", r ); - ok( node == (void*)0x1, "expected same ptr, got %p\n", node); - - V_VT(&var) = VT_I1; - V_I1(&var) = NODE_ELEMENT; - str = SysAllocString( szlc ); - r = IXMLDOMDocument_createNode( doc, var, str, NULL, &node ); - ok( r == S_OK, "returns %08x\n", r ); - if( SUCCEEDED(r) ) IXMLDOMNode_Release( node ); - - V_VT(&var) = VT_I1; - V_I1(&var) = NODE_ELEMENT; - r = IXMLDOMDocument_createNode( doc, var, str, NULL, NULL ); - ok( r == E_INVALIDARG, "returns %08x\n", r ); - - V_VT(&var) = VT_R4; - V_R4(&var) = NODE_ELEMENT; - r = IXMLDOMDocument_createNode( doc, var, str, NULL, &node ); - ok( r == S_OK, "returns %08x\n", r ); - if( SUCCEEDED(r) ) IXMLDOMNode_Release( node ); - - V_VT(&var) = VT_BSTR; - V_BSTR(&var) = SysAllocString( szOne ); - r = IXMLDOMDocument_createNode( doc, var, str, NULL, &node ); - ok( r == S_OK, "returns %08x\n", r ); - if( SUCCEEDED(r) ) IXMLDOMNode_Release( node ); - VariantClear(&var); - - V_VT(&var) = VT_BSTR; - V_BSTR(&var) = SysAllocString( szOneGarbage ); - r = IXMLDOMDocument_createNode( doc, var, str, NULL, &node ); - ok( r == E_INVALIDARG, "returns %08x\n", r ); - if( SUCCEEDED(r) ) IXMLDOMNode_Release( node ); - VariantClear(&var); - - V_VT(&var) = VT_I4; - V_I4(&var) = NODE_ELEMENT; - r = IXMLDOMDocument_createNode( doc, var, str, NULL, &node ); - ok( r == S_OK, "returns %08x\n", r ); - r = IXMLDOMDocument_appendChild( doc, node, &root ); - ok( r == S_OK, "returns %08x\n", r ); - ok( node == root, "%p %p\n", node, root ); - - ref = IXMLDOMNode_AddRef( node ); - ok(ref == 3, "ref %d\n", ref); - IXMLDOMNode_Release( node ); - - ref = IXMLDOMNode_Release( node ); - ok(ref == 1, "ref %d\n", ref); - SysFreeString( str ); - - V_VT(&var) = VT_I4; - V_I4(&var) = NODE_ELEMENT; - str = SysAllocString( szbs ); - r = IXMLDOMDocument_createNode( doc, var, str, NULL, &node ); - ok( r == S_OK, "returns %08x\n", r ); - SysFreeString( str ); - - ref = IXMLDOMNode_AddRef( node ); - ok(ref == 2, "ref = %d\n", ref); - IXMLDOMNode_Release( node ); - - r = IXMLDOMNode_QueryInterface( node, &IID_IUnknown, (LPVOID*)&unk ); - ok( r == S_OK, "returns %08x\n", r ); - - ref = IXMLDOMNode_AddRef( unk ); - ok(ref == 3, "ref = %d\n", ref); - IXMLDOMNode_Release( unk ); - - V_VT(&var) = VT_EMPTY; - r = IXMLDOMNode_insertBefore( root, (IXMLDOMNode*)unk, var, &child ); - ok( r == S_OK, "returns %08x\n", r ); - ok( unk == (IUnknown*)child, "%p %p\n", unk, child ); - IXMLDOMNode_Release( child ); - IUnknown_Release( unk ); - - - V_VT(&var) = VT_NULL; - V_DISPATCH(&var) = (IDispatch*)node; - r = IXMLDOMNode_insertBefore( root, node, var, &child ); - ok( r == S_OK, "returns %08x\n", r ); - ok( node == child, "%p %p\n", node, child ); - IXMLDOMNode_Release( child ); - - - V_VT(&var) = VT_NULL; - V_DISPATCH(&var) = (IDispatch*)node; - r = IXMLDOMNode_insertBefore( root, node, var, NULL ); - ok( r == S_OK, "returns %08x\n", r ); - IXMLDOMNode_Release( node ); - - r = IXMLDOMNode_QueryInterface( root, &IID_IXMLDOMElement, (LPVOID*)&element ); - ok( r == S_OK, "returns %08x\n", r ); - - r = IXMLDOMElement_get_attributes( element, &attr_map ); - ok( r == S_OK, "returns %08x\n", r ); - r = IXMLDOMNamedNodeMap_get_length( attr_map, &num ); - ok( r == S_OK, "returns %08x\n", r ); - ok( num == 0, "num %d\n", num ); - IXMLDOMNamedNodeMap_Release( attr_map ); - - V_VT(&var) = VT_BSTR; - V_BSTR(&var) = SysAllocString( szstr1 ); - name = SysAllocString( szdl ); - r = IXMLDOMElement_setAttribute( element, name, var ); - ok( r == S_OK, "returns %08x\n", r ); - r = IXMLDOMElement_get_attributes( element, &attr_map ); - ok( r == S_OK, "returns %08x\n", r ); - r = IXMLDOMNamedNodeMap_get_length( attr_map, &num ); - ok( r == S_OK, "returns %08x\n", r ); - ok( num == 1, "num %d\n", num ); - IXMLDOMNamedNodeMap_Release( attr_map ); - VariantClear(&var); - - V_VT(&var) = VT_BSTR; - V_BSTR(&var) = SysAllocString( szstr2 ); - r = IXMLDOMElement_setAttribute( element, name, var ); - ok( r == S_OK, "returns %08x\n", r ); - r = IXMLDOMElement_get_attributes( element, &attr_map ); - ok( r == S_OK, "returns %08x\n", r ); - r = IXMLDOMNamedNodeMap_get_length( attr_map, &num ); - ok( r == S_OK, "returns %08x\n", r ); - ok( num == 1, "num %d\n", num ); - IXMLDOMNamedNodeMap_Release( attr_map ); - VariantClear(&var); - r = IXMLDOMElement_getAttribute( element, name, &var ); - ok( r == S_OK, "returns %08x\n", r ); - ok( !lstrcmpW(V_BSTR(&var), szstr2), "wrong attr value\n"); - VariantClear(&var); - SysFreeString(name); - - V_VT(&var) = VT_BSTR; - V_BSTR(&var) = SysAllocString( szstr1 ); - name = SysAllocString( szlc ); - r = IXMLDOMElement_setAttribute( element, name, var ); - ok( r == S_OK, "returns %08x\n", r ); - r = IXMLDOMElement_get_attributes( element, &attr_map ); - ok( r == S_OK, "returns %08x\n", r ); - r = IXMLDOMNamedNodeMap_get_length( attr_map, &num ); - ok( r == S_OK, "returns %08x\n", r ); - ok( num == 2, "num %d\n", num ); - IXMLDOMNamedNodeMap_Release( attr_map ); - VariantClear(&var); - SysFreeString(name); - - V_VT(&var) = VT_I4; - V_I4(&var) = 10; - name = SysAllocString( szbs ); - r = IXMLDOMElement_setAttribute( element, name, var ); - ok( r == S_OK, "returns %08x\n", r ); - VariantClear(&var); - r = IXMLDOMElement_getAttribute( element, name, &var ); - ok( r == S_OK, "returns %08x\n", r ); - ok( V_VT(&var) == VT_BSTR, "variant type %x\n", V_VT(&var)); - VariantClear(&var); - SysFreeString(name); - - /* Create an Attribute */ - V_VT(&var) = VT_I4; - V_I4(&var) = NODE_ATTRIBUTE; - str = SysAllocString( szAttribute ); - r = IXMLDOMDocument_createNode( doc, var, str, NULL, &node ); - ok( r == S_OK, "returns %08x\n", r ); - ok( node != NULL, "node was null\n"); - SysFreeString(str); - - if(r == S_OK) - { - r = IXMLDOMNode_get_nodeTypeString(node, &str); - ok( r == S_OK, "returns %08x\n", r ); - ok( !lstrcmpW( str, _bstr_("attribute") ), "incorrect nodeTypeString string\n"); - SysFreeString(str); - IXMLDOMNode_Release( node ); - } - - IXMLDOMElement_Release( element ); - IXMLDOMNode_Release( root ); - IXMLDOMDocument_Release( doc ); -} - -static void test_getElementsByTagName(void) -{ - HRESULT r; - BSTR str; - VARIANT_BOOL b; - IXMLDOMDocument *doc; - IXMLDOMNodeList *node_list; - LONG len; - - r = CoCreateInstance( &CLSID_DOMDocument, NULL, - CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (LPVOID*)&doc ); - ok( r == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", r ); - if( r != S_OK ) - return; - - str = SysAllocString( szComplete4 ); - r = IXMLDOMDocument_loadXML( doc, str, &b ); - ok( r == S_OK, "loadXML failed\n"); - ok( b == VARIANT_TRUE, "failed to load XML string\n"); - SysFreeString( str ); - - str = SysAllocString( szstar ); - r = IXMLDOMDocument_getElementsByTagName(doc, str, &node_list); - ok( r == S_OK, "ret %08x\n", r ); - r = IXMLDOMNodeList_get_length( node_list, &len ); - ok( r == S_OK, "ret %08x\n", r ); - ok( len == 6, "len %d\n", len ); - - test_disp((IUnknown*)node_list); - - IXMLDOMNodeList_Release( node_list ); - SysFreeString( str ); - - str = SysAllocString( szbs ); - r = IXMLDOMDocument_getElementsByTagName(doc, str, &node_list); - ok( r == S_OK, "ret %08x\n", r ); - r = IXMLDOMNodeList_get_length( node_list, &len ); - ok( r == S_OK, "ret %08x\n", r ); - ok( len == 1, "len %d\n", len ); - IXMLDOMNodeList_Release( node_list ); - SysFreeString( str ); - - str = SysAllocString( szdl ); - r = IXMLDOMDocument_getElementsByTagName(doc, str, &node_list); - ok( r == S_OK, "ret %08x\n", r ); - r = IXMLDOMNodeList_get_length( node_list, &len ); - ok( r == S_OK, "ret %08x\n", r ); - ok( len == 0, "len %d\n", len ); - IXMLDOMNodeList_Release( node_list ); - SysFreeString( str ); - - str = SysAllocString( szstr1 ); - r = IXMLDOMDocument_getElementsByTagName(doc, str, &node_list); - ok( r == S_OK, "ret %08x\n", r ); - r = IXMLDOMNodeList_get_length( node_list, &len ); - ok( r == S_OK, "ret %08x\n", r ); - ok( len == 0, "len %d\n", len ); - IXMLDOMNodeList_Release( node_list ); - SysFreeString( str ); - - IXMLDOMDocument_Release( doc ); -} - -static void test_get_text(void) -{ - HRESULT r; - BSTR str; - VARIANT_BOOL b; - IXMLDOMDocument *doc; - IXMLDOMNode *node, *node2, *node3; - IXMLDOMNode *nodeRoot; - IXMLDOMNodeList *node_list; - IXMLDOMNamedNodeMap *node_map; - LONG len; - - r = CoCreateInstance( &CLSID_DOMDocument, NULL, - CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (LPVOID*)&doc ); - ok( r == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", r ); - if( r != S_OK ) - return; - - str = SysAllocString( szComplete4 ); - r = IXMLDOMDocument_loadXML( doc, str, &b ); - ok( r == S_OK, "loadXML failed\n"); - ok( b == VARIANT_TRUE, "failed to load XML string\n"); - SysFreeString( str ); - - str = SysAllocString( szbs ); - r = IXMLDOMDocument_getElementsByTagName( doc, str, &node_list ); - ok( r == S_OK, "ret %08x\n", r ); - SysFreeString(str); - - /* Test to get all child node text. */ - r = IXMLDOMDocument_QueryInterface(doc, &IID_IXMLDOMNode, (LPVOID*)&nodeRoot); - ok( r == S_OK, "ret %08x\n", r ); - if(r == S_OK) - { - r = IXMLDOMNode_get_text( nodeRoot, &str ); - ok( r == S_OK, "ret %08x\n", r ); - ok( compareIgnoreReturnsWhitespace(str, _bstr_("fn1.txt\n\n fn2.txt \n\nf1\n")), "wrong get_text\n"); - SysFreeString(str); - - IXMLDOMNode_Release(nodeRoot); - } - - if (0) { - /* this test crashes on win9x */ - r = IXMLDOMNodeList_QueryInterface(node_list, &IID_IDispatch, NULL); - ok( r == E_INVALIDARG, "ret %08x\n", r ); - } - - r = IXMLDOMNodeList_get_length( node_list, NULL ); - ok( r == E_INVALIDARG, "ret %08x\n", r ); - - r = IXMLDOMNodeList_get_length( node_list, &len ); - ok( r == S_OK, "ret %08x\n", r ); - ok( len == 1, "expect 1 got %d\n", len ); - - r = IXMLDOMNodeList_get_item( node_list, 0, NULL ); - ok( r == E_INVALIDARG, "ret %08x\n", r ); - - r = IXMLDOMNodeList_nextNode( node_list, NULL ); - ok( r == E_INVALIDARG, "ret %08x\n", r ); - - r = IXMLDOMNodeList_get_item( node_list, 0, &node ); - ok( r == S_OK, "ret %08x\n", r ); - IXMLDOMNodeList_Release( node_list ); - - /* Invalid output parameter*/ - r = IXMLDOMNode_get_text( node, NULL ); - ok( r == E_INVALIDARG, "ret %08x\n", r ); - - r = IXMLDOMNode_get_text( node, &str ); - ok( r == S_OK, "ret %08x\n", r ); - ok( !memcmp(str, szfn1_txt, lstrlenW(szfn1_txt) ), "wrong string\n" ); - SysFreeString(str); - - r = IXMLDOMNode_get_attributes( node, &node_map ); - ok( r == S_OK, "ret %08x\n", r ); - - str = SysAllocString( szvr ); - r = IXMLDOMNamedNodeMap_getNamedItem( node_map, str, &node2 ); - ok( r == S_OK, "ret %08x\n", r ); - SysFreeString(str); - - r = IXMLDOMNode_get_text( node2, &str ); - ok( r == S_OK, "ret %08x\n", r ); - ok( !memcmp(str, szstr2, sizeof(szstr2)), "wrong string\n" ); - SysFreeString(str); - - r = IXMLDOMNode_get_firstChild( node2, &node3 ); - ok( r == S_OK, "ret %08x\n", r ); - - r = IXMLDOMNode_get_text( node3, &str ); - ok( r == S_OK, "ret %08x\n", r ); - ok( !memcmp(str, szstr2, sizeof(szstr2)), "wrong string\n" ); - SysFreeString(str); - - - IXMLDOMNode_Release( node3 ); - IXMLDOMNode_Release( node2 ); - IXMLDOMNamedNodeMap_Release( node_map ); - IXMLDOMNode_Release( node ); - IXMLDOMDocument_Release( doc ); -} - -static void test_get_childNodes(void) -{ - HRESULT r; - BSTR str; - VARIANT_BOOL b; - IXMLDOMDocument *doc; - IXMLDOMElement *element; - IXMLDOMNode *node, *node2; - IXMLDOMNodeList *node_list, *node_list2; - LONG len; - - r = CoCreateInstance( &CLSID_DOMDocument, NULL, - CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (LPVOID*)&doc ); - ok( r == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", r ); - if( r != S_OK ) - return; - - str = SysAllocString( szComplete4 ); - r = IXMLDOMDocument_loadXML( doc, str, &b ); - ok( r == S_OK, "loadXML failed\n"); - ok( b == VARIANT_TRUE, "failed to load XML string\n"); - SysFreeString( str ); - - r = IXMLDOMDocument_get_documentElement( doc, &element ); - ok( r == S_OK, "ret %08x\n", r); - - r = IXMLDOMElement_get_childNodes( element, &node_list ); - ok( r == S_OK, "ret %08x\n", r); - - r = IXMLDOMNodeList_get_length( node_list, &len ); - ok( r == S_OK, "ret %08x\n", r); - ok( len == 4, "len %d\n", len); - - r = IXMLDOMNodeList_get_item( node_list, 2, &node ); - ok( r == S_OK, "ret %08x\n", r); - - r = IXMLDOMNode_get_childNodes( node, &node_list2 ); - ok( r == S_OK, "ret %08x\n", r); - - r = IXMLDOMNodeList_get_length( node_list2, &len ); - ok( r == S_OK, "ret %08x\n", r); - ok( len == 0, "len %d\n", len); - - r = IXMLDOMNodeList_get_item( node_list2, 0, &node2); - ok( r == S_FALSE, "ret %08x\n", r); - - IXMLDOMNodeList_Release( node_list2 ); - IXMLDOMNode_Release( node ); - IXMLDOMNodeList_Release( node_list ); - IXMLDOMElement_Release( element ); - IXMLDOMDocument_Release( doc ); -} - -static void test_get_firstChild(void) -{ - static WCHAR xmlW[] = {'x','m','l',0}; - IXMLDOMDocument *doc; - IXMLDOMNode *node; - VARIANT_BOOL b; - HRESULT r; - BSTR str; - - r = CoCreateInstance( &CLSID_DOMDocument, NULL, - CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (void**)&doc ); - ok( r == S_OK, "failed with 0x%08x\n", r ); - if( r != S_OK ) - return; - - str = SysAllocString( szComplete4 ); - r = IXMLDOMDocument_loadXML( doc, str, &b ); - ok( r == S_OK, "loadXML failed\n"); - ok( b == VARIANT_TRUE, "failed to load XML string\n"); - SysFreeString( str ); - - r = IXMLDOMDocument_get_firstChild( doc, &node ); - ok( r == S_OK, "ret %08x\n", r); - - r = IXMLDOMNode_get_nodeName( node, &str ); - ok( r == S_OK, "ret %08x\n", r); - - ok(memcmp(str, xmlW, sizeof(xmlW)) == 0, "expected \"xml\" node name\n"); - - SysFreeString(str); - IXMLDOMNode_Release( node ); - IXMLDOMDocument_Release( doc ); -} - -static void test_removeChild(void) -{ - HRESULT r; - BSTR str; - VARIANT_BOOL b; - IXMLDOMDocument *doc; - IXMLDOMElement *element, *lc_element; - IXMLDOMNode *fo_node, *ba_node, *removed_node, *temp_node, *lc_node; - IXMLDOMNodeList *root_list, *fo_list; - - r = CoCreateInstance( &CLSID_DOMDocument, NULL, - CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (LPVOID*)&doc ); - ok( r == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", r ); - if( r != S_OK ) - return; - - str = SysAllocString( szComplete4 ); - r = IXMLDOMDocument_loadXML( doc, str, &b ); - ok( r == S_OK, "loadXML failed\n"); - ok( b == VARIANT_TRUE, "failed to load XML string\n"); - SysFreeString( str ); - - r = IXMLDOMDocument_get_documentElement( doc, &element ); - ok( r == S_OK, "ret %08x\n", r); - - r = IXMLDOMElement_get_childNodes( element, &root_list ); - ok( r == S_OK, "ret %08x\n", r); - - r = IXMLDOMNodeList_get_item( root_list, 3, &fo_node ); - ok( r == S_OK, "ret %08x\n", r); - - r = IXMLDOMNode_get_childNodes( fo_node, &fo_list ); - ok( r == S_OK, "ret %08x\n", r); - - r = IXMLDOMNodeList_get_item( fo_list, 0, &ba_node ); - ok( r == S_OK, "ret %08x\n", r); - - /* invalid parameter: NULL ptr */ - removed_node = (void*)0xdeadbeef; - r = IXMLDOMElement_removeChild( element, NULL, &removed_node ); - ok( r == E_INVALIDARG, "ret %08x\n", r ); - ok( removed_node == (void*)0xdeadbeef, "%p\n", removed_node ); - - /* ba_node is a descendant of element, but not a direct child. */ - removed_node = (void*)0xdeadbeef; - r = IXMLDOMElement_removeChild( element, ba_node, &removed_node ); - ok( r == E_INVALIDARG, "ret %08x\n", r ); - ok( removed_node == NULL, "%p\n", removed_node ); - - r = IXMLDOMElement_removeChild( element, fo_node, &removed_node ); - ok( r == S_OK, "ret %08x\n", r); - ok( fo_node == removed_node, "node %p node2 %p\n", fo_node, removed_node ); - - /* try removing already removed child */ - temp_node = (void*)0xdeadbeef; - r = IXMLDOMElement_removeChild( element, fo_node, &temp_node ); - ok( r == E_INVALIDARG, "ret %08x\n", r); - ok( temp_node == NULL, "%p\n", temp_node ); - - /* the removed node has no parent anymore */ - r = IXMLDOMNode_get_parentNode( removed_node, &temp_node ); - ok( r == S_FALSE, "ret %08x\n", r); - ok( temp_node == NULL, "%p\n", temp_node ); - - IXMLDOMNode_Release( removed_node ); - IXMLDOMNode_Release( ba_node ); - IXMLDOMNodeList_Release( fo_list ); - - r = IXMLDOMNodeList_get_item( root_list, 0, &lc_node ); - ok( r == S_OK, "ret %08x\n", r); - - r = IXMLDOMElement_QueryInterface( lc_node, &IID_IXMLDOMElement, (LPVOID*)&lc_element ); - ok( r == S_OK, "ret %08x\n", r); - - /* MS quirk: passing wrong interface pointer works, too */ - r = IXMLDOMElement_removeChild( element, (IXMLDOMNode*)lc_element, NULL ); - ok( r == S_OK, "ret %08x\n", r); - - r = IXMLDOMNode_get_parentNode( lc_node, &temp_node ); - ok( r == S_FALSE, "ret %08x\n", r); - ok( temp_node == NULL, "%p\n", temp_node ); - - IXMLDOMNode_Release( lc_node ); - IXMLDOMNodeList_Release( root_list ); - IXMLDOMElement_Release( element ); - IXMLDOMDocument_Release( doc ); -} - -static void test_replaceChild(void) -{ - HRESULT r; - BSTR str; - VARIANT_BOOL b; - IXMLDOMDocument *doc; - IXMLDOMElement *element, *ba_element; - IXMLDOMNode *fo_node, *ba_node, *lc_node, *removed_node, *temp_node; - IXMLDOMNodeList *root_list, *fo_list; - IUnknown * unk1, *unk2; - LONG len; - - r = CoCreateInstance( &CLSID_DOMDocument, NULL, - CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (LPVOID*)&doc ); - ok( r == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", r ); - if( r != S_OK ) - return; - - str = SysAllocString( szComplete4 ); - r = IXMLDOMDocument_loadXML( doc, str, &b ); - ok( r == S_OK, "loadXML failed\n"); - ok( b == VARIANT_TRUE, "failed to load XML string\n"); - SysFreeString( str ); - - r = IXMLDOMDocument_get_documentElement( doc, &element ); - ok( r == S_OK, "ret %08x\n", r); - - r = IXMLDOMElement_get_childNodes( element, &root_list ); - ok( r == S_OK, "ret %08x\n", r); - - r = IXMLDOMNodeList_get_item( root_list, 0, &lc_node ); - ok( r == S_OK, "ret %08x\n", r); - - r = IXMLDOMNodeList_get_item( root_list, 3, &fo_node ); - ok( r == S_OK, "ret %08x\n", r); - - r = IXMLDOMNode_get_childNodes( fo_node, &fo_list ); - ok( r == S_OK, "ret %08x\n", r); - - r = IXMLDOMNodeList_get_item( fo_list, 0, &ba_node ); - ok( r == S_OK, "ret %08x\n", r); - - IXMLDOMNodeList_Release( fo_list ); - - /* invalid parameter: NULL ptr for element to remove */ - removed_node = (void*)0xdeadbeef; - r = IXMLDOMElement_replaceChild( element, ba_node, NULL, &removed_node ); - ok( r == E_INVALIDARG, "ret %08x\n", r ); - ok( removed_node == (void*)0xdeadbeef, "%p\n", removed_node ); - - /* invalid parameter: NULL for replacement element. (Sic!) */ - removed_node = (void*)0xdeadbeef; - r = IXMLDOMElement_replaceChild( element, NULL, fo_node, &removed_node ); - ok( r == E_INVALIDARG, "ret %08x\n", r ); - ok( removed_node == (void*)0xdeadbeef, "%p\n", removed_node ); - - /* invalid parameter: OldNode is not a child */ - removed_node = (void*)0xdeadbeef; - r = IXMLDOMElement_replaceChild( element, lc_node, ba_node, &removed_node ); - ok( r == E_INVALIDARG, "ret %08x\n", r ); - ok( removed_node == NULL, "%p\n", removed_node ); - - /* invalid parameter: would create loop */ - removed_node = (void*)0xdeadbeef; - r = IXMLDOMNode_replaceChild( fo_node, fo_node, ba_node, &removed_node ); - ok( r == E_FAIL, "ret %08x\n", r ); - ok( removed_node == NULL, "%p\n", removed_node ); - - r = IXMLDOMElement_replaceChild( element, ba_node, fo_node, NULL ); - ok( r == S_OK, "ret %08x\n", r ); - - r = IXMLDOMNodeList_get_item( root_list, 3, &temp_node ); - ok( r == S_OK, "ret %08x\n", r ); - - /* ba_node and temp_node refer to the same node, yet they - are different interface pointers */ - ok( ba_node != temp_node, "ba_node %p temp_node %p\n", ba_node, temp_node); - r = IXMLDOMNode_QueryInterface( temp_node, &IID_IUnknown, (void**)&unk1); - ok( r == S_OK, "ret %08x\n", r ); - r = IXMLDOMNode_QueryInterface( ba_node, &IID_IUnknown, (void**)&unk2); - ok( r == S_OK, "ret %08x\n", r ); - todo_wine ok( unk1 == unk2, "unk1 %p unk2 %p\n", unk1, unk2); - - IUnknown_Release( unk1 ); - IUnknown_Release( unk2 ); - - /* ba_node should have been removed from below fo_node */ - r = IXMLDOMNode_get_childNodes( fo_node, &fo_list ); - ok( r == S_OK, "ret %08x\n", r ); - - /* MS quirk: replaceChild also accepts elements instead of nodes */ - r = IXMLDOMNode_QueryInterface( ba_node, &IID_IXMLDOMElement, (void**)&ba_element); - ok( r == S_OK, "ret %08x\n", r ); - - r = IXMLDOMElement_replaceChild( element, ba_node, (IXMLDOMNode*)ba_element, &removed_node ); - ok( r == S_OK, "ret %08x\n", r ); - - r = IXMLDOMNodeList_get_length( fo_list, &len); - ok( r == S_OK, "ret %08x\n", r ); - ok( len == 0, "len %d\n", len); - - IXMLDOMNodeList_Release( fo_list ); - - IXMLDOMNode_Release(ba_node); - IXMLDOMNode_Release(fo_node); - IXMLDOMNode_Release(temp_node); - IXMLDOMNodeList_Release( root_list ); - IXMLDOMElement_Release( element ); - IXMLDOMDocument_Release( doc ); -} - -static void test_removeNamedItem(void) -{ - IXMLDOMDocument *doc; - IXMLDOMElement *element; - IXMLDOMNode *pr_node, *removed_node, *removed_node2; - IXMLDOMNodeList *root_list; - IXMLDOMNamedNodeMap * pr_attrs; - VARIANT_BOOL b; - BSTR str; - LONG len; - HRESULT r; - - r = CoCreateInstance( &CLSID_DOMDocument, NULL, - CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (LPVOID*)&doc ); - ok( r == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", r ); - if( r != S_OK ) - return; - - str = SysAllocString( szComplete4 ); - r = IXMLDOMDocument_loadXML( doc, str, &b ); - ok( r == S_OK, "loadXML failed\n"); - ok( b == VARIANT_TRUE, "failed to load XML string\n"); - SysFreeString( str ); - - r = IXMLDOMDocument_get_documentElement( doc, &element ); - ok( r == S_OK, "ret %08x\n", r); - - r = IXMLDOMElement_get_childNodes( element, &root_list ); - ok( r == S_OK, "ret %08x\n", r); - - r = IXMLDOMNodeList_get_item( root_list, 1, &pr_node ); - ok( r == S_OK, "ret %08x\n", r); - - r = IXMLDOMNode_get_attributes( pr_node, &pr_attrs ); - ok( r == S_OK, "ret %08x\n", r); - - r = IXMLDOMNamedNodeMap_get_length( pr_attrs, &len ); - ok( r == S_OK, "ret %08x\n", r); - ok( len == 3, "length %d\n", len); - - removed_node = (void*)0xdeadbeef; - r = IXMLDOMNamedNodeMap_removeNamedItem( pr_attrs, NULL, &removed_node); - ok ( r == E_INVALIDARG, "ret %08x\n", r); - ok ( removed_node == (void*)0xdeadbeef, "removed_node == %p\n", removed_node); - - removed_node = (void*)0xdeadbeef; - str = SysAllocString(szvr); - r = IXMLDOMNamedNodeMap_removeNamedItem( pr_attrs, str, &removed_node); - ok ( r == S_OK, "ret %08x\n", r); - - removed_node2 = (void*)0xdeadbeef; - r = IXMLDOMNamedNodeMap_removeNamedItem( pr_attrs, str, &removed_node2); - ok ( r == S_FALSE, "ret %08x\n", r); - ok ( removed_node2 == NULL, "removed_node == %p\n", removed_node2 ); - - r = IXMLDOMNamedNodeMap_get_length( pr_attrs, &len ); - ok( r == S_OK, "ret %08x\n", r); - ok( len == 2, "length %d\n", len); - - r = IXMLDOMNamedNodeMap_setNamedItem( pr_attrs, removed_node, NULL); - ok ( r == S_OK, "ret %08x\n", r); - IXMLDOMNode_Release(removed_node); - - r = IXMLDOMNamedNodeMap_get_length( pr_attrs, &len ); - ok( r == S_OK, "ret %08x\n", r); - ok( len == 3, "length %d\n", len); - - r = IXMLDOMNamedNodeMap_removeNamedItem( pr_attrs, str, NULL); - ok ( r == S_OK, "ret %08x\n", r); - - r = IXMLDOMNamedNodeMap_get_length( pr_attrs, &len ); - ok( r == S_OK, "ret %08x\n", r); - ok( len == 2, "length %d\n", len); - - r = IXMLDOMNamedNodeMap_removeNamedItem( pr_attrs, str, NULL); - ok ( r == S_FALSE, "ret %08x\n", r); - - SysFreeString(str); - - IXMLDOMNamedNodeMap_Release( pr_attrs ); - IXMLDOMNode_Release( pr_node ); - IXMLDOMNodeList_Release( root_list ); - IXMLDOMElement_Release( element ); - IXMLDOMDocument_Release( doc ); -} - -static void test_XMLHTTP(void) -{ - static const WCHAR wszBody[] = {'m','o','d','e','=','T','e','s','t',0}; - static WCHAR wszPOST[] = {'P','O','S','T',0}; - static WCHAR wszUrl[] = {'h','t','t','p',':','/','/', - 'c','r','o','s','s','o','v','e','r','.','c','o','d','e','w','e','a','v','e','r','s','.','c','o','m','/', - 'p','o','s','t','t','e','s','t','.','p','h','p',0}; - static const WCHAR wszExpectedResponse[] = {'F','A','I','L','E','D',0}; - IXMLHttpRequest *pXMLHttpRequest; - BSTR bstrResponse, str1, str2; - VARIANT dummy; - VARIANT varfalse; - VARIANT varbody; - HRESULT hr = CoCreateInstance(&CLSID_XMLHTTPRequest, NULL, - CLSCTX_INPROC_SERVER, &IID_IXMLHttpRequest, - (void **)&pXMLHttpRequest); - if (FAILED(hr)) - { - win_skip("IXMLHTTPRequest is not available (0x%08x)\n", hr); - return; - } - - VariantInit(&dummy); - V_VT(&dummy) = VT_ERROR; - V_ERROR(&dummy) = DISP_E_MEMBERNOTFOUND; - VariantInit(&varfalse); - V_VT(&varfalse) = VT_BOOL; - V_BOOL(&varfalse) = VARIANT_FALSE; - V_VT(&varbody) = VT_BSTR; - V_BSTR(&varbody) = SysAllocString(wszBody); - - str1 = SysAllocString(wszPOST); - str2 = SysAllocString(wszUrl); - hr = IXMLHttpRequest_open(pXMLHttpRequest, str1, str2, varfalse, dummy, dummy); - todo_wine ok(hr == S_OK, "IXMLHttpRequest_open should have succeeded instead of failing with 0x%08x\n", hr); - SysFreeString(str1); - SysFreeString(str2); - - hr = IXMLHttpRequest_send(pXMLHttpRequest, varbody); - if (hr == INET_E_RESOURCE_NOT_FOUND) - { - skip("No connection could be made with crossover.codeweavers.com\n"); - IXMLHttpRequest_Release(pXMLHttpRequest); - return; - } - todo_wine ok(hr == S_OK, "IXMLHttpRequest_send should have succeeded instead of failing with 0x%08x\n", hr); - VariantClear(&varbody); - - hr = IXMLHttpRequest_get_responseText(pXMLHttpRequest, &bstrResponse); - todo_wine ok(hr == S_OK, "IXMLHttpRequest_get_responseText should have succeeded instead of failing with 0x%08x\n", hr); - /* the server currently returns "FAILED" because the Content-Type header is - * not what the server expects */ - if(hr == S_OK) - { - ok(!memcmp(bstrResponse, wszExpectedResponse, sizeof(wszExpectedResponse)), "bstrResponse differs from what was expected\n"); - SysFreeString(bstrResponse); - } - - IXMLHttpRequest_Release(pXMLHttpRequest); -} - -static void test_IXMLDOMDocument2(void) -{ - HRESULT r; - VARIANT_BOOL b; - BSTR str; - IXMLDOMDocument *doc; - IXMLDOMDocument2 *doc2; - IDispatchEx *dispex; - VARIANT var; - int ref; - - r = CoCreateInstance( &CLSID_DOMDocument, NULL, - CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (LPVOID*)&doc ); - ok( r == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", r ); - if( r != S_OK ) - return; - - str = SysAllocString( szComplete4 ); - r = IXMLDOMDocument_loadXML( doc, str, &b ); - ok( r == S_OK, "loadXML failed\n"); - ok( b == VARIANT_TRUE, "failed to load XML string\n"); - SysFreeString( str ); - - r = IXMLDOMDocument_QueryInterface( doc, &IID_IXMLDOMDocument2, (void**)&doc2 ); - ok( r == S_OK, "ret %08x\n", r ); - ok( doc == (IXMLDOMDocument*)doc2, "interfaces differ\n"); - - r = IXMLDOMDocument_QueryInterface( doc, &IID_IDispatchEx, (void**)&dispex ); - ok( r == S_OK, "ret %08x\n", r ); - if(r == S_OK) - { - IDispatchEx_Release(dispex); - } - - /* we will check if the variant got cleared */ - ref = IXMLDOMDocument2_AddRef(doc2); - expect_eq(ref, 3, int, "%d"); /* doc, doc2, AddRef*/ - V_VT(&var) = VT_UNKNOWN; - V_UNKNOWN(&var) = (IUnknown *)doc2; - - /* invalid calls */ - ole_expect(IXMLDOMDocument2_getProperty(doc2, _bstr_("askldhfaklsdf"), &var), E_FAIL); - expect_eq(V_VT(&var), VT_UNKNOWN, int, "%x"); - ole_expect(IXMLDOMDocument2_getProperty(doc2, _bstr_("SelectionLanguage"), NULL), E_INVALIDARG); - - /* valid call */ - ole_check(IXMLDOMDocument2_getProperty(doc2, _bstr_("SelectionLanguage"), &var)); - expect_eq(V_VT(&var), VT_BSTR, int, "%x"); - expect_bstr_eq_and_free(V_BSTR(&var), "XSLPattern"); - V_VT(&var) = VT_R4; - - /* the variant didn't get cleared*/ - expect_eq(IXMLDOMDocument2_Release(doc2), 2, int, "%d"); - - /* setProperty tests */ - ole_expect(IXMLDOMDocument2_setProperty(doc2, _bstr_("askldhfaklsdf"), var), E_FAIL); - ole_expect(IXMLDOMDocument2_setProperty(doc2, _bstr_("SelectionLanguage"), var), E_FAIL); - ole_expect(IXMLDOMDocument2_setProperty(doc2, _bstr_("SelectionLanguage"), _variantbstr_("alskjdh faklsjd hfk")), E_FAIL); - ole_check(IXMLDOMDocument2_setProperty(doc2, _bstr_("SelectionLanguage"), _variantbstr_("XSLPattern"))); - ole_check(IXMLDOMDocument2_setProperty(doc2, _bstr_("SelectionLanguage"), _variantbstr_("XPath"))); - ole_check(IXMLDOMDocument2_setProperty(doc2, _bstr_("SelectionLanguage"), _variantbstr_("XSLPattern"))); - - /* contrary to what MSDN claims you can switch back from XPath to XSLPattern */ - ole_check(IXMLDOMDocument2_getProperty(doc2, _bstr_("SelectionLanguage"), &var)); - expect_eq(V_VT(&var), VT_BSTR, int, "%x"); - expect_bstr_eq_and_free(V_BSTR(&var), "XSLPattern"); - - IXMLDOMDocument2_Release( doc2 ); - IXMLDOMDocument_Release( doc ); - free_bstrs(); -} - -static void test_XPath(void) -{ - HRESULT r; - VARIANT var; - VARIANT_BOOL b; - IXMLDOMDocument2 *doc; - IXMLDOMNode *rootNode; - IXMLDOMNode *elem1Node; - IXMLDOMNode *node; - IXMLDOMNodeList *list; - - r = CoCreateInstance( &CLSID_DOMDocument, NULL, - CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument2, (LPVOID*)&doc ); - ok( r == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", r ); - if( r != S_OK ) - return; - - ole_check(IXMLDOMDocument_loadXML(doc, _bstr_(szExampleXML), &b)); - ok(b == VARIANT_TRUE, "failed to load XML string\n"); - - /* switch to XPath */ - ole_check(IXMLDOMDocument2_setProperty(doc, _bstr_("SelectionLanguage"), _variantbstr_("XPath"))); - - /* some simple queries*/ - ole_check(IXMLDOMDocument_selectNodes(doc, _bstr_("root"), &list)); - ole_check(IXMLDOMNodeList_get_item(list, 0, &rootNode)); - ole_check(IXMLDOMNodeList_reset(list)); - expect_list_and_release(list, "E2.D1"); - if (rootNode == NULL) - return; - - ole_check(IXMLDOMDocument_selectNodes(doc, _bstr_("root//c"), &list)); - expect_list_and_release(list, "E3.E1.E2.D1 E3.E2.E2.D1"); - - ole_check(IXMLDOMDocument_selectNodes(doc, _bstr_("//c[@type]"), &list)); - expect_list_and_release(list, "E3.E2.E2.D1"); - - ole_check(IXMLDOMNode_selectNodes(rootNode, _bstr_("elem"), &list)); - /* using get_item for query results advances the position */ - ole_check(IXMLDOMNodeList_get_item(list, 1, &node)); - expect_node(node, "E2.E2.D1"); - IXMLDOMNode_Release(node); - ole_check(IXMLDOMNodeList_nextNode(list, &node)); - expect_node(node, "E4.E2.D1"); - IXMLDOMNode_Release(node); - ole_check(IXMLDOMNodeList_reset(list)); - expect_list_and_release(list, "E1.E2.D1 E2.E2.D1 E4.E2.D1"); - - ole_check(IXMLDOMNode_selectNodes(rootNode, _bstr_("."), &list)); - expect_list_and_release(list, "E2.D1"); - - ole_check(IXMLDOMNode_selectNodes(rootNode, _bstr_("elem[3]/preceding-sibling::*"), &list)); - ole_check(IXMLDOMNodeList_get_item(list, 0, &elem1Node)); - ole_check(IXMLDOMNodeList_reset(list)); - expect_list_and_release(list, "E1.E2.D1 E2.E2.D1 E3.E2.D1"); - - /* select an attribute */ - ole_check(IXMLDOMNode_selectNodes(rootNode, _bstr_(".//@type"), &list)); - expect_list_and_release(list, "A'type'.E3.E2.E2.D1"); - - /* would evaluate to a number */ - ole_expect(IXMLDOMNode_selectNodes(rootNode, _bstr_("count(*)"), &list), E_FAIL); - /* would evaluate to a boolean */ - ole_expect(IXMLDOMNode_selectNodes(rootNode, _bstr_("position()>0"), &list), E_FAIL); - /* would evaluate to a string */ - ole_expect(IXMLDOMNode_selectNodes(rootNode, _bstr_("name()"), &list), E_FAIL); - - /* no results */ - ole_check(IXMLDOMNode_selectNodes(rootNode, _bstr_("c"), &list)); - expect_list_and_release(list, ""); - ole_check(IXMLDOMDocument_selectNodes(doc, _bstr_("elem//c"), &list)); - expect_list_and_release(list, ""); - ole_check(IXMLDOMDocument_selectNodes(doc, _bstr_("//elem[4]"), &list)); - expect_list_and_release(list, ""); - ole_check(IXMLDOMDocument_selectNodes(doc, _bstr_("root//elem[0]"), &list)); - expect_list_and_release(list, ""); - - /* foo undeclared in document node */ - ole_expect(IXMLDOMDocument_selectNodes(doc, _bstr_("root//foo:c"), &list), E_FAIL); - /* undeclared in node */ - ole_expect(IXMLDOMNode_selectNodes(rootNode, _bstr_(".//foo:c"), &list), E_FAIL); - /* undeclared in node */ - ole_expect(IXMLDOMNode_selectNodes(elem1Node, _bstr_("//foo:c"), &list), E_FAIL); - /* but this trick can be used */ - ole_check(IXMLDOMNode_selectNodes(elem1Node, _bstr_("//*[name()='foo:c']"), &list)); - expect_list_and_release(list, "E3.E4.E2.D1"); - - /* it has to be declared in SelectionNamespaces */ - todo_wine ole_check(IXMLDOMDocument2_setProperty(doc, _bstr_("SelectionNamespaces"), - _variantbstr_("xmlns:test='urn:uuid:86B2F87F-ACB6-45cd-8B77-9BDB92A01A29'"))); - - /* now the namespace can be used */ - todo_wine ole_check(IXMLDOMDocument_selectNodes(doc, _bstr_("root//test:c"), &list)); - todo_wine expect_list_and_release(list, "E3.E3.E2.D1 E3.E4.E2.D1"); - todo_wine ole_check(IXMLDOMNode_selectNodes(rootNode, _bstr_(".//test:c"), &list)); - todo_wine expect_list_and_release(list, "E3.E3.E2.D1 E3.E4.E2.D1"); - todo_wine ole_check(IXMLDOMNode_selectNodes(elem1Node, _bstr_("//test:c"), &list)); - todo_wine expect_list_and_release(list, "E3.E3.E2.D1 E3.E4.E2.D1"); - todo_wine ole_check(IXMLDOMNode_selectNodes(elem1Node, _bstr_(".//test:x"), &list)); - todo_wine expect_list_and_release(list, "E5.E1.E4.E1.E2.D1"); - - /* SelectionNamespaces syntax error - the namespaces doesn't work anymore but the value is stored */ - ole_expect(IXMLDOMDocument2_setProperty(doc, _bstr_("SelectionNamespaces"), - _variantbstr_("xmlns:test='urn:uuid:86B2F87F-ACB6-45cd-8B77-9BDB92A01A29' xmlns:foo=###")), E_FAIL); - - ole_expect(IXMLDOMDocument_selectNodes(doc, _bstr_("root//foo:c"), &list), E_FAIL); - - VariantInit(&var); - todo_wine ole_check(IXMLDOMDocument2_getProperty(doc, _bstr_("SelectionNamespaces"), &var)); - todo_wine expect_eq(V_VT(&var), VT_BSTR, int, "%x"); - if (V_VT(&var) == VT_BSTR) - expect_bstr_eq_and_free(V_BSTR(&var), "xmlns:test='urn:uuid:86B2F87F-ACB6-45cd-8B77-9BDB92A01A29' xmlns:foo=###"); - - /* extra attributes - same thing*/ - ole_expect(IXMLDOMDocument2_setProperty(doc, _bstr_("SelectionNamespaces"), - _variantbstr_("xmlns:test='urn:uuid:86B2F87F-ACB6-45cd-8B77-9BDB92A01A29' param='test'")), E_FAIL); - ole_expect(IXMLDOMDocument_selectNodes(doc, _bstr_("root//foo:c"), &list), E_FAIL); - - IXMLDOMNode_Release(rootNode); - IXMLDOMNode_Release(elem1Node); - IXMLDOMDocument_Release(doc); - free_bstrs(); -} - -static void test_cloneNode(void ) -{ - IXMLDOMDocument *doc = NULL; - VARIANT_BOOL b; - IXMLDOMNodeList *pList; - IXMLDOMNamedNodeMap *mapAttr; - LONG nLength = 0, nLength1 = 0; - LONG nAttrCnt = 0, nAttrCnt1 = 0; - IXMLDOMNode *node; - IXMLDOMNode *node_clone; - IXMLDOMNode *node_first; - HRESULT r; - BSTR str; - static const WCHAR szSearch[] = { 'l', 'c', '/', 'p', 'r', 0 }; - - r = CoCreateInstance( &CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument2, (LPVOID*)&doc ); - ok( r == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", r ); - if( r != S_OK ) - return; - - str = SysAllocString( szComplete4 ); - ole_check(IXMLDOMDocument_loadXML(doc, str, &b)); - ok(b == VARIANT_TRUE, "failed to load XML string\n"); - SysFreeString(str); - - if(!b) - return; - - str = SysAllocString( szSearch); - r = IXMLDOMNode_selectSingleNode(doc, str, &node); - ok( r == S_OK, "ret %08x\n", r ); - ok( node != NULL, "node %p\n", node ); - SysFreeString(str); - - if(!node) - { - IXMLDOMDocument_Release(doc); - return; - } - - /* Check invalid parameter */ - r = IXMLDOMNode_cloneNode(node, VARIANT_TRUE, NULL); - ok( r == E_INVALIDARG, "ret %08x\n", r ); - - /* All Children */ - r = IXMLDOMNode_cloneNode(node, VARIANT_TRUE, &node_clone); - ok( r == S_OK, "ret %08x\n", r ); - ok( node_clone != NULL, "node %p\n", node ); - - if(!node_clone) - { - IXMLDOMDocument_Release(doc); - IXMLDOMNode_Release(node); - return; - } - - r = IXMLDOMNode_get_firstChild(node_clone, &node_first); - ok( r == S_OK, "ret %08x\n", r ); - if(r == S_OK) - { - IXMLDOMDocument *doc2; - - r = IXMLDOMNode_get_ownerDocument(node_clone, &doc2); - ok( r == S_OK, "ret %08x\n", r ); - if(r == S_OK) - IXMLDOMDocument_Release(doc2); - - IXMLDOMNode_Release(node_first); - } - - r = IXMLDOMNode_get_childNodes(node, &pList); - ok( r == S_OK, "ret %08x\n", r ); - if (pList) - { - IXMLDOMNodeList_get_length(pList, &nLength); - IXMLDOMNodeList_Release(pList); - } - - r = IXMLDOMNode_get_attributes(node, &mapAttr); - ok( r == S_OK, "ret %08x\n", r ); - if(mapAttr) - { - IXMLDOMNamedNodeMap_get_length(mapAttr, &nAttrCnt); - IXMLDOMNamedNodeMap_Release(mapAttr); - } - - r = IXMLDOMNode_get_childNodes(node_clone, &pList); - ok( r == S_OK, "ret %08x\n", r ); - if (pList) - { - IXMLDOMNodeList_get_length(pList, &nLength1); - IXMLDOMNodeList_Release(pList); - } - - r = IXMLDOMNode_get_attributes(node_clone, &mapAttr); - ok( r == S_OK, "ret %08x\n", r ); - if(mapAttr) - { - IXMLDOMNamedNodeMap_get_length(mapAttr, &nAttrCnt1); - IXMLDOMNamedNodeMap_Release(mapAttr); - } - - ok(nLength == nLength1, "wrong Child count (%d, %d)\n", nLength, nLength1); - ok(nAttrCnt == nAttrCnt1, "wrong Attribute count (%d, %d)\n", nAttrCnt, nAttrCnt1); - IXMLDOMNode_Release(node_clone); - - /* No Children */ - r = IXMLDOMNode_cloneNode(node, VARIANT_FALSE, &node_clone); - ok( r == S_OK, "ret %08x\n", r ); - ok( node_clone != NULL, "node %p\n", node ); - - if(!node_clone) - { - IXMLDOMDocument_Release(doc); - IXMLDOMNode_Release(node); - return; - } - - r = IXMLDOMNode_get_firstChild(node_clone, &node_first); - ok( r == S_FALSE, "ret %08x\n", r ); - if(r == S_OK) - { - IXMLDOMDocument *doc2; - - r = IXMLDOMNode_get_ownerDocument(node_clone, &doc2); - ok( r == S_OK, "ret %08x\n", r ); - if(r == S_OK) - IXMLDOMDocument_Release(doc2); - - IXMLDOMNode_Release(node_first); - } - - r = IXMLDOMNode_get_childNodes(node_clone, &pList); - ok( r == S_OK, "ret %08x\n", r ); - if (pList) - { - IXMLDOMNodeList_get_length(pList, &nLength1); - ok( nLength1 == 0, "Length should be 0 (%d)\n", nLength1); - IXMLDOMNodeList_Release(pList); - } - - r = IXMLDOMNode_get_attributes(node_clone, &mapAttr); - ok( r == S_OK, "ret %08x\n", r ); - if(mapAttr) - { - IXMLDOMNamedNodeMap_get_length(mapAttr, &nAttrCnt1); - ok( nAttrCnt1 == 3, "Attribute count should be 3 (%d)\n", nAttrCnt1); - IXMLDOMNamedNodeMap_Release(mapAttr); - } - - ok(nLength != nLength1, "wrong Child count (%d, %d)\n", nLength, nLength1); - ok(nAttrCnt == nAttrCnt1, "wrong Attribute count (%d, %d)\n", nAttrCnt, nAttrCnt1); - IXMLDOMNode_Release(node_clone); - - - IXMLDOMNode_Release(node); - IXMLDOMDocument_Release(doc); -} - -static void test_xmlTypes(void) -{ - IXMLDOMDocument *doc = NULL; - IXMLDOMElement *pRoot; - HRESULT hr; - IXMLDOMComment *pComment; - IXMLDOMElement *pElement; - IXMLDOMAttribute *pAttribute; - IXMLDOMNamedNodeMap *pAttribs; - IXMLDOMCDATASection *pCDataSec; - IXMLDOMImplementation *pIXMLDOMImplementation = NULL; - IXMLDOMDocumentFragment *pDocFrag = NULL; - IXMLDOMEntityReference *pEntityRef = NULL; - BSTR str; - IXMLDOMNode *pNextChild = (IXMLDOMNode *)0x1; /* Used for testing Siblings */ - VARIANT v; - LONG len = 0; - - hr = CoCreateInstance( &CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument2, (LPVOID*)&doc ); - ok( hr == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", hr ); - if( hr != S_OK ) - return; - - hr = IXMLDOMDocument_get_nextSibling(doc, NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - hr = IXMLDOMDocument_get_nextSibling(doc, &pNextChild); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok(pNextChild == NULL, "pDocChild not NULL\n"); - - /* test previous Sibling */ - hr = IXMLDOMDocument_get_previousSibling(doc, NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - pNextChild = (IXMLDOMNode *)0x1; - hr = IXMLDOMDocument_get_previousSibling(doc, &pNextChild); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok(pNextChild == NULL, "pNextChild not NULL\n"); - - /* test get_attributes */ - hr = IXMLDOMDocument_get_attributes( doc, NULL ); - ok( hr == E_INVALIDARG, "get_attributes returned wrong code\n"); - - pAttribs = (IXMLDOMNamedNodeMap*)0x1; - hr = IXMLDOMDocument_get_attributes( doc, &pAttribs); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok( pAttribs == NULL, "pAttribs not NULL\n"); - - /* test get_dataType */ - hr = IXMLDOMDocument_get_dataType(doc, &v); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok( V_VT(&v) == VT_NULL, "incorrect dataType type\n"); - VariantClear(&v); - - /* test nodeTypeString */ - hr = IXMLDOMDocument_get_nodeTypeString(doc, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("document") ), "incorrect nodeTypeString string\n"); - SysFreeString(str); - - /* test implementation */ - hr = IXMLDOMDocument_get_implementation(doc, NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - hr = IXMLDOMDocument_get_implementation(doc, &pIXMLDOMImplementation); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - VARIANT_BOOL hasFeature = VARIANT_TRUE; - BSTR sEmpty = SysAllocStringLen(NULL, 0); - - hr = IXMLDOMImplementation_hasFeature(pIXMLDOMImplementation, NULL, sEmpty, &hasFeature); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - hr = IXMLDOMImplementation_hasFeature(pIXMLDOMImplementation, sEmpty, sEmpty, NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - hr = IXMLDOMImplementation_hasFeature(pIXMLDOMImplementation, _bstr_("DOM"), sEmpty, &hasFeature); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(hasFeature == VARIANT_FALSE, "hasFeature returned false\n"); - - hr = IXMLDOMImplementation_hasFeature(pIXMLDOMImplementation, sEmpty, sEmpty, &hasFeature); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(hasFeature == VARIANT_FALSE, "hasFeature returned true\n"); - - hr = IXMLDOMImplementation_hasFeature(pIXMLDOMImplementation, _bstr_("DOM"), NULL, &hasFeature); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(hasFeature == VARIANT_TRUE, "hasFeature returned false\n"); - - hr = IXMLDOMImplementation_hasFeature(pIXMLDOMImplementation, _bstr_("DOM"), sEmpty, &hasFeature); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(hasFeature == VARIANT_FALSE, "hasFeature returned false\n"); - - hr = IXMLDOMImplementation_hasFeature(pIXMLDOMImplementation, _bstr_("DOM"), _bstr_("1.0"), &hasFeature); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(hasFeature == VARIANT_TRUE, "hasFeature returned true\n"); - - hr = IXMLDOMImplementation_hasFeature(pIXMLDOMImplementation, _bstr_("XML"), _bstr_("1.0"), &hasFeature); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(hasFeature == VARIANT_TRUE, "hasFeature returned true\n"); - - hr = IXMLDOMImplementation_hasFeature(pIXMLDOMImplementation, _bstr_("MS-DOM"), _bstr_("1.0"), &hasFeature); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(hasFeature == VARIANT_TRUE, "hasFeature returned true\n"); - - hr = IXMLDOMImplementation_hasFeature(pIXMLDOMImplementation, _bstr_("SSS"), NULL, &hasFeature); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(hasFeature == VARIANT_FALSE, "hasFeature returned false\n"); - - SysFreeString(sEmpty); - IXMLDOMImplementation_Release(pIXMLDOMImplementation); - } - - pRoot = (IXMLDOMElement*)0x1; - hr = IXMLDOMDocument_createElement(doc, NULL, &pRoot); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - ok(pRoot == (void*)0x1, "Expect same ptr, got %p\n", pRoot); - - pRoot = (IXMLDOMElement*)0x1; - hr = IXMLDOMDocument_createElement(doc, _bstr_(""), &pRoot); - ok(hr == E_FAIL, "ret %08x\n", hr ); - ok(pRoot == (void*)0x1, "Expect same ptr, got %p\n", pRoot); - - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing"), &pRoot); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMDocument_appendChild(doc, (IXMLDOMNode*)pRoot, NULL); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - /* Comment */ - str = SysAllocString(szComment); - hr = IXMLDOMDocument_createComment(doc, str, &pComment); - SysFreeString(str); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - /* test get_attributes */ - hr = IXMLDOMComment_get_attributes( pComment, NULL ); - ok( hr == E_INVALIDARG, "get_attributes returned wrong code\n"); - - pAttribs = (IXMLDOMNamedNodeMap*)0x1; - hr = IXMLDOMComment_get_attributes( pComment, &pAttribs); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok( pAttribs == NULL, "pAttribs not NULL\n"); - - /* test nodeTypeString */ - hr = IXMLDOMComment_get_nodeTypeString(pComment, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("comment") ), "incorrect nodeTypeString string\n"); - SysFreeString(str); - - hr = IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pComment, NULL); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMComment_get_nodeName(pComment, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, szCommentNodeText ), "incorrect comment node Name\n"); - SysFreeString(str); - - hr = IXMLDOMComment_get_xml(pComment, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, szCommentXML ), "incorrect comment xml\n"); - SysFreeString(str); - - hr = IXMLDOMComment_get_dataType(pComment, &v); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok( V_VT(&v) == VT_NULL, "incorrect dataType type\n"); - VariantClear(&v); - - /* put data Tests */ - hr = IXMLDOMComment_put_data(pComment, _bstr_("This &is a ; test <>\\")); - ok(hr == S_OK, "ret %08x\n", hr ); - - /* get data Tests */ - hr = IXMLDOMComment_get_data(pComment, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("This &is a ; test <>\\") ), "incorrect get_data string\n"); - SysFreeString(str); - - /* get data Tests */ - hr = IXMLDOMComment_get_nodeValue(pComment, &v); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( V_VT(&v) == VT_BSTR, "incorrect dataType type\n"); - ok( !lstrcmpW( V_BSTR(&v), _bstr_("This &is a ; test <>\\") ), "incorrect get_nodeValue string\n"); - VariantClear(&v); - - /* Confirm XML text is good */ - hr = IXMLDOMComment_get_xml(pComment, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("") ), "incorrect xml string\n"); - SysFreeString(str); - - /* Confirm we get the put_data Text back */ - hr = IXMLDOMComment_get_text(pComment, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("This &is a ; test <>\\") ), "incorrect xml string\n"); - SysFreeString(str); - - /* test length property */ - hr = IXMLDOMComment_get_length(pComment, &len); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(len == 21, "expected 21 got %d\n", len); - - /* test substringData */ - hr = IXMLDOMComment_substringData(pComment, 0, 4, NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - /* test substringData - Invalid offset */ - str = (BSTR)&szElement; - hr = IXMLDOMComment_substringData(pComment, -1, 4, &str); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - ok( str == NULL, "incorrect string\n"); - - /* test substringData - Invalid offset */ - str = (BSTR)&szElement; - hr = IXMLDOMComment_substringData(pComment, 30, 0, &str); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok( str == NULL, "incorrect string\n"); - - /* test substringData - Invalid size */ - str = (BSTR)&szElement; - hr = IXMLDOMComment_substringData(pComment, 0, -1, &str); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - ok( str == NULL, "incorrect string\n"); - - /* test substringData - Invalid size */ - str = (BSTR)&szElement; - hr = IXMLDOMComment_substringData(pComment, 2, 0, &str); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok( str == NULL, "incorrect string\n"); - - /* test substringData - Start of string */ - hr = IXMLDOMComment_substringData(pComment, 0, 4, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("This") ), "incorrect substringData string\n"); - SysFreeString(str); - - /* test substringData - Middle of string */ - hr = IXMLDOMComment_substringData(pComment, 13, 4, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("test") ), "incorrect substringData string\n"); - SysFreeString(str); - - /* test substringData - End of string */ - hr = IXMLDOMComment_substringData(pComment, 20, 4, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("\\") ), "incorrect substringData string\n"); - SysFreeString(str); - - /* test appendData */ - hr = IXMLDOMComment_appendData(pComment, NULL); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMComment_appendData(pComment, _bstr_("")); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMComment_appendData(pComment, _bstr_("Append")); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMComment_get_text(pComment, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("This &is a ; test <>\\Append") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* test insertData */ - str = SysAllocStringLen(NULL, 0); - hr = IXMLDOMComment_insertData(pComment, -1, str); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMComment_insertData(pComment, -1, NULL); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMComment_insertData(pComment, 1000, str); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMComment_insertData(pComment, 1000, NULL); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMComment_insertData(pComment, 0, NULL); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMComment_insertData(pComment, 0, str); - ok(hr == S_OK, "ret %08x\n", hr ); - SysFreeString(str); - - hr = IXMLDOMComment_insertData(pComment, -1, _bstr_("Inserting")); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - hr = IXMLDOMComment_insertData(pComment, 1000, _bstr_("Inserting")); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - hr = IXMLDOMComment_insertData(pComment, 0, _bstr_("Begin ")); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMComment_insertData(pComment, 17, _bstr_("Middle")); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMComment_insertData(pComment, 39, _bstr_(" End")); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMComment_get_text(pComment, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("Begin This &is a Middle; test <>\\Append End") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* delete data */ - /* invalid arguments */ - hr = IXMLDOMComment_deleteData(pComment, -1, 1); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - hr = IXMLDOMComment_deleteData(pComment, 0, 0); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMComment_deleteData(pComment, 0, -1); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - hr = IXMLDOMComment_get_length(pComment, &len); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(len == 43, "expected 43 got %d\n", len); - - hr = IXMLDOMComment_deleteData(pComment, len, 1); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMComment_deleteData(pComment, len+1, 1); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - /* delete from start */ - hr = IXMLDOMComment_deleteData(pComment, 0, 5); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMComment_get_length(pComment, &len); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(len == 38, "expected 38 got %d\n", len); - - hr = IXMLDOMComment_get_text(pComment, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_(" This &is a Middle; test <>\\Append End") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* delete from end */ - hr = IXMLDOMComment_deleteData(pComment, 35, 3); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMComment_get_length(pComment, &len); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(len == 35, "expected 35 got %d\n", len); - - hr = IXMLDOMComment_get_text(pComment, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_(" This &is a Middle; test <>\\Append ") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* delete from inside */ - hr = IXMLDOMComment_deleteData(pComment, 1, 33); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMComment_get_length(pComment, &len); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(len == 2, "expected 2 got %d\n", len); - - hr = IXMLDOMComment_get_text(pComment, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_(" ") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* delete whole data ... */ - hr = IXMLDOMComment_get_length(pComment, &len); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMComment_deleteData(pComment, 0, len); - ok(hr == S_OK, "ret %08x\n", hr ); - /* ... and try again with empty string */ - hr = IXMLDOMComment_deleteData(pComment, 0, len); - ok(hr == S_OK, "ret %08x\n", hr ); - - /* ::replaceData() */ - V_VT(&v) = VT_BSTR; - V_BSTR(&v) = SysAllocString(szstr1); - hr = IXMLDOMComment_put_nodeValue(pComment, v); - ok(hr == S_OK, "ret %08x\n", hr ); - VariantClear(&v); - - hr = IXMLDOMComment_replaceData(pComment, 6, 0, NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - hr = IXMLDOMComment_get_text(pComment, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("str1") ), "incorrect get_text string\n"); - SysFreeString(str); - - hr = IXMLDOMComment_replaceData(pComment, 0, 0, NULL); - ok(hr == S_OK, "ret %08x\n", hr ); - hr = IXMLDOMComment_get_text(pComment, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("str1") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* NULL pointer means delete */ - hr = IXMLDOMComment_replaceData(pComment, 0, 1, NULL); - ok(hr == S_OK, "ret %08x\n", hr ); - hr = IXMLDOMComment_get_text(pComment, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("tr1") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* empty string means delete */ - hr = IXMLDOMComment_replaceData(pComment, 0, 1, _bstr_("")); - ok(hr == S_OK, "ret %08x\n", hr ); - hr = IXMLDOMComment_get_text(pComment, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("r1") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* zero count means insert */ - hr = IXMLDOMComment_replaceData(pComment, 0, 0, _bstr_("a")); - ok(hr == S_OK, "ret %08x\n", hr ); - hr = IXMLDOMComment_get_text(pComment, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("ar1") ), "incorrect get_text string\n"); - SysFreeString(str); - - hr = IXMLDOMComment_replaceData(pComment, 0, 2, NULL); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMComment_insertData(pComment, 0, _bstr_("m")); - ok(hr == S_OK, "ret %08x\n", hr ); - hr = IXMLDOMComment_get_text(pComment, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("m1") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* nonempty string, count greater than its length */ - hr = IXMLDOMComment_replaceData(pComment, 0, 2, _bstr_("a1.2")); - ok(hr == S_OK, "ret %08x\n", hr ); - hr = IXMLDOMComment_get_text(pComment, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("a1.2") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* nonempty string, count less than its length */ - hr = IXMLDOMComment_replaceData(pComment, 0, 1, _bstr_("wine")); - ok(hr == S_OK, "ret %08x\n", hr ); - hr = IXMLDOMComment_get_text(pComment, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("wine1.2") ), "incorrect get_text string\n"); - SysFreeString(str); - - IXMLDOMComment_Release(pComment); - } - - /* Element */ - str = SysAllocString(szElement); - hr = IXMLDOMDocument_createElement(doc, str, &pElement); - SysFreeString(str); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pElement, NULL); - ok(hr == S_OK, "ret %08x\n", hr ); - - /* test nodeTypeString */ - hr = IXMLDOMDocument_get_nodeTypeString(pElement, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("element") ), "incorrect nodeTypeString string\n"); - SysFreeString(str); - - hr = IXMLDOMElement_get_nodeName(pElement, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, szElement ), "incorrect element node Name\n"); - SysFreeString(str); - - hr = IXMLDOMElement_get_xml(pElement, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, szElementXML ), "incorrect element xml\n"); - SysFreeString(str); - - hr = IXMLDOMElement_get_dataType(pElement, &v); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok( V_VT(&v) == VT_NULL, "incorrect dataType type\n"); - VariantClear(&v); - - /* Attribute */ - pAttribute = (IXMLDOMAttribute*)0x1; - hr = IXMLDOMDocument_createAttribute(doc, NULL, &pAttribute); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - ok(pAttribute == (void*)0x1, "Expect same ptr, got %p\n", pAttribute); - - pAttribute = (IXMLDOMAttribute*)0x1; - hr = IXMLDOMDocument_createAttribute(doc, _bstr_(""), &pAttribute); - ok(hr == E_FAIL, "ret %08x\n", hr ); - ok(pAttribute == (void*)0x1, "Expect same ptr, got %p\n", pAttribute); - - str = SysAllocString(szAttribute); - hr = IXMLDOMDocument_createAttribute(doc, str, &pAttribute); - SysFreeString(str); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMNode *pNewChild = (IXMLDOMNode *)0x1; - - hr = IXMLDOMAttribute_get_nextSibling(pAttribute, NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - pNextChild = (IXMLDOMNode *)0x1; - hr = IXMLDOMAttribute_get_nextSibling(pAttribute, &pNextChild); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok(pNextChild == NULL, "pNextChild not NULL\n"); - - /* test Previous Sibling*/ - hr = IXMLDOMAttribute_get_previousSibling(pAttribute, NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - pNextChild = (IXMLDOMNode *)0x1; - hr = IXMLDOMAttribute_get_previousSibling(pAttribute, &pNextChild); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok(pNextChild == NULL, "pNextChild not NULL\n"); - - /* test get_attributes */ - hr = IXMLDOMAttribute_get_attributes( pAttribute, NULL ); - ok( hr == E_INVALIDARG, "get_attributes returned wrong code\n"); - - pAttribs = (IXMLDOMNamedNodeMap*)0x1; - hr = IXMLDOMAttribute_get_attributes( pAttribute, &pAttribs); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok( pAttribs == NULL, "pAttribs not NULL\n"); - - hr = IXMLDOMElement_appendChild(pElement, (IXMLDOMNode*)pAttribute, &pNewChild); - ok(hr == E_FAIL, "ret %08x\n", hr ); - ok(pNewChild == NULL, "pNewChild not NULL\n"); - - hr = IXMLDOMElement_get_attributes(pElement, &pAttribs); - ok(hr == S_OK, "ret %08x\n", hr ); - if ( hr == S_OK ) - { - hr = IXMLDOMNamedNodeMap_setNamedItem(pAttribs, (IXMLDOMNode*)pAttribute, NULL ); - ok(hr == S_OK, "ret %08x\n", hr ); - - IXMLDOMNamedNodeMap_Release(pAttribs); - } - - hr = IXMLDOMAttribute_get_nodeName(pAttribute, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, szAttribute ), "incorrect attribute node Name\n"); - SysFreeString(str); - - /* test nodeTypeString */ - hr = IXMLDOMAttribute_get_nodeTypeString(pAttribute, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("attribute") ), "incorrect nodeTypeString string\n"); - SysFreeString(str); - - /* test nodeName */ - hr = IXMLDOMAttribute_get_nodeName(pAttribute, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, szAttribute ), "incorrect nodeName string\n"); - SysFreeString(str); - - /* test name property */ - hr = IXMLDOMAttribute_get_name(pAttribute, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, szAttribute ), "incorrect name string\n"); - SysFreeString(str); - - hr = IXMLDOMAttribute_get_xml(pAttribute, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, szAttributeXML ), "incorrect attribute xml\n"); - SysFreeString(str); - - hr = IXMLDOMAttribute_get_dataType(pAttribute, &v); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok( V_VT(&v) == VT_NULL, "incorrect dataType type\n"); - VariantClear(&v); - - IXMLDOMAttribute_Release(pAttribute); - - /* Check Element again with the Add Attribute*/ - hr = IXMLDOMElement_get_xml(pElement, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, szElementXML2 ), "incorrect element xml\n"); - SysFreeString(str); - } - - hr = IXMLDOMElement_put_text(pElement, _bstr_("TestingNode")); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMElement_get_xml(pElement, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, szElementXML3 ), "incorrect element xml\n"); - SysFreeString(str); - - /* Test for reversible escaping */ - str = SysAllocString( szStrangeChars ); - hr = IXMLDOMElement_put_text(pElement, str); - ok(hr == S_OK, "ret %08x\n", hr ); - SysFreeString( str ); - - hr = IXMLDOMElement_get_xml(pElement, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, szElementXML4 ), "incorrect element xml\n"); - SysFreeString(str); - - hr = IXMLDOMElement_get_text(pElement, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, szStrangeChars ), "incorrect element text\n"); - SysFreeString(str); - - IXMLDOMElement_Release(pElement); - } - - /* CData Section */ - str = SysAllocString(szCData); - hr = IXMLDOMDocument_createCDATASection(doc, str, NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - hr = IXMLDOMDocument_createCDATASection(doc, str, &pCDataSec); - SysFreeString(str); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMNode *pNextChild = (IXMLDOMNode *)0x1; - VARIANT var; - - VariantInit(&var); - - hr = IXMLDOMCDATASection_QueryInterface(pCDataSec, &IID_IXMLDOMElement, (LPVOID*)&pElement); - ok(hr == E_NOINTERFACE, "ret %08x\n", hr); - - hr = IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pCDataSec, NULL); - ok(hr == S_OK, "ret %08x\n", hr ); - - /* get Attribute Tests */ - hr = IXMLDOMCDATASection_get_attributes(pCDataSec, NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - pAttribs = (IXMLDOMNamedNodeMap*)0x1; - hr = IXMLDOMCDATASection_get_attributes(pCDataSec, &pAttribs); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok(pAttribs == NULL, "pAttribs != NULL\n"); - - hr = IXMLDOMCDATASection_get_nodeName(pCDataSec, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, szCDataNodeText ), "incorrect cdata node Name\n"); - SysFreeString(str); - - hr = IXMLDOMCDATASection_get_xml(pCDataSec, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, szCDataXML ), "incorrect cdata xml\n"); - SysFreeString(str); - - /* test lastChild */ - pNextChild = (IXMLDOMNode*)0x1; - hr = IXMLDOMCDATASection_get_lastChild(pCDataSec, &pNextChild); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok(pNextChild == NULL, "pNextChild not NULL\n"); - - /* test get_dataType */ - hr = IXMLDOMCDATASection_get_dataType(pCDataSec, NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - hr = IXMLDOMCDATASection_get_dataType(pCDataSec, &v); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok( V_VT(&v) == VT_NULL, "incorrect dataType type\n"); - VariantClear(&v); - - /* test nodeTypeString */ - hr = IXMLDOMCDATASection_get_nodeTypeString(pCDataSec, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("cdatasection") ), "incorrect nodeTypeString string\n"); - SysFreeString(str); - - /* put data Tests */ - hr = IXMLDOMCDATASection_put_data(pCDataSec, _bstr_("This &is a ; test <>\\")); - ok(hr == S_OK, "ret %08x\n", hr ); - - /* Confirm XML text is good */ - hr = IXMLDOMCDATASection_get_xml(pCDataSec, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("\\]]>") ), "incorrect xml string\n"); - SysFreeString(str); - - /* Confirm we get the put_data Text back */ - hr = IXMLDOMCDATASection_get_text(pCDataSec, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("This &is a ; test <>\\") ), "incorrect text string\n"); - SysFreeString(str); - - /* test length property */ - hr = IXMLDOMCDATASection_get_length(pCDataSec, &len); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(len == 21, "expected 21 got %d\n", len); - - /* test get nodeValue */ - hr = IXMLDOMCDATASection_get_nodeValue(pCDataSec, &var); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(V_VT(&var) == VT_BSTR, "got vt %04x\n", V_VT(&var)); - ok( !lstrcmpW( V_BSTR(&var), _bstr_("This &is a ; test <>\\") ), "incorrect text string\n"); - VariantClear(&var); - - /* test get data */ - hr = IXMLDOMCDATASection_get_data(pCDataSec, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("This &is a ; test <>\\") ), "incorrect text string\n"); - SysFreeString(str); - - /* test substringData */ - hr = IXMLDOMCDATASection_substringData(pCDataSec, 0, 4, NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - /* test substringData - Invalid offset */ - str = (BSTR)&szElement; - hr = IXMLDOMCDATASection_substringData(pCDataSec, -1, 4, &str); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - ok( str == NULL, "incorrect string\n"); - - /* test substringData - Invalid offset */ - str = (BSTR)&szElement; - hr = IXMLDOMCDATASection_substringData(pCDataSec, 30, 0, &str); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok( str == NULL, "incorrect string\n"); - - /* test substringData - Invalid size */ - str = (BSTR)&szElement; - hr = IXMLDOMCDATASection_substringData(pCDataSec, 0, -1, &str); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - ok( str == NULL, "incorrect string\n"); - - /* test substringData - Invalid size */ - str = (BSTR)&szElement; - hr = IXMLDOMCDATASection_substringData(pCDataSec, 2, 0, &str); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok( str == NULL, "incorrect string\n"); - - /* test substringData - Start of string */ - hr = IXMLDOMCDATASection_substringData(pCDataSec, 0, 4, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("This") ), "incorrect substringData string\n"); - SysFreeString(str); - - /* test substringData - Middle of string */ - hr = IXMLDOMCDATASection_substringData(pCDataSec, 13, 4, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("test") ), "incorrect substringData string\n"); - SysFreeString(str); - - /* test substringData - End of string */ - hr = IXMLDOMCDATASection_substringData(pCDataSec, 20, 4, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("\\") ), "incorrect substringData string\n"); - SysFreeString(str); - - /* test appendData */ - hr = IXMLDOMCDATASection_appendData(pCDataSec, NULL); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMCDATASection_appendData(pCDataSec, _bstr_("")); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMCDATASection_appendData(pCDataSec, _bstr_("Append")); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMCDATASection_get_text(pCDataSec, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("This &is a ; test <>\\Append") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* test insertData */ - str = SysAllocStringLen(NULL, 0); - hr = IXMLDOMCDATASection_insertData(pCDataSec, -1, str); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMCDATASection_insertData(pCDataSec, -1, NULL); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMCDATASection_insertData(pCDataSec, 1000, str); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMCDATASection_insertData(pCDataSec, 1000, NULL); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMCDATASection_insertData(pCDataSec, 0, NULL); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMCDATASection_insertData(pCDataSec, 0, str); - ok(hr == S_OK, "ret %08x\n", hr ); - SysFreeString(str); - - hr = IXMLDOMCDATASection_insertData(pCDataSec, -1, _bstr_("Inserting")); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - hr = IXMLDOMCDATASection_insertData(pCDataSec, 1000, _bstr_("Inserting")); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - hr = IXMLDOMCDATASection_insertData(pCDataSec, 0, _bstr_("Begin ")); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMCDATASection_insertData(pCDataSec, 17, _bstr_("Middle")); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMCDATASection_insertData(pCDataSec, 39, _bstr_(" End")); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMCDATASection_get_text(pCDataSec, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("Begin This &is a Middle; test <>\\Append End") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* delete data */ - /* invalid arguments */ - hr = IXMLDOMCDATASection_deleteData(pCDataSec, -1, 1); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - hr = IXMLDOMCDATASection_deleteData(pCDataSec, 0, 0); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMCDATASection_deleteData(pCDataSec, 0, -1); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - hr = IXMLDOMCDATASection_get_length(pCDataSec, &len); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(len == 43, "expected 43 got %d\n", len); - - hr = IXMLDOMCDATASection_deleteData(pCDataSec, len, 1); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMCDATASection_deleteData(pCDataSec, len+1, 1); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - /* delete from start */ - hr = IXMLDOMCDATASection_deleteData(pCDataSec, 0, 5); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMCDATASection_get_length(pCDataSec, &len); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(len == 38, "expected 38 got %d\n", len); - - hr = IXMLDOMCDATASection_get_text(pCDataSec, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_(" This &is a Middle; test <>\\Append End") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* delete from end */ - hr = IXMLDOMCDATASection_deleteData(pCDataSec, 35, 3); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMCDATASection_get_length(pCDataSec, &len); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(len == 35, "expected 35 got %d\n", len); - - hr = IXMLDOMCDATASection_get_text(pCDataSec, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_(" This &is a Middle; test <>\\Append ") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* delete from inside */ - hr = IXMLDOMCDATASection_deleteData(pCDataSec, 1, 33); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMCDATASection_get_length(pCDataSec, &len); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(len == 2, "expected 2 got %d\n", len); - - hr = IXMLDOMCDATASection_get_text(pCDataSec, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_(" ") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* delete whole data ... */ - hr = IXMLDOMCDATASection_get_length(pCDataSec, &len); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMCDATASection_deleteData(pCDataSec, 0, len); - ok(hr == S_OK, "ret %08x\n", hr ); - - /* ... and try again with empty string */ - hr = IXMLDOMCDATASection_deleteData(pCDataSec, 0, len); - ok(hr == S_OK, "ret %08x\n", hr ); - - /* ::replaceData() */ - V_VT(&v) = VT_BSTR; - V_BSTR(&v) = SysAllocString(szstr1); - hr = IXMLDOMCDATASection_put_nodeValue(pCDataSec, v); - ok(hr == S_OK, "ret %08x\n", hr ); - VariantClear(&v); - - hr = IXMLDOMCDATASection_replaceData(pCDataSec, 6, 0, NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - hr = IXMLDOMCDATASection_get_text(pCDataSec, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("str1") ), "incorrect get_text string\n"); - SysFreeString(str); - - hr = IXMLDOMCDATASection_replaceData(pCDataSec, 0, 0, NULL); - ok(hr == S_OK, "ret %08x\n", hr ); - hr = IXMLDOMCDATASection_get_text(pCDataSec, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("str1") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* NULL pointer means delete */ - hr = IXMLDOMCDATASection_replaceData(pCDataSec, 0, 1, NULL); - ok(hr == S_OK, "ret %08x\n", hr ); - hr = IXMLDOMCDATASection_get_text(pCDataSec, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("tr1") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* empty string means delete */ - hr = IXMLDOMCDATASection_replaceData(pCDataSec, 0, 1, _bstr_("")); - ok(hr == S_OK, "ret %08x\n", hr ); - hr = IXMLDOMCDATASection_get_text(pCDataSec, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("r1") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* zero count means insert */ - hr = IXMLDOMCDATASection_replaceData(pCDataSec, 0, 0, _bstr_("a")); - ok(hr == S_OK, "ret %08x\n", hr ); - hr = IXMLDOMCDATASection_get_text(pCDataSec, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("ar1") ), "incorrect get_text string\n"); - SysFreeString(str); - - hr = IXMLDOMCDATASection_replaceData(pCDataSec, 0, 2, NULL); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMCDATASection_insertData(pCDataSec, 0, _bstr_("m")); - ok(hr == S_OK, "ret %08x\n", hr ); - hr = IXMLDOMCDATASection_get_text(pCDataSec, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("m1") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* nonempty string, count greater than its length */ - hr = IXMLDOMCDATASection_replaceData(pCDataSec, 0, 2, _bstr_("a1.2")); - ok(hr == S_OK, "ret %08x\n", hr ); - hr = IXMLDOMCDATASection_get_text(pCDataSec, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("a1.2") ), "incorrect get_text string\n"); - SysFreeString(str); - - /* nonempty string, count less than its length */ - hr = IXMLDOMCDATASection_replaceData(pCDataSec, 0, 1, _bstr_("wine")); - ok(hr == S_OK, "ret %08x\n", hr ); - hr = IXMLDOMCDATASection_get_text(pCDataSec, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("wine1.2") ), "incorrect get_text string\n"); - SysFreeString(str); - - IXMLDOMCDATASection_Release(pCDataSec); - } - - /* Document Fragments */ - hr = IXMLDOMDocument_createDocumentFragment(doc, NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - hr = IXMLDOMDocument_createDocumentFragment(doc, &pDocFrag); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMNode *node; - - hr = IXMLDOMDocumentFragment_get_parentNode(pDocFrag, NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - node = (IXMLDOMNode *)0x1; - hr = IXMLDOMDocumentFragment_get_parentNode(pDocFrag, &node); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok(node == NULL, "expected NULL, got %p\n", node); - - hr = IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pDocFrag, NULL); - ok(hr == S_OK, "ret %08x\n", hr ); - - /* get Attribute Tests */ - hr = IXMLDOMDocumentFragment_get_attributes(pDocFrag, NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - pAttribs = (IXMLDOMNamedNodeMap*)0x1; - hr = IXMLDOMDocumentFragment_get_attributes(pDocFrag, &pAttribs); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok(pAttribs == NULL, "pAttribs != NULL\n"); - - hr = IXMLDOMDocumentFragment_get_nodeName(pDocFrag, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, szDocFragmentText ), "incorrect docfragment node Name\n"); - SysFreeString(str); - - /* test next Sibling*/ - hr = IXMLDOMDocumentFragment_get_nextSibling(pDocFrag, NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - node = (IXMLDOMNode *)0x1; - hr = IXMLDOMDocumentFragment_get_nextSibling(pDocFrag, &node); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok(node == NULL, "next sibling not NULL\n"); - - /* test Previous Sibling*/ - hr = IXMLDOMDocumentFragment_get_previousSibling(pDocFrag, NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - node = (IXMLDOMNode *)0x1; - hr = IXMLDOMDocumentFragment_get_previousSibling(pDocFrag, &node); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok(node == NULL, "previous sibling not NULL\n"); - - /* test get_dataType */ - hr = IXMLDOMDocumentFragment_get_dataType(pDocFrag, NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - hr = IXMLDOMDocumentFragment_get_dataType(pDocFrag, &v); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok( V_VT(&v) == VT_NULL, "incorrect dataType type\n"); - VariantClear(&v); - - /* test nodeTypeString */ - hr = IXMLDOMDocumentFragment_get_nodeTypeString(pDocFrag, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("documentfragment") ), "incorrect nodeTypeString string\n"); - SysFreeString(str); - - IXMLDOMDocumentFragment_Release(pDocFrag); - } - - /* Entity References */ - hr = IXMLDOMDocument_createEntityReference(doc, NULL, &pEntityRef); - ok(hr == E_FAIL, "ret %08x\n", hr ); - hr = IXMLDOMDocument_createEntityReference(doc, _bstr_(""), &pEntityRef); - ok(hr == E_FAIL, "ret %08x\n", hr ); - - str = SysAllocString(szEntityRef); - hr = IXMLDOMDocument_createEntityReference(doc, str, NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - hr = IXMLDOMDocument_createEntityReference(doc, str, &pEntityRef); - SysFreeString(str); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pEntityRef, NULL); - ok(hr == S_OK, "ret %08x\n", hr ); - - /* get Attribute Tests */ - hr = IXMLDOMEntityReference_get_attributes(pEntityRef, NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - pAttribs = (IXMLDOMNamedNodeMap*)0x1; - hr = IXMLDOMEntityReference_get_attributes(pEntityRef, &pAttribs); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok(pAttribs == NULL, "pAttribs != NULL\n"); - - /* test dataType */ - hr = IXMLDOMEntityReference_get_dataType(pEntityRef, &v); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok( V_VT(&v) == VT_NULL, "incorrect dataType type\n"); - VariantClear(&v); - - /* test nodeTypeString */ - hr = IXMLDOMEntityReference_get_nodeTypeString(pEntityRef, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("entityreference") ), "incorrect nodeTypeString string\n"); - SysFreeString(str); - - /* test get_xml*/ - hr = IXMLDOMEntityReference_get_xml(pEntityRef, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, szEntityRefXML ), "incorrect xml string\n"); - SysFreeString(str); - - IXMLDOMEntityReference_Release(pEntityRef); - } - - IXMLDOMElement_Release( pRoot ); - } - } - - IXMLDOMDocument_Release(doc); - - free_bstrs(); -} - -static void test_nodeTypeTests( void ) -{ - IXMLDOMDocument *doc = NULL; - IXMLDOMElement *pRoot; - IXMLDOMElement *pElement; - HRESULT hr; - - hr = CoCreateInstance( &CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument2, (LPVOID*)&doc ); - ok( hr == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", hr ); - if( hr != S_OK ) - return; - - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing"), NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing"), &pRoot); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMDocument_appendChild(doc, (IXMLDOMNode*)pRoot, NULL); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMElement_put_dataType(pRoot, NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - /* Invalid Value */ - hr = IXMLDOMElement_put_dataType(pRoot, _bstr_("abcdefg") ); - ok(hr == E_FAIL, "ret %08x\n", hr ); - - /* NOTE: - * The name passed into put_dataType is case-insensitive. So many of the names - * have been changed to reflect this. - */ - /* Boolean */ - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_Boolean"), &pElement); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pElement, NULL); - - hr = IXMLDOMElement_put_dataType(pElement, _bstr_("Boolean") ); - ok(hr == S_OK, "ret %08x\n", hr ); - - IXMLDOMElement_Release(pElement); - } - - /* String */ - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_String"), &pElement); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pElement, NULL); - - hr = IXMLDOMElement_put_dataType(pElement, _bstr_("String") ); - ok(hr == S_OK, "ret %08x\n", hr ); - - IXMLDOMElement_Release(pElement); - } - - /* Number */ - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_Number"), &pElement); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pElement, NULL); - - hr = IXMLDOMElement_put_dataType(pElement, _bstr_("number") ); - ok(hr == S_OK, "ret %08x\n", hr ); - - IXMLDOMElement_Release(pElement); - } - - /* Int */ - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_Int"), &pElement); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pElement, NULL); - - hr = IXMLDOMElement_put_dataType(pElement, _bstr_("InT") ); - ok(hr == S_OK, "ret %08x\n", hr ); - - IXMLDOMElement_Release(pElement); - } - - /* Fixed */ - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_Fixed"), &pElement); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pElement, NULL); - - hr = IXMLDOMElement_put_dataType(pElement, _bstr_("fixed.14.4") ); - ok(hr == S_OK, "ret %08x\n", hr ); - - IXMLDOMElement_Release(pElement); - } - - /* DateTime */ - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_DateTime"), &pElement); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pElement, NULL); - - hr = IXMLDOMElement_put_dataType(pElement, _bstr_("DateTime") ); - ok(hr == S_OK, "ret %08x\n", hr ); - - IXMLDOMElement_Release(pElement); - } - - /* DateTime TZ */ - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_DateTime_tz"), &pElement); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pElement, NULL); - - hr = IXMLDOMElement_put_dataType(pElement, _bstr_("DateTime.tz") ); - ok(hr == S_OK, "ret %08x\n", hr ); - - IXMLDOMElement_Release(pElement); - } - - /* Date */ - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_Date"), &pElement); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pElement, NULL); - - hr = IXMLDOMElement_put_dataType(pElement, _bstr_("Date") ); - ok(hr == S_OK, "ret %08x\n", hr ); - - IXMLDOMElement_Release(pElement); - } - - /* Time */ - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_Time"), &pElement); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pElement, NULL); - - hr = IXMLDOMElement_put_dataType(pElement, _bstr_("Time") ); - ok(hr == S_OK, "ret %08x\n", hr ); - - IXMLDOMElement_Release(pElement); - } - - /* Time.tz */ - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_Time_TZ"), &pElement); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pElement, NULL); - - hr = IXMLDOMElement_put_dataType(pElement, _bstr_("Time.tz") ); - ok(hr == S_OK, "ret %08x\n", hr ); - - IXMLDOMElement_Release(pElement); - } - - /* I1 */ - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_I1"), &pElement); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pElement, NULL); - - hr = IXMLDOMElement_put_dataType(pElement, _bstr_("I1") ); - ok(hr == S_OK, "ret %08x\n", hr ); - - IXMLDOMElement_Release(pElement); - } - - /* I2 */ - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_I2"), &pElement); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pElement, NULL); - - hr = IXMLDOMElement_put_dataType(pElement, _bstr_("I2") ); - ok(hr == S_OK, "ret %08x\n", hr ); - - IXMLDOMElement_Release(pElement); - } - - /* I4 */ - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_I4"), &pElement); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pElement, NULL); - - hr = IXMLDOMElement_put_dataType(pElement, _bstr_("I4") ); - ok(hr == S_OK, "ret %08x\n", hr ); - - IXMLDOMElement_Release(pElement); - } - - /* UI1 */ - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_UI1"), &pElement); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pElement, NULL); - - hr = IXMLDOMElement_put_dataType(pElement, _bstr_("UI1") ); - ok(hr == S_OK, "ret %08x\n", hr ); - - IXMLDOMElement_Release(pElement); - } - - /* UI2 */ - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_UI2"), &pElement); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pElement, NULL); - - hr = IXMLDOMElement_put_dataType(pElement, _bstr_("UI2") ); - ok(hr == S_OK, "ret %08x\n", hr ); - - IXMLDOMElement_Release(pElement); - } - - /* UI4 */ - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_UI4"), &pElement); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pElement, NULL); - - hr = IXMLDOMElement_put_dataType(pElement, _bstr_("UI4") ); - ok(hr == S_OK, "ret %08x\n", hr ); - - IXMLDOMElement_Release(pElement); - } - - /* r4 */ - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_r4"), &pElement); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pElement, NULL); - - hr = IXMLDOMElement_put_dataType(pElement, _bstr_("r4") ); - ok(hr == S_OK, "ret %08x\n", hr ); - - IXMLDOMElement_Release(pElement); - } - - /* r8 */ - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_r8"), &pElement); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pElement, NULL); - - hr = IXMLDOMElement_put_dataType(pElement, _bstr_("r8") ); - ok(hr == S_OK, "ret %08x\n", hr ); - - IXMLDOMElement_Release(pElement); - } - - /* float */ - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_float"), &pElement); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pElement, NULL); - - hr = IXMLDOMElement_put_dataType(pElement, _bstr_("float") ); - ok(hr == S_OK, "ret %08x\n", hr ); - - IXMLDOMElement_Release(pElement); - } - - /* uuid */ - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_uuid"), &pElement); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pElement, NULL); - - hr = IXMLDOMElement_put_dataType(pElement, _bstr_("UuId") ); - ok(hr == S_OK, "ret %08x\n", hr ); - - IXMLDOMElement_Release(pElement); - } - - /* bin.hex */ - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_bin_hex"), &pElement); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pElement, NULL); - - hr = IXMLDOMElement_put_dataType(pElement, _bstr_("bin.hex") ); - ok(hr == S_OK, "ret %08x\n", hr ); - - IXMLDOMElement_Release(pElement); - } - - /* bin.base64 */ - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_bin_base64"), &pElement); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pElement, NULL); - - hr = IXMLDOMElement_put_dataType(pElement, _bstr_("bin.base64") ); - ok(hr == S_OK, "ret %08x\n", hr ); - - IXMLDOMElement_Release(pElement); - } - - /* Check changing types */ - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing_Change"), &pElement); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - IXMLDOMElement_appendChild(pRoot, (IXMLDOMNode*)pElement, NULL); - - hr = IXMLDOMElement_put_dataType(pElement, _bstr_("DateTime.tz") ); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMElement_put_dataType(pElement, _bstr_("string") ); - ok(hr == S_OK, "ret %08x\n", hr ); - - IXMLDOMElement_Release(pElement); - } - - IXMLDOMElement_Release(pRoot); - } - } - - IXMLDOMDocument_Release(doc); - - free_bstrs(); -} - -static void test_DocumentSaveToDocument(void) -{ - IXMLDOMDocument *doc = NULL; - IXMLDOMDocument *doc2 = NULL; - IXMLDOMElement *pRoot; - - HRESULT hr; - - hr = CoCreateInstance( &CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument2, (LPVOID*)&doc ); - ok( hr == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", hr ); - if( hr != S_OK ) - return; - - hr = CoCreateInstance( &CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument2, (LPVOID*)&doc2 ); - ok( hr == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", hr ); - if( hr != S_OK ) - { - IXMLDOMDocument_Release(doc); - return; - } - - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing"), &pRoot); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMDocument_appendChild(doc, (IXMLDOMNode*)pRoot, NULL); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - VARIANT vDoc; - BSTR sOrig; - BSTR sNew; - - V_VT(&vDoc) = VT_UNKNOWN; - V_UNKNOWN(&vDoc) = (IUnknown*)doc2; - - hr = IXMLDOMDocument_save(doc, vDoc); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMDocument_get_xml(doc, &sOrig); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMDocument_get_xml(doc2, &sNew); - ok(hr == S_OK, "ret %08x\n", hr ); - - ok( !lstrcmpW( sOrig, sNew ), "New document is not the same as origial\n"); - - SysFreeString(sOrig); - SysFreeString(sNew); - } - } - - IXMLDOMDocument_Release(doc2); - IXMLDOMDocument_Release(doc); -} - -static void test_DocumentSaveToFile(void) -{ - IXMLDOMDocument *doc = NULL; - IXMLDOMElement *pRoot; - HANDLE file; - char buffer[100]; - DWORD read = 0; - HRESULT hr; - - hr = CoCreateInstance( &CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument2, (LPVOID*)&doc ); - ok( hr == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", hr ); - if( hr != S_OK ) - return; - - hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing"), &pRoot); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMDocument_appendChild(doc, (IXMLDOMNode*)pRoot, NULL); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - VARIANT vFile; - - V_VT(&vFile) = VT_BSTR; - V_BSTR(&vFile) = _bstr_("test.xml"); - - hr = IXMLDOMDocument_save(doc, vFile); - ok(hr == S_OK, "ret %08x\n", hr ); - } - } - - IXMLDOMElement_Release(pRoot); - IXMLDOMDocument_Release(doc); - - file = CreateFile("test.xml", GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL ); - ok(file != INVALID_HANDLE_VALUE, "Could not open file: %u\n", GetLastError()); - if(file == INVALID_HANDLE_VALUE) - return; - - ReadFile(file, buffer, sizeof(buffer), &read, NULL); - ok(read != 0, "could not read file\n"); - ok(buffer[0] != '<' || buffer[1] != '?', "File contains processing instruction\n"); - - CloseHandle(file); - DeleteFile("test.xml"); -} - -static void test_testTransforms(void) -{ - IXMLDOMDocument *doc = NULL; - IXMLDOMDocument *docSS = NULL; - IXMLDOMNode *pNode; - VARIANT_BOOL bSucc; - - HRESULT hr; - - hr = CoCreateInstance( &CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument2, (LPVOID*)&doc ); - ok( hr == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", hr ); - if( hr != S_OK ) - return; - - hr = CoCreateInstance( &CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument2, (LPVOID*)&docSS ); - ok( hr == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", hr ); - if( hr != S_OK ) - { - IXMLDOMDocument_Release(doc); - return; - } - - hr = IXMLDOMDocument_loadXML(doc, _bstr_(szTransformXML), &bSucc); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMDocument_loadXML(docSS, _bstr_(szTransformSSXML), &bSucc); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IXMLDOMDocument_QueryInterface(docSS, &IID_IXMLDOMNode, (LPVOID*)&pNode ); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - BSTR bOut; - - hr = IXMLDOMDocument_transformNode(doc, pNode, &bOut); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( compareIgnoreReturns( bOut, _bstr_(szTransformOutput)), "Stylesheet output not correct\n"); - SysFreeString(bOut); - - IXMLDOMNode_Release(pNode); - } - - IXMLDOMDocument_Release(docSS); - IXMLDOMDocument_Release(doc); - - free_bstrs(); -} - -static void test_Namespaces(void) -{ - IXMLDOMDocument2 *doc = NULL; - IXMLDOMNode *pNode; - IXMLDOMNode *pNode2 = NULL; - VARIANT_BOOL bSucc; - HRESULT hr; - BSTR str; - static const CHAR szNamespacesXML[] = -"\n" -"\n" -"\n" -""; - - hr = CoCreateInstance( &CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument2, (LPVOID*)&doc ); - ok( hr == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", hr ); - if( hr != S_OK ) - return; - - hr = IXMLDOMDocument2_loadXML(doc, _bstr_(szNamespacesXML), &bSucc); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(bSucc == VARIANT_TRUE, "Expected VARIANT_TRUE got VARIANT_FALSE\n"); - - hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("root"), &pNode ); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMNode_get_firstChild( pNode, &pNode2 ); - ok( hr == S_OK, "ret %08x\n", hr ); - ok( pNode2 != NULL, "pNode2 == NULL\n"); - - /* Test get_prefix */ - hr = IXMLDOMNode_get_prefix(pNode2, NULL); - ok( hr == E_INVALIDARG, "ret %08x\n", hr ); - /* NOTE: Need to test that arg2 gets cleared on Error. */ - - hr = IXMLDOMNode_get_prefix(pNode2, &str); - ok( hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("WEB")), "incorrect prefix string\n"); - SysFreeString(str); - - /* Test get_namespaceURI */ - hr = IXMLDOMNode_get_namespaceURI(pNode2, NULL); - ok( hr == E_INVALIDARG, "ret %08x\n", hr ); - /* NOTE: Need to test that arg2 gets cleared on Error. */ - - hr = IXMLDOMNode_get_namespaceURI(pNode2, &str); - ok( hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_("http://www.winehq.org")), "incorrect namespaceURI string\n"); - SysFreeString(str); - - IXMLDOMNode_Release(pNode2); - IXMLDOMNode_Release(pNode); - } - - IXMLDOMDocument2_Release(doc); - - free_bstrs(); -} - -static void test_FormattingXML(void) -{ - IXMLDOMDocument2 *doc = NULL; - IXMLDOMElement *pElement; - VARIANT_BOOL bSucc; - HRESULT hr; - BSTR str; - static const CHAR szLinefeedXML[] = "\n\n\t\n"; - static const CHAR szLinefeedRootXML[] = "\r\n\t\r\n"; - - hr = CoCreateInstance( &CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument2, (LPVOID*)&doc ); - ok( hr == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", hr ); - if( hr != S_OK ) - return; - - hr = IXMLDOMDocument2_loadXML(doc, _bstr_(szLinefeedXML), &bSucc); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(bSucc == VARIANT_TRUE, "Expected VARIANT_TRUE got VARIANT_FALSE\n"); - - if(bSucc == VARIANT_TRUE) - { - hr = IXMLDOMDocument2_get_documentElement(doc, &pElement); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMElement_get_xml(pElement, &str); - ok(hr == S_OK, "ret %08x\n", hr ); - ok( !lstrcmpW( str, _bstr_(szLinefeedRootXML) ), "incorrect element xml\n"); - SysFreeString(str); - - IXMLDOMElement_Release(pElement); - } - } - - IXMLDOMDocument2_Release(doc); - - free_bstrs(); -} - -static void test_NodeTypeValue(void) -{ - IXMLDOMDocument2 *doc = NULL; - IXMLDOMNode *pNode; - VARIANT_BOOL bSucc; - HRESULT hr; - VARIANT v; - - hr = CoCreateInstance( &CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument2, (LPVOID*)&doc ); - ok( hr == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", hr ); - if( hr != S_OK ) - return; - - hr = IXMLDOMDocument2_loadXML(doc, _bstr_(szTypeValueXML), &bSucc); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(bSucc == VARIANT_TRUE, "Expected VARIANT_TRUE got VARIANT_FALSE\n"); - if(bSucc == VARIANT_TRUE) - { - hr = IXMLDOMDocument2_get_nodeValue(doc, NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - V_VT(&v) = VT_BSTR; - V_BSTR(&v) = NULL; - hr = IXMLDOMDocument2_get_nodeValue(doc, &v); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok(V_VT(&v) == VT_NULL, "expect VT_NULL got %d\n", V_VT(&v)); - - hr = IXMLDOMDocument2_get_nodeTypedValue(doc, NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - hr = IXMLDOMDocument2_get_nodeTypedValue(doc, &v); - ok(hr == S_FALSE, "ret %08x\n", hr ); - - hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/string"), &pNode); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - V_VT(&v) = VT_BSTR; - V_BSTR(&v) = NULL; - hr = IXMLDOMNode_get_nodeValue(pNode, &v); - ok(hr == S_FALSE, "ret %08x\n", hr ); - ok(V_VT(&v) == VT_NULL, "expect VT_NULL got %d\n", V_VT(&v)); - - hr = IXMLDOMNode_get_nodeTypedValue(pNode, NULL); - ok(hr == E_INVALIDARG, "ret %08x\n", hr ); - - hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(V_VT(&v) == VT_BSTR, "incorrect type\n"); - ok(!lstrcmpW( V_BSTR(&v), _bstr_("Wine") ), "incorrect value\n"); - VariantClear( &v ); - - IXMLDOMNode_Release(pNode); - } - - hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/string2"), &pNode); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(V_VT(&v) == VT_BSTR, "incorrect type\n"); - ok(!lstrcmpW( V_BSTR(&v), _bstr_("String") ), "incorrect value\n"); - VariantClear( &v ); - - IXMLDOMNode_Release(pNode); - } - - hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/number"), &pNode); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(V_VT(&v) == VT_BSTR, "incorrect type\n"); - ok(!lstrcmpW( V_BSTR(&v), _bstr_("12.44") ), "incorrect value\n"); - VariantClear( &v ); - - IXMLDOMNode_Release(pNode); - } - - hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/number2"), &pNode); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(V_VT(&v) == VT_BSTR, "incorrect type\n"); - ok(!lstrcmpW( V_BSTR(&v), _bstr_("-3.71e3") ), "incorrect value\n"); - VariantClear( &v ); - - IXMLDOMNode_Release(pNode); - } - - hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/int"), &pNode); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(V_VT(&v) == VT_I4, "incorrect type\n"); - ok(V_I4(&v) == -13, "incorrect value\n"); - VariantClear( &v ); - - IXMLDOMNode_Release(pNode); - } - - hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/fixed"), &pNode); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(V_VT(&v) == VT_CY, "incorrect type\n"); - VariantClear(&v); - - IXMLDOMNode_Release(pNode); - } - - hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/bool"), &pNode); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(V_VT(&v) == VT_BOOL, "incorrect type\n"); - ok(V_BOOL(&v) == VARIANT_TRUE, "incorrect value\n"); - VariantClear( &v ); - - IXMLDOMNode_Release(pNode); - } - - hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/datetime"), &pNode); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(V_VT(&v) == VT_DATE, "incorrect type\n"); - double_eq(40135.13996527778, V_DATE(&v)); - VariantClear( &v ); - - IXMLDOMNode_Release(pNode); - } - - hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/datetimetz"), &pNode); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(V_VT(&v) == VT_DATE, "incorrect type\n"); - double_eq(37813.59302083334, V_DATE(&v)); - VariantClear( &v ); - - IXMLDOMNode_Release(pNode); - } - - hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/date"), &pNode); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(V_VT(&v) == VT_DATE, "incorrect type\n"); - double_eq(665413.0, V_DATE(&v)); - VariantClear( &v ); - - IXMLDOMNode_Release(pNode); - } - - hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/time"), &pNode); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(V_VT(&v) == VT_DATE, "incorrect type\n"); - double_eq(0.5813888888888888, V_DATE(&v)); - VariantClear( &v ); - - IXMLDOMNode_Release(pNode); - } - - hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/timetz"), &pNode); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(V_VT(&v) == VT_DATE, "incorrect type\n"); - double_eq(1.112511574074074, V_DATE(&v)); - VariantClear( &v ); - - IXMLDOMNode_Release(pNode); - } - - hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/i1"), &pNode); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(V_VT(&v) == VT_I1, "incorrect type\n"); - ok(V_I1(&v) == -13, "incorrect value\n"); - VariantClear( &v ); - - IXMLDOMNode_Release(pNode); - } - - hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/i2"), &pNode); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(V_VT(&v) == VT_I2, "incorrect type\n"); - ok(V_I2(&v) == 31915, "incorrect value\n"); - VariantClear( &v ); - - IXMLDOMNode_Release(pNode); - } - - hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/i4"), &pNode); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(V_VT(&v) == VT_I4, "incorrect type\n"); - ok(V_I4(&v) == -312232, "incorrect value\n"); - VariantClear(&v); - - IXMLDOMNode_Release(pNode); - } - - hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/ui1"), &pNode); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(V_VT(&v) == VT_UI1, "incorrect type\n"); - ok(V_UI1(&v) == 123, "incorrect value\n"); - VariantClear(&v); - - IXMLDOMNode_Release(pNode); - } - - hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/ui2"), &pNode); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(V_VT(&v) == VT_UI2, "incorrect type\n"); - ok(V_UI2(&v) == 48282, "incorrect value\n"); - VariantClear(&v); - - IXMLDOMNode_Release(pNode); - } - - hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/ui4"), &pNode); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(V_VT(&v) == VT_UI4, "incorrect type\n"); - ok(V_UI4(&v) == 949281, "incorrect value\n"); - VariantClear(&v); - - IXMLDOMNode_Release(pNode); - } - - hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/r4"), &pNode); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(V_VT(&v) == VT_R4, "incorrect type\n"); - double_eq(213124.0, V_R4(&v)); - VariantClear(&v); - - IXMLDOMNode_Release(pNode); - } - - hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/r8"), &pNode); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(V_VT(&v) == VT_R8, "incorrect type\n"); - double_eq(0.412, V_R8(&v)); - VariantClear(&v); - - IXMLDOMNode_Release(pNode); - } - - hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/float"), &pNode); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(V_VT(&v) == VT_R8, "incorrect type\n"); - double_eq(41221.421, V_R8(&v)); - VariantClear(&v); - - IXMLDOMNode_Release(pNode); - } - - hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/uuid"), &pNode); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(V_VT(&v) == VT_BSTR, "incorrect type\n"); - ok(!lstrcmpW(V_BSTR(&v), _bstr_("333C7BC4-460F-11D0-BC04-0080C7055a83")), "incorrect value\n"); - VariantClear(&v); - - IXMLDOMNode_Release(pNode); - } - - hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/binhex"), &pNode); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - BYTE bytes[] = {0xff,0xfc,0xa0,0x12,0x00,0x3c}; - - hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(V_VT(&v) == (VT_ARRAY|VT_UI1), "incorrect type\n"); - ok(V_ARRAY(&v)->rgsabound[0].cElements == 6, "incorrect array size\n"); - if(V_ARRAY(&v)->rgsabound[0].cElements == 6) - ok(!memcmp(bytes, V_ARRAY(&v)->pvData, sizeof(bytes)), "incorrect value\n"); - VariantClear(&v); - - IXMLDOMNode_Release(pNode); - } - - hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/binbase64"), &pNode); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - BYTE bytes[] = {0x62,0x61,0x73,0x65,0x36,0x34,0x20,0x74,0x65,0x73,0x74}; - - hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(V_VT(&v) == (VT_ARRAY|VT_UI1), "incorrect type\n"); - ok(V_ARRAY(&v)->rgsabound[0].cElements == 11, "incorrect array size\n"); - if(V_ARRAY(&v)->rgsabound[0].cElements == 11) - ok(!memcmp(bytes, V_ARRAY(&v)->pvData, sizeof(bytes)), "incorrect value\n"); - VariantClear(&v); - - IXMLDOMNode_Release(pNode); - } - } - - IXMLDOMDocument2_Release(doc); - - free_bstrs(); -} - -static void test_TransformWithLoadingLocalFile(void) -{ - IXMLDOMDocument2 *doc = NULL; - IXMLDOMDocument2 *xsl = NULL; - IXMLDOMNode *pNode; - VARIANT_BOOL bSucc; - HRESULT hr; - HANDLE file; - DWORD dwWritten; - char lpPathBuffer[MAX_PATH]; - int i; - - /* Create a Temp File. */ - GetTempPathA(MAX_PATH, lpPathBuffer); - strcat(lpPathBuffer, "customers.xml" ); - - file = CreateFile(lpPathBuffer, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL ); - ok(file != INVALID_HANDLE_VALUE, "Could not create file: %u\n", GetLastError()); - if(file == INVALID_HANDLE_VALUE) - return; - - WriteFile(file, szBasicTransformXML, strlen(szBasicTransformXML), &dwWritten, NULL); - CloseHandle(file); - - /* Correct path to not include a escape character. */ - for(i=0; i < strlen(lpPathBuffer); i++) - { - if(lpPathBuffer[i] == '\\') - lpPathBuffer[i] = '/'; - } - - hr = CoCreateInstance( &CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument2, (LPVOID*)&doc ); - ok( hr == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", hr ); - if( hr != S_OK ) - return; - - hr = CoCreateInstance( &CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument2, (LPVOID*)&xsl ); - ok( hr == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", hr ); - if( hr != S_OK ) - { - IXMLDOMDocument2_Release(doc); - return; - } - - hr = IXMLDOMDocument2_loadXML(doc, _bstr_(szTypeValueXML), &bSucc); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(bSucc == VARIANT_TRUE, "Expected VARIANT_TRUE got VARIANT_FALSE\n"); - if(bSucc == VARIANT_TRUE) - { - BSTR sXSL; - BSTR sPart1 = _bstr_(szBasicTransformSSXMLPart1); - BSTR sPart2 = _bstr_(szBasicTransformSSXMLPart2); - BSTR sFileName = _bstr_(lpPathBuffer); - int nLegnth = lstrlenW(sPart1) + lstrlenW(sPart2) + lstrlenW(sFileName) + 1; - - sXSL = SysAllocStringLen(NULL, nLegnth); - lstrcpyW(sXSL, sPart1); - lstrcatW(sXSL, sFileName); - lstrcatW(sXSL, sPart2); - - hr = IXMLDOMDocument2_loadXML(xsl, sXSL, &bSucc); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(bSucc == VARIANT_TRUE, "Expected VARIANT_TRUE got VARIANT_FALSE\n"); - if(bSucc == VARIANT_TRUE) - { - BSTR sResult; - - hr = IXMLDOMDocument_QueryInterface(xsl, &IID_IXMLDOMNode, (LPVOID*)&pNode ); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - /* This will load the temp file via the XSL */ - hr = IXMLDOMDocument2_transformNode(doc, pNode, &sResult); - ok(hr == S_OK, "ret %08x\n", hr ); - if(hr == S_OK) - { - ok( compareIgnoreReturns( sResult, _bstr_(szBasicTransformOutput)), "Stylesheet output not correct\n"); - SysFreeString(sResult); - } - - IXMLDOMNode_Release(pNode); - } - } - - SysFreeString(sXSL); - } - - IXMLDOMDocument2_Release(doc); - IXMLDOMDocument2_Release(xsl); - - DeleteFile(lpPathBuffer); - free_bstrs(); -} - -static void test_put_nodeValue(void) -{ - IXMLDOMDocument *doc; - IXMLDOMEntityReference *entityref; - IXMLDOMNode *node; - HRESULT hr; - VARIANT data, type; - - hr = CoCreateInstance( &CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (LPVOID*)&doc ); - ok( hr == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", hr ); - if( hr != S_OK ) - return; - - /* test for unsupported types */ - /* NODE_DOCUMENT */ - hr = IXMLDOMDocument_QueryInterface(doc, &IID_IXMLDOMNode, (void**)&node); - ok(hr == S_OK, "ret %08x\n", hr ); - V_VT(&data) = VT_BSTR; - V_BSTR(&data) = _bstr_("one two three"); - hr = IXMLDOMNode_put_nodeValue(node, data); - ok(hr == E_FAIL, "ret %08x\n", hr ); - IXMLDOMNode_Release(node); - - /* NODE_DOCUMENT_FRAGMENT */ - V_VT(&type) = VT_I1; - V_I1(&type) = NODE_DOCUMENT_FRAGMENT; - hr = IXMLDOMDocument_createNode(doc, type, _bstr_("test"), NULL, &node); - ok(hr == S_OK, "ret %08x\n", hr ); - V_VT(&data) = VT_BSTR; - V_BSTR(&data) = _bstr_("one two three"); - hr = IXMLDOMNode_put_nodeValue(node, data); - ok(hr == E_FAIL, "ret %08x\n", hr ); - IXMLDOMNode_Release(node); - - /* NODE_ELEMENT */ - V_VT(&type) = VT_I1; - V_I1(&type) = NODE_ELEMENT; - hr = IXMLDOMDocument_createNode(doc, type, _bstr_("test"), NULL, &node); - ok(hr == S_OK, "ret %08x\n", hr ); - V_VT(&data) = VT_BSTR; - V_BSTR(&data) = _bstr_("one two three"); - hr = IXMLDOMNode_put_nodeValue(node, data); - ok(hr == E_FAIL, "ret %08x\n", hr ); - IXMLDOMNode_Release(node); - - /* NODE_ENTITY_REFERENCE */ - hr = IXMLDOMDocument_createEntityReference(doc, _bstr_("ref"), &entityref); - ok(hr == S_OK, "ret %08x\n", hr ); - - V_VT(&data) = VT_BSTR; - V_BSTR(&data) = _bstr_("one two three"); - hr = IXMLDOMEntityReference_put_nodeValue(entityref, data); - ok(hr == E_FAIL, "ret %08x\n", hr ); - - hr = IXMLDOMEntityReference_QueryInterface(entityref, &IID_IXMLDOMNode, (void**)&node); - ok(hr == S_OK, "ret %08x\n", hr ); - V_VT(&data) = VT_BSTR; - V_BSTR(&data) = _bstr_("one two three"); - hr = IXMLDOMNode_put_nodeValue(node, data); - ok(hr == E_FAIL, "ret %08x\n", hr ); - IXMLDOMNode_Release(node); - IXMLDOMEntityReference_Release(entityref); - - free_bstrs(); - - IXMLDOMDocument_Release(doc); -} - -static void test_IObjectSafety_set(IObjectSafety *safety, HRESULT result, HRESULT result2, DWORD set, DWORD mask, DWORD expected, DWORD expected2) -{ - HRESULT hr; - DWORD enabled, supported; - - trace("testing IObjectSafety: enable=%08x, mask=%08x\n", set, mask); - - hr = IObjectSafety_SetInterfaceSafetyOptions(safety, NULL, set, mask); - if (result == result2) - ok(hr == result, "SetInterfaceSafetyOptions: expected %08x, returned %08x\n", result, hr ); - else - ok(broken(hr == result) || hr == result2, - "SetInterfaceSafetyOptions: expected %08x, got %08x\n", result2, hr ); - - supported = enabled = 0xCAFECAFE; - hr = IObjectSafety_GetInterfaceSafetyOptions(safety, NULL, &supported, &enabled); - ok(hr == S_OK, "ret %08x\n", hr ); - if (expected == expected2) - ok(enabled == expected, "Expected %08x, got %08x\n", expected, enabled); - else - ok(broken(enabled == expected) || enabled == expected2, - "Expected %08x, got %08x\n", expected2, enabled); - - /* reset the safety options */ - - hr = IObjectSafety_SetInterfaceSafetyOptions(safety, NULL, - INTERFACESAFE_FOR_UNTRUSTED_CALLER|INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_SECURITY_MANAGER, - 0); - ok(hr == S_OK, "ret %08x\n", hr ); - - hr = IObjectSafety_GetInterfaceSafetyOptions(safety, NULL, &supported, &enabled); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(enabled == 0, "Expected 0, got %08x\n", enabled); -} - -static void test_document_IObjectSafety(void) -{ - IXMLDOMDocument *doc; - IObjectSafety *safety; - DWORD enabled = 0, supported = 0; - HRESULT hr; - - hr = CoCreateInstance( &CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (LPVOID*)&doc ); - ok( hr == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", hr ); - if( hr != S_OK ) - return; - - hr = IXMLDOMDocument_QueryInterface(doc, &IID_IObjectSafety, (void**)&safety); - ok(hr == S_OK, "ret %08x\n", hr ); - - /* get */ - hr = IObjectSafety_GetInterfaceSafetyOptions(safety, NULL, NULL, &enabled); - ok(hr == E_POINTER, "ret %08x\n", hr ); - hr = IObjectSafety_GetInterfaceSafetyOptions(safety, NULL, &supported, NULL); - ok(hr == E_POINTER, "ret %08x\n", hr ); - - hr = IObjectSafety_GetInterfaceSafetyOptions(safety, NULL, &supported, &enabled); - ok(hr == S_OK, "ret %08x\n", hr ); - ok(broken(supported == (INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA)) || - supported == (INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACE_USES_SECURITY_MANAGER) /* msxml3 SP8+ */, - "Expected (INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACE_USES_SECURITY_MANAGER), " - "got %08x\n", supported); - ok(enabled == 0, "Expected 0, got %08x\n", enabled); - - /* set -- individual flags */ - - test_IObjectSafety_set(safety, S_OK, S_OK, - INTERFACESAFE_FOR_UNTRUSTED_CALLER, INTERFACESAFE_FOR_UNTRUSTED_CALLER, - INTERFACESAFE_FOR_UNTRUSTED_CALLER, INTERFACESAFE_FOR_UNTRUSTED_CALLER); - - test_IObjectSafety_set(safety, S_OK, S_OK, - INTERFACESAFE_FOR_UNTRUSTED_DATA, INTERFACESAFE_FOR_UNTRUSTED_DATA, - INTERFACESAFE_FOR_UNTRUSTED_DATA, INTERFACESAFE_FOR_UNTRUSTED_DATA); - - test_IObjectSafety_set(safety, S_OK, S_OK, - INTERFACE_USES_SECURITY_MANAGER, INTERFACE_USES_SECURITY_MANAGER, - 0, INTERFACE_USES_SECURITY_MANAGER /* msxml3 SP8+ */); - - /* set INTERFACE_USES_DISPEX */ - - test_IObjectSafety_set(safety, S_OK, E_FAIL /* msxml3 SP8+ */, - INTERFACE_USES_DISPEX, INTERFACE_USES_DISPEX, - 0, 0); - - test_IObjectSafety_set(safety, S_OK, E_FAIL /* msxml3 SP8+ */, - INTERFACE_USES_DISPEX, 0, - 0, 0); - - test_IObjectSafety_set(safety, S_OK, S_OK /* msxml3 SP8+ */, - 0, INTERFACE_USES_DISPEX, - 0, 0); - - /* set option masking */ - - test_IObjectSafety_set(safety, S_OK, S_OK, - INTERFACESAFE_FOR_UNTRUSTED_CALLER|INTERFACESAFE_FOR_UNTRUSTED_DATA, - INTERFACESAFE_FOR_UNTRUSTED_CALLER, - INTERFACESAFE_FOR_UNTRUSTED_CALLER, - INTERFACESAFE_FOR_UNTRUSTED_CALLER); - - test_IObjectSafety_set(safety, S_OK, S_OK, - INTERFACESAFE_FOR_UNTRUSTED_CALLER|INTERFACESAFE_FOR_UNTRUSTED_DATA, - INTERFACESAFE_FOR_UNTRUSTED_DATA, - INTERFACESAFE_FOR_UNTRUSTED_DATA, - INTERFACESAFE_FOR_UNTRUSTED_DATA); - - test_IObjectSafety_set(safety, S_OK, S_OK, - INTERFACESAFE_FOR_UNTRUSTED_CALLER|INTERFACESAFE_FOR_UNTRUSTED_DATA, - INTERFACE_USES_SECURITY_MANAGER, - 0, - 0); - - /* set -- inheriting previous settings */ - - hr = IObjectSafety_SetInterfaceSafetyOptions(safety, NULL, - INTERFACESAFE_FOR_UNTRUSTED_CALLER, - INTERFACESAFE_FOR_UNTRUSTED_CALLER); - ok(hr == S_OK, "ret %08x\n", hr ); - hr = IObjectSafety_GetInterfaceSafetyOptions(safety, NULL, &supported, &enabled); - ok(hr == S_OK, "ret %08x\n", hr ); - todo_wine - ok(broken(enabled == INTERFACESAFE_FOR_UNTRUSTED_CALLER) || - enabled == (INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACE_USES_SECURITY_MANAGER) /* msxml3 SP8+ */, - "Expected (INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACE_USES_SECURITY_MANAGER), " - "got %08x\n", enabled); - - hr = IObjectSafety_SetInterfaceSafetyOptions(safety, NULL, - INTERFACESAFE_FOR_UNTRUSTED_DATA, - INTERFACESAFE_FOR_UNTRUSTED_DATA); - ok(hr == S_OK, "ret %08x\n", hr ); - hr = IObjectSafety_GetInterfaceSafetyOptions(safety, NULL, &supported, &enabled); - ok(hr == S_OK, "ret %08x\n", hr ); - todo_wine - ok(broken(enabled == INTERFACESAFE_FOR_UNTRUSTED_DATA) || - enabled == (INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA) /* msxml3 SP8+ */, - "Expected (INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA), " - "got %08x\n", enabled); - - IObjectSafety_Release(safety); - - IXMLDOMDocument_Release(doc); -} - -static void test_XSLPattern(void) -{ - IXMLDOMDocument2 *doc; - IXMLDOMNodeList *list; - VARIANT_BOOL b; - HRESULT r; - LONG len; - - r = CoCreateInstance( &CLSID_DOMDocument, NULL, - CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument2, (void**)&doc ); - ok( r == S_OK, "CoCreateInstance(CLSID_DOMDocument) should have succeeded instead of failing with 0x%08x\n", r ); - if( r != S_OK ) - return; - - ole_check(IXMLDOMDocument2_loadXML(doc, _bstr_(szExampleXML), &b)); - ok(b == VARIANT_TRUE, "failed to load XML string\n"); - - /* switch to XPath */ - ole_check(IXMLDOMDocument2_setProperty(doc, _bstr_("SelectionLanguage"), _variantbstr_("XSLPattern"))); - - /* for XSLPattern start index is 0, for XPath it's 1 */ - ole_check(IXMLDOMDocument2_selectNodes(doc, _bstr_("root//elem[0]"), &list)); - len = 0; - ole_check(IXMLDOMNodeList_get_length(list, &len)); - todo_wine ok(len != 0, "expected filled list\n"); - if (len) - todo_wine expect_list_and_release(list, "E1.E2.D1"); - - IXMLDOMDocument2_Release(doc); - free_bstrs(); -} - -START_TEST(domdoc) -{ - IXMLDOMDocument *doc; - HRESULT r; - - r = CoInitialize( NULL ); - ok( r == S_OK, "failed to init com\n"); - if (r != S_OK) - return; - - r = CoCreateInstance( &CLSID_DOMDocument, NULL, - CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (LPVOID*)&doc ); - if (SUCCEEDED(r)) - { - IXMLDOMDocument_Release(doc); - - test_domdoc(); - test_persiststreaminit(); - test_domnode(); - test_refs(); - test_create(); - test_getElementsByTagName(); - test_get_text(); - test_get_childNodes(); - test_get_firstChild(); - test_removeChild(); - test_replaceChild(); - test_removeNamedItem(); - test_IXMLDOMDocument2(); - test_XPath(); - test_XSLPattern(); - test_cloneNode(); - test_xmlTypes(); - test_nodeTypeTests(); - test_DocumentSaveToDocument(); - test_DocumentSaveToFile(); - test_testTransforms(); - test_Namespaces(); - test_FormattingXML(); - test_NodeTypeValue(); - test_TransformWithLoadingLocalFile(); - test_put_nodeValue(); - test_document_IObjectSafety(); - } - else - win_skip("IXMLDOMDocument is not available (0x%08x)\n", r); - - test_XMLHTTP(); - - CoUninitialize(); -} diff --git a/rostests/winetests/msxml3/msxml3.rbuild b/rostests/winetests/msxml3/msxml3.rbuild deleted file mode 100644 index d57321d38af..00000000000 --- a/rostests/winetests/msxml3/msxml3.rbuild +++ /dev/null @@ -1,19 +0,0 @@ - - - - - . - - domdoc.c - saxreader.c - schema.c - testlist.c - xmldoc.c - xmlelem.c - wine - user32 - ole32 - oleaut32 - ntdll - - diff --git a/rostests/winetests/msxml3/saxreader.c b/rostests/winetests/msxml3/saxreader.c deleted file mode 100644 index a932bf99354..00000000000 --- a/rostests/winetests/msxml3/saxreader.c +++ /dev/null @@ -1,611 +0,0 @@ -/* - * XML test - * - * Copyright 2008 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 - */ - -#define COBJMACROS -#define CONST_VTABLE - -#include -#include "windows.h" -#include "ole2.h" -#include "msxml2.h" -#include "ocidl.h" - -#include "wine/test.h" - -typedef enum _CH { - CH_ENDTEST, - CH_PUTDOCUMENTLOCATOR, - CH_STARTDOCUMENT, - CH_ENDDOCUMENT, - CH_STARTPREFIXMAPPING, - CH_ENDPREFIXMAPPING, - CH_STARTELEMENT, - CH_ENDELEMENT, - CH_CHARACTERS, - CH_IGNORABLEWHITESPACE, - CH_PROCESSINGINSTRUCTION, - CH_SKIPPEDENTITY -} CH; - -static const WCHAR szSimpleXML[] = { -'<','?','x','m','l',' ','v','e','r','s','i','o','n','=','\"','1','.','0','\"',' ','?','>','\n', -'<','B','a','n','k','A','c','c','o','u','n','t','>','\n', -' ',' ',' ','<','N','u','m','b','e','r','>','1','2','3','4','<','/','N','u','m','b','e','r','>','\n', -' ',' ',' ','<','N','a','m','e','>','C','a','p','t','a','i','n',' ','A','h','a','b','<','/','N','a','m','e','>','\n', -'<','/','B','a','n','k','A','c','c','o','u','n','t','>','\n','\0' -}; - -static const WCHAR szCarriageRetTest[] = { -'<','?','x','m','l',' ','v','e','r','s','i','o','n','=','"','1','.','0','"','?','>','\r','\n', -'<','B','a','n','k','A','c','c','o','u','n','t','>','\r','\n', -'\t','<','N','u','m','b','e','r','>','1','2','3','4','<','/','N','u','m','b','e','r','>','\r','\n', -'\t','<','N','a','m','e','>','C','a','p','t','a','i','n',' ','A','h','a','b','<','/','N','a','m','e','>','\r','\n', -'<','/','B','a','n','k','A','c','c','o','u','n','t','>','\0' -}; - -static const CHAR szTestXML[] = -"\n" -"\n" -" 1234\n" -" Captain Ahab\n" -"\n"; - -typedef struct _contenthandlercheck { - CH id; - int line; - int column; - const char *arg1; - const char *arg2; - const char *arg3; -} content_handler_test; - -static content_handler_test contentHandlerTest1[] = { - { CH_PUTDOCUMENTLOCATOR, 0, 0 }, - { CH_STARTDOCUMENT, 0, 0 }, - { CH_STARTELEMENT, 2, 14, "", "BankAccount", "BankAccount" }, - { CH_CHARACTERS, 2, 14, "\n " }, - { CH_STARTELEMENT, 3, 12, "", "Number", "Number" }, - { CH_CHARACTERS, 3, 12, "1234" }, - { CH_ENDELEMENT, 3, 18, "", "Number", "Number" }, - { CH_CHARACTERS, 3, 25, "\n " }, - { CH_STARTELEMENT, 4, 10, "", "Name", "Name" }, - { CH_CHARACTERS, 4, 10, "Captain Ahab" }, - { CH_ENDELEMENT, 4, 24, "", "Name", "Name" }, - { CH_CHARACTERS, 4, 29, "\n" }, - { CH_ENDELEMENT, 5, 3, "", "BankAccount", "BankAccount" }, - { CH_ENDDOCUMENT, 0, 0 }, - { CH_ENDTEST } -}; - -static content_handler_test contentHandlerTest2[] = { - { CH_PUTDOCUMENTLOCATOR, 0, 0 }, - { CH_STARTDOCUMENT, 0, 0 }, - { CH_STARTELEMENT, 2, 14, "", "BankAccount", "BankAccount" }, - { CH_CHARACTERS, 2, 14, "\n" }, - { CH_CHARACTERS, 2, 16, "\t" }, - { CH_STARTELEMENT, 3, 10, "", "Number", "Number" }, - { CH_CHARACTERS, 3, 10, "1234" }, - { CH_ENDELEMENT, 3, 16, "", "Number", "Number" }, - { CH_CHARACTERS, 3, 23, "\n" }, - { CH_CHARACTERS, 3, 25, "\t" }, - { CH_STARTELEMENT, 4, 8, "", "Name", "Name" }, - { CH_CHARACTERS, 4, 8, "Captain Ahab" }, - { CH_ENDELEMENT, 4, 22, "", "Name", "Name" }, - { CH_CHARACTERS, 4, 27, "\n" }, - { CH_ENDELEMENT, 5, 3, "", "BankAccount", "BankAccount" }, - { CH_ENDDOCUMENT, 0, 0 }, - { CH_ENDTEST } -}; - -static content_handler_test *expectCall; -static ISAXLocator *locator; - -static void test_saxstr(unsigned line, const WCHAR *szStr, int nStr, const char *szTest) -{ - WCHAR buf[1024]; - int len; - - if(!szTest) { - ok_(__FILE__,line) (szStr == NULL, "szStr != NULL\n"); - ok_(__FILE__,line) (nStr == 0, "nStr = %d, expected 0\n", nStr); - return; - } - - len = strlen(szTest); - ok_(__FILE__,line) (len == nStr, "nStr = %d, expected %d (%s)\n", nStr, len, szTest); - if(len != nStr) - return; - - MultiByteToWideChar(CP_ACP, 0, szTest, -1, buf, sizeof(buf)/sizeof(WCHAR)); - ok_(__FILE__,line) (!memcmp(szStr, buf, len*sizeof(WCHAR)), "unexpected szStr %s, expected %s\n", - wine_dbgstr_wn(szStr, nStr), szTest); -} - -static BOOL test_expect_call(CH id) -{ - ok(expectCall->id == id, "unexpected call %d, expected %d\n", id, expectCall->id); - return expectCall->id == id; -} - -static void test_locator(unsigned line, int loc_line, int loc_column) -{ - int rcolumn, rline; - ISAXLocator_getLineNumber(locator, &rline); - ISAXLocator_getColumnNumber(locator, &rcolumn); - - ok_(__FILE__,line) (rline == loc_line, - "unexpected line %d, expected %d\n", rline, loc_line); - ok_(__FILE__,line) (rcolumn == loc_column, - "unexpected column %d, expected %d\n", rcolumn, loc_column); -} - -static HRESULT WINAPI contentHandler_QueryInterface( - ISAXContentHandler* iface, - REFIID riid, - void **ppvObject) -{ - *ppvObject = NULL; - - if(IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_ISAXContentHandler)) - { - *ppvObject = iface; - } - else - { - return E_NOINTERFACE; - } - - return S_OK; -} - -static ULONG WINAPI contentHandler_AddRef( - ISAXContentHandler* iface) -{ - return 2; -} - -static ULONG WINAPI contentHandler_Release( - ISAXContentHandler* iface) -{ - return 1; -} - -static HRESULT WINAPI contentHandler_putDocumentLocator( - ISAXContentHandler* iface, - ISAXLocator *pLocator) -{ - if(!test_expect_call(CH_PUTDOCUMENTLOCATOR)) - return E_FAIL; - - locator = pLocator; - test_locator(__LINE__, expectCall->line, expectCall->column); - - expectCall++; - return S_OK; -} - -static HRESULT WINAPI contentHandler_startDocument( - ISAXContentHandler* iface) -{ - if(!test_expect_call(CH_STARTDOCUMENT)) - return E_FAIL; - - test_locator(__LINE__, expectCall->line, expectCall->column); - - expectCall++; - return S_OK; -} - -static HRESULT WINAPI contentHandler_endDocument( - ISAXContentHandler* iface) -{ - if(!test_expect_call(CH_ENDDOCUMENT)) - return E_FAIL; - - test_locator(__LINE__, expectCall->line, expectCall->column); - - expectCall++; - return S_OK; -} - -static HRESULT WINAPI contentHandler_startPrefixMapping( - ISAXContentHandler* iface, - const WCHAR *pPrefix, - int nPrefix, - const WCHAR *pUri, - int nUri) -{ - if(!test_expect_call(CH_ENDDOCUMENT)) - return E_FAIL; - - test_saxstr(__LINE__, pPrefix, nPrefix, expectCall->arg1); - test_saxstr(__LINE__, pUri, nUri, expectCall->arg2); - test_locator(__LINE__, expectCall->line, expectCall->column); - - expectCall++; - return S_OK; -} - -static HRESULT WINAPI contentHandler_endPrefixMapping( - ISAXContentHandler* iface, - const WCHAR *pPrefix, - int nPrefix) -{ - if(!test_expect_call(CH_ENDPREFIXMAPPING)) - return E_FAIL; - - test_saxstr(__LINE__, pPrefix, nPrefix, expectCall->arg1); - test_locator(__LINE__, expectCall->line, expectCall->column); - - expectCall++; - return S_OK; -} - -static HRESULT WINAPI contentHandler_startElement( - ISAXContentHandler* iface, - const WCHAR *pNamespaceUri, - int nNamespaceUri, - const WCHAR *pLocalName, - int nLocalName, - const WCHAR *pQName, - int nQName, - ISAXAttributes *pAttr) -{ - if(!test_expect_call(CH_STARTELEMENT)) - return E_FAIL; - - test_saxstr(__LINE__, pNamespaceUri, nNamespaceUri, expectCall->arg1); - test_saxstr(__LINE__, pLocalName, nLocalName, expectCall->arg2); - test_saxstr(__LINE__, pQName, nQName, expectCall->arg3); - test_locator(__LINE__, expectCall->line, expectCall->column); - - expectCall++; - return S_OK; -} - -static HRESULT WINAPI contentHandler_endElement( - ISAXContentHandler* iface, - const WCHAR *pNamespaceUri, - int nNamespaceUri, - const WCHAR *pLocalName, - int nLocalName, - const WCHAR *pQName, - int nQName) -{ - if(!test_expect_call(CH_ENDELEMENT)) - return E_FAIL; - - test_saxstr(__LINE__, pNamespaceUri, nNamespaceUri, expectCall->arg1); - test_saxstr(__LINE__, pLocalName, nLocalName, expectCall->arg2); - test_saxstr(__LINE__, pQName, nQName, expectCall->arg3); - test_locator(__LINE__, expectCall->line, expectCall->column); - - expectCall++; - return S_OK; -} - -static HRESULT WINAPI contentHandler_characters( - ISAXContentHandler* iface, - const WCHAR *pChars, - int nChars) -{ - if(!test_expect_call(CH_CHARACTERS)) - return E_FAIL; - - test_saxstr(__LINE__, pChars, nChars, expectCall->arg1); - test_locator(__LINE__, expectCall->line, expectCall->column); - - expectCall++; - return S_OK; -} - -static HRESULT WINAPI contentHandler_ignorableWhitespace( - ISAXContentHandler* iface, - const WCHAR *pChars, - int nChars) -{ - if(!test_expect_call(CH_IGNORABLEWHITESPACE)) - return E_FAIL; - - test_saxstr(__LINE__, pChars, nChars, expectCall->arg1); - test_locator(__LINE__, expectCall->line, expectCall->column); - - expectCall++; - return S_OK; -} - -static HRESULT WINAPI contentHandler_processingInstruction( - ISAXContentHandler* iface, - const WCHAR *pTarget, - int nTarget, - const WCHAR *pData, - int nData) -{ - if(!test_expect_call(CH_PROCESSINGINSTRUCTION)) - return E_FAIL; - - test_saxstr(__LINE__, pTarget, nTarget, expectCall->arg1); - test_saxstr(__LINE__, pData, nData, expectCall->arg2); - test_locator(__LINE__, expectCall->line, expectCall->column); - - expectCall++; - return S_OK; -} - -static HRESULT WINAPI contentHandler_skippedEntity( - ISAXContentHandler* iface, - const WCHAR *pName, - int nName) -{ - if(!test_expect_call(CH_SKIPPEDENTITY)) - return E_FAIL; - - test_saxstr(__LINE__, pName, nName, expectCall->arg1); - test_locator(__LINE__, expectCall->line, expectCall->column); - - expectCall++; - return S_OK; -} - - -static const ISAXContentHandlerVtbl contentHandlerVtbl = -{ - contentHandler_QueryInterface, - contentHandler_AddRef, - contentHandler_Release, - contentHandler_putDocumentLocator, - contentHandler_startDocument, - contentHandler_endDocument, - contentHandler_startPrefixMapping, - contentHandler_endPrefixMapping, - contentHandler_startElement, - contentHandler_endElement, - contentHandler_characters, - contentHandler_ignorableWhitespace, - contentHandler_processingInstruction, - contentHandler_skippedEntity -}; - -static ISAXContentHandler contentHandler = { &contentHandlerVtbl }; - -static HRESULT WINAPI isaxerrorHandler_QueryInterface( - ISAXErrorHandler* iface, - REFIID riid, - void **ppvObject) -{ - *ppvObject = NULL; - - if(IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_ISAXErrorHandler)) - { - *ppvObject = iface; - } - else - { - return E_NOINTERFACE; - } - - return S_OK; -} - -static ULONG WINAPI isaxerrorHandler_AddRef( - ISAXErrorHandler* iface) -{ - return 2; -} - -static ULONG WINAPI isaxerrorHandler_Release( - ISAXErrorHandler* iface) -{ - return 1; -} - -static HRESULT WINAPI isaxerrorHandler_error( - ISAXErrorHandler* iface, - ISAXLocator *pLocator, - const WCHAR *pErrorMessage, - HRESULT hrErrorCode) -{ - return S_OK; -} - -static HRESULT WINAPI isaxerrorHandler_fatalError( - ISAXErrorHandler* iface, - ISAXLocator *pLocator, - const WCHAR *pErrorMessage, - HRESULT hrErrorCode) -{ - return S_OK; -} - -static HRESULT WINAPI isaxerrorHanddler_ignorableWarning( - ISAXErrorHandler* iface, - ISAXLocator *pLocator, - const WCHAR *pErrorMessage, - HRESULT hrErrorCode) -{ - return S_OK; -} - -static const ISAXErrorHandlerVtbl errorHandlerVtbl = -{ - isaxerrorHandler_QueryInterface, - isaxerrorHandler_AddRef, - isaxerrorHandler_Release, - isaxerrorHandler_error, - isaxerrorHandler_fatalError, - isaxerrorHanddler_ignorableWarning -}; - -static ISAXErrorHandler errorHandler = { &errorHandlerVtbl }; - -static void test_saxreader(void) -{ - HRESULT hr; - ISAXXMLReader *reader = NULL; - VARIANT var; - ISAXContentHandler *lpContentHandler; - ISAXErrorHandler *lpErrorHandler; - SAFEARRAY *pSA; - SAFEARRAYBOUND SADim[1]; - char *pSAData = NULL; - IStream *iStream; - ULARGE_INTEGER liSize; - LARGE_INTEGER liPos; - ULONG bytesWritten; - HANDLE file; - static const CHAR testXmlA[] = "test.xml"; - static const WCHAR testXmlW[] = {'t','e','s','t','.','x','m','l',0}; - IXMLDOMDocument *domDocument; - BSTR bstrData; - VARIANT_BOOL vBool; - - hr = CoCreateInstance(&CLSID_SAXXMLReader, NULL, CLSCTX_INPROC_SERVER, - &IID_ISAXXMLReader, (LPVOID*)&reader); - - if(FAILED(hr)) - { - skip("Failed to create SAXXMLReader instance\n"); - return; - } - - hr = ISAXXMLReader_getContentHandler(reader, NULL); - ok(hr == E_POINTER, "Expected E_POINTER, got %08x\n", hr); - - hr = ISAXXMLReader_getErrorHandler(reader, NULL); - ok(hr == E_POINTER, "Expected E_POINTER, got %08x\n", hr); - - hr = ISAXXMLReader_getContentHandler(reader, &lpContentHandler); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(lpContentHandler == NULL, "Expected %p, got %p\n", NULL, lpContentHandler); - - hr = ISAXXMLReader_getErrorHandler(reader, &lpErrorHandler); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(lpErrorHandler == NULL, "Expected %p, got %p\n", NULL, lpErrorHandler); - - hr = ISAXXMLReader_putContentHandler(reader, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - hr = ISAXXMLReader_putContentHandler(reader, &contentHandler); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - hr = ISAXXMLReader_putErrorHandler(reader, &errorHandler); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - hr = ISAXXMLReader_getContentHandler(reader, &lpContentHandler); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(lpContentHandler == &contentHandler, "Expected %p, got %p\n", &contentHandler, lpContentHandler); - - V_VT(&var) = VT_BSTR; - V_BSTR(&var) = SysAllocString(szSimpleXML); - - expectCall = contentHandlerTest1; - hr = ISAXXMLReader_parse(reader, var); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - test_expect_call(CH_ENDTEST); - - VariantClear(&var); - - SADim[0].lLbound= 0; - SADim[0].cElements= sizeof(szTestXML)-1; - pSA = SafeArrayCreate(VT_UI1, 1, SADim); - SafeArrayAccessData(pSA, (void**)&pSAData); - memcpy(pSAData, szTestXML, sizeof(szTestXML)-1); - SafeArrayUnaccessData(pSA); - V_VT(&var) = VT_ARRAY|VT_UI1; - V_ARRAY(&var) = pSA; - - expectCall = contentHandlerTest1; - hr = ISAXXMLReader_parse(reader, var); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - test_expect_call(CH_ENDTEST); - - SafeArrayDestroy(pSA); - - CreateStreamOnHGlobal(NULL, TRUE, &iStream); - liSize.QuadPart = strlen(szTestXML); - IStream_SetSize(iStream, liSize); - IStream_Write(iStream, szTestXML, strlen(szTestXML), &bytesWritten); - liPos.QuadPart = 0; - IStream_Seek(iStream, liPos, STREAM_SEEK_SET, NULL); - V_VT(&var) = VT_UNKNOWN|VT_DISPATCH; - V_UNKNOWN(&var) = (IUnknown*)iStream; - - expectCall = contentHandlerTest1; - hr = ISAXXMLReader_parse(reader, var); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - test_expect_call(CH_ENDTEST); - - IStream_Release(iStream); - - V_VT(&var) = VT_BSTR; - V_BSTR(&var) = SysAllocString(szCarriageRetTest); - - expectCall = contentHandlerTest2; - hr = ISAXXMLReader_parse(reader, var); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - test_expect_call(CH_ENDTEST); - - VariantClear(&var); - - file = CreateFileA(testXmlA, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - ok(file != INVALID_HANDLE_VALUE, "Could not create file: %u\n", GetLastError()); - WriteFile(file, szTestXML, sizeof(szTestXML)-1, &bytesWritten, NULL); - CloseHandle(file); - - expectCall = contentHandlerTest1; - hr = ISAXXMLReader_parseURL(reader, testXmlW); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - test_expect_call(CH_ENDTEST); - - DeleteFileA(testXmlA); - - hr = CoCreateInstance(&CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, - &IID_IXMLDOMDocument, (LPVOID*)&domDocument); - if(FAILED(hr)) - { - skip("Failed to create DOMDocument instance\n"); - return; - } - bstrData = SysAllocString(szSimpleXML); - hr = IXMLDOMDocument_loadXML(domDocument, bstrData, &vBool); - V_VT(&var) = VT_UNKNOWN; - V_UNKNOWN(&var) = (IUnknown*)domDocument; - - expectCall = contentHandlerTest2; - hr = ISAXXMLReader_parse(reader, var); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - test_expect_call(CH_ENDTEST); - IXMLDOMDocument_Release(domDocument); - - ISAXXMLReader_Release(reader); - SysFreeString(bstrData); -} - -START_TEST(saxreader) -{ - HRESULT hr; - - hr = CoInitialize(NULL); - ok(hr == S_OK, "failed to init com\n"); - - test_saxreader(); - - CoUninitialize(); -} diff --git a/rostests/winetests/msxml3/schema.c b/rostests/winetests/msxml3/schema.c deleted file mode 100644 index d4fb6f7aa7c..00000000000 --- a/rostests/winetests/msxml3/schema.c +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Schema test - * - * Copyright 2007 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 - */ - -#include -#define COBJMACROS - -#include "initguid.h" -#include "windows.h" -#include "ole2.h" -#include "xmldom.h" -#include "msxml2.h" -#include "dispex.h" - -#include "wine/test.h" - -static const WCHAR schema_uri[] = {'x','-','s','c','h','e','m','a',':','t','e','s','t','.','x','m','l',0}; - -static const WCHAR schema_xml[] = { - '<','S','c','h','e','m','a',' ','x','m','l','n','s','=','\"','u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','x','m','l','-','d','a','t','a','\"','\n', - 'x','m','l','n','s',':','d','t','=','\"','u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','d','a','t','a','t','y','p','e','s','\"','>','\n', - '<','/','S','c','h','e','m','a','>','\n',0 -}; - -static void test_schema_refs(void) -{ - IXMLDOMDocument2 *doc; - IXMLDOMSchemaCollection *schema; - HRESULT r; - LONG ref; - VARIANT v; - VARIANT_BOOL b; - BSTR str; - - r = CoCreateInstance( &CLSID_DOMDocument, NULL, - CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument2, (LPVOID*)&doc ); - if( r != S_OK ) - return; - - r = CoCreateInstance( &CLSID_XMLSchemaCache, NULL, - CLSCTX_INPROC_SERVER, &IID_IXMLDOMSchemaCollection, (LPVOID*)&schema ); - if( r != S_OK ) - { - IXMLDOMDocument2_Release(doc); - return; - } - - str = SysAllocString(schema_xml); - r = IXMLDOMDocument2_loadXML(doc, str, &b); - ok(r == S_OK, "ret %08x\n", r); - ok(b == VARIANT_TRUE, "b %04x\n", b); - SysFreeString(str); - - ref = IXMLDOMDocument2_AddRef(doc); - ok(ref == 2, "ref %d\n", ref); - VariantInit(&v); - V_VT(&v) = VT_DISPATCH; - V_DISPATCH(&v) = (IDispatch*)doc; - - str = SysAllocString(schema_uri); - r = IXMLDOMSchemaCollection_add(schema, str, v); - ok(r == S_OK, "ret %08x\n", r); - - /* IXMLDOMSchemaCollection_add doesn't add a ref on doc */ - ref = IXMLDOMDocument2_AddRef(doc); - ok(ref == 3, "ref %d\n", ref); - IXMLDOMDocument2_Release(doc); - - SysFreeString(str); - VariantClear(&v); - - V_VT(&v) = VT_INT; - r = IXMLDOMDocument2_get_schemas(doc, &v); - ok(r == S_FALSE, "ret %08x\n", r); - ok(V_VT(&v) == VT_NULL, "vt %x\n", V_VT(&v)); - - ref = IXMLDOMSchemaCollection_AddRef(schema); - ok(ref == 2, "ref %d\n", ref); - V_VT(&v) = VT_DISPATCH; - V_DISPATCH(&v) = (IDispatch*)schema; - - /* check that putref_schemas takes a ref */ - r = IXMLDOMDocument2_putref_schemas(doc, v); - ok(r == S_OK, "ret %08x\n", r); - ref = IXMLDOMSchemaCollection_AddRef(schema); - ok(ref == 4, "ref %d\n", ref); - IXMLDOMSchemaCollection_Release(schema); - VariantClear(&v); - - /* refs now 2 */ - V_VT(&v) = VT_INT; - /* check that get_schemas adds a ref */ - r = IXMLDOMDocument2_get_schemas(doc, &v); - ok(r == S_OK, "ret %08x\n", r); - ok(V_VT(&v) == VT_DISPATCH, "vt %x\n", V_VT(&v)); - ref = IXMLDOMSchemaCollection_AddRef(schema); - ok(ref == 4, "ref %d\n", ref); - IXMLDOMSchemaCollection_Release(schema); - - /* refs now 3 */ - /* get_schemas doesn't release a ref if passed VT_DISPATCH - ie it doesn't call VariantClear() */ - r = IXMLDOMDocument2_get_schemas(doc, &v); - ok(r == S_OK, "ret %08x\n", r); - ok(V_VT(&v) == VT_DISPATCH, "vt %x\n", V_VT(&v)); - ref = IXMLDOMSchemaCollection_AddRef(schema); - ok(ref == 5, "ref %d\n", ref); - IXMLDOMSchemaCollection_Release(schema); - - /* refs now 4 */ - /* release the two refs returned by get_schemas */ - IXMLDOMSchemaCollection_Release(schema); - IXMLDOMSchemaCollection_Release(schema); - - /* refs now 2 */ - - /* check that taking another ref on the document doesn't change the schema's ref count */ - IXMLDOMDocument2_AddRef(doc); - ref = IXMLDOMSchemaCollection_AddRef(schema); - ok(ref == 3, "ref %d\n", ref); - IXMLDOMSchemaCollection_Release(schema); - IXMLDOMDocument2_Release(doc); - - - /* refs now 2 */ - /* call putref_schema with some odd variants */ - V_VT(&v) = VT_INT; - r = IXMLDOMDocument2_putref_schemas(doc, v); - ok(r == E_FAIL, "ret %08x\n", r); - ref = IXMLDOMSchemaCollection_AddRef(schema); - ok(ref == 3, "ref %d\n", ref); - IXMLDOMSchemaCollection_Release(schema); - - /* refs now 2 */ - /* calling with VT_EMPTY releases the schema */ - V_VT(&v) = VT_EMPTY; - r = IXMLDOMDocument2_putref_schemas(doc, v); - ok(r == S_OK, "ret %08x\n", r); - ref = IXMLDOMSchemaCollection_AddRef(schema); - ok(ref == 2, "ref %d\n", ref); - IXMLDOMSchemaCollection_Release(schema); - - /* refs now 1 */ - /* try setting with VT_UNKNOWN */ - IXMLDOMSchemaCollection_AddRef(schema); - V_VT(&v) = VT_UNKNOWN; - V_UNKNOWN(&v) = (IUnknown*)schema; - r = IXMLDOMDocument2_putref_schemas(doc, v); - ok(r == S_OK, "ret %08x\n", r); - ref = IXMLDOMSchemaCollection_AddRef(schema); - ok(ref == 4, "ref %d\n", ref); - IXMLDOMSchemaCollection_Release(schema); - VariantClear(&v); - - /* refs now 2 */ - /* calling with VT_NULL releases the schema */ - V_VT(&v) = VT_NULL; - r = IXMLDOMDocument2_putref_schemas(doc, v); - ok(r == S_OK, "ret %08x\n", r); - ref = IXMLDOMSchemaCollection_AddRef(schema); - ok(ref == 2, "ref %d\n", ref); - IXMLDOMSchemaCollection_Release(schema); - - /* refs now 1 */ - /* set again */ - IXMLDOMSchemaCollection_AddRef(schema); - V_VT(&v) = VT_UNKNOWN; - V_UNKNOWN(&v) = (IUnknown*)schema; - r = IXMLDOMDocument2_putref_schemas(doc, v); - ok(r == S_OK, "ret %08x\n", r); - ref = IXMLDOMSchemaCollection_AddRef(schema); - ok(ref == 4, "ref %d\n", ref); - IXMLDOMSchemaCollection_Release(schema); - VariantClear(&v); - - /* refs now 2 */ - - /* release the final ref on the doc which should release its ref on the schema */ - IXMLDOMDocument2_Release(doc); - - ref = IXMLDOMSchemaCollection_AddRef(schema); - ok(ref == 2, "ref %d\n", ref); - IXMLDOMSchemaCollection_Release(schema); - IXMLDOMSchemaCollection_Release(schema); -} - -START_TEST(schema) -{ - HRESULT r; - - r = CoInitialize( NULL ); - ok( r == S_OK, "failed to init com\n"); - - test_schema_refs(); - - CoUninitialize(); -} diff --git a/rostests/winetests/msxml3/testlist.c b/rostests/winetests/msxml3/testlist.c deleted file mode 100644 index 6059b4bfe4a..00000000000 --- a/rostests/winetests/msxml3/testlist.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_domdoc(void); -extern void func_saxreader(void); -extern void func_schema(void); -extern void func_xmldoc(void); -extern void func_xmlelem(void); - -const struct test winetest_testlist[] = -{ - { "domdoc", func_domdoc }, - { "saxreader", func_saxreader }, - { "schema", func_schema }, - { "xmldoc", func_xmldoc }, - { "xmlelem", func_xmlelem }, - { 0, 0 } -}; diff --git a/rostests/winetests/msxml3/xmldoc.c b/rostests/winetests/msxml3/xmldoc.c deleted file mode 100644 index bc7422d2a10..00000000000 --- a/rostests/winetests/msxml3/xmldoc.c +++ /dev/null @@ -1,516 +0,0 @@ -/* - * IXMLDocument tests - * - * Copyright 2007 James Hawkins - * - * 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 - -#include -#include "windows.h" -#include "ole2.h" -#include "msxml2.h" -#include "ocidl.h" - -#include "wine/test.h" - -/* Deprecated Error Code */ -#define XML_E_INVALIDATROOTLEVEL 0xc00ce556 - -static void create_xml_file(LPCSTR filename) -{ - DWORD dwNumberOfBytesWritten; - HANDLE hf = CreateFile(filename, GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - - static const char data[] = - "\n" - "\n" - "\n" - " 1234\n" - " Captain Ahab\n" - ""; - - WriteFile(hf, data, sizeof(data) - 1, &dwNumberOfBytesWritten, NULL); - CloseHandle(hf); -} - -static void create_stream_on_file(IStream **stream, LPCSTR path) -{ - HANDLE hfile; - HGLOBAL hglobal; - LPVOID ptr; - HRESULT hr; - DWORD file_size, read; - - hfile = CreateFile(path, GENERIC_READ, FILE_SHARE_READ, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - ok(hfile != INVALID_HANDLE_VALUE, "Expected a valid file handle\n"); - file_size = GetFileSize(hfile, NULL); - - hglobal = GlobalAlloc(GHND, file_size); - ptr = GlobalLock(hglobal); - - ReadFile(hfile, ptr, file_size, &read, NULL); - ok(file_size == read, "Expected to read the whole file, read %d\n", read); - - hr = CreateStreamOnHGlobal(hglobal, TRUE, stream); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(*stream != NULL, "Expected non-NULL stream\n"); - - CloseHandle(hfile); - GlobalUnlock(hglobal); -} - -static void test_xmldoc(void) -{ - HRESULT hr; - IXMLDocument *doc = NULL; - IXMLElement *element = NULL, *child = NULL, *value = NULL; - IXMLElementCollection *collection = NULL, *inner = NULL; - IPersistStreamInit *psi = NULL; - IStream *stream = NULL; - CHAR path[MAX_PATH]; - LONG type, num_child; - VARIANT vIndex, vName; - BSTR name = NULL; - - static const WCHAR szBankAccount[] = {'B','A','N','K','A','C','C','O','U','N','T',0}; - static const WCHAR szNumber[] = {'N','U','M','B','E','R',0}; - static const WCHAR szNumVal[] = {'1','2','3','4',0}; - static const WCHAR szName[] = {'N','A','M','E',0}; - static const WCHAR szNameVal[] = {'C','a','p','t','a','i','n',' ','A','h','a','b',0}; - static const WCHAR szVersion[] = {'1','.','0',0}; - - hr = CoCreateInstance(&CLSID_XMLDocument, NULL, CLSCTX_INPROC_SERVER, - &IID_IXMLDocument, (LPVOID*)&doc); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - create_xml_file("bank.xml"); - GetFullPathNameA("bank.xml", MAX_PATH, path, NULL); - create_stream_on_file(&stream, path); - - hr = IXMLDocument_QueryInterface(doc, &IID_IPersistStreamInit, (LPVOID *)&psi); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(psi != NULL, "Expected non-NULL psi\n"); - - hr = IXMLDocument_get_root(doc, &element); - ok(hr == E_FAIL, "Expected E_FAIL, got %08x\n", hr); - ok(element == NULL, "Expected NULL element\n"); - - hr = IPersistStreamInit_Load(psi, stream); - ok(hr == S_OK || hr == XML_E_INVALIDATROOTLEVEL, "Expected S_OK, got %08x\n", hr); - if(hr == XML_E_INVALIDATROOTLEVEL) - goto cleanup; - - ok(stream != NULL, "Expected non-NULL stream\n"); - - /* version field */ - hr = IXMLDocument_get_version(doc, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - - hr = IXMLDocument_get_version(doc, &name); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpW(name, szVersion), "Expected 1.0, got %s\n", wine_dbgstr_w(name)); - SysFreeString(name); - - /* doctype */ - hr = IXMLDocument_get_doctype(doc, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - - hr = IXMLDocument_get_doctype(doc, &name); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpW(name, szBankAccount), "Expected BANKACCOUNT, got %s\n", wine_dbgstr_w(name)); - SysFreeString(name); - - hr = IXMLDocument_get_root(doc, &element); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(element != NULL, "Expected non-NULL element\n"); - - /* ::root() returns new instance each time */ - hr = IXMLDocument_get_root(doc, &child); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(child != NULL, "Expected non-NULL element\n"); - ok(child != element, "Expected new element instance\n"); - IXMLElement_Release(child); - - hr = IXMLElement_get_type(element, &type); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(type == XMLELEMTYPE_ELEMENT, "Expected XMLELEMTYPE_ELEMENT, got %d\n", type); - - hr = IXMLElement_get_tagName(element, &name); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpW(name, szBankAccount), "Expected BANKACCOUNT\n"); - SysFreeString(name); - - hr = IXMLElement_get_children(element, &collection); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(collection != NULL, "Expected non-NULL collection\n"); - - hr = IXMLElementCollection_get_length(collection, &num_child); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(num_child == 2, "Expected 2, got %d\n", num_child); - - V_VT(&vIndex) = VT_I4; - V_I4(&vIndex) = 0; - V_VT(&vName) = VT_ERROR; - V_ERROR(&vName) = DISP_E_PARAMNOTFOUND; - hr = IXMLElementCollection_item(collection, vIndex, vName, (IDispatch **)&child); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(child != NULL, "Expected non-NULL child\n"); - - hr = IXMLElement_get_type(child, &type); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(type == XMLELEMTYPE_ELEMENT, "Expected XMLELEMTYPE_ELEMENT, got %d\n", type); - - hr = IXMLElement_get_tagName(child, &name); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpW(name, szNumber), "Expected NUMBER\n"); - SysFreeString(name); - - hr = IXMLElement_get_children(child, &inner); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(inner != NULL, "Expected non-NULL inner\n"); - - hr = IXMLElementCollection_get_length(inner, &num_child); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(num_child == 1, "Expected 1, got %d\n", num_child); - - hr = IXMLElementCollection_item(inner, vIndex, vName, (IDispatch **)&value); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(value != NULL, "Expected non-NULL value\n"); - - hr = IXMLElement_get_type(value, &type); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(type == XMLELEMTYPE_TEXT, "Expected XMLELEMTYPE_TEXT, got %d\n", type); - - hr = IXMLElement_get_text(value, &name); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpW(name, szNumVal), "Expected '1234'\n"); - SysFreeString(name); - - IXMLElementCollection_Release(inner); - - inner = (IXMLElementCollection *)0xdeadbeef; - hr = IXMLElement_get_children(value, &inner); - ok(hr == 1, "Expected 1, got %08x\n", hr); - ok(inner == NULL, "Expected NULL inner, got %p\n", inner); - - IXMLElement_Release(value); - IXMLElement_Release(child); - value = NULL; - child = NULL; - - V_I4(&vIndex) = 1; - hr = IXMLElementCollection_item(collection, vIndex, vName, (IDispatch **)&child); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(child != NULL, "Expected non-NULL child\n"); - - hr = IXMLElement_get_type(child, &type); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(type == XMLELEMTYPE_ELEMENT, "Expected XMLELEMTYPE_ELEMENT, got %d\n", type); - - hr = IXMLElement_get_tagName(child, &name); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpW(name, szName), "Expected NAME\n"); - SysFreeString(name); - - hr = IXMLElement_get_children(child, &inner); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(inner != NULL, "Expected non-NULL inner\n"); - - hr = IXMLElementCollection_get_length(inner, &num_child); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(num_child == 1, "Expected 1, got %d\n", num_child); - - V_I4(&vIndex) = 0; - hr = IXMLElementCollection_item(inner, vIndex, vName, (IDispatch **)&value); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(value != NULL, "Expected non-NULL value\n"); - - hr = IXMLElement_get_type(value, &type); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(type == XMLELEMTYPE_TEXT, "Expected XMLELEMTYPE_TEXT, got %d\n", type); - - hr = IXMLElement_get_text(value, &name); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpW(name, szNameVal), "Expected 'Captain Ahab'\n"); - SysFreeString(name); - - IXMLElementCollection_Release(inner); - - inner = (IXMLElementCollection *)0xdeadbeef; - hr = IXMLElement_get_children(value, &inner); - ok(hr == 1, "Expected 1, got %08x\n", hr); - ok(inner == NULL, "Expected NULL inner, got %p\n", inner); - - IXMLElement_Release(value); - IXMLElement_Release(child); - IXMLElementCollection_Release(collection); - IXMLElement_Release(element); -cleanup: - IStream_Release(stream); - IPersistStreamInit_Release(psi); - IXMLDocument_Release(doc); - - DeleteFileA("bank.xml"); -} - -static void test_createElement(void) -{ - HRESULT hr; - IXMLDocument *doc = NULL; - IXMLElement *element = NULL, *root = NULL; - VARIANT vType, vName; - LONG type; - - hr = CoCreateInstance(&CLSID_XMLDocument, NULL, CLSCTX_INPROC_SERVER, - &IID_IXMLDocument, (LPVOID*)&doc); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - /* invalid vType type */ - V_VT(&vType) = VT_NULL; - V_VT(&vName) = VT_NULL; - element = (IXMLElement *)0xdeadbeef; - hr = IXMLDocument_createElement(doc, vType, vName, &element); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - ok(element == NULL, "Expected NULL element\n"); - - /* invalid vType value */ - V_VT(&vType) = VT_I4; - V_I4(&vType) = -1; - V_VT(&vName) = VT_NULL; - hr = IXMLDocument_createElement(doc, vType, vName, &element); - /* Up to and including SP7, createElement returns an element. */ - if(hr == S_OK) - { - ok(element != NULL, "Expected element\n"); - if (element != NULL) - { - hr = IXMLElement_get_type(element, &type); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - /* SP7 returns an XMLELEMTYPE_ELEMENT */ - ok(type == XMLELEMTYPE_OTHER || type == XMLELEMTYPE_ELEMENT, - "Expected XMLELEMTYPE_OTHER || XMLELEMTYPE_ELEMENT, got %d\n", type); - - IXMLElement_Release(element); - } - } - else - { - ok(hr == E_NOTIMPL, "Expected E_NOTIMPL, got %08x\n", hr); - ok(element == NULL, "Expected NULL element\n"); - } - - /* invalid vName type */ - V_VT(&vType) = VT_I4; - V_I4(&vType) = XMLELEMTYPE_ELEMENT; - V_VT(&vName) = VT_I4; - hr = IXMLDocument_createElement(doc, vType, vName, &element); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(element != NULL, "Expected non-NULL element\n"); - - hr = IXMLElement_get_type(element, &type); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(type == XMLELEMTYPE_ELEMENT, "Expected XMLELEMTYPE_ELEMENT, got %d\n", type); - - IXMLElement_Release(element); - - /* NULL element */ - V_VT(&vType) = VT_I4; - V_I4(&vType) = XMLELEMTYPE_ELEMENT; - V_VT(&vName) = VT_I4; - hr = IXMLDocument_createElement(doc, vType, vName, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - - root = (IXMLElement *)0xdeadbeef; - hr = IXMLDocument_get_root(doc, &root); - ok(hr == E_FAIL, "Expected E_FAIL, got %08x\n", hr); - ok(root == NULL, "Expected NULL root\n"); - - V_VT(&vType) = VT_I4; - V_I4(&vType) = XMLELEMTYPE_ELEMENT; - V_VT(&vName) = VT_NULL; - hr = IXMLDocument_createElement(doc, vType, vName, &element); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(element != NULL, "Expected non-NULL element\n"); - - /* createElement does not set the new element as root */ - root = (IXMLElement *)0xdeadbeef; - hr = IXMLDocument_get_root(doc, &root); - ok(hr == E_FAIL, "Expected E_FAIL, got %08x\n", hr); - ok(root == NULL, "Expected NULL root\n"); - - IXMLElement_Release(element); - IXMLDocument_Release(doc); -} - -static void test_persiststreaminit(void) -{ - IXMLDocument *doc = NULL; - IXMLElement *element = NULL; - IPersistStreamInit *psi = NULL; - IStream *stream = NULL; - STATSTG stat; - HRESULT hr; - ULARGE_INTEGER size; - CHAR path[MAX_PATH]; - CLSID id; - BSTR str; - static const WCHAR testW[] = {'t','e','s','t',0}; - - hr = CoCreateInstance(&CLSID_XMLDocument, NULL, CLSCTX_INPROC_SERVER, - &IID_IXMLDocument, (LPVOID*)&doc); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - hr = IXMLDocument_QueryInterface(doc, &IID_IPersistStreamInit, (LPVOID *)&psi); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(psi != NULL, "Expected non-NULL psi\n"); - - /* null arguments */ - hr = IPersistStreamInit_GetSizeMax(psi, NULL); - ok(hr == E_NOTIMPL, "Expected E_NOTIMPL, got %08x\n", hr); - - hr = IPersistStreamInit_Load(psi, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - - hr = IPersistStreamInit_Save(psi, NULL, FALSE); - todo_wine ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - - hr = IPersistStreamInit_GetClassID(psi, NULL); - ok(hr == E_POINTER, "Expected E_POINTER, got %08x\n", hr); - - hr = IPersistStreamInit_IsDirty(psi); - todo_wine ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); - - create_xml_file("bank.xml"); - GetFullPathNameA("bank.xml", MAX_PATH, path, NULL); - create_stream_on_file(&stream, path); - - /* GetSizeMax not implemented */ - size.QuadPart = 0; - hr = IPersistStreamInit_GetSizeMax(psi, &size); - ok(hr == E_NOTIMPL, "Expected E_NOTIMPL, got %08x\n", hr); - ok(size.QuadPart == 0, "Expected 0\n"); - - hr = IPersistStreamInit_Load(psi, stream); - IStream_Release(stream); - ok(hr == S_OK || hr == XML_E_INVALIDATROOTLEVEL, "Expected S_OK, got %08x\n", hr); - if(hr == XML_E_INVALIDATROOTLEVEL) - goto cleanup; - - hr = IPersistStreamInit_IsDirty(psi); - todo_wine ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); - - /* try to save document */ - stream = NULL; - hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - hr = IPersistStreamInit_Save(psi, stream, FALSE); - todo_wine ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - stat.cbSize.QuadPart = 0; - hr = IStream_Stat(stream, &stat, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - todo_wine ok(stat.cbSize.QuadPart > 0, "Expected >0\n"); - IStream_Release(stream); - - str = SysAllocString(testW); - hr = IXMLDocument_get_root(doc, &element); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - hr = IXMLElement_put_text(element, str); - IXMLElement_Release(element); - SysFreeString(str); - - hr = IPersistStreamInit_IsDirty(psi); - todo_wine ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); - - create_stream_on_file(&stream, path); - hr = IPersistStreamInit_Load(psi, stream); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - IStream_Release(stream); - - hr = IPersistStreamInit_IsDirty(psi); - todo_wine ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); - - /* reset internal stream */ - hr = IPersistStreamInit_InitNew(psi); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - hr = IPersistStreamInit_IsDirty(psi); - todo_wine ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); - - stream = NULL; - hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - hr = IPersistStreamInit_Save(psi, stream, FALSE); - todo_wine ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - stat.cbSize.QuadPart = 0; - hr = IStream_Stat(stream, &stat, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - todo_wine ok(stat.cbSize.QuadPart > 0, "Expected >0\n"); - IStream_Release(stream); - - memset(&id, 0, sizeof(id)); - hr = IPersistStreamInit_GetClassID(psi, &id); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(IsEqualCLSID(&id, &CLSID_XMLDocument), "Expected CLSID_XMLDocument\n"); - -cleanup: - IPersistStreamInit_Release(psi); - IXMLDocument_Release(doc); - DeleteFileA("bank.xml"); -} - -static BOOL test_try_xmldoc(void) -{ - IXMLDocument *doc = NULL; - HRESULT hr; - - hr = CoCreateInstance(&CLSID_XMLDocument, NULL, CLSCTX_INPROC_SERVER, - &IID_IXMLDocument, (LPVOID*)&doc); - if (FAILED(hr)) - { - skip("Failed to create XMLDocument instance\n"); - return FALSE; - } - - IXMLDocument_Release(doc); - return TRUE; -} - -START_TEST(xmldoc) -{ - HRESULT hr; - - hr = CoInitialize(NULL); - ok(hr == S_OK, "failed to init com\n"); - - if (!test_try_xmldoc()) - { - CoUninitialize(); - return; - } - - test_xmldoc(); - test_createElement(); - test_persiststreaminit(); - - CoUninitialize(); -} diff --git a/rostests/winetests/msxml3/xmlelem.c b/rostests/winetests/msxml3/xmlelem.c deleted file mode 100644 index f38d515c4e7..00000000000 --- a/rostests/winetests/msxml3/xmlelem.c +++ /dev/null @@ -1,599 +0,0 @@ -/* - * IXMLElement tests - * - * Copyright 2007 James Hawkins - * - * 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 - -#include - -#include "windows.h" -#include "ole2.h" -#include "xmldom.h" -#include "msxml2.h" -#include "ocidl.h" - -#include "wine/test.h" - -#define ERROR_URL_NOT_FOUND 0x800c0006 - -static void test_xmlelem(void) -{ - HRESULT hr; - IXMLDocument *doc = NULL; - IXMLElement *element = NULL, *parent; - IXMLElement *child, *child2; - IXMLElementCollection *children; - VARIANT vType, vName; - VARIANT vIndex, vValue; - BSTR str, val; - LONG type, num_child; - - static const WCHAR propName[] = {'p','r','o','p',0}; - static const WCHAR propVal[] = {'v','a','l',0}; - static const WCHAR nextVal[] = {'n','e','x','t',0}; - static const WCHAR noexist[] = {'n','o','e','x','i','s','t',0}; - static const WCHAR crazyCase1[] = {'C','R','a','z','Y','c','A','S','E',0}; - static const WCHAR crazyCase2[] = {'C','R','A','Z','Y','C','A','S','E',0}; - - hr = CoCreateInstance(&CLSID_XMLDocument, NULL, CLSCTX_INPROC_SERVER, - &IID_IXMLDocument, (LPVOID*)&doc); - ok(hr == S_OK, "Expected S_OK, got 0x%08x\n", hr); - - V_VT(&vType) = VT_I4; - V_I4(&vType) = XMLELEMTYPE_ELEMENT; - V_VT(&vName) = VT_NULL; - hr = IXMLDocument_createElement(doc, vType, vName, &element); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(element != NULL, "Expected non-NULL element\n"); - - hr = IXMLElement_get_tagName(element, &str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(lstrlenW(str) == 0, "Expected empty tag name\n"); - SysFreeString(str); - - parent = (IXMLElement *)0xdeadbeef; - hr = IXMLElement_get_parent(element, &parent); - ok(hr == 1, "Expected 1, got %08x\n", hr); - ok(parent == NULL, "Expected NULL parent\n"); - - str = SysAllocString(noexist); - hr = IXMLElement_getAttribute(element, str, &vValue); - ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); - ok(V_VT(&vValue) == VT_EMPTY, "Expected VT_EMPTY, got %d\n", V_VT(&vValue)); - ok(V_BSTR(&vValue) == NULL, "Expected null value\n"); - VariantClear(&vValue); - SysFreeString(str); - - str = SysAllocString(crazyCase1); - val = SysAllocString(propVal); - V_VT(&vValue) = VT_BSTR; - V_BSTR(&vValue) = val; - hr = IXMLElement_setAttribute(element, str, vValue); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - SysFreeString(str); - SysFreeString(val); - - str = SysAllocString(crazyCase2); - hr = IXMLElement_getAttribute(element, str, &vValue); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(V_VT(&vValue) == VT_BSTR, "Expected VT_BSTR, got %d\n", V_VT(&vValue)); - ok(!lstrcmpW(V_BSTR(&vValue), propVal), "Expected 'val'\n"); - VariantClear(&vValue); - SysFreeString(str); - - str = SysAllocString(propName); - val = SysAllocString(propVal); - V_VT(&vValue) = VT_BSTR; - V_BSTR(&vValue) = val; - hr = IXMLElement_setAttribute(element, str, vValue); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - SysFreeString(val); - - hr = IXMLElement_getAttribute(element, str, &vValue); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(V_VT(&vValue) == VT_BSTR, "Expected VT_BSTR, got %d\n", V_VT(&vValue)); - ok(!lstrcmpW(V_BSTR(&vValue), propVal), "Expected 'val'\n"); - VariantClear(&vValue); - - hr = IXMLElement_removeAttribute(element, str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - /* remove now nonexistent attribute */ - hr = IXMLElement_removeAttribute(element, str); - ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); - - hr = IXMLElement_getAttribute(element, str, &vValue); - ok(hr == 1, "Expected 1, got %08x\n", hr); - ok(V_VT(&vValue) == VT_EMPTY, "Expected VT_EMPTY, got %d\n", V_VT(&vValue)); - ok(V_BSTR(&vValue) == NULL, "Expected null value\n"); - SysFreeString(str); - VariantClear(&vValue); - - children = (IXMLElementCollection *)0xdeadbeef; - hr = IXMLElement_get_children(element, &children); - ok(hr == 1, "Expected 1, got %08x\n", hr); - ok(children == NULL, "Expected NULL collection\n"); - - hr = IXMLElement_get_type(element, &type); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(type == XMLELEMTYPE_ELEMENT, "Expected XMLELEMTYPE_ELEMENT, got %d\n", type); - - hr = IXMLElement_get_text(element, &str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(lstrlenW(str) == 0, "Expected empty text\n"); - SysFreeString(str); - - /* put_text with an ELEMENT */ - str = SysAllocString(propVal); - hr = IXMLElement_put_text(element, str); - ok(hr == E_NOTIMPL, "Expected E_NOTIMPL, got %08x\n", hr); - SysFreeString(str); - - V_VT(&vType) = VT_I4; - V_I4(&vType) = XMLELEMTYPE_TEXT; - V_VT(&vName) = VT_NULL; - hr = IXMLDocument_createElement(doc, vType, vName, &child); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(child != NULL, "Expected non-NULL child\n"); - - hr = IXMLElement_addChild(element, child, 0, -1); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - str = SysAllocString(propVal); - hr = IXMLElement_put_text(child, str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - SysFreeString(str); - - parent = (IXMLElement *)0xdeadbeef; - hr = IXMLElement_get_parent(child, &parent); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(parent != element, "Expected parent != element\n"); - - hr = IXMLElement_get_type(parent, &type); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(type == XMLELEMTYPE_ELEMENT, "Expected XMLELEMTYPE_ELEMENT, got %d\n", type); - - children = (IXMLElementCollection *)0xdeadbeef; - hr = IXMLElement_get_children(element, &children); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(children != NULL, "Expected non-NULL collection\n"); - - hr = IXMLElementCollection_get_length(children, &num_child); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(num_child == 1, "Expected 1, got %d\n", num_child); - - V_VT(&vIndex) = VT_I4; - V_I4(&vIndex) = 0; - V_VT(&vName) = VT_ERROR; - V_ERROR(&vName) = DISP_E_PARAMNOTFOUND; - hr = IXMLElementCollection_item(children, vIndex, vName, (IDispatch **)&child2); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(child2 != NULL, "Expected non-NULL child\n"); - - hr = IXMLElement_get_type(child2, &type); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(type == XMLELEMTYPE_TEXT, "Expected XMLELEMTYPE_TEXT, got %d\n", type); - - hr = IXMLElement_get_text(element, &str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpW(str, propVal), "Expected 'val'\n"); - SysFreeString(str); - - hr = IXMLElement_get_text(child2, &str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpW(str, propVal), "Expected 'val'\n"); - SysFreeString(str); - - /* try put_text on ELEMENT again, now that it has a text child */ - str = SysAllocString(nextVal); - hr = IXMLElement_put_text(element, str); - ok(hr == E_NOTIMPL, "Expected E_NOTIMPL, got %08x\n", hr); - SysFreeString(str); - - str = SysAllocString(nextVal); - hr = IXMLElement_put_text(child2, str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - SysFreeString(str); - - hr = IXMLElement_get_text(element, &str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpW(str, nextVal), "Expected 'val'\n"); - SysFreeString(str); - - IXMLElement_Release(child2); - IXMLElementCollection_Release(children); - IXMLElement_Release(parent); - IXMLElement_Release(child); - IXMLElement_Release(element); - IXMLDocument_Release(doc); -} - -static void create_xml_file(LPCSTR filename) -{ - DWORD dwNumberOfBytesWritten; - HANDLE hf = CreateFile(filename, GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - - static const char data[] = - "\n" - "\n" - " 1234\n" - " Captain Ahab\n" - "\n"; - - WriteFile(hf, data, sizeof(data) - 1, &dwNumberOfBytesWritten, NULL); - CloseHandle(hf); -} - -static void test_xmlelem_collection(void) -{ - HRESULT hr; - IUnknown *unk = NULL; - IXMLDocument *doc = NULL; - IXMLElement *element = NULL, *child; - IXMLElementCollection *collection = NULL; - IEnumVARIANT *enumVar = NULL; - CHAR pathA[MAX_PATH]; - WCHAR path[MAX_PATH]; - LONG length, type; - ULONG num_vars; - VARIANT var, vIndex, vName; - BSTR url, str; - static const CHAR szBankXML[] = "bank.xml"; - static const WCHAR szNumber[] = {'N','U','M','B','E','R',0}; - static const WCHAR szName[] = {'N','A','M','E',0}; - - hr = CoCreateInstance(&CLSID_XMLDocument, NULL, CLSCTX_INPROC_SERVER, - &IID_IXMLDocument, (LPVOID*)&doc); - ok(hr == S_OK, "Expected S_OK, got 0x%08x\n", hr); - - create_xml_file(szBankXML); - GetFullPathNameA(szBankXML, MAX_PATH, pathA, NULL); - MultiByteToWideChar(CP_ACP, 0, pathA, -1, path, MAX_PATH); - - url = SysAllocString(path); - hr = IXMLDocument_put_URL(doc, url); - ok(hr == S_OK, "Expected S_OK, got 0x%08x\n", hr); - SysFreeString(url); - - if(hr != S_OK) - goto cleanup; - - hr = IXMLDocument_get_root(doc, &element); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(element != NULL, "Expected non-NULL element\n"); - - hr = IXMLElement_get_children(element, &collection); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(collection != NULL, "Expected non-NULL collection\n"); - - hr = IXMLElementCollection_get_length(collection, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - - hr = IXMLElementCollection_get_length(collection, &length); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(length == 2, "Expected 2, got %d\n", length); - - /* IXMLElementCollection:put_length does nothing */ - hr = IXMLElementCollection_put_length(collection, -1); - ok(hr == E_FAIL, "Expected E_FAIL, got %08x\n", hr); - - hr = IXMLElementCollection_put_length(collection, 0); - ok(hr == E_FAIL, "Expected E_FAIL, got %08x\n", hr); - - hr = IXMLElementCollection_put_length(collection, 1); - ok(hr == E_FAIL, "Expected E_FAIL, got %08x\n", hr); - - hr = IXMLElementCollection_put_length(collection, 2); - ok(hr == E_FAIL, "Expected E_FAIL, got %08x\n", hr); - - hr = IXMLElementCollection_put_length(collection, 3); - ok(hr == E_FAIL, "Expected E_FAIL, got %08x\n", hr); - - hr = IXMLElementCollection_put_length(collection, 50); - ok(hr == E_FAIL, "Expected E_FAIL, got %08x\n", hr); - - /* make sure the length hasn't changed */ - hr = IXMLElementCollection_get_length(collection, &length); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(length == 2, "Expected 2, got %d\n", length); - - /* IXMLElementCollection implements IEnumVARIANT */ - hr = IXMLElementCollection_QueryInterface(collection, &IID_IEnumVARIANT, (LPVOID *)&enumVar); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(enumVar != NULL, "Expected non-NULL enumVar\n"); - IEnumVARIANT_Release(enumVar); - - hr = IXMLElementCollection_get__newEnum(collection, &unk); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(unk != NULL, "Expected non-NULL unk\n"); - - hr = IUnknown_QueryInterface(unk, &IID_IEnumVARIANT, (LPVOID *)&enumVar); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(enumVar != NULL, "Expected non-NULL enumVar\n"); - IUnknown_Release(unk); - - /* 1234 */ - hr = IEnumVARIANT_Next(enumVar, 1, &var, &num_vars); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(V_VT(&var) == VT_DISPATCH, "Expected VT_DISPATCH, got %d\n", V_VT(&var)); - ok(num_vars == 1, "Expected 1, got %d\n", num_vars); - - hr = IUnknown_QueryInterface(V_DISPATCH(&var), &IID_IXMLElement, (LPVOID *)&child); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(child != NULL, "Expected non-NULL child\n"); - - VariantClear(&var); - - hr = IXMLElement_get_type(child, &type); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(type == XMLELEMTYPE_ELEMENT, "Expected XMLELEMTYPE_ELEMENT, got %d\n", type); - - hr = IXMLElement_get_tagName(child, &str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpW(str, szNumber), "Expected NUMBER\n"); - SysFreeString(str); - IXMLElement_Release(child); - - /* Captain Ahab */ - hr = IEnumVARIANT_Next(enumVar, 1, &var, &num_vars); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(V_VT(&var) == VT_DISPATCH, "Expected VT_DISPATCH, got %d\n", V_VT(&var)); - ok(num_vars == 1, "Expected 1, got %d\n", num_vars); - - /* try advance further, no children left */ - hr = IEnumVARIANT_Next(enumVar, 1, &var, &num_vars); - ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); - ok(V_VT(&var) == 0, "Expected 0, got %d\n", V_VT(&var)); - ok(num_vars == 0, "Expected 0, got %d\n", num_vars); - - hr = IEnumVARIANT_Next(enumVar, 1, &var, NULL); - ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); - ok(V_VT(&var) == 0, "Expected 0, got %d\n", V_VT(&var)); - - hr = IUnknown_QueryInterface(V_DISPATCH(&var), &IID_IXMLElement, (LPVOID *)&child); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(child != NULL, "Expected non-NULL child\n"); - - VariantClear(&var); - - hr = IXMLElement_get_type(child, &type); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(type == XMLELEMTYPE_ELEMENT, "Expected XMLELEMTYPE_ELEMENT, got %d\n", type); - - hr = IXMLElement_get_tagName(child, &str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpW(str, szName), "Expected NAME\n"); - SysFreeString(str); - IXMLElement_Release(child); - - /* 1234 */ - V_VT(&vIndex) = VT_I4; - V_I4(&vIndex) = 0; - V_VT(&vName) = VT_ERROR; - V_ERROR(&vName) = DISP_E_PARAMNOTFOUND; - hr = IXMLElementCollection_item(collection, vIndex, vName, (IDispatch **)&child); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(child != NULL, "Expected non-NULL child\n"); - - hr = IXMLElement_get_type(child, &type); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(type == XMLELEMTYPE_ELEMENT, "Expected XMLELEMTYPE_ELEMENT, got %d\n", type); - - hr = IXMLElement_get_tagName(child, &str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpW(str, szNumber), "Expected NUMBER\n"); - SysFreeString(str); - IXMLElement_Release(child); - - /* Captain Ahab */ - V_VT(&vIndex) = VT_I4; - V_I4(&vIndex) = 1; - V_VT(&vName) = VT_ERROR; - V_ERROR(&vName) = DISP_E_PARAMNOTFOUND; - hr = IXMLElementCollection_item(collection, vIndex, vName, (IDispatch **)&child); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(child != NULL, "Expected non-NULL child\n"); - - hr = IXMLElement_get_type(child, &type); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(type == XMLELEMTYPE_ELEMENT, "Expected XMLELEMTYPE_ELEMENT, got %d\n", type); - - hr = IXMLElement_get_tagName(child, &str); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(!lstrcmpW(str, szName), "Expected NAME\n"); - SysFreeString(str); - IXMLElement_Release(child); - - V_I4(&vIndex) = 100; - hr = IXMLElementCollection_item(collection, vIndex, vName, (IDispatch **)&child); - ok(hr == E_FAIL, "Expected E_FAIL, got %08x\n", hr); - ok(child == NULL, "Expected NULL child\n"); - - V_I4(&vIndex) = -1; - child = (IXMLElement *)0xdeadbeef; - hr = IXMLElementCollection_item(collection, vIndex, vName, (IDispatch **)&child); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - ok(child == NULL, "Expected NULL child\n"); - - IEnumVARIANT_Release(enumVar); - IXMLElement_Release(element); - IXMLElementCollection_Release(collection); -cleanup: - IXMLDocument_Release(doc); - DeleteFileA("bank.xml"); -} - -static void test_xmlelem_children(void) -{ - IXMLDocument *doc = NULL; - IXMLElement *element = NULL, *child = NULL, *child2 = NULL; - IXMLElementCollection *collection = NULL; - VARIANT vType, vName, vIndex; - LONG length; - HRESULT hr; - - hr = CoCreateInstance(&CLSID_XMLDocument, NULL, CLSCTX_INPROC_SERVER, - &IID_IXMLDocument, (LPVOID*)&doc); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - V_VT(&vType) = VT_I4; - V_I4(&vType) = XMLELEMTYPE_ELEMENT; - V_VT(&vName) = VT_NULL; - hr = IXMLDocument_createElement(doc, vType, vName, &element); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(element != NULL, "Expected non-NULL element\n"); - - V_VT(&vType) = VT_I4; - V_I4(&vType) = XMLELEMTYPE_TEXT; - V_VT(&vName) = VT_NULL; - hr = IXMLDocument_createElement(doc, vType, vName, &child); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(child != NULL, "Expected non-NULL child\n"); - - V_VT(&vType) = VT_I4; - V_I4(&vType) = XMLELEMTYPE_TEXT; - V_VT(&vName) = VT_NULL; - hr = IXMLDocument_createElement(doc, vType, vName, &child2); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(child2 != NULL, "Expected non-NULL child\n"); - - hr = IXMLElement_addChild(element, child, 0, -1); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - hr = IXMLElement_get_children(element, &collection); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(collection != NULL, "Expected non-NULL collection\n"); - - length = 0; - hr = IXMLElementCollection_get_length(collection, &length); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(length == 1, "Expected 1, got %08x\n", length); - - /* remove/add child and check what happens with collection */ - hr = IXMLElement_removeChild(element, child); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - length = -1; - hr = IXMLElementCollection_get_length(collection, &length); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(length == 0, "Expected 0, got %08x\n", length); - IXMLElementCollection_Release(collection); - - hr = IXMLElement_AddRef(child); - ok(hr == 2, "Expected 2, got %08x\n", hr); - IXMLElement_Release(child); - hr = IXMLElement_addChild(element, child, 0, -1); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - hr = IXMLElement_AddRef(child); - ok(hr == 2, "Expected 2, got %08x\n", hr); - IXMLElement_Release(child); - hr = IXMLElement_addChild(element, child2, 0, -1); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - hr = IXMLElement_get_children(element, &collection); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(collection != NULL, "Expected non-NULL collection\n"); - - hr = IXMLElement_AddRef(child); - ok(hr == 2, "Expected 2, got %08x\n", hr); - IXMLElement_Release(child); - - length = 0; - hr = IXMLElementCollection_get_length(collection, &length); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(length == 2, "Expected 2, got %08x\n", length); - - IXMLElement_Release(child2); - - length = 0; - hr = IXMLElementCollection_get_length(collection, &length); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(length == 2, "Expected 2, got %08x\n", length); - - V_VT(&vIndex) = VT_I4; - V_I4(&vIndex) = 1; - hr = IXMLElementCollection_item(collection, vIndex, vName, (IDispatch **)&child2); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(child2 != NULL, "Expected not NULL child\n"); - IXMLElementCollection_Release(collection); - IXMLElement_Release(child2); - - /* add element->child->child2 structure, then remove child2 from node */ - V_VT(&vType) = VT_I4; - V_I4(&vType) = XMLELEMTYPE_TEXT; - V_VT(&vName) = VT_NULL; - hr = IXMLDocument_createElement(doc, vType, vName, &child2); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(child2 != NULL, "Expected non-NULL child\n"); - - hr = IXMLElement_addChild(child, child2, 0, -1); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - hr = IXMLElement_removeChild(element, child2); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - - hr = IXMLElement_removeChild(child, child2); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - hr = IXMLElement_removeChild(child, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - - IXMLElement_Release(element); - IXMLElement_Release(child); - IXMLElement_Release(child2); - IXMLDocument_Release(doc); -} - -static BOOL test_try_xmldoc(void) -{ - IXMLDocument *doc = NULL; - HRESULT hr; - - hr = CoCreateInstance(&CLSID_XMLDocument, NULL, CLSCTX_INPROC_SERVER, - &IID_IXMLDocument, (LPVOID*)&doc); - if (FAILED(hr)) - { - skip("Failed to create XMLDocument instance\n"); - return FALSE; - } - - IXMLDocument_Release(doc); - return TRUE; -} - -START_TEST(xmlelem) -{ - HRESULT hr; - - hr = CoInitialize(NULL); - ok(hr == S_OK, "failed to init com\n"); - - if (!test_try_xmldoc()) - { - CoUninitialize(); - return; - } - - test_xmlelem(); - test_xmlelem_collection(); - test_xmlelem_children(); - - CoUninitialize(); -} diff --git a/rostests/winetests/netapi32/CMakeLists.txt b/rostests/winetests/netapi32/CMakeLists.txt deleted file mode 100644 index 951664aa751..00000000000 --- a/rostests/winetests/netapi32/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - access.c - apibuf.c - ds.c - wksta.c - testlist.c) - -add_executable(netapi32_winetest ${SOURCE}) -target_link_libraries(netapi32_winetest wine) -set_module_type(netapi32_winetest win32cui) -add_importlibs(netapi32_winetest advapi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET netapi32_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/netapi32/access.c b/rostests/winetests/netapi32/access.c deleted file mode 100644 index 2f296844e6f..00000000000 --- a/rostests/winetests/netapi32/access.c +++ /dev/null @@ -1,352 +0,0 @@ -/* - * Copyright 2002 Andriy Palamarchuk - * - * Conformance test of the access functions. - * - * 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 - -#include "wine/test.h" - -WCHAR user_name[UNLEN + 1]; -WCHAR computer_name[MAX_COMPUTERNAME_LENGTH + 1]; - -static const WCHAR sNonexistentUser[] = {'N','o','n','e','x','i','s','t','e','n','t',' ', - 'U','s','e','r',0}; -static WCHAR sTooLongName[] = {'T','h','i','s',' ','i','s',' ','a',' ','b','a','d', - ' ','u','s','e','r','n','a','m','e',0}; -static WCHAR sTooLongPassword[] = {'a','b','c','d','e','f','g','h','a','b','c','d','e','f','g','h', - 'a','b','c','d','e','f','g','h','a','b','c','d','e','f','g','h','a','b','c','d','e','f','g','h', - 'a','b','c','d','e','f','g','h','a','b','c','d','e','f','g','h','a','b','c','d','e','f','g','h', - 'a','b','c','d','e','f','g','h','a','b','c','d','e','f','g','h','a','b','c','d','e','f','g','h', - 'a','b','c','d','e','f','g','h','a','b','c','d','e','f','g','h','a','b','c','d','e','f','g','h', - 'a','b','c','d','e','f','g','h','a','b','c','d','e','f','g','h','a','b','c','d','e','f','g','h', - 'a','b','c','d','e','f','g','h','a','b','c','d','e','f','g','h','a','b','c','d','e','f','g','h', - 'a','b','c','d','e','f','g','h','a','b','c','d','e','f','g','h','a','b','c','d','e','f','g','h', - 'a','b','c','d','e','f','g','h','a','b','c','d','e','f','g','h','a','b','c','d','e','f','g','h', - 'a','b','c','d','e','f','g','h','a','b','c','d','e','f','g','h','a','b','c','d','e','f','g','h', - 'a','b','c','d','e','f','g','h','a','b','c','d','e','f','g','h','a','b','c','d','e','f','g','h', - 'a', 0}; - -static WCHAR sTestUserName[] = {'t', 'e', 's', 't', 'u', 's', 'e', 'r', 0}; -static WCHAR sTestUserOldPass[] = {'O', 'l', 'd', 'P', 'a', 's', 's', 'W', '0', 'r', 'd', 'S', 'e', 't', '!', '~', 0}; -static const WCHAR sBadNetPath[] = {'\\','\\','B','a',' ',' ','p','a','t','h',0}; -static const WCHAR sInvalidName[] = {'\\',0}; -static const WCHAR sInvalidName2[] = {'\\','\\',0}; -static const WCHAR sEmptyStr[] = { 0 }; - -static NET_API_STATUS (WINAPI *pNetApiBufferFree)(LPVOID)=NULL; -static NET_API_STATUS (WINAPI *pNetApiBufferSize)(LPVOID,LPDWORD)=NULL; -static NET_API_STATUS (WINAPI *pNetQueryDisplayInformation)(LPWSTR,DWORD,DWORD,DWORD,DWORD,LPDWORD,PVOID*)=NULL; -static NET_API_STATUS (WINAPI *pNetUserGetInfo)(LPCWSTR,LPCWSTR,DWORD,LPBYTE*)=NULL; -static NET_API_STATUS (WINAPI *pNetUserModalsGet)(LPCWSTR,DWORD,LPBYTE*)=NULL; -static NET_API_STATUS (WINAPI *pNetUserAdd)(LPCWSTR,DWORD,LPBYTE,LPDWORD)=NULL; -static NET_API_STATUS (WINAPI *pNetUserDel)(LPCWSTR,LPCWSTR)=NULL; - -static int init_access_tests(void) -{ - DWORD dwSize; - BOOL rc; - - user_name[0] = 0; - dwSize = sizeof(user_name)/sizeof(WCHAR); - rc=GetUserNameW(user_name, &dwSize); - if (rc==FALSE && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("GetUserNameW is not available.\n"); - return 0; - } - ok(rc, "User Name Retrieved\n"); - - computer_name[0] = 0; - dwSize = sizeof(computer_name)/sizeof(WCHAR); - ok(GetComputerNameW(computer_name, &dwSize), "Computer Name Retrieved\n"); - return 1; -} - -static NET_API_STATUS create_test_user(void) -{ - USER_INFO_1 usri; - - usri.usri1_name = sTestUserName; - usri.usri1_password = sTestUserOldPass; - usri.usri1_priv = USER_PRIV_USER; - usri.usri1_home_dir = NULL; - usri.usri1_comment = NULL; - usri.usri1_flags = UF_SCRIPT; - usri.usri1_script_path = NULL; - - return pNetUserAdd(NULL, 1, (LPBYTE)&usri, NULL); -} - -static NET_API_STATUS delete_test_user(void) -{ - return pNetUserDel(NULL, sTestUserName); -} - -static void run_usergetinfo_tests(void) -{ - NET_API_STATUS rc; - PUSER_INFO_0 ui0 = NULL; - PUSER_INFO_10 ui10 = NULL; - DWORD dwSize; - - if((rc = create_test_user()) != NERR_Success ) - { - skip("Skipping usergetinfo_tests, create_test_user failed: 0x%08x\n", rc); - return; - } - - /* Level 0 */ - rc=pNetUserGetInfo(NULL, sTestUserName, 0, (LPBYTE *)&ui0); - ok(rc == NERR_Success, "NetUserGetInfo level 0 failed: 0x%08x.\n", rc); - ok(!lstrcmpW(sTestUserName, ui0->usri0_name),"Username mismatch for level 0.\n"); - pNetApiBufferSize(ui0, &dwSize); - ok(dwSize >= (sizeof(USER_INFO_0) + - (lstrlenW(ui0->usri0_name) + 1) * sizeof(WCHAR)), - "Is allocated with NetApiBufferAllocate\n"); - - /* Level 10 */ - rc=pNetUserGetInfo(NULL, sTestUserName, 10, (LPBYTE *)&ui10); - ok(rc == NERR_Success, "NetUserGetInfo level 10 failed: 0x%08x.\n", rc); - ok(!lstrcmpW(sTestUserName, ui10->usri10_name), "Username mismatch for level 10.\n"); - pNetApiBufferSize(ui10, &dwSize); - ok(dwSize >= (sizeof(USER_INFO_10) + - (lstrlenW(ui10->usri10_name) + 1 + - lstrlenW(ui10->usri10_comment) + 1 + - lstrlenW(ui10->usri10_usr_comment) + 1 + - lstrlenW(ui10->usri10_full_name) + 1) * sizeof(WCHAR)), - "Is allocated with NetApiBufferAllocate\n"); - - pNetApiBufferFree(ui0); - pNetApiBufferFree(ui10); - - /* NetUserGetInfo should always work for the current user. */ - rc=pNetUserGetInfo(NULL, user_name, 0, (LPBYTE*)&ui0); - ok(rc == NERR_Success, "NetUsetGetInfo for current user failed: 0x%08x.\n", rc); - pNetApiBufferFree(ui0); - - /* errors handling */ - rc=pNetUserGetInfo(NULL, sTestUserName, 10000, (LPBYTE *)&ui0); - ok(rc == ERROR_INVALID_LEVEL,"Invalid Level: rc=%d\n",rc); - rc=pNetUserGetInfo(NULL, sNonexistentUser, 0, (LPBYTE *)&ui0); - ok(rc == NERR_UserNotFound,"Invalid User Name: rc=%d\n",rc); - todo_wine { - /* FIXME - Currently Wine can't verify whether the network path is good or bad */ - rc=pNetUserGetInfo(sBadNetPath, sTestUserName, 0, (LPBYTE *)&ui0); - ok(rc == ERROR_BAD_NETPATH || - rc == ERROR_NETWORK_UNREACHABLE || - rc == RPC_S_SERVER_UNAVAILABLE || - rc == RPC_S_INVALID_NET_ADDR, /* Some Win7 */ - "Bad Network Path: rc=%d\n",rc); - } - rc=pNetUserGetInfo(sEmptyStr, sTestUserName, 0, (LPBYTE *)&ui0); - ok(rc == ERROR_BAD_NETPATH || rc == NERR_Success, - "Bad Network Path: rc=%d\n",rc); - rc=pNetUserGetInfo(sInvalidName, sTestUserName, 0, (LPBYTE *)&ui0); - ok(rc == ERROR_INVALID_NAME || rc == ERROR_INVALID_HANDLE,"Invalid Server Name: rc=%d\n",rc); - rc=pNetUserGetInfo(sInvalidName2, sTestUserName, 0, (LPBYTE *)&ui0); - ok(rc == ERROR_INVALID_NAME || rc == ERROR_INVALID_HANDLE,"Invalid Server Name: rc=%d\n",rc); - - if(delete_test_user() != NERR_Success) - trace("Deleting the test user failed. You might have to manually delete it.\n"); -} - -/* Checks Level 1 of NetQueryDisplayInformation */ -static void run_querydisplayinformation1_tests(void) -{ - PNET_DISPLAY_USER Buffer, rec; - DWORD Result, EntryCount; - DWORD i = 0; - BOOL hasAdmin = FALSE; - BOOL hasGuest = FALSE; - - do - { - Result = pNetQueryDisplayInformation( - NULL, 1, i, 1000, MAX_PREFERRED_LENGTH, &EntryCount, - (PVOID *)&Buffer); - - ok((Result == ERROR_SUCCESS) || (Result == ERROR_MORE_DATA), - "Information Retrieved\n"); - rec = Buffer; - for(; EntryCount > 0; EntryCount--) - { - if (rec->usri1_user_id == DOMAIN_USER_RID_ADMIN) - { - ok(!hasAdmin, "One admin user\n"); - ok(rec->usri1_flags & UF_SCRIPT, "UF_SCRIPT flag is set\n"); - ok(rec->usri1_flags & UF_NORMAL_ACCOUNT, "UF_NORMAL_ACCOUNT flag is set\n"); - hasAdmin = TRUE; - } - else if (rec->usri1_user_id == DOMAIN_USER_RID_GUEST) - { - ok(!hasGuest, "One guest record\n"); - ok(rec->usri1_flags & UF_SCRIPT, "UF_SCRIPT flag is set\n"); - ok(rec->usri1_flags & UF_NORMAL_ACCOUNT, "UF_NORMAL_ACCOUNT flag is set\n"); - hasGuest = TRUE; - } - - i = rec->usri1_next_index; - rec++; - } - - pNetApiBufferFree(Buffer); - } while (Result == ERROR_MORE_DATA); - - ok(hasAdmin, "Doesn't have 'Administrator' account\n"); -} - -static void run_usermodalsget_tests(void) -{ - NET_API_STATUS rc; - USER_MODALS_INFO_2 * umi2 = NULL; - - rc = pNetUserModalsGet(NULL, 2, (LPBYTE *)&umi2); - ok(rc == ERROR_SUCCESS, "NetUserModalsGet failed, rc = %d\n", rc); - - if (umi2) - pNetApiBufferFree(umi2); -} - -static void run_userhandling_tests(void) -{ - NET_API_STATUS ret; - USER_INFO_1 usri; - - usri.usri1_priv = USER_PRIV_USER; - usri.usri1_home_dir = NULL; - usri.usri1_comment = NULL; - usri.usri1_flags = UF_SCRIPT; - usri.usri1_script_path = NULL; - - usri.usri1_name = sTooLongName; - usri.usri1_password = sTestUserOldPass; - - ret = pNetUserAdd(NULL, 1, (LPBYTE)&usri, NULL); - if (ret == NERR_Success || ret == NERR_UserExists) - { - /* Windows NT4 does create the user. Delete the user and also if it already existed - * due to a previous test run on NT4. - */ - trace("We are on NT4, we have to delete the user with the too long username\n"); - ret = pNetUserDel(NULL, sTooLongName); - ok(ret == NERR_Success, "Deleting the user failed : %d\n", ret); - } - else if (ret == ERROR_ACCESS_DENIED) - { - skip("not enough permissions to add a user\n"); - return; - } - else - ok(ret == NERR_BadUsername || - broken(ret == NERR_PasswordTooShort), /* NT4 */ - "Adding user with too long username returned 0x%08x\n", ret); - - usri.usri1_name = sTestUserName; - usri.usri1_password = sTooLongPassword; - - ret = pNetUserAdd(NULL, 1, (LPBYTE)&usri, NULL); - ok(ret == NERR_PasswordTooShort || ret == ERROR_ACCESS_DENIED /* Win2003 */, - "Adding user with too long password returned 0x%08x\n", ret); - - usri.usri1_name = sTooLongName; - usri.usri1_password = sTooLongPassword; - - ret = pNetUserAdd(NULL, 1, (LPBYTE)&usri, NULL); - /* NT4 doesn't have a problem with the username so it will report the too long password - * as the error. NERR_PasswordTooShort is reported for all kind of password related errors. - */ - ok(ret == NERR_BadUsername || ret == NERR_PasswordTooShort, - "Adding user with too long username/password returned 0x%08x\n", ret); - - usri.usri1_name = sTestUserName; - usri.usri1_password = sTestUserOldPass; - - ret = pNetUserAdd(NULL, 5, (LPBYTE)&usri, NULL); - ok(ret == ERROR_INVALID_LEVEL, "Adding user with level 5 returned 0x%08x\n", ret); - - ret = pNetUserAdd(NULL, 1, (LPBYTE)&usri, NULL); - if(ret == ERROR_ACCESS_DENIED) - { - skip("Insufficient permissions to add users. Skipping test.\n"); - return; - } - if(ret == NERR_UserExists) - { - skip("User already exists, skipping test to not mess up the system\n"); - return; - } - - ok(ret == NERR_Success || - broken(ret == NERR_PasswordTooShort), /* NT4 */ - "Adding user failed with error 0x%08x\n", ret); - if(ret != NERR_Success) - return; - - /* On Windows XP (and newer), calling NetUserChangePassword with a NULL - * domainname parameter creates a user home directory, iff the machine is - * not member of a domain. - * Using \\127.0.0.1 as domain name does not work on standalone machines - * either, unless the ForceGuest option in the registry is turned off. - * So let's not test NetUserChangePassword for now. - */ - - ret = pNetUserDel(NULL, sTestUserName); - ok(ret == NERR_Success, "Deleting the user failed.\n"); - - ret = pNetUserDel(NULL, sTestUserName); - ok(ret == NERR_UserNotFound, "Deleting a nonexistent user returned 0x%08x\n",ret); -} - -START_TEST(access) -{ - HMODULE hnetapi32=LoadLibraryA("netapi32.dll"); - - pNetApiBufferFree=(void*)GetProcAddress(hnetapi32,"NetApiBufferFree"); - pNetApiBufferSize=(void*)GetProcAddress(hnetapi32,"NetApiBufferSize"); - pNetQueryDisplayInformation=(void*)GetProcAddress(hnetapi32,"NetQueryDisplayInformation"); - pNetUserGetInfo=(void*)GetProcAddress(hnetapi32,"NetUserGetInfo"); - pNetUserModalsGet=(void*)GetProcAddress(hnetapi32,"NetUserModalsGet"); - pNetUserAdd=(void*)GetProcAddress(hnetapi32, "NetUserAdd"); - pNetUserDel=(void*)GetProcAddress(hnetapi32, "NetUserDel"); - - /* These functions were introduced with NT. It's safe to assume that - * if one is not available, none are. - */ - if (!pNetApiBufferFree) { - win_skip("Needed functions are not available\n"); - FreeLibrary(hnetapi32); - return; - } - - if (init_access_tests()) { - run_userhandling_tests(); - run_usergetinfo_tests(); - run_querydisplayinformation1_tests(); - run_usermodalsget_tests(); - } - - FreeLibrary(hnetapi32); -} diff --git a/rostests/winetests/netapi32/apibuf.c b/rostests/winetests/netapi32/apibuf.c deleted file mode 100644 index af4d39d2cdb..00000000000 --- a/rostests/winetests/netapi32/apibuf.c +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2002 Andriy Palamarchuk - * - * Conformance test of the network buffer function. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -#include "wine/test.h" -#include -#include -#include -#include -#include -#include -#include - -static NET_API_STATUS (WINAPI *pNetApiBufferAllocate)(DWORD,LPVOID*)=NULL; -static NET_API_STATUS (WINAPI *pNetApiBufferFree)(LPVOID)=NULL; -static NET_API_STATUS (WINAPI *pNetApiBufferReallocate)(LPVOID,DWORD,LPVOID*)=NULL; -static NET_API_STATUS (WINAPI *pNetApiBufferSize)(LPVOID,LPDWORD)=NULL; - - -static void run_apibuf_tests(void) -{ - VOID *p; - DWORD dwSize; - NET_API_STATUS res; - - /* test normal logic */ - ok(pNetApiBufferAllocate(1024, &p) == NERR_Success, - "Reserved memory\n"); - ok(pNetApiBufferSize(p, &dwSize) == NERR_Success, "Got size\n"); - ok(dwSize >= 1024, "The size is correct\n"); - - ok(pNetApiBufferReallocate(p, 1500, &p) == NERR_Success, - "Reallocated\n"); - ok(pNetApiBufferSize(p, &dwSize) == NERR_Success, "Got size\n"); - ok(dwSize >= 1500, "The size is correct\n"); - - ok(pNetApiBufferFree(p) == NERR_Success, "Freed\n"); - - ok(pNetApiBufferSize(NULL, &dwSize) == ERROR_INVALID_PARAMETER, "Error for NULL pointer\n"); - - /* border reallocate cases */ - ok(pNetApiBufferReallocate(0, 1500, &p) == NERR_Success, "Reallocate with OldBuffer = NULL failed\n"); - ok(p != NULL, "No memory got allocated\n"); - ok(pNetApiBufferFree(p) == NERR_Success, "NetApiBufferFree failed\n"); - - ok(pNetApiBufferAllocate(1024, &p) == NERR_Success, "Memory not reserved\n"); - ok(pNetApiBufferReallocate(p, 0, &p) == NERR_Success, "Not freed\n"); - ok(p == NULL, "Pointer not cleared\n"); - - /* 0-length buffer */ - ok(pNetApiBufferAllocate(0, &p) == NERR_Success, - "Reserved memory\n"); - ok(pNetApiBufferSize(p, &dwSize) == NERR_Success, "Got size\n"); - ok(dwSize < 0xFFFFFFFF, "The size of the 0-length buffer\n"); - ok(pNetApiBufferFree(p) == NERR_Success, "Freed\n"); - - /* NULL-Pointer */ - /* NT: ERROR_INVALID_PARAMETER, lasterror is untouched) */ - SetLastError(0xdeadbeef); - res = pNetApiBufferAllocate(0, NULL); - ok( (res == ERROR_INVALID_PARAMETER) && (GetLastError() == 0xdeadbeef), - "returned %d with 0x%x (expected ERROR_INVALID_PARAMETER with " - "0xdeadbeef)\n", res, GetLastError()); - - SetLastError(0xdeadbeef); - res = pNetApiBufferAllocate(1024, NULL); - ok( (res == ERROR_INVALID_PARAMETER) && (GetLastError() == 0xdeadbeef), - "returned %d with 0x%x (expected ERROR_INVALID_PARAMETER with " - "0xdeadbeef)\n", res, GetLastError()); -} - -START_TEST(apibuf) -{ - HMODULE hnetapi32=LoadLibraryA("netapi32.dll"); - - pNetApiBufferAllocate=(void*)GetProcAddress(hnetapi32,"NetApiBufferAllocate"); - pNetApiBufferFree=(void*)GetProcAddress(hnetapi32,"NetApiBufferFree"); - pNetApiBufferReallocate=(void*)GetProcAddress(hnetapi32,"NetApiBufferReallocate"); - pNetApiBufferSize=(void*)GetProcAddress(hnetapi32,"NetApiBufferSize"); - - if (pNetApiBufferAllocate && pNetApiBufferFree && pNetApiBufferReallocate && pNetApiBufferSize) - run_apibuf_tests(); - else - win_skip("Needed functions are not available\n"); - - FreeLibrary(hnetapi32); -} diff --git a/rostests/winetests/netapi32/ds.c b/rostests/winetests/netapi32/ds.c deleted file mode 100644 index be9597d79ef..00000000000 --- a/rostests/winetests/netapi32/ds.c +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2005 Paul Vriens - * - * Conformance test of the ds functions. - * - * 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 - -static DWORD (WINAPI *pDsRoleGetPrimaryDomainInformation)(LPCWSTR, DSROLE_PRIMARY_DOMAIN_INFO_LEVEL, PBYTE*); -static void (WINAPI *pDsRoleFreeMemory)(PVOID); - -static void test_params(void) -{ - DWORD ret; - PDSROLE_PRIMARY_DOMAIN_INFO_BASIC dpdi; - - SetLastError(0xdeadbeef); - ret = pDsRoleGetPrimaryDomainInformation(NULL, DsRolePrimaryDomainInfoBasic, NULL); - ok( ret == ERROR_INVALID_PARAMETER, "Expected error ERROR_INVALID_PARAMETER, got (%d)\n", ret); - - SetLastError(0xdeadbeef); - ret = pDsRoleGetPrimaryDomainInformation(NULL, 0, NULL); - ok( ret == ERROR_INVALID_PARAMETER, "Expected error ERROR_INVALID_PARAMETER, got (%d)\n", ret); - SetLastError(0xdeadbeef); - ret = pDsRoleGetPrimaryDomainInformation(NULL, 4, NULL); - ok( ret == ERROR_INVALID_PARAMETER, "Expected error ERROR_INVALID_PARAMETER, got (%d)\n", ret); - - SetLastError(0xdeadbeef); - ret = pDsRoleGetPrimaryDomainInformation(NULL, 4, (PBYTE *)&dpdi); - ok( ret == ERROR_INVALID_PARAMETER, "Expected error ERROR_INVALID_PARAMETER, got (%d)\n", ret); -} - -static void test_get(void) -{ - DWORD ret; - PDSROLE_PRIMARY_DOMAIN_INFO_BASIC dpdi; - PDSROLE_UPGRADE_STATUS_INFO dusi; - PDSROLE_OPERATION_STATE_INFO dosi; - - SetLastError(0xdeadbeef); - ret = pDsRoleGetPrimaryDomainInformation(NULL, DsRolePrimaryDomainInfoBasic, (PBYTE *)&dpdi); - ok( ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got (%d)\n", ret); - pDsRoleFreeMemory(dpdi); - - SetLastError(0xdeadbeef); - ret = pDsRoleGetPrimaryDomainInformation(NULL, DsRoleUpgradeStatus, (PBYTE *)&dusi); - todo_wine { ok( ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got (%d)\n", ret); } - pDsRoleFreeMemory(dusi); - - SetLastError(0xdeadbeef); - ret = pDsRoleGetPrimaryDomainInformation(NULL, DsRoleOperationState, (PBYTE *)&dosi); - todo_wine { ok( ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got (%d)\n", ret); } - pDsRoleFreeMemory(dosi); -} - - -START_TEST(ds) -{ - HMODULE hnetapi32 = LoadLibrary("netapi32.dll"); - - pDsRoleGetPrimaryDomainInformation=(void*)GetProcAddress(hnetapi32,"DsRoleGetPrimaryDomainInformation"); - if (pDsRoleGetPrimaryDomainInformation) - { - pDsRoleFreeMemory=(void*)GetProcAddress(hnetapi32,"DsRoleFreeMemory"); - - test_params(); - test_get(); - } - else - win_skip("DsRoleGetPrimaryDomainInformation is not available\n"); - - FreeLibrary(hnetapi32); -} diff --git a/rostests/winetests/netapi32/netapi32.rbuild b/rostests/winetests/netapi32/netapi32.rbuild deleted file mode 100644 index 65791cb29f9..00000000000 --- a/rostests/winetests/netapi32/netapi32.rbuild +++ /dev/null @@ -1,16 +0,0 @@ - - - - - . - - access.c - apibuf.c - ds.c - wksta.c - testlist.c - wine - advapi32 - ntdll - - diff --git a/rostests/winetests/netapi32/testlist.c b/rostests/winetests/netapi32/testlist.c deleted file mode 100644 index 5d8d227ef15..00000000000 --- a/rostests/winetests/netapi32/testlist.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_access(void); -extern void func_apibuf(void); -extern void func_ds(void); -extern void func_wksta(void); - -const struct test winetest_testlist[] = -{ - { "access", func_access }, - { "apibuf", func_apibuf }, - { "ds", func_ds }, - { "wksta", func_wksta }, - { 0, 0 } -}; diff --git a/rostests/winetests/netapi32/wksta.c b/rostests/winetests/netapi32/wksta.c deleted file mode 100644 index c5929dedeac..00000000000 --- a/rostests/winetests/netapi32/wksta.c +++ /dev/null @@ -1,211 +0,0 @@ -/* - * Copyright 2002 Andriy Palamarchuk - * - * Conformance test of the workstation functions. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winnls.h" -#include "winresrc.h" /* Ensure we use Unicode defns with native headers */ -#include "nb30.h" -#include "lmcons.h" -#include "lmerr.h" -#include "lmwksta.h" -#include "lmapibuf.h" - -static NET_API_STATUS (WINAPI *pNetApiBufferFree)(LPVOID)=NULL; -static NET_API_STATUS (WINAPI *pNetApiBufferSize)(LPVOID,LPDWORD)=NULL; -static NET_API_STATUS (WINAPI *pNetpGetComputerName)(LPWSTR*)=NULL; -static NET_API_STATUS (WINAPI *pNetWkstaUserGetInfo)(LPWSTR,DWORD,PBYTE*)=NULL; -static NET_API_STATUS (WINAPI *pNetWkstaTransportEnum)(LPWSTR,DWORD,LPBYTE*, - DWORD,LPDWORD,LPDWORD,LPDWORD)=NULL; - -WCHAR user_name[UNLEN + 1]; -WCHAR computer_name[MAX_COMPUTERNAME_LENGTH + 1]; - -static int init_wksta_tests(void) -{ - DWORD dwSize; - BOOL rc; - - user_name[0] = 0; - dwSize = sizeof(user_name)/sizeof(user_name[0]); - rc=GetUserNameW(user_name, &dwSize); - if (rc==FALSE && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) { - win_skip("GetUserNameW is not implemented\n"); - return 0; - } - ok(rc, "User Name Retrieved\n"); - - computer_name[0] = 0; - dwSize = sizeof(computer_name)/sizeof(computer_name[0]); - ok(GetComputerNameW(computer_name, &dwSize), "Computer Name Retrieved\n"); - return 1; -} - -static void run_get_comp_name_tests(void) -{ - LPWSTR ws = NULL; - - ok(pNetpGetComputerName(&ws) == NERR_Success, "Computer name is retrieved\n"); - ok(!lstrcmpW(computer_name, ws), "This is really computer name\n"); - pNetApiBufferFree(ws); -} - -static void run_wkstausergetinfo_tests(void) -{ - LPWKSTA_USER_INFO_0 ui0 = NULL; - LPWKSTA_USER_INFO_1 ui1 = NULL; - LPWKSTA_USER_INFO_1101 ui1101 = NULL; - DWORD dwSize; - - /* Level 0 */ - ok(pNetWkstaUserGetInfo(NULL, 0, (LPBYTE *)&ui0) == NERR_Success, - "NetWkstaUserGetInfo is unsuccessful\n"); - - ok(ui0 != NULL, "ui0 is NULL\n"); - /* This failure occurred when I ran sshd as service and didn't authenticate - * Since the test dereferences ui0, the rest of this test is worthless - */ - if (!ui0) - { - return; - } - - ok(!lstrcmpW(user_name, ui0->wkui0_username), "This is really user name\n"); - pNetApiBufferSize(ui0, &dwSize); - ok(dwSize >= (sizeof(WKSTA_USER_INFO_0) + - lstrlenW(ui0->wkui0_username) * sizeof(WCHAR)), - "Is allocated with NetApiBufferAllocate\n"); - - /* Level 1 */ - ok(pNetWkstaUserGetInfo(NULL, 1, (LPBYTE *)&ui1) == NERR_Success, - "NetWkstaUserGetInfo is successful\n"); - ok(lstrcmpW(ui1->wkui1_username, ui0->wkui0_username) == 0, - "the same name as returned for level 0\n"); - pNetApiBufferSize(ui1, &dwSize); - ok(dwSize >= (sizeof(WKSTA_USER_INFO_1) + - (lstrlenW(ui1->wkui1_username) + - lstrlenW(ui1->wkui1_logon_domain) + - lstrlenW(ui1->wkui1_oth_domains) + - lstrlenW(ui1->wkui1_logon_server)) * sizeof(WCHAR)), - "Is allocated with NetApiBufferAllocate\n"); - - /* Level 1101 */ - ok(pNetWkstaUserGetInfo(NULL, 1101, (LPBYTE *)&ui1101) == NERR_Success, - "NetWkstaUserGetInfo is successful\n"); - ok(lstrcmpW(ui1101->wkui1101_oth_domains, ui1->wkui1_oth_domains) == 0, - "the same oth_domains as returned for level 1\n"); - pNetApiBufferSize(ui1101, &dwSize); - ok(dwSize >= (sizeof(WKSTA_USER_INFO_1101) + - lstrlenW(ui1101->wkui1101_oth_domains) * sizeof(WCHAR)), - "Is allocated with NetApiBufferAllocate\n"); - - pNetApiBufferFree(ui0); - pNetApiBufferFree(ui1); - pNetApiBufferFree(ui1101); - - /* errors handling */ - ok(pNetWkstaUserGetInfo(NULL, 10000, (LPBYTE *)&ui0) == ERROR_INVALID_LEVEL, - "Invalid level\n"); -} - -static void run_wkstatransportenum_tests(void) -{ - LPBYTE bufPtr; - NET_API_STATUS apiReturn; - DWORD entriesRead, totalEntries; - - /* 1st check: is param 2 (level) correct? (only if param 5 passed?) */ - apiReturn = pNetWkstaTransportEnum(NULL, 1, NULL, MAX_PREFERRED_LENGTH, - NULL, &totalEntries, NULL); - ok(apiReturn == ERROR_INVALID_LEVEL || apiReturn == ERROR_INVALID_PARAMETER, - "NetWkstaTransportEnum returned %d\n", apiReturn); - - /* 2nd check: is param 5 passed? (only if level passes?) */ - apiReturn = pNetWkstaTransportEnum(NULL, 0, NULL, MAX_PREFERRED_LENGTH, - NULL, &totalEntries, NULL); - - /* if no network adapter present, bail, the rest of the test will fail */ - if (apiReturn == ERROR_NETWORK_UNREACHABLE) - return; - - ok(apiReturn == STATUS_ACCESS_VIOLATION || apiReturn == ERROR_INVALID_PARAMETER, - "NetWkstaTransportEnum returned %d\n", apiReturn); - - /* 3rd check: is param 3 passed? */ - apiReturn = pNetWkstaTransportEnum(NULL, 0, NULL, MAX_PREFERRED_LENGTH, - NULL, NULL, NULL); - ok(apiReturn == STATUS_ACCESS_VIOLATION || apiReturn == RPC_X_NULL_REF_POINTER || apiReturn == ERROR_INVALID_PARAMETER, - "NetWkstaTransportEnum returned %d\n", apiReturn); - - /* 4th check: is param 6 passed? */ - apiReturn = pNetWkstaTransportEnum(NULL, 0, &bufPtr, MAX_PREFERRED_LENGTH, - &entriesRead, NULL, NULL); - ok(apiReturn == RPC_X_NULL_REF_POINTER, "null pointer\n"); - - /* final check: valid return, actually get data back */ - apiReturn = pNetWkstaTransportEnum(NULL, 0, &bufPtr, MAX_PREFERRED_LENGTH, - &entriesRead, &totalEntries, NULL); - ok(apiReturn == NERR_Success || apiReturn == ERROR_NETWORK_UNREACHABLE, - "NetWkstaTransportEnum returned %d\n", apiReturn); - if (apiReturn == NERR_Success) { - /* WKSTA_TRANSPORT_INFO_0 *transports = (WKSTA_TRANSPORT_INFO_0 *)bufPtr; */ - - ok(bufPtr != NULL, "got data back\n"); - ok(entriesRead > 0, "read at least one transport\n"); - ok(totalEntries > 0 || broken(totalEntries == 0) /* Win7 */, - "at least one transport\n"); - pNetApiBufferFree(bufPtr); - } -} - -START_TEST(wksta) -{ - HMODULE hnetapi32=LoadLibraryA("netapi32.dll"); - - pNetApiBufferFree=(void*)GetProcAddress(hnetapi32,"NetApiBufferFree"); - pNetApiBufferSize=(void*)GetProcAddress(hnetapi32,"NetApiBufferSize"); - pNetpGetComputerName=(void*)GetProcAddress(hnetapi32,"NetpGetComputerName"); - pNetWkstaUserGetInfo=(void*)GetProcAddress(hnetapi32,"NetWkstaUserGetInfo"); - pNetWkstaTransportEnum=(void*)GetProcAddress(hnetapi32,"NetWkstaTransportEnum"); - - /* These functions were introduced with NT. It's safe to assume that - * if one is not available, none are. - */ - if (!pNetApiBufferFree) { - win_skip("Needed functions are not available\n"); - FreeLibrary(hnetapi32); - return; - } - - if (init_wksta_tests()) { - if (pNetpGetComputerName) - run_get_comp_name_tests(); - else - win_skip("Function NetpGetComputerName not available\n"); - run_wkstausergetinfo_tests(); - run_wkstatransportenum_tests(); - } - - FreeLibrary(hnetapi32); -} diff --git a/rostests/winetests/ntdll/CMakeLists.txt b/rostests/winetests/ntdll/CMakeLists.txt deleted file mode 100644 index 8bdd5ca5e6e..00000000000 --- a/rostests/winetests/ntdll/CMakeLists.txt +++ /dev/null @@ -1,35 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - atom.c - change.c - directory.c - env.c - error.c - exception.c - file.c - generated.c - info.c - large_int.c - om.c - path.c - pipe.c - port.c - reg.c - rtl.c - rtlbitmap.c - rtlstr.c - string.c - time.c - testlist.c) - -add_executable(ntdll_winetest ${SOURCE}) -set_module_type(ntdll_winetest win32cui) -add_importlibs(ntdll_winetest user32 msvcrt kernel32 ntdll) -add_cd_file(TARGET ntdll_winetest DESTINATION reactos/bin FOR all) -if(NOT MSVC) - allow_warnings(ntdll_winetest) -endif() diff --git a/rostests/winetests/ntdll/atom.c b/rostests/winetests/ntdll/atom.c deleted file mode 100755 index 0f185657cfe..00000000000 --- a/rostests/winetests/ntdll/atom.c +++ /dev/null @@ -1,495 +0,0 @@ -/* Unit test suite for Ntdll atom API functions - * - * Copyright 2003 Gyorgy 'Nog' Jeney - * - * 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 - * We use function pointers here as there is no import library for NTDLL on - * windows. - */ - -#include -#include - -#include "ntstatus.h" -/* Define WIN32_NO_STATUS so MSVC does not give us duplicate macro - * definition errors when we get to winnt.h - */ -#define WIN32_NO_STATUS - -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "winnls.h" -#include "winuser.h" -#include "wine/test.h" -#include "winternl.h" - -#ifndef __WINE_WINTERNL_H -typedef unsigned short RTL_ATOM, *PRTL_ATOM; -typedef struct atom_table *RTL_ATOM_TABLE, **PRTL_ATOM_TABLE; -#endif - -/* Function pointers for ntdll calls */ -static HMODULE hntdll = 0; -static NTSTATUS (WINAPI *pRtlCreateAtomTable)(ULONG,PRTL_ATOM_TABLE); -static NTSTATUS (WINAPI *pRtlDestroyAtomTable)(RTL_ATOM_TABLE); -static NTSTATUS (WINAPI *pRtlEmptyAtomTable)(RTL_ATOM_TABLE,BOOLEAN); -static NTSTATUS (WINAPI *pRtlAddAtomToAtomTable)(RTL_ATOM_TABLE,PCWSTR,PRTL_ATOM); -static NTSTATUS (WINAPI *pRtlDeleteAtomFromAtomTable)(RTL_ATOM_TABLE,RTL_ATOM); -static NTSTATUS (WINAPI *pRtlLookupAtomInAtomTable)(RTL_ATOM_TABLE,PCWSTR,PRTL_ATOM); -static NTSTATUS (WINAPI *pRtlPinAtomInAtomTable)(RTL_ATOM_TABLE,RTL_ATOM); -static NTSTATUS (WINAPI *pRtlQueryAtomInAtomTable)(RTL_ATOM_TABLE,RTL_ATOM,PULONG,PULONG,PWSTR,PULONG); - -static NTSTATUS (WINAPI* pNtAddAtom)(LPCWSTR,ULONG,RTL_ATOM*); -static NTSTATUS (WINAPI* pNtAddAtomNT4)(LPCWSTR,RTL_ATOM*); -static NTSTATUS (WINAPI* pNtQueryInformationAtom)(RTL_ATOM,DWORD,void*,ULONG,PULONG); - -static const WCHAR EmptyAtom[] = {0}; -static const WCHAR testAtom1[] = {'H','e','l','l','o',' ','W','o','r','l','d',0}; -static const WCHAR testAtom2[] = {'H','e','l','l','o',' ','W','o','r','l','d','2',0}; -static const WCHAR testAtom3[] = {'H','e','l','l','o',' ','W','o','r','l','d','3',0}; - -static const WCHAR testAtom1Cap[] = {'H','E','L','L','O',' ','W','O','R','L','D',0}; -static const WCHAR testAtom1Low[] = {'h','e','l','l','o',' ','w','o','r','l','d',0}; - -static const WCHAR testAtomInt[] = {'#','1','3','2',0}; -static const WCHAR testAtomIntInv[] = {'#','2','3','4','z',0}; -static const WCHAR testAtomOTT[] = {'#','1','2','3',0}; - -static void InitFunctionPtr(void) -{ - hntdll = LoadLibraryA("ntdll.dll"); - ok(hntdll != 0, "Unable to load ntdll.dll\n"); - - if (hntdll) - { - pRtlCreateAtomTable = (void *)GetProcAddress(hntdll, "RtlCreateAtomTable"); - pRtlDestroyAtomTable = (void *)GetProcAddress(hntdll, "RtlDestroyAtomTable"); - pRtlEmptyAtomTable = (void *)GetProcAddress(hntdll, "RtlEmptyAtomTable"); - pRtlAddAtomToAtomTable = (void *)GetProcAddress(hntdll, "RtlAddAtomToAtomTable"); - pRtlDeleteAtomFromAtomTable = (void *)GetProcAddress(hntdll, "RtlDeleteAtomFromAtomTable"); - pRtlLookupAtomInAtomTable = (void *)GetProcAddress(hntdll, "RtlLookupAtomInAtomTable"); - pRtlPinAtomInAtomTable = (void *)GetProcAddress(hntdll, "RtlPinAtomInAtomTable"); - pRtlQueryAtomInAtomTable = (void *)GetProcAddress(hntdll, "RtlQueryAtomInAtomTable"); - - pNtAddAtom = (void *)GetProcAddress(hntdll, "NtAddAtom"); - pNtQueryInformationAtom = (void *)GetProcAddress(hntdll, "NtQueryInformationAtom"); - } -} - -static DWORD WINAPI RtlAtomTestThread(LPVOID Table) -{ - RTL_ATOM_TABLE AtomTable = *(PRTL_ATOM_TABLE)Table; - RTL_ATOM Atom; - NTSTATUS res; - ULONG RefCount = 0, PinCount = 0, Len = 0; - WCHAR Name[64]; - - res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &Atom); - ok(!res, "Unable to find atom from another thread, retval: %x\n", res); - - res = pRtlLookupAtomInAtomTable(AtomTable, testAtom2, &Atom); - ok(!res, "Unable to lookup pinned atom in table, retval: %x\n", res); - - res = pRtlQueryAtomInAtomTable(AtomTable, Atom, &RefCount, &PinCount, Name, &Len); - ok(res == STATUS_BUFFER_TOO_SMALL, "We got wrong retval: %x\n", res); - - Len = 64; - res = pRtlQueryAtomInAtomTable(AtomTable, Atom, &RefCount, &PinCount, Name, &Len); - ok(!res, "Failed with long enough buffer, retval: %x\n", res); - ok(RefCount == 1, "Refcount was not 1 but %x\n", RefCount); - ok(PinCount == 1, "Pincount was not 1 but %x\n", PinCount); - ok(!lstrcmpW(Name, testAtom2), "We found wrong atom!!\n"); - ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %d\n", Len); - - Len = 64; - res = pRtlQueryAtomInAtomTable(AtomTable, Atom, NULL, NULL, Name, &Len); - ok(!res, "RtlQueryAtomInAtomTable with optional args invalid failed, retval: %x\n", res); - ok(!lstrcmpW(Name, testAtom2), "Found Wrong atom!\n"); - ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %d\n", Len); - - res = pRtlPinAtomInAtomTable(AtomTable, Atom); - ok(!res, "Unable to pin atom in atom table, retval: %x\n", res); - - return 0; -} - -static void test_NtAtom(void) -{ - RTL_ATOM_TABLE AtomTable = NULL; - NTSTATUS res; - RTL_ATOM Atom1, Atom2, Atom3, testEAtom, testAtom; - HANDLE testThread; - ULONG RefCount = 0, PinCount = 0, Len = 0; - WCHAR Name[64]; - - /* If we pass a non-null string to create atom table, then it thinks that we - * have passed it an already allocated atom table */ - res = pRtlCreateAtomTable(0, &AtomTable); - ok(!res, "RtlCreateAtomTable should succeed with an atom table size of 0\n"); - - if (!res) - { - res = pRtlDestroyAtomTable(AtomTable); - ok(!res, "We could create the atom table, but we couldn't destroy it! retval: %x\n", res); - } - - AtomTable = NULL; - res = pRtlCreateAtomTable(37, &AtomTable); - ok(!res, "We're unable to create an atom table with a valid table size retval: %x\n", res); - if (!res) - { - res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom1); - ok(!res, "We were unable to add a simple atom to the atom table, retval: %x\n", res); - - res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1Cap, &testAtom); - ok(!res, "We were unable to find capital version of the atom, retval: %x\n", res); - ok(Atom1 == testAtom, "Found wrong atom in table when querying capital atom\n"); - - res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1Low, &testAtom); - ok(!res, "Unable to find lowercase version of the atom, retval: %x\n", res); - ok(testAtom == Atom1, "Found wrong atom when querying lowercase atom\n"); - - res = pRtlAddAtomToAtomTable(AtomTable, EmptyAtom, &testEAtom); - ok(res == STATUS_OBJECT_NAME_INVALID, "Got wrong retval, retval: %x\n", res); - - res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom); - ok(!res, "Failed to find totally legitimate atom, retval: %x\n", res); - ok(testAtom == Atom1, "Found wrong atom!\n"); - - res = pRtlAddAtomToAtomTable(AtomTable, testAtom2, &Atom2); - ok(!res, "Unable to add other legitimate atom to table, retval: %x\n", res); - - res = pRtlPinAtomInAtomTable(AtomTable, Atom2); - ok(!res, "Unable to pin atom in atom table, retval: %x\n", res); - - testThread = CreateThread(NULL, 0, RtlAtomTestThread, &AtomTable, 0, NULL); - WaitForSingleObject(testThread, INFINITE); - - Len = 64; - res = pRtlQueryAtomInAtomTable(AtomTable, Atom2, &RefCount, &PinCount, Name, &Len); - ok(!res, "Unable to query atom in atom table, retval: %x\n", res); - ok(RefCount == 1, "RefCount is not 1 but %x\n", RefCount); - ok(PinCount == 1, "PinCount is not 1 but %x\n", PinCount); - ok(!lstrcmpW(Name, testAtom2), "We found wrong atom\n"); - ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %d\n", Len); - - res = pRtlEmptyAtomTable(AtomTable, FALSE); - ok(!res, "Unable to empty atom table, retval %x\n", res); - - Len = 64; - res = pRtlQueryAtomInAtomTable(AtomTable, Atom2, &RefCount, &PinCount, Name, &Len); - ok(!res, "It seems RtlEmptyAtomTable deleted our pinned atom eaven though we asked it not to, retval: %x\n", res); - ok(RefCount == 1, "RefCount is not 1 but %x\n", RefCount); - ok(PinCount == 1, "PinCount is not 1 but %x\n", PinCount); - ok(!lstrcmpW(Name, testAtom2), "We found wrong atom\n"); - ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %d\n", Len); - - Len = 8; - Name[0] = Name[1] = Name[2] = Name[3] = Name[4] = 0x1337; - res = pRtlQueryAtomInAtomTable(AtomTable, Atom2, NULL, NULL, Name, &Len); - ok(!res, "query atom %x\n", res); - ok(Len == 6, "wrong length %u\n", Len); - ok(!memcmp(Name, testAtom2, Len), "wrong atom string\n"); - ok(!Name[3], "wrong string termination\n"); - ok(Name[4] == 0x1337, "buffer overwrite\n"); - - Len = lstrlenW(testAtom2) * sizeof(WCHAR); - memset(Name, '.', sizeof(Name)); - res = pRtlQueryAtomInAtomTable( AtomTable, Atom2, NULL, NULL, Name, &Len ); - ok(!res, "query atom %x\n", res); - ok(Len == (lstrlenW(testAtom2) - 1) * sizeof(WCHAR), "wrong length %u\n", Len); - ok(!memcmp(testAtom2, Name, (lstrlenW(testAtom2) - 1) * sizeof(WCHAR)), "wrong atom name\n"); - ok(Name[lstrlenW(testAtom2) - 1] == '\0', "wrong char\n"); - ok(Name[lstrlenW(testAtom2)] == ('.' << 8) + '.', "wrong char\n"); - - res = pRtlLookupAtomInAtomTable(AtomTable, testAtom2, &testAtom); - ok(!res, "We can't find our pinned atom!! retval: %x\n", res); - ok(testAtom == Atom2, "We found wrong atom!!!\n"); - - res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom); - ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "We found the atom in our table eaven though we asked RtlEmptyAtomTable to remove it, retval: %x\n", res); - - res = pRtlAddAtomToAtomTable(AtomTable, testAtom3, &Atom3); - ok(!res, "Unable to add atom to table, retval: %x\n", res); - - res = pRtlEmptyAtomTable(AtomTable, TRUE); - ok(!res, "Unable to empty atom table, retval: %x\n", res); - - res = pRtlLookupAtomInAtomTable(AtomTable, testAtom2, &testAtom); - ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "The pinned atom should be removed, retval: %x\n", res); - - res = pRtlLookupAtomInAtomTable(AtomTable, testAtom3, &testAtom); - ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Non pinned atom should also be removed, retval: %x\n", res); - - res = pRtlDestroyAtomTable(AtomTable); - ok(!res, "Can't destroy atom table, retval: %x\n", res); - } - - AtomTable = NULL; - res = pRtlCreateAtomTable(37, &AtomTable); - ok(!res, "Unable to create atom table, retval: %x\n", res); - - if (!res) - { - res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom); - ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Didn't get expected retval with querying an empty atom table, retval: %x\n", res); - - res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom1); - ok(!res, "Unable to add atom to atom table, retval %x\n", res); - - res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom); - ok(!res, "Can't find previously added atom in table, retval: %x\n", res); - ok(testAtom == Atom1, "Found wrong atom! retval: %x\n", res); - - res = pRtlDeleteAtomFromAtomTable(AtomTable, Atom1); - ok(!res, "Unable to delete atom from table, retval: %x\n", res); - - res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom); - ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Able to find previously deleted atom in table, retval: %x\n", res); - - res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom1); - ok(!res, "Unable to add atom to atom table, retval: %x\n", res); - - Len = 0; - res = pRtlQueryAtomInAtomTable(AtomTable, Atom1, NULL, NULL, Name, &Len); - ok(res == STATUS_BUFFER_TOO_SMALL, "Got wrong retval, retval: %x\n", res); - ok((lstrlenW(testAtom1) * sizeof(WCHAR)) == Len || broken(!Len) /* nt4 */, "Got wrong length %x\n", Len); - if (!Len) pNtAddAtomNT4 = (void *)pNtAddAtom; - - res = pRtlPinAtomInAtomTable(AtomTable, Atom1); - ok(!res, "Unable to pin atom in atom table, retval: %x\n", res); - - res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom); - ok(!res, "Unable to find atom in atom table, retval: %x\n", res); - ok(testAtom == Atom1, "Wrong atom found\n"); - - res = pRtlDeleteAtomFromAtomTable(AtomTable, Atom1); - ok(res == STATUS_WAS_LOCKED, "Unable to delete atom from table, retval: %x\n", res); - - res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom); - ok(!res, "Able to find deleted atom in table\n"); - - res = pRtlDestroyAtomTable(AtomTable); - ok(!res, "Unable to destroy atom table\n"); - } -} - -/* Test Adding integer atoms to atom table */ -static void test_NtIntAtom(void) -{ - NTSTATUS res; - RTL_ATOM_TABLE AtomTable; - RTL_ATOM testAtom; - ULONG RefCount = 0, PinCount = 0; - INT_PTR i; - WCHAR Name[64]; - ULONG Len; - - AtomTable = NULL; - res = pRtlCreateAtomTable(37, &AtomTable); - ok(!res, "Unable to create atom table, %x\n", res); - - if (!res) - { - /* According to the kernel32 functions, integer atoms are only allowed from - * 0x0001 to 0xbfff and not 0xc000 to 0xffff, which is correct */ - res = pRtlAddAtomToAtomTable(AtomTable, NULL, &testAtom); - ok(res == STATUS_INVALID_PARAMETER, "Didn't get expected result from adding 0 int atom, retval: %x\n", res); - for (i = 1; i <= 0xbfff; i++) - { - res = pRtlAddAtomToAtomTable(AtomTable, (LPWSTR)i, &testAtom); - ok(!res, "Unable to add valid integer atom %li, retval: %x\n", i, res); - } - - for (i = 1; i <= 0xbfff; i++) - { - res = pRtlLookupAtomInAtomTable(AtomTable, (LPWSTR)i, &testAtom); - ok(!res, "Unable to find int atom %li, retval: %x\n", i, res); - if (!res) - { - res = pRtlPinAtomInAtomTable(AtomTable, testAtom); - ok(!res, "Unable to pin int atom %li, retval: %x\n", i, res); - } - } - - for (i = 0xc000; i <= 0xffff; i++) - { - res = pRtlAddAtomToAtomTable(AtomTable, (LPWSTR)i, &testAtom); - ok(res, "Able to illeageal integer atom %li, retval: %x\n", i, res); - } - - res = pRtlDestroyAtomTable(AtomTable); - ok(!res, "Unable to destroy atom table, retval: %x\n", res); - } - - AtomTable = NULL; - res = pRtlCreateAtomTable(37, &AtomTable); - ok(!res, "Unable to create atom table, %x\n", res); - if (!res) - { - res = pRtlLookupAtomInAtomTable(AtomTable, (PWSTR)123, &testAtom); - ok(!res, "Unable to query atom in atom table, retval: %x\n", res); - - res = pRtlAddAtomToAtomTable(AtomTable, testAtomInt, &testAtom); - ok(!res, "Unable to add int atom to table, retval: %x\n", res); - - res = pRtlAddAtomToAtomTable(AtomTable, testAtomIntInv, &testAtom); - ok(!res, "Unable to add int atom to table, retval: %x\n", res); - - res = pRtlAddAtomToAtomTable(AtomTable, (PWSTR)123, &testAtom); - ok(!res, "Unable to add int atom to table, retval: %x\n", res); - - res = pRtlAddAtomToAtomTable(AtomTable, (PWSTR)123, &testAtom); - ok(!res, "Unable to re-add int atom to table, retval: %x\n", res); - - Len = 64; - res = pRtlQueryAtomInAtomTable(AtomTable, testAtom, &RefCount, &PinCount, Name, &Len); - ok(!res, "Unable to query atom in atom table, retval: %x\n", res); - ok(PinCount == 1, "Expected pincount 1 but got %x\n", PinCount); - ok(RefCount == 1, "Expected refcount 1 but got %x\n", RefCount); - ok(!lstrcmpW(testAtomOTT, Name), "Got wrong atom name\n"); - ok((lstrlenW(testAtomOTT) * sizeof(WCHAR)) == Len, "Got wrong len %d\n", Len); - - res = pRtlPinAtomInAtomTable(AtomTable, testAtom); - ok(!res, "Unable to pin int atom, retval: %x\n", res); - - res = pRtlPinAtomInAtomTable(AtomTable, testAtom); - ok(!res, "Unable to pin int atom, retval: %x\n", res); - - res = pRtlQueryAtomInAtomTable(AtomTable, testAtom, &RefCount, &PinCount, NULL, NULL); - ok(!res, "Unable to query atom in atom table, retval: %x\n", res); - ok(PinCount == 1, "Expected pincount 1 but got %x\n", PinCount); - ok(RefCount == 1, "Expected refcount 1 but got %x\n", RefCount); - - res = pRtlDestroyAtomTable(AtomTable); - ok(!res, "Unable to destroy atom table, retval: %x\n", res); - } -} - -/* Tests to see how the pincount and refcount actually works */ -static void test_NtRefPinAtom(void) -{ - RTL_ATOM_TABLE AtomTable; - RTL_ATOM Atom; - ULONG PinCount = 0, RefCount = 0; - NTSTATUS res; - - AtomTable = NULL; - res = pRtlCreateAtomTable(37, &AtomTable); - ok(!res, "Unable to create atom table, %x\n", res); - - if (!res) - { - res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom); - ok(!res, "Unable to add our atom to the atom table, retval: %x\n", res); - - res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom); - ok(!res, "Unable to add our atom to the atom table, retval: %x\n", res); - - res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom); - ok(!res, "Unable to add our atom to the atom table, retval: %x\n", res); - - res = pRtlQueryAtomInAtomTable(AtomTable, Atom, &RefCount, &PinCount, NULL, NULL); - ok(!res, "Unable to query atom in atom table, retval: %x\n", res); - ok(PinCount == 0, "Expected pincount 0 but got %x\n", PinCount); - ok(RefCount == 3, "Expected refcount 3 but got %x\n", RefCount); - - res = pRtlPinAtomInAtomTable(AtomTable, Atom); - ok(!res, "Unable to pin atom in atom table, retval: %x\n", res); - - res = pRtlPinAtomInAtomTable(AtomTable, Atom); - ok(!res, "Unable to pin atom in atom table, retval: %x\n", res); - - res = pRtlPinAtomInAtomTable(AtomTable, Atom); - ok(!res, "Unable to pin atom in atom table, retval: %x\n", res); - - res = pRtlQueryAtomInAtomTable(AtomTable, Atom, &RefCount, &PinCount, NULL, NULL); - ok(!res, "Unable to query atom in atom table, retval: %x\n", res); - ok(PinCount == 1, "Expected pincount 1 but got %x\n", PinCount); - ok(RefCount == 3, "Expected refcount 3 but got %x\n", RefCount); - - res = pRtlDestroyAtomTable(AtomTable); - ok(!res, "Unable to destroy atom table, retval: %x\n", res); - } -} - -static void test_Global(void) -{ - NTSTATUS res; - RTL_ATOM atom; - char ptr[sizeof(ATOM_BASIC_INFORMATION) + 255 * sizeof(WCHAR)]; - ATOM_BASIC_INFORMATION* abi = (ATOM_BASIC_INFORMATION*)ptr; - ULONG ptr_size = sizeof(ATOM_BASIC_INFORMATION) + 255 * sizeof(WCHAR); - - if (pNtAddAtomNT4) - res = pNtAddAtomNT4(testAtom1, &atom); - else - res = pNtAddAtom(testAtom1, lstrlenW(testAtom1) * sizeof(WCHAR), &atom); - - ok(!res, "Added atom (%x)\n", res); - - memset(abi->Name, 0xcc, 255 * sizeof(WCHAR)); - res = pNtQueryInformationAtom( atom, AtomBasicInformation, (void*)ptr, ptr_size, NULL ); - ok(!res, "atom lookup\n"); - ok(!lstrcmpW(abi->Name, testAtom1), "ok strings\n"); - ok(abi->NameLength == lstrlenW(testAtom1) * sizeof(WCHAR), "wrong string length\n"); - ok(abi->Name[lstrlenW(testAtom1)] == 0, "wrong string termination %x\n", abi->Name[lstrlenW(testAtom1)]); - ok(abi->Name[lstrlenW(testAtom1) + 1] == 0xcccc, "buffer overwrite %x\n", abi->Name[lstrlenW(testAtom1) + 1]); - - ptr_size = sizeof(ATOM_BASIC_INFORMATION); - res = pNtQueryInformationAtom( atom, AtomBasicInformation, (void*)ptr, ptr_size, NULL ); - ok(res == STATUS_BUFFER_TOO_SMALL, "wrong return status (%x)\n", res); - ok(abi->NameLength == lstrlenW(testAtom1) * sizeof(WCHAR) || broken(abi->NameLength == sizeof(WCHAR)), /* nt4 */ - "string length %u\n",abi->NameLength); - - memset(abi->Name, 0xcc, lstrlenW(testAtom1) * sizeof(WCHAR)); - ptr_size = sizeof(ATOM_BASIC_INFORMATION) + lstrlenW(testAtom1) * sizeof(WCHAR); - res = pNtQueryInformationAtom( atom, AtomBasicInformation, (void*)ptr, ptr_size, NULL ); - ok(!res, "atom lookup %x\n", res); - ok(!lstrcmpW(abi->Name, testAtom1), "strings don't match\n"); - ok(abi->NameLength == lstrlenW(testAtom1) * sizeof(WCHAR), "wrong string length\n"); - ok(abi->Name[lstrlenW(testAtom1)] == 0, "buffer overwrite %x\n", abi->Name[lstrlenW(testAtom1)]); - ok(abi->Name[lstrlenW(testAtom1) + 1] == 0xcccc, "buffer overwrite %x\n", abi->Name[lstrlenW(testAtom1) + 1]); - - ptr_size = sizeof(ATOM_BASIC_INFORMATION) + 4 * sizeof(WCHAR); - abi->Name[0] = abi->Name[1] = abi->Name[2] = abi->Name[3] = '\0'; - res = pNtQueryInformationAtom( atom, AtomBasicInformation, (void*)ptr, ptr_size, NULL ); - ok(!res, "couldn't find atom\n"); - ok(abi->NameLength == 8, "wrong string length %u\n", abi->NameLength); - ok(!memcmp(abi->Name, testAtom1, 8), "strings don't match\n"); -} - -START_TEST(atom) -{ - InitFunctionPtr(); - if (pRtlCreateAtomTable) - { - /* Global atom table seems to be available to GUI apps only in - Win7, so let's turn this app into a GUI app */ - GetDesktopWindow(); - - test_NtAtom(); - test_NtIntAtom(); - test_NtRefPinAtom(); - test_Global(); - } - else - win_skip("Needed atom functions are not available\n"); - - FreeLibrary(hntdll); -} diff --git a/rostests/winetests/ntdll/change.c b/rostests/winetests/ntdll/change.c deleted file mode 100644 index 297af9ec11f..00000000000 --- a/rostests/winetests/ntdll/change.c +++ /dev/null @@ -1,333 +0,0 @@ -/* - * File change notification tests - * - * Copyright 2006 Mike McCormack 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 -#define WIN32_NO_STATUS -#include -#include -#include -#include -#include -#include "wine/test.h" - -static NTSTATUS (WINAPI *pNtNotifyChangeDirectoryFile)( - HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID, - PIO_STATUS_BLOCK,PVOID,ULONG,ULONG,BOOLEAN); - -static NTSTATUS (WINAPI *pNtCancelIoFile)(HANDLE,PIO_STATUS_BLOCK); - - -static void test_ntncdf(void) -{ - NTSTATUS r; - HANDLE hdir, hEvent; - char buffer[0x1000]; - DWORD fflags, filter = 0; - IO_STATUS_BLOCK iosb; - WCHAR path[MAX_PATH], subdir[MAX_PATH]; - static const WCHAR szBoo[] = { '\\','b','o','o',0 }; - static const WCHAR szHoo[] = { '\\','h','o','o',0 }; - PFILE_NOTIFY_INFORMATION pfni; - - r = GetTempPathW( MAX_PATH, path ); - ok( r != 0, "temp path failed\n"); - if (!r) - return; - - lstrcatW( path, szBoo ); - lstrcpyW( subdir, path ); - lstrcatW( subdir, szHoo ); - - RemoveDirectoryW( subdir ); - RemoveDirectoryW( path ); - - r = CreateDirectoryW(path, NULL); - ok( r == TRUE, "failed to create directory\n"); - - r = pNtNotifyChangeDirectoryFile(NULL,NULL,NULL,NULL,NULL,NULL,0,0,0); - ok(r==STATUS_ACCESS_VIOLATION, "should return access violation\n"); - - fflags = FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED; - hdir = CreateFileW(path, GENERIC_READ|SYNCHRONIZE, FILE_SHARE_READ, NULL, - OPEN_EXISTING, fflags, NULL); - ok( hdir != INVALID_HANDLE_VALUE, "failed to open directory\n"); - - hEvent = CreateEvent( NULL, 0, 0, NULL ); - - r = pNtNotifyChangeDirectoryFile(hdir,NULL,NULL,NULL,&iosb,NULL,0,0,0); - ok(r==STATUS_INVALID_PARAMETER, "should return invalid parameter\n"); - - r = pNtNotifyChangeDirectoryFile(hdir,hEvent,NULL,NULL,&iosb,NULL,0,0,0); - ok(r==STATUS_INVALID_PARAMETER, "should return invalid parameter\n"); - - filter = FILE_NOTIFY_CHANGE_FILE_NAME; - filter |= FILE_NOTIFY_CHANGE_DIR_NAME; - filter |= FILE_NOTIFY_CHANGE_ATTRIBUTES; - filter |= FILE_NOTIFY_CHANGE_SIZE; - filter |= FILE_NOTIFY_CHANGE_LAST_WRITE; - filter |= FILE_NOTIFY_CHANGE_LAST_ACCESS; - filter |= FILE_NOTIFY_CHANGE_CREATION; - filter |= FILE_NOTIFY_CHANGE_SECURITY; - - U(iosb).Status = 1; - iosb.Information = 1; - r = pNtNotifyChangeDirectoryFile(hdir,hEvent,NULL,NULL,&iosb,buffer,sizeof buffer,-1,0); - ok(r==STATUS_INVALID_PARAMETER, "should return invalid parameter\n"); - - ok( U(iosb).Status == 1, "information wrong\n"); - ok( iosb.Information == 1, "information wrong\n"); - - U(iosb).Status = 1; - iosb.Information = 0; - r = pNtNotifyChangeDirectoryFile(hdir,hEvent,NULL,NULL,&iosb,buffer,sizeof buffer,filter,0); - ok(r==STATUS_PENDING, "should return status pending\n"); - - r = WaitForSingleObject( hEvent, 0 ); - ok( r == STATUS_TIMEOUT, "should timeout\n" ); - - r = WaitForSingleObject( hdir, 0 ); - ok( r == STATUS_TIMEOUT, "should timeout\n" ); - - r = CreateDirectoryW( subdir, NULL ); - ok( r == TRUE, "failed to create directory\n"); - - r = WaitForSingleObject( hdir, 0 ); - ok( r == STATUS_TIMEOUT, "should timeout\n" ); - - r = WaitForSingleObject( hEvent, 0 ); - ok( r == WAIT_OBJECT_0, "event should be ready\n" ); - - ok( U(iosb).Status == STATUS_SUCCESS, "information wrong\n"); - ok( iosb.Information == 0x12, "information wrong\n"); - - pfni = (PFILE_NOTIFY_INFORMATION) buffer; - ok( pfni->NextEntryOffset == 0, "offset wrong\n" ); - ok( pfni->Action == FILE_ACTION_ADDED, "action wrong\n" ); - ok( pfni->FileNameLength == 6, "len wrong\n" ); - ok( !memcmp(pfni->FileName,&szHoo[1],6), "name wrong\n" ); - - r = pNtNotifyChangeDirectoryFile(hdir,0,NULL,NULL,&iosb,buffer,sizeof buffer,0,0); - ok(r==STATUS_INVALID_PARAMETER, "should return invalid parameter\n"); - - r = pNtNotifyChangeDirectoryFile(hdir,hEvent,NULL,NULL,&iosb,buffer,sizeof buffer,0,0); - ok(r==STATUS_INVALID_PARAMETER, "should return invalid parameter\n"); - - filter = FILE_NOTIFY_CHANGE_SIZE; - - U(iosb).Status = 1; - iosb.Information = 1; - r = pNtNotifyChangeDirectoryFile(hdir,0,NULL,NULL,&iosb,NULL,0,filter,0); - ok(r==STATUS_PENDING, "should status pending\n"); - - ok( U(iosb).Status == 1, "information wrong\n"); - ok( iosb.Information == 1, "information wrong\n"); - - r = WaitForSingleObject( hdir, 0 ); - ok( r == STATUS_TIMEOUT, "should timeout\n" ); - - r = RemoveDirectoryW( subdir ); - ok( r == TRUE, "failed to remove directory\n"); - - r = WaitForSingleObject( hdir, 100 ); - ok( r == WAIT_OBJECT_0, "should be ready\n" ); - - r = WaitForSingleObject( hdir, 100 ); - ok( r == WAIT_OBJECT_0, "should be ready\n" ); - - ok( U(iosb).Status == STATUS_NOTIFY_ENUM_DIR, "information wrong\n"); - ok( iosb.Information == 0, "information wrong\n"); - - CloseHandle(hdir); - CloseHandle(hEvent); - - r = RemoveDirectoryW( path ); - ok( r == TRUE, "failed to remove directory\n"); -} - - -static void test_ntncdf_async(void) -{ - NTSTATUS r; - HANDLE hdir, hEvent; - char buffer[0x1000]; - DWORD fflags, filter = 0; - IO_STATUS_BLOCK iosb, iosb2; - WCHAR path[MAX_PATH], subdir[MAX_PATH]; - static const WCHAR szBoo[] = { '\\','b','o','o',0 }; - static const WCHAR szHoo[] = { '\\','h','o','o',0 }; - PFILE_NOTIFY_INFORMATION pfni; - - r = GetTempPathW( MAX_PATH, path ); - ok( r != 0, "temp path failed\n"); - if (!r) - return; - - lstrcatW( path, szBoo ); - lstrcpyW( subdir, path ); - lstrcatW( subdir, szHoo ); - - RemoveDirectoryW( subdir ); - RemoveDirectoryW( path ); - - r = CreateDirectoryW(path, NULL); - ok( r == TRUE, "failed to create directory\n"); - - r = pNtNotifyChangeDirectoryFile(NULL,NULL,NULL,NULL,NULL,NULL,0,0,0); - ok(r==STATUS_ACCESS_VIOLATION, "should return access violation\n"); - - fflags = FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED; - hdir = CreateFileW(path, GENERIC_READ|SYNCHRONIZE, FILE_SHARE_READ, NULL, - OPEN_EXISTING, fflags, NULL); - ok( hdir != INVALID_HANDLE_VALUE, "failed to open directory\n"); - - hEvent = CreateEvent( NULL, 0, 0, NULL ); - - filter = FILE_NOTIFY_CHANGE_FILE_NAME; - filter |= FILE_NOTIFY_CHANGE_DIR_NAME; - filter |= FILE_NOTIFY_CHANGE_ATTRIBUTES; - filter |= FILE_NOTIFY_CHANGE_SIZE; - filter |= FILE_NOTIFY_CHANGE_LAST_WRITE; - filter |= FILE_NOTIFY_CHANGE_LAST_ACCESS; - filter |= FILE_NOTIFY_CHANGE_CREATION; - filter |= FILE_NOTIFY_CHANGE_SECURITY; - - - U(iosb).Status = 0x01234567; - iosb.Information = 0x12345678; - r = pNtNotifyChangeDirectoryFile(hdir,0,NULL,NULL,&iosb,buffer,sizeof buffer,filter,0); - ok(r==STATUS_PENDING, "should status pending\n"); - ok(U(iosb).Status == 0x01234567, "status set too soon\n"); - ok(iosb.Information == 0x12345678, "info set too soon\n"); - - r = CreateDirectoryW( subdir, NULL ); - ok( r == TRUE, "failed to create directory\n"); - - r = WaitForSingleObject( hdir, 100 ); - ok( r == WAIT_OBJECT_0, "should be ready\n" ); - - ok(U(iosb).Status == STATUS_SUCCESS, "status not successful\n"); - ok(iosb.Information == 0x12, "info not set\n"); - - pfni = (PFILE_NOTIFY_INFORMATION) buffer; - ok( pfni->NextEntryOffset == 0, "offset wrong\n" ); - ok( pfni->Action == FILE_ACTION_ADDED, "action wrong\n" ); - ok( pfni->FileNameLength == 6, "len wrong\n" ); - ok( !memcmp(pfni->FileName,&szHoo[1],6), "name wrong\n" ); - - r = pNtNotifyChangeDirectoryFile(hdir,0,NULL,NULL,&iosb,buffer,sizeof buffer,filter,0); - ok(r==STATUS_PENDING, "should status pending\n"); - - r = RemoveDirectoryW( subdir ); - ok( r == TRUE, "failed to remove directory\n"); - - r = WaitForSingleObject( hdir, 0 ); - ok( r == WAIT_OBJECT_0, "should be ready\n" ); - - ok(U(iosb).Status == STATUS_SUCCESS, "status not successful\n"); - ok(iosb.Information == 0x12, "info not set\n"); - - ok( pfni->NextEntryOffset == 0, "offset wrong\n" ); - ok( pfni->Action == FILE_ACTION_REMOVED, "action wrong\n" ); - ok( pfni->FileNameLength == 6, "len wrong\n" ); - ok( !memcmp(pfni->FileName,&szHoo[1],6), "name wrong\n" ); - - /* check APCs */ - U(iosb).Status = 0; - iosb.Information = 0; - - r = pNtNotifyChangeDirectoryFile(hdir,0,NULL,NULL,&iosb,NULL,0,filter,0); - ok(r==STATUS_PENDING, "should status pending\n"); - - r = CreateDirectoryW( subdir, NULL ); - ok( r == TRUE, "failed to create directory\n"); - - r = WaitForSingleObject( hdir, 0 ); - ok( r == WAIT_OBJECT_0, "should be ready\n" ); - - ok(U(iosb).Status == STATUS_NOTIFY_ENUM_DIR, "status not successful\n"); - ok(iosb.Information == 0, "info not set\n"); - - U(iosb).Status = 0; - iosb.Information = 0; - - r = pNtNotifyChangeDirectoryFile(hdir,hEvent,NULL,NULL,&iosb,buffer,sizeof buffer,filter,0); - ok(r==STATUS_PENDING, "should status pending\n"); - - r = RemoveDirectoryW( subdir ); - ok( r == TRUE, "failed to remove directory\n"); - - r = WaitForSingleObject( hEvent, 0 ); - ok( r == WAIT_OBJECT_0, "should be ready\n" ); - - ok(U(iosb).Status == STATUS_SUCCESS, "status not successful\n"); - ok(iosb.Information == 0x12, "info not set\n"); - - - U(iosb).Status = 0x01234567; - iosb.Information = 0x12345678; - r = pNtNotifyChangeDirectoryFile(hdir,0,NULL,NULL,&iosb,buffer,sizeof buffer,filter,0); - ok(r==STATUS_PENDING, "should status pending\n"); - - U(iosb2).Status = 0x01234567; - iosb2.Information = 0x12345678; - r = pNtNotifyChangeDirectoryFile(hdir,0,NULL,NULL,&iosb2,buffer,sizeof buffer,filter,0); - ok(r==STATUS_PENDING, "should status pending\n"); - - ok(U(iosb).Status == 0x01234567, "status set too soon\n"); - ok(iosb.Information == 0x12345678, "info set too soon\n"); - - r = pNtCancelIoFile(hdir, &iosb); - ok( r == STATUS_SUCCESS, "cancel failed\n"); - - CloseHandle(hdir); - - ok(U(iosb).Status == STATUS_SUCCESS, "status wrong\n"); - todo_wine ok(U(iosb2).Status == STATUS_CANCELLED, "status wrong\n"); - - ok(iosb.Information == 0, "info wrong\n"); - ok(iosb2.Information == 0, "info wrong\n"); - - r = RemoveDirectoryW( path ); - ok( r == TRUE, "failed to remove directory\n"); - - CloseHandle(hEvent); -} - -START_TEST(change) -{ - HMODULE hntdll = GetModuleHandle("ntdll"); - if (!hntdll) - { - win_skip("not running on NT, skipping test\n"); - return; - } - - pNtNotifyChangeDirectoryFile = (void *)GetProcAddress(hntdll, "NtNotifyChangeDirectoryFile"); - pNtCancelIoFile = (void *)GetProcAddress(hntdll, "NtCancelIoFile"); - - if (!pNtNotifyChangeDirectoryFile || !pNtCancelIoFile) - { - win_skip("missing functions, skipping test\n"); - return; - } - - test_ntncdf(); - test_ntncdf_async(); -} diff --git a/rostests/winetests/ntdll/directory.c b/rostests/winetests/ntdll/directory.c deleted file mode 100644 index c74bf341a21..00000000000 --- a/rostests/winetests/ntdll/directory.c +++ /dev/null @@ -1,321 +0,0 @@ -/* Unit test suite for Ntdll directory functions - * - * Copyright 2007 Jeff Latimer - * Copyright 2007 Andrey Turkin - * Copyright 2008 Jeff Zaroyko - * Copyright 2009 Dan Kegel - * - * 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 - * We use function pointers here as there is no import library for NTDLL on - * windows. - */ - -#include -#include - -#include "ntstatus.h" -/* Define WIN32_NO_STATUS so MSVC does not give us duplicate macro - * definition errors when we get to winnt.h - */ -#define WIN32_NO_STATUS - -#include "wine/test.h" -#include "winternl.h" - -static NTSTATUS (WINAPI *pNtClose)( PHANDLE ); -static NTSTATUS (WINAPI *pNtOpenFile) ( PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PIO_STATUS_BLOCK, ULONG, ULONG ); -static NTSTATUS (WINAPI *pNtQueryDirectoryFile)(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK, - PVOID,ULONG,FILE_INFORMATION_CLASS,BOOLEAN,PUNICODE_STRING,BOOLEAN); -static BOOLEAN (WINAPI *pRtlCreateUnicodeStringFromAsciiz)(PUNICODE_STRING,LPCSTR); -static BOOL (WINAPI *pRtlDosPathNameToNtPathName_U)( LPCWSTR, PUNICODE_STRING, PWSTR*, CURDIR* ); -static VOID (WINAPI *pRtlInitUnicodeString)( PUNICODE_STRING, LPCWSTR ); -static VOID (WINAPI *pRtlFreeUnicodeString)( PUNICODE_STRING ); -static NTSTATUS (WINAPI *pRtlMultiByteToUnicodeN)( LPWSTR dst, DWORD dstlen, LPDWORD reslen, - LPCSTR src, DWORD srclen ); -static NTSTATUS (WINAPI *pRtlWow64EnableFsRedirection)( BOOLEAN enable ); -static NTSTATUS (WINAPI *pRtlWow64EnableFsRedirectionEx)( ULONG disable, ULONG *old_value ); - -/* The attribute sets to test */ -static struct testfile_s { - BOOL todo; /* set if it doesn't work on wine yet */ - BOOL attr_done; /* set if attributes were tested for this file already */ - const DWORD attr; /* desired attribute */ - const char *name; /* filename to use */ - const char *target; /* what to point to (only for reparse pts) */ - const char *description; /* for error messages */ - int nfound; /* How many were found (expect 1) */ - WCHAR nameW[20]; /* unicode version of name (filled in later) */ -} testfiles[] = { - { 0, 0, FILE_ATTRIBUTE_NORMAL, "n.tmp", NULL, "normal" }, - { 1, 0, FILE_ATTRIBUTE_HIDDEN, "h.tmp", NULL, "hidden" }, - { 1, 0, FILE_ATTRIBUTE_SYSTEM, "s.tmp", NULL, "system" }, - { 0, 0, FILE_ATTRIBUTE_DIRECTORY, "d.tmp", NULL, "directory" }, - { 0, 0, FILE_ATTRIBUTE_DIRECTORY, ".", NULL, ". directory" }, - { 0, 0, FILE_ATTRIBUTE_DIRECTORY, "..", NULL, ".. directory" }, - { 0, 0, 0, NULL } -}; -static const int max_test_dir_size = 20; /* size of above plus some for .. etc */ - -/* Create a test directory full of attribute test files, clear counts */ -static void set_up_attribute_test(const char *testdirA) -{ - int i; - BOOL ret; - - ret = CreateDirectoryA(testdirA, NULL); - ok(ret, "couldn't create dir '%s', error %d\n", testdirA, GetLastError()); - - for (i=0; testfiles[i].name; i++) { - char buf[MAX_PATH]; - pRtlMultiByteToUnicodeN(testfiles[i].nameW, sizeof(testfiles[i].nameW), NULL, testfiles[i].name, strlen(testfiles[i].name)+1); - - if (strcmp(testfiles[i].name, ".") == 0 || strcmp(testfiles[i].name, "..") == 0) - continue; - sprintf(buf, "%s\\%s", testdirA, testfiles[i].name); - if (testfiles[i].attr & FILE_ATTRIBUTE_DIRECTORY) { - ret = CreateDirectoryA(buf, NULL); - ok(ret, "couldn't create dir '%s', error %d\n", buf, GetLastError()); - } else { - HANDLE h = CreateFileA(buf, - GENERIC_READ|GENERIC_WRITE, - 0, NULL, CREATE_ALWAYS, - testfiles[i].attr, 0); - ok( h != INVALID_HANDLE_VALUE, "failed to create temp file '%s'\n", buf ); - CloseHandle(h); - } - } -} - -static void reset_found_files(void) -{ - int i; - - for (i = 0; testfiles[i].name; i++) - testfiles[i].nfound = 0; -} - -/* Remove the given test directory and the attribute test files, if any */ -static void tear_down_attribute_test(const char *testdirA) -{ - int i; - - for (i=0; testfiles[i].name; i++) { - int ret; - char buf[MAX_PATH]; - if (strcmp(testfiles[i].name, ".") == 0 || strcmp(testfiles[i].name, "..") == 0) - continue; - sprintf(buf, "%s\\%s", testdirA, testfiles[i].name); - if (testfiles[i].attr & FILE_ATTRIBUTE_DIRECTORY) { - ret = RemoveDirectory(buf); - ok(ret || (GetLastError() == ERROR_PATH_NOT_FOUND), - "Failed to rmdir %s, error %d\n", buf, GetLastError()); - } else { - ret = DeleteFile(buf); - ok(ret || (GetLastError() == ERROR_PATH_NOT_FOUND), - "Failed to rm %s, error %d\n", buf, GetLastError()); - } - } - RemoveDirectoryA(testdirA); -} - -/* Match one found file against testfiles[], increment count if found */ -static void tally_test_file(FILE_BOTH_DIRECTORY_INFORMATION *dir_info) -{ - int i; - DWORD attribmask = - (FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_DIRECTORY|FILE_ATTRIBUTE_REPARSE_POINT); - DWORD attrib = dir_info->FileAttributes & attribmask; - WCHAR *nameW = dir_info->FileName; - int namelen = dir_info->FileNameLength / sizeof(WCHAR); - - for (i=0; testfiles[i].name; i++) { - int len = strlen(testfiles[i].name); - if (namelen != len || memcmp(nameW, testfiles[i].nameW, len*sizeof(WCHAR))) - continue; - if (!testfiles[i].attr_done) { - if (testfiles[i].todo) { - todo_wine - ok (attrib == (testfiles[i].attr & attribmask), "file %s: expected %s (%x), got %x (is your linux new enough?)\n", testfiles[i].name, testfiles[i].description, testfiles[i].attr, attrib); - } else { - ok (attrib == (testfiles[i].attr & attribmask), "file %s: expected %s (%x), got %x (is your linux new enough?)\n", testfiles[i].name, testfiles[i].description, testfiles[i].attr, attrib); - } - testfiles[i].attr_done = TRUE; - } - testfiles[i].nfound++; - break; - } - ok(testfiles[i].name != NULL, "unexpected file found\n"); -} - -static void test_flags_NtQueryDirectoryFile(OBJECT_ATTRIBUTES *attr, const char *testdirA, - BOOLEAN single_entry, BOOLEAN restart_flag) -{ - HANDLE dirh; - IO_STATUS_BLOCK io; - UINT data_pos; - UINT data_len; /* length of dir data */ - BYTE data[8192]; /* directory data */ - FILE_BOTH_DIRECTORY_INFORMATION *dir_info; - DWORD status; - int numfiles; - int i; - - reset_found_files(); - - /* Read the directory and note which files are found */ - status = pNtOpenFile( &dirh, SYNCHRONIZE | FILE_LIST_DIRECTORY, attr, &io, FILE_OPEN, - FILE_SYNCHRONOUS_IO_NONALERT|FILE_OPEN_FOR_BACKUP_INTENT|FILE_DIRECTORY_FILE); - ok (status == STATUS_SUCCESS, "failed to open dir '%s', ret 0x%x, error %d\n", testdirA, status, GetLastError()); - if (status != STATUS_SUCCESS) { - skip("can't test if we can't open the directory\n"); - return; - } - - pNtQueryDirectoryFile( dirh, NULL, NULL, NULL, &io, data, sizeof(data), - FileBothDirectoryInformation, single_entry, NULL, restart_flag ); - ok (U(io).Status == STATUS_SUCCESS, "filed to query directory; status %x\n", U(io).Status); - data_len = io.Information; - ok (data_len >= sizeof(FILE_BOTH_DIRECTORY_INFORMATION), "not enough data in directory\n"); - - data_pos = 0; - numfiles = 0; - while ((data_pos < data_len) && (numfiles < max_test_dir_size)) { - dir_info = (FILE_BOTH_DIRECTORY_INFORMATION *)(data + data_pos); - - tally_test_file(dir_info); - - if (dir_info->NextEntryOffset == 0) { - pNtQueryDirectoryFile( dirh, 0, NULL, NULL, &io, data, sizeof(data), - FileBothDirectoryInformation, single_entry, NULL, FALSE ); - if (U(io).Status == STATUS_NO_MORE_FILES) - break; - ok (U(io).Status == STATUS_SUCCESS, "filed to query directory; status %x\n", U(io).Status); - data_len = io.Information; - if (data_len < sizeof(FILE_BOTH_DIRECTORY_INFORMATION)) - break; - data_pos = 0; - } else { - data_pos += dir_info->NextEntryOffset; - } - numfiles++; - } - ok(numfiles < max_test_dir_size, "too many loops\n"); - - for (i=0; testfiles[i].name; i++) - ok(testfiles[i].nfound == 1, "Wrong number %d of %s files found (ReturnSingleEntry=%d,RestartScan=%d)\n", - testfiles[i].nfound, testfiles[i].description, single_entry, restart_flag); - - pNtClose(dirh); -} - -static void test_NtQueryDirectoryFile(void) -{ - OBJECT_ATTRIBUTES attr; - UNICODE_STRING ntdirname; - char testdirA[MAX_PATH]; - WCHAR testdirW[MAX_PATH]; - - /* Clean up from prior aborted run, if any, then set up test files */ - ok(GetTempPathA(MAX_PATH, testdirA), "couldn't get temp dir\n"); - strcat(testdirA, "NtQueryDirectoryFile.tmp"); - tear_down_attribute_test(testdirA); - set_up_attribute_test(testdirA); - - pRtlMultiByteToUnicodeN(testdirW, sizeof(testdirW), NULL, testdirA, strlen(testdirA)+1); - if (!pRtlDosPathNameToNtPathName_U(testdirW, &ntdirname, NULL, NULL)) - { - ok(0, "RtlDosPathNametoNtPathName_U failed\n"); - goto done; - } - InitializeObjectAttributes(&attr, &ntdirname, OBJ_CASE_INSENSITIVE, 0, NULL); - - test_flags_NtQueryDirectoryFile(&attr, testdirA, FALSE, TRUE); - test_flags_NtQueryDirectoryFile(&attr, testdirA, FALSE, FALSE); - test_flags_NtQueryDirectoryFile(&attr, testdirA, TRUE, TRUE); - test_flags_NtQueryDirectoryFile(&attr, testdirA, TRUE, FALSE); - -done: - tear_down_attribute_test(testdirA); - pRtlFreeUnicodeString(&ntdirname); -} - -static void test_redirection(void) -{ - ULONG old, cur; - NTSTATUS status; - - if (!pRtlWow64EnableFsRedirection || !pRtlWow64EnableFsRedirectionEx) - { - skip( "Wow64 redirection not supported\n" ); - return; - } - status = pRtlWow64EnableFsRedirectionEx( FALSE, &old ); - if (status == STATUS_NOT_IMPLEMENTED) - { - skip( "Wow64 redirection not supported\n" ); - return; - } - ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status ); - - status = pRtlWow64EnableFsRedirectionEx( FALSE, &cur ); - ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status ); - ok( !cur, "RtlWow64EnableFsRedirectionEx got %u\n", cur ); - - status = pRtlWow64EnableFsRedirectionEx( TRUE, &cur ); - ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status ); - status = pRtlWow64EnableFsRedirectionEx( TRUE, &cur ); - ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status ); - ok( cur == 1, "RtlWow64EnableFsRedirectionEx got %u\n", cur ); - - status = pRtlWow64EnableFsRedirection( TRUE ); - ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status ); - status = pRtlWow64EnableFsRedirectionEx( TRUE, &cur ); - ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status ); - ok( !cur, "RtlWow64EnableFsRedirectionEx got %u\n", cur ); - - status = pRtlWow64EnableFsRedirection( FALSE ); - ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status ); - status = pRtlWow64EnableFsRedirectionEx( FALSE, &cur ); - ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status ); - ok( cur == 1, "RtlWow64EnableFsRedirectionEx got %u\n", cur ); - - pRtlWow64EnableFsRedirectionEx( old, &cur ); -} - -START_TEST(directory) -{ - HMODULE hntdll = GetModuleHandleA("ntdll.dll"); - if (!hntdll) - { - skip("not running on NT, skipping test\n"); - return; - } - - pNtClose = (void *)GetProcAddress(hntdll, "NtClose"); - pNtOpenFile = (void *)GetProcAddress(hntdll, "NtOpenFile"); - pNtQueryDirectoryFile = (void *)GetProcAddress(hntdll, "NtQueryDirectoryFile"); - pRtlCreateUnicodeStringFromAsciiz = (void *)GetProcAddress(hntdll, "RtlCreateUnicodeStringFromAsciiz"); - pRtlDosPathNameToNtPathName_U = (void *)GetProcAddress(hntdll, "RtlDosPathNameToNtPathName_U"); - pRtlInitUnicodeString = (void *)GetProcAddress(hntdll, "RtlInitUnicodeString"); - pRtlFreeUnicodeString = (void *)GetProcAddress(hntdll, "RtlFreeUnicodeString"); - pRtlMultiByteToUnicodeN = (void *)GetProcAddress(hntdll,"RtlMultiByteToUnicodeN"); - pRtlWow64EnableFsRedirection = (void *)GetProcAddress(hntdll,"RtlWow64EnableFsRedirection"); - pRtlWow64EnableFsRedirectionEx = (void *)GetProcAddress(hntdll,"RtlWow64EnableFsRedirectionEx"); - - test_NtQueryDirectoryFile(); - test_redirection(); -} diff --git a/rostests/winetests/ntdll/env.c b/rostests/winetests/ntdll/env.c deleted file mode 100755 index 6bd15305e91..00000000000 --- a/rostests/winetests/ntdll/env.c +++ /dev/null @@ -1,300 +0,0 @@ -/* - * Unit test suite for ntdll path functions - * - * Copyright 2003 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 "ntdll_test.h" - -static NTSTATUS (WINAPI *pRtlMultiByteToUnicodeN)( LPWSTR dst, DWORD dstlen, LPDWORD reslen, - LPCSTR src, DWORD srclen ); -static NTSTATUS (WINAPI *pRtlCreateEnvironment)(BOOLEAN, PWSTR*); -static NTSTATUS (WINAPI *pRtlDestroyEnvironment)(PWSTR); -static NTSTATUS (WINAPI *pRtlQueryEnvironmentVariable_U)(PWSTR, PUNICODE_STRING, PUNICODE_STRING); -static void (WINAPI *pRtlSetCurrentEnvironment)(PWSTR, PWSTR*); -static NTSTATUS (WINAPI *pRtlSetEnvironmentVariable)(PWSTR*, PUNICODE_STRING, PUNICODE_STRING); -static NTSTATUS (WINAPI *pRtlExpandEnvironmentStrings_U)(LPWSTR, PUNICODE_STRING, PUNICODE_STRING, PULONG); - -static WCHAR small_env[] = {'f','o','o','=','t','o','t','o',0, - 'f','o','=','t','i','t','i',0, - 'f','o','o','o','=','t','u','t','u',0, - 's','r','=','a','n','=','o','u','o',0, - 'g','=','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a', - 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a', - 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a', - 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a', - 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a', - 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a', - 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a', - 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a', - 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a', - 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a',0, - '=','o','O','H','=','I','I','I',0, - 'n','u','l','=',0, - 0}; - -static void testQuery(void) -{ - struct test - { - const char *var; - int len; - NTSTATUS status; - const char *val; - NTSTATUS alt; - }; - - static const struct test tests[] = - { - {"foo", 256, STATUS_SUCCESS, "toto"}, - {"FoO", 256, STATUS_SUCCESS, "toto"}, - {"foo=", 256, STATUS_VARIABLE_NOT_FOUND, NULL}, - {"foo ", 256, STATUS_VARIABLE_NOT_FOUND, NULL}, - {"foo", 1, STATUS_BUFFER_TOO_SMALL, "toto"}, - {"foo", 3, STATUS_BUFFER_TOO_SMALL, "toto"}, - {"foo", 4, STATUS_SUCCESS, "toto", STATUS_BUFFER_TOO_SMALL}, - {"foo", 5, STATUS_SUCCESS, "toto"}, - {"fooo", 256, STATUS_SUCCESS, "tutu"}, - {"f", 256, STATUS_VARIABLE_NOT_FOUND, NULL}, - {"g", 256, STATUS_SUCCESS, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" -"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}, - {"sr=an", 256, STATUS_SUCCESS, "ouo", STATUS_VARIABLE_NOT_FOUND}, - {"sr", 256, STATUS_SUCCESS, "an=ouo"}, - {"=oOH", 256, STATUS_SUCCESS, "III"}, - {"", 256, STATUS_VARIABLE_NOT_FOUND, NULL}, - {"nul", 256, STATUS_SUCCESS, ""}, - {NULL, 0, 0, NULL} - }; - - WCHAR bn[257]; - WCHAR bv[257]; - UNICODE_STRING name; - UNICODE_STRING value; - NTSTATUS nts; - unsigned int i; - - for (i = 0; tests[i].var; i++) - { - const struct test *test = &tests[i]; - name.Length = strlen(test->var) * 2; - name.MaximumLength = name.Length + 2; - name.Buffer = bn; - value.Length = 0; - value.MaximumLength = test->len * 2; - value.Buffer = bv; - bv[test->len] = '@'; - - pRtlMultiByteToUnicodeN( bn, sizeof(bn), NULL, test->var, strlen(test->var)+1 ); - nts = pRtlQueryEnvironmentVariable_U(small_env, &name, &value); - ok( nts == test->status || (test->alt && nts == test->alt), - "[%d]: Wrong status for '%s', expecting %x got %x\n", - i, test->var, test->status, nts ); - if (nts == test->status) switch (nts) - { - case STATUS_SUCCESS: - pRtlMultiByteToUnicodeN( bn, sizeof(bn), NULL, test->val, strlen(test->val)+1 ); - ok( value.Length == strlen(test->val) * sizeof(WCHAR), "Wrong length %d for %s\n", - value.Length, test->var ); - ok((value.Length == strlen(test->val) * sizeof(WCHAR) && memcmp(bv, bn, test->len*sizeof(WCHAR)) == 0) || - lstrcmpW(bv, bn) == 0, - "Wrong result for %s/%d\n", test->var, test->len); - ok(bv[test->len] == '@', "Writing too far away in the buffer for %s/%d\n", test->var, test->len); - break; - case STATUS_BUFFER_TOO_SMALL: - ok( value.Length == strlen(test->val) * sizeof(WCHAR), - "Wrong returned length %d (too small buffer) for %s\n", value.Length, test->var ); - break; - } - } -} - -static void testSetHelper(LPWSTR* env, const char* var, const char* val, NTSTATUS ret, NTSTATUS alt) -{ - WCHAR bvar[256], bval1[256], bval2[256]; - UNICODE_STRING uvar; - UNICODE_STRING uval; - NTSTATUS nts; - - uvar.Length = strlen(var) * sizeof(WCHAR); - uvar.MaximumLength = uvar.Length + sizeof(WCHAR); - uvar.Buffer = bvar; - pRtlMultiByteToUnicodeN( bvar, sizeof(bvar), NULL, var, strlen(var)+1 ); - if (val) - { - uval.Length = strlen(val) * sizeof(WCHAR); - uval.MaximumLength = uval.Length + sizeof(WCHAR); - uval.Buffer = bval1; - pRtlMultiByteToUnicodeN( bval1, sizeof(bval1), NULL, val, strlen(val)+1 ); - } - nts = pRtlSetEnvironmentVariable(env, &uvar, val ? &uval : NULL); - ok(nts == ret || (alt && nts == alt), "Setting var %s=%s (%x/%x)\n", var, val, nts, ret); - if (nts == STATUS_SUCCESS) - { - uval.Length = 0; - uval.MaximumLength = sizeof(bval2); - uval.Buffer = bval2; - nts = pRtlQueryEnvironmentVariable_U(*env, &uvar, &uval); - switch (nts) - { - case STATUS_SUCCESS: - ok(lstrcmpW(bval1, bval2) == 0, "Cannot get value written to environment\n"); - break; - case STATUS_VARIABLE_NOT_FOUND: - ok(val == NULL || - broken(strchr(var,'=') != NULL), /* variable containing '=' may be set but not found again on NT4 */ - "Couldn't find variable, but didn't delete it. val = %s\n", val); - break; - default: - ok(0, "Wrong ret %u for %s\n", nts, var); - break; - } - } -} - -static void testSet(void) -{ - LPWSTR env; - char tmp[16]; - int i; - - ok(pRtlCreateEnvironment(FALSE, &env) == STATUS_SUCCESS, "Creating environment\n"); - - testSetHelper(&env, "cat", "dog", STATUS_SUCCESS, 0); - testSetHelper(&env, "cat", "horse", STATUS_SUCCESS, 0); - testSetHelper(&env, "cat", "zz", STATUS_SUCCESS, 0); - testSetHelper(&env, "cat", NULL, STATUS_SUCCESS, 0); - testSetHelper(&env, "cat", NULL, STATUS_SUCCESS, STATUS_VARIABLE_NOT_FOUND); - testSetHelper(&env, "foo", "meouw", STATUS_SUCCESS, 0); - testSetHelper(&env, "me=too", "also", STATUS_SUCCESS, STATUS_INVALID_PARAMETER); - testSetHelper(&env, "me", "too=also", STATUS_SUCCESS, 0); - testSetHelper(&env, "=too", "also", STATUS_SUCCESS, 0); - testSetHelper(&env, "=", "also", STATUS_SUCCESS, 0); - - for (i = 0; i < 128; i++) - { - sprintf(tmp, "zork%03d", i); - testSetHelper(&env, tmp, "is alive", STATUS_SUCCESS, 0); - } - - for (i = 0; i < 128; i++) - { - sprintf(tmp, "zork%03d", i); - testSetHelper(&env, tmp, NULL, STATUS_SUCCESS, 0); - } - testSetHelper(&env, "fOo", NULL, STATUS_SUCCESS, 0); - - ok(pRtlDestroyEnvironment(env) == STATUS_SUCCESS, "Destroying environment\n"); -} - -static void testExpand(void) -{ - static const struct test - { - const char *src; - const char *dst; - } tests[] = - { - {"hello%foo%world", "hellototoworld"}, - {"hello%=oOH%world", "helloIIIworld"}, - {"hello%foo", "hello%foo"}, - {"hello%bar%world", "hello%bar%world"}, - /* - * {"hello%foo%world%=oOH%eeck", "hellototoworldIIIeeck"}, - * Interestingly enough, with a 8 WCHAR buffers, we get on 2k: - * helloIII - * so it seems like strings overflowing the buffer are written - * (truncated) but the write cursor is not advanced :-/ - */ - {NULL, NULL} - }; - - const struct test* test; - NTSTATUS nts; - UNICODE_STRING us_src, us_dst; - WCHAR src[256], dst[256], rst[256]; - ULONG ul; - - for (test = tests; test->src; test++) - { - pRtlMultiByteToUnicodeN(src, sizeof(src), NULL, test->src, strlen(test->src)+1); - pRtlMultiByteToUnicodeN(rst, sizeof(rst), NULL, test->dst, strlen(test->dst)+1); - - us_src.Length = strlen(test->src) * sizeof(WCHAR); - us_src.MaximumLength = us_src.Length + 2; - us_src.Buffer = src; - - us_dst.Length = 0; - us_dst.MaximumLength = 0; - us_dst.Buffer = NULL; - - nts = pRtlExpandEnvironmentStrings_U(small_env, &us_src, &us_dst, &ul); - ok(nts == STATUS_BUFFER_TOO_SMALL, "Call failed (%u)\n", nts); - ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR), - "Wrong returned length for %s: %u\n", test->src, ul ); - - us_dst.Length = 0; - us_dst.MaximumLength = sizeof(dst); - us_dst.Buffer = dst; - - nts = pRtlExpandEnvironmentStrings_U(small_env, &us_src, &us_dst, &ul); - ok(nts == STATUS_SUCCESS, "Call failed (%u)\n", nts); - ok(ul == us_dst.Length + sizeof(WCHAR), - "Wrong returned length for %s: %u\n", test->src, ul); - ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR), - "Wrong returned length for %s: %u\n", test->src, ul); - ok(lstrcmpW(dst, rst) == 0, "Wrong result for %s: expecting %s\n", - test->src, test->dst); - - us_dst.Length = 0; - us_dst.MaximumLength = 8 * sizeof(WCHAR); - us_dst.Buffer = dst; - dst[8] = '-'; - nts = pRtlExpandEnvironmentStrings_U(small_env, &us_src, &us_dst, &ul); - ok(nts == STATUS_BUFFER_TOO_SMALL, "Call failed (%u)\n", nts); - ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR), - "Wrong returned length for %s (with buffer too small): %u\n", test->src, ul); - ok(dst[8] == '-', "Writing too far in buffer (got %c/%d)\n", dst[8], dst[8]); - } - -} - -START_TEST(env) -{ - HMODULE mod = GetModuleHandleA("ntdll.dll"); - if (!mod) - { - win_skip("Not running on NT, skipping tests\n"); - return; - } - - pRtlMultiByteToUnicodeN = (void *)GetProcAddress(mod,"RtlMultiByteToUnicodeN"); - pRtlCreateEnvironment = (void*)GetProcAddress(mod, "RtlCreateEnvironment"); - pRtlDestroyEnvironment = (void*)GetProcAddress(mod, "RtlDestroyEnvironment"); - pRtlQueryEnvironmentVariable_U = (void*)GetProcAddress(mod, "RtlQueryEnvironmentVariable_U"); - pRtlSetCurrentEnvironment = (void*)GetProcAddress(mod, "RtlSetCurrentEnvironment"); - pRtlSetEnvironmentVariable = (void*)GetProcAddress(mod, "RtlSetEnvironmentVariable"); - pRtlExpandEnvironmentStrings_U = (void*)GetProcAddress(mod, "RtlExpandEnvironmentStrings_U"); - - if (pRtlQueryEnvironmentVariable_U) - testQuery(); - if (pRtlSetEnvironmentVariable) - testSet(); - if (pRtlExpandEnvironmentStrings_U) - testExpand(); -} diff --git a/rostests/winetests/ntdll/error.c b/rostests/winetests/ntdll/error.c deleted file mode 100755 index 22194c6f40a..00000000000 --- a/rostests/winetests/ntdll/error.c +++ /dev/null @@ -1,1003 +0,0 @@ -/* - * Unit tests for RtlNtStatusToDosError function - * - * Copyright (c) 2002 Andriy Palamarchuk - * Copyright (c) 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 - * 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 "ntstatus.h" -#define WIN32_NO_STATUS - -#include "wine/test.h" - -#include "windef.h" -#include "winbase.h" -#include "rpcnterr.h" -#include "winreg.h" -#include "winternl.h" - -/* FIXME!!! this test checks only mappings, defined by MSDN - * It is necessary to add other mappings and to test them - * up to the latest Windows platform. - * - * Some Windows platforms don't know about all the mappings, and in such - * cases they return somewhat strange results (Win98) or a generic error - * like ERROR_MR_MID_NOT_FOUND (NT4). Our tests have to know about these to - * not fail, but we would very much prefer Wine not to return such garbage. - * So you can pass the 'strict' option to this test to force it to only check - * results against the first listed value. This test should pass in strict - * mode on the latest Windows platform and in Wine. - * (of course older Windows platforms will fail to pass the strict mode) - */ - -static ULONG (WINAPI *pRtlNtStatusToDosError)(NTSTATUS Status); -static int strict; - -static int prepare_test(void) -{ - HMODULE ntdll; - int argc; - char** argv; - - ntdll = LoadLibraryA("ntdll.dll"); - pRtlNtStatusToDosError = (void*)GetProcAddress(ntdll, "RtlNtStatusToDosError"); - if (!pRtlNtStatusToDosError) - { - win_skip("RtlNtStatusToDosError is not available\n"); - return 0; - } - - argc = winetest_get_mainargs(&argv); - strict=(argc >= 3 && strcmp(argv[2],"strict")==0); - return 1; -} - -static void cmp_call(NTSTATUS win_nt, ULONG win32, const char* message) -{ - ULONG err; - - err = pRtlNtStatusToDosError(win_nt); - ok(err == win32, - "%s (%x): got %u, expected %u\n", - message, win_nt, err, win32); -} - -static void cmp_call2(NTSTATUS win_nt, ULONG win32, const char* message) -{ - ULONG err; - - err = pRtlNtStatusToDosError(win_nt); - ok(err == win32 || - (!strict && err == ERROR_MR_MID_NOT_FOUND), - "%s (%x): got %u, expected %u (or MID_NOT_FOUND)\n", - message, win_nt, err, win32); -} - -static void cmp_call3(NTSTATUS win_nt, ULONG win32_1, ULONG win32_2, const char* message) -{ - ULONG err; - - err = pRtlNtStatusToDosError(win_nt); - ok(err == win32_1 || (!strict && err == win32_2), - "%s (%x): got %u, expected %u or %u\n", - message, win_nt, err, win32_1, win32_2); -} - -static void cmp_call4(NTSTATUS win_nt, ULONG win32_1, ULONG win32_2, const char* message) -{ - ULONG err; - - err = pRtlNtStatusToDosError(win_nt); - ok(err == win32_1 || - (!strict && (err == win32_2 || err == ERROR_MR_MID_NOT_FOUND)), - "%s (%x): got %u, expected %u or %u\n", - message, win_nt, err, win32_1, win32_2); -} - -#define cmp(status, error) \ - cmp_call(status, error, #status) -#define cmp2(status, error) \ - cmp_call2(status, error, #status) -#define cmp3(status, error1, error2) \ - cmp_call3(status, error1, error2, #status) -#define cmp4(status, error1, error2) \ - cmp_call4(status, error1, error2, #status) - -static void run_error_tests(void) -{ - cmp(STATUS_DATATYPE_MISALIGNMENT, ERROR_NOACCESS); - cmp(STATUS_ACCESS_VIOLATION, ERROR_NOACCESS); - cmp2(STATUS_DATATYPE_MISALIGNMENT_ERROR, ERROR_NOACCESS); - cmp(STATUS_CTL_FILE_NOT_SUPPORTED, ERROR_NOT_SUPPORTED); - cmp(STATUS_PORT_ALREADY_SET, ERROR_INVALID_PARAMETER); - cmp(STATUS_SECTION_NOT_IMAGE, ERROR_INVALID_PARAMETER); - cmp(STATUS_BAD_WORKING_SET_LIMIT, ERROR_INVALID_PARAMETER); - cmp(STATUS_WORKING_SET_LIMIT_RANGE, ERROR_INVALID_PARAMETER); - cmp(STATUS_INCOMPATIBLE_FILE_MAP, ERROR_INVALID_PARAMETER); - cmp(STATUS_PORT_DISCONNECTED, ERROR_INVALID_HANDLE); - cmp(STATUS_NOT_LOCKED, ERROR_NOT_LOCKED); - cmp(STATUS_NOT_MAPPED_VIEW, ERROR_INVALID_ADDRESS); - cmp(STATUS_UNABLE_TO_FREE_VM, ERROR_INVALID_PARAMETER); - cmp(STATUS_UNABLE_TO_DELETE_SECTION, ERROR_INVALID_PARAMETER); - cmp(STATUS_MORE_PROCESSING_REQUIRED, ERROR_MORE_DATA); - cmp(STATUS_INVALID_CID, ERROR_INVALID_PARAMETER); - cmp(STATUS_STACK_OVERFLOW, ERROR_STACK_OVERFLOW); - cmp(STATUS_BAD_INITIAL_STACK, ERROR_STACK_OVERFLOW); - cmp(STATUS_INVALID_VOLUME_LABEL, ERROR_LABEL_TOO_LONG); - cmp(STATUS_SECTION_NOT_EXTENDED, ERROR_OUTOFMEMORY); - cmp(STATUS_NOT_MAPPED_DATA, ERROR_INVALID_ADDRESS); - cmp2(STATUS_NO_LDT, ERROR_INVALID_THREAD_ID); - cmp(STATUS_INFO_LENGTH_MISMATCH, ERROR_BAD_LENGTH); - cmp(STATUS_INVALID_INFO_CLASS, ERROR_INVALID_PARAMETER); - cmp(STATUS_SUSPEND_COUNT_EXCEEDED, ERROR_SIGNAL_REFUSED); - cmp(STATUS_NOTIFY_ENUM_DIR, ERROR_NOTIFY_ENUM_DIR); - cmp(STATUS_REGISTRY_RECOVERED, ERROR_REGISTRY_RECOVERED); - cmp(STATUS_REGISTRY_IO_FAILED, ERROR_REGISTRY_IO_FAILED); - cmp(STATUS_NOT_REGISTRY_FILE, ERROR_NOT_REGISTRY_FILE); - cmp(STATUS_KEY_DELETED, ERROR_KEY_DELETED); - cmp(STATUS_NO_LOG_SPACE, ERROR_NO_LOG_SPACE); - cmp(STATUS_KEY_HAS_CHILDREN, ERROR_KEY_HAS_CHILDREN); - cmp(STATUS_CHILD_MUST_BE_VOLATILE, ERROR_CHILD_MUST_BE_VOLATILE); - cmp(STATUS_REGISTRY_CORRUPT, ERROR_BADDB); - cmp(STATUS_DLL_NOT_FOUND, ERROR_MOD_NOT_FOUND); - cmp2(STATUS_OPEN_FAILED, ERROR_NET_OPEN_FAILED); - cmp2(STATUS_IO_PRIVILEGE_FAILED, ERROR_IO_PRIVILEGE_FAILED); - cmp(STATUS_DLL_INIT_FAILED, ERROR_DLL_INIT_FAILED); - cmp2(STATUS_INVALID_IMPORT_OF_NON_DLL, ERROR_INVALID_IMPORT_OF_NON_DLL); - cmp(STATUS_ORDINAL_NOT_FOUND, ERROR_INVALID_ORDINAL); - cmp(STATUS_DRIVER_ORDINAL_NOT_FOUND, ERROR_INVALID_ORDINAL); - cmp2(STATUS_DRIVER_UNABLE_TO_LOAD, ERROR_BAD_DRIVER); - cmp(STATUS_ENTRYPOINT_NOT_FOUND, ERROR_PROC_NOT_FOUND); - cmp(STATUS_DRIVER_ENTRYPOINT_NOT_FOUND, ERROR_PROC_NOT_FOUND); - cmp(STATUS_PENDING, ERROR_IO_PENDING); - cmp(STATUS_MORE_ENTRIES, ERROR_MORE_DATA); - cmp(STATUS_INTEGER_OVERFLOW, ERROR_ARITHMETIC_OVERFLOW); - cmp(STATUS_BUFFER_OVERFLOW, ERROR_MORE_DATA); - cmp(STATUS_NO_MORE_FILES, ERROR_NO_MORE_FILES); - cmp2(STATUS_HANDLES_CLOSED, ERROR_HANDLES_CLOSED); - cmp(STATUS_NO_INHERITANCE, ERROR_NO_INHERITANCE); - cmp(STATUS_NO_MORE_EAS, ERROR_NO_MORE_ITEMS); - cmp(STATUS_NO_MORE_ENTRIES, ERROR_NO_MORE_ITEMS); - cmp(STATUS_GUIDS_EXHAUSTED, ERROR_NO_MORE_ITEMS); - cmp(STATUS_AGENTS_EXHAUSTED, ERROR_NO_MORE_ITEMS); - cmp(STATUS_UNSUCCESSFUL, ERROR_GEN_FAILURE); - cmp(STATUS_TOO_MANY_LINKS, ERROR_TOO_MANY_LINKS); - cmp(STATUS_NOT_IMPLEMENTED, ERROR_INVALID_FUNCTION); - cmp(STATUS_ILLEGAL_FUNCTION, ERROR_INVALID_FUNCTION); - cmp(STATUS_IN_PAGE_ERROR, ERROR_SWAPERROR); - cmp(STATUS_PAGEFILE_QUOTA, ERROR_PAGEFILE_QUOTA); - cmp(STATUS_COMMITMENT_LIMIT, ERROR_COMMITMENT_LIMIT); - cmp(STATUS_SECTION_TOO_BIG, ERROR_NOT_ENOUGH_MEMORY); - cmp(RPC_NT_SS_IN_NULL_CONTEXT, ERROR_INVALID_HANDLE); - cmp(RPC_NT_INVALID_BINDING, ERROR_INVALID_HANDLE); - cmp(STATUS_INVALID_HANDLE, ERROR_INVALID_HANDLE); - cmp(STATUS_OBJECT_TYPE_MISMATCH, ERROR_INVALID_HANDLE); - cmp(STATUS_FILE_CLOSED, ERROR_INVALID_HANDLE); - cmp(STATUS_INVALID_PORT_HANDLE, ERROR_INVALID_HANDLE); - cmp(STATUS_HANDLE_NOT_CLOSABLE, ERROR_INVALID_HANDLE); - cmp(STATUS_NOT_COMMITTED, ERROR_INVALID_ADDRESS); - cmp(STATUS_PARTIAL_COPY, ERROR_PARTIAL_COPY); - cmp3(STATUS_LPC_REPLY_LOST, ERROR_CONNECTION_ABORTED, ERROR_INTERNAL_ERROR); - cmp(STATUS_INVALID_PARAMETER, ERROR_INVALID_PARAMETER); - cmp(STATUS_INVALID_PARAMETER_1, ERROR_INVALID_PARAMETER); - cmp(STATUS_INVALID_PARAMETER_2, ERROR_INVALID_PARAMETER); - cmp(STATUS_INVALID_PARAMETER_3, ERROR_INVALID_PARAMETER); - cmp(STATUS_INVALID_PARAMETER_4, ERROR_INVALID_PARAMETER); - cmp(STATUS_INVALID_PARAMETER_5, ERROR_INVALID_PARAMETER); - cmp(STATUS_INVALID_PARAMETER_6, ERROR_INVALID_PARAMETER); - cmp(STATUS_INVALID_PARAMETER_7, ERROR_INVALID_PARAMETER); - cmp(STATUS_INVALID_PARAMETER_8, ERROR_INVALID_PARAMETER); - cmp(STATUS_INVALID_PARAMETER_9, ERROR_INVALID_PARAMETER); - cmp(STATUS_INVALID_PARAMETER_10, ERROR_INVALID_PARAMETER); - cmp(STATUS_INVALID_PARAMETER_11, ERROR_INVALID_PARAMETER); - cmp(STATUS_INVALID_PARAMETER_12, ERROR_INVALID_PARAMETER); - cmp(STATUS_INVALID_PARAMETER_MIX, ERROR_INVALID_PARAMETER); - cmp(STATUS_INVALID_PAGE_PROTECTION, ERROR_INVALID_PARAMETER); - cmp(STATUS_SECTION_PROTECTION, ERROR_INVALID_PARAMETER); - cmp(STATUS_RESOURCE_DATA_NOT_FOUND, ERROR_RESOURCE_DATA_NOT_FOUND); - cmp(STATUS_RESOURCE_TYPE_NOT_FOUND, ERROR_RESOURCE_TYPE_NOT_FOUND); - cmp(STATUS_RESOURCE_NAME_NOT_FOUND, ERROR_RESOURCE_NAME_NOT_FOUND); - cmp(STATUS_RESOURCE_LANG_NOT_FOUND, ERROR_RESOURCE_LANG_NOT_FOUND); - cmp(STATUS_NO_SUCH_DEVICE, ERROR_FILE_NOT_FOUND); - cmp(STATUS_NO_SUCH_FILE, ERROR_FILE_NOT_FOUND); - cmp(STATUS_INVALID_DEVICE_REQUEST, ERROR_INVALID_FUNCTION); - cmp2(STATUS_VOLUME_NOT_UPGRADED, ERROR_INVALID_FUNCTION); - cmp(STATUS_END_OF_FILE, ERROR_HANDLE_EOF); - cmp(STATUS_FILE_FORCED_CLOSED, ERROR_HANDLE_EOF); - cmp(STATUS_WRONG_VOLUME, ERROR_WRONG_DISK); - cmp(STATUS_NO_MEDIA, ERROR_NO_MEDIA_IN_DRIVE); - cmp(STATUS_NO_MEDIA_IN_DEVICE, ERROR_NOT_READY); - cmp2(STATUS_VOLUME_DISMOUNTED, ERROR_NOT_READY); - cmp(STATUS_NONEXISTENT_SECTOR, ERROR_SECTOR_NOT_FOUND); - cmp(STATUS_WORKING_SET_QUOTA, ERROR_WORKING_SET_QUOTA); - cmp(STATUS_NO_MEMORY, ERROR_NOT_ENOUGH_MEMORY); - cmp(STATUS_CONFLICTING_ADDRESSES, ERROR_INVALID_ADDRESS); - cmp(STATUS_INVALID_SYSTEM_SERVICE, ERROR_INVALID_FUNCTION); - cmp(STATUS_THREAD_IS_TERMINATING, ERROR_ACCESS_DENIED); - cmp(STATUS_PROCESS_IS_TERMINATING, ERROR_ACCESS_DENIED); - cmp(STATUS_INVALID_LOCK_SEQUENCE, ERROR_ACCESS_DENIED); - cmp(STATUS_INVALID_VIEW_SIZE, ERROR_ACCESS_DENIED); - cmp(STATUS_ALREADY_COMMITTED, ERROR_ACCESS_DENIED); - cmp(STATUS_ACCESS_DENIED, ERROR_ACCESS_DENIED); - cmp(STATUS_FILE_IS_A_DIRECTORY, ERROR_ACCESS_DENIED); - cmp(STATUS_CANNOT_DELETE, ERROR_ACCESS_DENIED); - cmp(STATUS_INVALID_COMPUTER_NAME, ERROR_INVALID_COMPUTERNAME); - cmp(STATUS_FILE_DELETED, ERROR_ACCESS_DENIED); - cmp2(STATUS_FILE_RENAMED, ERROR_ACCESS_DENIED); - cmp(STATUS_DELETE_PENDING, ERROR_ACCESS_DENIED); - cmp(STATUS_PORT_CONNECTION_REFUSED, ERROR_ACCESS_DENIED); - cmp(STATUS_NO_SUCH_PRIVILEGE, ERROR_NO_SUCH_PRIVILEGE); - cmp(STATUS_PRIVILEGE_NOT_HELD, ERROR_PRIVILEGE_NOT_HELD); - cmp(STATUS_CANNOT_IMPERSONATE, ERROR_CANNOT_IMPERSONATE); - cmp(STATUS_LOGON_FAILURE, ERROR_LOGON_FAILURE); - cmp2(STATUS_MUTUAL_AUTHENTICATION_FAILED, ERROR_MUTUAL_AUTH_FAILED); - cmp2(STATUS_TIME_DIFFERENCE_AT_DC, ERROR_TIME_SKEW); - cmp2(STATUS_PKINIT_FAILURE, ERROR_PKINIT_FAILURE); - cmp2(STATUS_SMARTCARD_SUBSYSTEM_FAILURE, ERROR_SMARTCARD_SUBSYSTEM_FAILURE); - cmp2(STATUS_DOWNGRADE_DETECTED, ERROR_DOWNGRADE_DETECTED); - cmp4(STATUS_SMARTCARD_CERT_REVOKED, SEC_E_SMARTCARD_CERT_REVOKED, 1266); /* FIXME: real name? */ - cmp4(STATUS_ISSUING_CA_UNTRUSTED, SEC_E_ISSUING_CA_UNTRUSTED, 1267); /* FIXME: real name? */ - cmp4(STATUS_REVOCATION_OFFLINE_C, SEC_E_REVOCATION_OFFLINE_C, 1268); /* FIXME: real name? */ - cmp4(STATUS_PKINIT_CLIENT_FAILURE, SEC_E_PKINIT_CLIENT_FAILURE, 1269); /* FIXME: real name? */ - cmp4(STATUS_SMARTCARD_CERT_EXPIRED, SEC_E_SMARTCARD_CERT_EXPIRED, 1270); /* FIXME: real name? */ - cmp2(STATUS_NO_KERB_KEY, SEC_E_NO_KERB_KEY); - cmp2(STATUS_CURRENT_DOMAIN_NOT_ALLOWED, ERROR_CURRENT_DOMAIN_NOT_ALLOWED); - cmp2(STATUS_SMARTCARD_WRONG_PIN, SCARD_W_WRONG_CHV); - cmp2(STATUS_SMARTCARD_CARD_BLOCKED, SCARD_W_CHV_BLOCKED); - cmp2(STATUS_SMARTCARD_CARD_NOT_AUTHENTICATED,SCARD_W_CARD_NOT_AUTHENTICATED); - cmp2(STATUS_SMARTCARD_NO_CARD, SCARD_E_NO_SMARTCARD); - cmp2(STATUS_SMARTCARD_NO_KEY_CONTAINER, NTE_NO_KEY); - cmp2(STATUS_SMARTCARD_NO_CERTIFICATE, SCARD_E_NO_SUCH_CERTIFICATE); - cmp2(STATUS_SMARTCARD_NO_KEYSET, NTE_BAD_KEYSET); - cmp2(STATUS_SMARTCARD_IO_ERROR, SCARD_E_COMM_DATA_LOST); - cmp(STATUS_ACCOUNT_RESTRICTION, ERROR_ACCOUNT_RESTRICTION); - cmp(STATUS_INVALID_LOGON_HOURS, ERROR_INVALID_LOGON_HOURS); - cmp(STATUS_INVALID_WORKSTATION, ERROR_INVALID_WORKSTATION); - cmp(STATUS_BUFFER_TOO_SMALL, ERROR_INSUFFICIENT_BUFFER); - cmp(STATUS_UNABLE_TO_DECOMMIT_VM, ERROR_INVALID_ADDRESS); - cmp(STATUS_DISK_CORRUPT_ERROR, ERROR_DISK_CORRUPT); - cmp(STATUS_FT_MISSING_MEMBER, ERROR_IO_DEVICE); - cmp(STATUS_FT_ORPHANING, ERROR_IO_DEVICE); - cmp(STATUS_VARIABLE_NOT_FOUND, ERROR_ENVVAR_NOT_FOUND); - cmp(STATUS_OBJECT_NAME_INVALID, ERROR_INVALID_NAME); - cmp(STATUS_OBJECT_NAME_NOT_FOUND, ERROR_FILE_NOT_FOUND); - cmp(STATUS_OBJECT_NAME_COLLISION, ERROR_ALREADY_EXISTS); - cmp(STATUS_OBJECT_PATH_INVALID, ERROR_BAD_PATHNAME); - cmp(STATUS_OBJECT_PATH_NOT_FOUND, ERROR_PATH_NOT_FOUND); - cmp(STATUS_DFS_EXIT_PATH_FOUND, ERROR_PATH_NOT_FOUND); - cmp2(STATUS_DFS_UNAVAILABLE, ERROR_CONNECTION_UNAVAIL); - cmp(STATUS_OBJECT_PATH_SYNTAX_BAD, ERROR_BAD_PATHNAME); - cmp(STATUS_NAME_TOO_LONG, ERROR_FILENAME_EXCED_RANGE); - cmp(STATUS_DATA_OVERRUN, ERROR_IO_DEVICE); - cmp(STATUS_DATA_LATE_ERROR, ERROR_IO_DEVICE); - cmp(STATUS_DATA_ERROR, ERROR_CRC); - cmp(STATUS_CRC_ERROR, ERROR_CRC); - cmp(STATUS_SHARING_VIOLATION, ERROR_SHARING_VIOLATION); - cmp(STATUS_QUOTA_EXCEEDED, ERROR_NOT_ENOUGH_QUOTA); - cmp(STATUS_MUTANT_NOT_OWNED, ERROR_NOT_OWNER); - cmp(STATUS_SEMAPHORE_LIMIT_EXCEEDED, ERROR_TOO_MANY_POSTS); - cmp(STATUS_DISK_FULL, ERROR_DISK_FULL); - cmp(STATUS_LOCK_NOT_GRANTED, ERROR_LOCK_VIOLATION); - cmp(STATUS_FILE_LOCK_CONFLICT, ERROR_LOCK_VIOLATION); - cmp(STATUS_NOT_A_DIRECTORY, ERROR_DIRECTORY); - cmp2(STATUS_CANNOT_MAKE, ERROR_CANNOT_MAKE); - cmp(STATUS_UNKNOWN_REVISION, ERROR_UNKNOWN_REVISION); - cmp(STATUS_REVISION_MISMATCH, ERROR_REVISION_MISMATCH); - cmp(STATUS_INVALID_OWNER, ERROR_INVALID_OWNER); - cmp(STATUS_INVALID_PRIMARY_GROUP, ERROR_INVALID_PRIMARY_GROUP); - cmp(STATUS_NO_IMPERSONATION_TOKEN, ERROR_NO_IMPERSONATION_TOKEN); - cmp(STATUS_CANT_DISABLE_MANDATORY, ERROR_CANT_DISABLE_MANDATORY); - cmp(STATUS_NO_LOGON_SERVERS, ERROR_NO_LOGON_SERVERS); - cmp(STATUS_DOMAIN_CONTROLLER_NOT_FOUND, ERROR_DOMAIN_CONTROLLER_NOT_FOUND); - cmp(STATUS_NO_SUCH_LOGON_SESSION, ERROR_NO_SUCH_LOGON_SESSION); - cmp(STATUS_INVALID_ACCOUNT_NAME, ERROR_INVALID_ACCOUNT_NAME); - cmp(STATUS_USER_EXISTS, ERROR_USER_EXISTS); - cmp(STATUS_NO_SUCH_USER, ERROR_NO_SUCH_USER); - cmp(STATUS_GROUP_EXISTS, ERROR_GROUP_EXISTS); - cmp(STATUS_NO_SUCH_GROUP, ERROR_NO_SUCH_GROUP); - cmp(STATUS_SPECIAL_GROUP, ERROR_SPECIAL_GROUP); - cmp(STATUS_MEMBER_IN_GROUP, ERROR_MEMBER_IN_GROUP); - cmp(STATUS_MEMBER_NOT_IN_GROUP, ERROR_MEMBER_NOT_IN_GROUP); - cmp(STATUS_LAST_ADMIN, ERROR_LAST_ADMIN); - cmp(STATUS_WRONG_PASSWORD, ERROR_INVALID_PASSWORD); - cmp(STATUS_WRONG_PASSWORD_CORE, ERROR_INVALID_PASSWORD); - cmp(STATUS_ILL_FORMED_PASSWORD, ERROR_ILL_FORMED_PASSWORD); - cmp(STATUS_PASSWORD_RESTRICTION, ERROR_PASSWORD_RESTRICTION); - cmp(STATUS_PASSWORD_EXPIRED, ERROR_PASSWORD_EXPIRED); - cmp(STATUS_PASSWORD_MUST_CHANGE, ERROR_PASSWORD_MUST_CHANGE); - cmp(STATUS_ACCOUNT_DISABLED, ERROR_ACCOUNT_DISABLED); - cmp(STATUS_ACCOUNT_LOCKED_OUT, ERROR_ACCOUNT_LOCKED_OUT); - cmp(STATUS_NONE_MAPPED, ERROR_NONE_MAPPED); - cmp(STATUS_TOO_MANY_LUIDS_REQUESTED, ERROR_TOO_MANY_LUIDS_REQUESTED); - cmp(STATUS_LUIDS_EXHAUSTED, ERROR_LUIDS_EXHAUSTED); - cmp(STATUS_INVALID_SUB_AUTHORITY, ERROR_INVALID_SUB_AUTHORITY); - cmp(STATUS_INVALID_ACL, ERROR_INVALID_ACL); - cmp(STATUS_INVALID_SID, ERROR_INVALID_SID); - cmp(STATUS_INVALID_SECURITY_DESCR, ERROR_INVALID_SECURITY_DESCR); - cmp(STATUS_PROCEDURE_NOT_FOUND, ERROR_PROC_NOT_FOUND); - cmp2(STATUS_INVALID_LDT_SIZE, ERROR_INVALID_LDT_SIZE); - cmp2(STATUS_INVALID_LDT_OFFSET, ERROR_INVALID_LDT_OFFSET); - cmp2(STATUS_INVALID_LDT_DESCRIPTOR, ERROR_INVALID_LDT_DESCRIPTOR); - cmp(STATUS_BAD_INITIAL_PC, ERROR_BAD_EXE_FORMAT); - cmp(STATUS_INVALID_FILE_FOR_SECTION, ERROR_BAD_EXE_FORMAT); - cmp(STATUS_INVALID_IMAGE_FORMAT, ERROR_BAD_EXE_FORMAT); - cmp(STATUS_IMAGE_MP_UP_MISMATCH, ERROR_BAD_EXE_FORMAT); - cmp(STATUS_INVALID_IMAGE_NOT_MZ, ERROR_BAD_EXE_FORMAT); - cmp(STATUS_IMAGE_CHECKSUM_MISMATCH, ERROR_BAD_EXE_FORMAT); - cmp(STATUS_INVALID_IMAGE_PROTECT, ERROR_BAD_EXE_FORMAT); - cmp(STATUS_INVALID_IMAGE_LE_FORMAT, ERROR_BAD_EXE_FORMAT); - cmp(STATUS_INVALID_IMAGE_NE_FORMAT, ERROR_BAD_EXE_FORMAT); - cmp(STATUS_INVALID_IMAGE_WIN_16, ERROR_BAD_EXE_FORMAT); - cmp2(STATUS_INVALID_IMAGE_WIN_32, ERROR_BAD_EXE_FORMAT); - cmp2(STATUS_INVALID_IMAGE_WIN_64, ERROR_BAD_EXE_FORMAT); - cmp(STATUS_NO_TOKEN, ERROR_NO_TOKEN); - cmp(STATUS_RANGE_NOT_LOCKED, ERROR_NOT_LOCKED); - cmp(STATUS_SERVER_DISABLED, ERROR_SERVER_DISABLED); - cmp(STATUS_SERVER_NOT_DISABLED, ERROR_SERVER_NOT_DISABLED); - cmp(STATUS_INVALID_ID_AUTHORITY, ERROR_INVALID_ID_AUTHORITY); - cmp(STATUS_ALLOTTED_SPACE_EXCEEDED, ERROR_ALLOTTED_SPACE_EXCEEDED); - cmp(STATUS_TOO_MANY_PAGING_FILES, ERROR_NOT_ENOUGH_MEMORY); - cmp(STATUS_INSUFFICIENT_RESOURCES, ERROR_NO_SYSTEM_RESOURCES); - cmp(STATUS_INSUFF_SERVER_RESOURCES, ERROR_NOT_ENOUGH_SERVER_MEMORY); - cmp(STATUS_FILE_INVALID, ERROR_FILE_INVALID); - cmp(STATUS_MAPPED_FILE_SIZE_ZERO, ERROR_FILE_INVALID); - cmp(STATUS_DEVICE_PAPER_EMPTY, ERROR_OUT_OF_PAPER); - cmp(STATUS_DEVICE_POWERED_OFF, ERROR_NOT_READY); - cmp(STATUS_DEVICE_OFF_LINE, ERROR_NOT_READY); - cmp(STATUS_DEVICE_DATA_ERROR, ERROR_CRC); - cmp(STATUS_DEVICE_NOT_READY, ERROR_NOT_READY); - cmp3(STATUS_DEVICE_NOT_CONNECTED, ERROR_DEVICE_NOT_CONNECTED, ERROR_NOT_READY); - cmp(STATUS_DEVICE_POWER_FAILURE, ERROR_NOT_READY); - cmp2(STATUS_NOT_FOUND, ERROR_NOT_FOUND); - cmp2(STATUS_NO_MATCH, ERROR_NO_MATCH); - cmp2(STATUS_PROPSET_NOT_FOUND, ERROR_SET_NOT_FOUND); - cmp(STATUS_DEVICE_BUSY, ERROR_BUSY); - cmp(STATUS_FREE_VM_NOT_AT_BASE, ERROR_INVALID_ADDRESS); - cmp(STATUS_MEMORY_NOT_ALLOCATED, ERROR_INVALID_ADDRESS); - cmp(STATUS_NOT_SAME_DEVICE, ERROR_NOT_SAME_DEVICE); - cmp(STATUS_NOT_SUPPORTED, ERROR_NOT_SUPPORTED); - cmp(STATUS_REMOTE_NOT_LISTENING, ERROR_REM_NOT_LIST); - cmp(STATUS_DUPLICATE_NAME, ERROR_DUP_NAME); - cmp(STATUS_BAD_NETWORK_PATH, ERROR_BAD_NETPATH); - cmp(STATUS_NETWORK_BUSY, ERROR_NETWORK_BUSY); - cmp2(STATUS_ONLY_IF_CONNECTED, ERROR_ONLY_IF_CONNECTED); - cmp(STATUS_DEVICE_DOES_NOT_EXIST, ERROR_DEV_NOT_EXIST); - cmp(STATUS_TOO_MANY_COMMANDS, ERROR_TOO_MANY_CMDS); - cmp(STATUS_ADAPTER_HARDWARE_ERROR, ERROR_ADAP_HDW_ERR); - cmp(STATUS_REDIRECTOR_NOT_STARTED, ERROR_PATH_NOT_FOUND); - cmp(STATUS_INVALID_EA_NAME, ERROR_INVALID_EA_NAME); - cmp(STATUS_EA_LIST_INCONSISTENT, ERROR_EA_LIST_INCONSISTENT); - cmp(STATUS_EA_TOO_LARGE, ERROR_EA_LIST_INCONSISTENT); - cmp(STATUS_INVALID_EA_FLAG, ERROR_EA_LIST_INCONSISTENT); - cmp2(STATUS_EAS_NOT_SUPPORTED, ERROR_EAS_NOT_SUPPORTED); - cmp(STATUS_FILE_CORRUPT_ERROR, ERROR_FILE_CORRUPT); - cmp(STATUS_EA_CORRUPT_ERROR, ERROR_FILE_CORRUPT); - cmp(STATUS_NONEXISTENT_EA_ENTRY, ERROR_FILE_CORRUPT); - cmp(STATUS_NO_EAS_ON_FILE, ERROR_FILE_CORRUPT); - cmp2(STATUS_NOT_A_REPARSE_POINT, ERROR_NOT_A_REPARSE_POINT); - cmp4(STATUS_IO_REPARSE_TAG_INVALID, ERROR_REPARSE_TAG_INVALID, ERROR_INVALID_PARAMETER); - cmp4(STATUS_IO_REPARSE_TAG_MISMATCH, ERROR_REPARSE_TAG_MISMATCH, ERROR_INVALID_PARAMETER); - cmp2(STATUS_IO_REPARSE_TAG_NOT_HANDLED, ERROR_CANT_ACCESS_FILE); - cmp2(STATUS_REPARSE_POINT_NOT_RESOLVED, ERROR_CANT_RESOLVE_FILENAME); - cmp2(STATUS_DIRECTORY_IS_A_REPARSE_POINT, ERROR_BAD_PATHNAME); - cmp2(STATUS_REPARSE_ATTRIBUTE_CONFLICT, ERROR_REPARSE_ATTRIBUTE_CONFLICT); - cmp4(STATUS_IO_REPARSE_DATA_INVALID, ERROR_INVALID_REPARSE_DATA, ERROR_INVALID_PARAMETER); - cmp2(STATUS_FILE_IS_OFFLINE, ERROR_FILE_OFFLINE); - cmp2(STATUS_REMOTE_STORAGE_NOT_ACTIVE, ERROR_REMOTE_STORAGE_NOT_ACTIVE); - cmp2(STATUS_REMOTE_STORAGE_MEDIA_ERROR, ERROR_REMOTE_STORAGE_MEDIA_ERROR); - cmp2(STATUS_NO_TRACKING_SERVICE, ERROR_NO_TRACKING_SERVICE); - cmp2(STATUS_JOURNAL_DELETE_IN_PROGRESS, ERROR_JOURNAL_DELETE_IN_PROGRESS); - cmp2(STATUS_JOURNAL_NOT_ACTIVE, ERROR_JOURNAL_NOT_ACTIVE); - cmp2(STATUS_JOURNAL_ENTRY_DELETED, ERROR_JOURNAL_ENTRY_DELETED); - cmp(STATUS_INVALID_NETWORK_RESPONSE, ERROR_BAD_NET_RESP); - cmp(STATUS_USER_SESSION_DELETED, ERROR_UNEXP_NET_ERR); - cmp(STATUS_UNEXPECTED_NETWORK_ERROR, ERROR_UNEXP_NET_ERR); - cmp(STATUS_BAD_REMOTE_ADAPTER, ERROR_BAD_REM_ADAP); - cmp(STATUS_PRINT_QUEUE_FULL, ERROR_PRINTQ_FULL); - cmp(STATUS_NO_SPOOL_SPACE, ERROR_NO_SPOOL_SPACE); - cmp(STATUS_PRINT_CANCELLED, ERROR_PRINT_CANCELLED); - cmp(STATUS_NETWORK_NAME_DELETED, ERROR_NETNAME_DELETED); - cmp(STATUS_NETWORK_ACCESS_DENIED, ERROR_NETWORK_ACCESS_DENIED); - cmp(STATUS_BAD_DEVICE_TYPE, ERROR_BAD_DEV_TYPE); - cmp(STATUS_BAD_NETWORK_NAME, ERROR_BAD_NET_NAME); - cmp(STATUS_TOO_MANY_NAMES, ERROR_TOO_MANY_NAMES); - cmp(STATUS_TOO_MANY_GUIDS_REQUESTED, ERROR_TOO_MANY_NAMES); - cmp(STATUS_TOO_MANY_ADDRESSES, ERROR_TOO_MANY_NAMES); - cmp(STATUS_TOO_MANY_NODES, ERROR_TOO_MANY_NAMES); - cmp(STATUS_TOO_MANY_SESSIONS, ERROR_TOO_MANY_SESS); - cmp(STATUS_SHARING_PAUSED, ERROR_SHARING_PAUSED); - cmp(STATUS_REQUEST_NOT_ACCEPTED, ERROR_REQ_NOT_ACCEP); - cmp(STATUS_REDIRECTOR_PAUSED, ERROR_REDIR_PAUSED); - cmp(STATUS_NET_WRITE_FAULT, ERROR_NET_WRITE_FAULT); - cmp(STATUS_VIRTUAL_CIRCUIT_CLOSED, ERROR_VC_DISCONNECTED); - cmp(STATUS_INVALID_PIPE_STATE, ERROR_BAD_PIPE); - cmp(STATUS_INVALID_READ_MODE, ERROR_BAD_PIPE); - cmp(STATUS_PIPE_CLOSING, ERROR_NO_DATA); - cmp(STATUS_PIPE_EMPTY, ERROR_NO_DATA); - cmp(STATUS_PIPE_CONNECTED, ERROR_PIPE_CONNECTED); - cmp(STATUS_PIPE_DISCONNECTED, ERROR_PIPE_NOT_CONNECTED); - cmp(STATUS_PIPE_LISTENING, ERROR_PIPE_LISTENING); - cmp(STATUS_PIPE_NOT_AVAILABLE, ERROR_PIPE_BUSY); - cmp(STATUS_INSTANCE_NOT_AVAILABLE, ERROR_PIPE_BUSY); - cmp(STATUS_PIPE_BUSY, ERROR_PIPE_BUSY); - cmp(STATUS_PIPE_BROKEN, ERROR_BROKEN_PIPE); - cmp(STATUS_DIRECTORY_NOT_EMPTY, ERROR_DIR_NOT_EMPTY); - cmp(STATUS_TOO_MANY_OPENED_FILES, ERROR_TOO_MANY_OPEN_FILES); - cmp(STATUS_IO_TIMEOUT, ERROR_SEM_TIMEOUT); - cmp(STATUS_CANCELLED, ERROR_OPERATION_ABORTED); - cmp(STATUS_UNRECOGNIZED_MEDIA, ERROR_UNRECOGNIZED_MEDIA); - cmp(STATUS_INVALID_LEVEL, ERROR_INVALID_LEVEL); - cmp(STATUS_UNRECOGNIZED_VOLUME, ERROR_UNRECOGNIZED_VOLUME); - cmp(STATUS_MEDIA_WRITE_PROTECTED, ERROR_WRITE_PROTECT); - cmp(STATUS_TOO_LATE, ERROR_WRITE_PROTECT); - cmp(STATUS_SUCCESS, NO_ERROR); - cmp(STATUS_FULLSCREEN_MODE, ERROR_FULLSCREEN_MODE); - cmp(STATUS_END_OF_MEDIA, ERROR_END_OF_MEDIA); - cmp(STATUS_EOM_OVERFLOW, ERROR_EOM_OVERFLOW); - cmp(STATUS_BEGINNING_OF_MEDIA, ERROR_BEGINNING_OF_MEDIA); - cmp(STATUS_MEDIA_CHANGED, ERROR_MEDIA_CHANGED); - cmp(STATUS_BUS_RESET, ERROR_BUS_RESET); - cmp(STATUS_FILEMARK_DETECTED, ERROR_FILEMARK_DETECTED); - cmp(STATUS_SETMARK_DETECTED, ERROR_SETMARK_DETECTED); - cmp(STATUS_NO_DATA_DETECTED, ERROR_NO_DATA_DETECTED); - cmp(STATUS_PARTITION_FAILURE, ERROR_PARTITION_FAILURE); - cmp(STATUS_INVALID_BLOCK_LENGTH, ERROR_INVALID_BLOCK_LENGTH); - cmp(STATUS_DEVICE_NOT_PARTITIONED, ERROR_DEVICE_NOT_PARTITIONED); - cmp(STATUS_UNABLE_TO_LOCK_MEDIA, ERROR_UNABLE_TO_LOCK_MEDIA); - cmp(STATUS_UNABLE_TO_UNLOAD_MEDIA, ERROR_UNABLE_TO_UNLOAD_MEDIA); - cmp(STATUS_UNMAPPABLE_CHARACTER, ERROR_NO_UNICODE_TRANSLATION); - cmp(STATUS_NOT_ALL_ASSIGNED, ERROR_NOT_ALL_ASSIGNED); - cmp(STATUS_SOME_NOT_MAPPED, ERROR_SOME_NOT_MAPPED); - cmp(STATUS_NO_QUOTAS_FOR_ACCOUNT, ERROR_NO_QUOTAS_FOR_ACCOUNT); - cmp(STATUS_LOCAL_USER_SESSION_KEY, ERROR_LOCAL_USER_SESSION_KEY); - cmp(STATUS_NULL_LM_PASSWORD, ERROR_NULL_LM_PASSWORD); - cmp2(STATUS_IMAGE_MACHINE_TYPE_MISMATCH, ERROR_IMAGE_MACHINE_TYPE_MISMATCH); - cmp2(STATUS_RECEIVE_PARTIAL, ERROR_RECEIVE_PARTIAL); - cmp2(STATUS_RECEIVE_EXPEDITED, ERROR_RECEIVE_EXPEDITED); - cmp2(STATUS_RECEIVE_PARTIAL_EXPEDITED, ERROR_RECEIVE_PARTIAL_EXPEDITED); - cmp2(STATUS_EVENT_DONE, ERROR_EVENT_DONE); - cmp2(STATUS_EVENT_PENDING, ERROR_EVENT_PENDING); - cmp2(STATUS_CHECKING_FILE_SYSTEM, ERROR_CHECKING_FILE_SYSTEM); - cmp2(STATUS_FATAL_APP_EXIT, ERROR_FATAL_APP_EXIT); - cmp2(STATUS_PREDEFINED_HANDLE, ERROR_PREDEFINED_HANDLE); - cmp2(STATUS_WAS_UNLOCKED, ERROR_WAS_UNLOCKED); - cmp2(STATUS_SERVICE_NOTIFICATION, ERROR_SERVICE_NOTIFICATION); - cmp2(STATUS_WAS_LOCKED, ERROR_WAS_LOCKED); - cmp2(STATUS_LOG_HARD_ERROR, ERROR_LOG_HARD_ERROR); - cmp2(STATUS_ALREADY_WIN32, ERROR_ALREADY_WIN32); - cmp2(STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE, ERROR_IMAGE_MACHINE_TYPE_MISMATCH_EXE); - cmp2(STATUS_NO_YIELD_PERFORMED, ERROR_NO_YIELD_PERFORMED); - cmp2(STATUS_TIMER_RESUME_IGNORED, ERROR_TIMER_RESUME_IGNORED); - cmp(STATUS_BAD_INHERITANCE_ACL, ERROR_BAD_INHERITANCE_ACL); - cmp(STATUS_INVALID_GROUP_ATTRIBUTES, ERROR_INVALID_GROUP_ATTRIBUTES); - cmp(STATUS_BAD_IMPERSONATION_LEVEL, ERROR_BAD_IMPERSONATION_LEVEL); - cmp(STATUS_CANT_OPEN_ANONYMOUS, ERROR_CANT_OPEN_ANONYMOUS); - cmp(STATUS_BAD_VALIDATION_CLASS, ERROR_BAD_VALIDATION_CLASS); - cmp(STATUS_BAD_TOKEN_TYPE, ERROR_BAD_TOKEN_TYPE); - cmp2(STATUS_BAD_MASTER_BOOT_RECORD, ERROR_INVALID_PARAMETER); - cmp(STATUS_NO_SECURITY_ON_OBJECT, ERROR_NO_SECURITY_ON_OBJECT); - cmp(STATUS_CANT_ACCESS_DOMAIN_INFO, ERROR_CANT_ACCESS_DOMAIN_INFO); - cmp(STATUS_INVALID_SERVER_STATE, ERROR_INVALID_SERVER_STATE); - cmp(STATUS_INVALID_DOMAIN_STATE, ERROR_INVALID_DOMAIN_STATE); - cmp(STATUS_INVALID_DOMAIN_ROLE, ERROR_INVALID_DOMAIN_ROLE); - cmp(STATUS_NO_SUCH_DOMAIN, ERROR_NO_SUCH_DOMAIN); - cmp(STATUS_DOMAIN_EXISTS, ERROR_DOMAIN_EXISTS); - cmp(STATUS_DOMAIN_LIMIT_EXCEEDED, ERROR_DOMAIN_LIMIT_EXCEEDED); - cmp2(STATUS_OPLOCK_NOT_GRANTED, ERROR_OPLOCK_NOT_GRANTED); - cmp2(STATUS_INVALID_OPLOCK_PROTOCOL, ERROR_INVALID_OPLOCK_PROTOCOL); - cmp(STATUS_INTERNAL_DB_CORRUPTION, ERROR_INTERNAL_DB_CORRUPTION); - cmp(STATUS_INTERNAL_ERROR, ERROR_INTERNAL_ERROR); - cmp(STATUS_GENERIC_NOT_MAPPED, ERROR_GENERIC_NOT_MAPPED); - cmp(STATUS_BAD_DESCRIPTOR_FORMAT, ERROR_BAD_DESCRIPTOR_FORMAT); - cmp(STATUS_NOT_LOGON_PROCESS, ERROR_NOT_LOGON_PROCESS); - cmp(STATUS_LOGON_SESSION_EXISTS, ERROR_LOGON_SESSION_EXISTS); - cmp(STATUS_NO_SUCH_PACKAGE, ERROR_NO_SUCH_PACKAGE); - cmp(STATUS_BAD_LOGON_SESSION_STATE, ERROR_BAD_LOGON_SESSION_STATE); - cmp(STATUS_LOGON_SESSION_COLLISION, ERROR_LOGON_SESSION_COLLISION); - cmp(STATUS_INVALID_LOGON_TYPE, ERROR_INVALID_LOGON_TYPE); - cmp(STATUS_RXACT_INVALID_STATE, ERROR_RXACT_INVALID_STATE); - cmp(STATUS_RXACT_COMMIT_FAILURE, ERROR_RXACT_COMMIT_FAILURE); - cmp(STATUS_SPECIAL_ACCOUNT, ERROR_SPECIAL_ACCOUNT); - cmp(STATUS_SPECIAL_USER, ERROR_SPECIAL_USER); - cmp(STATUS_MEMBERS_PRIMARY_GROUP, ERROR_MEMBERS_PRIMARY_GROUP); - cmp(STATUS_TOKEN_ALREADY_IN_USE, ERROR_TOKEN_ALREADY_IN_USE); - cmp(STATUS_NO_SUCH_ALIAS, ERROR_NO_SUCH_ALIAS); - cmp(STATUS_MEMBER_NOT_IN_ALIAS, ERROR_MEMBER_NOT_IN_ALIAS); - cmp(STATUS_MEMBER_IN_ALIAS, ERROR_MEMBER_IN_ALIAS); - cmp(STATUS_ALIAS_EXISTS, ERROR_ALIAS_EXISTS); - cmp(STATUS_LOGON_NOT_GRANTED, ERROR_LOGON_NOT_GRANTED); - cmp(STATUS_TOO_MANY_SECRETS, ERROR_TOO_MANY_SECRETS); - cmp(STATUS_SECRET_TOO_LONG, ERROR_SECRET_TOO_LONG); - cmp(STATUS_INTERNAL_DB_ERROR, ERROR_INTERNAL_DB_ERROR); - cmp(STATUS_TOO_MANY_CONTEXT_IDS, ERROR_TOO_MANY_CONTEXT_IDS); - cmp(STATUS_LOGON_TYPE_NOT_GRANTED, ERROR_LOGON_TYPE_NOT_GRANTED); - cmp(STATUS_NT_CROSS_ENCRYPTION_REQUIRED, ERROR_NT_CROSS_ENCRYPTION_REQUIRED); - cmp(STATUS_NO_SUCH_MEMBER, ERROR_NO_SUCH_MEMBER); - cmp(STATUS_INVALID_MEMBER, ERROR_INVALID_MEMBER); - cmp(STATUS_TOO_MANY_SIDS, ERROR_TOO_MANY_SIDS); - cmp(STATUS_LM_CROSS_ENCRYPTION_REQUIRED, ERROR_LM_CROSS_ENCRYPTION_REQUIRED); - cmp(STATUS_MESSAGE_NOT_FOUND, ERROR_MR_MID_NOT_FOUND); - cmp2(STATUS_CONTROL_C_EXIT, ERROR_CONTROL_C_EXIT); - cmp(STATUS_LOCAL_DISCONNECT, ERROR_NETNAME_DELETED); - cmp(STATUS_REMOTE_DISCONNECT, ERROR_NETNAME_DELETED); - cmp(STATUS_REMOTE_RESOURCES, ERROR_REM_NOT_LIST); - cmp(STATUS_LINK_FAILED, ERROR_UNEXP_NET_ERR); - cmp(STATUS_LINK_TIMEOUT, ERROR_UNEXP_NET_ERR); - cmp(STATUS_INVALID_CONNECTION, ERROR_UNEXP_NET_ERR); - cmp(STATUS_INVALID_ADDRESS, ERROR_UNEXP_NET_ERR); - cmp2(STATUS_MISSING_SYSTEMFILE, ERROR_MISSING_SYSTEMFILE); - cmp2(STATUS_PAGEFILE_CREATE_FAILED, ERROR_PAGEFILE_CREATE_FAILED); - cmp2(STATUS_UNHANDLED_EXCEPTION, ERROR_UNHANDLED_EXCEPTION); - cmp2(STATUS_APP_INIT_FAILURE, ERROR_APP_INIT_FAILURE); - cmp2(STATUS_NO_PAGEFILE, ERROR_NO_PAGEFILE); - cmp2(STATUS_ILLEGAL_FLOAT_CONTEXT, ERROR_ILLEGAL_FLOAT_CONTEXT); - cmp2(STATUS_NO_EVENT_PAIR, ERROR_NO_EVENT_PAIR); - cmp2(STATUS_DOMAIN_CTRLR_CONFIG_ERROR, ERROR_DOMAIN_CTRLR_CONFIG_ERROR); - cmp(STATUS_IO_DEVICE_ERROR, ERROR_IO_DEVICE); - cmp(STATUS_DEVICE_PROTOCOL_ERROR, ERROR_IO_DEVICE); - cmp(STATUS_DRIVER_INTERNAL_ERROR, ERROR_IO_DEVICE); - cmp(STATUS_INVALID_DEVICE_STATE, ERROR_BAD_COMMAND); - cmp(STATUS_DEVICE_CONFIGURATION_ERROR, ERROR_INVALID_PARAMETER); - cmp2(STATUS_SOURCE_ELEMENT_EMPTY, ERROR_SOURCE_ELEMENT_EMPTY); - cmp2(STATUS_DESTINATION_ELEMENT_FULL, ERROR_DESTINATION_ELEMENT_FULL); - cmp2(STATUS_ILLEGAL_ELEMENT_ADDRESS, ERROR_ILLEGAL_ELEMENT_ADDRESS); - cmp2(STATUS_MAGAZINE_NOT_PRESENT, ERROR_MAGAZINE_NOT_PRESENT); - cmp2(STATUS_REINITIALIZATION_NEEDED, ERROR_DEVICE_REINITIALIZATION_NEEDED); - cmp2(STATUS_DEVICE_REQUIRES_CLEANING, ERROR_DEVICE_REQUIRES_CLEANING); - cmp2(STATUS_DEVICE_DOOR_OPEN, ERROR_DEVICE_DOOR_OPEN); - cmp2(STATUS_TRANSPORT_FULL, ERROR_TRANSPORT_FULL); - cmp2(STATUS_CLEANER_CARTRIDGE_INSTALLED, ERROR_CLEANER_CARTRIDGE_INSTALLED); - cmp2(STATUS_REG_NAT_CONSUMPTION, ERROR_REG_NAT_CONSUMPTION); - cmp4(STATUS_ENCRYPTION_FAILED, ERROR_ACCESS_DENIED, ERROR_ENCRYPTION_FAILED); - cmp4(STATUS_DECRYPTION_FAILED, ERROR_ACCESS_DENIED, ERROR_DECRYPTION_FAILED); - cmp4(STATUS_NO_RECOVERY_POLICY, ERROR_ACCESS_DENIED, ERROR_NO_RECOVERY_POLICY); - cmp4(STATUS_NO_EFS, ERROR_ACCESS_DENIED, ERROR_NO_EFS); - cmp4(STATUS_WRONG_EFS, ERROR_ACCESS_DENIED, ERROR_WRONG_EFS); - cmp4(STATUS_NO_USER_KEYS, ERROR_ACCESS_DENIED, ERROR_NO_USER_KEYS); - cmp2(STATUS_FILE_NOT_ENCRYPTED, ERROR_FILE_NOT_ENCRYPTED); - cmp2(STATUS_NOT_EXPORT_FORMAT, ERROR_NOT_EXPORT_FORMAT); - cmp2(STATUS_FILE_ENCRYPTED, ERROR_FILE_ENCRYPTED); - cmp2(STATUS_EFS_ALG_BLOB_TOO_BIG, ERROR_EFS_ALG_BLOB_TOO_BIG); - cmp(STATUS_INVALID_USER_BUFFER, ERROR_INVALID_USER_BUFFER); - cmp(STATUS_SERIAL_NO_DEVICE_INITED, ERROR_SERIAL_NO_DEVICE); - cmp(STATUS_SHARED_IRQ_BUSY, ERROR_IRQ_BUSY); - cmp(STATUS_SERIAL_MORE_WRITES, ERROR_MORE_WRITES); - cmp(STATUS_SERIAL_COUNTER_TIMEOUT, ERROR_COUNTER_TIMEOUT); - cmp(STATUS_FLOPPY_ID_MARK_NOT_FOUND, ERROR_FLOPPY_ID_MARK_NOT_FOUND); - cmp(STATUS_FLOPPY_WRONG_CYLINDER, ERROR_FLOPPY_WRONG_CYLINDER); - cmp(STATUS_FLOPPY_UNKNOWN_ERROR, ERROR_FLOPPY_UNKNOWN_ERROR); - cmp(STATUS_FLOPPY_BAD_REGISTERS, ERROR_FLOPPY_BAD_REGISTERS); - cmp(STATUS_DISK_RECALIBRATE_FAILED, ERROR_DISK_RECALIBRATE_FAILED); - cmp(STATUS_DISK_OPERATION_FAILED, ERROR_DISK_OPERATION_FAILED); - cmp(STATUS_DISK_RESET_FAILED, ERROR_DISK_RESET_FAILED); - cmp(STATUS_EVENTLOG_FILE_CORRUPT, ERROR_EVENTLOG_FILE_CORRUPT); - cmp(STATUS_EVENTLOG_CANT_START, ERROR_EVENTLOG_CANT_START); - cmp(STATUS_NETLOGON_NOT_STARTED, ERROR_NETLOGON_NOT_STARTED); - cmp(STATUS_ACCOUNT_EXPIRED, ERROR_ACCOUNT_EXPIRED); - cmp(STATUS_NETWORK_CREDENTIAL_CONFLICT, ERROR_SESSION_CREDENTIAL_CONFLICT); - cmp(STATUS_REMOTE_SESSION_LIMIT, ERROR_REMOTE_SESSION_LIMIT_EXCEEDED); - cmp(STATUS_INVALID_BUFFER_SIZE, ERROR_INVALID_USER_BUFFER); - cmp(STATUS_INVALID_ADDRESS_COMPONENT, ERROR_INVALID_NETNAME); - cmp(STATUS_INVALID_ADDRESS_WILDCARD, ERROR_INVALID_NETNAME); - cmp(STATUS_ADDRESS_ALREADY_EXISTS, ERROR_DUP_NAME); - cmp(STATUS_ADDRESS_CLOSED, ERROR_NETNAME_DELETED); - cmp(STATUS_CONNECTION_DISCONNECTED, ERROR_NETNAME_DELETED); - cmp(STATUS_CONNECTION_RESET, ERROR_NETNAME_DELETED); - cmp(STATUS_TRANSACTION_ABORTED, ERROR_UNEXP_NET_ERR); - cmp(STATUS_TRANSACTION_TIMED_OUT, ERROR_UNEXP_NET_ERR); - cmp(STATUS_TRANSACTION_NO_RELEASE, ERROR_UNEXP_NET_ERR); - cmp(STATUS_TRANSACTION_NO_MATCH, ERROR_UNEXP_NET_ERR); - cmp(STATUS_TRANSACTION_RESPONDED, ERROR_UNEXP_NET_ERR); - cmp(STATUS_TRANSACTION_INVALID_ID, ERROR_UNEXP_NET_ERR); - cmp(STATUS_TRANSACTION_INVALID_TYPE, ERROR_UNEXP_NET_ERR); - cmp(STATUS_NOT_SERVER_SESSION, ERROR_NOT_SUPPORTED); - cmp(STATUS_NOT_CLIENT_SESSION, ERROR_NOT_SUPPORTED); - cmp(STATUS_USER_MAPPED_FILE, ERROR_USER_MAPPED_FILE); - cmp(STATUS_PLUGPLAY_NO_DEVICE, ERROR_SERVICE_DISABLED); - cmp2(STATUS_WMI_GUID_NOT_FOUND, ERROR_WMI_GUID_NOT_FOUND); - cmp2(STATUS_WMI_INSTANCE_NOT_FOUND, ERROR_WMI_INSTANCE_NOT_FOUND); - cmp2(STATUS_WMI_ITEMID_NOT_FOUND, ERROR_WMI_ITEMID_NOT_FOUND); - cmp2(STATUS_WMI_TRY_AGAIN, ERROR_WMI_TRY_AGAIN); - cmp2(STATUS_WMI_READ_ONLY, ERROR_WMI_READ_ONLY); - cmp2(STATUS_WMI_SET_FAILURE, ERROR_WMI_SET_FAILURE); - cmp2(STATUS_WMI_NOT_SUPPORTED, ERROR_NOT_SUPPORTED); - cmp2(STATUS_WMI_GUID_DISCONNECTED, ERROR_WMI_GUID_DISCONNECTED); - cmp2(STATUS_WMI_ALREADY_DISABLED, ERROR_WMI_ALREADY_DISABLED); - cmp2(STATUS_WMI_ALREADY_ENABLED, ERROR_WMI_ALREADY_ENABLED); - cmp2(STATUS_COPY_PROTECTION_FAILURE, STG_E_STATUS_COPY_PROTECTION_FAILURE); - cmp2(STATUS_CSS_AUTHENTICATION_FAILURE, STG_E_CSS_AUTHENTICATION_FAILURE); - cmp2(STATUS_CSS_KEY_NOT_PRESENT, STG_E_CSS_KEY_NOT_PRESENT); - cmp2(STATUS_CSS_KEY_NOT_ESTABLISHED, STG_E_CSS_KEY_NOT_ESTABLISHED); - cmp2(STATUS_CSS_SCRAMBLED_SECTOR, STG_E_CSS_SCRAMBLED_SECTOR); - cmp2(STATUS_CSS_REGION_MISMATCH, STG_E_CSS_REGION_MISMATCH); - cmp2(STATUS_CSS_RESETS_EXHAUSTED, STG_E_RESETS_EXHAUSTED); - cmp(RPC_NT_SERVER_UNAVAILABLE, RPC_S_SERVER_UNAVAILABLE); - cmp(RPC_NT_INVALID_STRING_BINDING, RPC_S_INVALID_STRING_BINDING); - cmp(RPC_NT_WRONG_KIND_OF_BINDING, RPC_S_WRONG_KIND_OF_BINDING); - cmp(RPC_NT_PROTSEQ_NOT_SUPPORTED, RPC_S_PROTSEQ_NOT_SUPPORTED); - cmp(RPC_NT_INVALID_RPC_PROTSEQ, RPC_S_INVALID_RPC_PROTSEQ); - cmp(RPC_NT_INVALID_STRING_UUID, RPC_S_INVALID_STRING_UUID); - cmp(RPC_NT_INVALID_ENDPOINT_FORMAT, RPC_S_INVALID_ENDPOINT_FORMAT); - cmp(RPC_NT_INVALID_NET_ADDR, RPC_S_INVALID_NET_ADDR); - cmp(RPC_NT_NO_ENDPOINT_FOUND, RPC_S_NO_ENDPOINT_FOUND); - cmp(RPC_NT_INVALID_TIMEOUT, RPC_S_INVALID_TIMEOUT); - cmp(RPC_NT_OBJECT_NOT_FOUND, RPC_S_OBJECT_NOT_FOUND); - cmp(RPC_NT_ALREADY_REGISTERED, RPC_S_ALREADY_REGISTERED); - cmp(RPC_NT_TYPE_ALREADY_REGISTERED, RPC_S_TYPE_ALREADY_REGISTERED); - cmp(RPC_NT_ALREADY_LISTENING, RPC_S_ALREADY_LISTENING); - cmp(RPC_NT_NO_PROTSEQS_REGISTERED, RPC_S_NO_PROTSEQS_REGISTERED); - cmp(RPC_NT_NOT_LISTENING, RPC_S_NOT_LISTENING); - cmp(RPC_NT_UNKNOWN_MGR_TYPE, RPC_S_UNKNOWN_MGR_TYPE); - cmp(RPC_NT_UNKNOWN_IF, RPC_S_UNKNOWN_IF); - cmp(RPC_NT_NO_BINDINGS, RPC_S_NO_BINDINGS); - cmp(RPC_NT_NO_MORE_BINDINGS, RPC_S_NO_MORE_BINDINGS); - cmp(RPC_NT_NO_PROTSEQS, RPC_S_NO_PROTSEQS); - cmp(RPC_NT_CANT_CREATE_ENDPOINT, RPC_S_CANT_CREATE_ENDPOINT); - cmp(RPC_NT_OUT_OF_RESOURCES, RPC_S_OUT_OF_RESOURCES); - cmp(RPC_NT_SERVER_TOO_BUSY, RPC_S_SERVER_TOO_BUSY); - cmp(RPC_NT_INVALID_NETWORK_OPTIONS, RPC_S_INVALID_NETWORK_OPTIONS); - cmp(RPC_NT_NO_CALL_ACTIVE, RPC_S_NO_CALL_ACTIVE); - cmp(RPC_NT_CALL_FAILED, RPC_S_CALL_FAILED); - cmp(RPC_NT_CALL_FAILED_DNE, RPC_S_CALL_FAILED_DNE); - cmp(RPC_NT_PROTOCOL_ERROR, RPC_S_PROTOCOL_ERROR); - cmp(RPC_NT_UNSUPPORTED_TRANS_SYN, RPC_S_UNSUPPORTED_TRANS_SYN); - cmp(RPC_NT_UNSUPPORTED_TYPE, RPC_S_UNSUPPORTED_TYPE); - cmp(RPC_NT_INVALID_TAG, RPC_S_INVALID_TAG); - cmp(RPC_NT_INVALID_BOUND, RPC_S_INVALID_BOUND); - cmp(RPC_NT_NO_ENTRY_NAME, RPC_S_NO_ENTRY_NAME); - cmp(RPC_NT_INVALID_NAME_SYNTAX, RPC_S_INVALID_NAME_SYNTAX); - cmp(RPC_NT_UNSUPPORTED_NAME_SYNTAX, RPC_S_UNSUPPORTED_NAME_SYNTAX); - cmp(RPC_NT_UUID_NO_ADDRESS, RPC_S_UUID_NO_ADDRESS); - cmp(RPC_NT_DUPLICATE_ENDPOINT, RPC_S_DUPLICATE_ENDPOINT); - cmp(RPC_NT_UNKNOWN_AUTHN_TYPE, RPC_S_UNKNOWN_AUTHN_TYPE); - cmp(RPC_NT_MAX_CALLS_TOO_SMALL, RPC_S_MAX_CALLS_TOO_SMALL); - cmp(RPC_NT_STRING_TOO_LONG, RPC_S_STRING_TOO_LONG); - cmp(RPC_NT_PROTSEQ_NOT_FOUND, RPC_S_PROTSEQ_NOT_FOUND); - cmp(RPC_NT_PROCNUM_OUT_OF_RANGE, RPC_S_PROCNUM_OUT_OF_RANGE); - cmp(RPC_NT_BINDING_HAS_NO_AUTH, RPC_S_BINDING_HAS_NO_AUTH); - cmp(RPC_NT_UNKNOWN_AUTHN_SERVICE, RPC_S_UNKNOWN_AUTHN_SERVICE); - cmp(RPC_NT_UNKNOWN_AUTHN_LEVEL, RPC_S_UNKNOWN_AUTHN_LEVEL); - cmp(RPC_NT_INVALID_AUTH_IDENTITY, RPC_S_INVALID_AUTH_IDENTITY); - cmp(RPC_NT_UNKNOWN_AUTHZ_SERVICE, RPC_S_UNKNOWN_AUTHZ_SERVICE); - cmp(EPT_NT_INVALID_ENTRY, EPT_S_INVALID_ENTRY); - cmp(EPT_NT_CANT_PERFORM_OP, EPT_S_CANT_PERFORM_OP); - cmp(EPT_NT_NOT_REGISTERED, EPT_S_NOT_REGISTERED); - cmp(RPC_NT_NOTHING_TO_EXPORT, RPC_S_NOTHING_TO_EXPORT); - cmp(RPC_NT_INCOMPLETE_NAME, RPC_S_INCOMPLETE_NAME); - cmp(RPC_NT_INVALID_VERS_OPTION, RPC_S_INVALID_VERS_OPTION); - cmp(RPC_NT_NO_MORE_MEMBERS, RPC_S_NO_MORE_MEMBERS); - cmp(RPC_NT_NOT_ALL_OBJS_UNEXPORTED, RPC_S_NOT_ALL_OBJS_UNEXPORTED); - cmp(RPC_NT_INTERFACE_NOT_FOUND, RPC_S_INTERFACE_NOT_FOUND); - cmp(RPC_NT_ENTRY_ALREADY_EXISTS, RPC_S_ENTRY_ALREADY_EXISTS); - cmp(RPC_NT_ENTRY_NOT_FOUND, RPC_S_ENTRY_NOT_FOUND); - cmp(RPC_NT_NAME_SERVICE_UNAVAILABLE, RPC_S_NAME_SERVICE_UNAVAILABLE); - cmp(RPC_NT_INVALID_NAF_ID, RPC_S_INVALID_NAF_ID); - cmp(RPC_NT_CANNOT_SUPPORT, RPC_S_CANNOT_SUPPORT); - cmp(RPC_NT_NO_CONTEXT_AVAILABLE, RPC_S_NO_CONTEXT_AVAILABLE); - cmp(RPC_NT_INTERNAL_ERROR, RPC_S_INTERNAL_ERROR); - cmp(RPC_NT_ZERO_DIVIDE, RPC_S_ZERO_DIVIDE); - cmp(RPC_NT_ADDRESS_ERROR, RPC_S_ADDRESS_ERROR); - cmp(RPC_NT_FP_DIV_ZERO, RPC_S_FP_DIV_ZERO); - cmp(RPC_NT_FP_UNDERFLOW, RPC_S_FP_UNDERFLOW); - cmp(RPC_NT_FP_OVERFLOW, RPC_S_FP_OVERFLOW); - cmp(RPC_NT_NO_MORE_ENTRIES, RPC_X_NO_MORE_ENTRIES); - cmp(RPC_NT_SS_CHAR_TRANS_OPEN_FAIL, RPC_X_SS_CHAR_TRANS_OPEN_FAIL); - cmp(RPC_NT_SS_CHAR_TRANS_SHORT_FILE, RPC_X_SS_CHAR_TRANS_SHORT_FILE); - cmp(RPC_NT_SS_CONTEXT_MISMATCH, ERROR_INVALID_HANDLE); - cmp(RPC_NT_SS_CONTEXT_DAMAGED, RPC_X_SS_CONTEXT_DAMAGED); - cmp(RPC_NT_SS_HANDLES_MISMATCH, RPC_X_SS_HANDLES_MISMATCH); - cmp(RPC_NT_SS_CANNOT_GET_CALL_HANDLE, RPC_X_SS_CANNOT_GET_CALL_HANDLE); - cmp(RPC_NT_NULL_REF_POINTER, RPC_X_NULL_REF_POINTER); - cmp(RPC_NT_ENUM_VALUE_OUT_OF_RANGE, RPC_X_ENUM_VALUE_OUT_OF_RANGE); - cmp(RPC_NT_BYTE_COUNT_TOO_SMALL, RPC_X_BYTE_COUNT_TOO_SMALL); - cmp(RPC_NT_BAD_STUB_DATA, RPC_X_BAD_STUB_DATA); - cmp(RPC_NT_INVALID_OBJECT, RPC_S_INVALID_OBJECT); - cmp(STATUS_NO_TRUST_LSA_SECRET, ERROR_NO_TRUST_LSA_SECRET); - cmp(STATUS_NO_TRUST_SAM_ACCOUNT, ERROR_NO_TRUST_SAM_ACCOUNT); - cmp(STATUS_TRUSTED_DOMAIN_FAILURE, ERROR_TRUSTED_DOMAIN_FAILURE); - cmp(STATUS_TRUSTED_RELATIONSHIP_FAILURE, ERROR_TRUSTED_RELATIONSHIP_FAILURE); - cmp(STATUS_TRUST_FAILURE, ERROR_TRUST_FAILURE); - cmp(RPC_NT_CALL_IN_PROGRESS, RPC_S_CALL_IN_PROGRESS); - cmp(STATUS_LOG_FILE_FULL, ERROR_LOG_FILE_FULL); - cmp(STATUS_EVENTLOG_FILE_CHANGED, ERROR_EVENTLOG_FILE_CHANGED); - cmp(STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT, ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT); - cmp(STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT, ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT); - cmp(STATUS_NOLOGON_SERVER_TRUST_ACCOUNT, ERROR_NOLOGON_SERVER_TRUST_ACCOUNT); - cmp(STATUS_DOMAIN_TRUST_INCONSISTENT, ERROR_DOMAIN_TRUST_INCONSISTENT); - cmp(STATUS_NO_USER_SESSION_KEY, ERROR_NO_USER_SESSION_KEY); - cmp(STATUS_POSSIBLE_DEADLOCK, ERROR_POSSIBLE_DEADLOCK); - cmp(STATUS_IMAGE_ALREADY_LOADED, ERROR_SERVICE_ALREADY_RUNNING); - cmp(RPC_NT_GROUP_MEMBER_NOT_FOUND, RPC_S_GROUP_MEMBER_NOT_FOUND); - cmp(RPC_NT_NO_INTERFACES, RPC_S_NO_INTERFACES); - cmp(RPC_NT_CALL_CANCELLED, RPC_S_CALL_CANCELLED); - cmp(RPC_NT_BINDING_INCOMPLETE, RPC_S_BINDING_INCOMPLETE); - cmp(RPC_NT_COMM_FAILURE, RPC_S_COMM_FAILURE); - cmp(RPC_NT_UNSUPPORTED_AUTHN_LEVEL, RPC_S_UNSUPPORTED_AUTHN_LEVEL); - cmp(RPC_NT_NO_PRINC_NAME, RPC_S_NO_PRINC_NAME); - cmp(RPC_NT_NOT_RPC_ERROR, RPC_S_NOT_RPC_ERROR); - cmp(RPC_NT_UUID_LOCAL_ONLY, RPC_S_UUID_LOCAL_ONLY); - cmp(RPC_NT_SEC_PKG_ERROR, RPC_S_SEC_PKG_ERROR); - cmp(RPC_NT_NOT_CANCELLED, RPC_S_NOT_CANCELLED); - cmp(RPC_NT_INVALID_ES_ACTION, RPC_X_INVALID_ES_ACTION); - cmp(RPC_NT_WRONG_ES_VERSION, RPC_X_WRONG_ES_VERSION); - cmp(RPC_NT_WRONG_STUB_VERSION, RPC_X_WRONG_STUB_VERSION); - cmp(RPC_NT_INVALID_PIPE_OBJECT, RPC_X_INVALID_PIPE_OBJECT); - cmp(RPC_NT_INVALID_PIPE_OPERATION, RPC_X_INVALID_PIPE_OPERATION); - cmp(RPC_NT_WRONG_PIPE_VERSION, RPC_X_WRONG_PIPE_VERSION); - cmp(EPT_NT_CANT_CREATE, EPT_S_CANT_CREATE); - cmp(RPC_NT_SEND_INCOMPLETE, RPC_S_SEND_INCOMPLETE); - cmp2(RPC_NT_INVALID_ASYNC_HANDLE, RPC_S_INVALID_ASYNC_HANDLE); - cmp2(RPC_NT_INVALID_ASYNC_CALL, RPC_S_INVALID_ASYNC_CALL); - cmp2(RPC_NT_PIPE_CLOSED, RPC_X_PIPE_CLOSED); - cmp2(RPC_NT_PIPE_EMPTY, RPC_X_PIPE_EMPTY); - cmp2(RPC_NT_PIPE_DISCIPLINE_ERROR, RPC_X_PIPE_DISCIPLINE_ERROR); - cmp(STATUS_NO_BROWSER_SERVERS_FOUND, ERROR_NO_BROWSER_SERVERS_FOUND); - cmp(STATUS_MAPPED_ALIGNMENT, ERROR_MAPPED_ALIGNMENT); - cmp(STATUS_CONNECTION_IN_USE, ERROR_DEVICE_IN_USE); - cmp(STATUS_VERIFY_REQUIRED, ERROR_MEDIA_CHANGED); - cmp(STATUS_ALREADY_DISCONNECTED, ERROR_ACTIVE_CONNECTIONS); - cmp(STATUS_CONNECTION_REFUSED, ERROR_CONNECTION_REFUSED); - cmp(STATUS_GRACEFUL_DISCONNECT, ERROR_GRACEFUL_DISCONNECT); - cmp(STATUS_ADDRESS_ALREADY_ASSOCIATED, ERROR_ADDRESS_ALREADY_ASSOCIATED); - cmp(STATUS_ADDRESS_NOT_ASSOCIATED, ERROR_ADDRESS_NOT_ASSOCIATED); - cmp(STATUS_CONNECTION_INVALID, ERROR_CONNECTION_INVALID); - cmp(STATUS_CONNECTION_ACTIVE, ERROR_CONNECTION_ACTIVE); - cmp(STATUS_NETWORK_UNREACHABLE, ERROR_NETWORK_UNREACHABLE); - cmp(STATUS_HOST_UNREACHABLE, ERROR_HOST_UNREACHABLE); - cmp2(STATUS_HOST_DOWN, ERROR_HOST_DOWN); - cmp(STATUS_PROTOCOL_UNREACHABLE, ERROR_PROTOCOL_UNREACHABLE); - cmp(STATUS_PORT_UNREACHABLE, ERROR_PORT_UNREACHABLE); - cmp(STATUS_REQUEST_ABORTED, ERROR_REQUEST_ABORTED); - cmp(STATUS_CONNECTION_ABORTED, ERROR_CONNECTION_ABORTED); - cmp(STATUS_CONNECTION_COUNT_LIMIT, ERROR_CONNECTION_COUNT_LIMIT); - cmp(STATUS_PATH_NOT_COVERED, ERROR_HOST_UNREACHABLE); - cmp(STATUS_LOGIN_TIME_RESTRICTION, ERROR_LOGIN_TIME_RESTRICTION); - cmp(STATUS_LOGIN_WKSTA_RESTRICTION, ERROR_LOGIN_WKSTA_RESTRICTION); - cmp(STATUS_LICENSE_QUOTA_EXCEEDED, ERROR_LICENSE_QUOTA_EXCEEDED); - cmp(STATUS_RESOURCE_NOT_OWNED, ERROR_NOT_OWNER); - cmp3(STATUS_DUPLICATE_OBJECTID, ERROR_OBJECT_ALREADY_EXISTS, STATUS_DUPLICATE_OBJECTID); - cmp3(STATUS_OBJECTID_EXISTS, ERROR_OBJECT_ALREADY_EXISTS, STATUS_OBJECTID_EXISTS); - cmp2(STATUS_OBJECTID_NOT_FOUND, ERROR_FILE_NOT_FOUND); - cmp2(STATUS_MFT_TOO_FRAGMENTED, ERROR_DISK_TOO_FRAGMENTED); - cmp(SEC_E_INSUFFICIENT_MEMORY, ERROR_NO_SYSTEM_RESOURCES); - cmp(SEC_E_INVALID_HANDLE, ERROR_INVALID_HANDLE); - cmp(SEC_E_UNSUPPORTED_FUNCTION, ERROR_INVALID_FUNCTION); - cmp(SEC_E_TARGET_UNKNOWN, ERROR_BAD_NETPATH); - cmp(SEC_E_INTERNAL_ERROR, ERROR_INTERNAL_ERROR); - cmp(SEC_E_SECPKG_NOT_FOUND, ERROR_NO_SUCH_PACKAGE); - cmp(SEC_E_NOT_OWNER, ERROR_NOT_OWNER); - cmp(SEC_E_CANNOT_INSTALL, ERROR_NO_SUCH_PACKAGE); - cmp(SEC_E_INVALID_TOKEN, ERROR_INVALID_PARAMETER); - cmp(SEC_E_CANNOT_PACK, ERROR_INVALID_PARAMETER); - cmp(SEC_E_QOP_NOT_SUPPORTED, ERROR_NOT_SUPPORTED); - cmp(SEC_E_NO_IMPERSONATION, ERROR_CANNOT_IMPERSONATE); - cmp2(SEC_E_MULTIPLE_ACCOUNTS, ERROR_CANNOT_IMPERSONATE); - cmp(SEC_E_LOGON_DENIED, ERROR_LOGON_FAILURE); - cmp(SEC_E_UNKNOWN_CREDENTIALS, ERROR_INVALID_PARAMETER); - cmp2(SEC_E_INCOMPLETE_CREDENTIALS, ERROR_INVALID_PARAMETER); - cmp(SEC_E_NO_CREDENTIALS, ERROR_NO_SUCH_LOGON_SESSION); - cmp(SEC_E_MESSAGE_ALTERED, ERROR_ACCESS_DENIED); - cmp(SEC_E_OUT_OF_SEQUENCE, ERROR_ACCESS_DENIED); - cmp(SEC_E_NO_AUTHENTICATING_AUTHORITY, ERROR_NO_LOGON_SERVERS); - cmp(SEC_E_BAD_PKGID, ERROR_NO_SUCH_PACKAGE); - cmp4(SEC_E_WRONG_PRINCIPAL, ERROR_WRONG_TARGET_NAME, 1462); - cmp2(SEC_E_INCOMPLETE_MESSAGE, ERROR_INVALID_USER_BUFFER); - cmp2(SEC_E_BUFFER_TOO_SMALL, ERROR_INSUFFICIENT_BUFFER); - cmp2(SEC_E_UNTRUSTED_ROOT, ERROR_TRUST_FAILURE); - cmp2(SEC_E_ILLEGAL_MESSAGE, ERROR_INVALID_PARAMETER); - cmp2(SEC_E_CERT_UNKNOWN, ERROR_INVALID_PARAMETER); - cmp2(SEC_E_CERT_EXPIRED, ERROR_PASSWORD_EXPIRED); - cmp2(SEC_E_ENCRYPT_FAILURE, ERROR_ENCRYPTION_FAILED); - cmp2(SEC_E_DECRYPT_FAILURE, ERROR_DECRYPTION_FAILED); - cmp2(SEC_E_ALGORITHM_MISMATCH, ERROR_INVALID_FUNCTION); - cmp2(SEC_E_CONTEXT_EXPIRED, ERROR_CONTEXT_EXPIRED); - cmp2(STATUS_BAD_BINDINGS, SEC_E_BAD_BINDINGS); - cmp2(TRUST_E_CERT_SIGNATURE, ERROR_MUTUAL_AUTH_FAILED); - cmp2(CRYPT_E_REVOKED, ERROR_MUTUAL_AUTH_FAILED); - cmp2(CRYPT_E_NO_REVOCATION_CHECK, ERROR_MUTUAL_AUTH_FAILED); - cmp2(CRYPT_E_REVOCATION_OFFLINE, ERROR_MUTUAL_AUTH_FAILED); - cmp2(STATUS_SHUTDOWN_IN_PROGRESS, ERROR_SHUTDOWN_IN_PROGRESS); - cmp2(STATUS_SERVER_SHUTDOWN_IN_PROGRESS, ERROR_SERVER_SHUTDOWN_IN_PROGRESS); - cmp4(STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY, ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY, 1922); - cmp4(STATUS_DS_NO_ATTRIBUTE_OR_VALUE, ERROR_DS_NO_ATTRIBUTE_OR_VALUE, 1923); - cmp4(STATUS_DS_INVALID_ATTRIBUTE_SYNTAX, ERROR_DS_INVALID_ATTRIBUTE_SYNTAX, 1924); - cmp4(STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED, ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED, 1925); - cmp4(STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS, ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS, 1926); - cmp4(STATUS_DS_BUSY, ERROR_DS_BUSY, 1927); - cmp4(STATUS_DS_UNAVAILABLE, ERROR_DS_UNAVAILABLE, 1928); - cmp4(STATUS_DS_NO_RIDS_ALLOCATED, ERROR_DS_NO_RIDS_ALLOCATED, 1929); - cmp4(STATUS_DS_NO_MORE_RIDS, ERROR_DS_NO_MORE_RIDS, 1930); - cmp4(STATUS_DS_INCORRECT_ROLE_OWNER, ERROR_DS_INCORRECT_ROLE_OWNER, 1931); - cmp4(STATUS_DS_RIDMGR_INIT_ERROR, ERROR_DS_RIDMGR_INIT_ERROR, 1932); - cmp4(STATUS_DS_OBJ_CLASS_VIOLATION, ERROR_DS_OBJ_CLASS_VIOLATION, 1933); - cmp4(STATUS_DS_CANT_ON_NON_LEAF, ERROR_DS_CANT_ON_NON_LEAF, 1934); - cmp4(STATUS_DS_CANT_ON_RDN, ERROR_DS_CANT_ON_RDN, 1935); - cmp4(STATUS_DS_CROSS_DOM_MOVE_FAILED, ERROR_DS_CROSS_DOM_MOVE_ERROR, 1937); - cmp4(STATUS_DS_GC_NOT_AVAILABLE, ERROR_DS_GC_NOT_AVAILABLE, 1938); - cmp2(STATUS_DS_CANT_MOD_OBJ_CLASS, ERROR_DS_CANT_MOD_OBJ_CLASS); - cmp2(STATUS_DS_ADMIN_LIMIT_EXCEEDED, ERROR_DS_ADMIN_LIMIT_EXCEEDED); - cmp2(STATUS_DIRECTORY_SERVICE_REQUIRED, ERROR_DS_DS_REQUIRED); - cmp2(STATUS_DS_SAM_INIT_FAILURE, ERROR_DS_SAM_INIT_FAILURE); - cmp2(STATUS_DS_CANT_START, ERROR_DS_CANT_START); - cmp2(STATUS_DS_INIT_FAILURE, ERROR_DS_INIT_FAILURE); - cmp2(STATUS_SAM_INIT_FAILURE, ERROR_SAM_INIT_FAILURE); - cmp2(STATUS_DS_SENSITIVE_GROUP_VIOLATION, ERROR_DS_SENSITIVE_GROUP_VIOLATION); - cmp2(STATUS_DS_CANT_MOD_PRIMARYGROUPID, ERROR_DS_CANT_MOD_PRIMARYGROUPID); - cmp2(STATUS_DS_INVALID_GROUP_TYPE, ERROR_DS_INVALID_GROUP_TYPE); - cmp2(STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN, ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN); - cmp2(STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN, ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN); - cmp2(STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER, ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER); - cmp2(STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER, ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER); - cmp2(STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER, ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER); - cmp2(STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER, ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER); - cmp2(STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER, ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER); - cmp2(STATUS_DS_HAVE_PRIMARY_MEMBERS, ERROR_DS_HAVE_PRIMARY_MEMBERS); - cmp2(STATUS_DS_GC_REQUIRED, ERROR_DS_GC_REQUIRED); - cmp2(STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY, ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY); - cmp2(STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS, ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS); - cmp2(STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED,ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED); - cmp2(STATUS_SAM_NEED_BOOTKEY_PASSWORD, ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD); - cmp2(STATUS_SAM_NEED_BOOTKEY_FLOPPY, ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY); - cmp2(STATUS_DS_INIT_FAILURE_CONSOLE, ERROR_DS_INIT_FAILURE_CONSOLE); - cmp2(STATUS_DS_SAM_INIT_FAILURE_CONSOLE, ERROR_DS_SAM_INIT_FAILURE_CONSOLE); - cmp2(STATUS_UNFINISHED_CONTEXT_DELETED, SEC_E_UNFINISHED_CONTEXT_DELETED); - cmp2(STATUS_NO_TGT_REPLY, SEC_E_NO_TGT_REPLY); - cmp2(STATUS_NO_IP_ADDRESSES, SEC_E_NO_IP_ADDRESSES); - cmp2(STATUS_WRONG_CREDENTIAL_HANDLE, SEC_E_WRONG_CREDENTIAL_HANDLE); - cmp2(STATUS_CRYPTO_SYSTEM_INVALID, SEC_E_CRYPTO_SYSTEM_INVALID); - cmp2(STATUS_MAX_REFERRALS_EXCEEDED, SEC_E_MAX_REFERRALS_EXCEEDED); - cmp2(STATUS_MUST_BE_KDC, SEC_E_MUST_BE_KDC); - cmp2(STATUS_STRONG_CRYPTO_NOT_SUPPORTED, SEC_E_STRONG_CRYPTO_NOT_SUPPORTED); - cmp2(STATUS_TOO_MANY_PRINCIPALS, SEC_E_TOO_MANY_PRINCIPALS); - cmp2(STATUS_NO_PA_DATA, SEC_E_NO_PA_DATA); - cmp2(STATUS_PKINIT_NAME_MISMATCH, SEC_E_PKINIT_NAME_MISMATCH); - cmp2(STATUS_SMARTCARD_LOGON_REQUIRED, SEC_E_SMARTCARD_LOGON_REQUIRED); - cmp2(STATUS_KDC_INVALID_REQUEST, SEC_E_KDC_INVALID_REQUEST); - cmp2(STATUS_KDC_UNABLE_TO_REFER, SEC_E_KDC_UNABLE_TO_REFER); - cmp2(STATUS_KDC_UNKNOWN_ETYPE, SEC_E_KDC_UNKNOWN_ETYPE); - cmp2(STATUS_UNSUPPORTED_PREAUTH, SEC_E_UNSUPPORTED_PREAUTH); - cmp4(STATUS_SHARED_POLICY, ERROR_SHARED_POLICY, 1939); - cmp4(STATUS_POLICY_OBJECT_NOT_FOUND, ERROR_POLICY_OBJECT_NOT_FOUND, 1940); - cmp4(STATUS_POLICY_ONLY_IN_DS, ERROR_POLICY_ONLY_IN_DS, 1941); - cmp4(STATUS_DEVICE_REMOVED, ERROR_DEVICE_REMOVED, 617); - cmp2(STATUS_RETRY, ERROR_RETRY); - cmp2(STATUS_NOT_SUPPORTED_ON_SBS, ERROR_NOT_SUPPORTED_ON_SBS); - cmp2(STATUS_DRIVER_BLOCKED_CRITICAL, ERROR_DRIVER_BLOCKED); - cmp2(STATUS_DRIVER_BLOCKED, ERROR_DRIVER_BLOCKED); - cmp2(STATUS_PRENT4_MACHINE_ACCOUNT, ERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4); - cmp2(STATUS_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER,ERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER); - cmp2(STATUS_DS_SHUTTING_DOWN, ERROR_DS_SHUTTING_DOWN); - cmp2(STATUS_ACCESS_DISABLED_BY_POLICY_DEFAULT, ERROR_ACCESS_DISABLED_BY_POLICY); - cmp2(STATUS_ACCESS_DISABLED_BY_POLICY_PATH, ERROR_ACCESS_DISABLED_BY_POLICY); - cmp2(STATUS_ACCESS_DISABLED_BY_POLICY_PUBLISHER, ERROR_ACCESS_DISABLED_BY_POLICY); - cmp2(STATUS_ACCESS_DISABLED_BY_POLICY_OTHER, ERROR_ACCESS_DISABLED_BY_POLICY); - cmp2(STATUS_FAIL_CHECK, ERROR_INVALID_PARAMETER); - cmp2(STATUS_CTX_CLOSE_PENDING, ERROR_CTX_CLOSE_PENDING); - cmp2(STATUS_CTX_NO_OUTBUF, ERROR_CTX_NO_OUTBUF); - cmp2(STATUS_CTX_MODEM_INF_NOT_FOUND, ERROR_CTX_MODEM_INF_NOT_FOUND); - cmp2(STATUS_CTX_INVALID_MODEMNAME, ERROR_CTX_INVALID_MODEMNAME); - cmp2(STATUS_CTX_RESPONSE_ERROR, ERROR_CTX_MODEM_RESPONSE_ERROR); - cmp2(STATUS_CTX_MODEM_RESPONSE_TIMEOUT, ERROR_CTX_MODEM_RESPONSE_TIMEOUT); - cmp2(STATUS_CTX_MODEM_RESPONSE_NO_CARRIER, ERROR_CTX_MODEM_RESPONSE_NO_CARRIER); - cmp2(STATUS_CTX_MODEM_RESPONSE_NO_DIALTONE, ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE); - cmp2(STATUS_CTX_MODEM_RESPONSE_BUSY, ERROR_CTX_MODEM_RESPONSE_BUSY); - cmp2(STATUS_CTX_MODEM_RESPONSE_VOICE, ERROR_CTX_MODEM_RESPONSE_VOICE); - cmp2(STATUS_CTX_TD_ERROR, ERROR_CTX_TD_ERROR); - cmp2(STATUS_CTX_WINSTATION_NAME_INVALID, ERROR_CTX_WINSTATION_NAME_INVALID); - cmp2(STATUS_CTX_WINSTATION_NOT_FOUND, ERROR_CTX_WINSTATION_NOT_FOUND); - cmp2(STATUS_CTX_WINSTATION_NAME_COLLISION, ERROR_CTX_WINSTATION_ALREADY_EXISTS); - cmp2(STATUS_CTX_WINSTATION_BUSY, ERROR_CTX_WINSTATION_BUSY); - cmp2(STATUS_CTX_GRAPHICS_INVALID, ERROR_CTX_GRAPHICS_INVALID); - cmp2(STATUS_CTX_BAD_VIDEO_MODE, ERROR_CTX_BAD_VIDEO_MODE); - cmp2(STATUS_CTX_NOT_CONSOLE, ERROR_CTX_NOT_CONSOLE); - cmp2(STATUS_CTX_CLIENT_QUERY_TIMEOUT, ERROR_CTX_CLIENT_QUERY_TIMEOUT); - cmp2(STATUS_CTX_CONSOLE_DISCONNECT, ERROR_CTX_CONSOLE_DISCONNECT); - cmp2(STATUS_CTX_CONSOLE_CONNECT, ERROR_CTX_CONSOLE_CONNECT); - cmp2(STATUS_CTX_SHADOW_DENIED, ERROR_CTX_SHADOW_DENIED); - cmp2(STATUS_CTX_SHADOW_INVALID, ERROR_CTX_SHADOW_INVALID); - cmp2(STATUS_CTX_SHADOW_DISABLED, ERROR_CTX_SHADOW_DISABLED); - cmp2(STATUS_CTX_WINSTATION_ACCESS_DENIED, ERROR_CTX_WINSTATION_ACCESS_DENIED); - cmp2(STATUS_CTX_INVALID_PD, ERROR_CTX_INVALID_PD); - cmp2(STATUS_CTX_PD_NOT_FOUND, ERROR_CTX_PD_NOT_FOUND); - cmp2(STATUS_CTX_INVALID_WD, ERROR_CTX_INVALID_WD); - cmp2(STATUS_CTX_WD_NOT_FOUND, ERROR_CTX_WD_NOT_FOUND); - cmp2(STATUS_CTX_CLIENT_LICENSE_IN_USE, ERROR_CTX_CLIENT_LICENSE_IN_USE); - cmp2(STATUS_CTX_CLIENT_LICENSE_NOT_SET, ERROR_CTX_CLIENT_LICENSE_NOT_SET); - cmp2(STATUS_CTX_LICENSE_NOT_AVAILABLE, ERROR_CTX_LICENSE_NOT_AVAILABLE); - cmp2(STATUS_CTX_LICENSE_CLIENT_INVALID, ERROR_CTX_LICENSE_CLIENT_INVALID); - cmp2(STATUS_CTX_LICENSE_EXPIRED, ERROR_CTX_LICENSE_EXPIRED); - cmp2(STATUS_CTX_SHADOW_ENDED_BY_MODE_CHANGE, ERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE); - cmp2(STATUS_CTX_SHADOW_NOT_RUNNING, ERROR_CTX_SHADOW_NOT_RUNNING); - cmp2(STATUS_LICENSE_VIOLATION, ERROR_CTX_LICENSE_NOT_AVAILABLE); - cmp2(STATUS_NETWORK_SESSION_EXPIRED, ERROR_NO_USER_SESSION_KEY); - cmp2(STATUS_FILES_OPEN, ERROR_OPEN_FILES); - cmp2(STATUS_SXS_SECTION_NOT_FOUND, ERROR_SXS_SECTION_NOT_FOUND); - cmp2(STATUS_SXS_CANT_GEN_ACTCTX, ERROR_SXS_CANT_GEN_ACTCTX); - cmp2(STATUS_SXS_INVALID_ACTCTXDATA_FORMAT, ERROR_SXS_INVALID_ACTCTXDATA_FORMAT); - cmp2(STATUS_SXS_ASSEMBLY_NOT_FOUND, ERROR_SXS_ASSEMBLY_NOT_FOUND); - cmp2(STATUS_SXS_MANIFEST_FORMAT_ERROR, ERROR_SXS_MANIFEST_FORMAT_ERROR); - cmp2(STATUS_SXS_MANIFEST_PARSE_ERROR, ERROR_SXS_MANIFEST_PARSE_ERROR); - cmp2(STATUS_SXS_ACTIVATION_CONTEXT_DISABLED, ERROR_SXS_ACTIVATION_CONTEXT_DISABLED); - cmp2(STATUS_SXS_KEY_NOT_FOUND, ERROR_SXS_KEY_NOT_FOUND); - cmp2(STATUS_SXS_VERSION_CONFLICT, ERROR_SXS_VERSION_CONFLICT); - cmp2(STATUS_SXS_WRONG_SECTION_TYPE, ERROR_SXS_WRONG_SECTION_TYPE); - cmp2(STATUS_SXS_THREAD_QUERIES_DISABLED, ERROR_SXS_THREAD_QUERIES_DISABLED); - cmp2(STATUS_SXS_ASSEMBLY_MISSING, ERROR_SXS_ASSEMBLY_MISSING); - cmp2(STATUS_SXS_PROCESS_DEFAULT_ALREADY_SET, ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET); - cmp2(STATUS_SXS_EARLY_DEACTIVATION, ERROR_SXS_EARLY_DEACTIVATION); - cmp2(STATUS_SXS_INVALID_DEACTIVATION, ERROR_SXS_INVALID_DEACTIVATION); - cmp2(STATUS_SXS_MULTIPLE_DEACTIVATION, ERROR_SXS_MULTIPLE_DEACTIVATION); - cmp2(STATUS_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY, ERROR_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY); - cmp2(STATUS_SXS_PROCESS_TERMINATION_REQUESTED, ERROR_SXS_PROCESS_TERMINATION_REQUESTED); - cmp2(STATUS_SXS_CORRUPT_ACTIVATION_STACK, ERROR_SXS_CORRUPT_ACTIVATION_STACK); - cmp2(STATUS_SXS_CORRUPTION, ERROR_SXS_CORRUPTION); - cmp2(STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE, ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE); - cmp2(STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME, ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME); - cmp2(STATUS_SXS_IDENTITY_DUPLICATE_ATTRIBUTE, ERROR_SXS_IDENTITY_DUPLICATE_ATTRIBUTE); - cmp2(STATUS_SXS_IDENTITY_PARSE_ERROR, ERROR_SXS_IDENTITY_PARSE_ERROR); - cmp2(STATUS_SXS_COMPONENT_STORE_CORRUPT, ERROR_SXS_COMPONENT_STORE_CORRUPT); - cmp2(STATUS_SXS_FILE_HASH_MISMATCH, ERROR_SXS_FILE_HASH_MISMATCH); - cmp2(STATUS_SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT, ERROR_SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT); - cmp2(STATUS_SXS_IDENTITIES_DIFFERENT, ERROR_SXS_IDENTITIES_DIFFERENT); - cmp2(STATUS_SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT, ERROR_SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT); - cmp2(STATUS_SXS_FILE_NOT_PART_OF_ASSEMBLY, ERROR_SXS_FILE_NOT_PART_OF_ASSEMBLY); - cmp2(STATUS_ADVANCED_INSTALLER_FAILED, ERROR_ADVANCED_INSTALLER_FAILED); - cmp2(STATUS_XML_ENCODING_MISMATCH, ERROR_XML_ENCODING_MISMATCH); - cmp2(STATUS_SXS_MANIFEST_TOO_BIG, ERROR_SXS_MANIFEST_TOO_BIG); - cmp2(STATUS_SXS_SETTING_NOT_REGISTERED, ERROR_SXS_SETTING_NOT_REGISTERED); - cmp2(STATUS_SXS_TRANSACTION_CLOSURE_INCOMPLETE, ERROR_SXS_TRANSACTION_CLOSURE_INCOMPLETE); - cmp2(STATUS_SXS_PRIMITIVE_INSTALLER_FAILED, ERROR_SMI_PRIMITIVE_INSTALLER_FAILED); - cmp2(STATUS_GENERIC_COMMAND_FAILED, ERROR_GENERIC_COMMAND_FAILED); - cmp2(STATUS_SXS_FILE_HASH_MISSING, ERROR_SXS_FILE_HASH_MISSING); - cmp2(STATUS_REDIRECTOR_STARTED, ERROR_SERVICE_ALREADY_RUNNING); - cmp2(STATUS_AUDITING_DISABLED, ERROR_AUDITING_DISABLED); - cmp2(STATUS_CLUSTER_NODE_ALREADY_UP, ERROR_CLUSTER_NODE_ALREADY_UP); - cmp2(STATUS_CLUSTER_NODE_ALREADY_DOWN, ERROR_CLUSTER_NODE_ALREADY_DOWN); - cmp2(STATUS_CLUSTER_NETWORK_ALREADY_ONLINE, ERROR_CLUSTER_NETWORK_ALREADY_ONLINE); - cmp2(STATUS_CLUSTER_NETWORK_ALREADY_OFFLINE, ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE); - cmp2(STATUS_CLUSTER_NODE_ALREADY_MEMBER, ERROR_CLUSTER_NODE_ALREADY_MEMBER); - cmp2(STATUS_CLUSTER_INVALID_NODE, ERROR_CLUSTER_INVALID_NODE); - cmp2(STATUS_CLUSTER_NODE_EXISTS, ERROR_CLUSTER_NODE_EXISTS); - cmp2(STATUS_CLUSTER_JOIN_IN_PROGRESS, ERROR_CLUSTER_JOIN_IN_PROGRESS); - cmp2(STATUS_CLUSTER_NODE_NOT_FOUND, ERROR_CLUSTER_NODE_NOT_FOUND); - cmp2(STATUS_CLUSTER_LOCAL_NODE_NOT_FOUND, ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND); - cmp2(STATUS_CLUSTER_NETWORK_EXISTS, ERROR_CLUSTER_NETWORK_EXISTS); - cmp2(STATUS_CLUSTER_NETWORK_NOT_FOUND, ERROR_CLUSTER_NETWORK_NOT_FOUND); - cmp2(STATUS_CLUSTER_NETINTERFACE_EXISTS, ERROR_CLUSTER_NETINTERFACE_EXISTS); - cmp2(STATUS_CLUSTER_NETINTERFACE_NOT_FOUND, ERROR_CLUSTER_NETINTERFACE_NOT_FOUND); - cmp2(STATUS_CLUSTER_INVALID_REQUEST, ERROR_CLUSTER_INVALID_REQUEST); - cmp2(STATUS_CLUSTER_INVALID_NETWORK_PROVIDER,ERROR_CLUSTER_INVALID_NETWORK_PROVIDER); - cmp2(STATUS_CLUSTER_NODE_DOWN, ERROR_CLUSTER_NODE_DOWN); - cmp2(STATUS_CLUSTER_NODE_UNREACHABLE, ERROR_CLUSTER_NODE_UNREACHABLE); - cmp2(STATUS_CLUSTER_NODE_NOT_MEMBER, ERROR_CLUSTER_NODE_NOT_MEMBER); - cmp2(STATUS_CLUSTER_JOIN_NOT_IN_PROGRESS, ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS); - cmp2(STATUS_CLUSTER_INVALID_NETWORK, ERROR_CLUSTER_INVALID_NETWORK); - cmp2(STATUS_CLUSTER_NODE_UP, ERROR_CLUSTER_NODE_UP); - cmp2(STATUS_CLUSTER_NODE_PAUSED, ERROR_CLUSTER_NODE_PAUSED); - cmp2(STATUS_CLUSTER_NODE_NOT_PAUSED, ERROR_CLUSTER_NODE_NOT_PAUSED); - cmp2(STATUS_CLUSTER_NO_SECURITY_CONTEXT, ERROR_CLUSTER_NO_SECURITY_CONTEXT); - cmp2(STATUS_CLUSTER_NETWORK_NOT_INTERNAL, ERROR_CLUSTER_NETWORK_NOT_INTERNAL); -} - -START_TEST(error) -{ - if (prepare_test()) - run_error_tests(); -} diff --git a/rostests/winetests/ntdll/exception.c b/rostests/winetests/ntdll/exception.c deleted file mode 100644 index ac138055347..00000000000 --- a/rostests/winetests/ntdll/exception.c +++ /dev/null @@ -1,1543 +0,0 @@ -/* - * Unit test suite for ntdll exceptions - * - * Copyright 2005 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 - */ - -#include -#include - -#ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x500 /* For NTSTATUS */ -#endif - -#define NONAMELESSUNION -#define NONAMELESSSTRUCT -#include "ntstatus.h" -#define WIN32_NO_STATUS -#include "windef.h" -#include "winbase.h" -#include "winnt.h" -#include "winreg.h" -#include "winternl.h" -#include "wine/exception.h" -#include "wine/test.h" - -static void *code_mem; - -static struct _TEB * (WINAPI *pNtCurrentTeb)(void); -static NTSTATUS (WINAPI *pNtGetContextThread)(HANDLE,CONTEXT*); -static NTSTATUS (WINAPI *pNtSetContextThread)(HANDLE,CONTEXT*); -static NTSTATUS (WINAPI *pRtlRaiseException)(EXCEPTION_RECORD *rec); -static PVOID (WINAPI *pRtlAddVectoredExceptionHandler)(ULONG first, PVECTORED_EXCEPTION_HANDLER func); -static ULONG (WINAPI *pRtlRemoveVectoredExceptionHandler)(PVOID handler); -static NTSTATUS (WINAPI *pNtReadVirtualMemory)(HANDLE, const void*, void*, SIZE_T, SIZE_T*); -static NTSTATUS (WINAPI *pNtTerminateProcess)(HANDLE handle, LONG exit_code); -static NTSTATUS (WINAPI *pNtQueryInformationProcess)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG, PULONG); -static NTSTATUS (WINAPI *pNtSetInformationProcess)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG); -static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL); - -#ifdef __i386__ - -#ifndef __WINE_WINTRNL_H -#define ProcessExecuteFlags 0x22 -#define MEM_EXECUTE_OPTION_DISABLE 0x01 -#define MEM_EXECUTE_OPTION_ENABLE 0x02 -#define MEM_EXECUTE_OPTION_PERMANENT 0x08 -#endif - -static int my_argc; -static char** my_argv; -static int test_stage; - -static BOOL is_wow64; - -/* Test various instruction combinations that cause a protection fault on the i386, - * and check what the resulting exception looks like. - */ - -static const struct exception -{ - BYTE code[18]; /* asm code */ - BYTE offset; /* offset of faulting instruction */ - BYTE length; /* length of faulting instruction */ - BOOL wow64_broken; /* broken on Wow64, should be skipped */ - NTSTATUS status; /* expected status code */ - DWORD nb_params; /* expected number of parameters */ - DWORD params[4]; /* expected parameters */ - NTSTATUS alt_status; /* alternative status code */ - DWORD alt_nb_params; /* alternative number of parameters */ - DWORD alt_params[4]; /* alternative parameters */ -} exceptions[] = -{ -/* 0 */ - /* test some privileged instructions */ - { { 0xfb, 0xc3 }, /* 0: sti; ret */ - 0, 1, FALSE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, - { { 0x6c, 0xc3 }, /* 1: insb (%dx); ret */ - 0, 1, FALSE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, - { { 0x6d, 0xc3 }, /* 2: insl (%dx); ret */ - 0, 1, FALSE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, - { { 0x6e, 0xc3 }, /* 3: outsb (%dx); ret */ - 0, 1, FALSE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, - { { 0x6f, 0xc3 }, /* 4: outsl (%dx); ret */ - 0, 1, FALSE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, -/* 5 */ - { { 0xe4, 0x11, 0xc3 }, /* 5: inb $0x11,%al; ret */ - 0, 2, FALSE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, - { { 0xe5, 0x11, 0xc3 }, /* 6: inl $0x11,%eax; ret */ - 0, 2, FALSE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, - { { 0xe6, 0x11, 0xc3 }, /* 7: outb %al,$0x11; ret */ - 0, 2, FALSE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, - { { 0xe7, 0x11, 0xc3 }, /* 8: outl %eax,$0x11; ret */ - 0, 2, FALSE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, - { { 0xed, 0xc3 }, /* 9: inl (%dx),%eax; ret */ - 0, 1, FALSE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, -/* 10 */ - { { 0xee, 0xc3 }, /* 10: outb %al,(%dx); ret */ - 0, 1, FALSE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, - { { 0xef, 0xc3 }, /* 11: outl %eax,(%dx); ret */ - 0, 1, FALSE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, - { { 0xf4, 0xc3 }, /* 12: hlt; ret */ - 0, 1, FALSE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, - { { 0xfa, 0xc3 }, /* 13: cli; ret */ - 0, 1, FALSE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, - - /* test long jump to invalid selector */ - { { 0xea, 0, 0, 0, 0, 0, 0, 0xc3 }, /* 14: ljmp $0,$0; ret */ - 0, 7, FALSE, STATUS_ACCESS_VIOLATION, 2, { 0, 0xffffffff } }, - -/* 15 */ - /* test iret to invalid selector */ - { { 0x6a, 0x00, 0x6a, 0x00, 0x6a, 0x00, 0xcf, 0x83, 0xc4, 0x0c, 0xc3 }, - /* 15: pushl $0; pushl $0; pushl $0; iret; addl $12,%esp; ret */ - 6, 1, FALSE, STATUS_ACCESS_VIOLATION, 2, { 0, 0xffffffff } }, - - /* test loading an invalid selector */ - { { 0xb8, 0xef, 0xbe, 0x00, 0x00, 0x8e, 0xe8, 0xc3 }, /* 16: mov $beef,%ax; mov %ax,%gs; ret */ - 5, 2, FALSE, STATUS_ACCESS_VIOLATION, 2, { 0, 0xbee8 } }, /* 0xbee8 or 0xffffffff */ - - /* test accessing a zero selector (%es broken on Wow64) */ - { { 0x06, 0x31, 0xc0, 0x8e, 0xc0, 0x26, 0xa1, 0, 0, 0, 0, 0x07, 0xc3 }, - /* push %es; xor %eax,%eax; mov %ax,%es; mov %es:(0),%ax; pop %es; ret */ - 5, 6, TRUE, STATUS_ACCESS_VIOLATION, 2, { 0, 0xffffffff } }, - { { 0x0f, 0xa8, 0x31, 0xc0, 0x8e, 0xe8, 0x65, 0xa1, 0, 0, 0, 0, 0x0f, 0xa9, 0xc3 }, - /* push %gs; xor %eax,%eax; mov %ax,%gs; mov %gs:(0),%ax; pop %gs; ret */ - 6, 6, FALSE, STATUS_ACCESS_VIOLATION, 2, { 0, 0xffffffff } }, - - /* test moving %cs -> %ss */ - { { 0x0e, 0x17, 0x58, 0xc3 }, /* pushl %cs; popl %ss; popl %eax; ret */ - 1, 1, FALSE, STATUS_ACCESS_VIOLATION, 2, { 0, 0xffffffff } }, - -/* 20 */ - /* test overlong instruction (limit is 15 bytes, 5 on Win7) */ - { { 0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,0xfa,0xc3 }, - 0, 16, TRUE, STATUS_ILLEGAL_INSTRUCTION, 0, { 0 }, - STATUS_ACCESS_VIOLATION, 2, { 0, 0xffffffff } }, - { { 0x64,0x64,0x64,0x64,0xfa,0xc3 }, - 0, 5, TRUE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, - - /* test invalid interrupt */ - { { 0xcd, 0xff, 0xc3 }, /* int $0xff; ret */ - 0, 2, FALSE, STATUS_ACCESS_VIOLATION, 2, { 0, 0xffffffff } }, - - /* test moves to/from Crx */ - { { 0x0f, 0x20, 0xc0, 0xc3 }, /* movl %cr0,%eax; ret */ - 0, 3, FALSE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, - { { 0x0f, 0x20, 0xe0, 0xc3 }, /* movl %cr4,%eax; ret */ - 0, 3, FALSE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, -/* 25 */ - { { 0x0f, 0x22, 0xc0, 0xc3 }, /* movl %eax,%cr0; ret */ - 0, 3, FALSE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, - { { 0x0f, 0x22, 0xe0, 0xc3 }, /* movl %eax,%cr4; ret */ - 0, 3, FALSE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, - - /* test moves to/from Drx */ - { { 0x0f, 0x21, 0xc0, 0xc3 }, /* movl %dr0,%eax; ret */ - 0, 3, FALSE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, - { { 0x0f, 0x21, 0xc8, 0xc3 }, /* movl %dr1,%eax; ret */ - 0, 3, FALSE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, - { { 0x0f, 0x21, 0xf8, 0xc3 }, /* movl %dr7,%eax; ret */ - 0, 3, FALSE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, -/* 30 */ - { { 0x0f, 0x23, 0xc0, 0xc3 }, /* movl %eax,%dr0; ret */ - 0, 3, FALSE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, - { { 0x0f, 0x23, 0xc8, 0xc3 }, /* movl %eax,%dr1; ret */ - 0, 3, FALSE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, - { { 0x0f, 0x23, 0xf8, 0xc3 }, /* movl %eax,%dr7; ret */ - 0, 3, FALSE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, - - /* test memory reads */ - { { 0xa1, 0xfc, 0xff, 0xff, 0xff, 0xc3 }, /* movl 0xfffffffc,%eax; ret */ - 0, 5, FALSE, STATUS_ACCESS_VIOLATION, 2, { 0, 0xfffffffc } }, - { { 0xa1, 0xfd, 0xff, 0xff, 0xff, 0xc3 }, /* movl 0xfffffffd,%eax; ret */ - 0, 5, FALSE, STATUS_ACCESS_VIOLATION, 2, { 0, 0xfffffffd } }, -/* 35 */ - { { 0xa1, 0xfe, 0xff, 0xff, 0xff, 0xc3 }, /* movl 0xfffffffe,%eax; ret */ - 0, 5, FALSE, STATUS_ACCESS_VIOLATION, 2, { 0, 0xfffffffe } }, - { { 0xa1, 0xff, 0xff, 0xff, 0xff, 0xc3 }, /* movl 0xffffffff,%eax; ret */ - 0, 5, FALSE, STATUS_ACCESS_VIOLATION, 2, { 0, 0xffffffff } }, - - /* test memory writes */ - { { 0xa3, 0xfc, 0xff, 0xff, 0xff, 0xc3 }, /* movl %eax,0xfffffffc; ret */ - 0, 5, FALSE, STATUS_ACCESS_VIOLATION, 2, { 1, 0xfffffffc } }, - { { 0xa3, 0xfd, 0xff, 0xff, 0xff, 0xc3 }, /* movl %eax,0xfffffffd; ret */ - 0, 5, FALSE, STATUS_ACCESS_VIOLATION, 2, { 1, 0xfffffffd } }, - { { 0xa3, 0xfe, 0xff, 0xff, 0xff, 0xc3 }, /* movl %eax,0xfffffffe; ret */ - 0, 5, FALSE, STATUS_ACCESS_VIOLATION, 2, { 1, 0xfffffffe } }, -/* 40 */ - { { 0xa3, 0xff, 0xff, 0xff, 0xff, 0xc3 }, /* movl %eax,0xffffffff; ret */ - 0, 5, FALSE, STATUS_ACCESS_VIOLATION, 2, { 1, 0xffffffff } }, - - /* test exception with cleared %ds and %es (broken on Wow64) */ - { { 0x1e, 0x06, 0x31, 0xc0, 0x8e, 0xd8, 0x8e, 0xc0, 0xfa, 0x07, 0x1f, 0xc3 }, - /* push %ds; push %es; xorl %eax,%eax; mov %ax,%ds; mov %ax,%es; cli; pop %es; pop %ds; ret */ - 8, 1, TRUE, STATUS_PRIVILEGED_INSTRUCTION, 0 }, - - { { 0xf1, 0x90, 0xc3 }, /* icebp; nop; ret */ - 1, 1, FALSE, STATUS_SINGLE_STEP, 0 }, -}; - -static int got_exception; -static BOOL have_vectored_api; - -static void run_exception_test(void *handler, const void* context, - const void *code, unsigned int code_size, - DWORD access) -{ - struct { - EXCEPTION_REGISTRATION_RECORD frame; - const void *context; - } exc_frame; - void (*func)(void) = code_mem; - DWORD oldaccess, oldaccess2; - - exc_frame.frame.Handler = handler; - exc_frame.frame.Prev = pNtCurrentTeb()->Tib.ExceptionList; - exc_frame.context = context; - - memcpy(code_mem, code, code_size); - if(access) - VirtualProtect(code_mem, code_size, access, &oldaccess); - - pNtCurrentTeb()->Tib.ExceptionList = &exc_frame.frame; - func(); - pNtCurrentTeb()->Tib.ExceptionList = exc_frame.frame.Prev; - - if(access) - VirtualProtect(code_mem, code_size, oldaccess, &oldaccess2); -} - -static LONG CALLBACK rtlraiseexception_vectored_handler(EXCEPTION_POINTERS *ExceptionInfo) -{ - PCONTEXT context = ExceptionInfo->ContextRecord; - PEXCEPTION_RECORD rec = ExceptionInfo->ExceptionRecord; - trace("vect. handler %08x addr:%p context.Eip:%x\n", rec->ExceptionCode, - rec->ExceptionAddress, context->Eip); - - ok(rec->ExceptionAddress == (char *)code_mem + 0xb, "ExceptionAddress at %p instead of %p\n", - rec->ExceptionAddress, (char *)code_mem + 0xb); - - if (pNtCurrentTeb()->Peb->BeingDebugged) - ok((void *)context->Eax == pRtlRaiseException || - broken( is_wow64 && context->Eax == 0xf00f00f1 ), /* broken on vista */ - "debugger managed to modify Eax to %x should be %p\n", - context->Eax, pRtlRaiseException); - - /* check that context.Eip is fixed up only for EXCEPTION_BREAKPOINT - * even if raised by RtlRaiseException - */ - if(rec->ExceptionCode == EXCEPTION_BREAKPOINT) - { - ok(context->Eip == (DWORD)code_mem + 0xa || - broken(context->Eip == (DWORD)code_mem + 0xb), /* win2k3 */ - "Eip at %x instead of %x or %x\n", context->Eip, - (DWORD)code_mem + 0xa, (DWORD)code_mem + 0xb); - } - else - { - ok(context->Eip == (DWORD)code_mem + 0xb, "Eip at %x instead of %x\n", - context->Eip, (DWORD)code_mem + 0xb); - } - - /* test if context change is preserved from vectored handler to stack handlers */ - context->Eax = 0xf00f00f0; - return EXCEPTION_CONTINUE_SEARCH; -} - -static DWORD rtlraiseexception_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame, - CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher ) -{ - trace( "exception: %08x flags:%x addr:%p context: Eip:%x\n", - rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress, context->Eip ); - - ok(rec->ExceptionAddress == (char *)code_mem + 0xb, "ExceptionAddress at %p instead of %p\n", - rec->ExceptionAddress, (char *)code_mem + 0xb); - - /* check that context.Eip is fixed up only for EXCEPTION_BREAKPOINT - * even if raised by RtlRaiseException - */ - if(rec->ExceptionCode == EXCEPTION_BREAKPOINT) - { - ok(context->Eip == (DWORD)code_mem + 0xa || - broken(context->Eip == (DWORD)code_mem + 0xb), /* win2k3 */ - "Eip at %x instead of %x or %x\n", context->Eip, - (DWORD)code_mem + 0xa, (DWORD)code_mem + 0xb); - } - else - { - ok(context->Eip == (DWORD)code_mem + 0xb, "Eip at %x instead of %x\n", - context->Eip, (DWORD)code_mem + 0xb); - } - - if(have_vectored_api) - ok(context->Eax == 0xf00f00f0, "Eax is %x, should have been set to 0xf00f00f0 in vectored handler\n", - context->Eax); - - /* give the debugger a chance to examine the state a second time */ - /* without the exception handler changing Eip */ - if (test_stage == 2) - return ExceptionContinueSearch; - - /* Eip in context is decreased by 1 - * Increase it again, else execution will continue in the middle of a instruction */ - if(rec->ExceptionCode == EXCEPTION_BREAKPOINT && (context->Eip == (DWORD)code_mem + 0xa)) - context->Eip += 1; - return ExceptionContinueExecution; -} - - -static const BYTE call_one_arg_code[] = { - 0x8b, 0x44, 0x24, 0x08, /* mov 0x8(%esp),%eax */ - 0x50, /* push %eax */ - 0x8b, 0x44, 0x24, 0x08, /* mov 0x8(%esp),%eax */ - 0xff, 0xd0, /* call *%eax */ - 0x90, /* nop */ - 0x90, /* nop */ - 0x90, /* nop */ - 0x90, /* nop */ - 0xc3, /* ret */ -}; - - -static void run_rtlraiseexception_test(DWORD exceptioncode) -{ - EXCEPTION_REGISTRATION_RECORD frame; - EXCEPTION_RECORD record; - PVOID vectored_handler = NULL; - - void (*func)(void* function, EXCEPTION_RECORD* record) = code_mem; - - record.ExceptionCode = exceptioncode; - record.ExceptionFlags = 0; - record.ExceptionRecord = NULL; - record.ExceptionAddress = NULL; /* does not matter, copied return address */ - record.NumberParameters = 0; - - frame.Handler = rtlraiseexception_handler; - frame.Prev = pNtCurrentTeb()->Tib.ExceptionList; - - memcpy(code_mem, call_one_arg_code, sizeof(call_one_arg_code)); - - pNtCurrentTeb()->Tib.ExceptionList = &frame; - if (have_vectored_api) - { - vectored_handler = pRtlAddVectoredExceptionHandler(TRUE, &rtlraiseexception_vectored_handler); - ok(vectored_handler != 0, "RtlAddVectoredExceptionHandler failed\n"); - } - - func(pRtlRaiseException, &record); - ok( record.ExceptionAddress == (char *)code_mem + 0x0b, - "address set to %p instead of %p\n", record.ExceptionAddress, (char *)code_mem + 0x0b ); - - if (have_vectored_api) - pRtlRemoveVectoredExceptionHandler(vectored_handler); - pNtCurrentTeb()->Tib.ExceptionList = frame.Prev; -} - -static void test_rtlraiseexception(void) -{ - if (!pRtlRaiseException) - { - skip("RtlRaiseException not found\n"); - return; - } - - /* test without debugger */ - run_rtlraiseexception_test(0x12345); - run_rtlraiseexception_test(EXCEPTION_BREAKPOINT); - run_rtlraiseexception_test(EXCEPTION_INVALID_HANDLE); -} - -static DWORD handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame, - CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher ) -{ - const struct exception *except = *(const struct exception **)(frame + 1); - unsigned int i, entry = except - exceptions; - - got_exception++; - trace( "exception %u: %x flags:%x addr:%p\n", - entry, rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress ); - - ok( rec->ExceptionCode == except->status || - (except->alt_status != 0 && rec->ExceptionCode == except->alt_status), - "%u: Wrong exception code %x/%x\n", entry, rec->ExceptionCode, except->status ); - ok( rec->ExceptionAddress == (char*)code_mem + except->offset, - "%u: Wrong exception address %p/%p\n", entry, - rec->ExceptionAddress, (char*)code_mem + except->offset ); - - if (except->alt_status == 0 || rec->ExceptionCode != except->alt_status) - { - ok( rec->NumberParameters == except->nb_params, - "%u: Wrong number of parameters %u/%u\n", entry, rec->NumberParameters, except->nb_params ); - } - else - { - ok( rec->NumberParameters == except->alt_nb_params, - "%u: Wrong number of parameters %u/%u\n", entry, rec->NumberParameters, except->nb_params ); - } - - /* Most CPUs (except Intel Core apparently) report a segment limit violation */ - /* instead of page faults for accesses beyond 0xffffffff */ - if (except->nb_params == 2 && except->params[1] >= 0xfffffffd) - { - if (rec->ExceptionInformation[0] == 0 && rec->ExceptionInformation[1] == 0xffffffff) - goto skip_params; - } - - /* Seems that both 0xbee8 and 0xfffffffff can be returned in windows */ - if (except->nb_params == 2 && rec->NumberParameters == 2 - && except->params[1] == 0xbee8 && rec->ExceptionInformation[1] == 0xffffffff - && except->params[0] == rec->ExceptionInformation[0]) - { - goto skip_params; - } - - if (except->alt_status == 0 || rec->ExceptionCode != except->alt_status) - { - for (i = 0; i < rec->NumberParameters; i++) - ok( rec->ExceptionInformation[i] == except->params[i], - "%u: Wrong parameter %d: %lx/%x\n", - entry, i, rec->ExceptionInformation[i], except->params[i] ); - } - else - { - for (i = 0; i < rec->NumberParameters; i++) - ok( rec->ExceptionInformation[i] == except->alt_params[i], - "%u: Wrong parameter %d: %lx/%x\n", - entry, i, rec->ExceptionInformation[i], except->alt_params[i] ); - } - -skip_params: - /* don't handle exception if it's not the address we expected */ - if (rec->ExceptionAddress != (char*)code_mem + except->offset) return ExceptionContinueSearch; - - context->Eip += except->length; - return ExceptionContinueExecution; -} - -static void test_prot_fault(void) -{ - unsigned int i; - - for (i = 0; i < sizeof(exceptions)/sizeof(exceptions[0]); i++) - { - if (is_wow64 && exceptions[i].wow64_broken && !strcmp( winetest_platform, "windows" )) - { - skip( "Exception %u broken on Wow64\n", i ); - continue; - } - got_exception = 0; - run_exception_test(handler, &exceptions[i], &exceptions[i].code, - sizeof(exceptions[i].code), 0); - if (!i && !got_exception) - { - trace( "No exception, assuming win9x, no point in testing further\n" ); - break; - } - ok( got_exception == (exceptions[i].status != 0), - "%u: bad exception count %d\n", i, got_exception ); - } -} - -struct dbgreg_test { - DWORD dr0, dr1, dr2, dr3, dr6, dr7; -}; - -/* test handling of debug registers */ -static DWORD dreg_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame, - CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher ) -{ - const struct dbgreg_test *test = *(const struct dbgreg_test **)(frame + 1); - - context->Eip += 2; /* Skips the popl (%eax) */ - context->Dr0 = test->dr0; - context->Dr1 = test->dr1; - context->Dr2 = test->dr2; - context->Dr3 = test->dr3; - context->Dr6 = test->dr6; - context->Dr7 = test->dr7; - return ExceptionContinueExecution; -} - -#define CHECK_DEBUG_REG(n, m) \ - ok((ctx.Dr##n & m) == test->dr##n, "(%d) failed to set debug register " #n " to %x, got %x\n", \ - test_num, test->dr##n, ctx.Dr##n) - -static void check_debug_registers(int test_num, const struct dbgreg_test *test) -{ - CONTEXT ctx; - NTSTATUS status; - - ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS; - status = pNtGetContextThread(GetCurrentThread(), &ctx); - ok(status == STATUS_SUCCESS, "NtGetContextThread failed with %x\n", status); - - CHECK_DEBUG_REG(0, ~0); - CHECK_DEBUG_REG(1, ~0); - CHECK_DEBUG_REG(2, ~0); - CHECK_DEBUG_REG(3, ~0); - CHECK_DEBUG_REG(6, 0x0f); - CHECK_DEBUG_REG(7, ~0xdc00); -} - -static const BYTE segfault_code[5] = { - 0x31, 0xc0, /* xor %eax,%eax */ - 0x8f, 0x00, /* popl (%eax) - cause exception */ - 0xc3 /* ret */ -}; - -/* test the single step exception behaviour */ -static DWORD single_step_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame, - CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher ) -{ - got_exception++; - ok (!(context->EFlags & 0x100), "eflags has single stepping bit set\n"); - - if( got_exception < 3) - context->EFlags |= 0x100; /* single step until popf instruction */ - else { - /* show that the last single step exception on the popf instruction - * (which removed the TF bit), still is a EXCEPTION_SINGLE_STEP exception */ - ok( rec->ExceptionCode == EXCEPTION_SINGLE_STEP, - "exception is not EXCEPTION_SINGLE_STEP: %x\n", rec->ExceptionCode); - } - - return ExceptionContinueExecution; -} - -static const BYTE single_stepcode[] = { - 0x9c, /* pushf */ - 0x58, /* pop %eax */ - 0x0d,0,1,0,0, /* or $0x100,%eax */ - 0x50, /* push %eax */ - 0x9d, /* popf */ - 0x35,0,1,0,0, /* xor $0x100,%eax */ - 0x50, /* push %eax */ - 0x9d, /* popf */ - 0xc3 -}; - -/* Test the alignment check (AC) flag handling. */ -static const BYTE align_check_code[] = { - 0x55, /* push %ebp */ - 0x89,0xe5, /* mov %esp,%ebp */ - 0x9c, /* pushf */ - 0x58, /* pop %eax */ - 0x0d,0,0,4,0, /* or $0x40000,%eax */ - 0x50, /* push %eax */ - 0x9d, /* popf */ - 0x89,0xe0, /* mov %esp, %eax */ - 0x8b,0x40,0x1, /* mov 0x1(%eax), %eax - cause exception */ - 0x9c, /* pushf */ - 0x58, /* pop %eax */ - 0x35,0,0,4,0, /* xor $0x40000,%eax */ - 0x50, /* push %eax */ - 0x9d, /* popf */ - 0x5d, /* pop %ebp */ - 0xc3, /* ret */ -}; - -static DWORD align_check_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame, - CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher ) -{ - ok (!(context->EFlags & 0x40000), "eflags has AC bit set\n"); - got_exception++; - return ExceptionContinueExecution; -} - -/* Test the direction flag handling. */ -static const BYTE direction_flag_code[] = { - 0x55, /* push %ebp */ - 0x89,0xe5, /* mov %esp,%ebp */ - 0xfd, /* std */ - 0xfa, /* cli - cause exception */ - 0x5d, /* pop %ebp */ - 0xc3, /* ret */ -}; - -static DWORD direction_flag_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame, - CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher ) -{ -#ifdef __GNUC__ - unsigned int flags; - __asm__("pushfl; popl %0; cld" : "=r" (flags) ); - /* older windows versions don't clear DF properly so don't test */ - if (flags & 0x400) trace( "eflags has DF bit set\n" ); -#endif - ok( context->EFlags & 0x400, "context eflags has DF bit cleared\n" ); - got_exception++; - context->Eip++; /* skip cli */ - context->EFlags &= ~0x400; /* make sure it is cleared on return */ - return ExceptionContinueExecution; -} - -/* test single stepping over hardware breakpoint */ -static DWORD bpx_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame, - CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher ) -{ - got_exception++; - ok( rec->ExceptionCode == EXCEPTION_SINGLE_STEP, - "wrong exception code: %x\n", rec->ExceptionCode); - - if(got_exception == 1) { - /* hw bp exception on first nop */ - ok( context->Eip == (DWORD)code_mem, "eip is wrong: %x instead of %x\n", - context->Eip, (DWORD)code_mem); - ok( (context->Dr6 & 0xf) == 1, "B0 flag is not set in Dr6\n"); - ok( !(context->Dr6 & 0x4000), "BS flag is set in Dr6\n"); - context->Dr0 = context->Dr0 + 1; /* set hw bp again on next instruction */ - context->EFlags |= 0x100; /* enable single stepping */ - } else if( got_exception == 2) { - /* single step exception on second nop */ - ok( context->Eip == (DWORD)code_mem + 1, "eip is wrong: %x instead of %x\n", - context->Eip, (DWORD)code_mem + 1); - ok( (context->Dr6 & 0x4000), "BS flag is not set in Dr6\n"); - /* depending on the win version the B0 bit is already set here as well - ok( (context->Dr6 & 0xf) == 0, "B0...3 flags in Dr6 shouldn't be set\n"); */ - context->EFlags |= 0x100; - } else if( got_exception == 3) { - /* hw bp exception on second nop */ - ok( context->Eip == (DWORD)code_mem + 1, "eip is wrong: %x instead of %x\n", - context->Eip, (DWORD)code_mem + 1); - ok( (context->Dr6 & 0xf) == 1, "B0 flag is not set in Dr6\n"); - ok( !(context->Dr6 & 0x4000), "BS flag is set in Dr6\n"); - context->Dr0 = 0; /* clear breakpoint */ - context->EFlags |= 0x100; - } else { - /* single step exception on ret */ - ok( context->Eip == (DWORD)code_mem + 2, "eip is wrong: %x instead of %x\n", - context->Eip, (DWORD)code_mem + 2); - ok( (context->Dr6 & 0xf) == 0, "B0...3 flags in Dr6 shouldn't be set\n"); - ok( (context->Dr6 & 0x4000), "BS flag is not set in Dr6\n"); - } - - context->Dr6 = 0; /* clear status register */ - return ExceptionContinueExecution; -} - -static const BYTE dummy_code[] = { 0x90, 0x90, 0xc3 }; /* nop, nop, ret */ - -/* test int3 handling */ -static DWORD int3_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame, - CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher ) -{ - ok( rec->ExceptionAddress == code_mem, "exception address not at: %p, but at %p\n", - code_mem, rec->ExceptionAddress); - ok( context->Eip == (DWORD)code_mem, "eip not at: %p, but at %#x\n", code_mem, context->Eip); - if(context->Eip == (DWORD)code_mem) context->Eip++; /* skip breakpoint */ - - return ExceptionContinueExecution; -} - -static const BYTE int3_code[] = { 0xCC, 0xc3 }; /* int 3, ret */ - - -static void test_exceptions(void) -{ - CONTEXT ctx; - NTSTATUS res; - struct dbgreg_test dreg_test; - - if (!pNtGetContextThread || !pNtSetContextThread) - { - skip( "NtGetContextThread/NtSetContextThread not found\n" ); - return; - } - - /* test handling of debug registers */ - memset(&dreg_test, 0, sizeof(dreg_test)); - - dreg_test.dr0 = 0x42424240; - dreg_test.dr2 = 0x126bb070; - dreg_test.dr3 = 0x0badbad0; - dreg_test.dr7 = 0xffff0115; - run_exception_test(dreg_handler, &dreg_test, &segfault_code, sizeof(segfault_code), 0); - check_debug_registers(1, &dreg_test); - - dreg_test.dr0 = 0x42424242; - dreg_test.dr2 = 0x100f0fe7; - dreg_test.dr3 = 0x0abebabe; - dreg_test.dr7 = 0x115; - run_exception_test(dreg_handler, &dreg_test, &segfault_code, sizeof(segfault_code), 0); - check_debug_registers(2, &dreg_test); - - /* test single stepping behavior */ - got_exception = 0; - run_exception_test(single_step_handler, NULL, &single_stepcode, sizeof(single_stepcode), 0); - ok(got_exception == 3, "expected 3 single step exceptions, got %d\n", got_exception); - - /* test alignment exceptions */ - got_exception = 0; - run_exception_test(align_check_handler, NULL, align_check_code, sizeof(align_check_code), 0); - ok(got_exception == 0, "got %d alignment faults, expected 0\n", got_exception); - - /* test direction flag */ - got_exception = 0; - run_exception_test(direction_flag_handler, NULL, direction_flag_code, sizeof(direction_flag_code), 0); - ok(got_exception == 1, "got %d exceptions, expected 1\n", got_exception); - - /* test single stepping over hardware breakpoint */ - memset(&ctx, 0, sizeof(ctx)); - ctx.Dr0 = (DWORD) code_mem; /* set hw bp on first nop */ - ctx.Dr7 = 3; - ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS; - res = pNtSetContextThread( GetCurrentThread(), &ctx); - ok( res == STATUS_SUCCESS, "NtSetContextThread failed with %x\n", res); - - got_exception = 0; - run_exception_test(bpx_handler, NULL, dummy_code, sizeof(dummy_code), 0); - ok( got_exception == 4,"expected 4 exceptions, got %d\n", got_exception); - - /* test int3 handling */ - run_exception_test(int3_handler, NULL, int3_code, sizeof(int3_code), 0); -} - -static void test_debugger(void) -{ - char cmdline[MAX_PATH]; - PROCESS_INFORMATION pi; - STARTUPINFO si = { 0 }; - DEBUG_EVENT de; - DWORD continuestatus; - PVOID code_mem_address = NULL; - NTSTATUS status; - SIZE_T size_read; - BOOL ret; - int counter = 0; - si.cb = sizeof(si); - - if(!pNtGetContextThread || !pNtSetContextThread || !pNtReadVirtualMemory || !pNtTerminateProcess) - { - skip("NtGetContextThread, NtSetContextThread, NtReadVirtualMemory or NtTerminateProcess not found\n"); - return; - } - - sprintf(cmdline, "%s %s %s %p", my_argv[0], my_argv[1], "debuggee", &test_stage); - ret = CreateProcess(NULL, cmdline, NULL, NULL, FALSE, DEBUG_PROCESS, NULL, NULL, &si, &pi); - ok(ret, "could not create child process error: %u\n", GetLastError()); - if (!ret) - return; - - do - { - continuestatus = DBG_CONTINUE; - ok(WaitForDebugEvent(&de, INFINITE), "reading debug event\n"); - - if (de.dwThreadId != pi.dwThreadId) - { - trace("event %d not coming from main thread, ignoring\n", de.dwDebugEventCode); - ContinueDebugEvent(de.dwProcessId, de.dwThreadId, DBG_CONTINUE); - continue; - } - - if (de.dwDebugEventCode == CREATE_PROCESS_DEBUG_EVENT) - { - if(de.u.CreateProcessInfo.lpBaseOfImage != pNtCurrentTeb()->Peb->ImageBaseAddress) - { - skip("child process loaded at different address, terminating it\n"); - pNtTerminateProcess(pi.hProcess, 0); - } - } - else if (de.dwDebugEventCode == EXCEPTION_DEBUG_EVENT) - { - CONTEXT ctx; - int stage; - - counter++; - status = pNtReadVirtualMemory(pi.hProcess, &code_mem, &code_mem_address, - sizeof(code_mem_address), &size_read); - ok(!status,"NtReadVirtualMemory failed with 0x%x\n", status); - status = pNtReadVirtualMemory(pi.hProcess, &test_stage, &stage, - sizeof(stage), &size_read); - ok(!status,"NtReadVirtualMemory failed with 0x%x\n", status); - - ctx.ContextFlags = CONTEXT_FULL; - status = pNtGetContextThread(pi.hThread, &ctx); - ok(!status, "NtGetContextThread failed with 0x%x\n", status); - - trace("exception 0x%x at %p firstchance=%d Eip=0x%x, Eax=0x%x\n", - de.u.Exception.ExceptionRecord.ExceptionCode, - de.u.Exception.ExceptionRecord.ExceptionAddress, de.u.Exception.dwFirstChance, ctx.Eip, ctx.Eax); - - if (counter > 100) - { - ok(FALSE, "got way too many exceptions, probably caught in a infinite loop, terminating child\n"); - pNtTerminateProcess(pi.hProcess, 1); - } - else if (counter >= 2) /* skip startup breakpoint */ - { - if (stage == 1) - { - ok((char *)ctx.Eip == (char *)code_mem_address + 0xb, "Eip at %x instead of %p\n", - ctx.Eip, (char *)code_mem_address + 0xb); - /* setting the context from debugger does not affect the context, the exception handlers gets */ - /* uncomment once wine is fixed */ - /* ctx.Eip = 0x12345; */ - ctx.Eax = 0xf00f00f1; - - /* let the debuggee handle the exception */ - continuestatus = DBG_EXCEPTION_NOT_HANDLED; - } - else if (stage == 2) - { - if (de.u.Exception.dwFirstChance) - { - /* debugger gets first chance exception with unmodified ctx.Eip */ - ok((char *)ctx.Eip == (char *)code_mem_address + 0xb, "Eip at 0x%x instead of %p\n", - ctx.Eip, (char *)code_mem_address + 0xb); - - /* setting the context from debugger does not affect the context, the exception handlers gets */ - /* uncomment once wine is fixed */ - /* ctx.Eip = 0x12345; */ - ctx.Eax = 0xf00f00f1; - - /* pass exception to debuggee - * exception will not be handled and - * a second chance exception will be raised */ - continuestatus = DBG_EXCEPTION_NOT_HANDLED; - } - else - { - /* debugger gets context after exception handler has played with it */ - /* ctx.Eip is the same value the exception handler got */ - if (de.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT) - { - ok((char *)ctx.Eip == (char *)code_mem_address + 0xa || - broken(is_wow64 && (char *)ctx.Eip == (char *)code_mem_address + 0xb), - "Eip at 0x%x instead of %p\n", - ctx.Eip, (char *)code_mem_address + 0xa); - /* need to fixup Eip for debuggee */ - if ((char *)ctx.Eip == (char *)code_mem_address + 0xa) - ctx.Eip += 1; - } - else - ok((char *)ctx.Eip == (char *)code_mem_address + 0xb, "Eip at 0x%x instead of %p\n", - ctx.Eip, (char *)code_mem_address + 0xb); - /* here we handle exception */ - } - } - else - ok(FALSE, "unexpected stage %x\n", stage); - - status = pNtSetContextThread(pi.hThread, &ctx); - ok(!status, "NtSetContextThread failed with 0x%x\n", status); - } - } - - ContinueDebugEvent(de.dwProcessId, de.dwThreadId, continuestatus); - - } while (de.dwDebugEventCode != EXIT_PROCESS_DEBUG_EVENT); - - winetest_wait_child_process( pi.hProcess ); - ret = CloseHandle(pi.hThread); - ok(ret, "error %u\n", GetLastError()); - ret = CloseHandle(pi.hProcess); - ok(ret, "error %u\n", GetLastError()); - - return; -} - -static DWORD simd_fault_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame, - CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher ) -{ - int *stage = *(int **)(frame + 1); - - got_exception++; - - if( *stage == 1) { - /* fault while executing sse instruction */ - context->Eip += 3; /* skip addps */ - return ExceptionContinueExecution; - } - - /* stage 2 - divide by zero fault */ - if( rec->ExceptionCode == EXCEPTION_ILLEGAL_INSTRUCTION) - skip("system doesn't support SIMD exceptions\n"); - else { - ok( rec->ExceptionCode == STATUS_FLOAT_MULTIPLE_TRAPS, - "exception code: %#x, should be %#x\n", - rec->ExceptionCode, STATUS_FLOAT_MULTIPLE_TRAPS); - ok( rec->NumberParameters == 1 || broken(is_wow64 && rec->NumberParameters == 2), - "# of params: %i, should be 1\n", - rec->NumberParameters); - if( rec->NumberParameters == 1 ) - ok( rec->ExceptionInformation[0] == 0, "param #1: %lx, should be 0\n", rec->ExceptionInformation[0]); - } - - context->Eip += 3; /* skip divps */ - - return ExceptionContinueExecution; -} - -static const BYTE simd_exception_test[] = { - 0x83, 0xec, 0x4, /* sub $0x4, %esp */ - 0x0f, 0xae, 0x1c, 0x24, /* stmxcsr (%esp) */ - 0x66, 0x81, 0x24, 0x24, 0xff, 0xfd, /* andw $0xfdff,(%esp) * enable divide by */ - 0x0f, 0xae, 0x14, 0x24, /* ldmxcsr (%esp) * zero exceptions */ - 0x6a, 0x01, /* push $0x1 */ - 0x6a, 0x01, /* push $0x1 */ - 0x6a, 0x01, /* push $0x1 */ - 0x6a, 0x01, /* push $0x1 */ - 0x0f, 0x10, 0x0c, 0x24, /* movups (%esp),%xmm1 * fill dividend */ - 0x0f, 0x57, 0xc0, /* xorps %xmm0,%xmm0 * clear divisor */ - 0x0f, 0x5e, 0xc8, /* divps %xmm0,%xmm1 * generate fault */ - 0x83, 0xc4, 0x10, /* add $0x10,%esp */ - 0x66, 0x81, 0x0c, 0x24, 0x00, 0x02, /* orw $0x200,(%esp) * disable exceptions */ - 0x0f, 0xae, 0x14, 0x24, /* ldmxcsr (%esp) */ - 0x83, 0xc4, 0x04, /* add $0x4,%esp */ - 0xc3, /* ret */ -}; - -static const BYTE sse_check[] = { - 0x0f, 0x58, 0xc8, /* addps %xmm0,%xmm1 */ - 0xc3, /* ret */ -}; - -static void test_simd_exceptions(void) -{ - int stage; - - /* test if CPU & OS can do sse */ - stage = 1; - got_exception = 0; - run_exception_test(simd_fault_handler, &stage, sse_check, sizeof(sse_check), 0); - if(got_exception) { - skip("system doesn't support SSE\n"); - return; - } - - /* generate a SIMD exception */ - stage = 2; - got_exception = 0; - run_exception_test(simd_fault_handler, &stage, simd_exception_test, - sizeof(simd_exception_test), 0); - ok( got_exception == 1, "got exception: %i, should be 1\n", got_exception); -} - -struct fpu_exception_info -{ - DWORD exception_code; - DWORD exception_offset; - DWORD eip_offset; -}; - -static DWORD fpu_exception_handler(EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame, - CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher) -{ - struct fpu_exception_info *info = *(struct fpu_exception_info **)(frame + 1); - - info->exception_code = rec->ExceptionCode; - info->exception_offset = (BYTE *)rec->ExceptionAddress - (BYTE *)code_mem; - info->eip_offset = context->Eip - (DWORD)code_mem; - - ++context->Eip; - return ExceptionContinueExecution; -} - -static void test_fpu_exceptions(void) -{ - static const BYTE fpu_exception_test_ie[] = - { - 0x83, 0xec, 0x04, /* sub $0x4,%esp */ - 0x66, 0xc7, 0x04, 0x24, 0xfe, 0x03, /* movw $0x3fe,(%esp) */ - 0x9b, 0xd9, 0x7c, 0x24, 0x02, /* fstcw 0x2(%esp) */ - 0xd9, 0x2c, 0x24, /* fldcw (%esp) */ - 0xd9, 0xee, /* fldz */ - 0xd9, 0xe8, /* fld1 */ - 0xde, 0xf1, /* fdivp */ - 0xdd, 0xd8, /* fstp %st(0) */ - 0xdd, 0xd8, /* fstp %st(0) */ - 0x9b, /* fwait */ - 0xdb, 0xe2, /* fnclex */ - 0xd9, 0x6c, 0x24, 0x02, /* fldcw 0x2(%esp) */ - 0x83, 0xc4, 0x04, /* add $0x4,%esp */ - 0xc3, /* ret */ - }; - - static const BYTE fpu_exception_test_de[] = - { - 0x83, 0xec, 0x04, /* sub $0x4,%esp */ - 0x66, 0xc7, 0x04, 0x24, 0xfb, 0x03, /* movw $0x3fb,(%esp) */ - 0x9b, 0xd9, 0x7c, 0x24, 0x02, /* fstcw 0x2(%esp) */ - 0xd9, 0x2c, 0x24, /* fldcw (%esp) */ - 0xdd, 0xd8, /* fstp %st(0) */ - 0xd9, 0xee, /* fldz */ - 0xd9, 0xe8, /* fld1 */ - 0xde, 0xf1, /* fdivp */ - 0x9b, /* fwait */ - 0xdb, 0xe2, /* fnclex */ - 0xdd, 0xd8, /* fstp %st(0) */ - 0xdd, 0xd8, /* fstp %st(0) */ - 0xd9, 0x6c, 0x24, 0x02, /* fldcw 0x2(%esp) */ - 0x83, 0xc4, 0x04, /* add $0x4,%esp */ - 0xc3, /* ret */ - }; - - struct fpu_exception_info info; - - memset(&info, 0, sizeof(info)); - run_exception_test(fpu_exception_handler, &info, fpu_exception_test_ie, sizeof(fpu_exception_test_ie), 0); - ok(info.exception_code == EXCEPTION_FLT_STACK_CHECK, - "Got exception code %#x, expected EXCEPTION_FLT_STACK_CHECK\n", info.exception_code); - ok(info.exception_offset == 0x19 || - broken( is_wow64 && info.exception_offset == info.eip_offset ), - "Got exception offset %#x, expected 0x19\n", info.exception_offset); - ok(info.eip_offset == 0x1b, "Got EIP offset %#x, expected 0x1b\n", info.eip_offset); - - memset(&info, 0, sizeof(info)); - run_exception_test(fpu_exception_handler, &info, fpu_exception_test_de, sizeof(fpu_exception_test_de), 0); - ok(info.exception_code == EXCEPTION_FLT_DIVIDE_BY_ZERO, - "Got exception code %#x, expected EXCEPTION_FLT_DIVIDE_BY_ZERO\n", info.exception_code); - ok(info.exception_offset == 0x17 || - broken( is_wow64 && info.exception_offset == info.eip_offset ), - "Got exception offset %#x, expected 0x17\n", info.exception_offset); - ok(info.eip_offset == 0x19, "Got EIP offset %#x, expected 0x19\n", info.eip_offset); -} - -struct dpe_exception_info { - BOOL exception_caught; - DWORD exception_info; -}; - -static DWORD dpe_exception_handler(EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame, - CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher) -{ - DWORD old_prot; - struct dpe_exception_info *info = *(struct dpe_exception_info **)(frame + 1); - - ok(rec->ExceptionCode == EXCEPTION_ACCESS_VIOLATION, - "Exception code %08x\n", rec->ExceptionCode); - ok(rec->NumberParameters == 2, - "Parameter count: %d\n", rec->NumberParameters); - ok((LPVOID)rec->ExceptionInformation[1] == code_mem, - "Exception address: %p, expected %p\n", - (LPVOID)rec->ExceptionInformation[1], code_mem); - - info->exception_info = rec->ExceptionInformation[0]; - info->exception_caught = TRUE; - - VirtualProtect(code_mem, 1, PAGE_EXECUTE_READWRITE, &old_prot); - return ExceptionContinueExecution; -} - -static void test_dpe_exceptions(void) -{ - static char single_ret[] = {0xC3}; - struct dpe_exception_info info; - NTSTATUS stat; - BOOL has_hw_support; - BOOL is_permanent = FALSE, can_test_without = TRUE, can_test_with = TRUE; - DWORD val; - ULONG len; - - /* Query DEP with len to small */ - stat = pNtQueryInformationProcess(GetCurrentProcess(), ProcessExecuteFlags, &val, sizeof val - 1, &len); - if(stat == STATUS_INVALID_INFO_CLASS) - { - skip("This software platform does not support DEP\n"); - return; - } - ok(stat == STATUS_INFO_LENGTH_MISMATCH, "buffer too small: %08x\n", stat); - - /* Query DEP */ - stat = pNtQueryInformationProcess(GetCurrentProcess(), ProcessExecuteFlags, &val, sizeof val, &len); - ok(stat == STATUS_SUCCESS, "querying DEP: status %08x\n", stat); - if(stat == STATUS_SUCCESS) - { - ok(len == sizeof val, "returned length: %d\n", len); - if(val & MEM_EXECUTE_OPTION_PERMANENT) - { - skip("toggling DEP impossible - status locked\n"); - is_permanent = TRUE; - if(val & MEM_EXECUTE_OPTION_DISABLE) - can_test_without = FALSE; - else - can_test_with = FALSE; - } - } - - if(!is_permanent) - { - /* Enable DEP */ - val = MEM_EXECUTE_OPTION_DISABLE; - stat = pNtSetInformationProcess(GetCurrentProcess(), ProcessExecuteFlags, &val, sizeof val); - ok(stat == STATUS_SUCCESS, "enabling DEP: status %08x\n", stat); - } - - if(can_test_with) - { - /* Try access to locked page with DEP on*/ - info.exception_caught = FALSE; - run_exception_test(dpe_exception_handler, &info, single_ret, sizeof(single_ret), PAGE_NOACCESS); - ok(info.exception_caught == TRUE, "Execution of disabled memory succeeded\n"); - ok(info.exception_info == EXCEPTION_READ_FAULT || - info.exception_info == EXCEPTION_EXECUTE_FAULT, - "Access violation type: %08x\n", (unsigned)info.exception_info); - has_hw_support = info.exception_info == EXCEPTION_EXECUTE_FAULT; - trace("DEP hardware support: %s\n", has_hw_support?"Yes":"No"); - - /* Try execution of data with DEP on*/ - info.exception_caught = FALSE; - run_exception_test(dpe_exception_handler, &info, single_ret, sizeof(single_ret), PAGE_READWRITE); - if(has_hw_support) - { - ok(info.exception_caught == TRUE, "Execution of data memory succeeded\n"); - ok(info.exception_info == EXCEPTION_EXECUTE_FAULT, - "Access violation type: %08x\n", (unsigned)info.exception_info); - } - else - ok(info.exception_caught == FALSE, "Execution trapped without hardware support\n"); - } - else - skip("DEP is in AlwaysOff state\n"); - - if(!is_permanent) - { - /* Disable DEP */ - val = MEM_EXECUTE_OPTION_ENABLE; - stat = pNtSetInformationProcess(GetCurrentProcess(), ProcessExecuteFlags, &val, sizeof val); - ok(stat == STATUS_SUCCESS, "disabling DEP: status %08x\n", stat); - } - - /* page is read without exec here */ - if(can_test_without) - { - /* Try execution of data with DEP off */ - info.exception_caught = FALSE; - run_exception_test(dpe_exception_handler, &info, single_ret, sizeof(single_ret), PAGE_READWRITE); - ok(info.exception_caught == FALSE, "Execution trapped with DEP turned off\n"); - - /* Try access to locked page with DEP off - error code is different than - with hardware DEP on */ - info.exception_caught = FALSE; - run_exception_test(dpe_exception_handler, &info, single_ret, sizeof(single_ret), PAGE_NOACCESS); - ok(info.exception_caught == TRUE, "Execution of disabled memory succeeded\n"); - ok(info.exception_info == EXCEPTION_READ_FAULT, - "Access violation type: %08x\n", (unsigned)info.exception_info); - } - else - skip("DEP is in AlwaysOn state\n"); - - if(!is_permanent) - { - /* Turn off DEP permanently */ - val = MEM_EXECUTE_OPTION_ENABLE | MEM_EXECUTE_OPTION_PERMANENT; - stat = pNtSetInformationProcess(GetCurrentProcess(), ProcessExecuteFlags, &val, sizeof val); - ok(stat == STATUS_SUCCESS, "disabling DEP permanently: status %08x\n", stat); - } - - /* Try to turn off DEP */ - val = MEM_EXECUTE_OPTION_ENABLE; - stat = pNtSetInformationProcess(GetCurrentProcess(), ProcessExecuteFlags, &val, sizeof val); - ok(stat == STATUS_ACCESS_DENIED, "disabling DEP while permanent: status %08x\n", stat); - - /* Try to turn on DEP */ - val = MEM_EXECUTE_OPTION_DISABLE; - stat = pNtSetInformationProcess(GetCurrentProcess(), ProcessExecuteFlags, &val, sizeof val); - ok(stat == STATUS_ACCESS_DENIED, "enabling DEP while permanent: status %08x\n", stat); -} - -#elif defined(__x86_64__) - -#define UNW_FLAG_NHANDLER 0 -#define UNW_FLAG_EHANDLER 1 -#define UNW_FLAG_UHANDLER 2 -#define UNW_FLAG_CHAININFO 4 - -#define UWOP_PUSH_NONVOL 0 -#define UWOP_ALLOC_LARGE 1 -#define UWOP_ALLOC_SMALL 2 -#define UWOP_SET_FPREG 3 -#define UWOP_SAVE_NONVOL 4 -#define UWOP_SAVE_NONVOL_FAR 5 -#define UWOP_SAVE_XMM128 8 -#define UWOP_SAVE_XMM128_FAR 9 -#define UWOP_PUSH_MACHFRAME 10 - -struct results -{ - int rip_offset; /* rip offset from code start */ - int rbp_offset; /* rbp offset from stack pointer */ - int handler; /* expect handler to be set? */ - int rip; /* expected final rip value */ - int frame; /* expected frame return value */ - int regs[8][2]; /* expected values for registers */ -}; - -struct unwind_test -{ - const BYTE *function; - size_t function_size; - const BYTE *unwind_info; - const struct results *results; - unsigned int nb_results; -}; - -enum regs -{ - rax, rcx, rdx, rbx, rsp, rbp, rsi, rdi, - r8, r9, r10, r11, r12, r13, r14, r15 -}; - -static const char * const reg_names[16] = -{ - "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi", - "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15" -}; - -#define UWOP(code,info) (UWOP_##code | ((info) << 4)) - -static void call_virtual_unwind( int testnum, const struct unwind_test *test ) -{ - static const int code_offset = 1024; - static const int unwind_offset = 2048; - void *handler, *data; - CONTEXT context; - RUNTIME_FUNCTION runtime_func; - KNONVOLATILE_CONTEXT_POINTERS ctx_ptr; - UINT i, j, k; - ULONG64 fake_stack[256]; - ULONG64 frame, orig_rip, orig_rbp, unset_reg; - UINT unwind_size = 4 + 2 * test->unwind_info[2] + 8; - - memcpy( (char *)code_mem + code_offset, test->function, test->function_size ); - memcpy( (char *)code_mem + unwind_offset, test->unwind_info, unwind_size ); - - runtime_func.BeginAddress = code_offset; - runtime_func.EndAddress = code_offset + test->function_size; - runtime_func.UnwindData = unwind_offset; - - trace( "code: %p stack: %p\n", code_mem, fake_stack ); - - for (i = 0; i < test->nb_results; i++) - { - memset( &ctx_ptr, 0, sizeof(ctx_ptr) ); - memset( &context, 0x55, sizeof(context) ); - memset( &unset_reg, 0x55, sizeof(unset_reg) ); - for (j = 0; j < 256; j++) fake_stack[j] = j * 8; - - context.Rsp = (ULONG_PTR)fake_stack; - context.Rbp = (ULONG_PTR)fake_stack + test->results[i].rbp_offset; - orig_rbp = context.Rbp; - orig_rip = (ULONG64)code_mem + code_offset + test->results[i].rip_offset; - - trace( "%u/%u: rip=%p (%02x) rbp=%p rsp=%p\n", testnum, i, - (void *)orig_rip, *(BYTE *)orig_rip, (void *)orig_rbp, (void *)context.Rsp ); - - data = (void *)0xdeadbeef; - handler = RtlVirtualUnwind( UNW_FLAG_EHANDLER, (ULONG64)code_mem, orig_rip, - &runtime_func, &context, &data, &frame, &ctx_ptr ); - if (test->results[i].handler) - { - ok( (char *)handler == (char *)code_mem + 0x200, - "%u/%u: wrong handler %p/%p\n", testnum, i, handler, (char *)code_mem + 0x200 ); - if (handler) ok( *(DWORD *)data == 0x08070605, - "%u/%u: wrong handler data %p\n", testnum, i, data ); - } - else - { - ok( handler == NULL, "%u/%u: handler %p instead of NULL\n", testnum, i, handler ); - ok( data == (void *)0xdeadbeef, "%u/%u: handler data set to %p\n", testnum, i, data ); - } - - ok( context.Rip == test->results[i].rip, "%u/%u: wrong rip %p/%x\n", - testnum, i, (void *)context.Rip, test->results[i].rip ); - ok( frame == (ULONG64)fake_stack + test->results[i].frame, "%u/%u: wrong frame %p/%p\n", - testnum, i, (void *)frame, (char *)fake_stack + test->results[i].frame ); - - for (j = 0; j < 16; j++) - { - static const UINT nb_regs = sizeof(test->results[i].regs) / sizeof(test->results[i].regs[0]); - - for (k = 0; k < nb_regs; k++) - { - if (test->results[i].regs[k][0] == -1) - { - k = nb_regs; - break; - } - if (test->results[i].regs[k][0] == j) break; - } - - if (j == rsp) /* rsp is special */ - { - ok( !ctx_ptr.u2.IntegerContext[j], - "%u/%u: rsp should not be set in ctx_ptr\n", testnum, i ); - ok( context.Rsp == (ULONG64)fake_stack + test->results[i].regs[k][1], - "%u/%u: register rsp wrong %p/%p\n", - testnum, i, (void *)context.Rsp, (char *)fake_stack + test->results[i].regs[k][1] ); - continue; - } - - if (ctx_ptr.u2.IntegerContext[j]) - { - ok( k < nb_regs, "%u/%u: register %s should not be set to %lx\n", - testnum, i, reg_names[j], *(&context.Rax + j) ); - if (k < nb_regs) - ok( *(&context.Rax + j) == test->results[i].regs[k][1], - "%u/%u: register %s wrong %p/%x\n", - testnum, i, reg_names[j], (void *)*(&context.Rax + j), test->results[i].regs[k][1] ); - } - else - { - ok( k == nb_regs, "%u/%u: register %s should be set\n", testnum, i, reg_names[j] ); - if (j == rbp) - ok( context.Rbp == orig_rbp, "%u/%u: register rbp wrong %p/unset\n", - testnum, i, (void *)context.Rbp ); - else - ok( *(&context.Rax + j) == unset_reg, - "%u/%u: register %s wrong %p/unset\n", - testnum, i, reg_names[j], (void *)*(&context.Rax + j)); - } - } - } -} - -static void test_virtual_unwind(void) -{ - static const BYTE function_0[] = - { - 0xff, 0xf5, /* 00: push %rbp */ - 0x48, 0x81, 0xec, 0x10, 0x01, 0x00, 0x00, /* 02: sub $0x110,%rsp */ - 0x48, 0x8d, 0x6c, 0x24, 0x30, /* 09: lea 0x30(%rsp),%rbp */ - 0x48, 0x89, 0x9d, 0xf0, 0x00, 0x00, 0x00, /* 0e: mov %rbx,0xf0(%rbp) */ - 0x48, 0x89, 0xb5, 0xf8, 0x00, 0x00, 0x00, /* 15: mov %rsi,0xf8(%rbp) */ - 0x90, /* 1c: nop */ - 0x48, 0x8b, 0x9d, 0xf0, 0x00, 0x00, 0x00, /* 1d: mov 0xf0(%rbp),%rbx */ - 0x48, 0x8b, 0xb5, 0xf8, 0x00, 0x00, 0x00, /* 24: mov 0xf8(%rbp),%rsi */ - 0x48, 0x8d, 0xa5, 0xe0, 0x00, 0x00, 0x00, /* 2b: lea 0xe0(%rbp),%rsp */ - 0x5d, /* 32: pop %rbp */ - 0xc3 /* 33: ret */ - }; - - static const BYTE unwind_info_0[] = - { - 1 | (UNW_FLAG_EHANDLER << 3), /* version + flags */ - 0x1c, /* prolog size */ - 8, /* opcode count */ - (0x03 << 4) | rbp, /* frame reg rbp offset 0x30 */ - - 0x1c, UWOP(SAVE_NONVOL, rsi), 0x25, 0, /* 1c: mov %rsi,0x128(%rsp) */ - 0x15, UWOP(SAVE_NONVOL, rbx), 0x24, 0, /* 15: mov %rbx,0x120(%rsp) */ - 0x0e, UWOP(SET_FPREG, rbp), /* 0e: lea 0x30(%rsp),rbp */ - 0x09, UWOP(ALLOC_LARGE, 0), 0x22, 0, /* 09: sub $0x110,%rsp */ - 0x02, UWOP(PUSH_NONVOL, rbp), /* 02: push %rbp */ - - 0x00, 0x02, 0x00, 0x00, /* handler */ - 0x05, 0x06, 0x07, 0x08, /* data */ - }; - - static const struct results results_0[] = - { - /* offset rbp handler rip frame registers */ - { 0x00, 0x40, FALSE, 0x000, 0x000, { {rsp,0x008}, {-1,-1} }}, - { 0x02, 0x40, FALSE, 0x008, 0x000, { {rsp,0x010}, {rbp,0x000}, {-1,-1} }}, - { 0x09, 0x40, FALSE, 0x118, 0x000, { {rsp,0x120}, {rbp,0x110}, {-1,-1} }}, - { 0x0e, 0x40, FALSE, 0x128, 0x010, { {rsp,0x130}, {rbp,0x120}, {-1,-1} }}, - { 0x15, 0x40, FALSE, 0x128, 0x010, { {rsp,0x130}, {rbp,0x120}, {rbx,0x130}, {-1,-1} }}, - { 0x1c, 0x40, TRUE, 0x128, 0x010, { {rsp,0x130}, {rbp,0x120}, {rbx,0x130}, {rsi,0x138}, {-1,-1}}}, - { 0x1d, 0x40, TRUE, 0x128, 0x010, { {rsp,0x130}, {rbp,0x120}, {rbx,0x130}, {rsi,0x138}, {-1,-1}}}, - { 0x24, 0x40, TRUE, 0x128, 0x010, { {rsp,0x130}, {rbp,0x120}, {rbx,0x130}, {rsi,0x138}, {-1,-1}}}, - { 0x2b, 0x40, FALSE, 0x128, 0x010, { {rsp,0x130}, {rbp,0x120}, {-1,-1}}}, - { 0x32, 0x40, FALSE, 0x008, 0x010, { {rsp,0x010}, {rbp,0x000}, {-1,-1}}}, - { 0x33, 0x40, FALSE, 0x000, 0x010, { {rsp,0x008}, {-1,-1}}}, - }; - - - static const BYTE function_1[] = - { - 0x53, /* 00: push %rbx */ - 0x55, /* 01: push %rbp */ - 0x56, /* 02: push %rsi */ - 0x57, /* 03: push %rdi */ - 0x41, 0x54, /* 04: push %r12 */ - 0x48, 0x83, 0xec, 0x30, /* 06: sub $0x30,%rsp */ - 0x90, 0x90, /* 0a: nop; nop */ - 0x48, 0x83, 0xc4, 0x30, /* 0c: add $0x30,%rsp */ - 0x41, 0x5c, /* 10: pop %r12 */ - 0x5f, /* 12: pop %rdi */ - 0x5e, /* 13: pop %rsi */ - 0x5d, /* 14: pop %rbp */ - 0x5b, /* 15: pop %rbx */ - 0xc3 /* 16: ret */ - }; - - static const BYTE unwind_info_1[] = - { - 1 | (UNW_FLAG_EHANDLER << 3), /* version + flags */ - 0x0a, /* prolog size */ - 6, /* opcode count */ - 0, /* frame reg */ - - 0x0a, UWOP(ALLOC_SMALL, 5), /* 0a: sub $0x30,%rsp */ - 0x06, UWOP(PUSH_NONVOL, r12), /* 06: push %r12 */ - 0x04, UWOP(PUSH_NONVOL, rdi), /* 04: push %rdi */ - 0x03, UWOP(PUSH_NONVOL, rsi), /* 03: push %rsi */ - 0x02, UWOP(PUSH_NONVOL, rbp), /* 02: push %rbp */ - 0x01, UWOP(PUSH_NONVOL, rbx), /* 01: push %rbx */ - - 0x00, 0x02, 0x00, 0x00, /* handler */ - 0x05, 0x06, 0x07, 0x08, /* data */ - }; - - static const struct results results_1[] = - { - /* offset rbp handler rip frame registers */ - { 0x00, 0x50, FALSE, 0x000, 0x000, { {rsp,0x008}, {-1,-1} }}, - { 0x01, 0x50, FALSE, 0x008, 0x000, { {rsp,0x010}, {rbx,0x000}, {-1,-1} }}, - { 0x02, 0x50, FALSE, 0x010, 0x000, { {rsp,0x018}, {rbx,0x008}, {rbp,0x000}, {-1,-1} }}, - { 0x03, 0x50, FALSE, 0x018, 0x000, { {rsp,0x020}, {rbx,0x010}, {rbp,0x008}, {rsi,0x000}, {-1,-1} }}, - { 0x04, 0x50, FALSE, 0x020, 0x000, { {rsp,0x028}, {rbx,0x018}, {rbp,0x010}, {rsi,0x008}, {rdi,0x000}, {-1,-1} }}, - { 0x06, 0x50, FALSE, 0x028, 0x000, { {rsp,0x030}, {rbx,0x020}, {rbp,0x018}, {rsi,0x010}, {rdi,0x008}, {r12,0x000}, {-1,-1} }}, - { 0x0a, 0x50, TRUE, 0x058, 0x000, { {rsp,0x060}, {rbx,0x050}, {rbp,0x048}, {rsi,0x040}, {rdi,0x038}, {r12,0x030}, {-1,-1} }}, - { 0x0c, 0x50, FALSE, 0x058, 0x000, { {rsp,0x060}, {rbx,0x050}, {rbp,0x048}, {rsi,0x040}, {rdi,0x038}, {r12,0x030}, {-1,-1} }}, - { 0x10, 0x50, FALSE, 0x028, 0x000, { {rsp,0x030}, {rbx,0x020}, {rbp,0x018}, {rsi,0x010}, {rdi,0x008}, {r12,0x000}, {-1,-1} }}, - { 0x12, 0x50, FALSE, 0x020, 0x000, { {rsp,0x028}, {rbx,0x018}, {rbp,0x010}, {rsi,0x008}, {rdi,0x000}, {-1,-1} }}, - { 0x13, 0x50, FALSE, 0x018, 0x000, { {rsp,0x020}, {rbx,0x010}, {rbp,0x008}, {rsi,0x000}, {-1,-1} }}, - { 0x14, 0x50, FALSE, 0x010, 0x000, { {rsp,0x018}, {rbx,0x008}, {rbp,0x000}, {-1,-1} }}, - { 0x15, 0x50, FALSE, 0x008, 0x000, { {rsp,0x010}, {rbx,0x000}, {-1,-1} }}, - { 0x16, 0x50, FALSE, 0x000, 0x000, { {rsp,0x008}, {-1,-1} }}, - }; - - static const struct unwind_test tests[] = - { - { function_0, sizeof(function_0), unwind_info_0, - results_0, sizeof(results_0)/sizeof(results_0[0]) }, - { function_1, sizeof(function_1), unwind_info_1, - results_1, sizeof(results_1)/sizeof(results_1[0]) } - }; - unsigned int i; - - for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++) - call_virtual_unwind( i, &tests[i] ); -} - -#endif /* __x86_64__ */ - -START_TEST(exception) -{ - HMODULE hntdll = GetModuleHandleA("ntdll.dll"); - - code_mem = VirtualAlloc(NULL, 65536, MEM_RESERVE | MEM_COMMIT, PAGE_EXECUTE_READWRITE); - if(!code_mem) { - trace("VirtualAlloc failed\n"); - return; - } - - pNtCurrentTeb = (void *)GetProcAddress( hntdll, "NtCurrentTeb" ); - pNtGetContextThread = (void *)GetProcAddress( hntdll, "NtGetContextThread" ); - pNtSetContextThread = (void *)GetProcAddress( hntdll, "NtSetContextThread" ); - pNtReadVirtualMemory = (void *)GetProcAddress( hntdll, "NtReadVirtualMemory" ); - pRtlRaiseException = (void *)GetProcAddress( hntdll, "RtlRaiseException" ); - pNtTerminateProcess = (void *)GetProcAddress( hntdll, "NtTerminateProcess" ); - pRtlAddVectoredExceptionHandler = (void *)GetProcAddress( hntdll, - "RtlAddVectoredExceptionHandler" ); - pRtlRemoveVectoredExceptionHandler = (void *)GetProcAddress( hntdll, - "RtlRemoveVectoredExceptionHandler" ); - pNtQueryInformationProcess = (void*)GetProcAddress( hntdll, - "NtQueryInformationProcess" ); - pNtSetInformationProcess = (void*)GetProcAddress( hntdll, - "NtSetInformationProcess" ); - pIsWow64Process = (void *)GetProcAddress(GetModuleHandle("kernel32.dll"), "IsWow64Process"); - -#ifdef __i386__ - if (!pNtCurrentTeb) - { - skip( "NtCurrentTeb not found\n" ); - return; - } - if (!pIsWow64Process || !pIsWow64Process( GetCurrentProcess(), &is_wow64 )) is_wow64 = FALSE; - - if (pRtlAddVectoredExceptionHandler && pRtlRemoveVectoredExceptionHandler) - have_vectored_api = TRUE; - else - skip("RtlAddVectoredExceptionHandler or RtlRemoveVectoredExceptionHandler not found\n"); - - my_argc = winetest_get_mainargs( &my_argv ); - if (my_argc >= 4) - { - void *addr; - sscanf( my_argv[3], "%p", &addr ); - - if (addr != &test_stage) - { - skip( "child process not mapped at same address (%p/%p)\n", &test_stage, addr); - return; - } - - /* child must be run under a debugger */ - if (!pNtCurrentTeb()->Peb->BeingDebugged) - { - ok(FALSE, "child process not being debugged?\n"); - return; - } - - if (pRtlRaiseException) - { - test_stage = 1; - run_rtlraiseexception_test(0x12345); - run_rtlraiseexception_test(EXCEPTION_BREAKPOINT); - run_rtlraiseexception_test(EXCEPTION_INVALID_HANDLE); - test_stage = 2; - run_rtlraiseexception_test(0x12345); - run_rtlraiseexception_test(EXCEPTION_BREAKPOINT); - run_rtlraiseexception_test(EXCEPTION_INVALID_HANDLE); - } - else - skip( "RtlRaiseException not found\n" ); - - /* rest of tests only run in parent */ - return; - } - - test_prot_fault(); - test_exceptions(); - test_rtlraiseexception(); - test_debugger(); - test_simd_exceptions(); - test_fpu_exceptions(); - test_dpe_exceptions(); - -#elif defined(__x86_64__) - - test_virtual_unwind(); - -#endif - - VirtualFree(code_mem, 0, MEM_FREE); -} diff --git a/rostests/winetests/ntdll/file.c b/rostests/winetests/ntdll/file.c deleted file mode 100644 index e299560eb30..00000000000 --- a/rostests/winetests/ntdll/file.c +++ /dev/null @@ -1,1729 +0,0 @@ -/* Unit test suite for Ntdll file functions - * - * Copyright 2007 Jeff Latimer - * Copyright 2007 Andrey Turkin - * Copyright 2008 Jeff Zaroyko - * Copyright 2011 Dmitry Timoshkov - * - * 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 - * We use function pointers here as there is no import library for NTDLL on - * windows. - */ - -#include -#include - -#include "ntstatus.h" -/* Define WIN32_NO_STATUS so MSVC does not give us duplicate macro - * definition errors when we get to winnt.h - */ -#define WIN32_NO_STATUS - -#include "wine/test.h" -#include "winternl.h" -#include "winuser.h" -#include "winioctl.h" - -#ifndef IO_COMPLETION_ALL_ACCESS -#define IO_COMPLETION_ALL_ACCESS 0x001F0003 -#endif - -static BOOL (WINAPI * pGetVolumePathNameW)(LPCWSTR, LPWSTR, DWORD); -static UINT (WINAPI *pGetSystemWow64DirectoryW)( LPWSTR, UINT ); - -static VOID (WINAPI *pRtlFreeUnicodeString)( PUNICODE_STRING ); -static VOID (WINAPI *pRtlInitUnicodeString)( PUNICODE_STRING, LPCWSTR ); -static BOOL (WINAPI *pRtlDosPathNameToNtPathName_U)( LPCWSTR, PUNICODE_STRING, PWSTR*, CURDIR* ); -static NTSTATUS (WINAPI *pRtlWow64EnableFsRedirectionEx)( ULONG, ULONG * ); - -static NTSTATUS (WINAPI *pNtCreateMailslotFile)( PHANDLE, ULONG, POBJECT_ATTRIBUTES, PIO_STATUS_BLOCK, - ULONG, ULONG, ULONG, PLARGE_INTEGER ); -static NTSTATUS (WINAPI *pNtCreateFile)(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,PLARGE_INTEGER,ULONG,ULONG,ULONG,ULONG,PVOID,ULONG); -static NTSTATUS (WINAPI *pNtOpenFile)(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG); -static NTSTATUS (WINAPI *pNtDeleteFile)(POBJECT_ATTRIBUTES ObjectAttributes); -static NTSTATUS (WINAPI *pNtReadFile)(HANDLE hFile, HANDLE hEvent, - PIO_APC_ROUTINE apc, void* apc_user, - PIO_STATUS_BLOCK io_status, void* buffer, ULONG length, - PLARGE_INTEGER offset, PULONG key); -static NTSTATUS (WINAPI *pNtWriteFile)(HANDLE hFile, HANDLE hEvent, - PIO_APC_ROUTINE apc, void* apc_user, - PIO_STATUS_BLOCK io_status, - const void* buffer, ULONG length, - PLARGE_INTEGER offset, PULONG key); -static NTSTATUS (WINAPI *pNtCancelIoFile)(HANDLE hFile, PIO_STATUS_BLOCK io_status); -static NTSTATUS (WINAPI *pNtCancelIoFileEx)(HANDLE hFile, PIO_STATUS_BLOCK iosb, PIO_STATUS_BLOCK io_status); -static NTSTATUS (WINAPI *pNtClose)( PHANDLE ); - -static NTSTATUS (WINAPI *pNtCreateIoCompletion)(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, ULONG); -static NTSTATUS (WINAPI *pNtOpenIoCompletion)(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES); -static NTSTATUS (WINAPI *pNtQueryIoCompletion)(HANDLE, IO_COMPLETION_INFORMATION_CLASS, PVOID, ULONG, PULONG); -static NTSTATUS (WINAPI *pNtRemoveIoCompletion)(HANDLE, PULONG_PTR, PULONG_PTR, PIO_STATUS_BLOCK, PLARGE_INTEGER); -static NTSTATUS (WINAPI *pNtSetIoCompletion)(HANDLE, ULONG_PTR, ULONG_PTR, NTSTATUS, ULONG); -static NTSTATUS (WINAPI *pNtSetInformationFile)(HANDLE, PIO_STATUS_BLOCK, PVOID, ULONG, FILE_INFORMATION_CLASS); -static NTSTATUS (WINAPI *pNtQueryInformationFile)(HANDLE, PIO_STATUS_BLOCK, PVOID, ULONG, FILE_INFORMATION_CLASS); -static NTSTATUS (WINAPI *pNtQueryDirectoryFile)(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK, - PVOID,ULONG,FILE_INFORMATION_CLASS,BOOLEAN,PUNICODE_STRING,BOOLEAN); -static NTSTATUS (WINAPI *pNtQueryVolumeInformationFile)(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS); - -static inline BOOL is_signaled( HANDLE obj ) -{ - return WaitForSingleObject( obj, 0 ) == 0; -} - -#define PIPENAME "\\\\.\\pipe\\ntdll_tests_file.c" -#define TEST_BUF_LEN 3 - -static BOOL create_pipe( HANDLE *read, HANDLE *write, ULONG flags, ULONG size ) -{ - *read = CreateNamedPipe(PIPENAME, PIPE_ACCESS_INBOUND | flags, PIPE_TYPE_BYTE | PIPE_WAIT, - 1, size, size, NMPWAIT_USE_DEFAULT_WAIT, NULL); - ok(*read != INVALID_HANDLE_VALUE, "CreateNamedPipe failed\n"); - - *write = CreateFileA(PIPENAME, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); - ok(*write != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError()); - - return TRUE; -} - -static HANDLE create_temp_file( ULONG flags ) -{ - char buffer[MAX_PATH]; - HANDLE handle; - - GetTempFileNameA( ".", "foo", 0, buffer ); - handle = CreateFileA(buffer, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, - flags | FILE_FLAG_DELETE_ON_CLOSE, 0); - ok( handle != INVALID_HANDLE_VALUE, "failed to create temp file\n" ); - return (handle == INVALID_HANDLE_VALUE) ? 0 : handle; -} - -#define CVALUE_FIRST 0xfffabbcc -#define CKEY_FIRST 0x1030341 -#define CKEY_SECOND 0x132E46 - -static ULONG_PTR completionKey; -static IO_STATUS_BLOCK ioSb; -static ULONG_PTR completionValue; - -static ULONG get_pending_msgs(HANDLE h) -{ - NTSTATUS res; - ULONG a, req; - - res = pNtQueryIoCompletion( h, IoCompletionBasicInformation, &a, sizeof(a), &req ); - ok( res == STATUS_SUCCESS, "NtQueryIoCompletion failed: %x\n", res ); - if (res != STATUS_SUCCESS) return -1; - ok( req == sizeof(a), "Unexpected response size: %x\n", req ); - return a; -} - -static BOOL get_msg(HANDLE h) -{ - LARGE_INTEGER timeout = {{-10000000*3}}; - DWORD res = pNtRemoveIoCompletion( h, &completionKey, &completionValue, &ioSb, &timeout); - ok( res == STATUS_SUCCESS, "NtRemoveIoCompletion failed: %x\n", res ); - if (res != STATUS_SUCCESS) - { - completionKey = completionValue = 0; - memset(&ioSb, 0, sizeof(ioSb)); - return FALSE; - } - return TRUE; -} - - -static void WINAPI apc( void *arg, IO_STATUS_BLOCK *iosb, ULONG reserved ) -{ - int *count = arg; - - trace( "apc called block %p iosb.status %x iosb.info %lu\n", - iosb, U(*iosb).Status, iosb->Information ); - (*count)++; - ok( !reserved, "reserved is not 0: %x\n", reserved ); -} - -static void create_file_test(void) -{ - static const WCHAR systemrootW[] = {'\\','S','y','s','t','e','m','R','o','o','t', - '\\','f','a','i','l','i','n','g',0}; - static const WCHAR questionmarkInvalidNameW[] = {'a','f','i','l','e','?',0}; - static const WCHAR pipeInvalidNameW[] = {'a','|','b',0}; - NTSTATUS status; - HANDLE dir, file; - WCHAR path[MAX_PATH]; - OBJECT_ATTRIBUTES attr; - IO_STATUS_BLOCK io; - UNICODE_STRING nameW; - - GetCurrentDirectoryW( MAX_PATH, path ); - pRtlDosPathNameToNtPathName_U( path, &nameW, NULL, NULL ); - attr.Length = sizeof(attr); - attr.RootDirectory = 0; - attr.ObjectName = &nameW; - attr.Attributes = OBJ_CASE_INSENSITIVE; - attr.SecurityDescriptor = NULL; - attr.SecurityQualityOfService = NULL; - - /* try various open modes and options on directories */ - status = pNtCreateFile( &dir, GENERIC_READ, &attr, &io, NULL, 0, FILE_SHARE_READ|FILE_SHARE_WRITE, - FILE_OPEN, FILE_DIRECTORY_FILE, NULL, 0 ); - ok( !status, "open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); - CloseHandle( dir ); - - status = pNtCreateFile( &dir, GENERIC_READ, &attr, &io, NULL, 0, FILE_SHARE_READ|FILE_SHARE_WRITE, - FILE_CREATE, FILE_DIRECTORY_FILE, NULL, 0 ); - ok( status == STATUS_OBJECT_NAME_COLLISION || status == STATUS_ACCESS_DENIED, - "open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); - - status = pNtCreateFile( &dir, GENERIC_READ, &attr, &io, NULL, 0, FILE_SHARE_READ|FILE_SHARE_WRITE, - FILE_OPEN_IF, FILE_DIRECTORY_FILE, NULL, 0 ); - ok( !status, "open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); - CloseHandle( dir ); - - status = pNtCreateFile( &dir, GENERIC_READ, &attr, &io, NULL, 0, FILE_SHARE_READ|FILE_SHARE_WRITE, - FILE_SUPERSEDE, FILE_DIRECTORY_FILE, NULL, 0 ); - ok( status == STATUS_INVALID_PARAMETER, "open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); - - status = pNtCreateFile( &dir, GENERIC_READ, &attr, &io, NULL, 0, FILE_SHARE_READ|FILE_SHARE_WRITE, - FILE_OVERWRITE, FILE_DIRECTORY_FILE, NULL, 0 ); - ok( status == STATUS_INVALID_PARAMETER, "open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); - - status = pNtCreateFile( &dir, GENERIC_READ, &attr, &io, NULL, 0, FILE_SHARE_READ|FILE_SHARE_WRITE, - FILE_OVERWRITE_IF, FILE_DIRECTORY_FILE, NULL, 0 ); - ok( status == STATUS_INVALID_PARAMETER, "open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); - - status = pNtCreateFile( &dir, GENERIC_READ, &attr, &io, NULL, 0, FILE_SHARE_READ|FILE_SHARE_WRITE, - FILE_OPEN, 0, NULL, 0 ); - ok( !status, "open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); - CloseHandle( dir ); - - status = pNtCreateFile( &dir, GENERIC_READ, &attr, &io, NULL, 0, FILE_SHARE_READ|FILE_SHARE_WRITE, - FILE_CREATE, 0, NULL, 0 ); - ok( status == STATUS_OBJECT_NAME_COLLISION || status == STATUS_ACCESS_DENIED, - "open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); - - status = pNtCreateFile( &dir, GENERIC_READ, &attr, &io, NULL, 0, FILE_SHARE_READ|FILE_SHARE_WRITE, - FILE_OPEN_IF, 0, NULL, 0 ); - ok( !status, "open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); - CloseHandle( dir ); - - status = pNtCreateFile( &dir, GENERIC_READ, &attr, &io, NULL, 0, FILE_SHARE_READ|FILE_SHARE_WRITE, - FILE_SUPERSEDE, 0, NULL, 0 ); - ok( status == STATUS_OBJECT_NAME_COLLISION || status == STATUS_ACCESS_DENIED, - "open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); - - status = pNtCreateFile( &dir, GENERIC_READ, &attr, &io, NULL, 0, FILE_SHARE_READ|FILE_SHARE_WRITE, - FILE_OVERWRITE, 0, NULL, 0 ); - ok( status == STATUS_OBJECT_NAME_COLLISION || status == STATUS_ACCESS_DENIED, - "open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); - - status = pNtCreateFile( &dir, GENERIC_READ, &attr, &io, NULL, 0, FILE_SHARE_READ|FILE_SHARE_WRITE, - FILE_OVERWRITE_IF, 0, NULL, 0 ); - ok( status == STATUS_OBJECT_NAME_COLLISION || status == STATUS_ACCESS_DENIED, - "open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); - - pRtlFreeUnicodeString( &nameW ); - - pRtlInitUnicodeString( &nameW, systemrootW ); - attr.Length = sizeof(attr); - attr.RootDirectory = NULL; - attr.ObjectName = &nameW; - attr.Attributes = OBJ_CASE_INSENSITIVE; - attr.SecurityDescriptor = NULL; - attr.SecurityQualityOfService = NULL; - dir = NULL; - status = pNtCreateFile( &dir, FILE_APPEND_DATA, &attr, &io, NULL, FILE_ATTRIBUTE_NORMAL, 0, - FILE_OPEN_IF, FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0 ); - todo_wine - ok( status == STATUS_INVALID_PARAMETER, - "open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); - - /* Invalid chars in file/dirnames */ - pRtlDosPathNameToNtPathName_U(questionmarkInvalidNameW, &nameW, NULL, NULL); - attr.ObjectName = &nameW; - status = pNtCreateFile(&dir, GENERIC_READ|SYNCHRONIZE, &attr, &io, NULL, 0, - FILE_SHARE_READ, FILE_CREATE, - FILE_DIRECTORY_FILE|FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0); - ok(status == STATUS_OBJECT_NAME_INVALID, - "open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status); - - status = pNtCreateFile(&file, GENERIC_WRITE|SYNCHRONIZE, &attr, &io, NULL, 0, - 0, FILE_CREATE, - FILE_NON_DIRECTORY_FILE|FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0); - ok(status == STATUS_OBJECT_NAME_INVALID, - "open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status); - - pRtlDosPathNameToNtPathName_U(pipeInvalidNameW, &nameW, NULL, NULL); - attr.ObjectName = &nameW; - status = pNtCreateFile(&dir, GENERIC_READ|SYNCHRONIZE, &attr, &io, NULL, 0, - FILE_SHARE_READ, FILE_CREATE, - FILE_DIRECTORY_FILE|FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0); - ok(status == STATUS_OBJECT_NAME_INVALID, - "open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status); - - status = pNtCreateFile(&file, GENERIC_WRITE|SYNCHRONIZE, &attr, &io, NULL, 0, - 0, FILE_CREATE, - FILE_NON_DIRECTORY_FILE|FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0); - ok(status == STATUS_OBJECT_NAME_INVALID, - "open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status); -} - -static void open_file_test(void) -{ - NTSTATUS status; - HANDLE dir, root, handle; - WCHAR path[MAX_PATH]; - BYTE data[1024]; - OBJECT_ATTRIBUTES attr; - IO_STATUS_BLOCK io; - UNICODE_STRING nameW; - UINT i, len; - BOOL restart = TRUE; - - len = GetWindowsDirectoryW( path, MAX_PATH ); - pRtlDosPathNameToNtPathName_U( path, &nameW, NULL, NULL ); - attr.Length = sizeof(attr); - attr.RootDirectory = 0; - attr.ObjectName = &nameW; - attr.Attributes = OBJ_CASE_INSENSITIVE; - attr.SecurityDescriptor = NULL; - attr.SecurityQualityOfService = NULL; - status = pNtOpenFile( &dir, SYNCHRONIZE|FILE_LIST_DIRECTORY, &attr, &io, - FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_DIRECTORY_FILE|FILE_SYNCHRONOUS_IO_NONALERT ); - ok( !status, "open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); - pRtlFreeUnicodeString( &nameW ); - - path[3] = 0; /* root of the drive */ - pRtlDosPathNameToNtPathName_U( path, &nameW, NULL, NULL ); - status = pNtOpenFile( &root, GENERIC_READ, &attr, &io, - FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_DIRECTORY_FILE ); - ok( !status, "open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); - pRtlFreeUnicodeString( &nameW ); - - /* test opening system dir with RootDirectory set to windows dir */ - GetSystemDirectoryW( path, MAX_PATH ); - while (path[len] == '\\') len++; - nameW.Buffer = path + len; - nameW.Length = lstrlenW(path + len) * sizeof(WCHAR); - attr.RootDirectory = dir; - status = pNtOpenFile( &handle, GENERIC_READ, &attr, &io, - FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_DIRECTORY_FILE ); - ok( !status, "open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); - CloseHandle( handle ); - - /* try uppercase name */ - for (i = len; path[i]; i++) if (path[i] >= 'a' && path[i] <= 'z') path[i] -= 'a' - 'A'; - status = pNtOpenFile( &handle, GENERIC_READ, &attr, &io, - FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_DIRECTORY_FILE ); - ok( !status, "open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); - CloseHandle( handle ); - - /* try with leading backslash */ - nameW.Buffer--; - nameW.Length += sizeof(WCHAR); - status = pNtOpenFile( &handle, GENERIC_READ, &attr, &io, - FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_DIRECTORY_FILE ); - ok( status == STATUS_INVALID_PARAMETER || - status == STATUS_OBJECT_NAME_INVALID || - status == STATUS_OBJECT_PATH_SYNTAX_BAD, - "open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); - if (!status) CloseHandle( handle ); - - /* try with empty name */ - nameW.Length = 0; - status = pNtOpenFile( &handle, GENERIC_READ, &attr, &io, - FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_DIRECTORY_FILE ); - ok( !status, "open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); - CloseHandle( handle ); - - /* try open by file id */ - - while (!pNtQueryDirectoryFile( dir, NULL, NULL, NULL, &io, data, sizeof(data), - FileIdBothDirectoryInformation, TRUE, NULL, restart )) - { - FILE_ID_BOTH_DIRECTORY_INFORMATION *info = (FILE_ID_BOTH_DIRECTORY_INFORMATION *)data; - - restart = FALSE; - - if (!info->FileId.QuadPart) continue; - - nameW.Buffer = (WCHAR *)&info->FileId; - nameW.Length = sizeof(info->FileId); - info->FileName[info->FileNameLength/sizeof(WCHAR)] = 0; - attr.RootDirectory = dir; - /* We skip 'open' files by not specifying FILE_SHARE_WRITE */ - status = pNtOpenFile( &handle, GENERIC_READ, &attr, &io, - FILE_SHARE_READ, - FILE_OPEN_BY_FILE_ID | - ((info->FileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? FILE_DIRECTORY_FILE : 0) ); - ok( status == STATUS_SUCCESS || status == STATUS_ACCESS_DENIED || status == STATUS_NOT_IMPLEMENTED || status == STATUS_SHARING_VIOLATION, - "open %s failed %x\n", wine_dbgstr_w(info->FileName), status ); - if (status == STATUS_NOT_IMPLEMENTED) - { - win_skip( "FILE_OPEN_BY_FILE_ID not supported\n" ); - break; - } - if (status == STATUS_SHARING_VIOLATION) - trace( "%s is currently open\n", wine_dbgstr_w(info->FileName) ); - if (!status) - { - BYTE buf[sizeof(FILE_ALL_INFORMATION) + MAX_PATH * sizeof(WCHAR)]; - - if (!pNtQueryInformationFile( handle, &io, buf, sizeof(buf), FileAllInformation )) - { - FILE_ALL_INFORMATION *fai = (FILE_ALL_INFORMATION *)buf; - - /* check that it's the same file/directory */ - - /* don't check the size for directories */ - if (!(info->FileAttributes & FILE_ATTRIBUTE_DIRECTORY)) - ok( info->EndOfFile.QuadPart == fai->StandardInformation.EndOfFile.QuadPart, - "mismatched file size for %s\n", wine_dbgstr_w(info->FileName)); - - ok( info->CreationTime.QuadPart == fai->BasicInformation.CreationTime.QuadPart, - "mismatched creation time for %s\n", wine_dbgstr_w(info->FileName)); - } - CloseHandle( handle ); - - /* try same thing from drive root */ - attr.RootDirectory = root; - status = pNtOpenFile( &handle, GENERIC_READ, &attr, &io, - FILE_SHARE_READ|FILE_SHARE_WRITE, - FILE_OPEN_BY_FILE_ID | - ((info->FileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? FILE_DIRECTORY_FILE : 0) ); - ok( status == STATUS_SUCCESS || status == STATUS_NOT_IMPLEMENTED, - "open %s failed %x\n", wine_dbgstr_w(info->FileName), status ); - if (!status) CloseHandle( handle ); - } - } - - CloseHandle( dir ); - CloseHandle( root ); -} - -static void delete_file_test(void) -{ - NTSTATUS ret; - OBJECT_ATTRIBUTES attr; - UNICODE_STRING nameW; - WCHAR pathW[MAX_PATH]; - WCHAR pathsubW[MAX_PATH]; - static const WCHAR testdirW[] = {'n','t','d','e','l','e','t','e','f','i','l','e',0}; - static const WCHAR subdirW[] = {'\\','s','u','b',0}; - - ret = GetTempPathW(MAX_PATH, pathW); - if (!ret) - { - ok(0, "couldn't get temp dir\n"); - return; - } - if (ret + sizeof(testdirW)/sizeof(WCHAR)-1 + sizeof(subdirW)/sizeof(WCHAR)-1 >= MAX_PATH) - { - ok(0, "MAX_PATH exceeded in constructing paths\n"); - return; - } - - lstrcatW(pathW, testdirW); - lstrcpyW(pathsubW, pathW); - lstrcatW(pathsubW, subdirW); - - ret = CreateDirectoryW(pathW, NULL); - ok(ret == TRUE, "couldn't create directory ntdeletefile\n"); - if (!pRtlDosPathNameToNtPathName_U(pathW, &nameW, NULL, NULL)) - { - ok(0,"RtlDosPathNametoNtPathName_U failed\n"); - return; - } - - attr.Length = sizeof(attr); - attr.RootDirectory = 0; - attr.Attributes = OBJ_CASE_INSENSITIVE; - attr.ObjectName = &nameW; - attr.SecurityDescriptor = NULL; - attr.SecurityQualityOfService = NULL; - - /* test NtDeleteFile on an empty directory */ - ret = pNtDeleteFile(&attr); - ok(ret == STATUS_SUCCESS, "NtDeleteFile should succeed in removing an empty directory\n"); - ret = RemoveDirectoryW(pathW); - ok(ret == FALSE, "expected to fail removing directory, NtDeleteFile should have removed it\n"); - - /* test NtDeleteFile on a non-empty directory */ - ret = CreateDirectoryW(pathW, NULL); - ok(ret == TRUE, "couldn't create directory ntdeletefile ?!\n"); - ret = CreateDirectoryW(pathsubW, NULL); - ok(ret == TRUE, "couldn't create directory subdir\n"); - ret = pNtDeleteFile(&attr); - ok(ret == STATUS_SUCCESS, "expected NtDeleteFile to ret STATUS_SUCCESS\n"); - ret = RemoveDirectoryW(pathsubW); - ok(ret == TRUE, "expected to remove directory ntdeletefile\\sub\n"); - ret = RemoveDirectoryW(pathW); - ok(ret == TRUE, "expected to remove directory ntdeletefile, NtDeleteFile failed.\n"); - - pRtlFreeUnicodeString( &nameW ); -} - -static void read_file_test(void) -{ - const char text[] = "foobar"; - HANDLE handle, read, write; - NTSTATUS status; - IO_STATUS_BLOCK iosb, iosb2; - DWORD written; - int apc_count = 0; - char buffer[128]; - LARGE_INTEGER offset; - HANDLE event = CreateEventA( NULL, TRUE, FALSE, NULL ); - BOOL ret; - - buffer[0] = 1; - - if (!create_pipe( &read, &write, FILE_FLAG_OVERLAPPED, 4096 )) return; - - /* try read with no data */ - U(iosb).Status = 0xdeadbabe; - iosb.Information = 0xdeadbeef; - ok( is_signaled( read ), "read handle is not signaled\n" ); - status = pNtReadFile( read, event, apc, &apc_count, &iosb, buffer, 1, NULL, NULL ); - ok( status == STATUS_PENDING, "wrong status %x\n", status ); - ok( !is_signaled( read ), "read handle is signaled\n" ); - ok( !is_signaled( event ), "event is signaled\n" ); - ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information ); - ok( !apc_count, "apc was called\n" ); - WriteFile( write, buffer, 1, &written, NULL ); - /* iosb updated here by async i/o */ - Sleep(1); /* FIXME: needed for wine to run the i/o apc */ - ok( U(iosb).Status == 0, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == 1, "wrong info %lu\n", iosb.Information ); - ok( !is_signaled( read ), "read handle is signaled\n" ); - ok( is_signaled( event ), "event is not signaled\n" ); - ok( !apc_count, "apc was called\n" ); - apc_count = 0; - SleepEx( 1, FALSE ); /* non-alertable sleep */ - ok( !apc_count, "apc was called\n" ); - SleepEx( 1, TRUE ); /* alertable sleep */ - ok( apc_count == 1, "apc not called\n" ); - - /* with no event, the pipe handle itself gets signaled */ - apc_count = 0; - U(iosb).Status = 0xdeadbabe; - iosb.Information = 0xdeadbeef; - ok( !is_signaled( read ), "read handle is not signaled\n" ); - status = pNtReadFile( read, 0, apc, &apc_count, &iosb, buffer, 1, NULL, NULL ); - ok( status == STATUS_PENDING, "wrong status %x\n", status ); - ok( !is_signaled( read ), "read handle is signaled\n" ); - ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information ); - ok( !apc_count, "apc was called\n" ); - WriteFile( write, buffer, 1, &written, NULL ); - /* iosb updated here by async i/o */ - Sleep(1); /* FIXME: needed for wine to run the i/o apc */ - ok( U(iosb).Status == 0, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == 1, "wrong info %lu\n", iosb.Information ); - ok( is_signaled( read ), "read handle is signaled\n" ); - ok( !apc_count, "apc was called\n" ); - apc_count = 0; - SleepEx( 1, FALSE ); /* non-alertable sleep */ - ok( !apc_count, "apc was called\n" ); - SleepEx( 1, TRUE ); /* alertable sleep */ - ok( apc_count == 1, "apc not called\n" ); - - /* now read with data ready */ - apc_count = 0; - U(iosb).Status = 0xdeadbabe; - iosb.Information = 0xdeadbeef; - ResetEvent( event ); - WriteFile( write, buffer, 1, &written, NULL ); - status = pNtReadFile( read, event, apc, &apc_count, &iosb, buffer, 1, NULL, NULL ); - ok( status == STATUS_SUCCESS, "wrong status %x\n", status ); - ok( U(iosb).Status == 0, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == 1, "wrong info %lu\n", iosb.Information ); - ok( is_signaled( event ), "event is not signaled\n" ); - ok( !apc_count, "apc was called\n" ); - SleepEx( 1, FALSE ); /* non-alertable sleep */ - ok( !apc_count, "apc was called\n" ); - SleepEx( 1, TRUE ); /* alertable sleep */ - ok( apc_count == 1, "apc not called\n" ); - - /* try read with no data */ - apc_count = 0; - U(iosb).Status = 0xdeadbabe; - iosb.Information = 0xdeadbeef; - ok( is_signaled( event ), "event is not signaled\n" ); /* check that read resets the event */ - status = pNtReadFile( read, event, apc, &apc_count, &iosb, buffer, 2, NULL, NULL ); - ok( status == STATUS_PENDING, "wrong status %x\n", status ); - ok( !is_signaled( event ), "event is signaled\n" ); - ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information ); - ok( !apc_count, "apc was called\n" ); - WriteFile( write, buffer, 1, &written, NULL ); - /* partial read is good enough */ - Sleep(1); /* FIXME: needed for wine to run the i/o apc */ - ok( is_signaled( event ), "event is signaled\n" ); - ok( U(iosb).Status == 0, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == 1, "wrong info %lu\n", iosb.Information ); - ok( !apc_count, "apc was called\n" ); - SleepEx( 1, TRUE ); /* alertable sleep */ - ok( apc_count == 1, "apc was not called\n" ); - - /* read from disconnected pipe */ - apc_count = 0; - U(iosb).Status = 0xdeadbabe; - iosb.Information = 0xdeadbeef; - CloseHandle( write ); - status = pNtReadFile( read, event, apc, &apc_count, &iosb, buffer, 1, NULL, NULL ); - ok( status == STATUS_PIPE_BROKEN, "wrong status %x\n", status ); - ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information ); - ok( !is_signaled( event ), "event is signaled\n" ); - ok( !apc_count, "apc was called\n" ); - SleepEx( 1, TRUE ); /* alertable sleep */ - ok( !apc_count, "apc was called\n" ); - CloseHandle( read ); - - /* read from closed handle */ - apc_count = 0; - U(iosb).Status = 0xdeadbabe; - iosb.Information = 0xdeadbeef; - SetEvent( event ); - status = pNtReadFile( read, event, apc, &apc_count, &iosb, buffer, 1, NULL, NULL ); - ok( status == STATUS_INVALID_HANDLE, "wrong status %x\n", status ); - ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information ); - ok( is_signaled( event ), "event is signaled\n" ); /* not reset on invalid handle */ - ok( !apc_count, "apc was called\n" ); - SleepEx( 1, TRUE ); /* alertable sleep */ - ok( !apc_count, "apc was called\n" ); - - /* disconnect while async read is in progress */ - if (!create_pipe( &read, &write, FILE_FLAG_OVERLAPPED, 4096 )) return; - apc_count = 0; - U(iosb).Status = 0xdeadbabe; - iosb.Information = 0xdeadbeef; - status = pNtReadFile( read, event, apc, &apc_count, &iosb, buffer, 2, NULL, NULL ); - ok( status == STATUS_PENDING, "wrong status %x\n", status ); - ok( !is_signaled( event ), "event is signaled\n" ); - ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information ); - ok( !apc_count, "apc was called\n" ); - CloseHandle( write ); - Sleep(1); /* FIXME: needed for wine to run the i/o apc */ - ok( U(iosb).Status == STATUS_PIPE_BROKEN, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == 0, "wrong info %lu\n", iosb.Information ); - ok( is_signaled( event ), "event is signaled\n" ); - ok( !apc_count, "apc was called\n" ); - SleepEx( 1, TRUE ); /* alertable sleep */ - ok( apc_count == 1, "apc was not called\n" ); - CloseHandle( read ); - - if (!create_pipe( &read, &write, FILE_FLAG_OVERLAPPED, 4096 )) return; - ret = DuplicateHandle(GetCurrentProcess(), read, GetCurrentProcess(), &handle, 0, TRUE, DUPLICATE_SAME_ACCESS); - ok(ret, "Failed to duplicate handle: %d\n", GetLastError()); - - apc_count = 0; - U(iosb).Status = 0xdeadbabe; - iosb.Information = 0xdeadbeef; - status = pNtReadFile( handle, event, apc, &apc_count, &iosb, buffer, 2, NULL, NULL ); - ok( status == STATUS_PENDING, "wrong status %x\n", status ); - ok( !is_signaled( event ), "event is signaled\n" ); - ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information ); - ok( !apc_count, "apc was called\n" ); - /* Cancel by other handle */ - status = pNtCancelIoFile( read, &iosb2 ); - ok(status == STATUS_SUCCESS, "failed to cancel by different handle: %x\n", status); - Sleep(1); /* FIXME: needed for wine to run the i/o apc */ - ok( U(iosb).Status == STATUS_CANCELLED, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == 0, "wrong info %lu\n", iosb.Information ); - ok( is_signaled( event ), "event is signaled\n" ); - todo_wine ok( !apc_count, "apc was called\n" ); - SleepEx( 1, TRUE ); /* alertable sleep */ - ok( apc_count == 1, "apc was not called\n" ); - - apc_count = 0; - U(iosb).Status = 0xdeadbabe; - iosb.Information = 0xdeadbeef; - status = pNtReadFile( read, event, apc, &apc_count, &iosb, buffer, 2, NULL, NULL ); - ok( status == STATUS_PENDING, "wrong status %x\n", status ); - ok( !is_signaled( event ), "event is signaled\n" ); - ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information ); - ok( !apc_count, "apc was called\n" ); - /* Close queued handle */ - CloseHandle( read ); - SleepEx( 1, TRUE ); /* alertable sleep */ - ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information ); - status = pNtCancelIoFile( read, &iosb2 ); - ok(status == STATUS_INVALID_HANDLE, "cancelled by closed handle?\n"); - status = pNtCancelIoFile( handle, &iosb2 ); - ok(status == STATUS_SUCCESS, "failed to cancel: %x\n", status); - Sleep(1); /* FIXME: needed for wine to run the i/o apc */ - ok( U(iosb).Status == STATUS_CANCELLED, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == 0, "wrong info %lu\n", iosb.Information ); - ok( is_signaled( event ), "event is signaled\n" ); - todo_wine ok( !apc_count, "apc was called\n" ); - SleepEx( 1, TRUE ); /* alertable sleep */ - ok( apc_count == 1, "apc was not called\n" ); - CloseHandle( handle ); - CloseHandle( write ); - - if (pNtCancelIoFileEx) - { - /* Basic Cancel Ex */ - if (!create_pipe( &read, &write, FILE_FLAG_OVERLAPPED, 4096 )) return; - - apc_count = 0; - U(iosb).Status = 0xdeadbabe; - iosb.Information = 0xdeadbeef; - status = pNtReadFile( read, event, apc, &apc_count, &iosb, buffer, 2, NULL, NULL ); - ok( status == STATUS_PENDING, "wrong status %x\n", status ); - ok( !is_signaled( event ), "event is signaled\n" ); - ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information ); - ok( !apc_count, "apc was called\n" ); - status = pNtCancelIoFileEx( read, &iosb, &iosb2 ); - ok(status == STATUS_SUCCESS, "Failed to cancel I/O\n"); - Sleep(1); /* FIXME: needed for wine to run the i/o apc */ - ok( U(iosb).Status == STATUS_CANCELLED, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == 0, "wrong info %lu\n", iosb.Information ); - ok( is_signaled( event ), "event is signaled\n" ); - todo_wine ok( !apc_count, "apc was called\n" ); - SleepEx( 1, TRUE ); /* alertable sleep */ - ok( apc_count == 1, "apc was not called\n" ); - - /* Duplicate iosb */ - apc_count = 0; - U(iosb).Status = 0xdeadbabe; - iosb.Information = 0xdeadbeef; - status = pNtReadFile( read, event, apc, &apc_count, &iosb, buffer, 2, NULL, NULL ); - ok( status == STATUS_PENDING, "wrong status %x\n", status ); - ok( !is_signaled( event ), "event is signaled\n" ); - ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information ); - ok( !apc_count, "apc was called\n" ); - status = pNtReadFile( read, event, apc, &apc_count, &iosb, buffer, 2, NULL, NULL ); - ok( status == STATUS_PENDING, "wrong status %x\n", status ); - ok( !is_signaled( event ), "event is signaled\n" ); - ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information ); - ok( !apc_count, "apc was called\n" ); - status = pNtCancelIoFileEx( read, &iosb, &iosb2 ); - ok(status == STATUS_SUCCESS, "Failed to cancel I/O\n"); - Sleep(1); /* FIXME: needed for wine to run the i/o apc */ - ok( U(iosb).Status == STATUS_CANCELLED, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == 0, "wrong info %lu\n", iosb.Information ); - ok( is_signaled( event ), "event is signaled\n" ); - todo_wine ok( !apc_count, "apc was called\n" ); - SleepEx( 1, TRUE ); /* alertable sleep */ - ok( apc_count == 2, "apc was not called\n" ); - - CloseHandle( read ); - CloseHandle( write ); - } - - /* now try a real file */ - if (!(handle = create_temp_file( FILE_FLAG_OVERLAPPED ))) return; - apc_count = 0; - U(iosb).Status = 0xdeadbabe; - iosb.Information = 0xdeadbeef; - offset.QuadPart = 0; - ResetEvent( event ); - status = pNtWriteFile( handle, event, apc, &apc_count, &iosb, text, strlen(text), &offset, NULL ); - ok( status == STATUS_SUCCESS || status == STATUS_PENDING, "wrong status %x\n", status ); - if (status == STATUS_PENDING) WaitForSingleObject( event, 1000 ); - ok( U(iosb).Status == STATUS_SUCCESS, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == strlen(text), "wrong info %lu\n", iosb.Information ); - ok( is_signaled( event ), "event is signaled\n" ); - ok( !apc_count, "apc was called\n" ); - SleepEx( 1, TRUE ); /* alertable sleep */ - ok( apc_count == 1, "apc was not called\n" ); - - apc_count = 0; - U(iosb).Status = 0xdeadbabe; - iosb.Information = 0xdeadbeef; - offset.QuadPart = 0; - ResetEvent( event ); - status = pNtReadFile( handle, event, apc, &apc_count, &iosb, buffer, strlen(text) + 10, &offset, NULL ); - ok( status == STATUS_SUCCESS || - status == STATUS_PENDING, /* vista */ - "wrong status %x\n", status ); - if (status == STATUS_PENDING) WaitForSingleObject( event, 1000 ); - ok( U(iosb).Status == STATUS_SUCCESS, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == strlen(text), "wrong info %lu\n", iosb.Information ); - ok( is_signaled( event ), "event is signaled\n" ); - ok( !apc_count, "apc was called\n" ); - SleepEx( 1, TRUE ); /* alertable sleep */ - ok( apc_count == 1, "apc was not called\n" ); - - /* read beyond eof */ - apc_count = 0; - U(iosb).Status = 0xdeadbabe; - iosb.Information = 0xdeadbeef; - offset.QuadPart = strlen(text) + 2; - status = pNtReadFile( handle, event, apc, &apc_count, &iosb, buffer, 2, &offset, NULL ); - if (status == STATUS_PENDING) /* vista */ - { - WaitForSingleObject( event, 1000 ); - ok( U(iosb).Status == STATUS_END_OF_FILE, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == 0, "wrong info %lu\n", iosb.Information ); - ok( is_signaled( event ), "event is signaled\n" ); - ok( !apc_count, "apc was called\n" ); - SleepEx( 1, TRUE ); /* alertable sleep */ - ok( apc_count == 1, "apc was not called\n" ); - } - else - { - ok( status == STATUS_END_OF_FILE, "wrong status %x\n", status ); - ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information ); - ok( !is_signaled( event ), "event is signaled\n" ); - ok( !apc_count, "apc was called\n" ); - SleepEx( 1, TRUE ); /* alertable sleep */ - ok( !apc_count, "apc was called\n" ); - } - CloseHandle( handle ); - - /* now a non-overlapped file */ - if (!(handle = create_temp_file(0))) return; - apc_count = 0; - U(iosb).Status = 0xdeadbabe; - iosb.Information = 0xdeadbeef; - offset.QuadPart = 0; - status = pNtWriteFile( handle, event, apc, &apc_count, &iosb, text, strlen(text), &offset, NULL ); - ok( status == STATUS_END_OF_FILE || - status == STATUS_SUCCESS || - status == STATUS_PENDING, /* vista */ - "wrong status %x\n", status ); - if (status == STATUS_PENDING) WaitForSingleObject( event, 1000 ); - ok( U(iosb).Status == STATUS_SUCCESS, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == strlen(text), "wrong info %lu\n", iosb.Information ); - ok( is_signaled( event ), "event is signaled\n" ); - ok( !apc_count, "apc was called\n" ); - SleepEx( 1, TRUE ); /* alertable sleep */ - ok( apc_count == 1, "apc was not called\n" ); - - apc_count = 0; - U(iosb).Status = 0xdeadbabe; - iosb.Information = 0xdeadbeef; - offset.QuadPart = 0; - ResetEvent( event ); - status = pNtReadFile( handle, event, apc, &apc_count, &iosb, buffer, strlen(text) + 10, &offset, NULL ); - ok( status == STATUS_SUCCESS, "wrong status %x\n", status ); - ok( U(iosb).Status == STATUS_SUCCESS, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == strlen(text), "wrong info %lu\n", iosb.Information ); - ok( is_signaled( event ), "event is signaled\n" ); - ok( !apc_count, "apc was called\n" ); - SleepEx( 1, TRUE ); /* alertable sleep */ - todo_wine ok( !apc_count, "apc was called\n" ); - - /* read beyond eof */ - apc_count = 0; - U(iosb).Status = 0xdeadbabe; - iosb.Information = 0xdeadbeef; - offset.QuadPart = strlen(text) + 2; - ResetEvent( event ); - status = pNtReadFile( handle, event, apc, &apc_count, &iosb, buffer, 2, &offset, NULL ); - ok( status == STATUS_END_OF_FILE, "wrong status %x\n", status ); - todo_wine ok( U(iosb).Status == STATUS_END_OF_FILE, "wrong status %x\n", U(iosb).Status ); - todo_wine ok( iosb.Information == 0, "wrong info %lu\n", iosb.Information ); - todo_wine ok( is_signaled( event ), "event is not signaled\n" ); - ok( !apc_count, "apc was called\n" ); - SleepEx( 1, TRUE ); /* alertable sleep */ - ok( !apc_count, "apc was called\n" ); - - CloseHandle( handle ); - - CloseHandle( event ); -} - -static void append_file_test(void) -{ - const char text[] = "foobar"; - HANDLE handle; - NTSTATUS status; - IO_STATUS_BLOCK iosb; - DWORD written; - char buffer[128]; - - GetTempFileNameA( ".", "foo", 0, buffer ); - /* It is possible to open a file with only FILE_APPEND_DATA access flags. - It matches the O_WRONLY|O_APPEND open() posix behavior */ - handle = CreateFileA(buffer, FILE_APPEND_DATA, 0, NULL, CREATE_ALWAYS, - FILE_FLAG_DELETE_ON_CLOSE, 0); - ok( handle != INVALID_HANDLE_VALUE, "Failed to create a temp file in FILE_APPEND_DATA mode.\n" ); - if(handle == INVALID_HANDLE_VALUE) - { - skip("Couldn't create a temporary file, skipping FILE_APPEND_DATA test\n"); - return; - } - - U(iosb).Status = STATUS_PENDING; - iosb.Information = 0; - - status = pNtWriteFile(handle, NULL, NULL, NULL, &iosb, - text, sizeof(text), NULL, NULL); - - if (status == STATUS_PENDING) - { - WaitForSingleObject( handle, 1000 ); - status = U(iosb).Status; - } - written = iosb.Information; - - todo_wine - ok(status == STATUS_SUCCESS && written == sizeof(text), "FILE_APPEND_DATA NtWriteFile failed\n"); - - CloseHandle(handle); -} - -static void nt_mailslot_test(void) -{ - HANDLE hslot; - ACCESS_MASK DesiredAccess; - OBJECT_ATTRIBUTES attr; - - ULONG CreateOptions; - ULONG MailslotQuota; - ULONG MaxMessageSize; - LARGE_INTEGER TimeOut; - IO_STATUS_BLOCK IoStatusBlock; - NTSTATUS rc; - UNICODE_STRING str; - WCHAR buffer1[] = { '\\','?','?','\\','M','A','I','L','S','L','O','T','\\', - 'R',':','\\','F','R','E','D','\0' }; - - TimeOut.QuadPart = -1; - - pRtlInitUnicodeString(&str, buffer1); - InitializeObjectAttributes(&attr, &str, OBJ_CASE_INSENSITIVE, 0, NULL); - CreateOptions = MailslotQuota = MaxMessageSize = 0; - DesiredAccess = GENERIC_READ; - - /* - * Check for NULL pointer handling - */ - rc = pNtCreateMailslotFile(NULL, DesiredAccess, - &attr, &IoStatusBlock, CreateOptions, MailslotQuota, MaxMessageSize, - &TimeOut); - ok( rc == STATUS_ACCESS_VIOLATION || - rc == STATUS_INVALID_PARAMETER, /* win2k3 */ - "rc = %x not STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER\n", rc); - - /* - * Test to see if the Timeout can be NULL - */ - hslot = (HANDLE)0xdeadbeef; - rc = pNtCreateMailslotFile(&hslot, DesiredAccess, - &attr, &IoStatusBlock, CreateOptions, MailslotQuota, MaxMessageSize, - NULL); - ok( rc == STATUS_SUCCESS || - rc == STATUS_INVALID_PARAMETER, /* win2k3 */ - "rc = %x not STATUS_SUCCESS or STATUS_INVALID_PARAMETER\n", rc); - ok( hslot != 0, "Handle is invalid\n"); - - if ( rc == STATUS_SUCCESS ) pNtClose(hslot); - - /* - * Test that the length field is checked properly - */ - attr.Length = 0; - rc = pNtCreateMailslotFile(&hslot, DesiredAccess, - &attr, &IoStatusBlock, CreateOptions, MailslotQuota, MaxMessageSize, - &TimeOut); - todo_wine ok( rc == STATUS_INVALID_PARAMETER, "rc = %x not c000000d STATUS_INVALID_PARAMETER\n", rc); - - if (rc == STATUS_SUCCESS) pNtClose(hslot); - - attr.Length = sizeof(OBJECT_ATTRIBUTES)+1; - rc = pNtCreateMailslotFile(&hslot, DesiredAccess, - &attr, &IoStatusBlock, CreateOptions, MailslotQuota, MaxMessageSize, - &TimeOut); - todo_wine ok( rc == STATUS_INVALID_PARAMETER, "rc = %x not c000000d STATUS_INVALID_PARAMETER\n", rc); - - if (rc == STATUS_SUCCESS) pNtClose(hslot); - - /* - * Test handling of a NULL unicode string in ObjectName - */ - InitializeObjectAttributes(&attr, &str, OBJ_CASE_INSENSITIVE, 0, NULL); - attr.ObjectName = NULL; - rc = pNtCreateMailslotFile(&hslot, DesiredAccess, - &attr, &IoStatusBlock, CreateOptions, MailslotQuota, MaxMessageSize, - &TimeOut); - ok( rc == STATUS_OBJECT_PATH_SYNTAX_BAD || - rc == STATUS_INVALID_PARAMETER, - "rc = %x not STATUS_OBJECT_PATH_SYNTAX_BAD or STATUS_INVALID_PARAMETER\n", rc); - - if (rc == STATUS_SUCCESS) pNtClose(hslot); - - /* - * Test a valid call - */ - InitializeObjectAttributes(&attr, &str, OBJ_CASE_INSENSITIVE, 0, NULL); - rc = pNtCreateMailslotFile(&hslot, DesiredAccess, - &attr, &IoStatusBlock, CreateOptions, MailslotQuota, MaxMessageSize, - &TimeOut); - ok( rc == STATUS_SUCCESS, "Create MailslotFile failed rc = %x\n", rc); - ok( hslot != 0, "Handle is invalid\n"); - - rc = pNtClose(hslot); - ok( rc == STATUS_SUCCESS, "NtClose failed\n"); -} - -static void test_iocp_setcompletion(HANDLE h) -{ - NTSTATUS res; - ULONG count; - - res = pNtSetIoCompletion( h, CKEY_FIRST, CVALUE_FIRST, STATUS_INVALID_DEVICE_REQUEST, 3 ); - ok( res == STATUS_SUCCESS, "NtSetIoCompletion failed: %x\n", res ); - - count = get_pending_msgs(h); - ok( count == 1, "Unexpected msg count: %d\n", count ); - - if (get_msg(h)) - { - ok( completionKey == CKEY_FIRST, "Invalid completion key: %lx\n", completionKey ); - ok( ioSb.Information == 3, "Invalid ioSb.Information: %ld\n", ioSb.Information ); - ok( U(ioSb).Status == STATUS_INVALID_DEVICE_REQUEST, "Invalid ioSb.Status: %x\n", U(ioSb).Status); - ok( completionValue == CVALUE_FIRST, "Invalid completion value: %lx\n", completionValue ); - } - - count = get_pending_msgs(h); - ok( !count, "Unexpected msg count: %d\n", count ); -} - -static void test_iocp_fileio(HANDLE h) -{ - static const char pipe_name[] = "\\\\.\\pipe\\iocompletiontestnamedpipe"; - - IO_STATUS_BLOCK iosb; - FILE_COMPLETION_INFORMATION fci = {h, CKEY_SECOND}; - HANDLE hPipeSrv, hPipeClt; - NTSTATUS res; - - hPipeSrv = CreateNamedPipeA( pipe_name, PIPE_ACCESS_INBOUND, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, 4, 1024, 1024, 1000, NULL ); - ok( hPipeSrv != INVALID_HANDLE_VALUE, "Cannot create named pipe\n" ); - if (hPipeSrv != INVALID_HANDLE_VALUE ) - { - hPipeClt = CreateFileA( pipe_name, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_NO_BUFFERING | FILE_FLAG_OVERLAPPED, NULL ); - ok( hPipeClt != INVALID_HANDLE_VALUE, "Cannot connect to pipe\n" ); - if (hPipeClt != INVALID_HANDLE_VALUE) - { - U(iosb).Status = 0xdeadbeef; - res = pNtSetInformationFile( hPipeSrv, &iosb, &fci, sizeof(fci), FileCompletionInformation ); - ok( res == STATUS_INVALID_PARAMETER, "Unexpected NtSetInformationFile on non-overlapped handle: %x\n", res ); - ok( U(iosb).Status == STATUS_INVALID_PARAMETER /* 98 */ || U(iosb).Status == 0xdeadbeef /* NT4+ */, - "Unexpected iosb.Status on non-overlapped handle: %x\n", U(iosb).Status ); - CloseHandle(hPipeClt); - } - CloseHandle( hPipeSrv ); - } - - hPipeSrv = CreateNamedPipeA( pipe_name, PIPE_ACCESS_INBOUND | FILE_FLAG_OVERLAPPED, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, 4, 1024, 1024, 1000, NULL ); - ok( hPipeSrv != INVALID_HANDLE_VALUE, "Cannot create named pipe\n" ); - if (hPipeSrv == INVALID_HANDLE_VALUE ) - return; - - hPipeClt = CreateFileA( pipe_name, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_NO_BUFFERING | FILE_FLAG_OVERLAPPED, NULL ); - ok( hPipeClt != INVALID_HANDLE_VALUE, "Cannot connect to pipe\n" ); - if (hPipeClt != INVALID_HANDLE_VALUE) - { - OVERLAPPED o = {0,}; - BYTE send_buf[TEST_BUF_LEN], recv_buf[TEST_BUF_LEN]; - DWORD read; - long count; - - U(iosb).Status = 0xdeadbeef; - res = pNtSetInformationFile( hPipeSrv, &iosb, &fci, sizeof(fci), FileCompletionInformation ); - ok( res == STATUS_SUCCESS, "NtSetInformationFile failed: %x\n", res ); - ok( U(iosb).Status == STATUS_SUCCESS, "iosb.Status invalid: %x\n", U(iosb).Status ); - - memset( send_buf, 0, TEST_BUF_LEN ); - memset( recv_buf, 0xde, TEST_BUF_LEN ); - count = get_pending_msgs(h); - ok( !count, "Unexpected msg count: %ld\n", count ); - ReadFile( hPipeSrv, recv_buf, TEST_BUF_LEN, &read, &o); - count = get_pending_msgs(h); - ok( !count, "Unexpected msg count: %ld\n", count ); - WriteFile( hPipeClt, send_buf, TEST_BUF_LEN, &read, NULL ); - - if (get_msg(h)) - { - ok( completionKey == CKEY_SECOND, "Invalid completion key: %lx\n", completionKey ); - ok( ioSb.Information == 3, "Invalid ioSb.Information: %ld\n", ioSb.Information ); - ok( U(ioSb).Status == STATUS_SUCCESS, "Invalid ioSb.Status: %x\n", U(ioSb).Status); - ok( completionValue == (ULONG_PTR)&o, "Invalid completion value: %lx\n", completionValue ); - ok( !memcmp( send_buf, recv_buf, TEST_BUF_LEN ), "Receive buffer (%x %x %x) did not match send buffer (%x %x %x)\n", recv_buf[0], recv_buf[1], recv_buf[2], send_buf[0], send_buf[1], send_buf[2] ); - } - count = get_pending_msgs(h); - ok( !count, "Unexpected msg count: %ld\n", count ); - - memset( send_buf, 0, TEST_BUF_LEN ); - memset( recv_buf, 0xde, TEST_BUF_LEN ); - WriteFile( hPipeClt, send_buf, 2, &read, NULL ); - count = get_pending_msgs(h); - ok( !count, "Unexpected msg count: %ld\n", count ); - ReadFile( hPipeSrv, recv_buf, 2, &read, &o); - count = get_pending_msgs(h); - ok( count == 1, "Unexpected msg count: %ld\n", count ); - if (get_msg(h)) - { - ok( completionKey == CKEY_SECOND, "Invalid completion key: %lx\n", completionKey ); - ok( ioSb.Information == 2, "Invalid ioSb.Information: %ld\n", ioSb.Information ); - ok( U(ioSb).Status == STATUS_SUCCESS, "Invalid ioSb.Status: %x\n", U(ioSb).Status); - ok( completionValue == (ULONG_PTR)&o, "Invalid completion value: %lx\n", completionValue ); - ok( !memcmp( send_buf, recv_buf, 2 ), "Receive buffer (%x %x) did not match send buffer (%x %x)\n", recv_buf[0], recv_buf[1], send_buf[0], send_buf[1] ); - } - - ReadFile( hPipeSrv, recv_buf, TEST_BUF_LEN, &read, &o); - CloseHandle( hPipeSrv ); - count = get_pending_msgs(h); - ok( count == 1, "Unexpected msg count: %ld\n", count ); - if (get_msg(h)) - { - ok( completionKey == CKEY_SECOND, "Invalid completion key: %lx\n", completionKey ); - ok( ioSb.Information == 0, "Invalid ioSb.Information: %ld\n", ioSb.Information ); - /* wine sends wrong status here */ - todo_wine ok( U(ioSb).Status == STATUS_PIPE_BROKEN, "Invalid ioSb.Status: %x\n", U(ioSb).Status); - ok( completionValue == (ULONG_PTR)&o, "Invalid completion value: %lx\n", completionValue ); - } - } - - CloseHandle( hPipeClt ); -} - -static void test_file_basic_information(void) -{ - IO_STATUS_BLOCK io; - FILE_BASIC_INFORMATION fbi; - HANDLE h; - int res; - int attrib_mask = FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_NORMAL; - - if (!(h = create_temp_file(0))) return; - - /* Check default first */ - memset(&fbi, 0, sizeof(fbi)); - res = pNtQueryInformationFile(h, &io, &fbi, sizeof fbi, FileBasicInformation); - ok ( res == STATUS_SUCCESS, "can't get attributes, res %x\n", res); - ok ( (fbi.FileAttributes & FILE_ATTRIBUTE_ARCHIVE) == FILE_ATTRIBUTE_ARCHIVE, - "attribute %x not expected\n", fbi.FileAttributes ); - - /* Then SYSTEM */ - /* Clear fbi to avoid setting times */ - memset(&fbi, 0, sizeof(fbi)); - fbi.FileAttributes = FILE_ATTRIBUTE_SYSTEM; - U(io).Status = 0xdeadbeef; - res = pNtSetInformationFile(h, &io, &fbi, sizeof fbi, FileBasicInformation); - ok ( res == STATUS_SUCCESS, "can't set system attribute, NtSetInformationFile returned %x\n", res ); - ok ( U(io).Status == STATUS_SUCCESS, "can't set system attribute, io.Status is %x\n", U(io).Status ); - - memset(&fbi, 0, sizeof(fbi)); - res = pNtQueryInformationFile(h, &io, &fbi, sizeof fbi, FileBasicInformation); - ok ( res == STATUS_SUCCESS, "can't get attributes\n"); - todo_wine ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_SYSTEM, "attribute %x not FILE_ATTRIBUTE_SYSTEM\n", fbi.FileAttributes ); - - /* Then HIDDEN */ - memset(&fbi, 0, sizeof(fbi)); - fbi.FileAttributes = FILE_ATTRIBUTE_HIDDEN; - U(io).Status = 0xdeadbeef; - res = pNtSetInformationFile(h, &io, &fbi, sizeof fbi, FileBasicInformation); - ok ( res == STATUS_SUCCESS, "can't set system attribute, NtSetInformationFile returned %x\n", res ); - ok ( U(io).Status == STATUS_SUCCESS, "can't set system attribute, io.Status is %x\n", U(io).Status ); - - memset(&fbi, 0, sizeof(fbi)); - res = pNtQueryInformationFile(h, &io, &fbi, sizeof fbi, FileBasicInformation); - ok ( res == STATUS_SUCCESS, "can't get attributes\n"); - todo_wine ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_HIDDEN, "attribute %x not FILE_ATTRIBUTE_HIDDEN\n", fbi.FileAttributes ); - - /* Check NORMAL last of all (to make sure we can clear attributes) */ - memset(&fbi, 0, sizeof(fbi)); - fbi.FileAttributes = FILE_ATTRIBUTE_NORMAL; - U(io).Status = 0xdeadbeef; - res = pNtSetInformationFile(h, &io, &fbi, sizeof fbi, FileBasicInformation); - ok ( res == STATUS_SUCCESS, "can't set normal attribute, NtSetInformationFile returned %x\n", res ); - ok ( U(io).Status == STATUS_SUCCESS, "can't set normal attribute, io.Status is %x\n", U(io).Status ); - - memset(&fbi, 0, sizeof(fbi)); - res = pNtQueryInformationFile(h, &io, &fbi, sizeof fbi, FileBasicInformation); - ok ( res == STATUS_SUCCESS, "can't get attributes\n"); - todo_wine ok ( (fbi.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_NORMAL, "attribute %x not 0\n", fbi.FileAttributes ); - - CloseHandle( h ); -} - -static void test_file_all_information(void) -{ - IO_STATUS_BLOCK io; - /* FileAllInformation, like FileNameInformation, has a variable-length pathname - * buffer at the end. Vista objects with STATUS_BUFFER_OVERFLOW if you - * don't leave enough room there. - */ - struct { - FILE_ALL_INFORMATION fai; - WCHAR buf[256]; - } fai_buf; - HANDLE h; - int res; - int attrib_mask = FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_NORMAL; - - if (!(h = create_temp_file(0))) return; - - /* Check default first */ - res = pNtQueryInformationFile(h, &io, &fai_buf.fai, sizeof fai_buf, FileAllInformation); - ok ( res == STATUS_SUCCESS, "can't get attributes, res %x\n", res); - ok ( (fai_buf.fai.BasicInformation.FileAttributes & FILE_ATTRIBUTE_ARCHIVE) == FILE_ATTRIBUTE_ARCHIVE, - "attribute %x not expected\n", fai_buf.fai.BasicInformation.FileAttributes ); - - /* Then SYSTEM */ - /* Clear fbi to avoid setting times */ - memset(&fai_buf.fai.BasicInformation, 0, sizeof(fai_buf.fai.BasicInformation)); - fai_buf.fai.BasicInformation.FileAttributes = FILE_ATTRIBUTE_SYSTEM; - U(io).Status = 0xdeadbeef; - res = pNtSetInformationFile(h, &io, &fai_buf.fai, sizeof fai_buf, FileAllInformation); - ok ( res == STATUS_INVALID_INFO_CLASS || broken(res == STATUS_NOT_IMPLEMENTED), "shouldn't be able to set FileAllInformation, res %x\n", res); - todo_wine ok ( U(io).Status == 0xdeadbeef, "shouldn't be able to set FileAllInformation, io.Status is %x\n", U(io).Status); - U(io).Status = 0xdeadbeef; - res = pNtSetInformationFile(h, &io, &fai_buf.fai.BasicInformation, sizeof fai_buf.fai.BasicInformation, FileBasicInformation); - ok ( res == STATUS_SUCCESS, "can't set system attribute, res: %x\n", res ); - ok ( U(io).Status == STATUS_SUCCESS, "can't set system attribute, io.Status: %x\n", U(io).Status ); - - memset(&fai_buf.fai, 0, sizeof(fai_buf.fai)); - res = pNtQueryInformationFile(h, &io, &fai_buf.fai, sizeof fai_buf, FileAllInformation); - ok ( res == STATUS_SUCCESS, "can't get attributes, res %x\n", res); - todo_wine ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_SYSTEM, "attribute %x not FILE_ATTRIBUTE_SYSTEM\n", fai_buf.fai.BasicInformation.FileAttributes ); - - /* Then HIDDEN */ - memset(&fai_buf.fai.BasicInformation, 0, sizeof(fai_buf.fai.BasicInformation)); - fai_buf.fai.BasicInformation.FileAttributes = FILE_ATTRIBUTE_HIDDEN; - U(io).Status = 0xdeadbeef; - res = pNtSetInformationFile(h, &io, &fai_buf.fai.BasicInformation, sizeof fai_buf.fai.BasicInformation, FileBasicInformation); - ok ( res == STATUS_SUCCESS, "can't set system attribute, res: %x\n", res ); - ok ( U(io).Status == STATUS_SUCCESS, "can't set system attribute, io.Status: %x\n", U(io).Status ); - - memset(&fai_buf.fai, 0, sizeof(fai_buf.fai)); - res = pNtQueryInformationFile(h, &io, &fai_buf.fai, sizeof fai_buf, FileAllInformation); - ok ( res == STATUS_SUCCESS, "can't get attributes\n"); - todo_wine ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_HIDDEN, "attribute %x not FILE_ATTRIBUTE_HIDDEN\n", fai_buf.fai.BasicInformation.FileAttributes ); - - /* Check NORMAL last of all (to make sure we can clear attributes) */ - memset(&fai_buf.fai.BasicInformation, 0, sizeof(fai_buf.fai.BasicInformation)); - fai_buf.fai.BasicInformation.FileAttributes = FILE_ATTRIBUTE_NORMAL; - U(io).Status = 0xdeadbeef; - res = pNtSetInformationFile(h, &io, &fai_buf.fai.BasicInformation, sizeof fai_buf.fai.BasicInformation, FileBasicInformation); - ok ( res == STATUS_SUCCESS, "can't set system attribute, res: %x\n", res ); - ok ( U(io).Status == STATUS_SUCCESS, "can't set system attribute, io.Status: %x\n", U(io).Status ); - - memset(&fai_buf.fai, 0, sizeof(fai_buf.fai)); - res = pNtQueryInformationFile(h, &io, &fai_buf.fai, sizeof fai_buf, FileAllInformation); - ok ( res == STATUS_SUCCESS, "can't get attributes\n"); - todo_wine ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) == FILE_ATTRIBUTE_NORMAL, "attribute %x not FILE_ATTRIBUTE_NORMAL\n", fai_buf.fai.BasicInformation.FileAttributes ); - - CloseHandle( h ); -} - -static void test_file_both_information(void) -{ - IO_STATUS_BLOCK io; - FILE_BOTH_DIR_INFORMATION fbi; - HANDLE h; - int res; - - if (!(h = create_temp_file(0))) return; - - memset(&fbi, 0, sizeof(fbi)); - res = pNtQueryInformationFile(h, &io, &fbi, sizeof fbi, FileBothDirectoryInformation); - ok ( res == STATUS_INVALID_INFO_CLASS || res == STATUS_NOT_IMPLEMENTED, "shouldn't be able to query FileBothDirectoryInformation, res %x\n", res); - - CloseHandle( h ); -} - -static void test_iocompletion(void) -{ - HANDLE h = INVALID_HANDLE_VALUE; - NTSTATUS res; - - res = pNtCreateIoCompletion( &h, IO_COMPLETION_ALL_ACCESS, NULL, 0); - - ok( res == 0, "NtCreateIoCompletion anonymous failed: %x\n", res ); - ok( h && h != INVALID_HANDLE_VALUE, "Invalid handle returned\n" ); - - if ( h && h != INVALID_HANDLE_VALUE) - { - test_iocp_setcompletion(h); - test_iocp_fileio(h); - pNtClose(h); - } -} - -static void test_file_name_information(void) -{ - WCHAR *file_name, *volume_prefix, *expected; - FILE_NAME_INFORMATION *info; - ULONG old_redir = 1, tmp; - UINT file_name_size; - IO_STATUS_BLOCK io; - UINT info_size; - HRESULT hr; - HANDLE h; - UINT len; - - /* GetVolumePathName is not present before w2k */ - if (!pGetVolumePathNameW) { - win_skip("GetVolumePathNameW not found\n"); - return; - } - - file_name_size = GetSystemDirectoryW( NULL, 0 ); - file_name = HeapAlloc( GetProcessHeap(), 0, file_name_size * sizeof(*file_name) ); - volume_prefix = HeapAlloc( GetProcessHeap(), 0, file_name_size * sizeof(*volume_prefix) ); - expected = HeapAlloc( GetProcessHeap(), 0, file_name_size * sizeof(*volume_prefix) ); - - len = GetSystemDirectoryW( file_name, file_name_size ); - ok(len == file_name_size - 1, - "GetSystemDirectoryW returned %u, expected %u.\n", - len, file_name_size - 1); - - len = pGetVolumePathNameW( file_name, volume_prefix, file_name_size ); - ok(len, "GetVolumePathNameW failed.\n"); - - len = lstrlenW( volume_prefix ); - if (len && volume_prefix[len - 1] == '\\') --len; - memcpy( expected, file_name + len, (file_name_size - len - 1) * sizeof(WCHAR) ); - expected[file_name_size - len - 1] = '\0'; - - /* A bit more than we actually need, but it keeps the calculation simple. */ - info_size = sizeof(*info) + (file_name_size * sizeof(WCHAR)); - info = HeapAlloc( GetProcessHeap(), 0, info_size ); - - if (pRtlWow64EnableFsRedirectionEx) pRtlWow64EnableFsRedirectionEx( TRUE, &old_redir ); - h = CreateFileW( file_name, GENERIC_READ, - FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, - NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0 ); - if (pRtlWow64EnableFsRedirectionEx) pRtlWow64EnableFsRedirectionEx( old_redir, &tmp ); - ok(h != INVALID_HANDLE_VALUE, "Failed to open file.\n"); - - hr = pNtQueryInformationFile( h, &io, info, sizeof(*info) - 1, FileNameInformation ); - ok(hr == STATUS_INFO_LENGTH_MISMATCH, "NtQueryInformationFile returned %#x.\n", hr); - - memset( info, 0xcc, info_size ); - hr = pNtQueryInformationFile( h, &io, info, sizeof(*info), FileNameInformation ); - ok(hr == STATUS_BUFFER_OVERFLOW, "NtQueryInformationFile returned %#x, expected %#x.\n", - hr, STATUS_BUFFER_OVERFLOW); - ok(U(io).Status == STATUS_BUFFER_OVERFLOW, "io.Status is %#x, expected %#x.\n", - U(io).Status, STATUS_BUFFER_OVERFLOW); - ok(info->FileNameLength == lstrlenW( expected ) * sizeof(WCHAR), "info->FileNameLength is %u\n", info->FileNameLength); - ok(info->FileName[2] == 0xcccc, "info->FileName[2] is %#x, expected 0xcccc.\n", info->FileName[2]); - ok(CharLowerW((LPWSTR)(UINT_PTR)info->FileName[1]) == CharLowerW((LPWSTR)(UINT_PTR)expected[1]), - "info->FileName[1] is %p, expected %p.\n", - CharLowerW((LPWSTR)(UINT_PTR)info->FileName[1]), CharLowerW((LPWSTR)(UINT_PTR)expected[1])); - ok(io.Information == sizeof(*info), "io.Information is %lu\n", io.Information); - - memset( info, 0xcc, info_size ); - hr = pNtQueryInformationFile( h, &io, info, info_size, FileNameInformation ); - ok(hr == STATUS_SUCCESS, "NtQueryInformationFile returned %#x, expected %#x.\n", hr, STATUS_SUCCESS); - ok(U(io).Status == STATUS_SUCCESS, "io.Status is %#x, expected %#x.\n", U(io).Status, STATUS_SUCCESS); - ok(info->FileNameLength == lstrlenW( expected ) * sizeof(WCHAR), "info->FileNameLength is %u\n", info->FileNameLength); - ok(info->FileName[info->FileNameLength / sizeof(WCHAR)] == 0xcccc, "info->FileName[len] is %#x, expected 0xcccc.\n", - info->FileName[info->FileNameLength / sizeof(WCHAR)]); - info->FileName[info->FileNameLength / sizeof(WCHAR)] = '\0'; - ok(!lstrcmpiW( info->FileName, expected ), "info->FileName is %s, expected %s.\n", - wine_dbgstr_w( info->FileName ), wine_dbgstr_w( expected )); - ok(io.Information == FIELD_OFFSET(FILE_NAME_INFORMATION, FileName) + info->FileNameLength, - "io.Information is %lu, expected %u.\n", - io.Information, FIELD_OFFSET(FILE_NAME_INFORMATION, FileName) + info->FileNameLength); - - CloseHandle( h ); - HeapFree( GetProcessHeap(), 0, info ); - HeapFree( GetProcessHeap(), 0, expected ); - HeapFree( GetProcessHeap(), 0, volume_prefix ); - - if (old_redir || !pGetSystemWow64DirectoryW || !(file_name_size = pGetSystemWow64DirectoryW( NULL, 0 ))) - { - skip("Not running on WoW64, skipping test.\n"); - HeapFree( GetProcessHeap(), 0, file_name ); - return; - } - - h = CreateFileW( file_name, GENERIC_READ, - FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, - NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0 ); - ok(h != INVALID_HANDLE_VALUE, "Failed to open file.\n"); - HeapFree( GetProcessHeap(), 0, file_name ); - - file_name = HeapAlloc( GetProcessHeap(), 0, file_name_size * sizeof(*file_name) ); - volume_prefix = HeapAlloc( GetProcessHeap(), 0, file_name_size * sizeof(*volume_prefix) ); - expected = HeapAlloc( GetProcessHeap(), 0, file_name_size * sizeof(*expected) ); - - len = pGetSystemWow64DirectoryW( file_name, file_name_size ); - ok(len == file_name_size - 1, - "GetSystemWow64DirectoryW returned %u, expected %u.\n", - len, file_name_size - 1); - - len = pGetVolumePathNameW( file_name, volume_prefix, file_name_size ); - ok(len, "GetVolumePathNameW failed.\n"); - - len = lstrlenW( volume_prefix ); - if (len && volume_prefix[len - 1] == '\\') --len; - memcpy( expected, file_name + len, (file_name_size - len - 1) * sizeof(WCHAR) ); - expected[file_name_size - len - 1] = '\0'; - - info_size = sizeof(*info) + (file_name_size * sizeof(WCHAR)); - info = HeapAlloc( GetProcessHeap(), 0, info_size ); - - memset( info, 0xcc, info_size ); - hr = pNtQueryInformationFile( h, &io, info, info_size, FileNameInformation ); - ok(hr == STATUS_SUCCESS, "NtQueryInformationFile returned %#x, expected %#x.\n", hr, STATUS_SUCCESS); - info->FileName[info->FileNameLength / sizeof(WCHAR)] = '\0'; - ok(!lstrcmpiW( info->FileName, expected ), "info->FileName is %s, expected %s.\n", - wine_dbgstr_w( info->FileName ), wine_dbgstr_w( expected )); - - CloseHandle( h ); - HeapFree( GetProcessHeap(), 0, info ); - HeapFree( GetProcessHeap(), 0, expected ); - HeapFree( GetProcessHeap(), 0, volume_prefix ); - HeapFree( GetProcessHeap(), 0, file_name ); -} - -static void test_file_all_name_information(void) -{ - WCHAR *file_name, *volume_prefix, *expected; - FILE_ALL_INFORMATION *info; - ULONG old_redir = 1, tmp; - UINT file_name_size; - IO_STATUS_BLOCK io; - UINT info_size; - HRESULT hr; - HANDLE h; - UINT len; - - /* GetVolumePathName is not present before w2k */ - if (!pGetVolumePathNameW) { - win_skip("GetVolumePathNameW not found\n"); - return; - } - - file_name_size = GetSystemDirectoryW( NULL, 0 ); - file_name = HeapAlloc( GetProcessHeap(), 0, file_name_size * sizeof(*file_name) ); - volume_prefix = HeapAlloc( GetProcessHeap(), 0, file_name_size * sizeof(*volume_prefix) ); - expected = HeapAlloc( GetProcessHeap(), 0, file_name_size * sizeof(*volume_prefix) ); - - len = GetSystemDirectoryW( file_name, file_name_size ); - ok(len == file_name_size - 1, - "GetSystemDirectoryW returned %u, expected %u.\n", - len, file_name_size - 1); - - len = pGetVolumePathNameW( file_name, volume_prefix, file_name_size ); - ok(len, "GetVolumePathNameW failed.\n"); - - len = lstrlenW( volume_prefix ); - if (len && volume_prefix[len - 1] == '\\') --len; - memcpy( expected, file_name + len, (file_name_size - len - 1) * sizeof(WCHAR) ); - expected[file_name_size - len - 1] = '\0'; - - /* A bit more than we actually need, but it keeps the calculation simple. */ - info_size = sizeof(*info) + (file_name_size * sizeof(WCHAR)); - info = HeapAlloc( GetProcessHeap(), 0, info_size ); - - if (pRtlWow64EnableFsRedirectionEx) pRtlWow64EnableFsRedirectionEx( TRUE, &old_redir ); - h = CreateFileW( file_name, GENERIC_READ, - FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, - NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0 ); - if (pRtlWow64EnableFsRedirectionEx) pRtlWow64EnableFsRedirectionEx( old_redir, &tmp ); - ok(h != INVALID_HANDLE_VALUE, "Failed to open file.\n"); - - hr = pNtQueryInformationFile( h, &io, info, sizeof(*info) - 1, FileAllInformation ); - ok(hr == STATUS_INFO_LENGTH_MISMATCH, "NtQueryInformationFile returned %#x, expected %#x.\n", - hr, STATUS_INFO_LENGTH_MISMATCH); - - memset( info, 0xcc, info_size ); - hr = pNtQueryInformationFile( h, &io, info, sizeof(*info), FileAllInformation ); - ok(hr == STATUS_BUFFER_OVERFLOW, "NtQueryInformationFile returned %#x, expected %#x.\n", - hr, STATUS_BUFFER_OVERFLOW); - ok(U(io).Status == STATUS_BUFFER_OVERFLOW, "io.Status is %#x, expected %#x.\n", - U(io).Status, STATUS_BUFFER_OVERFLOW); - ok(info->NameInformation.FileNameLength == lstrlenW( expected ) * sizeof(WCHAR), - "info->NameInformation.FileNameLength is %u\n", info->NameInformation.FileNameLength ); - ok(info->NameInformation.FileName[2] == 0xcccc, - "info->NameInformation.FileName[2] is %#x, expected 0xcccc.\n", info->NameInformation.FileName[2]); - ok(CharLowerW((LPWSTR)(UINT_PTR)info->NameInformation.FileName[1]) == CharLowerW((LPWSTR)(UINT_PTR)expected[1]), - "info->NameInformation.FileName[1] is %p, expected %p.\n", - CharLowerW((LPWSTR)(UINT_PTR)info->NameInformation.FileName[1]), CharLowerW((LPWSTR)(UINT_PTR)expected[1])); - ok(io.Information == sizeof(*info), "io.Information is %lu\n", io.Information); - - memset( info, 0xcc, info_size ); - hr = pNtQueryInformationFile( h, &io, info, info_size, FileAllInformation ); - ok(hr == STATUS_SUCCESS, "NtQueryInformationFile returned %#x, expected %#x.\n", hr, STATUS_SUCCESS); - ok(U(io).Status == STATUS_SUCCESS, "io.Status is %#x, expected %#x.\n", U(io).Status, STATUS_SUCCESS); - ok(info->NameInformation.FileNameLength == lstrlenW( expected ) * sizeof(WCHAR), - "info->NameInformation.FileNameLength is %u\n", info->NameInformation.FileNameLength ); - ok(info->NameInformation.FileName[info->NameInformation.FileNameLength / sizeof(WCHAR)] == 0xcccc, - "info->NameInformation.FileName[len] is %#x, expected 0xcccc.\n", - info->NameInformation.FileName[info->NameInformation.FileNameLength / sizeof(WCHAR)]); - info->NameInformation.FileName[info->NameInformation.FileNameLength / sizeof(WCHAR)] = '\0'; - ok(!lstrcmpiW( info->NameInformation.FileName, expected ), - "info->NameInformation.FileName is %s, expected %s.\n", - wine_dbgstr_w( info->NameInformation.FileName ), wine_dbgstr_w( expected )); - ok(io.Information == FIELD_OFFSET(FILE_ALL_INFORMATION, NameInformation.FileName) - + info->NameInformation.FileNameLength, - "io.Information is %lu\n", io.Information ); - - CloseHandle( h ); - HeapFree( GetProcessHeap(), 0, info ); - HeapFree( GetProcessHeap(), 0, expected ); - HeapFree( GetProcessHeap(), 0, volume_prefix ); - - if (old_redir || !pGetSystemWow64DirectoryW || !(file_name_size = pGetSystemWow64DirectoryW( NULL, 0 ))) - { - skip("Not running on WoW64, skipping test.\n"); - HeapFree( GetProcessHeap(), 0, file_name ); - return; - } - - h = CreateFileW( file_name, GENERIC_READ, - FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, - NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0 ); - ok(h != INVALID_HANDLE_VALUE, "Failed to open file.\n"); - HeapFree( GetProcessHeap(), 0, file_name ); - - file_name = HeapAlloc( GetProcessHeap(), 0, file_name_size * sizeof(*file_name) ); - volume_prefix = HeapAlloc( GetProcessHeap(), 0, file_name_size * sizeof(*volume_prefix) ); - expected = HeapAlloc( GetProcessHeap(), 0, file_name_size * sizeof(*expected) ); - - len = pGetSystemWow64DirectoryW( file_name, file_name_size ); - ok(len == file_name_size - 1, - "GetSystemWow64DirectoryW returned %u, expected %u.\n", - len, file_name_size - 1); - - len = pGetVolumePathNameW( file_name, volume_prefix, file_name_size ); - ok(len, "GetVolumePathNameW failed.\n"); - - len = lstrlenW( volume_prefix ); - if (len && volume_prefix[len - 1] == '\\') --len; - memcpy( expected, file_name + len, (file_name_size - len - 1) * sizeof(WCHAR) ); - expected[file_name_size - len - 1] = '\0'; - - info_size = sizeof(*info) + (file_name_size * sizeof(WCHAR)); - info = HeapAlloc( GetProcessHeap(), 0, info_size ); - - memset( info, 0xcc, info_size ); - hr = pNtQueryInformationFile( h, &io, info, info_size, FileAllInformation ); - ok(hr == STATUS_SUCCESS, "NtQueryInformationFile returned %#x, expected %#x.\n", hr, STATUS_SUCCESS); - info->NameInformation.FileName[info->NameInformation.FileNameLength / sizeof(WCHAR)] = '\0'; - ok(!lstrcmpiW( info->NameInformation.FileName, expected ), "info->NameInformation.FileName is %s, expected %s.\n", - wine_dbgstr_w( info->NameInformation.FileName ), wine_dbgstr_w( expected )); - - CloseHandle( h ); - HeapFree( GetProcessHeap(), 0, info ); - HeapFree( GetProcessHeap(), 0, expected ); - HeapFree( GetProcessHeap(), 0, volume_prefix ); - HeapFree( GetProcessHeap(), 0, file_name ); -} - -static void test_query_volume_information_file(void) -{ - NTSTATUS status; - HANDLE dir; - WCHAR path[MAX_PATH]; - OBJECT_ATTRIBUTES attr; - IO_STATUS_BLOCK io; - UNICODE_STRING nameW; - FILE_FS_VOLUME_INFORMATION *ffvi; - BYTE buf[sizeof(FILE_FS_VOLUME_INFORMATION) + MAX_PATH * sizeof(WCHAR)]; - - GetWindowsDirectoryW( path, MAX_PATH ); - pRtlDosPathNameToNtPathName_U( path, &nameW, NULL, NULL ); - attr.Length = sizeof(attr); - attr.RootDirectory = 0; - attr.ObjectName = &nameW; - attr.Attributes = OBJ_CASE_INSENSITIVE; - attr.SecurityDescriptor = NULL; - attr.SecurityQualityOfService = NULL; - - status = pNtOpenFile( &dir, SYNCHRONIZE|FILE_LIST_DIRECTORY, &attr, &io, - FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_DIRECTORY_FILE|FILE_SYNCHRONOUS_IO_NONALERT ); - ok( !status, "open %s failed %x\n", wine_dbgstr_w(nameW.Buffer), status ); - pRtlFreeUnicodeString( &nameW ); - - ZeroMemory( buf, sizeof(buf) ); - U(io).Status = 0xdadadada; - io.Information = 0xcacacaca; - - status = pNtQueryVolumeInformationFile( dir, &io, buf, sizeof(buf), FileFsVolumeInformation ); - - ffvi = (FILE_FS_VOLUME_INFORMATION *)buf; - -todo_wine -{ - ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %d\n", status); - ok(U(io).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %d\n", U(io).Status); - - ok(io.Information == (FIELD_OFFSET(FILE_FS_VOLUME_INFORMATION, VolumeLabel) + ffvi->VolumeLabelLength), - "expected %d, got %lu\n", (FIELD_OFFSET(FILE_FS_VOLUME_INFORMATION, VolumeLabel) + ffvi->VolumeLabelLength), - io.Information); - - ok(ffvi->VolumeCreationTime.QuadPart != 0, "Missing VolumeCreationTime\n"); - ok(ffvi->VolumeSerialNumber != 0, "Missing VolumeSerialNumber\n"); - ok(ffvi->SupportsObjects == 1,"expected 1, got %d\n", ffvi->SupportsObjects); -} - ok(ffvi->VolumeLabelLength == lstrlenW(ffvi->VolumeLabel) * sizeof(WCHAR), "got %d\n", ffvi->VolumeLabelLength); - - trace("VolumeSerialNumber: %x VolumeLabelName: %s\n", ffvi->VolumeSerialNumber, wine_dbgstr_w(ffvi->VolumeLabel)); - - CloseHandle( dir ); -} - -static void test_NtCreateFile(void) -{ - static const struct test_data - { - DWORD disposition, attrib_in, status, result, attrib_out, needs_cleanup; - } td[] = - { - /* 0*/{ FILE_CREATE, FILE_ATTRIBUTE_READONLY, 0, FILE_CREATED, FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY, FALSE }, - /* 1*/{ FILE_CREATE, 0, STATUS_OBJECT_NAME_COLLISION, 0, 0, TRUE }, - /* 2*/{ FILE_CREATE, 0, 0, FILE_CREATED, FILE_ATTRIBUTE_ARCHIVE, FALSE }, - /* 3*/{ FILE_OPEN, FILE_ATTRIBUTE_READONLY, 0, FILE_OPENED, FILE_ATTRIBUTE_ARCHIVE, TRUE }, - /* 4*/{ FILE_OPEN, FILE_ATTRIBUTE_READONLY, STATUS_OBJECT_NAME_NOT_FOUND, 0, 0, FALSE }, - /* 5*/{ FILE_OPEN_IF, 0, 0, FILE_CREATED, FILE_ATTRIBUTE_ARCHIVE, FALSE }, - /* 6*/{ FILE_OPEN_IF, FILE_ATTRIBUTE_READONLY, 0, FILE_OPENED, FILE_ATTRIBUTE_ARCHIVE, TRUE }, - /* 7*/{ FILE_OPEN_IF, FILE_ATTRIBUTE_READONLY, 0, FILE_CREATED, FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY, FALSE }, - /* 8*/{ FILE_OPEN_IF, 0, 0, FILE_OPENED, FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY, FALSE }, - /* 9*/{ FILE_OVERWRITE, 0, STATUS_ACCESS_DENIED, 0, 0, TRUE }, - /*10*/{ FILE_OVERWRITE, 0, STATUS_OBJECT_NAME_NOT_FOUND, 0, 0, FALSE }, - /*11*/{ FILE_CREATE, 0, 0, FILE_CREATED, FILE_ATTRIBUTE_ARCHIVE, FALSE }, - /*12*/{ FILE_OVERWRITE, FILE_ATTRIBUTE_READONLY, 0, FILE_OVERWRITTEN, FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY, FALSE }, - /*13*/{ FILE_OVERWRITE_IF, 0, STATUS_ACCESS_DENIED, 0, 0, TRUE }, - /*14*/{ FILE_OVERWRITE_IF, 0, 0, FILE_CREATED, FILE_ATTRIBUTE_ARCHIVE, FALSE }, - /*15*/{ FILE_OVERWRITE_IF, FILE_ATTRIBUTE_READONLY, 0, FILE_OVERWRITTEN, FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY, FALSE }, - /*16*/{ FILE_SUPERSEDE, 0, 0, FILE_SUPERSEDED, FILE_ATTRIBUTE_ARCHIVE, FALSE }, - /*17*/{ FILE_SUPERSEDE, FILE_ATTRIBUTE_READONLY, 0, FILE_SUPERSEDED, FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_READONLY, TRUE }, - /*18*/{ FILE_SUPERSEDE, 0, 0, FILE_CREATED, FILE_ATTRIBUTE_ARCHIVE, TRUE } - }; - static const WCHAR fooW[] = {'f','o','o',0}; - static const WCHAR dotW[] = {'.',0}; - NTSTATUS status; - HANDLE handle; - WCHAR path[MAX_PATH]; - OBJECT_ATTRIBUTES attr; - IO_STATUS_BLOCK io; - UNICODE_STRING nameW; - DWORD ret, i; - - GetTempFileNameW(dotW, fooW, 0, path); - DeleteFileW(path); - pRtlDosPathNameToNtPathName_U(path, &nameW, NULL, NULL); - - attr.Length = sizeof(attr); - attr.RootDirectory = NULL; - attr.ObjectName = &nameW; - attr.Attributes = OBJ_CASE_INSENSITIVE; - attr.SecurityDescriptor = NULL; - attr.SecurityQualityOfService = NULL; - - for (i = 0; i < sizeof(td)/sizeof(td[0]); i++) - { - status = pNtCreateFile(&handle, GENERIC_READ, &attr, &io, NULL, - td[i].attrib_in, FILE_SHARE_READ|FILE_SHARE_WRITE, - td[i].disposition, 0, NULL, 0); - - ok(status == td[i].status, "%d: expected %#x got %#x\n", i, td[i].status, status); - - if (!status) - { - ok(io.Information == td[i].result,"%d: expected %#x got %#lx\n", i, td[i].result, io.Information); - - ret = GetFileAttributesW(path); - ret &= ~FILE_ATTRIBUTE_NOT_CONTENT_INDEXED; - /* FIXME: leave only 'else' case below once Wine is fixed */ - if (ret != td[i].attrib_out) - { - todo_wine - ok(ret == td[i].attrib_out, "%d: expected %#x got %#x\n", i, td[i].attrib_out, ret); - SetFileAttributesW(path, td[i].attrib_out); - } - else - ok(ret == td[i].attrib_out, "%d: expected %#x got %#x\n", i, td[i].attrib_out, ret); - - CloseHandle(handle); - } - - if (td[i].needs_cleanup) - { - SetFileAttributesW(path, FILE_ATTRIBUTE_ARCHIVE); - DeleteFileW(path); - } - } - - SetFileAttributesW(path, FILE_ATTRIBUTE_ARCHIVE); - DeleteFileW( path ); -} - -START_TEST(file) -{ - HMODULE hkernel32 = GetModuleHandleA("kernel32.dll"); - HMODULE hntdll = GetModuleHandleA("ntdll.dll"); - if (!hntdll) - { - skip("not running on NT, skipping test\n"); - return; - } - - pGetVolumePathNameW = (void *)GetProcAddress(hkernel32, "GetVolumePathNameW"); - pGetSystemWow64DirectoryW = (void *)GetProcAddress(hkernel32, "GetSystemWow64DirectoryW"); - - pRtlFreeUnicodeString = (void *)GetProcAddress(hntdll, "RtlFreeUnicodeString"); - pRtlInitUnicodeString = (void *)GetProcAddress(hntdll, "RtlInitUnicodeString"); - pRtlDosPathNameToNtPathName_U = (void *)GetProcAddress(hntdll, "RtlDosPathNameToNtPathName_U"); - pRtlWow64EnableFsRedirectionEx = (void *)GetProcAddress(hntdll, "RtlWow64EnableFsRedirectionEx"); - pNtCreateMailslotFile = (void *)GetProcAddress(hntdll, "NtCreateMailslotFile"); - pNtCreateFile = (void *)GetProcAddress(hntdll, "NtCreateFile"); - pNtOpenFile = (void *)GetProcAddress(hntdll, "NtOpenFile"); - pNtDeleteFile = (void *)GetProcAddress(hntdll, "NtDeleteFile"); - pNtReadFile = (void *)GetProcAddress(hntdll, "NtReadFile"); - pNtWriteFile = (void *)GetProcAddress(hntdll, "NtWriteFile"); - pNtCancelIoFile = (void *)GetProcAddress(hntdll, "NtCancelIoFile"); - pNtCancelIoFileEx = (void *)GetProcAddress(hntdll, "NtCancelIoFileEx"); - pNtClose = (void *)GetProcAddress(hntdll, "NtClose"); - pNtCreateIoCompletion = (void *)GetProcAddress(hntdll, "NtCreateIoCompletion"); - pNtOpenIoCompletion = (void *)GetProcAddress(hntdll, "NtOpenIoCompletion"); - pNtQueryIoCompletion = (void *)GetProcAddress(hntdll, "NtQueryIoCompletion"); - pNtRemoveIoCompletion = (void *)GetProcAddress(hntdll, "NtRemoveIoCompletion"); - pNtSetIoCompletion = (void *)GetProcAddress(hntdll, "NtSetIoCompletion"); - pNtSetInformationFile = (void *)GetProcAddress(hntdll, "NtSetInformationFile"); - pNtQueryInformationFile = (void *)GetProcAddress(hntdll, "NtQueryInformationFile"); - pNtQueryDirectoryFile = (void *)GetProcAddress(hntdll, "NtQueryDirectoryFile"); - pNtQueryVolumeInformationFile = (void *)GetProcAddress(hntdll, "NtQueryVolumeInformationFile"); - - test_NtCreateFile(); - create_file_test(); - open_file_test(); - delete_file_test(); - read_file_test(); - append_file_test(); - nt_mailslot_test(); - test_iocompletion(); - test_file_basic_information(); - test_file_all_information(); - test_file_both_information(); - test_file_name_information(); - test_file_all_name_information(); - test_query_volume_information_file(); -} diff --git a/rostests/winetests/ntdll/generated.c b/rostests/winetests/ntdll/generated.c deleted file mode 100755 index 168aeb44708..00000000000 --- a/rostests/winetests/ntdll/generated.c +++ /dev/null @@ -1,7182 +0,0 @@ -/* File generated automatically from tools/winapi/tests.dat; do not edit! */ -/* This file can be copied, modified and distributed without restriction. */ - -/* - * Unit tests for data structure packing - */ - -#define WINVER 0x0501 -#define _WIN32_IE 0x0501 -#define _WIN32_WINNT 0x0501 - -#define WINE_NOWINSOCK - -#include "ntdll_test.h" - -#include "wine/test.h" - -/*********************************************************************** - * Compatibility macros - */ - -#define DWORD_PTR UINT_PTR -#define LONG_PTR INT_PTR -#define ULONG_PTR UINT_PTR - -/*********************************************************************** - * Windows API extension - */ - -#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus) -# define _TYPE_ALIGNMENT(type) __alignof(type) -#elif defined(__GNUC__) -# define _TYPE_ALIGNMENT(type) __alignof__(type) -#else -/* - * FIXME: May not be possible without a compiler extension - * (if type is not just a name that is, otherwise the normal - * TYPE_ALIGNMENT can be used) - */ -#endif - -#if defined(TYPE_ALIGNMENT) && defined(_MSC_VER) && _MSC_VER >= 800 && !defined(__cplusplus) -#pragma warning(disable:4116) -#endif - -#if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT) -# define TYPE_ALIGNMENT _TYPE_ALIGNMENT -#endif - -/*********************************************************************** - * Test helper macros - */ - -#define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size); - -#ifdef TYPE_ALIGNMENT -# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align); -#else -# define TEST_TYPE_ALIGN(type, align) -#endif - -#ifdef _TYPE_ALIGNMENT -# define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align); -# define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align); -#else -# define TEST_TARGET_ALIGN(type, align) -# define TEST_FIELD_ALIGN(type, field, align) -#endif - -#define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset); - -#define TEST_TARGET_SIZE(type, size) TEST_TYPE_SIZE(*(type)0, size) -#define TEST_FIELD_SIZE(type, field, size) TEST_TYPE_SIZE((((type*)0)->field), size) -#define TEST_TYPE_SIGNED(type) C_ASSERT((type) -1 < 0); -#define TEST_TYPE_UNSIGNED(type) C_ASSERT((type) -1 > 0); - - -#ifdef _WIN64 - -static void test_pack_DWORD32(void) -{ - /* DWORD32 */ - TEST_TYPE_SIZE (DWORD32, 4) - TEST_TYPE_ALIGN (DWORD32, 4) - TEST_TYPE_UNSIGNED(DWORD32) -} - -static void test_pack_DWORD64(void) -{ - /* DWORD64 */ - TEST_TYPE_SIZE (DWORD64, 8) - TEST_TYPE_ALIGN (DWORD64, 8) - TEST_TYPE_UNSIGNED(DWORD64) -} - -static void test_pack_DWORD_PTR(void) -{ - /* DWORD_PTR */ - TEST_TYPE_SIZE (DWORD_PTR, 8) - TEST_TYPE_ALIGN (DWORD_PTR, 8) -} - -static void test_pack_HALF_PTR(void) -{ - /* HALF_PTR */ - TEST_TYPE_SIZE (HALF_PTR, 4) - TEST_TYPE_ALIGN (HALF_PTR, 4) - TEST_TYPE_SIGNED(HALF_PTR) -} - -static void test_pack_INT16(void) -{ - /* INT16 */ - TEST_TYPE_SIZE (INT16, 2) - TEST_TYPE_ALIGN (INT16, 2) - TEST_TYPE_SIGNED(INT16) -} - -static void test_pack_INT32(void) -{ - /* INT32 */ - TEST_TYPE_SIZE (INT32, 4) - TEST_TYPE_ALIGN (INT32, 4) - TEST_TYPE_SIGNED(INT32) -} - -static void test_pack_INT64(void) -{ - /* INT64 */ - TEST_TYPE_SIZE (INT64, 8) - TEST_TYPE_ALIGN (INT64, 8) - TEST_TYPE_SIGNED(INT64) -} - -static void test_pack_INT8(void) -{ - /* INT8 */ - TEST_TYPE_SIZE (INT8, 1) - TEST_TYPE_ALIGN (INT8, 1) - TEST_TYPE_SIGNED(INT8) -} - -static void test_pack_INT_PTR(void) -{ - /* INT_PTR */ - TEST_TYPE_SIZE (INT_PTR, 8) - TEST_TYPE_ALIGN (INT_PTR, 8) - TEST_TYPE_SIGNED(INT_PTR) -} - -static void test_pack_LONG32(void) -{ - /* LONG32 */ - TEST_TYPE_SIZE (LONG32, 4) - TEST_TYPE_ALIGN (LONG32, 4) - TEST_TYPE_SIGNED(LONG32) -} - -static void test_pack_LONG64(void) -{ - /* LONG64 */ - TEST_TYPE_SIZE (LONG64, 8) - TEST_TYPE_ALIGN (LONG64, 8) - TEST_TYPE_SIGNED(LONG64) -} - -static void test_pack_LONG_PTR(void) -{ - /* LONG_PTR */ - TEST_TYPE_SIZE (LONG_PTR, 8) - TEST_TYPE_ALIGN (LONG_PTR, 8) - TEST_TYPE_SIGNED(LONG_PTR) -} - -static void test_pack_SIZE_T(void) -{ - /* SIZE_T */ - TEST_TYPE_SIZE (SIZE_T, 8) - TEST_TYPE_ALIGN (SIZE_T, 8) -} - -static void test_pack_SSIZE_T(void) -{ - /* SSIZE_T */ - TEST_TYPE_SIZE (SSIZE_T, 8) - TEST_TYPE_ALIGN (SSIZE_T, 8) -} - -static void test_pack_UHALF_PTR(void) -{ - /* UHALF_PTR */ - TEST_TYPE_SIZE (UHALF_PTR, 4) - TEST_TYPE_ALIGN (UHALF_PTR, 4) - TEST_TYPE_UNSIGNED(UHALF_PTR) -} - -static void test_pack_UINT16(void) -{ - /* UINT16 */ - TEST_TYPE_SIZE (UINT16, 2) - TEST_TYPE_ALIGN (UINT16, 2) - TEST_TYPE_UNSIGNED(UINT16) -} - -static void test_pack_UINT32(void) -{ - /* UINT32 */ - TEST_TYPE_SIZE (UINT32, 4) - TEST_TYPE_ALIGN (UINT32, 4) - TEST_TYPE_UNSIGNED(UINT32) -} - -static void test_pack_UINT64(void) -{ - /* UINT64 */ - TEST_TYPE_SIZE (UINT64, 8) - TEST_TYPE_ALIGN (UINT64, 8) - TEST_TYPE_UNSIGNED(UINT64) -} - -static void test_pack_UINT8(void) -{ - /* UINT8 */ - TEST_TYPE_SIZE (UINT8, 1) - TEST_TYPE_ALIGN (UINT8, 1) - TEST_TYPE_UNSIGNED(UINT8) -} - -static void test_pack_UINT_PTR(void) -{ - /* UINT_PTR */ - TEST_TYPE_SIZE (UINT_PTR, 8) - TEST_TYPE_ALIGN (UINT_PTR, 8) - TEST_TYPE_UNSIGNED(UINT_PTR) -} - -static void test_pack_ULONG32(void) -{ - /* ULONG32 */ - TEST_TYPE_SIZE (ULONG32, 4) - TEST_TYPE_ALIGN (ULONG32, 4) - TEST_TYPE_UNSIGNED(ULONG32) -} - -static void test_pack_ULONG64(void) -{ - /* ULONG64 */ - TEST_TYPE_SIZE (ULONG64, 8) - TEST_TYPE_ALIGN (ULONG64, 8) - TEST_TYPE_UNSIGNED(ULONG64) -} - -static void test_pack_ULONG_PTR(void) -{ - /* ULONG_PTR */ - TEST_TYPE_SIZE (ULONG_PTR, 8) - TEST_TYPE_ALIGN (ULONG_PTR, 8) - TEST_TYPE_UNSIGNED(ULONG_PTR) -} - -static void test_pack_ACCESS_ALLOWED_ACE(void) -{ - /* ACCESS_ALLOWED_ACE */ - TEST_TYPE_SIZE (ACCESS_ALLOWED_ACE, 12) - TEST_TYPE_ALIGN (ACCESS_ALLOWED_ACE, 4) - TEST_FIELD_SIZE (ACCESS_ALLOWED_ACE, Header, 4) - TEST_FIELD_ALIGN (ACCESS_ALLOWED_ACE, Header, 2) - TEST_FIELD_OFFSET(ACCESS_ALLOWED_ACE, Header, 0) - TEST_FIELD_SIZE (ACCESS_ALLOWED_ACE, Mask, 4) - TEST_FIELD_ALIGN (ACCESS_ALLOWED_ACE, Mask, 4) - TEST_FIELD_OFFSET(ACCESS_ALLOWED_ACE, Mask, 4) - TEST_FIELD_SIZE (ACCESS_ALLOWED_ACE, SidStart, 4) - TEST_FIELD_ALIGN (ACCESS_ALLOWED_ACE, SidStart, 4) - TEST_FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart, 8) -} - -static void test_pack_ACCESS_DENIED_ACE(void) -{ - /* ACCESS_DENIED_ACE */ - TEST_TYPE_SIZE (ACCESS_DENIED_ACE, 12) - TEST_TYPE_ALIGN (ACCESS_DENIED_ACE, 4) - TEST_FIELD_SIZE (ACCESS_DENIED_ACE, Header, 4) - TEST_FIELD_ALIGN (ACCESS_DENIED_ACE, Header, 2) - TEST_FIELD_OFFSET(ACCESS_DENIED_ACE, Header, 0) - TEST_FIELD_SIZE (ACCESS_DENIED_ACE, Mask, 4) - TEST_FIELD_ALIGN (ACCESS_DENIED_ACE, Mask, 4) - TEST_FIELD_OFFSET(ACCESS_DENIED_ACE, Mask, 4) - TEST_FIELD_SIZE (ACCESS_DENIED_ACE, SidStart, 4) - TEST_FIELD_ALIGN (ACCESS_DENIED_ACE, SidStart, 4) - TEST_FIELD_OFFSET(ACCESS_DENIED_ACE, SidStart, 8) -} - -static void test_pack_ACCESS_MASK(void) -{ - /* ACCESS_MASK */ - TEST_TYPE_SIZE (ACCESS_MASK, 4) - TEST_TYPE_ALIGN (ACCESS_MASK, 4) - TEST_TYPE_UNSIGNED(ACCESS_MASK) -} - -static void test_pack_ACE_HEADER(void) -{ - /* ACE_HEADER */ - TEST_TYPE_SIZE (ACE_HEADER, 4) - TEST_TYPE_ALIGN (ACE_HEADER, 2) - TEST_FIELD_SIZE (ACE_HEADER, AceType, 1) - TEST_FIELD_ALIGN (ACE_HEADER, AceType, 1) - TEST_FIELD_OFFSET(ACE_HEADER, AceType, 0) - TEST_FIELD_SIZE (ACE_HEADER, AceFlags, 1) - TEST_FIELD_ALIGN (ACE_HEADER, AceFlags, 1) - TEST_FIELD_OFFSET(ACE_HEADER, AceFlags, 1) - TEST_FIELD_SIZE (ACE_HEADER, AceSize, 2) - TEST_FIELD_ALIGN (ACE_HEADER, AceSize, 2) - TEST_FIELD_OFFSET(ACE_HEADER, AceSize, 2) -} - -static void test_pack_ACL(void) -{ - /* ACL */ - TEST_TYPE_SIZE (ACL, 8) - TEST_TYPE_ALIGN (ACL, 2) - TEST_FIELD_SIZE (ACL, AclRevision, 1) - TEST_FIELD_ALIGN (ACL, AclRevision, 1) - TEST_FIELD_OFFSET(ACL, AclRevision, 0) - TEST_FIELD_SIZE (ACL, Sbz1, 1) - TEST_FIELD_ALIGN (ACL, Sbz1, 1) - TEST_FIELD_OFFSET(ACL, Sbz1, 1) - TEST_FIELD_SIZE (ACL, AclSize, 2) - TEST_FIELD_ALIGN (ACL, AclSize, 2) - TEST_FIELD_OFFSET(ACL, AclSize, 2) - TEST_FIELD_SIZE (ACL, AceCount, 2) - TEST_FIELD_ALIGN (ACL, AceCount, 2) - TEST_FIELD_OFFSET(ACL, AceCount, 4) - TEST_FIELD_SIZE (ACL, Sbz2, 2) - TEST_FIELD_ALIGN (ACL, Sbz2, 2) - TEST_FIELD_OFFSET(ACL, Sbz2, 6) -} - -static void test_pack_ACL_REVISION_INFORMATION(void) -{ - /* ACL_REVISION_INFORMATION */ - TEST_TYPE_SIZE (ACL_REVISION_INFORMATION, 4) - TEST_TYPE_ALIGN (ACL_REVISION_INFORMATION, 4) - TEST_FIELD_SIZE (ACL_REVISION_INFORMATION, AclRevision, 4) - TEST_FIELD_ALIGN (ACL_REVISION_INFORMATION, AclRevision, 4) - TEST_FIELD_OFFSET(ACL_REVISION_INFORMATION, AclRevision, 0) -} - -static void test_pack_ACL_SIZE_INFORMATION(void) -{ - /* ACL_SIZE_INFORMATION */ - TEST_TYPE_SIZE (ACL_SIZE_INFORMATION, 12) - TEST_TYPE_ALIGN (ACL_SIZE_INFORMATION, 4) - TEST_FIELD_SIZE (ACL_SIZE_INFORMATION, AceCount, 4) - TEST_FIELD_ALIGN (ACL_SIZE_INFORMATION, AceCount, 4) - TEST_FIELD_OFFSET(ACL_SIZE_INFORMATION, AceCount, 0) - TEST_FIELD_SIZE (ACL_SIZE_INFORMATION, AclBytesInUse, 4) - TEST_FIELD_ALIGN (ACL_SIZE_INFORMATION, AclBytesInUse, 4) - TEST_FIELD_OFFSET(ACL_SIZE_INFORMATION, AclBytesInUse, 4) - TEST_FIELD_SIZE (ACL_SIZE_INFORMATION, AclBytesFree, 4) - TEST_FIELD_ALIGN (ACL_SIZE_INFORMATION, AclBytesFree, 4) - TEST_FIELD_OFFSET(ACL_SIZE_INFORMATION, AclBytesFree, 8) -} - -static void test_pack_BOOLEAN(void) -{ - /* BOOLEAN */ - TEST_TYPE_SIZE (BOOLEAN, 1) - TEST_TYPE_ALIGN (BOOLEAN, 1) - TEST_TYPE_UNSIGNED(BOOLEAN) -} - -static void test_pack_CCHAR(void) -{ - /* CCHAR */ - TEST_TYPE_SIZE (CCHAR, 1) - TEST_TYPE_ALIGN (CCHAR, 1) - TEST_TYPE_SIGNED(CCHAR) -} - -static void test_pack_CHAR(void) -{ - /* CHAR */ - TEST_TYPE_SIZE (CHAR, 1) - TEST_TYPE_ALIGN (CHAR, 1) - TEST_TYPE_SIGNED(CHAR) -} - -static void test_pack_DWORDLONG(void) -{ - /* DWORDLONG */ - TEST_TYPE_SIZE (DWORDLONG, 8) - TEST_TYPE_ALIGN (DWORDLONG, 8) - TEST_TYPE_UNSIGNED(DWORDLONG) -} - -static void test_pack_EXCEPTION_POINTERS(void) -{ - /* EXCEPTION_POINTERS */ - TEST_TYPE_SIZE (EXCEPTION_POINTERS, 16) - TEST_TYPE_ALIGN (EXCEPTION_POINTERS, 8) - TEST_FIELD_SIZE (EXCEPTION_POINTERS, ExceptionRecord, 8) - TEST_FIELD_ALIGN (EXCEPTION_POINTERS, ExceptionRecord, 8) - TEST_FIELD_OFFSET(EXCEPTION_POINTERS, ExceptionRecord, 0) - TEST_FIELD_SIZE (EXCEPTION_POINTERS, ContextRecord, 8) - TEST_FIELD_ALIGN (EXCEPTION_POINTERS, ContextRecord, 8) - TEST_FIELD_OFFSET(EXCEPTION_POINTERS, ContextRecord, 8) -} - -static void test_pack_EXCEPTION_RECORD(void) -{ - /* EXCEPTION_RECORD */ - TEST_TYPE_SIZE (EXCEPTION_RECORD, 152) - TEST_TYPE_ALIGN (EXCEPTION_RECORD, 8) - TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionCode, 4) - TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionCode, 4) - TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionCode, 0) - TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionFlags, 4) - TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionFlags, 4) - TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionFlags, 4) - TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionRecord, 8) - TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionRecord, 8) - TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionRecord, 8) - TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionAddress, 8) - TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionAddress, 8) - TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionAddress, 16) - TEST_FIELD_SIZE (EXCEPTION_RECORD, NumberParameters, 4) - TEST_FIELD_ALIGN (EXCEPTION_RECORD, NumberParameters, 4) - TEST_FIELD_OFFSET(EXCEPTION_RECORD, NumberParameters, 24) - TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionInformation, 120) - TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionInformation, 8) - TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionInformation, 32) -} - -static void test_pack_EXECUTION_STATE(void) -{ - /* EXECUTION_STATE */ - TEST_TYPE_SIZE (EXECUTION_STATE, 4) - TEST_TYPE_ALIGN (EXECUTION_STATE, 4) - TEST_TYPE_UNSIGNED(EXECUTION_STATE) -} - -static void test_pack_FLOATING_SAVE_AREA(void) -{ -#if 0 // this doesn't exist on amd64 - /* FLOATING_SAVE_AREA */ - TEST_TYPE_SIZE (FLOATING_SAVE_AREA, 112) - TEST_TYPE_ALIGN (FLOATING_SAVE_AREA, 4) - TEST_FIELD_SIZE (FLOATING_SAVE_AREA, ControlWord, 4) - TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, ControlWord, 4) - TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, ControlWord, 0) - TEST_FIELD_SIZE (FLOATING_SAVE_AREA, StatusWord, 4) - TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, StatusWord, 4) - TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, StatusWord, 4) - TEST_FIELD_SIZE (FLOATING_SAVE_AREA, TagWord, 4) - TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, TagWord, 4) - TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, TagWord, 8) - TEST_FIELD_SIZE (FLOATING_SAVE_AREA, ErrorOffset, 4) - TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, ErrorOffset, 4) - TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, ErrorOffset, 12) - TEST_FIELD_SIZE (FLOATING_SAVE_AREA, ErrorSelector, 4) - TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, ErrorSelector, 4) - TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, ErrorSelector, 16) - TEST_FIELD_SIZE (FLOATING_SAVE_AREA, DataOffset, 4) - TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, DataOffset, 4) - TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, DataOffset, 20) - TEST_FIELD_SIZE (FLOATING_SAVE_AREA, DataSelector, 4) - TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, DataSelector, 4) - TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, DataSelector, 24) - TEST_FIELD_SIZE (FLOATING_SAVE_AREA, RegisterArea, 80) - TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, RegisterArea, 1) - TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, RegisterArea, 28) - TEST_FIELD_SIZE (FLOATING_SAVE_AREA, Cr0NpxState, 4) - TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, Cr0NpxState, 4) - TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, Cr0NpxState, 108) -#endif -} - -static void test_pack_FPO_DATA(void) -{ - /* FPO_DATA */ - TEST_TYPE_SIZE (FPO_DATA, 16) - TEST_TYPE_ALIGN (FPO_DATA, 4) - TEST_FIELD_SIZE (FPO_DATA, ulOffStart, 4) - TEST_FIELD_ALIGN (FPO_DATA, ulOffStart, 4) - TEST_FIELD_OFFSET(FPO_DATA, ulOffStart, 0) - TEST_FIELD_SIZE (FPO_DATA, cbProcSize, 4) - TEST_FIELD_ALIGN (FPO_DATA, cbProcSize, 4) - TEST_FIELD_OFFSET(FPO_DATA, cbProcSize, 4) - TEST_FIELD_SIZE (FPO_DATA, cdwLocals, 4) - TEST_FIELD_ALIGN (FPO_DATA, cdwLocals, 4) - TEST_FIELD_OFFSET(FPO_DATA, cdwLocals, 8) - TEST_FIELD_SIZE (FPO_DATA, cdwParams, 2) - TEST_FIELD_ALIGN (FPO_DATA, cdwParams, 2) - TEST_FIELD_OFFSET(FPO_DATA, cdwParams, 12) -} - -static void test_pack_GENERIC_MAPPING(void) -{ - /* GENERIC_MAPPING */ - TEST_TYPE_SIZE (GENERIC_MAPPING, 16) - TEST_TYPE_ALIGN (GENERIC_MAPPING, 4) - TEST_FIELD_SIZE (GENERIC_MAPPING, GenericRead, 4) - TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericRead, 4) - TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericRead, 0) - TEST_FIELD_SIZE (GENERIC_MAPPING, GenericWrite, 4) - TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericWrite, 4) - TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericWrite, 4) - TEST_FIELD_SIZE (GENERIC_MAPPING, GenericExecute, 4) - TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericExecute, 4) - TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericExecute, 8) - TEST_FIELD_SIZE (GENERIC_MAPPING, GenericAll, 4) - TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericAll, 4) - TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericAll, 12) -} - -static void test_pack_HANDLE(void) -{ - /* HANDLE */ - TEST_TYPE_SIZE (HANDLE, 8) - TEST_TYPE_ALIGN (HANDLE, 8) -} - -static void test_pack_HRESULT(void) -{ - /* HRESULT */ - TEST_TYPE_SIZE (HRESULT, 4) - TEST_TYPE_ALIGN (HRESULT, 4) -} - -static void test_pack_IMAGE_ARCHIVE_MEMBER_HEADER(void) -{ - /* IMAGE_ARCHIVE_MEMBER_HEADER */ - TEST_TYPE_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, 60) - TEST_TYPE_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, 1) - TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Name, 16) - TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Name, 1) - TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Name, 0) - TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Date, 12) - TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Date, 1) - TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Date, 16) - TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, UserID, 6) - TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, UserID, 1) - TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, UserID, 28) - TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, GroupID, 6) - TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, GroupID, 1) - TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, GroupID, 34) - TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Mode, 8) - TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Mode, 1) - TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Mode, 40) - TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Size, 10) - TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Size, 1) - TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Size, 48) - TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, EndHeader, 2) - TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, EndHeader, 1) - TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, EndHeader, 58) -} - -static void test_pack_IMAGE_AUX_SYMBOL(void) -{ - /* IMAGE_AUX_SYMBOL (pack 2) */ -} - -static void test_pack_IMAGE_BASE_RELOCATION(void) -{ - /* IMAGE_BASE_RELOCATION */ - TEST_TYPE_SIZE (IMAGE_BASE_RELOCATION, 8) - TEST_TYPE_ALIGN (IMAGE_BASE_RELOCATION, 4) - TEST_FIELD_SIZE (IMAGE_BASE_RELOCATION, VirtualAddress, 4) - TEST_FIELD_ALIGN (IMAGE_BASE_RELOCATION, VirtualAddress, 4) - TEST_FIELD_OFFSET(IMAGE_BASE_RELOCATION, VirtualAddress, 0) - TEST_FIELD_SIZE (IMAGE_BASE_RELOCATION, SizeOfBlock, 4) - TEST_FIELD_ALIGN (IMAGE_BASE_RELOCATION, SizeOfBlock, 4) - TEST_FIELD_OFFSET(IMAGE_BASE_RELOCATION, SizeOfBlock, 4) -} - -static void test_pack_IMAGE_BOUND_FORWARDER_REF(void) -{ - /* IMAGE_BOUND_FORWARDER_REF */ - TEST_TYPE_SIZE (IMAGE_BOUND_FORWARDER_REF, 8) - TEST_TYPE_ALIGN (IMAGE_BOUND_FORWARDER_REF, 4) - TEST_FIELD_SIZE (IMAGE_BOUND_FORWARDER_REF, TimeDateStamp, 4) - TEST_FIELD_ALIGN (IMAGE_BOUND_FORWARDER_REF, TimeDateStamp, 4) - TEST_FIELD_OFFSET(IMAGE_BOUND_FORWARDER_REF, TimeDateStamp, 0) - TEST_FIELD_SIZE (IMAGE_BOUND_FORWARDER_REF, OffsetModuleName, 2) - TEST_FIELD_ALIGN (IMAGE_BOUND_FORWARDER_REF, OffsetModuleName, 2) - TEST_FIELD_OFFSET(IMAGE_BOUND_FORWARDER_REF, OffsetModuleName, 4) - TEST_FIELD_SIZE (IMAGE_BOUND_FORWARDER_REF, Reserved, 2) - TEST_FIELD_ALIGN (IMAGE_BOUND_FORWARDER_REF, Reserved, 2) - TEST_FIELD_OFFSET(IMAGE_BOUND_FORWARDER_REF, Reserved, 6) -} - -static void test_pack_IMAGE_BOUND_IMPORT_DESCRIPTOR(void) -{ - /* IMAGE_BOUND_IMPORT_DESCRIPTOR */ - TEST_TYPE_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, 8) - TEST_TYPE_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, 4) - TEST_FIELD_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, TimeDateStamp, 4) - TEST_FIELD_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, TimeDateStamp, 4) - TEST_FIELD_OFFSET(IMAGE_BOUND_IMPORT_DESCRIPTOR, TimeDateStamp, 0) - TEST_FIELD_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, OffsetModuleName, 2) - TEST_FIELD_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, OffsetModuleName, 2) - TEST_FIELD_OFFSET(IMAGE_BOUND_IMPORT_DESCRIPTOR, OffsetModuleName, 4) - TEST_FIELD_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, NumberOfModuleForwarderRefs, 2) - TEST_FIELD_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, NumberOfModuleForwarderRefs, 2) - TEST_FIELD_OFFSET(IMAGE_BOUND_IMPORT_DESCRIPTOR, NumberOfModuleForwarderRefs, 6) -} - -static void test_pack_IMAGE_COFF_SYMBOLS_HEADER(void) -{ - /* IMAGE_COFF_SYMBOLS_HEADER */ - TEST_TYPE_SIZE (IMAGE_COFF_SYMBOLS_HEADER, 32) - TEST_TYPE_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, 4) - TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, NumberOfSymbols, 4) - TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, NumberOfSymbols, 4) - TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, NumberOfSymbols, 0) - TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstSymbol, 4) - TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstSymbol, 4) - TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstSymbol, 4) - TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, NumberOfLinenumbers, 4) - TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, NumberOfLinenumbers, 4) - TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, NumberOfLinenumbers, 8) - TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstLinenumber, 4) - TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstLinenumber, 4) - TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstLinenumber, 12) - TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfCode, 4) - TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfCode, 4) - TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfCode, 16) - TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfCode, 4) - TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfCode, 4) - TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfCode, 20) - TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfData, 4) - TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfData, 4) - TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfData, 24) - TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfData, 4) - TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfData, 4) - TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfData, 28) -} - -static void test_pack_IMAGE_DATA_DIRECTORY(void) -{ - /* IMAGE_DATA_DIRECTORY */ - TEST_TYPE_SIZE (IMAGE_DATA_DIRECTORY, 8) - TEST_TYPE_ALIGN (IMAGE_DATA_DIRECTORY, 4) - TEST_FIELD_SIZE (IMAGE_DATA_DIRECTORY, VirtualAddress, 4) - TEST_FIELD_ALIGN (IMAGE_DATA_DIRECTORY, VirtualAddress, 4) - TEST_FIELD_OFFSET(IMAGE_DATA_DIRECTORY, VirtualAddress, 0) - TEST_FIELD_SIZE (IMAGE_DATA_DIRECTORY, Size, 4) - TEST_FIELD_ALIGN (IMAGE_DATA_DIRECTORY, Size, 4) - TEST_FIELD_OFFSET(IMAGE_DATA_DIRECTORY, Size, 4) -} - -static void test_pack_IMAGE_DEBUG_DIRECTORY(void) -{ - /* IMAGE_DEBUG_DIRECTORY */ - TEST_TYPE_SIZE (IMAGE_DEBUG_DIRECTORY, 28) - TEST_TYPE_ALIGN (IMAGE_DEBUG_DIRECTORY, 4) - TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, Characteristics, 4) - TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, Characteristics, 4) - TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, Characteristics, 0) - TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, TimeDateStamp, 4) - TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, TimeDateStamp, 4) - TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, TimeDateStamp, 4) - TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, MajorVersion, 2) - TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, MajorVersion, 2) - TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, MajorVersion, 8) - TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, MinorVersion, 2) - TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, MinorVersion, 2) - TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, MinorVersion, 10) - TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, Type, 4) - TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, Type, 4) - TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, Type, 12) - TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, SizeOfData, 4) - TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, SizeOfData, 4) - TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, SizeOfData, 16) - TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, AddressOfRawData, 4) - TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, AddressOfRawData, 4) - TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, AddressOfRawData, 20) - TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, PointerToRawData, 4) - TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, PointerToRawData, 4) - TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, PointerToRawData, 24) -} - -static void test_pack_IMAGE_DEBUG_MISC(void) -{ - /* IMAGE_DEBUG_MISC */ - TEST_TYPE_SIZE (IMAGE_DEBUG_MISC, 16) - TEST_TYPE_ALIGN (IMAGE_DEBUG_MISC, 4) - TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, DataType, 4) - TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, DataType, 4) - TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, DataType, 0) - TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Length, 4) - TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Length, 4) - TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Length, 4) - TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Unicode, 1) - TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Unicode, 1) - TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Unicode, 8) - TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Reserved, 3) - TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Reserved, 1) - TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Reserved, 9) - TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Data, 1) - TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Data, 1) - TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Data, 12) -} - -static void test_pack_IMAGE_DOS_HEADER(void) -{ - /* IMAGE_DOS_HEADER (pack 2) */ - TEST_TYPE_SIZE (IMAGE_DOS_HEADER, 64) - TEST_TYPE_ALIGN (IMAGE_DOS_HEADER, 2) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_magic, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_magic, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_magic, 0) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cblp, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cblp, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cblp, 2) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cp, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cp, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cp, 4) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_crlc, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_crlc, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_crlc, 6) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cparhdr, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cparhdr, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cparhdr, 8) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_minalloc, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_minalloc, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_minalloc, 10) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_maxalloc, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_maxalloc, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_maxalloc, 12) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_ss, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_ss, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_ss, 14) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_sp, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_sp, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_sp, 16) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_csum, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_csum, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_csum, 18) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_ip, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_ip, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_ip, 20) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cs, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cs, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cs, 22) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_lfarlc, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_lfarlc, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_lfarlc, 24) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_ovno, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_ovno, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_ovno, 26) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_res, 8) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_res, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_res, 28) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_oemid, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_oemid, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_oemid, 36) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_oeminfo, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_oeminfo, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_oeminfo, 38) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_res2, 20) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_res2, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_res2, 40) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_lfanew, 4) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_lfanew, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_lfanew, 60) -} - -static void test_pack_IMAGE_EXPORT_DIRECTORY(void) -{ - /* IMAGE_EXPORT_DIRECTORY */ - TEST_TYPE_SIZE (IMAGE_EXPORT_DIRECTORY, 40) - TEST_TYPE_ALIGN (IMAGE_EXPORT_DIRECTORY, 4) - TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, Characteristics, 4) - TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, Characteristics, 4) - TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, Characteristics, 0) - TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, TimeDateStamp, 4) - TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, TimeDateStamp, 4) - TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, TimeDateStamp, 4) - TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, MajorVersion, 2) - TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, MajorVersion, 2) - TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, MajorVersion, 8) - TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, MinorVersion, 2) - TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, MinorVersion, 2) - TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, MinorVersion, 10) - TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, Name, 4) - TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, Name, 4) - TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, Name, 12) - TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, Base, 4) - TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, Base, 4) - TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, Base, 16) - TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, NumberOfFunctions, 4) - TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, NumberOfFunctions, 4) - TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, NumberOfFunctions, 20) - TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, NumberOfNames, 4) - TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, NumberOfNames, 4) - TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, NumberOfNames, 24) - TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, AddressOfFunctions, 4) - TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, AddressOfFunctions, 4) - TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, AddressOfFunctions, 28) - TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, AddressOfNames, 4) - TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, AddressOfNames, 4) - TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, AddressOfNames, 32) - TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, AddressOfNameOrdinals, 4) - TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, AddressOfNameOrdinals, 4) - TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, AddressOfNameOrdinals, 36) -} - -static void test_pack_IMAGE_FILE_HEADER(void) -{ - /* IMAGE_FILE_HEADER */ - TEST_TYPE_SIZE (IMAGE_FILE_HEADER, 20) - TEST_TYPE_ALIGN (IMAGE_FILE_HEADER, 4) - TEST_FIELD_SIZE (IMAGE_FILE_HEADER, Machine, 2) - TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, Machine, 2) - TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, Machine, 0) - TEST_FIELD_SIZE (IMAGE_FILE_HEADER, NumberOfSections, 2) - TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, NumberOfSections, 2) - TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, NumberOfSections, 2) - TEST_FIELD_SIZE (IMAGE_FILE_HEADER, TimeDateStamp, 4) - TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, TimeDateStamp, 4) - TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, TimeDateStamp, 4) - TEST_FIELD_SIZE (IMAGE_FILE_HEADER, PointerToSymbolTable, 4) - TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, PointerToSymbolTable, 4) - TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, PointerToSymbolTable, 8) - TEST_FIELD_SIZE (IMAGE_FILE_HEADER, NumberOfSymbols, 4) - TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, NumberOfSymbols, 4) - TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, NumberOfSymbols, 12) - TEST_FIELD_SIZE (IMAGE_FILE_HEADER, SizeOfOptionalHeader, 2) - TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, SizeOfOptionalHeader, 2) - TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, SizeOfOptionalHeader, 16) - TEST_FIELD_SIZE (IMAGE_FILE_HEADER, Characteristics, 2) - TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, Characteristics, 2) - TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, Characteristics, 18) -} - -static void test_pack_IMAGE_FUNCTION_ENTRY(void) -{ - /* IMAGE_FUNCTION_ENTRY */ - TEST_TYPE_SIZE (IMAGE_FUNCTION_ENTRY, 12) - TEST_TYPE_ALIGN (IMAGE_FUNCTION_ENTRY, 4) - TEST_FIELD_SIZE (IMAGE_FUNCTION_ENTRY, StartingAddress, 4) - TEST_FIELD_ALIGN (IMAGE_FUNCTION_ENTRY, StartingAddress, 4) - TEST_FIELD_OFFSET(IMAGE_FUNCTION_ENTRY, StartingAddress, 0) - TEST_FIELD_SIZE (IMAGE_FUNCTION_ENTRY, EndingAddress, 4) - TEST_FIELD_ALIGN (IMAGE_FUNCTION_ENTRY, EndingAddress, 4) - TEST_FIELD_OFFSET(IMAGE_FUNCTION_ENTRY, EndingAddress, 4) - TEST_FIELD_SIZE (IMAGE_FUNCTION_ENTRY, EndOfPrologue, 4) - TEST_FIELD_ALIGN (IMAGE_FUNCTION_ENTRY, EndOfPrologue, 4) - TEST_FIELD_OFFSET(IMAGE_FUNCTION_ENTRY, EndOfPrologue, 8) -} - -static void test_pack_IMAGE_IMPORT_BY_NAME(void) -{ - /* IMAGE_IMPORT_BY_NAME */ - TEST_TYPE_SIZE (IMAGE_IMPORT_BY_NAME, 4) - TEST_TYPE_ALIGN (IMAGE_IMPORT_BY_NAME, 2) - TEST_FIELD_SIZE (IMAGE_IMPORT_BY_NAME, Hint, 2) - TEST_FIELD_ALIGN (IMAGE_IMPORT_BY_NAME, Hint, 2) - TEST_FIELD_OFFSET(IMAGE_IMPORT_BY_NAME, Hint, 0) - TEST_FIELD_SIZE (IMAGE_IMPORT_BY_NAME, Name, 1) - TEST_FIELD_ALIGN (IMAGE_IMPORT_BY_NAME, Name, 1) - TEST_FIELD_OFFSET(IMAGE_IMPORT_BY_NAME, Name, 2) -} - -static void test_pack_IMAGE_IMPORT_DESCRIPTOR(void) -{ - /* IMAGE_IMPORT_DESCRIPTOR */ -} - -static void test_pack_IMAGE_LINENUMBER(void) -{ - /* IMAGE_LINENUMBER (pack 2) */ -} - -static void test_pack_IMAGE_LOAD_CONFIG_DIRECTORY(void) -{ - /* IMAGE_LOAD_CONFIG_DIRECTORY */ -// TEST_TYPE_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, 88) - TEST_TYPE_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, 8) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, Size, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, Size, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, Size, 0) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, TimeDateStamp, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, TimeDateStamp, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, TimeDateStamp, 4) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, MajorVersion, 2) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, MajorVersion, 2) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, MajorVersion, 8) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, MinorVersion, 2) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, MinorVersion, 2) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, MinorVersion, 10) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsClear, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsClear, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsClear, 12) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsSet, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsSet, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsSet, 16) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, CriticalSectionDefaultTimeout, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, CriticalSectionDefaultTimeout, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, CriticalSectionDefaultTimeout, 20) -#if 0 // wine headers are broken - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitFreeBlockThreshold, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitFreeBlockThreshold, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitFreeBlockThreshold, 24) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitTotalFreeThreshold, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitTotalFreeThreshold, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitTotalFreeThreshold, 28) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, LockPrefixTable, 8) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, LockPrefixTable, 8) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, LockPrefixTable, 32) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, MaximumAllocationSize, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, MaximumAllocationSize, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, MaximumAllocationSize, 40) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, VirtualMemoryThreshold, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, VirtualMemoryThreshold, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, VirtualMemoryThreshold, 44) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, ProcessHeapFlags, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, ProcessHeapFlags, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, ProcessHeapFlags, 48) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, ProcessAffinityMask, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, ProcessAffinityMask, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, ProcessAffinityMask, 52) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, CSDVersion, 2) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, CSDVersion, 2) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, CSDVersion, 56) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, Reserved1, 2) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, Reserved1, 2) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, Reserved1, 58) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, EditList, 8) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, EditList, 8) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, EditList, 64) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, SecurityCookie, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, SecurityCookie, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, SecurityCookie, 72) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerTable, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerTable, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerTable, 76) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerCount, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerCount, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerCount, 80) -#endif -} - -static void test_pack_IMAGE_NT_HEADERS(void) -{ - /* IMAGE_NT_HEADERS */ - TEST_TYPE_SIZE (IMAGE_NT_HEADERS, 264) - TEST_TYPE_ALIGN (IMAGE_NT_HEADERS, 8) -} - -static void test_pack_IMAGE_NT_HEADERS32(void) -{ - /* IMAGE_NT_HEADERS32 */ - TEST_TYPE_SIZE (IMAGE_NT_HEADERS32, 248) - TEST_TYPE_ALIGN (IMAGE_NT_HEADERS32, 4) - TEST_FIELD_SIZE (IMAGE_NT_HEADERS32, Signature, 4) - TEST_FIELD_ALIGN (IMAGE_NT_HEADERS32, Signature, 4) - TEST_FIELD_OFFSET(IMAGE_NT_HEADERS32, Signature, 0) - TEST_FIELD_SIZE (IMAGE_NT_HEADERS32, FileHeader, 20) - TEST_FIELD_ALIGN (IMAGE_NT_HEADERS32, FileHeader, 4) - TEST_FIELD_OFFSET(IMAGE_NT_HEADERS32, FileHeader, 4) - TEST_FIELD_SIZE (IMAGE_NT_HEADERS32, OptionalHeader, 224) - TEST_FIELD_ALIGN (IMAGE_NT_HEADERS32, OptionalHeader, 4) - TEST_FIELD_OFFSET(IMAGE_NT_HEADERS32, OptionalHeader, 24) -} - -static void test_pack_IMAGE_NT_HEADERS64(void) -{ - /* IMAGE_NT_HEADERS64 */ - TEST_TYPE_SIZE (IMAGE_NT_HEADERS64, 264) - TEST_TYPE_ALIGN (IMAGE_NT_HEADERS64, 8) - TEST_FIELD_SIZE (IMAGE_NT_HEADERS64, Signature, 4) - TEST_FIELD_ALIGN (IMAGE_NT_HEADERS64, Signature, 4) - TEST_FIELD_OFFSET(IMAGE_NT_HEADERS64, Signature, 0) - TEST_FIELD_SIZE (IMAGE_NT_HEADERS64, FileHeader, 20) - TEST_FIELD_ALIGN (IMAGE_NT_HEADERS64, FileHeader, 4) - TEST_FIELD_OFFSET(IMAGE_NT_HEADERS64, FileHeader, 4) - TEST_FIELD_SIZE (IMAGE_NT_HEADERS64, OptionalHeader, 240) - TEST_FIELD_ALIGN (IMAGE_NT_HEADERS64, OptionalHeader, 8) - TEST_FIELD_OFFSET(IMAGE_NT_HEADERS64, OptionalHeader, 24) -} - -static void test_pack_IMAGE_OPTIONAL_HEADER(void) -{ - /* IMAGE_OPTIONAL_HEADER */ - TEST_TYPE_SIZE (IMAGE_OPTIONAL_HEADER, 240) - TEST_TYPE_ALIGN (IMAGE_OPTIONAL_HEADER, 8) -} - -static void test_pack_IMAGE_OPTIONAL_HEADER32(void) -{ - /* IMAGE_OPTIONAL_HEADER32 */ - TEST_TYPE_SIZE (IMAGE_OPTIONAL_HEADER32, 224) - TEST_TYPE_ALIGN (IMAGE_OPTIONAL_HEADER32, 4) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, Magic, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, Magic, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, Magic, 0) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MajorLinkerVersion, 1) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MajorLinkerVersion, 1) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MajorLinkerVersion, 2) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MinorLinkerVersion, 1) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MinorLinkerVersion, 1) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MinorLinkerVersion, 3) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfCode, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfCode, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfCode, 4) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfInitializedData, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfInitializedData, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfInitializedData, 8) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfUninitializedData, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfUninitializedData, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfUninitializedData, 12) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, AddressOfEntryPoint, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, AddressOfEntryPoint, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, AddressOfEntryPoint, 16) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, BaseOfCode, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, BaseOfCode, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, BaseOfCode, 20) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, BaseOfData, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, BaseOfData, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, BaseOfData, 24) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, ImageBase, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, ImageBase, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, ImageBase, 28) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SectionAlignment, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SectionAlignment, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SectionAlignment, 32) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, FileAlignment, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, FileAlignment, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, FileAlignment, 36) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MajorOperatingSystemVersion, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MajorOperatingSystemVersion, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MajorOperatingSystemVersion, 40) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MinorOperatingSystemVersion, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MinorOperatingSystemVersion, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MinorOperatingSystemVersion, 42) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MajorImageVersion, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MajorImageVersion, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MajorImageVersion, 44) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MinorImageVersion, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MinorImageVersion, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MinorImageVersion, 46) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MajorSubsystemVersion, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MajorSubsystemVersion, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MajorSubsystemVersion, 48) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MinorSubsystemVersion, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MinorSubsystemVersion, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MinorSubsystemVersion, 50) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, Win32VersionValue, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, Win32VersionValue, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, Win32VersionValue, 52) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfImage, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfImage, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfImage, 56) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfHeaders, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfHeaders, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfHeaders, 60) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, CheckSum, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, CheckSum, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, CheckSum, 64) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, Subsystem, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, Subsystem, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, Subsystem, 68) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, DllCharacteristics, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, DllCharacteristics, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, DllCharacteristics, 70) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfStackReserve, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfStackReserve, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfStackReserve, 72) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfStackCommit, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfStackCommit, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfStackCommit, 76) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfHeapReserve, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfHeapReserve, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfHeapReserve, 80) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfHeapCommit, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfHeapCommit, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfHeapCommit, 84) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, LoaderFlags, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, LoaderFlags, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, LoaderFlags, 88) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, NumberOfRvaAndSizes, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, NumberOfRvaAndSizes, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, NumberOfRvaAndSizes, 92) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, DataDirectory, 128) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, DataDirectory, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, DataDirectory, 96) -} - -static void test_pack_IMAGE_OPTIONAL_HEADER64(void) -{ - /* IMAGE_OPTIONAL_HEADER64 */ - TEST_TYPE_SIZE (IMAGE_OPTIONAL_HEADER64, 240) - TEST_TYPE_ALIGN (IMAGE_OPTIONAL_HEADER64, 8) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, Magic, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, Magic, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, Magic, 0) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MajorLinkerVersion, 1) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MajorLinkerVersion, 1) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MajorLinkerVersion, 2) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MinorLinkerVersion, 1) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MinorLinkerVersion, 1) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MinorLinkerVersion, 3) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfCode, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfCode, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfCode, 4) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfInitializedData, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfInitializedData, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfInitializedData, 8) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfUninitializedData, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfUninitializedData, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfUninitializedData, 12) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, AddressOfEntryPoint, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, AddressOfEntryPoint, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, AddressOfEntryPoint, 16) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, BaseOfCode, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, BaseOfCode, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, BaseOfCode, 20) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, ImageBase, 8) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, ImageBase, 8) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, ImageBase, 24) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SectionAlignment, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SectionAlignment, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SectionAlignment, 32) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, FileAlignment, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, FileAlignment, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, FileAlignment, 36) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MajorOperatingSystemVersion, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MajorOperatingSystemVersion, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MajorOperatingSystemVersion, 40) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MinorOperatingSystemVersion, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MinorOperatingSystemVersion, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MinorOperatingSystemVersion, 42) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MajorImageVersion, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MajorImageVersion, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MajorImageVersion, 44) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MinorImageVersion, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MinorImageVersion, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MinorImageVersion, 46) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MajorSubsystemVersion, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MajorSubsystemVersion, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MajorSubsystemVersion, 48) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MinorSubsystemVersion, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MinorSubsystemVersion, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MinorSubsystemVersion, 50) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, Win32VersionValue, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, Win32VersionValue, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, Win32VersionValue, 52) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfImage, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfImage, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfImage, 56) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfHeaders, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfHeaders, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfHeaders, 60) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, CheckSum, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, CheckSum, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, CheckSum, 64) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, Subsystem, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, Subsystem, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, Subsystem, 68) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, DllCharacteristics, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, DllCharacteristics, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, DllCharacteristics, 70) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfStackReserve, 8) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfStackReserve, 8) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfStackReserve, 72) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfStackCommit, 8) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfStackCommit, 8) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfStackCommit, 80) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfHeapReserve, 8) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfHeapReserve, 8) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfHeapReserve, 88) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfHeapCommit, 8) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfHeapCommit, 8) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfHeapCommit, 96) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, LoaderFlags, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, LoaderFlags, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, LoaderFlags, 104) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, NumberOfRvaAndSizes, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, NumberOfRvaAndSizes, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, NumberOfRvaAndSizes, 108) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, DataDirectory, 128) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, DataDirectory, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, DataDirectory, 112) -} - -static void test_pack_IMAGE_OS2_HEADER(void) -{ - /* IMAGE_OS2_HEADER (pack 2) */ - TEST_TYPE_SIZE (IMAGE_OS2_HEADER, 64) - TEST_TYPE_ALIGN (IMAGE_OS2_HEADER, 2) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_magic, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_magic, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_magic, 0) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_ver, 1) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_ver, 1) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_ver, 2) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_rev, 1) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_rev, 1) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_rev, 3) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_enttab, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_enttab, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_enttab, 4) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cbenttab, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cbenttab, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cbenttab, 6) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_crc, 4) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_crc, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_crc, 8) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_flags, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_flags, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_flags, 12) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_autodata, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_autodata, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_autodata, 14) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_heap, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_heap, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_heap, 16) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_stack, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_stack, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_stack, 18) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_csip, 4) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_csip, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_csip, 20) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_sssp, 4) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_sssp, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_sssp, 24) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cseg, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cseg, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cseg, 28) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cmod, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cmod, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cmod, 30) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cbnrestab, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cbnrestab, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cbnrestab, 32) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_segtab, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_segtab, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_segtab, 34) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_rsrctab, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_rsrctab, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_rsrctab, 36) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_restab, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_restab, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_restab, 38) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_modtab, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_modtab, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_modtab, 40) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_imptab, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_imptab, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_imptab, 42) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_nrestab, 4) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_nrestab, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_nrestab, 44) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cmovent, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cmovent, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cmovent, 48) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_align, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_align, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_align, 50) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cres, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cres, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cres, 52) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_exetyp, 1) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_exetyp, 1) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_exetyp, 54) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_flagsothers, 1) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_flagsothers, 1) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_flagsothers, 55) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_pretthunks, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_pretthunks, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_pretthunks, 56) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_psegrefbytes, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_psegrefbytes, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_psegrefbytes, 58) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_swaparea, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_swaparea, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_swaparea, 60) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_expver, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_expver, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_expver, 62) -} - -static void test_pack_IMAGE_RELOCATION(void) -{ - /* IMAGE_RELOCATION (pack 2) */ -} - -static void test_pack_IMAGE_RESOURCE_DATA_ENTRY(void) -{ - /* IMAGE_RESOURCE_DATA_ENTRY */ - TEST_TYPE_SIZE (IMAGE_RESOURCE_DATA_ENTRY, 16) - TEST_TYPE_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, 4) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, OffsetToData, 4) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, OffsetToData, 4) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, OffsetToData, 0) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, Size, 4) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, Size, 4) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, Size, 4) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, CodePage, 4) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, CodePage, 4) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, CodePage, 8) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, Reserved, 4) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, Reserved, 4) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, Reserved, 12) -} - -static void test_pack_IMAGE_RESOURCE_DIRECTORY(void) -{ - /* IMAGE_RESOURCE_DIRECTORY */ - TEST_TYPE_SIZE (IMAGE_RESOURCE_DIRECTORY, 16) - TEST_TYPE_ALIGN (IMAGE_RESOURCE_DIRECTORY, 4) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, Characteristics, 4) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, Characteristics, 4) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, Characteristics, 0) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, TimeDateStamp, 4) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, TimeDateStamp, 4) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, TimeDateStamp, 4) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, MajorVersion, 2) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, MajorVersion, 2) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, MajorVersion, 8) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, MinorVersion, 2) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, MinorVersion, 2) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, MinorVersion, 10) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, NumberOfNamedEntries, 2) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, NumberOfNamedEntries, 2) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, NumberOfNamedEntries, 12) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, NumberOfIdEntries, 2) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, NumberOfIdEntries, 2) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, NumberOfIdEntries, 14) -} - -static void test_pack_IMAGE_RESOURCE_DIRECTORY_ENTRY(void) -{ - /* IMAGE_RESOURCE_DIRECTORY_ENTRY */ -} - -static void test_pack_IMAGE_RESOURCE_DIRECTORY_STRING(void) -{ - /* IMAGE_RESOURCE_DIRECTORY_STRING */ - TEST_TYPE_SIZE (IMAGE_RESOURCE_DIRECTORY_STRING, 4) - TEST_TYPE_ALIGN (IMAGE_RESOURCE_DIRECTORY_STRING, 2) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY_STRING, Length, 2) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY_STRING, Length, 2) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY_STRING, Length, 0) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY_STRING, NameString, 1) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY_STRING, NameString, 1) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY_STRING, NameString, 2) -} - -static void test_pack_IMAGE_RESOURCE_DIR_STRING_U(void) -{ - /* IMAGE_RESOURCE_DIR_STRING_U */ - TEST_TYPE_SIZE (IMAGE_RESOURCE_DIR_STRING_U, 4) - TEST_TYPE_ALIGN (IMAGE_RESOURCE_DIR_STRING_U, 2) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DIR_STRING_U, Length, 2) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIR_STRING_U, Length, 2) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIR_STRING_U, Length, 0) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DIR_STRING_U, NameString, 2) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIR_STRING_U, NameString, 2) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIR_STRING_U, NameString, 2) -} - -static void test_pack_IMAGE_SECTION_HEADER(void) -{ - /* IMAGE_SECTION_HEADER */ - TEST_FIELD_SIZE (IMAGE_SECTION_HEADER, Name, 8) - TEST_FIELD_ALIGN (IMAGE_SECTION_HEADER, Name, 1) - TEST_FIELD_OFFSET(IMAGE_SECTION_HEADER, Name, 0) -} - -static void test_pack_IMAGE_SEPARATE_DEBUG_HEADER(void) -{ - /* IMAGE_SEPARATE_DEBUG_HEADER */ - TEST_TYPE_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, 48) - TEST_TYPE_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, 4) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Signature, 2) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Signature, 2) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Signature, 0) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Flags, 2) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Flags, 2) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Flags, 2) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Machine, 2) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Machine, 2) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Machine, 4) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Characteristics, 2) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Characteristics, 2) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Characteristics, 6) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, TimeDateStamp, 4) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, TimeDateStamp, 4) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, TimeDateStamp, 8) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, CheckSum, 4) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, CheckSum, 4) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, CheckSum, 12) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, ImageBase, 4) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, ImageBase, 4) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, ImageBase, 16) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, SizeOfImage, 4) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, SizeOfImage, 4) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, SizeOfImage, 20) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, NumberOfSections, 4) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, NumberOfSections, 4) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, NumberOfSections, 24) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, ExportedNamesSize, 4) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, ExportedNamesSize, 4) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, ExportedNamesSize, 28) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, DebugDirectorySize, 4) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, DebugDirectorySize, 4) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, DebugDirectorySize, 32) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, SectionAlignment, 4) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, SectionAlignment, 4) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, SectionAlignment, 36) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Reserved, 8) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Reserved, 4) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Reserved, 40) -} - -static void test_pack_IMAGE_SYMBOL(void) -{ - /* IMAGE_SYMBOL (pack 2) */ -} - -static void test_pack_IMAGE_THUNK_DATA(void) -{ - /* IMAGE_THUNK_DATA */ -} - -static void test_pack_IMAGE_TLS_DIRECTORY(void) -{ - /* IMAGE_TLS_DIRECTORY */ - TEST_TYPE_SIZE (IMAGE_TLS_DIRECTORY, 40) - TEST_TYPE_ALIGN (IMAGE_TLS_DIRECTORY, 8) -} - -static void test_pack_IMAGE_TLS_DIRECTORY32(void) -{ - /* IMAGE_TLS_DIRECTORY32 */ - TEST_TYPE_SIZE (IMAGE_TLS_DIRECTORY32, 24) - TEST_TYPE_ALIGN (IMAGE_TLS_DIRECTORY32, 4) - TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, StartAddressOfRawData, 4) - TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, StartAddressOfRawData, 4) - TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, StartAddressOfRawData, 0) - TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, EndAddressOfRawData, 4) - TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, EndAddressOfRawData, 4) - TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, EndAddressOfRawData, 4) - TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, AddressOfIndex, 4) - TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, AddressOfIndex, 4) - TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, AddressOfIndex, 8) - TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, AddressOfCallBacks, 4) - TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, AddressOfCallBacks, 4) - TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, AddressOfCallBacks, 12) - TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, SizeOfZeroFill, 4) - TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, SizeOfZeroFill, 4) - TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, SizeOfZeroFill, 16) - TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, Characteristics, 4) - TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, Characteristics, 4) - TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, Characteristics, 20) -} - -static void test_pack_IMAGE_TLS_DIRECTORY64(void) -{ - /* IMAGE_TLS_DIRECTORY64 */ - TEST_TYPE_SIZE (IMAGE_TLS_DIRECTORY64, 40) - TEST_TYPE_ALIGN (IMAGE_TLS_DIRECTORY64, 8) - TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, StartAddressOfRawData, 8) - TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, StartAddressOfRawData, 8) - TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, StartAddressOfRawData, 0) - TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, EndAddressOfRawData, 8) - TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, EndAddressOfRawData, 8) - TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, EndAddressOfRawData, 8) - TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, AddressOfIndex, 8) - TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, AddressOfIndex, 8) - TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, AddressOfIndex, 16) - TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, AddressOfCallBacks, 8) - TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, AddressOfCallBacks, 8) - TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, AddressOfCallBacks, 24) - TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, SizeOfZeroFill, 4) - TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, SizeOfZeroFill, 4) - TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, SizeOfZeroFill, 32) - TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, Characteristics, 4) - TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, Characteristics, 4) - TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, Characteristics, 36) -} - -static void test_pack_IMAGE_VXD_HEADER(void) -{ - /* IMAGE_VXD_HEADER (pack 2) */ - TEST_TYPE_SIZE (IMAGE_VXD_HEADER, 196) - TEST_TYPE_ALIGN (IMAGE_VXD_HEADER, 2) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_magic, 2) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_magic, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_magic, 0) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_border, 1) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_border, 1) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_border, 2) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_worder, 1) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_worder, 1) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_worder, 3) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_level, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_level, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_level, 4) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_cpu, 2) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_cpu, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_cpu, 8) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_os, 2) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_os, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_os, 10) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ver, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ver, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ver, 12) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_mflags, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_mflags, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_mflags, 16) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_mpages, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_mpages, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_mpages, 20) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_startobj, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_startobj, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_startobj, 24) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_eip, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_eip, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_eip, 28) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_stackobj, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_stackobj, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_stackobj, 32) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_esp, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_esp, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_esp, 36) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_pagesize, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_pagesize, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_pagesize, 40) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_lastpagesize, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_lastpagesize, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_lastpagesize, 44) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_fixupsize, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_fixupsize, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_fixupsize, 48) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_fixupsum, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_fixupsum, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_fixupsum, 52) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ldrsize, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ldrsize, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ldrsize, 56) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ldrsum, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ldrsum, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ldrsum, 60) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_objtab, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_objtab, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_objtab, 64) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_objcnt, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_objcnt, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_objcnt, 68) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_objmap, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_objmap, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_objmap, 72) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_itermap, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_itermap, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_itermap, 76) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_rsrctab, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_rsrctab, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_rsrctab, 80) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_rsrccnt, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_rsrccnt, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_rsrccnt, 84) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_restab, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_restab, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_restab, 88) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_enttab, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_enttab, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_enttab, 92) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_dirtab, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_dirtab, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_dirtab, 96) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_dircnt, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_dircnt, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_dircnt, 100) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_fpagetab, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_fpagetab, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_fpagetab, 104) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_frectab, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_frectab, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_frectab, 108) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_impmod, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_impmod, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_impmod, 112) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_impmodcnt, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_impmodcnt, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_impmodcnt, 116) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_impproc, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_impproc, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_impproc, 120) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_pagesum, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_pagesum, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_pagesum, 124) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_datapage, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_datapage, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_datapage, 128) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_preload, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_preload, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_preload, 132) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_nrestab, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_nrestab, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_nrestab, 136) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_cbnrestab, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_cbnrestab, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_cbnrestab, 140) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_nressum, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_nressum, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_nressum, 144) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_autodata, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_autodata, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_autodata, 148) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_debuginfo, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_debuginfo, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_debuginfo, 152) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_debuglen, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_debuglen, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_debuglen, 156) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_instpreload, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_instpreload, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_instpreload, 160) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_instdemand, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_instdemand, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_instdemand, 164) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_heapsize, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_heapsize, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_heapsize, 168) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_res3, 12) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_res3, 1) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_res3, 172) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_winresoff, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_winresoff, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_winresoff, 184) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_winreslen, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_winreslen, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_winreslen, 188) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_devid, 2) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_devid, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_devid, 192) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ddkver, 2) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ddkver, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ddkver, 194) -} - -static void test_pack_IO_COUNTERS(void) -{ - /* IO_COUNTERS (pack 8) */ - TEST_TYPE_SIZE (IO_COUNTERS, 48) - TEST_TYPE_ALIGN (IO_COUNTERS, 8) - TEST_FIELD_SIZE (IO_COUNTERS, ReadOperationCount, 8) - TEST_FIELD_ALIGN (IO_COUNTERS, ReadOperationCount, 8) - TEST_FIELD_OFFSET(IO_COUNTERS, ReadOperationCount, 0) - TEST_FIELD_SIZE (IO_COUNTERS, WriteOperationCount, 8) - TEST_FIELD_ALIGN (IO_COUNTERS, WriteOperationCount, 8) - TEST_FIELD_OFFSET(IO_COUNTERS, WriteOperationCount, 8) - TEST_FIELD_SIZE (IO_COUNTERS, OtherOperationCount, 8) - TEST_FIELD_ALIGN (IO_COUNTERS, OtherOperationCount, 8) - TEST_FIELD_OFFSET(IO_COUNTERS, OtherOperationCount, 16) - TEST_FIELD_SIZE (IO_COUNTERS, ReadTransferCount, 8) - TEST_FIELD_ALIGN (IO_COUNTERS, ReadTransferCount, 8) - TEST_FIELD_OFFSET(IO_COUNTERS, ReadTransferCount, 24) - TEST_FIELD_SIZE (IO_COUNTERS, WriteTransferCount, 8) - TEST_FIELD_ALIGN (IO_COUNTERS, WriteTransferCount, 8) - TEST_FIELD_OFFSET(IO_COUNTERS, WriteTransferCount, 32) - TEST_FIELD_SIZE (IO_COUNTERS, OtherTransferCount, 8) - TEST_FIELD_ALIGN (IO_COUNTERS, OtherTransferCount, 8) - TEST_FIELD_OFFSET(IO_COUNTERS, OtherTransferCount, 40) -} - -static void test_pack_LANGID(void) -{ - /* LANGID */ - TEST_TYPE_SIZE (LANGID, 2) - TEST_TYPE_ALIGN (LANGID, 2) - TEST_TYPE_UNSIGNED(LANGID) -} - -static void test_pack_LARGE_INTEGER(void) -{ - /* LARGE_INTEGER */ -} - -static void test_pack_LCID(void) -{ - /* LCID */ - TEST_TYPE_SIZE (LCID, 4) - TEST_TYPE_ALIGN (LCID, 4) - TEST_TYPE_UNSIGNED(LCID) -} - -static void test_pack_LIST_ENTRY(void) -{ - /* LIST_ENTRY */ - TEST_TYPE_SIZE (LIST_ENTRY, 16) - TEST_TYPE_ALIGN (LIST_ENTRY, 8) - TEST_FIELD_SIZE (LIST_ENTRY, Flink, 8) - TEST_FIELD_ALIGN (LIST_ENTRY, Flink, 8) - TEST_FIELD_OFFSET(LIST_ENTRY, Flink, 0) - TEST_FIELD_SIZE (LIST_ENTRY, Blink, 8) - TEST_FIELD_ALIGN (LIST_ENTRY, Blink, 8) - TEST_FIELD_OFFSET(LIST_ENTRY, Blink, 8) -} - -static void test_pack_LONG(void) -{ - /* LONG */ - TEST_TYPE_SIZE (LONG, 4) - TEST_TYPE_ALIGN (LONG, 4) - TEST_TYPE_SIGNED(LONG) -} - -static void test_pack_LONGLONG(void) -{ - /* LONGLONG */ - TEST_TYPE_SIZE (LONGLONG, 8) - TEST_TYPE_ALIGN (LONGLONG, 8) - TEST_TYPE_SIGNED(LONGLONG) -} - -static void test_pack_LUID(void) -{ - /* LUID */ - TEST_TYPE_SIZE (LUID, 8) - TEST_TYPE_ALIGN (LUID, 4) - TEST_FIELD_SIZE (LUID, LowPart, 4) - TEST_FIELD_ALIGN (LUID, LowPart, 4) - TEST_FIELD_OFFSET(LUID, LowPart, 0) - TEST_FIELD_SIZE (LUID, HighPart, 4) - TEST_FIELD_ALIGN (LUID, HighPart, 4) - TEST_FIELD_OFFSET(LUID, HighPart, 4) -} - -static void test_pack_LUID_AND_ATTRIBUTES(void) -{ - /* LUID_AND_ATTRIBUTES (pack 4) */ - TEST_TYPE_SIZE (LUID_AND_ATTRIBUTES, 12) - TEST_TYPE_ALIGN (LUID_AND_ATTRIBUTES, 4) - TEST_FIELD_SIZE (LUID_AND_ATTRIBUTES, Luid, 8) - TEST_FIELD_ALIGN (LUID_AND_ATTRIBUTES, Luid, 4) - TEST_FIELD_OFFSET(LUID_AND_ATTRIBUTES, Luid, 0) - TEST_FIELD_SIZE (LUID_AND_ATTRIBUTES, Attributes, 4) - TEST_FIELD_ALIGN (LUID_AND_ATTRIBUTES, Attributes, 4) - TEST_FIELD_OFFSET(LUID_AND_ATTRIBUTES, Attributes, 8) -} - -static void test_pack_MEMORY_BASIC_INFORMATION(void) -{ - /* MEMORY_BASIC_INFORMATION */ - TEST_TYPE_SIZE (MEMORY_BASIC_INFORMATION, 48) - TEST_TYPE_ALIGN (MEMORY_BASIC_INFORMATION, 8) - TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, BaseAddress, 8) - TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, BaseAddress, 8) - TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, BaseAddress, 0) - TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, AllocationBase, 8) - TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, AllocationBase, 8) - TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, AllocationBase, 8) - TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, AllocationProtect, 4) - TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, AllocationProtect, 4) - TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, AllocationProtect, 16) - TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, RegionSize, 8) - TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, RegionSize, 8) - TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, RegionSize, 24) - TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, State, 4) - TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, State, 4) - TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, State, 32) - TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, Protect, 4) - TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, Protect, 4) - TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, Protect, 36) - TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, Type, 4) - TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, Type, 4) - TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, Type, 40) -} - -static void test_pack_MESSAGE_RESOURCE_BLOCK(void) -{ - /* MESSAGE_RESOURCE_BLOCK */ - TEST_TYPE_SIZE (MESSAGE_RESOURCE_BLOCK, 12) - TEST_TYPE_ALIGN (MESSAGE_RESOURCE_BLOCK, 4) - TEST_FIELD_SIZE (MESSAGE_RESOURCE_BLOCK, LowId, 4) - TEST_FIELD_ALIGN (MESSAGE_RESOURCE_BLOCK, LowId, 4) - TEST_FIELD_OFFSET(MESSAGE_RESOURCE_BLOCK, LowId, 0) - TEST_FIELD_SIZE (MESSAGE_RESOURCE_BLOCK, HighId, 4) - TEST_FIELD_ALIGN (MESSAGE_RESOURCE_BLOCK, HighId, 4) - TEST_FIELD_OFFSET(MESSAGE_RESOURCE_BLOCK, HighId, 4) - TEST_FIELD_SIZE (MESSAGE_RESOURCE_BLOCK, OffsetToEntries, 4) - TEST_FIELD_ALIGN (MESSAGE_RESOURCE_BLOCK, OffsetToEntries, 4) - TEST_FIELD_OFFSET(MESSAGE_RESOURCE_BLOCK, OffsetToEntries, 8) -} - -static void test_pack_MESSAGE_RESOURCE_DATA(void) -{ - /* MESSAGE_RESOURCE_DATA */ - TEST_TYPE_SIZE (MESSAGE_RESOURCE_DATA, 16) - TEST_TYPE_ALIGN (MESSAGE_RESOURCE_DATA, 4) - TEST_FIELD_SIZE (MESSAGE_RESOURCE_DATA, NumberOfBlocks, 4) - TEST_FIELD_ALIGN (MESSAGE_RESOURCE_DATA, NumberOfBlocks, 4) - TEST_FIELD_OFFSET(MESSAGE_RESOURCE_DATA, NumberOfBlocks, 0) - TEST_FIELD_SIZE (MESSAGE_RESOURCE_DATA, Blocks, 12) - TEST_FIELD_ALIGN (MESSAGE_RESOURCE_DATA, Blocks, 4) - TEST_FIELD_OFFSET(MESSAGE_RESOURCE_DATA, Blocks, 4) -} - -static void test_pack_MESSAGE_RESOURCE_ENTRY(void) -{ - /* MESSAGE_RESOURCE_ENTRY */ - TEST_TYPE_SIZE (MESSAGE_RESOURCE_ENTRY, 6) - TEST_TYPE_ALIGN (MESSAGE_RESOURCE_ENTRY, 2) - TEST_FIELD_SIZE (MESSAGE_RESOURCE_ENTRY, Length, 2) - TEST_FIELD_ALIGN (MESSAGE_RESOURCE_ENTRY, Length, 2) - TEST_FIELD_OFFSET(MESSAGE_RESOURCE_ENTRY, Length, 0) - TEST_FIELD_SIZE (MESSAGE_RESOURCE_ENTRY, Flags, 2) - TEST_FIELD_ALIGN (MESSAGE_RESOURCE_ENTRY, Flags, 2) - TEST_FIELD_OFFSET(MESSAGE_RESOURCE_ENTRY, Flags, 2) - TEST_FIELD_SIZE (MESSAGE_RESOURCE_ENTRY, Text, 1) - TEST_FIELD_ALIGN (MESSAGE_RESOURCE_ENTRY, Text, 1) - TEST_FIELD_OFFSET(MESSAGE_RESOURCE_ENTRY, Text, 4) -} - -static void test_pack_NT_TIB(void) -{ - /* NT_TIB */ - TEST_FIELD_SIZE (NT_TIB, ExceptionList, 8) - TEST_FIELD_ALIGN (NT_TIB, ExceptionList, 8) - TEST_FIELD_OFFSET(NT_TIB, ExceptionList, 0) - TEST_FIELD_SIZE (NT_TIB, StackBase, 8) - TEST_FIELD_ALIGN (NT_TIB, StackBase, 8) - TEST_FIELD_OFFSET(NT_TIB, StackBase, 8) - TEST_FIELD_SIZE (NT_TIB, StackLimit, 8) - TEST_FIELD_ALIGN (NT_TIB, StackLimit, 8) - TEST_FIELD_OFFSET(NT_TIB, StackLimit, 16) - TEST_FIELD_SIZE (NT_TIB, SubSystemTib, 8) - TEST_FIELD_ALIGN (NT_TIB, SubSystemTib, 8) - TEST_FIELD_OFFSET(NT_TIB, SubSystemTib, 24) -} - -static void test_pack_OBJECT_TYPE_LIST(void) -{ - /* OBJECT_TYPE_LIST */ - TEST_TYPE_SIZE (OBJECT_TYPE_LIST, 16) - TEST_TYPE_ALIGN (OBJECT_TYPE_LIST, 8) - TEST_FIELD_SIZE (OBJECT_TYPE_LIST, Level, 2) - TEST_FIELD_ALIGN (OBJECT_TYPE_LIST, Level, 2) - TEST_FIELD_OFFSET(OBJECT_TYPE_LIST, Level, 0) - TEST_FIELD_SIZE (OBJECT_TYPE_LIST, Sbz, 2) - TEST_FIELD_ALIGN (OBJECT_TYPE_LIST, Sbz, 2) - TEST_FIELD_OFFSET(OBJECT_TYPE_LIST, Sbz, 2) - TEST_FIELD_SIZE (OBJECT_TYPE_LIST, ObjectType, 8) - TEST_FIELD_ALIGN (OBJECT_TYPE_LIST, ObjectType, 8) - TEST_FIELD_OFFSET(OBJECT_TYPE_LIST, ObjectType, 8) -} - -static void test_pack_PACCESS_ALLOWED_ACE(void) -{ - /* PACCESS_ALLOWED_ACE */ - TEST_TYPE_SIZE (PACCESS_ALLOWED_ACE, 8) - TEST_TYPE_ALIGN (PACCESS_ALLOWED_ACE, 8) - TEST_TARGET_SIZE (PACCESS_ALLOWED_ACE, 12) - TEST_TARGET_ALIGN(PACCESS_ALLOWED_ACE, 4) -} - -static void test_pack_PACCESS_DENIED_ACE(void) -{ - /* PACCESS_DENIED_ACE */ - TEST_TYPE_SIZE (PACCESS_DENIED_ACE, 8) - TEST_TYPE_ALIGN (PACCESS_DENIED_ACE, 8) - TEST_TARGET_SIZE (PACCESS_DENIED_ACE, 12) - TEST_TARGET_ALIGN(PACCESS_DENIED_ACE, 4) -} - -static void test_pack_PACCESS_TOKEN(void) -{ - /* PACCESS_TOKEN */ - TEST_TYPE_SIZE (PACCESS_TOKEN, 8) - TEST_TYPE_ALIGN (PACCESS_TOKEN, 8) -} - -static void test_pack_PACE_HEADER(void) -{ - /* PACE_HEADER */ - TEST_TYPE_SIZE (PACE_HEADER, 8) - TEST_TYPE_ALIGN (PACE_HEADER, 8) - TEST_TARGET_SIZE (PACE_HEADER, 4) - TEST_TARGET_ALIGN(PACE_HEADER, 2) -} - -static void test_pack_PACL(void) -{ - /* PACL */ - TEST_TYPE_SIZE (PACL, 8) - TEST_TYPE_ALIGN (PACL, 8) - TEST_TARGET_SIZE (PACL, 8) - TEST_TARGET_ALIGN(PACL, 2) -} - -static void test_pack_PACL_REVISION_INFORMATION(void) -{ - /* PACL_REVISION_INFORMATION */ - TEST_TYPE_SIZE (PACL_REVISION_INFORMATION, 8) - TEST_TYPE_ALIGN (PACL_REVISION_INFORMATION, 8) - TEST_TARGET_SIZE (PACL_REVISION_INFORMATION, 4) - TEST_TARGET_ALIGN(PACL_REVISION_INFORMATION, 4) -} - -static void test_pack_PACL_SIZE_INFORMATION(void) -{ - /* PACL_SIZE_INFORMATION */ - TEST_TYPE_SIZE (PACL_SIZE_INFORMATION, 8) - TEST_TYPE_ALIGN (PACL_SIZE_INFORMATION, 8) - TEST_TARGET_SIZE (PACL_SIZE_INFORMATION, 12) - TEST_TARGET_ALIGN(PACL_SIZE_INFORMATION, 4) -} - -static void test_pack_PCCH(void) -{ - /* PCCH */ - TEST_TYPE_SIZE (PCCH, 8) - TEST_TYPE_ALIGN (PCCH, 8) - TEST_TARGET_SIZE (PCCH, 1) - TEST_TARGET_ALIGN(PCCH, 1) -} - -static void test_pack_PCH(void) -{ - /* PCH */ - TEST_TYPE_SIZE (PCH, 8) - TEST_TYPE_ALIGN (PCH, 8) - TEST_TARGET_SIZE (PCH, 1) - TEST_TARGET_ALIGN(PCH, 1) -} - -static void test_pack_PCSTR(void) -{ - /* PCSTR */ - TEST_TYPE_SIZE (PCSTR, 8) - TEST_TYPE_ALIGN (PCSTR, 8) - TEST_TARGET_SIZE (PCSTR, 1) - TEST_TARGET_ALIGN(PCSTR, 1) -} - -static void test_pack_PCTSTR(void) -{ - /* PCTSTR */ - TEST_TYPE_SIZE (PCTSTR, 8) - TEST_TYPE_ALIGN (PCTSTR, 8) -} - -static void test_pack_PCWCH(void) -{ - /* PCWCH */ - TEST_TYPE_SIZE (PCWCH, 8) - TEST_TYPE_ALIGN (PCWCH, 8) - TEST_TARGET_SIZE (PCWCH, 2) - TEST_TARGET_ALIGN(PCWCH, 2) -} - -static void test_pack_PCWSTR(void) -{ - /* PCWSTR */ - TEST_TYPE_SIZE (PCWSTR, 8) - TEST_TYPE_ALIGN (PCWSTR, 8) - TEST_TARGET_SIZE (PCWSTR, 2) - TEST_TARGET_ALIGN(PCWSTR, 2) -} - -static void test_pack_PEXCEPTION_POINTERS(void) -{ - /* PEXCEPTION_POINTERS */ - TEST_TYPE_SIZE (PEXCEPTION_POINTERS, 8) - TEST_TYPE_ALIGN (PEXCEPTION_POINTERS, 8) - TEST_TARGET_SIZE (PEXCEPTION_POINTERS, 16) - TEST_TARGET_ALIGN(PEXCEPTION_POINTERS, 8) -} - -static void test_pack_PEXCEPTION_RECORD(void) -{ - /* PEXCEPTION_RECORD */ - TEST_TYPE_SIZE (PEXCEPTION_RECORD, 8) - TEST_TYPE_ALIGN (PEXCEPTION_RECORD, 8) - TEST_TARGET_SIZE (PEXCEPTION_RECORD, 152) - TEST_TARGET_ALIGN(PEXCEPTION_RECORD, 8) -} - -static void test_pack_PFLOATING_SAVE_AREA(void) -{ -#if 0 - /* PFLOATING_SAVE_AREA */ - TEST_TYPE_SIZE (PFLOATING_SAVE_AREA, 8) - TEST_TYPE_ALIGN (PFLOATING_SAVE_AREA, 8) - TEST_TARGET_SIZE (PFLOATING_SAVE_AREA, 112) - TEST_TARGET_ALIGN(PFLOATING_SAVE_AREA, 4) -#endif -} - -static void test_pack_PFPO_DATA(void) -{ - /* PFPO_DATA */ - TEST_TYPE_SIZE (PFPO_DATA, 8) - TEST_TYPE_ALIGN (PFPO_DATA, 8) - TEST_TARGET_SIZE (PFPO_DATA, 16) - TEST_TARGET_ALIGN(PFPO_DATA, 4) -} - -static void test_pack_PGENERIC_MAPPING(void) -{ - /* PGENERIC_MAPPING */ - TEST_TYPE_SIZE (PGENERIC_MAPPING, 8) - TEST_TYPE_ALIGN (PGENERIC_MAPPING, 8) - TEST_TARGET_SIZE (PGENERIC_MAPPING, 16) - TEST_TARGET_ALIGN(PGENERIC_MAPPING, 4) -} - -static void test_pack_PHANDLE(void) -{ - /* PHANDLE */ - TEST_TYPE_SIZE (PHANDLE, 8) - TEST_TYPE_ALIGN (PHANDLE, 8) - TEST_TARGET_SIZE (PHANDLE, 8) - TEST_TARGET_ALIGN(PHANDLE, 8) -} - -static void test_pack_PIMAGE_ARCHIVE_MEMBER_HEADER(void) -{ - /* PIMAGE_ARCHIVE_MEMBER_HEADER */ - TEST_TYPE_SIZE (PIMAGE_ARCHIVE_MEMBER_HEADER, 8) - TEST_TYPE_ALIGN (PIMAGE_ARCHIVE_MEMBER_HEADER, 8) - TEST_TARGET_SIZE (PIMAGE_ARCHIVE_MEMBER_HEADER, 60) - TEST_TARGET_ALIGN(PIMAGE_ARCHIVE_MEMBER_HEADER, 1) -} - -static void test_pack_PIMAGE_AUX_SYMBOL(void) -{ - /* PIMAGE_AUX_SYMBOL */ - TEST_TYPE_SIZE (PIMAGE_AUX_SYMBOL, 8) - TEST_TYPE_ALIGN (PIMAGE_AUX_SYMBOL, 8) -} - -static void test_pack_PIMAGE_BASE_RELOCATION(void) -{ - /* PIMAGE_BASE_RELOCATION */ - TEST_TYPE_SIZE (PIMAGE_BASE_RELOCATION, 8) - TEST_TYPE_ALIGN (PIMAGE_BASE_RELOCATION, 8) - TEST_TARGET_SIZE (PIMAGE_BASE_RELOCATION, 8) - TEST_TARGET_ALIGN(PIMAGE_BASE_RELOCATION, 4) -} - -static void test_pack_PIMAGE_BOUND_FORWARDER_REF(void) -{ - /* PIMAGE_BOUND_FORWARDER_REF */ - TEST_TYPE_SIZE (PIMAGE_BOUND_FORWARDER_REF, 8) - TEST_TYPE_ALIGN (PIMAGE_BOUND_FORWARDER_REF, 8) - TEST_TARGET_SIZE (PIMAGE_BOUND_FORWARDER_REF, 8) - TEST_TARGET_ALIGN(PIMAGE_BOUND_FORWARDER_REF, 4) -} - -static void test_pack_PIMAGE_BOUND_IMPORT_DESCRIPTOR(void) -{ - /* PIMAGE_BOUND_IMPORT_DESCRIPTOR */ - TEST_TYPE_SIZE (PIMAGE_BOUND_IMPORT_DESCRIPTOR, 8) - TEST_TYPE_ALIGN (PIMAGE_BOUND_IMPORT_DESCRIPTOR, 8) - TEST_TARGET_SIZE (PIMAGE_BOUND_IMPORT_DESCRIPTOR, 8) - TEST_TARGET_ALIGN(PIMAGE_BOUND_IMPORT_DESCRIPTOR, 4) -} - -static void test_pack_PIMAGE_COFF_SYMBOLS_HEADER(void) -{ - /* PIMAGE_COFF_SYMBOLS_HEADER */ - TEST_TYPE_SIZE (PIMAGE_COFF_SYMBOLS_HEADER, 8) - TEST_TYPE_ALIGN (PIMAGE_COFF_SYMBOLS_HEADER, 8) - TEST_TARGET_SIZE (PIMAGE_COFF_SYMBOLS_HEADER, 32) - TEST_TARGET_ALIGN(PIMAGE_COFF_SYMBOLS_HEADER, 4) -} - -static void test_pack_PIMAGE_DATA_DIRECTORY(void) -{ - /* PIMAGE_DATA_DIRECTORY */ - TEST_TYPE_SIZE (PIMAGE_DATA_DIRECTORY, 8) - TEST_TYPE_ALIGN (PIMAGE_DATA_DIRECTORY, 8) - TEST_TARGET_SIZE (PIMAGE_DATA_DIRECTORY, 8) - TEST_TARGET_ALIGN(PIMAGE_DATA_DIRECTORY, 4) -} - -static void test_pack_PIMAGE_DEBUG_DIRECTORY(void) -{ - /* PIMAGE_DEBUG_DIRECTORY */ - TEST_TYPE_SIZE (PIMAGE_DEBUG_DIRECTORY, 8) - TEST_TYPE_ALIGN (PIMAGE_DEBUG_DIRECTORY, 8) - TEST_TARGET_SIZE (PIMAGE_DEBUG_DIRECTORY, 28) - TEST_TARGET_ALIGN(PIMAGE_DEBUG_DIRECTORY, 4) -} - -static void test_pack_PIMAGE_DEBUG_MISC(void) -{ - /* PIMAGE_DEBUG_MISC */ - TEST_TYPE_SIZE (PIMAGE_DEBUG_MISC, 8) - TEST_TYPE_ALIGN (PIMAGE_DEBUG_MISC, 8) - TEST_TARGET_SIZE (PIMAGE_DEBUG_MISC, 16) - TEST_TARGET_ALIGN(PIMAGE_DEBUG_MISC, 4) -} - -static void test_pack_PIMAGE_DOS_HEADER(void) -{ - /* PIMAGE_DOS_HEADER */ - TEST_TYPE_SIZE (PIMAGE_DOS_HEADER, 8) - TEST_TYPE_ALIGN (PIMAGE_DOS_HEADER, 8) - TEST_TARGET_SIZE (PIMAGE_DOS_HEADER, 64) - TEST_TARGET_ALIGN(PIMAGE_DOS_HEADER, 2) -} - -static void test_pack_PIMAGE_EXPORT_DIRECTORY(void) -{ - /* PIMAGE_EXPORT_DIRECTORY */ - TEST_TYPE_SIZE (PIMAGE_EXPORT_DIRECTORY, 8) - TEST_TYPE_ALIGN (PIMAGE_EXPORT_DIRECTORY, 8) - TEST_TARGET_SIZE (PIMAGE_EXPORT_DIRECTORY, 40) - TEST_TARGET_ALIGN(PIMAGE_EXPORT_DIRECTORY, 4) -} - -static void test_pack_PIMAGE_FILE_HEADER(void) -{ - /* PIMAGE_FILE_HEADER */ - TEST_TYPE_SIZE (PIMAGE_FILE_HEADER, 8) - TEST_TYPE_ALIGN (PIMAGE_FILE_HEADER, 8) - TEST_TARGET_SIZE (PIMAGE_FILE_HEADER, 20) - TEST_TARGET_ALIGN(PIMAGE_FILE_HEADER, 4) -} - -static void test_pack_PIMAGE_FUNCTION_ENTRY(void) -{ - /* PIMAGE_FUNCTION_ENTRY */ - TEST_TYPE_SIZE (PIMAGE_FUNCTION_ENTRY, 8) - TEST_TYPE_ALIGN (PIMAGE_FUNCTION_ENTRY, 8) - TEST_TARGET_SIZE (PIMAGE_FUNCTION_ENTRY, 12) - TEST_TARGET_ALIGN(PIMAGE_FUNCTION_ENTRY, 4) -} - -static void test_pack_PIMAGE_IMPORT_BY_NAME(void) -{ - /* PIMAGE_IMPORT_BY_NAME */ - TEST_TYPE_SIZE (PIMAGE_IMPORT_BY_NAME, 8) - TEST_TYPE_ALIGN (PIMAGE_IMPORT_BY_NAME, 8) - TEST_TARGET_SIZE (PIMAGE_IMPORT_BY_NAME, 4) - TEST_TARGET_ALIGN(PIMAGE_IMPORT_BY_NAME, 2) -} - -static void test_pack_PIMAGE_IMPORT_DESCRIPTOR(void) -{ - /* PIMAGE_IMPORT_DESCRIPTOR */ - TEST_TYPE_SIZE (PIMAGE_IMPORT_DESCRIPTOR, 8) - TEST_TYPE_ALIGN (PIMAGE_IMPORT_DESCRIPTOR, 8) -} - -static void test_pack_PIMAGE_LINENUMBER(void) -{ - /* PIMAGE_LINENUMBER */ - TEST_TYPE_SIZE (PIMAGE_LINENUMBER, 8) - TEST_TYPE_ALIGN (PIMAGE_LINENUMBER, 8) -} - -static void test_pack_PIMAGE_LOAD_CONFIG_DIRECTORY(void) -{ - /* PIMAGE_LOAD_CONFIG_DIRECTORY */ - TEST_TYPE_SIZE (PIMAGE_LOAD_CONFIG_DIRECTORY, 8) - TEST_TYPE_ALIGN (PIMAGE_LOAD_CONFIG_DIRECTORY, 8) -#if 0// wine headers are broken - TEST_TARGET_SIZE (PIMAGE_LOAD_CONFIG_DIRECTORY, 88) -#endif - TEST_TARGET_ALIGN(PIMAGE_LOAD_CONFIG_DIRECTORY, 8) -} - -static void test_pack_PIMAGE_NT_HEADERS(void) -{ - /* PIMAGE_NT_HEADERS */ - TEST_TYPE_SIZE (PIMAGE_NT_HEADERS, 8) - TEST_TYPE_ALIGN (PIMAGE_NT_HEADERS, 8) -} - -static void test_pack_PIMAGE_NT_HEADERS32(void) -{ - /* PIMAGE_NT_HEADERS32 */ - TEST_TYPE_SIZE (PIMAGE_NT_HEADERS32, 8) - TEST_TYPE_ALIGN (PIMAGE_NT_HEADERS32, 8) - TEST_TARGET_SIZE (PIMAGE_NT_HEADERS32, 248) - TEST_TARGET_ALIGN(PIMAGE_NT_HEADERS32, 4) -} - -static void test_pack_PIMAGE_NT_HEADERS64(void) -{ - /* PIMAGE_NT_HEADERS64 */ - TEST_TYPE_SIZE (PIMAGE_NT_HEADERS64, 8) - TEST_TYPE_ALIGN (PIMAGE_NT_HEADERS64, 8) - TEST_TARGET_SIZE (PIMAGE_NT_HEADERS64, 264) - TEST_TARGET_ALIGN(PIMAGE_NT_HEADERS64, 8) -} - -static void test_pack_PIMAGE_OPTIONAL_HEADER(void) -{ - /* PIMAGE_OPTIONAL_HEADER */ - TEST_TYPE_SIZE (PIMAGE_OPTIONAL_HEADER, 8) - TEST_TYPE_ALIGN (PIMAGE_OPTIONAL_HEADER, 8) -} - -static void test_pack_PIMAGE_OPTIONAL_HEADER32(void) -{ - /* PIMAGE_OPTIONAL_HEADER32 */ - TEST_TYPE_SIZE (PIMAGE_OPTIONAL_HEADER32, 8) - TEST_TYPE_ALIGN (PIMAGE_OPTIONAL_HEADER32, 8) - TEST_TARGET_SIZE (PIMAGE_OPTIONAL_HEADER32, 224) - TEST_TARGET_ALIGN(PIMAGE_OPTIONAL_HEADER32, 4) -} - -static void test_pack_PIMAGE_OPTIONAL_HEADER64(void) -{ - /* PIMAGE_OPTIONAL_HEADER64 */ - TEST_TYPE_SIZE (PIMAGE_OPTIONAL_HEADER64, 8) - TEST_TYPE_ALIGN (PIMAGE_OPTIONAL_HEADER64, 8) - TEST_TARGET_SIZE (PIMAGE_OPTIONAL_HEADER64, 240) - TEST_TARGET_ALIGN(PIMAGE_OPTIONAL_HEADER64, 8) -} - -static void test_pack_PIMAGE_OS2_HEADER(void) -{ - /* PIMAGE_OS2_HEADER */ - TEST_TYPE_SIZE (PIMAGE_OS2_HEADER, 8) - TEST_TYPE_ALIGN (PIMAGE_OS2_HEADER, 8) - TEST_TARGET_SIZE (PIMAGE_OS2_HEADER, 64) - TEST_TARGET_ALIGN(PIMAGE_OS2_HEADER, 2) -} - -static void test_pack_PIMAGE_RELOCATION(void) -{ - /* PIMAGE_RELOCATION */ - TEST_TYPE_SIZE (PIMAGE_RELOCATION, 8) - TEST_TYPE_ALIGN (PIMAGE_RELOCATION, 8) -} - -static void test_pack_PIMAGE_RESOURCE_DATA_ENTRY(void) -{ - /* PIMAGE_RESOURCE_DATA_ENTRY */ - TEST_TYPE_SIZE (PIMAGE_RESOURCE_DATA_ENTRY, 8) - TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DATA_ENTRY, 8) - TEST_TARGET_SIZE (PIMAGE_RESOURCE_DATA_ENTRY, 16) - TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DATA_ENTRY, 4) -} - -static void test_pack_PIMAGE_RESOURCE_DIRECTORY(void) -{ - /* PIMAGE_RESOURCE_DIRECTORY */ - TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIRECTORY, 8) - TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIRECTORY, 8) - TEST_TARGET_SIZE (PIMAGE_RESOURCE_DIRECTORY, 16) - TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DIRECTORY, 4) -} - -static void test_pack_PIMAGE_RESOURCE_DIRECTORY_ENTRY(void) -{ - /* PIMAGE_RESOURCE_DIRECTORY_ENTRY */ - TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIRECTORY_ENTRY, 8) - TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIRECTORY_ENTRY, 8) -} - -static void test_pack_PIMAGE_RESOURCE_DIRECTORY_STRING(void) -{ - /* PIMAGE_RESOURCE_DIRECTORY_STRING */ - TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIRECTORY_STRING, 8) - TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIRECTORY_STRING, 8) - TEST_TARGET_SIZE (PIMAGE_RESOURCE_DIRECTORY_STRING, 4) - TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DIRECTORY_STRING, 2) -} - -static void test_pack_PIMAGE_RESOURCE_DIR_STRING_U(void) -{ - /* PIMAGE_RESOURCE_DIR_STRING_U */ - TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIR_STRING_U, 8) - TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIR_STRING_U, 8) - TEST_TARGET_SIZE (PIMAGE_RESOURCE_DIR_STRING_U, 4) - TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DIR_STRING_U, 2) -} - -static void test_pack_PIMAGE_SECTION_HEADER(void) -{ - /* PIMAGE_SECTION_HEADER */ - TEST_TYPE_SIZE (PIMAGE_SECTION_HEADER, 8) - TEST_TYPE_ALIGN (PIMAGE_SECTION_HEADER, 8) -} - -static void test_pack_PIMAGE_SEPARATE_DEBUG_HEADER(void) -{ - /* PIMAGE_SEPARATE_DEBUG_HEADER */ - TEST_TYPE_SIZE (PIMAGE_SEPARATE_DEBUG_HEADER, 8) - TEST_TYPE_ALIGN (PIMAGE_SEPARATE_DEBUG_HEADER, 8) - TEST_TARGET_SIZE (PIMAGE_SEPARATE_DEBUG_HEADER, 48) - TEST_TARGET_ALIGN(PIMAGE_SEPARATE_DEBUG_HEADER, 4) -} - -static void test_pack_PIMAGE_SYMBOL(void) -{ - /* PIMAGE_SYMBOL */ - TEST_TYPE_SIZE (PIMAGE_SYMBOL, 8) - TEST_TYPE_ALIGN (PIMAGE_SYMBOL, 8) -} - -static void test_pack_PIMAGE_THUNK_DATA(void) -{ - /* PIMAGE_THUNK_DATA */ - TEST_TYPE_SIZE (PIMAGE_THUNK_DATA, 8) - TEST_TYPE_ALIGN (PIMAGE_THUNK_DATA, 8) -} - -static void test_pack_PIMAGE_TLS_CALLBACK(void) -{ - /* PIMAGE_TLS_CALLBACK */ - TEST_TYPE_SIZE (PIMAGE_TLS_CALLBACK, 8) - TEST_TYPE_ALIGN (PIMAGE_TLS_CALLBACK, 8) -} - -static void test_pack_PIMAGE_TLS_DIRECTORY(void) -{ - /* PIMAGE_TLS_DIRECTORY */ - TEST_TYPE_SIZE (PIMAGE_TLS_DIRECTORY, 8) - TEST_TYPE_ALIGN (PIMAGE_TLS_DIRECTORY, 8) -} - -static void test_pack_PIMAGE_VXD_HEADER(void) -{ - /* PIMAGE_VXD_HEADER */ - TEST_TYPE_SIZE (PIMAGE_VXD_HEADER, 8) - TEST_TYPE_ALIGN (PIMAGE_VXD_HEADER, 8) - TEST_TARGET_SIZE (PIMAGE_VXD_HEADER, 196) - TEST_TARGET_ALIGN(PIMAGE_VXD_HEADER, 2) -} - -static void test_pack_PIO_COUNTERS(void) -{ - /* PIO_COUNTERS */ - TEST_TYPE_SIZE (PIO_COUNTERS, 8) - TEST_TYPE_ALIGN (PIO_COUNTERS, 8) - TEST_TARGET_SIZE (PIO_COUNTERS, 48) - TEST_TARGET_ALIGN(PIO_COUNTERS, 8) -} - -static void test_pack_PISECURITY_DESCRIPTOR(void) -{ - /* PISECURITY_DESCRIPTOR */ - TEST_TYPE_SIZE (PISECURITY_DESCRIPTOR, 8) - TEST_TYPE_ALIGN (PISECURITY_DESCRIPTOR, 8) - TEST_TARGET_SIZE (PISECURITY_DESCRIPTOR, 40) - TEST_TARGET_ALIGN(PISECURITY_DESCRIPTOR, 8) -} - -static void test_pack_PISECURITY_DESCRIPTOR_RELATIVE(void) -{ - /* PISECURITY_DESCRIPTOR_RELATIVE */ - TEST_TYPE_SIZE (PISECURITY_DESCRIPTOR_RELATIVE, 8) - TEST_TYPE_ALIGN (PISECURITY_DESCRIPTOR_RELATIVE, 8) - TEST_TARGET_SIZE (PISECURITY_DESCRIPTOR_RELATIVE, 20) - TEST_TARGET_ALIGN(PISECURITY_DESCRIPTOR_RELATIVE, 4) -} - -static void test_pack_PISID(void) -{ - /* PISID */ - TEST_TYPE_SIZE (PISID, 8) - TEST_TYPE_ALIGN (PISID, 8) - TEST_TARGET_SIZE (PISID, 12) - TEST_TARGET_ALIGN(PISID, 4) -} - -static void test_pack_PLARGE_INTEGER(void) -{ - /* PLARGE_INTEGER */ - TEST_TYPE_SIZE (PLARGE_INTEGER, 8) - TEST_TYPE_ALIGN (PLARGE_INTEGER, 8) -} - -static void test_pack_PLIST_ENTRY(void) -{ - /* PLIST_ENTRY */ - TEST_TYPE_SIZE (PLIST_ENTRY, 8) - TEST_TYPE_ALIGN (PLIST_ENTRY, 8) - TEST_TARGET_SIZE (PLIST_ENTRY, 16) - TEST_TARGET_ALIGN(PLIST_ENTRY, 8) -} - -static void test_pack_PLUID(void) -{ - /* PLUID */ - TEST_TYPE_SIZE (PLUID, 8) - TEST_TYPE_ALIGN (PLUID, 8) - TEST_TARGET_SIZE (PLUID, 8) - TEST_TARGET_ALIGN(PLUID, 4) -} - -static void test_pack_PLUID_AND_ATTRIBUTES(void) -{ - /* PLUID_AND_ATTRIBUTES */ - TEST_TYPE_SIZE (PLUID_AND_ATTRIBUTES, 8) - TEST_TYPE_ALIGN (PLUID_AND_ATTRIBUTES, 8) - TEST_TARGET_SIZE (PLUID_AND_ATTRIBUTES, 12) - TEST_TARGET_ALIGN(PLUID_AND_ATTRIBUTES, 4) -} - -static void test_pack_PMEMORY_BASIC_INFORMATION(void) -{ - /* PMEMORY_BASIC_INFORMATION */ - TEST_TYPE_SIZE (PMEMORY_BASIC_INFORMATION, 8) - TEST_TYPE_ALIGN (PMEMORY_BASIC_INFORMATION, 8) - TEST_TARGET_SIZE (PMEMORY_BASIC_INFORMATION, 48) - TEST_TARGET_ALIGN(PMEMORY_BASIC_INFORMATION, 8) -} - -static void test_pack_PMESSAGE_RESOURCE_BLOCK(void) -{ - /* PMESSAGE_RESOURCE_BLOCK */ - TEST_TYPE_SIZE (PMESSAGE_RESOURCE_BLOCK, 8) - TEST_TYPE_ALIGN (PMESSAGE_RESOURCE_BLOCK, 8) - TEST_TARGET_SIZE (PMESSAGE_RESOURCE_BLOCK, 12) - TEST_TARGET_ALIGN(PMESSAGE_RESOURCE_BLOCK, 4) -} - -static void test_pack_PMESSAGE_RESOURCE_DATA(void) -{ - /* PMESSAGE_RESOURCE_DATA */ - TEST_TYPE_SIZE (PMESSAGE_RESOURCE_DATA, 8) - TEST_TYPE_ALIGN (PMESSAGE_RESOURCE_DATA, 8) - TEST_TARGET_SIZE (PMESSAGE_RESOURCE_DATA, 16) - TEST_TARGET_ALIGN(PMESSAGE_RESOURCE_DATA, 4) -} - -static void test_pack_PMESSAGE_RESOURCE_ENTRY(void) -{ - /* PMESSAGE_RESOURCE_ENTRY */ - TEST_TYPE_SIZE (PMESSAGE_RESOURCE_ENTRY, 8) - TEST_TYPE_ALIGN (PMESSAGE_RESOURCE_ENTRY, 8) - TEST_TARGET_SIZE (PMESSAGE_RESOURCE_ENTRY, 6) - TEST_TARGET_ALIGN(PMESSAGE_RESOURCE_ENTRY, 2) -} - -static void test_pack_PNT_TIB(void) -{ - /* PNT_TIB */ - TEST_TYPE_SIZE (PNT_TIB, 8) - TEST_TYPE_ALIGN (PNT_TIB, 8) -} - -static void test_pack_POBJECT_TYPE_LIST(void) -{ - /* POBJECT_TYPE_LIST */ - TEST_TYPE_SIZE (POBJECT_TYPE_LIST, 8) - TEST_TYPE_ALIGN (POBJECT_TYPE_LIST, 8) - TEST_TARGET_SIZE (POBJECT_TYPE_LIST, 16) - TEST_TARGET_ALIGN(POBJECT_TYPE_LIST, 8) -} - -static void test_pack_PPRIVILEGE_SET(void) -{ - /* PPRIVILEGE_SET */ - TEST_TYPE_SIZE (PPRIVILEGE_SET, 8) - TEST_TYPE_ALIGN (PPRIVILEGE_SET, 8) - TEST_TARGET_SIZE (PPRIVILEGE_SET, 20) - TEST_TARGET_ALIGN(PPRIVILEGE_SET, 4) -} - -static void test_pack_PRIVILEGE_SET(void) -{ - /* PRIVILEGE_SET */ - TEST_TYPE_SIZE (PRIVILEGE_SET, 20) - TEST_TYPE_ALIGN (PRIVILEGE_SET, 4) - TEST_FIELD_SIZE (PRIVILEGE_SET, PrivilegeCount, 4) - TEST_FIELD_ALIGN (PRIVILEGE_SET, PrivilegeCount, 4) - TEST_FIELD_OFFSET(PRIVILEGE_SET, PrivilegeCount, 0) - TEST_FIELD_SIZE (PRIVILEGE_SET, Control, 4) - TEST_FIELD_ALIGN (PRIVILEGE_SET, Control, 4) - TEST_FIELD_OFFSET(PRIVILEGE_SET, Control, 4) - TEST_FIELD_SIZE (PRIVILEGE_SET, Privilege, 12) - TEST_FIELD_ALIGN (PRIVILEGE_SET, Privilege, 4) - TEST_FIELD_OFFSET(PRIVILEGE_SET, Privilege, 8) -} - -static void test_pack_PRLIST_ENTRY(void) -{ - /* PRLIST_ENTRY */ - TEST_TYPE_SIZE (PRLIST_ENTRY, 8) - TEST_TYPE_ALIGN (PRLIST_ENTRY, 8) - TEST_TARGET_SIZE (PRLIST_ENTRY, 16) - TEST_TARGET_ALIGN(PRLIST_ENTRY, 8) -} - -static void test_pack_PRTL_CRITICAL_SECTION(void) -{ - /* PRTL_CRITICAL_SECTION */ - TEST_TYPE_SIZE (PRTL_CRITICAL_SECTION, 8) - TEST_TYPE_ALIGN (PRTL_CRITICAL_SECTION, 8) - TEST_TARGET_SIZE (PRTL_CRITICAL_SECTION, 40) - TEST_TARGET_ALIGN(PRTL_CRITICAL_SECTION, 8) -} - -static void test_pack_PRTL_CRITICAL_SECTION_DEBUG(void) -{ - /* PRTL_CRITICAL_SECTION_DEBUG */ - TEST_TYPE_SIZE (PRTL_CRITICAL_SECTION_DEBUG, 8) - TEST_TYPE_ALIGN (PRTL_CRITICAL_SECTION_DEBUG, 8) -} - -static void test_pack_PRTL_OSVERSIONINFOEXW(void) -{ - /* PRTL_OSVERSIONINFOEXW */ - TEST_TYPE_SIZE (PRTL_OSVERSIONINFOEXW, 8) - TEST_TYPE_ALIGN (PRTL_OSVERSIONINFOEXW, 8) - TEST_TARGET_SIZE (PRTL_OSVERSIONINFOEXW, 284) - TEST_TARGET_ALIGN(PRTL_OSVERSIONINFOEXW, 4) -} - -static void test_pack_PRTL_OSVERSIONINFOW(void) -{ - /* PRTL_OSVERSIONINFOW */ - TEST_TYPE_SIZE (PRTL_OSVERSIONINFOW, 8) - TEST_TYPE_ALIGN (PRTL_OSVERSIONINFOW, 8) - TEST_TARGET_SIZE (PRTL_OSVERSIONINFOW, 276) - TEST_TARGET_ALIGN(PRTL_OSVERSIONINFOW, 4) -} - -static void test_pack_PRTL_RESOURCE_DEBUG(void) -{ - /* PRTL_RESOURCE_DEBUG */ - TEST_TYPE_SIZE (PRTL_RESOURCE_DEBUG, 8) - TEST_TYPE_ALIGN (PRTL_RESOURCE_DEBUG, 8) -} - -static void test_pack_PSECURITY_DESCRIPTOR(void) -{ - /* PSECURITY_DESCRIPTOR */ - TEST_TYPE_SIZE (PSECURITY_DESCRIPTOR, 8) - TEST_TYPE_ALIGN (PSECURITY_DESCRIPTOR, 8) -} - -static void test_pack_PSECURITY_QUALITY_OF_SERVICE(void) -{ - /* PSECURITY_QUALITY_OF_SERVICE */ - TEST_TYPE_SIZE (PSECURITY_QUALITY_OF_SERVICE, 8) - TEST_TYPE_ALIGN (PSECURITY_QUALITY_OF_SERVICE, 8) -} - -static void test_pack_PSID(void) -{ - /* PSID */ - TEST_TYPE_SIZE (PSID, 8) - TEST_TYPE_ALIGN (PSID, 8) -} - -static void test_pack_PSID_IDENTIFIER_AUTHORITY(void) -{ - /* PSID_IDENTIFIER_AUTHORITY */ - TEST_TYPE_SIZE (PSID_IDENTIFIER_AUTHORITY, 8) - TEST_TYPE_ALIGN (PSID_IDENTIFIER_AUTHORITY, 8) - TEST_TARGET_SIZE (PSID_IDENTIFIER_AUTHORITY, 6) - TEST_TARGET_ALIGN(PSID_IDENTIFIER_AUTHORITY, 1) -} - -static void test_pack_PSINGLE_LIST_ENTRY(void) -{ - /* PSINGLE_LIST_ENTRY */ - TEST_TYPE_SIZE (PSINGLE_LIST_ENTRY, 8) - TEST_TYPE_ALIGN (PSINGLE_LIST_ENTRY, 8) - TEST_TARGET_SIZE (PSINGLE_LIST_ENTRY, 8) - TEST_TARGET_ALIGN(PSINGLE_LIST_ENTRY, 8) -} - -static void test_pack_PSTR(void) -{ - /* PSTR */ - TEST_TYPE_SIZE (PSTR, 8) - TEST_TYPE_ALIGN (PSTR, 8) - TEST_TARGET_SIZE (PSTR, 1) - TEST_TARGET_ALIGN(PSTR, 1) -} - -static void test_pack_PSYSTEM_ALARM_ACE(void) -{ - /* PSYSTEM_ALARM_ACE */ - TEST_TYPE_SIZE (PSYSTEM_ALARM_ACE, 8) - TEST_TYPE_ALIGN (PSYSTEM_ALARM_ACE, 8) - TEST_TARGET_SIZE (PSYSTEM_ALARM_ACE, 12) - TEST_TARGET_ALIGN(PSYSTEM_ALARM_ACE, 4) -} - -static void test_pack_PSYSTEM_AUDIT_ACE(void) -{ - /* PSYSTEM_AUDIT_ACE */ - TEST_TYPE_SIZE (PSYSTEM_AUDIT_ACE, 8) - TEST_TYPE_ALIGN (PSYSTEM_AUDIT_ACE, 8) - TEST_TARGET_SIZE (PSYSTEM_AUDIT_ACE, 12) - TEST_TARGET_ALIGN(PSYSTEM_AUDIT_ACE, 4) -} - -static void test_pack_PTOKEN_GROUPS(void) -{ - /* PTOKEN_GROUPS */ - TEST_TYPE_SIZE (PTOKEN_GROUPS, 8) - TEST_TYPE_ALIGN (PTOKEN_GROUPS, 8) - TEST_TARGET_SIZE (PTOKEN_GROUPS, 24) - TEST_TARGET_ALIGN(PTOKEN_GROUPS, 8) -} - -static void test_pack_PTOKEN_PRIVILEGES(void) -{ - /* PTOKEN_PRIVILEGES */ - TEST_TYPE_SIZE (PTOKEN_PRIVILEGES, 8) - TEST_TYPE_ALIGN (PTOKEN_PRIVILEGES, 8) - TEST_TARGET_SIZE (PTOKEN_PRIVILEGES, 16) - TEST_TARGET_ALIGN(PTOKEN_PRIVILEGES, 4) -} - -static void test_pack_PTOKEN_USER(void) -{ - /* PTOKEN_USER */ - TEST_TYPE_SIZE (PTOKEN_USER, 8) - TEST_TYPE_ALIGN (PTOKEN_USER, 8) - TEST_TARGET_SIZE (PTOKEN_USER, 16) - TEST_TARGET_ALIGN(PTOKEN_USER, 8) -} - -static void test_pack_PTSTR(void) -{ - /* PTSTR */ - TEST_TYPE_SIZE (PTSTR, 8) - TEST_TYPE_ALIGN (PTSTR, 8) -} - -static void test_pack_PULARGE_INTEGER(void) -{ - /* PULARGE_INTEGER */ - TEST_TYPE_SIZE (PULARGE_INTEGER, 8) - TEST_TYPE_ALIGN (PULARGE_INTEGER, 8) -} - -static void test_pack_PVECTORED_EXCEPTION_HANDLER(void) -{ - /* PVECTORED_EXCEPTION_HANDLER */ - TEST_TYPE_SIZE (PVECTORED_EXCEPTION_HANDLER, 8) - TEST_TYPE_ALIGN (PVECTORED_EXCEPTION_HANDLER, 8) -} - -static void test_pack_PVOID(void) -{ - /* PVOID */ - TEST_TYPE_SIZE (PVOID, 8) - TEST_TYPE_ALIGN (PVOID, 8) -} - -static void test_pack_PWCH(void) -{ - /* PWCH */ - TEST_TYPE_SIZE (PWCH, 8) - TEST_TYPE_ALIGN (PWCH, 8) - TEST_TARGET_SIZE (PWCH, 2) - TEST_TARGET_ALIGN(PWCH, 2) -} - -static void test_pack_PWSTR(void) -{ - /* PWSTR */ - TEST_TYPE_SIZE (PWSTR, 8) - TEST_TYPE_ALIGN (PWSTR, 8) - TEST_TARGET_SIZE (PWSTR, 2) - TEST_TARGET_ALIGN(PWSTR, 2) -} - -static void test_pack_RTL_CRITICAL_SECTION(void) -{ - /* RTL_CRITICAL_SECTION */ - TEST_TYPE_SIZE (RTL_CRITICAL_SECTION, 40) - TEST_TYPE_ALIGN (RTL_CRITICAL_SECTION, 8) - TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, DebugInfo, 8) - TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, DebugInfo, 8) - TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, DebugInfo, 0) - TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, LockCount, 4) - TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, LockCount, 4) - TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, LockCount, 8) - TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, RecursionCount, 4) - TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, RecursionCount, 4) - TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, RecursionCount, 12) - TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, OwningThread, 8) - TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, OwningThread, 8) - TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, OwningThread, 16) - TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, LockSemaphore, 8) - TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, LockSemaphore, 8) - TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, LockSemaphore, 24) - TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, SpinCount, 8) - TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, SpinCount, 8) - TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, SpinCount, 32) -} - -static void test_pack_RTL_CRITICAL_SECTION_DEBUG(void) -{ - /* RTL_CRITICAL_SECTION_DEBUG */ - TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, Type, 2) - TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, Type, 2) - TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, Type, 0) - TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, CreatorBackTraceIndex, 2) - TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, CreatorBackTraceIndex, 2) - TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, CreatorBackTraceIndex, 2) - TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, CriticalSection, 8) - TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, CriticalSection, 8) - TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, CriticalSection, 8) - TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, ProcessLocksList, 16) - TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, ProcessLocksList, 8) - TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, ProcessLocksList, 16) - TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, EntryCount, 4) - TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, EntryCount, 4) - TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, EntryCount, 32) - TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, ContentionCount, 4) - TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, ContentionCount, 4) - TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, ContentionCount, 36) -} - -static void test_pack_RTL_OSVERSIONINFOEXW(void) -{ - /* RTL_OSVERSIONINFOEXW */ - TEST_TYPE_SIZE (RTL_OSVERSIONINFOEXW, 284) - TEST_TYPE_ALIGN (RTL_OSVERSIONINFOEXW, 4) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwOSVersionInfoSize, 4) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwOSVersionInfoSize, 4) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwOSVersionInfoSize, 0) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwMajorVersion, 4) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwMajorVersion, 4) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwMajorVersion, 4) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwMinorVersion, 4) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwMinorVersion, 4) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwMinorVersion, 8) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwBuildNumber, 4) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwBuildNumber, 4) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwBuildNumber, 12) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwPlatformId, 4) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwPlatformId, 4) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwPlatformId, 16) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, szCSDVersion, 256) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, szCSDVersion, 2) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, szCSDVersion, 20) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wServicePackMajor, 2) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wServicePackMajor, 2) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wServicePackMajor, 276) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wServicePackMinor, 2) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wServicePackMinor, 2) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wServicePackMinor, 278) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wSuiteMask, 2) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wSuiteMask, 2) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wSuiteMask, 280) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wProductType, 1) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wProductType, 1) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wProductType, 282) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wReserved, 1) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wReserved, 1) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wReserved, 283) -} - -static void test_pack_RTL_OSVERSIONINFOW(void) -{ - /* RTL_OSVERSIONINFOW */ - TEST_TYPE_SIZE (RTL_OSVERSIONINFOW, 276) - TEST_TYPE_ALIGN (RTL_OSVERSIONINFOW, 4) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwOSVersionInfoSize, 4) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwOSVersionInfoSize, 4) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwOSVersionInfoSize, 0) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwMajorVersion, 4) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwMajorVersion, 4) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwMajorVersion, 4) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwMinorVersion, 4) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwMinorVersion, 4) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwMinorVersion, 8) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwBuildNumber, 4) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwBuildNumber, 4) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwBuildNumber, 12) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwPlatformId, 4) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwPlatformId, 4) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwPlatformId, 16) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, szCSDVersion, 256) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, szCSDVersion, 2) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, szCSDVersion, 20) -} - -static void test_pack_RTL_RESOURCE_DEBUG(void) -{ - /* RTL_RESOURCE_DEBUG */ - TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, Type, 2) - TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, Type, 2) - TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, Type, 0) - TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, CreatorBackTraceIndex, 2) - TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, CreatorBackTraceIndex, 2) - TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, CreatorBackTraceIndex, 2) - TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, CriticalSection, 8) - TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, CriticalSection, 8) - TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, CriticalSection, 8) - TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, ProcessLocksList, 16) - TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, ProcessLocksList, 8) - TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, ProcessLocksList, 16) - TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, EntryCount, 4) - TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, EntryCount, 4) - TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, EntryCount, 32) - TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, ContentionCount, 4) - TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, ContentionCount, 4) - TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, ContentionCount, 36) -} - -static void test_pack_SECURITY_CONTEXT_TRACKING_MODE(void) -{ - /* SECURITY_CONTEXT_TRACKING_MODE */ - TEST_TYPE_SIZE (SECURITY_CONTEXT_TRACKING_MODE, 1) - TEST_TYPE_ALIGN (SECURITY_CONTEXT_TRACKING_MODE, 1) -} - -static void test_pack_SECURITY_DESCRIPTOR(void) -{ - /* SECURITY_DESCRIPTOR */ - TEST_TYPE_SIZE (SECURITY_DESCRIPTOR, 40) - TEST_TYPE_ALIGN (SECURITY_DESCRIPTOR, 8) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Revision, 1) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Revision, 1) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Revision, 0) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Sbz1, 1) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Sbz1, 1) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Sbz1, 1) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Control, 2) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Control, 2) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Control, 2) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Owner, 8) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Owner, 8) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Owner, 8) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Group, 8) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Group, 8) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Group, 16) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Sacl, 8) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Sacl, 8) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Sacl, 24) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Dacl, 8) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Dacl, 8) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Dacl, 32) -} - -static void test_pack_SECURITY_DESCRIPTOR_CONTROL(void) -{ - /* SECURITY_DESCRIPTOR_CONTROL */ - TEST_TYPE_SIZE (SECURITY_DESCRIPTOR_CONTROL, 2) - TEST_TYPE_ALIGN (SECURITY_DESCRIPTOR_CONTROL, 2) - TEST_TYPE_UNSIGNED(SECURITY_DESCRIPTOR_CONTROL) -} - -static void test_pack_SECURITY_DESCRIPTOR_RELATIVE(void) -{ - /* SECURITY_DESCRIPTOR_RELATIVE */ - TEST_TYPE_SIZE (SECURITY_DESCRIPTOR_RELATIVE, 20) - TEST_TYPE_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, 4) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Revision, 1) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Revision, 1) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Revision, 0) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Sbz1, 1) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Sbz1, 1) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Sbz1, 1) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Control, 2) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Control, 2) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Control, 2) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Owner, 4) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Owner, 4) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Owner, 4) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Group, 4) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Group, 4) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Group, 8) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Sacl, 4) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Sacl, 4) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Sacl, 12) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Dacl, 4) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Dacl, 4) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Dacl, 16) -} - -static void test_pack_SECURITY_INFORMATION(void) -{ - /* SECURITY_INFORMATION */ - TEST_TYPE_SIZE (SECURITY_INFORMATION, 4) - TEST_TYPE_ALIGN (SECURITY_INFORMATION, 4) - TEST_TYPE_UNSIGNED(SECURITY_INFORMATION) -} - -static void test_pack_SECURITY_QUALITY_OF_SERVICE(void) -{ - /* SECURITY_QUALITY_OF_SERVICE */ - TEST_FIELD_SIZE (SECURITY_QUALITY_OF_SERVICE, Length, 4) - TEST_FIELD_ALIGN (SECURITY_QUALITY_OF_SERVICE, Length, 4) - TEST_FIELD_OFFSET(SECURITY_QUALITY_OF_SERVICE, Length, 0) -} - -static void test_pack_SHORT(void) -{ - /* SHORT */ - TEST_TYPE_SIZE (SHORT, 2) - TEST_TYPE_ALIGN (SHORT, 2) - TEST_TYPE_SIGNED(SHORT) -} - -static void test_pack_SID(void) -{ - /* SID */ - TEST_TYPE_SIZE (SID, 12) - TEST_TYPE_ALIGN (SID, 4) - TEST_FIELD_SIZE (SID, Revision, 1) - TEST_FIELD_ALIGN (SID, Revision, 1) - TEST_FIELD_OFFSET(SID, Revision, 0) - TEST_FIELD_SIZE (SID, SubAuthorityCount, 1) - TEST_FIELD_ALIGN (SID, SubAuthorityCount, 1) - TEST_FIELD_OFFSET(SID, SubAuthorityCount, 1) - TEST_FIELD_SIZE (SID, IdentifierAuthority, 6) - TEST_FIELD_ALIGN (SID, IdentifierAuthority, 1) - TEST_FIELD_OFFSET(SID, IdentifierAuthority, 2) - TEST_FIELD_SIZE (SID, SubAuthority, 4) - TEST_FIELD_ALIGN (SID, SubAuthority, 4) - TEST_FIELD_OFFSET(SID, SubAuthority, 8) -} - -static void test_pack_SID_AND_ATTRIBUTES(void) -{ - /* SID_AND_ATTRIBUTES */ - TEST_TYPE_SIZE (SID_AND_ATTRIBUTES, 16) - TEST_TYPE_ALIGN (SID_AND_ATTRIBUTES, 8) - TEST_FIELD_SIZE (SID_AND_ATTRIBUTES, Sid, 8) - TEST_FIELD_ALIGN (SID_AND_ATTRIBUTES, Sid, 8) - TEST_FIELD_OFFSET(SID_AND_ATTRIBUTES, Sid, 0) - TEST_FIELD_SIZE (SID_AND_ATTRIBUTES, Attributes, 4) - TEST_FIELD_ALIGN (SID_AND_ATTRIBUTES, Attributes, 4) - TEST_FIELD_OFFSET(SID_AND_ATTRIBUTES, Attributes, 8) -} - -static void test_pack_SID_IDENTIFIER_AUTHORITY(void) -{ - /* SID_IDENTIFIER_AUTHORITY */ - TEST_TYPE_SIZE (SID_IDENTIFIER_AUTHORITY, 6) - TEST_TYPE_ALIGN (SID_IDENTIFIER_AUTHORITY, 1) - TEST_FIELD_SIZE (SID_IDENTIFIER_AUTHORITY, Value, 6) - TEST_FIELD_ALIGN (SID_IDENTIFIER_AUTHORITY, Value, 1) - TEST_FIELD_OFFSET(SID_IDENTIFIER_AUTHORITY, Value, 0) -} - -static void test_pack_SINGLE_LIST_ENTRY(void) -{ - /* SINGLE_LIST_ENTRY */ - TEST_TYPE_SIZE (SINGLE_LIST_ENTRY, 8) - TEST_TYPE_ALIGN (SINGLE_LIST_ENTRY, 8) - TEST_FIELD_SIZE (SINGLE_LIST_ENTRY, Next, 8) - TEST_FIELD_ALIGN (SINGLE_LIST_ENTRY, Next, 8) - TEST_FIELD_OFFSET(SINGLE_LIST_ENTRY, Next, 0) -} - -static void test_pack_SYSTEM_ALARM_ACE(void) -{ - /* SYSTEM_ALARM_ACE */ - TEST_TYPE_SIZE (SYSTEM_ALARM_ACE, 12) - TEST_TYPE_ALIGN (SYSTEM_ALARM_ACE, 4) - TEST_FIELD_SIZE (SYSTEM_ALARM_ACE, Header, 4) - TEST_FIELD_ALIGN (SYSTEM_ALARM_ACE, Header, 2) - TEST_FIELD_OFFSET(SYSTEM_ALARM_ACE, Header, 0) - TEST_FIELD_SIZE (SYSTEM_ALARM_ACE, Mask, 4) - TEST_FIELD_ALIGN (SYSTEM_ALARM_ACE, Mask, 4) - TEST_FIELD_OFFSET(SYSTEM_ALARM_ACE, Mask, 4) - TEST_FIELD_SIZE (SYSTEM_ALARM_ACE, SidStart, 4) - TEST_FIELD_ALIGN (SYSTEM_ALARM_ACE, SidStart, 4) - TEST_FIELD_OFFSET(SYSTEM_ALARM_ACE, SidStart, 8) -} - -static void test_pack_SYSTEM_AUDIT_ACE(void) -{ - /* SYSTEM_AUDIT_ACE */ - TEST_TYPE_SIZE (SYSTEM_AUDIT_ACE, 12) - TEST_TYPE_ALIGN (SYSTEM_AUDIT_ACE, 4) - TEST_FIELD_SIZE (SYSTEM_AUDIT_ACE, Header, 4) - TEST_FIELD_ALIGN (SYSTEM_AUDIT_ACE, Header, 2) - TEST_FIELD_OFFSET(SYSTEM_AUDIT_ACE, Header, 0) - TEST_FIELD_SIZE (SYSTEM_AUDIT_ACE, Mask, 4) - TEST_FIELD_ALIGN (SYSTEM_AUDIT_ACE, Mask, 4) - TEST_FIELD_OFFSET(SYSTEM_AUDIT_ACE, Mask, 4) - TEST_FIELD_SIZE (SYSTEM_AUDIT_ACE, SidStart, 4) - TEST_FIELD_ALIGN (SYSTEM_AUDIT_ACE, SidStart, 4) - TEST_FIELD_OFFSET(SYSTEM_AUDIT_ACE, SidStart, 8) -} - -static void test_pack_TCHAR(void) -{ - /* TCHAR */ - TEST_TYPE_SIZE (TCHAR, 1) - TEST_TYPE_ALIGN (TCHAR, 1) -} - -static void test_pack_TOKEN_DEFAULT_DACL(void) -{ - /* TOKEN_DEFAULT_DACL */ - TEST_TYPE_SIZE (TOKEN_DEFAULT_DACL, 8) - TEST_TYPE_ALIGN (TOKEN_DEFAULT_DACL, 8) - TEST_FIELD_SIZE (TOKEN_DEFAULT_DACL, DefaultDacl, 8) - TEST_FIELD_ALIGN (TOKEN_DEFAULT_DACL, DefaultDacl, 8) - TEST_FIELD_OFFSET(TOKEN_DEFAULT_DACL, DefaultDacl, 0) -} - -static void test_pack_TOKEN_GROUPS(void) -{ - /* TOKEN_GROUPS */ - TEST_TYPE_SIZE (TOKEN_GROUPS, 24) - TEST_TYPE_ALIGN (TOKEN_GROUPS, 8) - TEST_FIELD_SIZE (TOKEN_GROUPS, GroupCount, 4) - TEST_FIELD_ALIGN (TOKEN_GROUPS, GroupCount, 4) - TEST_FIELD_OFFSET(TOKEN_GROUPS, GroupCount, 0) - TEST_FIELD_SIZE (TOKEN_GROUPS, Groups, 16) - TEST_FIELD_ALIGN (TOKEN_GROUPS, Groups, 8) - TEST_FIELD_OFFSET(TOKEN_GROUPS, Groups, 8) -} - -static void test_pack_TOKEN_OWNER(void) -{ - /* TOKEN_OWNER */ - TEST_TYPE_SIZE (TOKEN_OWNER, 8) - TEST_TYPE_ALIGN (TOKEN_OWNER, 8) - TEST_FIELD_SIZE (TOKEN_OWNER, Owner, 8) - TEST_FIELD_ALIGN (TOKEN_OWNER, Owner, 8) - TEST_FIELD_OFFSET(TOKEN_OWNER, Owner, 0) -} - -static void test_pack_TOKEN_PRIMARY_GROUP(void) -{ - /* TOKEN_PRIMARY_GROUP */ - TEST_TYPE_SIZE (TOKEN_PRIMARY_GROUP, 8) - TEST_TYPE_ALIGN (TOKEN_PRIMARY_GROUP, 8) - TEST_FIELD_SIZE (TOKEN_PRIMARY_GROUP, PrimaryGroup, 8) - TEST_FIELD_ALIGN (TOKEN_PRIMARY_GROUP, PrimaryGroup, 8) - TEST_FIELD_OFFSET(TOKEN_PRIMARY_GROUP, PrimaryGroup, 0) -} - -static void test_pack_TOKEN_PRIVILEGES(void) -{ - /* TOKEN_PRIVILEGES */ - TEST_TYPE_SIZE (TOKEN_PRIVILEGES, 16) - TEST_TYPE_ALIGN (TOKEN_PRIVILEGES, 4) - TEST_FIELD_SIZE (TOKEN_PRIVILEGES, PrivilegeCount, 4) - TEST_FIELD_ALIGN (TOKEN_PRIVILEGES, PrivilegeCount, 4) - TEST_FIELD_OFFSET(TOKEN_PRIVILEGES, PrivilegeCount, 0) - TEST_FIELD_SIZE (TOKEN_PRIVILEGES, Privileges, 12) - TEST_FIELD_ALIGN (TOKEN_PRIVILEGES, Privileges, 4) - TEST_FIELD_OFFSET(TOKEN_PRIVILEGES, Privileges, 4) -} - -static void test_pack_TOKEN_SOURCE(void) -{ - /* TOKEN_SOURCE */ - TEST_TYPE_SIZE (TOKEN_SOURCE, 16) - TEST_TYPE_ALIGN (TOKEN_SOURCE, 4) - TEST_FIELD_SIZE (TOKEN_SOURCE, SourceName, 8) - TEST_FIELD_ALIGN (TOKEN_SOURCE, SourceName, 1) - TEST_FIELD_OFFSET(TOKEN_SOURCE, SourceName, 0) - TEST_FIELD_SIZE (TOKEN_SOURCE, SourceIdentifier, 8) - TEST_FIELD_ALIGN (TOKEN_SOURCE, SourceIdentifier, 4) - TEST_FIELD_OFFSET(TOKEN_SOURCE, SourceIdentifier, 8) -} - -static void test_pack_TOKEN_STATISTICS(void) -{ - /* TOKEN_STATISTICS (pack 4) */ - TEST_FIELD_SIZE (TOKEN_STATISTICS, TokenId, 8) - TEST_FIELD_ALIGN (TOKEN_STATISTICS, TokenId, 4) - TEST_FIELD_OFFSET(TOKEN_STATISTICS, TokenId, 0) - TEST_FIELD_SIZE (TOKEN_STATISTICS, AuthenticationId, 8) - TEST_FIELD_ALIGN (TOKEN_STATISTICS, AuthenticationId, 4) - TEST_FIELD_OFFSET(TOKEN_STATISTICS, AuthenticationId, 8) - TEST_FIELD_SIZE (TOKEN_STATISTICS, ExpirationTime, 8) - TEST_FIELD_ALIGN (TOKEN_STATISTICS, ExpirationTime, 4) - TEST_FIELD_OFFSET(TOKEN_STATISTICS, ExpirationTime, 16) -} - -static void test_pack_TOKEN_USER(void) -{ - /* TOKEN_USER */ - TEST_TYPE_SIZE (TOKEN_USER, 16) - TEST_TYPE_ALIGN (TOKEN_USER, 8) - TEST_FIELD_SIZE (TOKEN_USER, User, 16) - TEST_FIELD_ALIGN (TOKEN_USER, User, 8) - TEST_FIELD_OFFSET(TOKEN_USER, User, 0) -} - -static void test_pack_ULARGE_INTEGER(void) -{ - /* ULARGE_INTEGER */ -} - -static void test_pack_ULONGLONG(void) -{ - /* ULONGLONG */ - TEST_TYPE_SIZE (ULONGLONG, 8) - TEST_TYPE_ALIGN (ULONGLONG, 8) - TEST_TYPE_UNSIGNED(ULONGLONG) -} - -static void test_pack_WAITORTIMERCALLBACKFUNC(void) -{ - /* WAITORTIMERCALLBACKFUNC */ - TEST_TYPE_SIZE (WAITORTIMERCALLBACKFUNC, 8) - TEST_TYPE_ALIGN (WAITORTIMERCALLBACKFUNC, 8) -} - -static void test_pack_WCHAR(void) -{ - /* WCHAR */ - TEST_TYPE_SIZE (WCHAR, 2) - TEST_TYPE_ALIGN (WCHAR, 2) - TEST_TYPE_UNSIGNED(WCHAR) -} - -static void test_pack_ATOM(void) -{ - /* ATOM */ - TEST_TYPE_SIZE (ATOM, 2) - TEST_TYPE_ALIGN (ATOM, 2) - TEST_TYPE_UNSIGNED(ATOM) -} - -static void test_pack_BOOL(void) -{ - /* BOOL */ - TEST_TYPE_SIZE (BOOL, 4) - TEST_TYPE_ALIGN (BOOL, 4) - TEST_TYPE_SIGNED(BOOL) -} - -static void test_pack_BYTE(void) -{ - /* BYTE */ - TEST_TYPE_SIZE (BYTE, 1) - TEST_TYPE_ALIGN (BYTE, 1) - TEST_TYPE_UNSIGNED(BYTE) -} - -static void test_pack_COLORREF(void) -{ - /* COLORREF */ - TEST_TYPE_SIZE (COLORREF, 4) - TEST_TYPE_ALIGN (COLORREF, 4) - TEST_TYPE_UNSIGNED(COLORREF) -} - -static void test_pack_DWORD(void) -{ - /* DWORD */ - TEST_TYPE_SIZE (DWORD, 4) - TEST_TYPE_ALIGN (DWORD, 4) - TEST_TYPE_UNSIGNED(DWORD) -} - -static void test_pack_FARPROC(void) -{ - /* FARPROC */ - TEST_TYPE_SIZE (FARPROC, 8) - TEST_TYPE_ALIGN (FARPROC, 8) -} - -static void test_pack_FLOAT(void) -{ - /* FLOAT */ - TEST_TYPE_SIZE (FLOAT, 4) - TEST_TYPE_ALIGN (FLOAT, 4) -} - -static void test_pack_GLOBALHANDLE(void) -{ - /* GLOBALHANDLE */ - TEST_TYPE_SIZE (GLOBALHANDLE, 8) - TEST_TYPE_ALIGN (GLOBALHANDLE, 8) -} - -static void test_pack_HCURSOR(void) -{ - /* HCURSOR */ - TEST_TYPE_SIZE (HCURSOR, 8) - TEST_TYPE_ALIGN (HCURSOR, 8) -} - -static void test_pack_HFILE(void) -{ - /* HFILE */ - TEST_TYPE_SIZE (HFILE, 4) - TEST_TYPE_ALIGN (HFILE, 4) - TEST_TYPE_SIGNED(HFILE) -} - -static void test_pack_HGDIOBJ(void) -{ - /* HGDIOBJ */ - TEST_TYPE_SIZE (HGDIOBJ, 8) - TEST_TYPE_ALIGN (HGDIOBJ, 8) -} - -static void test_pack_HGLOBAL(void) -{ - /* HGLOBAL */ - TEST_TYPE_SIZE (HGLOBAL, 8) - TEST_TYPE_ALIGN (HGLOBAL, 8) -} - -static void test_pack_HLOCAL(void) -{ - /* HLOCAL */ - TEST_TYPE_SIZE (HLOCAL, 8) - TEST_TYPE_ALIGN (HLOCAL, 8) -} - -static void test_pack_HMODULE(void) -{ - /* HMODULE */ - TEST_TYPE_SIZE (HMODULE, 8) - TEST_TYPE_ALIGN (HMODULE, 8) -} - -static void test_pack_INT(void) -{ - /* INT */ - TEST_TYPE_SIZE (INT, 4) - TEST_TYPE_ALIGN (INT, 4) - TEST_TYPE_SIGNED(INT) -} - -static void test_pack_LOCALHANDLE(void) -{ - /* LOCALHANDLE */ - TEST_TYPE_SIZE (LOCALHANDLE, 8) - TEST_TYPE_ALIGN (LOCALHANDLE, 8) -} - -static void test_pack_LPARAM(void) -{ - /* LPARAM */ - TEST_TYPE_SIZE (LPARAM, 8) - TEST_TYPE_ALIGN (LPARAM, 8) -} - -static void test_pack_LPCRECT(void) -{ - /* LPCRECT */ - TEST_TYPE_SIZE (LPCRECT, 8) - TEST_TYPE_ALIGN (LPCRECT, 8) - TEST_TARGET_SIZE (LPCRECT, 16) - TEST_TARGET_ALIGN(LPCRECT, 4) -} - -static void test_pack_LPCRECTL(void) -{ - /* LPCRECTL */ - TEST_TYPE_SIZE (LPCRECTL, 8) - TEST_TYPE_ALIGN (LPCRECTL, 8) - TEST_TARGET_SIZE (LPCRECTL, 16) - TEST_TARGET_ALIGN(LPCRECTL, 4) -} - -static void test_pack_LPCVOID(void) -{ - /* LPCVOID */ - TEST_TYPE_SIZE (LPCVOID, 8) - TEST_TYPE_ALIGN (LPCVOID, 8) -} - -static void test_pack_LPPOINT(void) -{ - /* LPPOINT */ - TEST_TYPE_SIZE (LPPOINT, 8) - TEST_TYPE_ALIGN (LPPOINT, 8) - TEST_TARGET_SIZE (LPPOINT, 8) - TEST_TARGET_ALIGN(LPPOINT, 4) -} - -static void test_pack_LPRECT(void) -{ - /* LPRECT */ - TEST_TYPE_SIZE (LPRECT, 8) - TEST_TYPE_ALIGN (LPRECT, 8) - TEST_TARGET_SIZE (LPRECT, 16) - TEST_TARGET_ALIGN(LPRECT, 4) -} - -static void test_pack_LPRECTL(void) -{ - /* LPRECTL */ - TEST_TYPE_SIZE (LPRECTL, 8) - TEST_TYPE_ALIGN (LPRECTL, 8) - TEST_TARGET_SIZE (LPRECTL, 16) - TEST_TARGET_ALIGN(LPRECTL, 4) -} - -static void test_pack_LPSIZE(void) -{ - /* LPSIZE */ - TEST_TYPE_SIZE (LPSIZE, 8) - TEST_TYPE_ALIGN (LPSIZE, 8) - TEST_TARGET_SIZE (LPSIZE, 8) - TEST_TARGET_ALIGN(LPSIZE, 4) -} - -static void test_pack_LRESULT(void) -{ - /* LRESULT */ - TEST_TYPE_SIZE (LRESULT, 8) - TEST_TYPE_ALIGN (LRESULT, 8) -} - -static void test_pack_POINT(void) -{ - /* POINT */ - TEST_TYPE_SIZE (POINT, 8) - TEST_TYPE_ALIGN (POINT, 4) - TEST_FIELD_SIZE (POINT, x, 4) - TEST_FIELD_ALIGN (POINT, x, 4) - TEST_FIELD_OFFSET(POINT, x, 0) - TEST_FIELD_SIZE (POINT, y, 4) - TEST_FIELD_ALIGN (POINT, y, 4) - TEST_FIELD_OFFSET(POINT, y, 4) -} - -static void test_pack_POINTL(void) -{ - /* POINTL */ - TEST_TYPE_SIZE (POINTL, 8) - TEST_TYPE_ALIGN (POINTL, 4) - TEST_FIELD_SIZE (POINTL, x, 4) - TEST_FIELD_ALIGN (POINTL, x, 4) - TEST_FIELD_OFFSET(POINTL, x, 0) - TEST_FIELD_SIZE (POINTL, y, 4) - TEST_FIELD_ALIGN (POINTL, y, 4) - TEST_FIELD_OFFSET(POINTL, y, 4) -} - -static void test_pack_PPOINT(void) -{ - /* PPOINT */ - TEST_TYPE_SIZE (PPOINT, 8) - TEST_TYPE_ALIGN (PPOINT, 8) - TEST_TARGET_SIZE (PPOINT, 8) - TEST_TARGET_ALIGN(PPOINT, 4) -} - -static void test_pack_PPOINTL(void) -{ - /* PPOINTL */ - TEST_TYPE_SIZE (PPOINTL, 8) - TEST_TYPE_ALIGN (PPOINTL, 8) - TEST_TARGET_SIZE (PPOINTL, 8) - TEST_TARGET_ALIGN(PPOINTL, 4) -} - -static void test_pack_PRECT(void) -{ - /* PRECT */ - TEST_TYPE_SIZE (PRECT, 8) - TEST_TYPE_ALIGN (PRECT, 8) - TEST_TARGET_SIZE (PRECT, 16) - TEST_TARGET_ALIGN(PRECT, 4) -} - -static void test_pack_PRECTL(void) -{ - /* PRECTL */ - TEST_TYPE_SIZE (PRECTL, 8) - TEST_TYPE_ALIGN (PRECTL, 8) - TEST_TARGET_SIZE (PRECTL, 16) - TEST_TARGET_ALIGN(PRECTL, 4) -} - -static void test_pack_PROC(void) -{ - /* PROC */ - TEST_TYPE_SIZE (PROC, 8) - TEST_TYPE_ALIGN (PROC, 8) -} - -static void test_pack_PSIZE(void) -{ - /* PSIZE */ - TEST_TYPE_SIZE (PSIZE, 8) - TEST_TYPE_ALIGN (PSIZE, 8) - TEST_TARGET_SIZE (PSIZE, 8) - TEST_TARGET_ALIGN(PSIZE, 4) -} - -static void test_pack_PSZ(void) -{ - /* PSZ */ - TEST_TYPE_SIZE (PSZ, 8) - TEST_TYPE_ALIGN (PSZ, 8) -} - -static void test_pack_RECT(void) -{ - /* RECT */ - TEST_TYPE_SIZE (RECT, 16) - TEST_TYPE_ALIGN (RECT, 4) - TEST_FIELD_SIZE (RECT, left, 4) - TEST_FIELD_ALIGN (RECT, left, 4) - TEST_FIELD_OFFSET(RECT, left, 0) - TEST_FIELD_SIZE (RECT, top, 4) - TEST_FIELD_ALIGN (RECT, top, 4) - TEST_FIELD_OFFSET(RECT, top, 4) - TEST_FIELD_SIZE (RECT, right, 4) - TEST_FIELD_ALIGN (RECT, right, 4) - TEST_FIELD_OFFSET(RECT, right, 8) - TEST_FIELD_SIZE (RECT, bottom, 4) - TEST_FIELD_ALIGN (RECT, bottom, 4) - TEST_FIELD_OFFSET(RECT, bottom, 12) -} - -static void test_pack_RECTL(void) -{ - /* RECTL */ - TEST_TYPE_SIZE (RECTL, 16) - TEST_TYPE_ALIGN (RECTL, 4) - TEST_FIELD_SIZE (RECTL, left, 4) - TEST_FIELD_ALIGN (RECTL, left, 4) - TEST_FIELD_OFFSET(RECTL, left, 0) - TEST_FIELD_SIZE (RECTL, top, 4) - TEST_FIELD_ALIGN (RECTL, top, 4) - TEST_FIELD_OFFSET(RECTL, top, 4) - TEST_FIELD_SIZE (RECTL, right, 4) - TEST_FIELD_ALIGN (RECTL, right, 4) - TEST_FIELD_OFFSET(RECTL, right, 8) - TEST_FIELD_SIZE (RECTL, bottom, 4) - TEST_FIELD_ALIGN (RECTL, bottom, 4) - TEST_FIELD_OFFSET(RECTL, bottom, 12) -} - -static void test_pack_SIZE(void) -{ - /* SIZE */ - TEST_TYPE_SIZE (SIZE, 8) - TEST_TYPE_ALIGN (SIZE, 4) - TEST_FIELD_SIZE (SIZE, cx, 4) - TEST_FIELD_ALIGN (SIZE, cx, 4) - TEST_FIELD_OFFSET(SIZE, cx, 0) - TEST_FIELD_SIZE (SIZE, cy, 4) - TEST_FIELD_ALIGN (SIZE, cy, 4) - TEST_FIELD_OFFSET(SIZE, cy, 4) -} - -static void test_pack_SIZEL(void) -{ - /* SIZEL */ - TEST_TYPE_SIZE (SIZEL, 8) - TEST_TYPE_ALIGN (SIZEL, 4) -} - -static void test_pack_UCHAR(void) -{ - /* UCHAR */ - TEST_TYPE_SIZE (UCHAR, 1) - TEST_TYPE_ALIGN (UCHAR, 1) - TEST_TYPE_UNSIGNED(UCHAR) -} - -static void test_pack_UINT(void) -{ - /* UINT */ - TEST_TYPE_SIZE (UINT, 4) - TEST_TYPE_ALIGN (UINT, 4) - TEST_TYPE_UNSIGNED(UINT) -} - -static void test_pack_ULONG(void) -{ - /* ULONG */ - TEST_TYPE_SIZE (ULONG, 4) - TEST_TYPE_ALIGN (ULONG, 4) - TEST_TYPE_UNSIGNED(ULONG) -} - -static void test_pack_USHORT(void) -{ - /* USHORT */ - TEST_TYPE_SIZE (USHORT, 2) - TEST_TYPE_ALIGN (USHORT, 2) - TEST_TYPE_UNSIGNED(USHORT) -} - -static void test_pack_WORD(void) -{ - /* WORD */ - TEST_TYPE_SIZE (WORD, 2) - TEST_TYPE_ALIGN (WORD, 2) - TEST_TYPE_UNSIGNED(WORD) -} - -static void test_pack_WPARAM(void) -{ - /* WPARAM */ - TEST_TYPE_SIZE (WPARAM, 8) - TEST_TYPE_ALIGN (WPARAM, 8) -} - -#else /* _WIN64 */ - -static void test_pack_DWORD32(void) -{ - /* DWORD32 */ - TEST_TYPE_SIZE (DWORD32, 4) - TEST_TYPE_ALIGN (DWORD32, 4) - TEST_TYPE_UNSIGNED(DWORD32) -} - -static void test_pack_DWORD64(void) -{ - /* DWORD64 */ - TEST_TYPE_SIZE (DWORD64, 8) - TEST_TYPE_ALIGN (DWORD64, 8) - TEST_TYPE_UNSIGNED(DWORD64) -} - -static void test_pack_DWORD_PTR(void) -{ - /* DWORD_PTR */ - TEST_TYPE_SIZE (DWORD_PTR, 4) - TEST_TYPE_ALIGN (DWORD_PTR, 4) -} - -static void test_pack_HALF_PTR(void) -{ - /* HALF_PTR */ - TEST_TYPE_SIZE (HALF_PTR, 2) - TEST_TYPE_ALIGN (HALF_PTR, 2) - TEST_TYPE_SIGNED(HALF_PTR) -} - -static void test_pack_INT16(void) -{ - /* INT16 */ - TEST_TYPE_SIZE (INT16, 2) - TEST_TYPE_ALIGN (INT16, 2) - TEST_TYPE_SIGNED(INT16) -} - -static void test_pack_INT32(void) -{ - /* INT32 */ - TEST_TYPE_SIZE (INT32, 4) - TEST_TYPE_ALIGN (INT32, 4) - TEST_TYPE_SIGNED(INT32) -} - -static void test_pack_INT64(void) -{ - /* INT64 */ - TEST_TYPE_SIZE (INT64, 8) - TEST_TYPE_ALIGN (INT64, 8) - TEST_TYPE_SIGNED(INT64) -} - -static void test_pack_INT8(void) -{ - /* INT8 */ - TEST_TYPE_SIZE (INT8, 1) - TEST_TYPE_ALIGN (INT8, 1) - TEST_TYPE_SIGNED(INT8) -} - -static void test_pack_INT_PTR(void) -{ - /* INT_PTR */ - TEST_TYPE_SIZE (INT_PTR, 4) - TEST_TYPE_ALIGN (INT_PTR, 4) - TEST_TYPE_SIGNED(INT_PTR) -} - -static void test_pack_LONG32(void) -{ - /* LONG32 */ - TEST_TYPE_SIZE (LONG32, 4) - TEST_TYPE_ALIGN (LONG32, 4) - TEST_TYPE_SIGNED(LONG32) -} - -static void test_pack_LONG64(void) -{ - /* LONG64 */ - TEST_TYPE_SIZE (LONG64, 8) - TEST_TYPE_ALIGN (LONG64, 8) - TEST_TYPE_SIGNED(LONG64) -} - -static void test_pack_LONG_PTR(void) -{ - /* LONG_PTR */ - TEST_TYPE_SIZE (LONG_PTR, 4) - TEST_TYPE_ALIGN (LONG_PTR, 4) - TEST_TYPE_SIGNED(LONG_PTR) -} - -static void test_pack_SIZE_T(void) -{ - /* SIZE_T */ - TEST_TYPE_SIZE (SIZE_T, 4) - TEST_TYPE_ALIGN (SIZE_T, 4) -} - -static void test_pack_SSIZE_T(void) -{ - /* SSIZE_T */ - TEST_TYPE_SIZE (SSIZE_T, 4) - TEST_TYPE_ALIGN (SSIZE_T, 4) -} - -static void test_pack_UHALF_PTR(void) -{ - /* UHALF_PTR */ - TEST_TYPE_SIZE (UHALF_PTR, 2) - TEST_TYPE_ALIGN (UHALF_PTR, 2) - TEST_TYPE_UNSIGNED(UHALF_PTR) -} - -static void test_pack_UINT16(void) -{ - /* UINT16 */ - TEST_TYPE_SIZE (UINT16, 2) - TEST_TYPE_ALIGN (UINT16, 2) - TEST_TYPE_UNSIGNED(UINT16) -} - -static void test_pack_UINT32(void) -{ - /* UINT32 */ - TEST_TYPE_SIZE (UINT32, 4) - TEST_TYPE_ALIGN (UINT32, 4) - TEST_TYPE_UNSIGNED(UINT32) -} - -static void test_pack_UINT64(void) -{ - /* UINT64 */ - TEST_TYPE_SIZE (UINT64, 8) - TEST_TYPE_ALIGN (UINT64, 8) - TEST_TYPE_UNSIGNED(UINT64) -} - -static void test_pack_UINT8(void) -{ - /* UINT8 */ - TEST_TYPE_SIZE (UINT8, 1) - TEST_TYPE_ALIGN (UINT8, 1) - TEST_TYPE_UNSIGNED(UINT8) -} - -static void test_pack_UINT_PTR(void) -{ - /* UINT_PTR */ - TEST_TYPE_SIZE (UINT_PTR, 4) - TEST_TYPE_ALIGN (UINT_PTR, 4) - TEST_TYPE_UNSIGNED(UINT_PTR) -} - -static void test_pack_ULONG32(void) -{ - /* ULONG32 */ - TEST_TYPE_SIZE (ULONG32, 4) - TEST_TYPE_ALIGN (ULONG32, 4) - TEST_TYPE_UNSIGNED(ULONG32) -} - -static void test_pack_ULONG64(void) -{ - /* ULONG64 */ - TEST_TYPE_SIZE (ULONG64, 8) - TEST_TYPE_ALIGN (ULONG64, 8) - TEST_TYPE_UNSIGNED(ULONG64) -} - -static void test_pack_ULONG_PTR(void) -{ - /* ULONG_PTR */ - TEST_TYPE_SIZE (ULONG_PTR, 4) - TEST_TYPE_ALIGN (ULONG_PTR, 4) - TEST_TYPE_UNSIGNED(ULONG_PTR) -} - -static void test_pack_ACCESS_ALLOWED_ACE(void) -{ - /* ACCESS_ALLOWED_ACE */ - TEST_TYPE_SIZE (ACCESS_ALLOWED_ACE, 12) - TEST_TYPE_ALIGN (ACCESS_ALLOWED_ACE, 4) - TEST_FIELD_SIZE (ACCESS_ALLOWED_ACE, Header, 4) - TEST_FIELD_ALIGN (ACCESS_ALLOWED_ACE, Header, 2) - TEST_FIELD_OFFSET(ACCESS_ALLOWED_ACE, Header, 0) - TEST_FIELD_SIZE (ACCESS_ALLOWED_ACE, Mask, 4) - TEST_FIELD_ALIGN (ACCESS_ALLOWED_ACE, Mask, 4) - TEST_FIELD_OFFSET(ACCESS_ALLOWED_ACE, Mask, 4) - TEST_FIELD_SIZE (ACCESS_ALLOWED_ACE, SidStart, 4) - TEST_FIELD_ALIGN (ACCESS_ALLOWED_ACE, SidStart, 4) - TEST_FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart, 8) -} - -static void test_pack_ACCESS_DENIED_ACE(void) -{ - /* ACCESS_DENIED_ACE */ - TEST_TYPE_SIZE (ACCESS_DENIED_ACE, 12) - TEST_TYPE_ALIGN (ACCESS_DENIED_ACE, 4) - TEST_FIELD_SIZE (ACCESS_DENIED_ACE, Header, 4) - TEST_FIELD_ALIGN (ACCESS_DENIED_ACE, Header, 2) - TEST_FIELD_OFFSET(ACCESS_DENIED_ACE, Header, 0) - TEST_FIELD_SIZE (ACCESS_DENIED_ACE, Mask, 4) - TEST_FIELD_ALIGN (ACCESS_DENIED_ACE, Mask, 4) - TEST_FIELD_OFFSET(ACCESS_DENIED_ACE, Mask, 4) - TEST_FIELD_SIZE (ACCESS_DENIED_ACE, SidStart, 4) - TEST_FIELD_ALIGN (ACCESS_DENIED_ACE, SidStart, 4) - TEST_FIELD_OFFSET(ACCESS_DENIED_ACE, SidStart, 8) -} - -static void test_pack_ACCESS_MASK(void) -{ - /* ACCESS_MASK */ - TEST_TYPE_SIZE (ACCESS_MASK, 4) - TEST_TYPE_ALIGN (ACCESS_MASK, 4) - TEST_TYPE_UNSIGNED(ACCESS_MASK) -} - -static void test_pack_ACE_HEADER(void) -{ - /* ACE_HEADER */ - TEST_TYPE_SIZE (ACE_HEADER, 4) - TEST_TYPE_ALIGN (ACE_HEADER, 2) - TEST_FIELD_SIZE (ACE_HEADER, AceType, 1) - TEST_FIELD_ALIGN (ACE_HEADER, AceType, 1) - TEST_FIELD_OFFSET(ACE_HEADER, AceType, 0) - TEST_FIELD_SIZE (ACE_HEADER, AceFlags, 1) - TEST_FIELD_ALIGN (ACE_HEADER, AceFlags, 1) - TEST_FIELD_OFFSET(ACE_HEADER, AceFlags, 1) - TEST_FIELD_SIZE (ACE_HEADER, AceSize, 2) - TEST_FIELD_ALIGN (ACE_HEADER, AceSize, 2) - TEST_FIELD_OFFSET(ACE_HEADER, AceSize, 2) -} - -static void test_pack_ACL(void) -{ - /* ACL */ - TEST_TYPE_SIZE (ACL, 8) - TEST_TYPE_ALIGN (ACL, 2) - TEST_FIELD_SIZE (ACL, AclRevision, 1) - TEST_FIELD_ALIGN (ACL, AclRevision, 1) - TEST_FIELD_OFFSET(ACL, AclRevision, 0) - TEST_FIELD_SIZE (ACL, Sbz1, 1) - TEST_FIELD_ALIGN (ACL, Sbz1, 1) - TEST_FIELD_OFFSET(ACL, Sbz1, 1) - TEST_FIELD_SIZE (ACL, AclSize, 2) - TEST_FIELD_ALIGN (ACL, AclSize, 2) - TEST_FIELD_OFFSET(ACL, AclSize, 2) - TEST_FIELD_SIZE (ACL, AceCount, 2) - TEST_FIELD_ALIGN (ACL, AceCount, 2) - TEST_FIELD_OFFSET(ACL, AceCount, 4) - TEST_FIELD_SIZE (ACL, Sbz2, 2) - TEST_FIELD_ALIGN (ACL, Sbz2, 2) - TEST_FIELD_OFFSET(ACL, Sbz2, 6) -} - -static void test_pack_ACL_REVISION_INFORMATION(void) -{ - /* ACL_REVISION_INFORMATION */ - TEST_TYPE_SIZE (ACL_REVISION_INFORMATION, 4) - TEST_TYPE_ALIGN (ACL_REVISION_INFORMATION, 4) - TEST_FIELD_SIZE (ACL_REVISION_INFORMATION, AclRevision, 4) - TEST_FIELD_ALIGN (ACL_REVISION_INFORMATION, AclRevision, 4) - TEST_FIELD_OFFSET(ACL_REVISION_INFORMATION, AclRevision, 0) -} - -static void test_pack_ACL_SIZE_INFORMATION(void) -{ - /* ACL_SIZE_INFORMATION */ - TEST_TYPE_SIZE (ACL_SIZE_INFORMATION, 12) - TEST_TYPE_ALIGN (ACL_SIZE_INFORMATION, 4) - TEST_FIELD_SIZE (ACL_SIZE_INFORMATION, AceCount, 4) - TEST_FIELD_ALIGN (ACL_SIZE_INFORMATION, AceCount, 4) - TEST_FIELD_OFFSET(ACL_SIZE_INFORMATION, AceCount, 0) - TEST_FIELD_SIZE (ACL_SIZE_INFORMATION, AclBytesInUse, 4) - TEST_FIELD_ALIGN (ACL_SIZE_INFORMATION, AclBytesInUse, 4) - TEST_FIELD_OFFSET(ACL_SIZE_INFORMATION, AclBytesInUse, 4) - TEST_FIELD_SIZE (ACL_SIZE_INFORMATION, AclBytesFree, 4) - TEST_FIELD_ALIGN (ACL_SIZE_INFORMATION, AclBytesFree, 4) - TEST_FIELD_OFFSET(ACL_SIZE_INFORMATION, AclBytesFree, 8) -} - -static void test_pack_BOOLEAN(void) -{ - /* BOOLEAN */ - TEST_TYPE_SIZE (BOOLEAN, 1) - TEST_TYPE_ALIGN (BOOLEAN, 1) - TEST_TYPE_UNSIGNED(BOOLEAN) -} - -static void test_pack_CCHAR(void) -{ - /* CCHAR */ - TEST_TYPE_SIZE (CCHAR, 1) - TEST_TYPE_ALIGN (CCHAR, 1) - TEST_TYPE_SIGNED(CCHAR) -} - -static void test_pack_CHAR(void) -{ - /* CHAR */ - TEST_TYPE_SIZE (CHAR, 1) - TEST_TYPE_ALIGN (CHAR, 1) - TEST_TYPE_SIGNED(CHAR) -} - -static void test_pack_DWORDLONG(void) -{ - /* DWORDLONG */ - TEST_TYPE_SIZE (DWORDLONG, 8) - TEST_TYPE_ALIGN (DWORDLONG, 8) - TEST_TYPE_UNSIGNED(DWORDLONG) -} - -static void test_pack_EXCEPTION_POINTERS(void) -{ - /* EXCEPTION_POINTERS */ - TEST_TYPE_SIZE (EXCEPTION_POINTERS, 8) - TEST_TYPE_ALIGN (EXCEPTION_POINTERS, 4) - TEST_FIELD_SIZE (EXCEPTION_POINTERS, ExceptionRecord, 4) - TEST_FIELD_ALIGN (EXCEPTION_POINTERS, ExceptionRecord, 4) - TEST_FIELD_OFFSET(EXCEPTION_POINTERS, ExceptionRecord, 0) - TEST_FIELD_SIZE (EXCEPTION_POINTERS, ContextRecord, 4) - TEST_FIELD_ALIGN (EXCEPTION_POINTERS, ContextRecord, 4) - TEST_FIELD_OFFSET(EXCEPTION_POINTERS, ContextRecord, 4) -} - -static void test_pack_EXCEPTION_RECORD(void) -{ - /* EXCEPTION_RECORD */ - TEST_TYPE_SIZE (EXCEPTION_RECORD, 80) - TEST_TYPE_ALIGN (EXCEPTION_RECORD, 4) - TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionCode, 4) - TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionCode, 4) - TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionCode, 0) - TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionFlags, 4) - TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionFlags, 4) - TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionFlags, 4) - TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionRecord, 4) - TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionRecord, 4) - TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionRecord, 8) - TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionAddress, 4) - TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionAddress, 4) - TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionAddress, 12) - TEST_FIELD_SIZE (EXCEPTION_RECORD, NumberParameters, 4) - TEST_FIELD_ALIGN (EXCEPTION_RECORD, NumberParameters, 4) - TEST_FIELD_OFFSET(EXCEPTION_RECORD, NumberParameters, 16) - TEST_FIELD_SIZE (EXCEPTION_RECORD, ExceptionInformation, 60) - TEST_FIELD_ALIGN (EXCEPTION_RECORD, ExceptionInformation, 4) - TEST_FIELD_OFFSET(EXCEPTION_RECORD, ExceptionInformation, 20) -} - -static void test_pack_EXECUTION_STATE(void) -{ - /* EXECUTION_STATE */ - TEST_TYPE_SIZE (EXECUTION_STATE, 4) - TEST_TYPE_ALIGN (EXECUTION_STATE, 4) - TEST_TYPE_UNSIGNED(EXECUTION_STATE) -} - -static void test_pack_FLOATING_SAVE_AREA(void) -{ - /* FLOATING_SAVE_AREA */ - TEST_TYPE_SIZE (FLOATING_SAVE_AREA, 112) - TEST_TYPE_ALIGN (FLOATING_SAVE_AREA, 4) - TEST_FIELD_SIZE (FLOATING_SAVE_AREA, ControlWord, 4) - TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, ControlWord, 4) - TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, ControlWord, 0) - TEST_FIELD_SIZE (FLOATING_SAVE_AREA, StatusWord, 4) - TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, StatusWord, 4) - TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, StatusWord, 4) - TEST_FIELD_SIZE (FLOATING_SAVE_AREA, TagWord, 4) - TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, TagWord, 4) - TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, TagWord, 8) - TEST_FIELD_SIZE (FLOATING_SAVE_AREA, ErrorOffset, 4) - TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, ErrorOffset, 4) - TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, ErrorOffset, 12) - TEST_FIELD_SIZE (FLOATING_SAVE_AREA, ErrorSelector, 4) - TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, ErrorSelector, 4) - TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, ErrorSelector, 16) - TEST_FIELD_SIZE (FLOATING_SAVE_AREA, DataOffset, 4) - TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, DataOffset, 4) - TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, DataOffset, 20) - TEST_FIELD_SIZE (FLOATING_SAVE_AREA, DataSelector, 4) - TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, DataSelector, 4) - TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, DataSelector, 24) - TEST_FIELD_SIZE (FLOATING_SAVE_AREA, RegisterArea, 80) - TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, RegisterArea, 1) - TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, RegisterArea, 28) - TEST_FIELD_SIZE (FLOATING_SAVE_AREA, Cr0NpxState, 4) - TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, Cr0NpxState, 4) - TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, Cr0NpxState, 108) -} - -static void test_pack_FPO_DATA(void) -{ - /* FPO_DATA */ - TEST_TYPE_SIZE (FPO_DATA, 16) - TEST_TYPE_ALIGN (FPO_DATA, 4) - TEST_FIELD_SIZE (FPO_DATA, ulOffStart, 4) - TEST_FIELD_ALIGN (FPO_DATA, ulOffStart, 4) - TEST_FIELD_OFFSET(FPO_DATA, ulOffStart, 0) - TEST_FIELD_SIZE (FPO_DATA, cbProcSize, 4) - TEST_FIELD_ALIGN (FPO_DATA, cbProcSize, 4) - TEST_FIELD_OFFSET(FPO_DATA, cbProcSize, 4) - TEST_FIELD_SIZE (FPO_DATA, cdwLocals, 4) - TEST_FIELD_ALIGN (FPO_DATA, cdwLocals, 4) - TEST_FIELD_OFFSET(FPO_DATA, cdwLocals, 8) - TEST_FIELD_SIZE (FPO_DATA, cdwParams, 2) - TEST_FIELD_ALIGN (FPO_DATA, cdwParams, 2) - TEST_FIELD_OFFSET(FPO_DATA, cdwParams, 12) -} - -static void test_pack_GENERIC_MAPPING(void) -{ - /* GENERIC_MAPPING */ - TEST_TYPE_SIZE (GENERIC_MAPPING, 16) - TEST_TYPE_ALIGN (GENERIC_MAPPING, 4) - TEST_FIELD_SIZE (GENERIC_MAPPING, GenericRead, 4) - TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericRead, 4) - TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericRead, 0) - TEST_FIELD_SIZE (GENERIC_MAPPING, GenericWrite, 4) - TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericWrite, 4) - TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericWrite, 4) - TEST_FIELD_SIZE (GENERIC_MAPPING, GenericExecute, 4) - TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericExecute, 4) - TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericExecute, 8) - TEST_FIELD_SIZE (GENERIC_MAPPING, GenericAll, 4) - TEST_FIELD_ALIGN (GENERIC_MAPPING, GenericAll, 4) - TEST_FIELD_OFFSET(GENERIC_MAPPING, GenericAll, 12) -} - -static void test_pack_HANDLE(void) -{ - /* HANDLE */ - TEST_TYPE_SIZE (HANDLE, 4) - TEST_TYPE_ALIGN (HANDLE, 4) -} - -static void test_pack_HRESULT(void) -{ - /* HRESULT */ - TEST_TYPE_SIZE (HRESULT, 4) - TEST_TYPE_ALIGN (HRESULT, 4) -} - -static void test_pack_IMAGE_ARCHIVE_MEMBER_HEADER(void) -{ - /* IMAGE_ARCHIVE_MEMBER_HEADER */ - TEST_TYPE_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, 60) - TEST_TYPE_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, 1) - TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Name, 16) - TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Name, 1) - TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Name, 0) - TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Date, 12) - TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Date, 1) - TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Date, 16) - TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, UserID, 6) - TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, UserID, 1) - TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, UserID, 28) - TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, GroupID, 6) - TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, GroupID, 1) - TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, GroupID, 34) - TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Mode, 8) - TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Mode, 1) - TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Mode, 40) - TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, Size, 10) - TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, Size, 1) - TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, Size, 48) - TEST_FIELD_SIZE (IMAGE_ARCHIVE_MEMBER_HEADER, EndHeader, 2) - TEST_FIELD_ALIGN (IMAGE_ARCHIVE_MEMBER_HEADER, EndHeader, 1) - TEST_FIELD_OFFSET(IMAGE_ARCHIVE_MEMBER_HEADER, EndHeader, 58) -} - -static void test_pack_IMAGE_AUX_SYMBOL(void) -{ - /* IMAGE_AUX_SYMBOL (pack 2) */ -} - -static void test_pack_IMAGE_BASE_RELOCATION(void) -{ - /* IMAGE_BASE_RELOCATION */ - TEST_TYPE_SIZE (IMAGE_BASE_RELOCATION, 8) - TEST_TYPE_ALIGN (IMAGE_BASE_RELOCATION, 4) - TEST_FIELD_SIZE (IMAGE_BASE_RELOCATION, VirtualAddress, 4) - TEST_FIELD_ALIGN (IMAGE_BASE_RELOCATION, VirtualAddress, 4) - TEST_FIELD_OFFSET(IMAGE_BASE_RELOCATION, VirtualAddress, 0) - TEST_FIELD_SIZE (IMAGE_BASE_RELOCATION, SizeOfBlock, 4) - TEST_FIELD_ALIGN (IMAGE_BASE_RELOCATION, SizeOfBlock, 4) - TEST_FIELD_OFFSET(IMAGE_BASE_RELOCATION, SizeOfBlock, 4) -} - -static void test_pack_IMAGE_BOUND_FORWARDER_REF(void) -{ - /* IMAGE_BOUND_FORWARDER_REF */ - TEST_TYPE_SIZE (IMAGE_BOUND_FORWARDER_REF, 8) - TEST_TYPE_ALIGN (IMAGE_BOUND_FORWARDER_REF, 4) - TEST_FIELD_SIZE (IMAGE_BOUND_FORWARDER_REF, TimeDateStamp, 4) - TEST_FIELD_ALIGN (IMAGE_BOUND_FORWARDER_REF, TimeDateStamp, 4) - TEST_FIELD_OFFSET(IMAGE_BOUND_FORWARDER_REF, TimeDateStamp, 0) - TEST_FIELD_SIZE (IMAGE_BOUND_FORWARDER_REF, OffsetModuleName, 2) - TEST_FIELD_ALIGN (IMAGE_BOUND_FORWARDER_REF, OffsetModuleName, 2) - TEST_FIELD_OFFSET(IMAGE_BOUND_FORWARDER_REF, OffsetModuleName, 4) - TEST_FIELD_SIZE (IMAGE_BOUND_FORWARDER_REF, Reserved, 2) - TEST_FIELD_ALIGN (IMAGE_BOUND_FORWARDER_REF, Reserved, 2) - TEST_FIELD_OFFSET(IMAGE_BOUND_FORWARDER_REF, Reserved, 6) -} - -static void test_pack_IMAGE_BOUND_IMPORT_DESCRIPTOR(void) -{ - /* IMAGE_BOUND_IMPORT_DESCRIPTOR */ - TEST_TYPE_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, 8) - TEST_TYPE_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, 4) - TEST_FIELD_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, TimeDateStamp, 4) - TEST_FIELD_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, TimeDateStamp, 4) - TEST_FIELD_OFFSET(IMAGE_BOUND_IMPORT_DESCRIPTOR, TimeDateStamp, 0) - TEST_FIELD_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, OffsetModuleName, 2) - TEST_FIELD_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, OffsetModuleName, 2) - TEST_FIELD_OFFSET(IMAGE_BOUND_IMPORT_DESCRIPTOR, OffsetModuleName, 4) - TEST_FIELD_SIZE (IMAGE_BOUND_IMPORT_DESCRIPTOR, NumberOfModuleForwarderRefs, 2) - TEST_FIELD_ALIGN (IMAGE_BOUND_IMPORT_DESCRIPTOR, NumberOfModuleForwarderRefs, 2) - TEST_FIELD_OFFSET(IMAGE_BOUND_IMPORT_DESCRIPTOR, NumberOfModuleForwarderRefs, 6) -} - -static void test_pack_IMAGE_COFF_SYMBOLS_HEADER(void) -{ - /* IMAGE_COFF_SYMBOLS_HEADER */ - TEST_TYPE_SIZE (IMAGE_COFF_SYMBOLS_HEADER, 32) - TEST_TYPE_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, 4) - TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, NumberOfSymbols, 4) - TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, NumberOfSymbols, 4) - TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, NumberOfSymbols, 0) - TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstSymbol, 4) - TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstSymbol, 4) - TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstSymbol, 4) - TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, NumberOfLinenumbers, 4) - TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, NumberOfLinenumbers, 4) - TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, NumberOfLinenumbers, 8) - TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstLinenumber, 4) - TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstLinenumber, 4) - TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, LvaToFirstLinenumber, 12) - TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfCode, 4) - TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfCode, 4) - TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfCode, 16) - TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfCode, 4) - TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfCode, 4) - TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfCode, 20) - TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfData, 4) - TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfData, 4) - TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToFirstByteOfData, 24) - TEST_FIELD_SIZE (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfData, 4) - TEST_FIELD_ALIGN (IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfData, 4) - TEST_FIELD_OFFSET(IMAGE_COFF_SYMBOLS_HEADER, RvaToLastByteOfData, 28) -} - -static void test_pack_IMAGE_DATA_DIRECTORY(void) -{ - /* IMAGE_DATA_DIRECTORY */ - TEST_TYPE_SIZE (IMAGE_DATA_DIRECTORY, 8) - TEST_TYPE_ALIGN (IMAGE_DATA_DIRECTORY, 4) - TEST_FIELD_SIZE (IMAGE_DATA_DIRECTORY, VirtualAddress, 4) - TEST_FIELD_ALIGN (IMAGE_DATA_DIRECTORY, VirtualAddress, 4) - TEST_FIELD_OFFSET(IMAGE_DATA_DIRECTORY, VirtualAddress, 0) - TEST_FIELD_SIZE (IMAGE_DATA_DIRECTORY, Size, 4) - TEST_FIELD_ALIGN (IMAGE_DATA_DIRECTORY, Size, 4) - TEST_FIELD_OFFSET(IMAGE_DATA_DIRECTORY, Size, 4) -} - -static void test_pack_IMAGE_DEBUG_DIRECTORY(void) -{ - /* IMAGE_DEBUG_DIRECTORY */ - TEST_TYPE_SIZE (IMAGE_DEBUG_DIRECTORY, 28) - TEST_TYPE_ALIGN (IMAGE_DEBUG_DIRECTORY, 4) - TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, Characteristics, 4) - TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, Characteristics, 4) - TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, Characteristics, 0) - TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, TimeDateStamp, 4) - TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, TimeDateStamp, 4) - TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, TimeDateStamp, 4) - TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, MajorVersion, 2) - TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, MajorVersion, 2) - TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, MajorVersion, 8) - TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, MinorVersion, 2) - TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, MinorVersion, 2) - TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, MinorVersion, 10) - TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, Type, 4) - TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, Type, 4) - TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, Type, 12) - TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, SizeOfData, 4) - TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, SizeOfData, 4) - TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, SizeOfData, 16) - TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, AddressOfRawData, 4) - TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, AddressOfRawData, 4) - TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, AddressOfRawData, 20) - TEST_FIELD_SIZE (IMAGE_DEBUG_DIRECTORY, PointerToRawData, 4) - TEST_FIELD_ALIGN (IMAGE_DEBUG_DIRECTORY, PointerToRawData, 4) - TEST_FIELD_OFFSET(IMAGE_DEBUG_DIRECTORY, PointerToRawData, 24) -} - -static void test_pack_IMAGE_DEBUG_MISC(void) -{ - /* IMAGE_DEBUG_MISC */ - TEST_TYPE_SIZE (IMAGE_DEBUG_MISC, 16) - TEST_TYPE_ALIGN (IMAGE_DEBUG_MISC, 4) - TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, DataType, 4) - TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, DataType, 4) - TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, DataType, 0) - TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Length, 4) - TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Length, 4) - TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Length, 4) - TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Unicode, 1) - TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Unicode, 1) - TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Unicode, 8) - TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Reserved, 3) - TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Reserved, 1) - TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Reserved, 9) - TEST_FIELD_SIZE (IMAGE_DEBUG_MISC, Data, 1) - TEST_FIELD_ALIGN (IMAGE_DEBUG_MISC, Data, 1) - TEST_FIELD_OFFSET(IMAGE_DEBUG_MISC, Data, 12) -} - -static void test_pack_IMAGE_DOS_HEADER(void) -{ - /* IMAGE_DOS_HEADER (pack 2) */ - TEST_TYPE_SIZE (IMAGE_DOS_HEADER, 64) - TEST_TYPE_ALIGN (IMAGE_DOS_HEADER, 2) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_magic, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_magic, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_magic, 0) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cblp, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cblp, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cblp, 2) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cp, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cp, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cp, 4) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_crlc, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_crlc, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_crlc, 6) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cparhdr, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cparhdr, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cparhdr, 8) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_minalloc, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_minalloc, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_minalloc, 10) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_maxalloc, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_maxalloc, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_maxalloc, 12) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_ss, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_ss, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_ss, 14) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_sp, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_sp, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_sp, 16) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_csum, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_csum, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_csum, 18) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_ip, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_ip, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_ip, 20) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_cs, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_cs, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_cs, 22) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_lfarlc, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_lfarlc, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_lfarlc, 24) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_ovno, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_ovno, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_ovno, 26) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_res, 8) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_res, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_res, 28) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_oemid, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_oemid, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_oemid, 36) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_oeminfo, 2) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_oeminfo, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_oeminfo, 38) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_res2, 20) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_res2, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_res2, 40) - TEST_FIELD_SIZE (IMAGE_DOS_HEADER, e_lfanew, 4) - TEST_FIELD_ALIGN (IMAGE_DOS_HEADER, e_lfanew, 2) - TEST_FIELD_OFFSET(IMAGE_DOS_HEADER, e_lfanew, 60) -} - -static void test_pack_IMAGE_EXPORT_DIRECTORY(void) -{ - /* IMAGE_EXPORT_DIRECTORY */ - TEST_TYPE_SIZE (IMAGE_EXPORT_DIRECTORY, 40) - TEST_TYPE_ALIGN (IMAGE_EXPORT_DIRECTORY, 4) - TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, Characteristics, 4) - TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, Characteristics, 4) - TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, Characteristics, 0) - TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, TimeDateStamp, 4) - TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, TimeDateStamp, 4) - TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, TimeDateStamp, 4) - TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, MajorVersion, 2) - TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, MajorVersion, 2) - TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, MajorVersion, 8) - TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, MinorVersion, 2) - TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, MinorVersion, 2) - TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, MinorVersion, 10) - TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, Name, 4) - TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, Name, 4) - TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, Name, 12) - TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, Base, 4) - TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, Base, 4) - TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, Base, 16) - TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, NumberOfFunctions, 4) - TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, NumberOfFunctions, 4) - TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, NumberOfFunctions, 20) - TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, NumberOfNames, 4) - TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, NumberOfNames, 4) - TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, NumberOfNames, 24) - TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, AddressOfFunctions, 4) - TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, AddressOfFunctions, 4) - TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, AddressOfFunctions, 28) - TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, AddressOfNames, 4) - TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, AddressOfNames, 4) - TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, AddressOfNames, 32) - TEST_FIELD_SIZE (IMAGE_EXPORT_DIRECTORY, AddressOfNameOrdinals, 4) - TEST_FIELD_ALIGN (IMAGE_EXPORT_DIRECTORY, AddressOfNameOrdinals, 4) - TEST_FIELD_OFFSET(IMAGE_EXPORT_DIRECTORY, AddressOfNameOrdinals, 36) -} - -static void test_pack_IMAGE_FILE_HEADER(void) -{ - /* IMAGE_FILE_HEADER */ - TEST_TYPE_SIZE (IMAGE_FILE_HEADER, 20) - TEST_TYPE_ALIGN (IMAGE_FILE_HEADER, 4) - TEST_FIELD_SIZE (IMAGE_FILE_HEADER, Machine, 2) - TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, Machine, 2) - TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, Machine, 0) - TEST_FIELD_SIZE (IMAGE_FILE_HEADER, NumberOfSections, 2) - TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, NumberOfSections, 2) - TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, NumberOfSections, 2) - TEST_FIELD_SIZE (IMAGE_FILE_HEADER, TimeDateStamp, 4) - TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, TimeDateStamp, 4) - TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, TimeDateStamp, 4) - TEST_FIELD_SIZE (IMAGE_FILE_HEADER, PointerToSymbolTable, 4) - TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, PointerToSymbolTable, 4) - TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, PointerToSymbolTable, 8) - TEST_FIELD_SIZE (IMAGE_FILE_HEADER, NumberOfSymbols, 4) - TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, NumberOfSymbols, 4) - TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, NumberOfSymbols, 12) - TEST_FIELD_SIZE (IMAGE_FILE_HEADER, SizeOfOptionalHeader, 2) - TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, SizeOfOptionalHeader, 2) - TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, SizeOfOptionalHeader, 16) - TEST_FIELD_SIZE (IMAGE_FILE_HEADER, Characteristics, 2) - TEST_FIELD_ALIGN (IMAGE_FILE_HEADER, Characteristics, 2) - TEST_FIELD_OFFSET(IMAGE_FILE_HEADER, Characteristics, 18) -} - -static void test_pack_IMAGE_FUNCTION_ENTRY(void) -{ - /* IMAGE_FUNCTION_ENTRY */ - TEST_TYPE_SIZE (IMAGE_FUNCTION_ENTRY, 12) - TEST_TYPE_ALIGN (IMAGE_FUNCTION_ENTRY, 4) - TEST_FIELD_SIZE (IMAGE_FUNCTION_ENTRY, StartingAddress, 4) - TEST_FIELD_ALIGN (IMAGE_FUNCTION_ENTRY, StartingAddress, 4) - TEST_FIELD_OFFSET(IMAGE_FUNCTION_ENTRY, StartingAddress, 0) - TEST_FIELD_SIZE (IMAGE_FUNCTION_ENTRY, EndingAddress, 4) - TEST_FIELD_ALIGN (IMAGE_FUNCTION_ENTRY, EndingAddress, 4) - TEST_FIELD_OFFSET(IMAGE_FUNCTION_ENTRY, EndingAddress, 4) - TEST_FIELD_SIZE (IMAGE_FUNCTION_ENTRY, EndOfPrologue, 4) - TEST_FIELD_ALIGN (IMAGE_FUNCTION_ENTRY, EndOfPrologue, 4) - TEST_FIELD_OFFSET(IMAGE_FUNCTION_ENTRY, EndOfPrologue, 8) -} - -static void test_pack_IMAGE_IMPORT_BY_NAME(void) -{ - /* IMAGE_IMPORT_BY_NAME */ - TEST_TYPE_SIZE (IMAGE_IMPORT_BY_NAME, 4) - TEST_TYPE_ALIGN (IMAGE_IMPORT_BY_NAME, 2) - TEST_FIELD_SIZE (IMAGE_IMPORT_BY_NAME, Hint, 2) - TEST_FIELD_ALIGN (IMAGE_IMPORT_BY_NAME, Hint, 2) - TEST_FIELD_OFFSET(IMAGE_IMPORT_BY_NAME, Hint, 0) - TEST_FIELD_SIZE (IMAGE_IMPORT_BY_NAME, Name, 1) - TEST_FIELD_ALIGN (IMAGE_IMPORT_BY_NAME, Name, 1) - TEST_FIELD_OFFSET(IMAGE_IMPORT_BY_NAME, Name, 2) -} - -static void test_pack_IMAGE_IMPORT_DESCRIPTOR(void) -{ - /* IMAGE_IMPORT_DESCRIPTOR */ -} - -static void test_pack_IMAGE_LINENUMBER(void) -{ - /* IMAGE_LINENUMBER (pack 2) */ -} - -static void test_pack_IMAGE_LOAD_CONFIG_DIRECTORY(void) -{ - /* IMAGE_LOAD_CONFIG_DIRECTORY */ - TEST_TYPE_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, 72) - TEST_TYPE_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, 4) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, Size, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, Size, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, Size, 0) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, TimeDateStamp, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, TimeDateStamp, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, TimeDateStamp, 4) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, MajorVersion, 2) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, MajorVersion, 2) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, MajorVersion, 8) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, MinorVersion, 2) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, MinorVersion, 2) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, MinorVersion, 10) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsClear, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsClear, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsClear, 12) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsSet, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsSet, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, GlobalFlagsSet, 16) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, CriticalSectionDefaultTimeout, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, CriticalSectionDefaultTimeout, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, CriticalSectionDefaultTimeout, 20) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitFreeBlockThreshold, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitFreeBlockThreshold, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitFreeBlockThreshold, 24) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitTotalFreeThreshold, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitTotalFreeThreshold, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitTotalFreeThreshold, 28) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, LockPrefixTable, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, LockPrefixTable, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, LockPrefixTable, 32) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, MaximumAllocationSize, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, MaximumAllocationSize, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, MaximumAllocationSize, 36) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, VirtualMemoryThreshold, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, VirtualMemoryThreshold, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, VirtualMemoryThreshold, 40) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, ProcessHeapFlags, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, ProcessHeapFlags, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, ProcessHeapFlags, 44) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, ProcessAffinityMask, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, ProcessAffinityMask, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, ProcessAffinityMask, 48) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, CSDVersion, 2) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, CSDVersion, 2) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, CSDVersion, 52) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, Reserved1, 2) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, Reserved1, 2) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, Reserved1, 54) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, EditList, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, EditList, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, EditList, 56) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, SecurityCookie, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, SecurityCookie, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, SecurityCookie, 60) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerTable, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerTable, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerTable, 64) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerCount, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerCount, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerCount, 68) -} - -static void test_pack_IMAGE_NT_HEADERS(void) -{ - /* IMAGE_NT_HEADERS */ - TEST_TYPE_SIZE (IMAGE_NT_HEADERS, 248) - TEST_TYPE_ALIGN (IMAGE_NT_HEADERS, 4) -} - -static void test_pack_IMAGE_NT_HEADERS32(void) -{ - /* IMAGE_NT_HEADERS32 */ - TEST_TYPE_SIZE (IMAGE_NT_HEADERS32, 248) - TEST_TYPE_ALIGN (IMAGE_NT_HEADERS32, 4) - TEST_FIELD_SIZE (IMAGE_NT_HEADERS32, Signature, 4) - TEST_FIELD_ALIGN (IMAGE_NT_HEADERS32, Signature, 4) - TEST_FIELD_OFFSET(IMAGE_NT_HEADERS32, Signature, 0) - TEST_FIELD_SIZE (IMAGE_NT_HEADERS32, FileHeader, 20) - TEST_FIELD_ALIGN (IMAGE_NT_HEADERS32, FileHeader, 4) - TEST_FIELD_OFFSET(IMAGE_NT_HEADERS32, FileHeader, 4) - TEST_FIELD_SIZE (IMAGE_NT_HEADERS32, OptionalHeader, 224) - TEST_FIELD_ALIGN (IMAGE_NT_HEADERS32, OptionalHeader, 4) - TEST_FIELD_OFFSET(IMAGE_NT_HEADERS32, OptionalHeader, 24) -} - -static void test_pack_IMAGE_NT_HEADERS64(void) -{ - /* IMAGE_NT_HEADERS64 */ - TEST_TYPE_SIZE (IMAGE_NT_HEADERS64, 264) - TEST_TYPE_ALIGN (IMAGE_NT_HEADERS64, 8) - TEST_FIELD_SIZE (IMAGE_NT_HEADERS64, Signature, 4) - TEST_FIELD_ALIGN (IMAGE_NT_HEADERS64, Signature, 4) - TEST_FIELD_OFFSET(IMAGE_NT_HEADERS64, Signature, 0) - TEST_FIELD_SIZE (IMAGE_NT_HEADERS64, FileHeader, 20) - TEST_FIELD_ALIGN (IMAGE_NT_HEADERS64, FileHeader, 4) - TEST_FIELD_OFFSET(IMAGE_NT_HEADERS64, FileHeader, 4) - TEST_FIELD_SIZE (IMAGE_NT_HEADERS64, OptionalHeader, 240) - TEST_FIELD_ALIGN (IMAGE_NT_HEADERS64, OptionalHeader, 8) - TEST_FIELD_OFFSET(IMAGE_NT_HEADERS64, OptionalHeader, 24) -} - -static void test_pack_IMAGE_OPTIONAL_HEADER(void) -{ - /* IMAGE_OPTIONAL_HEADER */ - TEST_TYPE_SIZE (IMAGE_OPTIONAL_HEADER, 224) - TEST_TYPE_ALIGN (IMAGE_OPTIONAL_HEADER, 4) -} - -static void test_pack_IMAGE_OPTIONAL_HEADER32(void) -{ - /* IMAGE_OPTIONAL_HEADER32 */ - TEST_TYPE_SIZE (IMAGE_OPTIONAL_HEADER32, 224) - TEST_TYPE_ALIGN (IMAGE_OPTIONAL_HEADER32, 4) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, Magic, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, Magic, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, Magic, 0) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MajorLinkerVersion, 1) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MajorLinkerVersion, 1) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MajorLinkerVersion, 2) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MinorLinkerVersion, 1) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MinorLinkerVersion, 1) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MinorLinkerVersion, 3) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfCode, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfCode, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfCode, 4) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfInitializedData, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfInitializedData, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfInitializedData, 8) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfUninitializedData, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfUninitializedData, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfUninitializedData, 12) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, AddressOfEntryPoint, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, AddressOfEntryPoint, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, AddressOfEntryPoint, 16) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, BaseOfCode, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, BaseOfCode, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, BaseOfCode, 20) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, BaseOfData, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, BaseOfData, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, BaseOfData, 24) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, ImageBase, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, ImageBase, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, ImageBase, 28) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SectionAlignment, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SectionAlignment, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SectionAlignment, 32) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, FileAlignment, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, FileAlignment, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, FileAlignment, 36) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MajorOperatingSystemVersion, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MajorOperatingSystemVersion, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MajorOperatingSystemVersion, 40) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MinorOperatingSystemVersion, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MinorOperatingSystemVersion, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MinorOperatingSystemVersion, 42) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MajorImageVersion, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MajorImageVersion, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MajorImageVersion, 44) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MinorImageVersion, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MinorImageVersion, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MinorImageVersion, 46) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MajorSubsystemVersion, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MajorSubsystemVersion, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MajorSubsystemVersion, 48) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, MinorSubsystemVersion, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, MinorSubsystemVersion, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, MinorSubsystemVersion, 50) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, Win32VersionValue, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, Win32VersionValue, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, Win32VersionValue, 52) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfImage, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfImage, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfImage, 56) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfHeaders, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfHeaders, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfHeaders, 60) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, CheckSum, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, CheckSum, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, CheckSum, 64) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, Subsystem, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, Subsystem, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, Subsystem, 68) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, DllCharacteristics, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, DllCharacteristics, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, DllCharacteristics, 70) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfStackReserve, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfStackReserve, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfStackReserve, 72) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfStackCommit, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfStackCommit, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfStackCommit, 76) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfHeapReserve, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfHeapReserve, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfHeapReserve, 80) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, SizeOfHeapCommit, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, SizeOfHeapCommit, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, SizeOfHeapCommit, 84) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, LoaderFlags, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, LoaderFlags, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, LoaderFlags, 88) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, NumberOfRvaAndSizes, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, NumberOfRvaAndSizes, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, NumberOfRvaAndSizes, 92) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER32, DataDirectory, 128) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER32, DataDirectory, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER32, DataDirectory, 96) -} - -static void test_pack_IMAGE_OPTIONAL_HEADER64(void) -{ - /* IMAGE_OPTIONAL_HEADER64 */ - TEST_TYPE_SIZE (IMAGE_OPTIONAL_HEADER64, 240) - TEST_TYPE_ALIGN (IMAGE_OPTIONAL_HEADER64, 8) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, Magic, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, Magic, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, Magic, 0) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MajorLinkerVersion, 1) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MajorLinkerVersion, 1) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MajorLinkerVersion, 2) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MinorLinkerVersion, 1) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MinorLinkerVersion, 1) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MinorLinkerVersion, 3) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfCode, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfCode, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfCode, 4) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfInitializedData, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfInitializedData, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfInitializedData, 8) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfUninitializedData, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfUninitializedData, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfUninitializedData, 12) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, AddressOfEntryPoint, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, AddressOfEntryPoint, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, AddressOfEntryPoint, 16) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, BaseOfCode, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, BaseOfCode, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, BaseOfCode, 20) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, ImageBase, 8) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, ImageBase, 8) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, ImageBase, 24) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SectionAlignment, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SectionAlignment, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SectionAlignment, 32) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, FileAlignment, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, FileAlignment, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, FileAlignment, 36) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MajorOperatingSystemVersion, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MajorOperatingSystemVersion, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MajorOperatingSystemVersion, 40) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MinorOperatingSystemVersion, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MinorOperatingSystemVersion, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MinorOperatingSystemVersion, 42) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MajorImageVersion, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MajorImageVersion, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MajorImageVersion, 44) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MinorImageVersion, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MinorImageVersion, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MinorImageVersion, 46) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MajorSubsystemVersion, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MajorSubsystemVersion, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MajorSubsystemVersion, 48) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, MinorSubsystemVersion, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, MinorSubsystemVersion, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, MinorSubsystemVersion, 50) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, Win32VersionValue, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, Win32VersionValue, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, Win32VersionValue, 52) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfImage, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfImage, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfImage, 56) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfHeaders, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfHeaders, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfHeaders, 60) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, CheckSum, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, CheckSum, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, CheckSum, 64) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, Subsystem, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, Subsystem, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, Subsystem, 68) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, DllCharacteristics, 2) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, DllCharacteristics, 2) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, DllCharacteristics, 70) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfStackReserve, 8) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfStackReserve, 8) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfStackReserve, 72) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfStackCommit, 8) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfStackCommit, 8) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfStackCommit, 80) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfHeapReserve, 8) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfHeapReserve, 8) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfHeapReserve, 88) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, SizeOfHeapCommit, 8) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, SizeOfHeapCommit, 8) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, SizeOfHeapCommit, 96) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, LoaderFlags, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, LoaderFlags, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, LoaderFlags, 104) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, NumberOfRvaAndSizes, 4) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, NumberOfRvaAndSizes, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, NumberOfRvaAndSizes, 108) - TEST_FIELD_SIZE (IMAGE_OPTIONAL_HEADER64, DataDirectory, 128) - TEST_FIELD_ALIGN (IMAGE_OPTIONAL_HEADER64, DataDirectory, 4) - TEST_FIELD_OFFSET(IMAGE_OPTIONAL_HEADER64, DataDirectory, 112) -} - -static void test_pack_IMAGE_OS2_HEADER(void) -{ - /* IMAGE_OS2_HEADER (pack 2) */ - TEST_TYPE_SIZE (IMAGE_OS2_HEADER, 64) - TEST_TYPE_ALIGN (IMAGE_OS2_HEADER, 2) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_magic, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_magic, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_magic, 0) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_ver, 1) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_ver, 1) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_ver, 2) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_rev, 1) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_rev, 1) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_rev, 3) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_enttab, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_enttab, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_enttab, 4) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cbenttab, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cbenttab, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cbenttab, 6) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_crc, 4) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_crc, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_crc, 8) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_flags, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_flags, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_flags, 12) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_autodata, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_autodata, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_autodata, 14) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_heap, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_heap, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_heap, 16) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_stack, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_stack, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_stack, 18) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_csip, 4) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_csip, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_csip, 20) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_sssp, 4) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_sssp, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_sssp, 24) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cseg, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cseg, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cseg, 28) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cmod, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cmod, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cmod, 30) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cbnrestab, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cbnrestab, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cbnrestab, 32) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_segtab, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_segtab, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_segtab, 34) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_rsrctab, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_rsrctab, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_rsrctab, 36) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_restab, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_restab, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_restab, 38) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_modtab, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_modtab, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_modtab, 40) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_imptab, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_imptab, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_imptab, 42) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_nrestab, 4) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_nrestab, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_nrestab, 44) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cmovent, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cmovent, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cmovent, 48) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_align, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_align, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_align, 50) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_cres, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_cres, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_cres, 52) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_exetyp, 1) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_exetyp, 1) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_exetyp, 54) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_flagsothers, 1) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_flagsothers, 1) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_flagsothers, 55) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_pretthunks, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_pretthunks, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_pretthunks, 56) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_psegrefbytes, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_psegrefbytes, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_psegrefbytes, 58) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_swaparea, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_swaparea, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_swaparea, 60) - TEST_FIELD_SIZE (IMAGE_OS2_HEADER, ne_expver, 2) - TEST_FIELD_ALIGN (IMAGE_OS2_HEADER, ne_expver, 2) - TEST_FIELD_OFFSET(IMAGE_OS2_HEADER, ne_expver, 62) -} - -static void test_pack_IMAGE_RELOCATION(void) -{ - /* IMAGE_RELOCATION (pack 2) */ -} - -static void test_pack_IMAGE_RESOURCE_DATA_ENTRY(void) -{ - /* IMAGE_RESOURCE_DATA_ENTRY */ - TEST_TYPE_SIZE (IMAGE_RESOURCE_DATA_ENTRY, 16) - TEST_TYPE_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, 4) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, OffsetToData, 4) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, OffsetToData, 4) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, OffsetToData, 0) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, Size, 4) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, Size, 4) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, Size, 4) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, CodePage, 4) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, CodePage, 4) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, CodePage, 8) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DATA_ENTRY, Reserved, 4) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DATA_ENTRY, Reserved, 4) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DATA_ENTRY, Reserved, 12) -} - -static void test_pack_IMAGE_RESOURCE_DIRECTORY(void) -{ - /* IMAGE_RESOURCE_DIRECTORY */ - TEST_TYPE_SIZE (IMAGE_RESOURCE_DIRECTORY, 16) - TEST_TYPE_ALIGN (IMAGE_RESOURCE_DIRECTORY, 4) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, Characteristics, 4) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, Characteristics, 4) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, Characteristics, 0) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, TimeDateStamp, 4) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, TimeDateStamp, 4) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, TimeDateStamp, 4) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, MajorVersion, 2) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, MajorVersion, 2) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, MajorVersion, 8) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, MinorVersion, 2) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, MinorVersion, 2) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, MinorVersion, 10) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, NumberOfNamedEntries, 2) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, NumberOfNamedEntries, 2) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, NumberOfNamedEntries, 12) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY, NumberOfIdEntries, 2) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY, NumberOfIdEntries, 2) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY, NumberOfIdEntries, 14) -} - -static void test_pack_IMAGE_RESOURCE_DIRECTORY_ENTRY(void) -{ - /* IMAGE_RESOURCE_DIRECTORY_ENTRY */ -} - -static void test_pack_IMAGE_RESOURCE_DIRECTORY_STRING(void) -{ - /* IMAGE_RESOURCE_DIRECTORY_STRING */ - TEST_TYPE_SIZE (IMAGE_RESOURCE_DIRECTORY_STRING, 4) - TEST_TYPE_ALIGN (IMAGE_RESOURCE_DIRECTORY_STRING, 2) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY_STRING, Length, 2) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY_STRING, Length, 2) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY_STRING, Length, 0) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DIRECTORY_STRING, NameString, 1) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIRECTORY_STRING, NameString, 1) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIRECTORY_STRING, NameString, 2) -} - -static void test_pack_IMAGE_RESOURCE_DIR_STRING_U(void) -{ - /* IMAGE_RESOURCE_DIR_STRING_U */ - TEST_TYPE_SIZE (IMAGE_RESOURCE_DIR_STRING_U, 4) - TEST_TYPE_ALIGN (IMAGE_RESOURCE_DIR_STRING_U, 2) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DIR_STRING_U, Length, 2) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIR_STRING_U, Length, 2) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIR_STRING_U, Length, 0) - TEST_FIELD_SIZE (IMAGE_RESOURCE_DIR_STRING_U, NameString, 2) - TEST_FIELD_ALIGN (IMAGE_RESOURCE_DIR_STRING_U, NameString, 2) - TEST_FIELD_OFFSET(IMAGE_RESOURCE_DIR_STRING_U, NameString, 2) -} - -static void test_pack_IMAGE_SECTION_HEADER(void) -{ - /* IMAGE_SECTION_HEADER */ - TEST_FIELD_SIZE (IMAGE_SECTION_HEADER, Name, 8) - TEST_FIELD_ALIGN (IMAGE_SECTION_HEADER, Name, 1) - TEST_FIELD_OFFSET(IMAGE_SECTION_HEADER, Name, 0) -} - -static void test_pack_IMAGE_SEPARATE_DEBUG_HEADER(void) -{ - /* IMAGE_SEPARATE_DEBUG_HEADER */ - TEST_TYPE_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, 48) - TEST_TYPE_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, 4) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Signature, 2) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Signature, 2) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Signature, 0) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Flags, 2) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Flags, 2) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Flags, 2) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Machine, 2) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Machine, 2) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Machine, 4) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Characteristics, 2) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Characteristics, 2) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Characteristics, 6) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, TimeDateStamp, 4) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, TimeDateStamp, 4) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, TimeDateStamp, 8) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, CheckSum, 4) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, CheckSum, 4) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, CheckSum, 12) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, ImageBase, 4) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, ImageBase, 4) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, ImageBase, 16) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, SizeOfImage, 4) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, SizeOfImage, 4) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, SizeOfImage, 20) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, NumberOfSections, 4) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, NumberOfSections, 4) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, NumberOfSections, 24) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, ExportedNamesSize, 4) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, ExportedNamesSize, 4) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, ExportedNamesSize, 28) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, DebugDirectorySize, 4) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, DebugDirectorySize, 4) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, DebugDirectorySize, 32) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, SectionAlignment, 4) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, SectionAlignment, 4) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, SectionAlignment, 36) - TEST_FIELD_SIZE (IMAGE_SEPARATE_DEBUG_HEADER, Reserved, 8) - TEST_FIELD_ALIGN (IMAGE_SEPARATE_DEBUG_HEADER, Reserved, 4) - TEST_FIELD_OFFSET(IMAGE_SEPARATE_DEBUG_HEADER, Reserved, 40) -} - -static void test_pack_IMAGE_SYMBOL(void) -{ - /* IMAGE_SYMBOL (pack 2) */ -} - -static void test_pack_IMAGE_THUNK_DATA(void) -{ - /* IMAGE_THUNK_DATA */ -} - -static void test_pack_IMAGE_TLS_DIRECTORY(void) -{ - /* IMAGE_TLS_DIRECTORY */ - TEST_TYPE_SIZE (IMAGE_TLS_DIRECTORY, 24) - TEST_TYPE_ALIGN (IMAGE_TLS_DIRECTORY, 4) -} - -static void test_pack_IMAGE_TLS_DIRECTORY32(void) -{ - /* IMAGE_TLS_DIRECTORY32 */ - TEST_TYPE_SIZE (IMAGE_TLS_DIRECTORY32, 24) - TEST_TYPE_ALIGN (IMAGE_TLS_DIRECTORY32, 4) - TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, StartAddressOfRawData, 4) - TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, StartAddressOfRawData, 4) - TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, StartAddressOfRawData, 0) - TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, EndAddressOfRawData, 4) - TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, EndAddressOfRawData, 4) - TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, EndAddressOfRawData, 4) - TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, AddressOfIndex, 4) - TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, AddressOfIndex, 4) - TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, AddressOfIndex, 8) - TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, AddressOfCallBacks, 4) - TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, AddressOfCallBacks, 4) - TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, AddressOfCallBacks, 12) - TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, SizeOfZeroFill, 4) - TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, SizeOfZeroFill, 4) - TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, SizeOfZeroFill, 16) - TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY32, Characteristics, 4) - TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY32, Characteristics, 4) - TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY32, Characteristics, 20) -} - -static void test_pack_IMAGE_TLS_DIRECTORY64(void) -{ - /* IMAGE_TLS_DIRECTORY64 */ - TEST_TYPE_SIZE (IMAGE_TLS_DIRECTORY64, 40) - TEST_TYPE_ALIGN (IMAGE_TLS_DIRECTORY64, 8) - TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, StartAddressOfRawData, 8) - TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, StartAddressOfRawData, 8) - TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, StartAddressOfRawData, 0) - TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, EndAddressOfRawData, 8) - TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, EndAddressOfRawData, 8) - TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, EndAddressOfRawData, 8) - TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, AddressOfIndex, 8) - TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, AddressOfIndex, 8) - TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, AddressOfIndex, 16) - TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, AddressOfCallBacks, 8) - TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, AddressOfCallBacks, 8) - TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, AddressOfCallBacks, 24) - TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, SizeOfZeroFill, 4) - TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, SizeOfZeroFill, 4) - TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, SizeOfZeroFill, 32) - TEST_FIELD_SIZE (IMAGE_TLS_DIRECTORY64, Characteristics, 4) - TEST_FIELD_ALIGN (IMAGE_TLS_DIRECTORY64, Characteristics, 4) - TEST_FIELD_OFFSET(IMAGE_TLS_DIRECTORY64, Characteristics, 36) -} - -static void test_pack_IMAGE_VXD_HEADER(void) -{ - /* IMAGE_VXD_HEADER (pack 2) */ - TEST_TYPE_SIZE (IMAGE_VXD_HEADER, 196) - TEST_TYPE_ALIGN (IMAGE_VXD_HEADER, 2) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_magic, 2) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_magic, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_magic, 0) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_border, 1) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_border, 1) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_border, 2) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_worder, 1) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_worder, 1) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_worder, 3) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_level, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_level, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_level, 4) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_cpu, 2) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_cpu, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_cpu, 8) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_os, 2) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_os, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_os, 10) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ver, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ver, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ver, 12) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_mflags, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_mflags, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_mflags, 16) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_mpages, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_mpages, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_mpages, 20) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_startobj, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_startobj, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_startobj, 24) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_eip, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_eip, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_eip, 28) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_stackobj, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_stackobj, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_stackobj, 32) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_esp, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_esp, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_esp, 36) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_pagesize, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_pagesize, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_pagesize, 40) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_lastpagesize, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_lastpagesize, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_lastpagesize, 44) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_fixupsize, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_fixupsize, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_fixupsize, 48) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_fixupsum, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_fixupsum, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_fixupsum, 52) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ldrsize, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ldrsize, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ldrsize, 56) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ldrsum, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ldrsum, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ldrsum, 60) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_objtab, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_objtab, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_objtab, 64) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_objcnt, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_objcnt, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_objcnt, 68) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_objmap, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_objmap, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_objmap, 72) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_itermap, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_itermap, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_itermap, 76) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_rsrctab, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_rsrctab, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_rsrctab, 80) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_rsrccnt, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_rsrccnt, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_rsrccnt, 84) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_restab, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_restab, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_restab, 88) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_enttab, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_enttab, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_enttab, 92) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_dirtab, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_dirtab, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_dirtab, 96) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_dircnt, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_dircnt, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_dircnt, 100) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_fpagetab, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_fpagetab, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_fpagetab, 104) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_frectab, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_frectab, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_frectab, 108) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_impmod, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_impmod, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_impmod, 112) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_impmodcnt, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_impmodcnt, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_impmodcnt, 116) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_impproc, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_impproc, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_impproc, 120) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_pagesum, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_pagesum, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_pagesum, 124) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_datapage, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_datapage, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_datapage, 128) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_preload, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_preload, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_preload, 132) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_nrestab, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_nrestab, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_nrestab, 136) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_cbnrestab, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_cbnrestab, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_cbnrestab, 140) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_nressum, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_nressum, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_nressum, 144) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_autodata, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_autodata, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_autodata, 148) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_debuginfo, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_debuginfo, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_debuginfo, 152) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_debuglen, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_debuglen, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_debuglen, 156) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_instpreload, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_instpreload, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_instpreload, 160) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_instdemand, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_instdemand, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_instdemand, 164) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_heapsize, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_heapsize, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_heapsize, 168) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_res3, 12) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_res3, 1) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_res3, 172) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_winresoff, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_winresoff, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_winresoff, 184) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_winreslen, 4) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_winreslen, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_winreslen, 188) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_devid, 2) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_devid, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_devid, 192) - TEST_FIELD_SIZE (IMAGE_VXD_HEADER, e32_ddkver, 2) - TEST_FIELD_ALIGN (IMAGE_VXD_HEADER, e32_ddkver, 2) - TEST_FIELD_OFFSET(IMAGE_VXD_HEADER, e32_ddkver, 194) -} - -static void test_pack_IO_COUNTERS(void) -{ - /* IO_COUNTERS (pack 8) */ - TEST_TYPE_SIZE (IO_COUNTERS, 48) - TEST_TYPE_ALIGN (IO_COUNTERS, 8) - TEST_FIELD_SIZE (IO_COUNTERS, ReadOperationCount, 8) - TEST_FIELD_ALIGN (IO_COUNTERS, ReadOperationCount, 8) - TEST_FIELD_OFFSET(IO_COUNTERS, ReadOperationCount, 0) - TEST_FIELD_SIZE (IO_COUNTERS, WriteOperationCount, 8) - TEST_FIELD_ALIGN (IO_COUNTERS, WriteOperationCount, 8) - TEST_FIELD_OFFSET(IO_COUNTERS, WriteOperationCount, 8) - TEST_FIELD_SIZE (IO_COUNTERS, OtherOperationCount, 8) - TEST_FIELD_ALIGN (IO_COUNTERS, OtherOperationCount, 8) - TEST_FIELD_OFFSET(IO_COUNTERS, OtherOperationCount, 16) - TEST_FIELD_SIZE (IO_COUNTERS, ReadTransferCount, 8) - TEST_FIELD_ALIGN (IO_COUNTERS, ReadTransferCount, 8) - TEST_FIELD_OFFSET(IO_COUNTERS, ReadTransferCount, 24) - TEST_FIELD_SIZE (IO_COUNTERS, WriteTransferCount, 8) - TEST_FIELD_ALIGN (IO_COUNTERS, WriteTransferCount, 8) - TEST_FIELD_OFFSET(IO_COUNTERS, WriteTransferCount, 32) - TEST_FIELD_SIZE (IO_COUNTERS, OtherTransferCount, 8) - TEST_FIELD_ALIGN (IO_COUNTERS, OtherTransferCount, 8) - TEST_FIELD_OFFSET(IO_COUNTERS, OtherTransferCount, 40) -} - -static void test_pack_LANGID(void) -{ - /* LANGID */ - TEST_TYPE_SIZE (LANGID, 2) - TEST_TYPE_ALIGN (LANGID, 2) - TEST_TYPE_UNSIGNED(LANGID) -} - -static void test_pack_LARGE_INTEGER(void) -{ - /* LARGE_INTEGER */ -} - -static void test_pack_LCID(void) -{ - /* LCID */ - TEST_TYPE_SIZE (LCID, 4) - TEST_TYPE_ALIGN (LCID, 4) - TEST_TYPE_UNSIGNED(LCID) -} - -static void test_pack_LIST_ENTRY(void) -{ - /* LIST_ENTRY */ - TEST_TYPE_SIZE (LIST_ENTRY, 8) - TEST_TYPE_ALIGN (LIST_ENTRY, 4) - TEST_FIELD_SIZE (LIST_ENTRY, Flink, 4) - TEST_FIELD_ALIGN (LIST_ENTRY, Flink, 4) - TEST_FIELD_OFFSET(LIST_ENTRY, Flink, 0) - TEST_FIELD_SIZE (LIST_ENTRY, Blink, 4) - TEST_FIELD_ALIGN (LIST_ENTRY, Blink, 4) - TEST_FIELD_OFFSET(LIST_ENTRY, Blink, 4) -} - -static void test_pack_LONG(void) -{ - /* LONG */ - TEST_TYPE_SIZE (LONG, 4) - TEST_TYPE_ALIGN (LONG, 4) - TEST_TYPE_SIGNED(LONG) -} - -static void test_pack_LONGLONG(void) -{ - /* LONGLONG */ - TEST_TYPE_SIZE (LONGLONG, 8) - TEST_TYPE_ALIGN (LONGLONG, 8) - TEST_TYPE_SIGNED(LONGLONG) -} - -static void test_pack_LUID(void) -{ - /* LUID */ - TEST_TYPE_SIZE (LUID, 8) - TEST_TYPE_ALIGN (LUID, 4) - TEST_FIELD_SIZE (LUID, LowPart, 4) - TEST_FIELD_ALIGN (LUID, LowPart, 4) - TEST_FIELD_OFFSET(LUID, LowPart, 0) - TEST_FIELD_SIZE (LUID, HighPart, 4) - TEST_FIELD_ALIGN (LUID, HighPart, 4) - TEST_FIELD_OFFSET(LUID, HighPart, 4) -} - -static void test_pack_LUID_AND_ATTRIBUTES(void) -{ - /* LUID_AND_ATTRIBUTES (pack 4) */ - TEST_TYPE_SIZE (LUID_AND_ATTRIBUTES, 12) - TEST_TYPE_ALIGN (LUID_AND_ATTRIBUTES, 4) - TEST_FIELD_SIZE (LUID_AND_ATTRIBUTES, Luid, 8) - TEST_FIELD_ALIGN (LUID_AND_ATTRIBUTES, Luid, 4) - TEST_FIELD_OFFSET(LUID_AND_ATTRIBUTES, Luid, 0) - TEST_FIELD_SIZE (LUID_AND_ATTRIBUTES, Attributes, 4) - TEST_FIELD_ALIGN (LUID_AND_ATTRIBUTES, Attributes, 4) - TEST_FIELD_OFFSET(LUID_AND_ATTRIBUTES, Attributes, 8) -} - -static void test_pack_MEMORY_BASIC_INFORMATION(void) -{ - /* MEMORY_BASIC_INFORMATION */ - TEST_TYPE_SIZE (MEMORY_BASIC_INFORMATION, 28) - TEST_TYPE_ALIGN (MEMORY_BASIC_INFORMATION, 4) - TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, BaseAddress, 4) - TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, BaseAddress, 4) - TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, BaseAddress, 0) - TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, AllocationBase, 4) - TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, AllocationBase, 4) - TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, AllocationBase, 4) - TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, AllocationProtect, 4) - TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, AllocationProtect, 4) - TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, AllocationProtect, 8) - TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, RegionSize, 4) - TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, RegionSize, 4) - TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, RegionSize, 12) - TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, State, 4) - TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, State, 4) - TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, State, 16) - TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, Protect, 4) - TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, Protect, 4) - TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, Protect, 20) - TEST_FIELD_SIZE (MEMORY_BASIC_INFORMATION, Type, 4) - TEST_FIELD_ALIGN (MEMORY_BASIC_INFORMATION, Type, 4) - TEST_FIELD_OFFSET(MEMORY_BASIC_INFORMATION, Type, 24) -} - -static void test_pack_MESSAGE_RESOURCE_BLOCK(void) -{ - /* MESSAGE_RESOURCE_BLOCK */ - TEST_TYPE_SIZE (MESSAGE_RESOURCE_BLOCK, 12) - TEST_TYPE_ALIGN (MESSAGE_RESOURCE_BLOCK, 4) - TEST_FIELD_SIZE (MESSAGE_RESOURCE_BLOCK, LowId, 4) - TEST_FIELD_ALIGN (MESSAGE_RESOURCE_BLOCK, LowId, 4) - TEST_FIELD_OFFSET(MESSAGE_RESOURCE_BLOCK, LowId, 0) - TEST_FIELD_SIZE (MESSAGE_RESOURCE_BLOCK, HighId, 4) - TEST_FIELD_ALIGN (MESSAGE_RESOURCE_BLOCK, HighId, 4) - TEST_FIELD_OFFSET(MESSAGE_RESOURCE_BLOCK, HighId, 4) - TEST_FIELD_SIZE (MESSAGE_RESOURCE_BLOCK, OffsetToEntries, 4) - TEST_FIELD_ALIGN (MESSAGE_RESOURCE_BLOCK, OffsetToEntries, 4) - TEST_FIELD_OFFSET(MESSAGE_RESOURCE_BLOCK, OffsetToEntries, 8) -} - -static void test_pack_MESSAGE_RESOURCE_DATA(void) -{ - /* MESSAGE_RESOURCE_DATA */ - TEST_TYPE_SIZE (MESSAGE_RESOURCE_DATA, 16) - TEST_TYPE_ALIGN (MESSAGE_RESOURCE_DATA, 4) - TEST_FIELD_SIZE (MESSAGE_RESOURCE_DATA, NumberOfBlocks, 4) - TEST_FIELD_ALIGN (MESSAGE_RESOURCE_DATA, NumberOfBlocks, 4) - TEST_FIELD_OFFSET(MESSAGE_RESOURCE_DATA, NumberOfBlocks, 0) - TEST_FIELD_SIZE (MESSAGE_RESOURCE_DATA, Blocks, 12) - TEST_FIELD_ALIGN (MESSAGE_RESOURCE_DATA, Blocks, 4) - TEST_FIELD_OFFSET(MESSAGE_RESOURCE_DATA, Blocks, 4) -} - -static void test_pack_MESSAGE_RESOURCE_ENTRY(void) -{ - /* MESSAGE_RESOURCE_ENTRY */ - TEST_TYPE_SIZE (MESSAGE_RESOURCE_ENTRY, 6) - TEST_TYPE_ALIGN (MESSAGE_RESOURCE_ENTRY, 2) - TEST_FIELD_SIZE (MESSAGE_RESOURCE_ENTRY, Length, 2) - TEST_FIELD_ALIGN (MESSAGE_RESOURCE_ENTRY, Length, 2) - TEST_FIELD_OFFSET(MESSAGE_RESOURCE_ENTRY, Length, 0) - TEST_FIELD_SIZE (MESSAGE_RESOURCE_ENTRY, Flags, 2) - TEST_FIELD_ALIGN (MESSAGE_RESOURCE_ENTRY, Flags, 2) - TEST_FIELD_OFFSET(MESSAGE_RESOURCE_ENTRY, Flags, 2) - TEST_FIELD_SIZE (MESSAGE_RESOURCE_ENTRY, Text, 1) - TEST_FIELD_ALIGN (MESSAGE_RESOURCE_ENTRY, Text, 1) - TEST_FIELD_OFFSET(MESSAGE_RESOURCE_ENTRY, Text, 4) -} - -static void test_pack_NT_TIB(void) -{ - /* NT_TIB */ - TEST_FIELD_SIZE (NT_TIB, ExceptionList, 4) - TEST_FIELD_ALIGN (NT_TIB, ExceptionList, 4) - TEST_FIELD_OFFSET(NT_TIB, ExceptionList, 0) - TEST_FIELD_SIZE (NT_TIB, StackBase, 4) - TEST_FIELD_ALIGN (NT_TIB, StackBase, 4) - TEST_FIELD_OFFSET(NT_TIB, StackBase, 4) - TEST_FIELD_SIZE (NT_TIB, StackLimit, 4) - TEST_FIELD_ALIGN (NT_TIB, StackLimit, 4) - TEST_FIELD_OFFSET(NT_TIB, StackLimit, 8) - TEST_FIELD_SIZE (NT_TIB, SubSystemTib, 4) - TEST_FIELD_ALIGN (NT_TIB, SubSystemTib, 4) - TEST_FIELD_OFFSET(NT_TIB, SubSystemTib, 12) -} - -static void test_pack_OBJECT_TYPE_LIST(void) -{ - /* OBJECT_TYPE_LIST */ - TEST_TYPE_SIZE (OBJECT_TYPE_LIST, 8) - TEST_TYPE_ALIGN (OBJECT_TYPE_LIST, 4) - TEST_FIELD_SIZE (OBJECT_TYPE_LIST, Level, 2) - TEST_FIELD_ALIGN (OBJECT_TYPE_LIST, Level, 2) - TEST_FIELD_OFFSET(OBJECT_TYPE_LIST, Level, 0) - TEST_FIELD_SIZE (OBJECT_TYPE_LIST, Sbz, 2) - TEST_FIELD_ALIGN (OBJECT_TYPE_LIST, Sbz, 2) - TEST_FIELD_OFFSET(OBJECT_TYPE_LIST, Sbz, 2) - TEST_FIELD_SIZE (OBJECT_TYPE_LIST, ObjectType, 4) - TEST_FIELD_ALIGN (OBJECT_TYPE_LIST, ObjectType, 4) - TEST_FIELD_OFFSET(OBJECT_TYPE_LIST, ObjectType, 4) -} - -static void test_pack_PACCESS_ALLOWED_ACE(void) -{ - /* PACCESS_ALLOWED_ACE */ - TEST_TYPE_SIZE (PACCESS_ALLOWED_ACE, 4) - TEST_TYPE_ALIGN (PACCESS_ALLOWED_ACE, 4) - TEST_TARGET_SIZE (PACCESS_ALLOWED_ACE, 12) - TEST_TARGET_ALIGN(PACCESS_ALLOWED_ACE, 4) -} - -static void test_pack_PACCESS_DENIED_ACE(void) -{ - /* PACCESS_DENIED_ACE */ - TEST_TYPE_SIZE (PACCESS_DENIED_ACE, 4) - TEST_TYPE_ALIGN (PACCESS_DENIED_ACE, 4) - TEST_TARGET_SIZE (PACCESS_DENIED_ACE, 12) - TEST_TARGET_ALIGN(PACCESS_DENIED_ACE, 4) -} - -static void test_pack_PACCESS_TOKEN(void) -{ - /* PACCESS_TOKEN */ - TEST_TYPE_SIZE (PACCESS_TOKEN, 4) - TEST_TYPE_ALIGN (PACCESS_TOKEN, 4) -} - -static void test_pack_PACE_HEADER(void) -{ - /* PACE_HEADER */ - TEST_TYPE_SIZE (PACE_HEADER, 4) - TEST_TYPE_ALIGN (PACE_HEADER, 4) - TEST_TARGET_SIZE (PACE_HEADER, 4) - TEST_TARGET_ALIGN(PACE_HEADER, 2) -} - -static void test_pack_PACL(void) -{ - /* PACL */ - TEST_TYPE_SIZE (PACL, 4) - TEST_TYPE_ALIGN (PACL, 4) - TEST_TARGET_SIZE (PACL, 8) - TEST_TARGET_ALIGN(PACL, 2) -} - -static void test_pack_PACL_REVISION_INFORMATION(void) -{ - /* PACL_REVISION_INFORMATION */ - TEST_TYPE_SIZE (PACL_REVISION_INFORMATION, 4) - TEST_TYPE_ALIGN (PACL_REVISION_INFORMATION, 4) - TEST_TARGET_SIZE (PACL_REVISION_INFORMATION, 4) - TEST_TARGET_ALIGN(PACL_REVISION_INFORMATION, 4) -} - -static void test_pack_PACL_SIZE_INFORMATION(void) -{ - /* PACL_SIZE_INFORMATION */ - TEST_TYPE_SIZE (PACL_SIZE_INFORMATION, 4) - TEST_TYPE_ALIGN (PACL_SIZE_INFORMATION, 4) - TEST_TARGET_SIZE (PACL_SIZE_INFORMATION, 12) - TEST_TARGET_ALIGN(PACL_SIZE_INFORMATION, 4) -} - -static void test_pack_PCCH(void) -{ - /* PCCH */ - TEST_TYPE_SIZE (PCCH, 4) - TEST_TYPE_ALIGN (PCCH, 4) - TEST_TARGET_SIZE (PCCH, 1) - TEST_TARGET_ALIGN(PCCH, 1) -} - -static void test_pack_PCH(void) -{ - /* PCH */ - TEST_TYPE_SIZE (PCH, 4) - TEST_TYPE_ALIGN (PCH, 4) - TEST_TARGET_SIZE (PCH, 1) - TEST_TARGET_ALIGN(PCH, 1) -} - -static void test_pack_PCSTR(void) -{ - /* PCSTR */ - TEST_TYPE_SIZE (PCSTR, 4) - TEST_TYPE_ALIGN (PCSTR, 4) - TEST_TARGET_SIZE (PCSTR, 1) - TEST_TARGET_ALIGN(PCSTR, 1) -} - -static void test_pack_PCTSTR(void) -{ - /* PCTSTR */ - TEST_TYPE_SIZE (PCTSTR, 4) - TEST_TYPE_ALIGN (PCTSTR, 4) -} - -static void test_pack_PCWCH(void) -{ - /* PCWCH */ - TEST_TYPE_SIZE (PCWCH, 4) - TEST_TYPE_ALIGN (PCWCH, 4) - TEST_TARGET_SIZE (PCWCH, 2) - TEST_TARGET_ALIGN(PCWCH, 2) -} - -static void test_pack_PCWSTR(void) -{ - /* PCWSTR */ - TEST_TYPE_SIZE (PCWSTR, 4) - TEST_TYPE_ALIGN (PCWSTR, 4) - TEST_TARGET_SIZE (PCWSTR, 2) - TEST_TARGET_ALIGN(PCWSTR, 2) -} - -static void test_pack_PEXCEPTION_POINTERS(void) -{ - /* PEXCEPTION_POINTERS */ - TEST_TYPE_SIZE (PEXCEPTION_POINTERS, 4) - TEST_TYPE_ALIGN (PEXCEPTION_POINTERS, 4) - TEST_TARGET_SIZE (PEXCEPTION_POINTERS, 8) - TEST_TARGET_ALIGN(PEXCEPTION_POINTERS, 4) -} - -static void test_pack_PEXCEPTION_RECORD(void) -{ - /* PEXCEPTION_RECORD */ - TEST_TYPE_SIZE (PEXCEPTION_RECORD, 4) - TEST_TYPE_ALIGN (PEXCEPTION_RECORD, 4) - TEST_TARGET_SIZE (PEXCEPTION_RECORD, 80) - TEST_TARGET_ALIGN(PEXCEPTION_RECORD, 4) -} - -static void test_pack_PFLOATING_SAVE_AREA(void) -{ - /* PFLOATING_SAVE_AREA */ - TEST_TYPE_SIZE (PFLOATING_SAVE_AREA, 4) - TEST_TYPE_ALIGN (PFLOATING_SAVE_AREA, 4) - TEST_TARGET_SIZE (PFLOATING_SAVE_AREA, 112) - TEST_TARGET_ALIGN(PFLOATING_SAVE_AREA, 4) -} - -static void test_pack_PFPO_DATA(void) -{ - /* PFPO_DATA */ - TEST_TYPE_SIZE (PFPO_DATA, 4) - TEST_TYPE_ALIGN (PFPO_DATA, 4) - TEST_TARGET_SIZE (PFPO_DATA, 16) - TEST_TARGET_ALIGN(PFPO_DATA, 4) -} - -static void test_pack_PGENERIC_MAPPING(void) -{ - /* PGENERIC_MAPPING */ - TEST_TYPE_SIZE (PGENERIC_MAPPING, 4) - TEST_TYPE_ALIGN (PGENERIC_MAPPING, 4) - TEST_TARGET_SIZE (PGENERIC_MAPPING, 16) - TEST_TARGET_ALIGN(PGENERIC_MAPPING, 4) -} - -static void test_pack_PHANDLE(void) -{ - /* PHANDLE */ - TEST_TYPE_SIZE (PHANDLE, 4) - TEST_TYPE_ALIGN (PHANDLE, 4) - TEST_TARGET_SIZE (PHANDLE, 4) - TEST_TARGET_ALIGN(PHANDLE, 4) -} - -static void test_pack_PIMAGE_ARCHIVE_MEMBER_HEADER(void) -{ - /* PIMAGE_ARCHIVE_MEMBER_HEADER */ - TEST_TYPE_SIZE (PIMAGE_ARCHIVE_MEMBER_HEADER, 4) - TEST_TYPE_ALIGN (PIMAGE_ARCHIVE_MEMBER_HEADER, 4) - TEST_TARGET_SIZE (PIMAGE_ARCHIVE_MEMBER_HEADER, 60) - TEST_TARGET_ALIGN(PIMAGE_ARCHIVE_MEMBER_HEADER, 1) -} - -static void test_pack_PIMAGE_AUX_SYMBOL(void) -{ - /* PIMAGE_AUX_SYMBOL */ - TEST_TYPE_SIZE (PIMAGE_AUX_SYMBOL, 4) - TEST_TYPE_ALIGN (PIMAGE_AUX_SYMBOL, 4) -} - -static void test_pack_PIMAGE_BASE_RELOCATION(void) -{ - /* PIMAGE_BASE_RELOCATION */ - TEST_TYPE_SIZE (PIMAGE_BASE_RELOCATION, 4) - TEST_TYPE_ALIGN (PIMAGE_BASE_RELOCATION, 4) - TEST_TARGET_SIZE (PIMAGE_BASE_RELOCATION, 8) - TEST_TARGET_ALIGN(PIMAGE_BASE_RELOCATION, 4) -} - -static void test_pack_PIMAGE_BOUND_FORWARDER_REF(void) -{ - /* PIMAGE_BOUND_FORWARDER_REF */ - TEST_TYPE_SIZE (PIMAGE_BOUND_FORWARDER_REF, 4) - TEST_TYPE_ALIGN (PIMAGE_BOUND_FORWARDER_REF, 4) - TEST_TARGET_SIZE (PIMAGE_BOUND_FORWARDER_REF, 8) - TEST_TARGET_ALIGN(PIMAGE_BOUND_FORWARDER_REF, 4) -} - -static void test_pack_PIMAGE_BOUND_IMPORT_DESCRIPTOR(void) -{ - /* PIMAGE_BOUND_IMPORT_DESCRIPTOR */ - TEST_TYPE_SIZE (PIMAGE_BOUND_IMPORT_DESCRIPTOR, 4) - TEST_TYPE_ALIGN (PIMAGE_BOUND_IMPORT_DESCRIPTOR, 4) - TEST_TARGET_SIZE (PIMAGE_BOUND_IMPORT_DESCRIPTOR, 8) - TEST_TARGET_ALIGN(PIMAGE_BOUND_IMPORT_DESCRIPTOR, 4) -} - -static void test_pack_PIMAGE_COFF_SYMBOLS_HEADER(void) -{ - /* PIMAGE_COFF_SYMBOLS_HEADER */ - TEST_TYPE_SIZE (PIMAGE_COFF_SYMBOLS_HEADER, 4) - TEST_TYPE_ALIGN (PIMAGE_COFF_SYMBOLS_HEADER, 4) - TEST_TARGET_SIZE (PIMAGE_COFF_SYMBOLS_HEADER, 32) - TEST_TARGET_ALIGN(PIMAGE_COFF_SYMBOLS_HEADER, 4) -} - -static void test_pack_PIMAGE_DATA_DIRECTORY(void) -{ - /* PIMAGE_DATA_DIRECTORY */ - TEST_TYPE_SIZE (PIMAGE_DATA_DIRECTORY, 4) - TEST_TYPE_ALIGN (PIMAGE_DATA_DIRECTORY, 4) - TEST_TARGET_SIZE (PIMAGE_DATA_DIRECTORY, 8) - TEST_TARGET_ALIGN(PIMAGE_DATA_DIRECTORY, 4) -} - -static void test_pack_PIMAGE_DEBUG_DIRECTORY(void) -{ - /* PIMAGE_DEBUG_DIRECTORY */ - TEST_TYPE_SIZE (PIMAGE_DEBUG_DIRECTORY, 4) - TEST_TYPE_ALIGN (PIMAGE_DEBUG_DIRECTORY, 4) - TEST_TARGET_SIZE (PIMAGE_DEBUG_DIRECTORY, 28) - TEST_TARGET_ALIGN(PIMAGE_DEBUG_DIRECTORY, 4) -} - -static void test_pack_PIMAGE_DEBUG_MISC(void) -{ - /* PIMAGE_DEBUG_MISC */ - TEST_TYPE_SIZE (PIMAGE_DEBUG_MISC, 4) - TEST_TYPE_ALIGN (PIMAGE_DEBUG_MISC, 4) - TEST_TARGET_SIZE (PIMAGE_DEBUG_MISC, 16) - TEST_TARGET_ALIGN(PIMAGE_DEBUG_MISC, 4) -} - -static void test_pack_PIMAGE_DOS_HEADER(void) -{ - /* PIMAGE_DOS_HEADER */ - TEST_TYPE_SIZE (PIMAGE_DOS_HEADER, 4) - TEST_TYPE_ALIGN (PIMAGE_DOS_HEADER, 4) - TEST_TARGET_SIZE (PIMAGE_DOS_HEADER, 64) - TEST_TARGET_ALIGN(PIMAGE_DOS_HEADER, 2) -} - -static void test_pack_PIMAGE_EXPORT_DIRECTORY(void) -{ - /* PIMAGE_EXPORT_DIRECTORY */ - TEST_TYPE_SIZE (PIMAGE_EXPORT_DIRECTORY, 4) - TEST_TYPE_ALIGN (PIMAGE_EXPORT_DIRECTORY, 4) - TEST_TARGET_SIZE (PIMAGE_EXPORT_DIRECTORY, 40) - TEST_TARGET_ALIGN(PIMAGE_EXPORT_DIRECTORY, 4) -} - -static void test_pack_PIMAGE_FILE_HEADER(void) -{ - /* PIMAGE_FILE_HEADER */ - TEST_TYPE_SIZE (PIMAGE_FILE_HEADER, 4) - TEST_TYPE_ALIGN (PIMAGE_FILE_HEADER, 4) - TEST_TARGET_SIZE (PIMAGE_FILE_HEADER, 20) - TEST_TARGET_ALIGN(PIMAGE_FILE_HEADER, 4) -} - -static void test_pack_PIMAGE_FUNCTION_ENTRY(void) -{ - /* PIMAGE_FUNCTION_ENTRY */ - TEST_TYPE_SIZE (PIMAGE_FUNCTION_ENTRY, 4) - TEST_TYPE_ALIGN (PIMAGE_FUNCTION_ENTRY, 4) - TEST_TARGET_SIZE (PIMAGE_FUNCTION_ENTRY, 12) - TEST_TARGET_ALIGN(PIMAGE_FUNCTION_ENTRY, 4) -} - -static void test_pack_PIMAGE_IMPORT_BY_NAME(void) -{ - /* PIMAGE_IMPORT_BY_NAME */ - TEST_TYPE_SIZE (PIMAGE_IMPORT_BY_NAME, 4) - TEST_TYPE_ALIGN (PIMAGE_IMPORT_BY_NAME, 4) - TEST_TARGET_SIZE (PIMAGE_IMPORT_BY_NAME, 4) - TEST_TARGET_ALIGN(PIMAGE_IMPORT_BY_NAME, 2) -} - -static void test_pack_PIMAGE_IMPORT_DESCRIPTOR(void) -{ - /* PIMAGE_IMPORT_DESCRIPTOR */ - TEST_TYPE_SIZE (PIMAGE_IMPORT_DESCRIPTOR, 4) - TEST_TYPE_ALIGN (PIMAGE_IMPORT_DESCRIPTOR, 4) -} - -static void test_pack_PIMAGE_LINENUMBER(void) -{ - /* PIMAGE_LINENUMBER */ - TEST_TYPE_SIZE (PIMAGE_LINENUMBER, 4) - TEST_TYPE_ALIGN (PIMAGE_LINENUMBER, 4) -} - -static void test_pack_PIMAGE_LOAD_CONFIG_DIRECTORY(void) -{ - /* PIMAGE_LOAD_CONFIG_DIRECTORY */ - TEST_TYPE_SIZE (PIMAGE_LOAD_CONFIG_DIRECTORY, 4) - TEST_TYPE_ALIGN (PIMAGE_LOAD_CONFIG_DIRECTORY, 4) - TEST_TARGET_SIZE (PIMAGE_LOAD_CONFIG_DIRECTORY, 72) - TEST_TARGET_ALIGN(PIMAGE_LOAD_CONFIG_DIRECTORY, 4) -} - -static void test_pack_PIMAGE_NT_HEADERS(void) -{ - /* PIMAGE_NT_HEADERS */ - TEST_TYPE_SIZE (PIMAGE_NT_HEADERS, 4) - TEST_TYPE_ALIGN (PIMAGE_NT_HEADERS, 4) -} - -static void test_pack_PIMAGE_NT_HEADERS32(void) -{ - /* PIMAGE_NT_HEADERS32 */ - TEST_TYPE_SIZE (PIMAGE_NT_HEADERS32, 4) - TEST_TYPE_ALIGN (PIMAGE_NT_HEADERS32, 4) - TEST_TARGET_SIZE (PIMAGE_NT_HEADERS32, 248) - TEST_TARGET_ALIGN(PIMAGE_NT_HEADERS32, 4) -} - -static void test_pack_PIMAGE_NT_HEADERS64(void) -{ - /* PIMAGE_NT_HEADERS64 */ - TEST_TYPE_SIZE (PIMAGE_NT_HEADERS64, 4) - TEST_TYPE_ALIGN (PIMAGE_NT_HEADERS64, 4) - TEST_TARGET_SIZE (PIMAGE_NT_HEADERS64, 264) - TEST_TARGET_ALIGN(PIMAGE_NT_HEADERS64, 8) -} - -static void test_pack_PIMAGE_OPTIONAL_HEADER(void) -{ - /* PIMAGE_OPTIONAL_HEADER */ - TEST_TYPE_SIZE (PIMAGE_OPTIONAL_HEADER, 4) - TEST_TYPE_ALIGN (PIMAGE_OPTIONAL_HEADER, 4) -} - -static void test_pack_PIMAGE_OPTIONAL_HEADER32(void) -{ - /* PIMAGE_OPTIONAL_HEADER32 */ - TEST_TYPE_SIZE (PIMAGE_OPTIONAL_HEADER32, 4) - TEST_TYPE_ALIGN (PIMAGE_OPTIONAL_HEADER32, 4) - TEST_TARGET_SIZE (PIMAGE_OPTIONAL_HEADER32, 224) - TEST_TARGET_ALIGN(PIMAGE_OPTIONAL_HEADER32, 4) -} - -static void test_pack_PIMAGE_OPTIONAL_HEADER64(void) -{ - /* PIMAGE_OPTIONAL_HEADER64 */ - TEST_TYPE_SIZE (PIMAGE_OPTIONAL_HEADER64, 4) - TEST_TYPE_ALIGN (PIMAGE_OPTIONAL_HEADER64, 4) - TEST_TARGET_SIZE (PIMAGE_OPTIONAL_HEADER64, 240) - TEST_TARGET_ALIGN(PIMAGE_OPTIONAL_HEADER64, 8) -} - -static void test_pack_PIMAGE_OS2_HEADER(void) -{ - /* PIMAGE_OS2_HEADER */ - TEST_TYPE_SIZE (PIMAGE_OS2_HEADER, 4) - TEST_TYPE_ALIGN (PIMAGE_OS2_HEADER, 4) - TEST_TARGET_SIZE (PIMAGE_OS2_HEADER, 64) - TEST_TARGET_ALIGN(PIMAGE_OS2_HEADER, 2) -} - -static void test_pack_PIMAGE_RELOCATION(void) -{ - /* PIMAGE_RELOCATION */ - TEST_TYPE_SIZE (PIMAGE_RELOCATION, 4) - TEST_TYPE_ALIGN (PIMAGE_RELOCATION, 4) -} - -static void test_pack_PIMAGE_RESOURCE_DATA_ENTRY(void) -{ - /* PIMAGE_RESOURCE_DATA_ENTRY */ - TEST_TYPE_SIZE (PIMAGE_RESOURCE_DATA_ENTRY, 4) - TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DATA_ENTRY, 4) - TEST_TARGET_SIZE (PIMAGE_RESOURCE_DATA_ENTRY, 16) - TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DATA_ENTRY, 4) -} - -static void test_pack_PIMAGE_RESOURCE_DIRECTORY(void) -{ - /* PIMAGE_RESOURCE_DIRECTORY */ - TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIRECTORY, 4) - TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIRECTORY, 4) - TEST_TARGET_SIZE (PIMAGE_RESOURCE_DIRECTORY, 16) - TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DIRECTORY, 4) -} - -static void test_pack_PIMAGE_RESOURCE_DIRECTORY_ENTRY(void) -{ - /* PIMAGE_RESOURCE_DIRECTORY_ENTRY */ - TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIRECTORY_ENTRY, 4) - TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIRECTORY_ENTRY, 4) -} - -static void test_pack_PIMAGE_RESOURCE_DIRECTORY_STRING(void) -{ - /* PIMAGE_RESOURCE_DIRECTORY_STRING */ - TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIRECTORY_STRING, 4) - TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIRECTORY_STRING, 4) - TEST_TARGET_SIZE (PIMAGE_RESOURCE_DIRECTORY_STRING, 4) - TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DIRECTORY_STRING, 2) -} - -static void test_pack_PIMAGE_RESOURCE_DIR_STRING_U(void) -{ - /* PIMAGE_RESOURCE_DIR_STRING_U */ - TEST_TYPE_SIZE (PIMAGE_RESOURCE_DIR_STRING_U, 4) - TEST_TYPE_ALIGN (PIMAGE_RESOURCE_DIR_STRING_U, 4) - TEST_TARGET_SIZE (PIMAGE_RESOURCE_DIR_STRING_U, 4) - TEST_TARGET_ALIGN(PIMAGE_RESOURCE_DIR_STRING_U, 2) -} - -static void test_pack_PIMAGE_SECTION_HEADER(void) -{ - /* PIMAGE_SECTION_HEADER */ - TEST_TYPE_SIZE (PIMAGE_SECTION_HEADER, 4) - TEST_TYPE_ALIGN (PIMAGE_SECTION_HEADER, 4) -} - -static void test_pack_PIMAGE_SEPARATE_DEBUG_HEADER(void) -{ - /* PIMAGE_SEPARATE_DEBUG_HEADER */ - TEST_TYPE_SIZE (PIMAGE_SEPARATE_DEBUG_HEADER, 4) - TEST_TYPE_ALIGN (PIMAGE_SEPARATE_DEBUG_HEADER, 4) - TEST_TARGET_SIZE (PIMAGE_SEPARATE_DEBUG_HEADER, 48) - TEST_TARGET_ALIGN(PIMAGE_SEPARATE_DEBUG_HEADER, 4) -} - -static void test_pack_PIMAGE_SYMBOL(void) -{ - /* PIMAGE_SYMBOL */ - TEST_TYPE_SIZE (PIMAGE_SYMBOL, 4) - TEST_TYPE_ALIGN (PIMAGE_SYMBOL, 4) -} - -static void test_pack_PIMAGE_THUNK_DATA(void) -{ - /* PIMAGE_THUNK_DATA */ - TEST_TYPE_SIZE (PIMAGE_THUNK_DATA, 4) - TEST_TYPE_ALIGN (PIMAGE_THUNK_DATA, 4) -} - -static void test_pack_PIMAGE_TLS_CALLBACK(void) -{ - /* PIMAGE_TLS_CALLBACK */ - TEST_TYPE_SIZE (PIMAGE_TLS_CALLBACK, 4) - TEST_TYPE_ALIGN (PIMAGE_TLS_CALLBACK, 4) -} - -static void test_pack_PIMAGE_TLS_DIRECTORY(void) -{ - /* PIMAGE_TLS_DIRECTORY */ - TEST_TYPE_SIZE (PIMAGE_TLS_DIRECTORY, 4) - TEST_TYPE_ALIGN (PIMAGE_TLS_DIRECTORY, 4) -} - -static void test_pack_PIMAGE_VXD_HEADER(void) -{ - /* PIMAGE_VXD_HEADER */ - TEST_TYPE_SIZE (PIMAGE_VXD_HEADER, 4) - TEST_TYPE_ALIGN (PIMAGE_VXD_HEADER, 4) - TEST_TARGET_SIZE (PIMAGE_VXD_HEADER, 196) - TEST_TARGET_ALIGN(PIMAGE_VXD_HEADER, 2) -} - -static void test_pack_PIO_COUNTERS(void) -{ - /* PIO_COUNTERS */ - TEST_TYPE_SIZE (PIO_COUNTERS, 4) - TEST_TYPE_ALIGN (PIO_COUNTERS, 4) - TEST_TARGET_SIZE (PIO_COUNTERS, 48) - TEST_TARGET_ALIGN(PIO_COUNTERS, 8) -} - -static void test_pack_PISECURITY_DESCRIPTOR(void) -{ - /* PISECURITY_DESCRIPTOR */ - TEST_TYPE_SIZE (PISECURITY_DESCRIPTOR, 4) - TEST_TYPE_ALIGN (PISECURITY_DESCRIPTOR, 4) - TEST_TARGET_SIZE (PISECURITY_DESCRIPTOR, 20) - TEST_TARGET_ALIGN(PISECURITY_DESCRIPTOR, 4) -} - -static void test_pack_PISECURITY_DESCRIPTOR_RELATIVE(void) -{ - /* PISECURITY_DESCRIPTOR_RELATIVE */ - TEST_TYPE_SIZE (PISECURITY_DESCRIPTOR_RELATIVE, 4) - TEST_TYPE_ALIGN (PISECURITY_DESCRIPTOR_RELATIVE, 4) - TEST_TARGET_SIZE (PISECURITY_DESCRIPTOR_RELATIVE, 20) - TEST_TARGET_ALIGN(PISECURITY_DESCRIPTOR_RELATIVE, 4) -} - -static void test_pack_PISID(void) -{ - /* PISID */ - TEST_TYPE_SIZE (PISID, 4) - TEST_TYPE_ALIGN (PISID, 4) - TEST_TARGET_SIZE (PISID, 12) - TEST_TARGET_ALIGN(PISID, 4) -} - -static void test_pack_PLARGE_INTEGER(void) -{ - /* PLARGE_INTEGER */ - TEST_TYPE_SIZE (PLARGE_INTEGER, 4) - TEST_TYPE_ALIGN (PLARGE_INTEGER, 4) -} - -static void test_pack_PLIST_ENTRY(void) -{ - /* PLIST_ENTRY */ - TEST_TYPE_SIZE (PLIST_ENTRY, 4) - TEST_TYPE_ALIGN (PLIST_ENTRY, 4) - TEST_TARGET_SIZE (PLIST_ENTRY, 8) - TEST_TARGET_ALIGN(PLIST_ENTRY, 4) -} - -static void test_pack_PLUID(void) -{ - /* PLUID */ - TEST_TYPE_SIZE (PLUID, 4) - TEST_TYPE_ALIGN (PLUID, 4) - TEST_TARGET_SIZE (PLUID, 8) - TEST_TARGET_ALIGN(PLUID, 4) -} - -static void test_pack_PLUID_AND_ATTRIBUTES(void) -{ - /* PLUID_AND_ATTRIBUTES */ - TEST_TYPE_SIZE (PLUID_AND_ATTRIBUTES, 4) - TEST_TYPE_ALIGN (PLUID_AND_ATTRIBUTES, 4) - TEST_TARGET_SIZE (PLUID_AND_ATTRIBUTES, 12) - TEST_TARGET_ALIGN(PLUID_AND_ATTRIBUTES, 4) -} - -static void test_pack_PMEMORY_BASIC_INFORMATION(void) -{ - /* PMEMORY_BASIC_INFORMATION */ - TEST_TYPE_SIZE (PMEMORY_BASIC_INFORMATION, 4) - TEST_TYPE_ALIGN (PMEMORY_BASIC_INFORMATION, 4) - TEST_TARGET_SIZE (PMEMORY_BASIC_INFORMATION, 28) - TEST_TARGET_ALIGN(PMEMORY_BASIC_INFORMATION, 4) -} - -static void test_pack_PMESSAGE_RESOURCE_BLOCK(void) -{ - /* PMESSAGE_RESOURCE_BLOCK */ - TEST_TYPE_SIZE (PMESSAGE_RESOURCE_BLOCK, 4) - TEST_TYPE_ALIGN (PMESSAGE_RESOURCE_BLOCK, 4) - TEST_TARGET_SIZE (PMESSAGE_RESOURCE_BLOCK, 12) - TEST_TARGET_ALIGN(PMESSAGE_RESOURCE_BLOCK, 4) -} - -static void test_pack_PMESSAGE_RESOURCE_DATA(void) -{ - /* PMESSAGE_RESOURCE_DATA */ - TEST_TYPE_SIZE (PMESSAGE_RESOURCE_DATA, 4) - TEST_TYPE_ALIGN (PMESSAGE_RESOURCE_DATA, 4) - TEST_TARGET_SIZE (PMESSAGE_RESOURCE_DATA, 16) - TEST_TARGET_ALIGN(PMESSAGE_RESOURCE_DATA, 4) -} - -static void test_pack_PMESSAGE_RESOURCE_ENTRY(void) -{ - /* PMESSAGE_RESOURCE_ENTRY */ - TEST_TYPE_SIZE (PMESSAGE_RESOURCE_ENTRY, 4) - TEST_TYPE_ALIGN (PMESSAGE_RESOURCE_ENTRY, 4) - TEST_TARGET_SIZE (PMESSAGE_RESOURCE_ENTRY, 6) - TEST_TARGET_ALIGN(PMESSAGE_RESOURCE_ENTRY, 2) -} - -static void test_pack_PNT_TIB(void) -{ - /* PNT_TIB */ - TEST_TYPE_SIZE (PNT_TIB, 4) - TEST_TYPE_ALIGN (PNT_TIB, 4) -} - -static void test_pack_POBJECT_TYPE_LIST(void) -{ - /* POBJECT_TYPE_LIST */ - TEST_TYPE_SIZE (POBJECT_TYPE_LIST, 4) - TEST_TYPE_ALIGN (POBJECT_TYPE_LIST, 4) - TEST_TARGET_SIZE (POBJECT_TYPE_LIST, 8) - TEST_TARGET_ALIGN(POBJECT_TYPE_LIST, 4) -} - -static void test_pack_PPRIVILEGE_SET(void) -{ - /* PPRIVILEGE_SET */ - TEST_TYPE_SIZE (PPRIVILEGE_SET, 4) - TEST_TYPE_ALIGN (PPRIVILEGE_SET, 4) - TEST_TARGET_SIZE (PPRIVILEGE_SET, 20) - TEST_TARGET_ALIGN(PPRIVILEGE_SET, 4) -} - -static void test_pack_PRIVILEGE_SET(void) -{ - /* PRIVILEGE_SET */ - TEST_TYPE_SIZE (PRIVILEGE_SET, 20) - TEST_TYPE_ALIGN (PRIVILEGE_SET, 4) - TEST_FIELD_SIZE (PRIVILEGE_SET, PrivilegeCount, 4) - TEST_FIELD_ALIGN (PRIVILEGE_SET, PrivilegeCount, 4) - TEST_FIELD_OFFSET(PRIVILEGE_SET, PrivilegeCount, 0) - TEST_FIELD_SIZE (PRIVILEGE_SET, Control, 4) - TEST_FIELD_ALIGN (PRIVILEGE_SET, Control, 4) - TEST_FIELD_OFFSET(PRIVILEGE_SET, Control, 4) - TEST_FIELD_SIZE (PRIVILEGE_SET, Privilege, 12) - TEST_FIELD_ALIGN (PRIVILEGE_SET, Privilege, 4) - TEST_FIELD_OFFSET(PRIVILEGE_SET, Privilege, 8) -} - -static void test_pack_PRLIST_ENTRY(void) -{ - /* PRLIST_ENTRY */ - TEST_TYPE_SIZE (PRLIST_ENTRY, 4) - TEST_TYPE_ALIGN (PRLIST_ENTRY, 4) - TEST_TARGET_SIZE (PRLIST_ENTRY, 8) - TEST_TARGET_ALIGN(PRLIST_ENTRY, 4) -} - -static void test_pack_PRTL_CRITICAL_SECTION(void) -{ - /* PRTL_CRITICAL_SECTION */ - TEST_TYPE_SIZE (PRTL_CRITICAL_SECTION, 4) - TEST_TYPE_ALIGN (PRTL_CRITICAL_SECTION, 4) - TEST_TARGET_SIZE (PRTL_CRITICAL_SECTION, 24) - TEST_TARGET_ALIGN(PRTL_CRITICAL_SECTION, 4) -} - -static void test_pack_PRTL_CRITICAL_SECTION_DEBUG(void) -{ - /* PRTL_CRITICAL_SECTION_DEBUG */ - TEST_TYPE_SIZE (PRTL_CRITICAL_SECTION_DEBUG, 4) - TEST_TYPE_ALIGN (PRTL_CRITICAL_SECTION_DEBUG, 4) -} - -static void test_pack_PRTL_OSVERSIONINFOEXW(void) -{ - /* PRTL_OSVERSIONINFOEXW */ - TEST_TYPE_SIZE (PRTL_OSVERSIONINFOEXW, 4) - TEST_TYPE_ALIGN (PRTL_OSVERSIONINFOEXW, 4) - TEST_TARGET_SIZE (PRTL_OSVERSIONINFOEXW, 284) - TEST_TARGET_ALIGN(PRTL_OSVERSIONINFOEXW, 4) -} - -static void test_pack_PRTL_OSVERSIONINFOW(void) -{ - /* PRTL_OSVERSIONINFOW */ - TEST_TYPE_SIZE (PRTL_OSVERSIONINFOW, 4) - TEST_TYPE_ALIGN (PRTL_OSVERSIONINFOW, 4) - TEST_TARGET_SIZE (PRTL_OSVERSIONINFOW, 276) - TEST_TARGET_ALIGN(PRTL_OSVERSIONINFOW, 4) -} - -static void test_pack_PRTL_RESOURCE_DEBUG(void) -{ - /* PRTL_RESOURCE_DEBUG */ - TEST_TYPE_SIZE (PRTL_RESOURCE_DEBUG, 4) - TEST_TYPE_ALIGN (PRTL_RESOURCE_DEBUG, 4) -} - -static void test_pack_PSECURITY_DESCRIPTOR(void) -{ - /* PSECURITY_DESCRIPTOR */ - TEST_TYPE_SIZE (PSECURITY_DESCRIPTOR, 4) - TEST_TYPE_ALIGN (PSECURITY_DESCRIPTOR, 4) -} - -static void test_pack_PSECURITY_QUALITY_OF_SERVICE(void) -{ - /* PSECURITY_QUALITY_OF_SERVICE */ - TEST_TYPE_SIZE (PSECURITY_QUALITY_OF_SERVICE, 4) - TEST_TYPE_ALIGN (PSECURITY_QUALITY_OF_SERVICE, 4) -} - -static void test_pack_PSID(void) -{ - /* PSID */ - TEST_TYPE_SIZE (PSID, 4) - TEST_TYPE_ALIGN (PSID, 4) -} - -static void test_pack_PSID_IDENTIFIER_AUTHORITY(void) -{ - /* PSID_IDENTIFIER_AUTHORITY */ - TEST_TYPE_SIZE (PSID_IDENTIFIER_AUTHORITY, 4) - TEST_TYPE_ALIGN (PSID_IDENTIFIER_AUTHORITY, 4) - TEST_TARGET_SIZE (PSID_IDENTIFIER_AUTHORITY, 6) - TEST_TARGET_ALIGN(PSID_IDENTIFIER_AUTHORITY, 1) -} - -static void test_pack_PSINGLE_LIST_ENTRY(void) -{ - /* PSINGLE_LIST_ENTRY */ - TEST_TYPE_SIZE (PSINGLE_LIST_ENTRY, 4) - TEST_TYPE_ALIGN (PSINGLE_LIST_ENTRY, 4) - TEST_TARGET_SIZE (PSINGLE_LIST_ENTRY, 4) - TEST_TARGET_ALIGN(PSINGLE_LIST_ENTRY, 4) -} - -static void test_pack_PSTR(void) -{ - /* PSTR */ - TEST_TYPE_SIZE (PSTR, 4) - TEST_TYPE_ALIGN (PSTR, 4) - TEST_TARGET_SIZE (PSTR, 1) - TEST_TARGET_ALIGN(PSTR, 1) -} - -static void test_pack_PSYSTEM_ALARM_ACE(void) -{ - /* PSYSTEM_ALARM_ACE */ - TEST_TYPE_SIZE (PSYSTEM_ALARM_ACE, 4) - TEST_TYPE_ALIGN (PSYSTEM_ALARM_ACE, 4) - TEST_TARGET_SIZE (PSYSTEM_ALARM_ACE, 12) - TEST_TARGET_ALIGN(PSYSTEM_ALARM_ACE, 4) -} - -static void test_pack_PSYSTEM_AUDIT_ACE(void) -{ - /* PSYSTEM_AUDIT_ACE */ - TEST_TYPE_SIZE (PSYSTEM_AUDIT_ACE, 4) - TEST_TYPE_ALIGN (PSYSTEM_AUDIT_ACE, 4) - TEST_TARGET_SIZE (PSYSTEM_AUDIT_ACE, 12) - TEST_TARGET_ALIGN(PSYSTEM_AUDIT_ACE, 4) -} - -static void test_pack_PTOKEN_GROUPS(void) -{ - /* PTOKEN_GROUPS */ - TEST_TYPE_SIZE (PTOKEN_GROUPS, 4) - TEST_TYPE_ALIGN (PTOKEN_GROUPS, 4) - TEST_TARGET_SIZE (PTOKEN_GROUPS, 12) - TEST_TARGET_ALIGN(PTOKEN_GROUPS, 4) -} - -static void test_pack_PTOKEN_PRIVILEGES(void) -{ - /* PTOKEN_PRIVILEGES */ - TEST_TYPE_SIZE (PTOKEN_PRIVILEGES, 4) - TEST_TYPE_ALIGN (PTOKEN_PRIVILEGES, 4) - TEST_TARGET_SIZE (PTOKEN_PRIVILEGES, 16) - TEST_TARGET_ALIGN(PTOKEN_PRIVILEGES, 4) -} - -static void test_pack_PTOKEN_USER(void) -{ - /* PTOKEN_USER */ - TEST_TYPE_SIZE (PTOKEN_USER, 4) - TEST_TYPE_ALIGN (PTOKEN_USER, 4) - TEST_TARGET_SIZE (PTOKEN_USER, 8) - TEST_TARGET_ALIGN(PTOKEN_USER, 4) -} - -static void test_pack_PTSTR(void) -{ - /* PTSTR */ - TEST_TYPE_SIZE (PTSTR, 4) - TEST_TYPE_ALIGN (PTSTR, 4) -} - -static void test_pack_PULARGE_INTEGER(void) -{ - /* PULARGE_INTEGER */ - TEST_TYPE_SIZE (PULARGE_INTEGER, 4) - TEST_TYPE_ALIGN (PULARGE_INTEGER, 4) -} - -static void test_pack_PVECTORED_EXCEPTION_HANDLER(void) -{ - /* PVECTORED_EXCEPTION_HANDLER */ - TEST_TYPE_SIZE (PVECTORED_EXCEPTION_HANDLER, 4) - TEST_TYPE_ALIGN (PVECTORED_EXCEPTION_HANDLER, 4) -} - -static void test_pack_PVOID(void) -{ - /* PVOID */ - TEST_TYPE_SIZE (PVOID, 4) - TEST_TYPE_ALIGN (PVOID, 4) -} - -static void test_pack_PWCH(void) -{ - /* PWCH */ - TEST_TYPE_SIZE (PWCH, 4) - TEST_TYPE_ALIGN (PWCH, 4) - TEST_TARGET_SIZE (PWCH, 2) - TEST_TARGET_ALIGN(PWCH, 2) -} - -static void test_pack_PWSTR(void) -{ - /* PWSTR */ - TEST_TYPE_SIZE (PWSTR, 4) - TEST_TYPE_ALIGN (PWSTR, 4) - TEST_TARGET_SIZE (PWSTR, 2) - TEST_TARGET_ALIGN(PWSTR, 2) -} - -static void test_pack_RTL_CRITICAL_SECTION(void) -{ - /* RTL_CRITICAL_SECTION */ - TEST_TYPE_SIZE (RTL_CRITICAL_SECTION, 24) - TEST_TYPE_ALIGN (RTL_CRITICAL_SECTION, 4) - TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, DebugInfo, 4) - TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, DebugInfo, 4) - TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, DebugInfo, 0) - TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, LockCount, 4) - TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, LockCount, 4) - TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, LockCount, 4) - TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, RecursionCount, 4) - TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, RecursionCount, 4) - TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, RecursionCount, 8) - TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, OwningThread, 4) - TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, OwningThread, 4) - TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, OwningThread, 12) - TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, LockSemaphore, 4) - TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, LockSemaphore, 4) - TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, LockSemaphore, 16) - TEST_FIELD_SIZE (RTL_CRITICAL_SECTION, SpinCount, 4) - TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION, SpinCount, 4) - TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION, SpinCount, 20) -} - -static void test_pack_RTL_CRITICAL_SECTION_DEBUG(void) -{ - /* RTL_CRITICAL_SECTION_DEBUG */ - TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, Type, 2) - TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, Type, 2) - TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, Type, 0) - TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, CreatorBackTraceIndex, 2) - TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, CreatorBackTraceIndex, 2) - TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, CreatorBackTraceIndex, 2) - TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, CriticalSection, 4) - TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, CriticalSection, 4) - TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, CriticalSection, 4) - TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, ProcessLocksList, 8) - TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, ProcessLocksList, 4) - TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, ProcessLocksList, 8) - TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, EntryCount, 4) - TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, EntryCount, 4) - TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, EntryCount, 16) - TEST_FIELD_SIZE (RTL_CRITICAL_SECTION_DEBUG, ContentionCount, 4) - TEST_FIELD_ALIGN (RTL_CRITICAL_SECTION_DEBUG, ContentionCount, 4) - TEST_FIELD_OFFSET(RTL_CRITICAL_SECTION_DEBUG, ContentionCount, 20) -} - -static void test_pack_RTL_OSVERSIONINFOEXW(void) -{ - /* RTL_OSVERSIONINFOEXW */ - TEST_TYPE_SIZE (RTL_OSVERSIONINFOEXW, 284) - TEST_TYPE_ALIGN (RTL_OSVERSIONINFOEXW, 4) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwOSVersionInfoSize, 4) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwOSVersionInfoSize, 4) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwOSVersionInfoSize, 0) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwMajorVersion, 4) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwMajorVersion, 4) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwMajorVersion, 4) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwMinorVersion, 4) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwMinorVersion, 4) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwMinorVersion, 8) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwBuildNumber, 4) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwBuildNumber, 4) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwBuildNumber, 12) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, dwPlatformId, 4) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, dwPlatformId, 4) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, dwPlatformId, 16) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, szCSDVersion, 256) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, szCSDVersion, 2) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, szCSDVersion, 20) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wServicePackMajor, 2) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wServicePackMajor, 2) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wServicePackMajor, 276) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wServicePackMinor, 2) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wServicePackMinor, 2) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wServicePackMinor, 278) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wSuiteMask, 2) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wSuiteMask, 2) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wSuiteMask, 280) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wProductType, 1) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wProductType, 1) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wProductType, 282) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOEXW, wReserved, 1) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOEXW, wReserved, 1) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOEXW, wReserved, 283) -} - -static void test_pack_RTL_OSVERSIONINFOW(void) -{ - /* RTL_OSVERSIONINFOW */ - TEST_TYPE_SIZE (RTL_OSVERSIONINFOW, 276) - TEST_TYPE_ALIGN (RTL_OSVERSIONINFOW, 4) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwOSVersionInfoSize, 4) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwOSVersionInfoSize, 4) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwOSVersionInfoSize, 0) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwMajorVersion, 4) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwMajorVersion, 4) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwMajorVersion, 4) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwMinorVersion, 4) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwMinorVersion, 4) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwMinorVersion, 8) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwBuildNumber, 4) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwBuildNumber, 4) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwBuildNumber, 12) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, dwPlatformId, 4) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, dwPlatformId, 4) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, dwPlatformId, 16) - TEST_FIELD_SIZE (RTL_OSVERSIONINFOW, szCSDVersion, 256) - TEST_FIELD_ALIGN (RTL_OSVERSIONINFOW, szCSDVersion, 2) - TEST_FIELD_OFFSET(RTL_OSVERSIONINFOW, szCSDVersion, 20) -} - -static void test_pack_RTL_RESOURCE_DEBUG(void) -{ - /* RTL_RESOURCE_DEBUG */ - TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, Type, 2) - TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, Type, 2) - TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, Type, 0) - TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, CreatorBackTraceIndex, 2) - TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, CreatorBackTraceIndex, 2) - TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, CreatorBackTraceIndex, 2) - TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, CriticalSection, 4) - TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, CriticalSection, 4) - TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, CriticalSection, 4) - TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, ProcessLocksList, 8) - TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, ProcessLocksList, 4) - TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, ProcessLocksList, 8) - TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, EntryCount, 4) - TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, EntryCount, 4) - TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, EntryCount, 16) - TEST_FIELD_SIZE (RTL_RESOURCE_DEBUG, ContentionCount, 4) - TEST_FIELD_ALIGN (RTL_RESOURCE_DEBUG, ContentionCount, 4) - TEST_FIELD_OFFSET(RTL_RESOURCE_DEBUG, ContentionCount, 20) -} - -static void test_pack_SECURITY_CONTEXT_TRACKING_MODE(void) -{ - /* SECURITY_CONTEXT_TRACKING_MODE */ - TEST_TYPE_SIZE (SECURITY_CONTEXT_TRACKING_MODE, 1) - TEST_TYPE_ALIGN (SECURITY_CONTEXT_TRACKING_MODE, 1) -} - -static void test_pack_SECURITY_DESCRIPTOR(void) -{ - /* SECURITY_DESCRIPTOR */ - TEST_TYPE_SIZE (SECURITY_DESCRIPTOR, 20) - TEST_TYPE_ALIGN (SECURITY_DESCRIPTOR, 4) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Revision, 1) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Revision, 1) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Revision, 0) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Sbz1, 1) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Sbz1, 1) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Sbz1, 1) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Control, 2) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Control, 2) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Control, 2) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Owner, 4) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Owner, 4) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Owner, 4) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Group, 4) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Group, 4) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Group, 8) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Sacl, 4) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Sacl, 4) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Sacl, 12) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR, Dacl, 4) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR, Dacl, 4) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR, Dacl, 16) -} - -static void test_pack_SECURITY_DESCRIPTOR_CONTROL(void) -{ - /* SECURITY_DESCRIPTOR_CONTROL */ - TEST_TYPE_SIZE (SECURITY_DESCRIPTOR_CONTROL, 2) - TEST_TYPE_ALIGN (SECURITY_DESCRIPTOR_CONTROL, 2) - TEST_TYPE_UNSIGNED(SECURITY_DESCRIPTOR_CONTROL) -} - -static void test_pack_SECURITY_DESCRIPTOR_RELATIVE(void) -{ - /* SECURITY_DESCRIPTOR_RELATIVE */ - TEST_TYPE_SIZE (SECURITY_DESCRIPTOR_RELATIVE, 20) - TEST_TYPE_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, 4) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Revision, 1) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Revision, 1) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Revision, 0) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Sbz1, 1) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Sbz1, 1) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Sbz1, 1) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Control, 2) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Control, 2) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Control, 2) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Owner, 4) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Owner, 4) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Owner, 4) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Group, 4) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Group, 4) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Group, 8) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Sacl, 4) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Sacl, 4) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Sacl, 12) - TEST_FIELD_SIZE (SECURITY_DESCRIPTOR_RELATIVE, Dacl, 4) - TEST_FIELD_ALIGN (SECURITY_DESCRIPTOR_RELATIVE, Dacl, 4) - TEST_FIELD_OFFSET(SECURITY_DESCRIPTOR_RELATIVE, Dacl, 16) -} - -static void test_pack_SECURITY_INFORMATION(void) -{ - /* SECURITY_INFORMATION */ - TEST_TYPE_SIZE (SECURITY_INFORMATION, 4) - TEST_TYPE_ALIGN (SECURITY_INFORMATION, 4) - TEST_TYPE_UNSIGNED(SECURITY_INFORMATION) -} - -static void test_pack_SECURITY_QUALITY_OF_SERVICE(void) -{ - /* SECURITY_QUALITY_OF_SERVICE */ - TEST_FIELD_SIZE (SECURITY_QUALITY_OF_SERVICE, Length, 4) - TEST_FIELD_ALIGN (SECURITY_QUALITY_OF_SERVICE, Length, 4) - TEST_FIELD_OFFSET(SECURITY_QUALITY_OF_SERVICE, Length, 0) -} - -static void test_pack_SHORT(void) -{ - /* SHORT */ - TEST_TYPE_SIZE (SHORT, 2) - TEST_TYPE_ALIGN (SHORT, 2) - TEST_TYPE_SIGNED(SHORT) -} - -static void test_pack_SID(void) -{ - /* SID */ - TEST_TYPE_SIZE (SID, 12) - TEST_TYPE_ALIGN (SID, 4) - TEST_FIELD_SIZE (SID, Revision, 1) - TEST_FIELD_ALIGN (SID, Revision, 1) - TEST_FIELD_OFFSET(SID, Revision, 0) - TEST_FIELD_SIZE (SID, SubAuthorityCount, 1) - TEST_FIELD_ALIGN (SID, SubAuthorityCount, 1) - TEST_FIELD_OFFSET(SID, SubAuthorityCount, 1) - TEST_FIELD_SIZE (SID, IdentifierAuthority, 6) - TEST_FIELD_ALIGN (SID, IdentifierAuthority, 1) - TEST_FIELD_OFFSET(SID, IdentifierAuthority, 2) - TEST_FIELD_SIZE (SID, SubAuthority, 4) - TEST_FIELD_ALIGN (SID, SubAuthority, 4) - TEST_FIELD_OFFSET(SID, SubAuthority, 8) -} - -static void test_pack_SID_AND_ATTRIBUTES(void) -{ - /* SID_AND_ATTRIBUTES */ - TEST_TYPE_SIZE (SID_AND_ATTRIBUTES, 8) - TEST_TYPE_ALIGN (SID_AND_ATTRIBUTES, 4) - TEST_FIELD_SIZE (SID_AND_ATTRIBUTES, Sid, 4) - TEST_FIELD_ALIGN (SID_AND_ATTRIBUTES, Sid, 4) - TEST_FIELD_OFFSET(SID_AND_ATTRIBUTES, Sid, 0) - TEST_FIELD_SIZE (SID_AND_ATTRIBUTES, Attributes, 4) - TEST_FIELD_ALIGN (SID_AND_ATTRIBUTES, Attributes, 4) - TEST_FIELD_OFFSET(SID_AND_ATTRIBUTES, Attributes, 4) -} - -static void test_pack_SID_IDENTIFIER_AUTHORITY(void) -{ - /* SID_IDENTIFIER_AUTHORITY */ - TEST_TYPE_SIZE (SID_IDENTIFIER_AUTHORITY, 6) - TEST_TYPE_ALIGN (SID_IDENTIFIER_AUTHORITY, 1) - TEST_FIELD_SIZE (SID_IDENTIFIER_AUTHORITY, Value, 6) - TEST_FIELD_ALIGN (SID_IDENTIFIER_AUTHORITY, Value, 1) - TEST_FIELD_OFFSET(SID_IDENTIFIER_AUTHORITY, Value, 0) -} - -static void test_pack_SINGLE_LIST_ENTRY(void) -{ - /* SINGLE_LIST_ENTRY */ - TEST_TYPE_SIZE (SINGLE_LIST_ENTRY, 4) - TEST_TYPE_ALIGN (SINGLE_LIST_ENTRY, 4) - TEST_FIELD_SIZE (SINGLE_LIST_ENTRY, Next, 4) - TEST_FIELD_ALIGN (SINGLE_LIST_ENTRY, Next, 4) - TEST_FIELD_OFFSET(SINGLE_LIST_ENTRY, Next, 0) -} - -static void test_pack_SYSTEM_ALARM_ACE(void) -{ - /* SYSTEM_ALARM_ACE */ - TEST_TYPE_SIZE (SYSTEM_ALARM_ACE, 12) - TEST_TYPE_ALIGN (SYSTEM_ALARM_ACE, 4) - TEST_FIELD_SIZE (SYSTEM_ALARM_ACE, Header, 4) - TEST_FIELD_ALIGN (SYSTEM_ALARM_ACE, Header, 2) - TEST_FIELD_OFFSET(SYSTEM_ALARM_ACE, Header, 0) - TEST_FIELD_SIZE (SYSTEM_ALARM_ACE, Mask, 4) - TEST_FIELD_ALIGN (SYSTEM_ALARM_ACE, Mask, 4) - TEST_FIELD_OFFSET(SYSTEM_ALARM_ACE, Mask, 4) - TEST_FIELD_SIZE (SYSTEM_ALARM_ACE, SidStart, 4) - TEST_FIELD_ALIGN (SYSTEM_ALARM_ACE, SidStart, 4) - TEST_FIELD_OFFSET(SYSTEM_ALARM_ACE, SidStart, 8) -} - -static void test_pack_SYSTEM_AUDIT_ACE(void) -{ - /* SYSTEM_AUDIT_ACE */ - TEST_TYPE_SIZE (SYSTEM_AUDIT_ACE, 12) - TEST_TYPE_ALIGN (SYSTEM_AUDIT_ACE, 4) - TEST_FIELD_SIZE (SYSTEM_AUDIT_ACE, Header, 4) - TEST_FIELD_ALIGN (SYSTEM_AUDIT_ACE, Header, 2) - TEST_FIELD_OFFSET(SYSTEM_AUDIT_ACE, Header, 0) - TEST_FIELD_SIZE (SYSTEM_AUDIT_ACE, Mask, 4) - TEST_FIELD_ALIGN (SYSTEM_AUDIT_ACE, Mask, 4) - TEST_FIELD_OFFSET(SYSTEM_AUDIT_ACE, Mask, 4) - TEST_FIELD_SIZE (SYSTEM_AUDIT_ACE, SidStart, 4) - TEST_FIELD_ALIGN (SYSTEM_AUDIT_ACE, SidStart, 4) - TEST_FIELD_OFFSET(SYSTEM_AUDIT_ACE, SidStart, 8) -} - -static void test_pack_TCHAR(void) -{ - /* TCHAR */ - TEST_TYPE_SIZE (TCHAR, 1) - TEST_TYPE_ALIGN (TCHAR, 1) -} - -static void test_pack_TOKEN_DEFAULT_DACL(void) -{ - /* TOKEN_DEFAULT_DACL */ - TEST_TYPE_SIZE (TOKEN_DEFAULT_DACL, 4) - TEST_TYPE_ALIGN (TOKEN_DEFAULT_DACL, 4) - TEST_FIELD_SIZE (TOKEN_DEFAULT_DACL, DefaultDacl, 4) - TEST_FIELD_ALIGN (TOKEN_DEFAULT_DACL, DefaultDacl, 4) - TEST_FIELD_OFFSET(TOKEN_DEFAULT_DACL, DefaultDacl, 0) -} - -static void test_pack_TOKEN_GROUPS(void) -{ - /* TOKEN_GROUPS */ - TEST_TYPE_SIZE (TOKEN_GROUPS, 12) - TEST_TYPE_ALIGN (TOKEN_GROUPS, 4) - TEST_FIELD_SIZE (TOKEN_GROUPS, GroupCount, 4) - TEST_FIELD_ALIGN (TOKEN_GROUPS, GroupCount, 4) - TEST_FIELD_OFFSET(TOKEN_GROUPS, GroupCount, 0) - TEST_FIELD_SIZE (TOKEN_GROUPS, Groups, 8) - TEST_FIELD_ALIGN (TOKEN_GROUPS, Groups, 4) - TEST_FIELD_OFFSET(TOKEN_GROUPS, Groups, 4) -} - -static void test_pack_TOKEN_OWNER(void) -{ - /* TOKEN_OWNER */ - TEST_TYPE_SIZE (TOKEN_OWNER, 4) - TEST_TYPE_ALIGN (TOKEN_OWNER, 4) - TEST_FIELD_SIZE (TOKEN_OWNER, Owner, 4) - TEST_FIELD_ALIGN (TOKEN_OWNER, Owner, 4) - TEST_FIELD_OFFSET(TOKEN_OWNER, Owner, 0) -} - -static void test_pack_TOKEN_PRIMARY_GROUP(void) -{ - /* TOKEN_PRIMARY_GROUP */ - TEST_TYPE_SIZE (TOKEN_PRIMARY_GROUP, 4) - TEST_TYPE_ALIGN (TOKEN_PRIMARY_GROUP, 4) - TEST_FIELD_SIZE (TOKEN_PRIMARY_GROUP, PrimaryGroup, 4) - TEST_FIELD_ALIGN (TOKEN_PRIMARY_GROUP, PrimaryGroup, 4) - TEST_FIELD_OFFSET(TOKEN_PRIMARY_GROUP, PrimaryGroup, 0) -} - -static void test_pack_TOKEN_PRIVILEGES(void) -{ - /* TOKEN_PRIVILEGES */ - TEST_TYPE_SIZE (TOKEN_PRIVILEGES, 16) - TEST_TYPE_ALIGN (TOKEN_PRIVILEGES, 4) - TEST_FIELD_SIZE (TOKEN_PRIVILEGES, PrivilegeCount, 4) - TEST_FIELD_ALIGN (TOKEN_PRIVILEGES, PrivilegeCount, 4) - TEST_FIELD_OFFSET(TOKEN_PRIVILEGES, PrivilegeCount, 0) - TEST_FIELD_SIZE (TOKEN_PRIVILEGES, Privileges, 12) - TEST_FIELD_ALIGN (TOKEN_PRIVILEGES, Privileges, 4) - TEST_FIELD_OFFSET(TOKEN_PRIVILEGES, Privileges, 4) -} - -static void test_pack_TOKEN_SOURCE(void) -{ - /* TOKEN_SOURCE */ - TEST_TYPE_SIZE (TOKEN_SOURCE, 16) - TEST_TYPE_ALIGN (TOKEN_SOURCE, 4) - TEST_FIELD_SIZE (TOKEN_SOURCE, SourceName, 8) - TEST_FIELD_ALIGN (TOKEN_SOURCE, SourceName, 1) - TEST_FIELD_OFFSET(TOKEN_SOURCE, SourceName, 0) - TEST_FIELD_SIZE (TOKEN_SOURCE, SourceIdentifier, 8) - TEST_FIELD_ALIGN (TOKEN_SOURCE, SourceIdentifier, 4) - TEST_FIELD_OFFSET(TOKEN_SOURCE, SourceIdentifier, 8) -} - -static void test_pack_TOKEN_STATISTICS(void) -{ - /* TOKEN_STATISTICS (pack 4) */ - TEST_FIELD_SIZE (TOKEN_STATISTICS, TokenId, 8) - TEST_FIELD_ALIGN (TOKEN_STATISTICS, TokenId, 4) - TEST_FIELD_OFFSET(TOKEN_STATISTICS, TokenId, 0) - TEST_FIELD_SIZE (TOKEN_STATISTICS, AuthenticationId, 8) - TEST_FIELD_ALIGN (TOKEN_STATISTICS, AuthenticationId, 4) - TEST_FIELD_OFFSET(TOKEN_STATISTICS, AuthenticationId, 8) - TEST_FIELD_SIZE (TOKEN_STATISTICS, ExpirationTime, 8) - TEST_FIELD_ALIGN (TOKEN_STATISTICS, ExpirationTime, 4) - TEST_FIELD_OFFSET(TOKEN_STATISTICS, ExpirationTime, 16) -} - -static void test_pack_TOKEN_USER(void) -{ - /* TOKEN_USER */ - TEST_TYPE_SIZE (TOKEN_USER, 8) - TEST_TYPE_ALIGN (TOKEN_USER, 4) - TEST_FIELD_SIZE (TOKEN_USER, User, 8) - TEST_FIELD_ALIGN (TOKEN_USER, User, 4) - TEST_FIELD_OFFSET(TOKEN_USER, User, 0) -} - -static void test_pack_ULARGE_INTEGER(void) -{ - /* ULARGE_INTEGER */ -} - -static void test_pack_ULONGLONG(void) -{ - /* ULONGLONG */ - TEST_TYPE_SIZE (ULONGLONG, 8) - TEST_TYPE_ALIGN (ULONGLONG, 8) - TEST_TYPE_UNSIGNED(ULONGLONG) -} - -static void test_pack_WAITORTIMERCALLBACKFUNC(void) -{ - /* WAITORTIMERCALLBACKFUNC */ - TEST_TYPE_SIZE (WAITORTIMERCALLBACKFUNC, 4) - TEST_TYPE_ALIGN (WAITORTIMERCALLBACKFUNC, 4) -} - -static void test_pack_WCHAR(void) -{ - /* WCHAR */ - TEST_TYPE_SIZE (WCHAR, 2) - TEST_TYPE_ALIGN (WCHAR, 2) - TEST_TYPE_UNSIGNED(WCHAR) -} - -static void test_pack_ATOM(void) -{ - /* ATOM */ - TEST_TYPE_SIZE (ATOM, 2) - TEST_TYPE_ALIGN (ATOM, 2) - TEST_TYPE_UNSIGNED(ATOM) -} - -static void test_pack_BOOL(void) -{ - /* BOOL */ - TEST_TYPE_SIZE (BOOL, 4) - TEST_TYPE_ALIGN (BOOL, 4) - TEST_TYPE_SIGNED(BOOL) -} - -static void test_pack_BYTE(void) -{ - /* BYTE */ - TEST_TYPE_SIZE (BYTE, 1) - TEST_TYPE_ALIGN (BYTE, 1) - TEST_TYPE_UNSIGNED(BYTE) -} - -static void test_pack_COLORREF(void) -{ - /* COLORREF */ - TEST_TYPE_SIZE (COLORREF, 4) - TEST_TYPE_ALIGN (COLORREF, 4) - TEST_TYPE_UNSIGNED(COLORREF) -} - -static void test_pack_DWORD(void) -{ - /* DWORD */ - TEST_TYPE_SIZE (DWORD, 4) - TEST_TYPE_ALIGN (DWORD, 4) - TEST_TYPE_UNSIGNED(DWORD) -} - -static void test_pack_FARPROC(void) -{ - /* FARPROC */ - TEST_TYPE_SIZE (FARPROC, 4) - TEST_TYPE_ALIGN (FARPROC, 4) -} - -static void test_pack_FLOAT(void) -{ - /* FLOAT */ - TEST_TYPE_SIZE (FLOAT, 4) - TEST_TYPE_ALIGN (FLOAT, 4) -} - -static void test_pack_GLOBALHANDLE(void) -{ - /* GLOBALHANDLE */ - TEST_TYPE_SIZE (GLOBALHANDLE, 4) - TEST_TYPE_ALIGN (GLOBALHANDLE, 4) -} - -static void test_pack_HCURSOR(void) -{ - /* HCURSOR */ - TEST_TYPE_SIZE (HCURSOR, 4) - TEST_TYPE_ALIGN (HCURSOR, 4) -} - -static void test_pack_HFILE(void) -{ - /* HFILE */ - TEST_TYPE_SIZE (HFILE, 4) - TEST_TYPE_ALIGN (HFILE, 4) - TEST_TYPE_SIGNED(HFILE) -} - -static void test_pack_HGDIOBJ(void) -{ - /* HGDIOBJ */ - TEST_TYPE_SIZE (HGDIOBJ, 4) - TEST_TYPE_ALIGN (HGDIOBJ, 4) -} - -static void test_pack_HGLOBAL(void) -{ - /* HGLOBAL */ - TEST_TYPE_SIZE (HGLOBAL, 4) - TEST_TYPE_ALIGN (HGLOBAL, 4) -} - -static void test_pack_HLOCAL(void) -{ - /* HLOCAL */ - TEST_TYPE_SIZE (HLOCAL, 4) - TEST_TYPE_ALIGN (HLOCAL, 4) -} - -static void test_pack_HMODULE(void) -{ - /* HMODULE */ - TEST_TYPE_SIZE (HMODULE, 4) - TEST_TYPE_ALIGN (HMODULE, 4) -} - -static void test_pack_INT(void) -{ - /* INT */ - TEST_TYPE_SIZE (INT, 4) - TEST_TYPE_ALIGN (INT, 4) - TEST_TYPE_SIGNED(INT) -} - -static void test_pack_LOCALHANDLE(void) -{ - /* LOCALHANDLE */ - TEST_TYPE_SIZE (LOCALHANDLE, 4) - TEST_TYPE_ALIGN (LOCALHANDLE, 4) -} - -static void test_pack_LPARAM(void) -{ - /* LPARAM */ - TEST_TYPE_SIZE (LPARAM, 4) - TEST_TYPE_ALIGN (LPARAM, 4) -} - -static void test_pack_LPCRECT(void) -{ - /* LPCRECT */ - TEST_TYPE_SIZE (LPCRECT, 4) - TEST_TYPE_ALIGN (LPCRECT, 4) - TEST_TARGET_SIZE (LPCRECT, 16) - TEST_TARGET_ALIGN(LPCRECT, 4) -} - -static void test_pack_LPCRECTL(void) -{ - /* LPCRECTL */ - TEST_TYPE_SIZE (LPCRECTL, 4) - TEST_TYPE_ALIGN (LPCRECTL, 4) - TEST_TARGET_SIZE (LPCRECTL, 16) - TEST_TARGET_ALIGN(LPCRECTL, 4) -} - -static void test_pack_LPCVOID(void) -{ - /* LPCVOID */ - TEST_TYPE_SIZE (LPCVOID, 4) - TEST_TYPE_ALIGN (LPCVOID, 4) -} - -static void test_pack_LPPOINT(void) -{ - /* LPPOINT */ - TEST_TYPE_SIZE (LPPOINT, 4) - TEST_TYPE_ALIGN (LPPOINT, 4) - TEST_TARGET_SIZE (LPPOINT, 8) - TEST_TARGET_ALIGN(LPPOINT, 4) -} - -static void test_pack_LPRECT(void) -{ - /* LPRECT */ - TEST_TYPE_SIZE (LPRECT, 4) - TEST_TYPE_ALIGN (LPRECT, 4) - TEST_TARGET_SIZE (LPRECT, 16) - TEST_TARGET_ALIGN(LPRECT, 4) -} - -static void test_pack_LPRECTL(void) -{ - /* LPRECTL */ - TEST_TYPE_SIZE (LPRECTL, 4) - TEST_TYPE_ALIGN (LPRECTL, 4) - TEST_TARGET_SIZE (LPRECTL, 16) - TEST_TARGET_ALIGN(LPRECTL, 4) -} - -static void test_pack_LPSIZE(void) -{ - /* LPSIZE */ - TEST_TYPE_SIZE (LPSIZE, 4) - TEST_TYPE_ALIGN (LPSIZE, 4) - TEST_TARGET_SIZE (LPSIZE, 8) - TEST_TARGET_ALIGN(LPSIZE, 4) -} - -static void test_pack_LRESULT(void) -{ - /* LRESULT */ - TEST_TYPE_SIZE (LRESULT, 4) - TEST_TYPE_ALIGN (LRESULT, 4) -} - -static void test_pack_POINT(void) -{ - /* POINT */ - TEST_TYPE_SIZE (POINT, 8) - TEST_TYPE_ALIGN (POINT, 4) - TEST_FIELD_SIZE (POINT, x, 4) - TEST_FIELD_ALIGN (POINT, x, 4) - TEST_FIELD_OFFSET(POINT, x, 0) - TEST_FIELD_SIZE (POINT, y, 4) - TEST_FIELD_ALIGN (POINT, y, 4) - TEST_FIELD_OFFSET(POINT, y, 4) -} - -static void test_pack_POINTL(void) -{ - /* POINTL */ - TEST_TYPE_SIZE (POINTL, 8) - TEST_TYPE_ALIGN (POINTL, 4) - TEST_FIELD_SIZE (POINTL, x, 4) - TEST_FIELD_ALIGN (POINTL, x, 4) - TEST_FIELD_OFFSET(POINTL, x, 0) - TEST_FIELD_SIZE (POINTL, y, 4) - TEST_FIELD_ALIGN (POINTL, y, 4) - TEST_FIELD_OFFSET(POINTL, y, 4) -} - -static void test_pack_PPOINT(void) -{ - /* PPOINT */ - TEST_TYPE_SIZE (PPOINT, 4) - TEST_TYPE_ALIGN (PPOINT, 4) - TEST_TARGET_SIZE (PPOINT, 8) - TEST_TARGET_ALIGN(PPOINT, 4) -} - -static void test_pack_PPOINTL(void) -{ - /* PPOINTL */ - TEST_TYPE_SIZE (PPOINTL, 4) - TEST_TYPE_ALIGN (PPOINTL, 4) - TEST_TARGET_SIZE (PPOINTL, 8) - TEST_TARGET_ALIGN(PPOINTL, 4) -} - -static void test_pack_PRECT(void) -{ - /* PRECT */ - TEST_TYPE_SIZE (PRECT, 4) - TEST_TYPE_ALIGN (PRECT, 4) - TEST_TARGET_SIZE (PRECT, 16) - TEST_TARGET_ALIGN(PRECT, 4) -} - -static void test_pack_PRECTL(void) -{ - /* PRECTL */ - TEST_TYPE_SIZE (PRECTL, 4) - TEST_TYPE_ALIGN (PRECTL, 4) - TEST_TARGET_SIZE (PRECTL, 16) - TEST_TARGET_ALIGN(PRECTL, 4) -} - -static void test_pack_PROC(void) -{ - /* PROC */ - TEST_TYPE_SIZE (PROC, 4) - TEST_TYPE_ALIGN (PROC, 4) -} - -static void test_pack_PSIZE(void) -{ - /* PSIZE */ - TEST_TYPE_SIZE (PSIZE, 4) - TEST_TYPE_ALIGN (PSIZE, 4) - TEST_TARGET_SIZE (PSIZE, 8) - TEST_TARGET_ALIGN(PSIZE, 4) -} - -static void test_pack_PSZ(void) -{ - /* PSZ */ - TEST_TYPE_SIZE (PSZ, 4) - TEST_TYPE_ALIGN (PSZ, 4) -} - -static void test_pack_RECT(void) -{ - /* RECT */ - TEST_TYPE_SIZE (RECT, 16) - TEST_TYPE_ALIGN (RECT, 4) - TEST_FIELD_SIZE (RECT, left, 4) - TEST_FIELD_ALIGN (RECT, left, 4) - TEST_FIELD_OFFSET(RECT, left, 0) - TEST_FIELD_SIZE (RECT, top, 4) - TEST_FIELD_ALIGN (RECT, top, 4) - TEST_FIELD_OFFSET(RECT, top, 4) - TEST_FIELD_SIZE (RECT, right, 4) - TEST_FIELD_ALIGN (RECT, right, 4) - TEST_FIELD_OFFSET(RECT, right, 8) - TEST_FIELD_SIZE (RECT, bottom, 4) - TEST_FIELD_ALIGN (RECT, bottom, 4) - TEST_FIELD_OFFSET(RECT, bottom, 12) -} - -static void test_pack_RECTL(void) -{ - /* RECTL */ - TEST_TYPE_SIZE (RECTL, 16) - TEST_TYPE_ALIGN (RECTL, 4) - TEST_FIELD_SIZE (RECTL, left, 4) - TEST_FIELD_ALIGN (RECTL, left, 4) - TEST_FIELD_OFFSET(RECTL, left, 0) - TEST_FIELD_SIZE (RECTL, top, 4) - TEST_FIELD_ALIGN (RECTL, top, 4) - TEST_FIELD_OFFSET(RECTL, top, 4) - TEST_FIELD_SIZE (RECTL, right, 4) - TEST_FIELD_ALIGN (RECTL, right, 4) - TEST_FIELD_OFFSET(RECTL, right, 8) - TEST_FIELD_SIZE (RECTL, bottom, 4) - TEST_FIELD_ALIGN (RECTL, bottom, 4) - TEST_FIELD_OFFSET(RECTL, bottom, 12) -} - -static void test_pack_SIZE(void) -{ - /* SIZE */ - TEST_TYPE_SIZE (SIZE, 8) - TEST_TYPE_ALIGN (SIZE, 4) - TEST_FIELD_SIZE (SIZE, cx, 4) - TEST_FIELD_ALIGN (SIZE, cx, 4) - TEST_FIELD_OFFSET(SIZE, cx, 0) - TEST_FIELD_SIZE (SIZE, cy, 4) - TEST_FIELD_ALIGN (SIZE, cy, 4) - TEST_FIELD_OFFSET(SIZE, cy, 4) -} - -static void test_pack_SIZEL(void) -{ - /* SIZEL */ - TEST_TYPE_SIZE (SIZEL, 8) - TEST_TYPE_ALIGN (SIZEL, 4) -} - -static void test_pack_UCHAR(void) -{ - /* UCHAR */ - TEST_TYPE_SIZE (UCHAR, 1) - TEST_TYPE_ALIGN (UCHAR, 1) - TEST_TYPE_UNSIGNED(UCHAR) -} - -static void test_pack_UINT(void) -{ - /* UINT */ - TEST_TYPE_SIZE (UINT, 4) - TEST_TYPE_ALIGN (UINT, 4) - TEST_TYPE_UNSIGNED(UINT) -} - -static void test_pack_ULONG(void) -{ - /* ULONG */ - TEST_TYPE_SIZE (ULONG, 4) - TEST_TYPE_ALIGN (ULONG, 4) - TEST_TYPE_UNSIGNED(ULONG) -} - -static void test_pack_USHORT(void) -{ - /* USHORT */ - TEST_TYPE_SIZE (USHORT, 2) - TEST_TYPE_ALIGN (USHORT, 2) - TEST_TYPE_UNSIGNED(USHORT) -} - -static void test_pack_WORD(void) -{ - /* WORD */ - TEST_TYPE_SIZE (WORD, 2) - TEST_TYPE_ALIGN (WORD, 2) - TEST_TYPE_UNSIGNED(WORD) -} - -static void test_pack_WPARAM(void) -{ - /* WPARAM */ - TEST_TYPE_SIZE (WPARAM, 4) - TEST_TYPE_ALIGN (WPARAM, 4) -} - -#endif /* _WIN64 */ - -static void test_pack(void) -{ - test_pack_ACCESS_ALLOWED_ACE(); - test_pack_ACCESS_DENIED_ACE(); - test_pack_ACCESS_MASK(); - test_pack_ACE_HEADER(); - test_pack_ACL(); - test_pack_ACL_REVISION_INFORMATION(); - test_pack_ACL_SIZE_INFORMATION(); - test_pack_ATOM(); - test_pack_BOOL(); - test_pack_BOOLEAN(); - test_pack_BYTE(); - test_pack_CCHAR(); - test_pack_CHAR(); - test_pack_COLORREF(); - test_pack_DWORD(); - test_pack_DWORD32(); - test_pack_DWORD64(); - test_pack_DWORDLONG(); - test_pack_DWORD_PTR(); - test_pack_EXCEPTION_POINTERS(); - test_pack_EXCEPTION_RECORD(); - test_pack_EXECUTION_STATE(); - test_pack_FARPROC(); - test_pack_FLOAT(); - test_pack_FLOATING_SAVE_AREA(); - test_pack_FPO_DATA(); - test_pack_GENERIC_MAPPING(); - test_pack_GLOBALHANDLE(); - test_pack_HALF_PTR(); - test_pack_HANDLE(); - test_pack_HCURSOR(); - test_pack_HFILE(); - test_pack_HGDIOBJ(); - test_pack_HGLOBAL(); - test_pack_HLOCAL(); - test_pack_HMODULE(); - test_pack_HRESULT(); - test_pack_IMAGE_ARCHIVE_MEMBER_HEADER(); - test_pack_IMAGE_AUX_SYMBOL(); - test_pack_IMAGE_BASE_RELOCATION(); - test_pack_IMAGE_BOUND_FORWARDER_REF(); - test_pack_IMAGE_BOUND_IMPORT_DESCRIPTOR(); - test_pack_IMAGE_COFF_SYMBOLS_HEADER(); - test_pack_IMAGE_DATA_DIRECTORY(); - test_pack_IMAGE_DEBUG_DIRECTORY(); - test_pack_IMAGE_DEBUG_MISC(); - test_pack_IMAGE_DOS_HEADER(); - test_pack_IMAGE_EXPORT_DIRECTORY(); - test_pack_IMAGE_FILE_HEADER(); - test_pack_IMAGE_FUNCTION_ENTRY(); - test_pack_IMAGE_IMPORT_BY_NAME(); - test_pack_IMAGE_IMPORT_DESCRIPTOR(); - test_pack_IMAGE_LINENUMBER(); - test_pack_IMAGE_LOAD_CONFIG_DIRECTORY(); - test_pack_IMAGE_NT_HEADERS(); - test_pack_IMAGE_NT_HEADERS32(); - test_pack_IMAGE_NT_HEADERS64(); - test_pack_IMAGE_OPTIONAL_HEADER(); - test_pack_IMAGE_OPTIONAL_HEADER32(); - test_pack_IMAGE_OPTIONAL_HEADER64(); - test_pack_IMAGE_OS2_HEADER(); - test_pack_IMAGE_RELOCATION(); - test_pack_IMAGE_RESOURCE_DATA_ENTRY(); - test_pack_IMAGE_RESOURCE_DIRECTORY(); - test_pack_IMAGE_RESOURCE_DIRECTORY_ENTRY(); - test_pack_IMAGE_RESOURCE_DIRECTORY_STRING(); - test_pack_IMAGE_RESOURCE_DIR_STRING_U(); - test_pack_IMAGE_SECTION_HEADER(); - test_pack_IMAGE_SEPARATE_DEBUG_HEADER(); - test_pack_IMAGE_SYMBOL(); - test_pack_IMAGE_THUNK_DATA(); - test_pack_IMAGE_TLS_DIRECTORY(); - test_pack_IMAGE_TLS_DIRECTORY32(); - test_pack_IMAGE_TLS_DIRECTORY64(); - test_pack_IMAGE_VXD_HEADER(); - test_pack_INT(); - test_pack_INT16(); - test_pack_INT32(); - test_pack_INT64(); - test_pack_INT8(); - test_pack_INT_PTR(); - test_pack_IO_COUNTERS(); - test_pack_LANGID(); - test_pack_LARGE_INTEGER(); - test_pack_LCID(); - test_pack_LIST_ENTRY(); - test_pack_LOCALHANDLE(); - test_pack_LONG(); - test_pack_LONG32(); - test_pack_LONG64(); - test_pack_LONGLONG(); - test_pack_LONG_PTR(); - test_pack_LPARAM(); - test_pack_LPCRECT(); - test_pack_LPCRECTL(); - test_pack_LPCVOID(); - test_pack_LPPOINT(); - test_pack_LPRECT(); - test_pack_LPRECTL(); - test_pack_LPSIZE(); - test_pack_LRESULT(); - test_pack_LUID(); - test_pack_LUID_AND_ATTRIBUTES(); - test_pack_MEMORY_BASIC_INFORMATION(); - test_pack_MESSAGE_RESOURCE_BLOCK(); - test_pack_MESSAGE_RESOURCE_DATA(); - test_pack_MESSAGE_RESOURCE_ENTRY(); - test_pack_NT_TIB(); - test_pack_OBJECT_TYPE_LIST(); - test_pack_PACCESS_ALLOWED_ACE(); - test_pack_PACCESS_DENIED_ACE(); - test_pack_PACCESS_TOKEN(); - test_pack_PACE_HEADER(); - test_pack_PACL(); - test_pack_PACL_REVISION_INFORMATION(); - test_pack_PACL_SIZE_INFORMATION(); - test_pack_PCCH(); - test_pack_PCH(); - test_pack_PCSTR(); - test_pack_PCTSTR(); - test_pack_PCWCH(); - test_pack_PCWSTR(); - test_pack_PEXCEPTION_POINTERS(); - test_pack_PEXCEPTION_RECORD(); - test_pack_PFLOATING_SAVE_AREA(); - test_pack_PFPO_DATA(); - test_pack_PGENERIC_MAPPING(); - test_pack_PHANDLE(); - test_pack_PIMAGE_ARCHIVE_MEMBER_HEADER(); - test_pack_PIMAGE_AUX_SYMBOL(); - test_pack_PIMAGE_BASE_RELOCATION(); - test_pack_PIMAGE_BOUND_FORWARDER_REF(); - test_pack_PIMAGE_BOUND_IMPORT_DESCRIPTOR(); - test_pack_PIMAGE_COFF_SYMBOLS_HEADER(); - test_pack_PIMAGE_DATA_DIRECTORY(); - test_pack_PIMAGE_DEBUG_DIRECTORY(); - test_pack_PIMAGE_DEBUG_MISC(); - test_pack_PIMAGE_DOS_HEADER(); - test_pack_PIMAGE_EXPORT_DIRECTORY(); - test_pack_PIMAGE_FILE_HEADER(); - test_pack_PIMAGE_FUNCTION_ENTRY(); - test_pack_PIMAGE_IMPORT_BY_NAME(); - test_pack_PIMAGE_IMPORT_DESCRIPTOR(); - test_pack_PIMAGE_LINENUMBER(); - test_pack_PIMAGE_LOAD_CONFIG_DIRECTORY(); - test_pack_PIMAGE_NT_HEADERS(); - test_pack_PIMAGE_NT_HEADERS32(); - test_pack_PIMAGE_NT_HEADERS64(); - test_pack_PIMAGE_OPTIONAL_HEADER(); - test_pack_PIMAGE_OPTIONAL_HEADER32(); - test_pack_PIMAGE_OPTIONAL_HEADER64(); - test_pack_PIMAGE_OS2_HEADER(); - test_pack_PIMAGE_RELOCATION(); - test_pack_PIMAGE_RESOURCE_DATA_ENTRY(); - test_pack_PIMAGE_RESOURCE_DIRECTORY(); - test_pack_PIMAGE_RESOURCE_DIRECTORY_ENTRY(); - test_pack_PIMAGE_RESOURCE_DIRECTORY_STRING(); - test_pack_PIMAGE_RESOURCE_DIR_STRING_U(); - test_pack_PIMAGE_SECTION_HEADER(); - test_pack_PIMAGE_SEPARATE_DEBUG_HEADER(); - test_pack_PIMAGE_SYMBOL(); - test_pack_PIMAGE_THUNK_DATA(); - test_pack_PIMAGE_TLS_CALLBACK(); - test_pack_PIMAGE_TLS_DIRECTORY(); - test_pack_PIMAGE_VXD_HEADER(); - test_pack_PIO_COUNTERS(); - test_pack_PISECURITY_DESCRIPTOR(); - test_pack_PISECURITY_DESCRIPTOR_RELATIVE(); - test_pack_PISID(); - test_pack_PLARGE_INTEGER(); - test_pack_PLIST_ENTRY(); - test_pack_PLUID(); - test_pack_PLUID_AND_ATTRIBUTES(); - test_pack_PMEMORY_BASIC_INFORMATION(); - test_pack_PMESSAGE_RESOURCE_BLOCK(); - test_pack_PMESSAGE_RESOURCE_DATA(); - test_pack_PMESSAGE_RESOURCE_ENTRY(); - test_pack_PNT_TIB(); - test_pack_POBJECT_TYPE_LIST(); - test_pack_POINT(); - test_pack_POINTL(); - test_pack_PPOINT(); - test_pack_PPOINTL(); - test_pack_PPRIVILEGE_SET(); - test_pack_PRECT(); - test_pack_PRECTL(); - test_pack_PRIVILEGE_SET(); - test_pack_PRLIST_ENTRY(); - test_pack_PROC(); - test_pack_PRTL_CRITICAL_SECTION(); - test_pack_PRTL_CRITICAL_SECTION_DEBUG(); - test_pack_PRTL_OSVERSIONINFOEXW(); - test_pack_PRTL_OSVERSIONINFOW(); - test_pack_PRTL_RESOURCE_DEBUG(); - test_pack_PSECURITY_DESCRIPTOR(); - test_pack_PSECURITY_QUALITY_OF_SERVICE(); - test_pack_PSID(); - test_pack_PSID_IDENTIFIER_AUTHORITY(); - test_pack_PSINGLE_LIST_ENTRY(); - test_pack_PSIZE(); - test_pack_PSTR(); - test_pack_PSYSTEM_ALARM_ACE(); - test_pack_PSYSTEM_AUDIT_ACE(); - test_pack_PSZ(); - test_pack_PTOKEN_GROUPS(); - test_pack_PTOKEN_PRIVILEGES(); - test_pack_PTOKEN_USER(); - test_pack_PTSTR(); - test_pack_PULARGE_INTEGER(); - test_pack_PVECTORED_EXCEPTION_HANDLER(); - test_pack_PVOID(); - test_pack_PWCH(); - test_pack_PWSTR(); - test_pack_RECT(); - test_pack_RECTL(); - test_pack_RTL_CRITICAL_SECTION(); - test_pack_RTL_CRITICAL_SECTION_DEBUG(); - test_pack_RTL_OSVERSIONINFOEXW(); - test_pack_RTL_OSVERSIONINFOW(); - test_pack_RTL_RESOURCE_DEBUG(); - test_pack_SECURITY_CONTEXT_TRACKING_MODE(); - test_pack_SECURITY_DESCRIPTOR(); - test_pack_SECURITY_DESCRIPTOR_CONTROL(); - test_pack_SECURITY_DESCRIPTOR_RELATIVE(); - test_pack_SECURITY_INFORMATION(); - test_pack_SECURITY_QUALITY_OF_SERVICE(); - test_pack_SHORT(); - test_pack_SID(); - test_pack_SID_AND_ATTRIBUTES(); - test_pack_SID_IDENTIFIER_AUTHORITY(); - test_pack_SINGLE_LIST_ENTRY(); - test_pack_SIZE(); - test_pack_SIZEL(); - test_pack_SIZE_T(); - test_pack_SSIZE_T(); - test_pack_SYSTEM_ALARM_ACE(); - test_pack_SYSTEM_AUDIT_ACE(); - test_pack_TCHAR(); - test_pack_TOKEN_DEFAULT_DACL(); - test_pack_TOKEN_GROUPS(); - test_pack_TOKEN_OWNER(); - test_pack_TOKEN_PRIMARY_GROUP(); - test_pack_TOKEN_PRIVILEGES(); - test_pack_TOKEN_SOURCE(); - test_pack_TOKEN_STATISTICS(); - test_pack_TOKEN_USER(); - test_pack_UCHAR(); - test_pack_UHALF_PTR(); - test_pack_UINT(); - test_pack_UINT16(); - test_pack_UINT32(); - test_pack_UINT64(); - test_pack_UINT8(); - test_pack_UINT_PTR(); - test_pack_ULARGE_INTEGER(); - test_pack_ULONG(); - test_pack_ULONG32(); - test_pack_ULONG64(); - test_pack_ULONGLONG(); - test_pack_ULONG_PTR(); - test_pack_USHORT(); - test_pack_WAITORTIMERCALLBACKFUNC(); - test_pack_WCHAR(); - test_pack_WORD(); - test_pack_WPARAM(); -} - -START_TEST(generated) -{ - test_pack(); -} diff --git a/rostests/winetests/ntdll/info.c b/rostests/winetests/ntdll/info.c deleted file mode 100755 index ec1ce3d2312..00000000000 --- a/rostests/winetests/ntdll/info.c +++ /dev/null @@ -1,1504 +0,0 @@ -/* Unit test suite for *Information* Registry API functions - * - * Copyright 2005 Paul Vriens - * - * 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 "ntdll_test.h" -#include -#include - -static NTSTATUS (WINAPI * pNtQuerySystemInformation)(SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG); -static NTSTATUS (WINAPI * pNtQueryInformationProcess)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG, PULONG); -static NTSTATUS (WINAPI * pNtQueryInformationThread)(HANDLE, THREADINFOCLASS, PVOID, ULONG, PULONG); -static NTSTATUS (WINAPI * pNtSetInformationProcess)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG); -static NTSTATUS (WINAPI * pNtSetInformationThread)(HANDLE, THREADINFOCLASS, PVOID, ULONG); -static NTSTATUS (WINAPI * pNtReadVirtualMemory)(HANDLE, const void*, void*, SIZE_T, SIZE_T*); -static NTSTATUS (WINAPI * pNtQueryVirtualMemory)(HANDLE, LPCVOID, MEMORY_INFORMATION_CLASS , PVOID , SIZE_T , SIZE_T *); -static NTSTATUS (WINAPI * pNtCreateSection)(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const LARGE_INTEGER*,ULONG,ULONG,HANDLE); -static NTSTATUS (WINAPI * pNtMapViewOfSection)(HANDLE,HANDLE,PVOID*,ULONG,SIZE_T,const LARGE_INTEGER*,SIZE_T*,SECTION_INHERIT,ULONG,ULONG); -static NTSTATUS (WINAPI * pNtUnmapViewOfSection)(HANDLE,PVOID); -static NTSTATUS (WINAPI * pNtClose)(HANDLE); -static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL); - -static BOOL is_wow64; - -/* one_before_last_pid is used to be able to compare values of a still running process - with the output of the test_query_process_times and test_query_process_handlecount tests. -*/ -static DWORD one_before_last_pid = 0; - -#define NTDLL_GET_PROC(func) do { \ - p ## func = (void*)GetProcAddress(hntdll, #func); \ - if(!p ## func) { \ - trace("GetProcAddress(%s) failed\n", #func); \ - return FALSE; \ - } \ - } while(0) - -static BOOL InitFunctionPtrs(void) -{ - /* All needed functions are NT based, so using GetModuleHandle is a good check */ - HMODULE hntdll = GetModuleHandle("ntdll"); - if (!hntdll) - { - win_skip("Not running on NT\n"); - return FALSE; - } - - NTDLL_GET_PROC(NtQuerySystemInformation); - NTDLL_GET_PROC(NtQueryInformationProcess); - NTDLL_GET_PROC(NtQueryInformationThread); - NTDLL_GET_PROC(NtSetInformationProcess); - NTDLL_GET_PROC(NtSetInformationThread); - NTDLL_GET_PROC(NtReadVirtualMemory); - NTDLL_GET_PROC(NtQueryVirtualMemory); - NTDLL_GET_PROC(NtClose); - NTDLL_GET_PROC(NtCreateSection); - NTDLL_GET_PROC(NtMapViewOfSection); - NTDLL_GET_PROC(NtUnmapViewOfSection); - - pIsWow64Process = (void *)GetProcAddress(GetModuleHandle("kernel32.dll"), "IsWow64Process"); - if (!pIsWow64Process || !pIsWow64Process( GetCurrentProcess(), &is_wow64 )) is_wow64 = FALSE; - return TRUE; -} - -static void test_query_basic(void) -{ - NTSTATUS status; - ULONG ReturnLength; - SYSTEM_BASIC_INFORMATION sbi; - - /* This test also covers some basic parameter testing that should be the same for - * every information class - */ - - /* Use a nonexistent info class */ - trace("Check nonexistent info class\n"); - status = pNtQuerySystemInformation(-1, NULL, 0, NULL); - ok( status == STATUS_INVALID_INFO_CLASS || status == STATUS_NOT_IMPLEMENTED /* vista */, - "Expected STATUS_INVALID_INFO_CLASS or STATUS_NOT_IMPLEMENTED, got %08x\n", status); - - /* Use an existing class but with a zero-length buffer */ - trace("Check zero-length buffer\n"); - status = pNtQuerySystemInformation(SystemBasicInformation, NULL, 0, NULL); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - - /* Use an existing class, correct length but no SystemInformation buffer */ - trace("Check no SystemInformation buffer\n"); - status = pNtQuerySystemInformation(SystemBasicInformation, NULL, sizeof(sbi), NULL); - ok( status == STATUS_ACCESS_VIOLATION || status == STATUS_INVALID_PARAMETER /* vista */, - "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER, got %08x\n", status); - - /* Use a existing class, correct length, a pointer to a buffer but no ReturnLength pointer */ - trace("Check no ReturnLength pointer\n"); - status = pNtQuerySystemInformation(SystemBasicInformation, &sbi, sizeof(sbi), NULL); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - - /* Check a too large buffer size */ - trace("Check a too large buffer size\n"); - status = pNtQuerySystemInformation(SystemBasicInformation, &sbi, sizeof(sbi) * 2, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - - /* Finally some correct calls */ - trace("Check with correct parameters\n"); - status = pNtQuerySystemInformation(SystemBasicInformation, &sbi, sizeof(sbi), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( sizeof(sbi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); - - /* Check if we have some return values */ - trace("Number of Processors : %d\n", sbi.NumberOfProcessors); - ok( sbi.NumberOfProcessors > 0, "Expected more than 0 processors, got %d\n", sbi.NumberOfProcessors); -} - -static void test_query_cpu(void) -{ - DWORD status; - ULONG ReturnLength; - SYSTEM_CPU_INFORMATION sci; - - status = pNtQuerySystemInformation(SystemCpuInformation, &sci, sizeof(sci), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( sizeof(sci) == ReturnLength, "Inconsistent length %d\n", ReturnLength); - - /* Check if we have some return values */ - trace("Processor FeatureSet : %08x\n", sci.FeatureSet); - ok( sci.FeatureSet != 0, "Expected some features for this processor, got %08x\n", sci.FeatureSet); -} - -static void test_query_performance(void) -{ - NTSTATUS status; - ULONG ReturnLength; - ULONGLONG buffer[sizeof(SYSTEM_PERFORMANCE_INFORMATION)/sizeof(ULONGLONG) + 5]; - DWORD size = sizeof(SYSTEM_PERFORMANCE_INFORMATION); - - status = pNtQuerySystemInformation(SystemPerformanceInformation, buffer, 0, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - - status = pNtQuerySystemInformation(SystemPerformanceInformation, buffer, size, &ReturnLength); - if (status == STATUS_INFO_LENGTH_MISMATCH && is_wow64) - { - /* size is larger on wow64 under w2k8/win7 */ - size += 16; - status = pNtQuerySystemInformation(SystemPerformanceInformation, buffer, size, &ReturnLength); - } - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( ReturnLength == size, "Inconsistent length %d\n", ReturnLength); - - status = pNtQuerySystemInformation(SystemPerformanceInformation, buffer, size + 2, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( ReturnLength == size || ReturnLength == size + 2, - "Inconsistent length %d\n", ReturnLength); - - /* Not return values yet, as struct members are unknown */ -} - -static void test_query_timeofday(void) -{ - NTSTATUS status; - ULONG ReturnLength; - - /* Copy of our winternl.h structure turned into a private one */ - typedef struct _SYSTEM_TIMEOFDAY_INFORMATION_PRIVATE { - LARGE_INTEGER liKeBootTime; - LARGE_INTEGER liKeSystemTime; - LARGE_INTEGER liExpTimeZoneBias; - ULONG uCurrentTimeZoneId; - DWORD dwUnknown1[5]; - } SYSTEM_TIMEOFDAY_INFORMATION_PRIVATE, *PSYSTEM_TIMEOFDAY_INFORMATION_PRIVATE; - - SYSTEM_TIMEOFDAY_INFORMATION_PRIVATE sti; - - /* The struct size for NT (32 bytes) and Win2K/XP (48 bytes) differ. - * - * Windows 2000 and XP return STATUS_INFO_LENGTH_MISMATCH if the given buffer size is greater - * then 48 and 0 otherwise - * Windows NT returns STATUS_INFO_LENGTH_MISMATCH when the given buffer size is not correct - * and 0 otherwise - * - * Windows 2000 and XP copy the given buffer size into the provided buffer, if the return code is STATUS_SUCCESS - * NT only fills the buffer if the return code is STATUS_SUCCESS - * - */ - - status = pNtQuerySystemInformation(SystemTimeOfDayInformation, &sti, sizeof(sti), &ReturnLength); - - if (status == STATUS_INFO_LENGTH_MISMATCH) - { - trace("Windows version is NT, we have to cater for differences with W2K/WinXP\n"); - - status = pNtQuerySystemInformation(SystemTimeOfDayInformation, &sti, 0, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - ok( 0 == ReturnLength, "ReturnLength should be 0, it is (%d)\n", ReturnLength); - - sti.uCurrentTimeZoneId = 0xdeadbeef; - status = pNtQuerySystemInformation(SystemTimeOfDayInformation, &sti, 28, &ReturnLength); - ok(status == STATUS_SUCCESS || broken(status == STATUS_INFO_LENGTH_MISMATCH /* NT4 */), "Expected STATUS_SUCCESS, got %08x\n", status); - ok( 0xdeadbeef == sti.uCurrentTimeZoneId, "This part of the buffer should not have been filled\n"); - - status = pNtQuerySystemInformation(SystemTimeOfDayInformation, &sti, 32, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( 32 == ReturnLength, "ReturnLength should be 0, it is (%d)\n", ReturnLength); - } - else - { - status = pNtQuerySystemInformation(SystemTimeOfDayInformation, &sti, 0, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( 0 == ReturnLength, "ReturnLength should be 0, it is (%d)\n", ReturnLength); - - sti.uCurrentTimeZoneId = 0xdeadbeef; - status = pNtQuerySystemInformation(SystemTimeOfDayInformation, &sti, 24, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( 24 == ReturnLength, "ReturnLength should be 24, it is (%d)\n", ReturnLength); - ok( 0xdeadbeef == sti.uCurrentTimeZoneId, "This part of the buffer should not have been filled\n"); - - sti.uCurrentTimeZoneId = 0xdeadbeef; - status = pNtQuerySystemInformation(SystemTimeOfDayInformation, &sti, 32, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( 32 == ReturnLength, "ReturnLength should be 32, it is (%d)\n", ReturnLength); - ok( 0xdeadbeef != sti.uCurrentTimeZoneId, "Buffer should have been partially filled\n"); - - status = pNtQuerySystemInformation(SystemTimeOfDayInformation, &sti, 49, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - ok( ReturnLength == 0 || ReturnLength == sizeof(sti) /* vista */, - "ReturnLength should be 0, it is (%d)\n", ReturnLength); - - status = pNtQuerySystemInformation(SystemTimeOfDayInformation, &sti, sizeof(sti), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( sizeof(sti) == ReturnLength, "Inconsistent length %d\n", ReturnLength); - } - - /* Check if we have some return values */ - trace("uCurrentTimeZoneId : (%d)\n", sti.uCurrentTimeZoneId); -} - -static void test_query_process(void) -{ - NTSTATUS status; - DWORD last_pid; - ULONG ReturnLength; - int i = 0, k = 0; - int is_nt = 0; - SYSTEM_BASIC_INFORMATION sbi; - - /* Copy of our winternl.h structure turned into a private one */ - typedef struct _SYSTEM_PROCESS_INFORMATION_PRIVATE { - ULONG NextEntryOffset; - DWORD dwThreadCount; - DWORD dwUnknown1[6]; - FILETIME ftCreationTime; - FILETIME ftUserTime; - FILETIME ftKernelTime; - UNICODE_STRING ProcessName; - DWORD dwBasePriority; - HANDLE UniqueProcessId; - HANDLE ParentProcessId; - ULONG HandleCount; - DWORD dwUnknown3; - DWORD dwUnknown4; - VM_COUNTERS vmCounters; - IO_COUNTERS ioCounters; - SYSTEM_THREAD_INFORMATION ti[1]; - } SYSTEM_PROCESS_INFORMATION_PRIVATE, *PSYSTEM_PROCESS_INFORMATION_PRIVATE; - - ULONG SystemInformationLength = sizeof(SYSTEM_PROCESS_INFORMATION_PRIVATE); - SYSTEM_PROCESS_INFORMATION_PRIVATE *spi, *spi_buf = HeapAlloc(GetProcessHeap(), 0, SystemInformationLength); - - /* Only W2K3 returns the needed length, the rest returns 0, so we have to loop */ - - for (;;) - { - status = pNtQuerySystemInformation(SystemProcessInformation, spi_buf, SystemInformationLength, &ReturnLength); - - if (status != STATUS_INFO_LENGTH_MISMATCH) break; - - spi_buf = HeapReAlloc(GetProcessHeap(), 0, spi_buf , SystemInformationLength *= 2); - } - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - spi = spi_buf; - - /* Get the first NextEntryOffset, from this we can deduce the OS version we're running - * - * W2K/WinXP/W2K3: - * NextEntryOffset for a process is 184 + (no. of threads) * sizeof(SYSTEM_THREAD_INFORMATION) - * NT: - * NextEntryOffset for a process is 136 + (no. of threads) * sizeof(SYSTEM_THREAD_INFORMATION) - * Wine (with every windows version): - * NextEntryOffset for a process is 0 if just this test is running - * NextEntryOffset for a process is 184 + (no. of threads) * sizeof(SYSTEM_THREAD_INFORMATION) + - * ProcessName.MaximumLength - * if more wine processes are running - * - * Note : On windows the first process is in fact the Idle 'process' with a thread for every processor - */ - - pNtQuerySystemInformation(SystemBasicInformation, &sbi, sizeof(sbi), &ReturnLength); - - is_nt = ( spi->NextEntryOffset - (sbi.NumberOfProcessors * sizeof(SYSTEM_THREAD_INFORMATION)) == 136); - - if (is_nt) win_skip("Windows version is NT, we will skip thread tests\n"); - - /* Check if we have some return values - * - * On windows there will be several processes running (Including the always present Idle and System) - * On wine we only have one (if this test is the only wine process running) - */ - - /* Loop through the processes */ - - for (;;) - { - i++; - - last_pid = (DWORD_PTR)spi->UniqueProcessId; - - ok( spi->dwThreadCount > 0, "Expected some threads for this process, got 0\n"); - - /* Loop through the threads, skip NT4 for now */ - - if (!is_nt) - { - DWORD j; - for ( j = 0; j < spi->dwThreadCount; j++) - { - k++; - ok ( spi->ti[j].ClientId.UniqueProcess == spi->UniqueProcessId, - "The owning pid of the thread (%p) doesn't equal the pid (%p) of the process\n", - spi->ti[j].ClientId.UniqueProcess, spi->UniqueProcessId); - } - } - - if (!spi->NextEntryOffset) break; - - one_before_last_pid = last_pid; - - spi = (SYSTEM_PROCESS_INFORMATION_PRIVATE*)((char*)spi + spi->NextEntryOffset); - } - trace("Total number of running processes : %d\n", i); - if (!is_nt) trace("Total number of running threads : %d\n", k); - - if (one_before_last_pid == 0) one_before_last_pid = last_pid; - - HeapFree( GetProcessHeap(), 0, spi_buf); -} - -static void test_query_procperf(void) -{ - NTSTATUS status; - ULONG ReturnLength; - ULONG NeededLength; - SYSTEM_BASIC_INFORMATION sbi; - SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION* sppi; - - /* Find out the number of processors */ - status = pNtQuerySystemInformation(SystemBasicInformation, &sbi, sizeof(sbi), &ReturnLength); - ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - NeededLength = sbi.NumberOfProcessors * sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION); - - sppi = HeapAlloc(GetProcessHeap(), 0, NeededLength); - - status = pNtQuerySystemInformation(SystemProcessorPerformanceInformation, sppi, 0, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - - /* Try it for 1 processor */ - sppi->KernelTime.QuadPart = 0xdeaddead; - sppi->UserTime.QuadPart = 0xdeaddead; - sppi->IdleTime.QuadPart = 0xdeaddead; - status = pNtQuerySystemInformation(SystemProcessorPerformanceInformation, sppi, - sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION) == ReturnLength, - "Inconsistent length %d\n", ReturnLength); - ok (sppi->KernelTime.QuadPart != 0xdeaddead, "KernelTime unchanged\n"); - ok (sppi->UserTime.QuadPart != 0xdeaddead, "UserTime unchanged\n"); - ok (sppi->IdleTime.QuadPart != 0xdeaddead, "IdleTime unchanged\n"); - - /* Try it for all processors */ - sppi->KernelTime.QuadPart = 0xdeaddead; - sppi->UserTime.QuadPart = 0xdeaddead; - sppi->IdleTime.QuadPart = 0xdeaddead; - status = pNtQuerySystemInformation(SystemProcessorPerformanceInformation, sppi, NeededLength, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( NeededLength == ReturnLength, "Inconsistent length (%d) <-> (%d)\n", NeededLength, ReturnLength); - ok (sppi->KernelTime.QuadPart != 0xdeaddead, "KernelTime unchanged\n"); - ok (sppi->UserTime.QuadPart != 0xdeaddead, "UserTime unchanged\n"); - ok (sppi->IdleTime.QuadPart != 0xdeaddead, "IdleTime unchanged\n"); - - /* A too large given buffer size */ - sppi = HeapReAlloc(GetProcessHeap(), 0, sppi , NeededLength + 2); - sppi->KernelTime.QuadPart = 0xdeaddead; - sppi->UserTime.QuadPart = 0xdeaddead; - sppi->IdleTime.QuadPart = 0xdeaddead; - status = pNtQuerySystemInformation(SystemProcessorPerformanceInformation, sppi, NeededLength + 2, &ReturnLength); - ok( status == STATUS_SUCCESS || status == STATUS_INFO_LENGTH_MISMATCH /* vista */, - "Expected STATUS_SUCCESS or STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - ok( NeededLength == ReturnLength, "Inconsistent length (%d) <-> (%d)\n", NeededLength, ReturnLength); - if (status == STATUS_SUCCESS) - { - ok (sppi->KernelTime.QuadPart != 0xdeaddead, "KernelTime unchanged\n"); - ok (sppi->UserTime.QuadPart != 0xdeaddead, "UserTime unchanged\n"); - ok (sppi->IdleTime.QuadPart != 0xdeaddead, "IdleTime unchanged\n"); - } - else /* vista and 2008 */ - { - ok (sppi->KernelTime.QuadPart == 0xdeaddead, "KernelTime changed\n"); - ok (sppi->UserTime.QuadPart == 0xdeaddead, "UserTime changed\n"); - ok (sppi->IdleTime.QuadPart == 0xdeaddead, "IdleTime changed\n"); - } - - HeapFree( GetProcessHeap(), 0, sppi); -} - -static void test_query_module(void) -{ - NTSTATUS status; - ULONG ReturnLength; - ULONG ModuleCount, i; - - ULONG SystemInformationLength = sizeof(SYSTEM_MODULE_INFORMATION); - SYSTEM_MODULE_INFORMATION* smi = HeapAlloc(GetProcessHeap(), 0, SystemInformationLength); - SYSTEM_MODULE* sm; - - /* Request the needed length */ - status = pNtQuerySystemInformation(SystemModuleInformation, smi, 0, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - ok( ReturnLength > 0, "Expected a ReturnLength to show the needed length\n"); - - SystemInformationLength = ReturnLength; - smi = HeapReAlloc(GetProcessHeap(), 0, smi , SystemInformationLength); - status = pNtQuerySystemInformation(SystemModuleInformation, smi, SystemInformationLength, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - - ModuleCount = smi->ModulesCount; - sm = &smi->Modules[0]; - /* our implementation is a stub for now */ - ok( ModuleCount > 0, "Expected some modules to be loaded\n"); - - /* Loop through all the modules/drivers, Wine doesn't get here (yet) */ - for (i = 0; i < ModuleCount ; i++) - { - ok( i == sm->Id, "Id (%d) should have matched %u\n", sm->Id, i); - sm++; - } - - HeapFree( GetProcessHeap(), 0, smi); -} - -static void test_query_handle(void) -{ - NTSTATUS status; - ULONG ReturnLength; - ULONG SystemInformationLength = sizeof(SYSTEM_HANDLE_INFORMATION); - SYSTEM_HANDLE_INFORMATION* shi = HeapAlloc(GetProcessHeap(), 0, SystemInformationLength); - - /* Request the needed length : a SystemInformationLength greater than one struct sets ReturnLength */ - status = pNtQuerySystemInformation(SystemHandleInformation, shi, SystemInformationLength, &ReturnLength); - todo_wine ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - - SystemInformationLength = ReturnLength; - shi = HeapReAlloc(GetProcessHeap(), 0, shi , SystemInformationLength); - status = pNtQuerySystemInformation(SystemHandleInformation, shi, SystemInformationLength, &ReturnLength); - if (status != STATUS_INFO_LENGTH_MISMATCH) /* vista */ - { - ok( status == STATUS_SUCCESS, - "Expected STATUS_SUCCESS, got %08x\n", status); - - /* Check if we have some return values */ - trace("Number of Handles : %d\n", shi->Count); - todo_wine - { - /* our implementation is a stub for now */ - ok( shi->Count > 1, "Expected more than 1 handles, got (%d)\n", shi->Count); - } - } - HeapFree( GetProcessHeap(), 0, shi); -} - -static void test_query_cache(void) -{ - NTSTATUS status; - ULONG ReturnLength; - SYSTEM_CACHE_INFORMATION sci; - - status = pNtQuerySystemInformation(SystemCacheInformation, &sci, 0, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - - status = pNtQuerySystemInformation(SystemCacheInformation, &sci, sizeof(sci), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( sizeof(sci) == ReturnLength, "Inconsistent length %d\n", ReturnLength); - - status = pNtQuerySystemInformation(SystemCacheInformation, &sci, sizeof(sci) + 2, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( sizeof(sci) == ReturnLength, "Inconsistent length %d\n", ReturnLength); -} - -static void test_query_interrupt(void) -{ - NTSTATUS status; - ULONG ReturnLength; - ULONG NeededLength; - SYSTEM_BASIC_INFORMATION sbi; - SYSTEM_INTERRUPT_INFORMATION* sii; - - /* Find out the number of processors */ - status = pNtQuerySystemInformation(SystemBasicInformation, &sbi, sizeof(sbi), &ReturnLength); - ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - NeededLength = sbi.NumberOfProcessors * sizeof(SYSTEM_INTERRUPT_INFORMATION); - - sii = HeapAlloc(GetProcessHeap(), 0, NeededLength); - - status = pNtQuerySystemInformation(SystemInterruptInformation, sii, 0, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - - /* Try it for all processors */ - status = pNtQuerySystemInformation(SystemInterruptInformation, sii, NeededLength, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - - /* Windows XP and W2K3 (and others?) always return 0 for the ReturnLength - * No test added for this as it's highly unlikely that an app depends on this - */ - - HeapFree( GetProcessHeap(), 0, sii); -} - -static void test_query_kerndebug(void) -{ - NTSTATUS status; - ULONG ReturnLength; - SYSTEM_KERNEL_DEBUGGER_INFORMATION skdi; - - status = pNtQuerySystemInformation(SystemKernelDebuggerInformation, &skdi, 0, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - - status = pNtQuerySystemInformation(SystemKernelDebuggerInformation, &skdi, sizeof(skdi), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( sizeof(skdi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); - - status = pNtQuerySystemInformation(SystemKernelDebuggerInformation, &skdi, sizeof(skdi) + 2, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( sizeof(skdi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); -} - -static void test_query_regquota(void) -{ - NTSTATUS status; - ULONG ReturnLength; - SYSTEM_REGISTRY_QUOTA_INFORMATION srqi; - - status = pNtQuerySystemInformation(SystemRegistryQuotaInformation, &srqi, 0, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - - status = pNtQuerySystemInformation(SystemRegistryQuotaInformation, &srqi, sizeof(srqi), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( sizeof(srqi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); - - status = pNtQuerySystemInformation(SystemRegistryQuotaInformation, &srqi, sizeof(srqi) + 2, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( sizeof(srqi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); -} - -static void test_query_process_basic(void) -{ - NTSTATUS status; - ULONG ReturnLength; - - typedef struct _PROCESS_BASIC_INFORMATION_PRIVATE { - DWORD_PTR ExitStatus; - PPEB PebBaseAddress; - DWORD_PTR AffinityMask; - DWORD_PTR BasePriority; - ULONG_PTR UniqueProcessId; - ULONG_PTR InheritedFromUniqueProcessId; - } PROCESS_BASIC_INFORMATION_PRIVATE, *PPROCESS_BASIC_INFORMATION_PRIVATE; - - PROCESS_BASIC_INFORMATION_PRIVATE pbi; - - /* This test also covers some basic parameter testing that should be the same for - * every information class - */ - - /* Use a nonexistent info class */ - trace("Check nonexistent info class\n"); - status = pNtQueryInformationProcess(NULL, -1, NULL, 0, NULL); - ok( status == STATUS_INVALID_INFO_CLASS || status == STATUS_NOT_IMPLEMENTED /* vista */, - "Expected STATUS_INVALID_INFO_CLASS or STATUS_NOT_IMPLEMENTED, got %08x\n", status); - - /* Do not give a handle and buffer */ - trace("Check NULL handle and buffer and zero-length buffersize\n"); - status = pNtQueryInformationProcess(NULL, ProcessBasicInformation, NULL, 0, NULL); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - - /* Use a correct info class and buffer size, but still no handle and buffer */ - trace("Check NULL handle and buffer\n"); - status = pNtQueryInformationProcess(NULL, ProcessBasicInformation, NULL, sizeof(pbi), NULL); - ok( status == STATUS_ACCESS_VIOLATION || status == STATUS_INVALID_HANDLE, - "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08x\n", status); - - /* Use a correct info class and buffer size, but still no handle */ - trace("Check NULL handle\n"); - status = pNtQueryInformationProcess(NULL, ProcessBasicInformation, &pbi, sizeof(pbi), NULL); - ok( status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %08x\n", status); - - /* Use a greater buffer size */ - trace("Check NULL handle and too large buffersize\n"); - status = pNtQueryInformationProcess(NULL, ProcessBasicInformation, &pbi, sizeof(pbi) * 2, NULL); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - - /* Use no ReturnLength */ - trace("Check NULL ReturnLength\n"); - status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessBasicInformation, &pbi, sizeof(pbi), NULL); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - - /* Finally some correct calls */ - trace("Check with correct parameters\n"); - status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessBasicInformation, &pbi, sizeof(pbi), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( sizeof(pbi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); - - /* Everything is correct except a too large buffersize */ - trace("Too large buffersize\n"); - status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessBasicInformation, &pbi, sizeof(pbi) * 2, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - ok( sizeof(pbi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); - - /* Check if we have some return values */ - trace("ProcessID : %lx\n", pbi.UniqueProcessId); - ok( pbi.UniqueProcessId > 0, "Expected a ProcessID > 0, got 0\n"); -} - -static void test_query_process_vm(void) -{ - NTSTATUS status; - ULONG ReturnLength; - VM_COUNTERS pvi; - ULONG old_size = FIELD_OFFSET(VM_COUNTERS,PrivatePageCount); - - status = pNtQueryInformationProcess(NULL, ProcessVmCounters, NULL, sizeof(pvi), NULL); - ok( status == STATUS_ACCESS_VIOLATION || status == STATUS_INVALID_HANDLE, - "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08x\n", status); - - status = pNtQueryInformationProcess(NULL, ProcessVmCounters, &pvi, old_size, NULL); - ok( status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %08x\n", status); - - /* Windows XP and W2K3 will report success for a size of 44 AND 48 ! - Windows W2K will only report success for 44. - For now we only care for 44, which is FIELD_OFFSET(VM_COUNTERS,PrivatePageCount)) - */ - - status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessVmCounters, &pvi, 24, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - - status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessVmCounters, &pvi, old_size, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( old_size == ReturnLength, "Inconsistent length %d\n", ReturnLength); - - status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessVmCounters, &pvi, 46, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - ok( ReturnLength == old_size || ReturnLength == sizeof(pvi), "Inconsistent length %d\n", ReturnLength); - - /* Check if we have some return values */ - trace("WorkingSetSize : %ld\n", pvi.WorkingSetSize); - todo_wine - { - ok( pvi.WorkingSetSize > 0, "Expected a WorkingSetSize > 0\n"); - } -} - -static void test_query_process_io(void) -{ - NTSTATUS status; - ULONG ReturnLength; - IO_COUNTERS pii; - - /* NT4 doesn't support this information class, so check for it */ - status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessIoCounters, &pii, sizeof(pii), &ReturnLength); - if (status == STATUS_NOT_SUPPORTED) - { - win_skip("ProcessIoCounters information class is not supported\n"); - return; - } - - status = pNtQueryInformationProcess(NULL, ProcessIoCounters, NULL, sizeof(pii), NULL); - ok( status == STATUS_ACCESS_VIOLATION || status == STATUS_INVALID_HANDLE, - "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08x\n", status); - - status = pNtQueryInformationProcess(NULL, ProcessIoCounters, &pii, sizeof(pii), NULL); - ok( status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %08x\n", status); - - status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessIoCounters, &pii, 24, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - - status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessIoCounters, &pii, sizeof(pii), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( sizeof(pii) == ReturnLength, "Inconsistent length %d\n", ReturnLength); - - status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessIoCounters, &pii, sizeof(pii) * 2, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - ok( sizeof(pii) == ReturnLength, "Inconsistent length %d\n", ReturnLength); - - /* Check if we have some return values */ - trace("OtherOperationCount : 0x%x%08x\n", (DWORD)(pii.OtherOperationCount >> 32), (DWORD)pii.OtherOperationCount); - todo_wine - { - ok( pii.OtherOperationCount > 0, "Expected an OtherOperationCount > 0\n"); - } -} - -static void test_query_process_times(void) -{ - NTSTATUS status; - ULONG ReturnLength; - HANDLE process; - SYSTEMTIME UTC, Local; - KERNEL_USER_TIMES spti; - - status = pNtQueryInformationProcess(NULL, ProcessTimes, NULL, sizeof(spti), NULL); - ok( status == STATUS_ACCESS_VIOLATION || status == STATUS_INVALID_HANDLE, - "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08x\n", status); - - status = pNtQueryInformationProcess(NULL, ProcessTimes, &spti, sizeof(spti), NULL); - ok( status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %08x\n", status); - - status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessTimes, &spti, 24, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - - process = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, one_before_last_pid); - if (!process) - { - trace("Could not open process with ID : %d, error : %u. Going to use current one.\n", one_before_last_pid, GetLastError()); - process = GetCurrentProcess(); - trace("ProcessTimes for current process\n"); - } - else - trace("ProcessTimes for process with ID : %d\n", one_before_last_pid); - - status = pNtQueryInformationProcess( process, ProcessTimes, &spti, sizeof(spti), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( sizeof(spti) == ReturnLength, "Inconsistent length %d\n", ReturnLength); - CloseHandle(process); - - FileTimeToSystemTime((const FILETIME *)&spti.CreateTime, &UTC); - SystemTimeToTzSpecificLocalTime(NULL, &UTC, &Local); - trace("CreateTime : %02d/%02d/%04d %02d:%02d:%02d\n", Local.wMonth, Local.wDay, Local.wYear, - Local.wHour, Local.wMinute, Local.wSecond); - - FileTimeToSystemTime((const FILETIME *)&spti.ExitTime, &UTC); - SystemTimeToTzSpecificLocalTime(NULL, &UTC, &Local); - trace("ExitTime : %02d/%02d/%04d %02d:%02d:%02d\n", Local.wMonth, Local.wDay, Local.wYear, - Local.wHour, Local.wMinute, Local.wSecond); - - FileTimeToSystemTime((const FILETIME *)&spti.KernelTime, &Local); - trace("KernelTime : %02d:%02d:%02d.%03d\n", Local.wHour, Local.wMinute, Local.wSecond, Local.wMilliseconds); - - FileTimeToSystemTime((const FILETIME *)&spti.UserTime, &Local); - trace("UserTime : %02d:%02d:%02d.%03d\n", Local.wHour, Local.wMinute, Local.wSecond, Local.wMilliseconds); - - status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessTimes, &spti, sizeof(spti) * 2, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - ok( sizeof(spti) == ReturnLength || - ReturnLength == 0 /* vista */ || - broken(is_wow64), /* returns garbage on wow64 */ - "Inconsistent length %d\n", ReturnLength); -} - -static void test_query_process_debug_port(int argc, char **argv) -{ - DWORD_PTR debug_port = 0xdeadbeef; - char cmdline[MAX_PATH]; - PROCESS_INFORMATION pi; - STARTUPINFO si = { 0 }; - NTSTATUS status; - BOOL ret; - - sprintf(cmdline, "%s %s %s", argv[0], argv[1], "debuggee"); - - si.cb = sizeof(si); - ret = CreateProcess(NULL, cmdline, NULL, NULL, FALSE, DEBUG_PROCESS, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess failed, last error %#x.\n", GetLastError()); - if (!ret) return; - - status = pNtQueryInformationProcess(NULL, ProcessDebugPort, - NULL, 0, NULL); - ok(status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %#x.\n", status); - - status = pNtQueryInformationProcess(NULL, ProcessDebugPort, - NULL, sizeof(debug_port), NULL); - ok(status == STATUS_INVALID_HANDLE || status == STATUS_ACCESS_VIOLATION, - "Expected STATUS_INVALID_HANDLE, got %#x.\n", status); - - status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessDebugPort, - NULL, sizeof(debug_port), NULL); - ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got %#x.\n", status); - - status = pNtQueryInformationProcess(NULL, ProcessDebugPort, - &debug_port, sizeof(debug_port), NULL); - ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_ACCESS_VIOLATION, got %#x.\n", status); - - status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessDebugPort, - &debug_port, sizeof(debug_port) - 1, NULL); - ok(status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %#x.\n", status); - - status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessDebugPort, - &debug_port, sizeof(debug_port) + 1, NULL); - ok(status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %#x.\n", status); - - status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessDebugPort, - &debug_port, sizeof(debug_port), NULL); - ok(!status, "NtQueryInformationProcess failed, status %#x.\n", status); - ok(debug_port == 0, "Expected port 0, got %#lx.\n", debug_port); - - status = pNtQueryInformationProcess(pi.hProcess, ProcessDebugPort, - &debug_port, sizeof(debug_port), NULL); - ok(!status, "NtQueryInformationProcess failed, status %#x.\n", status); - ok(debug_port == ~(DWORD_PTR)0, "Expected port %#lx, got %#lx.\n", ~(DWORD_PTR)0, debug_port); - - for (;;) - { - DEBUG_EVENT ev; - - ret = WaitForDebugEvent(&ev, INFINITE); - ok(ret, "WaitForDebugEvent failed, last error %#x.\n", GetLastError()); - if (!ret) break; - - if (ev.dwDebugEventCode == EXIT_PROCESS_DEBUG_EVENT) break; - - ret = ContinueDebugEvent(ev.dwProcessId, ev.dwThreadId, DBG_CONTINUE); - ok(ret, "ContinueDebugEvent failed, last error %#x.\n", GetLastError()); - if (!ret) break; - } - - ret = CloseHandle(pi.hThread); - ok(ret, "CloseHandle failed, last error %#x.\n", GetLastError()); - ret = CloseHandle(pi.hProcess); - ok(ret, "CloseHandle failed, last error %#x.\n", GetLastError()); -} - -static void test_query_process_handlecount(void) -{ - NTSTATUS status; - ULONG ReturnLength; - DWORD handlecount; - BYTE buffer[2 * sizeof(DWORD)]; - HANDLE process; - - status = pNtQueryInformationProcess(NULL, ProcessHandleCount, NULL, sizeof(handlecount), NULL); - ok( status == STATUS_ACCESS_VIOLATION || status == STATUS_INVALID_HANDLE, - "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08x\n", status); - - status = pNtQueryInformationProcess(NULL, ProcessHandleCount, &handlecount, sizeof(handlecount), NULL); - ok( status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %08x\n", status); - - status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessHandleCount, &handlecount, 2, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - - process = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, one_before_last_pid); - if (!process) - { - trace("Could not open process with ID : %d, error : %u. Going to use current one.\n", one_before_last_pid, GetLastError()); - process = GetCurrentProcess(); - trace("ProcessHandleCount for current process\n"); - } - else - trace("ProcessHandleCount for process with ID : %d\n", one_before_last_pid); - - status = pNtQueryInformationProcess( process, ProcessHandleCount, &handlecount, sizeof(handlecount), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( sizeof(handlecount) == ReturnLength, "Inconsistent length %d\n", ReturnLength); - CloseHandle(process); - - status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessHandleCount, buffer, sizeof(buffer), &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH || status == STATUS_SUCCESS, - "Expected STATUS_INFO_LENGTH_MISMATCH or STATUS_SUCCESS, got %08x\n", status); - ok( sizeof(handlecount) == ReturnLength, "Inconsistent length %d\n", ReturnLength); - - /* Check if we have some return values */ - trace("HandleCount : %d\n", handlecount); - todo_wine - { - ok( handlecount > 0, "Expected some handles, got 0\n"); - } -} - -static void test_query_process_image_file_name(void) -{ - NTSTATUS status; - ULONG ReturnLength; - UNICODE_STRING image_file_name; - void *buffer; - char *file_nameA; - INT len; - - status = pNtQueryInformationProcess(NULL, ProcessImageFileName, &image_file_name, sizeof(image_file_name), NULL); - if (status == STATUS_INVALID_INFO_CLASS) - { - win_skip("ProcessImageFileName is not supported\n"); - return; - } - ok( status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %08x\n", status); - - status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessImageFileName, &image_file_name, 2, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - - status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessImageFileName, &image_file_name, sizeof(image_file_name), &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - - buffer = HeapAlloc(GetProcessHeap(), 0, ReturnLength); - status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessImageFileName, buffer, ReturnLength, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - memcpy(&image_file_name, buffer, sizeof(image_file_name)); - len = WideCharToMultiByte(CP_ACP, 0, image_file_name.Buffer, image_file_name.Length/sizeof(WCHAR), NULL, 0, NULL, NULL); - file_nameA = HeapAlloc(GetProcessHeap(), 0, len + 1); - WideCharToMultiByte(CP_ACP, 0, image_file_name.Buffer, image_file_name.Length/sizeof(WCHAR), file_nameA, len, NULL, NULL); - file_nameA[len] = '\0'; - HeapFree(GetProcessHeap(), 0, buffer); - trace("process image file name: %s\n", file_nameA); - todo_wine ok(strncmp(file_nameA, "\\Device\\", 8) == 0, "Process image name should be an NT path beginning with \\Device\\ (is %s)\n", file_nameA); - HeapFree(GetProcessHeap(), 0, file_nameA); -} - -static void test_query_process_debug_object_handle(int argc, char **argv) -{ - char cmdline[MAX_PATH]; - STARTUPINFO si = {0}; - PROCESS_INFORMATION pi; - BOOL ret; - HANDLE debug_object; - NTSTATUS status; - - sprintf(cmdline, "%s %s %s", argv[0], argv[1], "debuggee"); - - si.cb = sizeof(si); - ret = CreateProcess(NULL, cmdline, NULL, NULL, FALSE, DEBUG_PROCESS, NULL, - NULL, &si, &pi); - ok(ret, "CreateProcess failed with last error %u\n", GetLastError()); - if (!ret) return; - - status = pNtQueryInformationProcess(NULL, ProcessDebugObjectHandle, NULL, - 0, NULL); - if (status == STATUS_INVALID_INFO_CLASS || status == STATUS_NOT_IMPLEMENTED) - { - win_skip("ProcessDebugObjectHandle is not supported\n"); - return; - } - ok(status == STATUS_INFO_LENGTH_MISMATCH, - "Expected NtQueryInformationProcess to return STATUS_INFO_LENGTH_MISMATCH, got 0x%08x\n", - status); - - status = pNtQueryInformationProcess(NULL, ProcessDebugObjectHandle, NULL, - sizeof(debug_object), NULL); - ok(status == STATUS_INVALID_HANDLE || - status == STATUS_ACCESS_VIOLATION, /* XP */ - "Expected NtQueryInformationProcess to return STATUS_INVALID_HANDLE, got 0x%08x\n", status); - - status = pNtQueryInformationProcess(GetCurrentProcess(), - ProcessDebugObjectHandle, NULL, sizeof(debug_object), NULL); - ok(status == STATUS_ACCESS_VIOLATION, - "Expected NtQueryInformationProcess to return STATUS_ACCESS_VIOLATION, got 0x%08x\n", status); - - status = pNtQueryInformationProcess(NULL, ProcessDebugObjectHandle, - &debug_object, sizeof(debug_object), NULL); - ok(status == STATUS_INVALID_HANDLE, - "Expected NtQueryInformationProcess to return STATUS_ACCESS_VIOLATION, got 0x%08x\n", status); - - status = pNtQueryInformationProcess(GetCurrentProcess(), - ProcessDebugObjectHandle, &debug_object, - sizeof(debug_object) - 1, NULL); - ok(status == STATUS_INFO_LENGTH_MISMATCH, - "Expected NtQueryInformationProcess to return STATUS_INFO_LENGTH_MISMATCH, got 0x%08x\n", status); - - status = pNtQueryInformationProcess(GetCurrentProcess(), - ProcessDebugObjectHandle, &debug_object, - sizeof(debug_object) + 1, NULL); - ok(status == STATUS_INFO_LENGTH_MISMATCH, - "Expected NtQueryInformationProcess to return STATUS_INFO_LENGTH_MISMATCH, got 0x%08x\n", status); - - debug_object = (HANDLE)0xdeadbeef; - status = pNtQueryInformationProcess(GetCurrentProcess(), - ProcessDebugObjectHandle, &debug_object, - sizeof(debug_object), NULL); - ok(status == STATUS_PORT_NOT_SET, - "Expected NtQueryInformationProcess to return STATUS_PORT_NOT_SET, got 0x%08x\n", status); - ok(debug_object == NULL || - broken(debug_object == (HANDLE)0xdeadbeef), /* Wow64 */ - "Expected debug object handle to be NULL, got %p\n", debug_object); - - debug_object = (HANDLE)0xdeadbeef; - status = pNtQueryInformationProcess(pi.hProcess, ProcessDebugObjectHandle, - &debug_object, sizeof(debug_object), NULL); - todo_wine - ok(status == STATUS_SUCCESS, - "Expected NtQueryInformationProcess to return STATUS_SUCCESS, got 0x%08x\n", status); - todo_wine - ok(debug_object != NULL, - "Expected debug object handle to be non-NULL, got %p\n", debug_object); - - for (;;) - { - DEBUG_EVENT ev; - - ret = WaitForDebugEvent(&ev, INFINITE); - ok(ret, "WaitForDebugEvent failed with last error %u\n", GetLastError()); - if (!ret) break; - - if (ev.dwDebugEventCode == EXIT_PROCESS_DEBUG_EVENT) break; - - ret = ContinueDebugEvent(ev.dwProcessId, ev.dwThreadId, DBG_CONTINUE); - ok(ret, "ContinueDebugEvent failed with last error %u\n", GetLastError()); - if (!ret) break; - } - - ret = CloseHandle(pi.hThread); - ok(ret, "CloseHandle failed with last error %u\n", GetLastError()); - ret = CloseHandle(pi.hProcess); - ok(ret, "CloseHandle failed with last error %u\n", GetLastError()); -} - -static void test_query_process_debug_flags(int argc, char **argv) -{ - DWORD debug_flags = 0xdeadbeef; - char cmdline[MAX_PATH]; - PROCESS_INFORMATION pi; - STARTUPINFO si = { 0 }; - NTSTATUS status; - BOOL ret; - - sprintf(cmdline, "%s %s %s", argv[0], argv[1], "debuggee"); - - si.cb = sizeof(si); - ret = CreateProcess(NULL, cmdline, NULL, NULL, FALSE, DEBUG_PROCESS | DEBUG_ONLY_THIS_PROCESS, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess failed, last error %#x.\n", GetLastError()); - if (!ret) return; - - status = pNtQueryInformationProcess(NULL, ProcessDebugFlags, - NULL, 0, NULL); - ok(status == STATUS_INFO_LENGTH_MISMATCH || broken(status == STATUS_INVALID_INFO_CLASS) /* NT4 */, "Expected STATUS_INFO_LENGTH_MISMATCH, got %#x.\n", status); - - status = pNtQueryInformationProcess(NULL, ProcessDebugFlags, - NULL, sizeof(debug_flags), NULL); - ok(status == STATUS_INVALID_HANDLE || status == STATUS_ACCESS_VIOLATION || broken(status == STATUS_INVALID_INFO_CLASS) /* W7PROX64 (32-bit) */, - "Expected STATUS_INVALID_HANDLE, got %#x.\n", status); - - status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessDebugFlags, - NULL, sizeof(debug_flags), NULL); - ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got %#x.\n", status); - - status = pNtQueryInformationProcess(NULL, ProcessDebugFlags, - &debug_flags, sizeof(debug_flags), NULL); - ok(status == STATUS_INVALID_HANDLE || broken(status == STATUS_INVALID_INFO_CLASS) /* NT4 */, "Expected STATUS_ACCESS_VIOLATION, got %#x.\n", status); - - status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessDebugFlags, - &debug_flags, sizeof(debug_flags) - 1, NULL); - ok(status == STATUS_INFO_LENGTH_MISMATCH || broken(status == STATUS_INVALID_INFO_CLASS) /* NT4 */, "Expected STATUS_INFO_LENGTH_MISMATCH, got %#x.\n", status); - - status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessDebugFlags, - &debug_flags, sizeof(debug_flags) + 1, NULL); - ok(status == STATUS_INFO_LENGTH_MISMATCH || broken(status == STATUS_INVALID_INFO_CLASS) /* NT4 */, "Expected STATUS_INFO_LENGTH_MISMATCH, got %#x.\n", status); - - status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessDebugFlags, - &debug_flags, sizeof(debug_flags), NULL); - ok(!status || broken(status == STATUS_INVALID_INFO_CLASS) /* NT4 */, "NtQueryInformationProcess failed, status %#x.\n", status); - ok(debug_flags == TRUE|| broken(status == STATUS_INVALID_INFO_CLASS) /* NT4 */, "Expected flag TRUE, got %x.\n", debug_flags); - - status = pNtQueryInformationProcess(pi.hProcess, ProcessDebugFlags, - &debug_flags, sizeof(debug_flags), NULL); - ok(!status || broken(status == STATUS_INVALID_INFO_CLASS) /* NT4 */, "NtQueryInformationProcess failed, status %#x.\n", status); - ok(debug_flags == FALSE || broken(status == STATUS_INVALID_INFO_CLASS) /* NT4 */, "Expected flag FALSE, got %x.\n", debug_flags); - - for (;;) - { - DEBUG_EVENT ev; - - ret = WaitForDebugEvent(&ev, INFINITE); - ok(ret, "WaitForDebugEvent failed, last error %#x.\n", GetLastError()); - if (!ret) break; - - if (ev.dwDebugEventCode == EXIT_PROCESS_DEBUG_EVENT) break; - - ret = ContinueDebugEvent(ev.dwProcessId, ev.dwThreadId, DBG_CONTINUE); - ok(ret, "ContinueDebugEvent failed, last error %#x.\n", GetLastError()); - if (!ret) break; - } - - ret = CloseHandle(pi.hThread); - ok(ret, "CloseHandle failed, last error %#x.\n", GetLastError()); - ret = CloseHandle(pi.hProcess); - ok(ret, "CloseHandle failed, last error %#x.\n", GetLastError()); -} - -static void test_readvirtualmemory(void) -{ - HANDLE process; - NTSTATUS status; - SIZE_T readcount; - static const char teststring[] = "test string"; - char buffer[12]; - - process = OpenProcess(PROCESS_VM_READ, FALSE, GetCurrentProcessId()); - ok(process != 0, "Expected to be able to open own process for reading memory\n"); - - /* normal operation */ - status = pNtReadVirtualMemory(process, teststring, buffer, 12, &readcount); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( readcount == 12, "Expected to read 12 bytes, got %ld\n",readcount); - ok( strcmp(teststring, buffer) == 0, "Expected read memory to be the same as original memory\n"); - - /* no number of bytes */ - memset(buffer, 0, 12); - status = pNtReadVirtualMemory(process, teststring, buffer, 12, NULL); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( strcmp(teststring, buffer) == 0, "Expected read memory to be the same as original memory\n"); - - /* illegal remote address */ - todo_wine{ - status = pNtReadVirtualMemory(process, (void *) 0x1234, buffer, 12, &readcount); - ok( status == STATUS_PARTIAL_COPY || broken(status == STATUS_ACCESS_VIOLATION), "Expected STATUS_PARTIAL_COPY, got %08x\n", status); - if (status == STATUS_PARTIAL_COPY) - ok( readcount == 0, "Expected to read 0 bytes, got %ld\n",readcount); - } - - /* 0 handle */ - status = pNtReadVirtualMemory(0, teststring, buffer, 12, &readcount); - ok( status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %08x\n", status); - ok( readcount == 0, "Expected to read 0 bytes, got %ld\n",readcount); - - /* pseudo handle for current process*/ - memset(buffer, 0, 12); - status = pNtReadVirtualMemory((HANDLE)-1, teststring, buffer, 12, &readcount); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( readcount == 12, "Expected to read 12 bytes, got %ld\n",readcount); - ok( strcmp(teststring, buffer) == 0, "Expected read memory to be the same as original memory\n"); - - /* illegal local address */ - status = pNtReadVirtualMemory(process, teststring, (void *)0x1234, 12, &readcount); - ok( status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got %08x\n", status); - ok( readcount == 0, "Expected to read 0 bytes, got %ld\n",readcount); - - CloseHandle(process); -} - -static void test_mapprotection(void) -{ - HANDLE h; - void* addr; - MEMORY_BASIC_INFORMATION info; - ULONG oldflags, flagsize, flags = MEM_EXECUTE_OPTION_ENABLE; - LARGE_INTEGER size, offset; - NTSTATUS status; - SIZE_T retlen, count; - void (*f)(void); - - if (!pNtClose) { - skip("No NtClose ... Win98\n"); - return; - } - /* Switch to being a noexec unaware process */ - status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessExecuteFlags, &oldflags, sizeof (oldflags), &flagsize); - if (status == STATUS_INVALID_PARAMETER) { - skip("Invalid Parameter on ProcessExecuteFlags query?\n"); - return; - } - ok( (status == STATUS_SUCCESS) || (status == STATUS_INVALID_INFO_CLASS), "Expected STATUS_SUCCESS, got %08x\n", status); - status = pNtSetInformationProcess( GetCurrentProcess(), ProcessExecuteFlags, &flags, sizeof(flags) ); - ok( (status == STATUS_SUCCESS) || (status == STATUS_INVALID_INFO_CLASS), "Expected STATUS_SUCCESS, got %08x\n", status); - - size.u.LowPart = 0x1000; - size.u.HighPart = 0; - status = pNtCreateSection ( &h, - STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_READ | SECTION_MAP_WRITE | SECTION_MAP_EXECUTE, - NULL, - &size, - PAGE_READWRITE, - SEC_COMMIT | SEC_NOCACHE, - 0 - ); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - - offset.u.LowPart = 0; - offset.u.HighPart = 0; - count = 0x1000; - addr = NULL; - status = pNtMapViewOfSection ( h, GetCurrentProcess(), &addr, 0, 0, &offset, &count, ViewShare, 0, PAGE_READWRITE); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); -#if defined(__x86_64__) || defined(__i386__) - memset (addr, 0xc3, 1); /* lret ... in both i386 and x86_64 */ - trace("trying to execute code in the readwrite only mapped anon file...\n"); - f = addr;f(); - trace("...done.\n"); -#endif - - status = pNtQueryVirtualMemory( GetCurrentProcess(), addr, MemoryBasicInformation, &info, sizeof(info), &retlen ); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( retlen == sizeof(info), "Expected STATUS_SUCCESS, got %08x\n", status); - ok(info.Protect == PAGE_READWRITE, "addr.Protect is not PAGE_READWRITE, but 0x%x\n", info.Protect); - - status = pNtUnmapViewOfSection (GetCurrentProcess(), addr); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - pNtClose (h); - - /* Switch back */ - pNtSetInformationProcess( GetCurrentProcess(), ProcessExecuteFlags, &oldflags, sizeof(oldflags) ); -} - -static void test_queryvirtualmemory(void) -{ - NTSTATUS status; - SIZE_T readcount; - static const char teststring[] = "test string"; - static char datatestbuf[42] = "abc"; - static char rwtestbuf[42]; - MEMORY_BASIC_INFORMATION mbi; - char stackbuf[42]; - HMODULE module; - - module = GetModuleHandle( "ntdll.dll" ); - trace("Check flags of the PE header of NTDLL.DLL at %p\n", module); - status = pNtQueryVirtualMemory(NtCurrentProcess(), module, MemoryBasicInformation, &mbi, sizeof(MEMORY_BASIC_INFORMATION), &readcount); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( readcount == sizeof(MEMORY_BASIC_INFORMATION), "Expected to read %d bytes, got %ld\n",(int)sizeof(MEMORY_BASIC_INFORMATION),readcount); - ok (mbi.AllocationBase == module, "mbi.AllocationBase is 0x%p, expected 0x%p\n", mbi.AllocationBase, module); - ok (mbi.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "mbi.AllocationProtect is 0x%x, expected 0x%x\n", mbi.AllocationProtect, PAGE_EXECUTE_WRITECOPY); - ok (mbi.State == MEM_COMMIT, "mbi.State is 0x%x, expected 0x%x\n", mbi.State, MEM_COMMIT); - ok (mbi.Protect == PAGE_READONLY, "mbi.Protect is 0x%x, expected 0x%x\n", mbi.Protect, PAGE_READONLY); - ok (mbi.Type == MEM_IMAGE, "mbi.Type is 0x%x, expected 0x%x\n", mbi.Type, MEM_IMAGE); - - trace("Check flags of a function entry in NTDLL.DLL at %p\n", pNtQueryVirtualMemory); - module = GetModuleHandle( "ntdll.dll" ); - status = pNtQueryVirtualMemory(NtCurrentProcess(), pNtQueryVirtualMemory, MemoryBasicInformation, &mbi, sizeof(MEMORY_BASIC_INFORMATION), &readcount); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( readcount == sizeof(MEMORY_BASIC_INFORMATION), "Expected to read %d bytes, got %ld\n",(int)sizeof(MEMORY_BASIC_INFORMATION),readcount); - ok (mbi.AllocationBase == module, "mbi.AllocationBase is 0x%p, expected 0x%p\n", mbi.AllocationBase, module); - ok (mbi.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "mbi.AllocationProtect is 0x%x, expected 0x%x\n", mbi.AllocationProtect, PAGE_EXECUTE_WRITECOPY); - ok (mbi.State == MEM_COMMIT, "mbi.State is 0x%x, expected 0x%x\n", mbi.State, MEM_COMMIT); - ok (mbi.Protect == PAGE_EXECUTE_READ, "mbi.Protect is 0x%x, expected 0x%x\n", mbi.Protect, PAGE_EXECUTE_READ); - - trace("Check flags of heap at %p\n", GetProcessHeap()); - status = pNtQueryVirtualMemory(NtCurrentProcess(), GetProcessHeap(), MemoryBasicInformation, &mbi, sizeof(MEMORY_BASIC_INFORMATION), &readcount); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( readcount == sizeof(MEMORY_BASIC_INFORMATION), "Expected to read %d bytes, got %ld\n",(int)sizeof(MEMORY_BASIC_INFORMATION),readcount); - ok (mbi.AllocationProtect == PAGE_READWRITE || mbi.AllocationProtect == PAGE_EXECUTE_READWRITE, - "mbi.AllocationProtect is 0x%x\n", mbi.AllocationProtect); - ok (mbi.State == MEM_COMMIT, "mbi.State is 0x%x, expected 0x%x\n", mbi.State, MEM_COMMIT); - ok (mbi.Protect == PAGE_READWRITE || mbi.Protect == PAGE_EXECUTE_READWRITE, - "mbi.Protect is 0x%x\n", mbi.Protect); - - trace("Check flags of stack at %p\n", stackbuf); - status = pNtQueryVirtualMemory(NtCurrentProcess(), stackbuf, MemoryBasicInformation, &mbi, sizeof(MEMORY_BASIC_INFORMATION), &readcount); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( readcount == sizeof(MEMORY_BASIC_INFORMATION), "Expected to read %d bytes, got %ld\n",(int)sizeof(MEMORY_BASIC_INFORMATION),readcount); - ok (mbi.AllocationProtect == PAGE_READWRITE, "mbi.AllocationProtect is 0x%x, expected 0x%x\n", mbi.AllocationProtect, PAGE_READWRITE); - ok (mbi.State == MEM_COMMIT, "mbi.State is 0x%x, expected 0x%x\n", mbi.State, MEM_COMMIT); - ok (mbi.Protect == PAGE_READWRITE, "mbi.Protect is 0x%x, expected 0x%x\n", mbi.Protect, PAGE_READWRITE); - - trace("Check flags of read-only data at %p\n", teststring); - module = GetModuleHandle( NULL ); - status = pNtQueryVirtualMemory(NtCurrentProcess(), teststring, MemoryBasicInformation, &mbi, sizeof(MEMORY_BASIC_INFORMATION), &readcount); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( readcount == sizeof(MEMORY_BASIC_INFORMATION), "Expected to read %d bytes, got %ld\n",(int)sizeof(MEMORY_BASIC_INFORMATION),readcount); - ok (mbi.AllocationBase == module, "mbi.AllocationBase is 0x%p, expected 0x%p\n", mbi.AllocationBase, module); - ok (mbi.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "mbi.AllocationProtect is 0x%x, expected 0x%x\n", mbi.AllocationProtect, PAGE_EXECUTE_WRITECOPY); - ok (mbi.State == MEM_COMMIT, "mbi.State is 0x%x, expected 0x%X\n", mbi.State, MEM_COMMIT); - if (mbi.Protect != PAGE_READONLY) - todo_wine ok( mbi.Protect == PAGE_READONLY, "mbi.Protect is 0x%x, expected 0x%X\n", mbi.Protect, PAGE_READONLY); - - trace("Check flags of read-write data at %p\n", datatestbuf); - status = pNtQueryVirtualMemory(NtCurrentProcess(), datatestbuf, MemoryBasicInformation, &mbi, sizeof(MEMORY_BASIC_INFORMATION), &readcount); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( readcount == sizeof(MEMORY_BASIC_INFORMATION), "Expected to read %d bytes, got %ld\n",(int)sizeof(MEMORY_BASIC_INFORMATION),readcount); - ok (mbi.AllocationBase == module, "mbi.AllocationBase is 0x%p, expected 0x%p\n", mbi.AllocationBase, module); - ok (mbi.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "mbi.AllocationProtect is 0x%x, expected 0x%x\n", mbi.AllocationProtect, PAGE_EXECUTE_WRITECOPY); - ok (mbi.State == MEM_COMMIT, "mbi.State is 0x%x, expected 0x%X\n", mbi.State, MEM_COMMIT); - ok (mbi.Protect == PAGE_READWRITE || mbi.Protect == PAGE_WRITECOPY, - "mbi.Protect is 0x%x\n", mbi.Protect); - - trace("Check flags of read-write uninitialized data (.bss) at %p\n", rwtestbuf); - status = pNtQueryVirtualMemory(NtCurrentProcess(), rwtestbuf, MemoryBasicInformation, &mbi, sizeof(MEMORY_BASIC_INFORMATION), &readcount); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( readcount == sizeof(MEMORY_BASIC_INFORMATION), "Expected to read %d bytes, got %ld\n",(int)sizeof(MEMORY_BASIC_INFORMATION),readcount); - if (mbi.AllocationBase == module) - { - ok (mbi.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "mbi.AllocationProtect is 0x%x, expected 0x%x\n", mbi.AllocationProtect, PAGE_EXECUTE_WRITECOPY); - ok (mbi.State == MEM_COMMIT, "mbi.State is 0x%x, expected 0x%X\n", mbi.State, MEM_COMMIT); - ok (mbi.Protect == PAGE_READWRITE, "mbi.Protect is 0x%x, expected 0x%X\n", mbi.Protect, PAGE_READWRITE); - } - else skip( "bss is outside of module\n" ); /* this can happen on Mac OS */ -} - -static void test_affinity(void) -{ - NTSTATUS status; - PROCESS_BASIC_INFORMATION pbi; - DWORD_PTR proc_affinity, thread_affinity; - THREAD_BASIC_INFORMATION tbi; - SYSTEM_INFO si; - - GetSystemInfo(&si); - status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessBasicInformation, &pbi, sizeof(pbi), NULL ); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - proc_affinity = (DWORD_PTR)pbi.Reserved2[0]; - ok( proc_affinity == (1 << si.dwNumberOfProcessors) - 1, "Unexpected process affinity\n" ); - proc_affinity = 1 << si.dwNumberOfProcessors; - status = pNtSetInformationProcess( GetCurrentProcess(), ProcessAffinityMask, &proc_affinity, sizeof(proc_affinity) ); - ok( status == STATUS_INVALID_PARAMETER, - "Expected STATUS_INVALID_PARAMETER, got %08x\n", status); - - proc_affinity = 0; - status = pNtSetInformationProcess( GetCurrentProcess(), ProcessAffinityMask, &proc_affinity, sizeof(proc_affinity) ); - ok( status == STATUS_INVALID_PARAMETER, - "Expected STATUS_INVALID_PARAMETER, got %08x\n", status); - - status = pNtQueryInformationThread( GetCurrentThread(), ThreadBasicInformation, &tbi, sizeof(tbi), NULL ); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( tbi.AffinityMask == (1 << si.dwNumberOfProcessors) - 1, "Unexpected thread affinity\n" ); - thread_affinity = 1 << si.dwNumberOfProcessors; - status = pNtSetInformationThread( GetCurrentThread(), ThreadAffinityMask, &thread_affinity, sizeof(thread_affinity) ); - ok( status == STATUS_INVALID_PARAMETER, - "Expected STATUS_INVALID_PARAMETER, got %08x\n", status); - thread_affinity = 0; - status = pNtSetInformationThread( GetCurrentThread(), ThreadAffinityMask, &thread_affinity, sizeof(thread_affinity) ); - ok( status == STATUS_INVALID_PARAMETER, - "Expected STATUS_INVALID_PARAMETER, got %08x\n", status); - - thread_affinity = 1; - status = pNtSetInformationThread( GetCurrentThread(), ThreadAffinityMask, &thread_affinity, sizeof(thread_affinity) ); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - status = pNtQueryInformationThread( GetCurrentThread(), ThreadBasicInformation, &tbi, sizeof(tbi), NULL ); - ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( tbi.AffinityMask == 1, "Unexpected thread affinity\n" ); - - /* NOTE: Pre-Vista does not recognize the "all processors" flag (all bits set) */ - thread_affinity = ~(DWORD_PTR)0; - status = pNtSetInformationThread( GetCurrentThread(), ThreadAffinityMask, &thread_affinity, sizeof(thread_affinity) ); - ok( broken(status == STATUS_INVALID_PARAMETER) || status == STATUS_SUCCESS, - "Expected STATUS_SUCCESS, got %08x\n", status); - - if (si.dwNumberOfProcessors <= 1) - { - skip("only one processor, skipping affinity testing\n"); - return; - } - - /* Test thread affinity mask resulting from "all processors" flag */ - if (status == STATUS_SUCCESS) - { - status = pNtQueryInformationThread( GetCurrentThread(), ThreadBasicInformation, &tbi, sizeof(tbi), NULL ); - ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( broken(tbi.AffinityMask == 1) || tbi.AffinityMask == (1 << si.dwNumberOfProcessors) - 1, - "Unexpected thread affinity\n" ); - } - else - skip("Cannot test thread affinity mask for 'all processors' flag\n"); - - proc_affinity = 2; - status = pNtSetInformationProcess( GetCurrentProcess(), ProcessAffinityMask, &proc_affinity, sizeof(proc_affinity) ); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessBasicInformation, &pbi, sizeof(pbi), NULL ); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - proc_affinity = (DWORD_PTR)pbi.Reserved2[0]; - ok( proc_affinity == 2, "Unexpected process affinity\n" ); - /* Setting the process affinity changes the thread affinity to match */ - status = pNtQueryInformationThread( GetCurrentThread(), ThreadBasicInformation, &tbi, sizeof(tbi), NULL ); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( tbi.AffinityMask == 2, "Unexpected thread affinity\n" ); - /* The thread affinity is restricted to the process affinity */ - thread_affinity = 1; - status = pNtSetInformationThread( GetCurrentThread(), ThreadAffinityMask, &thread_affinity, sizeof(thread_affinity) ); - ok( status == STATUS_INVALID_PARAMETER, - "Expected STATUS_INVALID_PARAMETER, got %08x\n", status); - - proc_affinity = (1 << si.dwNumberOfProcessors) - 1; - status = pNtSetInformationProcess( GetCurrentProcess(), ProcessAffinityMask, &proc_affinity, sizeof(proc_affinity) ); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - /* Resetting the process affinity also resets the thread affinity */ - status = pNtQueryInformationThread( GetCurrentThread(), ThreadBasicInformation, &tbi, sizeof(tbi), NULL ); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); - ok( tbi.AffinityMask == (1 << si.dwNumberOfProcessors) - 1, - "Unexpected thread affinity\n" ); -} - -START_TEST(info) -{ - char **argv; - int argc; - - if(!InitFunctionPtrs()) - return; - - argc = winetest_get_mainargs(&argv); - if (argc >= 3) return; /* Child */ - - /* NtQuerySystemInformation */ - - /* 0x0 SystemBasicInformation */ - trace("Starting test_query_basic()\n"); - test_query_basic(); - - /* 0x1 SystemCpuInformation */ - trace("Starting test_query_cpu()\n"); - test_query_cpu(); - - /* 0x2 SystemPerformanceInformation */ - trace("Starting test_query_performance()\n"); - test_query_performance(); - - /* 0x3 SystemTimeOfDayInformation */ - trace("Starting test_query_timeofday()\n"); - test_query_timeofday(); - - /* 0x5 SystemProcessInformation */ - trace("Starting test_query_process()\n"); - test_query_process(); - - /* 0x8 SystemProcessorPerformanceInformation */ - trace("Starting test_query_procperf()\n"); - test_query_procperf(); - - /* 0xb SystemModuleInformation */ - trace("Starting test_query_module()\n"); - test_query_module(); - - /* 0x10 SystemHandleInformation */ - trace("Starting test_query_handle()\n"); - test_query_handle(); - - /* 0x15 SystemCacheInformation */ - trace("Starting test_query_cache()\n"); - test_query_cache(); - - /* 0x17 SystemInterruptInformation */ - trace("Starting test_query_interrupt()\n"); - test_query_interrupt(); - - /* 0x23 SystemKernelDebuggerInformation */ - trace("Starting test_query_kerndebug()\n"); - test_query_kerndebug(); - - /* 0x25 SystemRegistryQuotaInformation */ - trace("Starting test_query_regquota()\n"); - test_query_regquota(); - - /* NtQueryInformationProcess */ - - /* 0x0 ProcessBasicInformation */ - trace("Starting test_query_process_basic()\n"); - test_query_process_basic(); - - /* 0x2 ProcessIoCounters */ - trace("Starting test_query_process_io()\n"); - test_query_process_io(); - - /* 0x3 ProcessVmCounters */ - trace("Starting test_query_process_vm()\n"); - test_query_process_vm(); - - /* 0x4 ProcessTimes */ - trace("Starting test_query_process_times()\n"); - test_query_process_times(); - - /* 0x7 ProcessDebugPort */ - trace("Starting test_process_debug_port()\n"); - test_query_process_debug_port(argc, argv); - - /* 0x14 ProcessHandleCount */ - trace("Starting test_query_process_handlecount()\n"); - test_query_process_handlecount(); - - /* 0x1B ProcessImageFileName */ - trace("Starting test_query_process_image_file_name()\n"); - test_query_process_image_file_name(); - - /* 0x1E ProcessDebugObjectHandle */ - trace("Starting test_query_process_debug_object_handle()\n"); - test_query_process_debug_object_handle(argc, argv); - - /* 0x1F ProcessDebugFlags */ - trace("Starting test_process_debug_flags()\n"); - test_query_process_debug_flags(argc, argv); - - /* belongs into it's own file */ - trace("Starting test_readvirtualmemory()\n"); - test_readvirtualmemory(); - - trace("Starting test_queryvirtualmemory()\n"); - test_queryvirtualmemory(); - - trace("Starting test_mapprotection()\n"); - test_mapprotection(); - - trace("Starting test_affinity()\n"); - test_affinity(); -} diff --git a/rostests/winetests/ntdll/large_int.c b/rostests/winetests/ntdll/large_int.c deleted file mode 100755 index f13ae882d05..00000000000 --- a/rostests/winetests/ntdll/large_int.c +++ /dev/null @@ -1,452 +0,0 @@ -/* Unit test suite for Rtl large integer functions - * - * Copyright 2003 Thomas Mertes - * - * 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 - * We use function pointers here as there is no import library for NTDLL on - * windows. - */ - -#include - -#include "ntdll_test.h" - - -/* Function ptrs for ntdll calls */ -static HMODULE hntdll = 0; -static LONGLONG (WINAPI *pRtlExtendedMagicDivide)(LONGLONG, LONGLONG, INT); -static VOID (WINAPI *pRtlFreeAnsiString)(PSTRING); -static NTSTATUS (WINAPI *pRtlInt64ToUnicodeString)(ULONGLONG, ULONG, UNICODE_STRING *); -static NTSTATUS (WINAPI *pRtlLargeIntegerToChar)(ULONGLONG *, ULONG, ULONG, PCHAR); -static NTSTATUS (WINAPI *pRtlUnicodeStringToAnsiString)(STRING *, const UNICODE_STRING *, BOOLEAN); - - -static void InitFunctionPtrs(void) -{ - hntdll = LoadLibraryA("ntdll.dll"); - ok(hntdll != 0, "LoadLibrary failed\n"); - if (hntdll) { - pRtlExtendedMagicDivide = (void *)GetProcAddress(hntdll, "RtlExtendedMagicDivide"); - pRtlFreeAnsiString = (void *)GetProcAddress(hntdll, "RtlFreeAnsiString"); - pRtlInt64ToUnicodeString = (void *)GetProcAddress(hntdll, "RtlInt64ToUnicodeString"); - pRtlLargeIntegerToChar = (void *)GetProcAddress(hntdll, "RtlLargeIntegerToChar"); - pRtlUnicodeStringToAnsiString = (void *)GetProcAddress(hntdll, "RtlUnicodeStringToAnsiString"); - } /* if */ -} - -#define ULL(a,b) (((ULONGLONG)(a) << 32) | (b)) - -typedef struct { - LONGLONG a; - LONGLONG b; - INT shift; - LONGLONG result; -} magic_divide_t; - -static const magic_divide_t magic_divide[] = { - { 3, ULL(0x55555555,0x55555555), 0, 0}, /* 1 */ - { 333333333, ULL(0x55555555,0x55555555), 0, 111111110}, /* 111111111 */ - { ULL(0x7fffffff,0xffffffff), ULL(0x55555555,0x55555555), 0, ULL(0x2aaaaaaa,0xaaaaaaaa)}, - { 3, ULL(0xaaaaaaaa,0xaaaaaaaa), 1, 0}, /* 1 */ - { 333333333, ULL(0xaaaaaaaa,0xaaaaaaaa), 1, 111111110}, /* 111111111 */ - { ULL(0x7fffffff,0xffffffff), ULL(0xaaaaaaaa,0xaaaaaaaa), 1, ULL(0x2aaaaaaa,0xaaaaaaaa)}, - { -3, ULL(0x55555555,0x55555555), 0, 0}, /* -1 */ - { -333333333, ULL(0x55555555,0x55555555), 0, -111111110}, /* -111111111 */ - {-ULL(0x7fffffff,0xffffffff), ULL(0x55555555,0x55555555), 0, -ULL(0x2aaaaaaa,0xaaaaaaaa)}, - { -3, ULL(0xaaaaaaaa,0xaaaaaaaa), 1, 0}, /* -1 */ - { -333333333, ULL(0xaaaaaaaa,0xaaaaaaaa), 1, -111111110}, /* -111111111 */ - {-ULL(0x7fffffff,0xffffffff), ULL(0xaaaaaaaa,0xaaaaaaaa), 1, -ULL(0x2aaaaaaa,0xaaaaaaaa)}, - { -3, -ULL(0x55555555,0x55555555), 0, -2}, /* -1 */ - { -333333333, -ULL(0x55555555,0x55555555), 0, -222222222}, /* -111111111 */ - {-ULL(0x7fffffff,0xffffffff), -ULL(0x55555555,0x55555555), 0, -ULL(0x55555555,0x55555554)}, - { -3, -ULL(0xaaaaaaaa,0xaaaaaaaa), 1, 0}, /* -1 */ - { -333333333, -ULL(0xaaaaaaaa,0xaaaaaaaa), 1, -55555555}, /* -111111111 */ - {-ULL(0x7fffffff,0xffffffff), -ULL(0xaaaaaaaa,0xaaaaaaaa), 1, -ULL(0x15555555,0x55555555)}, - { 3, -ULL(0x55555555,0x55555555), 0, 2}, /* -1 */ - { 333333333, -ULL(0x55555555,0x55555555), 0, 222222222}, /* -111111111 */ - { ULL(0x7fffffff,0xffffffff), -ULL(0x55555555,0x55555555), 0, ULL(0x55555555,0x55555554)}, - { 3, -ULL(0xaaaaaaaa,0xaaaaaaaa), 1, 0}, /* -1 */ - { 333333333, -ULL(0xaaaaaaaa,0xaaaaaaaa), 1, 55555555}, /* -111111111 */ - { ULL(0x7fffffff,0xffffffff), -ULL(0xaaaaaaaa,0xaaaaaaaa), 1, ULL(0x15555555,0x55555555)}, - { 3, ULL(0xaaaaaaaa,0xaaaaa800), 1, 0}, /* 1 */ - { 333333333, ULL(0xaaaaaaaa,0xaaaaa800), 1, 111111110}, /* 111111111 */ - { ULL(0x7fffffff,0xffffffff), ULL(0xaaaaaaaa,0xaaaaa800), 1, ULL(0x2aaaaaaa,0xaaaaa9ff)}, /* 0x2aaaaaaaaaaaaaaa */ - { 5, ULL(0x33333333,0x333333ff), 0, 1}, - { 555555555, ULL(0x33333333,0x333333ff), 0, 111111111}, - { ULL(0x7fffffff,0xffffffff), ULL(0x33333333,0x333333ff), 0, ULL(0x19999999,0x999999ff)}, /* 0x199999999999999a */ - { 5, ULL(0x66666666,0x666667fe), 1, 1}, - { 555555555, ULL(0x66666666,0x666667fe), 1, 111111111}, - { ULL(0x7fffffff,0xffffffff), ULL(0x66666666,0x666667fe), 1, ULL(0x19999999,0x999999ff)}, /* 0x199999999999999a */ - { 5, ULL(0xcccccccc,0xcccccffd), 2, 1}, - { 555555555, ULL(0xcccccccc,0xcccccffd), 2, 111111111}, - { ULL(0x7fffffff,0xffffffff), ULL(0xcccccccc,0xcccccffd), 2, ULL(0x19999999,0x999999ff)}, /* 0x199999999999999a */ - { ULL(0x00000add,0xcafeface), ULL(0x002f1e28,0xfd1b5cca), 33, 1}, - { ULL(0x081ac1b9,0xc2310a80), ULL(0x002f1e28,0xfd1b5cca), 33, 0xbeef}, - { ULL(0x74ae3b5f,0x1558c800), ULL(0x002f1e28,0xfd1b5cca), 33, 0xabcde}, - { ULL(0x00000add,0xcafeface), ULL(0x2f1e28fd,0x1b5cca00), 41, 1}, - { ULL(0x081ac1b9,0xc2310a80), ULL(0x2f1e28fd,0x1b5cca00), 41, 0xbeef}, - { ULL(0x74ae3b5f,0x1558c800), ULL(0x2f1e28fd,0x1b5cca00), 41, 0xabcde}, - -}; -#define NB_MAGIC_DIVIDE (sizeof(magic_divide)/sizeof(*magic_divide)) - - -static void test_RtlExtendedMagicDivide(void) -{ - int i; - LONGLONG result; - - for (i = 0; i < NB_MAGIC_DIVIDE; i++) { - result = pRtlExtendedMagicDivide(magic_divide[i].a, magic_divide[i].b, magic_divide[i].shift); - ok(result == magic_divide[i].result, - "call failed: RtlExtendedMagicDivide(0x%x%08x, 0x%x%08x, %d) has result 0x%x%08x, expected 0x%x%08x\n", - (DWORD)(magic_divide[i].a >> 32), (DWORD)magic_divide[i].a, (DWORD)(magic_divide[i].b >> 32), - (DWORD)magic_divide[i].b, magic_divide[i].shift, (DWORD)(result >> 32), (DWORD)result, - (DWORD)(magic_divide[i].result >> 32), (DWORD)magic_divide[i].result); - } -} - - -#define LARGE_STRI_BUFFER_LENGTH 67 - -typedef struct { - int base; - ULONGLONG value; - USHORT Length; - USHORT MaximumLength; - const char *Buffer; - NTSTATUS result; -} largeint2str_t; - -/* - * The native DLL does produce garbage or STATUS_BUFFER_OVERFLOW for - * base 2, 8 and 16 when the value is larger than 0xFFFFFFFF. - * Therefore these testcases are commented out. - */ - -static const largeint2str_t largeint2str[] = { - {10, 123, 3, 11, "123\0---------------------------------------------------------------", STATUS_SUCCESS}, - - { 0, 0x80000000U, 10, 11, "2147483648\0--------------------------------------------------------", STATUS_SUCCESS}, - { 0, -2147483647, 20, 21, "18446744071562067969\0----------------------------------------------", STATUS_SUCCESS}, - { 0, -2, 20, 21, "18446744073709551614\0----------------------------------------------", STATUS_SUCCESS}, - { 0, -1, 20, 21, "18446744073709551615\0----------------------------------------------", STATUS_SUCCESS}, - { 0, 0, 1, 11, "0\0-----------------------------------------------------------------", STATUS_SUCCESS}, - { 0, 1, 1, 11, "1\0-----------------------------------------------------------------", STATUS_SUCCESS}, - { 0, 12, 2, 11, "12\0----------------------------------------------------------------", STATUS_SUCCESS}, - { 0, 123, 3, 11, "123\0---------------------------------------------------------------", STATUS_SUCCESS}, - { 0, 1234, 4, 11, "1234\0--------------------------------------------------------------", STATUS_SUCCESS}, - { 0, 12345, 5, 11, "12345\0-------------------------------------------------------------", STATUS_SUCCESS}, - { 0, 123456, 6, 11, "123456\0------------------------------------------------------------", STATUS_SUCCESS}, - { 0, 1234567, 7, 11, "1234567\0-----------------------------------------------------------", STATUS_SUCCESS}, - { 0, 12345678, 8, 11, "12345678\0----------------------------------------------------------", STATUS_SUCCESS}, - { 0, 123456789, 9, 11, "123456789\0---------------------------------------------------------", STATUS_SUCCESS}, - { 0, 2147483646, 10, 11, "2147483646\0--------------------------------------------------------", STATUS_SUCCESS}, - { 0, 2147483647, 10, 11, "2147483647\0--------------------------------------------------------", STATUS_SUCCESS}, - { 0, 2147483648U, 10, 11, "2147483648\0--------------------------------------------------------", STATUS_SUCCESS}, - { 0, 2147483649U, 10, 11, "2147483649\0--------------------------------------------------------", STATUS_SUCCESS}, - { 0, 4294967294U, 10, 11, "4294967294\0--------------------------------------------------------", STATUS_SUCCESS}, - { 0, 4294967295U, 10, 11, "4294967295\0--------------------------------------------------------", STATUS_SUCCESS}, - { 0, ULL(0x2,0xdfdc1c35), 11, 12, "12345678901\0-------------------------------------------------------", STATUS_SUCCESS}, - { 0, ULL(0xe5,0xf4c8f374), 12, 13, "987654321012\0------------------------------------------------------", STATUS_SUCCESS}, - { 0, ULL(0x1c0,0xfc161e3e), 13, 14, "1928374656574\0-----------------------------------------------------", STATUS_SUCCESS}, - { 0, ULL(0xbad,0xcafeface), 14, 15, "12841062955726\0----------------------------------------------------", STATUS_SUCCESS}, - { 0, ULL(0x5bad,0xcafeface), 15, 16, "100801993177806\0---------------------------------------------------", STATUS_SUCCESS}, - { 0, ULL(0xaface,0xbeefcafe), 16, 20, "3090515640699646\0--------------------------------------------------", STATUS_SUCCESS}, - { 0, ULL(0xa5beef,0xabcdcafe), 17, 20, "46653307746110206\0-------------------------------------------------", STATUS_SUCCESS}, - { 0, ULL(0x1f8cf9b,0xf2df3af1), 18, 20, "142091656963767025\0------------------------------------------------", STATUS_SUCCESS}, - { 0, ULL(0x0fffffff,0xffffffff), 19, 20, "1152921504606846975\0-----------------------------------------------", STATUS_SUCCESS}, - { 0, ULL(0xffffffff,0xfffffffe), 20, 21, "18446744073709551614\0----------------------------------------------", STATUS_SUCCESS}, - { 0, ULL(0xffffffff,0xffffffff), 20, 21, "18446744073709551615\0----------------------------------------------", STATUS_SUCCESS}, - - { 2, 0x80000000U, 32, 33, "10000000000000000000000000000000\0----------------------------------", STATUS_SUCCESS}, -/* - * { 2, -2147483647, 64, 65, "1111111111111111111111111111111110000000000000000000000000000001\0--", STATUS_SUCCESS}, - * { 2, -2, 64, 65, "1111111111111111111111111111111111111111111111111111111111111110\0--", STATUS_SUCCESS}, - * { 2, -1, 64, 65, "1111111111111111111111111111111111111111111111111111111111111111\0--", STATUS_SUCCESS}, - */ - { 2, 0, 1, 33, "0\0-----------------------------------------------------------------", STATUS_SUCCESS}, - { 2, 1, 1, 33, "1\0-----------------------------------------------------------------", STATUS_SUCCESS}, - { 2, 10, 4, 33, "1010\0--------------------------------------------------------------", STATUS_SUCCESS}, - { 2, 100, 7, 33, "1100100\0-----------------------------------------------------------", STATUS_SUCCESS}, - { 2, 1000, 10, 33, "1111101000\0--------------------------------------------------------", STATUS_SUCCESS}, - { 2, 10000, 14, 33, "10011100010000\0----------------------------------------------------", STATUS_SUCCESS}, - { 2, 32767, 15, 33, "111111111111111\0---------------------------------------------------", STATUS_SUCCESS}, - { 2, 32768, 16, 33, "1000000000000000\0--------------------------------------------------", STATUS_SUCCESS}, - { 2, 65535, 16, 33, "1111111111111111\0--------------------------------------------------", STATUS_SUCCESS}, - { 2, 100000, 17, 33, "11000011010100000\0-------------------------------------------------", STATUS_SUCCESS}, - { 2, 1000000, 20, 33, "11110100001001000000\0----------------------------------------------", STATUS_SUCCESS}, - { 2, 10000000, 24, 33, "100110001001011010000000\0------------------------------------------", STATUS_SUCCESS}, - { 2, 100000000, 27, 33, "101111101011110000100000000\0---------------------------------------", STATUS_SUCCESS}, - { 2, 1000000000, 30, 33, "111011100110101100101000000000\0------------------------------------", STATUS_SUCCESS}, - { 2, 1073741823, 30, 33, "111111111111111111111111111111\0------------------------------------", STATUS_SUCCESS}, - { 2, 2147483646, 31, 33, "1111111111111111111111111111110\0-----------------------------------", STATUS_SUCCESS}, - { 2, 2147483647, 31, 33, "1111111111111111111111111111111\0-----------------------------------", STATUS_SUCCESS}, - { 2, 2147483648U, 32, 33, "10000000000000000000000000000000\0----------------------------------", STATUS_SUCCESS}, - { 2, 2147483649U, 32, 33, "10000000000000000000000000000001\0----------------------------------", STATUS_SUCCESS}, - { 2, 4294967294U, 32, 33, "11111111111111111111111111111110\0----------------------------------", STATUS_SUCCESS}, - { 2, 0xFFFFFFFF, 32, 33, "11111111111111111111111111111111\0----------------------------------", STATUS_SUCCESS}, -/* - * { 2, 0x1FFFFFFFF, 33, 34, "111111111111111111111111111111111\0---------------------------------", STATUS_SUCCESS}, - * { 2, 0x3FFFFFFFF, 34, 35, "1111111111111111111111111111111111\0--------------------------------", STATUS_SUCCESS}, - * { 2, 0x7FFFFFFFF, 35, 36, "11111111111111111111111111111111111\0-------------------------------", STATUS_SUCCESS}, - * { 2, 0xFFFFFFFFF, 36, 37, "111111111111111111111111111111111111\0------------------------------", STATUS_SUCCESS}, - * { 2, 0x1FFFFFFFFF, 37, 38, "1111111111111111111111111111111111111\0-----------------------------", STATUS_SUCCESS}, - * { 2, 0x3FFFFFFFFF, 38, 39, "11111111111111111111111111111111111111\0----------------------------", STATUS_SUCCESS}, - * { 2, 0x7FFFFFFFFF, 39, 40, "111111111111111111111111111111111111111\0---------------------------", STATUS_SUCCESS}, - * { 2, 0xFFFFFFFFFF, 40, 41, "1111111111111111111111111111111111111111\0--------------------------", STATUS_SUCCESS}, - */ - - { 8, 0x80000000U, 11, 12, "20000000000\0-------------------------------------------------------", STATUS_SUCCESS}, -/* - * { 8, -2147483647, 22, 23, "1777777777760000000001\0--------------------------------------------", STATUS_SUCCESS}, - * { 8, -2, 22, 23, "1777777777777777777776\0--------------------------------------------", STATUS_SUCCESS}, - * { 8, -1, 22, 23, "1777777777777777777777\0--------------------------------------------", STATUS_SUCCESS}, - */ - { 8, 0, 1, 12, "0\0-----------------------------------------------------------------", STATUS_SUCCESS}, - { 8, 1, 1, 12, "1\0-----------------------------------------------------------------", STATUS_SUCCESS}, - { 8, 2147483646, 11, 12, "17777777776\0-------------------------------------------------------", STATUS_SUCCESS}, - { 8, 2147483647, 11, 12, "17777777777\0-------------------------------------------------------", STATUS_SUCCESS}, - { 8, 2147483648U, 11, 12, "20000000000\0-------------------------------------------------------", STATUS_SUCCESS}, - { 8, 2147483649U, 11, 12, "20000000001\0-------------------------------------------------------", STATUS_SUCCESS}, - { 8, 4294967294U, 11, 12, "37777777776\0-------------------------------------------------------", STATUS_SUCCESS}, - { 8, 4294967295U, 11, 12, "37777777777\0-------------------------------------------------------", STATUS_SUCCESS}, - - {10, 0x80000000U, 10, 11, "2147483648\0--------------------------------------------------------", STATUS_SUCCESS}, - {10, -2147483647, 20, 21, "18446744071562067969\0----------------------------------------------", STATUS_SUCCESS}, - {10, -2, 20, 21, "18446744073709551614\0----------------------------------------------", STATUS_SUCCESS}, - {10, -1, 20, 21, "18446744073709551615\0----------------------------------------------", STATUS_SUCCESS}, - {10, 0, 1, 11, "0\0-----------------------------------------------------------------", STATUS_SUCCESS}, - {10, 1, 1, 11, "1\0-----------------------------------------------------------------", STATUS_SUCCESS}, - {10, 2147483646, 10, 11, "2147483646\0--------------------------------------------------------", STATUS_SUCCESS}, - {10, 2147483647, 10, 11, "2147483647\0--------------------------------------------------------", STATUS_SUCCESS}, - {10, 2147483648U, 10, 11, "2147483648\0--------------------------------------------------------", STATUS_SUCCESS}, - {10, 2147483649U, 10, 11, "2147483649\0--------------------------------------------------------", STATUS_SUCCESS}, - {10, 4294967294U, 10, 11, "4294967294\0--------------------------------------------------------", STATUS_SUCCESS}, - {10, 4294967295U, 10, 11, "4294967295\0--------------------------------------------------------", STATUS_SUCCESS}, - - {16, 0, 1, 9, "0\0-----------------------------------------------------------------", STATUS_SUCCESS}, - {16, 1, 1, 9, "1\0-----------------------------------------------------------------", STATUS_SUCCESS}, - {16, 2147483646, 8, 9, "7FFFFFFE\0----------------------------------------------------------", STATUS_SUCCESS}, - {16, 2147483647, 8, 9, "7FFFFFFF\0----------------------------------------------------------", STATUS_SUCCESS}, - {16, 0x80000000, 8, 9, "80000000\0----------------------------------------------------------", STATUS_SUCCESS}, - {16, 0x80000001, 8, 9, "80000001\0----------------------------------------------------------", STATUS_SUCCESS}, - {16, 0xFFFFFFFE, 8, 9, "FFFFFFFE\0----------------------------------------------------------", STATUS_SUCCESS}, - {16, 0xFFFFFFFF, 8, 9, "FFFFFFFF\0----------------------------------------------------------", STATUS_SUCCESS}, -/* - * {16, 0x100000000, 9, 10, "100000000\0---------------------------------------------------------", STATUS_SUCCESS}, - * {16, 0xBADDEADBEEF, 11, 12, "BADDEADBEEF\0-------------------------------------------------------", STATUS_SUCCESS}, - * {16, 0x8000000000000000, 16, 17, "8000000000000000\0--------------------------------------------------", STATUS_SUCCESS}, - * {16, 0xFEDCBA9876543210, 16, 17, "FEDCBA9876543210\0--------------------------------------------------", STATUS_SUCCESS}, - * {16, 0xFFFFFFFF80000001, 16, 17, "FFFFFFFF80000001\0--------------------------------------------------", STATUS_SUCCESS}, - * {16, 0xFFFFFFFFFFFFFFFE, 16, 17, "FFFFFFFFFFFFFFFE\0--------------------------------------------------", STATUS_SUCCESS}, - * {16, 0xFFFFFFFFFFFFFFFF, 16, 17, "FFFFFFFFFFFFFFFF\0--------------------------------------------------", STATUS_SUCCESS}, - */ - - { 2, 32768, 16, 17, "1000000000000000\0--------------------------------------------------", STATUS_SUCCESS}, - { 2, 32768, 16, 16, "1000000000000000---------------------------------------------------", STATUS_SUCCESS}, - { 2, 65536, 17, 18, "10000000000000000\0-------------------------------------------------", STATUS_SUCCESS}, - { 2, 65536, 17, 17, "10000000000000000--------------------------------------------------", STATUS_SUCCESS}, - { 2, 131072, 18, 19, "100000000000000000\0------------------------------------------------", STATUS_SUCCESS}, - { 2, 131072, 18, 18, "100000000000000000-------------------------------------------------", STATUS_SUCCESS}, - {16, 0xffffffff, 8, 9, "FFFFFFFF\0----------------------------------------------------------", STATUS_SUCCESS}, - {16, 0xffffffff, 8, 8, "FFFFFFFF-----------------------------------------------------------", STATUS_SUCCESS}, - {16, 0xffffffff, 8, 7, "-------------------------------------------------------------------", STATUS_BUFFER_OVERFLOW}, - {16, 0xa, 1, 2, "A\0-----------------------------------------------------------------", STATUS_SUCCESS}, - {16, 0xa, 1, 1, "A------------------------------------------------------------------", STATUS_SUCCESS}, - {16, 0, 1, 0, "-------------------------------------------------------------------", STATUS_BUFFER_OVERFLOW}, - {20, 0xdeadbeef, 0, 9, "-------------------------------------------------------------------", STATUS_INVALID_PARAMETER}, - {-8, 07654321, 0, 12, "-------------------------------------------------------------------", STATUS_INVALID_PARAMETER}, -}; -#define NB_LARGEINT2STR (sizeof(largeint2str)/sizeof(*largeint2str)) - - -static void one_RtlInt64ToUnicodeString_test(int test_num, const largeint2str_t *largeint2str) -{ - int pos; - WCHAR expected_str_Buffer[LARGE_STRI_BUFFER_LENGTH + 1]; - UNICODE_STRING expected_unicode_string; - STRING expected_ansi_str; - WCHAR str_Buffer[LARGE_STRI_BUFFER_LENGTH + 1]; - UNICODE_STRING unicode_string; - STRING ansi_str; - NTSTATUS result; - -#ifdef _WIN64 - if (largeint2str->value >> 32 == 0xffffffff) /* this crashes on 64-bit Vista */ - { - skip( "Value ffffffff%08x broken on 64-bit windows\n", (DWORD)largeint2str->value ); - return; - } -#endif - - for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) { - expected_str_Buffer[pos] = largeint2str->Buffer[pos]; - } /* for */ - expected_unicode_string.Length = largeint2str->Length * sizeof(WCHAR); - expected_unicode_string.MaximumLength = largeint2str->MaximumLength * sizeof(WCHAR); - expected_unicode_string.Buffer = expected_str_Buffer; - pRtlUnicodeStringToAnsiString(&expected_ansi_str, &expected_unicode_string, 1); - - for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) { - str_Buffer[pos] = '-'; - } /* for */ - unicode_string.Length = 0; - unicode_string.MaximumLength = largeint2str->MaximumLength * sizeof(WCHAR); - unicode_string.Buffer = str_Buffer; - - if (largeint2str->base == 0) { - result = pRtlInt64ToUnicodeString(largeint2str->value, 10, &unicode_string); - } else { - result = pRtlInt64ToUnicodeString(largeint2str->value, largeint2str->base, &unicode_string); - } /* if */ - pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1); - if (result == STATUS_BUFFER_OVERFLOW) { - /* On BUFFER_OVERFLOW the string Buffer should be unchanged */ - for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) { - expected_str_Buffer[pos] = '-'; - } /* for */ - /* w2k: The native function has two reasons for BUFFER_OVERFLOW: */ - /* If the value is too large to convert: The Length is unchanged */ - /* If str is too small to hold the string: Set str->Length to the length */ - /* the string would have (which can be larger than the MaximumLength). */ - /* To allow all this in the tests we do the following: */ - if (expected_unicode_string.Length >= 64) { - /* The value is too large to convert only triggered when testing native */ - /* Length is not filled with the expected string length (garbage?) */ - expected_unicode_string.Length = unicode_string.Length; - } /* if */ - } else { - ok(result == largeint2str->result, - "(test %d): RtlInt64ToUnicodeString(0x%x%08x, %d, [out]) has result %x, expected: %x\n", - test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value, - largeint2str->base, result, largeint2str->result); - if (result == STATUS_SUCCESS) { - ok(unicode_string.Buffer[unicode_string.Length/sizeof(WCHAR)] == '\0', - "(test %d): RtlInt64ToUnicodeString(0x%x%08x, %d, [out]) string \"%s\" is not NULL terminated\n", - test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value, - largeint2str->base, ansi_str.Buffer); - } /* if */ - } /* if */ - ok(memcmp(unicode_string.Buffer, expected_unicode_string.Buffer, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0, - "(test %d): RtlInt64ToUnicodeString(0x%x%08x, %d, [out]) assigns string \"%s\", expected: \"%s\"\n", - test_num, (DWORD)(largeint2str->value >>32), (DWORD)largeint2str->value, largeint2str->base, - ansi_str.Buffer, expected_ansi_str.Buffer); - ok(unicode_string.Length == expected_unicode_string.Length, - "(test %d): RtlInt64ToUnicodeString(0x%x%08x, %d, [out]) string has Length %d, expected: %d\n", - test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value, largeint2str->base, - unicode_string.Length, expected_unicode_string.Length); - ok(unicode_string.MaximumLength == expected_unicode_string.MaximumLength, - "(test %d): RtlInt64ToUnicodeString(0x%x%08x, %d, [out]) string has MaximumLength %d, expected: %d\n", - test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value, largeint2str->base, - unicode_string.MaximumLength, expected_unicode_string.MaximumLength); - pRtlFreeAnsiString(&expected_ansi_str); - pRtlFreeAnsiString(&ansi_str); -} - - -static void test_RtlInt64ToUnicodeString(void) -{ - int test_num; - - for (test_num = 0; test_num < NB_LARGEINT2STR; test_num++) { - one_RtlInt64ToUnicodeString_test(test_num, &largeint2str[test_num]); - } /* for */ -} - - -static void one_RtlLargeIntegerToChar_test(int test_num, const largeint2str_t *largeint2str) -{ - NTSTATUS result; - char dest_str[LARGE_STRI_BUFFER_LENGTH + 1]; - ULONGLONG value; - -#ifdef _WIN64 - if (largeint2str->value >> 32 == 0xffffffff) /* this crashes on 64-bit Vista */ - { - skip( "Value ffffffff%08x broken on 64-bit windows\n", (DWORD)largeint2str->value ); - return; - } -#endif - - memset(dest_str, '-', LARGE_STRI_BUFFER_LENGTH); - dest_str[LARGE_STRI_BUFFER_LENGTH] = '\0'; - value = largeint2str->value; - if (largeint2str->base == 0) { - result = pRtlLargeIntegerToChar(&value, 10, largeint2str->MaximumLength, dest_str); - } else { - result = pRtlLargeIntegerToChar(&value, largeint2str->base, largeint2str->MaximumLength, dest_str); - } /* if */ - ok(result == largeint2str->result, - "(test %d): RtlLargeIntegerToChar(0x%x%08x, %d, %d, [out]) has result %x, expected: %x\n", - test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value, largeint2str->base, - largeint2str->MaximumLength, result, largeint2str->result); - ok(memcmp(dest_str, largeint2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0, - "(test %d): RtlLargeIntegerToChar(0x%x%08x, %d, %d, [out]) assigns string \"%s\", expected: \"%s\"\n", - test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value, largeint2str->base, - largeint2str->MaximumLength, dest_str, largeint2str->Buffer); -} - - -static void test_RtlLargeIntegerToChar(void) -{ - NTSTATUS result; - int test_num; - ULONGLONG value; - - for (test_num = 0; test_num < NB_LARGEINT2STR; test_num++) { - one_RtlLargeIntegerToChar_test(test_num, &largeint2str[test_num]); - } /* for */ - - value = largeint2str[0].value; - result = pRtlLargeIntegerToChar(&value, 20, largeint2str[0].MaximumLength, NULL); - ok(result == STATUS_INVALID_PARAMETER, - "(test a): RtlLargeIntegerToChar(0x%x%08x, %d, %d, NULL) has result %x, expected: %x\n", - (DWORD)(largeint2str[0].value >> 32), (DWORD)largeint2str[0].value, 20, - largeint2str[0].MaximumLength, result, STATUS_INVALID_PARAMETER); - - result = pRtlLargeIntegerToChar(&value, 20, 0, NULL); - ok(result == STATUS_INVALID_PARAMETER, - "(test b): RtlLargeIntegerToChar(0x%x%08x, %d, %d, NULL) has result %x, expected: %x\n", - (DWORD)(largeint2str[0].value >> 32), (DWORD)largeint2str[0].value, 20, - largeint2str[0].MaximumLength, result, STATUS_INVALID_PARAMETER); - - result = pRtlLargeIntegerToChar(&value, largeint2str[0].base, 0, NULL); - ok(result == STATUS_BUFFER_OVERFLOW, - "(test c): RtlLargeIntegerToChar(0x%x%08x, %d, %d, NULL) has result %x, expected: %x\n", - (DWORD)(largeint2str[0].value >> 32), (DWORD)largeint2str[0].value, - largeint2str[0].base, 0, result, STATUS_BUFFER_OVERFLOW); - - result = pRtlLargeIntegerToChar(&value, largeint2str[0].base, largeint2str[0].MaximumLength, NULL); - ok(result == STATUS_ACCESS_VIOLATION, - "(test d): RtlLargeIntegerToChar(0x%x%08x, %d, %d, NULL) has result %x, expected: %x\n", - (DWORD)(largeint2str[0].value >> 32), (DWORD)largeint2str[0].value, - largeint2str[0].base, largeint2str[0].MaximumLength, result, STATUS_ACCESS_VIOLATION); -} - - -START_TEST(large_int) -{ - InitFunctionPtrs(); - - if (pRtlExtendedMagicDivide) - test_RtlExtendedMagicDivide(); - if (pRtlInt64ToUnicodeString) - test_RtlInt64ToUnicodeString(); - if (pRtlLargeIntegerToChar) - test_RtlLargeIntegerToChar(); -} diff --git a/rostests/winetests/ntdll/ntdll.rbuild b/rostests/winetests/ntdll/ntdll.rbuild deleted file mode 100644 index 6ab283d8d7d..00000000000 --- a/rostests/winetests/ntdll/ntdll.rbuild +++ /dev/null @@ -1,29 +0,0 @@ - - - - . - - ntdll - user32 - atom.c - change.c - directory.c - env.c - error.c - exception.c - file.c - generated.c - info.c - large_int.c - om.c - path.c - pipe.c - port.c - reg.c - rtlbitmap.c - rtl.c - rtlstr.c - string.c - time.c - testlist.c - diff --git a/rostests/winetests/ntdll/ntdll_test.h b/rostests/winetests/ntdll/ntdll_test.h deleted file mode 100755 index 167e5ca708c..00000000000 --- a/rostests/winetests/ntdll/ntdll_test.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Unit test suite for ntdll path functions - * - * Copyright 2003 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 - -#ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x500 /* For NTSTATUS */ -#endif - -#include "ntstatus.h" -#define WIN32_NO_STATUS -#include "windef.h" -#include "winbase.h" -#include "winnt.h" -#include "winreg.h" -#include "winternl.h" - -#include "wine/test.h" diff --git a/rostests/winetests/ntdll/om.c b/rostests/winetests/ntdll/om.c deleted file mode 100644 index ac377616446..00000000000 --- a/rostests/winetests/ntdll/om.c +++ /dev/null @@ -1,840 +0,0 @@ -/* - * Unit test suite for object manager functions - * - * Copyright 2005 Robert Shearman - * Copyright 2005 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 - */ - -#include "ntdll_test.h" -#include "winternl.h" -#include "stdio.h" -#include "winnt.h" -#include "stdlib.h" - -static HANDLE (WINAPI *pCreateWaitableTimerA)(SECURITY_ATTRIBUTES*, BOOL, LPCSTR); -static NTSTATUS (WINAPI *pRtlCreateUnicodeStringFromAsciiz)(PUNICODE_STRING, LPCSTR); -static VOID (WINAPI *pRtlInitUnicodeString)( PUNICODE_STRING, LPCWSTR ); -static VOID (WINAPI *pRtlFreeUnicodeString)(PUNICODE_STRING); -static NTSTATUS (WINAPI *pNtCreateEvent) ( PHANDLE, ACCESS_MASK, const POBJECT_ATTRIBUTES, BOOLEAN, BOOLEAN); -static NTSTATUS (WINAPI *pNtCreateMutant)( PHANDLE, ACCESS_MASK, const POBJECT_ATTRIBUTES, BOOLEAN ); -static NTSTATUS (WINAPI *pNtOpenMutant) ( PHANDLE, ACCESS_MASK, const POBJECT_ATTRIBUTES ); -static NTSTATUS (WINAPI *pNtCreateSemaphore)( PHANDLE, ACCESS_MASK,const POBJECT_ATTRIBUTES,LONG,LONG ); -static NTSTATUS (WINAPI *pNtCreateTimer) ( PHANDLE, ACCESS_MASK, const POBJECT_ATTRIBUTES, TIMER_TYPE ); -static NTSTATUS (WINAPI *pNtCreateSection)( PHANDLE, ACCESS_MASK, const POBJECT_ATTRIBUTES, const PLARGE_INTEGER, - ULONG, ULONG, HANDLE ); -static NTSTATUS (WINAPI *pNtOpenFile) ( PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PIO_STATUS_BLOCK, ULONG, ULONG ); -static NTSTATUS (WINAPI *pNtClose) ( HANDLE ); -static NTSTATUS (WINAPI *pNtCreateNamedPipeFile)( PHANDLE, ULONG, POBJECT_ATTRIBUTES, PIO_STATUS_BLOCK, - ULONG, ULONG, ULONG, ULONG, ULONG, ULONG, ULONG, ULONG, ULONG, PLARGE_INTEGER ); -static NTSTATUS (WINAPI *pNtOpenDirectoryObject)(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES); -static NTSTATUS (WINAPI *pNtCreateDirectoryObject)(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES); -static NTSTATUS (WINAPI *pNtOpenSymbolicLinkObject)(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES); -static NTSTATUS (WINAPI *pNtCreateSymbolicLinkObject)(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PUNICODE_STRING); -static NTSTATUS (WINAPI *pNtQuerySymbolicLinkObject)(HANDLE,PUNICODE_STRING,PULONG); -static NTSTATUS (WINAPI *pNtQueryObject)(HANDLE,OBJECT_INFORMATION_CLASS,PVOID,ULONG,PULONG); -static NTSTATUS (WINAPI *pNtReleaseSemaphore)(HANDLE handle, ULONG count, PULONG previous); - - -static void test_case_sensitive (void) -{ - static const WCHAR buffer1[] = {'\\','B','a','s','e','N','a','m','e','d','O','b','j','e','c','t','s','\\','t','e','s','t',0}; - static const WCHAR buffer2[] = {'\\','B','a','s','e','N','a','m','e','d','O','b','j','e','c','t','s','\\','T','e','s','t',0}; - static const WCHAR buffer3[] = {'\\','B','a','s','e','N','a','m','e','d','O','b','j','e','c','t','s','\\','T','E','s','t',0}; - static const WCHAR buffer4[] = {'\\','B','A','S','E','N','a','m','e','d','O','b','j','e','c','t','s','\\','t','e','s','t',0}; - NTSTATUS status; - OBJECT_ATTRIBUTES attr; - UNICODE_STRING str; - HANDLE Event, Mutant, h; - - pRtlInitUnicodeString(&str, buffer1); - InitializeObjectAttributes(&attr, &str, 0, 0, NULL); - status = pNtCreateMutant(&Mutant, GENERIC_ALL, &attr, FALSE); - ok(status == STATUS_SUCCESS, "Failed to create Mutant(%08x)\n", status); - - status = pNtCreateEvent(&Event, GENERIC_ALL, &attr, FALSE, FALSE); - ok(status == STATUS_OBJECT_NAME_COLLISION || status == STATUS_OBJECT_TYPE_MISMATCH, - "NtCreateEvent should have failed with STATUS_OBJECT_NAME_COLLISION or STATUS_OBJECT_TYPE_MISMATCH got (%08x)\n", status); - - pRtlInitUnicodeString(&str, buffer2); - InitializeObjectAttributes(&attr, &str, 0, 0, NULL); - status = pNtCreateEvent(&Event, GENERIC_ALL, &attr, FALSE, FALSE); - ok(status == STATUS_SUCCESS, "Failed to create Event(%08x)\n", status); - - pRtlInitUnicodeString(&str, buffer3); - InitializeObjectAttributes(&attr, &str, OBJ_CASE_INSENSITIVE, 0, NULL); - status = pNtOpenMutant(&h, GENERIC_ALL, &attr); - ok(status == STATUS_OBJECT_TYPE_MISMATCH, - "NtOpenMutant should have failed with STATUS_OBJECT_TYPE_MISMATCH got(%08x)\n", status); - - pNtClose(Mutant); - - pRtlInitUnicodeString(&str, buffer4); - InitializeObjectAttributes(&attr, &str, OBJ_CASE_INSENSITIVE, 0, NULL); - status = pNtCreateMutant(&Mutant, GENERIC_ALL, &attr, FALSE); - ok(status == STATUS_OBJECT_NAME_COLLISION || status == STATUS_OBJECT_TYPE_MISMATCH, - "NtCreateMutant should have failed with STATUS_OBJECT_NAME_COLLISION or STATUS_OBJECT_TYPE_MISMATCH got (%08x)\n", status); - - status = pNtCreateEvent(&h, GENERIC_ALL, &attr, FALSE, FALSE); - ok(status == STATUS_OBJECT_NAME_COLLISION, - "NtCreateEvent should have failed with STATUS_OBJECT_NAME_COLLISION got(%08x)\n", status); - - attr.Attributes = 0; - status = pNtCreateMutant(&Mutant, GENERIC_ALL, &attr, FALSE); - ok(status == STATUS_OBJECT_PATH_NOT_FOUND, - "NtCreateMutant should have failed with STATUS_OBJECT_PATH_NOT_FOUND got(%08x)\n", status); - - pNtClose(Event); -} - -static void test_namespace_pipe(void) -{ - static const WCHAR buffer1[] = {'\\','?','?','\\','P','I','P','E','\\','t','e','s','t','\\','p','i','p','e',0}; - static const WCHAR buffer2[] = {'\\','?','?','\\','P','I','P','E','\\','T','E','S','T','\\','P','I','P','E',0}; - static const WCHAR buffer3[] = {'\\','?','?','\\','p','i','p','e','\\','t','e','s','t','\\','p','i','p','e',0}; - static const WCHAR buffer4[] = {'\\','?','?','\\','p','i','p','e','\\','t','e','s','t',0}; - OBJECT_ATTRIBUTES attr; - UNICODE_STRING str; - IO_STATUS_BLOCK iosb; - NTSTATUS status; - LARGE_INTEGER timeout; - HANDLE pipe, h; - - timeout.QuadPart = -10000; - - pRtlInitUnicodeString(&str, buffer1); - InitializeObjectAttributes(&attr, &str, 0, 0, NULL); - status = pNtCreateNamedPipeFile(&pipe, GENERIC_READ|GENERIC_WRITE, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, - FILE_CREATE, FILE_PIPE_FULL_DUPLEX, FALSE, FALSE, FALSE, 1, 256, 256, &timeout); - ok(status == STATUS_SUCCESS, "Failed to create NamedPipe(%08x)\n", status); - - status = pNtCreateNamedPipeFile(&pipe, GENERIC_READ|GENERIC_WRITE, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, - FILE_CREATE, FILE_PIPE_FULL_DUPLEX, FALSE, FALSE, FALSE, 1, 256, 256, &timeout); - ok(status == STATUS_INSTANCE_NOT_AVAILABLE, - "NtCreateNamedPipeFile should have failed with STATUS_INSTANCE_NOT_AVAILABLE got(%08x)\n", status); - - pRtlInitUnicodeString(&str, buffer2); - InitializeObjectAttributes(&attr, &str, 0, 0, NULL); - status = pNtCreateNamedPipeFile(&pipe, GENERIC_READ|GENERIC_WRITE, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, - FILE_CREATE, FILE_PIPE_FULL_DUPLEX, FALSE, FALSE, FALSE, 1, 256, 256, &timeout); - ok(status == STATUS_INSTANCE_NOT_AVAILABLE, - "NtCreateNamedPipeFile should have failed with STATUS_INSTANCE_NOT_AVAILABLE got(%08x)\n", status); - - h = CreateFileA("\\\\.\\pipe\\test\\pipe", GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, - OPEN_EXISTING, 0, 0 ); - ok(h != INVALID_HANDLE_VALUE, "Failed to open NamedPipe (%u)\n", GetLastError()); - pNtClose(h); - - pRtlInitUnicodeString(&str, buffer3); - InitializeObjectAttributes(&attr, &str, 0, 0, NULL); - status = pNtOpenFile(&h, GENERIC_READ, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN); - ok(status == STATUS_OBJECT_PATH_NOT_FOUND || - status == STATUS_PIPE_NOT_AVAILABLE || - status == STATUS_OBJECT_NAME_INVALID, /* vista */ - "NtOpenFile should have failed with STATUS_OBJECT_PATH_NOT_FOUND got(%08x)\n", status); - - pRtlInitUnicodeString(&str, buffer4); - InitializeObjectAttributes(&attr, &str, OBJ_CASE_INSENSITIVE, 0, NULL); - status = pNtOpenFile(&h, GENERIC_READ, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN); - ok(status == STATUS_OBJECT_NAME_NOT_FOUND || - status == STATUS_OBJECT_NAME_INVALID, /* vista */ - "NtOpenFile should have failed with STATUS_OBJECT_NAME_NOT_FOUND got(%08x)\n", status); - - pNtClose(pipe); -} - -#define DIRECTORY_QUERY (0x0001) -#define SYMBOLIC_LINK_QUERY 0x0001 - -#define DIR_TEST_CREATE_FAILURE(h,e) \ - status = pNtCreateDirectoryObject(h, DIRECTORY_QUERY, &attr);\ - ok(status == e,"NtCreateDirectoryObject should have failed with %s got(%08x)\n", #e, status); -#define DIR_TEST_OPEN_FAILURE(h,e) \ - status = pNtOpenDirectoryObject(h, DIRECTORY_QUERY, &attr);\ - ok(status == e,"NtOpenDirectoryObject should have failed with %s got(%08x)\n", #e, status); -#define DIR_TEST_CREATE_OPEN_FAILURE(h,n,e) \ - pRtlCreateUnicodeStringFromAsciiz(&str, n);\ - DIR_TEST_CREATE_FAILURE(h,e) DIR_TEST_OPEN_FAILURE(h,e)\ - pRtlFreeUnicodeString(&str); - -#define DIR_TEST_CREATE_SUCCESS(h) \ - status = pNtCreateDirectoryObject(h, DIRECTORY_QUERY, &attr); \ - ok(status == STATUS_SUCCESS, "Failed to create Directory(%08x)\n", status); -#define DIR_TEST_OPEN_SUCCESS(h) \ - status = pNtOpenDirectoryObject(h, DIRECTORY_QUERY, &attr); \ - ok(status == STATUS_SUCCESS, "Failed to open Directory(%08x)\n", status); -#define DIR_TEST_CREATE_OPEN_SUCCESS(h,n) \ - pRtlCreateUnicodeStringFromAsciiz(&str, n);\ - DIR_TEST_CREATE_SUCCESS(&h) pNtClose(h); DIR_TEST_OPEN_SUCCESS(&h) pNtClose(h); \ - pRtlFreeUnicodeString(&str); - -static BOOL is_correct_dir( HANDLE dir, const char *name ) -{ - NTSTATUS status; - UNICODE_STRING str; - OBJECT_ATTRIBUTES attr; - HANDLE h = 0; - - pRtlCreateUnicodeStringFromAsciiz(&str, name); - InitializeObjectAttributes(&attr, &str, OBJ_OPENIF, dir, NULL); - status = pNtCreateMutant(&h, GENERIC_ALL, &attr, FALSE); - pRtlFreeUnicodeString(&str); - if (h) pNtClose( h ); - return (status == STATUS_OBJECT_NAME_EXISTS); -} - -/* return a handle to the BaseNamedObjects dir where kernel32 objects get created */ -static HANDLE get_base_dir(void) -{ - static const char objname[] = "om.c_get_base_dir_obj"; - NTSTATUS status; - UNICODE_STRING str; - OBJECT_ATTRIBUTES attr; - HANDLE dir, h; - unsigned int i; - - h = CreateMutexA(NULL, FALSE, objname); - ok(h != 0, "CreateMutexA failed got ret=%p (%d)\n", h, GetLastError()); - InitializeObjectAttributes(&attr, &str, OBJ_OPENIF, 0, NULL); - - pRtlCreateUnicodeStringFromAsciiz(&str, "\\BaseNamedObjects\\Local"); - status = pNtOpenDirectoryObject(&dir, DIRECTORY_QUERY, &attr); - pRtlFreeUnicodeString(&str); - if (!status && is_correct_dir( dir, objname )) goto done; - if (!status) pNtClose( dir ); - - pRtlCreateUnicodeStringFromAsciiz(&str, "\\BaseNamedObjects"); - status = pNtOpenDirectoryObject(&dir, DIRECTORY_QUERY, &attr); - pRtlFreeUnicodeString(&str); - if (!status && is_correct_dir( dir, objname )) goto done; - if (!status) pNtClose( dir ); - - for (i = 0; i < 20; i++) - { - char name[40]; - sprintf( name, "\\BaseNamedObjects\\Session\\%u", i ); - pRtlCreateUnicodeStringFromAsciiz(&str, name ); - status = pNtOpenDirectoryObject(&dir, DIRECTORY_QUERY, &attr); - pRtlFreeUnicodeString(&str); - if (!status && is_correct_dir( dir, objname )) goto done; - if (!status) pNtClose( dir ); - } - dir = 0; - -done: - pNtClose( h ); - return dir; -} - -static void test_name_collisions(void) -{ - NTSTATUS status; - UNICODE_STRING str; - OBJECT_ATTRIBUTES attr; - HANDLE dir, h, h1, h2; - DWORD winerr; - LARGE_INTEGER size; - - InitializeObjectAttributes(&attr, &str, 0, 0, NULL); - pRtlCreateUnicodeStringFromAsciiz(&str, "\\"); - DIR_TEST_CREATE_FAILURE(&h, STATUS_OBJECT_NAME_COLLISION) - InitializeObjectAttributes(&attr, &str, OBJ_OPENIF, 0, NULL); - - DIR_TEST_CREATE_FAILURE(&h, STATUS_OBJECT_NAME_EXISTS) - pNtClose(h); - status = pNtCreateMutant(&h, GENERIC_ALL, &attr, FALSE); - ok(status == STATUS_OBJECT_TYPE_MISMATCH, - "NtCreateMutant should have failed with STATUS_OBJECT_TYPE_MISMATCH got(%08x)\n", status); - pRtlFreeUnicodeString(&str); - - pRtlCreateUnicodeStringFromAsciiz(&str, "\\??\\PIPE\\om.c-mutant"); - status = pNtCreateMutant(&h, GENERIC_ALL, &attr, FALSE); - ok(status == STATUS_OBJECT_TYPE_MISMATCH || status == STATUS_OBJECT_PATH_NOT_FOUND, - "NtCreateMutant should have failed with STATUS_OBJECT_TYPE_MISMATCH got(%08x)\n", status); - pRtlFreeUnicodeString(&str); - - if (!(dir = get_base_dir())) - { - win_skip( "couldn't find the BaseNamedObjects dir\n" ); - return; - } - pRtlCreateUnicodeStringFromAsciiz(&str, "om.c-test"); - InitializeObjectAttributes(&attr, &str, OBJ_OPENIF, dir, NULL); - h = CreateMutexA(NULL, FALSE, "om.c-test"); - ok(h != 0, "CreateMutexA failed got ret=%p (%d)\n", h, GetLastError()); - status = pNtCreateMutant(&h1, GENERIC_ALL, &attr, FALSE); - ok(status == STATUS_OBJECT_NAME_EXISTS && h1 != NULL, - "NtCreateMutant should have succeeded with STATUS_OBJECT_NAME_EXISTS got(%08x)\n", status); - h2 = CreateMutexA(NULL, FALSE, "om.c-test"); - winerr = GetLastError(); - ok(h2 != 0 && winerr == ERROR_ALREADY_EXISTS, - "CreateMutexA should have succeeded with ERROR_ALREADY_EXISTS got ret=%p (%d)\n", h2, winerr); - pNtClose(h); - pNtClose(h1); - pNtClose(h2); - - h = CreateEventA(NULL, FALSE, FALSE, "om.c-test"); - ok(h != 0, "CreateEventA failed got ret=%p (%d)\n", h, GetLastError()); - status = pNtCreateEvent(&h1, GENERIC_ALL, &attr, FALSE, FALSE); - ok(status == STATUS_OBJECT_NAME_EXISTS && h1 != NULL, - "NtCreateEvent should have succeeded with STATUS_OBJECT_NAME_EXISTS got(%08x)\n", status); - h2 = CreateEventA(NULL, FALSE, FALSE, "om.c-test"); - winerr = GetLastError(); - ok(h2 != 0 && winerr == ERROR_ALREADY_EXISTS, - "CreateEventA should have succeeded with ERROR_ALREADY_EXISTS got ret=%p (%d)\n", h2, winerr); - pNtClose(h); - pNtClose(h1); - pNtClose(h2); - - h = CreateSemaphoreA(NULL, 1, 2, "om.c-test"); - ok(h != 0, "CreateSemaphoreA failed got ret=%p (%d)\n", h, GetLastError()); - status = pNtCreateSemaphore(&h1, GENERIC_ALL, &attr, 1, 2); - ok(status == STATUS_OBJECT_NAME_EXISTS && h1 != NULL, - "NtCreateSemaphore should have succeeded with STATUS_OBJECT_NAME_EXISTS got(%08x)\n", status); - h2 = CreateSemaphoreA(NULL, 1, 2, "om.c-test"); - winerr = GetLastError(); - ok(h2 != 0 && winerr == ERROR_ALREADY_EXISTS, - "CreateSemaphoreA should have succeeded with ERROR_ALREADY_EXISTS got ret=%p (%d)\n", h2, winerr); - pNtClose(h); - pNtClose(h1); - pNtClose(h2); - - h = pCreateWaitableTimerA(NULL, TRUE, "om.c-test"); - ok(h != 0, "CreateWaitableTimerA failed got ret=%p (%d)\n", h, GetLastError()); - status = pNtCreateTimer(&h1, GENERIC_ALL, &attr, NotificationTimer); - ok(status == STATUS_OBJECT_NAME_EXISTS && h1 != NULL, - "NtCreateTimer should have succeeded with STATUS_OBJECT_NAME_EXISTS got(%08x)\n", status); - h2 = pCreateWaitableTimerA(NULL, TRUE, "om.c-test"); - winerr = GetLastError(); - ok(h2 != 0 && winerr == ERROR_ALREADY_EXISTS, - "CreateWaitableTimerA should have succeeded with ERROR_ALREADY_EXISTS got ret=%p (%d)\n", h2, winerr); - pNtClose(h); - pNtClose(h1); - pNtClose(h2); - - h = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 256, "om.c-test"); - ok(h != 0, "CreateFileMappingA failed got ret=%p (%d)\n", h, GetLastError()); - size.u.LowPart = 256; - size.u.HighPart = 0; - status = pNtCreateSection(&h1, SECTION_MAP_WRITE, &attr, &size, PAGE_READWRITE, SEC_COMMIT, 0); - ok(status == STATUS_OBJECT_NAME_EXISTS && h1 != NULL, - "NtCreateSection should have succeeded with STATUS_OBJECT_NAME_EXISTS got(%08x)\n", status); - h2 = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 256, "om.c-test"); - winerr = GetLastError(); - ok(h2 != 0 && winerr == ERROR_ALREADY_EXISTS, - "CreateFileMappingA should have succeeded with ERROR_ALREADY_EXISTS got ret=%p (%d)\n", h2, winerr); - pNtClose(h); - pNtClose(h1); - pNtClose(h2); - - pRtlFreeUnicodeString(&str); - pNtClose(dir); -} - -static void test_directory(void) -{ - NTSTATUS status; - UNICODE_STRING str; - OBJECT_ATTRIBUTES attr; - HANDLE dir, dir1, h; - BOOL is_nt4; - - /* No name and/or no attributes */ - status = pNtCreateDirectoryObject(NULL, DIRECTORY_QUERY, &attr); - ok(status == STATUS_ACCESS_VIOLATION || status == STATUS_INVALID_PARAMETER, - "NtCreateDirectoryObject should have failed with STATUS_ACCESS_VIOLATION got(%08x)\n", status); - status = pNtOpenDirectoryObject(NULL, DIRECTORY_QUERY, &attr); - ok(status == STATUS_ACCESS_VIOLATION || status == STATUS_INVALID_PARAMETER, - "NtOpenDirectoryObject should have failed with STATUS_ACCESS_VIOLATION got(%08x)\n", status); - - status = pNtCreateDirectoryObject(&h, DIRECTORY_QUERY, NULL); - ok(status == STATUS_SUCCESS, "Failed to create Directory without attributes(%08x)\n", status); - pNtClose(h); - status = pNtOpenDirectoryObject(&h, DIRECTORY_QUERY, NULL); - ok(status == STATUS_INVALID_PARAMETER, - "NtOpenDirectoryObject should have failed with STATUS_INVALID_PARAMETER got(%08x)\n", status); - - InitializeObjectAttributes(&attr, NULL, 0, 0, NULL); - DIR_TEST_CREATE_SUCCESS(&dir) - DIR_TEST_OPEN_FAILURE(&h, STATUS_OBJECT_PATH_SYNTAX_BAD) - - /* Bad name */ - InitializeObjectAttributes(&attr, &str, 0, 0, NULL); - - pRtlCreateUnicodeStringFromAsciiz(&str, ""); - DIR_TEST_CREATE_SUCCESS(&h) - pNtClose(h); - DIR_TEST_OPEN_FAILURE(&h, STATUS_OBJECT_PATH_SYNTAX_BAD) - pRtlFreeUnicodeString(&str); - pNtClose(dir); - - DIR_TEST_CREATE_OPEN_FAILURE(&h, "BaseNamedObjects", STATUS_OBJECT_PATH_SYNTAX_BAD) - DIR_TEST_CREATE_OPEN_FAILURE(&h, "\\BaseNamedObjects\\", STATUS_OBJECT_NAME_INVALID) - DIR_TEST_CREATE_OPEN_FAILURE(&h, "\\\\BaseNamedObjects", STATUS_OBJECT_NAME_INVALID) - DIR_TEST_CREATE_OPEN_FAILURE(&h, "\\BaseNamedObjects\\\\om.c-test", STATUS_OBJECT_NAME_INVALID) - DIR_TEST_CREATE_OPEN_FAILURE(&h, "\\BaseNamedObjects\\om.c-test\\", STATUS_OBJECT_PATH_NOT_FOUND) - - pRtlCreateUnicodeStringFromAsciiz(&str, "\\BaseNamedObjects\\om.c-test"); - DIR_TEST_CREATE_SUCCESS(&h) - DIR_TEST_OPEN_SUCCESS(&dir1) - pRtlFreeUnicodeString(&str); - pNtClose(h); - pNtClose(dir1); - - - /* Use of root directory */ - - /* Can't use symlinks as a directory */ - pRtlCreateUnicodeStringFromAsciiz(&str, "\\BaseNamedObjects\\Local"); - InitializeObjectAttributes(&attr, &str, 0, 0, NULL); - status = pNtOpenSymbolicLinkObject(&dir, SYMBOLIC_LINK_QUERY, &attr); - is_nt4 = (status == STATUS_OBJECT_NAME_NOT_FOUND); /* nt4 doesn't have Local\\ symlink */ - if (!is_nt4) - { - WCHAR buffer[256]; - ULONG len, full_len; - - ok(status == STATUS_SUCCESS, "Failed to open SymbolicLink(%08x)\n", status); - pRtlFreeUnicodeString(&str); - InitializeObjectAttributes(&attr, &str, 0, dir, NULL); - pRtlCreateUnicodeStringFromAsciiz(&str, "one more level"); - DIR_TEST_CREATE_FAILURE(&h, STATUS_OBJECT_TYPE_MISMATCH) - pRtlFreeUnicodeString(&str); - - str.Buffer = buffer; - str.MaximumLength = sizeof(buffer); - len = 0xdeadbeef; - memset( buffer, 0xaa, sizeof(buffer) ); - status = pNtQuerySymbolicLinkObject( dir, &str, &len ); - ok( status == STATUS_SUCCESS, "NtQuerySymbolicLinkObject failed %08x\n", status ); - if (status != STATUS_SUCCESS) - goto error; - full_len = str.Length + sizeof(WCHAR); - ok( len == full_len, "bad length %u/%u\n", len, full_len ); - if (len == full_len) - ok( buffer[len / sizeof(WCHAR) - 1] == 0, "no terminating null\n" ); - - str.MaximumLength = str.Length; - len = 0xdeadbeef; - status = pNtQuerySymbolicLinkObject( dir, &str, &len ); - ok( status == STATUS_BUFFER_TOO_SMALL, "NtQuerySymbolicLinkObject failed %08x\n", status ); - ok( len == full_len, "bad length %u/%u\n", len, full_len ); - - str.MaximumLength = 0; - len = 0xdeadbeef; - status = pNtQuerySymbolicLinkObject( dir, &str, &len ); - ok( status == STATUS_BUFFER_TOO_SMALL, "NtQuerySymbolicLinkObject failed %08x\n", status ); - ok( len == full_len, "bad length %u/%u\n", len, full_len ); - - str.MaximumLength = str.Length + sizeof(WCHAR); - len = 0xdeadbeef; - status = pNtQuerySymbolicLinkObject( dir, &str, &len ); - ok( status == STATUS_SUCCESS, "NtQuerySymbolicLinkObject failed %08x\n", status ); - ok( len == full_len, "bad length %u/%u\n", len, full_len ); - -error: - pNtClose(dir); - } - - pRtlCreateUnicodeStringFromAsciiz(&str, "\\BaseNamedObjects"); - InitializeObjectAttributes(&attr, &str, 0, 0, NULL); - DIR_TEST_OPEN_SUCCESS(&dir) - pRtlFreeUnicodeString(&str); - - InitializeObjectAttributes(&attr, NULL, 0, dir, NULL); - DIR_TEST_OPEN_FAILURE(&h, STATUS_OBJECT_NAME_INVALID) - - InitializeObjectAttributes(&attr, &str, 0, dir, NULL); - DIR_TEST_CREATE_OPEN_SUCCESS(h, "") - DIR_TEST_CREATE_OPEN_FAILURE(&h, "\\", STATUS_OBJECT_PATH_SYNTAX_BAD) - DIR_TEST_CREATE_OPEN_FAILURE(&h, "\\om.c-test", STATUS_OBJECT_PATH_SYNTAX_BAD) - DIR_TEST_CREATE_OPEN_FAILURE(&h, "\\om.c-test\\", STATUS_OBJECT_PATH_SYNTAX_BAD) - DIR_TEST_CREATE_OPEN_FAILURE(&h, "om.c-test\\", STATUS_OBJECT_PATH_NOT_FOUND) - - pRtlCreateUnicodeStringFromAsciiz(&str, "om.c-test"); - DIR_TEST_CREATE_SUCCESS(&dir1) - DIR_TEST_OPEN_SUCCESS(&h) - pRtlFreeUnicodeString(&str); - - pNtClose(h); - pNtClose(dir1); - pNtClose(dir); - - /* Nested directories */ - pRtlCreateUnicodeStringFromAsciiz(&str, "\\"); - InitializeObjectAttributes(&attr, &str, 0, 0, NULL); - DIR_TEST_OPEN_SUCCESS(&dir) - InitializeObjectAttributes(&attr, &str, 0, dir, NULL); - DIR_TEST_OPEN_FAILURE(&h, STATUS_OBJECT_PATH_SYNTAX_BAD) - pRtlFreeUnicodeString(&str); - pNtClose(dir); - - InitializeObjectAttributes(&attr, &str, 0, 0, NULL); - pRtlCreateUnicodeStringFromAsciiz(&str, "\\BaseNamedObjects\\om.c-test"); - DIR_TEST_CREATE_SUCCESS(&dir) - pRtlFreeUnicodeString(&str); - pRtlCreateUnicodeStringFromAsciiz(&str, "\\BaseNamedObjects\\om.c-test\\one more level"); - DIR_TEST_CREATE_SUCCESS(&h) - pRtlFreeUnicodeString(&str); - pNtClose(h); - InitializeObjectAttributes(&attr, &str, 0, dir, NULL); - pRtlCreateUnicodeStringFromAsciiz(&str, "one more level"); - DIR_TEST_CREATE_SUCCESS(&h) - pRtlFreeUnicodeString(&str); - pNtClose(h); - - pNtClose(dir); - - if (!is_nt4) - { - InitializeObjectAttributes(&attr, &str, 0, 0, NULL); - pRtlCreateUnicodeStringFromAsciiz(&str, "\\BaseNamedObjects\\Global\\om.c-test"); - DIR_TEST_CREATE_SUCCESS(&dir) - pRtlFreeUnicodeString(&str); - pRtlCreateUnicodeStringFromAsciiz(&str, "\\BaseNamedObjects\\Local\\om.c-test\\one more level"); - DIR_TEST_CREATE_SUCCESS(&h) - pRtlFreeUnicodeString(&str); - pNtClose(h); - InitializeObjectAttributes(&attr, &str, 0, dir, NULL); - pRtlCreateUnicodeStringFromAsciiz(&str, "one more level"); - DIR_TEST_CREATE_SUCCESS(&dir) - pRtlFreeUnicodeString(&str); - pNtClose(h); - pNtClose(dir); - } - - /* Create other objects using RootDirectory */ - - InitializeObjectAttributes(&attr, &str, 0, 0, NULL); - pRtlCreateUnicodeStringFromAsciiz(&str, "\\BaseNamedObjects"); - DIR_TEST_OPEN_SUCCESS(&dir) - pRtlFreeUnicodeString(&str); - InitializeObjectAttributes(&attr, &str, 0, dir, NULL); - - /* Test invalid paths */ - pRtlCreateUnicodeStringFromAsciiz(&str, "\\om.c-mutant"); - status = pNtCreateMutant(&h, GENERIC_ALL, &attr, FALSE); - ok(status == STATUS_OBJECT_PATH_SYNTAX_BAD, - "NtCreateMutant should have failed with STATUS_OBJECT_PATH_SYNTAX_BAD got(%08x)\n", status); - pRtlFreeUnicodeString(&str); - pRtlCreateUnicodeStringFromAsciiz(&str, "\\om.c-mutant\\"); - status = pNtCreateMutant(&h, GENERIC_ALL, &attr, FALSE); - ok(status == STATUS_OBJECT_PATH_SYNTAX_BAD, - "NtCreateMutant should have failed with STATUS_OBJECT_PATH_SYNTAX_BAD got(%08x)\n", status); - pRtlFreeUnicodeString(&str); - - pRtlCreateUnicodeStringFromAsciiz(&str, "om.c\\-mutant"); - status = pNtCreateMutant(&h, GENERIC_ALL, &attr, FALSE); - ok(status == STATUS_OBJECT_PATH_NOT_FOUND, - "NtCreateMutant should have failed with STATUS_OBJECT_PATH_NOT_FOUND got(%08x)\n", status); - pRtlFreeUnicodeString(&str); - - pRtlCreateUnicodeStringFromAsciiz(&str, "om.c-mutant"); - status = pNtCreateMutant(&h, GENERIC_ALL, &attr, FALSE); - ok(status == STATUS_SUCCESS, "Failed to create Mutant(%08x)\n", status); - pRtlFreeUnicodeString(&str); - pNtClose(h); - - pNtClose(dir); -} - -#define SYMLNK_TEST_CREATE_OPEN_FAILURE2(h,n,t,e,e2) \ - pRtlCreateUnicodeStringFromAsciiz(&str, n);\ - pRtlCreateUnicodeStringFromAsciiz(&target, t);\ - status = pNtCreateSymbolicLinkObject(h, SYMBOLIC_LINK_QUERY, &attr, &target);\ - ok(status == e || status == e2, \ - "NtCreateSymbolicLinkObject should have failed with %s or %s got(%08x)\n", #e, #e2, status);\ - status = pNtOpenSymbolicLinkObject(h, SYMBOLIC_LINK_QUERY, &attr);\ - ok(status == e || status == e2, \ - "NtOpenSymbolicLinkObject should have failed with %s or %s got(%08x)\n", #e, #e2, status);\ - pRtlFreeUnicodeString(&target);\ - pRtlFreeUnicodeString(&str); - -#define SYMLNK_TEST_CREATE_OPEN_FAILURE(h,n,t,e) SYMLNK_TEST_CREATE_OPEN_FAILURE2(h,n,t,e,e) - -static void test_symboliclink(void) -{ - NTSTATUS status; - UNICODE_STRING str, target; - OBJECT_ATTRIBUTES attr; - HANDLE dir, link, h; - IO_STATUS_BLOCK iosb; - - /* No name and/or no attributes */ - InitializeObjectAttributes(&attr, NULL, 0, 0, NULL); - SYMLNK_TEST_CREATE_OPEN_FAILURE2(NULL, "", "", STATUS_ACCESS_VIOLATION, STATUS_INVALID_PARAMETER) - - status = pNtCreateSymbolicLinkObject(&h, SYMBOLIC_LINK_QUERY, NULL, NULL); - ok(status == STATUS_ACCESS_VIOLATION, - "NtCreateSymbolicLinkObject should have failed with STATUS_ACCESS_VIOLATION got(%08x)\n", status); - status = pNtOpenSymbolicLinkObject(&h, SYMBOLIC_LINK_QUERY, NULL); - ok(status == STATUS_INVALID_PARAMETER, - "NtOpenSymbolicLinkObject should have failed with STATUS_INVALID_PARAMETER got(%08x)\n", status); - - /* No attributes */ - pRtlCreateUnicodeStringFromAsciiz(&target, "\\DosDevices"); - status = pNtCreateSymbolicLinkObject(&h, SYMBOLIC_LINK_QUERY, NULL, &target); - ok(status == STATUS_SUCCESS || status == STATUS_ACCESS_VIOLATION, /* nt4 */ - "NtCreateSymbolicLinkObject failed(%08x)\n", status); - pRtlFreeUnicodeString(&target); - if (!status) pNtClose(h); - - InitializeObjectAttributes(&attr, NULL, 0, 0, NULL); - status = pNtCreateSymbolicLinkObject(&link, SYMBOLIC_LINK_QUERY, &attr, &target); - ok(status == STATUS_INVALID_PARAMETER || - broken(status == STATUS_SUCCESS), /* nt4 */ - "NtCreateSymbolicLinkObject should have failed with STATUS_INVALID_PARAMETER got(%08x)\n", status); - if (!status) pNtClose(h); - status = pNtOpenSymbolicLinkObject(&h, SYMBOLIC_LINK_QUERY, &attr); - ok(status == STATUS_OBJECT_PATH_SYNTAX_BAD, - "NtOpenSymbolicLinkObject should have failed with STATUS_OBJECT_PATH_SYNTAX_BAD got(%08x)\n", status); - - /* Bad name */ - pRtlCreateUnicodeStringFromAsciiz(&target, "anywhere"); - InitializeObjectAttributes(&attr, &str, 0, 0, NULL); - - pRtlCreateUnicodeStringFromAsciiz(&str, ""); - status = pNtCreateSymbolicLinkObject(&link, SYMBOLIC_LINK_QUERY, &attr, &target); - ok(status == STATUS_SUCCESS, "Failed to create SymbolicLink(%08x)\n", status); - status = pNtOpenSymbolicLinkObject(&h, SYMBOLIC_LINK_QUERY, &attr); - ok(status == STATUS_OBJECT_PATH_SYNTAX_BAD, - "NtOpenSymbolicLinkObject should have failed with STATUS_OBJECT_PATH_SYNTAX_BAD got(%08x)\n", status); - pNtClose(link); - pRtlFreeUnicodeString(&str); - - pRtlCreateUnicodeStringFromAsciiz(&str, "\\"); - status = pNtCreateSymbolicLinkObject(&h, SYMBOLIC_LINK_QUERY, &attr, &target); - todo_wine ok(status == STATUS_OBJECT_TYPE_MISMATCH, - "NtCreateSymbolicLinkObject should have failed with STATUS_OBJECT_TYPE_MISMATCH got(%08x)\n", status); - pRtlFreeUnicodeString(&str); - pRtlFreeUnicodeString(&target); - - SYMLNK_TEST_CREATE_OPEN_FAILURE(&h, "BaseNamedObjects", "->Somewhere", STATUS_OBJECT_PATH_SYNTAX_BAD) - SYMLNK_TEST_CREATE_OPEN_FAILURE(&h, "\\BaseNamedObjects\\", "->Somewhere", STATUS_OBJECT_NAME_INVALID) - SYMLNK_TEST_CREATE_OPEN_FAILURE(&h, "\\\\BaseNamedObjects", "->Somewhere", STATUS_OBJECT_NAME_INVALID) - SYMLNK_TEST_CREATE_OPEN_FAILURE(&h, "\\BaseNamedObjects\\\\om.c-test", "->Somewhere", STATUS_OBJECT_NAME_INVALID) - SYMLNK_TEST_CREATE_OPEN_FAILURE2(&h, "\\BaseNamedObjects\\om.c-test\\", "->Somewhere", - STATUS_OBJECT_NAME_INVALID, STATUS_OBJECT_PATH_NOT_FOUND) - - - /* Compound test */ - if (!(dir = get_base_dir())) - { - win_skip( "couldn't find the BaseNamedObjects dir\n" ); - return; - } - - InitializeObjectAttributes(&attr, &str, 0, dir, NULL); - pRtlCreateUnicodeStringFromAsciiz(&str, "test-link"); - pRtlCreateUnicodeStringFromAsciiz(&target, "\\DosDevices"); - status = pNtCreateSymbolicLinkObject(&link, SYMBOLIC_LINK_QUERY, &attr, &target); - ok(status == STATUS_SUCCESS, "Failed to create SymbolicLink(%08x)\n", status); - pRtlFreeUnicodeString(&str); - pRtlFreeUnicodeString(&target); - - pRtlCreateUnicodeStringFromAsciiz(&str, "test-link\\NUL"); - status = pNtOpenFile(&h, GENERIC_READ, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN); - todo_wine ok(status == STATUS_SUCCESS, "Failed to open NUL device(%08x)\n", status); - pRtlFreeUnicodeString(&str); - - pNtClose(h); - pNtClose(link); - pNtClose(dir); -} - -static void test_query_object(void) -{ - static const WCHAR name[] = {'\\','B','a','s','e','N','a','m','e','d','O','b','j','e','c','t','s', - '\\','t','e','s','t','_','e','v','e','n','t'}; - static const WCHAR type_event[] = {'E','v','e','n','t'}; - static const WCHAR type_file[] = {'F','i','l','e'}; - HANDLE handle; - char buffer[1024]; - NTSTATUS status; - ULONG len, expected_len; - UNICODE_STRING *str; - char dir[MAX_PATH]; - - handle = CreateEventA( NULL, FALSE, FALSE, "test_event" ); - - len = 0; - status = pNtQueryObject( handle, ObjectNameInformation, buffer, 0, &len ); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "NtQueryObject failed %x\n", status ); - ok( len >= sizeof(UNICODE_STRING) + sizeof(name) + sizeof(WCHAR), "unexpected len %u\n", len ); - - len = 0; - status = pNtQueryObject( handle, ObjectTypeInformation, buffer, 0, &len ); - todo_wine ok( status == STATUS_INFO_LENGTH_MISMATCH, "NtQueryObject failed %x\n", status ); - todo_wine ok( len >= sizeof(OBJECT_TYPE_INFORMATION) + sizeof(type_event) + sizeof(WCHAR), "unexpected len %u\n", len ); - - len = 0; - status = pNtQueryObject( handle, ObjectNameInformation, buffer, sizeof(UNICODE_STRING), &len ); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "NtQueryObject failed %x\n", status ); - ok( len >= sizeof(UNICODE_STRING) + sizeof(name) + sizeof(WCHAR), "unexpected len %u\n", len ); - - len = 0; - status = pNtQueryObject( handle, ObjectTypeInformation, buffer, sizeof(OBJECT_TYPE_INFORMATION), &len ); - todo_wine ok( status == STATUS_INFO_LENGTH_MISMATCH, "NtQueryObject failed %x\n", status ); - todo_wine ok( len >= sizeof(OBJECT_TYPE_INFORMATION) + sizeof(type_event) + sizeof(WCHAR), "unexpected len %u\n", len ); - - len = 0; - status = pNtQueryObject( handle, ObjectNameInformation, buffer, sizeof(buffer), &len ); - ok( status == STATUS_SUCCESS, "NtQueryObject failed %x\n", status ); - ok( len > sizeof(UNICODE_STRING), "unexpected len %u\n", len ); - str = (UNICODE_STRING *)buffer; - ok( sizeof(UNICODE_STRING) + str->Length + sizeof(WCHAR) == len, "unexpected len %u\n", len ); - ok( str->Length >= sizeof(name), "unexpected len %u\n", str->Length ); - /* there can be a \\Sessions prefix in the name */ - ok( !memcmp( str->Buffer + (str->Length - sizeof(name)) / sizeof(WCHAR), name, sizeof(name) ), - "wrong name %s\n", wine_dbgstr_w(str->Buffer) ); - - len -= sizeof(WCHAR); - status = pNtQueryObject( handle, ObjectNameInformation, buffer, len, &len ); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "NtQueryObject failed %x\n", status ); - ok( len >= sizeof(UNICODE_STRING) + sizeof(name) + sizeof(WCHAR), "unexpected len %u\n", len ); - - len = 0; - memset( buffer, 0, sizeof(buffer) ); - status = pNtQueryObject( handle, ObjectTypeInformation, buffer, sizeof(buffer), &len ); - todo_wine ok( status == STATUS_SUCCESS, "NtQueryObject failed %x\n", status ); - todo_wine ok( len > sizeof(OBJECT_TYPE_INFORMATION), "unexpected len %u\n", len ); - str = (UNICODE_STRING *)buffer; - todo_wine ok( len >= sizeof(OBJECT_TYPE_INFORMATION) + str->Length + sizeof(WCHAR), "unexpected len %u\n", len ); - todo_wine ok( str->Buffer && !memcmp( str->Buffer, type_event, sizeof(type_file) ), - "wrong/bad type name %s (%p)\n", wine_dbgstr_w(str->Buffer), str->Buffer ); - - len -= sizeof(WCHAR); - status = pNtQueryObject( handle, ObjectTypeInformation, buffer, len, &len ); - todo_wine ok( status == STATUS_INFO_LENGTH_MISMATCH, "NtQueryObject failed %x\n", status ); - todo_wine ok( len >= sizeof(OBJECT_TYPE_INFORMATION) + sizeof(type_event) + sizeof(WCHAR), "unexpected len %u\n", len ); - - pNtClose( handle ); - - handle = CreateEventA( NULL, FALSE, FALSE, NULL ); - len = 0; - status = pNtQueryObject( handle, ObjectNameInformation, buffer, sizeof(buffer), &len ); - ok( status == STATUS_SUCCESS, "NtQueryObject failed %x\n", status ); - ok( len == sizeof(UNICODE_STRING), "unexpected len %u\n", len ); - str = (UNICODE_STRING *)buffer; - ok( str->Length == 0, "unexpected len %u\n", len ); - ok( str->Buffer == NULL, "unexpected ptr %p\n", str->Buffer ); - pNtClose( handle ); - - GetWindowsDirectoryA( dir, MAX_PATH ); - handle = CreateFileA( dir, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, - FILE_FLAG_BACKUP_SEMANTICS, 0 ); - len = 0; - status = pNtQueryObject( handle, ObjectNameInformation, buffer, sizeof(buffer), &len ); - ok( status == STATUS_SUCCESS, "NtQueryObject failed %x\n", status ); - ok( len > sizeof(UNICODE_STRING), "unexpected len %u\n", len ); - str = (UNICODE_STRING *)buffer; - expected_len = sizeof(UNICODE_STRING) + str->Length + sizeof(WCHAR); - ok( len == expected_len || broken(len == expected_len - sizeof(WCHAR)), /* NT4 */ - "unexpected len %u\n", len ); - trace( "got %s len %u\n", wine_dbgstr_w(str->Buffer), len ); - - len = 0; - status = pNtQueryObject( handle, ObjectNameInformation, buffer, 0, &len ); - ok( status == STATUS_INFO_LENGTH_MISMATCH || broken(status == STATUS_INSUFFICIENT_RESOURCES), - "NtQueryObject failed %x\n", status ); - ok( len == expected_len || broken(!len || len == sizeof(UNICODE_STRING)), - "unexpected len %u\n", len ); - - len = 0; - status = pNtQueryObject( handle, ObjectNameInformation, buffer, sizeof(UNICODE_STRING), &len ); - ok( status == STATUS_BUFFER_OVERFLOW || broken(status == STATUS_INSUFFICIENT_RESOURCES - || status == STATUS_INFO_LENGTH_MISMATCH), - "NtQueryObject failed %x\n", status ); - ok( len == expected_len || broken(!len), - "unexpected len %u\n", len ); - - len = 0; - memset( buffer, 0, sizeof(buffer) ); - status = pNtQueryObject( handle, ObjectTypeInformation, buffer, sizeof(buffer), &len ); - todo_wine ok( status == STATUS_SUCCESS, "NtQueryObject failed %x\n", status ); - todo_wine ok( len > sizeof(OBJECT_TYPE_INFORMATION), "unexpected len %u\n", len ); - str = (UNICODE_STRING *)buffer; - expected_len = sizeof(OBJECT_TYPE_INFORMATION) + str->Length + sizeof(WCHAR); - todo_wine ok( len >= expected_len, "unexpected len %u\n", len ); - todo_wine ok( str->Buffer && !memcmp( str->Buffer, type_file, sizeof(type_file) ), - "wrong/bad type name %s (%p)\n", wine_dbgstr_w(str->Buffer), str->Buffer ); - - pNtClose( handle ); -} - -static void test_type_mismatch(void) -{ - HANDLE h; - NTSTATUS res; - OBJECT_ATTRIBUTES attr; - - attr.Length = sizeof(attr); - attr.RootDirectory = 0; - attr.ObjectName = NULL; - attr.Attributes = 0; - attr.SecurityDescriptor = NULL; - attr.SecurityQualityOfService = NULL; - - res = pNtCreateEvent( &h, 0, &attr, 0, 0 ); - ok(!res, "can't create event: %x\n", res); - - res = pNtReleaseSemaphore( h, 30, NULL ); - ok(res == STATUS_OBJECT_TYPE_MISMATCH, "expected 0xc0000024, got %x\n", res); - - pNtClose( h ); -} - -START_TEST(om) -{ - HMODULE hntdll = GetModuleHandleA("ntdll.dll"); - HMODULE hkernel32 = GetModuleHandleA("kernel32.dll"); - - if (!hntdll) - { - skip("not running on NT, skipping test\n"); - return; - } - - pCreateWaitableTimerA = (void *)GetProcAddress(hkernel32, "CreateWaitableTimerA"); - - pRtlCreateUnicodeStringFromAsciiz = (void *)GetProcAddress(hntdll, "RtlCreateUnicodeStringFromAsciiz"); - pRtlFreeUnicodeString = (void *)GetProcAddress(hntdll, "RtlFreeUnicodeString"); - pNtCreateEvent = (void *)GetProcAddress(hntdll, "NtCreateEvent"); - pNtCreateMutant = (void *)GetProcAddress(hntdll, "NtCreateMutant"); - pNtOpenMutant = (void *)GetProcAddress(hntdll, "NtOpenMutant"); - pNtOpenFile = (void *)GetProcAddress(hntdll, "NtOpenFile"); - pNtClose = (void *)GetProcAddress(hntdll, "NtClose"); - pRtlInitUnicodeString = (void *)GetProcAddress(hntdll, "RtlInitUnicodeString"); - pNtCreateNamedPipeFile = (void *)GetProcAddress(hntdll, "NtCreateNamedPipeFile"); - pNtOpenDirectoryObject = (void *)GetProcAddress(hntdll, "NtOpenDirectoryObject"); - pNtCreateDirectoryObject= (void *)GetProcAddress(hntdll, "NtCreateDirectoryObject"); - pNtOpenSymbolicLinkObject = (void *)GetProcAddress(hntdll, "NtOpenSymbolicLinkObject"); - pNtCreateSymbolicLinkObject = (void *)GetProcAddress(hntdll, "NtCreateSymbolicLinkObject"); - pNtQuerySymbolicLinkObject = (void *)GetProcAddress(hntdll, "NtQuerySymbolicLinkObject"); - pNtCreateSemaphore = (void *)GetProcAddress(hntdll, "NtCreateSemaphore"); - pNtCreateTimer = (void *)GetProcAddress(hntdll, "NtCreateTimer"); - pNtCreateSection = (void *)GetProcAddress(hntdll, "NtCreateSection"); - pNtQueryObject = (void *)GetProcAddress(hntdll, "NtQueryObject"); - pNtReleaseSemaphore = (void *)GetProcAddress(hntdll, "NtReleaseSemaphore"); - - test_case_sensitive(); - test_namespace_pipe(); - test_name_collisions(); - test_directory(); - test_symboliclink(); - test_query_object(); - test_type_mismatch(); -} diff --git a/rostests/winetests/ntdll/path.c b/rostests/winetests/ntdll/path.c deleted file mode 100755 index a052992ec81..00000000000 --- a/rostests/winetests/ntdll/path.c +++ /dev/null @@ -1,346 +0,0 @@ -/* - * Unit test suite for ntdll path functions - * - * Copyright 2002 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 - */ - -#include "ntdll_test.h" - -static NTSTATUS (WINAPI *pRtlMultiByteToUnicodeN)( LPWSTR dst, DWORD dstlen, LPDWORD reslen, - LPCSTR src, DWORD srclen ); -static NTSTATUS (WINAPI *pRtlUnicodeToMultiByteN)(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD); -static UINT (WINAPI *pRtlDetermineDosPathNameType_U)( PCWSTR path ); -static ULONG (WINAPI *pRtlIsDosDeviceName_U)( PCWSTR dos_name ); -static NTSTATUS (WINAPI *pRtlOemStringToUnicodeString)(UNICODE_STRING *, const STRING *, BOOLEAN ); -static BOOLEAN (WINAPI *pRtlIsNameLegalDOS8Dot3)(const UNICODE_STRING*,POEM_STRING,PBOOLEAN); -static DWORD (WINAPI *pRtlGetFullPathName_U)(const WCHAR*,ULONG,WCHAR*,WCHAR**); - - -static void test_RtlDetermineDosPathNameType(void) -{ - struct test - { - const char *path; - UINT ret; - }; - - static const struct test tests[] = - { - { "\\\\foo", 1 }, - { "//foo", 1 }, - { "\\/foo", 1 }, - { "/\\foo", 1 }, - { "\\\\", 1 }, - { "//", 1 }, - { "c:\\foo", 2 }, - { "c:/foo", 2 }, - { "c://foo", 2 }, - { "c:\\", 2 }, - { "c:/", 2 }, - { "c:foo", 3 }, - { "c:f\\oo", 3 }, - { "c:foo/bar", 3 }, - { "\\foo", 4 }, - { "/foo", 4 }, - { "\\", 4 }, - { "/", 4 }, - { "foo", 5 }, - { "", 5 }, - { "\0:foo", 5 }, - { "\\\\.\\foo", 6 }, - { "//./foo", 6 }, - { "/\\./foo", 6 }, - { "\\\\.foo", 1 }, - { "//.foo", 1 }, - { "\\\\.", 7 }, - { "//.", 7 }, - { NULL, 0 } - }; - - const struct test *test; - WCHAR buffer[MAX_PATH]; - UINT ret; - - for (test = tests; test->path; test++) - { - pRtlMultiByteToUnicodeN( buffer, sizeof(buffer), NULL, test->path, strlen(test->path)+1 ); - ret = pRtlDetermineDosPathNameType_U( buffer ); - ok( ret == test->ret, "Wrong result %d/%d for %s\n", ret, test->ret, test->path ); - } -} - - -static void test_RtlIsDosDeviceName(void) -{ - struct test - { - const char *path; - WORD pos; - WORD len; - BOOL fails; - }; - - static const struct test tests[] = - { - { "\\\\.\\CON", 8, 6 }, - { "\\\\.\\con", 8, 6 }, - { "\\\\.\\CON2", 0, 0 }, - { "", 0, 0 }, - { "\\\\foo\\nul", 0, 0 }, - { "c:\\nul:", 6, 6 }, - { "c:\\nul\\", 0, 0 }, - { "c:\\nul\\foo", 0, 0 }, - { "c:\\nul::", 6, 6, TRUE }, /* fails on nt4 */ - { "c:\\nul::::::", 6, 6, TRUE }, /* fails on nt4 */ - { "c:prn ", 4, 6 }, - { "c:prn.......", 4, 6 }, - { "c:prn... ...", 4, 6 }, - { "c:NUL .... ", 4, 6, TRUE }, /* fails on nt4 */ - { "c: . . .", 0, 0 }, - { "c:", 0, 0 }, - { " . . . :", 0, 0 }, - { ":", 0, 0 }, - { "c:nul. . . :", 4, 6 }, - { "c:nul . . :", 4, 6, TRUE }, /* fails on nt4 */ - { "c:nul0", 0, 0 }, - { "c:prn:aaa", 4, 6, TRUE }, /* fails on win9x */ - { "c:PRN:.txt", 4, 6 }, - { "c:aux:.txt...", 4, 6 }, - { "c:prn:.txt:", 4, 6 }, - { "c:nul:aaa", 4, 6, TRUE }, /* fails on win9x */ - { "con:", 0, 6 }, - { "lpt1:", 0, 8 }, - { "c:com5:", 4, 8 }, - { "CoM4:", 0, 8 }, - { "lpt9:", 0, 8 }, - { "c:\\lpt0.txt", 0, 0 }, - { "c:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\nul.txt", 1000, 6 }, - { "c:\\nul", 6, 6 }, - { NULL, 0 } - }; - - const struct test *test; - WCHAR buffer[2000]; - ULONG ret; - - for (test = tests; test->path; test++) - { - pRtlMultiByteToUnicodeN( buffer, sizeof(buffer), NULL, test->path, strlen(test->path)+1 ); - ret = pRtlIsDosDeviceName_U( buffer ); - ok( ret == MAKELONG( test->len, test->pos ) || - (test->fails && broken( ret == 0 )), - "Wrong result (%d,%d)/(%d,%d) for %s\n", - HIWORD(ret), LOWORD(ret), test->pos, test->len, test->path ); - } -} - -static void test_RtlIsNameLegalDOS8Dot3(void) -{ - struct test - { - const char *path; - BOOLEAN result; - BOOLEAN spaces; - }; - - static const struct test tests[] = - { - { "12345678", TRUE, FALSE }, - { "123 5678", TRUE, TRUE }, - { "12345678.", FALSE, 2 /*not set*/ }, - { "1234 678.", FALSE, 2 /*not set*/ }, - { "12345678.a", TRUE, FALSE }, - { "12345678.a ", FALSE, 2 /*not set*/ }, - { "12345678.a c", TRUE, TRUE }, - { " 2345678.a ", FALSE, 2 /*not set*/ }, - { "1 345678.abc", TRUE, TRUE }, - { "1 8.a c", TRUE, TRUE }, - { "1 3 5 7 .abc", FALSE, 2 /*not set*/ }, - { "12345678. c", TRUE, TRUE }, - { "123456789.a", FALSE, 2 /*not set*/ }, - { "12345.abcd", FALSE, 2 /*not set*/ }, - { "12345.ab d", FALSE, 2 /*not set*/ }, - { ".abc", FALSE, 2 /*not set*/ }, - { "12.abc.d", FALSE, 2 /*not set*/ }, - { ".", TRUE, FALSE }, - { "..", TRUE, FALSE }, - { "...", FALSE, 2 /*not set*/ }, - { "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", FALSE, 2 /*not set*/ }, - { NULL, 0 } - }; - - const struct test *test; - UNICODE_STRING ustr; - OEM_STRING oem, oem_ret; - WCHAR buffer[200]; - char buff2[12]; - BOOLEAN ret, spaces; - - ustr.MaximumLength = sizeof(buffer); - ustr.Buffer = buffer; - for (test = tests; test->path; test++) - { - char path[100]; - strcpy(path, test->path); - oem.Buffer = path; - oem.Length = strlen(test->path); - oem.MaximumLength = oem.Length + 1; - pRtlOemStringToUnicodeString( &ustr, &oem, FALSE ); - spaces = 2; - oem_ret.Length = oem_ret.MaximumLength = sizeof(buff2); - oem_ret.Buffer = buff2; - ret = pRtlIsNameLegalDOS8Dot3( &ustr, &oem_ret, &spaces ); - ok( ret == test->result, "Wrong result %d/%d for '%s'\n", ret, test->result, test->path ); - ok( spaces == test->spaces, "Wrong spaces value %d/%d for '%s'\n", spaces, test->spaces, test->path ); - if (strlen(test->path) <= 12) - { - char str[13]; - int i; - strcpy( str, test->path ); - for (i = 0; str[i]; i++) str[i] = toupper(str[i]); - ok( oem_ret.Length == strlen(test->path), "Wrong length %d/%d for '%s'\n", - oem_ret.Length, lstrlenA(test->path), test->path ); - ok( !memcmp( oem_ret.Buffer, str, oem_ret.Length ), - "Wrong string '%.*s'/'%s'\n", oem_ret.Length, oem_ret.Buffer, str ); - } - } -} -static void test_RtlGetFullPathName_U(void) -{ - static const WCHAR emptyW[] = {0}; - static const WCHAR deadbeefW[] = {'d','e','a','d','b','e','e','f',0}; - - struct test - { - const char *path; - const char *rname; - const char *rfile; - const char *alt_rname; - const char *alt_rfile; - }; - - static const struct test tests[] = - { - { "c:/test", "c:\\test", "test"}, - { "c:/test ", "c:\\test", "test"}, - { "c:/test.", "c:\\test", "test"}, - { "c:/test .... .. ", "c:\\test", "test"}, - { "c:/test/ .... .. ", "c:\\test\\", NULL}, - { "c:/test/..", "c:\\", NULL}, - { "c:/test/.. ", "c:\\test\\", NULL}, - { "c:/TEST", "c:\\test", "test"}, - { "c:/test/file", "c:\\test\\file", "file"}, - { "c:/test./file", "c:\\test\\file", "file"}, - { "c:/test.. /file", "c:\\test.. \\file","file"}, - { "c:/test/././file", "c:\\test\\file", "file"}, - { "c:/test\\.\\.\\file", "c:\\test\\file", "file"}, - { "c:/test/\\.\\.\\file", "c:\\test\\file", "file"}, - { "c:/test\\\\.\\.\\file", "c:\\test\\file", "file"}, - { "c:/test\\test1\\..\\.\\file", "c:\\test\\file", "file"}, - { "c:///test\\.\\.\\file//", "c:\\test\\file\\", NULL, - "c:\\test\\file", "file"}, /* nt4 */ - { "c:///test\\..\\file\\..\\//", "c:\\", NULL}, - { "c:/test../file", "c:\\test.\\file", "file", - "c:\\test..\\file", "file"}, /* vista */ - { NULL, NULL, NULL} - }; - - const struct test *test; - WCHAR pathbufW[2*MAX_PATH], rbufferW[MAX_PATH]; - CHAR rbufferA[MAX_PATH], rfileA[MAX_PATH]; - ULONG ret; - WCHAR *file_part; - DWORD reslen; - UINT len; - - file_part = (WCHAR *)0xdeadbeef; - lstrcpyW(rbufferW, deadbeefW); - ret = pRtlGetFullPathName_U(NULL, MAX_PATH, rbufferW, &file_part); - ok(!ret, "Expected RtlGetFullPathName_U to return 0, got %u\n", ret); - ok(!lstrcmpW(rbufferW, deadbeefW), - "Expected the output buffer to be untouched, got %s\n", wine_dbgstr_w(rbufferW)); - ok(file_part == (WCHAR *)0xdeadbeef || - file_part == NULL, /* Win7 */ - "Expected file part pointer to be untouched, got %p\n", file_part); - - file_part = (WCHAR *)0xdeadbeef; - lstrcpyW(rbufferW, deadbeefW); - ret = pRtlGetFullPathName_U(emptyW, MAX_PATH, rbufferW, &file_part); - ok(!ret, "Expected RtlGetFullPathName_U to return 0, got %u\n", ret); - ok(!lstrcmpW(rbufferW, deadbeefW), - "Expected the output buffer to be untouched, got %s\n", wine_dbgstr_w(rbufferW)); - ok(file_part == (WCHAR *)0xdeadbeef || - file_part == NULL, /* Win7 */ - "Expected file part pointer to be untouched, got %p\n", file_part); - - for (test = tests; test->path; test++) - { - len= strlen(test->rname) * sizeof(WCHAR); - pRtlMultiByteToUnicodeN(pathbufW , sizeof(pathbufW), NULL, test->path, strlen(test->path)+1 ); - ret = pRtlGetFullPathName_U( pathbufW,MAX_PATH, rbufferW, &file_part); - ok( ret == len || (test->alt_rname && ret == strlen(test->alt_rname)*sizeof(WCHAR)), - "Wrong result %d/%d for \"%s\"\n", ret, len, test->path ); - ok(pRtlUnicodeToMultiByteN(rbufferA,MAX_PATH,&reslen,rbufferW,(lstrlenW(rbufferW) + 1) * sizeof(WCHAR)) == STATUS_SUCCESS, - "RtlUnicodeToMultiByteN failed\n"); - ok(!lstrcmpiA(rbufferA,test->rname) || (test->alt_rname && !lstrcmpiA(rbufferA,test->alt_rname)), - "Got \"%s\" expected \"%s\"\n",rbufferA,test->rname); - if (file_part) - { - ok(pRtlUnicodeToMultiByteN(rfileA,MAX_PATH,&reslen,file_part,(lstrlenW(file_part) + 1) * sizeof(WCHAR)) == STATUS_SUCCESS, - "RtlUnicodeToMultiByteN failed\n"); - ok((test->rfile && !lstrcmpiA(rfileA,test->rfile)) || - (test->alt_rfile && !lstrcmpiA(rfileA,test->alt_rfile)), - "Got \"%s\" expected \"%s\"\n",rfileA,test->rfile); - } - else - { - ok( !test->rfile, "Got NULL expected \"%s\"\n", test->rfile ); - } - } -} - -START_TEST(path) -{ - HMODULE mod = GetModuleHandleA("ntdll.dll"); - if (!mod) - { - win_skip("Not running on NT, skipping tests\n"); - return; - } - - pRtlMultiByteToUnicodeN = (void *)GetProcAddress(mod,"RtlMultiByteToUnicodeN"); - pRtlUnicodeToMultiByteN = (void *)GetProcAddress(mod,"RtlUnicodeToMultiByteN"); - pRtlDetermineDosPathNameType_U = (void *)GetProcAddress(mod,"RtlDetermineDosPathNameType_U"); - pRtlIsDosDeviceName_U = (void *)GetProcAddress(mod,"RtlIsDosDeviceName_U"); - pRtlOemStringToUnicodeString = (void *)GetProcAddress(mod,"RtlOemStringToUnicodeString"); - pRtlIsNameLegalDOS8Dot3 = (void *)GetProcAddress(mod,"RtlIsNameLegalDOS8Dot3"); - pRtlGetFullPathName_U = (void *)GetProcAddress(mod,"RtlGetFullPathName_U"); - if (pRtlDetermineDosPathNameType_U) - test_RtlDetermineDosPathNameType(); - if (pRtlIsDosDeviceName_U) - test_RtlIsDosDeviceName(); - if (pRtlIsNameLegalDOS8Dot3) - test_RtlIsNameLegalDOS8Dot3(); - if (pRtlGetFullPathName_U && pRtlMultiByteToUnicodeN) - test_RtlGetFullPathName_U(); -} diff --git a/rostests/winetests/ntdll/pipe.c b/rostests/winetests/ntdll/pipe.c deleted file mode 100644 index 8f7bd8fe51f..00000000000 --- a/rostests/winetests/ntdll/pipe.c +++ /dev/null @@ -1,430 +0,0 @@ -/* Unit test suite for Ntdll NamedPipe API functions - * - * Copyright 2011 Bernhard Loos - * - * 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 "ntstatus.h" -#define WIN32_NO_STATUS -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "winreg.h" -#include "winnls.h" -#include "wine/test.h" -#include "winternl.h" -#include "winioctl.h" - -#ifndef __WINE_WINTERNL_H - -typedef struct { - ULONG NamedPipeType; - ULONG NamedPipeConfiguration; - ULONG MaximumInstances; - ULONG CurrentInstances; - ULONG InboundQuota; - ULONG ReadDataAvailable; - ULONG OutboundQuota; - ULONG WriteQuotaAvailable; - ULONG NamedPipeState; - ULONG NamedPipeEnd; -} FILE_PIPE_LOCAL_INFORMATION; - -#ifndef FILE_SYNCHRONOUS_IO_ALERT -#define FILE_SYNCHRONOUS_IO_ALERT 0x10 -#endif - -#ifndef FILE_SYNCHRONOUS_IO_NONALERT -#define FILE_SYNCHRONOUS_IO_NONALERT 0x20 -#endif - -#ifndef FSCTL_PIPE_LISTEN -#define FSCTL_PIPE_LISTEN CTL_CODE(FILE_DEVICE_NAMED_PIPE, 2, METHOD_BUFFERED, FILE_ANY_ACCESS) -#endif -#endif - -static NTSTATUS (WINAPI *pNtFsControlFile) (HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, PVOID apc_context, PIO_STATUS_BLOCK io, ULONG code, PVOID in_buffer, ULONG in_size, PVOID out_buffer, ULONG out_size); -static NTSTATUS (WINAPI *pNtCreateNamedPipeFile) (PHANDLE handle, ULONG access, - POBJECT_ATTRIBUTES attr, PIO_STATUS_BLOCK iosb, - ULONG sharing, ULONG dispo, ULONG options, - ULONG pipe_type, ULONG read_mode, - ULONG completion_mode, ULONG max_inst, - ULONG inbound_quota, ULONG outbound_quota, - PLARGE_INTEGER timeout); -static NTSTATUS (WINAPI *pNtQueryInformationFile) (IN HANDLE FileHandle, OUT PIO_STATUS_BLOCK IoStatusBlock, OUT PVOID FileInformation, IN ULONG Length, IN FILE_INFORMATION_CLASS FileInformationClass); -static NTSTATUS (WINAPI *pNtCancelIoFile) (HANDLE hFile, PIO_STATUS_BLOCK io_status); -static void (WINAPI *pRtlInitUnicodeString) (PUNICODE_STRING target, PCWSTR source); - -static HANDLE (WINAPI *pOpenThread)(DWORD dwDesiredAccess, BOOL bInheritHandle, DWORD dwThreadId); -static DWORD (WINAPI *pQueueUserAPC)(PAPCFUNC pfnAPC, HANDLE hThread, ULONG_PTR dwData); - - -static BOOL init_func_ptrs(void) -{ - HMODULE module = GetModuleHandle("ntdll.dll"); - -#define loadfunc(name) if (!(p##name = (void *)GetProcAddress(module, #name))) { \ - trace("GetProcAddress(%s) failed\n", #name); \ - return FALSE; \ - } - - loadfunc(NtFsControlFile) - loadfunc(NtCreateNamedPipeFile) - loadfunc(NtQueryInformationFile) - loadfunc(NtCancelIoFile) - loadfunc(RtlInitUnicodeString) - - /* not fatal */ - module = GetModuleHandle("kernel32.dll"); - pOpenThread = (void *)GetProcAddress(module, "OpenThread"); - pQueueUserAPC = (void *)GetProcAddress(module, "QueueUserAPC"); - return TRUE; -} - -static const WCHAR testpipe[] = { '\\', '\\', '.', '\\', 'p', 'i', 'p', 'e', '\\', - 't', 'e', 's', 't', 'p', 'i', 'p', 'e', 0 }; -static const WCHAR testpipe_nt[] = { '\\', '?', '?', '\\', 'p', 'i', 'p', 'e', '\\', - 't', 'e', 's', 't', 'p', 'i', 'p', 'e', 0 }; - -static NTSTATUS create_pipe(PHANDLE handle, ULONG sharing, ULONG options) -{ - IO_STATUS_BLOCK iosb; - OBJECT_ATTRIBUTES attr; - UNICODE_STRING name; - LARGE_INTEGER timeout; - NTSTATUS res; - - pRtlInitUnicodeString(&name, testpipe_nt); - - attr.Length = sizeof(attr); - attr.RootDirectory = 0; - attr.ObjectName = &name; - attr.Attributes = 0x40; /*case insensitive */ - attr.SecurityDescriptor = NULL; - attr.SecurityQualityOfService = NULL; - - timeout.QuadPart = -100000000000ll; - - res = pNtCreateNamedPipeFile(handle, FILE_READ_ATTRIBUTES | SYNCHRONIZE, &attr, &iosb, sharing, 2 /*FILE_CREATE*/, - options, 1, 0, 0, 0xFFFFFFFF, 500, 500, &timeout); - return res; -} - -static void test_create_invalid(void) -{ - IO_STATUS_BLOCK iosb; - OBJECT_ATTRIBUTES attr; - UNICODE_STRING name; - LARGE_INTEGER timeout; - NTSTATUS res; - HANDLE handle, handle2; - FILE_PIPE_LOCAL_INFORMATION info; - - pRtlInitUnicodeString(&name, testpipe_nt); - - attr.Length = sizeof(attr); - attr.RootDirectory = 0; - attr.ObjectName = &name; - attr.Attributes = 0x40; /*case insensitive */ - attr.SecurityDescriptor = NULL; - attr.SecurityQualityOfService = NULL; - - timeout.QuadPart = -100000000000ll; - -/* create a pipe with sharing = 0 */ - res = pNtCreateNamedPipeFile(&handle, FILE_READ_ATTRIBUTES | SYNCHRONIZE, &attr, &iosb, 0, 2 /*FILE_CREATE*/, - 0, 1, 0, 0, 0xFFFFFFFF, 500, 500, &timeout); - todo_wine ok(res == STATUS_INVALID_PARAMETER, "NtCreateNamedPipeFile returned %x\n", res); - if (!res) - CloseHandle(handle); - -/* create a pipe without r/w access */ - res = pNtCreateNamedPipeFile(&handle, SYNCHRONIZE, &attr, &iosb, FILE_SHARE_READ | FILE_SHARE_WRITE, 2 /*FILE_CREATE*/, - 0, 1, 0, 0, 0xFFFFFFFF, 500, 500, &timeout); - ok(!res, "NtCreateNamedPipeFile returned %x\n", res); - - res = pNtQueryInformationFile(handle, &iosb, &info, sizeof(info), (FILE_INFORMATION_CLASS)24); - todo_wine ok(res == STATUS_ACCESS_DENIED, "NtQueryInformationFile returned %x\n", res); - -/* test FILE_CREATE creation disposition */ - res = pNtCreateNamedPipeFile(&handle2, SYNCHRONIZE, &attr, &iosb, FILE_SHARE_READ | FILE_SHARE_WRITE, 2 /*FILE_CREATE*/, - 0, 1, 0, 0, 0xFFFFFFFF, 500, 500, &timeout); - todo_wine ok(res == STATUS_ACCESS_DENIED, "NtCreateNamedPipeFile returned %x\n", res); - if (!res) - CloseHandle(handle2); - - CloseHandle(handle); -} - -static BOOL ioapc_called; -static void CALLBACK ioapc(void *arg, PIO_STATUS_BLOCK io, ULONG reserved) -{ - ioapc_called = TRUE; -} - -static NTSTATUS listen_pipe(HANDLE hPipe, HANDLE hEvent, PIO_STATUS_BLOCK iosb, BOOL use_apc) -{ - int dummy; - - ioapc_called = FALSE; - - return pNtFsControlFile(hPipe, hEvent, use_apc ? &ioapc: NULL, use_apc ? &dummy: NULL, iosb, FSCTL_PIPE_LISTEN, 0, 0, 0, 0); -} - -static void test_overlapped(void) -{ - IO_STATUS_BLOCK iosb; - HANDLE hEvent; - HANDLE hPipe; - HANDLE hClient; - NTSTATUS res; - - hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); - ok(hEvent != INVALID_HANDLE_VALUE, "can't create event, GetLastError: %x\n", GetLastError()); - - res = create_pipe(&hPipe, FILE_SHARE_READ | FILE_SHARE_WRITE, 0 /* OVERLAPPED */); - ok(!res, "NtCreateNamedPipeFile returned %x\n", res); - - memset(&iosb, 0x55, sizeof(iosb)); - -/* try with event and apc */ - res = listen_pipe(hPipe, hEvent, &iosb, TRUE); - ok(res == STATUS_PENDING, "NtFsControlFile returned %x\n", res); - - hClient = CreateFileW(testpipe, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0); - ok(hClient != INVALID_HANDLE_VALUE, "can't open pipe, GetLastError: %x\n", GetLastError()); - - ok(U(iosb).Status == 0, "Wrong iostatus %x\n", U(iosb).Status); - ok(WaitForSingleObject(hEvent, 0) == 0, "hEvent not signaled\n"); - - ok(!ioapc_called, "IOAPC ran too early\n"); - - SleepEx(0, TRUE); /* alertable wait state */ - - ok(ioapc_called, "IOAPC didn't run\n"); - - CloseHandle(hEvent); - CloseHandle(hPipe); - CloseHandle(hClient); -} - -static BOOL userapc_called; -static void CALLBACK userapc(ULONG_PTR dwParam) -{ - userapc_called = TRUE; -} - -static BOOL open_succeeded; -static DWORD WINAPI thread(PVOID main_thread) -{ - HANDLE h; - - Sleep(400); - - if (main_thread) { - userapc_called = FALSE; - ok(pQueueUserAPC(&userapc, main_thread, 0), "can't queue user apc, GetLastError: %x\n", GetLastError()); - CloseHandle(main_thread); - } - - Sleep(400); - - h = CreateFileW(testpipe, GENERIC_WRITE | GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0); - - if (h != INVALID_HANDLE_VALUE) { - open_succeeded = TRUE; - Sleep(100); - CloseHandle(h); - } else - open_succeeded = FALSE; - - return 0; -} - -static void test_alertable(void) -{ - IO_STATUS_BLOCK iosb; - HANDLE hEvent; - HANDLE hPipe; - NTSTATUS res; - HANDLE hThread; - - memset(&iosb, 0x55, sizeof(iosb)); - - hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); - ok(hEvent != INVALID_HANDLE_VALUE, "can't create event, GetLastError: %x\n", GetLastError()); - - res = create_pipe(&hPipe, FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_SYNCHRONOUS_IO_ALERT); - ok(!res, "NtCreateNamedPipeFile returned %x\n", res); - -/* queue an user apc before calling listen */ - userapc_called = FALSE; - ok(pQueueUserAPC(&userapc, GetCurrentThread(), 0), "can't queue user apc, GetLastError: %x\n", GetLastError()); - - res = listen_pipe(hPipe, hEvent, &iosb, TRUE); - todo_wine ok(res == STATUS_CANCELLED, "NtFsControlFile returned %x\n", res); - - todo_wine ok(userapc_called, "user apc didn't run\n"); - ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %x\n", U(iosb).Status); - todo_wine ok(WaitForSingleObjectEx(hEvent, 0, TRUE) == WAIT_TIMEOUT, "hEvent signaled\n"); - ok(!ioapc_called, "IOAPC ran\n"); - -/* queue an user apc from a different thread */ - hThread = CreateThread(NULL, 0, &thread, pOpenThread(MAXIMUM_ALLOWED, FALSE, GetCurrentThreadId()), 0, 0); - ok(hThread != INVALID_HANDLE_VALUE, "can't create thread, GetLastError: %x\n", GetLastError()); - - /* wine_todo: the earlier NtFsControlFile call gets cancelled after the pipe gets set into listen state - instead of before, so this NtFsControlFile will fail STATUS_INVALID_HANDLE */ - res = listen_pipe(hPipe, hEvent, &iosb, TRUE); - todo_wine ok(res == STATUS_CANCELLED, "NtFsControlFile returned %x\n", res); - - ok(userapc_called, "user apc didn't run\n"); - todo_wine ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %x\n", U(iosb).Status); - ok(WaitForSingleObjectEx(hEvent, 0, TRUE) == WAIT_TIMEOUT, "hEvent signaled\n"); - ok(!ioapc_called, "IOAPC ran\n"); - - WaitForSingleObject(hThread, INFINITE); - - SleepEx(0, TRUE); /* get rid of the userapc, if NtFsControlFile failed */ - - ok(open_succeeded, "couldn't open client side pipe\n"); - - CloseHandle(hThread); - DisconnectNamedPipe(hPipe); - -/* finally try without an apc */ - hThread = CreateThread(NULL, 0, &thread, 0, 0, 0); - ok(hThread != INVALID_HANDLE_VALUE, "can't create thread, GetLastError: %x\n", GetLastError()); - - res = listen_pipe(hPipe, hEvent, &iosb, TRUE); - todo_wine ok(!res, "NtFsControlFile returned %x\n", res); - - ok(open_succeeded, "couldn't open client side pipe\n"); - ok(!U(iosb).Status, "Wrong iostatus %x\n", U(iosb).Status); - todo_wine ok(WaitForSingleObject(hEvent, 0) == 0, "hEvent not signaled\n"); - - WaitForSingleObject(hThread, INFINITE); - CloseHandle(hThread); - CloseHandle(hEvent); - CloseHandle(hPipe); -} - -static void test_nonalertable(void) -{ - IO_STATUS_BLOCK iosb; - HANDLE hEvent; - HANDLE hPipe; - NTSTATUS res; - HANDLE hThread; - - memset(&iosb, 0x55, sizeof(iosb)); - - hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); - ok(hEvent != INVALID_HANDLE_VALUE, "can't create event, GetLastError: %x\n", GetLastError()); - - res = create_pipe(&hPipe, FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_SYNCHRONOUS_IO_NONALERT); - ok(!res, "NtCreateNamedPipeFile returned %x\n", res); - - hThread = CreateThread(NULL, 0, &thread, 0, 0, 0); - ok(hThread != INVALID_HANDLE_VALUE, "can't create thread, GetLastError: %x\n", GetLastError()); - - userapc_called = FALSE; - ok(pQueueUserAPC(&userapc, GetCurrentThread(), 0), "can't queue user apc, GetLastError: %x\n", GetLastError()); - - res = listen_pipe(hPipe, hEvent, &iosb, TRUE); - todo_wine ok(!res, "NtFsControlFile returned %x\n", res); - - ok(open_succeeded, "couldn't open client side pipe\n"); - todo_wine ok(!U(iosb).Status, "Wrong iostatus %x\n", U(iosb).Status); - todo_wine ok(WaitForSingleObject(hEvent, 0) == 0, "hEvent not signaled\n"); - - ok(!ioapc_called, "IOAPC ran too early\n"); - ok(!userapc_called, "user apc ran too early\n"); - - SleepEx(0, TRUE); /* alertable wait state */ - - ok(ioapc_called, "IOAPC didn't run\n"); - ok(userapc_called, "user apc didn't run\n"); - - WaitForSingleObject(hThread, INFINITE); - CloseHandle(hThread); - CloseHandle(hEvent); - CloseHandle(hPipe); -} - -static void test_cancelio(void) -{ - IO_STATUS_BLOCK iosb; - IO_STATUS_BLOCK cancel_sb; - HANDLE hEvent; - HANDLE hPipe; - NTSTATUS res; - - hEvent = CreateEventW(NULL, TRUE, FALSE, NULL); - ok(hEvent != INVALID_HANDLE_VALUE, "can't create event, GetLastError: %x\n", GetLastError()); - - res = create_pipe(&hPipe, FILE_SHARE_READ | FILE_SHARE_WRITE, 0 /* OVERLAPPED */); - ok(!res, "NtCreateNamedPipeFile returned %x\n", res); - - memset(&iosb, 0x55, sizeof(iosb)); - - res = listen_pipe(hPipe, hEvent, &iosb, TRUE); - ok(res == STATUS_PENDING, "NtFsControlFile returned %x\n", res); - - res = pNtCancelIoFile(hPipe, &cancel_sb); - todo_wine ok(!res, "NtCancelIoFile returned %x\n", res); - - todo_wine { - ok(U(iosb).Status == STATUS_CANCELLED, "Wrong iostatus %x\n", U(iosb).Status); - ok(WaitForSingleObject(hEvent, 0) == 0, "hEvent not signaled\n"); - } - - ok(!ioapc_called, "IOAPC ran too early\n"); - - SleepEx(0, TRUE); /* alertable wait state */ - - ok(ioapc_called, "IOAPC didn't run\n"); - - CloseHandle(hEvent); - CloseHandle(hPipe); -} - -START_TEST(pipe) -{ - if (!init_func_ptrs()) - return; - - trace("starting invalid create tests\n"); - test_create_invalid(); - - trace("starting overlapped tests\n"); - test_overlapped(); - - if (!pOpenThread || !pQueueUserAPC) - return; - - trace("starting alertable tests\n"); - test_alertable(); - - trace("starting nonalertable tests\n"); - test_nonalertable(); - - trace("starting cancelio tests\n"); - test_cancelio(); -} diff --git a/rostests/winetests/ntdll/port.c b/rostests/winetests/ntdll/port.c deleted file mode 100644 index 20e5831b5db..00000000000 --- a/rostests/winetests/ntdll/port.c +++ /dev/null @@ -1,400 +0,0 @@ -/* Unit test suite for Ntdll Port API functions - * - * Copyright 2006 James Hawkins - * - * 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 "ntstatus.h" -#define WIN32_NO_STATUS -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "winreg.h" -#include "winnls.h" -#include "wine/test.h" -#include "winternl.h" - -#ifndef __WINE_WINTERNL_H - -typedef struct _CLIENT_ID -{ - HANDLE UniqueProcess; - HANDLE UniqueThread; -} CLIENT_ID, *PCLIENT_ID; - -typedef struct _LPC_SECTION_WRITE -{ - ULONG Length; - HANDLE SectionHandle; - ULONG SectionOffset; - ULONG ViewSize; - PVOID ViewBase; - PVOID TargetViewBase; -} LPC_SECTION_WRITE, *PLPC_SECTION_WRITE; - -typedef struct _LPC_SECTION_READ -{ - ULONG Length; - ULONG ViewSize; - PVOID ViewBase; -} LPC_SECTION_READ, *PLPC_SECTION_READ; - -typedef struct _LPC_MESSAGE -{ - USHORT DataSize; - USHORT MessageSize; - USHORT MessageType; - USHORT VirtualRangesOffset; - CLIENT_ID ClientId; - ULONG_PTR MessageId; - ULONG_PTR SectionSize; - UCHAR Data[ANYSIZE_ARRAY]; -} LPC_MESSAGE, *PLPC_MESSAGE; - -#endif - -/* on Wow64 we have to use the 64-bit layout */ -typedef struct -{ - USHORT DataSize; - USHORT MessageSize; - USHORT MessageType; - USHORT VirtualRangesOffset; - ULONGLONG ClientId[2]; - ULONGLONG MessageId; - ULONGLONG SectionSize; - UCHAR Data[ANYSIZE_ARRAY]; -} LPC_MESSAGE64; - -union lpc_message -{ - LPC_MESSAGE msg; - LPC_MESSAGE64 msg64; -}; - -/* Types of LPC messages */ -#define UNUSED_MSG_TYPE 0 -#define LPC_REQUEST 1 -#define LPC_REPLY 2 -#define LPC_DATAGRAM 3 -#define LPC_LOST_REPLY 4 -#define LPC_PORT_CLOSED 5 -#define LPC_CLIENT_DIED 6 -#define LPC_EXCEPTION 7 -#define LPC_DEBUG_EVENT 8 -#define LPC_ERROR_EVENT 9 -#define LPC_CONNECTION_REQUEST 10 - -static const WCHAR PORTNAME[] = {'\\','M','y','P','o','r','t',0}; - -#define REQUEST1 "Request1" -#define REQUEST2 "Request2" -#define REPLY "Reply" - -#define MAX_MESSAGE_LEN 30 - -static UNICODE_STRING port; - -/* Function pointers for ntdll calls */ -static HMODULE hntdll = 0; -static NTSTATUS (WINAPI *pNtCompleteConnectPort)(HANDLE); -static NTSTATUS (WINAPI *pNtAcceptConnectPort)(PHANDLE,ULONG,PLPC_MESSAGE,ULONG, - ULONG,PLPC_SECTION_READ); -static NTSTATUS (WINAPI *pNtReplyPort)(HANDLE,PLPC_MESSAGE); -static NTSTATUS (WINAPI *pNtReplyWaitReceivePort)(PHANDLE,PULONG,PLPC_MESSAGE, - PLPC_MESSAGE); -static NTSTATUS (WINAPI *pNtCreatePort)(PHANDLE,POBJECT_ATTRIBUTES,ULONG,ULONG,ULONG); -static NTSTATUS (WINAPI *pNtRequestWaitReplyPort)(HANDLE,PLPC_MESSAGE,PLPC_MESSAGE); -static NTSTATUS (WINAPI *pNtRequestPort)(HANDLE,PLPC_MESSAGE); -static NTSTATUS (WINAPI *pNtRegisterThreadTerminatePort)(HANDLE); -static NTSTATUS (WINAPI *pNtConnectPort)(PHANDLE,PUNICODE_STRING, - PSECURITY_QUALITY_OF_SERVICE, - PLPC_SECTION_WRITE,PLPC_SECTION_READ, - PVOID,PVOID,PULONG); -static NTSTATUS (WINAPI *pRtlInitUnicodeString)(PUNICODE_STRING,LPCWSTR); -static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL); - -static BOOL is_wow64; - -static BOOL init_function_ptrs(void) -{ - hntdll = LoadLibraryA("ntdll.dll"); - - if (!hntdll) - return FALSE; - - pNtCompleteConnectPort = (void *)GetProcAddress(hntdll, "NtCompleteConnectPort"); - pNtAcceptConnectPort = (void *)GetProcAddress(hntdll, "NtAcceptConnectPort"); - pNtReplyPort = (void *)GetProcAddress(hntdll, "NtReplyPort"); - pNtReplyWaitReceivePort = (void *)GetProcAddress(hntdll, "NtReplyWaitReceivePort"); - pNtCreatePort = (void *)GetProcAddress(hntdll, "NtCreatePort"); - pNtRequestWaitReplyPort = (void *)GetProcAddress(hntdll, "NtRequestWaitReplyPort"); - pNtRequestPort = (void *)GetProcAddress(hntdll, "NtRequestPort"); - pNtRegisterThreadTerminatePort = (void *)GetProcAddress(hntdll, "NtRegisterThreadTerminatePort"); - pNtConnectPort = (void *)GetProcAddress(hntdll, "NtConnectPort"); - pRtlInitUnicodeString = (void *)GetProcAddress(hntdll, "RtlInitUnicodeString"); - - if (!pNtCompleteConnectPort || !pNtAcceptConnectPort || - !pNtReplyWaitReceivePort || !pNtCreatePort || !pNtRequestWaitReplyPort || - !pNtRequestPort || !pNtRegisterThreadTerminatePort || - !pNtConnectPort || !pRtlInitUnicodeString) - { - win_skip("Needed port functions are not available\n"); - FreeLibrary(hntdll); - return FALSE; - } - - pIsWow64Process = (void *)GetProcAddress(GetModuleHandle("kernel32.dll"), "IsWow64Process"); - if (!pIsWow64Process || !pIsWow64Process( GetCurrentProcess(), &is_wow64 )) is_wow64 = FALSE; - return TRUE; -} - -static void ProcessConnectionRequest(union lpc_message *LpcMessage, PHANDLE pAcceptPortHandle) -{ - NTSTATUS status; - - if (is_wow64) - { - ok(LpcMessage->msg64.MessageType == LPC_CONNECTION_REQUEST, - "Expected LPC_CONNECTION_REQUEST, got %d\n", LpcMessage->msg64.MessageType); - ok(!*LpcMessage->msg64.Data, "Expected empty string!\n"); - } - else - { - ok(LpcMessage->msg.MessageType == LPC_CONNECTION_REQUEST, - "Expected LPC_CONNECTION_REQUEST, got %d\n", LpcMessage->msg.MessageType); - ok(!*LpcMessage->msg.Data, "Expected empty string!\n"); - } - - status = pNtAcceptConnectPort(pAcceptPortHandle, 0, &LpcMessage->msg, 1, 0, NULL); - ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %x\n", status); - - status = pNtCompleteConnectPort(*pAcceptPortHandle); - ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %x\n", status); -} - -static void ProcessLpcRequest(HANDLE PortHandle, union lpc_message *LpcMessage) -{ - NTSTATUS status; - - if (is_wow64) - { - ok(LpcMessage->msg64.MessageType == LPC_REQUEST, - "Expected LPC_REQUEST, got %d\n", LpcMessage->msg64.MessageType); - ok(!lstrcmp((LPSTR)LpcMessage->msg64.Data, REQUEST2), - "Expected %s, got %s\n", REQUEST2, LpcMessage->msg64.Data); - lstrcpy((LPSTR)LpcMessage->msg64.Data, REPLY); - - status = pNtReplyPort(PortHandle, &LpcMessage->msg); - ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %x\n", status); - ok(LpcMessage->msg64.MessageType == LPC_REQUEST, - "Expected LPC_REQUEST, got %d\n", LpcMessage->msg64.MessageType); - ok(!lstrcmp((LPSTR)LpcMessage->msg64.Data, REPLY), - "Expected %s, got %s\n", REPLY, LpcMessage->msg64.Data); - } - else - { - ok(LpcMessage->msg.MessageType == LPC_REQUEST, - "Expected LPC_REQUEST, got %d\n", LpcMessage->msg.MessageType); - ok(!lstrcmp((LPSTR)LpcMessage->msg.Data, REQUEST2), - "Expected %s, got %s\n", REQUEST2, LpcMessage->msg.Data); - lstrcpy((LPSTR)LpcMessage->msg.Data, REPLY); - - status = pNtReplyPort(PortHandle, &LpcMessage->msg); - ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %x\n", status); - ok(LpcMessage->msg.MessageType == LPC_REQUEST, - "Expected LPC_REQUEST, got %d\n", LpcMessage->msg.MessageType); - ok(!lstrcmp((LPSTR)LpcMessage->msg.Data, REPLY), - "Expected %s, got %s\n", REPLY, LpcMessage->msg.Data); - } -} - -static DWORD WINAPI test_ports_client(LPVOID arg) -{ - SECURITY_QUALITY_OF_SERVICE sqos; - union lpc_message *LpcMessage, *out; - HANDLE PortHandle; - ULONG len, size; - NTSTATUS status; - - sqos.Length = sizeof(SECURITY_QUALITY_OF_SERVICE); - sqos.ImpersonationLevel = SecurityImpersonation; - sqos.ContextTrackingMode = SECURITY_STATIC_TRACKING; - sqos.EffectiveOnly = TRUE; - - status = pNtConnectPort(&PortHandle, &port, &sqos, 0, 0, &len, NULL, NULL); - todo_wine ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %x\n", status); - if (status != STATUS_SUCCESS) return 1; - - status = pNtRegisterThreadTerminatePort(PortHandle); - ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %x\n", status); - - if (is_wow64) - { - size = FIELD_OFFSET(LPC_MESSAGE64, Data[MAX_MESSAGE_LEN]); - LpcMessage = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); - out = HeapAlloc(GetProcessHeap(), 0, size); - - LpcMessage->msg64.DataSize = lstrlen(REQUEST1) + 1; - LpcMessage->msg64.MessageSize = FIELD_OFFSET(LPC_MESSAGE64, Data[LpcMessage->msg64.DataSize]); - lstrcpy((LPSTR)LpcMessage->msg64.Data, REQUEST1); - - status = pNtRequestPort(PortHandle, &LpcMessage->msg); - ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %x\n", status); - ok(LpcMessage->msg64.MessageType == 0, "Expected 0, got %d\n", LpcMessage->msg64.MessageType); - ok(!lstrcmp((LPSTR)LpcMessage->msg64.Data, REQUEST1), - "Expected %s, got %s\n", REQUEST1, LpcMessage->msg64.Data); - - /* Fill in the message */ - memset(LpcMessage, 0, size); - LpcMessage->msg64.DataSize = lstrlen(REQUEST2) + 1; - LpcMessage->msg64.MessageSize = FIELD_OFFSET(LPC_MESSAGE64, Data[LpcMessage->msg64.DataSize]); - lstrcpy((LPSTR)LpcMessage->msg64.Data, REQUEST2); - - /* Send the message and wait for the reply */ - status = pNtRequestWaitReplyPort(PortHandle, &LpcMessage->msg, &out->msg); - ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %x\n", status); - ok(!lstrcmp((LPSTR)out->msg64.Data, REPLY), "Expected %s, got %s\n", REPLY, out->msg64.Data); - ok(out->msg64.MessageType == LPC_REPLY, "Expected LPC_REPLY, got %d\n", out->msg64.MessageType); - } - else - { - size = FIELD_OFFSET(LPC_MESSAGE, Data[MAX_MESSAGE_LEN]); - LpcMessage = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); - out = HeapAlloc(GetProcessHeap(), 0, size); - - LpcMessage->msg.DataSize = lstrlen(REQUEST1) + 1; - LpcMessage->msg.MessageSize = FIELD_OFFSET(LPC_MESSAGE, Data[LpcMessage->msg.DataSize]); - lstrcpy((LPSTR)LpcMessage->msg.Data, REQUEST1); - - status = pNtRequestPort(PortHandle, &LpcMessage->msg); - ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %x\n", status); - ok(LpcMessage->msg.MessageType == 0, "Expected 0, got %d\n", LpcMessage->msg.MessageType); - ok(!lstrcmp((LPSTR)LpcMessage->msg.Data, REQUEST1), - "Expected %s, got %s\n", REQUEST1, LpcMessage->msg.Data); - - /* Fill in the message */ - memset(LpcMessage, 0, size); - LpcMessage->msg.DataSize = lstrlen(REQUEST2) + 1; - LpcMessage->msg.MessageSize = FIELD_OFFSET(LPC_MESSAGE, Data[LpcMessage->msg.DataSize]); - lstrcpy((LPSTR)LpcMessage->msg.Data, REQUEST2); - - /* Send the message and wait for the reply */ - status = pNtRequestWaitReplyPort(PortHandle, &LpcMessage->msg, &out->msg); - ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %x\n", status); - ok(!lstrcmp((LPSTR)out->msg.Data, REPLY), "Expected %s, got %s\n", REPLY, out->msg.Data); - ok(out->msg.MessageType == LPC_REPLY, "Expected LPC_REPLY, got %d\n", out->msg.MessageType); - } - - HeapFree(GetProcessHeap(), 0, out); - HeapFree(GetProcessHeap(), 0, LpcMessage); - - return 0; -} - -static void test_ports_server( HANDLE PortHandle ) -{ - HANDLE AcceptPortHandle; - union lpc_message *LpcMessage; - ULONG size; - NTSTATUS status; - BOOL done = FALSE; - - size = FIELD_OFFSET(LPC_MESSAGE, Data) + MAX_MESSAGE_LEN; - LpcMessage = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); - - while (TRUE) - { - status = pNtReplyWaitReceivePort(PortHandle, NULL, NULL, &LpcMessage->msg); - todo_wine - { - ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %d(%x)\n", status, status); - } - /* STATUS_INVALID_HANDLE: win2k without admin rights will perform an - * endless loop here - */ - if ((status == STATUS_NOT_IMPLEMENTED) || - (status == STATUS_INVALID_HANDLE)) return; - - switch (is_wow64 ? LpcMessage->msg64.MessageType : LpcMessage->msg.MessageType) - { - case LPC_CONNECTION_REQUEST: - ProcessConnectionRequest(LpcMessage, &AcceptPortHandle); - break; - - case LPC_REQUEST: - ProcessLpcRequest(PortHandle, LpcMessage); - done = TRUE; - break; - - case LPC_DATAGRAM: - if (is_wow64) - ok(!lstrcmp((LPSTR)LpcMessage->msg64.Data, REQUEST1), - "Expected %s, got %s\n", REQUEST1, LpcMessage->msg64.Data); - else - ok(!lstrcmp((LPSTR)LpcMessage->msg.Data, REQUEST1), - "Expected %s, got %s\n", REQUEST1, LpcMessage->msg.Data); - break; - - case LPC_CLIENT_DIED: - ok(done, "Expected LPC request to be completed!\n"); - HeapFree(GetProcessHeap(), 0, LpcMessage); - return; - - default: - ok(FALSE, "Unexpected message: %d\n", - is_wow64 ? LpcMessage->msg64.MessageType : LpcMessage->msg.MessageType); - break; - } - } - - HeapFree(GetProcessHeap(), 0, LpcMessage); -} - -START_TEST(port) -{ - OBJECT_ATTRIBUTES obj; - HANDLE port_handle; - NTSTATUS status; - - if (!init_function_ptrs()) - return; - - pRtlInitUnicodeString(&port, PORTNAME); - - memset(&obj, 0, sizeof(OBJECT_ATTRIBUTES)); - obj.Length = sizeof(OBJECT_ATTRIBUTES); - obj.ObjectName = &port; - - status = pNtCreatePort(&port_handle, &obj, 100, 100, 0); - if (status == STATUS_ACCESS_DENIED) skip("Not enough rights\n"); - else todo_wine ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %d\n", status); - - if (status == STATUS_SUCCESS) - { - DWORD id; - HANDLE thread = CreateThread(NULL, 0, test_ports_client, NULL, 0, &id); - ok(thread != NULL, "Expected non-NULL thread handle!\n"); - - test_ports_server( port_handle ); - ok( WaitForSingleObject( thread, 10000 ) == 0, "thread didn't exit\n" ); - CloseHandle(thread); - } - FreeLibrary(hntdll); -} diff --git a/rostests/winetests/ntdll/reg.c b/rostests/winetests/ntdll/reg.c deleted file mode 100755 index 5ca14eb4192..00000000000 --- a/rostests/winetests/ntdll/reg.c +++ /dev/null @@ -1,1274 +0,0 @@ -/* Unit test suite for Rtl* Registry API functions - * - * Copyright 2003 Thomas Mertes - * Copyright 2005 Brad DeMorrow - * - * 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 - * - * NOTE: I don't test every RelativeTo value because it would be redundant, all calls go through - * helper function RTL_GetKeyHandle().--Brad DeMorrow - * - */ - -#include "ntdll_test.h" -#include "winternl.h" -#include "stdio.h" -#include "winnt.h" -#include "winnls.h" -#include "stdlib.h" - -/* A test string */ -static const WCHAR stringW[] = {'s', 't', 'r', 'i', 'n', 'g', 'W', 0}; -/* A size, in bytes, short enough to cause truncation of the above */ -#define STR_TRUNC_SIZE (sizeof(stringW)-2*sizeof(*stringW)) - -#ifndef __WINE_WINTERNL_H - -/* RtlQueryRegistryValues structs and defines */ -#define RTL_REGISTRY_ABSOLUTE 0 -#define RTL_REGISTRY_SERVICES 1 -#define RTL_REGISTRY_CONTROL 2 -#define RTL_REGISTRY_WINDOWS_NT 3 -#define RTL_REGISTRY_DEVICEMAP 4 -#define RTL_REGISTRY_USER 5 - -#define RTL_REGISTRY_HANDLE 0x40000000 -#define RTL_REGISTRY_OPTIONAL 0x80000000 - -#define RTL_QUERY_REGISTRY_SUBKEY 0x00000001 -#define RTL_QUERY_REGISTRY_TOPKEY 0x00000002 -#define RTL_QUERY_REGISTRY_REQUIRED 0x00000004 -#define RTL_QUERY_REGISTRY_NOVALUE 0x00000008 -#define RTL_QUERY_REGISTRY_NOEXPAND 0x00000010 -#define RTL_QUERY_REGISTRY_DIRECT 0x00000020 -#define RTL_QUERY_REGISTRY_DELETE 0x00000040 - -typedef NTSTATUS (WINAPI *PRTL_QUERY_REGISTRY_ROUTINE)( PCWSTR ValueName, - ULONG ValueType, - PVOID ValueData, - ULONG ValueLength, - PVOID Context, - PVOID EntryContext); - -typedef struct _RTL_QUERY_REGISTRY_TABLE { - PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine; - ULONG Flags; - PWSTR Name; - PVOID EntryContext; - ULONG DefaultType; - PVOID DefaultData; - ULONG DefaultLength; -} RTL_QUERY_REGISTRY_TABLE, *PRTL_QUERY_REGISTRY_TABLE; - -typedef struct _KEY_VALUE_BASIC_INFORMATION { - ULONG TitleIndex; - ULONG Type; - ULONG NameLength; - WCHAR Name[1]; -} KEY_VALUE_BASIC_INFORMATION, *PKEY_VALUE_BASIC_INFORMATION; - -typedef struct _KEY_VALUE_PARTIAL_INFORMATION { - ULONG TitleIndex; - ULONG Type; - ULONG DataLength; - UCHAR Data[1]; -} KEY_VALUE_PARTIAL_INFORMATION, *PKEY_VALUE_PARTIAL_INFORMATION; - -typedef struct _KEY_VALUE_FULL_INFORMATION { - ULONG TitleIndex; - ULONG Type; - ULONG DataOffset; - ULONG DataLength; - ULONG NameLength; - WCHAR Name[1]; -} KEY_VALUE_FULL_INFORMATION, *PKEY_VALUE_FULL_INFORMATION; - -typedef enum _KEY_VALUE_INFORMATION_CLASS { - KeyValueBasicInformation, - KeyValueFullInformation, - KeyValuePartialInformation, - KeyValueFullInformationAlign64, - KeyValuePartialInformationAlign64 -} KEY_VALUE_INFORMATION_CLASS; - -#define InitializeObjectAttributes(p,n,a,r,s) \ - do { \ - (p)->Length = sizeof(OBJECT_ATTRIBUTES); \ - (p)->RootDirectory = r; \ - (p)->Attributes = a; \ - (p)->ObjectName = n; \ - (p)->SecurityDescriptor = s; \ - (p)->SecurityQualityOfService = NULL; \ - } while (0) - -#endif - -static NTSTATUS (WINAPI * pRtlCreateUnicodeStringFromAsciiz)(PUNICODE_STRING, LPCSTR); -static void (WINAPI * pRtlInitUnicodeString)(PUNICODE_STRING,PCWSTR); -static NTSTATUS (WINAPI * pRtlFreeUnicodeString)(PUNICODE_STRING); -static NTSTATUS (WINAPI * pNtDeleteValueKey)(IN HANDLE, IN PUNICODE_STRING); -static NTSTATUS (WINAPI * pRtlQueryRegistryValues)(IN ULONG, IN PCWSTR,IN PRTL_QUERY_REGISTRY_TABLE, IN PVOID,IN PVOID); -static NTSTATUS (WINAPI * pRtlCheckRegistryKey)(IN ULONG,IN PWSTR); -static NTSTATUS (WINAPI * pRtlOpenCurrentUser)(IN ACCESS_MASK, PHANDLE); -static NTSTATUS (WINAPI * pNtOpenKey)(PHANDLE, IN ACCESS_MASK, IN POBJECT_ATTRIBUTES); -static NTSTATUS (WINAPI * pNtClose)(IN HANDLE); -static NTSTATUS (WINAPI * pNtDeleteValueKey)(IN HANDLE, IN PUNICODE_STRING); -static NTSTATUS (WINAPI * pNtFlushKey)(HANDLE); -static NTSTATUS (WINAPI * pNtDeleteKey)(HANDLE); -static NTSTATUS (WINAPI * pNtCreateKey)( PHANDLE retkey, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr, - ULONG TitleIndex, const UNICODE_STRING *class, ULONG options, - PULONG dispos ); -static NTSTATUS (WINAPI * pNtQueryValueKey)(HANDLE,const UNICODE_STRING *,KEY_VALUE_INFORMATION_CLASS,void *,DWORD,DWORD *); -static NTSTATUS (WINAPI * pNtSetValueKey)(HANDLE, const PUNICODE_STRING, ULONG, - ULONG, const void*, ULONG ); -static NTSTATUS (WINAPI * pNtQueryInformationProcess)(HANDLE,PROCESSINFOCLASS,PVOID,ULONG,PULONG); -static NTSTATUS (WINAPI * pRtlFormatCurrentUserKeyPath)(PUNICODE_STRING); -static NTSTATUS (WINAPI * pRtlCreateUnicodeString)( PUNICODE_STRING, LPCWSTR); -static LPVOID (WINAPI * pRtlReAllocateHeap)(IN PVOID, IN ULONG, IN PVOID, IN ULONG); -static NTSTATUS (WINAPI * pRtlAppendUnicodeToString)(PUNICODE_STRING, PCWSTR); -static NTSTATUS (WINAPI * pRtlUnicodeStringToAnsiString)(PSTRING, PUNICODE_STRING, BOOL); -static NTSTATUS (WINAPI * pRtlFreeHeap)(PVOID, ULONG, PVOID); -static LPVOID (WINAPI * pRtlAllocateHeap)(PVOID,ULONG,ULONG); -static NTSTATUS (WINAPI * pRtlZeroMemory)(PVOID, ULONG); -static NTSTATUS (WINAPI * pRtlpNtQueryValueKey)(HANDLE,ULONG*,PBYTE,DWORD*,void *); -static NTSTATUS (WINAPI * pRtlOpenCurrentUser)(ACCESS_MASK,HANDLE*); - -static HMODULE hntdll = 0; -static int CurrentTest = 0; -static UNICODE_STRING winetestpath; - -#define NTDLL_GET_PROC(func) \ - p ## func = (void*)GetProcAddress(hntdll, #func); \ - if(!p ## func) { \ - trace("GetProcAddress(%s) failed\n", #func); \ - FreeLibrary(hntdll); \ - return FALSE; \ - } - -static BOOL InitFunctionPtrs(void) -{ - hntdll = LoadLibraryA("ntdll.dll"); - if(!hntdll) { - trace("Could not load ntdll.dll\n"); - return FALSE; - } - NTDLL_GET_PROC(RtlInitUnicodeString) - NTDLL_GET_PROC(RtlCreateUnicodeStringFromAsciiz) - NTDLL_GET_PROC(RtlCreateUnicodeString) - NTDLL_GET_PROC(RtlFreeUnicodeString) - NTDLL_GET_PROC(NtDeleteValueKey) - NTDLL_GET_PROC(RtlQueryRegistryValues) - NTDLL_GET_PROC(RtlCheckRegistryKey) - NTDLL_GET_PROC(RtlOpenCurrentUser) - NTDLL_GET_PROC(NtClose) - NTDLL_GET_PROC(NtDeleteValueKey) - NTDLL_GET_PROC(NtCreateKey) - NTDLL_GET_PROC(NtFlushKey) - NTDLL_GET_PROC(NtDeleteKey) - NTDLL_GET_PROC(NtQueryValueKey) - NTDLL_GET_PROC(NtQueryInformationProcess) - NTDLL_GET_PROC(NtSetValueKey) - NTDLL_GET_PROC(NtOpenKey) - NTDLL_GET_PROC(RtlFormatCurrentUserKeyPath) - NTDLL_GET_PROC(RtlReAllocateHeap) - NTDLL_GET_PROC(RtlAppendUnicodeToString) - NTDLL_GET_PROC(RtlUnicodeStringToAnsiString) - NTDLL_GET_PROC(RtlFreeHeap) - NTDLL_GET_PROC(RtlAllocateHeap) - NTDLL_GET_PROC(RtlZeroMemory) - NTDLL_GET_PROC(RtlpNtQueryValueKey) - NTDLL_GET_PROC(RtlOpenCurrentUser) - return TRUE; -} -#undef NTDLL_GET_PROC - -static NTSTATUS WINAPI QueryRoutine (IN PCWSTR ValueName, IN ULONG ValueType, IN PVOID ValueData, - IN ULONG ValueLength, IN PVOID Context, IN PVOID EntryContext) -{ - NTSTATUS ret = STATUS_SUCCESS; - int ValueNameLength = 0; - LPSTR ValName = 0; - trace("**Test %d**\n", CurrentTest); - - if(ValueName) - { - ValueNameLength = lstrlenW(ValueName); - - ValName = pRtlAllocateHeap(GetProcessHeap(), 0, ValueNameLength); - - WideCharToMultiByte(0, 0, ValueName, ValueNameLength+1,ValName, ValueNameLength, 0, 0); - - trace("ValueName: %s\n", ValName); - } - else - trace("ValueName: (null)\n"); - - switch(ValueType) - { - case REG_NONE: - trace("ValueType: REG_NONE\n"); - trace("ValueData: %p\n", ValueData); - break; - - case REG_BINARY: - trace("ValueType: REG_BINARY\n"); - trace("ValueData: %p\n", ValueData); - break; - - case REG_SZ: - trace("ValueType: REG_SZ\n"); - trace("ValueData: %s\n", (char*)ValueData); - break; - - case REG_MULTI_SZ: - trace("ValueType: REG_MULTI_SZ\n"); - trace("ValueData: %s\n", (char*)ValueData); - break; - - case REG_EXPAND_SZ: - trace("ValueType: REG_EXPAND_SZ\n"); - trace("ValueData: %s\n", (char*)ValueData); - break; - - case REG_DWORD: - trace("ValueType: REG_DWORD\n"); - trace("ValueData: %p\n", ValueData); - break; - }; - trace("ValueLength: %d\n", (int)ValueLength); - - if(CurrentTest == 0) - ok(1, "\n"); /*checks that QueryRoutine is called*/ - if(CurrentTest > 7) - ok(!1, "Invalid Test Specified!\n"); - - CurrentTest++; - - if(ValName) - pRtlFreeHeap(GetProcessHeap(), 0, ValName); - - return ret; -} - -static void test_RtlQueryRegistryValues(void) -{ - - /* - ****************************** - * QueryTable Flags * - ****************************** - *RTL_QUERY_REGISTRY_SUBKEY * Name is the name of a subkey relative to Path - *RTL_QUERY_REGISTRY_TOPKEY * Resets location to original RelativeTo and Path - *RTL_QUERY_REGISTRY_REQUIRED * Key required. returns STATUS_OBJECT_NAME_NOT_FOUND if not present - *RTL_QUERY_REGISTRY_NOVALUE * We just want a call-back - *RTL_QUERY_REGISTRY_NOEXPAND * Don't expand the variables! - *RTL_QUERY_REGISTRY_DIRECT * Results of query will be stored in EntryContext(QueryRoutine ignored) - *RTL_QUERY_REGISTRY_DELETE * Delete value key after query - ****************************** - - - **Test layout(numbered according to CurrentTest value)** - 0)NOVALUE Just make sure call-back works - 1)Null Name See if QueryRoutine is called for every value in current key - 2)SUBKEY See if we can use SUBKEY to change the current path on the fly - 3)REQUIRED Test for value that's not there - 4)NOEXPAND See if it will return multiple strings(no expand should split strings up) - 5)DIRECT Make it store data directly in EntryContext and not call QueryRoutine - 6)DefaultType Test return values when key isn't present - 7)DefaultValue Test Default Value returned with key isn't present(and no REQUIRED flag set) - 8)DefaultLength Test Default Length with DefaultType = REG_SZ - 9)DefaultLength Test Default Length with DefaultType = REG_MULTI_SZ - 10)DefaultLength Test Default Length with DefaultType = REG_EXPAND_SZ - 11)DefaultData Test whether DefaultData is used while DefaultType = REG_NONE(shouldn't be) - 12)Delete Try to delete value key - - */ - NTSTATUS status; - ULONG RelativeTo; - - PRTL_QUERY_REGISTRY_TABLE QueryTable = NULL; - RelativeTo = RTL_REGISTRY_ABSOLUTE;/*Only using absolute - no need to test all relativeto variables*/ - - QueryTable = pRtlAllocateHeap(GetProcessHeap(), 0, sizeof(RTL_QUERY_REGISTRY_TABLE)*26); - - pRtlZeroMemory( QueryTable, sizeof(RTL_QUERY_REGISTRY_TABLE) * 26); - - QueryTable[0].QueryRoutine = QueryRoutine; - QueryTable[0].Flags = RTL_QUERY_REGISTRY_NOVALUE; - QueryTable[0].Name = NULL; - QueryTable[0].EntryContext = NULL; - QueryTable[0].DefaultType = REG_BINARY; - QueryTable[0].DefaultData = NULL; - QueryTable[0].DefaultLength = 100; - - QueryTable[1].QueryRoutine = QueryRoutine; - QueryTable[1].Flags = 0; - QueryTable[1].Name = NULL; - QueryTable[1].EntryContext = 0; - QueryTable[1].DefaultType = REG_NONE; - QueryTable[1].DefaultData = NULL; - QueryTable[1].DefaultLength = 0; - - QueryTable[2].QueryRoutine = NULL; - QueryTable[2].Flags = 0; - QueryTable[2].Name = NULL; - QueryTable[2].EntryContext = 0; - QueryTable[2].DefaultType = REG_NONE; - QueryTable[2].DefaultData = NULL; - QueryTable[2].DefaultLength = 0; - - status = pRtlQueryRegistryValues(RelativeTo, winetestpath.Buffer, QueryTable, 0, 0); - ok(status == STATUS_SUCCESS, "RtlQueryRegistryValues return: 0x%08x\n", status); - - pRtlFreeHeap(GetProcessHeap(), 0, QueryTable); -} - -static void test_NtOpenKey(void) -{ - HANDLE key; - NTSTATUS status; - OBJECT_ATTRIBUTES attr; - ACCESS_MASK am = KEY_READ; - - /* All NULL */ - status = pNtOpenKey(NULL, 0, NULL); - ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08x\n", status); - - /* NULL attributes */ - status = pNtOpenKey(&key, 0, NULL); - ok(status == STATUS_ACCESS_VIOLATION /* W2K3/XP/W2K */ || status == STATUS_INVALID_PARAMETER /* NT4 */, - "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER(NT4), got: 0x%08x\n", status); - - InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0); - - /* NULL key */ - status = pNtOpenKey(NULL, am, &attr); - ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08x\n", status); - - /* Length > sizeof(OBJECT_ATTRIBUTES) */ - attr.Length *= 2; - status = pNtOpenKey(&key, am, &attr); - ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got: 0x%08x\n", status); -} - -static void test_NtCreateKey(void) -{ - /*Create WineTest*/ - OBJECT_ATTRIBUTES attr; - HANDLE key, subkey; - ACCESS_MASK am = GENERIC_ALL; - NTSTATUS status; - UNICODE_STRING str; - - /* All NULL */ - status = pNtCreateKey(NULL, 0, NULL, 0, 0, 0, 0); - ok(status == STATUS_ACCESS_VIOLATION || status == STATUS_INVALID_PARAMETER, - "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER, got: 0x%08x\n", status); - - /* Only the key */ - status = pNtCreateKey(&key, 0, NULL, 0, 0, 0, 0); - ok(status == STATUS_ACCESS_VIOLATION /* W2K3/XP/W2K */ || status == STATUS_INVALID_PARAMETER /* NT4 */, - "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER(NT4), got: 0x%08x\n", status); - - /* Only accessmask */ - status = pNtCreateKey(NULL, am, NULL, 0, 0, 0, 0); - ok(status == STATUS_ACCESS_VIOLATION || status == STATUS_INVALID_PARAMETER, - "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER, got: 0x%08x\n", status); - - /* Key and accessmask */ - status = pNtCreateKey(&key, am, NULL, 0, 0, 0, 0); - ok(status == STATUS_ACCESS_VIOLATION /* W2K3/XP/W2K */ || status == STATUS_INVALID_PARAMETER /* NT4 */, - "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER(NT4), got: 0x%08x\n", status); - - InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0); - - /* Only attributes */ - status = pNtCreateKey(NULL, 0, &attr, 0, 0, 0, 0); - ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08x\n", status); - - /* Length > sizeof(OBJECT_ATTRIBUTES) */ - attr.Length *= 2; - status = pNtCreateKey(&key, am, &attr, 0, 0, 0, 0); - ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got: 0x%08x\n", status); - - attr.Length = sizeof(attr); - status = pNtCreateKey(&key, am, &attr, 0, 0, 0, 0); - ok(status == STATUS_SUCCESS, "NtCreateKey Failed: 0x%08x\n", status); - - attr.RootDirectory = key; - attr.ObjectName = &str; - - pRtlCreateUnicodeStringFromAsciiz( &str, "test\\sub\\key" ); - status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtCreateKey failed: 0x%08x\n", status ); - pRtlFreeUnicodeString( &str ); - - pRtlCreateUnicodeStringFromAsciiz( &str, "test\\subkey" ); - status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtCreateKey failed: 0x%08x\n", status ); - pRtlFreeUnicodeString( &str ); - - pRtlCreateUnicodeStringFromAsciiz( &str, "test\\subkey\\" ); - status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtCreateKey failed: 0x%08x\n", status ); - pRtlFreeUnicodeString( &str ); - - pRtlCreateUnicodeStringFromAsciiz( &str, "test_subkey\\" ); - status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS || broken(status == STATUS_OBJECT_NAME_NOT_FOUND), /* nt4 */ - "NtCreateKey failed: 0x%08x\n", status ); - if (status == STATUS_SUCCESS) - { - pNtDeleteKey( subkey ); - pNtClose( subkey ); - } - pRtlFreeUnicodeString( &str ); - - pRtlCreateUnicodeStringFromAsciiz( &str, "test_subkey" ); - status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - pRtlFreeUnicodeString( &str ); - pNtDeleteKey( subkey ); - pNtClose( subkey ); - - pNtClose(key); -} - -static void test_NtSetValueKey(void) -{ - HANDLE key; - NTSTATUS status; - OBJECT_ATTRIBUTES attr; - ACCESS_MASK am = KEY_WRITE; - UNICODE_STRING ValName; - DWORD data = 711; - - InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0); - status = pNtOpenKey(&key, am, &attr); - ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08x\n", status); - - pRtlCreateUnicodeStringFromAsciiz(&ValName, "deletetest"); - status = pNtSetValueKey(key, &ValName, 0, REG_DWORD, &data, sizeof(data)); - ok(status == STATUS_SUCCESS, "NtSetValueKey Failed: 0x%08x\n", status); - pRtlFreeUnicodeString(&ValName); - - pRtlCreateUnicodeStringFromAsciiz(&ValName, "stringtest"); - status = pNtSetValueKey(key, &ValName, 0, REG_SZ, (VOID*)stringW, STR_TRUNC_SIZE); - ok(status == STATUS_SUCCESS, "NtSetValueKey Failed: 0x%08x\n", status); - pRtlFreeUnicodeString(&ValName); - - pNtClose(key); -} - -static void test_RtlOpenCurrentUser(void) -{ - NTSTATUS status; - HANDLE handle; - status=pRtlOpenCurrentUser(KEY_READ, &handle); - ok(status == STATUS_SUCCESS, "RtlOpenCurrentUser Failed: 0x%08x\n", status); - pNtClose(handle); -} - -static void test_RtlCheckRegistryKey(void) -{ - NTSTATUS status; - - status = pRtlCheckRegistryKey(RTL_REGISTRY_ABSOLUTE, winetestpath.Buffer); - ok(status == STATUS_SUCCESS, "RtlCheckRegistryKey with RTL_REGISTRY_ABSOLUTE: 0x%08x\n", status); - - status = pRtlCheckRegistryKey((RTL_REGISTRY_ABSOLUTE | RTL_REGISTRY_OPTIONAL), winetestpath.Buffer); - ok(status == STATUS_SUCCESS, "RtlCheckRegistryKey with RTL_REGISTRY_ABSOLUTE and RTL_REGISTRY_OPTIONAL: 0x%08x\n", status); -} - -static void test_NtFlushKey(void) -{ - NTSTATUS status; - HANDLE hkey; - OBJECT_ATTRIBUTES attr; - ACCESS_MASK am = KEY_ALL_ACCESS; - - status = pNtFlushKey(NULL); - ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got: 0x%08x\n", status); - - InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0); - pNtOpenKey(&hkey, am, &attr); - - status = pNtFlushKey(hkey); - ok(status == STATUS_SUCCESS, "NtDeleteKey Failed: 0x%08x\n", status); - - pNtClose(hkey); -} - -static void test_NtQueryValueKey(void) -{ - HANDLE key; - NTSTATUS status; - OBJECT_ATTRIBUTES attr; - UNICODE_STRING ValName; - KEY_VALUE_BASIC_INFORMATION *basic_info; - KEY_VALUE_PARTIAL_INFORMATION *partial_info; - KEY_VALUE_FULL_INFORMATION *full_info; - DWORD len, expected; - - pRtlCreateUnicodeStringFromAsciiz(&ValName, "deletetest"); - - InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0); - status = pNtOpenKey(&key, KEY_READ, &attr); - ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08x\n", status); - - len = FIELD_OFFSET(KEY_VALUE_BASIC_INFORMATION, Name[0]); - basic_info = HeapAlloc(GetProcessHeap(), 0, len); - status = pNtQueryValueKey(key, &ValName, KeyValueBasicInformation, basic_info, len, &len); - ok(status == STATUS_BUFFER_OVERFLOW, "NtQueryValueKey should have returned STATUS_BUFFER_OVERFLOW instead of 0x%08x\n", status); - ok(basic_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", basic_info->TitleIndex); - ok(basic_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %d\n", basic_info->Type); - ok(basic_info->NameLength == 20, "NtQueryValueKey returned wrong NameLength %d\n", basic_info->NameLength); - ok(len == FIELD_OFFSET(KEY_VALUE_BASIC_INFORMATION, Name[basic_info->NameLength/sizeof(WCHAR)]), "NtQueryValueKey returned wrong len %d\n", len); - - basic_info = HeapReAlloc(GetProcessHeap(), 0, basic_info, len); - status = pNtQueryValueKey(key, &ValName, KeyValueBasicInformation, basic_info, len, &len); - ok(status == STATUS_SUCCESS, "NtQueryValueKey should have returned STATUS_SUCCESS instead of 0x%08x\n", status); - ok(basic_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", basic_info->TitleIndex); - ok(basic_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %d\n", basic_info->Type); - ok(basic_info->NameLength == 20, "NtQueryValueKey returned wrong NameLength %d\n", basic_info->NameLength); - ok(len == FIELD_OFFSET(KEY_VALUE_BASIC_INFORMATION, Name[basic_info->NameLength/sizeof(WCHAR)]), "NtQueryValueKey returned wrong len %d\n", len); - ok(!memcmp(basic_info->Name, ValName.Buffer, ValName.Length), "incorrect Name returned\n"); - HeapFree(GetProcessHeap(), 0, basic_info); - - len = FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data[0]); - partial_info = HeapAlloc(GetProcessHeap(), 0, len); - status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, partial_info, len, &len); - ok(status == STATUS_BUFFER_OVERFLOW, "NtQueryValueKey should have returned STATUS_BUFFER_OVERFLOW instead of 0x%08x\n", status); - ok(partial_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", partial_info->TitleIndex); - ok(partial_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %d\n", partial_info->Type); - ok(partial_info->DataLength == 4, "NtQueryValueKey returned wrong DataLength %d\n", partial_info->DataLength); - ok(len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data[partial_info->DataLength]), "NtQueryValueKey returned wrong len %d\n", len); - - partial_info = HeapReAlloc(GetProcessHeap(), 0, partial_info, len); - status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, partial_info, len, &len); - ok(status == STATUS_SUCCESS, "NtQueryValueKey should have returned STATUS_SUCCESS instead of 0x%08x\n", status); - ok(partial_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", partial_info->TitleIndex); - ok(partial_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %d\n", partial_info->Type); - ok(partial_info->DataLength == 4, "NtQueryValueKey returned wrong DataLength %d\n", partial_info->DataLength); - ok(len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data[partial_info->DataLength]), "NtQueryValueKey returned wrong len %d\n", len); - ok(*(DWORD *)partial_info->Data == 711, "incorrect Data returned: 0x%x\n", *(DWORD *)partial_info->Data); - HeapFree(GetProcessHeap(), 0, partial_info); - - len = FIELD_OFFSET(KEY_VALUE_FULL_INFORMATION, Name[0]); - full_info = HeapAlloc(GetProcessHeap(), 0, len); - status = pNtQueryValueKey(key, &ValName, KeyValueFullInformation, full_info, len, &len); - ok(status == STATUS_BUFFER_OVERFLOW, "NtQueryValueKey should have returned STATUS_BUFFER_OVERFLOW instead of 0x%08x\n", status); - ok(full_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", full_info->TitleIndex); - ok(full_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %d\n", full_info->Type); - ok(full_info->DataLength == 4, "NtQueryValueKey returned wrong DataLength %d\n", full_info->DataLength); - ok(full_info->NameLength == 20, "NtQueryValueKey returned wrong NameLength %d\n", full_info->NameLength); - ok(len == FIELD_OFFSET(KEY_VALUE_FULL_INFORMATION, Name[0]) + full_info->DataLength + full_info->NameLength, - "NtQueryValueKey returned wrong len %d\n", len); - len = FIELD_OFFSET(KEY_VALUE_FULL_INFORMATION, Name[0]) + full_info->DataLength + full_info->NameLength; - - full_info = HeapReAlloc(GetProcessHeap(), 0, full_info, len); - status = pNtQueryValueKey(key, &ValName, KeyValueFullInformation, full_info, len, &len); - ok(status == STATUS_SUCCESS, "NtQueryValueKey should have returned STATUS_SUCCESS instead of 0x%08x\n", status); - ok(full_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", full_info->TitleIndex); - ok(full_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %d\n", full_info->Type); - ok(full_info->DataLength == 4, "NtQueryValueKey returned wrong DataLength %d\n", full_info->DataLength); - ok(full_info->NameLength == 20, "NtQueryValueKey returned wrong NameLength %d\n", full_info->NameLength); - ok(!memcmp(full_info->Name, ValName.Buffer, ValName.Length), "incorrect Name returned\n"); - ok(*(DWORD *)((char *)full_info + full_info->DataOffset) == 711, "incorrect Data returned: 0x%x\n", - *(DWORD *)((char *)full_info + full_info->DataOffset)); - HeapFree(GetProcessHeap(), 0, full_info); - - pRtlFreeUnicodeString(&ValName); - pRtlCreateUnicodeStringFromAsciiz(&ValName, "stringtest"); - - status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, NULL, 0, &len); - ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryValueKey should have returned STATUS_BUFFER_TOO_SMALL instead of 0x%08x\n", status); - partial_info = HeapAlloc(GetProcessHeap(), 0, len+1); - memset(partial_info, 0xbd, len+1); - status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, partial_info, len, &len); - ok(status == STATUS_SUCCESS, "NtQueryValueKey should have returned STATUS_SUCCESS instead of 0x%08x\n", status); - ok(partial_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", partial_info->TitleIndex); - ok(partial_info->Type == REG_SZ, "NtQueryValueKey returned wrong Type %d\n", partial_info->Type); - ok(partial_info->DataLength == STR_TRUNC_SIZE, "NtQueryValueKey returned wrong DataLength %d\n", partial_info->DataLength); - ok(!memcmp(partial_info->Data, stringW, STR_TRUNC_SIZE), "incorrect Data returned\n"); - ok(*(partial_info->Data+STR_TRUNC_SIZE) == 0xbd, "string overflowed %02x\n", *(partial_info->Data+STR_TRUNC_SIZE)); - - expected = len; - status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, partial_info, 0, &len); - ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryValueKey wrong status 0x%08x\n", status); - ok(len == expected, "NtQueryValueKey wrong len %u\n", len); - status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, partial_info, 1, &len); - ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryValueKey wrong status 0x%08x\n", status); - ok(len == expected, "NtQueryValueKey wrong len %u\n", len); - status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, partial_info, FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data) - 1, &len); - ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryValueKey wrong status 0x%08x\n", status); - ok(len == expected, "NtQueryValueKey wrong len %u\n", len); - status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, partial_info, FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data), &len); - ok(status == STATUS_BUFFER_OVERFLOW, "NtQueryValueKey wrong status 0x%08x\n", status); - ok(len == expected, "NtQueryValueKey wrong len %u\n", len); - - HeapFree(GetProcessHeap(), 0, partial_info); - - pRtlFreeUnicodeString(&ValName); - pNtClose(key); -} - -static void test_NtDeleteKey(void) -{ - NTSTATUS status; - HANDLE hkey; - OBJECT_ATTRIBUTES attr; - ACCESS_MASK am = KEY_ALL_ACCESS; - - status = pNtDeleteKey(NULL); - ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got: 0x%08x\n", status); - - InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0); - status = pNtOpenKey(&hkey, am, &attr); - ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08x\n", status); - - status = pNtDeleteKey(hkey); - ok(status == STATUS_SUCCESS, "NtDeleteKey Failed: 0x%08x\n", status); -} - -static void test_RtlpNtQueryValueKey(void) -{ - NTSTATUS status; - - status = pRtlpNtQueryValueKey(NULL, NULL, NULL, NULL, NULL); - ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got: 0x%08x\n", status); -} - -static void test_symlinks(void) -{ - static const WCHAR linkW[] = {'l','i','n','k',0}; - static const WCHAR valueW[] = {'v','a','l','u','e',0}; - static const WCHAR symlinkW[] = {'S','y','m','b','o','l','i','c','L','i','n','k','V','a','l','u','e',0}; - static const WCHAR targetW[] = {'\\','t','a','r','g','e','t',0}; - static UNICODE_STRING null_str; - char buffer[1024]; - KEY_VALUE_PARTIAL_INFORMATION *info = (KEY_VALUE_PARTIAL_INFORMATION *)buffer; - WCHAR *target; - UNICODE_STRING symlink_str, link_str, target_str, value_str; - HANDLE root, key, link; - OBJECT_ATTRIBUTES attr; - NTSTATUS status; - DWORD target_len, len, dw; - - pRtlInitUnicodeString( &link_str, linkW ); - pRtlInitUnicodeString( &symlink_str, symlinkW ); - pRtlInitUnicodeString( &target_str, targetW + 1 ); - pRtlInitUnicodeString( &value_str, valueW ); - - target_len = winetestpath.Length + sizeof(targetW); - target = pRtlAllocateHeap( GetProcessHeap(), 0, target_len + sizeof(targetW) /*for loop test*/ ); - memcpy( target, winetestpath.Buffer, winetestpath.Length ); - memcpy( target + winetestpath.Length/sizeof(WCHAR), targetW, sizeof(targetW) ); - - attr.Length = sizeof(attr); - attr.RootDirectory = 0; - attr.Attributes = 0; - attr.ObjectName = &winetestpath; - attr.SecurityDescriptor = NULL; - attr.SecurityQualityOfService = NULL; - - status = pNtCreateKey( &root, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - - attr.RootDirectory = root; - attr.ObjectName = &link_str; - status = pNtCreateKey( &link, KEY_ALL_ACCESS, &attr, 0, 0, REG_OPTION_CREATE_LINK, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - - /* REG_SZ is not allowed */ - status = pNtSetValueKey( link, &symlink_str, 0, REG_SZ, target, target_len ); - ok( status == STATUS_ACCESS_DENIED, "NtSetValueKey wrong status 0x%08x\n", status ); - status = pNtSetValueKey( link, &symlink_str, 0, REG_LINK, target, target_len - sizeof(WCHAR) ); - ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status ); - /* other values are not allowed */ - status = pNtSetValueKey( link, &link_str, 0, REG_LINK, target, target_len - sizeof(WCHAR) ); - ok( status == STATUS_ACCESS_DENIED, "NtSetValueKey wrong status 0x%08x\n", status ); - - /* try opening the target through the link */ - - attr.ObjectName = &link_str; - status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr ); - ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtOpenKey wrong status 0x%08x\n", status ); - - attr.ObjectName = &target_str; - status = pNtCreateKey( &key, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - - dw = 0xbeef; - status = pNtSetValueKey( key, &value_str, 0, REG_DWORD, &dw, sizeof(dw) ); - ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status ); - pNtClose( key ); - - attr.ObjectName = &link_str; - status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr ); - ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08x\n", status ); - - len = sizeof(buffer); - status = pNtQueryValueKey( key, &value_str, KeyValuePartialInformation, info, len, &len ); - ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status ); - ok( len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION,Data) + sizeof(DWORD), "wrong len %u\n", len ); - - status = pNtQueryValueKey( key, &symlink_str, KeyValuePartialInformation, info, len, &len ); - ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtQueryValueKey failed: 0x%08x\n", status ); - - /* REG_LINK can be created in non-link keys */ - status = pNtSetValueKey( key, &symlink_str, 0, REG_LINK, target, target_len - sizeof(WCHAR) ); - ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status ); - len = sizeof(buffer); - status = pNtQueryValueKey( key, &symlink_str, KeyValuePartialInformation, info, len, &len ); - ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status ); - ok( len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION,Data) + target_len - sizeof(WCHAR), - "wrong len %u\n", len ); - status = pNtDeleteValueKey( key, &symlink_str ); - ok( status == STATUS_SUCCESS, "NtDeleteValueKey failed: 0x%08x\n", status ); - - pNtClose( key ); - - attr.Attributes = 0; - status = pNtCreateKey( &key, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - - len = sizeof(buffer); - status = pNtQueryValueKey( key, &value_str, KeyValuePartialInformation, info, len, &len ); - ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status ); - ok( len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION,Data) + sizeof(DWORD), "wrong len %u\n", len ); - - status = pNtQueryValueKey( key, &symlink_str, KeyValuePartialInformation, info, len, &len ); - ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtQueryValueKey failed: 0x%08x\n", status ); - pNtClose( key ); - - /* now open the symlink itself */ - - attr.RootDirectory = root; - attr.Attributes = OBJ_OPENLINK; - attr.ObjectName = &link_str; - status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr ); - ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08x\n", status ); - - len = sizeof(buffer); - status = pNtQueryValueKey( key, &symlink_str, KeyValuePartialInformation, info, len, &len ); - ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status ); - ok( len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION,Data) + target_len - sizeof(WCHAR), - "wrong len %u\n", len ); - pNtClose( key ); - - status = pNtCreateKey( &key, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - len = sizeof(buffer); - status = pNtQueryValueKey( key, &symlink_str, KeyValuePartialInformation, info, len, &len ); - ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status ); - ok( len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION,Data) + target_len - sizeof(WCHAR), - "wrong len %u\n", len ); - pNtClose( key ); - - if (0) /* crashes the Windows kernel on some Vista systems */ - { - /* reopen the link from itself */ - - attr.RootDirectory = link; - attr.Attributes = OBJ_OPENLINK; - attr.ObjectName = &null_str; - status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr ); - ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08x\n", status ); - len = sizeof(buffer); - status = pNtQueryValueKey( key, &symlink_str, KeyValuePartialInformation, info, len, &len ); - ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status ); - ok( len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION,Data) + target_len - sizeof(WCHAR), - "wrong len %u\n", len ); - pNtClose( key ); - - status = pNtCreateKey( &key, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - len = sizeof(buffer); - status = pNtQueryValueKey( key, &symlink_str, KeyValuePartialInformation, info, len, &len ); - ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status ); - ok( len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION,Data) + target_len - sizeof(WCHAR), - "wrong len %u\n", len ); - pNtClose( key ); - } - - if (0) /* crashes the Windows kernel in most versions */ - { - attr.RootDirectory = link; - attr.Attributes = 0; - attr.ObjectName = &null_str; - status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr ); - ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08x\n", status ); - len = sizeof(buffer); - status = pNtQueryValueKey( key, &symlink_str, KeyValuePartialInformation, info, len, &len ); - ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtQueryValueKey failed: 0x%08x\n", status ); - pNtClose( key ); - - status = pNtCreateKey( &key, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - len = sizeof(buffer); - status = pNtQueryValueKey( key, &symlink_str, KeyValuePartialInformation, info, len, &len ); - ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtQueryValueKey failed: 0x%08x\n", status ); - pNtClose( key ); - } - - /* target with terminating null doesn't work */ - status = pNtSetValueKey( link, &symlink_str, 0, REG_LINK, target, target_len ); - ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status ); - attr.RootDirectory = root; - attr.Attributes = 0; - attr.ObjectName = &link_str; - status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr ); - ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "NtOpenKey wrong status 0x%08x\n", status ); - - /* relative symlink, works only on win2k */ - status = pNtSetValueKey( link, &symlink_str, 0, REG_LINK, targetW+1, sizeof(targetW)-2*sizeof(WCHAR) ); - ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status ); - attr.ObjectName = &link_str; - status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr ); - ok( status == STATUS_SUCCESS || status == STATUS_OBJECT_NAME_NOT_FOUND, - "NtOpenKey wrong status 0x%08x\n", status ); - - status = pNtCreateKey( &key, KEY_ALL_ACCESS, &attr, 0, 0, REG_OPTION_CREATE_LINK, 0 ); - ok( status == STATUS_OBJECT_NAME_COLLISION, "NtCreateKey failed: 0x%08x\n", status ); - - status = pNtDeleteKey( link ); - ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08x\n", status ); - pNtClose( link ); - - attr.ObjectName = &target_str; - status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr ); - ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08x\n", status ); - status = pNtDeleteKey( key ); - ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08x\n", status ); - pNtClose( key ); - - /* symlink loop */ - - status = pNtCreateKey( &link, KEY_ALL_ACCESS, &attr, 0, 0, REG_OPTION_CREATE_LINK, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - memcpy( target + target_len/sizeof(WCHAR) - 1, targetW, sizeof(targetW) ); - status = pNtSetValueKey( link, &symlink_str, 0, REG_LINK, - target, target_len + sizeof(targetW) - sizeof(WCHAR) ); - ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status ); - - status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr ); - ok( status == STATUS_OBJECT_NAME_NOT_FOUND || status == STATUS_NAME_TOO_LONG, - "NtOpenKey failed: 0x%08x\n", status ); - - attr.Attributes = OBJ_OPENLINK; - status = pNtOpenKey( &key, KEY_ALL_ACCESS, &attr ); - ok( status == STATUS_SUCCESS, "NtOpenKey failed: 0x%08x\n", status ); - pNtClose( key ); - - status = pNtDeleteKey( link ); - ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08x\n", status ); - pNtClose( link ); - - status = pNtDeleteKey( root ); - ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08x\n", status ); - pNtClose( root ); - - pRtlFreeHeap(GetProcessHeap(), 0, target); -} - -static WCHAR valueW[] = {'v','a','l','u','e'}; -static UNICODE_STRING value_str = { sizeof(valueW), sizeof(valueW), valueW }; -static const DWORD ptr_size = 8 * sizeof(void*); - -static DWORD get_key_value( HANDLE root, const char *name, DWORD flags ) -{ - char tmp[32]; - NTSTATUS status; - OBJECT_ATTRIBUTES attr; - UNICODE_STRING str; - HANDLE key; - KEY_VALUE_PARTIAL_INFORMATION *info = (KEY_VALUE_PARTIAL_INFORMATION *)tmp; - DWORD dw, len = sizeof(tmp); - - attr.Length = sizeof(attr); - attr.RootDirectory = root; - attr.Attributes = OBJ_CASE_INSENSITIVE; - attr.ObjectName = &str; - attr.SecurityDescriptor = NULL; - attr.SecurityQualityOfService = NULL; - pRtlCreateUnicodeStringFromAsciiz( &str, name ); - - status = pNtCreateKey( &key, flags | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - if (status == STATUS_OBJECT_NAME_NOT_FOUND) return 0; - ok( status == STATUS_SUCCESS, "%08x: NtCreateKey failed: 0x%08x\n", flags, status ); - - status = pNtQueryValueKey( key, &value_str, KeyValuePartialInformation, info, len, &len ); - if (status == STATUS_OBJECT_NAME_NOT_FOUND) - dw = 0; - else - { - ok( status == STATUS_SUCCESS, "%08x: NtQueryValueKey failed: 0x%08x\n", flags, status ); - dw = *(DWORD *)info->Data; - } - pNtClose( key ); - pRtlFreeUnicodeString( &str ); - return dw; -} - -static void _check_key_value( int line, HANDLE root, const char *name, DWORD flags, DWORD expect ) -{ - DWORD dw = get_key_value( root, name, flags ); - ok_(__FILE__,line)( dw == expect, "%08x: wrong value %u/%u\n", flags, dw, expect ); -} -#define check_key_value(root,name,flags,expect) _check_key_value( __LINE__, root, name, flags, expect ) - -static void test_redirection(void) -{ - static const WCHAR softwareW[] = {'\\','R','e','g','i','s','t','r','y','\\', - 'M','a','c','h','i','n','e','\\', - 'S','o','f','t','w','a','r','e',0}; - static const WCHAR wownodeW[] = {'\\','R','e','g','i','s','t','r','y','\\', - 'M','a','c','h','i','n','e','\\', - 'S','o','f','t','w','a','r','e','\\', - 'W','o','w','6','4','3','2','N','o','d','e',0}; - static const WCHAR wine64W[] = {'\\','R','e','g','i','s','t','r','y','\\', - 'M','a','c','h','i','n','e','\\', - 'S','o','f','t','w','a','r','e','\\', - 'W','i','n','e',0}; - static const WCHAR wine32W[] = {'\\','R','e','g','i','s','t','r','y','\\', - 'M','a','c','h','i','n','e','\\', - 'S','o','f','t','w','a','r','e','\\', - 'W','o','w','6','4','3','2','N','o','d','e','\\', - 'W','i','n','e',0}; - static const WCHAR key64W[] = {'\\','R','e','g','i','s','t','r','y','\\', - 'M','a','c','h','i','n','e','\\', - 'S','o','f','t','w','a','r','e','\\', - 'W','i','n','e','\\','W','i','n','e','t','e','s','t',0}; - static const WCHAR key32W[] = {'\\','R','e','g','i','s','t','r','y','\\', - 'M','a','c','h','i','n','e','\\', - 'S','o','f','t','w','a','r','e','\\', - 'W','o','w','6','4','3','2','N','o','d','e','\\', - 'W','i','n','e','\\', 'W','i','n','e','t','e','s','t',0}; - static const WCHAR classes64W[] = {'\\','R','e','g','i','s','t','r','y','\\', - 'M','a','c','h','i','n','e','\\', - 'S','o','f','t','w','a','r','e','\\', - 'C','l','a','s','s','e','s','\\', - 'W','i','n','e',0}; - static const WCHAR classes32W[] = {'\\','R','e','g','i','s','t','r','y','\\', - 'M','a','c','h','i','n','e','\\', - 'S','o','f','t','w','a','r','e','\\', - 'C','l','a','s','s','e','s','\\', - 'W','o','w','6','4','3','2','N','o','d','e','\\', - 'W','i','n','e',0}; - NTSTATUS status; - OBJECT_ATTRIBUTES attr; - UNICODE_STRING str; - char buffer[1024]; - KEY_VALUE_PARTIAL_INFORMATION *info = (KEY_VALUE_PARTIAL_INFORMATION *)buffer; - DWORD dw, len; - HANDLE key, root32, root64, key32, key64; - BOOL is_vista = FALSE; - - if (ptr_size != 64) - { - ULONG is_wow64, len; - if (pNtQueryInformationProcess( GetCurrentProcess(), ProcessWow64Information, - &is_wow64, sizeof(is_wow64), &len ) || - !is_wow64) - { - trace( "Not on Wow64, no redirection\n" ); - return; - } - } - - attr.Length = sizeof(attr); - attr.RootDirectory = 0; - attr.Attributes = OBJ_CASE_INSENSITIVE; - attr.ObjectName = &str; - attr.SecurityDescriptor = NULL; - attr.SecurityQualityOfService = NULL; - - pRtlInitUnicodeString( &str, wine64W ); - status = pNtCreateKey( &root64, KEY_WOW64_64KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - - pRtlInitUnicodeString( &str, wine32W ); - status = pNtCreateKey( &root32, KEY_WOW64_32KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - - pRtlInitUnicodeString( &str, key64W ); - status = pNtCreateKey( &key64, KEY_WOW64_64KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - - pRtlInitUnicodeString( &str, key32W ); - status = pNtCreateKey( &key32, KEY_WOW64_32KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - - dw = 64; - status = pNtSetValueKey( key64, &value_str, 0, REG_DWORD, &dw, sizeof(dw) ); - ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status ); - - dw = 32; - status = pNtSetValueKey( key32, &value_str, 0, REG_DWORD, &dw, sizeof(dw) ); - ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status ); - - len = sizeof(buffer); - status = pNtQueryValueKey( key32, &value_str, KeyValuePartialInformation, info, len, &len ); - ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status ); - dw = *(DWORD *)info->Data; - ok( dw == 32, "wrong value %u\n", dw ); - - len = sizeof(buffer); - status = pNtQueryValueKey( key64, &value_str, KeyValuePartialInformation, info, len, &len ); - ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status ); - dw = *(DWORD *)info->Data; - ok( dw == 64, "wrong value %u\n", dw ); - - pRtlInitUnicodeString( &str, softwareW ); - status = pNtCreateKey( &key, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - - if (ptr_size == 32) - { - /* the Vista mechanism allows opening Wow6432Node from a 32-bit key too */ - /* the new (and simpler) Win7 mechanism doesn't */ - if (get_key_value( key, "Wow6432Node\\Wine\\Winetest", 0 ) == 32) - { - trace( "using Vista-style Wow6432Node handling\n" ); - is_vista = TRUE; - } - check_key_value( key, "Wine\\Winetest", 0, 32 ); - check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); - check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 ); - check_key_value( key, "Wow6432Node\\Wine\\Winetest", 0, is_vista ? 32 : 0 ); - check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 0 ); - check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_32KEY, is_vista ? 32 : 0 ); - } - else - { - check_key_value( key, "Wine\\Winetest", 0, 64 ); - check_key_value( key, "Wow6432Node\\Wine\\Winetest", 0, 32 ); - } - pNtClose( key ); - - if (ptr_size == 32) - { - status = pNtCreateKey( &key, KEY_WOW64_64KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - dw = get_key_value( key, "Wine\\Winetest", 0 ); - ok( dw == 64 || broken(dw == 32) /* xp64 */, "wrong value %u\n", dw ); - check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, 64 ); - check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 ); - check_key_value( key, "Wow6432Node\\Wine\\Winetest", 0, 32 ); - dw = get_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY ); - ok( dw == 32 || broken(dw == 64) /* xp64 */, "wrong value %u\n", dw ); - check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_32KEY, 32 ); - pNtClose( key ); - - status = pNtCreateKey( &key, KEY_WOW64_32KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - check_key_value( key, "Wine\\Winetest", 0, 32 ); - check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); - check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 ); - check_key_value( key, "Wow6432Node\\Wine\\Winetest", 0, is_vista ? 32 : 0 ); - check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 0 ); - check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_32KEY, is_vista ? 32 : 0 ); - pNtClose( key ); - } - - check_key_value( 0, "\\Registry\\Machine\\Software\\Wine\\Winetest", 0, ptr_size ); - check_key_value( 0, "\\Registry\\Machine\\Software\\Wow6432Node\\Wine\\Winetest", 0, 32 ); - if (ptr_size == 64) - { - /* KEY_WOW64 flags have no effect on 64-bit */ - check_key_value( 0, "\\Registry\\Machine\\Software\\Wine\\Winetest", KEY_WOW64_64KEY, 64 ); - check_key_value( 0, "\\Registry\\Machine\\Software\\Wine\\Winetest", KEY_WOW64_32KEY, 64 ); - check_key_value( 0, "\\Registry\\Machine\\Software\\Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY, 32 ); - check_key_value( 0, "\\Registry\\Machine\\Software\\Wow6432Node\\Wine\\Winetest", KEY_WOW64_32KEY, 32 ); - } - else - { - check_key_value( 0, "\\Registry\\Machine\\Software\\Wine\\Winetest", KEY_WOW64_64KEY, 64 ); - check_key_value( 0, "\\Registry\\Machine\\Software\\Wine\\Winetest", KEY_WOW64_32KEY, 32 ); - check_key_value( 0, "\\Registry\\Machine\\Software\\Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); - check_key_value( 0, "\\Registry\\Machine\\Software\\Wow6432Node\\Wine\\Winetest", KEY_WOW64_32KEY, 32 ); - } - - pRtlInitUnicodeString( &str, wownodeW ); - status = pNtCreateKey( &key, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - check_key_value( key, "Wine\\Winetest", 0, 32 ); - check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, (ptr_size == 64) ? 32 : (is_vista ? 64 : 32) ); - check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 ); - pNtClose( key ); - - if (ptr_size == 32) - { - status = pNtCreateKey( &key, KEY_WOW64_64KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - dw = get_key_value( key, "Wine\\Winetest", 0 ); - ok( dw == (is_vista ? 64 : 32) || broken(dw == 32) /* xp64 */, "wrong value %u\n", dw ); - check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); - check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 ); - pNtClose( key ); - - status = pNtCreateKey( &key, KEY_WOW64_32KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - check_key_value( key, "Wine\\Winetest", 0, 32 ); - check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); - check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 ); - pNtClose( key ); - } - - pRtlInitUnicodeString( &str, wine32W ); - status = pNtCreateKey( &key, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - check_key_value( key, "Winetest", 0, 32 ); - check_key_value( key, "Winetest", KEY_WOW64_64KEY, (ptr_size == 32 && is_vista) ? 64 : 32 ); - check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 ); - pNtClose( key ); - - if (ptr_size == 32) - { - status = pNtCreateKey( &key, KEY_WOW64_64KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - dw = get_key_value( key, "Winetest", 0 ); - ok( dw == 32 || (is_vista && dw == 64), "wrong value %u\n", dw ); - check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); - check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 ); - pNtClose( key ); - - status = pNtCreateKey( &key, KEY_WOW64_32KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - check_key_value( key, "Winetest", 0, 32 ); - check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); - check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 ); - pNtClose( key ); - } - - pRtlInitUnicodeString( &str, wine64W ); - status = pNtCreateKey( &key, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - check_key_value( key, "Winetest", 0, ptr_size ); - check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : ptr_size ); - check_key_value( key, "Winetest", KEY_WOW64_32KEY, ptr_size ); - pNtClose( key ); - - if (ptr_size == 32) - { - status = pNtCreateKey( &key, KEY_WOW64_64KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - dw = get_key_value( key, "Winetest", 0 ); - ok( dw == 64 || broken(dw == 32) /* xp64 */, "wrong value %u\n", dw ); - check_key_value( key, "Winetest", KEY_WOW64_64KEY, 64 ); - dw = get_key_value( key, "Winetest", KEY_WOW64_32KEY ); - todo_wine ok( dw == 32, "wrong value %u\n", dw ); - pNtClose( key ); - - status = pNtCreateKey( &key, KEY_WOW64_32KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - check_key_value( key, "Winetest", 0, 32 ); - check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); - check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 ); - pNtClose( key ); - } - - status = pNtDeleteKey( key32 ); - ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08x\n", status ); - pNtClose( key32 ); - - status = pNtDeleteKey( key64 ); - ok( status == STATUS_SUCCESS, "NtDeleteKey failed: 0x%08x\n", status ); - pNtClose( key64 ); - - pNtDeleteKey( root32 ); - pNtClose( root32 ); - pNtDeleteKey( root64 ); - pNtClose( root64 ); - - /* Software\Classes is shared/reflected so behavior is different */ - - pRtlInitUnicodeString( &str, classes64W ); - status = pNtCreateKey( &key64, KEY_WOW64_64KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - if (status == STATUS_ACCESS_DENIED) - { - skip("Not authorized to modify the Classes key\n"); - return; - } - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - - pRtlInitUnicodeString( &str, classes32W ); - status = pNtCreateKey( &key32, KEY_WOW64_32KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - - dw = 64; - status = pNtSetValueKey( key64, &value_str, 0, REG_DWORD, &dw, sizeof(dw) ); - ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status ); - pNtClose( key64 ); - - dw = 32; - status = pNtSetValueKey( key32, &value_str, 0, REG_DWORD, &dw, sizeof(dw) ); - ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status ); - pNtClose( key32 ); - - pRtlInitUnicodeString( &str, classes64W ); - status = pNtCreateKey( &key64, KEY_WOW64_64KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - len = sizeof(buffer); - status = pNtQueryValueKey( key64, &value_str, KeyValuePartialInformation, info, len, &len ); - ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status ); - dw = *(DWORD *)info->Data; - ok( dw == ptr_size, "wrong value %u\n", dw ); - - pRtlInitUnicodeString( &str, classes32W ); - status = pNtCreateKey( &key32, KEY_WOW64_32KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); - ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); - len = sizeof(buffer); - status = pNtQueryValueKey( key32, &value_str, KeyValuePartialInformation, info, len, &len ); - ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status ); - dw = *(DWORD *)info->Data; - ok( dw == 32, "wrong value %u\n", dw ); - - pNtDeleteKey( key32 ); - pNtClose( key32 ); - pNtDeleteKey( key64 ); - pNtClose( key64 ); -} - -START_TEST(reg) -{ - static const WCHAR winetest[] = {'\\','W','i','n','e','T','e','s','t',0}; - if(!InitFunctionPtrs()) - return; - pRtlFormatCurrentUserKeyPath(&winetestpath); - winetestpath.Buffer = pRtlReAllocateHeap(GetProcessHeap(), HEAP_ZERO_MEMORY, winetestpath.Buffer, - winetestpath.MaximumLength + sizeof(winetest)*sizeof(WCHAR)); - winetestpath.MaximumLength = winetestpath.MaximumLength + sizeof(winetest)*sizeof(WCHAR); - - pRtlAppendUnicodeToString(&winetestpath, winetest); - - test_NtCreateKey(); - test_NtOpenKey(); - test_NtSetValueKey(); - test_RtlCheckRegistryKey(); - test_RtlOpenCurrentUser(); - test_RtlQueryRegistryValues(); - test_RtlpNtQueryValueKey(); - test_NtFlushKey(); - test_NtQueryValueKey(); - test_NtDeleteKey(); - test_symlinks(); - test_redirection(); - - pRtlFreeUnicodeString(&winetestpath); - - FreeLibrary(hntdll); -} diff --git a/rostests/winetests/ntdll/ros_diff.patch b/rostests/winetests/ntdll/ros_diff.patch deleted file mode 100644 index a46b1c3d9c3..00000000000 --- a/rostests/winetests/ntdll/ros_diff.patch +++ /dev/null @@ -1,69 +0,0 @@ -Index: generated.c -=================================================================== ---- generated.c (Revision 48052) -+++ generated.c (Arbeitskopie) -@@ -442,6 +442,7 @@ - - static void test_pack_FLOATING_SAVE_AREA(void) - { -+#if 0 - /* FLOATING_SAVE_AREA */ - TEST_TYPE_SIZE (FLOATING_SAVE_AREA, 112) - TEST_TYPE_ALIGN (FLOATING_SAVE_AREA, 4) -@@ -472,6 +473,7 @@ - TEST_FIELD_SIZE (FLOATING_SAVE_AREA, Cr0NpxState, 4) - TEST_FIELD_ALIGN (FLOATING_SAVE_AREA, Cr0NpxState, 4) - TEST_FIELD_OFFSET(FLOATING_SAVE_AREA, Cr0NpxState, 108) -+#endif - } - - static void test_pack_FPO_DATA(void) -@@ -875,7 +877,7 @@ - static void test_pack_IMAGE_LOAD_CONFIG_DIRECTORY(void) - { - /* IMAGE_LOAD_CONFIG_DIRECTORY */ -- TEST_TYPE_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, 88) -+// TEST_TYPE_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, 88) - TEST_TYPE_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, 8) - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, Size, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, Size, 4) -@@ -898,6 +900,7 @@ - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, CriticalSectionDefaultTimeout, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, CriticalSectionDefaultTimeout, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, CriticalSectionDefaultTimeout, 20) -+#if 0 // wine headers are broken - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitFreeBlockThreshold, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitFreeBlockThreshold, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, DeCommitFreeBlockThreshold, 24) -@@ -937,6 +940,7 @@ - TEST_FIELD_SIZE (IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerCount, 4) - TEST_FIELD_ALIGN (IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerCount, 4) - TEST_FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, SEHandlerCount, 80) -+#endif - } - - static void test_pack_IMAGE_NT_HEADERS(void) -@@ -1980,11 +1984,13 @@ - - static void test_pack_PFLOATING_SAVE_AREA(void) - { -+#if 0 - /* PFLOATING_SAVE_AREA */ - TEST_TYPE_SIZE (PFLOATING_SAVE_AREA, 8) - TEST_TYPE_ALIGN (PFLOATING_SAVE_AREA, 8) - TEST_TARGET_SIZE (PFLOATING_SAVE_AREA, 112) - TEST_TARGET_ALIGN(PFLOATING_SAVE_AREA, 4) -+#endif - } - - static void test_pack_PFPO_DATA(void) -@@ -2157,7 +2163,9 @@ - /* PIMAGE_LOAD_CONFIG_DIRECTORY */ - TEST_TYPE_SIZE (PIMAGE_LOAD_CONFIG_DIRECTORY, 8) - TEST_TYPE_ALIGN (PIMAGE_LOAD_CONFIG_DIRECTORY, 8) -+#if 0// wine headers are broken - TEST_TARGET_SIZE (PIMAGE_LOAD_CONFIG_DIRECTORY, 88) -+#endif - TEST_TARGET_ALIGN(PIMAGE_LOAD_CONFIG_DIRECTORY, 8) - } - diff --git a/rostests/winetests/ntdll/rtl.c b/rostests/winetests/ntdll/rtl.c deleted file mode 100755 index 63bc813f282..00000000000 --- a/rostests/winetests/ntdll/rtl.c +++ /dev/null @@ -1,1339 +0,0 @@ -/* Unit test suite for Rtl* API functions - * - * Copyright 2003 Thomas Mertes - * - * 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 - * We use function pointers here as there is no import library for NTDLL on - * windows. - */ - -#include - -#include "ntdll_test.h" -#include "inaddr.h" - -#ifndef __WINE_WINTERNL_H - -typedef struct _RTL_HANDLE -{ - struct _RTL_HANDLE * Next; -} RTL_HANDLE; - -typedef struct _RTL_HANDLE_TABLE -{ - ULONG MaxHandleCount; - ULONG HandleSize; - ULONG Unused[2]; - PVOID NextFree; - PVOID FirstHandle; - PVOID ReservedMemory; - PVOID MaxHandle; -} RTL_HANDLE_TABLE; - -#endif - -/* avoid #include */ -#undef htons -#ifdef WORDS_BIGENDIAN -#define htons(s) ((USHORT)(s)) -#else /* WORDS_BIGENDIAN */ -static inline USHORT __my_ushort_swap(USHORT s) -{ - return (s >> 8) | (s << 8); -} -#define htons(s) __my_ushort_swap(s) -#endif /* WORDS_BIGENDIAN */ - - - -/* Function ptrs for ntdll calls */ -static HMODULE hntdll = 0; -static SIZE_T (WINAPI *pRtlCompareMemory)(LPCVOID,LPCVOID,SIZE_T); -static SIZE_T (WINAPI *pRtlCompareMemoryUlong)(PULONG, SIZE_T, ULONG); -static NTSTATUS (WINAPI *pRtlDeleteTimer)(HANDLE, HANDLE, HANDLE); -static VOID (WINAPI *pRtlMoveMemory)(LPVOID,LPCVOID,SIZE_T); -static VOID (WINAPI *pRtlFillMemory)(LPVOID,SIZE_T,BYTE); -static VOID (WINAPI *pRtlFillMemoryUlong)(LPVOID,SIZE_T,ULONG); -static VOID (WINAPI *pRtlZeroMemory)(LPVOID,SIZE_T); -static ULONGLONG (WINAPIV *pRtlUlonglongByteSwap)(ULONGLONG source); -static ULONG (WINAPI *pRtlUniform)(PULONG); -static ULONG (WINAPI *pRtlRandom)(PULONG); -static BOOLEAN (WINAPI *pRtlAreAllAccessesGranted)(ACCESS_MASK, ACCESS_MASK); -static BOOLEAN (WINAPI *pRtlAreAnyAccessesGranted)(ACCESS_MASK, ACCESS_MASK); -static DWORD (WINAPI *pRtlComputeCrc32)(DWORD,const BYTE*,INT); -static void (WINAPI * pRtlInitializeHandleTable)(ULONG, ULONG, RTL_HANDLE_TABLE *); -static BOOLEAN (WINAPI * pRtlIsValidIndexHandle)(const RTL_HANDLE_TABLE *, ULONG, RTL_HANDLE **); -static NTSTATUS (WINAPI * pRtlDestroyHandleTable)(RTL_HANDLE_TABLE *); -static RTL_HANDLE * (WINAPI * pRtlAllocateHandle)(RTL_HANDLE_TABLE *, ULONG *); -static BOOLEAN (WINAPI * pRtlFreeHandle)(RTL_HANDLE_TABLE *, RTL_HANDLE *); -static NTSTATUS (WINAPI *pRtlAllocateAndInitializeSid)(PSID_IDENTIFIER_AUTHORITY,BYTE,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,PSID*); -static NTSTATUS (WINAPI *pRtlFreeSid)(PSID); -static struct _TEB * (WINAPI *pNtCurrentTeb)(void); -static DWORD (WINAPI *pRtlGetThreadErrorMode)(void); -static NTSTATUS (WINAPI *pRtlSetThreadErrorMode)(DWORD, LPDWORD); -static IMAGE_BASE_RELOCATION *(WINAPI *pLdrProcessRelocationBlock)(void*,UINT,USHORT*,INT_PTR); -static CHAR * (WINAPI *pRtlIpv4AddressToStringA)(const IN_ADDR *, LPSTR); -static NTSTATUS (WINAPI *pRtlIpv4AddressToStringExA)(const IN_ADDR *, USHORT, LPSTR, PULONG); - -static HMODULE hkernel32 = 0; -static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL); - - -#define LEN 16 -static const char* src_src = "This is a test!"; /* 16 bytes long, incl NUL */ -static ULONG src_aligned_block[4]; -static ULONG dest_aligned_block[32]; -static const char *src = (const char*)src_aligned_block; -static char* dest = (char*)dest_aligned_block; - -static void InitFunctionPtrs(void) -{ - hntdll = LoadLibraryA("ntdll.dll"); - ok(hntdll != 0, "LoadLibrary failed\n"); - if (hntdll) { - pRtlCompareMemory = (void *)GetProcAddress(hntdll, "RtlCompareMemory"); - pRtlCompareMemoryUlong = (void *)GetProcAddress(hntdll, "RtlCompareMemoryUlong"); - pRtlDeleteTimer = (void *)GetProcAddress(hntdll, "RtlDeleteTimer"); - pRtlMoveMemory = (void *)GetProcAddress(hntdll, "RtlMoveMemory"); - pRtlFillMemory = (void *)GetProcAddress(hntdll, "RtlFillMemory"); - pRtlFillMemoryUlong = (void *)GetProcAddress(hntdll, "RtlFillMemoryUlong"); - pRtlZeroMemory = (void *)GetProcAddress(hntdll, "RtlZeroMemory"); - pRtlUlonglongByteSwap = (void *)GetProcAddress(hntdll, "RtlUlonglongByteSwap"); - pRtlUniform = (void *)GetProcAddress(hntdll, "RtlUniform"); - pRtlRandom = (void *)GetProcAddress(hntdll, "RtlRandom"); - pRtlAreAllAccessesGranted = (void *)GetProcAddress(hntdll, "RtlAreAllAccessesGranted"); - pRtlAreAnyAccessesGranted = (void *)GetProcAddress(hntdll, "RtlAreAnyAccessesGranted"); - pRtlComputeCrc32 = (void *)GetProcAddress(hntdll, "RtlComputeCrc32"); - pRtlInitializeHandleTable = (void *)GetProcAddress(hntdll, "RtlInitializeHandleTable"); - pRtlIsValidIndexHandle = (void *)GetProcAddress(hntdll, "RtlIsValidIndexHandle"); - pRtlDestroyHandleTable = (void *)GetProcAddress(hntdll, "RtlDestroyHandleTable"); - pRtlAllocateHandle = (void *)GetProcAddress(hntdll, "RtlAllocateHandle"); - pRtlFreeHandle = (void *)GetProcAddress(hntdll, "RtlFreeHandle"); - pRtlAllocateAndInitializeSid = (void *)GetProcAddress(hntdll, "RtlAllocateAndInitializeSid"); - pRtlFreeSid = (void *)GetProcAddress(hntdll, "RtlFreeSid"); - pNtCurrentTeb = (void *)GetProcAddress(hntdll, "NtCurrentTeb"); - pRtlGetThreadErrorMode = (void *)GetProcAddress(hntdll, "RtlGetThreadErrorMode"); - pRtlSetThreadErrorMode = (void *)GetProcAddress(hntdll, "RtlSetThreadErrorMode"); - pLdrProcessRelocationBlock = (void *)GetProcAddress(hntdll, "LdrProcessRelocationBlock"); - pRtlIpv4AddressToStringA = (void *)GetProcAddress(hntdll, "RtlIpv4AddressToStringA"); - pRtlIpv4AddressToStringExA = (void *)GetProcAddress(hntdll, "RtlIpv4AddressToStringExA"); - } - hkernel32 = LoadLibraryA("kernel32.dll"); - ok(hkernel32 != 0, "LoadLibrary failed\n"); - if (hkernel32) { - pIsWow64Process = (void *)GetProcAddress(hkernel32, "IsWow64Process"); - } - strcpy((char*)src_aligned_block, src_src); - ok(strlen(src) == 15, "Source must be 16 bytes long!\n"); -} - -#define COMP(str1,str2,cmplen,len) size = pRtlCompareMemory(str1, str2, cmplen); \ - ok(size == len, "Expected %ld, got %ld\n", size, (SIZE_T)len) - -static void test_RtlCompareMemory(void) -{ - SIZE_T size; - - if (!pRtlCompareMemory) - { - win_skip("RtlCompareMemory is not available\n"); - return; - } - - strcpy(dest, src); - - COMP(src,src,0,0); - COMP(src,src,LEN,LEN); - dest[0] = 'x'; - COMP(src,dest,LEN,0); -} - -static void test_RtlCompareMemoryUlong(void) -{ - ULONG a[10]; - ULONG result; - - if (!pRtlCompareMemoryUlong) - { - win_skip("RtlCompareMemoryUlong is not available\n"); - return; - } - - a[0]= 0x0123; - a[1]= 0x4567; - a[2]= 0x89ab; - a[3]= 0xcdef; - result = pRtlCompareMemoryUlong(a, 0, 0x0123); - ok(result == 0, "RtlCompareMemoryUlong(%p, 0, 0x0123) returns %u, expected 0\n", a, result); - result = pRtlCompareMemoryUlong(a, 3, 0x0123); - ok(result == 0, "RtlCompareMemoryUlong(%p, 3, 0x0123) returns %u, expected 0\n", a, result); - result = pRtlCompareMemoryUlong(a, 4, 0x0123); - ok(result == 4, "RtlCompareMemoryUlong(%p, 4, 0x0123) returns %u, expected 4\n", a, result); - result = pRtlCompareMemoryUlong(a, 5, 0x0123); - ok(result == 4, "RtlCompareMemoryUlong(%p, 5, 0x0123) returns %u, expected 4\n", a, result); - result = pRtlCompareMemoryUlong(a, 7, 0x0123); - ok(result == 4, "RtlCompareMemoryUlong(%p, 7, 0x0123) returns %u, expected 4\n", a, result); - result = pRtlCompareMemoryUlong(a, 8, 0x0123); - ok(result == 4, "RtlCompareMemoryUlong(%p, 8, 0x0123) returns %u, expected 4\n", a, result); - result = pRtlCompareMemoryUlong(a, 9, 0x0123); - ok(result == 4, "RtlCompareMemoryUlong(%p, 9, 0x0123) returns %u, expected 4\n", a, result); - result = pRtlCompareMemoryUlong(a, 4, 0x0127); - ok(result == 0, "RtlCompareMemoryUlong(%p, 4, 0x0127) returns %u, expected 0\n", a, result); - result = pRtlCompareMemoryUlong(a, 4, 0x7123); - ok(result == 0, "RtlCompareMemoryUlong(%p, 4, 0x7123) returns %u, expected 0\n", a, result); - result = pRtlCompareMemoryUlong(a, 16, 0x4567); - ok(result == 0, "RtlCompareMemoryUlong(%p, 16, 0x4567) returns %u, expected 0\n", a, result); - - a[1]= 0x0123; - result = pRtlCompareMemoryUlong(a, 3, 0x0123); - ok(result == 0, "RtlCompareMemoryUlong(%p, 3, 0x0123) returns %u, expected 0\n", a, result); - result = pRtlCompareMemoryUlong(a, 4, 0x0123); - ok(result == 4, "RtlCompareMemoryUlong(%p, 4, 0x0123) returns %u, expected 4\n", a, result); - result = pRtlCompareMemoryUlong(a, 5, 0x0123); - ok(result == 4, "RtlCompareMemoryUlong(%p, 5, 0x0123) returns %u, expected 4\n", a, result); - result = pRtlCompareMemoryUlong(a, 7, 0x0123); - ok(result == 4, "RtlCompareMemoryUlong(%p, 7, 0x0123) returns %u, expected 4\n", a, result); - result = pRtlCompareMemoryUlong(a, 8, 0x0123); - ok(result == 8, "RtlCompareMemoryUlong(%p, 8, 0x0123) returns %u, expected 8\n", a, result); - result = pRtlCompareMemoryUlong(a, 9, 0x0123); - ok(result == 8, "RtlCompareMemoryUlong(%p, 9, 0x0123) returns %u, expected 8\n", a, result); -} - -#define COPY(len) memset(dest,0,sizeof(dest_aligned_block)); pRtlMoveMemory(dest, src, len) -#define CMP(str) ok(strcmp(dest,str) == 0, "Expected '%s', got '%s'\n", str, dest) - -static void test_RtlMoveMemory(void) -{ - if (!pRtlMoveMemory) - { - win_skip("RtlMoveMemory is not available\n"); - return; - } - - /* Length should be in bytes and not rounded. Use strcmp to ensure we - * didn't write past the end (it checks for the final NUL left by memset) - */ - COPY(0); CMP(""); - COPY(1); CMP("T"); - COPY(2); CMP("Th"); - COPY(3); CMP("Thi"); - COPY(4); CMP("This"); - COPY(5); CMP("This "); - COPY(6); CMP("This i"); - COPY(7); CMP("This is"); - COPY(8); CMP("This is "); - COPY(9); CMP("This is a"); - - /* Overlapping */ - strcpy(dest, src); pRtlMoveMemory(dest, dest + 1, strlen(src) - 1); - CMP("his is a test!!"); - strcpy(dest, src); pRtlMoveMemory(dest + 1, dest, strlen(src)); - CMP("TThis is a test!"); -} - -#define FILL(len) memset(dest,0,sizeof(dest_aligned_block)); strcpy(dest, src); pRtlFillMemory(dest,len,'x') - -static void test_RtlFillMemory(void) -{ - if (!pRtlFillMemory) - { - win_skip("RtlFillMemory is not available\n"); - return; - } - - /* Length should be in bytes and not rounded. Use strcmp to ensure we - * didn't write past the end (the remainder of the string should match) - */ - FILL(0); CMP("This is a test!"); - FILL(1); CMP("xhis is a test!"); - FILL(2); CMP("xxis is a test!"); - FILL(3); CMP("xxxs is a test!"); - FILL(4); CMP("xxxx is a test!"); - FILL(5); CMP("xxxxxis a test!"); - FILL(6); CMP("xxxxxxs a test!"); - FILL(7); CMP("xxxxxxx a test!"); - FILL(8); CMP("xxxxxxxxa test!"); - FILL(9); CMP("xxxxxxxxx test!"); -} - -#define LFILL(len) memset(dest,0,sizeof(dest_aligned_block)); strcpy(dest, src); pRtlFillMemoryUlong(dest,len,val) - -static void test_RtlFillMemoryUlong(void) -{ - ULONG val = ('x' << 24) | ('x' << 16) | ('x' << 8) | 'x'; - if (!pRtlFillMemoryUlong) - { - win_skip("RtlFillMemoryUlong is not available\n"); - return; - } - - /* Length should be in bytes and not rounded. Use strcmp to ensure we - * didn't write past the end (the remainder of the string should match) - */ - LFILL(0); CMP("This is a test!"); - LFILL(1); CMP("This is a test!"); - LFILL(2); CMP("This is a test!"); - LFILL(3); CMP("This is a test!"); - LFILL(4); CMP("xxxx is a test!"); - LFILL(5); CMP("xxxx is a test!"); - LFILL(6); CMP("xxxx is a test!"); - LFILL(7); CMP("xxxx is a test!"); - LFILL(8); CMP("xxxxxxxxa test!"); - LFILL(9); CMP("xxxxxxxxa test!"); -} - -#define ZERO(len) memset(dest,0,sizeof(dest_aligned_block)); strcpy(dest, src); pRtlZeroMemory(dest,len) -#define MCMP(str) ok(memcmp(dest,str,LEN) == 0, "Memcmp failed\n") - -static void test_RtlZeroMemory(void) -{ - if (!pRtlZeroMemory) - { - win_skip("RtlZeroMemory is not available\n"); - return; - } - - /* Length should be in bytes and not rounded. */ - ZERO(0); MCMP("This is a test!"); - ZERO(1); MCMP("\0his is a test!"); - ZERO(2); MCMP("\0\0is is a test!"); - ZERO(3); MCMP("\0\0\0s is a test!"); - ZERO(4); MCMP("\0\0\0\0 is a test!"); - ZERO(5); MCMP("\0\0\0\0\0is a test!"); - ZERO(6); MCMP("\0\0\0\0\0\0s a test!"); - ZERO(7); MCMP("\0\0\0\0\0\0\0 a test!"); - ZERO(8); MCMP("\0\0\0\0\0\0\0\0a test!"); - ZERO(9); MCMP("\0\0\0\0\0\0\0\0\0 test!"); -} - -static void test_RtlUlonglongByteSwap(void) -{ - ULONGLONG result; - - if ( !pRtlUlonglongByteSwap ) - { - win_skip("RtlUlonglongByteSwap is not available\n"); - return; - } - - if ( pRtlUlonglongByteSwap( 0 ) != 0 ) - { - win_skip("Broken RtlUlonglongByteSwap in win2k\n"); - return; - } - - result = pRtlUlonglongByteSwap( ((ULONGLONG)0x76543210 << 32) | 0x87654321 ); - ok( (((ULONGLONG)0x21436587 << 32) | 0x10325476) == result, - "RtlUlonglongByteSwap(0x7654321087654321) returns 0x%x%08x, expected 0x2143658710325476\n", - (DWORD)(result >> 32), (DWORD)result); -} - - -static void test_RtlUniform(void) -{ - ULONGLONG num; - ULONG seed; - ULONG seed_bak; - ULONG expected; - ULONG result; - - if (!pRtlUniform) - { - win_skip("RtlUniform is not available\n"); - return; - } - -/* - * According to the documentation RtlUniform is using D.H. Lehmer's 1948 - * algorithm. This algorithm is: - * - * seed = (seed * const_1 + const_2) % const_3; - * - * According to the documentation the random number is distributed over - * [0..MAXLONG]. Therefore const_3 is MAXLONG + 1: - * - * seed = (seed * const_1 + const_2) % (MAXLONG + 1); - * - * Because MAXLONG is 0x7fffffff (and MAXLONG + 1 is 0x80000000) the - * algorithm can be expressed without division as: - * - * seed = (seed * const_1 + const_2) & MAXLONG; - * - * To find out const_2 we just call RtlUniform with seed set to 0: - */ - seed = 0; - expected = 0x7fffffc3; - result = pRtlUniform(&seed); - ok(result == expected, - "RtlUniform(&seed (seed == 0)) returns %x, expected %x\n", - result, expected); -/* - * The algorithm is now: - * - * seed = (seed * const_1 + 0x7fffffc3) & MAXLONG; - * - * To find out const_1 we can use: - * - * const_1 = RtlUniform(1) - 0x7fffffc3; - * - * If that does not work a search loop can try all possible values of - * const_1 and compare to the result to RtlUniform(1). - * This way we find out that const_1 is 0xffffffed. - * - * For seed = 1 the const_2 is 0x7fffffc4: - */ - seed = 1; - expected = seed * 0xffffffed + 0x7fffffc3 + 1; - result = pRtlUniform(&seed); - ok(result == expected, - "RtlUniform(&seed (seed == 1)) returns %x, expected %x\n", - result, expected); -/* - * For seed = 2 the const_2 is 0x7fffffc3: - */ - seed = 2; - expected = seed * 0xffffffed + 0x7fffffc3; - result = pRtlUniform(&seed); - -/* - * Windows Vista uses different algorithms, so skip the rest of the tests - * until that is figured out. Trace output for the failures is about 10.5 MB! - */ - - if (result == 0x7fffff9f) { - skip("Most likely running on Windows Vista which uses a different algorithm\n"); - return; - } - - ok(result == expected, - "RtlUniform(&seed (seed == 2)) returns %x, expected %x\n", - result, expected); - -/* - * More tests show that if seed is odd the result must be incremented by 1: - */ - seed = 3; - expected = seed * 0xffffffed + 0x7fffffc3 + (seed & 1); - result = pRtlUniform(&seed); - ok(result == expected, - "RtlUniform(&seed (seed == 3)) returns %x, expected %x\n", - result, expected); - - seed = 0x6bca1aa; - expected = seed * 0xffffffed + 0x7fffffc3; - result = pRtlUniform(&seed); - ok(result == expected, - "RtlUniform(&seed (seed == 0x6bca1aa)) returns %x, expected %x\n", - result, expected); - - seed = 0x6bca1ab; - expected = seed * 0xffffffed + 0x7fffffc3 + 1; - result = pRtlUniform(&seed); - ok(result == expected, - "RtlUniform(&seed (seed == 0x6bca1ab)) returns %x, expected %x\n", - result, expected); -/* - * When seed is 0x6bca1ac there is an exception: - */ - seed = 0x6bca1ac; - expected = seed * 0xffffffed + 0x7fffffc3 + 2; - result = pRtlUniform(&seed); - ok(result == expected, - "RtlUniform(&seed (seed == 0x6bca1ac)) returns %x, expected %x\n", - result, expected); -/* - * Note that up to here const_3 is not used - * (the highest bit of the result is not set). - * - * Starting with 0x6bca1ad: If seed is even the result must be incremented by 1: - */ - seed = 0x6bca1ad; - expected = (seed * 0xffffffed + 0x7fffffc3) & MAXLONG; - result = pRtlUniform(&seed); - ok(result == expected, - "RtlUniform(&seed (seed == 0x6bca1ad)) returns %x, expected %x\n", - result, expected); - - seed = 0x6bca1ae; - expected = (seed * 0xffffffed + 0x7fffffc3 + 1) & MAXLONG; - result = pRtlUniform(&seed); - ok(result == expected, - "RtlUniform(&seed (seed == 0x6bca1ae)) returns %x, expected %x\n", - result, expected); -/* - * There are several ranges where for odd or even seed the result must be - * incremented by 1. You can see this ranges in the following test. - * - * For a full test use one of the following loop heads: - * - * for (num = 0; num <= 0xffffffff; num++) { - * seed = num; - * ... - * - * seed = 0; - * for (num = 0; num <= 0xffffffff; num++) { - * ... - */ - seed = 0; - for (num = 0; num <= 100000; num++) { - - expected = seed * 0xffffffed + 0x7fffffc3; - if (seed < 0x6bca1ac) { - expected = expected + (seed & 1); - } else if (seed == 0x6bca1ac) { - expected = (expected + 2) & MAXLONG; - } else if (seed < 0xd79435c) { - expected = (expected + (~seed & 1)) & MAXLONG; - } else if (seed < 0x1435e50b) { - expected = expected + (seed & 1); - } else if (seed < 0x1af286ba) { - expected = (expected + (~seed & 1)) & MAXLONG; - } else if (seed < 0x21af2869) { - expected = expected + (seed & 1); - } else if (seed < 0x286bca18) { - expected = (expected + (~seed & 1)) & MAXLONG; - } else if (seed < 0x2f286bc7) { - expected = expected + (seed & 1); - } else if (seed < 0x35e50d77) { - expected = (expected + (~seed & 1)) & MAXLONG; - } else if (seed < 0x3ca1af26) { - expected = expected + (seed & 1); - } else if (seed < 0x435e50d5) { - expected = (expected + (~seed & 1)) & MAXLONG; - } else if (seed < 0x4a1af284) { - expected = expected + (seed & 1); - } else if (seed < 0x50d79433) { - expected = (expected + (~seed & 1)) & MAXLONG; - } else if (seed < 0x579435e2) { - expected = expected + (seed & 1); - } else if (seed < 0x5e50d792) { - expected = (expected + (~seed & 1)) & MAXLONG; - } else if (seed < 0x650d7941) { - expected = expected + (seed & 1); - } else if (seed < 0x6bca1af0) { - expected = (expected + (~seed & 1)) & MAXLONG; - } else if (seed < 0x7286bc9f) { - expected = expected + (seed & 1); - } else if (seed < 0x79435e4e) { - expected = (expected + (~seed & 1)) & MAXLONG; - } else if (seed < 0x7ffffffd) { - expected = expected + (seed & 1); - } else if (seed < 0x86bca1ac) { - expected = (expected + (~seed & 1)) & MAXLONG; - } else if (seed == 0x86bca1ac) { - expected = (expected + 1) & MAXLONG; - } else if (seed < 0x8d79435c) { - expected = expected + (seed & 1); - } else if (seed < 0x9435e50b) { - expected = (expected + (~seed & 1)) & MAXLONG; - } else if (seed < 0x9af286ba) { - expected = expected + (seed & 1); - } else if (seed < 0xa1af2869) { - expected = (expected + (~seed & 1)) & MAXLONG; - } else if (seed < 0xa86bca18) { - expected = expected + (seed & 1); - } else if (seed < 0xaf286bc7) { - expected = (expected + (~seed & 1)) & MAXLONG; - } else if (seed == 0xaf286bc7) { - expected = (expected + 2) & MAXLONG; - } else if (seed < 0xb5e50d77) { - expected = expected + (seed & 1); - } else if (seed < 0xbca1af26) { - expected = (expected + (~seed & 1)) & MAXLONG; - } else if (seed < 0xc35e50d5) { - expected = expected + (seed & 1); - } else if (seed < 0xca1af284) { - expected = (expected + (~seed & 1)) & MAXLONG; - } else if (seed < 0xd0d79433) { - expected = expected + (seed & 1); - } else if (seed < 0xd79435e2) { - expected = (expected + (~seed & 1)) & MAXLONG; - } else if (seed < 0xde50d792) { - expected = expected + (seed & 1); - } else if (seed < 0xe50d7941) { - expected = (expected + (~seed & 1)) & MAXLONG; - } else if (seed < 0xebca1af0) { - expected = expected + (seed & 1); - } else if (seed < 0xf286bc9f) { - expected = (expected + (~seed & 1)) & MAXLONG; - } else if (seed < 0xf9435e4e) { - expected = expected + (seed & 1); - } else if (seed < 0xfffffffd) { - expected = (expected + (~seed & 1)) & MAXLONG; - } else { - expected = expected + (seed & 1); - } /* if */ - seed_bak = seed; - result = pRtlUniform(&seed); - ok(result == expected, - "test: 0x%x%08x RtlUniform(&seed (seed == %x)) returns %x, expected %x\n", - (DWORD)(num >> 32), (DWORD)num, seed_bak, result, expected); - ok(seed == expected, - "test: 0x%x%08x RtlUniform(&seed (seed == %x)) sets seed to %x, expected %x\n", - (DWORD)(num >> 32), (DWORD)num, seed_bak, result, expected); - } /* for */ -/* - * Further investigation shows: In the different regions the highest bit - * is set or cleared when even or odd seeds need an increment by 1. - * This leads to a simplified algorithm: - * - * seed = seed * 0xffffffed + 0x7fffffc3; - * if (seed == 0xffffffff || seed == 0x7ffffffe) { - * seed = (seed + 2) & MAXLONG; - * } else if (seed == 0x7fffffff) { - * seed = 0; - * } else if ((seed & 0x80000000) == 0) { - * seed = seed + (~seed & 1); - * } else { - * seed = (seed + (seed & 1)) & MAXLONG; - * } - * - * This is also the algorithm used for RtlUniform of wine (see dlls/ntdll/rtl.c). - * - * Now comes the funny part: - * It took me one weekend, to find the complicated algorithm and one day more, - * to find the simplified algorithm. Several weeks later I found out: The value - * MAXLONG (=0x7fffffff) is never returned, neither with the native function - * nor with the simplified algorithm. In reality the native function and our - * function return a random number distributed over [0..MAXLONG-1]. Note - * that this is different from what native documentation states [0..MAXLONG]. - * Expressed with D.H. Lehmer's 1948 algorithm it looks like: - * - * seed = (seed * const_1 + const_2) % MAXLONG; - * - * Further investigations show that the real algorithm is: - * - * seed = (seed * 0x7fffffed + 0x7fffffc3) % MAXLONG; - * - * This is checked with the test below: - */ - seed = 0; - for (num = 0; num <= 100000; num++) { - expected = (seed * 0x7fffffed + 0x7fffffc3) % 0x7fffffff; - seed_bak = seed; - result = pRtlUniform(&seed); - ok(result == expected, - "test: 0x%x%08x RtlUniform(&seed (seed == %x)) returns %x, expected %x\n", - (DWORD)(num >> 32), (DWORD)num, seed_bak, result, expected); - ok(seed == expected, - "test: 0x%x%08x RtlUniform(&seed (seed == %x)) sets seed to %x, expected %x\n", - (DWORD)(num >> 32), (DWORD)num, seed_bak, result, expected); - } /* for */ -/* - * More tests show that RtlUniform does not return 0x7ffffffd for seed values - * in the range [0..MAXLONG-1]. Additionally 2 is returned twice. This shows - * that there is more than one cycle of generated randon numbers ... - */ -} - - -static ULONG my_RtlRandom(PULONG seed) -{ - static ULONG saved_value[128] = - { /* 0 */ 0x4c8bc0aa, 0x4c022957, 0x2232827a, 0x2f1e7626, 0x7f8bdafb, 0x5c37d02a, 0x0ab48f72, 0x2f0c4ffa, - /* 8 */ 0x290e1954, 0x6b635f23, 0x5d3885c0, 0x74b49ff8, 0x5155fa54, 0x6214ad3f, 0x111e9c29, 0x242a3a09, - /* 16 */ 0x75932ae1, 0x40ac432e, 0x54f7ba7a, 0x585ccbd5, 0x6df5c727, 0x0374dad1, 0x7112b3f1, 0x735fc311, - /* 24 */ 0x404331a9, 0x74d97781, 0x64495118, 0x323e04be, 0x5974b425, 0x4862e393, 0x62389c1d, 0x28a68b82, - /* 32 */ 0x0f95da37, 0x7a50bbc6, 0x09b0091c, 0x22cdb7b4, 0x4faaed26, 0x66417ccd, 0x189e4bfa, 0x1ce4e8dd, - /* 40 */ 0x5274c742, 0x3bdcf4dc, 0x2d94e907, 0x32eac016, 0x26d33ca3, 0x60415a8a, 0x31f57880, 0x68c8aa52, - /* 48 */ 0x23eb16da, 0x6204f4a1, 0x373927c1, 0x0d24eb7c, 0x06dd7379, 0x2b3be507, 0x0f9c55b1, 0x2c7925eb, - /* 56 */ 0x36d67c9a, 0x42f831d9, 0x5e3961cb, 0x65d637a8, 0x24bb3820, 0x4d08e33d, 0x2188754f, 0x147e409e, - /* 64 */ 0x6a9620a0, 0x62e26657, 0x7bd8ce81, 0x11da0abb, 0x5f9e7b50, 0x23e444b6, 0x25920c78, 0x5fc894f0, - /* 72 */ 0x5e338cbb, 0x404237fd, 0x1d60f80f, 0x320a1743, 0x76013d2b, 0x070294ee, 0x695e243b, 0x56b177fd, - /* 80 */ 0x752492e1, 0x6decd52f, 0x125f5219, 0x139d2e78, 0x1898d11e, 0x2f7ee785, 0x4db405d8, 0x1a028a35, - /* 88 */ 0x63f6f323, 0x1f6d0078, 0x307cfd67, 0x3f32a78a, 0x6980796c, 0x462b3d83, 0x34b639f2, 0x53fce379, - /* 96 */ 0x74ba50f4, 0x1abc2c4b, 0x5eeaeb8d, 0x335a7a0d, 0x3973dd20, 0x0462d66b, 0x159813ff, 0x1e4643fd, - /* 104 */ 0x06bc5c62, 0x3115e3fc, 0x09101613, 0x47af2515, 0x4f11ec54, 0x78b99911, 0x3db8dd44, 0x1ec10b9b, - /* 112 */ 0x5b5506ca, 0x773ce092, 0x567be81a, 0x5475b975, 0x7a2cde1a, 0x494536f5, 0x34737bb4, 0x76d9750b, - /* 120 */ 0x2a1f6232, 0x2e49644d, 0x7dddcbe7, 0x500cebdb, 0x619dab9e, 0x48c626fe, 0x1cda3193, 0x52dabe9d }; - ULONG rand; - int pos; - ULONG result; - - rand = (*seed * 0x7fffffed + 0x7fffffc3) % 0x7fffffff; - *seed = (rand * 0x7fffffed + 0x7fffffc3) % 0x7fffffff; - pos = *seed & 0x7f; - result = saved_value[pos]; - saved_value[pos] = rand; - return(result); -} - - -static void test_RtlRandom(void) -{ - ULONGLONG num; - ULONG seed; - ULONG seed_bak; - ULONG seed_expected; - ULONG result; - ULONG result_expected; - - if (!pRtlRandom) - { - win_skip("RtlRandom is not available\n"); - return; - } - -/* - * Unlike RtlUniform, RtlRandom is not documented. We guess that for - * RtlRandom D.H. Lehmer's 1948 algorithm is used like stated in - * the documentation of the RtlUniform function. This algorithm is: - * - * seed = (seed * const_1 + const_2) % const_3; - * - * According to the RtlUniform documentation the random number is - * distributed over [0..MAXLONG], but in reality it is distributed - * over [0..MAXLONG-1]. Therefore const_3 might be MAXLONG + 1 or - * MAXLONG: - * - * seed = (seed * const_1 + const_2) % (MAXLONG + 1); - * - * or - * - * seed = (seed * const_1 + const_2) % MAXLONG; - * - * To find out const_2 we just call RtlRandom with seed set to 0: - */ - seed = 0; - result_expected = 0x320a1743; - seed_expected =0x44b; - result = pRtlRandom(&seed); - -/* - * Windows Vista uses different algorithms, so skip the rest of the tests - * until that is figured out. Trace output for the failures is about 10.5 MB! - */ - - if (seed == 0x3fc) { - skip("Most likely running on Windows Vista which uses a different algorithm\n"); - return; - } - - ok(result == result_expected, - "pRtlRandom(&seed (seed == 0)) returns %x, expected %x\n", - result, result_expected); - ok(seed == seed_expected, - "pRtlRandom(&seed (seed == 0)) sets seed to %x, expected %x\n", - seed, seed_expected); -/* - * Seed is not equal to result as with RtlUniform. To see more we - * call RtlRandom again with seed set to 0: - */ - seed = 0; - result_expected = 0x7fffffc3; - seed_expected =0x44b; - result = pRtlRandom(&seed); - ok(result == result_expected, - "RtlRandom(&seed (seed == 0)) returns %x, expected %x\n", - result, result_expected); - ok(seed == seed_expected, - "RtlRandom(&seed (seed == 0)) sets seed to %x, expected %x\n", - seed, seed_expected); -/* - * Seed is set to the same value as before but the result is different. - * To see more we call RtlRandom again with seed set to 0: - */ - seed = 0; - result_expected = 0x7fffffc3; - seed_expected =0x44b; - result = pRtlRandom(&seed); - ok(result == result_expected, - "RtlRandom(&seed (seed == 0)) returns %x, expected %x\n", - result, result_expected); - ok(seed == seed_expected, - "RtlRandom(&seed (seed == 0)) sets seed to %x, expected %x\n", - seed, seed_expected); -/* - * Seed is again set to the same value as before. This time we also - * have the same result as before. Interestingly the value of the - * result is 0x7fffffc3 which is the same value used in RtlUniform - * as const_2. If we do - * - * seed = 0; - * result = RtlUniform(&seed); - * - * we get the same result (0x7fffffc3) as with - * - * seed = 0; - * RtlRandom(&seed); - * seed = 0; - * result = RtlRandom(&seed); - * - * And there is another interesting thing. If we do - * - * seed = 0; - * RtlUniform(&seed); - * RtlUniform(&seed); - * - * seed is set to the value 0x44b which ist the same value that - * - * seed = 0; - * RtlRandom(&seed); - * - * assigns to seed. Putting these two findings together leads to - * the conclusion that RtlRandom saves the value in some variable, - * like in the following algorithm: - * - * result = saved_value; - * saved_value = RtlUniform(&seed); - * RtlUniform(&seed); - * return(result); - * - * Now we do further tests with seed set to 1: - */ - seed = 1; - result_expected = 0x7a50bbc6; - seed_expected =0x5a1; - result = pRtlRandom(&seed); - ok(result == result_expected, - "RtlRandom(&seed (seed == 1)) returns %x, expected %x\n", - result, result_expected); - ok(seed == seed_expected, - "RtlRandom(&seed (seed == 1)) sets seed to %x, expected %x\n", - seed, seed_expected); -/* - * If there is just one saved_value the result now would be - * 0x7fffffc3. From this test we can see that there is more than - * one saved_value, like with this algorithm: - * - * result = saved_value[pos]; - * saved_value[pos] = RtlUniform(&seed); - * RtlUniform(&seed); - * return(result); - * - * But how is the value of pos determined? The calls to RtlUniform - * create a sequence of random numbers. Every second random number - * is put into the saved_value array and is used in some later call - * of RtlRandom as result. The only reasonable source to determine - * pos are the random numbers generated by RtlUniform which are not - * put into the saved_value array. This are the values of seed - * between the two calls of RtlUniform as in this algorithm: - * - * rand = RtlUniform(&seed); - * RtlUniform(&seed); - * pos = position(seed); - * result = saved_value[pos]; - * saved_value[pos] = rand; - * return(result); - * - * What remains to be determined is: The size of the saved_value array, - * the initial values of the saved_value array and the function - * position(seed). These tests are not shown here. - * The result of these tests is: The size of the saved_value array - * is 128, the initial values can be seen in the my_RtlRandom - * function and the position(seed) function is (seed & 0x7f). - * - * For a full test of RtlRandom use one of the following loop heads: - * - * for (num = 0; num <= 0xffffffff; num++) { - * seed = num; - * ... - * - * seed = 0; - * for (num = 0; num <= 0xffffffff; num++) { - * ... - */ - seed = 0; - for (num = 0; num <= 100000; num++) { - seed_bak = seed; - seed_expected = seed; - result_expected = my_RtlRandom(&seed_expected); - /* The following corrections are necessary because the */ - /* previous tests changed the saved_value array */ - if (num == 0) { - result_expected = 0x7fffffc3; - } else if (num == 81) { - result_expected = 0x7fffffb1; - } /* if */ - result = pRtlRandom(&seed); - ok(result == result_expected, - "test: 0x%x%08x RtlUniform(&seed (seed == %x)) returns %x, expected %x\n", - (DWORD)(num >> 32), (DWORD)num, seed_bak, result, result_expected); - ok(seed == seed_expected, - "test: 0x%x%08x RtlUniform(&seed (seed == %x)) sets seed to %x, expected %x\n", - (DWORD)(num >> 32), (DWORD)num, seed_bak, result, seed_expected); - } /* for */ -} - - -typedef struct { - ACCESS_MASK GrantedAccess; - ACCESS_MASK DesiredAccess; - BOOLEAN result; -} all_accesses_t; - -static const all_accesses_t all_accesses[] = { - {0xFEDCBA76, 0xFEDCBA76, 1}, - {0x00000000, 0xFEDCBA76, 0}, - {0xFEDCBA76, 0x00000000, 1}, - {0x00000000, 0x00000000, 1}, - {0xFEDCBA76, 0xFEDCBA70, 1}, - {0xFEDCBA70, 0xFEDCBA76, 0}, - {0xFEDCBA76, 0xFEDC8A76, 1}, - {0xFEDC8A76, 0xFEDCBA76, 0}, - {0xFEDCBA76, 0xC8C4B242, 1}, - {0xC8C4B242, 0xFEDCBA76, 0}, -}; -#define NB_ALL_ACCESSES (sizeof(all_accesses)/sizeof(*all_accesses)) - - -static void test_RtlAreAllAccessesGranted(void) -{ - unsigned int test_num; - BOOLEAN result; - - if (!pRtlAreAllAccessesGranted) - { - win_skip("RtlAreAllAccessesGranted is not available\n"); - return; - } - - for (test_num = 0; test_num < NB_ALL_ACCESSES; test_num++) { - result = pRtlAreAllAccessesGranted(all_accesses[test_num].GrantedAccess, - all_accesses[test_num].DesiredAccess); - ok(all_accesses[test_num].result == result, - "(test %d): RtlAreAllAccessesGranted(%08x, %08x) returns %d, expected %d\n", - test_num, all_accesses[test_num].GrantedAccess, - all_accesses[test_num].DesiredAccess, - result, all_accesses[test_num].result); - } /* for */ -} - - -typedef struct { - ACCESS_MASK GrantedAccess; - ACCESS_MASK DesiredAccess; - BOOLEAN result; -} any_accesses_t; - -static const any_accesses_t any_accesses[] = { - {0xFEDCBA76, 0xFEDCBA76, 1}, - {0x00000000, 0xFEDCBA76, 0}, - {0xFEDCBA76, 0x00000000, 0}, - {0x00000000, 0x00000000, 0}, - {0xFEDCBA76, 0x01234589, 0}, - {0x00040000, 0xFEDCBA76, 1}, - {0x00040000, 0xFED8BA76, 0}, - {0xFEDCBA76, 0x00040000, 1}, - {0xFED8BA76, 0x00040000, 0}, -}; -#define NB_ANY_ACCESSES (sizeof(any_accesses)/sizeof(*any_accesses)) - - -static void test_RtlAreAnyAccessesGranted(void) -{ - unsigned int test_num; - BOOLEAN result; - - if (!pRtlAreAnyAccessesGranted) - { - win_skip("RtlAreAnyAccessesGranted is not available\n"); - return; - } - - for (test_num = 0; test_num < NB_ANY_ACCESSES; test_num++) { - result = pRtlAreAnyAccessesGranted(any_accesses[test_num].GrantedAccess, - any_accesses[test_num].DesiredAccess); - ok(any_accesses[test_num].result == result, - "(test %d): RtlAreAnyAccessesGranted(%08x, %08x) returns %d, expected %d\n", - test_num, any_accesses[test_num].GrantedAccess, - any_accesses[test_num].DesiredAccess, - result, any_accesses[test_num].result); - } /* for */ -} - -static void test_RtlComputeCrc32(void) -{ - DWORD crc = 0; - - if (!pRtlComputeCrc32) - { - win_skip("RtlComputeCrc32 is not available\n"); - return; - } - - crc = pRtlComputeCrc32(crc, (const BYTE *)src, LEN); - ok(crc == 0x40861dc2,"Expected 0x40861dc2, got %8x\n", crc); -} - - -typedef struct MY_HANDLE -{ - RTL_HANDLE RtlHandle; - void * MyValue; -} MY_HANDLE; - -static inline void RtlpMakeHandleAllocated(RTL_HANDLE * Handle) -{ - ULONG_PTR *AllocatedBit = (ULONG_PTR *)(&Handle->Next); - *AllocatedBit = *AllocatedBit | 1; -} - -static void test_HandleTables(void) -{ - BOOLEAN result; - NTSTATUS status; - ULONG Index; - MY_HANDLE * MyHandle; - RTL_HANDLE_TABLE HandleTable; - - if (!pRtlInitializeHandleTable) - { - win_skip("RtlInitializeHandleTable is not available\n"); - return; - } - - pRtlInitializeHandleTable(0x3FFF, sizeof(MY_HANDLE), &HandleTable); - MyHandle = (MY_HANDLE *)pRtlAllocateHandle(&HandleTable, &Index); - ok(MyHandle != NULL, "RtlAllocateHandle failed\n"); - RtlpMakeHandleAllocated(&MyHandle->RtlHandle); - MyHandle = NULL; - result = pRtlIsValidIndexHandle(&HandleTable, Index, (RTL_HANDLE **)&MyHandle); - ok(result, "Handle %p wasn't valid\n", MyHandle); - result = pRtlFreeHandle(&HandleTable, &MyHandle->RtlHandle); - ok(result, "Couldn't free handle %p\n", MyHandle); - status = pRtlDestroyHandleTable(&HandleTable); - ok(status == STATUS_SUCCESS, "RtlDestroyHandleTable failed with error 0x%08x\n", status); -} - -static void test_RtlAllocateAndInitializeSid(void) -{ - NTSTATUS ret; - SID_IDENTIFIER_AUTHORITY sia = {{ 1, 2, 3, 4, 5, 6 }}; - PSID psid; - - if (!pRtlAllocateAndInitializeSid) - { - win_skip("RtlAllocateAndInitializeSid is not available\n"); - return; - } - - ret = pRtlAllocateAndInitializeSid(&sia, 0, 1, 2, 3, 4, 5, 6, 7, 8, &psid); - ok(!ret, "RtlAllocateAndInitializeSid error %08x\n", ret); - ret = pRtlFreeSid(psid); - ok(!ret, "RtlFreeSid error %08x\n", ret); - - /* these tests crash on XP */ - if (0) - { - pRtlAllocateAndInitializeSid(NULL, 0, 1, 2, 3, 4, 5, 6, 7, 8, &psid); - pRtlAllocateAndInitializeSid(&sia, 0, 1, 2, 3, 4, 5, 6, 7, 8, NULL); - } - - ret = pRtlAllocateAndInitializeSid(&sia, 9, 1, 2, 3, 4, 5, 6, 7, 8, &psid); - ok(ret == STATUS_INVALID_SID, "wrong error %08x\n", ret); -} - -static void test_RtlDeleteTimer(void) -{ - NTSTATUS ret; - - if (!pRtlDeleteTimer) - { - win_skip("RtlDeleteTimer is not available\n"); - return; - } - - ret = pRtlDeleteTimer(NULL, NULL, NULL); - ok(ret == STATUS_INVALID_PARAMETER_1 || - ret == STATUS_INVALID_PARAMETER, /* W2K */ - "expected STATUS_INVALID_PARAMETER_1 or STATUS_INVALID_PARAMETER, got %x\n", ret); -} - -static void test_RtlThreadErrorMode(void) -{ - DWORD oldmode; - BOOL is_wow64; - DWORD mode; - NTSTATUS status; - - if (!pRtlGetThreadErrorMode || !pRtlSetThreadErrorMode) - { - win_skip("RtlGetThreadErrorMode and/or RtlSetThreadErrorMode not available\n"); - return; - } - - if (!pIsWow64Process || !pIsWow64Process(GetCurrentProcess(), &is_wow64)) - is_wow64 = FALSE; - - oldmode = pRtlGetThreadErrorMode(); - - status = pRtlSetThreadErrorMode(0x70, &mode); - ok(status == STATUS_SUCCESS || - status == STATUS_WAIT_1, /* Vista */ - "RtlSetThreadErrorMode failed with error 0x%08x\n", status); - ok(mode == oldmode, - "RtlSetThreadErrorMode returned mode 0x%x, expected 0x%x\n", - mode, oldmode); - ok(pRtlGetThreadErrorMode() == 0x70, - "RtlGetThreadErrorMode returned 0x%x, expected 0x%x\n", mode, 0x70); - if (!is_wow64 && pNtCurrentTeb) - ok(pNtCurrentTeb()->HardErrorDisabled == 0x70, - "The TEB contains 0x%x, expected 0x%x\n", - pNtCurrentTeb()->HardErrorDisabled, 0x70); - - status = pRtlSetThreadErrorMode(0, &mode); - ok(status == STATUS_SUCCESS || - status == STATUS_WAIT_1, /* Vista */ - "RtlSetThreadErrorMode failed with error 0x%08x\n", status); - ok(mode == 0x70, - "RtlSetThreadErrorMode returned mode 0x%x, expected 0x%x\n", - mode, 0x70); - ok(pRtlGetThreadErrorMode() == 0, - "RtlGetThreadErrorMode returned 0x%x, expected 0x%x\n", mode, 0); - if (!is_wow64 && pNtCurrentTeb) - ok(pNtCurrentTeb()->HardErrorDisabled == 0, - "The TEB contains 0x%x, expected 0x%x\n", - pNtCurrentTeb()->HardErrorDisabled, 0); - - for (mode = 1; mode; mode <<= 1) - { - status = pRtlSetThreadErrorMode(mode, NULL); - if (mode & 0x70) - ok(status == STATUS_SUCCESS || - status == STATUS_WAIT_1, /* Vista */ - "RtlSetThreadErrorMode(%x,NULL) failed with error 0x%08x\n", - mode, status); - else - ok(status == STATUS_INVALID_PARAMETER_1, - "RtlSetThreadErrorMode(%x,NULL) returns 0x%08x, " - "expected STATUS_INVALID_PARAMETER_1\n", - mode, status); - } - - pRtlSetThreadErrorMode(oldmode, NULL); -} - -static void test_LdrProcessRelocationBlock(void) -{ - IMAGE_BASE_RELOCATION *ret; - USHORT reloc; - DWORD addr32; - SHORT addr16; - - if(!pLdrProcessRelocationBlock) { - win_skip("LdrProcessRelocationBlock not available\n"); - return; - } - - addr32 = 0x50005; - reloc = IMAGE_REL_BASED_HIGHLOW<<12; - ret = pLdrProcessRelocationBlock(&addr32, 1, &reloc, 0x500050); - ok((USHORT*)ret == &reloc+1, "ret = %p, expected %p\n", ret, &reloc+1); - ok(addr32 == 0x550055, "addr32 = %x, expected 0x550055\n", addr32); - - addr16 = 0x505; - reloc = IMAGE_REL_BASED_HIGH<<12; - ret = pLdrProcessRelocationBlock(&addr16, 1, &reloc, 0x500060); - ok((USHORT*)ret == &reloc+1, "ret = %p, expected %p\n", ret, &reloc+1); - ok(addr16 == 0x555, "addr16 = %x, expected 0x555\n", addr16); - - addr16 = 0x505; - reloc = IMAGE_REL_BASED_LOW<<12; - ret = pLdrProcessRelocationBlock(&addr16, 1, &reloc, 0x500060); - ok((USHORT*)ret == &reloc+1, "ret = %p, expected %p\n", ret, &reloc+1); - ok(addr16 == 0x565, "addr16 = %x, expected 0x565\n", addr16); -} - -static void test_RtlIpv4AddressToString(void) -{ - CHAR buffer[20]; - CHAR *res; - IN_ADDR ip; - DWORD len; - - if (!pRtlIpv4AddressToStringA) - { - win_skip("RtlIpv4AddressToStringA not available\n"); - return; - } - - ip.S_un.S_un_b.s_b1 = 1; - ip.S_un.S_un_b.s_b2 = 2; - ip.S_un.S_un_b.s_b3 = 3; - ip.S_un.S_un_b.s_b4 = 4; - - memset(buffer, '#', sizeof(buffer) - 1); - buffer[sizeof(buffer) -1] = 0; - res = pRtlIpv4AddressToStringA(&ip, buffer); - len = strlen(buffer); - ok(res == (buffer + len), "got %p with '%s' (expected %p)\n", res, buffer, buffer + len); - - res = pRtlIpv4AddressToStringA(&ip, NULL); - ok( (res == (char *)~0) || - broken(res == (char *)0 + len), /* XP and w2003 */ - "got %p (expected ~0)\n", res); - - if (0) { - /* this crashes in windows */ - memset(buffer, '#', sizeof(buffer) - 1); - buffer[sizeof(buffer) -1] = 0; - res = pRtlIpv4AddressToStringA(NULL, buffer); - trace("got %p with '%s'\n", res, buffer); - } - - if (0) { - /* this crashes in windows */ - res = pRtlIpv4AddressToStringA(NULL, NULL); - trace("got %p\n", res); - } -} - -static void test_RtlIpv4AddressToStringEx(void) -{ - CHAR ip_1234[] = "1.2.3.4"; - CHAR ip_1234_80[] = "1.2.3.4:80"; - LPSTR expect; - CHAR buffer[30]; - NTSTATUS res; - IN_ADDR ip; - ULONG size; - DWORD used; - USHORT port; - - if (!pRtlIpv4AddressToStringExA) - { - win_skip("RtlIpv4AddressToStringExA not available\n"); - return; - } - - ip.S_un.S_un_b.s_b1 = 1; - ip.S_un.S_un_b.s_b2 = 2; - ip.S_un.S_un_b.s_b3 = 3; - ip.S_un.S_un_b.s_b4 = 4; - - port = htons(80); - expect = ip_1234_80; - - size = sizeof(buffer); - memset(buffer, '#', sizeof(buffer) - 1); - buffer[sizeof(buffer) -1] = 0; - res = pRtlIpv4AddressToStringExA(&ip, port, buffer, &size); - used = strlen(buffer); - ok( (res == STATUS_SUCCESS) && - (size == strlen(expect) + 1) && !strcmp(buffer, expect), - "got 0x%x and size %d with '%s'\n", res, size, buffer); - - size = used + 1; - memset(buffer, '#', sizeof(buffer) - 1); - buffer[sizeof(buffer) -1] = 0; - res = pRtlIpv4AddressToStringExA(&ip, port, buffer, &size); - ok( (res == STATUS_SUCCESS) && - (size == strlen(expect) + 1) && !strcmp(buffer, expect), - "got 0x%x and size %d with '%s'\n", res, size, buffer); - - size = used; - memset(buffer, '#', sizeof(buffer) - 1); - buffer[sizeof(buffer) -1] = 0; - res = pRtlIpv4AddressToStringExA(&ip, port, buffer, &size); - ok( (res == STATUS_INVALID_PARAMETER) && (size == used + 1), - "got 0x%x and %d with '%s' (expected STATUS_INVALID_PARAMETER and %d)\n", - res, size, buffer, used + 1); - - size = used - 1; - memset(buffer, '#', sizeof(buffer) - 1); - buffer[sizeof(buffer) -1] = 0; - res = pRtlIpv4AddressToStringExA(&ip, port, buffer, &size); - ok( (res == STATUS_INVALID_PARAMETER) && (size == used + 1), - "got 0x%x and %d with '%s' (expected STATUS_INVALID_PARAMETER and %d)\n", - res, size, buffer, used + 1); - - - /* to get only the ip, use 0 as port */ - port = 0; - expect = ip_1234; - - size = sizeof(buffer); - memset(buffer, '#', sizeof(buffer) - 1); - buffer[sizeof(buffer) -1] = 0; - res = pRtlIpv4AddressToStringExA(&ip, port, buffer, &size); - used = strlen(buffer); - ok( (res == STATUS_SUCCESS) && - (size == strlen(expect) + 1) && !strcmp(buffer, expect), - "got 0x%x and size %d with '%s'\n", res, size, buffer); - - size = used + 1; - memset(buffer, '#', sizeof(buffer) - 1); - buffer[sizeof(buffer) -1] = 0; - res = pRtlIpv4AddressToStringExA(&ip, port, buffer, &size); - ok( (res == STATUS_SUCCESS) && - (size == strlen(expect) + 1) && !strcmp(buffer, expect), - "got 0x%x and size %d with '%s'\n", res, size, buffer); - - size = used; - memset(buffer, '#', sizeof(buffer) - 1); - buffer[sizeof(buffer) -1] = 0; - res = pRtlIpv4AddressToStringExA(&ip, port, buffer, &size); - ok( (res == STATUS_INVALID_PARAMETER) && (size == used + 1), - "got 0x%x and %d with '%s' (expected STATUS_INVALID_PARAMETER and %d)\n", - res, size, buffer, used + 1); - - size = used - 1; - memset(buffer, '#', sizeof(buffer) - 1); - buffer[sizeof(buffer) -1] = 0; - res = pRtlIpv4AddressToStringExA(&ip, port, buffer, &size); - ok( (res == STATUS_INVALID_PARAMETER) && (size == used + 1), - "got 0x%x and %d with '%s' (expected STATUS_INVALID_PARAMETER and %d)\n", - res, size, buffer, used + 1); - - - /* parameters are checked */ - memset(buffer, '#', sizeof(buffer) - 1); - buffer[sizeof(buffer) -1] = 0; - res = pRtlIpv4AddressToStringExA(&ip, 0, buffer, NULL); - ok(res == STATUS_INVALID_PARAMETER, - "got 0x%x with '%s' (expected STATUS_INVALID_PARAMETER)\n", res, buffer); - - size = sizeof(buffer); - res = pRtlIpv4AddressToStringExA(&ip, 0, NULL, &size); - ok( res == STATUS_INVALID_PARAMETER, - "got 0x%x and size %d (expected STATUS_INVALID_PARAMETER)\n", res, size); - - size = sizeof(buffer); - memset(buffer, '#', sizeof(buffer) - 1); - buffer[sizeof(buffer) -1] = 0; - res = pRtlIpv4AddressToStringExA(NULL, 0, buffer, &size); - ok( res == STATUS_INVALID_PARAMETER, - "got 0x%x and size %d with '%s' (expected STATUS_INVALID_PARAMETER)\n", - res, size, buffer); -} - - -START_TEST(rtl) -{ - InitFunctionPtrs(); - - test_RtlCompareMemory(); - test_RtlCompareMemoryUlong(); - test_RtlMoveMemory(); - test_RtlFillMemory(); - test_RtlFillMemoryUlong(); - test_RtlZeroMemory(); - test_RtlUlonglongByteSwap(); - test_RtlUniform(); - test_RtlRandom(); - test_RtlAreAllAccessesGranted(); - test_RtlAreAnyAccessesGranted(); - test_RtlComputeCrc32(); - test_HandleTables(); - test_RtlAllocateAndInitializeSid(); - test_RtlDeleteTimer(); - test_RtlThreadErrorMode(); - test_LdrProcessRelocationBlock(); - test_RtlIpv4AddressToString(); - test_RtlIpv4AddressToStringEx(); -} diff --git a/rostests/winetests/ntdll/rtlbitmap.c b/rostests/winetests/ntdll/rtlbitmap.c deleted file mode 100755 index 4c1559b6012..00000000000 --- a/rostests/winetests/ntdll/rtlbitmap.c +++ /dev/null @@ -1,650 +0,0 @@ -/* Unit test suite for Rtl bitmap functions - * - * Copyright 2002 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 - * - * NOTES - * We use function pointers here as some of the bitmap functions exist only - * in later versions of ntdll. - */ - -#include "ntdll_test.h" - -#ifdef __WINE_WINTERNL_H - -/* Function ptrs for ordinal calls */ -static HMODULE hntdll = 0; -static VOID (WINAPI *pRtlInitializeBitMap)(PRTL_BITMAP,LPBYTE,ULONG); -static VOID (WINAPI *pRtlSetAllBits)(PRTL_BITMAP); -static VOID (WINAPI *pRtlClearAllBits)(PRTL_BITMAP); -static VOID (WINAPI *pRtlSetBits)(PRTL_BITMAP,ULONG,ULONG); -static VOID (WINAPI *pRtlClearBits)(PRTL_BITMAP,ULONG,ULONG); -static BOOLEAN (WINAPI *pRtlAreBitsSet)(PRTL_BITMAP,ULONG,ULONG); -static BOOLEAN (WINAPI *pRtlAreBitsClear)(PRTL_BITMAP,ULONG,ULONG); -static ULONG (WINAPI *pRtlFindSetBitsAndClear)(PRTL_BITMAP,ULONG,ULONG); -static ULONG (WINAPI *pRtlFindClearBitsAndSet)(PRTL_BITMAP,ULONG,ULONG); -static CCHAR (WINAPI *pRtlFindMostSignificantBit)(ULONGLONG); -static CCHAR (WINAPI *pRtlFindLeastSignificantBit)(ULONGLONG); -static ULONG (WINAPI *pRtlFindSetRuns)(PRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN); -static ULONG (WINAPI *pRtlFindClearRuns)(PRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN); -static ULONG (WINAPI *pRtlNumberOfSetBits)(PRTL_BITMAP); -static ULONG (WINAPI *pRtlNumberOfClearBits)(PRTL_BITMAP); -static ULONG (WINAPI *pRtlFindLongestRunSet)(PRTL_BITMAP,PULONG); -static ULONG (WINAPI *pRtlFindLongestRunClear)(PRTL_BITMAP,PULONG); - -static BYTE buff[256]; -static RTL_BITMAP bm; - -static void InitFunctionPtrs(void) -{ - hntdll = LoadLibraryA("ntdll.dll"); - ok(hntdll != 0, "LoadLibrary failed\n"); - if (hntdll) - { - pRtlInitializeBitMap = (void *)GetProcAddress(hntdll, "RtlInitializeBitMap"); - pRtlSetAllBits = (void *)GetProcAddress(hntdll, "RtlSetAllBits"); - pRtlClearAllBits = (void *)GetProcAddress(hntdll, "RtlClearAllBits"); - pRtlSetBits = (void *)GetProcAddress(hntdll, "RtlSetBits"); - pRtlClearBits = (void *)GetProcAddress(hntdll, "RtlClearBits"); - pRtlAreBitsSet = (void *)GetProcAddress(hntdll, "RtlAreBitsSet"); - pRtlAreBitsClear = (void *)GetProcAddress(hntdll, "RtlAreBitsClear"); - pRtlNumberOfSetBits = (void *)GetProcAddress(hntdll, "RtlNumberOfSetBits"); - pRtlNumberOfClearBits = (void *)GetProcAddress(hntdll, "RtlNumberOfClearBits"); - pRtlFindSetBitsAndClear = (void *)GetProcAddress(hntdll, "RtlFindSetBitsAndClear"); - pRtlFindClearBitsAndSet = (void *)GetProcAddress(hntdll, "RtlFindClearBitsAndSet"); - pRtlFindMostSignificantBit = (void *)GetProcAddress(hntdll, "RtlFindMostSignificantBit"); - pRtlFindLeastSignificantBit = (void *)GetProcAddress(hntdll, "RtlFindLeastSignificantBit"); - pRtlFindSetRuns = (void *)GetProcAddress(hntdll, "RtlFindSetRuns"); - pRtlFindClearRuns = (void *)GetProcAddress(hntdll, "RtlFindClearRuns"); - pRtlFindLongestRunSet = (void *)GetProcAddress(hntdll, "RtlFindLongestRunSet"); - pRtlFindLongestRunClear = (void *)GetProcAddress(hntdll, "RtlFindLongestRunClear"); - } -} - -static void test_RtlInitializeBitMap(void) -{ - bm.SizeOfBitMap = 0; - bm.Buffer = 0; - - memset(buff, 0, sizeof(buff)); - buff[0] = 77; /* Check buffer is not written to during init */ - buff[79] = 77; - - pRtlInitializeBitMap(&bm, buff, 800); - ok(bm.SizeOfBitMap == 800, "size uninitialised\n"); - ok(bm.Buffer == (PULONG)buff,"buffer uninitialised\n"); - ok(buff[0] == 77 && buff[79] == 77, "wrote to buffer\n"); -} - -static void test_RtlSetAllBits(void) -{ - if (!pRtlSetAllBits) - return; - - memset(buff, 0 , sizeof(buff)); - pRtlInitializeBitMap(&bm, buff, 1); - - pRtlSetAllBits(&bm); - ok(buff[0] == 0xff && buff[1] == 0xff && buff[2] == 0xff && - buff[3] == 0xff, "didn't round up size\n"); - ok(buff[4] == 0, "set more than rounded size\n"); -} - -static void test_RtlClearAllBits(void) -{ - if (!pRtlClearAllBits) - return; - - memset(buff, 0xff , sizeof(buff)); - pRtlInitializeBitMap(&bm, buff, 1); - - pRtlClearAllBits(&bm); - ok(!buff[0] && !buff[1] && !buff[2] && !buff[3], "didn't round up size\n"); - ok(buff[4] == 0xff, "cleared more than rounded size\n"); -} - -static void test_RtlSetBits(void) -{ - if (!pRtlSetBits) - return; - - memset(buff, 0 , sizeof(buff)); - pRtlInitializeBitMap(&bm, buff, sizeof(buff)*8); - - pRtlSetBits(&bm, 0, 1); - ok(buff[0] == 1, "didn't set 1st bit\n"); - - buff[0] = 0; - pRtlSetBits(&bm, 7, 2); - ok(buff[0] == 0x80 && buff[1] == 1, "didn't span w/len < 8\n"); - - buff[0] = buff[1] = 0; - pRtlSetBits(&bm, 7, 10); - ok(buff[0] == 0x80 && buff[1] == 0xff && buff[2] == 1, "didn't span w/len > 8\n"); - - buff[0] = buff[1] = buff[2] = 0; - pRtlSetBits(&bm, 0, 8); /* 1st byte */ - ok(buff[0] == 0xff, "didn't set all bits\n"); - ok(!buff[1], "set too many bits\n"); - - pRtlSetBits(&bm, sizeof(buff)*8-1, 1); /* last bit */ - ok(buff[sizeof(buff)-1] == 0x80, "didn't set last bit\n"); -} - -static void test_RtlClearBits(void) -{ - if (!pRtlClearBits) - return; - - memset(buff, 0xff , sizeof(buff)); - pRtlInitializeBitMap(&bm, buff, sizeof(buff)*8); - - pRtlClearBits(&bm, 0, 1); - ok(buff[0] == 0xfe, "didn't clear 1st bit\n"); - - buff[0] = 0xff; - pRtlClearBits(&bm, 7, 2); - ok(buff[0] == 0x7f && buff[1] == 0xfe, "didn't span w/len < 8\n"); - - buff[0] = buff[1] = 0xff; - pRtlClearBits(&bm, 7, 10); - ok(buff[0] == 0x7f && buff[1] == 0 && buff[2] == 0xfe, "didn't span w/len > 8\n"); - - buff[0] = buff[1] = buff[2] = 0xff; - pRtlClearBits(&bm, 0, 8); /* 1st byte */ - ok(!buff[0], "didn't clear all bits\n"); - ok(buff[1] == 0xff, "cleared too many bits\n"); - - pRtlClearBits(&bm, sizeof(buff)*8-1, 1); - ok(buff[sizeof(buff)-1] == 0x7f, "didn't set last bit\n"); -} - -static void test_RtlCheckBit(void) -{ - BOOLEAN bRet; - - memset(buff, 0 , sizeof(buff)); - pRtlInitializeBitMap(&bm, buff, sizeof(buff)*8); - pRtlSetBits(&bm, 0, 1); - pRtlSetBits(&bm, 7, 2); - pRtlSetBits(&bm, sizeof(buff)*8-1, 1); - - bRet = RtlCheckBit(&bm, 0); - ok (bRet, "didn't find set bit\n"); - bRet = RtlCheckBit(&bm, 7); - ok (bRet, "didn't find set bit\n"); - bRet = RtlCheckBit(&bm, 8); - ok (bRet, "didn't find set bit\n"); - bRet = RtlCheckBit(&bm, sizeof(buff)*8-1); - ok (bRet, "didn't find set bit\n"); - bRet = RtlCheckBit(&bm, 1); - ok (!bRet, "found non set bit\n"); - bRet = RtlCheckBit(&bm, sizeof(buff)*8-2); - ok (!bRet, "found non set bit\n"); -} - -static void test_RtlAreBitsSet(void) -{ - BOOLEAN bRet; - - if (!pRtlAreBitsSet) - return; - - memset(buff, 0 , sizeof(buff)); - pRtlInitializeBitMap(&bm, buff, sizeof(buff)*8); - - bRet = pRtlAreBitsSet(&bm, 0, 1); - ok (!bRet, "found set bits after init\n"); - - pRtlSetBits(&bm, 0, 1); - bRet = pRtlAreBitsSet(&bm, 0, 1); - ok (bRet, "didn't find set bits\n"); - - buff[0] = 0; - pRtlSetBits(&bm, 7, 2); - bRet = pRtlAreBitsSet(&bm, 7, 2); - ok(bRet, "didn't find w/len < 8\n"); - bRet = pRtlAreBitsSet(&bm, 6, 3); - ok(!bRet, "found non set bit\n"); - bRet = pRtlAreBitsSet(&bm, 7, 3); - ok(!bRet, "found non set bit\n"); - - buff[0] = buff[1] = 0; - pRtlSetBits(&bm, 7, 10); - bRet = pRtlAreBitsSet(&bm, 7, 10); - ok(bRet, "didn't find w/len < 8\n"); - bRet = pRtlAreBitsSet(&bm, 6, 11); - ok(!bRet, "found non set bit\n"); - bRet = pRtlAreBitsSet(&bm, 7, 11); - ok(!bRet, "found non set bit\n"); - - buff[0] = buff[1] = buff[2] = 0; - pRtlSetBits(&bm, 0, 8); /* 1st byte */ - bRet = pRtlAreBitsSet(&bm, 0, 8); - ok(bRet, "didn't find whole byte\n"); - - pRtlSetBits(&bm, sizeof(buff)*8-1, 1); - bRet = pRtlAreBitsSet(&bm, sizeof(buff)*8-1, 1); - ok(bRet, "didn't find last bit\n"); -} - -static void test_RtlAreBitsClear(void) -{ - BOOLEAN bRet; - - if (!pRtlAreBitsClear) - return; - - memset(buff, 0xff , sizeof(buff)); - pRtlInitializeBitMap(&bm, buff, sizeof(buff)*8); - - bRet = pRtlAreBitsClear(&bm, 0, 1); - ok (!bRet, "found clear bits after init\n"); - - pRtlClearBits(&bm, 0, 1); - bRet = pRtlAreBitsClear(&bm, 0, 1); - ok (bRet, "didn't find set bits\n"); - - buff[0] = 0xff; - pRtlClearBits(&bm, 7, 2); - bRet = pRtlAreBitsClear(&bm, 7, 2); - ok(bRet, "didn't find w/len < 8\n"); - bRet = pRtlAreBitsClear(&bm, 6, 3); - ok(!bRet, "found non clear bit\n"); - bRet = pRtlAreBitsClear(&bm, 7, 3); - ok(!bRet, "found non clear bit\n"); - - buff[0] = buff[1] = 0xff; - pRtlClearBits(&bm, 7, 10); - bRet = pRtlAreBitsClear(&bm, 7, 10); - ok(bRet, "didn't find w/len < 8\n"); - bRet = pRtlAreBitsClear(&bm, 6, 11); - ok(!bRet, "found non clear bit\n"); - bRet = pRtlAreBitsClear(&bm, 7, 11); - ok(!bRet, "found non clear bit\n"); - - buff[0] = buff[1] = buff[2] = 0xff; - pRtlClearBits(&bm, 0, 8); /* 1st byte */ - bRet = pRtlAreBitsClear(&bm, 0, 8); - ok(bRet, "didn't find whole byte\n"); - - pRtlClearBits(&bm, sizeof(buff)*8-1, 1); - bRet = pRtlAreBitsClear(&bm, sizeof(buff)*8-1, 1); - ok(bRet, "didn't find last bit\n"); -} - -static void test_RtlNumberOfSetBits(void) -{ - ULONG ulCount; - - if (!pRtlNumberOfSetBits) - return; - - memset(buff, 0 , sizeof(buff)); - pRtlInitializeBitMap(&bm, buff, sizeof(buff)*8); - - ulCount = pRtlNumberOfSetBits(&bm); - ok(ulCount == 0, "set bits after init\n"); - - pRtlSetBits(&bm, 0, 1); /* Set 1st bit */ - ulCount = pRtlNumberOfSetBits(&bm); - ok(ulCount == 1, "count wrong\n"); - - pRtlSetBits(&bm, 7, 8); /* 8 more, spanning bytes 1-2 */ - ulCount = pRtlNumberOfSetBits(&bm); - ok(ulCount == 8+1, "count wrong\n"); - - pRtlSetBits(&bm, 17, 33); /* 33 more crossing ULONG boundary */ - ulCount = pRtlNumberOfSetBits(&bm); - ok(ulCount == 8+1+33, "count wrong\n"); - - pRtlSetBits(&bm, sizeof(buff)*8-1, 1); /* Set last bit */ - ulCount = pRtlNumberOfSetBits(&bm); - ok(ulCount == 8+1+33+1, "count wrong\n"); -} - -static void test_RtlNumberOfClearBits(void) -{ - ULONG ulCount; - - if (!pRtlNumberOfClearBits) - return; - - memset(buff, 0xff , sizeof(buff)); - pRtlInitializeBitMap(&bm, buff, sizeof(buff)*8); - - ulCount = pRtlNumberOfClearBits(&bm); - ok(ulCount == 0, "cleared bits after init\n"); - - pRtlClearBits(&bm, 0, 1); /* Set 1st bit */ - ulCount = pRtlNumberOfClearBits(&bm); - ok(ulCount == 1, "count wrong\n"); - - pRtlClearBits(&bm, 7, 8); /* 8 more, spanning bytes 1-2 */ - ulCount = pRtlNumberOfClearBits(&bm); - ok(ulCount == 8+1, "count wrong\n"); - - pRtlClearBits(&bm, 17, 33); /* 33 more crossing ULONG boundary */ - ulCount = pRtlNumberOfClearBits(&bm); - ok(ulCount == 8+1+33, "count wrong\n"); - - pRtlClearBits(&bm, sizeof(buff)*8-1, 1); /* Set last bit */ - ulCount = pRtlNumberOfClearBits(&bm); - ok(ulCount == 8+1+33+1, "count wrong\n"); -} - -/* Note: this tests RtlFindSetBits also */ -static void test_RtlFindSetBitsAndClear(void) -{ - BOOLEAN bRet; - ULONG ulPos; - - if (!pRtlFindSetBitsAndClear) - return; - - memset(buff, 0, sizeof(buff)); - pRtlInitializeBitMap(&bm, buff, sizeof(buff)*8); - - pRtlSetBits(&bm, 0, 32); - ulPos = pRtlFindSetBitsAndClear(&bm, 32, 0); - ok (ulPos == 0, "didn't find bits\n"); - if(ulPos == 0) - { - bRet = pRtlAreBitsClear(&bm, 0, 32); - ok (bRet, "found but didn't clear\n"); - } - - memset(buff, 0 , sizeof(buff)); - pRtlSetBits(&bm, 40, 77); - ulPos = pRtlFindSetBitsAndClear(&bm, 77, 0); - ok (ulPos == 40, "didn't find bits\n"); - if(ulPos == 40) - { - bRet = pRtlAreBitsClear(&bm, 40, 77); - ok (bRet, "found but didn't clear\n"); - } -} - -/* Note: this tests RtlFindClearBits also */ -static void test_RtlFindClearBitsAndSet(void) -{ - BOOLEAN bRet; - ULONG ulPos; - - if (!pRtlFindClearBitsAndSet) - return; - - pRtlInitializeBitMap(&bm, buff, sizeof(buff)*8); - - memset(buff, 0xff, sizeof(buff)); - pRtlSetBits(&bm, 0, 32); - ulPos = pRtlFindSetBitsAndClear(&bm, 32, 0); - ok (ulPos == 0, "didn't find bits\n"); - if(ulPos == 0) - { - bRet = pRtlAreBitsClear(&bm, 0, 32); - ok (bRet, "found but didn't clear\n"); - } - - memset(buff, 0xff , sizeof(buff)); - pRtlClearBits(&bm, 40, 77); - ulPos = pRtlFindClearBitsAndSet(&bm, 77, 50); - ok (ulPos == 40, "didn't find bits\n"); - if(ulPos == 40) - { - bRet = pRtlAreBitsSet(&bm, 40, 77); - ok (bRet, "found but didn't set\n"); - } -} - -static void test_RtlFindMostSignificantBit(void) -{ - int i; - signed char cPos; - ULONGLONG ulLong; - - if (!pRtlFindMostSignificantBit) - return; - - for (i = 0; i < 64; i++) - { - ulLong = 1ul; - ulLong <<= i; - - cPos = pRtlFindMostSignificantBit(ulLong); - ok (cPos == i, "didn't find MSB 0x%x%08x %d %d\n", - (DWORD)(ulLong >> 32), (DWORD)ulLong, i, cPos); - - /* Set all bits lower than bit i */ - ulLong = ((ulLong - 1) << 1) | 1; - - cPos = pRtlFindMostSignificantBit(ulLong); - ok (cPos == i, "didn't find MSB 0x%x%08x %d %d\n", - (DWORD)(ulLong >> 32), (DWORD)ulLong, i, cPos); - } - cPos = pRtlFindMostSignificantBit(0); - ok (cPos == -1, "found bit when not set\n"); -} - -static void test_RtlFindLeastSignificantBit(void) -{ - int i; - signed char cPos; - ULONGLONG ulLong; - - if (!pRtlFindLeastSignificantBit) - return; - - for (i = 0; i < 64; i++) - { - ulLong = (ULONGLONG)1 << i; - - cPos = pRtlFindLeastSignificantBit(ulLong); - ok (cPos == i, "didn't find LSB 0x%x%08x %d %d\n", - (DWORD)(ulLong >> 32), (DWORD)ulLong, i, cPos); - - ulLong = ~((ULONGLONG)0) << i; - - cPos = pRtlFindLeastSignificantBit(ulLong); - ok (cPos == i, "didn't find LSB 0x%x%08x %d %d\n", - (DWORD)(ulLong >> 32), (DWORD)ulLong, i, cPos); - } - cPos = pRtlFindLeastSignificantBit(0); - ok (cPos == -1, "found bit when not set\n"); -} - -/* Note: Also tests RtlFindLongestRunSet() */ -static void test_RtlFindSetRuns(void) -{ - RTL_BITMAP_RUN runs[16]; - ULONG ulCount; - - if (!pRtlFindSetRuns) - return; - - pRtlInitializeBitMap(&bm, buff, sizeof(buff)*8); - - memset(buff, 0, sizeof(buff)); - ulCount = pRtlFindSetRuns(&bm, runs, 16, TRUE); - ok (ulCount == 0, "found set bits in empty bitmap\n"); - - memset(runs, 0, sizeof(runs)); - memset(buff, 0xff, sizeof(buff)); - ulCount = pRtlFindSetRuns(&bm, runs, 16, TRUE); - ok (ulCount == 1, "didn't find set bits\n"); - ok (runs[0].StartingIndex == 0,"bad start\n"); - ok (runs[0].NumberOfBits == sizeof(buff)*8,"bad size\n"); - - /* Set up 3 runs */ - memset(runs, 0, sizeof(runs)); - memset(buff, 0, sizeof(buff)); - pRtlSetBits(&bm, 7, 19); - pRtlSetBits(&bm, 101, 3); - pRtlSetBits(&bm, 1877, 33); - - /* Get first 2 */ - ulCount = pRtlFindSetRuns(&bm, runs, 2, FALSE); - ok(ulCount == 2, "RtlFindClearRuns returned %d, expected 2\n", ulCount); - ok (runs[0].StartingIndex == 7 || runs[0].StartingIndex == 101,"bad find\n"); - ok (runs[1].StartingIndex == 7 || runs[1].StartingIndex == 101,"bad find\n"); - ok (runs[0].NumberOfBits + runs[1].NumberOfBits == 19 + 3,"bad size\n"); - ok (runs[0].StartingIndex != runs[1].StartingIndex,"found run twice\n"); - ok (runs[2].StartingIndex == 0,"found extra run\n"); - - /* Get longest 3 */ - memset(runs, 0, sizeof(runs)); - ulCount = pRtlFindSetRuns(&bm, runs, 2, TRUE); - ok(ulCount == 2, "RtlFindClearRuns returned %d, expected 2\n", ulCount); - ok (runs[0].StartingIndex == 7 || runs[0].StartingIndex == 1877,"bad find\n"); - ok (runs[1].StartingIndex == 7 || runs[1].StartingIndex == 1877,"bad find\n"); - ok (runs[0].NumberOfBits + runs[1].NumberOfBits == 33 + 19,"bad size\n"); - ok (runs[0].StartingIndex != runs[1].StartingIndex,"found run twice\n"); - ok (runs[2].StartingIndex == 0,"found extra run\n"); - - /* Get all 3 */ - memset(runs, 0, sizeof(runs)); - ulCount = pRtlFindSetRuns(&bm, runs, 3, TRUE); - ok(ulCount == 3, "RtlFindClearRuns returned %d, expected 3\n", ulCount); - ok (runs[0].StartingIndex == 7 || runs[0].StartingIndex == 101 || - runs[0].StartingIndex == 1877,"bad find\n"); - ok (runs[1].StartingIndex == 7 || runs[1].StartingIndex == 101 || - runs[1].StartingIndex == 1877,"bad find\n"); - ok (runs[2].StartingIndex == 7 || runs[2].StartingIndex == 101 || - runs[2].StartingIndex == 1877,"bad find\n"); - ok (runs[0].NumberOfBits + runs[1].NumberOfBits - + runs[2].NumberOfBits == 19 + 3 + 33,"bad size\n"); - ok (runs[0].StartingIndex != runs[1].StartingIndex,"found run twice\n"); - ok (runs[1].StartingIndex != runs[2].StartingIndex,"found run twice\n"); - ok (runs[3].StartingIndex == 0,"found extra run\n"); - - if (pRtlFindLongestRunSet) - { - ULONG ulStart = 0; - - ulCount = pRtlFindLongestRunSet(&bm, &ulStart); - ok(ulCount == 33 && ulStart == 1877,"didn't find longest %d %d\n",ulCount,ulStart); - - memset(buff, 0, sizeof(buff)); - ulCount = pRtlFindLongestRunSet(&bm, &ulStart); - ok(ulCount == 0,"found longest when none set\n"); - } -} - -/* Note: Also tests RtlFindLongestRunClear() */ -static void test_RtlFindClearRuns(void) -{ - RTL_BITMAP_RUN runs[16]; - ULONG ulCount; - - if (!pRtlFindClearRuns) - return; - - pRtlInitializeBitMap(&bm, buff, sizeof(buff)*8); - - memset(buff, 0xff, sizeof(buff)); - ulCount = pRtlFindClearRuns(&bm, runs, 16, TRUE); - ok (ulCount == 0, "found clear bits in full bitmap\n"); - - memset(runs, 0, sizeof(runs)); - memset(buff, 0, sizeof(buff)); - ulCount = pRtlFindClearRuns(&bm, runs, 16, TRUE); - ok (ulCount == 1, "didn't find clear bits\n"); - ok (runs[0].StartingIndex == 0,"bad start\n"); - ok (runs[0].NumberOfBits == sizeof(buff)*8,"bad size\n"); - - /* Set up 3 runs */ - memset(runs, 0, sizeof(runs)); - memset(buff, 0xff, sizeof(buff)); - pRtlClearBits(&bm, 7, 19); - pRtlClearBits(&bm, 101, 3); - pRtlClearBits(&bm, 1877, 33); - - /* Get first 2 */ - ulCount = pRtlFindClearRuns(&bm, runs, 2, FALSE); - ok(ulCount == 2, "RtlFindClearRuns returned %d, expected 2\n", ulCount); - ok (runs[0].StartingIndex == 7 || runs[0].StartingIndex == 101,"bad find\n"); - ok (runs[1].StartingIndex == 7 || runs[1].StartingIndex == 101,"bad find\n"); - ok (runs[0].NumberOfBits + runs[1].NumberOfBits == 19 + 3,"bad size\n"); - ok (runs[0].StartingIndex != runs[1].StartingIndex,"found run twice\n"); - ok (runs[2].StartingIndex == 0,"found extra run\n"); - - /* Get longest 3 */ - memset(runs, 0, sizeof(runs)); - ulCount = pRtlFindClearRuns(&bm, runs, 2, TRUE); - ok(ulCount == 2, "RtlFindClearRuns returned %d, expected 2\n", ulCount); - ok (runs[0].StartingIndex == 7 || runs[0].StartingIndex == 1877,"bad find\n"); - ok (runs[1].StartingIndex == 7 || runs[1].StartingIndex == 1877,"bad find\n"); - ok (runs[0].NumberOfBits + runs[1].NumberOfBits == 33 + 19,"bad size\n"); - ok (runs[0].StartingIndex != runs[1].StartingIndex,"found run twice\n"); - ok (runs[2].StartingIndex == 0,"found extra run\n"); - - /* Get all 3 */ - memset(runs, 0, sizeof(runs)); - ulCount = pRtlFindClearRuns(&bm, runs, 3, TRUE); - ok(ulCount == 3, "RtlFindClearRuns returned %d, expected 3\n", ulCount); - ok (runs[0].StartingIndex == 7 || runs[0].StartingIndex == 101 || - runs[0].StartingIndex == 1877,"bad find\n"); - ok (runs[1].StartingIndex == 7 || runs[1].StartingIndex == 101 || - runs[1].StartingIndex == 1877,"bad find\n"); - ok (runs[2].StartingIndex == 7 || runs[2].StartingIndex == 101 || - runs[2].StartingIndex == 1877,"bad find\n"); - ok (runs[0].NumberOfBits + runs[1].NumberOfBits - + runs[2].NumberOfBits == 19 + 3 + 33,"bad size\n"); - ok (runs[0].StartingIndex != runs[1].StartingIndex,"found run twice\n"); - ok (runs[1].StartingIndex != runs[2].StartingIndex,"found run twice\n"); - ok (runs[3].StartingIndex == 0,"found extra run\n"); - - if (pRtlFindLongestRunClear) - { - ULONG ulStart = 0; - - ulCount = pRtlFindLongestRunClear(&bm, &ulStart); - ok(ulCount == 33 && ulStart == 1877,"didn't find longest\n"); - - memset(buff, 0xff, sizeof(buff)); - ulCount = pRtlFindLongestRunClear(&bm, &ulStart); - ok(ulCount == 0,"found longest when none clear\n"); - } - -} -#endif - -START_TEST(rtlbitmap) -{ -#ifdef __WINE_WINTERNL_H - InitFunctionPtrs(); - - if (pRtlInitializeBitMap) - { - test_RtlInitializeBitMap(); - test_RtlSetAllBits(); - test_RtlClearAllBits(); - test_RtlSetBits(); - test_RtlClearBits(); - test_RtlCheckBit(); - test_RtlAreBitsSet(); - test_RtlAreBitsClear(); - test_RtlNumberOfSetBits(); - test_RtlNumberOfClearBits(); - test_RtlFindSetBitsAndClear(); - test_RtlFindClearBitsAndSet(); - test_RtlFindMostSignificantBit(); - test_RtlFindLeastSignificantBit(); - test_RtlFindSetRuns(); - test_RtlFindClearRuns(); - } -#endif -} diff --git a/rostests/winetests/ntdll/rtlstr.c b/rostests/winetests/ntdll/rtlstr.c deleted file mode 100755 index 5205089d87e..00000000000 --- a/rostests/winetests/ntdll/rtlstr.c +++ /dev/null @@ -1,1908 +0,0 @@ -/* Unit test suite for Rtl string functions - * - * Copyright 2002 Robert Shearman - * Copyright 2003 Thomas Mertes - * - * 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 - * We use function pointers here as there is no import library for NTDLL on - * windows. - */ - -#include - -#define INITGUID - -#include "ntdll_test.h" -#include "winnls.h" -#include "guiddef.h" - -/* Function ptrs for ntdll calls */ -static HMODULE hntdll = 0; -static NTSTATUS (WINAPI *pRtlAnsiStringToUnicodeString)(PUNICODE_STRING, PCANSI_STRING, BOOLEAN); -static NTSTATUS (WINAPI *pRtlAppendAsciizToString)(STRING *, LPCSTR); -static NTSTATUS (WINAPI *pRtlAppendStringToString)(STRING *, const STRING *); -static NTSTATUS (WINAPI *pRtlAppendUnicodeStringToString)(UNICODE_STRING *, const UNICODE_STRING *); -static NTSTATUS (WINAPI *pRtlAppendUnicodeToString)(UNICODE_STRING *, LPCWSTR); -static NTSTATUS (WINAPI *pRtlCharToInteger)(PCSZ, ULONG, int *); -static VOID (WINAPI *pRtlCopyString)(STRING *, const STRING *); -static BOOLEAN (WINAPI *pRtlCreateUnicodeString)(PUNICODE_STRING, LPCWSTR); -static BOOLEAN (WINAPI *pRtlCreateUnicodeStringFromAsciiz)(PUNICODE_STRING, LPCSTR); -static NTSTATUS (WINAPI *pRtlDowncaseUnicodeString)(UNICODE_STRING *, const UNICODE_STRING *, BOOLEAN); -static NTSTATUS (WINAPI *pRtlDuplicateUnicodeString)(int, UNICODE_STRING *, UNICODE_STRING *); -static BOOLEAN (WINAPI *pRtlEqualUnicodeString)(const UNICODE_STRING *, const UNICODE_STRING *, BOOLEAN); -static NTSTATUS (WINAPI *pRtlFindCharInUnicodeString)(int, const UNICODE_STRING *, const UNICODE_STRING *, USHORT *); -static VOID (WINAPI *pRtlFreeAnsiString)(PSTRING); -static VOID (WINAPI *pRtlFreeUnicodeString)(PUNICODE_STRING); -static VOID (WINAPI *pRtlInitAnsiString)(PSTRING, LPCSTR); -static VOID (WINAPI *pRtlInitString)(PSTRING, LPCSTR); -static VOID (WINAPI *pRtlInitUnicodeString)(PUNICODE_STRING, LPCWSTR); -static NTSTATUS (WINAPI *pRtlInitUnicodeStringEx)(PUNICODE_STRING, LPCWSTR); -static NTSTATUS (WINAPI *pRtlIntegerToChar)(ULONG, ULONG, ULONG, PCHAR); -static NTSTATUS (WINAPI *pRtlIntegerToUnicodeString)(ULONG, ULONG, UNICODE_STRING *); -static NTSTATUS (WINAPI *pRtlMultiAppendUnicodeStringBuffer)(UNICODE_STRING *, LONG, UNICODE_STRING *); -static NTSTATUS (WINAPI *pRtlUnicodeStringToAnsiString)(STRING *, const UNICODE_STRING *, BOOLEAN); -static NTSTATUS (WINAPI *pRtlUnicodeStringToInteger)(const UNICODE_STRING *, int, int *); -static WCHAR (WINAPI *pRtlUpcaseUnicodeChar)(WCHAR); -static NTSTATUS (WINAPI *pRtlUpcaseUnicodeString)(UNICODE_STRING *, const UNICODE_STRING *, BOOLEAN); -static CHAR (WINAPI *pRtlUpperChar)(CHAR); -static NTSTATUS (WINAPI *pRtlUpperString)(STRING *, const STRING *); -static NTSTATUS (WINAPI *pRtlValidateUnicodeString)(LONG, UNICODE_STRING *); -static NTSTATUS (WINAPI *pRtlGUIDFromString)(const UNICODE_STRING*,GUID*); -static NTSTATUS (WINAPI *pRtlStringFromGUID)(const GUID*, UNICODE_STRING*); -static BOOLEAN (WINAPI *pRtlIsTextUnicode)(LPVOID, INT, INT *); - -/*static VOID (WINAPI *pRtlFreeOemString)(PSTRING);*/ -/*static VOID (WINAPI *pRtlCopyUnicodeString)(UNICODE_STRING *, const UNICODE_STRING *);*/ -/*static VOID (WINAPI *pRtlEraseUnicodeString)(UNICODE_STRING *);*/ -/*static LONG (WINAPI *pRtlCompareString)(const STRING *,const STRING *,BOOLEAN);*/ -/*static LONG (WINAPI *pRtlCompareUnicodeString)(const UNICODE_STRING *,const UNICODE_STRING *,BOOLEAN);*/ -/*static BOOLEAN (WINAPI *pRtlEqualString)(const STRING *,const STRING *,BOOLEAN);*/ -/*static BOOLEAN (WINAPI *pRtlPrefixString)(const STRING *, const STRING *, BOOLEAN);*/ -/*static BOOLEAN (WINAPI *pRtlPrefixUnicodeString)(const UNICODE_STRING *, const UNICODE_STRING *, BOOLEAN);*/ -/*static NTSTATUS (WINAPI *pRtlOemStringToUnicodeString)(PUNICODE_STRING, const STRING *, BOOLEAN);*/ -/*static NTSTATUS (WINAPI *pRtlUnicodeStringToOemString)(STRING *, const UNICODE_STRING *, BOOLEAN);*/ -/*static NTSTATUS (WINAPI *pRtlMultiByteToUnicodeN)(LPWSTR, DWORD, LPDWORD, LPCSTR, DWORD);*/ -/*static NTSTATUS (WINAPI *pRtlOemToUnicodeN)(LPWSTR, DWORD, LPDWORD, LPCSTR, DWORD);*/ -/*static NTSTATUS (WINAPI *pRtlUpcaseUnicodeStringToAnsiString)(STRING *, const UNICODE_STRING *, BOOLEAN);*/ -/*static NTSTATUS (WINAPI *pRtlUpcaseUnicodeStringToOemString)(STRING *, const UNICODE_STRING *, BOOLEAN);*/ -/*static NTSTATUS (WINAPI *pRtlUpcaseUnicodeToMultiByteN)(LPSTR, DWORD, LPDWORD, LPCWSTR, DWORD);*/ -/*static NTSTATUS (WINAPI *pRtlUpcaseUnicodeToOemN)(LPSTR, DWORD, LPDWORD, LPCWSTR, DWORD);*/ -/*static UINT (WINAPI *pRtlOemToUnicodeSize)(const STRING *);*/ -/*static DWORD (WINAPI *pRtlAnsiStringToUnicodeSize)(const STRING *);*/ - - -static WCHAR* AtoW( const char* p ) -{ - WCHAR* buffer; - DWORD len = MultiByteToWideChar( CP_ACP, 0, p, -1, NULL, 0 ); - buffer = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR) ); - MultiByteToWideChar( CP_ACP, 0, p, -1, buffer, len ); - return buffer; -} - - -static void InitFunctionPtrs(void) -{ - hntdll = LoadLibraryA("ntdll.dll"); - ok(hntdll != 0, "LoadLibrary failed\n"); - if (hntdll) { - pRtlAnsiStringToUnicodeString = (void *)GetProcAddress(hntdll, "RtlAnsiStringToUnicodeString"); - pRtlAppendAsciizToString = (void *)GetProcAddress(hntdll, "RtlAppendAsciizToString"); - pRtlAppendStringToString = (void *)GetProcAddress(hntdll, "RtlAppendStringToString"); - pRtlAppendUnicodeStringToString = (void *)GetProcAddress(hntdll, "RtlAppendUnicodeStringToString"); - pRtlAppendUnicodeToString = (void *)GetProcAddress(hntdll, "RtlAppendUnicodeToString"); - pRtlCharToInteger = (void *)GetProcAddress(hntdll, "RtlCharToInteger"); - pRtlCopyString = (void *)GetProcAddress(hntdll, "RtlCopyString"); - pRtlCreateUnicodeString = (void *)GetProcAddress(hntdll, "RtlCreateUnicodeString"); - pRtlCreateUnicodeStringFromAsciiz = (void *)GetProcAddress(hntdll, "RtlCreateUnicodeStringFromAsciiz"); - pRtlDowncaseUnicodeString = (void *)GetProcAddress(hntdll, "RtlDowncaseUnicodeString"); - pRtlDuplicateUnicodeString = (void *)GetProcAddress(hntdll, "RtlDuplicateUnicodeString"); - pRtlEqualUnicodeString = (void *)GetProcAddress(hntdll, "RtlEqualUnicodeString"); - pRtlFindCharInUnicodeString = (void *)GetProcAddress(hntdll, "RtlFindCharInUnicodeString"); - pRtlFreeAnsiString = (void *)GetProcAddress(hntdll, "RtlFreeAnsiString"); - pRtlFreeUnicodeString = (void *)GetProcAddress(hntdll, "RtlFreeUnicodeString"); - pRtlInitAnsiString = (void *)GetProcAddress(hntdll, "RtlInitAnsiString"); - pRtlInitString = (void *)GetProcAddress(hntdll, "RtlInitString"); - pRtlInitUnicodeString = (void *)GetProcAddress(hntdll, "RtlInitUnicodeString"); - pRtlInitUnicodeStringEx = (void *)GetProcAddress(hntdll, "RtlInitUnicodeStringEx"); - pRtlIntegerToChar = (void *)GetProcAddress(hntdll, "RtlIntegerToChar"); - pRtlIntegerToUnicodeString = (void *)GetProcAddress(hntdll, "RtlIntegerToUnicodeString"); - pRtlMultiAppendUnicodeStringBuffer = (void *)GetProcAddress(hntdll, "RtlMultiAppendUnicodeStringBuffer"); - pRtlUnicodeStringToAnsiString = (void *)GetProcAddress(hntdll, "RtlUnicodeStringToAnsiString"); - pRtlUnicodeStringToInteger = (void *)GetProcAddress(hntdll, "RtlUnicodeStringToInteger"); - pRtlUpcaseUnicodeChar = (void *)GetProcAddress(hntdll, "RtlUpcaseUnicodeChar"); - pRtlUpcaseUnicodeString = (void *)GetProcAddress(hntdll, "RtlUpcaseUnicodeString"); - pRtlUpperChar = (void *)GetProcAddress(hntdll, "RtlUpperChar"); - pRtlUpperString = (void *)GetProcAddress(hntdll, "RtlUpperString"); - pRtlValidateUnicodeString = (void *)GetProcAddress(hntdll, "RtlValidateUnicodeString"); - pRtlGUIDFromString = (void *)GetProcAddress(hntdll, "RtlGUIDFromString"); - pRtlStringFromGUID = (void *)GetProcAddress(hntdll, "RtlStringFromGUID"); - pRtlIsTextUnicode = (void *)GetProcAddress(hntdll, "RtlIsTextUnicode"); - } -} - - -static void test_RtlInitString(void) -{ - static const char teststring[] = "Some Wild String"; - STRING str; - - str.Length = 0; - str.MaximumLength = 0; - str.Buffer = (void *)0xdeadbeef; - pRtlInitString(&str, teststring); - ok(str.Length == sizeof(teststring) - sizeof(char), "Length uninitialized\n"); - ok(str.MaximumLength == sizeof(teststring), "MaximumLength uninitialized\n"); - ok(str.Buffer == teststring, "Buffer not equal to teststring\n"); - ok(strcmp(str.Buffer, "Some Wild String") == 0, "Buffer written to\n"); - pRtlInitString(&str, NULL); - ok(str.Length == 0, "Length uninitialized\n"); - ok(str.MaximumLength == 0, "MaximumLength uninitialized\n"); - ok(str.Buffer == NULL, "Buffer not equal to NULL\n"); -/* pRtlInitString(NULL, teststring); */ -} - - -static void test_RtlInitUnicodeString(void) -{ -#define STRINGW {'S','o','m','e',' ','W','i','l','d',' ','S','t','r','i','n','g',0} - static const WCHAR teststring[] = STRINGW; - static const WCHAR originalstring[] = STRINGW; -#undef STRINGW - UNICODE_STRING uni; - - uni.Length = 0; - uni.MaximumLength = 0; - uni.Buffer = (void *)0xdeadbeef; - pRtlInitUnicodeString(&uni, teststring); - ok(uni.Length == sizeof(teststring) - sizeof(WCHAR), "Length uninitialized\n"); - ok(uni.MaximumLength == sizeof(teststring), "MaximumLength uninitialized\n"); - ok(uni.Buffer == teststring, "Buffer not equal to teststring\n"); - ok(lstrcmpW(uni.Buffer, originalstring) == 0, "Buffer written to\n"); - pRtlInitUnicodeString(&uni, NULL); - ok(uni.Length == 0, "Length uninitialized\n"); - ok(uni.MaximumLength == 0, "MaximumLength uninitialized\n"); - ok(uni.Buffer == NULL, "Buffer not equal to NULL\n"); -/* pRtlInitUnicodeString(NULL, teststring); */ -} - - -#define TESTSTRING2_LEN 1000000 -/* #define TESTSTRING2_LEN 32766 */ - - -static void test_RtlInitUnicodeStringEx(void) -{ - static const WCHAR teststring[] = {'S','o','m','e',' ','W','i','l','d',' ','S','t','r','i','n','g',0}; - WCHAR *teststring2; - UNICODE_STRING uni; - NTSTATUS result; - - teststring2 = HeapAlloc(GetProcessHeap(), 0, (TESTSTRING2_LEN + 1) * sizeof(WCHAR)); - memset(teststring2, 'X', TESTSTRING2_LEN * sizeof(WCHAR)); - teststring2[TESTSTRING2_LEN] = '\0'; - - uni.Length = 12345; - uni.MaximumLength = 12345; - uni.Buffer = (void *) 0xdeadbeef; - result = pRtlInitUnicodeStringEx(&uni, teststring); - ok(result == STATUS_SUCCESS, - "pRtlInitUnicodeStringEx(&uni, 0) returns %x, expected 0\n", - result); - ok(uni.Length == 32, - "pRtlInitUnicodeStringEx(&uni, 0) sets Length to %u, expected %u\n", - uni.Length, 32); - ok(uni.MaximumLength == 34, - "pRtlInitUnicodeStringEx(&uni, 0) sets MaximumLength to %u, expected %u\n", - uni.MaximumLength, 34); - ok(uni.Buffer == teststring, - "pRtlInitUnicodeStringEx(&uni, 0) sets Buffer to %p, expected %p\n", - uni.Buffer, teststring); - - uni.Length = 12345; - uni.MaximumLength = 12345; - uni.Buffer = (void *) 0xdeadbeef; - pRtlInitUnicodeString(&uni, teststring); - ok(uni.Length == 32, - "pRtlInitUnicodeString(&uni, 0) sets Length to %u, expected %u\n", - uni.Length, 32); - ok(uni.MaximumLength == 34, - "pRtlInitUnicodeString(&uni, 0) sets MaximumLength to %u, expected %u\n", - uni.MaximumLength, 34); - ok(uni.Buffer == teststring, - "pRtlInitUnicodeString(&uni, 0) sets Buffer to %p, expected %p\n", - uni.Buffer, teststring); - - uni.Length = 12345; - uni.MaximumLength = 12345; - uni.Buffer = (void *) 0xdeadbeef; - result = pRtlInitUnicodeStringEx(&uni, teststring2); - ok(result == STATUS_NAME_TOO_LONG, - "pRtlInitUnicodeStringEx(&uni, 0) returns %x, expected %x\n", - result, STATUS_NAME_TOO_LONG); - ok(uni.Length == 12345 || - uni.Length == 0, /* win2k3 */ - "pRtlInitUnicodeStringEx(&uni, 0) sets Length to %u, expected 12345 or 0\n", - uni.Length); - ok(uni.MaximumLength == 12345 || - uni.MaximumLength == 0, /* win2k3 */ - "pRtlInitUnicodeStringEx(&uni, 0) sets MaximumLength to %u, expected 12345 or 0\n", - uni.MaximumLength); - ok(uni.Buffer == (void *) 0xdeadbeef || - uni.Buffer == teststring2, /* win2k3 */ - "pRtlInitUnicodeStringEx(&uni, 0) sets Buffer to %p, expected %x or %p\n", - uni.Buffer, 0xdeadbeef, teststring2); - - uni.Length = 12345; - uni.MaximumLength = 12345; - uni.Buffer = (void *) 0xdeadbeef; - pRtlInitUnicodeString(&uni, teststring2); - ok(uni.Length == 33920 /* <= Win2000 */ || uni.Length == 65532 /* >= Win XP */, - "pRtlInitUnicodeString(&uni, 0) sets Length to %u, expected %u\n", - uni.Length, 65532); - ok(uni.MaximumLength == 33922 /* <= Win2000 */ || uni.MaximumLength == 65534 /* >= Win XP */, - "pRtlInitUnicodeString(&uni, 0) sets MaximumLength to %u, expected %u\n", - uni.MaximumLength, 65534); - ok(uni.Buffer == teststring2, - "pRtlInitUnicodeString(&uni, 0) sets Buffer to %p, expected %p\n", - uni.Buffer, teststring2); - ok(memcmp(uni.Buffer, teststring2, (TESTSTRING2_LEN + 1) * sizeof(WCHAR)) == 0, - "pRtlInitUnicodeString(&uni, 0) changes Buffer\n"); - - uni.Length = 12345; - uni.MaximumLength = 12345; - uni.Buffer = (void *) 0xdeadbeef; - result = pRtlInitUnicodeStringEx(&uni, 0); - ok(result == STATUS_SUCCESS, - "pRtlInitUnicodeStringEx(&uni, 0) returns %x, expected 0\n", - result); - ok(uni.Length == 0, - "pRtlInitUnicodeStringEx(&uni, 0) sets Length to %u, expected %u\n", - uni.Length, 0); - ok(uni.MaximumLength == 0, - "pRtlInitUnicodeStringEx(&uni, 0) sets MaximumLength to %u, expected %u\n", - uni.MaximumLength, 0); - ok(uni.Buffer == NULL, - "pRtlInitUnicodeStringEx(&uni, 0) sets Buffer to %p, expected %p\n", - uni.Buffer, NULL); - - uni.Length = 12345; - uni.MaximumLength = 12345; - uni.Buffer = (void *) 0xdeadbeef; - pRtlInitUnicodeString(&uni, 0); - ok(uni.Length == 0, - "pRtlInitUnicodeString(&uni, 0) sets Length to %u, expected %u\n", - uni.Length, 0); - ok(uni.MaximumLength == 0, - "pRtlInitUnicodeString(&uni, 0) sets MaximumLength to %u, expected %u\n", - uni.MaximumLength, 0); - ok(uni.Buffer == NULL, - "pRtlInitUnicodeString(&uni, 0) sets Buffer to %p, expected %p\n", - uni.Buffer, NULL); - - HeapFree(GetProcessHeap(), 0, teststring2); -} - - -typedef struct { - int add_nul; - int source_Length; - int source_MaximumLength; - int source_buf_size; - const char *source_buf; - int dest_Length; - int dest_MaximumLength; - int dest_buf_size; - const char *dest_buf; - int res_Length; - int res_MaximumLength; - int res_buf_size; - const char *res_buf; - NTSTATUS result; -} dupl_ustr_t; - -static const dupl_ustr_t dupl_ustr[] = { - { 0, 32, 34, 34, "This is a string", 40, 42, 42, "--------------------", 32, 32, 32, "This is a string", STATUS_SUCCESS}, - { 0, 32, 32, 32, "This is a string", 40, 42, 42, "--------------------", 32, 32, 32, "This is a string", STATUS_SUCCESS}, - { 0, 32, 30, 34, "This is a string", 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - { 0, 32, 34, 34, "This is a string", 40, 42, 42, NULL, 32, 32, 32, "This is a string", STATUS_SUCCESS}, - { 0, 32, 32, 32, "This is a string", 40, 42, 42, NULL, 32, 32, 32, "This is a string", STATUS_SUCCESS}, - { 0, 32, 30, 34, "This is a string", 40, 42, 42, NULL, 40, 42, 0, NULL, STATUS_INVALID_PARAMETER}, - { 1, 32, 34, 34, "This is a string", 40, 42, 42, "--------------------", 32, 34, 34, "This is a string", STATUS_SUCCESS}, - { 1, 32, 32, 32, "This is a string", 40, 42, 42, "--------------------", 32, 34, 34, "This is a string", STATUS_SUCCESS}, - { 1, 32, 30, 34, "This is a string", 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - { 1, 32, 34, 34, "This is a string", 40, 42, 42, NULL, 32, 34, 34, "This is a string", STATUS_SUCCESS}, - { 1, 32, 32, 32, "This is a string", 40, 42, 42, NULL, 32, 34, 34, "This is a string", STATUS_SUCCESS}, - { 1, 32, 30, 34, "This is a string", 40, 42, 42, NULL, 40, 42, 0, NULL, STATUS_INVALID_PARAMETER}, - { 2, 32, 34, 34, "This is a string", 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - { 2, 32, 32, 32, "This is a string", 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - { 2, 32, 30, 34, "This is a string", 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - { 2, 32, 34, 34, "This is a string", 40, 42, 42, NULL, 40, 42, 0, NULL, STATUS_INVALID_PARAMETER}, - { 2, 32, 32, 32, "This is a string", 40, 42, 42, NULL, 40, 42, 0, NULL, STATUS_INVALID_PARAMETER}, - { 2, 32, 30, 34, "This is a string", 40, 42, 42, NULL, 40, 42, 0, NULL, STATUS_INVALID_PARAMETER}, - { 3, 32, 34, 34, "This is a string", 40, 42, 42, "--------------------", 32, 34, 34, "This is a string", STATUS_SUCCESS}, - { 3, 32, 32, 32, "This is a string", 40, 42, 42, "--------------------", 32, 34, 34, "This is a string", STATUS_SUCCESS}, - { 3, 32, 30, 32, "This is a string", 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - { 3, 32, 34, 34, "This is a string", 40, 42, 42, NULL, 32, 34, 34, "This is a string", STATUS_SUCCESS}, - { 3, 32, 32, 32, "This is a string", 40, 42, 42, NULL, 32, 34, 34, "This is a string", STATUS_SUCCESS}, - { 3, 32, 30, 32, "This is a string", 40, 42, 42, NULL, 40, 42, 0, NULL, STATUS_INVALID_PARAMETER}, - { 4, 32, 34, 34, "This is a string", 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - { 5, 32, 34, 34, "This is a string", 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - { 6, 32, 34, 34, "This is a string", 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - { 7, 32, 34, 34, "This is a string", 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - { 8, 32, 34, 34, "This is a string", 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - { 9, 32, 34, 34, "This is a string", 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - {10, 32, 34, 34, "This is a string", 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - {11, 32, 34, 34, "This is a string", 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - {12, 32, 34, 34, "This is a string", 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - {13, 32, 34, 34, "This is a string", 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - {14, 32, 34, 34, "This is a string", 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - {15, 32, 34, 34, "This is a string", 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - {16, 32, 34, 34, "This is a string", 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - {-1, 32, 34, 34, "This is a string", 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - {-5, 32, 34, 34, "This is a string", 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - {-9, 32, 34, 34, "This is a string", 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - { 0, 0, 2, 2, "", 40, 42, 42, "--------------------", 0, 0, 0, NULL, STATUS_SUCCESS}, - { 0, 0, 0, 0, "", 40, 42, 42, "--------------------", 0, 0, 0, NULL, STATUS_SUCCESS}, - { 0, 0, 2, 2, "", 40, 42, 42, NULL, 0, 0, 0, NULL, STATUS_SUCCESS}, - { 0, 0, 0, 0, "", 40, 42, 42, NULL, 0, 0, 0, NULL, STATUS_SUCCESS}, - { 0, 0, 2, 2, NULL, 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - { 0, 0, 0, 0, NULL, 40, 42, 42, "--------------------", 0, 0, 0, NULL, STATUS_SUCCESS}, - { 0, 0, 2, 2, NULL, 40, 42, 42, NULL, 40, 42, 0, NULL, STATUS_INVALID_PARAMETER}, - { 0, 0, 0, 0, NULL, 40, 42, 42, NULL, 0, 0, 0, NULL, STATUS_SUCCESS}, - { 1, 0, 2, 2, "", 40, 42, 42, "--------------------", 0, 0, 0, NULL, STATUS_SUCCESS}, - { 1, 0, 0, 0, "", 40, 42, 42, "--------------------", 0, 0, 0, NULL, STATUS_SUCCESS}, - { 1, 0, 2, 2, "", 40, 42, 42, NULL, 0, 0, 0, NULL, STATUS_SUCCESS}, - { 1, 0, 0, 0, "", 40, 42, 42, NULL, 0, 0, 0, NULL, STATUS_SUCCESS}, - { 1, 0, 2, 2, NULL, 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - { 1, 0, 0, 0, NULL, 40, 42, 42, "--------------------", 0, 0, 0, NULL, STATUS_SUCCESS}, - { 1, 0, 2, 2, NULL, 40, 42, 42, NULL, 40, 42, 0, NULL, STATUS_INVALID_PARAMETER}, - { 1, 0, 0, 0, NULL, 40, 42, 42, NULL, 0, 0, 0, NULL, STATUS_SUCCESS}, - { 2, 0, 2, 2, "", 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - { 2, 0, 0, 0, "", 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - { 2, 0, 2, 2, "", 40, 42, 42, NULL, 40, 42, 0, NULL, STATUS_INVALID_PARAMETER}, - { 2, 0, 0, 0, "", 40, 42, 42, NULL, 40, 42, 0, NULL, STATUS_INVALID_PARAMETER}, - { 2, 0, 2, 2, NULL, 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - { 2, 0, 0, 0, NULL, 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - { 2, 0, 2, 2, NULL, 40, 42, 42, NULL, 40, 42, 0, NULL, STATUS_INVALID_PARAMETER}, - { 2, 0, 0, 0, NULL, 40, 42, 42, NULL, 40, 42, 0, NULL, STATUS_INVALID_PARAMETER}, - { 3, 0, 2, 2, "", 40, 42, 42, "--------------------", 0, 2, 2, "", STATUS_SUCCESS}, - { 3, 0, 0, 0, "", 40, 42, 42, "--------------------", 0, 2, 2, "", STATUS_SUCCESS}, - { 3, 0, 2, 2, "", 40, 42, 42, NULL, 0, 2, 2, "", STATUS_SUCCESS}, - { 3, 0, 0, 0, "", 40, 42, 42, NULL, 0, 2, 2, "", STATUS_SUCCESS}, - { 3, 0, 2, 2, NULL, 40, 42, 42, "--------------------", 40, 42, 42, "--------------------", STATUS_INVALID_PARAMETER}, - { 3, 0, 0, 0, NULL, 40, 42, 42, "--------------------", 0, 2, 2, "", STATUS_SUCCESS}, - { 3, 0, 2, 2, NULL, 40, 42, 42, NULL, 40, 42, 0, NULL, STATUS_INVALID_PARAMETER}, - { 3, 0, 0, 0, NULL, 40, 42, 42, NULL, 0, 2, 2, "", STATUS_SUCCESS}, -}; -#define NB_DUPL_USTR (sizeof(dupl_ustr)/sizeof(*dupl_ustr)) - - -static void test_RtlDuplicateUnicodeString(void) -{ - size_t pos; - WCHAR source_buf[257]; - WCHAR dest_buf[257]; - WCHAR res_buf[257]; - UNICODE_STRING source_str; - UNICODE_STRING dest_str; - UNICODE_STRING res_str; - CHAR dest_ansi_buf[257]; - STRING dest_ansi_str; - NTSTATUS result; - unsigned int test_num; - - for (test_num = 0; test_num < NB_DUPL_USTR; test_num++) { - source_str.Length = dupl_ustr[test_num].source_Length; - source_str.MaximumLength = dupl_ustr[test_num].source_MaximumLength; - if (dupl_ustr[test_num].source_buf != NULL) { - for (pos = 0; pos < dupl_ustr[test_num].source_buf_size/sizeof(WCHAR); pos++) { - source_buf[pos] = dupl_ustr[test_num].source_buf[pos]; - } - source_str.Buffer = source_buf; - } else { - source_str.Buffer = NULL; - } - dest_str.Length = dupl_ustr[test_num].dest_Length; - dest_str.MaximumLength = dupl_ustr[test_num].dest_MaximumLength; - if (dupl_ustr[test_num].dest_buf != NULL) { - for (pos = 0; pos < dupl_ustr[test_num].dest_buf_size/sizeof(WCHAR); pos++) { - dest_buf[pos] = dupl_ustr[test_num].dest_buf[pos]; - } - dest_str.Buffer = dest_buf; - } else { - dest_str.Buffer = NULL; - } - res_str.Length = dupl_ustr[test_num].res_Length; - res_str.MaximumLength = dupl_ustr[test_num].res_MaximumLength; - if (dupl_ustr[test_num].res_buf != NULL) { - for (pos = 0; pos < dupl_ustr[test_num].res_buf_size/sizeof(WCHAR); pos++) { - res_buf[pos] = dupl_ustr[test_num].res_buf[pos]; - } - res_str.Buffer = res_buf; - } else { - res_str.Buffer = NULL; - } - result = pRtlDuplicateUnicodeString(dupl_ustr[test_num].add_nul, &source_str, &dest_str); - dest_ansi_str.Length = dest_str.Length / sizeof(WCHAR); - dest_ansi_str.MaximumLength = dest_ansi_str.Length + 1; - for (pos = 0; pos < dest_ansi_str.Length; pos++) { - dest_ansi_buf[pos] = (char)dest_buf[pos]; - } - dest_ansi_buf[dest_ansi_str.Length] = '\0'; - dest_ansi_str.Buffer = dest_ansi_buf; - ok(result == dupl_ustr[test_num].result, - "(test %d): RtlDuplicateUnicodeString(%d, source, dest) has result %x, expected %x\n", - test_num, dupl_ustr[test_num].add_nul, result, dupl_ustr[test_num].result); - ok(dest_str.Length == dupl_ustr[test_num].res_Length, - "(test %d): RtlDuplicateUnicodeString(%d, source, dest) destination has Length %d, expected %d\n", - test_num, dupl_ustr[test_num].add_nul, dest_str.Length, dupl_ustr[test_num].res_Length); - ok(dest_str.MaximumLength == dupl_ustr[test_num].res_MaximumLength, - "(test %d): RtlDuplicateUnicodeString(%d, source, dest) destination has MaximumLength %d, expected %d\n", - test_num, dupl_ustr[test_num].add_nul, dest_str.MaximumLength, dupl_ustr[test_num].res_MaximumLength); - if (result == STATUS_INVALID_PARAMETER) { - ok((dest_str.Buffer == NULL && res_str.Buffer == NULL) || - dest_str.Buffer == dest_buf, - "(test %d): RtlDuplicateUnicodeString(%d, source, dest) destination buffer changed %p expected %p\n", - test_num, dupl_ustr[test_num].add_nul, dest_str.Buffer, dest_buf); - } else { - ok(dest_str.Buffer != dest_buf, - "(test %d): RtlDuplicateUnicodeString(%d, source, dest) has destination buffer unchanged %p\n", - test_num, dupl_ustr[test_num].add_nul, dest_str.Buffer); - } - if (dest_str.Buffer != NULL && dupl_ustr[test_num].res_buf != NULL) { - ok(memcmp(dest_str.Buffer, res_str.Buffer, dupl_ustr[test_num].res_buf_size) == 0, - "(test %d): RtlDuplicateUnicodeString(%d, source, dest) has destination \"%s\" expected \"%s\"\n", - test_num, dupl_ustr[test_num].add_nul, dest_ansi_str.Buffer, dupl_ustr[test_num].res_buf); - if(result == STATUS_SUCCESS) pRtlFreeUnicodeString(&dest_str); - } else { - ok(dest_str.Buffer == NULL && dupl_ustr[test_num].res_buf == NULL, - "(test %d): RtlDuplicateUnicodeString(%d, source, dest) has destination %p expected %p\n", - test_num, dupl_ustr[test_num].add_nul, dest_str.Buffer, dupl_ustr[test_num].res_buf); - } - } -} - - -static void test_RtlCopyString(void) -{ - static const char teststring[] = "Some Wild String"; - char deststring[] = " "; - STRING str; - STRING deststr; - - pRtlInitString(&str, teststring); - pRtlInitString(&deststr, deststring); - pRtlCopyString(&deststr, &str); - ok(strncmp(str.Buffer, deststring, str.Length) == 0, "String not copied\n"); -} - - -static void test_RtlUpperChar(void) -{ - int ch; - int upper_ch; - int expected_upper_ch; - int byte_ch; - - for (ch = -1; ch <= 1024; ch++) { - upper_ch = pRtlUpperChar(ch); - byte_ch = ch & 0xff; - if (byte_ch >= 'a' && byte_ch <= 'z') { - expected_upper_ch = (CHAR) (byte_ch - 'a' + 'A'); - } else { - expected_upper_ch = (CHAR) byte_ch; - } - ok(upper_ch == expected_upper_ch, - "RtlUpperChar('%c'[=0x%x]) has result '%c'[=0x%x], expected '%c'[=0x%x]\n", - ch, ch, upper_ch, upper_ch, expected_upper_ch, expected_upper_ch); - } -} - - -static void test_RtlUpperString(void) -{ - int i; - CHAR ch; - CHAR upper_ch; - char ascii_buf[257]; - char result_buf[257]; - char upper_buf[257]; - STRING ascii_str; - STRING result_str; - STRING upper_str; - - for (i = 0; i <= 255; i++) { - ch = (CHAR) i; - if (ch >= 'a' && ch <= 'z') { - upper_ch = ch - 'a' + 'A'; - } else { - upper_ch = ch; - } - ascii_buf[i] = ch; - result_buf[i] = '\0'; - upper_buf[i] = upper_ch; - } - ascii_buf[i] = '\0'; - result_buf[i] = '\0'; - upper_buf[i] = '\0'; - ascii_str.Length = 256; - ascii_str.MaximumLength = 256; - ascii_str.Buffer = ascii_buf; - result_str.Length = 256; - result_str.MaximumLength = 256; - result_str.Buffer = result_buf; - upper_str.Length = 256; - upper_str.MaximumLength = 256; - upper_str.Buffer = upper_buf; - - pRtlUpperString(&result_str, &ascii_str); - ok(memcmp(result_str.Buffer, upper_str.Buffer, 256) == 0, - "RtlUpperString does not work as expected\n"); -} - - -static void test_RtlUpcaseUnicodeChar(void) -{ - int i; - WCHAR ch; - WCHAR upper_ch; - WCHAR expected_upper_ch; - - for (i = 0; i <= 255; i++) { - ch = (WCHAR) i; - upper_ch = pRtlUpcaseUnicodeChar(ch); - if (ch >= 'a' && ch <= 'z') { - expected_upper_ch = ch - 'a' + 'A'; - } else if (ch >= 0xe0 && ch <= 0xfe && ch != 0xf7) { - expected_upper_ch = ch - 0x20; - } else if (ch == 0xff) { - expected_upper_ch = 0x178; - } else { - expected_upper_ch = ch; - } - ok(upper_ch == expected_upper_ch, - "RtlUpcaseUnicodeChar('%c'[=0x%x]) has result '%c'[=0x%x], expected: '%c'[=0x%x]\n", - ch, ch, upper_ch, upper_ch, expected_upper_ch, expected_upper_ch); - } -} - - -static void test_RtlUpcaseUnicodeString(void) -{ - int i; - WCHAR ch; - WCHAR upper_ch; - WCHAR ascii_buf[257]; - WCHAR result_buf[257]; - WCHAR upper_buf[257]; - UNICODE_STRING ascii_str; - UNICODE_STRING result_str; - UNICODE_STRING upper_str; - - for (i = 0; i <= 255; i++) { - ch = (WCHAR) i; - if (ch >= 'a' && ch <= 'z') { - upper_ch = ch - 'a' + 'A'; - } else if (ch >= 0xe0 && ch <= 0xfe && ch != 0xf7) { - upper_ch = ch - 0x20; - } else if (ch == 0xff) { - upper_ch = 0x178; - } else { - upper_ch = ch; - } - ascii_buf[i] = ch; - result_buf[i] = '\0'; - upper_buf[i] = upper_ch; - } - ascii_buf[i] = '\0'; - result_buf[i] = '\0'; - upper_buf[i] = '\0'; - ascii_str.Length = 512; - ascii_str.MaximumLength = 512; - ascii_str.Buffer = ascii_buf; - result_str.Length = 512; - result_str.MaximumLength = 512; - result_str.Buffer = result_buf; - upper_str.Length = 512; - upper_str.MaximumLength = 512; - upper_str.Buffer = upper_buf; - - pRtlUpcaseUnicodeString(&result_str, &ascii_str, 0); - for (i = 0; i <= 255; i++) { - ok(result_str.Buffer[i] == upper_str.Buffer[i], - "RtlUpcaseUnicodeString works wrong: '%c'[=0x%x] is converted to '%c'[=0x%x], expected: '%c'[=0x%x]\n", - ascii_str.Buffer[i], ascii_str.Buffer[i], - result_str.Buffer[i], result_str.Buffer[i], - upper_str.Buffer[i], upper_str.Buffer[i]); - } -} - - -static void test_RtlDowncaseUnicodeString(void) -{ - int i; - WCHAR ch; - WCHAR lower_ch; - WCHAR source_buf[1025]; - WCHAR result_buf[1025]; - WCHAR lower_buf[1025]; - UNICODE_STRING source_str; - UNICODE_STRING result_str; - UNICODE_STRING lower_str; - - for (i = 0; i < 1024; i++) { - ch = (WCHAR) i; - if (ch >= 'A' && ch <= 'Z') { - lower_ch = ch - 'A' + 'a'; - } else if (ch >= 0xc0 && ch <= 0xde && ch != 0xd7) { - lower_ch = ch + 0x20; - } else if (ch >= 0x391 && ch <= 0x3ab && ch != 0x3a2) { - lower_ch = ch + 0x20; - } else { - switch (ch) { - case 0x178: lower_ch = 0xff; break; - case 0x181: lower_ch = 0x253; break; - case 0x186: lower_ch = 0x254; break; - case 0x189: lower_ch = 0x256; break; - case 0x18a: lower_ch = 0x257; break; - case 0x18e: lower_ch = 0x1dd; break; - case 0x18f: lower_ch = 0x259; break; - case 0x190: lower_ch = 0x25b; break; - case 0x193: lower_ch = 0x260; break; - case 0x194: lower_ch = 0x263; break; - case 0x196: lower_ch = 0x269; break; - case 0x197: lower_ch = 0x268; break; - case 0x19c: lower_ch = 0x26f; break; - case 0x19d: lower_ch = 0x272; break; - case 0x19f: lower_ch = 0x275; break; - case 0x1a9: lower_ch = 0x283; break; - case 0x1ae: lower_ch = 0x288; break; - case 0x1b1: lower_ch = 0x28a; break; - case 0x1b2: lower_ch = 0x28b; break; - case 0x1b7: lower_ch = 0x292; break; - case 0x1c4: lower_ch = 0x1c6; break; - case 0x1c7: lower_ch = 0x1c9; break; - case 0x1ca: lower_ch = 0x1cc; break; - case 0x1f1: lower_ch = 0x1f3; break; - case 0x386: lower_ch = 0x3ac; break; - case 0x388: lower_ch = 0x3ad; break; - case 0x389: lower_ch = 0x3ae; break; - case 0x38a: lower_ch = 0x3af; break; - case 0x38c: lower_ch = 0x3cc; break; - case 0x38e: lower_ch = 0x3cd; break; - case 0x38f: lower_ch = 0x3ce; break; - default: lower_ch = ch; break; - } /* switch */ - } - source_buf[i] = ch; - result_buf[i] = '\0'; - lower_buf[i] = lower_ch; - } - source_buf[i] = '\0'; - result_buf[i] = '\0'; - lower_buf[i] = '\0'; - source_str.Length = 2048; - source_str.MaximumLength = 2048; - source_str.Buffer = source_buf; - result_str.Length = 2048; - result_str.MaximumLength = 2048; - result_str.Buffer = result_buf; - lower_str.Length = 2048; - lower_str.MaximumLength = 2048; - lower_str.Buffer = lower_buf; - - pRtlDowncaseUnicodeString(&result_str, &source_str, 0); - for (i = 0; i <= 1024; i++) { - ok(result_str.Buffer[i] == lower_str.Buffer[i] || result_str.Buffer[i] == source_str.Buffer[i] + 1, - "RtlDowncaseUnicodeString works wrong: '%c'[=0x%x] is converted to '%c'[=0x%x], expected: '%c'[=0x%x]\n", - source_str.Buffer[i], source_str.Buffer[i], - result_str.Buffer[i], result_str.Buffer[i], - lower_str.Buffer[i], lower_str.Buffer[i]); - } -} - - -typedef struct { - int ansi_Length; - int ansi_MaximumLength; - int ansi_buf_size; - const char *ansi_buf; - int uni_Length; - int uni_MaximumLength; - int uni_buf_size; - const char *uni_buf; - BOOLEAN doalloc; - int res_Length; - int res_MaximumLength; - int res_buf_size; - const char *res_buf; - NTSTATUS result; -} ustr2astr_t; - -static const ustr2astr_t ustr2astr[] = { - { 10, 12, 12, "------------", 0, 0, 0, "", TRUE, 0, 1, 1, "", STATUS_SUCCESS}, - { 10, 12, 12, "------------", 12, 12, 12, "abcdef", TRUE, 6, 7, 7, "abcdef", STATUS_SUCCESS}, - { 0, 2, 12, "------------", 12, 12, 12, "abcdef", TRUE, 6, 7, 7, "abcdef", STATUS_SUCCESS}, - { 10, 12, 12, NULL, 12, 12, 12, "abcdef", TRUE, 6, 7, 7, "abcdef", STATUS_SUCCESS}, - { 0, 0, 12, "------------", 12, 12, 12, "abcdef", FALSE, 6, 0, 0, "", STATUS_BUFFER_OVERFLOW}, - { 0, 1, 12, "------------", 12, 12, 12, "abcdef", FALSE, 0, 1, 1, "", STATUS_BUFFER_OVERFLOW}, - { 0, 2, 12, "------------", 12, 12, 12, "abcdef", FALSE, 1, 2, 2, "a", STATUS_BUFFER_OVERFLOW}, - { 0, 3, 12, "------------", 12, 12, 12, "abcdef", FALSE, 2, 3, 3, "ab", STATUS_BUFFER_OVERFLOW}, - { 0, 5, 12, "------------", 12, 12, 12, "abcdef", FALSE, 4, 5, 5, "abcd", STATUS_BUFFER_OVERFLOW}, - { 8, 5, 12, "------------", 12, 12, 12, "abcdef", FALSE, 4, 5, 5, "abcd", STATUS_BUFFER_OVERFLOW}, - { 8, 6, 12, "------------", 12, 12, 12, "abcdef", FALSE, 5, 6, 6, "abcde", STATUS_BUFFER_OVERFLOW}, - { 8, 7, 12, "------------", 12, 12, 12, "abcdef", FALSE, 6, 7, 7, "abcdef", STATUS_SUCCESS}, - { 8, 7, 12, "------------", 0, 12, 12, NULL, FALSE, 0, 7, 0, "", STATUS_SUCCESS}, -#if 0 - /* crashes on Japanese and Chinese XP */ - { 0, 0, 12, NULL, 10, 10, 12, NULL, FALSE, 5, 0, 0, NULL, STATUS_BUFFER_OVERFLOW}, -#endif -}; -#define NB_USTR2ASTR (sizeof(ustr2astr)/sizeof(*ustr2astr)) - - -static void test_RtlUnicodeStringToAnsiString(void) -{ - size_t pos; - CHAR ansi_buf[257]; - WCHAR uni_buf[257]; - STRING ansi_str; - UNICODE_STRING uni_str; - NTSTATUS result; - unsigned int test_num; - - for (test_num = 0; test_num < NB_USTR2ASTR; test_num++) { - ansi_str.Length = ustr2astr[test_num].ansi_Length; - ansi_str.MaximumLength = ustr2astr[test_num].ansi_MaximumLength; - if (ustr2astr[test_num].ansi_buf != NULL) { - memcpy(ansi_buf, ustr2astr[test_num].ansi_buf, ustr2astr[test_num].ansi_buf_size); - ansi_buf[ustr2astr[test_num].ansi_buf_size] = '\0'; - ansi_str.Buffer = ansi_buf; - } else { - ansi_str.Buffer = NULL; - } - uni_str.Length = ustr2astr[test_num].uni_Length; - uni_str.MaximumLength = ustr2astr[test_num].uni_MaximumLength; - if (ustr2astr[test_num].uni_buf != NULL) { - for (pos = 0; pos < ustr2astr[test_num].uni_buf_size/sizeof(WCHAR); pos++) { - uni_buf[pos] = ustr2astr[test_num].uni_buf[pos]; - } - uni_str.Buffer = uni_buf; - } else { - uni_str.Buffer = NULL; - } - result = pRtlUnicodeStringToAnsiString(&ansi_str, &uni_str, ustr2astr[test_num].doalloc); - ok(result == ustr2astr[test_num].result, - "(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) has result %x, expected %x\n", - test_num, ustr2astr[test_num].doalloc, result, ustr2astr[test_num].result); - ok(ansi_str.Length == ustr2astr[test_num].res_Length, - "(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) ansi has Length %d, expected %d\n", - test_num, ustr2astr[test_num].doalloc, ansi_str.Length, ustr2astr[test_num].res_Length); - ok(ansi_str.MaximumLength == ustr2astr[test_num].res_MaximumLength, - "(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) ansi has MaximumLength %d, expected %d\n", - test_num, ustr2astr[test_num].doalloc, ansi_str.MaximumLength, ustr2astr[test_num].res_MaximumLength); - ok(memcmp(ansi_str.Buffer, ustr2astr[test_num].res_buf, ustr2astr[test_num].res_buf_size) == 0, - "(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) has ansi \"%s\" expected \"%s\"\n", - test_num, ustr2astr[test_num].doalloc, ansi_str.Buffer, ustr2astr[test_num].res_buf); - if(result == STATUS_SUCCESS && ustr2astr[test_num].doalloc) - pRtlFreeAnsiString(&ansi_str); - } -} - - -typedef struct { - int dest_Length; - int dest_MaximumLength; - int dest_buf_size; - const char *dest_buf; - const char *src; - int res_Length; - int res_MaximumLength; - int res_buf_size; - const char *res_buf; - NTSTATUS result; -} app_asc2str_t; - -static const app_asc2str_t app_asc2str[] = { - { 5, 12, 15, "TestS01234abcde", "tring", 10, 12, 15, "TestStringabcde", STATUS_SUCCESS}, - { 5, 11, 15, "TestS01234abcde", "tring", 10, 11, 15, "TestStringabcde", STATUS_SUCCESS}, - { 5, 10, 15, "TestS01234abcde", "tring", 10, 10, 15, "TestStringabcde", STATUS_SUCCESS}, - { 5, 9, 15, "TestS01234abcde", "tring", 5, 9, 15, "TestS01234abcde", STATUS_BUFFER_TOO_SMALL}, - { 5, 0, 15, "TestS01234abcde", "tring", 5, 0, 15, "TestS01234abcde", STATUS_BUFFER_TOO_SMALL}, - { 5, 14, 15, "TestS01234abcde", "tring", 10, 14, 15, "TestStringabcde", STATUS_SUCCESS}, - { 5, 14, 15, "TestS01234abcde", NULL, 5, 14, 15, "TestS01234abcde", STATUS_SUCCESS}, - { 5, 14, 15, NULL, NULL, 5, 14, 15, NULL, STATUS_SUCCESS}, - { 5, 12, 15, "Tst\0S01234abcde", "tr\0i", 7, 12, 15, "Tst\0Str234abcde", STATUS_SUCCESS}, -}; -#define NB_APP_ASC2STR (sizeof(app_asc2str)/sizeof(*app_asc2str)) - - -static void test_RtlAppendAsciizToString(void) -{ - CHAR dest_buf[257]; - STRING dest_str; - NTSTATUS result; - unsigned int test_num; - - for (test_num = 0; test_num < NB_APP_ASC2STR; test_num++) { - dest_str.Length = app_asc2str[test_num].dest_Length; - dest_str.MaximumLength = app_asc2str[test_num].dest_MaximumLength; - if (app_asc2str[test_num].dest_buf != NULL) { - memcpy(dest_buf, app_asc2str[test_num].dest_buf, app_asc2str[test_num].dest_buf_size); - dest_buf[app_asc2str[test_num].dest_buf_size] = '\0'; - dest_str.Buffer = dest_buf; - } else { - dest_str.Buffer = NULL; - } - result = pRtlAppendAsciizToString(&dest_str, app_asc2str[test_num].src); - ok(result == app_asc2str[test_num].result, - "(test %d): RtlAppendAsciizToString(dest, src) has result %x, expected %x\n", - test_num, result, app_asc2str[test_num].result); - ok(dest_str.Length == app_asc2str[test_num].res_Length, - "(test %d): RtlAppendAsciizToString(dest, src) dest has Length %d, expected %d\n", - test_num, dest_str.Length, app_asc2str[test_num].res_Length); - ok(dest_str.MaximumLength == app_asc2str[test_num].res_MaximumLength, - "(test %d): RtlAppendAsciizToString(dest, src) dest has MaximumLength %d, expected %d\n", - test_num, dest_str.MaximumLength, app_asc2str[test_num].res_MaximumLength); - if (dest_str.Buffer == dest_buf) { - ok(memcmp(dest_buf, app_asc2str[test_num].res_buf, app_asc2str[test_num].res_buf_size) == 0, - "(test %d): RtlAppendAsciizToString(dest, src) has dest \"%s\" expected \"%s\"\n", - test_num, dest_buf, app_asc2str[test_num].res_buf); - } else { - ok(dest_str.Buffer == app_asc2str[test_num].res_buf, - "(test %d): RtlAppendAsciizToString(dest, src) dest has Buffer %p expected %p\n", - test_num, dest_str.Buffer, app_asc2str[test_num].res_buf); - } - } -} - - -typedef struct { - int dest_Length; - int dest_MaximumLength; - int dest_buf_size; - const char *dest_buf; - int src_Length; - int src_MaximumLength; - int src_buf_size; - const char *src_buf; - int res_Length; - int res_MaximumLength; - int res_buf_size; - const char *res_buf; - NTSTATUS result; -} app_str2str_t; - -static const app_str2str_t app_str2str[] = { - { 5, 12, 15, "TestS01234abcde", 5, 5, 7, "tringZY", 10, 12, 15, "TestStringabcde", STATUS_SUCCESS}, - { 5, 11, 15, "TestS01234abcde", 5, 5, 7, "tringZY", 10, 11, 15, "TestStringabcde", STATUS_SUCCESS}, - { 5, 10, 15, "TestS01234abcde", 5, 5, 7, "tringZY", 10, 10, 15, "TestStringabcde", STATUS_SUCCESS}, - { 5, 9, 15, "TestS01234abcde", 5, 5, 7, "tringZY", 5, 9, 15, "TestS01234abcde", STATUS_BUFFER_TOO_SMALL}, - { 5, 0, 15, "TestS01234abcde", 0, 0, 7, "tringZY", 5, 0, 15, "TestS01234abcde", STATUS_SUCCESS}, - { 5, 14, 15, "TestS01234abcde", 0, 0, 7, "tringZY", 5, 14, 15, "TestS01234abcde", STATUS_SUCCESS}, - { 5, 14, 15, "TestS01234abcde", 0, 0, 7, NULL, 5, 14, 15, "TestS01234abcde", STATUS_SUCCESS}, - { 5, 14, 15, NULL, 0, 0, 7, NULL, 5, 14, 15, NULL, STATUS_SUCCESS}, - { 5, 12, 15, "Tst\0S01234abcde", 4, 4, 7, "tr\0iZY", 9, 12, 15, "Tst\0Str\0i4abcde", STATUS_SUCCESS}, -}; -#define NB_APP_STR2STR (sizeof(app_str2str)/sizeof(*app_str2str)) - - -static void test_RtlAppendStringToString(void) -{ - CHAR dest_buf[257]; - CHAR src_buf[257]; - STRING dest_str; - STRING src_str; - NTSTATUS result; - unsigned int test_num; - - for (test_num = 0; test_num < NB_APP_STR2STR; test_num++) { - dest_str.Length = app_str2str[test_num].dest_Length; - dest_str.MaximumLength = app_str2str[test_num].dest_MaximumLength; - if (app_str2str[test_num].dest_buf != NULL) { - memcpy(dest_buf, app_str2str[test_num].dest_buf, app_str2str[test_num].dest_buf_size); - dest_buf[app_str2str[test_num].dest_buf_size] = '\0'; - dest_str.Buffer = dest_buf; - } else { - dest_str.Buffer = NULL; - } - src_str.Length = app_str2str[test_num].src_Length; - src_str.MaximumLength = app_str2str[test_num].src_MaximumLength; - if (app_str2str[test_num].src_buf != NULL) { - memcpy(src_buf, app_str2str[test_num].src_buf, app_str2str[test_num].src_buf_size); - src_buf[app_str2str[test_num].src_buf_size] = '\0'; - src_str.Buffer = src_buf; - } else { - src_str.Buffer = NULL; - } - result = pRtlAppendStringToString(&dest_str, &src_str); - ok(result == app_str2str[test_num].result, - "(test %d): RtlAppendStringToString(dest, src) has result %x, expected %x\n", - test_num, result, app_str2str[test_num].result); - ok(dest_str.Length == app_str2str[test_num].res_Length, - "(test %d): RtlAppendStringToString(dest, src) dest has Length %d, expected %d\n", - test_num, dest_str.Length, app_str2str[test_num].res_Length); - ok(dest_str.MaximumLength == app_str2str[test_num].res_MaximumLength, - "(test %d): RtlAppendStringToString(dest, src) dest has MaximumLength %d, expected %d\n", - test_num, dest_str.MaximumLength, app_str2str[test_num].res_MaximumLength); - if (dest_str.Buffer == dest_buf) { - ok(memcmp(dest_buf, app_str2str[test_num].res_buf, app_str2str[test_num].res_buf_size) == 0, - "(test %d): RtlAppendStringToString(dest, src) has dest \"%s\" expected \"%s\"\n", - test_num, dest_buf, app_str2str[test_num].res_buf); - } else { - ok(dest_str.Buffer == app_str2str[test_num].res_buf, - "(test %d): RtlAppendStringToString(dest, src) dest has Buffer %p expected %p\n", - test_num, dest_str.Buffer, app_str2str[test_num].res_buf); - } - } -} - - -typedef struct { - int dest_Length; - int dest_MaximumLength; - int dest_buf_size; - const char *dest_buf; - const char *src; - int res_Length; - int res_MaximumLength; - int res_buf_size; - const char *res_buf; - NTSTATUS result; -} app_uni2str_t; - -static const app_uni2str_t app_uni2str[] = { - { 4, 12, 14, "Fake0123abcdef", "Ustr\0", 8, 12, 14, "FakeUstr\0\0cdef", STATUS_SUCCESS}, - { 4, 11, 14, "Fake0123abcdef", "Ustr\0", 8, 11, 14, "FakeUstr\0\0cdef", STATUS_SUCCESS}, - { 4, 10, 14, "Fake0123abcdef", "Ustr\0", 8, 10, 14, "FakeUstr\0\0cdef", STATUS_SUCCESS}, -/* In the following test the native function writes beyond MaximumLength - * { 4, 9, 14, "Fake0123abcdef", "Ustr\0", 8, 9, 14, "FakeUstrabcdef", STATUS_SUCCESS}, - */ - { 4, 8, 14, "Fake0123abcdef", "Ustr\0", 8, 8, 14, "FakeUstrabcdef", STATUS_SUCCESS}, - { 4, 7, 14, "Fake0123abcdef", "Ustr\0", 4, 7, 14, "Fake0123abcdef", STATUS_BUFFER_TOO_SMALL}, - { 4, 0, 14, "Fake0123abcdef", "Ustr\0", 4, 0, 14, "Fake0123abcdef", STATUS_BUFFER_TOO_SMALL}, - { 4, 14, 14, "Fake0123abcdef", "Ustr\0", 8, 14, 14, "FakeUstr\0\0cdef", STATUS_SUCCESS}, - { 4, 14, 14, "Fake0123abcdef", NULL, 4, 14, 14, "Fake0123abcdef", STATUS_SUCCESS}, - { 4, 14, 14, NULL, NULL, 4, 14, 14, NULL, STATUS_SUCCESS}, - { 4, 14, 14, "Fake0123abcdef", "U\0stri\0", 10, 14, 14, "FakeU\0stri\0\0ef", STATUS_SUCCESS}, - { 6, 14, 16, "Te\0\0stabcdefghij", "St\0\0ri", 8, 14, 16, "Te\0\0stSt\0\0efghij", STATUS_SUCCESS}, -}; -#define NB_APP_UNI2STR (sizeof(app_uni2str)/sizeof(*app_uni2str)) - - -static void test_RtlAppendUnicodeToString(void) -{ - WCHAR dest_buf[257]; - UNICODE_STRING dest_str; - NTSTATUS result; - unsigned int test_num; - - for (test_num = 0; test_num < NB_APP_UNI2STR; test_num++) { - dest_str.Length = app_uni2str[test_num].dest_Length; - dest_str.MaximumLength = app_uni2str[test_num].dest_MaximumLength; - if (app_uni2str[test_num].dest_buf != NULL) { - memcpy(dest_buf, app_uni2str[test_num].dest_buf, app_uni2str[test_num].dest_buf_size); - dest_buf[app_uni2str[test_num].dest_buf_size/sizeof(WCHAR)] = '\0'; - dest_str.Buffer = dest_buf; - } else { - dest_str.Buffer = NULL; - } - result = pRtlAppendUnicodeToString(&dest_str, (LPCWSTR) app_uni2str[test_num].src); - ok(result == app_uni2str[test_num].result, - "(test %d): RtlAppendUnicodeToString(dest, src) has result %x, expected %x\n", - test_num, result, app_uni2str[test_num].result); - ok(dest_str.Length == app_uni2str[test_num].res_Length, - "(test %d): RtlAppendUnicodeToString(dest, src) dest has Length %d, expected %d\n", - test_num, dest_str.Length, app_uni2str[test_num].res_Length); - ok(dest_str.MaximumLength == app_uni2str[test_num].res_MaximumLength, - "(test %d): RtlAppendUnicodeToString(dest, src) dest has MaximumLength %d, expected %d\n", - test_num, dest_str.MaximumLength, app_uni2str[test_num].res_MaximumLength); - if (dest_str.Buffer == dest_buf) { - ok(memcmp(dest_buf, app_uni2str[test_num].res_buf, app_uni2str[test_num].res_buf_size) == 0, - "(test %d): RtlAppendUnicodeToString(dest, src) has dest \"%s\" expected \"%s\"\n", - test_num, (char *) dest_buf, app_uni2str[test_num].res_buf); - } else { - ok(dest_str.Buffer == (WCHAR *) app_uni2str[test_num].res_buf, - "(test %d): RtlAppendUnicodeToString(dest, src) dest has Buffer %p expected %p\n", - test_num, dest_str.Buffer, app_uni2str[test_num].res_buf); - } - } -} - - -typedef struct { - int dest_Length; - int dest_MaximumLength; - int dest_buf_size; - const char *dest_buf; - int src_Length; - int src_MaximumLength; - int src_buf_size; - const char *src_buf; - int res_Length; - int res_MaximumLength; - int res_buf_size; - const char *res_buf; - NTSTATUS result; -} app_ustr2str_t; - -static const app_ustr2str_t app_ustr2str[] = { - { 4, 12, 14, "Fake0123abcdef", 4, 6, 8, "UstrZYXW", 8, 12, 14, "FakeUstr\0\0cdef", STATUS_SUCCESS}, - { 4, 11, 14, "Fake0123abcdef", 4, 6, 8, "UstrZYXW", 8, 11, 14, "FakeUstr\0\0cdef", STATUS_SUCCESS}, - { 4, 10, 14, "Fake0123abcdef", 4, 6, 8, "UstrZYXW", 8, 10, 14, "FakeUstr\0\0cdef", STATUS_SUCCESS}, -/* In the following test the native function writes beyond MaximumLength - * { 4, 9, 14, "Fake0123abcdef", 4, 6, 8, "UstrZYXW", 8, 9, 14, "FakeUstrabcdef", STATUS_SUCCESS}, - */ - { 4, 8, 14, "Fake0123abcdef", 4, 6, 8, "UstrZYXW", 8, 8, 14, "FakeUstrabcdef", STATUS_SUCCESS}, - { 4, 7, 14, "Fake0123abcdef", 4, 6, 8, "UstrZYXW", 4, 7, 14, "Fake0123abcdef", STATUS_BUFFER_TOO_SMALL}, - { 4, 0, 14, "Fake0123abcdef", 0, 0, 8, "UstrZYXW", 4, 0, 14, "Fake0123abcdef", STATUS_SUCCESS}, - { 4, 14, 14, "Fake0123abcdef", 0, 0, 8, "UstrZYXW", 4, 14, 14, "Fake0123abcdef", STATUS_SUCCESS}, - { 4, 14, 14, "Fake0123abcdef", 0, 0, 8, NULL, 4, 14, 14, "Fake0123abcdef", STATUS_SUCCESS}, - { 4, 14, 14, NULL, 0, 0, 8, NULL, 4, 14, 14, NULL, STATUS_SUCCESS}, - { 6, 14, 16, "Te\0\0stabcdefghij", 6, 8, 8, "St\0\0riZY", 12, 14, 16, "Te\0\0stSt\0\0ri\0\0ij", STATUS_SUCCESS}, -}; -#define NB_APP_USTR2STR (sizeof(app_ustr2str)/sizeof(*app_ustr2str)) - - -static void test_RtlAppendUnicodeStringToString(void) -{ - WCHAR dest_buf[257]; - WCHAR src_buf[257]; - UNICODE_STRING dest_str; - UNICODE_STRING src_str; - NTSTATUS result; - unsigned int test_num; - - for (test_num = 0; test_num < NB_APP_USTR2STR; test_num++) { - dest_str.Length = app_ustr2str[test_num].dest_Length; - dest_str.MaximumLength = app_ustr2str[test_num].dest_MaximumLength; - if (app_ustr2str[test_num].dest_buf != NULL) { - memcpy(dest_buf, app_ustr2str[test_num].dest_buf, app_ustr2str[test_num].dest_buf_size); - dest_buf[app_ustr2str[test_num].dest_buf_size/sizeof(WCHAR)] = '\0'; - dest_str.Buffer = dest_buf; - } else { - dest_str.Buffer = NULL; - } - src_str.Length = app_ustr2str[test_num].src_Length; - src_str.MaximumLength = app_ustr2str[test_num].src_MaximumLength; - if (app_ustr2str[test_num].src_buf != NULL) { - memcpy(src_buf, app_ustr2str[test_num].src_buf, app_ustr2str[test_num].src_buf_size); - src_buf[app_ustr2str[test_num].src_buf_size/sizeof(WCHAR)] = '\0'; - src_str.Buffer = src_buf; - } else { - src_str.Buffer = NULL; - } - result = pRtlAppendUnicodeStringToString(&dest_str, &src_str); - ok(result == app_ustr2str[test_num].result, - "(test %d): RtlAppendStringToString(dest, src) has result %x, expected %x\n", - test_num, result, app_ustr2str[test_num].result); - ok(dest_str.Length == app_ustr2str[test_num].res_Length, - "(test %d): RtlAppendStringToString(dest, src) dest has Length %d, expected %d\n", - test_num, dest_str.Length, app_ustr2str[test_num].res_Length); - ok(dest_str.MaximumLength == app_ustr2str[test_num].res_MaximumLength, - "(test %d): RtlAppendStringToString(dest, src) dest has MaximumLength %d, expected %d\n", - test_num, dest_str.MaximumLength, app_ustr2str[test_num].res_MaximumLength); - if (dest_str.Buffer == dest_buf) { - ok(memcmp(dest_buf, app_ustr2str[test_num].res_buf, app_ustr2str[test_num].res_buf_size) == 0, - "(test %d): RtlAppendStringToString(dest, src) has dest \"%s\" expected \"%s\"\n", - test_num, (char *) dest_buf, app_ustr2str[test_num].res_buf); - } else { - ok(dest_str.Buffer == (WCHAR *) app_ustr2str[test_num].res_buf, - "(test %d): RtlAppendStringToString(dest, src) dest has Buffer %p expected %p\n", - test_num, dest_str.Buffer, app_ustr2str[test_num].res_buf); - } - } -} - - -typedef struct { - int flags; - const char *main_str; - const char *search_chars; - USHORT pos; - NTSTATUS result; -} find_ch_in_ustr_t; - -static const find_ch_in_ustr_t find_ch_in_ustr[] = { - { 0, "Some Wild String", "S", 2, STATUS_SUCCESS}, - { 0, "This is a String", "String", 6, STATUS_SUCCESS}, - { 1, "This is a String", "String", 30, STATUS_SUCCESS}, - { 2, "This is a String", "String", 2, STATUS_SUCCESS}, - { 3, "This is a String", "String", 18, STATUS_SUCCESS}, - { 0, "This is a String", "Wild", 6, STATUS_SUCCESS}, - { 1, "This is a String", "Wild", 26, STATUS_SUCCESS}, - { 2, "This is a String", "Wild", 2, STATUS_SUCCESS}, - { 3, "This is a String", "Wild", 30, STATUS_SUCCESS}, - { 0, "abcdefghijklmnopqrstuvwxyz", "", 0, STATUS_NOT_FOUND}, - { 0, "abcdefghijklmnopqrstuvwxyz", "123", 0, STATUS_NOT_FOUND}, - { 0, "abcdefghijklmnopqrstuvwxyz", "a", 2, STATUS_SUCCESS}, - { 0, "abcdefghijklmnopqrstuvwxyz", "12a34", 2, STATUS_SUCCESS}, - { 0, "abcdefghijklmnopqrstuvwxyz", "12b34", 4, STATUS_SUCCESS}, - { 0, "abcdefghijklmnopqrstuvwxyz", "12y34", 50, STATUS_SUCCESS}, - { 0, "abcdefghijklmnopqrstuvwxyz", "12z34", 52, STATUS_SUCCESS}, - { 0, "abcdefghijklmnopqrstuvwxyz", "rvz", 36, STATUS_SUCCESS}, - { 0, "abcdefghijklmmlkjihgfedcba", "egik", 10, STATUS_SUCCESS}, - { 1, "abcdefghijklmnopqrstuvwxyz", "", 0, STATUS_NOT_FOUND}, - { 1, "abcdefghijklmnopqrstuvwxyz", "rvz", 50, STATUS_SUCCESS}, - { 1, "abcdefghijklmnopqrstuvwxyz", "ravy", 48, STATUS_SUCCESS}, - { 1, "abcdefghijklmnopqrstuvwxyz", "raxv", 46, STATUS_SUCCESS}, - { 2, "abcdefghijklmnopqrstuvwxyz", "", 2, STATUS_SUCCESS}, - { 2, "abcdefghijklmnopqrstuvwxyz", "rvz", 2, STATUS_SUCCESS}, - { 2, "abcdefghijklmnopqrstuvwxyz", "vaz", 4, STATUS_SUCCESS}, - { 2, "abcdefghijklmnopqrstuvwxyz", "ravbz", 6, STATUS_SUCCESS}, - { 3, "abcdefghijklmnopqrstuvwxyz", "", 50, STATUS_SUCCESS}, - { 3, "abcdefghijklmnopqrstuvwxyz", "123", 50, STATUS_SUCCESS}, - { 3, "abcdefghijklmnopqrstuvwxyz", "ahp", 50, STATUS_SUCCESS}, - { 3, "abcdefghijklmnopqrstuvwxyz", "rvz", 48, STATUS_SUCCESS}, - { 0, NULL, "abc", 0, STATUS_NOT_FOUND}, - { 1, NULL, "abc", 0, STATUS_NOT_FOUND}, - { 2, NULL, "abc", 0, STATUS_NOT_FOUND}, - { 3, NULL, "abc", 0, STATUS_NOT_FOUND}, - { 0, "abcdefghijklmnopqrstuvwxyz", NULL, 0, STATUS_NOT_FOUND}, - { 1, "abcdefghijklmnopqrstuvwxyz", NULL, 0, STATUS_NOT_FOUND}, - { 2, "abcdefghijklmnopqrstuvwxyz", NULL, 2, STATUS_SUCCESS}, - { 3, "abcdefghijklmnopqrstuvwxyz", NULL, 50, STATUS_SUCCESS}, - { 0, NULL, NULL, 0, STATUS_NOT_FOUND}, - { 1, NULL, NULL, 0, STATUS_NOT_FOUND}, - { 2, NULL, NULL, 0, STATUS_NOT_FOUND}, - { 3, NULL, NULL, 0, STATUS_NOT_FOUND}, - { 0, "abcdabcdabcdabcdabcdabcd", "abcd", 2, STATUS_SUCCESS}, - { 1, "abcdabcdabcdabcdabcdabcd", "abcd", 46, STATUS_SUCCESS}, - { 2, "abcdabcdabcdabcdabcdabcd", "abcd", 0, STATUS_NOT_FOUND}, - { 3, "abcdabcdabcdabcdabcdabcd", "abcd", 0, STATUS_NOT_FOUND}, -}; -#define NB_FIND_CH_IN_USTR (sizeof(find_ch_in_ustr)/sizeof(*find_ch_in_ustr)) - - -static void test_RtlFindCharInUnicodeString(void) -{ - WCHAR main_str_buf[257]; - WCHAR search_chars_buf[257]; - UNICODE_STRING main_str; - UNICODE_STRING search_chars; - USHORT pos; - NTSTATUS result; - unsigned int idx; - unsigned int test_num; - - for (test_num = 0; test_num < NB_FIND_CH_IN_USTR; test_num++) { - if (find_ch_in_ustr[test_num].main_str != NULL) { - main_str.Length = strlen(find_ch_in_ustr[test_num].main_str) * sizeof(WCHAR); - main_str.MaximumLength = main_str.Length + sizeof(WCHAR); - for (idx = 0; idx < main_str.Length / sizeof(WCHAR); idx++) { - main_str_buf[idx] = find_ch_in_ustr[test_num].main_str[idx]; - } - main_str.Buffer = main_str_buf; - } else { - main_str.Length = 0; - main_str.MaximumLength = 0; - main_str.Buffer = NULL; - } - if (find_ch_in_ustr[test_num].search_chars != NULL) { - search_chars.Length = strlen(find_ch_in_ustr[test_num].search_chars) * sizeof(WCHAR); - search_chars.MaximumLength = search_chars.Length + sizeof(WCHAR); - for (idx = 0; idx < search_chars.Length / sizeof(WCHAR); idx++) { - search_chars_buf[idx] = find_ch_in_ustr[test_num].search_chars[idx]; - } - search_chars.Buffer = search_chars_buf; - } else { - search_chars.Length = 0; - search_chars.MaximumLength = 0; - search_chars.Buffer = NULL; - } - pos = 12345; - result = pRtlFindCharInUnicodeString(find_ch_in_ustr[test_num].flags, &main_str, &search_chars, &pos); - ok(result == find_ch_in_ustr[test_num].result, - "(test %d): RtlFindCharInUnicodeString(%d, %s, %s, [out]) has result %x, expected %x\n", - test_num, find_ch_in_ustr[test_num].flags, - find_ch_in_ustr[test_num].main_str, find_ch_in_ustr[test_num].search_chars, - result, find_ch_in_ustr[test_num].result); - ok(pos == find_ch_in_ustr[test_num].pos, - "(test %d): RtlFindCharInUnicodeString(%d, %s, %s, [out]) assigns %d to pos, expected %d\n", - test_num, find_ch_in_ustr[test_num].flags, - find_ch_in_ustr[test_num].main_str, find_ch_in_ustr[test_num].search_chars, - pos, find_ch_in_ustr[test_num].pos); - } -} - - -typedef struct { - int base; - const char *str; - int value; - NTSTATUS result, alternative; -} str2int_t; - -static const str2int_t str2int[] = { - { 0, "1011101100", 1011101100, STATUS_SUCCESS}, - { 0, "1234567", 1234567, STATUS_SUCCESS}, - { 0, "-214", -214, STATUS_SUCCESS}, - { 0, "+214", 214, STATUS_SUCCESS}, /* The + sign is allowed also */ - { 0, "--214", 0, STATUS_SUCCESS}, /* Do not accept more than one sign */ - { 0, "-+214", 0, STATUS_SUCCESS}, - { 0, "++214", 0, STATUS_SUCCESS}, - { 0, "+-214", 0, STATUS_SUCCESS}, - { 0, "\001\002\003\00411", 11, STATUS_SUCCESS}, /* whitespace char 1 to 4 */ - { 0, "\005\006\007\01012", 12, STATUS_SUCCESS}, /* whitespace char 5 to 8 */ - { 0, "\011\012\013\01413", 13, STATUS_SUCCESS}, /* whitespace char 9 to 12 */ - { 0, "\015\016\017\02014", 14, STATUS_SUCCESS}, /* whitespace char 13 to 16 */ - { 0, "\021\022\023\02415", 15, STATUS_SUCCESS}, /* whitespace char 17 to 20 */ - { 0, "\025\026\027\03016", 16, STATUS_SUCCESS}, /* whitespace char 21 to 24 */ - { 0, "\031\032\033\03417", 17, STATUS_SUCCESS}, /* whitespace char 25 to 28 */ - { 0, "\035\036\037\04018", 18, STATUS_SUCCESS}, /* whitespace char 29 to 32 */ - { 0, " \n \r \t214", 214, STATUS_SUCCESS}, - { 0, " \n \r \t+214", 214, STATUS_SUCCESS}, /* Signs can be used after whitespace */ - { 0, " \n \r \t-214", -214, STATUS_SUCCESS}, - { 0, "+214 0", 214, STATUS_SUCCESS}, /* Space terminates the number */ - { 0, " 214.01", 214, STATUS_SUCCESS}, /* Decimal point not accepted */ - { 0, " 214,01", 214, STATUS_SUCCESS}, /* Decimal comma not accepted */ - { 0, "f81", 0, STATUS_SUCCESS}, - { 0, "0x12345", 0x12345, STATUS_SUCCESS}, /* Hex */ - { 0, "00x12345", 0, STATUS_SUCCESS}, - { 0, "0xx12345", 0, STATUS_SUCCESS}, - { 0, "1x34", 1, STATUS_SUCCESS}, - { 0, "-9999999999", -1410065407, STATUS_SUCCESS}, /* Big negative integer */ - { 0, "-2147483649", 2147483647, STATUS_SUCCESS}, /* Too small to fit in 32 Bits */ - { 0, "-2147483648", 0x80000000L, STATUS_SUCCESS}, /* Smallest negative integer */ - { 0, "-2147483647", -2147483647, STATUS_SUCCESS}, - { 0, "-1", -1, STATUS_SUCCESS}, - { 0, "0", 0, STATUS_SUCCESS}, - { 0, "1", 1, STATUS_SUCCESS}, - { 0, "2147483646", 2147483646, STATUS_SUCCESS}, - { 0, "2147483647", 2147483647, STATUS_SUCCESS}, /* Largest signed positive integer */ - { 0, "2147483648", 0x80000000L, STATUS_SUCCESS}, /* Positive int equal to smallest negative int */ - { 0, "2147483649", -2147483647, STATUS_SUCCESS}, - { 0, "4294967294", -2, STATUS_SUCCESS}, - { 0, "4294967295", -1, STATUS_SUCCESS}, /* Largest unsigned integer */ - { 0, "4294967296", 0, STATUS_SUCCESS}, /* Too big to fit in 32 Bits */ - { 0, "9999999999", 1410065407, STATUS_SUCCESS}, /* Big positive integer */ - { 0, "056789", 56789, STATUS_SUCCESS}, /* Leading zero and still decimal */ - { 0, "b1011101100", 0, STATUS_SUCCESS}, /* Binary (b-notation) */ - { 0, "-b1011101100", 0, STATUS_SUCCESS}, /* Negative Binary (b-notation) */ - { 0, "b10123456789", 0, STATUS_SUCCESS}, /* Binary with nonbinary digits (2-9) */ - { 0, "0b1011101100", 748, STATUS_SUCCESS}, /* Binary (0b-notation) */ - { 0, "-0b1011101100", -748, STATUS_SUCCESS}, /* Negative binary (0b-notation) */ - { 0, "0b10123456789", 5, STATUS_SUCCESS}, /* Binary with nonbinary digits (2-9) */ - { 0, "-0b10123456789", -5, STATUS_SUCCESS}, /* Negative binary with nonbinary digits (2-9) */ - { 0, "0b1", 1, STATUS_SUCCESS}, /* one digit binary */ - { 0, "0b2", 0, STATUS_SUCCESS}, /* empty binary */ - { 0, "0b", 0, STATUS_SUCCESS}, /* empty binary */ - { 0, "o1234567", 0, STATUS_SUCCESS}, /* Octal (o-notation) */ - { 0, "-o1234567", 0, STATUS_SUCCESS}, /* Negative Octal (o-notation) */ - { 0, "o56789", 0, STATUS_SUCCESS}, /* Octal with nonoctal digits (8 and 9) */ - { 0, "0o1234567", 01234567, STATUS_SUCCESS}, /* Octal (0o-notation) */ - { 0, "-0o1234567", -01234567, STATUS_SUCCESS}, /* Negative octal (0o-notation) */ - { 0, "0o56789", 0567, STATUS_SUCCESS}, /* Octal with nonoctal digits (8 and 9) */ - { 0, "-0o56789", -0567, STATUS_SUCCESS}, /* Negative octal with nonoctal digits (8 and 9) */ - { 0, "0o7", 7, STATUS_SUCCESS}, /* one digit octal */ - { 0, "0o8", 0, STATUS_SUCCESS}, /* empty octal */ - { 0, "0o", 0, STATUS_SUCCESS}, /* empty octal */ - { 0, "0d1011101100", 0, STATUS_SUCCESS}, /* explicit decimal with 0d */ - { 0, "x89abcdef", 0, STATUS_SUCCESS}, /* Hex with lower case digits a-f (x-notation) */ - { 0, "xFEDCBA00", 0, STATUS_SUCCESS}, /* Hex with upper case digits A-F (x-notation) */ - { 0, "-xFEDCBA00", 0, STATUS_SUCCESS}, /* Negative Hexadecimal (x-notation) */ - { 0, "0x89abcdef", 0x89abcdef, STATUS_SUCCESS}, /* Hex with lower case digits a-f (0x-notation) */ - { 0, "0xFEDCBA00", 0xFEDCBA00, STATUS_SUCCESS}, /* Hex with upper case digits A-F (0x-notation) */ - { 0, "-0xFEDCBA00", 19088896, STATUS_SUCCESS}, /* Negative Hexadecimal (0x-notation) */ - { 0, "0xabcdefgh", 0xabcdef, STATUS_SUCCESS}, /* Hex with illegal lower case digits (g-z) */ - { 0, "0xABCDEFGH", 0xABCDEF, STATUS_SUCCESS}, /* Hex with illegal upper case digits (G-Z) */ - { 0, "0xF", 0xf, STATUS_SUCCESS}, /* one digit hexadecimal */ - { 0, "0xG", 0, STATUS_SUCCESS}, /* empty hexadecimal */ - { 0, "0x", 0, STATUS_SUCCESS}, /* empty hexadecimal */ - { 0, "", 0, STATUS_SUCCESS, STATUS_INVALID_PARAMETER}, /* empty string */ - { 2, "1011101100", 748, STATUS_SUCCESS}, - { 2, "-1011101100", -748, STATUS_SUCCESS}, - { 2, "2", 0, STATUS_SUCCESS}, - { 2, "0b1011101100", 0, STATUS_SUCCESS}, - { 2, "0o1011101100", 0, STATUS_SUCCESS}, - { 2, "0d1011101100", 0, STATUS_SUCCESS}, - { 2, "0x1011101100", 0, STATUS_SUCCESS}, - { 2, "", 0, STATUS_SUCCESS, STATUS_INVALID_PARAMETER}, /* empty string */ - { 8, "1011101100", 136610368, STATUS_SUCCESS}, - { 8, "-1011101100", -136610368, STATUS_SUCCESS}, - { 8, "8", 0, STATUS_SUCCESS}, - { 8, "0b1011101100", 0, STATUS_SUCCESS}, - { 8, "0o1011101100", 0, STATUS_SUCCESS}, - { 8, "0d1011101100", 0, STATUS_SUCCESS}, - { 8, "0x1011101100", 0, STATUS_SUCCESS}, - { 8, "", 0, STATUS_SUCCESS, STATUS_INVALID_PARAMETER}, /* empty string */ - {10, "1011101100", 1011101100, STATUS_SUCCESS}, - {10, "-1011101100", -1011101100, STATUS_SUCCESS}, - {10, "0b1011101100", 0, STATUS_SUCCESS}, - {10, "0o1011101100", 0, STATUS_SUCCESS}, - {10, "0d1011101100", 0, STATUS_SUCCESS}, - {10, "0x1011101100", 0, STATUS_SUCCESS}, - {10, "o12345", 0, STATUS_SUCCESS}, /* Octal although base is 10 */ - {10, "", 0, STATUS_SUCCESS, STATUS_INVALID_PARAMETER}, /* empty string */ - {16, "1011101100", 286265600, STATUS_SUCCESS}, - {16, "-1011101100", -286265600, STATUS_SUCCESS}, - {16, "G", 0, STATUS_SUCCESS}, - {16, "g", 0, STATUS_SUCCESS}, - {16, "0b1011101100", 286265600, STATUS_SUCCESS}, - {16, "0o1011101100", 0, STATUS_SUCCESS}, - {16, "0d1011101100", 286265600, STATUS_SUCCESS}, - {16, "0x1011101100", 0, STATUS_SUCCESS}, - {16, "", 0, STATUS_SUCCESS, STATUS_INVALID_PARAMETER}, /* empty string */ - {20, "0", 0, STATUS_INVALID_PARAMETER}, /* illegal base */ - {-8, "0", 0, STATUS_INVALID_PARAMETER}, /* Negative base */ -/* { 0, NULL, 0, STATUS_SUCCESS}, */ /* NULL as string */ -}; -#define NB_STR2INT (sizeof(str2int)/sizeof(*str2int)) - - -static void test_RtlUnicodeStringToInteger(void) -{ - unsigned int test_num; - int value; - NTSTATUS result; - WCHAR *wstr; - UNICODE_STRING uni; - - for (test_num = 0; test_num < NB_STR2INT; test_num++) { - wstr = AtoW(str2int[test_num].str); - value = 0xdeadbeef; - pRtlInitUnicodeString(&uni, wstr); - result = pRtlUnicodeStringToInteger(&uni, str2int[test_num].base, &value); - ok(result == str2int[test_num].result || - (str2int[test_num].alternative && result == str2int[test_num].alternative), - "(test %d): RtlUnicodeStringToInteger(\"%s\", %d, [out]) has result %x, expected: %x (%x)\n", - test_num, str2int[test_num].str, str2int[test_num].base, result, - str2int[test_num].result, str2int[test_num].alternative); - if (result == STATUS_SUCCESS) - ok(value == str2int[test_num].value || - broken(str2int[test_num].str[0] == '\0' && str2int[test_num].base == 16), /* nt4 */ - "(test %d): RtlUnicodeStringToInteger(\"%s\", %d, [out]) assigns value %d, expected: %d\n", - test_num, str2int[test_num].str, str2int[test_num].base, value, str2int[test_num].value); - else - ok(value == 0xdeadbeef || value == 0 /* vista */, - "(test %d): RtlUnicodeStringToInteger(\"%s\", %d, [out]) assigns value %d, expected 0 or deadbeef\n", - test_num, str2int[test_num].str, str2int[test_num].base, value); - HeapFree(GetProcessHeap(), 0, wstr); - } - - wstr = AtoW(str2int[1].str); - pRtlInitUnicodeString(&uni, wstr); - result = pRtlUnicodeStringToInteger(&uni, str2int[1].base, NULL); - ok(result == STATUS_ACCESS_VIOLATION, - "call failed: RtlUnicodeStringToInteger(\"%s\", %d, NULL) has result %x\n", - str2int[1].str, str2int[1].base, result); - result = pRtlUnicodeStringToInteger(&uni, 20, NULL); - ok(result == STATUS_INVALID_PARAMETER || result == STATUS_ACCESS_VIOLATION, - "call failed: RtlUnicodeStringToInteger(\"%s\", 20, NULL) has result %x\n", - str2int[1].str, result); - - uni.Length = 10; /* Make Length shorter (5 WCHARS instead of 7) */ - result = pRtlUnicodeStringToInteger(&uni, str2int[1].base, &value); - ok(result == STATUS_SUCCESS, - "call failed: RtlUnicodeStringToInteger(\"12345\", %d, [out]) has result %x\n", - str2int[1].base, result); - ok(value == 12345, - "didn't return expected value (test a): expected: %d, got: %d\n", - 12345, value); - - uni.Length = 5; /* Use odd Length (2.5 WCHARS) */ - result = pRtlUnicodeStringToInteger(&uni, str2int[1].base, &value); - ok(result == STATUS_SUCCESS || result == STATUS_INVALID_PARAMETER /* vista */, - "call failed: RtlUnicodeStringToInteger(\"12\", %d, [out]) has result %x\n", - str2int[1].base, result); - if (result == STATUS_SUCCESS) - ok(value == 12, "didn't return expected value (test b): expected: %d, got: %d\n", 12, value); - - uni.Length = 2; - result = pRtlUnicodeStringToInteger(&uni, str2int[1].base, &value); - ok(result == STATUS_SUCCESS, - "call failed: RtlUnicodeStringToInteger(\"1\", %d, [out]) has result %x\n", - str2int[1].base, result); - ok(value == 1, - "didn't return expected value (test c): expected: %d, got: %d\n", - 1, value); - /* w2k: uni.Length = 0 returns value 11234567 instead of 0 */ - HeapFree(GetProcessHeap(), 0, wstr); -} - - -static void test_RtlCharToInteger(void) -{ - unsigned int test_num; - int value; - NTSTATUS result; - - for (test_num = 0; test_num < NB_STR2INT; test_num++) { - /* w2k skips a leading '\0' and processes the string after */ - if (str2int[test_num].str[0] != '\0') { - value = 0xdeadbeef; - result = pRtlCharToInteger(str2int[test_num].str, str2int[test_num].base, &value); - ok(result == str2int[test_num].result || - (str2int[test_num].alternative && result == str2int[test_num].alternative), - "(test %d): call failed: RtlCharToInteger(\"%s\", %d, [out]) has result %x, expected: %x (%x)\n", - test_num, str2int[test_num].str, str2int[test_num].base, result, - str2int[test_num].result, str2int[test_num].alternative); - if (result == STATUS_SUCCESS) - ok(value == str2int[test_num].value, - "(test %d): call failed: RtlCharToInteger(\"%s\", %d, [out]) assigns value %d, expected: %d\n", - test_num, str2int[test_num].str, str2int[test_num].base, value, str2int[test_num].value); - else - ok(value == 0 || value == 0xdeadbeef, - "(test %d): call failed: RtlCharToInteger(\"%s\", %d, [out]) assigns value %d, expected 0 or deadbeef\n", - test_num, str2int[test_num].str, str2int[test_num].base, value); - } - } - - result = pRtlCharToInteger(str2int[1].str, str2int[1].base, NULL); - ok(result == STATUS_ACCESS_VIOLATION, - "call failed: RtlCharToInteger(\"%s\", %d, NULL) has result %x\n", - str2int[1].str, str2int[1].base, result); - - result = pRtlCharToInteger(str2int[1].str, 20, NULL); - ok(result == STATUS_INVALID_PARAMETER, - "call failed: RtlCharToInteger(\"%s\", 20, NULL) has result %x\n", - str2int[1].str, result); -} - - -#define STRI_BUFFER_LENGTH 35 - -typedef struct { - int base; - ULONG value; - USHORT Length; - USHORT MaximumLength; - const char *Buffer; - NTSTATUS result; -} int2str_t; - -static const int2str_t int2str[] = { - {10, 123, 3, 11, "123\0-------------------------------", STATUS_SUCCESS}, - - { 0, 0x80000000U, 10, 11, "2147483648\0------------------------", STATUS_SUCCESS}, /* min signed int */ - { 0, -2147483647, 10, 11, "2147483649\0------------------------", STATUS_SUCCESS}, - { 0, -2, 10, 11, "4294967294\0------------------------", STATUS_SUCCESS}, - { 0, -1, 10, 11, "4294967295\0------------------------", STATUS_SUCCESS}, - { 0, 0, 1, 11, "0\0---------------------------------", STATUS_SUCCESS}, - { 0, 1, 1, 11, "1\0---------------------------------", STATUS_SUCCESS}, - { 0, 12, 2, 11, "12\0--------------------------------", STATUS_SUCCESS}, - { 0, 123, 3, 11, "123\0-------------------------------", STATUS_SUCCESS}, - { 0, 1234, 4, 11, "1234\0------------------------------", STATUS_SUCCESS}, - { 0, 12345, 5, 11, "12345\0-----------------------------", STATUS_SUCCESS}, - { 0, 123456, 6, 11, "123456\0----------------------------", STATUS_SUCCESS}, - { 0, 1234567, 7, 11, "1234567\0---------------------------", STATUS_SUCCESS}, - { 0, 12345678, 8, 11, "12345678\0--------------------------", STATUS_SUCCESS}, - { 0, 123456789, 9, 11, "123456789\0-------------------------", STATUS_SUCCESS}, - { 0, 2147483646, 10, 11, "2147483646\0------------------------", STATUS_SUCCESS}, - { 0, 2147483647, 10, 11, "2147483647\0------------------------", STATUS_SUCCESS}, /* max signed int */ - { 0, 2147483648U, 10, 11, "2147483648\0------------------------", STATUS_SUCCESS}, /* uint = -max int */ - { 0, 2147483649U, 10, 11, "2147483649\0------------------------", STATUS_SUCCESS}, - { 0, 4294967294U, 10, 11, "4294967294\0------------------------", STATUS_SUCCESS}, - { 0, 4294967295U, 10, 11, "4294967295\0------------------------", STATUS_SUCCESS}, /* max unsigned int */ - - { 2, 0x80000000U, 32, 33, "10000000000000000000000000000000\0--", STATUS_SUCCESS}, /* min signed int */ - { 2, -2147483647, 32, 33, "10000000000000000000000000000001\0--", STATUS_SUCCESS}, - { 2, -2, 32, 33, "11111111111111111111111111111110\0--", STATUS_SUCCESS}, - { 2, -1, 32, 33, "11111111111111111111111111111111\0--", STATUS_SUCCESS}, - { 2, 0, 1, 33, "0\0---------------------------------", STATUS_SUCCESS}, - { 2, 1, 1, 33, "1\0---------------------------------", STATUS_SUCCESS}, - { 2, 10, 4, 33, "1010\0------------------------------", STATUS_SUCCESS}, - { 2, 100, 7, 33, "1100100\0---------------------------", STATUS_SUCCESS}, - { 2, 1000, 10, 33, "1111101000\0------------------------", STATUS_SUCCESS}, - { 2, 10000, 14, 33, "10011100010000\0--------------------", STATUS_SUCCESS}, - { 2, 32767, 15, 33, "111111111111111\0-------------------", STATUS_SUCCESS}, -/* { 2, 32768, 16, 33, "1000000000000000\0------------------", STATUS_SUCCESS}, broken on windows */ -/* { 2, 65535, 16, 33, "1111111111111111\0------------------", STATUS_SUCCESS}, broken on windows */ - { 2, 65536, 17, 33, "10000000000000000\0-----------------", STATUS_SUCCESS}, - { 2, 100000, 17, 33, "11000011010100000\0-----------------", STATUS_SUCCESS}, - { 2, 1000000, 20, 33, "11110100001001000000\0--------------", STATUS_SUCCESS}, - { 2, 10000000, 24, 33, "100110001001011010000000\0----------", STATUS_SUCCESS}, - { 2, 100000000, 27, 33, "101111101011110000100000000\0-------", STATUS_SUCCESS}, - { 2, 1000000000, 30, 33, "111011100110101100101000000000\0----", STATUS_SUCCESS}, - { 2, 1073741823, 30, 33, "111111111111111111111111111111\0----", STATUS_SUCCESS}, - { 2, 2147483646, 31, 33, "1111111111111111111111111111110\0---", STATUS_SUCCESS}, - { 2, 2147483647, 31, 33, "1111111111111111111111111111111\0---", STATUS_SUCCESS}, /* max signed int */ - { 2, 2147483648U, 32, 33, "10000000000000000000000000000000\0--", STATUS_SUCCESS}, /* uint = -max int */ - { 2, 2147483649U, 32, 33, "10000000000000000000000000000001\0--", STATUS_SUCCESS}, - { 2, 4294967294U, 32, 33, "11111111111111111111111111111110\0--", STATUS_SUCCESS}, - { 2, 4294967295U, 32, 33, "11111111111111111111111111111111\0--", STATUS_SUCCESS}, /* max unsigned int */ - - { 8, 0x80000000U, 11, 12, "20000000000\0-----------------------", STATUS_SUCCESS}, /* min signed int */ - { 8, -2147483647, 11, 12, "20000000001\0-----------------------", STATUS_SUCCESS}, - { 8, -2, 11, 12, "37777777776\0-----------------------", STATUS_SUCCESS}, - { 8, -1, 11, 12, "37777777777\0-----------------------", STATUS_SUCCESS}, - { 8, 0, 1, 12, "0\0---------------------------------", STATUS_SUCCESS}, - { 8, 1, 1, 12, "1\0---------------------------------", STATUS_SUCCESS}, - { 8, 2147483646, 11, 12, "17777777776\0-----------------------", STATUS_SUCCESS}, - { 8, 2147483647, 11, 12, "17777777777\0-----------------------", STATUS_SUCCESS}, /* max signed int */ - { 8, 2147483648U, 11, 12, "20000000000\0-----------------------", STATUS_SUCCESS}, /* uint = -max int */ - { 8, 2147483649U, 11, 12, "20000000001\0-----------------------", STATUS_SUCCESS}, - { 8, 4294967294U, 11, 12, "37777777776\0-----------------------", STATUS_SUCCESS}, - { 8, 4294967295U, 11, 12, "37777777777\0-----------------------", STATUS_SUCCESS}, /* max unsigned int */ - - {10, 0x80000000U, 10, 11, "2147483648\0------------------------", STATUS_SUCCESS}, /* min signed int */ - {10, -2147483647, 10, 11, "2147483649\0------------------------", STATUS_SUCCESS}, - {10, -2, 10, 11, "4294967294\0------------------------", STATUS_SUCCESS}, - {10, -1, 10, 11, "4294967295\0------------------------", STATUS_SUCCESS}, - {10, 0, 1, 11, "0\0---------------------------------", STATUS_SUCCESS}, - {10, 1, 1, 11, "1\0---------------------------------", STATUS_SUCCESS}, - {10, 2147483646, 10, 11, "2147483646\0------------------------", STATUS_SUCCESS}, - {10, 2147483647, 10, 11, "2147483647\0------------------------", STATUS_SUCCESS}, /* max signed int */ - {10, 2147483648U, 10, 11, "2147483648\0------------------------", STATUS_SUCCESS}, /* uint = -max int */ - {10, 2147483649U, 10, 11, "2147483649\0------------------------", STATUS_SUCCESS}, - {10, 4294967294U, 10, 11, "4294967294\0------------------------", STATUS_SUCCESS}, - {10, 4294967295U, 10, 11, "4294967295\0------------------------", STATUS_SUCCESS}, /* max unsigned int */ - - {16, 0x80000000U, 8, 9, "80000000\0--------------------------", STATUS_SUCCESS}, /* min signed int */ - {16, -2147483647, 8, 9, "80000001\0--------------------------", STATUS_SUCCESS}, - {16, -2, 8, 9, "FFFFFFFE\0--------------------------", STATUS_SUCCESS}, - {16, -1, 8, 9, "FFFFFFFF\0--------------------------", STATUS_SUCCESS}, - {16, 0, 1, 9, "0\0---------------------------------", STATUS_SUCCESS}, - {16, 1, 1, 9, "1\0---------------------------------", STATUS_SUCCESS}, - {16, 2147483646, 8, 9, "7FFFFFFE\0--------------------------", STATUS_SUCCESS}, - {16, 2147483647, 8, 9, "7FFFFFFF\0--------------------------", STATUS_SUCCESS}, /* max signed int */ - {16, 2147483648U, 8, 9, "80000000\0--------------------------", STATUS_SUCCESS}, /* uint = -max int */ - {16, 2147483649U, 8, 9, "80000001\0--------------------------", STATUS_SUCCESS}, - {16, 4294967294U, 8, 9, "FFFFFFFE\0--------------------------", STATUS_SUCCESS}, - {16, 4294967295U, 8, 9, "FFFFFFFF\0--------------------------", STATUS_SUCCESS}, /* max unsigned int */ - -/* { 2, 32768, 16, 17, "1000000000000000\0------------------", STATUS_SUCCESS}, broken on windows */ -/* { 2, 32768, 16, 16, "1000000000000000-------------------", STATUS_SUCCESS}, broken on windows */ - { 2, 65536, 17, 18, "10000000000000000\0-----------------", STATUS_SUCCESS}, - { 2, 65536, 17, 17, "10000000000000000------------------", STATUS_SUCCESS}, - { 2, 131072, 18, 19, "100000000000000000\0----------------", STATUS_SUCCESS}, - { 2, 131072, 18, 18, "100000000000000000-----------------", STATUS_SUCCESS}, - {16, 0xffffffff, 8, 9, "FFFFFFFF\0--------------------------", STATUS_SUCCESS}, - {16, 0xffffffff, 8, 8, "FFFFFFFF---------------------------", STATUS_SUCCESS}, /* No \0 term */ - {16, 0xffffffff, 8, 7, "-----------------------------------", STATUS_BUFFER_OVERFLOW}, /* Too short */ - {16, 0xa, 1, 2, "A\0---------------------------------", STATUS_SUCCESS}, - {16, 0xa, 1, 1, "A----------------------------------", STATUS_SUCCESS}, /* No \0 term */ - {16, 0, 1, 0, "-----------------------------------", STATUS_BUFFER_OVERFLOW}, - {20, 0xdeadbeef, 0, 9, "-----------------------------------", STATUS_INVALID_PARAMETER}, /* ill. base */ - {-8, 07654321, 0, 12, "-----------------------------------", STATUS_INVALID_PARAMETER}, /* neg. base */ -}; -#define NB_INT2STR (sizeof(int2str)/sizeof(*int2str)) - - -static void one_RtlIntegerToUnicodeString_test(int test_num, const int2str_t *int2str) -{ - int pos; - WCHAR expected_str_Buffer[STRI_BUFFER_LENGTH + 1]; - UNICODE_STRING expected_unicode_string; - STRING expected_ansi_str; - WCHAR str_Buffer[STRI_BUFFER_LENGTH + 1]; - UNICODE_STRING unicode_string; - STRING ansi_str; - NTSTATUS result; - - for (pos = 0; pos < STRI_BUFFER_LENGTH; pos++) { - expected_str_Buffer[pos] = int2str->Buffer[pos]; - } - expected_unicode_string.Length = int2str->Length * sizeof(WCHAR); - expected_unicode_string.MaximumLength = int2str->MaximumLength * sizeof(WCHAR); - expected_unicode_string.Buffer = expected_str_Buffer; - pRtlUnicodeStringToAnsiString(&expected_ansi_str, &expected_unicode_string, 1); - - for (pos = 0; pos < STRI_BUFFER_LENGTH; pos++) { - str_Buffer[pos] = '-'; - } - unicode_string.Length = 0; - unicode_string.MaximumLength = int2str->MaximumLength * sizeof(WCHAR); - unicode_string.Buffer = str_Buffer; - - result = pRtlIntegerToUnicodeString(int2str->value, int2str->base, &unicode_string); - pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1); - if (result == STATUS_BUFFER_OVERFLOW) { - /* On BUFFER_OVERFLOW the string Buffer should be unchanged */ - for (pos = 0; pos < STRI_BUFFER_LENGTH; pos++) { - expected_str_Buffer[pos] = '-'; - } - /* w2k: The native function has two reasons for BUFFER_OVERFLOW: */ - /* If the value is too large to convert: The Length is unchanged */ - /* If str is too small to hold the string: Set str->Length to the length */ - /* the string would have (which can be larger than the MaximumLength). */ - /* To allow all this in the tests we do the following: */ - if (expected_unicode_string.Length > 32 && unicode_string.Length == 0) { - /* The value is too large to convert only triggered when testing native */ - expected_unicode_string.Length = 0; - } - } else { - ok(result == int2str->result, - "(test %d): RtlIntegerToUnicodeString(%u, %d, [out]) has result %x, expected: %x\n", - test_num, int2str->value, int2str->base, result, int2str->result); - if (result == STATUS_SUCCESS) { - ok(unicode_string.Buffer[unicode_string.Length/sizeof(WCHAR)] == '\0', - "(test %d): RtlIntegerToUnicodeString(%u, %d, [out]) string \"%s\" is not NULL terminated\n", - test_num, int2str->value, int2str->base, ansi_str.Buffer); - } - } - ok(memcmp(unicode_string.Buffer, expected_unicode_string.Buffer, STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0, - "(test %d): RtlIntegerToUnicodeString(%u, %d, [out]) assigns string \"%s\", expected: \"%s\"\n", - test_num, int2str->value, int2str->base, ansi_str.Buffer, expected_ansi_str.Buffer); - ok(unicode_string.Length == expected_unicode_string.Length, - "(test %d): RtlIntegerToUnicodeString(%u, %d, [out]) string has Length %d, expected: %d\n", - test_num, int2str->value, int2str->base, unicode_string.Length, expected_unicode_string.Length); - ok(unicode_string.MaximumLength == expected_unicode_string.MaximumLength, - "(test %d): RtlIntegerToUnicodeString(%u, %d, [out]) string has MaximumLength %d, expected: %d\n", - test_num, int2str->value, int2str->base, unicode_string.MaximumLength, expected_unicode_string.MaximumLength); - pRtlFreeAnsiString(&expected_ansi_str); - pRtlFreeAnsiString(&ansi_str); -} - - -static void test_RtlIntegerToUnicodeString(void) -{ - size_t test_num; - - for (test_num = 0; test_num < NB_INT2STR; test_num++) - one_RtlIntegerToUnicodeString_test(test_num, &int2str[test_num]); -} - - -static void one_RtlIntegerToChar_test(int test_num, const int2str_t *int2str) -{ - NTSTATUS result; - char dest_str[STRI_BUFFER_LENGTH + 1]; - - memset(dest_str, '-', STRI_BUFFER_LENGTH); - dest_str[STRI_BUFFER_LENGTH] = '\0'; - result = pRtlIntegerToChar(int2str->value, int2str->base, int2str->MaximumLength, dest_str); - ok(result == int2str->result, - "(test %d): RtlIntegerToChar(%u, %d, %d, [out]) has result %x, expected: %x\n", - test_num, int2str->value, int2str->base, int2str->MaximumLength, result, int2str->result); - ok(memcmp(dest_str, int2str->Buffer, STRI_BUFFER_LENGTH) == 0, - "(test %d): RtlIntegerToChar(%u, %d, %d, [out]) assigns string \"%s\", expected: \"%s\"\n", - test_num, int2str->value, int2str->base, int2str->MaximumLength, dest_str, int2str->Buffer); -} - - -static void test_RtlIntegerToChar(void) -{ - NTSTATUS result; - size_t test_num; - - for (test_num = 0; test_num < NB_INT2STR; test_num++) - one_RtlIntegerToChar_test(test_num, &int2str[test_num]); - - result = pRtlIntegerToChar(int2str[0].value, 20, int2str[0].MaximumLength, NULL); - ok(result == STATUS_INVALID_PARAMETER, - "(test a): RtlIntegerToChar(%u, %d, %d, NULL) has result %x, expected: %x\n", - int2str[0].value, 20, int2str[0].MaximumLength, result, STATUS_INVALID_PARAMETER); - - result = pRtlIntegerToChar(int2str[0].value, 20, 0, NULL); - ok(result == STATUS_INVALID_PARAMETER, - "(test b): RtlIntegerToChar(%u, %d, %d, NULL) has result %x, expected: %x\n", - int2str[0].value, 20, 0, result, STATUS_INVALID_PARAMETER); - - result = pRtlIntegerToChar(int2str[0].value, int2str[0].base, 0, NULL); - ok(result == STATUS_BUFFER_OVERFLOW, - "(test c): RtlIntegerToChar(%u, %d, %d, NULL) has result %x, expected: %x\n", - int2str[0].value, int2str[0].base, 0, result, STATUS_BUFFER_OVERFLOW); - - result = pRtlIntegerToChar(int2str[0].value, int2str[0].base, int2str[0].MaximumLength, NULL); - ok(result == STATUS_ACCESS_VIOLATION, - "(test d): RtlIntegerToChar(%u, %d, %d, NULL) has result %x, expected: %x\n", - int2str[0].value, int2str[0].base, int2str[0].MaximumLength, result, STATUS_ACCESS_VIOLATION); -} - -static void test_RtlIsTextUnicode(void) -{ - char ascii[] = "A simple string"; - char false_positive[] = {0x41, 0x0a, 0x0d, 0x1d}; - WCHAR false_negative = 0x0d0a; - WCHAR unicode[] = {'A',' ','U','n','i','c','o','d','e',' ','s','t','r','i','n','g',0}; - WCHAR unicode_no_controls[] = {'A','U','n','i','c','o','d','e','s','t','r','i','n','g',0}; - /* String with both byte-reversed and standard Unicode control characters. */ - WCHAR mixed_controls[] = {'\t',0x9000,0x0d00,'\n',0}; - WCHAR *be_unicode; - WCHAR *be_unicode_no_controls; - BOOLEAN res; - int flags; - int i; - - ok(!pRtlIsTextUnicode(ascii, sizeof(ascii), NULL), "ASCII text detected as Unicode\n"); - - res = pRtlIsTextUnicode(unicode, sizeof(unicode), NULL); - ok(res || - broken(res == FALSE), /* NT4 */ - "Text should be Unicode\n"); - - ok(!pRtlIsTextUnicode(unicode, sizeof(unicode) - 1, NULL), "Text should be Unicode\n"); - - flags = IS_TEXT_UNICODE_UNICODE_MASK; - ok(pRtlIsTextUnicode(unicode, sizeof(unicode), &flags), "Text should not pass a Unicode\n"); - ok(flags == (IS_TEXT_UNICODE_STATISTICS | IS_TEXT_UNICODE_CONTROLS), - "Expected flags 0x6, obtained %x\n", flags); - - flags = IS_TEXT_UNICODE_REVERSE_MASK; - ok(!pRtlIsTextUnicode(unicode, sizeof(unicode), &flags), "Text should not pass reverse Unicode tests\n"); - ok(flags == 0, "Expected flags 0, obtained %x\n", flags); - - flags = IS_TEXT_UNICODE_ODD_LENGTH; - ok(!pRtlIsTextUnicode(unicode, sizeof(unicode) - 1, &flags), "Odd length test should have passed\n"); - ok(flags == IS_TEXT_UNICODE_ODD_LENGTH, "Expected flags 0x200, obtained %x\n", flags); - - be_unicode = HeapAlloc(GetProcessHeap(), 0, sizeof(unicode) + sizeof(WCHAR)); - be_unicode[0] = 0xfffe; - for (i = 0; i < sizeof(unicode)/sizeof(unicode[0]); i++) - { - be_unicode[i + 1] = (unicode[i] >> 8) | ((unicode[i] & 0xff) << 8); - } - ok(!pRtlIsTextUnicode(be_unicode, sizeof(unicode) + 2, NULL), "Reverse endian should not be Unicode\n"); - ok(!pRtlIsTextUnicode(&be_unicode[1], sizeof(unicode), NULL), "Reverse endian should not be Unicode\n"); - - flags = IS_TEXT_UNICODE_REVERSE_MASK; - ok(!pRtlIsTextUnicode(&be_unicode[1], sizeof(unicode), &flags), "Reverse endian should be Unicode\n"); - todo_wine - ok(flags == (IS_TEXT_UNICODE_REVERSE_ASCII16 | IS_TEXT_UNICODE_REVERSE_STATISTICS | IS_TEXT_UNICODE_REVERSE_CONTROLS), - "Expected flags 0x70, obtained %x\n", flags); - - flags = IS_TEXT_UNICODE_REVERSE_MASK; - ok(!pRtlIsTextUnicode(be_unicode, sizeof(unicode) + 2, &flags), "Reverse endian should be Unicode\n"); - ok(flags == (IS_TEXT_UNICODE_REVERSE_CONTROLS | IS_TEXT_UNICODE_REVERSE_SIGNATURE), - "Expected flags 0xc0, obtained %x\n", flags); - - /* build byte reversed unicode string with no control chars */ - be_unicode_no_controls = HeapAlloc(GetProcessHeap(), 0, sizeof(unicode) + sizeof(WCHAR)); - ok(be_unicode_no_controls != NULL, "Expected HeapAlloc to succeed.\n"); - be_unicode_no_controls[0] = 0xfffe; - for (i = 0; i < sizeof(unicode_no_controls)/sizeof(unicode_no_controls[0]); i++) - be_unicode_no_controls[i + 1] = (unicode_no_controls[i] >> 8) | ((unicode_no_controls[i] & 0xff) << 8); - - - /* The following tests verify that the tests for */ - /* IS_TEXT_UNICODE_CONTROLS and IS_TEXT_UNICODE_REVERSE_CONTROLS */ - /* are not mutually exclusive. Regardless of whether the strings */ - /* contain an indication of endianness, the tests are still */ - /* run if the flag is passed to (Rtl)IsTextUnicode. */ - - /* Test IS_TEXT_UNICODE_CONTROLS flag */ - flags = IS_TEXT_UNICODE_CONTROLS; - ok(!pRtlIsTextUnicode(unicode_no_controls, sizeof(unicode_no_controls), &flags), "Test should not pass on Unicode string lacking control characters.\n"); - ok(flags == 0, "Expected flags 0x0, obtained %x\n", flags); - - flags = IS_TEXT_UNICODE_CONTROLS; - ok(!pRtlIsTextUnicode(be_unicode_no_controls, sizeof(unicode_no_controls), &flags), "Test should not pass on byte-reversed Unicode string lacking control characters.\n"); - ok(flags == 0, "Expected flags 0x0, obtained %x\n", flags); - - flags = IS_TEXT_UNICODE_CONTROLS; - ok(pRtlIsTextUnicode(unicode, sizeof(unicode), &flags), "Test should pass on Unicode string lacking control characters.\n"); - ok(flags == IS_TEXT_UNICODE_CONTROLS, "Expected flags 0x04, obtained %x\n", flags); - - flags = IS_TEXT_UNICODE_CONTROLS; - ok(!pRtlIsTextUnicode(be_unicode_no_controls, sizeof(unicode_no_controls) + 2, &flags), - "Test should not pass with standard Unicode string.\n"); - ok(flags == 0, "Expected flags 0x0, obtained %x\n", flags); - - flags = IS_TEXT_UNICODE_CONTROLS; - ok(pRtlIsTextUnicode(mixed_controls, sizeof(mixed_controls), &flags), "Test should pass on a string containing control characters.\n"); - ok(flags == IS_TEXT_UNICODE_CONTROLS, "Expected flags 0x04, obtained %x\n", flags); - - /* Test IS_TEXT_UNICODE_REVERSE_CONTROLS flag */ - flags = IS_TEXT_UNICODE_REVERSE_CONTROLS; - ok(!pRtlIsTextUnicode(be_unicode_no_controls, sizeof(unicode_no_controls), &flags), "Test should not pass on Unicode string lacking control characters.\n"); - ok(flags == 0, "Expected flags 0x0, obtained %x\n", flags); - - flags = IS_TEXT_UNICODE_REVERSE_CONTROLS; - ok(!pRtlIsTextUnicode(unicode_no_controls, sizeof(unicode_no_controls), &flags), "Test should not pass on Unicode string lacking control characters.\n"); - ok(flags == 0, "Expected flags 0x0, obtained %x\n", flags); - - flags = IS_TEXT_UNICODE_REVERSE_CONTROLS; - ok(!pRtlIsTextUnicode(unicode, sizeof(unicode), &flags), "Test should not pass on Unicode string lacking control characters.\n"); - ok(flags == 0, "Expected flags 0x0, obtained %x\n", flags); - - flags = IS_TEXT_UNICODE_REVERSE_CONTROLS; - ok(!pRtlIsTextUnicode(be_unicode, sizeof(unicode) + 2, &flags), - "Test should pass with byte-reversed Unicode string containing control characters.\n"); - ok(flags == IS_TEXT_UNICODE_REVERSE_CONTROLS, "Expected flags 0x40, obtained %x\n", flags); - - flags = IS_TEXT_UNICODE_REVERSE_CONTROLS; - ok(!pRtlIsTextUnicode(mixed_controls, sizeof(mixed_controls), &flags), "Test should pass on a string containing byte-reversed control characters.\n"); - ok(flags == IS_TEXT_UNICODE_REVERSE_CONTROLS, "Expected flags 0x40, obtained %x\n", flags); - - /* Test with flags for both byte-reverse and standard Unicode characters */ - flags = IS_TEXT_UNICODE_CONTROLS | IS_TEXT_UNICODE_REVERSE_CONTROLS; - ok(!pRtlIsTextUnicode(mixed_controls, sizeof(mixed_controls), &flags), "Test should pass on string containing both byte-reversed and standard control characters.\n"); - ok(flags == (IS_TEXT_UNICODE_CONTROLS | IS_TEXT_UNICODE_REVERSE_CONTROLS), "Expected flags 0x44, obtained %x\n", flags); - - flags = IS_TEXT_UNICODE_STATISTICS; - todo_wine ok(pRtlIsTextUnicode(false_positive, sizeof(false_positive), &flags), "Test should pass on false positive.\n"); - - ok(!pRtlIsTextUnicode(&false_negative, sizeof(false_negative), NULL), "Test should fail on 0x0d0a (MALAYALAM LETTER UU).\n"); - - HeapFree(GetProcessHeap(), 0, be_unicode); - HeapFree(GetProcessHeap(), 0, be_unicode_no_controls); -} - -static const WCHAR szGuid[] = { '{','0','1','0','2','0','3','0','4','-', - '0','5','0','6','-' ,'0','7','0','8','-','0','9','0','A','-', - '0','B','0','C','0','D','0','E','0','F','0','A','}','\0' }; -static const WCHAR szGuid2[] = { '{','0','1','0','2','0','3','0','4','-', - '0','5','0','6','-' ,'0','7','0','8','-','0','9','0','A','-', - '0','B','0','C','0','D','0','E','0','F','0','A',']','\0' }; -DEFINE_GUID(IID_Endianness, 0x01020304, 0x0506, 0x0708, 0x09, 0x0A, 0x0B, - 0x0C, 0x0D, 0x0E, 0x0F, 0x0A); - -static void test_RtlGUIDFromString(void) -{ - GUID guid; - UNICODE_STRING str; - NTSTATUS ret; - - str.Length = str.MaximumLength = sizeof(szGuid) - sizeof(WCHAR); - str.Buffer = (LPWSTR)szGuid; - - ret = pRtlGUIDFromString(&str, &guid); - ok(ret == 0, "expected ret=0, got 0x%0x\n", ret); - ok(IsEqualGUID(&guid, &IID_Endianness), "Endianness broken\n"); - - str.Length = str.MaximumLength = sizeof(szGuid2) - sizeof(WCHAR); - str.Buffer = (LPWSTR)szGuid2; - - ret = pRtlGUIDFromString(&str, &guid); - ok(ret, "expected ret!=0\n"); -} - -static void test_RtlStringFromGUID(void) -{ - UNICODE_STRING str; - NTSTATUS ret; - - str.Length = str.MaximumLength = 0; - str.Buffer = NULL; - - ret = pRtlStringFromGUID(&IID_Endianness, &str); - ok(ret == 0, "expected ret=0, got 0x%0x\n", ret); - ok(str.Buffer && !lstrcmpiW(str.Buffer, szGuid), "Endianness broken\n"); - pRtlFreeUnicodeString(&str); -} - -START_TEST(rtlstr) -{ - InitFunctionPtrs(); - if (pRtlInitAnsiString) { - test_RtlInitString(); - test_RtlInitUnicodeString(); - test_RtlCopyString(); - test_RtlUnicodeStringToInteger(); - test_RtlCharToInteger(); - test_RtlIntegerToUnicodeString(); - test_RtlIntegerToChar(); - test_RtlUpperChar(); - test_RtlUpperString(); - test_RtlUnicodeStringToAnsiString(); - test_RtlAppendAsciizToString(); - test_RtlAppendStringToString(); - test_RtlAppendUnicodeToString(); - test_RtlAppendUnicodeStringToString(); - } - - if (pRtlInitUnicodeStringEx) - test_RtlInitUnicodeStringEx(); - if (pRtlDuplicateUnicodeString) - test_RtlDuplicateUnicodeString(); - if (pRtlFindCharInUnicodeString) - test_RtlFindCharInUnicodeString(); - if (pRtlGUIDFromString) - test_RtlGUIDFromString(); - if (pRtlStringFromGUID) - test_RtlStringFromGUID(); - if (pRtlIsTextUnicode) - test_RtlIsTextUnicode(); - if(0) - { - test_RtlUpcaseUnicodeChar(); - test_RtlUpcaseUnicodeString(); - test_RtlDowncaseUnicodeString(); - } -} diff --git a/rostests/winetests/ntdll/string.c b/rostests/winetests/ntdll/string.c deleted file mode 100755 index 802a1655fc9..00000000000 --- a/rostests/winetests/ntdll/string.c +++ /dev/null @@ -1,1307 +0,0 @@ -/* Unit test suite for string functions and some wcstring functions - * - * Copyright 2003 Thomas Mertes - * - * 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 - * We use function pointers here as there is no import library for NTDLL on - * windows. - */ - -#include - -#include "ntdll_test.h" - - -/* Function ptrs for ntdll calls */ -static HMODULE hntdll = 0; -static NTSTATUS (WINAPI *pRtlUnicodeStringToAnsiString)(STRING *, const UNICODE_STRING *, BOOLEAN); -static VOID (WINAPI *pRtlFreeAnsiString)(PSTRING); -static BOOLEAN (WINAPI *pRtlCreateUnicodeStringFromAsciiz)(PUNICODE_STRING,LPCSTR); -static VOID (WINAPI *pRtlFreeUnicodeString)(PUNICODE_STRING); - -static int (WINAPIV *patoi)(const char *); -static long (WINAPIV *patol)(const char *); -static LONGLONG (WINAPIV *p_atoi64)(const char *); -static LPSTR (WINAPIV *p_itoa)(int, LPSTR, INT); -static LPSTR (WINAPIV *p_ltoa)(LONG, LPSTR, INT); -static LPSTR (WINAPIV *p_ultoa)(ULONG, LPSTR, INT); -static LPSTR (WINAPIV *p_i64toa)(LONGLONG, LPSTR, INT); -static LPSTR (WINAPIV *p_ui64toa)(ULONGLONG, LPSTR, INT); - -static int (WINAPIV *p_wtoi)(LPWSTR); -static long (WINAPIV *p_wtol)(LPWSTR); -static LONGLONG (WINAPIV *p_wtoi64)(LPWSTR); -static LPWSTR (WINAPIV *p_itow)(int, LPWSTR, int); -static LPWSTR (WINAPIV *p_ltow)(LONG, LPWSTR, INT); -static LPWSTR (WINAPIV *p_ultow)(ULONG, LPWSTR, INT); -static LPWSTR (WINAPIV *p_i64tow)(LONGLONG, LPWSTR, INT); -static LPWSTR (WINAPIV *p_ui64tow)(ULONGLONG, LPWSTR, INT); - -static LPWSTR (__cdecl *p_wcslwr)(LPWSTR); -static LPWSTR (__cdecl *p_wcsupr)(LPWSTR); - -static LPWSTR (WINAPIV *p_wcschr)(LPCWSTR, WCHAR); -static LPWSTR (WINAPIV *p_wcsrchr)(LPCWSTR, WCHAR); - -static void (__cdecl *p_qsort)(void *,size_t,size_t, int(__cdecl *compar)(const void *, const void *) ); -static void* (__cdecl *p_bsearch)(void *,void*,size_t,size_t, int(__cdecl *compar)(const void *, const void *) ); - - -static void InitFunctionPtrs(void) -{ - hntdll = LoadLibraryA("ntdll.dll"); - ok(hntdll != 0, "LoadLibrary failed\n"); - if (hntdll) { - pRtlUnicodeStringToAnsiString = (void *)GetProcAddress(hntdll, "RtlUnicodeStringToAnsiString"); - pRtlFreeAnsiString = (void *)GetProcAddress(hntdll, "RtlFreeAnsiString"); - pRtlCreateUnicodeStringFromAsciiz = (void *)GetProcAddress(hntdll, "RtlCreateUnicodeStringFromAsciiz"); - pRtlFreeUnicodeString = (void *)GetProcAddress(hntdll, "RtlFreeUnicodeString"); - - patoi = (void *)GetProcAddress(hntdll, "atoi"); - patol = (void *)GetProcAddress(hntdll, "atol"); - p_atoi64 = (void *)GetProcAddress(hntdll, "_atoi64"); - p_itoa = (void *)GetProcAddress(hntdll, "_itoa"); - p_ltoa = (void *)GetProcAddress(hntdll, "_ltoa"); - p_ultoa = (void *)GetProcAddress(hntdll, "_ultoa"); - p_i64toa = (void *)GetProcAddress(hntdll, "_i64toa"); - p_ui64toa = (void *)GetProcAddress(hntdll, "_ui64toa"); - - p_wtoi = (void *)GetProcAddress(hntdll, "_wtoi"); - p_wtol = (void *)GetProcAddress(hntdll, "_wtol"); - p_wtoi64 = (void *)GetProcAddress(hntdll, "_wtoi64"); - p_itow = (void *)GetProcAddress(hntdll, "_itow"); - p_ltow = (void *)GetProcAddress(hntdll, "_ltow"); - p_ultow = (void *)GetProcAddress(hntdll, "_ultow"); - p_i64tow = (void *)GetProcAddress(hntdll, "_i64tow"); - p_ui64tow = (void *)GetProcAddress(hntdll, "_ui64tow"); - - p_wcslwr = (void *)GetProcAddress(hntdll, "_wcslwr"); - p_wcsupr = (void *)GetProcAddress(hntdll, "_wcsupr"); - - p_wcschr= (void *)GetProcAddress(hntdll, "wcschr"); - p_wcsrchr= (void *)GetProcAddress(hntdll, "wcsrchr"); - p_qsort= (void *)GetProcAddress(hntdll, "qsort"); - p_bsearch= (void *)GetProcAddress(hntdll, "bsearch"); - } /* if */ -} - - -#define LARGE_STRI_BUFFER_LENGTH 67 - -typedef struct { - int base; - ULONG value; - const char *Buffer; - int mask; /* ntdll/msvcrt: 0x01=itoa, 0x02=ltoa, 0x04=ultoa */ - /* 0x10=itow, 0x20=ltow, 0x40=ultow */ -} ulong2str_t; - -static const ulong2str_t ulong2str[] = { - {10, 123, "123\0---------------------------------------------------------------", 0x77}, - - { 2, 0x80000000U, "10000000000000000000000000000000\0----------------------------------", 0x67}, - { 2, -2147483647, "10000000000000000000000000000001\0----------------------------------", 0x67}, - { 2, -65537, "11111111111111101111111111111111\0----------------------------------", 0x67}, - { 2, -65536, "11111111111111110000000000000000\0----------------------------------", 0x67}, - { 2, -65535, "11111111111111110000000000000001\0----------------------------------", 0x67}, - { 2, -32768, "11111111111111111000000000000000\0----------------------------------", 0x67}, - { 2, -32767, "11111111111111111000000000000001\0----------------------------------", 0x67}, - { 2, -2, "11111111111111111111111111111110\0----------------------------------", 0x67}, - { 2, -1, "11111111111111111111111111111111\0----------------------------------", 0x67}, - { 2, 0, "0\0-----------------------------------------------------------------", 0x77}, - { 2, 1, "1\0-----------------------------------------------------------------", 0x77}, - { 2, 10, "1010\0--------------------------------------------------------------", 0x77}, - { 2, 100, "1100100\0-----------------------------------------------------------", 0x77}, - { 2, 1000, "1111101000\0--------------------------------------------------------", 0x77}, - { 2, 10000, "10011100010000\0----------------------------------------------------", 0x77}, - { 2, 32767, "111111111111111\0---------------------------------------------------", 0x77}, - { 2, 32768, "1000000000000000\0--------------------------------------------------", 0x77}, - { 2, 65535, "1111111111111111\0--------------------------------------------------", 0x77}, - { 2, 100000, "11000011010100000\0-------------------------------------------------", 0x77}, - { 2, 234567, "111001010001000111\0------------------------------------------------", 0x77}, - { 2, 300000, "1001001001111100000\0-----------------------------------------------", 0x77}, - { 2, 524287, "1111111111111111111\0-----------------------------------------------", 0x77}, - { 2, 524288, "10000000000000000000\0----------------------------------------------", 0x67}, - { 2, 1000000, "11110100001001000000\0----------------------------------------------", 0x67}, - { 2, 10000000, "100110001001011010000000\0------------------------------------------", 0x67}, - { 2, 100000000, "101111101011110000100000000\0---------------------------------------", 0x67}, - { 2, 1000000000, "111011100110101100101000000000\0------------------------------------", 0x67}, - { 2, 1073741823, "111111111111111111111111111111\0------------------------------------", 0x67}, - { 2, 2147483646, "1111111111111111111111111111110\0-----------------------------------", 0x67}, - { 2, 2147483647, "1111111111111111111111111111111\0-----------------------------------", 0x67}, - { 2, 2147483648U, "10000000000000000000000000000000\0----------------------------------", 0x67}, - { 2, 2147483649U, "10000000000000000000000000000001\0----------------------------------", 0x67}, - { 2, 4294967294U, "11111111111111111111111111111110\0----------------------------------", 0x67}, - { 2, 0xFFFFFFFF, "11111111111111111111111111111111\0----------------------------------", 0x67}, - - { 8, 0x80000000U, "20000000000\0-------------------------------------------------------", 0x77}, - { 8, -2147483647, "20000000001\0-------------------------------------------------------", 0x77}, - { 8, -2, "37777777776\0-------------------------------------------------------", 0x77}, - { 8, -1, "37777777777\0-------------------------------------------------------", 0x77}, - { 8, 0, "0\0-----------------------------------------------------------------", 0x77}, - { 8, 1, "1\0-----------------------------------------------------------------", 0x77}, - { 8, 2147483646, "17777777776\0-------------------------------------------------------", 0x77}, - { 8, 2147483647, "17777777777\0-------------------------------------------------------", 0x77}, - { 8, 2147483648U, "20000000000\0-------------------------------------------------------", 0x77}, - { 8, 2147483649U, "20000000001\0-------------------------------------------------------", 0x77}, - { 8, 4294967294U, "37777777776\0-------------------------------------------------------", 0x77}, - { 8, 4294967295U, "37777777777\0-------------------------------------------------------", 0x77}, - - {10, 0x80000000U, "-2147483648\0-------------------------------------------------------", 0x33}, - {10, 0x80000000U, "2147483648\0--------------------------------------------------------", 0x44}, - {10, -2147483647, "-2147483647\0-------------------------------------------------------", 0x33}, - {10, -2147483647, "2147483649\0--------------------------------------------------------", 0x44}, - {10, -2, "-2\0----------------------------------------------------------------", 0x33}, - {10, -2, "4294967294\0--------------------------------------------------------", 0x44}, - {10, -1, "-1\0----------------------------------------------------------------", 0x33}, - {10, -1, "4294967295\0--------------------------------------------------------", 0x44}, - {10, 0, "0\0-----------------------------------------------------------------", 0x77}, - {10, 1, "1\0-----------------------------------------------------------------", 0x77}, - {10, 12, "12\0----------------------------------------------------------------", 0x77}, - {10, 123, "123\0---------------------------------------------------------------", 0x77}, - {10, 1234, "1234\0--------------------------------------------------------------", 0x77}, - {10, 12345, "12345\0-------------------------------------------------------------", 0x77}, - {10, 123456, "123456\0------------------------------------------------------------", 0x77}, - {10, 1234567, "1234567\0-----------------------------------------------------------", 0x77}, - {10, 12345678, "12345678\0----------------------------------------------------------", 0x77}, - {10, 123456789, "123456789\0---------------------------------------------------------", 0x77}, - {10, 2147483646, "2147483646\0--------------------------------------------------------", 0x77}, - {10, 2147483647, "2147483647\0--------------------------------------------------------", 0x77}, - {10, 2147483648U, "-2147483648\0-------------------------------------------------------", 0x33}, - {10, 2147483648U, "2147483648\0--------------------------------------------------------", 0x44}, - {10, 2147483649U, "-2147483647\0-------------------------------------------------------", 0x33}, - {10, 2147483649U, "2147483649\0--------------------------------------------------------", 0x44}, - {10, 4294967294U, "-2\0----------------------------------------------------------------", 0x33}, - {10, 4294967294U, "4294967294\0--------------------------------------------------------", 0x44}, - {10, 4294967295U, "-1\0----------------------------------------------------------------", 0x33}, - {10, 4294967295U, "4294967295\0--------------------------------------------------------", 0x44}, - - {16, 0, "0\0-----------------------------------------------------------------", 0x77}, - {16, 1, "1\0-----------------------------------------------------------------", 0x77}, - {16, 2147483646, "7ffffffe\0----------------------------------------------------------", 0x77}, - {16, 2147483647, "7fffffff\0----------------------------------------------------------", 0x77}, - {16, 0x80000000, "80000000\0----------------------------------------------------------", 0x77}, - {16, 0x80000001, "80000001\0----------------------------------------------------------", 0x77}, - {16, 0xFFFFFFFE, "fffffffe\0----------------------------------------------------------", 0x77}, - {16, 0xFFFFFFFF, "ffffffff\0----------------------------------------------------------", 0x77}, - - { 2, 32768, "1000000000000000\0--------------------------------------------------", 0x77}, - { 2, 65536, "10000000000000000\0-------------------------------------------------", 0x77}, - { 2, 131072, "100000000000000000\0------------------------------------------------", 0x77}, - {16, 0xffffffff, "ffffffff\0----------------------------------------------------------", 0x77}, - {16, 0xa, "a\0-----------------------------------------------------------------", 0x77}, - {16, 0, "0\0-----------------------------------------------------------------", 0x77}, - {20, 3368421, "111111\0------------------------------------------------------------", 0x77}, - {36, 62193781, "111111\0------------------------------------------------------------", 0x77}, - {37, 71270178, "111111\0------------------------------------------------------------", 0x77}, -}; -#define NB_ULONG2STR (sizeof(ulong2str)/sizeof(*ulong2str)) - - -static void one_itoa_test(int test_num, const ulong2str_t *ulong2str) -{ - char dest_str[LARGE_STRI_BUFFER_LENGTH + 1]; - int value; - LPSTR result; - - memset(dest_str, '-', LARGE_STRI_BUFFER_LENGTH); - dest_str[LARGE_STRI_BUFFER_LENGTH] = '\0'; - value = ulong2str->value; - result = p_itoa(value, dest_str, ulong2str->base); - ok(result == dest_str, - "(test %d): _itoa(%d, [out], %d) has result %p, expected: %p\n", - test_num, value, ulong2str->base, result, dest_str); - ok(memcmp(dest_str, ulong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0, - "(test %d): _itoa(%d, [out], %d) assigns string \"%s\", expected: \"%s\"\n", - test_num, value, ulong2str->base, dest_str, ulong2str->Buffer); -} - - -static void one_ltoa_test(int test_num, const ulong2str_t *ulong2str) -{ - char dest_str[LARGE_STRI_BUFFER_LENGTH + 1]; - LONG value; - LPSTR result; - - memset(dest_str, '-', LARGE_STRI_BUFFER_LENGTH); - dest_str[LARGE_STRI_BUFFER_LENGTH] = '\0'; - value = ulong2str->value; - result = p_ltoa(ulong2str->value, dest_str, ulong2str->base); - ok(result == dest_str, - "(test %d): _ltoa(%d, [out], %d) has result %p, expected: %p\n", - test_num, value, ulong2str->base, result, dest_str); - ok(memcmp(dest_str, ulong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0, - "(test %d): _ltoa(%d, [out], %d) assigns string \"%s\", expected: \"%s\"\n", - test_num, value, ulong2str->base, dest_str, ulong2str->Buffer); -} - - -static void one_ultoa_test(int test_num, const ulong2str_t *ulong2str) -{ - char dest_str[LARGE_STRI_BUFFER_LENGTH + 1]; - ULONG value; - LPSTR result; - - memset(dest_str, '-', LARGE_STRI_BUFFER_LENGTH); - dest_str[LARGE_STRI_BUFFER_LENGTH] = '\0'; - value = ulong2str->value; - result = p_ultoa(ulong2str->value, dest_str, ulong2str->base); - ok(result == dest_str, - "(test %d): _ultoa(%u, [out], %d) has result %p, expected: %p\n", - test_num, value, ulong2str->base, result, dest_str); - ok(memcmp(dest_str, ulong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0, - "(test %d): _ultoa(%u, [out], %d) assigns string \"%s\", expected: \"%s\"\n", - test_num, value, ulong2str->base, dest_str, ulong2str->Buffer); -} - - -static void test_ulongtoa(void) -{ - int test_num; - - for (test_num = 0; test_num < NB_ULONG2STR; test_num++) { - if (ulong2str[test_num].mask & 0x01) { - one_itoa_test(test_num, &ulong2str[test_num]); - } /* if */ - if (ulong2str[test_num].mask & 0x02) { - one_ltoa_test(test_num, &ulong2str[test_num]); - } /* if */ - if (ulong2str[test_num].mask & 0x04) { - one_ultoa_test(test_num, &ulong2str[test_num]); - } /* if */ - } /* for */ -} - - -static void one_itow_test(int test_num, const ulong2str_t *ulong2str) -{ - int pos; - WCHAR expected_wstr[LARGE_STRI_BUFFER_LENGTH + 1]; - WCHAR dest_wstr[LARGE_STRI_BUFFER_LENGTH + 1]; - UNICODE_STRING unicode_string; - STRING ansi_str; - int value; - LPWSTR result; - - for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) { - expected_wstr[pos] = ulong2str->Buffer[pos]; - } /* for */ - expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0'; - - for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) { - dest_wstr[pos] = '-'; - } /* for */ - dest_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0'; - unicode_string.Length = LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR); - unicode_string.MaximumLength = unicode_string.Length + sizeof(WCHAR); - unicode_string.Buffer = dest_wstr; - value = ulong2str->value; - result = p_itow(value, dest_wstr, ulong2str->base); - pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1); - ok(result == dest_wstr, - "(test %d): _itow(%d, [out], %d) has result %p, expected: %p\n", - test_num, value, ulong2str->base, result, dest_wstr); - ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0, - "(test %d): _itow(%d, [out], %d) assigns string \"%s\", expected: \"%s\"\n", - test_num, value, ulong2str->base, ansi_str.Buffer, ulong2str->Buffer); - pRtlFreeAnsiString(&ansi_str); -} - - -static void one_ltow_test(int test_num, const ulong2str_t *ulong2str) -{ - int pos; - WCHAR expected_wstr[LARGE_STRI_BUFFER_LENGTH + 1]; - WCHAR dest_wstr[LARGE_STRI_BUFFER_LENGTH + 1]; - UNICODE_STRING unicode_string; - STRING ansi_str; - LONG value; - LPWSTR result; - - for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) { - expected_wstr[pos] = ulong2str->Buffer[pos]; - } /* for */ - expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0'; - - for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) { - dest_wstr[pos] = '-'; - } /* for */ - dest_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0'; - unicode_string.Length = LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR); - unicode_string.MaximumLength = unicode_string.Length + sizeof(WCHAR); - unicode_string.Buffer = dest_wstr; - - value = ulong2str->value; - result = p_ltow(value, dest_wstr, ulong2str->base); - pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1); - ok(result == dest_wstr, - "(test %d): _ltow(%d, [out], %d) has result %p, expected: %p\n", - test_num, value, ulong2str->base, result, dest_wstr); - ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0, - "(test %d): _ltow(%d, [out], %d) assigns string \"%s\", expected: \"%s\"\n", - test_num, value, ulong2str->base, ansi_str.Buffer, ulong2str->Buffer); - pRtlFreeAnsiString(&ansi_str); -} - - -static void one_ultow_test(int test_num, const ulong2str_t *ulong2str) -{ - int pos; - WCHAR expected_wstr[LARGE_STRI_BUFFER_LENGTH + 1]; - WCHAR dest_wstr[LARGE_STRI_BUFFER_LENGTH + 1]; - UNICODE_STRING unicode_string; - STRING ansi_str; - ULONG value; - LPWSTR result; - - for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) { - expected_wstr[pos] = ulong2str->Buffer[pos]; - } /* for */ - expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0'; - - for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) { - dest_wstr[pos] = '-'; - } /* for */ - dest_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0'; - unicode_string.Length = LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR); - unicode_string.MaximumLength = unicode_string.Length + sizeof(WCHAR); - unicode_string.Buffer = dest_wstr; - - value = ulong2str->value; - result = p_ultow(value, dest_wstr, ulong2str->base); - pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1); - ok(result == dest_wstr, - "(test %d): _ultow(%u, [out], %d) has result %p, expected: %p\n", - test_num, value, ulong2str->base, result, dest_wstr); - ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0, - "(test %d): _ultow(%u, [out], %d) assigns string \"%s\", expected: \"%s\"\n", - test_num, value, ulong2str->base, ansi_str.Buffer, ulong2str->Buffer); - pRtlFreeAnsiString(&ansi_str); -} - - -static void test_ulongtow(void) -{ - int test_num; - LPWSTR result; - - for (test_num = 0; test_num < NB_ULONG2STR; test_num++) { - if (ulong2str[test_num].mask & 0x10) { - one_itow_test(test_num, &ulong2str[test_num]); - } /* if */ - if (ulong2str[test_num].mask & 0x20) { - one_ltow_test(test_num, &ulong2str[test_num]); - } /* if */ - if (ulong2str[test_num].mask & 0x40) { - one_ultow_test(test_num, &ulong2str[test_num]); - } /* if */ - } /* for */ - - if (0) { - /* Crashes on XP and W2K3 */ - result = p_itow(ulong2str[0].value, NULL, 10); - ok(result == NULL, - "(test a): _itow(%d, NULL, 10) has result %p, expected: NULL\n", - ulong2str[0].value, result); - } - - if (0) { - /* Crashes on XP and W2K3 */ - result = p_ltow(ulong2str[0].value, NULL, 10); - ok(result == NULL, - "(test b): _ltow(%d, NULL, 10) has result %p, expected: NULL\n", - ulong2str[0].value, result); - } - - if (0) { - /* Crashes on XP and W2K3 */ - result = p_ultow(ulong2str[0].value, NULL, 10); - ok(result == NULL, - "(test c): _ultow(%d, NULL, 10) has result %p, expected: NULL\n", - ulong2str[0].value, result); - } -} - -#define ULL(a,b) (((ULONGLONG)(a) << 32) | (b)) - -typedef struct { - int base; - ULONGLONG value; - const char *Buffer; - int mask; /* ntdll/msvcrt: 0x01=i64toa, 0x02=ui64toa, 0x04=wrong _i64toa try next example */ - /* 0x10=i64tow, 0x20=ui64tow, 0x40=wrong _i64tow try next example */ -} ulonglong2str_t; - -static const ulonglong2str_t ulonglong2str[] = { - {10, 123, "123\0---------------------------------------------------------------", 0x33}, - - { 2, 0x80000000U, "10000000000000000000000000000000\0----------------------------------", 0x33}, - { 2, -2147483647, "1111111111111111111111111111111110000000000000000000000000000001\0--", 0x33}, - { 2, -65537, "1111111111111111111111111111111111111111111111101111111111111111\0--", 0x33}, - { 2, -65536, "1111111111111111111111111111111111111111111111110000000000000000\0--", 0x33}, - { 2, -65535, "1111111111111111111111111111111111111111111111110000000000000001\0--", 0x33}, - { 2, -32768, "1111111111111111111111111111111111111111111111111000000000000000\0--", 0x33}, - { 2, -32767, "1111111111111111111111111111111111111111111111111000000000000001\0--", 0x33}, - { 2, -2, "1111111111111111111111111111111111111111111111111111111111111110\0--", 0x33}, - { 2, -1, "1111111111111111111111111111111111111111111111111111111111111111\0--", 0x33}, - { 2, 0, "0\0-----------------------------------------------------------------", 0x33}, - { 2, 1, "1\0-----------------------------------------------------------------", 0x33}, - { 2, 10, "1010\0--------------------------------------------------------------", 0x33}, - { 2, 100, "1100100\0-----------------------------------------------------------", 0x33}, - { 2, 1000, "1111101000\0--------------------------------------------------------", 0x33}, - { 2, 10000, "10011100010000\0----------------------------------------------------", 0x33}, - { 2, 32767, "111111111111111\0---------------------------------------------------", 0x33}, - { 2, 32768, "1000000000000000\0--------------------------------------------------", 0x33}, - { 2, 65535, "1111111111111111\0--------------------------------------------------", 0x33}, - { 2, 100000, "11000011010100000\0-------------------------------------------------", 0x33}, - { 2, 234567, "111001010001000111\0------------------------------------------------", 0x33}, - { 2, 300000, "1001001001111100000\0-----------------------------------------------", 0x33}, - { 2, 524287, "1111111111111111111\0-----------------------------------------------", 0x33}, - { 2, 524288, "10000000000000000000\0----------------------------------------------", 0x33}, - { 2, 1000000, "11110100001001000000\0----------------------------------------------", 0x33}, - { 2, 10000000, "100110001001011010000000\0------------------------------------------", 0x33}, - { 2, 100000000, "101111101011110000100000000\0---------------------------------------", 0x33}, - { 2, 1000000000, "111011100110101100101000000000\0------------------------------------", 0x33}, - { 2, 1073741823, "111111111111111111111111111111\0------------------------------------", 0x33}, - { 2, 2147483646, "1111111111111111111111111111110\0-----------------------------------", 0x33}, - { 2, 2147483647, "1111111111111111111111111111111\0-----------------------------------", 0x33}, - { 2, 2147483648U, "10000000000000000000000000000000\0----------------------------------", 0x33}, - { 2, 2147483649U, "10000000000000000000000000000001\0----------------------------------", 0x33}, - { 2, 4294967294U, "11111111111111111111111111111110\0----------------------------------", 0x33}, - { 2, 0xFFFFFFFF, "11111111111111111111111111111111\0----------------------------------", 0x33}, - { 2, ULL(0x1,0xffffffff), "111111111111111111111111111111111\0---------------------------------", 0x33}, - { 2, ((ULONGLONG)100000)*100000, "1001010100000010111110010000000000\0--------------------------------", 0x33}, - { 2, ULL(0x3,0xffffffff), "1111111111111111111111111111111111\0--------------------------------", 0x33}, - { 2, ULL(0x7,0xffffffff), "11111111111111111111111111111111111\0-------------------------------", 0x33}, - { 2, ULL(0xf,0xffffffff), "111111111111111111111111111111111111\0------------------------------", 0x33}, - { 2, ((ULONGLONG)100000)*1000000, "1011101001000011101101110100000000000\0-----------------------------", 0x33}, - { 2, ULL(0x1f,0xffffffff), "1111111111111111111111111111111111111\0-----------------------------", 0x33}, - { 2, ULL(0x3f,0xffffffff), "11111111111111111111111111111111111111\0----------------------------", 0x33}, - { 2, ULL(0x7f,0xffffffff), "111111111111111111111111111111111111111\0---------------------------", 0x33}, - { 2, ULL(0xff,0xffffffff), "1111111111111111111111111111111111111111\0--------------------------", 0x33}, - - { 8, 0x80000000U, "20000000000\0-------------------------------------------------------", 0x33}, - { 8, -2147483647, "1777777777760000000001\0--------------------------------------------", 0x33}, - { 8, -2, "1777777777777777777776\0--------------------------------------------", 0x33}, - { 8, -1, "1777777777777777777777\0--------------------------------------------", 0x33}, - { 8, 0, "0\0-----------------------------------------------------------------", 0x33}, - { 8, 1, "1\0-----------------------------------------------------------------", 0x33}, - { 8, 2147483646, "17777777776\0-------------------------------------------------------", 0x33}, - { 8, 2147483647, "17777777777\0-------------------------------------------------------", 0x33}, - { 8, 2147483648U, "20000000000\0-------------------------------------------------------", 0x33}, - { 8, 2147483649U, "20000000001\0-------------------------------------------------------", 0x33}, - { 8, 4294967294U, "37777777776\0-------------------------------------------------------", 0x33}, - { 8, 4294967295U, "37777777777\0-------------------------------------------------------", 0x33}, - - {10, 0x80000000U, "2147483648\0--------------------------------------------------------", 0x33}, - {10, -2147483647, "-2147483647\0-------------------------------------------------------", 0x55}, - {10, -2147483647, "-18446744071562067969\0---------------------------------------------", 0x00}, - {10, -2147483647, "18446744071562067969\0----------------------------------------------", 0x22}, - {10, -2, "-2\0----------------------------------------------------------------", 0x55}, - {10, -2, "-18446744073709551614\0---------------------------------------------", 0x00}, - {10, -2, "18446744073709551614\0----------------------------------------------", 0x22}, - {10, -1, "-1\0----------------------------------------------------------------", 0x55}, - {10, -1, "-18446744073709551615\0---------------------------------------------", 0x00}, - {10, -1, "18446744073709551615\0----------------------------------------------", 0x22}, - {10, 0, "0\0-----------------------------------------------------------------", 0x33}, - {10, 1, "1\0-----------------------------------------------------------------", 0x33}, - {10, 12, "12\0----------------------------------------------------------------", 0x33}, - {10, 123, "123\0---------------------------------------------------------------", 0x33}, - {10, 1234, "1234\0--------------------------------------------------------------", 0x33}, - {10, 12345, "12345\0-------------------------------------------------------------", 0x33}, - {10, 123456, "123456\0------------------------------------------------------------", 0x33}, - {10, 1234567, "1234567\0-----------------------------------------------------------", 0x33}, - {10, 12345678, "12345678\0----------------------------------------------------------", 0x33}, - {10, 123456789, "123456789\0---------------------------------------------------------", 0x33}, - {10, 2147483646, "2147483646\0--------------------------------------------------------", 0x33}, - {10, 2147483647, "2147483647\0--------------------------------------------------------", 0x33}, - {10, 2147483648U, "2147483648\0--------------------------------------------------------", 0x33}, - {10, 2147483649U, "2147483649\0--------------------------------------------------------", 0x33}, - {10, 4294967294U, "4294967294\0--------------------------------------------------------", 0x33}, - {10, 4294967295U, "4294967295\0--------------------------------------------------------", 0x33}, - {10, ULL(0x2,0xdfdc1c35), "12345678901\0-------------------------------------------------------", 0x33}, - {10, ULL(0xe5,0xf4c8f374), "987654321012\0------------------------------------------------------", 0x33}, - {10, ULL(0x1c0,0xfc161e3e), "1928374656574\0-----------------------------------------------------", 0x33}, - {10, ULL(0xbad,0xcafeface), "12841062955726\0----------------------------------------------------", 0x33}, - {10, ULL(0x5bad,0xcafeface), "100801993177806\0---------------------------------------------------", 0x33}, - {10, ULL(0xaface,0xbeefcafe), "3090515640699646\0--------------------------------------------------", 0x33}, - {10, ULL(0xa5beef,0xabcdcafe), "46653307746110206\0-------------------------------------------------", 0x33}, - {10, ULL(0x1f8cf9b,0xf2df3af1), "142091656963767025\0------------------------------------------------", 0x33}, - {10, ULL(0x0fffffff,0xffffffff), "1152921504606846975\0-----------------------------------------------", 0x33}, - {10, ULL(0x7fffffff,0xffffffff), "9223372036854775807\0-----------------------------------------------", 0x33}, - {10, ULL(0x80000000,0x00000000), "-9223372036854775808\0----------------------------------------------", 0x11}, - {10, ULL(0x80000000,0x00000000), "9223372036854775808\0-----------------------------------------------", 0x22}, - {10, ULL(0x80000000,0x00000001), "-9223372036854775807\0----------------------------------------------", 0x55}, - {10, ULL(0x80000000,0x00000001), "-9223372036854775809\0----------------------------------------------", 0x00}, - {10, ULL(0x80000000,0x00000001), "9223372036854775809\0-----------------------------------------------", 0x22}, - {10, ULL(0x80000000,0x00000002), "-9223372036854775806\0----------------------------------------------", 0x55}, - {10, ULL(0x80000000,0x00000002), "-9223372036854775810\0----------------------------------------------", 0x00}, - {10, ULL(0x80000000,0x00000002), "9223372036854775810\0-----------------------------------------------", 0x22}, - {10, ULL(0xffffffff,0xfffffffe), "-2\0----------------------------------------------------------------", 0x55}, - {10, ULL(0xffffffff,0xfffffffe), "-18446744073709551614\0---------------------------------------------", 0x00}, - {10, ULL(0xffffffff,0xfffffffe), "18446744073709551614\0----------------------------------------------", 0x22}, - {10, ULL(0xffffffff,0xffffffff), "-1\0----------------------------------------------------------------", 0x55}, - {10, ULL(0xffffffff,0xffffffff), "-18446744073709551615\0---------------------------------------------", 0x00}, - {10, ULL(0xffffffff,0xffffffff), "18446744073709551615\0----------------------------------------------", 0x22}, - - {16, 0, "0\0-----------------------------------------------------------------", 0x33}, - {16, 1, "1\0-----------------------------------------------------------------", 0x33}, - {16, 2147483646, "7ffffffe\0----------------------------------------------------------", 0x33}, - {16, 2147483647, "7fffffff\0----------------------------------------------------------", 0x33}, - {16, 0x80000000, "80000000\0----------------------------------------------------------", 0x33}, - {16, 0x80000001, "80000001\0----------------------------------------------------------", 0x33}, - {16, 0xFFFFFFFE, "fffffffe\0----------------------------------------------------------", 0x33}, - {16, 0xFFFFFFFF, "ffffffff\0----------------------------------------------------------", 0x33}, - {16, ULL(0x1,0x00000000), "100000000\0---------------------------------------------------------", 0x33}, - {16, ULL(0xbad,0xdeadbeef), "baddeadbeef\0-------------------------------------------------------", 0x33}, - {16, ULL(0x80000000,0x00000000), "8000000000000000\0--------------------------------------------------", 0x33}, - {16, ULL(0xfedcba98,0x76543210), "fedcba9876543210\0--------------------------------------------------", 0x33}, - {16, ULL(0xffffffff,0x80000001), "ffffffff80000001\0--------------------------------------------------", 0x33}, - {16, ULL(0xffffffff,0xfffffffe), "fffffffffffffffe\0--------------------------------------------------", 0x33}, - {16, ULL(0xffffffff,0xffffffff), "ffffffffffffffff\0--------------------------------------------------", 0x33}, - - { 2, 32768, "1000000000000000\0--------------------------------------------------", 0x33}, - { 2, 65536, "10000000000000000\0-------------------------------------------------", 0x33}, - { 2, 131072, "100000000000000000\0------------------------------------------------", 0x33}, - {16, 0xffffffff, "ffffffff\0----------------------------------------------------------", 0x33}, - {16, 0xa, "a\0-----------------------------------------------------------------", 0x33}, - {16, 0, "0\0-----------------------------------------------------------------", 0x33}, - {20, 3368421, "111111\0------------------------------------------------------------", 0x33}, - {36, 62193781, "111111\0------------------------------------------------------------", 0x33}, - {37, 71270178, "111111\0------------------------------------------------------------", 0x33}, - {99, ULL(0x2,0x3c9e468c), "111111\0------------------------------------------------------------", 0x33}, -}; -#define NB_ULONGLONG2STR (sizeof(ulonglong2str)/sizeof(*ulonglong2str)) - - -static void one_i64toa_test(int test_num, const ulonglong2str_t *ulonglong2str) -{ - LPSTR result; - char dest_str[LARGE_STRI_BUFFER_LENGTH + 1]; - - memset(dest_str, '-', LARGE_STRI_BUFFER_LENGTH); - dest_str[LARGE_STRI_BUFFER_LENGTH] = '\0'; - result = p_i64toa(ulonglong2str->value, dest_str, ulonglong2str->base); - ok(result == dest_str, - "(test %d): _i64toa(%08x%08x, [out], %d) has result %p, expected: %p\n", - test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value, - ulonglong2str->base, result, dest_str); - if (ulonglong2str->mask & 0x04) { - if (memcmp(dest_str, ulonglong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) != 0) { - if (memcmp(dest_str, ulonglong2str[1].Buffer, LARGE_STRI_BUFFER_LENGTH) != 0) { - ok(memcmp(dest_str, ulonglong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0, - "(test %d): _i64toa(%08x%08x, [out], %d) assigns string \"%s\", expected: \"%s\"\n", - test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value, - ulonglong2str->base, dest_str, ulonglong2str->Buffer); - } /* if */ - } /* if */ - } else { - ok(memcmp(dest_str, ulonglong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0, - "(test %d): _i64toa(%08x%08x, [out], %d) assigns string \"%s\", expected: \"%s\"\n", - test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value, - ulonglong2str->base, dest_str, ulonglong2str->Buffer); - } /* if */ -} - - -static void one_ui64toa_test(int test_num, const ulonglong2str_t *ulonglong2str) -{ - LPSTR result; - char dest_str[LARGE_STRI_BUFFER_LENGTH + 1]; - - memset(dest_str, '-', LARGE_STRI_BUFFER_LENGTH); - dest_str[LARGE_STRI_BUFFER_LENGTH] = '\0'; - result = p_ui64toa(ulonglong2str->value, dest_str, ulonglong2str->base); - ok(result == dest_str, - "(test %d): _ui64toa(%08x%08x, [out], %d) has result %p, expected: %p\n", - test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value, - ulonglong2str->base, result, dest_str); - ok(memcmp(dest_str, ulonglong2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0, - "(test %d): _ui64toa(%08x%08x, [out], %d) assigns string \"%s\", expected: \"%s\"\n", - test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value, - ulonglong2str->base, dest_str, ulonglong2str->Buffer); -} - - -static void test_ulonglongtoa(void) -{ - int test_num; - - for (test_num = 0; test_num < NB_ULONGLONG2STR; test_num++) { - if (ulonglong2str[test_num].mask & 0x01) { - one_i64toa_test(test_num, &ulonglong2str[test_num]); - } /* if */ - if (p_ui64toa != NULL) { - if (ulonglong2str[test_num].mask & 0x02) { - one_ui64toa_test(test_num, &ulonglong2str[test_num]); - } /* if */ - } /* if */ - } /* for */ -} - - -static void one_i64tow_test(int test_num, const ulonglong2str_t *ulonglong2str) -{ - int pos; - WCHAR expected_wstr[LARGE_STRI_BUFFER_LENGTH + 1]; - WCHAR dest_wstr[LARGE_STRI_BUFFER_LENGTH + 1]; - UNICODE_STRING unicode_string; - STRING ansi_str; - LPWSTR result; - - for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) { - expected_wstr[pos] = ulonglong2str->Buffer[pos]; - } /* for */ - expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0'; - - for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) { - dest_wstr[pos] = '-'; - } /* for */ - dest_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0'; - unicode_string.Length = LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR); - unicode_string.MaximumLength = unicode_string.Length + sizeof(WCHAR); - unicode_string.Buffer = dest_wstr; - - result = p_i64tow(ulonglong2str->value, dest_wstr, ulonglong2str->base); - pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1); - ok(result == dest_wstr, - "(test %d): _i64tow(0x%x%08x, [out], %d) has result %p, expected: %p\n", - test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value, - ulonglong2str->base, result, dest_wstr); - if (ulonglong2str->mask & 0x04) { - if (memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) != 0) { - for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) { - expected_wstr[pos] = ulonglong2str[1].Buffer[pos]; - } /* for */ - expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0'; - if (memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) != 0) { - ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0, - "(test %d): _i64tow(0x%x%08x, [out], %d) assigns string \"%s\", expected: \"%s\"\n", - test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value, - ulonglong2str->base, ansi_str.Buffer, ulonglong2str->Buffer); - } /* if */ - } /* if */ - } else { - ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0, - "(test %d): _i64tow(0x%x%08x, [out], %d) assigns string \"%s\", expected: \"%s\"\n", - test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value, - ulonglong2str->base, ansi_str.Buffer, ulonglong2str->Buffer); - } /* if */ - pRtlFreeAnsiString(&ansi_str); -} - - -static void one_ui64tow_test(int test_num, const ulonglong2str_t *ulonglong2str) -{ - int pos; - WCHAR expected_wstr[LARGE_STRI_BUFFER_LENGTH + 1]; - WCHAR dest_wstr[LARGE_STRI_BUFFER_LENGTH + 1]; - UNICODE_STRING unicode_string; - STRING ansi_str; - LPWSTR result; - - for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) { - expected_wstr[pos] = ulonglong2str->Buffer[pos]; - } /* for */ - expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0'; - - for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) { - dest_wstr[pos] = '-'; - } /* for */ - dest_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0'; - unicode_string.Length = LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR); - unicode_string.MaximumLength = unicode_string.Length + sizeof(WCHAR); - unicode_string.Buffer = dest_wstr; - - result = p_ui64tow(ulonglong2str->value, dest_wstr, ulonglong2str->base); - pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1); - ok(result == dest_wstr, - "(test %d): _ui64tow(0x%x%08x, [out], %d) has result %p, expected: %p\n", - test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value, - ulonglong2str->base, result, dest_wstr); - ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0, - "(test %d): _ui64tow(0x%x%08x, [out], %d) assigns string \"%s\", expected: \"%s\"\n", - test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value, - ulonglong2str->base, ansi_str.Buffer, ulonglong2str->Buffer); - pRtlFreeAnsiString(&ansi_str); -} - - -static void test_ulonglongtow(void) -{ - int test_num; - LPWSTR result; - - for (test_num = 0; test_num < NB_ULONGLONG2STR; test_num++) { - if (ulonglong2str[test_num].mask & 0x10) { - one_i64tow_test(test_num, &ulonglong2str[test_num]); - } /* if */ - if (p_ui64tow) { - if (ulonglong2str[test_num].mask & 0x20) { - one_ui64tow_test(test_num, &ulonglong2str[test_num]); - } /* if */ - } /* if */ - } /* for */ - - if (0) { - /* Crashes on XP and W2K3 */ - result = p_i64tow(ulonglong2str[0].value, NULL, 10); - ok(result == NULL, - "(test d): _i64tow(0x%x%08x, NULL, 10) has result %p, expected: NULL\n", - (DWORD)(ulonglong2str[0].value >> 32), (DWORD)ulonglong2str[0].value, result); - } - - if (p_ui64tow) { - if (0) { - /* Crashes on XP and W2K3 */ - result = p_ui64tow(ulonglong2str[0].value, NULL, 10); - ok(result == NULL, - "(test e): _ui64tow(0x%x%08x, NULL, 10) has result %p, expected: NULL\n", - (DWORD)(ulonglong2str[0].value >> 32), (DWORD)ulonglong2str[0].value, result); - } - } /* if */ -} - - -typedef struct { - const char *str; - LONG value; -} str2long_t; - -static const str2long_t str2long[] = { - { "1011101100", 1011101100 }, - { "1234567", 1234567 }, - { "-214", -214 }, - { "+214", 214 }, /* The + sign is allowed also */ - { "--214", 0 }, /* Do not accept more than one sign */ - { "-+214", 0 }, - { "++214", 0 }, - { "+-214", 0 }, - { "\00141", 0 }, /* not whitespace char 1 */ - { "\00242", 0 }, /* not whitespace char 2 */ - { "\00343", 0 }, /* not whitespace char 3 */ - { "\00444", 0 }, /* not whitespace char 4 */ - { "\00545", 0 }, /* not whitespace char 5 */ - { "\00646", 0 }, /* not whitespace char 6 */ - { "\00747", 0 }, /* not whitespace char 7 */ - { "\01050", 0 }, /* not whitespace char 8 */ - { "\01151", 51 }, /* is whitespace char 9 (tab) */ - { "\01252", 52 }, /* is whitespace char 10 (lf) */ - { "\01353", 53 }, /* is whitespace char 11 (vt) */ - { "\01454", 54 }, /* is whitespace char 12 (ff) */ - { "\01555", 55 }, /* is whitespace char 13 (cr) */ - { "\01656", 0 }, /* not whitespace char 14 */ - { "\01757", 0 }, /* not whitespace char 15 */ - { "\02060", 0 }, /* not whitespace char 16 */ - { "\02161", 0 }, /* not whitespace char 17 */ - { "\02262", 0 }, /* not whitespace char 18 */ - { "\02363", 0 }, /* not whitespace char 19 */ - { "\02464", 0 }, /* not whitespace char 20 */ - { "\02565", 0 }, /* not whitespace char 21 */ - { "\02666", 0 }, /* not whitespace char 22 */ - { "\02767", 0 }, /* not whitespace char 23 */ - { "\03070", 0 }, /* not whitespace char 24 */ - { "\03171", 0 }, /* not whitespace char 25 */ - { "\03272", 0 }, /* not whitespace char 26 */ - { "\03373", 0 }, /* not whitespace char 27 */ - { "\03474", 0 }, /* not whitespace char 28 */ - { "\03575", 0 }, /* not whitespace char 29 */ - { "\03676", 0 }, /* not whitespace char 30 */ - { "\03777", 0 }, /* not whitespace char 31 */ - { "\04080", 80 }, /* is whitespace char 32 (space) */ - { " \n \r \t214", 214 }, - { " \n \r \t+214", 214 }, /* Signs can be used after whitespace */ - { " \n \r \t-214", -214 }, - { "+214 0", 214 }, /* Space terminates the number */ - { " 214.01", 214 }, /* Decimal point not accepted */ - { " 214,01", 214 }, /* Decimal comma not accepted */ - { "f81", 0 }, - { "0x12345", 0 }, /* Hex not accepted */ - { "00x12345", 0 }, - { "0xx12345", 0 }, - { "1x34", 1 }, - { "-9999999999", -1410065407 }, /* Big negative integer */ - { "-2147483649", 2147483647 }, /* Too small to fit in 32 Bits */ - { "-2147483648", 0x80000000 }, /* Smallest negative integer */ - { "-2147483647", -2147483647 }, - { "-1", -1 }, - { "0", 0 }, - { "1", 1 }, - { "2147483646", 2147483646 }, - { "2147483647", 2147483647 }, /* Largest signed positive integer */ - { "2147483648", 2147483648UL }, /* Positive int equal to smallest negative int */ - { "2147483649", 2147483649UL }, - { "4294967294", 4294967294UL }, - { "4294967295", 4294967295UL }, /* Largest unsigned integer */ - { "4294967296", 0 }, /* Too big to fit in 32 Bits */ - { "9999999999", 1410065407 }, /* Big positive integer */ - { "056789", 56789 }, /* Leading zero and still decimal */ - { "b1011101100", 0 }, /* Binary (b-notation) */ - { "-b1011101100", 0 }, /* Negative Binary (b-notation) */ - { "b10123456789", 0 }, /* Binary with nonbinary digits (2-9) */ - { "0b1011101100", 0 }, /* Binary (0b-notation) */ - { "-0b1011101100", 0 }, /* Negative binary (0b-notation) */ - { "0b10123456789", 0 }, /* Binary with nonbinary digits (2-9) */ - { "-0b10123456789", 0 }, /* Negative binary with nonbinary digits (2-9) */ - { "0b1", 0 }, /* one digit binary */ - { "0b2", 0 }, /* empty binary */ - { "0b", 0 }, /* empty binary */ - { "o1234567", 0 }, /* Octal (o-notation) */ - { "-o1234567", 0 }, /* Negative Octal (o-notation) */ - { "o56789", 0 }, /* Octal with nonoctal digits (8 and 9) */ - { "0o1234567", 0 }, /* Octal (0o-notation) */ - { "-0o1234567", 0 }, /* Negative octal (0o-notation) */ - { "0o56789", 0 }, /* Octal with nonoctal digits (8 and 9) */ - { "-0o56789", 0 }, /* Negative octal with nonoctal digits (8 and 9) */ - { "0o7", 0 }, /* one digit octal */ - { "0o8", 0 }, /* empty octal */ - { "0o", 0 }, /* empty octal */ - { "0d1011101100", 0 }, /* explicit decimal with 0d */ - { "x89abcdef", 0 }, /* Hex with lower case digits a-f (x-notation) */ - { "xFEDCBA00", 0 }, /* Hex with upper case digits A-F (x-notation) */ - { "-xFEDCBA00", 0 }, /* Negative Hexadecimal (x-notation) */ - { "0x89abcdef", 0 }, /* Hex with lower case digits a-f (0x-notation) */ - { "0xFEDCBA00", 0 }, /* Hex with upper case digits A-F (0x-notation) */ - { "-0xFEDCBA00", 0 }, /* Negative Hexadecimal (0x-notation) */ - { "0xabcdefgh", 0 }, /* Hex with illegal lower case digits (g-z) */ - { "0xABCDEFGH", 0 }, /* Hex with illegal upper case digits (G-Z) */ - { "0xF", 0 }, /* one digit hexadecimal */ - { "0xG", 0 }, /* empty hexadecimal */ - { "0x", 0 }, /* empty hexadecimal */ - { "", 0 }, /* empty string */ -/* { NULL, 0 }, */ /* NULL as string */ -}; -#define NB_STR2LONG (sizeof(str2long)/sizeof(*str2long)) - - -static void test_wtoi(void) -{ - int test_num; - UNICODE_STRING uni; - int result; - - for (test_num = 0; test_num < NB_STR2LONG; test_num++) { - pRtlCreateUnicodeStringFromAsciiz(&uni, str2long[test_num].str); - result = p_wtoi(uni.Buffer); - ok(result == str2long[test_num].value, - "(test %d): call failed: _wtoi(\"%s\") has result %d, expected: %d\n", - test_num, str2long[test_num].str, result, str2long[test_num].value); - pRtlFreeUnicodeString(&uni); - } /* for */ -} - -static void test_atoi(void) -{ - int test_num; - int result; - - for (test_num = 0; test_num < NB_STR2LONG; test_num++) { - result = patoi(str2long[test_num].str); - ok(result == str2long[test_num].value, - "(test %d): call failed: _atoi(\"%s\") has result %d, expected: %d\n", - test_num, str2long[test_num].str, result, str2long[test_num].value); - } -} - -static void test_atol(void) -{ - int test_num; - int result; - - for (test_num = 0; test_num < NB_STR2LONG; test_num++) { - result = patol(str2long[test_num].str); - ok(result == str2long[test_num].value, - "(test %d): call failed: _atol(\"%s\") has result %d, expected: %d\n", - test_num, str2long[test_num].str, result, str2long[test_num].value); - } -} - -static void test_wtol(void) -{ - int test_num; - UNICODE_STRING uni; - LONG result; - - for (test_num = 0; test_num < NB_STR2LONG; test_num++) { - pRtlCreateUnicodeStringFromAsciiz(&uni, str2long[test_num].str); - result = p_wtol(uni.Buffer); - ok(result == str2long[test_num].value, - "(test %d): call failed: _wtol(\"%s\") has result %d, expected: %d\n", - test_num, str2long[test_num].str, result, str2long[test_num].value); - pRtlFreeUnicodeString(&uni); - } /* for */ -} - - -typedef struct { - const char *str; - LONGLONG value; - int overflow; -} str2longlong_t; - -static const str2longlong_t str2longlong[] = { - { "1011101100", 1011101100 }, - { "1234567", 1234567 }, - { "-214", -214 }, - { "+214", 214 }, /* The + sign is allowed also */ - { "--214", 0 }, /* Do not accept more than one sign */ - { "-+214", 0 }, - { "++214", 0 }, - { "+-214", 0 }, - { "\00141", 0 }, /* not whitespace char 1 */ - { "\00242", 0 }, /* not whitespace char 2 */ - { "\00343", 0 }, /* not whitespace char 3 */ - { "\00444", 0 }, /* not whitespace char 4 */ - { "\00545", 0 }, /* not whitespace char 5 */ - { "\00646", 0 }, /* not whitespace char 6 */ - { "\00747", 0 }, /* not whitespace char 7 */ - { "\01050", 0 }, /* not whitespace char 8 */ - { "\01151", 51 }, /* is whitespace char 9 (tab) */ - { "\01252", 52 }, /* is whitespace char 10 (lf) */ - { "\01353", 53 }, /* is whitespace char 11 (vt) */ - { "\01454", 54 }, /* is whitespace char 12 (ff) */ - { "\01555", 55 }, /* is whitespace char 13 (cr) */ - { "\01656", 0 }, /* not whitespace char 14 */ - { "\01757", 0 }, /* not whitespace char 15 */ - { "\02060", 0 }, /* not whitespace char 16 */ - { "\02161", 0 }, /* not whitespace char 17 */ - { "\02262", 0 }, /* not whitespace char 18 */ - { "\02363", 0 }, /* not whitespace char 19 */ - { "\02464", 0 }, /* not whitespace char 20 */ - { "\02565", 0 }, /* not whitespace char 21 */ - { "\02666", 0 }, /* not whitespace char 22 */ - { "\02767", 0 }, /* not whitespace char 23 */ - { "\03070", 0 }, /* not whitespace char 24 */ - { "\03171", 0 }, /* not whitespace char 25 */ - { "\03272", 0 }, /* not whitespace char 26 */ - { "\03373", 0 }, /* not whitespace char 27 */ - { "\03474", 0 }, /* not whitespace char 28 */ - { "\03575", 0 }, /* not whitespace char 29 */ - { "\03676", 0 }, /* not whitespace char 30 */ - { "\03777", 0 }, /* not whitespace char 31 */ - { "\04080", 80 }, /* is whitespace char 32 (space) */ - { " \n \r \t214", 214 }, - { " \n \r \t+214", 214 }, /* Signs can be used after whitespace */ - { " \n \r \t-214", -214 }, - { "+214 0", 214 }, /* Space terminates the number */ - { " 214.01", 214 }, /* Decimal point not accepted */ - { " 214,01", 214 }, /* Decimal comma not accepted */ - { "f81", 0 }, - { "0x12345", 0 }, /* Hex not accepted */ - { "00x12345", 0 }, - { "0xx12345", 0 }, - { "1x34", 1 }, - { "-99999999999999999999", -ULL(0x6bc75e2d,0x630fffff), -1 }, /* Big negative integer */ - { "-9223372036854775809", ULL(0x7fffffff,0xffffffff), -1 }, /* Too small to fit in 64 bits */ - { "-9223372036854775808", ULL(0x80000000,0x00000000) }, /* Smallest negative 64 bit integer */ - { "-9223372036854775807", -ULL(0x7fffffff,0xffffffff) }, - { "-9999999999", -ULL(0x00000002,0x540be3ff) }, - { "-2147483649", -ULL(0x00000000,0x80000001) }, /* Too small to fit in 32 bits */ - { "-2147483648", -ULL(0x00000000,0x80000000) }, /* Smallest 32 bits negative integer */ - { "-2147483647", -2147483647 }, - { "-1", -1 }, - { "0", 0 }, - { "1", 1 }, - { "2147483646", 2147483646 }, - { "2147483647", 2147483647 }, /* Largest signed positive 32 bit integer */ - { "2147483648", ULL(0x00000000,0x80000000) }, /* Pos int equal to smallest neg 32 bit int */ - { "2147483649", ULL(0x00000000,0x80000001) }, - { "4294967294", ULL(0x00000000,0xfffffffe) }, - { "4294967295", ULL(0x00000000,0xffffffff) }, /* Largest unsigned 32 bit integer */ - { "4294967296", ULL(0x00000001,0x00000000) }, /* Too big to fit in 32 Bits */ - { "9999999999", ULL(0x00000002,0x540be3ff) }, - { "9223372036854775806", ULL(0x7fffffff,0xfffffffe) }, - { "9223372036854775807", ULL(0x7fffffff,0xffffffff) }, /* Largest signed positive 64 bit integer */ - { "9223372036854775808", ULL(0x80000000,0x00000000), 1 }, /* Pos int equal to smallest neg 64 bit int */ - { "9223372036854775809", ULL(0x80000000,0x00000001), 1 }, - { "18446744073709551614", ULL(0xffffffff,0xfffffffe), 1 }, - { "18446744073709551615", ULL(0xffffffff,0xffffffff), 1 }, /* Largest unsigned 64 bit integer */ - { "18446744073709551616", 0, 1 }, /* Too big to fit in 64 bits */ - { "99999999999999999999", ULL(0x6bc75e2d,0x630fffff), 1 }, /* Big positive integer */ - { "056789", 56789 }, /* Leading zero and still decimal */ - { "b1011101100", 0 }, /* Binary (b-notation) */ - { "-b1011101100", 0 }, /* Negative Binary (b-notation) */ - { "b10123456789", 0 }, /* Binary with nonbinary digits (2-9) */ - { "0b1011101100", 0 }, /* Binary (0b-notation) */ - { "-0b1011101100", 0 }, /* Negative binary (0b-notation) */ - { "0b10123456789", 0 }, /* Binary with nonbinary digits (2-9) */ - { "-0b10123456789", 0 }, /* Negative binary with nonbinary digits (2-9) */ - { "0b1", 0 }, /* one digit binary */ - { "0b2", 0 }, /* empty binary */ - { "0b", 0 }, /* empty binary */ - { "o1234567", 0 }, /* Octal (o-notation) */ - { "-o1234567", 0 }, /* Negative Octal (o-notation) */ - { "o56789", 0 }, /* Octal with nonoctal digits (8 and 9) */ - { "0o1234567", 0 }, /* Octal (0o-notation) */ - { "-0o1234567", 0 }, /* Negative octal (0o-notation) */ - { "0o56789", 0 }, /* Octal with nonoctal digits (8 and 9) */ - { "-0o56789", 0 }, /* Negative octal with nonoctal digits (8 and 9) */ - { "0o7", 0 }, /* one digit octal */ - { "0o8", 0 }, /* empty octal */ - { "0o", 0 }, /* empty octal */ - { "0d1011101100", 0 }, /* explicit decimal with 0d */ - { "x89abcdef", 0 }, /* Hex with lower case digits a-f (x-notation) */ - { "xFEDCBA00", 0 }, /* Hex with upper case digits A-F (x-notation) */ - { "-xFEDCBA00", 0 }, /* Negative Hexadecimal (x-notation) */ - { "0x89abcdef", 0 }, /* Hex with lower case digits a-f (0x-notation) */ - { "0xFEDCBA00", 0 }, /* Hex with upper case digits A-F (0x-notation) */ - { "-0xFEDCBA00", 0 }, /* Negative Hexadecimal (0x-notation) */ - { "0xabcdefgh", 0 }, /* Hex with illegal lower case digits (g-z) */ - { "0xABCDEFGH", 0 }, /* Hex with illegal upper case digits (G-Z) */ - { "0xF", 0 }, /* one digit hexadecimal */ - { "0xG", 0 }, /* empty hexadecimal */ - { "0x", 0 }, /* empty hexadecimal */ - { "", 0 }, /* empty string */ -/* { NULL, 0 }, */ /* NULL as string */ -}; -#define NB_STR2LONGLONG (sizeof(str2longlong)/sizeof(*str2longlong)) - - -static void test_atoi64(void) -{ - int test_num; - LONGLONG result; - - for (test_num = 0; test_num < NB_STR2LONGLONG; test_num++) { - result = p_atoi64(str2longlong[test_num].str); - if (str2longlong[test_num].overflow) - ok(result == str2longlong[test_num].value || - (result == (str2longlong[test_num].overflow == -1) ? - ULL(0x80000000,0x00000000) : ULL(0x7fffffff,0xffffffff)), - "(test %d): call failed: _atoi64(\"%s\") has result 0x%x%08x, expected: 0x%x%08x\n", - test_num, str2longlong[test_num].str, (DWORD)(result >> 32), (DWORD)result, - (DWORD)(str2longlong[test_num].value >> 32), (DWORD)str2longlong[test_num].value); - else - ok(result == str2longlong[test_num].value, - "(test %d): call failed: _atoi64(\"%s\") has result 0x%x%08x, expected: 0x%x%08x\n", - test_num, str2longlong[test_num].str, (DWORD)(result >> 32), (DWORD)result, - (DWORD)(str2longlong[test_num].value >> 32), (DWORD)str2longlong[test_num].value); - } -} - - -static void test_wtoi64(void) -{ - int test_num; - UNICODE_STRING uni; - LONGLONG result; - - for (test_num = 0; test_num < NB_STR2LONGLONG; test_num++) { - pRtlCreateUnicodeStringFromAsciiz(&uni, str2longlong[test_num].str); - result = p_wtoi64(uni.Buffer); - if (str2longlong[test_num].overflow) - ok(result == str2longlong[test_num].value || - (result == (str2longlong[test_num].overflow == -1) ? - ULL(0x80000000,0x00000000) : ULL(0x7fffffff,0xffffffff)), - "(test %d): call failed: _atoi64(\"%s\") has result 0x%x%08x, expected: 0x%x%08x\n", - test_num, str2longlong[test_num].str, (DWORD)(result >> 32), (DWORD)result, - (DWORD)(str2longlong[test_num].value >> 32), (DWORD)str2longlong[test_num].value); - else - ok(result == str2longlong[test_num].value, - "(test %d): call failed: _atoi64(\"%s\") has result 0x%x%08x, expected: 0x%x%08x\n", - test_num, str2longlong[test_num].str, (DWORD)(result >> 32), (DWORD)result, - (DWORD)(str2longlong[test_num].value >> 32), (DWORD)str2longlong[test_num].value); - pRtlFreeUnicodeString(&uni); - } -} - -static void test_wcschr(void) -{ - static const WCHAR teststringW[] = {'a','b','r','a','c','a','d','a','b','r','a',0}; - - ok(p_wcschr(teststringW, 'a') == teststringW + 0, - "wcschr should have returned a pointer to the first 'a' character\n"); - ok(p_wcschr(teststringW, 0) == teststringW + 11, - "wcschr should have returned a pointer to the null terminator\n"); - ok(p_wcschr(teststringW, 'x') == NULL, - "wcschr should have returned NULL\n"); -} - -static void test_wcsrchr(void) -{ - static const WCHAR teststringW[] = {'a','b','r','a','c','a','d','a','b','r','a',0}; - - ok(p_wcsrchr(teststringW, 'a') == teststringW + 10, - "wcsrchr should have returned a pointer to the last 'a' character\n"); - ok(p_wcsrchr(teststringW, 0) == teststringW + 11, - "wcsrchr should have returned a pointer to the null terminator\n"); - ok(p_wcsrchr(teststringW, 'x') == NULL, - "wcsrchr should have returned NULL\n"); -} - -static void test_wcslwrupr(void) -{ - static WCHAR teststringW[] = {'a','b','r','a','c','a','d','a','b','r','a',0}; - static WCHAR emptyW[1] = {0}; - static const WCHAR constemptyW[1] = {0}; - - if (0) /* crashes on native */ - { - static const WCHAR conststringW[] = {'a','b','r','a','c','a','d','a','b','r','a',0}; - ok(p_wcslwr((LPWSTR)conststringW) == conststringW, "p_wcslwr returned different string\n"); - ok(p_wcsupr((LPWSTR)conststringW) == conststringW, "p_wcsupr returned different string\n"); - ok(p_wcslwr(NULL) == NULL, "p_wcslwr didn't returned NULL\n"); - ok(p_wcsupr(NULL) == NULL, "p_wcsupr didn't returned NULL\n"); - } - ok(p_wcslwr(teststringW) == teststringW, "p_wcslwr returned different string\n"); - ok(p_wcsupr(teststringW) == teststringW, "p_wcsupr returned different string\n"); - ok(p_wcslwr(emptyW) == emptyW, "p_wcslwr returned different string\n"); - ok(p_wcsupr(emptyW) == emptyW, "p_wcsupr returned different string\n"); - ok(p_wcslwr((LPWSTR)constemptyW) == constemptyW, "p_wcslwr returned different string\n"); - ok(p_wcsupr((LPWSTR)constemptyW) == constemptyW, "p_wcsupr returned different string\n"); -} - -static int __cdecl intcomparefunc(const void *a, const void *b) -{ - const int *p = a, *q = b; - - ok (a != b, "must never get the same pointer\n"); - - return *p - *q; -} - -static int __cdecl charcomparefunc(const void *a, const void *b) -{ - const char *p = a, *q = b; - - ok (a != b, "must never get the same pointer\n"); - - return *p - *q; -} - -static int __cdecl strcomparefunc(const void *a, const void *b) -{ - const char * const *p = a; - const char * const *q = b; - - ok (a != b, "must never get the same pointer\n"); - - return lstrcmpA(*p, *q); -} - -static void test_qsort(void) -{ - int arr[5] = { 23, 42, 8, 4, 16 }; - char carr[5] = { 42, 23, 4, 8, 16 }; - const char *strarr[7] = { - "Hello", - "Wine", - "World", - "!", - "Hopefully", - "Sorted", - "." - }; - - p_qsort ((void*)arr, 0, sizeof(int), intcomparefunc); - ok(arr[0] == 23, "badly sorted, nmemb=0, arr[0] is %d\n", arr[0]); - ok(arr[1] == 42, "badly sorted, nmemb=0, arr[1] is %d\n", arr[1]); - ok(arr[2] == 8, "badly sorted, nmemb=0, arr[2] is %d\n", arr[2]); - ok(arr[3] == 4, "badly sorted, nmemb=0, arr[3] is %d\n", arr[3]); - ok(arr[4] == 16, "badly sorted, nmemb=0, arr[4] is %d\n", arr[4]); - - p_qsort ((void*)arr, 1, sizeof(int), intcomparefunc); - ok(arr[0] == 23, "badly sorted, nmemb=1, arr[0] is %d\n", arr[0]); - ok(arr[1] == 42, "badly sorted, nmemb=1, arr[1] is %d\n", arr[1]); - ok(arr[2] == 8, "badly sorted, nmemb=1, arr[2] is %d\n", arr[2]); - ok(arr[3] == 4, "badly sorted, nmemb=1, arr[3] is %d\n", arr[3]); - ok(arr[4] == 16, "badly sorted, nmemb=1, arr[4] is %d\n", arr[4]); - - p_qsort ((void*)arr, 5, 0, intcomparefunc); - ok(arr[0] == 23, "badly sorted, size=0, arr[0] is %d\n", arr[0]); - ok(arr[1] == 42, "badly sorted, size=0, arr[1] is %d\n", arr[1]); - ok(arr[2] == 8, "badly sorted, size=0, arr[2] is %d\n", arr[2]); - ok(arr[3] == 4, "badly sorted, size=0, arr[3] is %d\n", arr[3]); - ok(arr[4] == 16, "badly sorted, size=0, arr[4] is %d\n", arr[4]); - - p_qsort ((void*)arr, 5, sizeof(int), intcomparefunc); - ok(arr[0] == 4, "badly sorted, arr[0] is %d\n", arr[0]); - ok(arr[1] == 8, "badly sorted, arr[1] is %d\n", arr[1]); - ok(arr[2] == 16, "badly sorted, arr[2] is %d\n", arr[2]); - ok(arr[3] == 23, "badly sorted, arr[3] is %d\n", arr[3]); - ok(arr[4] == 42, "badly sorted, arr[4] is %d\n", arr[4]); - - p_qsort ((void*)carr, 5, sizeof(char), charcomparefunc); - ok(carr[0] == 4, "badly sorted, carr[0] is %d\n", carr[0]); - ok(carr[1] == 8, "badly sorted, carr[1] is %d\n", carr[1]); - ok(carr[2] == 16, "badly sorted, carr[2] is %d\n", carr[2]); - ok(carr[3] == 23, "badly sorted, carr[3] is %d\n", carr[3]); - ok(carr[4] == 42, "badly sorted, carr[4] is %d\n", carr[4]); - - p_qsort ((void*)strarr, 7, sizeof(char*), strcomparefunc); - ok(!strcmp(strarr[0],"!"), "badly sorted, strarr[0] is %s\n", strarr[0]); - ok(!strcmp(strarr[1],"."), "badly sorted, strarr[1] is %s\n", strarr[1]); - ok(!strcmp(strarr[2],"Hello"), "badly sorted, strarr[2] is %s\n", strarr[2]); - ok(!strcmp(strarr[3],"Hopefully"), "badly sorted, strarr[3] is %s\n", strarr[3]); - ok(!strcmp(strarr[4],"Sorted"), "badly sorted, strarr[4] is %s\n", strarr[4]); - ok(!strcmp(strarr[5],"Wine"), "badly sorted, strarr[5] is %s\n", strarr[5]); - ok(!strcmp(strarr[6],"World"), "badly sorted, strarr[6] is %s\n", strarr[6]); -} - -static void test_bsearch(void) -{ - int arr[7] = { 1, 3, 4, 8, 16, 23, 42 }; - int *x, l, i,j ; - - /* just try all all sizes */ - for (j=1;j - -#define STANDALONE -#include "wine/test.h" - -extern void func_atom(void); -extern void func_change(void); -extern void func_directory(void); -extern void func_env(void); -extern void func_error(void); -extern void func_exception(void); -extern void func_file(void); -extern void func_generated(void); -extern void func_info(void); -extern void func_large_int(void); -extern void func_om(void); -extern void func_path(void); -extern void func_pipe(void); -extern void func_port(void); -extern void func_reg(void); -extern void func_rtl(void); -extern void func_rtlbitmap(void); -extern void func_rtlstr(void); -extern void func_string(void); -extern void func_time(void); - -const struct test winetest_testlist[] = -{ - { "atom", func_atom }, - { "change", func_change }, - { "directory", func_directory }, - { "env", func_env }, - { "error", func_error }, - { "exception", func_exception }, - { "file", func_file }, - { "generated", func_generated }, - { "info", func_info }, - { "large_int", func_large_int }, - { "om", func_om }, - { "path", func_path }, - { "pipe", func_pipe }, - { "port", func_port }, - { "reg", func_reg }, - { "rtl", func_rtl }, - { "rtlbitmap", func_rtlbitmap }, - { "rtlstr", func_rtlstr }, - { "string", func_string }, - { "time", func_time }, - { 0, 0 } -}; diff --git a/rostests/winetests/ntdll/time.c b/rostests/winetests/ntdll/time.c deleted file mode 100755 index ff80b841078..00000000000 --- a/rostests/winetests/ntdll/time.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Unit test suite for ntdll time functions - * - * Copyright 2004 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 - */ - -#include "ntdll_test.h" - -#define TICKSPERSEC 10000000 -#define TICKSPERMSEC 10000 -#define SECSPERDAY 86400 - -static VOID (WINAPI *pRtlTimeToTimeFields)( const LARGE_INTEGER *liTime, PTIME_FIELDS TimeFields) ; -static VOID (WINAPI *pRtlTimeFieldsToTime)( PTIME_FIELDS TimeFields, PLARGE_INTEGER Time) ; - -static const int MonthLengths[2][12] = -{ - { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }, - { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } -}; - -static inline int IsLeapYear(int Year) -{ - return Year % 4 == 0 && (Year % 100 != 0 || Year % 400 == 0) ? 1 : 0; -} - -/* start time of the tests */ -static TIME_FIELDS tftest = {1889,12,31,23,59,59,0,0}; - -static void test_pRtlTimeToTimeFields(void) -{ - LARGE_INTEGER litime , liresult; - TIME_FIELDS tfresult; - int i=0; - litime.QuadPart = ((ULONGLONG)0x0144017a << 32) | 0xf0b0a980; - while( tftest.Year < 2110 ) { - /* test at the last second of the month */ - pRtlTimeToTimeFields( &litime, &tfresult); - ok( tfresult.Year == tftest.Year && tfresult.Month == tftest.Month && - tfresult.Day == tftest.Day && tfresult.Hour == tftest.Hour && - tfresult.Minute == tftest.Minute && tfresult.Second == tftest.Second, - "#%d expected: %d-%d-%d %d:%d:%d got: %d-%d-%d %d:%d:%d\n", ++i, - tftest.Year, tftest.Month, tftest.Day, - tftest.Hour, tftest.Minute,tftest.Second, - tfresult.Year, tfresult.Month, tfresult.Day, - tfresult.Hour, tfresult.Minute, tfresult.Second); - /* test the inverse */ - pRtlTimeFieldsToTime( &tfresult, &liresult); - ok( liresult.QuadPart == litime.QuadPart," TimeFieldsToTime failed on %d-%d-%d %d:%d:%d. Error is %d ticks\n", - tfresult.Year, tfresult.Month, tfresult.Day, - tfresult.Hour, tfresult.Minute, tfresult.Second, - (int) (liresult.QuadPart - litime.QuadPart) ); - /* one second later is beginning of next month */ - litime.QuadPart += TICKSPERSEC ; - pRtlTimeToTimeFields( &litime, &tfresult); - ok( tfresult.Year == tftest.Year + (tftest.Month ==12) && - tfresult.Month == tftest.Month % 12 + 1 && - tfresult.Day == 1 && tfresult.Hour == 0 && - tfresult.Minute == 0 && tfresult.Second == 0, - "#%d expected: %d-%d-%d %d:%d:%d got: %d-%d-%d %d:%d:%d\n", ++i, - tftest.Year + (tftest.Month ==12), - tftest.Month % 12 + 1, 1, 0, 0, 0, - tfresult.Year, tfresult.Month, tfresult.Day, - tfresult.Hour, tfresult.Minute, tfresult.Second); - /* test the inverse */ - pRtlTimeFieldsToTime( &tfresult, &liresult); - ok( liresult.QuadPart == litime.QuadPart," TimeFieldsToTime failed on %d-%d-%d %d:%d:%d. Error is %d ticks\n", - tfresult.Year, tfresult.Month, tfresult.Day, - tfresult.Hour, tfresult.Minute, tfresult.Second, - (int) (liresult.QuadPart - litime.QuadPart) ); - /* advance to the end of the month */ - litime.QuadPart -= TICKSPERSEC ; - if( tftest.Month == 12) { - tftest.Month = 1; - tftest.Year += 1; - } else - tftest.Month += 1; - tftest.Day = MonthLengths[IsLeapYear(tftest.Year)][tftest.Month - 1]; - litime.QuadPart += (LONGLONG) tftest.Day * TICKSPERSEC * SECSPERDAY; - } -} - -START_TEST(time) -{ - HMODULE mod = GetModuleHandleA("ntdll.dll"); - pRtlTimeToTimeFields = (void *)GetProcAddress(mod,"RtlTimeToTimeFields"); - pRtlTimeFieldsToTime = (void *)GetProcAddress(mod,"RtlTimeFieldsToTime"); - if (pRtlTimeToTimeFields && pRtlTimeFieldsToTime) - test_pRtlTimeToTimeFields(); - else - win_skip("Required time conversion functions are not available\n"); -} diff --git a/rostests/winetests/ntdsapi/CMakeLists.txt b/rostests/winetests/ntdsapi/CMakeLists.txt deleted file mode 100644 index 715f01bc41a..00000000000 --- a/rostests/winetests/ntdsapi/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(ntdsapi_winetest ntdsapi.c testlist.c) -target_link_libraries(ntdsapi_winetest wine) -set_module_type(ntdsapi_winetest win32cui) -add_importlibs(ntdsapi_winetest ntdsapi msvcrt kernel32 ntdll) -add_cd_file(TARGET ntdsapi_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/ntdsapi/ntdsapi.c b/rostests/winetests/ntdsapi/ntdsapi.c deleted file mode 100644 index 8290ed2cbf1..00000000000 --- a/rostests/winetests/ntdsapi/ntdsapi.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (C) 2008 Robert Shearman (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 - -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "winnls.h" -#include "rpc.h" -#include "rpcdce.h" -#include "ntdsapi.h" - -#include "wine/test.h" - -static void test_DsMakeSpn(void) -{ - DWORD ret; - WCHAR spn[256]; - DWORD spn_length; - static const WCHAR wszServiceClass[] = {'c','l','a','s','s',0}; - static const WCHAR wszServiceHost[] = {'h','o','s','t',0}; - static const WCHAR wszInstanceName[] = {'i','n','s','t','a','n','c','e',0}; - static const WCHAR wszReferrer[] = {'r','e','f','e','r','r','e','r',0}; - static const WCHAR wszSpn1[] = {'c','l','a','s','s','/','h','o','s','t',0}; - static const WCHAR wszSpn2[] = {'c','l','a','s','s','/','i','n','s','t','a','n','c','e','/','h','o','s','t',0}; - static const WCHAR wszSpn3[] = {'c','l','a','s','s','/','i','n','s','t','a','n','c','e',':','5','5','5','/','h','o','s','t',0}; - static const WCHAR wszSpn4[] = {'c','l','a','s','s','/','i','n','s','t','a','n','c','e',':','5','5','5','/','h','o','s','t',0}; - static const WCHAR wszSpn5[] = {'c','l','a','s','s','/','h','o','s','t',':','5','5','5',0}; - - spn[0] = '\0'; - - spn_length = sizeof(spn)/sizeof(spn[0]); - ret = DsMakeSpnW(NULL, NULL, NULL, 0, NULL, &spn_length, spn); - ok(ret == ERROR_INVALID_PARAMETER, "DsMakeSpnW should have failed with ERROR_INVALID_PARAMETER instead of %d\n", ret); - - spn_length = sizeof(spn)/sizeof(spn[0]); - ret = DsMakeSpnW(NULL, wszServiceHost, NULL, 0, NULL, &spn_length, spn); - ok(ret == ERROR_INVALID_PARAMETER, "DsMakeSpnW should have failed with ERROR_INVALID_PARAMETER instead of %d\n", ret); - - spn_length = sizeof(spn)/sizeof(spn[0]); - ret = DsMakeSpnW(wszServiceClass, wszServiceHost, NULL, 0, NULL, &spn_length, spn); - ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %d\n", ret); - ok(!lstrcmpW(spn, wszSpn1), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn)); - ok(spn_length == lstrlenW(wszSpn1) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %d\n", lstrlenW(wszSpn1) + 1, spn_length); - - spn_length = sizeof(spn)/sizeof(spn[0]); - ret = DsMakeSpnW(wszServiceClass, wszServiceHost, wszInstanceName, 0, NULL, &spn_length, spn); - ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %d\n", ret); - ok(!lstrcmpW(spn, wszSpn2), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn)); - ok(spn_length == lstrlenW(wszSpn2) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %d\n", lstrlenW(wszSpn2) + 1, spn_length); - - spn_length = sizeof(spn)/sizeof(spn[0]); - ret = DsMakeSpnW(wszServiceClass, wszServiceHost, wszInstanceName, 555, NULL, &spn_length, spn); - ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %d\n", ret); - ok(!lstrcmpW(spn, wszSpn3), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn)); - ok(spn_length == lstrlenW(wszSpn3) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %d\n", lstrlenW(wszSpn3) + 1, spn_length); - - spn_length = sizeof(spn)/sizeof(spn[0]); - ret = DsMakeSpnW(wszServiceClass, wszServiceHost, wszInstanceName, 555, wszReferrer, &spn_length, spn); - ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %d\n", ret); - ok(!lstrcmpW(spn, wszSpn4), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn)); - ok(spn_length == lstrlenW(wszSpn4) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %d\n", lstrlenW(wszSpn4) + 1, spn_length); - - spn_length = sizeof(spn)/sizeof(spn[0]); - ret = DsMakeSpnW(wszServiceClass, wszServiceHost, NULL, 555, wszReferrer, &spn_length, spn); - ok(ret == ERROR_SUCCESS, "DsMakeSpnW should have succeeded instead of failing with %d\n", ret); - ok(!lstrcmpW(spn, wszSpn5), "DsMakeSpnW returned unexpected SPN %s\n", wine_dbgstr_w(spn)); - ok(spn_length == lstrlenW(wszSpn5) + 1, "DsMakeSpnW should have returned spn_length of %d instead of %d\n", lstrlenW(wszSpn5) + 1, spn_length); -} - -START_TEST( ntdsapi ) -{ - test_DsMakeSpn(); -} diff --git a/rostests/winetests/ntdsapi/ntdsapi.rbuild b/rostests/winetests/ntdsapi/ntdsapi.rbuild deleted file mode 100644 index ce6c229164c..00000000000 --- a/rostests/winetests/ntdsapi/ntdsapi.rbuild +++ /dev/null @@ -1,9 +0,0 @@ - - . - - ntdsapi.c - testlist.c - wine - ntdsapi - ntdll - diff --git a/rostests/winetests/ntdsapi/testlist.c b/rostests/winetests/ntdsapi/testlist.c deleted file mode 100644 index c21305eb764..00000000000 --- a/rostests/winetests/ntdsapi/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_ntdsapi(void); - -const struct test winetest_testlist[] = -{ - { "ntdsapi", func_ntdsapi }, - { 0, 0 } -}; diff --git a/rostests/winetests/ntprint/CMakeLists.txt b/rostests/winetests/ntprint/CMakeLists.txt deleted file mode 100644 index 3ff4a90b80b..00000000000 --- a/rostests/winetests/ntprint/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(ntprint_winetest ntprint.c testlist.c) -target_link_libraries(ntprint_winetest wine) -set_module_type(ntprint_winetest win32cui) -add_importlibs(ntprint_winetest msvcrt kernel32 ntdll) -add_cd_file(TARGET ntprint_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/ntprint/ntprint.c b/rostests/winetests/ntprint/ntprint.c deleted file mode 100644 index fca7b8d4848..00000000000 --- a/rostests/winetests/ntprint/ntprint.c +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Unit test suite for the Spooler Setup API (Printing) - * - * Copyright 2007 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 -#include - -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "wingdi.h" -#include "wine/test.h" - - -/* ##### */ - -static HMODULE hdll; -static HANDLE (WINAPI *pPSetupCreateMonitorInfo)(LPVOID, LPVOID, LPVOID); -static VOID (WINAPI *pPSetupDestroyMonitorInfo)(HANDLE); -static BOOL (WINAPI *pPSetupEnumMonitor)(HANDLE, DWORD, LPWSTR, LPDWORD); - -/* ########################### */ - -static LPCSTR load_functions(void) -{ - LPCSTR ptr; - - ptr = "ntprint.dll"; - hdll = LoadLibraryA(ptr); - if (!hdll) return ptr; - - ptr = "PSetupCreateMonitorInfo"; - pPSetupCreateMonitorInfo = (VOID *) GetProcAddress(hdll, ptr); - if (!pPSetupCreateMonitorInfo) return ptr; - - ptr = "PSetupDestroyMonitorInfo"; - pPSetupDestroyMonitorInfo = (VOID *) GetProcAddress(hdll, ptr); - if (!pPSetupDestroyMonitorInfo) return ptr; - - ptr = "PSetupEnumMonitor"; - pPSetupEnumMonitor = (VOID *) GetProcAddress(hdll, ptr); - if (!pPSetupEnumMonitor) return ptr; - - return NULL; -} - -/* ########################### */ - -static void test_PSetupCreateMonitorInfo(VOID) -{ - HANDLE mi; - BYTE buffer[1024] ; - - SetLastError(0xdeadbeef); - mi = pPSetupCreateMonitorInfo(NULL, NULL, NULL); - ok( mi != NULL, "got %p with %u (expected '!= NULL')\n", mi, GetLastError()); - if (mi) pPSetupDestroyMonitorInfo(mi); - - - memset(buffer, 0, sizeof(buffer)); - SetLastError(0xdeadbeef); - mi = pPSetupCreateMonitorInfo(buffer, NULL, NULL); - ok( mi != NULL, "got %p with %u (expected '!= NULL')\n", mi, GetLastError()); - if (mi) pPSetupDestroyMonitorInfo(mi); - -} - -/* ########################### */ - -static void test_PSetupDestroyMonitorInfo(VOID) -{ - HANDLE mi; - - - SetLastError(0xdeadbeef); - pPSetupDestroyMonitorInfo(NULL); - /* lasterror is returned */ - trace("returned with %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - mi = pPSetupCreateMonitorInfo(NULL, NULL, NULL); - ok( mi != NULL, "got %p with %u (expected '!= NULL')\n", mi, GetLastError()); - - if (!mi) return; - - SetLastError(0xdeadbeef); - pPSetupDestroyMonitorInfo(mi); - /* lasterror is returned */ - trace("returned with %u\n", GetLastError()); - - /* Try to destroy the handle twice crash with native ntprint.dll */ - if (0) { - SetLastError(0xdeadbeef); - pPSetupDestroyMonitorInfo(mi); - trace(" with %u\n", GetLastError()); - } - -} - -/* ########################### */ - -static void test_PSetupEnumMonitor(VOID) -{ - HANDLE mi; - WCHAR buffer[MAX_PATH+2]; - DWORD minsize = 0; - DWORD size; - DWORD res; - DWORD index=0; - - SetLastError(0xdeadbeef); - mi = pPSetupCreateMonitorInfo(NULL, NULL, NULL); - if (!mi) { - skip("PSetupCreateMonitorInfo\n"); - return; - } - - minsize = 0; - SetLastError(0xdeadbeef); - res = pPSetupEnumMonitor(mi, 0, NULL, &minsize); - ok( !res && (GetLastError() == ERROR_INSUFFICIENT_BUFFER) && (minsize > 0), - "got %u with %u and %u (expected '0' with ERROR_INSUFFICIENT_BUFFER " - "and '> 0')\n", res, GetLastError(), minsize); - - - size = sizeof(buffer) / sizeof(buffer[0]); - if ((minsize + 1) > size) { - skip("overflow: %u\n", minsize); - pPSetupDestroyMonitorInfo(mi); - return; - } - - if (0) { - /* XP: ERROR_INVALID_PARAMETER, w2k: Crash */ - SetLastError(0xdeadbeef); - size = sizeof(buffer) / sizeof(buffer[0]); - res = pPSetupEnumMonitor(NULL, 0, buffer, &size); - ok( !res && (GetLastError() == ERROR_INVALID_PARAMETER), - "got %u with %u (expected '0' with ERROR_INVALID_PARAMETER)\n", - res, GetLastError()); - } - - if (0) { - /* XP: Crash, w2k: Success (how can that work?) */ - SetLastError(0xdeadbeef); - size = sizeof(buffer) / sizeof(buffer[0]); - res = pPSetupEnumMonitor(mi, 0, NULL, &size); - trace("got %u with %u and %u\n", res, GetLastError(), size); - } - - if (0) { - /* XP: ERROR_INVALID_PARAMETER, w2k: Crash */ - SetLastError(0xdeadbeef); - res = pPSetupEnumMonitor(mi, 0, buffer, NULL); - ok( !res && (GetLastError() == ERROR_INVALID_PARAMETER), - "got %u with %u (expected '0' with ERROR_INVALID_PARAMETER)\n", - res, GetLastError()); - } - - SetLastError(0xdeadbeef); - size = minsize - 1; - res = pPSetupEnumMonitor(mi, 0, buffer, &size); - ok( !res && (GetLastError() == ERROR_INSUFFICIENT_BUFFER), - "got %u with %u and %u (expected '0' with ERROR_INSUFFICIENT_BUFFER)\n", - res, GetLastError(), size); - - - SetLastError(0xdeadbeef); - size = minsize; - res = pPSetupEnumMonitor(mi, 0, buffer, &size); - ok( res, "got %u with %u and %u (expected '!= 0')\n", - res, GetLastError(), size); - - SetLastError(0xdeadbeef); - size = minsize + 1; - res = pPSetupEnumMonitor(mi, 0, buffer, &size); - ok( res, "got %u with %u and %u (expected '!= 0')\n", - res, GetLastError(), size); - - /* try max. 20 monitors */ - while (res && (index < 20)) { - SetLastError(0xdeadbeef); - buffer[0] = '\0'; - size = sizeof(buffer) / sizeof(buffer[0]); - res = pPSetupEnumMonitor(mi, index, buffer, &size); - ok( res || (GetLastError() == ERROR_NO_MORE_ITEMS), - "(%u) got %u with %u and %u (expected '!=0' or: '0' with " - "ERROR_NO_MORE_ITEMS)\n", index, res, GetLastError(), size); - - if (res) index++; - } - pPSetupDestroyMonitorInfo(mi); - -} - -/* ########################### */ - -START_TEST(ntprint) -{ - LPCSTR ptr; - - /* ntprint.dll does not exist on win9x */ - ptr = load_functions(); - if (ptr) { - skip("%s not found\n", ptr); - return; - } - - test_PSetupCreateMonitorInfo(); - test_PSetupDestroyMonitorInfo(); - test_PSetupEnumMonitor(); - -} diff --git a/rostests/winetests/ntprint/ntprint.rbuild b/rostests/winetests/ntprint/ntprint.rbuild deleted file mode 100644 index a60b8e96540..00000000000 --- a/rostests/winetests/ntprint/ntprint.rbuild +++ /dev/null @@ -1,8 +0,0 @@ - - . - - ntprint.c - testlist.c - wine - ntdll - diff --git a/rostests/winetests/ntprint/testlist.c b/rostests/winetests/ntprint/testlist.c deleted file mode 100644 index 25fb277033c..00000000000 --- a/rostests/winetests/ntprint/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_ntprint(void); - -const struct test winetest_testlist[] = -{ - { "ntprint", func_ntprint }, - { 0, 0 } -}; diff --git a/rostests/winetests/odbccp32/CMakeLists.txt b/rostests/winetests/odbccp32/CMakeLists.txt deleted file mode 100644 index 00de7f0b603..00000000000 --- a/rostests/winetests/odbccp32/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(odbccp32_winetest misc.c testlist.c) -target_link_libraries(odbccp32_winetest wine) -set_module_type(odbccp32_winetest win32cui) -add_importlibs(odbccp32_winetest odbccp32 msvcrt kernel32 ntdll) -add_cd_file(TARGET odbccp32_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/odbccp32/misc.c b/rostests/winetests/odbccp32/misc.c deleted file mode 100644 index 044846cc7d4..00000000000 --- a/rostests/winetests/odbccp32/misc.c +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright 2007 Bill Medland - * - * 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 "windef.h" -#include "winbase.h" -#include "odbcinst.h" - -static void test_SQLConfigMode(void) -{ - BOOL bool_ret; - DWORD error_code; - RETCODE sql_ret; - UWORD config_mode; - int i; - - ok(SQLGetConfigMode(NULL), "SQLGetConfigMode(NULL) should succeed\n"); - - bool_ret = SQLGetConfigMode(&config_mode); - ok(bool_ret && config_mode == ODBC_BOTH_DSN, "Failed to get the initial SQLGetConfigMode or it was not both\n"); - - bool_ret = SQLSetConfigMode(3); - sql_ret = SQLInstallerErrorW(1, &error_code, NULL, 0, NULL); - ok(!bool_ret && sql_ret == SQL_SUCCESS_WITH_INFO && error_code == ODBC_ERROR_INVALID_PARAM_SEQUENCE, "SQLSetConfigMode with invalid argument did not fail correctly\n"); - - ok (ODBC_SYSTEM_DSN == 2 && ODBC_USER_DSN == 1 && ODBC_BOTH_DSN == 0, "SQLSetConfigMode modes not as expected\n"); - for (i = ODBC_SYSTEM_DSN; i >= ODBC_BOTH_DSN; --i) - { - ok(SQLSetConfigMode((UWORD)i), "SQLSetConfigMode Failed to set config mode\n"); - bool_ret = SQLGetConfigMode(&config_mode); - ok(bool_ret && config_mode == i, "Failed to confirm SQLSetConfigMode.\n"); - } - /* And that leaves it correctly on BOTH */ -} - -static void test_SQLInstallerError(void) -{ - RETCODE sql_ret; - - /* MSDN states that the error number should be between 1 and 8. Passing 0 is an error */ - sql_ret = SQLInstallerError(0, NULL, NULL, 0, NULL); - ok(sql_ret == SQL_ERROR, "SQLInstallerError(0...) failed with %d instead of SQL_ERROR\n", sql_ret); - /* However numbers greater than 8 do not return SQL_ERROR. - * I am currently unsure as to whether it should return SQL_NO_DATA or "the same as for error 8"; - * I have never been able to generate 8 errors to test it - */ - sql_ret = SQLInstallerError(65535, NULL, NULL, 0, NULL); - ok(sql_ret == SQL_NO_DATA, "SQLInstallerError(>8...) failed with %d instead of SQL_NO_DATA\n", sql_ret); - - /* Force an error to work with. This should generate ODBC_ERROR_INVALID_BUFF_LEN */ - ok(!SQLGetInstalledDrivers(0, 0, 0), "Failed to force an error for testing\n"); - sql_ret = SQLInstallerError(2, NULL, NULL, 0, NULL); - ok(sql_ret == SQL_NO_DATA, "Too many errors when forcing an error for testing\n"); - - /* Null pointers are acceptable in all obvious places */ - sql_ret = SQLInstallerError(1, NULL, NULL, 0, NULL); - ok(sql_ret == SQL_SUCCESS_WITH_INFO, "SQLInstallerError(null addresses) failed with %d instead of SQL_SUCCESS_WITH_INFO\n", sql_ret); -} - -static void test_SQLInstallDriverManager(void) -{ - BOOL bool_ret; - RETCODE sql_ret; - DWORD error_code; - CHAR target_path[MAX_PATH]; - WORD path_out; - - /* NULL check */ - bool_ret = SQLInstallDriverManager(NULL, 0, NULL); - sql_ret = SQLInstallerErrorW(1, &error_code, NULL, 0, NULL); - ok(!bool_ret, "SQLInstallDriverManager unexpectedly succeeded\n"); - todo_wine - ok(sql_ret == SQL_SUCCESS_WITH_INFO && error_code == ODBC_ERROR_INVALID_BUFF_LEN, - "Expected SQLInstallDriverManager to fail with ODBC_ERROR_INVALID_BUFF_LEN\n"); - - /* Length smaller than MAX_PATH */ - bool_ret = SQLInstallDriverManager(target_path, MAX_PATH / 2, NULL); - sql_ret = SQLInstallerErrorW(1, &error_code, NULL, 0, NULL); - todo_wine { - ok(!bool_ret, "SQLInstallDriverManager unexpectedly succeeded\n"); - ok(sql_ret == SQL_SUCCESS_WITH_INFO && error_code == ODBC_ERROR_INVALID_BUFF_LEN, - "Expected SQLInstallDriverManager to fail with ODBC_ERROR_INVALID_BUFF_LEN\n"); - } - - path_out = 0xcafe; - bool_ret = SQLInstallDriverManager(target_path, MAX_PATH / 2, &path_out); - sql_ret = SQLInstallerErrorW(1, &error_code, NULL, 0, NULL); - todo_wine { - ok(!bool_ret, "SQLInstallDriverManager unexpectedly succeeded\n"); - ok(sql_ret == SQL_SUCCESS_WITH_INFO && error_code == ODBC_ERROR_INVALID_BUFF_LEN, - "Expected SQLInstallDriverManager to fail with ODBC_ERROR_INVALID_BUFF_LEN\n"); - ok(path_out == 0xcafe, "Expected path_out to not have changed\n"); - } - - /* Length OK */ - bool_ret = SQLInstallDriverManager(target_path, MAX_PATH, NULL); - sql_ret = SQLInstallerErrorW(1, &error_code, NULL, 0, NULL); - ok(bool_ret, "SQLInstallDriverManager unexpectedly failed: %d\n", - error_code); - if (bool_ret) - ok(sql_ret == SQL_NO_DATA, "Expected SQL_NO_DATA, got %d\n", sql_ret); - else - ok(sql_ret == SQL_SUCCESS_WITH_INFO, - "Expected SQL_SUCCESS_WITH_INFO, got %d\n", sql_ret); - - path_out = 0xcafe; - bool_ret = SQLInstallDriverManager(target_path, MAX_PATH, &path_out); - sql_ret = SQLInstallerErrorW(1, &error_code, NULL, 0, NULL); - ok(bool_ret, "SQLInstallDriverManager unexpectedly failed: %d\n", - error_code); - if (bool_ret) - ok(sql_ret == SQL_NO_DATA, "Expected SQL_NO_DATA, got %d\n", sql_ret); - else - ok(sql_ret == SQL_SUCCESS_WITH_INFO, - "Expected SQL_SUCCESS_WITH_INFO, got %d\n", sql_ret); - /* path_out should in practice be less than 0xcafe */ - ok(path_out != 0xcafe, "Expected path_out to show the correct amount of bytes\n"); -} - -START_TEST(misc) -{ - test_SQLConfigMode(); - test_SQLInstallerError(); - test_SQLInstallDriverManager(); -} diff --git a/rostests/winetests/odbccp32/odbccp32.rbuild b/rostests/winetests/odbccp32/odbccp32.rbuild deleted file mode 100644 index 8da1e1f38b4..00000000000 --- a/rostests/winetests/odbccp32/odbccp32.rbuild +++ /dev/null @@ -1,13 +0,0 @@ - - - - - . - - misc.c - testlist.c - wine - odbccp32 - ntdll - - diff --git a/rostests/winetests/odbccp32/testlist.c b/rostests/winetests/odbccp32/testlist.c deleted file mode 100644 index a92d75f6c40..00000000000 --- a/rostests/winetests/odbccp32/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_misc(void); - -const struct test winetest_testlist[] = -{ - { "misc", func_misc }, - { 0, 0 } -}; diff --git a/rostests/winetests/ole32/CMakeLists.txt b/rostests/winetests/ole32/CMakeLists.txt deleted file mode 100644 index 11891f4db34..00000000000 --- a/rostests/winetests/ole32/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - clipboard.c - compobj.c - defaulthandler.c - dragdrop.c - errorinfo.c - hglobalstream.c - marshal.c - moniker.c - ole2.c - propvariant.c - stg_prop.c - storage32.c - usrmarshal.c - testlist.c) - -add_executable(ole32_winetest ${SOURCE}) -target_link_libraries(ole32_winetest wine uuid) -set_module_type(ole32_winetest win32cui) -add_importlibs(ole32_winetest oleaut32 ole32 user32 gdi32 advapi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET ole32_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/ole32/clipboard.c b/rostests/winetests/ole32/clipboard.c deleted file mode 100644 index 626d244c073..00000000000 --- a/rostests/winetests/ole32/clipboard.c +++ /dev/null @@ -1,1533 +0,0 @@ -/* - * Clipboard unit tests - * - * Copyright 2006 Kevin Koltzau - * - * 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 NONAMELESSUNION - -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "objbase.h" - -#include "wine/test.h" - -#define InitFormatEtc(fe, cf, med) \ - {\ - (fe).cfFormat=cf;\ - (fe).dwAspect=DVASPECT_CONTENT;\ - (fe).ptd=NULL;\ - (fe).tymed=med;\ - (fe).lindex=-1;\ - }; - -static inline char *dump_fmtetc(FORMATETC *fmt) -{ - static char buf[100]; - - snprintf(buf, sizeof(buf), "cf %04x ptd %p aspect %x lindex %d tymed %x", - fmt->cfFormat, fmt->ptd, fmt->dwAspect, fmt->lindex, fmt->tymed); - return buf; -} - -typedef struct DataObjectImpl { - const IDataObjectVtbl *lpVtbl; - LONG ref; - - FORMATETC *fmtetc; - UINT fmtetc_cnt; - - HANDLE text; - IStream *stm; - IStorage *stg; -} DataObjectImpl; - -typedef struct EnumFormatImpl { - const IEnumFORMATETCVtbl *lpVtbl; - LONG ref; - - FORMATETC *fmtetc; - UINT fmtetc_cnt; - - UINT cur; -} EnumFormatImpl; - -static BOOL expect_DataObjectImpl_QueryGetData = TRUE; -static ULONG DataObjectImpl_GetData_calls = 0; -static ULONG DataObjectImpl_GetDataHere_calls = 0; -static ULONG DataObjectImpl_EnumFormatEtc_calls = 0; - -static UINT cf_stream, cf_storage, cf_global, cf_another, cf_onemore; - -static HRESULT EnumFormatImpl_Create(FORMATETC *fmtetc, UINT size, LPENUMFORMATETC *lplpformatetc); - -static HRESULT WINAPI EnumFormatImpl_QueryInterface(IEnumFORMATETC *iface, REFIID riid, LPVOID *ppvObj) -{ - EnumFormatImpl *This = (EnumFormatImpl*)iface; - - if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IEnumFORMATETC)) { - IEnumFORMATETC_AddRef(iface); - *ppvObj = This; - return S_OK; - } - *ppvObj = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI EnumFormatImpl_AddRef(IEnumFORMATETC *iface) -{ - EnumFormatImpl *This = (EnumFormatImpl*)iface; - LONG ref = InterlockedIncrement(&This->ref); - return ref; -} - -static ULONG WINAPI EnumFormatImpl_Release(IEnumFORMATETC *iface) -{ - EnumFormatImpl *This = (EnumFormatImpl*)iface; - ULONG ref = InterlockedDecrement(&This->ref); - - if(!ref) { - HeapFree(GetProcessHeap(), 0, This->fmtetc); - HeapFree(GetProcessHeap(), 0, This); - } - - return ref; -} - -static HRESULT WINAPI EnumFormatImpl_Next(IEnumFORMATETC *iface, ULONG celt, - FORMATETC *rgelt, ULONG *pceltFetched) -{ - EnumFormatImpl *This = (EnumFormatImpl*)iface; - ULONG count, i; - - trace("next: count %d cur %d\n", celt, This->cur); - - if(!rgelt) - return E_INVALIDARG; - - count = min(celt, This->fmtetc_cnt - This->cur); - for(i = 0; i < count; i++, This->cur++, rgelt++) - { - *rgelt = This->fmtetc[This->cur]; - if(rgelt->ptd) - { - DWORD size = This->fmtetc[This->cur].ptd->tdSize; - rgelt->ptd = CoTaskMemAlloc(size); - memcpy(rgelt->ptd, This->fmtetc[This->cur].ptd, size); - } - } - if(pceltFetched) - *pceltFetched = count; - return count == celt ? S_OK : S_FALSE; -} - -static HRESULT WINAPI EnumFormatImpl_Skip(IEnumFORMATETC *iface, ULONG celt) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI EnumFormatImpl_Reset(IEnumFORMATETC *iface) -{ - EnumFormatImpl *This = (EnumFormatImpl*)iface; - - This->cur = 0; - return S_OK; -} - -static HRESULT WINAPI EnumFormatImpl_Clone(IEnumFORMATETC *iface, IEnumFORMATETC **ppenum) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static const IEnumFORMATETCVtbl VT_EnumFormatImpl = { - EnumFormatImpl_QueryInterface, - EnumFormatImpl_AddRef, - EnumFormatImpl_Release, - EnumFormatImpl_Next, - EnumFormatImpl_Skip, - EnumFormatImpl_Reset, - EnumFormatImpl_Clone -}; - -static HRESULT EnumFormatImpl_Create(FORMATETC *fmtetc, UINT fmtetc_cnt, IEnumFORMATETC **lplpformatetc) -{ - EnumFormatImpl *ret; - - ret = HeapAlloc(GetProcessHeap(), 0, sizeof(EnumFormatImpl)); - ret->lpVtbl = &VT_EnumFormatImpl; - ret->ref = 1; - ret->cur = 0; - ret->fmtetc_cnt = fmtetc_cnt; - ret->fmtetc = HeapAlloc(GetProcessHeap(), 0, fmtetc_cnt*sizeof(FORMATETC)); - memcpy(ret->fmtetc, fmtetc, fmtetc_cnt*sizeof(FORMATETC)); - *lplpformatetc = (LPENUMFORMATETC)ret; - return S_OK; -} - -static HRESULT WINAPI DataObjectImpl_QueryInterface(IDataObject *iface, REFIID riid, LPVOID *ppvObj) -{ - DataObjectImpl *This = (DataObjectImpl*)iface; - - if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDataObject)) { - IDataObject_AddRef(iface); - *ppvObj = This; - return S_OK; - } - *ppvObj = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI DataObjectImpl_AddRef(IDataObject* iface) -{ - DataObjectImpl *This = (DataObjectImpl*)iface; - ULONG ref = InterlockedIncrement(&This->ref); - return ref; -} - -static ULONG WINAPI DataObjectImpl_Release(IDataObject* iface) -{ - DataObjectImpl *This = (DataObjectImpl*)iface; - ULONG ref = InterlockedDecrement(&This->ref); - - if(!ref) - { - int i; - if(This->text) GlobalFree(This->text); - for(i = 0; i < This->fmtetc_cnt; i++) - HeapFree(GetProcessHeap(), 0, This->fmtetc[i].ptd); - HeapFree(GetProcessHeap(), 0, This->fmtetc); - if(This->stm) IStream_Release(This->stm); - if(This->stg) IStorage_Release(This->stg); - HeapFree(GetProcessHeap(), 0, This); - } - - return ref; -} - -static HRESULT WINAPI DataObjectImpl_GetData(IDataObject* iface, FORMATETC *pformatetc, STGMEDIUM *pmedium) -{ - DataObjectImpl *This = (DataObjectImpl*)iface; - UINT i; - BOOL foundFormat = FALSE; - - trace("getdata: %s\n", dump_fmtetc(pformatetc)); - - DataObjectImpl_GetData_calls++; - - if(pformatetc->lindex != -1) - return DV_E_FORMATETC; - - for(i = 0; i < This->fmtetc_cnt; i++) - { - if(This->fmtetc[i].cfFormat == pformatetc->cfFormat) - { - foundFormat = TRUE; - if(This->fmtetc[i].tymed & pformatetc->tymed) - { - pmedium->pUnkForRelease = (LPUNKNOWN)iface; - IUnknown_AddRef(pmedium->pUnkForRelease); - - if(pformatetc->cfFormat == CF_TEXT || pformatetc->cfFormat == cf_global) - { - pmedium->tymed = TYMED_HGLOBAL; - U(*pmedium).hGlobal = This->text; - } - else if(pformatetc->cfFormat == cf_stream) - { - pmedium->tymed = TYMED_ISTREAM; - IStream_AddRef(This->stm); - U(*pmedium).pstm = This->stm; - } - else if(pformatetc->cfFormat == cf_storage || pformatetc->cfFormat == cf_another) - { - pmedium->tymed = TYMED_ISTORAGE; - IStorage_AddRef(This->stg); - U(*pmedium).pstg = This->stg; - } - return S_OK; - } - } - } - - return foundFormat ? DV_E_TYMED : DV_E_FORMATETC; -} - -static HRESULT WINAPI DataObjectImpl_GetDataHere(IDataObject* iface, FORMATETC *pformatetc, STGMEDIUM *pmedium) -{ - trace("getdatahere: %s\n", dump_fmtetc(pformatetc)); - DataObjectImpl_GetDataHere_calls++; - - return E_NOTIMPL; -} - -static HRESULT WINAPI DataObjectImpl_QueryGetData(IDataObject* iface, FORMATETC *pformatetc) -{ - DataObjectImpl *This = (DataObjectImpl*)iface; - UINT i; - BOOL foundFormat = FALSE; - - trace("querygetdata: %s\n", dump_fmtetc(pformatetc)); - if (!expect_DataObjectImpl_QueryGetData) - ok(0, "unexpected call to DataObjectImpl_QueryGetData\n"); - - if(pformatetc->lindex != -1) - return DV_E_LINDEX; - - for(i=0; ifmtetc_cnt; i++) { - if(This->fmtetc[i].cfFormat == pformatetc->cfFormat) { - foundFormat = TRUE; - if(This->fmtetc[i].tymed == pformatetc->tymed) - return S_OK; - } - } - return foundFormat?DV_E_FORMATETC:DV_E_TYMED; -} - -static HRESULT WINAPI DataObjectImpl_GetCanonicalFormatEtc(IDataObject* iface, FORMATETC *pformatectIn, - FORMATETC *pformatetcOut) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DataObjectImpl_SetData(IDataObject* iface, FORMATETC *pformatetc, - STGMEDIUM *pmedium, BOOL fRelease) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DataObjectImpl_EnumFormatEtc(IDataObject* iface, DWORD dwDirection, - IEnumFORMATETC **ppenumFormatEtc) -{ - DataObjectImpl *This = (DataObjectImpl*)iface; - - DataObjectImpl_EnumFormatEtc_calls++; - - if(dwDirection != DATADIR_GET) { - ok(0, "unexpected direction %d\n", dwDirection); - return E_NOTIMPL; - } - return EnumFormatImpl_Create(This->fmtetc, This->fmtetc_cnt, ppenumFormatEtc); -} - -static HRESULT WINAPI DataObjectImpl_DAdvise(IDataObject* iface, FORMATETC *pformatetc, DWORD advf, - IAdviseSink *pAdvSink, DWORD *pdwConnection) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DataObjectImpl_DUnadvise(IDataObject* iface, DWORD dwConnection) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DataObjectImpl_EnumDAdvise(IDataObject* iface, IEnumSTATDATA **ppenumAdvise) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static const IDataObjectVtbl VT_DataObjectImpl = -{ - DataObjectImpl_QueryInterface, - DataObjectImpl_AddRef, - DataObjectImpl_Release, - DataObjectImpl_GetData, - DataObjectImpl_GetDataHere, - DataObjectImpl_QueryGetData, - DataObjectImpl_GetCanonicalFormatEtc, - DataObjectImpl_SetData, - DataObjectImpl_EnumFormatEtc, - DataObjectImpl_DAdvise, - DataObjectImpl_DUnadvise, - DataObjectImpl_EnumDAdvise -}; - -static HRESULT DataObjectImpl_CreateText(LPCSTR text, LPDATAOBJECT *lplpdataobj) -{ - DataObjectImpl *obj; - - obj = HeapAlloc(GetProcessHeap(), 0, sizeof(DataObjectImpl)); - obj->lpVtbl = &VT_DataObjectImpl; - obj->ref = 1; - obj->text = GlobalAlloc(GMEM_MOVEABLE, strlen(text) + 1); - strcpy(GlobalLock(obj->text), text); - GlobalUnlock(obj->text); - obj->stm = NULL; - obj->stg = NULL; - - obj->fmtetc_cnt = 1; - obj->fmtetc = HeapAlloc(GetProcessHeap(), 0, obj->fmtetc_cnt*sizeof(FORMATETC)); - InitFormatEtc(obj->fmtetc[0], CF_TEXT, TYMED_HGLOBAL); - - *lplpdataobj = (LPDATAOBJECT)obj; - return S_OK; -} - -const char *cmpl_stm_data = "complex stream"; -const char *cmpl_text_data = "complex text"; -const WCHAR device_name[] = {'m','y','d','e','v',0}; - -static HRESULT DataObjectImpl_CreateComplex(LPDATAOBJECT *lplpdataobj) -{ - DataObjectImpl *obj; - ILockBytes *lbs; - DEVMODEW dm; - - obj = HeapAlloc(GetProcessHeap(), 0, sizeof(DataObjectImpl)); - obj->lpVtbl = &VT_DataObjectImpl; - obj->ref = 1; - obj->text = GlobalAlloc(GMEM_MOVEABLE, strlen(cmpl_text_data) + 1); - strcpy(GlobalLock(obj->text), cmpl_text_data); - GlobalUnlock(obj->text); - CreateStreamOnHGlobal(NULL, TRUE, &obj->stm); - IStream_Write(obj->stm, cmpl_stm_data, strlen(cmpl_stm_data), NULL); - - CreateILockBytesOnHGlobal(NULL, TRUE, &lbs); - StgCreateDocfileOnILockBytes(lbs, STGM_CREATE|STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &obj->stg); - ILockBytes_Release(lbs); - - obj->fmtetc_cnt = 8; - /* zeroing here since FORMATETC has a hole in it, and it's confusing to have this uninitialised. */ - obj->fmtetc = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, obj->fmtetc_cnt*sizeof(FORMATETC)); - InitFormatEtc(obj->fmtetc[0], CF_TEXT, TYMED_HGLOBAL); - InitFormatEtc(obj->fmtetc[1], cf_stream, TYMED_ISTREAM); - InitFormatEtc(obj->fmtetc[2], cf_storage, TYMED_ISTORAGE); - InitFormatEtc(obj->fmtetc[3], cf_another, TYMED_ISTORAGE|TYMED_ISTREAM|TYMED_HGLOBAL); - memset(&dm, 0, sizeof(dm)); - dm.dmSize = sizeof(dm); - dm.dmDriverExtra = 0; - lstrcpyW(dm.dmDeviceName, device_name); - obj->fmtetc[3].ptd = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(DVTARGETDEVICE, tdData) + sizeof(device_name) + dm.dmSize + dm.dmDriverExtra); - obj->fmtetc[3].ptd->tdSize = FIELD_OFFSET(DVTARGETDEVICE, tdData) + sizeof(device_name) + dm.dmSize + dm.dmDriverExtra; - obj->fmtetc[3].ptd->tdDriverNameOffset = FIELD_OFFSET(DVTARGETDEVICE, tdData); - obj->fmtetc[3].ptd->tdDeviceNameOffset = 0; - obj->fmtetc[3].ptd->tdPortNameOffset = 0; - obj->fmtetc[3].ptd->tdExtDevmodeOffset = obj->fmtetc[3].ptd->tdDriverNameOffset + sizeof(device_name); - lstrcpyW((WCHAR*)obj->fmtetc[3].ptd->tdData, device_name); - memcpy(obj->fmtetc[3].ptd->tdData + sizeof(device_name), &dm, dm.dmSize + dm.dmDriverExtra); - - InitFormatEtc(obj->fmtetc[4], cf_global, TYMED_HGLOBAL); - InitFormatEtc(obj->fmtetc[5], cf_another, TYMED_HGLOBAL); - InitFormatEtc(obj->fmtetc[6], cf_another, 0xfffff); - InitFormatEtc(obj->fmtetc[7], cf_another, 0xfffff); - obj->fmtetc[7].dwAspect = DVASPECT_ICON; - - *lplpdataobj = (LPDATAOBJECT)obj; - return S_OK; -} - -static void test_get_clipboard(void) -{ - HRESULT hr; - IDataObject *data_obj; - FORMATETC fmtetc; - STGMEDIUM stgmedium; - - hr = OleGetClipboard(NULL); - ok(hr == E_INVALIDARG, "OleGetClipboard(NULL) should return E_INVALIDARG instead of 0x%08x\n", hr); - - hr = OleGetClipboard(&data_obj); - ok(hr == S_OK, "OleGetClipboard failed with error 0x%08x\n", hr); - - /* test IDataObject_QueryGetData */ - - /* clipboard's IDataObject_QueryGetData shouldn't defer to our IDataObject_QueryGetData */ - expect_DataObjectImpl_QueryGetData = FALSE; - - InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); - hr = IDataObject_QueryGetData(data_obj, &fmtetc); - ok(hr == S_OK, "IDataObject_QueryGetData failed with error 0x%08x\n", hr); - - InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); - fmtetc.dwAspect = 0xdeadbeef; - hr = IDataObject_QueryGetData(data_obj, &fmtetc); - ok(hr == DV_E_FORMATETC, "IDataObject_QueryGetData should have failed with DV_E_FORMATETC instead of 0x%08x\n", hr); - - InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); - fmtetc.dwAspect = DVASPECT_THUMBNAIL; - hr = IDataObject_QueryGetData(data_obj, &fmtetc); - ok(hr == DV_E_FORMATETC, "IDataObject_QueryGetData should have failed with DV_E_FORMATETC instead of 0x%08x\n", hr); - - InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); - fmtetc.lindex = 256; - hr = IDataObject_QueryGetData(data_obj, &fmtetc); - ok(hr == DV_E_FORMATETC || broken(hr == S_OK), - "IDataObject_QueryGetData should have failed with DV_E_FORMATETC instead of 0x%08x\n", hr); - - InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); - fmtetc.cfFormat = CF_RIFF; - hr = IDataObject_QueryGetData(data_obj, &fmtetc); - ok(hr == DV_E_CLIPFORMAT, "IDataObject_QueryGetData should have failed with DV_E_CLIPFORMAT instead of 0x%08x\n", hr); - - InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); - fmtetc.tymed = TYMED_FILE; - hr = IDataObject_QueryGetData(data_obj, &fmtetc); - ok(hr == S_OK, "IDataObject_QueryGetData failed with error 0x%08x\n", hr); - - expect_DataObjectImpl_QueryGetData = TRUE; - - /* test IDataObject_GetData */ - - DataObjectImpl_GetData_calls = 0; - - InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); - hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium); - ok(hr == S_OK, "IDataObject_GetData failed with error 0x%08x\n", hr); - if(SUCCEEDED(hr)) ReleaseStgMedium(&stgmedium); - - InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); - fmtetc.dwAspect = 0xdeadbeef; - hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium); - ok(hr == S_OK, "IDataObject_GetData failed with error 0x%08x\n", hr); - if(SUCCEEDED(hr)) ReleaseStgMedium(&stgmedium); - - InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); - fmtetc.dwAspect = DVASPECT_THUMBNAIL; - hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium); - ok(hr == S_OK, "IDataObject_GetData failed with error 0x%08x\n", hr); - if(SUCCEEDED(hr)) ReleaseStgMedium(&stgmedium); - - InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); - fmtetc.lindex = 256; - hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium); - ok(hr == DV_E_FORMATETC || broken(hr == S_OK), "IDataObject_GetData should have failed with DV_E_FORMATETC instead of 0x%08x\n", hr); - if (hr == S_OK) - { - /* undo the unexpected success */ - DataObjectImpl_GetData_calls--; - ReleaseStgMedium(&stgmedium); - } - - InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); - fmtetc.cfFormat = CF_RIFF; - hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium); - ok(hr == DV_E_FORMATETC, "IDataObject_GetData should have failed with DV_E_FORMATETC instead of 0x%08x\n", hr); - if(SUCCEEDED(hr)) ReleaseStgMedium(&stgmedium); - - InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); - fmtetc.tymed = TYMED_FILE; - hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium); - ok(hr == DV_E_TYMED, "IDataObject_GetData should have failed with DV_E_TYMED instead of 0x%08x\n", hr); - if(SUCCEEDED(hr)) ReleaseStgMedium(&stgmedium); - - ok(DataObjectImpl_GetData_calls == 6, "DataObjectImpl_GetData should have been called 6 times instead of %d times\n", DataObjectImpl_GetData_calls); - - IDataObject_Release(data_obj); -} - -static void test_enum_fmtetc(IDataObject *src) -{ - HRESULT hr; - IDataObject *data; - IEnumFORMATETC *enum_fmt, *src_enum; - FORMATETC fmt, src_fmt; - DWORD count = 0; - - hr = OleGetClipboard(&data); - ok(hr == S_OK, "OleGetClipboard failed with error 0x%08x\n", hr); - - hr = IDataObject_EnumFormatEtc(data, DATADIR_SET, &enum_fmt); - ok(hr == E_NOTIMPL || - broken(hr == E_INVALIDARG), /* win98 (not win98SE) */ - "got %08x\n", hr); - - DataObjectImpl_EnumFormatEtc_calls = 0; - hr = IDataObject_EnumFormatEtc(data, DATADIR_GET, &enum_fmt); - ok(hr == S_OK, "got %08x\n", hr); - ok(DataObjectImpl_EnumFormatEtc_calls == 0, "EnumFormatEtc was called\n"); - - if(src) IDataObject_EnumFormatEtc(src, DATADIR_GET, &src_enum); - - while((hr = IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL)) == S_OK) - { - ok(src != NULL, "shouldn't be here\n"); - hr = IEnumFORMATETC_Next(src_enum, 1, &src_fmt, NULL); - ok(hr == S_OK, "%d: got %08x\n", count, hr); - trace("%d: %s\n", count, dump_fmtetc(&fmt)); - ok(fmt.cfFormat == src_fmt.cfFormat, "%d: %04x %04x\n", count, fmt.cfFormat, src_fmt.cfFormat); - ok(fmt.dwAspect == src_fmt.dwAspect, "%d: %08x %08x\n", count, fmt.dwAspect, src_fmt.dwAspect); - ok(fmt.lindex == src_fmt.lindex, "%d: %08x %08x\n", count, fmt.lindex, src_fmt.lindex); - ok(fmt.tymed == src_fmt.tymed, "%d: %08x %08x\n", count, fmt.tymed, src_fmt.tymed); - if(fmt.ptd) - { - ok(src_fmt.ptd != NULL, "%d: expected non-NULL\n", count); - CoTaskMemFree(fmt.ptd); - CoTaskMemFree(src_fmt.ptd); - } - count++; - } - - ok(hr == S_FALSE, "%d: got %08x\n", count, hr); - - if(src) - { - hr = IEnumFORMATETC_Next(src_enum, 1, &src_fmt, NULL); - ok(hr == S_FALSE || - broken(hr == S_OK && count == 5), /* win9x and winme don't enumerate duplicated cf's */ - "%d: got %08x\n", count, hr); - IEnumFORMATETC_Release(src_enum); - } - - hr = IEnumFORMATETC_Reset(enum_fmt); - ok(hr == S_OK, "got %08x\n", hr); - - if(src) /* Exercise the enumerator a bit */ - { - IEnumFORMATETC *clone; - FORMATETC third_fmt; - - hr = IEnumFORMATETC_Next(enum_fmt, 1, &third_fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); - hr = IEnumFORMATETC_Next(enum_fmt, 1, &third_fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); - hr = IEnumFORMATETC_Next(enum_fmt, 1, &third_fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); - - hr = IEnumFORMATETC_Reset(enum_fmt); - ok(hr == S_OK, "got %08x\n", hr); - hr = IEnumFORMATETC_Skip(enum_fmt, 2); - ok(hr == S_OK, "got %08x\n", hr); - - hr = IEnumFORMATETC_Clone(enum_fmt, &clone); - ok(hr == S_OK, "got %08x\n", hr); - hr = IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); - ok(fmt.cfFormat == third_fmt.cfFormat, "formats don't match\n"); - hr = IEnumFORMATETC_Next(clone, 1, &fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); - ok(fmt.cfFormat == third_fmt.cfFormat, "formats don't match\n"); - IEnumFORMATETC_Release(clone); - } - - IEnumFORMATETC_Release(enum_fmt); - IDataObject_Release(data); -} - -static void test_no_cf_dataobject(void) -{ - UINT cf_dataobject = RegisterClipboardFormatA("DataObject"); - UINT cf_ole_priv_data = RegisterClipboardFormatA("Ole Private Data"); - HANDLE h; - OpenClipboard(NULL); - - h = GetClipboardData(cf_dataobject); - ok(!h, "got %p\n", h); - h = GetClipboardData(cf_ole_priv_data); - ok(!h, "got %p\n", h); - - CloseClipboard(); -} - -static void test_cf_dataobject(IDataObject *data) -{ - UINT cf = 0; - UINT cf_dataobject = RegisterClipboardFormatA("DataObject"); - UINT cf_ole_priv_data = RegisterClipboardFormatA("Ole Private Data"); - BOOL found_dataobject = FALSE, found_priv_data = FALSE; - - OpenClipboard(NULL); - do - { - cf = EnumClipboardFormats(cf); - if(cf == cf_dataobject) - { - HGLOBAL h = GetClipboardData(cf); - HWND *ptr = GlobalLock(h); - DWORD size = GlobalSize(h); - HWND clip_owner = GetClipboardOwner(); - - found_dataobject = TRUE; - ok(size >= sizeof(*ptr), "size %d\n", size); - if(data) - ok(*ptr == clip_owner, "hwnd %p clip_owner %p\n", *ptr, clip_owner); - else /* ole clipboard flushed */ - ok(*ptr == NULL, "hwnd %p\n", *ptr); - GlobalUnlock(h); - } - else if(cf == cf_ole_priv_data) - { - found_priv_data = TRUE; - if(data) - { - HGLOBAL h = GetClipboardData(cf); - DWORD *ptr = GlobalLock(h); - DWORD size = GlobalSize(h); - - if(size != ptr[1]) - win_skip("Ole Private Data in win9x format\n"); - else - { - HRESULT hr; - IEnumFORMATETC *enum_fmt; - DWORD count = 0; - FORMATETC fmt; - struct formatetcetc - { - FORMATETC fmt; - BOOL first_use_of_cf; - DWORD res[2]; - } *fmt_ptr; - struct priv_data - { - DWORD res1; - DWORD size; - DWORD res2; - DWORD count; - DWORD res3[2]; - struct formatetcetc fmts[1]; - } *priv = (struct priv_data*)ptr; - CLIPFORMAT cfs_seen[10]; - - hr = IDataObject_EnumFormatEtc(data, DATADIR_GET, &enum_fmt); - ok(hr == S_OK, "got %08x\n", hr); - fmt_ptr = priv->fmts; - - while(IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL) == S_OK) - { - int i; - BOOL seen_cf = FALSE; - - ok(fmt_ptr->fmt.cfFormat == fmt.cfFormat, - "got %08x expected %08x\n", fmt_ptr->fmt.cfFormat, fmt.cfFormat); - ok(fmt_ptr->fmt.dwAspect == fmt.dwAspect, "got %08x expected %08x\n", - fmt_ptr->fmt.dwAspect, fmt.dwAspect); - ok(fmt_ptr->fmt.lindex == fmt.lindex, "got %08x expected %08x\n", - fmt_ptr->fmt.lindex, fmt.lindex); - ok(fmt_ptr->fmt.tymed == fmt.tymed, "got %08x expected %08x\n", - fmt_ptr->fmt.tymed, fmt.tymed); - for(i = 0; i < count; i++) - if(fmt_ptr->fmt.cfFormat == cfs_seen[i]) - { - seen_cf = TRUE; - break; - } - cfs_seen[count] = fmt.cfFormat; - ok(fmt_ptr->first_use_of_cf == seen_cf ? FALSE : TRUE, "got %08x expected %08x\n", - fmt_ptr->first_use_of_cf, !seen_cf); - ok(fmt_ptr->res[0] == 0, "got %08x\n", fmt_ptr->res[1]); - ok(fmt_ptr->res[1] == 0, "got %08x\n", fmt_ptr->res[2]); - if(fmt.ptd) - { - DVTARGETDEVICE *target; - - ok(fmt_ptr->fmt.ptd != NULL, "target device offset zero\n"); - target = (DVTARGETDEVICE*)((char*)priv + (DWORD_PTR)fmt_ptr->fmt.ptd); - ok(!memcmp(target, fmt.ptd, fmt.ptd->tdSize), "target devices differ\n"); - CoTaskMemFree(fmt.ptd); - } - fmt_ptr++; - count++; - } - ok(priv->res1 == 0, "got %08x\n", priv->res1); - ok(priv->res2 == 1, "got %08x\n", priv->res2); - ok(priv->count == count, "got %08x expected %08x\n", priv->count, count); - ok(priv->res3[0] == 0, "got %08x\n", priv->res3[0]); - - /* win64 sets the lsb */ - if(sizeof(fmt_ptr->fmt.ptd) == 8) - todo_wine ok(priv->res3[1] == 1, "got %08x\n", priv->res3[1]); - else - ok(priv->res3[1] == 0, "got %08x\n", priv->res3[1]); - - GlobalUnlock(h); - IEnumFORMATETC_Release(enum_fmt); - } - } - } - else if(cf == cf_stream) - { - HGLOBAL h; - void *ptr; - DWORD size; - - DataObjectImpl_GetDataHere_calls = 0; - h = GetClipboardData(cf); - ok(DataObjectImpl_GetDataHere_calls == 1, "got %d\n", DataObjectImpl_GetDataHere_calls); - ptr = GlobalLock(h); - size = GlobalSize(h); - ok(size == strlen(cmpl_stm_data) || - broken(size > strlen(cmpl_stm_data)), /* win9x, winme */ - "expected %d got %d\n", lstrlenA(cmpl_stm_data), size); - ok(!memcmp(ptr, cmpl_stm_data, strlen(cmpl_stm_data)), "mismatch\n"); - GlobalUnlock(h); - } - else if(cf == cf_global) - { - HGLOBAL h; - void *ptr; - DWORD size; - - DataObjectImpl_GetDataHere_calls = 0; - h = GetClipboardData(cf); - ok(DataObjectImpl_GetDataHere_calls == 0, "got %d\n", DataObjectImpl_GetDataHere_calls); - ptr = GlobalLock(h); - size = GlobalSize(h); - ok(size == strlen(cmpl_text_data) + 1 || - broken(size > strlen(cmpl_text_data) + 1), /* win9x, winme */ - "expected %d got %d\n", lstrlenA(cmpl_text_data) + 1, size); - ok(!memcmp(ptr, cmpl_text_data, strlen(cmpl_text_data) + 1), "mismatch\n"); - GlobalUnlock(h); - } - } while(cf); - CloseClipboard(); - ok(found_dataobject, "didn't find cf_dataobject\n"); - ok(found_priv_data, "didn't find cf_ole_priv_data\n"); -} - -static void test_set_clipboard(void) -{ - HRESULT hr; - ULONG ref; - LPDATAOBJECT data1, data2, data_cmpl; - HGLOBAL hblob, h; - - cf_stream = RegisterClipboardFormatA("stream format"); - cf_storage = RegisterClipboardFormatA("storage format"); - cf_global = RegisterClipboardFormatA("global format"); - cf_another = RegisterClipboardFormatA("another format"); - cf_onemore = RegisterClipboardFormatA("one more format"); - - hr = DataObjectImpl_CreateText("data1", &data1); - ok(SUCCEEDED(hr), "Failed to create data1 object: 0x%08x\n", hr); - if(FAILED(hr)) - return; - hr = DataObjectImpl_CreateText("data2", &data2); - ok(SUCCEEDED(hr), "Failed to create data2 object: 0x%08x\n", hr); - if(FAILED(hr)) - return; - hr = DataObjectImpl_CreateComplex(&data_cmpl); - ok(SUCCEEDED(hr), "Failed to create complex data object: 0x%08x\n", hr); - if(FAILED(hr)) - return; - - hr = OleSetClipboard(data1); - ok(hr == CO_E_NOTINITIALIZED, "OleSetClipboard should have failed with CO_E_NOTINITIALIZED instead of 0x%08x\n", hr); - - CoInitialize(NULL); - hr = OleSetClipboard(data1); - ok(hr == CO_E_NOTINITIALIZED || - hr == CLIPBRD_E_CANT_SET, /* win9x */ - "OleSetClipboard should have failed with " - "CO_E_NOTINITIALIZED or CLIPBRD_E_CANT_SET instead of 0x%08x\n", hr); - CoUninitialize(); - - hr = OleInitialize(NULL); - ok(hr == S_OK, "OleInitialize failed with error 0x%08x\n", hr); - - hr = OleSetClipboard(data1); - ok(hr == S_OK, "failed to set clipboard to data1, hr = 0x%08x\n", hr); - - test_cf_dataobject(data1); - - hr = OleIsCurrentClipboard(data1); - ok(hr == S_OK, "expected current clipboard to be data1, hr = 0x%08x\n", hr); - hr = OleIsCurrentClipboard(data2); - ok(hr == S_FALSE, "did not expect current clipboard to be data2, hr = 0x%08x\n", hr); - hr = OleIsCurrentClipboard(NULL); - ok(hr == S_FALSE, "expect S_FALSE, hr = 0x%08x\n", hr); - - test_get_clipboard(); - - hr = OleSetClipboard(data2); - ok(hr == S_OK, "failed to set clipboard to data2, hr = 0x%08x\n", hr); - hr = OleIsCurrentClipboard(data1); - ok(hr == S_FALSE, "did not expect current clipboard to be data1, hr = 0x%08x\n", hr); - hr = OleIsCurrentClipboard(data2); - ok(hr == S_OK, "expected current clipboard to be data2, hr = 0x%08x\n", hr); - hr = OleIsCurrentClipboard(NULL); - ok(hr == S_FALSE, "expect S_FALSE, hr = 0x%08x\n", hr); - - /* put a format directly onto the clipboard to show - OleFlushClipboard doesn't empty the clipboard */ - hblob = GlobalAlloc(GMEM_DDESHARE|GMEM_MOVEABLE|GMEM_ZEROINIT, 10); - OpenClipboard(NULL); - h = SetClipboardData(cf_onemore, hblob); - ok(h == hblob, "got %p\n", h); - h = GetClipboardData(cf_onemore); - ok(h == hblob || - broken(h != NULL), /* win9x */ - "got %p\n", h); - CloseClipboard(); - - hr = OleFlushClipboard(); - ok(hr == S_OK, "failed to flush clipboard, hr = 0x%08x\n", hr); - hr = OleIsCurrentClipboard(data1); - ok(hr == S_FALSE, "did not expect current clipboard to be data1, hr = 0x%08x\n", hr); - hr = OleIsCurrentClipboard(data2); - ok(hr == S_FALSE, "did not expect current clipboard to be data2, hr = 0x%08x\n", hr); - hr = OleIsCurrentClipboard(NULL); - ok(hr == S_FALSE, "expect S_FALSE, hr = 0x%08x\n", hr); - - /* format should survive the flush */ - OpenClipboard(NULL); - h = GetClipboardData(cf_onemore); - ok(h == hblob || - broken(h != NULL), /* win9x */ - "got %p\n", h); - CloseClipboard(); - - test_cf_dataobject(NULL); - - ok(OleSetClipboard(NULL) == S_OK, "failed to clear clipboard, hr = 0x%08x\n", hr); - - OpenClipboard(NULL); - h = GetClipboardData(cf_onemore); - ok(h == NULL, "got %p\n", h); - CloseClipboard(); - - trace("setting complex\n"); - hr = OleSetClipboard(data_cmpl); - ok(hr == S_OK, "failed to set clipboard to complex data, hr = 0x%08x\n", hr); - test_cf_dataobject(data_cmpl); - test_enum_fmtetc(data_cmpl); - - ok(OleSetClipboard(NULL) == S_OK, "failed to clear clipboard, hr = 0x%08x\n", hr); - - test_no_cf_dataobject(); - test_enum_fmtetc(NULL); - - ref = IDataObject_Release(data1); - ok(ref == 0, "expected data1 ref=0, got %d\n", ref); - ref = IDataObject_Release(data2); - ok(ref == 0, "expected data2 ref=0, got %d\n", ref); - ref = IDataObject_Release(data_cmpl); - ok(ref == 0, "expected data_cmpl ref=0, got %d\n", ref); - - OleUninitialize(); -} - -static inline ULONG count_refs(IDataObject *d) -{ - IDataObject_AddRef(d); - return IDataObject_Release(d); -} - -static void test_consumer_refs(void) -{ - HRESULT hr; - IDataObject *src, *src2, *get1, *get2, *get3; - ULONG refs, old_refs; - FORMATETC fmt; - STGMEDIUM med; - - InitFormatEtc(fmt, CF_TEXT, TYMED_HGLOBAL); - - OleInitialize(NULL); - - /* First show that each clipboard state results in - a different data object */ - - hr = DataObjectImpl_CreateText("data1", &src); - ok(hr == S_OK, "got %08x\n", hr); - hr = DataObjectImpl_CreateText("data2", &src2); - ok(hr == S_OK, "got %08x\n", hr); - - hr = OleSetClipboard(src); - ok(hr == S_OK, "got %08x\n", hr); - - hr = OleGetClipboard(&get1); - ok(hr == S_OK, "got %08x\n", hr); - - hr = OleGetClipboard(&get2); - ok(hr == S_OK, "got %08x\n", hr); - - ok(get1 == get2 || - broken(get1 != get2), /* win9x, winme & nt4 */ - "data objects differ\n"); - refs = IDataObject_Release(get2); - ok(refs == (get1 == get2 ? 1 : 0), "got %d\n", refs); - - OleFlushClipboard(); - - DataObjectImpl_GetData_calls = 0; - hr = IDataObject_GetData(get1, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(DataObjectImpl_GetData_calls == 0, "GetData called\n"); - if(SUCCEEDED(hr)) ReleaseStgMedium(&med); - - hr = OleGetClipboard(&get2); - ok(hr == S_OK, "got %08x\n", hr); - - ok(get1 != get2, "data objects match\n"); - - OleSetClipboard(NULL); - - hr = OleGetClipboard(&get3); - ok(hr == S_OK, "got %08x\n", hr); - - ok(get1 != get3, "data objects match\n"); - ok(get2 != get3, "data objects match\n"); - - IDataObject_Release(get3); - IDataObject_Release(get2); - IDataObject_Release(get1); - - /* Now call GetData before the flush and show that this - takes a ref on our src data obj. */ - - hr = OleSetClipboard(src); - ok(hr == S_OK, "got %08x\n", hr); - - old_refs = count_refs(src); - - hr = OleGetClipboard(&get1); - ok(hr == S_OK, "got %08x\n", hr); - - refs = count_refs(src); - ok(refs == old_refs, "%d %d\n", refs, old_refs); - - DataObjectImpl_GetData_calls = 0; - hr = IDataObject_GetData(get1, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(DataObjectImpl_GetData_calls == 1, "GetData not called\n"); - if(SUCCEEDED(hr)) ReleaseStgMedium(&med); - refs = count_refs(src); - ok(refs == old_refs + 1, "%d %d\n", refs, old_refs); - - OleFlushClipboard(); - - DataObjectImpl_GetData_calls = 0; - hr = IDataObject_GetData(get1, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(DataObjectImpl_GetData_calls == 1, "GetData not called\n"); - if(SUCCEEDED(hr)) ReleaseStgMedium(&med); - - refs = count_refs(src); - ok(refs == 2, "%d\n", refs); - - IDataObject_Release(get1); - - refs = count_refs(src); - ok(refs == 1, "%d\n", refs); - - /* Now set a second src object before the call to GetData - and show that GetData calls that second src. */ - - hr = OleSetClipboard(src); - ok(hr == S_OK, "got %08x\n", hr); - - old_refs = count_refs(src); - - hr = OleGetClipboard(&get1); - ok(hr == S_OK, "got %08x\n", hr); - - refs = count_refs(src); - ok(refs == old_refs, "%d %d\n", refs, old_refs); - - hr = OleSetClipboard(src2); - ok(hr == S_OK, "got %08x\n", hr); - - old_refs = count_refs(src2); - - DataObjectImpl_GetData_calls = 0; - hr = IDataObject_GetData(get1, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(DataObjectImpl_GetData_calls == 1, "GetData not called\n"); - if(SUCCEEDED(hr)) ReleaseStgMedium(&med); - - refs = count_refs(src); - ok(refs == 1, "%d\n", refs); - refs = count_refs(src2); - ok(refs == old_refs + 1, "%d %d\n", refs, old_refs); - - OleSetClipboard(NULL); - - refs = count_refs(src2); - ok(refs == 2, "%d\n", refs); - - IDataObject_Release(get1); - - IDataObject_Release(src2); - IDataObject_Release(src); - - OleUninitialize(); -} - -static void test_flushed_getdata(void) -{ - HRESULT hr; - IDataObject *src, *get; - FORMATETC fmt; - STGMEDIUM med; - STATSTG stat; - DEVMODEW dm; - - OleInitialize(NULL); - - hr = DataObjectImpl_CreateComplex(&src); - ok(hr == S_OK, "got %08x\n", hr); - - hr = OleSetClipboard(src); - ok(hr == S_OK, "got %08x\n", hr); - - hr = OleFlushClipboard(); - ok(hr == S_OK, "got %08x\n", hr); - - hr = OleGetClipboard(&get); - ok(hr == S_OK, "got %08x\n", hr); - - /* global format -> global & stream */ - - InitFormatEtc(fmt, CF_TEXT, TYMED_HGLOBAL); - hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_HGLOBAL, "got %x\n", med.tymed); - if(SUCCEEDED(hr)) ReleaseStgMedium(&med); - - InitFormatEtc(fmt, CF_TEXT, TYMED_ISTREAM); - hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTREAM, "got %x\n", med.tymed); - if(SUCCEEDED(hr)) ReleaseStgMedium(&med); - - InitFormatEtc(fmt, CF_TEXT, TYMED_ISTORAGE); - hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == E_FAIL, "got %08x\n", hr); - if(SUCCEEDED(hr)) ReleaseStgMedium(&med); - - InitFormatEtc(fmt, CF_TEXT, 0xffff); - hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_HGLOBAL, "got %x\n", med.tymed); - if(SUCCEEDED(hr)) ReleaseStgMedium(&med); - - /* stream format -> global & stream */ - - InitFormatEtc(fmt, cf_stream, TYMED_ISTREAM); - hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTREAM, "got %x\n", med.tymed); - if(SUCCEEDED(hr)) ReleaseStgMedium(&med); - - InitFormatEtc(fmt, cf_stream, TYMED_ISTORAGE); - hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == E_FAIL, "got %08x\n", hr); - if(SUCCEEDED(hr)) ReleaseStgMedium(&med); - - InitFormatEtc(fmt, cf_stream, TYMED_HGLOBAL); - hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_HGLOBAL, "got %x\n", med.tymed); - if(SUCCEEDED(hr)) ReleaseStgMedium(&med); - - InitFormatEtc(fmt, cf_stream, 0xffff); - hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTREAM, "got %x\n", med.tymed); - if(SUCCEEDED(hr)) ReleaseStgMedium(&med); - - /* storage format -> global, stream & storage */ - - InitFormatEtc(fmt, cf_storage, TYMED_ISTORAGE); - hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTORAGE, "got %x\n", med.tymed); - if(SUCCEEDED(hr)) { - hr = IStorage_Stat(med.u.pstg, &stat, STATFLAG_NONAME); - ok(hr == S_OK, "got %08x\n", hr); - ok(stat.grfMode == (STGM_SHARE_EXCLUSIVE | STGM_READWRITE), "got %08x\n", stat.grfMode); - ReleaseStgMedium(&med); - } - - InitFormatEtc(fmt, cf_storage, TYMED_ISTREAM); - hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTREAM, "got %x\n", med.tymed); - if(SUCCEEDED(hr)) ReleaseStgMedium(&med); - - InitFormatEtc(fmt, cf_storage, TYMED_HGLOBAL); - hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_HGLOBAL, "got %x\n", med.tymed); - if(SUCCEEDED(hr)) ReleaseStgMedium(&med); - - InitFormatEtc(fmt, cf_storage, TYMED_HGLOBAL | TYMED_ISTREAM); - hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_HGLOBAL, "got %x\n", med.tymed); - if(SUCCEEDED(hr)) ReleaseStgMedium(&med); - - InitFormatEtc(fmt, cf_storage, 0xffff); - hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTORAGE, "got %x\n", med.tymed); - if(SUCCEEDED(hr)) ReleaseStgMedium(&med); - - /* complex format with target device */ - - InitFormatEtc(fmt, cf_another, 0xffff); - hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == DV_E_FORMATETC || - broken(hr == S_OK), /* win9x, winme & nt4 */ - "got %08x\n", hr); - if(SUCCEEDED(hr)) ReleaseStgMedium(&med); - - InitFormatEtc(fmt, cf_another, 0xffff); - memset(&dm, 0, sizeof(dm)); - dm.dmSize = sizeof(dm); - dm.dmDriverExtra = 0; - lstrcpyW(dm.dmDeviceName, device_name); - fmt.ptd = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(DVTARGETDEVICE, tdData) + sizeof(device_name) + dm.dmSize + dm.dmDriverExtra); - fmt.ptd->tdSize = FIELD_OFFSET(DVTARGETDEVICE, tdData) + sizeof(device_name) + dm.dmSize + dm.dmDriverExtra; - fmt.ptd->tdDriverNameOffset = FIELD_OFFSET(DVTARGETDEVICE, tdData); - fmt.ptd->tdDeviceNameOffset = 0; - fmt.ptd->tdPortNameOffset = 0; - fmt.ptd->tdExtDevmodeOffset = fmt.ptd->tdDriverNameOffset + sizeof(device_name); - lstrcpyW((WCHAR*)fmt.ptd->tdData, device_name); - memcpy(fmt.ptd->tdData + sizeof(device_name), &dm, dm.dmSize + dm.dmDriverExtra); - - hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTORAGE, "got %x\n", med.tymed); - if(SUCCEEDED(hr)) ReleaseStgMedium(&med); - - HeapFree(GetProcessHeap(), 0, fmt.ptd); - - - IDataObject_Release(get); - IDataObject_Release(src); - OleUninitialize(); -} - -static HGLOBAL create_text(void) -{ - HGLOBAL h = GlobalAlloc(GMEM_DDESHARE|GMEM_MOVEABLE, 5); - char *p = GlobalLock(h); - strcpy(p, "test"); - GlobalUnlock(h); - return h; -} - -static HENHMETAFILE create_emf(void) -{ - const RECT rect = {0, 0, 100, 100}; - HDC hdc = CreateEnhMetaFileA(NULL, NULL, &rect, "HENHMETAFILE Ole Clipboard Test\0Test\0\0"); - ExtTextOutA(hdc, 0, 0, ETO_OPAQUE, &rect, "Test String", strlen("Test String"), NULL); - return CloseEnhMetaFile(hdc); -} - -static void test_nonole_clipboard(void) -{ - HRESULT hr; - BOOL r; - IDataObject *get; - IEnumFORMATETC *enum_fmt; - FORMATETC fmt; - HGLOBAL h, hblob, htext; - HENHMETAFILE emf; - STGMEDIUM med; - DWORD obj_type; - - r = OpenClipboard(NULL); - ok(r, "gle %d\n", GetLastError()); - r = EmptyClipboard(); - ok(r, "gle %d\n", GetLastError()); - r = CloseClipboard(); - ok(r, "gle %d\n", GetLastError()); - - OleInitialize(NULL); - - /* empty clipboard */ - hr = OleGetClipboard(&get); - ok(hr == S_OK, "got %08x\n", hr); - hr = IDataObject_EnumFormatEtc(get, DATADIR_GET, &enum_fmt); - ok(hr == S_OK, "got %08x\n", hr); - - hr = IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL); - ok(hr == S_FALSE, "got %08x\n", hr); - IEnumFORMATETC_Release(enum_fmt); - - IDataObject_Release(get); - - /* set a user defined clipboard type */ - - htext = create_text(); - hblob = GlobalAlloc(GMEM_DDESHARE|GMEM_MOVEABLE|GMEM_ZEROINIT, 10); - emf = create_emf(); - - r = OpenClipboard(NULL); - ok(r, "gle %d\n", GetLastError()); - h = SetClipboardData(CF_TEXT, htext); - ok(h == htext, "got %p\n", h); - h = SetClipboardData(cf_onemore, hblob); - ok(h == hblob, "got %p\n", h); - h = SetClipboardData(CF_ENHMETAFILE, emf); - ok(h == emf, "got %p\n", h); - r = CloseClipboard(); - ok(r, "gle %d\n", GetLastError()); - - hr = OleGetClipboard(&get); - ok(hr == S_OK, "got %08x\n", hr); - hr = IDataObject_EnumFormatEtc(get, DATADIR_GET, &enum_fmt); - ok(hr == S_OK, "got %08x\n", hr); - - hr = IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); - ok(fmt.cfFormat == CF_TEXT, "cf %04x\n", fmt.cfFormat); - ok(fmt.ptd == NULL, "ptd %p\n", fmt.ptd); - ok(fmt.dwAspect == DVASPECT_CONTENT, "aspect %x\n", fmt.dwAspect); - ok(fmt.lindex == -1, "lindex %d\n", fmt.lindex); - ok(fmt.tymed == (TYMED_ISTREAM | TYMED_HGLOBAL), "tymed %x\n", fmt.tymed); - - hr = IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); - ok(fmt.cfFormat == cf_onemore, "cf %04x\n", fmt.cfFormat); - ok(fmt.ptd == NULL, "ptd %p\n", fmt.ptd); - ok(fmt.dwAspect == DVASPECT_CONTENT, "aspect %x\n", fmt.dwAspect); - ok(fmt.lindex == -1, "lindex %d\n", fmt.lindex); - ok(fmt.tymed == (TYMED_ISTREAM | TYMED_HGLOBAL), "tymed %x\n", fmt.tymed); - - hr = IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); - ok(fmt.cfFormat == CF_ENHMETAFILE, "cf %04x\n", fmt.cfFormat); - ok(fmt.ptd == NULL, "ptd %p\n", fmt.ptd); - ok(fmt.dwAspect == DVASPECT_CONTENT, "aspect %x\n", fmt.dwAspect); - ok(fmt.lindex == -1, "lindex %d\n", fmt.lindex); - ok(fmt.tymed == TYMED_ENHMF, "tymed %x\n", fmt.tymed); - - hr = IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); /* User32 adds some synthesised formats */ - - todo_wine ok(fmt.cfFormat == CF_LOCALE, "cf %04x\n", fmt.cfFormat); - if(fmt.cfFormat == CF_LOCALE) - { - ok(fmt.ptd == NULL, "ptd %p\n", fmt.ptd); - ok(fmt.dwAspect == DVASPECT_CONTENT, "aspect %x\n", fmt.dwAspect); - ok(fmt.lindex == -1, "lindex %d\n", fmt.lindex); - ok(fmt.tymed == (TYMED_ISTREAM | TYMED_HGLOBAL), "tymed %x\n", fmt.tymed); - - hr = IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); - } - - ok(fmt.cfFormat == CF_OEMTEXT, "cf %04x\n", fmt.cfFormat); - ok(fmt.ptd == NULL, "ptd %p\n", fmt.ptd); - ok(fmt.dwAspect == DVASPECT_CONTENT, "aspect %x\n", fmt.dwAspect); - ok(fmt.lindex == -1, "lindex %d\n", fmt.lindex); - ok(fmt.tymed == (TYMED_ISTREAM | TYMED_HGLOBAL), "tymed %x\n", fmt.tymed); - - hr = IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); - ok(fmt.cfFormat == CF_UNICODETEXT || - broken(fmt.cfFormat == CF_METAFILEPICT), /* win9x and winme don't have CF_UNICODETEXT */ - "cf %04x\n", fmt.cfFormat); - if(fmt.cfFormat == CF_UNICODETEXT) - { - ok(fmt.ptd == NULL, "ptd %p\n", fmt.ptd); - ok(fmt.dwAspect == DVASPECT_CONTENT, "aspect %x\n", fmt.dwAspect); - ok(fmt.lindex == -1, "lindex %d\n", fmt.lindex); - ok(fmt.tymed == (TYMED_ISTREAM | TYMED_HGLOBAL), "tymed %x\n", fmt.tymed); - - hr = IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL); - ok(hr == S_OK, "got %08x\n", hr); - } - ok(fmt.cfFormat == CF_METAFILEPICT, "cf %04x\n", fmt.cfFormat); - ok(fmt.ptd == NULL, "ptd %p\n", fmt.ptd); - ok(fmt.dwAspect == DVASPECT_CONTENT, "aspect %x\n", fmt.dwAspect); - ok(fmt.lindex == -1, "lindex %d\n", fmt.lindex); - ok(fmt.tymed == TYMED_MFPICT, "tymed %x\n", fmt.tymed); - - hr = IEnumFORMATETC_Next(enum_fmt, 1, &fmt, NULL); - ok(hr == S_FALSE, "got %08x\n", hr); - IEnumFORMATETC_Release(enum_fmt); - - InitFormatEtc(fmt, CF_ENHMETAFILE, TYMED_ENHMF); - hr = IDataObject_GetData(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - obj_type = GetObjectType(U(med).hEnhMetaFile); - ok(obj_type == OBJ_ENHMETAFILE, "got %d\n", obj_type); - if(SUCCEEDED(hr)) ReleaseStgMedium(&med); - - IDataObject_Release(get); - - r = OpenClipboard(NULL); - ok(r, "gle %d\n", GetLastError()); - r = EmptyClipboard(); - ok(r, "gle %d\n", GetLastError()); - r = CloseClipboard(); - ok(r, "gle %d\n", GetLastError()); - - OleUninitialize(); -} - -static void test_getdatahere(void) -{ - HRESULT hr; - IDataObject *src, *get; - FORMATETC fmt; - STGMEDIUM med; - - OleInitialize(NULL); - - hr = DataObjectImpl_CreateComplex(&src); - ok(hr == S_OK, "got %08x\n", hr); - - hr = OleSetClipboard(src); - ok(hr == S_OK, "got %08x\n", hr); - - hr = OleGetClipboard(&get); - ok(hr == S_OK, "got %08x\n", hr); - - /* global format -> global & stream */ - - DataObjectImpl_GetData_calls = 0; - DataObjectImpl_GetDataHere_calls = 0; - - InitFormatEtc(fmt, CF_TEXT, TYMED_HGLOBAL); - - med.pUnkForRelease = NULL; - med.tymed = TYMED_HGLOBAL; - U(med).hGlobal = GlobalAlloc(GMEM_MOVEABLE, 100); - hr = IDataObject_GetDataHere(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_HGLOBAL, "got %x\n", med.tymed); - ReleaseStgMedium(&med); - ok(DataObjectImpl_GetDataHere_calls == 1, "called %d\n", DataObjectImpl_GetDataHere_calls); - ok(DataObjectImpl_GetData_calls == 1, "called %d\n", DataObjectImpl_GetData_calls); - - InitFormatEtc(fmt, CF_TEXT, 0); - - med.pUnkForRelease = NULL; - med.tymed = TYMED_HGLOBAL; - U(med).hGlobal = GlobalAlloc(GMEM_MOVEABLE, 100); - hr = IDataObject_GetDataHere(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_HGLOBAL, "got %x\n", med.tymed); - ReleaseStgMedium(&med); - ok(DataObjectImpl_GetDataHere_calls == 2, "called %d\n", DataObjectImpl_GetDataHere_calls); - ok(DataObjectImpl_GetData_calls == 1, "called %d\n", DataObjectImpl_GetData_calls); - - med.pUnkForRelease = NULL; - med.tymed = TYMED_HGLOBAL; - U(med).hGlobal = GlobalAlloc(GMEM_MOVEABLE, 1); - hr = IDataObject_GetDataHere(get, &fmt, &med); - ok(hr == E_FAIL, "got %08x\n", hr); - ok(med.tymed == TYMED_HGLOBAL, "got %x\n", med.tymed); - ReleaseStgMedium(&med); - ok(DataObjectImpl_GetDataHere_calls == 3, "called %d\n", DataObjectImpl_GetDataHere_calls); - ok(DataObjectImpl_GetData_calls == 1, "called %d\n", DataObjectImpl_GetData_calls); - - med.pUnkForRelease = NULL; - med.tymed = TYMED_ISTREAM; - CreateStreamOnHGlobal(NULL, TRUE, &U(med).pstm); - hr = IDataObject_GetDataHere(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTREAM, "got %x\n", med.tymed); - ReleaseStgMedium(&med); - ok(DataObjectImpl_GetDataHere_calls == 4, "called %d\n", DataObjectImpl_GetDataHere_calls); - ok(DataObjectImpl_GetData_calls == 1, "called %d\n", DataObjectImpl_GetData_calls); - - med.pUnkForRelease = NULL; - med.tymed = TYMED_ISTORAGE; - StgCreateDocfile(NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_DELETEONRELEASE, 0, &U(med).pstg); - hr = IDataObject_GetDataHere(get, &fmt, &med); - ok(hr == E_FAIL, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTORAGE, "got %x\n", med.tymed); - ReleaseStgMedium(&med); - ok(DataObjectImpl_GetDataHere_calls == 5, "called %d\n", DataObjectImpl_GetDataHere_calls); - ok(DataObjectImpl_GetData_calls == 1, "called %d\n", DataObjectImpl_GetData_calls); - - InitFormatEtc(fmt, cf_stream, 0); - - med.pUnkForRelease = NULL; - med.tymed = TYMED_HGLOBAL; - U(med).hGlobal = GlobalAlloc(GMEM_MOVEABLE, 100); - hr = IDataObject_GetDataHere(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_HGLOBAL, "got %x\n", med.tymed); - ReleaseStgMedium(&med); - ok(DataObjectImpl_GetDataHere_calls == 7, "called %d\n", DataObjectImpl_GetDataHere_calls); - ok(DataObjectImpl_GetData_calls == 2, "called %d\n", DataObjectImpl_GetData_calls); - - med.pUnkForRelease = NULL; - med.tymed = TYMED_ISTREAM; - CreateStreamOnHGlobal(NULL, TRUE, &U(med).pstm); - hr = IDataObject_GetDataHere(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTREAM, "got %x\n", med.tymed); - ReleaseStgMedium(&med); - ok(DataObjectImpl_GetDataHere_calls == 8, "called %d\n", DataObjectImpl_GetDataHere_calls); - ok(DataObjectImpl_GetData_calls == 2, "called %d\n", DataObjectImpl_GetData_calls); - - med.pUnkForRelease = NULL; - med.tymed = TYMED_ISTORAGE; - StgCreateDocfile(NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_DELETEONRELEASE, 0, &U(med).pstg); - hr = IDataObject_GetDataHere(get, &fmt, &med); - ok(hr == E_FAIL, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTORAGE, "got %x\n", med.tymed); - ReleaseStgMedium(&med); - ok(DataObjectImpl_GetDataHere_calls == 9, "called %d\n", DataObjectImpl_GetDataHere_calls); - ok(DataObjectImpl_GetData_calls == 2, "called %d\n", DataObjectImpl_GetData_calls); - - InitFormatEtc(fmt, cf_storage, 0); - - med.pUnkForRelease = NULL; - med.tymed = TYMED_HGLOBAL; - U(med).hGlobal = GlobalAlloc(GMEM_MOVEABLE, 3000); - hr = IDataObject_GetDataHere(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_HGLOBAL, "got %x\n", med.tymed); - ReleaseStgMedium(&med); - ok(DataObjectImpl_GetDataHere_calls == 11, "called %d\n", DataObjectImpl_GetDataHere_calls); - ok(DataObjectImpl_GetData_calls == 3, "called %d\n", DataObjectImpl_GetData_calls); - - med.pUnkForRelease = NULL; - med.tymed = TYMED_ISTREAM; - CreateStreamOnHGlobal(NULL, TRUE, &U(med).pstm); - hr = IDataObject_GetDataHere(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTREAM, "got %x\n", med.tymed); - ReleaseStgMedium(&med); - ok(DataObjectImpl_GetDataHere_calls == 12, "called %d\n", DataObjectImpl_GetDataHere_calls); - ok(DataObjectImpl_GetData_calls == 3, "called %d\n", DataObjectImpl_GetData_calls); - - med.pUnkForRelease = NULL; - med.tymed = TYMED_ISTORAGE; - StgCreateDocfile(NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_DELETEONRELEASE, 0, &U(med).pstg); - hr = IDataObject_GetDataHere(get, &fmt, &med); - ok(hr == S_OK, "got %08x\n", hr); - ok(med.tymed == TYMED_ISTORAGE, "got %x\n", med.tymed); - ReleaseStgMedium(&med); - ok(DataObjectImpl_GetDataHere_calls == 13, "called %d\n", DataObjectImpl_GetDataHere_calls); - ok(DataObjectImpl_GetData_calls == 3, "called %d\n", DataObjectImpl_GetData_calls); - - - IDataObject_Release(get); - IDataObject_Release(src); - - OleUninitialize(); - -} - -START_TEST(clipboard) -{ - test_set_clipboard(); - test_consumer_refs(); - test_flushed_getdata(); - test_nonole_clipboard(); - test_getdatahere(); -} diff --git a/rostests/winetests/ole32/compobj.c b/rostests/winetests/ole32/compobj.c deleted file mode 100644 index 755d15a9f66..00000000000 --- a/rostests/winetests/ole32/compobj.c +++ /dev/null @@ -1,1485 +0,0 @@ -/* - * Component Object Tests - * - * 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 COBJMACROS -#define CONST_VTABLE - -#include - -#include "windef.h" -#include "winbase.h" -#define USE_COM_CONTEXT_DEF -#include "initguid.h" -#include "objbase.h" -#include "shlguid.h" -#include "urlmon.h" /* for CLSID_FileProtocol */ - -#include "ctxtcall.h" - -#include "wine/test.h" - -extern const IID GUID_NULL; - -/* functions that are not present on all versions of Windows */ -HRESULT (WINAPI * pCoInitializeEx)(LPVOID lpReserved, DWORD dwCoInit); -HRESULT (WINAPI * pCoGetObjectContext)(REFIID riid, LPVOID *ppv); -HRESULT (WINAPI * pCoSwitchCallContext)(IUnknown *pObject, IUnknown **ppOldObject); -HRESULT (WINAPI * pCoGetTreatAsClass)(REFCLSID clsidOld, LPCLSID pClsidNew); -HRESULT (WINAPI * pCoGetContextToken)(ULONG_PTR *token); - -#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr) -#define ok_more_than_one_lock() ok(cLocks > 0, "Number of locks should be > 0, but actually is %d\n", cLocks) -#define ok_no_locks() ok(cLocks == 0, "Number of locks should be 0, but actually is %d\n", cLocks) - -static const CLSID CLSID_non_existent = { 0x12345678, 0x1234, 0x1234, { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 } }; -static const CLSID CLSID_StdFont = { 0x0be35203, 0x8f91, 0x11ce, { 0x9d, 0xe3, 0x00, 0xaa, 0x00, 0x4b, 0xb8, 0x51 } }; -static WCHAR stdfont[] = {'S','t','d','F','o','n','t',0}; -static const WCHAR wszNonExistent[] = {'N','o','n','E','x','i','s','t','e','n','t',0}; -static WCHAR wszCLSID_StdFont[] = -{ - '{','0','b','e','3','5','2','0','3','-','8','f','9','1','-','1','1','c','e','-', - '9','d','e','3','-','0','0','a','a','0','0','4','b','b','8','5','1','}',0 -}; - -static const IID IID_IWineTest = -{ - 0x5201163f, - 0x8164, - 0x4fd0, - {0xa1, 0xa2, 0x5d, 0x5a, 0x36, 0x54, 0xd3, 0xbd} -}; /* 5201163f-8164-4fd0-a1a2-5d5a3654d3bd */ -static const CLSID CLSID_WineOOPTest = { - 0x5201163f, - 0x8164, - 0x4fd0, - {0xa1, 0xa2, 0x5d, 0x5a, 0x36, 0x54, 0xd3, 0xbd} -}; /* 5201163f-8164-4fd0-a1a2-5d5a3654d3bd */ - -static LONG cLocks; - -static void LockModule(void) -{ - InterlockedIncrement(&cLocks); -} - -static void UnlockModule(void) -{ - InterlockedDecrement(&cLocks); -} - -static HRESULT WINAPI Test_IClassFactory_QueryInterface( - LPCLASSFACTORY iface, - REFIID riid, - LPVOID *ppvObj) -{ - if (ppvObj == NULL) return E_POINTER; - - if (IsEqualGUID(riid, &IID_IUnknown) || - IsEqualGUID(riid, &IID_IClassFactory)) - { - *ppvObj = iface; - IClassFactory_AddRef(iface); - return S_OK; - } - - *ppvObj = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI Test_IClassFactory_AddRef(LPCLASSFACTORY iface) -{ - LockModule(); - return 2; /* non-heap-based object */ -} - -static ULONG WINAPI Test_IClassFactory_Release(LPCLASSFACTORY iface) -{ - UnlockModule(); - return 1; /* non-heap-based object */ -} - -static HRESULT WINAPI Test_IClassFactory_CreateInstance( - LPCLASSFACTORY iface, - LPUNKNOWN pUnkOuter, - REFIID riid, - LPVOID *ppvObj) -{ - *ppvObj = NULL; - if (pUnkOuter) return CLASS_E_NOAGGREGATION; - return E_NOINTERFACE; -} - -static HRESULT WINAPI Test_IClassFactory_LockServer( - LPCLASSFACTORY iface, - BOOL fLock) -{ - return S_OK; -} - -static const IClassFactoryVtbl TestClassFactory_Vtbl = -{ - Test_IClassFactory_QueryInterface, - Test_IClassFactory_AddRef, - Test_IClassFactory_Release, - Test_IClassFactory_CreateInstance, - Test_IClassFactory_LockServer -}; - -static IClassFactory Test_ClassFactory = { &TestClassFactory_Vtbl }; - -static void test_ProgIDFromCLSID(void) -{ - LPWSTR progid; - HRESULT hr = ProgIDFromCLSID(&CLSID_StdFont, &progid); - ok(hr == S_OK, "ProgIDFromCLSID failed with error 0x%08x\n", hr); - if (hr == S_OK) - { - ok(!lstrcmpiW(progid, stdfont), "Didn't get expected prog ID\n"); - CoTaskMemFree(progid); - } - - progid = (LPWSTR)0xdeadbeef; - hr = ProgIDFromCLSID(&CLSID_non_existent, &progid); - ok(hr == REGDB_E_CLASSNOTREG, "ProgIDFromCLSID returned %08x\n", hr); - ok(progid == NULL, "ProgIDFromCLSID returns with progid %p\n", progid); - - hr = ProgIDFromCLSID(&CLSID_StdFont, NULL); - ok(hr == E_INVALIDARG, "ProgIDFromCLSID should return E_INVALIDARG instead of 0x%08x\n", hr); -} - -static void test_CLSIDFromProgID(void) -{ - CLSID clsid; - HRESULT hr = CLSIDFromProgID(stdfont, &clsid); - ok(hr == S_OK, "CLSIDFromProgID failed with error 0x%08x\n", hr); - ok(IsEqualCLSID(&clsid, &CLSID_StdFont), "clsid wasn't equal to CLSID_StdFont\n"); - - hr = CLSIDFromString(stdfont, &clsid); - ok_ole_success(hr, "CLSIDFromString"); - ok(IsEqualCLSID(&clsid, &CLSID_StdFont), "clsid wasn't equal to CLSID_StdFont\n"); - - /* test some failure cases */ - - hr = CLSIDFromProgID(wszNonExistent, NULL); - ok(hr == E_INVALIDARG, "CLSIDFromProgID should have returned E_INVALIDARG instead of 0x%08x\n", hr); - - hr = CLSIDFromProgID(NULL, &clsid); - ok(hr == E_INVALIDARG, "CLSIDFromProgID should have returned E_INVALIDARG instead of 0x%08x\n", hr); - - memset(&clsid, 0xcc, sizeof(clsid)); - hr = CLSIDFromProgID(wszNonExistent, &clsid); - ok(hr == CO_E_CLASSSTRING, "CLSIDFromProgID on nonexistent ProgID should have returned CO_E_CLASSSTRING instead of 0x%08x\n", hr); - ok(IsEqualCLSID(&clsid, &CLSID_NULL), "CLSIDFromProgID should have set clsid to all-zeros on failure\n"); -} - -static void test_CLSIDFromString(void) -{ - CLSID clsid; - HRESULT hr = CLSIDFromString(wszCLSID_StdFont, &clsid); - ok_ole_success(hr, "CLSIDFromString"); - ok(IsEqualCLSID(&clsid, &CLSID_StdFont), "clsid wasn't equal to CLSID_StdFont\n"); - - hr = CLSIDFromString(NULL, &clsid); - ok_ole_success(hr, "CLSIDFromString"); - ok(IsEqualCLSID(&clsid, &CLSID_NULL), "clsid wasn't equal to CLSID_NULL\n"); -} - -static void test_StringFromGUID2(void) -{ - WCHAR str[50]; - int len; - - /* invalid pointer */ - SetLastError(0xdeadbeef); - len = StringFromGUID2(NULL,str,50); - ok(len == 0, "len: %d (expected 0)\n", len); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %x\n", GetLastError()); - - /* Test corner cases for buffer size */ - len = StringFromGUID2(&CLSID_StdFont,str,50); - ok(len == 39, "len: %d (expected 39)\n", len); - ok(!lstrcmpiW(str, wszCLSID_StdFont),"string wasn't equal for CLSID_StdFont\n"); - - memset(str,0,sizeof str); - len = StringFromGUID2(&CLSID_StdFont,str,39); - ok(len == 39, "len: %d (expected 39)\n", len); - ok(!lstrcmpiW(str, wszCLSID_StdFont),"string wasn't equal for CLSID_StdFont\n"); - - len = StringFromGUID2(&CLSID_StdFont,str,38); - ok(len == 0, "len: %d (expected 0)\n", len); - - len = StringFromGUID2(&CLSID_StdFont,str,30); - ok(len == 0, "len: %d (expected 0)\n", len); -} - -struct info -{ - HANDLE wait, stop; -}; - -static DWORD CALLBACK ole_initialize_thread(LPVOID pv) -{ - HRESULT hr; - struct info *info = pv; - - hr = pCoInitializeEx(NULL, COINIT_MULTITHREADED); - - SetEvent(info->wait); - WaitForSingleObject(info->stop, 10000); - - CoUninitialize(); - return hr; -} - -static void test_CoCreateInstance(void) -{ - HRESULT hr; - HANDLE thread; - DWORD tid, exitcode; - IUnknown *pUnk; - struct info info; - REFCLSID rclsid = &CLSID_InternetZoneManager; - - pUnk = (IUnknown *)0xdeadbeef; - hr = CoCreateInstance(rclsid, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&pUnk); - ok(hr == CO_E_NOTINITIALIZED, "CoCreateInstance should have returned CO_E_NOTINITIALIZED instead of 0x%08x\n", hr); - ok(pUnk == NULL, "CoCreateInstance should have changed the passed in pointer to NULL, instead of %p\n", pUnk); - - OleInitialize(NULL); - - /* test errors returned for non-registered clsids */ - hr = CoCreateInstance(&CLSID_non_existent, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&pUnk); - ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance for non-registered inproc server should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr); - hr = CoCreateInstance(&CLSID_non_existent, NULL, CLSCTX_INPROC_HANDLER, &IID_IUnknown, (void **)&pUnk); - ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance for non-registered inproc handler should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr); - hr = CoCreateInstance(&CLSID_non_existent, NULL, CLSCTX_LOCAL_SERVER, &IID_IUnknown, (void **)&pUnk); - ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance for non-registered local server should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr); - hr = CoCreateInstance(&CLSID_non_existent, NULL, CLSCTX_REMOTE_SERVER, &IID_IUnknown, (void **)&pUnk); - ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance for non-registered remote server should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr); - - hr = CoCreateInstance(rclsid, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&pUnk); - if(hr == REGDB_E_CLASSNOTREG) - { - skip("IE not installed so can't test CoCreateInstance\n"); - OleUninitialize(); - return; - } - - ok_ole_success(hr, "CoCreateInstance"); - if(pUnk) IUnknown_Release(pUnk); - OleUninitialize(); - - hr = CoCreateInstance(rclsid, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&pUnk); - ok(hr == CO_E_NOTINITIALIZED, "CoCreateInstance should have returned CO_E_NOTINITIALIZED instead of 0x%08x\n", hr); - - /* show that COM doesn't have to be initialized for multi-threaded apartments if another - thread has already done so */ - - info.wait = CreateEvent(NULL, TRUE, FALSE, NULL); - ok(info.wait != NULL, "CreateEvent failed with error %d\n", GetLastError()); - - info.stop = CreateEvent(NULL, TRUE, FALSE, NULL); - ok(info.stop != NULL, "CreateEvent failed with error %d\n", GetLastError()); - - thread = CreateThread(NULL, 0, ole_initialize_thread, &info, 0, &tid); - ok(thread != NULL, "CreateThread failed with error %d\n", GetLastError()); - - ok( !WaitForSingleObject(info.wait, 10000 ), "wait timed out\n" ); - - pUnk = (IUnknown *)0xdeadbeef; - hr = CoCreateInstance(rclsid, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&pUnk); - ok(hr == S_OK, "CoCreateInstance should have returned S_OK instead of 0x%08x\n", hr); - if (pUnk) IUnknown_Release(pUnk); - - SetEvent(info.stop); - ok( !WaitForSingleObject(thread, 10000), "wait timed out\n" ); - - GetExitCodeThread(thread, &exitcode); - hr = exitcode; - ok(hr == S_OK, "thread should have returned S_OK instead of 0x%08x\n", hr); - - CloseHandle(thread); - CloseHandle(info.wait); - CloseHandle(info.stop); -} - -static void test_CoGetClassObject(void) -{ - HRESULT hr; - HANDLE thread; - DWORD tid, exitcode; - IUnknown *pUnk; - struct info info; - REFCLSID rclsid = &CLSID_InternetZoneManager; - - hr = CoGetClassObject(rclsid, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void **)&pUnk); - ok(hr == CO_E_NOTINITIALIZED, "CoGetClassObject should have returned CO_E_NOTINITIALIZED instead of 0x%08x\n", hr); - ok(pUnk == NULL, "CoGetClassObject should have changed the passed in pointer to NULL, instead of %p\n", pUnk); - - hr = CoGetClassObject(rclsid, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, NULL); - ok(hr == E_INVALIDARG || - broken(hr == CO_E_NOTINITIALIZED), /* win9x */ - "CoGetClassObject should have returned E_INVALIDARG instead of 0x%08x\n", hr); - - /* show that COM doesn't have to be initialized for multi-threaded apartments if another - thread has already done so */ - - info.wait = CreateEvent(NULL, TRUE, FALSE, NULL); - ok(info.wait != NULL, "CreateEvent failed with error %d\n", GetLastError()); - - info.stop = CreateEvent(NULL, TRUE, FALSE, NULL); - ok(info.stop != NULL, "CreateEvent failed with error %d\n", GetLastError()); - - thread = CreateThread(NULL, 0, ole_initialize_thread, &info, 0, &tid); - ok(thread != NULL, "CreateThread failed with error %d\n", GetLastError()); - - ok( !WaitForSingleObject(info.wait, 10000), "wait timed out\n" ); - - pUnk = (IUnknown *)0xdeadbeef; - hr = CoGetClassObject(rclsid, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void **)&pUnk); - if(hr == REGDB_E_CLASSNOTREG) - skip("IE not installed so can't test CoGetClassObject\n"); - else - { - ok(hr == S_OK, "CoGetClassObject should have returned S_OK instead of 0x%08x\n", hr); - if (pUnk) IUnknown_Release(pUnk); - } - - SetEvent(info.stop); - ok( !WaitForSingleObject(thread, 10000), "wait timed out\n" ); - - GetExitCodeThread(thread, &exitcode); - hr = exitcode; - ok(hr == S_OK, "thread should have returned S_OK instead of 0x%08x\n", hr); - - CloseHandle(thread); - CloseHandle(info.wait); - CloseHandle(info.stop); -} - -static ATOM register_dummy_class(void) -{ - WNDCLASS wc = - { - 0, - DefWindowProc, - 0, - 0, - GetModuleHandle(NULL), - NULL, - LoadCursor(NULL, IDC_ARROW), - (HBRUSH)(COLOR_BTNFACE+1), - NULL, - TEXT("WineOleTestClass"), - }; - - return RegisterClass(&wc); -} - -static void test_ole_menu(void) -{ - HWND hwndFrame; - HRESULT hr; - - hwndFrame = CreateWindow(MAKEINTATOM(register_dummy_class()), "Test", 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL, NULL); - hr = OleSetMenuDescriptor(NULL, hwndFrame, NULL, NULL, NULL); - todo_wine ok_ole_success(hr, "OleSetMenuDescriptor"); - - DestroyWindow(hwndFrame); -} - - -static HRESULT WINAPI MessageFilter_QueryInterface(IMessageFilter *iface, REFIID riid, void ** ppvObj) -{ - if (ppvObj == NULL) return E_POINTER; - - if (IsEqualGUID(riid, &IID_IUnknown) || - IsEqualGUID(riid, &IID_IClassFactory)) - { - *ppvObj = iface; - IMessageFilter_AddRef(iface); - return S_OK; - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI MessageFilter_AddRef(IMessageFilter *iface) -{ - return 2; /* non-heap object */ -} - -static ULONG WINAPI MessageFilter_Release(IMessageFilter *iface) -{ - return 1; /* non-heap object */ -} - -static DWORD WINAPI MessageFilter_HandleInComingCall( - IMessageFilter *iface, - DWORD dwCallType, - HTASK threadIDCaller, - DWORD dwTickCount, - LPINTERFACEINFO lpInterfaceInfo) -{ - trace("HandleInComingCall\n"); - return SERVERCALL_ISHANDLED; -} - -static DWORD WINAPI MessageFilter_RetryRejectedCall( - IMessageFilter *iface, - HTASK threadIDCallee, - DWORD dwTickCount, - DWORD dwRejectType) -{ - trace("RetryRejectedCall\n"); - return 0; -} - -static DWORD WINAPI MessageFilter_MessagePending( - IMessageFilter *iface, - HTASK threadIDCallee, - DWORD dwTickCount, - DWORD dwPendingType) -{ - trace("MessagePending\n"); - return PENDINGMSG_WAITNOPROCESS; -} - -static const IMessageFilterVtbl MessageFilter_Vtbl = -{ - MessageFilter_QueryInterface, - MessageFilter_AddRef, - MessageFilter_Release, - MessageFilter_HandleInComingCall, - MessageFilter_RetryRejectedCall, - MessageFilter_MessagePending -}; - -static IMessageFilter MessageFilter = { &MessageFilter_Vtbl }; - -static void test_CoRegisterMessageFilter(void) -{ - HRESULT hr; - IMessageFilter *prev_filter; - - hr = CoRegisterMessageFilter(&MessageFilter, &prev_filter); - ok(hr == CO_E_NOT_SUPPORTED, - "CoRegisterMessageFilter should have failed with CO_E_NOT_SUPPORTED instead of 0x%08x\n", - hr); - - pCoInitializeEx(NULL, COINIT_MULTITHREADED); - prev_filter = (IMessageFilter *)0xdeadbeef; - hr = CoRegisterMessageFilter(&MessageFilter, &prev_filter); - ok(hr == CO_E_NOT_SUPPORTED, - "CoRegisterMessageFilter should have failed with CO_E_NOT_SUPPORTED instead of 0x%08x\n", - hr); - ok(prev_filter == (IMessageFilter *)0xdeadbeef, - "prev_filter should have been set to %p\n", prev_filter); - CoUninitialize(); - - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - hr = CoRegisterMessageFilter(NULL, NULL); - ok_ole_success(hr, "CoRegisterMessageFilter"); - - prev_filter = (IMessageFilter *)0xdeadbeef; - hr = CoRegisterMessageFilter(NULL, &prev_filter); - ok_ole_success(hr, "CoRegisterMessageFilter"); - ok(prev_filter == NULL, "prev_filter should have been set to NULL instead of %p\n", prev_filter); - - hr = CoRegisterMessageFilter(&MessageFilter, &prev_filter); - ok_ole_success(hr, "CoRegisterMessageFilter"); - ok(prev_filter == NULL, "prev_filter should have been set to NULL instead of %p\n", prev_filter); - - hr = CoRegisterMessageFilter(NULL, NULL); - ok_ole_success(hr, "CoRegisterMessageFilter"); - - CoUninitialize(); -} - -static HRESULT WINAPI Test_IUnknown_QueryInterface( - LPUNKNOWN iface, - REFIID riid, - LPVOID *ppvObj) -{ - if (ppvObj == NULL) return E_POINTER; - - if (IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IWineTest)) - { - *ppvObj = iface; - IUnknown_AddRef(iface); - return S_OK; - } - - *ppvObj = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI Test_IUnknown_AddRef(LPUNKNOWN iface) -{ - return 2; /* non-heap-based object */ -} - -static ULONG WINAPI Test_IUnknown_Release(LPUNKNOWN iface) -{ - return 1; /* non-heap-based object */ -} - -static const IUnknownVtbl TestUnknown_Vtbl = -{ - Test_IUnknown_QueryInterface, - Test_IUnknown_AddRef, - Test_IUnknown_Release, -}; - -static IUnknown Test_Unknown = { &TestUnknown_Vtbl }; - -static HRESULT WINAPI PSFactoryBuffer_QueryInterface( - IPSFactoryBuffer * This, - /* [in] */ REFIID riid, - /* [iid_is][out] */ void **ppvObject) -{ - if (IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IPSFactoryBuffer)) - { - *ppvObject = This; - IPSFactoryBuffer_AddRef(This); - return S_OK; - } - return E_NOINTERFACE; -} - -static ULONG WINAPI PSFactoryBuffer_AddRef( - IPSFactoryBuffer * This) -{ - return 2; -} - -static ULONG WINAPI PSFactoryBuffer_Release( - IPSFactoryBuffer * This) -{ - return 1; -} - -static HRESULT WINAPI PSFactoryBuffer_CreateProxy( - IPSFactoryBuffer * This, - /* [in] */ IUnknown *pUnkOuter, - /* [in] */ REFIID riid, - /* [out] */ IRpcProxyBuffer **ppProxy, - /* [out] */ void **ppv) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI PSFactoryBuffer_CreateStub( - IPSFactoryBuffer * This, - /* [in] */ REFIID riid, - /* [unique][in] */ IUnknown *pUnkServer, - /* [out] */ IRpcStubBuffer **ppStub) -{ - return E_NOTIMPL; -} - -static IPSFactoryBufferVtbl PSFactoryBufferVtbl = -{ - PSFactoryBuffer_QueryInterface, - PSFactoryBuffer_AddRef, - PSFactoryBuffer_Release, - PSFactoryBuffer_CreateProxy, - PSFactoryBuffer_CreateStub -}; - -static IPSFactoryBuffer PSFactoryBuffer = { &PSFactoryBufferVtbl }; - -static const CLSID CLSID_WineTestPSFactoryBuffer = -{ - 0x52011640, - 0x8164, - 0x4fd0, - {0xa1, 0xa2, 0x5d, 0x5a, 0x36, 0x54, 0xd3, 0xbd} -}; /* 52011640-8164-4fd0-a1a2-5d5a3654d3bd */ - -static void test_CoRegisterPSClsid(void) -{ - HRESULT hr; - DWORD dwRegistrationKey; - IStream *stream; - CLSID clsid; - - hr = CoRegisterPSClsid(&IID_IWineTest, &CLSID_WineTestPSFactoryBuffer); - ok(hr == CO_E_NOTINITIALIZED, "CoRegisterPSClsid should have returened CO_E_NOTINITIALIZED instead of 0x%08x\n", hr); - - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - hr = CoRegisterClassObject(&CLSID_WineTestPSFactoryBuffer, (IUnknown *)&PSFactoryBuffer, - CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &dwRegistrationKey); - ok_ole_success(hr, "CoRegisterClassObject"); - - hr = CoRegisterPSClsid(&IID_IWineTest, &CLSID_WineTestPSFactoryBuffer); - ok_ole_success(hr, "CoRegisterPSClsid"); - - hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok_ole_success(hr, "CreateStreamOnHGlobal"); - - hr = CoMarshalInterface(stream, &IID_IWineTest, &Test_Unknown, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok(hr == E_NOTIMPL, "CoMarshalInterface should have returned E_NOTIMPL instead of 0x%08x\n", hr); - IStream_Release(stream); - - hr = CoRevokeClassObject(dwRegistrationKey); - ok_ole_success(hr, "CoRevokeClassObject"); - - CoUninitialize(); - - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - hr = CoGetPSClsid(&IID_IWineTest, &clsid); - ok(hr == REGDB_E_IIDNOTREG, "CoGetPSClsid should have returned REGDB_E_IIDNOTREG instead of 0x%08x\n", hr); - - CoUninitialize(); -} - -static void test_CoGetPSClsid(void) -{ - HRESULT hr; - CLSID clsid; - - hr = CoGetPSClsid(&IID_IClassFactory, &clsid); - ok(hr == CO_E_NOTINITIALIZED, - "CoGetPSClsid should have returned CO_E_NOTINITIALIZED instead of 0x%08x\n", - hr); - - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - hr = CoGetPSClsid(&IID_IClassFactory, &clsid); - ok_ole_success(hr, "CoGetPSClsid"); - - hr = CoGetPSClsid(&IID_IWineTest, &clsid); - ok(hr == REGDB_E_IIDNOTREG, - "CoGetPSClsid for random IID returned 0x%08x instead of REGDB_E_IIDNOTREG\n", - hr); - - hr = CoGetPSClsid(&IID_IClassFactory, NULL); - ok(hr == E_INVALIDARG, - "CoGetPSClsid for null clsid returned 0x%08x instead of E_INVALIDARG\n", - hr); - - CoUninitialize(); -} - -/* basic test, mainly for invalid arguments. see marshal.c for more */ -static void test_CoUnmarshalInterface(void) -{ - IUnknown *pProxy; - IStream *pStream; - HRESULT hr; - - hr = CoUnmarshalInterface(NULL, &IID_IUnknown, (void **)&pProxy); - ok(hr == E_INVALIDARG, "CoUnmarshalInterface should have returned E_INVALIDARG instead of 0x%08x\n", hr); - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, "CreateStreamOnHGlobal"); - - hr = CoUnmarshalInterface(pStream, &IID_IUnknown, (void **)&pProxy); - todo_wine - ok(hr == CO_E_NOTINITIALIZED, "CoUnmarshalInterface should have returned CO_E_NOTINITIALIZED instead of 0x%08x\n", hr); - - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - hr = CoUnmarshalInterface(pStream, &IID_IUnknown, (void **)&pProxy); - ok(hr == STG_E_READFAULT, "CoUnmarshalInterface should have returned STG_E_READFAULT instead of 0x%08x\n", hr); - - CoUninitialize(); - - hr = CoUnmarshalInterface(pStream, &IID_IUnknown, NULL); - ok(hr == E_INVALIDARG, "CoUnmarshalInterface should have returned E_INVALIDARG instead of 0x%08x\n", hr); - - IStream_Release(pStream); -} - -static void test_CoGetInterfaceAndReleaseStream(void) -{ - HRESULT hr; - IUnknown *pUnk; - - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - hr = CoGetInterfaceAndReleaseStream(NULL, &IID_IUnknown, (void**)&pUnk); - ok(hr == E_INVALIDARG, "hr %08x\n", hr); - - CoUninitialize(); -} - -/* basic test, mainly for invalid arguments. see marshal.c for more */ -static void test_CoMarshalInterface(void) -{ - IStream *pStream; - HRESULT hr; - static const LARGE_INTEGER llZero; - - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, "CreateStreamOnHGlobal"); - - hr = CoMarshalInterface(pStream, &IID_IUnknown, NULL, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok(hr == E_INVALIDARG, "CoMarshalInterface should have returned E_INVALIDARG instead of 0x%08x\n", hr); - - hr = CoMarshalInterface(NULL, &IID_IUnknown, (IUnknown *)&Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok(hr == E_INVALIDARG, "CoMarshalInterface should have returned E_INVALIDARG instead of 0x%08x\n", hr); - - hr = CoMarshalInterface(pStream, &IID_IUnknown, (IUnknown *)&Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok_ole_success(hr, "CoMarshalInterface"); - - /* stream not rewound */ - hr = CoReleaseMarshalData(pStream); - ok(hr == STG_E_READFAULT, "CoReleaseMarshalData should have returned STG_E_READFAULT instead of 0x%08x\n", hr); - - hr = IStream_Seek(pStream, llZero, STREAM_SEEK_SET, NULL); - ok_ole_success(hr, "IStream_Seek"); - - hr = CoReleaseMarshalData(pStream); - ok_ole_success(hr, "CoReleaseMarshalData"); - - IStream_Release(pStream); - - CoUninitialize(); -} - -static void test_CoMarshalInterThreadInterfaceInStream(void) -{ - IStream *pStream; - HRESULT hr; - IClassFactory *pProxy; - - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - cLocks = 0; - - hr = CoMarshalInterThreadInterfaceInStream(&IID_IUnknown, (IUnknown *)&Test_ClassFactory, NULL); - ok(hr == E_INVALIDARG, "CoMarshalInterThreadInterfaceInStream should have returned E_INVALIDARG instead of 0x%08x\n", hr); - - hr = CoMarshalInterThreadInterfaceInStream(&IID_IUnknown, NULL, &pStream); - ok(hr == E_INVALIDARG, "CoMarshalInterThreadInterfaceInStream should have returned E_INVALIDARG instead of 0x%08x\n", hr); - - ok_no_locks(); - - hr = CoMarshalInterThreadInterfaceInStream(&IID_IUnknown, (IUnknown *)&Test_ClassFactory, &pStream); - ok_ole_success(hr, "CoMarshalInterThreadInterfaceInStream"); - - ok_more_than_one_lock(); - - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy); - ok_ole_success(hr, "CoUnmarshalInterface"); - - IClassFactory_Release(pProxy); - IStream_Release(pStream); - - ok_no_locks(); - - CoUninitialize(); -} - -static void test_CoRegisterClassObject(void) -{ - DWORD cookie; - HRESULT hr; - IClassFactory *pcf; - - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - /* CLSCTX_INPROC_SERVER */ - hr = CoRegisterClassObject(&CLSID_WineOOPTest, (IUnknown *)&Test_ClassFactory, - CLSCTX_INPROC_SERVER, REGCLS_SINGLEUSE, &cookie); - ok_ole_success(hr, "CoRegisterClassObject"); - hr = CoRevokeClassObject(cookie); - ok_ole_success(hr, "CoRevokeClassObject"); - - hr = CoRegisterClassObject(&CLSID_WineOOPTest, (IUnknown *)&Test_ClassFactory, - CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &cookie); - ok_ole_success(hr, "CoRegisterClassObject"); - hr = CoRevokeClassObject(cookie); - ok_ole_success(hr, "CoRevokeClassObject"); - - hr = CoRegisterClassObject(&CLSID_WineOOPTest, (IUnknown *)&Test_ClassFactory, - CLSCTX_INPROC_SERVER, REGCLS_MULTI_SEPARATE, &cookie); - ok_ole_success(hr, "CoRegisterClassObject"); - hr = CoRevokeClassObject(cookie); - ok_ole_success(hr, "CoRevokeClassObject"); - - /* CLSCTX_LOCAL_SERVER */ - hr = CoRegisterClassObject(&CLSID_WineOOPTest, (IUnknown *)&Test_ClassFactory, - CLSCTX_LOCAL_SERVER, REGCLS_SINGLEUSE, &cookie); - ok_ole_success(hr, "CoRegisterClassObject"); - hr = CoRevokeClassObject(cookie); - ok_ole_success(hr, "CoRevokeClassObject"); - - hr = CoRegisterClassObject(&CLSID_WineOOPTest, (IUnknown *)&Test_ClassFactory, - CLSCTX_LOCAL_SERVER, REGCLS_MULTIPLEUSE, &cookie); - ok_ole_success(hr, "CoRegisterClassObject"); - hr = CoRevokeClassObject(cookie); - ok_ole_success(hr, "CoRevokeClassObject"); - - hr = CoRegisterClassObject(&CLSID_WineOOPTest, (IUnknown *)&Test_ClassFactory, - CLSCTX_LOCAL_SERVER, REGCLS_MULTI_SEPARATE, &cookie); - ok_ole_success(hr, "CoRegisterClassObject"); - hr = CoRevokeClassObject(cookie); - ok_ole_success(hr, "CoRevokeClassObject"); - - /* CLSCTX_INPROC_SERVER|CLSCTX_LOCAL_SERVER */ - hr = CoRegisterClassObject(&CLSID_WineOOPTest, (IUnknown *)&Test_ClassFactory, - CLSCTX_INPROC_SERVER|CLSCTX_LOCAL_SERVER, REGCLS_SINGLEUSE, &cookie); - ok_ole_success(hr, "CoRegisterClassObject"); - hr = CoRevokeClassObject(cookie); - ok_ole_success(hr, "CoRevokeClassObject"); - - /* test whether an object that doesn't support IClassFactory can be - * registered for CLSCTX_LOCAL_SERVER */ - hr = CoRegisterClassObject(&CLSID_WineOOPTest, &Test_Unknown, - CLSCTX_LOCAL_SERVER, REGCLS_SINGLEUSE, &cookie); - ok_ole_success(hr, "CoRegisterClassObject"); - hr = CoRevokeClassObject(cookie); - ok_ole_success(hr, "CoRevokeClassObject"); - - /* test whether registered class becomes invalid when apartment is destroyed */ - hr = CoRegisterClassObject(&CLSID_WineOOPTest, (IUnknown *)&Test_ClassFactory, - CLSCTX_INPROC_SERVER, REGCLS_SINGLEUSE, &cookie); - ok_ole_success(hr, "CoRegisterClassObject"); - - CoUninitialize(); - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - hr = CoGetClassObject(&CLSID_WineOOPTest, CLSCTX_INPROC_SERVER, NULL, - &IID_IClassFactory, (void **)&pcf); - ok(hr == REGDB_E_CLASSNOTREG, "object registered in an apartment shouldn't accessible after it is destroyed\n"); - - /* crashes with at least win9x DCOM! */ - if (0) - hr = CoRevokeClassObject(cookie); - - CoUninitialize(); -} - -static HRESULT get_class_object(CLSCTX clsctx) -{ - HRESULT hr; - IClassFactory *pcf; - - hr = CoGetClassObject(&CLSID_WineOOPTest, clsctx, NULL, &IID_IClassFactory, - (void **)&pcf); - - if (SUCCEEDED(hr)) - IClassFactory_Release(pcf); - - return hr; -} - -static DWORD CALLBACK get_class_object_thread(LPVOID pv) -{ - CLSCTX clsctx = (CLSCTX)(DWORD_PTR)pv; - HRESULT hr; - - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - hr = get_class_object(clsctx); - - CoUninitialize(); - - return hr; -} - -static DWORD CALLBACK get_class_object_proxy_thread(LPVOID pv) -{ - CLSCTX clsctx = (CLSCTX)(DWORD_PTR)pv; - HRESULT hr; - IClassFactory *pcf; - IMultiQI *pMQI; - - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - hr = CoGetClassObject(&CLSID_WineOOPTest, clsctx, NULL, &IID_IClassFactory, - (void **)&pcf); - - if (SUCCEEDED(hr)) - { - hr = IClassFactory_QueryInterface(pcf, &IID_IMultiQI, (void **)&pMQI); - if (SUCCEEDED(hr)) - IMultiQI_Release(pMQI); - IClassFactory_Release(pcf); - } - - CoUninitialize(); - - return hr; -} - -static DWORD CALLBACK register_class_object_thread(LPVOID pv) -{ - HRESULT hr; - DWORD cookie; - - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - hr = CoRegisterClassObject(&CLSID_WineOOPTest, (IUnknown *)&Test_ClassFactory, - CLSCTX_INPROC_SERVER, REGCLS_SINGLEUSE, &cookie); - - CoUninitialize(); - - return hr; -} - -static DWORD CALLBACK revoke_class_object_thread(LPVOID pv) -{ - DWORD cookie = (DWORD_PTR)pv; - HRESULT hr; - - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - hr = CoRevokeClassObject(cookie); - - CoUninitialize(); - - return hr; -} - -static void test_registered_object_thread_affinity(void) -{ - HRESULT hr; - DWORD cookie; - HANDLE thread; - DWORD tid; - DWORD exitcode; - - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - /* CLSCTX_INPROC_SERVER */ - - hr = CoRegisterClassObject(&CLSID_WineOOPTest, (IUnknown *)&Test_ClassFactory, - CLSCTX_INPROC_SERVER, REGCLS_SINGLEUSE, &cookie); - ok_ole_success(hr, "CoRegisterClassObject"); - - thread = CreateThread(NULL, 0, get_class_object_thread, (LPVOID)CLSCTX_INPROC_SERVER, 0, &tid); - ok(thread != NULL, "CreateThread failed with error %d\n", GetLastError()); - ok( !WaitForSingleObject(thread, 10000), "wait timed out\n" ); - GetExitCodeThread(thread, &exitcode); - hr = exitcode; - ok(hr == REGDB_E_CLASSNOTREG, "CoGetClassObject on inproc object " - "registered in different thread should return REGDB_E_CLASSNOTREG " - "instead of 0x%08x\n", hr); - - hr = get_class_object(CLSCTX_INPROC_SERVER); - ok(hr == S_OK, "CoGetClassObject on inproc object registered in same " - "thread should return S_OK instead of 0x%08x\n", hr); - - thread = CreateThread(NULL, 0, register_class_object_thread, NULL, 0, &tid); - ok(thread != NULL, "CreateThread failed with error %d\n", GetLastError()); - ok ( !WaitForSingleObject(thread, 10000), "wait timed out\n" ); - GetExitCodeThread(thread, &exitcode); - hr = exitcode; - ok(hr == S_OK, "CoRegisterClassObject with same CLSID but in different thread should return S_OK instead of 0x%08x\n", hr); - - hr = CoRevokeClassObject(cookie); - ok_ole_success(hr, "CoRevokeClassObject"); - - /* CLSCTX_LOCAL_SERVER */ - - hr = CoRegisterClassObject(&CLSID_WineOOPTest, (IUnknown *)&Test_ClassFactory, - CLSCTX_LOCAL_SERVER, REGCLS_MULTIPLEUSE, &cookie); - ok_ole_success(hr, "CoRegisterClassObject"); - - thread = CreateThread(NULL, 0, get_class_object_proxy_thread, (LPVOID)CLSCTX_LOCAL_SERVER, 0, &tid); - ok(thread != NULL, "CreateThread failed with error %d\n", GetLastError()); - while (MsgWaitForMultipleObjects(1, &thread, FALSE, 10000, QS_ALLINPUT) == WAIT_OBJECT_0 + 1) - { - MSG msg; - while (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) - { - TranslateMessage(&msg); - DispatchMessageA(&msg); - } - } - GetExitCodeThread(thread, &exitcode); - hr = exitcode; - ok(hr == S_OK, "CoGetClassObject on local server object " - "registered in different thread should return S_OK " - "instead of 0x%08x\n", hr); - - hr = get_class_object(CLSCTX_LOCAL_SERVER); - ok(hr == S_OK, "CoGetClassObject on local server object registered in same " - "thread should return S_OK instead of 0x%08x\n", hr); - - thread = CreateThread(NULL, 0, revoke_class_object_thread, (LPVOID)(DWORD_PTR)cookie, 0, &tid); - ok(thread != NULL, "CreateThread failed with error %d\n", GetLastError()); - ok( !WaitForSingleObject(thread, 10000), "wait timed out\n" ); - GetExitCodeThread(thread, &exitcode); - hr = exitcode; - ok(hr == RPC_E_WRONG_THREAD, "CoRevokeClassObject called from different " - "thread to where registered should return RPC_E_WRONG_THREAD instead of 0x%08x\n", hr); - - thread = CreateThread(NULL, 0, register_class_object_thread, NULL, 0, &tid); - ok(thread != NULL, "CreateThread failed with error %d\n", GetLastError()); - ok( !WaitForSingleObject(thread, 10000), "wait timed out\n" ); - GetExitCodeThread(thread, &exitcode); - hr = exitcode; - ok(hr == S_OK, "CoRegisterClassObject with same CLSID but in different " - "thread should return S_OK instead of 0x%08x\n", hr); - - hr = CoRevokeClassObject(cookie); - ok_ole_success(hr, "CoRevokeClassObject"); - - CoUninitialize(); -} - -static DWORD CALLBACK free_libraries_thread(LPVOID p) -{ - CoFreeUnusedLibraries(); - return 0; -} - -static inline BOOL is_module_loaded(const char *module) -{ - return GetModuleHandle(module) ? TRUE : FALSE; -} - -static void test_CoFreeUnusedLibraries(void) -{ - HRESULT hr; - IUnknown *pUnk; - DWORD tid; - HANDLE thread; - - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - ok(!is_module_loaded("urlmon.dll"), "urlmon.dll shouldn't be loaded\n"); - - hr = CoCreateInstance(&CLSID_FileProtocol, NULL, CLSCTX_INPROC_SERVER, &IID_IInternetProtocol, (void **)&pUnk); - if (hr == REGDB_E_CLASSNOTREG) - { - skip("IE not installed so can't run CoFreeUnusedLibraries test\n"); - CoUninitialize(); - return; - } - ok_ole_success(hr, "CoCreateInstance"); - - ok(is_module_loaded("urlmon.dll"), "urlmon.dll should be loaded\n"); - - ok(pUnk != NULL || - broken(pUnk == NULL), /* win9x */ - "Expected a valid pointer\n"); - if (pUnk) - IUnknown_Release(pUnk); - - ok(is_module_loaded("urlmon.dll"), "urlmon.dll should be loaded\n"); - - thread = CreateThread(NULL, 0, free_libraries_thread, NULL, 0, &tid); - ok( !WaitForSingleObject(thread, 10000), "wait timed out\n" ); - CloseHandle(thread); - - ok(is_module_loaded("urlmon.dll"), "urlmon.dll should be loaded\n"); - - CoFreeUnusedLibraries(); - - ok(!is_module_loaded("urlmon.dll"), "urlmon.dll shouldn't be loaded\n"); - - CoUninitialize(); -} - -static void test_CoGetObjectContext(void) -{ - HRESULT hr; - ULONG refs; - IComThreadingInfo *pComThreadingInfo; - IContextCallback *pContextCallback; - IObjContext *pObjContext; - APTTYPE apttype; - THDTYPE thdtype; - struct info info; - HANDLE thread; - DWORD tid, exitcode; - - if (!pCoGetObjectContext) - { - skip("CoGetObjectContext not present\n"); - return; - } - - hr = pCoGetObjectContext(&IID_IComThreadingInfo, (void **)&pComThreadingInfo); - ok(hr == CO_E_NOTINITIALIZED, "CoGetObjectContext should have returned CO_E_NOTINITIALIZED instead of 0x%08x\n", hr); - ok(pComThreadingInfo == NULL, "pComThreadingInfo should have been set to NULL\n"); - - /* show that COM doesn't have to be initialized for multi-threaded apartments if another - thread has already done so */ - - info.wait = CreateEvent(NULL, TRUE, FALSE, NULL); - ok(info.wait != NULL, "CreateEvent failed with error %d\n", GetLastError()); - - info.stop = CreateEvent(NULL, TRUE, FALSE, NULL); - ok(info.stop != NULL, "CreateEvent failed with error %d\n", GetLastError()); - - thread = CreateThread(NULL, 0, ole_initialize_thread, &info, 0, &tid); - ok(thread != NULL, "CreateThread failed with error %d\n", GetLastError()); - - ok( !WaitForSingleObject(info.wait, 10000), "wait timed out\n" ); - - pComThreadingInfo = NULL; - hr = pCoGetObjectContext(&IID_IComThreadingInfo, (void **)&pComThreadingInfo); - ok(hr == S_OK, "Expected S_OK, got 0x%08x\n", hr); - IComThreadingInfo_Release(pComThreadingInfo); - - SetEvent(info.stop); - ok( !WaitForSingleObject(thread, 10000), "wait timed out\n" ); - - GetExitCodeThread(thread, &exitcode); - hr = exitcode; - ok(hr == S_OK, "thread should have returned S_OK instead of 0x%08x\n", hr); - - CloseHandle(thread); - CloseHandle(info.wait); - CloseHandle(info.stop); - - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - hr = pCoGetObjectContext(&IID_IComThreadingInfo, (void **)&pComThreadingInfo); - ok_ole_success(hr, "CoGetObjectContext"); - - hr = IComThreadingInfo_GetCurrentApartmentType(pComThreadingInfo, &apttype); - ok_ole_success(hr, "IComThreadingInfo_GetCurrentApartmentType"); - ok(apttype == APTTYPE_MAINSTA, "apartment type should be APTTYPE_MAINSTA instead of %d\n", apttype); - - hr = IComThreadingInfo_GetCurrentThreadType(pComThreadingInfo, &thdtype); - ok_ole_success(hr, "IComThreadingInfo_GetCurrentThreadType"); - ok(thdtype == THDTYPE_PROCESSMESSAGES, "thread type should be THDTYPE_PROCESSMESSAGES instead of %d\n", thdtype); - - refs = IComThreadingInfo_Release(pComThreadingInfo); - ok(refs == 0, "pComThreadingInfo should have 0 refs instead of %d refs\n", refs); - - hr = pCoGetObjectContext(&IID_IContextCallback, (void **)&pContextCallback); - ok_ole_success(hr, "CoGetObjectContext(ContextCallback)"); - - if (hr == S_OK) - { - refs = IContextCallback_Release(pContextCallback); - ok(refs == 0, "pContextCallback should have 0 refs instead of %d refs\n", refs); - } - - CoUninitialize(); - - pCoInitializeEx(NULL, COINIT_MULTITHREADED); - - hr = pCoGetObjectContext(&IID_IComThreadingInfo, (void **)&pComThreadingInfo); - ok_ole_success(hr, "CoGetObjectContext"); - - hr = IComThreadingInfo_GetCurrentApartmentType(pComThreadingInfo, &apttype); - ok_ole_success(hr, "IComThreadingInfo_GetCurrentApartmentType"); - ok(apttype == APTTYPE_MTA, "apartment type should be APTTYPE_MTA instead of %d\n", apttype); - - hr = IComThreadingInfo_GetCurrentThreadType(pComThreadingInfo, &thdtype); - ok_ole_success(hr, "IComThreadingInfo_GetCurrentThreadType"); - ok(thdtype == THDTYPE_BLOCKMESSAGES, "thread type should be THDTYPE_BLOCKMESSAGES instead of %d\n", thdtype); - - refs = IComThreadingInfo_Release(pComThreadingInfo); - ok(refs == 0, "pComThreadingInfo should have 0 refs instead of %d refs\n", refs); - - hr = pCoGetObjectContext(&IID_IContextCallback, (void **)&pContextCallback); - ok_ole_success(hr, "CoGetObjectContext(ContextCallback)"); - - if (hr == S_OK) - { - refs = IContextCallback_Release(pContextCallback); - ok(refs == 0, "pContextCallback should have 0 refs instead of %d refs\n", refs); - } - - hr = pCoGetObjectContext(&IID_IObjContext, (void **)&pObjContext); - ok_ole_success(hr, "CoGetObjectContext"); - - refs = IObjContext_Release(pObjContext); - ok(refs == 0, "pObjContext should have 0 refs instead of %d refs\n", refs); - - CoUninitialize(); -} - -typedef struct { - const IUnknownVtbl *lpVtbl; - LONG refs; -} Test_CallContext; - -static HRESULT WINAPI Test_CallContext_QueryInterface( - IUnknown *iface, - REFIID riid, - LPVOID *ppvObj) -{ - if (ppvObj == NULL) return E_POINTER; - - if (IsEqualGUID(riid, &IID_IUnknown)) - { - *ppvObj = iface; - IUnknown_AddRef(iface); - return S_OK; - } - - *ppvObj = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI Test_CallContext_AddRef(IUnknown *iface) -{ - Test_CallContext *This = (Test_CallContext*)iface; - return InterlockedIncrement(&This->refs); -} - -static ULONG WINAPI Test_CallContext_Release(IUnknown *iface) -{ - Test_CallContext *This = (Test_CallContext*)iface; - ULONG refs = InterlockedDecrement(&This->refs); - if (!refs) - HeapFree(GetProcessHeap(), 0, This); - return refs; -} - -static const IUnknownVtbl TestCallContext_Vtbl = -{ - Test_CallContext_QueryInterface, - Test_CallContext_AddRef, - Test_CallContext_Release -}; - -static void test_CoGetCallContext(void) -{ - HRESULT hr; - ULONG refs; - IUnknown *pUnk; - IUnknown *test_object; - - if (!pCoSwitchCallContext) - { - skip("CoSwitchCallContext not present\n"); - return; - } - - CoInitialize(NULL); - - test_object = HeapAlloc(GetProcessHeap(), 0, sizeof(Test_CallContext)); - ((Test_CallContext*)test_object)->lpVtbl = &TestCallContext_Vtbl; - ((Test_CallContext*)test_object)->refs = 1; - - hr = CoGetCallContext(&IID_IUnknown, (void**)&pUnk); - ok(hr == RPC_E_CALL_COMPLETE, "Expected RPC_E_CALL_COMPLETE, got 0x%08x\n", hr); - - pUnk = (IUnknown*)0xdeadbeef; - hr = pCoSwitchCallContext(test_object, &pUnk); - ok_ole_success(hr, "CoSwitchCallContext"); - ok(pUnk == NULL, "expected NULL, got %p\n", pUnk); - refs = IUnknown_AddRef(test_object); - ok(refs == 2, "Expected refcount 2, got %d\n", refs); - IUnknown_Release(test_object); - - pUnk = (IUnknown*)0xdeadbeef; - hr = CoGetCallContext(&IID_IUnknown, (void**)&pUnk); - ok_ole_success(hr, "CoGetCallContext"); - ok(pUnk == test_object, "expected %p, got %p\n", test_object, pUnk); - refs = IUnknown_AddRef(test_object); - ok(refs == 3, "Expected refcount 3, got %d\n", refs); - IUnknown_Release(test_object); - IUnknown_Release(pUnk); - - pUnk = (IUnknown*)0xdeadbeef; - hr = pCoSwitchCallContext(NULL, &pUnk); - ok_ole_success(hr, "CoSwitchCallContext"); - ok(pUnk == test_object, "expected %p, got %p\n", test_object, pUnk); - refs = IUnknown_AddRef(test_object); - ok(refs == 2, "Expected refcount 2, got %d\n", refs); - IUnknown_Release(test_object); - - hr = CoGetCallContext(&IID_IUnknown, (void**)&pUnk); - ok(hr == RPC_E_CALL_COMPLETE, "Expected RPC_E_CALL_COMPLETE, got 0x%08x\n", hr); - - IUnknown_Release(test_object); - - CoUninitialize(); -} - -static void test_CoGetContextToken(void) -{ - HRESULT hr; - ULONG refs; - ULONG_PTR token; - IObjContext *ctx; - struct info info; - HANDLE thread; - DWORD tid, exitcode; - - if (!pCoGetContextToken) - { - win_skip("CoGetContextToken not present\n"); - return; - } - - token = 0xdeadbeef; - hr = pCoGetContextToken(&token); - ok(hr == CO_E_NOTINITIALIZED, "Expected CO_E_NOTINITIALIZED, got 0x%08x\n", hr); - ok(token == 0xdeadbeef, "Expected 0, got 0x%lx\n", token); - - /* show that COM doesn't have to be initialized for multi-threaded apartments if another - thread has already done so */ - - info.wait = CreateEvent(NULL, TRUE, FALSE, NULL); - ok(info.wait != NULL, "CreateEvent failed with error %d\n", GetLastError()); - - info.stop = CreateEvent(NULL, TRUE, FALSE, NULL); - ok(info.stop != NULL, "CreateEvent failed with error %d\n", GetLastError()); - - thread = CreateThread(NULL, 0, ole_initialize_thread, &info, 0, &tid); - ok(thread != NULL, "CreateThread failed with error %d\n", GetLastError()); - - ok( !WaitForSingleObject(info.wait, 10000), "wait timed out\n" ); - - token = 0; - hr = pCoGetContextToken(&token); - ok(hr == S_OK, "Expected S_OK, got 0x%08x\n", hr); - - SetEvent(info.stop); - ok( !WaitForSingleObject(thread, 10000), "wait timed out\n" ); - - GetExitCodeThread(thread, &exitcode); - hr = exitcode; - ok(hr == S_OK, "thread should have returned S_OK instead of 0x%08x\n", hr); - - CloseHandle(thread); - CloseHandle(info.wait); - CloseHandle(info.stop); - - CoInitialize(NULL); - - hr = pCoGetContextToken(NULL); - ok(hr == E_POINTER, "Expected E_POINTER, got 0x%08x\n", hr); - - token = 0; - hr = pCoGetContextToken(&token); - ok(hr == S_OK, "Expected S_OK, got 0x%08x\n", hr); - ok(token, "Expected token != 0\n"); - - refs = IUnknown_AddRef((IUnknown *)token); - todo_wine ok(refs == 1, "Expected 1, got %u\n", refs); - - hr = pCoGetObjectContext(&IID_IObjContext, (void **)&ctx); - ok(hr == S_OK, "Expected S_OK, got 0x%08x\n", hr); - todo_wine ok(ctx == (IObjContext *)token, "Expected interface pointers to be the same\n"); - - refs = IUnknown_AddRef((IUnknown *)ctx); - todo_wine ok(refs == 3, "Expected 3, got %u\n", refs); - - refs = IUnknown_Release((IUnknown *)ctx); - todo_wine ok(refs == 2, "Expected 2, got %u\n", refs); - - refs = IUnknown_Release((IUnknown *)token); - ok(refs == 1, "Expected 1, got %u\n", refs); - - /* CoGetContextToken does not add a reference */ - token = 0; - hr = pCoGetContextToken(&token); - ok(hr == S_OK, "Expected S_OK, got 0x%08x\n", hr); - ok(token, "Expected token != 0\n"); - todo_wine ok(ctx == (IObjContext *)token, "Expected interface pointers to be the same\n"); - - refs = IUnknown_AddRef((IUnknown *)ctx); - ok(refs == 2, "Expected 1, got %u\n", refs); - - refs = IUnknown_Release((IUnknown *)ctx); - ok(refs == 1, "Expected 0, got %u\n", refs); - - refs = IUnknown_Release((IUnknown *)ctx); - ok(refs == 0, "Expected 0, got %u\n", refs); - - CoUninitialize(); -} - -static void test_CoGetTreatAsClass(void) -{ - HRESULT hr; - CLSID out; - static GUID deadbeef = {0xdeadbeef,0xdead,0xbeef,{0xde,0xad,0xbe,0xef,0xde,0xad,0xbe,0xef}}; - - if (!pCoGetTreatAsClass) - { - win_skip("CoGetTreatAsClass not present\n"); - return; - } - hr = pCoGetTreatAsClass(&deadbeef,&out); - ok (hr == S_FALSE, "expected S_FALSE got %x\n",hr); - ok (IsEqualGUID(&out,&deadbeef), "expected to get same clsid back\n"); -} - -static void test_CoInitializeEx(void) -{ - HRESULT hr; - - hr = pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - ok(hr == S_OK, "CoInitializeEx failed with error 0x%08x\n", hr); - - /* Calling OleInitialize for the first time should yield S_OK even with - * apartment already initialized by previous CoInitialize(Ex) calls. */ - hr = OleInitialize(NULL); - ok(hr == S_OK, "OleInitialize failed with error 0x%08x\n", hr); - - /* Subsequent calls to OleInitialize should return S_FALSE */ - hr = OleInitialize(NULL); - ok(hr == S_FALSE, "Expected S_FALSE, hr = 0x%08x\n", hr); - - /* Cleanup */ - CoUninitialize(); - OleUninitialize(); -} - -START_TEST(compobj) -{ - HMODULE hOle32 = GetModuleHandle("ole32"); - pCoGetObjectContext = (void*)GetProcAddress(hOle32, "CoGetObjectContext"); - pCoSwitchCallContext = (void*)GetProcAddress(hOle32, "CoSwitchCallContext"); - pCoGetTreatAsClass = (void*)GetProcAddress(hOle32,"CoGetTreatAsClass"); - pCoGetContextToken = (void*)GetProcAddress(hOle32, "CoGetContextToken"); - if (!(pCoInitializeEx = (void*)GetProcAddress(hOle32, "CoInitializeEx"))) - { - trace("You need DCOM95 installed to run this test\n"); - return; - } - - test_ProgIDFromCLSID(); - test_CLSIDFromProgID(); - test_CLSIDFromString(); - test_StringFromGUID2(); - test_CoCreateInstance(); - test_ole_menu(); - test_CoGetClassObject(); - test_CoRegisterMessageFilter(); - test_CoRegisterPSClsid(); - test_CoGetPSClsid(); - test_CoUnmarshalInterface(); - test_CoGetInterfaceAndReleaseStream(); - test_CoMarshalInterface(); - test_CoMarshalInterThreadInterfaceInStream(); - test_CoRegisterClassObject(); - test_registered_object_thread_affinity(); - test_CoFreeUnusedLibraries(); - test_CoGetObjectContext(); - test_CoGetCallContext(); - test_CoGetContextToken(); - test_CoGetTreatAsClass(); - test_CoInitializeEx(); -} diff --git a/rostests/winetests/ole32/defaulthandler.c b/rostests/winetests/ole32/defaulthandler.c deleted file mode 100644 index a6469b709e5..00000000000 --- a/rostests/winetests/ole32/defaulthandler.c +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Default Handler Tests - * - * Copyright 2008 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 - */ - -#define COBJMACROS -#define CONST_VTABLE - -#include - -#include "windef.h" -#include "winbase.h" -#include "objbase.h" - -#include "wine/test.h" - - -static HRESULT create_storage(IStorage **stg) -{ - HRESULT hr; - ILockBytes *lock_bytes; - - hr = CreateILockBytesOnHGlobal(NULL, TRUE, &lock_bytes); - if(SUCCEEDED(hr)) - { - hr = StgCreateDocfileOnILockBytes(lock_bytes, - STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, stg); - ILockBytes_Release(lock_bytes); - } - return hr; -} - -typedef struct -{ - DWORD version; - DWORD flags; - DWORD link_update_opt; - DWORD res; - DWORD moniker_size; -} ole_stream_header_t; - -static void test_olestream(void) -{ - HRESULT hr; - const CLSID non_existent_class = {0xa5f1772f, 0x3772, 0x490f, {0x9e, 0xc6, 0x77, 0x13, 0xe8, 0xb3, 0x4b, 0x5d}}; - IOleObject *ole_obj; - IPersistStorage *persist; - IStorage *stg; - IStream *stm; - static const WCHAR olestream[] = {1,'O','l','e',0}; - ULONG read; - ole_stream_header_t header; - - hr = create_storage(&stg); - ok(hr == S_OK, "got %08x\n", hr); - - hr = IStorage_OpenStream(stg, olestream, NULL, STGM_SHARE_EXCLUSIVE | STGM_READ, 0, &stm); - ok(hr == STG_E_FILENOTFOUND, "got %08x\n", hr); - - hr = OleCreateDefaultHandler(&non_existent_class, 0, &IID_IOleObject, (void**)&ole_obj); - ok(hr == S_OK, "got %08x\n", hr); - - hr = IOleObject_QueryInterface(ole_obj, &IID_IPersistStorage, (void**)&persist); - ok(hr == S_OK, "got %08x\n", hr); - - hr = IPersistStorage_InitNew(persist, stg); - ok(hr == S_OK, "got %08x\n", hr); - - hr = IStorage_OpenStream(stg, olestream, NULL, STGM_SHARE_EXCLUSIVE | STGM_READ, 0, &stm); - ok(hr == S_OK, "got %08x\n", hr); - hr = IStream_Read(stm, &header, sizeof(header), &read); - ok(hr == S_OK, "got %08x\n", hr); - ok(read == sizeof(header), "read %d\n", read); - ok(header.version == 0x02000001, "got version %08x\n", header.version); - ok(header.flags == 0x0, "got flags %08x\n", header.flags); - ok(header.link_update_opt == 0x0, "got link update option %08x\n", header.link_update_opt); - ok(header.res == 0x0, "got reserved %08x\n", header.res); - ok(header.moniker_size == 0x0, "got moniker size %08x\n", header.moniker_size); - - IStream_Release(stm); - - IPersistStorage_Release(persist); - IOleObject_Release(ole_obj); - - IStorage_Release(stg); -} - -START_TEST(defaulthandler) -{ - OleInitialize(NULL); - - test_olestream(); - - OleUninitialize(); -} diff --git a/rostests/winetests/ole32/dragdrop.c b/rostests/winetests/ole32/dragdrop.c deleted file mode 100644 index 18674dd5b09..00000000000 --- a/rostests/winetests/ole32/dragdrop.c +++ /dev/null @@ -1,410 +0,0 @@ -/* - * Drag and Drop Tests - * - * Copyright 2007 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 _WIN32_DCOM -#define COBJMACROS -#define CONST_VTABLE - -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "objbase.h" - -#include "wine/test.h" - -static int droptarget_refs; - -/* helper macros to make tests a bit leaner */ -#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr) - -static HRESULT WINAPI DropTarget_QueryInterface(IDropTarget* iface, REFIID riid, - void** ppvObject) -{ - trace("DropTarget_QueryInterface\n"); - if (IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IDropTarget)) - { - IUnknown_AddRef(iface); - *ppvObject = iface; - return S_OK; - } - *ppvObject = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI DropTarget_AddRef(IDropTarget* iface) -{ - droptarget_refs++; - return droptarget_refs; -} - -static ULONG WINAPI DropTarget_Release(IDropTarget* iface) -{ - droptarget_refs--; - return droptarget_refs; -} - -static HRESULT WINAPI DropTarget_DragEnter(IDropTarget* iface, - IDataObject* pDataObj, - DWORD grfKeyState, POINTL pt, - DWORD* pdwEffect) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI DropTarget_DragOver(IDropTarget* iface, - DWORD grfKeyState, - POINTL pt, - DWORD* pdwEffect) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI DropTarget_DragLeave(IDropTarget* iface) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI DropTarget_Drop(IDropTarget* iface, - IDataObject* pDataObj, DWORD grfKeyState, - POINTL pt, DWORD* pdwEffect) -{ - return E_NOTIMPL; -} - -static const IDropTargetVtbl DropTarget_VTbl = -{ - DropTarget_QueryInterface, - DropTarget_AddRef, - DropTarget_Release, - DropTarget_DragEnter, - DropTarget_DragOver, - DropTarget_DragLeave, - DropTarget_Drop -}; - -static IDropTarget DropTarget = { &DropTarget_VTbl }; - -/** stub IDropSource **/ -static HRESULT WINAPI DropSource_QueryInterface(IDropSource *iface, REFIID riid, void **ppObj) -{ - if (IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IDropSource)) - { - *ppObj = iface; - IDropSource_AddRef(iface); - return S_OK; - } - return E_NOINTERFACE; -} - -static ULONG WINAPI DropSource_AddRef(IDropSource *iface) -{ - return 2; -} - -static ULONG WINAPI DropSource_Release(IDropSource *iface) -{ - return 1; -} - -static HRESULT WINAPI DropSource_QueryContinueDrag( - IDropSource *iface, - BOOL fEscapePressed, - DWORD grfKeyState) -{ - /* always drop */ - return DRAGDROP_S_DROP; -} - -static HRESULT WINAPI DropSource_GiveFeedback( - IDropSource *iface, - DWORD dwEffect) -{ - return DRAGDROP_S_USEDEFAULTCURSORS; -} - -static const IDropSourceVtbl dropsource_vtbl = { - DropSource_QueryInterface, - DropSource_AddRef, - DropSource_Release, - DropSource_QueryContinueDrag, - DropSource_GiveFeedback -}; - -static IDropSource DropSource = { &dropsource_vtbl }; - -/** IDataObject stub **/ -static HRESULT WINAPI DataObject_QueryInterface( - IDataObject *iface, - REFIID riid, - void **pObj) -{ - if (IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IDataObject)) - { - *pObj = iface; - IDataObject_AddRef(iface); - return S_OK; - } - return E_NOINTERFACE; -} - -static ULONG WINAPI DataObject_AddRef(IDataObject *iface) -{ - return 2; -} - -static ULONG WINAPI DataObject_Release(IDataObject *iface) -{ - return 1; -} - -static HRESULT WINAPI DataObject_GetData( - IDataObject *iface, - FORMATETC *pformatetcIn, - STGMEDIUM *pmedium) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI DataObject_GetDataHere( - IDataObject *iface, - FORMATETC *pformatetc, - STGMEDIUM *pmedium) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI DataObject_QueryGetData( - IDataObject *iface, - FORMATETC *pformatetc) -{ - return S_OK; -} - -static HRESULT WINAPI DataObject_GetCanonicalFormatEtc( - IDataObject *iface, - FORMATETC *pformatectIn, - FORMATETC *pformatetcOut) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI DataObject_SetData( - IDataObject *iface, - FORMATETC *pformatetc, - STGMEDIUM *pmedium, - BOOL fRelease) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI DataObject_EnumFormatEtc( - IDataObject *iface, - DWORD dwDirection, - IEnumFORMATETC **ppenumFormatEtc) -{ - return S_OK; -} - -static HRESULT WINAPI DataObject_DAdvise( - IDataObject *iface, - FORMATETC *pformatetc, - DWORD advf, - IAdviseSink *pAdvSink, - DWORD *pdwConnection) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI DataObject_DUnadvise( - IDataObject *iface, - DWORD dwConnection) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI DataObject_EnumDAdvise( - IDataObject *iface, - IEnumSTATDATA **ppenumAdvise) -{ - return E_NOTIMPL; -} - -static const IDataObjectVtbl dataobject_vtbl = { - DataObject_QueryInterface, - DataObject_AddRef, - DataObject_Release, - DataObject_GetData, - DataObject_GetDataHere, - DataObject_QueryGetData, - DataObject_GetCanonicalFormatEtc, - DataObject_SetData, - DataObject_EnumFormatEtc, - DataObject_DAdvise, - DataObject_DUnadvise, - DataObject_EnumDAdvise -}; - -static IDataObject DataObject = { &dataobject_vtbl }; - -static ATOM register_dummy_class(void) -{ - WNDCLASS wc = - { - 0, - DefWindowProc, - 0, - 0, - GetModuleHandle(NULL), - NULL, - LoadCursor(NULL, IDC_ARROW), - (HBRUSH)(COLOR_BTNFACE+1), - NULL, - TEXT("WineOleTestClass"), - }; - - return RegisterClass(&wc); -} - -static void test_Register_Revoke(void) -{ - HANDLE prop; - HRESULT hr; - HWND hwnd; - - hwnd = CreateWindowA("WineOleTestClass", "Test", 0, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, - NULL, NULL, NULL); - - hr = RegisterDragDrop(hwnd, &DropTarget); - ok(hr == E_OUTOFMEMORY || - broken(hr == CO_E_NOTINITIALIZED), /* NT4 */ - "RegisterDragDrop without OLE initialized should have returned E_OUTOFMEMORY instead of 0x%08x\n", hr); - - OleInitialize(NULL); - - hr = RegisterDragDrop(hwnd, NULL); - ok(hr == E_INVALIDARG, "RegisterDragDrop with NULL IDropTarget * should return E_INVALIDARG instead of 0x%08x\n", hr); - - hr = RegisterDragDrop(NULL, &DropTarget); - ok(hr == DRAGDROP_E_INVALIDHWND, "RegisterDragDrop with NULL hwnd should return DRAGDROP_E_INVALIDHWND instead of 0x%08x\n", hr); - - hr = RegisterDragDrop((HWND)0xdeadbeef, &DropTarget); - ok(hr == DRAGDROP_E_INVALIDHWND, "RegisterDragDrop with garbage hwnd should return DRAGDROP_E_INVALIDHWND instead of 0x%08x\n", hr); - - ok(droptarget_refs == 0, "DropTarget refs should be zero not %d\n", droptarget_refs); - hr = RegisterDragDrop(hwnd, &DropTarget); - ok_ole_success(hr, "RegisterDragDrop"); - ok(droptarget_refs >= 1, "DropTarget refs should be at least one\n"); - - prop = GetPropA(hwnd, "OleDropTargetInterface"); - ok(prop == &DropTarget, "expected IDropTarget pointer %p, got %p\n", &DropTarget, prop); - - hr = RegisterDragDrop(hwnd, &DropTarget); - ok(hr == DRAGDROP_E_ALREADYREGISTERED, "RegisterDragDrop with already registered hwnd should return DRAGDROP_E_ALREADYREGISTERED instead of 0x%08x\n", hr); - - ok(droptarget_refs >= 1, "DropTarget refs should be at least one\n"); - OleUninitialize(); - ok(droptarget_refs >= 1, "DropTarget refs should be at least one\n"); - - hr = RevokeDragDrop(hwnd); - ok_ole_success(hr, "RevokeDragDrop"); - ok(droptarget_refs == 0 || - broken(droptarget_refs == 1), /* NT4 */ - "DropTarget refs should be zero not %d\n", droptarget_refs); - - hr = RevokeDragDrop(NULL); - ok(hr == DRAGDROP_E_INVALIDHWND, "RevokeDragDrop with NULL hwnd should return DRAGDROP_E_INVALIDHWND instead of 0x%08x\n", hr); - - DestroyWindow(hwnd); - - /* try to revoke with already destroyed window */ - OleInitialize(NULL); - - hwnd = CreateWindowA("WineOleTestClass", "Test", 0, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, - NULL, NULL, NULL); - - hr = RegisterDragDrop(hwnd, &DropTarget); - ok(hr == S_OK, "got 0x%08x\n", hr); - - DestroyWindow(hwnd); - - hr = RevokeDragDrop(hwnd); - ok(hr == DRAGDROP_E_INVALIDHWND, "got 0x%08x\n", hr); - - OleUninitialize(); -} - -static void test_DoDragDrop(void) -{ - DWORD effect; - HRESULT hr; - HWND hwnd; - - hwnd = CreateWindowA("WineOleTestClass", "Test", 0, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, - NULL, NULL, NULL); - ok(IsWindow(hwnd), "failed to create window\n"); - - hr = OleInitialize(NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); - - hr = RegisterDragDrop(hwnd, &DropTarget); - ok(hr == S_OK, "got 0x%08x\n", hr); - - /* incomplete arguments set */ - hr = DoDragDrop(NULL, NULL, 0, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); - - hr = DoDragDrop(NULL, &DropSource, 0, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); - - hr = DoDragDrop(&DataObject, NULL, 0, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); - - hr = DoDragDrop(NULL, NULL, 0, &effect); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); - - hr = DoDragDrop(&DataObject, &DropSource, 0, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); - - hr = DoDragDrop(NULL, &DropSource, 0, &effect); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); - - hr = DoDragDrop(&DataObject, NULL, 0, &effect); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); - - OleUninitialize(); - - DestroyWindow(hwnd); -} - -START_TEST(dragdrop) -{ - register_dummy_class(); - - test_Register_Revoke(); - test_DoDragDrop(); -} diff --git a/rostests/winetests/ole32/errorinfo.c b/rostests/winetests/ole32/errorinfo.c deleted file mode 100644 index f55d480ef20..00000000000 --- a/rostests/winetests/ole32/errorinfo.c +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Error Info Tests - * - * Copyright 2007 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 COBJMACROS -#define CONST_VTABLE - -#include - -#include "windef.h" -#include "winbase.h" -#include "objbase.h" - -#include "wine/test.h" - -#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr) - -static const CLSID CLSID_WineTest = -{ /* 9474ba1a-258b-490b-bc13-516e9239ace0 */ - 0x9474ba1a, - 0x258b, - 0x490b, - {0xbc, 0x13, 0x51, 0x6e, 0x92, 0x39, 0xac, 0xe0} -}; - -static void test_error_info(void) -{ - HRESULT hr; - ICreateErrorInfo *pCreateErrorInfo; - IErrorInfo *pErrorInfo; - static WCHAR wszDescription[] = {'F','a','i','l','e','d',' ','S','p','r','o','c','k','e','t',0}; - static WCHAR wszHelpFile[] = {'s','p','r','o','c','k','e','t','.','h','l','p',0}; - static WCHAR wszSource[] = {'s','p','r','o','c','k','e','t',0}; - - hr = CreateErrorInfo(&pCreateErrorInfo); - ok_ole_success(hr, "CreateErrorInfo"); - - hr = ICreateErrorInfo_SetDescription(pCreateErrorInfo, NULL); - ok_ole_success(hr, "ICreateErrorInfo_SetDescription"); - - hr = ICreateErrorInfo_SetDescription(pCreateErrorInfo, wszDescription); - ok_ole_success(hr, "ICreateErrorInfo_SetDescription"); - - hr = ICreateErrorInfo_SetGUID(pCreateErrorInfo, &CLSID_WineTest); - ok_ole_success(hr, "ICreateErrorInfo_SetGUID"); - - hr = ICreateErrorInfo_SetHelpContext(pCreateErrorInfo, 0xdeadbeef); - ok_ole_success(hr, "ICreateErrorInfo_SetHelpContext"); - - hr = ICreateErrorInfo_SetHelpFile(pCreateErrorInfo, NULL); - ok_ole_success(hr, "ICreateErrorInfo_SetHelpFile"); - - hr = ICreateErrorInfo_SetHelpFile(pCreateErrorInfo, wszHelpFile); - ok_ole_success(hr, "ICreateErrorInfo_SetHelpFile"); - - hr = ICreateErrorInfo_SetSource(pCreateErrorInfo, NULL); - ok_ole_success(hr, "ICreateErrorInfo_SetSource"); - - hr = ICreateErrorInfo_SetSource(pCreateErrorInfo, wszSource); - ok_ole_success(hr, "ICreateErrorInfo_SetSource"); - - hr = ICreateErrorInfo_QueryInterface(pCreateErrorInfo, &IID_IErrorInfo, (void **)&pErrorInfo); - ok_ole_success(hr, "ICreateErrorInfo_QueryInterface"); - - ICreateErrorInfo_Release(pCreateErrorInfo); - - hr = SetErrorInfo(0, pErrorInfo); - ok_ole_success(hr, "SetErrorInfo"); - - IErrorInfo_Release(pErrorInfo); - pErrorInfo = NULL; - - hr = GetErrorInfo(0, &pErrorInfo); - ok_ole_success(hr, "GetErrorInfo"); - - IErrorInfo_Release(pErrorInfo); - - hr = GetErrorInfo(0, &pErrorInfo); - ok(hr == S_FALSE, "GetErrorInfo should have returned S_FALSE instead of 0x%08x\n", hr); - ok(!pErrorInfo, "pErrorInfo should be set to NULL\n"); - - hr = SetErrorInfo(0, NULL); - ok_ole_success(hr, "SetErrorInfo"); - - hr = GetErrorInfo(0xdeadbeef, &pErrorInfo); - ok(hr == E_INVALIDARG, "GetErrorInfo should have returned E_INVALIDARG instead of 0x%08x\n", hr); - - hr = SetErrorInfo(0xdeadbeef, NULL); - ok(hr == E_INVALIDARG, "SetErrorInfo should have returned E_INVALIDARG instead of 0x%08x\n", hr); -} - -START_TEST(errorinfo) -{ - test_error_info(); -} diff --git a/rostests/winetests/ole32/hglobalstream.c b/rostests/winetests/ole32/hglobalstream.c deleted file mode 100644 index 0810d9fa5d8..00000000000 --- a/rostests/winetests/ole32/hglobalstream.c +++ /dev/null @@ -1,518 +0,0 @@ -/* - * Stream on HGLOBAL Tests - * - * Copyright 2006 Robert Shearman (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 - */ - -#define COBJMACROS - -#include - -#include "windef.h" -#include "winbase.h" -#include "objbase.h" - -#include "wine/test.h" - -#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr) - -static char const * const *expected_method_list; - -#define CHECK_EXPECTED_METHOD(method_name) \ -do { \ - ok(*expected_method_list != NULL, "Extra method %s called\n", method_name); \ - if (*expected_method_list) \ - { \ - ok(!strcmp(*expected_method_list, method_name), "Expected %s to be called instead of %s\n", \ - *expected_method_list, method_name); \ - expected_method_list++; \ - } \ -} while(0) - -static void test_streamonhglobal(IStream *pStream) -{ - const char data[] = "Test String"; - ULARGE_INTEGER ull; - LARGE_INTEGER ll; - char buffer[128]; - ULONG read; - STATSTG statstg; - HRESULT hr; - - ull.QuadPart = sizeof(data); - hr = IStream_SetSize(pStream, ull); - ok_ole_success(hr, "IStream_SetSize"); - - hr = IStream_Write(pStream, data, sizeof(data), NULL); - ok_ole_success(hr, "IStream_Write"); - - ll.QuadPart = 0; - hr = IStream_Seek(pStream, ll, STREAM_SEEK_SET, NULL); - ok_ole_success(hr, "IStream_Seek"); - - /* should return S_OK, not S_FALSE */ - hr = IStream_Read(pStream, buffer, sizeof(buffer), &read); - ok_ole_success(hr, "IStream_Read"); - ok(read == sizeof(data), "IStream_Read returned read %d\n", read); - - /* ignores HighPart */ - ull.u.HighPart = -1; - ull.u.LowPart = 0; - hr = IStream_SetSize(pStream, ull); - ok_ole_success(hr, "IStream_SetSize"); - - /* IStream_Seek -- NULL position argument */ - ll.u.HighPart = 0; - ll.u.LowPart = 0; - hr = IStream_Seek(pStream, ll, STREAM_SEEK_CUR, NULL); - ok_ole_success(hr, "IStream_Seek"); - - /* IStream_Seek -- valid position argument (seek from current position) */ - ull.u.HighPart = 0xCAFECAFE; - ull.u.LowPart = 0xCAFECAFE; - ll.u.HighPart = 0; - ll.u.LowPart = 0; - hr = IStream_Seek(pStream, ll, STREAM_SEEK_CUR, &ull); - ok_ole_success(hr, "IStream_Seek"); - ok(ull.u.LowPart == sizeof(data), "LowPart set to %d\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); - - /* IStream_Seek -- invalid seek argument */ - ull.u.HighPart = 0xCAFECAFE; - ull.u.LowPart = 0xCAFECAFE; - ll.u.HighPart = 0; - ll.u.LowPart = 123; - hr = IStream_Seek(pStream, ll, STREAM_SEEK_END+1, &ull); - ok(hr == STG_E_SEEKERROR, "IStream_Seek should have returned STG_E_SEEKERROR instead of 0x%08x\n", hr); - ok(ull.u.LowPart == sizeof(data), "LowPart set to %d\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should not have changed HighPart, got %d\n", ull.u.HighPart); - - /* IStream_Seek -- valid position argument (seek to beginning) */ - ull.u.HighPart = 0xCAFECAFE; - ull.u.LowPart = 0xCAFECAFE; - ll.u.HighPart = 0; - ll.u.LowPart = 0; - hr = IStream_Seek(pStream, ll, STREAM_SEEK_SET, &ull); - ok_ole_success(hr, "IStream_Seek"); - ok(ull.u.LowPart == 0, "should have set LowPart to 0 instead of %d\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); - - /* IStream_Seek -- valid position argument (seek to end) */ - ull.u.HighPart = 0xCAFECAFE; - ull.u.LowPart = 0xCAFECAFE; - ll.u.HighPart = 0; - ll.u.LowPart = 0; - hr = IStream_Seek(pStream, ll, STREAM_SEEK_END, &ull); - ok_ole_success(hr, "IStream_Seek"); - ok(ull.u.LowPart == 0, "should have set LowPart to 0 instead of %d\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); - - /* IStream_Seek -- ignore HighPart in the move value (seek from current position) */ - ll.u.HighPart = 0; - ll.u.LowPart = sizeof(data); - hr = IStream_Seek(pStream, ll, STREAM_SEEK_SET, &ull); - ok_ole_success(hr, "IStream_Seek"); - - ull.u.HighPart = 0xCAFECAFE; - ull.u.LowPart = 0xCAFECAFE; - ll.u.HighPart = -1; - ll.u.LowPart = 0; - hr = IStream_Seek(pStream, ll, STREAM_SEEK_CUR, &ull); - ok_ole_success(hr, "IStream_Seek"); - ok(ull.u.LowPart == sizeof(data), "LowPart set to %d\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); - - /* IStream_Seek -- ignore HighPart in the move value (seek to beginning) */ - ll.u.HighPart = 0; - ll.u.LowPart = sizeof(data); - hr = IStream_Seek(pStream, ll, STREAM_SEEK_SET, &ull); - ok_ole_success(hr, "IStream_Seek"); - - ull.u.HighPart = 0xCAFECAFE; - ull.u.LowPart = 0xCAFECAFE; - ll.u.HighPart = -1; - ll.u.LowPart = 0; - hr = IStream_Seek(pStream, ll, STREAM_SEEK_SET, &ull); - ok_ole_success(hr, "IStream_Seek"); - ok(ull.u.LowPart == 0, "should have set LowPart to 0 instead of %d\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); - - /* IStream_Seek -- invalid LowPart value (seek before start of stream) */ - ll.u.HighPart = 0; - ll.u.LowPart = sizeof(data); - hr = IStream_Seek(pStream, ll, STREAM_SEEK_SET, &ull); - ok_ole_success(hr, "IStream_Seek"); - - ull.u.HighPart = 0xCAFECAFE; - ull.u.LowPart = 0xCAFECAFE; - ll.u.HighPart = 0; - ll.u.LowPart = 0x80000000; - hr = IStream_Seek(pStream, ll, STREAM_SEEK_CUR, &ull); - ok(hr == STG_E_SEEKERROR, "IStream_Seek should have returned STG_E_SEEKERROR instead of 0x%08x\n", hr); - ok(ull.u.LowPart == sizeof(data), "LowPart set to %d\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); - - /* IStream_Seek -- valid LowPart value (seek to start of stream) */ - ll.u.HighPart = 0; - ll.u.LowPart = sizeof(data); - hr = IStream_Seek(pStream, ll, STREAM_SEEK_SET, &ull); - ok_ole_success(hr, "IStream_Seek"); - - ull.u.HighPart = 0xCAFECAFE; - ull.u.LowPart = 0xCAFECAFE; - ll.u.HighPart = 0; - ll.u.LowPart = -sizeof(data); - hr = IStream_Seek(pStream, ll, STREAM_SEEK_CUR, &ull); - ok_ole_success(hr, "IStream_Seek"); - ok(ull.u.LowPart == 0, "LowPart set to %d\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); - - /* IStream_Seek -- invalid LowPart value (seek to start of stream-1) */ - ll.u.HighPart = 0; - ll.u.LowPart = sizeof(data); - hr = IStream_Seek(pStream, ll, STREAM_SEEK_SET, &ull); - ok_ole_success(hr, "IStream_Seek"); - - ull.u.HighPart = 0xCAFECAFE; - ull.u.LowPart = 0xCAFECAFE; - ll.u.HighPart = 0; - ll.u.LowPart = -sizeof(data)-1; - hr = IStream_Seek(pStream, ll, STREAM_SEEK_CUR, &ull); - ok(hr == STG_E_SEEKERROR, "IStream_Seek should have returned STG_E_SEEKERROR instead of 0x%08x\n", hr); - ok(ull.u.LowPart == sizeof(data), "LowPart set to %d\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); - - /* IStream_Seek -- valid LowPart value (seek forward to 0x80000000) */ - ll.u.HighPart = 0; - ll.u.LowPart = sizeof(data); - hr = IStream_Seek(pStream, ll, STREAM_SEEK_SET, &ull); - ok_ole_success(hr, "IStream_Seek"); - - ull.u.HighPart = 0xCAFECAFE; - ull.u.LowPart = 0xCAFECAFE; - ll.u.HighPart = 0; - ll.u.LowPart = 0x80000000 - sizeof(data); - hr = IStream_Seek(pStream, ll, STREAM_SEEK_CUR, &ull); - ok_ole_success(hr, "IStream_Seek"); - ok(ull.u.LowPart == 0x80000000, "LowPart set to %d\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); - - /* IStream_Seek -- invalid LowPart value (seek to beginning) */ - ll.u.HighPart = 0; - ll.u.LowPart = sizeof(data); - hr = IStream_Seek(pStream, ll, STREAM_SEEK_SET, &ull); - ok_ole_success(hr, "IStream_Seek"); - - ull.u.HighPart = 0xCAFECAFE; - ull.u.LowPart = 0xCAFECAFE; - ll.u.HighPart = 0; - ll.u.LowPart = 0x80000000; - hr = IStream_Seek(pStream, ll, STREAM_SEEK_SET, &ull); - ok(hr == STG_E_SEEKERROR, "IStream_Seek should have returned STG_E_SEEKERROR instead of 0x%08x\n", hr); - ok(ull.u.LowPart == sizeof(data), "LowPart set to %d\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); - - /* IStream_Seek -- valid LowPart value (seek to beginning) */ - ull.u.HighPart = 0xCAFECAFE; - ull.u.LowPart = 0xCAFECAFE; - ll.u.HighPart = 0; - ll.u.LowPart = 0x7FFFFFFF; - hr = IStream_Seek(pStream, ll, STREAM_SEEK_SET, &ull); - ok_ole_success(hr, "IStream_Seek"); - ok(ull.u.LowPart == 0x7FFFFFFF, "should have set LowPart to 0x7FFFFFFF instead of %08x\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); - - /* IStream_Seek -- valid LowPart value (seek from current position) */ - ll.u.HighPart = 0; - ll.u.LowPart = 0; - hr = IStream_Seek(pStream, ll, STREAM_SEEK_SET, &ull); - ok_ole_success(hr, "IStream_Seek"); - - ull.u.HighPart = 0xCAFECAFE; - ull.u.LowPart = 0xCAFECAFE; - ll.u.HighPart = 0; - ll.u.LowPart = 0x7FFFFFFF; - hr = IStream_Seek(pStream, ll, STREAM_SEEK_CUR, &ull); - ok_ole_success(hr, "IStream_Seek"); - ok(ull.u.LowPart == 0x7FFFFFFF, "should have set LowPart to 0x7FFFFFFF instead of %08x\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); - - /* IStream_Seek -- second seek allows you to go past 0x7FFFFFFF size */ - ull.u.HighPart = 0xCAFECAFE; - ull.u.LowPart = 0xCAFECAFE; - ll.u.HighPart = 0; - ll.u.LowPart = 9; - hr = IStream_Seek(pStream, ll, STREAM_SEEK_CUR, &ull); - ok_ole_success(hr, "IStream_Seek"); - ok(ull.u.LowPart == 0x80000008, "should have set LowPart to 0x80000008 instead of %08x\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); - - /* IStream_Seek -- seek wraps position/size on integer overflow */ - ull.u.HighPart = 0xCAFECAFE; - ull.u.LowPart = 0xCAFECAFE; - ll.u.HighPart = 0; - ll.u.LowPart = 0x7FFFFFFF; - hr = IStream_Seek(pStream, ll, STREAM_SEEK_CUR, &ull); - ok_ole_success(hr, "IStream_Seek"); - ok(ull.u.LowPart == 0x00000007, "should have set LowPart to 0x00000007 instead of %08x\n", ull.u.LowPart); - ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); - - hr = IStream_Commit(pStream, STGC_DEFAULT); - ok_ole_success(hr, "IStream_Commit"); - - hr = IStream_Revert(pStream); - ok_ole_success(hr, "IStream_Revert"); - - hr = IStream_LockRegion(pStream, ull, ull, LOCK_WRITE); - ok(hr == STG_E_INVALIDFUNCTION, "IStream_LockRegion should have returned STG_E_INVALIDFUNCTION instead of 0x%08x\n", hr); - - hr = IStream_Stat(pStream, &statstg, STATFLAG_DEFAULT); - ok_ole_success(hr, "IStream_Stat"); - ok(statstg.type == STGTY_STREAM, "statstg.type should have been STGTY_STREAM instead of %d\n", statstg.type); - - /* test OOM condition */ - ull.u.HighPart = -1; - ull.u.LowPart = -1; - hr = IStream_SetSize(pStream, ull); - ok(hr == E_OUTOFMEMORY || broken(hr == S_OK), /* win9x */ - "IStream_SetSize with large size should have returned E_OUTOFMEMORY instead of 0x%08x\n", hr); -} - -static HRESULT WINAPI TestStream_QueryInterface(IStream *iface, REFIID riid, void **ppv) -{ - if (IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_ISequentialStream) || - IsEqualIID(riid, &IID_IStream)) - { - *ppv = iface; - IUnknown_AddRef(iface); - return S_OK; - } - *ppv = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI TestStream_AddRef(IStream *iface) -{ - return 2; -} - -static ULONG WINAPI TestStream_Release(IStream *iface) -{ - return 1; -} - -static HRESULT WINAPI TestStream_Read(IStream *iface, void *pv, ULONG cb, ULONG *pcbRead) -{ - CHECK_EXPECTED_METHOD("TestStream_Read"); - return E_NOTIMPL; -} - -static HRESULT WINAPI TestStream_Write(IStream *iface, const void *pv, ULONG cb, ULONG *pcbWritten) -{ - CHECK_EXPECTED_METHOD("TestStream_Write"); - *pcbWritten = 5; - return S_OK; -} - -static HRESULT WINAPI TestStream_Seek(IStream *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition) -{ - CHECK_EXPECTED_METHOD("TestStream_Seek"); - return E_NOTIMPL; -} - -static HRESULT WINAPI TestStream_SetSize(IStream *iface, ULARGE_INTEGER libNewSize) -{ - CHECK_EXPECTED_METHOD("TestStream_SetSize"); - return E_NOTIMPL; -} - -static HRESULT WINAPI TestStream_CopyTo(IStream *iface, IStream *pStream, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten) -{ - CHECK_EXPECTED_METHOD("TestStream_CopyTo"); - return E_NOTIMPL; -} - -static HRESULT WINAPI TestStream_Commit(IStream *iface, DWORD grfCommitFlags) -{ - CHECK_EXPECTED_METHOD("TestStream_Commit"); - return E_NOTIMPL; -} - -static HRESULT WINAPI TestStream_Revert(IStream *iface) -{ - CHECK_EXPECTED_METHOD("TestStream_Revert"); - return E_NOTIMPL; -} - -static HRESULT WINAPI TestStream_LockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) -{ - CHECK_EXPECTED_METHOD("TestStream_LockRegion"); - return E_NOTIMPL; -} - -static HRESULT WINAPI TestStream_UnlockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) -{ - CHECK_EXPECTED_METHOD("TestStream_UnlockRegion"); - return E_NOTIMPL; -} - -static HRESULT WINAPI TestStream_Stat(IStream *iface, STATSTG *pstatstg, DWORD grfStatFlag) -{ - CHECK_EXPECTED_METHOD("TestStream_Stat"); - return E_NOTIMPL; -} - -static HRESULT WINAPI TestStream_Clone(IStream *iface, IStream **pStream) -{ - CHECK_EXPECTED_METHOD("TestStream_Clone"); - return E_NOTIMPL; -} - -static /*const*/ IStreamVtbl StreamVtbl = -{ - TestStream_QueryInterface, - TestStream_AddRef, - TestStream_Release, - TestStream_Read, - TestStream_Write, - TestStream_Seek, - TestStream_SetSize, - TestStream_CopyTo, - TestStream_Commit, - TestStream_Revert, - TestStream_LockRegion, - TestStream_UnlockRegion, - TestStream_Stat, - TestStream_Clone -}; - -static IStream Test_Stream = { &StreamVtbl }; - -static void test_copyto(void) -{ - IStream *pStream, *pStream2; - HRESULT hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - static const char szHello[] = "Hello"; - ULARGE_INTEGER cb; - static const char *methods_copyto[] = - { - "TestStream_Write", - NULL - }; - ULONG written; - ULARGE_INTEGER ullRead; - ULARGE_INTEGER ullWritten; - ULARGE_INTEGER libNewPosition; - static const LARGE_INTEGER llZero; - char buffer[15]; - - expected_method_list = methods_copyto; - - hr = IStream_Write(pStream, szHello, sizeof(szHello), &written); - ok_ole_success(hr, "IStream_Write"); - ok(written == sizeof(szHello), "only %d bytes written\n", written); - - hr = IStream_Seek(pStream, llZero, STREAM_SEEK_SET, NULL); - ok_ole_success(hr, "IStream_Seek"); - - cb.QuadPart = sizeof(szHello); - hr = IStream_CopyTo(pStream, &Test_Stream, cb, &ullRead, &ullWritten); - ok(ullWritten.QuadPart == 5, "ullWritten was %d instead\n", (ULONG)ullWritten.QuadPart); - ok(ullRead.QuadPart == sizeof(szHello), "only %d bytes read\n", (ULONG)ullRead.QuadPart); - ok_ole_success(hr, "IStream_CopyTo"); - - ok(!*expected_method_list, "Method sequence starting from %s not called\n", *expected_method_list); - - hr = IStream_Clone(pStream, &pStream2); - ok_ole_success(hr, "IStream_Clone"); - - hr = IStream_Seek(pStream2, llZero, STREAM_SEEK_CUR, &libNewPosition); - ok_ole_success(hr, "IStream_Seek"); - ok(libNewPosition.QuadPart == sizeof(szHello), "libNewPosition wasn't set correctly for the cloned stream\n"); - - hr = IStream_Seek(pStream2, llZero, STREAM_SEEK_SET, NULL); - ok_ole_success(hr, "IStream_Seek"); - - hr = IStream_Read(pStream2, buffer, sizeof(buffer), NULL); - ok_ole_success(hr, "IStream_Read"); - ok(!strcmp(buffer, szHello), "read data \"%s\" didn't match originally written data\n", buffer); - - IStream_Release(pStream2); - IStream_Release(pStream); -} - -static void test_freed_hglobal(void) -{ - static const char teststring[] = "this is a test string"; - HRESULT hr; - IStream *pStream; - HGLOBAL hglobal; - char *p; - char buffer[sizeof(teststring) + 8]; - ULARGE_INTEGER ull; - ULONG read, written; - - hglobal = GlobalAlloc(GMEM_DDESHARE|GMEM_NODISCARD|GMEM_MOVEABLE, strlen(teststring) + 1); - ok(hglobal != NULL, "GlobalAlloc failed with error %d\n", GetLastError()); - p = GlobalLock(hglobal); - strcpy(p, teststring); - GlobalUnlock(hglobal); - - hr = CreateStreamOnHGlobal(hglobal, FALSE, &pStream); - ok_ole_success(hr, "CreateStreamOnHGlobal"); - - hr = IStream_Read(pStream, buffer, sizeof(buffer), &read); - ok_ole_success(hr, "IStream_Read"); - ok(!strcmp(buffer, teststring), "buffer data %s differs\n", buffer); - ok(read == sizeof(teststring) || - broken(read == ((sizeof(teststring) + 3) & ~3)), /* win9x rounds the size */ - "read should be sizeof(teststring) instead of %d\n", read); - - GlobalFree(hglobal); - - memset(buffer, 0, sizeof(buffer)); - read = -1; - hr = IStream_Read(pStream, buffer, sizeof(buffer), &read); - ok_ole_success(hr, "IStream_Read"); - ok(buffer[0] == 0, "buffer data should be untouched\n"); - ok(read == 0, "read should be 0 instead of %d\n", read); - - ull.QuadPart = sizeof(buffer); - hr = IStream_SetSize(pStream, ull); - ok(hr == E_OUTOFMEMORY, "IStream_SetSize with invalid HGLOBAL should return E_OUTOFMEMORY instead of 0x%08x\n", hr); - - hr = IStream_Write(pStream, buffer, sizeof(buffer), &written); - ok(hr == E_OUTOFMEMORY, "IStream_Write with invalid HGLOBAL should return E_OUTOFMEMORY instead of 0x%08x\n", hr); - ok(written == 0, "written should be 0 instead of %d\n", written); - - IStream_Release(pStream); -} - -START_TEST(hglobalstream) -{ - HRESULT hr; - IStream *pStream; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, "CreateStreamOnHGlobal"); - - test_streamonhglobal(pStream); - IStream_Release(pStream); - test_copyto(); - test_freed_hglobal(); -} diff --git a/rostests/winetests/ole32/marshal.c b/rostests/winetests/ole32/marshal.c deleted file mode 100644 index 20b0d8ba8ef..00000000000 --- a/rostests/winetests/ole32/marshal.c +++ /dev/null @@ -1,3135 +0,0 @@ -/* - * Marshaling Tests - * - * 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 - */ - -#define _WIN32_DCOM -#define COBJMACROS -#define CONST_VTABLE - -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "objbase.h" -#include "olectl.h" -#include "shlguid.h" -#include "shobjidl.h" -#include "initguid.h" - -#include "wine/test.h" - -DEFINE_GUID(CLSID_StdGlobalInterfaceTable,0x00000323,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); - -/* functions that are not present on all versions of Windows */ -HRESULT (WINAPI * pCoInitializeEx)(LPVOID lpReserved, DWORD dwCoInit); - -/* helper macros to make tests a bit leaner */ -#define ok_more_than_one_lock() ok(cLocks > 0, "Number of locks should be > 0, but actually is %d\n", cLocks) -#define ok_no_locks() ok(cLocks == 0, "Number of locks should be 0, but actually is %d\n", cLocks) -#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08x\n", hr) - -static const IID IID_IWineTest = -{ - 0x5201163f, - 0x8164, - 0x4fd0, - {0xa1, 0xa2, 0x5d, 0x5a, 0x36, 0x54, 0xd3, 0xbd} -}; /* 5201163f-8164-4fd0-a1a2-5d5a3654d3bd */ - -static const IID IID_IRemUnknown = -{ - 0x00000131, - 0x0000, - 0x0000, - {0xc0,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46} -}; - -#define EXTENTID_WineTest IID_IWineTest -#define CLSID_WineTest IID_IWineTest - -static const CLSID CLSID_WineOOPTest = -{ - 0x5201163f, - 0x8164, - 0x4fd0, - {0xa1, 0xa2, 0x5d, 0x5a, 0x36, 0x54, 0xd3, 0xbd} -}; /* 5201163f-8164-4fd0-a1a2-5d5a3654d3bd */ - -static void test_cocreateinstance_proxy(void) -{ - IUnknown *pProxy; - IMultiQI *pMQI; - HRESULT hr; - - pCoInitializeEx(NULL, COINIT_MULTITHREADED); - - hr = CoCreateInstance(&CLSID_ShellDesktop, NULL, CLSCTX_INPROC, &IID_IUnknown, (void **)&pProxy); - ok_ole_success(hr, CoCreateInstance); - hr = IUnknown_QueryInterface(pProxy, &IID_IMultiQI, (void **)&pMQI); - ok(hr == S_OK, "created object is not a proxy, so was created in the wrong apartment\n"); - if (hr == S_OK) - IMultiQI_Release(pMQI); - IUnknown_Release(pProxy); - - CoUninitialize(); -} - -static const LARGE_INTEGER ullZero; -static LONG cLocks; - -static void LockModule(void) -{ - InterlockedIncrement(&cLocks); -} - -static void UnlockModule(void) -{ - InterlockedDecrement(&cLocks); -} - - -static HRESULT WINAPI Test_IUnknown_QueryInterface( - LPUNKNOWN iface, - REFIID riid, - LPVOID *ppvObj) -{ - if (ppvObj == NULL) return E_POINTER; - - if (IsEqualGUID(riid, &IID_IUnknown)) - { - *ppvObj = iface; - IUnknown_AddRef(iface); - return S_OK; - } - - *ppvObj = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI Test_IUnknown_AddRef(LPUNKNOWN iface) -{ - LockModule(); - return 2; /* non-heap-based object */ -} - -static ULONG WINAPI Test_IUnknown_Release(LPUNKNOWN iface) -{ - UnlockModule(); - return 1; /* non-heap-based object */ -} - -static const IUnknownVtbl TestUnknown_Vtbl = -{ - Test_IUnknown_QueryInterface, - Test_IUnknown_AddRef, - Test_IUnknown_Release, -}; - -static IUnknown Test_Unknown = { &TestUnknown_Vtbl }; - - -static HRESULT WINAPI Test_IClassFactory_QueryInterface( - LPCLASSFACTORY iface, - REFIID riid, - LPVOID *ppvObj) -{ - if (ppvObj == NULL) return E_POINTER; - - if (IsEqualGUID(riid, &IID_IUnknown) || - IsEqualGUID(riid, &IID_IClassFactory) || - /* the only other interface Wine is currently able to marshal (for testing two proxies) */ - IsEqualGUID(riid, &IID_IRemUnknown)) - { - *ppvObj = iface; - IClassFactory_AddRef(iface); - return S_OK; - } - - *ppvObj = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI Test_IClassFactory_AddRef(LPCLASSFACTORY iface) -{ - LockModule(); - return 2; /* non-heap-based object */ -} - -static ULONG WINAPI Test_IClassFactory_Release(LPCLASSFACTORY iface) -{ - UnlockModule(); - return 1; /* non-heap-based object */ -} - -static HRESULT WINAPI Test_IClassFactory_CreateInstance( - LPCLASSFACTORY iface, - LPUNKNOWN pUnkOuter, - REFIID riid, - LPVOID *ppvObj) -{ - if (pUnkOuter) return CLASS_E_NOAGGREGATION; - return IUnknown_QueryInterface((IUnknown*)&Test_Unknown, riid, ppvObj); -} - -static HRESULT WINAPI Test_IClassFactory_LockServer( - LPCLASSFACTORY iface, - BOOL fLock) -{ - return S_OK; -} - -static const IClassFactoryVtbl TestClassFactory_Vtbl = -{ - Test_IClassFactory_QueryInterface, - Test_IClassFactory_AddRef, - Test_IClassFactory_Release, - Test_IClassFactory_CreateInstance, - Test_IClassFactory_LockServer -}; - -static IClassFactory Test_ClassFactory = { &TestClassFactory_Vtbl }; - -#define RELEASEMARSHALDATA WM_USER - -struct host_object_data -{ - IStream *stream; - IID iid; - IUnknown *object; - MSHLFLAGS marshal_flags; - HANDLE marshal_event; - IMessageFilter *filter; -}; - -static DWORD CALLBACK host_object_proc(LPVOID p) -{ - struct host_object_data *data = p; - HRESULT hr; - MSG msg; - - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - if (data->filter) - { - IMessageFilter * prev_filter = NULL; - hr = CoRegisterMessageFilter(data->filter, &prev_filter); - if (prev_filter) IMessageFilter_Release(prev_filter); - ok_ole_success(hr, CoRegisterMessageFilter); - } - - hr = CoMarshalInterface(data->stream, &data->iid, data->object, MSHCTX_INPROC, NULL, data->marshal_flags); - ok_ole_success(hr, CoMarshalInterface); - - /* force the message queue to be created before signaling parent thread */ - PeekMessage(&msg, NULL, WM_USER, WM_USER, PM_NOREMOVE); - - SetEvent(data->marshal_event); - - while (GetMessage(&msg, NULL, 0, 0)) - { - if (msg.hwnd == NULL && msg.message == RELEASEMARSHALDATA) - { - CoReleaseMarshalData(data->stream); - SetEvent((HANDLE)msg.lParam); - } - else - DispatchMessage(&msg); - } - - HeapFree(GetProcessHeap(), 0, data); - - CoUninitialize(); - - return hr; -} - -static DWORD start_host_object2(IStream *stream, REFIID riid, IUnknown *object, MSHLFLAGS marshal_flags, IMessageFilter *filter, HANDLE *thread) -{ - DWORD tid = 0; - HANDLE marshal_event = CreateEvent(NULL, FALSE, FALSE, NULL); - struct host_object_data *data = HeapAlloc(GetProcessHeap(), 0, sizeof(*data)); - - data->stream = stream; - data->iid = *riid; - data->object = object; - data->marshal_flags = marshal_flags; - data->marshal_event = marshal_event; - data->filter = filter; - - *thread = CreateThread(NULL, 0, host_object_proc, data, 0, &tid); - - /* wait for marshaling to complete before returning */ - ok( !WaitForSingleObject(marshal_event, 10000), "wait timed out\n" ); - CloseHandle(marshal_event); - - return tid; -} - -static DWORD start_host_object(IStream *stream, REFIID riid, IUnknown *object, MSHLFLAGS marshal_flags, HANDLE *thread) -{ - return start_host_object2(stream, riid, object, marshal_flags, NULL, thread); -} - -/* asks thread to release the marshal data because it has to be done by the - * same thread that marshaled the interface in the first place. */ -static void release_host_object(DWORD tid) -{ - HANDLE event = CreateEvent(NULL, FALSE, FALSE, NULL); - PostThreadMessage(tid, RELEASEMARSHALDATA, 0, (LPARAM)event); - ok( !WaitForSingleObject(event, 10000), "wait timed out\n" ); - CloseHandle(event); -} - -static void end_host_object(DWORD tid, HANDLE thread) -{ - BOOL ret = PostThreadMessage(tid, WM_QUIT, 0, 0); - ok(ret, "PostThreadMessage failed with error %d\n", GetLastError()); - /* be careful of races - don't return until hosting thread has terminated */ - ok( !WaitForSingleObject(thread, 10000), "wait timed out\n" ); - CloseHandle(thread); -} - -/* tests failure case of interface not having a marshaler specified in the - * registry */ -static void test_no_marshaler(void) -{ - IStream *pStream; - HRESULT hr; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - hr = CoMarshalInterface(pStream, &IID_IWineTest, (IUnknown*)&Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok(hr == E_NOINTERFACE, "CoMarshalInterface should have returned E_NOINTERFACE instead of 0x%08x\n", hr); - - IStream_Release(pStream); -} - -/* tests normal marshal and then release without unmarshaling */ -static void test_normal_marshal_and_release(void) -{ - HRESULT hr; - IStream *pStream = NULL; - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - hr = CoMarshalInterface(pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok_ole_success(hr, CoMarshalInterface); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoReleaseMarshalData(pStream); - ok_ole_success(hr, CoReleaseMarshalData); - IStream_Release(pStream); - - ok_no_locks(); -} - -/* tests success case of a same-thread marshal and unmarshal */ -static void test_normal_marshal_and_unmarshal(void) -{ - HRESULT hr; - IStream *pStream = NULL; - IUnknown *pProxy = NULL; - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - hr = CoMarshalInterface(pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok_ole_success(hr, CoMarshalInterface); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy); - ok_ole_success(hr, CoUnmarshalInterface); - IStream_Release(pStream); - - ok_more_than_one_lock(); - - IUnknown_Release(pProxy); - - ok_no_locks(); -} - -/* tests failure case of unmarshaling a freed object */ -static void test_marshal_and_unmarshal_invalid(void) -{ - HRESULT hr; - IStream *pStream = NULL; - IClassFactory *pProxy = NULL; - DWORD tid; - void * dummy; - HANDLE thread; - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - tid = start_host_object(pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHLFLAGS_NORMAL, &thread); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoReleaseMarshalData(pStream); - ok_ole_success(hr, CoReleaseMarshalData); - - ok_no_locks(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy); - todo_wine { ok_ole_success(hr, CoUnmarshalInterface); } - - ok_no_locks(); - - if (pProxy) - { - hr = IClassFactory_CreateInstance(pProxy, NULL, &IID_IUnknown, &dummy); - ok(hr == RPC_E_DISCONNECTED, "Remote call should have returned RPC_E_DISCONNECTED, instead of 0x%08x\n", hr); - - IClassFactory_Release(pProxy); - } - - IStream_Release(pStream); - - end_host_object(tid, thread); -} - -static void test_same_apartment_unmarshal_failure(void) -{ - HRESULT hr; - IStream *pStream; - IUnknown *pProxy; - static const LARGE_INTEGER llZero; - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - - hr = CoMarshalInterface(pStream, &IID_IUnknown, (IUnknown *)&Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok_ole_success(hr, CoMarshalInterface); - - ok_more_than_one_lock(); - - hr = IStream_Seek(pStream, llZero, STREAM_SEEK_SET, NULL); - ok_ole_success(hr, IStream_Seek); - - hr = CoUnmarshalInterface(pStream, &IID_IParseDisplayName, (void **)&pProxy); - ok(hr == E_NOINTERFACE, "CoUnmarshalInterface should have returned E_NOINTERFACE instead of 0x%08x\n", hr); - - ok_no_locks(); - - IStream_Release(pStream); -} - -/* tests success case of an interthread marshal */ -static void test_interthread_marshal_and_unmarshal(void) -{ - HRESULT hr; - IStream *pStream = NULL; - IUnknown *pProxy = NULL; - DWORD tid; - HANDLE thread; - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - tid = start_host_object(pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHLFLAGS_NORMAL, &thread); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy); - ok_ole_success(hr, CoUnmarshalInterface); - IStream_Release(pStream); - - ok_more_than_one_lock(); - - IUnknown_Release(pProxy); - - ok_no_locks(); - - end_host_object(tid, thread); -} - -/* the number of external references that Wine's proxy manager normally gives - * out, so we can test the border case of running out of references */ -#define NORMALEXTREFS 5 - -/* tests success case of an interthread marshal and then marshaling the proxy */ -static void test_proxy_marshal_and_unmarshal(void) -{ - HRESULT hr; - IStream *pStream = NULL; - IUnknown *pProxy = NULL; - IUnknown *pProxy2 = NULL; - DWORD tid; - HANDLE thread; - int i; - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - tid = start_host_object(pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHLFLAGS_NORMAL, &thread); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy); - ok_ole_success(hr, CoUnmarshalInterface); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - /* marshal the proxy */ - hr = CoMarshalInterface(pStream, &IID_IClassFactory, pProxy, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok_ole_success(hr, CoMarshalInterface); - - ok_more_than_one_lock(); - - /* marshal 5 more times to exhaust the normal external references of 5 */ - for (i = 0; i < NORMALEXTREFS; i++) - { - hr = CoMarshalInterface(pStream, &IID_IClassFactory, pProxy, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok_ole_success(hr, CoMarshalInterface); - } - - ok_more_than_one_lock(); - - /* release the original proxy to test that we successfully keep the - * original object alive */ - IUnknown_Release(pProxy); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy2); - ok_ole_success(hr, CoUnmarshalInterface); - - ok_more_than_one_lock(); - - IUnknown_Release(pProxy2); - - /* unmarshal all of the proxies to check that the object stub still exists */ - for (i = 0; i < NORMALEXTREFS; i++) - { - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy2); - ok_ole_success(hr, CoUnmarshalInterface); - - IUnknown_Release(pProxy2); - } - - ok_no_locks(); - - IStream_Release(pStream); - - end_host_object(tid, thread); -} - -/* tests success case of an interthread marshal and then marshaling the proxy - * using an iid that hasn't previously been unmarshaled */ -static void test_proxy_marshal_and_unmarshal2(void) -{ - HRESULT hr; - IStream *pStream = NULL; - IUnknown *pProxy = NULL; - IUnknown *pProxy2 = NULL; - DWORD tid; - HANDLE thread; - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - tid = start_host_object(pStream, &IID_IUnknown, (IUnknown*)&Test_ClassFactory, MSHLFLAGS_NORMAL, &thread); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IUnknown, (void **)&pProxy); - ok_ole_success(hr, CoUnmarshalInterface); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - /* marshal the proxy */ - hr = CoMarshalInterface(pStream, &IID_IClassFactory, pProxy, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok_ole_success(hr, CoMarshalInterface); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - /* unmarshal the second proxy to the object */ - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy2); - ok_ole_success(hr, CoUnmarshalInterface); - IStream_Release(pStream); - - /* now the proxies should be as follows: - * pProxy -> &Test_ClassFactory - * pProxy2 -> &Test_ClassFactory - * they should NOT be as follows: - * pProxy -> &Test_ClassFactory - * pProxy2 -> pProxy - * the above can only really be tested by looking in +ole traces - */ - - ok_more_than_one_lock(); - - IUnknown_Release(pProxy); - - ok_more_than_one_lock(); - - IUnknown_Release(pProxy2); - - ok_no_locks(); - - end_host_object(tid, thread); -} - -/* tests success case of an interthread marshal and then table-weak-marshaling the proxy */ -static void test_proxy_marshal_and_unmarshal_weak(void) -{ - HRESULT hr; - IStream *pStream = NULL; - IUnknown *pProxy = NULL; - IUnknown *pProxy2 = NULL; - DWORD tid; - HANDLE thread; - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - tid = start_host_object(pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHLFLAGS_NORMAL, &thread); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy); - ok_ole_success(hr, CoUnmarshalInterface); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - /* marshal the proxy */ - hr = CoMarshalInterface(pStream, &IID_IClassFactory, pProxy, MSHCTX_INPROC, NULL, MSHLFLAGS_TABLEWEAK); - ok_ole_success(hr, CoMarshalInterface); - - ok_more_than_one_lock(); - - /* release the original proxy to test that we successfully keep the - * original object alive */ - IUnknown_Release(pProxy); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy2); - todo_wine - ok(hr == CO_E_OBJNOTREG, "CoUnmarshalInterface should return CO_E_OBJNOTREG instead of 0x%08x\n", hr); - - ok_no_locks(); - - IStream_Release(pStream); - - end_host_object(tid, thread); -} - -/* tests success case of an interthread marshal and then table-strong-marshaling the proxy */ -static void test_proxy_marshal_and_unmarshal_strong(void) -{ - HRESULT hr; - IStream *pStream = NULL; - IUnknown *pProxy = NULL; - IUnknown *pProxy2 = NULL; - DWORD tid; - HANDLE thread; - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - tid = start_host_object(pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHLFLAGS_NORMAL, &thread); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy); - ok_ole_success(hr, CoUnmarshalInterface); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - /* marshal the proxy */ - hr = CoMarshalInterface(pStream, &IID_IClassFactory, pProxy, MSHCTX_INPROC, NULL, MSHLFLAGS_TABLESTRONG); - ok(hr == S_OK /* WinNT */ || hr == E_INVALIDARG /* Win9x */, - "CoMarshalInterface should have return S_OK or E_INVALIDARG instead of 0x%08x\n", hr); - if (FAILED(hr)) - { - IUnknown_Release(pProxy); - goto end; - } - - ok_more_than_one_lock(); - - /* release the original proxy to test that we successfully keep the - * original object alive */ - IUnknown_Release(pProxy); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy2); - ok_ole_success(hr, CoUnmarshalInterface); - - ok_more_than_one_lock(); - - IUnknown_Release(pProxy2); - - ok_more_than_one_lock(); - -end: - IStream_Release(pStream); - - end_host_object(tid, thread); - - ok_no_locks(); -} - -/* tests that stubs are released when the containing apartment is destroyed */ -static void test_marshal_stub_apartment_shutdown(void) -{ - HRESULT hr; - IStream *pStream = NULL; - IUnknown *pProxy = NULL; - DWORD tid; - HANDLE thread; - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - tid = start_host_object(pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHLFLAGS_NORMAL, &thread); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy); - ok_ole_success(hr, CoUnmarshalInterface); - IStream_Release(pStream); - - ok_more_than_one_lock(); - - end_host_object(tid, thread); - - ok_no_locks(); - - IUnknown_Release(pProxy); - - ok_no_locks(); -} - -/* tests that proxies are released when the containing apartment is destroyed */ -static void test_marshal_proxy_apartment_shutdown(void) -{ - HRESULT hr; - IStream *pStream = NULL; - IUnknown *pProxy = NULL; - DWORD tid; - HANDLE thread; - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - tid = start_host_object(pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHLFLAGS_NORMAL, &thread); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy); - ok_ole_success(hr, CoUnmarshalInterface); - IStream_Release(pStream); - - ok_more_than_one_lock(); - - CoUninitialize(); - - ok_no_locks(); - - IUnknown_Release(pProxy); - - ok_no_locks(); - - end_host_object(tid, thread); - - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); -} - -/* tests that proxies are released when the containing mta apartment is destroyed */ -static void test_marshal_proxy_mta_apartment_shutdown(void) -{ - HRESULT hr; - IStream *pStream = NULL; - IUnknown *pProxy = NULL; - DWORD tid; - HANDLE thread; - - CoUninitialize(); - pCoInitializeEx(NULL, COINIT_MULTITHREADED); - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - tid = start_host_object(pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHLFLAGS_NORMAL, &thread); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy); - ok_ole_success(hr, CoUnmarshalInterface); - IStream_Release(pStream); - - ok_more_than_one_lock(); - - CoUninitialize(); - - ok_no_locks(); - - IUnknown_Release(pProxy); - - ok_no_locks(); - - end_host_object(tid, thread); - - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); -} - -struct ncu_params -{ - LPSTREAM stream; - HANDLE marshal_event; - HANDLE unmarshal_event; -}; - -/* helper for test_no_couninitialize_server */ -static DWORD CALLBACK no_couninitialize_server_proc(LPVOID p) -{ - struct ncu_params *ncu_params = p; - HRESULT hr; - - pCoInitializeEx(NULL, COINIT_MULTITHREADED); - - hr = CoMarshalInterface(ncu_params->stream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok_ole_success(hr, CoMarshalInterface); - - SetEvent(ncu_params->marshal_event); - - ok( !WaitForSingleObject(ncu_params->unmarshal_event, 10000), "wait timed out\n" ); - - /* die without calling CoUninitialize */ - - return 0; -} - -/* tests apartment that an apartment with a stub is released without deadlock - * if the owning thread exits */ -static void test_no_couninitialize_server(void) -{ - HRESULT hr; - IStream *pStream = NULL; - IUnknown *pProxy = NULL; - DWORD tid; - HANDLE thread; - struct ncu_params ncu_params; - - cLocks = 0; - - ncu_params.marshal_event = CreateEvent(NULL, TRUE, FALSE, NULL); - ncu_params.unmarshal_event = CreateEvent(NULL, TRUE, FALSE, NULL); - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - ncu_params.stream = pStream; - - thread = CreateThread(NULL, 0, no_couninitialize_server_proc, &ncu_params, 0, &tid); - - ok( !WaitForSingleObject(ncu_params.marshal_event, 10000), "wait timed out\n" ); - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy); - ok_ole_success(hr, CoUnmarshalInterface); - IStream_Release(pStream); - - ok_more_than_one_lock(); - - SetEvent(ncu_params.unmarshal_event); - ok( !WaitForSingleObject(thread, 10000), "wait timed out\n" ); - - ok_no_locks(); - - CloseHandle(thread); - CloseHandle(ncu_params.marshal_event); - CloseHandle(ncu_params.unmarshal_event); - - IUnknown_Release(pProxy); - - ok_no_locks(); -} - -/* STA -> STA call during DLL_THREAD_DETACH */ -static DWORD CALLBACK no_couninitialize_client_proc(LPVOID p) -{ - struct ncu_params *ncu_params = p; - HRESULT hr; - IUnknown *pProxy = NULL; - - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - hr = CoUnmarshalInterface(ncu_params->stream, &IID_IClassFactory, (void **)&pProxy); - ok_ole_success(hr, CoUnmarshalInterface); - IStream_Release(ncu_params->stream); - - ok_more_than_one_lock(); - - /* die without calling CoUninitialize */ - - return 0; -} - -/* tests STA -> STA call during DLL_THREAD_DETACH doesn't deadlock */ -static void test_no_couninitialize_client(void) -{ - HRESULT hr; - IStream *pStream = NULL; - DWORD tid; - DWORD host_tid; - HANDLE thread; - HANDLE host_thread; - struct ncu_params ncu_params; - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - ncu_params.stream = pStream; - - /* NOTE: assumes start_host_object uses an STA to host the object, as MTAs - * always deadlock when called from within DllMain */ - host_tid = start_host_object(pStream, &IID_IClassFactory, (IUnknown *)&Test_ClassFactory, MSHLFLAGS_NORMAL, &host_thread); - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - - ok_more_than_one_lock(); - - thread = CreateThread(NULL, 0, no_couninitialize_client_proc, &ncu_params, 0, &tid); - - ok( !WaitForSingleObject(thread, 10000), "wait timed out\n" ); - CloseHandle(thread); - - ok_no_locks(); - - end_host_object(host_tid, host_thread); -} - -/* tests success case of a same-thread table-weak marshal, unmarshal, unmarshal */ -static void test_tableweak_marshal_and_unmarshal_twice(void) -{ - HRESULT hr; - IStream *pStream = NULL; - IUnknown *pProxy1 = NULL; - IUnknown *pProxy2 = NULL; - DWORD tid; - HANDLE thread; - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - tid = start_host_object(pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHLFLAGS_TABLEWEAK, &thread); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy1); - ok_ole_success(hr, CoUnmarshalInterface); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy2); - IStream_Release(pStream); - ok_ole_success(hr, CoUnmarshalInterface); - - ok_more_than_one_lock(); - - IUnknown_Release(pProxy1); - IUnknown_Release(pProxy2); - - /* this line is shows the difference between weak and strong table marshaling: - * weak has cLocks == 0 - * strong has cLocks > 0 */ - ok_no_locks(); - - end_host_object(tid, thread); -} - -/* tests releasing after unmarshaling one object */ -static void test_tableweak_marshal_releasedata1(void) -{ - HRESULT hr; - IStream *pStream = NULL; - IUnknown *pProxy1 = NULL; - IUnknown *pProxy2 = NULL; - DWORD tid; - HANDLE thread; - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - tid = start_host_object(pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHLFLAGS_TABLEWEAK, &thread); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy1); - ok_ole_success(hr, CoUnmarshalInterface); - - ok_more_than_one_lock(); - - /* release the remaining reference on the object by calling - * CoReleaseMarshalData in the hosting thread */ - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - release_host_object(tid); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy2); - ok_ole_success(hr, CoUnmarshalInterface); - IStream_Release(pStream); - - ok_more_than_one_lock(); - - IUnknown_Release(pProxy1); - if (pProxy2) - IUnknown_Release(pProxy2); - - /* this line is shows the difference between weak and strong table marshaling: - * weak has cLocks == 0 - * strong has cLocks > 0 */ - ok_no_locks(); - - end_host_object(tid, thread); -} - -/* tests releasing after unmarshaling one object */ -static void test_tableweak_marshal_releasedata2(void) -{ - HRESULT hr; - IStream *pStream = NULL; - IUnknown *pProxy = NULL; - DWORD tid; - HANDLE thread; - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - tid = start_host_object(pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHLFLAGS_TABLEWEAK, &thread); - - ok_more_than_one_lock(); - - /* release the remaining reference on the object by calling - * CoReleaseMarshalData in the hosting thread */ - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - release_host_object(tid); - - ok_no_locks(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy); - todo_wine - { - ok(hr == CO_E_OBJNOTREG, - "CoUnmarshalInterface should have failed with CO_E_OBJNOTREG, but returned 0x%08x instead\n", - hr); - } - IStream_Release(pStream); - - ok_no_locks(); - - end_host_object(tid, thread); -} - -struct weak_and_normal_marshal_data -{ - IStream *pStreamWeak; - IStream *pStreamNormal; - HANDLE hReadyEvent; - HANDLE hQuitEvent; -}; - -static DWORD CALLBACK weak_and_normal_marshal_thread_proc(void *p) -{ - HRESULT hr; - struct weak_and_normal_marshal_data *data = p; - HANDLE hQuitEvent = data->hQuitEvent; - MSG msg; - - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - hr = CoMarshalInterface(data->pStreamWeak, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_TABLEWEAK); - ok_ole_success(hr, "CoMarshalInterface"); - - hr = CoMarshalInterface(data->pStreamNormal, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok_ole_success(hr, "CoMarshalInterface"); - - /* force the message queue to be created before signaling parent thread */ - PeekMessage(&msg, NULL, WM_USER, WM_USER, PM_NOREMOVE); - - SetEvent(data->hReadyEvent); - - while (WAIT_OBJECT_0 + 1 == MsgWaitForMultipleObjects(1, &hQuitEvent, FALSE, 10000, QS_ALLINPUT)) - { - while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) - DispatchMessage(&msg); - } - CloseHandle(hQuitEvent); - - CoUninitialize(); - - return 0; -} - -/* tests interaction between table-weak and normal marshalling of an object */ -static void test_tableweak_and_normal_marshal_and_unmarshal(void) -{ - HRESULT hr; - IUnknown *pProxyWeak = NULL; - IUnknown *pProxyNormal = NULL; - DWORD tid; - HANDLE thread; - struct weak_and_normal_marshal_data data; - - cLocks = 0; - - data.hReadyEvent = CreateEvent(NULL, FALSE, FALSE, NULL); - data.hQuitEvent = CreateEvent(NULL, FALSE, FALSE, NULL); - hr = CreateStreamOnHGlobal(NULL, TRUE, &data.pStreamWeak); - ok_ole_success(hr, CreateStreamOnHGlobal); - hr = CreateStreamOnHGlobal(NULL, TRUE, &data.pStreamNormal); - ok_ole_success(hr, CreateStreamOnHGlobal); - - thread = CreateThread(NULL, 0, weak_and_normal_marshal_thread_proc, &data, 0, &tid); - ok( !WaitForSingleObject(data.hReadyEvent, 10000), "wait timed out\n" ); - CloseHandle(data.hReadyEvent); - - ok_more_than_one_lock(); - - IStream_Seek(data.pStreamWeak, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(data.pStreamWeak, &IID_IClassFactory, (void **)&pProxyWeak); - ok_ole_success(hr, CoUnmarshalInterface); - - ok_more_than_one_lock(); - - IStream_Seek(data.pStreamNormal, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(data.pStreamNormal, &IID_IClassFactory, (void **)&pProxyNormal); - ok_ole_success(hr, CoUnmarshalInterface); - - ok_more_than_one_lock(); - - IUnknown_Release(pProxyNormal); - - ok_more_than_one_lock(); - - IUnknown_Release(pProxyWeak); - - ok_no_locks(); - - IStream_Release(data.pStreamWeak); - IStream_Release(data.pStreamNormal); - - SetEvent(data.hQuitEvent); - ok( !WaitForSingleObject(thread, 10000), "wait timed out\n" ); - CloseHandle(thread); -} - -/* tests success case of a same-thread table-strong marshal, unmarshal, unmarshal */ -static void test_tablestrong_marshal_and_unmarshal_twice(void) -{ - HRESULT hr; - IStream *pStream = NULL; - IUnknown *pProxy1 = NULL; - IUnknown *pProxy2 = NULL; - DWORD tid; - HANDLE thread; - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - tid = start_host_object(pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHLFLAGS_TABLESTRONG, &thread); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy1); - ok_ole_success(hr, CoUnmarshalInterface); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy2); - ok_ole_success(hr, CoUnmarshalInterface); - - ok_more_than_one_lock(); - - if (pProxy1) IUnknown_Release(pProxy1); - if (pProxy2) IUnknown_Release(pProxy2); - - /* this line is shows the difference between weak and strong table marshaling: - * weak has cLocks == 0 - * strong has cLocks > 0 */ - ok_more_than_one_lock(); - - /* release the remaining reference on the object by calling - * CoReleaseMarshalData in the hosting thread */ - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - release_host_object(tid); - IStream_Release(pStream); - - ok_no_locks(); - - end_host_object(tid, thread); -} - -/* tests CoLockObjectExternal */ -static void test_lock_object_external(void) -{ - HRESULT hr; - IStream *pStream = NULL; - - cLocks = 0; - - /* test the stub manager creation aspect of CoLockObjectExternal when the - * object hasn't been marshaled yet */ - CoLockObjectExternal((IUnknown*)&Test_ClassFactory, TRUE, TRUE); - - ok_more_than_one_lock(); - - CoDisconnectObject((IUnknown*)&Test_ClassFactory, 0); - - ok_no_locks(); - - /* test our empty stub manager being handled correctly in - * CoMarshalInterface */ - CoLockObjectExternal((IUnknown*)&Test_ClassFactory, TRUE, TRUE); - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - hr = CoMarshalInterface(pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok_ole_success(hr, CoMarshalInterface); - - CoLockObjectExternal((IUnknown*)&Test_ClassFactory, TRUE, TRUE); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoReleaseMarshalData(pStream); - ok_ole_success(hr, CoReleaseMarshalData); - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - - ok_more_than_one_lock(); - - CoLockObjectExternal((IUnknown*)&Test_ClassFactory, FALSE, TRUE); - - ok_more_than_one_lock(); - - CoLockObjectExternal((IUnknown*)&Test_ClassFactory, FALSE, TRUE); - - ok_no_locks(); - - /* test CoLockObjectExternal releases reference to object with - * fLastUnlockReleases as TRUE and there are only strong references on - * the object */ - CoLockObjectExternal((IUnknown*)&Test_ClassFactory, TRUE, FALSE); - - ok_more_than_one_lock(); - - CoLockObjectExternal((IUnknown*)&Test_ClassFactory, FALSE, FALSE); - - ok_no_locks(); - - /* test CoLockObjectExternal doesn't release the last reference to an - * object with fLastUnlockReleases as TRUE and there is a weak reference - * on the object */ - hr = CoMarshalInterface(pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_TABLEWEAK); - ok_ole_success(hr, CoMarshalInterface); - - ok_more_than_one_lock(); - - CoLockObjectExternal((IUnknown*)&Test_ClassFactory, TRUE, FALSE); - - ok_more_than_one_lock(); - - CoLockObjectExternal((IUnknown*)&Test_ClassFactory, FALSE, FALSE); - - ok_more_than_one_lock(); - - CoDisconnectObject((IUnknown*)&Test_ClassFactory, 0); - - ok_no_locks(); - - IStream_Release(pStream); -} - -/* tests disconnecting stubs */ -static void test_disconnect_stub(void) -{ - HRESULT hr; - IStream *pStream = NULL; - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - hr = CoMarshalInterface(pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok_ole_success(hr, CoMarshalInterface); - - CoLockObjectExternal((IUnknown*)&Test_ClassFactory, TRUE, TRUE); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoReleaseMarshalData(pStream); - ok_ole_success(hr, CoReleaseMarshalData); - IStream_Release(pStream); - - ok_more_than_one_lock(); - - CoDisconnectObject((IUnknown*)&Test_ClassFactory, 0); - - ok_no_locks(); -} - -/* tests failure case of a same-thread marshal and unmarshal twice */ -static void test_normal_marshal_and_unmarshal_twice(void) -{ - HRESULT hr; - IStream *pStream = NULL; - IUnknown *pProxy1 = NULL; - IUnknown *pProxy2 = NULL; - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - hr = CoMarshalInterface(pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok_ole_success(hr, CoMarshalInterface); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy1); - ok_ole_success(hr, CoUnmarshalInterface); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy2); - ok(hr == CO_E_OBJNOTCONNECTED, - "CoUnmarshalInterface should have failed with error CO_E_OBJNOTCONNECTED for double unmarshal, instead of 0x%08x\n", hr); - - IStream_Release(pStream); - - ok_more_than_one_lock(); - - IUnknown_Release(pProxy1); - - ok_no_locks(); -} - -/* tests success case of marshaling and unmarshaling an HRESULT */ -static void test_hresult_marshaling(void) -{ - HRESULT hr; - HRESULT hr_marshaled = 0; - IStream *pStream = NULL; - static const HRESULT E_DEADBEEF = 0xdeadbeef; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - - hr = CoMarshalHresult(pStream, E_DEADBEEF); - ok_ole_success(hr, CoMarshalHresult); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = IStream_Read(pStream, &hr_marshaled, sizeof(HRESULT), NULL); - ok_ole_success(hr, IStream_Read); - - ok(hr_marshaled == E_DEADBEEF, "Didn't marshal HRESULT as expected: got value 0x%08x instead\n", hr_marshaled); - - hr_marshaled = 0; - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalHresult(pStream, &hr_marshaled); - ok_ole_success(hr, CoUnmarshalHresult); - - ok(hr_marshaled == E_DEADBEEF, "Didn't marshal HRESULT as expected: got value 0x%08x instead\n", hr_marshaled); - - IStream_Release(pStream); -} - - -/* helper for test_proxy_used_in_wrong_thread */ -static DWORD CALLBACK bad_thread_proc(LPVOID p) -{ - IClassFactory * cf = p; - HRESULT hr; - IUnknown * proxy = NULL; - - hr = IClassFactory_CreateInstance(cf, NULL, &IID_IUnknown, (LPVOID*)&proxy); - todo_wine - ok(hr == CO_E_NOTINITIALIZED, - "COM should have failed with CO_E_NOTINITIALIZED on using proxy without apartment, but instead returned 0x%08x\n", - hr); - - hr = IClassFactory_QueryInterface(cf, &IID_IMultiQI, (LPVOID *)&proxy); - /* Win9x returns S_OK, whilst NT returns RPC_E_WRONG_THREAD */ - trace("call to proxy's QueryInterface for local interface without apartment returned 0x%08x\n", hr); - if (SUCCEEDED(hr)) - IUnknown_Release(proxy); - - hr = IClassFactory_QueryInterface(cf, &IID_IStream, (LPVOID *)&proxy); - /* Win9x returns E_NOINTERFACE, whilst NT returns RPC_E_WRONG_THREAD */ - trace("call to proxy's QueryInterface without apartment returned 0x%08x\n", hr); - if (SUCCEEDED(hr)) - IUnknown_Release(proxy); - - pCoInitializeEx(NULL, COINIT_MULTITHREADED); - - hr = IClassFactory_CreateInstance(cf, NULL, &IID_IUnknown, (LPVOID*)&proxy); - if (proxy) IUnknown_Release(proxy); - ok(hr == RPC_E_WRONG_THREAD, - "COM should have failed with RPC_E_WRONG_THREAD on using proxy from wrong apartment, but instead returned 0x%08x\n", - hr); - - hr = IClassFactory_QueryInterface(cf, &IID_IStream, (LPVOID *)&proxy); - /* Win9x returns E_NOINTERFACE, whilst NT returns RPC_E_WRONG_THREAD */ - trace("call to proxy's QueryInterface from wrong apartment returned 0x%08x\n", hr); - - /* this statement causes Win9x DCOM to crash during CoUninitialize of - * other apartment, so don't test this on Win9x (signified by NT-only - * export of CoRegisterSurrogateEx) */ - if (GetProcAddress(GetModuleHandle("ole32"), "CoRegisterSurrogateEx")) - /* now be really bad and release the proxy from the wrong apartment */ - IUnknown_Release(cf); - else - skip("skipping test for releasing proxy from wrong apartment that will succeed, but cause a crash during CoUninitialize\n"); - - CoUninitialize(); - - return 0; -} - -/* tests failure case of a using a proxy in the wrong apartment */ -static void test_proxy_used_in_wrong_thread(void) -{ - HRESULT hr; - IStream *pStream = NULL; - IUnknown *pProxy = NULL; - DWORD tid, tid2; - HANDLE thread; - HANDLE host_thread; - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - tid = start_host_object(pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHLFLAGS_NORMAL, &host_thread); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy); - ok_ole_success(hr, CoUnmarshalInterface); - IStream_Release(pStream); - - ok_more_than_one_lock(); - - /* do a call that will fail, but result in IRemUnknown being used by the proxy */ - IClassFactory_QueryInterface(pProxy, &IID_IStream, (LPVOID *)&pStream); - - /* create a thread that we can misbehave in */ - thread = CreateThread(NULL, 0, bad_thread_proc, pProxy, 0, &tid2); - - ok( !WaitForSingleObject(thread, 10000), "wait timed out\n" ); - CloseHandle(thread); - - /* do release statement on Win9x that we should have done above */ - if (!GetProcAddress(GetModuleHandle("ole32"), "CoRegisterSurrogateEx")) - IUnknown_Release(pProxy); - - ok_no_locks(); - - end_host_object(tid, host_thread); -} - -static HRESULT WINAPI MessageFilter_QueryInterface(IMessageFilter *iface, REFIID riid, void ** ppvObj) -{ - if (ppvObj == NULL) return E_POINTER; - - if (IsEqualGUID(riid, &IID_IUnknown) || - IsEqualGUID(riid, &IID_IClassFactory)) - { - *ppvObj = iface; - IClassFactory_AddRef(iface); - return S_OK; - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI MessageFilter_AddRef(IMessageFilter *iface) -{ - return 2; /* non-heap object */ -} - -static ULONG WINAPI MessageFilter_Release(IMessageFilter *iface) -{ - return 1; /* non-heap object */ -} - -static DWORD WINAPI MessageFilter_HandleInComingCall( - IMessageFilter *iface, - DWORD dwCallType, - HTASK threadIDCaller, - DWORD dwTickCount, - LPINTERFACEINFO lpInterfaceInfo) -{ - static int callcount = 0; - DWORD ret; - trace("HandleInComingCall\n"); - switch (callcount) - { - case 0: - ret = SERVERCALL_REJECTED; - break; - case 1: - ret = SERVERCALL_RETRYLATER; - break; - default: - ret = SERVERCALL_ISHANDLED; - break; - } - callcount++; - return ret; -} - -static DWORD WINAPI MessageFilter_RetryRejectedCall( - IMessageFilter *iface, - HTASK threadIDCallee, - DWORD dwTickCount, - DWORD dwRejectType) -{ - trace("RetryRejectedCall\n"); - return 0; -} - -static DWORD WINAPI MessageFilter_MessagePending( - IMessageFilter *iface, - HTASK threadIDCallee, - DWORD dwTickCount, - DWORD dwPendingType) -{ - trace("MessagePending\n"); - return PENDINGMSG_WAITNOPROCESS; -} - -static const IMessageFilterVtbl MessageFilter_Vtbl = -{ - MessageFilter_QueryInterface, - MessageFilter_AddRef, - MessageFilter_Release, - MessageFilter_HandleInComingCall, - MessageFilter_RetryRejectedCall, - MessageFilter_MessagePending -}; - -static IMessageFilter MessageFilter = { &MessageFilter_Vtbl }; - -static void test_message_filter(void) -{ - HRESULT hr; - IStream *pStream = NULL; - IClassFactory *cf = NULL; - DWORD tid; - IUnknown *proxy = NULL; - IMessageFilter *prev_filter = NULL; - HANDLE thread; - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - tid = start_host_object2(pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHLFLAGS_NORMAL, &MessageFilter, &thread); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&cf); - ok_ole_success(hr, CoUnmarshalInterface); - IStream_Release(pStream); - - ok_more_than_one_lock(); - - hr = IClassFactory_CreateInstance(cf, NULL, &IID_IUnknown, (LPVOID*)&proxy); - ok(hr == RPC_E_CALL_REJECTED, "Call should have returned RPC_E_CALL_REJECTED, but return 0x%08x instead\n", hr); - if (proxy) IUnknown_Release(proxy); - proxy = NULL; - - hr = CoRegisterMessageFilter(&MessageFilter, &prev_filter); - ok_ole_success(hr, CoRegisterMessageFilter); - - hr = IClassFactory_CreateInstance(cf, NULL, &IID_IUnknown, (LPVOID*)&proxy); - ok_ole_success(hr, IClassFactory_CreateInstance); - - IUnknown_Release(proxy); - - IClassFactory_Release(cf); - - ok_no_locks(); - - end_host_object(tid, thread); - - hr = CoRegisterMessageFilter(prev_filter, NULL); - ok_ole_success(hr, CoRegisterMessageFilter); -} - -/* test failure case of trying to unmarshal from bad stream */ -static void test_bad_marshal_stream(void) -{ - HRESULT hr; - IStream *pStream = NULL; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - hr = CoMarshalInterface(pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok_ole_success(hr, CoMarshalInterface); - - ok_more_than_one_lock(); - - /* try to read beyond end of stream */ - hr = CoReleaseMarshalData(pStream); - ok(hr == STG_E_READFAULT, "Should have failed with STG_E_READFAULT, but returned 0x%08x instead\n", hr); - - /* now release for real */ - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoReleaseMarshalData(pStream); - ok_ole_success(hr, CoReleaseMarshalData); - - IStream_Release(pStream); -} - -/* tests that proxies implement certain interfaces */ -static void test_proxy_interfaces(void) -{ - HRESULT hr; - IStream *pStream = NULL; - IUnknown *pProxy = NULL; - IUnknown *pOtherUnknown = NULL; - DWORD tid; - HANDLE thread; - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - tid = start_host_object(pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHLFLAGS_NORMAL, &thread); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IUnknown, (void **)&pProxy); - ok_ole_success(hr, CoUnmarshalInterface); - IStream_Release(pStream); - - ok_more_than_one_lock(); - - hr = IUnknown_QueryInterface(pProxy, &IID_IUnknown, (LPVOID*)&pOtherUnknown); - ok_ole_success(hr, IUnknown_QueryInterface IID_IUnknown); - if (hr == S_OK) IUnknown_Release(pOtherUnknown); - - hr = IUnknown_QueryInterface(pProxy, &IID_IClientSecurity, (LPVOID*)&pOtherUnknown); - ok_ole_success(hr, IUnknown_QueryInterface IID_IClientSecurity); - if (hr == S_OK) IUnknown_Release(pOtherUnknown); - - hr = IUnknown_QueryInterface(pProxy, &IID_IMultiQI, (LPVOID*)&pOtherUnknown); - ok_ole_success(hr, IUnknown_QueryInterface IID_IMultiQI); - if (hr == S_OK) IUnknown_Release(pOtherUnknown); - - hr = IUnknown_QueryInterface(pProxy, &IID_IMarshal, (LPVOID*)&pOtherUnknown); - ok_ole_success(hr, IUnknown_QueryInterface IID_IMarshal); - if (hr == S_OK) IUnknown_Release(pOtherUnknown); - - /* IMarshal2 is also supported on NT-based systems, but is pretty much - * useless as it has no more methods over IMarshal that it inherits from. */ - - IUnknown_Release(pProxy); - - ok_no_locks(); - - end_host_object(tid, thread); -} - -typedef struct -{ - const IUnknownVtbl *lpVtbl; - ULONG refs; -} HeapUnknown; - -static HRESULT WINAPI HeapUnknown_QueryInterface(IUnknown *iface, REFIID riid, void **ppv) -{ - if (IsEqualIID(riid, &IID_IUnknown)) - { - IUnknown_AddRef(iface); - *ppv = iface; - return S_OK; - } - *ppv = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI HeapUnknown_AddRef(IUnknown *iface) -{ - HeapUnknown *This = (HeapUnknown *)iface; - return InterlockedIncrement((LONG*)&This->refs); -} - -static ULONG WINAPI HeapUnknown_Release(IUnknown *iface) -{ - HeapUnknown *This = (HeapUnknown *)iface; - ULONG refs = InterlockedDecrement((LONG*)&This->refs); - if (!refs) HeapFree(GetProcessHeap(), 0, This); - return refs; -} - -static const IUnknownVtbl HeapUnknown_Vtbl = -{ - HeapUnknown_QueryInterface, - HeapUnknown_AddRef, - HeapUnknown_Release -}; - -static void test_proxybuffer(REFIID riid) -{ - HRESULT hr; - IPSFactoryBuffer *psfb; - IRpcProxyBuffer *proxy; - LPVOID lpvtbl; - ULONG refs; - CLSID clsid; - HeapUnknown *pUnkOuter = HeapAlloc(GetProcessHeap(), 0, sizeof(*pUnkOuter)); - - pUnkOuter->lpVtbl = &HeapUnknown_Vtbl; - pUnkOuter->refs = 1; - - hr = CoGetPSClsid(riid, &clsid); - ok_ole_success(hr, CoGetPSClsid); - - hr = CoGetClassObject(&clsid, CLSCTX_INPROC_SERVER, NULL, &IID_IPSFactoryBuffer, (LPVOID*)&psfb); - ok_ole_success(hr, CoGetClassObject); - - hr = IPSFactoryBuffer_CreateProxy(psfb, (IUnknown*)pUnkOuter, riid, &proxy, &lpvtbl); - ok_ole_success(hr, IPSFactoryBuffer_CreateProxy); - ok(lpvtbl != NULL, "IPSFactoryBuffer_CreateProxy succeeded, but returned a NULL vtable!\n"); - - /* release our reference to the outer unknown object - the PS factory - * buffer will have AddRef's it in the CreateProxy call */ - refs = IUnknown_Release((IUnknown *)pUnkOuter); - ok(refs == 1, "Ref count of outer unknown should have been 1 instead of %d\n", refs); - - refs = IPSFactoryBuffer_Release(psfb); - if (0) - { - /* not reliable on native. maybe it leaks references! */ - ok(refs == 0, "Ref-count leak of %d on IPSFactoryBuffer\n", refs); - } - - refs = IUnknown_Release((IUnknown *)lpvtbl); - ok(refs == 0, "Ref-count leak of %d on IRpcProxyBuffer\n", refs); - - refs = IRpcProxyBuffer_Release(proxy); - ok(refs == 0, "Ref-count leak of %d on IRpcProxyBuffer\n", refs); -} - -static void test_stubbuffer(REFIID riid) -{ - HRESULT hr; - IPSFactoryBuffer *psfb; - IRpcStubBuffer *stub; - ULONG refs; - CLSID clsid; - - cLocks = 0; - - hr = CoGetPSClsid(riid, &clsid); - ok_ole_success(hr, CoGetPSClsid); - - hr = CoGetClassObject(&clsid, CLSCTX_INPROC_SERVER, NULL, &IID_IPSFactoryBuffer, (LPVOID*)&psfb); - ok_ole_success(hr, CoGetClassObject); - - hr = IPSFactoryBuffer_CreateStub(psfb, riid, (IUnknown*)&Test_ClassFactory, &stub); - ok_ole_success(hr, IPSFactoryBuffer_CreateStub); - - refs = IPSFactoryBuffer_Release(psfb); - if (0) - { - /* not reliable on native. maybe it leaks references */ - ok(refs == 0, "Ref-count leak of %d on IPSFactoryBuffer\n", refs); - } - - ok_more_than_one_lock(); - - IRpcStubBuffer_Disconnect(stub); - - ok_no_locks(); - - refs = IRpcStubBuffer_Release(stub); - ok(refs == 0, "Ref-count leak of %d on IRpcProxyBuffer\n", refs); -} - -static HWND hwnd_app; - -static HRESULT WINAPI TestRE_IClassFactory_CreateInstance( - LPCLASSFACTORY iface, - LPUNKNOWN pUnkOuter, - REFIID riid, - LPVOID *ppvObj) -{ - DWORD_PTR res; - if (IsEqualIID(riid, &IID_IWineTest)) - { - BOOL ret = SendMessageTimeout(hwnd_app, WM_NULL, 0, 0, SMTO_BLOCK, 5000, &res); - ok(ret, "Timed out sending a message to originating window during RPC call\n"); - } - *ppvObj = NULL; - return S_FALSE; -} - -static const IClassFactoryVtbl TestREClassFactory_Vtbl = -{ - Test_IClassFactory_QueryInterface, - Test_IClassFactory_AddRef, - Test_IClassFactory_Release, - TestRE_IClassFactory_CreateInstance, - Test_IClassFactory_LockServer -}; - -IClassFactory TestRE_ClassFactory = { &TestREClassFactory_Vtbl }; - -static LRESULT CALLBACK window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - switch (msg) - { - case WM_USER: - { - HRESULT hr; - IStream *pStream = NULL; - IClassFactory *proxy = NULL; - IUnknown *object; - DWORD tid; - HANDLE thread; - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - tid = start_host_object(pStream, &IID_IClassFactory, (IUnknown*)&TestRE_ClassFactory, MSHLFLAGS_NORMAL, &thread); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&proxy); - ok_ole_success(hr, CoReleaseMarshalData); - IStream_Release(pStream); - - ok_more_than_one_lock(); - - /* note the use of the magic IID_IWineTest value to tell remote thread - * to try to send a message back to us */ - hr = IClassFactory_CreateInstance(proxy, NULL, &IID_IWineTest, (void **)&object); - - IClassFactory_Release(proxy); - - ok_no_locks(); - - end_host_object(tid, thread); - - PostMessage(hwnd, WM_QUIT, 0, 0); - - return 0; - } - case WM_USER+1: - { - HRESULT hr; - IStream *pStream = NULL; - IClassFactory *proxy = NULL; - IUnknown *object; - DWORD tid; - HANDLE thread; - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - tid = start_host_object(pStream, &IID_IClassFactory, (IUnknown*)&TestRE_ClassFactory, MSHLFLAGS_NORMAL, &thread); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&proxy); - ok_ole_success(hr, CoReleaseMarshalData); - IStream_Release(pStream); - - ok_more_than_one_lock(); - - /* post quit message before a doing a COM call to show that a pending - * WM_QUIT message doesn't stop the call from succeeding */ - PostMessage(hwnd, WM_QUIT, 0, 0); - hr = IClassFactory_CreateInstance(proxy, NULL, &IID_IUnknown, (void **)&object); - - IClassFactory_Release(proxy); - - ok_no_locks(); - - end_host_object(tid, thread); - - return 0; - } - case WM_USER+2: - { - HRESULT hr; - IStream *pStream = NULL; - IClassFactory *proxy = NULL; - IUnknown *object; - DWORD tid; - HANDLE thread; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - tid = start_host_object(pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHLFLAGS_NORMAL, &thread); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&proxy); - ok_ole_success(hr, CoReleaseMarshalData); - IStream_Release(pStream); - - /* shows that COM calls executed during the processing of sent - * messages should fail */ - hr = IClassFactory_CreateInstance(proxy, NULL, &IID_IUnknown, (void **)&object); - ok(hr == RPC_E_CANTCALLOUT_ININPUTSYNCCALL, - "COM call during processing of sent message should return RPC_E_CANTCALLOUT_ININPUTSYNCCALL instead of 0x%08x\n", hr); - - IClassFactory_Release(proxy); - - end_host_object(tid, thread); - - PostQuitMessage(0); - - return 0; - } - default: - return DefWindowProc(hwnd, msg, wparam, lparam); - } -} - -static void register_test_window(void) -{ - WNDCLASS wndclass; - - memset(&wndclass, 0, sizeof(wndclass)); - wndclass.lpfnWndProc = window_proc; - wndclass.lpszClassName = "WineCOMTest"; - RegisterClass(&wndclass); -} - -static void test_message_reentrancy(void) -{ - MSG msg; - - hwnd_app = CreateWindow("WineCOMTest", NULL, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL, 0); - ok(hwnd_app != NULL, "Window creation failed\n"); - - /* start message re-entrancy test */ - PostMessage(hwnd_app, WM_USER, 0, 0); - - while (GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - DestroyWindow(hwnd_app); -} - -static HRESULT WINAPI TestMsg_IClassFactory_CreateInstance( - LPCLASSFACTORY iface, - LPUNKNOWN pUnkOuter, - REFIID riid, - LPVOID *ppvObj) -{ - *ppvObj = NULL; - SendMessage(hwnd_app, WM_USER+2, 0, 0); - return S_OK; -} - -static IClassFactoryVtbl TestMsgClassFactory_Vtbl = -{ - Test_IClassFactory_QueryInterface, - Test_IClassFactory_AddRef, - Test_IClassFactory_Release, - TestMsg_IClassFactory_CreateInstance, - Test_IClassFactory_LockServer -}; - -IClassFactory TestMsg_ClassFactory = { &TestMsgClassFactory_Vtbl }; - -static void test_call_from_message(void) -{ - MSG msg; - IStream *pStream; - HRESULT hr; - IClassFactory *proxy; - DWORD tid; - HANDLE thread; - IUnknown *object; - - hwnd_app = CreateWindow("WineCOMTest", NULL, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL, 0); - ok(hwnd_app != NULL, "Window creation failed\n"); - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - tid = start_host_object(pStream, &IID_IClassFactory, (IUnknown*)&TestMsg_ClassFactory, MSHLFLAGS_NORMAL, &thread); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&proxy); - ok_ole_success(hr, CoReleaseMarshalData); - IStream_Release(pStream); - - ok_more_than_one_lock(); - - /* start message re-entrancy test */ - hr = IClassFactory_CreateInstance(proxy, NULL, &IID_IUnknown, (void **)&object); - ok_ole_success(hr, IClassFactory_CreateInstance); - - IClassFactory_Release(proxy); - - ok_no_locks(); - - end_host_object(tid, thread); - - while (GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - DestroyWindow(hwnd_app); -} - -static void test_WM_QUIT_handling(void) -{ - MSG msg; - - hwnd_app = CreateWindow("WineCOMTest", NULL, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL, 0); - ok(hwnd_app != NULL, "Window creation failed\n"); - - /* start WM_QUIT handling test */ - PostMessage(hwnd_app, WM_USER+1, 0, 0); - - while (GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } -} - -static SIZE_T round_global_size(SIZE_T size) -{ - static SIZE_T global_size_alignment = -1; - if (global_size_alignment == -1) - { - void *p = GlobalAlloc(GMEM_FIXED, 1); - global_size_alignment = GlobalSize(p); - GlobalFree(p); - } - - return ((size + global_size_alignment - 1) & ~(global_size_alignment - 1)); -} - -static void test_freethreadedmarshaldata(IStream *pStream, MSHCTX mshctx, void *ptr, DWORD mshlflags) -{ - HGLOBAL hglobal; - DWORD size; - char *marshal_data; - HRESULT hr; - - hr = GetHGlobalFromStream(pStream, &hglobal); - ok_ole_success(hr, GetHGlobalFromStream); - - size = GlobalSize(hglobal); - - marshal_data = GlobalLock(hglobal); - - if (mshctx == MSHCTX_INPROC) - { - DWORD expected_size = round_global_size(3*sizeof(DWORD) + sizeof(GUID)); - ok(size == expected_size || - broken(size == (2*sizeof(DWORD))) /* Win9x & NT4 */, - "size should have been %d instead of %d\n", expected_size, size); - - ok(*(DWORD *)marshal_data == mshlflags, "expected 0x%x, but got 0x%x for mshctx\n", mshlflags, *(DWORD *)marshal_data); - marshal_data += sizeof(DWORD); - ok(*(void **)marshal_data == ptr, "expected %p, but got %p for mshctx\n", ptr, *(void **)marshal_data); - marshal_data += sizeof(void *); - if (sizeof(void*) == 4 && size >= 3*sizeof(DWORD)) - { - ok(*(DWORD *)marshal_data == 0, "expected 0x0, but got 0x%x\n", *(DWORD *)marshal_data); - marshal_data += sizeof(DWORD); - } - if (size >= 3*sizeof(DWORD) + sizeof(GUID)) - { - trace("got guid data: {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n", - ((GUID *)marshal_data)->Data1, ((GUID *)marshal_data)->Data2, ((GUID *)marshal_data)->Data3, - ((GUID *)marshal_data)->Data4[0], ((GUID *)marshal_data)->Data4[1], ((GUID *)marshal_data)->Data4[2], ((GUID *)marshal_data)->Data4[3], - ((GUID *)marshal_data)->Data4[4], ((GUID *)marshal_data)->Data4[5], ((GUID *)marshal_data)->Data4[6], ((GUID *)marshal_data)->Data4[7]); - } - } - else - { - ok(size > sizeof(DWORD), "size should have been > sizeof(DWORD), not %d\n", size); - ok(*(DWORD *)marshal_data == 0x574f454d /* MEOW */, - "marshal data should be filled by standard marshal and start with MEOW signature\n"); - } - - GlobalUnlock(hglobal); -} - -static void test_freethreadedmarshaler(void) -{ - HRESULT hr; - IUnknown *pFTUnknown; - IMarshal *pFTMarshal; - IStream *pStream; - IUnknown *pProxy; - static const LARGE_INTEGER llZero; - - cLocks = 0; - hr = CoCreateFreeThreadedMarshaler(NULL, &pFTUnknown); - ok_ole_success(hr, CoCreateFreeThreadedMarshaler); - hr = IUnknown_QueryInterface(pFTUnknown, &IID_IMarshal, (void **)&pFTMarshal); - ok_ole_success(hr, IUnknown_QueryInterface); - IUnknown_Release(pFTUnknown); - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - - /* inproc normal marshaling */ - - hr = IMarshal_MarshalInterface(pFTMarshal, pStream, &IID_IClassFactory, - &Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok_ole_success(hr, IMarshal_MarshalInterface); - - ok_more_than_one_lock(); - - test_freethreadedmarshaldata(pStream, MSHCTX_INPROC, &Test_ClassFactory, MSHLFLAGS_NORMAL); - - IStream_Seek(pStream, llZero, STREAM_SEEK_SET, NULL); - hr = IMarshal_UnmarshalInterface(pFTMarshal, pStream, &IID_IUnknown, (void **)&pProxy); - ok_ole_success(hr, IMarshal_UnmarshalInterface); - - IUnknown_Release(pProxy); - - ok_no_locks(); - -/* native doesn't allow us to unmarshal or release the stream data, - * presumably because it wants us to call CoMarshalInterface instead */ - if (0) - { - /* local normal marshaling */ - - IStream_Seek(pStream, llZero, STREAM_SEEK_SET, NULL); - hr = IMarshal_MarshalInterface(pFTMarshal, pStream, &IID_IClassFactory, &Test_ClassFactory, MSHCTX_LOCAL, NULL, MSHLFLAGS_NORMAL); - ok_ole_success(hr, IMarshal_MarshalInterface); - - ok_more_than_one_lock(); - - test_freethreadedmarshaldata(pStream, MSHCTX_LOCAL, &Test_ClassFactory, MSHLFLAGS_NORMAL); - - IStream_Seek(pStream, llZero, STREAM_SEEK_SET, NULL); - hr = IMarshal_ReleaseMarshalData(pFTMarshal, pStream); - ok_ole_success(hr, IMarshal_ReleaseMarshalData); - - ok_no_locks(); - } - - /* inproc table-strong marshaling */ - - IStream_Seek(pStream, llZero, STREAM_SEEK_SET, NULL); - hr = IMarshal_MarshalInterface(pFTMarshal, pStream, &IID_IClassFactory, - (IUnknown*)&Test_ClassFactory, MSHCTX_INPROC, (void *)0xdeadbeef, - MSHLFLAGS_TABLESTRONG); - ok_ole_success(hr, IMarshal_MarshalInterface); - - ok_more_than_one_lock(); - - test_freethreadedmarshaldata(pStream, MSHCTX_INPROC, &Test_ClassFactory, MSHLFLAGS_TABLESTRONG); - - IStream_Seek(pStream, llZero, STREAM_SEEK_SET, NULL); - hr = IMarshal_UnmarshalInterface(pFTMarshal, pStream, &IID_IUnknown, (void **)&pProxy); - ok_ole_success(hr, IMarshal_UnmarshalInterface); - - IUnknown_Release(pProxy); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, llZero, STREAM_SEEK_SET, NULL); - hr = IMarshal_ReleaseMarshalData(pFTMarshal, pStream); - ok_ole_success(hr, IMarshal_ReleaseMarshalData); - - ok_no_locks(); - - /* inproc table-weak marshaling */ - - IStream_Seek(pStream, llZero, STREAM_SEEK_SET, NULL); - hr = IMarshal_MarshalInterface(pFTMarshal, pStream, &IID_IClassFactory, - (IUnknown*)&Test_ClassFactory, MSHCTX_INPROC, (void *)0xdeadbeef, - MSHLFLAGS_TABLEWEAK); - ok_ole_success(hr, IMarshal_MarshalInterface); - - ok_no_locks(); - - test_freethreadedmarshaldata(pStream, MSHCTX_INPROC, &Test_ClassFactory, MSHLFLAGS_TABLEWEAK); - - IStream_Seek(pStream, llZero, STREAM_SEEK_SET, NULL); - hr = IMarshal_UnmarshalInterface(pFTMarshal, pStream, &IID_IUnknown, (void **)&pProxy); - ok_ole_success(hr, IMarshal_UnmarshalInterface); - - ok_more_than_one_lock(); - - IUnknown_Release(pProxy); - - ok_no_locks(); - - /* inproc normal marshaling (for extraordinary cases) */ - - IStream_Seek(pStream, llZero, STREAM_SEEK_SET, NULL); - hr = IMarshal_MarshalInterface(pFTMarshal, pStream, &IID_IClassFactory, - &Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok_ole_success(hr, IMarshal_MarshalInterface); - - ok_more_than_one_lock(); - - /* this call shows that DisconnectObject does nothing */ - hr = IMarshal_DisconnectObject(pFTMarshal, 0); - ok_ole_success(hr, IMarshal_DisconnectObject); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, llZero, STREAM_SEEK_SET, NULL); - hr = IMarshal_ReleaseMarshalData(pFTMarshal, pStream); - ok_ole_success(hr, IMarshal_ReleaseMarshalData); - - ok_no_locks(); - - /* doesn't enforce marshaling rules here and allows us to unmarshal the - * interface, even though it was freed above */ - IStream_Seek(pStream, llZero, STREAM_SEEK_SET, NULL); - hr = IMarshal_UnmarshalInterface(pFTMarshal, pStream, &IID_IUnknown, (void **)&pProxy); - ok_ole_success(hr, IMarshal_UnmarshalInterface); - - ok_no_locks(); - - IStream_Release(pStream); - IMarshal_Release(pFTMarshal); -} - -static void reg_unreg_wine_test_class(BOOL Register) -{ - HRESULT hr; - char buffer[256]; - LPOLESTR pszClsid; - HKEY hkey; - DWORD dwDisposition; - DWORD error; - - hr = StringFromCLSID(&CLSID_WineTest, &pszClsid); - ok_ole_success(hr, "StringFromCLSID"); - strcpy(buffer, "CLSID\\"); - WideCharToMultiByte(CP_ACP, 0, pszClsid, -1, buffer + strlen(buffer), sizeof(buffer) - strlen(buffer), NULL, NULL); - CoTaskMemFree(pszClsid); - strcat(buffer, "\\InprocHandler32"); - if (Register) - { - error = RegCreateKeyEx(HKEY_CLASSES_ROOT, buffer, 0, NULL, 0, KEY_SET_VALUE, NULL, &hkey, &dwDisposition); - ok(error == ERROR_SUCCESS, "RegCreateKeyEx failed with error %d\n", error); - error = RegSetValueEx(hkey, NULL, 0, REG_SZ, (const unsigned char *)"\"ole32.dll\"", strlen("\"ole32.dll\"") + 1); - ok(error == ERROR_SUCCESS, "RegSetValueEx failed with error %d\n", error); - RegCloseKey(hkey); - } - else - { - RegDeleteKey(HKEY_CLASSES_ROOT, buffer); - *strrchr(buffer, '\\') = '\0'; - RegDeleteKey(HKEY_CLASSES_ROOT, buffer); - } -} - -static void test_inproc_handler(void) -{ - HRESULT hr; - IUnknown *pObject; - IUnknown *pObject2; - - reg_unreg_wine_test_class(TRUE); - - hr = CoCreateInstance(&CLSID_WineTest, NULL, CLSCTX_INPROC_HANDLER, &IID_IUnknown, (void **)&pObject); - ok_ole_success(hr, "CoCreateInstance"); - - if (SUCCEEDED(hr)) - { - hr = IUnknown_QueryInterface(pObject, &IID_IWineTest, (void **)&pObject2); - ok(hr == E_NOINTERFACE, "IUnknown_QueryInterface on handler for invalid interface returned 0x%08x instead of E_NOINTERFACE\n", hr); - - /* it's a handler as it supports IOleObject */ - hr = IUnknown_QueryInterface(pObject, &IID_IOleObject, (void **)&pObject2); - ok_ole_success(hr, "IUnknown_QueryInterface(&IID_IOleObject)"); - IUnknown_Release(pObject2); - - IUnknown_Release(pObject); - } - - reg_unreg_wine_test_class(FALSE); -} - -static HRESULT WINAPI Test_SMI_QueryInterface( - IStdMarshalInfo *iface, - REFIID riid, - LPVOID *ppvObj) -{ - if (ppvObj == NULL) return E_POINTER; - - if (IsEqualGUID(riid, &IID_IUnknown) || - IsEqualGUID(riid, &IID_IStdMarshalInfo)) - { - *ppvObj = iface; - IClassFactory_AddRef(iface); - return S_OK; - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI Test_SMI_AddRef(IStdMarshalInfo *iface) -{ - LockModule(); - return 2; /* non-heap-based object */ -} - -static ULONG WINAPI Test_SMI_Release(IStdMarshalInfo *iface) -{ - UnlockModule(); - return 1; /* non-heap-based object */ -} - -static HRESULT WINAPI Test_SMI_GetClassForHandler( - IStdMarshalInfo *iface, - DWORD dwDestContext, - void *pvDestContext, - CLSID *pClsid) -{ - *pClsid = CLSID_WineTest; - return S_OK; -} - -static const IStdMarshalInfoVtbl Test_SMI_Vtbl = -{ - Test_SMI_QueryInterface, - Test_SMI_AddRef, - Test_SMI_Release, - Test_SMI_GetClassForHandler -}; - -static IStdMarshalInfo Test_SMI = {&Test_SMI_Vtbl}; - -static void test_handler_marshaling(void) -{ - HRESULT hr; - IStream *pStream = NULL; - IUnknown *pProxy = NULL; - IUnknown *pObject; - DWORD tid; - HANDLE thread; - static const LARGE_INTEGER ullZero; - - reg_unreg_wine_test_class(TRUE); - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, "CreateStreamOnHGlobal"); - tid = start_host_object(pStream, &IID_IUnknown, (IUnknown*)&Test_SMI, MSHLFLAGS_NORMAL, &thread); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IUnknown, (void **)&pProxy); - ok_ole_success(hr, "CoUnmarshalInterface"); - IStream_Release(pStream); - - if(hr == S_OK) - { - ok_more_than_one_lock(); - - hr = IUnknown_QueryInterface(pProxy, &IID_IWineTest, (void **)&pObject); - ok(hr == E_NOINTERFACE, "IUnknown_QueryInterface with unknown IID should have returned E_NOINTERFACE instead of 0x%08x\n", hr); - - /* it's a handler as it supports IOleObject */ - hr = IUnknown_QueryInterface(pProxy, &IID_IOleObject, (void **)&pObject); - todo_wine - ok_ole_success(hr, "IUnknown_QueryInterface(&IID_IOleObject)"); - if (SUCCEEDED(hr)) IUnknown_Release(pObject); - - IUnknown_Release(pProxy); - - ok_no_locks(); - } - - end_host_object(tid, thread); - reg_unreg_wine_test_class(FALSE); - - /* FIXME: test IPersist interface has the same effect as IStdMarshalInfo */ -} - - -static void test_client_security(void) -{ - HRESULT hr; - IStream *pStream = NULL; - IClassFactory *pProxy = NULL; - IUnknown *pProxy2 = NULL; - IUnknown *pUnknown1 = NULL; - IUnknown *pUnknown2 = NULL; - IClientSecurity *pCliSec = NULL; - IMarshal *pMarshal; - DWORD tid; - HANDLE thread; - static const LARGE_INTEGER ullZero; - DWORD dwAuthnSvc; - DWORD dwAuthzSvc; - OLECHAR *pServerPrincName; - DWORD dwAuthnLevel; - DWORD dwImpLevel; - void *pAuthInfo; - DWORD dwCapabilities; - void *pv; - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, "CreateStreamOnHGlobal"); - tid = start_host_object(pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHLFLAGS_NORMAL, &thread); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&pProxy); - ok_ole_success(hr, "CoUnmarshalInterface"); - IStream_Release(pStream); - - hr = IUnknown_QueryInterface(pProxy, &IID_IUnknown, (LPVOID*)&pUnknown1); - ok_ole_success(hr, "IUnknown_QueryInterface IID_IUnknown"); - - hr = IUnknown_QueryInterface(pProxy, &IID_IRemUnknown, (LPVOID*)&pProxy2); - ok_ole_success(hr, "IUnknown_QueryInterface IID_IStream"); - - hr = IUnknown_QueryInterface(pProxy2, &IID_IUnknown, (LPVOID*)&pUnknown2); - ok_ole_success(hr, "IUnknown_QueryInterface IID_IUnknown"); - - ok(pUnknown1 == pUnknown2, "both proxy's IUnknowns should be the same - %p, %p\n", pUnknown1, pUnknown2); - - hr = IUnknown_QueryInterface(pProxy, &IID_IMarshal, (LPVOID*)&pMarshal); - ok_ole_success(hr, "IUnknown_QueryInterface IID_IMarshal"); - - hr = IUnknown_QueryInterface(pProxy, &IID_IClientSecurity, (LPVOID*)&pCliSec); - ok_ole_success(hr, "IUnknown_QueryInterface IID_IClientSecurity"); - - hr = IClientSecurity_QueryBlanket(pCliSec, (IUnknown *)pProxy, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - todo_wine ok_ole_success(hr, "IClientSecurity_QueryBlanket (all NULLs)"); - - hr = IClientSecurity_QueryBlanket(pCliSec, (IUnknown *)pMarshal, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - todo_wine ok(hr == E_NOINTERFACE, "IClientSecurity_QueryBlanket with local interface should have returned E_NOINTERFACE instead of 0x%08x\n", hr); - - hr = IClientSecurity_QueryBlanket(pCliSec, (IUnknown *)pProxy, &dwAuthnSvc, &dwAuthzSvc, &pServerPrincName, &dwAuthnLevel, &dwImpLevel, &pAuthInfo, &dwCapabilities); - todo_wine ok_ole_success(hr, "IClientSecurity_QueryBlanket"); - - hr = IClientSecurity_SetBlanket(pCliSec, (IUnknown *)pProxy, dwAuthnSvc, dwAuthzSvc, pServerPrincName, dwAuthnLevel, RPC_C_IMP_LEVEL_IMPERSONATE, pAuthInfo, dwCapabilities); - todo_wine ok_ole_success(hr, "IClientSecurity_SetBlanket"); - - hr = IClassFactory_CreateInstance(pProxy, NULL, &IID_IWineTest, &pv); - ok(hr == E_NOINTERFACE, "COM call should have succeeded instead of returning 0x%08x\n", hr); - - hr = IClientSecurity_SetBlanket(pCliSec, (IUnknown *)pMarshal, dwAuthnSvc, dwAuthzSvc, pServerPrincName, dwAuthnLevel, dwImpLevel, pAuthInfo, dwCapabilities); - todo_wine ok(hr == E_NOINTERFACE, "IClientSecurity_SetBlanket with local interface should have returned E_NOINTERFACE instead of 0x%08x\n", hr); - - hr = IClientSecurity_SetBlanket(pCliSec, (IUnknown *)pProxy, 0xdeadbeef, dwAuthzSvc, pServerPrincName, dwAuthnLevel, dwImpLevel, pAuthInfo, dwCapabilities); - todo_wine ok(hr == E_INVALIDARG, "IClientSecurity_SetBlanke with invalid dwAuthnSvc should have returned E_INVALIDARG instead of 0x%08x\n", hr); - - CoTaskMemFree(pServerPrincName); - - hr = IClientSecurity_QueryBlanket(pCliSec, pUnknown1, &dwAuthnSvc, &dwAuthzSvc, &pServerPrincName, &dwAuthnLevel, &dwImpLevel, &pAuthInfo, &dwCapabilities); - todo_wine ok_ole_success(hr, "IClientSecurity_QueryBlanket(IUnknown)"); - - CoTaskMemFree(pServerPrincName); - - IClassFactory_Release(pProxy); - IUnknown_Release(pProxy2); - IUnknown_Release(pUnknown1); - IUnknown_Release(pUnknown2); - IMarshal_Release(pMarshal); - IClientSecurity_Release(pCliSec); - - end_host_object(tid, thread); -} - -static HANDLE heventShutdown; - -static void LockModuleOOP(void) -{ - InterlockedIncrement(&cLocks); /* for test purposes only */ - CoAddRefServerProcess(); -} - -static void UnlockModuleOOP(void) -{ - InterlockedDecrement(&cLocks); /* for test purposes only */ - if (!CoReleaseServerProcess()) - SetEvent(heventShutdown); -} - -static HWND hwnd_app; - -static HRESULT WINAPI TestOOP_IClassFactory_QueryInterface( - LPCLASSFACTORY iface, - REFIID riid, - LPVOID *ppvObj) -{ - if (ppvObj == NULL) return E_POINTER; - - if (IsEqualGUID(riid, &IID_IUnknown) || - IsEqualGUID(riid, &IID_IClassFactory)) - { - *ppvObj = iface; - IClassFactory_AddRef(iface); - return S_OK; - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI TestOOP_IClassFactory_AddRef(LPCLASSFACTORY iface) -{ - return 2; /* non-heap-based object */ -} - -static ULONG WINAPI TestOOP_IClassFactory_Release(LPCLASSFACTORY iface) -{ - return 1; /* non-heap-based object */ -} - -static HRESULT WINAPI TestOOP_IClassFactory_CreateInstance( - LPCLASSFACTORY iface, - LPUNKNOWN pUnkOuter, - REFIID riid, - LPVOID *ppvObj) -{ - if (IsEqualIID(riid, &IID_IClassFactory) || IsEqualIID(riid, &IID_IUnknown)) - { - *ppvObj = iface; - return S_OK; - } - return CLASS_E_CLASSNOTAVAILABLE; -} - -static HRESULT WINAPI TestOOP_IClassFactory_LockServer( - LPCLASSFACTORY iface, - BOOL fLock) -{ - if (fLock) - LockModuleOOP(); - else - UnlockModuleOOP(); - return S_OK; -} - -static const IClassFactoryVtbl TestClassFactoryOOP_Vtbl = -{ - TestOOP_IClassFactory_QueryInterface, - TestOOP_IClassFactory_AddRef, - TestOOP_IClassFactory_Release, - TestOOP_IClassFactory_CreateInstance, - TestOOP_IClassFactory_LockServer -}; - -static IClassFactory TestOOP_ClassFactory = { &TestClassFactoryOOP_Vtbl }; - -static void test_register_local_server(void) -{ - DWORD cookie; - HRESULT hr; - HANDLE ready_event; - HANDLE quit_event; - DWORD wait; - - heventShutdown = CreateEvent(NULL, TRUE, FALSE, NULL); - - hr = CoRegisterClassObject(&CLSID_WineOOPTest, (IUnknown *)&TestOOP_ClassFactory, - CLSCTX_LOCAL_SERVER, REGCLS_SINGLEUSE, &cookie); - ok_ole_success(hr, CoRegisterClassObject); - - ready_event = CreateEvent(NULL, FALSE, FALSE, "Wine COM Test Ready Event"); - SetEvent(ready_event); - - quit_event = CreateEvent(NULL, FALSE, FALSE, "Wine COM Test Quit Event"); - - do - { - wait = MsgWaitForMultipleObjects(1, &quit_event, FALSE, 30000, QS_ALLINPUT); - if (wait == WAIT_OBJECT_0+1) - { - MSG msg; - BOOL ret = PeekMessage(&msg, NULL, 0, 0, PM_REMOVE); - if (ret) - { - trace("Message 0x%x\n", msg.message); - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } - } - while (wait == WAIT_OBJECT_0+1); - - ok( wait == WAIT_OBJECT_0, "quit event wait timed out\n" ); - hr = CoRevokeClassObject(cookie); - ok_ole_success(hr, CoRevokeClassObject); -} - -static HANDLE create_target_process(const char *arg) -{ - char **argv; - char cmdline[MAX_PATH]; - PROCESS_INFORMATION pi; - STARTUPINFO si = { 0 }; - si.cb = sizeof(si); - - pi.hThread = NULL; - pi.hProcess = NULL; - winetest_get_mainargs( &argv ); - sprintf(cmdline, "%s %s %s", argv[0], argv[1], arg); - ok(CreateProcess(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, - &si, &pi) != 0, "CreateProcess failed with error: %u\n", GetLastError()); - if (pi.hThread) CloseHandle(pi.hThread); - return pi.hProcess; -} - -/* tests functions commonly used by out of process COM servers */ -static void test_local_server(void) -{ - DWORD cookie; - HRESULT hr; - IClassFactory * cf; - DWORD ret; - HANDLE process; - HANDLE quit_event; - HANDLE ready_event; - - heventShutdown = CreateEvent(NULL, TRUE, FALSE, NULL); - - cLocks = 0; - - /* Start the object suspended */ - hr = CoRegisterClassObject(&CLSID_WineOOPTest, (IUnknown *)&TestOOP_ClassFactory, - CLSCTX_LOCAL_SERVER, REGCLS_MULTIPLEUSE | REGCLS_SUSPENDED, &cookie); - ok_ole_success(hr, CoRegisterClassObject); - - /* ... and CoGetClassObject does not find it and fails when it looks for the - * class in the registry */ - hr = CoGetClassObject(&CLSID_WineOOPTest, CLSCTX_INPROC_SERVER, - NULL, &IID_IClassFactory, (LPVOID*)&cf); - ok(hr == REGDB_E_CLASSNOTREG || /* NT */ - hr == S_OK /* Win9x */, - "CoGetClassObject should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr); - - /* Resume the object suspended above ... */ - hr = CoResumeClassObjects(); - ok_ole_success(hr, CoResumeClassObjects); - - /* ... and now it should succeed */ - hr = CoGetClassObject(&CLSID_WineOOPTest, CLSCTX_INPROC_SERVER, - NULL, &IID_IClassFactory, (LPVOID*)&cf); - ok_ole_success(hr, CoGetClassObject); - - /* Now check the locking is working */ - /* NOTE: we are accessing the class directly, not through a proxy */ - - ok_no_locks(); - - hr = IClassFactory_LockServer(cf, TRUE); - ok_ole_success(hr, IClassFactory_LockServer); - - ok_more_than_one_lock(); - - IClassFactory_LockServer(cf, FALSE); - ok_ole_success(hr, IClassFactory_LockServer); - - ok_no_locks(); - - IClassFactory_Release(cf); - - /* wait for shutdown signal */ - ret = WaitForSingleObject(heventShutdown, 0); - ok(ret != WAIT_TIMEOUT, "Server didn't shut down\n"); - - /* try to connect again after SCM has suspended registered class objects */ - hr = CoGetClassObject(&CLSID_WineOOPTest, CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER, NULL, - &IID_IClassFactory, (LPVOID*)&cf); - ok(hr == CO_E_SERVER_STOPPING || /* NT */ - hr == REGDB_E_CLASSNOTREG || /* win2k */ - hr == S_OK /* Win9x */, - "CoGetClassObject should have returned CO_E_SERVER_STOPPING or REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr); - - hr = CoRevokeClassObject(cookie); - ok_ole_success(hr, CoRevokeClassObject); - - CloseHandle(heventShutdown); - - process = create_target_process("-Embedding"); - ok(process != NULL, "couldn't start local server process, error was %d\n", GetLastError()); - - ready_event = CreateEvent(NULL, FALSE, FALSE, "Wine COM Test Ready Event"); - ok( !WaitForSingleObject(ready_event, 10000), "wait timed out\n" ); - CloseHandle(ready_event); - - hr = CoCreateInstance(&CLSID_WineOOPTest, NULL, CLSCTX_LOCAL_SERVER, &IID_IClassFactory, (void **)&cf); - ok_ole_success(hr, CoCreateInstance); - - IClassFactory_Release(cf); - - hr = CoCreateInstance(&CLSID_WineOOPTest, NULL, CLSCTX_LOCAL_SERVER, &IID_IClassFactory, (void **)&cf); - ok(hr == REGDB_E_CLASSNOTREG, "Second CoCreateInstance on REGCLS_SINGLEUSE object should have failed\n"); - - quit_event = CreateEvent(NULL, FALSE, FALSE, "Wine COM Test Quit Event"); - SetEvent(quit_event); - - winetest_wait_child_process( process ); - CloseHandle(quit_event); - CloseHandle(process); -} - -struct git_params -{ - DWORD cookie; - IGlobalInterfaceTable *git; -}; - -static DWORD CALLBACK get_global_interface_proc(LPVOID pv) -{ - HRESULT hr; - struct git_params *params = pv; - IClassFactory *cf; - - hr = IGlobalInterfaceTable_GetInterfaceFromGlobal(params->git, params->cookie, &IID_IClassFactory, (void **)&cf); - ok(hr == CO_E_NOTINITIALIZED || - broken(hr == E_UNEXPECTED) /* win2k */ || - broken(hr == S_OK) /* NT 4 */, - "IGlobalInterfaceTable_GetInterfaceFromGlobal should have failed with error CO_E_NOTINITIALIZED or E_UNEXPECTED instead of 0x%08x\n", - hr); - if (hr == S_OK) - IClassFactory_Release(cf); - - CoInitialize(NULL); - - hr = IGlobalInterfaceTable_GetInterfaceFromGlobal(params->git, params->cookie, &IID_IClassFactory, (void **)&cf); - ok_ole_success(hr, IGlobalInterfaceTable_GetInterfaceFromGlobal); - - IClassFactory_Release(cf); - - CoUninitialize(); - - return hr; -} - -static void test_globalinterfacetable(void) -{ - HRESULT hr; - IGlobalInterfaceTable *git; - DWORD cookie; - HANDLE thread; - DWORD tid; - struct git_params params; - DWORD ret; - IUnknown *object; - - trace("test_globalinterfacetable\n"); - cLocks = 0; - - hr = CoCreateInstance(&CLSID_StdGlobalInterfaceTable, NULL, CLSCTX_INPROC_SERVER, &IID_IGlobalInterfaceTable, (void **)&git); - ok_ole_success(hr, CoCreateInstance); - - hr = IGlobalInterfaceTable_RegisterInterfaceInGlobal(git, (IUnknown *)&Test_ClassFactory, &IID_IClassFactory, &cookie); - ok_ole_success(hr, IGlobalInterfaceTable_RegisterInterfaceInGlobal); - - ok_more_than_one_lock(); - - params.cookie = cookie; - params.git = git; - /* note: params is on stack so we MUST wait for get_global_interface_proc - * to exit before we can return */ - thread = CreateThread(NULL, 0, get_global_interface_proc, ¶ms, 0, &tid); - - ret = MsgWaitForMultipleObjects(1, &thread, FALSE, 10000, QS_ALLINPUT); - while (ret == WAIT_OBJECT_0 + 1) - { - MSG msg; - while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) - DispatchMessage(&msg); - ret = MsgWaitForMultipleObjects(1, &thread, FALSE, 10000, QS_ALLINPUT); - } - - CloseHandle(thread); - - /* test getting interface from global with different iid */ - hr = IGlobalInterfaceTable_GetInterfaceFromGlobal(git, cookie, &IID_IUnknown, (void **)&object); - ok_ole_success(hr, IGlobalInterfaceTable_GetInterfaceFromGlobal); - IUnknown_Release(object); - - /* test getting interface from global with same iid */ - hr = IGlobalInterfaceTable_GetInterfaceFromGlobal(git, cookie, &IID_IClassFactory, (void **)&object); - ok_ole_success(hr, IGlobalInterfaceTable_GetInterfaceFromGlobal); - IUnknown_Release(object); - - hr = IGlobalInterfaceTable_RevokeInterfaceFromGlobal(git, cookie); - ok_ole_success(hr, IGlobalInterfaceTable_RevokeInterfaceFromGlobal); - - ok_no_locks(); - - IGlobalInterfaceTable_Release(git); -} - -static const char *debugstr_iid(REFIID riid) -{ - static char name[256]; - HKEY hkeyInterface; - WCHAR bufferW[39]; - char buffer[39]; - LONG name_size = sizeof(name); - StringFromGUID2(riid, bufferW, sizeof(bufferW)/sizeof(bufferW[0])); - WideCharToMultiByte(CP_ACP, 0, bufferW, sizeof(bufferW)/sizeof(bufferW[0]), buffer, sizeof(buffer), NULL, NULL); - if (RegOpenKeyEx(HKEY_CLASSES_ROOT, "Interface", 0, KEY_QUERY_VALUE, &hkeyInterface) != ERROR_SUCCESS) - { - memcpy(name, buffer, sizeof(buffer)); - goto done; - } - if (RegQueryValue(hkeyInterface, buffer, name, &name_size) != ERROR_SUCCESS) - { - memcpy(name, buffer, sizeof(buffer)); - goto done; - } - RegCloseKey(hkeyInterface); -done: - return name; -} - -static HRESULT WINAPI TestChannelHook_QueryInterface(IChannelHook *iface, REFIID riid, void **ppv) -{ - if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IChannelHook)) - { - *ppv = iface; - IUnknown_AddRef(iface); - return S_OK; - } - - *ppv = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI TestChannelHook_AddRef(IChannelHook *iface) -{ - return 2; -} - -static ULONG WINAPI TestChannelHook_Release(IChannelHook *iface) -{ - return 1; -} - -static void WINAPI TestChannelHook_ClientGetSize( - IChannelHook *iface, - REFGUID uExtent, - REFIID riid, - ULONG *pDataSize ) -{ - SChannelHookCallInfo *info = (SChannelHookCallInfo *)riid; - trace("TestChannelHook_ClientGetBuffer\n"); - trace("\t%s method %d\n", debugstr_iid(riid), info->iMethod); - trace("\tcid: %s\n", debugstr_iid(&info->uCausality)); - ok(info->cbSize == sizeof(*info), "info->cbSize was %d instead of %d\n", info->cbSize, (int)sizeof(*info)); - ok(info->dwServerPid == GetCurrentProcessId(), "info->dwServerPid was 0x%x instead of 0x%x\n", info->dwServerPid, GetCurrentProcessId()); - ok(!info->pObject, "info->pObject should be NULL\n"); - ok(IsEqualGUID(uExtent, &EXTENTID_WineTest), "uExtent wasn't correct\n"); - - *pDataSize = 1; -} - -static void WINAPI TestChannelHook_ClientFillBuffer( - IChannelHook *iface, - REFGUID uExtent, - REFIID riid, - ULONG *pDataSize, - void *pDataBuffer ) -{ - SChannelHookCallInfo *info = (SChannelHookCallInfo *)riid; - trace("TestChannelHook_ClientFillBuffer\n"); - ok(info->cbSize == sizeof(*info), "info->cbSize was %d instead of %d\n", info->cbSize, (int)sizeof(*info)); - ok(info->dwServerPid == GetCurrentProcessId(), "info->dwServerPid was 0x%x instead of 0x%x\n", info->dwServerPid, GetCurrentProcessId()); - ok(!info->pObject, "info->pObject should be NULL\n"); - ok(IsEqualGUID(uExtent, &EXTENTID_WineTest), "uExtent wasn't correct\n"); - - *(unsigned char *)pDataBuffer = 0xcc; - *pDataSize = 1; -} - -static void WINAPI TestChannelHook_ClientNotify( - IChannelHook *iface, - REFGUID uExtent, - REFIID riid, - ULONG cbDataSize, - void *pDataBuffer, - DWORD lDataRep, - HRESULT hrFault ) -{ - SChannelHookCallInfo *info = (SChannelHookCallInfo *)riid; - trace("TestChannelHook_ClientNotify hrFault = 0x%08x\n", hrFault); - ok(info->cbSize == sizeof(*info), "info->cbSize was %d instead of %d\n", info->cbSize, (int)sizeof(*info)); - ok(info->dwServerPid == GetCurrentProcessId(), "info->dwServerPid was 0x%x instead of 0x%x\n", info->dwServerPid, GetCurrentProcessId()); - todo_wine { - ok(info->pObject != NULL, "info->pObject shouldn't be NULL\n"); - } - ok(IsEqualGUID(uExtent, &EXTENTID_WineTest), "uExtent wasn't correct\n"); -} - -static void WINAPI TestChannelHook_ServerNotify( - IChannelHook *iface, - REFGUID uExtent, - REFIID riid, - ULONG cbDataSize, - void *pDataBuffer, - DWORD lDataRep ) -{ - SChannelHookCallInfo *info = (SChannelHookCallInfo *)riid; - trace("TestChannelHook_ServerNotify\n"); - ok(info->cbSize == sizeof(*info), "info->cbSize was %d instead of %d\n", info->cbSize, (int)sizeof(*info)); - ok(info->dwServerPid == GetCurrentProcessId(), "info->dwServerPid was 0x%x instead of 0x%x\n", info->dwServerPid, GetCurrentProcessId()); - ok(info->pObject != NULL, "info->pObject shouldn't be NULL\n"); - ok(cbDataSize == 1, "cbDataSize should have been 1 instead of %d\n", cbDataSize); - ok(*(unsigned char *)pDataBuffer == 0xcc, "pDataBuffer should have contained 0xcc instead of 0x%x\n", *(unsigned char *)pDataBuffer); - ok(IsEqualGUID(uExtent, &EXTENTID_WineTest), "uExtent wasn't correct\n"); -} - -static void WINAPI TestChannelHook_ServerGetSize( - IChannelHook *iface, - REFGUID uExtent, - REFIID riid, - HRESULT hrFault, - ULONG *pDataSize ) -{ - SChannelHookCallInfo *info = (SChannelHookCallInfo *)riid; - trace("TestChannelHook_ServerGetSize\n"); - trace("\t%s method %d\n", debugstr_iid(riid), info->iMethod); - ok(info->cbSize == sizeof(*info), "info->cbSize was %d instead of %d\n", info->cbSize, (int)sizeof(*info)); - ok(info->dwServerPid == GetCurrentProcessId(), "info->dwServerPid was 0x%x instead of 0x%x\n", info->dwServerPid, GetCurrentProcessId()); - ok(info->pObject != NULL, "info->pObject shouldn't be NULL\n"); - ok(IsEqualGUID(uExtent, &EXTENTID_WineTest), "uExtent wasn't correct\n"); - if (hrFault != S_OK) - trace("\thrFault = 0x%08x\n", hrFault); - - *pDataSize = 0; -} - -static void WINAPI TestChannelHook_ServerFillBuffer( - IChannelHook *iface, - REFGUID uExtent, - REFIID riid, - ULONG *pDataSize, - void *pDataBuffer, - HRESULT hrFault ) -{ - trace("TestChannelHook_ServerFillBuffer\n"); - ok(0, "TestChannelHook_ServerFillBuffer shouldn't be called\n"); -} - -static const IChannelHookVtbl TestChannelHookVtbl = -{ - TestChannelHook_QueryInterface, - TestChannelHook_AddRef, - TestChannelHook_Release, - TestChannelHook_ClientGetSize, - TestChannelHook_ClientFillBuffer, - TestChannelHook_ClientNotify, - TestChannelHook_ServerNotify, - TestChannelHook_ServerGetSize, - TestChannelHook_ServerFillBuffer, -}; - -static IChannelHook TestChannelHook = { &TestChannelHookVtbl }; - -static void test_channel_hook(void) -{ - IStream *pStream = NULL; - IClassFactory *cf = NULL; - DWORD tid; - IUnknown *proxy = NULL; - HANDLE thread; - HRESULT hr; - - hr = CoRegisterChannelHook(&EXTENTID_WineTest, &TestChannelHook); - ok_ole_success(hr, CoRegisterChannelHook); - - hr = CoRegisterMessageFilter(&MessageFilter, NULL); - ok_ole_success(hr, CoRegisterMessageFilter); - - cLocks = 0; - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - tid = start_host_object2(pStream, &IID_IClassFactory, (IUnknown*)&Test_ClassFactory, MSHLFLAGS_NORMAL, &MessageFilter, &thread); - - ok_more_than_one_lock(); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IClassFactory, (void **)&cf); - ok_ole_success(hr, CoUnmarshalInterface); - IStream_Release(pStream); - - ok_more_than_one_lock(); - - hr = IClassFactory_CreateInstance(cf, NULL, &IID_IUnknown, (LPVOID*)&proxy); - ok_ole_success(hr, IClassFactory_CreateInstance); - IUnknown_Release(proxy); - - IClassFactory_Release(cf); - - ok_no_locks(); - - end_host_object(tid, thread); - - hr = CoRegisterMessageFilter(NULL, NULL); - ok_ole_success(hr, CoRegisterMessageFilter); -} - -START_TEST(marshal) -{ - HMODULE hOle32 = GetModuleHandle("ole32"); - int argc; - char **argv; - - if (!(pCoInitializeEx = (void*)GetProcAddress(hOle32, "CoInitializeEx"))) goto no_test; - - argc = winetest_get_mainargs( &argv ); - if (argc > 2 && (!strcmp(argv[2], "-Embedding"))) - { - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - test_register_local_server(); - CoUninitialize(); - - return; - } - - register_test_window(); - - test_cocreateinstance_proxy(); - - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - /* FIXME: test CoCreateInstanceEx */ - - /* lifecycle management and marshaling tests */ - test_no_marshaler(); - test_normal_marshal_and_release(); - test_normal_marshal_and_unmarshal(); - test_marshal_and_unmarshal_invalid(); - test_same_apartment_unmarshal_failure(); - test_interthread_marshal_and_unmarshal(); - test_proxy_marshal_and_unmarshal(); - test_proxy_marshal_and_unmarshal2(); - test_proxy_marshal_and_unmarshal_weak(); - test_proxy_marshal_and_unmarshal_strong(); - test_marshal_stub_apartment_shutdown(); - test_marshal_proxy_apartment_shutdown(); - test_marshal_proxy_mta_apartment_shutdown(); - test_no_couninitialize_server(); - test_no_couninitialize_client(); - test_tableweak_marshal_and_unmarshal_twice(); - test_tableweak_marshal_releasedata1(); - test_tableweak_marshal_releasedata2(); - test_tableweak_and_normal_marshal_and_unmarshal(); - test_tablestrong_marshal_and_unmarshal_twice(); - test_lock_object_external(); - test_disconnect_stub(); - test_normal_marshal_and_unmarshal_twice(); - test_hresult_marshaling(); - test_proxy_used_in_wrong_thread(); - test_message_filter(); - test_bad_marshal_stream(); - test_proxy_interfaces(); - test_stubbuffer(&IID_IClassFactory); - test_proxybuffer(&IID_IClassFactory); - test_message_reentrancy(); - test_call_from_message(); - test_WM_QUIT_handling(); - test_freethreadedmarshaler(); - test_inproc_handler(); - test_handler_marshaling(); - test_client_security(); - - test_local_server(); - - test_globalinterfacetable(); - - /* must be last test as channel hooks can't be unregistered */ - test_channel_hook(); - - CoUninitialize(); - return; - -no_test: - trace("You need DCOM95 installed to run this test\n"); - return; -} diff --git a/rostests/winetests/ole32/moniker.c b/rostests/winetests/ole32/moniker.c deleted file mode 100644 index 876d034bcbc..00000000000 --- a/rostests/winetests/ole32/moniker.c +++ /dev/null @@ -1,2019 +0,0 @@ -/* - * Moniker Tests - * - * 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 - */ - -#define _WIN32_DCOM -#define COBJMACROS -#define CONST_VTABLE - -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "objbase.h" -#include "initguid.h" -#include "comcat.h" -#include "olectl.h" - -#include "wine/test.h" - -#define ok_more_than_one_lock() ok(cLocks > 0, "Number of locks should be > 0, but actually is %d\n", cLocks) -#define ok_no_locks() ok(cLocks == 0, "Number of locks should be 0, but actually is %d\n", cLocks) -#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08x\n", hr) -#define COUNTOF(x) (sizeof(x) / sizeof(x[0])) - -#define CHECK_EXPECTED_METHOD(method_name) \ -do { \ - trace("%s\n", method_name); \ - ok(*expected_method_list != NULL, "Extra method %s called\n", method_name); \ - if (*expected_method_list) \ - { \ - ok(!strcmp(*expected_method_list, method_name), "Expected %s to be called instead of %s\n", \ - *expected_method_list, method_name); \ - expected_method_list++; \ - } \ -} while(0) - -static char const * const *expected_method_list; -static const WCHAR wszFileName1[] = {'c',':','\\','w','i','n','d','o','w','s','\\','t','e','s','t','1','.','d','o','c',0}; -static const WCHAR wszFileName2[] = {'c',':','\\','w','i','n','d','o','w','s','\\','t','e','s','t','2','.','d','o','c',0}; - -static const CLSID CLSID_WineTest = -{ /* 9474ba1a-258b-490b-bc13-516e9239ace0 */ - 0x9474ba1a, - 0x258b, - 0x490b, - {0xbc, 0x13, 0x51, 0x6e, 0x92, 0x39, 0xac, 0xe0} -}; - -static const CLSID CLSID_TestMoniker = -{ /* b306bfbc-496e-4f53-b93e-2ff9c83223d7 */ - 0xb306bfbc, - 0x496e, - 0x4f53, - {0xb9, 0x3e, 0x2f, 0xf9, 0xc8, 0x32, 0x23, 0xd7} -}; - -static LONG cLocks; - -static void LockModule(void) -{ - InterlockedIncrement(&cLocks); -} - -static void UnlockModule(void) -{ - InterlockedDecrement(&cLocks); -} - -static SIZE_T round_global_size(SIZE_T size) -{ - static SIZE_T global_size_alignment = -1; - if (global_size_alignment == -1) - { - void *p = GlobalAlloc(GMEM_FIXED, 1); - global_size_alignment = GlobalSize(p); - GlobalFree(p); - } - - return ((size + global_size_alignment - 1) & ~(global_size_alignment - 1)); -} - -static HRESULT WINAPI Test_IClassFactory_QueryInterface( - LPCLASSFACTORY iface, - REFIID riid, - LPVOID *ppvObj) -{ - if (ppvObj == NULL) return E_POINTER; - - if (IsEqualGUID(riid, &IID_IUnknown) || - IsEqualGUID(riid, &IID_IClassFactory)) - { - *ppvObj = iface; - IClassFactory_AddRef(iface); - return S_OK; - } - - *ppvObj = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI Test_IClassFactory_AddRef(LPCLASSFACTORY iface) -{ - LockModule(); - return 2; /* non-heap-based object */ -} - -static ULONG WINAPI Test_IClassFactory_Release(LPCLASSFACTORY iface) -{ - UnlockModule(); - return 1; /* non-heap-based object */ -} - -static HRESULT WINAPI Test_IClassFactory_CreateInstance( - LPCLASSFACTORY iface, - LPUNKNOWN pUnkOuter, - REFIID riid, - LPVOID *ppvObj) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI Test_IClassFactory_LockServer( - LPCLASSFACTORY iface, - BOOL fLock) -{ - return S_OK; -} - -static const IClassFactoryVtbl TestClassFactory_Vtbl = -{ - Test_IClassFactory_QueryInterface, - Test_IClassFactory_AddRef, - Test_IClassFactory_Release, - Test_IClassFactory_CreateInstance, - Test_IClassFactory_LockServer -}; - -static IClassFactory Test_ClassFactory = { &TestClassFactory_Vtbl }; - -typedef struct -{ - const IUnknownVtbl *lpVtbl; - ULONG refs; -} HeapUnknown; - -static HRESULT WINAPI HeapUnknown_QueryInterface(IUnknown *iface, REFIID riid, void **ppv) -{ - if (IsEqualIID(riid, &IID_IUnknown)) - { - IUnknown_AddRef(iface); - *ppv = iface; - return S_OK; - } - *ppv = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI HeapUnknown_AddRef(IUnknown *iface) -{ - HeapUnknown *This = (HeapUnknown *)iface; - return InterlockedIncrement((LONG*)&This->refs); -} - -static ULONG WINAPI HeapUnknown_Release(IUnknown *iface) -{ - HeapUnknown *This = (HeapUnknown *)iface; - ULONG refs = InterlockedDecrement((LONG*)&This->refs); - if (!refs) HeapFree(GetProcessHeap(), 0, This); - return refs; -} - -static const IUnknownVtbl HeapUnknown_Vtbl = -{ - HeapUnknown_QueryInterface, - HeapUnknown_AddRef, - HeapUnknown_Release -}; - -static HRESULT WINAPI -MonikerNoROTData_QueryInterface(IMoniker* iface,REFIID riid,void** ppvObject) -{ - if (!ppvObject) - return E_INVALIDARG; - - *ppvObject = 0; - - if (IsEqualIID(&IID_IUnknown, riid) || - IsEqualIID(&IID_IPersist, riid) || - IsEqualIID(&IID_IPersistStream,riid) || - IsEqualIID(&IID_IMoniker, riid)) - *ppvObject = iface; - if (IsEqualIID(&IID_IROTData, riid)) - CHECK_EXPECTED_METHOD("Moniker_QueryInterface(IID_IROTData)"); - - if ((*ppvObject)==0) - return E_NOINTERFACE; - - IMoniker_AddRef(iface); - - return S_OK; -} - -static ULONG WINAPI -Moniker_AddRef(IMoniker* iface) -{ - return 2; -} - -static ULONG WINAPI -Moniker_Release(IMoniker* iface) -{ - return 1; -} - -static HRESULT WINAPI -Moniker_GetClassID(IMoniker* iface, CLSID *pClassID) -{ - CHECK_EXPECTED_METHOD("Moniker_GetClassID"); - - *pClassID = CLSID_TestMoniker; - - return S_OK; -} - -static HRESULT WINAPI -Moniker_IsDirty(IMoniker* iface) -{ - CHECK_EXPECTED_METHOD("Moniker_IsDirty"); - - return S_FALSE; -} - -static HRESULT WINAPI -Moniker_Load(IMoniker* iface, IStream* pStm) -{ - CHECK_EXPECTED_METHOD("Moniker_Load"); - return E_NOTIMPL; -} - -static HRESULT WINAPI -Moniker_Save(IMoniker* iface, IStream* pStm, BOOL fClearDirty) -{ - CHECK_EXPECTED_METHOD("Moniker_Save"); - return E_NOTIMPL; -} - -static HRESULT WINAPI -Moniker_GetSizeMax(IMoniker* iface, ULARGE_INTEGER* pcbSize) -{ - CHECK_EXPECTED_METHOD("Moniker_GetSizeMax"); - return E_NOTIMPL; -} - -static HRESULT WINAPI -Moniker_BindToObject(IMoniker* iface, IBindCtx* pbc, IMoniker* pmkToLeft, - REFIID riid, VOID** ppvResult) -{ - CHECK_EXPECTED_METHOD("Moniker_BindToObject"); - return E_NOTIMPL; -} - -static HRESULT WINAPI -Moniker_BindToStorage(IMoniker* iface, IBindCtx* pbc, IMoniker* pmkToLeft, - REFIID riid, VOID** ppvObject) -{ - CHECK_EXPECTED_METHOD("Moniker_BindToStorage"); - return E_NOTIMPL; -} - -static HRESULT WINAPI -Moniker_Reduce(IMoniker* iface, IBindCtx* pbc, DWORD dwReduceHowFar, - IMoniker** ppmkToLeft, IMoniker** ppmkReduced) -{ - CHECK_EXPECTED_METHOD("Moniker_Reduce"); - - if (ppmkReduced==NULL) - return E_POINTER; - - IMoniker_AddRef(iface); - - *ppmkReduced=iface; - - return MK_S_REDUCED_TO_SELF; -} - -static HRESULT WINAPI -Moniker_ComposeWith(IMoniker* iface, IMoniker* pmkRight, - BOOL fOnlyIfNotGeneric, IMoniker** ppmkComposite) -{ - CHECK_EXPECTED_METHOD("Moniker_ComposeWith"); - return E_NOTIMPL; -} - -static HRESULT WINAPI -Moniker_Enum(IMoniker* iface,BOOL fForward, IEnumMoniker** ppenumMoniker) -{ - CHECK_EXPECTED_METHOD("Moniker_Enum"); - - if (ppenumMoniker == NULL) - return E_POINTER; - - *ppenumMoniker = NULL; - - return S_OK; -} - -static HRESULT WINAPI -Moniker_IsEqual(IMoniker* iface,IMoniker* pmkOtherMoniker) -{ - CHECK_EXPECTED_METHOD("Moniker_IsEqual"); - return E_NOTIMPL; -} - -static HRESULT WINAPI -Moniker_Hash(IMoniker* iface,DWORD* pdwHash) -{ - CHECK_EXPECTED_METHOD("Moniker_Hash"); - return E_NOTIMPL; -} - -static HRESULT WINAPI -Moniker_IsRunning(IMoniker* iface, IBindCtx* pbc, IMoniker* pmkToLeft, - IMoniker* pmkNewlyRunning) -{ - CHECK_EXPECTED_METHOD("Moniker_IsRunning"); - return E_NOTIMPL; -} - -static HRESULT WINAPI -Moniker_GetTimeOfLastChange(IMoniker* iface, IBindCtx* pbc, - IMoniker* pmkToLeft, FILETIME* pFileTime) -{ - CHECK_EXPECTED_METHOD("Moniker_GetTimeOfLastChange"); - return E_NOTIMPL; -} - -static HRESULT WINAPI -Moniker_Inverse(IMoniker* iface,IMoniker** ppmk) -{ - CHECK_EXPECTED_METHOD("Moniker_Inverse"); - return E_NOTIMPL; -} - -static HRESULT WINAPI -Moniker_CommonPrefixWith(IMoniker* iface,IMoniker* pmkOther,IMoniker** ppmkPrefix) -{ - CHECK_EXPECTED_METHOD("Moniker_CommonPrefixWith"); - return E_NOTIMPL; -} - -static HRESULT WINAPI -Moniker_RelativePathTo(IMoniker* iface,IMoniker* pmOther, IMoniker** ppmkRelPath) -{ - CHECK_EXPECTED_METHOD("Moniker_RelativePathTo"); - return E_NOTIMPL; -} - -static HRESULT WINAPI -Moniker_GetDisplayName(IMoniker* iface, IBindCtx* pbc, - IMoniker* pmkToLeft, LPOLESTR *ppszDisplayName) -{ - static const WCHAR wszDisplayName[] = {'*','*','G','e','m','m','a',0}; - CHECK_EXPECTED_METHOD("Moniker_GetDisplayName"); - *ppszDisplayName = CoTaskMemAlloc(sizeof(wszDisplayName)); - memcpy(*ppszDisplayName, wszDisplayName, sizeof(wszDisplayName)); - return S_OK; -} - -static HRESULT WINAPI -Moniker_ParseDisplayName(IMoniker* iface, IBindCtx* pbc, IMoniker* pmkToLeft, - LPOLESTR pszDisplayName, ULONG* pchEaten, IMoniker** ppmkOut) -{ - CHECK_EXPECTED_METHOD("Moniker_ParseDisplayName"); - return E_NOTIMPL; -} - -static HRESULT WINAPI -Moniker_IsSystemMoniker(IMoniker* iface,DWORD* pwdMksys) -{ - CHECK_EXPECTED_METHOD("Moniker_IsSystemMoniker"); - - if (!pwdMksys) - return E_POINTER; - - (*pwdMksys)=MKSYS_NONE; - - return S_FALSE; -} - -static const IMonikerVtbl MonikerNoROTDataVtbl = -{ - MonikerNoROTData_QueryInterface, - Moniker_AddRef, - Moniker_Release, - Moniker_GetClassID, - Moniker_IsDirty, - Moniker_Load, - Moniker_Save, - Moniker_GetSizeMax, - Moniker_BindToObject, - Moniker_BindToStorage, - Moniker_Reduce, - Moniker_ComposeWith, - Moniker_Enum, - Moniker_IsEqual, - Moniker_Hash, - Moniker_IsRunning, - Moniker_GetTimeOfLastChange, - Moniker_Inverse, - Moniker_CommonPrefixWith, - Moniker_RelativePathTo, - Moniker_GetDisplayName, - Moniker_ParseDisplayName, - Moniker_IsSystemMoniker -}; - -static IMoniker MonikerNoROTData = { &MonikerNoROTDataVtbl }; - -static IMoniker Moniker; - -static HRESULT WINAPI -ROTData_QueryInterface(IROTData *iface,REFIID riid,VOID** ppvObject) -{ - return IMoniker_QueryInterface(&Moniker, riid, ppvObject); -} - -static ULONG WINAPI -ROTData_AddRef(IROTData *iface) -{ - return 2; -} - -static ULONG WINAPI -ROTData_Release(IROTData* iface) -{ - return 1; -} - -static HRESULT WINAPI -ROTData_GetComparisonData(IROTData* iface, BYTE* pbData, - ULONG cbMax, ULONG* pcbData) -{ - CHECK_EXPECTED_METHOD("ROTData_GetComparisonData"); - - *pcbData = 1; - if (cbMax < *pcbData) - return E_OUTOFMEMORY; - - *pbData = 0xde; - - return S_OK; -} - -static IROTDataVtbl ROTDataVtbl = -{ - ROTData_QueryInterface, - ROTData_AddRef, - ROTData_Release, - ROTData_GetComparisonData -}; - -static IROTData ROTData = { &ROTDataVtbl }; - -static HRESULT WINAPI -Moniker_QueryInterface(IMoniker* iface,REFIID riid,void** ppvObject) -{ - if (!ppvObject) - return E_INVALIDARG; - - *ppvObject = 0; - - if (IsEqualIID(&IID_IUnknown, riid) || - IsEqualIID(&IID_IPersist, riid) || - IsEqualIID(&IID_IPersistStream,riid) || - IsEqualIID(&IID_IMoniker, riid)) - *ppvObject = iface; - if (IsEqualIID(&IID_IROTData, riid)) - { - CHECK_EXPECTED_METHOD("Moniker_QueryInterface(IID_IROTData)"); - *ppvObject = &ROTData; - } - - if ((*ppvObject)==0) - return E_NOINTERFACE; - - IMoniker_AddRef(iface); - - return S_OK; -} - -static const IMonikerVtbl MonikerVtbl = -{ - Moniker_QueryInterface, - Moniker_AddRef, - Moniker_Release, - Moniker_GetClassID, - Moniker_IsDirty, - Moniker_Load, - Moniker_Save, - Moniker_GetSizeMax, - Moniker_BindToObject, - Moniker_BindToStorage, - Moniker_Reduce, - Moniker_ComposeWith, - Moniker_Enum, - Moniker_IsEqual, - Moniker_Hash, - Moniker_IsRunning, - Moniker_GetTimeOfLastChange, - Moniker_Inverse, - Moniker_CommonPrefixWith, - Moniker_RelativePathTo, - Moniker_GetDisplayName, - Moniker_ParseDisplayName, - Moniker_IsSystemMoniker -}; - -static IMoniker Moniker = { &MonikerVtbl }; - -static void test_ROT(void) -{ - static const WCHAR wszFileName[] = {'B','E','2','0','E','2','F','5','-', - '1','9','0','3','-','4','A','A','E','-','B','1','A','F','-', - '2','0','4','6','E','5','8','6','C','9','2','5',0}; - HRESULT hr; - IMoniker *pMoniker = NULL; - IRunningObjectTable *pROT = NULL; - DWORD dwCookie; - static const char *methods_register_no_ROTData[] = - { - "Moniker_Reduce", - "Moniker_GetTimeOfLastChange", - "Moniker_QueryInterface(IID_IROTData)", - "Moniker_GetDisplayName", - "Moniker_GetClassID", - NULL - }; - static const char *methods_register[] = - { - "Moniker_Reduce", - "Moniker_GetTimeOfLastChange", - "Moniker_QueryInterface(IID_IROTData)", - "ROTData_GetComparisonData", - NULL - }; - static const char *methods_isrunning_no_ROTData[] = - { - "Moniker_Reduce", - "Moniker_QueryInterface(IID_IROTData)", - "Moniker_GetDisplayName", - "Moniker_GetClassID", - NULL - }; - static const char *methods_isrunning[] = - { - "Moniker_Reduce", - "Moniker_QueryInterface(IID_IROTData)", - "ROTData_GetComparisonData", - NULL - }; - - cLocks = 0; - - hr = GetRunningObjectTable(0, &pROT); - ok_ole_success(hr, GetRunningObjectTable); - - expected_method_list = methods_register_no_ROTData; - /* try with our own moniker that doesn't support IROTData */ - hr = IRunningObjectTable_Register(pROT, ROTFLAGS_REGISTRATIONKEEPSALIVE, - (IUnknown*)&Test_ClassFactory, &MonikerNoROTData, &dwCookie); - ok_ole_success(hr, IRunningObjectTable_Register); - ok(!*expected_method_list, "Method sequence starting from %s not called\n", *expected_method_list); - - ok_more_than_one_lock(); - - expected_method_list = methods_isrunning_no_ROTData; - hr = IRunningObjectTable_IsRunning(pROT, &MonikerNoROTData); - ok_ole_success(hr, IRunningObjectTable_IsRunning); - ok(!*expected_method_list, "Method sequence starting from %s not called\n", *expected_method_list); - - hr = IRunningObjectTable_Revoke(pROT, dwCookie); - ok_ole_success(hr, IRunningObjectTable_Revoke); - - ok_no_locks(); - - expected_method_list = methods_register; - /* try with our own moniker */ - hr = IRunningObjectTable_Register(pROT, ROTFLAGS_REGISTRATIONKEEPSALIVE, - (IUnknown*)&Test_ClassFactory, &Moniker, &dwCookie); - ok_ole_success(hr, IRunningObjectTable_Register); - ok(!*expected_method_list, "Method sequence starting from %s not called\n", *expected_method_list); - - ok_more_than_one_lock(); - - expected_method_list = methods_isrunning; - hr = IRunningObjectTable_IsRunning(pROT, &Moniker); - ok_ole_success(hr, IRunningObjectTable_IsRunning); - ok(!*expected_method_list, "Method sequence starting from %s not called\n", *expected_method_list); - - hr = IRunningObjectTable_Revoke(pROT, dwCookie); - ok_ole_success(hr, IRunningObjectTable_Revoke); - - ok_no_locks(); - - hr = CreateFileMoniker(wszFileName, &pMoniker); - ok_ole_success(hr, CreateClassMoniker); - - /* test flags: 0 */ - hr = IRunningObjectTable_Register(pROT, 0, (IUnknown*)&Test_ClassFactory, - pMoniker, &dwCookie); - ok_ole_success(hr, IRunningObjectTable_Register); - - ok_more_than_one_lock(); - - hr = IRunningObjectTable_Revoke(pROT, dwCookie); - ok_ole_success(hr, IRunningObjectTable_Revoke); - - ok_no_locks(); - - /* test flags: ROTFLAGS_REGISTRATIONKEEPSALIVE */ - hr = IRunningObjectTable_Register(pROT, ROTFLAGS_REGISTRATIONKEEPSALIVE, - (IUnknown*)&Test_ClassFactory, pMoniker, &dwCookie); - ok_ole_success(hr, IRunningObjectTable_Register); - - ok_more_than_one_lock(); - - hr = IRunningObjectTable_Revoke(pROT, dwCookie); - ok_ole_success(hr, IRunningObjectTable_Revoke); - - ok_no_locks(); - - /* test flags: ROTFLAGS_REGISTRATIONKEEPSALIVE|ROTFLAGS_ALLOWANYCLIENT */ - /* only succeeds when process is started by SCM and has LocalService - * or RunAs AppId values */ - hr = IRunningObjectTable_Register(pROT, - ROTFLAGS_REGISTRATIONKEEPSALIVE|ROTFLAGS_ALLOWANYCLIENT, - (IUnknown*)&Test_ClassFactory, pMoniker, &dwCookie); - todo_wine { - ok(hr == CO_E_WRONG_SERVER_IDENTITY || - broken(hr == S_OK) /* Win9x */, - "IRunningObjectTable_Register should have returned CO_E_WRONG_SERVER_IDENTITY instead of 0x%08x\n", hr); - } - if (hr == S_OK) IRunningObjectTable_Revoke(pROT, dwCookie); - - hr = IRunningObjectTable_Register(pROT, 0xdeadbeef, - (IUnknown*)&Test_ClassFactory, pMoniker, &dwCookie); - ok(hr == E_INVALIDARG, "IRunningObjectTable_Register should have returned E_INVALIDARG instead of 0x%08x\n", hr); - - IMoniker_Release(pMoniker); - - IRunningObjectTable_Release(pROT); -} - -static void test_ROT_multiple_entries(void) -{ - HRESULT hr; - IMoniker *pMoniker = NULL; - IRunningObjectTable *pROT = NULL; - DWORD dwCookie1, dwCookie2; - IUnknown *pObject = NULL; - static const WCHAR moniker_path[] = - {'\\', 'w','i','n','d','o','w','s','\\','s','y','s','t','e','m','\\','t','e','s','t','1','.','d','o','c',0}; - - hr = GetRunningObjectTable(0, &pROT); - ok_ole_success(hr, GetRunningObjectTable); - - hr = CreateFileMoniker(moniker_path, &pMoniker); - ok_ole_success(hr, CreateFileMoniker); - - hr = IRunningObjectTable_Register(pROT, 0, (IUnknown *)&Test_ClassFactory, pMoniker, &dwCookie1); - ok_ole_success(hr, IRunningObjectTable_Register); - - hr = IRunningObjectTable_Register(pROT, 0, (IUnknown *)&Test_ClassFactory, pMoniker, &dwCookie2); - ok(hr == MK_S_MONIKERALREADYREGISTERED, "IRunningObjectTable_Register should have returned MK_S_MONIKERALREADYREGISTERED instead of 0x%08x\n", hr); - - ok(dwCookie1 != dwCookie2, "cookie returned for registering duplicate object shouldn't match cookie of original object (0x%x)\n", dwCookie1); - - hr = IRunningObjectTable_GetObject(pROT, pMoniker, &pObject); - ok_ole_success(hr, IRunningObjectTable_GetObject); - IUnknown_Release(pObject); - - hr = IRunningObjectTable_Revoke(pROT, dwCookie1); - ok_ole_success(hr, IRunningObjectTable_Revoke); - - hr = IRunningObjectTable_GetObject(pROT, pMoniker, &pObject); - ok_ole_success(hr, IRunningObjectTable_GetObject); - IUnknown_Release(pObject); - - hr = IRunningObjectTable_Revoke(pROT, dwCookie2); - ok_ole_success(hr, IRunningObjectTable_Revoke); - - IMoniker_Release(pMoniker); - - IRunningObjectTable_Release(pROT); -} - -static HRESULT WINAPI ParseDisplayName_QueryInterface(IParseDisplayName *iface, REFIID riid, void **ppv) -{ - if (IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IParseDisplayName)) - { - *ppv = iface; - IUnknown_AddRef(iface); - return S_OK; - } - *ppv = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI ParseDisplayName_AddRef(IParseDisplayName *iface) -{ - return 2; -} - -static ULONG WINAPI ParseDisplayName_Release(IParseDisplayName *iface) -{ - return 1; -} - -static LPCWSTR expected_display_name; - -static HRESULT WINAPI ParseDisplayName_ParseDisplayName(IParseDisplayName *iface, - IBindCtx *pbc, - LPOLESTR pszDisplayName, - ULONG *pchEaten, - IMoniker **ppmkOut) -{ - char display_nameA[256]; - WideCharToMultiByte(CP_ACP, 0, pszDisplayName, -1, display_nameA, sizeof(display_nameA), NULL, NULL); - ok(!lstrcmpW(pszDisplayName, expected_display_name), "unexpected display name \"%s\"\n", display_nameA); - ok(pszDisplayName == expected_display_name, "pszDisplayName should be the same pointer as passed into MkParseDisplayName\n"); - *pchEaten = lstrlenW(pszDisplayName); - return CreateAntiMoniker(ppmkOut); -} - -static const IParseDisplayNameVtbl ParseDisplayName_Vtbl = -{ - ParseDisplayName_QueryInterface, - ParseDisplayName_AddRef, - ParseDisplayName_Release, - ParseDisplayName_ParseDisplayName -}; - -static IParseDisplayName ParseDisplayName = { &ParseDisplayName_Vtbl }; - -static int count_moniker_matches(IBindCtx * pbc, IEnumMoniker * spEM) -{ - IMoniker * spMoniker; - int monCnt=0, matchCnt=0; - - while ((IEnumMoniker_Next(spEM, 1, &spMoniker, NULL)==S_OK)) - { - HRESULT hr; - WCHAR * szDisplayn; - monCnt++; - hr=IMoniker_GetDisplayName(spMoniker, pbc, NULL, &szDisplayn); - if (SUCCEEDED(hr)) - { - if (!lstrcmpiW(szDisplayn, wszFileName1) || !lstrcmpiW(szDisplayn, wszFileName2)) - matchCnt++; - CoTaskMemFree(szDisplayn); - } - } - trace("Total number of monikers is %i\n", monCnt); - return matchCnt; -} - -static void test_MkParseDisplayName(void) -{ - IBindCtx * pbc = NULL; - HRESULT hr; - IMoniker * pmk = NULL; - IMoniker * pmk1 = NULL; - IMoniker * pmk2 = NULL; - ULONG eaten; - int matchCnt; - IUnknown * object = NULL; - - IUnknown *lpEM1; - - IEnumMoniker *spEM1 = NULL; - IEnumMoniker *spEM2 = NULL; - IEnumMoniker *spEM3 = NULL; - - DWORD pdwReg1=0; - DWORD grflags=0; - DWORD pdwReg2=0; - DWORD moniker_type; - IRunningObjectTable * pprot=NULL; - - /* CLSID of My Computer */ - static const WCHAR wszDisplayName[] = {'c','l','s','i','d',':', - '2','0','D','0','4','F','E','0','-','3','A','E','A','-','1','0','6','9','-','A','2','D','8','-','0','8','0','0','2','B','3','0','3','0','9','D',':',0}; - static const WCHAR wszDisplayNameClsid[] = {'c','l','s','i','d',':',0}; - static const WCHAR wszNonExistentProgId[] = {'N','o','n','E','x','i','s','t','e','n','t','P','r','o','g','I','d',':',0}; - static const WCHAR wszDisplayNameRunning[] = {'W','i','n','e','T','e','s','t','R','u','n','n','i','n','g',0}; - static const WCHAR wszDisplayNameProgId1[] = {'S','t','d','F','o','n','t',':',0}; - static const WCHAR wszDisplayNameProgId2[] = {'@','S','t','d','F','o','n','t',0}; - static const WCHAR wszDisplayNameProgIdFail[] = {'S','t','d','F','o','n','t',0}; - static const WCHAR wszEmpty[] = {0}; - char szDisplayNameFile[256]; - WCHAR wszDisplayNameFile[256]; - int i, len; - - const struct - { - LPBC *ppbc; - LPCOLESTR szDisplayName; - LPDWORD pchEaten; - LPMONIKER *ppmk; - } invalid_parameters[] = - { - {NULL, NULL, NULL, NULL}, - {NULL, NULL, NULL, &pmk}, - {NULL, NULL, &eaten, NULL}, - {NULL, NULL, &eaten, &pmk}, - {NULL, wszEmpty, NULL, NULL}, - {NULL, wszEmpty, NULL, &pmk}, - {NULL, wszEmpty, &eaten, NULL}, - {NULL, wszEmpty, &eaten, &pmk}, - {&pbc, NULL, NULL, NULL}, - {&pbc, NULL, NULL, &pmk}, - {&pbc, NULL, &eaten, NULL}, - {&pbc, NULL, &eaten, &pmk}, - {&pbc, wszEmpty, NULL, NULL}, - {&pbc, wszEmpty, NULL, &pmk}, - {&pbc, wszEmpty, &eaten, NULL}, - {&pbc, wszEmpty, &eaten, &pmk}, - }; - - hr = CreateBindCtx(0, &pbc); - ok_ole_success(hr, CreateBindCtx); - - for (i = 0; i < sizeof(invalid_parameters)/sizeof(invalid_parameters[0]); i++) - { - eaten = 0xdeadbeef; - pmk = (IMoniker *)0xdeadbeef; - hr = MkParseDisplayName(invalid_parameters[i].ppbc ? *invalid_parameters[i].ppbc : NULL, - invalid_parameters[i].szDisplayName, - invalid_parameters[i].pchEaten, - invalid_parameters[i].ppmk); - ok(hr == E_INVALIDARG, "[%d] MkParseDisplayName should have failed with E_INVALIDARG instead of 0x%08x\n", i, hr); - ok(eaten == 0xdeadbeef, "[%d] Processed character count should have been 0xdeadbeef instead of %u\n", i, eaten); - ok(pmk == (IMoniker *)0xdeadbeef, "[%d] Output moniker pointer should have been 0xdeadbeef instead of %p\n", i, pmk); - } - - eaten = 0xdeadbeef; - pmk = (IMoniker *)0xdeadbeef; - hr = MkParseDisplayName(pbc, wszNonExistentProgId, &eaten, &pmk); - ok(hr == MK_E_SYNTAX || hr == MK_E_CANTOPENFILE /* Win9x */, - "MkParseDisplayName should have failed with MK_E_SYNTAX or MK_E_CANTOPENFILE instead of 0x%08x\n", hr); - ok(eaten == 0, "Processed character count should have been 0 instead of %u\n", eaten); - ok(pmk == NULL, "Output moniker pointer should have been NULL instead of %p\n", pmk); - - /* no special handling of "clsid:" without the string form of the clsid - * following */ - eaten = 0xdeadbeef; - pmk = (IMoniker *)0xdeadbeef; - hr = MkParseDisplayName(pbc, wszDisplayNameClsid, &eaten, &pmk); - ok(hr == MK_E_SYNTAX || hr == MK_E_CANTOPENFILE /* Win9x */, - "MkParseDisplayName should have failed with MK_E_SYNTAX or MK_E_CANTOPENFILE instead of 0x%08x\n", hr); - ok(eaten == 0, "Processed character count should have been 0 instead of %u\n", eaten); - ok(pmk == NULL, "Output moniker pointer should have been NULL instead of %p\n", pmk); - - /* shows clsid has higher precedence than a running object */ - hr = CreateFileMoniker(wszDisplayName, &pmk); - ok_ole_success(hr, CreateFileMoniker); - hr = IBindCtx_GetRunningObjectTable(pbc, &pprot); - ok_ole_success(hr, IBindCtx_GetRunningObjectTable); - hr = IRunningObjectTable_Register(pprot, 0, (IUnknown *)&Test_ClassFactory, pmk, &pdwReg1); - ok_ole_success(hr, IRunningObjectTable_Register); - IMoniker_Release(pmk); - pmk = NULL; - hr = MkParseDisplayName(pbc, wszDisplayName, &eaten, &pmk); - ok_ole_success(hr, MkParseDisplayName); - ok(eaten == sizeof(wszDisplayName)/sizeof(WCHAR) - 1, - "Processed character count should have been 43 instead of %u\n", eaten); - if (pmk) - { - IMoniker_IsSystemMoniker(pmk, &moniker_type); - ok(moniker_type == MKSYS_CLASSMONIKER, "moniker_type was %d instead of MKSYS_CLASSMONIKER\n", moniker_type); - IMoniker_Release(pmk); - } - hr = IRunningObjectTable_Revoke(pprot, pdwReg1); - ok_ole_success(hr, IRunningObjectTable_Revoke); - IRunningObjectTable_Release(pprot); - - hr = CreateFileMoniker(wszDisplayNameRunning, &pmk); - ok_ole_success(hr, CreateFileMoniker); - hr = IBindCtx_GetRunningObjectTable(pbc, &pprot); - ok_ole_success(hr, IBindCtx_GetRunningObjectTable); - hr = IRunningObjectTable_Register(pprot, 0, (IUnknown *)&Test_ClassFactory, pmk, &pdwReg1); - ok_ole_success(hr, IRunningObjectTable_Register); - IMoniker_Release(pmk); - pmk = NULL; - hr = MkParseDisplayName(pbc, wszDisplayNameRunning, &eaten, &pmk); - ok_ole_success(hr, MkParseDisplayName); - ok(eaten == sizeof(wszDisplayNameRunning)/sizeof(WCHAR) - 1, - "Processed character count should have been 15 instead of %u\n", eaten); - if (pmk) - { - IMoniker_IsSystemMoniker(pmk, &moniker_type); - ok(moniker_type == MKSYS_FILEMONIKER, "moniker_type was %d instead of MKSYS_FILEMONIKER\n", moniker_type); - IMoniker_Release(pmk); - } - hr = IRunningObjectTable_Revoke(pprot, pdwReg1); - ok_ole_success(hr, IRunningObjectTable_Revoke); - IRunningObjectTable_Release(pprot); - - hr = CoRegisterClassObject(&CLSID_StdFont, (IUnknown *)&ParseDisplayName, CLSCTX_INPROC_SERVER, REGCLS_MULTI_SEPARATE, &pdwReg1); - ok_ole_success(hr, CoRegisterClassObject); - - expected_display_name = wszDisplayNameProgId1; - hr = MkParseDisplayName(pbc, wszDisplayNameProgId1, &eaten, &pmk); - ok_ole_success(hr, MkParseDisplayName); - ok(eaten == sizeof(wszDisplayNameProgId1)/sizeof(WCHAR) - 1, - "Processed character count should have been 8 instead of %u\n", eaten); - if (pmk) - { - IMoniker_IsSystemMoniker(pmk, &moniker_type); - ok(moniker_type == MKSYS_ANTIMONIKER, "moniker_type was %d instead of MKSYS_ANTIMONIKER\n", moniker_type); - IMoniker_Release(pmk); - } - - expected_display_name = wszDisplayNameProgId2; - hr = MkParseDisplayName(pbc, wszDisplayNameProgId2, &eaten, &pmk); - ok_ole_success(hr, MkParseDisplayName); - ok(eaten == sizeof(wszDisplayNameProgId2)/sizeof(WCHAR) - 1, - "Processed character count should have been 8 instead of %u\n", eaten); - if (pmk) - { - IMoniker_IsSystemMoniker(pmk, &moniker_type); - ok(moniker_type == MKSYS_ANTIMONIKER, "moniker_type was %d instead of MKSYS_ANTIMONIKER\n", moniker_type); - IMoniker_Release(pmk); - } - - eaten = 0xdeadbeef; - pmk = (IMoniker *)0xdeadbeef; - hr = MkParseDisplayName(pbc, wszDisplayNameProgIdFail, &eaten, &pmk); - ok(hr == MK_E_SYNTAX || hr == MK_E_CANTOPENFILE /* Win9x */, - "MkParseDisplayName with ProgId without marker should fail with MK_E_SYNTAX or MK_E_CANTOPENFILE instead of 0x%08x\n", hr); - ok(eaten == 0, "Processed character count should have been 0 instead of %u\n", eaten); - ok(pmk == NULL, "Output moniker pointer should have been NULL instead of %p\n", pmk); - - hr = CoRevokeClassObject(pdwReg1); - ok_ole_success(hr, CoRevokeClassObject); - - GetSystemDirectoryA(szDisplayNameFile, sizeof(szDisplayNameFile)); - strcat(szDisplayNameFile, "\\kernel32.dll"); - len = MultiByteToWideChar(CP_ACP, 0, szDisplayNameFile, -1, wszDisplayNameFile, sizeof(wszDisplayNameFile)/sizeof(wszDisplayNameFile[0])); - hr = MkParseDisplayName(pbc, wszDisplayNameFile, &eaten, &pmk); - ok_ole_success(hr, MkParseDisplayName); - ok(eaten == len - 1, "Processed character count should have been %d instead of %u\n", len - 1, eaten); - if (pmk) - { - IMoniker_IsSystemMoniker(pmk, &moniker_type); - ok(moniker_type == MKSYS_FILEMONIKER, "moniker_type was %d instead of MKSYS_FILEMONIKER\n", moniker_type); - IMoniker_Release(pmk); - } - - hr = MkParseDisplayName(pbc, wszDisplayName, &eaten, &pmk); - ok_ole_success(hr, MkParseDisplayName); - ok(eaten == sizeof(wszDisplayName)/sizeof(WCHAR) - 1, "Processed character count should have been 43 instead of %u\n", eaten); - - if (pmk) - { - hr = IMoniker_BindToObject(pmk, pbc, NULL, &IID_IUnknown, (LPVOID*)&object); - ok_ole_success(hr, IMoniker_BindToObject); - - if (SUCCEEDED(hr)) - IUnknown_Release(object); - IMoniker_Release(pmk); - } - IBindCtx_Release(pbc); - - /* Test the EnumMoniker interface */ - hr = CreateBindCtx(0, &pbc); - ok_ole_success(hr, CreateBindCtx); - - hr = CreateFileMoniker(wszFileName1, &pmk1); - ok(hr==0, "CreateFileMoniker for file hr=%08x\n", hr); - hr = CreateFileMoniker(wszFileName2, &pmk2); - ok(hr==0, "CreateFileMoniker for file hr=%08x\n", hr); - hr = IBindCtx_GetRunningObjectTable(pbc, &pprot); - ok(hr==0, "IBindCtx_GetRunningObjectTable hr=%08x\n", hr); - - /* Check EnumMoniker before registering */ - hr = IRunningObjectTable_EnumRunning(pprot, &spEM1); - ok(hr==0, "IRunningObjectTable_EnumRunning hr=%08x\n", hr); - hr = IEnumMoniker_QueryInterface(spEM1, &IID_IUnknown, (void*) &lpEM1); - /* Register a couple of Monikers and check is ok */ - ok(hr==0, "IEnumMoniker_QueryInterface hr %08x %p\n", hr, lpEM1); - hr = MK_E_NOOBJECT; - - matchCnt = count_moniker_matches(pbc, spEM1); - trace("Number of matches is %i\n", matchCnt); - - grflags= grflags | ROTFLAGS_REGISTRATIONKEEPSALIVE; - hr = IRunningObjectTable_Register(pprot, grflags, lpEM1, pmk1, &pdwReg1); - ok(hr==0, "IRunningObjectTable_Register hr=%08x %p %08x %p %p %d\n", - hr, pprot, grflags, lpEM1, pmk1, pdwReg1); - - trace("IROT::Register\n"); - grflags=0; - grflags= grflags | ROTFLAGS_REGISTRATIONKEEPSALIVE; - hr = IRunningObjectTable_Register(pprot, grflags, lpEM1, pmk2, &pdwReg2); - ok(hr==0, "IRunningObjectTable_Register hr=%08x %p %08x %p %p %d\n", hr, - pprot, grflags, lpEM1, pmk2, pdwReg2); - - hr = IRunningObjectTable_EnumRunning(pprot, &spEM2); - ok(hr==0, "IRunningObjectTable_EnumRunning hr=%08x\n", hr); - - matchCnt = count_moniker_matches(pbc, spEM2); - ok(matchCnt==2, "Number of matches should be equal to 2 not %i\n", matchCnt); - - trace("IEnumMoniker::Clone\n"); - IEnumMoniker_Clone(spEM2, &spEM3); - - matchCnt = count_moniker_matches(pbc, spEM3); - ok(matchCnt==0, "Number of matches should be equal to 0 not %i\n", matchCnt); - trace("IEnumMoniker::Reset\n"); - IEnumMoniker_Reset(spEM3); - - matchCnt = count_moniker_matches(pbc, spEM3); - ok(matchCnt==2, "Number of matches should be equal to 2 not %i\n", matchCnt); - - IRunningObjectTable_Revoke(pprot,pdwReg1); - IRunningObjectTable_Revoke(pprot,pdwReg2); - IUnknown_Release(lpEM1); - IEnumMoniker_Release(spEM1); - IEnumMoniker_Release(spEM2); - IEnumMoniker_Release(spEM3); - IMoniker_Release(pmk1); - IMoniker_Release(pmk2); - IRunningObjectTable_Release(pprot); - - IBindCtx_Release(pbc); -} - -static const LARGE_INTEGER llZero; - -static const BYTE expected_class_moniker_marshal_data[] = -{ - 0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00, - 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46, - 0x1a,0x03,0x00,0x00,0x00,0x00,0x00,0x00, - 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46, - 0x00,0x00,0x00,0x00,0x14,0x00,0x00,0x00, - 0x05,0xe0,0x02,0x00,0x00,0x00,0x00,0x00, - 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46, - 0x00,0x00,0x00,0x00, -}; - -static const BYTE expected_class_moniker_saved_data[] = -{ - 0x05,0xe0,0x02,0x00,0x00,0x00,0x00,0x00, - 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46, - 0x00,0x00,0x00,0x00, -}; - -static const BYTE expected_class_moniker_comparison_data[] = -{ - 0x1a,0x03,0x00,0x00,0x00,0x00,0x00,0x00, - 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46, - 0x05,0xe0,0x02,0x00,0x00,0x00,0x00,0x00, - 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46, -}; - -static const WCHAR expected_class_moniker_display_name[] = -{ - 'c','l','s','i','d',':','0','0','0','2','E','0','0','5','-','0','0','0', - '0','-','0','0','0','0','-','C','0','0','0','-','0','0','0','0','0','0', - '0','0','0','0','4','6',':',0 -}; - -static const BYTE expected_item_moniker_comparison_data[] = -{ - 0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00, - 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46, - 0x21,0x00,0x54,0x00,0x45,0x00,0x53,0x00, - 0x54,0x00,0x00,0x00, -}; - -static const BYTE expected_item_moniker_saved_data[] = -{ - 0x02,0x00,0x00,0x00,0x21,0x00,0x05,0x00, - 0x00,0x00,0x54,0x65,0x73,0x74,0x00, -}; - -static const BYTE expected_item_moniker_marshal_data[] = -{ - 0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00, - 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46, - 0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00, - 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46, - 0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00, - 0x02,0x00,0x00,0x00,0x21,0x00,0x05,0x00, - 0x00,0x00,0x54,0x65,0x73,0x74,0x00, -}; - -static const BYTE expected_anti_moniker_marshal_data[] = -{ - 0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00, - 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46, - 0x05,0x03,0x00,0x00,0x00,0x00,0x00,0x00, - 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46, - 0x00,0x00,0x00,0x00,0x14,0x00,0x00,0x00, - 0x01,0x00,0x00,0x00, -}; - -static const BYTE expected_anti_moniker_saved_data[] = -{ - 0x01,0x00,0x00,0x00, -}; - -static const BYTE expected_anti_moniker_comparison_data[] = -{ - 0x05,0x03,0x00,0x00,0x00,0x00,0x00,0x00, - 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46, - 0x01,0x00,0x00,0x00, -}; - -static const BYTE expected_gc_moniker_marshal_data[] = -{ - 0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00, - 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46, - 0x09,0x03,0x00,0x00,0x00,0x00,0x00,0x00, - 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46, - 0x00,0x00,0x00,0x00,0x2c,0x01,0x00,0x00, - 0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00, - 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46, - 0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00, - 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46, - 0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00, - 0x02,0x00,0x00,0x00,0x21,0x00,0x05,0x00, - 0x00,0x00,0x54,0x65,0x73,0x74,0x00,0x4d, - 0x45,0x4f,0x57,0x04,0x00,0x00,0x00,0x0f, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, - 0x00,0x00,0x00,0x00,0x00,0x00,0x46,0x04, - 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, - 0x00,0x00,0x00,0x00,0x00,0x00,0x46,0x00, - 0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x02, - 0x00,0x00,0x00,0x23,0x00,0x05,0x00,0x00, - 0x00,0x57,0x69,0x6e,0x65,0x00, -}; - -static const BYTE expected_gc_moniker_saved_data[] = -{ - 0x02,0x00,0x00,0x00,0x04,0x03,0x00,0x00, - 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, - 0x00,0x00,0x00,0x46,0x02,0x00,0x00,0x00, - 0x21,0x00,0x05,0x00,0x00,0x00,0x54,0x65, - 0x73,0x74,0x00,0x04,0x03,0x00,0x00,0x00, - 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00, - 0x00,0x00,0x46,0x02,0x00,0x00,0x00,0x23, - 0x00,0x05,0x00,0x00,0x00,0x57,0x69,0x6e, - 0x65,0x00, -}; - -static const BYTE expected_gc_moniker_comparison_data[] = -{ - 0x09,0x03,0x00,0x00,0x00,0x00,0x00,0x00, - 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46, - 0x04,0x03,0x00,0x00,0x00,0x00,0x00,0x00, - 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46, - 0x21,0x00,0x54,0x00,0x45,0x00,0x53,0x00, - 0x54,0x00,0x00,0x00,0x04,0x03,0x00,0x00, - 0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00, - 0x00,0x00,0x00,0x46,0x23,0x00,0x57,0x00, - 0x49,0x00,0x4e,0x00,0x45,0x00,0x00,0x00, -}; - -static void test_moniker( - const char *testname, IMoniker *moniker, - const BYTE *expected_moniker_marshal_data, unsigned int sizeof_expected_moniker_marshal_data, - const BYTE *expected_moniker_saved_data, unsigned int sizeof_expected_moniker_saved_data, - const BYTE *expected_moniker_comparison_data, unsigned int sizeof_expected_moniker_comparison_data, - LPCWSTR expected_display_name) -{ - IStream * stream; - IROTData * rotdata; - HRESULT hr; - HGLOBAL hglobal; - LPBYTE moniker_data; - DWORD moniker_size; - DWORD i; - BOOL same; - BYTE buffer[128]; - IMoniker * moniker_proxy; - LPOLESTR display_name; - IBindCtx *bindctx; - - hr = IMoniker_IsDirty(moniker); - ok(hr == S_FALSE, "%s: IMoniker_IsDirty should return S_FALSE, not 0x%08x\n", testname, hr); - - /* Display Name */ - - hr = CreateBindCtx(0, &bindctx); - ok_ole_success(hr, CreateBindCtx); - - hr = IMoniker_GetDisplayName(moniker, bindctx, NULL, &display_name); - ok_ole_success(hr, IMoniker_GetDisplayName); - ok(!lstrcmpW(display_name, expected_display_name), "%s: display name wasn't what was expected\n", testname); - - CoTaskMemFree(display_name); - IBindCtx_Release(bindctx); - - hr = IMoniker_IsDirty(moniker); - ok(hr == S_FALSE, "%s: IMoniker_IsDirty should return S_FALSE, not 0x%08x\n", testname, hr); - - /* IROTData::GetComparisonData test */ - - hr = IMoniker_QueryInterface(moniker, &IID_IROTData, (void **)&rotdata); - ok_ole_success(hr, IMoniker_QueryInterface_IID_IROTData); - - hr = IROTData_GetComparisonData(rotdata, buffer, sizeof(buffer), &moniker_size); - ok_ole_success(hr, IROTData_GetComparisonData); - - if (hr != S_OK) moniker_size = 0; - - /* first check we have the right amount of data */ - ok(moniker_size == sizeof_expected_moniker_comparison_data, - "%s: Size of comparison data differs (expected %d, actual %d)\n", - testname, sizeof_expected_moniker_comparison_data, moniker_size); - - /* then do a byte-by-byte comparison */ - same = TRUE; - for (i = 0; i < min(moniker_size, sizeof_expected_moniker_comparison_data); i++) - { - if (expected_moniker_comparison_data[i] != buffer[i]) - { - same = FALSE; - break; - } - } - - ok(same, "%s: Comparison data differs\n", testname); - if (!same) - { - for (i = 0; i < moniker_size; i++) - { - if (i % 8 == 0) printf(" "); - printf("0x%02x,", buffer[i]); - if (i % 8 == 7) printf("\n"); - } - printf("\n"); - } - - IROTData_Release(rotdata); - - hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); - - /* Saving */ - - hr = IMoniker_Save(moniker, stream, TRUE); - ok_ole_success(hr, IMoniker_Save); - - hr = GetHGlobalFromStream(stream, &hglobal); - ok_ole_success(hr, GetHGlobalFromStream); - - moniker_size = GlobalSize(hglobal); - - moniker_data = GlobalLock(hglobal); - - /* first check we have the right amount of data */ - ok(moniker_size == round_global_size(sizeof_expected_moniker_saved_data), - "%s: Size of saved data differs (expected %d, actual %d)\n", - testname, (DWORD)round_global_size(sizeof_expected_moniker_saved_data), moniker_size); - - /* then do a byte-by-byte comparison */ - same = TRUE; - for (i = 0; i < min(moniker_size, round_global_size(sizeof_expected_moniker_saved_data)); i++) - { - if (expected_moniker_saved_data[i] != moniker_data[i]) - { - same = FALSE; - break; - } - } - - ok(same, "%s: Saved data differs\n", testname); - if (!same) - { - for (i = 0; i < moniker_size; i++) - { - if (i % 8 == 0) printf(" "); - printf("0x%02x,", moniker_data[i]); - if (i % 8 == 7) printf("\n"); - } - printf("\n"); - } - - GlobalUnlock(hglobal); - - IStream_Release(stream); - - /* Marshaling tests */ - - hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok_ole_success(hr, CreateStreamOnHGlobal); - - hr = CoMarshalInterface(stream, &IID_IMoniker, (IUnknown *)moniker, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok_ole_success(hr, CoMarshalInterface); - - hr = GetHGlobalFromStream(stream, &hglobal); - ok_ole_success(hr, GetHGlobalFromStream); - - moniker_size = GlobalSize(hglobal); - - moniker_data = GlobalLock(hglobal); - - /* first check we have the right amount of data */ - ok(moniker_size == round_global_size(sizeof_expected_moniker_marshal_data), - "%s: Size of marshaled data differs (expected %d, actual %d)\n", - testname, (DWORD)round_global_size(sizeof_expected_moniker_marshal_data), moniker_size); - - /* then do a byte-by-byte comparison */ - same = TRUE; - if (expected_moniker_marshal_data) - { - for (i = 0; i < min(moniker_size, round_global_size(sizeof_expected_moniker_marshal_data)); i++) - { - if (expected_moniker_marshal_data[i] != moniker_data[i]) - { - same = FALSE; - break; - } - } - } - - ok(same, "%s: Marshaled data differs\n", testname); - if (!same) - { - for (i = 0; i < moniker_size; i++) - { - if (i % 8 == 0) printf(" "); - printf("0x%02x,", moniker_data[i]); - if (i % 8 == 7) printf("\n"); - } - printf("\n"); - } - - GlobalUnlock(hglobal); - - IStream_Seek(stream, llZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(stream, &IID_IMoniker, (void **)&moniker_proxy); - ok_ole_success(hr, CoUnmarshalInterface); - - IStream_Release(stream); - IMoniker_Release(moniker_proxy); -} - -static void test_class_moniker(void) -{ - HRESULT hr; - IMoniker *moniker; - DWORD moniker_type; - DWORD hash; - IBindCtx *bindctx; - IMoniker *inverse; - IUnknown *unknown; - FILETIME filetime; - - hr = CreateClassMoniker(&CLSID_StdComponentCategoriesMgr, &moniker); - ok_ole_success(hr, CreateClassMoniker); - if (!moniker) return; - - test_moniker("class moniker", moniker, - expected_class_moniker_marshal_data, sizeof(expected_class_moniker_marshal_data), - expected_class_moniker_saved_data, sizeof(expected_class_moniker_saved_data), - expected_class_moniker_comparison_data, sizeof(expected_class_moniker_comparison_data), - expected_class_moniker_display_name); - - /* Hashing */ - - hr = IMoniker_Hash(moniker, &hash); - ok_ole_success(hr, IMoniker_Hash); - - ok(hash == CLSID_StdComponentCategoriesMgr.Data1, - "Hash value != Data1 field of clsid, instead was 0x%08x\n", - hash); - - /* IsSystemMoniker test */ - - hr = IMoniker_IsSystemMoniker(moniker, &moniker_type); - ok_ole_success(hr, IMoniker_IsSystemMoniker); - - ok(moniker_type == MKSYS_CLASSMONIKER, - "dwMkSys != MKSYS_CLASSMONIKER, instead was 0x%08x\n", - moniker_type); - - hr = CreateBindCtx(0, &bindctx); - ok_ole_success(hr, CreateBindCtx); - - /* IsRunning test */ - hr = IMoniker_IsRunning(moniker, NULL, NULL, NULL); - ok(hr == E_NOTIMPL, "IMoniker_IsRunning should return E_NOTIMPL, not 0x%08x\n", hr); - - hr = IMoniker_IsRunning(moniker, bindctx, NULL, NULL); - ok(hr == E_NOTIMPL, "IMoniker_IsRunning should return E_NOTIMPL, not 0x%08x\n", hr); - - hr = IMoniker_GetTimeOfLastChange(moniker, bindctx, NULL, &filetime); - ok(hr == MK_E_UNAVAILABLE, "IMoniker_GetTimeOfLastChange should return MK_E_UNAVAILABLE, not 0x%08x\n", hr); - - hr = IMoniker_BindToObject(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); - ok_ole_success(hr, IMoniker_BindToObject); - IUnknown_Release(unknown); - - hr = IMoniker_BindToStorage(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); - ok_ole_success(hr, IMoniker_BindToStorage); - IUnknown_Release(unknown); - - IBindCtx_Release(bindctx); - - hr = IMoniker_Inverse(moniker, &inverse); - ok_ole_success(hr, IMoniker_Inverse); - IMoniker_Release(inverse); - - IMoniker_Release(moniker); -} - -static void test_file_moniker(WCHAR* path) -{ - IStream *stream; - IMoniker *moniker1 = NULL, *moniker2 = NULL; - HRESULT hr; - - hr = CreateFileMoniker(path, &moniker1); - ok_ole_success(hr, CreateFileMoniker); - - hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); - - /* Marshal */ - hr = CoMarshalInterface(stream, &IID_IMoniker, (IUnknown *)moniker1, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - ok_ole_success(hr, CoMarshalInterface); - - /* Rewind */ - hr = IStream_Seek(stream, llZero, STREAM_SEEK_SET, NULL); - ok_ole_success(hr, IStream_Seek); - - /* Unmarshal */ - hr = CoUnmarshalInterface(stream, &IID_IMoniker, (void**)&moniker2); - ok_ole_success(hr, CoUnmarshalInterface); - - hr = IMoniker_IsEqual(moniker1, moniker2); - ok_ole_success(hr, IsEqual); - - IStream_Release(stream); - if (moniker1) - IMoniker_Release(moniker1); - if (moniker2) - IMoniker_Release(moniker2); -} - -static void test_file_monikers(void) -{ - static WCHAR wszFile[][30] = { - {'\\', 'w','i','n','d','o','w','s','\\','s','y','s','t','e','m','\\','t','e','s','t','1','.','d','o','c',0}, - {'\\', 'a','b','c','d','e','f','g','\\','h','i','j','k','l','\\','m','n','o','p','q','r','s','t','u','.','m','n','o',0}, - /* These map to themselves in Windows-1252 & 932 (Shift-JIS) */ - {0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0}, - /* U+2020 = DAGGER = 0x86 (1252) = 0x813f (932) - * U+20AC = EURO SIGN = 0x80 (1252) = undef (932) - * U+0100 .. = Latin extended-A - */ - {0x20ac, 0x2020, 0x100, 0x101, 0x102, 0x103, 0x104, 0x105, 0x106, 0x107, 0x108, 0x109, 0x10a, 0x10b, 0x10c, 0}, - }; - - int i; - - trace("ACP is %u\n", GetACP()); - - for (i = 0; i < COUNTOF(wszFile); ++i) - { - int j ; - if (i == 2) - { - BOOL used; - WideCharToMultiByte( CP_ACP, WC_NO_BEST_FIT_CHARS, wszFile[i], -1, NULL, 0, NULL, &used ); - if (used) - { - skip("string 2 doesn't round trip in codepage %u\n", GetACP() ); - continue; - } - } - for (j = lstrlenW(wszFile[i]); j > 0; --j) - { - wszFile[i][j] = 0; - test_file_moniker(wszFile[i]); - } - } -} - -static void test_item_moniker(void) -{ - HRESULT hr; - IMoniker *moniker; - DWORD moniker_type; - DWORD hash; - IBindCtx *bindctx; - IMoniker *inverse; - IUnknown *unknown; - static const WCHAR wszDelimeter[] = {'!',0}; - static const WCHAR wszObjectName[] = {'T','e','s','t',0}; - static const WCHAR expected_display_name[] = { '!','T','e','s','t',0 }; - - hr = CreateItemMoniker(wszDelimeter, wszObjectName, &moniker); - ok_ole_success(hr, CreateItemMoniker); - - test_moniker("item moniker", moniker, - expected_item_moniker_marshal_data, sizeof(expected_item_moniker_marshal_data), - expected_item_moniker_saved_data, sizeof(expected_item_moniker_saved_data), - expected_item_moniker_comparison_data, sizeof(expected_item_moniker_comparison_data), - expected_display_name); - - /* Hashing */ - - hr = IMoniker_Hash(moniker, &hash); - ok_ole_success(hr, IMoniker_Hash); - - ok(hash == 0x73c, - "Hash value != 0x73c, instead was 0x%08x\n", - hash); - - /* IsSystemMoniker test */ - - hr = IMoniker_IsSystemMoniker(moniker, &moniker_type); - ok_ole_success(hr, IMoniker_IsSystemMoniker); - - ok(moniker_type == MKSYS_ITEMMONIKER, - "dwMkSys != MKSYS_ITEMMONIKER, instead was 0x%08x\n", - moniker_type); - - hr = CreateBindCtx(0, &bindctx); - ok_ole_success(hr, CreateBindCtx); - - /* IsRunning test */ - hr = IMoniker_IsRunning(moniker, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "IMoniker_IsRunning should return E_INVALIDARG, not 0x%08x\n", hr); - - hr = IMoniker_IsRunning(moniker, bindctx, NULL, NULL); - ok(hr == S_FALSE, "IMoniker_IsRunning should return S_FALSE, not 0x%08x\n", hr); - - hr = IMoniker_BindToObject(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); - ok(hr == E_INVALIDARG, "IMoniker_BindToStorage should return E_INVALIDARG, not 0x%08x\n", hr); - - hr = IMoniker_BindToStorage(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); - ok(hr == E_INVALIDARG, "IMoniker_BindToObject should return E_INVALIDARG, not 0x%08x\n", hr); - - IBindCtx_Release(bindctx); - - hr = IMoniker_Inverse(moniker, &inverse); - ok_ole_success(hr, IMoniker_Inverse); - IMoniker_Release(inverse); - - IMoniker_Release(moniker); -} - -static void test_anti_moniker(void) -{ - HRESULT hr; - IMoniker *moniker; - DWORD moniker_type; - DWORD hash; - IBindCtx *bindctx; - FILETIME filetime; - IMoniker *inverse; - IUnknown *unknown; - static const WCHAR expected_display_name[] = { '\\','.','.',0 }; - - hr = CreateAntiMoniker(&moniker); - ok_ole_success(hr, CreateAntiMoniker); - if (!moniker) return; - - test_moniker("anti moniker", moniker, - expected_anti_moniker_marshal_data, sizeof(expected_anti_moniker_marshal_data), - expected_anti_moniker_saved_data, sizeof(expected_anti_moniker_saved_data), - expected_anti_moniker_comparison_data, sizeof(expected_anti_moniker_comparison_data), - expected_display_name); - - /* Hashing */ - hr = IMoniker_Hash(moniker, &hash); - ok_ole_success(hr, IMoniker_Hash); - ok(hash == 0x80000001, - "Hash value != 0x80000001, instead was 0x%08x\n", - hash); - - /* IsSystemMoniker test */ - hr = IMoniker_IsSystemMoniker(moniker, &moniker_type); - ok_ole_success(hr, IMoniker_IsSystemMoniker); - ok(moniker_type == MKSYS_ANTIMONIKER, - "dwMkSys != MKSYS_ANTIMONIKER, instead was 0x%08x\n", - moniker_type); - - hr = IMoniker_Inverse(moniker, &inverse); - ok(hr == MK_E_NOINVERSE, "IMoniker_Inverse should have returned MK_E_NOINVERSE instead of 0x%08x\n", hr); - ok(inverse == NULL, "inverse should have been set to NULL instead of %p\n", inverse); - - hr = CreateBindCtx(0, &bindctx); - ok_ole_success(hr, CreateBindCtx); - - /* IsRunning test */ - hr = IMoniker_IsRunning(moniker, bindctx, NULL, NULL); - ok(hr == S_FALSE, "IMoniker_IsRunning should return S_FALSE, not 0x%08x\n", hr); - - hr = IMoniker_GetTimeOfLastChange(moniker, bindctx, NULL, &filetime); - ok(hr == E_NOTIMPL, "IMoniker_GetTimeOfLastChange should return E_NOTIMPL, not 0x%08x\n", hr); - - hr = IMoniker_BindToObject(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); - ok(hr == E_NOTIMPL, "IMoniker_BindToObject should return E_NOTIMPL, not 0x%08x\n", hr); - - hr = IMoniker_BindToStorage(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); - ok(hr == E_NOTIMPL, "IMoniker_BindToStorage should return E_NOTIMPL, not 0x%08x\n", hr); - - IBindCtx_Release(bindctx); - - IMoniker_Release(moniker); -} - -static void test_generic_composite_moniker(void) -{ - HRESULT hr; - IMoniker *moniker; - IMoniker *moniker1; - IMoniker *moniker2; - DWORD moniker_type; - DWORD hash; - IBindCtx *bindctx; - FILETIME filetime; - IMoniker *inverse; - IUnknown *unknown; - static const WCHAR wszDelimeter1[] = {'!',0}; - static const WCHAR wszObjectName1[] = {'T','e','s','t',0}; - static const WCHAR wszDelimeter2[] = {'#',0}; - static const WCHAR wszObjectName2[] = {'W','i','n','e',0}; - static const WCHAR expected_display_name[] = { '!','T','e','s','t','#','W','i','n','e',0 }; - - hr = CreateItemMoniker(wszDelimeter1, wszObjectName1, &moniker1); - ok_ole_success(hr, CreateItemMoniker); - hr = CreateItemMoniker(wszDelimeter2, wszObjectName2, &moniker2); - ok_ole_success(hr, CreateItemMoniker); - hr = CreateGenericComposite(moniker1, moniker2, &moniker); - ok_ole_success(hr, CreateGenericComposite); - - test_moniker("generic composite moniker", moniker, - expected_gc_moniker_marshal_data, sizeof(expected_gc_moniker_marshal_data), - expected_gc_moniker_saved_data, sizeof(expected_gc_moniker_saved_data), - expected_gc_moniker_comparison_data, sizeof(expected_gc_moniker_comparison_data), - expected_display_name); - - /* Hashing */ - - hr = IMoniker_Hash(moniker, &hash); - ok_ole_success(hr, IMoniker_Hash); - - ok(hash == 0xd87, - "Hash value != 0xd87, instead was 0x%08x\n", - hash); - - /* IsSystemMoniker test */ - - hr = IMoniker_IsSystemMoniker(moniker, &moniker_type); - ok_ole_success(hr, IMoniker_IsSystemMoniker); - - ok(moniker_type == MKSYS_GENERICCOMPOSITE, - "dwMkSys != MKSYS_GENERICCOMPOSITE, instead was 0x%08x\n", - moniker_type); - - hr = CreateBindCtx(0, &bindctx); - ok_ole_success(hr, CreateBindCtx); - - /* IsRunning test */ - hr = IMoniker_IsRunning(moniker, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "IMoniker_IsRunning should return E_INVALIDARG, not 0x%08x\n", hr); - - hr = IMoniker_IsRunning(moniker, bindctx, NULL, NULL); - todo_wine - ok(hr == S_FALSE, "IMoniker_IsRunning should return S_FALSE, not 0x%08x\n", hr); - - hr = IMoniker_GetTimeOfLastChange(moniker, bindctx, NULL, &filetime); - ok(hr == MK_E_NOTBINDABLE, "IMoniker_GetTimeOfLastChange should return MK_E_NOTBINDABLE, not 0x%08x\n", hr); - - hr = IMoniker_BindToObject(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); - todo_wine - ok(hr == E_INVALIDARG, "IMoniker_BindToObject should return E_INVALIDARG, not 0x%08x\n", hr); - - hr = IMoniker_BindToStorage(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); - ok(hr == E_INVALIDARG, "IMoniker_BindToStorage should return E_INVALIDARG, not 0x%08x\n", hr); - - IBindCtx_Release(bindctx); - - hr = IMoniker_Inverse(moniker, &inverse); - ok_ole_success(hr, IMoniker_Inverse); - IMoniker_Release(inverse); - - IMoniker_Release(moniker); -} - -static void test_pointer_moniker(void) -{ - HRESULT hr; - IMoniker *moniker; - DWORD moniker_type; - DWORD hash; - IBindCtx *bindctx; - FILETIME filetime; - IMoniker *inverse; - IUnknown *unknown; - IStream *stream; - IROTData *rotdata; - LPOLESTR display_name; - - cLocks = 0; - - hr = CreatePointerMoniker((IUnknown *)&Test_ClassFactory, NULL); - ok(hr == E_INVALIDARG, "CreatePointerMoniker(x, NULL) should have returned E_INVALIDARG instead of 0x%08x\n", hr); - - hr = CreatePointerMoniker((IUnknown *)&Test_ClassFactory, &moniker); - ok_ole_success(hr, CreatePointerMoniker); - if (!moniker) return; - - ok_more_than_one_lock(); - - /* Display Name */ - - hr = CreateBindCtx(0, &bindctx); - ok_ole_success(hr, CreateBindCtx); - - hr = IMoniker_GetDisplayName(moniker, bindctx, NULL, &display_name); - ok(hr == E_NOTIMPL, "IMoniker_GetDisplayName should have returned E_NOTIMPL instead of 0x%08x\n", hr); - - IBindCtx_Release(bindctx); - - hr = IMoniker_IsDirty(moniker); - ok(hr == S_FALSE, "IMoniker_IsDirty should return S_FALSE, not 0x%08x\n", hr); - - /* IROTData::GetComparisonData test */ - - hr = IMoniker_QueryInterface(moniker, &IID_IROTData, (void **)&rotdata); - ok(hr == E_NOINTERFACE, "IMoniker_QueryInterface(IID_IROTData) should have returned E_NOINTERFACE instead of 0x%08x\n", hr); - - /* Saving */ - - hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok_ole_success(hr, CreateStreamOnHGlobal); - - hr = IMoniker_Save(moniker, stream, TRUE); - ok(hr == E_NOTIMPL, "IMoniker_Save should have returned E_NOTIMPL instead of 0x%08x\n", hr); - - IStream_Release(stream); - - /* Hashing */ - hr = IMoniker_Hash(moniker, &hash); - ok_ole_success(hr, IMoniker_Hash); - ok(hash == (DWORD)&Test_ClassFactory, - "Hash value should have been 0x%08x, instead of 0x%08x\n", - (DWORD)&Test_ClassFactory, hash); - - /* IsSystemMoniker test */ - hr = IMoniker_IsSystemMoniker(moniker, &moniker_type); - ok_ole_success(hr, IMoniker_IsSystemMoniker); - ok(moniker_type == MKSYS_POINTERMONIKER, - "dwMkSys != MKSYS_POINTERMONIKER, instead was 0x%08x\n", - moniker_type); - - hr = IMoniker_Inverse(moniker, &inverse); - ok_ole_success(hr, IMoniker_Inverse); - IMoniker_Release(inverse); - - hr = CreateBindCtx(0, &bindctx); - ok_ole_success(hr, CreateBindCtx); - - /* IsRunning test */ - hr = IMoniker_IsRunning(moniker, bindctx, NULL, NULL); - ok(hr == S_OK, "IMoniker_IsRunning should return S_OK, not 0x%08x\n", hr); - - hr = IMoniker_GetTimeOfLastChange(moniker, bindctx, NULL, &filetime); - ok(hr == E_NOTIMPL, "IMoniker_GetTimeOfLastChange should return E_NOTIMPL, not 0x%08x\n", hr); - - hr = IMoniker_BindToObject(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); - ok_ole_success(hr, IMoniker_BindToObject); - IUnknown_Release(unknown); - - hr = IMoniker_BindToStorage(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); - ok_ole_success(hr, IMoniker_BindToStorage); - IUnknown_Release(unknown); - - IMoniker_Release(moniker); - - ok_no_locks(); - - hr = CreatePointerMoniker(NULL, &moniker); - ok_ole_success(hr, CreatePointerMoniker); - - hr = IMoniker_BindToObject(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); - ok(hr == E_UNEXPECTED, "IMoniker_BindToObject should have returned E_UNEXPECTED instead of 0x%08x\n", hr); - - hr = IMoniker_BindToStorage(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown); - ok(hr == E_UNEXPECTED, "IMoniker_BindToStorage should have returned E_UNEXPECTED instead of 0x%08x\n", hr); - - IBindCtx_Release(bindctx); - - IMoniker_Release(moniker); -} - -static void test_bind_context(void) -{ - HRESULT hr; - IBindCtx *pBindCtx; - IEnumString *pEnumString; - BIND_OPTS2 bind_opts; - HeapUnknown *unknown; - HeapUnknown *unknown2; - IUnknown *param_obj; - ULONG refs; - static const WCHAR wszParamName[] = {'G','e','m','m','a',0}; - static const WCHAR wszNonExistent[] = {'N','o','n','E','x','i','s','t','e','n','t',0}; - - hr = CreateBindCtx(0, NULL); - ok(hr == E_INVALIDARG, "CreateBindCtx with NULL ppbc should have returned E_INVALIDARG instead of 0x%08x\n", hr); - - hr = CreateBindCtx(0xdeadbeef, &pBindCtx); - ok(hr == E_INVALIDARG, "CreateBindCtx with reserved value non-zero should have returned E_INVALIDARG instead of 0x%08x\n", hr); - - hr = CreateBindCtx(0, &pBindCtx); - ok_ole_success(hr, "CreateBindCtx"); - - bind_opts.cbStruct = -1; - hr = IBindCtx_GetBindOptions(pBindCtx, (BIND_OPTS *)&bind_opts); - ok_ole_success(hr, "IBindCtx_GetBindOptions"); - ok(bind_opts.cbStruct == sizeof(bind_opts) || - bind_opts.cbStruct == sizeof(bind_opts) + sizeof(void*), /* Vista */ - "bind_opts.cbStruct was %d\n", bind_opts.cbStruct); - - bind_opts.cbStruct = sizeof(BIND_OPTS); - hr = IBindCtx_GetBindOptions(pBindCtx, (BIND_OPTS *)&bind_opts); - ok_ole_success(hr, "IBindCtx_GetBindOptions"); - ok(bind_opts.cbStruct == sizeof(BIND_OPTS), "bind_opts.cbStruct was %d\n", bind_opts.cbStruct); - - bind_opts.cbStruct = sizeof(bind_opts); - hr = IBindCtx_GetBindOptions(pBindCtx, (BIND_OPTS *)&bind_opts); - ok_ole_success(hr, "IBindCtx_GetBindOptions"); - ok(bind_opts.cbStruct == sizeof(bind_opts), "bind_opts.cbStruct was %d\n", bind_opts.cbStruct); - ok(bind_opts.grfFlags == 0, "bind_opts.grfFlags was 0x%x instead of 0\n", bind_opts.grfFlags); - ok(bind_opts.grfMode == STGM_READWRITE, "bind_opts.grfMode was 0x%x instead of STGM_READWRITE\n", bind_opts.grfMode); - ok(bind_opts.dwTickCountDeadline == 0, "bind_opts.dwTickCountDeadline was %d instead of 0\n", bind_opts.dwTickCountDeadline); - ok(bind_opts.dwTrackFlags == 0, "bind_opts.dwTrackFlags was 0x%x instead of 0\n", bind_opts.dwTrackFlags); - ok(bind_opts.dwClassContext == (CLSCTX_INPROC_SERVER|CLSCTX_LOCAL_SERVER|CLSCTX_REMOTE_SERVER), - "bind_opts.dwClassContext should have been 0x15 instead of 0x%x\n", bind_opts.dwClassContext); - ok(bind_opts.locale == GetThreadLocale(), "bind_opts.locale should have been 0x%x instead of 0x%x\n", GetThreadLocale(), bind_opts.locale); - ok(bind_opts.pServerInfo == NULL, "bind_opts.pServerInfo should have been NULL instead of %p\n", bind_opts.pServerInfo); - - bind_opts.cbStruct = -1; - hr = IBindCtx_SetBindOptions(pBindCtx, (BIND_OPTS *)&bind_opts); - ok(hr == E_INVALIDARG, "IBindCtx_SetBindOptions with bad cbStruct should have returned E_INVALIDARG instead of 0x%08x\n", hr); - - hr = IBindCtx_RegisterObjectParam(pBindCtx, (WCHAR *)wszParamName, NULL); - ok(hr == E_INVALIDARG, "IBindCtx_RegisterObjectParam should have returned E_INVALIDARG instead of 0x%08x\n", hr); - - unknown = HeapAlloc(GetProcessHeap(), 0, sizeof(*unknown)); - unknown->lpVtbl = &HeapUnknown_Vtbl; - unknown->refs = 1; - hr = IBindCtx_RegisterObjectParam(pBindCtx, (WCHAR *)wszParamName, (IUnknown *)&unknown->lpVtbl); - ok_ole_success(hr, "IBindCtx_RegisterObjectParam"); - - hr = IBindCtx_GetObjectParam(pBindCtx, (WCHAR *)wszParamName, ¶m_obj); - ok_ole_success(hr, "IBindCtx_GetObjectParam"); - IUnknown_Release(param_obj); - - hr = IBindCtx_GetObjectParam(pBindCtx, (WCHAR *)wszNonExistent, ¶m_obj); - ok(hr == E_FAIL, "IBindCtx_GetObjectParam with nonexistent key should have failed with E_FAIL instead of 0x%08x\n", hr); - ok(param_obj == NULL, "IBindCtx_GetObjectParam with nonexistent key should have set output parameter to NULL instead of %p\n", param_obj); - - hr = IBindCtx_RevokeObjectParam(pBindCtx, (WCHAR *)wszNonExistent); - ok(hr == E_FAIL, "IBindCtx_RevokeObjectParam with nonexistent key should have failed with E_FAIL instead of 0x%08x\n", hr); - - hr = IBindCtx_EnumObjectParam(pBindCtx, &pEnumString); - ok(hr == E_NOTIMPL, "IBindCtx_EnumObjectParam should have returned E_NOTIMPL instead of 0x%08x\n", hr); - ok(!pEnumString, "pEnumString should be NULL\n"); - - hr = IBindCtx_RegisterObjectBound(pBindCtx, NULL); - ok_ole_success(hr, "IBindCtx_RegisterObjectBound(NULL)"); - - hr = IBindCtx_RevokeObjectBound(pBindCtx, NULL); - ok(hr == E_INVALIDARG, "IBindCtx_RevokeObjectBound(NULL) should have return E_INVALIDARG instead of 0x%08x\n", hr); - - unknown2 = HeapAlloc(GetProcessHeap(), 0, sizeof(*unknown)); - unknown2->lpVtbl = &HeapUnknown_Vtbl; - unknown2->refs = 1; - hr = IBindCtx_RegisterObjectBound(pBindCtx, (IUnknown *)&unknown2->lpVtbl); - ok_ole_success(hr, "IBindCtx_RegisterObjectBound"); - - hr = IBindCtx_RevokeObjectBound(pBindCtx, (IUnknown *)&unknown2->lpVtbl); - ok_ole_success(hr, "IBindCtx_RevokeObjectBound"); - - hr = IBindCtx_RevokeObjectBound(pBindCtx, (IUnknown *)&unknown2->lpVtbl); - ok(hr == MK_E_NOTBOUND, "IBindCtx_RevokeObjectBound with not bound object should have returned MK_E_NOTBOUND instead of 0x%08x\n", hr); - - IBindCtx_Release(pBindCtx); - - refs = IUnknown_Release((IUnknown *)&unknown->lpVtbl); - ok(!refs, "object param should have been destroyed, instead of having %d refs\n", refs); - - refs = IUnknown_Release((IUnknown *)&unknown2->lpVtbl); - ok(!refs, "bound object should have been destroyed, instead of having %d refs\n", refs); -} - -static void test_save_load_filemoniker(void) -{ - IMoniker* pMk; - IStream* pStm; - HRESULT hr; - ULARGE_INTEGER size; - LARGE_INTEGER zero_pos, dead_pos, nulls_pos; - DWORD some_val = 0xFEDCBA98; - int i; - - /* see FileMonikerImpl_Save docs */ - zero_pos.QuadPart = 0; - dead_pos.QuadPart = sizeof(WORD) + sizeof(DWORD) + (lstrlenW(wszFileName1) + 1) + sizeof(WORD); - nulls_pos.QuadPart = dead_pos.QuadPart + sizeof(WORD); - - /* create the stream we're going to write to */ - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStm); - ok_ole_success(hr, "CreateStreamOnHGlobal"); - - size.u.LowPart = 128; - hr = IStream_SetSize(pStm, size); - ok_ole_success(hr, "IStream_SetSize"); - - /* create and save a moniker */ - hr = CreateFileMoniker(wszFileName1, &pMk); - ok_ole_success(hr, "CreateFileMoniker"); - - hr = IMoniker_Save(pMk, pStm, TRUE); - ok_ole_success(hr, "IMoniker_Save"); - - hr = IMoniker_Release(pMk); - ok_ole_success(hr, "IMoniker_Release"); - - /* overwrite the constants with various values */ - hr = IStream_Seek(pStm, zero_pos, STREAM_SEEK_SET, NULL); - ok_ole_success(hr, "IStream_Seek"); - hr = IStream_Write(pStm, &some_val, sizeof(WORD), NULL); - ok_ole_success(hr, "IStream_Write"); - - hr = IStream_Seek(pStm, dead_pos, STREAM_SEEK_SET, NULL); - ok_ole_success(hr, "IStream_Seek"); - hr = IStream_Write(pStm, &some_val, sizeof(WORD), NULL); - ok_ole_success(hr, "IStream_Write"); - - hr = IStream_Seek(pStm, nulls_pos, STREAM_SEEK_SET, NULL); - ok_ole_success(hr, "IStream_Seek"); - for(i = 0; i < 5; ++i){ - hr = IStream_Write(pStm, &some_val, sizeof(DWORD), NULL); - ok_ole_success(hr, "IStream_Write"); - } - - /* go back to the start of the stream */ - hr = IStream_Seek(pStm, zero_pos, STREAM_SEEK_SET, NULL); - ok_ole_success(hr, "IStream_Seek"); - - /* create a new moniker and load into it */ - hr = CreateFileMoniker(wszFileName1, &pMk); - ok_ole_success(hr, "CreateFileMoniker"); - - hr = IMoniker_Load(pMk, pStm); - ok_ole_success(hr, "IMoniker_Load"); - - hr = IMoniker_Release(pMk); - ok_ole_success(hr, "IMoniker_Release"); - - hr = IStream_Release(pStm); - ok_ole_success(hr, "IStream_Release"); -} - -START_TEST(moniker) -{ - CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - test_ROT(); - test_ROT_multiple_entries(); - test_MkParseDisplayName(); - test_class_moniker(); - test_file_monikers(); - test_item_moniker(); - test_anti_moniker(); - test_generic_composite_moniker(); - test_pointer_moniker(); - test_save_load_filemoniker(); - - /* FIXME: test moniker creation funcs and parsing other moniker formats */ - - test_bind_context(); - - CoUninitialize(); -} diff --git a/rostests/winetests/ole32/ole2.c b/rostests/winetests/ole32/ole2.c deleted file mode 100644 index 6d02206d3bc..00000000000 --- a/rostests/winetests/ole32/ole2.c +++ /dev/null @@ -1,1632 +0,0 @@ -/* - * Object Linking and Embedding Tests - * - * 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 COBJMACROS -#define CONST_VTABLE - -#include -#define NOCRYPT -#include "windef.h" -#include "winbase.h" -#include "objbase.h" -#include "shlguid.h" - -#include "wine/test.h" - -#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr) - -static IPersistStorage OleObjectPersistStg; -static IOleCache *cache; -static IRunnableObject *runnable; - -static const CLSID CLSID_WineTest = -{ /* 9474ba1a-258b-490b-bc13-516e9239ace0 */ - 0x9474ba1a, - 0x258b, - 0x490b, - {0xbc, 0x13, 0x51, 0x6e, 0x92, 0x39, 0xac, 0xe0} -}; - -#define TEST_OPTIONAL 0x1 - -struct expected_method -{ - const char *method; - unsigned int flags; -}; - -static const struct expected_method *expected_method_list; - -BOOL g_showRunnable = TRUE; -BOOL g_isRunning = TRUE; - -#define CHECK_EXPECTED_METHOD(method_name) \ - do { \ - trace("%s\n", method_name); \ - ok(expected_method_list->method != NULL, "Extra method %s called\n", method_name); \ - if (expected_method_list->method) \ - { \ - while (expected_method_list->flags & TEST_OPTIONAL && \ - strcmp(expected_method_list->method, method_name) != 0) \ - expected_method_list++; \ - ok(!strcmp(expected_method_list->method, method_name), "Expected %s to be called instead of %s\n", \ - expected_method_list->method, method_name); \ - expected_method_list++; \ - } \ - } while(0) - -#define CHECK_NO_EXTRA_METHODS() \ - do { \ - while (expected_method_list->flags & TEST_OPTIONAL) \ - expected_method_list++; \ - ok(!expected_method_list->method, "Method sequence starting from %s not called\n", expected_method_list->method); \ - } while (0) - -static HRESULT WINAPI OleObject_QueryInterface(IOleObject *iface, REFIID riid, void **ppv) -{ - CHECK_EXPECTED_METHOD("OleObject_QueryInterface"); - - *ppv = NULL; - - if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IOleObject)) - *ppv = iface; - else if (IsEqualIID(riid, &IID_IPersistStorage)) - *ppv = &OleObjectPersistStg; - else if (IsEqualIID(riid, &IID_IOleCache)) - *ppv = cache; - else if (IsEqualIID(riid, &IID_IRunnableObject) && g_showRunnable) - *ppv = runnable; - - if(*ppv) { - IUnknown_AddRef((IUnknown*)*ppv); - return S_OK; - } - - trace("OleObject_QueryInterface: returning E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI OleObject_AddRef(IOleObject *iface) -{ - CHECK_EXPECTED_METHOD("OleObject_AddRef"); - return 2; -} - -static ULONG WINAPI OleObject_Release(IOleObject *iface) -{ - CHECK_EXPECTED_METHOD("OleObject_Release"); - return 1; -} - -static HRESULT WINAPI OleObject_SetClientSite - ( - IOleObject *iface, - IOleClientSite *pClientSite - ) -{ - CHECK_EXPECTED_METHOD("OleObject_SetClientSite"); - return S_OK; -} - -static HRESULT WINAPI OleObject_GetClientSite - ( - IOleObject *iface, - IOleClientSite **ppClientSite - ) -{ - CHECK_EXPECTED_METHOD("OleObject_GetClientSite"); - return E_NOTIMPL; -} - -static HRESULT WINAPI OleObject_SetHostNames - ( - IOleObject *iface, - LPCOLESTR szContainerApp, - LPCOLESTR szContainerObj - ) -{ - CHECK_EXPECTED_METHOD("OleObject_SetHostNames"); - return S_OK; -} - -static HRESULT WINAPI OleObject_Close - ( - IOleObject *iface, - DWORD dwSaveOption - ) -{ - CHECK_EXPECTED_METHOD("OleObject_Close"); - return S_OK; -} - -static HRESULT WINAPI OleObject_SetMoniker - ( - IOleObject *iface, - DWORD dwWhichMoniker, - IMoniker *pmk - ) -{ - CHECK_EXPECTED_METHOD("OleObject_SetMoniker"); - return S_OK; -} - -static HRESULT WINAPI OleObject_GetMoniker - ( - IOleObject *iface, - DWORD dwAssign, - DWORD dwWhichMoniker, - IMoniker **ppmk - ) -{ - CHECK_EXPECTED_METHOD("OleObject_GetMoniker"); - return S_OK; -} - -static HRESULT WINAPI OleObject_InitFromData - ( - IOleObject *iface, - IDataObject *pDataObject, - BOOL fCreation, - DWORD dwReserved - ) -{ - CHECK_EXPECTED_METHOD("OleObject_InitFromData"); - return S_OK; -} - -static HRESULT WINAPI OleObject_GetClipboardData - ( - IOleObject *iface, - DWORD dwReserved, - IDataObject **ppDataObject - ) -{ - CHECK_EXPECTED_METHOD("OleObject_GetClipboardData"); - return E_NOTIMPL; -} - -static HRESULT WINAPI OleObject_DoVerb - ( - IOleObject *iface, - LONG iVerb, - LPMSG lpmsg, - IOleClientSite *pActiveSite, - LONG lindex, - HWND hwndParent, - LPCRECT lprcPosRect - ) -{ - CHECK_EXPECTED_METHOD("OleObject_DoVerb"); - return S_OK; -} - -static HRESULT WINAPI OleObject_EnumVerbs - ( - IOleObject *iface, - IEnumOLEVERB **ppEnumOleVerb - ) -{ - CHECK_EXPECTED_METHOD("OleObject_EnumVerbs"); - return E_NOTIMPL; -} - -static HRESULT WINAPI OleObject_Update - ( - IOleObject *iface - ) -{ - CHECK_EXPECTED_METHOD("OleObject_Update"); - return S_OK; -} - -static HRESULT WINAPI OleObject_IsUpToDate - ( - IOleObject *iface - ) -{ - CHECK_EXPECTED_METHOD("OleObject_IsUpToDate"); - return S_OK; -} - -static HRESULT WINAPI OleObject_GetUserClassID -( - IOleObject *iface, - CLSID *pClsid -) -{ - CHECK_EXPECTED_METHOD("OleObject_GetUserClassID"); - return E_NOTIMPL; -} - -static HRESULT WINAPI OleObject_GetUserType -( - IOleObject *iface, - DWORD dwFormOfType, - LPOLESTR *pszUserType -) -{ - CHECK_EXPECTED_METHOD("OleObject_GetUserType"); - return E_NOTIMPL; -} - -static HRESULT WINAPI OleObject_SetExtent -( - IOleObject *iface, - DWORD dwDrawAspect, - SIZEL *psizel -) -{ - CHECK_EXPECTED_METHOD("OleObject_SetExtent"); - return S_OK; -} - -static HRESULT WINAPI OleObject_GetExtent -( - IOleObject *iface, - DWORD dwDrawAspect, - SIZEL *psizel -) -{ - CHECK_EXPECTED_METHOD("OleObject_GetExtent"); - return E_NOTIMPL; -} - -static HRESULT WINAPI OleObject_Advise -( - IOleObject *iface, - IAdviseSink *pAdvSink, - DWORD *pdwConnection -) -{ - CHECK_EXPECTED_METHOD("OleObject_Advise"); - return S_OK; -} - -static HRESULT WINAPI OleObject_Unadvise -( - IOleObject *iface, - DWORD dwConnection -) -{ - CHECK_EXPECTED_METHOD("OleObject_Unadvise"); - return S_OK; -} - -static HRESULT WINAPI OleObject_EnumAdvise -( - IOleObject *iface, - IEnumSTATDATA **ppenumAdvise -) -{ - CHECK_EXPECTED_METHOD("OleObject_EnumAdvise"); - return E_NOTIMPL; -} - -static HRESULT WINAPI OleObject_GetMiscStatus -( - IOleObject *iface, - DWORD dwAspect, - DWORD *pdwStatus -) -{ - CHECK_EXPECTED_METHOD("OleObject_GetMiscStatus"); - *pdwStatus = DVASPECT_CONTENT; - return S_OK; -} - -static HRESULT WINAPI OleObject_SetColorScheme -( - IOleObject *iface, - LOGPALETTE *pLogpal -) -{ - CHECK_EXPECTED_METHOD("OleObject_SetColorScheme"); - return E_NOTIMPL; -} - -static const IOleObjectVtbl OleObjectVtbl = -{ - OleObject_QueryInterface, - OleObject_AddRef, - OleObject_Release, - OleObject_SetClientSite, - OleObject_GetClientSite, - OleObject_SetHostNames, - OleObject_Close, - OleObject_SetMoniker, - OleObject_GetMoniker, - OleObject_InitFromData, - OleObject_GetClipboardData, - OleObject_DoVerb, - OleObject_EnumVerbs, - OleObject_Update, - OleObject_IsUpToDate, - OleObject_GetUserClassID, - OleObject_GetUserType, - OleObject_SetExtent, - OleObject_GetExtent, - OleObject_Advise, - OleObject_Unadvise, - OleObject_EnumAdvise, - OleObject_GetMiscStatus, - OleObject_SetColorScheme -}; - -static IOleObject OleObject = { &OleObjectVtbl }; - -static HRESULT WINAPI OleObjectPersistStg_QueryInterface(IPersistStorage *iface, REFIID riid, void **ppv) -{ - trace("OleObjectPersistStg_QueryInterface\n"); - return IUnknown_QueryInterface((IUnknown *)&OleObject, riid, ppv); -} - -static ULONG WINAPI OleObjectPersistStg_AddRef(IPersistStorage *iface) -{ - CHECK_EXPECTED_METHOD("OleObjectPersistStg_AddRef"); - return 2; -} - -static ULONG WINAPI OleObjectPersistStg_Release(IPersistStorage *iface) -{ - CHECK_EXPECTED_METHOD("OleObjectPersistStg_Release"); - return 1; -} - -static HRESULT WINAPI OleObjectPersistStg_GetClassId(IPersistStorage *iface, CLSID *clsid) -{ - CHECK_EXPECTED_METHOD("OleObjectPersistStg_GetClassId"); - return E_NOTIMPL; -} - -static HRESULT WINAPI OleObjectPersistStg_IsDirty -( - IPersistStorage *iface -) -{ - CHECK_EXPECTED_METHOD("OleObjectPersistStg_IsDirty"); - return S_OK; -} - -static HRESULT WINAPI OleObjectPersistStg_InitNew -( - IPersistStorage *iface, - IStorage *pStg -) -{ - CHECK_EXPECTED_METHOD("OleObjectPersistStg_InitNew"); - return S_OK; -} - -static HRESULT WINAPI OleObjectPersistStg_Load -( - IPersistStorage *iface, - IStorage *pStg -) -{ - CHECK_EXPECTED_METHOD("OleObjectPersistStg_Load"); - return S_OK; -} - -static HRESULT WINAPI OleObjectPersistStg_Save -( - IPersistStorage *iface, - IStorage *pStgSave, - BOOL fSameAsLoad -) -{ - CHECK_EXPECTED_METHOD("OleObjectPersistStg_Save"); - return S_OK; -} - -static HRESULT WINAPI OleObjectPersistStg_SaveCompleted -( - IPersistStorage *iface, - IStorage *pStgNew -) -{ - CHECK_EXPECTED_METHOD("OleObjectPersistStg_SaveCompleted"); - return S_OK; -} - -static HRESULT WINAPI OleObjectPersistStg_HandsOffStorage -( - IPersistStorage *iface -) -{ - CHECK_EXPECTED_METHOD("OleObjectPersistStg_HandsOffStorage"); - return S_OK; -} - -static const IPersistStorageVtbl OleObjectPersistStgVtbl = -{ - OleObjectPersistStg_QueryInterface, - OleObjectPersistStg_AddRef, - OleObjectPersistStg_Release, - OleObjectPersistStg_GetClassId, - OleObjectPersistStg_IsDirty, - OleObjectPersistStg_InitNew, - OleObjectPersistStg_Load, - OleObjectPersistStg_Save, - OleObjectPersistStg_SaveCompleted, - OleObjectPersistStg_HandsOffStorage -}; - -static IPersistStorage OleObjectPersistStg = { &OleObjectPersistStgVtbl }; - -static HRESULT WINAPI OleObjectCache_QueryInterface(IOleCache *iface, REFIID riid, void **ppv) -{ - return IUnknown_QueryInterface((IUnknown *)&OleObject, riid, ppv); -} - -static ULONG WINAPI OleObjectCache_AddRef(IOleCache *iface) -{ - CHECK_EXPECTED_METHOD("OleObjectCache_AddRef"); - return 2; -} - -static ULONG WINAPI OleObjectCache_Release(IOleCache *iface) -{ - CHECK_EXPECTED_METHOD("OleObjectCache_Release"); - return 1; -} - -static HRESULT WINAPI OleObjectCache_Cache -( - IOleCache *iface, - FORMATETC *pformatetc, - DWORD advf, - DWORD *pdwConnection -) -{ - CHECK_EXPECTED_METHOD("OleObjectCache_Cache"); - return S_OK; -} - -static HRESULT WINAPI OleObjectCache_Uncache -( - IOleCache *iface, - DWORD dwConnection -) -{ - CHECK_EXPECTED_METHOD("OleObjectCache_Uncache"); - return S_OK; -} - -static HRESULT WINAPI OleObjectCache_EnumCache -( - IOleCache *iface, - IEnumSTATDATA **ppenumSTATDATA -) -{ - CHECK_EXPECTED_METHOD("OleObjectCache_EnumCache"); - return S_OK; -} - - -static HRESULT WINAPI OleObjectCache_InitCache -( - IOleCache *iface, - IDataObject *pDataObject -) -{ - CHECK_EXPECTED_METHOD("OleObjectCache_InitCache"); - return S_OK; -} - - -static HRESULT WINAPI OleObjectCache_SetData -( - IOleCache *iface, - FORMATETC *pformatetc, - STGMEDIUM *pmedium, - BOOL fRelease -) -{ - CHECK_EXPECTED_METHOD("OleObjectCache_SetData"); - return S_OK; -} - - -static const IOleCacheVtbl OleObjectCacheVtbl = -{ - OleObjectCache_QueryInterface, - OleObjectCache_AddRef, - OleObjectCache_Release, - OleObjectCache_Cache, - OleObjectCache_Uncache, - OleObjectCache_EnumCache, - OleObjectCache_InitCache, - OleObjectCache_SetData -}; - -static IOleCache OleObjectCache = { &OleObjectCacheVtbl }; - -static HRESULT WINAPI OleObjectCF_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv) -{ - if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IClassFactory)) - { - *ppv = iface; - IUnknown_AddRef(iface); - return S_OK; - } - *ppv = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI OleObjectCF_AddRef(IClassFactory *iface) -{ - return 2; -} - -static ULONG WINAPI OleObjectCF_Release(IClassFactory *iface) -{ - return 1; -} - -static HRESULT WINAPI OleObjectCF_CreateInstance(IClassFactory *iface, IUnknown *punkOuter, REFIID riid, void **ppv) -{ - return IUnknown_QueryInterface((IUnknown *)&OleObject, riid, ppv); -} - -static HRESULT WINAPI OleObjectCF_LockServer(IClassFactory *iface, BOOL lock) -{ - return S_OK; -} - -static const IClassFactoryVtbl OleObjectCFVtbl = -{ - OleObjectCF_QueryInterface, - OleObjectCF_AddRef, - OleObjectCF_Release, - OleObjectCF_CreateInstance, - OleObjectCF_LockServer -}; - -static IClassFactory OleObjectCF = { &OleObjectCFVtbl }; - -static HRESULT WINAPI OleObjectRunnable_QueryInterface(IRunnableObject *iface, REFIID riid, void **ppv) -{ - return IUnknown_QueryInterface((IUnknown *)&OleObject, riid, ppv); -} - -static ULONG WINAPI OleObjectRunnable_AddRef(IRunnableObject *iface) -{ - CHECK_EXPECTED_METHOD("OleObjectRunnable_AddRef"); - return 2; -} - -static ULONG WINAPI OleObjectRunnable_Release(IRunnableObject *iface) -{ - CHECK_EXPECTED_METHOD("OleObjectRunnable_Release"); - return 1; -} - -static HRESULT WINAPI OleObjectRunnable_GetRunningClass( - IRunnableObject *iface, - LPCLSID lpClsid) -{ - CHECK_EXPECTED_METHOD("OleObjectRunnable_GetRunningClass"); - return E_NOTIMPL; -} - -static HRESULT WINAPI OleObjectRunnable_Run( - IRunnableObject *iface, - LPBINDCTX pbc) -{ - CHECK_EXPECTED_METHOD("OleObjectRunnable_Run"); - return S_OK; -} - -static BOOL WINAPI OleObjectRunnable_IsRunning(IRunnableObject *iface) -{ - CHECK_EXPECTED_METHOD("OleObjectRunnable_IsRunning"); - return g_isRunning; -} - -static HRESULT WINAPI OleObjectRunnable_LockRunning( - IRunnableObject *iface, - BOOL fLock, - BOOL fLastUnlockCloses) -{ - CHECK_EXPECTED_METHOD("OleObjectRunnable_LockRunning"); - return S_OK; -} - -static HRESULT WINAPI OleObjectRunnable_SetContainedObject( - IRunnableObject *iface, - BOOL fContained) -{ - CHECK_EXPECTED_METHOD("OleObjectRunnable_SetContainedObject"); - return S_OK; -} - -static const IRunnableObjectVtbl OleObjectRunnableVtbl = -{ - OleObjectRunnable_QueryInterface, - OleObjectRunnable_AddRef, - OleObjectRunnable_Release, - OleObjectRunnable_GetRunningClass, - OleObjectRunnable_Run, - OleObjectRunnable_IsRunning, - OleObjectRunnable_LockRunning, - OleObjectRunnable_SetContainedObject -}; - -static IRunnableObject OleObjectRunnable = { &OleObjectRunnableVtbl }; - -static const CLSID CLSID_Equation3 = {0x0002CE02, 0x0000, 0x0000, {0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} }; - -static void test_OleCreate(IStorage *pStorage) -{ - HRESULT hr; - IOleObject *pObject; - FORMATETC formatetc; - static const struct expected_method methods_olerender_none[] = - { - { "OleObject_QueryInterface", 0 }, - { "OleObject_AddRef", 0 }, - { "OleObject_QueryInterface", 0 }, - { "OleObject_AddRef", TEST_OPTIONAL }, - { "OleObject_Release", TEST_OPTIONAL }, - { "OleObject_QueryInterface", TEST_OPTIONAL }, - { "OleObjectPersistStg_AddRef", 0 }, - { "OleObjectPersistStg_InitNew", 0 }, - { "OleObjectPersistStg_Release", 0 }, - { "OleObject_Release", 0 }, - { "OleObject_Release", TEST_OPTIONAL }, - { NULL, 0 } - }; - static const struct expected_method methods_olerender_draw[] = - { - { "OleObject_QueryInterface", 0 }, - { "OleObject_AddRef", 0 }, - { "OleObject_QueryInterface", 0 }, - { "OleObject_AddRef", TEST_OPTIONAL /* NT4 only */ }, - { "OleObject_Release", TEST_OPTIONAL /* NT4 only */ }, - { "OleObject_QueryInterface", TEST_OPTIONAL /* NT4 only */ }, - { "OleObjectPersistStg_AddRef", 0 }, - { "OleObjectPersistStg_InitNew", 0 }, - { "OleObjectPersistStg_Release", 0 }, - { "OleObject_QueryInterface", 0 }, - { "OleObjectRunnable_AddRef", 0 }, - { "OleObjectRunnable_Run", 0 }, - { "OleObjectRunnable_Release", 0 }, - { "OleObject_QueryInterface", 0 }, - { "OleObjectCache_AddRef", 0 }, - { "OleObjectCache_Cache", 0 }, - { "OleObjectCache_Release", 0 }, - { "OleObject_Release", 0 }, - { "OleObject_Release", TEST_OPTIONAL /* NT4 only */ }, - { NULL, 0 } - }; - static const struct expected_method methods_olerender_format[] = - { - { "OleObject_QueryInterface", 0 }, - { "OleObject_AddRef", 0 }, - { "OleObject_QueryInterface", 0 }, - { "OleObject_AddRef", 0 }, - { "OleObject_GetMiscStatus", 0 }, - { "OleObject_QueryInterface", 0 }, - { "OleObjectPersistStg_AddRef", 0 }, - { "OleObjectPersistStg_InitNew", 0 }, - { "OleObjectPersistStg_Release", 0 }, - { "OleObject_SetClientSite", 0 }, - { "OleObject_Release", 0 }, - { "OleObject_QueryInterface", 0 }, - { "OleObjectRunnable_AddRef", 0 }, - { "OleObjectRunnable_Run", 0 }, - { "OleObjectRunnable_Release", 0 }, - { "OleObject_QueryInterface", 0 }, - { "OleObjectCache_AddRef", 0 }, - { "OleObjectCache_Cache", 0 }, - { "OleObjectCache_Release", 0 }, - { "OleObject_Release", 0 }, - { NULL, 0 } - }; - static const struct expected_method methods_olerender_asis[] = - { - { "OleObject_QueryInterface", 0 }, - { "OleObject_AddRef", 0 }, - { "OleObject_QueryInterface", 0 }, - { "OleObject_AddRef", TEST_OPTIONAL /* NT4 only */ }, - { "OleObject_Release", TEST_OPTIONAL /* NT4 only */ }, - { "OleObject_QueryInterface", TEST_OPTIONAL /* NT4 only */ }, - { "OleObjectPersistStg_AddRef", 0 }, - { "OleObjectPersistStg_InitNew", 0 }, - { "OleObjectPersistStg_Release", 0 }, - { "OleObject_Release", 0 }, - { "OleObject_Release", TEST_OPTIONAL /* NT4 only */ }, - { NULL, 0 } - }; - static const struct expected_method methods_olerender_draw_no_runnable[] = - { - { "OleObject_QueryInterface", 0 }, - { "OleObject_AddRef", 0 }, - { "OleObject_QueryInterface", 0 }, - { "OleObject_AddRef", TEST_OPTIONAL /* NT4 only */ }, - { "OleObject_Release", TEST_OPTIONAL /* NT4 only */ }, - { "OleObject_QueryInterface", TEST_OPTIONAL /* NT4 only */ }, - { "OleObjectPersistStg_AddRef", 0 }, - { "OleObjectPersistStg_InitNew", 0 }, - { "OleObjectPersistStg_Release", 0 }, - { "OleObject_QueryInterface", 0 }, - { "OleObject_QueryInterface", 0 }, - { "OleObjectCache_AddRef", 0 }, - { "OleObjectCache_Cache", 0 }, - { "OleObjectCache_Release", 0 }, - { "OleObject_Release", 0 }, - { "OleObject_Release", TEST_OPTIONAL /* NT4 only */ }, - { NULL, 0 }, - }; - static const struct expected_method methods_olerender_draw_no_cache[] = - { - { "OleObject_QueryInterface", 0 }, - { "OleObject_AddRef", 0 }, - { "OleObject_QueryInterface", 0 }, - { "OleObject_AddRef", TEST_OPTIONAL /* NT4 only */ }, - { "OleObject_Release", TEST_OPTIONAL /* NT4 only */ }, - { "OleObject_QueryInterface", TEST_OPTIONAL /* NT4 only */ }, - { "OleObjectPersistStg_AddRef", 0 }, - { "OleObjectPersistStg_InitNew", 0 }, - { "OleObjectPersistStg_Release", 0 }, - { "OleObject_QueryInterface", 0 }, - { "OleObjectRunnable_AddRef", 0 }, - { "OleObjectRunnable_Run", 0 }, - { "OleObjectRunnable_Release", 0 }, - { "OleObject_QueryInterface", 0 }, - { "OleObject_Release", 0 }, - { "OleObject_Release", TEST_OPTIONAL /* NT4 only */ }, - { NULL, 0 } - }; - - runnable = &OleObjectRunnable; - cache = &OleObjectCache; - expected_method_list = methods_olerender_none; - trace("OleCreate with OLERENDER_NONE:\n"); - hr = OleCreate(&CLSID_Equation3, &IID_IOleObject, OLERENDER_NONE, NULL, NULL, pStorage, (void **)&pObject); - ok_ole_success(hr, "OleCreate"); - IOleObject_Release(pObject); - CHECK_NO_EXTRA_METHODS(); - - expected_method_list = methods_olerender_draw; - trace("OleCreate with OLERENDER_DRAW:\n"); - hr = OleCreate(&CLSID_Equation3, &IID_IOleObject, OLERENDER_DRAW, NULL, NULL, pStorage, (void **)&pObject); - ok_ole_success(hr, "OleCreate"); - IOleObject_Release(pObject); - CHECK_NO_EXTRA_METHODS(); - - formatetc.cfFormat = CF_TEXT; - formatetc.ptd = NULL; - formatetc.dwAspect = DVASPECT_CONTENT; - formatetc.lindex = -1; - formatetc.tymed = TYMED_HGLOBAL; - expected_method_list = methods_olerender_format; - trace("OleCreate with OLERENDER_FORMAT:\n"); - hr = OleCreate(&CLSID_Equation3, &IID_IOleObject, OLERENDER_FORMAT, &formatetc, (IOleClientSite *)0xdeadbeef, pStorage, (void **)&pObject); - ok(hr == S_OK || - broken(hr == E_INVALIDARG), /* win2k */ - "OleCreate failed with error 0x%08x\n", hr); - if (pObject) - { - IOleObject_Release(pObject); - CHECK_NO_EXTRA_METHODS(); - } - - expected_method_list = methods_olerender_asis; - trace("OleCreate with OLERENDER_ASIS:\n"); - hr = OleCreate(&CLSID_Equation3, &IID_IOleObject, OLERENDER_ASIS, NULL, NULL, pStorage, (void **)&pObject); - ok_ole_success(hr, "OleCreate"); - IOleObject_Release(pObject); - CHECK_NO_EXTRA_METHODS(); - - runnable = NULL; - expected_method_list = methods_olerender_draw_no_runnable; - trace("OleCreate with OLERENDER_DRAW (no IRunnableObject):\n"); - hr = OleCreate(&CLSID_Equation3, &IID_IOleObject, OLERENDER_DRAW, NULL, NULL, pStorage, (void **)&pObject); - ok_ole_success(hr, "OleCreate"); - IOleObject_Release(pObject); - CHECK_NO_EXTRA_METHODS(); - - runnable = &OleObjectRunnable; - cache = NULL; - expected_method_list = methods_olerender_draw_no_cache; - trace("OleCreate with OLERENDER_DRAW (no IOleCache):\n"); - hr = OleCreate(&CLSID_Equation3, &IID_IOleObject, OLERENDER_DRAW, NULL, NULL, pStorage, (void **)&pObject); - ok_ole_success(hr, "OleCreate"); - IOleObject_Release(pObject); - CHECK_NO_EXTRA_METHODS(); - trace("end\n"); -} - -static void test_OleLoad(IStorage *pStorage) -{ - HRESULT hr; - IOleObject *pObject; - - static const struct expected_method methods_oleload[] = - { - { "OleObject_QueryInterface", 0 }, - { "OleObject_AddRef", 0 }, - { "OleObject_QueryInterface", 0 }, - { "OleObject_AddRef", 0 }, - { "OleObject_GetMiscStatus", 0 }, - { "OleObject_QueryInterface", 0 }, - { "OleObjectPersistStg_AddRef", 0 }, - { "OleObjectPersistStg_Load", 0 }, - { "OleObjectPersistStg_Release", 0 }, - { "OleObject_SetClientSite", 0 }, - { "OleObject_Release", 0 }, - { "OleObject_QueryInterface", 0 }, - { "OleObject_Release", 0 }, - { NULL, 0 } - }; - - expected_method_list = methods_oleload; - trace("OleLoad:\n"); - hr = OleLoad(pStorage, &IID_IOleObject, (IOleClientSite *)0xdeadbeef, (void **)&pObject); - ok(hr == S_OK || - broken(hr == E_INVALIDARG), /* win98 and win2k */ - "OleLoad failed with error 0x%08x\n", hr); - if (pObject) - { - IOleObject_Release(pObject); - CHECK_NO_EXTRA_METHODS(); - } -} - -static BOOL STDMETHODCALLTYPE draw_continue(ULONG_PTR param) -{ - CHECK_EXPECTED_METHOD("draw_continue"); - return TRUE; -} - -static HRESULT WINAPI AdviseSink_QueryInterface(IAdviseSink *iface, REFIID riid, void **ppv) -{ - if (IsEqualIID(riid, &IID_IAdviseSink) || IsEqualIID(riid, &IID_IUnknown)) - { - *ppv = iface; - IUnknown_AddRef(iface); - return S_OK; - } - *ppv = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI AdviseSink_AddRef(IAdviseSink *iface) -{ - return 2; -} - -static ULONG WINAPI AdviseSink_Release(IAdviseSink *iface) -{ - return 1; -} - - -static void WINAPI AdviseSink_OnDataChange( - IAdviseSink *iface, - FORMATETC *pFormatetc, - STGMEDIUM *pStgmed) -{ - CHECK_EXPECTED_METHOD("AdviseSink_OnDataChange"); -} - -static void WINAPI AdviseSink_OnViewChange( - IAdviseSink *iface, - DWORD dwAspect, - LONG lindex) -{ - CHECK_EXPECTED_METHOD("AdviseSink_OnViewChange"); -} - -static void WINAPI AdviseSink_OnRename( - IAdviseSink *iface, - IMoniker *pmk) -{ - CHECK_EXPECTED_METHOD("AdviseSink_OnRename"); -} - -static void WINAPI AdviseSink_OnSave(IAdviseSink *iface) -{ - CHECK_EXPECTED_METHOD("AdviseSink_OnSave"); -} - -static void WINAPI AdviseSink_OnClose(IAdviseSink *iface) -{ - CHECK_EXPECTED_METHOD("AdviseSink_OnClose"); -} - -static const IAdviseSinkVtbl AdviseSinkVtbl = -{ - AdviseSink_QueryInterface, - AdviseSink_AddRef, - AdviseSink_Release, - AdviseSink_OnDataChange, - AdviseSink_OnViewChange, - AdviseSink_OnRename, - AdviseSink_OnSave, - AdviseSink_OnClose -}; - -static IAdviseSink AdviseSink = { &AdviseSinkVtbl }; - -static HRESULT WINAPI DataObject_QueryInterface( - IDataObject* iface, - REFIID riid, - void** ppvObject) -{ - if (IsEqualIID(riid, &IID_IDataObject) || IsEqualIID(riid, &IID_IUnknown)) - { - *ppvObject = iface; - return S_OK; - } - *ppvObject = NULL; - return S_OK; -} - -static ULONG WINAPI DataObject_AddRef( - IDataObject* iface) -{ - return 2; -} - -static ULONG WINAPI DataObject_Release( - IDataObject* iface) -{ - return 1; -} - -static HRESULT WINAPI DataObject_GetData( - IDataObject* iface, - LPFORMATETC pformatetcIn, - STGMEDIUM* pmedium) -{ - CHECK_EXPECTED_METHOD("DataObject_GetData"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DataObject_GetDataHere( - IDataObject* iface, - LPFORMATETC pformatetc, - STGMEDIUM* pmedium) -{ - CHECK_EXPECTED_METHOD("DataObject_GetDataHere"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DataObject_QueryGetData( - IDataObject* iface, - LPFORMATETC pformatetc) -{ - CHECK_EXPECTED_METHOD("DataObject_QueryGetData"); - return S_OK; -} - -static HRESULT WINAPI DataObject_GetCanonicalFormatEtc( - IDataObject* iface, - LPFORMATETC pformatectIn, - LPFORMATETC pformatetcOut) -{ - CHECK_EXPECTED_METHOD("DataObject_GetCanonicalFormatEtc"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DataObject_SetData( - IDataObject* iface, - LPFORMATETC pformatetc, - STGMEDIUM* pmedium, - BOOL fRelease) -{ - CHECK_EXPECTED_METHOD("DataObject_SetData"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DataObject_EnumFormatEtc( - IDataObject* iface, - DWORD dwDirection, - IEnumFORMATETC** ppenumFormatEtc) -{ - CHECK_EXPECTED_METHOD("DataObject_EnumFormatEtc"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DataObject_DAdvise( - IDataObject* iface, - FORMATETC* pformatetc, - DWORD advf, - IAdviseSink* pAdvSink, - DWORD* pdwConnection) -{ - CHECK_EXPECTED_METHOD("DataObject_DAdvise"); - *pdwConnection = 1; - return S_OK; -} - -static HRESULT WINAPI DataObject_DUnadvise( - IDataObject* iface, - DWORD dwConnection) -{ - CHECK_EXPECTED_METHOD("DataObject_DUnadvise"); - return S_OK; -} - -static HRESULT WINAPI DataObject_EnumDAdvise( - IDataObject* iface, - IEnumSTATDATA** ppenumAdvise) -{ - CHECK_EXPECTED_METHOD("DataObject_EnumDAdvise"); - return OLE_E_ADVISENOTSUPPORTED; -} - -static IDataObjectVtbl DataObjectVtbl = -{ - DataObject_QueryInterface, - DataObject_AddRef, - DataObject_Release, - DataObject_GetData, - DataObject_GetDataHere, - DataObject_QueryGetData, - DataObject_GetCanonicalFormatEtc, - DataObject_SetData, - DataObject_EnumFormatEtc, - DataObject_DAdvise, - DataObject_DUnadvise, - DataObject_EnumDAdvise -}; - -static IDataObject DataObject = { &DataObjectVtbl }; - -static void test_data_cache(void) -{ - HRESULT hr; - IOleCache2 *pOleCache; - IStorage *pStorage; - IPersistStorage *pPS; - IViewObject *pViewObject; - IOleCacheControl *pOleCacheControl; - FORMATETC fmtetc; - STGMEDIUM stgmedium; - DWORD dwConnection; - DWORD dwFreeze; - RECTL rcBounds; - HDC hdcMem; - CLSID clsid; - char szSystemDir[MAX_PATH]; - WCHAR wszPath[MAX_PATH]; - static const WCHAR wszShell32[] = {'\\','s','h','e','l','l','3','2','.','d','l','l',0}; - - static const struct expected_method methods_cacheinitnew[] = - { - { "AdviseSink_OnViewChange", 0 }, - { "AdviseSink_OnViewChange", 0 }, - { "draw_continue", 0 }, - { "DataObject_DAdvise", 0 }, - { "DataObject_DAdvise", 0 }, - { "DataObject_DUnadvise", 0 }, - { "DataObject_DUnadvise", 0 }, - { NULL, 0 } - }; - static const struct expected_method methods_cacheload[] = - { - { "AdviseSink_OnViewChange", 0 }, - { "draw_continue", 0 }, - { "draw_continue", 0 }, - { "draw_continue", 0 }, - { "DataObject_GetData", 0 }, - { "DataObject_GetData", 0 }, - { "DataObject_GetData", 0 }, - { NULL, 0 } - }; - - GetSystemDirectory(szSystemDir, sizeof(szSystemDir)/sizeof(szSystemDir[0])); - - expected_method_list = methods_cacheinitnew; - - fmtetc.cfFormat = CF_METAFILEPICT; - fmtetc.dwAspect = DVASPECT_ICON; - fmtetc.lindex = -1; - fmtetc.ptd = NULL; - fmtetc.tymed = TYMED_MFPICT; - - hr = StgCreateDocfile(NULL, STGM_READWRITE | STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_DELETEONRELEASE, 0, &pStorage); - ok_ole_success(hr, "StgCreateDocfile"); - - /* Test with new data */ - - hr = CreateDataCache(NULL, &CLSID_NULL, &IID_IOleCache2, (LPVOID *)&pOleCache); - ok_ole_success(hr, "CreateDataCache"); - - hr = IOleCache_QueryInterface(pOleCache, &IID_IPersistStorage, (LPVOID *)&pPS); - ok_ole_success(hr, "IOleCache_QueryInterface(IID_IPersistStorage)"); - hr = IOleCache_QueryInterface(pOleCache, &IID_IViewObject, (LPVOID *)&pViewObject); - ok_ole_success(hr, "IOleCache_QueryInterface(IID_IViewObject)"); - hr = IOleCache_QueryInterface(pOleCache, &IID_IOleCacheControl, (LPVOID *)&pOleCacheControl); - ok_ole_success(hr, "IOleCache_QueryInterface(IID_IOleCacheControl)"); - - hr = IViewObject_SetAdvise(pViewObject, DVASPECT_ICON, ADVF_PRIMEFIRST, &AdviseSink); - ok_ole_success(hr, "IViewObject_SetAdvise"); - - hr = IPersistStorage_InitNew(pPS, pStorage); - ok_ole_success(hr, "IPersistStorage_InitNew"); - - hr = IPersistStorage_IsDirty(pPS); - ok_ole_success(hr, "IPersistStorage_IsDirty"); - - hr = IPersistStorage_GetClassID(pPS, &clsid); - ok_ole_success(hr, "IPersistStorage_GetClassID"); - ok(IsEqualCLSID(&clsid, &IID_NULL), "clsid should be blank\n"); - - hr = IOleCache_Uncache(pOleCache, 0xdeadbeef); - ok(hr == OLE_E_NOCONNECTION, "IOleCache_Uncache with invalid value should return OLE_E_NOCONNECTION instead of 0x%x\n", hr); - - /* Both tests crash on NT4 and below. StgCreatePropSetStg is only available on w2k and above. */ - if (GetProcAddress(GetModuleHandleA("ole32.dll"), "StgCreatePropSetStg")) - { - hr = IOleCache_Cache(pOleCache, NULL, 0, &dwConnection); - ok(hr == E_INVALIDARG, "IOleCache_Cache with NULL fmtetc should have returned E_INVALIDARG instead of 0x%08x\n", hr); - - hr = IOleCache_Cache(pOleCache, NULL, 0, NULL); - ok(hr == E_INVALIDARG, "IOleCache_Cache with NULL pdwConnection should have returned E_INVALIDARG instead of 0x%08x\n", hr); - } - else - { - skip("tests with NULL parameters will crash on NT4 and below\n"); - } - - for (fmtetc.cfFormat = CF_TEXT; fmtetc.cfFormat < CF_MAX; fmtetc.cfFormat++) - { - int i; - fmtetc.dwAspect = DVASPECT_THUMBNAIL; - for (i = 0; i < 7; i++) - { - fmtetc.tymed = 1 << i; - hr = IOleCache_Cache(pOleCache, &fmtetc, 0, &dwConnection); - if ((fmtetc.cfFormat == CF_METAFILEPICT && fmtetc.tymed == TYMED_MFPICT) || - (fmtetc.cfFormat == CF_BITMAP && fmtetc.tymed == TYMED_GDI) || - (fmtetc.cfFormat == CF_DIB && fmtetc.tymed == TYMED_HGLOBAL) || - (fmtetc.cfFormat == CF_ENHMETAFILE && fmtetc.tymed == TYMED_ENHMF)) - ok(hr == S_OK, "IOleCache_Cache cfFormat = %d, tymed = %d should have returned S_OK instead of 0x%08x\n", - fmtetc.cfFormat, fmtetc.tymed, hr); - else if (fmtetc.tymed == TYMED_HGLOBAL) - ok(hr == CACHE_S_FORMATETC_NOTSUPPORTED || - broken(hr == S_OK && fmtetc.cfFormat == CF_BITMAP) /* Win9x & NT4 */, - "IOleCache_Cache cfFormat = %d, tymed = %d should have returned CACHE_S_FORMATETC_NOTSUPPORTED instead of 0x%08x\n", - fmtetc.cfFormat, fmtetc.tymed, hr); - else - ok(hr == DV_E_TYMED, "IOleCache_Cache cfFormat = %d, tymed = %d should have returned DV_E_TYMED instead of 0x%08x\n", - fmtetc.cfFormat, fmtetc.tymed, hr); - if (SUCCEEDED(hr)) - { - hr = IOleCache_Uncache(pOleCache, dwConnection); - ok_ole_success(hr, "IOleCache_Uncache"); - } - } - } - - fmtetc.cfFormat = CF_BITMAP; - fmtetc.dwAspect = DVASPECT_THUMBNAIL; - fmtetc.tymed = TYMED_GDI; - hr = IOleCache_Cache(pOleCache, &fmtetc, 0, &dwConnection); - ok_ole_success(hr, "IOleCache_Cache"); - - fmtetc.cfFormat = 0; - fmtetc.dwAspect = DVASPECT_ICON; - fmtetc.tymed = TYMED_MFPICT; - hr = IOleCache_Cache(pOleCache, &fmtetc, 0, &dwConnection); - ok_ole_success(hr, "IOleCache_Cache"); - - MultiByteToWideChar(CP_ACP, 0, szSystemDir, -1, wszPath, sizeof(wszPath)/sizeof(wszPath[0])); - memcpy(wszPath+lstrlenW(wszPath), wszShell32, sizeof(wszShell32)); - - fmtetc.cfFormat = CF_METAFILEPICT; - stgmedium.tymed = TYMED_MFPICT; - U(stgmedium).hMetaFilePict = OleMetafilePictFromIconAndLabel( - LoadIcon(NULL, IDI_APPLICATION), wszPath, wszPath, 0); - stgmedium.pUnkForRelease = NULL; - - fmtetc.dwAspect = DVASPECT_CONTENT; - hr = IOleCache_SetData(pOleCache, &fmtetc, &stgmedium, FALSE); - ok(hr == OLE_E_BLANK, "IOleCache_SetData for aspect not in cache should have return OLE_E_BLANK instead of 0x%08x\n", hr); - - fmtetc.dwAspect = DVASPECT_ICON; - hr = IOleCache_SetData(pOleCache, &fmtetc, &stgmedium, FALSE); - ok_ole_success(hr, "IOleCache_SetData"); - - hr = IViewObject_Freeze(pViewObject, DVASPECT_ICON, -1, NULL, &dwFreeze); - todo_wine { - ok_ole_success(hr, "IViewObject_Freeze"); - hr = IViewObject_Freeze(pViewObject, DVASPECT_CONTENT, -1, NULL, &dwFreeze); - ok(hr == OLE_E_BLANK, "IViewObject_Freeze with uncached aspect should have returned OLE_E_BLANK instead of 0x%08x\n", hr); - } - - rcBounds.left = 0; - rcBounds.top = 0; - rcBounds.right = 100; - rcBounds.bottom = 100; - hdcMem = CreateCompatibleDC(NULL); - - hr = IViewObject_Draw(pViewObject, DVASPECT_ICON, -1, NULL, NULL, NULL, hdcMem, &rcBounds, NULL, draw_continue, 0xdeadbeef); - ok_ole_success(hr, "IViewObject_Draw"); - - hr = IViewObject_Draw(pViewObject, DVASPECT_CONTENT, -1, NULL, NULL, NULL, hdcMem, &rcBounds, NULL, draw_continue, 0xdeadbeef); - ok(hr == OLE_E_BLANK, "IViewObject_Draw with uncached aspect should have returned OLE_E_BLANK instead of 0x%08x\n", hr); - - DeleteDC(hdcMem); - - hr = IOleCacheControl_OnRun(pOleCacheControl, &DataObject); - todo_wine { - ok_ole_success(hr, "IOleCacheControl_OnRun"); - } - - hr = IPersistStorage_Save(pPS, pStorage, TRUE); - ok_ole_success(hr, "IPersistStorage_Save"); - - hr = IPersistStorage_SaveCompleted(pPS, NULL); - ok_ole_success(hr, "IPersistStorage_SaveCompleted"); - - hr = IPersistStorage_IsDirty(pPS); - ok(hr == S_FALSE, "IPersistStorage_IsDirty should have returned S_FALSE instead of 0x%x\n", hr); - - IPersistStorage_Release(pPS); - IViewObject_Release(pViewObject); - IOleCache_Release(pOleCache); - IOleCacheControl_Release(pOleCacheControl); - - todo_wine { - CHECK_NO_EXTRA_METHODS(); - } - - /* Test with loaded data */ - trace("Testing loaded data with CreateDataCache:\n"); - expected_method_list = methods_cacheload; - - hr = CreateDataCache(NULL, &CLSID_NULL, &IID_IOleCache2, (LPVOID *)&pOleCache); - ok_ole_success(hr, "CreateDataCache"); - - hr = IOleCache_QueryInterface(pOleCache, &IID_IPersistStorage, (LPVOID *)&pPS); - ok_ole_success(hr, "IOleCache_QueryInterface(IID_IPersistStorage)"); - hr = IOleCache_QueryInterface(pOleCache, &IID_IViewObject, (LPVOID *)&pViewObject); - ok_ole_success(hr, "IOleCache_QueryInterface(IID_IViewObject)"); - - hr = IViewObject_SetAdvise(pViewObject, DVASPECT_ICON, ADVF_PRIMEFIRST, &AdviseSink); - ok_ole_success(hr, "IViewObject_SetAdvise"); - - hr = IPersistStorage_Load(pPS, pStorage); - ok_ole_success(hr, "IPersistStorage_Load"); - - hr = IPersistStorage_IsDirty(pPS); - ok(hr == S_FALSE, "IPersistStorage_IsDirty should have returned S_FALSE instead of 0x%x\n", hr); - - fmtetc.cfFormat = 0; - fmtetc.dwAspect = DVASPECT_ICON; - fmtetc.lindex = -1; - fmtetc.ptd = NULL; - fmtetc.tymed = TYMED_MFPICT; - hr = IOleCache_Cache(pOleCache, &fmtetc, 0, &dwConnection); - ok(hr == CACHE_S_SAMECACHE, "IOleCache_Cache with already loaded data format type should return CACHE_S_SAMECACHE instead of 0x%x\n", hr); - - rcBounds.left = 0; - rcBounds.top = 0; - rcBounds.right = 100; - rcBounds.bottom = 100; - hdcMem = CreateCompatibleDC(NULL); - - hr = IViewObject_Draw(pViewObject, DVASPECT_ICON, -1, NULL, NULL, NULL, hdcMem, &rcBounds, NULL, draw_continue, 0xdeadbeef); - ok_ole_success(hr, "IViewObject_Draw"); - - hr = IViewObject_Draw(pViewObject, DVASPECT_CONTENT, -1, NULL, NULL, NULL, hdcMem, &rcBounds, NULL, draw_continue, 0xdeadbeef); - ok(hr == OLE_E_BLANK, "IViewObject_Draw with uncached aspect should have returned OLE_E_BLANK instead of 0x%08x\n", hr); - - /* unload the cached storage object, causing it to be reloaded */ - hr = IOleCache2_DiscardCache(pOleCache, DISCARDCACHE_NOSAVE); - ok_ole_success(hr, "IOleCache2_DiscardCache"); - hr = IViewObject_Draw(pViewObject, DVASPECT_ICON, -1, NULL, NULL, NULL, hdcMem, &rcBounds, NULL, draw_continue, 0xdeadbeef); - ok_ole_success(hr, "IViewObject_Draw"); - - /* unload the cached storage object, but don't allow it to be reloaded */ - hr = IPersistStorage_HandsOffStorage(pPS); - ok_ole_success(hr, "IPersistStorage_HandsOffStorage"); - hr = IViewObject_Draw(pViewObject, DVASPECT_ICON, -1, NULL, NULL, NULL, hdcMem, &rcBounds, NULL, draw_continue, 0xdeadbeef); - ok_ole_success(hr, "IViewObject_Draw"); - hr = IOleCache2_DiscardCache(pOleCache, DISCARDCACHE_NOSAVE); - ok_ole_success(hr, "IOleCache2_DiscardCache"); - hr = IViewObject_Draw(pViewObject, DVASPECT_ICON, -1, NULL, NULL, NULL, hdcMem, &rcBounds, NULL, draw_continue, 0xdeadbeef); - ok(hr == OLE_E_BLANK, "IViewObject_Draw with uncached aspect should have returned OLE_E_BLANK instead of 0x%08x\n", hr); - - DeleteDC(hdcMem); - - todo_wine { - hr = IOleCache_InitCache(pOleCache, &DataObject); - ok(hr == CACHE_E_NOCACHE_UPDATED, "IOleCache_InitCache should have returned CACHE_E_NOCACHE_UPDATED instead of 0x%08x\n", hr); - } - - IPersistStorage_Release(pPS); - IViewObject_Release(pViewObject); - IOleCache_Release(pOleCache); - - todo_wine { - CHECK_NO_EXTRA_METHODS(); - } - - IStorage_Release(pStorage); - ReleaseStgMedium(&stgmedium); -} - -static void test_default_handler(void) -{ - HRESULT hr; - IOleObject *pObject; - IRunnableObject *pRunnableObject; - IOleClientSite *pClientSite; - IDataObject *pDataObject; - SIZEL sizel; - DWORD dwStatus; - CLSID clsid; - LPOLESTR pszUserType; - LOGPALETTE palette; - DWORD dwAdvConn; - IMoniker *pMoniker; - FORMATETC fmtetc; - IOleInPlaceObject *pInPlaceObj; - IEnumOLEVERB *pEnumVerbs; - static const WCHAR wszUnknown[] = {'U','n','k','n','o','w','n',0}; - static const WCHAR wszHostName[] = {'W','i','n','e',' ','T','e','s','t',' ','P','r','o','g','r','a','m',0}; - static const WCHAR wszDelim[] = {'!',0}; - - hr = CoCreateInstance(&CLSID_WineTest, NULL, CLSCTX_INPROC_HANDLER, &IID_IOleObject, (void **)&pObject); - ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance should have failed with REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr); - - hr = OleCreateDefaultHandler(&CLSID_WineTest, NULL, &IID_IOleObject, (void **)&pObject); - ok_ole_success(hr, "OleCreateDefaultHandler"); - - hr = IOleObject_QueryInterface(pObject, &IID_IOleInPlaceObject, (void **)&pInPlaceObj); - ok(hr == E_NOINTERFACE, "IOleObject_QueryInterface(&IID_IOleInPlaceObject) should return E_NOINTERFACE instead of 0x%08x\n", hr); - - hr = IOleObject_Advise(pObject, &AdviseSink, &dwAdvConn); - ok_ole_success(hr, "IOleObject_Advise"); - - hr = IOleObject_Close(pObject, OLECLOSE_NOSAVE); - ok_ole_success(hr, "IOleObject_Close"); - - /* FIXME: test IOleObject_EnumAdvise */ - - hr = IOleObject_EnumVerbs(pObject, &pEnumVerbs); - ok(hr == REGDB_E_CLASSNOTREG, "IOleObject_EnumVerbs should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr); - - hr = IOleObject_GetClientSite(pObject, &pClientSite); - ok_ole_success(hr, "IOleObject_GetClientSite"); - - hr = IOleObject_GetClipboardData(pObject, 0, &pDataObject); - ok(hr == OLE_E_NOTRUNNING, - "IOleObject_GetClipboardData should have returned OLE_E_NOTRUNNING instead of 0x%08x\n", - hr); - - hr = IOleObject_GetExtent(pObject, DVASPECT_CONTENT, &sizel); - ok(hr == OLE_E_BLANK, "IOleObject_GetExtent should have returned OLE_E_BLANK instead of 0x%08x\n", - hr); - - hr = IOleObject_GetMiscStatus(pObject, DVASPECT_CONTENT, &dwStatus); - ok(hr == REGDB_E_CLASSNOTREG, "IOleObject_GetMiscStatus should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr); - - hr = IOleObject_GetUserClassID(pObject, &clsid); - ok_ole_success(hr, "IOleObject_GetUserClassID"); - ok(IsEqualCLSID(&clsid, &CLSID_WineTest), "clsid != CLSID_WineTest\n"); - - hr = IOleObject_GetUserType(pObject, USERCLASSTYPE_FULL, &pszUserType); - todo_wine { - ok_ole_success(hr, "IOleObject_GetUserType"); - ok(!lstrcmpW(pszUserType, wszUnknown), "Retrieved user type was wrong\n"); - } - - hr = IOleObject_InitFromData(pObject, NULL, TRUE, 0); - ok(hr == OLE_E_NOTRUNNING, "IOleObject_InitFromData should have returned OLE_E_NOTRUNNING instead of 0x%08x\n", hr); - - hr = IOleObject_IsUpToDate(pObject); - ok(hr == OLE_E_NOTRUNNING, "IOleObject_IsUpToDate should have returned OLE_E_NOTRUNNING instead of 0x%08x\n", hr); - - palette.palNumEntries = 1; - palette.palVersion = 2; - memset(&palette.palPalEntry[0], 0, sizeof(palette.palPalEntry[0])); - hr = IOleObject_SetColorScheme(pObject, &palette); - ok(hr == OLE_E_NOTRUNNING, "IOleObject_SetColorScheme should have returned OLE_E_NOTRUNNING instead of 0x%08x\n", hr); - - sizel.cx = sizel.cy = 0; - hr = IOleObject_SetExtent(pObject, DVASPECT_CONTENT, &sizel); - - hr = IOleObject_SetHostNames(pObject, wszHostName, NULL); - ok_ole_success(hr, "IOleObject_SetHostNames"); - - hr = CreateItemMoniker(wszDelim, wszHostName, &pMoniker); - ok_ole_success(hr, "CreateItemMoniker"); - hr = IOleObject_SetMoniker(pObject, OLEWHICHMK_CONTAINER, pMoniker); - ok_ole_success(hr, "IOleObject_SetMoniker"); - IMoniker_Release(pMoniker); - - hr = IOleObject_GetMoniker(pObject, OLEGETMONIKER_ONLYIFTHERE, OLEWHICHMK_CONTAINER, &pMoniker); - ok(hr == E_FAIL, "IOleObject_GetMoniker should have returned E_FAIL instead of 0x%08x\n", hr); - - hr = IOleObject_Update(pObject); - todo_wine - ok(hr == REGDB_E_CLASSNOTREG, "IOleObject_Update should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr); - - hr = IOleObject_QueryInterface(pObject, &IID_IDataObject, (void **)&pDataObject); - ok_ole_success(hr, "IOleObject_QueryInterface"); - - fmtetc.cfFormat = CF_TEXT; - fmtetc.ptd = NULL; - fmtetc.dwAspect = DVASPECT_CONTENT; - fmtetc.lindex = -1; - fmtetc.tymed = TYMED_NULL; - hr = IDataObject_DAdvise(pDataObject, &fmtetc, 0, &AdviseSink, &dwAdvConn); - ok_ole_success(hr, "IDataObject_DAdvise"); - - fmtetc.cfFormat = CF_ENHMETAFILE; - fmtetc.ptd = NULL; - fmtetc.dwAspect = DVASPECT_CONTENT; - fmtetc.lindex = -1; - fmtetc.tymed = TYMED_ENHMF; - hr = IDataObject_DAdvise(pDataObject, &fmtetc, 0, &AdviseSink, &dwAdvConn); - ok_ole_success(hr, "IDataObject_DAdvise"); - - fmtetc.cfFormat = CF_ENHMETAFILE; - fmtetc.ptd = NULL; - fmtetc.dwAspect = DVASPECT_CONTENT; - fmtetc.lindex = -1; - fmtetc.tymed = TYMED_ENHMF; - hr = IDataObject_QueryGetData(pDataObject, &fmtetc); - todo_wine - ok(hr == OLE_E_NOTRUNNING, "IDataObject_QueryGetData should have returned OLE_E_NOTRUNNING instead of 0x%08x\n", hr); - - fmtetc.cfFormat = CF_TEXT; - fmtetc.ptd = NULL; - fmtetc.dwAspect = DVASPECT_CONTENT; - fmtetc.lindex = -1; - fmtetc.tymed = TYMED_NULL; - hr = IDataObject_QueryGetData(pDataObject, &fmtetc); - todo_wine - ok(hr == OLE_E_NOTRUNNING, "IDataObject_QueryGetData should have returned OLE_E_NOTRUNNING instead of 0x%08x\n", hr); - - hr = IOleObject_QueryInterface(pObject, &IID_IRunnableObject, (void **)&pRunnableObject); - ok_ole_success(hr, "IOleObject_QueryInterface"); - - hr = IRunnableObject_SetContainedObject(pRunnableObject, TRUE); - ok_ole_success(hr, "IRunnableObject_SetContainedObject"); - - hr = IRunnableObject_Run(pRunnableObject, NULL); - ok(hr == REGDB_E_CLASSNOTREG, "IOleObject_Run should have returned REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr); - - hr = IOleObject_Close(pObject, OLECLOSE_NOSAVE); - ok_ole_success(hr, "IOleObject_Close"); - - IRunnableObject_Release(pRunnableObject); - IOleObject_Release(pObject); -} - -static void test_runnable(void) -{ - static const struct expected_method methods_query_runnable[] = - { - { "OleObject_QueryInterface", 0 }, - { "OleObjectRunnable_AddRef", 0 }, - { "OleObjectRunnable_IsRunning", 0 }, - { "OleObjectRunnable_Release", 0 }, - { NULL, 0 } - }; - - static const struct expected_method methods_no_runnable[] = - { - { "OleObject_QueryInterface", 0 }, - { NULL, 0 } - }; - - IOleObject *object = &OleObject; - - expected_method_list = methods_query_runnable; - ok(OleIsRunning(object), "Object should be running\n"); - CHECK_NO_EXTRA_METHODS(); - - g_isRunning = FALSE; - expected_method_list = methods_query_runnable; - ok(OleIsRunning(object) == FALSE, "Object should not be running\n"); - CHECK_NO_EXTRA_METHODS(); - - g_showRunnable = FALSE; /* QueryInterface(IID_IRunnableObject, ...) will fail */ - expected_method_list = methods_no_runnable; - ok(OleIsRunning(object), "Object without IRunnableObject should be running\n"); - CHECK_NO_EXTRA_METHODS(); - - g_isRunning = TRUE; - g_showRunnable = TRUE; -} - -static HRESULT WINAPI Unknown_QueryInterface(IUnknown *iface, REFIID riid, void **ppv) -{ - *ppv = NULL; - if (IsEqualIID(riid, &IID_IUnknown)) *ppv = iface; - if (*ppv) - { - IUnknown_AddRef((IUnknown *)*ppv); - return S_OK; - } - return E_NOINTERFACE; -} - -static ULONG WINAPI Unknown_AddRef(IUnknown *iface) -{ - return 2; -} - -static ULONG WINAPI Unknown_Release(IUnknown *iface) -{ - return 1; -} - -static const IUnknownVtbl UnknownVtbl = -{ - Unknown_QueryInterface, - Unknown_AddRef, - Unknown_Release -}; - -static IUnknown Unknown = { &UnknownVtbl }; - -static void test_OleLockRunning(void) -{ - HRESULT hr; - - hr = OleLockRunning((LPUNKNOWN)&Unknown, TRUE, FALSE); - ok(hr == S_OK, "OleLockRunning failed 0x%08x\n", hr); -} - -START_TEST(ole2) -{ - DWORD dwRegister; - IStorage *pStorage; - STATSTG statstg; - HRESULT hr; - - CoInitialize(NULL); - - hr = CoRegisterClassObject(&CLSID_Equation3, (IUnknown *)&OleObjectCF, CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &dwRegister); - ok_ole_success(hr, "CoRegisterClassObject"); - - hr = StgCreateDocfile(NULL, STGM_READWRITE | STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_DELETEONRELEASE, 0, &pStorage); - ok_ole_success(hr, "StgCreateDocfile"); - - test_OleCreate(pStorage); - - hr = IStorage_Stat(pStorage, &statstg, STATFLAG_NONAME); - ok_ole_success(hr, "IStorage_Stat"); - ok(IsEqualCLSID(&CLSID_Equation3, &statstg.clsid), "Wrong CLSID in storage\n"); - - test_OleLoad(pStorage); - - IStorage_Release(pStorage); - - hr = CoRevokeClassObject(dwRegister); - ok_ole_success(hr, "CoRevokeClassObject"); - - test_data_cache(); - test_default_handler(); - test_runnable(); - test_OleLockRunning(); - - CoUninitialize(); -} diff --git a/rostests/winetests/ole32/ole32.rbuild b/rostests/winetests/ole32/ole32.rbuild deleted file mode 100644 index 828e63d45eb..00000000000 --- a/rostests/winetests/ole32/ole32.rbuild +++ /dev/null @@ -1,30 +0,0 @@ - - - - - . - - clipboard.c - compobj.c - defaulthandler.c - dragdrop.c - errorinfo.c - hglobalstream.c - marshal.c - moniker.c - ole2.c - propvariant.c - stg_prop.c - storage32.c - usrmarshal.c - testlist.c - wine - oleaut32 - ole32 - user32 - gdi32 - advapi32 - uuid - ntdll - - diff --git a/rostests/winetests/ole32/propvariant.c b/rostests/winetests/ole32/propvariant.c deleted file mode 100644 index 380dc141652..00000000000 --- a/rostests/winetests/ole32/propvariant.c +++ /dev/null @@ -1,252 +0,0 @@ -/* - * PropVariant Tests - * - * 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 "windows.h" - -#include "wine/test.h" - -/* invalid in all versions */ -#define PROP_INV 0x7f -/* valid in v0 and above (NT4+) */ -#define PROP_V0 0 -/* valid in v1 and above (Win2k+) */ -#define PROP_V1 1 -/* valid in v1a and above (WinXP+) */ -#define PROP_V1A 2 -#define PROP_TODO 0x80 - -struct valid_mapping -{ - BYTE simple; - BYTE with_array; - BYTE with_vector; - BYTE byref; -} valid_types[] = -{ - { PROP_V0 , PROP_INV, PROP_INV, PROP_INV }, /* VT_EMPTY */ - { PROP_V0 , PROP_INV, PROP_INV, PROP_INV }, /* VT_NULL */ - { PROP_V0 , PROP_V1 | PROP_TODO , PROP_V0 , PROP_V1 | PROP_TODO }, /* VT_I2 */ - { PROP_V0 , PROP_V1 | PROP_TODO , PROP_V0 , PROP_V1 | PROP_TODO }, /* VT_I4 */ - { PROP_V0 , PROP_V1 | PROP_TODO , PROP_V0 , PROP_V1 | PROP_TODO }, /* VT_R4 */ - { PROP_V0 , PROP_V1 | PROP_TODO , PROP_V0 , PROP_V1 | PROP_TODO }, /* VT_R8 */ - { PROP_V0 , PROP_V1 | PROP_TODO , PROP_V0 , PROP_V1 | PROP_TODO }, /* VT_CY */ - { PROP_V0 , PROP_V1 | PROP_TODO , PROP_V0 , PROP_V1 | PROP_TODO }, /* VT_DATE */ - { PROP_V0 , PROP_V1 | PROP_TODO , PROP_V0 , PROP_V1 | PROP_TODO }, /* VT_BSTR */ - { PROP_V1 | PROP_TODO , PROP_V1 | PROP_TODO , PROP_INV, PROP_V1 | PROP_TODO }, /* VT_DISPATCH */ - { PROP_V0 , PROP_V1 | PROP_TODO , PROP_V0 , PROP_V1 | PROP_TODO }, /* VT_ERROR */ - { PROP_V0 , PROP_V1 | PROP_TODO , PROP_V0 , PROP_V1 | PROP_TODO }, /* VT_BOOL */ - { PROP_V1 | PROP_TODO , PROP_V1 | PROP_TODO , PROP_V0 , PROP_V1 | PROP_TODO }, /* VT_VARIANT */ - { PROP_V1 | PROP_TODO , PROP_V1 | PROP_TODO , PROP_INV, PROP_V1 | PROP_TODO }, /* VT_UNKNOWN */ - { PROP_V1 , PROP_V1 | PROP_TODO , PROP_INV, PROP_V1 | PROP_TODO }, /* VT_DECIMAL */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 15 */ - { PROP_V1 | PROP_TODO , PROP_V1 | PROP_TODO , PROP_V1 | PROP_TODO , PROP_V1 | PROP_TODO }, /* VT_I1 */ - { PROP_V0 , PROP_V1 | PROP_TODO , PROP_V0 , PROP_V1 | PROP_TODO }, /* VT_UI1 */ - { PROP_V0 , PROP_V1 | PROP_TODO , PROP_V0 , PROP_V1 | PROP_TODO }, /* VT_UI2 */ - { PROP_V0 , PROP_V1 | PROP_TODO , PROP_V0 , PROP_V1 | PROP_TODO }, /* VT_UI4 */ - { PROP_V0 , PROP_V1A | PROP_TODO, PROP_V0 , PROP_V1A | PROP_TODO }, /* VT_I8 */ - { PROP_V0 , PROP_V1A | PROP_TODO, PROP_V0 , PROP_V1A | PROP_TODO }, /* VT_UI8 */ - { PROP_V1 | PROP_TODO , PROP_V1 | PROP_TODO , PROP_INV, PROP_V1 | PROP_TODO }, /* VT_INT */ - { PROP_V1 | PROP_TODO , PROP_V1 | PROP_TODO , PROP_INV, PROP_V1 | PROP_TODO }, /* VT_UINT */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* VT_VOID */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* VT_HRESULT */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* VT_PTR */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* VT_SAFEARRAY */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* VT_CARRAY */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* VT_USERDEFINED */ - { PROP_V0 , PROP_INV, PROP_V0 , PROP_INV }, /* VT_LPSTR */ - { PROP_V0 , PROP_INV, PROP_V0 , PROP_INV }, /* VT_LPWSTR */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 32 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 33 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 34 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 35 */ - { PROP_V1 | PROP_TODO , PROP_V1 | PROP_TODO , PROP_INV, PROP_V1 | PROP_TODO }, /* VT_RECORD */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* VT_INT_PTR */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* VT_UINT_PTR */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 39 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 40 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 41 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 42 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 43 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 44 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 45 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 46 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 47 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 48 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 49 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 50 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 51 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 52 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 53 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 54 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 55 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 56 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 57 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 58 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 59 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 60 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 61 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 62 */ - { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 63 */ - { PROP_V0 , PROP_INV, PROP_V0 , PROP_INV }, /* VT_FILETIME */ - { PROP_V0 , PROP_INV, PROP_INV, PROP_INV }, /* VT_BLOB */ - { PROP_V0 , PROP_INV, PROP_INV, PROP_INV }, /* VT_STREAM */ - { PROP_V0 , PROP_INV, PROP_INV, PROP_INV }, /* VT_STORAGE */ - { PROP_V0 , PROP_INV, PROP_INV, PROP_INV }, /* VT_STREAMED_OBJECT */ - { PROP_V0 , PROP_INV, PROP_INV, PROP_INV }, /* VT_STORED_OBJECT */ - { PROP_V0 , PROP_INV, PROP_INV, PROP_INV }, /* VT_BLOB_OBJECT */ - { PROP_V0 , PROP_INV, PROP_V0 , PROP_INV } /* VT_CF */ -}; - -static const char* wine_vtypes[VT_CLSID+1] = -{ - "VT_EMPTY","VT_NULL","VT_I2","VT_I4","VT_R4","VT_R8","VT_CY","VT_DATE", - "VT_BSTR","VT_DISPATCH","VT_ERROR","VT_BOOL","VT_VARIANT","VT_UNKNOWN", - "VT_DECIMAL","15","VT_I1","VT_UI1","VT_UI2","VT_UI4","VT_I8","VT_UI8", - "VT_INT","VT_UINT","VT_VOID","VT_HRESULT","VT_PTR","VT_SAFEARRAY", - "VT_CARRAY","VT_USERDEFINED","VT_LPSTR","VT_LPWSTR","32","33","34","35", - "VT_RECORD","VT_INT_PTR","VT_UINT_PTR","39","40","41","42","43","44","45", - "46","47","48","49","50","51","52","53","54","55","56","57","58","59","60", - "61","62","63","VT_FILETIME","VT_BLOB","VT_STREAM","VT_STORAGE", - "VT_STREAMED_OBJECT","VT_STORED_OBJECT","VT_BLOB_OBJECT","VT_CF","VT_CLSID" -}; - - -static void expect(HRESULT hr, VARTYPE vt) -{ - int idx = vt & VT_TYPEMASK; - BYTE flags; - const char *modifier; - - if(vt & VT_BYREF) - { - flags = valid_types[idx].byref; - modifier = "byref"; - } - else if(vt & VT_ARRAY) - { - flags = valid_types[idx].with_array; - modifier = "array"; - } - else if(vt & VT_VECTOR) - { - flags = valid_types[idx].with_vector; - modifier = "vector"; - } - else - { - flags = valid_types[idx].simple; - modifier = "simple"; - } - - if(flags == PROP_INV) - ok(hr == STG_E_INVALIDPARAMETER, "%s (%s): got %08x\n", wine_vtypes[idx], modifier, hr); - else if(flags == PROP_V0) - ok(hr == S_OK, "%s (%s): got %08x\n", wine_vtypes[idx], modifier, hr); - else if(flags & PROP_TODO) - { - todo_wine - { - if(hr != S_OK) - win_skip("%s (%s): unsupported\n", wine_vtypes[idx], modifier); - else ok(hr == S_OK, "%s (%s): got %08x\n", wine_vtypes[idx], modifier, hr); - } - } - else - { - if(hr != S_OK) - win_skip("%s (%s): unsupported\n", wine_vtypes[idx], modifier); - else ok(hr == S_OK, "%s (%s): got %08x\n", wine_vtypes[idx], modifier, hr); - } -} - -static void test_validtypes(void) -{ - PROPVARIANT propvar; - HRESULT hr; - unsigned int i; - - memset(&propvar, 0, sizeof(propvar)); - - for (i = 0; i < sizeof(valid_types)/sizeof(valid_types[0]); i++) - { - VARTYPE vt; - - vt = propvar.vt = i; - hr = PropVariantClear(&propvar); - expect(hr, vt); - - vt = propvar.vt = i | VT_ARRAY; - hr = PropVariantClear(&propvar); - expect(hr, vt); - - vt = propvar.vt = i | VT_VECTOR; - hr = PropVariantClear(&propvar); - expect(hr, vt); - - vt = propvar.vt = i | VT_BYREF; - hr = PropVariantClear(&propvar); - expect(hr, vt); - - } -} - -static void test_copy(void) -{ - static char szTestString[] = "Test String"; - static WCHAR wszTestString[] = {'T','e','s','t',' ','S','t','r','i','n','g',0}; - PROPVARIANT propvarSrc; - PROPVARIANT propvarDst; - HRESULT hr; - - propvarSrc.vt = VT_BSTR; - U(propvarSrc).bstrVal = SysAllocString(wszTestString); - - hr = PropVariantCopy(&propvarDst, &propvarSrc); - ok(hr == S_OK, "PropVariantCopy(...VT_BSTR...) failed\n"); - ok(!lstrcmpW(U(propvarSrc).bstrVal, U(propvarDst).bstrVal), "BSTR not copied properly\n"); - hr = PropVariantClear(&propvarSrc); - ok(hr == S_OK, "PropVariantClear(...VT_BSTR...) failed\n"); - hr = PropVariantClear(&propvarDst); - ok(hr == S_OK, "PropVariantClear(...VT_BSTR...) failed\n"); - - propvarSrc.vt = VT_LPWSTR; - U(propvarSrc).pwszVal = wszTestString; - hr = PropVariantCopy(&propvarDst, &propvarSrc); - ok(hr == S_OK, "PropVariantCopy(...VT_LPWSTR...) failed\n"); - ok(!lstrcmpW(U(propvarSrc).pwszVal, U(propvarDst).pwszVal), "Wide string not copied properly\n"); - hr = PropVariantClear(&propvarDst); - ok(hr == S_OK, "PropVariantClear(...VT_LPWSTR...) failed\n"); - memset(&propvarSrc, 0, sizeof(propvarSrc)); - - propvarSrc.vt = VT_LPSTR; - U(propvarSrc).pszVal = szTestString; - hr = PropVariantCopy(&propvarDst, &propvarSrc); - ok(hr == S_OK, "PropVariantCopy(...VT_LPSTR...) failed\n"); - ok(!strcmp(U(propvarSrc).pszVal, U(propvarDst).pszVal), "String not copied properly\n"); - hr = PropVariantClear(&propvarDst); - ok(hr == S_OK, "PropVariantClear(...VT_LPSTR...) failed\n"); - memset(&propvarSrc, 0, sizeof(propvarSrc)); -} - -START_TEST(propvariant) -{ - test_validtypes(); - test_copy(); -} diff --git a/rostests/winetests/ole32/stg_prop.c b/rostests/winetests/ole32/stg_prop.c deleted file mode 100644 index dff3361bdc6..00000000000 --- a/rostests/winetests/ole32/stg_prop.c +++ /dev/null @@ -1,595 +0,0 @@ -/* IPropertyStorage unit tests - * Copyright 2005 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 - */ -#include -#define COBJMACROS -#include "objbase.h" -#include "wine/test.h" -#include "initguid.h" - -DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); -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); - -#ifndef PID_BEHAVIOR -#define PID_BEHAVIOR 0x80000003 -#endif - -static HRESULT (WINAPI *pFmtIdToPropStgName)(const FMTID *, LPOLESTR); -static HRESULT (WINAPI *pPropStgNameToFmtId)(const LPOLESTR, FMTID *); -static HRESULT (WINAPI *pStgCreatePropSetStg)(IStorage *, DWORD, IPropertySetStorage **); - -static void init_function_pointers(void) -{ - HMODULE hmod = GetModuleHandleA("ole32.dll"); - pFmtIdToPropStgName = (void*)GetProcAddress(hmod, "FmtIdToPropStgName"); - pPropStgNameToFmtId = (void*)GetProcAddress(hmod, "PropStgNameToFmtId"); - pStgCreatePropSetStg = (void*)GetProcAddress(hmod, "StgCreatePropSetStg"); -} -/* FIXME: this creates an ANSI storage, try to find conditions under which - * Unicode translation fails - */ -static void testProps(void) -{ - static const WCHAR szDot[] = { '.',0 }; - static const WCHAR szPrefix[] = { 's','t','g',0 }; - static WCHAR propName[] = { 'p','r','o','p',0 }; - static char val[] = "l33t auth0r"; - WCHAR filename[MAX_PATH]; - HRESULT hr; - IStorage *storage = NULL; - IPropertySetStorage *propSetStorage = NULL; - IPropertyStorage *propertyStorage = NULL; - PROPSPEC spec; - PROPVARIANT var; - CLIPDATA clipdata; - unsigned char clipcontent[] = "foobar"; - GUID anyOldGuid = { 0x12345678,0xdead,0xbeef, { - 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07 } }; - - if(!GetTempFileNameW(szDot, szPrefix, 0, filename)) - return; - - DeleteFileW(filename); - - hr = StgCreateDocfile(filename, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0, &storage); - ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr); - - if(!pStgCreatePropSetStg) - { - IStorage_Release(storage); - DeleteFileW(filename); - return; - } - hr = pStgCreatePropSetStg(storage, 0, &propSetStorage); - ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08x\n", hr); - - hr = IPropertySetStorage_Create(propSetStorage, - &FMTID_SummaryInformation, NULL, PROPSETFLAG_ANSI, - STGM_READWRITE | STGM_CREATE | STGM_SHARE_EXCLUSIVE, - &propertyStorage); - ok(hr == S_OK, "IPropertySetStorage_Create failed: 0x%08x\n", hr); - - hr = IPropertyStorage_WriteMultiple(propertyStorage, 0, NULL, NULL, 0); - ok(hr == S_OK, "WriteMultiple with 0 args failed: 0x%08x\n", hr); - hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, NULL, NULL, 0); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08x\n", hr); - - /* test setting one that I can't set */ - spec.ulKind = PRSPEC_PROPID; - U(spec).propid = PID_DICTIONARY; - var.vt = VT_I4; - U(var).lVal = 1; - hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == STG_E_INVALIDPARAMETER, - "Expected STG_E_INVALIDPARAMETER, got 0x%08x\n", hr); - - /* test setting one by name with an invalid propidNameFirst */ - spec.ulKind = PRSPEC_LPWSTR; - U(spec).lpwstr = propName; - hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, - PID_DICTIONARY); - ok(hr == STG_E_INVALIDPARAMETER, - "Expected STG_E_INVALIDPARAMETER, got 0x%08x\n", hr); - - /* test setting behavior (case-sensitive) */ - spec.ulKind = PRSPEC_PROPID; - U(spec).propid = PID_BEHAVIOR; - U(var).lVal = 1; - hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == STG_E_INVALIDPARAMETER, - "Expected STG_E_INVALIDPARAMETER, got 0x%08x\n", hr); - - /* set one by value.. */ - spec.ulKind = PRSPEC_PROPID; - U(spec).propid = PID_FIRST_USABLE; - U(var).lVal = 1; - hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); - - /* set one by name */ - spec.ulKind = PRSPEC_LPWSTR; - U(spec).lpwstr = propName; - U(var).lVal = 2; - hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, - PID_FIRST_USABLE); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); - - /* set a string value */ - spec.ulKind = PRSPEC_PROPID; - U(spec).propid = PIDSI_AUTHOR; - var.vt = VT_LPSTR; - U(var).pszVal = val; - hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); - - /* set a clipboard value */ - spec.ulKind = PRSPEC_PROPID; - U(spec).propid = PIDSI_THUMBNAIL; - var.vt = VT_CF; - clipdata.cbSize = sizeof clipcontent + sizeof (ULONG); - clipdata.ulClipFmt = CF_ENHMETAFILE; - clipdata.pClipData = clipcontent; - U(var).pclipdata = &clipdata; - hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); - - - /* check reading */ - hr = IPropertyStorage_ReadMultiple(propertyStorage, 0, NULL, NULL); - ok(hr == S_FALSE, "ReadMultiple with 0 args failed: 0x%08x\n", hr); - hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, NULL, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08x\n", hr); - /* read by propid */ - spec.ulKind = PRSPEC_PROPID; - U(spec).propid = PID_FIRST_USABLE; - hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); - ok(var.vt == VT_I4 && U(var).lVal == 1, - "Didn't get expected type or value for property (got type %d, value %d)\n", - var.vt, U(var).lVal); - /* read by name */ - spec.ulKind = PRSPEC_LPWSTR; - U(spec).lpwstr = propName; - hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); - ok(var.vt == VT_I4 && U(var).lVal == 2, - "Didn't get expected type or value for property (got type %d, value %d)\n", - var.vt, U(var).lVal); - /* read string value */ - spec.ulKind = PRSPEC_PROPID; - U(spec).propid = PIDSI_AUTHOR; - hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); - ok(var.vt == VT_LPSTR && !lstrcmpA(U(var).pszVal, val), - "Didn't get expected type or value for property (got type %d, value %s)\n", - var.vt, U(var).pszVal); - PropVariantClear(&var); - - /* read clipboard format */ - spec.ulKind = PRSPEC_PROPID; - U(spec).propid = PIDSI_THUMBNAIL; - hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(SUCCEEDED(hr), "ReadMultiple failed: 0x%08x\n", hr); - ok(var.vt == VT_CF, "variant type wrong\n"); - ok(U(var).pclipdata->ulClipFmt == CF_ENHMETAFILE, - "clipboard type wrong\n"); - ok(U(var).pclipdata->cbSize == sizeof clipcontent + sizeof (ULONG), - "clipboard size wrong\n"); - ok(!memcmp(U(var).pclipdata->pClipData, clipcontent, sizeof clipcontent), - "clipboard contents wrong\n"); - ok(S_OK == PropVariantClear(&var), "failed to clear variant\n"); - - /* check deleting */ - hr = IPropertyStorage_DeleteMultiple(propertyStorage, 0, NULL); - ok(hr == S_OK, "DeleteMultiple with 0 args failed: 0x%08x\n", hr); - hr = IPropertyStorage_DeleteMultiple(propertyStorage, 1, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08x\n", hr); - /* contrary to what the docs say, you can't delete the dictionary */ - spec.ulKind = PRSPEC_PROPID; - U(spec).propid = PID_DICTIONARY; - hr = IPropertyStorage_DeleteMultiple(propertyStorage, 1, &spec); - ok(hr == STG_E_INVALIDPARAMETER, - "Expected STG_E_INVALIDPARAMETER, got 0x%08x\n", hr); - /* now delete the first value.. */ - U(spec).propid = PID_FIRST_USABLE; - hr = IPropertyStorage_DeleteMultiple(propertyStorage, 1, &spec); - ok(hr == S_OK, "DeleteMultiple failed: 0x%08x\n", hr); - /* and check that it's no longer readable */ - hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_FALSE, "Expected S_FALSE, got 0x%08x\n", hr); - - hr = IPropertyStorage_Commit(propertyStorage, STGC_DEFAULT); - ok(hr == S_OK, "Commit failed: 0x%08x\n", hr); - - /* check reverting */ - spec.ulKind = PRSPEC_PROPID; - U(spec).propid = PID_FIRST_USABLE; - hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); - hr = IPropertyStorage_Revert(propertyStorage); - ok(hr == S_OK, "Revert failed: 0x%08x\n", hr); - /* now check that it's still not there */ - hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_FALSE, "Expected S_FALSE, got 0x%08x\n", hr); - /* set an integer value again */ - spec.ulKind = PRSPEC_PROPID; - U(spec).propid = PID_FIRST_USABLE; - var.vt = VT_I4; - U(var).lVal = 1; - hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); - /* commit it */ - hr = IPropertyStorage_Commit(propertyStorage, STGC_DEFAULT); - ok(hr == S_OK, "Commit failed: 0x%08x\n", hr); - /* set it to a string value */ - var.vt = VT_LPSTR; - U(var).pszVal = val; - hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); - /* revert it */ - hr = IPropertyStorage_Revert(propertyStorage); - ok(hr == S_OK, "Revert failed: 0x%08x\n", hr); - /* Oddly enough, there's no guarantee that a successful revert actually - * implies the value wasn't saved. Maybe transactional mode needs to be - * used for that? - */ - - IPropertyStorage_Release(propertyStorage); - propertyStorage = NULL; - IPropertySetStorage_Release(propSetStorage); - propSetStorage = NULL; - IStorage_Release(storage); - storage = NULL; - - /* now open it again */ - hr = StgOpenStorage(filename, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, - NULL, 0, &storage); - ok(hr == S_OK, "StgOpenStorage failed: 0x%08x\n", hr); - - hr = pStgCreatePropSetStg(storage, 0, &propSetStorage); - ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08x\n", hr); - - hr = IPropertySetStorage_Open(propSetStorage, &FMTID_SummaryInformation, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE, &propertyStorage); - ok(hr == S_OK, "IPropertySetStorage_Open failed: 0x%08x\n", hr); - - /* check properties again */ - spec.ulKind = PRSPEC_LPWSTR; - U(spec).lpwstr = propName; - hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); - ok(var.vt == VT_I4 && U(var).lVal == 2, - "Didn't get expected type or value for property (got type %d, value %d)\n", - var.vt, U(var).lVal); - spec.ulKind = PRSPEC_PROPID; - U(spec).propid = PIDSI_AUTHOR; - hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); - ok(var.vt == VT_LPSTR && !lstrcmpA(U(var).pszVal, val), - "Didn't get expected type or value for property (got type %d, value %s)\n", - var.vt, U(var).pszVal); - PropVariantClear(&var); - - IPropertyStorage_Release(propertyStorage); - IPropertySetStorage_Release(propSetStorage); - IStorage_Release(storage); - - DeleteFileW(filename); - - /* Test creating a property set storage with a random GUID */ - hr = StgCreateDocfile(filename, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0, &storage); - ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr); - - if(!pStgCreatePropSetStg) - { - IStorage_Release(storage); - DeleteFileW(filename); - return; - } - hr = pStgCreatePropSetStg(storage, 0, &propSetStorage); - ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08x\n", hr); - - hr = IPropertySetStorage_Create(propSetStorage, - &anyOldGuid, NULL, PROPSETFLAG_ANSI, - STGM_READWRITE | STGM_CREATE | STGM_SHARE_EXCLUSIVE, - &propertyStorage); - ok(hr == S_OK, "IPropertySetStorage_Create failed: 0x%08x\n", hr); - - spec.ulKind = PRSPEC_PROPID; - U(spec).propid = PID_FIRST_USABLE; - U(var).lVal = 1; - hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); - - IPropertyStorage_Release(propertyStorage); - IPropertySetStorage_Release(propSetStorage); - IStorage_Release(storage); - - /* now open it again */ - hr = StgOpenStorage(filename, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, - NULL, 0, &storage); - ok(hr == S_OK, "StgOpenStorage failed: 0x%08x\n", hr); - - hr = pStgCreatePropSetStg(storage, 0, &propSetStorage); - ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08x\n", hr); - - hr = IPropertySetStorage_Open(propSetStorage, &anyOldGuid, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE, &propertyStorage); - ok(hr == S_OK, "IPropertySetStorage_Open failed: 0x%08x\n", hr); - - spec.ulKind = PRSPEC_PROPID; - U(spec).propid = PID_FIRST_USABLE; - hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_FALSE, "ReadMultiple failed: 0x%08x\n", hr); - - IPropertyStorage_Release(propertyStorage); - IPropertySetStorage_Release(propSetStorage); - IStorage_Release(storage); - - DeleteFileW(filename); -} - -static void testCodepage(void) -{ - static const WCHAR szDot[] = { '.',0 }; - static const WCHAR szPrefix[] = { 's','t','g',0 }; - static CHAR aval[] = "hi"; - static WCHAR wval[] = { 'h','i',0 }; - HRESULT hr; - IStorage *storage = NULL; - IPropertySetStorage *propSetStorage = NULL; - IPropertyStorage *propertyStorage = NULL; - PROPSPEC spec; - PROPVARIANT var; - WCHAR fileName[MAX_PATH]; - - if(!GetTempFileNameW(szDot, szPrefix, 0, fileName)) - return; - - hr = StgCreateDocfile(fileName, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0, &storage); - ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr); - - if(!pStgCreatePropSetStg) - { - IStorage_Release(storage); - DeleteFileW(fileName); - return; - } - hr = pStgCreatePropSetStg(storage, 0, &propSetStorage); - ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08x\n", hr); - - hr = IPropertySetStorage_Create(propSetStorage, - &FMTID_SummaryInformation, NULL, PROPSETFLAG_DEFAULT, - STGM_READWRITE | STGM_CREATE | STGM_SHARE_EXCLUSIVE, - &propertyStorage); - ok(hr == S_OK, "IPropertySetStorage_Create failed: 0x%08x\n", hr); - - PropVariantInit(&var); - spec.ulKind = PRSPEC_PROPID; - U(spec).propid = PID_CODEPAGE; - /* check code page before it's been explicitly set */ - hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); - ok(var.vt == VT_I2 && U(var).iVal == 1200, - "Didn't get expected type or value for property\n"); - /* Set the code page to ascii */ - var.vt = VT_I2; - U(var).iVal = 1252; - hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); - /* check code page */ - hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); - ok(var.vt == VT_I2 && U(var).iVal == 1252, - "Didn't get expected type or value for property\n"); - /* Set code page to Unicode */ - U(var).iVal = 1200; - hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); - /* check code page */ - hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); - ok(var.vt == VT_I2 && U(var).iVal == 1200, - "Didn't get expected type or value for property\n"); - /* Set a string value */ - spec.ulKind = PRSPEC_PROPID; - U(spec).propid = PID_FIRST_USABLE; - var.vt = VT_LPSTR; - U(var).pszVal = aval; - hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); - hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); - ok(var.vt == VT_LPSTR && !strcmp(U(var).pszVal, "hi"), - "Didn't get expected type or value for property\n"); - PropVariantClear(&var); - /* This seemingly non-sensical test is to show that the string is indeed - * interpreted according to the current system code page, not according to - * the property set's code page. (If the latter were true, the whole - * string would be maintained. As it is, only the first character is.) - */ - var.vt = VT_LPSTR; - U(var).pszVal = (LPSTR)wval; - hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); - hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); - ok(var.vt == VT_LPSTR && !strcmp(U(var).pszVal, "h"), - "Didn't get expected type or value for property\n"); - PropVariantClear(&var); - - /* now that a property's been set, you can't change the code page */ - spec.ulKind = PRSPEC_PROPID; - U(spec).propid = PID_CODEPAGE; - var.vt = VT_I2; - U(var).iVal = 1200; - hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == STG_E_INVALIDPARAMETER, - "Expected STG_E_INVALIDPARAMETER, got 0x%08x\n", hr); - - IPropertyStorage_Release(propertyStorage); - IPropertySetStorage_Release(propSetStorage); - IStorage_Release(storage); - - DeleteFileW(fileName); - - /* same tests, but with PROPSETFLAG_ANSI */ - hr = StgCreateDocfile(fileName, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0, &storage); - ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr); - - hr = pStgCreatePropSetStg(storage, 0, &propSetStorage); - ok(hr == S_OK, "StgCreatePropSetStg failed: 0x%08x\n", hr); - - hr = IPropertySetStorage_Create(propSetStorage, - &FMTID_SummaryInformation, NULL, PROPSETFLAG_ANSI, - STGM_READWRITE | STGM_CREATE | STGM_SHARE_EXCLUSIVE, - &propertyStorage); - ok(hr == S_OK, "IPropertySetStorage_Create failed: 0x%08x\n", hr); - - /* check code page before it's been explicitly set */ - hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); - ok(var.vt == VT_I2, "Didn't get expected type for property (%u)\n", var.vt); - /* Set code page to Unicode */ - U(var).iVal = 1200; - hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); - /* check code page */ - hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); - ok(var.vt == VT_I2 && U(var).iVal == 1200, - "Didn't get expected type or value for property\n"); - /* This test is commented out for documentation. It fails under Wine, - * and I expect it would under Windows as well, yet it succeeds. There's - * obviously something about string conversion I don't understand. - */ - if(0) { - static unsigned char strVal[] = { 0x81, 0xff, 0x04, 0 }; - /* Set code page to 950 (Traditional Chinese) */ - U(var).iVal = 950; - hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); - /* Try writing an invalid string: lead byte 0x81 is unused in Traditional - * Chinese. - */ - spec.ulKind = PRSPEC_PROPID; - U(spec).propid = PID_FIRST_USABLE; - var.vt = VT_LPSTR; - U(var).pszVal = (LPSTR)strVal; - hr = IPropertyStorage_WriteMultiple(propertyStorage, 1, &spec, &var, 0); - ok(hr == S_OK, "WriteMultiple failed: 0x%08x\n", hr); - /* Check returned string */ - hr = IPropertyStorage_ReadMultiple(propertyStorage, 1, &spec, &var); - ok(hr == S_OK, "ReadMultiple failed: 0x%08x\n", hr); - ok(var.vt == VT_LPSTR && !strcmp(U(var).pszVal, (LPCSTR)strVal), - "Didn't get expected type or value for property\n"); - } - - IPropertyStorage_Release(propertyStorage); - IPropertySetStorage_Release(propSetStorage); - IStorage_Release(storage); - - DeleteFileW(fileName); -} - -static void testFmtId(void) -{ - WCHAR szSummaryInfo[] = { 5,'S','u','m','m','a','r','y', - 'I','n','f','o','r','m','a','t','i','o','n',0 }; - WCHAR szDocSummaryInfo[] = { 5,'D','o','c','u','m','e','n','t', - 'S','u','m','m','a','r','y','I','n','f','o','r','m','a','t','i','o','n', - 0 }; - WCHAR szIID_IPropSetStg[] = { 5,'0','j','a','a','a','a','a', - 'a','A','a','a','a','a','a','d','a','A','a','a','a','a','a','a','a','G', - 'c',0 }; - WCHAR name[32]; - FMTID fmtid; - HRESULT hr; - - if (pFmtIdToPropStgName) { - hr = pFmtIdToPropStgName(NULL, name); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08x\n", hr); - hr = pFmtIdToPropStgName(&FMTID_SummaryInformation, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08x\n", hr); - hr = pFmtIdToPropStgName(&FMTID_SummaryInformation, name); - ok(hr == S_OK, "FmtIdToPropStgName failed: 0x%08x\n", hr); - ok(!memcmp(name, szSummaryInfo, (lstrlenW(szSummaryInfo) + 1) * - sizeof(WCHAR)), "Got wrong name for FMTID_SummaryInformation\n"); - hr = pFmtIdToPropStgName(&FMTID_DocSummaryInformation, name); - ok(hr == S_OK, "FmtIdToPropStgName failed: 0x%08x\n", hr); - ok(!memcmp(name, szDocSummaryInfo, (lstrlenW(szDocSummaryInfo) + 1) * - sizeof(WCHAR)), "Got wrong name for FMTID_DocSummaryInformation\n"); - hr = pFmtIdToPropStgName(&FMTID_UserDefinedProperties, name); - ok(hr == S_OK, "FmtIdToPropStgName failed: 0x%08x\n", hr); - ok(!memcmp(name, szDocSummaryInfo, (lstrlenW(szDocSummaryInfo) + 1) * - sizeof(WCHAR)), "Got wrong name for FMTID_DocSummaryInformation\n"); - hr = pFmtIdToPropStgName(&IID_IPropertySetStorage, name); - ok(hr == S_OK, "FmtIdToPropStgName failed: 0x%08x\n", hr); - ok(!memcmp(name, szIID_IPropSetStg, (lstrlenW(szIID_IPropSetStg) + 1) * - sizeof(WCHAR)), "Got wrong name for IID_IPropertySetStorage\n"); - } - - if(pPropStgNameToFmtId) { - /* test args first */ - hr = pPropStgNameToFmtId(NULL, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08x\n", hr); - hr = pPropStgNameToFmtId(NULL, &fmtid); - ok(hr == STG_E_INVALIDNAME, "Expected STG_E_INVALIDNAME, got 0x%08x\n", - hr); - hr = pPropStgNameToFmtId(szDocSummaryInfo, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08x\n", hr); - /* test the known format IDs */ - hr = pPropStgNameToFmtId(szSummaryInfo, &fmtid); - ok(hr == S_OK, "PropStgNameToFmtId failed: 0x%08x\n", hr); - ok(!memcmp(&fmtid, &FMTID_SummaryInformation, sizeof(fmtid)), - "Got unexpected FMTID, expected FMTID_SummaryInformation\n"); - hr = pPropStgNameToFmtId(szDocSummaryInfo, &fmtid); - ok(hr == S_OK, "PropStgNameToFmtId failed: 0x%08x\n", hr); - ok(!memcmp(&fmtid, &FMTID_DocSummaryInformation, sizeof(fmtid)), - "Got unexpected FMTID, expected FMTID_DocSummaryInformation\n"); - /* test another GUID */ - hr = pPropStgNameToFmtId(szIID_IPropSetStg, &fmtid); - ok(hr == S_OK, "PropStgNameToFmtId failed: 0x%08x\n", hr); - ok(!memcmp(&fmtid, &IID_IPropertySetStorage, sizeof(fmtid)), - "Got unexpected FMTID, expected IID_IPropertySetStorage\n"); - /* now check case matching */ - CharUpperW(szDocSummaryInfo + 1); - hr = pPropStgNameToFmtId(szDocSummaryInfo, &fmtid); - ok(hr == S_OK, "PropStgNameToFmtId failed: 0x%08x\n", hr); - ok(!memcmp(&fmtid, &FMTID_DocSummaryInformation, sizeof(fmtid)), - "Got unexpected FMTID, expected FMTID_DocSummaryInformation\n"); - CharUpperW(szIID_IPropSetStg + 1); - hr = pPropStgNameToFmtId(szIID_IPropSetStg, &fmtid); - ok(hr == S_OK, "PropStgNameToFmtId failed: 0x%08x\n", hr); - ok(!memcmp(&fmtid, &IID_IPropertySetStorage, sizeof(fmtid)), - "Got unexpected FMTID, expected IID_IPropertySetStorage\n"); - } -} - -START_TEST(stg_prop) -{ - init_function_pointers(); - testProps(); - testCodepage(); - testFmtId(); -} diff --git a/rostests/winetests/ole32/storage32.c b/rostests/winetests/ole32/storage32.c deleted file mode 100644 index 9bd8f339844..00000000000 --- a/rostests/winetests/ole32/storage32.c +++ /dev/null @@ -1,2925 +0,0 @@ -/* - * Unit tests for OLE storage - * - * Copyright (c) 2004 Mike McCormack - * - * 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 COBJMACROS - -#include -#include "wine/test.h" - -#include "ole2.h" -#include "objidl.h" -#include "initguid.h" - -DEFINE_GUID( test_stg_cls, 0x88888888, 0x0425, 0x0000, 0,0,0,0,0,0,0,0); - -#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr) - -static CHAR filenameA[MAX_PATH]; -static WCHAR filename[MAX_PATH]; - -static const char file1_nameA[] = {'c','o','p','y','t','e','s','t','A',0}; -static const WCHAR file1_name[] = {'c','o','p','y','t','e','s','t','A',0}; -static const char file2_nameA[] = {'c','o','p','y','t','e','s','t','B',0}; -static const WCHAR file2_name[] = {'c','o','p','y','t','e','s','t','B',0}; -static const WCHAR stgA_name[] = {'S','t','o','r','a','g','e','A',0}; -static const WCHAR stgB_name[] = {'S','t','o','r','a','g','e','B',0}; -static const WCHAR strmA_name[] = {'S','t','r','e','a','m','A',0}; -static const WCHAR strmB_name[] = {'S','t','r','e','a','m','B',0}; -static const WCHAR strmC_name[] = {'S','t','r','e','a','m','C',0}; - -/* Win9x and WinMe don't have lstrcmpW */ -static int strcmp_ww(LPCWSTR strw1, LPCWSTR strw2) -{ - CHAR stra1[512], stra2[512]; - WideCharToMultiByte(CP_ACP, 0, strw1, -1, stra1, sizeof(stra1), NULL, NULL); - WideCharToMultiByte(CP_ACP, 0, strw2, -1, stra2, sizeof(stra2), NULL, NULL); - return lstrcmpA(stra1, stra2); -} - -static void test_hglobal_storage_stat(void) -{ - ILockBytes *ilb = NULL; - IStorage *stg = NULL; - HRESULT r; - STATSTG stat; - DWORD mode, refcount; - - r = CreateILockBytesOnHGlobal( NULL, TRUE, &ilb ); - ok( r == S_OK, "CreateILockBytesOnHGlobal failed\n"); - - mode = STGM_CREATE|STGM_SHARE_EXCLUSIVE|STGM_READWRITE;/*0x1012*/ - r = StgCreateDocfileOnILockBytes( ilb, mode, 0, &stg ); - ok( r == S_OK, "StgCreateDocfileOnILockBytes failed\n"); - - r = WriteClassStg( stg, &test_stg_cls ); - ok( r == S_OK, "WriteClassStg failed\n"); - - memset( &stat, 0, sizeof stat ); - r = IStorage_Stat( stg, &stat, 0 ); - - ok( stat.pwcsName == NULL, "storage name not null\n"); - ok( stat.type == 1, "type is wrong\n"); - ok( stat.grfMode == 0x12, "grf mode is incorrect\n"); - ok( !memcmp(&stat.clsid, &test_stg_cls, sizeof test_stg_cls), "CLSID is wrong\n"); - - refcount = IStorage_Release( stg ); - ok( refcount == 0, "IStorage refcount is wrong\n"); - refcount = ILockBytes_Release( ilb ); - ok( refcount == 0, "ILockBytes refcount is wrong\n"); -} - -static void test_create_storage_modes(void) -{ - IStorage *stg = NULL; - HRESULT r; - - DeleteFileA(filenameA); - - /* test with some invalid parameters */ - r = StgCreateDocfile( NULL, 0, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile succeeded\n"); - r = StgCreateDocfile( filename, 0, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile succeeded\n"); - r = StgCreateDocfile( filename, STGM_CREATE, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile succeeded\n"); - r = StgCreateDocfile( filename, STGM_CREATE | STGM_READWRITE, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile succeeded\n"); - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile succeeded\n"); - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, NULL); - ok(r==STG_E_INVALIDPOINTER, "StgCreateDocfile succeeded\n"); - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 1, &stg); - ok(r==STG_E_INVALIDPARAMETER, "StgCreateDocfile succeeded\n"); - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_DENY_WRITE | STGM_READWRITE, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile succeeded\n"); - r = StgCreateDocfile( filename, STGM_SHARE_EXCLUSIVE | STGM_READ, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile succeeded\n"); - r = StgCreateDocfile( filename, STGM_PRIORITY, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile succeeded\n"); - - /* StgCreateDocfile seems to be very particular about the flags it accepts */ - r = StgCreateDocfile( filename, STGM_SHARE_EXCLUSIVE | STGM_READWRITE |STGM_TRANSACTED | STGM_WRITE, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile succeeded\n"); - r = StgCreateDocfile( filename, STGM_SHARE_EXCLUSIVE | STGM_READWRITE |STGM_TRANSACTED | 8, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile succeeded\n"); - r = StgCreateDocfile( filename, STGM_SHARE_EXCLUSIVE | STGM_READWRITE |STGM_TRANSACTED | 0x80, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile succeeded\n"); - r = StgCreateDocfile( filename, STGM_SHARE_EXCLUSIVE | STGM_READWRITE |STGM_TRANSACTED | 0x800, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile succeeded\n"); - r = StgCreateDocfile( filename, STGM_SHARE_EXCLUSIVE | STGM_READWRITE |STGM_TRANSACTED | 0x8000, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile succeeded\n"); - r = StgCreateDocfile( filename, STGM_SHARE_EXCLUSIVE | STGM_READWRITE |STGM_TRANSACTED | 0x80000, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile succeeded\n"); - r = StgCreateDocfile( filename, STGM_SHARE_EXCLUSIVE | STGM_READWRITE |STGM_TRANSACTED | 0x800000, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile succeeded\n"); - ok(stg == NULL, "stg was set\n"); - - /* check what happens if the file already exists (which is how it's meant to be used) */ - r = StgCreateDocfile( filename, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &stg); - ok(r==S_OK, "StgCreateDocfile failed\n"); - r = IStorage_Release(stg); - ok(r == 0, "storage not released\n"); - r = StgCreateDocfile( filename, STGM_SHARE_EXCLUSIVE | STGM_READWRITE |STGM_TRANSACTED, 0, &stg); - ok(r==STG_E_FILEALREADYEXISTS, "StgCreateDocfile wrong error\n"); /* FAILIFTHERE is default */ - r = StgCreateDocfile( filename, STGM_READ, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile succeeded\n"); /* need at least readmode and sharemode */ - r = StgCreateDocfile( filename, STGM_SHARE_EXCLUSIVE, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile succeeded\n"); - r = StgCreateDocfile( filename, STGM_SHARE_DENY_WRITE, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile succeeded\n"); - r = StgCreateDocfile( filename, STGM_SHARE_DENY_NONE, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile failed\n"); - r = StgCreateDocfile( filename, STGM_SHARE_DENY_NONE | STGM_TRANSACTED, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile failed\n"); - r = StgCreateDocfile( filename, STGM_SHARE_DENY_NONE | STGM_READWRITE, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile failed\n"); - r = StgCreateDocfile( filename, STGM_SHARE_DENY_NONE | STGM_WRITE, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile failed\n"); - r = StgCreateDocfile( filename, STGM_SHARE_DENY_WRITE | STGM_WRITE, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile failed\n"); - r = StgCreateDocfile( filename, STGM_SHARE_DENY_WRITE | STGM_READ, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile wrong error\n"); - r = StgCreateDocfile( filename, STGM_TRANSACTED | STGM_SHARE_DENY_WRITE | STGM_READ, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile wrong error\n"); - ok(DeleteFileA(filenameA), "failed to delete file\n"); - - r = StgCreateDocfile( filename, STGM_SHARE_EXCLUSIVE | STGM_READWRITE |STGM_TRANSACTED, 0, &stg); - ok(r==S_OK, "StgCreateDocfile failed\n"); - r = IStorage_Release(stg); - ok(r == 0, "storage not released\n"); - r = StgCreateDocfile( filename, STGM_SHARE_EXCLUSIVE | STGM_READWRITE |STGM_TRANSACTED |STGM_FAILIFTHERE, 0, &stg); - ok(r==STG_E_FILEALREADYEXISTS, "StgCreateDocfile wrong error\n"); - r = StgCreateDocfile( filename, STGM_SHARE_EXCLUSIVE | STGM_WRITE, 0, &stg); - ok(r==STG_E_FILEALREADYEXISTS, "StgCreateDocfile wrong error\n"); - - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_DENY_WRITE | STGM_READWRITE, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgCreateDocfile succeeded\n"); - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE |STGM_TRANSACTED, 0, &stg); - ok(r==S_OK, "StgCreateDocfile failed\n"); - r = IStorage_Release(stg); - ok(r == 0, "storage not released\n"); - ok(DeleteFileA(filenameA), "failed to delete file\n"); - - r = StgCreateDocfile( filename, STGM_CREATE | STGM_READWRITE |STGM_TRANSACTED, 0, &stg); - ok(r==S_OK, "StgCreateDocfile failed\n"); - r = IStorage_Release(stg); - ok(r == 0, "storage not released\n"); - ok(DeleteFileA(filenameA), "failed to delete file\n"); - - /* test the way excel uses StgCreateDocFile */ - r = StgCreateDocfile( filename, STGM_TRANSACTED|STGM_CREATE|STGM_SHARE_DENY_WRITE|STGM_READWRITE, 0, &stg); - ok(r==S_OK, "StgCreateDocfile the excel way failed\n"); - if(r == S_OK) - { - r = IStorage_Release(stg); - ok(r == 0, "storage not released\n"); - ok(DeleteFileA(filenameA), "failed to delete file\n"); - } - - /* and the way windows media uses it ... */ - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_DENY_NONE | STGM_READWRITE | STGM_TRANSACTED, 0, &stg); - ok(r==S_OK, "StgCreateDocfile the windows media way failed\n"); - if (r == S_OK) - { - r = IStorage_Release(stg); - ok(r == 0, "storage not released\n"); - ok(DeleteFileA(filenameA), "failed to delete file\n"); - } - - /* looks like we need STGM_TRANSACTED or STGM_CREATE */ - r = StgCreateDocfile( filename, STGM_TRANSACTED|STGM_SHARE_DENY_WRITE|STGM_READWRITE, 0, &stg); - ok(r==S_OK, "StgCreateDocfile the excel way failed\n"); - if(r == S_OK) - { - r = IStorage_Release(stg); - ok(r == 0, "storage not released\n"); - ok(DeleteFileA(filenameA), "failed to delete file\n"); - } - - r = StgCreateDocfile( filename, STGM_TRANSACTED|STGM_CREATE|STGM_SHARE_DENY_WRITE|STGM_WRITE, 0, &stg); - ok(r==S_OK, "StgCreateDocfile the excel way failed\n"); - if(r == S_OK) - { - r = IStorage_Release(stg); - ok(r == 0, "storage not released\n"); - ok(DeleteFileA(filenameA), "failed to delete file\n"); - } - - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &stg); - ok(r==S_OK, "StgCreateDocfile the powerpoint way failed\n"); - if(r == S_OK) - { - r = IStorage_Release(stg); - ok(r == 0, "storage not released\n"); - ok(DeleteFileA(filenameA), "failed to delete file\n"); - } - - /* test the way msi uses StgCreateDocfile */ - r = StgCreateDocfile( filename, STGM_DIRECT | STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &stg); - ok(r==S_OK, "StgCreateDocFile failed\n"); - r = IStorage_Release(stg); - ok(r == 0, "storage not released\n"); - ok(DeleteFileA(filenameA), "failed to delete file\n"); -} - -static void test_storage_stream(void) -{ - static const WCHAR stmname[] = { 'C','O','N','T','E','N','T','S',0 }; - static const WCHAR longname[] = { - 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a', - 'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a',0 - }; - IStorage *stg = NULL; - HRESULT r; - IStream *stm = NULL; - IStream *stm2 = NULL; - ULONG count = 0; - LARGE_INTEGER pos; - ULARGE_INTEGER p; - unsigned char buffer[0x100]; - - DeleteFileA(filenameA); - - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE |STGM_TRANSACTED, 0, &stg); - ok(r==S_OK, "StgCreateDocfile failed\n"); - - /* try create some invalid streams */ - r = IStorage_CreateStream(stg, stmname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 1, 0, &stm ); - ok(r==STG_E_INVALIDPARAMETER, "IStorage->CreateStream wrong error\n"); - r = IStorage_CreateStream(stg, stmname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 1, &stm ); - ok(r==STG_E_INVALIDPARAMETER, "IStorage->CreateStream wrong error\n"); - r = IStorage_CreateStream(stg, stmname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, NULL ); - ok(r==STG_E_INVALIDPOINTER, "IStorage->CreateStream wrong error\n"); - r = IStorage_CreateStream(stg, NULL, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm ); - ok(r==STG_E_INVALIDNAME, "IStorage->CreateStream wrong error\n"); - r = IStorage_CreateStream(stg, longname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm ); - ok(r==STG_E_INVALIDNAME || broken(r==S_OK) /* nt4 */, - "IStorage->CreateStream wrong error, got %d GetLastError()=%d\n", r, GetLastError()); - r = IStorage_CreateStream(stg, stmname, STGM_READWRITE, 0, 0, &stm ); - ok(r==STG_E_INVALIDFLAG, "IStorage->CreateStream wrong error\n"); - r = IStorage_CreateStream(stg, stmname, STGM_READ, 0, 0, &stm ); - ok(r==STG_E_INVALIDFLAG, "IStorage->CreateStream wrong error\n"); - r = IStorage_CreateStream(stg, stmname, STGM_WRITE, 0, 0, &stm ); - ok(r==STG_E_INVALIDFLAG, "IStorage->CreateStream wrong error\n"); - r = IStorage_CreateStream(stg, stmname, STGM_SHARE_DENY_NONE | STGM_READWRITE, 0, 0, &stm ); - ok(r==STG_E_INVALIDFLAG, "IStorage->CreateStream wrong error\n"); - r = IStorage_CreateStream(stg, stmname, STGM_SHARE_DENY_NONE | STGM_READ, 0, 0, &stm ); - ok(r==STG_E_INVALIDFLAG, "IStorage->CreateStream wrong error\n"); - - /* now really create a stream and delete it */ - r = IStorage_CreateStream(stg, stmname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm ); - ok(r==S_OK, "IStorage->CreateStream failed\n"); - r = IStream_Release(stm); - ok(r == 0, "wrong ref count\n"); - r = IStorage_CreateStream(stg, stmname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm ); - ok(r==STG_E_FILEALREADYEXISTS, "IStorage->CreateStream failed\n"); - r = IStorage_DestroyElement(stg,stmname); - ok(r==S_OK, "IStorage->DestroyElement failed\n"); - - /* create a stream and write to it */ - r = IStorage_CreateStream(stg, stmname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm ); - ok(r==S_OK, "IStorage->CreateStream failed\n"); - - r = IStream_Clone(stm, &stm2); - ok(r==S_OK, "failed to clone stream\n"); - - r = IStream_Write(stm, NULL, 0, NULL ); - ok(r==STG_E_INVALIDPOINTER, "IStream->Write wrong error\n"); - r = IStream_Write(stm, "Hello\n", 0, NULL ); - ok(r==S_OK, "failed to write stream\n"); - r = IStream_Write(stm, "Hello\n", 0, &count ); - ok(r==S_OK, "failed to write stream\n"); - r = IStream_Write(stm, "Hello\n", 6, &count ); - ok(r==S_OK, "failed to write stream\n"); - r = IStream_Commit(stm, STGC_DEFAULT ); - ok(r==S_OK, "failed to commit stream\n"); - r = IStream_Commit(stm, STGC_DEFAULT ); - ok(r==S_OK, "failed to commit stream\n"); - - /* Read past the end of the stream. */ - pos.QuadPart = 3; - r = IStream_Seek(stm, pos, STREAM_SEEK_SET, &p ); - ok(r==S_OK, "failed to seek stream\n"); - ok(p.QuadPart == 3, "at wrong place\n"); - r = IStream_Read(stm, buffer, sizeof buffer, &count ); - ok(r==S_OK, "failed to read\n"); - ok(count == 3, "read bytes past end of stream\n"); - pos.QuadPart = 10; - r = IStream_Seek(stm, pos, STREAM_SEEK_SET, &p ); - ok(r==S_OK, "failed to seek stream\n"); - ok(p.QuadPart == 10, "at wrong place\n"); - r = IStream_Read(stm, buffer, sizeof buffer, &count ); - ok(r==S_OK, "failed to read\n"); - ok(count == 0, "read bytes past end of stream\n"); - pos.QuadPart = 10000; - r = IStream_Seek(stm, pos, STREAM_SEEK_SET, &p ); - ok(r==S_OK, "failed to seek stream\n"); - ok(p.QuadPart == 10000, "at wrong place\n"); - r = IStream_Read(stm, buffer, sizeof buffer, &count ); - ok(r==S_OK, "failed to read\n"); - ok(count == 0, "read bytes past end of stream\n"); - - /* Convert to a big block stream, and read past the end. */ - p.QuadPart = 5000; - r = IStream_SetSize(stm,p); - ok(r==S_OK, "failed to set pos\n"); - pos.QuadPart = 4997; - r = IStream_Seek(stm, pos, STREAM_SEEK_SET, &p ); - ok(r==S_OK, "failed to seek stream\n"); - ok(p.QuadPart == 4997, "at wrong place\n"); - r = IStream_Read(stm, buffer, sizeof buffer, &count ); - ok(r==S_OK, "failed to read\n"); - ok(count == 3, "read bytes past end of stream\n"); - pos.QuadPart = 5001; - r = IStream_Seek(stm, pos, STREAM_SEEK_SET, &p ); - ok(r==S_OK, "failed to seek stream\n"); - ok(p.QuadPart == 5001, "at wrong place\n"); - r = IStream_Read(stm, buffer, sizeof buffer, &count ); - ok(r==S_OK, "failed to read\n"); - ok(count == 0, "read bytes past end of stream\n"); - pos.QuadPart = 10000; - r = IStream_Seek(stm, pos, STREAM_SEEK_SET, &p ); - ok(r==S_OK, "failed to seek stream\n"); - ok(p.QuadPart == 10000, "at wrong place\n"); - r = IStream_Read(stm, buffer, sizeof buffer, &count ); - ok(r==S_OK, "failed to read\n"); - ok(count == 0, "read bytes past end of stream\n"); - - /* seek round a bit, reset the stream size */ - pos.QuadPart = 0; - r = IStream_Seek(stm, pos, 3, &p ); - ok(r==STG_E_INVALIDFUNCTION, "IStream->Seek returned wrong error\n"); - r = IStream_Seek(stm, pos, STREAM_SEEK_SET, NULL); - ok(r==S_OK, "failed to seek stream\n"); - r = IStream_Seek(stm, pos, STREAM_SEEK_SET, &p ); - ok(r==S_OK, "failed to seek stream\n"); - r = IStream_SetSize(stm,p); - ok(r==S_OK, "failed to set pos\n"); - pos.QuadPart = 10; - r = IStream_Seek(stm, pos, STREAM_SEEK_SET, &p ); - ok(r==S_OK, "failed to seek stream\n"); - ok(p.QuadPart == 10, "at wrong place\n"); - r = IStream_Read(stm, buffer, sizeof buffer, &count ); - ok(r==S_OK, "failed to set pos\n"); - ok(count == 0, "read bytes from empty stream\n"); - pos.QuadPart = 10000; - r = IStream_Seek(stm, pos, STREAM_SEEK_SET, &p ); - ok(r==S_OK, "failed to seek stream\n"); - ok(p.QuadPart == 10000, "at wrong place\n"); - r = IStream_Read(stm, buffer, sizeof buffer, &count ); - ok(r==S_OK, "failed to set pos\n"); - ok(count == 0, "read bytes from empty stream\n"); - pos.QuadPart = 0; - r = IStream_Seek(stm, pos, STREAM_SEEK_END, &p ); - ok(r==S_OK, "failed to seek stream\n"); - ok(p.QuadPart == 0, "at wrong place\n"); - r = IStream_Read(stm, buffer, sizeof buffer, &count ); - ok(r==S_OK, "failed to set pos\n"); - ok(count == 0, "read bytes from empty stream\n"); - - /* wrap up */ - r = IStream_Release(stm2); - ok(r == 0, "wrong ref count\n"); - - /* create a stream and write to it */ - r = IStorage_CreateStream(stg, stmname, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm2 ); - ok(r==S_OK, "IStorage->CreateStream failed\n"); - - r = IStream_Seek(stm, pos, STREAM_SEEK_SET, &p); - ok(r==STG_E_REVERTED, "overwritten stream should return STG_E_REVERTED instead of 0x%08x\n", r); - - r = IStream_Release(stm2); - ok(r == 0, "wrong ref count\n"); - r = IStream_Release(stm); - ok(r == 0, "wrong ref count\n"); - - r = IStorage_Release(stg); - ok(r == 0, "wrong ref count\n"); - - /* try create some invalid streams */ - stg = NULL; - stm = NULL; - r = StgOpenStorage(filename, NULL, STGM_READ | STGM_SHARE_DENY_WRITE, NULL, 0, &stg); - ok(r == S_OK, "should succeed\n"); - if (stg) - { - r = IStorage_OpenStream(stg, stmname, NULL, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &stm); - ok(r == STG_E_INVALIDFLAG, "IStorage->OpenStream should return STG_E_INVALIDFLAG instead of 0x%08x\n", r); - IStorage_Release(stg); - } - - r = DeleteFileA(filenameA); - ok(r, "file should exist\n"); -} - -static BOOL touch_file(LPCSTR filename) -{ - HANDLE file; - - file = CreateFileA(filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - if (file==INVALID_HANDLE_VALUE) - return FALSE; - CloseHandle(file); - return TRUE; -} - -static BOOL is_zero_length(LPCSTR filename) -{ - HANDLE file; - DWORD len; - - file = CreateFileA(filename, GENERIC_READ, 0, NULL, - OPEN_EXISTING, 0, NULL); - if (file==INVALID_HANDLE_VALUE) - return FALSE; - len = GetFileSize(file, NULL); - CloseHandle(file); - return len == 0; -} - -static BOOL is_existing_file(LPCSTR filename) -{ - HANDLE file; - - file = CreateFileA(filename, GENERIC_READ, 0, NULL, - OPEN_EXISTING, 0, NULL); - if (file==INVALID_HANDLE_VALUE) - return FALSE; - CloseHandle(file); - return TRUE; -} - -static void test_open_storage(void) -{ - static const WCHAR szNonExist[] = { 'n','o','n','e','x','i','s','t',0 }; - IStorage *stg = NULL, *stg2 = NULL; - HRESULT r; - DWORD stgm; - - /* try opening a zero length file - it should stay zero length */ - DeleteFileA(filenameA); - touch_file(filenameA); - stgm = STGM_NOSCRATCH | STGM_TRANSACTED | STGM_SHARE_DENY_WRITE | STGM_READWRITE; - r = StgOpenStorage( filename, NULL, stgm, NULL, 0, &stg); - ok(r==STG_E_FILEALREADYEXISTS, "StgOpenStorage didn't fail\n"); - - stgm = STGM_SHARE_EXCLUSIVE | STGM_READWRITE; - r = StgOpenStorage( filename, NULL, stgm, NULL, 0, &stg); - ok(r==STG_E_FILEALREADYEXISTS, "StgOpenStorage didn't fail\n"); - ok(is_zero_length(filenameA), "file length changed\n"); - - DeleteFileA(filenameA); - - /* try opening a nonexistent file - it should not create it */ - stgm = STGM_DIRECT | STGM_SHARE_EXCLUSIVE | STGM_READWRITE; - r = StgOpenStorage( filename, NULL, stgm, NULL, 0, &stg); - ok(r!=S_OK, "StgOpenStorage failed: 0x%08x\n", r); - if (r==S_OK) IStorage_Release(stg); - ok(!is_existing_file(filenameA), "StgOpenStorage should not create a file\n"); - DeleteFileA(filenameA); - - /* create the file */ - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE |STGM_TRANSACTED, 0, &stg); - ok(r==S_OK, "StgCreateDocfile failed\n"); - IStorage_Release(stg); - - r = StgOpenStorage( filename, NULL, 0, NULL, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgOpenStorage wrong error\n"); - r = StgOpenStorage( NULL, NULL, STGM_SHARE_EXCLUSIVE, NULL, 0, &stg); - ok(r==STG_E_INVALIDNAME, "StgOpenStorage wrong error\n"); - r = StgOpenStorage( filename, NULL, STGM_SHARE_EXCLUSIVE | STGM_READ, NULL, 0, NULL); - ok(r==STG_E_INVALIDPOINTER, "StgOpenStorage wrong error\n"); - r = StgOpenStorage( filename, NULL, STGM_SHARE_EXCLUSIVE | STGM_READ, NULL, 1, &stg); - ok(r==STG_E_INVALIDPARAMETER, "StgOpenStorage wrong error\n"); - r = StgOpenStorage( szNonExist, NULL, STGM_SHARE_EXCLUSIVE | STGM_READ, NULL, 0, &stg); - ok(r==STG_E_FILENOTFOUND, "StgOpenStorage failed\n"); - r = StgOpenStorage( filename, NULL, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READ, NULL, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgOpenStorage failed\n"); - r = StgOpenStorage( filename, NULL, STGM_SHARE_DENY_NONE | STGM_READ, NULL, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgOpenStorage failed\n"); - r = StgOpenStorage( filename, NULL, STGM_SHARE_DENY_READ | STGM_READ, NULL, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgOpenStorage failed\n"); - r = StgOpenStorage( filename, NULL, STGM_SHARE_DENY_WRITE | STGM_READWRITE, NULL, 0, &stg); - ok(r==STG_E_INVALIDFLAG, "StgOpenStorage failed\n"); - - /* open it for real */ - r = StgOpenStorage( filename, NULL, STGM_SHARE_DENY_NONE | STGM_READ | STGM_TRANSACTED, NULL, 0, &stg); /* XLViewer 97/2000 */ - ok(r==S_OK, "StgOpenStorage failed\n"); - if(stg) - { - r = IStorage_Release(stg); - ok(r == 0, "wrong ref count\n"); - } - - r = StgOpenStorage( filename, NULL, STGM_SHARE_DENY_WRITE | STGM_READ, NULL, 0, &stg); - ok(r==S_OK, "StgOpenStorage failed\n"); - if(stg) - { - r = IStorage_Release(stg); - ok(r == 0, "wrong ref count\n"); - } - - /* test the way word opens its custom dictionary */ - r = StgOpenStorage( filename, NULL, STGM_NOSCRATCH | STGM_TRANSACTED | - STGM_SHARE_DENY_WRITE | STGM_READWRITE, NULL, 0, &stg); - ok(r==S_OK, "StgOpenStorage failed\n"); - if(stg) - { - r = IStorage_Release(stg); - ok(r == 0, "wrong ref count\n"); - } - - r = StgOpenStorage( filename, NULL, STGM_SHARE_EXCLUSIVE | STGM_READ, NULL, 0, &stg); - ok(r==S_OK, "StgOpenStorage failed\n"); - r = StgOpenStorage( filename, NULL, STGM_SHARE_EXCLUSIVE | STGM_READ, NULL, 0, &stg2); - ok(r==STG_E_SHAREVIOLATION, "StgOpenStorage failed\n"); - if(stg) - { - r = IStorage_Release(stg); - ok(r == 0, "wrong ref count\n"); - } - - /* now try write to a storage file we opened read-only */ - r = StgOpenStorage( filename, NULL, STGM_SHARE_EXCLUSIVE | STGM_READ, NULL, 0, &stg); - ok(r==S_OK, "StgOpenStorage failed\n"); - if(stg) - { - static const WCHAR stmname[] = { 'w','i','n','e','t','e','s','t',0}; - IStream *stm = NULL; - IStorage *stg2 = NULL; - - r = IStorage_CreateStream( stg, stmname, STGM_WRITE | STGM_SHARE_EXCLUSIVE, - 0, 0, &stm ); - ok(r == STG_E_ACCESSDENIED, "CreateStream should fail\n"); - r = IStorage_CreateStorage( stg, stmname, STGM_WRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg2); - ok(r == STG_E_ACCESSDENIED, "CreateStream should fail\n"); - - r = IStorage_Release(stg); - ok(r == 0, "wrong ref count\n"); - } - - /* open like visio 2003 */ - stg = NULL; - r = StgOpenStorage( filename, NULL, STGM_PRIORITY | STGM_SHARE_DENY_NONE, NULL, 0, &stg); - ok(r == S_OK, "should succeed\n"); - if (stg) - IStorage_Release(stg); - - /* test other sharing modes with STGM_PRIORITY */ - stg = NULL; - r = StgOpenStorage( filename, NULL, STGM_PRIORITY | STGM_SHARE_EXCLUSIVE, NULL, 0, &stg); - ok(r == S_OK, "should succeed\n"); - if (stg) - IStorage_Release(stg); - - stg = NULL; - r = StgOpenStorage( filename, NULL, STGM_PRIORITY | STGM_SHARE_DENY_WRITE, NULL, 0, &stg); - ok(r == S_OK, "should succeed\n"); - if (stg) - IStorage_Release(stg); - - stg = NULL; - r = StgOpenStorage( filename, NULL, STGM_PRIORITY | STGM_SHARE_DENY_READ, NULL, 0, &stg); - ok(r == S_OK, "should succeed\n"); - if (stg) - IStorage_Release(stg); - - /* open like Project 2003 */ - stg = NULL; - r = StgOpenStorage( filename, NULL, STGM_PRIORITY, NULL, 0, &stg); - ok(r == S_OK, "should succeed\n"); - r = StgOpenStorage( filename, NULL, STGM_PRIORITY, NULL, 0, &stg2); - ok(r == S_OK, "should succeed\n"); - if (stg2) - IStorage_Release(stg2); - if (stg) - IStorage_Release(stg); - - stg = NULL; - r = StgOpenStorage( filename, NULL, STGM_PRIORITY | STGM_READWRITE, NULL, 0, &stg); - ok(r == STG_E_INVALIDFLAG, "should fail\n"); - - r = StgOpenStorage( filename, NULL, STGM_TRANSACTED | STGM_PRIORITY, NULL, 0, &stg); - ok(r == STG_E_INVALIDFLAG, "should fail\n"); - - r = StgOpenStorage( filename, NULL, STGM_SIMPLE | STGM_PRIORITY, NULL, 0, &stg); - ok(r == STG_E_INVALIDFLAG, "should fail\n"); - - r = StgOpenStorage( filename, NULL, STGM_DELETEONRELEASE | STGM_PRIORITY, NULL, 0, &stg); - ok(r == STG_E_INVALIDFUNCTION, "should fail\n"); - - r = StgOpenStorage( filename, NULL, STGM_NOSCRATCH | STGM_PRIORITY, NULL, 0, &stg); - ok(r == STG_E_INVALIDFLAG, "should fail\n"); - - r = StgOpenStorage( filename, NULL, STGM_NOSNAPSHOT | STGM_PRIORITY, NULL, 0, &stg); - ok(r == STG_E_INVALIDFLAG, "should fail\n"); - - r = DeleteFileA(filenameA); - ok(r, "file didn't exist\n"); -} - -static void test_storage_suminfo(void) -{ - IStorage *stg = NULL; - IPropertySetStorage *propset = NULL; - IPropertyStorage *ps = NULL; - HRESULT r; - - DeleteFileA(filenameA); - - /* create the file */ - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | - STGM_READWRITE |STGM_TRANSACTED, 0, &stg); - ok(r==S_OK, "StgCreateDocfile failed\n"); - - r = IStorage_QueryInterface( stg, &IID_IPropertySetStorage, (LPVOID) &propset ); - ok(r == S_OK, "query interface failed\n"); - - /* delete it */ - r = IPropertySetStorage_Delete( propset, &FMTID_SummaryInformation ); - ok(r == STG_E_FILENOTFOUND, "deleted property set storage\n"); - - r = IPropertySetStorage_Open( propset, &FMTID_SummaryInformation, - STGM_READ | STGM_SHARE_EXCLUSIVE, &ps ); - ok(r == STG_E_FILENOTFOUND, "opened property set storage\n"); - - r = IPropertySetStorage_Create( propset, &FMTID_SummaryInformation, NULL, 0, - STGM_READ | STGM_SHARE_EXCLUSIVE, &ps ); - ok(r == STG_E_INVALIDFLAG, "created property set storage\n"); - - r = IPropertySetStorage_Create( propset, &FMTID_SummaryInformation, NULL, 0, - STGM_READ, &ps ); - ok(r == STG_E_INVALIDFLAG, "created property set storage\n"); - - r = IPropertySetStorage_Create( propset, &FMTID_SummaryInformation, NULL, 0, 0, &ps ); - ok(r == STG_E_INVALIDFLAG, "created property set storage\n"); - - r = IPropertySetStorage_Create( propset, &FMTID_SummaryInformation, NULL, 0, - STGM_WRITE|STGM_SHARE_EXCLUSIVE, &ps ); - ok(r == STG_E_INVALIDFLAG, "created property set storage\n"); - - r = IPropertySetStorage_Create( propset, &FMTID_SummaryInformation, NULL, 0, - STGM_CREATE|STGM_WRITE|STGM_SHARE_EXCLUSIVE, &ps ); - ok(r == STG_E_INVALIDFLAG, "created property set storage\n"); - - /* now try really creating a property set */ - r = IPropertySetStorage_Create( propset, &FMTID_SummaryInformation, NULL, 0, - STGM_CREATE|STGM_READWRITE|STGM_SHARE_EXCLUSIVE, &ps ); - ok(r == S_OK, "failed to create property set storage\n"); - - if( ps ) - IPropertyStorage_Release(ps); - - /* now try creating the same thing again */ - r = IPropertySetStorage_Create( propset, &FMTID_SummaryInformation, NULL, 0, - STGM_CREATE|STGM_READWRITE|STGM_SHARE_EXCLUSIVE, &ps ); - ok(r == S_OK, "failed to create property set storage\n"); - if( ps ) - IPropertyStorage_Release(ps); - - /* should be able to open it */ - r = IPropertySetStorage_Open( propset, &FMTID_SummaryInformation, - STGM_READWRITE|STGM_SHARE_EXCLUSIVE, &ps); - ok(r == S_OK, "open failed\n"); - if(r == S_OK) - IPropertyStorage_Release(ps); - - /* delete it */ - r = IPropertySetStorage_Delete( propset, &FMTID_SummaryInformation ); - ok(r == S_OK, "failed to delete property set storage\n"); - - /* try opening with an invalid FMTID */ - r = IPropertySetStorage_Open( propset, NULL, - STGM_READWRITE|STGM_SHARE_EXCLUSIVE, &ps); - ok(r == E_INVALIDARG, "open succeeded\n"); - if(r == S_OK) - IPropertyStorage_Release(ps); - - /* try a bad guid */ - r = IPropertySetStorage_Open( propset, &IID_IStorage, - STGM_READWRITE|STGM_SHARE_EXCLUSIVE, &ps); - ok(r == STG_E_FILENOTFOUND, "open succeeded\n"); - if(r == S_OK) - IPropertyStorage_Release(ps); - - - /* try some invalid flags */ - r = IPropertySetStorage_Open( propset, &FMTID_SummaryInformation, - STGM_CREATE | STGM_READWRITE|STGM_SHARE_EXCLUSIVE, &ps); - ok(r == STG_E_INVALIDFLAG, "open succeeded\n"); - if(r == S_OK) - IPropertyStorage_Release(ps); - - /* after deleting it, it should be gone */ - r = IPropertySetStorage_Open( propset, &FMTID_SummaryInformation, - STGM_READWRITE|STGM_SHARE_EXCLUSIVE, &ps); - ok(r == STG_E_FILENOTFOUND, "open failed\n"); - if(r == S_OK) - IPropertyStorage_Release(ps); - - r = IPropertySetStorage_Release( propset ); - ok(r == 1, "ref count wrong\n"); - - r = IStorage_Release(stg); - ok(r == 0, "ref count wrong\n"); - - DeleteFileA(filenameA); -} - -static void test_storage_refcount(void) -{ - IStorage *stg = NULL; - IStorage *stgprio = NULL; - HRESULT r; - IStream *stm = NULL; - static const WCHAR stmname[] = { 'C','O','N','T','E','N','T','S',0 }; - LARGE_INTEGER pos; - ULARGE_INTEGER upos; - STATSTG stat; - char buffer[10]; - - DeleteFileA(filenameA); - - /* create the file */ - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | - STGM_READWRITE |STGM_TRANSACTED, 0, &stg); - ok(r==S_OK, "StgCreateDocfile failed\n"); - - r = WriteClassStg( stg, &test_stg_cls ); - ok( r == S_OK, "WriteClassStg failed\n"); - - r = IStorage_Commit( stg, STGC_DEFAULT ); - ok( r == S_OK, "IStorage_Commit failed\n"); - - /* now create a stream */ - r = IStorage_CreateStream(stg, stmname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm ); - ok(r==S_OK, "IStorage->CreateStream failed\n"); - - r = IStorage_Release( stg ); - ok (r == 0, "storage not released\n"); - - pos.QuadPart = 0; - r = IStream_Seek( stm, pos, 0, &upos ); - ok (r == STG_E_REVERTED, "seek should fail\n"); - - r = IStream_Stat( stm, &stat, STATFLAG_DEFAULT ); - ok (r == STG_E_REVERTED, "stat should fail\n"); - - r = IStream_Write( stm, "Test string", strlen("Test string"), NULL); - ok (r == STG_E_REVERTED, "IStream_Write should return STG_E_REVERTED instead of 0x%08x\n", r); - - r = IStream_Read( stm, buffer, sizeof(buffer), NULL); - ok (r == STG_E_REVERTED, "IStream_Read should return STG_E_REVERTED instead of 0x%08x\n", r); - - r = IStream_Release(stm); - ok (r == 0, "stream not released\n"); - - /* tests that STGM_PRIORITY doesn't prevent readwrite access from other - * StgOpenStorage calls in transacted mode */ - r = StgOpenStorage( filename, NULL, STGM_PRIORITY, NULL, 0, &stgprio); - ok(r==S_OK, "StgOpenStorage failed with error 0x%08x\n", r); - - todo_wine { - /* non-transacted mode read/write fails */ - r = StgOpenStorage( filename, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg); - ok(r==STG_E_LOCKVIOLATION, "StgOpenStorage should return STG_E_LOCKVIOLATION instead of 0x%08x\n", r); - } - - /* non-transacted mode read-only succeeds */ - r = StgOpenStorage( filename, NULL, STGM_SHARE_DENY_WRITE|STGM_READ, NULL, 0, &stg); - ok(r==S_OK, "StgOpenStorage failed with error 0x%08x\n", r); - IStorage_Release(stg); - - r = StgOpenStorage( filename, NULL, STGM_TRANSACTED|STGM_SHARE_DENY_WRITE|STGM_READWRITE, NULL, 0, &stg); - ok(r==S_OK, "StgOpenStorage failed with error 0x%08x\n", r); - if(stg) - { - static const WCHAR stgname[] = { ' ',' ',' ','2','9',0 }; - static const WCHAR stgname2[] = { 'C','V','_','i','e','w',0 }; - static const WCHAR stmname2[] = { 'V','a','r','2','D','a','t','a',0 }; - IStorage *stg2; - IStorage *stg3; - STATSTG statstg; - - r = IStorage_Stat( stg, &statstg, STATFLAG_NONAME ); - ok(r == S_OK, "Stat should have succeded instead of returning 0x%08x\n", r); - ok(statstg.type == STGTY_STORAGE, "Statstg type should have been STGTY_STORAGE instead of %d\n", statstg.type); - ok(U(statstg.cbSize).LowPart == 0, "Statstg cbSize.LowPart should have been 0 instead of %d\n", U(statstg.cbSize).LowPart); - ok(U(statstg.cbSize).HighPart == 0, "Statstg cbSize.HighPart should have been 0 instead of %d\n", U(statstg.cbSize).HighPart); - ok(statstg.grfMode == (STGM_TRANSACTED|STGM_SHARE_DENY_WRITE|STGM_READWRITE), - "Statstg grfMode should have been 0x10022 instead of 0x%x\n", statstg.grfMode); - ok(statstg.grfLocksSupported == 0, "Statstg grfLocksSupported should have been 0 instead of %d\n", statstg.grfLocksSupported); - ok(IsEqualCLSID(&statstg.clsid, &test_stg_cls), "Statstg clsid is not test_stg_cls\n"); - ok(statstg.grfStateBits == 0, "Statstg grfStateBits should have been 0 instead of %d\n", statstg.grfStateBits); - ok(statstg.reserved == 0, "Statstg reserved should have been 0 instead of %d\n", statstg.reserved); - - r = IStorage_CreateStorage( stg, stgname, STGM_SHARE_EXCLUSIVE, 0, 0, &stg2 ); - ok(r == S_OK, "CreateStorage should have succeeded instead of returning 0x%08x\n", r); - - r = IStorage_Stat( stg2, &statstg, STATFLAG_DEFAULT ); - ok(r == S_OK, "Stat should have succeded instead of returning 0x%08x\n", r); - ok(!memcmp(statstg.pwcsName, stgname, sizeof(stgname)), - "Statstg pwcsName should have been the name the storage was created with\n"); - ok(statstg.type == STGTY_STORAGE, "Statstg type should have been STGTY_STORAGE instead of %d\n", statstg.type); - ok(U(statstg.cbSize).LowPart == 0, "Statstg cbSize.LowPart should have been 0 instead of %d\n", U(statstg.cbSize).LowPart); - ok(U(statstg.cbSize).HighPart == 0, "Statstg cbSize.HighPart should have been 0 instead of %d\n", U(statstg.cbSize).HighPart); - ok(statstg.grfMode == STGM_SHARE_EXCLUSIVE, - "Statstg grfMode should have been STGM_SHARE_EXCLUSIVE instead of 0x%x\n", statstg.grfMode); - ok(statstg.grfLocksSupported == 0, "Statstg grfLocksSupported should have been 0 instead of %d\n", statstg.grfLocksSupported); - ok(IsEqualCLSID(&statstg.clsid, &CLSID_NULL), "Statstg clsid is not CLSID_NULL\n"); - ok(statstg.grfStateBits == 0, "Statstg grfStateBits should have been 0 instead of %d\n", statstg.grfStateBits); - ok(statstg.reserved == 0, "Statstg reserved should have been 0 instead of %d\n", statstg.reserved); - CoTaskMemFree(statstg.pwcsName); - - r = IStorage_CreateStorage( stg2, stgname2, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, 0, &stg3 ); - ok(r == STG_E_ACCESSDENIED, "CreateStorage should have returned STG_E_ACCESSDENIED instead of 0x%08x\n", r); - - r = IStorage_CreateStream( stg2, stmname2, STGM_CREATE|STGM_SHARE_EXCLUSIVE, 0, 0, &stm ); - ok(r == STG_E_ACCESSDENIED, "CreateStream should have returned STG_E_ACCESSDENIED instead of 0x%08x\n", r); - - IStorage_Release(stg2); - - r = IStorage_Release(stg); - ok(r == 0, "wrong ref count\n"); - } - IStorage_Release(stgprio); - - DeleteFileA(filenameA); -} - -static void test_writeclassstg(void) -{ - IStorage *stg = NULL; - HRESULT r; - CLSID temp_cls; - - DeleteFileA(filenameA); - - /* create the file */ - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | - STGM_READWRITE, 0, &stg); - ok(r==S_OK, "StgCreateDocfile failed\n"); - - r = ReadClassStg( NULL, NULL ); - ok(r == E_INVALIDARG, "ReadClassStg should return E_INVALIDARG instead of 0x%08X\n", r); - - r = ReadClassStg( stg, NULL ); - ok(r == E_INVALIDARG, "ReadClassStg should return E_INVALIDARG instead of 0x%08X\n", r); - - temp_cls.Data1 = 0xdeadbeef; - r = ReadClassStg( stg, &temp_cls ); - ok(r == S_OK, "ReadClassStg failed with 0x%08X\n", r); - - ok(IsEqualCLSID(&temp_cls, &CLSID_NULL), "ReadClassStg returned wrong clsid\n"); - - r = WriteClassStg( NULL, NULL ); - ok(r == E_INVALIDARG, "WriteClassStg should return E_INVALIDARG instead of 0x%08X\n", r); - - r = WriteClassStg( stg, NULL ); - ok(r == STG_E_INVALIDPOINTER, "WriteClassStg should return STG_E_INVALIDPOINTER instead of 0x%08X\n", r); - - r = WriteClassStg( stg, &test_stg_cls ); - ok( r == S_OK, "WriteClassStg failed with 0x%08X\n", r); - - r = ReadClassStg( stg, &temp_cls ); - ok( r == S_OK, "ReadClassStg failed with 0x%08X\n", r); - ok(IsEqualCLSID(&temp_cls, &test_stg_cls), "ReadClassStg returned wrong clsid\n"); - - r = IStorage_Release( stg ); - ok (r == 0, "storage not released\n"); - - DeleteFileA(filenameA); -} - -static void test_streamenum(void) -{ - IStorage *stg = NULL; - HRESULT r; - IStream *stm = NULL; - static const WCHAR stmname[] = { 'C','O','N','T','E','N','T','S',0 }; - static const WCHAR stmname2[] = { 'A','B','C','D','E','F','G','H','I',0 }; - static const WCHAR stmname3[] = { 'A','B','C','D','E','F','G','H','I','J',0 }; - STATSTG stat; - IEnumSTATSTG *ee = NULL; - ULONG count; - - DeleteFileA(filenameA); - - /* create the file */ - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | - STGM_READWRITE |STGM_TRANSACTED, 0, &stg); - ok(r==S_OK, "StgCreateDocfile failed\n"); - - r = WriteClassStg( stg, &test_stg_cls ); - ok( r == S_OK, "WriteClassStg failed\n"); - - r = IStorage_Commit( stg, STGC_DEFAULT ); - ok( r == S_OK, "IStorage_Commit failed\n"); - - /* now create a stream */ - r = IStorage_CreateStream(stg, stmname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm ); - ok(r==S_OK, "IStorage->CreateStream failed\n"); - - r = IStream_Release(stm); - - /* first enum ... should be 1 stream */ - r = IStorage_EnumElements(stg, 0, NULL, 0, &ee); - ok(r==S_OK, "IStorage->EnumElements failed\n"); - - count = 0xf00; - r = IEnumSTATSTG_Next(ee, 1, &stat, &count); - ok(r==S_OK, "IEnumSTATSTG->Next failed\n"); - ok(count == 1, "count wrong\n"); - - if (r == S_OK) - CoTaskMemFree(stat.pwcsName); - - r = IEnumSTATSTG_Release(ee); - - /* second enum... destroy the stream before reading */ - r = IStorage_EnumElements(stg, 0, NULL, 0, &ee); - ok(r==S_OK, "IStorage->EnumElements failed\n"); - - r = IStorage_DestroyElement(stg, stmname); - ok(r==S_OK, "IStorage->DestroyElement failed\n"); - - count = 0xf00; - r = IEnumSTATSTG_Next(ee, 1, &stat, &count); - ok(r==S_FALSE, "IEnumSTATSTG->Next failed\n"); - ok(count == 0, "count wrong\n"); - - /* reset and try again */ - r = IEnumSTATSTG_Reset(ee); - ok(r==S_OK, "IEnumSTATSTG->Reset failed\n"); - - count = 0xf00; - r = IEnumSTATSTG_Next(ee, 1, &stat, &count); - ok(r==S_FALSE, "IEnumSTATSTG->Next failed\n"); - ok(count == 0, "count wrong\n"); - - /* add a stream before reading */ - r = IEnumSTATSTG_Reset(ee); - ok(r==S_OK, "IEnumSTATSTG->Reset failed\n"); - - r = IStorage_CreateStream(stg, stmname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm ); - ok(r==S_OK, "IStorage->CreateStream failed\n"); - - r = IStream_Release(stm); - - count = 0xf00; - r = IEnumSTATSTG_Next(ee, 1, &stat, &count); - ok(r==S_OK, "IEnumSTATSTG->Next failed\n"); - ok(count == 1, "count wrong\n"); - - if (r == S_OK) - { - ok(lstrcmpiW(stat.pwcsName, stmname) == 0, "expected CONTENTS, got %s\n", wine_dbgstr_w(stat.pwcsName)); - CoTaskMemFree(stat.pwcsName); - } - - r = IStorage_CreateStream(stg, stmname2, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm ); - ok(r==S_OK, "IStorage->CreateStream failed\n"); - - r = IStream_Release(stm); - - count = 0xf00; - r = IEnumSTATSTG_Next(ee, 1, &stat, &count); - ok(r==S_OK, "IEnumSTATSTG->Next failed\n"); - ok(count == 1, "count wrong\n"); - - if (r == S_OK) - { - ok(lstrcmpiW(stat.pwcsName, stmname2) == 0, "expected ABCDEFGHI, got %s\n", wine_dbgstr_w(stat.pwcsName)); - CoTaskMemFree(stat.pwcsName); - } - - /* delete previous and next stream after reading */ - r = IStorage_CreateStream(stg, stmname3, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm ); - ok(r==S_OK, "IStorage->CreateStream failed\n"); - - r = IStream_Release(stm); - - r = IEnumSTATSTG_Reset(ee); - ok(r==S_OK, "IEnumSTATSTG->Reset failed\n"); - - count = 0xf00; - r = IEnumSTATSTG_Next(ee, 1, &stat, &count); - ok(r==S_OK, "IEnumSTATSTG->Next failed\n"); - ok(count == 1, "count wrong\n"); - - if (r == S_OK) - { - ok(lstrcmpiW(stat.pwcsName, stmname) == 0, "expected CONTENTS, got %s\n", wine_dbgstr_w(stat.pwcsName)); - CoTaskMemFree(stat.pwcsName); - } - - r = IStorage_DestroyElement(stg, stmname); - ok(r==S_OK, "IStorage->DestroyElement failed\n"); - - r = IStorage_DestroyElement(stg, stmname2); - ok(r==S_OK, "IStorage->DestroyElement failed\n"); - - count = 0xf00; - r = IEnumSTATSTG_Next(ee, 1, &stat, &count); - ok(r==S_OK, "IEnumSTATSTG->Next failed\n"); - ok(count == 1, "count wrong\n"); - - if (r == S_OK) - { - ok(lstrcmpiW(stat.pwcsName, stmname3) == 0, "expected ABCDEFGHIJ, got %s\n", wine_dbgstr_w(stat.pwcsName)); - CoTaskMemFree(stat.pwcsName); - } - - r = IStorage_Release( stg ); - todo_wine ok (r == 0, "storage not released\n"); - - /* enumerator is still valid and working after the storage is released */ - r = IEnumSTATSTG_Reset(ee); - ok(r==S_OK, "IEnumSTATSTG->Reset failed\n"); - - count = 0xf00; - r = IEnumSTATSTG_Next(ee, 1, &stat, &count); - ok(r==S_OK, "IEnumSTATSTG->Next failed\n"); - ok(count == 1, "count wrong\n"); - - if (r == S_OK) - { - ok(lstrcmpiW(stat.pwcsName, stmname3) == 0, "expected ABCDEFGHIJ, got %s\n", wine_dbgstr_w(stat.pwcsName)); - CoTaskMemFree(stat.pwcsName); - } - - /* the storage is left open until the enumerator is freed */ - r = StgOpenStorage( filename, NULL, STGM_SHARE_EXCLUSIVE | - STGM_READWRITE |STGM_TRANSACTED, NULL, 0, &stg); - ok(r==STG_E_SHAREVIOLATION || - r==STG_E_LOCKVIOLATION, /* XP-SP2/W2K3-SP1 and below */ - "StgCreateDocfile failed, res=%x\n", r); - - r = IEnumSTATSTG_Release(ee); - ok (r == 0, "enum not released\n"); - - DeleteFileA(filenameA); -} - -static void test_transact(void) -{ - IStorage *stg = NULL, *stg2 = NULL, *stg3 = NULL; - HRESULT r; - IStream *stm = NULL; - static const WCHAR stmname[] = { 'C','O','N','T','E','N','T','S',0 }; - static const WCHAR stmname2[] = { 'F','O','O',0 }; - static const WCHAR stgname[] = { 'P','E','R','M','S','T','G',0 }; - static const WCHAR stgname2[] = { 'T','E','M','P','S','T','G',0 }; - - DeleteFileA(filenameA); - - /* create the file */ - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | - STGM_READWRITE |STGM_TRANSACTED, 0, &stg); - ok(r==S_OK, "StgCreateDocfile failed\n"); - - /* commit a new stream and storage */ - r = IStorage_CreateStream(stg, stmname2, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm ); - ok(r==S_OK, "IStorage->CreateStream failed\n"); - - r = IStream_Write(stm, "this is stream 1\n", 16, NULL); - ok(r==S_OK, "IStream->Write failed\n"); - - IStream_Release(stm); - - r = IStorage_CreateStorage(stg, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg2); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); - - if (r == S_OK) - { - /* Create two substorages but only commit one */ - r = IStorage_CreateStorage(stg2, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg3); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); - - if (r == S_OK) - IStorage_Release(stg3); - - r = IStorage_Commit(stg, 0); - ok(r==S_OK, "IStorage->Commit failed\n"); - - r = IStorage_CreateStorage(stg2, stgname2, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg3); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); - - if (r == S_OK) - IStorage_Release(stg3); - - IStorage_Release(stg2); - } - - /* now create a stream and storage, but don't commit them */ - stm = NULL; - r = IStorage_CreateStream(stg, stmname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm ); - ok(r==S_OK, "IStorage->CreateStream failed\n"); - - r = IStream_Write(stm, "this is stream 2\n", 16, NULL); - ok(r==S_OK, "IStream->Write failed\n"); - - /* IStream::Commit does nothing for OLE storage streams */ - r = IStream_Commit(stm, STGC_ONLYIFCURRENT | STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE); - ok(r==S_OK, "IStream->Commit failed\n"); - - r = IStorage_CreateStorage(stg, stgname2, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg2); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); - - if (r == S_OK) - IStorage_Release(stg2); - - IStream_Release(stm); - - IStorage_Release(stg); - - stm = NULL; - stg = NULL; - r = StgOpenStorage( filename, NULL, STGM_SHARE_DENY_NONE | STGM_READ | STGM_TRANSACTED, NULL, 0, &stg); - ok(r==S_OK, "StgOpenStorage failed\n"); - - if (!stg) - return; - - r = IStorage_OpenStream(stg, stmname, NULL, STGM_SHARE_DENY_NONE|STGM_READ, 0, &stm ); - ok(r==STG_E_INVALIDFLAG, "IStorage->OpenStream failed %08x\n", r); - - r = IStorage_OpenStream(stg, stmname, NULL, STGM_DELETEONRELEASE|STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm ); - ok(r==STG_E_INVALIDFUNCTION, "IStorage->OpenStream failed %08x\n", r); - - r = IStorage_OpenStream(stg, stmname, NULL, STGM_TRANSACTED|STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm ); - ok(r==STG_E_INVALIDFUNCTION, "IStorage->OpenStream failed %08x\n", r); - - r = IStorage_OpenStorage(stg, stmname, NULL, STGM_TRANSACTED|STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg2 ); - ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream failed %08x\n", r); - - r = IStorage_OpenStream(stg, stmname, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm ); - ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream should fail %08x\n", r); - if (r == S_OK) - IStream_Release(stm); - - r = IStorage_OpenStorage(stg, stgname2, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg2 ); - ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStorage should fail %08x\n", r); - if (r == S_OK) - IStorage_Release(stg2); - - r = IStorage_OpenStorage(stg, stmname2, NULL, STGM_TRANSACTED|STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg2 ); - ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream failed %08x\n", r); - - r = IStorage_OpenStream(stg, stmname2, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm ); - ok(r==S_OK, "IStorage->OpenStream should succeed %08x\n", r); - if (r == S_OK) - IStream_Release(stm); - - r = IStorage_OpenStorage(stg, stgname, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg2 ); - ok(r==S_OK, "IStorage->OpenStorage should succeed %08x\n", r); - if (r == S_OK) - { - r = IStorage_OpenStorage(stg2, stgname, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg3 ); - ok(r==S_OK, "IStorage->OpenStorage should succeed %08x\n", r); - if (r == S_OK) - IStorage_Release(stg3); - - r = IStorage_OpenStorage(stg2, stgname2, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg3 ); - ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStorage should fail %08x\n", r); - if (r == S_OK) - IStorage_Release(stg3); - - IStorage_Release(stg2); - } - - IStorage_Release(stg); - - r = DeleteFileA(filenameA); - ok( r == TRUE, "deleted file\n"); -} - -static void test_substorage_share(void) -{ - IStorage *stg, *stg2, *stg3; - IStream *stm, *stm2; - HRESULT r; - static const WCHAR stgname[] = { 'P','E','R','M','S','T','G',0 }; - static const WCHAR stmname[] = { 'C','O','N','T','E','N','T','S',0 }; - static const WCHAR othername[] = { 'N','E','W','N','A','M','E',0 }; - - DeleteFileA(filenameA); - - /* create the file */ - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | - STGM_READWRITE, 0, &stg); - ok(r==S_OK, "StgCreateDocfile failed\n"); - - /* create a read/write storage and try to open it again */ - r = IStorage_CreateStorage(stg, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg2); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); - - if (r == S_OK) - { - r = IStorage_OpenStorage(stg, stgname, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg3); - ok(r==STG_E_ACCESSDENIED, "IStorage->OpenStorage should fail %08x\n", r); - - if (r == S_OK) - IStorage_Release(stg3); - - r = IStorage_OpenStorage(stg, stgname, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, 0, &stg3); - ok(r==STG_E_ACCESSDENIED, "IStorage->OpenStorage should fail %08x\n", r); - - if (r == S_OK) - IStorage_Release(stg3); - - /* cannot rename the storage while it's open */ - r = IStorage_RenameElement(stg, stgname, othername); - ok(r==STG_E_ACCESSDENIED, "IStorage->RenameElement should fail %08x\n", r); - if (SUCCEEDED(r)) IStorage_RenameElement(stg, othername, stgname); - - /* destroying an object while it's open invalidates it */ - r = IStorage_DestroyElement(stg, stgname); - ok(r==S_OK, "IStorage->DestroyElement failed, hr=%08x\n", r); - - r = IStorage_CreateStream(stg2, stmname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm); - ok(r==STG_E_REVERTED, "IStorage->CreateStream failed, hr=%08x\n", r); - - if (r == S_OK) - IStorage_Release(stm); - - IStorage_Release(stg2); - } - - /* create a read/write stream and try to open it again */ - r = IStorage_CreateStream(stg, stmname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm); - ok(r==S_OK, "IStorage->CreateStream failed, hr=%08x\n", r); - - if (r == S_OK) - { - r = IStorage_OpenStream(stg, stmname, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &stm2); - ok(r==STG_E_ACCESSDENIED, "IStorage->OpenStream should fail %08x\n", r); - - if (r == S_OK) - IStorage_Release(stm2); - - r = IStorage_OpenStream(stg, stmname, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stm2); - ok(r==STG_E_ACCESSDENIED, "IStorage->OpenStream should fail %08x\n", r); - - if (r == S_OK) - IStorage_Release(stm2); - - /* cannot rename the stream while it's open */ - r = IStorage_RenameElement(stg, stmname, othername); - ok(r==STG_E_ACCESSDENIED, "IStorage->RenameElement should fail %08x\n", r); - if (SUCCEEDED(r)) IStorage_RenameElement(stg, othername, stmname); - - /* destroying an object while it's open invalidates it */ - r = IStorage_DestroyElement(stg, stmname); - ok(r==S_OK, "IStorage->DestroyElement failed, hr=%08x\n", r); - - r = IStream_Write(stm, "this shouldn't work\n", 20, NULL); - ok(r==STG_E_REVERTED, "IStream_Write should fail %08x\n", r); - - IStorage_Release(stm); - } - - IStorage_Release(stg); - - r = DeleteFileA(filenameA); - ok( r == TRUE, "deleted file\n"); -} - -static void test_revert(void) -{ - IStorage *stg = NULL, *stg2 = NULL, *stg3 = NULL; - HRESULT r; - IStream *stm = NULL, *stm2 = NULL; - static const WCHAR stmname[] = { 'C','O','N','T','E','N','T','S',0 }; - static const WCHAR stmname2[] = { 'F','O','O',0 }; - static const WCHAR stgname[] = { 'P','E','R','M','S','T','G',0 }; - static const WCHAR stgname2[] = { 'T','E','M','P','S','T','G',0 }; - STATSTG statstg; - - DeleteFileA(filenameA); - - /* create the file */ - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | - STGM_READWRITE |STGM_TRANSACTED, 0, &stg); - ok(r==S_OK, "StgCreateDocfile failed\n"); - - /* commit a new stream and storage */ - r = IStorage_CreateStream(stg, stmname2, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm ); - ok(r==S_OK, "IStorage->CreateStream failed\n"); - - r = IStream_Write(stm, "this is stream 1\n", 16, NULL); - ok(r==S_OK, "IStream->Write failed\n"); - - r = IStorage_CreateStorage(stg, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg2); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); - - if (r == S_OK) - { - /* Create two substorages but only commit one */ - r = IStorage_CreateStorage(stg2, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg3); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); - - if (r == S_OK) - IStorage_Release(stg3); - - r = IStorage_Commit(stg, 0); - ok(r==S_OK, "IStorage->Commit failed\n"); - - r = IStorage_CreateStorage(stg2, stgname2, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg3); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); - - if (r == S_OK) - IStorage_Release(stg3); - } - - /* now create a stream and storage, then revert */ - r = IStorage_CreateStream(stg, stmname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm2 ); - ok(r==S_OK, "IStorage->CreateStream failed\n"); - - r = IStream_Write(stm2, "this is stream 2\n", 16, NULL); - ok(r==S_OK, "IStream->Write failed\n"); - - r = IStorage_CreateStorage(stg, stgname2, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg3); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); - - r = IStorage_Revert(stg); - - /* all open objects become invalid */ - r = IStream_Write(stm, "this shouldn't work\n", 20, NULL); - ok(r==STG_E_REVERTED, "IStream_Write should fail %08x\n", r); - - r = IStream_Write(stm2, "this shouldn't work\n", 20, NULL); - ok(r==STG_E_REVERTED, "IStream_Write should fail %08x\n", r); - - r = IStorage_Stat(stg2, &statstg, STATFLAG_NONAME); - ok(r==STG_E_REVERTED, "IStorage_Stat should fail %08x\n", r); - - r = IStorage_Stat(stg3, &statstg, STATFLAG_NONAME); - ok(r==STG_E_REVERTED, "IStorage_Stat should fail %08x\n", r); - - IStream_Release(stm); - IStream_Release(stm2); - IStorage_Release(stg2); - IStorage_Release(stg3); - - r = IStorage_OpenStream(stg, stmname, NULL, STGM_SHARE_DENY_NONE|STGM_READ, 0, &stm ); - ok(r==STG_E_INVALIDFLAG, "IStorage->OpenStream failed %08x\n", r); - - r = IStorage_OpenStream(stg, stmname, NULL, STGM_DELETEONRELEASE|STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm ); - ok(r==STG_E_INVALIDFUNCTION, "IStorage->OpenStream failed %08x\n", r); - - r = IStorage_OpenStream(stg, stmname, NULL, STGM_TRANSACTED|STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm ); - ok(r==STG_E_INVALIDFUNCTION, "IStorage->OpenStream failed %08x\n", r); - - r = IStorage_OpenStorage(stg, stmname, NULL, STGM_TRANSACTED|STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg2 ); - ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream failed %08x\n", r); - - r = IStorage_OpenStream(stg, stmname, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm ); - ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream should fail %08x\n", r); - if (r == S_OK) - IStream_Release(stm); - - r = IStorage_OpenStorage(stg, stgname2, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg2 ); - ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStorage should fail %08x\n", r); - if (r == S_OK) - IStorage_Release(stg2); - - r = IStorage_OpenStorage(stg, stmname2, NULL, STGM_TRANSACTED|STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg2 ); - ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream failed %08x\n", r); - - r = IStorage_OpenStream(stg, stmname2, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm ); - ok(r==S_OK, "IStorage->OpenStream should succeed %08x\n", r); - if (r == S_OK) - IStream_Release(stm); - - r = IStorage_OpenStorage(stg, stgname, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg2 ); - ok(r==S_OK, "IStorage->OpenStorage should succeed %08x\n", r); - if (r == S_OK) - { - r = IStorage_OpenStorage(stg2, stgname, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg3 ); - ok(r==S_OK, "IStorage->OpenStorage should succeed %08x\n", r); - if (r == S_OK) - IStorage_Release(stg3); - - r = IStorage_OpenStorage(stg2, stgname2, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg3 ); - ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStorage should fail %08x\n", r); - if (r == S_OK) - IStorage_Release(stg3); - - IStorage_Release(stg2); - } - - IStorage_Release(stg); - - r = DeleteFileA(filenameA); - ok( r == TRUE, "deleted file\n"); - - /* Revert only invalidates objects in transacted mode */ - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | - STGM_READWRITE, 0, &stg); - ok(r==S_OK, "StgCreateDocfile failed\n"); - - r = IStorage_CreateStream(stg, stmname2, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm ); - ok(r==S_OK, "IStorage->CreateStream failed\n"); - - r = IStorage_Revert(stg); - ok(r==S_OK, "IStorage->Revert failed %08x\n", r); - - r = IStream_Write(stm, "this works\n", 11, NULL); - ok(r==S_OK, "IStream_Write should succeed %08x\n", r); - - IStream_Release(stm); - IStream_Release(stg); - - r = DeleteFileA(filenameA); - ok( r == TRUE, "deleted file\n"); -} - -static void test_parent_free(void) -{ - IStorage *stg = NULL, *stg2 = NULL, *stg3 = NULL; - HRESULT r; - IStream *stm = NULL; - static const WCHAR stmname[] = { 'C','O','N','T','E','N','T','S',0 }; - static const WCHAR stgname[] = { 'P','E','R','M','S','T','G',0 }; - ULONG ref; - STATSTG statstg; - - DeleteFileA(filenameA); - - /* create the file */ - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | - STGM_READWRITE |STGM_TRANSACTED, 0, &stg); - ok(r==S_OK, "StgCreateDocfile failed\n"); - - /* create a new storage */ - r = IStorage_CreateStorage(stg, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg2); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); - - if (r == S_OK) - { - /* now create a stream inside the new storage */ - r = IStorage_CreateStream(stg2, stmname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm ); - ok(r==S_OK, "IStorage->CreateStream failed\n"); - - if (r == S_OK) - { - /* create a storage inside the new storage */ - r = IStorage_CreateStorage(stg2, stgname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stg3 ); - ok(r==S_OK, "IStorage->CreateStorage failed\n"); - } - - /* free the parent */ - ref = IStorage_Release(stg2); - ok(ref == 0, "IStorage still has %u references\n", ref); - - /* child objects are invalid */ - if (r == S_OK) - { - r = IStream_Write(stm, "this should fail\n", 17, NULL); - ok(r==STG_E_REVERTED, "IStream->Write sould fail, hr=%x\n", r); - - IStream_Release(stm); - - r = IStorage_Stat(stg3, &statstg, STATFLAG_NONAME); - ok(r==STG_E_REVERTED, "IStorage_Stat should fail %08x\n", r); - - r = IStorage_SetStateBits(stg3, 1, 1); - ok(r==STG_E_REVERTED, "IStorage_Stat should fail %08x\n", r); - - IStorage_Release(stg3); - } - } - - IStorage_Release(stg); - - r = DeleteFileA(filenameA); - ok( r == TRUE, "deleted file\n"); -} - -static void test_nonroot_transacted(void) -{ - IStorage *stg = NULL, *stg2 = NULL, *stg3 = NULL; - HRESULT r; - IStream *stm = NULL; - static const WCHAR stgname[] = { 'P','E','R','M','S','T','G',0 }; - static const WCHAR stmname[] = { 'C','O','N','T','E','N','T','S',0 }; - static const WCHAR stmname2[] = { 'F','O','O',0 }; - - DeleteFileA(filenameA); - - /* create a transacted file */ - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | - STGM_READWRITE |STGM_TRANSACTED, 0, &stg); - ok(r==S_OK, "StgCreateDocfile failed\n"); - - /* create a transacted substorage */ - r = IStorage_CreateStorage(stg, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_TRANSACTED, 0, 0, &stg2); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); - - if (r == S_OK) - { - /* create and commit stmname */ - r = IStorage_CreateStream(stg2, stmname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm ); - ok(r==S_OK, "IStorage->CreateStream failed\n"); - if (r == S_OK) - IStream_Release(stm); - - IStorage_Commit(stg2, 0); - - /* create and revert stmname2 */ - r = IStorage_CreateStream(stg2, stmname2, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm ); - ok(r==S_OK, "IStorage->CreateStream failed\n"); - if (r == S_OK) - IStream_Release(stm); - - IStorage_Revert(stg2); - - /* check that Commit and Revert really worked */ - r = IStorage_OpenStream(stg2, stmname, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm ); - ok(r==S_OK, "IStorage->OpenStream should succeed %08x\n", r); - if (r == S_OK) - IStream_Release(stm); - - r = IStorage_OpenStream(stg2, stmname2, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm ); - ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream should fail %08x\n", r); - if (r == S_OK) - IStream_Release(stm); - - IStorage_Release(stg2); - } - - /* create a read-only transacted substorage */ - r = IStorage_OpenStorage(stg, stgname, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE | STGM_TRANSACTED, NULL, 0, &stg2); - ok(r==S_OK, "IStorage->OpenStorage failed, hr=%08x\n", r); - - if (r == S_OK) - { - /* The storage can be modified. */ - r = IStorage_CreateStorage(stg2, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg3); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); - if (r == S_OK) - IStream_Release(stg3); - - /* But changes cannot be committed. */ - r = IStorage_Commit(stg2, 0); - ok(r==STG_E_ACCESSDENIED, "IStorage->Commit should fail, hr=%08x\n", r); - - IStorage_Release(stg2); - } - - IStorage_Release(stg); - - /* create a non-transacted file */ - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | - STGM_READWRITE, 0, &stg); - ok(r==S_OK, "StgCreateDocfile failed\n"); - - /* create a transacted substorage */ - r = IStorage_CreateStorage(stg, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_TRANSACTED, 0, 0, &stg2); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); - - if (r == S_OK) - { - /* create and commit stmname */ - r = IStorage_CreateStream(stg2, stmname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm ); - ok(r==S_OK, "IStorage->CreateStream failed\n"); - if (r == S_OK) - IStream_Release(stm); - - IStorage_Commit(stg2, 0); - - /* create and revert stmname2 */ - r = IStorage_CreateStream(stg2, stmname2, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm ); - ok(r==S_OK, "IStorage->CreateStream failed\n"); - if (r == S_OK) - IStream_Release(stm); - - IStorage_Revert(stg2); - - /* check that Commit and Revert really worked */ - r = IStorage_OpenStream(stg2, stmname, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm ); - ok(r==S_OK, "IStorage->OpenStream should succeed %08x\n", r); - if (r == S_OK) - IStream_Release(stm); - - r = IStorage_OpenStream(stg2, stmname2, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &stm ); - ok(r==STG_E_FILENOTFOUND, "IStorage->OpenStream should fail %08x\n", r); - if (r == S_OK) - IStream_Release(stm); - - IStorage_Release(stg2); - } - - IStream_Release(stg); - - r = DeleteFileA(filenameA); - ok( r == TRUE, "deleted file\n"); -} - -static void test_ReadClassStm(void) -{ - CLSID clsid; - HRESULT hr; - IStream *pStream; - static const LARGE_INTEGER llZero; - - hr = ReadClassStm(NULL, &clsid); - ok(hr == E_INVALIDARG, "ReadClassStm should have returned E_INVALIDARG instead of 0x%08x\n", hr); - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, "CreateStreamOnHGlobal"); - hr = WriteClassStm(pStream, &test_stg_cls); - ok_ole_success(hr, "WriteClassStm"); - - hr = ReadClassStm(pStream, NULL); - ok(hr == E_INVALIDARG, "ReadClassStm should have returned E_INVALIDARG instead of 0x%08x\n", hr); - - /* test not rewound stream */ - hr = ReadClassStm(pStream, &clsid); - ok(hr == STG_E_READFAULT, "ReadClassStm should have returned STG_E_READFAULT instead of 0x%08x\n", hr); - ok(IsEqualCLSID(&clsid, &CLSID_NULL), "clsid should have been zeroed\n"); - - hr = IStream_Seek(pStream, llZero, STREAM_SEEK_SET, NULL); - ok_ole_success(hr, "IStream_Seek"); - hr = ReadClassStm(pStream, &clsid); - ok_ole_success(hr, "ReadClassStm"); - ok(IsEqualCLSID(&clsid, &test_stg_cls), "clsid should have been set to CLSID_WineTest\n"); - - IStream_Release(pStream); -} - -struct access_res -{ - BOOL gothandle; - DWORD lasterr; - BOOL ignore; -}; - -static const struct access_res create[16] = -{ - { TRUE, ERROR_SUCCESS, TRUE }, - { TRUE, ERROR_SUCCESS, TRUE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { TRUE, ERROR_SUCCESS, TRUE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { TRUE, ERROR_SUCCESS, TRUE } -}; - -static const struct access_res create_commit[16] = -{ - { TRUE, ERROR_SUCCESS, TRUE }, - { TRUE, ERROR_SUCCESS, TRUE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { TRUE, ERROR_SUCCESS, TRUE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { FALSE, ERROR_SHARING_VIOLATION, FALSE }, - { TRUE, ERROR_SUCCESS, TRUE } -}; - -static const struct access_res create_close[16] = -{ - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS, FALSE }, - { TRUE, ERROR_SUCCESS } -}; - -static void _test_file_access(LPCSTR file, const struct access_res *ares, DWORD line) -{ - DWORD access = 0, share = 0; - DWORD lasterr; - HANDLE hfile; - int i, j, idx = 0; - - for (i = 0; i < 4; i++) - { - if (i == 0) access = 0; - if (i == 1) access = GENERIC_READ; - if (i == 2) access = GENERIC_WRITE; - if (i == 3) access = GENERIC_READ | GENERIC_WRITE; - - for (j = 0; j < 4; j++) - { - if (ares[idx].ignore) - continue; - - if (j == 0) share = 0; - if (j == 1) share = FILE_SHARE_READ; - if (j == 2) share = FILE_SHARE_WRITE; - if (j == 3) share = FILE_SHARE_READ | FILE_SHARE_WRITE; - - SetLastError(0xdeadbeef); - hfile = CreateFileA(file, access, share, NULL, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, 0); - lasterr = GetLastError(); - - ok((hfile != INVALID_HANDLE_VALUE) == ares[idx].gothandle, - "(%d, handle, %d): Expected %d, got %d\n", - line, idx, ares[idx].gothandle, - (hfile != INVALID_HANDLE_VALUE)); - - ok(lasterr == ares[idx].lasterr || - broken(lasterr == 0xdeadbeef) /* win9x */, - "(%d, lasterr, %d): Expected %d, got %d\n", - line, idx, ares[idx].lasterr, lasterr); - - CloseHandle(hfile); - idx++; - } - } -} - -#define test_file_access(file, ares) _test_file_access(file, ares, __LINE__) - -static void test_access(void) -{ - IStorage *stg; - HRESULT hr; - - static const WCHAR fileW[] = {'w','i','n','e','t','e','s','t',0}; - - /* STGM_TRANSACTED */ - - hr = StgCreateDocfile(fileW, STGM_CREATE | STGM_READWRITE | - STGM_SHARE_EXCLUSIVE | STGM_TRANSACTED, 0, &stg); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - test_file_access("winetest", create); - - hr = IStorage_Commit(stg, STGC_DEFAULT); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - test_file_access("winetest", create_commit); - - IStorage_Release(stg); - - test_file_access("winetest", create_close); - - DeleteFileA("winetest"); - - /* STGM_DIRECT */ - - hr = StgCreateDocfile(fileW, STGM_CREATE | STGM_READWRITE | - STGM_SHARE_EXCLUSIVE | STGM_DIRECT, 0, &stg); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - test_file_access("winetest", create); - - hr = IStorage_Commit(stg, STGC_DEFAULT); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - test_file_access("winetest", create_commit); - - IStorage_Release(stg); - - test_file_access("winetest", create_close); - - DeleteFileA("winetest"); - - /* STGM_SHARE_DENY_NONE */ - - hr = StgCreateDocfile(fileW, STGM_CREATE | STGM_READWRITE | - STGM_SHARE_DENY_NONE | STGM_TRANSACTED, 0, &stg); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - test_file_access("winetest", create); - - hr = IStorage_Commit(stg, STGC_DEFAULT); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - test_file_access("winetest", create_commit); - - IStorage_Release(stg); - - test_file_access("winetest", create_close); - - DeleteFileA("winetest"); - - /* STGM_SHARE_DENY_READ */ - - hr = StgCreateDocfile(fileW, STGM_CREATE | STGM_READWRITE | - STGM_SHARE_DENY_READ | STGM_TRANSACTED, 0, &stg); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - test_file_access("winetest", create); - - hr = IStorage_Commit(stg, STGC_DEFAULT); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - test_file_access("winetest", create_commit); - - IStorage_Release(stg); - - test_file_access("winetest", create_close); - - DeleteFileA("winetest"); - - /* STGM_SHARE_DENY_WRITE */ - - hr = StgCreateDocfile(fileW, STGM_CREATE | STGM_READWRITE | - STGM_SHARE_DENY_WRITE | STGM_TRANSACTED, 0, &stg); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - test_file_access("winetest", create); - - hr = IStorage_Commit(stg, STGC_DEFAULT); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - test_file_access("winetest", create_commit); - - IStorage_Release(stg); - - test_file_access("winetest", create_close); - - DeleteFileA("winetest"); -} - -static void test_readonly(void) -{ - IStorage *stg, *stg2, *stg3; - IStream *stream; - HRESULT hr; - static const WCHAR fileW[] = {'w','i','n','e','t','e','s','t',0}; - static const WCHAR storageW[] = {'s','t','o','r','a','g','e',0}; - static const WCHAR streamW[] = {'s','t','r','e','a','m',0}; - - hr = StgCreateDocfile( fileW, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &stg); - ok(hr == S_OK, "should succeed, res=%x\n", hr); - if (SUCCEEDED(hr)) - { - hr = IStorage_CreateStorage( stg, storageW, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stg2 ); - ok(hr == S_OK, "should succeed, res=%x\n", hr); - if (SUCCEEDED(hr)) - { - hr = IStorage_CreateStream( stg2, streamW, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stream ); - ok(hr == S_OK, "should succeed, res=%x\n", hr); - if (SUCCEEDED(hr)) - IStream_Release(stream); - IStorage_Release(stg2); - } - IStorage_Release(stg); - } - - /* re-open read only */ - hr = StgOpenStorage( fileW, NULL, STGM_TRANSACTED | STGM_SHARE_DENY_NONE | STGM_READ, NULL, 0, &stg); - ok(hr == S_OK, "should succeed, res=%x\n", hr); - if (SUCCEEDED(hr)) - { - hr = IStorage_OpenStorage( stg, storageW, NULL, STGM_SHARE_EXCLUSIVE | STGM_READ, NULL, 0, &stg2 ); - ok(hr == S_OK, "should succeed, res=%x\n", hr); - if (SUCCEEDED(hr)) - { - /* CreateStream on read-only storage, name exists */ - hr = IStorage_CreateStream( stg2, streamW, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READ, 0, 0, &stream ); - ok(hr == STG_E_ACCESSDENIED, "should fail, res=%x\n", hr); - if (SUCCEEDED(hr)) - IStream_Release(stream); - - /* CreateStream on read-only storage, name does not exist */ - hr = IStorage_CreateStream( stg2, storageW, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READ, 0, 0, &stream ); - ok(hr == STG_E_ACCESSDENIED, "should fail, res=%x\n", hr); - if (SUCCEEDED(hr)) - IStream_Release(stream); - - /* CreateStorage on read-only storage, name exists */ - hr = IStorage_CreateStorage( stg2, streamW, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READ, 0, 0, &stg3 ); - ok(hr == STG_E_FILEALREADYEXISTS, "should fail, res=%x\n", hr); - if (SUCCEEDED(hr)) - IStream_Release(stg3); - - /* CreateStorage on read-only storage, name does not exist */ - hr = IStorage_CreateStorage( stg2, storageW, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READ, 0, 0, &stg3 ); - ok(hr == STG_E_ACCESSDENIED, "should fail, res=%x\n", hr); - if (SUCCEEDED(hr)) - IStream_Release(stg3); - - /* DestroyElement on read-only storage, name exists */ - hr = IStorage_DestroyElement( stg2, streamW ); - ok(hr == STG_E_ACCESSDENIED, "should fail, res=%x\n", hr); - - /* DestroyElement on read-only storage, name does not exist */ - hr = IStorage_DestroyElement( stg2, storageW ); - ok(hr == STG_E_ACCESSDENIED, "should fail, res=%x\n", hr); - - IStorage_Release(stg2); - } - - IStorage_Release(stg); - } - - DeleteFileA("winetest"); -} - -static void test_simple(void) -{ - /* Tests for STGM_SIMPLE mode */ - - IStorage *stg, *stg2; - HRESULT r; - IStream *stm; - static const WCHAR stgname[] = { 'S','t','g',0 }; - static const WCHAR stmname[] = { 'C','O','N','T','E','N','T','S',0 }; - static const WCHAR stmname2[] = { 'S','m','a','l','l',0 }; - LARGE_INTEGER pos; - ULARGE_INTEGER upos; - DWORD count; - STATSTG stat; - - DeleteFileA(filenameA); - - r = StgCreateDocfile( filename, STGM_SIMPLE | STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &stg); - ok(r == S_OK, "got %08x\n", r); - - r = IStorage_CreateStorage(stg, stgname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stg2); - ok(r == STG_E_INVALIDFUNCTION, "got %08x\n", r); - if (SUCCEEDED(r)) IStorage_Release(stg2); - - r = IStorage_CreateStream(stg, stmname, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm); - ok(r == STG_E_INVALIDFLAG, "got %08x\n", r); - r = IStorage_CreateStream(stg, stmname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm); - ok(r == S_OK, "got %08x\n", r); - - upos.QuadPart = 6000; - r = IStream_SetSize(stm, upos); - ok(r == S_OK, "got %08x\n", r); - - r = IStream_Write(stm, "foo", 3, &count); - ok(r == S_OK, "got %08x\n", r); - ok(count == 3, "got %d\n", count); - - pos.QuadPart = 0; - r = IStream_Seek(stm, pos, STREAM_SEEK_CUR, &upos); - ok(r == S_OK, "got %08x\n", r); - ok(upos.QuadPart == 3, "got %d\n", upos.u.LowPart); - - r = IStream_Stat(stm, &stat, STATFLAG_NONAME); - ok(r == S_OK || - broken(r == STG_E_INVALIDFUNCTION), /* NT4 and below */ - "got %08x\n", r); - if (r == S_OK) - ok(stat.cbSize.QuadPart == 3, "got %d\n", stat.cbSize.u.LowPart); - - pos.QuadPart = 1; - r = IStream_Seek(stm, pos, STREAM_SEEK_SET, &upos); - ok(r == S_OK, "got %08x\n", r); - ok(upos.QuadPart == 1, "got %d\n", upos.u.LowPart); - - r = IStream_Stat(stm, &stat, STATFLAG_NONAME); - ok(r == S_OK || - broken(r == STG_E_INVALIDFUNCTION), /* NT4 and below */ - "got %08x\n", r); - if (r == S_OK) - ok(stat.cbSize.QuadPart == 1, "got %d\n", stat.cbSize.u.LowPart); - - IStream_Release(stm); - - r = IStorage_CreateStream(stg, stmname2, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm); - ok(r == S_OK, "got %08x\n", r); - - upos.QuadPart = 100; - r = IStream_SetSize(stm, upos); - ok(r == S_OK, "got %08x\n", r); - - r = IStream_Write(stm, "foo", 3, &count); - ok(r == S_OK, "got %08x\n", r); - ok(count == 3, "got %d\n", count); - - IStream_Release(stm); - - IStorage_Commit(stg, STGC_DEFAULT); - IStorage_Release(stg); - - r = StgOpenStorage( filename, NULL, STGM_SIMPLE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, NULL, 0, &stg); - if (r == STG_E_INVALIDFLAG) - { - win_skip("Flag combination is not supported on NT4 and below\n"); - DeleteFileA(filenameA); - return; - } - ok(r == S_OK, "got %08x\n", r); - - r = IStorage_OpenStorage(stg, stgname, NULL, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, NULL, 0, &stg2); - ok(r == STG_E_INVALIDFUNCTION, "got %08x\n", r); - if (SUCCEEDED(r)) IStorage_Release(stg2); - - r = IStorage_OpenStream(stg, stmname, NULL, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &stm); - ok(r == S_OK, "got %08x\n", r); - - r = IStream_Stat(stm, &stat, STATFLAG_NONAME); - ok(r == S_OK, "got %08x\n", r); - ok(stat.cbSize.QuadPart == 6000, "got %d\n", stat.cbSize.u.LowPart); - - IStream_Release(stm); - - r = IStorage_OpenStream(stg, stmname2, NULL, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &stm); - ok(r == S_OK, "got %08x\n", r); - - r = IStream_Stat(stm, &stat, STATFLAG_NONAME); - ok(r == S_OK, "got %08x\n", r); - ok(stat.cbSize.QuadPart == 4096, "got %d\n", stat.cbSize.u.LowPart); - - IStream_Release(stm); - - - IStorage_Release(stg); - - DeleteFileA(filenameA); -} - -static void test_fmtusertypestg(void) -{ - IStorage *stg; - IEnumSTATSTG *stat; - HRESULT hr; - static const char fileA[] = {'f','m','t','t','e','s','t',0}; - static const WCHAR fileW[] = {'f','m','t','t','e','s','t',0}; - static WCHAR userTypeW[] = {'S','t','g','U','s','r','T','y','p','e',0}; - static WCHAR strmNameW[] = {1,'C','o','m','p','O','b','j',0}; - - hr = StgCreateDocfile( fileW, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &stg); - ok(hr == S_OK, "should succeed, res=%x\n", hr); - - if (SUCCEEDED(hr)) - { - /* try to write the stream */ - hr = WriteFmtUserTypeStg(stg, 0, userTypeW); - ok(hr == S_OK, "should succeed, res=%x\n", hr); - - /* check that the stream was created */ - hr = IStorage_EnumElements(stg, 0, NULL, 0, &stat); - ok(hr == S_OK, "should succeed, res=%x\n", hr); - if (SUCCEEDED(hr)) - { - BOOL found = FALSE; - STATSTG statstg; - DWORD got; - while ((hr = IEnumSTATSTG_Next(stat, 1, &statstg, &got)) == S_OK && got == 1) - { - if (strcmp_ww(statstg.pwcsName, strmNameW) == 0) - found = TRUE; - else - ok(0, "found unexpected stream or storage\n"); - CoTaskMemFree(statstg.pwcsName); - } - ok(found == TRUE, "expected storage to contain stream \\0001CompObj\n"); - IEnumSTATSTG_Release(stat); - } - - /* re-write the stream */ - hr = WriteFmtUserTypeStg(stg, 0, userTypeW); - ok(hr == S_OK, "should succeed, res=%x\n", hr); - - /* check that the stream is still there */ - hr = IStorage_EnumElements(stg, 0, NULL, 0, &stat); - ok(hr == S_OK, "should succeed, res=%x\n", hr); - if (SUCCEEDED(hr)) - { - BOOL found = FALSE; - STATSTG statstg; - DWORD got; - while ((hr = IEnumSTATSTG_Next(stat, 1, &statstg, &got)) == S_OK && got == 1) - { - if (strcmp_ww(statstg.pwcsName, strmNameW) == 0) - found = TRUE; - else - ok(0, "found unexpected stream or storage\n"); - CoTaskMemFree(statstg.pwcsName); - } - ok(found == TRUE, "expected storage to contain stream \\0001CompObj\n"); - IEnumSTATSTG_Release(stat); - } - - IStorage_Release(stg); - DeleteFileA( fileA ); - } -} - -static void test_references(void) -{ - IStorage *stg,*stg2; - HRESULT hr; - unsigned c1,c2; - static const WCHAR StorName[] = { 'D','a','t','a','S','p','a','c','e','I','n','f','o',0 }; - - DeleteFileA(filenameA); - - hr = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE |STGM_TRANSACTED, 0, &stg); - ok(hr==S_OK, "StgCreateDocfile failed\n"); - - if (SUCCEEDED(hr)) - { - IStorage_Release(stg); - - hr = StgOpenStorage( filename, NULL, STGM_TRANSACTED | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, NULL, 0, &stg); - ok(hr==S_OK, "StgOpenStorage failed (result=%x)\n",hr); - - if (SUCCEEDED(hr)) - { - hr = IStorage_CreateStorage(stg,StorName,STGM_READWRITE | STGM_SHARE_EXCLUSIVE,0,0,&stg2); - ok(hr == S_OK, "IStorage_CreateStorage failed (result=%x)\n",hr); - - if (SUCCEEDED(hr)) - { - c1 = IStorage_AddRef(stg); - ok(c1 == 2, "creating internal storage added references to ancestor\n"); - c1 = IStorage_AddRef(stg); - IStorage_Release(stg2); - c2 = IStorage_AddRef(stg) - 1; - ok(c1 == c2, "releasing internal storage removed references to ancestor\n"); - } - c1 = IStorage_Release(stg); - while ( c1 ) c1 = IStorage_Release(stg); - } - } - - DeleteFileA(filenameA); -} - -/* dest - * |-StorageA - * | `StreamA: "StreamA" - * |-StorageB - * | `StreamB: "StreamB" - * `StreamC: "StreamC" - */ -static HRESULT create_test_file(IStorage *dest) -{ - IStorage *stgA = NULL, *stgB = NULL; - IStream *strmA = NULL, *strmB = NULL, *strmC = NULL; - const ULONG strmA_name_size = lstrlenW(strmA_name) * sizeof(WCHAR); - const ULONG strmB_name_size = lstrlenW(strmB_name) * sizeof(WCHAR); - const ULONG strmC_name_size = lstrlenW(strmC_name) * sizeof(WCHAR); - ULONG bytes; - HRESULT hr; - - hr = IStorage_CreateStorage(dest, stgA_name, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stgA); - ok(hr == S_OK, "IStorage_CreateStorage failed: 0x%08x\n", hr); - if(FAILED(hr)) - goto cleanup; - - hr = IStorage_CreateStream(stgA, strmA_name, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &strmA); - ok(hr == S_OK, "IStorage_CreateStream failed: 0x%08x\n", hr); - if(FAILED(hr)) - goto cleanup; - - hr = IStream_Write(strmA, strmA_name, strmA_name_size, &bytes); - ok(hr == S_OK && bytes == strmA_name_size, "IStream_Write failed: 0x%08x, %d of %d bytes written\n", hr, bytes, strmA_name_size); - - hr = IStorage_CreateStorage(dest, stgB_name, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stgB); - ok(hr == S_OK, "IStorage_CreateStorage failed: 0x%08x\n", hr); - if(FAILED(hr)) - goto cleanup; - - hr = IStorage_CreateStream(stgB, strmB_name, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &strmB); - ok(hr == S_OK, "IStorage_CreateStream failed: 0x%08x\n", hr); - if(FAILED(hr)) - goto cleanup; - - hr = IStream_Write(strmB, strmB_name, strmB_name_size, &bytes); - ok(hr == S_OK && bytes == strmB_name_size, "IStream_Write failed: 0x%08x, %d of %d bytes written\n", hr, bytes, strmB_name_size); - - hr = IStorage_CreateStream(dest, strmC_name, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &strmC); - ok(hr == S_OK, "IStorage_CreateStream failed: 0x%08x\n", hr); - if(FAILED(hr)) - goto cleanup; - - hr = IStream_Write(strmC, strmC_name, strmC_name_size, &bytes); - ok(hr == S_OK && bytes == strmC_name_size, "IStream_Write failed: 0x%08x, %d of %d bytes written\n", hr, bytes, strmC_name_size); - -cleanup: - if(strmC) - IStream_Release(strmC); - if(strmB) - IStream_Release(strmB); - if(stgB) - IStorage_Release(stgB); - if(strmA) - IStream_Release(strmA); - if(stgA) - IStorage_Release(stgA); - - return hr; -} - -static void test_copyto(void) -{ - IStorage *file1 = NULL, *file2 = NULL, *stg_tmp; - IStream *strm_tmp; - WCHAR buf[64]; - HRESULT hr; - - /* create & populate file1 */ - hr = StgCreateDocfile(file1_name, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &file1); - ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr); - if(FAILED(hr)) - goto cleanup; - - hr = create_test_file(file1); - if(FAILED(hr)) - goto cleanup; - - /* create file2 */ - hr = StgCreateDocfile(file2_name, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &file2); - ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr); - if(FAILED(hr)) - goto cleanup; - - /* copy file1 into file2 */ - hr = IStorage_CopyTo(file1, 0, NULL, NULL, NULL); - ok(hr == STG_E_INVALIDPOINTER, "CopyTo should give STG_E_INVALIDPONITER, gave: 0x%08x\n", hr); - - hr = IStorage_CopyTo(file1, 0, NULL, NULL, file2); - ok(hr == S_OK, "CopyTo failed: 0x%08x\n", hr); - if(FAILED(hr)) - goto cleanup; - - /* verify that all of file1 was copied */ - hr = IStorage_OpenStorage(file2, stgA_name, NULL, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE, NULL, 0, &stg_tmp); - ok(hr == S_OK, "OpenStorage failed: 0x%08x\n", hr); - - if(SUCCEEDED(hr)){ - hr = IStorage_OpenStream(stg_tmp, strmA_name, NULL, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &strm_tmp); - ok(hr == S_OK, "OpenStream failed: 0x%08x\n", hr); - - if(SUCCEEDED(hr)){ - memset(buf, 0, sizeof(buf)); - hr = IStream_Read(strm_tmp, buf, sizeof(buf), NULL); - ok(hr == S_OK, "Read failed: 0x%08x\n", hr); - if(SUCCEEDED(hr)) - ok(strcmp_ww(buf, strmA_name) == 0, - "Expected %s to be read, got %s\n", wine_dbgstr_w(strmA_name), wine_dbgstr_w(buf)); - - IStream_Release(strm_tmp); - } - - IStorage_Release(stg_tmp); - } - - hr = IStorage_OpenStorage(file2, stgB_name, NULL, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE, NULL, 0, &stg_tmp); - ok(hr == S_OK, "OpenStorage failed: 0x%08x\n", hr); - - if(SUCCEEDED(hr)){ - hr = IStorage_OpenStream(stg_tmp, strmB_name, NULL, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &strm_tmp); - ok(hr == S_OK, "OpenStream failed: 0x%08x\n", hr); - - if(SUCCEEDED(hr)){ - memset(buf, 0, sizeof(buf)); - hr = IStream_Read(strm_tmp, buf, sizeof(buf), NULL); - ok(hr == S_OK, "Read failed: 0x%08x\n", hr); - if(SUCCEEDED(hr)) - ok(strcmp_ww(buf, strmB_name) == 0, - "Expected %s to be read, got %s\n", wine_dbgstr_w(strmB_name), wine_dbgstr_w(buf)); - - IStream_Release(strm_tmp); - } - - IStorage_Release(stg_tmp); - } - - hr = IStorage_OpenStream(file2, strmC_name, NULL, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &strm_tmp); - ok(hr == S_OK, "OpenStream failed: 0x%08x\n", hr); - - if(SUCCEEDED(hr)){ - memset(buf, 0, sizeof(buf)); - hr = IStream_Read(strm_tmp, buf, sizeof(buf), NULL); - ok(hr == S_OK, "Read failed: 0x%08x\n", hr); - if(SUCCEEDED(hr)) - ok(strcmp_ww(buf, strmC_name) == 0, - "Expected %s to be read, got %s\n", wine_dbgstr_w(strmC_name), wine_dbgstr_w(buf)); - - IStream_Release(strm_tmp); - } - -cleanup: - if(file1) - IStorage_Release(file1); - if(file2) - IStorage_Release(file2); - - DeleteFileA(file1_nameA); - DeleteFileA(file2_nameA); -} - -static void test_copyto_snbexclusions(void) -{ - static const WCHAR *snb_exclude[] = {stgA_name, strmB_name, strmC_name, 0}; - - IStorage *file1 = NULL, *file2 = NULL, *stg_tmp; - IStream *strm_tmp; - WCHAR buf[64]; - HRESULT hr; - - /* create & populate file1 */ - hr = StgCreateDocfile(file1_name, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &file1); - ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr); - if(FAILED(hr)) - goto cleanup; - - hr = create_test_file(file1); - if(FAILED(hr)) - goto cleanup; - - /* create file2 */ - hr = StgCreateDocfile(file2_name, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &file2); - ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr); - if(FAILED(hr)) - goto cleanup; - - /* copy file1 to file2 with name exclusions */ - hr = IStorage_CopyTo(file1, 0, NULL, (SNB)snb_exclude, file2); - ok(hr == S_OK, "CopyTo failed: 0x%08x\n", hr); - if(FAILED(hr)) - goto cleanup; - - /* verify that file1 copied over, respecting exclusions */ - hr = IStorage_OpenStorage(file2, stgA_name, NULL, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE, NULL, 0, &stg_tmp); - ok(hr == STG_E_FILENOTFOUND, "OpenStorage should give STG_E_FILENOTFOUND, gave: 0x%08x\n", hr); - if(SUCCEEDED(hr)) - IStorage_Release(stg_tmp); - - hr = IStorage_OpenStream(file2, strmA_name, NULL, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &strm_tmp); - ok(hr == STG_E_FILENOTFOUND, "OpenStream should give STG_E_FILENOTFOUND, gave: 0x%08x\n", hr); - if(SUCCEEDED(hr)) - IStream_Release(strm_tmp); - - hr = IStorage_OpenStorage(file2, stgB_name, NULL, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE, NULL, 0, &stg_tmp); - ok(hr == S_OK, "OpenStorage failed: 0x%08x\n", hr); - - if(SUCCEEDED(hr)){ - hr = IStorage_OpenStream(stg_tmp, strmB_name, NULL, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &strm_tmp); - ok(hr == S_OK, "OpenStream failed: 0x%08x\n", hr); - - if(SUCCEEDED(hr)){ - memset(buf, 0, sizeof(buf)); - hr = IStream_Read(strm_tmp, buf, sizeof(buf), NULL); - ok(hr == S_OK, "Read failed: 0x%08x\n", hr); - if(SUCCEEDED(hr)) - ok(strcmp_ww(buf, strmB_name) == 0, - "Expected %s to be read, got %s\n", wine_dbgstr_w(strmB_name), wine_dbgstr_w(buf)); - - IStream_Release(strm_tmp); - } - - IStorage_Release(stg_tmp); - } - - hr = IStorage_OpenStream(file2, strmC_name, NULL, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &strm_tmp); - ok(hr == STG_E_FILENOTFOUND, "OpenStream should give STG_E_FILENOTFOUND, gave: 0x%08x\n", hr); - if(SUCCEEDED(hr)) - IStream_Release(strm_tmp); - -cleanup: - if(file1) - IStorage_Release(file1); - if(file2) - IStorage_Release(file2); - - DeleteFileA(file1_nameA); - DeleteFileA(file2_nameA); -} - -static void test_copyto_iidexclusions_storage(void) -{ - IStorage *file1 = NULL, *file2 = NULL, *stg_tmp; - IStream *strm_tmp; - WCHAR buf[64]; - HRESULT hr; - - /* create & populate file1 */ - hr = StgCreateDocfile(file1_name, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &file1); - ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr); - if(FAILED(hr)) - goto cleanup; - - hr = create_test_file(file1); - if(FAILED(hr)) - goto cleanup; - - /* create file2 */ - hr = StgCreateDocfile(file2_name, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &file2); - ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr); - if(FAILED(hr)) - goto cleanup; - - /* copy file1 to file2 with iid exclusions */ - hr = IStorage_CopyTo(file1, 1, &IID_IStorage, NULL, file2); - ok(hr == S_OK, "CopyTo failed: 0x%08x\n", hr); - if(FAILED(hr)) - goto cleanup; - - /* verify that file1 copied over, respecting exclusions */ - hr = IStorage_OpenStorage(file2, stgA_name, NULL, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE, NULL, 0, &stg_tmp); - ok(hr == STG_E_FILENOTFOUND, "OpenStorage should give STG_E_FILENOTFOUND, gave: 0x%08x\n", hr); - if(SUCCEEDED(hr)) - IStorage_Release(stg_tmp); - - hr = IStorage_OpenStream(file2, strmA_name, NULL, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &strm_tmp); - ok(hr == STG_E_FILENOTFOUND, "OpenStream should give STG_E_FILENOTFOUND, gave: 0x%08x\n", hr); - if(SUCCEEDED(hr)) - IStream_Release(strm_tmp); - - hr = IStorage_OpenStorage(file2, stgB_name, NULL, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE, NULL, 0, &stg_tmp); - ok(hr == STG_E_FILENOTFOUND, "OpenStorage should give STG_E_FILENOTFOUND, gave: 0x%08x\n", hr); - if(SUCCEEDED(hr)) - IStorage_Release(stg_tmp); - - hr = IStorage_OpenStream(file2, strmB_name, NULL, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &strm_tmp); - ok(hr == STG_E_FILENOTFOUND, "OpenStream should give STG_E_FILENOTFOUND, gave: 0x%08x\n", hr); - if(SUCCEEDED(hr)) - IStream_Release(strm_tmp); - - hr = IStorage_OpenStream(file2, strmC_name, NULL, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &strm_tmp); - ok(hr == S_OK, "OpenStream failed: 0x%08x\n", hr); - - if(SUCCEEDED(hr)){ - memset(buf, 0, sizeof(buf)); - hr = IStream_Read(strm_tmp, buf, sizeof(buf), NULL); - ok(hr == S_OK, "Read failed: 0x%08x\n", hr); - if(SUCCEEDED(hr)) - ok(strcmp_ww(buf, strmC_name) == 0, - "Expected %s to be read, got %s\n", wine_dbgstr_w(strmC_name), wine_dbgstr_w(buf)); - - IStream_Release(strm_tmp); - } - -cleanup: - if(file1) - IStorage_Release(file1); - if(file2) - IStorage_Release(file2); - - DeleteFileA(file1_nameA); - DeleteFileA(file2_nameA); -} - -static void test_copyto_iidexclusions_stream(void) -{ - IStorage *file1 = NULL, *file2 = NULL, *stg_tmp; - IStream *strm_tmp; - HRESULT hr; - - /* create & populate file1 */ - hr = StgCreateDocfile(file1_name, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &file1); - ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr); - if(FAILED(hr)) - goto cleanup; - - hr = create_test_file(file1); - if(FAILED(hr)) - goto cleanup; - - /* create file2 */ - hr = StgCreateDocfile(file2_name, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &file2); - ok(hr == S_OK, "StgCreateDocfile failed: 0x%08x\n", hr); - if(FAILED(hr)) - goto cleanup; - - /* copy file1 to file2 with iid exclusions */ - hr = IStorage_CopyTo(file1, 1, &IID_IStream, NULL, file2); - ok(hr == S_OK, "CopyTo failed: 0x%08x\n", hr); - if(FAILED(hr)) - goto cleanup; - - /* verify that file1 copied over, respecting exclusions */ - hr = IStorage_OpenStorage(file2, stgA_name, NULL, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE, NULL, 0, &stg_tmp); - ok(hr == S_OK, "OpenStorage failed: 0x%08x\n", hr); - - if(SUCCEEDED(hr)){ - hr = IStorage_OpenStream(stg_tmp, strmA_name, NULL, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &strm_tmp); - ok(hr == STG_E_FILENOTFOUND, "OpenStream should give STG_E_FILENOTFOUND, gave: 0x%08x\n", hr); - if(SUCCEEDED(hr)) - IStream_Release(strm_tmp); - - IStorage_Release(stg_tmp); - } - - hr = IStorage_OpenStorage(file2, stgB_name, NULL, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE, NULL, 0, &stg_tmp); - ok(hr == S_OK, "OpenStorage failed: 0x%08x\n", hr); - - if(SUCCEEDED(hr)){ - hr = IStorage_OpenStream(stg_tmp, strmB_name, NULL, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &strm_tmp); - ok(hr == STG_E_FILENOTFOUND, "OpenStream should give STG_E_FILENOTFOUND, gave: 0x%08x\n", hr); - if(SUCCEEDED(hr)) - IStream_Release(strm_tmp); - - IStorage_Release(stg_tmp); - } - - hr = IStorage_OpenStream(file2, strmC_name, NULL, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &strm_tmp); - ok(hr == STG_E_FILENOTFOUND, "OpenStream should give STG_E_FILENOTFOUND, gave: 0x%08x\n", hr); - if(SUCCEEDED(hr)) - IStream_Release(strm_tmp); - -cleanup: - if(file1) - IStorage_Release(file1); - if(file2) - IStorage_Release(file2); - - DeleteFileA(file1_nameA); - DeleteFileA(file2_nameA); -} - -static void test_rename(void) -{ - IStorage *stg, *stg2; - IStream *stm; - HRESULT r; - static const WCHAR stgname[] = { 'P','E','R','M','S','T','G',0 }; - static const WCHAR stgname2[] = { 'S','T','G',0 }; - static const WCHAR stmname[] = { 'C','O','N','T','E','N','T','S',0 }; - static const WCHAR stmname2[] = { 'E','N','T','S',0 }; - - DeleteFileA(filenameA); - - /* create the file */ - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | - STGM_READWRITE, 0, &stg); - ok(r==S_OK, "StgCreateDocfile failed\n"); - - /* create a substorage */ - r = IStorage_CreateStorage(stg, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg2); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); - - /* create a stream in the substorage */ - r = IStorage_CreateStream(stg2, stmname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm); - ok(r==S_OK, "IStorage->CreateStream failed, hr=%08x\n", r); - IStream_Release(stm); - - /* rename the stream */ - r = IStorage_RenameElement(stg2, stmname, stmname2); - ok(r==S_OK, "IStorage->RenameElement failed, hr=%08x\n", r); - - /* cannot open stream with old name */ - r = IStorage_OpenStream(stg2, stmname, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &stm); - ok(r==STG_E_FILENOTFOUND, "IStorage_OpenStream should fail, hr=%08x\n", r); - if (SUCCEEDED(r)) IStream_Release(stm); - - /* can open stream with new name */ - r = IStorage_OpenStream(stg2, stmname2, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &stm); - ok(r==S_OK, "IStorage_OpenStream failed, hr=%08x\n", r); - if (SUCCEEDED(r)) IStream_Release(stm); - - IStorage_Release(stg2); - - /* rename the storage */ - IStorage_RenameElement(stg, stgname, stgname2); - - /* cannot open storage with old name */ - r = IStorage_OpenStorage(stg, stgname, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, NULL, 0, &stg2); - ok(r==STG_E_FILENOTFOUND, "IStorage_OpenStream should fail, hr=%08x\n", r); - if (SUCCEEDED(r)) IStorage_Release(stg2); - - /* can open storage with new name */ - r = IStorage_OpenStorage(stg, stgname2, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, NULL, 0, &stg2); - ok(r==S_OK, "IStorage_OpenStream should fail, hr=%08x\n", r); - if (SUCCEEDED(r)) - { - /* opened storage still has the stream */ - r = IStorage_OpenStream(stg2, stmname2, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &stm); - ok(r==S_OK, "IStorage_OpenStream failed, hr=%08x\n", r); - if (SUCCEEDED(r)) IStream_Release(stm); - - IStorage_Release(stg2); - } - - IStorage_Release(stg); - - r = DeleteFileA(filenameA); - ok( r == TRUE, "deleted file\n"); -} - -static void test_toplevel_stat(void) -{ - IStorage *stg = NULL; - HRESULT r; - STATSTG stat; - char prev_dir[MAX_PATH]; - char temp[MAX_PATH]; - char full_path[MAX_PATH]; - LPSTR rel_pathA; - WCHAR rel_path[MAX_PATH]; - - DeleteFileA(filenameA); - - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | - STGM_READWRITE |STGM_TRANSACTED, 0, &stg); - ok(r==S_OK, "StgCreateDocfile failed\n"); - - r = IStorage_Stat( stg, &stat, STATFLAG_DEFAULT ); - ok(!strcmp_ww(stat.pwcsName, filename), "expected %s, got %s\n", - wine_dbgstr_w(filename), wine_dbgstr_w(stat.pwcsName)); - CoTaskMemFree(stat.pwcsName); - - IStorage_Release( stg ); - - r = StgOpenStorage( filename, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg); - ok(r==S_OK, "StgOpenStorage failed with error 0x%08x\n", r); - - r = IStorage_Stat( stg, &stat, STATFLAG_DEFAULT ); - ok(!strcmp_ww(stat.pwcsName, filename), "expected %s, got %s\n", - wine_dbgstr_w(filename), wine_dbgstr_w(stat.pwcsName)); - CoTaskMemFree(stat.pwcsName); - - IStorage_Release( stg ); - - DeleteFileA(filenameA); - - /* Stat always returns the full path, even for files opened with a relative path. */ - GetCurrentDirectoryA(MAX_PATH, prev_dir); - - GetTempPathA(MAX_PATH, temp); - - SetCurrentDirectoryA(temp); - - GetFullPathNameA(filenameA, MAX_PATH, full_path, &rel_pathA); - MultiByteToWideChar(CP_ACP, 0, rel_pathA, -1, rel_path, MAX_PATH); - - r = StgCreateDocfile( rel_path, STGM_CREATE | STGM_SHARE_EXCLUSIVE | - STGM_READWRITE |STGM_TRANSACTED, 0, &stg); - ok(r==S_OK, "StgCreateDocfile failed\n"); - - r = IStorage_Stat( stg, &stat, STATFLAG_DEFAULT ); - ok(!strcmp_ww(stat.pwcsName, filename), "expected %s, got %s\n", - wine_dbgstr_w(filename), wine_dbgstr_w(stat.pwcsName)); - CoTaskMemFree(stat.pwcsName); - - IStorage_Release( stg ); - - r = StgOpenStorage( rel_path, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg); - ok(r==S_OK, "StgOpenStorage failed with error 0x%08x\n", r); - - r = IStorage_Stat( stg, &stat, STATFLAG_DEFAULT ); - ok(!strcmp_ww(stat.pwcsName, filename), "expected %s, got %s\n", - wine_dbgstr_w(filename), wine_dbgstr_w(stat.pwcsName)); - CoTaskMemFree(stat.pwcsName); - - IStorage_Release( stg ); - - SetCurrentDirectoryA(prev_dir); - - DeleteFileA(filenameA); -} - -static void test_substorage_enum(void) -{ - IStorage *stg, *stg2; - IEnumSTATSTG *ee; - HRESULT r; - ULONG ref; - static const WCHAR stgname[] = { 'P','E','R','M','S','T','G',0 }; - - DeleteFileA(filenameA); - - /* create the file */ - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | - STGM_READWRITE, 0, &stg); - ok(r==S_OK, "StgCreateDocfile failed\n"); - - /* create a substorage */ - r = IStorage_CreateStorage(stg, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg2); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); - - /* create an enumelements */ - r = IStorage_EnumElements(stg2, 0, NULL, 0, &ee); - ok(r==S_OK, "IStorage->EnumElements failed, hr=%08x\n", r); - - /* release the substorage */ - ref = IStorage_Release(stg2); - todo_wine ok(ref==0, "storage not released\n"); - - /* reopening fails, because the substorage is really still open */ - r = IStorage_OpenStorage(stg, stgname, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg2); - ok(r==STG_E_ACCESSDENIED, "IStorage->OpenStorage failed, hr=%08x\n", r); - - /* destroying the storage invalidates the enumerator */ - r = IStorage_DestroyElement(stg, stgname); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); - - r = IEnumSTATSTG_Reset(ee); - ok(r==STG_E_REVERTED, "IEnumSTATSTG->Reset failed, hr=%08x\n", r); - - IEnumSTATSTG_Release(ee); - - IStorage_Release(stg); - - r = DeleteFileA(filenameA); - ok( r == TRUE, "deleted file\n"); -} - -static void test_copyto_locking(void) -{ - IStorage *stg, *stg2, *stg3, *stg4; - IStream *stm; - HRESULT r; - static const WCHAR stgname[] = { 'S','T','G','1',0 }; - static const WCHAR stgname2[] = { 'S','T','G','2',0 }; - static const WCHAR stmname[] = { 'C','O','N','T','E','N','T','S',0 }; - - DeleteFileA(filenameA); - - /* create the file */ - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | - STGM_READWRITE, 0, &stg); - ok(r==S_OK, "StgCreateDocfile failed\n"); - - /* create a substorage */ - r = IStorage_CreateStorage(stg, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg2); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); - - /* create another substorage */ - r = IStorage_CreateStorage(stg, stgname2, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg3); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); - - /* add a stream, and leave it open */ - r = IStorage_CreateStream(stg2, stmname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stm); - ok(r==S_OK, "IStorage->CreateStream failed, hr=%08x\n", r); - - /* Try to copy the storage while the stream is open */ - r = IStorage_CopyTo(stg2, 0, NULL, NULL, stg3); - ok(r==S_OK, "IStorage->CopyTo failed, hr=%08x\n", r); - - IStream_Release(stm); - - /* create a substorage */ - r = IStorage_CreateStorage(stg2, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg4); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); - - /* Try to copy the storage while the substorage is open */ - r = IStorage_CopyTo(stg2, 0, NULL, NULL, stg3); - todo_wine ok(r==S_OK, "IStorage->CopyTo failed, hr=%08x\n", r); - - IStorage_Release(stg4); - IStorage_Release(stg3); - IStorage_Release(stg2); - IStorage_Release(stg); - - r = DeleteFileA(filenameA); - ok( r == TRUE, "deleted file\n"); -} - -static void test_copyto_recursive(void) -{ - IStorage *stg, *stg2, *stg3, *stg4; - HRESULT r; - static const WCHAR stgname[] = { 'S','T','G','1',0 }; - static const WCHAR stgname2[] = { 'S','T','G','2',0 }; - - DeleteFileA(filenameA); - - /* create the file */ - r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | - STGM_READWRITE, 0, &stg); - ok(r==S_OK, "StgCreateDocfile failed\n"); - - /* create a substorage */ - r = IStorage_CreateStorage(stg, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg2); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); - - /* copy the parent to the child */ - r = IStorage_CopyTo(stg, 0, NULL, NULL, stg2); - ok(r==STG_E_ACCESSDENIED, "IStorage->CopyTo failed, hr=%08x\n", r); - - /* create a transacted substorage */ - r = IStorage_CreateStorage(stg, stgname2, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_TRANSACTED, 0, 0, &stg3); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); - - /* copy the parent to the transacted child */ - r = IStorage_CopyTo(stg, 0, NULL, NULL, stg2); - ok(r==STG_E_ACCESSDENIED, "IStorage->CopyTo failed, hr=%08x\n", r); - - /* create a transacted subsubstorage */ - r = IStorage_CreateStorage(stg3, stgname2, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_TRANSACTED, 0, 0, &stg4); - ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); - - /* copy the parent to the transacted child of the transacted child */ - r = IStorage_CopyTo(stg, 0, NULL, NULL, stg4); - ok(r==STG_E_ACCESSDENIED, "IStorage->CopyTo failed, hr=%08x\n", r); - - /* copy the parent but exclude storage objects */ - r = IStorage_CopyTo(stg, 1, &IID_IStorage, NULL, stg4); - ok(r==S_OK, "IStorage->CopyTo failed, hr=%08x\n", r); - - IStorage_Release(stg4); - IStorage_Release(stg3); - IStorage_Release(stg2); - IStorage_Release(stg); - - r = DeleteFileA(filenameA); - ok( r == TRUE, "deleted file\n"); -} - -START_TEST(storage32) -{ - CHAR temp[MAX_PATH]; - - GetTempPathA(MAX_PATH, temp); - if(!GetTempFileNameA(temp, "stg", 0, filenameA)) - { - win_skip("Could not create temp file, %u\n", GetLastError()); - return; - } - MultiByteToWideChar(CP_ACP, 0, filenameA, -1, filename, MAX_PATH); - DeleteFileA(filenameA); - - test_hglobal_storage_stat(); - test_create_storage_modes(); - test_storage_stream(); - test_open_storage(); - test_storage_suminfo(); - test_storage_refcount(); - test_streamenum(); - test_transact(); - test_substorage_share(); - test_revert(); - test_parent_free(); - test_nonroot_transacted(); - test_ReadClassStm(); - test_access(); - test_writeclassstg(); - test_readonly(); - test_simple(); - test_fmtusertypestg(); - test_references(); - test_copyto(); - test_copyto_snbexclusions(); - test_copyto_iidexclusions_storage(); - test_copyto_iidexclusions_stream(); - test_rename(); - test_toplevel_stat(); - test_substorage_enum(); - test_copyto_locking(); - test_copyto_recursive(); -} diff --git a/rostests/winetests/ole32/testlist.c b/rostests/winetests/ole32/testlist.c deleted file mode 100644 index 65c40d2c5ad..00000000000 --- a/rostests/winetests/ole32/testlist.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_clipboard(void); -extern void func_compobj(void); -extern void func_defaulthandler(void); -extern void func_dragdrop(void); -extern void func_errorinfo(void); -extern void func_hglobalstream(void); -extern void func_marshal(void); -extern void func_moniker(void); -extern void func_ole2(void); -extern void func_propvariant(void); -extern void func_stg_prop(void); -extern void func_storage32(void); -extern void func_usrmarshal(void); - -const struct test winetest_testlist[] = -{ - { "clipboard", func_clipboard }, - { "compobj", func_compobj }, - { "defaulthandler", func_defaulthandler }, - { "dragdrop", func_dragdrop }, - { "errorinfo", func_errorinfo }, - { "hglobalstream", func_hglobalstream }, - { "marshal", func_marshal }, - { "moniker", func_moniker }, - { "ole2", func_ole2 }, - { "propvariant", func_propvariant }, - { "stg_prop", func_stg_prop }, - { "storage32", func_storage32 }, - { "usrmarshal", func_usrmarshal }, - { 0, 0 } -}; diff --git a/rostests/winetests/ole32/usrmarshal.c b/rostests/winetests/ole32/usrmarshal.c deleted file mode 100644 index a40e66b2916..00000000000 --- a/rostests/winetests/ole32/usrmarshal.c +++ /dev/null @@ -1,768 +0,0 @@ -/* - * User Marshaling Tests - * - * Copyright 2004-2006 Robert Shearman 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 - */ - -#define COBJMACROS -#define CONST_VTABLE -#include - -#include "windef.h" -#include "winbase.h" -#include "objbase.h" -#include "objidl.h" - -#include "wine/test.h" - -ULONG __RPC_USER HMETAFILE_UserSize(ULONG *, ULONG, HMETAFILE *); -unsigned char * __RPC_USER HMETAFILE_UserMarshal(ULONG *, unsigned char *, HMETAFILE *); -unsigned char * __RPC_USER HMETAFILE_UserUnmarshal(ULONG *, unsigned char *, HMETAFILE *); -void __RPC_USER HMETAFILE_UserFree(ULONG *, HMETAFILE *); - -ULONG __RPC_USER HENHMETAFILE_UserSize(ULONG *, ULONG, HENHMETAFILE *); -unsigned char * __RPC_USER HENHMETAFILE_UserMarshal (ULONG *, unsigned char *, HENHMETAFILE *); -unsigned char * __RPC_USER HENHMETAFILE_UserUnmarshal(ULONG *, unsigned char *, HENHMETAFILE *); -void __RPC_USER HENHMETAFILE_UserFree(ULONG *, HENHMETAFILE *); - -ULONG __RPC_USER HMETAFILEPICT_UserSize(ULONG *, ULONG, HMETAFILEPICT *); -unsigned char * __RPC_USER HMETAFILEPICT_UserMarshal (ULONG *, unsigned char *, HMETAFILEPICT *); -unsigned char * __RPC_USER HMETAFILEPICT_UserUnmarshal(ULONG *, unsigned char *, HMETAFILEPICT *); -void __RPC_USER HMETAFILEPICT_UserFree(ULONG *, HMETAFILEPICT *); - -static void * WINAPI user_allocate(SIZE_T size) -{ - return CoTaskMemAlloc(size); -} - -static void WINAPI user_free(void *p) -{ - CoTaskMemFree(p); -} - -static void init_user_marshal_cb(USER_MARSHAL_CB *umcb, - PMIDL_STUB_MESSAGE stub_msg, - PRPC_MESSAGE rpc_msg, unsigned char *buffer, - unsigned int size, MSHCTX context) -{ - memset(rpc_msg, 0, sizeof(*rpc_msg)); - rpc_msg->Buffer = buffer; - rpc_msg->BufferLength = size; - - memset(stub_msg, 0, sizeof(*stub_msg)); - stub_msg->RpcMsg = rpc_msg; - stub_msg->Buffer = buffer; - stub_msg->pfnAllocate = user_allocate; - stub_msg->pfnFree = user_free; - - memset(umcb, 0, sizeof(*umcb)); - umcb->Flags = MAKELONG(context, NDR_LOCAL_DATA_REPRESENTATION); - umcb->pStubMsg = stub_msg; - umcb->Signature = USER_MARSHAL_CB_SIGNATURE; - umcb->CBType = buffer ? USER_MARSHAL_CB_UNMARSHALL : USER_MARSHAL_CB_BUFFER_SIZE; -} - -static const char cf_marshaled[] = -{ - 0x9, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, - 0x9, 0x0, 0x0, 0x0, - 'M', 0x0, 'y', 0x0, - 'F', 0x0, 'o', 0x0, - 'r', 0x0, 'm', 0x0, - 'a', 0x0, 't', 0x0, - 0x0, 0x0 -}; - -static void test_marshal_CLIPFORMAT(void) -{ - USER_MARSHAL_CB umcb; - MIDL_STUB_MESSAGE stub_msg; - RPC_MESSAGE rpc_msg; - unsigned char *buffer; - ULONG i, size; - CLIPFORMAT cf = RegisterClipboardFormatA("MyFormat"); - CLIPFORMAT cf2; - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - size = CLIPFORMAT_UserSize(&umcb.Flags, 0, &cf); - ok(size == 8 + sizeof(cf_marshaled) || - broken(size == 12 + sizeof(cf_marshaled)) || /* win64 adds 4 extra (unused) bytes */ - broken(size == 8 + sizeof(cf_marshaled) - 2), /* win9x and winnt don't include the '\0' */ - "CLIPFORMAT: Wrong size %d\n", size); - - buffer = HeapAlloc(GetProcessHeap(), 0, size); - memset( buffer, 0xcc, size ); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - CLIPFORMAT_UserMarshal(&umcb.Flags, buffer, &cf); - ok(*(LONG *)(buffer + 0) == WDT_REMOTE_CALL, "CLIPFORMAT: Context should be WDT_REMOTE_CALL instead of 0x%08x\n", *(LONG *)(buffer + 0)); - ok(*(DWORD *)(buffer + 4) == cf, "CLIPFORMAT: Marshaled value should be 0x%04x instead of 0x%04x\n", cf, *(DWORD *)(buffer + 4)); - ok(!memcmp(buffer + 8, cf_marshaled, min( sizeof(cf_marshaled), size-8 )), "Marshaled data differs\n"); - if (size > sizeof(cf_marshaled) + 8) /* make sure the extra bytes are not used */ - for (i = sizeof(cf_marshaled) + 8; i < size; i++) - ok( buffer[i] == 0xcc, "buffer offset %u has been set to %x\n", i, buffer[i] ); - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - CLIPFORMAT_UserUnmarshal(&umcb.Flags, buffer, &cf2); - ok(cf == cf2, "CLIPFORMAT: Didn't unmarshal properly\n"); - HeapFree(GetProcessHeap(), 0, buffer); - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - CLIPFORMAT_UserFree(&umcb.Flags, &cf2); -} - -static void test_marshal_HWND(void) -{ - USER_MARSHAL_CB umcb; - MIDL_STUB_MESSAGE stub_msg; - RPC_MESSAGE rpc_msg; - unsigned char *buffer; - ULONG size; - HWND hwnd = GetDesktopWindow(); - HWND hwnd2; - wireHWND wirehwnd; - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_LOCAL); - size = HWND_UserSize(&umcb.Flags, 0, &hwnd); - ok(size == sizeof(*wirehwnd), "Wrong size %d\n", size); - - buffer = HeapAlloc(GetProcessHeap(), 0, size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_LOCAL); - HWND_UserMarshal(&umcb.Flags, buffer, &hwnd); - wirehwnd = (wireHWND)buffer; - ok(wirehwnd->fContext == WDT_INPROC_CALL, "Context should be WDT_INPROC_CALL instead of 0x%08x\n", wirehwnd->fContext); - ok(wirehwnd->u.hInproc == (LONG_PTR)hwnd, "Marshaled value should be %p instead of %x\n", hwnd, wirehwnd->u.hRemote); - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_LOCAL); - HWND_UserUnmarshal(&umcb.Flags, buffer, &hwnd2); - ok(hwnd == hwnd2, "Didn't unmarshal properly\n"); - HeapFree(GetProcessHeap(), 0, buffer); - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_LOCAL); - HWND_UserFree(&umcb.Flags, &hwnd2); -} - -static void test_marshal_HGLOBAL(void) -{ - USER_MARSHAL_CB umcb; - MIDL_STUB_MESSAGE stub_msg; - RPC_MESSAGE rpc_msg; - unsigned char *buffer; - ULONG size, block_size; - HGLOBAL hglobal; - HGLOBAL hglobal2; - unsigned char *wirehglobal; - int i; - - hglobal = NULL; - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_LOCAL); - size = HGLOBAL_UserSize(&umcb.Flags, 0, &hglobal); - /* native is poorly programmed and allocates 4/8 bytes more than it needs to - * here - Wine doesn't have to emulate that */ - ok((size == 8) || broken(size == 12) || broken(size == 16), "Size should be 8, instead of %d\n", size); - buffer = HeapAlloc(GetProcessHeap(), 0, size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_LOCAL); - HGLOBAL_UserMarshal(&umcb.Flags, buffer, &hglobal); - wirehglobal = buffer; - ok(*(ULONG *)wirehglobal == WDT_REMOTE_CALL, "Context should be WDT_REMOTE_CALL instead of 0x%08x\n", *(ULONG *)wirehglobal); - wirehglobal += sizeof(ULONG); - ok(*(ULONG *)wirehglobal == 0, "buffer+4 should be HGLOBAL\n"); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_LOCAL); - HGLOBAL_UserUnmarshal(&umcb.Flags, buffer, &hglobal2); - ok(hglobal2 == hglobal, "Didn't unmarshal properly\n"); - HeapFree(GetProcessHeap(), 0, buffer); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_LOCAL); - HGLOBAL_UserFree(&umcb.Flags, &hglobal2); - - - for(block_size = 0; block_size <= 17; block_size++) - { - ULONG actual_size, expected_size; - - hglobal = GlobalAlloc(0, block_size); - buffer = GlobalLock(hglobal); - for (i = 0; i < block_size; i++) - buffer[i] = i; - GlobalUnlock(hglobal); - actual_size = GlobalSize(hglobal); - expected_size = actual_size + 5 * sizeof(DWORD); - trace("%d: actual size %d\n", block_size, actual_size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_LOCAL); - size = HGLOBAL_UserSize(&umcb.Flags, 0, &hglobal); - /* native is poorly programmed and allocates 4/8 bytes more than it needs to - * here - Wine doesn't have to emulate that */ - ok(size == expected_size || - broken(size == expected_size + 4) || - broken(size == expected_size + 8), - "%d: got size %d\n", block_size, size); - buffer = HeapAlloc(GetProcessHeap(), 0, size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_LOCAL); - HGLOBAL_UserMarshal(&umcb.Flags, buffer, &hglobal); - wirehglobal = buffer; - ok(*(ULONG *)wirehglobal == WDT_REMOTE_CALL, "Context should be WDT_REMOTE_CALL instead of 0x%08x\n", *(ULONG *)wirehglobal); - wirehglobal += sizeof(ULONG); - ok(*(ULONG *)wirehglobal == (ULONG)(ULONG_PTR)hglobal, "buffer+0x4 should be HGLOBAL\n"); - wirehglobal += sizeof(ULONG); - ok(*(ULONG *)wirehglobal == actual_size, "%d: buffer+0x8 %08x\n", block_size, *(ULONG *)wirehglobal); - wirehglobal += sizeof(ULONG); - ok(*(ULONG *)wirehglobal == (ULONG)(ULONG_PTR)hglobal, "buffer+0xc should be HGLOBAL\n"); - wirehglobal += sizeof(ULONG); - ok(*(ULONG *)wirehglobal == actual_size, "%d: buffer+0x10 %08x\n", block_size, *(ULONG *)wirehglobal); - wirehglobal += sizeof(ULONG); - for (i = 0; i < block_size; i++) - ok(wirehglobal[i] == i, "buffer+0x%x should be %d\n", 0x10 + i, i); - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_LOCAL); - HGLOBAL_UserUnmarshal(&umcb.Flags, buffer, &hglobal2); - ok(hglobal2 != NULL, "Didn't unmarshal properly\n"); - HeapFree(GetProcessHeap(), 0, buffer); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_LOCAL); - HGLOBAL_UserFree(&umcb.Flags, &hglobal2); - GlobalFree(hglobal); - } -} - -static HENHMETAFILE create_emf(void) -{ - const RECT rect = {0, 0, 100, 100}; - HDC hdc = CreateEnhMetaFile(NULL, NULL, &rect, "HENHMETAFILE Marshaling Test\0Test\0\0"); - ExtTextOut(hdc, 0, 0, ETO_OPAQUE, &rect, "Test String", strlen("Test String"), NULL); - return CloseEnhMetaFile(hdc); -} - -static void test_marshal_HENHMETAFILE(void) -{ - USER_MARSHAL_CB umcb; - MIDL_STUB_MESSAGE stub_msg; - RPC_MESSAGE rpc_msg; - unsigned char *buffer; - ULONG size; - HENHMETAFILE hemf; - HENHMETAFILE hemf2 = NULL; - unsigned char *wirehemf; - - hemf = create_emf(); - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - size = HENHMETAFILE_UserSize(&umcb.Flags, 0, &hemf); - ok(size > 20, "size should be at least 20 bytes, not %d\n", size); - buffer = HeapAlloc(GetProcessHeap(), 0, size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - HENHMETAFILE_UserMarshal(&umcb.Flags, buffer, &hemf); - wirehemf = buffer; - ok(*(DWORD *)wirehemf == WDT_REMOTE_CALL, "wirestgm + 0x0 should be WDT_REMOTE_CALL instead of 0x%08x\n", *(DWORD *)wirehemf); - wirehemf += sizeof(DWORD); - ok(*(DWORD *)wirehemf == (DWORD)(DWORD_PTR)hemf, "wirestgm + 0x4 should be hemf instead of 0x%08x\n", *(DWORD *)wirehemf); - wirehemf += sizeof(DWORD); - ok(*(DWORD *)wirehemf == (size - 0x10), "wirestgm + 0x8 should be size - 0x10 instead of 0x%08x\n", *(DWORD *)wirehemf); - wirehemf += sizeof(DWORD); - ok(*(DWORD *)wirehemf == (size - 0x10), "wirestgm + 0xc should be size - 0x10 instead of 0x%08x\n", *(DWORD *)wirehemf); - wirehemf += sizeof(DWORD); - ok(*(DWORD *)wirehemf == EMR_HEADER, "wirestgm + 0x10 should be EMR_HEADER instead of %d\n", *(DWORD *)wirehemf); - wirehemf += sizeof(DWORD); - /* ... rest of data not tested - refer to tests for GetEnhMetaFileBits - * at this point */ - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - HENHMETAFILE_UserUnmarshal(&umcb.Flags, buffer, &hemf2); - ok(hemf2 != NULL, "HENHMETAFILE didn't unmarshal\n"); - HeapFree(GetProcessHeap(), 0, buffer); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - HENHMETAFILE_UserFree(&umcb.Flags, &hemf2); - DeleteEnhMetaFile(hemf); - - /* test NULL emf */ - hemf = NULL; - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - size = HENHMETAFILE_UserSize(&umcb.Flags, 0, &hemf); - ok(size == 8, "size should be 8 bytes, not %d\n", size); - buffer = HeapAlloc(GetProcessHeap(), 0, size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - HENHMETAFILE_UserMarshal(&umcb.Flags, buffer, &hemf); - wirehemf = buffer; - ok(*(DWORD *)wirehemf == WDT_REMOTE_CALL, "wirestgm + 0x0 should be WDT_REMOTE_CALL instead of 0x%08x\n", *(DWORD *)wirehemf); - wirehemf += sizeof(DWORD); - ok(*(DWORD *)wirehemf == (DWORD)(DWORD_PTR)hemf, "wirestgm + 0x4 should be hemf instead of 0x%08x\n", *(DWORD *)wirehemf); - wirehemf += sizeof(DWORD); - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - HENHMETAFILE_UserUnmarshal(&umcb.Flags, buffer, &hemf2); - ok(hemf2 == NULL, "NULL HENHMETAFILE didn't unmarshal\n"); - HeapFree(GetProcessHeap(), 0, buffer); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - HENHMETAFILE_UserFree(&umcb.Flags, &hemf2); -} - -static HMETAFILE create_mf(void) -{ - RECT rect = {0, 0, 100, 100}; - HDC hdc = CreateMetaFile(NULL); - ExtTextOut(hdc, 0, 0, ETO_OPAQUE, &rect, "Test String", strlen("Test String"), NULL); - return CloseMetaFile(hdc); -} - -static void test_marshal_HMETAFILE(void) -{ - USER_MARSHAL_CB umcb; - MIDL_STUB_MESSAGE stub_msg; - RPC_MESSAGE rpc_msg; - unsigned char *buffer; - ULONG size; - HMETAFILE hmf; - HMETAFILE hmf2 = NULL; - unsigned char *wirehmf; - - hmf = create_mf(); - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - size = HMETAFILE_UserSize(&umcb.Flags, 0, &hmf); - ok(size > 20, "size should be at least 20 bytes, not %d\n", size); - buffer = HeapAlloc(GetProcessHeap(), 0, size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - HMETAFILE_UserMarshal(&umcb.Flags, buffer, &hmf); - wirehmf = buffer; - ok(*(DWORD *)wirehmf == WDT_REMOTE_CALL, "wirestgm + 0x0 should be WDT_REMOTE_CALL instead of 0x%08x\n", *(DWORD *)wirehmf); - wirehmf += sizeof(DWORD); - ok(*(DWORD *)wirehmf == (DWORD)(DWORD_PTR)hmf, "wirestgm + 0x4 should be hmf instead of 0x%08x\n", *(DWORD *)wirehmf); - wirehmf += sizeof(DWORD); - ok(*(DWORD *)wirehmf == (size - 0x10), "wirestgm + 0x8 should be size - 0x10 instead of 0x%08x\n", *(DWORD *)wirehmf); - wirehmf += sizeof(DWORD); - ok(*(DWORD *)wirehmf == (size - 0x10), "wirestgm + 0xc should be size - 0x10 instead of 0x%08x\n", *(DWORD *)wirehmf); - wirehmf += sizeof(DWORD); - ok(*(WORD *)wirehmf == 1, "wirestgm + 0x10 should be 1 instead of 0x%08x\n", *(DWORD *)wirehmf); - wirehmf += sizeof(DWORD); - /* ... rest of data not tested - refer to tests for GetMetaFileBits - * at this point */ - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - HMETAFILE_UserUnmarshal(&umcb.Flags, buffer, &hmf2); - ok(hmf2 != NULL, "HMETAFILE didn't unmarshal\n"); - HeapFree(GetProcessHeap(), 0, buffer); - HMETAFILE_UserFree(&umcb.Flags, &hmf2); - DeleteMetaFile(hmf); - - /* test NULL emf */ - hmf = NULL; - - size = HMETAFILE_UserSize(&umcb.Flags, 0, &hmf); - ok(size == 8, "size should be 8 bytes, not %d\n", size); - buffer = HeapAlloc(GetProcessHeap(), 0, size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - HMETAFILE_UserMarshal(&umcb.Flags, buffer, &hmf); - wirehmf = buffer; - ok(*(DWORD *)wirehmf == WDT_REMOTE_CALL, "wirestgm + 0x0 should be WDT_REMOTE_CALL instead of 0x%08x\n", *(DWORD *)wirehmf); - wirehmf += sizeof(DWORD); - ok(*(DWORD *)wirehmf == (DWORD)(DWORD_PTR)hmf, "wirestgm + 0x4 should be hmf instead of 0x%08x\n", *(DWORD *)wirehmf); - wirehmf += sizeof(DWORD); - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - HMETAFILE_UserUnmarshal(&umcb.Flags, buffer, &hmf2); - ok(hmf2 == NULL, "NULL HMETAFILE didn't unmarshal\n"); - HeapFree(GetProcessHeap(), 0, buffer); - HMETAFILE_UserFree(&umcb.Flags, &hmf2); -} - -#define USER_MARSHAL_PTR_PREFIX \ - ( (DWORD)'U' | ( (DWORD)'s' << 8 ) | \ - ( (DWORD)'e' << 16 ) | ( (DWORD)'r' << 24 ) ) - -static void test_marshal_HMETAFILEPICT(void) -{ - USER_MARSHAL_CB umcb; - MIDL_STUB_MESSAGE stub_msg; - RPC_MESSAGE rpc_msg; - unsigned char *buffer, *buffer_end; - ULONG size; - HMETAFILEPICT hmfp; - HMETAFILEPICT hmfp2 = NULL; - METAFILEPICT *pmfp; - unsigned char *wirehmfp; - - hmfp = GlobalAlloc(GMEM_MOVEABLE, sizeof(*pmfp)); - pmfp = GlobalLock(hmfp); - pmfp->mm = MM_ISOTROPIC; - pmfp->xExt = 1; - pmfp->yExt = 2; - pmfp->hMF = create_mf(); - GlobalUnlock(hmfp); - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - size = HMETAFILEPICT_UserSize(&umcb.Flags, 0, &hmfp); - ok(size > 20, "size should be at least 20 bytes, not %d\n", size); - trace("size is %d\n", size); - buffer = HeapAlloc(GetProcessHeap(), 0, size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - buffer_end = HMETAFILEPICT_UserMarshal(&umcb.Flags, buffer, &hmfp); - wirehmfp = buffer; - ok(*(DWORD *)wirehmfp == WDT_REMOTE_CALL, "wirestgm + 0x0 should be WDT_REMOTE_CALL instead of 0x%08x\n", *(DWORD *)wirehmfp); - wirehmfp += sizeof(DWORD); - ok(*(DWORD *)wirehmfp == (DWORD)(DWORD_PTR)hmfp, "wirestgm + 0x4 should be hmf instead of 0x%08x\n", *(DWORD *)wirehmfp); - wirehmfp += sizeof(DWORD); - ok(*(DWORD *)wirehmfp == MM_ISOTROPIC, "wirestgm + 0x8 should be MM_ISOTROPIC instead of 0x%08x\n", *(DWORD *)wirehmfp); - wirehmfp += sizeof(DWORD); - ok(*(DWORD *)wirehmfp == 1, "wirestgm + 0xc should be 1 instead of 0x%08x\n", *(DWORD *)wirehmfp); - wirehmfp += sizeof(DWORD); - ok(*(DWORD *)wirehmfp == 2, "wirestgm + 0x10 should be 2 instead of 0x%08x\n", *(DWORD *)wirehmfp); - wirehmfp += sizeof(DWORD); - ok(*(DWORD *)wirehmfp == USER_MARSHAL_PTR_PREFIX, "wirestgm + 0x14 should be \"User\" instead of 0x%08x\n", *(DWORD *)wirehmfp); - wirehmfp += sizeof(DWORD); - ok(*(DWORD *)wirehmfp == WDT_REMOTE_CALL, "wirestgm + 0x18 should be WDT_REMOTE_CALL instead of 0x%08x\n", *(DWORD *)wirehmfp); - wirehmfp += sizeof(DWORD); - pmfp = GlobalLock(hmfp); - ok(*(DWORD *)wirehmfp == (DWORD)(DWORD_PTR)pmfp->hMF, "wirestgm + 0x1c should be pmfp->hMF instead of 0x%08x\n", *(DWORD *)wirehmfp); - GlobalUnlock(hmfp); - wirehmfp += sizeof(DWORD); - /* Note use (buffer_end - buffer) instead of size here, because size is an - * overestimate with native */ - ok(*(DWORD *)wirehmfp == (buffer_end - buffer - 0x28), "wirestgm + 0x20 should be size - 0x34 instead of 0x%08x\n", *(DWORD *)wirehmfp); - wirehmfp += sizeof(DWORD); - ok(*(DWORD *)wirehmfp == (buffer_end - buffer - 0x28), "wirestgm + 0x24 should be size - 0x34 instead of 0x%08x\n", *(DWORD *)wirehmfp); - wirehmfp += sizeof(DWORD); - ok(*(WORD *)wirehmfp == 1, "wirehmfp + 0x28 should be 1 instead of 0x%08x\n", *(DWORD *)wirehmfp); - wirehmfp += sizeof(DWORD); - /* ... rest of data not tested - refer to tests for GetMetaFileBits - * at this point */ - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - HMETAFILEPICT_UserUnmarshal(&umcb.Flags, buffer, &hmfp2); - ok(hmfp2 != NULL, "HMETAFILEPICT didn't unmarshal\n"); - HeapFree(GetProcessHeap(), 0, buffer); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - HMETAFILEPICT_UserFree(&umcb.Flags, &hmfp2); - pmfp = GlobalLock(hmfp); - DeleteMetaFile(pmfp->hMF); - GlobalUnlock(hmfp); - GlobalFree(hmfp); - - /* test NULL emf */ - hmfp = NULL; - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - size = HMETAFILEPICT_UserSize(&umcb.Flags, 0, &hmfp); - ok(size == 8, "size should be 8 bytes, not %d\n", size); - buffer = HeapAlloc(GetProcessHeap(), 0, size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - HMETAFILEPICT_UserMarshal(&umcb.Flags, buffer, &hmfp); - wirehmfp = buffer; - ok(*(DWORD *)wirehmfp == WDT_REMOTE_CALL, "wirestgm + 0x0 should be WDT_REMOTE_CALL instead of 0x%08x\n", *(DWORD *)wirehmfp); - wirehmfp += sizeof(DWORD); - ok(*(DWORD *)wirehmfp == (DWORD)(DWORD_PTR)hmfp, "wirestgm + 0x4 should be hmf instead of 0x%08x\n", *(DWORD *)wirehmfp); - wirehmfp += sizeof(DWORD); - - hmfp2 = NULL; - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - HMETAFILEPICT_UserUnmarshal(&umcb.Flags, buffer, &hmfp2); - ok(hmfp2 == NULL, "NULL HMETAFILE didn't unmarshal\n"); - HeapFree(GetProcessHeap(), 0, buffer); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - HMETAFILEPICT_UserFree(&umcb.Flags, &hmfp2); -} - -static HRESULT WINAPI Test_IUnknown_QueryInterface( - LPUNKNOWN iface, - REFIID riid, - LPVOID *ppvObj) -{ - if (ppvObj == NULL) return E_POINTER; - - if (IsEqualGUID(riid, &IID_IUnknown)) - { - *ppvObj = iface; - IUnknown_AddRef(iface); - return S_OK; - } - - *ppvObj = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI Test_IUnknown_AddRef(LPUNKNOWN iface) -{ - return 2; /* non-heap-based object */ -} - -static ULONG WINAPI Test_IUnknown_Release(LPUNKNOWN iface) -{ - return 1; /* non-heap-based object */ -} - -static const IUnknownVtbl TestUnknown_Vtbl = -{ - Test_IUnknown_QueryInterface, - Test_IUnknown_AddRef, - Test_IUnknown_Release, -}; - -static HRESULT WINAPI Test_IStream_QueryInterface(IStream *iface, - REFIID riid, LPVOID *ppvObj) -{ - if (ppvObj == NULL) return E_POINTER; - - if (IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IStream)) - { - *ppvObj = iface; - IStream_AddRef(iface); - return S_OK; - } - - *ppvObj = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI Test_IStream_AddRef(IStream *iface) -{ - return 2; /* non-heap-based object */ -} - -static ULONG WINAPI Test_IStream_Release(IStream *iface) -{ - return 1; /* non-heap-based object */ -} - -static const IStreamVtbl TestStream_Vtbl = -{ - Test_IStream_QueryInterface, - Test_IStream_AddRef, - Test_IStream_Release - /* the rest can be NULLs */ -}; - -static IUnknown Test_Unknown = { &TestUnknown_Vtbl }; -static IStream Test_Stream = { &TestStream_Vtbl }; - -ULONG __RPC_USER WdtpInterfacePointer_UserSize(ULONG *, ULONG, ULONG, IUnknown *, REFIID); -unsigned char * __RPC_USER WdtpInterfacePointer_UserMarshal(ULONG *, ULONG, unsigned char *, IUnknown *, REFIID); -unsigned char * __RPC_USER WdtpInterfacePointer_UserUnmarshal(ULONG *, unsigned char *, IUnknown **, REFIID); -void __RPC_USER WdtpInterfacePointer_UserFree(IUnknown *); - -static void marshal_WdtpInterfacePointer(DWORD umcb_ctx, DWORD ctx) -{ - USER_MARSHAL_CB umcb; - MIDL_STUB_MESSAGE stub_msg; - RPC_MESSAGE rpc_msg; - unsigned char *buffer, *buffer_end; - ULONG size; - IUnknown *unk; - IUnknown *unk2; - unsigned char *wireip; - HGLOBAL h = GlobalAlloc(GMEM_MOVEABLE, 0); - IStream *stm; - void *marshal_data; - LARGE_INTEGER zero; - ULARGE_INTEGER pos; - DWORD marshal_size; - - /* shows that the WdtpInterfacePointer functions don't marshal anything for - * NULL pointers, so code using these functions must handle that case - * itself */ - - unk = NULL; - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, umcb_ctx); - size = WdtpInterfacePointer_UserSize(&umcb.Flags, ctx, 0, unk, &IID_IUnknown); - ok(size == 0, "size should be 0 bytes, not %d\n", size); - buffer = HeapAlloc(GetProcessHeap(), 0, size); - buffer_end = WdtpInterfacePointer_UserMarshal(&umcb.Flags, ctx, buffer, unk, &IID_IUnknown); - wireip = buffer; - HeapFree(GetProcessHeap(), 0, buffer); - - /* Now for a non-NULL pointer. The marshalled data are two size DWORDS and then - the result of CoMarshalInterface called with the LOWORD of the ctx */ - - unk = &Test_Unknown; - - CreateStreamOnHGlobal(h, TRUE, &stm); - CoMarshalInterface(stm, &IID_IUnknown, unk, LOWORD(ctx), NULL, MSHLFLAGS_NORMAL); - zero.QuadPart = 0; - IStream_Seek(stm, zero, STREAM_SEEK_CUR, &pos); - marshal_size = pos.u.LowPart; - marshal_data = GlobalLock(h); - trace("marshal_size %x\n", marshal_size); - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, umcb_ctx); - size = WdtpInterfacePointer_UserSize(&umcb.Flags, ctx, 0, unk, &IID_IUnknown); - ok(size >= marshal_size + 2 * sizeof(DWORD), "marshal size %x got %x\n", marshal_size, size); - trace("WdtpInterfacePointer_UserSize returned %x\n", size); - buffer = HeapAlloc(GetProcessHeap(), 0, size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, umcb_ctx); - buffer_end = WdtpInterfacePointer_UserMarshal(&umcb.Flags, ctx, buffer, unk, &IID_IUnknown); - wireip = buffer; - - ok(buffer_end == buffer + marshal_size + 2 * sizeof(DWORD), "buffer_end %p buffer %p\n", buffer_end, buffer); - - ok(*(DWORD *)wireip == marshal_size, "wireip + 0x0 should be %x instead of %x\n", marshal_size, *(DWORD *)wireip); - wireip += sizeof(DWORD); - ok(*(DWORD *)wireip == marshal_size, "wireip + 0x4 should be %x instead of %x\n", marshal_size, *(DWORD *)wireip); - wireip += sizeof(DWORD); - - ok(!memcmp(marshal_data, wireip, marshal_size), "buffer mismatch\n"); - GlobalUnlock(h); - zero.QuadPart = 0; - IStream_Seek(stm, zero, STREAM_SEEK_SET, NULL); - CoReleaseMarshalData(stm); - IStream_Release(stm); - - unk2 = NULL; - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, umcb_ctx); - WdtpInterfacePointer_UserUnmarshal(&umcb.Flags, buffer, &unk2, &IID_IUnknown); - ok(unk2 != NULL, "IUnknown object didn't unmarshal properly\n"); - HeapFree(GetProcessHeap(), 0, buffer); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_INPROC); - WdtpInterfacePointer_UserFree(unk2); -} - -static void test_marshal_WdtpInterfacePointer(void) -{ - /* - * There are two places where we can pass the marshalling ctx: as - * part of the umcb and as a separate flag. The loword of that - * separate flag field is what matters. - */ - - /* All three are marshalled as inproc */ - marshal_WdtpInterfacePointer(MSHCTX_INPROC, MSHCTX_INPROC); - marshal_WdtpInterfacePointer(MSHCTX_DIFFERENTMACHINE, MSHCTX_INPROC); - marshal_WdtpInterfacePointer(MSHCTX_INPROC, MAKELONG(MSHCTX_INPROC, 0xffff)); - - /* All three are marshalled as remote */ - marshal_WdtpInterfacePointer(MSHCTX_INPROC, MSHCTX_DIFFERENTMACHINE); - marshal_WdtpInterfacePointer(MSHCTX_DIFFERENTMACHINE, MSHCTX_DIFFERENTMACHINE); - marshal_WdtpInterfacePointer(MSHCTX_INPROC, MAKELONG(MSHCTX_DIFFERENTMACHINE, 0xffff)); -} - -static void test_marshal_STGMEDIUM(void) -{ - USER_MARSHAL_CB umcb; - MIDL_STUB_MESSAGE stub_msg; - RPC_MESSAGE rpc_msg; - unsigned char *buffer, *buffer_end, *expect_buffer, *expect_buffer_end; - ULONG size, expect_size; - STGMEDIUM med, med2; - IUnknown *unk = &Test_Unknown; - IStream *stm = &Test_Stream; - - /* TYMED_NULL with pUnkForRelease */ - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - expect_size = WdtpInterfacePointer_UserSize(&umcb.Flags, umcb.Flags, 2 * sizeof(DWORD), unk, &IID_IUnknown); - expect_buffer = HeapAlloc(GetProcessHeap(), 0, expect_size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, expect_buffer, expect_size, MSHCTX_DIFFERENTMACHINE); - expect_buffer_end = WdtpInterfacePointer_UserMarshal(&umcb.Flags, umcb.Flags, expect_buffer + 2 * sizeof(DWORD), unk, &IID_IUnknown); - - med.tymed = TYMED_NULL; - U(med).pstg = NULL; - med.pUnkForRelease = unk; - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - size = STGMEDIUM_UserSize(&umcb.Flags, 0, &med); - ok(size == expect_size, "size %d should be %d bytes\n", size, expect_size); - - buffer = HeapAlloc(GetProcessHeap(), 0, size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - buffer_end = STGMEDIUM_UserMarshal(&umcb.Flags, buffer, &med); - ok(buffer_end - buffer == expect_buffer_end - expect_buffer, "buffer size mismatch\n"); - ok(*(DWORD*)buffer == TYMED_NULL, "got %08x\n", *(DWORD*)buffer); - ok(*((DWORD*)buffer+1) != 0, "got %08x\n", *((DWORD*)buffer+1)); - ok(!memcmp(buffer+8, expect_buffer + 8, expect_buffer_end - expect_buffer - 8), "buffer mismatch\n"); - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - - /* native crashes if this is uninitialised, presumably because it - tries to release it */ - med2.tymed = TYMED_NULL; - U(med2).pstm = NULL; - med2.pUnkForRelease = NULL; - - STGMEDIUM_UserUnmarshal(&umcb.Flags, buffer, &med2); - - ok(med2.tymed == TYMED_NULL, "got tymed %x\n", med2.tymed); - ok(med2.pUnkForRelease != NULL, "Incorrectly unmarshalled\n"); - - HeapFree(GetProcessHeap(), 0, buffer); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - STGMEDIUM_UserFree(&umcb.Flags, &med2); - - HeapFree(GetProcessHeap(), 0, expect_buffer); - - /* TYMED_ISTREAM with pUnkForRelease */ - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - expect_size = WdtpInterfacePointer_UserSize(&umcb.Flags, umcb.Flags, 3 * sizeof(DWORD), (IUnknown*)stm, &IID_IStream); - expect_size = WdtpInterfacePointer_UserSize(&umcb.Flags, umcb.Flags, expect_size, unk, &IID_IUnknown); - - expect_buffer = HeapAlloc(GetProcessHeap(), 0, expect_size); - /* There may be a hole between the two interfaces so init the buffer to something */ - memset(expect_buffer, 0xcc, expect_size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, expect_buffer, expect_size, MSHCTX_DIFFERENTMACHINE); - expect_buffer_end = WdtpInterfacePointer_UserMarshal(&umcb.Flags, umcb.Flags, expect_buffer + 3 * sizeof(DWORD), (IUnknown*)stm, &IID_IStream); - expect_buffer_end = WdtpInterfacePointer_UserMarshal(&umcb.Flags, umcb.Flags, expect_buffer_end, unk, &IID_IUnknown); - - med.tymed = TYMED_ISTREAM; - U(med).pstm = stm; - med.pUnkForRelease = unk; - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - size = STGMEDIUM_UserSize(&umcb.Flags, 0, &med); - ok(size == expect_size, "size %d should be %d bytes\n", size, expect_size); - - buffer = HeapAlloc(GetProcessHeap(), 0, size); - memset(buffer, 0xcc, size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - buffer_end = STGMEDIUM_UserMarshal(&umcb.Flags, buffer, &med); - ok(buffer_end - buffer == expect_buffer_end - expect_buffer, "buffer size mismatch\n"); - ok(*(DWORD*)buffer == TYMED_ISTREAM, "got %08x\n", *(DWORD*)buffer); - ok(*((DWORD*)buffer+1) != 0, "got %08x\n", *((DWORD*)buffer+1)); - ok(*((DWORD*)buffer+2) != 0, "got %08x\n", *((DWORD*)buffer+2)); - ok(!memcmp(buffer + 12, expect_buffer + 12, (buffer_end - buffer) - 12), "buffer mismatch\n"); - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - - /* native crashes if this is uninitialised, presumably because it - tries to release it */ - med2.tymed = TYMED_NULL; - U(med2).pstm = NULL; - med2.pUnkForRelease = NULL; - - STGMEDIUM_UserUnmarshal(&umcb.Flags, buffer, &med2); - - ok(med2.tymed == TYMED_ISTREAM, "got tymed %x\n", med2.tymed); - ok(U(med2).pstm != NULL, "Incorrectly unmarshalled\n"); - ok(med2.pUnkForRelease != NULL, "Incorrectly unmarshalled\n"); - - HeapFree(GetProcessHeap(), 0, buffer); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - STGMEDIUM_UserFree(&umcb.Flags, &med2); - - HeapFree(GetProcessHeap(), 0, expect_buffer); -} - -START_TEST(usrmarshal) -{ - CoInitialize(NULL); - - test_marshal_CLIPFORMAT(); - test_marshal_HWND(); - test_marshal_HGLOBAL(); - test_marshal_HENHMETAFILE(); - test_marshal_HMETAFILE(); - test_marshal_HMETAFILEPICT(); - test_marshal_WdtpInterfacePointer(); - test_marshal_STGMEDIUM(); - - CoUninitialize(); -} diff --git a/rostests/winetests/oleacc/CMakeLists.txt b/rostests/winetests/oleacc/CMakeLists.txt deleted file mode 100644 index 88883c1b2df..00000000000 --- a/rostests/winetests/oleacc/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(oleacc_winetest main.c testlist.c) -target_link_libraries(oleacc_winetest wine) -set_module_type(oleacc_winetest win32cui) -add_importlibs(oleacc_winetest oleacc msvcrt kernel32 ntdll) -add_cd_file(TARGET oleacc_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/oleacc/main.c b/rostests/winetests/oleacc/main.c deleted file mode 100644 index db7ee9e5dfb..00000000000 --- a/rostests/winetests/oleacc/main.c +++ /dev/null @@ -1,141 +0,0 @@ -/* - * oleacc tests - * - * Copyright 2008 Nikolay Sivov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include -#include "wine/test.h" - -static void test_getroletext(void) -{ - INT ret, role; - CHAR buf[2], *buff; - WCHAR bufW[2], *buffW; - - /* wrong role number */ - ret = GetRoleTextA(-1, NULL, 0); - ok(ret == 0, "GetRoleTextA doesn't return zero on wrong role number, got %d\n", ret); - buf[0] = '*'; - ret = GetRoleTextA(-1, buf, 2); - ok(ret == 0, "GetRoleTextA doesn't return zero on wrong role number, got %d\n", ret); - ok(buf[0] == '*' || - broken(buf[0] == 0), /* Win98 and WinMe */ - "GetRoleTextA modified buffer on wrong role number\n"); - buf[0] = '*'; - ret = GetRoleTextA(-1, buf, 0); - ok(ret == 0, "GetRoleTextA doesn't return zero on wrong role number, got %d\n", ret); - ok(buf[0] == '*', "GetRoleTextA modified buffer on wrong role number\n"); - - ret = GetRoleTextW(-1, NULL, 0); - ok(ret == 0, "GetRoleTextW doesn't return zero on wrong role number, got %d\n", ret); - bufW[0] = '*'; - ret = GetRoleTextW(-1, bufW, 2); - ok(ret == 0, "GetRoleTextW doesn't return zero on wrong role number, got %d\n", ret); - ok(bufW[0] == '\0' || - broken(bufW[0] == '*'), /* Win98 and WinMe */ - "GetRoleTextW doesn't return NULL char on wrong role number\n"); - bufW[0] = '*'; - ret = GetRoleTextW(-1, bufW, 0); - ok(ret == 0, "GetRoleTextW doesn't return zero on wrong role number, got %d\n", ret); - - /* zero role number - not documented */ - ret = GetRoleTextA(0, NULL, 0); - ok(ret > 0, "GetRoleTextA doesn't return (>0) for zero role number, got %d\n", ret); - ret = GetRoleTextW(0, NULL, 0); - ok(ret > 0, "GetRoleTextW doesn't return (>0) for zero role number, got %d\n", ret); - - /* NULL buffer, return length */ - ret = GetRoleTextA(ROLE_SYSTEM_TITLEBAR, NULL, 0); - ok(ret > 0, "GetRoleTextA doesn't return length on NULL buffer, got %d\n", ret); - ret = GetRoleTextA(ROLE_SYSTEM_TITLEBAR, NULL, 1); - ok(ret > 0, "GetRoleTextA doesn't return length on NULL buffer, got %d\n", ret); - ret = GetRoleTextW(ROLE_SYSTEM_TITLEBAR, NULL, 0); - ok(ret > 0, "GetRoleTextW doesn't return length on NULL buffer, got %d\n", ret); - ret = GetRoleTextW(ROLE_SYSTEM_TITLEBAR, NULL, 1); - ok(ret > 0, "GetRoleTextW doesn't return length on NULL buffer, got %d\n", ret); - - /* use a smaller buffer */ - buf[0] = '*'; - ret = GetRoleTextA(ROLE_SYSTEM_TITLEBAR, buf, 1); - ok(ret == 0, "GetRoleTextA returned wrong length\n"); - ok(buf[0] == '\0', "GetRoleTextA returned not zero-length buffer\n"); - buf[1] = '*'; - ret = GetRoleTextA(ROLE_SYSTEM_TITLEBAR, buf, 2); - ok(ret == 1 || - ret == 0, /* Vista and W2K8 */ - "GetRoleTextA returned wrong length, got %d, expected 0 or 1\n", ret); - if (ret == 1) - ok(buf[1] == '\0', "GetRoleTextA returned not zero-length buffer : (%c)\n", buf[1]); - - bufW[0] = '*'; - ret = GetRoleTextW(ROLE_SYSTEM_TITLEBAR, bufW, 1); - ok(ret == 0, "GetRoleTextW returned wrong length, got %d, expected 1\n", ret); - ok(bufW[0] == '\0', "GetRoleTextW returned not zero-length buffer\n"); - bufW[1] = '*'; - ret = GetRoleTextW(ROLE_SYSTEM_TITLEBAR, bufW, 2); - ok(ret == 1, "GetRoleTextW returned wrong length, got %d, expected 1\n", ret); - ok(bufW[1] == '\0', "GetRoleTextW returned not zero-length buffer\n"); - - /* use bigger buffer */ - ret = GetRoleTextA(ROLE_SYSTEM_TITLEBAR, NULL, 0); - buff = HeapAlloc(GetProcessHeap(), 0, 2*ret); - buff[2*ret-1] = '*'; - ret = GetRoleTextA(ROLE_SYSTEM_TITLEBAR, buff, 2*ret); - ok(buff[2*ret-1] == '*', "GetRoleTextA shouldn't modify this part of buffer\n"); - HeapFree(GetProcessHeap(), 0, buff); - - ret = GetRoleTextW(ROLE_SYSTEM_TITLEBAR, NULL, 0); - buffW = HeapAlloc(GetProcessHeap(), 0, 2*ret*sizeof(WCHAR)); - buffW[2*ret-1] = '*'; - ret = GetRoleTextW(ROLE_SYSTEM_TITLEBAR, buffW, 2*ret); - ok(buffW[2*ret-1] == '*', "GetRoleTextW shouldn't modify this part of buffer\n"); - HeapFree(GetProcessHeap(), 0, buffW); - - /* check returned length for all roles */ - for(role = 0; role <= ROLE_SYSTEM_OUTLINEBUTTON; role++){ - CHAR buff2[100]; - WCHAR buff2W[100]; - - /* NT4 and W2K don't clear the buffer on a nonexistent role in the A-call */ - memset(buff2, 0, sizeof(buff2)); - - ret = GetRoleTextA(role, NULL, 0); - /* Win98 up to W2K miss some of the roles */ - if (role >= ROLE_SYSTEM_SPLITBUTTON) - ok(ret > 0 || broken(ret == 0), "Expected the role %d to be present\n", role); - else - ok(ret > 0, "Expected the role to be present\n"); - - GetRoleTextA(role, buff2, sizeof(buff2)); - ok(ret == lstrlenA(buff2), - "GetRoleTextA: returned length doesn't match returned buffer for role %d\n", role); - - /* Win98 and WinMe don't clear the buffer on a nonexistent role in the W-call */ - memset(buff2W, 0, sizeof(buff2W)); - - ret = GetRoleTextW(role, NULL, 0); - GetRoleTextW(role, buff2W, sizeof(buff2W)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff2W), - "GetRoleTextW: returned length doesn't match returned buffer for role %d\n", role); - } -} - -START_TEST(main) -{ - test_getroletext(); -} diff --git a/rostests/winetests/oleacc/oleacc.rbuild b/rostests/winetests/oleacc/oleacc.rbuild deleted file mode 100644 index 4a67b292704..00000000000 --- a/rostests/winetests/oleacc/oleacc.rbuild +++ /dev/null @@ -1,9 +0,0 @@ - - . - - main.c - testlist.c - wine - oleacc - ntdll - diff --git a/rostests/winetests/oleacc/testlist.c b/rostests/winetests/oleacc/testlist.c deleted file mode 100644 index 6f0c3974819..00000000000 --- a/rostests/winetests/oleacc/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_main(void); - -const struct test winetest_testlist[] = -{ - { "main", func_main }, - { 0, 0 } -}; diff --git a/rostests/winetests/oleaut32/CMakeLists.txt b/rostests/winetests/oleaut32/CMakeLists.txt deleted file mode 100644 index 2295119d87f..00000000000 --- a/rostests/winetests/oleaut32/CMakeLists.txt +++ /dev/null @@ -1,34 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) - -add_typelib(oleaut32_typelibs test_reg.idl test_tlb.idl tmarshal.idl) -add_dependencies(oleaut32_typelibs stdole2) - -add_idl_Headers(oleaut32_idlheaders test_reg.idl tmarshal.idl) -generate_idl_iids(tmarshal.idl) - -list(APPEND SOURCE - dispatch.c - olefont.c - olepicture.c - safearray.c - testlist.c - tmarshal.c - tmarshal.rc - typelib.c - usrmarshal.c - varformat.c - vartest.c - vartype.c - ${CMAKE_CURRENT_BINARY_DIR}/tmarshal_i.c) - -add_executable(oleaut32_winetest ${SOURCE}) -target_link_libraries(oleaut32_winetest uuid wine) -set_module_type(oleaut32_winetest win32cui) -add_importlibs(oleaut32_winetest oleaut32 ole32 rpcrt4 user32 gdi32 advapi32 msvcrt kernel32 ntdll) -add_dependencies(oleaut32_winetest oleaut32_typelibs oleaut32_idlheaders) -add_cd_file(TARGET oleaut32_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/oleaut32/dispatch.c b/rostests/winetests/oleaut32/dispatch.c deleted file mode 100644 index 0f52241f996..00000000000 --- a/rostests/winetests/oleaut32/dispatch.c +++ /dev/null @@ -1,273 +0,0 @@ -/* - * Dispatch test - * - * Copyright 2009 James Hawkins - * - * 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 - -static const WCHAR szSunshine[] = {'S','u','n','s','h','i','n','e',0}; - -/* Temporary storage for ok_bstr. */ -static CHAR temp_str[MAX_PATH]; - -#define ok_bstr(bstr, expected, format) \ - do { \ - WideCharToMultiByte(CP_ACP, 0, bstr, -1, temp_str, MAX_PATH, NULL, NULL); \ - if (lstrcmpA(temp_str, expected) != 0) \ - ok(0, format, expected, temp_str); \ - } while(0); - -#define INIT_DISPPARAMS(dp, args, named_args, num_args, num_named_args) \ - dp.rgvarg = args; \ - dp.rgdispidNamedArgs = named_args; \ - dp.cArgs = num_args; \ - dp.cNamedArgs = num_named_args; \ - -/* Initializes vararg with three values: - * VT_I2 - 42 - * VT_I4 - 1234567890 - * VT_BSTR - "Sunshine" - */ -#define INIT_VARARG(vararg) \ - VariantInit(&vararg[0]); \ - V_VT(&vararg[0]) = VT_I2; \ - V_I2(&vararg[0]) = 42; \ - VariantInit(&vararg[1]); \ - V_VT(&vararg[1]) = VT_I4; \ - V_I4(&vararg[1]) = 1234567890; \ - VariantInit(&vararg[2]); \ - V_VT(&vararg[2]) = VT_BSTR; \ - V_BSTR(&vararg[2]) = SysAllocString(szSunshine); - -/* Clears the vararg. */ -#define CLEAR_VARARG(vararg) \ - VariantClear(&vararg[0]); \ - VariantClear(&vararg[1]); \ - VariantClear(&vararg[2]); - -static void test_DispGetParam(void) -{ - HRESULT hr; - DISPPARAMS dispparams; - VARIANTARG vararg[3]; - VARIANT result; - unsigned int err_index; - - VariantInit(&result); - - /* DispGetParam crashes on Windows if pdispparams is NULL. */ - - /* pdispparams has zero parameters. */ - INIT_DISPPARAMS(dispparams, NULL, NULL, 0, 0); - VariantInit(&result); - err_index = 0xdeadbeef; - hr = DispGetParam(&dispparams, 0, VT_I2, &result, &err_index); - ok(hr == DISP_E_PARAMNOTFOUND, - "Expected DISP_E_PARAMNOTFOUND, got %08x\n", hr); - ok(V_VT(&result) == VT_EMPTY, - "Expected VT_EMPTY, got %08x\n", V_VT(&result)); - ok(err_index == 0xdeadbeef, - "Expected err_index to be unchanged, got %d\n", err_index); - - /* pdispparams has zero parameters, position is invalid. */ - INIT_DISPPARAMS(dispparams, NULL, NULL, 0, 0); - VariantInit(&result); - err_index = 0xdeadbeef; - hr = DispGetParam(&dispparams, 1, VT_I2, &result, &err_index); - ok(hr == DISP_E_PARAMNOTFOUND, - "Expected DISP_E_PARAMNOTFOUND, got %08x\n", hr); - ok(V_VT(&result) == VT_EMPTY, - "Expected VT_EMPTY, got %08x\n", V_VT(&result)); - ok(err_index == 0xdeadbeef, - "Expected err_index to be unchanged, got %d\n", err_index); - - /* pdispparams has zero parameters, pvarResult is NULL. */ - INIT_DISPPARAMS(dispparams, NULL, NULL, 0, 0); - err_index = 0xdeadbeef; - hr = DispGetParam(&dispparams, 0, VT_I2, NULL, &err_index); - ok(hr == DISP_E_PARAMNOTFOUND, - "Expected DISP_E_PARAMNOTFOUND, got %08x\n", hr); - ok(err_index == 0xdeadbeef, - "Expected err_index to be unchanged, got %d\n", err_index); - - /* pdispparams has zero parameters, puArgErr is NULL. */ - INIT_DISPPARAMS(dispparams, NULL, NULL, 0, 0); - VariantInit(&result); - hr = DispGetParam(&dispparams, 0, VT_I2, &result, NULL); - ok(hr == DISP_E_PARAMNOTFOUND, - "Expected DISP_E_PARAMNOTFOUND, got %08x\n", hr); - ok(V_VT(&result) == VT_EMPTY, - "Expected VT_EMPTY, got %08x\n", V_VT(&result)); - - /* pdispparams.cArgs is 1, yet pdispparams.rgvarg is NULL. */ - INIT_DISPPARAMS(dispparams, NULL, NULL, 1, 0); - VariantInit(&result); - err_index = 0xdeadbeef; - hr = DispGetParam(&dispparams, 0, VT_I2, &result, &err_index); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - ok(V_VT(&result) == VT_EMPTY, - "Expected VT_EMPTY, got %08x\n", V_VT(&result)); - ok(err_index == 0, "Expected 0, got %d\n", err_index); - - /* pdispparams.cNamedArgs is 1, yet pdispparams.rgdispidNamedArgs is NULL. - * - * This crashes on Windows. - */ - - /* {42, 1234567890, "Sunshine"} */ - INIT_VARARG(vararg); - - /* Get the first param. position is end-based, so 2 is the first parameter - * of 3 parameters. - */ - INIT_DISPPARAMS(dispparams, vararg, NULL, 3, 0); - VariantInit(&result); - err_index = 0xdeadbeef; - hr = DispGetParam(&dispparams, 2, VT_I2, &result, &err_index); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(V_VT(&result) == VT_I2, "Expected VT_I2, got %08x\n", V_VT(&result)); - ok(V_I2(&result) == 42, "Expected 42, got %d\n", V_I2(&result)); - ok(err_index == 0xdeadbeef, - "Expected err_index to be unchanged, got %d\n", err_index); - - /* Get the second param. */ - INIT_DISPPARAMS(dispparams, vararg, NULL, 3, 0); - VariantInit(&result); - err_index = 0xdeadbeef; - hr = DispGetParam(&dispparams, 1, VT_I4, &result, &err_index); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(V_VT(&result) == VT_I4, "Expected VT_I4, got %08x\n", V_VT(&result)); - ok(V_I4(&result) == 1234567890, - "Expected 1234567890, got %d\n", V_I4(&result)); - ok(err_index == 0xdeadbeef, - "Expected err_index to be unchanged, got %d\n", err_index); - - /* Get the third param. */ - INIT_DISPPARAMS(dispparams, vararg, NULL, 3, 0); - VariantInit(&result); - err_index = 0xdeadbeef; - hr = DispGetParam(&dispparams, 0, VT_BSTR, &result, &err_index); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(V_VT(&result) == VT_BSTR, "Expected VT_BSTR, got %08x\n", V_VT(&result)); - ok_bstr(V_BSTR(&result), "Sunshine", "Expected %s, got %s\n"); - ok(err_index == 0xdeadbeef, - "Expected err_index to be unchanged, got %d\n", err_index); - VariantClear(&result); - - /* position is out of range. */ - INIT_DISPPARAMS(dispparams, vararg, NULL, 3, 0); - VariantInit(&result); - err_index = 0xdeadbeef; - hr = DispGetParam(&dispparams, 3, VT_I2, &result, &err_index); - ok(hr == DISP_E_PARAMNOTFOUND, - "Expected DISP_E_PARAMNOTFOUND, got %08x\n", hr); - ok(V_VT(&result) == VT_EMPTY, - "Expected VT_EMPTY, got %08x\n", V_VT(&result)); - ok(err_index == 0xdeadbeef, - "Expected err_index to be unchanged, got %d\n", err_index); - - /* pvarResult is NULL. */ - INIT_DISPPARAMS(dispparams, vararg, NULL, 3, 0); - err_index = 0xdeadbeef; - hr = DispGetParam(&dispparams, 2, VT_I2, NULL, &err_index); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - ok(err_index == 0, "Expected 0, got %d\n", err_index); - - /* puArgErr is NULL. */ - INIT_DISPPARAMS(dispparams, vararg, NULL, 3, 0); - VariantInit(&result); - hr = DispGetParam(&dispparams, 2, VT_I2, &result, NULL); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(V_VT(&result) == VT_I2, "Expected VT_I2, got %08x\n", V_VT(&result)); - ok(V_I2(&result) == 42, "Expected 42, got %d\n", V_I2(&result)); - - /* Coerce the first param to VT_I4. */ - INIT_DISPPARAMS(dispparams, vararg, NULL, 3, 0); - VariantInit(&result); - err_index = 0xdeadbeef; - hr = DispGetParam(&dispparams, 2, VT_I4, &result, &err_index); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(V_VT(&result) == VT_I4, "Expected VT_I4, got %08x\n", V_VT(&result)); - ok(V_I4(&result) == 42, "Expected 42, got %d\n", V_I4(&result)); - ok(err_index == 0xdeadbeef, - "Expected err_index to be unchanged, got %d\n", err_index); - - /* Coerce the first param to VT_BSTR. */ - INIT_DISPPARAMS(dispparams, vararg, NULL, 3, 0); - VariantInit(&result); - err_index = 0xdeadbeef; - hr = DispGetParam(&dispparams, 2, VT_BSTR, &result, &err_index); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(V_VT(&result) == VT_BSTR, "Expected VT_BSTR, got %08x\n", V_VT(&result)); - ok_bstr(V_BSTR(&result), "42", "Expected %s, got %s\n"); - ok(err_index == 0xdeadbeef, - "Expected err_index to be unchanged, got %d\n", err_index); - VariantClear(&result); - - /* Coerce the second (VT_I4) param to VT_I2. */ - INIT_DISPPARAMS(dispparams, vararg, NULL, 3, 0); - VariantInit(&result); - err_index = 0xdeadbeef; - hr = DispGetParam(&dispparams, 1, VT_I2, &result, &err_index); - ok(hr == DISP_E_OVERFLOW, "Expected DISP_E_OVERFLOW, got %08x\n", hr); - ok(V_VT(&result) == VT_EMPTY, - "Expected VT_EMPTY, got %08x\n", V_VT(&result)); - ok(err_index == 1, "Expected 1, got %d\n", err_index); - - /* Coerce the third (VT_BSTR) param to VT_I2. */ - INIT_DISPPARAMS(dispparams, vararg, NULL, 3, 0); - VariantInit(&result); - err_index = 0xdeadbeef; - hr = DispGetParam(&dispparams, 0, VT_I2, &result, &err_index); - ok(hr == DISP_E_TYPEMISMATCH, - "Expected DISP_E_TYPEMISMATCH, got %08x\n", hr); - ok(V_VT(&result) == VT_EMPTY, - "Expected VT_EMPTY, got %08x\n", V_VT(&result)); - ok(err_index == 2, "Expected 2, got %d\n", err_index); - - /* Coerce the first parameter to an invalid type. */ - INIT_DISPPARAMS(dispparams, vararg, NULL, 3, 0); - VariantInit(&result); - err_index = 0xdeadbeef; - hr = DispGetParam(&dispparams, 2, VT_ILLEGAL, &result, &err_index); - ok(hr == DISP_E_BADVARTYPE, "Expected DISP_E_BADVARTYPE, got %08x\n", hr); - ok(V_VT(&result) == VT_EMPTY, - "Expected VT_EMPTY, got %08x\n", V_VT(&result)); - ok(err_index == 0, "Expected 0, got %d\n", err_index); - - CLEAR_VARARG(vararg); - - /* Coerce the first parameter, which is of type VT_EMPTY, to VT_BSTR. */ - VariantInit(&vararg[0]); - INIT_DISPPARAMS(dispparams, vararg, NULL, 1, 0); - VariantInit(&result); - err_index = 0xdeadbeef; - hr = DispGetParam(&dispparams, 0, VT_BSTR, &result, &err_index); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(V_VT(&result) == VT_BSTR, "Expected VT_BSTR, got %08x\n", V_VT(&result)); - ok(err_index == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", err_index); - VariantClear(&result); -} - -START_TEST(dispatch) -{ - test_DispGetParam(); -} diff --git a/rostests/winetests/oleaut32/oleaut32.rbuild b/rostests/winetests/oleaut32/oleaut32.rbuild deleted file mode 100644 index 02ff7bbcfe3..00000000000 --- a/rostests/winetests/oleaut32/oleaut32.rbuild +++ /dev/null @@ -1,61 +0,0 @@ - - - - - . - include/reactos/wine - . - - wine - oleaut32 - ole32 - rpcrt4 - user32 - gdi32 - advapi32 - uuid - ntdll - tmarshal_interface - dispatch.c - olefont.c - olepicture.c - safearray.c - tmarshal.c - typelib.c - usrmarshal.c - varformat.c - vartest.c - vartype.c - tmarshal.rc - testlist.c - tmarshal_header - tmarshal - test_tlb - test_reg_header - test_reg - - - stdole2 - tmarshal.idl - - - stdole2 - tmarshal.idl - - - stdole2 - test_reg.idl - - - stdole2 - test_reg.idl - - - stdole2 - test_tlb.idl - - - stdole2 - tmarshal.idl - - diff --git a/rostests/winetests/oleaut32/olefont.c b/rostests/winetests/oleaut32/olefont.c deleted file mode 100644 index 7c0a11221cf..00000000000 --- a/rostests/winetests/oleaut32/olefont.c +++ /dev/null @@ -1,1115 +0,0 @@ -/* - * OLEFONT test program - * - * Copyright 2003 Marcus Meissner - * Copyright 2006 (Google) Benjamin Arai - * - * - * 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 - -#define COBJMACROS - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); - -static WCHAR MSSansSerif_font[] = {'M','S',' ','S','a','n','s',' ','S','e','r','i','f',0}; -static WCHAR system_font[] = { 'S','y','s','t','e','m',0 }; -static WCHAR arial_font[] = { 'A','r','i','a','l',0 }; -static WCHAR marlett_font[] = { 'M','a','r','l','e','t','t',0 }; - -static HMODULE hOleaut32; - -static HRESULT (WINAPI *pOleCreateFontIndirect)(LPFONTDESC,REFIID,LPVOID*); - -#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr) - -/* Create a font with cySize given by lo_size, hi_size, */ -/* SetRatio to ratio_logical, ratio_himetric, */ -/* check that resulting hfont has height hfont_height. */ -/* Various checks along the way. */ - -static void test_ifont_sizes(LONG lo_size, LONG hi_size, - LONG ratio_logical, LONG ratio_himetric, - LONG hfont_height, const char * test_name) -{ - FONTDESC fd; - LPVOID pvObj = NULL; - IFont* ifnt = NULL; - HFONT hfont; - LOGFONT lf; - CY psize; - HRESULT hres; - - fd.cbSizeofstruct = sizeof(FONTDESC); - fd.lpstrName = system_font; - S(fd.cySize).Lo = lo_size; - S(fd.cySize).Hi = hi_size; - fd.sWeight = 0; - fd.sCharset = 0; - fd.fItalic = 0; - fd.fUnderline = 0; - fd.fStrikethrough = 0; - - /* Create font, test that it worked. */ - hres = pOleCreateFontIndirect(&fd, &IID_IFont, &pvObj); - ifnt = pvObj; - ok(hres == S_OK,"%s: OCFI returns 0x%08x instead of S_OK.\n", - test_name, hres); - ok(pvObj != NULL,"%s: OCFI returns NULL.\n", test_name); - - /* Read back size. Hi part was ignored. */ - hres = IFont_get_Size(ifnt, &psize); - ok(hres == S_OK,"%s: IFont_get_size returns 0x%08x instead of S_OK.\n", - test_name, hres); - ok(S(psize).Lo == lo_size && S(psize).Hi == 0, - "%s: get_Size: Lo=%d, Hi=%d; expected Lo=%d, Hi=0.\n", - test_name, S(psize).Lo, S(psize).Hi, lo_size); - - /* Change ratio, check size unchanged. Standard is 72, 2540. */ - hres = IFont_SetRatio(ifnt, ratio_logical, ratio_himetric); - ok(hres == S_OK,"%s: IFont_SR returns 0x%08x instead of S_OK.\n", - test_name, hres); - hres = IFont_get_Size(ifnt, &psize); - ok(hres == S_OK,"%s: IFont_get_size returns 0x%08x instead of S_OK.\n", - test_name, hres); - ok(S(psize).Lo == lo_size && S(psize).Hi == 0, - "%s: gS after SR: Lo=%d, Hi=%d; expected Lo=%d, Hi=0.\n", - test_name, S(psize).Lo, S(psize).Hi, lo_size); - - /* Check hFont size with this ratio. This tests an important */ - /* conversion for which MSDN is very wrong. */ - hres = IFont_get_hFont (ifnt, &hfont); - ok(hres == S_OK, "%s: IFont_get_hFont returns 0x%08x instead of S_OK.\n", - test_name, hres); - hres = GetObject (hfont, sizeof(LOGFONT), &lf); - ok(lf.lfHeight == hfont_height, - "%s: hFont has lf.lfHeight=%d, expected %d.\n", - test_name, lf.lfHeight, hfont_height); - - /* Free IFont. */ - IFont_Release(ifnt); -} - -static void test_QueryInterface(void) -{ - LPVOID pvObj = NULL; - HRESULT hres; - IFont* font = NULL; - LONG ret; - - hres = pOleCreateFontIndirect(NULL, &IID_IFont, &pvObj); - font = pvObj; - - ok(hres == S_OK,"OCFI (NULL,..) does not return 0, but 0x%08x\n",hres); - ok(font != NULL,"OCFI (NULL,..) returns NULL, instead of !NULL\n"); - - pvObj = NULL; - hres = IFont_QueryInterface( font, &IID_IFont, &pvObj); - - /* Test if QueryInterface increments ref counter for IFONTs */ - ret = IFont_AddRef(font); - ok(ret == 3 || - broken(ret == 1), /* win95 */ - "IFont_QI expected ref value 3 but instead got %d\n",ret); - IFont_Release(font); - - ok(hres == S_OK,"IFont_QI does not return S_OK, but 0x%08x\n", hres); - ok(pvObj != NULL,"IFont_QI does return NULL, instead of a ptr\n"); - - /* Original ref and QueryInterface ref both have to be released */ - IFont_Release(font); - IFont_Release(font); -} - -static void test_type_info(void) -{ - LPVOID pvObj = NULL; - HRESULT hres; - IFontDisp* fontdisp = NULL; - ITypeInfo* pTInfo; - WCHAR name_Name[] = {'N','a','m','e',0}; - BSTR names[3]; - UINT n; - LCID en_us = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US), - SORT_DEFAULT); - DISPPARAMS dispparams; - VARIANT varresult; - - pOleCreateFontIndirect(NULL, &IID_IFontDisp, &pvObj); - fontdisp = pvObj; - - hres = IFontDisp_GetTypeInfo(fontdisp, 0, en_us, &pTInfo); - ok(hres == S_OK, "GTI returned 0x%08x instead of S_OK.\n", hres); - ok(pTInfo != NULL, "GTI returned NULL.\n"); - - hres = ITypeInfo_GetNames(pTInfo, DISPID_FONT_NAME, names, 3, &n); - ok(hres == S_OK, "GetNames returned 0x%08x instead of S_OK.\n", hres); - ok(n == 1, "GetNames returned %d names instead of 1.\n", n); - ok(!lstrcmpiW(names[0],name_Name), "DISPID_FONT_NAME doesn't get 'Names'.\n"); - SysFreeString(names[0]); - - ITypeInfo_Release(pTInfo); - - dispparams.cNamedArgs = 0; - dispparams.rgdispidNamedArgs = NULL; - dispparams.cArgs = 0; - dispparams.rgvarg = NULL; - VariantInit(&varresult); - hres = IFontDisp_Invoke(fontdisp, DISPID_FONT_NAME, &IID_NULL, - LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, - NULL, NULL); - ok(hres == S_OK, "IFontDisp_Invoke return 0x%08x instead of S_OK.\n", hres); - VariantClear(&varresult); - - IFontDisp_Release(fontdisp); -} - -static HRESULT WINAPI FontEventsDisp_QueryInterface( - IFontEventsDisp *iface, - /* [in] */ REFIID riid, - /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject) -{ - if (IsEqualIID(riid, &IID_IFontEventsDisp) || IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IDispatch)) - { - IUnknown_AddRef(iface); - *ppvObject = iface; - return S_OK; - } - else - { - *ppvObject = NULL; - return E_NOINTERFACE; - } -} - -static ULONG WINAPI FontEventsDisp_AddRef( - IFontEventsDisp *iface) -{ - return 2; -} - -static ULONG WINAPI FontEventsDisp_Release( - IFontEventsDisp *iface) -{ - return 1; -} - -static int fonteventsdisp_invoke_called = 0; - -static HRESULT WINAPI FontEventsDisp_Invoke( - IFontEventsDisp __RPC_FAR * iface, - /* [in] */ DISPID dispIdMember, - /* [in] */ REFIID riid, - /* [in] */ LCID lcid, - /* [in] */ WORD wFlags, - /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams, - /* [out] */ VARIANT __RPC_FAR *pVarResult, - /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo, - /* [out] */ UINT __RPC_FAR *puArgErr) -{ - static const WCHAR wszBold[] = {'B','o','l','d',0}; - ok(wFlags == INVOKE_FUNC, "invoke flags should have been INVOKE_FUNC instead of 0x%x\n", wFlags); - ok(dispIdMember == DISPID_FONT_CHANGED, "dispIdMember should have been DISPID_FONT_CHANGED instead of 0x%x\n", dispIdMember); - ok(pDispParams->cArgs == 1, "pDispParams->cArgs should have been 1 instead of %d\n", pDispParams->cArgs); - ok(V_VT(&pDispParams->rgvarg[0]) == VT_BSTR, "VT of first param should have been VT_BSTR instead of %d\n", V_VT(&pDispParams->rgvarg[0])); - ok(!lstrcmpW(V_BSTR(&pDispParams->rgvarg[0]), wszBold), "String in first param should have been \"Bold\"\n"); - - fonteventsdisp_invoke_called++; - return S_OK; -} - -static IFontEventsDispVtbl FontEventsDisp_Vtbl = -{ - FontEventsDisp_QueryInterface, - FontEventsDisp_AddRef, - FontEventsDisp_Release, - NULL, - NULL, - NULL, - FontEventsDisp_Invoke -}; - -static IFontEventsDisp FontEventsDisp = { &FontEventsDisp_Vtbl }; - -static void test_font_events_disp(void) -{ - IFont *pFont; - IFont *pFont2; - IConnectionPointContainer *pCPC; - IConnectionPoint *pCP; - FONTDESC fontdesc; - HRESULT hr; - DWORD dwCookie; - IFontDisp *pFontDisp; - DISPPARAMS dispparams; - VARIANTARG vararg; - - fontdesc.cbSizeofstruct = sizeof(fontdesc); - fontdesc.lpstrName = MSSansSerif_font; - fontdesc.cySize.int64 = 12 * 10000; /* 12 pt */ - fontdesc.sWeight = FW_NORMAL; - fontdesc.sCharset = 0; - fontdesc.fItalic = FALSE; - fontdesc.fUnderline = FALSE; - fontdesc.fStrikethrough = FALSE; - - hr = pOleCreateFontIndirect(&fontdesc, &IID_IFont, (void **)&pFont); - ok_ole_success(hr, "OleCreateFontIndirect"); - - hr = IFont_QueryInterface(pFont, &IID_IConnectionPointContainer, (void **)&pCPC); - ok_ole_success(hr, "IFont_QueryInterface"); - - hr = IConnectionPointContainer_FindConnectionPoint(pCPC, &IID_IFontEventsDisp, &pCP); - ok_ole_success(hr, "IConnectionPointContainer_FindConnectionPoint"); - IConnectionPointContainer_Release(pCPC); - - hr = IConnectionPoint_Advise(pCP, (IUnknown *)&FontEventsDisp, &dwCookie); - ok_ole_success(hr, "IConnectionPoint_Advise"); - IConnectionPoint_Release(pCP); - - hr = IFont_put_Bold(pFont, TRUE); - ok_ole_success(hr, "IFont_put_Bold"); - - ok(fonteventsdisp_invoke_called == 1, "IFontEventDisp::Invoke wasn't called once\n"); - - hr = IFont_QueryInterface(pFont, &IID_IFontDisp, (void **)&pFontDisp); - ok_ole_success(hr, "IFont_QueryInterface"); - - V_VT(&vararg) = VT_BOOL; - V_BOOL(&vararg) = VARIANT_FALSE; - dispparams.cNamedArgs = 0; - dispparams.rgdispidNamedArgs = NULL; - dispparams.cArgs = 1; - dispparams.rgvarg = &vararg; - hr = IFontDisp_Invoke(pFontDisp, DISPID_FONT_BOLD, &IID_NULL, 0, DISPATCH_PROPERTYPUT, &dispparams, NULL, NULL, NULL); - - IFontDisp_Release(pFontDisp); - - ok(fonteventsdisp_invoke_called == 2, "IFontEventDisp::Invoke was called %d times instead of twice\n", - fonteventsdisp_invoke_called); - - hr = IFont_Clone(pFont, &pFont2); - ok_ole_success(hr, "IFont_Clone"); - IFont_Release(pFont); - - hr = IFont_put_Bold(pFont2, FALSE); - ok_ole_success(hr, "IFont_put_Bold"); - - /* this test shows that the notification routine isn't called again */ - ok(fonteventsdisp_invoke_called == 2, "IFontEventDisp::Invoke was called %d times instead of twice\n", - fonteventsdisp_invoke_called); - - IFont_Release(pFont2); -} - -static void test_names_ids(WCHAR* w_name_1, const char* a_name_1, - WCHAR* w_name_2, const char* a_name_2, - LCID lcid, DISPID id_1, DISPID id_2, - HRESULT hres_expect, int numnames) -{ - LPVOID pvObj = NULL; - IFontDisp *fontdisp = NULL; - HRESULT hres; - DISPID rgDispId[2] = {0xdeadbeef, 0xdeadbeef}; - LPOLESTR names[2] = {w_name_1, w_name_2}; - - pOleCreateFontIndirect(NULL, &IID_IFontDisp, &pvObj); - fontdisp = pvObj; - - hres = IFontDisp_GetIDsOfNames(fontdisp, &IID_NULL, names, numnames, - lcid, rgDispId); - - /* test hres */ - ok(hres == hres_expect, - "GetIDsOfNames: \"%s\", \"%s\" returns 0x%08x, expected 0x%08x.\n", - a_name_1, a_name_2, hres, hres_expect); - - /* test first DISPID */ - ok(rgDispId[0]==id_1, - "GetIDsOfNames: \"%s\" gets DISPID 0x%08x, expected 0x%08x.\n", - a_name_1, rgDispId[0], id_1); - - /* test second DISPID is present */ - if (numnames == 2) - { - ok(rgDispId[1]==id_2, - "GetIDsOfNames: ..., \"%s\" gets DISPID 0x%08x, expected 0x%08x.\n", - a_name_2, rgDispId[1], id_2); - } - - IFontDisp_Release(fontdisp); -} - -static void test_GetIDsOfNames(void) -{ - WCHAR name_Name[] = {'N','a','m','e',0}; - WCHAR name_Italic[] = {'I','t','a','l','i','c',0}; - WCHAR name_Size[] = {'S','i','z','e',0}; - WCHAR name_Bold[] = {'B','o','l','d',0}; - WCHAR name_Underline[] = {'U','n','d','e','r','l','i','n','e',0}; - WCHAR name_Strikethrough[] = {'S','t','r','i','k','e','t','h','r','o','u','g','h',0}; - WCHAR name_Weight[] = {'W','e','i','g','h','t',0}; - WCHAR name_Charset[] = {'C','h','a','r','s','e','t',0}; - WCHAR name_Foo[] = {'F','o','o',0}; - WCHAR name_nAmE[] = {'n','A','m','E',0}; - WCHAR name_Nom[] = {'N','o','m',0}; - - LCID en_us = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US), - SORT_DEFAULT); - LCID fr_fr = MAKELCID(MAKELANGID(LANG_FRENCH,SUBLANG_FRENCH), - SORT_DEFAULT); - - /* Test DISPID_FONTs for the various properties. */ - test_names_ids(name_Name, "Name", NULL, "", en_us, - DISPID_FONT_NAME, 0, S_OK,1); - test_names_ids(name_Size, "Size", NULL, "", en_us, - DISPID_FONT_SIZE, 0, S_OK,1); - test_names_ids(name_Bold, "Bold", NULL, "", en_us, - DISPID_FONT_BOLD, 0, S_OK,1); - test_names_ids(name_Italic, "Italic", NULL, "", en_us, - DISPID_FONT_ITALIC, 0, S_OK,1); - test_names_ids(name_Underline, "Underline", NULL, "", en_us, - DISPID_FONT_UNDER, 0, S_OK,1); - test_names_ids(name_Strikethrough, "Strikethrough", NULL, "", en_us, - DISPID_FONT_STRIKE, 0, S_OK,1); - test_names_ids(name_Weight, "Weight", NULL, "", en_us, - DISPID_FONT_WEIGHT, 0, S_OK,1); - test_names_ids(name_Charset, "Charset", NULL, "", en_us, - DISPID_FONT_CHARSET, 0, S_OK,1); - - /* Capitalization doesn't matter. */ - test_names_ids(name_nAmE, "nAmE", NULL, "", en_us, - DISPID_FONT_NAME, 0, S_OK,1); - - /* Unknown name. */ - test_names_ids(name_Foo, "Foo", NULL, "", en_us, - DISPID_UNKNOWN, 0, DISP_E_UNKNOWNNAME,1); - - /* Pass several names: first is processed, */ - /* second gets DISPID_UNKNOWN and doesn't affect retval. */ - test_names_ids(name_Italic, "Italic", name_Name, "Name", en_us, - DISPID_FONT_ITALIC, DISPID_UNKNOWN, S_OK,2); - test_names_ids(name_Italic, "Italic", name_Foo, "Foo", en_us, - DISPID_FONT_ITALIC, DISPID_UNKNOWN, S_OK,2); - - /* Locale ID has no effect. */ - test_names_ids(name_Name, "Name", NULL, "", fr_fr, - DISPID_FONT_NAME, 0, S_OK,1); - test_names_ids(name_Nom, "This is not a font", NULL, "", fr_fr, - DISPID_UNKNOWN, 0, DISP_E_UNKNOWNNAME,1); - - /* One of the arguments are invalid */ - test_names_ids(name_Name, "Name", NULL, "", en_us, - 0xdeadbeef, 0xdeadbeef, E_INVALIDARG,0); - test_names_ids(name_Italic, "Italic", NULL, "", en_us, - 0xdeadbeef, 0xdeadbeef, E_INVALIDARG,0); - test_names_ids(name_Foo, "Foo", NULL, "", en_us, - 0xdeadbeef, 0xdeadbeef, E_INVALIDARG,0); - - /* Crazy locale ID? */ - test_names_ids(name_Name, "Name", NULL, "", -1, - DISPID_FONT_NAME, 0, S_OK,1); -} - -static void test_Invoke(void) -{ - IFontDisp *fontdisp; - HRESULT hr; - VARIANTARG vararg; - DISPPARAMS dispparams; - VARIANT varresult; - - hr = pOleCreateFontIndirect(NULL, &IID_IFontDisp, (void **)&fontdisp); - ok_ole_success(hr, "OleCreateFontIndirect"); - - V_VT(&vararg) = VT_BOOL; - V_BOOL(&vararg) = VARIANT_FALSE; - dispparams.cNamedArgs = 0; - dispparams.rgdispidNamedArgs = NULL; - dispparams.cArgs = 1; - dispparams.rgvarg = &vararg; - hr = IFontDisp_Invoke(fontdisp, DISPID_FONT_BOLD, &IID_IFontDisp, 0, DISPATCH_PROPERTYPUT, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_UNKNOWNINTERFACE, "IFontDisp_Invoke should have returned DISP_E_UNKNOWNINTERFACE instead of 0x%08x\n", hr); - - dispparams.cArgs = 0; - dispparams.rgvarg = NULL; - hr = IFontDisp_Invoke(fontdisp, DISPID_FONT_BOLD, &IID_NULL, 0, DISPATCH_PROPERTYPUT, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_BADPARAMCOUNT, "IFontDisp_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08x\n", hr); - - hr = IFontDisp_Invoke(fontdisp, DISPID_FONT_BOLD, &IID_NULL, 0, DISPATCH_PROPERTYPUT, NULL, NULL, NULL, NULL); - ok(hr == DISP_E_PARAMNOTOPTIONAL, "IFontDisp_Invoke should have returned DISP_E_PARAMNOTOPTIONAL instead of 0x%08x\n", hr); - - hr = IFontDisp_Invoke(fontdisp, DISPID_FONT_BOLD, &IID_NULL, 0, DISPATCH_PROPERTYGET, NULL, NULL, NULL, NULL); - ok(hr == DISP_E_PARAMNOTOPTIONAL, "IFontDisp_Invoke should have returned DISP_E_PARAMNOTOPTIONAL instead of 0x%08x\n", hr); - - hr = IFontDisp_Invoke(fontdisp, DISPID_FONT_BOLD, &IID_NULL, 0, DISPATCH_PROPERTYGET, NULL, &varresult, NULL, NULL); - ok_ole_success(hr, "IFontDisp_Invoke"); - - hr = IFontDisp_Invoke(fontdisp, DISPID_FONT_BOLD, &IID_NULL, 0, DISPATCH_METHOD, NULL, &varresult, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "IFontDisp_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); - - hr = IFontDisp_Invoke(fontdisp, 0xdeadbeef, &IID_NULL, 0, DISPATCH_PROPERTYGET, NULL, &varresult, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "IFontDisp_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); - - dispparams.cArgs = 1; - dispparams.rgvarg = &vararg; - hr = IFontDisp_Invoke(fontdisp, DISPID_FONT_BOLD, &IID_NULL, 0, DISPATCH_PROPERTYGET, &dispparams, &varresult, NULL, NULL); - ok_ole_success(hr, "IFontDisp_Invoke"); - - IFontDisp_Release(fontdisp); -} - -static void test_IsEqual(void) -{ - FONTDESC fd; - IFont* ifnt = NULL; - IFont* ifnt2 = NULL; - HRESULT hres; - - /* Basic font description */ - fd.cbSizeofstruct = sizeof(FONTDESC); - fd.lpstrName = system_font; - S(fd.cySize).Lo = 100; - S(fd.cySize).Hi = 100; - fd.sWeight = 0; - fd.sCharset = 0; - fd.fItalic = 0; - fd.fUnderline = 0; - fd.fStrikethrough = 0; - - /* Create font */ - pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt); - - /* Test equal fonts */ - pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); - hres = IFont_IsEqual(ifnt,ifnt2); - ok(hres == S_OK, - "IFont_IsEqual: (EQUAL) Expected S_OK but got 0x%08x\n",hres); - IFont_Release(ifnt2); - - /* Check for bad pointer */ - hres = IFont_IsEqual(ifnt,NULL); - ok(hres == E_POINTER, - "IFont_IsEqual: (NULL) Expected 0x80004003 but got 0x%08x\n",hres); - - /* Test strName */ - fd.lpstrName = arial_font; - pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); - hres = IFont_IsEqual(ifnt,ifnt2); - ok(hres == S_FALSE, - "IFont_IsEqual: (strName) Expected S_FALSE but got 0x%08x\n",hres); - fd.lpstrName = system_font; - IFont_Release(ifnt2); - - /* Test lo font size */ - S(fd.cySize).Lo = 10000; - pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); - hres = IFont_IsEqual(ifnt,ifnt2); - ok(hres == S_FALSE, - "IFont_IsEqual: (Lo font size) Expected S_FALSE but got 0x%08x\n",hres); - S(fd.cySize).Lo = 100; - IFont_Release(ifnt2); - - /* Test hi font size */ - S(fd.cySize).Hi = 10000; - pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); - hres = IFont_IsEqual(ifnt,ifnt2); - ok(hres == S_FALSE, - "IFont_IsEqual: (Hi font size) Expected S_FALSE but got 0x%08x\n",hres); - S(fd.cySize).Hi = 100; - IFont_Release(ifnt2); - - /* Test font weight */ - fd.sWeight = 100; - pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); - hres = IFont_IsEqual(ifnt,ifnt2); - ok(hres == S_FALSE, - "IFont_IsEqual: (Weight) Expected S_FALSE but got 0x%08x\n",hres); - fd.sWeight = 0; - IFont_Release(ifnt2); - - /* Test charset */ - fd.sCharset = 1; - pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); - hres = IFont_IsEqual(ifnt,ifnt2); - ok(hres == S_FALSE, - "IFont_IsEqual: (Charset) Expected S_FALSE but got 0x%08x\n",hres); - fd.sCharset = 0; - IFont_Release(ifnt2); - - /* Test italic setting */ - fd.fItalic = 1; - pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); - hres = IFont_IsEqual(ifnt,ifnt2); - ok(hres == S_FALSE, - "IFont_IsEqual: (Italic) Expected S_FALSE but got 0x%08x\n",hres); - fd.fItalic = 0; - IFont_Release(ifnt2); - - /* Test underline setting */ - fd.fUnderline = 1; - pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); - hres = IFont_IsEqual(ifnt,ifnt2); - ok(hres == S_FALSE, - "IFont_IsEqual: (Underline) Expected S_FALSE but got 0x%08x\n",hres); - fd.fUnderline = 0; - IFont_Release(ifnt2); - - /* Test strikethrough setting */ - fd.fStrikethrough = 1; - pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); - hres = IFont_IsEqual(ifnt,ifnt2); - ok(hres == S_FALSE, - "IFont_IsEqual: (Strikethrough) Expected S_FALSE but got 0x%08x\n",hres); - fd.fStrikethrough = 0; - IFont_Release(ifnt2); - - /* Free IFont. */ - IFont_Release(ifnt); -} - -static void test_ReleaseHfont(void) -{ - FONTDESC fd; - LPVOID pvObj1 = NULL; - LPVOID pvObj2 = NULL; - IFont* ifnt1 = NULL; - IFont* ifnt2 = NULL; - HFONT hfnt1 = 0; - HFONT hfnt2 = 0; - HRESULT hres; - - /* Basic font description */ - fd.cbSizeofstruct = sizeof(FONTDESC); - fd.lpstrName = system_font; - S(fd.cySize).Lo = 100; - S(fd.cySize).Hi = 100; - fd.sWeight = 0; - fd.sCharset = 0; - fd.fItalic = 0; - fd.fUnderline = 0; - fd.fStrikethrough = 0; - - /* Create HFONTs and IFONTs */ - pOleCreateFontIndirect(&fd, &IID_IFont, &pvObj1); - ifnt1 = pvObj1; - IFont_get_hFont(ifnt1,&hfnt1); - fd.lpstrName = arial_font; - pOleCreateFontIndirect(&fd, &IID_IFont, &pvObj2); - ifnt2 = pvObj2; - IFont_get_hFont(ifnt2,&hfnt2); - - /* Try invalid HFONT */ - hres = IFont_ReleaseHfont(ifnt1,NULL); - ok(hres == E_INVALIDARG, - "IFont_ReleaseHfont: (Bad HFONT) Expected E_INVALIDARG but got 0x%08x\n", - hres); - - /* Try to add a bad HFONT */ - hres = IFont_ReleaseHfont(ifnt1,(HFONT)32); - ok(hres == S_FALSE, - "IFont_ReleaseHfont: (Bad HFONT) Expected S_FALSE but got 0x%08x\n", - hres); - - /* Release all refs */ - hres = IFont_ReleaseHfont(ifnt1,hfnt1); - ok(hres == S_OK, - "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n", - hres); - - hres = IFont_ReleaseHfont(ifnt2,hfnt2); - ok(hres == S_OK, - "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n", - hres); - - /* Check that both lists are empty */ - hres = IFont_ReleaseHfont(ifnt1,hfnt1); - ok(hres == S_FALSE, - "IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08x\n", - hres); - - /* The list should be empty */ - hres = IFont_ReleaseHfont(ifnt2,hfnt2); - ok(hres == S_FALSE, - "IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08x\n", - hres); - - IFont_Release(ifnt1); - IFont_Release(ifnt2); -} - -static void test_AddRefHfont(void) -{ - FONTDESC fd; - IFont* ifnt1 = NULL; - IFont* ifnt2 = NULL; - IFont* ifnt3 = NULL; - HFONT hfnt1 = 0; - HFONT hfnt2 = 0; - HFONT hfnt3 = 0; - HRESULT hres; - - /* Basic font description */ - fd.cbSizeofstruct = sizeof(FONTDESC); - fd.lpstrName = system_font; - S(fd.cySize).Lo = 100; - S(fd.cySize).Hi = 100; - fd.sWeight = 0; - fd.sCharset = 0; - fd.fItalic = 0; - fd.fUnderline = 0; - fd.fStrikethrough = 0; - - /* Create HFONTs and IFONTs */ - pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt1); - IFont_get_hFont(ifnt1,&hfnt1); - fd.lpstrName = arial_font; - pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt2); - IFont_get_hFont(ifnt2,&hfnt2); - - /* Try invalid HFONT */ - hres = IFont_AddRefHfont(ifnt1,NULL); - ok(hres == E_INVALIDARG, - "IFont_AddRefHfont: (Bad HFONT) Expected E_INVALIDARG but got 0x%08x\n", - hres); - - /* Try to add a bad HFONT */ - hres = IFont_AddRefHfont(ifnt1,(HFONT)32); - ok(hres == S_FALSE, - "IFont_AddRefHfont: (Bad HFONT) Expected S_FALSE but got 0x%08x\n", - hres); - - /* Add simple IFONT HFONT pair */ - hres = IFont_AddRefHfont(ifnt1,hfnt1); - ok(hres == S_OK, - "IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08x\n", - hres); - - /* IFONT and HFONT do not have to be the same (always looks at HFONT) */ - hres = IFont_AddRefHfont(ifnt2,hfnt1); - ok(hres == S_OK, - "IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08x\n", - hres); - - /* Release all hfnt1 refs */ - hres = IFont_ReleaseHfont(ifnt1,hfnt1); - ok(hres == S_OK, - "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n", - hres); - - hres = IFont_ReleaseHfont(ifnt1,hfnt1); - ok(hres == S_OK, - "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n", - hres); - - hres = IFont_ReleaseHfont(ifnt1,hfnt1); - ok(hres == S_OK, - "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n", - hres); - - /* Check if hfnt1 is empty */ - hres = IFont_ReleaseHfont(ifnt1,hfnt1); - ok(hres == S_FALSE, - "IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08x\n", - hres); - - /* Release all hfnt2 refs */ - hres = IFont_ReleaseHfont(ifnt2,hfnt2); - ok(hres == S_OK, - "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n", - hres); - - /* Check if hfnt2 is empty */ - hres = IFont_ReleaseHfont(ifnt2,hfnt2); - ok(hres == S_FALSE, - "IFont_AddRefHfont: (Release ref) Expected S_FALSE but got 0x%08x\n", - hres); - - /* Show that releasing an IFONT does not always release it from the HFONT cache. */ - - IFont_Release(ifnt1); - - /* Add a reference for destroyed hfnt1 */ - hres = IFont_AddRefHfont(ifnt2,hfnt1); - ok(hres == S_OK, - "IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08x\n", - hres); - - /* Decrement reference for destroyed hfnt1 */ - hres = IFont_ReleaseHfont(ifnt2,hfnt1); - ok(hres == S_OK || - hres == S_FALSE, /* <= win2k */ - "IFont_AddRefHfont: (Release ref) Expected S_OK or S_FALSE but got 0x%08x\n", - hres); - - /* Shows that releasing all IFONT's does clear the HFONT cache. */ - - IFont_Release(ifnt2); - - /* Need to make a new IFONT for testing */ - fd.fUnderline = 1; - pOleCreateFontIndirect(&fd, &IID_IFont, (void **)&ifnt3); - IFont_get_hFont(ifnt3,&hfnt3); - - /* Add a reference for destroyed hfnt1 */ - hres = IFont_AddRefHfont(ifnt3,hfnt1); - ok(hres == S_FALSE, - "IFont_AddRefHfont: (Add ref) Expected S_OK but got 0x%08x\n", - hres); - - /* Decrement reference for destroyed hfnt1 */ - hres = IFont_ReleaseHfont(ifnt3,hfnt1); - ok(hres == S_FALSE, - "IFont_AddRefHfont: (Release ref) Expected S_OK but got 0x%08x\n", - hres); - - IFont_Release(ifnt3); -} - -static void test_returns(void) -{ - IFont *pFont; - FONTDESC fontdesc; - HRESULT hr; - - fontdesc.cbSizeofstruct = sizeof(fontdesc); - fontdesc.lpstrName = MSSansSerif_font; - fontdesc.cySize.int64 = 12 * 10000; /* 12 pt */ - fontdesc.sWeight = FW_NORMAL; - fontdesc.sCharset = 0; - fontdesc.fItalic = FALSE; - fontdesc.fUnderline = FALSE; - fontdesc.fStrikethrough = FALSE; - - hr = pOleCreateFontIndirect(&fontdesc, &IID_IFont, (void **)&pFont); - ok_ole_success(hr, "OleCreateFontIndirect"); - - hr = IFont_put_Name(pFont, NULL); - ok(hr == CTL_E_INVALIDPROPERTYVALUE, - "IFont::put_Name: Expected CTL_E_INVALIDPROPERTYVALUE got 0x%08x\n", - hr); - - hr = IFont_get_Name(pFont, NULL); - ok(hr == E_POINTER, - "IFont::get_Name: Expected E_POINTER got 0x%08x\n", - hr); - - hr = IFont_get_Size(pFont, NULL); - ok(hr == E_POINTER, - "IFont::get_Size: Expected E_POINTER got 0x%08x\n", - hr); - - hr = IFont_get_Bold(pFont, NULL); - ok(hr == E_POINTER, - "IFont::get_Bold: Expected E_POINTER got 0x%08x\n", - hr); - - IFont_Release(pFont); -} - -static void test_hfont_lifetime(void) -{ - IFont *font, *font2; - FONTDESC fontdesc; - HRESULT hr; - HFONT hfont, first_hfont = NULL; - CY size; - DWORD obj_type; - int i; - - fontdesc.cbSizeofstruct = sizeof(fontdesc); - fontdesc.lpstrName = arial_font; - fontdesc.cySize.int64 = 12 * 10000; /* 12 pt */ - fontdesc.sWeight = FW_NORMAL; - fontdesc.sCharset = ANSI_CHARSET; - fontdesc.fItalic = FALSE; - fontdesc.fUnderline = FALSE; - fontdesc.fStrikethrough = FALSE; - - hr = pOleCreateFontIndirect(&fontdesc, &IID_IFont, (void **)&font); - ok_ole_success(hr, "OleCreateFontIndirect"); - - hr = IFont_get_hFont(font, &hfont); - ok_ole_success(hr, "get_hFont"); - - /* show that if the font is updated the old hfont is deleted when the - new font is realized */ - for(i = 0; i < 100; i++) - { - HFONT last_hfont = hfont; - - size.int64 = (i + 10) * 20000; - - obj_type = GetObjectType(hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); - - hr = IFont_put_Size(font, size); - ok_ole_success(hr, "put_Size"); - - /* put_Size doesn't cause the new font to be realized */ - obj_type = GetObjectType(last_hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); - - hr = IFont_get_hFont(font, &hfont); - ok_ole_success(hr, "get_hFont"); - - obj_type = GetObjectType(last_hfont); - ok(obj_type == 0, "%d: got obj type %d\n", i, obj_type); - } - - /* now show that if we take a reference on the hfont, it persists - until the font object is released */ - for(i = 0; i < 100; i++) - { - - size.int64 = (i + 10) * 20000; - - obj_type = GetObjectType(hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); - - hr = IFont_put_Size(font, size); - ok_ole_success(hr, "put_Size"); - - hr = IFont_get_hFont(font, &hfont); - ok_ole_success(hr, "get_hFont"); - - hr = IFont_AddRefHfont(font, hfont); - ok_ole_success(hr, "AddRefHfont"); - - if(i == 0) first_hfont = hfont; - obj_type = GetObjectType(first_hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); - } - - IFont_Release(font); - - obj_type = GetObjectType(first_hfont); - ok(obj_type == 0, "got obj type %d\n", obj_type); - - /* An AddRefHfont followed by a ReleaseHfont means the font doesn't not persist - through re-realization */ - - hr = pOleCreateFontIndirect(&fontdesc, &IID_IFont, (void **)&font); - ok_ole_success(hr, "OleCreateFontIndirect"); - - hr = IFont_get_hFont(font, &hfont); - ok_ole_success(hr, "get_hFont"); - - for(i = 0; i < 100; i++) - { - HFONT last_hfont = hfont; - - size.int64 = (i + 10) * 20000; - - obj_type = GetObjectType(hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); - - hr = IFont_put_Size(font, size); - ok_ole_success(hr, "put_Size"); - - /* put_Size doesn't cause the new font to be realized */ - obj_type = GetObjectType(last_hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); - - hr = IFont_get_hFont(font, &hfont); - ok_ole_success(hr, "get_hFont"); - - hr = IFont_AddRefHfont(font, hfont); - ok_ole_success(hr, "AddRefHfont"); - - hr = IFont_ReleaseHfont(font, hfont); - ok_ole_success(hr, "ReleaseHfont"); - - obj_type = GetObjectType(last_hfont); - ok(obj_type == 0, "%d: got obj type %d\n", i, obj_type); - } - - /* Interestingly if we release a nonexistent reference on the hfont, - * it persists until the font object is released - */ - for(i = 0; i < 100; i++) - { - size.int64 = (i + 10) * 20000; - - obj_type = GetObjectType(hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); - - hr = IFont_put_Size(font, size); - ok_ole_success(hr, "put_Size"); - - hr = IFont_get_hFont(font, &hfont); - ok_ole_success(hr, "get_hFont"); - - hr = IFont_ReleaseHfont(font, hfont); - ok_ole_success(hr, "ReleaseHfont"); - - if(i == 0) first_hfont = hfont; - obj_type = GetObjectType(first_hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); - } - - IFont_Release(font); - - obj_type = GetObjectType(first_hfont); - ok(obj_type == 0, "got obj type %d\n", obj_type); - - /* If we take two internal references on a hfont then we can release - it twice. So it looks like there's a total reference count - that includes internal and external references */ - - hr = pOleCreateFontIndirect(&fontdesc, &IID_IFont, (void **)&font); - ok_ole_success(hr, "OleCreateFontIndirect"); - hr = pOleCreateFontIndirect(&fontdesc, &IID_IFont, (void **)&font2); - ok_ole_success(hr, "OleCreateFontIndirect"); - - hr = IFont_get_hFont(font, &hfont); - ok_ole_success(hr, "get_hFont"); - hr = IFont_get_hFont(font2, &first_hfont); - ok_ole_success(hr, "get_hFont"); -todo_wine - ok(hfont == first_hfont, "fonts differ\n"); - hr = IFont_ReleaseHfont(font, hfont); - ok(hr == S_OK, "got %08x\n", hr); - hr = IFont_ReleaseHfont(font, hfont); -todo_wine - ok(hr == S_OK, "got %08x\n", hr); - hr = IFont_ReleaseHfont(font, hfont); - ok(hr == S_FALSE, "got %08x\n", hr); - - obj_type = GetObjectType(hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); - - IFont_Release(font); - - obj_type = GetObjectType(hfont); - ok(obj_type == OBJ_FONT, "got obj type %d\n", obj_type); - - IFont_Release(font2); - - obj_type = GetObjectType(hfont); - ok(obj_type == 0, "got obj type %d\n", obj_type); -} - -static void test_realization(void) -{ - IFont *font; - FONTDESC fontdesc; - HRESULT hr; - BSTR name; - SHORT cs; - - /* Try to create a symbol only font (marlett) with charset - set to ANSI. This will result in another, ANSI, font - being selected */ - fontdesc.cbSizeofstruct = sizeof(fontdesc); - fontdesc.lpstrName = marlett_font; - fontdesc.cySize.int64 = 12 * 10000; /* 12 pt */ - fontdesc.sWeight = FW_NORMAL; - fontdesc.sCharset = ANSI_CHARSET; - fontdesc.fItalic = FALSE; - fontdesc.fUnderline = FALSE; - fontdesc.fStrikethrough = FALSE; - - hr = pOleCreateFontIndirect(&fontdesc, &IID_IFont, (void **)&font); - ok_ole_success(hr, "OleCreateFontIndirect"); - - hr = IFont_get_Charset(font, &cs); - ok_ole_success(hr, "get_Charset"); - ok(cs == ANSI_CHARSET, "got charset %d\n", cs); - - IFont_Release(font); - - /* Now create an ANSI font and change the name to marlett */ - - fontdesc.lpstrName = arial_font; - - hr = pOleCreateFontIndirect(&fontdesc, &IID_IFont, (void **)&font); - ok_ole_success(hr, "OleCreateFontIndirect"); - - hr = IFont_get_Charset(font, &cs); - ok_ole_success(hr, "get_Charset"); - ok(cs == ANSI_CHARSET, "got charset %d\n", cs); - - name = SysAllocString(marlett_font); - hr = IFont_put_Name(font, name); - ok_ole_success(hr, "put_Name"); - SysFreeString(name); - - hr = IFont_get_Name(font, &name); - ok_ole_success(hr, "get_Name"); - ok(!lstrcmpiW(name, marlett_font), "got name %s\n", wine_dbgstr_w(name)); - SysFreeString(name); - - hr = IFont_get_Charset(font, &cs); - ok_ole_success(hr, "get_Charset"); - ok(cs == SYMBOL_CHARSET, "got charset %d\n", cs); - - IFont_Release(font); -} - -START_TEST(olefont) -{ - hOleaut32 = GetModuleHandleA("oleaut32.dll"); - pOleCreateFontIndirect = (void*)GetProcAddress(hOleaut32, "OleCreateFontIndirect"); - if (!pOleCreateFontIndirect) - { - win_skip("OleCreateFontIndirect not available\n"); - return; - } - - test_QueryInterface(); - test_type_info(); - - /* Test various size operations and conversions. */ - /* Add more as needed. */ - if (0) /* FIXME: failing tests */ - { - test_ifont_sizes(180000, 0, 72, 2540, -18, "default"); - test_ifont_sizes(180000, 0, 144, 2540, -36, "ratio1"); /* change ratio */ - test_ifont_sizes(180000, 0, 72, 1270, -36, "ratio2"); /* 2nd part of ratio */ - - /* These depend on details of how IFont rounds sizes internally. */ - test_ifont_sizes(0, 0, 72, 2540, 0, "zero size"); /* zero size */ - test_ifont_sizes(186000, 0, 72, 2540, -19, "rounding"); /* test rounding */ - } - - test_font_events_disp(); - test_GetIDsOfNames(); - test_Invoke(); - test_IsEqual(); - test_ReleaseHfont(); - test_AddRefHfont(); - test_returns(); - test_hfont_lifetime(); - test_realization(); -} diff --git a/rostests/winetests/oleaut32/olepicture.c b/rostests/winetests/oleaut32/olepicture.c deleted file mode 100644 index 9ed87008544..00000000000 --- a/rostests/winetests/oleaut32/olepicture.c +++ /dev/null @@ -1,1216 +0,0 @@ -/* - * OLEPICTURE test program - * - * Copyright 2005 Marcus Meissner - * - * - * 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 - -#define COBJMACROS -#define NONAMELESSUNION - -#include "wine/test.h" -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#define expect_eq(expr, value, type, format) { type ret = (expr); ok((value) == ret, #expr " expected " format " got " format "\n", value, ret); } - -#define ole_expect(expr, expect) { \ - HRESULT r = expr; \ - ok(r == (expect), #expr " returned %x, expected %s (%x)\n", r, #expect, expect); \ -} - -#define ole_check(expr) ole_expect(expr, S_OK); - -static HMODULE hOleaut32; - -static HRESULT (WINAPI *pOleLoadPicture)(LPSTREAM,LONG,BOOL,REFIID,LPVOID*); -static HRESULT (WINAPI *pOleCreatePictureIndirect)(PICTDESC*,REFIID,BOOL,LPVOID*); - -#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr) - -/* 1x1 pixel gif */ -static const unsigned char gifimage[35] = { -0x47,0x49,0x46,0x38,0x37,0x61,0x01,0x00,0x01,0x00,0x80,0x00,0x00,0xff,0xff,0xff, -0xff,0xff,0xff,0x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x02,0x02,0x44, -0x01,0x00,0x3b -}; - -/* 1x1 pixel jpg */ -static const unsigned char jpgimage[285] = { -0xff,0xd8,0xff,0xe0,0x00,0x10,0x4a,0x46,0x49,0x46,0x00,0x01,0x01,0x01,0x01,0x2c, -0x01,0x2c,0x00,0x00,0xff,0xdb,0x00,0x43,0x00,0x05,0x03,0x04,0x04,0x04,0x03,0x05, -0x04,0x04,0x04,0x05,0x05,0x05,0x06,0x07,0x0c,0x08,0x07,0x07,0x07,0x07,0x0f,0x0b, -0x0b,0x09,0x0c,0x11,0x0f,0x12,0x12,0x11,0x0f,0x11,0x11,0x13,0x16,0x1c,0x17,0x13, -0x14,0x1a,0x15,0x11,0x11,0x18,0x21,0x18,0x1a,0x1d,0x1d,0x1f,0x1f,0x1f,0x13,0x17, -0x22,0x24,0x22,0x1e,0x24,0x1c,0x1e,0x1f,0x1e,0xff,0xdb,0x00,0x43,0x01,0x05,0x05, -0x05,0x07,0x06,0x07,0x0e,0x08,0x08,0x0e,0x1e,0x14,0x11,0x14,0x1e,0x1e,0x1e,0x1e, -0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e, -0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e, -0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0xff,0xc0, -0x00,0x11,0x08,0x00,0x01,0x00,0x01,0x03,0x01,0x22,0x00,0x02,0x11,0x01,0x03,0x11, -0x01,0xff,0xc4,0x00,0x15,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xff,0xc4,0x00,0x14,0x10,0x01,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xc4, -0x00,0x14,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0xff,0xc4,0x00,0x14,0x11,0x01,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xda,0x00,0x0c,0x03,0x01, -0x00,0x02,0x11,0x03,0x11,0x00,0x3f,0x00,0xb2,0xc0,0x07,0xff,0xd9 -}; - -/* 1x1 pixel png */ -static const unsigned char pngimage[285] = { -0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,0x44,0x52, -0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x08,0x02,0x00,0x00,0x00,0x90,0x77,0x53, -0xde,0x00,0x00,0x00,0x09,0x70,0x48,0x59,0x73,0x00,0x00,0x0b,0x13,0x00,0x00,0x0b, -0x13,0x01,0x00,0x9a,0x9c,0x18,0x00,0x00,0x00,0x07,0x74,0x49,0x4d,0x45,0x07,0xd5, -0x06,0x03,0x0f,0x07,0x2d,0x12,0x10,0xf0,0xfd,0x00,0x00,0x00,0x0c,0x49,0x44,0x41, -0x54,0x08,0xd7,0x63,0xf8,0xff,0xff,0x3f,0x00,0x05,0xfe,0x02,0xfe,0xdc,0xcc,0x59, -0xe7,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82 -}; - -/* 1x1 pixel bmp */ -static const unsigned char bmpimage[66] = { -0x42,0x4d,0x42,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x28,0x00, -0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00, -0x00,0x00,0x04,0x00,0x00,0x00,0x12,0x0b,0x00,0x00,0x12,0x0b,0x00,0x00,0x02,0x00, -0x00,0x00,0x02,0x00,0x00,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0x00,0x00, -0x00,0x00 -}; - -/* 2x2 pixel gif */ -static const unsigned char gif4pixel[42] = { -0x47,0x49,0x46,0x38,0x37,0x61,0x02,0x00,0x02,0x00,0xa1,0x00,0x00,0x00,0x00,0x00, -0x39,0x62,0xfc,0xff,0x1a,0xe5,0xff,0xff,0xff,0x2c,0x00,0x00,0x00,0x00,0x02,0x00, -0x02,0x00,0x00,0x02,0x03,0x14,0x16,0x05,0x00,0x3b -}; - -/* APM with an empty metafile with some padding zeros - looks like under Window the - * metafile data should be at least 20 bytes */ -static const unsigned char apmdata[] = { -0xd7,0xcd,0xc6,0x9a, 0x00,0x00,0x00,0x00, 0x00,0x00,0xee,0x02, 0xb1,0x03,0xa0,0x05, -0x00,0x00,0x00,0x00, 0xee,0x53,0x01,0x00, 0x09,0x00,0x00,0x03, 0x13,0x00,0x00,0x00, -0x01,0x00,0x05,0x00, 0x00,0x00,0x00,0x00, 0x03,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00 -}; - -/* MF_TEXTOUT_ON_PATH_BITS from gdi32/tests/metafile.c */ -static const unsigned char metafile[] = { - 0x01, 0x00, 0x09, 0x00, 0x00, 0x03, 0x19, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x32, 0x0a, - 0x16, 0x00, 0x0b, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x54, 0x65, 0x73, 0x74, 0x03, 0x00, 0x05, 0x00, - 0x08, 0x00, 0x0c, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00 -}; - -/* EMF_TEXTOUT_ON_PATH_BITS from gdi32/tests/metafile.c */ -static const unsigned char enhmetafile[] = { - 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xe7, 0xff, 0xff, 0xff, 0xe9, 0xff, 0xff, 0xff, - 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00, - 0xf4, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0x40, 0x01, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x04, 0x00, - 0x80, 0xa9, 0x03, 0x00, 0x3b, 0x00, 0x00, 0x00, - 0x08, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, - 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xc8, 0x41, 0x00, 0x80, 0xbb, 0x41, - 0x0b, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x54, 0x00, 0x00, 0x00, - 0x54, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, - 0x08, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, - 0x3c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x14, 0x00, 0x00, 0x00 -}; - - -struct NoStatStreamImpl -{ - const IStreamVtbl *lpVtbl; - LONG ref; - - HGLOBAL supportHandle; - ULARGE_INTEGER streamSize; - ULARGE_INTEGER currentPosition; -}; -typedef struct NoStatStreamImpl NoStatStreamImpl; -static NoStatStreamImpl* NoStatStreamImpl_Construct(HGLOBAL hGlobal); - -static void -test_pic_with_stream(LPSTREAM stream, unsigned int imgsize) -{ - IPicture* pic = NULL; - HRESULT hres; - LPVOID pvObj = NULL; - OLE_HANDLE handle, hPal; - OLE_XSIZE_HIMETRIC width; - OLE_YSIZE_HIMETRIC height; - short type; - DWORD attr; - ULONG res; - - pvObj = NULL; - hres = pOleLoadPicture(stream, imgsize, TRUE, &IID_IPicture, &pvObj); - pic = pvObj; - - ok(hres == S_OK,"OLP (NULL,..) does not return 0, but 0x%08x\n",hres); - ok(pic != NULL,"OLP (NULL,..) returns NULL, instead of !NULL\n"); - if (pic == NULL) - return; - - pvObj = NULL; - hres = IPicture_QueryInterface (pic, &IID_IPicture, &pvObj); - - ok(hres == S_OK,"IPicture_QI does not return S_OK, but 0x%08x\n", hres); - ok(pvObj != NULL,"IPicture_QI does return NULL, instead of a ptr\n"); - - IPicture_Release ((IPicture*)pvObj); - - handle = 0; - hres = IPicture_get_Handle (pic, &handle); - ok(hres == S_OK,"IPicture_get_Handle does not return S_OK, but 0x%08x\n", hres); - ok(handle != 0, "IPicture_get_Handle returns a NULL handle, but it should be non NULL\n"); - - if (handle) - { - BITMAP bmp; - GetObject((HGDIOBJ)handle, sizeof(BITMAP), &bmp); - todo_wine ok(bmp.bmBits != 0, "not a dib\n"); - } - - width = 0; - hres = IPicture_get_Width (pic, &width); - ok(hres == S_OK,"IPicture_get_Width does not return S_OK, but 0x%08x\n", hres); - ok(width != 0, "IPicture_get_Width returns 0, but it should not be 0.\n"); - - height = 0; - hres = IPicture_get_Height (pic, &height); - ok(hres == S_OK,"IPicture_get_Height does not return S_OK, but 0x%08x\n", hres); - ok(height != 0, "IPicture_get_Height returns 0, but it should not be 0.\n"); - - type = 0; - hres = IPicture_get_Type (pic, &type); - ok(hres == S_OK,"IPicture_get_Type does not return S_OK, but 0x%08x\n", hres); - ok(type == PICTYPE_BITMAP, "IPicture_get_Type returns %d, but it should be PICTYPE_BITMAP(%d).\n", type, PICTYPE_BITMAP); - - attr = 0; - hres = IPicture_get_Attributes (pic, &attr); - ok(hres == S_OK,"IPicture_get_Attributes does not return S_OK, but 0x%08x\n", hres); - ok(attr == 0, "IPicture_get_Attributes returns %d, but it should be 0.\n", attr); - - hPal = 0; - hres = IPicture_get_hPal (pic, &hPal); - ok(hres == S_OK,"IPicture_get_hPal does not return S_OK, but 0x%08x\n", hres); - /* a single pixel b/w image has no palette */ - ok(hPal == 0, "IPicture_get_hPal returns %d, but it should be 0.\n", hPal); - - res = IPicture_Release (pic); - ok (res == 0, "refcount after release is %d, but should be 0?\n", res); -} - -static void -test_pic(const unsigned char *imgdata, unsigned int imgsize) -{ - LPSTREAM stream; - HGLOBAL hglob; - LPBYTE data; - HRESULT hres; - LARGE_INTEGER seekto; - ULARGE_INTEGER newpos1; - DWORD * header; - unsigned int i,j; - - /* Let the fun begin */ - hglob = GlobalAlloc (0, imgsize); - data = GlobalLock (hglob); - memcpy(data, imgdata, imgsize); - GlobalUnlock(hglob); data = NULL; - - hres = CreateStreamOnHGlobal (hglob, FALSE, &stream); - ok (hres == S_OK, "createstreamonhglobal failed? doubt it... hres 0x%08x\n", hres); - - memset(&seekto,0,sizeof(seekto)); - hres = IStream_Seek(stream,seekto,SEEK_CUR,&newpos1); - ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08x\n", hres); - test_pic_with_stream(stream, imgsize); - - IStream_Release(stream); - - /* again with Non Statable and Non Seekable stream */ - stream = (LPSTREAM)NoStatStreamImpl_Construct(hglob); - hglob = 0; /* Non-statable impl always deletes on release */ - test_pic_with_stream(stream, 0); - - IStream_Release(stream); - for (i = 1; i <= 8; i++) { - /* more fun!!! */ - hglob = GlobalAlloc (0, imgsize + i * (2 * sizeof(DWORD))); - data = GlobalLock (hglob); - header = (DWORD *)data; - - /* multiple copies of header */ - memcpy(data,"lt\0\0",4); - header[1] = imgsize; - for (j = 2; j <= i; j++) { - memcpy(&(header[2 * (j - 1)]), header, 2 * sizeof(DWORD)); - } - memcpy(data + i * (2 * sizeof(DWORD)), imgdata, imgsize); - GlobalUnlock(hglob); data = NULL; - - hres = CreateStreamOnHGlobal (hglob, FALSE, &stream); - ok (hres == S_OK, "createstreamonhglobal failed? doubt it... hres 0x%08x\n", hres); - - memset(&seekto,0,sizeof(seekto)); - hres = IStream_Seek(stream,seekto,SEEK_CUR,&newpos1); - ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08x\n", hres); - test_pic_with_stream(stream, imgsize); - - IStream_Release(stream); - - /* again with Non Statable and Non Seekable stream */ - stream = (LPSTREAM)NoStatStreamImpl_Construct(hglob); - hglob = 0; /* Non-statable impl always deletes on release */ - test_pic_with_stream(stream, 0); - - IStream_Release(stream); - } -} - -static void test_empty_image(void) { - LPBYTE data; - LPSTREAM stream; - IPicture* pic = NULL; - HRESULT hres; - LPVOID pvObj = NULL; - HGLOBAL hglob; - OLE_HANDLE handle; - ULARGE_INTEGER newpos1; - LARGE_INTEGER seekto; - short type; - DWORD attr; - - /* Empty image. Happens occasionally in VB programs. */ - hglob = GlobalAlloc (0, 8); - data = GlobalLock (hglob); - memcpy(data,"lt\0\0",4); - ((DWORD*)data)[1] = 0; - hres = CreateStreamOnHGlobal (hglob, TRUE, &stream); - ok (hres == S_OK, "CreatestreamOnHGlobal failed? doubt it... hres 0x%08x\n", hres); - - memset(&seekto,0,sizeof(seekto)); - hres = IStream_Seek(stream,seekto,SEEK_CUR,&newpos1); - ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08x\n", hres); - - pvObj = NULL; - hres = pOleLoadPicture(stream, 8, TRUE, &IID_IPicture, &pvObj); - pic = pvObj; - ok(hres == S_OK,"empty picture not loaded, hres 0x%08x\n", hres); - ok(pic != NULL,"empty picture not loaded, pic is NULL\n"); - - hres = IPicture_get_Type (pic, &type); - ok (hres == S_OK,"empty picture get type failed with hres 0x%08x\n", hres); - ok (type == PICTYPE_NONE,"type is %d, but should be PICTYPE_NONE(0)\n", type); - - attr = 0xdeadbeef; - hres = IPicture_get_Attributes (pic, &attr); - ok (hres == S_OK,"empty picture get attributes failed with hres 0x%08x\n", hres); - ok (attr == 0,"attr is %d, but should be 0\n", attr); - - hres = IPicture_get_Handle (pic, &handle); - ok (hres == S_OK,"empty picture get handle failed with hres 0x%08x\n", hres); - ok (handle == 0, "empty picture get handle did not return 0, but 0x%08x\n", handle); - IPicture_Release (pic); - IStream_Release (stream); -} - -static void test_empty_image_2(void) { - LPBYTE data; - LPSTREAM stream; - IPicture* pic = NULL; - HRESULT hres; - LPVOID pvObj = NULL; - HGLOBAL hglob; - ULARGE_INTEGER newpos1; - LARGE_INTEGER seekto; - short type; - - /* Empty image at random stream position. */ - hglob = GlobalAlloc (0, 200); - data = GlobalLock (hglob); - data += 42; - memcpy(data,"lt\0\0",4); - ((DWORD*)data)[1] = 0; - hres = CreateStreamOnHGlobal (hglob, TRUE, &stream); - ok (hres == S_OK, "CreatestreamOnHGlobal failed? doubt it... hres 0x%08x\n", hres); - - memset(&seekto,0,sizeof(seekto)); - seekto.u.LowPart = 42; - hres = IStream_Seek(stream,seekto,SEEK_CUR,&newpos1); - ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08x\n", hres); - - pvObj = NULL; - hres = pOleLoadPicture(stream, 8, TRUE, &IID_IPicture, &pvObj); - pic = pvObj; - ok(hres == S_OK,"empty picture not loaded, hres 0x%08x\n", hres); - ok(pic != NULL,"empty picture not loaded, pic is NULL\n"); - - hres = IPicture_get_Type (pic, &type); - ok (hres == S_OK,"empty picture get type failed with hres 0x%08x\n", hres); - ok (type == PICTYPE_NONE,"type is %d, but should be PICTYPE_NONE(0)\n", type); - - IPicture_Release (pic); - IStream_Release (stream); -} - -static void test_Invoke(void) -{ - IPictureDisp *picdisp; - HRESULT hr; - VARIANTARG vararg; - DISPPARAMS dispparams; - VARIANT varresult; - IStream *stream; - HGLOBAL hglob; - void *data; - - hglob = GlobalAlloc (0, sizeof(gifimage)); - data = GlobalLock(hglob); - memcpy(data, gifimage, sizeof(gifimage)); - GlobalUnlock(hglob); - - hr = CreateStreamOnHGlobal (hglob, FALSE, &stream); - ok_ole_success(hr, "CreateStreamOnHGlobal"); - - hr = pOleLoadPicture(stream, sizeof(gifimage), TRUE, &IID_IPictureDisp, (void **)&picdisp); - IStream_Release(stream); - GlobalFree(hglob); - ok_ole_success(hr, "OleLoadPicture"); - - V_VT(&vararg) = VT_BOOL; - V_BOOL(&vararg) = VARIANT_FALSE; - dispparams.cNamedArgs = 0; - dispparams.rgdispidNamedArgs = NULL; - dispparams.cArgs = 1; - dispparams.rgvarg = &vararg; - hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_IPictureDisp, 0, DISPATCH_PROPERTYPUT, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_UNKNOWNNAME, "IPictureDisp_Invoke should have returned DISP_E_UNKNOWNNAME instead of 0x%08x\n", hr); - hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_IUnknown, 0, DISPATCH_PROPERTYPUT, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_UNKNOWNNAME, "IPictureDisp_Invoke should have returned DISP_E_UNKNOWNNAME instead of 0x%08x\n", hr); - - dispparams.cArgs = 0; - dispparams.rgvarg = NULL; - hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_NULL, 0, DISPATCH_PROPERTYPUT, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_BADPARAMCOUNT, "IPictureDisp_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08x\n", hr); - - hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_NULL, 0, DISPATCH_PROPERTYPUT, NULL, NULL, NULL, NULL); - ok(hr == DISP_E_PARAMNOTOPTIONAL, "IPictureDisp_Invoke should have returned DISP_E_PARAMNOTOPTIONAL instead of 0x%08x\n", hr); - - hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_NULL, 0, DISPATCH_PROPERTYGET, NULL, NULL, NULL, NULL); - ok(hr == DISP_E_PARAMNOTOPTIONAL, "IPictureDisp_Invoke should have returned DISP_E_PARAMNOTOPTIONAL instead of 0x%08x\n", hr); - - hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_NULL, 0, DISPATCH_PROPERTYGET, NULL, &varresult, NULL, NULL); - ok(hr == DISP_E_PARAMNOTOPTIONAL, "IPictureDisp_Invoke should have returned DISP_E_PARAMNOTOPTIONAL instead of 0x%08x\n", hr); - - hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_NULL, 0, DISPATCH_PROPERTYGET, &dispparams, &varresult, NULL, NULL); - ok_ole_success(hr, "IPictureDisp_Invoke"); - ok(V_VT(&varresult) == VT_I4, "V_VT(&varresult) should have been VT_UINT instead of %d\n", V_VT(&varresult)); - - hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_NULL, 0, DISPATCH_METHOD, &dispparams, &varresult, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "IPictureDisp_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); - - hr = IPictureDisp_Invoke(picdisp, 0xdeadbeef, &IID_NULL, 0, DISPATCH_PROPERTYGET, &dispparams, &varresult, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "IPictureDisp_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); - - dispparams.cArgs = 1; - dispparams.rgvarg = &vararg; - hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_NULL, 0, DISPATCH_PROPERTYGET, &dispparams, &varresult, NULL, NULL); - ok(hr == DISP_E_BADPARAMCOUNT, "IPictureDisp_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08x\n", hr); - - dispparams.cArgs = 1; - dispparams.rgvarg = &vararg; - hr = IPictureDisp_Invoke(picdisp, DISPID_PICT_HPAL, &IID_NULL, 0, DISPATCH_PROPERTYGET, &dispparams, &varresult, NULL, NULL); - ok(hr == DISP_E_BADPARAMCOUNT, "IPictureDisp_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08x\n", hr); - - IPictureDisp_Release(picdisp); -} - -static void test_OleCreatePictureIndirect(void) -{ - IPicture *pict; - HRESULT hr; - short type; - OLE_HANDLE handle; - - if(!pOleCreatePictureIndirect) - { - win_skip("Skipping OleCreatePictureIndirect tests\n"); - return; - } - - hr = pOleCreatePictureIndirect(NULL, &IID_IPicture, TRUE, (void**)&pict); - ok(hr == S_OK, "hr %08x\n", hr); - - hr = IPicture_get_Type(pict, &type); - ok(hr == S_OK, "hr %08x\n", hr); - ok(type == PICTYPE_UNINITIALIZED, "type %d\n", type); - - hr = IPicture_get_Handle(pict, &handle); - ok(hr == S_OK, "hr %08x\n", hr); - ok(handle == 0, "handle %08x\n", handle); - - IPicture_Release(pict); -} - -static void test_apm(void) -{ - OLE_HANDLE handle; - LPSTREAM stream; - IPicture *pict; - HGLOBAL hglob; - LPBYTE *data; - LONG cxy; - BOOL keep; - short type; - - if(!winetest_interactive) { - skip("Bug 5000: oleaut_winetest:olepicture crashes with Page Fault.\n"); - return; - } - - hglob = GlobalAlloc (0, sizeof(apmdata)); - data = GlobalLock(hglob); - memcpy(data, apmdata, sizeof(apmdata)); - - ole_check(CreateStreamOnHGlobal(hglob, TRUE, &stream)); - ole_check(OleLoadPictureEx(stream, sizeof(apmdata), TRUE, &IID_IPicture, 100, 100, 0, (LPVOID *)&pict)); - - ole_check(IPicture_get_Handle(pict, &handle)); - ok(handle != 0, "handle is null\n"); - - ole_check(IPicture_get_Type(pict, &type)); - expect_eq(type, PICTYPE_METAFILE, short, "%d"); - - ole_check(IPicture_get_Height(pict, &cxy)); - expect_eq(cxy, 1667, LONG, "%d"); - - ole_check(IPicture_get_Width(pict, &cxy)); - expect_eq(cxy, 1323, LONG, "%d"); - - ole_check(IPicture_get_KeepOriginalFormat(pict, &keep)); - todo_wine expect_eq(keep, FALSE, LONG, "%d"); - - ole_expect(IPicture_get_hPal(pict, &handle), E_FAIL); - IPicture_Release(pict); - IStream_Release(stream); -} - -static void test_metafile(void) -{ - LPSTREAM stream; - IPicture *pict; - HGLOBAL hglob; - LPBYTE *data; - - hglob = GlobalAlloc (0, sizeof(metafile)); - data = GlobalLock(hglob); - memcpy(data, metafile, sizeof(metafile)); - - ole_check(CreateStreamOnHGlobal(hglob, TRUE, &stream)); - /* Windows does not load simple metafiles */ - ole_expect(OleLoadPictureEx(stream, sizeof(metafile), TRUE, &IID_IPicture, 100, 100, 0, (LPVOID *)&pict), E_FAIL); - - IStream_Release(stream); -} - -static void test_enhmetafile(void) -{ - OLE_HANDLE handle; - LPSTREAM stream; - IPicture *pict; - HGLOBAL hglob; - LPBYTE *data; - LONG cxy; - BOOL keep; - short type; - - if(!winetest_interactive) { - skip("Bug 5000: oleaut_winetest:olepicture crashes with Page Fault.\n"); - return; - } - - hglob = GlobalAlloc (0, sizeof(enhmetafile)); - data = GlobalLock(hglob); - memcpy(data, enhmetafile, sizeof(enhmetafile)); - - ole_check(CreateStreamOnHGlobal(hglob, TRUE, &stream)); - ole_check(OleLoadPictureEx(stream, sizeof(enhmetafile), TRUE, &IID_IPicture, 10, 10, 0, (LPVOID *)&pict)); - - ole_check(IPicture_get_Handle(pict, &handle)); - ok(handle != 0, "handle is null\n"); - - ole_check(IPicture_get_Type(pict, &type)); - expect_eq(type, PICTYPE_ENHMETAFILE, short, "%d"); - - ole_check(IPicture_get_Height(pict, &cxy)); - expect_eq(cxy, -23, LONG, "%d"); - - ole_check(IPicture_get_Width(pict, &cxy)); - expect_eq(cxy, -25, LONG, "%d"); - - ole_check(IPicture_get_KeepOriginalFormat(pict, &keep)); - todo_wine expect_eq(keep, FALSE, LONG, "%d"); - - IPicture_Release(pict); - IStream_Release(stream); -} - -static void test_Render(void) -{ - IPicture *pic; - HRESULT hres; - short type; - PICTDESC desc; - OLE_XSIZE_HIMETRIC pWidth; - OLE_YSIZE_HIMETRIC pHeight; - COLORREF result, expected; - HDC hdc = GetDC(0); - - /* test IPicture::Render return code on uninitialized picture */ - OleCreatePictureIndirect(NULL, &IID_IPicture, TRUE, (VOID**)&pic); - hres = IPicture_get_Type(pic, &type); - ok(hres == S_OK, "IPicture_get_Type does not return S_OK, but 0x%08x\n", hres); - ok(type == PICTYPE_UNINITIALIZED, "Expected type = PICTYPE_UNINITIALIZED, got = %d\n", type); - /* zero dimensions */ - hres = IPicture_Render(pic, hdc, 0, 0, 0, 0, 0, 0, 0, 0, NULL); - ole_expect(hres, CTL_E_INVALIDPROPERTYVALUE); - hres = IPicture_Render(pic, hdc, 0, 0, 10, 10, 0, 0, 10, 0, NULL); - ole_expect(hres, CTL_E_INVALIDPROPERTYVALUE); - hres = IPicture_Render(pic, hdc, 0, 0, 10, 10, 0, 0, 0, 10, NULL); - ole_expect(hres, CTL_E_INVALIDPROPERTYVALUE); - hres = IPicture_Render(pic, hdc, 0, 0, 10, 10, 0, 0, 0, 0, NULL); - ole_expect(hres, CTL_E_INVALIDPROPERTYVALUE); - hres = IPicture_Render(pic, hdc, 0, 0, 0, 10, 0, 0, 10, 10, NULL); - ole_expect(hres, CTL_E_INVALIDPROPERTYVALUE); - hres = IPicture_Render(pic, hdc, 0, 0, 10, 0, 0, 0, 10, 10, NULL); - ole_expect(hres, CTL_E_INVALIDPROPERTYVALUE); - hres = IPicture_Render(pic, hdc, 0, 0, 0, 0, 0, 0, 10, 10, NULL); - ole_expect(hres, CTL_E_INVALIDPROPERTYVALUE); - /* nonzero dimensions, PICTYPE_UNINITIALIZED */ - hres = IPicture_Render(pic, hdc, 0, 0, 10, 10, 0, 0, 10, 10, NULL); - ole_expect(hres, S_OK); - IPicture_Release(pic); - - desc.cbSizeofstruct = sizeof(PICTDESC); - desc.picType = PICTYPE_ICON; - desc.u.icon.hicon = LoadIcon(NULL, IDI_APPLICATION); - if(!desc.u.icon.hicon){ - win_skip("LoadIcon failed. Skipping...\n"); - ReleaseDC(NULL, hdc); - return; - } - - OleCreatePictureIndirect(&desc, &IID_IPicture, TRUE, (VOID**)&pic); - /* zero dimensions, PICTYPE_ICON */ - hres = IPicture_Render(pic, hdc, 0, 0, 0, 0, 0, 0, 0, 0, NULL); - ole_expect(hres, CTL_E_INVALIDPROPERTYVALUE); - hres = IPicture_Render(pic, hdc, 0, 0, 10, 10, 0, 0, 10, 0, NULL); - ole_expect(hres, CTL_E_INVALIDPROPERTYVALUE); - hres = IPicture_Render(pic, hdc, 0, 0, 10, 10, 0, 0, 0, 10, NULL); - ole_expect(hres, CTL_E_INVALIDPROPERTYVALUE); - hres = IPicture_Render(pic, hdc, 0, 0, 10, 10, 0, 0, 0, 0, NULL); - ole_expect(hres, CTL_E_INVALIDPROPERTYVALUE); - hres = IPicture_Render(pic, hdc, 0, 0, 0, 10, 0, 0, 10, 10, NULL); - ole_expect(hres, CTL_E_INVALIDPROPERTYVALUE); - hres = IPicture_Render(pic, hdc, 0, 0, 10, 0, 0, 0, 10, 10, NULL); - ole_expect(hres, CTL_E_INVALIDPROPERTYVALUE); - hres = IPicture_Render(pic, hdc, 0, 0, 0, 0, 0, 0, 10, 10, NULL); - ole_expect(hres, CTL_E_INVALIDPROPERTYVALUE); - - /* Check if target size and position is respected */ - IPicture_get_Width(pic, &pWidth); - IPicture_get_Height(pic, &pHeight); - - SetPixelV(hdc, 0, 0, 0x00F0F0F0); - SetPixelV(hdc, 5, 5, 0x00F0F0F0); - SetPixelV(hdc, 10, 10, 0x00F0F0F0); - expected = GetPixel(hdc, 0, 0); - - hres = IPicture_Render(pic, hdc, 1, 1, 9, 9, 0, 0, pWidth, -pHeight, NULL); - ole_expect(hres, S_OK); - - if(hres != S_OK) { - IPicture_Release(pic); - ReleaseDC(NULL, hdc); - return; - } - - /* Evaluate the rendered Icon */ - result = GetPixel(hdc, 0, 0); - ok(result == expected, - "Color at 0,0 should be unchanged 0x%06X, but was 0x%06X\n", expected, result); - result = GetPixel(hdc, 5, 5); - ok(result != expected || - broken(result == expected), /* WinNT 4.0 and older may claim they drew */ - /* the icon, even if they didn't. */ - "Color at 5,5 should have changed, but still was 0x%06X\n", expected); - result = GetPixel(hdc, 10, 10); - ok(result == expected, - "Color at 10,10 should be unchanged 0x%06X, but was 0x%06X\n", expected, result); - - IPicture_Release(pic); - ReleaseDC(NULL, hdc); -} - -static void test_get_Attributes(void) -{ - IPicture *pic; - HRESULT hres; - short type; - DWORD attr; - - OleCreatePictureIndirect(NULL, &IID_IPicture, TRUE, (VOID**)&pic); - hres = IPicture_get_Type(pic, &type); - ok(hres == S_OK, "IPicture_get_Type does not return S_OK, but 0x%08x\n", hres); - ok(type == PICTYPE_UNINITIALIZED, "Expected type = PICTYPE_UNINITIALIZED, got = %d\n", type); - - hres = IPicture_get_Attributes(pic, NULL); - ole_expect(hres, E_POINTER); - - attr = 0xdeadbeef; - hres = IPicture_get_Attributes(pic, &attr); - ole_expect(hres, S_OK); - ok(attr == 0, "IPicture_get_Attributes does not reset attr to zero, got %d\n", attr); - - IPicture_Release(pic); -} - -static void test_get_Handle(void) -{ - IPicture *pic; - HRESULT hres; - - OleCreatePictureIndirect(NULL, &IID_IPicture, TRUE, (VOID**)&pic); - - hres = IPicture_get_Handle(pic, NULL); - ole_expect(hres, E_POINTER); - - IPicture_Release(pic); -} - -static void test_get_Type(void) -{ - IPicture *pic; - HRESULT hres; - - OleCreatePictureIndirect(NULL, &IID_IPicture, TRUE, (VOID**)&pic); - - hres = IPicture_get_Type(pic, NULL); - ole_expect(hres, E_POINTER); - - IPicture_Release(pic); -} - -static void test_OleLoadPicturePath(void) -{ - static WCHAR emptyW[] = {0}; - - IPicture *pic; - HRESULT hres; - int i; - char temp_path[MAX_PATH]; - char temp_file[MAX_PATH]; - WCHAR temp_fileW[MAX_PATH + 5] = {'f','i','l','e',':','/','/','/'}; - HANDLE file; - DWORD size; - WCHAR *ptr; - - const struct - { - LPOLESTR szURLorPath; - REFIID riid; - IPicture **pic; - } invalid_parameters[] = - { - {NULL, NULL, NULL}, - {NULL, NULL, &pic}, - {NULL, &IID_IPicture, NULL}, - {NULL, &IID_IPicture, &pic}, - {emptyW, NULL, NULL}, - {emptyW, &IID_IPicture, NULL}, - }; - - for (i = 0; i < sizeof(invalid_parameters)/sizeof(invalid_parameters[0]); i++) - { - pic = (IPicture *)0xdeadbeef; - hres = OleLoadPicturePath(invalid_parameters[i].szURLorPath, NULL, 0, 0, - invalid_parameters[i].riid, - (void **)invalid_parameters[i].pic); - ok(hres == E_INVALIDARG, - "[%d] Expected OleLoadPicturePath to return E_INVALIDARG, got 0x%08x\n", i, hres); - ok(pic == (IPicture *)0xdeadbeef, - "[%d] Expected output pointer to be 0xdeadbeef, got %p\n", i, pic); - } - - pic = (IPicture *)0xdeadbeef; - hres = OleLoadPicturePath(emptyW, NULL, 0, 0, NULL, (void **)&pic); - todo_wine - ok(hres == INET_E_UNKNOWN_PROTOCOL || /* XP/Vista+ */ - hres == E_UNEXPECTED || /* NT4/Win95 */ - hres == E_FAIL || /* Win95 OSR2 */ - hres == E_OUTOFMEMORY, /* Win98/Win2k/Win2k3 */ - "Expected OleLoadPicturePath to return INET_E_UNKNOWN_PROTOCOL, got 0x%08x\n", hres); - ok(pic == NULL, - "Expected the output interface pointer to be NULL, got %p\n", pic); - - pic = (IPicture *)0xdeadbeef; - hres = OleLoadPicturePath(emptyW, NULL, 0, 0, &IID_IPicture, (void **)&pic); - todo_wine - ok(hres == INET_E_UNKNOWN_PROTOCOL || /* XP/Vista+ */ - hres == E_UNEXPECTED || /* NT4/Win95 */ - hres == E_FAIL || /* Win95 OSR2 */ - hres == E_OUTOFMEMORY, /* Win98/Win2k/Win2k3 */ - "Expected OleLoadPicturePath to return INET_E_UNKNOWN_PROTOCOL, got 0x%08x\n", hres); - ok(pic == NULL, - "Expected the output interface pointer to be NULL, got %p\n", pic); - - /* Create a local temporary image file for testing. */ - GetTempPathA(sizeof(temp_path), temp_path); - GetTempFileNameA(temp_path, "bmp", 0, temp_file); - file = CreateFileA(temp_file, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, NULL); - WriteFile(file, bmpimage, sizeof(bmpimage), &size, NULL); - CloseHandle(file); - - MultiByteToWideChar(CP_ACP, 0, temp_file, -1, temp_fileW + 8, sizeof(temp_fileW)/sizeof(WCHAR) - 8); - - /* Try a normal DOS path. */ - hres = OleLoadPicturePath(temp_fileW + 8, NULL, 0, 0, &IID_IPicture, (void **)&pic); - ok(hres == S_OK || - broken(hres == E_UNEXPECTED), /* NT4/Win95 */ - "Expected OleLoadPicturePath to return S_OK, got 0x%08x\n", hres); - if (pic) - IPicture_Release(pic); - - /* Try a DOS path with tacked on "file:". */ - hres = OleLoadPicturePath(temp_fileW, NULL, 0, 0, &IID_IPicture, (void **)&pic); - ok(hres == S_OK || - broken(hres == E_UNEXPECTED), /* NT4/Win95 */ - "Expected OleLoadPicturePath to return S_OK, got 0x%08x\n", hres); - if (pic) - IPicture_Release(pic); - - DeleteFileA(temp_file); - - /* Try with a nonexistent file. */ - hres = OleLoadPicturePath(temp_fileW + 8, NULL, 0, 0, &IID_IPicture, (void **)&pic); - ok(hres == INET_E_RESOURCE_NOT_FOUND || /* XP+ */ - hres == E_UNEXPECTED || /* NT4/Win95 */ - hres == E_FAIL, /* Win9x/Win2k */ - "Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08x\n", hres); - - hres = OleLoadPicturePath(temp_fileW, NULL, 0, 0, &IID_IPicture, (void **)&pic); - ok(hres == INET_E_RESOURCE_NOT_FOUND || /* XP+ */ - hres == E_UNEXPECTED || /* NT4/Win95 */ - hres == E_FAIL, /* Win9x/Win2k */ - "Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08x\n", hres); - - file = CreateFileA(temp_file, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, NULL); - WriteFile(file, bmpimage, sizeof(bmpimage), &size, NULL); - CloseHandle(file); - - /* Try a "file:" URL with slash separators. */ - ptr = temp_fileW + 8; - while (*ptr) - { - if (*ptr == '\\') - *ptr = '/'; - ptr++; - } - - hres = OleLoadPicturePath(temp_fileW, NULL, 0, 0, &IID_IPicture, (void **)&pic); - ok(hres == S_OK || - broken(hres == E_UNEXPECTED), /* NT4/Win95 */ - "Expected OleLoadPicturePath to return S_OK, got 0x%08x\n", hres); - if (pic) - IPicture_Release(pic); - - DeleteFileA(temp_file); - - /* Try with a nonexistent file. */ - hres = OleLoadPicturePath(temp_fileW, NULL, 0, 0, &IID_IPicture, (void **)&pic); - ok(hres == INET_E_RESOURCE_NOT_FOUND || /* XP+ */ - hres == E_UNEXPECTED || /* NT4/Win95 */ - hres == E_FAIL, /* Win9x/Win2k */ - "Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08x\n", hres); -} - -START_TEST(olepicture) -{ - hOleaut32 = GetModuleHandleA("oleaut32.dll"); - pOleLoadPicture = (void*)GetProcAddress(hOleaut32, "OleLoadPicture"); - pOleCreatePictureIndirect = (void*)GetProcAddress(hOleaut32, "OleCreatePictureIndirect"); - if (!pOleLoadPicture) - { - win_skip("OleLoadPicture is not available\n"); - return; - } - - /* Test regular 1x1 pixel images of gif, jpg, bmp type */ - test_pic(gifimage, sizeof(gifimage)); - test_pic(jpgimage, sizeof(jpgimage)); - test_pic(bmpimage, sizeof(bmpimage)); - test_pic(gif4pixel, sizeof(gif4pixel)); - /* FIXME: No PNG support in Windows... */ - if (0) test_pic(pngimage, sizeof(pngimage)); - test_empty_image(); - test_empty_image_2(); - test_apm(); - test_metafile(); - test_enhmetafile(); - - test_Invoke(); - test_OleCreatePictureIndirect(); - test_Render(); - test_get_Attributes(); - test_get_Handle(); - test_get_Type(); - test_OleLoadPicturePath(); -} - - -/* Helper functions only ... */ - - -static void NoStatStreamImpl_Destroy(NoStatStreamImpl* This) -{ - GlobalFree(This->supportHandle); - This->supportHandle=0; - HeapFree(GetProcessHeap(), 0, This); -} - -static ULONG WINAPI NoStatStreamImpl_AddRef( - IStream* iface) -{ - NoStatStreamImpl* const This=(NoStatStreamImpl*)iface; - return InterlockedIncrement(&This->ref); -} - -static HRESULT WINAPI NoStatStreamImpl_QueryInterface( - IStream* iface, - REFIID riid, /* [in] */ - void** ppvObject) /* [iid_is][out] */ -{ - NoStatStreamImpl* const This=(NoStatStreamImpl*)iface; - if (ppvObject==0) return E_INVALIDARG; - *ppvObject = 0; - if (IsEqualIID(&IID_IUnknown, riid)) - { - *ppvObject = This; - } - else if (IsEqualIID(&IID_IStream, riid)) - { - *ppvObject = This; - } - - if ((*ppvObject)==0) - return E_NOINTERFACE; - NoStatStreamImpl_AddRef(iface); - return S_OK; -} - -static ULONG WINAPI NoStatStreamImpl_Release( - IStream* iface) -{ - NoStatStreamImpl* const This=(NoStatStreamImpl*)iface; - ULONG newRef = InterlockedDecrement(&This->ref); - if (newRef==0) - NoStatStreamImpl_Destroy(This); - return newRef; -} - -static HRESULT WINAPI NoStatStreamImpl_Read( - IStream* iface, - void* pv, /* [length_is][size_is][out] */ - ULONG cb, /* [in] */ - ULONG* pcbRead) /* [out] */ -{ - NoStatStreamImpl* const This=(NoStatStreamImpl*)iface; - void* supportBuffer; - ULONG bytesReadBuffer; - ULONG bytesToReadFromBuffer; - - if (pcbRead==0) - pcbRead = &bytesReadBuffer; - bytesToReadFromBuffer = min( This->streamSize.u.LowPart - This->currentPosition.u.LowPart, cb); - supportBuffer = GlobalLock(This->supportHandle); - memcpy(pv, (char *) supportBuffer+This->currentPosition.u.LowPart, bytesToReadFromBuffer); - This->currentPosition.u.LowPart+=bytesToReadFromBuffer; - *pcbRead = bytesToReadFromBuffer; - GlobalUnlock(This->supportHandle); - if(*pcbRead == cb) - return S_OK; - return S_FALSE; -} - -static HRESULT WINAPI NoStatStreamImpl_Write( - IStream* iface, - const void* pv, /* [size_is][in] */ - ULONG cb, /* [in] */ - ULONG* pcbWritten) /* [out] */ -{ - NoStatStreamImpl* const This=(NoStatStreamImpl*)iface; - void* supportBuffer; - ULARGE_INTEGER newSize; - ULONG bytesWritten = 0; - - if (pcbWritten == 0) - pcbWritten = &bytesWritten; - if (cb == 0) - return S_OK; - newSize.u.HighPart = 0; - newSize.u.LowPart = This->currentPosition.u.LowPart + cb; - if (newSize.u.LowPart > This->streamSize.u.LowPart) - IStream_SetSize(iface, newSize); - - supportBuffer = GlobalLock(This->supportHandle); - memcpy((char *) supportBuffer+This->currentPosition.u.LowPart, pv, cb); - This->currentPosition.u.LowPart+=cb; - *pcbWritten = cb; - GlobalUnlock(This->supportHandle); - return S_OK; -} - -static HRESULT WINAPI NoStatStreamImpl_Seek( - IStream* iface, - LARGE_INTEGER dlibMove, /* [in] */ - DWORD dwOrigin, /* [in] */ - ULARGE_INTEGER* plibNewPosition) /* [out] */ -{ - NoStatStreamImpl* const This=(NoStatStreamImpl*)iface; - ULARGE_INTEGER newPosition; - switch (dwOrigin) - { - case STREAM_SEEK_SET: - newPosition.u.HighPart = 0; - newPosition.u.LowPart = 0; - break; - case STREAM_SEEK_CUR: - newPosition = This->currentPosition; - break; - case STREAM_SEEK_END: - newPosition = This->streamSize; - break; - default: - return STG_E_INVALIDFUNCTION; - } - if (dlibMove.QuadPart < 0 && newPosition.QuadPart < -dlibMove.QuadPart) - return STG_E_INVALIDFUNCTION; - newPosition.QuadPart += dlibMove.QuadPart; - if (plibNewPosition) *plibNewPosition = newPosition; - This->currentPosition = newPosition; - return S_OK; -} - -static HRESULT WINAPI NoStatStreamImpl_SetSize( - IStream* iface, - ULARGE_INTEGER libNewSize) /* [in] */ -{ - NoStatStreamImpl* const This=(NoStatStreamImpl*)iface; - HGLOBAL supportHandle; - if (libNewSize.u.HighPart != 0) - return STG_E_INVALIDFUNCTION; - if (This->streamSize.u.LowPart == libNewSize.u.LowPart) - return S_OK; - supportHandle = GlobalReAlloc(This->supportHandle, libNewSize.u.LowPart, 0); - if (supportHandle == 0) - return STG_E_MEDIUMFULL; - This->supportHandle = supportHandle; - This->streamSize.u.LowPart = libNewSize.u.LowPart; - return S_OK; -} - -static HRESULT WINAPI NoStatStreamImpl_CopyTo( - IStream* iface, - IStream* pstm, /* [unique][in] */ - ULARGE_INTEGER cb, /* [in] */ - ULARGE_INTEGER* pcbRead, /* [out] */ - ULARGE_INTEGER* pcbWritten) /* [out] */ -{ - HRESULT hr = S_OK; - BYTE tmpBuffer[128]; - ULONG bytesRead, bytesWritten, copySize; - ULARGE_INTEGER totalBytesRead; - ULARGE_INTEGER totalBytesWritten; - - if ( pstm == 0 ) - return STG_E_INVALIDPOINTER; - totalBytesRead.u.LowPart = totalBytesRead.u.HighPart = 0; - totalBytesWritten.u.LowPart = totalBytesWritten.u.HighPart = 0; - - while ( cb.u.LowPart > 0 ) - { - if ( cb.u.LowPart >= 128 ) - copySize = 128; - else - copySize = cb.u.LowPart; - IStream_Read(iface, tmpBuffer, copySize, &bytesRead); - totalBytesRead.u.LowPart += bytesRead; - IStream_Write(pstm, tmpBuffer, bytesRead, &bytesWritten); - totalBytesWritten.u.LowPart += bytesWritten; - if (bytesRead != bytesWritten) - { - hr = STG_E_MEDIUMFULL; - break; - } - if (bytesRead!=copySize) - cb.u.LowPart = 0; - else - cb.u.LowPart -= bytesRead; - } - if (pcbRead) - { - pcbRead->u.LowPart = totalBytesRead.u.LowPart; - pcbRead->u.HighPart = totalBytesRead.u.HighPart; - } - - if (pcbWritten) - { - pcbWritten->u.LowPart = totalBytesWritten.u.LowPart; - pcbWritten->u.HighPart = totalBytesWritten.u.HighPart; - } - return hr; -} - -static HRESULT WINAPI NoStatStreamImpl_Commit(IStream* iface,DWORD grfCommitFlags) -{ - return S_OK; -} -static HRESULT WINAPI NoStatStreamImpl_Revert(IStream* iface) { return S_OK; } - -static HRESULT WINAPI NoStatStreamImpl_LockRegion( - IStream* iface, - ULARGE_INTEGER libOffset, /* [in] */ - ULARGE_INTEGER cb, /* [in] */ - DWORD dwLockType) /* [in] */ -{ - return S_OK; -} - -static HRESULT WINAPI NoStatStreamImpl_UnlockRegion( - IStream* iface, - ULARGE_INTEGER libOffset, /* [in] */ - ULARGE_INTEGER cb, /* [in] */ - DWORD dwLockType) /* [in] */ -{ - return S_OK; -} - -static HRESULT WINAPI NoStatStreamImpl_Stat( - IStream* iface, - STATSTG* pstatstg, /* [out] */ - DWORD grfStatFlag) /* [in] */ -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI NoStatStreamImpl_Clone( - IStream* iface, - IStream** ppstm) /* [out] */ -{ - return E_NOTIMPL; -} -static const IStreamVtbl NoStatStreamImpl_Vtbl; - -/* - Build an object that implements IStream, without IStream_Stat capabilities. - Receives a memory handle with data buffer. If memory handle is non-null, - it is assumed to be unlocked, otherwise an internal memory handle is allocated. - In any case the object takes ownership of memory handle and will free it on - object release. - */ -static NoStatStreamImpl* NoStatStreamImpl_Construct(HGLOBAL hGlobal) -{ - NoStatStreamImpl* newStream; - - newStream = HeapAlloc(GetProcessHeap(), 0, sizeof(NoStatStreamImpl)); - if (newStream!=0) - { - newStream->lpVtbl = &NoStatStreamImpl_Vtbl; - newStream->ref = 1; - newStream->supportHandle = hGlobal; - - if (!newStream->supportHandle) - newStream->supportHandle = GlobalAlloc(GMEM_MOVEABLE | GMEM_NODISCARD | - GMEM_SHARE, 0); - newStream->currentPosition.u.HighPart = 0; - newStream->currentPosition.u.LowPart = 0; - newStream->streamSize.u.HighPart = 0; - newStream->streamSize.u.LowPart = GlobalSize(newStream->supportHandle); - } - return newStream; -} - - -static const IStreamVtbl NoStatStreamImpl_Vtbl = -{ - NoStatStreamImpl_QueryInterface, - NoStatStreamImpl_AddRef, - NoStatStreamImpl_Release, - NoStatStreamImpl_Read, - NoStatStreamImpl_Write, - NoStatStreamImpl_Seek, - NoStatStreamImpl_SetSize, - NoStatStreamImpl_CopyTo, - NoStatStreamImpl_Commit, - NoStatStreamImpl_Revert, - NoStatStreamImpl_LockRegion, - NoStatStreamImpl_UnlockRegion, - NoStatStreamImpl_Stat, - NoStatStreamImpl_Clone -}; diff --git a/rostests/winetests/oleaut32/safearray.c b/rostests/winetests/oleaut32/safearray.c deleted file mode 100644 index 29e8761c90a..00000000000 --- a/rostests/winetests/oleaut32/safearray.c +++ /dev/null @@ -1,1739 +0,0 @@ -/* - * SafeArray test program - * - * Copyright 2002 Marcus Meissner - * - * 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 - -#define COBJMACROS -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "wingdi.h" -#include "winnls.h" -#include "winsock.h" -#include "winerror.h" -#include "winnt.h" - -#include "wtypes.h" -#include "oleauto.h" - -static HMODULE hOleaut32; - -static HRESULT (WINAPI *pSafeArrayAllocDescriptorEx)(VARTYPE,UINT,SAFEARRAY**); -static HRESULT (WINAPI *pSafeArrayCopyData)(SAFEARRAY*,SAFEARRAY*); -static HRESULT (WINAPI *pSafeArrayGetIID)(SAFEARRAY*,GUID*); -static HRESULT (WINAPI *pSafeArraySetIID)(SAFEARRAY*,REFGUID); -static HRESULT (WINAPI *pSafeArrayGetVartype)(SAFEARRAY*,VARTYPE*); -static HRESULT (WINAPI *pSafeArrayGetRecordInfo)(SAFEARRAY*,IRecordInfo**); -static SAFEARRAY* (WINAPI *pSafeArrayCreateEx)(VARTYPE,UINT,SAFEARRAYBOUND*,LPVOID); -static SAFEARRAY* (WINAPI *pSafeArrayCreateVector)(VARTYPE,LONG,ULONG); - -#define GETPTR(func) p##func = (void*)GetProcAddress(hOleaut32, #func) - -/* Is a given function exported from oleaut32? */ -#define HAVE_FUNC(func) ((void*)GetProcAddress(hOleaut32, #func) != NULL) - -/* Have IRecordInfo data type? */ -#define HAVE_OLEAUT32_RECORD HAVE_FUNC(SafeArraySetRecordInfo) -/* Have R8 data type? */ -#define HAVE_OLEAUT32_R8 HAVE_FUNC(VarR8FromI1) -/* Have I8/UI8 data type? */ -#define HAVE_OLEAUT32_I8 HAVE_FUNC(VarI8FromI1) -/* Have the decimal type? */ -#define HAVE_OLEAUT32_DECIMAL HAVE_FUNC(VarDecAdd) -/* Have INT_PTR/UINT_PTR type? */ -static BOOL HAVE_OLEAUT32_INT_PTR; - -/* very old version? */ -#define IS_ANCIENT (!HAVE_FUNC(VarI1FromI2)) - -#define START_REF_COUNT 1 -#define RECORD_SIZE 64 -#define RECORD_SIZE_FAIL 17 -/************************************************************************ - * Dummy IRecordInfo Implementation - */ -typedef struct IRecordInfoImpl -{ - const IRecordInfoVtbl *lpvtbl; - LONG ref; - DWORD sizeCalled; - DWORD clearCalled; -} IRecordInfoImpl; - -static const IRecordInfoVtbl IRecordInfoImpl_VTable; - -static IRecordInfoImpl *IRecordInfoImpl_Construct(void) -{ - IRecordInfoImpl *rec; - - rec = HeapAlloc(GetProcessHeap(), 0, sizeof(IRecordInfoImpl)); - rec->lpvtbl = &IRecordInfoImpl_VTable; - rec->ref = START_REF_COUNT; - rec->clearCalled = 0; - rec->sizeCalled = 0; - return rec; -} - -static ULONG CALLBACK IRecordInfoImpl_AddRef(IRecordInfo *iface) -{ - IRecordInfoImpl* This=(IRecordInfoImpl*)iface; - return InterlockedIncrement(&This->ref); -} - -static ULONG CALLBACK IRecordInfoImpl_Release(IRecordInfo *iface) -{ - IRecordInfoImpl* This=(IRecordInfoImpl*)iface; - return InterlockedDecrement(&This->ref); -} - -static BOOL fail_GetSize; /* Whether to fail the GetSize call */ - -static HRESULT CALLBACK IRecordInfoImpl_RecordClear(IRecordInfo *iface, PVOID pvExisting) -{ - IRecordInfoImpl* This=(IRecordInfoImpl*)iface; - This->clearCalled++; - return S_OK; -} - -static HRESULT CALLBACK IRecordInfoImpl_GetSize(IRecordInfo *iface, ULONG* size) -{ - IRecordInfoImpl* This=(IRecordInfoImpl*)iface; - This->sizeCalled++; - *size = 17; - if (fail_GetSize) - return E_UNEXPECTED; - *size = RECORD_SIZE; - return S_OK; -} - -static HRESULT CALLBACK IRecordInfoImpl_Dummy(IRecordInfo *iface) -{ - trace("Called an unexpected IRecordInfo method - please report!\n"); - /* Quit because we'll just crash anyway */ - fflush(NULL); - exit(255); -} - -static const IRecordInfoVtbl IRecordInfoImpl_VTable = -{ - (PVOID)IRecordInfoImpl_Dummy, - IRecordInfoImpl_AddRef, - IRecordInfoImpl_Release, - (PVOID)IRecordInfoImpl_Dummy, - IRecordInfoImpl_RecordClear, - (PVOID)IRecordInfoImpl_Dummy, - (PVOID)IRecordInfoImpl_Dummy, - (PVOID)IRecordInfoImpl_Dummy, - IRecordInfoImpl_GetSize, - (PVOID)IRecordInfoImpl_Dummy, - (PVOID)IRecordInfoImpl_Dummy, - (PVOID)IRecordInfoImpl_Dummy, - (PVOID)IRecordInfoImpl_Dummy, - (PVOID)IRecordInfoImpl_Dummy, - (PVOID)IRecordInfoImpl_Dummy, - (PVOID)IRecordInfoImpl_Dummy, - (PVOID)IRecordInfoImpl_Dummy, - (PVOID)IRecordInfoImpl_Dummy, - (PVOID)IRecordInfoImpl_Dummy -}; - -static DWORD SAFEARRAY_GetVTSize(VARTYPE vt) -{ - switch (vt) - { - case VT_I1: - case VT_UI1: return sizeof(BYTE); - case VT_BOOL: - case VT_I2: - case VT_UI2: return sizeof(SHORT); - case VT_I4: - case VT_UI4: - case VT_R4: - case VT_ERROR: return sizeof(LONG); - case VT_R8: - if (HAVE_OLEAUT32_R8) - return sizeof(LONG64); - case VT_I8: - case VT_UI8: - if (HAVE_OLEAUT32_I8) - return sizeof(LONG64); - break; - case VT_INT: - case VT_UINT: return sizeof(INT); - case VT_INT_PTR: - case VT_UINT_PTR: - if (HAVE_OLEAUT32_INT_PTR) - return sizeof(UINT_PTR); - break; - case VT_CY: return sizeof(CY); - case VT_DATE: return sizeof(DATE); - case VT_BSTR: return sizeof(BSTR); - case VT_DISPATCH: return sizeof(LPDISPATCH); - case VT_VARIANT: return sizeof(VARIANT); - case VT_UNKNOWN: return sizeof(LPUNKNOWN); - case VT_DECIMAL: - if (HAVE_OLEAUT32_DECIMAL) - return sizeof(DECIMAL); - break; - } - return 0; -} - -static void check_for_VT_INT_PTR(void) -{ - /* Set a global flag if VT_INT_PTR is supported */ - - SAFEARRAY* a; - SAFEARRAYBOUND bound; - bound.cElements = 0; - bound.lLbound = 0; - a = SafeArrayCreate(VT_INT_PTR, 1, &bound); - if (a) { - trace("VT_INT_PTR is supported\n"); - HAVE_OLEAUT32_INT_PTR = TRUE; - SafeArrayDestroy(a); - } - else { - trace("VT_INT_PTR is not supported\n"); - HAVE_OLEAUT32_INT_PTR = FALSE; - } -} - -#define VARTYPE_NOT_SUPPORTED 0 -static struct { - VARTYPE vt; /* VT */ - UINT elemsize; /* elementsize by VT */ - UINT expflags; /* fFeatures from SafeArrayAllocDescriptorEx */ - UINT addflags; /* additional fFeatures from SafeArrayCreate */ -} vttypes[] = { -{VT_EMPTY, VARTYPE_NOT_SUPPORTED,FADF_HAVEVARTYPE,0}, -{VT_NULL, VARTYPE_NOT_SUPPORTED,FADF_HAVEVARTYPE,0}, -{VT_I2, 2, FADF_HAVEVARTYPE,0}, -{VT_I4, 4, FADF_HAVEVARTYPE,0}, -{VT_R4, 4, FADF_HAVEVARTYPE,0}, -{VT_R8, 8, FADF_HAVEVARTYPE,0}, -{VT_CY, 8, FADF_HAVEVARTYPE,0}, -{VT_DATE, 8, FADF_HAVEVARTYPE,0}, -{VT_BSTR, sizeof(BSTR), FADF_HAVEVARTYPE,FADF_BSTR}, -{VT_DISPATCH, sizeof(LPDISPATCH), FADF_HAVEIID, FADF_DISPATCH}, -{VT_ERROR, 4, FADF_HAVEVARTYPE,0}, -{VT_BOOL, 2, FADF_HAVEVARTYPE,0}, -{VT_VARIANT, sizeof(VARIANT), FADF_HAVEVARTYPE,FADF_VARIANT}, -{VT_UNKNOWN, sizeof(LPUNKNOWN), FADF_HAVEIID, FADF_UNKNOWN}, -{VT_DECIMAL, sizeof(DECIMAL), FADF_HAVEVARTYPE,0}, -{15, VARTYPE_NOT_SUPPORTED,FADF_HAVEVARTYPE,0}, /* no VT_xxx */ -{VT_I1, 1, FADF_HAVEVARTYPE,0}, -{VT_UI1, 1, FADF_HAVEVARTYPE,0}, -{VT_UI2, 2, FADF_HAVEVARTYPE,0}, -{VT_UI4, 4, FADF_HAVEVARTYPE,0}, -{VT_I8, VARTYPE_NOT_SUPPORTED,FADF_HAVEVARTYPE,0}, -{VT_UI8, VARTYPE_NOT_SUPPORTED,FADF_HAVEVARTYPE,0}, -{VT_INT, sizeof(INT), FADF_HAVEVARTYPE,0}, -{VT_UINT, sizeof(UINT), FADF_HAVEVARTYPE,0}, -{VT_VOID, VARTYPE_NOT_SUPPORTED,FADF_HAVEVARTYPE,0}, -{VT_HRESULT, VARTYPE_NOT_SUPPORTED,FADF_HAVEVARTYPE,0}, -{VT_PTR, VARTYPE_NOT_SUPPORTED,FADF_HAVEVARTYPE,0}, -{VT_SAFEARRAY,VARTYPE_NOT_SUPPORTED,FADF_HAVEVARTYPE,0}, -{VT_CARRAY, VARTYPE_NOT_SUPPORTED,FADF_HAVEVARTYPE,0}, -{VT_USERDEFINED,VARTYPE_NOT_SUPPORTED,FADF_HAVEVARTYPE,0}, -{VT_LPSTR, VARTYPE_NOT_SUPPORTED,FADF_HAVEVARTYPE,0}, -{VT_LPWSTR, VARTYPE_NOT_SUPPORTED,FADF_HAVEVARTYPE,0}, -{VT_FILETIME, VARTYPE_NOT_SUPPORTED,FADF_HAVEVARTYPE,0}, -{VT_RECORD, VARTYPE_NOT_SUPPORTED,FADF_RECORD,0}, -{VT_BLOB, VARTYPE_NOT_SUPPORTED,FADF_HAVEVARTYPE,0}, -{VT_STREAM, VARTYPE_NOT_SUPPORTED,FADF_HAVEVARTYPE,0}, -{VT_STORAGE, VARTYPE_NOT_SUPPORTED,FADF_HAVEVARTYPE,0}, -{VT_STREAMED_OBJECT,VARTYPE_NOT_SUPPORTED,FADF_HAVEVARTYPE,0}, -{VT_STORED_OBJECT,VARTYPE_NOT_SUPPORTED,FADF_HAVEVARTYPE,0}, -{VT_BLOB_OBJECT,VARTYPE_NOT_SUPPORTED,FADF_HAVEVARTYPE,0}, -{VT_CF, VARTYPE_NOT_SUPPORTED,FADF_HAVEVARTYPE,0}, -{VT_CLSID, VARTYPE_NOT_SUPPORTED,FADF_HAVEVARTYPE,0}, -}; - -static void test_safearray(void) -{ - SAFEARRAY *a, b, *c; - unsigned int i, diff; - LONG indices[2]; - HRESULT hres; - SAFEARRAYBOUND bound, bounds[2]; - VARIANT v; - LPVOID data; - IID iid; - VARTYPE vt; - LONG l; - unsigned char *ptr1, *ptr2; - - hres = SafeArrayDestroy( NULL); - ok( hres == S_OK, "SafeArrayDestroy( NULL) returned 0x%x\n", hres); - - bound.cElements = 1; - bound.lLbound = 0; - a = SafeArrayCreate(-1, 1, &bound); - ok(NULL == a,"SAC(-1,1,[1,0]) not failed?\n"); - - bound.cElements = 0; - bound.lLbound = 42; - a = SafeArrayCreate(VT_I4, 1, &bound); - ok(NULL != a,"SAC(VT_I4,1,[0,0]) failed.\n"); - - hres = SafeArrayGetLBound(a, 1, &l); - ok(hres == S_OK, "SAGLB of 0 size dimensioned array failed with %x\n",hres); - ok(l == 42, "SAGLB of 0 size dimensioned array failed to return 42, but returned %d\n",l); - hres = SafeArrayGetUBound(a, 1, &l); - ok(hres == S_OK, "SAGUB of 0 size dimensioned array failed with %x\n",hres); - ok(l == 41, "SAGUB of 0 size dimensioned array failed to return 41, but returned %d\n",l); - - hres = SafeArrayAccessData(a, &data); - ok(hres == S_OK, "SafeArrayAccessData of 0 size dimensioned array failed with %x\n", hres); - SafeArrayUnaccessData(a); - - bound.cElements = 2; - hres = SafeArrayRedim(a, &bound); - ok(hres == S_OK,"SAR of a 0 elements dimension failed with hres %x\n", hres); - bound.cElements = 0; - hres = SafeArrayRedim(a, &bound); - ok(hres == S_OK || hres == E_OUTOFMEMORY, - "SAR to a 0 elements dimension failed with hres %x\n", hres); - hres = SafeArrayDestroy(a); - ok(hres == S_OK,"SAD of 0 dim array faild with hres %x\n", hres); - - SafeArrayAllocDescriptor(2, &a); - a->rgsabound[0].cElements = 2; - a->rgsabound[0].lLbound = 1; - a->rgsabound[1].cElements = 4; - a->rgsabound[1].lLbound = 1; - a->cbElements = 2; - SafeArrayAllocData(a); - - indices[0] = 4; - indices[1] = 2; - hres = SafeArrayPtrOfIndex(a, indices, (void **)&ptr1); - ok(hres == S_OK, "SAPOI failed with hres %x\n", hres); - SafeArrayAccessData(a, (void **)&ptr2); - ok(ptr1 - ptr2 == 14, "SAPOI got wrong ptr\n"); - *(WORD *)ptr1 = 0x55aa; - SafeArrayUnaccessData(a); - - bound.cElements = 10; - bound.lLbound = 1; - SafeArrayRedim(a, &bound); - ptr1 = NULL; - SafeArrayPtrOfIndex(a, indices, (void **)&ptr1); - ok(*(WORD *)ptr1 == 0x55aa, "Data not preserved when resizing array\n"); - - bound.cElements = 10; - bound.lLbound = 0; - SafeArrayRedim(a, &bound); - SafeArrayPtrOfIndex(a, indices, (void **)&ptr1); - ok(*(WORD *)ptr1 == 0, "Expanded area not zero-initialized\n"); - - indices[1] = 1; - SafeArrayPtrOfIndex(a, indices, (void **)&ptr1); - ok(*(WORD *)ptr1 == 0x55aa, "Data not preserved when resizing array\n"); - - hres = SafeArrayDestroy(a); - ok(hres == S_OK,"SAD faild with hres %x\n", hres); - - bounds[0].cElements = 0; bounds[0].lLbound = 1; - bounds[1].cElements = 2; bounds[1].lLbound = 23; - a = SafeArrayCreate(VT_I4,2,bounds); - ok(a != NULL,"SAC(VT_INT32,2,...) with 0 element dim failed.\n"); - - hres = SafeArrayDestroy(a); - ok(hres == S_OK,"SAD faild with hres %x\n", hres); - bounds[0].cElements = 1; bounds[0].lLbound = 1; - bounds[1].cElements = 0; bounds[1].lLbound = 23; - a = SafeArrayCreate(VT_I4,2,bounds); - ok(a != NULL,"SAC(VT_INT32,2,...) with 0 element dim failed.\n"); - - hres = SafeArrayDestroy(a); - ok(hres == S_OK,"SAD faild with hres %x\n", hres); - - bounds[0].cElements = 42; bounds[0].lLbound = 1; - bounds[1].cElements = 2; bounds[1].lLbound = 23; - a = SafeArrayCreate(VT_I4,2,bounds); - ok(a != NULL,"SAC(VT_INT32,2,...) failed.\n"); - - hres = SafeArrayGetLBound (a, 0, &l); - ok (hres == DISP_E_BADINDEX, "SAGLB 0 failed with %x\n", hres); - hres = SafeArrayGetLBound (a, 1, &l); - ok (hres == S_OK, "SAGLB 1 failed with %x\n", hres); - ok (l == 1, "SAGLB 1 returned %d instead of 1\n", l); - hres = SafeArrayGetLBound (a, 2, &l); - ok (hres == S_OK, "SAGLB 2 failed with %x\n", hres); - ok (l == 23, "SAGLB 2 returned %d instead of 23\n", l); - hres = SafeArrayGetLBound (a, 3, &l); - ok (hres == DISP_E_BADINDEX, "SAGLB 3 failed with %x\n", hres); - - hres = SafeArrayGetUBound (a, 0, &l); - ok (hres == DISP_E_BADINDEX, "SAGUB 0 failed with %x\n", hres); - hres = SafeArrayGetUBound (a, 1, &l); - ok (hres == S_OK, "SAGUB 1 failed with %x\n", hres); - ok (l == 42, "SAGUB 1 returned %d instead of 42\n", l); - hres = SafeArrayGetUBound (a, 2, &l); - ok (hres == S_OK, "SAGUB 2 failed with %x\n", hres); - ok (l == 24, "SAGUB 2 returned %d instead of 24\n", l); - hres = SafeArrayGetUBound (a, 3, &l); - ok (hres == DISP_E_BADINDEX, "SAGUB 3 failed with %x\n", hres); - - i = SafeArrayGetDim(a); - ok(i == 2, "getdims of 2 din array returned %d\n",i); - - indices[0] = 0; - indices[1] = 23; - hres = SafeArrayGetElement(a, indices, &i); - ok(DISP_E_BADINDEX == hres,"SAGE failed [0,23], hres 0x%x\n",hres); - - indices[0] = 1; - indices[1] = 22; - hres = SafeArrayGetElement(a, indices, &i); - ok(DISP_E_BADINDEX == hres,"SAGE failed [1,22], hres 0x%x\n",hres); - - indices[0] = 1; - indices[1] = 23; - hres = SafeArrayGetElement(a, indices, &i); - ok(S_OK == hres,"SAGE failed [1,23], hres 0x%x\n",hres); - - indices[0] = 1; - indices[1] = 25; - hres = SafeArrayGetElement(a, indices, &i); - ok(DISP_E_BADINDEX == hres,"SAGE failed [1,24], hres 0x%x\n",hres); - - indices[0] = 3; - indices[1] = 23; - hres = SafeArrayGetElement(a, indices, &i); - ok(S_OK == hres,"SAGE failed [42,23], hres 0x%x\n",hres); - - hres = SafeArrayAccessData(a, (void**)&ptr1); - ok(S_OK == hres, "SAAD failed with 0x%x\n", hres); - - indices[0] = 3; - indices[1] = 23; - hres = SafeArrayPtrOfIndex(a, indices, (void**)&ptr2); - ok(S_OK == hres,"SAPOI failed [1,23], hres 0x%x\n",hres); - diff = ptr2 - ptr1; - ok(diff == 8,"ptr difference is not 8, but %d (%p vs %p)\n", diff, ptr2, ptr1); - - indices[0] = 3; - indices[1] = 24; - hres = SafeArrayPtrOfIndex(a, indices, (void**)&ptr2); - ok(S_OK == hres,"SAPOI failed [5,24], hres 0x%x\n",hres); - diff = ptr2 - ptr1; - ok(diff == 176,"ptr difference is not 176, but %d (%p vs %p)\n", diff, ptr2, ptr1); - - indices[0] = 20; - indices[1] = 23; - hres = SafeArrayPtrOfIndex(a, indices, (void**)&ptr2); - ok(S_OK == hres,"SAPOI failed [20,23], hres 0x%x\n",hres); - diff = ptr2 - ptr1; - ok(diff == 76,"ptr difference is not 76, but %d (%p vs %p)\n", diff, ptr2, ptr1); - - hres = SafeArrayUnaccessData(a); - ok(S_OK == hres, "SAUAD failed with 0x%x\n", hres); - - hres = SafeArrayDestroy(a); - ok(hres == S_OK,"SAD faild with hres %x\n", hres); - - for (i=0;icbElements) || - (IS_ANCIENT && (vttypes[i].vt == VT_DECIMAL || vttypes[i].vt == VT_I1 || - vttypes[i].vt == VT_UI2 || vttypes[i].vt == VT_UI4 || vttypes[i].vt == VT_INT || - vttypes[i].vt == VT_UINT)), - "SAC(%d,1,[1,0]), %p result %d, expected %d\n", - vttypes[i].vt,a,(a?a->cbElements:0),vttypes[i].elemsize); - - if (a) - { - if (!HAVE_OLEAUT32_RECORD) - vttypes[i].expflags = 0; - ok(a->fFeatures == (vttypes[i].expflags | vttypes[i].addflags), - "SAC of %d returned feature flags %x, expected %x\n", - vttypes[i].vt, a->fFeatures, - vttypes[i].expflags|vttypes[i].addflags); - ok(SafeArrayGetElemsize(a) == vttypes[i].elemsize, - "SAGE for vt %d returned elemsize %d instead of expected %d\n", - vttypes[i].vt, SafeArrayGetElemsize(a),vttypes[i].elemsize); - } - - if (!a) continue; - - if (pSafeArrayGetVartype) - { - hres = pSafeArrayGetVartype(a, &vt); - ok(hres == S_OK, "SAGVT of arra y with vt %d failed with %x\n", vttypes[i].vt, hres); - /* Windows prior to Vista returns VT_UNKNOWN instead of VT_DISPATCH */ - ok(broken(vt == VT_UNKNOWN) || vt == vttypes[i].vt, "SAGVT of array with vt %d returned %d\n", vttypes[i].vt, vt); - } - - hres = SafeArrayCopy(a, &c); - ok(hres == S_OK, "failed to copy safearray of vt %d with hres %x\n", vttypes[i].vt, hres); - - ok(vttypes[i].elemsize == c->cbElements,"copy of SAC(%d,1,[1,0]), result %d, expected %d\n",vttypes[i].vt,(c?c->cbElements:0),vttypes[i].elemsize - ); - ok(c->fFeatures == (vttypes[i].expflags | vttypes[i].addflags),"SAC of %d returned feature flags %x, expected %x\n", vttypes[i].vt, c->fFeatures, vttypes[i].expflags|vttypes[i].addflags); - ok(SafeArrayGetElemsize(c) == vttypes[i].elemsize,"SAGE for vt %d returned elemsize %d instead of expected %d\n",vttypes[i].vt, SafeArrayGetElemsize(c),vttypes[i].elemsize); - - if (pSafeArrayGetVartype) { - hres = pSafeArrayGetVartype(c, &vt); - ok(hres == S_OK, "SAGVT of array with vt %d failed with %x\n", vttypes[i].vt, hres); - /* Windows prior to Vista returns VT_UNKNOWN instead of VT_DISPATCH */ - ok(broken(vt == VT_UNKNOWN) || vt == vttypes[i].vt, "SAGVT of array with vt %d returned %d\n", vttypes[i].vt, vt); - } - - if (pSafeArrayCopyData) { - hres = pSafeArrayCopyData(a, c); - ok(hres == S_OK, "failed to copy safearray data of vt %d with hres %x\n", vttypes[i].vt, hres); - - hres = SafeArrayDestroyData(c); - ok(hres == S_OK,"SADD of copy of array with vt %d failed with hres %x\n", vttypes[i].vt, hres); - } - - hres = SafeArrayDestroy(c); - ok(hres == S_OK,"SAD faild with hres %x\n", hres); - - hres = SafeArrayDestroy(a); - ok(hres == S_OK,"SAD of array with vt %d failed with hres %x\n", vttypes[i].vt, hres); - } - - /* Test conversion of type|VT_ARRAY <-> VT_BSTR */ - bound.lLbound = 0; - bound.cElements = 10; - a = SafeArrayCreate(VT_UI1, 1, &bound); - ok(a != NULL, "SAC failed.\n"); - ok(S_OK == SafeArrayAccessData(a, &data),"SACD failed\n"); - memcpy(data,"Hello World\n",10); - ok(S_OK == SafeArrayUnaccessData(a),"SAUD failed\n"); - V_VT(&v) = VT_ARRAY|VT_UI1; - V_ARRAY(&v) = a; - hres = VariantChangeTypeEx(&v, &v, 0, 0, VT_BSTR); - ok(hres==S_OK, "CTE VT_ARRAY|VT_UI1 -> VT_BSTR failed with %x\n",hres); - ok(V_VT(&v) == VT_BSTR,"CTE VT_ARRAY|VT_UI1 -> VT_BSTR did not return VT_BSTR, but %d.v\n",V_VT(&v)); - ok(V_BSTR(&v)[0] == 0x6548,"First letter are not 'He', but %x\n", V_BSTR(&v)[0]); - VariantClear(&v); - - /* check locking functions */ - a = SafeArrayCreate(VT_I4, 1, &bound); - ok(a!=NULL,"SAC should not fail\n"); - - hres = SafeArrayAccessData(a, &data); - ok(hres == S_OK,"SAAD failed with hres %x\n",hres); - - hres = SafeArrayDestroy(a); - ok(hres == DISP_E_ARRAYISLOCKED,"locked safe array destroy not failed with DISP_E_ARRAYISLOCKED, but with hres %x\n", hres); - - hres = SafeArrayDestroyData(a); - ok(hres == DISP_E_ARRAYISLOCKED,"locked safe array destroy data not failed with DISP_E_ARRAYISLOCKED, but with hres %x\n", hres); - - hres = SafeArrayDestroyDescriptor(a); - ok(hres == DISP_E_ARRAYISLOCKED,"locked safe array destroy descriptor not failed with DISP_E_ARRAYISLOCKED, but with hres %x\n", hres); - - hres = SafeArrayUnaccessData(a); - ok(hres == S_OK,"SAUD failed after lock/destroy test\n"); - - hres = SafeArrayDestroy(a); - ok(hres == S_OK,"SAD failed after lock/destroy test\n"); - - /* Test if we need to destroy data before descriptor */ - a = SafeArrayCreate(VT_I4, 1, &bound); - ok(a!=NULL,"SAC should not fail\n"); - hres = SafeArrayDestroyDescriptor(a); - ok(hres == S_OK,"SADD with data in array failed with hres %x\n",hres); - - /* IID functions */ - /* init a small stack safearray */ - if (pSafeArraySetIID) { - memset(&b, 0, sizeof(b)); - b.cDims = 1; - memset(&iid, 0x42, sizeof(IID)); - hres = pSafeArraySetIID(&b,&iid); - ok(hres == E_INVALIDARG,"SafeArraySetIID of non IID capable safearray did not return E_INVALIDARG, but %x\n",hres); - - hres = SafeArrayAllocDescriptor(1,&a); - ok((a->fFeatures & FADF_HAVEIID) == 0,"newly allocated descriptor with SAAD should not have FADF_HAVEIID\n"); - hres = pSafeArraySetIID(a,&iid); - ok(hres == E_INVALIDARG,"SafeArraySetIID of newly allocated descriptor with SAAD should return E_INVALIDARG, but %x\n",hres); - - hres = SafeArrayDestroyDescriptor(a); - ok(hres == S_OK,"SADD failed with hres %x\n",hres); - } - - if (!pSafeArrayAllocDescriptorEx) - return; - - for (i=0;ifFeatures == vttypes[i].expflags,"SAADE(%d) resulted with flags %x, expected %x\n", vttypes[i].vt, a->fFeatures, vttypes[i].expflags); - if (a->fFeatures & FADF_HAVEIID) { - hres = pSafeArrayGetIID(a, &iid); - ok(hres == S_OK,"SAGIID failed for vt %d with hres %x\n", vttypes[i].vt,hres); - switch (vttypes[i].vt) { - case VT_UNKNOWN: - ok(IsEqualGUID(((GUID*)a)-1,&IID_IUnknown),"guid for VT_UNKNOWN is not IID_IUnknown\n"); - ok(IsEqualGUID(&iid, &IID_IUnknown),"SAGIID returned wrong GUID for IUnknown\n"); - break; - case VT_DISPATCH: - ok(IsEqualGUID(((GUID*)a)-1,&IID_IDispatch),"guid for VT_UNKNOWN is not IID_IDispatch\n"); - ok(IsEqualGUID(&iid, &IID_IDispatch),"SAGIID returned wrong GUID for IDispatch\n"); - break; - default: - ok(FALSE,"unknown vt %d with FADF_HAVEIID\n",vttypes[i].vt); - break; - } - } else { - hres = pSafeArrayGetIID(a, &iid); - ok(hres == E_INVALIDARG,"SAGIID did not fail for vt %d with hres %x\n", vttypes[i].vt,hres); - } - if (a->fFeatures & FADF_RECORD) { - ok(vttypes[i].vt == VT_RECORD,"FADF_RECORD for non record %d\n",vttypes[i].vt); - } - if (a->fFeatures & FADF_HAVEVARTYPE) { - ok(vttypes[i].vt == ((DWORD*)a)[-1], "FADF_HAVEVARTYPE set, but vt %d mismatch stored %d\n",vttypes[i].vt,((DWORD*)a)[-1]); - } - - hres = pSafeArrayGetVartype(a, &vt); - ok(hres == S_OK, "SAGVT of array with vt %d failed with %x\n", vttypes[i].vt, hres); - - if (vttypes[i].vt == VT_DISPATCH) { - /* Special case. Checked against Windows. */ - ok(vt == VT_UNKNOWN, "SAGVT of array with VT_DISPATCH returned not VT_UNKNOWN, but %d\n", vt); - } else { - ok(vt == vttypes[i].vt, "SAGVT of array with vt %d returned %d\n", vttypes[i].vt, vt); - } - - if (a->fFeatures & FADF_HAVEIID) { - hres = pSafeArraySetIID(a, &IID_IStorage); /* random IID */ - ok(hres == S_OK,"SASIID failed with FADF_HAVEIID set for vt %d with %x\n", vttypes[i].vt, hres); - hres = pSafeArrayGetIID(a, &iid); - ok(hres == S_OK,"SAGIID failed with FADF_HAVEIID set for vt %d with %x\n", vttypes[i].vt, hres); - ok(IsEqualGUID(&iid, &IID_IStorage),"returned iid is not IID_IStorage\n"); - } else { - hres = pSafeArraySetIID(a, &IID_IStorage); /* random IID */ - ok(hres == E_INVALIDARG,"SASIID did not failed with !FADF_HAVEIID set for vt %d with %x\n", vttypes[i].vt, hres); - } - hres = SafeArrayDestroyDescriptor(a); - ok(hres == S_OK,"SADD failed with hres %x\n",hres); - } -} - -static void test_SafeArrayAllocDestroyDescriptor(void) -{ - SAFEARRAY *sa; - HRESULT hres; - int i; - - /* Failure cases */ - hres = SafeArrayAllocDescriptor(0, &sa); - ok(hres == E_INVALIDARG, "0 dimensions gave hres 0x%x\n", hres); - - hres = SafeArrayAllocDescriptor(65536, &sa); - ok(IS_ANCIENT || hres == E_INVALIDARG, - "65536 dimensions gave hres 0x%x\n", hres); - - if (0) - { - /* Crashes on 95: XP & Wine return E_POINTER */ - hres=SafeArrayAllocDescriptor(1, NULL); - ok(hres == E_POINTER,"NULL parm gave hres 0x%x\n", hres); - } - - /* Test up to the dimension boundary case */ - for (i = 5; i <= 65535; i += 30) - { - hres = SafeArrayAllocDescriptor(i, &sa); - ok(hres == S_OK, "%d dimensions failed; hres 0x%x\n", i, hres); - - if (hres == S_OK) - { - ok(SafeArrayGetDim(sa) == (UINT)i, "Dimension is %d; should be %d\n", - SafeArrayGetDim(sa), i); - - hres = SafeArrayDestroyDescriptor(sa); - ok(hres == S_OK, "destroy failed; hres 0x%x\n", hres); - } - } - - if (!pSafeArrayAllocDescriptorEx) - return; - - hres = pSafeArrayAllocDescriptorEx(VT_UI1, 0, &sa); - ok(hres == E_INVALIDARG, "0 dimensions gave hres 0x%x\n", hres); - - hres = pSafeArrayAllocDescriptorEx(VT_UI1, 65536, &sa); - ok(hres == E_INVALIDARG, "65536 dimensions gave hres 0x%x\n", hres); - - hres = pSafeArrayAllocDescriptorEx(VT_UI1, 1, NULL); - ok(hres == E_POINTER,"NULL parm gave hres 0x%x\n", hres); - - hres = pSafeArrayAllocDescriptorEx(-1, 1, &sa); - ok(hres == S_OK, "VT = -1 gave hres 0x%x\n", hres); - - sa->rgsabound[0].cElements = 0; - sa->rgsabound[0].lLbound = 1; - - hres = SafeArrayAllocData(sa); - ok(hres == S_OK, "SafeArrayAllocData gave hres 0x%x\n", hres); - - hres = SafeArrayDestroy(sa); - ok(hres == S_OK,"SafeArrayDestroy failed with hres %x\n",hres); -} - -static void test_SafeArrayCreateLockDestroy(void) -{ - SAFEARRAYBOUND sab[4]; - SAFEARRAY *sa; - HRESULT hres; - VARTYPE vt; - int dimension; - -#define NUM_DIMENSIONS (int)(sizeof(sab) / sizeof(sab[0])) - - for (dimension = 0; dimension < NUM_DIMENSIONS; dimension++) - { - sab[dimension].lLbound = 0; - sab[dimension].cElements = 8; - } - - /* Failure cases */ -/* This test crashes very early versions with no error checking... - sa = SafeArrayCreate(VT_UI1, 1, NULL); - ok(sa == NULL, "NULL bounds didn't fail\n"); -*/ - sa = SafeArrayCreate(VT_UI1, 65536, sab); - ok(IS_ANCIENT || !sa, "Max bounds didn't fail\n"); - - memset(sab, 0, sizeof(sab)); - - /* Don't test 0 sized dimensions, as Windows has a bug which allows this */ - - for (dimension = 0; dimension < NUM_DIMENSIONS; dimension++) - sab[dimension].cElements = 8; - - /* Test all VARTYPES in 1-4 dimensions */ - for (dimension = 1; dimension < 4; dimension++) - { - for (vt = VT_EMPTY; vt < VT_CLSID; vt++) - { - DWORD dwLen = SAFEARRAY_GetVTSize(vt); - - sa = SafeArrayCreate(vt, dimension, sab); - - if (dwLen) - ok(sa || (IS_ANCIENT && (vt == VT_DECIMAL || vt == VT_I1 || vt == VT_UI2 || - vt == VT_UI4 || vt == VT_INT || vt == VT_UINT)), - "VARTYPE %d (@%d dimensions) failed\n", vt, dimension); - else - ok(sa == NULL || vt == VT_R8, - "VARTYPE %d (@%d dimensions) succeeded!\n", vt, dimension); - - if (sa) - { - ok(SafeArrayGetDim(sa) == (UINT)dimension, - "VARTYPE %d (@%d dimensions) cDims is %d, expected %d\n", - vt, dimension, SafeArrayGetDim(sa), dimension); - ok(SafeArrayGetElemsize(sa) == dwLen || vt == VT_R8, - "VARTYPE %d (@%d dimensions) cbElements is %d, expected %d\n", - vt, dimension, SafeArrayGetElemsize(sa), dwLen); - - if (vt != VT_UNKNOWN && vt != VT_DISPATCH) - { - ok((sa->fFeatures & FADF_HAVEIID) == 0, - "Non interface type should not have FADF_HAVEIID\n"); - if (pSafeArraySetIID) - { - hres = pSafeArraySetIID(sa, &IID_IUnknown); - ok(hres == E_INVALIDARG, - "Non interface type allowed SetIID(), hres %x\n", hres); - } - if (vt != VT_RECORD) - { - VARTYPE aVt; - - ok(IS_ANCIENT || sa->fFeatures & FADF_HAVEVARTYPE, - "Non interface type should have FADF_HAVEVARTYPE\n"); - if (pSafeArrayGetVartype) - { - hres = pSafeArrayGetVartype(sa, &aVt); - ok(hres == S_OK && aVt == vt, - "Non interface type %d: bad type %d, hres %x\n", vt, aVt, hres); - } - } - } - else - { - ok(IS_ANCIENT || sa->fFeatures & FADF_HAVEIID, - "Interface type should have FADF_HAVEIID\n"); - if (pSafeArraySetIID) - { - hres = pSafeArraySetIID(sa, &IID_IUnknown); - ok(hres == S_OK, - "Non interface type disallowed SetIID(), hres %x\n", hres); - } - ok((sa->fFeatures & FADF_HAVEVARTYPE) == 0, - "Interface type %d should not have FADF_HAVEVARTYPE\n", vt); - } - - hres = SafeArrayLock(sa); - ok(hres == S_OK, "Lock VARTYPE %d (@%d dimensions) failed; hres 0x%x\n", - vt, dimension, hres); - - if (hres == S_OK) - { - hres = SafeArrayDestroy(sa); - ok(hres == DISP_E_ARRAYISLOCKED,"Destroy() got hres %x\n", hres); - - hres = SafeArrayDestroyData(sa); - ok(hres == DISP_E_ARRAYISLOCKED,"DestroyData() got hres %x\n", hres); - - hres = SafeArrayDestroyDescriptor(sa); - ok(hres == DISP_E_ARRAYISLOCKED,"DestroyDescriptor() got hres %x\n", hres); - - hres = SafeArrayUnlock(sa); - ok(hres == S_OK, "Unlock VARTYPE %d (@%d dims) hres 0x%x\n", - vt, dimension, hres); - - hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "destroy VARTYPE %d (@%d dims) hres 0x%x\n", - vt, dimension, hres); - } - } - } - } -} - -static void test_VectorCreateLockDestroy(void) -{ - SAFEARRAY *sa; - HRESULT hres; - VARTYPE vt; - int element; - - if (!pSafeArrayCreateVector) - return; - sa = pSafeArrayCreateVector(VT_UI1, 0, 0); - ok(sa != NULL, "SACV with 0 elements failed.\n"); - - hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "SafeArrayDestroy failed with hres %x\n",hres); - - /* Test all VARTYPES in different lengths */ - for (element = 1; element <= 101; element += 10) - { - for (vt = VT_EMPTY; vt < VT_CLSID; vt++) - { - DWORD dwLen = SAFEARRAY_GetVTSize(vt); - - sa = pSafeArrayCreateVector(vt, 0, element); - - if (dwLen) - ok(sa != NULL, "VARTYPE %d (@%d elements) failed\n", vt, element); - else - ok(sa == NULL, "VARTYPE %d (@%d elements) succeeded!\n", vt, element); - - if (sa) - { - ok(SafeArrayGetDim(sa) == 1, "VARTYPE %d (@%d elements) cDims %d, not 1\n", - vt, element, SafeArrayGetDim(sa)); - ok(SafeArrayGetElemsize(sa) == dwLen, - "VARTYPE %d (@%d elements) cbElements is %d, expected %d\n", - vt, element, SafeArrayGetElemsize(sa), dwLen); - - hres = SafeArrayLock(sa); - ok(hres == S_OK, "Lock VARTYPE %d (@%d elements) failed; hres 0x%x\n", - vt, element, hres); - - if (hres == S_OK) - { - hres = SafeArrayUnlock(sa); - ok(hres == S_OK, "Unlock VARTYPE %d (@%d elements) failed; hres 0x%x\n", - vt, element, hres); - - hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "destroy VARTYPE %d (@%d elements) failed; hres 0x%x\n", - vt, element, hres); - } - } - } - } -} - -static void test_LockUnlock(void) -{ - SAFEARRAYBOUND sab[4]; - SAFEARRAY *sa; - HRESULT hres; - BOOL bVector = FALSE; - int dimension; - - /* Failure cases */ - hres = SafeArrayLock(NULL); - ok(hres == E_INVALIDARG, "Lock NULL array hres 0x%x\n", hres); - hres = SafeArrayUnlock(NULL); - ok(hres == E_INVALIDARG, "Lock NULL array hres 0x%x\n", hres); - - for (dimension = 0; dimension < NUM_DIMENSIONS; dimension++) - { - sab[dimension].lLbound = 0; - sab[dimension].cElements = 8; - } - - sa = SafeArrayCreate(VT_UI1, NUM_DIMENSIONS, sab); - - /* Test maximum locks */ -test_LockUnlock_Vector: - if (sa) - { - int count = 0; - - hres = SafeArrayUnlock(sa); - ok (hres == E_UNEXPECTED, "Bad %sUnlock gave hres 0x%x\n", - bVector ? "vector " : "\n", hres); - - while ((hres = SafeArrayLock(sa)) == S_OK) - count++; - ok (count == 65535 && hres == E_UNEXPECTED, "Lock %sfailed at %d; hres 0x%x\n", - bVector ? "vector " : "\n", count, hres); - - if (count == 65535 && hres == E_UNEXPECTED) - { - while ((hres = SafeArrayUnlock(sa)) == S_OK) - count--; - ok (count == 0 && hres == E_UNEXPECTED, "Unlock %sfailed at %d; hres 0x%x\n", - bVector ? "vector " : "\n", count, hres); - } - - SafeArrayDestroy(sa); - } - - if (bVector == FALSE && pSafeArrayCreateVector) - { - /* Test again with a vector */ - sa = pSafeArrayCreateVector(VT_UI1, 0, 100); - bVector = TRUE; - goto test_LockUnlock_Vector; - } -} - -static void test_SafeArrayGetPutElement(void) -{ - SAFEARRAYBOUND sab[4]; - LONG indices[NUM_DIMENSIONS]; - SAFEARRAY *sa; - HRESULT hres; - int value = 0, gotvalue, dimension; - unsigned int x,y,z,a; - - for (dimension = 0; dimension < NUM_DIMENSIONS; dimension++) - { - sab[dimension].lLbound = dimension * 2 + 1; - sab[dimension].cElements = dimension * 3 + 1; - } - - sa = SafeArrayCreate(VT_INT, NUM_DIMENSIONS, sab); - if (!sa) - return; /* Some early versions can't handle > 3 dims */ - - ok(sa->cbElements == sizeof(value), "int size mismatch\n"); - if (sa->cbElements != sizeof(value)) - return; - - /* Failure cases */ - for (x = 0; x < NUM_DIMENSIONS; x++) - { - indices[0] = sab[0].lLbound; - indices[1] = sab[1].lLbound; - indices[2] = sab[2].lLbound; - indices[3] = sab[3].lLbound; - - indices[x] = indices[x] - 1; - hres = SafeArrayPutElement(sa, indices, &value); - ok(hres == DISP_E_BADINDEX, "Put allowed too small index in dimension %d\n", x); - hres = SafeArrayGetElement(sa, indices, &value); - ok(hres == DISP_E_BADINDEX, "Get allowed too small index in dimension %d\n", x); - - indices[x] = sab[x].lLbound + sab[x].cElements; - hres = SafeArrayPutElement(sa, indices, &value); - ok(hres == DISP_E_BADINDEX, "Put allowed too big index in dimension %d\n", x); - hres = SafeArrayGetElement(sa, indices, &value); - ok(hres == DISP_E_BADINDEX, "Get allowed too big index in dimension %d\n", x); - } - - indices[0] = sab[0].lLbound; - indices[1] = sab[1].lLbound; - indices[2] = sab[2].lLbound; - indices[3] = sab[3].lLbound; - - hres = SafeArrayPutElement(NULL, indices, &value); - ok(hres == E_INVALIDARG, "Put NULL array hres 0x%x\n", hres); - hres = SafeArrayGetElement(NULL, indices, &value); - ok(hres == E_INVALIDARG, "Get NULL array hres 0x%x\n", hres); - - hres = SafeArrayPutElement(sa, NULL, &value); - ok(hres == E_INVALIDARG, "Put NULL indices hres 0x%x\n", hres); - hres = SafeArrayGetElement(sa, NULL, &value); - ok(hres == E_INVALIDARG, "Get NULL indices hres 0x%x\n", hres); - - if (0) - { - /* This is retarded. Windows checks every case of invalid parameters - * except the following, which crashes. We ERR this in Wine. - */ - hres = SafeArrayPutElement(sa, indices, NULL); - ok(hres == E_INVALIDARG, "Put NULL value hres 0x%x\n", hres); - } - - hres = SafeArrayGetElement(sa, indices, NULL); - ok(hres == E_INVALIDARG, "Get NULL value hres 0x%x\n", hres); - - value = 0; - - /* Make sure we can read and get back the correct values in 4 dimensions, - * Each with a different size and lower bound. - */ - for (x = 0; x < sab[0].cElements; x++) - { - indices[0] = sab[0].lLbound + x; - for (y = 0; y < sab[1].cElements; y++) - { - indices[1] = sab[1].lLbound + y; - for (z = 0; z < sab[2].cElements; z++) - { - indices[2] = sab[2].lLbound + z; - for (a = 0; a < sab[3].cElements; a++) - { - indices[3] = sab[3].lLbound + a; - hres = SafeArrayPutElement(sa, indices, &value); - ok(hres == S_OK, "Failed to put element at (%d,%d,%d,%d) hres 0x%x\n", - x, y, z, a, hres); - value++; - } - } - } - } - - value = 0; - - for (x = 0; x < sab[0].cElements; x++) - { - indices[0] = sab[0].lLbound + x; - for (y = 0; y < sab[1].cElements; y++) - { - indices[1] = sab[1].lLbound + y; - for (z = 0; z < sab[2].cElements; z++) - { - indices[2] = sab[2].lLbound + z; - for (a = 0; a < sab[3].cElements; a++) - { - indices[3] = sab[3].lLbound + a; - gotvalue = value / 3; - hres = SafeArrayGetElement(sa, indices, &gotvalue); - ok(hres == S_OK, "Failed to get element at (%d,%d,%d,%d) hres 0x%x\n", - x, y, z, a, hres); - if (hres == S_OK) - ok(value == gotvalue, "Got value %d instead of %d at (%d,%d,%d,%d)\n", - gotvalue, value, x, y, z, a); - value++; - } - } - } - } - SafeArrayDestroy(sa); -} - -static void test_SafeArrayGetPutElement_BSTR(void) -{ - SAFEARRAYBOUND sab; - LONG indices[1]; - SAFEARRAY *sa; - HRESULT hres; - BSTR value = 0, gotvalue; - const OLECHAR szTest[5] = { 'T','e','s','t','\0' }; - - sab.lLbound = 1; - sab.cElements = 1; - - sa = SafeArrayCreate(VT_BSTR, 1, &sab); - ok(sa != NULL, "BSTR test couldn't create array\n"); - if (!sa) - return; - - ok(sa->cbElements == sizeof(BSTR), "BSTR size mismatch\n"); - if (sa->cbElements != sizeof(BSTR)) - return; - - indices[0] = sab.lLbound; - value = SysAllocString(szTest); - ok (value != NULL, "Expected non-NULL\n"); - hres = SafeArrayPutElement(sa, indices, value); - ok(hres == S_OK, "Failed to put bstr element hres 0x%x\n", hres); - gotvalue = NULL; - hres = SafeArrayGetElement(sa, indices, &gotvalue); - ok(hres == S_OK, "Failed to get bstr element at hres 0x%x\n", hres); - if (hres == S_OK) - ok(SysStringLen(value) == SysStringLen(gotvalue), "Got len %d instead of %d\n", SysStringLen(gotvalue), SysStringLen(value)); - SafeArrayDestroy(sa); - SysFreeString(value); - SysFreeString(gotvalue); -} - -static int tunk_xref = 0; -static HRESULT WINAPI tunk_QueryInterface(LPUNKNOWN punk,REFIID riid, LPVOID *x) { - return E_FAIL; -} -static ULONG WINAPI tunk_AddRef(LPUNKNOWN punk) { - return ++tunk_xref; -} - -static ULONG WINAPI tunk_Release(LPUNKNOWN punk) { - return --tunk_xref; -} - -static const IUnknownVtbl xtunk_vtbl = { - tunk_QueryInterface, - tunk_AddRef, - tunk_Release -}; - -static struct xtunk_iface { - const IUnknownVtbl *lpvtbl; -} xtunk_iface; - - -static void test_SafeArrayGetPutElement_IUnknown(void) -{ - SAFEARRAYBOUND sab; - LONG indices[1]; - SAFEARRAY *sa; - HRESULT hres; - LPUNKNOWN value = 0, gotvalue; - - sab.lLbound = 1; - sab.cElements = 1; - sa = SafeArrayCreate(VT_UNKNOWN, 1, &sab); - ok(sa != NULL, "UNKNOWN test couldn't create array\n"); - if (!sa) - return; - - ok(sa->cbElements == sizeof(LPUNKNOWN), "LPUNKNOWN size mismatch\n"); - if (sa->cbElements != sizeof(LPUNKNOWN)) - return; - - indices[0] = sab.lLbound; - xtunk_iface.lpvtbl = &xtunk_vtbl; - value = (LPUNKNOWN)&xtunk_iface; - tunk_xref = 1; - ok (value != NULL, "Expected non-NULL\n"); - hres = SafeArrayPutElement(sa, indices, value); - ok(hres == S_OK, "Failed to put bstr element hres 0x%x\n", hres); - ok(tunk_xref == 2,"Failed to increment refcount of iface.\n"); - gotvalue = NULL; - hres = SafeArrayGetElement(sa, indices, &gotvalue); - ok(tunk_xref == 3,"Failed to increment refcount of iface.\n"); - ok(hres == S_OK, "Failed to get bstr element at hres 0x%x\n", hres); - if (hres == S_OK) - ok(value == gotvalue, "Got %p instead of %p\n", gotvalue, value); - SafeArrayDestroy(sa); - ok(tunk_xref == 2,"Failed to decrement refcount of iface.\n"); -} - -static void test_SafeArrayRedim_IUnknown(void) -{ - SAFEARRAYBOUND sab; - LONG indices[1]; - SAFEARRAY *sa; - HRESULT hres; - LPUNKNOWN value; - - sab.lLbound = 1; - sab.cElements = 2; - sa = SafeArrayCreate(VT_UNKNOWN, 1, &sab); - ok(sa != NULL, "UNKNOWN test couldn't create array\n"); - if (!sa) - return; - - ok(sa->cbElements == sizeof(LPUNKNOWN), "LPUNKNOWN size mismatch\n"); - if (sa->cbElements != sizeof(LPUNKNOWN)) - return; - - indices[0] = 2; - xtunk_iface.lpvtbl = &xtunk_vtbl; - value = (LPUNKNOWN)&xtunk_iface; - tunk_xref = 1; - hres = SafeArrayPutElement(sa, indices, value); - ok(hres == S_OK, "Failed to put IUnknown element hres 0x%x\n", hres); - ok(tunk_xref == 2,"Failed to increment refcount of iface.\n"); - sab.cElements = 1; - hres = SafeArrayRedim(sa, &sab); - ok(hres == S_OK, "Failed to shrink array hres 0x%x\n", hres); - ok(tunk_xref == 1, "Failed to decrement refcount\n"); - SafeArrayDestroy(sa); -} - -static void test_SafeArrayGetPutElement_VARIANT(void) -{ - SAFEARRAYBOUND sab; - LONG indices[1]; - SAFEARRAY *sa; - HRESULT hres; - VARIANT value, gotvalue; - - sab.lLbound = 1; - sab.cElements = 1; - sa = SafeArrayCreate(VT_VARIANT, 1, &sab); - ok(sa != NULL, "VARIANT test couldn't create array\n"); - if (!sa) - return; - - ok(sa->cbElements == sizeof(VARIANT), "VARIANT size mismatch\n"); - if (sa->cbElements != sizeof(VARIANT)) - return; - - indices[0] = sab.lLbound; - V_VT(&value) = VT_I4; - V_I4(&value) = 0x42424242; - hres = SafeArrayPutElement(sa, indices, &value); - ok(hres == S_OK, "Failed to put Variant I4 element hres 0x%x\n", hres); - - V_VT(&gotvalue) = 0xdead; - hres = SafeArrayGetElement(sa, indices, &gotvalue); - ok(hres == S_OK, "Failed to get variant element at hres 0x%x\n", hres); - - V_VT(&gotvalue) = VT_EMPTY; - hres = SafeArrayGetElement(sa, indices, &gotvalue); - ok(hres == S_OK, "Failed to get variant element at hres 0x%x\n", hres); - if (hres == S_OK) { - ok(V_VT(&value) == V_VT(&gotvalue), "Got type 0x%x instead of 0x%x\n", V_VT(&value), V_VT(&gotvalue)); - if (V_VT(&value) == V_VT(&gotvalue)) - ok(V_I4(&value) == V_I4(&gotvalue), "Got %d instead of %d\n", V_I4(&value), V_VT(&gotvalue)); - } - SafeArrayDestroy(sa); -} - - -static void test_SafeArrayCopyData(void) -{ - SAFEARRAYBOUND sab[4]; - SAFEARRAY *sa; - SAFEARRAY *sacopy; - HRESULT hres; - int dimension,size=1; - - if (!pSafeArrayCopyData) - return; - - for (dimension = 0; dimension < NUM_DIMENSIONS; dimension++) - { - sab[dimension].lLbound = dimension * 2 + 2; - sab[dimension].cElements = dimension * 3 + 1; - size *= sab[dimension].cElements; - } - - sa = SafeArrayCreate(VT_INT, NUM_DIMENSIONS, sab); - ok(sa != NULL, "Copy test couldn't create array\n"); - sacopy = SafeArrayCreate(VT_INT, NUM_DIMENSIONS, sab); - ok(sacopy != NULL, "Copy test couldn't create copy array\n"); - - if (!sa || !sacopy) - return; - - ok(sa->cbElements == sizeof(int), "int size mismatch\n"); - if (sa->cbElements != sizeof(int)) - return; - - /* Fill the source array with some data; it doesn't matter what */ - for (dimension = 0; dimension < size; dimension++) - { - int* data = sa->pvData; - data[dimension] = dimension; - } - - hres = pSafeArrayCopyData(sa, sacopy); - ok(hres == S_OK, "copy data failed hres 0x%x\n", hres); - if (hres == S_OK) - { - ok(!memcmp(sa->pvData, sacopy->pvData, size * sizeof(int)), "compared different\n"); - } - - /* Failure cases */ - hres = pSafeArrayCopyData(NULL, sacopy); - ok(hres == E_INVALIDARG, "Null copy source hres 0x%x\n", hres); - hres = pSafeArrayCopyData(sa, NULL); - ok(hres == E_INVALIDARG, "Null copy hres 0x%x\n", hres); - - sacopy->rgsabound[0].cElements += 1; - hres = pSafeArrayCopyData(sa, sacopy); - ok(hres == E_INVALIDARG, "Bigger copy first dimension hres 0x%x\n", hres); - - sacopy->rgsabound[0].cElements -= 2; - hres = pSafeArrayCopyData(sa, sacopy); - ok(hres == E_INVALIDARG, "Smaller copy first dimension hres 0x%x\n", hres); - sacopy->rgsabound[0].cElements += 1; - - sacopy->rgsabound[3].cElements += 1; - hres = pSafeArrayCopyData(sa, sacopy); - ok(hres == E_INVALIDARG, "Bigger copy last dimension hres 0x%x\n", hres); - - sacopy->rgsabound[3].cElements -= 2; - hres = pSafeArrayCopyData(sa, sacopy); - ok(hres == E_INVALIDARG, "Smaller copy last dimension hres 0x%x\n", hres); - sacopy->rgsabound[3].cElements += 1; - - SafeArrayDestroy(sacopy); - sacopy = NULL; - hres = pSafeArrayCopyData(sa, sacopy); - ok(hres == E_INVALIDARG, "->Null copy hres 0x%x\n", hres); - - hres = SafeArrayCopy(sa, &sacopy); - ok(hres == S_OK, "copy failed hres 0x%x\n", hres); - if (hres == S_OK) - { - ok(SafeArrayGetElemsize(sa) == SafeArrayGetElemsize(sacopy),"elemsize wrong\n"); - ok(SafeArrayGetDim(sa) == SafeArrayGetDim(sacopy),"dimensions wrong\n"); - ok(!memcmp(sa->pvData, sacopy->pvData, size * sizeof(int)), "compared different\n"); - SafeArrayDestroy(sacopy); - } - - SafeArrayDestroy(sa); -} - -static void test_SafeArrayCreateEx(void) -{ - IRecordInfoImpl* iRec; - SAFEARRAYBOUND sab[4]; - SAFEARRAY *sa; - HRESULT hres; - int dimension; - - if (!pSafeArrayCreateEx) - return; - - for (dimension = 0; dimension < NUM_DIMENSIONS; dimension++) - { - sab[dimension].lLbound = 0; - sab[dimension].cElements = 8; - } - - /* Failure cases */ - sa = pSafeArrayCreateEx(VT_UI1, 1, NULL, NULL); - ok(sa == NULL, "CreateEx NULL bounds didn't fail\n"); - - /* test IID storage & defaulting */ - sa = pSafeArrayCreateEx(VT_DISPATCH, 1, sab, (PVOID)&IID_ITypeInfo); - ok(sa != NULL, "CreateEx (ITypeInfo) failed\n"); - - if (sa) - { - GUID guid; - if (pSafeArrayGetIID) - { - hres = pSafeArrayGetIID(sa, &guid); - ok(hres == S_OK, "CreateEx (ITypeInfo) no IID hres 0x%x\n", hres); - if (hres == S_OK) - { - ok(IsEqualGUID(&guid, &IID_ITypeInfo), "CreateEx (ITypeInfo) bad IID\n"); - } - } - if (pSafeArraySetIID) - { - hres = pSafeArraySetIID(sa, &IID_IUnknown); - ok(hres == S_OK, "Failed to set IID, hres = %8x\n", hres); - if (hres == S_OK && pSafeArrayGetIID) - { - hres = pSafeArrayGetIID(sa, &guid); - ok(hres == S_OK && IsEqualGUID(&guid, &IID_IUnknown), "Set bad IID\n"); - } - } - SafeArrayDestroy(sa); - } - - sa = pSafeArrayCreateEx(VT_DISPATCH, 1, sab, NULL); - ok(sa != NULL, "CreateEx (NULL) failed\n"); - - if (sa) - { - GUID guid; - if (pSafeArrayGetIID) - { - hres = pSafeArrayGetIID(sa, &guid); - ok(hres == S_OK, "CreateEx (NULL) no IID hres 0x%x\n", hres); - if (hres == S_OK) - { - ok(IsEqualGUID(&guid, &IID_IDispatch), "CreateEx (NULL) bad IID\n"); - } - } - SafeArrayDestroy(sa); - } - - sa = pSafeArrayCreateEx(VT_UNKNOWN, 1, sab, NULL); - ok(sa != NULL, "CreateEx (NULL-Unk) failed\n"); - - if (sa) - { - GUID guid; - if (pSafeArrayGetIID) - { - hres = pSafeArrayGetIID(sa, &guid); - ok(hres == S_OK, "CreateEx (NULL-Unk) no IID hres 0x%x\n", hres); - if (hres == S_OK) - { - ok(IsEqualGUID(&guid, &IID_IUnknown), "CreateEx (NULL-Unk) bad IID\n"); - } - } - SafeArrayDestroy(sa); - } - - /* VT_RECORD failure case */ - sa = pSafeArrayCreateEx(VT_RECORD, 1, sab, NULL); - ok(sa == NULL, "CreateEx (NULL-Rec) succeded\n"); - - iRec = IRecordInfoImpl_Construct(); - - /* Win32 doesn't care if GetSize fails */ - fail_GetSize = TRUE; - sa = pSafeArrayCreateEx(VT_RECORD, 1, sab, iRec); - ok(sa != NULL, "CreateEx (Fail Size) failed\n"); - ok(iRec->ref == START_REF_COUNT + 1, "Wrong iRec refcount %d\n", iRec->ref); - ok(iRec->sizeCalled == 1, "GetSize called %d times\n", iRec->sizeCalled); - ok(iRec->clearCalled == 0, "Clear called %d times\n", iRec->clearCalled); - if (sa) - { - ok(sa->cbElements == RECORD_SIZE_FAIL, "Altered size to %d\n", sa->cbElements); - SafeArrayDestroy(sa); - ok(iRec->clearCalled == sab[0].cElements, "Destroy->Clear called %d times\n", iRec->clearCalled); - } - - /* Test VT_RECORD array */ - fail_GetSize = FALSE; - iRec->ref = START_REF_COUNT; - iRec->sizeCalled = 0; - iRec->clearCalled = 0; - sa = pSafeArrayCreateEx(VT_RECORD, 1, sab, iRec); - ok(sa != NULL, "CreateEx (Rec) failed\n"); - ok(iRec->ref == START_REF_COUNT + 1, "Wrong iRec refcount %d\n", iRec->ref); - ok(iRec->sizeCalled == 1, "GetSize called %d times\n", iRec->sizeCalled); - ok(iRec->clearCalled == 0, "Clear called %d times\n", iRec->clearCalled); - if (sa && pSafeArrayGetRecordInfo) - { - IRecordInfo* saRec = NULL; - hres = pSafeArrayGetRecordInfo(sa, &saRec); - - ok(hres == S_OK,"GRI failed\n"); - ok(saRec == (IRecordInfo*)iRec,"Different saRec\n"); - ok(iRec->ref == START_REF_COUNT + 2, "Didn't AddRef %d\n", iRec->ref); - if (iRec->ref == START_REF_COUNT + 2) - IRecordInfo_Release(saRec); - - ok(sa->cbElements == RECORD_SIZE,"Elemsize is %d\n", sa->cbElements); - - SafeArrayDestroy(sa); - ok(iRec->sizeCalled == 1, "Destroy->GetSize called %d times\n", iRec->sizeCalled); - ok(iRec->clearCalled == sab[0].cElements, "Destroy->Clear called %d times\n", iRec->clearCalled); - ok(iRec->ref == START_REF_COUNT, "Wrong iRec refcount %d\n", iRec->ref); - } -} - -static void test_SafeArrayClear(void) -{ - SAFEARRAYBOUND sab; - SAFEARRAY *sa; - VARIANTARG v; - HRESULT hres; - - sab.lLbound = 0; - sab.cElements = 10; - sa = SafeArrayCreate(VT_UI1, 1, &sab); - ok(sa != NULL, "Create() failed.\n"); - if (!sa) - return; - - /* Test clearing non-NULL variants containing arrays */ - V_VT(&v) = VT_ARRAY|VT_UI1; - V_ARRAY(&v) = sa; - hres = VariantClear(&v); - ok(hres == S_OK && V_VT(&v) == VT_EMPTY, "VariantClear: hres 0x%x, Type %d\n", hres, V_VT(&v)); - ok(V_ARRAY(&v) == sa, "VariantClear: Overwrote value\n"); - - sa = SafeArrayCreate(VT_UI1, 1, &sab); - ok(sa != NULL, "Create() failed.\n"); - if (!sa) - return; - - V_VT(&v) = VT_SAFEARRAY; - V_ARRAY(&v) = sa; - hres = VariantClear(&v); - ok(hres == DISP_E_BADVARTYPE, "VariantClear: hres 0x%x\n", hres); - - V_VT(&v) = VT_SAFEARRAY|VT_BYREF; - V_ARRAYREF(&v) = &sa; - hres = VariantClear(&v); - ok(hres == DISP_E_BADVARTYPE, "VariantClear: hres 0x%x\n", hres); - - SafeArrayDestroy(sa); -} - -static void test_SafeArrayCopy(void) -{ - SAFEARRAYBOUND sab; - SAFEARRAY *sa, *sa2; - VARIANTARG vSrc, vDst; - HRESULT hres; - - sab.lLbound = 0; - sab.cElements = 10; - sa = SafeArrayCreate(VT_UI1, 1, &sab); - ok(sa != NULL, "Create() failed.\n"); - if (!sa) - return; - - /* Test copying non-NULL variants containing arrays */ - V_VT(&vSrc) = (VT_ARRAY|VT_BYREF|VT_UI1); - V_ARRAYREF(&vSrc) = &sa; - V_VT(&vDst) = VT_EMPTY; - - hres = VariantCopy(&vDst, &vSrc); - ok(hres == S_OK && V_VT(&vDst) == (VT_ARRAY|VT_BYREF|VT_UI1), - "VariantCopy: hres 0x%x, Type %d\n", hres, V_VT(&vDst)); - ok(V_ARRAYREF(&vDst) == &sa, "VariantClear: Performed deep copy\n"); - - V_VT(&vSrc) = (VT_ARRAY|VT_UI1); - V_ARRAY(&vSrc) = sa; - V_VT(&vDst) = VT_EMPTY; - - hres = VariantCopy(&vDst, &vSrc); - ok(hres == S_OK && V_VT(&vDst) == (VT_ARRAY|VT_UI1), - "VariantCopy: hres 0x%x, Type %d\n", hres, V_VT(&vDst)); - ok(V_ARRAY(&vDst) != sa, "VariantClear: Performed shallow copy\n"); - - SafeArrayDestroy(V_ARRAY(&vSrc)); - SafeArrayDestroy(V_ARRAY(&vDst)); - - hres = SafeArrayAllocDescriptor(1, &sa); - ok(hres == S_OK, "SafeArrayAllocDescriptor failed with error 0x%08x\n", hres); - - hres = SafeArrayCopy(sa, &sa2); - ok(hres == E_INVALIDARG, - "SafeArrayCopy with empty array should have failed with error E_INVALIDARG instead of 0x%08x\n", - hres); - sa->cbElements = 16; - hres = SafeArrayCopy(sa, &sa2); - ok(hres == S_OK, "SafeArrayCopy failed with error 0x%08x\n", hres); - - SafeArrayDestroy(sa2); - SafeArrayDestroy(sa); -} - -#define MKARRAY(low,num,typ) sab.lLbound = low; sab.cElements = num; \ - sa = SafeArrayCreate(typ, 1, &sab); ok(sa != NULL, "Create() failed.\n"); \ - if (!sa) return; \ - V_VT(&v) = VT_ARRAY|typ; V_ARRAY(&v) = sa; VariantInit(&v2) - -#define MKARRAYCONT(low,num,typ) sab.lLbound = low; sab.cElements = num; \ - sa = SafeArrayCreate(typ, 1, &sab); if (!sa) continue; \ - V_VT(&v) = VT_ARRAY|typ; V_ARRAY(&v) = sa; VariantInit(&v2) - -static void test_SafeArrayChangeTypeEx(void) -{ - static const char *szHello = "Hello World"; - SAFEARRAYBOUND sab; - SAFEARRAY *sa; - VARIANTARG v,v2; - VARTYPE vt; - HRESULT hres; - - /* VT_ARRAY|VT_UI1 -> VT_BSTR */ - MKARRAY(0,strlen(szHello)+1,VT_UI1); - memcpy(sa->pvData, szHello, strlen(szHello)+1); - - hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_BSTR); - ok(hres == S_OK, "CTE VT_ARRAY|VT_UI1 -> VT_BSTR failed with %x\n", hres); - if (hres == S_OK) - { - ok(V_VT(&v2) == VT_BSTR, "CTE VT_ARRAY|VT_UI1 -> VT_BSTR did not return VT_BSTR, but %d.\n",V_VT(&v2)); - ok(strcmp((char*)V_BSTR(&v2),szHello) == 0,"Expected string '%s', got '%s'\n", szHello, - (char*)V_BSTR(&v2)); - VariantClear(&v2); - } - - /* VT_VECTOR|VT_UI1 -> VT_BSTR */ - SafeArrayDestroy(sa); - if (pSafeArrayCreateVector) - { - sa = pSafeArrayCreateVector(VT_UI1, 0, strlen(szHello)+1); - ok(sa != NULL, "CreateVector() failed.\n"); - if (!sa) - return; - - memcpy(sa->pvData, szHello, strlen(szHello)+1); - V_VT(&v) = VT_VECTOR|VT_UI1; - V_ARRAY(&v) = sa; - VariantInit(&v2); - - hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_BSTR); - ok(hres == DISP_E_BADVARTYPE, "CTE VT_VECTOR|VT_UI1 returned %x\n", hres); - - /* (vector)VT_ARRAY|VT_UI1 -> VT_BSTR (In place) */ - V_VT(&v) = VT_ARRAY|VT_UI1; - hres = VariantChangeTypeEx(&v, &v, 0, 0, VT_BSTR); - ok(hres == S_OK, "CTE VT_ARRAY|VT_UI1 -> VT_BSTR failed with %x\n", hres); - if (hres == S_OK) - { - ok(V_VT(&v) == VT_BSTR, "CTE VT_ARRAY|VT_UI1 -> VT_BSTR did not return VT_BSTR, but %d.\n",V_VT(&v)); - ok(strcmp((char*)V_BSTR(&v),szHello) == 0,"Expected string '%s', got '%s'\n", szHello, - (char*)V_BSTR(&v)); - VariantClear(&v); - } - } - - /* To/from BSTR only works with arrays of VT_UI1 */ - for (vt = 0; vt <= VT_CLSID; vt++) - { - if (vt == VT_UI1) - continue; - - MKARRAYCONT(0,1,vt); - hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_BSTR); - ok(hres != S_OK, "CTE VT_ARRAY|VT %d->BSTR succeeded\n", vt); - VariantClear(&v2); - VariantClear(&v); - } - - /* Can't change an array of one type into array of another type , even - * if the other type is the same size - */ - if (pSafeArrayCreateVector) - { - sa = pSafeArrayCreateVector(VT_UI1, 0, 1); - ok(sa != NULL, "CreateVector() failed.\n"); - if (!sa) - return; - - V_VT(&v) = VT_ARRAY|VT_UI1; - V_ARRAY(&v) = sa; - hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_ARRAY|VT_I1); - ok(hres == DISP_E_TYPEMISMATCH, "CTE VT_ARRAY|VT_UI1->VT_ARRAY|VT_I1 returned %x\n", hres); - - /* But can change to the same array type */ - SafeArrayDestroy(sa); - sa = pSafeArrayCreateVector(VT_UI1, 0, 1); - ok(sa != NULL, "CreateVector() failed.\n"); - if (!sa) - return; - V_VT(&v) = VT_ARRAY|VT_UI1; - V_ARRAY(&v) = sa; - hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_ARRAY|VT_UI1); - ok(hres == S_OK, "CTE VT_ARRAY|VT_UI1->VT_ARRAY|VT_UI1 returned %x\n", hres); - SafeArrayDestroy(sa); - VariantClear(&v2); - } - - /* NULL/EMPTY */ - MKARRAY(0,1,VT_UI1); - hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_NULL); - ok(hres == DISP_E_TYPEMISMATCH, "CTE VT_ARRAY|VT_UI1 returned %x\n", hres); - VariantClear(&v); - MKARRAY(0,1,VT_UI1); - hres = VariantChangeTypeEx(&v2, &v, 0, 0, VT_EMPTY); - ok(hres == DISP_E_TYPEMISMATCH, "CTE VT_ARRAY|VT_UI1 returned %x\n", hres); - VariantClear(&v); - -} - -static void test_SafeArrayDestroyData (void) -{ - SAFEARRAYBOUND sab; - SAFEARRAY *sa; - HRESULT hres; - int value = 0xdeadbeef; - LONG index[1]; - void HUGEP *temp_pvData; - - sab.lLbound = 0; - sab.cElements = 10; - sa = SafeArrayCreate(VT_INT, 1, &sab); - ok(sa != NULL, "Create() failed.\n"); - if (!sa) - return; - index[0] = 1; - SafeArrayPutElement (sa, index, &value); - -/* SafeArrayDestroyData shouldn't free pvData if FADF_STATIC is set. */ - sa->fFeatures |= FADF_STATIC; - temp_pvData = sa->pvData; - hres = SafeArrayDestroyData(sa); - ok(hres == S_OK, "SADData FADF_STATIC failed, error code %x.\n",hres); - ok(sa->pvData == temp_pvData, "SADData FADF_STATIC: pvData=%p, expected %p (fFeatures = %d).\n", - sa->pvData, temp_pvData, sa->fFeatures); - SafeArrayGetElement (sa, index, &value); - ok(value == 0, "Data not cleared after SADData\n"); - -/* Clear FADF_STATIC, now really destroy the data. */ - sa->fFeatures ^= FADF_STATIC; - hres = SafeArrayDestroyData(sa); - ok(hres == S_OK, "SADData !FADF_STATIC failed, error code %x.\n",hres); - ok(sa->pvData == NULL, "SADData !FADF_STATIC: pvData=%p, expected NULL.\n", sa->pvData); - - hres = SafeArrayDestroy(sa); - ok(hres == S_OK, "SAD failed, error code %x.\n", hres); -} - -START_TEST(safearray) -{ - hOleaut32 = GetModuleHandleA("oleaut32.dll"); - - GETPTR(SafeArrayAllocDescriptorEx); - GETPTR(SafeArrayCopyData); - GETPTR(SafeArrayGetIID); - GETPTR(SafeArraySetIID); - GETPTR(SafeArrayGetVartype); - GETPTR(SafeArrayCreateEx); - GETPTR(SafeArrayCreateVector); - - check_for_VT_INT_PTR(); - test_safearray(); - test_SafeArrayAllocDestroyDescriptor(); - test_SafeArrayCreateLockDestroy(); - test_VectorCreateLockDestroy(); - test_LockUnlock(); - test_SafeArrayChangeTypeEx(); - test_SafeArrayCopy(); - test_SafeArrayClear(); - test_SafeArrayCreateEx(); - test_SafeArrayCopyData(); - test_SafeArrayDestroyData(); - test_SafeArrayGetPutElement(); - test_SafeArrayGetPutElement_BSTR(); - test_SafeArrayGetPutElement_IUnknown(); - test_SafeArrayRedim_IUnknown(); - test_SafeArrayGetPutElement_VARIANT(); -} diff --git a/rostests/winetests/oleaut32/test_reg.idl b/rostests/winetests/oleaut32/test_reg.idl deleted file mode 100644 index 4598efd5ce7..00000000000 --- a/rostests/winetests/oleaut32/test_reg.idl +++ /dev/null @@ -1,130 +0,0 @@ -/* - * A typelib to test registration. - * - * Copyright 2010 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 - */ - -import "oaidl.idl"; /* needed by widl */ - -[ - uuid(a2cfdbd3-2bbf-4b1c-a414-5a5904e634c9), - version(1.0) -] -library register_test -{ - importlib("stdole2.tlb"); - - [ - uuid(06c1f5f0-ea49-44f9-8e3b-4be00c7a0689) - ] - interface Inon_ole : IUnknown - { - HRESULT test(); - } - - [ - uuid(06c1f5f1-ea49-44f9-8e3b-4be00c7a0689) - ] - interface Inon_ole_from_disp : IDispatch - { - HRESULT test(); - } - - [ - uuid(06c1f5f2-ea49-44f9-8e3b-4be00c7a0689), - oleautomation - ] - interface Iole : IUnknown - { - HRESULT test(); - } - - [ - uuid(06c1f5f3-ea49-44f9-8e3b-4be00c7a0689), - oleautomation - ] - interface Iole_from_disp : IDispatch - { - HRESULT test(); - } - - [ - uuid(06c1f5f4-ea49-44f9-8e3b-4be00c7a0689), - dual - ] - interface Inon_ole_dual : IUnknown - { - HRESULT test(); - } - - [ - uuid(06c1f5f5-ea49-44f9-8e3b-4be00c7a0689), - oleautomation, - dual - ] - interface Iole_dual : IUnknown - { - HRESULT test(); - } - - [ - uuid(06c1f5f6-ea49-44f9-8e3b-4be00c7a0689), - dual - ] - interface Inon_ole_dual_from_disp : IDispatch - { - HRESULT test(); - } - - [ - uuid(06c1f5f7-ea49-44f9-8e3b-4be00c7a0689), - oleautomation, - dual - ] - interface Iole_dual_from_disp : IDispatch - { - HRESULT test(); - } - - /* oleautomation not allowed with dispinterfaces */ - [ - uuid(06c1f5f8-ea49-44f9-8e3b-4be00c7a0689) - ] - dispinterface Idisp - { - properties: - [id(0x0)] BSTR Name; - methods: - } - - [ - uuid(06c1f5f9-ea49-44f9-8e3b-4be00c7a0689) - ] - dispinterface Idisp_from_non_ole_iface - { - interface Inon_ole; - } - - [ - uuid(06c1f5fa-ea49-44f9-8e3b-4be00c7a0689) - ] - dispinterface Idisp_from_ole_from_disp_iface - { - interface Iole_from_disp; - } - -} diff --git a/rostests/winetests/oleaut32/test_tlb.idl b/rostests/winetests/oleaut32/test_tlb.idl deleted file mode 100644 index 91b6a7680af..00000000000 --- a/rostests/winetests/oleaut32/test_tlb.idl +++ /dev/null @@ -1,39 +0,0 @@ -/* - * ITypeLib test IDL - we dump it and compare results in typelib.c - * - * Copyright 2007 Google (Mikolaj Zalewski) - * - * 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 "oaidl.idl"; /* needed by widl */ - -[uuid(8b05fe77-4a6c-4133-b9cd-8f81747af784)] -library Test -{ - importlib("stdole2.tlb"); - - [dual,uuid(b14b6bb5-904e-4ff9-b247-bd361f7aaedd)] - interface IDualIface : IDispatch - { - HRESULT test(); - } - - [uuid(ec5dfcd6-eeb0-4cd6-b51e-8030e1dac009)] - interface ISimpleIface : IDispatch - { - HRESULT test(); - } -} diff --git a/rostests/winetests/oleaut32/testlist.c b/rostests/winetests/oleaut32/testlist.c deleted file mode 100644 index 7ba9bf2741f..00000000000 --- a/rostests/winetests/oleaut32/testlist.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_dispatch(void); -extern void func_olefont(void); -extern void func_olepicture(void); -extern void func_safearray(void); -extern void func_tmarshal(void); -extern void func_typelib(void); -extern void func_usrmarshal(void); -extern void func_varformat(void); -extern void func_vartest(void); -extern void func_vartype(void); - -const struct test winetest_testlist[] = -{ - { "dispatch", func_dispatch }, - { "olefont", func_olefont }, - { "olepicture", func_olepicture }, - { "safearray", func_safearray }, - { "tmarshal", func_tmarshal }, - { "typelib", func_typelib }, - { "usrmarshal", func_usrmarshal }, - { "varformat", func_varformat }, - { "vartest", func_vartest }, - { "vartype", func_vartype }, - { 0, 0 } -}; diff --git a/rostests/winetests/oleaut32/tmarshal.c b/rostests/winetests/oleaut32/tmarshal.c deleted file mode 100644 index f7df82f4920..00000000000 --- a/rostests/winetests/oleaut32/tmarshal.c +++ /dev/null @@ -1,1546 +0,0 @@ -/* - * Copyright (C) 2005-2006 Robert Shearman 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 - * - */ - -#define COBJMACROS -#define CONST_VTABLE - -#include -#include -#include - -#include "wine/test.h" - -#include "tmarshal.h" -#include "tmarshal_dispids.h" - -#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08lx\n", (unsigned long int)hr) - -/* ULL suffix is not portable */ -#define ULL_CONST(dw1, dw2) ((((ULONGLONG)dw1) << 32) | (ULONGLONG)dw2) - -const MYSTRUCT MYSTRUCT_BYVAL = {0x12345678, ULL_CONST(0xdeadbeef, 0x98765432)}; -const MYSTRUCT MYSTRUCT_BYPTR = {0x91827364, ULL_CONST(0x88776655, 0x44332211)}; -const MYSTRUCT MYSTRUCT_ARRAY[5] = { - {0x1a1b1c1d, ULL_CONST(0x1e1f1011, 0x12131415)}, - {0x2a2b2c2d, ULL_CONST(0x2e2f2021, 0x22232425)}, - {0x3a3b3c3d, ULL_CONST(0x3e3f3031, 0x32333435)}, - {0x4a4b4c4d, ULL_CONST(0x4e4f4041, 0x42434445)}, - {0x5a5b5c5d, ULL_CONST(0x5e5f5051, 0x52535455)}, -}; - - -#define RELEASEMARSHALDATA WM_USER - -struct host_object_data -{ - IStream *stream; - IID iid; - IUnknown *object; - MSHLFLAGS marshal_flags; - HANDLE marshal_event; - IMessageFilter *filter; -}; - -static DWORD CALLBACK host_object_proc(LPVOID p) -{ - struct host_object_data *data = p; - HRESULT hr; - MSG msg; - - CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - if (data->filter) - { - IMessageFilter * prev_filter = NULL; - hr = CoRegisterMessageFilter(data->filter, &prev_filter); - if (prev_filter) IMessageFilter_Release(prev_filter); - ok_ole_success(hr, CoRegisterMessageFilter); - } - - hr = CoMarshalInterface(data->stream, &data->iid, data->object, MSHCTX_INPROC, NULL, data->marshal_flags); - ok_ole_success(hr, CoMarshalInterface); - - /* force the message queue to be created before signaling parent thread */ - PeekMessage(&msg, NULL, WM_USER, WM_USER, PM_NOREMOVE); - - SetEvent(data->marshal_event); - - while (GetMessage(&msg, NULL, 0, 0)) - { - if (msg.hwnd == NULL && msg.message == RELEASEMARSHALDATA) - { - trace("releasing marshal data\n"); - CoReleaseMarshalData(data->stream); - SetEvent((HANDLE)msg.lParam); - } - else - DispatchMessage(&msg); - } - - HeapFree(GetProcessHeap(), 0, data); - - CoUninitialize(); - - return hr; -} - -static DWORD start_host_object2(IStream *stream, REFIID riid, IUnknown *object, MSHLFLAGS marshal_flags, IMessageFilter *filter, HANDLE *thread) -{ - DWORD tid = 0; - HANDLE marshal_event = CreateEvent(NULL, FALSE, FALSE, NULL); - struct host_object_data *data = HeapAlloc(GetProcessHeap(), 0, sizeof(*data)); - - data->stream = stream; - data->iid = *riid; - data->object = object; - data->marshal_flags = marshal_flags; - data->marshal_event = marshal_event; - data->filter = filter; - - *thread = CreateThread(NULL, 0, host_object_proc, data, 0, &tid); - - /* wait for marshaling to complete before returning */ - WaitForSingleObject(marshal_event, INFINITE); - CloseHandle(marshal_event); - - return tid; -} - -static DWORD start_host_object(IStream *stream, REFIID riid, IUnknown *object, MSHLFLAGS marshal_flags, HANDLE *thread) -{ - return start_host_object2(stream, riid, object, marshal_flags, NULL, thread); -} - -#if 0 /* not used */ -/* asks thread to release the marshal data because it has to be done by the - * same thread that marshaled the interface in the first place. */ -static void release_host_object(DWORD tid) -{ - HANDLE event = CreateEvent(NULL, FALSE, FALSE, NULL); - PostThreadMessage(tid, RELEASEMARSHALDATA, 0, (LPARAM)event); - WaitForSingleObject(event, INFINITE); - CloseHandle(event); -} -#endif - -static void end_host_object(DWORD tid, HANDLE thread) -{ - BOOL ret = PostThreadMessage(tid, WM_QUIT, 0, 0); - ok(ret, "PostThreadMessage failed with error %d\n", GetLastError()); - /* be careful of races - don't return until hosting thread has terminated */ - WaitForSingleObject(thread, INFINITE); - CloseHandle(thread); -} - -static ItestDual TestDual, TestDualDisp; - -static HRESULT WINAPI TestDual_QueryInterface(ItestDual *iface, REFIID riid, void **ppvObject) -{ - if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IDispatch)) { - *ppvObject = &TestDualDisp; - return S_OK; - }else if(IsEqualGUID(riid, &IID_ItestDual)) { - *ppvObject = &TestDual; - return S_OK; - } - - *ppvObject = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI TestDual_AddRef(ItestDual *iface) -{ - return 2; -} - -static ULONG WINAPI TestDual_Release(ItestDual *iface) -{ - return 1; -} - -static HRESULT WINAPI TestDual_GetTypeInfoCount(ItestDual *iface, UINT *pctinfo) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI TestDual_GetTypeInfo(ItestDual *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI TestDual_GetIDsOfNames(ItestDual *iface, REFIID riid, LPOLESTR *rgszNames, - UINT cNames, LCID lcid, DISPID *rgDispId) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI TestDual_Invoke(ItestDual *iface, DISPID dispIdMember, REFIID riid, LCID lcid, - WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, - UINT *puArgErr) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static ItestDualVtbl TestDualVtbl = { - TestDual_QueryInterface, - TestDual_AddRef, - TestDual_Release, - TestDual_GetTypeInfoCount, - TestDual_GetTypeInfo, - TestDual_GetIDsOfNames, - TestDual_Invoke -}; - -static ItestDual TestDual = { &TestDualVtbl }; -static ItestDual TestDualDisp = { &TestDualVtbl }; - -typedef struct Widget -{ - const IWidgetVtbl *lpVtbl; - LONG refs; - IUnknown *pDispatchUnknown; -} Widget; - -static HRESULT WINAPI Widget_QueryInterface( - IWidget *iface, - /* [in] */ REFIID riid, - /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject) -{ - if (IsEqualIID(riid, &IID_IWidget) || IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IDispatch)) - { - IWidget_AddRef(iface); - *ppvObject = iface; - return S_OK; - } - else - { - *ppvObject = NULL; - return E_NOINTERFACE; - } -} - -static ULONG WINAPI Widget_AddRef( - IWidget *iface) -{ - Widget *This = (Widget *)iface; - - return InterlockedIncrement(&This->refs); -} - -static ULONG WINAPI Widget_Release( - IWidget *iface) -{ - Widget *This = (Widget *)iface; - ULONG refs = InterlockedDecrement(&This->refs); - if (!refs) - { - IUnknown_Release(This->pDispatchUnknown); - memset(This, 0xcc, sizeof(*This)); - HeapFree(GetProcessHeap(), 0, This); - trace("Widget destroyed!\n"); - } - - return refs; -} - -static HRESULT WINAPI Widget_GetTypeInfoCount( - IWidget *iface, - /* [out] */ UINT __RPC_FAR *pctinfo) -{ - Widget *This = (Widget *)iface; - IDispatch *pDispatch; - HRESULT hr = IUnknown_QueryInterface(This->pDispatchUnknown, &IID_IDispatch, (void **)&pDispatch); - if (SUCCEEDED(hr)) - { - hr = IDispatch_GetTypeInfoCount(pDispatch, pctinfo); - IDispatch_Release(pDispatch); - } - return hr; -} - -static HRESULT WINAPI Widget_GetTypeInfo( - IWidget __RPC_FAR * iface, - /* [in] */ UINT iTInfo, - /* [in] */ LCID lcid, - /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo) -{ - Widget *This = (Widget *)iface; - IDispatch *pDispatch; - HRESULT hr = IUnknown_QueryInterface(This->pDispatchUnknown, &IID_IDispatch, (void **)&pDispatch); - if (SUCCEEDED(hr)) - { - hr = IDispatch_GetTypeInfo(pDispatch, iTInfo, lcid, ppTInfo); - IDispatch_Release(pDispatch); - } - return hr; -} - -static HRESULT WINAPI Widget_GetIDsOfNames( - IWidget __RPC_FAR * iface, - /* [in] */ REFIID riid, - /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames, - /* [in] */ UINT cNames, - /* [in] */ LCID lcid, - /* [size_is][out] */ DISPID __RPC_FAR *rgDispId) -{ - Widget *This = (Widget *)iface; - IDispatch *pDispatch; - HRESULT hr = IUnknown_QueryInterface(This->pDispatchUnknown, &IID_IDispatch, (void **)&pDispatch); - if (SUCCEEDED(hr)) - { - hr = IDispatch_GetIDsOfNames(pDispatch, riid, rgszNames, cNames, lcid, rgDispId); - IDispatch_Release(pDispatch); - } - return hr; -} - -static HRESULT WINAPI Widget_Invoke( - IWidget __RPC_FAR * iface, - /* [in] */ DISPID dispIdMember, - /* [in] */ REFIID riid, - /* [in] */ LCID lcid, - /* [in] */ WORD wFlags, - /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams, - /* [out] */ VARIANT __RPC_FAR *pVarResult, - /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo, - /* [out] */ UINT __RPC_FAR *puArgErr) -{ - Widget *This = (Widget *)iface; - IDispatch *pDispatch; - HRESULT hr = IUnknown_QueryInterface(This->pDispatchUnknown, &IID_IDispatch, (void **)&pDispatch); - if (SUCCEEDED(hr)) - { - hr = IDispatch_Invoke(pDispatch, dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); - IDispatch_Release(pDispatch); - } - return hr; -} - -static HRESULT WINAPI Widget_put_Name( - IWidget __RPC_FAR * iface, - /* [in] */ BSTR name) -{ - trace("put_Name(%s)\n", wine_dbgstr_w(name)); - return S_OK; -} - -static HRESULT WINAPI Widget_get_Name( - IWidget __RPC_FAR * iface, - /* [out] */ BSTR __RPC_FAR *name) -{ - static const WCHAR szCat[] = { 'C','a','t',0 }; - trace("get_Name()\n"); - *name = SysAllocString(szCat); - return S_OK; -} - -static HRESULT WINAPI Widget_DoSomething( - IWidget __RPC_FAR * iface, - /* [in] */ double number, - /* [out] */ BSTR *str1, - /* [defaultvalue][in] */ BSTR str2, - /* [optional][in] */ VARIANT __RPC_FAR *opt) -{ - static const WCHAR szString[] = { 'S','t','r','i','n','g',0 }; - trace("DoSomething()\n"); - - ok(number == 3.141, "number(%f) != 3.141\n", number); - ok(*str2 == '\0', "str2(%s) != \"\"\n", wine_dbgstr_w(str2)); - ok(V_VT(opt) == VT_ERROR, "V_VT(opt) should be VT_ERROR instead of 0x%x\n", V_VT(opt)); - ok(V_ERROR(opt) == DISP_E_PARAMNOTFOUND, "V_ERROR(opt) should be DISP_E_PARAMNOTFOUND instead of 0x%08x\n", V_ERROR(opt)); - *str1 = SysAllocString(szString); - - return S_FALSE; -} - -static HRESULT WINAPI Widget_get_State( - IWidget __RPC_FAR * iface, - /* [retval][out] */ STATE __RPC_FAR *state) -{ - trace("get_State() = STATE_WIDGETIFIED\n"); - *state = STATE_WIDGETIFIED; - return S_OK; -} - -static HRESULT WINAPI Widget_put_State( - IWidget __RPC_FAR * iface, - /* [in] */ STATE state) -{ - trace("put_State(%d)\n", state); - return S_OK; -} - -static HRESULT WINAPI Widget_Map( - IWidget * iface, - BSTR bstrId, - BSTR *sValue) -{ - trace("Map(%s, %p)\n", wine_dbgstr_w(bstrId), sValue); - *sValue = SysAllocString(bstrId); - return S_OK; -} - -static HRESULT WINAPI Widget_SetOleColor( - IWidget * iface, - OLE_COLOR val) -{ - trace("SetOleColor(0x%x)\n", val); - return S_OK; -} - -static HRESULT WINAPI Widget_GetOleColor( - IWidget * iface, - OLE_COLOR *pVal) -{ - trace("GetOleColor() = 0x8000000f\n"); - *pVal = 0x8000000f; - return S_FALSE; -} - -static HRESULT WINAPI Widget_Clone( - IWidget *iface, - IWidget **ppVal) -{ - trace("Clone()\n"); - return Widget_QueryInterface(iface, &IID_IWidget, (void **)ppVal); -} - -static HRESULT WINAPI Widget_CloneDispatch( - IWidget *iface, - IDispatch **ppVal) -{ - trace("CloneDispatch()\n"); - return Widget_QueryInterface(iface, &IID_IWidget, (void **)ppVal); -} - -static HRESULT WINAPI Widget_CloneCoclass( - IWidget *iface, - ApplicationObject2 **ppVal) -{ - trace("CloneCoclass()\n"); - return S_OK; -} - -static HRESULT WINAPI Widget_Value( - IWidget __RPC_FAR * iface, - VARIANT *value, - VARIANT *retval) -{ - trace("Value(%p, %p)\n", value, retval); - ok(V_VT(value) == VT_I2, "V_VT(value) was %d instead of VT_I2\n", V_VT(value)); - ok(V_I2(value) == 1, "V_I2(value) was %d instead of 1\n", V_I2(value)); - V_VT(retval) = VT_I2; - V_I2(retval) = 1234; - return S_OK; -} - -static HRESULT WINAPI Widget_Array( - IWidget * iface, - SAFEARRAY * values) -{ - trace("Array(%p)\n", values); - return S_OK; -} - -static HRESULT WINAPI Widget_VariantArrayPtr( - IWidget * iface, - SAFEARRAY ** values) -{ - trace("VariantArrayPtr(%p)\n", values); - return S_OK; -} - -static HRESULT WINAPI Widget_Variant( - IWidget __RPC_FAR * iface, - VARIANT var) -{ - trace("Variant()\n"); - ok(V_VT(&var) == VT_CY, "V_VT(&var) was %d\n", V_VT(&var)); - ok(S(V_CY(&var)).Hi == 0xdababe, "V_CY(&var).Hi was 0x%x\n", S(V_CY(&var)).Hi); - ok(S(V_CY(&var)).Lo == 0xdeadbeef, "V_CY(&var).Lo was 0x%x\n", S(V_CY(&var)).Lo); - return S_OK; -} - -static HRESULT WINAPI Widget_VarArg( - IWidget * iface, - int numexpect, - SAFEARRAY * values) -{ - LONG lbound, ubound, i; - VARIANT * data; - HRESULT hr; - - trace("VarArg(%p)\n", values); - - hr = SafeArrayGetLBound(values, 1, &lbound); - ok(hr == S_OK, "SafeArrayGetLBound failed with %x\n", hr); - ok(lbound == 0, "SafeArrayGetLBound returned %d\n", lbound); - - hr = SafeArrayGetUBound(values, 1, &ubound); - ok(hr == S_OK, "SafeArrayGetUBound failed with %x\n", hr); - ok(ubound == numexpect-1, "SafeArrayGetUBound returned %d, but expected %d\n", ubound, numexpect-1); - - hr = SafeArrayAccessData(values, (LPVOID)&data); - ok(hr == S_OK, "SafeArrayAccessData failed with %x\n", hr); - - for (i=0; i<=ubound-lbound; i++) - { - ok(V_VT(&data[i]) == VT_I4, "V_VT(&data[%d]) was %d\n", i, V_VT(&data[i])); - ok(V_I4(&data[i]) == i, "V_I4(&data[%d]) was %d\n", i, V_I4(&data[i])); - } - - hr = SafeArrayUnaccessData(values); - ok(hr == S_OK, "SafeArrayUnaccessData failed with %x\n", hr); - - return S_OK; -} - -static HRESULT WINAPI Widget_StructArgs( - IWidget * iface, - MYSTRUCT byval, - MYSTRUCT *byptr, - MYSTRUCT arr[5]) -{ - int i, diff = 0; - ok(byval.field1 == MYSTRUCT_BYVAL.field1 && - byval.field2 == MYSTRUCT_BYVAL.field2, - "Struct parameter passed by value corrupted\n"); - ok(byptr->field1 == MYSTRUCT_BYPTR.field1 && - byptr->field2 == MYSTRUCT_BYPTR.field2, - "Struct parameter passed by pointer corrupted\n"); - for (i = 0; i < 5; i++) - if (arr[i].field1 != MYSTRUCT_ARRAY[i].field1 || - arr[i].field2 != MYSTRUCT_ARRAY[i].field2) - diff++; - ok(diff == 0, "Array of structs corrupted\n"); - return S_OK; -} - - -static HRESULT WINAPI Widget_Error( - IWidget __RPC_FAR * iface) -{ - trace("Error()\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Widget_CloneInterface( - IWidget __RPC_FAR * iface, - ISomethingFromDispatch **ppVal) -{ - trace("CloneInterface()\n"); - *ppVal = 0; - return S_OK; -} - -static HRESULT WINAPI Widget_put_prop_with_lcid( - IWidget* iface, LONG lcid, INT i) -{ - trace("put_prop_with_lcid(%08x, %x)\n", lcid, i); - ok(lcid == MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), "got lcid %08x\n", lcid); - ok(i == 0xcafe, "got %08x\n", i); - return S_OK; -} - -static HRESULT WINAPI Widget_get_prop_with_lcid( - IWidget* iface, LONG lcid, INT *i) -{ - trace("get_prop_with_lcid(%08x, %p)\n", lcid, i); - ok(lcid == MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), "got lcid %08x\n", lcid); - *i = lcid; - return S_OK; -} - -static HRESULT WINAPI Widget_get_prop_int( - IWidget* iface, INT *i) -{ - trace("get_prop_int(%p)\n", i); - *i = -13; - return S_OK; -} - -static HRESULT WINAPI Widget_get_prop_uint( - IWidget* iface, UINT *i) -{ - trace("get_prop_uint(%p)\n", i); - *i = 42; - return S_OK; -} - -static HRESULT WINAPI Widget_ByRefUInt( - IWidget* iface, UINT *i) -{ - *i = 42; - return S_OK; -} - -static HRESULT WINAPI Widget_put_prop_opt_arg( - IWidget* iface, INT opt, INT i) -{ - trace("put_prop_opt_arg(%08x, %08x)\n", opt, i); - todo_wine ok(opt == 0, "got opt=%08x\n", opt); - ok(i == 0xcafe, "got i=%08x\n", i); - return S_OK; -} - -static HRESULT WINAPI Widget_put_prop_req_arg( - IWidget* iface, INT req, INT i) -{ - trace("put_prop_req_arg(%08x, %08x)\n", req, i); - ok(req == 0x5678, "got req=%08x\n", req); - ok(i == 0x1234, "got i=%08x\n", i); - return S_OK; -} - -static const struct IWidgetVtbl Widget_VTable = -{ - Widget_QueryInterface, - Widget_AddRef, - Widget_Release, - Widget_GetTypeInfoCount, - Widget_GetTypeInfo, - Widget_GetIDsOfNames, - Widget_Invoke, - Widget_put_Name, - Widget_get_Name, - Widget_DoSomething, - Widget_get_State, - Widget_put_State, - Widget_Map, - Widget_SetOleColor, - Widget_GetOleColor, - Widget_Clone, - Widget_CloneDispatch, - Widget_CloneCoclass, - Widget_Value, - Widget_Array, - Widget_VariantArrayPtr, - Widget_Variant, - Widget_VarArg, - Widget_StructArgs, - Widget_Error, - Widget_CloneInterface, - Widget_put_prop_with_lcid, - Widget_get_prop_with_lcid, - Widget_get_prop_int, - Widget_get_prop_uint, - Widget_ByRefUInt, - Widget_put_prop_opt_arg, - Widget_put_prop_req_arg, -}; - -static HRESULT WINAPI StaticWidget_QueryInterface(IStaticWidget *iface, REFIID riid, void **ppvObject) -{ - if (IsEqualIID(riid, &IID_IStaticWidget) || IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IDispatch)) - { - IStaticWidget_AddRef(iface); - *ppvObject = iface; - return S_OK; - } - - *ppvObject = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI StaticWidget_AddRef(IStaticWidget *iface) -{ - return 2; -} - -static ULONG WINAPI StaticWidget_Release(IStaticWidget *iface) -{ - return 1; -} - -static HRESULT WINAPI StaticWidget_GetTypeInfoCount(IStaticWidget *iface, UINT *pctinfo) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI StaticWidget_GetTypeInfo(IStaticWidget *iface, UINT iTInfo, LCID lcid, - ITypeInfo **ppTInfo) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI StaticWidget_GetIDsOfNames(IStaticWidget *iface, REFIID riid, LPOLESTR *rgszNames, - UINT cNames, LCID lcid, DISPID *rgDispId) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI StaticWidget_Invoke(IStaticWidget *iface, DISPID dispIdMember, REFIID riid, - LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, - UINT *puArgErr) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI StaticWidget_TestDual(IStaticWidget *iface, ItestDual *p) -{ - trace("TestDual()\n"); - todo_wine - ok(p == &TestDual, "wrong ItestDual\n"); - return S_OK; -} - -static const IStaticWidgetVtbl StaticWidgetVtbl = { - StaticWidget_QueryInterface, - StaticWidget_AddRef, - StaticWidget_Release, - StaticWidget_GetTypeInfoCount, - StaticWidget_GetTypeInfo, - StaticWidget_GetIDsOfNames, - StaticWidget_Invoke, - StaticWidget_TestDual -}; - -static IStaticWidget StaticWidget = { &StaticWidgetVtbl }; - -typedef struct KindaEnum -{ - const IKindaEnumWidgetVtbl *lpVtbl; - LONG refs; -} KindaEnum; - -static HRESULT register_current_module_typelib(void) -{ - WCHAR path[MAX_PATH]; - CHAR pathA[MAX_PATH]; - HRESULT hr; - ITypeLib *typelib; - - GetModuleFileNameA(NULL, pathA, MAX_PATH); - MultiByteToWideChar(CP_ACP, 0, pathA, -1, path, MAX_PATH); - - hr = LoadTypeLib(path, &typelib); - if (SUCCEEDED(hr)) - { - hr = RegisterTypeLib(typelib, path, NULL); - ITypeLib_Release(typelib); - } - return hr; -} - -static ITypeInfo *get_type_info(REFIID riid) -{ - ITypeInfo *pTypeInfo; - ITypeLib *pTypeLib; - HRESULT hr; - - hr = LoadRegTypeLib(&LIBID_TestTypelib, 1, 0, LOCALE_NEUTRAL, &pTypeLib); - ok_ole_success(hr, LoadRegTypeLib); - if (FAILED(hr)) - return NULL; - - hr = ITypeLib_GetTypeInfoOfGuid(pTypeLib, riid, &pTypeInfo); - ITypeLib_Release(pTypeLib); - ok_ole_success(hr, ITypeLib_GetTypeInfoOfGuid); - if (FAILED(hr)) - return NULL; - - return pTypeInfo; -} - -static IWidget *Widget_Create(void) -{ - Widget *This; - ITypeInfo *pTypeInfo; - HRESULT hr = E_FAIL; - - pTypeInfo = get_type_info(&IID_IWidget); - if(!pTypeInfo) - return NULL; - - This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); - This->lpVtbl = &Widget_VTable; - This->refs = 1; - This->pDispatchUnknown = NULL; - - hr = CreateStdDispatch((IUnknown *)&This->lpVtbl, This, pTypeInfo, &This->pDispatchUnknown); - ok_ole_success(hr, CreateStdDispatch); - ITypeInfo_Release(pTypeInfo); - - if (SUCCEEDED(hr)) - return (IWidget *)&This->lpVtbl; - else - { - HeapFree(GetProcessHeap(), 0, This); - return NULL; - } -} - -static HRESULT WINAPI KindaEnum_QueryInterface( - IKindaEnumWidget *iface, - /* [in] */ REFIID riid, - /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject) -{ - if (IsEqualIID(riid, &IID_IKindaEnumWidget) || IsEqualIID(riid, &IID_IUnknown)) - { - IKindaEnumWidget_AddRef(iface); - *ppvObject = iface; - return S_OK; - } - else - { - *ppvObject = NULL; - return E_NOINTERFACE; - } -} - -static ULONG WINAPI KindaEnum_AddRef( - IKindaEnumWidget *iface) -{ - KindaEnum *This = (KindaEnum *)iface; - - return InterlockedIncrement(&This->refs); -} - -static ULONG WINAPI KindaEnum_Release( - IKindaEnumWidget *iface) -{ - KindaEnum *This = (KindaEnum *)iface; - ULONG refs = InterlockedDecrement(&This->refs); - if (!refs) - { - memset(This, 0xcc, sizeof(*This)); - HeapFree(GetProcessHeap(), 0, This); - trace("KindaEnumWidget destroyed!\n"); - } - - return refs; -} - -static HRESULT WINAPI KindaEnum_Next( - IKindaEnumWidget *iface, - /* [out] */ IWidget __RPC_FAR *__RPC_FAR *widget) -{ - *widget = Widget_Create(); - if (*widget) - return S_OK; - else - return E_OUTOFMEMORY; -} - -static HRESULT WINAPI KindaEnum_Count( - IKindaEnumWidget *iface, - /* [out] */ ULONG __RPC_FAR *count) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI KindaEnum_Reset( - IKindaEnumWidget *iface) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI KindaEnum_Clone( - IKindaEnumWidget *iface, - /* [out] */ IKindaEnumWidget __RPC_FAR *__RPC_FAR *ppenum) -{ - return E_NOTIMPL; -} - -static const IKindaEnumWidgetVtbl KindaEnumWidget_VTable = -{ - KindaEnum_QueryInterface, - KindaEnum_AddRef, - KindaEnum_Release, - KindaEnum_Next, - KindaEnum_Count, - KindaEnum_Reset, - KindaEnum_Clone -}; - -static IKindaEnumWidget *KindaEnumWidget_Create(void) -{ - KindaEnum *This; - - This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); - if (!This) return NULL; - This->lpVtbl = &KindaEnumWidget_VTable; - This->refs = 1; - return (IKindaEnumWidget *)This; -} - -static HRESULT WINAPI NonOleAutomation_QueryInterface(INonOleAutomation *iface, REFIID riid, void **ppv) -{ - if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_INonOleAutomation)) - { - *(INonOleAutomation **)ppv = iface; - return S_OK; - } - *ppv = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI NonOleAutomation_AddRef(INonOleAutomation *iface) -{ - return 2; -} - -static ULONG WINAPI NonOleAutomation_Release(INonOleAutomation *iface) -{ - return 1; -} - -static BSTR WINAPI NonOleAutomation_BstrRet(INonOleAutomation *iface) -{ - static const WCHAR wszTestString[] = {'T','h','i','s',' ','i','s',' ','a',' ','t','e','s','t',' ','s','t','r','i','n','g',0}; - return SysAllocString(wszTestString); -} - -static HRESULT WINAPI NonOleAutomation_Error(INonOleAutomation *iface) -{ - return E_NOTIMPL; -} - -static INonOleAutomationVtbl NonOleAutomation_VTable = -{ - NonOleAutomation_QueryInterface, - NonOleAutomation_AddRef, - NonOleAutomation_Release, - NonOleAutomation_BstrRet, - NonOleAutomation_Error -}; - -static INonOleAutomation NonOleAutomation = { &NonOleAutomation_VTable }; - -static ITypeInfo *NonOleAutomation_GetTypeInfo(void) -{ - ITypeLib *pTypeLib; - HRESULT hr = LoadRegTypeLib(&LIBID_TestTypelib, 1, 0, LOCALE_NEUTRAL, &pTypeLib); - ok_ole_success(hr, LoadRegTypeLib); - if (SUCCEEDED(hr)) - { - ITypeInfo *pTypeInfo; - hr = ITypeLib_GetTypeInfoOfGuid(pTypeLib, &IID_INonOleAutomation, &pTypeInfo); - ok_ole_success(hr, ITypeLib_GetTypeInfoOfGuid); - ITypeLib_Release(pTypeLib); - return pTypeInfo; - } - return NULL; -} - -static void test_typelibmarshal(void) -{ - static const WCHAR szCat[] = { 'C','a','t',0 }; - static const WCHAR szTestTest[] = { 'T','e','s','t','T','e','s','t',0 }; - static WCHAR szSuperman[] = { 'S','u','p','e','r','m','a','n',0 }; - HRESULT hr; - IKindaEnumWidget *pKEW = KindaEnumWidget_Create(); - IWidget *pWidget; - IStream *pStream; - IDispatch *pDispatch; - static const LARGE_INTEGER ullZero; - EXCEPINFO excepinfo; - VARIANT varresult; - DISPID dispidNamed = DISPID_PROPERTYPUT; - DISPPARAMS dispparams; - VARIANTARG vararg[4]; - STATE the_state; - HANDLE thread; - DWORD tid; - BSTR bstr; - ITypeInfo *pTypeInfo; - MYSTRUCT mystruct; - MYSTRUCT mystructArray[5]; - UINT uval; - - ok(pKEW != NULL, "Widget creation failed\n"); - - hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream); - ok_ole_success(hr, CreateStreamOnHGlobal); - tid = start_host_object(pStream, &IID_IKindaEnumWidget, (IUnknown *)pKEW, MSHLFLAGS_NORMAL, &thread); - IKindaEnumWidget_Release(pKEW); - - IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); - hr = CoUnmarshalInterface(pStream, &IID_IKindaEnumWidget, (void **)&pKEW); - ok_ole_success(hr, CoUnmarshalInterface); - IStream_Release(pStream); - - hr = IKindaEnumWidget_Next(pKEW, &pWidget); - ok_ole_success(hr, IKindaEnumWidget_Next); - - IKindaEnumWidget_Release(pKEW); - - hr = IWidget_QueryInterface(pWidget, &IID_IDispatch, (void **)&pDispatch); - - /* call put_Name */ - VariantInit(&vararg[0]); - dispparams.cNamedArgs = 1; - dispparams.rgdispidNamedArgs = &dispidNamed; - dispparams.cArgs = 1; - dispparams.rgvarg = vararg; - VariantInit(&varresult); - hr = IDispatch_Invoke(pDispatch, DISPID_TM_NAME, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); - ok_ole_success(hr, IDispatch_Invoke); - ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK, - "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", - excepinfo.wCode, excepinfo.scode); - VariantClear(&varresult); - - /* call put_Name (direct) */ - bstr = SysAllocString(szSuperman); - hr = IWidget_put_Name(pWidget, bstr); - ok_ole_success(hr, IWidget_put_Name); - SysFreeString(bstr); - - /* call get_Name */ - dispparams.cNamedArgs = 0; - dispparams.rgdispidNamedArgs = NULL; - dispparams.cArgs = 0; - dispparams.rgvarg = NULL; - VariantInit(&varresult); - hr = IDispatch_Invoke(pDispatch, DISPID_TM_NAME, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); - ok_ole_success(hr, IDispatch_Invoke); - ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK, - "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", - excepinfo.wCode, excepinfo.scode); - trace("Name = %s\n", wine_dbgstr_w(V_BSTR(&varresult))); - VariantClear(&varresult); - - /* call get_Name (direct) */ - bstr = NULL; - hr = IWidget_get_Name(pWidget, &bstr); - ok_ole_success(hr, IWidget_get_Name); - ok(!lstrcmpW(bstr, szCat), "IWidget_get_Name should have returned string \"Cat\" instead of %s\n", wine_dbgstr_w(bstr)); - SysFreeString(bstr); - - /* call DoSomething */ - VariantInit(&vararg[0]); - VariantInit(&vararg[1]); - V_VT(&vararg[1]) = VT_R8; - V_R8(&vararg[1]) = 3.141; - dispparams.cNamedArgs = 0; - dispparams.cArgs = 2; - dispparams.rgdispidNamedArgs = NULL; - dispparams.rgvarg = vararg; - VariantInit(&varresult); - hr = IDispatch_Invoke(pDispatch, DISPID_TM_DOSOMETHING, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok_ole_success(hr, IDispatch_Invoke); - ok(V_VT(&varresult) == VT_EMPTY, "varresult should be VT_EMPTY\n"); - VariantClear(&varresult); - - /* call get_State */ - dispparams.cNamedArgs = 0; - dispparams.cArgs = 0; - dispparams.rgdispidNamedArgs = NULL; - dispparams.rgvarg = NULL; - hr = IDispatch_Invoke(pDispatch, DISPID_TM_STATE, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); - ok_ole_success(hr, IDispatch_Invoke); - ok((V_VT(&varresult) == VT_I4) && (V_I4(&varresult) == STATE_WIDGETIFIED), "Return val mismatch\n"); - - /* call get_State (direct) */ - hr = IWidget_get_State(pWidget, &the_state); - ok_ole_success(hr, IWidget_get_state); - ok(the_state == STATE_WIDGETIFIED, "should have returned WIDGET_WIDGETIFIED instead of %d\n", the_state); - - /* call put_State */ - the_state = STATE_WIDGETIFIED; - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_BYREF|VT_I4; - V_I4REF(&vararg[0]) = (int *)&the_state; - dispparams.cNamedArgs = 1; - dispparams.cArgs = 1; - dispparams.rgdispidNamedArgs = &dispidNamed; - dispparams.rgvarg = vararg; - hr = IDispatch_Invoke(pDispatch, DISPID_TM_STATE, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); - ok_ole_success(hr, IDispatch_Invoke); - - /* call Map */ - bstr = SysAllocString(szTestTest); - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_BYREF|VT_BSTR; - V_BSTRREF(&vararg[0]) = &bstr; - dispparams.cNamedArgs = 0; - dispparams.cArgs = 1; - dispparams.rgdispidNamedArgs = NULL; - dispparams.rgvarg = vararg; - VariantInit(&varresult); - hr = IDispatch_Invoke(pDispatch, DISPID_TM_MAP, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok_ole_success(hr, IDispatch_Invoke); - ok(V_VT(&varresult) == VT_BSTR, "Return value should be of type BSTR instead of %d\n", V_VT(&varresult)); - ok(!lstrcmpW(V_BSTR(&varresult), szTestTest), "Return value should have been \"TestTest\" instead of %s\n", wine_dbgstr_w(V_BSTR(&varresult))); - VariantClear(&varresult); - - /* call SetOleColor with large negative VT_I4 param */ - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_I4; - V_I4(&vararg[0]) = 0x80000005; - dispparams.cNamedArgs = 0; - dispparams.cArgs = 1; - dispparams.rgdispidNamedArgs = NULL; - dispparams.rgvarg = vararg; - hr = IDispatch_Invoke(pDispatch, DISPID_TM_SETOLECOLOR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, &excepinfo, NULL); - ok_ole_success(hr, IDispatch_Invoke); - - /* call GetOleColor */ - dispparams.cNamedArgs = 0; - dispparams.cArgs = 0; - dispparams.rgdispidNamedArgs = NULL; - dispparams.rgvarg = NULL; - VariantInit(&varresult); - hr = IDispatch_Invoke(pDispatch, DISPID_TM_GETOLECOLOR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok_ole_success(hr, IDispatch_Invoke); - VariantClear(&varresult); - - /* call StructArgs (direct) */ - mystruct = MYSTRUCT_BYPTR; - memcpy(mystructArray, MYSTRUCT_ARRAY, sizeof(mystructArray)); - hr = IWidget_StructArgs(pWidget, MYSTRUCT_BYVAL, &mystruct, mystructArray); - ok_ole_success(hr, IWidget_StructArgs); - - /* call Clone */ - dispparams.cNamedArgs = 0; - dispparams.cArgs = 0; - dispparams.rgdispidNamedArgs = NULL; - dispparams.rgvarg = NULL; - VariantInit(&varresult); - hr = IDispatch_Invoke(pDispatch, DISPID_TM_CLONE, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); - ok_ole_success(hr, IDispatch_Invoke); - ok(V_VT(&varresult) == VT_DISPATCH, "vt %x\n", V_VT(&varresult)); - VariantClear(&varresult); - - /* call CloneInterface */ - dispparams.cNamedArgs = 0; - dispparams.cArgs = 0; - dispparams.rgdispidNamedArgs = NULL; - dispparams.rgvarg = NULL; - VariantInit(&varresult); - hr = IDispatch_Invoke(pDispatch, DISPID_TM_CLONEINTERFACE, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); - ok_ole_success(hr, IDispatch_Invoke); - ok(V_VT(&varresult) == VT_DISPATCH, "vt %x\n", V_VT(&varresult)); - VariantClear(&varresult); - - /* call CloneDispatch with automatic value getting */ - V_VT(&vararg[0]) = VT_I2; - V_I2(&vararg[0]) = 1; - dispparams.cNamedArgs = 0; - dispparams.rgdispidNamedArgs = NULL; - dispparams.cArgs = 1; - dispparams.rgvarg = vararg; - VariantInit(&varresult); - hr = IDispatch_Invoke(pDispatch, DISPID_TM_CLONEDISPATCH, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); - ok_ole_success(hr, IDispatch_Invoke); - - ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK, - "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", - excepinfo.wCode, excepinfo.scode); - - ok(V_VT(&varresult) == VT_I2, "V_VT(&varresult) was %d instead of VT_I2\n", V_VT(&varresult)); - ok(V_I2(&varresult) == 1234, "V_I2(&varresult) was %d instead of 1234\n", V_I2(&varresult)); - VariantClear(&varresult); - - /* call CloneCoclass */ - dispparams.cNamedArgs = 0; - dispparams.cArgs = 0; - dispparams.rgdispidNamedArgs = NULL; - dispparams.rgvarg = NULL; - VariantInit(&varresult); - hr = IDispatch_Invoke(pDispatch, DISPID_TM_CLONECOCLASS, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); - ok_ole_success(hr, IDispatch_Invoke); - - ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK, - "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", - excepinfo.wCode, excepinfo.scode); - - ok(V_VT(&varresult) == VT_DISPATCH, "V_VT(&varresult) was %d instead of VT_DISPATCH\n", V_VT(&varresult)); - ok(!V_DISPATCH(&varresult), "V_DISPATCH(&varresult) should be NULL instead of %p\n", V_DISPATCH(&varresult)); - VariantClear(&varresult); - - /* call Value with a VT_VARIANT|VT_BYREF type */ - V_VT(&vararg[0]) = VT_VARIANT|VT_BYREF; - V_VARIANTREF(&vararg[0]) = &vararg[1]; - V_VT(&vararg[1]) = VT_I2; - V_I2(&vararg[1]) = 1; - dispparams.cNamedArgs = 0; - dispparams.rgdispidNamedArgs = NULL; - dispparams.cArgs = 1; - dispparams.rgvarg = vararg; - VariantInit(&varresult); - hr = IDispatch_Invoke(pDispatch, DISPID_VALUE, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); - ok_ole_success(hr, IDispatch_Invoke); - - ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK, - "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", - excepinfo.wCode, excepinfo.scode); - - ok(V_VT(&varresult) == VT_I2, "V_VT(&varresult) was %d instead of VT_I2\n", V_VT(&varresult)); - ok(V_I2(&varresult) == 1234, "V_I2(&varresult) was %d instead of 1234\n", V_I2(&varresult)); - VariantClear(&varresult); - - /* call Variant - exercises variant copying in ITypeInfo::Invoke and - * handling of void return types */ - /* use a big type to ensure that the variant was properly copied into the - * destination function's args */ - V_VT(&vararg[0]) = VT_CY; - S(V_CY(&vararg[0])).Hi = 0xdababe; - S(V_CY(&vararg[0])).Lo = 0xdeadbeef; - dispparams.cNamedArgs = 0; - dispparams.cArgs = 1; - dispparams.rgdispidNamedArgs = NULL; - dispparams.rgvarg = vararg; - VariantInit(&varresult); - hr = IDispatch_Invoke(pDispatch, DISPID_TM_VARIANT, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok_ole_success(hr, IDispatch_Invoke); - VariantClear(&varresult); - - /* call VarArg */ - VariantInit(&vararg[3]); - V_VT(&vararg[3]) = VT_I4; - V_I4(&vararg[3]) = 3; - VariantInit(&vararg[2]); - V_VT(&vararg[2]) = VT_I4; - V_I4(&vararg[2]) = 0; - VariantInit(&vararg[1]); - V_VT(&vararg[1]) = VT_I4; - V_I4(&vararg[1]) = 1; - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_I4; - V_I4(&vararg[0]) = 2; - dispparams.cNamedArgs = 0; - dispparams.cArgs = 4; - dispparams.rgdispidNamedArgs = NULL; - dispparams.rgvarg = vararg; - hr = IDispatch_Invoke(pDispatch, DISPID_TM_VARARG, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok_ole_success(hr, ITypeInfo_Invoke); - - /* call VarArg, even one (non-optional, non-safearray) named argument is not allowed */ - dispidNamed = 0; - dispparams.cNamedArgs = 1; - dispparams.rgdispidNamedArgs = &dispidNamed; - hr = IDispatch_Invoke(pDispatch, DISPID_TM_VARARG, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_NONAMEDARGS, "IDispatch_Invoke should have returned DISP_E_NONAMEDARGS instead of 0x%08x\n", hr); - dispidNamed = DISPID_PROPERTYPUT; - - /* call Error */ - dispparams.cNamedArgs = 0; - dispparams.cArgs = 0; - dispparams.rgdispidNamedArgs = NULL; - dispparams.rgvarg = NULL; - VariantInit(&varresult); - hr = IDispatch_Invoke(pDispatch, DISPID_TM_ERROR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, &excepinfo, NULL); - ok(hr == DISP_E_EXCEPTION, "IDispatch_Invoke should have returned DISP_E_EXCEPTION instead of 0x%08x\n", hr); - ok(excepinfo.wCode == 0x0 && excepinfo.scode == E_NOTIMPL, - "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", - excepinfo.wCode, excepinfo.scode); - VariantClear(&varresult); - - /* call BstrRet */ - pTypeInfo = NonOleAutomation_GetTypeInfo(); - dispparams.cNamedArgs = 0; - dispparams.cArgs = 0; - dispparams.rgdispidNamedArgs = NULL; - dispparams.rgvarg = NULL; - VariantInit(&varresult); - hr = ITypeInfo_Invoke(pTypeInfo, &NonOleAutomation, DISPID_NOA_BSTRRET, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok_ole_success(hr, ITypeInfo_Invoke); - ok(V_VT(&varresult) == VT_BSTR, "V_VT(&varresult) should be VT_BSTR instead of %d\n", V_VT(&varresult)); - ok(V_BSTR(&varresult) != NULL, "V_BSTR(&varresult) should not be NULL\n"); - - VariantClear(&varresult); - - dispparams.cNamedArgs = 0; - dispparams.cArgs = 0; - dispparams.rgdispidNamedArgs = NULL; - dispparams.rgvarg = NULL; - hr = ITypeInfo_Invoke(pTypeInfo, &NonOleAutomation, DISPID_NOA_ERROR, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_EXCEPTION, "ITypeInfo_Invoke should have returned DISP_E_EXCEPTION instead of 0x%08x\n", hr); - ok(V_VT(&varresult) == VT_EMPTY, "V_VT(&varresult) should be VT_EMPTY instead of %d\n", V_VT(&varresult)); - ok(excepinfo.wCode == 0x0 && excepinfo.scode == E_NOTIMPL, - "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", - excepinfo.wCode, excepinfo.scode); - VariantClear(&varresult); - - ITypeInfo_Release(pTypeInfo); - - /* tests call put_Name without named arg */ - VariantInit(&vararg[0]); - dispparams.cNamedArgs = 0; - dispparams.rgdispidNamedArgs = NULL; - dispparams.cArgs = 1; - dispparams.rgvarg = vararg; - VariantInit(&varresult); - hr = IDispatch_Invoke(pDispatch, DISPID_TM_NAME, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_PARAMNOTFOUND, "IDispatch_Invoke should have returned DISP_E_PARAMNOTFOUND instead of 0x%08x\n", hr); - VariantClear(&varresult); - - /* tests param type that cannot be coerced */ - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_UNKNOWN; - V_UNKNOWN(&vararg[0]) = NULL; - dispparams.cNamedArgs = 1; - dispparams.rgdispidNamedArgs = &dispidNamed; - dispparams.cArgs = 1; - dispparams.rgvarg = vararg; - VariantInit(&varresult); - hr = IDispatch_Invoke(pDispatch, DISPID_TM_NAME, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_TYPEMISMATCH, "IDispatch_Invoke should have returned DISP_E_TYPEMISMATCH instead of 0x%08x\n", hr); - VariantClear(&varresult); - - /* tests bad param type */ - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_CLSID; - V_BYREF(&vararg[0]) = NULL; - dispparams.cNamedArgs = 1; - dispparams.rgdispidNamedArgs = &dispidNamed; - dispparams.cArgs = 1; - dispparams.rgvarg = vararg; - VariantInit(&varresult); - hr = IDispatch_Invoke(pDispatch, DISPID_TM_NAME, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_BADVARTYPE, "IDispatch_Invoke should have returned DISP_E_BADVARTYPE instead of 0x%08x\n", hr); - VariantClear(&varresult); - - /* tests too small param count */ - dispparams.cNamedArgs = 0; - dispparams.rgdispidNamedArgs = NULL; - dispparams.cArgs = 0; - dispparams.rgvarg = NULL; - VariantInit(&varresult); - hr = IDispatch_Invoke(pDispatch, DISPID_TM_DOSOMETHING, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_BADPARAMCOUNT, "IDispatch_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08x\n", hr); - VariantClear(&varresult); - - /* tests propget function with large param count */ - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_BSTR; - V_BSTR(&vararg[0]) = NULL; - V_VT(&vararg[1]) = VT_I4; - V_I4(&vararg[1]) = 1; - dispparams.cNamedArgs = 0; - dispparams.cArgs = 2; - dispparams.rgdispidNamedArgs = NULL; - dispparams.rgvarg = vararg; - hr = IDispatch_Invoke(pDispatch, DISPID_TM_STATE, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); - ok(hr == DISP_E_NOTACOLLECTION, "IDispatch_Invoke should have returned DISP_E_NOTACOLLECTION instead of 0x%08x\n", hr); - - /* test propput with lcid */ - - /* the lcid passed to the function is the first lcid in the typelib header. - Since we don't explicitly set an lcid in the idl, it'll default to US English. */ - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_I4; - V_I4(&vararg[0]) = 0xcafe; - dispparams.cNamedArgs = 1; - dispparams.rgdispidNamedArgs = &dispidNamed; - dispparams.cArgs = 1; - dispparams.rgvarg = vararg; - VariantInit(&varresult); - hr = IDispatch_Invoke(pDispatch, DISPID_TM_PROP_WITH_LCID, &IID_NULL, 0x40c, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); - ok_ole_success(hr, ITypeInfo_Invoke); - VariantClear(&varresult); - - /* test propget with lcid */ - dispparams.cNamedArgs = 0; - dispparams.cArgs = 0; - dispparams.rgvarg = NULL; - dispparams.rgdispidNamedArgs = NULL; - hr = IDispatch_Invoke(pDispatch, DISPID_TM_PROP_WITH_LCID, &IID_NULL, 0x40c, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); - ok_ole_success(hr, ITypeInfo_Invoke); - ok(V_VT(&varresult) == VT_I4, "got %x\n", V_VT(&varresult)); - ok(V_I4(&varresult) == 0x409, "got %x\n", V_I4(&varresult)); - VariantClear(&varresult); - - /* test propget of INT value */ - dispparams.cNamedArgs = 0; - dispparams.cArgs = 0; - dispparams.rgvarg = NULL; - dispparams.rgdispidNamedArgs = NULL; - hr = IDispatch_Invoke(pDispatch, DISPID_TM_PROP_INT, &IID_NULL, 0x40c, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); - ok_ole_success(hr, ITypeInfo_Invoke); - ok(V_VT(&varresult) == VT_I4, "got %x\n", V_VT(&varresult)); - ok(V_I4(&varresult) == -13, "got %x\n", V_I4(&varresult)); - VariantClear(&varresult); - - /* test propget of INT value */ - dispparams.cNamedArgs = 0; - dispparams.cArgs = 0; - dispparams.rgvarg = NULL; - dispparams.rgdispidNamedArgs = NULL; - hr = IDispatch_Invoke(pDispatch, DISPID_TM_PROP_UINT, &IID_NULL, 0x40c, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); - ok_ole_success(hr, ITypeInfo_Invoke); - ok(V_VT(&varresult) == VT_UI4, "got %x\n", V_VT(&varresult)); - ok(V_UI4(&varresult) == 42, "got %x\n", V_UI4(&varresult)); - VariantClear(&varresult); - - /* test byref marshalling */ - uval = 666; - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_UI4|VT_BYREF; - V_UI4REF(&vararg[0]) = &uval; - dispparams.cNamedArgs = 0; - dispparams.cArgs = 1; - dispparams.rgvarg = vararg; - dispparams.rgdispidNamedArgs = NULL; - hr = IDispatch_Invoke(pDispatch, DISPID_TM_BYREF_UINT, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - ok_ole_success(hr, ITypeInfo_Invoke); - ok(V_VT(&varresult) == VT_EMPTY, "varresult should be VT_EMPTY\n"); - ok(V_VT(&vararg[0]) == (VT_UI4|VT_BYREF), "arg VT not unmarshalled correctly: %x\n", V_VT(&vararg[0])); - ok(V_UI4REF(&vararg[0]) == &uval, "Byref pointer not preserved: %p/%p\n", &uval, V_UI4REF(&vararg[0])); - ok(*V_UI4REF(&vararg[0]) == 42, "Expected 42 to be returned instead of %u\n", *V_UI4REF(&vararg[0])); - VariantClear(&varresult); - VariantClear(&vararg[0]); - - /* test propput with optional argument. */ - VariantInit(&vararg[0]); - V_VT(&vararg[0]) = VT_I4; - V_I4(&vararg[0]) = 0xcafe; - dispparams.cNamedArgs = 1; - dispparams.rgdispidNamedArgs = &dispidNamed; - dispparams.cArgs = 1; - dispparams.rgvarg = vararg; - VariantInit(&varresult); - hr = IDispatch_Invoke(pDispatch, DISPID_TM_PROP_OPT_ARG, &IID_NULL, 0x40c, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); - ok_ole_success(hr, ITypeInfo_Invoke); - VariantClear(&varresult); - - /* test propput with required argument. */ - VariantInit(&vararg[0]); - VariantInit(&vararg[1]); - V_VT(&vararg[0]) = VT_I4; - V_I4(&vararg[0]) = 0x1234; - V_VT(&vararg[1]) = VT_I4; - V_I4(&vararg[1]) = 0x5678; - dispparams.cNamedArgs = 1; - dispparams.rgdispidNamedArgs = &dispidNamed; - dispparams.cArgs = 2; - dispparams.rgvarg = vararg; - VariantInit(&varresult); - hr = IDispatch_Invoke(pDispatch, DISPID_TM_PROP_REQ_ARG, &IID_NULL, 0x40c, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); - ok_ole_success(hr, ITypeInfo_Invoke); - VariantClear(&varresult); - - IDispatch_Release(pDispatch); - IWidget_Release(pWidget); - - trace("calling end_host_object\n"); - end_host_object(tid, thread); -} - -static void test_DispCallFunc(void) -{ - static const WCHAR szEmpty[] = { 0 }; - VARTYPE rgvt[] = { VT_R8, VT_BSTR, VT_BSTR, VT_VARIANT|VT_BYREF }; - VARIANTARG vararg[4]; - VARIANTARG varref; - VARIANTARG *rgpvarg[4] = { &vararg[0], &vararg[1], &vararg[2], &vararg[3] }; - VARIANTARG varresult; - HRESULT hr; - IWidget *pWidget = Widget_Create(); - V_VT(&vararg[0]) = VT_R8; - V_R8(&vararg[0]) = 3.141; - V_VT(&vararg[1]) = VT_BSTR; - V_BSTRREF(&vararg[1]) = CoTaskMemAlloc(sizeof(BSTR)); - V_VT(&vararg[2]) = VT_BSTR; - V_BSTR(&vararg[2]) = SysAllocString(szEmpty); - V_VT(&vararg[3]) = VT_VARIANT|VT_BYREF; - V_VARIANTREF(&vararg[3]) = &varref; - V_VT(&varref) = VT_ERROR; - V_ERROR(&varref) = DISP_E_PARAMNOTFOUND; - VariantInit(&varresult); - hr = DispCallFunc(pWidget, 9*sizeof(void*), CC_STDCALL, VT_UI4, 4, rgvt, rgpvarg, &varresult); - ok_ole_success(hr, DispCallFunc); - VariantClear(&varresult); - SysFreeString(*V_BSTRREF(&vararg[1])); - CoTaskMemFree(V_BSTRREF(&vararg[1])); - VariantClear(&vararg[2]); - IWidget_Release(pWidget); -} - -static void test_StaticWidget(void) -{ - ITypeInfo *type_info; - DISPPARAMS dispparams; - VARIANTARG vararg[4]; - EXCEPINFO excepinfo; - VARIANT varresult; - HRESULT hr; - - type_info = get_type_info(&IID_IStaticWidget); - - /* call TestDual */ - dispparams.cNamedArgs = 0; - dispparams.cArgs = 1; - dispparams.rgdispidNamedArgs = NULL; - dispparams.rgvarg = vararg; - V_VT(vararg) = VT_DISPATCH; - V_DISPATCH(vararg) = (IDispatch*)&TestDualDisp; - VariantInit(&varresult); - hr = ITypeInfo_Invoke(type_info, &StaticWidget, DISPID_TM_TESTDUAL, DISPATCH_METHOD, - &dispparams, &varresult, &excepinfo, NULL); - ok_ole_success(hr, IDispatch_Invoke); - ok(V_VT(&varresult) == VT_EMPTY, "vt %x\n", V_VT(&varresult)); - VariantClear(&varresult); - - ITypeInfo_Release(type_info); -} - -static void test_libattr(void) -{ - ITypeLib *pTypeLib; - HRESULT hr; - TLIBATTR *pattr; - - hr = LoadRegTypeLib(&LIBID_TestTypelib, 1, 0, LOCALE_NEUTRAL, &pTypeLib); - ok_ole_success(hr, LoadRegTypeLib); - if (FAILED(hr)) - return; - - hr = ITypeLib_GetLibAttr(pTypeLib, &pattr); - ok_ole_success(hr, GetLibAttr); - if (SUCCEEDED(hr)) - { - ok(pattr->lcid == MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), "lcid %x\n", pattr->lcid); - - ITypeLib_ReleaseTLibAttr(pTypeLib, pattr); - } - - ITypeLib_Release(pTypeLib); -} - -START_TEST(tmarshal) -{ - HRESULT hr; - - CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - hr = register_current_module_typelib(); - ok_ole_success(hr, register_current_module_typelib); - - test_typelibmarshal(); - test_DispCallFunc(); - test_StaticWidget(); - test_libattr(); - - hr = UnRegisterTypeLib(&LIBID_TestTypelib, 1, 0, LOCALE_NEUTRAL, - sizeof(void*) == 8 ? SYS_WIN64 : SYS_WIN32); - ok_ole_success(hr, UnRegisterTypeLib); - - CoUninitialize(); -} diff --git a/rostests/winetests/oleaut32/tmarshal.idl b/rostests/winetests/oleaut32/tmarshal.idl deleted file mode 100644 index 76167891612..00000000000 --- a/rostests/winetests/oleaut32/tmarshal.idl +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Copyright (C) 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 - * - */ - -#include "tmarshal_dispids.h" -import "ocidl.idl"; - -[ - uuid(d96d8a3e-78b6-4c8d-8f27-059db959be8a), - version(1.0), - helpstring("Test Typelib") -] -library TestTypelib -{ - importlib("stdole2.tlb"); - - typedef enum tagSTATE - { - STATE_UNWIDGETIFIED = 1, - STATE_WIDGETIFIED - } STATE; - - typedef struct tagMYSTRUCT - { - INT field1; - ULONGLONG field2; - } MYSTRUCT; - - coclass ApplicationObject2; - - [ - odl, - uuid(12345678-1234-4321-1234-121212121212) - ] - interface ISomethingFromDispatch : IDispatch - { - HRESULT anotherfn(void); - } - - [ - odl, - oleautomation, - dual, - uuid(3f7e06fe-0bce-46f0-8b7d-3a68393c7967) - ] - interface ItestDual : IDispatch - { - HRESULT test(); - } - - [ - odl, - uuid(a1f8cae3-c947-4c5f-b57d-c87b9b5f3586), - oleautomation, - dual - ] - interface IWidget : IDispatch - { - [propput, id(DISPID_TM_NAME)] - HRESULT Name([in] BSTR name); - [propget, id(DISPID_TM_NAME)] - HRESULT Name([out, retval] BSTR *name); - - [id(DISPID_TM_DOSOMETHING)] - HRESULT DoSomething([in] double number, [out] BSTR *str1, [in, defaultvalue("")] BSTR str2, [in, optional] VARIANT *opt); - - [propget, id(DISPID_TM_STATE)] - HRESULT State([out, retval] STATE *state); - [propput, id(DISPID_TM_STATE)] - HRESULT State([in] STATE state); - - [id(DISPID_TM_MAP)] - HRESULT Map([in] BSTR bstrId, [out, retval] BSTR *sValue); - - [id(DISPID_TM_SETOLECOLOR)] - HRESULT SetOleColor([in] OLE_COLOR val); - - [id(DISPID_TM_GETOLECOLOR)] - HRESULT GetOleColor([out, retval] OLE_COLOR *pVal); - - [propget, id(DISPID_TM_CLONE)] - HRESULT Clone([out, retval] IWidget **ppVal); - - [propget, id(DISPID_TM_CLONEDISPATCH)] - HRESULT CloneDispatch([out, retval] IDispatch **ppVal); - - [propget, id(DISPID_TM_CLONECOCLASS)] - HRESULT CloneCoclass([out, retval] ApplicationObject2 **ppVal); - - [propget, id(DISPID_VALUE)] - HRESULT Value([in] VARIANT *value, [out, retval] VARIANT *retval); - - [id(DISPID_TM_ARRAY)] - HRESULT Array([in] SAFEARRAY(BSTR) values); - - [id(DISPID_TM_VARARRAYPTR)] - HRESULT VariantArrayPtr([in] SAFEARRAY(VARIANT) *values); - - [id(DISPID_TM_VARIANT)] - HRESULT Variant([in] VARIANT var); - - [vararg, id(DISPID_TM_VARARG)] - HRESULT VarArg([in] int numexpect, [in] SAFEARRAY(VARIANT) values); - - [id(DISPID_TM_STRUCTARGS)] - HRESULT StructArgs([in] MYSTRUCT byval, [in] MYSTRUCT *byptr, [in] MYSTRUCT arr[5]); - - [id(DISPID_TM_ERROR)] - HRESULT Error(); - - [propget, id(DISPID_TM_CLONEINTERFACE)] - HRESULT CloneInterface([out, retval] ISomethingFromDispatch **ppVal); - - [id(DISPID_TM_PROP_WITH_LCID), propput] - HRESULT prop_with_lcid([in,lcid] long lcid, [in] INT i); - - [id(DISPID_TM_PROP_WITH_LCID), propget] - HRESULT prop_with_lcid([in,lcid] long lcid, [out,retval] INT *i); - - [id(DISPID_TM_PROP_INT), propget] - HRESULT prop_int([out,retval] INT *i); - - [id(DISPID_TM_PROP_UINT), propget] - HRESULT prop_uint([out,retval] UINT *i); - - [id(DISPID_TM_BYREF_UINT)] - HRESULT ByRefUInt([in, out] UINT *i); - - [id(DISPID_TM_PROP_OPT_ARG), propput] - HRESULT prop_opt_arg([in,optional] INT opt, [in] INT i); - - [id(DISPID_TM_PROP_REQ_ARG), propput] - HRESULT prop_req_arg([in] INT req, [in] INT i); - } - - [ - odl, - uuid(a1f8cae3-c947-3c5f-a57c-c88b9b6f3586), - oleautomation, - dual - ] - interface IStaticWidget : IDispatch - { - [id(DISPID_TM_TESTDUAL)] - HRESULT TestDual([in] ItestDual *p); - } - - [ - odl, - uuid(a028db05-30f0-4b93-b17a-41c72f831d84), -#if 0 /* FIXME: commented out as causes widl to generate incorrect typelib */ - dual, -#endif - oleautomation - ] - interface IKindaEnumWidget : IUnknown - { - HRESULT Next( - [out] IWidget **widget); - - HRESULT Count( - [out] unsigned long *count); - - HRESULT Reset(); - - HRESULT Clone( - [out] IKindaEnumWidget **ppenum); - } - - [ - odl, - uuid(a028db06-30f0-4b93-b17a-41c72f831d84), - ] - interface INonOleAutomation : IUnknown - { - [id(DISPID_NOA_BSTRRET)] - BSTR BstrRet(); - - [id(DISPID_NOA_ERROR)] - HRESULT Error(); - } - - - [ - dllname("comm.drv"), - uuid(d377f60b-8639-4261-8ee7-75c8340d2cc9), - ] - module BadModule - { - [ - entry("Foo"), - ] - HRESULT BadModuleFoo(); - }; - - [ - dllname("oleaut32.dll"), - uuid(d377f60c-8639-4261-8ee7-75c8340d2cc9), - ] - module BadEntry - { - [ - entry("Foo"), - ] - HRESULT BadEntryFoo(); - }; - - [ - uuid(bb171948-10ec-407a-9a57-2f85f797ff1a), - appobject, - ] - coclass ApplicationObject2 - { - interface IWidget; - [source] interface IWidget; - }; - - [ - odl, - uuid(375f8a9d-33d0-44f3-b972-61f8407899e0) - ] - interface ItestIF1 : IUnknown - { - HRESULT fn1([in] int x); - HRESULT fn2([out,retval] int *x); - } - - [ - odl, - uuid(094056a3-666f-4956-be12-1859668310b8) - ] - interface ItestIF2 : ItestIF1 - { - HRESULT fn3([in] int y); - } - - [ - odl, - uuid(33baba09-2e68-43ab-81fe-d84b403df2e5) - ] - dispinterface ItestIF3 - { - interface ItestIF2; - } - - [ - odl, - uuid(a01005c7-7491-42eb-94f3-668e37ce60a6) - ] - dispinterface ItestIF4 - { - properties: - methods: - [id(0x1c)] HRESULT fn([in] int z); - } - - [ - odl, - uuid(4ab61e25-c09f-4239-8f7f-7a018ea0199f), - dual - ] - interface ItestIF5 : ItestIF2 - { - [id(0x1234)] HRESULT fn4([in] int a); - [id(0x1235)] HRESULT fn5([in] int a); - } - - [ - odl, - uuid(ec236d8e-2cc7-44f2-b394-36c86ff3da74) - ] - interface ItestIF6 : IDispatch - { - [id(0x1234)] HRESULT fn4([in] int a); - [id(0x1235)] HRESULT fn5([in] int a); - } - - [ - odl, - uuid(f711b105-554d-4751-818c-46fcc5d7c0d5), - dual - ] - interface ItestIF7 : ItestIF6 - { - [id(0x1236)] HRESULT fn6([in] GUID a); - } - - [ - odl, - uuid(bdfa260b-ef40-43d3-b071-cddec919f132) - ] - interface ItestIF8 - { - HRESULT fn1([in] int x); - HRESULT fn2([out,retval] int *x); - } - - [ - odl, - uuid(51033a23-dc37-4f19-aa34-4d8a670458a0) - - ] - interface ItestIF9 : ItestIF8 - { - HRESULT fn3([in] int y); - } - - [ - odl, - uuid(2e8f14fe-0bce-42f0-8b7d-3af8393c7967) - ] - dispinterface ItestIF10 - { - interface ItestIF9; - } - - [ - odl, - uuid(7d9e9371-482e-4944-9b19-511fc705236f) - ] - dispinterface ItestIF11 - { - interface ItestIF7; - } - -}; diff --git a/rostests/winetests/oleaut32/tmarshal.rc b/rostests/winetests/oleaut32/tmarshal.rc deleted file mode 100644 index cbb3b189599..00000000000 --- a/rostests/winetests/oleaut32/tmarshal.rc +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Resource file for tmarshaltest - * - * 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 - */ - -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "winnls.h" - -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL - -#include "wine/wine_common_ver.rc" - -/* @makedep: tmarshal.tlb */ -1 TYPELIB tmarshal.tlb - -/* @makedep: test_tlb.tlb */ -2 TYPELIB test_tlb.tlb - -/* @makedep: test_reg.tlb */ -3 TYPELIB test_reg.tlb diff --git a/rostests/winetests/oleaut32/tmarshal_dispids.h b/rostests/winetests/oleaut32/tmarshal_dispids.h deleted file mode 100644 index 376162bc88c..00000000000 --- a/rostests/winetests/oleaut32/tmarshal_dispids.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2005-2006 Robert Shearman 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 - * - */ - -#define DISPID_TM_NAME 1 -#define DISPID_TM_DOSOMETHING 2 -#define DISPID_TM_STATE 3 -#define DISPID_TM_MAP 4 -#define DISPID_TM_SETOLECOLOR 5 -#define DISPID_TM_GETOLECOLOR 6 -#define DISPID_TM_CLONE 7 -#define DISPID_TM_CLONEDISPATCH 8 -#define DISPID_TM_CLONECOCLASS 9 -#define DISPID_TM_ARRAY 10 -#define DISPID_TM_VARARRAYPTR 11 -#define DISPID_TM_VARIANT 12 -#define DISPID_TM_VARARG 13 -#define DISPID_TM_ERROR 14 -#define DISPID_TM_CLONEINTERFACE 15 -#define DISPID_TM_TESTDUAL 16 -#define DISPID_TM_STRUCTARGS 17 -#define DISPID_TM_PROP_WITH_LCID 18 -#define DISPID_TM_PROP_INT 19 -#define DISPID_TM_PROP_UINT 20 -#define DISPID_TM_BYREF_UINT 21 -#define DISPID_TM_PROP_OPT_ARG 22 -#define DISPID_TM_PROP_REQ_ARG 23 - -#define DISPID_NOA_BSTRRET 1 -#define DISPID_NOA_ERROR 2 diff --git a/rostests/winetests/oleaut32/typelib.c b/rostests/winetests/oleaut32/typelib.c deleted file mode 100644 index eb17105c38a..00000000000 --- a/rostests/winetests/oleaut32/typelib.c +++ /dev/null @@ -1,2340 +0,0 @@ -/* - * ITypeLib and ITypeInfo test - * - * Copyright 2004 Jacek Caban - * Copyright 2006 Dmitry Timoshkov - * - * 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 - -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "oleauto.h" -#include "ocidl.h" -#include "shlwapi.h" -#include "tmarshal.h" -#include "initguid.h" - -#include "test_reg.h" - -#define expect_eq(expr, value, type, format) { type _ret = (expr); ok((value) == _ret, #expr " expected " format " got " format "\n", value, _ret); } -#define expect_int(expr, value) expect_eq(expr, (int)(value), int, "%d") -#define expect_hex(expr, value) expect_eq(expr, (int)(value), int, "0x%x") -#define expect_null(expr) expect_eq(expr, NULL, const void *, "%p") - -#define expect_wstr_acpval(expr, value) \ - { \ - CHAR buf[260]; \ - expect_eq(!WideCharToMultiByte(CP_ACP, 0, (expr), -1, buf, 260, NULL, NULL), 0, int, "%d"); \ - ok(lstrcmp(value, buf) == 0, #expr " expected \"%s\" got \"%s\"\n", value, buf); \ - } - -#define ole_expect(expr, expect) { \ - HRESULT r = expr; \ - ok(r == (expect), #expr " returned %x, expected %s (%x)\n", r, #expect, expect); \ -} - -#define ole_check(expr) ole_expect(expr, S_OK); - -#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08x\n", hr) - -static HRESULT WINAPI (*pRegisterTypeLibForUser)(ITypeLib*,OLECHAR*,OLECHAR*); -static HRESULT WINAPI (*pUnRegisterTypeLibForUser)(REFGUID,WORD,WORD,LCID,SYSKIND); - -static const WCHAR wszStdOle2[] = {'s','t','d','o','l','e','2','.','t','l','b',0}; - -static void init_function_pointers(void) -{ - HMODULE hmod = GetModuleHandleA("oleaut32.dll"); - - pRegisterTypeLibForUser = (void *)GetProcAddress(hmod, "RegisterTypeLibForUser"); - pUnRegisterTypeLibForUser = (void *)GetProcAddress(hmod, "UnRegisterTypeLibForUser"); -} - -static void ref_count_test(LPCWSTR type_lib) -{ - ITypeLib *iface; - ITypeInfo *iti1, *iti2; - HRESULT hRes; - int ref_count; - - trace("Loading type library\n"); - hRes = LoadTypeLib(type_lib, &iface); - ok(hRes == S_OK, "Could not load type library\n"); - if(hRes != S_OK) - return; - - hRes = ITypeLib_GetTypeInfo(iface, 1, &iti1); - ok(hRes == S_OK, "ITypeLib_GetTypeInfo failed on index = 1\n"); - ok(ref_count=ITypeLib_Release(iface) > 0, "ITypeLib destroyed while ITypeInfo has back pointer\n"); - if(!ref_count) - return; - - hRes = ITypeLib_GetTypeInfo(iface, 1, &iti2); - ok(hRes == S_OK, "ITypeLib_GetTypeInfo failed on index = 1\n"); - ok(iti1 == iti2, "ITypeLib_GetTypeInfo returned different pointers for same indexes\n"); - - ITypeLib_AddRef(iface); - ITypeInfo_Release(iti2); - ITypeInfo_Release(iti1); - ok(ITypeLib_Release(iface) == 0, "ITypeLib should be destroyed here.\n"); -} - -static void test_TypeComp(void) -{ - ITypeLib *pTypeLib; - ITypeComp *pTypeComp; - HRESULT hr; - ULONG ulHash; - DESCKIND desckind; - BINDPTR bindptr; - ITypeInfo *pTypeInfo; - ITypeInfo *pFontTypeInfo; - static WCHAR wszStdFunctions[] = {'S','t','d','F','u','n','c','t','i','o','n','s',0}; - static WCHAR wszSavePicture[] = {'S','a','v','e','P','i','c','t','u','r','e',0}; - static WCHAR wszOLE_TRISTATE[] = {'O','L','E','_','T','R','I','S','T','A','T','E',0}; - static WCHAR wszUnchecked[] = {'U','n','c','h','e','c','k','e','d',0}; - static WCHAR wszIUnknown[] = {'I','U','n','k','n','o','w','n',0}; - static WCHAR wszFont[] = {'F','o','n','t',0}; - static WCHAR wszGUID[] = {'G','U','I','D',0}; - static WCHAR wszStdPicture[] = {'S','t','d','P','i','c','t','u','r','e',0}; - static WCHAR wszOLE_COLOR[] = {'O','L','E','_','C','O','L','O','R',0}; - static WCHAR wszClone[] = {'C','l','o','n','e',0}; - static WCHAR wszclone[] = {'c','l','o','n','e',0}; - static WCHAR wszJunk[] = {'J','u','n','k',0}; - - hr = LoadTypeLib(wszStdOle2, &pTypeLib); - ok_ole_success(hr, LoadTypeLib); - - hr = ITypeLib_GetTypeComp(pTypeLib, &pTypeComp); - ok_ole_success(hr, ITypeLib_GetTypeComp); - - /* test getting a TKIND_MODULE */ - ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszStdFunctions); - hr = ITypeComp_Bind(pTypeComp, wszStdFunctions, ulHash, 0, &pTypeInfo, &desckind, &bindptr); - ok_ole_success(hr, ITypeComp_Bind); - - ok(desckind == DESCKIND_TYPECOMP, - "desckind should have been DESCKIND_TYPECOMP instead of %d\n", - desckind); - ok(!pTypeInfo, "pTypeInfo should have been set to NULL\n"); - - ITypeComp_Release(bindptr.lptcomp); - - /* test getting a TKIND_MODULE with INVOKE_PROPERTYGET */ - ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszStdFunctions); - hr = ITypeComp_Bind(pTypeComp, wszStdFunctions, ulHash, INVOKE_PROPERTYGET, &pTypeInfo, &desckind, &bindptr); - ok_ole_success(hr, ITypeComp_Bind); - - ok(desckind == DESCKIND_TYPECOMP, - "desckind should have been DESCKIND_TYPECOMP instead of %d\n", - desckind); - ok(!pTypeInfo, "pTypeInfo should have been set to NULL\n"); - ITypeComp_Release(bindptr.lptcomp); - - /* test getting a function within a TKIND_MODULE */ - ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszSavePicture); - hr = ITypeComp_Bind(pTypeComp, wszSavePicture, ulHash, 0, &pTypeInfo, &desckind, &bindptr); - ok_ole_success(hr, ITypeComp_Bind); - - ok(desckind == DESCKIND_FUNCDESC, - "desckind should have been DESCKIND_FUNCDESC instead of %d\n", - desckind); - ok(bindptr.lpfuncdesc != NULL, "bindptr.lpfuncdesc should not have been set to NULL\n"); - ITypeInfo_ReleaseFuncDesc(pTypeInfo, bindptr.lpfuncdesc); - ITypeInfo_Release(pTypeInfo); - - /* test getting a function within a TKIND_MODULE with INVOKE_PROPERTYGET */ - ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszSavePicture); - hr = ITypeComp_Bind(pTypeComp, wszSavePicture, ulHash, INVOKE_PROPERTYGET, &pTypeInfo, &desckind, &bindptr); - ok(hr == TYPE_E_TYPEMISMATCH, - "ITypeComp_Bind should have failed with TYPE_E_TYPEMISMATCH instead of 0x%08x\n", - hr); - - ok(desckind == DESCKIND_NONE, - "desckind should have been DESCKIND_NONE instead of %d\n", - desckind); - ok(!pTypeInfo, "pTypeInfo should have been set to NULL\n"); - ok(!bindptr.lptcomp, "bindptr should have been set to NULL\n"); - - /* test getting a TKIND_ENUM */ - ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszOLE_TRISTATE); - hr = ITypeComp_Bind(pTypeComp, wszOLE_TRISTATE, ulHash, 0, &pTypeInfo, &desckind, &bindptr); - ok_ole_success(hr, ITypeComp_Bind); - - ok(desckind == DESCKIND_TYPECOMP, - "desckind should have been DESCKIND_TYPECOMP instead of %d\n", - desckind); - ok(!pTypeInfo, "pTypeInfo should have been set to NULL\n"); - - ITypeComp_Release(bindptr.lptcomp); - - /* test getting a value within a TKIND_ENUM */ - ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszUnchecked); - hr = ITypeComp_Bind(pTypeComp, wszUnchecked, ulHash, 0, &pTypeInfo, &desckind, &bindptr); - ok_ole_success(hr, ITypeComp_Bind); - - ok(desckind == DESCKIND_VARDESC, - "desckind should have been DESCKIND_VARDESC instead of %d\n", - desckind); - ITypeInfo_ReleaseVarDesc(pTypeInfo, bindptr.lpvardesc); - ITypeInfo_Release(pTypeInfo); - - /* test getting a TKIND_INTERFACE */ - ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszIUnknown); - hr = ITypeComp_Bind(pTypeComp, wszIUnknown, ulHash, 0, &pTypeInfo, &desckind, &bindptr); - ok_ole_success(hr, ITypeComp_Bind); - - ok(desckind == DESCKIND_NONE, - "desckind should have been DESCKIND_NONE instead of %d\n", - desckind); - ok(!pTypeInfo, "pTypeInfo should have been set to NULL\n"); - ok(!bindptr.lptcomp, "bindptr should have been set to NULL\n"); - - /* test getting a TKIND_DISPATCH */ - ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszFont); - hr = ITypeComp_Bind(pTypeComp, wszFont, ulHash, 0, &pTypeInfo, &desckind, &bindptr); - ok_ole_success(hr, ITypeComp_Bind); - - ok(desckind == DESCKIND_NONE, - "desckind should have been DESCKIND_NONE instead of %d\n", - desckind); - ok(!pTypeInfo, "pTypeInfo should have been set to NULL\n"); - ok(!bindptr.lptcomp, "bindptr should have been set to NULL\n"); - - /* test getting a TKIND_RECORD/TKIND_ALIAS */ - ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszGUID); - hr = ITypeComp_Bind(pTypeComp, wszGUID, ulHash, 0, &pTypeInfo, &desckind, &bindptr); - ok_ole_success(hr, ITypeComp_Bind); - - ok(desckind == DESCKIND_NONE, - "desckind should have been DESCKIND_NONE instead of %d\n", - desckind); - ok(!pTypeInfo, "pTypeInfo should have been set to NULL\n"); - ok(!bindptr.lptcomp, "bindptr should have been set to NULL\n"); - - /* test getting a TKIND_ALIAS */ - ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszOLE_COLOR); - hr = ITypeComp_Bind(pTypeComp, wszOLE_COLOR, ulHash, 0, &pTypeInfo, &desckind, &bindptr); - ok_ole_success(hr, ITypeComp_Bind); - - ok(desckind == DESCKIND_NONE, - "desckind should have been DESCKIND_NONE instead of %d\n", - desckind); - ok(!pTypeInfo, "pTypeInfo should have been set to NULL\n"); - ok(!bindptr.lptcomp, "bindptr should have been set to NULL\n"); - - /* test getting a TKIND_COCLASS */ - ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszStdPicture); - hr = ITypeComp_Bind(pTypeComp, wszStdPicture, ulHash, 0, &pTypeInfo, &desckind, &bindptr); - ok_ole_success(hr, ITypeComp_Bind); - - ok(desckind == DESCKIND_NONE, - "desckind should have been DESCKIND_NONE instead of %d\n", - desckind); - ok(!pTypeInfo, "pTypeInfo should have been set to NULL\n"); - ok(!bindptr.lptcomp, "bindptr should have been set to NULL\n"); - - ITypeComp_Release(pTypeComp); - - /* tests for ITypeComp on an interface */ - hr = ITypeLib_GetTypeInfoOfGuid(pTypeLib, &IID_IFont, &pFontTypeInfo); - ok_ole_success(hr, ITypeLib_GetTypeInfoOfGuid); - - hr = ITypeInfo_GetTypeComp(pFontTypeInfo, &pTypeComp); - ok_ole_success(hr, ITypeLib_GetTypeComp); - - ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszClone); - hr = ITypeComp_Bind(pTypeComp, wszClone, ulHash, 0, &pTypeInfo, &desckind, &bindptr); - ok_ole_success(hr, ITypeComp_Bind); - - ok(desckind == DESCKIND_FUNCDESC, - "desckind should have been DESCKIND_FUNCDESC instead of %d\n", - desckind); - ok(bindptr.lpfuncdesc != NULL, "bindptr.lpfuncdesc should not have been set to NULL\n"); - ITypeInfo_ReleaseFuncDesc(pTypeInfo, bindptr.lpfuncdesc); - ITypeInfo_Release(pTypeInfo); - - ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszClone); - hr = ITypeComp_Bind(pTypeComp, wszClone, ulHash, INVOKE_PROPERTYGET, &pTypeInfo, &desckind, &bindptr); - ok(hr == TYPE_E_TYPEMISMATCH, "ITypeComp_Bind should have failed with TYPE_E_TYPEMISMATCH instead of 0x%08x\n", hr); - - ok(desckind == DESCKIND_NONE, - "desckind should have been DESCKIND_NONE instead of %d\n", - desckind); - ok(!pTypeInfo, "pTypeInfo should have been set to NULL\n"); - ok(!bindptr.lptcomp, "bindptr should have been set to NULL\n"); - - /* tests that the compare is case-insensitive */ - ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszclone); - hr = ITypeComp_Bind(pTypeComp, wszclone, ulHash, 0, &pTypeInfo, &desckind, &bindptr); - ok_ole_success(hr, ITypeComp_Bind); - - ok(desckind == DESCKIND_FUNCDESC, - "desckind should have been DESCKIND_FUNCDESC instead of %d\n", - desckind); - ok(bindptr.lpfuncdesc != NULL, "bindptr.lpfuncdesc should not have been set to NULL\n"); - ITypeInfo_ReleaseFuncDesc(pTypeInfo, bindptr.lpfuncdesc); - ITypeInfo_Release(pTypeInfo); - - /* tests non-existent members */ - desckind = 0xdeadbeef; - bindptr.lptcomp = (ITypeComp*)0xdeadbeef; - pTypeInfo = (ITypeInfo*)0xdeadbeef; - ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszJunk); - hr = ITypeComp_Bind(pTypeComp, wszJunk, ulHash, 0, &pTypeInfo, &desckind, &bindptr); - ok_ole_success(hr, ITypeComp_Bind); - ok(desckind == DESCKIND_NONE, "desckind should have been DESCKIND_NONE, was: %d\n", desckind); - ok(pTypeInfo == NULL, "pTypeInfo should have been NULL, was: %p\n", pTypeInfo); - ok(bindptr.lptcomp == NULL, "bindptr should have been NULL, was: %p\n", bindptr.lptcomp); - - ITypeComp_Release(pTypeComp); - ITypeInfo_Release(pFontTypeInfo); - ITypeLib_Release(pTypeLib); -} - -static void test_CreateDispTypeInfo(void) -{ - ITypeInfo *pTypeInfo, *pTI2; - HRESULT hr; - INTERFACEDATA ifdata; - METHODDATA methdata[4]; - PARAMDATA parms1[2]; - PARAMDATA parms3[1]; - TYPEATTR *pTypeAttr; - HREFTYPE href; - FUNCDESC *pFuncDesc; - MEMBERID memid; - - static WCHAR func1[] = {'f','u','n','c','1',0}; - static const WCHAR func2[] = {'f','u','n','c','2',0}; - static const WCHAR func3[] = {'f','u','n','c','3',0}; - static const WCHAR parm1[] = {'p','a','r','m','1',0}; - static const WCHAR parm2[] = {'p','a','r','m','2',0}; - OLECHAR *name = func1; - - ifdata.pmethdata = methdata; - ifdata.cMembers = sizeof(methdata) / sizeof(methdata[0]); - - methdata[0].szName = SysAllocString(func1); - methdata[0].ppdata = parms1; - methdata[0].dispid = 0x123; - methdata[0].iMeth = 0; - methdata[0].cc = CC_STDCALL; - methdata[0].cArgs = 2; - methdata[0].wFlags = DISPATCH_METHOD; - methdata[0].vtReturn = VT_HRESULT; - parms1[0].szName = SysAllocString(parm1); - parms1[0].vt = VT_I4; - parms1[1].szName = SysAllocString(parm2); - parms1[1].vt = VT_BSTR; - - methdata[1].szName = SysAllocString(func2); - methdata[1].ppdata = NULL; - methdata[1].dispid = 0x124; - methdata[1].iMeth = 1; - methdata[1].cc = CC_STDCALL; - methdata[1].cArgs = 0; - methdata[1].wFlags = DISPATCH_PROPERTYGET; - methdata[1].vtReturn = VT_I4; - - methdata[2].szName = SysAllocString(func3); - methdata[2].ppdata = parms3; - methdata[2].dispid = 0x125; - methdata[2].iMeth = 3; - methdata[2].cc = CC_STDCALL; - methdata[2].cArgs = 1; - methdata[2].wFlags = DISPATCH_PROPERTYPUT; - methdata[2].vtReturn = VT_HRESULT; - parms3[0].szName = SysAllocString(parm1); - parms3[0].vt = VT_I4; - - methdata[3].szName = SysAllocString(func3); - methdata[3].ppdata = NULL; - methdata[3].dispid = 0x125; - methdata[3].iMeth = 4; - methdata[3].cc = CC_STDCALL; - methdata[3].cArgs = 0; - methdata[3].wFlags = DISPATCH_PROPERTYGET; - methdata[3].vtReturn = VT_I4; - - hr = CreateDispTypeInfo(&ifdata, LOCALE_NEUTRAL, &pTypeInfo); - ok(hr == S_OK, "hr %08x\n", hr); - - hr = ITypeInfo_GetTypeAttr(pTypeInfo, &pTypeAttr); - ok(hr == S_OK, "hr %08x\n", hr); - - ok(pTypeAttr->typekind == TKIND_COCLASS, "typekind %0x\n", pTypeAttr->typekind); - ok(pTypeAttr->cImplTypes == 1, "cImplTypes %d\n", pTypeAttr->cImplTypes); - ok(pTypeAttr->cFuncs == 0, "cFuncs %d\n", pTypeAttr->cFuncs); - ok(pTypeAttr->wTypeFlags == 0, "wTypeFlags %04x\n", pTypeAttr->cFuncs); - ITypeInfo_ReleaseTypeAttr(pTypeInfo, pTypeAttr); - - hr = ITypeInfo_GetRefTypeOfImplType(pTypeInfo, 0, &href); - ok(hr == S_OK, "hr %08x\n", hr); - ok(href == 0, "href = 0x%x\n", href); - hr = ITypeInfo_GetRefTypeInfo(pTypeInfo, href, &pTI2); - ok(hr == S_OK, "hr %08x\n", hr); - hr = ITypeInfo_GetTypeAttr(pTI2, &pTypeAttr); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pTypeAttr->typekind == TKIND_INTERFACE, "typekind %0x\n", pTypeAttr->typekind); - ok(pTypeAttr->cFuncs == 4, "cFuncs %d\n", pTypeAttr->cFuncs); - ok(IsEqualGUID(&pTypeAttr->guid, &GUID_NULL), "guid {%08x-...}\n", pTypeAttr->guid.Data1); - ok(pTypeAttr->wTypeFlags == 0, "typeflags %08x\n", pTypeAttr->wTypeFlags); - - ITypeInfo_ReleaseTypeAttr(pTI2, pTypeAttr); - - hr = ITypeInfo_GetFuncDesc(pTI2, 0, &pFuncDesc); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFuncDesc->memid == 0x123, "memid %x\n", pFuncDesc->memid); - ok(pFuncDesc->funckind == FUNC_VIRTUAL, "funckind %d\n", pFuncDesc->funckind); - ok(pFuncDesc->invkind == methdata[0].wFlags, "invkind %d\n", pFuncDesc->invkind); - ok(pFuncDesc->callconv == methdata[0].cc, "callconv %d\n", pFuncDesc->callconv); - ok(pFuncDesc->cParams == methdata[0].cArgs, "cParams %d\n", pFuncDesc->cParams); - ok(pFuncDesc->oVft == 0, "oVft %d\n", pFuncDesc->oVft); - ok(pFuncDesc->wFuncFlags == 0, "oVft %d\n", pFuncDesc->wFuncFlags); - ok(pFuncDesc->elemdescFunc.tdesc.vt == VT_HRESULT, "ret vt %x\n", pFuncDesc->elemdescFunc.tdesc.vt); - ok(pFuncDesc->lprgelemdescParam[0].tdesc.vt == VT_I4, "parm 0 vt %x\n", pFuncDesc->lprgelemdescParam[0].tdesc.vt); - ok(U(pFuncDesc->lprgelemdescParam[0]).paramdesc.wParamFlags == PARAMFLAG_NONE, "parm 0 flags %x\n", U(pFuncDesc->lprgelemdescParam[0]).paramdesc.wParamFlags); - - ok(pFuncDesc->lprgelemdescParam[1].tdesc.vt == VT_BSTR, "parm 1 vt %x\n", pFuncDesc->lprgelemdescParam[1].tdesc.vt); - ok(U(pFuncDesc->lprgelemdescParam[1]).paramdesc.wParamFlags == PARAMFLAG_NONE, "parm 1 flags %x\n", U(pFuncDesc->lprgelemdescParam[1]).paramdesc.wParamFlags); - ITypeInfo_ReleaseFuncDesc(pTI2, pFuncDesc); - - hr = ITypeInfo_GetFuncDesc(pTI2, 1, &pFuncDesc); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFuncDesc->funckind == FUNC_VIRTUAL, "funckind %d\n", pFuncDesc->funckind); - ok(pFuncDesc->invkind == methdata[1].wFlags, "invkind %d\n", pFuncDesc->invkind); - ok(pFuncDesc->callconv == methdata[1].cc, "callconv %d\n", pFuncDesc->callconv); - ok(pFuncDesc->cParams == methdata[1].cArgs, "cParams %d\n", pFuncDesc->cParams); - ok(pFuncDesc->oVft == sizeof(void *), "oVft %d\n", pFuncDesc->oVft); - ok(pFuncDesc->wFuncFlags == 0, "oVft %d\n", pFuncDesc->wFuncFlags); - ok(pFuncDesc->elemdescFunc.tdesc.vt == VT_I4, "ret vt %x\n", pFuncDesc->elemdescFunc.tdesc.vt); - ITypeInfo_ReleaseFuncDesc(pTI2, pFuncDesc); - - hr = ITypeInfo_GetFuncDesc(pTI2, 2, &pFuncDesc); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFuncDesc->funckind == FUNC_VIRTUAL, "funckind %d\n", pFuncDesc->funckind); - ok(pFuncDesc->invkind == methdata[2].wFlags, "invkind %d\n", pFuncDesc->invkind); - ok(pFuncDesc->callconv == methdata[2].cc, "callconv %d\n", pFuncDesc->callconv); - ok(pFuncDesc->cParams == methdata[2].cArgs, "cParams %d\n", pFuncDesc->cParams); - ok(pFuncDesc->oVft == 3 * sizeof(void *), "oVft %d\n", pFuncDesc->oVft); - ok(pFuncDesc->wFuncFlags == 0, "oVft %d\n", pFuncDesc->wFuncFlags); - ok(pFuncDesc->elemdescFunc.tdesc.vt == VT_HRESULT, "ret vt %x\n", pFuncDesc->elemdescFunc.tdesc.vt); - ok(pFuncDesc->lprgelemdescParam[0].tdesc.vt == VT_I4, "parm 0 vt %x\n", pFuncDesc->lprgelemdescParam[0].tdesc.vt); - ok(U(pFuncDesc->lprgelemdescParam[0]).paramdesc.wParamFlags == PARAMFLAG_NONE, "parm 0 flags %x\n", U(pFuncDesc->lprgelemdescParam[0]).paramdesc.wParamFlags); - ITypeInfo_ReleaseFuncDesc(pTI2, pFuncDesc); - - hr = ITypeInfo_GetFuncDesc(pTI2, 3, &pFuncDesc); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFuncDesc->funckind == FUNC_VIRTUAL, "funckind %d\n", pFuncDesc->funckind); - ok(pFuncDesc->invkind == methdata[3].wFlags, "invkind %d\n", pFuncDesc->invkind); - ok(pFuncDesc->callconv == methdata[3].cc, "callconv %d\n", pFuncDesc->callconv); - ok(pFuncDesc->cParams == methdata[3].cArgs, "cParams %d\n", pFuncDesc->cParams); - ok(pFuncDesc->oVft == 4 * sizeof(void *), "oVft %d\n", pFuncDesc->oVft); - ok(pFuncDesc->wFuncFlags == 0, "oVft %d\n", pFuncDesc->wFuncFlags); - ok(pFuncDesc->elemdescFunc.tdesc.vt == VT_I4, "ret vt %x\n", pFuncDesc->elemdescFunc.tdesc.vt); - ITypeInfo_ReleaseFuncDesc(pTI2, pFuncDesc); - - /* test GetIDsOfNames on a coclass to see if it searches its interfaces */ - hr = ITypeInfo_GetIDsOfNames(pTypeInfo, &name, 1, &memid); - ok(hr == S_OK, "hr 0x%08x\n", hr); - ok(memid == 0x123, "memid 0x%08x\n", memid); - - ITypeInfo_Release(pTI2); - ITypeInfo_Release(pTypeInfo); - - SysFreeString(parms1[0].szName); - SysFreeString(parms1[1].szName); - SysFreeString(parms3[0].szName); - SysFreeString(methdata[0].szName); - SysFreeString(methdata[1].szName); - SysFreeString(methdata[2].szName); - SysFreeString(methdata[3].szName); -} - -static void test_TypeInfo(void) -{ - ITypeLib *pTypeLib; - ITypeInfo *pTypeInfo; - ITypeInfo2 *pTypeInfo2; - HRESULT hr; - static WCHAR wszBogus[] = { 'b','o','g','u','s',0 }; - static WCHAR wszGetTypeInfo[] = { 'G','e','t','T','y','p','e','I','n','f','o',0 }; - static WCHAR wszClone[] = {'C','l','o','n','e',0}; - OLECHAR* bogus = wszBogus; - OLECHAR* pwszGetTypeInfo = wszGetTypeInfo; - OLECHAR* pwszClone = wszClone; - DISPID dispidMember; - DISPPARAMS dispparams; - GUID bogusguid = {0x806afb4f,0x13f7,0x42d2,{0x89,0x2c,0x6c,0x97,0xc3,0x6a,0x36,0xc1}}; - VARIANT var; - - hr = LoadTypeLib(wszStdOle2, &pTypeLib); - ok_ole_success(hr, LoadTypeLib); - - hr = ITypeLib_GetTypeInfoOfGuid(pTypeLib, &IID_IFont, &pTypeInfo); - ok_ole_success(hr, ITypeLib_GetTypeInfoOfGuid); - - /* test nonexistent method name */ - hr = ITypeInfo_GetIDsOfNames(pTypeInfo, &bogus, 1, &dispidMember); - ok(hr == DISP_E_UNKNOWNNAME, - "ITypeInfo_GetIDsOfNames should have returned DISP_E_UNKNOWNNAME instead of 0x%08x\n", - hr); - - dispparams.cArgs = 0; - dispparams.rgdispidNamedArgs = NULL; - dispparams.rgvarg = NULL; - - /* test dispparams not NULL */ - - /* invalid member id -- wrong flags -- cNamedArgs not bigger than cArgs */ - dispparams.cNamedArgs = 0; - hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, 0xdeadbeef, DISPATCH_PROPERTYGET, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); - /* invalid member id -- correct flags -- cNamedArgs not bigger than cArgs */ - hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, 0xdeadbeef, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); - - /* invalid member id -- wrong flags -- cNamedArgs bigger than cArgs */ - dispparams.cNamedArgs = 1; - hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, 0xdeadbeef, DISPATCH_PROPERTYGET, &dispparams, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08x\n", hr); - /* invalid member id -- correct flags -- cNamedArgs bigger than cArgs */ - hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, 0xdeadbeef, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08x\n", hr); - - - hr = ITypeInfo_GetIDsOfNames(pTypeInfo, &pwszClone, 1, &dispidMember); - ok_ole_success(hr, ITypeInfo_GetIDsOfNames); - - /* correct member id -- wrong flags -- cNamedArgs not bigger than cArgs */ - dispparams.cNamedArgs = 0; - hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_PROPERTYGET, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); - /* correct member id -- correct flags -- cNamedArgs not bigger than cArgs - hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == 0x8002000e, "ITypeInfo_Invoke should have returned 0x8002000e instead of 0x%08x\n", hr); */ - - /* correct member id -- wrong flags -- cNamedArgs bigger than cArgs */ - dispparams.cNamedArgs = 1; - hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_PROPERTYGET, &dispparams, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08x\n", hr); - /* correct member id -- correct flags -- cNamedArgs bigger than cArgs */ - hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08x\n", hr); - - /* test NULL dispparams */ - - /* correct member id -- wrong flags -- cNamedArgs not bigger than cArgs */ - dispparams.cNamedArgs = 0; - hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_PROPERTYGET, NULL, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08x\n", hr); - /* correct member id -- correct flags -- cNamedArgs not bigger than cArgs */ - hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, NULL, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08x\n", hr); - - /* correct member id -- wrong flags -- cNamedArgs bigger than cArgs */ - dispparams.cNamedArgs = 1; - hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_PROPERTYGET, NULL, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08x\n", hr); - /* correct member id -- correct flags -- cNamedArgs bigger than cArgs */ - hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, NULL, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08x\n", hr); - - ITypeInfo_Release(pTypeInfo); - - - - hr = ITypeLib_GetTypeInfoOfGuid(pTypeLib, &IID_IDispatch, &pTypeInfo); - ok_ole_success(hr, ITypeLib_GetTypeInfoOfGuid); - - hr = ITypeInfo_GetIDsOfNames(pTypeInfo, &pwszGetTypeInfo, 1, &dispidMember); - ok_ole_success(hr, ITypeInfo_GetIDsOfNames); - - hr = ITypeInfo_QueryInterface(pTypeInfo, &IID_ITypeInfo2, (void**)&pTypeInfo2); - ok_ole_success(hr, ITypeInfo_QueryInterface); - - if (SUCCEEDED(hr)) - { - VariantInit(&var); - - V_VT(&var) = VT_I4; - - /* test unknown guid passed to GetCustData */ - hr = ITypeInfo2_GetCustData(pTypeInfo2, &bogusguid, &var); - ok_ole_success(hr, ITypeInfo_GetCustData); - ok(V_VT(&var) == VT_EMPTY, "got %i, expected VT_EMPTY\n", V_VT(&var)); - - ITypeInfo2_Release(pTypeInfo2); - - VariantClear(&var); - } - - /* test invoking a method with a [restricted] keyword */ - - /* correct member id -- wrong flags -- cNamedArgs not bigger than cArgs */ - dispparams.cNamedArgs = 0; - hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_PROPERTYGET, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); - /* correct member id -- correct flags -- cNamedArgs not bigger than cArgs */ - hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); - - /* correct member id -- wrong flags -- cNamedArgs bigger than cArgs */ - dispparams.cNamedArgs = 1; - hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_PROPERTYGET, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); - /* correct member id -- correct flags -- cNamedArgs bigger than cArgs */ - hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); - - /* test NULL dispparams */ - - /* correct member id -- wrong flags -- cNamedArgs not bigger than cArgs */ - dispparams.cNamedArgs = 0; - hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_PROPERTYGET, NULL, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); - /* correct member id -- correct flags -- cNamedArgs not bigger than cArgs */ - hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, NULL, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); - - /* correct member id -- wrong flags -- cNamedArgs bigger than cArgs */ - dispparams.cNamedArgs = 1; - hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_PROPERTYGET, NULL, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); - /* correct member id -- correct flags -- cNamedArgs bigger than cArgs */ - hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, NULL, NULL, NULL, NULL); - ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08x\n", hr); - - ITypeInfo_Release(pTypeInfo); - ITypeLib_Release(pTypeLib); -} - -/* RegDeleteTreeW from dlls/advapi32/registry.c */ -static LSTATUS myRegDeleteTreeW(HKEY hKey, LPCWSTR lpszSubKey) -{ - LONG ret; - DWORD dwMaxSubkeyLen, dwMaxValueLen; - DWORD dwMaxLen, dwSize; - WCHAR szNameBuf[MAX_PATH], *lpszName = szNameBuf; - HKEY hSubKey = hKey; - - if(lpszSubKey) - { - ret = RegOpenKeyExW(hKey, lpszSubKey, 0, KEY_READ, &hSubKey); - if (ret) return ret; - } - - ret = RegQueryInfoKeyW(hSubKey, NULL, NULL, NULL, NULL, - &dwMaxSubkeyLen, NULL, NULL, &dwMaxValueLen, NULL, NULL, NULL); - if (ret) goto cleanup; - - dwMaxSubkeyLen++; - dwMaxValueLen++; - dwMaxLen = max(dwMaxSubkeyLen, dwMaxValueLen); - if (dwMaxLen > sizeof(szNameBuf)/sizeof(WCHAR)) - { - /* Name too big: alloc a buffer for it */ - if (!(lpszName = HeapAlloc( GetProcessHeap(), 0, dwMaxLen*sizeof(WCHAR)))) - { - ret = ERROR_NOT_ENOUGH_MEMORY; - goto cleanup; - } - } - - /* Recursively delete all the subkeys */ - while (TRUE) - { - dwSize = dwMaxLen; - if (RegEnumKeyExW(hSubKey, 0, lpszName, &dwSize, NULL, - NULL, NULL, NULL)) break; - - ret = myRegDeleteTreeW(hSubKey, lpszName); - if (ret) goto cleanup; - } - - if (lpszSubKey) - ret = RegDeleteKeyW(hKey, lpszSubKey); - else - while (TRUE) - { - dwSize = dwMaxLen; - if (RegEnumValueW(hKey, 0, lpszName, &dwSize, - NULL, NULL, NULL, NULL)) break; - - ret = RegDeleteValueW(hKey, lpszName); - if (ret) goto cleanup; - } - -cleanup: - if (lpszName != szNameBuf) - HeapFree(GetProcessHeap(), 0, lpszName); - if(lpszSubKey) - RegCloseKey(hSubKey); - return ret; -} - -static BOOL do_typelib_reg_key(GUID *uid, WORD maj, WORD min, LPCWSTR base, BOOL remove) -{ - static const WCHAR typelibW[] = {'T','y','p','e','l','i','b','\\',0}; - static const WCHAR formatW[] = {'\\','%','u','.','%','u','\\','0','\\','w','i','n','3','2',0}; - static const WCHAR format2W[] = {'%','s','_','%','u','_','%','u','.','d','l','l',0}; - WCHAR buf[128]; - HKEY hkey; - BOOL ret = TRUE; - DWORD res; - - memcpy(buf, typelibW, sizeof(typelibW)); - StringFromGUID2(uid, buf + lstrlenW(buf), 40); - - if (remove) - { - ok(myRegDeleteTreeW(HKEY_CLASSES_ROOT, buf) == ERROR_SUCCESS, "SHDeleteKey failed\n"); - return TRUE; - } - - wsprintfW(buf + lstrlenW(buf), formatW, maj, min ); - - SetLastError(0xdeadbeef); - res = RegCreateKeyExW(HKEY_CLASSES_ROOT, buf, 0, NULL, 0, - KEY_WRITE, NULL, &hkey, NULL); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("W-calls are not implemented\n"); - return FALSE; - } - - if (res != ERROR_SUCCESS) - { - trace("RegCreateKeyExW failed\n"); - return FALSE; - } - - wsprintfW(buf, format2W, base, maj, min); - if (RegSetValueExW(hkey, NULL, 0, REG_SZ, - (BYTE *)buf, (lstrlenW(buf) + 1) * sizeof(WCHAR)) != ERROR_SUCCESS) - { - trace("RegSetValueExW failed\n"); - ret = FALSE; - } - RegCloseKey(hkey); - return ret; -} - -static void test_QueryPathOfRegTypeLib(void) -{ - static const struct test_data - { - WORD maj, min; - HRESULT ret; - const WCHAR path[16]; - } td[] = { - { 1, 0, TYPE_E_LIBNOTREGISTERED, { 0 } }, - { 3, 0, S_OK, {'f','a','k','e','_','3','_','0','.','d','l','l',0 } }, - { 3, 1, S_OK, {'f','a','k','e','_','3','_','1','.','d','l','l',0 } }, - { 3, 22, S_OK, {'f','a','k','e','_','3','_','3','7','.','d','l','l',0 } }, - { 3, 37, S_OK, {'f','a','k','e','_','3','_','3','7','.','d','l','l',0 } }, - { 3, 40, S_OK, {'f','a','k','e','_','3','_','3','7','.','d','l','l',0 } }, - { 0xffff, 0xffff, S_OK, {'f','a','k','e','_','5','_','3','7','.','d','l','l',0 } }, - { 0xffff, 0, TYPE_E_LIBNOTREGISTERED, { 0 } }, - { 3, 0xffff, TYPE_E_LIBNOTREGISTERED, { 0 } }, - { 5, 0xffff, TYPE_E_LIBNOTREGISTERED, { 0 } }, - { 4, 0, TYPE_E_LIBNOTREGISTERED, { 0 } } - }; - static const WCHAR base[] = {'f','a','k','e',0}; - UINT i; - RPC_STATUS status; - GUID uid; - WCHAR uid_str[40]; - HRESULT ret; - BSTR path; - - status = UuidCreate(&uid); - ok(!status || status == RPC_S_UUID_LOCAL_ONLY, "UuidCreate error %08x\n", status); - - StringFromGUID2(&uid, uid_str, 40); - /*trace("GUID: %s\n", wine_dbgstr_w(uid_str));*/ - - if (!do_typelib_reg_key(&uid, 3, 0, base, 0)) return; - if (!do_typelib_reg_key(&uid, 3, 1, base, 0)) return; - if (!do_typelib_reg_key(&uid, 3, 37, base, 0)) return; - if (!do_typelib_reg_key(&uid, 5, 37, base, 0)) return; - - for (i = 0; i < sizeof(td)/sizeof(td[0]); i++) - { - ret = QueryPathOfRegTypeLib(&uid, td[i].maj, td[i].min, 0, &path); - ok(ret == td[i].ret, "QueryPathOfRegTypeLib(%u.%u) returned %08x\n", td[i].maj, td[i].min, ret); - if (ret == S_OK) - { - ok(!lstrcmpW(td[i].path, path), "typelib %u.%u path doesn't match\n", td[i].maj, td[i].min); - SysFreeString(path); - } - } - - do_typelib_reg_key(&uid, 0, 0, NULL, 1); -} - -static void test_inheritance(void) -{ - HRESULT hr; - ITypeLib *pTL; - ITypeInfo *pTI, *pTI_p; - TYPEATTR *pTA; - HREFTYPE href; - FUNCDESC *pFD; - WCHAR path[MAX_PATH]; - CHAR pathA[MAX_PATH]; - static const WCHAR tl_path[] = {'.','\\','m','i','d','l','_','t','m','a','r','s','h','a','l','.','t','l','b',0}; - - BOOL use_midl_tlb = 0; - - GetModuleFileNameA(NULL, pathA, MAX_PATH); - MultiByteToWideChar(CP_ACP, 0, pathA, -1, path, MAX_PATH); - - if(use_midl_tlb) - memcpy(path, tl_path, sizeof(tl_path)); - - hr = LoadTypeLib(path, &pTL); - if(FAILED(hr)) return; - - - /* ItestIF3 is a syntax 2 dispinterface */ - hr = ITypeLib_GetTypeInfoOfGuid(pTL, &DIID_ItestIF3, &pTI); - ok(hr == S_OK, "hr %08x\n", hr); - - hr = ITypeInfo_GetTypeAttr(pTI, &pTA); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind); - ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft); - ok(pTA->wTypeFlags == TYPEFLAG_FDISPATCHABLE, "typeflags %x\n", pTA->wTypeFlags); -if(use_midl_tlb) { - ok(pTA->cFuncs == 6, "cfuncs %d\n", pTA->cFuncs); - ok(pTA->cImplTypes == 1, "cimpltypes %d\n", pTA->cImplTypes); -} - ITypeInfo_ReleaseTypeAttr(pTI, pTA); - -if(use_midl_tlb) { - hr = ITypeInfo_GetRefTypeOfImplType(pTI, 0, &href); - ok(hr == S_OK, "hr %08x\n", hr); - hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p); - ok(hr == S_OK, "hr %08x\n", hr); - hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA); - ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid {%08x-....\n", pTA->guid.Data1); - ITypeInfo_ReleaseTypeAttr(pTI_p, pTA); - ITypeInfo_Release(pTI_p); - - /* Should have six methods */ - hr = ITypeInfo_GetFuncDesc(pTI, 6, &pFD); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08x\n", hr); - hr = ITypeInfo_GetFuncDesc(pTI, 5, &pFD); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFD->memid == 0x60020000, "memid %08x\n", pFD->memid); - ok(pFD->oVft == 5 * sizeof(void *), "oVft %d\n", pFD->oVft); - ITypeInfo_ReleaseFuncDesc(pTI, pFD); -} - ITypeInfo_Release(pTI); - - - /* ItestIF4 is a syntax 1 dispinterface */ - hr = ITypeLib_GetTypeInfoOfGuid(pTL, &DIID_ItestIF4, &pTI); - ok(hr == S_OK, "hr %08x\n", hr); - - hr = ITypeInfo_GetTypeAttr(pTI, &pTA); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind); - ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft); - ok(pTA->wTypeFlags == TYPEFLAG_FDISPATCHABLE, "typeflags %x\n", pTA->wTypeFlags); - ok(pTA->cFuncs == 1, "cfuncs %d\n", pTA->cFuncs); - ok(pTA->cImplTypes == 1, "cimpltypes %d\n", pTA->cImplTypes); - ITypeInfo_ReleaseTypeAttr(pTI, pTA); - - hr = ITypeInfo_GetRefTypeOfImplType(pTI, 0, &href); - ok(hr == S_OK, "hr %08x\n", hr); - hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p); - ok(hr == S_OK, "hr %08x\n", hr); - hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA); - ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid {%08x-....\n", pTA->guid.Data1); - ITypeInfo_ReleaseTypeAttr(pTI_p, pTA); - ITypeInfo_Release(pTI_p); - hr = ITypeInfo_GetFuncDesc(pTI, 1, &pFD); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08x\n", hr); - hr = ITypeInfo_GetFuncDesc(pTI, 0, &pFD); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFD->memid == 0x1c, "memid %08x\n", pFD->memid); - ITypeInfo_ReleaseFuncDesc(pTI, pFD); - ITypeInfo_Release(pTI); - - - /* ItestIF5 is dual with inherited ifaces which derive from IUnknown but not IDispatch */ - hr = ITypeLib_GetTypeInfoOfGuid(pTL, &IID_ItestIF5, &pTI); - ok(hr == S_OK, "hr %08x\n", hr); - - hr = ITypeInfo_GetTypeAttr(pTI, &pTA); - ok(hr == S_OK, "hr %08x\n", hr); - if (hr == S_OK) - { - ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind); - ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft); - if(use_midl_tlb) { - ok(pTA->wTypeFlags == TYPEFLAG_FDUAL, "typeflags %x\n", pTA->wTypeFlags); - } - ok(pTA->cFuncs == 8, "cfuncs %d\n", pTA->cFuncs); - ok(pTA->cImplTypes == 1, "cimpltypes %d\n", pTA->cImplTypes); - ITypeInfo_ReleaseTypeAttr(pTI, pTA); - } - hr = ITypeInfo_GetRefTypeOfImplType(pTI, 0, &href); - ok(hr == S_OK, "hr %08x\n", hr); - hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p); - ok(hr == S_OK, "hr %08x\n", hr); - hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA); - ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid {%08x-....\n", pTA->guid.Data1); - ITypeInfo_ReleaseTypeAttr(pTI_p, pTA); - ITypeInfo_Release(pTI_p); -if(use_midl_tlb) { - hr = ITypeInfo_GetFuncDesc(pTI, 6, &pFD); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFD->memid == 0x1234, "memid %08x\n", pFD->memid); - ITypeInfo_ReleaseFuncDesc(pTI, pFD); -} - ITypeInfo_Release(pTI); - - /* ItestIF7 is dual with inherited ifaces which derive from Dispatch */ - hr = ITypeLib_GetTypeInfoOfGuid(pTL, &IID_ItestIF7, &pTI); - ok(hr == S_OK, "hr %08x\n", hr); - - hr = ITypeInfo_GetTypeAttr(pTI, &pTA); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind); - ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft); - ok(pTA->wTypeFlags == (TYPEFLAG_FDISPATCHABLE|TYPEFLAG_FDUAL), "typeflags %x\n", pTA->wTypeFlags); - ok(pTA->cFuncs == 10, "cfuncs %d\n", pTA->cFuncs); - ok(pTA->cImplTypes == 1, "cimpltypes %d\n", pTA->cImplTypes); - ITypeInfo_ReleaseTypeAttr(pTI, pTA); - - hr = ITypeInfo_GetRefTypeOfImplType(pTI, 0, &href); - ok(hr == S_OK, "hr %08x\n", hr); - hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p); - ok(hr == S_OK, "hr %08x\n", hr); - hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA); - ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid {%08x-....\n", pTA->guid.Data1); - ITypeInfo_ReleaseTypeAttr(pTI_p, pTA); - ITypeInfo_Release(pTI_p); - - hr = ITypeInfo_GetFuncDesc(pTI, 9, &pFD); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFD->memid == 0x1236, "memid %08x\n", pFD->memid); - ITypeInfo_ReleaseFuncDesc(pTI, pFD); - ITypeInfo_Release(pTI); - - /* ItestIF10 is a syntax 2 dispinterface which doesn't derive from IUnknown */ - hr = ITypeLib_GetTypeInfoOfGuid(pTL, &DIID_ItestIF10, &pTI); - ok(hr == S_OK, "hr %08x\n", hr); - - hr = ITypeInfo_GetTypeAttr(pTI, &pTA); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind); - ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft); - ok(pTA->wTypeFlags == TYPEFLAG_FDISPATCHABLE, "typeflags %x\n", pTA->wTypeFlags); -if(use_midl_tlb) { - ok(pTA->cFuncs == 3, "cfuncs %d\n", pTA->cFuncs); - ok(pTA->cImplTypes == 1, "cimpltypes %d\n", pTA->cImplTypes); -} - ITypeInfo_ReleaseTypeAttr(pTI, pTA); - -if(use_midl_tlb) { - hr = ITypeInfo_GetRefTypeOfImplType(pTI, -1, &href); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08x\n", hr); - hr = ITypeInfo_GetRefTypeOfImplType(pTI, 0, &href); - ok(hr == S_OK, "hr %08x\n", hr); - hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p); - ok(hr == S_OK, "hr %08x\n", hr); - hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA); - ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid {%08x-....\n", pTA->guid.Data1); - ITypeInfo_ReleaseTypeAttr(pTI_p, pTA); - ITypeInfo_Release(pTI_p); - - /* Should have three methods */ - hr = ITypeInfo_GetFuncDesc(pTI, 3, &pFD); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08x\n", hr); - hr = ITypeInfo_GetFuncDesc(pTI, 2, &pFD); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFD->memid == 0x60010000, "memid %08x\n", pFD->memid); - ok(pFD->oVft == 2 * sizeof(void *), "oVft %d\n", pFD->oVft); - ITypeInfo_ReleaseFuncDesc(pTI, pFD); -} - ITypeInfo_Release(pTI); - - /* ItestIF11 is a syntax 2 dispinterface which derives from IDispatch */ - hr = ITypeLib_GetTypeInfoOfGuid(pTL, &DIID_ItestIF11, &pTI); - ok(hr == S_OK, "hr %08x\n", hr); - - hr = ITypeInfo_GetTypeAttr(pTI, &pTA); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind); - ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft); - ok(pTA->wTypeFlags == TYPEFLAG_FDISPATCHABLE, "typeflags %x\n", pTA->wTypeFlags); -if(use_midl_tlb) { - ok(pTA->cFuncs == 10, "cfuncs %d\n", pTA->cFuncs); - ok(pTA->cImplTypes == 1, "cimpltypes %d\n", pTA->cImplTypes); -} - ITypeInfo_ReleaseTypeAttr(pTI, pTA); - -if(use_midl_tlb) { - hr = ITypeInfo_GetRefTypeOfImplType(pTI, 0, &href); - ok(hr == S_OK, "hr %08x\n", hr); - hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p); - ok(hr == S_OK, "hr %08x\n", hr); - hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA); - ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid {%08x-....\n", pTA->guid.Data1); - ITypeInfo_ReleaseTypeAttr(pTI_p, pTA); - ITypeInfo_Release(pTI_p); - - /* Should have ten methods */ - hr = ITypeInfo_GetFuncDesc(pTI, 10, &pFD); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08x\n", hr); - hr = ITypeInfo_GetFuncDesc(pTI, 9, &pFD); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFD->memid == 0x1236, "memid %08x\n", pFD->memid); - ok(pFD->oVft == 9 * sizeof(void *), "oVft %d\n", pFD->oVft); - - /* first argument to 10th function is an HREFTYPE from the impl type */ - ok(pFD->cParams == 1, "cParams %i\n", pFD->cParams); - ok(pFD->lprgelemdescParam[0].tdesc.vt == VT_USERDEFINED, - "vt 0x%x\n", pFD->lprgelemdescParam[0].tdesc.vt); - href = U(pFD->lprgelemdescParam[0].tdesc).hreftype; - ok((href & 0xff000000) == 0x04000000, "href 0x%08x\n", href); - hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p); - ok(SUCCEEDED(hr), "hr %08x\n", hr); - if (SUCCEEDED(hr)) ITypeInfo_Release(pTI_p); - ITypeInfo_ReleaseFuncDesc(pTI, pFD); -} - ITypeInfo_Release(pTI); - - - /* ItestIF2 is an interface which derives from IUnknown */ - hr = ITypeLib_GetTypeInfoOfGuid(pTL, &IID_ItestIF2, &pTI); - ok(hr == S_OK, "hr %08x\n", hr); - - hr = ITypeInfo_GetTypeAttr(pTI, &pTA); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pTA->typekind == TKIND_INTERFACE, "kind %04x\n", pTA->typekind); - ok(pTA->cbSizeVft == 6 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft); - ok(pTA->wTypeFlags == 0, "typeflags %x\n", pTA->wTypeFlags); -if(use_midl_tlb) { - ok(pTA->cFuncs == 1, "cfuncs %d\n", pTA->cFuncs); - ok(pTA->cImplTypes == 1, "cimpltypes %d\n", pTA->cImplTypes); -} - ITypeInfo_ReleaseTypeAttr(pTI, pTA); - -if(use_midl_tlb) { - /* Should have one method */ - hr = ITypeInfo_GetFuncDesc(pTI, 1, &pFD); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "hr %08x\n", hr); - hr = ITypeInfo_GetFuncDesc(pTI, 0, &pFD); - ok(hr == S_OK, "hr %08x\n", hr); - ok(pFD->memid == 0x60020000, "memid %08x\n", pFD->memid); - ok(pFD->oVft == 5 * sizeof(void *), "oVft %d\n", pFD->oVft); - ITypeInfo_ReleaseFuncDesc(pTI, pFD); -} - ITypeInfo_Release(pTI); - - ITypeLib_Release(pTL); - - return; -} - -static void test_CreateTypeLib(void) { - static const WCHAR stdoleW[] = {'s','t','d','o','l','e','2','.','t','l','b',0}; - static OLECHAR typelibW[] = {'t','y','p','e','l','i','b',0}; - static OLECHAR helpfileW[] = {'C',':','\\','b','o','g','u','s','.','h','l','p',0}; - static OLECHAR interface1W[] = {'i','n','t','e','r','f','a','c','e','1',0}; - static OLECHAR interface2W[] = {'i','n','t','e','r','f','a','c','e','2',0}; - static OLECHAR interface3W[] = {'i','n','t','e','r','f','a','c','e','3',0}; - static OLECHAR dualW[] = {'d','u','a','l',0}; - static OLECHAR coclassW[] = {'c','o','c','l','a','s','s',0}; - static WCHAR defaultW[] = {'d','e','f','a','u','l','t',0x3213,0}; - static OLECHAR func1W[] = {'f','u','n','c','1',0}; - static OLECHAR func2W[] = {'f','u','n','c','2',0}; - static OLECHAR prop1W[] = {'P','r','o','p','1',0}; - static OLECHAR param1W[] = {'p','a','r','a','m','1',0}; - static OLECHAR param2W[] = {'p','a','r','a','m','2',0}; - static OLECHAR *names1[] = {func1W, param1W, param2W}; - static OLECHAR *names2[] = {func2W, param1W, param2W}; - static OLECHAR *propname[] = {prop1W, param1W}; - static const GUID custguid = {0xbf611abe,0x5b38,0x11df,{0x91,0x5c,0x08,0x02,0x79,0x79,0x94,0x70}}; - - char filename[MAX_PATH]; - WCHAR filenameW[MAX_PATH]; - ICreateTypeLib2 *createtl; - ICreateTypeInfo *createti; - ICreateTypeInfo2 *createti2; - ITypeLib *tl, *stdole; - ITypeInfo *interface1, *interface2, *dual, *unknown, *dispatch, *ti; - ITypeInfo2 *ti2; - FUNCDESC funcdesc; - ELEMDESC elemdesc[5]; - PARAMDESCEX paramdescex; - TYPEDESC typedesc1, typedesc2; - TYPEATTR *typeattr; - TLIBATTR *libattr; - HREFTYPE hreftype; - BSTR name, docstring, helpfile; - DWORD helpcontext; - int impltypeflags; - VARIANT cust_data; - HRESULT hres; - - trace("CreateTypeLib tests\n"); - - hres = LoadTypeLib(stdoleW, &stdole); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ITypeLib_GetTypeInfoOfGuid(stdole, &IID_IUnknown, &unknown); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ITypeLib_GetTypeInfoOfGuid(stdole, &IID_IDispatch, &dispatch); - ok(hres == S_OK, "got %08x\n", hres); - - GetTempFileNameA(".", "tlb", 0, filename); - MultiByteToWideChar(CP_ACP, 0, filename, -1, filenameW, MAX_PATH); - - hres = CreateTypeLib2(SYS_WIN32, filenameW, &createtl); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeLib_QueryInterface(createtl, &IID_ITypeLib, (void**)&tl); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ITypeLib_GetLibAttr(tl, &libattr); - ok(hres == S_OK, "got %08x\n", hres); - - ok(libattr->syskind == SYS_WIN32, "syskind = %d\n", libattr->syskind); - ok(libattr->wMajorVerNum == 0, "wMajorVer = %d\n", libattr->wMajorVerNum); - ok(libattr->wMinorVerNum == 0, "wMinorVerNum = %d\n", libattr->wMinorVerNum); - ok(libattr->wLibFlags == 0, "wLibFlags = %d\n", libattr->wLibFlags); - - ITypeLib_ReleaseTLibAttr(tl, libattr); - - name = (BSTR)0xdeadbeef; - hres = ITypeLib_GetDocumentation(tl, -1, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got %08x\n", hres); - ok(name == NULL, "name != NULL\n"); - ok(docstring == NULL, "docstring != NULL\n"); - ok(helpcontext == 0, "helpcontext != 0\n"); - ok(helpfile == NULL, "helpfile != NULL\n"); - - hres = ITypeLib_GetDocumentation(tl, 0, &name, NULL, NULL, NULL); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); - - hres = ICreateTypeLib_SetName(createtl, typelibW); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeLib_SetHelpFileName(createtl, helpfileW); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ITypeLib_GetDocumentation(tl, -1, NULL, NULL, NULL, NULL); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ITypeLib_GetDocumentation(tl, -1, &name, NULL, NULL, &helpfile); - ok(hres == S_OK, "got %08x\n", hres); - ok(!memcmp(name, typelibW, sizeof(typelibW)), "name = %s\n", wine_dbgstr_w(name)); - ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "helpfile = %s\n", wine_dbgstr_w(helpfile)); - - SysFreeString(name); - SysFreeString(helpfile); - - hres = ICreateTypeLib_CreateTypeInfo(createtl, interface1W, TKIND_INTERFACE, &createti); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (void**)&interface1); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ITypeLib_GetDocumentation(tl, 0, &name, NULL, NULL, NULL); - ok(hres == S_OK, "got %08x\n", hres); - ok(!memcmp(name, interface1W, sizeof(interface1W)), "name = %s\n", wine_dbgstr_w(name)); - - SysFreeString(name); - - ITypeLib_Release(tl); - - name = (BSTR)0xdeadbeef; - helpfile = (BSTR)0xdeadbeef; - hres = ITypeInfo_GetDocumentation(interface1, -1, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got %08x\n", hres); - ok(!memcmp(name, interface1W, sizeof(interface1W)), "name = %s\n", wine_dbgstr_w(name)); - ok(docstring == NULL, "docstring != NULL\n"); - ok(helpcontext == 0, "helpcontext != 0\n"); - ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "helpfile = %s\n", wine_dbgstr_w(helpfile)); - - SysFreeString(name); - SysFreeString(helpfile); - - hres = ITypeInfo_GetDocumentation(interface1, 0, &name, NULL, NULL, NULL); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); - - hres = ITypeInfo_GetRefTypeInfo(interface1, 0, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); - - - hres = ICreateTypeInfo_LayOut(createti); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_AddRefTypeInfo(createti, NULL, &hreftype); - ok(hres == E_INVALIDARG, "got %08x\n", hres); - - hres = ICreateTypeInfo_AddRefTypeInfo(createti, unknown, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); - - hres = ICreateTypeInfo_AddRefTypeInfo(createti, unknown, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - if(hres != S_OK) { - skip("Skipping some tests\n"); - return; - } - - hres = ICreateTypeInfo_AddImplType(createti, 1, hreftype); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); - - hres = ICreateTypeInfo_AddImplType(createti, 0, hreftype); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ITypeInfo_GetRefTypeOfImplType(interface1, 0, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == 3, "hreftype = %d\n", hreftype); - - hres = ITypeInfo_GetRefTypeOfImplType(interface1, -1, &hreftype); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); - - memset(&funcdesc, 0, sizeof(FUNCDESC)); - funcdesc.funckind = FUNC_PUREVIRTUAL; - funcdesc.invkind = INVOKE_PROPERTYGET; - funcdesc.callconv = CC_STDCALL; - funcdesc.elemdescFunc.tdesc.vt = VT_BSTR; - U(funcdesc.elemdescFunc).idldesc.wIDLFlags = IDLFLAG_NONE; - - hres = ICreateTypeInfo_AddFuncDesc(createti, 0, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); - - hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); - - hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_SetFuncHelpContext(createti, 0, 0xabcdefab); - ok(hres == S_OK, "got %08x\n", hres); - - funcdesc.invkind = INVOKE_PROPERTYPUT; - hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc); - ok(hres == TYPE_E_INCONSISTENTPROPFUNCS, "got %08x\n", hres); - - funcdesc.invkind = INVOKE_PROPERTYPUTREF; - hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc); - ok(hres == TYPE_E_INCONSISTENTPROPFUNCS, "got %08x\n", hres); - - elemdesc[0].tdesc.vt = VT_BSTR; - U(elemdesc[0]).idldesc.dwReserved = 0; - U(elemdesc[0]).idldesc.wIDLFlags = IDLFLAG_FIN; - - funcdesc.lprgelemdescParam = elemdesc; - funcdesc.invkind = INVOKE_PROPERTYPUT; - funcdesc.cParams = 1; - funcdesc.elemdescFunc.tdesc.vt = VT_VOID; - - hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_SetFuncHelpContext(createti, 1, 0xabcdefab); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 0, propname, 1); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 1, propname, 1); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 1, propname, 2); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); - - - funcdesc.invkind = INVOKE_PROPERTYPUTREF; - hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_SetFuncHelpContext(createti, 0, 0xabcdefab); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_SetFuncHelpContext(createti, 0, 0x201); - ok(hres == S_OK, "got %08x\n", hres); - - funcdesc.memid = 1; - funcdesc.lprgelemdescParam = NULL; - funcdesc.invkind = INVOKE_FUNC; - funcdesc.cParams = 0; - hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); - - funcdesc.memid = MEMBERID_NIL; - hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); - - elemdesc[0].tdesc.vt = VT_PTR; - U(elemdesc[0].tdesc).lptdesc = &typedesc1; - typedesc1.vt = VT_BSTR; - funcdesc.cParams = 1; - funcdesc.lprgelemdescParam = elemdesc; - hres = ICreateTypeInfo_AddFuncDesc(createti, 4, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); - - U(elemdesc[0].tdesc).lptdesc = &typedesc2; - typedesc2.vt = VT_PTR; - U(typedesc2).lptdesc = &typedesc1; - hres = ICreateTypeInfo_AddFuncDesc(createti, 4, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); - - elemdesc[0].tdesc.vt = VT_INT; - U(elemdesc[0]).paramdesc.wParamFlags = PARAMFLAG_FHASDEFAULT; - U(elemdesc[0]).paramdesc.pparamdescex = ¶mdescex; - V_VT(¶mdescex.varDefaultValue) = VT_INT; - V_INT(¶mdescex.varDefaultValue) = 0x123; - hres = ICreateTypeInfo_AddFuncDesc(createti, 3, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); - - U(elemdesc[0]).idldesc.dwReserved = 0; - U(elemdesc[0]).idldesc.wIDLFlags = IDLFLAG_FIN; - elemdesc[1].tdesc.vt = VT_UI2; - U(elemdesc[1]).paramdesc.wParamFlags = PARAMFLAG_FHASDEFAULT; - U(elemdesc[1]).paramdesc.pparamdescex = ¶mdescex; - V_VT(¶mdescex.varDefaultValue) = VT_UI2; - V_UI2(¶mdescex.varDefaultValue) = 0xffff; - funcdesc.cParams = 2; - hres = ICreateTypeInfo_AddFuncDesc(createti, 3, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); - - U(elemdesc[0]).paramdesc.wParamFlags = PARAMFLAG_FHASDEFAULT; - U(elemdesc[0]).paramdesc.pparamdescex = ¶mdescex; - elemdesc[1].tdesc.vt = VT_INT; - V_VT(¶mdescex.varDefaultValue) = VT_INT; - V_INT(¶mdescex.varDefaultValue) = 0xffffffff; - hres = ICreateTypeInfo_AddFuncDesc(createti, 3, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); - - elemdesc[0].tdesc.vt = VT_BSTR; - elemdesc[1].tdesc.vt = VT_BSTR; - V_VT(¶mdescex.varDefaultValue) = VT_BSTR; - V_BSTR(¶mdescex.varDefaultValue) = SysAllocString(defaultW); - hres = ICreateTypeInfo_AddFuncDesc(createti, 3, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ITypeInfo_GetDocumentation(interface1, 0, &name, &docstring, &helpcontext, &helpfile); - ok(hres == S_OK, "got %08x\n", hres); - ok(name == NULL, "name != NULL\n"); - ok(docstring == NULL, "docstring != NULL\n"); - ok(helpcontext == 0x201, "helpcontext != 0x201\n"); - ok(!memcmp(helpfile, helpfileW, sizeof(helpfileW)), "helpfile = %s\n", wine_dbgstr_w(helpfile)); - - SysFreeString(helpfile); - - hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 1000, NULL, 1); - ok(hres == E_INVALIDARG, "got %08x\n", hres); - - hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 1000, names1, 1); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); - - hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 0, names1, 2); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); - - hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 0, names2, 1); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 0, names1, 1); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ITypeInfo_GetDocumentation(interface1, 0, &name, NULL, NULL, NULL); - ok(hres == S_OK, "got %08x\n", hres); - ok(!memcmp(name, func1W, sizeof(func1W)), "name = %s\n", wine_dbgstr_w(name)); - - SysFreeString(name); - - hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 3, names2, 3); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 3, names1, 3); - ok(hres == TYPE_E_AMBIGUOUSNAME, "got %08x\n", hres); - - ICreateTypeInfo_Release(createti); - - hres = ICreateTypeLib_CreateTypeInfo(createtl, interface1W, TKIND_INTERFACE, &createti); - ok(hres == TYPE_E_NAMECONFLICT, "got %08x\n", hres); - - hres = ICreateTypeLib_CreateTypeInfo(createtl, interface2W, TKIND_INTERFACE, &createti); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (void**)&interface2); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ITypeInfo_GetRefTypeOfImplType(interface2, 0, &hreftype); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); - - hres = ICreateTypeInfo_AddRefTypeInfo(createti, interface1, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ITypeInfo_GetRefTypeInfo(interface2, 0, &ti); - ok(hres == S_OK, "got %08x\n", hres); - ok(ti == interface1, "Received and added interfaces are different\n"); - - ITypeInfo_Release(ti); - - hres = ICreateTypeInfo_AddImplType(createti, 0, hreftype); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ITypeInfo_GetRefTypeOfImplType(interface2, 0, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == 2, "hreftype = %d\n", hreftype); - - hres = ITypeInfo_GetRefTypeOfImplType(interface2, -1, &hreftype); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); - - hres = ICreateTypeInfo_SetImplTypeFlags(createti, 0, IMPLTYPEFLAG_FDEFAULT); - ok(hres == TYPE_E_BADMODULEKIND, "got %08x\n", hres); - - hres = ITypeInfo_GetImplTypeFlags(interface2, 0, &impltypeflags); - ok(hres == S_OK, "got %08x\n", hres); - ok(impltypeflags == 0, "impltypeflags = %x\n", impltypeflags); - - hres = ITypeInfo_GetImplTypeFlags(interface2, 1, &impltypeflags); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); - - funcdesc.oVft = 0xaaac; - hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); - funcdesc.oVft = 0xaaa8; - hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); - funcdesc.oVft = 0; - - ICreateTypeInfo_Release(createti); - - VariantInit(&cust_data); - - hres = ICreateTypeLib_CreateTypeInfo(createtl, interface3W, TKIND_INTERFACE, &createti); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_QueryInterface(createti, &IID_ICreateTypeInfo2, (void**)&createti2); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo2_QueryInterface(createti2, &IID_ITypeInfo2, (void**)&ti2); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ITypeInfo2_GetCustData(ti2, NULL, NULL); - todo_wine - ok(hres == E_INVALIDARG, "got %08x\n", hres); - - hres = ITypeInfo2_GetCustData(ti2, &custguid, NULL); - todo_wine - ok(hres == E_INVALIDARG, "got %08x\n", hres); - - hres = ITypeInfo2_GetCustData(ti2, &custguid, &cust_data); - todo_wine - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo2_SetCustData(createti2, NULL, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); - - hres = ICreateTypeInfo2_SetCustData(createti2, &custguid, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); - - hres = ICreateTypeInfo2_SetCustData(createti2, &custguid, &cust_data); - ok(hres == DISP_E_BADVARTYPE, "got %08x\n", hres); - - V_VT(&cust_data) = VT_UI4; - V_I4(&cust_data) = 0xdeadbeef; - - hres = ICreateTypeInfo2_SetCustData(createti2, &custguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); - - V_I4(&cust_data) = 0; - V_VT(&cust_data) = VT_EMPTY; - - hres = ITypeInfo2_GetCustData(ti2, &custguid, &cust_data); - todo_wine - ok(hres == S_OK, "got %08x\n", hres); - - todo_wine - ok(V_VT(&cust_data) == VT_UI4, "got %d\n", V_VT(&cust_data)); - todo_wine - ok(V_I4(&cust_data) == 0xdeadbeef, "got 0x%08x\n", V_I4(&cust_data)); - - V_VT(&cust_data) = VT_UI4; - V_I4(&cust_data) = 12345678; - - hres = ICreateTypeInfo2_SetCustData(createti2, &custguid, &cust_data); - ok(hres == S_OK, "got %08x\n", hres); - - V_I4(&cust_data) = 0; - V_VT(&cust_data) = VT_EMPTY; - - hres = ITypeInfo2_GetCustData(ti2, &custguid, &cust_data); - todo_wine - ok(hres == S_OK, "got %08x\n", hres); - - todo_wine - ok(V_VT(&cust_data) == VT_UI4, "got %d\n", V_VT(&cust_data)); - todo_wine - ok(V_I4(&cust_data) == 12345678, "got 0x%08x\n", V_I4(&cust_data)); - - ITypeInfo2_Release(ti2); - ICreateTypeInfo2_Release(createti2); - ICreateTypeInfo_Release(createti); - - hres = ICreateTypeLib_CreateTypeInfo(createtl, coclassW, TKIND_COCLASS, &createti); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_AddRefTypeInfo(createti, interface1, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_AddImplType(createti, 0, hreftype); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_AddImplType(createti, 0, hreftype); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); - - hres = ICreateTypeInfo_AddRefTypeInfo(createti, unknown, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_AddImplType(createti, 1, hreftype); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_AddImplType(createti, 1, hreftype); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); - - hres = ICreateTypeInfo_AddImplType(createti, 2, hreftype); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_SetImplTypeFlags(createti, 0, IMPLTYPEFLAG_FDEFAULT); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_SetImplTypeFlags(createti, 1, IMPLTYPEFLAG_FRESTRICTED); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (void**)&ti); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ITypeInfo_GetImplTypeFlags(ti, 0, NULL); - ok(hres == E_INVALIDARG, "got %08x\n", hres); - - hres = ITypeInfo_GetImplTypeFlags(ti, 0, &impltypeflags); - ok(hres == S_OK, "got %08x\n", hres); - ok(impltypeflags == IMPLTYPEFLAG_FDEFAULT, "impltypeflags = %x\n", impltypeflags); - - hres = ITypeInfo_GetImplTypeFlags(ti, 1, &impltypeflags); - ok(hres == S_OK, "got %08x\n", hres); - ok(impltypeflags == IMPLTYPEFLAG_FRESTRICTED, "impltypeflags = %x\n", impltypeflags); - - hres = ITypeInfo_GetImplTypeFlags(ti, 2, &impltypeflags); - ok(hres == S_OK, "got %08x\n", hres); - ok(impltypeflags == 0, "impltypeflags = %x\n", impltypeflags); - - hres = ITypeInfo_GetRefTypeOfImplType(ti, 0, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == 0, "hreftype = %d\n", hreftype); - - hres = ITypeInfo_GetRefTypeOfImplType(ti, 1, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == 1, "hreftype = %d\n", hreftype); - - hres = ITypeInfo_GetRefTypeOfImplType(ti, 2, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == 1, "hreftype = %d\n", hreftype); - - hres = ITypeInfo_GetRefTypeOfImplType(ti, -1, &hreftype); - ok(hres == TYPE_E_ELEMENTNOTFOUND, "got %08x\n", hres); - - ITypeInfo_Release(ti); - - ICreateTypeInfo_Release(createti); - - hres = ICreateTypeLib_CreateTypeInfo(createtl, dualW, TKIND_INTERFACE, &createti); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_SetTypeFlags(createti, TYPEFLAG_FDUAL); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_AddRefTypeInfo(createti, dispatch, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_AddImplType(createti, 0, hreftype); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (void**)&dual); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ITypeInfo_GetTypeAttr(dual, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == 4, "cbSizeInstance = %d\n", typeattr->cbSizeInstance); - ok(typeattr->typekind == 3, "typekind = %d\n", typeattr->typekind); - ok(typeattr->cFuncs == 1, "cFuncs = %d\n", typeattr->cFuncs); - ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); - ok(typeattr->cImplTypes == 1, "cImplTypes = %d\n", typeattr->cImplTypes); - ok(typeattr->cbSizeVft == 32 || broken(typeattr->cbSizeVft == 7 * sizeof(void *) + 4), /* xp64 */ - "cbSizeVft = %d\n", typeattr->cbSizeVft); - ok(typeattr->cbAlignment == 4, "cbAlignment = %d\n", typeattr->cbAlignment); - ok(typeattr->wTypeFlags == (TYPEFLAG_FDISPATCHABLE|TYPEFLAG_FDUAL), "wTypeFlags = %d\n", typeattr->wTypeFlags); - ok(typeattr->wMajorVerNum == 0, "wMajorVerNum = %d\n", typeattr->wMajorVerNum); - ok(typeattr->wMinorVerNum == 0, "wMinorVerNum = %d\n", typeattr->wMinorVerNum); - - ITypeInfo_ReleaseTypeAttr(dual, typeattr); - - hres = ITypeInfo_GetRefTypeOfImplType(dual, -1, &hreftype); - ok(hres == S_OK, "got %08x\n", hres); - ok(hreftype == -2, "got %08x\n", hreftype); - - hres = ITypeInfo_GetRefTypeInfo(dual, -2, &ti); - ok(hres == S_OK, "got %08x\n", hres); - - hres = ITypeInfo_GetTypeAttr(ti, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == 4, "cbSizeInstance = %d\n", typeattr->cbSizeInstance); - ok(typeattr->typekind == 4, "typekind = %d\n", typeattr->typekind); - ok(typeattr->cFuncs == 8, "cFuncs = %d\n", typeattr->cFuncs); - ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); - ok(typeattr->cImplTypes == 1, "cImplTypes = %d\n", typeattr->cImplTypes); - ok(typeattr->cbSizeVft == 7 * sizeof(void *), "cbSizeVft = %d\n", typeattr->cbSizeVft); - ok(typeattr->cbAlignment == 4, "cbAlignment = %d\n", typeattr->cbAlignment); - ok(typeattr->wTypeFlags == (TYPEFLAG_FDISPATCHABLE|TYPEFLAG_FDUAL), "wTypeFlags = %d\n", typeattr->wTypeFlags); - ok(typeattr->wMajorVerNum == 0, "wMajorVerNum = %d\n", typeattr->wMajorVerNum); - ok(typeattr->wMinorVerNum == 0, "wMinorVerNum = %d\n", typeattr->wMinorVerNum); - - ITypeInfo_ReleaseTypeAttr(ti, typeattr); - - ITypeInfo_Release(ti); - - ICreateTypeInfo_Release(createti); - - hres = ITypeInfo_GetTypeAttr(interface1, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == 4, "cbSizeInstance = %d\n", typeattr->cbSizeInstance); - ok(typeattr->typekind == 3, "typekind = %d\n", typeattr->typekind); - ok(typeattr->cFuncs == 11, "cFuncs = %d\n", typeattr->cFuncs); - ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); - ok(typeattr->cImplTypes == 1, "cImplTypes = %d\n", typeattr->cImplTypes); - ok(typeattr->cbSizeVft == 56 || broken(typeattr->cbSizeVft == 3 * sizeof(void *) + 44), /* xp64 */ - "cbSizeVft = %d\n", typeattr->cbSizeVft); - ok(typeattr->cbAlignment == 4, "cbAlignment = %d\n", typeattr->cbAlignment); - ok(typeattr->wTypeFlags == 0, "wTypeFlags = %d\n", typeattr->wTypeFlags); - ok(typeattr->wMajorVerNum == 0, "wMajorVerNum = %d\n", typeattr->wMajorVerNum); - ok(typeattr->wMinorVerNum == 0, "wMinorVerNum = %d\n", typeattr->wMinorVerNum); - - ITypeInfo_ReleaseTypeAttr(interface1, typeattr); - - hres = ITypeInfo_GetTypeAttr(interface2, &typeattr); - ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeInstance == 4, "cbSizeInstance = %d\n", typeattr->cbSizeInstance); - ok(typeattr->typekind == 3, "typekind = %d\n", typeattr->typekind); - ok(typeattr->cFuncs == 2, "cFuncs = %d\n", typeattr->cFuncs); - ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); - ok(typeattr->cImplTypes == 1, "cImplTypes = %d\n", typeattr->cImplTypes); - ok(typeattr->cbSizeVft == 43696, "cbSizeVft = %d\n", typeattr->cbSizeVft); - ok(typeattr->cbAlignment == 4, "cbAlignment = %d\n", typeattr->cbAlignment); - ok(typeattr->wTypeFlags == 0, "wTypeFlags = %d\n", typeattr->wTypeFlags); - ok(typeattr->wMajorVerNum == 0, "wMajorVerNum = %d\n", typeattr->wMajorVerNum); - ok(typeattr->wMinorVerNum == 0, "wMinorVerNum = %d\n", typeattr->wMinorVerNum); - - ITypeInfo_ReleaseTypeAttr(interface2, typeattr); - - hres = ICreateTypeLib2_SaveAllChanges(createtl); - ok(hres == S_OK, "got %08x\n", hres); - - ok(ITypeInfo_Release(interface2)==0, "Object should be freed\n"); - ok(ITypeInfo_Release(interface1)==0, "Object should be freed\n"); - ok(ITypeInfo_Release(dual)==0, "Object should be freed\n"); - ok(ICreateTypeLib2_Release(createtl)==0, "Object should be freed\n"); - - ok(ITypeInfo_Release(dispatch)==0, "Object should be freed\n"); - ok(ITypeInfo_Release(unknown)==0, "Object should be freed\n"); - ok(ITypeLib_Release(stdole)==0, "Object should be freed\n"); - - hres = LoadTypeLibEx(filenameW, REGKIND_NONE, &tl); - ok(hres == S_OK, "got %08x\n", hres); - ok(ITypeLib_Release(tl)==0, "Object should be freed\n"); - - DeleteFileA(filename); -} - -#if 0 /* use this to generate more tests */ - -#define OLE_CHECK(x) { HRESULT hr = x; if (FAILED(hr)) { printf(#x "failed - %x\n", hr); return; } } - -static char *dump_string(LPWSTR wstr) -{ - int size = lstrlenW(wstr)+3; - char *out = CoTaskMemAlloc(size); - WideCharToMultiByte(20127, 0, wstr, -1, out+1, size, NULL, NULL); - out[0] = '\"'; - strcat(out, "\""); - return out; -} - -struct map_entry -{ - DWORD value; - const char *name; -}; - -#define MAP_ENTRY(x) { x, #x } -static const struct map_entry tkind_map[] = { - MAP_ENTRY(TKIND_ENUM), - MAP_ENTRY(TKIND_RECORD), - MAP_ENTRY(TKIND_MODULE), - MAP_ENTRY(TKIND_INTERFACE), - MAP_ENTRY(TKIND_DISPATCH), - MAP_ENTRY(TKIND_COCLASS), - MAP_ENTRY(TKIND_ALIAS), - MAP_ENTRY(TKIND_UNION), - MAP_ENTRY(TKIND_MAX), - {0, NULL} -}; - -static const struct map_entry funckind_map[] = { - MAP_ENTRY(FUNC_VIRTUAL), - MAP_ENTRY(FUNC_PUREVIRTUAL), - MAP_ENTRY(FUNC_NONVIRTUAL), - MAP_ENTRY(FUNC_STATIC), - MAP_ENTRY(FUNC_DISPATCH), - {0, NULL} -}; - -static const struct map_entry invkind_map[] = { - MAP_ENTRY(INVOKE_FUNC), - MAP_ENTRY(INVOKE_PROPERTYGET), - MAP_ENTRY(INVOKE_PROPERTYPUT), - MAP_ENTRY(INVOKE_PROPERTYPUTREF), - {0, NULL} -}; - -#undef MAP_ENTRY - -static const char *map_value(DWORD val, const struct map_entry *map) -{ - static int map_id; - static char bufs[16][256]; - char *buf; - - while (map->name) - { - if (map->value == val) - return map->name; - map++; - } - - buf = bufs[(map_id++)%16]; - sprintf(buf, "0x%x", val); - return buf; -} - -static void test_dump_typelib(const char *name) -{ - WCHAR wszString[260]; - ITypeInfo *info; - ITypeLib *lib; - int count; - int i; - - MultiByteToWideChar(CP_ACP, 0, name, -1, wszString, 260); - OLE_CHECK(LoadTypeLib(wszString, &lib)); - count = ITypeLib_GetTypeInfoCount(lib); - printf("/* interfaces count: %d */\n", count); - for (i = 0; i < count; i++) - { - TYPEATTR *attr; - BSTR name; - int f = 0; - - OLE_CHECK(ITypeLib_GetDocumentation(lib, i, &name, NULL, NULL, NULL)); - printf("{\n" - " %s,\n", dump_string(name)); - SysFreeString(name); - - OLE_CHECK(ITypeLib_GetTypeInfo(lib, i, &info)); - ITypeInfo_GetTypeAttr(info, &attr); - printf(" /*kind*/ %s, /*flags*/ 0x%x, /*align*/ %d, /*size*/ %d,\n" - " /*#vtbl*/ %d, /*#func*/ %d,\n" - " {\n", - map_value(attr->typekind, tkind_map), attr->wTypeFlags, attr->cbAlignment, attr->cbSizeInstance, attr->cbSizeVft, - attr->cFuncs); - ITypeInfo_ReleaseTypeAttr(info, attr); - while (1) - { - FUNCDESC *desc; - BSTR tab[256]; - UINT cNames; - int p; - - if (FAILED(ITypeInfo_GetFuncDesc(info, f, &desc))) - break; - printf(" {\n" - " 0x%x, /*func*/ %s, /*inv*/ %s, /*call*/ 0x%x,\n", - desc->memid, map_value(desc->funckind, funckind_map), map_value(desc->invkind, invkind_map), - desc->callconv); - printf(" /*#param*/ %d, /*#opt*/ %d, /*vtbl*/ %d, /*#scodes*/ %d, /*flags*/ 0x%x,\n", - desc->cParams, desc->cParamsOpt, desc->oVft, desc->cScodes, desc->wFuncFlags); - printf(" {%d, %x}, /* ret */\n", desc->elemdescFunc.tdesc.vt, desc->elemdescFunc.paramdesc.wParamFlags); - printf(" { /* params */\n"); - for (p = 0; p < desc->cParams; p++) - { - ELEMDESC e = desc->lprgelemdescParam[p]; - printf(" {%d, %x},\n", e.tdesc.vt, e.paramdesc.wParamFlags); - } - printf(" {-1, -1}\n"); - printf(" },\n"); - printf(" { /* names */\n"); - OLE_CHECK(ITypeInfo_GetNames(info, desc->memid, tab, 256, &cNames)); - for (p = 0; p < cNames; p++) - { - printf(" %s,\n", dump_string(tab[p])); - SysFreeString(tab[p]); - } - printf(" NULL,\n"); - printf(" },\n"); - printf(" },\n"); - ITypeInfo_ReleaseFuncDesc(info, desc); - f++; - } - printf(" }\n"); - printf("},\n"); - ITypeInfo_Release(info); - } - ITypeLib_Release(lib); -} - -#else - -typedef struct _element_info -{ - VARTYPE vt; - USHORT wParamFlags; -} element_info; - -typedef struct _function_info -{ - MEMBERID memid; - FUNCKIND funckind; - INVOKEKIND invkind; - CALLCONV callconv; - short cParams; - short cParamsOpt; - short vtbl_index; - short cScodes; - WORD wFuncFlags; - element_info ret_type; - element_info params[15]; - LPCSTR names[15]; -} function_info; - -typedef struct _interface_info -{ - LPCSTR name; - TYPEKIND type; - WORD wTypeFlags; - USHORT cbAlignment; - USHORT cbSizeInstance; - USHORT cbSizeVft; - USHORT cFuncs; - function_info funcs[20]; -} interface_info; - -static const interface_info info[] = { -/* interfaces count: 2 */ -{ - "IDualIface", - /*kind*/ TKIND_DISPATCH, /*flags*/ 0x1040, /*align*/ 4, /*size*/ 4, - /*#vtbl*/ 7, /*#func*/ 8, - { - { - 0x60000000, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ 0x4, - /*#param*/ 2, /*#opt*/ 0, /*vtbl*/ 0, /*#scodes*/ 0, /*flags*/ 0x1, - {24, 0}, /* ret */ - { /* params */ - {26, 1}, - {26, 2}, - {-1, -1} - }, - { /* names */ - "QueryInterface", - "riid", - "ppvObj", - NULL, - }, - }, - { - 0x60000001, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ 0x4, - /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 1, /*#scodes*/ 0, /*flags*/ 0x1, - {19, 0}, /* ret */ - { /* params */ - {-1, -1} - }, - { /* names */ - "AddRef", - NULL, - }, - }, - { - 0x60000002, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ 0x4, - /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 2, /*#scodes*/ 0, /*flags*/ 0x1, - {19, 0}, /* ret */ - { /* params */ - {-1, -1} - }, - { /* names */ - "Release", - NULL, - }, - }, - { - 0x60010000, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ 0x4, - /*#param*/ 1, /*#opt*/ 0, /*vtbl*/ 3, /*#scodes*/ 0, /*flags*/ 0x1, - {24, 0}, /* ret */ - { /* params */ - {26, 2}, - {-1, -1} - }, - { /* names */ - "GetTypeInfoCount", - "pctinfo", - NULL, - }, - }, - { - 0x60010001, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ 0x4, - /*#param*/ 3, /*#opt*/ 0, /*vtbl*/ 4, /*#scodes*/ 0, /*flags*/ 0x1, - {24, 0}, /* ret */ - { /* params */ - {23, 1}, - {19, 1}, - {26, 2}, - {-1, -1} - }, - { /* names */ - "GetTypeInfo", - "itinfo", - "lcid", - "pptinfo", - NULL, - }, - }, - { - 0x60010002, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ 0x4, - /*#param*/ 5, /*#opt*/ 0, /*vtbl*/ 5, /*#scodes*/ 0, /*flags*/ 0x1, - {24, 0}, /* ret */ - { /* params */ - {26, 1}, - {26, 1}, - {23, 1}, - {19, 1}, - {26, 2}, - {-1, -1} - }, - { /* names */ - "GetIDsOfNames", - "riid", - "rgszNames", - "cNames", - "lcid", - "rgdispid", - NULL, - }, - }, - { - 0x60010003, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ 0x4, - /*#param*/ 8, /*#opt*/ 0, /*vtbl*/ 6, /*#scodes*/ 0, /*flags*/ 0x1, - {24, 0}, /* ret */ - { /* params */ - {3, 1}, - {26, 1}, - {19, 1}, - {18, 1}, - {26, 1}, - {26, 2}, - {26, 2}, - {26, 2}, - {-1, -1} - }, - { /* names */ - "Invoke", - "dispidMember", - "riid", - "lcid", - "wFlags", - "pdispparams", - "pvarResult", - "pexcepinfo", - "puArgErr", - NULL, - }, - }, - { - 0x60020000, /*func*/ FUNC_DISPATCH, /*inv*/ INVOKE_FUNC, /*call*/ 0x4, - /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 7, /*#scodes*/ 0, /*flags*/ 0x0, - {24, 0}, /* ret */ - { /* params */ - {-1, -1} - }, - { /* names */ - "Test", - NULL, - }, - }, - } -}, -{ - "ISimpleIface", - /*kind*/ TKIND_INTERFACE, /*flags*/ 0x1000, /*align*/ 4, /*size*/ 4, - /*#vtbl*/ 8, /*#func*/ 1, - { - { - 0x60020000, /*func*/ FUNC_PUREVIRTUAL, /*inv*/ INVOKE_FUNC, /*call*/ 0x4, - /*#param*/ 0, /*#opt*/ 0, /*vtbl*/ 7, /*#scodes*/ 0, /*flags*/ 0x0, - {25, 0}, /* ret */ - { /* params */ - {-1, -1} - }, - { /* names */ - "Test", - NULL, - }, - }, - } -}, -}; - -#define check_type(elem, info) { \ - expect_int((elem)->tdesc.vt, (info)->vt); \ - expect_hex(U(*(elem)).paramdesc.wParamFlags, (info)->wParamFlags); \ - } - -static void test_dump_typelib(const char *name) -{ - WCHAR wszName[MAX_PATH]; - ITypeLib *typelib; - int ifcount = sizeof(info)/sizeof(info[0]); - int iface, func; - - MultiByteToWideChar(CP_ACP, 0, name, -1, wszName, MAX_PATH); - ole_check(LoadTypeLibEx(wszName, REGKIND_NONE, &typelib)); - expect_eq(ITypeLib_GetTypeInfoCount(typelib), ifcount, UINT, "%d"); - for (iface = 0; iface < ifcount; iface++) - { - const interface_info *if_info = &info[iface]; - ITypeInfo *typeinfo; - TYPEATTR *typeattr; - BSTR bstrIfName; - - trace("Interface %s\n", if_info->name); - ole_check(ITypeLib_GetTypeInfo(typelib, iface, &typeinfo)); - ole_check(ITypeLib_GetDocumentation(typelib, iface, &bstrIfName, NULL, NULL, NULL)); - expect_wstr_acpval(bstrIfName, if_info->name); - SysFreeString(bstrIfName); - - ole_check(ITypeInfo_GetTypeAttr(typeinfo, &typeattr)); - expect_int(typeattr->typekind, if_info->type); - expect_hex(typeattr->wTypeFlags, if_info->wTypeFlags); - expect_int(typeattr->cbAlignment, if_info->cbAlignment); - expect_int(typeattr->cbSizeInstance, if_info->cbSizeInstance); - expect_int(typeattr->cbSizeVft, if_info->cbSizeVft * sizeof(void*)); - expect_int(typeattr->cFuncs, if_info->cFuncs); - - for (func = 0; func < typeattr->cFuncs; func++) - { - function_info *fn_info = (function_info *)&if_info->funcs[func]; - FUNCDESC *desc; - BSTR namesTab[256]; - UINT cNames; - int i; - - trace("Function %s\n", fn_info->names[0]); - ole_check(ITypeInfo_GetFuncDesc(typeinfo, func, &desc)); - expect_int(desc->memid, fn_info->memid); - expect_int(desc->funckind, fn_info->funckind); - expect_int(desc->invkind, fn_info->invkind); - expect_int(desc->callconv, fn_info->callconv); - expect_int(desc->cParams, fn_info->cParams); - expect_int(desc->cParamsOpt, fn_info->cParamsOpt); - ok( desc->oVft == fn_info->vtbl_index * sizeof(void*) || - broken(desc->oVft == fn_info->vtbl_index * 4), /* xp64 */ - "desc->oVft got %u\n", desc->oVft ); - expect_int(desc->cScodes, fn_info->cScodes); - expect_int(desc->wFuncFlags, fn_info->wFuncFlags); - ole_check(ITypeInfo_GetNames(typeinfo, desc->memid, namesTab, 256, &cNames)); - for (i = 0; i < cNames; i++) - { - expect_wstr_acpval(namesTab[i], fn_info->names[i]); - SysFreeString(namesTab[i]); - } - expect_null(fn_info->names[cNames]); - - check_type(&desc->elemdescFunc, &fn_info->ret_type); - for (i = 0 ; i < desc->cParams; i++) - { - check_type(&desc->lprgelemdescParam[i], &fn_info->params[i]); - } - expect_int(fn_info->params[desc->cParams].vt, (VARTYPE)-1); - - ITypeInfo_ReleaseFuncDesc(typeinfo, desc); - } - - ITypeInfo_ReleaseTypeAttr(typeinfo, typeattr); - ITypeInfo_Release(typeinfo); - } - ITypeLib_Release(typelib); -} - -#endif - -static const char *create_test_typelib(int res_no) -{ - static char filename[MAX_PATH]; - HANDLE file; - HRSRC res; - void *ptr; - DWORD written; - - GetTempFileNameA( ".", "tlb", 0, filename ); - file = CreateFile( filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0 ); - ok( file != INVALID_HANDLE_VALUE, "file creation failed\n" ); - if (file == INVALID_HANDLE_VALUE) return NULL; - res = FindResource( GetModuleHandle(0), MAKEINTRESOURCE(res_no), "TYPELIB" ); - ok( res != 0, "couldn't find resource\n" ); - ptr = LockResource( LoadResource( GetModuleHandle(0), res )); - WriteFile( file, ptr, SizeofResource( GetModuleHandle(0), res ), &written, NULL ); - ok( written == SizeofResource( GetModuleHandle(0), res ), "couldn't write resource\n" ); - CloseHandle( file ); - return filename; -} - -static void test_create_typelib_lcid(LCID lcid) -{ - char filename[MAX_PATH]; - WCHAR name[MAX_PATH]; - HRESULT hr; - ICreateTypeLib2 *tl; - HANDLE file; - DWORD msft_header[5]; /* five is enough for now */ - DWORD read; - - GetTempFileNameA( ".", "tlb", 0, filename ); - MultiByteToWideChar(CP_ACP, 0, filename, -1, name, MAX_PATH); - - hr = CreateTypeLib2(SYS_WIN32, name, &tl); - ok(hr == S_OK, "got %08x\n", hr); - - hr = ICreateTypeLib2_SetLcid(tl, lcid); - ok(hr == S_OK, "got %08x\n", hr); - - hr = ICreateTypeLib2_SaveAllChanges(tl); - ICreateTypeLib2_Release(tl); - - file = CreateFileA( filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0 ); - ok( file != INVALID_HANDLE_VALUE, "file creation failed\n" ); - - ReadFile( file, msft_header, sizeof(msft_header), &read, NULL ); - ok(read == sizeof(msft_header), "read %d\n", read); - CloseHandle( file ); - - ok(msft_header[0] == 0x5446534d, "got %08x\n", msft_header[0]); - ok(msft_header[1] == 0x00010002, "got %08x\n", msft_header[1]); - ok(msft_header[2] == 0xffffffff, "got %08x\n", msft_header[2]); - ok(msft_header[3] == (lcid ? lcid : 0x409), "got %08x (lcid %08x)\n", msft_header[3], lcid); - ok(msft_header[4] == lcid, "got %08x (lcid %08x)\n", msft_header[4], lcid); - - DeleteFileA(filename); -} - -static void test_create_typelibs(void) -{ - test_create_typelib_lcid(LOCALE_SYSTEM_DEFAULT); - test_create_typelib_lcid(LOCALE_USER_DEFAULT); - test_create_typelib_lcid(LOCALE_NEUTRAL); - - test_create_typelib_lcid(0x009); - test_create_typelib_lcid(0x409); - test_create_typelib_lcid(0x809); - - test_create_typelib_lcid(0x007); - test_create_typelib_lcid(0x407); -} - - -static void test_register_typelib(BOOL system_registration) -{ - HRESULT hr; - WCHAR filename[MAX_PATH]; - const char *filenameA; - ITypeLib *typelib; - WCHAR uuidW[40]; - char key_name[MAX_PATH], uuid[40]; - LONG ret, expect_ret; - UINT count, i; - HKEY hkey; - struct - { - TYPEKIND kind; - WORD flags; - } attrs[11] = - { - { TKIND_INTERFACE, 0 }, - { TKIND_INTERFACE, TYPEFLAG_FDISPATCHABLE }, - { TKIND_INTERFACE, TYPEFLAG_FOLEAUTOMATION }, - { TKIND_INTERFACE, TYPEFLAG_FDISPATCHABLE | TYPEFLAG_FOLEAUTOMATION }, - { TKIND_DISPATCH, 0 /* TYPEFLAG_FDUAL - widl clears this flag for non-IDispatch derived interfaces */ }, - { TKIND_DISPATCH, 0 /* TYPEFLAG_FDUAL - widl clears this flag for non-IDispatch derived interfaces */ }, - { TKIND_DISPATCH, TYPEFLAG_FDISPATCHABLE | TYPEFLAG_FDUAL }, - { TKIND_DISPATCH, TYPEFLAG_FDISPATCHABLE | TYPEFLAG_FDUAL }, - { TKIND_DISPATCH, TYPEFLAG_FDISPATCHABLE }, - { TKIND_DISPATCH, TYPEFLAG_FDISPATCHABLE }, - { TKIND_DISPATCH, TYPEFLAG_FDISPATCHABLE } - }; - - trace("Starting %s typelib registration tests\n", - system_registration ? "system" : "user"); - - if (!system_registration && (!pRegisterTypeLibForUser || !pUnRegisterTypeLibForUser)) - { - win_skip("User typelib registration functions are not available\n"); - return; - } - - filenameA = create_test_typelib(3); - MultiByteToWideChar(CP_ACP, 0, filenameA, -1, filename, MAX_PATH); - - hr = LoadTypeLibEx(filename, REGKIND_NONE, &typelib); - ok(SUCCEEDED(hr), "got %08x\n", hr); - - if (system_registration) - hr = RegisterTypeLib(typelib, filename, NULL); - else - hr = pRegisterTypeLibForUser(typelib, filename, NULL); - if (hr == TYPE_E_REGISTRYACCESS) - { - win_skip("Insufficient privileges to register typelib in the registry\n"); - ITypeLib_Release(typelib); - DeleteFileA(filenameA); - return; - } - ok(SUCCEEDED(hr), "got %08x\n", hr); - - count = ITypeLib_GetTypeInfoCount(typelib); - ok(count == 11, "got %d\n", count); - - for(i = 0; i < count; i++) - { - ITypeInfo *typeinfo; - TYPEATTR *attr; - - hr = ITypeLib_GetTypeInfo(typelib, i, &typeinfo); - ok(SUCCEEDED(hr), "got %08x\n", hr); - - hr = ITypeInfo_GetTypeAttr(typeinfo, &attr); - ok(SUCCEEDED(hr), "got %08x\n", hr); - - ok(attr->typekind == attrs[i].kind, "%d: got kind %d\n", i, attr->typekind); - ok(attr->wTypeFlags == attrs[i].flags, "%d: got flags %04x\n", i, attr->wTypeFlags); - - if(attr->typekind == TKIND_DISPATCH && (attr->wTypeFlags & TYPEFLAG_FDUAL)) - { - HREFTYPE reftype; - ITypeInfo *dual_info; - TYPEATTR *dual_attr; - - hr = ITypeInfo_GetRefTypeOfImplType(typeinfo, -1, &reftype); - ok(SUCCEEDED(hr), "got %08x\n", hr); - - hr = ITypeInfo_GetRefTypeInfo(typeinfo, reftype, &dual_info); - ok(SUCCEEDED(hr), "got %08x\n", hr); - - hr = ITypeInfo_GetTypeAttr(dual_info, &dual_attr); - ok(SUCCEEDED(hr), "got %08x\n", hr); - - ok(dual_attr->typekind == TKIND_INTERFACE, "%d: got kind %d\n", i, dual_attr->typekind); - ok(dual_attr->wTypeFlags == (TYPEFLAG_FDISPATCHABLE | TYPEFLAG_FOLEAUTOMATION | TYPEFLAG_FDUAL), "%d: got flags %04x\n", i, dual_attr->wTypeFlags); - - ITypeInfo_ReleaseTypeAttr(dual_info, dual_attr); - ITypeInfo_Release(dual_info); - - } - - StringFromGUID2(&attr->guid, uuidW, sizeof(uuidW) / sizeof(uuidW[0])); - WideCharToMultiByte(CP_ACP, 0, uuidW, -1, uuid, sizeof(uuid), NULL, NULL); - sprintf(key_name, "Interface\\%s", uuid); - - /* All dispinterfaces will be registered (this includes dual interfaces) as well - as oleautomation interfaces */ - if((attr->typekind == TKIND_INTERFACE && (attr->wTypeFlags & TYPEFLAG_FOLEAUTOMATION)) || - attr->typekind == TKIND_DISPATCH) - expect_ret = ERROR_SUCCESS; - else - expect_ret = ERROR_FILE_NOT_FOUND; - - ret = RegOpenKeyExA(HKEY_CLASSES_ROOT, key_name, 0, KEY_READ, &hkey); - ok(ret == expect_ret, "%d: got %d\n", i, ret); - if(ret == ERROR_SUCCESS) RegCloseKey(hkey); - - ITypeInfo_ReleaseTypeAttr(typeinfo, attr); - ITypeInfo_Release(typeinfo); - } - - if (system_registration) - hr = UnRegisterTypeLib(&LIBID_register_test, 1, 0, LOCALE_NEUTRAL, sizeof(void*) == 8 ? SYS_WIN64 : SYS_WIN32); - else - hr = pUnRegisterTypeLibForUser(&LIBID_register_test, 1, 0, LOCALE_NEUTRAL, sizeof(void*) == 8 ? SYS_WIN64 : SYS_WIN32); - ok(SUCCEEDED(hr), "got %08x\n", hr); - - ITypeLib_Release(typelib); - DeleteFileA( filenameA ); -} - -START_TEST(typelib) -{ - const char *filename; - - init_function_pointers(); - - ref_count_test(wszStdOle2); - test_TypeComp(); - test_CreateDispTypeInfo(); - test_TypeInfo(); - test_QueryPathOfRegTypeLib(); - test_inheritance(); - test_CreateTypeLib(); - - if ((filename = create_test_typelib(2))) - { - test_dump_typelib( filename ); - DeleteFile( filename ); - } - - test_register_typelib(TRUE); - test_register_typelib(FALSE); - test_create_typelibs(); - -} diff --git a/rostests/winetests/oleaut32/usrmarshal.c b/rostests/winetests/oleaut32/usrmarshal.c deleted file mode 100644 index 92758374b1e..00000000000 --- a/rostests/winetests/oleaut32/usrmarshal.c +++ /dev/null @@ -1,1515 +0,0 @@ -/* - * Marshaling Tests - * - * 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 - */ - -#define COBJMACROS - -#include - -#include "windef.h" -#include "winbase.h" -#include "objbase.h" -#include "propidl.h" /* for LPSAFEARRAY_User* routines */ - -#include "wine/test.h" - -#if (__STDC__ && !defined(_FORCENAMELESSUNION)) || defined(NONAMELESSUNION) -# define V_U2(A) ((A)->n1.n2) -#else -# define V_U2(A) (*(A)) -#endif - -#define LPSAFEARRAY_UNMARSHAL_WORKS 1 -#define BSTR_UNMARSHAL_WORKS 1 -#define VARIANT_UNMARSHAL_WORKS 1 - -static inline SF_TYPE get_union_type(SAFEARRAY *psa) -{ - VARTYPE vt; - HRESULT hr; - - hr = SafeArrayGetVartype(psa, &vt); - if (FAILED(hr)) - { - if(psa->fFeatures & FADF_VARIANT) return SF_VARIANT; - - switch(psa->cbElements) - { - case 1: vt = VT_I1; break; - case 2: vt = VT_I2; break; - case 4: vt = VT_I4; break; - case 8: vt = VT_I8; break; - default: return 0; - } - } - - if (psa->fFeatures & FADF_HAVEIID) - return SF_HAVEIID; - - switch (vt) - { - case VT_I1: - case VT_UI1: return SF_I1; - case VT_BOOL: - case VT_I2: - case VT_UI2: return SF_I2; - case VT_INT: - case VT_UINT: - case VT_I4: - case VT_UI4: - case VT_R4: return SF_I4; - case VT_DATE: - case VT_CY: - case VT_R8: - case VT_I8: - case VT_UI8: return SF_I8; - case VT_INT_PTR: - case VT_UINT_PTR: return (sizeof(UINT_PTR) == 4 ? SF_I4 : SF_I8); - case VT_BSTR: return SF_BSTR; - case VT_DISPATCH: return SF_DISPATCH; - case VT_VARIANT: return SF_VARIANT; - case VT_UNKNOWN: return SF_UNKNOWN; - /* Note: Return a non-zero size to indicate vt is valid. The actual size - * of a UDT is taken from the result of IRecordInfo_GetSize(). - */ - case VT_RECORD: return SF_RECORD; - default: return SF_ERROR; - } -} - -static ULONG get_cell_count(const SAFEARRAY *psa) -{ - const SAFEARRAYBOUND* psab = psa->rgsabound; - USHORT cCount = psa->cDims; - ULONG ulNumCells = 1; - - while (cCount--) - { - if (!psab->cElements) - return 0; - ulNumCells *= psab->cElements; - psab++; - } - return ulNumCells; -} - -static DWORD elem_wire_size(LPSAFEARRAY lpsa, SF_TYPE sftype) -{ - if (sftype == SF_BSTR) - return sizeof(DWORD); - else - return lpsa->cbElements; -} - -static void check_safearray(void *buffer, LPSAFEARRAY lpsa) -{ - unsigned char *wiresa = buffer; - VARTYPE vt; - SF_TYPE sftype; - ULONG cell_count; - - if(!lpsa) - { - ok(*(DWORD *)wiresa == 0, "wiresa + 0x0 should be NULL instead of 0x%08x\n", *(DWORD *)wiresa); - return; - } - - if(FAILED(SafeArrayGetVartype(lpsa, &vt))) - vt = 0; - - sftype = get_union_type(lpsa); - cell_count = get_cell_count(lpsa); - - ok(*(DWORD *)wiresa, "wiresa + 0x0 should be non-NULL instead of 0x%08x\n", *(DWORD *)wiresa); /* win2k: this is lpsa. winxp: this is 0x00000001 */ - wiresa += sizeof(DWORD); - ok(*(DWORD *)wiresa == lpsa->cDims, "wiresa + 0x4 should be lpsa->cDims instead of 0x%08x\n", *(DWORD *)wiresa); - wiresa += sizeof(DWORD); - ok(*(WORD *)wiresa == lpsa->cDims, "wiresa + 0x8 should be lpsa->cDims instead of 0x%04x\n", *(WORD *)wiresa); - wiresa += sizeof(WORD); - ok(*(WORD *)wiresa == lpsa->fFeatures, "wiresa + 0xa should be lpsa->fFeatures instead of 0x%08x\n", *(WORD *)wiresa); - wiresa += sizeof(WORD); - ok(*(DWORD *)wiresa == elem_wire_size(lpsa, sftype), "wiresa + 0xc should be 0x%08x instead of 0x%08x\n", elem_wire_size(lpsa, sftype), *(DWORD *)wiresa); - wiresa += sizeof(DWORD); - ok(*(WORD *)wiresa == lpsa->cLocks, "wiresa + 0x10 should be lpsa->cLocks instead of 0x%04x\n", *(WORD *)wiresa); - wiresa += sizeof(WORD); - ok(*(WORD *)wiresa == vt, "wiresa + 0x12 should be %04x instead of 0x%04x\n", vt, *(WORD *)wiresa); - wiresa += sizeof(WORD); - ok(*(DWORD *)wiresa == sftype, "wiresa + 0x14 should be %08x instead of 0x%08x\n", (DWORD)sftype, *(DWORD *)wiresa); - wiresa += sizeof(DWORD); - ok(*(DWORD *)wiresa == cell_count, "wiresa + 0x18 should be %u instead of %u\n", cell_count, *(DWORD *)wiresa); - wiresa += sizeof(DWORD); - ok(*(DWORD *)wiresa, "wiresa + 0x1c should be non-zero instead of 0x%08x\n", *(DWORD *)wiresa); - wiresa += sizeof(DWORD); - if(sftype == SF_HAVEIID) - { - GUID guid; - SafeArrayGetIID(lpsa, &guid); - ok(IsEqualGUID(&guid, wiresa), "guid mismatch\n"); - wiresa += sizeof(GUID); - } - ok(!memcmp(wiresa, lpsa->rgsabound, sizeof(lpsa->rgsabound[0]) * lpsa->cDims), "bounds mismatch\n"); - wiresa += sizeof(lpsa->rgsabound[0]) * lpsa->cDims; - - ok(*(DWORD *)wiresa == cell_count, "wiresa + 0x28 should be %u instead of %u\n", cell_count, *(DWORD*)wiresa); - wiresa += sizeof(DWORD); - /* elements are now pointed to by wiresa */ -} - -static void * WINAPI user_allocate(SIZE_T size) -{ - return CoTaskMemAlloc(size); -} - -static void WINAPI user_free(void *p) -{ - CoTaskMemFree(p); -} - -static void init_user_marshal_cb(USER_MARSHAL_CB *umcb, - PMIDL_STUB_MESSAGE stub_msg, - PRPC_MESSAGE rpc_msg, unsigned char *buffer, - unsigned int size, MSHCTX context) -{ - memset(rpc_msg, 0, sizeof(*rpc_msg)); - rpc_msg->Buffer = buffer; - rpc_msg->BufferLength = size; - - memset(stub_msg, 0, sizeof(*stub_msg)); - stub_msg->RpcMsg = rpc_msg; - stub_msg->Buffer = buffer; - stub_msg->pfnAllocate = user_allocate; - stub_msg->pfnFree = user_free; - - memset(umcb, 0, sizeof(*umcb)); - umcb->Flags = MAKELONG(context, NDR_LOCAL_DATA_REPRESENTATION); - umcb->pStubMsg = stub_msg; - umcb->Signature = USER_MARSHAL_CB_SIGNATURE; - umcb->CBType = buffer ? USER_MARSHAL_CB_UNMARSHALL : USER_MARSHAL_CB_BUFFER_SIZE; -} - -static void test_marshal_LPSAFEARRAY(void) -{ - unsigned char *buffer, *next; - ULONG size, expected; - LPSAFEARRAY lpsa; - LPSAFEARRAY lpsa2 = NULL; - SAFEARRAYBOUND sab; - RPC_MESSAGE rpc_msg; - MIDL_STUB_MESSAGE stub_msg; - USER_MARSHAL_CB umcb; - HRESULT hr; - VARTYPE vt; - OLECHAR *values[10]; - int expected_bstr_size; - int i; - LONG indices[1]; - - sab.lLbound = 5; - sab.cElements = 10; - - lpsa = SafeArrayCreate(VT_I2, 1, &sab); - *(DWORD *)lpsa->pvData = 0xcafebabe; - - lpsa->cLocks = 7; - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - size = LPSAFEARRAY_UserSize(&umcb.Flags, 1, &lpsa); - expected = (44 + 1 + sizeof(ULONG) - 1) & ~(sizeof(ULONG) - 1); - expected += sab.cElements * sizeof(USHORT); - ok(size == expected || size == expected + 12, /* win64 */ - "size should be %u bytes, not %u\n", expected, size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); - expected = 44 + sab.cElements * sizeof(USHORT); - ok(size == expected || size == expected + 12, /* win64 */ - "size should be %u bytes, not %u\n", expected, size); - buffer = HeapAlloc(GetProcessHeap(), 0, size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - next = LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); - ok(next - buffer == expected, "Marshaled %u bytes, expected %u\n", (ULONG) (next - buffer), expected); - - check_safearray(buffer, lpsa); - - if (LPSAFEARRAY_UNMARSHAL_WORKS) - { - VARTYPE vt, vt2; - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - LPSAFEARRAY_UserUnmarshal(&umcb.Flags, buffer, &lpsa2); - ok(lpsa2 != NULL, "LPSAFEARRAY didn't unmarshal\n"); - SafeArrayGetVartype(lpsa, &vt); - SafeArrayGetVartype(lpsa2, &vt2); - ok(vt == vt2, "vts differ %x %x\n", vt, vt2); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - LPSAFEARRAY_UserFree(&umcb.Flags, &lpsa2); - } - HeapFree(GetProcessHeap(), 0, buffer); - lpsa->cLocks = 0; - SafeArrayDestroy(lpsa); - - /* test NULL safe array */ - lpsa = NULL; - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); - expected = 4; - ok(size == expected, "size should be 4 bytes, not %d\n", size); - buffer = HeapAlloc(GetProcessHeap(), 0, size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - next = LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); - ok(next - buffer == expected, "Marshaled %u bytes, expected %u\n", (ULONG) (next - buffer), expected); - check_safearray(buffer, lpsa); - - if (LPSAFEARRAY_UNMARSHAL_WORKS) - { - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - LPSAFEARRAY_UserUnmarshal(&umcb.Flags, buffer, &lpsa2); - ok(lpsa2 == NULL, "NULL LPSAFEARRAY didn't unmarshal\n"); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - LPSAFEARRAY_UserFree(&umcb.Flags, &lpsa2); - } - HeapFree(GetProcessHeap(), 0, buffer); - - sab.lLbound = 5; - sab.cElements = 10; - - lpsa = SafeArrayCreate(VT_R8, 1, &sab); - *(double *)lpsa->pvData = 3.1415; - - lpsa->cLocks = 7; - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - size = LPSAFEARRAY_UserSize(&umcb.Flags, 1, &lpsa); - expected = (44 + 1 + (sizeof(double) - 1)) & ~(sizeof(double) - 1); - expected += sab.cElements * sizeof(double); - ok(size == expected || size == expected + 16, /* win64 */ - "size should be %u bytes, not %u\n", expected, size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - expected = (44 + (sizeof(double) - 1)) & ~(sizeof(double) - 1); - expected += sab.cElements * sizeof(double); - size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); - ok(size == expected || size == expected + 8, /* win64 */ - "size should be %u bytes, not %u\n", expected, size); - buffer = HeapAlloc(GetProcessHeap(), 0, size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - next = LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); - ok(next - buffer == expected || broken(next - buffer + sizeof(DWORD) == expected), - "Marshaled %u bytes, expected %u\n", (ULONG) (next - buffer), expected); - - check_safearray(buffer, lpsa); - - HeapFree(GetProcessHeap(), 0, buffer); - lpsa->cLocks = 0; - SafeArrayDestroy(lpsa); - - /* VARTYPE-less arrays can be marshaled if cbElements is 1,2,4 or 8 as type SF_In */ - hr = SafeArrayAllocDescriptor(1, &lpsa); - ok(hr == S_OK, "saad failed %08x\n", hr); - lpsa->cbElements = 8; - lpsa->rgsabound[0].lLbound = 2; - lpsa->rgsabound[0].cElements = 48; - hr = SafeArrayAllocData(lpsa); - ok(hr == S_OK, "saad failed %08x\n", hr); - - hr = SafeArrayGetVartype(lpsa, &vt); - ok(hr == E_INVALIDARG, "ret %08x\n", hr); - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); - expected = (44 + lpsa->cbElements - 1) & ~(lpsa->cbElements - 1); - expected += lpsa->cbElements * lpsa->rgsabound[0].cElements; - ok(size == expected || size == expected + 8, /* win64 */ - "size should be %u bytes, not %u\n", expected, size); - buffer = HeapAlloc(GetProcessHeap(), 0, size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - next = LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); - ok(next - buffer == expected || broken(next - buffer + sizeof(DWORD) == expected), - "Marshaled %u bytes, expected %u\n", (ULONG) (next - buffer), expected); - check_safearray(buffer, lpsa); - HeapFree(GetProcessHeap(), 0, buffer); - SafeArrayDestroyData(lpsa); - SafeArrayDestroyDescriptor(lpsa); - - /* Test an array of VT_BSTR */ - sab.lLbound = 3; - sab.cElements = sizeof(values) / sizeof(values[0]); - - lpsa = SafeArrayCreate(VT_BSTR, 1, &sab); - expected_bstr_size = 0; - for (i = 0; i < sab.cElements; i++) - { - int j; - WCHAR buf[128]; - for (j = 0; j <= i; j++) - buf[j] = 'a' + j; - buf[j] = 0; - indices[0] = i + sab.lLbound; - values[i] = SysAllocString(buf); - hr = SafeArrayPutElement(lpsa, indices, values[i]); - ok(hr == S_OK, "Failed to put bstr element hr 0x%x\n", hr); - expected_bstr_size += (j * sizeof(WCHAR)) + (3 * sizeof(DWORD)); - if (i % 2 == 0) /* Account for DWORD padding. Works so long as cElements is even */ - expected_bstr_size += sizeof(WCHAR); - } - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - size = LPSAFEARRAY_UserSize(&umcb.Flags, 1, &lpsa); - expected = 44 + (sab.cElements * sizeof(DWORD)) + expected_bstr_size; - todo_wine - ok(size == expected + sizeof(DWORD) || size == (expected + sizeof(DWORD) + 12 /* win64 */), - "size should be %u bytes, not %u\n", expected + (ULONG) sizeof(DWORD), size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); - todo_wine - ok(size == expected || size == (expected + 12 /* win64 */), - "size should be %u bytes, not %u\n", expected, size); - buffer = HeapAlloc(GetProcessHeap(), 0, size); - memset(buffer, 0xcc, size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - next = LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); - todo_wine - ok(next - buffer == expected, "Marshaled %u bytes, expected %u\n", (ULONG) (next - buffer), expected); - - check_safearray(buffer, lpsa); - - lpsa2 = NULL; - if (LPSAFEARRAY_UNMARSHAL_WORKS) - { - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - next = LPSAFEARRAY_UserUnmarshal(&umcb.Flags, buffer, &lpsa2); - todo_wine - ok(next - buffer == expected, "Marshaled %u bytes, expected %u\n", (ULONG) (next - buffer), expected); - ok(lpsa2 != NULL, "LPSAFEARRAY didn't unmarshal, result %p\n", next); - } - - for (i = 0; i < sizeof(values) / sizeof(values[0]); i++) - { - BSTR gotvalue = NULL; - - if (lpsa2) - { - indices[0] = i + sab.lLbound; - hr = SafeArrayGetElement(lpsa2, indices, &gotvalue); - ok(hr == S_OK, "Failed to get bstr element at hres 0x%x\n", hr); - if (hr == S_OK) - { - ok(VarBstrCmp(values[i], gotvalue, 0, 0) == VARCMP_EQ, "String %d does not match\n", i); - SysFreeString(gotvalue); - } - } - - SysFreeString(values[i]); - } - - if (LPSAFEARRAY_UNMARSHAL_WORKS) - { - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - LPSAFEARRAY_UserFree(&umcb.Flags, &lpsa2); - } - - HeapFree(GetProcessHeap(), 0, buffer); - SafeArrayDestroy(lpsa); - - - /* VARTYPE-less arrays with FADF_VARIANT */ - hr = SafeArrayAllocDescriptor(1, &lpsa); - ok(hr == S_OK, "saad failed %08x\n", hr); - lpsa->cbElements = sizeof(VARIANT); - lpsa->fFeatures = FADF_VARIANT; - lpsa->rgsabound[0].lLbound = 2; - lpsa->rgsabound[0].cElements = 48; - hr = SafeArrayAllocData(lpsa); - ok(hr == S_OK, "saad failed %08x\n", hr); - - hr = SafeArrayGetVartype(lpsa, &vt); - ok(hr == E_INVALIDARG, "ret %08x\n", hr); - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); - expected = 44 + 28 * lpsa->rgsabound[0].cElements; - todo_wine - ok(size == expected || size == expected + 8, /* win64 */ - "size should be %u bytes, not %u\n", expected, size); - buffer = HeapAlloc(GetProcessHeap(), 0, size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - next = LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); - todo_wine - ok(next - buffer == expected || broken(next - buffer + sizeof(DWORD) == expected), - "Marshaled %u bytes, expected %u\n", (ULONG) (next - buffer), expected); - lpsa->cbElements = 16; /* VARIANT wire size */ - check_safearray(buffer, lpsa); - HeapFree(GetProcessHeap(), 0, buffer); - SafeArrayDestroyData(lpsa); - SafeArrayDestroyDescriptor(lpsa); -} - -static void check_bstr(void *buffer, BSTR b) -{ - DWORD *wireb = buffer; - DWORD len = SysStringByteLen(b); - - ok(*wireb == (len + 1) / 2, "wv[0] %08x\n", *wireb); - wireb++; - if(b) - ok(*wireb == len, "wv[1] %08x\n", *wireb); - else - ok(*wireb == 0xffffffff, "wv[1] %08x\n", *wireb); - wireb++; - ok(*wireb == (len + 1) / 2, "wv[2] %08x\n", *wireb); - if(len) - { - wireb++; - ok(!memcmp(wireb, b, (len + 1) & ~1), "strings differ\n"); - } - return; -} - -static void test_marshal_BSTR(void) -{ - ULONG size; - RPC_MESSAGE rpc_msg; - MIDL_STUB_MESSAGE stub_msg; - USER_MARSHAL_CB umcb; - unsigned char *buffer, *next; - BSTR b, b2; - WCHAR str[] = {'m','a','r','s','h','a','l',' ','t','e','s','t','1',0}; - DWORD len; - - b = SysAllocString(str); - len = SysStringLen(b); - ok(len == 13, "get %d\n", len); - - /* BSTRs are DWORD aligned */ - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - size = BSTR_UserSize(&umcb.Flags, 1, &b); - ok(size == 42, "size %d\n", size); - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - size = BSTR_UserSize(&umcb.Flags, 0, &b); - ok(size == 38, "size %d\n", size); - - buffer = HeapAlloc(GetProcessHeap(), 0, size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - next = BSTR_UserMarshal(&umcb.Flags, buffer, &b); - ok(next == buffer + size, "got %p expect %p\n", next, buffer + size); - check_bstr(buffer, b); - - if (BSTR_UNMARSHAL_WORKS) - { - b2 = NULL; - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - next = BSTR_UserUnmarshal(&umcb.Flags, buffer, &b2); - ok(next == buffer + size, "got %p expect %p\n", next, buffer + size); - ok(b2 != NULL, "BSTR didn't unmarshal\n"); - ok(!memcmp(b, b2, (len + 1) * 2), "strings differ\n"); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - BSTR_UserFree(&umcb.Flags, &b2); - } - - HeapFree(GetProcessHeap(), 0, buffer); - SysFreeString(b); - - b = NULL; - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - size = BSTR_UserSize(&umcb.Flags, 0, &b); - ok(size == 12, "size %d\n", size); - - buffer = HeapAlloc(GetProcessHeap(), 0, size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - next = BSTR_UserMarshal(&umcb.Flags, buffer, &b); - ok(next == buffer + size, "got %p expect %p\n", next, buffer + size); - - check_bstr(buffer, b); - if (BSTR_UNMARSHAL_WORKS) - { - b2 = NULL; - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - next = BSTR_UserUnmarshal(&umcb.Flags, buffer, &b2); - ok(next == buffer + size, "got %p expect %p\n", next, buffer + size); - ok(b2 == NULL, "NULL BSTR didn't unmarshal\n"); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - BSTR_UserFree(&umcb.Flags, &b2); - } - HeapFree(GetProcessHeap(), 0, buffer); - - b = SysAllocStringByteLen("abc", 3); - *(((char*)b) + 3) = 'd'; - len = SysStringLen(b); - ok(len == 1, "get %d\n", len); - len = SysStringByteLen(b); - ok(len == 3, "get %d\n", len); - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - size = BSTR_UserSize(&umcb.Flags, 0, &b); - ok(size == 16, "size %d\n", size); - - buffer = HeapAlloc(GetProcessHeap(), 0, size); - memset(buffer, 0xcc, size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - next = BSTR_UserMarshal(&umcb.Flags, buffer, &b); - ok(next == buffer + size, "got %p expect %p\n", next, buffer + size); - check_bstr(buffer, b); - ok(buffer[15] == 'd', "buffer[15] %02x\n", buffer[15]); - - if (BSTR_UNMARSHAL_WORKS) - { - b2 = NULL; - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - next = BSTR_UserUnmarshal(&umcb.Flags, buffer, &b2); - ok(next == buffer + size, "got %p expect %p\n", next, buffer + size); - ok(b2 != NULL, "BSTR didn't unmarshal\n"); - ok(!memcmp(b, b2, len), "strings differ\n"); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - BSTR_UserFree(&umcb.Flags, &b2); - } - HeapFree(GetProcessHeap(), 0, buffer); - SysFreeString(b); - - b = SysAllocStringByteLen("", 0); - len = SysStringLen(b); - ok(len == 0, "get %d\n", len); - len = SysStringByteLen(b); - ok(len == 0, "get %d\n", len); - - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - size = BSTR_UserSize(&umcb.Flags, 0, &b); - ok(size == 12, "size %d\n", size); - - buffer = HeapAlloc(GetProcessHeap(), 0, size); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - next = BSTR_UserMarshal(&umcb.Flags, buffer, &b); - ok(next == buffer + size, "got %p expect %p\n", next, buffer + size); - check_bstr(buffer, b); - - if (BSTR_UNMARSHAL_WORKS) - { - b2 = NULL; - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, buffer, size, MSHCTX_DIFFERENTMACHINE); - next = BSTR_UserUnmarshal(&umcb.Flags, buffer, &b2); - ok(next == buffer + size, "got %p expect %p\n", next, buffer + size); - ok(b2 != NULL, "NULL LPSAFEARRAY didn't unmarshal\n"); - len = SysStringByteLen(b2); - ok(len == 0, "byte len %d\n", len); - init_user_marshal_cb(&umcb, &stub_msg, &rpc_msg, NULL, 0, MSHCTX_DIFFERENTMACHINE); - BSTR_UserFree(&umcb.Flags, &b2); - } - HeapFree(GetProcessHeap(), 0, buffer); - SysFreeString(b); -} - -typedef struct -{ - const IUnknownVtbl *lpVtbl; - ULONG refs; -} HeapUnknown; - -static HRESULT WINAPI HeapUnknown_QueryInterface(IUnknown *iface, REFIID riid, void **ppv) -{ - if (IsEqualIID(riid, &IID_IUnknown)) - { - IUnknown_AddRef(iface); - *ppv = iface; - return S_OK; - } - *ppv = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI HeapUnknown_AddRef(IUnknown *iface) -{ - HeapUnknown *This = (HeapUnknown *)iface; - return InterlockedIncrement((LONG*)&This->refs); -} - -static ULONG WINAPI HeapUnknown_Release(IUnknown *iface) -{ - HeapUnknown *This = (HeapUnknown *)iface; - ULONG refs = InterlockedDecrement((LONG*)&This->refs); - if (!refs) HeapFree(GetProcessHeap(), 0, This); - return refs; -} - -static const IUnknownVtbl HeapUnknown_Vtbl = -{ - HeapUnknown_QueryInterface, - HeapUnknown_AddRef, - HeapUnknown_Release -}; - -static void check_variant_header(DWORD *wirev, VARIANT *v, ULONG size) -{ - WORD *wp; - DWORD switch_is; - - ok(*wirev == (size + 7) >> 3, "wv[0] %08x, expected %08x\n", *wirev, (size + 7) >> 3); - wirev++; - ok(*wirev == 0, "wv[1] %08x\n", *wirev); - wirev++; - wp = (WORD*)wirev; - ok(*wp == V_VT(v), "vt %04x expected %04x\n", *wp, V_VT(v)); - wp++; - ok(*wp == V_U2(v).wReserved1, "res1 %04x expected %04x\n", *wp, V_U2(v).wReserved1); - wp++; - ok(*wp == V_U2(v).wReserved2, "res2 %04x expected %04x\n", *wp, V_U2(v).wReserved2); - wp++; - ok(*wp == V_U2(v).wReserved3, "res3 %04x expected %04x\n", *wp, V_U2(v).wReserved3); - wp++; - wirev = (DWORD*)wp; - switch_is = V_VT(v); - if(switch_is & VT_ARRAY) - switch_is &= ~VT_TYPEMASK; - ok(*wirev == switch_is, "switch_is %08x expected %08x\n", *wirev, switch_is); -} - -/* Win9x and WinME don't always align as needed. Variants have - * an alignment of 8. - */ -static void *alloc_aligned(SIZE_T size, void **buf) -{ - *buf = HeapAlloc(GetProcessHeap(), 0, size + 7); - return (void *)(((UINT_PTR)*buf + 7) & ~7); -} - -static void test_marshal_VARIANT(void) -{ - VARIANT v, v2; - MIDL_STUB_MESSAGE stubMsg = { 0 }; - RPC_MESSAGE rpcMsg = { 0 }; - USER_MARSHAL_CB umcb = { 0 }; - unsigned char *buffer, *next; - void *oldbuffer; - ULONG ul; - short s; - double d; - DWORD *wirev; - BSTR b; - WCHAR str[] = {'m','a','r','s','h','a','l',' ','t','e','s','t',0}; - SAFEARRAYBOUND sab; - LPSAFEARRAY lpsa; - DECIMAL dec, dec2; - HeapUnknown *heap_unknown; - DWORD expected; - - stubMsg.RpcMsg = &rpcMsg; - - umcb.Flags = MAKELONG(MSHCTX_DIFFERENTMACHINE, NDR_LOCAL_DATA_REPRESENTATION); - umcb.pStubMsg = &stubMsg; - umcb.pReserve = NULL; - umcb.Signature = USER_MARSHAL_CB_SIGNATURE; - umcb.CBType = USER_MARSHAL_CB_UNMARSHALL; - - /*** I1 ***/ - VariantInit(&v); - V_VT(&v) = VT_I1; - V_I1(&v) = 0x12; - - /* check_variant_header tests wReserved[123], so initialize to unique values. - * (Could probably also do this by setting the variant to a known DECIMAL.) - */ - V_U2(&v).wReserved1 = 0x1234; - V_U2(&v).wReserved2 = 0x5678; - V_U2(&v).wReserved3 = 0x9abc; - - /* Variants have an alignment of 8 */ - rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 1, &v); - ok(stubMsg.BufferLength == 29, "size %d\n", stubMsg.BufferLength); - - rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 21, "size %d\n", stubMsg.BufferLength); - - buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); - stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; - next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - wirev = (DWORD*)buffer; - - check_variant_header(wirev, &v, stubMsg.BufferLength); - wirev += 5; - ok(*(char*)wirev == V_I1(&v), "wv[5] %08x\n", *wirev); - if (VARIANT_UNMARSHAL_WORKS) - { - VariantInit(&v2); - stubMsg.Buffer = buffer; - next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - ok(V_VT(&v) == V_VT(&v2), "got vt %d expect %d\n", V_VT(&v), V_VT(&v2)); - ok(V_I1(&v) == V_I1(&v2), "got i1 %x expect %x\n", V_I1(&v), V_I1(&v2)); - - VARIANT_UserFree(&umcb.Flags, &v2); - } - HeapFree(GetProcessHeap(), 0, oldbuffer); - - /*** I2 ***/ - VariantInit(&v); - V_VT(&v) = VT_I2; - V_I2(&v) = 0x1234; - - rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 22, "size %d\n", stubMsg.BufferLength); - - buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); - stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; - next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - wirev = (DWORD*)buffer; - - check_variant_header(wirev, &v, stubMsg.BufferLength); - wirev += 5; - ok(*(short*)wirev == V_I2(&v), "wv[5] %08x\n", *wirev); - if (VARIANT_UNMARSHAL_WORKS) - { - VariantInit(&v2); - stubMsg.Buffer = buffer; - next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - ok(V_VT(&v) == V_VT(&v2), "got vt %d expect %d\n", V_VT(&v), V_VT(&v2)); - ok(V_I2(&v) == V_I2(&v2), "got i2 %x expect %x\n", V_I2(&v), V_I2(&v2)); - - VARIANT_UserFree(&umcb.Flags, &v2); - } - HeapFree(GetProcessHeap(), 0, oldbuffer); - - /*** I2 BYREF ***/ - VariantInit(&v); - V_VT(&v) = VT_I2 | VT_BYREF; - s = 0x1234; - V_I2REF(&v) = &s; - - rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 26, "size %d\n", stubMsg.BufferLength); - - buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); - stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; - next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - wirev = (DWORD*)buffer; - - check_variant_header(wirev, &v, stubMsg.BufferLength); - wirev += 5; - ok(*wirev == 0x4, "wv[5] %08x\n", *wirev); - wirev++; - ok(*(short*)wirev == s, "wv[6] %08x\n", *wirev); - if (VARIANT_UNMARSHAL_WORKS) - { - void *mem; - VariantInit(&v2); - V_VT(&v2) = VT_I2 | VT_BYREF; - V_BYREF(&v2) = mem = CoTaskMemAlloc(sizeof(V_I2(&v2))); - stubMsg.Buffer = buffer; - next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - ok(V_VT(&v) == V_VT(&v2), "got vt %d expect %d\n", V_VT(&v), V_VT(&v2)); - ok(V_BYREF(&v2) == mem, "didn't reuse existing memory\n"); - ok(*V_I2REF(&v) == *V_I2REF(&v2), "got i2 ref %x expect ui4 ref %x\n", *V_I2REF(&v), *V_I2REF(&v2)); - - VARIANT_UserFree(&umcb.Flags, &v2); - } - HeapFree(GetProcessHeap(), 0, oldbuffer); - - /*** I4 ***/ - VariantInit(&v); - V_VT(&v) = VT_I4; - V_I4(&v) = 0x1234; - - rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 24, "size %d\n", stubMsg.BufferLength); - - buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); - stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; - next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - wirev = (DWORD*)buffer; - - check_variant_header(wirev, &v, stubMsg.BufferLength); - wirev += 5; - ok(*wirev == V_I4(&v), "wv[5] %08x\n", *wirev); - - if (VARIANT_UNMARSHAL_WORKS) - { - VariantInit(&v2); - stubMsg.Buffer = buffer; - next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - ok(V_VT(&v) == V_VT(&v2), "got vt %d expect %d\n", V_VT(&v), V_VT(&v2)); - ok(V_I4(&v) == V_I4(&v2), "got i4 %x expect %x\n", V_I4(&v), V_I4(&v2)); - - VARIANT_UserFree(&umcb.Flags, &v2); - } - HeapFree(GetProcessHeap(), 0, oldbuffer); - - /*** UI4 ***/ - VariantInit(&v); - V_VT(&v) = VT_UI4; - V_UI4(&v) = 0x1234; - - rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 24, "size %d\n", stubMsg.BufferLength); - - buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); - stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; - next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - wirev = (DWORD*)buffer; - - check_variant_header(wirev, &v, stubMsg.BufferLength); - wirev += 5; - ok(*wirev == 0x1234, "wv[5] %08x\n", *wirev); - if (VARIANT_UNMARSHAL_WORKS) - { - VariantInit(&v2); - stubMsg.Buffer = buffer; - next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - ok(V_VT(&v) == V_VT(&v2), "got vt %d expect %d\n", V_VT(&v), V_VT(&v2)); - ok(V_UI4(&v) == V_UI4(&v2), "got ui4 %x expect %x\n", V_UI4(&v), V_UI4(&v2)); - - VARIANT_UserFree(&umcb.Flags, &v2); - } - HeapFree(GetProcessHeap(), 0, oldbuffer); - - /*** UI4 BYREF ***/ - VariantInit(&v); - V_VT(&v) = VT_UI4 | VT_BYREF; - ul = 0x1234; - V_UI4REF(&v) = &ul; - - rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 28, "size %d\n", stubMsg.BufferLength); - - buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); - stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; - next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - wirev = (DWORD*)buffer; - - check_variant_header(wirev, &v, stubMsg.BufferLength); - wirev += 5; - ok(*wirev == 0x4, "wv[5] %08x\n", *wirev); - wirev++; - ok(*wirev == ul, "wv[6] %08x\n", *wirev); - - if (VARIANT_UNMARSHAL_WORKS) - { - VariantInit(&v2); - stubMsg.Buffer = buffer; - next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - ok(V_VT(&v) == V_VT(&v2), "got vt %d expect %d\n", V_VT(&v), V_VT(&v2)); - ok(*V_UI4REF(&v) == *V_UI4REF(&v2), "got ui4 ref %x expect ui4 ref %x\n", *V_UI4REF(&v), *V_UI4REF(&v2)); - - VARIANT_UserFree(&umcb.Flags, &v2); - } - HeapFree(GetProcessHeap(), 0, oldbuffer); - - /*** R4 ***/ - VariantInit(&v); - V_VT(&v) = VT_R4; - V_R8(&v) = 3.1415; - - rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 24, "size %d\n", stubMsg.BufferLength); - - buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); - stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; - next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - wirev = (DWORD*)buffer; - - check_variant_header(wirev, &v, stubMsg.BufferLength); - wirev += 5; - ok(*(float*)wirev == V_R4(&v), "wv[5] %08x\n", *wirev); - if (VARIANT_UNMARSHAL_WORKS) - { - VariantInit(&v2); - stubMsg.Buffer = buffer; - next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - ok(V_VT(&v) == V_VT(&v2), "got vt %d expect %d\n", V_VT(&v), V_VT(&v2)); - ok(V_R4(&v) == V_R4(&v2), "got r4 %f expect %f\n", V_R4(&v), V_R4(&v2)); - - VARIANT_UserFree(&umcb.Flags, &v2); - } - HeapFree(GetProcessHeap(), 0, oldbuffer); - - /*** R8 ***/ - VariantInit(&v); - V_VT(&v) = VT_R8; - V_R8(&v) = 3.1415; - - rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 32, "size %d\n", stubMsg.BufferLength); - - buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); - stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; - memset(buffer, 0xcc, stubMsg.BufferLength); - next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - wirev = (DWORD*)buffer; - - check_variant_header(wirev, &v, stubMsg.BufferLength); - wirev += 5; - ok(*wirev == 0xcccccccc, "wv[5] %08x\n", *wirev); /* pad */ - wirev++; - ok(*(double*)wirev == V_R8(&v), "wv[6] %08x, wv[7] %08x\n", *wirev, *(wirev+1)); - if (VARIANT_UNMARSHAL_WORKS) - { - VariantInit(&v2); - stubMsg.Buffer = buffer; - next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - ok(V_VT(&v) == V_VT(&v2), "got vt %d expect %d\n", V_VT(&v), V_VT(&v2)); - ok(V_R8(&v) == V_R8(&v2), "got r8 %f expect %f\n", V_R8(&v), V_R8(&v2)); - - VARIANT_UserFree(&umcb.Flags, &v2); - } - HeapFree(GetProcessHeap(), 0, oldbuffer); - - /*** R8 BYREF ***/ - VariantInit(&v); - V_VT(&v) = VT_R8 | VT_BYREF; - d = 3.1415; - V_R8REF(&v) = &d; - - rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 32, "size %d\n", stubMsg.BufferLength); - - buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); - stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; - next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - wirev = (DWORD*)buffer; - - check_variant_header(wirev, &v, stubMsg.BufferLength); - wirev += 5; - ok(*wirev == 8, "wv[5] %08x\n", *wirev); - wirev++; - ok(*(double*)wirev == d, "wv[6] %08x wv[7] %08x\n", *wirev, *(wirev+1)); - if (VARIANT_UNMARSHAL_WORKS) - { - VariantInit(&v2); - stubMsg.Buffer = buffer; - next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - ok(V_VT(&v) == V_VT(&v2), "got vt %d expect %d\n", V_VT(&v), V_VT(&v2)); - ok(*V_R8REF(&v) == *V_R8REF(&v2), "got r8 ref %f expect %f\n", *V_R8REF(&v), *V_R8REF(&v2)); - - VARIANT_UserFree(&umcb.Flags, &v2); - } - HeapFree(GetProcessHeap(), 0, oldbuffer); - - /*** VARIANT_BOOL ***/ - VariantInit(&v); - V_VT(&v) = VT_BOOL; - V_BOOL(&v) = 0x1234; - - rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 22, "size %d\n", stubMsg.BufferLength); - - buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); - stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; - next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - wirev = (DWORD*)buffer; - - check_variant_header(wirev, &v, stubMsg.BufferLength); - wirev += 5; - ok(*(short*)wirev == V_BOOL(&v), "wv[5] %04x\n", *(WORD*)wirev); - if (VARIANT_UNMARSHAL_WORKS) - { - VariantInit(&v2); - stubMsg.Buffer = buffer; - next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - ok(V_VT(&v) == V_VT(&v2), "got vt %d expect %d\n", V_VT(&v), V_VT(&v2)); - ok(V_BOOL(&v) == V_BOOL(&v2), "got bool %x expect %x\n", V_BOOL(&v), V_BOOL(&v2)); - - VARIANT_UserFree(&umcb.Flags, &v2); - } - HeapFree(GetProcessHeap(), 0, oldbuffer); - - /*** DECIMAL ***/ - VarDecFromI4(0x12345678, &dec); - dec.wReserved = 0xfedc; /* Also initialize reserved field, as we check it later */ - VariantInit(&v); - V_DECIMAL(&v) = dec; - V_VT(&v) = VT_DECIMAL; - - rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 40, "size %d\n", stubMsg.BufferLength); - - buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); - stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; - memset(buffer, 0xcc, stubMsg.BufferLength); - next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - wirev = (DWORD*)buffer; - - check_variant_header(wirev, &v, stubMsg.BufferLength); - wirev += 5; - ok(*wirev == 0xcccccccc, "wirev[5] %08x\n", *wirev); /* pad */ - wirev++; - dec2 = dec; - dec2.wReserved = VT_DECIMAL; - ok(!memcmp(wirev, &dec2, sizeof(dec2)), "wirev[6] %08x wirev[7] %08x wirev[8] %08x wirev[9] %08x\n", - *wirev, *(wirev + 1), *(wirev + 2), *(wirev + 3)); - if (VARIANT_UNMARSHAL_WORKS) - { - VariantInit(&v2); - stubMsg.Buffer = buffer; - next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - ok(V_VT(&v) == V_VT(&v2), "got vt %d expect %d\n", V_VT(&v), V_VT(&v2)); - ok(!memcmp(&V_DECIMAL(&v), & V_DECIMAL(&v2), sizeof(DECIMAL)), "decimals differ\n"); - - VARIANT_UserFree(&umcb.Flags, &v2); - } - HeapFree(GetProcessHeap(), 0, oldbuffer); - - /*** DECIMAL BYREF ***/ - VariantInit(&v); - V_VT(&v) = VT_DECIMAL | VT_BYREF; - V_DECIMALREF(&v) = &dec; - - rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 40, "size %d\n", stubMsg.BufferLength); - - buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); - stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; - next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - wirev = (DWORD*)buffer; - - check_variant_header(wirev, &v, stubMsg.BufferLength); - wirev += 5; - ok(*wirev == 16, "wv[5] %08x\n", *wirev); - wirev++; - ok(!memcmp(wirev, &dec, sizeof(dec)), "wirev[6] %08x wirev[7] %08x wirev[8] %08x wirev[9] %08x\n", *wirev, *(wirev + 1), *(wirev + 2), *(wirev + 3)); - if (VARIANT_UNMARSHAL_WORKS) - { - VariantInit(&v2); - /* check_variant_header tests wReserved[123], so initialize to unique values. - * (Could probably also do this by setting the variant to a known DECIMAL.) - */ - V_U2(&v2).wReserved1 = 0x0123; - V_U2(&v2).wReserved2 = 0x4567; - V_U2(&v2).wReserved3 = 0x89ab; - - stubMsg.Buffer = buffer; - next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - ok(V_VT(&v) == V_VT(&v2), "got vt %d expect %d\n", V_VT(&v), V_VT(&v2)); - ok(!memcmp(V_DECIMALREF(&v), V_DECIMALREF(&v2), sizeof(DECIMAL)), "decimals differ\n"); - - VARIANT_UserFree(&umcb.Flags, &v2); - } - HeapFree(GetProcessHeap(), 0, oldbuffer); - - /*** EMPTY ***/ - VariantInit(&v); - V_VT(&v) = VT_EMPTY; - - rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 20, "size %d\n", stubMsg.BufferLength); - - buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); - stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; - next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - wirev = (DWORD*)buffer; - - check_variant_header(wirev, &v, stubMsg.BufferLength); - if (VARIANT_UNMARSHAL_WORKS) - { - VariantInit(&v2); - stubMsg.Buffer = buffer; - next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - ok(V_VT(&v) == V_VT(&v2), "got vt %d expect %d\n", V_VT(&v), V_VT(&v2)); - - VARIANT_UserFree(&umcb.Flags, &v2); - } - HeapFree(GetProcessHeap(), 0, oldbuffer); - - /*** NULL ***/ - VariantInit(&v); - V_VT(&v) = VT_NULL; - - rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 20, "size %d\n", stubMsg.BufferLength); - - buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); - stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; - next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - wirev = (DWORD*)buffer; - - check_variant_header(wirev, &v, stubMsg.BufferLength); - if (VARIANT_UNMARSHAL_WORKS) - { - VariantInit(&v2); - stubMsg.Buffer = buffer; - next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - ok(V_VT(&v) == V_VT(&v2), "got vt %d expect %d\n", V_VT(&v), V_VT(&v2)); - - VARIANT_UserFree(&umcb.Flags, &v2); - } - HeapFree(GetProcessHeap(), 0, oldbuffer); - - /*** BSTR ***/ - b = SysAllocString(str); - VariantInit(&v); - V_VT(&v) = VT_BSTR; - V_BSTR(&v) = b; - - rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 60, "size %d\n", stubMsg.BufferLength); - buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); - stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; - next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - wirev = (DWORD*)buffer; - - check_variant_header(wirev, &v, stubMsg.BufferLength); - wirev += 5; - ok(*wirev, "wv[5] %08x\n", *wirev); /* win2k: this is b. winxp: this is (char*)b + 1 */ - wirev++; - check_bstr(wirev, V_BSTR(&v)); - if (VARIANT_UNMARSHAL_WORKS) - { - VariantInit(&v2); - stubMsg.Buffer = buffer; - next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - ok(V_VT(&v) == V_VT(&v2), "got vt %d expect %d\n", V_VT(&v), V_VT(&v2)); - ok(SysStringByteLen(V_BSTR(&v)) == SysStringByteLen(V_BSTR(&v2)), "bstr string lens differ\n"); - ok(!memcmp(V_BSTR(&v), V_BSTR(&v2), SysStringByteLen(V_BSTR(&v))), "bstrs differ\n"); - - VARIANT_UserFree(&umcb.Flags, &v2); - } - HeapFree(GetProcessHeap(), 0, oldbuffer); - - /*** BSTR BYREF ***/ - VariantInit(&v); - V_VT(&v) = VT_BSTR | VT_BYREF; - V_BSTRREF(&v) = &b; - - rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 64, "size %d\n", stubMsg.BufferLength); - buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); - stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; - next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - wirev = (DWORD*)buffer; - - check_variant_header(wirev, &v, stubMsg.BufferLength); - wirev += 5; - ok(*wirev == 0x4, "wv[5] %08x\n", *wirev); - wirev++; - ok(*wirev, "wv[6] %08x\n", *wirev); /* win2k: this is b. winxp: this is (char*)b + 1 */ - wirev++; - check_bstr(wirev, b); - if (VARIANT_UNMARSHAL_WORKS) - { - VariantInit(&v2); - stubMsg.Buffer = buffer; - next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - ok(V_VT(&v) == V_VT(&v2), "got vt %d expect %d\n", V_VT(&v), V_VT(&v2)); - ok(SysStringByteLen(*V_BSTRREF(&v)) == SysStringByteLen(*V_BSTRREF(&v2)), "bstr string lens differ\n"); - ok(!memcmp(*V_BSTRREF(&v), *V_BSTRREF(&v2), SysStringByteLen(*V_BSTRREF(&v))), "bstrs differ\n"); - - VARIANT_UserFree(&umcb.Flags, &v2); - } - HeapFree(GetProcessHeap(), 0, oldbuffer); - SysFreeString(b); - - /*** ARRAY ***/ - sab.lLbound = 5; - sab.cElements = 10; - - lpsa = SafeArrayCreate(VT_R8, 1, &sab); - *(DWORD *)lpsa->pvData = 0xcafebabe; - *((DWORD *)lpsa->pvData + 1) = 0xdeadbeef; - - VariantInit(&v); - V_VT(&v) = VT_UI4 | VT_ARRAY; - V_ARRAY(&v) = lpsa; - - rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - expected = 152; - ok(stubMsg.BufferLength == expected || stubMsg.BufferLength == expected + 8, /* win64 */ - "size %u instead of %u\n", stubMsg.BufferLength, expected); - buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); - stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; - next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); - ok(next == buffer + expected, "got %p expect %p\n", next, buffer + expected); - wirev = (DWORD*)buffer; - - check_variant_header(wirev, &v, expected); - wirev += 5; - ok(*wirev, "wv[5] %08x\n", *wirev); /* win2k: this is lpsa. winxp: this is (char*)lpsa + 1 */ - wirev++; - check_safearray(wirev, lpsa); - if (VARIANT_UNMARSHAL_WORKS) - { - LONG bound, bound2; - VARTYPE vt, vt2; - VariantInit(&v2); - stubMsg.Buffer = buffer; - next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); - ok(next == buffer + expected, "got %p expect %p\n", next, buffer + expected); - ok(V_VT(&v) == V_VT(&v2), "got vt %d expect %d\n", V_VT(&v), V_VT(&v2)); - ok(SafeArrayGetDim(V_ARRAY(&v)) == SafeArrayGetDim(V_ARRAY(&v)), "array dims differ\n"); - SafeArrayGetLBound(V_ARRAY(&v), 1, &bound); - SafeArrayGetLBound(V_ARRAY(&v2), 1, &bound2); - ok(bound == bound2, "array lbounds differ\n"); - SafeArrayGetUBound(V_ARRAY(&v), 1, &bound); - SafeArrayGetUBound(V_ARRAY(&v2), 1, &bound2); - ok(bound == bound2, "array ubounds differ\n"); - SafeArrayGetVartype(V_ARRAY(&v), &vt); - SafeArrayGetVartype(V_ARRAY(&v2), &vt2); - ok(vt == vt2, "array vts differ %x %x\n", vt, vt2); - VARIANT_UserFree(&umcb.Flags, &v2); - } - HeapFree(GetProcessHeap(), 0, oldbuffer); - - /*** ARRAY BYREF ***/ - VariantInit(&v); - V_VT(&v) = VT_UI4 | VT_ARRAY | VT_BYREF; - V_ARRAYREF(&v) = &lpsa; - - rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - expected = 152; - ok(stubMsg.BufferLength == expected || stubMsg.BufferLength == expected + 16, /* win64 */ - "size %u instead of %u\n", stubMsg.BufferLength, expected); - buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); - stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; - next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); - ok(next == buffer + expected, "got %p expect %p\n", next, buffer + expected); - wirev = (DWORD*)buffer; - - check_variant_header(wirev, &v, expected); - wirev += 5; - ok(*wirev == 4, "wv[5] %08x\n", *wirev); - wirev++; - ok(*wirev, "wv[6] %08x\n", *wirev); /* win2k: this is lpsa. winxp: this is (char*)lpsa + 1 */ - wirev++; - check_safearray(wirev, lpsa); - if (VARIANT_UNMARSHAL_WORKS) - { - LONG bound, bound2; - VARTYPE vt, vt2; - VariantInit(&v2); - stubMsg.Buffer = buffer; - next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); - ok(next == buffer + expected, "got %p expect %p\n", next, buffer + expected); - ok(V_VT(&v) == V_VT(&v2), "got vt %d expect %d\n", V_VT(&v), V_VT(&v2)); - ok(SafeArrayGetDim(*V_ARRAYREF(&v)) == SafeArrayGetDim(*V_ARRAYREF(&v)), "array dims differ\n"); - SafeArrayGetLBound(*V_ARRAYREF(&v), 1, &bound); - SafeArrayGetLBound(*V_ARRAYREF(&v2), 1, &bound2); - ok(bound == bound2, "array lbounds differ\n"); - SafeArrayGetUBound(*V_ARRAYREF(&v), 1, &bound); - SafeArrayGetUBound(*V_ARRAYREF(&v2), 1, &bound2); - ok(bound == bound2, "array ubounds differ\n"); - SafeArrayGetVartype(*V_ARRAYREF(&v), &vt); - SafeArrayGetVartype(*V_ARRAYREF(&v2), &vt2); - ok(vt == vt2, "array vts differ %x %x\n", vt, vt2); - VARIANT_UserFree(&umcb.Flags, &v2); - } - HeapFree(GetProcessHeap(), 0, oldbuffer); - SafeArrayDestroy(lpsa); - - /*** VARIANT BYREF ***/ - VariantInit(&v); - VariantInit(&v2); - V_VT(&v2) = VT_R8; - V_R8(&v2) = 3.1415; - V_VT(&v) = VT_VARIANT | VT_BYREF; - V_VARIANTREF(&v) = &v2; - - rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength == 64, "size %d\n", stubMsg.BufferLength); - buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); - stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; - memset(buffer, 0xcc, stubMsg.BufferLength); - next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - wirev = (DWORD*)buffer; - check_variant_header(wirev, &v, stubMsg.BufferLength); - wirev += 5; - - ok(*wirev == sizeof(VARIANT), "wv[5] %08x\n", *wirev); - wirev++; - ok(*wirev == ('U' | 's' << 8 | 'e' << 16 | 'r' << 24), "wv[6] %08x\n", *wirev); /* 'User' */ - wirev++; - ok(*wirev == 0xcccccccc, "wv[7] %08x\n", *wirev); /* pad */ - wirev++; - check_variant_header(wirev, &v2, stubMsg.BufferLength - 32); - wirev += 5; - ok(*wirev == 0xcccccccc, "wv[13] %08x\n", *wirev); /* pad for VT_R8 */ - wirev++; - ok(*(double*)wirev == V_R8(&v2), "wv[6] %08x wv[7] %08x\n", *wirev, *(wirev+1)); - if (VARIANT_UNMARSHAL_WORKS) - { - VARIANT v3; - VariantInit(&v3); - stubMsg.Buffer = buffer; - next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v3); - ok(next == buffer + stubMsg.BufferLength, "got %p expect %p\n", next, buffer + stubMsg.BufferLength); - ok(V_VT(&v) == V_VT(&v3), "got vt %d expect %d\n", V_VT(&v), V_VT(&v3)); - ok(V_VT(V_VARIANTREF(&v)) == V_VT(V_VARIANTREF(&v3)), "vts differ %x %x\n", - V_VT(V_VARIANTREF(&v)), V_VT(V_VARIANTREF(&v3))); - ok(V_R8(V_VARIANTREF(&v)) == V_R8(V_VARIANTREF(&v3)), "r8s differ\n"); - VARIANT_UserFree(&umcb.Flags, &v3); - } - HeapFree(GetProcessHeap(), 0, oldbuffer); - - /*** UNKNOWN ***/ - heap_unknown = HeapAlloc(GetProcessHeap(), 0, sizeof(*heap_unknown)); - heap_unknown->lpVtbl = &HeapUnknown_Vtbl; - heap_unknown->refs = 1; - VariantInit(&v); - VariantInit(&v2); - V_VT(&v) = VT_UNKNOWN; - V_UNKNOWN(&v) = (IUnknown *)heap_unknown; - - rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength > 32, "size %d\n", stubMsg.BufferLength); - buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); - stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; - memset(buffer, 0xcc, stubMsg.BufferLength); - next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); - wirev = (DWORD*)buffer; - check_variant_header(wirev, &v, next - buffer); - wirev += 5; - - todo_wine - ok(*wirev == (DWORD_PTR)V_UNKNOWN(&v) /* Win9x */ || - *wirev == (DWORD_PTR)V_UNKNOWN(&v) + 1 /* NT */, "wv[5] %08x\n", *wirev); - wirev++; - todo_wine - ok(*wirev == next - buffer - 0x20, "wv[6] %08x\n", *wirev); - wirev++; - todo_wine - ok(*wirev == next - buffer - 0x20, "wv[7] %08x\n", *wirev); - wirev++; - todo_wine - ok(*wirev == 0x574f454d, "wv[8] %08x\n", *wirev); - if (VARIANT_UNMARSHAL_WORKS) - { - VARIANT v3; - VariantInit(&v3); - V_VT(&v3) = VT_UNKNOWN; - V_UNKNOWN(&v3) = (IUnknown *)heap_unknown; - IUnknown_AddRef(V_UNKNOWN(&v3)); - stubMsg.Buffer = buffer; - next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v3); - ok(V_VT(&v) == V_VT(&v3), "got vt %d expect %d\n", V_VT(&v), V_VT(&v3)); - ok(V_UNKNOWN(&v) == V_UNKNOWN(&v3), "got %p expect %p\n", V_UNKNOWN(&v), V_UNKNOWN(&v3)); - VARIANT_UserFree(&umcb.Flags, &v3); - ok(heap_unknown->refs == 1, "%d refcounts of IUnknown leaked\n", heap_unknown->refs - 1); - IUnknown_Release((IUnknown *)heap_unknown); - } - HeapFree(GetProcessHeap(), 0, oldbuffer); - - /*** NULL UNKNOWN ***/ - VariantInit(&v); - V_VT(&v) = VT_UNKNOWN; - V_UNKNOWN(&v) = NULL; - - rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength >= 24, "size %d\n", stubMsg.BufferLength); - buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); - stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; - memset(buffer, 0xcc, stubMsg.BufferLength); - next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); - wirev = (DWORD*)buffer; - check_variant_header(wirev, &v, next - buffer); - wirev += 5; - ok(*wirev == 0, "wv[5] %08x\n", *wirev); - - VariantInit(&v2); - stubMsg.Buffer = buffer; - next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v2); - ok(V_VT(&v) == V_VT(&v2), "got vt %d expect %d\n", V_VT(&v), V_VT(&v2)); - ok(V_UNKNOWN(&v2) == NULL, "got %p expect NULL\n", V_UNKNOWN(&v2)); - VARIANT_UserFree(&umcb.Flags, &v2); - HeapFree(GetProcessHeap(), 0, oldbuffer); - - /*** UNKNOWN BYREF ***/ - heap_unknown = HeapAlloc(GetProcessHeap(), 0, sizeof(*heap_unknown)); - heap_unknown->lpVtbl = &HeapUnknown_Vtbl; - heap_unknown->refs = 1; - VariantInit(&v); - VariantInit(&v2); - V_VT(&v) = VT_UNKNOWN | VT_BYREF; - V_UNKNOWNREF(&v) = (IUnknown **)&heap_unknown; - - rpcMsg.BufferLength = stubMsg.BufferLength = VARIANT_UserSize(&umcb.Flags, 0, &v); - ok(stubMsg.BufferLength > 36, "size %d\n", stubMsg.BufferLength); - buffer = rpcMsg.Buffer = stubMsg.Buffer = stubMsg.BufferStart = alloc_aligned(stubMsg.BufferLength, &oldbuffer); - stubMsg.BufferEnd = stubMsg.Buffer + stubMsg.BufferLength; - memset(buffer, 0xcc, stubMsg.BufferLength); - next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v); - wirev = (DWORD*)buffer; - check_variant_header(wirev, &v, next - buffer); - wirev += 5; - - ok(*wirev == 4, "wv[5] %08x\n", *wirev); - wirev++; - todo_wine - ok(*wirev == (DWORD_PTR)heap_unknown /* Win9x, Win2000 */ || - *wirev == (DWORD_PTR)heap_unknown + 1 /* XP */, "wv[6] %08x\n", *wirev); - wirev++; - todo_wine - ok(*wirev == next - buffer - 0x24, "wv[7] %08x\n", *wirev); - wirev++; - todo_wine - ok(*wirev == next - buffer - 0x24, "wv[8] %08x\n", *wirev); - wirev++; - todo_wine - ok(*wirev == 0x574f454d, "wv[9] %08x\n", *wirev); - if (VARIANT_UNMARSHAL_WORKS) - { - VARIANT v3; - VariantInit(&v3); - V_VT(&v3) = VT_UNKNOWN; - V_UNKNOWN(&v3) = (IUnknown *)heap_unknown; - IUnknown_AddRef(V_UNKNOWN(&v3)); - stubMsg.Buffer = buffer; - next = VARIANT_UserUnmarshal(&umcb.Flags, buffer, &v3); - ok(V_VT(&v) == V_VT(&v3), "got vt %d expect %d\n", V_VT(&v), V_VT(&v3)); - ok(*V_UNKNOWNREF(&v) == *V_UNKNOWNREF(&v3), "got %p expect %p\n", *V_UNKNOWNREF(&v), *V_UNKNOWNREF(&v3)); - VARIANT_UserFree(&umcb.Flags, &v3); - ok(heap_unknown->refs == 1, "%d refcounts of IUnknown leaked\n", heap_unknown->refs - 1); - IUnknown_Release((IUnknown *)heap_unknown); - } - HeapFree(GetProcessHeap(), 0, oldbuffer); -} - - -START_TEST(usrmarshal) -{ - CoInitialize(NULL); - - test_marshal_LPSAFEARRAY(); - test_marshal_BSTR(); - test_marshal_VARIANT(); - - CoUninitialize(); -} diff --git a/rostests/winetests/oleaut32/varformat.c b/rostests/winetests/oleaut32/varformat.c deleted file mode 100644 index 2d4ef62b46a..00000000000 --- a/rostests/winetests/oleaut32/varformat.c +++ /dev/null @@ -1,541 +0,0 @@ -/* - * VARFORMAT test program - * - * Copyright 1998 Jean-Claude Cote - * Copyright 2006 Google (Benjamin Arai) - * - * 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 "windef.h" -#include "winbase.h" -#include "winsock.h" -#include "wine/test.h" -#include "winuser.h" -#include "wingdi.h" -#include "winnls.h" -#include "winerror.h" -#include "winnt.h" - -#include "wtypes.h" -#include "oleauto.h" - -static HMODULE hOleaut32; - -static HRESULT (WINAPI *pVarFormatNumber)(LPVARIANT,int,int,int,int,ULONG,BSTR*); -static HRESULT (WINAPI *pVarFormat)(LPVARIANT,LPOLESTR,int,int,ULONG,BSTR*); -static HRESULT (WINAPI *pVarWeekdayName)(int,int,int,ULONG,BSTR*); - -/* Have I8/UI8 data type? */ -#define HAVE_OLEAUT32_I8 HAVE_FUNC(VarI8FromI1) - -/* Is a given function exported from oleaut32? */ -#define HAVE_FUNC(func) ((void*)GetProcAddress(hOleaut32, #func) != NULL) - -/* Get a conversion function ptr, return if function not available */ -#define CHECKPTR(func) p##func = (void*)GetProcAddress(hOleaut32, #func); \ - if (!p##func) { trace("function " # func " not available, not testing it\n"); return; } - -static inline int strcmpW( const WCHAR *str1, const WCHAR *str2 ) -{ - while (*str1 && (*str1 == *str2)) { str1++; str2++; } - return *str1 - *str2; -} - -#define FMT_NUMBER(vt,val) \ - VariantInit(&v); V_VT(&v) = vt; val(&v) = 1; \ - hres = pVarFormatNumber(&v,2,0,0,0,0,&str); \ - ok(hres == S_OK, "VarFormatNumber (vt %d): returned %8x\n", vt, hres); \ - if (hres == S_OK) { \ - ok(str && strcmpW(str,szResult1) == 0, \ - "VarFormatNumber (vt %d): string different\n", vt); \ - SysFreeString(str); \ - } - -static void test_VarFormatNumber(void) -{ - static const WCHAR szSrc1[] = { '1','\0' }; - static const WCHAR szResult1[] = { '1','.','0','0','\0' }; - static const WCHAR szSrc2[] = { '-','1','\0' }; - static const WCHAR szResult2[] = { '(','1','.','0','0',')','\0' }; - char buff[8]; - HRESULT hres; - VARIANT v; - BSTR str = NULL; - - CHECKPTR(VarFormatNumber); - - GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, buff, sizeof(buff)/sizeof(char)); - if (buff[0] != '.' || buff[1]) - { - skip("Skipping VarFormatNumber tests as decimal separator is '%s'\n", buff); - return; - } - - FMT_NUMBER(VT_I1, V_I1); - FMT_NUMBER(VT_UI1, V_UI1); - FMT_NUMBER(VT_I2, V_I2); - FMT_NUMBER(VT_UI2, V_UI2); - FMT_NUMBER(VT_I4, V_I4); - FMT_NUMBER(VT_UI4, V_UI4); - if (HAVE_OLEAUT32_I8) - { - FMT_NUMBER(VT_I8, V_I8); - FMT_NUMBER(VT_UI8, V_UI8); - } - FMT_NUMBER(VT_R4, V_R4); - FMT_NUMBER(VT_R8, V_R8); - FMT_NUMBER(VT_BOOL, V_BOOL); - - V_VT(&v) = VT_BSTR; - V_BSTR(&v) = SysAllocString(szSrc1); - - hres = pVarFormatNumber(&v,2,0,0,0,0,&str); - ok(hres == S_OK, "VarFormatNumber (bstr): returned %8x\n", hres); - if (hres == S_OK) - ok(str && strcmpW(str, szResult1) == 0, "VarFormatNumber (bstr): string different\n"); - SysFreeString(V_BSTR(&v)); - SysFreeString(str); - - V_BSTR(&v) = SysAllocString(szSrc2); - hres = pVarFormatNumber(&v,2,0,-1,0,0,&str); - ok(hres == S_OK, "VarFormatNumber (bstr): returned %8x\n", hres); - if (hres == S_OK) - ok(str && strcmpW(str, szResult2) == 0, "VarFormatNumber (-bstr): string different\n"); - SysFreeString(V_BSTR(&v)); - SysFreeString(str); -} - -#define SIGNED_VTBITS (VTBIT_I1|VTBIT_I2|VTBIT_I4|VTBIT_I8|VTBIT_R4|VTBIT_R8) - -static const char *szVarFmtFail = "VT %d|0x%04x Format %s: expected 0x%08x, '%s', got 0x%08x, '%s'\n"; -#define VARFMT(vt,v,val,fmt,ret,str) do { \ - out = NULL; \ - V_VT(&in) = (vt); v(&in) = val; \ - if (fmt) MultiByteToWideChar(CP_ACP, 0, fmt, -1, buffW, sizeof(buffW)/sizeof(WCHAR)); \ - hres = pVarFormat(&in,fmt ? buffW : NULL,fd,fw,flags,&out); \ - if (SUCCEEDED(hres)) WideCharToMultiByte(CP_ACP, 0, out, -1, buff, sizeof(buff),0,0); \ - else buff[0] = '\0'; \ - ok(hres == ret && (FAILED(ret) || !strcmp(buff, str)), \ - szVarFmtFail, \ - (vt)&VT_TYPEMASK,(vt)&~VT_TYPEMASK,fmt?fmt:"",ret,str,hres,buff); \ - SysFreeString(out); \ - } while(0) - -typedef struct tagFMTRES -{ - LPCSTR fmt; - LPCSTR one_res; - LPCSTR zero_res; -} FMTRES; - -static const FMTRES VarFormat_results[] = -{ - { NULL, "1", "0" }, - { "", "1", "0" }, - { "General Number", "1", "0" }, - { "Percent", "100.00%", "0.00%" }, - { "Standard", "1.00", "0.00" }, - { "Scientific","1.00E+00", "0.00E+00" }, - { "True/False", "True", "False" }, - { "On/Off", "On", "Off" }, - { "Yes/No", "Yes", "No" }, - { "#", "1", "" }, - { "##", "1", "" }, - { "#.#", "1.", "." }, - { "0", "1", "0" }, - { "00", "01", "00" }, - { "0.0", "1.0", "0.0" }, - { "00\\c\\o\\p\\y", "01copy","00copy" }, - { "\"pos\";\"neg\"", "pos", "pos" }, - { "\"pos\";\"neg\";\"zero\"","pos", "zero" } -}; - -typedef struct tagFMTDATERES -{ - DATE val; - LPCSTR fmt; - LPCSTR res; -} FMTDATERES; - -static const FMTDATERES VarFormat_date_results[] = -{ - { 0.0, "w", "7" }, - { 0.0, "w", "6" }, - { 0.0, "w", "5" }, - { 0.0, "w", "4" }, - { 0.0, "w", "3" }, - { 0.0, "w", "2" }, - { 0.0, "w", "1" }, /* First 7 entries must remain in this order! */ - { 2.525, "am/pm", "pm" }, - { 2.525, "AM/PM", "PM" }, - { 2.525, "A/P", "P" }, - { 2.525, "a/p", "p" }, - { 2.525, "q", "1" }, - { 2.525, "d", "1" }, - { 2.525, "dd", "01" }, - { 2.525, "ddd", "Mon" }, - { 2.525, "dddd", "Monday" }, - { 2.525, "mmm", "Jan" }, - { 2.525, "mmmm", "January" }, - { 2.525, "y", "1" }, - { 2.525, "yy", "00" }, - { 2.525, "yyy", "001" }, - { 2.525, "yyyy", "1900" }, - { 2.525, "dd mm yyyy hh:mm:ss", "01 01 1900 12:36:00" }, - { 2.525, "dd mm yyyy mm", "01 01 1900 01" }, - { 2.525, "dd mm yyyy :mm", "01 01 1900 :01" }, - { 2.525, "dd mm yyyy hh:mm", "01 01 1900 12:36" }, - { 2.525, "mm mm", "01 01" }, - { 2.525, "mm :mm:ss", "01 :01:00" }, - { 2.525, "mm :ss:mm", "01 :00:01" }, - { 2.525, "hh:mm :ss:mm", "12:36 :00:01" }, - { 2.525, "hh:dd :mm:mm", "12:01 :01:01" }, - { 2.525, "dd:hh :mm:mm", "01:12 :36:01" }, - { 2.525, "hh :mm:mm", "12 :36:01" }, - { 2.525, "dd :mm:mm", "01 :01:01" }, - { 2.525, "dd :mm:nn", "01 :01:36" }, - { 2.725, "hh:nn:ss A/P", "05:24:00 P" } -}; - -#define VNUMFMT(vt,v) \ - for (i = 0; i < sizeof(VarFormat_results)/sizeof(FMTRES); i++) \ - { \ - VARFMT(vt,v,1,VarFormat_results[i].fmt,S_OK,VarFormat_results[i].one_res); \ - VARFMT(vt,v,0,VarFormat_results[i].fmt,S_OK,VarFormat_results[i].zero_res); \ - } \ - if ((1 << vt) & SIGNED_VTBITS) \ - { \ - VARFMT(vt,v,-1,"\"pos\";\"neg\"",S_OK,"neg"); \ - VARFMT(vt,v,-1,"\"pos\";\"neg\";\"zero\"",S_OK,"neg"); \ - } - -static void test_VarFormat(void) -{ - static const WCHAR szTesting[] = { 't','e','s','t','i','n','g','\0' }; - static const WCHAR szNum[] = { '3','9','6','9','7','.','1','1','\0' }; - size_t i; - WCHAR buffW[256]; - char buff[256]; - VARIANT in; - VARIANT_BOOL bTrue = VARIANT_TRUE, bFalse = VARIANT_FALSE; - int fd = 0, fw = 0; - ULONG flags = 0; - BSTR bstrin, out = NULL; - HRESULT hres; - - CHECKPTR(VarFormat); - - if (PRIMARYLANGID(LANGIDFROMLCID(GetUserDefaultLCID())) != LANG_ENGLISH) - { - skip("Skipping VarFormat tests for non english language\n"); - return; - } - GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, buff, sizeof(buff)/sizeof(char)); - if (buff[0] != '.' || buff[1]) - { - skip("Skipping VarFormat tests as decimal separator is '%s'\n", buff); - return; - } - GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_IDIGITS, buff, sizeof(buff)/sizeof(char)); - if (buff[0] != '2' || buff[1]) - { - skip("Skipping VarFormat tests as decimal places is '%s'\n", buff); - return; - } - - VARFMT(VT_BOOL,V_BOOL,VARIANT_TRUE,"True/False",S_OK,"True"); - VARFMT(VT_BOOL,V_BOOL,VARIANT_FALSE,"True/False",S_OK,"False"); - - VNUMFMT(VT_I1,V_I1); - VNUMFMT(VT_I2,V_I2); - VNUMFMT(VT_I4,V_I4); - if (HAVE_OLEAUT32_I8) - { - VNUMFMT(VT_I8,V_I8); - } - VNUMFMT(VT_INT,V_INT); - VNUMFMT(VT_UI1,V_UI1); - VNUMFMT(VT_UI2,V_UI2); - VNUMFMT(VT_UI4,V_UI4); - if (HAVE_OLEAUT32_I8) - { - VNUMFMT(VT_UI8,V_UI8); - } - VNUMFMT(VT_UINT,V_UINT); - VNUMFMT(VT_R4,V_R4); - VNUMFMT(VT_R8,V_R8); - - /* Reference types are dereferenced */ - VARFMT(VT_BOOL|VT_BYREF,V_BOOLREF,&bTrue,"True/False",S_OK,"True"); - VARFMT(VT_BOOL|VT_BYREF,V_BOOLREF,&bFalse,"True/False",S_OK,"False"); - - /* Dates */ - for (i = 0; i < sizeof(VarFormat_date_results)/sizeof(FMTDATERES); i++) - { - if (i < 7) - fd = i + 1; /* Test first day */ - else - fd = 0; - VARFMT(VT_DATE,V_DATE,VarFormat_date_results[i].val, - VarFormat_date_results[i].fmt,S_OK, - VarFormat_date_results[i].res); - } - - /* Strings */ - bstrin = SysAllocString(szTesting); - VARFMT(VT_BSTR,V_BSTR,bstrin,"",S_OK,"testing"); - VARFMT(VT_BSTR,V_BSTR,bstrin,"@",S_OK,"testing"); - VARFMT(VT_BSTR,V_BSTR,bstrin,"&",S_OK,"testing"); - VARFMT(VT_BSTR,V_BSTR,bstrin,"\\x@\\x@",S_OK,"xtxesting"); - VARFMT(VT_BSTR,V_BSTR,bstrin,"\\x&\\x&",S_OK,"xtxesting"); - VARFMT(VT_BSTR,V_BSTR,bstrin,"@\\x",S_OK,"txesting"); - VARFMT(VT_BSTR,V_BSTR,bstrin,"@@@@@@@@",S_OK," testing"); - VARFMT(VT_BSTR,V_BSTR,bstrin,"@\\x@@@@@@@",S_OK," xtesting"); - VARFMT(VT_BSTR,V_BSTR,bstrin,"&&&&&&&&",S_OK,"testing"); - VARFMT(VT_BSTR,V_BSTR,bstrin,"!&&&&&&&",S_OK,"testing"); - VARFMT(VT_BSTR,V_BSTR,bstrin,"&&&&&&&!",S_OK,"testing"); - VARFMT(VT_BSTR,V_BSTR,bstrin,">&&",S_OK,"TESTING"); - VARFMT(VT_BSTR,V_BSTR,bstrin,"<&&",S_OK,"testing"); - VARFMT(VT_BSTR,V_BSTR,bstrin,"<&>&",S_OK,"testing"); - SysFreeString(bstrin); - bstrin = SysAllocString(szNum); - todo_wine VARFMT(VT_BSTR,V_BSTR,bstrin,"hh:mm",S_OK,"02:38"); - todo_wine VARFMT(VT_BSTR,V_BSTR,bstrin,"mm-dd-yy",S_OK,"09-06-08"); - SysFreeString(bstrin); - /* Numeric values are converted to strings then output */ - VARFMT(VT_I1,V_I1,1,"<&>&",S_OK,"1"); - - /* Number formats */ - VARFMT(VT_I4,V_I4,1,"#00000000",S_OK,"00000001"); - VARFMT(VT_I4,V_I4,1,"000###",S_OK,"000001"); - VARFMT(VT_I4,V_I4,1,"#00##00#0",S_OK,"00000001"); - VARFMT(VT_I4,V_I4,1,"1#####0000",S_OK,"10001"); - VARFMT(VT_I4,V_I4,1,"##abcdefghijklmnopqrstuvwxyz",S_OK,"1abcdefghijklmnopqrstuvwxyz"); - VARFMT(VT_I4,V_I4,100000,"#,###,###,###",S_OK,"100,000"); - VARFMT(VT_I4,V_I4,1,"0,000,000,000",S_OK,"0,000,000,001"); - VARFMT(VT_I4,V_I4,123456789,"#,#.#",S_OK,"123,456,789."); - VARFMT(VT_I4,V_I4,123456789,"###, ###, ###",S_OK,"123, 456, 789"); - VARFMT(VT_I4,V_I4,1,"#;-#",S_OK,"1"); - VARFMT(VT_I4,V_I4,-1,"#;-#",S_OK,"-1"); - VARFMT(VT_R8,V_R8,1.23456789,"0#.0#0#0#0#0",S_OK,"01.234567890"); - VARFMT(VT_R8,V_R8,1.2,"0#.0#0#0#0#0",S_OK,"01.200000000"); - VARFMT(VT_R8,V_R8,9.87654321,"#0.#0#0#0#0#",S_OK,"9.87654321"); - VARFMT(VT_R8,V_R8,9.8,"#0.#0#0#0#0#",S_OK,"9.80000000"); - VARFMT(VT_R8,V_R8,0.00000008,"#0.#0#0#0#0#0",S_OK,"0.0000000800"); - VARFMT(VT_R8,V_R8,0.00010705,"#0.##########",S_OK,"0.00010705"); - VARFMT(VT_I4,V_I4,17,"#0",S_OK,"17"); - VARFMT(VT_I4,V_I4,4711,"#0",S_OK,"4711"); - VARFMT(VT_I4,V_I4,17,"#00",S_OK,"17"); - VARFMT(VT_I4,V_I4,100,"0##",S_OK,"100"); - VARFMT(VT_I4,V_I4,17,"#000",S_OK,"017"); - VARFMT(VT_I4,V_I4,17,"#0.00",S_OK,"17.00"); - VARFMT(VT_I4,V_I4,17,"#0000.00",S_OK,"0017.00"); - VARFMT(VT_I4,V_I4,17,"#.00",S_OK,"17.00"); - VARFMT(VT_R8,V_R8,1.7,"#.00",S_OK,"1.70"); - VARFMT(VT_R8,V_R8,.17,"#.00",S_OK,".17"); - VARFMT(VT_I4,V_I4,17,"#3",S_OK,"173"); - VARFMT(VT_I4,V_I4,17,"#33",S_OK,"1733"); - VARFMT(VT_I4,V_I4,17,"#3.33",S_OK,"173.33"); - VARFMT(VT_I4,V_I4,17,"#3333.33",S_OK,"173333.33"); - VARFMT(VT_I4,V_I4,17,"#.33",S_OK,"17.33"); - VARFMT(VT_R8,V_R8,.17,"#.33",S_OK,".33"); - VARFMT(VT_R8,V_R8,1.7,"0.0000E-000",S_OK,"1.7000E000"); - VARFMT(VT_R8,V_R8,1.7,"0.0000e-1",S_OK,"1.7000e01"); - VARFMT(VT_R8,V_R8,86.936849,"#0.000000000000e-000",S_OK,"86.936849000000e000"); - VARFMT(VT_R8,V_R8,1.7,"#0",S_OK,"2"); - VARFMT(VT_R8,V_R8,1.7,"#.33",S_OK,"2.33"); - VARFMT(VT_R8,V_R8,1.7,"#3",S_OK,"23"); - VARFMT(VT_R8,V_R8,1.73245,"0.0000E+000",S_OK,"1.7325E+000"); - VARFMT(VT_R8,V_R8,9.9999999,"#0.000000",S_OK,"10.000000"); - VARFMT(VT_R8,V_R8,1.7,"0.0000e+0#",S_OK,"1.7000e+0"); - VARFMT(VT_R8,V_R8,100.0001e+0,"0.0000E+0",S_OK,"1.0000E+2"); - VARFMT(VT_R8,V_R8,1000001,"0.0000e+1",S_OK,"1.0000e+61"); - VARFMT(VT_R8,V_R8,100.0001e+25,"0.0000e+0",S_OK,"1.0000e+27"); - VARFMT(VT_R8,V_R8,450.0001e+43,"#000.0000e+0",S_OK,"4500.0010e+42"); - VARFMT(VT_R8,V_R8,0.0001e-11,"##00.0000e-0",S_OK,"1000.0000e-18"); - VARFMT(VT_R8,V_R8,0.0317e-11,"0000.0000e-0",S_OK,"3170.0000e-16"); - VARFMT(VT_R8,V_R8,0.0021e-11,"00##.0000e-0",S_OK,"2100.0000e-17"); - VARFMT(VT_R8,V_R8,1.0001e-27,"##00.0000e-0",S_OK,"1000.1000e-30"); - VARFMT(VT_R8,V_R8,47.11,".0000E+0",S_OK,".4711E+2"); - VARFMT(VT_R8,V_R8,3.0401e-13,"#####.####e-0%",S_OK,"30401.e-15%"); - VARFMT(VT_R8,V_R8,1.57,"0.00",S_OK,"1.57"); - VARFMT(VT_R8,V_R8,-1.57,"0.00",S_OK,"-1.57"); - VARFMT(VT_R8,V_R8,-1.57,"#.##",S_OK,"-1.57"); - VARFMT(VT_R8,V_R8,-0.1,".#",S_OK,"-.1"); - VARFMT(VT_R8,V_R8,0.099,"#.#",S_OK,".1"); - VARFMT(VT_R8,V_R8,0.0999,"#.##",S_OK,".1"); - VARFMT(VT_R8,V_R8,0.099,"#.##",S_OK,".1"); - VARFMT(VT_R8,V_R8,0.0099,"#.##",S_OK,".01"); - VARFMT(VT_R8,V_R8,0.0049,"#.##",S_OK,"."); - VARFMT(VT_R8,V_R8,0.0094,"#.##",S_OK,".01"); - VARFMT(VT_R8,V_R8,0.00099,"#.##",S_OK,"."); - VARFMT(VT_R8,V_R8,0.0995,"#.##",S_OK,".1"); - VARFMT(VT_R8,V_R8,8.0995,"#.##",S_OK,"8.1"); - VARFMT(VT_R8,V_R8,0.0994,"#.##",S_OK,".1"); - VARFMT(VT_R8,V_R8,1.00,"#,##0.00",S_OK,"1.00"); - VARFMT(VT_R8,V_R8,0.0995,"#.###",S_OK,".1"); - - - /* 'out' is not cleared */ - out = (BSTR)0x1; - hres = pVarFormat(&in,NULL,fd,fw,flags,&out); /* Would crash if out is cleared */ - ok(hres == S_OK, "got %08x\n", hres); - SysFreeString(out); - out = NULL; - - /* VT_NULL */ - V_VT(&in) = VT_NULL; - hres = pVarFormat(&in,NULL,fd,fw,0,&out); - ok(hres == S_OK, "VarFormat failed with 0x%08x\n", hres); - ok(out == NULL, "expected NULL formatted string\n"); - - /* Invalid args */ - hres = pVarFormat(&in,NULL,fd,fw,flags,NULL); - ok(hres == E_INVALIDARG, "Null out: expected E_INVALIDARG, got 0x%08x\n", hres); - hres = pVarFormat(NULL,NULL,fd,fw,flags,&out); - ok(hres == E_INVALIDARG, "Null in: expected E_INVALIDARG, got 0x%08x\n", hres); - fd = -1; - VARFMT(VT_BOOL,V_BOOL,VARIANT_TRUE,"",E_INVALIDARG,""); - fd = 8; - VARFMT(VT_BOOL,V_BOOL,VARIANT_TRUE,"",E_INVALIDARG,""); - fd = 0; fw = -1; - VARFMT(VT_BOOL,V_BOOL,VARIANT_TRUE,"",E_INVALIDARG,""); - fw = 4; - VARFMT(VT_BOOL,V_BOOL,VARIANT_TRUE,"",E_INVALIDARG,""); -} - -static const char *szVarWdnFail = - "VarWeekdayName (%d, %d, %d, %d, %x): returned %8x, expected %8x\n"; -#define VARWDN(iWeekday, fAbbrev, iFirstDay, dwFlags, ret, buff, out, freeOut) \ -do { \ - hres = pVarWeekdayName(iWeekday, fAbbrev, iFirstDay, dwFlags, &out); \ - if (SUCCEEDED(hres)) { \ - WideCharToMultiByte(CP_ACP, 0, out, -1, buff, sizeof(buff), 0, 0); \ - if (freeOut) SysFreeString(out); \ - } else { \ - buff[0] = '\0'; \ - } \ - ok(hres == ret, \ - szVarWdnFail, \ - iWeekday, fAbbrev, iFirstDay, dwFlags, &out, hres, ret \ - ); \ -} while(0) - -#define VARWDN_F(iWeekday, fAbbrev, iFirstDay, dwFlags, ret) \ - VARWDN(iWeekday, fAbbrev, iFirstDay, dwFlags, ret, buff, out, 1) - -#define VARWDN_O(iWeekday, fAbbrev, iFirstDay, dwFlags) \ - VARWDN(iWeekday, fAbbrev, iFirstDay, dwFlags, S_OK, buff, out, 0) - -static void test_VarWeekdayName(void) -{ - char buff[256]; - BSTR out = NULL; - HRESULT hres; - int iWeekday, fAbbrev, iFirstDay; - BSTR dayNames[7][2]; /* Monday-Sunday, full/abbr */ - DWORD defaultFirstDay; - int firstDay; - int day; - int size; - DWORD localeValue; - - CHECKPTR(VarWeekdayName); - - SetLastError(0xdeadbeef); - GetLocaleInfoW(LOCALE_USER_DEFAULT, 0, NULL, 0); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("GetLocaleInfoW is not implemented\n"); - return; - } - - /* Initialize days' names */ - for (day = 0; day <= 6; ++day) - { - for (fAbbrev = 0; fAbbrev <= 1; ++fAbbrev) - { - localeValue = fAbbrev ? LOCALE_SABBREVDAYNAME1 : LOCALE_SDAYNAME1; - localeValue += day; - size = GetLocaleInfoW(LOCALE_USER_DEFAULT, localeValue, NULL, 0); - dayNames[day][fAbbrev] = SysAllocStringLen(NULL, size - 1); - GetLocaleInfoW(LOCALE_USER_DEFAULT, localeValue, - dayNames[day][fAbbrev], size); - } - } - - /* Get the user's first day of week. 0=Monday, .. */ - GetLocaleInfoW( - LOCALE_USER_DEFAULT, LOCALE_IFIRSTDAYOFWEEK | LOCALE_RETURN_NUMBER, - (LPWSTR)&defaultFirstDay, sizeof(defaultFirstDay) / sizeof(WCHAR)); - - /* Check invalid arguments */ - VARWDN_F(0, 0, 4, 0, E_INVALIDARG); - VARWDN_F(8, 0, 4, 0, E_INVALIDARG); - VARWDN_F(4, 0, -1, 0, E_INVALIDARG); - VARWDN_F(4, 0, 8, 0, E_INVALIDARG); - - hres = pVarWeekdayName(1, 0, 0, 0, NULL); - ok(E_INVALIDARG == hres, - "Null pointer: expected E_INVALIDARG, got 0x%08x\n", hres); - - /* Check all combinations */ - for (iWeekday = 1; iWeekday <= 7; ++iWeekday) - { - for (fAbbrev = 0; fAbbrev <= 1; ++fAbbrev) - { - /* 0 = Default, 1 = Sunday, 2 = Monday, .. */ - for (iFirstDay = 0; iFirstDay <= 7; ++iFirstDay) - { - VARWDN_O(iWeekday, fAbbrev, iFirstDay, 0); - if (iFirstDay == 0) - firstDay = defaultFirstDay; - else - /* Translate from 0=Sunday to 0=Monday in the modulo 7 space */ - firstDay = iFirstDay - 2; - day = (7 + iWeekday - 1 + firstDay) % 7; - ok(VARCMP_EQ == VarBstrCmp(out, dayNames[day][fAbbrev], - LOCALE_USER_DEFAULT, 0), - "VarWeekdayName(%d,%d,%d): got wrong dayname: '%s'\n", - iWeekday, fAbbrev, iFirstDay, buff); - SysFreeString(out); - } - } - } - - /* Cleanup */ - for (day = 0; day <= 6; ++day) - { - for (fAbbrev = 0; fAbbrev <= 1; ++fAbbrev) - { - SysFreeString(dayNames[day][fAbbrev]); - } - } -} - -START_TEST(varformat) -{ - hOleaut32 = GetModuleHandleA("oleaut32.dll"); - - test_VarFormatNumber(); - test_VarFormat(); - test_VarWeekdayName(); -} diff --git a/rostests/winetests/oleaut32/vartest.c b/rostests/winetests/oleaut32/vartest.c deleted file mode 100644 index 8203510b39e..00000000000 --- a/rostests/winetests/oleaut32/vartest.c +++ /dev/null @@ -1,8646 +0,0 @@ -/* - * VARIANT test program - * - * Copyright 1998 Jean-Claude Cote - * Copyright 2006 Google (Benjamin Arai) - * - * 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 "windef.h" -#include "winbase.h" -#include "winsock.h" -#include "wine/test.h" -#include "winuser.h" -#include "wingdi.h" -#include "winnls.h" -#include "winerror.h" -#include "winnt.h" - -#include "wtypes.h" -#include "oleauto.h" - -static HMODULE hOleaut32; - -static HRESULT (WINAPI *pVarUdateFromDate)(DATE,ULONG,UDATE*); -static HRESULT (WINAPI *pVarDateFromUdate)(UDATE*,ULONG,DATE*); -static INT (WINAPI *pSystemTimeToVariantTime)(LPSYSTEMTIME,double*); -static INT (WINAPI *pVariantTimeToSystemTime)(double,LPSYSTEMTIME); -static INT (WINAPI *pDosDateTimeToVariantTime)(USHORT,USHORT,double*); -static INT (WINAPI *pVariantTimeToDosDateTime)(double,USHORT*,USHORT *); - -static const WCHAR sz12[] = {'1','2','\0'}; -/* the strings are localized */ -static WCHAR sz12_false[32]; -static WCHAR sz12_true[32]; - -/* Get a conversion function ptr, return if function not available */ -#define CHECKPTR(func) p##func = (void*)GetProcAddress(hOleaut32, #func); \ - if (!p##func) { trace("function " # func " not available, not testing it\n"); return; } - -/* Have IRecordInfo data type? */ -static int HAVE_OLEAUT32_RECORD = 0; -/* Have I8/UI8 data type? */ -static int HAVE_OLEAUT32_I8 = 0; -/* Is this an ancient version with support for only I2/I4/R4/R8/DATE? */ -static int IS_ANCIENT = 0; - -/* When comparing floating point values we cannot expect an exact match - * because the rounding errors depend on the exact algorithm. - */ -#define EQ_DOUBLE(a,b) (fabs((a)-(b)) / (1.0+fabs(a)+fabs(b)) < 1e-14) -#define EQ_FLOAT(a,b) (fabs((a)-(b)) / (1.0+fabs(a)+fabs(b)) < 1e-7) - -#define SKIPTESTS(a) if((a > VT_CLSID+10) && (a < VT_BSTR_BLOB-10)) continue - -/* Allow our test macros to work for VT_NULL and VT_EMPTY too */ -#define V_EMPTY(v) V_I4(v) -#define V_NULL(v) V_I4(v) - -/* Size constraints for overflow tests */ -#define I1_MAX 0x7f -#define I1_MIN ((-I1_MAX)-1) -#define UI1_MAX 0xff -#define UI1_MIN 0 -#define I2_MAX 0x7fff -#define I2_MIN ((-I2_MAX)-1) -#define UI2_MAX 0xffff -#define UI2_MIN 0 -#define I4_MAX 0x7fffffff -#define I4_MIN ((-I4_MAX)-1) -#define UI4_MAX 0xffffffff -#define UI4_MIN 0 -#define I8_MAX (((LONGLONG)I4_MAX << 32) | UI4_MAX) -#define I8_MIN ((-I8_MAX)-1) -#define UI8_MAX (((ULONGLONG)UI4_MAX << 32) | UI4_MAX) -#define UI8_MIN 0 -#define DATE_MAX 2958465 -#define DATE_MIN -657434 -#define R4_MAX FLT_MAX -#define R4_MIN FLT_MIN -#define R8_MAX DBL_MAX -#define R8_MIN DBL_MIN - -static void init(void) -{ - BSTR bstr; - HRESULT res; - - res = VarBstrFromBool(VARIANT_TRUE, LANG_USER_DEFAULT, VAR_LOCALBOOL, &bstr); - ok(SUCCEEDED(res) && (lstrlenW(bstr) > 0), - "Expected localized string for 'True'\n"); - /* lstrcpyW / lstrcatW do not work on win95 */ - memcpy(sz12_true, sz12, sizeof(sz12)); - if (bstr) memcpy(&sz12_true[2], bstr, SysStringByteLen(bstr) + sizeof(WCHAR)); - SysFreeString(bstr); - - res = VarBstrFromBool(VARIANT_FALSE, LANG_USER_DEFAULT, VAR_LOCALBOOL, &bstr); - ok(SUCCEEDED(res) && (lstrlenW(bstr) > 0), - "Expected localized string for 'False'\n"); - memcpy(sz12_false, sz12, sizeof(sz12)); - if (bstr) memcpy(&sz12_false[2], bstr, SysStringByteLen(bstr) + sizeof(WCHAR)); - SysFreeString(bstr); - - hOleaut32 = GetModuleHandle("oleaut32.dll"); - - /* Is a given function exported from oleaut32? */ -#define HAVE_FUNC(func) ((void*)GetProcAddress(hOleaut32, #func) != NULL) - - HAVE_OLEAUT32_I8 = HAVE_FUNC(VarI8FromI1); - if (!HAVE_OLEAUT32_I8) - skip("No support for I8 and UI8 data types\n"); - - HAVE_OLEAUT32_RECORD = HAVE_FUNC(SafeArraySetRecordInfo); - IS_ANCIENT = (!HAVE_FUNC(VarI1FromI2)); - -#undef HAVE_FUNC -} - -/* Functions to set a DECIMAL */ -static void setdec(DECIMAL* dec, BYTE scl, BYTE sgn, ULONG hi32, ULONG64 lo64) -{ - S(U(*dec)).scale = scl; - S(U(*dec)).sign = sgn; - dec->Hi32 = hi32; - U1(*dec).Lo64 = lo64; -} - -static void setdec64(DECIMAL* dec, BYTE scl, BYTE sgn, ULONG hi32, ULONG mid32, ULONG lo32) -{ - S(U(*dec)).scale = scl; - S(U(*dec)).sign = sgn; - dec->Hi32 = hi32; - S1(U1(*dec)).Mid32 = mid32; - S1(U1(*dec)).Lo32 = lo32; -} - -static inline int strcmpW( const WCHAR *str1, const WCHAR *str2 ) -{ - while (*str1 && (*str1 == *str2)) { str1++; str2++; } - return *str1 - *str2; -} - -/* return the string text of a given variant type */ -static char vtstr_buffer[16][256]; -static int vtstr_current=0; -static const char *vtstr(int x) -{ - switch(x) { -#define CASE(vt) case VT_##vt: return #vt - CASE(EMPTY); - CASE(NULL); - CASE(I2); - CASE(I4); - CASE(R4); - CASE(R8); - CASE(CY); - CASE(DATE); - CASE(BSTR); - CASE(DISPATCH); - CASE(ERROR); - CASE(BOOL); - CASE(VARIANT); - CASE(UNKNOWN); - CASE(DECIMAL); - CASE(I1); - CASE(UI1); - CASE(UI2); - CASE(UI4); - CASE(I8); - CASE(UI8); - CASE(INT); - CASE(UINT); - CASE(VOID); - CASE(HRESULT); - CASE(PTR); - CASE(SAFEARRAY); - CASE(CARRAY); - CASE(USERDEFINED); - CASE(LPSTR); - CASE(LPWSTR); - CASE(RECORD); - CASE(INT_PTR); - CASE(UINT_PTR); - CASE(FILETIME); - CASE(BLOB); - CASE(STREAM); - CASE(STORAGE); - CASE(STREAMED_OBJECT); - CASE(STORED_OBJECT); - CASE(BLOB_OBJECT); - CASE(CF); - CASE(CLSID); - CASE(VERSIONED_STREAM); - CASE(VECTOR); - CASE(ARRAY); - CASE(BYREF); - CASE(RESERVED); - CASE(ILLEGAL); -#undef CASE - - case 0xfff: - return "VT_BSTR_BLOB/VT_ILLEGALMASKED/VT_TYPEMASK"; - - default: - vtstr_current %= sizeof(vtstr_buffer)/sizeof(*vtstr_buffer); - sprintf(vtstr_buffer[vtstr_current], "unknown variant type %d", x); - return vtstr_buffer[vtstr_current++]; - } -} - -static const char *variantstr( const VARIANT *var ) -{ - vtstr_current %= sizeof(vtstr_buffer)/sizeof(*vtstr_buffer); - switch(V_VT(var)) - { - case VT_I1: - sprintf( vtstr_buffer[vtstr_current], "VT_I1(%d)", V_I1(var) ); break; - case VT_I2: - sprintf( vtstr_buffer[vtstr_current], "VT_I2(%d)", V_I2(var) ); break; - case VT_I4: - sprintf( vtstr_buffer[vtstr_current], "VT_I4(%d)", V_I4(var) ); break; - case VT_INT: - sprintf( vtstr_buffer[vtstr_current], "VT_INT(%d)", V_INT(var) ); break; - case VT_I8: - sprintf( vtstr_buffer[vtstr_current], "VT_I8(%x%08x)", (UINT)(V_I8(var) >> 32), (UINT)V_I8(var) ); break; - case VT_UI8: - sprintf( vtstr_buffer[vtstr_current], "VT_UI8(%x%08x)", (UINT)(V_UI8(var) >> 32), (UINT)V_UI8(var) ); break; - case VT_R4: - sprintf( vtstr_buffer[vtstr_current], "VT_R4(%g)", V_R4(var) ); break; - case VT_R8: - sprintf( vtstr_buffer[vtstr_current], "VT_R8(%g)", V_R8(var) ); break; - case VT_UI1: - sprintf( vtstr_buffer[vtstr_current], "VT_UI1(%u)", V_UI1(var) ); break; - case VT_UI2: - sprintf( vtstr_buffer[vtstr_current], "VT_UI2(%u)", V_UI2(var) ); break; - case VT_UI4: - sprintf( vtstr_buffer[vtstr_current], "VT_UI4(%u)", V_UI4(var) ); break; - case VT_UINT: - sprintf( vtstr_buffer[vtstr_current], "VT_UINT(%d)", V_UINT(var) ); break; - case VT_CY: - sprintf( vtstr_buffer[vtstr_current], "VT_CY(%x%08x)", S(V_CY(var)).Hi, S(V_CY(var)).Lo ); break; - case VT_DATE: - sprintf( vtstr_buffer[vtstr_current], "VT_DATE(%g)", V_DATE(var) ); break; - default: - return vtstr(V_VT(var)); - } - return vtstr_buffer[vtstr_current++]; -} - -static BOOL is_expected_variant( const VARIANT *result, const VARIANT *expected ) -{ - if (V_VT(result) != V_VT(expected)) return FALSE; - switch(V_VT(expected)) - { - case VT_EMPTY: - case VT_NULL: - return TRUE; - -#define CASE(vt) case VT_##vt: return (V_##vt(result) == V_##vt(expected)) - CASE(BOOL); - CASE(I1); - CASE(UI1); - CASE(I2); - CASE(UI2); - CASE(I4); - CASE(UI4); - CASE(I8); - CASE(UI8); - CASE(INT); - CASE(UINT); -#undef CASE - - case VT_DATE: - return EQ_FLOAT(V_DATE(result), V_DATE(expected)); - case VT_R4: - return EQ_FLOAT(V_R4(result), V_R4(expected)); - case VT_R8: - return EQ_FLOAT(V_R8(result), V_R8(expected)); - case VT_CY: - return (V_CY(result).int64 == V_CY(expected).int64); - case VT_BSTR: - return !lstrcmpW( V_BSTR(result), V_BSTR(expected) ); - case VT_DECIMAL: - return !memcmp( &V_DECIMAL(result), &V_DECIMAL(expected), sizeof(DECIMAL) ); - default: - ok(0, "unhandled variant type %s\n",vtstr(V_VT(expected))); - return 0; - } -} - -static void test_var_call1( int line, HRESULT (WINAPI *func)(LPVARIANT,LPVARIANT), - VARIANT *arg, VARIANT *expected ) -{ - VARIANT old_arg = *arg; - VARIANT result; - HRESULT hres; - - memset( &result, 0, sizeof(result) ); - hres = func( arg, &result ); - ok_(__FILE__,line)( hres == S_OK, "wrong result %x\n", hres ); - if (hres == S_OK) - ok_(__FILE__,line)( is_expected_variant( &result, expected ), - "got %s expected %s\n", variantstr(&result), variantstr(expected) ); - ok_(__FILE__,line)( is_expected_variant( arg, &old_arg ), "Modified argument %s / %s\n", - variantstr(&old_arg), variantstr(arg)); - VariantClear( &result ); -} - -static void test_var_call2( int line, HRESULT (WINAPI *func)(LPVARIANT,LPVARIANT,LPVARIANT), - VARIANT *left, VARIANT *right, VARIANT *expected ) -{ - VARIANT old_left = *left, old_right = *right; - VARIANT result; - HRESULT hres; - - memset( &result, 0, sizeof(result) ); - hres = func( left, right, &result ); - ok_(__FILE__,line)( hres == S_OK, "wrong result %x\n", hres ); - if (hres == S_OK) - ok_(__FILE__,line)( is_expected_variant( &result, expected ), - "got %s expected %s\n", variantstr(&result), variantstr(expected) ); - ok_(__FILE__,line)( is_expected_variant( left, &old_left ), "Modified left argument %s / %s\n", - variantstr(&old_left), variantstr(left)); - ok_(__FILE__,line)( is_expected_variant( right, &old_right ), "Modified right argument %s / %s\n", - variantstr(&old_right), variantstr(right)); - VariantClear( &result ); -} - - -static void test_VariantInit(void) -{ - VARIANTARG v1, v2; - - /* Test that VariantInit() only sets the type */ - memset(&v1, -1, sizeof(v1)); - v2 = v1; - V_VT(&v2) = VT_EMPTY; - VariantInit(&v1); - ok(!memcmp(&v1, &v2, sizeof(v1)), "VariantInit() set extra fields\n"); -} - -/* All possible combinations of extra V_VT() flags */ -static const VARTYPE ExtraFlags[16] = -{ - 0, - VT_VECTOR, - VT_ARRAY, - VT_BYREF, - VT_RESERVED, - VT_VECTOR|VT_ARRAY, - VT_VECTOR|VT_BYREF, - VT_VECTOR|VT_RESERVED, - VT_VECTOR|VT_ARRAY|VT_BYREF, - VT_VECTOR|VT_ARRAY|VT_RESERVED, - VT_VECTOR|VT_BYREF|VT_RESERVED, - VT_VECTOR|VT_ARRAY|VT_BYREF|VT_RESERVED, - VT_ARRAY|VT_BYREF, - VT_ARRAY|VT_RESERVED, - VT_ARRAY|VT_BYREF|VT_RESERVED, - VT_BYREF|VT_RESERVED, -}; - -/* Determine if a vt is valid for VariantClear() */ -static int IsValidVariantClearVT(VARTYPE vt, VARTYPE extraFlags) -{ - int ret = 0; - - /* Only the following flags/types are valid */ - if ((vt <= VT_LPWSTR || vt == VT_RECORD || vt == VT_CLSID) && - vt != (VARTYPE)15 && - (vt < (VARTYPE)24 || vt > (VARTYPE)31) && - (!(extraFlags & (VT_BYREF|VT_ARRAY)) || vt > VT_NULL) && - (extraFlags == 0 || extraFlags == VT_BYREF || extraFlags == VT_ARRAY || - extraFlags == (VT_ARRAY|VT_BYREF))) - ret = 1; /* ok */ - - if ((vt == VT_RECORD && !HAVE_OLEAUT32_RECORD) || - ((vt == VT_I8 || vt == VT_UI8) && !HAVE_OLEAUT32_I8)) - ret = 0; /* Old versions of oleaut32 */ - return ret; -} - -typedef struct -{ - const IUnknownVtbl *lpVtbl; - LONG ref; - LONG events; -} test_VariantClearImpl; - -static HRESULT WINAPI VC_QueryInterface(LPUNKNOWN iface,REFIID riid,LPVOID *ppobj) -{ - test_VariantClearImpl *This = (test_VariantClearImpl *)iface; - This->events |= 0x1; - return E_NOINTERFACE; -} - -static ULONG WINAPI VC_AddRef(LPUNKNOWN iface) { - test_VariantClearImpl *This = (test_VariantClearImpl *)iface; - This->events |= 0x2; - return InterlockedIncrement(&This->ref); -} - -static ULONG WINAPI VC_Release(LPUNKNOWN iface) { - test_VariantClearImpl *This = (test_VariantClearImpl *)iface; - /* static class, won't be freed */ - This->events |= 0x4; - return InterlockedDecrement(&This->ref); -} - -static const IUnknownVtbl test_VariantClear_vtbl = { - VC_QueryInterface, - VC_AddRef, - VC_Release, -}; - -static test_VariantClearImpl test_myVariantClearImpl = {&test_VariantClear_vtbl, 1, 0}; - -static void test_VariantClear(void) -{ - HRESULT hres; - VARIANTARG v; - VARIANT v2; - size_t i; - LONG i4; - IUnknown *punk; - - /* Crashes: Native does not test input for NULL, so neither does Wine */ - if (0) hres = VariantClear(NULL); - - /* Only the type field is set, to VT_EMPTY */ - V_VT(&v) = VT_UI4; - V_UI4(&v) = ~0u; - hres = VariantClear(&v); - ok((hres == S_OK && V_VT(&v) == VT_EMPTY) || - (IS_ANCIENT && hres == DISP_E_BADVARTYPE && V_VT(&v) == VT_UI4), - "VariantClear: Type set to %d, res %08x\n", V_VT(&v), hres); - ok(V_UI4(&v) == ~0u, "VariantClear: Overwrote value\n"); - - /* Test all possible V_VT values. - * Also demonstrates that null pointers in 'v' are not dereferenced. - * Individual variant tests should test VariantClear() with non-NULL values. - */ - for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]) && !IS_ANCIENT; i++) - { - VARTYPE vt; - - for (vt = 0; vt <= VT_BSTR_BLOB; vt++) - { - HRESULT hExpected = DISP_E_BADVARTYPE; - - SKIPTESTS(vt); - - memset(&v, 0, sizeof(v)); - V_VT(&v) = vt | ExtraFlags[i]; - - hres = VariantClear(&v); - - if (IsValidVariantClearVT(vt, ExtraFlags[i])) - hExpected = S_OK; - - ok(hres == hExpected, "VariantClear: expected 0x%X, got 0x%X for vt %d | 0x%X\n", - hExpected, hres, vt, ExtraFlags[i]); - } - } - - /* Some BYREF tests with non-NULL ptrs */ - - /* VARIANT BYREF */ - V_VT(&v2) = VT_I4; - V_I4(&v2) = 0x1234; - V_VT(&v) = VT_VARIANT | VT_BYREF; - V_VARIANTREF(&v) = &v2; - - hres = VariantClear(&v); - ok(hres == S_OK, "ret %08x\n", hres); - ok(V_VT(&v) == 0, "vt %04x\n", V_VT(&v)); - ok(V_VARIANTREF(&v) == &v2, "variant ref %p\n", V_VARIANTREF(&v2)); - ok(V_VT(&v2) == VT_I4, "vt %04x\n", V_VT(&v2)); - ok(V_I4(&v2) == 0x1234, "i4 %04x\n", V_I4(&v2)); - - /* I4 BYREF */ - i4 = 0x4321; - V_VT(&v) = VT_I4 | VT_BYREF; - V_I4REF(&v) = &i4; - - hres = VariantClear(&v); - ok(hres == S_OK, "ret %08x\n", hres); - ok(V_VT(&v) == 0, "vt %04x\n", V_VT(&v)); - ok(V_I4REF(&v) == &i4, "i4 ref %p\n", V_I4REF(&v2)); - ok(i4 == 0x4321, "i4 changed %08x\n", i4); - - - /* UNKNOWN */ - V_VT(&v) = VT_UNKNOWN; - V_UNKNOWN(&v) = (IUnknown*)&test_myVariantClearImpl; - test_myVariantClearImpl.events = 0; - hres = VariantClear(&v); - ok(hres == S_OK, "ret %08x\n", hres); - ok(V_VT(&v) == 0, "vt %04x\n", V_VT(&v)); - ok(V_UNKNOWN(&v) == (IUnknown*)&test_myVariantClearImpl, "unknown %p\n", V_UNKNOWN(&v)); - /* Check that Release got called, but nothing else */ - ok(test_myVariantClearImpl.events == 0x4, "Unexpected call. events %08x\n", test_myVariantClearImpl.events); - - /* UNKNOWN BYREF */ - punk = (IUnknown*)&test_myVariantClearImpl; - V_VT(&v) = VT_UNKNOWN | VT_BYREF; - V_UNKNOWNREF(&v) = &punk; - test_myVariantClearImpl.events = 0; - hres = VariantClear(&v); - ok(hres == S_OK, "ret %08x\n", hres); - ok(V_VT(&v) == 0, "vt %04x\n", V_VT(&v)); - ok(V_UNKNOWNREF(&v) == &punk, "unknown ref %p\n", V_UNKNOWNREF(&v)); - /* Check that nothing got called */ - ok(test_myVariantClearImpl.events == 0, "Unexpected call. events %08x\n", test_myVariantClearImpl.events); - - /* DISPATCH */ - V_VT(&v) = VT_DISPATCH; - V_DISPATCH(&v) = (IDispatch*)&test_myVariantClearImpl; - test_myVariantClearImpl.events = 0; - hres = VariantClear(&v); - ok(hres == S_OK, "ret %08x\n", hres); - ok(V_VT(&v) == 0, "vt %04x\n", V_VT(&v)); - ok(V_DISPATCH(&v) == (IDispatch*)&test_myVariantClearImpl, "dispatch %p\n", V_DISPATCH(&v)); - /* Check that Release got called, but nothing else */ - ok(test_myVariantClearImpl.events == 0x4, "Unexpected call. events %08x\n", test_myVariantClearImpl.events); - - /* DISPATCH BYREF */ - punk = (IUnknown*)&test_myVariantClearImpl; - V_VT(&v) = VT_DISPATCH | VT_BYREF; - V_DISPATCHREF(&v) = (IDispatch**)&punk; - test_myVariantClearImpl.events = 0; - hres = VariantClear(&v); - ok(hres == S_OK, "ret %08x\n", hres); - ok(V_VT(&v) == 0, "vt %04x\n", V_VT(&v)); - ok(V_DISPATCHREF(&v) == (IDispatch**)&punk, "dispatch ref %p\n", V_DISPATCHREF(&v)); - /* Check that nothing got called */ - ok(test_myVariantClearImpl.events == 0, "Unexpected call. events %08x\n", test_myVariantClearImpl.events); -} - -static void test_VariantCopy(void) -{ - VARIANTARG vSrc, vDst; - VARTYPE vt; - size_t i; - HRESULT hres, hExpected; - - /* Establish that the failure/other cases are dealt with. Individual tests - * for each type should verify that data is copied correctly, references - * are updated, etc. - */ - - /* vSrc == vDst */ - for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]) && !IS_ANCIENT; i++) - { - for (vt = 0; vt <= VT_BSTR_BLOB; vt++) - { - SKIPTESTS(vt); - - memset(&vSrc, 0, sizeof(vSrc)); - V_VT(&vSrc) = vt | ExtraFlags[i]; - - hExpected = DISP_E_BADVARTYPE; - /* src is allowed to be a VT_CLSID */ - if (vt != VT_CLSID && IsValidVariantClearVT(vt, ExtraFlags[i])) - hExpected = S_OK; - - hres = VariantCopy(&vSrc, &vSrc); - - ok(hres == hExpected, - "Copy(src==dst): expected 0x%X, got 0x%X for src==dest vt %d|0x%X\n", - hExpected, hres, vt, ExtraFlags[i]); - } - } - - /* Test that if VariantClear() fails on dest, the function fails. This also - * shows that dest is in fact cleared and not just overwritten - */ - memset(&vSrc, 0, sizeof(vSrc)); - V_VT(&vSrc) = VT_UI1; - - for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]) && !IS_ANCIENT; i++) - { - for (vt = 0; vt <= VT_BSTR_BLOB; vt++) - { - SKIPTESTS(vt); - - hExpected = DISP_E_BADVARTYPE; - - memset(&vDst, 0, sizeof(vDst)); - V_VT(&vDst) = vt | ExtraFlags[i]; - - if (IsValidVariantClearVT(vt, ExtraFlags[i])) - hExpected = S_OK; - - hres = VariantCopy(&vDst, &vSrc); - - ok(hres == hExpected, - "Copy(bad dst): expected 0x%X, got 0x%X for dest vt %d|0x%X\n", - hExpected, hres, vt, ExtraFlags[i]); - if (hres == S_OK) - ok(V_VT(&vDst) == VT_UI1, - "Copy(bad dst): expected vt = VT_UI1, got %d\n", V_VT(&vDst)); - } - } - - /* Test that VariantClear() checks vSrc for validity before copying */ - for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]) && !IS_ANCIENT; i++) - { - for (vt = 0; vt <= VT_BSTR_BLOB; vt++) - { - SKIPTESTS(vt); - - hExpected = DISP_E_BADVARTYPE; - - memset(&vDst, 0, sizeof(vDst)); - V_VT(&vDst) = VT_EMPTY; - - memset(&vSrc, 0, sizeof(vSrc)); - V_VT(&vSrc) = vt | ExtraFlags[i]; - - /* src is allowed to be a VT_CLSID */ - if (vt != VT_CLSID && IsValidVariantClearVT(vt, ExtraFlags[i])) - hExpected = S_OK; - - hres = VariantCopy(&vDst, &vSrc); - - ok(hres == hExpected, - "Copy(bad src): expected 0x%X, got 0x%X for src vt %d|0x%X\n", - hExpected, hres, vt, ExtraFlags[i]); - if (hres == S_OK) - { - ok(V_VT(&vDst) == (vt|ExtraFlags[i]), - "Copy(bad src): expected vt = %d, got %d\n", - vt | ExtraFlags[i], V_VT(&vDst)); - VariantClear(&vDst); - } - } - } - - /* Test that copying a NULL BSTR results in an empty BSTR */ - memset(&vDst, 0, sizeof(vDst)); - V_VT(&vDst) = VT_EMPTY; - memset(&vSrc, 0, sizeof(vSrc)); - V_VT(&vSrc) = VT_BSTR; - hres = VariantCopy(&vDst, &vSrc); - ok(hres == S_OK, "Copy(NULL BSTR): Failed to copy a NULL BSTR\n"); - if (hres == S_OK) - { - ok((V_VT(&vDst) == VT_BSTR) && V_BSTR(&vDst), - "Copy(NULL BSTR): should have non-NULL result\n"); - if ((V_VT(&vDst) == VT_BSTR) && V_BSTR(&vDst)) - { - ok(*V_BSTR(&vDst) == 0, "Copy(NULL BSTR): result not empty\n"); - } - VariantClear(&vDst); - } -} - -/* Determine if a vt is valid for VariantCopyInd() */ -static int IsValidVariantCopyIndVT(VARTYPE vt, VARTYPE extraFlags) -{ - int ret = 0; - - if ((extraFlags & VT_ARRAY) || - (vt > VT_NULL && vt != (VARTYPE)15 && vt < VT_VOID && - !(extraFlags & (VT_VECTOR|VT_RESERVED)))) - { - ret = 1; /* ok */ - } - return ret; -} - -static void test_VariantCopyInd(void) -{ - VARIANTARG vSrc, vDst, vRef, vRef2; - VARTYPE vt; - size_t i; - BYTE buffer[64]; - HRESULT hres, hExpected; - - memset(buffer, 0, sizeof(buffer)); - - /* vSrc == vDst */ - for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]) && !IS_ANCIENT; i++) - { - if (ExtraFlags[i] & VT_ARRAY) - continue; /* Native crashes on NULL safearray */ - - for (vt = 0; vt <= VT_BSTR_BLOB; vt++) - { - SKIPTESTS(vt); - - memset(&vSrc, 0, sizeof(vSrc)); - V_VT(&vSrc) = vt | ExtraFlags[i]; - - hExpected = DISP_E_BADVARTYPE; - if (!(ExtraFlags[i] & VT_BYREF)) - { - /* if src is not by-reference, acts as VariantCopy() */ - if (vt != VT_CLSID && IsValidVariantClearVT(vt, ExtraFlags[i])) - hExpected = S_OK; - } - else - { - if (vt == VT_SAFEARRAY || vt == VT_BSTR || vt == VT_UNKNOWN || - vt == VT_DISPATCH || vt == VT_RECORD) - continue; /* Need valid ptrs for deep copies */ - - V_BYREF(&vSrc) = &buffer; - hExpected = E_INVALIDARG; - - if ((vt == VT_I8 || vt == VT_UI8) && - ExtraFlags[i] == VT_BYREF) - { - if (HAVE_OLEAUT32_I8) - hExpected = S_OK; /* Only valid if I8 is a known type */ - } - else if (IsValidVariantCopyIndVT(vt, ExtraFlags[i])) - hExpected = S_OK; - } - - hres = VariantCopyInd(&vSrc, &vSrc); - - ok(hres == hExpected, - "CopyInd(src==dst): expected 0x%X, got 0x%X for src==dst vt %d|0x%X\n", - hExpected, hres, vt, ExtraFlags[i]); - } - } - - /* Bad dest */ - memset(&vSrc, 0, sizeof(vSrc)); - V_VT(&vSrc) = VT_UI1|VT_BYREF; - V_BYREF(&vSrc) = &buffer; - - for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]) && !IS_ANCIENT; i++) - { - for (vt = 0; vt <= VT_BSTR_BLOB; vt++) - { - SKIPTESTS(vt); - - memset(&vDst, 0, sizeof(vDst)); - V_VT(&vDst) = vt | ExtraFlags[i]; - - hExpected = DISP_E_BADVARTYPE; - - if (IsValidVariantClearVT(vt, ExtraFlags[i])) - hExpected = S_OK; - - hres = VariantCopyInd(&vDst, &vSrc); - - ok(hres == hExpected, - "CopyInd(bad dst): expected 0x%X, got 0x%X for dst vt %d|0x%X\n", - hExpected, hres, vt, ExtraFlags[i]); - if (hres == S_OK) - ok(V_VT(&vDst) == VT_UI1, - "CopyInd(bad dst): expected vt = VT_UI1, got %d\n", V_VT(&vDst)); - } - } - - /* bad src */ - for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]) && !IS_ANCIENT; i++) - { - if (ExtraFlags[i] & VT_ARRAY) - continue; /* Native crashes on NULL safearray */ - - for (vt = 0; vt <= VT_BSTR_BLOB; vt++) - { - SKIPTESTS(vt); - - memset(&vDst, 0, sizeof(vDst)); - V_VT(&vDst) = VT_EMPTY; - - memset(&vSrc, 0, sizeof(vSrc)); - V_VT(&vSrc) = vt | ExtraFlags[i]; - - hExpected = DISP_E_BADVARTYPE; - if (!(ExtraFlags[i] & VT_BYREF)) - { - /* if src is not by-reference, acts as VariantCopy() */ - if (vt != VT_CLSID && IsValidVariantClearVT(vt, ExtraFlags[i])) - hExpected = S_OK; - } - else - { - if (vt == VT_SAFEARRAY || vt == VT_BSTR || vt == VT_UNKNOWN || - vt == VT_DISPATCH || vt == VT_RECORD) - continue; /* Need valid ptrs for deep copies, see vartype.c */ - - V_BYREF(&vSrc) = &buffer; - - hExpected = E_INVALIDARG; - - if ((vt == VT_I8 || vt == VT_UI8) && - ExtraFlags[i] == VT_BYREF) - { - if (HAVE_OLEAUT32_I8) - hExpected = S_OK; /* Only valid if I8 is a known type */ - } - else if (IsValidVariantCopyIndVT(vt, ExtraFlags[i])) - hExpected = S_OK; - } - - hres = VariantCopyInd(&vDst, &vSrc); - - ok(hres == hExpected, - "CopyInd(bad src): expected 0x%X, got 0x%X for src vt %d|0x%X\n", - hExpected, hres, vt, ExtraFlags[i]); - if (hres == S_OK) - { - if (vt == VT_VARIANT && ExtraFlags[i] == VT_BYREF) - { - /* Type of vDst should be the type of the referenced variant. - * Since we set the buffer to all zeros, its type should be - * VT_EMPTY. - */ - ok(V_VT(&vDst) == VT_EMPTY, - "CopyInd(bad src): expected dst vt = VT_EMPTY, got %d|0x%X\n", - V_VT(&vDst) & VT_TYPEMASK, V_VT(&vDst) & ~VT_TYPEMASK); - } - else - { - ok(V_VT(&vDst) == (vt|(ExtraFlags[i] & ~VT_BYREF)), - "CopyInd(bad src): expected dst vt = %d|0x%X, got %d|0x%X\n", - vt, ExtraFlags[i] & ~VT_BYREF, - V_VT(&vDst) & VT_TYPEMASK, V_VT(&vDst) & ~VT_TYPEMASK); - } - VariantClear(&vDst); - } - } - } - - /* By-reference variants are dereferenced */ - V_VT(&vRef) = VT_UI1; - V_UI1(&vRef) = 0x77; - V_VT(&vSrc) = VT_VARIANT|VT_BYREF; - V_VARIANTREF(&vSrc) = &vRef; - VariantInit(&vDst); - - hres = VariantCopyInd(&vDst, &vSrc); - ok(V_VT(&vDst) == VT_UI1 && V_UI1(&vDst) == 0x77, - "CopyInd(deref): expected dst vt = VT_UI1, val 0x77, got %d|0x%X, 0x%2X\n", - V_VT(&vDst) & VT_TYPEMASK, V_VT(&vDst) & ~VT_TYPEMASK, V_UI1(&vDst)); - - /* By-reference variant to a by-reference type succeeds */ - V_VT(&vRef) = VT_UI1|VT_BYREF; - V_UI1REF(&vRef) = buffer; buffer[0] = 0x88; - V_VT(&vSrc) = VT_VARIANT|VT_BYREF; - V_VARIANTREF(&vSrc) = &vRef; - VariantInit(&vDst); - - hres = VariantCopyInd(&vDst, &vSrc); - ok(V_VT(&vDst) == VT_UI1 && V_UI1(&vDst) == 0x88, - "CopyInd(deref): expected dst vt = VT_UI1, val 0x77, got %d|0x%X, 0x%2X\n", - V_VT(&vDst) & VT_TYPEMASK, V_VT(&vDst) & ~VT_TYPEMASK, V_UI1(&vDst)); - - /* But a by-reference variant to a by-reference variant fails */ - V_VT(&vRef2) = VT_UI1; - V_UI1(&vRef2) = 0x77; - V_VT(&vRef) = VT_VARIANT|VT_BYREF; - V_VARIANTREF(&vRef) = &vRef2; - V_VT(&vSrc) = VT_VARIANT|VT_BYREF; - V_VARIANTREF(&vSrc) = &vRef; - VariantInit(&vDst); - - hres = VariantCopyInd(&vDst, &vSrc); - ok(hres == E_INVALIDARG, - "CopyInd(ref->ref): expected E_INVALIDARG, got 0x%08x\n", hres); -} - -static HRESULT (WINAPI *pVarParseNumFromStr)(OLECHAR*,LCID,ULONG,NUMPARSE*,BYTE*); - -/* Macros for converting and testing the result of VarParseNumFromStr */ -#define FAILDIG 255 - -static HRESULT convert_str( const char *str, INT dig, ULONG flags, - NUMPARSE *np, BYTE rgb[128], LCID lcid ) -{ - OLECHAR buff[128]; - MultiByteToWideChar( CP_ACP,0, str, -1, buff, sizeof(buff)/sizeof(WCHAR) ); - memset( rgb, FAILDIG, 128 ); - memset( np, 255, sizeof(*np) ); - np->cDig = dig; - np->dwInFlags = flags; - return pVarParseNumFromStr( buff, lcid, LOCALE_NOUSEROVERRIDE, np, rgb); -} - -static void expect_NumFromStr( int line, HRESULT hres, NUMPARSE *np, INT a, ULONG b, ULONG c, - INT d, INT e, INT f ) -{ - if (hres == (HRESULT)S_OK) - { - ok_(__FILE__,line)(np->cDig == a, "Expected cDig = %d, got %d\n", a, np->cDig); - ok_(__FILE__,line)(np->dwInFlags == b, "Expected dwInFlags = 0x%x, got 0x%x\n", b, np->dwInFlags); - ok_(__FILE__,line)(np->dwOutFlags == c, "Expected dwOutFlags = 0x%x, got 0x%x\n", c, np->dwOutFlags); - ok_(__FILE__,line)(np->cchUsed == d, "Expected cchUsed = %d, got %d\n", d, np->cchUsed); - ok_(__FILE__,line)(np->nBaseShift == e, "Expected nBaseShift = %d, got %d\n", e, np->nBaseShift); - ok_(__FILE__,line)(np->nPwr10 == f, "Expected nPwr10 = %d, got %d\n", f, np->nPwr10); - } -} - -#define CONVERTN(str,dig,flags) hres = convert_str( str, dig, flags, &np, rgb, lcid ) -#define CONVERT(str,flags) CONVERTN(str,sizeof(rgb),flags) -#define EXPECT(a,b,c,d,e,f) expect_NumFromStr( __LINE__, hres, &np, a, b, c, d, e, f ) -#define EXPECTRGB(a,b) ok(rgb[a] == b, "Digit[%d], expected %d, got %d\n", a, b, rgb[a]) -#define EXPECTFAIL ok(hres == (HRESULT)DISP_E_TYPEMISMATCH, "Call succeeded, hres = %08x\n", hres) -#define EXPECT2(a,b) EXPECTRGB(0,a); EXPECTRGB(1,b) - -static void test_VarParseNumFromStr(void) -{ - HRESULT hres; - /* Ensure all tests are using the same locale characters for '$', ',' etc */ - LCID lcid = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT); - NUMPARSE np; - BYTE rgb[128]; - - /** No flags **/ - - CHECKPTR(VarParseNumFromStr); - - /* Consume a single digit */ - CONVERT("7", 0); - EXPECT(1,0,0,1,0,0); - EXPECT2(7,FAILDIG); - - /* cDig is not literal digits - zeros are suppressed and nPwr10 is increased */ - CONVERT("10", 0); - EXPECT(1,0,0,2,0,1); - /* Note: Win32 writes the trailing zeros if they are within cDig's limits, - * but then excludes them from the returned cDig count. - * In our implementation we don't bother writing them at all. - */ - EXPECTRGB(0, 1); - - /* if cDig is too small and numbers follow, sets INEXACT */ - CONVERTN("11",1, 0); - EXPECT(1,0,NUMPRS_INEXACT,2,0,1); - EXPECT2(1,FAILDIG); - - /* Strips leading zeros */ - CONVERT("01", 0); - EXPECT(1,0,0,2,0,0); - EXPECT2(1,FAILDIG); - - /* Strips leading zeros */ - CONVERTN("01",1, 0); - EXPECT(1,0,0,2,0,0); - EXPECT2(1,FAILDIG); - - - /* Fails on non digits */ - CONVERT("a", 0); - EXPECTFAIL; - EXPECTRGB(0,FAILDIG); - - /** NUMPRS_LEADING_WHITE/NUMPRS_TRAILING_WHITE **/ - - /* Without flag, fails on whitespace */ - CONVERT(" 0", 0); - EXPECTFAIL; - EXPECTRGB(0,FAILDIG); - - - /* With flag, consumes whitespace */ - CONVERT(" 0", NUMPRS_LEADING_WHITE); - EXPECT(1,NUMPRS_LEADING_WHITE,NUMPRS_LEADING_WHITE,2,0,0); - EXPECT2(0,FAILDIG); - - /* Test TAB once, then assume it acts as space for all cases */ - CONVERT("\t0", NUMPRS_LEADING_WHITE); - EXPECT(1,NUMPRS_LEADING_WHITE,NUMPRS_LEADING_WHITE,2,0,0); - EXPECT2(0,FAILDIG); - - - /* Doesn't pick up trailing whitespace without flag */ - CONVERT("0 ", 0); - EXPECT(1,0,0,1,0,0); - EXPECT2(0,FAILDIG); - - /* With flag, consumes trailing whitespace */ - CONVERT("0 ", NUMPRS_TRAILING_WHITE); - EXPECT(1,NUMPRS_TRAILING_WHITE,NUMPRS_TRAILING_WHITE,2,0,0); - EXPECT2(0,FAILDIG); - - /* Leading flag only consumes leading */ - CONVERT(" 0 ", NUMPRS_LEADING_WHITE); - EXPECT(1,NUMPRS_LEADING_WHITE,NUMPRS_LEADING_WHITE,2,0,0); - EXPECT2(0,FAILDIG); - - /* Both flags consumes both */ - CONVERT(" 0 ", NUMPRS_LEADING_WHITE|NUMPRS_TRAILING_WHITE); - EXPECT(1,NUMPRS_LEADING_WHITE|NUMPRS_TRAILING_WHITE,NUMPRS_LEADING_WHITE|NUMPRS_TRAILING_WHITE,3,0,0); - EXPECT2(0,FAILDIG); - - /** NUMPRS_LEADING_PLUS/NUMPRS_TRAILING_PLUS **/ - - /* Without flag, fails on + */ - CONVERT("+0", 0); - EXPECTFAIL; - EXPECTRGB(0,FAILDIG); - - /* With flag, consumes + */ - CONVERT("+0", NUMPRS_LEADING_PLUS); - EXPECT(1,NUMPRS_LEADING_PLUS,NUMPRS_LEADING_PLUS,2,0,0); - EXPECT2(0,FAILDIG); - - /* Without flag, doesn't consume trailing + */ - CONVERT("0+", 0); - EXPECT(1,0,0,1,0,0); - EXPECT2(0,FAILDIG); - - /* With flag, consumes trailing + */ - CONVERT("0+", NUMPRS_TRAILING_PLUS); - EXPECT(1,NUMPRS_TRAILING_PLUS,NUMPRS_TRAILING_PLUS,2,0,0); - EXPECT2(0,FAILDIG); - - /* With leading flag, doesn't consume trailing + */ - CONVERT("+0+", NUMPRS_LEADING_PLUS); - EXPECT(1,NUMPRS_LEADING_PLUS,NUMPRS_LEADING_PLUS,2,0,0); - EXPECT2(0,FAILDIG); - - /* Trailing + doesn't get consumed if we specify both (unlike whitespace) */ - CONVERT("+0+", NUMPRS_LEADING_PLUS|NUMPRS_TRAILING_PLUS); - EXPECT(1,NUMPRS_LEADING_PLUS|NUMPRS_TRAILING_PLUS,NUMPRS_LEADING_PLUS,2,0,0); - EXPECT2(0,FAILDIG); - - /** NUMPRS_LEADING_MINUS/NUMPRS_TRAILING_MINUS **/ - - /* Without flag, fails on - */ - CONVERT("-0", 0); - EXPECTFAIL; - EXPECTRGB(0,FAILDIG); - - /* With flag, consumes - */ - CONVERT("-0", NUMPRS_LEADING_MINUS); - EXPECT(1,NUMPRS_LEADING_MINUS,NUMPRS_NEG|NUMPRS_LEADING_MINUS,2,0,0); - EXPECT2(0,FAILDIG); - - /* Without flag, doesn't consume trailing - */ - CONVERT("0-", 0); - EXPECT(1,0,0,1,0,0); - EXPECT2(0,FAILDIG); - - /* With flag, consumes trailing - */ - CONVERT("0-", NUMPRS_TRAILING_MINUS); - EXPECT(1,NUMPRS_TRAILING_MINUS,NUMPRS_NEG|NUMPRS_TRAILING_MINUS,2,0,0); - EXPECT2(0,FAILDIG); - - /* With leading flag, doesn't consume trailing - */ - CONVERT("-0-", NUMPRS_LEADING_MINUS); - EXPECT(1,NUMPRS_LEADING_MINUS,NUMPRS_NEG|NUMPRS_LEADING_MINUS,2,0,0); - EXPECT2(0,FAILDIG); - - /* Trailing - doesn't get consumed if we specify both (unlike whitespace) */ - CONVERT("-0-", NUMPRS_LEADING_MINUS|NUMPRS_TRAILING_MINUS); - EXPECT(1,NUMPRS_LEADING_MINUS|NUMPRS_TRAILING_MINUS,NUMPRS_NEG|NUMPRS_LEADING_MINUS,2,0,0); - EXPECT2(0,FAILDIG); - - /** NUMPRS_HEX_OCT **/ - - /* Could be hex, octal or decimal - With flag reads as decimal */ - CONVERT("0", NUMPRS_HEX_OCT); - EXPECT(1,NUMPRS_HEX_OCT,0,1,0,0); - EXPECT2(0,FAILDIG); - - /* Doesn't recognise hex in .asm syntax */ - CONVERT("0h", NUMPRS_HEX_OCT); - EXPECT(1,NUMPRS_HEX_OCT,0,1,0,0); - EXPECT2(0,FAILDIG); - - /* Doesn't fail with valid leading string but no digits */ - CONVERT("0x", NUMPRS_HEX_OCT); - EXPECT(1,NUMPRS_HEX_OCT,0,1,0,0); - EXPECT2(0,FAILDIG); - - /* Doesn't recognise hex format numbers at all! */ - CONVERT("0x0", NUMPRS_HEX_OCT); - EXPECT(1,NUMPRS_HEX_OCT,0,1,0,0); - EXPECT2(0,FAILDIG); - - /* Doesn't recognise plain hex digits either */ - CONVERT("FE", NUMPRS_HEX_OCT); - EXPECTFAIL; - EXPECTRGB(0,FAILDIG); - - /* Octal */ - CONVERT("0100", NUMPRS_HEX_OCT); - EXPECT(1,NUMPRS_HEX_OCT,0,4,0,2); - EXPECTRGB(0,1); - EXPECTRGB(1,0); - EXPECTRGB(2,0); - EXPECTRGB(3,FAILDIG); - - /* VB hex */ - CONVERT("&HF800", NUMPRS_HEX_OCT); - EXPECT(4,NUMPRS_HEX_OCT,0x40,6,4,0); - EXPECTRGB(0,15); - EXPECTRGB(1,8); - EXPECTRGB(2,0); - EXPECTRGB(3,0); - EXPECTRGB(4,FAILDIG); - - /* VB hex lower case and leading zero */ - CONVERT("&h0abcdef", NUMPRS_HEX_OCT); - EXPECT(6,NUMPRS_HEX_OCT,0x40,9,4,0); - EXPECTRGB(0,10); - EXPECTRGB(1,11); - EXPECTRGB(2,12); - EXPECTRGB(3,13); - EXPECTRGB(4,14); - EXPECTRGB(5,15); - EXPECTRGB(6,FAILDIG); - - /* VB oct */ - CONVERT("&O300", NUMPRS_HEX_OCT); - EXPECT(3,NUMPRS_HEX_OCT,0x40,5,3,0); - EXPECTRGB(0,3); - EXPECTRGB(1,0); - EXPECTRGB(2,0); - EXPECTRGB(3,FAILDIG); - - /* VB oct lower case and leading zero */ - CONVERT("&o0777", NUMPRS_HEX_OCT); - EXPECT(3,NUMPRS_HEX_OCT,0x40,6,3,0); - EXPECTRGB(0,7); - EXPECTRGB(1,7); - EXPECTRGB(2,7); - EXPECTRGB(3,FAILDIG); - - /* VB oct char bigger than 7 */ - CONVERT("&o128", NUMPRS_HEX_OCT); -/* - Native versions 2.x of oleaut32 allow this to succeed: later versions and Wine don't - EXPECTFAIL; - EXPECTRGB(0,FAILDIG); -*/ - /** NUMPRS_PARENS **/ - - /* Empty parens = error */ - CONVERT("()", NUMPRS_PARENS); - EXPECTFAIL; - EXPECTRGB(0,FAILDIG); - - /* With flag, trailing parens not consumed */ - CONVERT("0()", NUMPRS_PARENS); - EXPECT(1,NUMPRS_PARENS,0,1,0,0); - EXPECT2(0,FAILDIG); - - /* With flag, Number in parens made negative and parens consumed */ - CONVERT("(0)", NUMPRS_PARENS); - EXPECT(1,NUMPRS_PARENS,NUMPRS_NEG|NUMPRS_PARENS,3,0,0); - EXPECT2(0,FAILDIG); - - /** NUMPRS_THOUSANDS **/ - - /* With flag, thousands sep. not needed */ - CONVERT("0", NUMPRS_THOUSANDS); - EXPECT(1,NUMPRS_THOUSANDS,0,1,0,0); - EXPECT2(0,FAILDIG); - - /* With flag, thousands sep. and following digits consumed */ - CONVERT("1,000", NUMPRS_THOUSANDS); - EXPECT(1,NUMPRS_THOUSANDS,NUMPRS_THOUSANDS,5,0,3); - EXPECTRGB(0,1); - - /* With flag and decimal point, thousands sep. but not decimals consumed */ - CONVERT("1,000.0", NUMPRS_THOUSANDS); - EXPECT(1,NUMPRS_THOUSANDS,NUMPRS_THOUSANDS,5,0,3); - EXPECTRGB(0,1); - - /** NUMPRS_CURRENCY **/ - - /* Without flag, chokes on currency sign */ - CONVERT("$11", 0); - EXPECTFAIL; - EXPECTRGB(0,FAILDIG); - - /* With flag, consumes currency sign */ - CONVERT("$11", NUMPRS_CURRENCY); - EXPECT(2,NUMPRS_CURRENCY,NUMPRS_CURRENCY,3,0,0); - EXPECT2(1,1); - EXPECTRGB(2,FAILDIG); - - /* With flag only, doesn't consume decimal point */ - CONVERT("$11.1", NUMPRS_CURRENCY); - EXPECT(2,NUMPRS_CURRENCY,NUMPRS_CURRENCY,3,0,0); - EXPECT2(1,1); - EXPECTRGB(2,FAILDIG); - - /* With flag and decimal flag, consumes decimal point and following digits */ - CONVERT("$11.1", NUMPRS_CURRENCY|NUMPRS_DECIMAL); - EXPECT(3,NUMPRS_CURRENCY|NUMPRS_DECIMAL,NUMPRS_CURRENCY|NUMPRS_DECIMAL,5,0,-1); - EXPECT2(1,1); - EXPECTRGB(2,1); - EXPECTRGB(3,FAILDIG); - - /* Thousands flag can only be used with currency */ - CONVERT("$1,234", NUMPRS_CURRENCY|NUMPRS_THOUSANDS); - EXPECT(4,NUMPRS_CURRENCY|NUMPRS_THOUSANDS,NUMPRS_CURRENCY|NUMPRS_THOUSANDS,6,0,0); - EXPECT2(1,2); - EXPECTRGB(2,3); - EXPECTRGB(3,4); - EXPECTRGB(4,FAILDIG); - - /** NUMPRS_DECIMAL **/ - - /* With flag, consumes decimal point */ - CONVERT("1.1", NUMPRS_DECIMAL); - EXPECT(2,NUMPRS_DECIMAL,NUMPRS_DECIMAL,3,0,-1); - EXPECT2(1,1); - EXPECTRGB(2,FAILDIG); - - /* With flag, consumes decimal point. Skipping the decimal part is not an error */ - CONVERT("1.", NUMPRS_DECIMAL); - EXPECT(1,NUMPRS_DECIMAL,NUMPRS_DECIMAL,2,0,0); - EXPECT2(1,FAILDIG); - - /* Consumes only one decimal point */ - CONVERT("1.1.", NUMPRS_DECIMAL); - EXPECT(2,NUMPRS_DECIMAL,NUMPRS_DECIMAL,3,0,-1); - EXPECT2(1,1); - EXPECTRGB(2,FAILDIG); - - /** NUMPRS_EXPONENT **/ - - /* Without flag, doesn't consume exponent */ - CONVERT("1e1", 0); - EXPECT(1,0,0,1,0,0); - EXPECT2(1,FAILDIG); - - /* With flag, consumes exponent */ - CONVERT("1e1", NUMPRS_EXPONENT); - EXPECT(1,NUMPRS_EXPONENT,NUMPRS_EXPONENT,3,0,1); - EXPECT2(1,FAILDIG); - - /* Negative exponents are accepted without flags */ - CONVERT("1e-1", NUMPRS_EXPONENT); - EXPECT(1,NUMPRS_EXPONENT,NUMPRS_EXPONENT,4,0,-1); - EXPECT2(1,FAILDIG); - - /* As are positive exponents and leading exponent 0s */ - CONVERT("1e+01", NUMPRS_EXPONENT); - EXPECT(1,NUMPRS_EXPONENT,NUMPRS_EXPONENT,5,0,1); - EXPECT2(1,FAILDIG); - - /* The same for zero exponents */ - CONVERT("1e0", NUMPRS_EXPONENT); - EXPECT(1,NUMPRS_EXPONENT,NUMPRS_EXPONENT,3,0,0); - EXPECT2(1,FAILDIG); - - /* Sign on a zero exponent doesn't matter */ - CONVERT("1e+0", NUMPRS_EXPONENT); - EXPECT(1,NUMPRS_EXPONENT,NUMPRS_EXPONENT,4,0,0); - EXPECT2(1,FAILDIG); - - CONVERT("1e-0", NUMPRS_EXPONENT); - EXPECT(1,NUMPRS_EXPONENT,NUMPRS_EXPONENT,4,0,0); - EXPECT2(1,FAILDIG); - - /* Doesn't consume a real number exponent */ - CONVERT("1e1.", NUMPRS_EXPONENT); - EXPECT(1,NUMPRS_EXPONENT,NUMPRS_EXPONENT,3,0,1); - EXPECT2(1,FAILDIG); - - /* Powers of 10 are calculated from the position of any decimal point */ - CONVERT("1.5e20", NUMPRS_EXPONENT|NUMPRS_DECIMAL); - EXPECT(2,NUMPRS_EXPONENT|NUMPRS_DECIMAL,NUMPRS_EXPONENT|NUMPRS_DECIMAL,6,0,19); - EXPECT2(1,5); - - CONVERT("1.5e-20", NUMPRS_EXPONENT|NUMPRS_DECIMAL); - EXPECT(2,NUMPRS_EXPONENT|NUMPRS_DECIMAL,NUMPRS_EXPONENT|NUMPRS_DECIMAL,7,0,-21); - EXPECT2(1,5); - - /** NUMPRS_USE_ALL **/ - - /* Flag expects all digits */ - CONVERT("0", NUMPRS_USE_ALL); - EXPECT(1,NUMPRS_USE_ALL,0,1,0,0); - EXPECT2(0,FAILDIG); - - /* Rejects anything trailing */ - CONVERT("0 ", NUMPRS_USE_ALL); - EXPECTFAIL; - EXPECT2(0,FAILDIG); - - /* Unless consumed by trailing flag */ - CONVERT("0 ", NUMPRS_USE_ALL|NUMPRS_TRAILING_WHITE); - EXPECT(1,NUMPRS_USE_ALL|NUMPRS_TRAILING_WHITE,NUMPRS_TRAILING_WHITE,2,0,0); - EXPECT2(0,FAILDIG); - - /** Combinations **/ - - /* Leading whitespace and plus, doesn't consume trailing whitespace */ - CONVERT("+ 0 ", NUMPRS_LEADING_PLUS|NUMPRS_LEADING_WHITE); - EXPECT(1,NUMPRS_LEADING_PLUS|NUMPRS_LEADING_WHITE,NUMPRS_LEADING_PLUS|NUMPRS_LEADING_WHITE,3,0,0); - EXPECT2(0,FAILDIG); - - /* Order of whitespace and plus is unimportant */ - CONVERT(" +0", NUMPRS_LEADING_PLUS|NUMPRS_LEADING_WHITE); - EXPECT(1,NUMPRS_LEADING_PLUS|NUMPRS_LEADING_WHITE,NUMPRS_LEADING_PLUS|NUMPRS_LEADING_WHITE,3,0,0); - EXPECT2(0,FAILDIG); - - /* Leading whitespace can be repeated */ - CONVERT(" + 0", NUMPRS_LEADING_PLUS|NUMPRS_LEADING_WHITE); - EXPECT(1,NUMPRS_LEADING_PLUS|NUMPRS_LEADING_WHITE,NUMPRS_LEADING_PLUS|NUMPRS_LEADING_WHITE,4,0,0); - EXPECT2(0,FAILDIG); - - /* But plus/minus etc. cannot */ - CONVERT("+ +0", NUMPRS_LEADING_PLUS|NUMPRS_LEADING_WHITE); - EXPECTFAIL; - EXPECTRGB(0,FAILDIG); - - /* Inexact is not set if trailing zeros are removed */ - CONVERTN("10", 1, 0); - EXPECT(1,0,0,2,0,1); - EXPECT2(1,FAILDIG); - - /* Make sure a leading 0 is stripped but decimals after it get read */ - CONVERT("-0.51", NUMPRS_STD); - EXPECT(2,NUMPRS_STD,NUMPRS_NEG|NUMPRS_DECIMAL|NUMPRS_LEADING_MINUS,5,0,-2); - EXPECT2(5,1); - - /* Keep trailing zeros on whole number part of a decimal */ - CONVERT("10.1", NUMPRS_STD); - EXPECT(3,NUMPRS_STD,NUMPRS_DECIMAL,4,0,-1); - EXPECT2(1,0); - EXPECTRGB(2,1); - - /* Zeros after decimal sign */ - CONVERT("0.01", NUMPRS_STD); - EXPECT(1,NUMPRS_STD,NUMPRS_DECIMAL,4,0,-2); - EXPECT2(1,FAILDIG); - - /* Trailing zeros after decimal part */ - CONVERT("0.10", NUMPRS_STD); - EXPECT(1,NUMPRS_STD,NUMPRS_DECIMAL,4,0,-1); - EXPECT2(1,0); -} - -static HRESULT (WINAPI *pVarNumFromParseNum)(NUMPARSE*,BYTE*,ULONG,VARIANT*); - -/* Macros for converting and testing the result of VarNumFromParseNum */ -#define SETRGB(indx,val) if (!indx) memset(rgb, FAILDIG, sizeof(rgb)); rgb[indx] = val -#undef CONVERT -#define CONVERT(a,b,c,d,e,f,bits) \ - np.cDig = (a); np.dwInFlags = (b); np.dwOutFlags = (c); np.cchUsed = (d); \ - np.nBaseShift = (e); np.nPwr10 = (f); hres = pVarNumFromParseNum(&np, rgb, bits, &vOut) -static const char *szFailOverflow = "Expected overflow, hres = %08x\n"; -#define EXPECT_OVERFLOW ok(hres == (HRESULT)DISP_E_OVERFLOW, szFailOverflow, hres) -static const char *szFailOk = "Call failed, hres = %08x\n"; -#define EXPECT_OK ok(hres == (HRESULT)S_OK, szFailOk, hres); \ - if (hres == (HRESULT)S_OK) -#define EXPECT_TYPE(typ) ok(V_VT(&vOut) == typ,"Expected Type = " #typ ", got %d\n", V_VT(&vOut)) -#define EXPECT_I1(val) EXPECT_OK { EXPECT_TYPE(VT_I1); \ - ok(V_I1(&vOut) == val, "Expected i1 = %d, got %d\n", (signed char)val, V_I1(&vOut)); } -#define EXPECT_UI1(val) EXPECT_OK { EXPECT_TYPE(VT_UI1); \ - ok(V_UI1(&vOut) == val, "Expected ui1 = %d, got %d\n", (BYTE)val, V_UI1(&vOut)); } -#define EXPECT_I2(val) EXPECT_OK { EXPECT_TYPE(VT_I2); \ - ok(V_I2(&vOut) == val, "Expected i2 = %d, got %d\n", (SHORT)val, V_I2(&vOut)); } -#define EXPECT_UI2(val) EXPECT_OK { EXPECT_TYPE(VT_UI2); \ - ok(V_UI2(&vOut) == val, "Expected ui2 = %d, got %d\n", (USHORT)val, V_UI2(&vOut)); } -#define EXPECT_I4(val) EXPECT_OK { EXPECT_TYPE(VT_I4); \ - ok(V_I4(&vOut) == val, "Expected i4 = %d, got %d\n", (LONG)val, V_I4(&vOut)); } -#define EXPECT_UI4(val) EXPECT_OK { EXPECT_TYPE(VT_UI4); \ - ok(V_UI4(&vOut) == val, "Expected ui4 = %d, got %d\n", (ULONG)val, V_UI4(&vOut)); } -#define EXPECT_I8(high,low) EXPECT_OK { EXPECT_TYPE(VT_I8); \ - ok(V_I8(&vOut) == ((((LONG64)(high))<<32)|(low)), "Expected i8 = %x%08x, got %x%08x\n", \ - (LONG)(high), (LONG)(low), (LONG)(V_I8(&vOut)>>32), (LONG)V_I8(&vOut) ); } -#define EXPECT_UI8(val) EXPECT_OK { EXPECT_TYPE(VT_UI8); \ - ok(V_UI8(&vOut) == val, "Expected ui8 = 0x%x%08x, got 0x%x%08x\n", \ - (DWORD)((ULONG64)val >> 32), (DWORD)(ULONG64)val, (DWORD)(V_UI8(&vOut) >> 32), (DWORD)V_UI8(&vOut)); } -#define EXPECT_R4(val) EXPECT_OK { EXPECT_TYPE(VT_R4); \ - ok(V_R4(&vOut) == val, "Expected r4 = %f, got %f\n", val, V_R4(&vOut)); } -#define EXPECT_R8(val) EXPECT_OK { EXPECT_TYPE(VT_R8); \ - ok(V_R8(&vOut) == val, "Expected r8 = %g, got %g\n", val, V_R8(&vOut)); } -#define CY_MULTIPLIER 10000 -#define EXPECT_CY(val) EXPECT_OK { EXPECT_TYPE(VT_CY); \ - ok(V_CY(&vOut).int64 == (LONG64)(val * CY_MULTIPLIER), "Expected r8 = 0x%x%08x, got 0x%x%08x\n", \ - (DWORD)((LONG64)val >> 23), (DWORD)(LONG64)val, (DWORD)(V_CY(&vOut).int64 >>32), (DWORD)V_CY(&vOut).int64); } -#define EXPECT_DECIMAL(valHi, valMid, valLo) EXPECT_OK { EXPECT_TYPE(VT_DECIMAL); \ - ok((V_DECIMAL(&vOut).Hi32 == valHi) && (S1(U1(V_DECIMAL(&vOut))).Mid32 == valMid) && \ - (S1(U1(V_DECIMAL(&vOut))).Lo32 == valLo), \ - "Expected decimal = %x/0x%x%08x, got %x/0x%x%08x\n", valHi, valMid, valLo, \ - V_DECIMAL(&vOut).Hi32, S1(U1(V_DECIMAL(&vOut))).Mid32, S1(U1(V_DECIMAL(&vOut))).Lo32); } - -static void test_VarNumFromParseNum(void) -{ - HRESULT hres; - NUMPARSE np; - BYTE rgb[128]; - VARIANT vOut; - - CHECKPTR(VarNumFromParseNum); - - /* Convert the number 1 to different types */ - SETRGB(0, 1); CONVERT(1,0,0,1,0,0, VTBIT_I1); EXPECT_I1(1); - SETRGB(0, 1); CONVERT(1,0,0,1,0,0, VTBIT_UI1); EXPECT_UI1(1); - /* Prefers a signed type to unsigned of the same size */ - SETRGB(0, 1); CONVERT(1,0,0,1,0,0, VTBIT_I1|VTBIT_UI1); EXPECT_I1(1); - /* But takes the smaller size if possible */ - SETRGB(0, 1); CONVERT(1,0,0,1,0,0, VTBIT_I2|VTBIT_UI1); EXPECT_UI1(1); - - /* Try different integer sizes */ -#define INTEGER_VTBITS (VTBIT_I1|VTBIT_UI1|VTBIT_I2|VTBIT_UI2|VTBIT_I4|VTBIT_UI4|VTBIT_I8|VTBIT_UI8) - - SETRGB(0, 1); CONVERT(1,0,0,1,0,0, INTEGER_VTBITS); EXPECT_I1(1); - /* 127 */ - SETRGB(0, 1); SETRGB(1, 2); SETRGB(2, 7); - CONVERT(3,0,0,3,0,0, INTEGER_VTBITS); EXPECT_I1(127); - /* 128 */ - SETRGB(0, 1); SETRGB(1, 2); SETRGB(2, 8); - CONVERT(3,0,0,3,0,0, INTEGER_VTBITS); EXPECT_UI1(128); - /* 255 */ - SETRGB(0, 2); SETRGB(1, 5); SETRGB(2, 5); - CONVERT(3,0,0,3,0,0, INTEGER_VTBITS); EXPECT_UI1(255); - /* 256 */ - SETRGB(0, 2); SETRGB(1, 5); SETRGB(2, 6); - CONVERT(3,0,0,3,0,0, INTEGER_VTBITS); EXPECT_I2(256); - /* 32767 */ - SETRGB(0, 3); SETRGB(1, 2); SETRGB(2, 7); SETRGB(3, 6); SETRGB(4, 7); - CONVERT(5,0,0,5,0,0, INTEGER_VTBITS); EXPECT_I2(32767); - /* 32768 */ - SETRGB(0, 3); SETRGB(1, 2); SETRGB(2, 7); SETRGB(3, 6); SETRGB(4, 8); - CONVERT(5,0,0,5,0,0, INTEGER_VTBITS); EXPECT_UI2(32768); - - /* Assume the above pattern holds for remaining positive integers; test negative */ - - /* -128 */ - SETRGB(0, 1); SETRGB(1, 2); SETRGB(2, 8); - CONVERT(3,0,NUMPRS_NEG,3,0,0, INTEGER_VTBITS); EXPECT_I1(-128); - /* -129 */ - SETRGB(0, 1); SETRGB(1, 2); SETRGB(2, 9); - CONVERT(3,0,NUMPRS_NEG,3,0,0, INTEGER_VTBITS); EXPECT_I2(-129); - /* -32768 */ - SETRGB(0, 3); SETRGB(1, 2); SETRGB(2, 7); SETRGB(3, 6); SETRGB(4, 8); - CONVERT(5,0,NUMPRS_NEG,5,0,0, INTEGER_VTBITS); EXPECT_I2(-32768); - /* -32768 */ - SETRGB(0, 3); SETRGB(1, 2); SETRGB(2, 7); SETRGB(3, 6); SETRGB(4, 9); - CONVERT(5,0,NUMPRS_NEG,5,0,0, INTEGER_VTBITS); EXPECT_I4(-32769); - - /* Assume the above pattern holds for remaining negative integers */ - - /* Test hexadecimal conversions */ - SETRGB(0, 1); CONVERT(1,0,0,1,4,0, INTEGER_VTBITS); EXPECT_I1(0x01); - /* 0x7f */ - SETRGB(0, 7); SETRGB(1, 0xf); - CONVERT(2,0,0,2,4,0, INTEGER_VTBITS); EXPECT_I1(0x7f); - SETRGB(0, 7); SETRGB(1, 0xf); - CONVERT(2,0,0,2,4,0, VTBIT_DECIMAL); EXPECT_DECIMAL(0,0,0x7f); - /* 0x7fff */ - SETRGB(0, 7); SETRGB(1, 0xf); SETRGB(2, 0xf); SETRGB(3, 0xf); - CONVERT(4,0,0,4,4,0, INTEGER_VTBITS); EXPECT_I2(0x7fff); - /* 0x7fffffff */ - SETRGB(0, 7); SETRGB(1, 0xf); SETRGB(2, 0xf); SETRGB(3, 0xf); - SETRGB(4, 0xf); SETRGB(5, 0xf); SETRGB(6, 0xf); SETRGB(7, 0xf); - CONVERT(8,0,0,8,4,0, INTEGER_VTBITS); EXPECT_I4(0x7fffffffL); - /* 0x7fffffffffffffff (64 bits) */ - SETRGB(0, 7); SETRGB(1, 0xf); SETRGB(2, 0xf); SETRGB(3, 0xf); - SETRGB(4, 0xf); SETRGB(5, 0xf); SETRGB(6, 0xf); SETRGB(7, 0xf); - SETRGB(8, 0xf); SETRGB(9, 0xf); SETRGB(10, 0xf); SETRGB(11, 0xf); - SETRGB(12, 0xf); SETRGB(13, 0xf); SETRGB(14, 0xf); SETRGB(15, 0xf); - if (HAVE_OLEAUT32_I8) - { - /* We cannot use INTEGER_VTBITS as WinXP and Win2003 are broken(?). They - truncate the number to the smallest integer size requested: - CONVERT(16,0,0,16,4,0, INTEGER_VTBITS); EXPECT_I1((signed char)0xff); */ - CONVERT(16,0,0,16,4,0, VTBIT_I8); EXPECT_I8(0x7fffffff,0xffffffff); - } - - /* Assume the above pattern holds for numbers without hi-bit set, test (preservation of) hi-bit */ - /* 0x82 */ - SETRGB(0, 8); SETRGB(1, 2); - CONVERT(2,0,0,2,4,0, INTEGER_VTBITS); - EXPECT_I1((signed char)0x82); - /* 0x8002 */ - SETRGB(0, 8); SETRGB(1, 0); SETRGB(2, 0); SETRGB(3, 2); - CONVERT(4,0,0,4,4,0, INTEGER_VTBITS); - EXPECT_I2((signed short)0x8002); - /* 0x80000002 */ - SETRGB(0, 8); SETRGB(1, 0); SETRGB(2, 0); SETRGB(3, 0); - SETRGB(4, 0); SETRGB(5, 0); SETRGB(6, 0); SETRGB(7, 2); - CONVERT(8,0,0,8,4,0, INTEGER_VTBITS); EXPECT_I4(0x80000002); - /* 0x8000000000000002 (64 bits) */ - SETRGB(0, 8); SETRGB(1, 0); SETRGB(2, 0); SETRGB(3, 0); - SETRGB(4, 0); SETRGB(5, 0); SETRGB(6, 0); SETRGB(7, 0); - SETRGB(8, 0); SETRGB(9, 0); SETRGB(10, 0); SETRGB(11, 0); - SETRGB(12, 0); SETRGB(13, 0); SETRGB(14, 0); SETRGB(15, 2); - if (HAVE_OLEAUT32_I8) - { - /* We cannot use INTEGER_VTBITS as WinXP and Win2003 are broken(?). They - truncate the number to the smallest integer size requested: - CONVERT(16,0,0,16,4,0, INTEGER_VTBITS & ~VTBIT_I1); - EXPECT_I2((signed short)0x0002); */ - CONVERT(16,0,0,16,4,0, VTBIT_I8); EXPECT_I8(0x80000000,0x00000002); - } - - /* Test (preservation of) hi-bit with STRICT type requesting */ - /* 0x82 */ - SETRGB(0, 8); SETRGB(1, 2); - CONVERT(2,0,0,2,4,0, VTBIT_I1); - EXPECT_I1((signed char)0x82); - /* 0x8002 */ - SETRGB(0, 8); SETRGB(1, 0); SETRGB(2, 0); SETRGB(3, 2); - CONVERT(4,0,0,4,4,0, VTBIT_I2); - EXPECT_I2((signed short)0x8002); - /* 0x80000002 */ - SETRGB(0, 8); SETRGB(1, 0); SETRGB(2, 0); SETRGB(3, 0); - SETRGB(4, 0); SETRGB(5, 0); SETRGB(6, 0); SETRGB(7, 2); - CONVERT(8,0,0,8,4,0, VTBIT_I4); EXPECT_I4(0x80000002); - /* 0x8000000000000002 (64 bits) */ - SETRGB(0, 8); SETRGB(1, 0); SETRGB(2, 0); SETRGB(3, 0); - SETRGB(4, 0); SETRGB(5, 0); SETRGB(6, 0); SETRGB(7, 0); - SETRGB(8, 0); SETRGB(9, 0); SETRGB(10, 0); SETRGB(11, 0); - SETRGB(12, 0); SETRGB(13, 0); SETRGB(14, 0); SETRGB(15, 2); - if (HAVE_OLEAUT32_I8) - { - CONVERT(16,0,0,16,4,0, VTBIT_I8); EXPECT_I8(0x80000000,0x00000002); - } - /* Assume the above pattern holds for numbers with hi-bit set */ - - /* Negative numbers overflow if we have only unsigned outputs */ - /* -1 */ - SETRGB(0, 1); CONVERT(1,0,NUMPRS_NEG,1,0,0, VTBIT_UI1); EXPECT_OVERFLOW; - /* -0.6 */ - SETRGB(0, 6); CONVERT(1,0,NUMPRS_NEG,1,0,~0u, VTBIT_UI1); EXPECT_OVERFLOW; - - /* Except that rounding is done first, so -0.5 to 0 are accepted as 0 */ - /* -0.5 */ - SETRGB(0, 5); CONVERT(1,0,NUMPRS_NEG,1,0,~0u, VTBIT_UI1); EXPECT_UI1(0); - - /* Floating point zero is OK */ - /* 0.00000000E0 */ - SETRGB(0, 0); CONVERT(1,0,NUMPRS_DECIMAL|NUMPRS_EXPONENT,12,0,-8, VTBIT_R8); - EXPECT_R8(0.0); - - /* Float is acceptable for an integer input value */ - SETRGB(0, 1); CONVERT(1,0,0,1,0,0, VTBIT_R4); EXPECT_R4(1.0f); - /* As is double */ - SETRGB(0, 1); CONVERT(1,0,0,1,0,0, VTBIT_R8); EXPECT_R8(1.0); - /* As is currency */ - SETRGB(0, 1); CONVERT(1,0,0,1,0,0, VTBIT_CY); EXPECT_CY(1); - - /* Float is preferred over double */ - SETRGB(0, 1); CONVERT(1,0,0,1,0,0, VTBIT_R4|VTBIT_R8); EXPECT_R4(1.0f); - - /* Double is preferred over currency */ - SETRGB(0, 1); CONVERT(1,0,0,1,0,0, VTBIT_R8|VTBIT_CY); EXPECT_R8(1.0); - - /* Currency is preferred over decimal */ - SETRGB(0, 1); CONVERT(1,0,0,1,0,0, VTBIT_CY|VTBIT_DECIMAL); EXPECT_CY(1); -} - - -static void test_UdateFromDate( int line, DATE dt, ULONG flags, HRESULT r, WORD d, WORD m, WORD y, - WORD h, WORD mn, WORD s, WORD ms, WORD dw, WORD dy) -{ - UDATE ud; - HRESULT res; - - memset(&ud, 0, sizeof(ud)); - res = pVarUdateFromDate(dt, flags, &ud); - ok_(__FILE__,line)(r == res, "Wrong result %x/%x\n", r, res); - if (SUCCEEDED(res)) - ok_(__FILE__,line)(ud.st.wYear == y && ud.st.wMonth == m && ud.st.wDay == d && - ud.st.wHour == h && ud.st.wMinute == mn && ud.st.wSecond == s && - ud.st.wMilliseconds == ms && ud.st.wDayOfWeek == dw && ud.wDayOfYear == dy, - "%.16g expected %d,%d,%d,%d,%d,%d,%d %d %d, got %d,%d,%d,%d,%d,%d,%d %d %d\n", - dt, d, m, y, h, mn, s, ms, dw, dy, - ud.st.wDay, ud.st.wMonth, ud.st.wYear, ud.st.wHour, ud.st.wMinute, - ud.st.wSecond, ud.st.wMilliseconds, ud.st.wDayOfWeek, ud.wDayOfYear ); -} -#define DT2UD(dt,flags,r,d,m,y,h,mn,s,ms,dw,dy) test_UdateFromDate(__LINE__,dt,flags,r,d,m,y,h,mn,s,ms,dw,dy) - -static void test_VarUdateFromDate(void) -{ - CHECKPTR(VarUdateFromDate); - DT2UD(29221.0,0,S_OK,1,1,1980,0,0,0,0,2,1); /* 1 Jan 1980 */ - DT2UD(29222.0,0,S_OK,2,1,1980,0,0,0,0,3,2); /* 2 Jan 1980 */ - DT2UD(33238.0,0,S_OK,31,12,1990,0,0,0,0,1,365); /* 31 Dec 1990 */ - DT2UD(0.0,0,S_OK,30,12,1899,0,0,0,0,6,364); /* 30 Dec 1899 - VT_DATE 0.0 */ - DT2UD(-657434.0,0,S_OK,1,1,100,0,0,0,0,5,1); /* 1 Jan 100 - Min */ - DT2UD(-657435.0,0,E_INVALIDARG,0,0,0,0,0,0,0,0,0); /* < 1 Jan 100 => err */ - DT2UD(2958465.0,0,S_OK,31,12,9999,0,0,0,0,5,365); /* 31 Dec 9999 - Max */ - DT2UD(2958466.0,0,E_INVALIDARG,0,0,0,0,0,0,0,0,0); /* > 31 Dec 9999 => err */ - - /* VAR_VALIDDATE doesn't prevent upper and lower bounds being checked */ - DT2UD(-657435.0,VAR_VALIDDATE,E_INVALIDARG,0,0,0,0,0,0,0,0,0); - DT2UD(2958466.0,VAR_VALIDDATE,E_INVALIDARG,0,0,0,0,0,0,0,0,0); - - /* Times */ - DT2UD(29221.25,0,S_OK,1,1,1980,6,0,0,0,2,1); /* 6 AM */ - DT2UD(29221.33333333,0,S_OK,1,1,1980,8,0,0,0,2,1); /* 8 AM */ - DT2UD(29221.5,0,S_OK,1,1,1980,12,0,0,0,2,1); /* 12 AM */ - DT2UD(29221.9888884444,0,S_OK,1,1,1980,23,44,0,0,2,1); /* 11:44 PM */ - DT2UD(29221.7508765432,0,S_OK,1,1,1980,18,1,16,0,2,1); /* 6:18:02 PM */ -} - - -static void test_DateFromUDate( int line, WORD d, WORD m, WORD y, WORD h, WORD mn, WORD s, WORD ms, - WORD dw, WORD dy, ULONG flags, HRESULT r, DATE dt ) -{ - UDATE ud; - double out; - HRESULT res; - - ud.st.wYear = y; - ud.st.wMonth = m; - ud.st.wDay = d; - ud.st.wHour = h; - ud.st.wMinute = mn; - ud.st.wSecond = s; - ud.st.wMilliseconds = ms; - ud.st.wDayOfWeek = dw; - ud.wDayOfYear = dy; - res = pVarDateFromUdate(&ud, flags, &out); - ok_(__FILE__,line)(r == res && (FAILED(r) || EQ_DOUBLE(out, dt)), - "expected %x, %.16g, got %x, %.16g\n", r, dt, res, out); -} -#define UD2T(d,m,y,h,mn,s,ms,dw,dy,flags,r,dt) test_DateFromUDate(__LINE__,d,m,y,h,mn,s,ms,dw,dy,flags,r,dt) - -static void test_VarDateFromUdate(void) -{ - CHECKPTR(VarDateFromUdate); - UD2T(1,1,1980,0,0,0,0,2,1,0,S_OK,29221.0); /* 1 Jan 1980 */ - UD2T(2,1,1980,0,0,0,0,3,2,0,S_OK,29222.0); /* 2 Jan 1980 */ - UD2T(2,1,1980,0,0,0,0,4,5,0,S_OK,29222.0); /* 2 Jan 1980 */ - UD2T(31,12,1990,0,0,0,0,0,0,0,S_OK,33238.0); /* 31 Dec 1990 */ - UD2T(31,12,90,0,0,0,0,0,0,0,S_OK,33238.0); /* year < 100 is 1900+year! */ - UD2T(30,12,1899,0,0,0,0,6,364,0,S_OK,0.0); /* 30 Dec 1899 - VT_DATE 0.0 */ - UD2T(1,1,100,0,0,0,0,0,0,0,S_OK,-657434.0); /* 1 Jan 100 - Min */ - UD2T(31,12,9999,0,0,0,0,0,0,0,S_OK,2958465.0); /* 31 Dec 9999 - Max */ - UD2T(1,1,10000,0,0,0,0,0,0,0,E_INVALIDARG,0.0); /* > 31 Dec 9999 => err */ - UD2T(1,1,-10000,0,0,0,0,0,0,0,E_INVALIDARG,0.0);/* < -9999 => err */ - - UD2T(30,12,1899,0,0,0,0,0,0,0,S_OK,0.0); /* 30 Dec 1899 0:00:00 */ - UD2T(30,12,1899,0,0,0,999,0,0,0,S_OK,0.0); /* Ignore milliseconds */ - - UD2T(1,1,1980,18,1,16,0,2,1,0,S_OK,29221.75087962963); /* 6:18:02 PM */ - UD2T(1,300,1980,18,1,16,0,2,1,0,S_OK,38322.75087962963); /* Test fwdrolled month */ - UD2T(300,1,1980,18,1,16,0,2,1,0,S_OK,29520.75087962963); /* Test fwdrolled days */ - UD2T(0,1,1980,42,1,16,0,2,1,0,S_OK,29221.75087962963); /* Test fwdrolled hours */ - UD2T(1,1,1980,17,61,16,0,2,1,0,S_OK,29221.75087962963); /* Test fwdrolled minutes */ - UD2T(1,1,1980,18,0,76,0,2,1,0,S_OK,29221.75087962963); /* Test fwdrolled seconds */ - UD2T(1,-300,1980,18,1,16,0,2,1,0,S_OK,20059.75087962963); /* Test backrolled month */ - UD2T(-300,1,1980,18,1,16,0,2,1,0,S_OK,28920.75087962963); /* Test backrolled days */ - UD2T(3,1,1980,-30,1,16,0,2,1,0,S_OK,29221.75087962963); /* Test backrolled hours */ - UD2T(1,1,1980,20,-119,16,0,2,1,0,S_OK,29221.75087962963); /* Test backrolled minutes */ - UD2T(1,1,1980,18,3,-104,0,2,1,0,S_OK,29221.75087962963); /* Test backrolled seconds */ - UD2T(1,12001,-1020,18,1,16,0,0,0,0,S_OK,29221.75087962963); /* Test rolled year and month */ - UD2T(1,-23,1982,18,1,16,0,0,0,0,S_OK,29221.75087962963); /* Test backrolled month */ - UD2T(-59,3,1980,18,1,16,0,0,0,0,S_OK,29221.75087962963); /* Test backrolled days */ - UD2T(1,1,0,0,0,0,0,0,0,0,S_OK,36526); /* Test zero year */ - UD2T(0,0,1980,0,0,0,0,0,0,0,S_OK,29189); /* Test zero day and month */ - UD2T(0,1,1980,0,0,0,0,2,1,0,S_OK,29220.0); /* Test zero day = LastDayOfMonth */ - UD2T(-1,1,1980,18,1,16,0,0,0,0,S_OK,29219.75087962963); /* Test day -1 = LastDayOfMonth - 1 */ - UD2T(1,1,-1,18,1,16,0,0,0,0,S_OK,36161.75087962963); /* Test year -1 = 1999 */ - UD2T(1,-1,1980,18,1,16,0,0,0,0,S_OK,29160.7508796296); /* Test month -1 = 11 */ - UD2T(1,13,1980,0,0,0,0,2,1,0,S_OK,29587.0); /* Rolls fwd to 1/1/1981 */ -} - -static void test_st2dt(int line, WORD d, WORD m, WORD y, WORD h, WORD mn, - WORD s, WORD ms, INT r, double dt) -{ - SYSTEMTIME st; - double out; - INT res; - - st.wYear = y; - st.wMonth = m; - st.wDay = d; - st.wHour = h; - st.wMinute = mn; - st.wSecond = s; - st.wMilliseconds = ms; - st.wDayOfWeek = 0; - res = pSystemTimeToVariantTime(&st, &out); - ok_(__FILE__,line)(r == res && (!r || EQ_DOUBLE(out, dt)), - "expected %d, %.16g, got %d, %.16g\n", r, dt, res, out); -} -#define ST2DT(d,m,y,h,mn,s,ms,r,dt) test_st2dt(__LINE__,d,m,y,h,mn,s,ms,r,dt) - -static void test_SystemTimeToVariantTime(void) -{ - CHECKPTR(SystemTimeToVariantTime); - ST2DT(1,1,1980,0,0,0,0,TRUE,29221.0); - ST2DT(2,1,1980,0,0,0,0,TRUE,29222.0); - ST2DT(0,1,1980,0,0,0,0,TRUE,29220.0); /* Rolls back to 31 Dec 1899 */ - ST2DT(1,13,1980,0,0,0,0,FALSE,29587.0); /* Fails on invalid month */ - ST2DT(31,12,90,0,0,0,0,TRUE,33238.0); /* year < 100 is 1900+year! */ -} - -static void test_dt2st(int line, double dt, INT r, WORD d, WORD m, WORD y, - WORD h, WORD mn, WORD s, WORD ms) -{ - SYSTEMTIME st; - INT res; - - memset(&st, 0, sizeof(st)); - res = pVariantTimeToSystemTime(dt, &st); - ok_(__FILE__,line)(r == res && - (!r || (st.wYear == y && st.wMonth == m && st.wDay == d && - st.wHour == h && st.wMinute == mn && - st.wSecond == s && st.wMilliseconds == ms)), - "%.16g expected %d, %d,%d,%d,%d,%d,%d,%d, got %d, %d,%d,%d,%d,%d,%d,%d\n", - dt, r, d, m, y, h, mn, s, ms, res, st.wDay, st.wMonth, - st.wYear, st.wHour, st.wMinute, st.wSecond, - st.wMilliseconds); -} -#define DT2ST(dt,r,d,m,y,h,mn,s,ms) test_dt2st(__LINE__,dt,r,d,m,y,h,mn,s,ms) - -static void test_VariantTimeToSystemTime(void) -{ - CHECKPTR(VariantTimeToSystemTime); - DT2ST(29221.0,1,1,1,1980,0,0,0,0); - DT2ST(29222.0,1,2,1,1980,0,0,0,0); -} - -#define MKDOSDATE(d,m,y) ((d & 0x1f) | ((m & 0xf) << 5) | (((y-1980) & 0x7f) << 9)) -#define MKDOSTIME(h,m,s) (((s>>1) & 0x1f) | ((m & 0x3f) << 5) | ((h & 0x1f) << 11)) - -static void test_dos2dt(int line, WORD d, WORD m, WORD y, WORD h, WORD mn, - WORD s, INT r, double dt) -{ - unsigned short dosDate, dosTime; - double out; - INT res; - - out = 0.0; - dosDate = MKDOSDATE(d, m, y); - dosTime = MKDOSTIME(h, mn, s); - res = pDosDateTimeToVariantTime(dosDate, dosTime, &out); - ok_(__FILE__,line)(r == res && (!r || EQ_DOUBLE(out, dt)), - "expected %d, %.16g, got %d, %.16g\n", r, dt, res, out); -} -#define DOS2DT(d,m,y,h,mn,s,r,dt) test_dos2dt(__LINE__,d,m,y,h,mn,s,r,dt) - -static void test_DosDateTimeToVariantTime(void) -{ - CHECKPTR(DosDateTimeToVariantTime); - - /* Date */ - DOS2DT(1,1,1980,0,0,0,1,29221.0); /* 1/1/1980 */ - DOS2DT(31,12,2099,0,0,0,1,73050.0); /* 31/12/2099 */ - /* Dates are limited to the dos date max of 31/12/2099 */ - DOS2DT(31,12,2100,0,0,0,0,0.0); /* 31/12/2100 */ - /* Days and months of 0 cause date to roll back 1 day or month */ - DOS2DT(0,1,1980,0,0,0,1,29220.0); /* 0 Day => 31/12/1979 */ - DOS2DT(1,0,1980,0,0,0,1,29190.0); /* 0 Mth => 1/12/1979 */ - DOS2DT(0,0,1980,0,0,0,1,29189.0); /* 0 D/M => 30/11/1979 */ - /* Days > days in the month cause date to roll forward 1 month */ - DOS2DT(29,2,1981,0,0,0,1,29646.0); /* 29/2/1981 -> 3/1/1980 */ - DOS2DT(30,2,1981,0,0,0,1,29647.0); /* 30/2/1981 -> 4/1/1980 */ - /* Takes leap years into account when rolling forward */ - DOS2DT(29,2,1980,0,0,0,1,29280.0); /* 2/29/1980 */ - /* Months > 12 cause an error */ - DOS2DT(2,13,1980,0,0,0,0,0.0); - - /* Time */ - DOS2DT(1,1,1980,0,0,29,1,29221.00032407407); /* 1/1/1980 12:00:28 AM */ - DOS2DT(1,1,1980,0,0,31,1,29221.00034722222); /* 1/1/1980 12:00:30 AM */ - DOS2DT(1,1,1980,0,59,0,1,29221.04097222222); /* 1/1/1980 12:59:00 AM */ - DOS2DT(1,1,1980,0,60,0,0,0.0); /* Invalid minutes */ - DOS2DT(1,1,1980,0,0,60,0,0.0); /* Invalid seconds */ - DOS2DT(1,1,1980,23,0,0,1,29221.95833333333); /* 1/1/1980 11:00:00 PM */ - DOS2DT(1,1,1980,24,0,0,0,0.0); /* Invalid hours */ - - DOS2DT(1,1,1980,0,0,1,1,29221.0); - DOS2DT(2,1,1980,0,0,0,1,29222.0); - DOS2DT(2,1,1980,0,0,0,1,29222.0); - DOS2DT(31,12,1990,0,0,0,1,33238.0); - DOS2DT(31,12,90,0,0,0,1,40543.0); - DOS2DT(30,12,1899,0,0,0,1,46751.0); - DOS2DT(1,1,100,0,0,0,1,43831.0); - DOS2DT(31,12,9999,0,0,0,1,59901.0); - DOS2DT(1,1,10000,0,0,0,1,59902.0); - DOS2DT(1,1,-10000,0,0,0,1,48214.0); - - DOS2DT(30,12,1899,0,0,0,1,46751.0); - DOS2DT(30,12,1899,0,0,1,1,46751.0); - - DOS2DT(1,1,1980,18,1,16,1,29221.75087962963); - DOS2DT(1,300,1980,18,1,16,1,29556.75087962963); - DOS2DT(300,1,1980,18,1,16,1,29232.75087962963); - DOS2DT(0,1,1980,42,1,16,1,29220.4175462963); - DOS2DT(1,1,1980,17,61,16,0,0.0); - DOS2DT(1,1,1980,18,0,76,1,29221.75013888889); - DOS2DT(1,-300,1980,18,1,16,1,29312.75087962963); - DOS2DT(-300,1,1980,18,1,16,1,29240.75087962963); - DOS2DT(3,1,1980,-30,1,16,1,29223.08421296296); - DOS2DT(1,1,1980,20,-119,16,1,29221.83976851852); - DOS2DT(1,1,1980,18,3,-104,1,29221.75236111111); - DOS2DT(1,12001,-1020,18,1,16,1,55519.75087962963); - DOS2DT(1,-23,1982,18,1,16,1,30195.75087962963); - DOS2DT(-59,3,1980,18,1,16,1,29285.75087962963); - DOS2DT(1,1,0,0,0,0,1,54058.0); - DOS2DT(0,0,1980,0,0,0,1,29189.0); - DOS2DT(0,1,1980,0,0,0,1,29220.0); - DOS2DT(-1,1,1980,18,1,16,1,29251.75087962963); - DOS2DT(1,1,-1,18,1,16,1,53693.75087962963); - DOS2DT(1,-1,1980,18,1,16,0,0); -} - -static void test_dt2dos(int line, double dt, INT r, WORD d, WORD m, WORD y, - WORD h, WORD mn, WORD s) -{ - unsigned short dosDate, dosTime, expDosDate, expDosTime; - INT res; - - dosTime = dosDate = 0; - expDosDate = MKDOSDATE(d,m,y); - expDosTime = MKDOSTIME(h,mn,s); - res = pVariantTimeToDosDateTime(dt, &dosDate, &dosTime); - ok_(__FILE__,line)(r == res && (!r || (dosTime == expDosTime && dosDate == expDosDate)), - "%g: expected %d,%d(%d/%d/%d),%d(%d:%d:%d) got %d,%d(%d/%d/%d),%d(%d:%d:%d)\n", - dt, r, expDosDate, expDosDate & 0x1f, - (expDosDate >> 5) & 0xf, 1980 + (expDosDate >> 9), - expDosTime, expDosTime >> 11, (expDosTime >> 5) & 0x3f, - (expDosTime & 0x1f), - res, dosDate, dosDate & 0x1f, (dosDate >> 5) & 0xf, - 1980 + (dosDate >> 9), dosTime, dosTime >> 11, - (dosTime >> 5) & 0x3f, (dosTime & 0x1f)); -} -#define DT2DOS(dt,r,d,m,y,h,mn,s) test_dt2dos(__LINE__,dt,r,d,m,y,h,mn,s) - -static void test_VariantTimeToDosDateTime(void) -{ - CHECKPTR(VariantTimeToDosDateTime); - - /* Date */ - DT2DOS(29221.0,1,1,1,1980,0,0,0); /* 1/1/1980 */ - DT2DOS(73050.0,1,31,12,2099,0,0,0); /* 31/12/2099 */ - DT2DOS(29220.0,0,0,0,0,0,0,0); /* 31/12/1979 - out of range */ - DT2DOS(73415.0,0,0,0,0,0,0,0); /* 31/12/2100 - out of range */ - - /* Time */ - DT2DOS(29221.00032407407,1,1,1,1980,0,0,29); /* 1/1/1980 12:00:28 AM */ - DT2DOS(29221.00034722222,1,1,1,1980,0,0,31); /* 1/1/1980 12:00:30 AM */ - DT2DOS(29221.04097222222,1,1,1,1980,0,59,0); /* 1/1/1980 12:59:00 AM */ - DT2DOS(29221.95833333333,1,1,1,1980,23,0,0); /* 1/1/1980 11:00:00 PM */ -} - -static HRESULT (WINAPI *pVarAbs)(LPVARIANT,LPVARIANT); - -#define VARABS(vt,val,rvt,rval) \ - V_VT(&v) = VT_##vt; V_##vt(&v) = val; \ - V_VT(&exp) = VT_##rvt; V_##rvt(&exp) = rval; \ - test_var_call1( __LINE__, pVarAbs, &v, &exp ) - -static void test_VarAbs(void) -{ - static WCHAR szNum[] = {'-','1','.','1','\0' }; - char buff[8]; - HRESULT hres; - VARIANT v, vDst, exp; - size_t i; - - CHECKPTR(VarAbs); - - /* Test all possible V_VT values. - */ - for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]); i++) - { - VARTYPE vt; - - for (vt = 0; vt <= VT_BSTR_BLOB; vt++) - { - HRESULT hExpected = DISP_E_BADVARTYPE; - - SKIPTESTS(vt); - - memset(&v, 0, sizeof(v)); - V_VT(&v) = vt | ExtraFlags[i]; - V_VT(&vDst) = VT_EMPTY; - - hres = pVarAbs(&v,&vDst); - if (ExtraFlags[i] & (VT_ARRAY|VT_ARRAY) || - (!ExtraFlags[i] && (vt == VT_UNKNOWN || vt == VT_BSTR || - vt == VT_DISPATCH || vt == VT_ERROR || vt == VT_RECORD))) - { - hExpected = DISP_E_TYPEMISMATCH; - } - else if (ExtraFlags[i] || vt >= VT_CLSID || vt == VT_VARIANT) - { - hExpected = DISP_E_BADVARTYPE; - } - else if (IsValidVariantClearVT(vt, ExtraFlags[i])) - hExpected = S_OK; - - /* Native always fails on some vartypes that should be valid. don't - * check that Wine does the same; these are bugs in native. - */ - if (vt == VT_I8 || vt == VT_UI8 || vt == VT_INT || vt == VT_UINT || - vt == VT_I1 || vt == VT_UI2 || vt == VT_UI4) - continue; - ok(hres == hExpected, "VarAbs: expected 0x%X, got 0x%X for vt %d | 0x%X\n", - hExpected, hres, vt, ExtraFlags[i]); - } - } - - /* BOOL->I2, BSTR->R8, all others remain the same */ - VARABS(BOOL,VARIANT_TRUE,I2,-VARIANT_TRUE); - VARABS(BOOL,VARIANT_FALSE,I2,VARIANT_FALSE); - VARABS(EMPTY,0,I2,0); - VARABS(EMPTY,1,I2,0); - VARABS(NULL,0,NULL,0); - VARABS(NULL,1,NULL,0); - VARABS(I2,1,I2,1); - VARABS(I2,-1,I2,1); - VARABS(I4,1,I4,1); - VARABS(I4,-1,I4,1); - VARABS(UI1,1,UI1,1); - VARABS(R4,1,R4,1); - VARABS(R4,-1,R4,1); - VARABS(R8,1,R8,1); - VARABS(R8,-1,R8,1); - VARABS(DATE,1,DATE,1); - VARABS(DATE,-1,DATE,1); - V_VT(&v) = VT_CY; - V_CY(&v).int64 = -10000; - memset(&vDst,0,sizeof(vDst)); - hres = pVarAbs(&v,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_CY && V_CY(&vDst).int64 == 10000, - "VarAbs(CY): expected 0x0 got 0x%X\n", hres); - GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, buff, sizeof(buff)/sizeof(char)); - if (buff[1]) - { - trace("Skipping VarAbs(BSTR) as decimal separator is '%s'\n", buff); - return; - } else { - szNum[2] = buff[0]; - } - V_VT(&v) = VT_BSTR; - V_BSTR(&v) = (BSTR)szNum; - memset(&vDst,0,sizeof(vDst)); - hres = pVarAbs(&v,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_R8 && V_R8(&vDst) == 1.1, - "VarAbs: expected 0x0,%d,%g, got 0x%X,%d,%g\n", VT_R8, 1.1, hres, V_VT(&vDst), V_R8(&vDst)); -} - -static HRESULT (WINAPI *pVarNot)(LPVARIANT,LPVARIANT); - -#define VARNOT(vt,val,rvt,rval) \ - V_VT(&v) = VT_##vt; V_##vt(&v) = val; \ - V_VT(&exp) = VT_##rvt; V_##rvt(&exp) = rval; \ - test_var_call1( __LINE__, pVarNot, &v, &exp ) - -static void test_VarNot(void) -{ - static const WCHAR szNum0[] = {'0','\0' }; - static const WCHAR szNum1[] = {'1','\0' }; - HRESULT hres; - VARIANT v, exp, vDst; - DECIMAL *pdec = &V_DECIMAL(&v); - CY *pcy = &V_CY(&v); - size_t i; - - CHECKPTR(VarNot); - - /* Test all possible V_VT values */ - for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]); i++) - { - VARTYPE vt; - - for (vt = 0; vt <= VT_BSTR_BLOB; vt++) - { - HRESULT hExpected = DISP_E_BADVARTYPE; - - SKIPTESTS(vt); - - memset(&v, 0, sizeof(v)); - V_VT(&v) = vt | ExtraFlags[i]; - V_VT(&vDst) = VT_EMPTY; - - switch (V_VT(&v)) - { - case VT_I1: case VT_UI1: case VT_I2: case VT_UI2: - case VT_INT: case VT_UINT: case VT_I4: case VT_UI4: - case VT_R4: case VT_R8: - case VT_DECIMAL: case VT_BOOL: case VT_NULL: case VT_EMPTY: - case VT_DATE: case VT_CY: - hExpected = S_OK; - break; - case VT_I8: case VT_UI8: - if (HAVE_OLEAUT32_I8) - hExpected = S_OK; - break; - case VT_RECORD: - if (HAVE_OLEAUT32_RECORD) - hExpected = DISP_E_TYPEMISMATCH; - break; - case VT_UNKNOWN: case VT_BSTR: case VT_DISPATCH: case VT_ERROR: - hExpected = DISP_E_TYPEMISMATCH; - break; - default: - if (IsValidVariantClearVT(vt, ExtraFlags[i]) && vt != VT_CLSID) - hExpected = DISP_E_TYPEMISMATCH; - break; - } - - hres = pVarNot(&v,&vDst); - ok(hres == hExpected, "VarNot: expected 0x%X, got 0x%X vt %d|0x%X\n", - hExpected, hres, vt, ExtraFlags[i]); - } - } - /* Test the values returned by all cases that can succeed */ - VARNOT(EMPTY,0,I2,-1); - VARNOT(EMPTY,1,I2,-1); - VARNOT(NULL,0,NULL,0); - VARNOT(NULL,1,NULL,0); - VARNOT(BOOL,VARIANT_TRUE,BOOL,VARIANT_FALSE); - VARNOT(BOOL,VARIANT_FALSE,BOOL,VARIANT_TRUE); - VARNOT(I1,-1,I4,0); - VARNOT(I1,0,I4,-1); - VARNOT(I2,-1,I2,0); - VARNOT(I2,0,I2,-1); - VARNOT(I2,1,I2,-2); - VARNOT(I4,1,I4,-2); - VARNOT(I4,0,I4,-1); - VARNOT(UI1,1,UI1,254); - VARNOT(UI1,0,UI1,255); - VARNOT(UI2,0,I4,-1); - VARNOT(UI2,1,I4,-2); - VARNOT(UI4,0,I4,-1); - VARNOT(UI4,1,I4,-2); - VARNOT(INT,0,I4,-1); - VARNOT(INT,1,I4,-2); - VARNOT(UINT,0,I4,-1); - VARNOT(UINT,1,I4,-2); - if (HAVE_OLEAUT32_I8) - { - VARNOT(I8,1,I8,-2); - VARNOT(I8,0,I8,-1); - VARNOT(UI8,0,I4,-1); - VARNOT(UI8,1,I4,-2); - } - VARNOT(R4,1,I4,-2); - VARNOT(R4,0,I4,-1); - VARNOT(R8,1,I4,-2); - VARNOT(R8,0,I4,-1); - VARNOT(DATE,1,I4,-2); - VARNOT(DATE,0,I4,-1); - VARNOT(BSTR,(BSTR)szNum0,I4,-1); - ok(V_VT(&v) == VT_BSTR && V_BSTR(&v) == szNum0, "VarNot(0): changed input\n"); - VARNOT(BSTR,(BSTR)szNum1,I4,-2); - ok(V_VT(&v) == VT_BSTR && V_BSTR(&v) == szNum1, "VarNot(1): changed input\n"); - - V_VT(&v) = VT_DECIMAL; - S(U(*pdec)).sign = DECIMAL_NEG; - S(U(*pdec)).scale = 0; - pdec->Hi32 = 0; - S1(U1(*pdec)).Mid32 = 0; - S1(U1(*pdec)).Lo32 = 1; - VARNOT(DECIMAL,*pdec,I4,0); - - pcy->int64 = 10000; - VARNOT(CY,*pcy,I4,-2); - - pcy->int64 = 0; - VARNOT(CY,*pcy,I4,-1); - - pcy->int64 = -1; - VARNOT(CY,*pcy,I4,-1); -} - -static HRESULT (WINAPI *pVarSub)(LPVARIANT,LPVARIANT,LPVARIANT); - -#define VARSUB(vt1,val1,vt2,val2,rvt,rval) \ - V_VT(&left) = VT_##vt1; V_##vt1(&left) = val1; \ - V_VT(&right) = VT_##vt2; V_##vt2(&right) = val2; \ - V_VT(&exp) = VT_##rvt; V_##rvt(&exp) = rval; \ - test_var_call2( __LINE__, pVarSub, &left, &right, &exp ) - -static void test_VarSub(void) -{ - VARIANT left, right, exp, result, cy, dec; - VARTYPE i; - BSTR lbstr, rbstr; - HRESULT hres, expectedhres; - double r; - - CHECKPTR(VarSub); - - lbstr = SysAllocString(sz12); - rbstr = SysAllocString(sz12); - - VariantInit(&left); - VariantInit(&right); - VariantInit(&result); - - /* Test all possible flag/vt combinations & the resulting vt type */ - for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]); i++) - { - - VARTYPE leftvt, rightvt, resvt; - - for (leftvt = 0; leftvt <= VT_BSTR_BLOB; leftvt++) - { - - SKIPTESTS(leftvt); - - for (rightvt = 0; rightvt <= VT_BSTR_BLOB; rightvt++) - { - - SKIPTESTS(rightvt); - expectedhres = S_OK; - - memset(&left, 0, sizeof(left)); - memset(&right, 0, sizeof(right)); - V_VT(&left) = leftvt | ExtraFlags[i]; - if (leftvt == VT_BSTR) - V_BSTR(&left) = lbstr; - V_VT(&right) = rightvt | ExtraFlags[i]; - if (rightvt == VT_BSTR) - V_BSTR(&right) = rbstr; - V_VT(&result) = VT_EMPTY; - resvt = VT_ERROR; - - /* All extra flags produce errors */ - if (ExtraFlags[i] == (VT_VECTOR|VT_BYREF|VT_RESERVED) || - ExtraFlags[i] == (VT_VECTOR|VT_RESERVED) || - ExtraFlags[i] == (VT_VECTOR|VT_BYREF) || - ExtraFlags[i] == (VT_BYREF|VT_RESERVED) || - ExtraFlags[i] == VT_VECTOR || - ExtraFlags[i] == VT_BYREF || - ExtraFlags[i] == VT_RESERVED) - { - expectedhres = DISP_E_BADVARTYPE; - resvt = VT_EMPTY; - } - else if (ExtraFlags[i] >= VT_ARRAY) - { - expectedhres = DISP_E_TYPEMISMATCH; - resvt = VT_EMPTY; - } - /* Native VarSub cannot handle: VT_I1, VT_UI2, VT_UI4, - VT_INT, VT_UINT and VT_UI8. Tested with WinXP */ - else if (!IsValidVariantClearVT(leftvt, ExtraFlags[i]) || - !IsValidVariantClearVT(rightvt, ExtraFlags[i]) || - leftvt == VT_CLSID || rightvt == VT_CLSID || - leftvt == VT_VARIANT || rightvt == VT_VARIANT || - leftvt == VT_I1 || rightvt == VT_I1 || - leftvt == VT_UI2 || rightvt == VT_UI2 || - leftvt == VT_UI4 || rightvt == VT_UI4 || - leftvt == VT_UI8 || rightvt == VT_UI8 || - leftvt == VT_INT || rightvt == VT_INT || - leftvt == VT_UINT || rightvt == VT_UINT || - leftvt == VT_UNKNOWN || rightvt == VT_UNKNOWN || - leftvt == VT_RECORD || rightvt == VT_RECORD) - { - if (leftvt == VT_RECORD && rightvt == VT_I8) - { - if (HAVE_OLEAUT32_I8) - expectedhres = DISP_E_TYPEMISMATCH; - else - expectedhres = DISP_E_BADVARTYPE; - } - else if (leftvt < VT_UI1 && rightvt == VT_RECORD) - expectedhres = DISP_E_TYPEMISMATCH; - else if (leftvt >= VT_UI1 && rightvt == VT_RECORD) - expectedhres = DISP_E_TYPEMISMATCH; - else if (leftvt == VT_RECORD && rightvt <= VT_UI1) - expectedhres = DISP_E_TYPEMISMATCH; - else if (leftvt == VT_RECORD && rightvt > VT_UI1) - expectedhres = DISP_E_BADVARTYPE; - else - expectedhres = DISP_E_BADVARTYPE; - resvt = VT_EMPTY; - } - else if ((leftvt == VT_NULL && rightvt == VT_DISPATCH) || - (leftvt == VT_DISPATCH && rightvt == VT_NULL)) - resvt = VT_NULL; - else if (leftvt == VT_DISPATCH || rightvt == VT_DISPATCH || - leftvt == VT_ERROR || rightvt == VT_ERROR) - { - resvt = VT_EMPTY; - expectedhres = DISP_E_TYPEMISMATCH; - } - else if (leftvt == VT_NULL || rightvt == VT_NULL) - resvt = VT_NULL; - else if ((leftvt == VT_EMPTY && rightvt == VT_BSTR) || - (leftvt == VT_DATE && rightvt == VT_DATE) || - (leftvt == VT_BSTR && rightvt == VT_EMPTY) || - (leftvt == VT_BSTR && rightvt == VT_BSTR)) - resvt = VT_R8; - else if (leftvt == VT_DECIMAL || rightvt == VT_DECIMAL) - resvt = VT_DECIMAL; - else if (leftvt == VT_DATE || rightvt == VT_DATE) - resvt = VT_DATE; - else if (leftvt == VT_CY || rightvt == VT_CY) - resvt = VT_CY; - else if (leftvt == VT_R8 || rightvt == VT_R8) - resvt = VT_R8; - else if (leftvt == VT_BSTR || rightvt == VT_BSTR) { - resvt = VT_R8; - } else if (leftvt == VT_R4 || rightvt == VT_R4) { - if (leftvt == VT_I4 || rightvt == VT_I4 || - leftvt == VT_I8 || rightvt == VT_I8) - resvt = VT_R8; - else - resvt = VT_R4; - } - else if (leftvt == VT_I8 || rightvt == VT_I8) - resvt = VT_I8; - else if (leftvt == VT_I4 || rightvt == VT_I4) - resvt = VT_I4; - else if (leftvt == VT_I2 || rightvt == VT_I2 || - leftvt == VT_BOOL || rightvt == VT_BOOL || - (leftvt == VT_EMPTY && rightvt == VT_EMPTY)) - resvt = VT_I2; - else if (leftvt == VT_UI1 || rightvt == VT_UI1) - resvt = VT_UI1; - else - { - resvt = VT_EMPTY; - expectedhres = DISP_E_TYPEMISMATCH; - } - - hres = pVarSub(&left, &right, &result); - - ok(hres == expectedhres && V_VT(&result) == resvt, - "VarSub: %d|0x%X, %d|0x%X: Expected failure 0x%X, " - "got 0x%X, expected vt %d got vt %d\n", - leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], - expectedhres, hres, resvt, V_VT(&result)); - } - } - } - - /* Test returned values */ - VARSUB(I4,4,I4,2,I4,2); - VARSUB(I2,4,I2,2,I2,2); - VARSUB(I2,-13,I4,5,I4,-18); - VARSUB(I4,-13,I4,5,I4,-18); - VARSUB(I2,7,R4,0.5f,R4,6.5f); - VARSUB(R4,0.5f,I4,5,R8,-4.5); - VARSUB(R8,7.1,BOOL,0,R8,7.1); - VARSUB(BSTR,lbstr,I2,4,R8,8); - VARSUB(BSTR,lbstr,BOOL,1,R8,11); - VARSUB(BSTR,lbstr,R4,0.1f,R8,11.9); - VARSUB(R4,0.2f,BSTR,rbstr,R8,-11.8); - VARSUB(DATE,2.25,I4,7,DATE,-4.75); - VARSUB(DATE,1.25,R4,-1.7f,DATE,2.95); - - VARSUB(UI1, UI1_MAX, UI1, UI1_MAX, UI1, 0); - VARSUB(I2, I2_MAX, I2, I2_MAX, I2, 0); - VARSUB(I2, I2_MIN, I2, I2_MIN, I2, 0); - VARSUB(I4, I4_MAX, I4, I4_MAX, I4, 0); - VARSUB(I4, I4_MIN, I4, I4_MIN, I4, 0); - VARSUB(R4, R4_MAX, R4, R4_MAX, R4, 0.0f); - VARSUB(R4, R4_MAX, R4, R4_MIN, R4, R4_MAX - R4_MIN); - VARSUB(R4, R4_MIN, R4, R4_MIN, R4, 0.0f); - VARSUB(R8, R8_MAX, R8, R8_MIN, R8, R8_MAX - R8_MIN); - VARSUB(R8, R8_MIN, R8, R8_MIN, R8, 0.0); - - /* Manually test BSTR + BSTR */ - V_VT(&left) = VT_BSTR; - V_BSTR(&left) = lbstr; - V_VT(&right) = VT_BSTR; - V_BSTR(&right) = rbstr; - hres = VarSub(&left, &right, &result); - ok(hres == S_OK && V_VT(&result) == VT_R8, - "VarSub: expected coerced type VT_R8, got %s!\n", vtstr(V_VT(&result))); - ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 0), - "VarSub: BSTR + BSTR, expected %f got %f\n", 0.0, V_R8(&result)); - - /* Manually test some VT_CY and VT_DECIMAL variants */ - V_VT(&cy) = VT_CY; - hres = VarCyFromI4(4711, &V_CY(&cy)); - ok(hres == S_OK, "VarCyFromI4 failed!\n"); - V_VT(&dec) = VT_DECIMAL; - hres = VarDecFromR8(-4.2, &V_DECIMAL(&dec)); - ok(hres == S_OK, "VarDecFromR4 failed!\n"); - memset(&left, 0, sizeof(left)); - memset(&right, 0, sizeof(right)); - V_VT(&left) = VT_I4; - V_I4(&left) = -11; - V_VT(&right) = VT_UI1; - V_UI1(&right) = 9; - - hres = VarSub(&cy, &right, &result); - ok(hres == S_OK && V_VT(&result) == VT_CY, - "VarSub: expected coerced type VT_CY, got %s!\n", vtstr(V_VT(&result))); - hres = VarR8FromCy(V_CY(&result), &r); - ok(hres == S_OK && EQ_DOUBLE(r, 4702), - "VarSub: CY value %f, expected %f\n", r, (double)4720); - - hres = VarSub(&left, &dec, &result); - ok(hres == S_OK && V_VT(&result) == VT_DECIMAL, - "VarSub: expected coerced type VT_DECIMAL, got %s!\n", vtstr(V_VT(&result))); - hres = VarR8FromDec(&V_DECIMAL(&result), &r); - ok(hres == S_OK && EQ_DOUBLE(r, -6.8), - "VarSub: DECIMAL value %f, expected %f\n", r, (double)-15.2); - - SysFreeString(lbstr); - SysFreeString(rbstr); -} - -static HRESULT (WINAPI *pVarMod)(LPVARIANT,LPVARIANT,LPVARIANT); - -static void test_Mod( int line, VARIANT *left, VARIANT *right, VARIANT *expected, HRESULT expres ) -{ - VARIANT result; - HRESULT hres; - - memset( &result, 0, sizeof(result) ); - hres = pVarMod( left, right, &result ); - ok_(__FILE__,line)( hres == expres, "wrong result %x/%x\n", hres, expres ); - if (hres == S_OK) - ok_(__FILE__,line)( is_expected_variant( &result, expected ), - "got %s expected %s\n", variantstr(&result), variantstr(expected) ); -} - -#define VARMOD(vt1,vt2,val1,val2,rvt,rval) \ - V_VT(&left) = VT_##vt1; V_##vt1(&left) = val1; \ - V_VT(&right) = VT_##vt2; V_##vt2(&right) = val2; \ - V_VT(&exp) = VT_##rvt; V_##rvt(&exp) = rval; \ - test_var_call2( __LINE__, pVarMod, &left, &right, &exp ) - -#define VARMOD2(vt1,vt2,val1,val2,rvt,rval,hexpected) \ - V_VT(&left) = VT_##vt1; V_I4(&left) = val1; \ - V_VT(&right) = VT_##vt2; V_I4(&right) = val2; \ - V_VT(&exp) = VT_##rvt; V_I4(&exp) = rval; \ - test_Mod( __LINE__, &left, &right, &exp, hexpected ) - -static void test_VarMod(void) -{ - VARIANT v1, v2, vDst, left, right, exp; - HRESULT hres; - HRESULT hexpected = 0; - static const WCHAR szNum0[] = {'1','2','5','\0'}; - static const WCHAR szNum1[] = {'1','0','\0'}; - int l, r; - BOOL lFound, rFound; - BOOL lValid; - BSTR strNum0, strNum1; - - CHECKPTR(VarMod); - - VARMOD(I1,BOOL,100,10,I4,0); - VARMOD(I1,I1,100,10,I4,0); - VARMOD(I1,UI1,100,10,I4,0); - VARMOD(I1,I2,100,10,I4,0); - VARMOD(I1,UI2,100,10,I4,0); - VARMOD(I1,I4,100,10,I4,0); - VARMOD(I1,UI4,100,10,I4,0); - VARMOD(I1,R4,100,10,I4,0); - VARMOD(I1,R8,100,10,I4,0); - - VARMOD(UI1,BOOL,100,10,I2,0); - VARMOD(UI1,I1,100,10,I4,0); - VARMOD(UI1,UI1,100,10,UI1,0); - VARMOD(UI1,I2,100,10,I2,0); - VARMOD(UI1,UI2,100,10,I4,0); - VARMOD(UI1,I4,100,10,I4,0); - VARMOD(UI1,UI4,100,10,I4,0); - VARMOD(UI1,R4,100,10,I4,0); - VARMOD(UI1,R8,100,10,I4,0); - - VARMOD(I2,BOOL,100,10,I2,0); - VARMOD(I2,I1,100,10,I4,0); - VARMOD(I2,UI1,100,10,I2,0); - VARMOD(I2,I2,100,10,I2,0); - VARMOD(I2,UI2,100,10,I4,0); - VARMOD(I2,I4,100,10,I4,0); - VARMOD(I2,UI4,100,10,I4,0); - VARMOD(I2,R4,100,10,I4,0); - VARMOD(I2,R8,100,10,I4,0); - - VARMOD(I4,BOOL,100,10,I4,0); - VARMOD(I4,I1,100,10,I4,0); - VARMOD(I4,UI1,100,10,I4,0); - VARMOD(I4,I2,100,10,I4,0); - VARMOD(I4,UI2,100,10,I4,0); - VARMOD(I4,I4,100,10,I4,0); - VARMOD(I4,UI4,100,10,I4,0); - VARMOD(I4,R4,100,10,I4,0); - VARMOD(I4,R8,100,10,I4,0); - VARMOD(UI4,BOOL,100,10,I4,0); - VARMOD(UI4,I1,100,10,I4,0); - VARMOD(UI4,UI1,100,10,I4,0); - VARMOD(UI4,I2,100,10,I4,0); - VARMOD(UI4,UI2,100,10,I4,0); - VARMOD(UI4,I4,100,10,I4,0); - VARMOD(UI4,UI4,100,10,I4,0); - VARMOD(UI4,R4,100,10,I4,0); - VARMOD(UI4,R8,100,10,I4,0); - VARMOD(R4,BOOL,100,10,I4,0); - VARMOD(R4,I1,100,10,I4,0); - VARMOD(R4,UI1,100,10,I4,0); - VARMOD(R4,I2,100,10,I4,0); - VARMOD(R4,UI2,100,10,I4,0); - VARMOD(R4,I4,100,10,I4,0); - VARMOD(R4,UI4,100,10,I4,0); - VARMOD(R4,R4,100,10,I4,0); - VARMOD(R4,R8,100,10,I4,0); - VARMOD(R8,BOOL,100,10,I4,0); - VARMOD(R8,I1,100,10,I4,0); - VARMOD(R8,UI1,100,10,I4,0); - VARMOD(R8,I2,100,10,I4,0); - VARMOD(R8,UI2,100,10,I4,0); - VARMOD(R8,I4,100,10,I4,0); - VARMOD(R8,UI4,100,10,I4,0); - VARMOD(R8,R4,100,10,I4,0); - VARMOD(R8,R8,100,10,I4,0); - - VARMOD(INT,INT,100,10,I4,0); - VARMOD(INT,UINT,100,10,I4,0); - - VARMOD(BOOL,BOOL,100,10,I2,0); - VARMOD(BOOL,I1,100,10,I4,0); - VARMOD(BOOL,UI1,100,10,I2,0); - VARMOD(BOOL,I2,100,10,I2,0); - VARMOD(BOOL,UI2,100,10,I4,0); - VARMOD(BOOL,I4,100,10,I4,0); - VARMOD(BOOL,UI4,100,10,I4,0); - VARMOD(BOOL,R4,100,10,I4,0); - VARMOD(BOOL,R8,100,10,I4,0); - VARMOD(BOOL,DATE,100,10,I4,0); - - VARMOD(DATE,BOOL,100,10,I4,0); - VARMOD(DATE,I1,100,10,I4,0); - VARMOD(DATE,UI1,100,10,I4,0); - VARMOD(DATE,I2,100,10,I4,0); - VARMOD(DATE,UI2,100,10,I4,0); - VARMOD(DATE,I4,100,10,I4,0); - VARMOD(DATE,UI4,100,10,I4,0); - VARMOD(DATE,R4,100,10,I4,0); - VARMOD(DATE,R8,100,10,I4,0); - VARMOD(DATE,DATE,100,10,I4,0); - - strNum0 = SysAllocString(szNum0); - strNum1 = SysAllocString(szNum1); - VARMOD(BSTR,BSTR,strNum0,strNum1,I4,5); - VARMOD(BSTR,I1,strNum0,10,I4,5); - VARMOD(BSTR,I2,strNum0,10,I4,5); - VARMOD(BSTR,I4,strNum0,10,I4,5); - VARMOD(BSTR,R4,strNum0,10,I4,5); - VARMOD(BSTR,R8,strNum0,10,I4,5); - VARMOD(I4,BSTR,125,strNum1,I4,5); - - if (HAVE_OLEAUT32_I8) - { - VARMOD(BOOL,I8,100,10,I8,0); - VARMOD(I1,I8,100,10,I8,0); - VARMOD(UI1,I8,100,10,I8,0); - VARMOD(I2,I8,100,10,I8,0); - VARMOD(I4,I8,100,10,I8,0); - VARMOD(UI4,I8,100,10,I8,0); - VARMOD(R4,I8,100,10,I8,0); - VARMOD(R8,I8,100,10,I8,0); - VARMOD(DATE,I8,100,10,I8,0); - - VARMOD(I8,BOOL,100,10,I8,0); - VARMOD(I8,I1,100,10,I8,0); - VARMOD(I8,UI1,100,10,I8,0); - VARMOD(I8,I2,100,10,I8,0); - VARMOD(I8,UI2,100,10,I8,0); - VARMOD(I8,I4,100,10,I8,0); - VARMOD(I8,UI4,100,10,I8,0); - VARMOD(I8,R4,100,10,I8,0); - VARMOD(I8,R8,100,10,I8,0); - VARMOD(I8,I8,100,10,I8,0); - - VARMOD(BSTR,I8,strNum0,10,I8,5); - } - - /* test all combinations of types */ - for(l = 0; l < VT_BSTR_BLOB; l++) - { - SKIPTESTS(l); - - for(r = 0; r < VT_BSTR_BLOB; r++) - { - SKIPTESTS(r); - - if(l == VT_BSTR) continue; - if(l == VT_DISPATCH) continue; - if(r == VT_BSTR) continue; - if(r == VT_DISPATCH) continue; - - lFound = TRUE; - lValid = TRUE; - switch(l) - { - case VT_EMPTY: - case VT_NULL: - case VT_I1: - case VT_UI1: - case VT_I2: - case VT_UI2: - case VT_I4: - case VT_I8: - case VT_UI4: - case VT_UI8: - case VT_INT: - case VT_UINT: - case VT_R4: - case VT_R8: - case VT_BOOL: - case VT_DATE: - case VT_CY: - case VT_DECIMAL: - hexpected = S_OK; - break; - case VT_ERROR: - case VT_VARIANT: - case VT_UNKNOWN: - case VT_RECORD: - lValid = FALSE; - break; - default: - lFound = FALSE; - hexpected = DISP_E_BADVARTYPE; - break; - } - - rFound = TRUE; - switch(r) - { - case VT_EMPTY: - case VT_NULL: - case VT_I1: - case VT_UI1: - case VT_I2: - case VT_UI2: - case VT_I4: - case VT_I8: - case VT_UI4: - case VT_UI8: - case VT_INT: - case VT_UINT: - case VT_R4: - case VT_R8: - case VT_BOOL: - case VT_DATE: - case VT_DECIMAL: - case VT_CY: - hexpected = S_OK; - break; - case VT_ERROR: - case VT_VARIANT: - case VT_UNKNOWN: - case VT_RECORD: - break; - default: - rFound = FALSE; - break; - } - - if(((l == VT_I8) && (r == VT_INT)) || ((l == VT_INT) && (r == VT_I8))) - { - hexpected = DISP_E_TYPEMISMATCH; - } else if((l == VT_EMPTY) && (r == VT_NULL)) - { - hexpected = S_OK; - } else if((l == VT_NULL) && (r == VT_EMPTY)) - { - hexpected = S_OK; - } else if((l == VT_EMPTY) && (r == VT_CY)) - { - hexpected = S_OK; - } else if((l == VT_EMPTY) && (r == VT_RECORD)) - { - hexpected = DISP_E_TYPEMISMATCH; - } else if((r == VT_EMPTY) && lFound && lValid) - { - hexpected = DISP_E_DIVBYZERO; - } else if((l == VT_ERROR) || ((r == VT_ERROR) && lFound && lValid)) - { - hexpected = DISP_E_TYPEMISMATCH; - } else if((l == VT_NULL) && (r == VT_NULL)) - { - hexpected = S_OK; - } else if((l == VT_VARIANT) || ((r == VT_VARIANT) && lFound && lValid)) - { - hexpected = DISP_E_TYPEMISMATCH; - } else if((l == VT_NULL) && (r == VT_RECORD)) - { - hexpected = DISP_E_TYPEMISMATCH; - } else if((l == VT_I8) && (r == VT_DECIMAL)) - { - hexpected = S_OK; - } else if((l == VT_DECIMAL) && (r == VT_I8)) - { - hexpected = S_OK; - } else if((l == VT_UNKNOWN) || ((r == VT_UNKNOWN) && lFound && lValid)) - { - hexpected = DISP_E_TYPEMISMATCH; - } else if((l == VT_NULL) && rFound) - { - hexpected = S_OK; - } else if(l == VT_RECORD) - { - hexpected = DISP_E_TYPEMISMATCH; - } else if((r == VT_RECORD) && lValid && lFound) - { - hexpected = DISP_E_TYPEMISMATCH; - } else if((l == VT_EMPTY) && (r == VT_EMPTY)) - { - hexpected = DISP_E_DIVBYZERO; - } else if((l == VT_CY) && !rFound) - { - hexpected = DISP_E_BADVARTYPE; - } else if(lFound && !rFound) - { - hexpected = DISP_E_BADVARTYPE; - } else if(!lFound && rFound) - { - hexpected = DISP_E_BADVARTYPE; - } else if((r == VT_NULL) && lFound && lValid) - { - hexpected = S_OK; - } else if((l == VT_NULL) || (r == VT_NULL)) - { - hexpected = DISP_E_BADVARTYPE; - } else if((l == VT_VARIANT) || (r == VT_VARIANT)) - { - hexpected = DISP_E_BADVARTYPE; - } else if(lFound && !rFound) - { - hexpected = DISP_E_BADVARTYPE; - } else if(!lFound && !rFound) - { - hexpected = DISP_E_BADVARTYPE; - } - - V_VT(&v1) = l; - V_VT(&v2) = r; - - if(l == VT_CY) - V_CY(&v1).int64 = 1000000; - else if(l == VT_R4) - V_R4(&v1) = 100; - else if(l == VT_R8) - V_R8(&v1) = 100; - else if(l == VT_UI8) - V_UI8(&v1) = 100; - else if(l == VT_I8) - V_I8(&v1) = 100; - else if(l == VT_DATE) - V_DATE(&v1) = 1000; - else if (l == VT_DECIMAL) - { - V_DECIMAL(&v1).Hi32 = 0; - U1(V_DECIMAL(&v1)).Lo64 = 100; - U(V_DECIMAL(&v1)).signscale = 0; - } - else - V_I4(&v1) = 10000; - - if(r == VT_CY) - V_CY(&v2).int64 = 10000; - else if(r == VT_R4) - V_R4(&v2) = 100; - else if(r == VT_R8) - V_R8(&v2) = 100; - else if(r == VT_UI8) - V_UI8(&v2) = 100; - else if(r == VT_I8) - V_I8(&v2) = 100; - else if(r == VT_DATE) - V_DATE(&v2) = 1000; - else if (r == VT_DECIMAL) - { - V_DECIMAL(&v2).Hi32 = 0; - U1(V_DECIMAL(&v2)).Lo64 = 100; - U(V_DECIMAL(&v2)).signscale = 0; - } - else - V_I4(&v2) = 10000; - - if ((l != VT_I8 && l != VT_UI8 && r != VT_I8 && r != VT_UI8) || HAVE_OLEAUT32_I8) - { - hres = pVarMod(&v1,&v2,&vDst); - ok(hres == hexpected, - "VarMod: expected 0x%x, got 0x%X for l type of %d, r type of %d,\n", hexpected, hres, l, r); - } - } - } - - - /****************************/ - /* test some bad parameters */ - VARMOD(I4,I4,-1,-1,I4,0); - - /* test modulus with zero */ - VARMOD2(I4,I4,100,0,EMPTY,0,DISP_E_DIVBYZERO); - - VARMOD(I4,I4,0,10,I4,0); /* test 0 mod 10 */ - - /* right parameter is type empty */ - VARMOD2(I4,EMPTY,100,10,EMPTY,0,DISP_E_DIVBYZERO); - - /* left parameter is type empty */ - VARMOD2(EMPTY,I4,100,10,I4,0,S_OK); - - /* mod with a null left value */ - VARMOD2(NULL,I4,125,10,NULL,0,S_OK); - - /* mod with a null right value */ - VARMOD2(I4,NULL,100,10,NULL,0,S_OK); - - /* void left value */ - VARMOD2(VOID,I4,100,10,EMPTY,0,DISP_E_BADVARTYPE); - - /* void right value */ - VARMOD2(I4,VOID,100,10,EMPTY,0,DISP_E_BADVARTYPE); - - /* null left value, void right value */ - VARMOD2(NULL,VOID,100,10,EMPTY, 0, DISP_E_BADVARTYPE); - - /* void left value, null right value */ - VARMOD2(VOID,NULL,100,10,EMPTY,0,DISP_E_BADVARTYPE); - - /* some currencies */ - V_VT(&v1) = VT_CY; - V_VT(&v2) = VT_CY; - V_CY(&v1).int64 = 100000; - V_CY(&v2).int64 = 100000; - hres = pVarMod(&v1,&v2,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_I4 && V_I4(&vDst) == 0, - "VarMod: expected 0x%x,%d,%d, got 0x%X,%d,%d\n", S_OK, VT_I4, 0, hres, V_VT(&vDst), V_I4(&vDst)); - - V_VT(&v1) = VT_I4; - V_VT(&v2) = VT_CY; - V_I4(&v1) = 100; - V_CY(&v2).int64 = 100000; - hres = pVarMod(&v1,&v2,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_I4 && V_I4(&vDst) == 0, - "VarMod: expected 0x%x,%d,%d, got 0x%X,%d,%d\n", S_OK, VT_I4, 0, hres, V_VT(&vDst), V_I4(&vDst)); - - /* some decimals */ - V_VT(&v1) = VT_DECIMAL; - V_VT(&v2) = VT_DECIMAL; - VarDecFromI4(100, &V_DECIMAL(&v1)); - VarDecFromI4(10, &V_DECIMAL(&v2)); - hres = pVarMod(&v1,&v2,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_I4 && V_I4(&vDst) == 0, - "VarMod: expected 0x%x,%d,%d, got 0x%X,%d,%d\n", S_OK, VT_I4, 0, hres, V_VT(&vDst), V_I4(&vDst)); - - V_VT(&v1) = VT_I4; - V_VT(&v2) = VT_DECIMAL; - V_I4(&v1) = 100; - VarDecFromI4(10, &V_DECIMAL(&v2)); - hres = pVarMod(&v1,&v2,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_I4 && V_I4(&vDst) == 0, - "VarMod: expected 0x%x,%d,%d, got 0x%X,%d,%d\n", S_OK, VT_I4, 0, hres, V_VT(&vDst), V_I4(&vDst)); - - VARMOD2(UINT,I4,100,10,I4,0,S_OK); - - /* test that an error results in the type of the result changing but not its value */ - V_VT(&v1) = VT_UNKNOWN; - V_VT(&v2) = VT_EMPTY; - V_I4(&v1) = 100; - V_CY(&v2).int64 = 100000; - V_VT(&vDst) = VT_I4; - V_I4(&vDst) = 1231; - hres = pVarMod(&v1,&v2,&vDst); - ok(hres == DISP_E_TYPEMISMATCH && V_VT(&vDst) == VT_EMPTY && V_I4(&vDst) == 1231, - "VarMod: expected 0x%x,%d,%d, got 0x%X,%d,%d\n", DISP_E_TYPEMISMATCH, VT_EMPTY, 1231, hres, V_VT(&vDst), V_I4(&vDst)); - - - /* test some invalid types */ - /*TODO: not testing VT_DISPATCH */ - if (HAVE_OLEAUT32_I8) - { - VARMOD2(I8,INT,100,10,EMPTY,0,DISP_E_TYPEMISMATCH); - } - VARMOD2(ERROR,I4,100,10,EMPTY,0,DISP_E_TYPEMISMATCH); - VARMOD2(VARIANT,I4,100,10,EMPTY,0,DISP_E_TYPEMISMATCH); - VARMOD2(UNKNOWN,I4,100,10,EMPTY,0,DISP_E_TYPEMISMATCH); - VARMOD2(VOID,I4,100,10,EMPTY,0,DISP_E_BADVARTYPE); - VARMOD2(HRESULT,I4,100,10,EMPTY,0,DISP_E_BADVARTYPE); - VARMOD2(PTR,I4,100,10,EMPTY,0,DISP_E_BADVARTYPE); - VARMOD2(SAFEARRAY,I4,100,10,EMPTY,0,DISP_E_BADVARTYPE); - VARMOD2(CARRAY,I4,100,10,EMPTY,0,DISP_E_BADVARTYPE); - VARMOD2(USERDEFINED,I4,100,10,EMPTY,0,DISP_E_BADVARTYPE); - VARMOD2(LPSTR,I4,100,10,EMPTY,0,DISP_E_BADVARTYPE); - VARMOD2(LPWSTR,I4,100,10,EMPTY,0,DISP_E_BADVARTYPE); - VARMOD2(RECORD,I4,100,10,EMPTY,0,DISP_E_TYPEMISMATCH); - VARMOD2(FILETIME,I4,100,10,EMPTY,0,DISP_E_BADVARTYPE); - VARMOD2(BLOB,I4,100,10,EMPTY,0,DISP_E_BADVARTYPE); - VARMOD2(STREAM,I4,100,10,EMPTY,0,DISP_E_BADVARTYPE); - VARMOD2(STORAGE,I4,100,10,EMPTY,0,DISP_E_BADVARTYPE); - VARMOD2(STREAMED_OBJECT,I4,100,10,EMPTY,0,DISP_E_BADVARTYPE); - VARMOD2(STORED_OBJECT,I4,100,10,EMPTY,0,DISP_E_BADVARTYPE); - VARMOD2(BLOB_OBJECT,I4,100,10,EMPTY,0,DISP_E_BADVARTYPE); - VARMOD2(CF,I4,100,10,EMPTY,0,DISP_E_BADVARTYPE); - VARMOD2(CLSID,CLSID,100,10,EMPTY,0,DISP_E_BADVARTYPE); - VARMOD2(VECTOR,I4,100,10,EMPTY,0,DISP_E_BADVARTYPE); - VARMOD2(ARRAY,I4,100,10,EMPTY,0,DISP_E_BADVARTYPE); - VARMOD2(BYREF,I4,100,10,EMPTY,0,DISP_E_BADVARTYPE); - - /* test some more invalid types */ - V_VT(&v1) = 456; - V_VT(&v2) = 234; - V_I4(&v1) = 100; - V_I4(&v2)= 10; - hres = pVarMod(&v1,&v2,&vDst); - ok(hres == DISP_E_BADVARTYPE && V_VT(&vDst) == VT_EMPTY, - "VarMod: expected 0x%x,%d, got 0x%X,%d\n", DISP_E_BADVARTYPE, VT_EMPTY, hres, V_VT(&vDst)); - - SysFreeString(strNum0); - SysFreeString(strNum1); -} - -static HRESULT (WINAPI *pVarFix)(LPVARIANT,LPVARIANT); - -#define VARFIX(vt,val,rvt,rval) \ - V_VT(&v) = VT_##vt; V_##vt(&v) = val; \ - V_VT(&exp) = VT_##rvt; V_##rvt(&exp) = rval; \ - test_var_call1( __LINE__, pVarFix, &v, &exp ) - -static void test_VarFix(void) -{ - static const WCHAR szNumMinus1[] = {'-','1','\0' }; - HRESULT hres; - VARIANT v, exp, vDst; - DECIMAL *pdec = &V_DECIMAL(&v); - CY *pcy = &V_CY(&v); - size_t i; - - CHECKPTR(VarFix); - - /* Test all possible V_VT values */ - for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]); i++) - { - VARTYPE vt; - - for (vt = 0; vt <= VT_BSTR_BLOB; vt++) - { - HRESULT bFail = TRUE; - - SKIPTESTS(vt); - - memset(&v, 0, sizeof(v)); - V_VT(&v) = vt | ExtraFlags[i]; - V_VT(&vDst) = VT_EMPTY; - - switch (V_VT(&v)) - { - case VT_UI1: case VT_I2: case VT_I4: case VT_R4: case VT_R8: - case VT_DECIMAL: case VT_BOOL: case VT_NULL: case VT_EMPTY: - case VT_DATE: case VT_CY: - bFail = FALSE; - break; - case VT_I8: - if (HAVE_OLEAUT32_I8) - bFail = FALSE; - break; - } - - hres = pVarFix(&v,&vDst); - if (bFail) - ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarFix: expected failure, got 0x%X vt %d|0x%X\n", - hres, vt, ExtraFlags[i]); - else - ok(hres == S_OK, "VarFix: expected S_OK, got 0x%X vt %d|0x%X\n", - hres, vt, ExtraFlags[i]); - } - } - - VARFIX(BOOL,VARIANT_TRUE,I2,VARIANT_TRUE); - VARFIX(BOOL,VARIANT_FALSE,I2,0); - VARFIX(BOOL,1,I2,1); - VARFIX(UI1,1,UI1,1); - VARFIX(I2,-1,I2,-1); - VARFIX(I4,-1,I4,-1); - if (HAVE_OLEAUT32_I8) - { - VARFIX(I8,-1,I8,-1); - } - VARFIX(R4,1.4f,R4,1); - VARFIX(R4,1.5f,R4,1); - VARFIX(R4,1.6f,R4,1); - VARFIX(R4,-1.4f,R4,-1); - VARFIX(R4,-1.5f,R4,-1); - VARFIX(R4,-1.6f,R4,-1); - /* DATE & R8 round as for R4 */ - VARFIX(DATE,-1,DATE,-1); - VARFIX(R8,-1,R8,-1); - VARFIX(BSTR,(BSTR)szNumMinus1,R8,-1); - - V_VT(&v) = VT_EMPTY; - hres = pVarFix(&v,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_I2 && V_I2(&vDst) == 0, - "VarFix: expected 0x0,%d,0 got 0x%X,%d,%d\n", VT_EMPTY, - hres, V_VT(&vDst), V_I2(&vDst)); - - V_VT(&v) = VT_NULL; - hres = pVarFix(&v,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_NULL, - "VarFix: expected 0x0,%d got 0x%X,%d\n", VT_NULL, hres, V_VT(&vDst)); - - V_VT(&v) = VT_DECIMAL; - S(U(*pdec)).sign = DECIMAL_NEG; - S(U(*pdec)).scale = 0; - pdec->Hi32 = 0; - S1(U1(*pdec)).Mid32 = 0; - S1(U1(*pdec)).Lo32 = 1; - hres = pVarFix(&v,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_DECIMAL && !memcmp(&V_DECIMAL(&v), &V_DECIMAL(&vDst), sizeof(DECIMAL)), - "VarFix: expected 0x0,%d,identical, got 0x%X,%d\n", VT_DECIMAL, - hres, V_VT(&vDst)); - - /* FIXME: Test some fractional decimals when VarDecFix is implemented */ - - V_VT(&v) = VT_CY; - pcy->int64 = -10000; - hres = pVarFix(&v,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_CY && V_CY(&vDst).int64 == -10000, - "VarFix: VT_CY wrong, hres=0x%X\n", hres); - - V_VT(&v) = VT_CY; - pcy->int64 = -16000; - hres = pVarFix(&v,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_CY && V_CY(&vDst).int64 == -10000, - "VarFix: VT_CY wrong, hres=0x%X\n", hres); -} - -static HRESULT (WINAPI *pVarInt)(LPVARIANT,LPVARIANT); - -#define VARINT(vt,val,rvt,rval) \ - V_VT(&v) = VT_##vt; V_##vt(&v) = val; \ - V_VT(&exp) = VT_##rvt; V_##rvt(&exp) = rval; \ - test_var_call1( __LINE__, pVarInt, &v, &exp ) - -static void test_VarInt(void) -{ - static const WCHAR szNumMinus1[] = {'-','1','\0' }; - HRESULT hres; - VARIANT v, exp, vDst; - DECIMAL *pdec = &V_DECIMAL(&v); - CY *pcy = &V_CY(&v); - size_t i; - - CHECKPTR(VarInt); - - /* Test all possible V_VT values */ - for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]); i++) - { - VARTYPE vt; - - for (vt = 0; vt <= VT_BSTR_BLOB; vt++) - { - HRESULT bFail = TRUE; - - SKIPTESTS(vt); - - memset(&v, 0, sizeof(v)); - V_VT(&v) = vt | ExtraFlags[i]; - V_VT(&vDst) = VT_EMPTY; - - switch (V_VT(&v)) - { - case VT_UI1: case VT_I2: case VT_I4: case VT_R4: case VT_R8: - case VT_DECIMAL: case VT_BOOL: case VT_NULL: case VT_EMPTY: - case VT_DATE: case VT_CY: - bFail = FALSE; - break; - case VT_I8: - if (HAVE_OLEAUT32_I8) - bFail = FALSE; - break; - } - - hres = pVarInt(&v,&vDst); - if (bFail) - ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarInt: expected failure, got 0x%X vt %d|0x%X\n", - hres, vt, ExtraFlags[i]); - else - ok(hres == S_OK, "VarInt: expected S_OK, got 0x%X vt %d|0x%X\n", - hres, vt, ExtraFlags[i]); - } - } - - VARINT(BOOL,VARIANT_TRUE,I2,VARIANT_TRUE); - VARINT(BOOL,VARIANT_FALSE,I2,0); - VARINT(BOOL,1,I2,1); - VARINT(UI1,1,UI1,1); - VARINT(I2,-1,I2,-1); - VARINT(I4,-1,I4,-1); - if (HAVE_OLEAUT32_I8) - { - VARINT(I8,-1,I8,-1); - } - VARINT(R4,1.4f,R4,1); - VARINT(R4,1.5f,R4,1); - VARINT(R4,1.6f,R4,1); - VARINT(R4,-1.4f,R4,-2); /* Note these 3 are different from VarFix */ - VARINT(R4,-1.5f,R4,-2); - VARINT(R4,-1.6f,R4,-2); - /* DATE & R8 round as for R4 */ - VARINT(DATE,-1,DATE,-1); - VARINT(R8,-1,R8,-1); - VARINT(BSTR,(BSTR)szNumMinus1,R8,-1); - - V_VT(&v) = VT_EMPTY; - hres = pVarInt(&v,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_I2 && V_I2(&vDst) == 0, - "VarInt: expected 0x0,%d,0 got 0x%X,%d,%d\n", VT_EMPTY, - hres, V_VT(&vDst), V_I2(&vDst)); - - V_VT(&v) = VT_NULL; - hres = pVarInt(&v,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_NULL, - "VarInt: expected 0x0,%d got 0x%X,%d\n", VT_NULL, hres, V_VT(&vDst)); - - V_VT(&v) = VT_DECIMAL; - S(U(*pdec)).sign = DECIMAL_NEG; - S(U(*pdec)).scale = 0; - pdec->Hi32 = 0; - S1(U1(*pdec)).Mid32 = 0; - S1(U1(*pdec)).Lo32 = 1; - hres = pVarInt(&v,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_DECIMAL && !memcmp(&V_DECIMAL(&v), &V_DECIMAL(&vDst), sizeof(DECIMAL)), - "VarInt: expected 0x0,%d,identical, got 0x%X,%d\n", VT_DECIMAL, - hres, V_VT(&vDst)); - - /* FIXME: Test some fractional decimals when VarDecInt is implemented */ - - V_VT(&v) = VT_CY; - pcy->int64 = -10000; - hres = pVarInt(&v,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_CY && V_CY(&vDst).int64 == -10000, - "VarInt: VT_CY wrong, hres=0x%X\n", hres); - - V_VT(&v) = VT_CY; - pcy->int64 = -11000; - hres = pVarInt(&v,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_CY && V_CY(&vDst).int64 == -20000, - "VarInt: VT_CY wrong, hres=0x%X 0x%x%08x\n", - hres, (DWORD)(V_CY(&vDst).int64 >> 32), (DWORD)V_CY(&vDst).int64); -} - -static HRESULT (WINAPI *pVarNeg)(LPVARIANT,LPVARIANT); - -#define VARNEG(vt,val,rvt,rval) \ - V_VT(&v) = VT_##vt; V_##vt(&v) = val; \ - V_VT(&exp) = VT_##rvt; V_##rvt(&exp) = rval; \ - test_var_call1( __LINE__, pVarNeg, &v, &exp ) - -static void test_VarNeg(void) -{ - static const WCHAR szNumMinus1[] = {'-','1','\0' }; - static const WCHAR szNum1[] = {'1','\0' }; - HRESULT hres; - VARIANT v, exp, vDst; - DECIMAL *pdec = &V_DECIMAL(&v); - CY *pcy = &V_CY(&v); - size_t i; - - CHECKPTR(VarNeg); - - /* Test all possible V_VT values. But don't test the exact return values - * except for success/failure, since M$ made a hash of them in the - * native version. This at least ensures (as with all tests here) that - * we will notice if/when new vtypes/flags are added in native. - */ - for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]); i++) - { - VARTYPE vt; - - for (vt = 0; vt <= VT_BSTR_BLOB; vt++) - { - HRESULT bFail = TRUE; - - SKIPTESTS(vt); - - memset(&v, 0, sizeof(v)); - V_VT(&v) = vt | ExtraFlags[i]; - V_VT(&vDst) = VT_EMPTY; - - switch (V_VT(&v)) - { - case VT_UI1: case VT_I2: case VT_I4: - case VT_R4: case VT_R8: - case VT_DECIMAL: case VT_BOOL: case VT_NULL: case VT_EMPTY: - case VT_DATE: case VT_CY: - bFail = FALSE; - break; - case VT_I8: - if (HAVE_OLEAUT32_I8) - bFail = FALSE; - } - - hres = pVarNeg(&v,&vDst); - if (bFail) - ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarNeg: expected failure, got 0x%X vt %d|0x%X\n", - hres, vt, ExtraFlags[i]); - else - ok(hres == S_OK, "VarNeg: expected S_OK, got 0x%X vt %d|0x%X\n", - hres, vt, ExtraFlags[i]); - } - } - - VARNEG(BOOL,VARIANT_TRUE,I2,1); - VARNEG(BOOL,VARIANT_FALSE,I2,0); - VARNEG(BOOL,1,I2,-1); - VARNEG(UI1,1,I2,-1); - VARNEG(UI1,254,I2,-254); - VARNEG(I2,-32768,I4,32768); - VARNEG(I2,-1,I2,1); - VARNEG(I2,1,I2,-1); - VARNEG(I4,-((int)(~0u >> 1)) - 1,R8,-2147483648u); - VARNEG(I4,-1,I4,1); - VARNEG(I4,1,I4,-1); - if (HAVE_OLEAUT32_I8) - { - VARNEG(I8,1,I8,-1); - VARNEG(I8,-1,I8,1); - } - VARNEG(R4,1,R4,-1); - VARNEG(R4,-1,R4,1); - VARNEG(DATE,1,DATE,-1); - VARNEG(DATE,-1,DATE,1); - VARNEG(R8,1,R8,-1); - VARNEG(R8,-1,R8,1); - VARNEG(BSTR,(BSTR)szNumMinus1,R8,1); - VARNEG(BSTR,(BSTR)szNum1,R8,-1); - - V_VT(&v) = VT_EMPTY; - hres = pVarNeg(&v,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_I2 && V_I2(&vDst) == 0, - "VarNeg: expected 0x0,%d,0 got 0x%X,%d,%d\n", VT_EMPTY, - hres, V_VT(&vDst), V_I2(&vDst)); - - V_VT(&v) = VT_NULL; - hres = pVarNeg(&v,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_NULL, - "VarNeg: expected 0x0,%d got 0x%X,%d\n", VT_NULL, hres, V_VT(&vDst)); - - V_VT(&v) = VT_DECIMAL; - S(U(*pdec)).sign = DECIMAL_NEG; - S(U(*pdec)).scale = 0; - pdec->Hi32 = 0; - S1(U1(*pdec)).Mid32 = 0; - S1(U1(*pdec)).Lo32 = 1; - hres = pVarNeg(&v,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_DECIMAL && - S(U(V_DECIMAL(&vDst))).sign == 0, - "VarNeg: expected 0x0,%d,0x00, got 0x%X,%d,%02x\n", VT_DECIMAL, - hres, V_VT(&vDst), S(U(V_DECIMAL(&vDst))).sign); - - S(U(*pdec)).sign = 0; - hres = pVarNeg(&v,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_DECIMAL && - S(U(V_DECIMAL(&vDst))).sign == DECIMAL_NEG, - "VarNeg: expected 0x0,%d,0x7f, got 0x%X,%d,%02x\n", VT_DECIMAL, - hres, V_VT(&vDst), S(U(V_DECIMAL(&vDst))).sign); - - V_VT(&v) = VT_CY; - pcy->int64 = -10000; - hres = pVarNeg(&v,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_CY && V_CY(&vDst).int64 == 10000, - "VarNeg: VT_CY wrong, hres=0x%X\n", hres); -} - -static HRESULT (WINAPI *pVarRound)(LPVARIANT,int,LPVARIANT); - -static void test_Round( int line, VARIANT *arg, int deci, VARIANT *expected ) -{ - VARIANT result; - HRESULT hres; - - memset( &result, 0, sizeof(result) ); - hres = pVarRound( arg, deci, &result ); - ok_(__FILE__,line)( hres == S_OK, "wrong result %x\n", hres ); - if (hres == S_OK) - ok_(__FILE__,line)( is_expected_variant( &result, expected ), - "got %s expected %s\n", variantstr(&result), variantstr(expected) ); -} -#define VARROUND(vt,val,deci,rvt,rval) \ - V_VT(&v) = VT_##vt; V_##vt(&v) = val; \ - V_VT(&exp) = VT_##rvt; V_##rvt(&exp) = rval; \ - test_Round( __LINE__, &v, deci, &exp ) - -static void test_VarRound(void) -{ - static WCHAR szNumMin[] = {'-','1','.','4','4','9','\0' }; - static WCHAR szNum[] = {'1','.','4','5','1','\0' }; - HRESULT hres; - VARIANT v, exp, vDst; - CY *pcy = &V_CY(&v); - char buff[8]; - - CHECKPTR(VarRound); - - /* first check valid integer types */ - VARROUND(BOOL,VARIANT_TRUE,0,I2,-1); - VARROUND(BOOL,VARIANT_FALSE,0,I2,0); - VARROUND(BOOL,1,0,I2,1); - VARROUND(UI1,1,0,UI1,1); - VARROUND(UI1,254,0,UI1,254); - VARROUND(I2,-32768,0,I2,-32768); - VARROUND(I2,-1,0,I2,-1); - VARROUND(I2,1,0,I2,1); - VARROUND(I4,-((int)(~0u >> 1)) - 1,0,I4,-((int)(~0u >> 1)) - 1); - VARROUND(I4,-1,0,I4,-1); - VARROUND(I4,1,0,I4,1); - - - /* MSDN states that rounding of R4/R8 is dependent on the underlying - * bit pattern of the number and so is architecture dependent. In this - * case Wine returns .2 (which is more correct) and Native returns .3 - */ - - VARROUND(R4,1.0f,0,R4,1.0f); - VARROUND(R4,-1.0f,0,R4,-1.0f); - VARROUND(R8,1.0,0,R8,1.0); - VARROUND(R8,-1.0,0,R8,-1.0); - - /* floating point numbers aren't exactly equal and we can't just - * compare the first few digits. */ - VARROUND(DATE,1.451,1,DATE,1.5); - VARROUND(DATE,-1.449,1,DATE,-1.4); - - /* replace the decimal separator */ - GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, buff, sizeof(buff)/sizeof(char)); - if (!buff[1]) { - szNumMin[2] = buff[0]; - szNum[1] = buff[0]; - VARROUND(BSTR,(BSTR)szNumMin,1,R8,-1.40); - VARROUND(BSTR,(BSTR)szNum,1,R8,1.50); - } else { - skip("Skipping VarRound(BSTR) as decimal separator is '%s'\n", buff); - } - - VARROUND(R4,1.23456f,0,R4,1.0f); - VARROUND(R4,1.23456f,1,R4,1.2f); - VARROUND(R4,1.23456f,2,R4,1.23f); - VARROUND(R4,1.23456f,3,R4,1.235f); - VARROUND(R4,1.23456f,4,R4,1.2346f); - VARROUND(R4,-1.23456f,0,R4,-1.0f); - VARROUND(R4,-1.23456f,1,R4,-1.2f); - VARROUND(R4,-1.23456f,2,R4,-1.23f); - VARROUND(R4,-1.23456f,3,R4,-1.235f); - VARROUND(R4,-1.23456f,4,R4,-1.2346f); - - VARROUND(R8,1.23456,0,R8,1.0); - VARROUND(R8,1.23456,1,R8,1.2); - VARROUND(R8,1.23456,2,R8,1.23); - VARROUND(R8,1.23456,3,R8,1.235); - VARROUND(R8,1.23456,4,R8,1.2346); - VARROUND(R8,-1.23456,0,R8,-1.0); - VARROUND(R8,-1.23456,1,R8,-1.2); - VARROUND(R8,-1.23456,2,R8,-1.23); - VARROUND(R8,-1.23456,3,R8,-1.235); - VARROUND(R8,-1.23456,4,R8,-1.2346); - - V_VT(&v) = VT_EMPTY; - hres = pVarRound(&v,0,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_I2 && V_I2(&vDst) == 0, - "VarRound: expected 0x0,%d,0 got 0x%X,%d,%d\n", VT_EMPTY, - hres, V_VT(&vDst), V_I2(&vDst)); - - V_VT(&v) = VT_NULL; - hres = pVarRound(&v,0,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_NULL, - "VarRound: expected 0x0,%d got 0x%X,%d\n", VT_NULL, hres, V_VT(&vDst)); - - /* not yet implemented so no use testing yet - todo_wine { - DECIMAL *pdec = &V_DECIMAL(&v); - V_VT(&v) = VT_DECIMAL; - S(U(*pdec)).sign = DECIMAL_NEG; - S(U(*pdec)).scale = 0; - pdec->Hi32 = 0; - S1(U1(*pdec)).Mid32 = 0; - S1(U1(*pdec)).Lo32 = 1; - hres = pVarRound(&v,0,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_DECIMAL && - S(U(V_DECIMAL(&vDst))).sign == 0, - "VarRound: expected 0x0,%d,0x00, got 0x%X,%d,%02x\n", VT_DECIMAL, - hres, V_VT(&vDst), S(U(V_DECIMAL(&vDst))).sign); - - S(U(*pdec)).sign = 0; - hres = pVarRound(&v,0,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_DECIMAL && - S(U(V_DECIMAL(&vDst))).sign == DECIMAL_NEG, - "VarRound: expected 0x0,%d,0x7f, got 0x%X,%d,%02x\n", VT_DECIMAL, - hres, V_VT(&vDst), S(U(V_DECIMAL(&vDst))).sign); - } - */ - - V_VT(&v) = VT_CY; - pcy->int64 = 10000; - hres = pVarRound(&v,0,&vDst); - ok(hres == S_OK && V_VT(&vDst) == VT_CY && V_CY(&vDst).int64 == 10000, - "VarRound: VT_CY wrong, hres=0x%X\n", hres); - -} - -static HRESULT (WINAPI *pVarXor)(LPVARIANT,LPVARIANT,LPVARIANT); - -#define VARXOR(vt1,val1,vt2,val2,rvt,rval) \ - V_VT(&left) = VT_##vt1; V_##vt1(&left) = val1; \ - V_VT(&right) = VT_##vt2; V_##vt2(&right) = val2; \ - V_VT(&exp) = VT_##rvt; V_##rvt(&exp) = rval; \ - test_var_call2( __LINE__, pVarXor, &left, &right, &exp ) - -#define VARXORCY(vt1,val1,val2,rvt,rval) \ - V_VT(&left) = VT_##vt1; V_##vt1(&left) = val1; \ - V_VT(&right) = VT_CY; V_CY(&right).int64 = val2; \ - V_VT(&exp) = VT_##rvt; V_##rvt(&exp) = rval; \ - test_var_call2( __LINE__, pVarXor, &left, &right, &exp ) - -static void test_VarXor(void) -{ - static const WCHAR szFalse[] = { '#','F','A','L','S','E','#','\0' }; - static const WCHAR szTrue[] = { '#','T','R','U','E','#','\0' }; - VARIANT left, right, exp, result; - BSTR lbstr, rbstr; - VARTYPE i; - HRESULT hres; - - CHECKPTR(VarXor); - - /* Test all possible flag/vt combinations & the resulting vt type */ - for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]); i++) - { - VARTYPE leftvt, rightvt, resvt; - - for (leftvt = 0; leftvt <= VT_BSTR_BLOB; leftvt++) - { - - SKIPTESTS(leftvt); - - for (rightvt = 0; rightvt <= VT_BSTR_BLOB; rightvt++) - { - BOOL bFail = FALSE; - - SKIPTESTS(rightvt); - - if (leftvt == VT_BSTR || rightvt == VT_BSTR || - leftvt == VT_DISPATCH || rightvt == VT_DISPATCH || - leftvt == VT_UNKNOWN || rightvt == VT_UNKNOWN) - continue; - - memset(&left, 0, sizeof(left)); - memset(&right, 0, sizeof(right)); - V_VT(&left) = leftvt | ExtraFlags[i]; - V_VT(&right) = rightvt | ExtraFlags[i]; - V_VT(&result) = VT_EMPTY; - resvt = VT_I4; - - if (ExtraFlags[i] & VT_ARRAY || ExtraFlags[i] & VT_BYREF || - !IsValidVariantClearVT(leftvt, ExtraFlags[i]) || - !IsValidVariantClearVT(rightvt, ExtraFlags[i]) || - leftvt == VT_CLSID || rightvt == VT_CLSID || - leftvt == VT_RECORD || rightvt == VT_RECORD || - leftvt == VT_VARIANT || rightvt == VT_VARIANT || - leftvt == VT_ERROR || rightvt == VT_ERROR) - { - bFail = TRUE; - } - if (leftvt == VT_EMPTY || rightvt == VT_EMPTY) - { - if (leftvt == rightvt || - leftvt == VT_I2 || rightvt == VT_I2 || - leftvt == VT_UI1 || rightvt == VT_UI1 || - leftvt == VT_BOOL || rightvt == VT_BOOL) - resvt = VT_I2; - else if (leftvt == VT_NULL || rightvt == VT_NULL) - resvt = VT_NULL; - else if (leftvt == VT_I8 || rightvt == VT_I8) - resvt = VT_I8; - } - else if (leftvt == VT_NULL || rightvt == VT_NULL) - { - resvt = VT_NULL; - } - else if (leftvt == VT_UI1 || rightvt == VT_UI1) - { - if (leftvt == rightvt) - resvt = VT_UI1; - else if (leftvt == rightvt || - leftvt == VT_I2 || rightvt == VT_I2 || - leftvt == VT_BOOL || rightvt == VT_BOOL) - { - resvt = VT_I2; - } - else if (leftvt == VT_I8 || rightvt == VT_I8) - resvt = VT_I8; - } - else if (leftvt == VT_I2 || rightvt == VT_I2) - { - if (leftvt == rightvt || - leftvt == VT_BOOL || rightvt == VT_BOOL) - resvt = VT_I2; - else if (leftvt == VT_I8 || rightvt == VT_I8) - resvt = VT_I8; - } - else if (leftvt == VT_BOOL && rightvt == VT_BOOL) - { - resvt = VT_BOOL; - } - else if (leftvt == VT_I8 || rightvt == VT_I8) - { - if (leftvt == VT_INT || rightvt == VT_INT) - bFail = TRUE; - else - resvt = VT_I8; - } - hres = pVarXor(&left, &right, &result); - if (bFail) - ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarXor: %d|0x%X, %d|0x%X: Expected failure, got 0x%X vt %d\n", - leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], hres, - V_VT(&result)); - else - ok(hres == S_OK && V_VT(&result) == resvt, - "VarXor: %d|0x%X, %d|0x%X: expected S_OK, vt %d, got 0x%X vt %d\n", - leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], resvt, hres, - V_VT(&result)); - } - } - } - - /* Test returned values - * FIXME: Test VT_DECIMAL/VT_DISPATCH - */ - VARXOR(EMPTY,0,EMPTY,0,I2,0); - VARXOR(EMPTY,1,EMPTY,0,I2,0); - VARXOR(EMPTY,0,NULL,0,NULL,0); - VARXOR(EMPTY,0,I1,0,I4,0); - VARXOR(EMPTY,0,I1,1,I4,1); - VARXOR(EMPTY,0,UI1,0,I2,0); - VARXOR(EMPTY,0,UI1,1,I2,1); - VARXOR(EMPTY,0,I2,0,I2,0); - VARXOR(EMPTY,0,I2,1,I2,1); - VARXOR(EMPTY,0,UI2,0,I4,0); - VARXOR(EMPTY,0,UI2,1,I4,1); - VARXOR(EMPTY,0,I4,0,I4,0); - VARXOR(EMPTY,0,I4,1,I4,1); - VARXOR(EMPTY,0,UI4,0,I4,0); - VARXOR(EMPTY,0,UI4,1,I4,1); - if (HAVE_OLEAUT32_I8) - { - VARXOR(EMPTY,0,I8,0,I8,0); - VARXOR(EMPTY,0,I8,1,I8,1); - VARXOR(EMPTY,0,UI8,0,I4,0); - VARXOR(EMPTY,0,UI8,1,I4,1); - } - VARXOR(EMPTY,0,INT,0,I4,0); - VARXOR(EMPTY,0,INT,1,I4,1); - VARXOR(EMPTY,0,UINT,0,I4,0); - VARXOR(EMPTY,0,UINT,1,I4,1); - VARXOR(EMPTY,0,BOOL,0,I2,0); - VARXOR(EMPTY,0,BOOL,1,I2,1); - VARXOR(EMPTY,0,R4,0,I4,0); - VARXOR(EMPTY,0,R4,1,I4,1); - VARXOR(EMPTY,0,R8,0,I4,0); - VARXOR(EMPTY,0,R8,1,I4,1); - rbstr = SysAllocString(szFalse); - VARXOR(EMPTY,0,BSTR,rbstr,I2,0); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VARXOR(EMPTY,0,BSTR,rbstr,I2,-1); - VARXORCY(EMPTY,0,10000,I4,1); - SysFreeString(rbstr); - - /* NULL OR 0 = NULL. NULL OR n = n */ - VARXOR(NULL,0,NULL,0,NULL,0); - VARXOR(NULL,1,NULL,0,NULL,0); - VARXOR(NULL,0,I1,0,NULL,0); - VARXOR(NULL,0,I1,1,NULL,0); - VARXOR(NULL,0,UI1,0,NULL,0); - VARXOR(NULL,0,UI1,1,NULL,0); - VARXOR(NULL,0,I2,0,NULL,0); - VARXOR(NULL,0,I2,1,NULL,0); - VARXOR(NULL,0,UI2,0,NULL,0); - VARXOR(NULL,0,UI2,1,NULL,0); - VARXOR(NULL,0,I4,0,NULL,0); - VARXOR(NULL,0,I4,1,NULL,0); - VARXOR(NULL,0,UI4,0,NULL,0); - VARXOR(NULL,0,UI4,1,NULL,0); - if (HAVE_OLEAUT32_I8) - { - VARXOR(NULL,0,I8,0,NULL,0); - VARXOR(NULL,0,I8,1,NULL,0); - VARXOR(NULL,0,UI8,0,NULL,0); - VARXOR(NULL,0,UI8,1,NULL,0); - } - VARXOR(NULL,0,INT,0,NULL,0); - VARXOR(NULL,0,INT,1,NULL,0); - VARXOR(NULL,0,UINT,0,NULL,0); - VARXOR(NULL,0,UINT,1,NULL,0); - VARXOR(NULL,0,BOOL,0,NULL,0); - VARXOR(NULL,0,BOOL,1,NULL,0); - VARXOR(NULL,0,R4,0,NULL,0); - VARXOR(NULL,0,R4,1,NULL,0); - VARXOR(NULL,0,R8,0,NULL,0); - VARXOR(NULL,0,R8,1,NULL,0); - rbstr = SysAllocString(szFalse); - VARXOR(NULL,0,BSTR,rbstr,NULL,0); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VARXOR(NULL,0,BSTR,rbstr,NULL,0); - SysFreeString(rbstr); - VARXORCY(NULL,0,10000,NULL,0); - VARXORCY(NULL,0,0,NULL,0); - - VARXOR(BOOL,VARIANT_TRUE,BOOL,VARIANT_TRUE,BOOL,VARIANT_FALSE); - VARXOR(BOOL,VARIANT_TRUE,BOOL,VARIANT_FALSE,BOOL,VARIANT_TRUE); - VARXOR(BOOL,VARIANT_FALSE,BOOL,VARIANT_TRUE,BOOL,VARIANT_TRUE); - VARXOR(BOOL,VARIANT_FALSE,BOOL,VARIANT_FALSE,BOOL,VARIANT_FALSE); - /* Assume x,y & y,x are the same from now on to reduce the number of tests */ - VARXOR(BOOL,VARIANT_TRUE,I1,-1,I4,0); - VARXOR(BOOL,VARIANT_TRUE,I1,0,I4,-1); - VARXOR(BOOL,VARIANT_FALSE,I1,0,I4,0); - VARXOR(BOOL,VARIANT_TRUE,UI1,255,I2,-256); - VARXOR(BOOL,VARIANT_TRUE,UI1,0,I2,-1); - VARXOR(BOOL,VARIANT_FALSE,UI1,0,I2,0); - VARXOR(BOOL,VARIANT_TRUE,I2,-1,I2,0); - VARXOR(BOOL,VARIANT_TRUE,I2,0,I2,-1); - VARXOR(BOOL,VARIANT_FALSE,I2,0,I2,0); - VARXOR(BOOL,VARIANT_TRUE,UI2,65535,I4,-65536); - VARXOR(BOOL,VARIANT_TRUE,UI2,0,I4,-1); - VARXOR(BOOL,VARIANT_FALSE,UI2,0,I4,0); - VARXOR(BOOL,VARIANT_TRUE,I4,-1,I4,0); - VARXOR(BOOL,VARIANT_TRUE,I4,0,I4,-1); - VARXOR(BOOL,VARIANT_FALSE,I4,0,I4,0); - VARXOR(BOOL,VARIANT_TRUE,UI4,0xffffffff,I4,0); - VARXOR(BOOL,VARIANT_TRUE,UI4,0,I4,-1); - VARXOR(BOOL,VARIANT_FALSE,UI4,0,I4,0); - VARXOR(BOOL,VARIANT_TRUE,R4,-1,I4,0); - VARXOR(BOOL,VARIANT_TRUE,R4,0,I4,-1); - VARXOR(BOOL,VARIANT_FALSE,R4,0,I4,0); - VARXOR(BOOL,VARIANT_TRUE,R8,-1,I4,0); - VARXOR(BOOL,VARIANT_TRUE,R8,0,I4,-1); - VARXOR(BOOL,VARIANT_FALSE,R8,0,I4,0); - VARXOR(BOOL,VARIANT_TRUE,DATE,-1,I4,0); - VARXOR(BOOL,VARIANT_TRUE,DATE,0,I4,-1); - VARXOR(BOOL,VARIANT_FALSE,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VARXOR(BOOL,VARIANT_TRUE,I8,-1,I8,0); - VARXOR(BOOL,VARIANT_TRUE,I8,0,I8,-1); - VARXOR(BOOL,VARIANT_FALSE,I8,0,I8,0); - /* This returns DISP_E_OVERFLOW which indicates that a conversion - * to I4 is performed. - */ - /* VARXOR(BOOL,VARIANT_TRUE,UI8,-1,I4,-1); */ - VARXOR(BOOL,VARIANT_TRUE,UI8,0,I4,-1); - VARXOR(BOOL,VARIANT_FALSE,UI8,0,I4,0); - } - VARXOR(BOOL,VARIANT_TRUE,INT,-1,I4,0); - VARXOR(BOOL,VARIANT_TRUE,INT,0,I4,-1); - VARXOR(BOOL,VARIANT_FALSE,INT,0,I4,0); - VARXOR(BOOL,VARIANT_TRUE,UINT,0xffffffff,I4,0); - VARXOR(BOOL,VARIANT_TRUE,UINT,0,I4,-1); - VARXOR(BOOL,VARIANT_FALSE,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VARXOR(BOOL,VARIANT_FALSE,BSTR,rbstr,BOOL,VARIANT_FALSE); - VARXOR(BOOL,VARIANT_TRUE,BSTR,rbstr,BOOL,VARIANT_TRUE); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VARXOR(BOOL,VARIANT_FALSE,BSTR,rbstr,BOOL,VARIANT_TRUE); - VARXOR(BOOL,VARIANT_TRUE,BSTR,rbstr,BOOL,VARIANT_FALSE); - SysFreeString(rbstr); - VARXORCY(BOOL,VARIANT_TRUE,10000,I4,-2); - VARXORCY(BOOL,VARIANT_TRUE,0,I4,-1); - VARXORCY(BOOL,VARIANT_FALSE,0,I4,0); - - VARXOR(I1,-1,I1,-1,I4,0); - VARXOR(I1,-1,I1,0,I4,-1); - VARXOR(I1,0,I1,0,I4,0); - VARXOR(I1,-1,UI1,255,I4,-256); - VARXOR(I1,-1,UI1,0,I4,-1); - VARXOR(I1,0,UI1,0,I4,0); - VARXOR(I1,-1,I2,-1,I4,0); - VARXOR(I1,-1,I2,0,I4,-1); - VARXOR(I1,0,I2,0,I4,0); - VARXOR(I1,-1,UI2,65535,I4,-65536); - VARXOR(I1,-1,UI2,0,I4,-1); - VARXOR(I1,0,UI2,0,I4,0); - VARXOR(I1,-1,I4,-1,I4,0); - VARXOR(I1,-1,I4,0,I4,-1); - VARXOR(I1,0,I4,0,I4,0); - VARXOR(I1,-1,UI4,0xffffffff,I4,0); - VARXOR(I1,-1,UI4,0,I4,-1); - VARXOR(I1,0,UI4,0,I4,0); - VARXOR(I1,-1,R4,-1,I4,0); - VARXOR(I1,-1,R4,0,I4,-1); - VARXOR(I1,0,R4,0,I4,0); - VARXOR(I1,-1,R8,-1,I4,0); - VARXOR(I1,-1,R8,0,I4,-1); - VARXOR(I1,0,R8,0,I4,0); - VARXOR(I1,-1,DATE,-1,I4,0); - VARXOR(I1,-1,DATE,0,I4,-1); - VARXOR(I1,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VARXOR(I1,-1,I8,-1,I8,0); - VARXOR(I1,-1,I8,0,I8,-1); - VARXOR(I1,0,I8,0,I8,0); - VARXOR(I1,-1,UI8,0,I4,-1); - VARXOR(I1,0,UI8,0,I4,0); - } - VARXOR(I1,-1,INT,-1,I4,0); - VARXOR(I1,-1,INT,0,I4,-1); - VARXOR(I1,0,INT,0,I4,0); - VARXOR(I1,-1,UINT,0xffffffff,I4,0); - VARXOR(I1,-1,UINT,0,I4,-1); - VARXOR(I1,0,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VARXOR(I1,0,BSTR,rbstr,I4,0); - VARXOR(I1,-1,BSTR,rbstr,I4,-1); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VARXOR(I1,0,BSTR,rbstr,I4,-1); - VARXOR(I1,-1,BSTR,rbstr,I4,0); - SysFreeString(rbstr); - VARXORCY(I1,-1,10000,I4,-2); - VARXORCY(I1,-1,0,I4,-1); - VARXORCY(I1,0,0,I4,0); - - VARXOR(UI1,255,UI1,255,UI1,0); - VARXOR(UI1,255,UI1,0,UI1,255); - VARXOR(UI1,0,UI1,0,UI1,0); - VARXOR(UI1,255,I2,-1,I2,-256); - VARXOR(UI1,255,I2,0,I2,255); - VARXOR(UI1,0,I2,0,I2,0); - VARXOR(UI1,255,UI2,65535,I4,65280); - VARXOR(UI1,255,UI2,0,I4,255); - VARXOR(UI1,0,UI2,0,I4,0); - VARXOR(UI1,255,I4,-1,I4,-256); - VARXOR(UI1,255,I4,0,I4,255); - VARXOR(UI1,0,I4,0,I4,0); - VARXOR(UI1,255,UI4,0xffffffff,I4,-256); - VARXOR(UI1,255,UI4,0,I4,255); - VARXOR(UI1,0,UI4,0,I4,0); - VARXOR(UI1,255,R4,-1,I4,-256); - VARXOR(UI1,255,R4,0,I4,255); - VARXOR(UI1,0,R4,0,I4,0); - VARXOR(UI1,255,R8,-1,I4,-256); - VARXOR(UI1,255,R8,0,I4,255); - VARXOR(UI1,0,R8,0,I4,0); - VARXOR(UI1,255,DATE,-1,I4,-256); - VARXOR(UI1,255,DATE,0,I4,255); - VARXOR(UI1,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VARXOR(UI1,255,I8,-1,I8,-256); - VARXOR(UI1,255,I8,0,I8,255); - VARXOR(UI1,0,I8,0,I8,0); - VARXOR(UI1,255,UI8,0,I4,255); - VARXOR(UI1,0,UI8,0,I4,0); - } - VARXOR(UI1,255,INT,-1,I4,-256); - VARXOR(UI1,255,INT,0,I4,255); - VARXOR(UI1,0,INT,0,I4,0); - VARXOR(UI1,255,UINT,0xffffffff,I4,-256); - VARXOR(UI1,255,UINT,0,I4,255); - VARXOR(UI1,0,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VARXOR(UI1,0,BSTR,rbstr,I2,0); - VARXOR(UI1,255,BSTR,rbstr,I2,255); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VARXOR(UI1,0,BSTR,rbstr,I2,-1); - VARXOR(UI1,255,BSTR,rbstr,I2,-256); - SysFreeString(rbstr); - VARXORCY(UI1,255,10000,I4,254); - VARXORCY(UI1,255,0,I4,255); - VARXORCY(UI1,0,0,I4,0); - - VARXOR(I2,-1,I2,-1,I2,0); - VARXOR(I2,-1,I2,0,I2,-1); - VARXOR(I2,0,I2,0,I2,0); - VARXOR(I2,-1,UI2,65535,I4,-65536); - VARXOR(I2,-1,UI2,0,I4,-1); - VARXOR(I2,0,UI2,0,I4,0); - VARXOR(I2,-1,I4,-1,I4,0); - VARXOR(I2,-1,I4,0,I4,-1); - VARXOR(I2,0,I4,0,I4,0); - VARXOR(I2,-1,UI4,0xffffffff,I4,0); - VARXOR(I2,-1,UI4,0,I4,-1); - VARXOR(I2,0,UI4,0,I4,0); - VARXOR(I2,-1,R4,-1,I4,0); - VARXOR(I2,-1,R4,0,I4,-1); - VARXOR(I2,0,R4,0,I4,0); - VARXOR(I2,-1,R8,-1,I4,0); - VARXOR(I2,-1,R8,0,I4,-1); - VARXOR(I2,0,R8,0,I4,0); - VARXOR(I2,-1,DATE,-1,I4,0); - VARXOR(I2,-1,DATE,0,I4,-1); - VARXOR(I2,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VARXOR(I2,-1,I8,-1,I8,0); - VARXOR(I2,-1,I8,0,I8,-1); - VARXOR(I2,0,I8,0,I8,0); - VARXOR(I2,-1,UI8,0,I4,-1); - VARXOR(I2,0,UI8,0,I4,0); - } - VARXOR(I2,-1,INT,-1,I4,0); - VARXOR(I2,-1,INT,0,I4,-1); - VARXOR(I2,0,INT,0,I4,0); - VARXOR(I2,-1,UINT,0xffffffff,I4,0); - VARXOR(I2,-1,UINT,0,I4,-1); - VARXOR(I2,0,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VARXOR(I2,0,BSTR,rbstr,I2,0); - VARXOR(I2,-1,BSTR,rbstr,I2,-1); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VARXOR(I2,0,BSTR,rbstr,I2,-1); - VARXOR(I2,-1,BSTR,rbstr,I2,0); - SysFreeString(rbstr); - VARXORCY(I2,-1,10000,I4,-2); - VARXORCY(I2,-1,0,I4,-1); - VARXORCY(I2,0,0,I4,0); - - VARXOR(UI2,65535,UI2,65535,I4,0); - VARXOR(UI2,65535,UI2,0,I4,65535); - VARXOR(UI2,0,UI2,0,I4,0); - VARXOR(UI2,65535,I4,-1,I4,-65536); - VARXOR(UI2,65535,I4,0,I4,65535); - VARXOR(UI2,0,I4,0,I4,0); - VARXOR(UI2,65535,UI4,0xffffffff,I4,-65536); - VARXOR(UI2,65535,UI4,0,I4,65535); - VARXOR(UI2,0,UI4,0,I4,0); - VARXOR(UI2,65535,R4,-1,I4,-65536); - VARXOR(UI2,65535,R4,0,I4,65535); - VARXOR(UI2,0,R4,0,I4,0); - VARXOR(UI2,65535,R8,-1,I4,-65536); - VARXOR(UI2,65535,R8,0,I4,65535); - VARXOR(UI2,0,R8,0,I4,0); - VARXOR(UI2,65535,DATE,-1,I4,-65536); - VARXOR(UI2,65535,DATE,0,I4,65535); - VARXOR(UI2,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VARXOR(UI2,65535,I8,-1,I8,-65536); - VARXOR(UI2,65535,I8,0,I8,65535); - VARXOR(UI2,0,I8,0,I8,0); - VARXOR(UI2,65535,UI8,0,I4,65535); - VARXOR(UI2,0,UI8,0,I4,0); - } - VARXOR(UI2,65535,INT,-1,I4,-65536); - VARXOR(UI2,65535,INT,0,I4,65535); - VARXOR(UI2,0,INT,0,I4,0); - VARXOR(UI2,65535,UINT,0xffffffff,I4,-65536); - VARXOR(UI2,65535,UINT,0,I4,65535); - VARXOR(UI2,0,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VARXOR(UI2,0,BSTR,rbstr,I4,0); - VARXOR(UI2,65535,BSTR,rbstr,I4,65535); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VARXOR(UI2,0,BSTR,rbstr,I4,-1); - VARXOR(UI2,65535,BSTR,rbstr,I4,-65536); - SysFreeString(rbstr); - VARXORCY(UI2,65535,10000,I4,65534); - VARXORCY(UI2,65535,0,I4,65535); - VARXORCY(UI2,0,0,I4,0); - - VARXOR(I4,-1,I4,-1,I4,0); - VARXOR(I4,-1,I4,0,I4,-1); - VARXOR(I4,0,I4,0,I4,0); - VARXOR(I4,-1,UI4,0xffffffff,I4,0); - VARXOR(I4,-1,UI4,0,I4,-1); - VARXOR(I4,0,UI4,0,I4,0); - VARXOR(I4,-1,R4,-1,I4,0); - VARXOR(I4,-1,R4,0,I4,-1); - VARXOR(I4,0,R4,0,I4,0); - VARXOR(I4,-1,R8,-1,I4,0); - VARXOR(I4,-1,R8,0,I4,-1); - VARXOR(I4,0,R8,0,I4,0); - VARXOR(I4,-1,DATE,-1,I4,0); - VARXOR(I4,-1,DATE,0,I4,-1); - VARXOR(I4,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VARXOR(I4,-1,I8,-1,I8,0); - VARXOR(I4,-1,I8,0,I8,-1); - VARXOR(I4,0,I8,0,I8,0); - VARXOR(I4,-1,UI8,0,I4,-1); - VARXOR(I4,0,UI8,0,I4,0); - } - VARXOR(I4,-1,INT,-1,I4,0); - VARXOR(I4,-1,INT,0,I4,-1); - VARXOR(I4,0,INT,0,I4,0); - VARXOR(I4,-1,UINT,0xffffffff,I4,0); - VARXOR(I4,-1,UINT,0,I4,-1); - VARXOR(I4,0,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VARXOR(I4,0,BSTR,rbstr,I4,0); - VARXOR(I4,-1,BSTR,rbstr,I4,-1); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VARXOR(I4,0,BSTR,rbstr,I4,-1); - VARXOR(I4,-1,BSTR,rbstr,I4,0); - SysFreeString(rbstr); - VARXORCY(I4,-1,10000,I4,-2); - VARXORCY(I4,-1,0,I4,-1); - VARXORCY(I4,0,0,I4,0); - - VARXOR(UI4,0xffffffff,UI4,0xffffffff,I4,0); - VARXOR(UI4,0xffffffff,UI4,0,I4,-1); - VARXOR(UI4,0,UI4,0,I4,0); - VARXOR(UI4,0xffffffff,R4,-1,I4,0); - VARXOR(UI4,0xffffffff,R4,0,I4,-1); - VARXOR(UI4,0,R4,0,I4,0); - VARXOR(UI4,0xffffffff,R8,-1,I4,0); - VARXOR(UI4,0xffffffff,R8,0,I4,-1); - VARXOR(UI4,0,R8,0,I4,0); - VARXOR(UI4,0xffffffff,DATE,-1,I4,0); - VARXOR(UI4,0xffffffff,DATE,0,I4,-1); - VARXOR(UI4,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VARXOR(UI4,0xffffffff,I8,0,I8,0xffffffff); - VARXOR(UI4,VARIANT_FALSE,I8,VARIANT_FALSE,I8,0); - VARXOR(UI4,0,I8,0,I8,0); - VARXOR(UI4,0xffffffff,UI8,0,I4,-1); - VARXOR(UI4,0,UI8,0,I4,0); - } - VARXOR(UI4,0xffffffff,INT,-1,I4,0); - VARXOR(UI4,0xffffffff,INT,0,I4,-1); - VARXOR(UI4,0,INT,0,I4,0); - VARXOR(UI4,0xffffffff,UINT,0xffffffff,I4,0); - VARXOR(UI4,0xffffffff,UINT,0,I4,-1); - VARXOR(UI4,0,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VARXOR(UI4,0,BSTR,rbstr,I4,0); - VARXOR(UI4,0xffffffff,BSTR,rbstr,I4,-1); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VARXOR(UI4,0,BSTR,rbstr,I4,-1); - VARXOR(UI4,0xffffffff,BSTR,rbstr,I4,0); - SysFreeString(rbstr); - VARXORCY(UI4,0xffffffff,10000,I4,-2); - VARXORCY(UI4,0xffffffff,0,I4,-1); - VARXORCY(UI4,0,0,I4,0); - - VARXOR(R4,-1,R4,-1,I4,0); - VARXOR(R4,-1,R4,0,I4,-1); - VARXOR(R4,0,R4,0,I4,0); - VARXOR(R4,-1,R8,-1,I4,0); - VARXOR(R4,-1,R8,0,I4,-1); - VARXOR(R4,0,R8,0,I4,0); - VARXOR(R4,-1,DATE,-1,I4,0); - VARXOR(R4,-1,DATE,0,I4,-1); - VARXOR(R4,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VARXOR(R4,-1,I8,-1,I8,0); - VARXOR(R4,-1,I8,0,I8,-1); - VARXOR(R4,0,I8,0,I8,0); - VARXOR(R4,-1,UI8,0,I4,-1); - VARXOR(R4,0,UI8,0,I4,0); - } - VARXOR(R4,-1,INT,-1,I4,0); - VARXOR(R4,-1,INT,0,I4,-1); - VARXOR(R4,0,INT,0,I4,0); - VARXOR(R4,-1,UINT,0xffffffff,I4,0); - VARXOR(R4,-1,UINT,0,I4,-1); - VARXOR(R4,0,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VARXOR(R4,0,BSTR,rbstr,I4,0); - VARXOR(R4,-1,BSTR,rbstr,I4,-1); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VARXOR(R4,0,BSTR,rbstr,I4,-1); - VARXOR(R4,-1,BSTR,rbstr,I4,0); - SysFreeString(rbstr); - VARXORCY(R4,-1,10000,I4,-2); - VARXORCY(R4,-1,0,I4,-1); - VARXORCY(R4,0,0,I4,0); - - VARXOR(R8,-1,R8,-1,I4,0); - VARXOR(R8,-1,R8,0,I4,-1); - VARXOR(R8,0,R8,0,I4,0); - VARXOR(R8,-1,DATE,-1,I4,0); - VARXOR(R8,-1,DATE,0,I4,-1); - VARXOR(R8,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VARXOR(R8,-1,I8,-1,I8,0); - VARXOR(R8,-1,I8,0,I8,-1); - VARXOR(R8,0,I8,0,I8,0); - VARXOR(R8,-1,UI8,0,I4,-1); - VARXOR(R8,0,UI8,0,I4,0); - } - VARXOR(R8,-1,INT,-1,I4,0); - VARXOR(R8,-1,INT,0,I4,-1); - VARXOR(R8,0,INT,0,I4,0); - VARXOR(R8,-1,UINT,0xffffffff,I4,0); - VARXOR(R8,-1,UINT,0,I4,-1); - VARXOR(R8,0,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VARXOR(R8,0,BSTR,rbstr,I4,0); - VARXOR(R8,-1,BSTR,rbstr,I4,-1); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VARXOR(R8,0,BSTR,rbstr,I4,-1); - VARXOR(R8,-1,BSTR,rbstr,I4,0); - SysFreeString(rbstr); - VARXORCY(R8,-1,10000,I4,-2); - VARXORCY(R8,-1,0,I4,-1); - VARXORCY(R8,0,0,I4,0); - - VARXOR(DATE,-1,DATE,-1,I4,0); - VARXOR(DATE,-1,DATE,0,I4,-1); - VARXOR(DATE,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VARXOR(DATE,-1,I8,-1,I8,0); - VARXOR(DATE,-1,I8,0,I8,-1); - VARXOR(DATE,0,I8,0,I8,0); - VARXOR(DATE,-1,UI8,0,I4,-1); - VARXOR(DATE,0,UI8,0,I4,0); - } - VARXOR(DATE,-1,INT,-1,I4,0); - VARXOR(DATE,-1,INT,0,I4,-1); - VARXOR(DATE,0,INT,0,I4,0); - VARXOR(DATE,-1,UINT,0xffffffff,I4,0); - VARXOR(DATE,-1,UINT,0,I4,-1); - VARXOR(DATE,0,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VARXOR(DATE,0,BSTR,rbstr,I4,0); - VARXOR(DATE,-1,BSTR,rbstr,I4,-1); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VARXOR(DATE,0,BSTR,rbstr,I4,-1); - VARXOR(DATE,-1,BSTR,rbstr,I4,0); - SysFreeString(rbstr); - VARXORCY(DATE,-1,10000,I4,-2); - VARXORCY(DATE,-1,0,I4,-1); - VARXORCY(DATE,0,0,I4,0); - - if (HAVE_OLEAUT32_I8) - { - VARXOR(I8,-1,I8,-1,I8,0); - VARXOR(I8,-1,I8,0,I8,-1); - VARXOR(I8,0,I8,0,I8,0); - VARXOR(I8,-1,UI8,0,I8,-1); - VARXOR(I8,0,UI8,0,I8,0); - VARXOR(I8,-1,UINT,0,I8,-1); - VARXOR(I8,0,UINT,0,I8,0); - rbstr = SysAllocString(szFalse); - VARXOR(I8,0,BSTR,rbstr,I8,0); - VARXOR(I8,-1,BSTR,rbstr,I8,-1); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VARXOR(I8,0,BSTR,rbstr,I8,-1); - VARXOR(I8,-1,BSTR,rbstr,I8,0); - SysFreeString(rbstr); - VARXORCY(I8,-1,10000,I8,-2); - VARXORCY(I8,-1,0,I8,-1); - VARXORCY(I8,0,0,I8,0); - - VARXOR(UI8,0xffff,UI8,0xffff,I4,0); - VARXOR(UI8,0xffff,UI8,0,I4,0xffff); - VARXOR(UI8,0,UI8,0,I4,0); - VARXOR(UI8,0xffff,INT,-1,I4,-65536); - VARXOR(UI8,0xffff,INT,0,I4,0xffff); - VARXOR(UI8,0,INT,0,I4,0); - VARXOR(UI8,0xffff,UINT,0xffff,I4,0); - VARXOR(UI8,0xffff,UINT,0,I4,0xffff); - VARXOR(UI8,0,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VARXOR(UI8,0,BSTR,rbstr,I4,0); - VARXOR(UI8,0xffff,BSTR,rbstr,I4,0xffff); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VARXOR(UI8,0,BSTR,rbstr,I4,-1); - VARXOR(UI8,0xffff,BSTR,rbstr,I4,-65536); - SysFreeString(rbstr); - VARXORCY(UI8,0xffff,10000,I4,65534); - VARXORCY(UI8,0xffff,0,I4,0xffff); - VARXORCY(UI8,0,0,I4,0); - } - - VARXOR(INT,-1,INT,-1,I4,0); - VARXOR(INT,-1,INT,0,I4,-1); - VARXOR(INT,0,INT,0,I4,0); - VARXOR(INT,-1,UINT,0xffff,I4,-65536); - VARXOR(INT,-1,UINT,0,I4,-1); - VARXOR(INT,0,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VARXOR(INT,0,BSTR,rbstr,I4,0); - VARXOR(INT,-1,BSTR,rbstr,I4,-1); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VARXOR(INT,0,BSTR,rbstr,I4,-1); - VARXOR(INT,-1,BSTR,rbstr,I4,0); - SysFreeString(rbstr); - VARXORCY(INT,-1,10000,I4,-2); - VARXORCY(INT,-1,0,I4,-1); - VARXORCY(INT,0,0,I4,0); - - VARXOR(UINT,0xffff,UINT,0xffff,I4,0); - VARXOR(UINT,0xffff,UINT,0,I4,0xffff); - VARXOR(UINT,0,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VARXOR(UINT,0,BSTR,rbstr,I4,0); - VARXOR(UINT,0xffff,BSTR,rbstr,I4,0xffff); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VARXOR(UINT,0,BSTR,rbstr,I4,-1); - VARXOR(UINT,0xffff,BSTR,rbstr,I4,-65536); - SysFreeString(rbstr); - VARXORCY(UINT,0xffff,10000,I4,65534); - VARXORCY(UINT,0xffff,0,I4,0xffff); - VARXORCY(UINT,0,0,I4,0); - - lbstr = SysAllocString(szFalse); - rbstr = SysAllocString(szFalse); - VARXOR(BSTR,lbstr,BSTR,rbstr,BOOL,0); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VARXOR(BSTR,lbstr,BSTR,rbstr,BOOL,VARIANT_TRUE); - SysFreeString(lbstr); - lbstr = SysAllocString(szTrue); - VARXOR(BSTR,lbstr,BSTR,rbstr,BOOL,VARIANT_FALSE); - VARXORCY(BSTR,lbstr,10000,I4,-2); - SysFreeString(lbstr); - lbstr = SysAllocString(szFalse); - VARXORCY(BSTR,lbstr,10000,I4,1); - SysFreeString(lbstr); - SysFreeString(rbstr); -} - -static HRESULT (WINAPI *pVarOr)(LPVARIANT,LPVARIANT,LPVARIANT); - -#define VAROR(vt1,val1,vt2,val2,rvt,rval) \ - V_VT(&left) = VT_##vt1; V_##vt1(&left) = val1; \ - V_VT(&right) = VT_##vt2; V_##vt2(&right) = val2; \ - V_VT(&exp) = VT_##rvt; V_##rvt(&exp) = rval; \ - test_var_call2( __LINE__, pVarOr, &left, &right, &exp ) - -#define VARORCY(vt1,val1,val2,rvt,rval) \ - V_VT(&left) = VT_##vt1; V_##vt1(&left) = val1; \ - V_VT(&right) = VT_CY; V_CY(&right).int64 = val2; \ - V_VT(&exp) = VT_##rvt; V_##rvt(&exp) = rval; \ - test_var_call2( __LINE__, pVarOr, &left, &right, &exp ) - -static void test_VarOr(void) -{ - static const WCHAR szFalse[] = { '#','F','A','L','S','E','#','\0' }; - static const WCHAR szTrue[] = { '#','T','R','U','E','#','\0' }; - VARIANT left, right, exp, result; - BSTR lbstr, rbstr; - VARTYPE i; - HRESULT hres; - - CHECKPTR(VarOr); - - /* Test all possible flag/vt combinations & the resulting vt type */ - for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]); i++) - { - VARTYPE leftvt, rightvt, resvt; - - for (leftvt = 0; leftvt <= VT_BSTR_BLOB; leftvt++) - { - - SKIPTESTS(leftvt); - - for (rightvt = 0; rightvt <= VT_BSTR_BLOB; rightvt++) - { - BOOL bFail = FALSE; - - SKIPTESTS(rightvt); - - if (leftvt == VT_BSTR || rightvt == VT_BSTR || - leftvt == VT_DISPATCH || rightvt == VT_DISPATCH || - leftvt == VT_UNKNOWN || rightvt == VT_UNKNOWN) - continue; - - memset(&left, 0, sizeof(left)); - memset(&right, 0, sizeof(right)); - V_VT(&left) = leftvt | ExtraFlags[i]; - V_VT(&right) = rightvt | ExtraFlags[i]; - V_VT(&result) = VT_EMPTY; - resvt = VT_I4; - - if (ExtraFlags[i] & VT_ARRAY || ExtraFlags[i] & VT_BYREF || - !IsValidVariantClearVT(leftvt, ExtraFlags[i]) || - !IsValidVariantClearVT(rightvt, ExtraFlags[i]) || - leftvt == VT_CLSID || rightvt == VT_CLSID || - leftvt == VT_RECORD || rightvt == VT_RECORD || - leftvt == VT_VARIANT || rightvt == VT_VARIANT || - leftvt == VT_ERROR || rightvt == VT_ERROR) - { - bFail = TRUE; - } - if (leftvt == VT_EMPTY || rightvt == VT_EMPTY) - { - if (leftvt == rightvt || - leftvt == VT_I2 || rightvt == VT_I2 || - leftvt == VT_UI1 || rightvt == VT_UI1 || - leftvt == VT_BOOL || rightvt == VT_BOOL) - resvt = VT_I2; - else if (leftvt == VT_NULL || rightvt == VT_NULL) - resvt = VT_NULL; - else if (leftvt == VT_I8 || rightvt == VT_I8) - resvt = VT_I8; - } - else if (leftvt == VT_NULL || rightvt == VT_NULL) - { - resvt = VT_NULL; - } - else if (leftvt == VT_UI1 || rightvt == VT_UI1) - { - if (leftvt == rightvt) - resvt = VT_UI1; - else if (leftvt == rightvt || - leftvt == VT_I2 || rightvt == VT_I2 || - leftvt == VT_BOOL || rightvt == VT_BOOL) - { - resvt = VT_I2; - } - else if (leftvt == VT_I8 || rightvt == VT_I8) - resvt = VT_I8; - } - else if (leftvt == VT_I2 || rightvt == VT_I2) - { - if (leftvt == rightvt || - leftvt == VT_BOOL || rightvt == VT_BOOL) - resvt = VT_I2; - else if (leftvt == VT_I8 || rightvt == VT_I8) - resvt = VT_I8; - } - else if (leftvt == VT_BOOL && rightvt == VT_BOOL) - { - resvt = VT_BOOL; - } - else if (leftvt == VT_I8 || rightvt == VT_I8) - { - if (leftvt == VT_INT || rightvt == VT_INT) - bFail = TRUE; - else - resvt = VT_I8; - } - hres = pVarOr(&left, &right, &result); - if (bFail) - ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarOr: %d|0x%X, %d|0x%X: Expected failure, got 0x%X vt %d\n", - leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], hres, - V_VT(&result)); - else - ok(hres == S_OK && V_VT(&result) == resvt, - "VarOr: %d|0x%X, %d|0x%X: expected S_OK, vt %d, got 0x%X vt %d\n", - leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], resvt, hres, - V_VT(&result)); - } - } - } - - /* Test returned values. Since we know the returned type is correct - * and that we handle all combinations of invalid types, just check - * that good type combinations produce the desired value. - * FIXME: Test VT_DECIMAL/VT_DISPATCH - */ - VAROR(EMPTY,0,EMPTY,0,I2,0); - VAROR(EMPTY,1,EMPTY,0,I2,0); - VAROR(EMPTY,0,NULL,0,NULL,0); - VAROR(EMPTY,0,I1,0,I4,0); - VAROR(EMPTY,0,I1,1,I4,1); - VAROR(EMPTY,0,UI1,0,I2,0); - VAROR(EMPTY,0,UI1,1,I2,1); - VAROR(EMPTY,0,I2,0,I2,0); - VAROR(EMPTY,0,I2,1,I2,1); - VAROR(EMPTY,0,UI2,0,I4,0); - VAROR(EMPTY,0,UI2,1,I4,1); - VAROR(EMPTY,0,I4,0,I4,0); - VAROR(EMPTY,0,I4,1,I4,1); - VAROR(EMPTY,0,UI4,0,I4,0); - VAROR(EMPTY,0,UI4,1,I4,1); - if (HAVE_OLEAUT32_I8) - { - VAROR(EMPTY,0,I8,0,I8,0); - VAROR(EMPTY,0,I8,1,I8,1); - VAROR(EMPTY,0,UI8,0,I4,0); - VAROR(EMPTY,0,UI8,1,I4,1); - } - VAROR(EMPTY,0,INT,0,I4,0); - VAROR(EMPTY,0,INT,1,I4,1); - VAROR(EMPTY,0,UINT,0,I4,0); - VAROR(EMPTY,0,UINT,1,I4,1); - VAROR(EMPTY,0,BOOL,0,I2,0); - VAROR(EMPTY,0,BOOL,1,I2,1); - VAROR(EMPTY,0,R4,0,I4,0); - VAROR(EMPTY,0,R4,1,I4,1); - VAROR(EMPTY,0,R8,0,I4,0); - VAROR(EMPTY,0,R8,1,I4,1); - rbstr = SysAllocString(szFalse); - VAROR(EMPTY,0,BSTR,rbstr,I2,0); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VAROR(EMPTY,0,BSTR,rbstr,I2,-1); - SysFreeString(rbstr); - VARORCY(EMPTY,0,10000,I4,1); - - /* NULL OR 0 = NULL. NULL OR n = n */ - VAROR(NULL,0,NULL,0,NULL,0); - VAROR(NULL,1,NULL,0,NULL,0); - VAROR(NULL,0,I1,0,NULL,0); - VAROR(NULL,0,I1,1,I4,1); - VAROR(NULL,0,UI1,0,NULL,0); - VAROR(NULL,0,UI1,1,UI1,1); - VAROR(NULL,0,I2,0,NULL,0); - VAROR(NULL,0,I2,1,I2,1); - VAROR(NULL,0,UI2,0,NULL,0); - VAROR(NULL,0,UI2,1,I4,1); - VAROR(NULL,0,I4,0,NULL,0); - VAROR(NULL,0,I4,1,I4,1); - VAROR(NULL,0,UI4,0,NULL,0); - VAROR(NULL,0,UI4,1,I4,1); - if (HAVE_OLEAUT32_I8) - { - VAROR(NULL,0,I8,0,NULL,0); - VAROR(NULL,0,I8,1,I8,1); - VAROR(NULL,0,UI8,0,NULL,0); - VAROR(NULL,0,UI8,1,I4,1); - } - VAROR(NULL,0,INT,0,NULL,0); - VAROR(NULL,0,INT,1,I4,1); - VAROR(NULL,0,UINT,0,NULL,0); - VAROR(NULL,0,UINT,1,I4,1); - VAROR(NULL,0,BOOL,0,NULL,0); - VAROR(NULL,0,BOOL,1,BOOL,1); - VAROR(NULL,0,R4,0,NULL,0); - VAROR(NULL,0,R4,1,I4,1); - VAROR(NULL,0,R8,0,NULL,0); - VAROR(NULL,0,R8,1,I4,1); - rbstr = SysAllocString(szFalse); - VAROR(NULL,0,BSTR,rbstr,NULL,0); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VAROR(NULL,0,BSTR,rbstr,BOOL,VARIANT_TRUE); - SysFreeString(rbstr); - VARORCY(NULL,0,10000,I4,1); - VARORCY(NULL,0,0,NULL,0); - - VAROR(BOOL,VARIANT_TRUE,BOOL,VARIANT_TRUE,BOOL,VARIANT_TRUE); - VAROR(BOOL,VARIANT_TRUE,BOOL,VARIANT_FALSE,BOOL,VARIANT_TRUE); - VAROR(BOOL,VARIANT_FALSE,BOOL,VARIANT_TRUE,BOOL,VARIANT_TRUE); - VAROR(BOOL,VARIANT_FALSE,BOOL,VARIANT_FALSE,BOOL,VARIANT_FALSE); - /* Assume x,y & y,x are the same from now on to reduce the number of tests */ - VAROR(BOOL,VARIANT_TRUE,I1,-1,I4,-1); - VAROR(BOOL,VARIANT_TRUE,I1,0,I4,-1); - VAROR(BOOL,VARIANT_FALSE,I1,0,I4,0); - VAROR(BOOL,VARIANT_TRUE,UI1,255,I2,-1); - VAROR(BOOL,VARIANT_TRUE,UI1,0,I2,-1); - VAROR(BOOL,VARIANT_FALSE,UI1,0,I2,0); - VAROR(BOOL,VARIANT_TRUE,I2,-1,I2,-1); - VAROR(BOOL,VARIANT_TRUE,I2,0,I2,-1); - VAROR(BOOL,VARIANT_FALSE,I2,0,I2,0); - VAROR(BOOL,VARIANT_TRUE,UI2,65535,I4,-1); - VAROR(BOOL,VARIANT_TRUE,UI2,0,I4,-1); - VAROR(BOOL,VARIANT_FALSE,UI2,0,I4,0); - VAROR(BOOL,VARIANT_TRUE,I4,-1,I4,-1); - VAROR(BOOL,VARIANT_TRUE,I4,0,I4,-1); - VAROR(BOOL,VARIANT_FALSE,I4,0,I4,0); - VAROR(BOOL,VARIANT_TRUE,UI4,0xffffffff,I4,-1); - VAROR(BOOL,VARIANT_TRUE,UI4,0,I4,-1); - VAROR(BOOL,VARIANT_FALSE,UI4,0,I4,0); - VAROR(BOOL,VARIANT_TRUE,R4,-1,I4,-1); - VAROR(BOOL,VARIANT_TRUE,R4,0,I4,-1); - VAROR(BOOL,VARIANT_FALSE,R4,0,I4,0); - VAROR(BOOL,VARIANT_TRUE,R8,-1,I4,-1); - VAROR(BOOL,VARIANT_TRUE,R8,0,I4,-1); - VAROR(BOOL,VARIANT_FALSE,R8,0,I4,0); - VAROR(BOOL,VARIANT_TRUE,DATE,-1,I4,-1); - VAROR(BOOL,VARIANT_TRUE,DATE,0,I4,-1); - VAROR(BOOL,VARIANT_FALSE,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VAROR(BOOL,VARIANT_TRUE,I8,-1,I8,-1); - VAROR(BOOL,VARIANT_TRUE,I8,0,I8,-1); - VAROR(BOOL,VARIANT_FALSE,I8,0,I8,0); - /* This returns DISP_E_OVERFLOW which indicates that a conversion - * to I4 is performed. - */ - /* VAROR(BOOL,VARIANT_TRUE,UI8,-1,I4,-1); */ - VAROR(BOOL,VARIANT_TRUE,UI8,0,I4,-1); - VAROR(BOOL,VARIANT_FALSE,UI8,0,I4,0); - } - VAROR(BOOL,VARIANT_TRUE,INT,-1,I4,-1); - VAROR(BOOL,VARIANT_TRUE,INT,0,I4,-1); - VAROR(BOOL,VARIANT_FALSE,INT,0,I4,0); - VAROR(BOOL,VARIANT_TRUE,UINT,0xffffffff,I4,-1); - VAROR(BOOL,VARIANT_TRUE,UINT,0,I4,-1); - VAROR(BOOL,VARIANT_FALSE,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VAROR(BOOL,VARIANT_FALSE,BSTR,rbstr,BOOL,VARIANT_FALSE); - VAROR(BOOL,VARIANT_TRUE,BSTR,rbstr,BOOL,VARIANT_TRUE); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VAROR(BOOL,VARIANT_FALSE,BSTR,rbstr,BOOL,VARIANT_TRUE); - VAROR(BOOL,VARIANT_TRUE,BSTR,rbstr,BOOL,VARIANT_TRUE); - SysFreeString(rbstr); - VARORCY(BOOL,VARIANT_TRUE,10000,I4,-1); - VARORCY(BOOL,VARIANT_TRUE,0,I4,-1); - VARORCY(BOOL,VARIANT_FALSE,0,I4,0); - - VAROR(I1,-1,I1,-1,I4,-1); - VAROR(I1,-1,I1,0,I4,-1); - VAROR(I1,0,I1,0,I4,0); - VAROR(I1,-1,UI1,255,I4,-1); - VAROR(I1,-1,UI1,0,I4,-1); - VAROR(I1,0,UI1,0,I4,0); - VAROR(I1,-1,I2,-1,I4,-1); - VAROR(I1,-1,I2,0,I4,-1); - VAROR(I1,0,I2,0,I4,0); - VAROR(I1,-1,UI2,65535,I4,-1); - VAROR(I1,-1,UI2,0,I4,-1); - VAROR(I1,0,UI2,0,I4,0); - VAROR(I1,-1,I4,-1,I4,-1); - VAROR(I1,-1,I4,0,I4,-1); - VAROR(I1,0,I4,0,I4,0); - VAROR(I1,-1,UI4,0xffffffff,I4,-1); - VAROR(I1,-1,UI4,0,I4,-1); - VAROR(I1,0,UI4,0,I4,0); - VAROR(I1,-1,R4,-1,I4,-1); - VAROR(I1,-1,R4,0,I4,-1); - VAROR(I1,0,R4,0,I4,0); - VAROR(I1,-1,R8,-1,I4,-1); - VAROR(I1,-1,R8,0,I4,-1); - VAROR(I1,0,R8,0,I4,0); - VAROR(I1,-1,DATE,-1,I4,-1); - VAROR(I1,-1,DATE,0,I4,-1); - VAROR(I1,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VAROR(I1,-1,I8,-1,I8,-1); - VAROR(I1,-1,I8,0,I8,-1); - VAROR(I1,0,I8,0,I8,0); - VAROR(I1,-1,UI8,0,I4,-1); - VAROR(I1,0,UI8,0,I4,0); - } - VAROR(I1,-1,INT,-1,I4,-1); - VAROR(I1,-1,INT,0,I4,-1); - VAROR(I1,0,INT,0,I4,0); - VAROR(I1,-1,UINT,0xffffffff,I4,-1); - VAROR(I1,-1,UINT,0,I4,-1); - VAROR(I1,0,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VAROR(I1,0,BSTR,rbstr,I4,0); - VAROR(I1,-1,BSTR,rbstr,I4,-1); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VAROR(I1,0,BSTR,rbstr,I4,-1); - VAROR(I1,-1,BSTR,rbstr,I4,-1); - SysFreeString(rbstr); - VARORCY(I1,-1,10000,I4,-1); - VARORCY(I1,-1,0,I4,-1); - VARORCY(I1,0,0,I4,0); - - VAROR(UI1,255,UI1,255,UI1,255); - VAROR(UI1,255,UI1,0,UI1,255); - VAROR(UI1,0,UI1,0,UI1,0); - VAROR(UI1,255,I2,-1,I2,-1); - VAROR(UI1,255,I2,0,I2,255); - VAROR(UI1,0,I2,0,I2,0); - VAROR(UI1,255,UI2,65535,I4,65535); - VAROR(UI1,255,UI2,0,I4,255); - VAROR(UI1,0,UI2,0,I4,0); - VAROR(UI1,255,I4,-1,I4,-1); - VAROR(UI1,255,I4,0,I4,255); - VAROR(UI1,0,I4,0,I4,0); - VAROR(UI1,255,UI4,0xffffffff,I4,-1); - VAROR(UI1,255,UI4,0,I4,255); - VAROR(UI1,0,UI4,0,I4,0); - VAROR(UI1,255,R4,-1,I4,-1); - VAROR(UI1,255,R4,0,I4,255); - VAROR(UI1,0,R4,0,I4,0); - VAROR(UI1,255,R8,-1,I4,-1); - VAROR(UI1,255,R8,0,I4,255); - VAROR(UI1,0,R8,0,I4,0); - VAROR(UI1,255,DATE,-1,I4,-1); - VAROR(UI1,255,DATE,0,I4,255); - VAROR(UI1,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VAROR(UI1,255,I8,-1,I8,-1); - VAROR(UI1,255,I8,0,I8,255); - VAROR(UI1,0,I8,0,I8,0); - VAROR(UI1,255,UI8,0,I4,255); - VAROR(UI1,0,UI8,0,I4,0); - } - VAROR(UI1,255,INT,-1,I4,-1); - VAROR(UI1,255,INT,0,I4,255); - VAROR(UI1,0,INT,0,I4,0); - VAROR(UI1,255,UINT,0xffffffff,I4,-1); - VAROR(UI1,255,UINT,0,I4,255); - VAROR(UI1,0,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VAROR(UI1,0,BSTR,rbstr,I2,0); - VAROR(UI1,255,BSTR,rbstr,I2,255); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VAROR(UI1,0,BSTR,rbstr,I2,-1); - VAROR(UI1,255,BSTR,rbstr,I2,-1); - SysFreeString(rbstr); - VARORCY(UI1,255,10000,I4,255); - VARORCY(UI1,255,0,I4,255); - VARORCY(UI1,0,0,I4,0); - - VAROR(I2,-1,I2,-1,I2,-1); - VAROR(I2,-1,I2,0,I2,-1); - VAROR(I2,0,I2,0,I2,0); - VAROR(I2,-1,UI2,65535,I4,-1); - VAROR(I2,-1,UI2,0,I4,-1); - VAROR(I2,0,UI2,0,I4,0); - VAROR(I2,-1,I4,-1,I4,-1); - VAROR(I2,-1,I4,0,I4,-1); - VAROR(I2,0,I4,0,I4,0); - VAROR(I2,-1,UI4,0xffffffff,I4,-1); - VAROR(I2,-1,UI4,0,I4,-1); - VAROR(I2,0,UI4,0,I4,0); - VAROR(I2,-1,R4,-1,I4,-1); - VAROR(I2,-1,R4,0,I4,-1); - VAROR(I2,0,R4,0,I4,0); - VAROR(I2,-1,R8,-1,I4,-1); - VAROR(I2,-1,R8,0,I4,-1); - VAROR(I2,0,R8,0,I4,0); - VAROR(I2,-1,DATE,-1,I4,-1); - VAROR(I2,-1,DATE,0,I4,-1); - VAROR(I2,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VAROR(I2,-1,I8,-1,I8,-1); - VAROR(I2,-1,I8,0,I8,-1); - VAROR(I2,0,I8,0,I8,0); - VAROR(I2,-1,UI8,0,I4,-1); - VAROR(I2,0,UI8,0,I4,0); - } - VAROR(I2,-1,INT,-1,I4,-1); - VAROR(I2,-1,INT,0,I4,-1); - VAROR(I2,0,INT,0,I4,0); - VAROR(I2,-1,UINT,0xffffffff,I4,-1); - VAROR(I2,-1,UINT,0,I4,-1); - VAROR(I2,0,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VAROR(I2,0,BSTR,rbstr,I2,0); - VAROR(I2,-1,BSTR,rbstr,I2,-1); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VAROR(I2,0,BSTR,rbstr,I2,-1); - VAROR(I2,-1,BSTR,rbstr,I2,-1); - SysFreeString(rbstr); - VARORCY(I2,-1,10000,I4,-1); - VARORCY(I2,-1,0,I4,-1); - VARORCY(I2,0,0,I4,0); - - VAROR(UI2,65535,UI2,65535,I4,65535); - VAROR(UI2,65535,UI2,0,I4,65535); - VAROR(UI2,0,UI2,0,I4,0); - VAROR(UI2,65535,I4,-1,I4,-1); - VAROR(UI2,65535,I4,0,I4,65535); - VAROR(UI2,0,I4,0,I4,0); - VAROR(UI2,65535,UI4,0xffffffff,I4,-1); - VAROR(UI2,65535,UI4,0,I4,65535); - VAROR(UI2,0,UI4,0,I4,0); - VAROR(UI2,65535,R4,-1,I4,-1); - VAROR(UI2,65535,R4,0,I4,65535); - VAROR(UI2,0,R4,0,I4,0); - VAROR(UI2,65535,R8,-1,I4,-1); - VAROR(UI2,65535,R8,0,I4,65535); - VAROR(UI2,0,R8,0,I4,0); - VAROR(UI2,65535,DATE,-1,I4,-1); - VAROR(UI2,65535,DATE,0,I4,65535); - VAROR(UI2,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VAROR(UI2,65535,I8,-1,I8,-1); - VAROR(UI2,65535,I8,0,I8,65535); - VAROR(UI2,0,I8,0,I8,0); - VAROR(UI2,65535,UI8,0,I4,65535); - VAROR(UI2,0,UI8,0,I4,0); - } - VAROR(UI2,65535,INT,-1,I4,-1); - VAROR(UI2,65535,INT,0,I4,65535); - VAROR(UI2,0,INT,0,I4,0); - VAROR(UI2,65535,UINT,0xffffffff,I4,-1); - VAROR(UI2,65535,UINT,0,I4,65535); - VAROR(UI2,0,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VAROR(UI2,0,BSTR,rbstr,I4,0); - VAROR(UI2,65535,BSTR,rbstr,I4,65535); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VAROR(UI2,0,BSTR,rbstr,I4,-1); - VAROR(UI2,65535,BSTR,rbstr,I4,-1); - SysFreeString(rbstr); - VARORCY(UI2,65535,10000,I4,65535); - VARORCY(UI2,65535,0,I4,65535); - VARORCY(UI2,0,0,I4,0); - - VAROR(I4,-1,I4,-1,I4,-1); - VAROR(I4,-1,I4,0,I4,-1); - VAROR(I4,0,I4,0,I4,0); - VAROR(I4,-1,UI4,0xffffffff,I4,-1); - VAROR(I4,-1,UI4,0,I4,-1); - VAROR(I4,0,UI4,0,I4,0); - VAROR(I4,-1,R4,-1,I4,-1); - VAROR(I4,-1,R4,0,I4,-1); - VAROR(I4,0,R4,0,I4,0); - VAROR(I4,-1,R8,-1,I4,-1); - VAROR(I4,-1,R8,0,I4,-1); - VAROR(I4,0,R8,0,I4,0); - VAROR(I4,-1,DATE,-1,I4,-1); - VAROR(I4,-1,DATE,0,I4,-1); - VAROR(I4,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VAROR(I4,-1,I8,-1,I8,-1); - VAROR(I4,-1,I8,0,I8,-1); - VAROR(I4,0,I8,0,I8,0); - VAROR(I4,-1,UI8,0,I4,-1); - VAROR(I4,0,UI8,0,I4,0); - } - VAROR(I4,-1,INT,-1,I4,-1); - VAROR(I4,-1,INT,0,I4,-1); - VAROR(I4,0,INT,0,I4,0); - VAROR(I4,-1,UINT,0xffffffff,I4,-1); - VAROR(I4,-1,UINT,0,I4,-1); - VAROR(I4,0,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VAROR(I4,0,BSTR,rbstr,I4,0); - VAROR(I4,-1,BSTR,rbstr,I4,-1); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VAROR(I4,0,BSTR,rbstr,I4,-1); - VAROR(I4,-1,BSTR,rbstr,I4,-1); - SysFreeString(rbstr); - VARORCY(I4,-1,10000,I4,-1); - VARORCY(I4,-1,0,I4,-1); - VARORCY(I4,0,0,I4,0); - - VAROR(UI4,0xffffffff,UI4,0xffffffff,I4,-1); - VAROR(UI4,0xffffffff,UI4,0,I4,-1); - VAROR(UI4,0,UI4,0,I4,0); - VAROR(UI4,0xffffffff,R4,-1,I4,-1); - VAROR(UI4,0xffffffff,R4,0,I4,-1); - VAROR(UI4,0,R4,0,I4,0); - VAROR(UI4,0xffffffff,R8,-1,I4,-1); - VAROR(UI4,0xffffffff,R8,0,I4,-1); - VAROR(UI4,0,R8,0,I4,0); - VAROR(UI4,0xffffffff,DATE,-1,I4,-1); - VAROR(UI4,0xffffffff,DATE,0,I4,-1); - VAROR(UI4,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VAROR(UI4,0xffffffff,I8,-1,I8,-1); - VAROR(UI4,0xffffffff,I8,0,I8,0xffffffff); - VAROR(UI4,0,I8,0,I8,0); - VAROR(UI4,0xffffffff,UI8,0,I4,-1); - VAROR(UI4,0,UI8,0,I4,0); - } - VAROR(UI4,0xffffffff,INT,-1,I4,-1); - VAROR(UI4,0xffffffff,INT,0,I4,-1); - VAROR(UI4,0,INT,0,I4,0); - VAROR(UI4,0xffffffff,UINT,0xffffffff,I4,-1); - VAROR(UI4,0xffffffff,UINT,0,I4,-1); - VAROR(UI4,0,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VAROR(UI4,0,BSTR,rbstr,I4,0); - VAROR(UI4,0xffffffff,BSTR,rbstr,I4,-1); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VAROR(UI4,0,BSTR,rbstr,I4,-1); - VAROR(UI4,0xffffffff,BSTR,rbstr,I4,-1); - SysFreeString(rbstr); - VARORCY(UI4,0xffffffff,10000,I4,-1); - VARORCY(UI4,0xffffffff,0,I4,-1); - VARORCY(UI4,0,0,I4,0); - - VAROR(R4,-1,R4,-1,I4,-1); - VAROR(R4,-1,R4,0,I4,-1); - VAROR(R4,0,R4,0,I4,0); - VAROR(R4,-1,R8,-1,I4,-1); - VAROR(R4,-1,R8,0,I4,-1); - VAROR(R4,0,R8,0,I4,0); - VAROR(R4,-1,DATE,-1,I4,-1); - VAROR(R4,-1,DATE,0,I4,-1); - VAROR(R4,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VAROR(R4,-1,I8,-1,I8,-1); - VAROR(R4,-1,I8,0,I8,-1); - VAROR(R4,0,I8,0,I8,0); - VAROR(R4,-1,UI8,0,I4,-1); - VAROR(R4,0,UI8,0,I4,0); - } - VAROR(R4,-1,INT,-1,I4,-1); - VAROR(R4,-1,INT,0,I4,-1); - VAROR(R4,0,INT,0,I4,0); - VAROR(R4,-1,UINT,0xffffffff,I4,-1); - VAROR(R4,-1,UINT,0,I4,-1); - VAROR(R4,0,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VAROR(R4,0,BSTR,rbstr,I4,0); - VAROR(R4,-1,BSTR,rbstr,I4,-1); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VAROR(R4,0,BSTR,rbstr,I4,-1); - VAROR(R4,-1,BSTR,rbstr,I4,-1); - SysFreeString(rbstr); - VARORCY(R4,-1,10000,I4,-1); - VARORCY(R4,-1,0,I4,-1); - VARORCY(R4,0,0,I4,0); - - VAROR(R8,-1,R8,-1,I4,-1); - VAROR(R8,-1,R8,0,I4,-1); - VAROR(R8,0,R8,0,I4,0); - VAROR(R8,-1,DATE,-1,I4,-1); - VAROR(R8,-1,DATE,0,I4,-1); - VAROR(R8,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VAROR(R8,-1,I8,-1,I8,-1); - VAROR(R8,-1,I8,0,I8,-1); - VAROR(R8,0,I8,0,I8,0); - VAROR(R8,-1,UI8,0,I4,-1); - VAROR(R8,0,UI8,0,I4,0); - } - VAROR(R8,-1,INT,-1,I4,-1); - VAROR(R8,-1,INT,0,I4,-1); - VAROR(R8,0,INT,0,I4,0); - VAROR(R8,-1,UINT,0xffffffff,I4,-1); - VAROR(R8,-1,UINT,0,I4,-1); - VAROR(R8,0,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VAROR(R8,0,BSTR,rbstr,I4,0); - VAROR(R8,-1,BSTR,rbstr,I4,-1); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VAROR(R8,0,BSTR,rbstr,I4,-1); - VAROR(R8,-1,BSTR,rbstr,I4,-1); - SysFreeString(rbstr); - VARORCY(R8,-1,10000,I4,-1); - VARORCY(R8,-1,0,I4,-1); - VARORCY(R8,0,0,I4,0); - - VAROR(DATE,-1,DATE,-1,I4,-1); - VAROR(DATE,-1,DATE,0,I4,-1); - VAROR(DATE,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VAROR(DATE,-1,I8,-1,I8,-1); - VAROR(DATE,-1,I8,0,I8,-1); - VAROR(DATE,0,I8,0,I8,0); - VAROR(DATE,-1,UI8,0,I4,-1); - VAROR(DATE,0,UI8,0,I4,0); - } - VAROR(DATE,-1,INT,-1,I4,-1); - VAROR(DATE,-1,INT,0,I4,-1); - VAROR(DATE,0,INT,0,I4,0); - VAROR(DATE,-1,UINT,0xffffffff,I4,-1); - VAROR(DATE,-1,UINT,0,I4,-1); - VAROR(DATE,0,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VAROR(DATE,0,BSTR,rbstr,I4,0); - VAROR(DATE,-1,BSTR,rbstr,I4,-1); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VAROR(DATE,0,BSTR,rbstr,I4,-1); - VAROR(DATE,-1,BSTR,rbstr,I4,-1); - SysFreeString(rbstr); - VARORCY(DATE,-1,10000,I4,-1); - VARORCY(DATE,-1,0,I4,-1); - VARORCY(DATE,0,0,I4,0); - - if (HAVE_OLEAUT32_I8) - { - VAROR(I8,-1,I8,-1,I8,-1); - VAROR(I8,-1,I8,0,I8,-1); - VAROR(I8,0,I8,0,I8,0); - VAROR(I8,-1,UI8,0,I8,-1); - VAROR(I8,0,UI8,0,I8,0); - /* These overflow under native and Wine - VAROR(I8,-1,INT,-1,I4,-1); - VAROR(I8,-1,INT,0,I4,-1); - VAROR(I8,0,INT,0,I4,0); */ - VAROR(I8,-1,UINT,0xffffffff,I8,-1); - VAROR(I8,-1,UINT,0,I8,-1); - VAROR(I8,0,UINT,0,I8,0); - rbstr = SysAllocString(szFalse); - VAROR(I8,0,BSTR,rbstr,I8,0); - VAROR(I8,-1,BSTR,rbstr,I8,-1); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VAROR(I8,0,BSTR,rbstr,I8,-1); - VAROR(I8,-1,BSTR,rbstr,I8,-1); - SysFreeString(rbstr); - VARORCY(I8,-1,10000,I8,-1); - VARORCY(I8,-1,0,I8,-1); - VARORCY(I8,0,0,I8,0); - - VAROR(UI8,0xffff,UI8,0xffff,I4,0xffff); - VAROR(UI8,0xffff,UI8,0,I4,0xffff); - VAROR(UI8,0,UI8,0,I4,0); - VAROR(UI8,0xffff,INT,-1,I4,-1); - VAROR(UI8,0xffff,INT,0,I4,0xffff); - VAROR(UI8,0,INT,0,I4,0); - VAROR(UI8,0xffff,UINT,0xffff,I4,0xffff); - VAROR(UI8,0xffff,UINT,0,I4,0xffff); - VAROR(UI8,0,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VAROR(UI8,0,BSTR,rbstr,I4,0); - VAROR(UI8,0xffff,BSTR,rbstr,I4,0xffff); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VAROR(UI8,0,BSTR,rbstr,I4,-1); - VAROR(UI8,0xffff,BSTR,rbstr,I4,-1); - SysFreeString(rbstr); - VARORCY(UI8,0xffff,10000,I4,0xffff); - VARORCY(UI8,0xffff,0,I4,0xffff); - VARORCY(UI8,0,0,I4,0); - } - - VAROR(INT,-1,INT,-1,I4,-1); - VAROR(INT,-1,INT,0,I4,-1); - VAROR(INT,0,INT,0,I4,0); - VAROR(INT,-1,UINT,0xffff,I4,-1); - VAROR(INT,-1,UINT,0,I4,-1); - VAROR(INT,0,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VAROR(INT,0,BSTR,rbstr,I4,0); - VAROR(INT,-1,BSTR,rbstr,I4,-1); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VAROR(INT,0,BSTR,rbstr,I4,-1); - VAROR(INT,-1,BSTR,rbstr,I4,-1); - SysFreeString(rbstr); - VARORCY(INT,-1,10000,I4,-1); - VARORCY(INT,-1,0,I4,-1); - VARORCY(INT,0,0,I4,0); - - VAROR(UINT,0xffff,UINT,0xffff,I4,0xffff); - VAROR(UINT,0xffff,UINT,0,I4,0xffff); - VAROR(UINT,0,UINT,0,I4,0); - rbstr = SysAllocString(szFalse); - VAROR(UINT,0,BSTR,rbstr,I4,0); - VAROR(UINT,0xffff,BSTR,rbstr,I4,0xffff); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VAROR(UINT,0,BSTR,rbstr,I4,-1); - VAROR(UINT,0xffff,BSTR,rbstr,I4,-1); - SysFreeString(rbstr); - VARORCY(UINT,0xffff,10000,I4,0xffff); - VARORCY(UINT,0xffff,0,I4,0xffff); - VARORCY(UINT,0,0,I4,0); - - lbstr = SysAllocString(szFalse); - rbstr = SysAllocString(szFalse); - VAROR(BSTR,lbstr,BSTR,rbstr,BOOL,0); - SysFreeString(rbstr); - rbstr = SysAllocString(szTrue); - VAROR(BSTR,lbstr,BSTR,rbstr,BOOL,VARIANT_TRUE); - SysFreeString(lbstr); - lbstr = SysAllocString(szTrue); - VAROR(BSTR,lbstr,BSTR,rbstr,BOOL,VARIANT_TRUE); - VARORCY(BSTR,lbstr,10000,I4,-1); - SysFreeString(lbstr); - lbstr = SysAllocString(szFalse); - VARORCY(BSTR,lbstr,10000,I4,1); - SysFreeString(lbstr); - SysFreeString(rbstr); -} - -static HRESULT (WINAPI *pVarEqv)(LPVARIANT,LPVARIANT,LPVARIANT); - -#define VAREQV(vt1,val1,vt2,val2,rvt,rval) \ - V_VT(&left) = VT_##vt1; V_##vt1(&left) = val1; \ - V_VT(&right) = VT_##vt2; V_##vt2(&right) = val2; \ - V_VT(&exp) = VT_##rvt; V_##rvt(&exp) = rval; \ - test_var_call2( __LINE__, pVarEqv, &left, &right, &exp ) - -static void test_VarEqv(void) -{ - VARIANT left, right, exp, result; - VARTYPE i; - HRESULT hres; - - CHECKPTR(VarEqv); - - /* Test all possible flag/vt combinations & the resulting vt type */ - for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]); i++) - { - VARTYPE leftvt, rightvt, resvt; - - for (leftvt = 0; leftvt <= VT_BSTR_BLOB; leftvt++) - { - SKIPTESTS(leftvt); - - for (rightvt = 0; rightvt <= VT_BSTR_BLOB; rightvt++) - { - BOOL bFail = FALSE; - - SKIPTESTS(rightvt); - - if (leftvt == VT_BSTR || rightvt == VT_BSTR || - leftvt == VT_DISPATCH || rightvt == VT_DISPATCH || - leftvt == VT_UNKNOWN || rightvt == VT_UNKNOWN) - continue; - - memset(&left, 0, sizeof(left)); - memset(&right, 0, sizeof(right)); - V_VT(&left) = leftvt | ExtraFlags[i]; - V_VT(&right) = rightvt | ExtraFlags[i]; - V_VT(&result) = VT_EMPTY; - resvt = VT_I4; - - if (ExtraFlags[i] & VT_ARRAY || ExtraFlags[i] & VT_BYREF || - !IsValidVariantClearVT(leftvt, ExtraFlags[i]) || - !IsValidVariantClearVT(rightvt, ExtraFlags[i]) || - leftvt == VT_CLSID || rightvt == VT_CLSID || - leftvt == VT_RECORD || rightvt == VT_RECORD || - leftvt == VT_VARIANT || rightvt == VT_VARIANT || - leftvt == VT_ERROR || rightvt == VT_ERROR) - { - bFail = TRUE; - } - if (leftvt == VT_EMPTY || rightvt == VT_EMPTY) - { - if (leftvt == rightvt || - leftvt == VT_I2 || rightvt == VT_I2 || - leftvt == VT_UI1 || rightvt == VT_UI1 || - leftvt == VT_BOOL || rightvt == VT_BOOL) - resvt = VT_I2; - else if (leftvt == VT_NULL || rightvt == VT_NULL) - resvt = VT_NULL; - else if (leftvt == VT_I8 || rightvt == VT_I8) - resvt = VT_I8; - } - else if (leftvt == VT_NULL || rightvt == VT_NULL) - { - resvt = VT_NULL; - } - else if (leftvt == VT_UI1 || rightvt == VT_UI1) - { - if (leftvt == rightvt) - resvt = VT_UI1; - else if (leftvt == rightvt || - leftvt == VT_I2 || rightvt == VT_I2 || - leftvt == VT_BOOL || rightvt == VT_BOOL) - { - resvt = VT_I2; - } - else if (leftvt == VT_I8 || rightvt == VT_I8) - resvt = VT_I8; - } - else if (leftvt == VT_I2 || rightvt == VT_I2) - { - if (leftvt == rightvt || - leftvt == VT_BOOL || rightvt == VT_BOOL) - resvt = VT_I2; - else if (leftvt == VT_I8 || rightvt == VT_I8) - resvt = VT_I8; - } - else if (leftvt == VT_BOOL && rightvt == VT_BOOL) - { - resvt = VT_BOOL; - } - else if (leftvt == VT_I8 || rightvt == VT_I8) - { - if (leftvt == VT_INT || rightvt == VT_INT) - bFail = TRUE; - else - resvt = VT_I8; - } - hres = pVarEqv(&left, &right, &result); - if (bFail) - ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarEqv: %d|0x%X, %d|0x%X: Expected failure, got 0x%X vt %d\n", - leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], hres, - V_VT(&result)); - else - ok(hres == S_OK && V_VT(&result) == resvt, - "VarEqv: %d|0x%X, %d|0x%X: expected S_OK, vt %d, got 0x%X vt %d\n", - leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], resvt, hres, - V_VT(&result)); - } - } - } - - /* Test returned values */ - VAREQV(BOOL,VARIANT_TRUE,BOOL,VARIANT_TRUE,BOOL,VARIANT_TRUE); - VAREQV(BOOL,VARIANT_FALSE,BOOL,VARIANT_TRUE,BOOL,VARIANT_FALSE); - VAREQV(BOOL,TRUE,BOOL,TRUE,BOOL,VARIANT_TRUE); - VAREQV(BOOL,FALSE,BOOL,FALSE,BOOL,VARIANT_TRUE); - VAREQV(BOOL,TRUE,BOOL,FALSE,BOOL,-2); - VAREQV(BOOL,FALSE,BOOL,TRUE,BOOL,-2); - VAREQV(BOOL,6,BOOL,7,BOOL,-2); - VAREQV(BOOL,6,BOOL,6,BOOL,VARIANT_TRUE); - VAREQV(BOOL,VARIANT_TRUE,I2,VARIANT_TRUE,I2,VARIANT_TRUE); - VAREQV(BOOL,VARIANT_TRUE,I2,VARIANT_FALSE,I2,VARIANT_FALSE); - VAREQV(BOOL,6,I2,7,I2,-2); - VAREQV(UI1,1,UI1,1,UI1,255); - VAREQV(UI1,1,UI1,0,UI1,254); - VAREQV(UI1,0,UI1,1,UI1,254); - if (HAVE_OLEAUT32_I8) - { - VAREQV(UI4,VARIANT_FALSE,I8,VARIANT_FALSE,I8,-1); - VAREQV(UI4,5,I8,19,I8,-23); - VAREQV(UI4,VARIANT_FALSE,UI8,VARIANT_FALSE,I4,-1); - } -} - -static HRESULT (WINAPI *pVarMul)(LPVARIANT,LPVARIANT,LPVARIANT); - -#define VARMUL(vt1,val1,vt2,val2,rvt,rval) \ - V_VT(&left) = VT_##vt1; V_##vt1(&left) = val1; \ - V_VT(&right) = VT_##vt2; V_##vt2(&right) = val2; \ - V_VT(&exp) = VT_##rvt; V_##rvt(&exp) = rval; \ - test_var_call2( __LINE__, pVarMul, &left, &right, &exp ) - -static void test_VarMul(void) -{ - VARIANT left, right, exp, result, cy, dec; - VARTYPE i; - BSTR lbstr, rbstr; - HRESULT hres; - double r; - - CHECKPTR(VarMul); - - lbstr = SysAllocString(sz12); - rbstr = SysAllocString(sz12); - - /* Test all possible flag/vt combinations & the resulting vt type */ - for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]); i++) - { - VARTYPE leftvt, rightvt, resvt; - - for (leftvt = 0; leftvt <= VT_BSTR_BLOB; leftvt++) - { - - SKIPTESTS(leftvt); - - for (rightvt = 0; rightvt <= VT_BSTR_BLOB; rightvt++) - { - BOOL bFail = FALSE; - - SKIPTESTS(rightvt); - - if (leftvt == VT_DISPATCH || rightvt == VT_DISPATCH || - leftvt == VT_UNKNOWN || rightvt == VT_UNKNOWN) - continue; - - memset(&left, 0, sizeof(left)); - memset(&right, 0, sizeof(right)); - V_VT(&left) = leftvt | ExtraFlags[i]; - if (leftvt == VT_BSTR) - V_BSTR(&left) = lbstr; - V_VT(&right) = rightvt | ExtraFlags[i]; - if (rightvt == VT_BSTR) - V_BSTR(&right) = rbstr; - V_VT(&result) = VT_EMPTY; - resvt = VT_UNKNOWN; - - /* Don't ask me why but native VarMul cannot handle: - VT_I1, VT_UI2, VT_UI4, VT_INT, VT_UINT and VT_UI8. - Tested with DCOM98, Win2k, WinXP */ - if (ExtraFlags[i] & VT_ARRAY || ExtraFlags[i] & VT_BYREF || - !IsValidVariantClearVT(leftvt, ExtraFlags[i]) || - !IsValidVariantClearVT(rightvt, ExtraFlags[i]) || - leftvt == VT_CLSID || rightvt == VT_CLSID || - leftvt == VT_RECORD || rightvt == VT_RECORD || - leftvt == VT_VARIANT || rightvt == VT_VARIANT || - leftvt == VT_ERROR || rightvt == VT_ERROR || - leftvt == VT_I1 || rightvt == VT_I1 || - leftvt == VT_UI2 || rightvt == VT_UI2 || - leftvt == VT_UI4 || rightvt == VT_UI4 || - leftvt == VT_UI8 || rightvt == VT_UI8 || - leftvt == VT_INT || rightvt == VT_INT || - leftvt == VT_UINT || rightvt == VT_UINT) { - bFail = TRUE; - } - - if (leftvt == VT_NULL || rightvt == VT_NULL) - resvt = VT_NULL; - else if (leftvt == VT_DECIMAL || rightvt == VT_DECIMAL) - resvt = VT_DECIMAL; - else if (leftvt == VT_R8 || rightvt == VT_R8 || - leftvt == VT_BSTR || rightvt == VT_BSTR || - leftvt == VT_DATE || rightvt == VT_DATE) - resvt = VT_R8; - else if (leftvt == VT_R4 || rightvt == VT_R4) { - if (leftvt == VT_I4 || rightvt == VT_I4 || - leftvt == VT_I8 || rightvt == VT_I8 || - leftvt == VT_CY || rightvt == VT_CY) - resvt = VT_R8; - else - resvt = VT_R4; - } else if (leftvt == VT_CY || rightvt == VT_CY) - resvt = VT_CY; - else if (leftvt == VT_I8 || rightvt == VT_I8) - resvt = VT_I8; - else if (leftvt == VT_I4 || rightvt == VT_I4) - resvt = VT_I4; - else if (leftvt == VT_I2 || rightvt == VT_I2 || - leftvt == VT_BOOL || rightvt == VT_BOOL || - (leftvt == VT_EMPTY && rightvt == VT_EMPTY)) - resvt = VT_I2; - else if (leftvt == VT_UI1 || rightvt == VT_UI1) - resvt = VT_UI1; - - hres = pVarMul(&left, &right, &result); - if (bFail) { - ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarMul: %d|0x%X, %d|0x%X: Expected failure, got 0x%X vt %d\n", - leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], hres, - V_VT(&result)); - } else { - ok(hres == S_OK && V_VT(&result) == resvt, - "VarMul: %d|0x%X, %d|0x%X: expected S_OK, vt %d, got 0x%X vt %d\n", - leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], resvt, hres, - V_VT(&result)); - } - } - } - } - - /* Test returned values */ - VARMUL(I4,4,I4,2,I4,8); - VARMUL(I2,4,I2,2,I2,8); - VARMUL(I2,-13,I4,5,I4,-65); - VARMUL(I4,-13,I4,5,I4,-65); - VARMUL(I2,7,R4,0.5f,R4,3.5f); - VARMUL(R4,0.5f,I4,5,R8,2.5); - VARMUL(R8,7.1,BOOL,0,R8,0); - VARMUL(BSTR,lbstr,I2,4,R8,48); - VARMUL(BSTR,lbstr,BOOL,1,R8,12); - VARMUL(BSTR,lbstr,R4,0.1f,R8,1.2); - VARMUL(BSTR,lbstr,BSTR,rbstr,R8,144); - VARMUL(R4,0.2f,BSTR,rbstr,R8,2.4); - VARMUL(DATE,2.25,I4,7,R8,15.75); - - VARMUL(UI1, UI1_MAX, UI1, UI1_MAX, I4, UI1_MAX * UI1_MAX); - VARMUL(I2, I2_MAX, I2, I2_MAX, I4, I2_MAX * I2_MAX); - VARMUL(I2, I2_MAX, I2, I2_MIN, I4, I2_MAX * I2_MIN); - VARMUL(I2, I2_MIN, I2, I2_MIN, I4, I2_MIN * I2_MIN); - VARMUL(I4, I4_MAX, I4, I4_MAX, R8, (double)I4_MAX * I4_MAX); - VARMUL(I4, I4_MAX, I4, I4_MIN, R8, (double)I4_MAX * I4_MIN); - VARMUL(I4, I4_MIN, I4, I4_MIN, R8, (double)I4_MIN * I4_MIN); - VARMUL(R4, R4_MAX, R4, R4_MAX, R8, (double)R4_MAX * R4_MAX); - VARMUL(R4, R4_MAX, R4, R4_MIN, R4, R4_MAX * R4_MIN); - VARMUL(R4, R4_MIN, R4, R4_MIN, R4, R4_MIN * R4_MIN); - VARMUL(R8, R8_MAX, R8, R8_MIN, R8, R8_MAX * R8_MIN); - VARMUL(R8, R8_MIN, R8, R8_MIN, R8, R8_MIN * R8_MIN); - - /* Manuly test some VT_CY and VT_DECIMAL variants */ - V_VT(&cy) = VT_CY; - hres = VarCyFromI4(4711, &V_CY(&cy)); - ok(hres == S_OK, "VarCyFromI4 failed!\n"); - V_VT(&dec) = VT_DECIMAL; - hres = VarDecFromR8(-4.2, &V_DECIMAL(&dec)); - ok(hres == S_OK, "VarDecFromR4 failed!\n"); - memset(&left, 0, sizeof(left)); - memset(&right, 0, sizeof(right)); - V_VT(&left) = VT_I4; - V_I4(&left) = -11; - V_VT(&right) = VT_UI1; - V_UI1(&right) = 9; - - hres = VarMul(&cy, &right, &result); - ok(hres == S_OK && V_VT(&result) == VT_CY, "VarMul: expected coerced type VT_CY, got %s!\n", vtstr(V_VT(&result))); - hres = VarR8FromCy(V_CY(&result), &r); - ok(hres == S_OK && EQ_DOUBLE(r, 42399), "VarMul: CY value %f, expected %f\n", r, (double)42399); - - hres = VarMul(&left, &dec, &result); - ok(hres == S_OK && V_VT(&result) == VT_DECIMAL, "VarMul: expected coerced type VT_DECIMAL, got %s!\n", vtstr(V_VT(&result))); - hres = VarR8FromDec(&V_DECIMAL(&result), &r); - ok(hres == S_OK && EQ_DOUBLE(r, 46.2), "VarMul: DECIMAL value %f, expected %f\n", r, (double)46.2); - - SysFreeString(lbstr); - SysFreeString(rbstr); -} - -static HRESULT (WINAPI *pVarAdd)(LPVARIANT,LPVARIANT,LPVARIANT); - -#define VARADD(vt1,val1,vt2,val2,rvt,rval) \ - V_VT(&left) = VT_##vt1; V_##vt1(&left) = val1; \ - V_VT(&right) = VT_##vt2; V_##vt2(&right) = val2; \ - V_VT(&exp) = VT_##rvt; V_##rvt(&exp) = rval; \ - test_var_call2( __LINE__, pVarAdd, &left, &right, &exp ) - -static void test_VarAdd(void) -{ - VARIANT left, right, exp, result, cy, dec; - VARTYPE i; - BSTR lbstr, rbstr; - HRESULT hres; - double r; - - CHECKPTR(VarAdd); - - lbstr = SysAllocString(sz12); - rbstr = SysAllocString(sz12); - - /* Test all possible flag/vt combinations & the resulting vt type */ - for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]); i++) - { - VARTYPE leftvt, rightvt, resvt; - - for (leftvt = 0; leftvt <= VT_BSTR_BLOB; leftvt++) - { - - SKIPTESTS(leftvt); - - for (rightvt = 0; rightvt <= VT_BSTR_BLOB; rightvt++) - { - BOOL bFail = FALSE; - - SKIPTESTS(rightvt); - - if (leftvt == VT_UNKNOWN || rightvt == VT_UNKNOWN) - continue; - - memset(&left, 0, sizeof(left)); - memset(&right, 0, sizeof(right)); - V_VT(&left) = leftvt | ExtraFlags[i]; - if (leftvt == VT_BSTR) - V_BSTR(&left) = lbstr; - V_VT(&right) = rightvt | ExtraFlags[i]; - if (rightvt == VT_BSTR) - V_BSTR(&right) = rbstr; - V_VT(&result) = VT_EMPTY; - resvt = VT_ERROR; - - /* Don't ask me why but native VarAdd cannot handle: - VT_I1, VT_UI2, VT_UI4, VT_INT, VT_UINT and VT_UI8. - Tested with DCOM98, Win2k, WinXP */ - if (ExtraFlags[i] & VT_ARRAY || ExtraFlags[i] & VT_BYREF || - !IsValidVariantClearVT(leftvt, ExtraFlags[i]) || - !IsValidVariantClearVT(rightvt, ExtraFlags[i]) || - leftvt == VT_CLSID || rightvt == VT_CLSID || - leftvt == VT_RECORD || rightvt == VT_RECORD || - leftvt == VT_VARIANT || rightvt == VT_VARIANT || - leftvt == VT_ERROR || rightvt == VT_ERROR || - leftvt == VT_I1 || rightvt == VT_I1 || - leftvt == VT_UI2 || rightvt == VT_UI2 || - leftvt == VT_UI4 || rightvt == VT_UI4 || - leftvt == VT_UI8 || rightvt == VT_UI8 || - leftvt == VT_INT || rightvt == VT_INT || - leftvt == VT_UINT || rightvt == VT_UINT) { - bFail = TRUE; - } - - if (leftvt == VT_NULL || rightvt == VT_NULL) - resvt = VT_NULL; - else if (leftvt == VT_DISPATCH || rightvt == VT_DISPATCH) - bFail = TRUE; - else if (leftvt == VT_DECIMAL || rightvt == VT_DECIMAL) - resvt = VT_DECIMAL; - else if (leftvt == VT_DATE || rightvt == VT_DATE) - resvt = VT_DATE; - else if (leftvt == VT_CY || rightvt == VT_CY) - resvt = VT_CY; - else if (leftvt == VT_R8 || rightvt == VT_R8) - resvt = VT_R8; - else if (leftvt == VT_BSTR || rightvt == VT_BSTR) { - if ((leftvt == VT_BSTR && rightvt == VT_BSTR) || - leftvt == VT_EMPTY || rightvt == VT_EMPTY) - resvt = VT_BSTR; - else - resvt = VT_R8; - } else if (leftvt == VT_R4 || rightvt == VT_R4) { - if (leftvt == VT_I4 || rightvt == VT_I4 || - leftvt == VT_I8 || rightvt == VT_I8) - resvt = VT_R8; - else - resvt = VT_R4; - } - else if (leftvt == VT_I8 || rightvt == VT_I8) - resvt = VT_I8; - else if (leftvt == VT_I4 || rightvt == VT_I4) - resvt = VT_I4; - else if (leftvt == VT_I2 || rightvt == VT_I2 || - leftvt == VT_BOOL || rightvt == VT_BOOL || - (leftvt == VT_EMPTY && rightvt == VT_EMPTY)) - resvt = VT_I2; - else if (leftvt == VT_UI1 || rightvt == VT_UI1) - resvt = VT_UI1; - - hres = pVarAdd(&left, &right, &result); - if (bFail) { - ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarAdd: %d|0x%X, %d|0x%X: Expected failure, got 0x%X vt %d\n", - leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], hres, - V_VT(&result)); - } else { - ok(hres == S_OK && V_VT(&result) == resvt, - "VarAdd: %d|0x%X, %d|0x%X: expected S_OK, vt %d, got 0x%X vt %d\n", - leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], resvt, hres, - V_VT(&result)); - } - /* Note, we don't clear left/right deliberately here */ - VariantClear(&result); - } - } - } - - /* Test returned values */ - VARADD(I4,4,I4,2,I4,6); - VARADD(I2,4,I2,2,I2,6); - VARADD(I2,-13,I4,5,I4,-8); - VARADD(I4,-13,I4,5,I4,-8); - VARADD(I2,7,R4,0.5f,R4,7.5f); - VARADD(R4,0.5f,I4,5,R8,5.5); - VARADD(R8,7.1,BOOL,0,R8,7.1); - VARADD(BSTR,lbstr,I2,4,R8,16); - VARADD(BSTR,lbstr,BOOL,1,R8,13); - VARADD(BSTR,lbstr,R4,0.1f,R8,12.1); - VARADD(R4,0.2f,BSTR,rbstr,R8,12.2); - VARADD(DATE,2.25,I4,7,DATE,9.25); - VARADD(DATE,1.25,R4,-1.7f,DATE,-0.45); - - VARADD(UI1, UI1_MAX, UI1, UI1_MAX, I2, UI1_MAX + UI1_MAX); - VARADD(I2, I2_MAX, I2, I2_MAX, I4, I2_MAX + I2_MAX); - VARADD(I2, I2_MAX, I2, I2_MIN, I2, I2_MAX + I2_MIN); - VARADD(I2, I2_MIN, I2, I2_MIN, I4, I2_MIN + I2_MIN); - VARADD(I4, I4_MAX, I4, I4_MIN, I4, I4_MAX + I4_MIN); - VARADD(I4, I4_MAX, I4, I4_MAX, R8, (double)I4_MAX + I4_MAX); - VARADD(I4, I4_MIN, I4, I4_MIN, R8, (double)I4_MIN + I4_MIN); - VARADD(R4, R4_MAX, R4, R4_MAX, R8, (double)R4_MAX + R4_MAX); - VARADD(R4, R4_MAX, R4, R4_MIN, R4, R4_MAX + R4_MIN); - VARADD(R4, R4_MIN, R4, R4_MIN, R4, R4_MIN + R4_MIN); - VARADD(R8, R8_MAX, R8, R8_MIN, R8, R8_MAX + R8_MIN); - VARADD(R8, R8_MIN, R8, R8_MIN, R8, R8_MIN + R8_MIN); - - /* Manually test BSTR + BSTR */ - V_VT(&left) = VT_BSTR; - V_BSTR(&left) = lbstr; - V_VT(&right) = VT_BSTR; - V_BSTR(&right) = rbstr; - hres = VarAdd(&left, &right, &result); - ok(hres == S_OK && V_VT(&result) == VT_BSTR, "VarAdd: expected coerced type VT_BSTR, got %s!\n", vtstr(V_VT(&result))); - hres = VarR8FromStr(V_BSTR(&result), 0, 0, &r); - ok(hres == S_OK && EQ_DOUBLE(r, 1212), "VarAdd: BSTR value %f, expected %f\n", r, (double)1212); - VariantClear(&result); - - /* Manuly test some VT_CY and VT_DECIMAL variants */ - V_VT(&cy) = VT_CY; - hres = VarCyFromI4(4711, &V_CY(&cy)); - ok(hres == S_OK, "VarCyFromI4 failed!\n"); - V_VT(&dec) = VT_DECIMAL; - hres = VarDecFromR8(-4.2, &V_DECIMAL(&dec)); - ok(hres == S_OK, "VarDecFromR4 failed!\n"); - memset(&left, 0, sizeof(left)); - memset(&right, 0, sizeof(right)); - V_VT(&left) = VT_I4; - V_I4(&left) = -11; - V_VT(&right) = VT_UI1; - V_UI1(&right) = 9; - - hres = VarAdd(&cy, &right, &result); - ok(hres == S_OK && V_VT(&result) == VT_CY, "VarAdd: expected coerced type VT_CY, got %s!\n", vtstr(V_VT(&result))); - hres = VarR8FromCy(V_CY(&result), &r); - ok(hres == S_OK && EQ_DOUBLE(r, 4720), "VarAdd: CY value %f, expected %f\n", r, (double)4720); - - hres = VarAdd(&left, &dec, &result); - ok(hres == S_OK && V_VT(&result) == VT_DECIMAL, "VarAdd: expected coerced type VT_DECIMAL, got %s!\n", vtstr(V_VT(&result))); - hres = VarR8FromDec(&V_DECIMAL(&result), &r); - ok(hres == S_OK && EQ_DOUBLE(r, -15.2), "VarAdd: DECIMAL value %f, expected %f\n", r, (double)-15.2); - VariantClear(&result); - - SysFreeString(lbstr); - SysFreeString(rbstr); -} - -static void test_VarCat(void) -{ - LCID lcid; - VARIANT left, right, result, expected, expected_broken; - static const WCHAR sz34[] = {'3','4','\0'}; - static const WCHAR sz1234[] = {'1','2','3','4','\0'}; - static const WCHAR date_sz12[] = {'9','/','3','0','/','1','9','8','0','1','2','\0'}; - static const WCHAR date_sz12_broken[] = {'9','/','3','0','/','8','0','1','2','\0'}; - static const WCHAR sz12_date[] = {'1','2','9','/','3','0','/','1','9','8','0','\0'}; - static const WCHAR sz12_date_broken[] = {'1','2','9','/','3','0','/','8','0','\0'}; - static const WCHAR sz_empty[] = {'\0'}; - TCHAR orig_date_format[128]; - VARTYPE leftvt, rightvt, resultvt; - HRESULT hres; - HRESULT expected_error_num; - - /* Set date format for testing */ - lcid = LOCALE_USER_DEFAULT; - GetLocaleInfo(lcid,LOCALE_SSHORTDATE,orig_date_format,128); - SetLocaleInfo(lcid,LOCALE_SSHORTDATE,"M/d/yyyy"); - - VariantInit(&left); - VariantInit(&right); - VariantInit(&result); - VariantInit(&expected); - - /* Check expected types for all combinations */ - for (leftvt = 0; leftvt <= VT_BSTR_BLOB; leftvt++) - { - - SKIPTESTS(leftvt); - - /* Check if we need/have support for I8 and/or UI8 */ - if ((leftvt == VT_I8 || leftvt == VT_UI8) && !HAVE_OLEAUT32_I8) - continue; - - for (rightvt = 0; rightvt <= VT_BSTR_BLOB; rightvt++) - { - - SKIPTESTS(rightvt); - expected_error_num = S_OK; - resultvt = VT_EMPTY; - - if (leftvt == VT_DISPATCH || rightvt == VT_DISPATCH || - leftvt == VT_UNKNOWN || rightvt == VT_UNKNOWN || - leftvt == VT_RECORD || rightvt == VT_RECORD || - leftvt == 15 || rightvt == 15 /* Undefined type */) - continue; - - /* Check if we need/have support for I8 and/or UI8 */ - if ((rightvt == VT_I8 || rightvt == VT_UI8) && !HAVE_OLEAUT32_I8) - continue; - - if (leftvt == VT_NULL && rightvt == VT_NULL) - resultvt = VT_NULL; - else if (leftvt == VT_VARIANT && (rightvt == VT_ERROR || - rightvt == VT_DATE || rightvt == VT_DECIMAL)) - expected_error_num = DISP_E_TYPEMISMATCH; - else if ((leftvt == VT_I2 || leftvt == VT_I4 || - leftvt == VT_R4 || leftvt == VT_R8 || - leftvt == VT_CY || leftvt == VT_BOOL || - leftvt == VT_BSTR || leftvt == VT_I1 || - leftvt == VT_UI1 || leftvt == VT_UI2 || - leftvt == VT_UI4 || leftvt == VT_I8 || - leftvt == VT_UI8 || leftvt == VT_INT || - leftvt == VT_UINT || leftvt == VT_EMPTY || - leftvt == VT_NULL || leftvt == VT_DECIMAL || - leftvt == VT_DATE) - && - (rightvt == VT_I2 || rightvt == VT_I4 || - rightvt == VT_R4 || rightvt == VT_R8 || - rightvt == VT_CY || rightvt == VT_BOOL || - rightvt == VT_BSTR || rightvt == VT_I1 || - rightvt == VT_UI1 || rightvt == VT_UI2 || - rightvt == VT_UI4 || rightvt == VT_I8 || - rightvt == VT_UI8 || rightvt == VT_INT || - rightvt == VT_UINT || rightvt == VT_EMPTY || - rightvt == VT_NULL || rightvt == VT_DECIMAL || - rightvt == VT_DATE)) - resultvt = VT_BSTR; - else if (rightvt == VT_ERROR && leftvt < VT_VOID) - expected_error_num = DISP_E_TYPEMISMATCH; - else if (leftvt == VT_ERROR && (rightvt == VT_DATE || - rightvt == VT_ERROR || rightvt == VT_DECIMAL)) - expected_error_num = DISP_E_TYPEMISMATCH; - else if (rightvt == VT_DATE || rightvt == VT_ERROR || - rightvt == VT_DECIMAL) - expected_error_num = DISP_E_BADVARTYPE; - else if (leftvt == VT_ERROR || rightvt == VT_ERROR) - expected_error_num = DISP_E_TYPEMISMATCH; - else if (leftvt == VT_VARIANT) - expected_error_num = DISP_E_TYPEMISMATCH; - else if (rightvt == VT_VARIANT && (leftvt == VT_EMPTY || - leftvt == VT_NULL || leftvt == VT_I2 || - leftvt == VT_I4 || leftvt == VT_R4 || - leftvt == VT_R8 || leftvt == VT_CY || - leftvt == VT_DATE || leftvt == VT_BSTR || - leftvt == VT_BOOL || leftvt == VT_DECIMAL || - leftvt == VT_I1 || leftvt == VT_UI1 || - leftvt == VT_UI2 || leftvt == VT_UI4 || - leftvt == VT_I8 || leftvt == VT_UI8 || - leftvt == VT_INT || leftvt == VT_UINT - )) - expected_error_num = DISP_E_TYPEMISMATCH; - else - expected_error_num = DISP_E_BADVARTYPE; - - V_VT(&left) = leftvt; - V_VT(&right) = rightvt; - - switch (leftvt) { - case VT_BSTR: - V_BSTR(&left) = SysAllocString(sz_empty); break; - case VT_DATE: - V_DATE(&left) = 0.0; break; - case VT_DECIMAL: - VarDecFromR8(0.0, &V_DECIMAL(&left)); break; - default: - V_I8(&left) = 0; - } - - switch (rightvt) { - case VT_BSTR: - V_BSTR(&right) = SysAllocString(sz_empty); break; - case VT_DATE: - V_DATE(&right) = 0.0; break; - case VT_DECIMAL: - VarDecFromR8(0.0, &V_DECIMAL(&right)); break; - default: - V_I8(&right) = 0; - } - - hres = VarCat(&left, &right, &result); - - /* Determine the error code for the vt combination */ - ok(hres == expected_error_num, - "VarCat: %d, %d returned error, 0x%X expected 0x%X.\n", - leftvt, rightvt, expected_error_num, hres); - - /* Check types are correct */ - ok(V_VT(&result) == resultvt, - "VarCat: %d, %d: expected vt %d, got vt %d\n", - leftvt, rightvt, resultvt, V_VT(&result)); - - VariantClear(&left); - VariantClear(&right); - VariantClear(&result); - } - } - - /* Running single comparison tests to compare outputs */ - - /* Test concat strings */ - V_VT(&left) = VT_BSTR; - V_VT(&right) = VT_BSTR; - V_VT(&expected) = VT_BSTR; - V_BSTR(&left) = SysAllocString(sz12); - V_BSTR(&right) = SysAllocString(sz34); - V_BSTR(&expected) = SysAllocString(sz1234); - hres = VarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); - ok(VarCmp(&result,&expected,lcid,0) == VARCMP_EQ, - "VarCat: VT_BSTR concat with VT_BSTR failed to return correct result\n"); - - VariantClear(&left); - VariantClear(&right); - VariantClear(&result); - - /* Test if expression is VT_ERROR */ - V_VT(&left) = VT_ERROR; - V_VT(&right) = VT_BSTR; - V_BSTR(&right) = SysAllocString(sz1234); - hres = VarCat(&left,&right,&result); - ok(hres == DISP_E_TYPEMISMATCH, "VarCat should have returned DISP_E_TYPEMISMATCH instead of 0x%08x\n", hres); - ok(V_VT(&result) == VT_EMPTY, - "VarCat: VT_ERROR concat with VT_BSTR should have returned VT_EMPTY\n"); - - VariantClear(&left); - VariantClear(&right); - VariantClear(&result); - - V_VT(&left) = VT_BSTR; - V_VT(&right) = VT_ERROR; - V_BSTR(&left) = SysAllocString(sz1234); - hres = VarCat(&left,&right,&result); - ok(hres == DISP_E_TYPEMISMATCH, "VarCat should have returned DISP_E_TYPEMISMATCH instead of 0x%08x\n", hres); - ok(V_VT(&result) == VT_EMPTY, - "VarCat: VT_BSTR concat with VT_ERROR should have returned VT_EMPTY\n"); - - VariantClear(&left); - VariantClear(&right); - VariantClear(&result); - VariantClear(&expected); - - /* Test combining boolean with number */ - V_VT(&left) = VT_INT; - V_VT(&right) = VT_BOOL; - V_VT(&expected) = VT_BSTR; - V_INT(&left) = 12; - V_BOOL(&right) = TRUE; - V_BSTR(&expected) = SysAllocString(sz12_true); - hres = VarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); - hres = VarCmp(&result,&expected,lcid,0); - ok(hres == VARCMP_EQ, "Expected VARCMP_EQ, got %08x for %s, %s\n", - hres, variantstr(&result), variantstr(&expected)); - - VariantClear(&left); - VariantClear(&right); - VariantClear(&result); - VariantClear(&expected); - - V_VT(&left) = VT_INT; - V_VT(&right) = VT_BOOL; - V_VT(&expected) = VT_BSTR; - V_INT(&left) = 12; - V_BOOL(&right) = FALSE; - V_BSTR(&expected) = SysAllocString(sz12_false); - hres = VarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); - hres = VarCmp(&result,&expected,lcid,0); - ok(hres == VARCMP_EQ, "Expected VARCMP_EQ, got %08x for %s, %s\n", - hres, variantstr(&result), variantstr(&expected)); - - VariantClear(&left); - VariantClear(&right); - VariantClear(&result); - VariantClear(&expected); - - /* Test when both expressions are numeric */ - V_VT(&left) = VT_INT; - V_VT(&right) = VT_INT; - V_VT(&expected) = VT_BSTR; - V_INT(&left) = 12; - V_INT(&right) = 34; - V_BSTR(&expected) = SysAllocString(sz1234); - hres = VarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); - ok(VarCmp(&result,&expected,lcid,0) == VARCMP_EQ, - "VarCat: NUMBER concat with NUMBER returned incorrect result\n"); - - VariantClear(&left); - VariantClear(&right); - VariantClear(&result); - - /* Test if one expression is numeric and the other is a string */ - V_VT(&left) = VT_INT; - V_VT(&right) = VT_BSTR; - V_INT(&left) = 12; - V_BSTR(&right) = SysAllocString(sz34); - hres = VarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); - ok(VarCmp(&result,&expected,lcid,0) == VARCMP_EQ, - "VarCat: NUMBER concat with VT_BSTR, incorrect result\n"); - - VariantClear(&left); - VariantClear(&right); - VariantClear(&result); - - V_VT(&left) = VT_BSTR; - V_VT(&right) = VT_INT; - V_BSTR(&left) = SysAllocString(sz12); - V_INT(&right) = 34; - hres = VarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); - ok(VarCmp(&result,&expected,lcid,0) == VARCMP_EQ, - "VarCat: VT_BSTR concat with NUMBER, incorrect result\n"); - - VariantClear(&left); - VariantClear(&right); - VariantClear(&result); - VariantClear(&expected); - - /* Test concat dates with strings */ - V_VT(&left) = VT_BSTR; - V_VT(&right) = VT_DATE; - V_VT(&expected) = VT_BSTR; - V_VT(&expected_broken) = VT_BSTR; - V_BSTR(&left) = SysAllocString(sz12); - V_DATE(&right) = 29494.0; - V_BSTR(&expected)= SysAllocString(sz12_date); - V_BSTR(&expected_broken)= SysAllocString(sz12_date_broken); - hres = VarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); - ok(VarCmp(&result,&expected,lcid,0) == VARCMP_EQ || - broken(VarCmp(&result,&expected_broken,lcid,0) == VARCMP_EQ), /* Some W98 and NT4 (intermittent) */ - "VarCat: VT_BSTR concat with VT_DATE returned incorrect result\n"); - - VariantClear(&left); - VariantClear(&right); - VariantClear(&result); - VariantClear(&expected); - VariantClear(&expected_broken); - - V_VT(&left) = VT_DATE; - V_VT(&right) = VT_BSTR; - V_VT(&expected) = VT_BSTR; - V_VT(&expected_broken) = VT_BSTR; - V_DATE(&left) = 29494.0; - V_BSTR(&right) = SysAllocString(sz12); - V_BSTR(&expected)= SysAllocString(date_sz12); - V_BSTR(&expected_broken)= SysAllocString(date_sz12_broken); - hres = VarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); - ok(VarCmp(&result,&expected,lcid,0) == VARCMP_EQ || - broken(VarCmp(&result,&expected_broken,lcid,0) == VARCMP_EQ), /* Some W98 and NT4 (intermittent) */ - "VarCat: VT_DATE concat with VT_BSTR returned incorrect result\n"); - - VariantClear(&left); - VariantClear(&right); - VariantClear(&result); - VariantClear(&expected); - VariantClear(&expected_broken); - - /* Test of both expressions are empty */ - V_VT(&left) = VT_BSTR; - V_VT(&right) = VT_BSTR; - V_VT(&expected) = VT_BSTR; - V_BSTR(&left) = SysAllocString(sz_empty); - V_BSTR(&right) = SysAllocString(sz_empty); - V_BSTR(&expected)= SysAllocString(sz_empty); - hres = VarCat(&left,&right,&result); - ok(hres == S_OK, "VarCat failed with error 0x%08x\n", hres); - ok(VarCmp(&result,&left,lcid,0) == VARCMP_EQ, - "VarCat: EMPTY concat with EMPTY did not return empty VT_BSTR\n"); - - /* Restore original date format settings */ - SetLocaleInfo(lcid,LOCALE_SSHORTDATE,orig_date_format); - - VariantClear(&left); - VariantClear(&right); - VariantClear(&result); - VariantClear(&expected); -} - -static HRESULT (WINAPI *pVarAnd)(LPVARIANT,LPVARIANT,LPVARIANT); - -#define VARAND(vt1,val1,vt2,val2,rvt,rval) \ - V_VT(&left) = VT_##vt1; V_##vt1(&left) = val1; \ - V_VT(&right) = VT_##vt2; V_##vt2(&right) = val2; \ - V_VT(&exp) = VT_##rvt; V_##rvt(&exp) = rval; \ - test_var_call2( __LINE__, pVarAnd, &left, &right, &exp ) - -#define VARANDCY(vt1,val1,val2,rvt,rval) \ - V_VT(&left) = VT_##vt1; V_##vt1(&left) = val1; \ - V_VT(&right) = VT_CY; V_CY(&right).int64 = val2; \ - V_VT(&exp) = VT_##rvt; V_##rvt(&exp) = rval; \ - test_var_call2( __LINE__, pVarAnd, &left, &right, &exp ) - -/* Skip any type that is not defined or produces an error for every case */ -#define SKIPTESTAND(a) \ - if (a == VT_ERROR || a == VT_VARIANT || \ - a == VT_DISPATCH || a == VT_UNKNOWN || \ - a > VT_UINT || a == 15 /*not defined*/) \ - continue - -static void test_VarAnd(void) -{ - static const WCHAR szFalse[] = { '#','F','A','L','S','E','#','\0' }; - static const WCHAR szTrue[] = { '#','T','R','U','E','#','\0' }; - VARIANT left, right, exp, result; - BSTR false_str, true_str; - VARTYPE i; - HRESULT hres; - - true_str = SysAllocString(szTrue); - false_str = SysAllocString(szFalse); - - CHECKPTR(VarAnd); - - /* Test all possible flag/vt combinations & the resulting vt type */ - for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]); i++) - { - VARTYPE leftvt, rightvt, resvt; - - for (leftvt = 0; leftvt <= VT_BSTR_BLOB; leftvt++) - { - SKIPTESTAND(leftvt); - - /* Check if we need/have support for I8 and/or UI8 */ - if ((leftvt == VT_I8 || leftvt == VT_UI8) && !HAVE_OLEAUT32_I8) - continue; - - for (rightvt = 0; rightvt <= VT_BSTR_BLOB; rightvt++) - { - BOOL bFail = FALSE; - SKIPTESTAND(rightvt); - - /* Check if we need/have support for I8 and/or UI8 */ - if ((rightvt == VT_I8 || rightvt == VT_UI8) && !HAVE_OLEAUT32_I8) - continue; - - memset(&left, 0, sizeof(left)); - memset(&right, 0, sizeof(right)); - V_VT(&left) = leftvt | ExtraFlags[i]; - V_VT(&right) = rightvt | ExtraFlags[i]; - V_VT(&result) = VT_EMPTY; - resvt = VT_EMPTY; - if ((leftvt | ExtraFlags[i]) == VT_BSTR) - V_BSTR(&left) = true_str; - if ((rightvt | ExtraFlags[i]) == VT_BSTR) - V_BSTR(&right) = true_str; - - /* Native VarAnd always returns an error when using extra - * flags or if the variant combination is I8 and INT. - */ - if ((leftvt == VT_I8 && rightvt == VT_INT) || - (leftvt == VT_INT && rightvt == VT_I8) || - ExtraFlags[i] != 0) - bFail = TRUE; - - /* Determine return type */ - else if (leftvt == VT_I8 || rightvt == VT_I8) - resvt = VT_I8; - else if (leftvt == VT_I4 || rightvt == VT_I4 || - leftvt == VT_UINT || rightvt == VT_UINT || - leftvt == VT_INT || rightvt == VT_INT || - leftvt == VT_UINT || rightvt == VT_UINT || - leftvt == VT_R4 || rightvt == VT_R4 || - leftvt == VT_R8 || rightvt == VT_R8 || - leftvt == VT_CY || rightvt == VT_CY || - leftvt == VT_DATE || rightvt == VT_DATE || - leftvt == VT_I1 || rightvt == VT_I1 || - leftvt == VT_UI2 || rightvt == VT_UI2 || - leftvt == VT_UI4 || rightvt == VT_UI4 || - leftvt == VT_UI8 || rightvt == VT_UI8 || - leftvt == VT_DECIMAL || rightvt == VT_DECIMAL) - resvt = VT_I4; - else if (leftvt == VT_UI1 || rightvt == VT_UI1 || - leftvt == VT_I2 || rightvt == VT_I2 || - leftvt == VT_EMPTY || rightvt == VT_EMPTY) - if ((leftvt == VT_NULL && rightvt == VT_UI1) || - (leftvt == VT_UI1 && rightvt == VT_NULL) || - (leftvt == VT_UI1 && rightvt == VT_UI1)) - resvt = VT_UI1; - else - resvt = VT_I2; - else if (leftvt == VT_BOOL || rightvt == VT_BOOL || - (leftvt == VT_BSTR && rightvt == VT_BSTR)) - resvt = VT_BOOL; - else if (leftvt == VT_NULL || rightvt == VT_NULL || - leftvt == VT_BSTR || rightvt == VT_BSTR) - resvt = VT_NULL; - else - bFail = TRUE; - - hres = pVarAnd(&left, &right, &result); - - /* Check expected HRESULT and if result variant type is correct */ - if (bFail) - ok (hres == DISP_E_BADVARTYPE || hres == DISP_E_TYPEMISMATCH, - "VarAnd: %s|0x%X, %s|0x%X: got vt %s hr 0x%X\n", - vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], - vtstr(V_VT(&result)), hres); - else - ok (hres == S_OK && resvt == V_VT(&result), - "VarAnd: %s|0x%X, %s|0x%X: expected vt %s hr 0x%X, got vt %s hr 0x%X\n", - vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], vtstr(resvt), - S_OK, vtstr(V_VT(&result)), hres); - } - } - } - - /* - * Test returned values. Since we know the returned type is correct - * and that we handle all combinations of invalid types, just check - * that good type combinations produce the desired value. - * FIXME: Test VT_DECIMAL - */ - VARAND(EMPTY,0,EMPTY,0,I2,0); - VARAND(EMPTY,1,EMPTY,0,I2,0); - VARAND(EMPTY,1,EMPTY,1,I2,0); - VARAND(EMPTY,0,NULL,0,I2,0); - VARAND(EMPTY,1,NULL,0,I2,0); - VARAND(EMPTY,1,NULL,1,I2,0); - VARAND(EMPTY,0,I1,0,I4,0); - VARAND(EMPTY,0,I1,1,I4,0); - VARAND(EMPTY,1,I1,1,I4,0); - VARAND(EMPTY,0,UI1,0,I2,0); - VARAND(EMPTY,0,UI1,1,I2,0); - VARAND(EMPTY,1,UI1,1,I2,0); - VARAND(EMPTY,0,I2,0,I2,0); - VARAND(EMPTY,0,I2,1,I2,0); - VARAND(EMPTY,1,I2,1,I2,0); - VARAND(EMPTY,0,UI2,0,I4,0); - VARAND(EMPTY,0,UI2,1,I4,0); - VARAND(EMPTY,1,UI2,1,I4,0); - VARAND(EMPTY,0,I4,0,I4,0); - VARAND(EMPTY,0,I4,1,I4,0); - VARAND(EMPTY,1,I4,1,I4,0); - VARAND(EMPTY,0,UI4,0,I4,0); - VARAND(EMPTY,0,UI4,1,I4,0); - VARAND(EMPTY,1,UI4,1,I4,0); - if (HAVE_OLEAUT32_I8) - { - VARAND(EMPTY,0,I8,0,I8,0); - VARAND(EMPTY,0,I8,1,I8,0); - VARAND(EMPTY,1,I8,1,I8,0); - VARAND(EMPTY,0,UI8,0,I4,0); - VARAND(EMPTY,0,UI8,1,I4,0); - VARAND(EMPTY,1,UI8,1,I4,0); - } - VARAND(EMPTY,0,INT,0,I4,0); - VARAND(EMPTY,0,INT,1,I4,0); - VARAND(EMPTY,1,INT,1,I4,0); - VARAND(EMPTY,0,UINT,0,I4,0); - VARAND(EMPTY,0,UINT,1,I4,0); - VARAND(EMPTY,1,UINT,1,I4,0); - VARAND(EMPTY,0,BOOL,0,I2,0); - VARAND(EMPTY,0,BOOL,1,I2,0); - VARAND(EMPTY,1,BOOL,1,I2,0); - VARAND(EMPTY,0,R4,0,I4,0); - VARAND(EMPTY,0,R4,1,I4,0); - VARAND(EMPTY,1,R4,1,I4,0); - VARAND(EMPTY,0,R8,0,I4,0); - VARAND(EMPTY,0,R8,1,I4,0); - VARAND(EMPTY,1,R8,1,I4,0); - VARAND(EMPTY,0,BSTR,false_str,I2,0); - VARAND(EMPTY,0,BSTR,true_str,I2,0); - VARANDCY(EMPTY,0,10000,I4,0); - - /* NULL OR 0 = NULL. NULL OR n = n */ - VARAND(NULL,0,NULL,0,NULL,0); - VARAND(NULL,1,NULL,0,NULL,0); - VARAND(NULL,0,I1,0,I4,0); - VARAND(NULL,0,I1,1,NULL,0); - VARAND(NULL,0,UI1,0,UI1,0); - VARAND(NULL,0,UI1,1,NULL,0); - VARAND(NULL,0,I2,0,I2,0); - VARAND(NULL,0,I2,1,NULL,0); - VARAND(NULL,0,UI2,0,I4,0); - VARAND(NULL,0,UI2,1,NULL,0); - VARAND(NULL,0,I4,0,I4,0); - VARAND(NULL,0,I4,1,NULL,0); - VARAND(NULL,0,UI4,0,I4,0); - VARAND(NULL,0,UI4,1,NULL,0); - if (HAVE_OLEAUT32_I8) - { - VARAND(NULL,0,I8,0,I8,0); - VARAND(NULL,0,I8,1,NULL,0); - VARAND(NULL,0,UI8,0,I4,0); - VARAND(NULL,0,UI8,1,NULL,0); - } - VARAND(NULL,0,INT,0,I4,0); - VARAND(NULL,0,INT,1,NULL,0); - VARAND(NULL,0,UINT,0,I4,0); - VARAND(NULL,0,UINT,1,NULL,0); - VARAND(NULL,0,BOOL,0,BOOL,0); - VARAND(NULL,0,BOOL,1,NULL,0); - VARAND(NULL,0,R4,0,I4,0); - VARAND(NULL,0,R4,1,NULL,0); - VARAND(NULL,0,R8,0,I4,0); - VARAND(NULL,0,R8,1,NULL,0); - VARAND(NULL,0,BSTR,false_str,BOOL,0); - VARAND(NULL,0,BSTR,true_str,NULL,VARIANT_FALSE); - VARANDCY(NULL,0,10000,NULL,0); - VARANDCY(NULL,0,0,I4,0); - VARAND(BOOL,VARIANT_TRUE,BOOL,VARIANT_TRUE,BOOL,VARIANT_TRUE); - VARAND(BOOL,VARIANT_TRUE,BOOL,VARIANT_FALSE,BOOL,VARIANT_FALSE); - VARAND(BOOL,VARIANT_FALSE,BOOL,VARIANT_TRUE,BOOL,VARIANT_FALSE); - VARAND(BOOL,VARIANT_FALSE,BOOL,VARIANT_FALSE,BOOL,VARIANT_FALSE); - - /* Assume x,y & y,x are the same from now on to reduce the number of tests */ - VARAND(BOOL,VARIANT_TRUE,I1,-1,I4,-1); - VARAND(BOOL,VARIANT_TRUE,I1,0,I4,0); - VARAND(BOOL,VARIANT_FALSE,I1,0,I4,0); - VARAND(BOOL,VARIANT_TRUE,UI1,255,I2,255); - VARAND(BOOL,VARIANT_TRUE,UI1,0,I2,0); - VARAND(BOOL,VARIANT_FALSE,UI1,0,I2,0); - VARAND(BOOL,VARIANT_TRUE,I2,-1,I2,-1); - VARAND(BOOL,VARIANT_TRUE,I2,0,I2,0); - VARAND(BOOL,VARIANT_FALSE,I2,0,I2,0); - VARAND(BOOL,VARIANT_TRUE,UI2,65535,I4,65535); - VARAND(BOOL,VARIANT_TRUE,UI2,0,I4,0); - VARAND(BOOL,VARIANT_FALSE,UI2,0,I4,0); - VARAND(BOOL,VARIANT_TRUE,I4,-1,I4,-1); - VARAND(BOOL,VARIANT_TRUE,I4,0,I4,0); - VARAND(BOOL,VARIANT_FALSE,I4,0,I4,0); - VARAND(BOOL,VARIANT_TRUE,UI4,0xffffffff,I4,-1); - VARAND(BOOL,VARIANT_TRUE,UI4,0,I4,0); - VARAND(BOOL,VARIANT_FALSE,UI4,0,I4,0); - VARAND(BOOL,VARIANT_TRUE,R4,-1,I4,-1); - VARAND(BOOL,VARIANT_TRUE,R4,0,I4,0); - VARAND(BOOL,VARIANT_FALSE,R4,0,I4,0); - VARAND(BOOL,VARIANT_TRUE,R8,-1,I4,-1); - VARAND(BOOL,VARIANT_TRUE,R8,0,I4,0); - VARAND(BOOL,VARIANT_FALSE,R8,0,I4,0); - VARAND(BOOL,VARIANT_TRUE,DATE,-1,I4,-1); - VARAND(BOOL,VARIANT_TRUE,DATE,0,I4,0); - VARAND(BOOL,VARIANT_FALSE,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VARAND(BOOL,VARIANT_TRUE,I8,-1,I8,-1); - VARAND(BOOL,VARIANT_TRUE,I8,0,I8,0); - VARAND(BOOL,VARIANT_FALSE,I8,0,I8,0); - VARAND(BOOL,VARIANT_TRUE,UI8,0,I4,0); - VARAND(BOOL,VARIANT_FALSE,UI8,0,I4,0); - } - VARAND(BOOL,VARIANT_TRUE,INT,-1,I4,-1); - VARAND(BOOL,VARIANT_TRUE,INT,0,I4,0); - VARAND(BOOL,VARIANT_FALSE,INT,0,I4,0); - VARAND(BOOL,VARIANT_TRUE,UINT,0xffffffff,I4,-1); - VARAND(BOOL,VARIANT_TRUE,UINT,0,I4,0); - VARAND(BOOL,VARIANT_FALSE,UINT,0,I4,0); - VARAND(BOOL,VARIANT_FALSE,BSTR,false_str,BOOL,VARIANT_FALSE); - VARAND(BOOL,VARIANT_TRUE,BSTR,false_str,BOOL,VARIANT_FALSE); - VARAND(BOOL,VARIANT_FALSE,BSTR,true_str,BOOL,VARIANT_FALSE); - VARAND(BOOL,VARIANT_TRUE,BSTR,true_str,BOOL,VARIANT_TRUE); - VARANDCY(BOOL,VARIANT_TRUE,10000,I4,1); - VARANDCY(BOOL,VARIANT_TRUE,0,I4,0); - VARANDCY(BOOL,VARIANT_FALSE,0,I4,0); - VARAND(I1,-1,I1,-1,I4,-1); - VARAND(I1,-1,I1,0,I4,0); - VARAND(I1,0,I1,0,I4,0); - VARAND(I1,-1,UI1,255,I4,255); - VARAND(I1,-1,UI1,0,I4,0); - VARAND(I1,0,UI1,0,I4,0); - VARAND(I1,-1,I2,-1,I4,-1); - VARAND(I1,-1,I2,0,I4,0); - VARAND(I1,0,I2,0,I4,0); - VARAND(I1,-1,UI2,65535,I4,65535); - VARAND(I1,-1,UI2,0,I4,0); - VARAND(I1,0,UI2,0,I4,0); - VARAND(I1,-1,I4,-1,I4,-1); - VARAND(I1,-1,I4,0,I4,0); - VARAND(I1,0,I4,0,I4,0); - VARAND(I1,-1,UI4,0xffffffff,I4,-1); - VARAND(I1,-1,UI4,0,I4,0); - VARAND(I1,0,UI4,0,I4,0); - VARAND(I1,-1,R4,-1,I4,-1); - VARAND(I1,-1,R4,0,I4,0); - VARAND(I1,0,R4,0,I4,0); - VARAND(I1,-1,R8,-1,I4,-1); - VARAND(I1,-1,R8,0,I4,0); - VARAND(I1,0,R8,0,I4,0); - VARAND(I1,-1,DATE,-1,I4,-1); - VARAND(I1,-1,DATE,0,I4,0); - VARAND(I1,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VARAND(I1,-1,I8,-1,I8,-1); - VARAND(I1,-1,I8,0,I8,0); - VARAND(I1,0,I8,0,I8,0); - VARAND(I1,-1,UI8,0,I4,0); - VARAND(I1,0,UI8,0,I4,0); - } - VARAND(I1,-1,INT,-1,I4,-1); - VARAND(I1,-1,INT,0,I4,0); - VARAND(I1,0,INT,0,I4,0); - VARAND(I1,-1,UINT,0xffffffff,I4,-1); - VARAND(I1,-1,UINT,0,I4,0); - VARAND(I1,0,UINT,0,I4,0); - VARAND(I1,0,BSTR,false_str,I4,0); - VARAND(I1,-1,BSTR,false_str,I4,0); - VARAND(I1,0,BSTR,true_str,I4,0); - VARAND(I1,-1,BSTR,true_str,I4,-1); - VARANDCY(I1,-1,10000,I4,1); - VARANDCY(I1,-1,0,I4,0); - VARANDCY(I1,0,0,I4,0); - - VARAND(UI1,255,UI1,255,UI1,255); - VARAND(UI1,255,UI1,0,UI1,0); - VARAND(UI1,0,UI1,0,UI1,0); - VARAND(UI1,255,I2,-1,I2,255); - VARAND(UI1,255,I2,0,I2,0); - VARAND(UI1,0,I2,0,I2,0); - VARAND(UI1,255,UI2,65535,I4,255); - VARAND(UI1,255,UI2,0,I4,0); - VARAND(UI1,0,UI2,0,I4,0); - VARAND(UI1,255,I4,-1,I4,255); - VARAND(UI1,255,I4,0,I4,0); - VARAND(UI1,0,I4,0,I4,0); - VARAND(UI1,255,UI4,0xffffffff,I4,255); - VARAND(UI1,255,UI4,0,I4,0); - VARAND(UI1,0,UI4,0,I4,0); - VARAND(UI1,255,R4,-1,I4,255); - VARAND(UI1,255,R4,0,I4,0); - VARAND(UI1,0,R4,0,I4,0); - VARAND(UI1,255,R8,-1,I4,255); - VARAND(UI1,255,R8,0,I4,0); - VARAND(UI1,0,R8,0,I4,0); - VARAND(UI1,255,DATE,-1,I4,255); - VARAND(UI1,255,DATE,0,I4,0); - VARAND(UI1,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VARAND(UI1,255,I8,-1,I8,255); - VARAND(UI1,255,I8,0,I8,0); - VARAND(UI1,0,I8,0,I8,0); - VARAND(UI1,255,UI8,0,I4,0); - VARAND(UI1,0,UI8,0,I4,0); - } - VARAND(UI1,255,INT,-1,I4,255); - VARAND(UI1,255,INT,0,I4,0); - VARAND(UI1,0,INT,0,I4,0); - VARAND(UI1,255,UINT,0xffffffff,I4,255); - VARAND(UI1,255,UINT,0,I4,0); - VARAND(UI1,0,UINT,0,I4,0); - VARAND(UI1,0,BSTR,false_str,I2,0); - VARAND(UI1,255,BSTR,false_str,I2,0); - VARAND(UI1,0,BSTR,true_str,I2,0); - VARAND(UI1,255,BSTR,true_str,I2,255); - VARANDCY(UI1,255,10000,I4,1); - VARANDCY(UI1,255,0,I4,0); - VARANDCY(UI1,0,0,I4,0); - - VARAND(I2,-1,I2,-1,I2,-1); - VARAND(I2,-1,I2,0,I2,0); - VARAND(I2,0,I2,0,I2,0); - VARAND(I2,-1,UI2,65535,I4,65535); - VARAND(I2,-1,UI2,0,I4,0); - VARAND(I2,0,UI2,0,I4,0); - VARAND(I2,-1,I4,-1,I4,-1); - VARAND(I2,-1,I4,0,I4,0); - VARAND(I2,0,I4,0,I4,0); - VARAND(I2,-1,UI4,0xffffffff,I4,-1); - VARAND(I2,-1,UI4,0,I4,0); - VARAND(I2,0,UI4,0,I4,0); - VARAND(I2,-1,R4,-1,I4,-1); - VARAND(I2,-1,R4,0,I4,0); - VARAND(I2,0,R4,0,I4,0); - VARAND(I2,-1,R8,-1,I4,-1); - VARAND(I2,-1,R8,0,I4,0); - VARAND(I2,0,R8,0,I4,0); - VARAND(I2,-1,DATE,-1,I4,-1); - VARAND(I2,-1,DATE,0,I4,0); - VARAND(I2,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VARAND(I2,-1,I8,-1,I8,-1); - VARAND(I2,-1,I8,0,I8,0); - VARAND(I2,0,I8,0,I8,0); - VARAND(I2,-1,UI8,0,I4,0); - VARAND(I2,0,UI8,0,I4,0); - } - VARAND(I2,-1,INT,-1,I4,-1); - VARAND(I2,-1,INT,0,I4,0); - VARAND(I2,0,INT,0,I4,0); - VARAND(I2,-1,UINT,0xffffffff,I4,-1); - VARAND(I2,-1,UINT,0,I4,0); - VARAND(I2,0,UINT,0,I4,0); - VARAND(I2,0,BSTR,false_str,I2,0); - VARAND(I2,-1,BSTR,false_str,I2,0); - VARAND(I2,0,BSTR,true_str,I2,0); - VARAND(I2,-1,BSTR,true_str,I2,-1); - VARANDCY(I2,-1,10000,I4,1); - VARANDCY(I2,-1,0,I4,0); - VARANDCY(I2,0,0,I4,0); - - VARAND(UI2,65535,UI2,65535,I4,65535); - VARAND(UI2,65535,UI2,0,I4,0); - VARAND(UI2,0,UI2,0,I4,0); - VARAND(UI2,65535,I4,-1,I4,65535); - VARAND(UI2,65535,I4,0,I4,0); - VARAND(UI2,0,I4,0,I4,0); - VARAND(UI2,65535,UI4,0xffffffff,I4,65535); - VARAND(UI2,65535,UI4,0,I4,0); - VARAND(UI2,0,UI4,0,I4,0); - VARAND(UI2,65535,R4,-1,I4,65535); - VARAND(UI2,65535,R4,0,I4,0); - VARAND(UI2,0,R4,0,I4,0); - VARAND(UI2,65535,R8,-1,I4,65535); - VARAND(UI2,65535,R8,0,I4,0); - VARAND(UI2,0,R8,0,I4,0); - VARAND(UI2,65535,DATE,-1,I4,65535); - VARAND(UI2,65535,DATE,0,I4,0); - VARAND(UI2,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VARAND(UI2,65535,I8,-1,I8,65535); - VARAND(UI2,65535,I8,0,I8,0); - VARAND(UI2,0,I8,0,I8,0); - VARAND(UI2,65535,UI8,0,I4,0); - VARAND(UI2,0,UI8,0,I4,0); - } - VARAND(UI2,65535,INT,-1,I4,65535); - VARAND(UI2,65535,INT,0,I4,0); - VARAND(UI2,0,INT,0,I4,0); - VARAND(UI2,65535,UINT,0xffffffff,I4,65535); - VARAND(UI2,65535,UINT,0,I4,0); - VARAND(UI2,0,UINT,0,I4,0); - VARAND(UI2,0,BSTR,false_str,I4,0); - VARAND(UI2,65535,BSTR,false_str,I4,0); - VARAND(UI2,0,BSTR,true_str,I4,0); - VARAND(UI2,65535,BSTR,true_str,I4,65535); - VARANDCY(UI2,65535,10000,I4,1); - VARANDCY(UI2,65535,0,I4,0); - VARANDCY(UI2,0,0,I4,0); - - VARAND(I4,-1,I4,-1,I4,-1); - VARAND(I4,-1,I4,0,I4,0); - VARAND(I4,0,I4,0,I4,0); - VARAND(I4,-1,UI4,0xffffffff,I4,-1); - VARAND(I4,-1,UI4,0,I4,0); - VARAND(I4,0,UI4,0,I4,0); - VARAND(I4,-1,R4,-1,I4,-1); - VARAND(I4,-1,R4,0,I4,0); - VARAND(I4,0,R4,0,I4,0); - VARAND(I4,-1,R8,-1,I4,-1); - VARAND(I4,-1,R8,0,I4,0); - VARAND(I4,0,R8,0,I4,0); - VARAND(I4,-1,DATE,-1,I4,-1); - VARAND(I4,-1,DATE,0,I4,0); - VARAND(I4,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VARAND(I4,-1,I8,-1,I8,-1); - VARAND(I4,-1,I8,0,I8,0); - VARAND(I4,0,I8,0,I8,0); - VARAND(I4,-1,UI8,0,I4,0); - VARAND(I4,0,UI8,0,I4,0); - } - VARAND(I4,-1,INT,-1,I4,-1); - VARAND(I4,-1,INT,0,I4,0); - VARAND(I4,0,INT,0,I4,0); - VARAND(I4,-1,UINT,0xffffffff,I4,-1); - VARAND(I4,-1,UINT,0,I4,0); - VARAND(I4,0,UINT,0,I4,0); - VARAND(I4,0,BSTR,false_str,I4,0); - VARAND(I4,-1,BSTR,false_str,I4,0); - VARAND(I4,0,BSTR,true_str,I4,0); - VARAND(I4,-1,BSTR,true_str,I4,-1); - VARANDCY(I4,-1,10000,I4,1); - VARANDCY(I4,-1,0,I4,0); - VARANDCY(I4,0,0,I4,0); - - VARAND(UI4,0xffffffff,UI4,0xffffffff,I4,-1); - VARAND(UI4,0xffffffff,UI4,0,I4,0); - VARAND(UI4,0,UI4,0,I4,0); - VARAND(UI4,0xffffffff,R4,-1,I4,-1); - VARAND(UI4,0xffffffff,R4,0,I4,0); - VARAND(UI4,0,R4,0,I4,0); - VARAND(UI4,0xffffffff,R8,-1,I4,-1); - VARAND(UI4,0xffffffff,R8,0,I4,0); - VARAND(UI4,0,R8,0,I4,0); - VARAND(UI4,0xffffffff,DATE,-1,I4,-1); - VARAND(UI4,0xffffffff,DATE,0,I4,0); - VARAND(UI4,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VARAND(UI4,0xffffffff,I8,0,I8,0); - VARAND(UI4,0,I8,0,I8,0); - VARAND(UI4,0xffffffff,UI8,0,I4,0); - VARAND(UI4,0,UI8,0,I4,0); - } - VARAND(UI4,0xffffffff,INT,-1,I4,-1); - VARAND(UI4,0xffffffff,INT,0,I4,0); - VARAND(UI4,0,INT,0,I4,0); - VARAND(UI4,0xffffffff,UINT,0xffffffff,I4,-1); - VARAND(UI4,0xffffffff,UINT,0,I4,0); - VARAND(UI4,0,UINT,0,I4,0); - VARAND(UI4,0,BSTR,false_str,I4,0); - VARAND(UI4,0xffffffff,BSTR,false_str,I4,0); - VARAND(UI4,0,BSTR,true_str,I4,0); - VARAND(UI4,0xffffffff,BSTR,true_str,I4,-1); - VARANDCY(UI4,0xffffffff,10000,I4,1); - VARANDCY(UI4,0xffffffff,0,I4,0); - VARANDCY(UI4,0,0,I4,0); - - VARAND(R4,-1,R4,-1,I4,-1); - VARAND(R4,-1,R4,0,I4,0); - VARAND(R4,0,R4,0,I4,0); - VARAND(R4,-1,R8,-1,I4,-1); - VARAND(R4,-1,R8,0,I4,0); - VARAND(R4,0,R8,0,I4,0); - VARAND(R4,-1,DATE,-1,I4,-1); - VARAND(R4,-1,DATE,0,I4,0); - VARAND(R4,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VARAND(R4,-1,I8,-1,I8,-1); - VARAND(R4,-1,I8,0,I8,0); - VARAND(R4,0,I8,0,I8,0); - VARAND(R4,-1,UI8,0,I4,0); - VARAND(R4,0,UI8,0,I4,0); - } - VARAND(R4,-1,INT,-1,I4,-1); - VARAND(R4,-1,INT,0,I4,0); - VARAND(R4,0,INT,0,I4,0); - VARAND(R4,-1,UINT,0xffffffff,I4,-1); - VARAND(R4,-1,UINT,0,I4,0); - VARAND(R4,0,UINT,0,I4,0); - VARAND(R4,0,BSTR,false_str,I4,0); - VARAND(R4,-1,BSTR,false_str,I4,0); - VARAND(R4,0,BSTR,true_str,I4,0); - VARAND(R4,-1,BSTR,true_str,I4,-1); - VARANDCY(R4,-1,10000,I4,1); - VARANDCY(R4,-1,0,I4,0); - VARANDCY(R4,0,0,I4,0); - - VARAND(R8,-1,R8,-1,I4,-1); - VARAND(R8,-1,R8,0,I4,0); - VARAND(R8,0,R8,0,I4,0); - VARAND(R8,-1,DATE,-1,I4,-1); - VARAND(R8,-1,DATE,0,I4,0); - VARAND(R8,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VARAND(R8,-1,I8,-1,I8,-1); - VARAND(R8,-1,I8,0,I8,0); - VARAND(R8,0,I8,0,I8,0); - VARAND(R8,-1,UI8,0,I4,0); - VARAND(R8,0,UI8,0,I4,0); - } - VARAND(R8,-1,INT,-1,I4,-1); - VARAND(R8,-1,INT,0,I4,0); - VARAND(R8,0,INT,0,I4,0); - VARAND(R8,-1,UINT,0xffffffff,I4,-1); - VARAND(R8,-1,UINT,0,I4,0); - VARAND(R8,0,UINT,0,I4,0); - VARAND(R8,0,BSTR,false_str,I4,0); - VARAND(R8,-1,BSTR,false_str,I4,0); - VARAND(R8,0,BSTR,true_str,I4,0); - VARAND(R8,-1,BSTR,true_str,I4,-1); - VARANDCY(R8,-1,10000,I4,1); - VARANDCY(R8,-1,0,I4,0); - VARANDCY(R8,0,0,I4,0); - - VARAND(DATE,-1,DATE,-1,I4,-1); - VARAND(DATE,-1,DATE,0,I4,0); - VARAND(DATE,0,DATE,0,I4,0); - if (HAVE_OLEAUT32_I8) - { - VARAND(DATE,-1,I8,-1,I8,-1); - VARAND(DATE,-1,I8,0,I8,0); - VARAND(DATE,0,I8,0,I8,0); - VARAND(DATE,-1,UI8,0,I4,0); - VARAND(DATE,0,UI8,0,I4,0); - } - VARAND(DATE,-1,INT,-1,I4,-1); - VARAND(DATE,-1,INT,0,I4,0); - VARAND(DATE,0,INT,0,I4,0); - VARAND(DATE,-1,UINT,0xffffffff,I4,-1); - VARAND(DATE,-1,UINT,0,I4,0); - VARAND(DATE,0,UINT,0,I4,0); - VARAND(DATE,0,BSTR,false_str,I4,0); - VARAND(DATE,-1,BSTR,false_str,I4,0); - VARAND(DATE,0,BSTR,true_str,I4,0); - VARAND(DATE,-1,BSTR,true_str,I4,-1); - VARANDCY(DATE,-1,10000,I4,1); - VARANDCY(DATE,-1,0,I4,0); - VARANDCY(DATE,0,0,I4,0); - - if (HAVE_OLEAUT32_I8) - { - VARAND(I8,-1,I8,-1,I8,-1); - VARAND(I8,-1,I8,0,I8,0); - VARAND(I8,0,I8,0,I8,0); - VARAND(I8,-1,UI8,0,I8,0); - VARAND(I8,0,UI8,0,I8,0); - VARAND(I8,-1,UINT,0,I8,0); - VARAND(I8,0,UINT,0,I8,0); - VARAND(I8,0,BSTR,false_str,I8,0); - VARAND(I8,-1,BSTR,false_str,I8,0); - VARAND(I8,0,BSTR,true_str,I8,0); - VARAND(I8,-1,BSTR,true_str,I8,-1); - VARANDCY(I8,-1,10000,I8,1); - VARANDCY(I8,-1,0,I8,0); - VARANDCY(I8,0,0,I8,0); - - VARAND(UI8,0xffff,UI8,0xffff,I4,0xffff); - VARAND(UI8,0xffff,UI8,0,I4,0); - VARAND(UI8,0,UI8,0,I4,0); - VARAND(UI8,0xffff,INT,-1,I4,65535); - VARAND(UI8,0xffff,INT,0,I4,0); - VARAND(UI8,0,INT,0,I4,0); - VARAND(UI8,0xffff,UINT,0xffff,I4,0xffff); - VARAND(UI8,0xffff,UINT,0,I4,0); - VARAND(UI8,0,UINT,0,I4,0); - VARAND(UI8,0,BSTR,false_str,I4,0); - VARAND(UI8,0xffff,BSTR,false_str,I4,0); - VARAND(UI8,0,BSTR,true_str,I4,0); - VARAND(UI8,0xffff,BSTR,true_str,I4,65535); - VARANDCY(UI8,0xffff,10000,I4,1); - VARANDCY(UI8,0xffff,0,I4,0); - VARANDCY(UI8,0,0,I4,0); - } - - VARAND(INT,-1,INT,-1,I4,-1); - VARAND(INT,-1,INT,0,I4,0); - VARAND(INT,0,INT,0,I4,0); - VARAND(INT,-1,UINT,0xffff,I4,65535); - VARAND(INT,-1,UINT,0,I4,0); - VARAND(INT,0,UINT,0,I4,0); - VARAND(INT,0,BSTR,false_str,I4,0); - VARAND(INT,-1,BSTR,false_str,I4,0); - VARAND(INT,0,BSTR,true_str,I4,0); - VARAND(INT,-1,BSTR,true_str,I4,-1); - VARANDCY(INT,-1,10000,I4,1); - VARANDCY(INT,-1,0,I4,0); - VARANDCY(INT,0,0,I4,0); - - VARAND(UINT,0xffff,UINT,0xffff,I4,0xffff); - VARAND(UINT,0xffff,UINT,0,I4,0); - VARAND(UINT,0,UINT,0,I4,0); - VARAND(UINT,0,BSTR,false_str,I4,0); - VARAND(UINT,0xffff,BSTR, false_str,I4,0); - VARAND(UINT,0,BSTR,true_str,I4,0); - VARAND(UINT,0xffff,BSTR,true_str,I4,65535); - VARANDCY(UINT,0xffff,10000,I4,1); - VARANDCY(UINT,0xffff,0,I4,0); - VARANDCY(UINT,0,0,I4,0); - - VARAND(BSTR,false_str,BSTR,false_str,BOOL,0); - VARAND(BSTR,true_str,BSTR,false_str,BOOL,VARIANT_FALSE); - VARAND(BSTR,true_str,BSTR,true_str,BOOL,VARIANT_TRUE); - VARANDCY(BSTR,true_str,10000,I4,1); - VARANDCY(BSTR,false_str,10000,I4,0); - - SysFreeString(true_str); - SysFreeString(false_str); -} - -static HRESULT (WINAPI *pVarCmp)(LPVARIANT,LPVARIANT,LCID,ULONG); - -static void test_cmp( int line, LCID lcid, UINT flags, VARIANT *left, VARIANT *right, HRESULT result ) -{ - HRESULT hres; - - hres = pVarCmp(left,right,lcid,flags); - ok_(__FILE__,line)(hres == result, "VarCmp(%s,%s): expected 0x%x, got hres=0x%x\n", - variantstr(left), variantstr(right), result, hres ); -} -static void test_cmpex( int line, LCID lcid, VARIANT *left, VARIANT *right, - HRESULT res1, HRESULT res2, HRESULT res3, HRESULT res4 ) -{ - test_cmp( line, lcid, 0, left, right, res1 ); - V_VT(left) |= VT_RESERVED; - test_cmp( line, lcid, 0, left, right, res2 ); - V_VT(left) &= ~VT_RESERVED; - V_VT(right) |= VT_RESERVED; - test_cmp( line, lcid, 0, left, right, res3 ); - V_VT(left) |= VT_RESERVED; - test_cmp( line, lcid, 0, left, right, res4 ); - ok_(__FILE__,line)(V_VT(left) & V_VT(right) & VT_RESERVED, "VT_RESERVED filtered out\n"); -} - -/* ERROR from wingdi.h is interfering here */ -#undef ERROR -#define _VARCMP(vt1,val1,vtfl1,vt2,val2,vtfl2,lcid,flags,result) \ - V_##vt1(&left) = val1; V_VT(&left) = VT_##vt1 | vtfl1; \ - V_##vt2(&right) = val2; V_VT(&right) = VT_##vt2 | vtfl2; \ - test_cmp( __LINE__, lcid, flags, &left, &right, result ) -#define VARCMPEX(vt1,val1,vt2,val2,res1,res2,res3,res4) \ - V_##vt1(&left) = val1; V_VT(&left) = VT_##vt1; \ - V_##vt2(&right) = val2; V_VT(&right) = VT_##vt2; \ - test_cmpex( __LINE__, lcid, &left, &right, res1, res2, res3, res4 ) -#define VARCMP(vt1,val1,vt2,val2,result) \ - VARCMPEX(vt1,val1,vt2,val2,result,result,result,result) -/* The above macros do not work for VT_NULL as NULL gets expanded first */ -#define V_NULL_ V_NULL -#define VT_NULL_ VT_NULL - -static void test_VarCmp(void) -{ - VARIANT left, right; - VARTYPE i; - LCID lcid; - HRESULT hres; - DECIMAL dec; - static const WCHAR szhuh[] = {'h','u','h','?','\0'}; - static const WCHAR sz2cents[] = {'2','c','e','n','t','s','\0'}; - static const WCHAR szempty[] = {'\0'}; - static const WCHAR sz0[] = {'0','\0'}; - static const WCHAR sz1[] = {'1','\0'}; - static const WCHAR sz7[] = {'7','\0'}; - static const WCHAR sz42[] = {'4','2','\0'}; - static const WCHAR sz1neg[] = {'-','1','\0'}; - static const WCHAR sz666neg[] = {'-','6','6','6','\0'}; - static const WCHAR sz1few[] = {'1','.','0','0','0','0','0','0','0','1','\0'}; - BSTR bstrhuh, bstrempty, bstr0, bstr1, bstr7, bstr42, bstr1neg, bstr666neg; - BSTR bstr2cents, bstr1few; - - CHECKPTR(VarCmp); - - lcid = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT); - bstrempty = SysAllocString(szempty); - bstrhuh = SysAllocString(szhuh); - bstr2cents = SysAllocString(sz2cents); - bstr0 = SysAllocString(sz0); - bstr1 = SysAllocString(sz1); - bstr7 = SysAllocString(sz7); - bstr42 = SysAllocString(sz42); - bstr1neg = SysAllocString(sz1neg); - bstr666neg = SysAllocString(sz666neg); - bstr1few = SysAllocString(sz1few); - - /* Test all possible flag/vt combinations & the resulting vt type */ - for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]); i++) - { - VARTYPE leftvt, rightvt; - - for (leftvt = 0; leftvt <= VT_BSTR_BLOB; leftvt++) - { - - SKIPTESTS(leftvt); - - for (rightvt = 0; rightvt <= VT_BSTR_BLOB; rightvt++) - { - BOOL bFail = FALSE; - HRESULT expect = VARCMP_EQ; - - SKIPTESTS(rightvt); - - memset(&left, 0, sizeof(left)); - memset(&right, 0, sizeof(right)); - V_VT(&left) = leftvt | ExtraFlags[i]; - if (leftvt == VT_BSTR) { - V_BSTR(&left) = bstr1neg; - if (ExtraFlags[i] & VT_RESERVED) - expect = VARCMP_LT; - else - expect = VARCMP_GT; - } - V_VT(&right) = rightvt | ExtraFlags[i]; - if (rightvt == VT_BSTR) { - V_BSTR(&right) = bstr1neg; - if (ExtraFlags[i] & VT_RESERVED) - expect = VARCMP_GT; - else - expect = VARCMP_LT; - } - - /* Don't ask me why but native VarCmp cannot handle: - VT_I1, VT_UI2, VT_UI4, VT_UINT and VT_UI8. - VT_INT is only supported as left variant. Go figure. - Tested with DCOM98, Win2k, WinXP */ - if (ExtraFlags[i] & VT_ARRAY || ExtraFlags[i] & VT_BYREF || - !IsValidVariantClearVT(leftvt, ExtraFlags[i] & ~VT_RESERVED) || - !IsValidVariantClearVT(rightvt, ExtraFlags[i] & ~VT_RESERVED) || - leftvt == VT_CLSID || rightvt == VT_CLSID || - leftvt == VT_DISPATCH || rightvt == VT_DISPATCH || - leftvt == VT_ERROR || rightvt == VT_ERROR || - leftvt == VT_RECORD || rightvt == VT_RECORD || - leftvt == VT_UNKNOWN || rightvt == VT_UNKNOWN || - leftvt == VT_VARIANT || rightvt == VT_VARIANT || - leftvt == VT_I1 || rightvt == VT_I1 || - leftvt == VT_UI2 || rightvt == VT_UI2 || - leftvt == VT_UI4 || rightvt == VT_UI4 || - leftvt == VT_UI8 || rightvt == VT_UI8 || - rightvt == VT_INT || - leftvt == VT_UINT || rightvt == VT_UINT) { - bFail = TRUE; - } - - if (leftvt == VT_ERROR && rightvt == VT_ERROR && - !(ExtraFlags[i] & ~VT_RESERVED)) { - expect = VARCMP_EQ; - bFail = FALSE; - } else if (leftvt == VT_NULL || rightvt == VT_NULL) - expect = VARCMP_NULL; - else if (leftvt == VT_BSTR && rightvt == VT_BSTR) - expect = VARCMP_EQ; - else if (leftvt == VT_BSTR && rightvt == VT_EMPTY) - expect = VARCMP_GT; - else if (leftvt == VT_EMPTY && rightvt == VT_BSTR) - expect = VARCMP_LT; - - hres = pVarCmp(&left, &right, LOCALE_USER_DEFAULT, 0); - if (bFail) { - ok(hres == DISP_E_TYPEMISMATCH || hres == DISP_E_BADVARTYPE, - "VarCmp: %d|0x%X, %d|0x%X: Expected failure, got 0x%X\n", - leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], hres); - } else { - ok(hres == expect, - "VarCmp: %d|0x%X, %d|0x%X: Expected 0x%X, got 0x%X\n", - leftvt, ExtraFlags[i], rightvt, ExtraFlags[i], expect, - hres); - } - } - } - } - - /* VARCMP{,EX} run each 4 tests with a permutation of all possible - input variants with (1) and without (0) VT_RESERVED set. The order - of the permutations is (0,0); (1,0); (0,1); (1,1) */ - VARCMP(INT,4711,I2,4711,VARCMP_EQ); - VARCMP(INT,4711,I2,-4711,VARCMP_GT); - VARCMP(ERROR,0,ERROR,0,VARCMP_EQ); - VARCMP(ERROR,0,UI1,0,DISP_E_TYPEMISMATCH); - VARCMP(EMPTY,0,EMPTY,0,VARCMP_EQ); - VARCMP(I4,1,R8,1.0,VARCMP_EQ); - VARCMP(EMPTY,19,I2,0,VARCMP_EQ); - ok(V_EMPTY(&left) == 19, "VT_EMPTY modified!\n"); - VARCMP(I4,1,UI1,1,VARCMP_EQ); - VARCMP(I2,2,I2,2,VARCMP_EQ); - VARCMP(I2,1,I2,2,VARCMP_LT); - VARCMP(I2,2,I2,1,VARCMP_GT); - VARCMP(I2,2,EMPTY,1,VARCMP_GT); - VARCMP(I2,2,NULL_,1,VARCMP_NULL); - - /* BSTR handling, especially in conjunction with VT_RESERVED */ - VARCMP(BSTR,bstr0,NULL_,0,VARCMP_NULL); - VARCMP(BSTR,bstr0,BSTR,bstr0,VARCMP_EQ); - VARCMP(BSTR,bstrempty,BSTR,bstr0,VARCMP_LT); - VARCMP(BSTR,bstr7,BSTR,bstr0,VARCMP_GT); - VARCMP(BSTR,bstr7,BSTR,bstr1neg,VARCMP_GT); - VARCMP(BSTR,bstr0,BSTR,NULL,VARCMP_GT); - VARCMP(BSTR,NULL,BSTR,NULL,VARCMP_EQ); - VARCMP(BSTR,bstrempty,BSTR,NULL,VARCMP_EQ); - VARCMP(BSTR,NULL,EMPTY,0,VARCMP_EQ); - VARCMP(EMPTY,0,BSTR,NULL,VARCMP_EQ); - VARCMP(EMPTY,0,BSTR,bstrempty,VARCMP_EQ); - VARCMP(EMPTY,1,BSTR,bstrempty,VARCMP_EQ); - VARCMP(BSTR,bstr0,EMPTY,0,VARCMP_GT); - VARCMP(BSTR,bstr42,EMPTY,0,VARCMP_GT); - VARCMPEX(BSTR,bstrempty,UI1,0,VARCMP_GT,VARCMP_LT,VARCMP_GT,VARCMP_GT); - VARCMPEX(BSTR,bstrempty,I2,-1,VARCMP_GT,VARCMP_LT,VARCMP_GT,VARCMP_GT); - VARCMPEX(I4,0,BSTR,bstrempty,VARCMP_LT,VARCMP_LT,VARCMP_GT,VARCMP_LT); - VARCMPEX(BSTR,NULL,UI1,0,VARCMP_GT,VARCMP_LT,VARCMP_GT,VARCMP_GT); - VARCMPEX(I4,7,BSTR,NULL,VARCMP_LT,VARCMP_LT,VARCMP_GT,VARCMP_LT); - _VARCMP(BSTR,(BSTR)100,0,I2,100,0,lcid,0,VARCMP_GT); - VARCMPEX(BSTR,bstr0,UI1,0,VARCMP_GT,VARCMP_EQ,VARCMP_EQ,VARCMP_GT); - VARCMPEX(I2,0,BSTR,bstr0,VARCMP_LT,VARCMP_EQ,VARCMP_EQ,VARCMP_LT); - VARCMP(BSTR,bstrhuh,I4,I4_MAX,VARCMP_GT); - VARCMP(BSTR,bstr2cents,I4,2,VARCMP_GT); - VARCMPEX(BSTR,bstr2cents,I4,42,VARCMP_GT,VARCMP_LT,VARCMP_GT,VARCMP_GT); - VARCMP(BSTR,bstr2cents,I4,-1,VARCMP_GT); - VARCMPEX(BSTR,bstr2cents,I4,-666,VARCMP_GT,VARCMP_LT,VARCMP_GT,VARCMP_GT); - VARCMPEX(BSTR,bstr0,I2,0,VARCMP_GT,VARCMP_EQ,VARCMP_EQ,VARCMP_GT); - VARCMPEX(BSTR,bstr0,I4,0,VARCMP_GT,VARCMP_EQ,VARCMP_EQ,VARCMP_GT); - VARCMPEX(BSTR,bstr0,I4,-666,VARCMP_GT,VARCMP_LT,VARCMP_GT,VARCMP_GT); - VARCMP(BSTR,bstr1,I4,0,VARCMP_GT); - VARCMPEX(BSTR,bstr1,I4,1,VARCMP_GT,VARCMP_EQ,VARCMP_EQ,VARCMP_GT); - VARCMPEX(BSTR,bstr1,I4,I4_MAX,VARCMP_GT,VARCMP_LT,VARCMP_LT,VARCMP_GT); - VARCMPEX(BSTR,bstr1,I4,-1,VARCMP_GT,VARCMP_LT,VARCMP_GT,VARCMP_GT); - VARCMP(BSTR,bstr7,I4,1,VARCMP_GT); - VARCMPEX(BSTR,bstr7,I4,7,VARCMP_GT,VARCMP_EQ,VARCMP_EQ,VARCMP_GT); - VARCMPEX(BSTR,bstr7,I4,42,VARCMP_GT,VARCMP_GT,VARCMP_LT,VARCMP_GT); - VARCMPEX(BSTR,bstr42,I4,7,VARCMP_GT,VARCMP_LT,VARCMP_GT,VARCMP_GT); - VARCMPEX(BSTR,bstr42,I4,42,VARCMP_GT,VARCMP_EQ,VARCMP_EQ,VARCMP_GT); - VARCMPEX(BSTR,bstr42,I4,I4_MAX,VARCMP_GT,VARCMP_GT,VARCMP_LT,VARCMP_GT); - VARCMPEX(BSTR,bstr1neg,I4,1,VARCMP_GT,VARCMP_GT,VARCMP_LT,VARCMP_LT); - VARCMPEX(BSTR,bstr1neg,I4,42,VARCMP_GT,VARCMP_LT,VARCMP_LT,VARCMP_LT); - VARCMPEX(BSTR,bstr1neg,I4,-1,VARCMP_GT,VARCMP_EQ,VARCMP_EQ,VARCMP_LT); - VARCMPEX(BSTR,bstr1neg,I4,-666,VARCMP_GT,VARCMP_LT,VARCMP_GT,VARCMP_LT); - VARCMPEX(BSTR,bstr666neg,I4,1,VARCMP_GT,VARCMP_GT,VARCMP_LT,VARCMP_LT); - VARCMPEX(BSTR,bstr666neg,I4,7,VARCMP_GT,VARCMP_LT,VARCMP_LT,VARCMP_LT); - VARCMPEX(BSTR,bstr666neg,I4,42,VARCMP_GT,VARCMP_GT,VARCMP_LT,VARCMP_LT); - VARCMPEX(BSTR,bstr666neg,I4,I4_MAX,VARCMP_GT,VARCMP_GT,VARCMP_LT,VARCMP_LT); - VARCMPEX(BSTR,bstr666neg,I4,-1,VARCMP_GT,VARCMP_GT,VARCMP_LT,VARCMP_LT); - VARCMPEX(BSTR,bstr666neg,I4,-666,VARCMP_GT,VARCMP_EQ,VARCMP_EQ,VARCMP_LT); - VARCMPEX(BSTR,bstr7,R8,7.0,VARCMP_GT,VARCMP_EQ,VARCMP_EQ,VARCMP_GT); - VARCMPEX(R8,3.141592,BSTR,NULL,VARCMP_LT,VARCMP_LT,VARCMP_GT,VARCMP_LT); - VARCMP(BSTR,bstr7,BSTR,bstr7,VARCMP_EQ); - VARCMP(BSTR,bstr7,BSTR,bstr42,VARCMP_GT); - VARCMP(BSTR,bstr42,BSTR,bstr7,VARCMP_LT); - - /* DECIMAL handling */ - setdec(&dec,0,0,0,0); - VARCMPEX(DECIMAL,dec,BSTR,bstr0,VARCMP_LT,VARCMP_EQ,VARCMP_EQ,VARCMP_LT); - setdec64(&dec,0,0,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF); /* max DECIMAL */ - VARCMP(DECIMAL,dec,R8,R8_MAX,VARCMP_LT); /* R8 has bigger range */ - VARCMP(DECIMAL,dec,DATE,R8_MAX,VARCMP_LT); /* DATE has bigger range */ - setdec64(&dec,0,0x80,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF); - VARCMP(DECIMAL,dec,R8,-R8_MAX,VARCMP_GT); - setdec64(&dec,20,0,0x5,0x6BC75E2D,0x63100001); /* 1+1e-20 */ - VARCMP(DECIMAL,dec,R8,1,VARCMP_GT); /* DECIMAL has higher precision */ - - /* Show that DATE is handled just as a R8 */ - VARCMP(DATE,DATE_MAX,DATE,DATE_MAX+1,VARCMP_LT); - VARCMP(DATE,DATE_MIN,DATE,DATE_MIN-1,VARCMP_GT); - VARCMP(DATE,R8_MIN,R8,R8_MIN,VARCMP_EQ); - VARCMP(DATE,1,DATE,1+1e-15,VARCMP_LT); /* 1e-15 == 8.64e-11 seconds */ - VARCMP(DATE,25570.0,DATE,25570.0,VARCMP_EQ); - VARCMP(DATE,25570.0,DATE,25571.0,VARCMP_LT); - VARCMP(DATE,25571.0,DATE,25570.0,VARCMP_GT); - VARCMP(DATE,25570.0,EMPTY,0,VARCMP_GT); - VARCMP(DATE,25570.0,NULL_,0,VARCMP_NULL); - - /* R4 precision handling */ - VARCMP(R4,1,R8,1+1e-8,VARCMP_EQ); - VARCMP(R8,1+1e-8,R4,1,VARCMP_EQ); - VARCMP(R8,1+1e-8,R8,1,VARCMP_GT); - VARCMP(R8,R4_MAX*1.1,R4,R4_MAX,VARCMP_GT); - VARCMP(R4,R4_MAX,R8,R8_MAX,VARCMP_LT); - VARCMP(R4,1,DATE,1+1e-8,VARCMP_EQ); - VARCMP(R4,1,BSTR,bstr1few,VARCMP_LT); /* bstr1few == 1+1e-8 */ - setdec(&dec,8,0,0,0x5F5E101); /* 1+1e-8 */ - VARCMP(R4,1,DECIMAL,dec,VARCMP_LT); - - SysFreeString(bstrhuh); - SysFreeString(bstrempty); - SysFreeString(bstr0); - SysFreeString(bstr1); - SysFreeString(bstr7); - SysFreeString(bstr42); - SysFreeString(bstr1neg); - SysFreeString(bstr666neg); - SysFreeString(bstr2cents); - SysFreeString(bstr1few); -} - -static HRESULT (WINAPI *pVarPow)(LPVARIANT,LPVARIANT,LPVARIANT); - -#define VARPOW(vt1,val1,vt2,val2,rvt,rval) \ - V_VT(&left) = VT_##vt1; V_##vt1(&left) = val1; \ - V_VT(&right) = VT_##vt2; V_##vt2(&right) = val2; \ - V_VT(&exp) = VT_##rvt; V_##rvt(&exp) = rval; \ - test_var_call2( __LINE__, pVarPow, &left, &right, &exp ) - -/* Skip any type that is not defined or produces an error for every case */ -#define SKIPTESTPOW(a) \ - if (a == VT_ERROR || a == VT_VARIANT || \ - a == VT_DISPATCH || a == VT_UNKNOWN || \ - a == VT_RECORD || a > VT_UINT || \ - a == 15 /*not defined*/) \ - continue - -static void test_VarPow(void) -{ - static const WCHAR str2[] = { '2','\0' }; - static const WCHAR str3[] = { '3','\0' }; - VARIANT left, right, exp, result, cy, dec; - BSTR num2_str, num3_str; - VARTYPE i; - HRESULT hres; - - CHECKPTR(VarPow); - - num2_str = SysAllocString(str2); - num3_str = SysAllocString(str3); - - /* Test all possible flag/vt combinations & the resulting vt type */ - for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]); i++) - { - VARTYPE leftvt, rightvt, resvt; - - for (leftvt = 0; leftvt <= VT_BSTR_BLOB; leftvt++) - { - SKIPTESTPOW(leftvt); - - for (rightvt = 0; rightvt <= VT_BSTR_BLOB; rightvt++) - { - BOOL bFail = FALSE; - SKIPTESTPOW(rightvt); - - /* Native crashes with VT_BYREF */ - if (ExtraFlags[i] == VT_BYREF) - continue; - - memset(&left, 0, sizeof(left)); - memset(&right, 0, sizeof(right)); - V_VT(&left) = leftvt | ExtraFlags[i]; - V_VT(&right) = rightvt | ExtraFlags[i]; - V_VT(&result) = VT_EMPTY; - resvt = VT_EMPTY; - - if (leftvt == VT_BSTR) - V_BSTR(&left) = num2_str; - if (rightvt == VT_BSTR) - V_BSTR(&right) = num2_str; - - /* Native VarPow always returns an error when using extra flags */ - if (ExtraFlags[i] != 0) - bFail = TRUE; - - /* Determine return type */ - else if ((leftvt == VT_NULL || rightvt == VT_NULL) && - ((leftvt != VT_I8 && leftvt != VT_UI8 && - rightvt != VT_I8 && rightvt != VT_UI8) || HAVE_OLEAUT32_I8)) - resvt = VT_NULL; - else if ((leftvt == VT_EMPTY || leftvt == VT_I2 || - leftvt == VT_I4 || leftvt == VT_R4 || - leftvt == VT_R8 || leftvt == VT_CY || - leftvt == VT_DATE || leftvt == VT_BSTR || - leftvt == VT_BOOL || leftvt == VT_DECIMAL || - (leftvt >= VT_I1 && leftvt <= VT_UI4) || - (HAVE_OLEAUT32_I8 && (leftvt == VT_I8 || leftvt == VT_UI8)) || - leftvt == VT_INT || leftvt == VT_UINT) && - (rightvt == VT_EMPTY || rightvt == VT_I2 || - rightvt == VT_I4 || rightvt == VT_R4 || - rightvt == VT_R8 || rightvt == VT_CY || - rightvt == VT_DATE || rightvt == VT_BSTR || - rightvt == VT_BOOL || rightvt == VT_DECIMAL || - (rightvt >= VT_I1 && rightvt <= VT_UI4) || - (HAVE_OLEAUT32_I8 && (rightvt == VT_I8 || rightvt == VT_UI8)) || - rightvt == VT_INT || rightvt == VT_UINT)) - resvt = VT_R8; - else - bFail = TRUE; - - hres = pVarPow(&left, &right, &result); - - /* Check expected HRESULT and if result variant type is correct */ - if (bFail) - ok (hres == DISP_E_BADVARTYPE || hres == DISP_E_TYPEMISMATCH, - "VarPow: %s|0x%X, %s|0x%X: got vt %s hr 0x%X\n", - vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], - vtstr(V_VT(&result)), hres); - else - ok (hres == S_OK && resvt == V_VT(&result), - "VarPow: %s|0x%X, %s|0x%X: expected vt %s hr 0x%X, got vt %s hr 0x%X\n", - vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], vtstr(resvt), - S_OK, vtstr(V_VT(&result)), hres); - } - } - } - - /* Check return values for valid variant type combinations */ - VARPOW(EMPTY,0,EMPTY,0,R8,1.0); - VARPOW(EMPTY,0,NULL,0,NULL,0); - VARPOW(EMPTY,0,I2,3,R8,0.0); - VARPOW(EMPTY,0,I4,3,R8,0.0); - VARPOW(EMPTY,0,R4,3.0f,R8,0.0); - VARPOW(EMPTY,0,R8,3.0,R8,0.0); - VARPOW(EMPTY,0,DATE,3,R8,0.0); - VARPOW(EMPTY,0,BSTR,num3_str,R8,0.0); - VARPOW(EMPTY,0,BOOL,VARIANT_FALSE,R8,1.0); - VARPOW(EMPTY,0,I1,3,R8,0.0); - VARPOW(EMPTY,0,UI1,3,R8,0.0); - VARPOW(EMPTY,0,UI2,3,R8,0.0); - VARPOW(EMPTY,0,UI4,3,R8,0.0); - if (HAVE_OLEAUT32_I8) - { - VARPOW(EMPTY,0,I8,3,R8,0.0); - VARPOW(EMPTY,0,UI8,3,R8,0.0); - } - VARPOW(EMPTY,0,INT,3,R8,0.0); - VARPOW(EMPTY,0,UINT,3,R8,0.0); - VARPOW(NULL,0,EMPTY,0,NULL,0); - VARPOW(NULL,0,NULL,0,NULL,0); - VARPOW(NULL,0,I2,3,NULL,0); - VARPOW(NULL,0,I4,3,NULL,0); - VARPOW(NULL,0,R4,3.0f,NULL,0); - VARPOW(NULL,0,R8,3.0,NULL,0); - VARPOW(NULL,0,DATE,3,NULL,0); - VARPOW(NULL,0,BSTR,num3_str,NULL,0); - VARPOW(NULL,0,BOOL,VARIANT_TRUE,NULL,0); - VARPOW(NULL,0,I1,3,NULL,0); - VARPOW(NULL,0,UI1,3,NULL,0); - VARPOW(NULL,0,UI2,3,NULL,0); - VARPOW(NULL,0,UI4,3,NULL,0); - if (HAVE_OLEAUT32_I8) - { - VARPOW(NULL,0,I8,3,NULL,0); - VARPOW(NULL,0,UI8,3,NULL,0); - } - VARPOW(NULL,0,INT,3,NULL,0); - VARPOW(NULL,0,UINT,3,NULL,0); - VARPOW(I2,2,EMPTY,0,R8,1.0); - VARPOW(I2,2,NULL,0,NULL,0); - VARPOW(I2,2,I2,3,R8,8.0); - VARPOW(I2,2,I4,3,R8,8.0); - VARPOW(I2,2,R4,3.0f,R8,8.0); - VARPOW(I2,2,R8,3.0,R8,8.0); - VARPOW(I2,2,DATE,3,R8,8.0); - VARPOW(I2,2,BSTR,num3_str,R8,8.0); - VARPOW(I2,2,BOOL,VARIANT_FALSE,R8,1.0); - VARPOW(I2,2,I1,3,R8,8.0); - VARPOW(I2,2,UI1,3,R8,8.0); - VARPOW(I2,2,UI2,3,R8,8.0); - VARPOW(I2,2,UI4,3,R8,8.0); - if (HAVE_OLEAUT32_I8) - { - VARPOW(I2,2,I8,3,R8,8.0); - VARPOW(I2,2,UI8,3,R8,8.0); - } - VARPOW(I2,2,INT,3,R8,8.0); - VARPOW(I2,2,UINT,3,R8,8.0); - VARPOW(I4,2,EMPTY,0,R8,1.0); - VARPOW(I4,2,NULL,0,NULL,0); - VARPOW(I4,2,I2,3,R8,8.0); - VARPOW(I4,2,I4,3,R8,8.0); - VARPOW(I4,2,R4,3.0f,R8,8.0); - VARPOW(I4,2,R8,3.0,R8,8.0); - VARPOW(I4,2,DATE,3,R8,8.0); - VARPOW(I4,2,BSTR,num3_str,R8,8.0); - VARPOW(I4,2,BOOL,VARIANT_FALSE,R8,1.0); - VARPOW(I4,2,I1,3,R8,8.0); - VARPOW(I4,2,UI1,3,R8,8.0); - VARPOW(I4,2,UI2,3,R8,8.0); - VARPOW(I4,2,UI4,3,R8,8.0); - if (HAVE_OLEAUT32_I8) - { - VARPOW(I4,2,I8,3,R8,8.0); - VARPOW(I4,2,UI8,3,R8,8.0); - } - VARPOW(I4,2,INT,3,R8,8.0); - VARPOW(I4,2,UINT,3,R8,8.0); - VARPOW(R4,2,EMPTY,0,R8,1.0); - VARPOW(R4,2,NULL,0,NULL,0); - VARPOW(R4,2,I2,3,R8,8.0); - VARPOW(R4,2,I4,3,R8,8.0); - VARPOW(R4,2,R4,3.0f,R8,8.0); - VARPOW(R4,2,R8,3.0,R8,8.0); - VARPOW(R4,2,DATE,3,R8,8.0); - VARPOW(R4,2,BSTR,num3_str,R8,8.0); - VARPOW(R4,2,BOOL,VARIANT_FALSE,R8,1.0); - VARPOW(R4,2,I1,3,R8,8.0); - VARPOW(R4,2,UI1,3,R8,8.0); - VARPOW(R4,2,UI2,3,R8,8.0); - VARPOW(R4,2,UI4,3,R8,8.0); - if (HAVE_OLEAUT32_I8) - { - VARPOW(R4,2,I8,3,R8,8.0); - VARPOW(R4,2,UI8,3,R8,8.0); - } - VARPOW(R4,2,INT,3,R8,8.0); - VARPOW(R4,2,UINT,3,R8,8.0); - VARPOW(R8,2,EMPTY,0,R8,1.0); - VARPOW(R8,2,NULL,0,NULL,0); - VARPOW(R8,2,I2,3,R8,8.0); - VARPOW(R8,2,I4,3,R8,8.0); - VARPOW(R8,2,R4,3.0f,R8,8.0); - VARPOW(R8,2,R8,3.0,R8,8.0); - VARPOW(R8,2,DATE,3,R8,8.0); - VARPOW(R8,2,BSTR,num3_str,R8,8.0); - VARPOW(R8,2,BOOL,VARIANT_FALSE,R8,1.0); - VARPOW(R8,2,I1,3,R8,8.0); - VARPOW(R8,2,UI1,3,R8,8.0); - VARPOW(R8,2,UI2,3,R8,8.0); - VARPOW(R8,2,UI4,3,R8,8.0); - if (HAVE_OLEAUT32_I8) - { - VARPOW(R8,2,I8,3,R8,8.0); - VARPOW(R8,2,UI8,3,R8,8.0); - } - VARPOW(R8,2,INT,3,R8,8.0); - VARPOW(R8,2,UINT,3,R8,8.0); - VARPOW(DATE,2,EMPTY,0,R8,1.0); - VARPOW(DATE,2,NULL,0,NULL,0); - VARPOW(DATE,2,I2,3,R8,8.0); - VARPOW(DATE,2,I4,3,R8,8.0); - VARPOW(DATE,2,R4,3.0f,R8,8.0); - VARPOW(DATE,2,R8,3.0,R8,8.0); - VARPOW(DATE,2,DATE,3,R8,8.0); - VARPOW(DATE,2,BSTR,num3_str,R8,8.0); - VARPOW(DATE,2,BOOL,VARIANT_FALSE,R8,1.0); - VARPOW(DATE,2,I1,3,R8,8.0); - VARPOW(DATE,2,UI1,3,R8,8.0); - VARPOW(DATE,2,UI2,3,R8,8.0); - VARPOW(DATE,2,UI4,3,R8,8.0); - if (HAVE_OLEAUT32_I8) - { - VARPOW(DATE,2,I8,3,R8,8.0); - VARPOW(DATE,2,UI8,3,R8,8.0); - } - VARPOW(DATE,2,INT,3,R8,8.0); - VARPOW(DATE,2,UINT,3,R8,8.0); - VARPOW(BSTR,num2_str,EMPTY,0,R8,1.0); - VARPOW(BSTR,num2_str,NULL,0,NULL,0); - VARPOW(BSTR,num2_str,I2,3,R8,8.0); - VARPOW(BSTR,num2_str,I4,3,R8,8.0); - VARPOW(BSTR,num2_str,R4,3.0f,R8,8.0); - VARPOW(BSTR,num2_str,R8,3.0,R8,8.0); - VARPOW(BSTR,num2_str,DATE,3,R8,8.0); - VARPOW(BSTR,num2_str,BSTR,num3_str,R8,8.0); - VARPOW(BSTR,num2_str,BOOL,VARIANT_FALSE,R8,1.0); - VARPOW(BSTR,num2_str,I1,3,R8,8.0); - VARPOW(BSTR,num2_str,UI1,3,R8,8.0); - VARPOW(BSTR,num2_str,UI2,3,R8,8.0); - VARPOW(BSTR,num2_str,UI4,3,R8,8.0); - if (HAVE_OLEAUT32_I8) - { - VARPOW(BSTR,num2_str,I8,3,R8,8.0); - VARPOW(BSTR,num2_str,UI8,3,R8,8.0); - } - VARPOW(BSTR,num2_str,INT,3,R8,8.0); - VARPOW(BSTR,num2_str,UINT,3,R8,8.0); - VARPOW(BOOL,VARIANT_TRUE,EMPTY,0,R8,1.0); - VARPOW(BOOL,VARIANT_TRUE,NULL,0,NULL,0); - VARPOW(BOOL,VARIANT_TRUE,I2,3,R8,-1.0); - VARPOW(BOOL,VARIANT_TRUE,I4,3,R8,-1.0); - VARPOW(BOOL,VARIANT_TRUE,R4,3.0f,R8,-1.0); - VARPOW(BOOL,VARIANT_TRUE,R8,3.0,R8,-1.0); - VARPOW(BOOL,VARIANT_TRUE,DATE,3,R8,-1.0); - VARPOW(BOOL,VARIANT_TRUE,BSTR,num3_str,R8,-1.0); - VARPOW(BOOL,VARIANT_TRUE,BOOL,VARIANT_TRUE,R8,-1.0); - VARPOW(BOOL,VARIANT_TRUE,I1,3,R8,-1.0); - VARPOW(BOOL,VARIANT_TRUE,UI1,3,R8,-1.0); - VARPOW(BOOL,VARIANT_TRUE,UI2,3,R8,-1.0); - VARPOW(BOOL,VARIANT_TRUE,UI4,3,R8,-1.0); - if (HAVE_OLEAUT32_I8) - { - VARPOW(BOOL,VARIANT_TRUE,I8,3,R8,-1.0); - VARPOW(BOOL,VARIANT_TRUE,UI8,3,R8,-1.0); - } - VARPOW(BOOL,VARIANT_TRUE,INT,3,R8,-1.0); - VARPOW(BOOL,VARIANT_TRUE,UINT,3,R8,-1.0); - VARPOW(I1,2,EMPTY,0,R8,1.0); - VARPOW(I1,2,NULL,0,NULL,0); - VARPOW(I1,2,I2,3,R8,8.0); - VARPOW(I1,2,I4,3,R8,8.0); - VARPOW(I1,2,R4,3.0f,R8,8.0); - VARPOW(I1,2,R8,3.0,R8,8.0); - VARPOW(I1,2,DATE,3,R8,8.0); - VARPOW(I1,2,BSTR,num3_str,R8,8.0); - VARPOW(I1,2,BOOL,VARIANT_FALSE,R8,1.0); - VARPOW(I1,2,I1,3,R8,8.0); - VARPOW(I1,2,UI1,3,R8,8.0); - VARPOW(I1,2,UI2,3,R8,8.0); - VARPOW(I1,2,UI4,3,R8,8.0); - if (HAVE_OLEAUT32_I8) - { - VARPOW(I1,2,I8,3,R8,8.0); - VARPOW(I1,2,UI8,3,R8,8.0); - } - VARPOW(I1,2,INT,3,R8,8.0); - VARPOW(I1,2,UINT,3,R8,8.0); - VARPOW(UI1,2,EMPTY,0,R8,1.0); - VARPOW(UI1,2,NULL,0,NULL,0); - VARPOW(UI1,2,I2,3,R8,8.0); - VARPOW(UI1,2,I4,3,R8,8.0); - VARPOW(UI1,2,R4,3.0f,R8,8.0); - VARPOW(UI1,2,R8,3.0,R8,8.0); - VARPOW(UI1,2,DATE,3,R8,8.0); - VARPOW(UI1,2,BSTR,num3_str,R8,8.0); - VARPOW(UI1,2,BOOL,VARIANT_FALSE,R8,1.0); - VARPOW(UI1,2,I1,3,R8,8.0); - VARPOW(UI1,2,UI1,3,R8,8.0); - VARPOW(UI1,2,UI2,3,R8,8.0); - VARPOW(UI1,2,UI4,3,R8,8.0); - if (HAVE_OLEAUT32_I8) - { - VARPOW(UI1,2,I8,3,R8,8.0); - VARPOW(UI1,2,UI8,3,R8,8.0); - } - VARPOW(UI1,2,INT,3,R8,8.0); - VARPOW(UI1,2,UINT,3,R8,8.0); - VARPOW(UI2,2,EMPTY,0,R8,1.0); - VARPOW(UI2,2,NULL,0,NULL,0); - VARPOW(UI2,2,I2,3,R8,8.0); - VARPOW(UI2,2,I4,3,R8,8.0); - VARPOW(UI2,2,R4,3.0f,R8,8.0); - VARPOW(UI2,2,R8,3.0,R8,8.0); - VARPOW(UI2,2,DATE,3,R8,8.0); - VARPOW(UI2,2,BSTR,num3_str,R8,8.0); - VARPOW(UI2,2,BOOL,VARIANT_FALSE,R8,1.0); - VARPOW(UI2,2,I1,3,R8,8.0); - VARPOW(UI2,2,UI1,3,R8,8.0); - VARPOW(UI2,2,UI2,3,R8,8.0); - VARPOW(UI2,2,UI4,3,R8,8.0); - if (HAVE_OLEAUT32_I8) - { - VARPOW(UI2,2,I8,3,R8,8.0); - VARPOW(UI2,2,UI8,3,R8,8.0); - } - VARPOW(UI2,2,INT,3,R8,8.0); - VARPOW(UI2,2,UINT,3,R8,8.0); - VARPOW(UI4,2,EMPTY,0,R8,1.0); - VARPOW(UI4,2,NULL,0,NULL,0); - VARPOW(UI4,2,I2,3,R8,8.0); - VARPOW(UI4,2,I4,3,R8,8.0); - VARPOW(UI4,2,R4,3.0f,R8,8.0); - VARPOW(UI4,2,R8,3.0,R8,8.0); - VARPOW(UI4,2,DATE,3,R8,8.0); - VARPOW(UI4,2,BSTR,num3_str,R8,8.0); - VARPOW(UI4,2,BOOL,VARIANT_FALSE,R8,1.0); - VARPOW(UI4,2,I1,3,R8,8.0); - VARPOW(UI4,2,UI1,3,R8,8.0); - VARPOW(UI4,2,UI2,3,R8,8.0); - VARPOW(UI4,2,UI4,3,R8,8.0); - if (HAVE_OLEAUT32_I8) - { - VARPOW(UI4,2,I8,3,R8,8.0); - VARPOW(UI4,2,UI8,3,R8,8.0); - } - VARPOW(UI4,2,INT,3,R8,8.0); - VARPOW(UI4,2,UINT,3,R8,8.0); - if (HAVE_OLEAUT32_I8) - { - VARPOW(I8,2,EMPTY,0,R8,1.0); - VARPOW(I8,2,NULL,0,NULL,0); - VARPOW(I8,2,I2,3,R8,8.0); - VARPOW(I8,2,I4,3,R8,8.0); - VARPOW(I8,2,R4,3.0f,R8,8.0); - VARPOW(I8,2,R8,3.0,R8,8.0); - VARPOW(I8,2,DATE,3,R8,8.0); - VARPOW(I8,2,BSTR,num3_str,R8,8.0); - VARPOW(I8,2,BOOL,VARIANT_FALSE,R8,1.0); - VARPOW(I8,2,I1,3,R8,8.0); - VARPOW(I8,2,UI1,3,R8,8.0); - VARPOW(I8,2,UI2,3,R8,8.0); - VARPOW(I8,2,UI4,3,R8,8.0); - VARPOW(I8,2,I8,3,R8,8.0); - VARPOW(I8,2,UI8,3,R8,8.0); - VARPOW(I8,2,INT,3,R8,8.0); - VARPOW(I8,2,UINT,3,R8,8.0); - VARPOW(UI8,2,EMPTY,0,R8,1.0); - VARPOW(UI8,2,NULL,0,NULL,0); - VARPOW(UI8,2,I2,3,R8,8.0); - VARPOW(UI8,2,I4,3,R8,8.0); - VARPOW(UI8,2,R4,3.0f,R8,8.0); - VARPOW(UI8,2,R8,3.0,R8,8.0); - VARPOW(UI8,2,DATE,3,R8,8.0); - VARPOW(UI8,2,BSTR,num3_str,R8,8.0); - VARPOW(UI8,2,I1,3,R8,8.0); - VARPOW(UI8,2,UI1,3,R8,8.0); - VARPOW(UI8,2,UI2,3,R8,8.0); - VARPOW(UI8,2,UI4,3,R8,8.0); - VARPOW(UI8,2,I8,3,R8,8.0); - VARPOW(UI8,2,UI8,3,R8,8.0); - VARPOW(UI8,2,INT,3,R8,8.0); - VARPOW(UI8,2,UINT,3,R8,8.0); - } - VARPOW(INT,2,EMPTY,0,R8,1.0); - VARPOW(INT,2,NULL,0,NULL,0); - VARPOW(INT,2,I2,3,R8,8.0); - VARPOW(INT,2,I4,3,R8,8.0); - VARPOW(INT,2,R4,3.0f,R8,8.0); - VARPOW(INT,2,R8,3.0,R8,8.0); - VARPOW(INT,2,DATE,3,R8,8.0); - VARPOW(INT,2,BSTR,num3_str,R8,8.0); - VARPOW(INT,2,BOOL,VARIANT_FALSE,R8,1.0); - VARPOW(INT,2,I1,3,R8,8.0); - VARPOW(INT,2,UI1,3,R8,8.0); - VARPOW(INT,2,UI2,3,R8,8.0); - VARPOW(INT,2,UI4,3,R8,8.0); - if (HAVE_OLEAUT32_I8) - { - VARPOW(INT,2,I8,3,R8,8.0); - VARPOW(INT,2,UI8,3,R8,8.0); - } - VARPOW(INT,2,INT,3,R8,8.0); - VARPOW(INT,2,UINT,3,R8,8.0); - VARPOW(UINT,2,EMPTY,0,R8,1.0); - VARPOW(UINT,2,NULL,0,NULL,0); - VARPOW(UINT,2,I2,3,R8,8.0); - VARPOW(UINT,2,I4,3,R8,8.0); - VARPOW(UINT,2,R4,3.0f,R8,8.0); - VARPOW(UINT,2,R8,3.0,R8,8.0); - VARPOW(UINT,2,DATE,3,R8,8.0); - VARPOW(UINT,2,BSTR,num3_str,R8,8.0); - VARPOW(UINT,2,BOOL,VARIANT_FALSE,R8,1.0); - VARPOW(UINT,2,I1,3,R8,8.0); - VARPOW(UINT,2,UI1,3,R8,8.0); - VARPOW(UINT,2,UI2,3,R8,8.0); - VARPOW(UINT,2,UI4,3,R8,8.0); - if (HAVE_OLEAUT32_I8) - { - VARPOW(UINT,2,I8,3,R8,8.0); - VARPOW(UINT,2,UI8,3,R8,8.0); - } - VARPOW(UINT,2,INT,3,R8,8.0); - VARPOW(UINT,2,UINT,3,R8,8.0); - - /* Manually test some VT_CY, VT_DECIMAL variants */ - V_VT(&cy) = VT_CY; - hres = VarCyFromI4(2, &V_CY(&cy)); - ok(hres == S_OK, "VarCyFromI4 failed!\n"); - V_VT(&dec) = VT_DECIMAL; - hres = VarDecFromR8(2.0, &V_DECIMAL(&dec)); - ok(hres == S_OK, "VarDecFromR4 failed!\n"); - memset(&left, 0, sizeof(left)); - memset(&right, 0, sizeof(right)); - V_VT(&left) = VT_I4; - V_I4(&left) = 100; - V_VT(&right) = VT_I8; - V_UI1(&right) = 2; - - hres = pVarPow(&cy, &cy, &result); - ok(hres == S_OK && V_VT(&result) == VT_R8, - "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", - S_OK, hres, vtstr(V_VT(&result))); - ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 4.0), - "VARPOW: CY value %f, expected %f\n", V_R8(&result), 4.0); - - hres = pVarPow(&cy, &right, &result); - if (hres == S_OK) - { - ok(hres == S_OK && V_VT(&result) == VT_R8, - "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", - S_OK, hres, vtstr(V_VT(&result))); - ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 4.0), - "VARPOW: CY value %f, expected %f\n", V_R8(&result), 4.0); - } - else - { - ok(hres == DISP_E_BADVARTYPE && V_VT(&result) == VT_EMPTY, - "VARPOW: expected coerced hres 0x%X type VT_EMPTY, got hres 0x%X type %s!\n", - DISP_E_BADVARTYPE, hres, vtstr(V_VT(&result))); - } - - hres = pVarPow(&left, &cy, &result); - ok(hres == S_OK && V_VT(&result) == VT_R8, - "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", - S_OK, hres, vtstr(V_VT(&result))); - ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 10000.0), - "VARPOW: CY value %f, expected %f\n", V_R8(&result), 10000.0); - - hres = pVarPow(&left, &dec, &result); - ok(hres == S_OK && V_VT(&result) == VT_R8, - "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", - S_OK, hres, vtstr(V_VT(&result))); - ok(hres == S_OK && EQ_DOUBLE(V_R8(&result),10000.0), - "VARPOW: DECIMAL value %f, expected %f\n", V_R8(&result), 10000.0); - - hres = pVarPow(&dec, &dec, &result); - ok(hres == S_OK && V_VT(&result) == VT_R8, - "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", - S_OK, hres, vtstr(V_VT(&result))); - ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 4.0), - "VARPOW: DECIMAL value %f, expected %f\n", V_R8(&result), 4.0); - - hres = pVarPow(&dec, &right, &result); - if (hres == S_OK) - { - ok(hres == S_OK && V_VT(&result) == VT_R8, - "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", - S_OK, hres, vtstr(V_VT(&result))); - ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 4.0), - "VARPOW: DECIMAL value %f, expected %f\n", V_R8(&result), 4.0); - } - else - { - ok(hres == DISP_E_BADVARTYPE && V_VT(&result) == VT_EMPTY, - "VARPOW: expected coerced hres 0x%X type VT_EMPTY, got hres 0x%X type %s!\n", - DISP_E_BADVARTYPE, hres, vtstr(V_VT(&result))); - } - - SysFreeString(num2_str); - SysFreeString(num3_str); -} - -static HRESULT (WINAPI *pVarDiv)(LPVARIANT,LPVARIANT,LPVARIANT); - -#define VARDIV(vt1,val1,vt2,val2,rvt,rval) \ - V_VT(&left) = VT_##vt1; V_##vt1(&left) = val1; \ - V_VT(&right) = VT_##vt2; V_##vt2(&right) = val2; \ - V_VT(&exp) = VT_##rvt; V_##rvt(&exp) = rval; \ - test_var_call2( __LINE__, pVarDiv, &left, &right, &exp ) - -/* Skip any type that is not defined or produces an error for every case */ -#define SKIPTESTDIV(a) \ - if (a == VT_ERROR || a == VT_VARIANT || \ - a == VT_DISPATCH || a == VT_UNKNOWN || \ - a == VT_RECORD || a > VT_UINT || \ - a == VT_I1 || a == VT_UI8 || \ - a == VT_INT || a == VT_UINT || \ - a == VT_UI2 || a == VT_UI4 || \ - a == 15 /*not defined*/) \ - continue - -static void test_VarDiv(void) -{ - static const WCHAR str1[] = { '1','\0' }; - static const WCHAR str2[] = { '2','\0' }; - VARIANT left, right, exp, result, cy, dec; - BSTR num1_str, num2_str; - VARTYPE i; - HRESULT hres; - double r; - - num1_str = SysAllocString(str1); - num2_str = SysAllocString(str2); - - CHECKPTR(VarDiv); - - /* Test all possible flag/vt combinations & the resulting vt type */ - for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]); i++) - { - VARTYPE leftvt, rightvt, resvt; - - for (leftvt = 0; leftvt <= VT_BSTR_BLOB; leftvt++) - { - SKIPTESTDIV(leftvt); - - /* Check if we need/have support for I8 */ - if (leftvt == VT_I8 && !HAVE_OLEAUT32_I8) - continue; - - for (rightvt = 0; rightvt <= VT_BSTR_BLOB; rightvt++) - { - BOOL bFail = FALSE; - SKIPTESTDIV(rightvt); - - /* Check if we need/have support for I8 */ - if (rightvt == VT_I8 && !HAVE_OLEAUT32_I8) - continue; - - /* Native crashes with VT_BYREF */ - if (ExtraFlags[i] == VT_BYREF) - continue; - - memset(&left, 0, sizeof(left)); - memset(&right, 0, sizeof(right)); - V_VT(&left) = leftvt | ExtraFlags[i]; - V_VT(&right) = rightvt | ExtraFlags[i]; - V_VT(&result) = VT_EMPTY; - resvt = VT_EMPTY; - - if (leftvt == VT_BSTR) - V_BSTR(&left) = num2_str; - else if (leftvt == VT_DECIMAL) - { - VarDecFromR8(2.0, &V_DECIMAL(&left)); - V_VT(&left) = leftvt | ExtraFlags[i]; - } - - /* Division by 0 is undefined */ - switch(rightvt) - { - case VT_BSTR: - V_BSTR(&right) = num2_str; - break; - case VT_DECIMAL: - VarDecFromR8(2.0, &V_DECIMAL(&right)); - V_VT(&right) = rightvt | ExtraFlags[i]; - break; - case VT_BOOL: - V_BOOL(&right) = VARIANT_TRUE; - break; - case VT_I2: V_I2(&right) = 2; break; - case VT_I4: V_I4(&right) = 2; break; - case VT_R4: V_R4(&right) = 2.0f; break; - case VT_R8: V_R8(&right) = 2.0; break; - case VT_CY: V_CY(&right).int64 = 2; break; - case VT_DATE: V_DATE(&right) = 2; break; - case VT_UI1: V_UI1(&right) = 2; break; - case VT_I8: V_I8(&right) = 2; break; - default: break; - } - - /* Determine return type */ - if (!(rightvt == VT_EMPTY)) - { - if (leftvt == VT_NULL || rightvt == VT_NULL) - resvt = VT_NULL; - else if (leftvt == VT_DECIMAL || rightvt == VT_DECIMAL) - resvt = VT_DECIMAL; - else if (leftvt == VT_I8 || rightvt == VT_I8 || - leftvt == VT_CY || rightvt == VT_CY || - leftvt == VT_DATE || rightvt == VT_DATE || - leftvt == VT_I4 || rightvt == VT_I4 || - leftvt == VT_BSTR || rightvt == VT_BSTR || - leftvt == VT_I2 || rightvt == VT_I2 || - leftvt == VT_BOOL || rightvt == VT_BOOL || - leftvt == VT_R8 || rightvt == VT_R8 || - leftvt == VT_UI1 || rightvt == VT_UI1) - { - if ((leftvt == VT_UI1 && rightvt == VT_R4) || - (leftvt == VT_R4 && rightvt == VT_UI1)) - resvt = VT_R4; - else if ((leftvt == VT_R4 && (rightvt == VT_BOOL || - rightvt == VT_I2)) || (rightvt == VT_R4 && - (leftvt == VT_BOOL || leftvt == VT_I2))) - resvt = VT_R4; - else - resvt = VT_R8; - } - else if (leftvt == VT_R4 || rightvt == VT_R4) - resvt = VT_R4; - } - else if (leftvt == VT_NULL && rightvt == VT_EMPTY) - resvt = VT_NULL; - else - bFail = TRUE; - - /* Native VarDiv always returns an error when using extra flags */ - if (ExtraFlags[i] != 0) - bFail = TRUE; - - hres = pVarDiv(&left, &right, &result); - - /* Check expected HRESULT and if result variant type is correct */ - if (bFail) - ok (hres == DISP_E_BADVARTYPE || hres == DISP_E_TYPEMISMATCH || - hres == DISP_E_OVERFLOW || hres == DISP_E_DIVBYZERO, - "VarDiv: %s|0x%X, %s|0x%X: got vt %s hr 0x%X\n", - vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], - vtstr(V_VT(&result)), hres); - else - ok (hres == S_OK && resvt == V_VT(&result), - "VarDiv: %s|0x%X, %s|0x%X: expected vt %s hr 0x%X, got vt %s hr 0x%X\n", - vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], vtstr(resvt), - S_OK, vtstr(V_VT(&result)), hres); - } - } - } - - /* Test return values for all the good cases */ - VARDIV(EMPTY,0,NULL,0,NULL,0); - VARDIV(EMPTY,0,I2,2,R8,0.0); - VARDIV(EMPTY,0,I4,2,R8,0.0); - VARDIV(EMPTY,0,R4,2.0f,R4,0.0f); - VARDIV(EMPTY,0,R8,2.0,R8,0.0); - VARDIV(EMPTY,0,DATE,2.0,R8,0.0); - VARDIV(EMPTY,0,BSTR,num2_str,R8,0.0); - VARDIV(EMPTY,0,BOOL,VARIANT_TRUE,R8,0.0); - VARDIV(EMPTY,0,UI1,2,R8,0.0); - if (HAVE_OLEAUT32_I8) - { - VARDIV(EMPTY,0,I8,2,R8,0.0); - } - VARDIV(NULL,0,EMPTY,0,NULL,0); - VARDIV(NULL,0,NULL,0,NULL,0); - VARDIV(NULL,0,I2,2,NULL,0); - VARDIV(NULL,0,I4,2,NULL,0); - VARDIV(NULL,0,R4,2.0f,NULL,0); - VARDIV(NULL,0,R8,2.0,NULL,0); - VARDIV(NULL,0,DATE,2,NULL,0); - VARDIV(NULL,0,BSTR,num2_str,NULL,0); - VARDIV(NULL,0,BOOL,VARIANT_TRUE,NULL,0); - VARDIV(NULL,0,UI1,2,NULL,0); - if (HAVE_OLEAUT32_I8) - { - VARDIV(NULL,0,I8,2,NULL,0); - } - VARDIV(I2,2,NULL,0,NULL,0); - VARDIV(I2,1,I2,2,R8,0.5); - VARDIV(I2,1,I4,2,R8,0.5); - VARDIV(I2,1,R4,2,R4,0.5f); - VARDIV(I2,1,R8,2.0,R8,0.5); - VARDIV(I2,1,DATE,2,R8,0.5); - VARDIV(I2,1,BOOL,VARIANT_TRUE,R8,-1.0); - VARDIV(I2,1,UI1,2,R8,0.5); - if (HAVE_OLEAUT32_I8) - { - VARDIV(I2,1,I8,2,R8,0.5); - } - VARDIV(I4,1,NULL,0,NULL,0); - VARDIV(I4,1,I2,2,R8,0.5); - VARDIV(I4,1,I4,2,R8,0.5); - VARDIV(I4,1,R4,2.0f,R8,0.5); - VARDIV(I4,1,R8,2.0,R8,0.5); - VARDIV(I4,1,DATE,2,R8,0.5); - VARDIV(I4,1,BSTR,num2_str,R8,0.5); - VARDIV(I4,1,BOOL,VARIANT_TRUE,R8,-1.0); - VARDIV(I4,1,UI1,2,R8,0.5); - if (HAVE_OLEAUT32_I8) - { - VARDIV(I4,1,I8,2,R8,0.5); - } - VARDIV(R4,1.0f,NULL,0,NULL,0); - VARDIV(R4,1.0f,I2,2,R4,0.5f); - VARDIV(R4,1.0f,I4,2,R8,0.5); - VARDIV(R4,1.0f,R4,2.0f,R4,0.5f); - VARDIV(R4,1.0f,R8,2.0,R8,0.5); - VARDIV(R4,1.0f,DATE,2,R8,0.5); - VARDIV(R4,1.0f,BSTR,num2_str,R8,0.5); - VARDIV(R4,1.0f,BOOL,VARIANT_TRUE,R4,-1); - VARDIV(R4,1.0f,UI1,2,R4,0.5f); - if (HAVE_OLEAUT32_I8) - { - VARDIV(R4,1.0f,I8,2,R8,0.5); - } - VARDIV(R8,1.0,NULL,0,NULL,0); - VARDIV(R8,1.0,I2,2,R8,0.5); - VARDIV(R8,1.0,I4,2,R8,0.5); - VARDIV(R8,1.0,R4,2.0f,R8,0.5); - VARDIV(R8,1.0,R8,2.0,R8,0.5); - VARDIV(R8,1.0,DATE,2,R8,0.5); - VARDIV(R8,1.0,BSTR,num2_str,R8,0.5); - VARDIV(R8,1.0,BOOL,VARIANT_TRUE,R8,-1.0); - VARDIV(R8,1.0,UI1,2,R8,0.5); - if (HAVE_OLEAUT32_I8) - { - VARDIV(R8,1.0,I8,2,R8,0.5); - } - VARDIV(DATE,1,NULL,0,NULL,0); - VARDIV(DATE,1,I2,2,R8,0.5); - VARDIV(DATE,1,I4,2,R8,0.5); - VARDIV(DATE,1,R4,2.0f,R8,0.5); - VARDIV(DATE,1,R8,2.0,R8,0.5); - VARDIV(DATE,1,DATE,2,R8,0.5); - VARDIV(DATE,1,BSTR,num2_str,R8,0.5); - VARDIV(DATE,1,BOOL,VARIANT_TRUE,R8,-1.0); - VARDIV(DATE,1,UI1,2,R8,0.5); - if (HAVE_OLEAUT32_I8) - { - VARDIV(DATE,1,I8,2,R8,0.5); - } - VARDIV(BSTR,num1_str,NULL,0,NULL,0); - VARDIV(BSTR,num1_str,I2,2,R8,0.5); - VARDIV(BSTR,num1_str,I4,2,R8,0.5); - VARDIV(BSTR,num1_str,R4,2.0f,R8,0.5); - VARDIV(BSTR,num1_str,R8,2.0,R8,0.5); - VARDIV(BSTR,num1_str,DATE,2,R8,0.5); - VARDIV(BSTR,num1_str,BSTR,num2_str,R8,0.5); - VARDIV(BSTR,num1_str,BOOL,VARIANT_TRUE,R8,-1); - VARDIV(BSTR,num1_str,UI1,2,R8,0.5); - if (HAVE_OLEAUT32_I8) - { - VARDIV(BSTR,num1_str,I8,2,R8,0.5); - } - VARDIV(BOOL,VARIANT_TRUE,NULL,0,NULL,0); - VARDIV(BOOL,VARIANT_TRUE,I2,1,R8,-1.0); - VARDIV(BOOL,VARIANT_FALSE,I2,1,R8,0.0); - VARDIV(BOOL,VARIANT_TRUE,I4,1,R8,-1.0); - VARDIV(BOOL,VARIANT_FALSE,I4,1,R8,0.0); - VARDIV(BOOL,VARIANT_TRUE,R4,1,R4,-1.0f); - VARDIV(BOOL,VARIANT_FALSE,R4,1,R4,0.0f); - VARDIV(BOOL,VARIANT_TRUE,R8,1.0,R8,-1.0); - VARDIV(BOOL,VARIANT_FALSE,R8,1.0,R8,0.0); - VARDIV(BOOL,VARIANT_FALSE,DATE,2,R8,0.0); - VARDIV(BOOL,VARIANT_FALSE,BSTR,num2_str,R8,0.0); - VARDIV(BOOL,VARIANT_TRUE,BOOL,VARIANT_TRUE,R8,1.0); - VARDIV(BOOL,VARIANT_FALSE,BOOL,VARIANT_TRUE,R8,0.0); - VARDIV(BOOL,VARIANT_TRUE,UI1,1,R8,-1.0); - if (HAVE_OLEAUT32_I8) - { - VARDIV(BOOL,VARIANT_TRUE,I8,1,R8,-1.0); - } - VARDIV(UI1,1,NULL,0,NULL,0); - VARDIV(UI1,1,I2,2,R8,0.5); - VARDIV(UI1,1,I4,2,R8,0.5); - VARDIV(UI1,1,R4,2.0f,R4,0.5f); - VARDIV(UI1,1,R8,2.0,R8,0.5); - VARDIV(UI1,1,DATE,2,R8,0.5); - VARDIV(UI1,1,BSTR,num2_str,R8,0.5); - VARDIV(UI1,1,BOOL,VARIANT_TRUE,R8,-1); - VARDIV(UI1,1,UI1,2,R8,0.5); - if (HAVE_OLEAUT32_I8) - { - VARDIV(UI1,1,I8,2,R8,0.5); - VARDIV(I8,1,NULL,0,NULL,0); - VARDIV(I8,1,I2,2,R8,0.5); - VARDIV(I8,1,I4,2,R8,0.5); - VARDIV(I8,1,R4,2.0f,R8,0.5); - VARDIV(I8,1,R8,2.0,R8,0.5); - VARDIV(I8,1,DATE,2,R8,0.5); - VARDIV(I8,1,BSTR,num2_str,R8,0.5); - VARDIV(I8,1,BOOL,VARIANT_TRUE,R8,-1); - VARDIV(I8,1,UI1,2,R8,0.5); - VARDIV(I8,1,I8,2,R8,0.5); - } - - /* Manually test some VT_CY, VT_DECIMAL variants */ - V_VT(&cy) = VT_CY; - hres = VarCyFromI4(10000, &V_CY(&cy)); - ok(hres == S_OK, "VarCyFromI4 failed!\n"); - V_VT(&dec) = VT_DECIMAL; - hres = VarDecFromR8(2.0, &V_DECIMAL(&dec)); - ok(hres == S_OK, "VarDecFromR4 failed!\n"); - memset(&left, 0, sizeof(left)); - memset(&right, 0, sizeof(right)); - V_VT(&left) = VT_I4; - V_I4(&left) = 100; - V_VT(&right) = VT_UI1; - V_UI1(&right) = 2; - - hres = pVarDiv(&cy, &cy, &result); - ok(hres == S_OK && V_VT(&result) == VT_R8, - "VARDIV: expected coerced type VT_R8, got %s!\n", vtstr(V_VT(&result))); - ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 1.0), - "VARDIV: CY value %f, expected %f\n", V_R8(&result), (double)1.0); - - hres = pVarDiv(&cy, &right, &result); - ok(hres == S_OK && V_VT(&result) == VT_R8, - "VARDIV: expected coerced type VT_R8, got %s!\n", vtstr(V_VT(&result))); - ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 5000.0), - "VARDIV: CY value %f, expected %f\n", V_R8(&result), (double)5000.0); - - hres = pVarDiv(&left, &cy, &result); - ok(hres == S_OK && V_VT(&result) == VT_R8, - "VARDIV: expected coerced type VT_R8, got %s!\n", vtstr(V_VT(&result))); - ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 0.01), - "VARDIV: CY value %f, expected %f\n", V_R8(&result), (double)0.01); - - hres = pVarDiv(&left, &dec, &result); - ok(hres == S_OK && V_VT(&result) == VT_DECIMAL, - "VARDIV: expected coerced type VT_DECIMAL, got %s!\n", vtstr(V_VT(&result))); - hres = VarR8FromDec(&V_DECIMAL(&result), &r); - ok(hres == S_OK && EQ_DOUBLE(r, 50.0), - "VARDIV: DECIMAL value %f, expected %f\n", r, (double)50.0); - - hres = pVarDiv(&dec, &dec, &result); - ok(hres == S_OK && V_VT(&result) == VT_DECIMAL, - "VARDIV: expected coerced type VT_DECIMAL, got %s!\n", vtstr(V_VT(&result))); - hres = VarR8FromDec(&V_DECIMAL(&result), &r); - ok(hres == S_OK && EQ_DOUBLE(r, 1.0), - "VARDIV: DECIMAL value %f, expected %f\n", r, (double)1.0); - - hres = pVarDiv(&dec, &right, &result); - ok(hres == S_OK && V_VT(&result) == VT_DECIMAL, - "VARDIV: expected coerced type VT_DECIMAL, got %s!\n", vtstr(V_VT(&result))); - hres = VarR8FromDec(&V_DECIMAL(&result), &r); - ok(hres == S_OK && EQ_DOUBLE(r, 1.0), - "VARDIV: DECIMAL value %f, expected %f\n", r, (double)1.0); - - /* Check for division by zero and overflow */ - V_VT(&left) = VT_R8; - V_I4(&left) = 1; - V_VT(&right) = VT_R8; - V_I4(&right) = 0; - hres = pVarDiv(&left, &right, &result); - ok(hres == DISP_E_DIVBYZERO && V_VT(&result) == VT_EMPTY, - "VARDIV: Division by (1.0/0.0) should result in DISP_E_DIVBYZERO but got 0x%X\n", hres); - - V_VT(&left) = VT_R8; - V_I4(&left) = 0; - V_VT(&right) = VT_R8; - V_I4(&right) = 0; - hres = pVarDiv(&left, &right, &result); - ok(hres == DISP_E_OVERFLOW && V_VT(&result) == VT_EMPTY, - "VARDIV: Division by (0.0/0.0) should result in DISP_E_OVERFLOW but got 0x%X\n", hres); - - SysFreeString(num1_str); - SysFreeString(num2_str); -} - -static HRESULT (WINAPI *pVarIdiv)(LPVARIANT,LPVARIANT,LPVARIANT); - -#define VARIDIV(vt1,val1,vt2,val2,rvt,rval) \ - V_VT(&left) = VT_##vt1; V_##vt1(&left) = val1; \ - V_VT(&right) = VT_##vt2; V_##vt2(&right) = val2; \ - V_VT(&exp) = VT_##rvt; V_##rvt(&exp) = rval; \ - test_var_call2( __LINE__, pVarIdiv, &left, &right, &exp ) - -/* Skip any type that is not defined or produces an error for every case */ -#define SKIPTESTIDIV(a) \ - if (a == VT_ERROR || a == VT_VARIANT || \ - a == VT_DISPATCH || a == VT_UNKNOWN || \ - a == VT_RECORD || a > VT_UINT || \ - a == 15 /*not defined*/) \ - continue - -static void test_VarIdiv(void) -{ - static const WCHAR str1[] = { '1','\0' }; - static const WCHAR str2[] = { '2','\0' }; - VARIANT left, right, exp, result, cy, dec; - BSTR num1_str, num2_str; - VARTYPE i; - HRESULT hres; - - CHECKPTR(VarIdiv); - - num1_str = SysAllocString(str1); - num2_str = SysAllocString(str2); - - /* Test all possible flag/vt combinations & the resulting vt type */ - for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]); i++) - { - VARTYPE leftvt, rightvt, resvt; - - for (leftvt = 0; leftvt <= VT_BSTR_BLOB; leftvt++) - { - SKIPTESTIDIV(leftvt); - - /* Check if we need/have support for I8 and/or UI8 */ - if ((leftvt == VT_I8 || leftvt == VT_UI8) && !HAVE_OLEAUT32_I8) - continue; - - for (rightvt = 0; rightvt <= VT_BSTR_BLOB; rightvt++) - { - BOOL bFail = FALSE; - SKIPTESTIDIV(rightvt); - - /* Native crashes with extra flag VT_BYREF */ - if (ExtraFlags[i] == VT_BYREF) - continue; - - /* Check if we need/have support for I8 and/or UI8 */ - if ((rightvt == VT_I8 || rightvt == VT_UI8) && !HAVE_OLEAUT32_I8) - continue; - - memset(&left, 0, sizeof(left)); - memset(&right, 0, sizeof(right)); - V_VT(&left) = leftvt | ExtraFlags[i]; - V_VT(&right) = rightvt | ExtraFlags[i]; - V_VT(&result) = VT_EMPTY; - resvt = VT_EMPTY; - - if (leftvt == VT_BSTR) - V_BSTR(&left) = num2_str; - else if (leftvt == VT_DECIMAL) - { - VarDecFromR8(2.0, &V_DECIMAL(&left)); - V_VT(&left) = leftvt | ExtraFlags[i]; - } - - /* Division by 0 is undefined */ - switch(rightvt) - { - case VT_BSTR: - V_BSTR(&right) = num2_str; - break; - case VT_DECIMAL: - VarDecFromR8(2.0, &V_DECIMAL(&right)); - V_VT(&right) = rightvt | ExtraFlags[i]; - break; - case VT_BOOL: - V_BOOL(&right) = VARIANT_TRUE; - break; - case VT_CY: - VarCyFromI4(10000, &V_CY(&right)); - V_VT(&right) = rightvt | ExtraFlags[i]; - break; - case VT_I2: V_I2(&right) = 2; break; - case VT_I4: V_I4(&right) = 2; break; - case VT_R4: V_R4(&right) = 2.0f; break; - case VT_R8: V_R8(&right) = 2.0; break; - case VT_DATE: V_DATE(&right) = 2; break; - case VT_I1: V_I1(&right) = 2; break; - case VT_UI1: V_UI1(&right) = 2; break; - case VT_UI2: V_UI2(&right) = 2; break; - case VT_UI4: V_UI4(&right) = 2; break; - case VT_I8: V_I8(&right) = 2; break; - case VT_UI8: V_UI8(&right) = 2; break; - case VT_INT: V_INT(&right) = 2; break; - case VT_UINT: V_UINT(&right) = 2; break; - default: break; - } - - /* Native VarIdiv always returns an error when using extra - * flags or if the variant combination is I8 and INT. - */ - if ((leftvt == VT_I8 && rightvt == VT_INT) || - (leftvt == VT_INT && rightvt == VT_I8) || - (rightvt == VT_EMPTY && leftvt != VT_NULL) || - ExtraFlags[i] != 0) - bFail = TRUE; - - /* Determine variant type */ - else if (leftvt == VT_NULL || rightvt == VT_NULL) - resvt = VT_NULL; - else if (leftvt == VT_I8 || rightvt == VT_I8) - resvt = VT_I8; - else if (leftvt == VT_I4 || rightvt == VT_I4 || - leftvt == VT_INT || rightvt == VT_INT || - leftvt == VT_UINT || rightvt == VT_UINT || - leftvt == VT_UI8 || rightvt == VT_UI8 || - leftvt == VT_UI4 || rightvt == VT_UI4 || - leftvt == VT_UI2 || rightvt == VT_UI2 || - leftvt == VT_I1 || rightvt == VT_I1 || - leftvt == VT_BSTR || rightvt == VT_BSTR || - leftvt == VT_DATE || rightvt == VT_DATE || - leftvt == VT_CY || rightvt == VT_CY || - leftvt == VT_DECIMAL || rightvt == VT_DECIMAL || - leftvt == VT_R8 || rightvt == VT_R8 || - leftvt == VT_R4 || rightvt == VT_R4) - resvt = VT_I4; - else if (leftvt == VT_I2 || rightvt == VT_I2 || - leftvt == VT_BOOL || rightvt == VT_BOOL || - leftvt == VT_EMPTY) - resvt = VT_I2; - else if (leftvt == VT_UI1 || rightvt == VT_UI1) - resvt = VT_UI1; - else - bFail = TRUE; - - hres = pVarIdiv(&left, &right, &result); - - /* Check expected HRESULT and if result variant type is correct */ - if (bFail) - ok (hres == DISP_E_BADVARTYPE || hres == DISP_E_TYPEMISMATCH || - hres == DISP_E_DIVBYZERO, - "VarIdiv: %s|0x%X, %s|0x%X: got vt %s hr 0x%X\n", - vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], - vtstr(V_VT(&result)), hres); - else - ok (hres == S_OK && resvt == V_VT(&result), - "VarIdiv: %s|0x%X, %s|0x%X: expected vt %s hr 0x%X, got vt %s hr 0x%X\n", - vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], vtstr(resvt), - S_OK, vtstr(V_VT(&result)), hres); - } - } - } - - /* Test return values for all the good cases */ - VARIDIV(EMPTY,0,NULL,0,NULL,0); - VARIDIV(EMPTY,0,I2,1,I2,0); - VARIDIV(EMPTY,0,I4,1,I4,0); - VARIDIV(EMPTY,0,R4,1.0f,I4,0); - VARIDIV(EMPTY,0,R8,1.0,I4,0); - VARIDIV(EMPTY,0,DATE,1.0,I4,0); - VARIDIV(EMPTY,0,BSTR,num1_str,I4,0); - VARIDIV(EMPTY,0,BOOL,VARIANT_TRUE,I2,0); - VARIDIV(EMPTY,0,I1,1,I4,0); - VARIDIV(EMPTY,0,UI1,1,I2,0); - VARIDIV(EMPTY,0,UI2,1,I4,0); - VARIDIV(EMPTY,0,UI4,1,I4,0); - if (HAVE_OLEAUT32_I8) - { - VARIDIV(EMPTY,0,I8,1,I8,0); - VARIDIV(EMPTY,0,UI8,1,I4,0); - } - VARIDIV(EMPTY,0,INT,1,I4,0); - VARIDIV(EMPTY,0,UINT,1,I4,0); - VARIDIV(NULL,0,EMPTY,0,NULL,0); - VARIDIV(NULL,0,NULL,0,NULL,0); - VARIDIV(NULL,0,I2,1,NULL,0); - VARIDIV(NULL,0,I4,1,NULL,0); - VARIDIV(NULL,0,R4,1,NULL,0); - VARIDIV(NULL,0,R8,1,NULL,0); - VARIDIV(NULL,0,DATE,1,NULL,0); - VARIDIV(NULL,0,BSTR,num1_str,NULL,0); - VARIDIV(NULL,0,BOOL,VARIANT_TRUE,NULL,0); - VARIDIV(NULL,0,I1,1,NULL,0); - VARIDIV(NULL,0,UI1,1,NULL,0); - VARIDIV(NULL,0,UI2,1,NULL,0); - VARIDIV(NULL,0,UI4,1,NULL,0); - if (HAVE_OLEAUT32_I8) - { - VARIDIV(NULL,0,I8,1,NULL,0); - VARIDIV(NULL,0,UI8,1,NULL,0); - } - VARIDIV(NULL,0,INT,1,NULL,0); - VARIDIV(NULL,0,UINT,1,NULL,0); - VARIDIV(I2,2,NULL,0,NULL,0); - VARIDIV(I2,2,I2,1,I2,2); - VARIDIV(I2,2,I4,1,I4,2); - VARIDIV(I2,2,R4,1,I4,2); - VARIDIV(I2,2,R8,1,I4,2); - VARIDIV(I2,2,DATE,1,I4,2); - VARIDIV(I2,2,BSTR,num1_str,I4,2); - VARIDIV(I2,2,BOOL,VARIANT_TRUE,I2,-2); - VARIDIV(I2,2,I1,1,I4,2); - VARIDIV(I2,2,UI1,1,I2,2); - VARIDIV(I2,2,UI2,1,I4,2); - VARIDIV(I2,2,UI4,1,I4,2); - if (HAVE_OLEAUT32_I8) - { - VARIDIV(I2,2,I8,1,I8,2); - VARIDIV(I2,2,UI8,1,I4,2); - } - VARIDIV(I2,2,INT,1,I4,2); - VARIDIV(I2,2,UINT,1,I4,2); - VARIDIV(I4,2,NULL,0,NULL,0); - VARIDIV(I4,2,I2,1,I4,2); - VARIDIV(I4,2,I4,1,I4,2); - VARIDIV(I4,2,R4,1,I4,2); - VARIDIV(I4,2,R8,1,I4,2); - VARIDIV(I4,2,DATE,1,I4,2); - VARIDIV(I4,2,BSTR,num1_str,I4,2); - VARIDIV(I4,2,BOOL,VARIANT_TRUE,I4,-2); - VARIDIV(I4,2,I1,1,I4,2); - VARIDIV(I4,2,UI1,1,I4,2); - VARIDIV(I4,2,UI2,1,I4,2); - VARIDIV(I4,2,UI4,1,I4,2); - if (HAVE_OLEAUT32_I8) - { - VARIDIV(I4,2,I8,1,I8,2); - VARIDIV(I4,2,UI8,1,I4,2); - } - VARIDIV(I4,2,INT,1,I4,2); - VARIDIV(I4,2,UINT,1,I4,2); - VARIDIV(R4,2.0f,NULL,0,NULL,0); - VARIDIV(R4,2.0f,I2,1,I4,2); - VARIDIV(R4,2.0f,I4,1,I4,2); - VARIDIV(R4,2.0f,R4,1.0f,I4,2); - VARIDIV(R4,2.0f,R8,1.0,I4,2); - VARIDIV(R4,2.0f,DATE,1,I4,2); - VARIDIV(R4,2.0f,BSTR,num1_str,I4,2); - VARIDIV(R4,2.0f,BOOL,VARIANT_TRUE,I4,-2); - VARIDIV(R4,2.0f,I1,1,I4,2); - VARIDIV(R4,2.0f,UI1,1,I4,2); - VARIDIV(R4,2.0f,UI2,1,I4,2); - VARIDIV(R4,2.0f,UI4,1,I4,2); - if (HAVE_OLEAUT32_I8) - { - VARIDIV(R4,2.0f,I8,1,I8,2); - VARIDIV(R4,2.0f,UI8,1,I4,2); - } - VARIDIV(R4,2.0f,INT,1,I4,2); - VARIDIV(R4,2.0f,UINT,1,I4,2); - VARIDIV(R8,2.0,NULL,0,NULL,0); - VARIDIV(R8,2.0,I2,1,I4,2); - VARIDIV(R8,2.0,I4,1,I4,2); - VARIDIV(R8,2.0,R4,1,I4,2); - VARIDIV(R8,2.0,R8,1,I4,2); - VARIDIV(R8,2.0,DATE,1,I4,2); - VARIDIV(R8,2.0,BSTR,num1_str,I4,2); - VARIDIV(R8,2.0,BOOL,VARIANT_TRUE,I4,-2); - VARIDIV(R8,2.0,I1,1,I4,2); - VARIDIV(R8,2.0,UI1,1,I4,2); - VARIDIV(R8,2.0,UI2,1,I4,2); - VARIDIV(R8,2.0,UI4,1,I4,2); - if (HAVE_OLEAUT32_I8) - { - VARIDIV(R8,2.0,I8,1,I8,2); - VARIDIV(R8,2.0,UI8,1,I4,2); - } - VARIDIV(R8,2.0,INT,1,I4,2); - VARIDIV(R8,2.0,UINT,1,I4,2); - VARIDIV(DATE,2,NULL,0,NULL,0); - VARIDIV(DATE,2,I2,1,I4,2); - VARIDIV(DATE,2,I4,1,I4,2); - VARIDIV(DATE,2,R4,1,I4,2); - VARIDIV(DATE,2,R8,1,I4,2); - VARIDIV(DATE,2,DATE,1,I4,2); - VARIDIV(DATE,2,BSTR,num1_str,I4,2); - VARIDIV(DATE,2,BOOL,VARIANT_TRUE,I4,-2); - VARIDIV(DATE,2,I1,1,I4,2); - VARIDIV(DATE,2,UI1,1,I4,2); - VARIDIV(DATE,2,UI2,1,I4,2); - VARIDIV(DATE,2,UI4,1,I4,2); - if (HAVE_OLEAUT32_I8) - { - VARIDIV(DATE,2,I8,1,I8,2); - VARIDIV(DATE,2,UI8,1,I4,2); - } - VARIDIV(DATE,2,INT,1,I4,2); - VARIDIV(DATE,2,UINT,1,I4,2); - VARIDIV(BSTR,num2_str,NULL,0,NULL,0); - VARIDIV(BSTR,num2_str,I2,1,I4,2); - VARIDIV(BSTR,num2_str,I4,1,I4,2); - VARIDIV(BSTR,num2_str,R4,1.0f,I4,2); - VARIDIV(BSTR,num2_str,R8,1.0,I4,2); - VARIDIV(BSTR,num2_str,DATE,1,I4,2); - VARIDIV(BSTR,num2_str,BSTR,num1_str,I4,2); - VARIDIV(BSTR,num2_str,BOOL,VARIANT_TRUE,I4,-2); - VARIDIV(BSTR,num2_str,I1,1,I4,2); - VARIDIV(BSTR,num2_str,UI1,1,I4,2); - VARIDIV(BSTR,num2_str,UI2,1,I4,2); - VARIDIV(BSTR,num2_str,UI4,1,I4,2); - if (HAVE_OLEAUT32_I8) - { - VARIDIV(BSTR,num2_str,I8,1,I8,2); - VARIDIV(BSTR,num2_str,UI8,1,I4,2); - } - VARIDIV(BSTR,num2_str,INT,1,I4,2); - VARIDIV(BSTR,num2_str,UINT,1,I4,2); - VARIDIV(BOOL,VARIANT_TRUE,NULL,0,NULL,0); - VARIDIV(BOOL,VARIANT_TRUE,I2,1,I2,-1); - VARIDIV(BOOL,VARIANT_TRUE,I4,1,I4,-1); - VARIDIV(BOOL,VARIANT_TRUE,R4,1.0f,I4,-1); - VARIDIV(BOOL,VARIANT_TRUE,R8,1.0,I4,-1); - VARIDIV(BOOL,VARIANT_TRUE,DATE,1,I4,-1); - VARIDIV(BOOL,VARIANT_TRUE,BSTR,num1_str,I4,-1); - VARIDIV(BOOL,VARIANT_TRUE,BOOL,VARIANT_TRUE,I2,1); - VARIDIV(BOOL,VARIANT_TRUE,I1,1,I4,-1); - VARIDIV(BOOL,VARIANT_TRUE,UI1,1,I2,-1); - VARIDIV(BOOL,VARIANT_TRUE,UI2,1,I4,-1); - VARIDIV(BOOL,VARIANT_TRUE,UI4,1,I4,-1); - if (HAVE_OLEAUT32_I8) - { - VARIDIV(BOOL,VARIANT_TRUE,I8,1,I8,-1); - VARIDIV(BOOL,VARIANT_TRUE,UI8,1,I4,-1); - } - VARIDIV(BOOL,VARIANT_TRUE,INT,1,I4,-1); - VARIDIV(BOOL,VARIANT_TRUE,UINT,1,I4,-1); - VARIDIV(I1,2,NULL,0,NULL,0); - VARIDIV(I1,2,I2,1,I4,2); - VARIDIV(I1,2,I4,1,I4,2); - VARIDIV(I1,2,R4,1.0f,I4,2); - VARIDIV(I1,2,R8,1.0,I4,2); - VARIDIV(I1,2,DATE,1,I4,2); - VARIDIV(I1,2,BSTR,num1_str,I4,2); - VARIDIV(I1,2,BOOL,VARIANT_TRUE,I4,-2); - VARIDIV(I1,2,I1,1,I4,2); - VARIDIV(I1,2,UI1,1,I4,2); - VARIDIV(I1,2,UI2,1,I4,2); - VARIDIV(I1,2,UI4,1,I4,2); - if (HAVE_OLEAUT32_I8) - { - VARIDIV(I1,2,I8,1,I8,2); - VARIDIV(I1,2,UI8,1,I4,2); - } - VARIDIV(I1,2,INT,1,I4,2); - VARIDIV(I1,2,UINT,1,I4,2); - VARIDIV(UI1,2,NULL,0,NULL,0); - VARIDIV(UI1,2,I2,1,I2,2); - VARIDIV(UI1,2,I4,1,I4,2); - VARIDIV(UI1,2,R4,1.0f,I4,2); - VARIDIV(UI1,2,R8,1.0,I4,2); - VARIDIV(UI1,2,DATE,1,I4,2); - VARIDIV(UI1,2,BSTR,num1_str,I4,2); - VARIDIV(UI1,2,BOOL,VARIANT_TRUE,I2,-2); - VARIDIV(UI1,2,I1,1,I4,2); - VARIDIV(UI1,2,UI1,1,UI1,2); - VARIDIV(UI1,2,UI2,1,I4,2); - VARIDIV(UI1,2,UI4,1,I4,2); - if (HAVE_OLEAUT32_I8) - { - VARIDIV(UI1,2,I8,1,I8,2); - VARIDIV(UI1,2,UI8,1,I4,2); - } - VARIDIV(UI1,2,INT,1,I4,2); - VARIDIV(UI1,2,UINT,1,I4,2); - VARIDIV(UI2,2,NULL,0,NULL,0); - VARIDIV(UI2,2,I2,1,I4,2); - VARIDIV(UI2,2,I4,1,I4,2); - VARIDIV(UI2,2,R4,1.0f,I4,2); - VARIDIV(UI2,2,R8,1.0,I4,2); - VARIDIV(UI2,2,DATE,1,I4,2); - VARIDIV(UI2,2,BSTR,num1_str,I4,2); - VARIDIV(UI2,2,BOOL,VARIANT_TRUE,I4,-2); - VARIDIV(UI2,2,I1,1,I4,2); - VARIDIV(UI2,2,UI1,1,I4,2); - VARIDIV(UI2,2,UI2,1,I4,2); - VARIDIV(UI2,2,UI4,1,I4,2); - if (HAVE_OLEAUT32_I8) - { - VARIDIV(UI2,2,I8,1,I8,2); - VARIDIV(UI2,2,UI8,1,I4,2); - } - VARIDIV(UI2,2,INT,1,I4,2); - VARIDIV(UI2,2,UINT,1,I4,2); - VARIDIV(UI4,2,NULL,0,NULL,0); - VARIDIV(UI4,2,I2,1,I4,2); - VARIDIV(UI4,2,I4,1,I4,2); - VARIDIV(UI4,2,R4,1.0f,I4,2); - VARIDIV(UI4,2,R8,1.0,I4,2); - VARIDIV(UI4,2,DATE,1,I4,2); - VARIDIV(UI4,2,BSTR,num1_str,I4,2); - VARIDIV(UI4,2,BOOL,VARIANT_TRUE,I4,-2); - VARIDIV(UI4,2,I1,1,I4,2); - VARIDIV(UI4,2,UI1,1,I4,2); - VARIDIV(UI4,2,UI2,1,I4,2); - VARIDIV(UI4,2,UI4,1,I4,2); - if (HAVE_OLEAUT32_I8) - { - VARIDIV(UI4,2,I8,1,I8,2); - VARIDIV(UI4,2,UI8,1,I4,2); - } - VARIDIV(UI4,2,INT,1,I4,2); - VARIDIV(UI4,2,UINT,1,I4,2); - if (HAVE_OLEAUT32_I8) - { - VARIDIV(I8,2,NULL,0,NULL,0); - VARIDIV(I8,2,I2,1,I8,2); - VARIDIV(I8,2,I4,1,I8,2); - VARIDIV(I8,2,R4,1.0f,I8,2); - VARIDIV(I8,2,R8,1.0,I8,2); - VARIDIV(I8,2,DATE,1,I8,2); - VARIDIV(I8,2,BSTR,num1_str,I8,2); - VARIDIV(I8,2,BOOL,1,I8,2); - VARIDIV(I8,2,I1,1,I8,2); - VARIDIV(I8,2,UI1,1,I8,2); - VARIDIV(I8,2,UI2,1,I8,2); - VARIDIV(I8,2,UI4,1,I8,2); - VARIDIV(I8,2,I8,1,I8,2); - VARIDIV(I8,2,UI8,1,I8,2); - VARIDIV(I8,2,UINT,1,I8,2); - VARIDIV(UI8,2,NULL,0,NULL,0); - VARIDIV(UI8,2,I2,1,I4,2); - VARIDIV(UI8,2,I4,1,I4,2); - VARIDIV(UI8,2,R4,1.0f,I4,2); - VARIDIV(UI8,2,R8,1.0,I4,2); - VARIDIV(UI8,2,DATE,1,I4,2); - VARIDIV(UI8,2,BSTR,num1_str,I4,2); - VARIDIV(UI8,2,BOOL,VARIANT_TRUE,I4,-2); - VARIDIV(UI8,2,I1,1,I4,2); - VARIDIV(UI8,2,UI1,1,I4,2); - VARIDIV(UI8,2,UI2,1,I4,2); - VARIDIV(UI8,2,UI4,1,I4,2); - VARIDIV(UI8,2,I8,1,I8,2); - VARIDIV(UI8,2,UI8,1,I4,2); - VARIDIV(UI8,2,INT,1,I4,2); - VARIDIV(UI8,2,UINT,1,I4,2); - } - VARIDIV(INT,2,NULL,0,NULL,0); - VARIDIV(INT,2,I2,1,I4,2); - VARIDIV(INT,2,I4,1,I4,2); - VARIDIV(INT,2,R4,1.0f,I4,2); - VARIDIV(INT,2,R8,1.0,I4,2); - VARIDIV(INT,2,DATE,1,I4,2); - VARIDIV(INT,2,BSTR,num1_str,I4,2); - VARIDIV(INT,2,BOOL,VARIANT_TRUE,I4,-2); - VARIDIV(INT,2,I1,1,I4,2); - VARIDIV(INT,2,UI1,1,I4,2); - VARIDIV(INT,2,UI2,1,I4,2); - VARIDIV(INT,2,UI4,1,I4,2); - if (HAVE_OLEAUT32_I8) - { - VARIDIV(INT,2,UI8,1,I4,2); - } - VARIDIV(INT,2,INT,1,I4,2); - VARIDIV(INT,2,UINT,1,I4,2); - VARIDIV(UINT,2,NULL,0,NULL,0); - VARIDIV(UINT,2,I2,1,I4,2); - VARIDIV(UINT,2,I4,1,I4,2); - VARIDIV(UINT,2,R4,1.0f,I4,2); - VARIDIV(UINT,2,R8,1.0,I4,2); - VARIDIV(UINT,2,DATE,1,I4,2); - VARIDIV(UINT,2,BSTR,num1_str,I4,2); - VARIDIV(UINT,2,BOOL,VARIANT_TRUE,I4,-2); - VARIDIV(UINT,2,I1,1,I4,2); - VARIDIV(UINT,2,UI1,1,I4,2); - VARIDIV(UINT,2,UI2,1,I4,2); - VARIDIV(UINT,2,UI4,1,I4,2); - if (HAVE_OLEAUT32_I8) - { - VARIDIV(UINT,2,I8,1,I8,2); - VARIDIV(UINT,2,UI8,1,I4,2); - } - VARIDIV(UINT,2,INT,1,I4,2); - VARIDIV(UINT,2,UINT,1,I4,2); - - /* Manually test some VT_CY, VT_DECIMAL variants */ - V_VT(&cy) = VT_CY; - hres = VarCyFromI4(10000, &V_CY(&cy)); - ok(hres == S_OK, "VarCyFromI4 failed!\n"); - V_VT(&dec) = VT_DECIMAL; - hres = VarDecFromR8(2.0, &V_DECIMAL(&dec)); - ok(hres == S_OK, "VarDecFromR4 failed!\n"); - memset(&left, 0, sizeof(left)); - memset(&right, 0, sizeof(right)); - V_VT(&left) = VT_I4; - V_I4(&left) = 100; - V_VT(&right) = VT_I8; - V_UI1(&right) = 2; - - hres = VarIdiv(&cy, &cy, &result); - ok(hres == S_OK && V_VT(&result) == VT_I4, - "VARIDIV: expected coerced hres 0x%X type VT_I4, got hres 0x%X type %s!\n", - S_OK, hres, vtstr(V_VT(&result))); - ok(hres == S_OK && V_I4(&result) == 1, - "VARIDIV: CY value %d, expected %d\n", V_I4(&result), 1); - - if (HAVE_OLEAUT32_I8) - { - hres = VarIdiv(&cy, &right, &result); - ok(hres == S_OK && V_VT(&result) == VT_I8, - "VARIDIV: expected coerced hres 0x%X type VT_I8, got hres 0x%X type %s!\n", - S_OK, hres, vtstr(V_VT(&result))); - ok(hres == S_OK && V_I8(&result) == 5000, - "VARIDIV: CY value 0x%x%08x, expected 0x%x\n", - (DWORD)(V_I8(&result) >>32), (DWORD)V_I8(&result), 5000); - } - - hres = VarIdiv(&left, &cy, &result); - ok(hres == S_OK && V_VT(&result) == VT_I4, - "VARIDIV: expected coerced hres 0x%X type VT_I4, got hres 0x%X type %s!\n", - S_OK, hres, vtstr(V_VT(&result))); - ok(hres == S_OK && V_I4(&result) == 0, - "VARIDIV: CY value %d, expected %d\n", V_I4(&result), 0); - - hres = VarIdiv(&left, &dec, &result); - ok(hres == S_OK && V_VT(&result) == VT_I4, - "VARIDIV: expected coerced hres 0x%X type VT_I4, got hres 0x%X type %s!\n", - S_OK, hres, vtstr(V_VT(&result))); - ok(hres == S_OK && V_I4(&result) == 50, - "VARIDIV: DECIMAL value %d, expected %d\n", V_I4(&result), 50); - - hres = VarIdiv(&dec, &dec, &result); - ok(hres == S_OK && V_VT(&result) == VT_I4, - "VARIDIV: expected coerced hres 0x%X type VT_I4, got hres 0x%X type %s!\n", - S_OK, hres, vtstr(V_VT(&result))); - ok(hres == S_OK && V_I4(&result) == 1, - "VARIDIV: DECIMAL value %d, expected %d\n", V_I4(&result), 1); - - if (HAVE_OLEAUT32_I8) - { - hres = VarIdiv(&dec, &right, &result); - ok(hres == S_OK && V_VT(&result) == VT_I8, - "VARIDIV: expected coerced hres 0x%X type VT_I8, got hres 0x%X type %s!\n", - S_OK, hres, vtstr(V_VT(&result))); - ok(hres == S_OK && V_I8(&result) == 1, - "VARIDIV: DECIMAL value 0x%x%08x, expected %d\n", - (DWORD)(V_I8(&result) >> 32), (DWORD)V_I8(&result), 1); - } - - /* Check for division by zero */ - V_VT(&left) = VT_INT; - V_I4(&left) = 1; - V_VT(&right) = VT_INT; - V_I4(&right) = 0; - hres = pVarIdiv(&left, &right, &result); - ok(hres == DISP_E_DIVBYZERO && V_VT(&result) == VT_EMPTY, - "VARIDIV: Division by 0 should result in DISP_E_DIVBYZERO but got 0x%X\n", hres); - - V_VT(&left) = VT_INT; - V_I4(&left) = 0; - V_VT(&right) = VT_INT; - V_I4(&right) = 0; - hres = pVarIdiv(&left, &right, &result); - ok(hres == DISP_E_DIVBYZERO && V_VT(&result) == VT_EMPTY, - "VARIDIV: Division by 0 should result in DISP_E_DIVBYZERO but got 0x%X\n", hres); - - SysFreeString(num1_str); - SysFreeString(num2_str); -} - - -static HRESULT (WINAPI *pVarImp)(LPVARIANT,LPVARIANT,LPVARIANT); - -#define VARIMP(vt1,val1,vt2,val2,rvt,rval) \ - V_VT(&left) = VT_##vt1; V_##vt1(&left) = val1; \ - V_VT(&right) = VT_##vt2; V_##vt2(&right) = val2; \ - V_VT(&exp) = VT_##rvt; V_##rvt(&exp) = rval; \ - test_var_call2( __LINE__, pVarImp, &left, &right, &exp ) - -/* Skip any type that is not defined or produces an error for every case */ -#define SKIPTESTIMP(a) \ - if (a == VT_ERROR || a == VT_VARIANT || \ - a == VT_DISPATCH || a == VT_UNKNOWN || \ - a == VT_RECORD || a > VT_UINT || \ - a == 15 /*not defined*/) \ - continue - -static void test_VarImp(void) -{ - static const WCHAR szFalse[] = { '#','F','A','L','S','E','#','\0' }; - static const WCHAR szTrue[] = { '#','T','R','U','E','#','\0' }; - VARIANT left, right, exp, result, cy, dec; - BSTR true_str, false_str; - VARTYPE i; - HRESULT hres; - - CHECKPTR(VarImp); - - true_str = SysAllocString(szTrue); - false_str = SysAllocString(szFalse); - - /* Test all possible flag/vt combinations & the resulting vt type */ - for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]); i++) - { - VARTYPE leftvt, rightvt, resvt; - - for (leftvt = 0; leftvt <= VT_BSTR_BLOB; leftvt++) - { - SKIPTESTIMP(leftvt); - - /* Check if we need/have support for I8 and/or UI8 */ - if ((leftvt == VT_I8 || leftvt == VT_UI8) && !HAVE_OLEAUT32_I8) - continue; - - for (rightvt = 0; rightvt <= VT_BSTR_BLOB; rightvt++) - { - BOOL bFail = FALSE; - SKIPTESTIMP(rightvt); - - /* Native crashes when using the extra flag VT_BYREF - * or with the following VT combinations - */ - if ((leftvt == VT_UI4 && rightvt == VT_BSTR) || - (leftvt == VT_UI8 && rightvt == VT_BSTR) || - ExtraFlags[i] == VT_BYREF) - continue; - - /* Check if we need/have support for I8 and/or UI8 */ - if ((rightvt == VT_I8 || rightvt == VT_UI8) && !HAVE_OLEAUT32_I8) - continue; - - memset(&left, 0, sizeof(left)); - memset(&right, 0, sizeof(right)); - V_VT(&left) = leftvt | ExtraFlags[i]; - V_VT(&right) = rightvt | ExtraFlags[i]; - V_VT(&result) = VT_EMPTY; - resvt = VT_EMPTY; - - if (leftvt == VT_BSTR) - V_BSTR(&left) = true_str; - - /* This allows us to test return types that are not NULL - * (NULL Imp value = n, NULL Imp 0 = NULL) - */ - switch(rightvt) - { - case VT_BSTR: - V_BSTR(&right) = true_str; - break; - case VT_DECIMAL: - VarDecFromR8(2.0, &V_DECIMAL(&right)); - V_VT(&right) = rightvt | ExtraFlags[i]; - break; - case VT_BOOL: - V_BOOL(&right) = VARIANT_TRUE; - break; - case VT_I1: V_I1(&right) = 2; break; - case VT_I2: V_I2(&right) = 2; break; - case VT_I4: V_I4(&right) = 2; break; - case VT_R4: V_R4(&right) = 2.0f; break; - case VT_R8: V_R8(&right) = 2.0; break; - case VT_CY: V_CY(&right).int64 = 10000; break; - case VT_DATE: V_DATE(&right) = 2; break; - case VT_I8: V_I8(&right) = 2; break; - case VT_INT: V_INT(&right) = 2; break; - case VT_UINT: V_UINT(&right) = 2; break; - case VT_UI1: V_UI1(&right) = 2; break; - case VT_UI2: V_UI2(&right) = 2; break; - case VT_UI4: V_UI4(&right) = 2; break; - case VT_UI8: V_UI8(&right) = 2; break; - default: break; - } - - /* Native VarImp always returns an error when using extra - * flags or if the variants are I8 and INT. - */ - if ((leftvt == VT_I8 && rightvt == VT_INT) || - ExtraFlags[i] != 0) - bFail = TRUE; - - /* Determine result type */ - else if ((leftvt == VT_BSTR && rightvt == VT_NULL) || - (leftvt == VT_NULL && rightvt == VT_NULL) || - (leftvt == VT_NULL && rightvt == VT_EMPTY)) - resvt = VT_NULL; - else if (leftvt == VT_I8 || rightvt == VT_I8) - resvt = VT_I8; - else if (leftvt == VT_I4 || rightvt == VT_I4 || - leftvt == VT_INT || rightvt == VT_INT || - leftvt == VT_UINT || rightvt == VT_UINT || - leftvt == VT_UI4 || rightvt == VT_UI4 || - leftvt == VT_UI8 || rightvt == VT_UI8 || - leftvt == VT_UI2 || rightvt == VT_UI2 || - leftvt == VT_DECIMAL || rightvt == VT_DECIMAL || - leftvt == VT_DATE || rightvt == VT_DATE || - leftvt == VT_CY || rightvt == VT_CY || - leftvt == VT_R8 || rightvt == VT_R8 || - leftvt == VT_R4 || rightvt == VT_R4 || - leftvt == VT_I1 || rightvt == VT_I1) - resvt = VT_I4; - else if ((leftvt == VT_UI1 && rightvt == VT_UI1) || - (leftvt == VT_UI1 && rightvt == VT_NULL) || - (leftvt == VT_NULL && rightvt == VT_UI1)) - resvt = VT_UI1; - else if (leftvt == VT_EMPTY || rightvt == VT_EMPTY || - leftvt == VT_I2 || rightvt == VT_I2 || - leftvt == VT_UI1 || rightvt == VT_UI1) - resvt = VT_I2; - else if (leftvt == VT_BOOL || rightvt == VT_BOOL || - leftvt == VT_BSTR || rightvt == VT_BSTR) - resvt = VT_BOOL; - - hres = pVarImp(&left, &right, &result); - - /* Check expected HRESULT and if result variant type is correct */ - if (bFail) - ok (hres == DISP_E_BADVARTYPE || hres == DISP_E_TYPEMISMATCH, - "VarImp: %s|0x%X, %s|0x%X: got vt %s hr 0x%X\n", - vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], - vtstr(V_VT(&result)), hres); - else - ok (hres == S_OK && resvt == V_VT(&result), - "VarImp: %s|0x%X, %s|0x%X: expected vt %s hr 0x%X, got vt %s hr 0x%X\n", - vtstr(leftvt), ExtraFlags[i], vtstr(rightvt), ExtraFlags[i], vtstr(resvt), - S_OK, vtstr(V_VT(&result)), hres); - } - } - } - - VARIMP(EMPTY,0,EMPTY,0,I2,-1); - VARIMP(EMPTY,0,NULL,0,I2,-1); - VARIMP(EMPTY,0,I2,-1,I2,-1); - VARIMP(EMPTY,0,I4,-1,I4,-1); - VARIMP(EMPTY,0,R4,0.0f,I4,-1); - VARIMP(EMPTY,0,R8,-1.0,I4,-1); - VARIMP(EMPTY,0,DATE,0,I4,-1); - VARIMP(EMPTY,0,BSTR,true_str,I2,-1); - VARIMP(EMPTY,0,BOOL,VARIANT_FALSE,I2,-1); - VARIMP(EMPTY,0,I1,0,I4,-1); - VARIMP(EMPTY,0,UI1,1,I2,-1); - VARIMP(EMPTY,0,UI2,1,I4,-1); - VARIMP(EMPTY,0,UI4,1,I4,-1); - if (HAVE_OLEAUT32_I8) - { - VARIMP(EMPTY,0,I8,1,I8,-1); - VARIMP(EMPTY,0,UI8,1,I4,-1); - } - VARIMP(EMPTY,0,INT,-1,I4,-1); - VARIMP(EMPTY,0,UINT,1,I4,-1); - VARIMP(NULL,0,EMPTY,0,NULL,0); - VARIMP(NULL,0,NULL,0,NULL,0); - VARIMP(NULL,0,I2,-1,I2,-1); - VARIMP(NULL,0,I4,-1,I4,-1); - VARIMP(NULL,0,R4,0.0f,NULL,0); - VARIMP(NULL,0,R8,-1.0,I4,-1); - VARIMP(NULL,0,DATE,0,NULL,0); - VARIMP(NULL,0,BSTR,true_str,BOOL,-1); - VARIMP(NULL,0,BOOL,VARIANT_FALSE,NULL,0); - VARIMP(NULL,0,I1,0,NULL,0); - VARIMP(NULL,0,UI1,1,UI1,1); - VARIMP(NULL,0,UI2,1,I4,1); - VARIMP(NULL,0,UI4,1,I4,1); - if (HAVE_OLEAUT32_I8) - { - VARIMP(NULL,0,I8,1,I8,1); - VARIMP(NULL,0,UI8,1,I4,1); - } - VARIMP(NULL,0,INT,-1,I4,-1); - VARIMP(NULL,0,UINT,1,I4,1); - VARIMP(I2,-1,EMPTY,0,I2,0); - VARIMP(I2,-1,I2,-1,I2,-1); - VARIMP(I2,-1,I4,-1,I4,-1); - VARIMP(I2,-1,R4,0.0f,I4,0); - VARIMP(I2,-1,R8,-1.0,I4,-1); - VARIMP(I2,-1,DATE,0,I4,0); - VARIMP(I2,-1,BSTR,true_str,I2,-1); - VARIMP(I2,-1,BOOL,VARIANT_FALSE,I2,0); - VARIMP(I2,-1,I1,0,I4,0); - VARIMP(I2,-1,UI1,1,I2,1); - VARIMP(I2,-1,UI2,1,I4,1); - VARIMP(I2,-1,UI4,1,I4,1); - if (HAVE_OLEAUT32_I8) - { - VARIMP(I2,-1,I8,1,I8,1); - VARIMP(I2,-1,UI8,1,I4,1); - } - VARIMP(I2,-1,INT,-1,I4,-1); - VARIMP(I2,-1,UINT,1,I4,1); - VARIMP(I4,2,EMPTY,0,I4,-3); - VARIMP(I4,2,NULL,0,I4,-3); - VARIMP(I4,2,I2,-1,I4,-1); - VARIMP(I4,2,I4,-1,I4,-1); - VARIMP(I4,2,R4,0.0f,I4,-3); - VARIMP(I4,2,R8,-1.0,I4,-1); - VARIMP(I4,2,DATE,0,I4,-3); - VARIMP(I4,2,BSTR,true_str,I4,-1); - VARIMP(I4,2,BOOL,VARIANT_FALSE,I4,-3); - VARIMP(I4,2,I1,0,I4,-3); - VARIMP(I4,2,UI1,1,I4,-3); - VARIMP(I4,2,UI2,1,I4,-3); - VARIMP(I4,2,UI4,1,I4,-3); - if (HAVE_OLEAUT32_I8) - { - VARIMP(I4,2,I8,1,I8,-3); - VARIMP(I4,2,UI8,1,I4,-3); - } - VARIMP(I4,2,INT,-1,I4,-1); - VARIMP(I4,2,UINT,1,I4,-3); - VARIMP(R4,-1.0f,EMPTY,0,I4,0); - VARIMP(R4,-1.0f,NULL,0,NULL,0); - VARIMP(R4,-1.0f,I2,-1,I4,-1); - VARIMP(R4,-1.0f,I4,-1,I4,-1); - VARIMP(R4,-1.0f,R4,0.0f,I4,0); - VARIMP(R4,-1.0f,R8,-1.0,I4,-1); - VARIMP(R4,-1.0f,DATE,1,I4,1); - VARIMP(R4,-1.0f,BSTR,true_str,I4,-1); - VARIMP(R4,-1.0f,BOOL,VARIANT_FALSE,I4,0); - VARIMP(R4,-1.0f,I1,0,I4,0); - VARIMP(R4,-1.0f,UI1,1,I4,1); - VARIMP(R4,-1.0f,UI2,1,I4,1); - VARIMP(R4,-1.0f,UI4,1,I4,1); - if (HAVE_OLEAUT32_I8) - { - VARIMP(R4,-1.0f,I8,1,I8,1); - VARIMP(R4,-1.0f,UI8,1,I4,1); - } - VARIMP(R4,-1.0f,INT,-1,I4,-1); - VARIMP(R4,-1.0f,UINT,1,I4,1); - VARIMP(R8,1.0,EMPTY,0,I4,-2); - VARIMP(R8,1.0,NULL,0,I4,-2); - VARIMP(R8,1.0,I2,-1,I4,-1); - VARIMP(R8,1.0,I4,-1,I4,-1); - VARIMP(R8,1.0,R4,0.0f,I4,-2); - VARIMP(R8,1.0,R8,-1.0,I4,-1); - VARIMP(R8,1.0,DATE,0,I4,-2); - VARIMP(R8,1.0,BSTR,true_str,I4,-1); - VARIMP(R8,1.0,BOOL,VARIANT_FALSE,I4,-2); - VARIMP(R8,1.0,I1,0,I4,-2); - VARIMP(R8,1.0,UI1,1,I4,-1); - VARIMP(R8,1.0,UI2,1,I4,-1); - VARIMP(R8,1.0,UI4,1,I4,-1); - if (HAVE_OLEAUT32_I8) - { - VARIMP(R8,1.0,I8,1,I8,-1); - VARIMP(R8,1.0,UI8,1,I4,-1); - } - VARIMP(R8,1.0,INT,-1,I4,-1); - VARIMP(R8,1.0,UINT,1,I4,-1); - VARIMP(DATE,0,EMPTY,0,I4,-1); - VARIMP(DATE,0,NULL,0,I4,-1); - VARIMP(DATE,0,I2,-1,I4,-1); - VARIMP(DATE,0,I4,-1,I4,-1); - VARIMP(DATE,0,R4,0.0f,I4,-1); - VARIMP(DATE,0,R8,-1.0,I4,-1); - VARIMP(DATE,0,DATE,0,I4,-1); - VARIMP(DATE,0,BSTR,true_str,I4,-1); - VARIMP(DATE,0,BOOL,VARIANT_FALSE,I4,-1); - VARIMP(DATE,0,I1,0,I4,-1); - VARIMP(DATE,0,UI1,1,I4,-1); - VARIMP(DATE,0,UI2,1,I4,-1); - VARIMP(DATE,0,UI4,1,I4,-1); - if (HAVE_OLEAUT32_I8) - { - VARIMP(DATE,0,I8,1,I8,-1); - VARIMP(DATE,0,UI8,1,I4,-1); - } - VARIMP(DATE,0,INT,-1,I4,-1); - VARIMP(DATE,0,UINT,1,I4,-1); - VARIMP(BSTR,false_str,EMPTY,0,I2,-1); - VARIMP(BSTR,false_str,NULL,0,BOOL,-1); - VARIMP(BSTR,false_str,I2,-1,I2,-1); - VARIMP(BSTR,false_str,I4,-1,I4,-1); - VARIMP(BSTR,false_str,R4,0.0f,I4,-1); - VARIMP(BSTR,false_str,R8,-1.0,I4,-1); - VARIMP(BSTR,false_str,DATE,0,I4,-1); - VARIMP(BSTR,false_str,BSTR,true_str,BOOL,-1); - VARIMP(BSTR,false_str,BOOL,VARIANT_FALSE,BOOL,-1); - VARIMP(BSTR,false_str,I1,0,I4,-1); - VARIMP(BSTR,false_str,UI1,1,I2,-1); - VARIMP(BSTR,false_str,UI2,1,I4,-1); - VARIMP(BSTR,false_str,UI4,1,I4,-1); - if (HAVE_OLEAUT32_I8) - { - VARIMP(BSTR,false_str,I8,1,I8,-1); - VARIMP(BSTR,false_str,UI8,1,I4,-1); - } - VARIMP(BSTR,false_str,INT,-1,I4,-1); - VARIMP(BSTR,false_str,UINT,1,I4,-1); - VARIMP(BOOL,VARIANT_TRUE,EMPTY,0,I2,0); - VARIMP(BOOL,VARIANT_TRUE,NULL,0,NULL,0); - VARIMP(BOOL,VARIANT_TRUE,I2,-1,I2,-1); - VARIMP(BOOL,VARIANT_TRUE,I4,-1,I4,-1); - VARIMP(BOOL,VARIANT_TRUE,R4,0.0f,I4,0); - VARIMP(BOOL,VARIANT_TRUE,R8,-1.0,I4,-1); - VARIMP(BOOL,VARIANT_TRUE,DATE,0,I4,0); - VARIMP(BOOL,VARIANT_TRUE,BSTR,true_str,BOOL,-1); - VARIMP(BOOL,VARIANT_TRUE,BOOL,VARIANT_FALSE,BOOL,0); - VARIMP(BOOL,VARIANT_TRUE,I1,0,I4,0); - VARIMP(BOOL,VARIANT_TRUE,UI1,1,I2,1); - VARIMP(BOOL,VARIANT_TRUE,UI2,1,I4,1); - VARIMP(BOOL,VARIANT_TRUE,UI4,1,I4,1); - if (HAVE_OLEAUT32_I8) - { - VARIMP(BOOL,VARIANT_TRUE,I8,1,I8,1); - VARIMP(BOOL,VARIANT_TRUE,UI8,1,I4,1); - } - VARIMP(BOOL,VARIANT_TRUE,INT,-1,I4,-1); - VARIMP(BOOL,VARIANT_TRUE,UINT,1,I4,1); - VARIMP(I1,-1,EMPTY,0,I4,0); - VARIMP(I1,-1,NULL,0,NULL,0); - VARIMP(I1,-1,I2,-1,I4,-1); - VARIMP(I1,-1,I4,-1,I4,-1); - VARIMP(I1,-1,R4,0.0f,I4,0); - VARIMP(I1,-1,R8,-1.0,I4,-1); - VARIMP(I1,-1,DATE,0,I4,0); - VARIMP(I1,-1,BSTR,true_str,I4,-1); - VARIMP(I1,-1,BOOL,VARIANT_FALSE,I4,0); - VARIMP(I1,-1,I1,0,I4,0); - VARIMP(I1,-1,UI1,1,I4,1); - VARIMP(I1,-1,UI2,1,I4,1); - VARIMP(I1,-1,UI4,1,I4,1); - if (HAVE_OLEAUT32_I8) - { - VARIMP(I1,-1,I8,1,I8,1); - VARIMP(I1,-1,UI8,1,I4,1); - } - VARIMP(I1,-1,INT,-1,I4,-1); - VARIMP(I1,-1,UINT,1,I4,1); - VARIMP(UI1,0,EMPTY,0,I2,-1); - VARIMP(UI1,0,NULL,0,UI1,255); - VARIMP(UI1,0,I2,-1,I2,-1); - VARIMP(UI1,0,I4,-1,I4,-1); - VARIMP(UI1,0,R4,0.0f,I4,-1); - VARIMP(UI1,0,R8,-1.0,I4,-1); - VARIMP(UI1,0,DATE,0,I4,-1); - VARIMP(UI1,0,BSTR,true_str,I2,-1); - VARIMP(UI1,0,BOOL,VARIANT_FALSE,I2,-1); - VARIMP(UI1,0,I1,0,I4,-1); - VARIMP(UI1,0,UI1,1,UI1,255); - VARIMP(UI1,0,UI2,1,I4,-1); - VARIMP(UI1,0,UI4,1,I4,-1); - if (HAVE_OLEAUT32_I8) - { - VARIMP(UI1,0,I8,1,I8,-1); - VARIMP(UI1,0,UI8,1,I4,-1); - } - VARIMP(UI1,0,INT,-1,I4,-1); - VARIMP(UI1,0,UINT,1,I4,-1); - VARIMP(UI2,0,EMPTY,0,I4,-1); - VARIMP(UI2,0,NULL,0,I4,-1); - VARIMP(UI2,0,I2,-1,I4,-1); - VARIMP(UI2,0,I4,-1,I4,-1); - VARIMP(UI2,0,R4,0.0f,I4,-1); - VARIMP(UI2,0,R8,-1.0,I4,-1); - VARIMP(UI2,0,DATE,0,I4,-1); - VARIMP(UI2,0,BSTR,true_str,I4,-1); - VARIMP(UI2,0,BOOL,VARIANT_FALSE,I4,-1); - VARIMP(UI2,0,I1,0,I4,-1); - VARIMP(UI2,0,UI1,1,I4,-1); - VARIMP(UI2,0,UI2,1,I4,-1); - VARIMP(UI2,0,UI4,1,I4,-1); - if (HAVE_OLEAUT32_I8) - { - VARIMP(UI2,0,I8,1,I8,-1); - VARIMP(UI2,0,UI8,1,I4,-1); - } - VARIMP(UI2,0,INT,-1,I4,-1); - VARIMP(UI2,0,UINT,1,I4,-1); - VARIMP(UI4,0,EMPTY,0,I4,-1); - VARIMP(UI4,0,NULL,0,I4,-1); - VARIMP(UI4,0,I2,-1,I4,-1); - VARIMP(UI4,0,I4,-1,I4,-1); - VARIMP(UI4,0,R4,0.0f,I4,-1); - VARIMP(UI4,0,R8,-1.0,I4,-1); - VARIMP(UI4,0,DATE,0,I4,-1); - VARIMP(UI4,0,BSTR,true_str,I4,-1); - VARIMP(UI4,0,BOOL,VARIANT_FALSE,I4,-1); - VARIMP(UI4,0,I1,0,I4,-1); - VARIMP(UI4,0,UI1,1,I4,-1); - VARIMP(UI4,0,UI2,1,I4,-1); - VARIMP(UI4,0,UI4,1,I4,-1); - if (HAVE_OLEAUT32_I8) - { - VARIMP(UI4,0,I8,1,I8,-1); - VARIMP(UI4,0,UI8,1,I4,-1); - } - VARIMP(UI4,0,INT,-1,I4,-1); - VARIMP(UI4,0,UINT,1,I4,-1); - if (HAVE_OLEAUT32_I8) - { - VARIMP(I8,-1,EMPTY,0,I8,0); - VARIMP(I8,-1,NULL,0,NULL,0); - VARIMP(I8,-1,I2,-1,I8,-1); - VARIMP(I8,-1,I4,-1,I8,-1); - VARIMP(I8,-1,R4,0.0f,I8,0); - VARIMP(I8,-1,R8,-1.0,I8,-1); - VARIMP(I8,-1,DATE,0,I8,0); - VARIMP(I8,-1,BSTR,true_str,I8,-1); - VARIMP(I8,-1,BOOL,VARIANT_FALSE,I8,0); - VARIMP(I8,-1,I1,0,I8,0); - VARIMP(I8,-1,UI1,1,I8,1); - VARIMP(I8,-1,UI2,1,I8,1); - VARIMP(I8,-1,UI4,1,I8,1); - VARIMP(I8,-1,I8,1,I8,1); - VARIMP(I8,-1,UI8,1,I8,1); - VARIMP(I8,-1,UINT,1,I8,1); - VARIMP(UI8,0,EMPTY,0,I4,-1); - VARIMP(UI8,0,NULL,0,I4,-1); - VARIMP(UI8,0,I2,-1,I4,-1); - VARIMP(UI8,0,I4,-1,I4,-1); - VARIMP(UI8,0,R4,0.0f,I4,-1); - VARIMP(UI8,0,R8,-1.0,I4,-1); - VARIMP(UI8,0,DATE,0,I4,-1); - VARIMP(UI8,0,BSTR,true_str,I4,-1); - VARIMP(UI8,0,BOOL,VARIANT_FALSE,I4,-1); - VARIMP(UI8,0,I1,0,I4,-1); - VARIMP(UI8,0,UI1,1,I4,-1); - VARIMP(UI8,0,UI2,1,I4,-1); - VARIMP(UI8,0,UI4,1,I4,-1); - VARIMP(UI8,0,I8,1,I8,-1); - VARIMP(UI8,0,UI8,1,I4,-1); - VARIMP(UI8,0,INT,-1,I4,-1); - VARIMP(UI8,0,UINT,1,I4,-1); - } - VARIMP(INT,-1,EMPTY,0,I4,0); - VARIMP(INT,-1,NULL,0,NULL,0); - VARIMP(INT,-1,I2,-1,I4,-1); - VARIMP(INT,-1,I4,-1,I4,-1); - VARIMP(INT,-1,R4,0.0f,I4,0); - VARIMP(INT,-1,R8,-1.0,I4,-1); - VARIMP(INT,-1,DATE,0,I4,0); - VARIMP(INT,-1,BSTR,true_str,I4,-1); - VARIMP(INT,-1,BOOL,VARIANT_FALSE,I4,0); - VARIMP(INT,-1,I1,0,I4,0); - VARIMP(INT,-1,UI1,1,I4,1); - VARIMP(INT,-1,UI2,1,I4,1); - VARIMP(INT,-1,UI4,1,I4,1); - if (HAVE_OLEAUT32_I8) - { - VARIMP(INT,-1,I8,1,I8,1); - VARIMP(INT,-1,UI8,1,I4,1); - } - VARIMP(INT,-1,INT,-1,I4,-1); - VARIMP(INT,-1,UINT,1,I4,1); - VARIMP(UINT,1,EMPTY,0,I4,-2); - VARIMP(UINT,1,NULL,0,I4,-2); - VARIMP(UINT,1,I2,-1,I4,-1); - VARIMP(UINT,1,I4,-1,I4,-1); - VARIMP(UINT,1,R4,0.0f,I4,-2); - VARIMP(UINT,1,R8,-1.0,I4,-1); - VARIMP(UINT,1,DATE,0,I4,-2); - VARIMP(UINT,1,BSTR,true_str,I4,-1); - VARIMP(UINT,1,BOOL,VARIANT_FALSE,I4,-2); - VARIMP(UINT,1,I1,0,I4,-2); - VARIMP(UINT,1,UI1,1,I4,-1); - VARIMP(UINT,1,UI2,1,I4,-1); - VARIMP(UINT,1,UI4,1,I4,-1); - if (HAVE_OLEAUT32_I8) - { - VARIMP(UINT,1,I8,1,I8,-1); - VARIMP(UINT,1,UI8,1,I4,-1); - } - VARIMP(UINT,1,INT,-1,I4,-1); - VARIMP(UINT,1,UINT,1,I4,-1); - - /* Manually test some VT_CY, VT_DECIMAL variants */ - V_VT(&cy) = VT_CY; - hres = VarCyFromI4(1, &V_CY(&cy)); - ok(hres == S_OK, "VarCyFromI4 failed!\n"); - V_VT(&dec) = VT_DECIMAL; - hres = VarDecFromR8(2.0, &V_DECIMAL(&dec)); - ok(hres == S_OK, "VarDecFromR4 failed!\n"); - memset(&left, 0, sizeof(left)); - memset(&right, 0, sizeof(right)); - V_VT(&left) = VT_I4; - V_I4(&left) = 0; - V_VT(&right) = VT_I8; - V_UI1(&right) = 0; - - hres = pVarImp(&cy, &cy, &result); - ok(hres == S_OK && V_VT(&result) == VT_I4, - "VARIMP: expected coerced hres 0x%X type VT_I4, got hres 0x%X type %s!\n", - S_OK, hres, vtstr(V_VT(&result))); - ok(hres == S_OK && V_I4(&result) == -1, - "VARIMP: CY value %d, expected %d\n", V_I4(&result), -1); - - if (HAVE_OLEAUT32_I8) - { - hres = pVarImp(&cy, &right, &result); - ok(hres == S_OK && V_VT(&result) == VT_I8, - "VARIMP: expected coerced hres 0x%X type VT_I8, got hres 0x%X type %s!\n", - S_OK, hres, vtstr(V_VT(&result))); - ok(hres == S_OK && V_I8(&result) == -2, - "VARIMP: CY value %x%08x, expected %d\n", - (DWORD)((V_I8(&result)) >> 32), (DWORD)(V_I8(&result)), -2); - } - - hres = pVarImp(&left, &cy, &result); - ok(hres == S_OK && V_VT(&result) == VT_I4, - "VARIMP: expected coerced hres 0x%X type VT_I4, got hres 0x%X type %s!\n", - S_OK, hres, vtstr(V_VT(&result))); - ok(hres == S_OK && V_I4(&result) == -1, - "VARIMP: CY value %d, expected %d\n", V_I4(&result), -1); - - hres = pVarImp(&left, &dec, &result); - ok(hres == S_OK && V_VT(&result) == VT_I4, - "VARIMP: expected coerced hres 0x%X type VT_I4, got hres 0x%X type %s!\n", - S_OK, hres, vtstr(V_VT(&result))); - ok(hres == S_OK && V_I4(&result) == -1, - "VARIMP: DECIMAL value %d, expected %d\n", V_I4(&result), -1); - - hres = pVarImp(&dec, &dec, &result); - ok(hres == S_OK && V_VT(&result) == VT_I4, - "VARIMP: expected coerced hres 0x%X type VT_I4, got hres 0x%X type %s!\n", - S_OK, hres, vtstr(V_VT(&result))); - ok(hres == S_OK && V_I4(&result) == -1, - "VARIMP: DECIMAL value %d, expected %d\n", V_I4(&result), -1); - - if (HAVE_OLEAUT32_I8) - { - hres = pVarImp(&dec, &right, &result); - ok(hres == S_OK && V_VT(&result) == VT_I8, - "VARIMP: expected coerced hres 0x%X type VT_I8, got hres 0x%X type %s!\n", - S_OK, hres, vtstr(V_VT(&result))); - ok(hres == S_OK && V_I8(&result) == -3, - "VARIMP: DECIMAL value 0x%x%08x, expected %d\n", - (DWORD)(V_I8(&result) >>32), (DWORD)V_I8(&result), -3); - } - - SysFreeString(false_str); - SysFreeString(true_str); -} - -START_TEST(vartest) -{ - init(); - - test_VariantInit(); - test_VariantClear(); - test_VariantCopy(); - test_VariantCopyInd(); - test_VarParseNumFromStr(); - test_VarNumFromParseNum(); - test_VarUdateFromDate(); - test_VarDateFromUdate(); - test_SystemTimeToVariantTime(); - test_VariantTimeToSystemTime(); - test_DosDateTimeToVariantTime(); - test_VariantTimeToDosDateTime(); - test_VarAbs(); - test_VarNot(); - test_VarSub(); - test_VarMod(); - test_VarFix(); - test_VarInt(); - test_VarNeg(); - test_VarRound(); - test_VarXor(); - test_VarOr(); - test_VarPow(); - test_VarEqv(); - test_VarMul(); - test_VarAdd(); - test_VarCat(); - test_VarCmp(); - test_VarAnd(); - test_VarDiv(); - test_VarIdiv(); - test_VarImp(); -} diff --git a/rostests/winetests/oleaut32/vartype.c b/rostests/winetests/oleaut32/vartype.c deleted file mode 100644 index 361342e1b39..00000000000 --- a/rostests/winetests/oleaut32/vartype.c +++ /dev/null @@ -1,6365 +0,0 @@ -/* - * Low level variant tests - * - * Copyright 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 "wine/test.h" -#include "oleauto.h" -#include - -/* Some Visual C++ versions choke on __uint64 to float conversions. - * To fix this you need either VC++ 6.0 plus the processor pack - * or Visual C++ >=7.0. - */ -#ifndef _MSC_VER -# define HAS_UINT64_TO_FLOAT -#else -# if _MSC_VER >= 1300 -# define HAS_UINT64_TO_FLOAT -# else -# include -# if defined(_mm_free) -/* _mm_free is defined if the Processor Pack has been installed */ -# define HAS_UINT64_TO_FLOAT -# endif - -# endif -#endif - -static HMODULE hOleaut32; - -/* Get a conversion function ptr, return if function not available */ -#define CHECKPTR(func) p##func = (void*)GetProcAddress(hOleaut32, #func); \ - if (!p##func) { \ - win_skip("function " # func " not available, not testing it\n"); return; } - -/* Is a given function exported from oleaut32? */ -#define HAVE_FUNC(func) ((void*)GetProcAddress(hOleaut32, #func) != NULL) - -/* Have IRecordInfo data type? */ -#define HAVE_OLEAUT32_RECORD HAVE_FUNC(SafeArraySetRecordInfo) -/* Have DECIMAL data type with new error checking? */ -#define HAVE_OLEAUT32_DECIMAL HAVE_FUNC(VarDecAdd) -/* Have CY data type? */ -#define HAVE_OLEAUT32_CY HAVE_FUNC(VarCyAdd) -/* Have I8/UI8 data type? */ -#define HAVE_OLEAUT32_I8 HAVE_FUNC(VarI8FromI1) -/* Have proper locale conversions? */ -#define HAVE_OLEAUT32_LOCALES (HAVE_FUNC(GetVarConversionLocaleSetting) && HAVE_OLEAUT32_I8) -/* Is this an ancient version with support for only I2/I4/R4/R8/DATE? */ -#define IS_ANCIENT (!HAVE_FUNC(VarI1FromI2)) -/* Is vt a type unavailable to ancient versions? */ -#define IS_MODERN_VTYPE(vt) (vt==VT_VARIANT||vt==VT_DECIMAL|| \ - vt==VT_I1||vt==VT_UI2||vt==VT_UI4||vt == VT_INT||vt == VT_UINT) - -/* Macros for converting and testing results */ -#define CONVVARS(typ) HRESULT hres; CONV_TYPE out; typ in - -#define _EXPECTRES(res, x, fs) \ - ok((hres == S_OK && out == (CONV_TYPE)(x)) || ((HRESULT)res != S_OK && hres == (HRESULT)res), \ - "expected " #x ", got " fs "; hres=0x%08x\n", out, hres) -#define EXPECT(x) EXPECTRES(S_OK, (x)) -#define EXPECT_OVERFLOW EXPECTRES(DISP_E_OVERFLOW, DISP_E_OVERFLOW) -#define EXPECT_MISMATCH EXPECTRES(DISP_E_TYPEMISMATCH,DISP_E_TYPEMISMATCH) -#define EXPECT_BADVAR EXPECTRES(DISP_E_BADVARTYPE, DISP_E_BADVARTYPE) -#define EXPECT_INVALID EXPECTRES(E_INVALIDARG, E_INVALIDARG) -#define EXPECT_LT EXPECTRES(VARCMP_LT, VARCMP_LT) -#define EXPECT_GT EXPECTRES(VARCMP_GT, VARCMP_GT) -#define EXPECT_EQ EXPECTRES(VARCMP_EQ, VARCMP_EQ) -#define EXPECT_DBL(x) \ - ok(hres == S_OK && fabs(out-(x))<=1e-14*(x), "expected %16.16g, got %16.16g; hres=0x%08x\n", (x), out, hres) - -#define CONVERT(func, val) in = val; hres = p##func(in, &out) -#define CONVERTRANGE(func,start,end) for (i = start; i < end; i+=1) { CONVERT(func, i); EXPECT(i); }; -#define OVERFLOWRANGE(func,start,end) for (i = start; i < end; i+=1) { CONVERT(func, i); EXPECT_OVERFLOW; }; - -#define CY_MULTIPLIER 10000 - -#define DATE_MIN -657434 -#define DATE_MAX 2958465 - -#define CONVERT_I8(func,hi,lo) in = hi; in = (in << 32) | lo; hres = p##func(in, &out) - -#define CONVERT_CY(func,val) in.int64 = (LONGLONG)(val * CY_MULTIPLIER); hres = p##func(in, &out) - -#define CONVERT_CY64(func,hi,lo) S(in).Hi = hi; S(in).Lo = lo; in.int64 *= CY_MULTIPLIER; hres = p##func(in, &out) - -#define SETDEC(dec, scl, sgn, hi, lo) S(U(dec)).scale = (BYTE)scl; S(U(dec)).sign = (BYTE)sgn; \ - dec.Hi32 = (ULONG)hi; U1(dec).Lo64 = (ULONG64)lo - -#define SETDEC64(dec, scl, sgn, hi, mid, lo) S(U(dec)).scale = (BYTE)scl; S(U(dec)).sign = (BYTE)sgn; \ - dec.Hi32 = (ULONG)hi; S1(U1(dec)).Mid32 = mid; S1(U1(dec)).Lo32 = lo; - -#define CONVERT_DEC(func,scl,sgn,hi,lo) SETDEC(in,scl,sgn,hi,lo); hres = p##func(&in, &out) - -#define CONVERT_DEC64(func,scl,sgn,hi,mid,lo) SETDEC64(in,scl,sgn,hi,mid,lo); hres = p##func(&in, &out) - -#define CONVERT_BADDEC(func) \ - if (HAVE_OLEAUT32_DECIMAL) \ - { \ - CONVERT_DEC(func,29,0,0,0); EXPECT_INVALID; \ - CONVERT_DEC(func,0,0x1,0,0); EXPECT_INVALID; \ - CONVERT_DEC(func,0,0x40,0,0); EXPECT_INVALID; \ - CONVERT_DEC(func,0,0x7f,0,0); EXPECT_INVALID; \ - } - -#define CONVERT_STR(func,str,flags) \ - SetLastError(0); \ - if (str) MultiByteToWideChar(CP_ACP,0,str,-1,buff,sizeof(buff)/sizeof(WCHAR)); \ - hres = p##func(str ? buff : NULL,in,flags,&out) - -#define COPYTEST(val, vt, srcval, dstval, srcref, dstref, fs) do { \ - HRESULT hres; VARIANTARG vSrc, vDst; CONV_TYPE in = val; \ - VariantInit(&vSrc); VariantInit(&vDst); \ - V_VT(&vSrc) = vt; srcval = in; \ - hres = VariantCopy(&vDst, &vSrc); \ - ok(hres == S_OK && V_VT(&vDst) == vt && dstval == in, \ - "copy hres 0x%X, type %d, value (" fs ") " fs "\n", hres, V_VT(&vDst), val, dstval); \ - V_VT(&vSrc) = vt|VT_BYREF; srcref = ∈ \ - hres = VariantCopy(&vDst, &vSrc); \ - ok(hres == S_OK && V_VT(&vDst) == (vt|VT_BYREF) && dstref == &in, \ - "ref hres 0x%X, type %d, ref (%p) %p\n", hres, V_VT(&vDst), &in, dstref); \ - hres = VariantCopyInd(&vDst, &vSrc); \ - ok(hres == S_OK && V_VT(&vDst) == vt && dstval == in, \ - "ind hres 0x%X, type %d, value (" fs ") " fs "\n", hres, V_VT(&vDst), val, dstval); \ - } while(0) - -#define CHANGETYPEEX(typ) hres = VariantChangeTypeEx(&vDst, &vSrc, 0, 0, typ) - -#define TYPETEST(typ,res,fs) CHANGETYPEEX(typ); \ - ok(hres == S_OK && V_VT(&vDst) == typ && (CONV_TYPE)res == in, \ - "hres=0x%X, type=%d (should be %d(" #typ ")), value=" fs " (should be " fs ")\n", \ - hres, V_VT(&vDst), typ, (CONV_TYPE)res, in); -#define TYPETESTI8(typ,res) CHANGETYPEEX(typ); \ - ok(hres == S_OK && V_VT(&vDst) == typ && (CONV_TYPE)res == in, \ - "hres=0x%X, type=%d (should be %d(" #typ ")), value=%d (should be 1)\n", \ - hres, V_VT(&vDst), typ, (int)res); -#define BADVAR(typ) CHANGETYPEEX(typ); out = (CONV_TYPE)hres; EXPECT_BADVAR -#define MISMATCH(typ) CHANGETYPEEX(typ); out = (CONV_TYPE)hres; EXPECT_MISMATCH - -#define INITIAL_TYPETEST(vt, val, fs) \ - VariantInit(&vSrc); \ - VariantInit(&vDst); \ - V_VT(&vSrc) = vt; \ - (val(&vSrc)) = in; \ - if (!IS_ANCIENT) { \ - TYPETEST(VT_I1, V_I1(&vDst), fs); \ - TYPETEST(VT_UI2, V_UI2(&vDst), fs); \ - TYPETEST(VT_UI4, V_UI4(&vDst), fs); \ - TYPETEST(VT_INT, V_INT(&vDst), fs); \ - TYPETEST(VT_UINT, V_UINT(&vDst), fs); \ - } else { \ - BADVAR(VT_I1); BADVAR(VT_UI2); BADVAR(VT_UI4); \ - BADVAR(VT_INT); BADVAR(VT_UINT); \ - } \ - TYPETEST(VT_UI1, V_UI1(&vDst), fs); \ - TYPETEST(VT_I2, V_I2(&vDst), fs); \ - TYPETEST(VT_I4, V_I4(&vDst), fs); \ - TYPETEST(VT_R4, V_R4(&vDst), fs); \ - TYPETEST(VT_R8, V_R8(&vDst), fs); \ - TYPETEST(VT_DATE, V_DATE(&vDst), fs); \ - if (HAVE_OLEAUT32_I8) \ - { \ - TYPETEST(VT_I8, V_I8(&vDst), fs); \ - TYPETEST(VT_UI8, V_UI8(&vDst), fs); \ - } -#define NEGATIVE_TYPETEST(vt, val, fs, vtneg, valneg) \ - in = -in; \ - VariantInit(&vSrc); \ - VariantInit(&vDst); \ - V_VT(&vSrc) = vt; \ - (val(&vSrc)) = in; \ - if (!IS_ANCIENT) { \ - TYPETEST(vtneg, valneg(&vDst), fs); \ - } - -#define INITIAL_TYPETESTI8(vt, val) \ - VariantInit(&vSrc); \ - VariantInit(&vDst); \ - V_VT(&vSrc) = vt; \ - (val(&vSrc)) = in; \ - TYPETESTI8(VT_I1, V_I1(&vDst)); \ - TYPETESTI8(VT_UI1, V_UI1(&vDst)); \ - TYPETESTI8(VT_I2, V_I2(&vDst)); \ - TYPETESTI8(VT_UI2, V_UI2(&vDst)); \ - TYPETESTI8(VT_I4, V_I4(&vDst)); \ - TYPETESTI8(VT_UI4, V_UI4(&vDst)); \ - TYPETESTI8(VT_INT, V_INT(&vDst)); \ - TYPETESTI8(VT_UINT, V_UINT(&vDst)); \ - TYPETESTI8(VT_R4, V_R4(&vDst)); \ - TYPETESTI8(VT_R8, V_R8(&vDst)); \ - TYPETESTI8(VT_DATE, V_DATE(&vDst)); \ - TYPETESTI8(VT_I8, V_I8(&vDst)); \ - TYPETESTI8(VT_UI8, V_UI8(&vDst)) - -#define COMMON_TYPETEST \ - hres = VariantChangeTypeEx(&vDst, &vSrc, 0, 0, VT_BOOL); \ - ok(hres == S_OK && V_VT(&vDst) == VT_BOOL && \ - (V_BOOL(&vDst) == VARIANT_TRUE || (V_VT(&vSrc) == VT_BOOL && V_BOOL(&vDst) == 1)), \ - "->VT_BOOL hres=0x%X, type=%d (should be VT_BOOL), value %d (should be VARIANT_TRUE)\n", \ - hres, V_VT(&vDst), V_BOOL(&vDst)); \ - if (HAVE_OLEAUT32_CY) \ - { \ - hres = VariantChangeTypeEx(&vDst, &vSrc, 0, 0, VT_CY); \ - ok(hres == S_OK && V_VT(&vDst) == VT_CY && V_CY(&vDst).int64 == CY_MULTIPLIER, \ - "->VT_CY hres=0x%X, type=%d (should be VT_CY), value (%08x,%08x) (should be CY_MULTIPLIER)\n", \ - hres, V_VT(&vDst), S(V_CY(&vDst)).Hi, S(V_CY(&vDst)).Lo); \ - } \ - if (V_VT(&vSrc) != VT_DATE) \ - { \ - hres = VariantChangeTypeEx(&vDst, &vSrc, 0, 0, VT_BSTR); \ - ok(hres == S_OK && V_VT(&vDst) == VT_BSTR && \ - V_BSTR(&vDst) && V_BSTR(&vDst)[0] == '1' && V_BSTR(&vDst)[1] == '\0', \ - "->VT_BSTR hres=0x%X, type=%d (should be VT_BSTR), *bstr='%c'\n", \ - hres, V_VT(&vDst), V_BSTR(&vDst) ? *V_BSTR(&vDst) : '?'); \ - } \ - if (HAVE_OLEAUT32_DECIMAL) \ - { \ - hres = VariantChangeTypeEx(&vDst, &vSrc, 0, 0, VT_DECIMAL); \ - ok(hres == S_OK && V_VT(&vDst) == VT_DECIMAL && \ - S(U(V_DECIMAL(&vDst))).sign == 0 && S(U(V_DECIMAL(&vDst))).scale == 0 && \ - V_DECIMAL(&vDst).Hi32 == 0 && U1(V_DECIMAL(&vDst)).Lo64 == (ULONGLONG)in, \ - "->VT_DECIMAL hres=0x%X, type=%d (should be VT_DECIMAL), sign=%d, scale=%d, hi=%u, lo=(%8x %8x),\n", \ - hres, V_VT(&vDst), S(U(V_DECIMAL(&vDst))).sign, S(U(V_DECIMAL(&vDst))).scale, \ - V_DECIMAL(&vDst).Hi32, S1(U1(V_DECIMAL(&vDst))).Mid32, S1(U1(V_DECIMAL(&vDst))).Lo32); \ - } \ - hres = VariantChangeTypeEx(&vDst, &vSrc, 0, 0, VT_EMPTY); \ - ok(hres == S_OK && V_VT(&vDst) == VT_EMPTY, "->VT_EMPTY hres=0x%X, type=%d (should be VT_EMPTY)\n", hres, V_VT(&vDst)); \ - hres = VariantChangeTypeEx(&vDst, &vSrc, 0, 0, VT_NULL); \ - ok(hres == S_OK && V_VT(&vDst) == VT_NULL, "->VT_NULL hres=0x%X, type=%d (should be VT_NULL)\n", hres, V_VT(&vDst)); \ - MISMATCH(VT_DISPATCH); \ - MISMATCH(VT_ERROR); \ - MISMATCH(VT_UNKNOWN); \ - if (!IS_ANCIENT) { MISMATCH(VT_VARIANT); } else { BADVAR(VT_VARIANT); } \ - if (HAVE_OLEAUT32_RECORD) \ - { \ - MISMATCH(VT_RECORD); \ - } \ - BADVAR(VT_VOID); \ - BADVAR(VT_HRESULT); \ - BADVAR(VT_SAFEARRAY); \ - BADVAR(VT_CARRAY); \ - BADVAR(VT_USERDEFINED); \ - BADVAR(VT_LPSTR); \ - BADVAR(VT_LPWSTR); \ - BADVAR(VT_PTR); \ - BADVAR(VT_INT_PTR); \ - BADVAR(VT_UINT_PTR); \ - BADVAR(VT_FILETIME); \ - BADVAR(VT_BLOB); \ - BADVAR(VT_STREAM); \ - BADVAR(VT_STORAGE); \ - BADVAR(VT_STREAMED_OBJECT); \ - BADVAR(VT_STORED_OBJECT); \ - BADVAR(VT_BLOB_OBJECT); \ - BADVAR(VT_CF); \ - BADVAR(VT_CLSID); \ - BADVAR(VT_BSTR_BLOB) - -/* Early versions of oleaut32 are missing many functions */ -static HRESULT (WINAPI *pVarI1FromUI1)(BYTE,signed char*); -static HRESULT (WINAPI *pVarI1FromI2)(SHORT,signed char*); -static HRESULT (WINAPI *pVarI1FromI4)(LONG,signed char*); -static HRESULT (WINAPI *pVarI1FromR4)(FLOAT,signed char*); -static HRESULT (WINAPI *pVarI1FromR8)(double,signed char*); -static HRESULT (WINAPI *pVarI1FromDate)(DATE,signed char*); -static HRESULT (WINAPI *pVarI1FromCy)(CY,signed char*); -static HRESULT (WINAPI *pVarI1FromStr)(OLECHAR*,LCID,ULONG,signed char*); -static HRESULT (WINAPI *pVarI1FromBool)(VARIANT_BOOL,signed char*); -static HRESULT (WINAPI *pVarI1FromUI2)(USHORT,signed char*); -static HRESULT (WINAPI *pVarI1FromUI4)(ULONG,signed char*); -static HRESULT (WINAPI *pVarI1FromDec)(DECIMAL*,signed char*); -static HRESULT (WINAPI *pVarI1FromI8)(LONG64,signed char*); -static HRESULT (WINAPI *pVarI1FromUI8)(ULONG64,signed char*); -static HRESULT (WINAPI *pVarUI1FromI2)(SHORT,BYTE*); -static HRESULT (WINAPI *pVarUI1FromI4)(LONG,BYTE*); -static HRESULT (WINAPI *pVarUI1FromR4)(FLOAT,BYTE*); -static HRESULT (WINAPI *pVarUI1FromR8)(double,BYTE*); -static HRESULT (WINAPI *pVarUI1FromCy)(CY,BYTE*); -static HRESULT (WINAPI *pVarUI1FromDate)(DATE,BYTE*); -static HRESULT (WINAPI *pVarUI1FromStr)(OLECHAR*,LCID,ULONG,BYTE*); -static HRESULT (WINAPI *pVarUI1FromBool)(VARIANT_BOOL,BYTE*); -static HRESULT (WINAPI *pVarUI1FromI1)(signed char,BYTE*); -static HRESULT (WINAPI *pVarUI1FromUI2)(USHORT,BYTE*); -static HRESULT (WINAPI *pVarUI1FromUI4)(ULONG,BYTE*); -static HRESULT (WINAPI *pVarUI1FromDec)(DECIMAL*,BYTE*); -static HRESULT (WINAPI *pVarUI1FromI8)(LONG64,BYTE*); -static HRESULT (WINAPI *pVarUI1FromUI8)(ULONG64,BYTE*); -static HRESULT (WINAPI *pVarUI1FromDisp)(IDispatch*,LCID,BYTE*); - -static HRESULT (WINAPI *pVarI2FromUI1)(BYTE,SHORT*); -static HRESULT (WINAPI *pVarI2FromI4)(LONG,SHORT*); -static HRESULT (WINAPI *pVarI2FromR4)(FLOAT,SHORT*); -static HRESULT (WINAPI *pVarI2FromR8)(double,SHORT*); -static HRESULT (WINAPI *pVarI2FromCy)(CY,SHORT*); -static HRESULT (WINAPI *pVarI2FromDate)(DATE,SHORT*); -static HRESULT (WINAPI *pVarI2FromStr)(OLECHAR*,LCID,ULONG,SHORT*); -static HRESULT (WINAPI *pVarI2FromBool)(VARIANT_BOOL,SHORT*); -static HRESULT (WINAPI *pVarI2FromI1)(signed char,SHORT*); -static HRESULT (WINAPI *pVarI2FromUI2)(USHORT,SHORT*); -static HRESULT (WINAPI *pVarI2FromUI4)(ULONG,SHORT*); -static HRESULT (WINAPI *pVarI2FromDec)(DECIMAL*,SHORT*); -static HRESULT (WINAPI *pVarI2FromI8)(LONG64,SHORT*); -static HRESULT (WINAPI *pVarI2FromUI8)(ULONG64,SHORT*); -static HRESULT (WINAPI *pVarUI2FromUI1)(BYTE,USHORT*); -static HRESULT (WINAPI *pVarUI2FromI2)(SHORT,USHORT*); -static HRESULT (WINAPI *pVarUI2FromI4)(LONG,USHORT*); -static HRESULT (WINAPI *pVarUI2FromR4)(FLOAT,USHORT*); -static HRESULT (WINAPI *pVarUI2FromR8)(double,USHORT*); -static HRESULT (WINAPI *pVarUI2FromDate)(DATE,USHORT*); -static HRESULT (WINAPI *pVarUI2FromCy)(CY,USHORT*); -static HRESULT (WINAPI *pVarUI2FromStr)(OLECHAR*,LCID,ULONG,USHORT*); -static HRESULT (WINAPI *pVarUI2FromBool)(VARIANT_BOOL,USHORT*); -static HRESULT (WINAPI *pVarUI2FromI1)(signed char,USHORT*); -static HRESULT (WINAPI *pVarUI2FromUI4)(ULONG,USHORT*); -static HRESULT (WINAPI *pVarUI2FromDec)(DECIMAL*,USHORT*); -static HRESULT (WINAPI *pVarUI2FromI8)(LONG64,USHORT*); -static HRESULT (WINAPI *pVarUI2FromUI8)(ULONG64,USHORT*); - -static HRESULT (WINAPI *pVarI4FromUI1)(BYTE,LONG*); -static HRESULT (WINAPI *pVarI4FromI2)(SHORT,LONG*); -static HRESULT (WINAPI *pVarI4FromR4)(FLOAT,LONG*); -static HRESULT (WINAPI *pVarI4FromR8)(DOUBLE,LONG*); -static HRESULT (WINAPI *pVarI4FromCy)(CY,LONG*); -static HRESULT (WINAPI *pVarI4FromDate)(DATE,LONG*); -static HRESULT (WINAPI *pVarI4FromStr)(OLECHAR*,LCID,ULONG,LONG*); -static HRESULT (WINAPI *pVarI4FromBool)(VARIANT_BOOL,LONG*); -static HRESULT (WINAPI *pVarI4FromI1)(signed char,LONG*); -static HRESULT (WINAPI *pVarI4FromUI2)(USHORT,LONG*); -static HRESULT (WINAPI *pVarI4FromUI4)(ULONG,LONG*); -static HRESULT (WINAPI *pVarI4FromDec)(DECIMAL*,LONG*); -static HRESULT (WINAPI *pVarI4FromI8)(LONG64,LONG*); -static HRESULT (WINAPI *pVarI4FromUI8)(ULONG64,LONG*); -static HRESULT (WINAPI *pVarUI4FromUI1)(BYTE,ULONG*); -static HRESULT (WINAPI *pVarUI4FromI2)(SHORT,ULONG*); -static HRESULT (WINAPI *pVarUI4FromI4)(LONG,ULONG*); -static HRESULT (WINAPI *pVarUI4FromR4)(FLOAT,ULONG*); -static HRESULT (WINAPI *pVarUI4FromR8)(DOUBLE,ULONG*); -static HRESULT (WINAPI *pVarUI4FromDate)(DATE,ULONG*); -static HRESULT (WINAPI *pVarUI4FromCy)(CY,ULONG*); -static HRESULT (WINAPI *pVarUI4FromStr)(OLECHAR*,LCID,ULONG,ULONG*); -static HRESULT (WINAPI *pVarUI4FromBool)(VARIANT_BOOL,ULONG*); -static HRESULT (WINAPI *pVarUI4FromI1)(signed char,ULONG*); -static HRESULT (WINAPI *pVarUI4FromUI2)(USHORT,ULONG*); -static HRESULT (WINAPI *pVarUI4FromDec)(DECIMAL*,ULONG*); -static HRESULT (WINAPI *pVarUI4FromI8)(LONG64,ULONG*); -static HRESULT (WINAPI *pVarUI4FromUI8)(ULONG64,ULONG*); - -static HRESULT (WINAPI *pVarI8FromUI1)(BYTE,LONG64*); -static HRESULT (WINAPI *pVarI8FromI2)(SHORT,LONG64*); -static HRESULT (WINAPI *pVarI8FromR4)(FLOAT,LONG64*); -static HRESULT (WINAPI *pVarI8FromR8)(double,LONG64*); -static HRESULT (WINAPI *pVarI8FromCy)(CY,LONG64*); -static HRESULT (WINAPI *pVarI8FromDate)(DATE,LONG64*); -static HRESULT (WINAPI *pVarI8FromStr)(OLECHAR*,LCID,ULONG,LONG64*); -static HRESULT (WINAPI *pVarI8FromBool)(VARIANT_BOOL,LONG64*); -static HRESULT (WINAPI *pVarI8FromI1)(signed char,LONG64*); -static HRESULT (WINAPI *pVarI8FromUI2)(USHORT,LONG64*); -static HRESULT (WINAPI *pVarI8FromUI4)(ULONG,LONG64*); -static HRESULT (WINAPI *pVarI8FromDec)(DECIMAL*,LONG64*); -static HRESULT (WINAPI *pVarI8FromUI8)(ULONG64,LONG64*); -static HRESULT (WINAPI *pVarUI8FromI8)(LONG64,ULONG64*); -static HRESULT (WINAPI *pVarUI8FromUI1)(BYTE,ULONG64*); -static HRESULT (WINAPI *pVarUI8FromI2)(SHORT,ULONG64*); -static HRESULT (WINAPI *pVarUI8FromR4)(FLOAT,ULONG64*); -static HRESULT (WINAPI *pVarUI8FromR8)(double,ULONG64*); -static HRESULT (WINAPI *pVarUI8FromCy)(CY,ULONG64*); -static HRESULT (WINAPI *pVarUI8FromDate)(DATE,ULONG64*); -static HRESULT (WINAPI *pVarUI8FromStr)(OLECHAR*,LCID,ULONG,ULONG64*); -static HRESULT (WINAPI *pVarUI8FromBool)(VARIANT_BOOL,ULONG64*); -static HRESULT (WINAPI *pVarUI8FromI1)(signed char,ULONG64*); -static HRESULT (WINAPI *pVarUI8FromUI2)(USHORT,ULONG64*); -static HRESULT (WINAPI *pVarUI8FromUI4)(ULONG,ULONG64*); -static HRESULT (WINAPI *pVarUI8FromDec)(DECIMAL*,ULONG64*); - -static HRESULT (WINAPI *pVarR4FromUI1)(BYTE,float*); -static HRESULT (WINAPI *pVarR4FromI2)(SHORT,float*); -static HRESULT (WINAPI *pVarR4FromI4)(LONG,float*); -static HRESULT (WINAPI *pVarR4FromR8)(double,float*); -static HRESULT (WINAPI *pVarR4FromCy)(CY,float*); -static HRESULT (WINAPI *pVarR4FromDate)(DATE,float*); -static HRESULT (WINAPI *pVarR4FromStr)(OLECHAR*,LCID,ULONG,float*); -static HRESULT (WINAPI *pVarR4FromBool)(VARIANT_BOOL,float*); -static HRESULT (WINAPI *pVarR4FromI1)(signed char,float*); -static HRESULT (WINAPI *pVarR4FromUI2)(USHORT,float*); -static HRESULT (WINAPI *pVarR4FromUI4)(ULONG,float*); -static HRESULT (WINAPI *pVarR4FromDec)(DECIMAL*,float*); -static HRESULT (WINAPI *pVarR4FromI8)(LONG64,float*); -static HRESULT (WINAPI *pVarR4FromUI8)(ULONG64,float*); - -static HRESULT (WINAPI *pVarR8FromUI1)(BYTE,double*); -static HRESULT (WINAPI *pVarR8FromI2)(SHORT,double*); -static HRESULT (WINAPI *pVarR8FromI4)(LONG,double*); -static HRESULT (WINAPI *pVarR8FromR4)(FLOAT,double*); -static HRESULT (WINAPI *pVarR8FromCy)(CY,double*); -static HRESULT (WINAPI *pVarR8FromDate)(DATE,double*); -static HRESULT (WINAPI *pVarR8FromStr)(OLECHAR*,LCID,ULONG,double*); -static HRESULT (WINAPI *pVarR8FromBool)(VARIANT_BOOL,double*); -static HRESULT (WINAPI *pVarR8FromI1)(signed char,double*); -static HRESULT (WINAPI *pVarR8FromUI2)(USHORT,double*); -static HRESULT (WINAPI *pVarR8FromUI4)(ULONG,double*); -static HRESULT (WINAPI *pVarR8FromDec)(DECIMAL*,double*); -static HRESULT (WINAPI *pVarR8FromI8)(LONG64,double*); -static HRESULT (WINAPI *pVarR8FromUI8)(ULONG64,double*); -static HRESULT (WINAPI *pVarR8Round)(double,int,double*); - -static HRESULT (WINAPI *pVarDateFromUI1)(BYTE,DATE*); -static HRESULT (WINAPI *pVarDateFromI2)(SHORT,DATE*); -static HRESULT (WINAPI *pVarDateFromI4)(LONG,DATE*); -static HRESULT (WINAPI *pVarDateFromR4)(FLOAT,DATE*); -static HRESULT (WINAPI *pVarDateFromCy)(CY,DATE*); -static HRESULT (WINAPI *pVarDateFromR8)(double,DATE*); -static HRESULT (WINAPI *pVarDateFromStr)(OLECHAR*,LCID,ULONG,DATE*); -static HRESULT (WINAPI *pVarDateFromBool)(VARIANT_BOOL,DATE*); -static HRESULT (WINAPI *pVarDateFromI1)(signed char,DATE*); -static HRESULT (WINAPI *pVarDateFromUI2)(USHORT,DATE*); -static HRESULT (WINAPI *pVarDateFromUI4)(ULONG,DATE*); -static HRESULT (WINAPI *pVarDateFromDec)(DECIMAL*,DATE*); -static HRESULT (WINAPI *pVarDateFromI8)(LONG64,DATE*); -static HRESULT (WINAPI *pVarDateFromUI8)(ULONG64,DATE*); - -static HRESULT (WINAPI *pVarCyFromUI1)(BYTE,CY*); -static HRESULT (WINAPI *pVarCyFromI2)(SHORT,CY*); -static HRESULT (WINAPI *pVarCyFromI4)(LONG,CY*); -static HRESULT (WINAPI *pVarCyFromR4)(FLOAT,CY*); -static HRESULT (WINAPI *pVarCyFromR8)(double,CY*); -static HRESULT (WINAPI *pVarCyFromDate)(DATE,CY*); -static HRESULT (WINAPI *pVarCyFromBool)(VARIANT_BOOL,CY*); -static HRESULT (WINAPI *pVarCyFromI1)(signed char,CY*); -static HRESULT (WINAPI *pVarCyFromUI2)(USHORT,CY*); -static HRESULT (WINAPI *pVarCyFromUI4)(ULONG,CY*); -static HRESULT (WINAPI *pVarCyFromDec)(DECIMAL*,CY*); -static HRESULT (WINAPI *pVarCyFromI8)(LONG64,CY*); -static HRESULT (WINAPI *pVarCyFromUI8)(ULONG64,CY*); -static HRESULT (WINAPI *pVarCyAdd)(const CY,const CY,CY*); -static HRESULT (WINAPI *pVarCyMul)(const CY,const CY,CY*); -static HRESULT (WINAPI *pVarCyMulI4)(const CY,LONG,CY*); -static HRESULT (WINAPI *pVarCySub)(const CY,const CY,CY*); -static HRESULT (WINAPI *pVarCyAbs)(const CY,CY*); -static HRESULT (WINAPI *pVarCyFix)(const CY,CY*); -static HRESULT (WINAPI *pVarCyInt)(const CY,CY*); -static HRESULT (WINAPI *pVarCyNeg)(const CY,CY*); -static HRESULT (WINAPI *pVarCyRound)(const CY,int,CY*); -static HRESULT (WINAPI *pVarCyCmp)(const CY,const CY); -static HRESULT (WINAPI *pVarCyCmpR8)(const CY,double); -static HRESULT (WINAPI *pVarCyMulI8)(const CY,LONG64,CY*); - -static HRESULT (WINAPI *pVarDecFromUI1)(BYTE,DECIMAL*); -static HRESULT (WINAPI *pVarDecFromI2)(SHORT,DECIMAL*); -static HRESULT (WINAPI *pVarDecFromI4)(LONG,DECIMAL*); -static HRESULT (WINAPI *pVarDecFromI8)(LONG64,DECIMAL*); -static HRESULT (WINAPI *pVarDecFromR4)(FLOAT,DECIMAL*); -static HRESULT (WINAPI *pVarDecFromR8)(DOUBLE,DECIMAL*); -static HRESULT (WINAPI *pVarDecFromDate)(DATE,DECIMAL*); -static HRESULT (WINAPI *pVarDecFromStr)(OLECHAR*,LCID,ULONG,DECIMAL*); -static HRESULT (WINAPI *pVarDecFromBool)(VARIANT_BOOL,DECIMAL*); -static HRESULT (WINAPI *pVarDecFromI1)(signed char,DECIMAL*); -static HRESULT (WINAPI *pVarDecFromUI2)(USHORT,DECIMAL*); -static HRESULT (WINAPI *pVarDecFromUI4)(ULONG,DECIMAL*); -static HRESULT (WINAPI *pVarDecFromUI8)(ULONG64,DECIMAL*); -static HRESULT (WINAPI *pVarDecFromCy)(CY,DECIMAL*); -static HRESULT (WINAPI *pVarDecAbs)(const DECIMAL*,DECIMAL*); -static HRESULT (WINAPI *pVarDecAdd)(const DECIMAL*,const DECIMAL*,DECIMAL*); -static HRESULT (WINAPI *pVarDecSub)(const DECIMAL*,const DECIMAL*,DECIMAL*); -static HRESULT (WINAPI *pVarDecMul)(const DECIMAL*,const DECIMAL*,DECIMAL*); -static HRESULT (WINAPI *pVarDecDiv)(const DECIMAL*,const DECIMAL*,DECIMAL*); -static HRESULT (WINAPI *pVarDecCmp)(const DECIMAL*,const DECIMAL*); -static HRESULT (WINAPI *pVarDecNeg)(const DECIMAL*,DECIMAL*); - -static HRESULT (WINAPI *pVarBoolFromUI1)(BYTE,VARIANT_BOOL*); -static HRESULT (WINAPI *pVarBoolFromI2)(SHORT,VARIANT_BOOL*); -static HRESULT (WINAPI *pVarBoolFromI4)(LONG,VARIANT_BOOL*); -static HRESULT (WINAPI *pVarBoolFromR4)(FLOAT,VARIANT_BOOL*); -static HRESULT (WINAPI *pVarBoolFromR8)(DOUBLE,VARIANT_BOOL*); -static HRESULT (WINAPI *pVarBoolFromDate)(DATE,VARIANT_BOOL*); -static HRESULT (WINAPI *pVarBoolFromCy)(CY,VARIANT_BOOL*); -static HRESULT (WINAPI *pVarBoolFromStr)(OLECHAR*,LCID,ULONG,VARIANT_BOOL*); -static HRESULT (WINAPI *pVarBoolFromI1)(signed char,VARIANT_BOOL*); -static HRESULT (WINAPI *pVarBoolFromUI2)(USHORT,VARIANT_BOOL*); -static HRESULT (WINAPI *pVarBoolFromUI4)(ULONG,VARIANT_BOOL*); -static HRESULT (WINAPI *pVarBoolFromDec)(DECIMAL*,VARIANT_BOOL*); -static HRESULT (WINAPI *pVarBoolFromI8)(LONG64,VARIANT_BOOL*); -static HRESULT (WINAPI *pVarBoolFromUI8)(ULONG64,VARIANT_BOOL*); - -static HRESULT (WINAPI *pVarBstrFromR4)(FLOAT,LCID,ULONG,BSTR*); -static HRESULT (WINAPI *pVarBstrFromDate)(DATE,LCID,ULONG,BSTR*); -static HRESULT (WINAPI *pVarBstrFromCy)(CY,LCID,ULONG,BSTR*); -static HRESULT (WINAPI *pVarBstrFromDec)(DECIMAL*,LCID,ULONG,BSTR*); -static HRESULT (WINAPI *pVarBstrCmp)(BSTR,BSTR,LCID,ULONG); - -static INT (WINAPI *pSystemTimeToVariantTime)(LPSYSTEMTIME,double*); -static void (WINAPI *pClearCustData)(LPCUSTDATA); - -/* Internal representation of a BSTR */ -typedef struct tagINTERNAL_BSTR -{ - DWORD dwLen; - OLECHAR szString[1]; -} INTERNAL_BSTR, *LPINTERNAL_BSTR; - -typedef struct -{ - const IDispatchVtbl *lpVtbl; - LONG ref; - VARTYPE vt; - BOOL bFailInvoke; -} DummyDispatch; - -static DummyDispatch dispatch; - -static ULONG WINAPI DummyDispatch_AddRef(LPDISPATCH iface) -{ - trace("AddRef(%p)\n", iface); - return InterlockedIncrement(&((DummyDispatch*)iface)->ref); -} - -static ULONG WINAPI DummyDispatch_Release(LPDISPATCH iface) -{ - trace("Release(%p)\n", iface); - return InterlockedDecrement(&((DummyDispatch*)iface)->ref); -} - -static HRESULT WINAPI DummyDispatch_QueryInterface(LPDISPATCH iface, - REFIID riid, - void** ppvObject) -{ - trace("QueryInterface(%p)\n", iface); - if (ppvObject) - { - *ppvObject = NULL; - if (IsEqualIID(riid, &IID_IDispatch)) - { - trace("Asked for IID_IDispatch\n"); - *ppvObject = iface; - } - else if (IsEqualIID(riid, &IID_IUnknown)) - { - trace("Asked for IID_IUnknown\n"); - *ppvObject = iface; - } - if (*ppvObject) - { - DummyDispatch_AddRef(*ppvObject); - return S_OK; - } - } - return E_NOINTERFACE; -} - -static HRESULT WINAPI DummyDispatch_Invoke(LPDISPATCH iface, - DISPID dispIdMember, REFIID riid, - LCID lcid, WORD wFlags, - DISPPARAMS *pDispParams, - VARIANT *pVarResult, - EXCEPINFO *pExcepInfo, - UINT *puArgErr) -{ - trace("Invoke(%p)\n", iface); - ok(wFlags == DISPATCH_PROPERTYGET, "Flags wrong\n"); - ok(pDispParams->cArgs == 0, "Property get has args\n"); - - if (dispatch.bFailInvoke) - return E_OUTOFMEMORY; - - memset(pVarResult, 0, sizeof(*pVarResult)); - V_VT(pVarResult) = dispatch.vt; - return S_OK; -} - -static const IDispatchVtbl DummyDispatch_VTable = -{ - DummyDispatch_QueryInterface, - DummyDispatch_AddRef, - DummyDispatch_Release, - NULL, - NULL, - NULL, - DummyDispatch_Invoke -}; - -static DummyDispatch dispatch = { &DummyDispatch_VTable, 1, 0, 0 }; - -/* - * VT_I1/VT_UI1 - */ - -#undef CONV_TYPE -#define CONV_TYPE signed char -#undef EXPECTRES -#define EXPECTRES(res, x) _EXPECTRES(res, x, "%d") - -static void test_VarI1FromI2(void) -{ - CONVVARS(SHORT); - int i; - - CHECKPTR(VarI1FromI2); - OVERFLOWRANGE(VarI1FromI2, -32768, -128); - CONVERTRANGE(VarI1FromI2, -128, 128); - OVERFLOWRANGE(VarI1FromI2, 129, 32768); -} - -static void test_VarI1FromI4(void) -{ - CONVVARS(LONG); - int i; - - CHECKPTR(VarI1FromI4); - CONVERT(VarI1FromI4, -129); EXPECT_OVERFLOW; - CONVERTRANGE(VarI1FromI4, -128, 128); - CONVERT(VarI1FromI4, 128); EXPECT_OVERFLOW; -} - -static void test_VarI1FromI8(void) -{ - CONVVARS(LONG64); - int i; - - CHECKPTR(VarI1FromI8); - CONVERT(VarI1FromI8, -129); EXPECT_OVERFLOW; - CONVERTRANGE(VarI1FromI8, -127, 128); - CONVERT(VarI1FromI8, 128); EXPECT_OVERFLOW; -} - -static void test_VarI1FromUI1(void) -{ - CONVVARS(BYTE); - int i; - - CHECKPTR(VarI1FromUI1); - CONVERTRANGE(VarI1FromUI1, 0, 127); - OVERFLOWRANGE(VarI1FromUI1, 128, 255); -} - -static void test_VarI1FromUI2(void) -{ - CONVVARS(USHORT); - int i; - - CHECKPTR(VarI1FromUI2); - CONVERTRANGE(VarI1FromUI2, 0, 127); - OVERFLOWRANGE(VarI1FromUI2, 128, 32768); -} - -static void test_VarI1FromUI4(void) -{ - CONVVARS(ULONG); - int i; - - CHECKPTR(VarI1FromUI4); - CONVERTRANGE(VarI1FromUI4, 0, 127); - CONVERT(VarI1FromUI4, 128); EXPECT_OVERFLOW; -} - -static void test_VarI1FromUI8(void) -{ - CONVVARS(ULONG64); - int i; - - CHECKPTR(VarI1FromUI8); - CONVERTRANGE(VarI1FromUI8, 0, 127); - CONVERT(VarI1FromUI8, 128); EXPECT_OVERFLOW; -} - -static void test_VarI1FromBool(void) -{ - CONVVARS(VARIANT_BOOL); - int i; - - CHECKPTR(VarI1FromBool); - /* Note that conversions from bool wrap around! */ - CONVERT(VarI1FromBool, -129); EXPECT(127); - CONVERTRANGE(VarI1FromBool, -128, 128); - CONVERT(VarI1FromBool, 128); EXPECT(-128); -} - -static void test_VarI1FromR4(void) -{ - CONVVARS(FLOAT); - - CHECKPTR(VarI1FromR4); - CONVERT(VarI1FromR4, -129.0f); EXPECT_OVERFLOW; - CONVERT(VarI1FromR4, -128.0f); EXPECT(-128); - CONVERT(VarI1FromR4, -1.0f); EXPECT(-1); - CONVERT(VarI1FromR4, 0.0f); EXPECT(0); - CONVERT(VarI1FromR4, 1.0f); EXPECT(1); - CONVERT(VarI1FromR4, 127.0f); EXPECT(127); - CONVERT(VarI1FromR4, 128.0f); EXPECT_OVERFLOW; - - CONVERT(VarI1FromR4, -1.5f); EXPECT(-2); - CONVERT(VarI1FromR4, -0.6f); EXPECT(-1); - CONVERT(VarI1FromR4, -0.5f); EXPECT(0); - CONVERT(VarI1FromR4, -0.4f); EXPECT(0); - CONVERT(VarI1FromR4, 0.4f); EXPECT(0); - CONVERT(VarI1FromR4, 0.5f); EXPECT(0); - CONVERT(VarI1FromR4, 0.6f); EXPECT(1); - CONVERT(VarI1FromR4, 1.5f); EXPECT(2); -} - -static void test_VarI1FromR8(void) -{ - CONVVARS(DOUBLE); - - CHECKPTR(VarI1FromR8); - CONVERT(VarI1FromR8, -129.0); EXPECT_OVERFLOW; - CONVERT(VarI1FromR8, -128.0); EXPECT(-128); - CONVERT(VarI1FromR8, -1.0); EXPECT(-1); - CONVERT(VarI1FromR8, 0.0); EXPECT(0); - CONVERT(VarI1FromR8, 1.0); EXPECT(1); - CONVERT(VarI1FromR8, 127.0); EXPECT(127); - CONVERT(VarI1FromR8, 128.0); EXPECT_OVERFLOW; - - CONVERT(VarI1FromR8, -1.5); EXPECT(-2); - CONVERT(VarI1FromR8, -0.6); EXPECT(-1); - CONVERT(VarI1FromR8, -0.5); EXPECT(0); - CONVERT(VarI1FromR8, -0.4); EXPECT(0); - CONVERT(VarI1FromR8, 0.4); EXPECT(0); - CONVERT(VarI1FromR8, 0.5); EXPECT(0); - CONVERT(VarI1FromR8, 0.6); EXPECT(1); - CONVERT(VarI1FromR8, 1.5); EXPECT(2); -} - -static void test_VarI1FromDate(void) -{ - CONVVARS(DATE); - - CHECKPTR(VarI1FromDate); - CONVERT(VarI1FromDate, -129.0); EXPECT_OVERFLOW; - CONVERT(VarI1FromDate, -128.0); EXPECT(-128); - CONVERT(VarI1FromDate, -1.0); EXPECT(-1); - CONVERT(VarI1FromDate, 0.0); EXPECT(0); - CONVERT(VarI1FromDate, 1.0); EXPECT(1); - CONVERT(VarI1FromDate, 127.0); EXPECT(127); - CONVERT(VarI1FromDate, 128.0); EXPECT_OVERFLOW; - - CONVERT(VarI1FromDate, -1.5); EXPECT(-2); - CONVERT(VarI1FromDate, -0.6); EXPECT(-1); - CONVERT(VarI1FromDate, -0.5); EXPECT(0); - CONVERT(VarI1FromDate, -0.4); EXPECT(0); - CONVERT(VarI1FromDate, 0.4); EXPECT(0); - CONVERT(VarI1FromDate, 0.5); EXPECT(0); - CONVERT(VarI1FromDate, 0.6); EXPECT(1); - CONVERT(VarI1FromDate, 1.5); EXPECT(2); -} - -static void test_VarI1FromCy(void) -{ - CONVVARS(CY); - - CHECKPTR(VarI1FromCy); - CONVERT_CY(VarI1FromCy,-129); EXPECT_OVERFLOW; - CONVERT_CY(VarI1FromCy,-128); EXPECT(128); - CONVERT_CY(VarI1FromCy,-1); EXPECT(-1); - CONVERT_CY(VarI1FromCy,0); EXPECT(0); - CONVERT_CY(VarI1FromCy,1); EXPECT(1); - CONVERT_CY(VarI1FromCy,127); EXPECT(127); - CONVERT_CY(VarI1FromCy,128); EXPECT_OVERFLOW; - - CONVERT_CY(VarI1FromCy,-1.5); EXPECT(-2); - CONVERT_CY(VarI1FromCy,-0.6); EXPECT(-1); - CONVERT_CY(VarI1FromCy,-0.5); EXPECT(0); - CONVERT_CY(VarI1FromCy,-0.4); EXPECT(0); - CONVERT_CY(VarI1FromCy,0.4); EXPECT(0); - CONVERT_CY(VarI1FromCy,0.5); EXPECT(0); - CONVERT_CY(VarI1FromCy,0.6); EXPECT(1); - CONVERT_CY(VarI1FromCy,1.5); EXPECT(2); -} - -static void test_VarI1FromDec(void) -{ - CONVVARS(DECIMAL); - - CHECKPTR(VarI1FromDec); - - CONVERT_BADDEC(VarI1FromDec); - - CONVERT_DEC(VarI1FromDec,0,0x80,0,129); EXPECT_OVERFLOW; - CONVERT_DEC(VarI1FromDec,0,0x80,0,128); EXPECT(-128); - CONVERT_DEC(VarI1FromDec,0,0x80,0,1); EXPECT(-1); - CONVERT_DEC(VarI1FromDec,0,0,0,0); EXPECT(0); - CONVERT_DEC(VarI1FromDec,0,0,0,1); EXPECT(1); - CONVERT_DEC(VarI1FromDec,0,0,0,127); EXPECT(127); - CONVERT_DEC(VarI1FromDec,0,0,0,128); EXPECT_OVERFLOW; - - CONVERT_DEC(VarI1FromDec,2,0x80,0,12800); EXPECT(-128); - CONVERT_DEC(VarI1FromDec,2,0,0,12700); EXPECT(127); -} - -static void test_VarI1FromStr(void) -{ - CONVVARS(LCID); - OLECHAR buff[128]; - - in = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT); - - CHECKPTR(VarI1FromStr); - - CONVERT_STR(VarI1FromStr,NULL, 0); EXPECT_MISMATCH; - CONVERT_STR(VarI1FromStr,"0", 0); EXPECT(0); - CONVERT_STR(VarI1FromStr,"-129", 0); EXPECT_OVERFLOW; - CONVERT_STR(VarI1FromStr,"-128", 0); EXPECT(-128); - CONVERT_STR(VarI1FromStr,"127", 0); EXPECT(127); - CONVERT_STR(VarI1FromStr,"128", 0); EXPECT_OVERFLOW; - - CONVERT_STR(VarI1FromStr,"-1.5", LOCALE_NOUSEROVERRIDE); EXPECT(-2); - CONVERT_STR(VarI1FromStr,"-0.6", LOCALE_NOUSEROVERRIDE); EXPECT(-1); - CONVERT_STR(VarI1FromStr,"-0.5", LOCALE_NOUSEROVERRIDE); EXPECT(0); - CONVERT_STR(VarI1FromStr,"-0.4", LOCALE_NOUSEROVERRIDE); EXPECT(0); - CONVERT_STR(VarI1FromStr,"0.4", LOCALE_NOUSEROVERRIDE); EXPECT(0); - CONVERT_STR(VarI1FromStr,"0.5", LOCALE_NOUSEROVERRIDE); EXPECT(0); - CONVERT_STR(VarI1FromStr,"0.6", LOCALE_NOUSEROVERRIDE); EXPECT(1); - CONVERT_STR(VarI1FromStr,"1.5", LOCALE_NOUSEROVERRIDE); EXPECT(2); -} - -static void test_VarI1Copy(void) -{ - if (!IS_ANCIENT) - { - COPYTEST(1, VT_I1, V_I1(&vSrc), V_I1(&vDst), V_I1REF(&vSrc), V_I1REF(&vDst), "%d"); - } -} - -static void test_VarI1ChangeTypeEx(void) -{ - CONVVARS(CONV_TYPE); - VARIANTARG vSrc, vDst; - - in = 1; - - if (!IS_ANCIENT) - { - INITIAL_TYPETEST(VT_I1, V_I1, "%d"); - COMMON_TYPETEST; - NEGATIVE_TYPETEST(VT_I1, V_I1, "%d", VT_UI1, V_UI1); - } -} - -#undef CONV_TYPE -#define CONV_TYPE BYTE - -static void test_VarUI1FromI1(void) -{ - CONVVARS(signed char); - int i; - - CHECKPTR(VarUI1FromI1); - OVERFLOWRANGE(VarUI1FromI1, -128, 0); - CONVERTRANGE(VarUI1FromI1, 0, 128); -} - -static void test_VarUI1FromI2(void) -{ - CONVVARS(SHORT); - int i; - - CHECKPTR(VarUI1FromI2); - OVERFLOWRANGE(VarUI1FromI2, -32768, 0); - CONVERTRANGE(VarUI1FromI2, 0, 256); - OVERFLOWRANGE(VarUI1FromI2, 256, 32768); -} - -static void test_VarUI1FromI4(void) -{ - CONVVARS(LONG); - int i; - - CHECKPTR(VarUI1FromI4); - CONVERT(VarUI1FromI4, -1); EXPECT_OVERFLOW; - CONVERTRANGE(VarUI1FromI4, 0, 256); - CONVERT(VarUI1FromI4, 256); EXPECT_OVERFLOW; -} - -static void test_VarUI1FromI8(void) -{ - CONVVARS(LONG64); - int i; - - CHECKPTR(VarUI1FromI8); - CONVERT(VarUI1FromI8, -1); EXPECT_OVERFLOW; - CONVERTRANGE(VarUI1FromI8, 0, 256); - CONVERT(VarUI1FromI8, 256); EXPECT_OVERFLOW; -} - -static void test_VarUI1FromUI2(void) -{ - CONVVARS(USHORT); - int i; - - CHECKPTR(VarUI1FromUI2); - CONVERTRANGE(VarUI1FromUI2, 0, 256); - OVERFLOWRANGE(VarUI1FromUI2, 256, 65536); -} - -static void test_VarUI1FromUI4(void) -{ - CONVVARS(ULONG); - int i; - - CHECKPTR(VarUI1FromUI4); - CONVERTRANGE(VarUI1FromUI4, 0, 256); - CONVERT(VarUI1FromUI4, 256); EXPECT_OVERFLOW; -} - -static void test_VarUI1FromUI8(void) -{ - CONVVARS(ULONG64); - int i; - - CHECKPTR(VarUI1FromUI8); - CONVERTRANGE(VarUI1FromUI8, 0, 256); - CONVERT(VarUI1FromUI8, 256); EXPECT_OVERFLOW; -} - -static void test_VarUI1FromBool(void) -{ - CONVVARS(VARIANT_BOOL); - int i; - - CHECKPTR(VarUI1FromBool); - /* Note that conversions from bool overflow! */ - CONVERT(VarUI1FromBool, -1); EXPECT(255); - CONVERTRANGE(VarUI1FromBool, 0, 256); - CONVERT(VarUI1FromBool, 256); EXPECT(0); -} - -static void test_VarUI1FromR4(void) -{ - CONVVARS(FLOAT); - - CHECKPTR(VarUI1FromR4); - CONVERT(VarUI1FromR4, -1.0f); EXPECT_OVERFLOW; - CONVERT(VarUI1FromR4, 0.0f); EXPECT(0); - CONVERT(VarUI1FromR4, 1.0f); EXPECT(1); - CONVERT(VarUI1FromR4, 255.0f); EXPECT(255); - CONVERT(VarUI1FromR4, 256.0f); EXPECT_OVERFLOW; - - /* Rounding */ - CONVERT(VarUI1FromR4, -1.5f); EXPECT_OVERFLOW; - CONVERT(VarUI1FromR4, -0.6f); EXPECT_OVERFLOW; - CONVERT(VarUI1FromR4, -0.5f); EXPECT(0); - CONVERT(VarUI1FromR4, -0.4f); EXPECT(0); - CONVERT(VarUI1FromR4, 0.4f); EXPECT(0); - CONVERT(VarUI1FromR4, 0.5f); EXPECT(0); - CONVERT(VarUI1FromR4, 0.6f); EXPECT(1); - CONVERT(VarUI1FromR4, 1.5f); EXPECT(2); -} - -static void test_VarUI1FromR8(void) -{ - CONVVARS(DOUBLE); - - CHECKPTR(VarUI1FromR8); - CONVERT(VarUI1FromR8, -1.0); EXPECT_OVERFLOW; - CONVERT(VarUI1FromR8, 0.0); EXPECT(0); - CONVERT(VarUI1FromR8, 1.0); EXPECT(1); - CONVERT(VarUI1FromR8, 255.0); EXPECT(255); - CONVERT(VarUI1FromR8, 256.0); EXPECT_OVERFLOW; - - /* Rounding */ - CONVERT(VarUI1FromR8, -1.5); EXPECT_OVERFLOW; - CONVERT(VarUI1FromR8, -0.6); EXPECT_OVERFLOW; - CONVERT(VarUI1FromR8, -0.5); EXPECT(0); - CONVERT(VarUI1FromR8, -0.4); EXPECT(0); - CONVERT(VarUI1FromR8, 0.4); EXPECT(0); - CONVERT(VarUI1FromR8, 0.5); EXPECT(0); - CONVERT(VarUI1FromR8, 0.6); EXPECT(1); - CONVERT(VarUI1FromR8, 1.5); EXPECT(2); -} - -static void test_VarUI1FromDate(void) -{ - CONVVARS(DATE); - - CHECKPTR(VarUI1FromDate); - CONVERT(VarUI1FromDate, -1.0); EXPECT_OVERFLOW; - CONVERT(VarUI1FromDate, 0.0); EXPECT(0); - CONVERT(VarUI1FromDate, 1.0); EXPECT(1); - CONVERT(VarUI1FromDate, 255.0); EXPECT(255); - CONVERT(VarUI1FromDate, 256.0); EXPECT_OVERFLOW; - - /* Rounding */ - CONVERT(VarUI1FromDate, -1.5); EXPECT_OVERFLOW; - CONVERT(VarUI1FromDate, -0.6); EXPECT_OVERFLOW; - CONVERT(VarUI1FromDate, -0.5); EXPECT(0); - CONVERT(VarUI1FromDate, -0.4); EXPECT(0); - CONVERT(VarUI1FromDate, 0.4); EXPECT(0); - CONVERT(VarUI1FromDate, 0.5); EXPECT(0); - CONVERT(VarUI1FromDate, 0.6); EXPECT(1); - CONVERT(VarUI1FromDate, 1.5); EXPECT(2); -} - -static void test_VarUI1FromCy(void) -{ - CONVVARS(CY); - - CHECKPTR(VarUI1FromCy); - CONVERT_CY(VarUI1FromCy,-1); EXPECT_OVERFLOW; - CONVERT_CY(VarUI1FromCy,0); EXPECT(0); - CONVERT_CY(VarUI1FromCy,1); EXPECT(1); - CONVERT_CY(VarUI1FromCy,255); EXPECT(255); - CONVERT_CY(VarUI1FromCy,256); EXPECT_OVERFLOW; - - /* Rounding */ - CONVERT_CY(VarUI1FromCy,-1.5); EXPECT_OVERFLOW; - CONVERT_CY(VarUI1FromCy,-0.6); EXPECT_OVERFLOW; - CONVERT_CY(VarUI1FromCy,-0.5); EXPECT(0); - CONVERT_CY(VarUI1FromCy,-0.4); EXPECT(0); - CONVERT_CY(VarUI1FromCy,0.4); EXPECT(0); - CONVERT_CY(VarUI1FromCy,0.5); EXPECT(0); - CONVERT_CY(VarUI1FromCy,0.6); EXPECT(1); - CONVERT_CY(VarUI1FromCy,1.5); EXPECT(2); -} - -static void test_VarUI1FromDec(void) -{ - CONVVARS(DECIMAL); - - CHECKPTR(VarUI1FromDec); - - CONVERT_BADDEC(VarUI1FromDec); - - CONVERT_DEC(VarUI1FromDec,0,0x80,0,1); EXPECT_OVERFLOW; - CONVERT_DEC(VarUI1FromDec,0,0,0,0); EXPECT(0); - CONVERT_DEC(VarUI1FromDec,0,0,0,1); EXPECT(1); - CONVERT_DEC(VarUI1FromDec,0,0,0,255); EXPECT(255); - CONVERT_DEC(VarUI1FromDec,0,0,0,256); EXPECT_OVERFLOW; - - CONVERT_DEC(VarUI1FromDec,2,0x80,0,100); EXPECT_OVERFLOW; - CONVERT_DEC(VarUI1FromDec,2,0,0,25500); EXPECT(255); -} - -static void test_VarUI1FromStr(void) -{ - CONVVARS(LCID); - OLECHAR buff[128]; - - in = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT); - - CHECKPTR(VarUI1FromStr); - - CONVERT_STR(VarUI1FromStr,NULL, 0); EXPECT_MISMATCH; - CONVERT_STR(VarUI1FromStr,"0", 0); EXPECT(0); - CONVERT_STR(VarUI1FromStr,"-1", 0); EXPECT_OVERFLOW; - CONVERT_STR(VarUI1FromStr,"255", 0); EXPECT(255); - CONVERT_STR(VarUI1FromStr,"256", 0); EXPECT_OVERFLOW; - - /* Rounding */ - CONVERT_STR(VarUI1FromStr,"-1.5", LOCALE_NOUSEROVERRIDE); EXPECT_OVERFLOW; - CONVERT_STR(VarUI1FromStr,"-0.6", LOCALE_NOUSEROVERRIDE); EXPECT_OVERFLOW; - CONVERT_STR(VarUI1FromStr,"-0.5", LOCALE_NOUSEROVERRIDE); EXPECT(0); - CONVERT_STR(VarUI1FromStr,"-0.4", LOCALE_NOUSEROVERRIDE); EXPECT(0); - CONVERT_STR(VarUI1FromStr,"0.4", LOCALE_NOUSEROVERRIDE); EXPECT(0); - CONVERT_STR(VarUI1FromStr,"0.5", LOCALE_NOUSEROVERRIDE); EXPECT(0); - CONVERT_STR(VarUI1FromStr,"0.6", LOCALE_NOUSEROVERRIDE); EXPECT(1); - CONVERT_STR(VarUI1FromStr,"1.5", LOCALE_NOUSEROVERRIDE); EXPECT(2); -} - -static void test_VarUI1FromDisp(void) -{ - CONVVARS(LCID); - VARIANTARG vSrc, vDst; - - CHECKPTR(VarUI1FromDisp); - - /* FIXME - * Conversions from IDispatch should get the default 'value' property - * from the IDispatch pointer and return it. The following tests this. - * However, I can't get these tests to return a valid value under native - * oleaut32, regardless of the value returned in response to the Invoke() - * call (early versions of oleaut32 call AddRef/Release, but not Invoke. - * I'm obviously missing something, as these conversions work fine - * when called through VBA on an object to get its default value property. - * - * Should this test be corrected so that it works under native it should be - * generalised and the remaining types checked as well. - */ - in = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT); - - VariantInit(&vSrc); - VariantInit(&vDst); - - V_VT(&vSrc) = VT_DISPATCH; - V_DISPATCH(&vSrc) = (IDispatch*)&dispatch; - dispatch.vt = VT_UI1; - dispatch.bFailInvoke = FALSE; - - hres = pVarUI1FromDisp((IDispatch*)&dispatch, in, &out); - trace("0x%08x\n", hres); - - hres = VariantChangeTypeEx(&vDst, &vSrc, in, 0, VT_UI1); - trace("0x%08x\n", hres); - - dispatch.bFailInvoke = TRUE; - - hres = pVarUI1FromDisp((IDispatch*)&dispatch, in, &out); - trace("0x%08x\n", hres); - - hres = VariantChangeTypeEx(&vDst, &vSrc, in, 0, VT_UI1); - trace("0x%08x\n", hres); -} - -static void test_VarUI1Copy(void) -{ - COPYTEST(1, VT_UI1, V_UI1(&vSrc), V_UI1(&vDst), V_UI1REF(&vSrc), V_UI1REF(&vDst), "%d"); -} - -static void test_VarUI1ChangeTypeEx(void) -{ - CONVVARS(CONV_TYPE); - VARIANTARG vSrc, vDst; - - in = 1; - - INITIAL_TYPETEST(VT_UI1, V_UI1, "%d"); - COMMON_TYPETEST; - NEGATIVE_TYPETEST(VT_UI1, V_UI1, "%d", VT_I1, V_I1); -} - -/* - * VT_I2/VT_UI2 - */ - -#undef CONV_TYPE -#define CONV_TYPE SHORT -#undef EXPECTRES -#define EXPECTRES(res, x) _EXPECTRES(res, x, "%d") - -static void test_VarI2FromI1(void) -{ - CONVVARS(signed char); - int i; - - CHECKPTR(VarI2FromI1); - CONVERTRANGE(VarI2FromI1, -128, 128); -} - -static void test_VarI2FromI4(void) -{ - CONVVARS(LONG); - int i; - - CHECKPTR(VarI2FromI4); - CONVERT(VarI2FromI4, -32769); EXPECT_OVERFLOW; - CONVERTRANGE(VarI2FromI4, -32768, 32768); - CONVERT(VarI2FromI4, 32768); EXPECT_OVERFLOW; -} - -static void test_VarI2FromI8(void) -{ - CONVVARS(LONG64); - - CHECKPTR(VarI2FromI8); - CONVERT(VarI2FromI8, -32769); EXPECT_OVERFLOW; - CONVERT(VarI2FromI8, -32768); EXPECT(-32768); - CONVERT(VarI2FromI8, 32767); EXPECT(32767); - CONVERT(VarI2FromI8, 32768); EXPECT_OVERFLOW; -} - -static void test_VarI2FromUI1(void) -{ - CONVVARS(BYTE); - int i; - - CHECKPTR(VarI2FromUI1); - CONVERTRANGE(VarI2FromUI1, 0, 256); -} - -static void test_VarI2FromUI2(void) -{ - CONVVARS(USHORT); - int i; - - CHECKPTR(VarI2FromUI2); - CONVERTRANGE(VarI2FromUI2, 0, 32768); - CONVERT(VarI2FromUI2, 32768); EXPECT_OVERFLOW; -} - -static void test_VarI2FromUI4(void) -{ - CONVVARS(ULONG); - int i; - - CHECKPTR(VarI2FromUI4); - CONVERTRANGE(VarI2FromUI4, 0, 32768); - CONVERT(VarI2FromUI4, 32768); EXPECT_OVERFLOW; -} - -static void test_VarI2FromUI8(void) -{ - CONVVARS(ULONG64); - int i; - - CHECKPTR(VarI2FromUI8); - CONVERTRANGE(VarI2FromUI8, 0, 32768); - CONVERT(VarI2FromUI8, 32768); EXPECT_OVERFLOW; -} - -static void test_VarI2FromBool(void) -{ - CONVVARS(VARIANT_BOOL); - int i; - - CHECKPTR(VarI2FromBool); - CONVERTRANGE(VarI2FromBool, -32768, 32768); -} - -static void test_VarI2FromR4(void) -{ - CONVVARS(FLOAT); - - CHECKPTR(VarI2FromR4); - CONVERT(VarI2FromR4, -32769.0f); EXPECT_OVERFLOW; - CONVERT(VarI2FromR4, -32768.0f); EXPECT(-32768); - CONVERT(VarI2FromR4, -1.0f); EXPECT(-1); - CONVERT(VarI2FromR4, 0.0f); EXPECT(0); - CONVERT(VarI2FromR4, 1.0f); EXPECT(1); - CONVERT(VarI2FromR4, 32767.0f); EXPECT(32767); - CONVERT(VarI2FromR4, 32768.0f); EXPECT_OVERFLOW; - - /* Rounding */ - CONVERT(VarI2FromR4, -1.5f); EXPECT(-2); - CONVERT(VarI2FromR4, -0.6f); EXPECT(-1); - CONVERT(VarI2FromR4, -0.5f); EXPECT(0); - CONVERT(VarI2FromR4, -0.4f); EXPECT(0); - CONVERT(VarI2FromR4, 0.4f); EXPECT(0); - CONVERT(VarI2FromR4, 0.5f); EXPECT(0); - CONVERT(VarI2FromR4, 0.6f); EXPECT(1); - CONVERT(VarI2FromR4, 1.5f); EXPECT(2); -} - -static void test_VarI2FromR8(void) -{ - CONVVARS(DOUBLE); - - CHECKPTR(VarI2FromR8); - CONVERT(VarI2FromR8, -32769.0); EXPECT_OVERFLOW; - CONVERT(VarI2FromR8, -32768.0); EXPECT(-32768); - CONVERT(VarI2FromR8, -1.0); EXPECT(-1); - CONVERT(VarI2FromR8, 0.0); EXPECT(0); - CONVERT(VarI2FromR8, 1.0); EXPECT(1); - CONVERT(VarI2FromR8, 32767.0); EXPECT(32767); - CONVERT(VarI2FromR8, 32768.0); EXPECT_OVERFLOW; - - /* Rounding */ - CONVERT(VarI2FromR8, -1.5); EXPECT(-2); - CONVERT(VarI2FromR8, -0.6); EXPECT(-1); - CONVERT(VarI2FromR8, -0.5); EXPECT(0); - CONVERT(VarI2FromR8, -0.4); EXPECT(0); - CONVERT(VarI2FromR8, 0.4); EXPECT(0); - CONVERT(VarI2FromR8, 0.5); EXPECT(0); - CONVERT(VarI2FromR8, 0.6); EXPECT(1); - CONVERT(VarI2FromR8, 1.5); EXPECT(2); -} - -static void test_VarI2FromDate(void) -{ - CONVVARS(DATE); - - CHECKPTR(VarI2FromDate); - CONVERT(VarI2FromDate, -32769.0); EXPECT_OVERFLOW; - CONVERT(VarI2FromDate, -32768.0); EXPECT(-32768); - CONVERT(VarI2FromDate, -1.0); EXPECT(-1); - CONVERT(VarI2FromDate, 0.0); EXPECT(0); - CONVERT(VarI2FromDate, 1.0); EXPECT(1); - CONVERT(VarI2FromDate, 32767.0); EXPECT(32767); - CONVERT(VarI2FromDate, 32768.0); EXPECT_OVERFLOW; - - /* Rounding */ - CONVERT(VarI2FromDate, -1.5); EXPECT(-2); - CONVERT(VarI2FromDate, -0.6); EXPECT(-1); - CONVERT(VarI2FromDate, -0.5); EXPECT(0); - CONVERT(VarI2FromDate, -0.4); EXPECT(0); - CONVERT(VarI2FromDate, 0.4); EXPECT(0); - CONVERT(VarI2FromDate, 0.5); EXPECT(0); - CONVERT(VarI2FromDate, 0.6); EXPECT(1); - CONVERT(VarI2FromDate, 1.5); EXPECT(2); -} - -static void test_VarI2FromCy(void) -{ - CONVVARS(CY); - - CHECKPTR(VarI2FromCy); - CONVERT_CY(VarI2FromCy,-32769); EXPECT_OVERFLOW; - CONVERT_CY(VarI2FromCy,-32768); EXPECT(32768); - CONVERT_CY(VarI2FromCy,-1); EXPECT(-1); - CONVERT_CY(VarI2FromCy,0); EXPECT(0); - CONVERT_CY(VarI2FromCy,1); EXPECT(1); - CONVERT_CY(VarI2FromCy,32767); EXPECT(32767); - CONVERT_CY(VarI2FromCy,32768); EXPECT_OVERFLOW; - - /* Rounding */ - CONVERT_CY(VarI2FromCy,-1.5); EXPECT(-2); - CONVERT_CY(VarI2FromCy,-0.6); EXPECT(-1); - CONVERT_CY(VarI2FromCy,-0.5); EXPECT(0); - CONVERT_CY(VarI2FromCy,-0.4); EXPECT(0); - CONVERT_CY(VarI2FromCy,0.4); EXPECT(0); - CONVERT_CY(VarI2FromCy,0.5); EXPECT(0); - CONVERT_CY(VarI2FromCy,0.6); EXPECT(1); - CONVERT_CY(VarI2FromCy,1.5); EXPECT(2); -} - -static void test_VarI2FromDec(void) -{ - CONVVARS(DECIMAL); - - CHECKPTR(VarI2FromDec); - - CONVERT_BADDEC(VarI2FromDec); - - CONVERT_DEC(VarI2FromDec,0,0x80,0,32769); EXPECT_OVERFLOW; - CONVERT_DEC(VarI2FromDec,0,0x80,0,32768); EXPECT(-32768); - CONVERT_DEC(VarI2FromDec,0,0x80,0,1); EXPECT(-1); - CONVERT_DEC(VarI2FromDec,0,0,0,0); EXPECT(0); - CONVERT_DEC(VarI2FromDec,0,0,0,1); EXPECT(1); - CONVERT_DEC(VarI2FromDec,0,0,0,32767); EXPECT(32767); - CONVERT_DEC(VarI2FromDec,0,0,0,32768); EXPECT_OVERFLOW; - - CONVERT_DEC(VarI2FromDec,2,0x80,0,3276800); EXPECT(-32768); - CONVERT_DEC(VarI2FromDec,2,0,0,3276700); EXPECT(32767); - CONVERT_DEC(VarI2FromDec,2,0,0,3276800); EXPECT_OVERFLOW; -} - -static void test_VarI2FromStr(void) -{ - CONVVARS(LCID); - OLECHAR buff[128]; - - in = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT); - - CHECKPTR(VarI2FromStr); - - CONVERT_STR(VarI2FromStr,NULL, 0); EXPECT_MISMATCH; - CONVERT_STR(VarI2FromStr,"0", 0); EXPECT(0); - CONVERT_STR(VarI2FromStr,"-32769", 0); EXPECT_OVERFLOW; - CONVERT_STR(VarI2FromStr,"-32768", 0); EXPECT(-32768); - CONVERT_STR(VarI2FromStr,"32767", 0); EXPECT(32767); - CONVERT_STR(VarI2FromStr,"32768", 0); EXPECT_OVERFLOW; - - /* Rounding */ - CONVERT_STR(VarI2FromStr,"-1.5", LOCALE_NOUSEROVERRIDE); EXPECT(-2); - CONVERT_STR(VarI2FromStr,"-0.6", LOCALE_NOUSEROVERRIDE); EXPECT(-1); - CONVERT_STR(VarI2FromStr,"-0.5", LOCALE_NOUSEROVERRIDE); EXPECT(0); - CONVERT_STR(VarI2FromStr,"-0.4", LOCALE_NOUSEROVERRIDE); EXPECT(0); - CONVERT_STR(VarI2FromStr,"0.4", LOCALE_NOUSEROVERRIDE); EXPECT(0); - CONVERT_STR(VarI2FromStr,"0.5", LOCALE_NOUSEROVERRIDE); EXPECT(0); - CONVERT_STR(VarI2FromStr,"0.6", LOCALE_NOUSEROVERRIDE); EXPECT(1); - CONVERT_STR(VarI2FromStr,"1.5", LOCALE_NOUSEROVERRIDE); EXPECT(2); -} - -static void test_VarI2Copy(void) -{ - COPYTEST(1, VT_I2, V_I2(&vSrc), V_I2(&vDst), V_I2REF(&vSrc), V_I2REF(&vDst), "%d"); -} - -static void test_VarI2ChangeTypeEx(void) -{ - CONVVARS(CONV_TYPE); - VARIANTARG vSrc, vDst; - - in = 1; - - INITIAL_TYPETEST(VT_I2, V_I2, "%d"); - COMMON_TYPETEST; - NEGATIVE_TYPETEST(VT_I2, V_I2, "%d", VT_UI2, V_UI2); -} - -#undef CONV_TYPE -#define CONV_TYPE USHORT - -static void test_VarUI2FromI1(void) -{ - CONVVARS(signed char); - int i; - - CHECKPTR(VarUI2FromI1); - OVERFLOWRANGE(VarUI2FromI1, -128, 0); - CONVERTRANGE(VarUI2FromI1, 0, 128); -} - -static void test_VarUI2FromI2(void) -{ - CONVVARS(SHORT); - int i; - - CHECKPTR(VarUI2FromI2); - OVERFLOWRANGE(VarUI2FromI2, -32768, 0); - CONVERTRANGE(VarUI2FromI2, 0, 32768); -} - -static void test_VarUI2FromI4(void) -{ - CONVVARS(LONG); - int i; - - CHECKPTR(VarUI2FromI4); - OVERFLOWRANGE(VarUI2FromI4, -32768, 0); - CONVERT(VarUI2FromI4, 0); EXPECT(0); - CONVERT(VarUI2FromI4, 65535); EXPECT(65535); - CONVERT(VarUI2FromI4, 65536); EXPECT_OVERFLOW; -} - -static void test_VarUI2FromI8(void) -{ - CONVVARS(LONG64); - int i; - - CHECKPTR(VarUI2FromI8); - OVERFLOWRANGE(VarUI2FromI8, -32768, 0); - CONVERT(VarUI2FromI8, 0); EXPECT(0); - CONVERT(VarUI2FromI8, 65535); EXPECT(65535); - CONVERT(VarUI2FromI8, 65536); EXPECT_OVERFLOW; -} - -static void test_VarUI2FromUI1(void) -{ - CONVVARS(BYTE); - int i; - - CHECKPTR(VarUI2FromUI1); - CONVERTRANGE(VarUI2FromUI1, 0, 256); -} - -static void test_VarUI2FromUI4(void) -{ - CONVVARS(ULONG); - - CHECKPTR(VarUI2FromUI4); - CONVERT(VarUI2FromUI4, 0); EXPECT(0); - CONVERT(VarUI2FromUI4, 65535); EXPECT(65535); - CONVERT(VarUI2FromUI4, 65536); EXPECT_OVERFLOW; -} - -static void test_VarUI2FromUI8(void) -{ - CONVVARS(ULONG64); - - CHECKPTR(VarUI2FromUI8); - CONVERT(VarUI2FromUI8, 0); EXPECT(0); - CONVERT(VarUI2FromUI8, 65535); EXPECT(65535); - CONVERT(VarUI2FromUI8, 65536); EXPECT_OVERFLOW; -} - -static void test_VarUI2FromBool(void) -{ - CONVVARS(VARIANT_BOOL); - int i; - - CHECKPTR(VarUI2FromBool); - CONVERT(VarUI2FromBool, -1); EXPECT(65535); /* Wraps! */ - CONVERTRANGE(VarUI2FromBool, 0, 32768); -} - -static void test_VarUI2FromR4(void) -{ - CONVVARS(FLOAT); - - CHECKPTR(VarUI2FromR4); - CONVERT(VarUI2FromR4, -1.0f); EXPECT_OVERFLOW; - CONVERT(VarUI2FromR4, 0.0f); EXPECT(0); - CONVERT(VarUI2FromR4, 1.0f); EXPECT(1); - CONVERT(VarUI2FromR4, 65535.0f); EXPECT(65535); - CONVERT(VarUI2FromR4, 65536.0f); EXPECT_OVERFLOW; - - /* Rounding */ - CONVERT(VarUI2FromR4, -1.5f); EXPECT_OVERFLOW; - CONVERT(VarUI2FromR4, -0.6f); EXPECT_OVERFLOW; - CONVERT(VarUI2FromR4, -0.5f); EXPECT(0); - CONVERT(VarUI2FromR4, -0.4f); EXPECT(0); - CONVERT(VarUI2FromR4, 0.4f); EXPECT(0); - CONVERT(VarUI2FromR4, 0.5f); EXPECT(0); - CONVERT(VarUI2FromR4, 0.6f); EXPECT(1); - CONVERT(VarUI2FromR4, 1.5f); EXPECT(2); -} - -static void test_VarUI2FromR8(void) -{ - CONVVARS(DOUBLE); - - CHECKPTR(VarUI2FromR8); - CONVERT(VarUI2FromR8, -1.0); EXPECT_OVERFLOW; - CONVERT(VarUI2FromR8, 0.0); EXPECT(0); - CONVERT(VarUI2FromR8, 1.0); EXPECT(1); - CONVERT(VarUI2FromR8, 65535.0); EXPECT(65535); - CONVERT(VarUI2FromR8, 65536.0); EXPECT_OVERFLOW; - - /* Rounding */ - CONVERT(VarUI2FromR8, -1.5); EXPECT_OVERFLOW; - CONVERT(VarUI2FromR8, -0.6); EXPECT_OVERFLOW; - CONVERT(VarUI2FromR8, -0.5); EXPECT(0); - CONVERT(VarUI2FromR8, -0.4); EXPECT(0); - CONVERT(VarUI2FromR8, 0.4); EXPECT(0); - CONVERT(VarUI2FromR8, 0.5); EXPECT(0); - CONVERT(VarUI2FromR8, 0.6); EXPECT(1); - CONVERT(VarUI2FromR8, 1.5); EXPECT(2); -} - -static void test_VarUI2FromDate(void) -{ - CONVVARS(DATE); - - CHECKPTR(VarUI2FromDate); - CONVERT(VarUI2FromDate, -1.0); EXPECT_OVERFLOW; - CONVERT(VarUI2FromDate, 0.0); EXPECT(0); - CONVERT(VarUI2FromDate, 1.0); EXPECT(1); - CONVERT(VarUI2FromDate, 65535.0); EXPECT(65535); - CONVERT(VarUI2FromDate, 65536.0); EXPECT_OVERFLOW; - - /* Rounding */ - CONVERT(VarUI2FromDate, -1.5); EXPECT_OVERFLOW; - CONVERT(VarUI2FromDate, -0.6); EXPECT_OVERFLOW; - CONVERT(VarUI2FromDate, -0.5); EXPECT(0); - CONVERT(VarUI2FromDate, -0.4); EXPECT(0); - CONVERT(VarUI2FromDate, 0.4); EXPECT(0); - CONVERT(VarUI2FromDate, 0.5); EXPECT(0); - CONVERT(VarUI2FromDate, 0.6); EXPECT(1); - CONVERT(VarUI2FromDate, 1.5); EXPECT(2); -} - -static void test_VarUI2FromCy(void) -{ - CONVVARS(CY); - - CHECKPTR(VarUI2FromCy); - CONVERT_CY(VarUI2FromCy,-1); EXPECT_OVERFLOW; - CONVERT_CY(VarUI2FromCy,0); EXPECT(0); - CONVERT_CY(VarUI2FromCy,1); EXPECT(1); - CONVERT_CY(VarUI2FromCy,65535); EXPECT(65535); - CONVERT_CY(VarUI2FromCy,65536); EXPECT_OVERFLOW; - - /* Rounding */ - CONVERT_CY(VarUI2FromCy,-1.5); EXPECT_OVERFLOW; - CONVERT_CY(VarUI2FromCy,-0.6); EXPECT_OVERFLOW; - CONVERT_CY(VarUI2FromCy,-0.5); EXPECT(0); - CONVERT_CY(VarUI2FromCy,-0.4); EXPECT(0); - CONVERT_CY(VarUI2FromCy,0.4); EXPECT(0); - CONVERT_CY(VarUI2FromCy,0.5); EXPECT(0); - CONVERT_CY(VarUI2FromCy,0.6); EXPECT(1); - CONVERT_CY(VarUI2FromCy,1.5); EXPECT(2); -} - -static void test_VarUI2FromDec(void) -{ - CONVVARS(DECIMAL); - - CHECKPTR(VarUI2FromDec); - - CONVERT_BADDEC(VarUI2FromDec); - - CONVERT_DEC(VarUI2FromDec,0,0x80,0,1); EXPECT_OVERFLOW; - CONVERT_DEC(VarUI2FromDec,0,0,0,0); EXPECT(0); - CONVERT_DEC(VarUI2FromDec,0,0,0,1); EXPECT(1); - CONVERT_DEC(VarUI2FromDec,0,0,0,65535); EXPECT(65535); - CONVERT_DEC(VarUI2FromDec,0,0,0,65536); EXPECT_OVERFLOW; - - CONVERT_DEC(VarUI2FromDec,2,0x80,0,100); EXPECT_OVERFLOW; - CONVERT_DEC(VarUI2FromDec,2,0,0,6553500); EXPECT(65535); - CONVERT_DEC(VarUI2FromDec,2,0,0,6553600); EXPECT_OVERFLOW; -} - -static void test_VarUI2FromStr(void) -{ - CONVVARS(LCID); - OLECHAR buff[128]; - - in = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT); - - CHECKPTR(VarUI2FromStr); - - CONVERT_STR(VarUI2FromStr,NULL, 0); EXPECT_MISMATCH; - CONVERT_STR(VarUI2FromStr,"0", 0); EXPECT(0); - CONVERT_STR(VarUI2FromStr,"-1", 0); EXPECT_OVERFLOW; - CONVERT_STR(VarUI2FromStr,"65535", 0); EXPECT(65535); - CONVERT_STR(VarUI2FromStr,"65536", 0); EXPECT_OVERFLOW; - - /* Rounding */ - CONVERT_STR(VarUI2FromStr,"-1.5", LOCALE_NOUSEROVERRIDE); EXPECT_OVERFLOW; - CONVERT_STR(VarUI2FromStr,"-0.6", LOCALE_NOUSEROVERRIDE); EXPECT_OVERFLOW; - CONVERT_STR(VarUI2FromStr,"-0.5", LOCALE_NOUSEROVERRIDE); EXPECT(0); - CONVERT_STR(VarUI2FromStr,"-0.4", LOCALE_NOUSEROVERRIDE); EXPECT(0); - CONVERT_STR(VarUI2FromStr,"0.4", LOCALE_NOUSEROVERRIDE); EXPECT(0); - CONVERT_STR(VarUI2FromStr,"0.5", LOCALE_NOUSEROVERRIDE); EXPECT(0); - CONVERT_STR(VarUI2FromStr,"0.6", LOCALE_NOUSEROVERRIDE); EXPECT(1); - CONVERT_STR(VarUI2FromStr,"1.5", LOCALE_NOUSEROVERRIDE); EXPECT(2); -} - -static void test_VarUI2Copy(void) -{ - if (!IS_ANCIENT) - { - COPYTEST(1, VT_UI2, V_UI2(&vSrc), V_UI2(&vDst), V_UI2REF(&vSrc), V_UI2REF(&vDst), "%d"); - } -} - -static void test_VarUI2ChangeTypeEx(void) -{ - CONVVARS(CONV_TYPE); - VARIANTARG vSrc, vDst; - - in = 1; - - if (!IS_ANCIENT) - { - INITIAL_TYPETEST(VT_UI2, V_UI2, "%d"); - COMMON_TYPETEST; - NEGATIVE_TYPETEST(VT_UI2, V_UI2, "%d", VT_I2, V_I2); - } -} - -/* - * VT_I4/VT_UI4 - */ - -#undef CONV_TYPE -#define CONV_TYPE LONG -#undef EXPECTRES -#define EXPECTRES(res, x) _EXPECTRES(res, x, "%d") - - -static void test_VarI4FromI1(void) -{ - CONVVARS(signed char); - int i; - - CHECKPTR(VarI4FromI1); - CONVERTRANGE(VarI4FromI1, -128, 128); -} - -static void test_VarI4FromI2(void) -{ - CONVVARS(SHORT); - int i; - - CHECKPTR(VarI4FromI2); - CONVERTRANGE(VarI4FromI2, -32768, 32768); -} - -static void test_VarI4FromI8(void) -{ - CONVVARS(LONG64); - - CHECKPTR(VarI4FromI8); - CHECKPTR(VarI4FromDec); - - CONVERT(VarI4FromI8, -1); EXPECT(-1); - CONVERT(VarI4FromI8, 0); EXPECT(0); - CONVERT(VarI4FromI8, 1); EXPECT(1); - - CONVERT_I8(VarI4FromI8, -1, 2147483647ul); EXPECT_OVERFLOW; - CONVERT_I8(VarI4FromI8, -1, 2147483648ul); EXPECT(-2147483647 - 1); - CONVERT_I8(VarI4FromI8, 0, 2147483647ul); EXPECT(2147483647); - CONVERT_I8(VarI4FromI8, 0, 2147483648ul); EXPECT_OVERFLOW; -} - -static void test_VarI4FromUI1(void) -{ - CONVVARS(BYTE); - int i; - - CHECKPTR(VarI4FromUI1); - CONVERTRANGE(VarI4FromUI1, 0, 256); -} - -static void test_VarI4FromUI2(void) -{ - CONVVARS(USHORT); - int i; - - CHECKPTR(VarI4FromUI2); - CONVERTRANGE(VarI4FromUI2, 0, 65536); -} - -static void test_VarI4FromUI4(void) -{ - CONVVARS(ULONG); - - CHECKPTR(VarI4FromUI4); - CONVERT(VarI4FromUI4, 0); EXPECT(0); - CONVERT(VarI4FromUI4, 1); EXPECT(1); - CONVERT(VarI4FromUI4, 2147483647); EXPECT(2147483647); - CONVERT(VarI4FromUI4, 2147483648ul); EXPECT_OVERFLOW; -} - -static void test_VarI4FromUI8(void) -{ - CONVVARS(ULONG64); - - CHECKPTR(VarI4FromUI8); - CONVERT(VarI4FromUI8, 0); EXPECT(0); - CONVERT(VarI4FromUI8, 1); EXPECT(1); - CONVERT(VarI4FromUI8, 2147483647); EXPECT(2147483647); - CONVERT(VarI4FromUI8, 2147483648ul); EXPECT_OVERFLOW; -} - -static void test_VarI4FromBool(void) -{ - CONVVARS(VARIANT_BOOL); - int i; - - CHECKPTR(VarI4FromBool); - CONVERTRANGE(VarI4FromBool, -32768, 32768); -} - -static void test_VarI4FromR4(void) -{ - CONVVARS(FLOAT); - - CHECKPTR(VarI4FromR4); - - /* min/max values are not exactly representable in a float */ - CONVERT(VarI4FromR4, -1.0f); EXPECT(-1); - CONVERT(VarI4FromR4, 0.0f); EXPECT(0); - CONVERT(VarI4FromR4, 1.0f); EXPECT(1); - - CONVERT(VarI4FromR4, -1.5f); EXPECT(-2); - CONVERT(VarI4FromR4, -0.6f); EXPECT(-1); - CONVERT(VarI4FromR4, -0.5f); EXPECT(0); - CONVERT(VarI4FromR4, -0.4f); EXPECT(0); - CONVERT(VarI4FromR4, 0.4f); EXPECT(0); - CONVERT(VarI4FromR4, 0.5f); EXPECT(0); - CONVERT(VarI4FromR4, 0.6f); EXPECT(1); - CONVERT(VarI4FromR4, 1.5f); EXPECT(2); -} - -static void test_VarI4FromR8(void) -{ - CONVVARS(DOUBLE); - - CHECKPTR(VarI4FromR8); - CONVERT(VarI4FromR8, -2147483649.0); EXPECT_OVERFLOW; - CONVERT(VarI4FromR8, -2147483648.0); EXPECT(-2147483647 - 1); - CONVERT(VarI4FromR8, -1.0); EXPECT(-1); - CONVERT(VarI4FromR8, 0.0); EXPECT(0); - CONVERT(VarI4FromR8, 1.0); EXPECT(1); - CONVERT(VarI4FromR8, 2147483647.0); EXPECT(2147483647); - CONVERT(VarI4FromR8, 2147483648.0); EXPECT_OVERFLOW; - - CONVERT(VarI4FromR8, -1.5); EXPECT(-2); - CONVERT(VarI4FromR8, -0.6); EXPECT(-1); - CONVERT(VarI4FromR8, -0.5); EXPECT(0); - CONVERT(VarI4FromR8, -0.4); EXPECT(0); - CONVERT(VarI4FromR8, 0.4); EXPECT(0); - CONVERT(VarI4FromR8, 0.5); EXPECT(0); - CONVERT(VarI4FromR8, 0.6); EXPECT(1); - CONVERT(VarI4FromR8, 1.5); EXPECT(2); -} - -static void test_VarI4FromDate(void) -{ - CONVVARS(DATE); - - CHECKPTR(VarI4FromDate); - CONVERT(VarI4FromDate, -2147483649.0); EXPECT_OVERFLOW; - CONVERT(VarI4FromDate, -2147483648.0); EXPECT(-2147483647 - 1); - CONVERT(VarI4FromDate, -1.0); EXPECT(-1); - CONVERT(VarI4FromDate, 0.0); EXPECT(0); - CONVERT(VarI4FromDate, 1.0); EXPECT(1); - CONVERT(VarI4FromDate, 2147483647.0); EXPECT(2147483647); - CONVERT(VarI4FromDate, 2147483648.0); EXPECT_OVERFLOW; - - CONVERT(VarI4FromDate, -1.5); EXPECT(-2); - CONVERT(VarI4FromDate, -0.6); EXPECT(-1); - CONVERT(VarI4FromDate, -0.5); EXPECT(0); - CONVERT(VarI4FromDate, -0.4); EXPECT(0); - CONVERT(VarI4FromDate, 0.4); EXPECT(0); - CONVERT(VarI4FromDate, 0.5); EXPECT(0); - CONVERT(VarI4FromDate, 0.6); EXPECT(1); - CONVERT(VarI4FromDate, 1.5); EXPECT(2); -} - -static void test_VarI4FromCy(void) -{ - CONVVARS(CY); - - CHECKPTR(VarI4FromCy); - CONVERT_CY(VarI4FromCy,-1); EXPECT(-1); - CONVERT_CY(VarI4FromCy,0); EXPECT(0); - CONVERT_CY(VarI4FromCy,1); EXPECT(1); - - CONVERT_CY64(VarI4FromCy,-1,2147483647ul); EXPECT_OVERFLOW; - CONVERT_CY64(VarI4FromCy,-1,2147483648ul); EXPECT(-2147483647 - 1); - CONVERT_CY64(VarI4FromCy,0,2147483647ul); EXPECT(2147483647ul); - CONVERT_CY64(VarI4FromCy,0,2147483648ul); EXPECT_OVERFLOW; - - CONVERT_CY(VarI4FromCy,-1.5); EXPECT(-2); - CONVERT_CY(VarI4FromCy,-0.6); EXPECT(-1); - CONVERT_CY(VarI4FromCy,-0.5); EXPECT(0); - CONVERT_CY(VarI4FromCy,-0.4); EXPECT(0); - CONVERT_CY(VarI4FromCy,0.4); EXPECT(0); - CONVERT_CY(VarI4FromCy,0.5); EXPECT(0); - CONVERT_CY(VarI4FromCy,0.6); EXPECT(1); - CONVERT_CY(VarI4FromCy,1.5); EXPECT(2); -} - -static void test_VarI4FromDec(void) -{ - CONVVARS(DECIMAL); - - CHECKPTR(VarI4FromDec); - - CONVERT_BADDEC(VarI4FromDec); - - CONVERT_DEC(VarI4FromDec,0,0x80,0,1); EXPECT(-1); - CONVERT_DEC(VarI4FromDec,0,0,0,0); EXPECT(0); - CONVERT_DEC(VarI4FromDec,0,0,0,1); EXPECT(1); - - CONVERT_DEC64(VarI4FromDec,0,0x80,0,0,2147483649ul); EXPECT_OVERFLOW; - CONVERT_DEC64(VarI4FromDec,0,0x80,0,0,2147483648ul); EXPECT(-2147483647 - 1); - CONVERT_DEC64(VarI4FromDec,0,0,0,0,2147483647ul); EXPECT(2147483647ul); - CONVERT_DEC64(VarI4FromDec,0,0,0,0,2147483648ul); EXPECT_OVERFLOW; - - CONVERT_DEC64(VarI4FromDec,2,0x80,0,50,100); EXPECT_OVERFLOW; - CONVERT_DEC64(VarI4FromDec,2,0x80,0,50,0); EXPECT(-2147483647 - 1); - CONVERT_DEC64(VarI4FromDec,2,0,0,49,4294967196ul); EXPECT(2147483647); - CONVERT_DEC64(VarI4FromDec,2,0,0,50,0); EXPECT_OVERFLOW; -} - -static void test_VarI4FromStr(void) -{ - CONVVARS(LCID); - OLECHAR buff[128]; - - in = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT); - - CHECKPTR(VarI4FromStr); - - CONVERT_STR(VarI4FromStr,NULL,0); EXPECT_MISMATCH; - CONVERT_STR(VarI4FromStr,"0",0); EXPECT(0); - CONVERT_STR(VarI4FromStr,"-2147483649",0); EXPECT_OVERFLOW; - CONVERT_STR(VarI4FromStr,"-2147483648",0); EXPECT(-2147483647 -1); - CONVERT_STR(VarI4FromStr,"2147483647",0); EXPECT(2147483647); - CONVERT_STR(VarI4FromStr,"2147483648",0); EXPECT_OVERFLOW; - - /* Rounding */ - CONVERT_STR(VarI4FromStr,"-1.5",LOCALE_NOUSEROVERRIDE); EXPECT(-2); - CONVERT_STR(VarI4FromStr,"-0.6",LOCALE_NOUSEROVERRIDE); EXPECT(-1); - CONVERT_STR(VarI4FromStr,"-0.5",LOCALE_NOUSEROVERRIDE); EXPECT(0); - CONVERT_STR(VarI4FromStr,"-0.4",LOCALE_NOUSEROVERRIDE); EXPECT(0); - CONVERT_STR(VarI4FromStr,"0.4",LOCALE_NOUSEROVERRIDE); EXPECT(0); - CONVERT_STR(VarI4FromStr,"0.5",LOCALE_NOUSEROVERRIDE); EXPECT(0); - CONVERT_STR(VarI4FromStr,"0.6",LOCALE_NOUSEROVERRIDE); EXPECT(1); - CONVERT_STR(VarI4FromStr,"1.5",LOCALE_NOUSEROVERRIDE); EXPECT(2); -} - -static void test_VarI4Copy(void) -{ - COPYTEST(1, VT_I4, V_I4(&vSrc), V_I4(&vDst), V_I4REF(&vSrc), V_I4REF(&vDst), "%d"); -} - -static void test_VarI4ChangeTypeEx(void) -{ - CONVVARS(CONV_TYPE); - VARIANTARG vSrc, vDst; - - in = 1; - - INITIAL_TYPETEST(VT_I4, V_I4, "%d"); - COMMON_TYPETEST; - NEGATIVE_TYPETEST(VT_I4, V_I4, "%d", VT_UI4, V_UI4); -} - -#undef CONV_TYPE -#define CONV_TYPE ULONG -#undef EXPECTRES -#define EXPECTRES(res, x) _EXPECTRES(res, x, "%u") - -static void test_VarUI4FromI1(void) -{ - CONVVARS(signed char); - int i; - - CHECKPTR(VarUI4FromI1); - OVERFLOWRANGE(VarUI4FromI1, -127, 0); - CONVERTRANGE(VarUI4FromI1, 0, 128); -} - -static void test_VarUI4FromI2(void) -{ - CONVVARS(SHORT); - int i; - - CHECKPTR(VarUI4FromI2); - OVERFLOWRANGE(VarUI4FromI2, -32768, 0); - CONVERTRANGE(VarUI4FromI2, 0, 32768); -} - -static void test_VarUI4FromUI2(void) -{ - CONVVARS(USHORT); - int i; - - CHECKPTR(VarUI4FromUI2); - CONVERTRANGE(VarUI4FromUI2, 0, 65536); -} - -static void test_VarUI4FromI8(void) -{ - CONVVARS(LONG64); - - CHECKPTR(VarUI4FromI8); - CONVERT(VarUI4FromI8, -1); EXPECT_OVERFLOW; - CONVERT(VarUI4FromI8, 0); EXPECT(0); - CONVERT(VarUI4FromI8, 1); EXPECT(1); - CONVERT(VarUI4FromI8, 4294967295ul); EXPECT(4294967295ul); - CONVERT_I8(VarUI4FromI8, 1, 0); EXPECT_OVERFLOW; -} - -static void test_VarUI4FromUI1(void) -{ - CONVVARS(BYTE); - int i; - - CHECKPTR(VarUI4FromUI1); - CONVERTRANGE(VarUI4FromUI1, 0, 256); -} - -static void test_VarUI4FromI4(void) -{ - CONVVARS(int); - - CHECKPTR(VarUI4FromI4); - CONVERT(VarUI4FromI4, -1); EXPECT_OVERFLOW; - CONVERT(VarUI4FromI4, 0); EXPECT(0); - CONVERT(VarUI4FromI4, 1); EXPECT(1); - CONVERT(VarUI4FromI4, 2147483647); EXPECT(2147483647); -} - -static void test_VarUI4FromUI8(void) -{ - CONVVARS(ULONG64); - - CHECKPTR(VarUI4FromUI8); - CONVERT(VarUI4FromUI8, 0); EXPECT(0); - CONVERT(VarUI4FromUI8, 1); EXPECT(1); - CONVERT(VarUI4FromI8, 4294967295ul); EXPECT(4294967295ul); - CONVERT_I8(VarUI4FromI8, 1, 0); EXPECT_OVERFLOW; -} - -static void test_VarUI4FromBool(void) -{ - CONVVARS(VARIANT_BOOL); - int i; - - CHECKPTR(VarUI4FromBool); - CONVERTRANGE(VarUI4FromBool, -32768, 32768); -} - -static void test_VarUI4FromR4(void) -{ - CONVVARS(FLOAT); - - CHECKPTR(VarUI4FromR4); - /* We can't test max values as they are not exactly representable in a float */ - CONVERT(VarUI4FromR4, -1.0f); EXPECT_OVERFLOW; - CONVERT(VarUI4FromR4, 0.0f); EXPECT(0); - CONVERT(VarUI4FromR4, 1.0f); EXPECT(1); - - CONVERT(VarUI4FromR4, -1.5f); EXPECT_OVERFLOW; - CONVERT(VarUI4FromR4, -0.6f); EXPECT_OVERFLOW; - CONVERT(VarUI4FromR4, -0.5f); EXPECT(0); - CONVERT(VarUI4FromR4, -0.4f); EXPECT(0); - CONVERT(VarUI4FromR4, 0.4f); EXPECT(0); - CONVERT(VarUI4FromR4, 0.5f); EXPECT(0); - CONVERT(VarUI4FromR4, 0.6f); EXPECT(1); - CONVERT(VarUI4FromR4, 1.5f); EXPECT(2); - -} - -static void test_VarUI4FromR8(void) -{ - CONVVARS(DOUBLE); - - CHECKPTR(VarUI4FromR8); - CONVERT(VarUI4FromR8, -1.0); EXPECT_OVERFLOW; - CONVERT(VarUI4FromR8, 0.0); EXPECT(0); - CONVERT(VarUI4FromR8, 1.0); EXPECT(1); - CONVERT(VarUI4FromR8, 4294967295.0); EXPECT(4294967295ul); - CONVERT(VarUI4FromR8, 4294967296.0); EXPECT_OVERFLOW; - - CONVERT(VarUI4FromR8, -1.5); EXPECT_OVERFLOW; - CONVERT(VarUI4FromR8, -0.6); EXPECT_OVERFLOW; - CONVERT(VarUI4FromR8, -0.5); EXPECT(0); - CONVERT(VarUI4FromR8, -0.4); EXPECT(0); - CONVERT(VarUI4FromR8, 0.4); EXPECT(0); - CONVERT(VarUI4FromR8, 0.5); EXPECT(0); - CONVERT(VarUI4FromR8, 0.6); EXPECT(1); - CONVERT(VarUI4FromR8, 1.5); EXPECT(2); -} - -static void test_VarUI4FromDate(void) -{ - CONVVARS(DOUBLE); - - CHECKPTR(VarUI4FromDate); - CONVERT(VarUI4FromDate, -1.0); EXPECT_OVERFLOW; - CONVERT(VarUI4FromDate, 0.0); EXPECT(0); - CONVERT(VarUI4FromDate, 1.0); EXPECT(1); - CONVERT(VarUI4FromDate, 4294967295.0); EXPECT(4294967295ul); - CONVERT(VarUI4FromDate, 4294967296.0); EXPECT_OVERFLOW; - - CONVERT(VarUI4FromDate, -1.5); EXPECT_OVERFLOW; - CONVERT(VarUI4FromDate, -0.6); EXPECT_OVERFLOW; - CONVERT(VarUI4FromDate, -0.5); EXPECT(0); - CONVERT(VarUI4FromDate, -0.4); EXPECT(0); - CONVERT(VarUI4FromDate, 0.4); EXPECT(0); - CONVERT(VarUI4FromDate, 0.5); EXPECT(0); - CONVERT(VarUI4FromDate, 0.6); EXPECT(1); - CONVERT(VarUI4FromDate, 1.5); EXPECT(2); -} - -static void test_VarUI4FromCy(void) -{ - CONVVARS(CY); - - CHECKPTR(VarUI4FromCy); - CONVERT_CY(VarUI4FromCy,-1); EXPECT_OVERFLOW; - CONVERT_CY(VarUI4FromCy,0); EXPECT(0); - CONVERT_CY(VarUI4FromCy,1); EXPECT(1); - CONVERT_CY64(VarUI4FromCy,0,4294967295ul); EXPECT(4294967295ul); - CONVERT_CY64(VarUI4FromCy,1,0); EXPECT_OVERFLOW; - - CONVERT_CY(VarUI4FromCy,-1.5); EXPECT_OVERFLOW; - CONVERT_CY(VarUI4FromCy,-0.6); EXPECT_OVERFLOW; - CONVERT_CY(VarUI4FromCy,-0.5); EXPECT(0); - CONVERT_CY(VarUI4FromCy,-0.4); EXPECT(0); - CONVERT_CY(VarUI4FromCy,0.4); EXPECT(0); - CONVERT_CY(VarUI4FromCy,0.5); EXPECT(0); - CONVERT_CY(VarUI4FromCy,0.6); EXPECT(1); - CONVERT_CY(VarUI4FromCy,1.5); EXPECT(2); -} - -static void test_VarUI4FromDec(void) -{ - CONVVARS(DECIMAL); - - CHECKPTR(VarUI4FromDec); - - CONVERT_BADDEC(VarUI4FromDec); - - CONVERT_DEC(VarUI4FromDec,0,0x80,0,1); EXPECT_OVERFLOW; - CONVERT_DEC(VarUI4FromDec,0,0,0,0); EXPECT(0); - CONVERT_DEC(VarUI4FromDec,0,0,0,1); EXPECT(1); - CONVERT_DEC64(VarUI4FromDec,0,0,0,0,4294967295ul); EXPECT(4294967295ul); - CONVERT_DEC64(VarUI4FromDec,0,0,0,1,0); EXPECT_OVERFLOW; - - CONVERT_DEC64(VarUI4FromDec,2,0,0,99,4294967196ul); EXPECT(4294967295ul); - CONVERT_DEC64(VarUI4FromDec,2,0,0,100,0); EXPECT_OVERFLOW; -} - -static void test_VarUI4FromStr(void) -{ - CONVVARS(LCID); - OLECHAR buff[128]; - - in = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT); - - CHECKPTR(VarUI4FromStr); - - CONVERT_STR(VarUI4FromStr,NULL,0); EXPECT_MISMATCH; - CONVERT_STR(VarUI4FromStr,"-1",0); EXPECT_OVERFLOW; - CONVERT_STR(VarUI4FromStr,"0",0); EXPECT(0); - CONVERT_STR(VarUI4FromStr,"4294967295",0); EXPECT(4294967295ul); - CONVERT_STR(VarUI4FromStr,"4294967296",0); EXPECT_OVERFLOW; - - /* Rounding */ - CONVERT_STR(VarUI4FromStr,"-1.5",LOCALE_NOUSEROVERRIDE); EXPECT_OVERFLOW; - CONVERT_STR(VarUI4FromStr,"-0.6",LOCALE_NOUSEROVERRIDE); EXPECT_OVERFLOW; - CONVERT_STR(VarUI4FromStr,"-0.5",LOCALE_NOUSEROVERRIDE); EXPECT(0); - CONVERT_STR(VarUI4FromStr,"-0.4",LOCALE_NOUSEROVERRIDE); EXPECT(0); - CONVERT_STR(VarUI4FromStr,"0.4",LOCALE_NOUSEROVERRIDE); EXPECT(0); - CONVERT_STR(VarUI4FromStr,"0.5",LOCALE_NOUSEROVERRIDE); EXPECT(0); - CONVERT_STR(VarUI4FromStr,"0.6",LOCALE_NOUSEROVERRIDE); EXPECT(1); - CONVERT_STR(VarUI4FromStr,"1.5",LOCALE_NOUSEROVERRIDE); EXPECT(2); -} - -static void test_VarUI4Copy(void) -{ - if (!IS_ANCIENT) - { - COPYTEST(1u, VT_UI4, V_UI4(&vSrc), V_UI4(&vDst), V_UI4REF(&vSrc), V_UI4REF(&vDst), "%u"); - } -} - -static void test_VarUI4ChangeTypeEx(void) -{ - CONVVARS(CONV_TYPE); - VARIANTARG vSrc, vDst; - - in = 1; - - if (!IS_ANCIENT) - { - INITIAL_TYPETEST(VT_UI4, V_UI4, "%u"); - COMMON_TYPETEST; - NEGATIVE_TYPETEST(VT_UI4, V_UI4, "%u", VT_I4, V_I4); - } -} - -/* - * VT_I8/VT_UI8 - */ - -#undef CONV_TYPE -#define CONV_TYPE LONG64 -#undef EXPECTRES -#define EXPECTRES(res, x) \ - ok(hres == S_OK || ((HRESULT)res != S_OK && hres == (HRESULT)res), \ - "expected hres " #x ", got hres=0x%08x\n", hres) - -#define EXPECTI8(x) \ - ok((hres == S_OK && out == (CONV_TYPE)(x)), \ - "expected " #x "(%u,%u), got (%u,%u); hres=0x%08x\n", \ - (ULONG)((LONG64)(x) >> 32), (ULONG)((x) & 0xffffffff), \ - (ULONG)(out >> 32), (ULONG)(out & 0xffffffff), hres) - -#define EXPECTI864(x,y) \ - ok(hres == S_OK && (out >> 32) == (CONV_TYPE)(x) && (out & 0xffffffff) == (CONV_TYPE)(y), \ - "expected " #x "(%u,%u), got (%u,%u); hres=0x%08x\n", \ - (ULONG)(x), (ULONG)(y), \ - (ULONG)(out >> 32), (ULONG)(out & 0xffffffff), hres) - -static void test_VarI8FromI1(void) -{ - CONVVARS(signed char); - int i; - - CHECKPTR(VarI8FromI1); - for (i = -128; i < 128; i++) - { - CONVERT(VarI8FromI1,i); EXPECTI8(i); - } -} - -static void test_VarI8FromUI1(void) -{ - CONVVARS(BYTE); - int i; - - CHECKPTR(VarI8FromUI1); - for (i = 0; i < 256; i++) - { - CONVERT(VarI8FromUI1,i); EXPECTI8(i); - } -} - -static void test_VarI8FromI2(void) -{ - CONVVARS(SHORT); - int i; - - CHECKPTR(VarI8FromI2); - for (i = -32768; i < 32768; i++) - { - CONVERT(VarI8FromI2,i); EXPECTI8(i); - } -} - -static void test_VarI8FromUI2(void) -{ - CONVVARS(USHORT); - int i; - - CHECKPTR(VarI8FromUI2); - for (i = -0; i < 65535; i++) - { - CONVERT(VarI8FromUI2,i); EXPECTI8(i); - } -} - -static void test_VarI8FromUI4(void) -{ - CONVVARS(ULONG); - - CHECKPTR(VarI8FromUI4); - CONVERT(VarI8FromUI4, 0); EXPECTI8(0); - CONVERT(VarI8FromUI4, 1); EXPECTI8(1); - CONVERT(VarI8FromUI4, 4294967295ul); EXPECTI8(4294967295ul); -} - -static void test_VarI8FromR4(void) -{ - CONVVARS(FLOAT); - - CHECKPTR(VarI8FromR4); - - CONVERT(VarI8FromR4, -128.0f); EXPECTI8(-128); - CONVERT(VarI8FromR4, -1.0f); EXPECTI8(-1); - CONVERT(VarI8FromR4, 0.0f); EXPECTI8(0); - CONVERT(VarI8FromR4, 1.0f); EXPECTI8(1); - CONVERT(VarI8FromR4, 127.0f); EXPECTI8(127); - - CONVERT(VarI8FromR4, -1.5f); EXPECTI8(-2); - CONVERT(VarI8FromR4, -0.6f); EXPECTI8(-1); - CONVERT(VarI8FromR4, -0.5f); EXPECTI8(0); - CONVERT(VarI8FromR4, -0.4f); EXPECTI8(0); - CONVERT(VarI8FromR4, 0.4f); EXPECTI8(0); - CONVERT(VarI8FromR4, 0.5f); EXPECTI8(0); - CONVERT(VarI8FromR4, 0.6f); EXPECTI8(1); - CONVERT(VarI8FromR4, 1.5f); EXPECTI8(2); -} - -static void test_VarI8FromR8(void) -{ - CONVVARS(DOUBLE); - - CHECKPTR(VarI8FromR8); - CONVERT(VarI8FromR8, -128.0); EXPECTI8(-128); - CONVERT(VarI8FromR8, -1.0); EXPECTI8(-1); - CONVERT(VarI8FromR8, 0.0); EXPECTI8(0); - CONVERT(VarI8FromR8, 1.0); EXPECTI8(1); - CONVERT(VarI8FromR8, 127.0); EXPECTI8(127); - - CONVERT(VarI8FromR8, -1.5); EXPECTI8(-2); - CONVERT(VarI8FromR8, -0.6); EXPECTI8(-1); - CONVERT(VarI8FromR8, -0.5); EXPECTI8(0); - CONVERT(VarI8FromR8, -0.4); EXPECTI8(0); - CONVERT(VarI8FromR8, 0.4); EXPECTI8(0); - CONVERT(VarI8FromR8, 0.5); EXPECTI8(0); - CONVERT(VarI8FromR8, 0.6); EXPECTI8(1); - CONVERT(VarI8FromR8, 1.5); EXPECTI8(2); -} - -static void test_VarI8FromDate(void) -{ - CONVVARS(DATE); - - CHECKPTR(VarI8FromDate); - CONVERT(VarI8FromDate, -128.0); EXPECTI8(-128); - CONVERT(VarI8FromDate, -1.0); EXPECTI8(-1); - CONVERT(VarI8FromDate, 0.0); EXPECTI8(0); - CONVERT(VarI8FromDate, 1.0); EXPECTI8(1); - CONVERT(VarI8FromDate, 127.0); EXPECTI8(127); - - CONVERT(VarI8FromDate, -1.5); EXPECTI8(-2); - CONVERT(VarI8FromDate, -0.6); EXPECTI8(-1); - CONVERT(VarI8FromDate, -0.5); EXPECTI8(0); - CONVERT(VarI8FromDate, -0.4); EXPECTI8(0); - CONVERT(VarI8FromDate, 0.4); EXPECTI8(0); - CONVERT(VarI8FromDate, 0.5); EXPECTI8(0); - CONVERT(VarI8FromDate, 0.6); EXPECTI8(1); - CONVERT(VarI8FromDate, 1.5); EXPECTI8(2); -} - -static void test_VarI8FromBool(void) -{ - CONVVARS(VARIANT_BOOL); - int i; - - CHECKPTR(VarI8FromBool); - for (i = -32768; i < 32768; i++) - { - CONVERT(VarI8FromBool,i); EXPECTI8(i); - } -} - -static void test_VarI8FromUI8(void) -{ - CONVVARS(ULONG64); - - CHECKPTR(VarI8FromUI8); - CONVERT(VarI8FromUI8, 0); EXPECTI8(0); - CONVERT(VarI8FromUI8, 1); EXPECTI8(1); - CONVERT_I8(VarI8FromUI8, 0x7fffffff, 0xffffffff); EXPECTI864(0x7fffffff, 0xffffffff); - CONVERT_I8(VarI8FromUI8, 0x80000000, 0); EXPECT_OVERFLOW; -} - -static void test_VarI8FromCy(void) -{ - CONVVARS(CY); - - CHECKPTR(VarI8FromCy); - CONVERT_CY(VarI8FromCy,-128); EXPECTI8(-129); - CONVERT_CY(VarI8FromCy,-1); EXPECTI8(-2); - CONVERT_CY(VarI8FromCy,0); EXPECTI8(0); - CONVERT_CY(VarI8FromCy,1); EXPECTI8(1); - CONVERT_CY(VarI8FromCy,127); EXPECTI8(127); - - CONVERT_CY(VarI8FromCy,-1.5); EXPECTI8(-2); - CONVERT_CY(VarI8FromCy,-0.6); EXPECTI8(-1); - CONVERT_CY(VarI8FromCy,-0.5); EXPECTI8(-1); - CONVERT_CY(VarI8FromCy,-0.4); EXPECTI8(-1); - CONVERT_CY(VarI8FromCy,0.4); EXPECTI8(0); - CONVERT_CY(VarI8FromCy,0.5); EXPECTI8(0); - CONVERT_CY(VarI8FromCy,0.6); EXPECTI8(1); - CONVERT_CY(VarI8FromCy,1.5); EXPECTI8(2); -} - -static void test_VarI8FromDec(void) -{ - CONVVARS(DECIMAL); - - CHECKPTR(VarI8FromDec); - - CONVERT_BADDEC(VarI8FromDec); - - CONVERT_DEC(VarI8FromDec,0,0x80,0,128); EXPECTI8(-128); - CONVERT_DEC(VarI8FromDec,0,0x80,0,1); EXPECTI8(-1); - CONVERT_DEC(VarI8FromDec,0,0,0,0); EXPECTI8(0); - CONVERT_DEC(VarI8FromDec,0,0,0,1); EXPECTI8(1); - CONVERT_DEC(VarI8FromDec,0,0,0,127); EXPECTI8(127); - - CONVERT_DEC(VarI8FromDec,2,0x80,0,12700); EXPECTI8(-127); - CONVERT_DEC(VarI8FromDec,2,0,0,12700); EXPECTI8(127); -} - -static void test_VarI8FromStr(void) -{ - CONVVARS(LCID); - OLECHAR buff[128]; - - in = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT); - - CHECKPTR(VarI8FromStr); - - CONVERT_STR(VarI8FromStr,NULL,0); EXPECT_MISMATCH; - CONVERT_STR(VarI8FromStr,"0",0); EXPECTI8(0); - CONVERT_STR(VarI8FromStr,"-1",0); EXPECTI8(-1); - CONVERT_STR(VarI8FromStr,"2147483647",0); EXPECTI8(2147483647); - - CONVERT_STR(VarI8FromStr,"-1.5",LOCALE_NOUSEROVERRIDE); EXPECTI8(-2); - CONVERT_STR(VarI8FromStr,"-0.6",LOCALE_NOUSEROVERRIDE); EXPECTI8(-1); - CONVERT_STR(VarI8FromStr,"-0.5",LOCALE_NOUSEROVERRIDE); EXPECTI8(0); - CONVERT_STR(VarI8FromStr,"-0.4",LOCALE_NOUSEROVERRIDE); EXPECTI8(0); - CONVERT_STR(VarI8FromStr,"0.4",LOCALE_NOUSEROVERRIDE); EXPECTI8(0); - CONVERT_STR(VarI8FromStr,"0.5",LOCALE_NOUSEROVERRIDE); EXPECTI8(0); - CONVERT_STR(VarI8FromStr,"0.6",LOCALE_NOUSEROVERRIDE); EXPECTI8(1); - CONVERT_STR(VarI8FromStr,"1.5",LOCALE_NOUSEROVERRIDE); EXPECTI8(2); -} - -static void test_VarI8Copy(void) -{ - HRESULT hres; - VARIANTARG vSrc, vDst; - LONGLONG in = 1; - - if (!HAVE_OLEAUT32_I8) - { - win_skip("I8 and UI8 data types are not available\n"); - return; - } - - VariantInit(&vSrc); - VariantInit(&vDst); - V_VT(&vSrc) = VT_I8; - V_I8(&vSrc) = in; - hres = VariantCopy(&vDst, &vSrc); - ok(hres == S_OK && V_VT(&vDst) == VT_I8 && V_I8(&vDst) == in, - "copy hres 0x%X, type %d, value (%x%08x) %x%08x\n", - hres, V_VT(&vDst), (UINT)(in >> 32), (UINT)in, (UINT)(V_I8(&vDst) >> 32), (UINT)V_I8(&vDst) ); - V_VT(&vSrc) = VT_I8|VT_BYREF; - V_I8REF(&vSrc) = ∈ - hres = VariantCopy(&vDst, &vSrc); - ok(hres == S_OK && V_VT(&vDst) == (VT_I8|VT_BYREF) && V_I8REF(&vDst) == &in, - "ref hres 0x%X, type %d, ref (%p) %p\n", hres, V_VT(&vDst), &in, V_I8REF(&vDst)); - hres = VariantCopyInd(&vDst, &vSrc); - ok(hres == S_OK && V_VT(&vDst) == VT_I8 && V_I8(&vDst) == in, - "copy hres 0x%X, type %d, value (%x%08x) %x%08x\n", - hres, V_VT(&vDst), (UINT)(in >> 32), (UINT)in, (UINT)(V_I8(&vDst) >> 32), (UINT)V_I8(&vDst) ); -} - -static void test_VarI8ChangeTypeEx(void) -{ - CONVVARS(CONV_TYPE); - VARIANTARG vSrc, vDst; - - if (!HAVE_OLEAUT32_I8) - { - win_skip("I8 and UI8 data types are not available\n"); - return; - } - - in = 1; - - INITIAL_TYPETESTI8(VT_I8, V_I8); - COMMON_TYPETEST; -} - -/* Adapt the test macros to UI8 */ -#undef CONV_TYPE -#define CONV_TYPE ULONG64 - -static void test_VarUI8FromI1(void) -{ - CONVVARS(signed char); - int i; - - CHECKPTR(VarUI8FromI1); - for (i = -128; i < 128; i++) - { - CONVERT(VarUI8FromI1,i); - if (i < 0) - EXPECT_OVERFLOW; - else - EXPECTI8(i); - } -} - -static void test_VarUI8FromUI1(void) -{ - CONVVARS(BYTE); - int i; - - CHECKPTR(VarUI8FromUI1); - for (i = 0; i < 256; i++) - { - CONVERT(VarUI8FromUI1,i); EXPECTI8(i); - } -} - -static void test_VarUI8FromI2(void) -{ - CONVVARS(SHORT); - int i; - - CHECKPTR(VarUI8FromI2); - for (i = -32768; i < 32768; i++) - { - CONVERT(VarUI8FromI2,i); - if (i < 0) - EXPECT_OVERFLOW; - else - EXPECTI8(i); - } -} - -static void test_VarUI8FromUI2(void) -{ - CONVVARS(USHORT); - int i; - - CHECKPTR(VarUI8FromUI2); - for (i = 0; i < 65535; i++) - { - CONVERT(VarUI8FromUI2,i); EXPECTI8(i); - } -} - -static void test_VarUI8FromUI4(void) -{ - CONVVARS(ULONG); - - CHECKPTR(VarUI8FromUI4); - CONVERT(VarUI8FromUI4, 0); EXPECTI8(0); - CONVERT(VarUI8FromUI4, 0xffffffff); EXPECTI8(0xffffffff); -} - -static void test_VarUI8FromR4(void) -{ - CONVVARS(FLOAT); - - CHECKPTR(VarUI8FromR4); - CONVERT(VarUI8FromR4, -1.0f); EXPECT_OVERFLOW; - CONVERT(VarUI8FromR4, 0.0f); EXPECTI8(0); - CONVERT(VarUI8FromR4, 1.0f); EXPECTI8(1); - CONVERT(VarUI8FromR4, 255.0f); EXPECTI8(255); - - CONVERT(VarUI8FromR4, -1.5f); EXPECT_OVERFLOW; - CONVERT(VarUI8FromR4, -0.6f); EXPECT_OVERFLOW; - CONVERT(VarUI8FromR4, -0.5f); EXPECTI8(0); - CONVERT(VarUI8FromR4, -0.4f); EXPECTI8(0); - CONVERT(VarUI8FromR4, 0.4f); EXPECTI8(0); - CONVERT(VarUI8FromR4, 0.5f); EXPECTI8(0); - CONVERT(VarUI8FromR4, 0.6f); EXPECTI8(1); - CONVERT(VarUI8FromR4, 1.5f); EXPECTI8(2); -} - -static void test_VarUI8FromR8(void) -{ - CONVVARS(DOUBLE); - - CHECKPTR(VarUI8FromR8); - CONVERT(VarUI8FromR8, -1.0); EXPECT_OVERFLOW; - CONVERT(VarUI8FromR8, 0.0); EXPECTI8(0); - CONVERT(VarUI8FromR8, 1.0); EXPECTI8(1); - CONVERT(VarUI8FromR8, 255.0); EXPECTI8(255); - - CONVERT(VarUI8FromR8, -1.5); EXPECT_OVERFLOW; - CONVERT(VarUI8FromR8, -0.6); EXPECT_OVERFLOW; - CONVERT(VarUI8FromR8, -0.5); EXPECTI8(0); - CONVERT(VarUI8FromR8, -0.4); EXPECTI8(0); - CONVERT(VarUI8FromR8, 0.4); EXPECTI8(0); - CONVERT(VarUI8FromR8, 0.5); EXPECTI8(0); - CONVERT(VarUI8FromR8, 0.6); EXPECTI8(1); - CONVERT(VarUI8FromR8, 1.5); EXPECTI8(2); -} - -static void test_VarUI8FromDate(void) -{ - CONVVARS(DATE); - - CHECKPTR(VarUI8FromDate); - CONVERT(VarUI8FromDate, -1.0); EXPECT_OVERFLOW; - CONVERT(VarUI8FromDate, 0.0); EXPECTI8(0); - CONVERT(VarUI8FromDate, 1.0); EXPECTI8(1); - CONVERT(VarUI8FromDate, 255.0); EXPECTI8(255); - - CONVERT(VarUI8FromDate, -1.5); EXPECT_OVERFLOW; - CONVERT(VarUI8FromDate, -0.6); EXPECT_OVERFLOW; - CONVERT(VarUI8FromDate, -0.5); EXPECTI8(0); - CONVERT(VarUI8FromDate, -0.4); EXPECTI8(0); - CONVERT(VarUI8FromDate, 0.4); EXPECTI8(0); - CONVERT(VarUI8FromDate, 0.5); EXPECTI8(0); - CONVERT(VarUI8FromDate, 0.6); EXPECTI8(1); - CONVERT(VarUI8FromDate, 1.5); EXPECTI8(2); -} - -static void test_VarUI8FromBool(void) -{ - CONVVARS(VARIANT_BOOL); - int i; - - CHECKPTR(VarUI8FromBool); - CONVERTRANGE(VarUI8FromBool, -32768, 32768); -} - -static void test_VarUI8FromI8(void) -{ - CONVVARS(LONG64); - - CHECKPTR(VarUI8FromI8); - CONVERT(VarUI8FromI8, -1); EXPECT_OVERFLOW; - CONVERT(VarUI8FromI8, 0); EXPECTI8(0); - CONVERT(VarUI8FromI8, 1); EXPECTI8(1); -} - -static void test_VarUI8FromCy(void) -{ - CONVVARS(CY); - - CHECKPTR(VarUI8FromCy); - CONVERT_CY(VarUI8FromCy,-1); EXPECT_OVERFLOW; - CONVERT_CY(VarUI8FromCy,0); EXPECTI8(0); - CONVERT_CY(VarUI8FromCy,1); EXPECTI8(1); - CONVERT_CY(VarUI8FromCy,255); EXPECTI8(255); - - CONVERT_CY(VarUI8FromCy,-1.5); EXPECT_OVERFLOW; - CONVERT_CY(VarUI8FromCy,-0.6); EXPECT_OVERFLOW; - CONVERT_CY(VarUI8FromCy,-0.5); EXPECTI8(0); - CONVERT_CY(VarUI8FromCy,-0.4); EXPECTI8(0); - CONVERT_CY(VarUI8FromCy,0.4); EXPECTI8(0); - CONVERT_CY(VarUI8FromCy,0.5); EXPECTI8(0); - CONVERT_CY(VarUI8FromCy,0.6); EXPECTI8(1); - CONVERT_CY(VarUI8FromCy,1.5); EXPECTI8(2); -} - -static void test_VarUI8FromDec(void) -{ - CONVVARS(DECIMAL); - - CHECKPTR(VarUI8FromDec); - - CONVERT_BADDEC(VarUI8FromDec); - - /* This returns 1 under native; Wine fixes this bug and returns overflow */ - if (0) - { - CONVERT_DEC(VarUI8FromDec,0,0x80,0,1); - } - - CONVERT_DEC(VarUI8FromDec,0,0,0,0); EXPECTI8(0); - CONVERT_DEC(VarUI8FromDec,0,0,0,1); EXPECTI8(1); - CONVERT_DEC(VarUI8FromDec,0,0,0,255); EXPECTI8(255); - - CONVERT_DEC(VarUI8FromDec,2,0x80,0,100); EXPECT_OVERFLOW; - CONVERT_DEC(VarUI8FromDec,2,0,0,25500); EXPECTI8(255); -} - -static void test_VarUI8FromStr(void) -{ - CONVVARS(LCID); - OLECHAR buff[128]; - - in = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT); - - CHECKPTR(VarUI8FromStr); - - CONVERT_STR(VarUI8FromStr,NULL,0); EXPECT_MISMATCH; - CONVERT_STR(VarUI8FromStr,"0",0); EXPECTI8(0); - CONVERT_STR(VarUI8FromStr,"-1",0); EXPECT_OVERFLOW; - CONVERT_STR(VarUI8FromStr,"2147483647",0); EXPECTI8(2147483647); - - CONVERT_STR(VarUI8FromStr,"-1.5",LOCALE_NOUSEROVERRIDE); EXPECT_OVERFLOW; - CONVERT_STR(VarUI8FromStr,"-0.6",LOCALE_NOUSEROVERRIDE); EXPECT_OVERFLOW; - CONVERT_STR(VarUI8FromStr,"-0.5",LOCALE_NOUSEROVERRIDE); EXPECTI8(0); - CONVERT_STR(VarUI8FromStr,"-0.4",LOCALE_NOUSEROVERRIDE); EXPECTI8(0); - CONVERT_STR(VarUI8FromStr,"0.4",LOCALE_NOUSEROVERRIDE); EXPECTI8(0); - CONVERT_STR(VarUI8FromStr,"0.5",LOCALE_NOUSEROVERRIDE); EXPECTI8(0); - CONVERT_STR(VarUI8FromStr,"0.6",LOCALE_NOUSEROVERRIDE); EXPECTI8(1); - CONVERT_STR(VarUI8FromStr,"1.5",LOCALE_NOUSEROVERRIDE); EXPECTI8(2); -} - -static void test_VarUI8Copy(void) -{ - HRESULT hres; - VARIANTARG vSrc, vDst; - ULONGLONG in = 1; - - if (!HAVE_OLEAUT32_I8) - { - win_skip("I8 and UI8 data types are not available\n"); - return; - } - - VariantInit(&vSrc); - VariantInit(&vDst); - V_VT(&vSrc) = VT_UI8; - V_UI8(&vSrc) = in; - hres = VariantCopy(&vDst, &vSrc); - ok(hres == S_OK && V_VT(&vDst) == VT_UI8 && V_UI8(&vDst) == in, - "copy hres 0x%X, type %d, value (%x%08x) %x%08x\n", - hres, V_VT(&vDst), (UINT)(in >> 32), (UINT)in, (UINT)(V_UI8(&vDst) >> 32), (UINT)V_UI8(&vDst) ); - V_VT(&vSrc) = VT_UI8|VT_BYREF; - V_UI8REF(&vSrc) = ∈ - hres = VariantCopy(&vDst, &vSrc); - ok(hres == S_OK && V_VT(&vDst) == (VT_UI8|VT_BYREF) && V_UI8REF(&vDst) == &in, - "ref hres 0x%X, type %d, ref (%p) %p\n", hres, V_VT(&vDst), &in, V_UI8REF(&vDst)); - hres = VariantCopyInd(&vDst, &vSrc); - ok(hres == S_OK && V_VT(&vDst) == VT_UI8 && V_UI8(&vDst) == in, - "copy hres 0x%X, type %d, value (%x%08x) %x%08x\n", - hres, V_VT(&vDst), (UINT)(in >> 32), (UINT)in, (UINT)(V_UI8(&vDst) >> 32), (UINT)V_UI8(&vDst) ); -} - -static void test_VarUI8ChangeTypeEx(void) -{ - CONVVARS(CONV_TYPE); - VARIANTARG vSrc, vDst; - - if (!HAVE_OLEAUT32_I8) - { - win_skip("I8 and UI8 data types are not available\n"); - return; - } - - in = 1; - - INITIAL_TYPETESTI8(VT_UI8, V_UI8); - COMMON_TYPETEST; -} - -/* - * VT_R4 - */ - -#undef CONV_TYPE -#define CONV_TYPE float -#undef EXPECTRES -#define EXPECTRES(res, x) _EXPECTRES(res, x, "%15.15f") - -static void test_VarR4FromI1(void) -{ - CONVVARS(signed char); - int i; - - CHECKPTR(VarR4FromI1); - CONVERTRANGE(VarR4FromI1, -128, 128); -} - -static void test_VarR4FromUI1(void) -{ - CONVVARS(BYTE); - int i; - - CHECKPTR(VarR4FromUI1); - CONVERTRANGE(VarR4FromUI1, 0, 256); -} - -static void test_VarR4FromI2(void) -{ - CONVVARS(SHORT); - int i; - - CHECKPTR(VarR4FromI2); - CONVERTRANGE(VarR4FromI2, -32768, 32768); -} - -static void test_VarR4FromUI2(void) -{ - CONVVARS(USHORT); - int i; - - CHECKPTR(VarR4FromUI2); - CONVERTRANGE(VarR4FromUI2, 0, 65536); -} - -static void test_VarR4FromI4(void) -{ - CONVVARS(int); - - CHECKPTR(VarR4FromI4); - CONVERT(VarR4FromI4, -2147483647-1); EXPECT(-2147483648.0f); - CONVERT(VarR4FromI4, -1); EXPECT(-1.0f); - CONVERT(VarR4FromI4, 0); EXPECT(0.0f); - CONVERT(VarR4FromI4, 1); EXPECT(1.0f); - CONVERT(VarR4FromI4, 2147483647); EXPECT(2147483647.0f); -} - -static void test_VarR4FromUI4(void) -{ - CONVVARS(unsigned int); - - CHECKPTR(VarR4FromUI4); - CONVERT(VarR4FromUI4, 0); EXPECT(0.0f); - CONVERT(VarR4FromUI4, 1); EXPECT(1.0f); -#if defined(__i386__) && (defined(_MSC_VER) || defined(__GNUC__)) - CONVERT(VarR4FromUI4, 0xffffffff); EXPECT(4294967296.0f); -#endif -} - -static void test_VarR4FromR8(void) -{ - CONVVARS(FLOAT); - - CHECKPTR(VarR4FromR8); - CONVERT(VarR4FromR8, -1.0); EXPECT(-1.0f); - CONVERT(VarR4FromR8, 0.0); EXPECT(0.0f); - CONVERT(VarR4FromR8, 1.0); EXPECT(1.0f); - CONVERT(VarR4FromR8, 1.5); EXPECT(1.5f); - - /* Skip rounding tests - no rounding is done */ -} - -static void test_VarR4FromBool(void) -{ - CONVVARS(VARIANT_BOOL); - - CHECKPTR(VarR4FromBool); - CONVERT(VarR4FromBool, VARIANT_TRUE); EXPECT(VARIANT_TRUE * 1.0f); - CONVERT(VarR4FromBool, VARIANT_FALSE); EXPECT(VARIANT_FALSE * 1.0f); -} - -static void test_VarR4FromCy(void) -{ - CONVVARS(CY); - - CHECKPTR(VarR4FromCy); - CONVERT_CY(VarR4FromCy,-32768); EXPECT(-32768.0f); - CONVERT_CY(VarR4FromCy,-1); EXPECT(-1.0f); - CONVERT_CY(VarR4FromCy,0); EXPECT(0.0f); - CONVERT_CY(VarR4FromCy,1); EXPECT(1.0f); - CONVERT_CY(VarR4FromCy,32768); EXPECT(32768.0f); - - CONVERT_CY(VarR4FromCy,-1.5); EXPECT(-1.5f); - CONVERT_CY(VarR4FromCy,-0.6); EXPECT(-0.6f); - CONVERT_CY(VarR4FromCy,-0.5); EXPECT(-0.5f); - CONVERT_CY(VarR4FromCy,-0.4); EXPECT(-0.4f); - CONVERT_CY(VarR4FromCy,0.4); EXPECT(0.4f); - CONVERT_CY(VarR4FromCy,0.5); EXPECT(0.5f); - CONVERT_CY(VarR4FromCy,0.6); EXPECT(0.6f); - CONVERT_CY(VarR4FromCy,1.5); EXPECT(1.5f); -} - -static void test_VarR4FromI8(void) -{ - CONVVARS(LONG64); - - CHECKPTR(VarR4FromI8); - CONVERT(VarR4FromI8, -1); EXPECT(-1.0f); - CONVERT(VarR4FromI8, 0); EXPECT(0.0f); - CONVERT(VarR4FromI8, 1); EXPECT(1.0f); -} - -static void test_VarR4FromUI8(void) -{ - CONVVARS(ULONG64); - - CHECKPTR(VarR4FromUI8); - CONVERT(VarR4FromUI8, 0); EXPECT(0.0f); - CONVERT(VarR4FromUI8, 1); EXPECT(1.0f); -} - -static void test_VarR4FromDec(void) -{ - CONVVARS(DECIMAL); - - CHECKPTR(VarR4FromDec); - - CONVERT_BADDEC(VarR4FromDec); - - CONVERT_DEC(VarR4FromDec,0,0x80,0,32768); EXPECT(-32768.0f); - CONVERT_DEC(VarR4FromDec,0,0x80,0,1); EXPECT(-1.0f); - CONVERT_DEC(VarR4FromDec,0,0,0,0); EXPECT(0.0f); - CONVERT_DEC(VarR4FromDec,0,0,0,1); EXPECT(1.0f); - CONVERT_DEC(VarR4FromDec,0,0,0,32767); EXPECT(32767.0f); - - CONVERT_DEC(VarR4FromDec,2,0x80,0,3276800); EXPECT(-32768.0f); - CONVERT_DEC(VarR4FromDec,2,0,0,3276700); EXPECT(32767.0f); - - CONVERT_DEC(VarR4FromDec,0,0,1,0); EXPECT(18446744073709551616.0f); -} - -static void test_VarR4FromDate(void) -{ - CONVVARS(DATE); - - CHECKPTR(VarR4FromDate); - CONVERT(VarR4FromDate, -1.0); EXPECT(-1.0f); - CONVERT(VarR4FromDate, 0.0); EXPECT(0.0f); - CONVERT(VarR4FromDate, 1.0); EXPECT(1.0f); -} - -static void test_VarR4FromStr(void) -{ - CONVVARS(LCID); - OLECHAR buff[128]; - - in = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT); - - CHECKPTR(VarR4FromStr); - - CONVERT_STR(VarR4FromStr,NULL,0); EXPECT_MISMATCH; - CONVERT_STR(VarR4FromStr,"-1", 0); EXPECT(-1.0f); - CONVERT_STR(VarR4FromStr,"0", 0); EXPECT(0.0f); - CONVERT_STR(VarR4FromStr,"1", 0); EXPECT(1.0f); - - CONVERT_STR(VarR4FromStr,"-1.5",LOCALE_NOUSEROVERRIDE); EXPECT(-1.5f); - CONVERT_STR(VarR4FromStr,"-0.6",LOCALE_NOUSEROVERRIDE); EXPECT(-0.6f); - CONVERT_STR(VarR4FromStr,"-0.5",LOCALE_NOUSEROVERRIDE); EXPECT(-0.5f); - CONVERT_STR(VarR4FromStr,"-0.4",LOCALE_NOUSEROVERRIDE); EXPECT(-0.4f); - CONVERT_STR(VarR4FromStr,"0.4",LOCALE_NOUSEROVERRIDE); EXPECT(0.4f); - CONVERT_STR(VarR4FromStr,"0.5",LOCALE_NOUSEROVERRIDE); EXPECT(0.5f); - CONVERT_STR(VarR4FromStr,"0.6",LOCALE_NOUSEROVERRIDE); EXPECT(0.6f); - CONVERT_STR(VarR4FromStr,"1.5",LOCALE_NOUSEROVERRIDE); EXPECT(1.5f); -} - -static void test_VarR4Copy(void) -{ - COPYTEST(77665544.0f, VT_R4, V_R4(&vSrc), V_R4(&vDst), V_R4REF(&vSrc),V_R4REF(&vDst), "%15.15f"); -} - -static void test_VarR4ChangeTypeEx(void) -{ -#ifdef HAS_UINT64_TO_FLOAT - CONVVARS(CONV_TYPE); - VARIANTARG vSrc, vDst; - - in = 1.0f; - - INITIAL_TYPETEST(VT_R4, V_R4, "%f"); - COMMON_TYPETEST; -#endif -} - -/* - * VT_R8 - */ - -#undef CONV_TYPE -#define CONV_TYPE double -#undef EXPECTRES -#define EXPECTRES(res, x) _EXPECTRES(res, x, "%15.15f") - -static void test_VarR8FromI1(void) -{ - CONVVARS(signed char); - int i; - - CHECKPTR(VarR8FromI1); - CONVERTRANGE(VarR8FromI1, -128, 128); -} - -static void test_VarR8FromUI1(void) -{ - CONVVARS(BYTE); - int i; - - CHECKPTR(VarR8FromUI1); - CONVERTRANGE(VarR8FromUI1, 0, 256); -} - -static void test_VarR8FromI2(void) -{ - CONVVARS(SHORT); - int i; - - CHECKPTR(VarR8FromI2); - CONVERTRANGE(VarR8FromI2, -32768, 32768); -} - -static void test_VarR8FromUI2(void) -{ - CONVVARS(USHORT); - int i; - - CHECKPTR(VarR8FromUI2); - CONVERTRANGE(VarR8FromUI2, 0, 65536); -} - -static void test_VarR8FromI4(void) -{ - CONVVARS(int); - - CHECKPTR(VarR8FromI4); - CONVERT(VarR8FromI4, -2147483647-1); EXPECT(-2147483648.0); - CONVERT(VarR8FromI4, -1); EXPECT(-1.0); - CONVERT(VarR8FromI4, 0); EXPECT(0.0); - CONVERT(VarR8FromI4, 1); EXPECT(1.0); - CONVERT(VarR8FromI4, 0x7fffffff); EXPECT(2147483647.0); -} - -static void test_VarR8FromUI4(void) -{ - CONVVARS(unsigned int); - - CHECKPTR(VarR8FromUI4); - CONVERT(VarR8FromUI4, 0); EXPECT(0.0); - CONVERT(VarR8FromUI4, 1); EXPECT(1.0); - CONVERT(VarR8FromUI4, 0xffffffff); EXPECT(4294967295.0); -} - -static void test_VarR8FromR4(void) -{ - CONVVARS(FLOAT); - - CHECKPTR(VarR8FromR4); - CONVERT(VarR8FromR4, -1.0f); EXPECT(-1.0); - CONVERT(VarR8FromR4, 0.0f); EXPECT(0.0); - CONVERT(VarR8FromR4, 1.0f); EXPECT(1.0); - CONVERT(VarR8FromR4, 1.5f); EXPECT(1.5); - - /* Skip rounding tests - no rounding is done */ -} - -static void test_VarR8FromBool(void) -{ - CONVVARS(VARIANT_BOOL); - - CHECKPTR(VarR8FromBool); - CONVERT(VarR8FromBool, VARIANT_TRUE); EXPECT(VARIANT_TRUE * 1.0); - CONVERT(VarR8FromBool, VARIANT_FALSE); EXPECT(VARIANT_FALSE * 1.0); -} - -static void test_VarR8FromCy(void) -{ - CONVVARS(CY); - - CHECKPTR(VarR8FromCy); - CONVERT_CY(VarR8FromCy,-32769); EXPECT(-32769.0); - CONVERT_CY(VarR8FromCy,-32768); EXPECT(-32768.0); - CONVERT_CY(VarR8FromCy,-1); EXPECT(-1.0); - CONVERT_CY(VarR8FromCy,0); EXPECT(0.0); - CONVERT_CY(VarR8FromCy,1); EXPECT(1.0); - CONVERT_CY(VarR8FromCy,32767); EXPECT(32767.0); - CONVERT_CY(VarR8FromCy,32768); EXPECT(32768.0); - - CONVERT_CY(VarR8FromCy,-1.5); EXPECT(-1.5); - CONVERT_CY(VarR8FromCy,-0.6); EXPECT(-0.6); - CONVERT_CY(VarR8FromCy,-0.5); EXPECT(-0.5); - CONVERT_CY(VarR8FromCy,-0.4); EXPECT(-0.4); - CONVERT_CY(VarR8FromCy,0.4); EXPECT(0.4); - CONVERT_CY(VarR8FromCy,0.5); EXPECT(0.5); - CONVERT_CY(VarR8FromCy,0.6); EXPECT(0.6); - CONVERT_CY(VarR8FromCy,1.5); EXPECT(1.5); -} - -static void test_VarR8FromI8(void) -{ - CONVVARS(LONG64); - - CHECKPTR(VarR8FromI8); - CONVERT(VarR8FromI8, -1); EXPECT(-1.0); - CONVERT(VarR8FromI8, 0); EXPECT(0.0); - CONVERT(VarR8FromI8, 1); EXPECT(1.0); -#if defined(__i386__) && (defined(_MSC_VER) || defined(__GNUC__)) - CONVERT_I8(VarR8FromI8, 0x7fffffff,0xffffffff); EXPECT(9223372036854775808.0); -#endif -} - -static void test_VarR8FromUI8(void) -{ - CONVVARS(ULONG64); - - CHECKPTR(VarR8FromUI8); - CONVERT(VarR8FromUI8, 0); EXPECT(0.0); - CONVERT(VarR8FromUI8, 1); EXPECT(1.0); -#if defined(__i386__) && (defined(_MSC_VER) || defined(__GNUC__)) - CONVERT_I8(VarR8FromUI8, 0x80000000,0); EXPECT(9223372036854775808.0); -#endif -} - -static void test_VarR8FromDec(void) -{ - CONVVARS(DECIMAL); - - CHECKPTR(VarR8FromDec); - - CONVERT_BADDEC(VarR8FromDec); - - CONVERT_DEC(VarR8FromDec,0,0x80,0,32768); EXPECT(-32768.0); - CONVERT_DEC(VarR8FromDec,0,0x80,0,1); EXPECT(-1.0); - CONVERT_DEC(VarR8FromDec,0,0,0,0); EXPECT(0.0); - CONVERT_DEC(VarR8FromDec,0,0,0,1); EXPECT(1.0); - CONVERT_DEC(VarR8FromDec,0,0,0,32767); EXPECT(32767.0); - - CONVERT_DEC(VarR8FromDec,2,0x80,0,3276800); EXPECT(-32768.0); - CONVERT_DEC(VarR8FromDec,2,0,0,3276700); EXPECT(32767.0); - - CONVERT_DEC(VarR8FromDec,0,0,1,0); EXPECT(18446744073709551616.0); -} - -static void test_VarR8FromDate(void) -{ - CONVVARS(DATE); - - CHECKPTR(VarR8FromDate); - CONVERT(VarR8FromDate, -1.0); EXPECT(-1.0); - CONVERT(VarR8FromDate, -0.0); EXPECT(0.0); - CONVERT(VarR8FromDate, 1.0); EXPECT(1.0); -} - -static void test_VarR8FromStr(void) -{ - CONVVARS(LCID); - OLECHAR buff[128]; - - in = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT); - - CHECKPTR(VarR8FromStr); - - CONVERT_STR(VarR8FromStr,NULL,0); EXPECT_MISMATCH; - CONVERT_STR(VarR8FromStr,"",0); EXPECT_MISMATCH; - CONVERT_STR(VarR8FromStr," ",0); EXPECT_MISMATCH; - - CONVERT_STR(VarR8FromStr,"0",LOCALE_NOUSEROVERRIDE); EXPECT(0.0); - CONVERT_STR(VarR8FromStr,"-1.5",LOCALE_NOUSEROVERRIDE); EXPECT(-1.5); - CONVERT_STR(VarR8FromStr,"-0.6",LOCALE_NOUSEROVERRIDE); EXPECT(-0.6); - CONVERT_STR(VarR8FromStr,"-0.5",LOCALE_NOUSEROVERRIDE); EXPECT(-0.5); - CONVERT_STR(VarR8FromStr,"-0.4",LOCALE_NOUSEROVERRIDE); EXPECT(-0.4); - CONVERT_STR(VarR8FromStr,"0.4",LOCALE_NOUSEROVERRIDE); EXPECT(0.4); - CONVERT_STR(VarR8FromStr,"0.5",LOCALE_NOUSEROVERRIDE); EXPECT(0.5); - CONVERT_STR(VarR8FromStr,"0.6",LOCALE_NOUSEROVERRIDE); EXPECT(0.6); - CONVERT_STR(VarR8FromStr,"1.5",LOCALE_NOUSEROVERRIDE); EXPECT(1.5); - - /* We already have exhaustive tests for number parsing, so skip those tests here */ -} - -static void test_VarR8Copy(void) -{ - COPYTEST(77665544.0, VT_R8, V_R8(&vSrc), V_R8(&vDst), V_R8REF(&vSrc),V_R8REF(&vDst), "%16.16g"); -} - -static void test_VarR8ChangeTypeEx(void) -{ -#ifdef HAS_UINT64_TO_FLOAT - CONVVARS(CONV_TYPE); - VARIANTARG vSrc, vDst; - - in = 1.0; - - INITIAL_TYPETEST(VT_R8, V_R8, "%g"); - COMMON_TYPETEST; -#endif -} - -#define MATHRND(l, r) left = l; right = r; hres = pVarR8Round(left, right, &out) - -static void test_VarR8Round(void) -{ - HRESULT hres; - double left = 0.0, out; - int right; - - CHECKPTR(VarR8Round); - MATHRND(0.5432, 5); EXPECT(0.5432); - MATHRND(0.5432, 4); EXPECT(0.5432); - MATHRND(0.5432, 3); EXPECT(0.543); - MATHRND(0.5432, 2); EXPECT(0.54); - MATHRND(0.5432, 1); EXPECT(0.5); - MATHRND(0.5532, 0); EXPECT(1); - MATHRND(0.5532, -1); EXPECT_INVALID; - - MATHRND(0.5568, 5); EXPECT(0.5568); - MATHRND(0.5568, 4); EXPECT(0.5568); - MATHRND(0.5568, 3); EXPECT(0.557); - MATHRND(0.5568, 2); EXPECT(0.56); - MATHRND(0.5568, 1); EXPECT(0.6); - MATHRND(0.5568, 0); EXPECT(1); - MATHRND(0.5568, -1); EXPECT_INVALID; - - MATHRND(0.4999, 0); EXPECT(0); - MATHRND(0.5000, 0); EXPECT(0); - MATHRND(0.5001, 0); EXPECT(1); - MATHRND(1.4999, 0); EXPECT(1); - MATHRND(1.5000, 0); EXPECT(2); - MATHRND(1.5001, 0); EXPECT(2); -} - -/* - * VT_DATE - */ - -#undef CONV_TYPE -#define CONV_TYPE DATE - -static void test_VarDateFromI1(void) -{ - CONVVARS(signed char); - int i; - - CHECKPTR(VarDateFromI1); - CONVERTRANGE(VarDateFromI1, -128, 128); -} - -static void test_VarDateFromUI1(void) -{ - CONVVARS(BYTE); - int i; - - CHECKPTR(VarDateFromUI1); - CONVERTRANGE(VarDateFromUI1, 0, 256); -} - -static void test_VarDateFromI2(void) -{ - CONVVARS(SHORT); - int i; - - CHECKPTR(VarDateFromI2); - CONVERTRANGE(VarDateFromI2, -32768, 32768); -} - -static void test_VarDateFromUI2(void) -{ - CONVVARS(USHORT); - int i; - - CHECKPTR(VarDateFromUI2); - CONVERTRANGE(VarDateFromUI2, 0, 65536); -} - -static void test_VarDateFromI4(void) -{ - CONVVARS(int); - - CHECKPTR(VarDateFromI4); - CONVERT(VarDateFromI4, DATE_MIN-1); - if (hres != DISP_E_TYPEMISMATCH) /* Early versions return this, incorrectly */ - EXPECT_OVERFLOW; - CONVERT(VarDateFromI4, DATE_MIN); EXPECT(DATE_MIN); - CONVERT(VarDateFromI4, -1); EXPECT(-1.0); - CONVERT(VarDateFromI4, 0); EXPECT(0.0); - CONVERT(VarDateFromI4, 1); EXPECT(1.0); - CONVERT(VarDateFromI4, DATE_MAX); EXPECT(DATE_MAX); - CONVERT(VarDateFromI4, DATE_MAX+1); - if (hres != DISP_E_TYPEMISMATCH) /* Early versions return this, incorrectly */ - EXPECT_OVERFLOW; -} - -static void test_VarDateFromUI4(void) -{ - CONVVARS(unsigned int); - - CHECKPTR(VarDateFromUI4); - CONVERT(VarDateFromUI4, 0); EXPECT(0.0); - CONVERT(VarDateFromUI4, 1); EXPECT(1.0); - CONVERT(VarDateFromUI4, DATE_MAX); EXPECT(DATE_MAX); - CONVERT(VarDateFromUI4, DATE_MAX+1); - if (hres != DISP_E_TYPEMISMATCH) /* Early versions return this, incorrectly */ - EXPECT_OVERFLOW; -} - -static void test_VarDateFromR4(void) -{ - CONVVARS(FLOAT); - - CHECKPTR(VarDateFromR4); - CONVERT(VarDateFromR4, -1.0f); EXPECT(-1.0); - CONVERT(VarDateFromR4, 0.0f); EXPECT(0.0); - CONVERT(VarDateFromR4, 1.0f); EXPECT(1.0); - CONVERT(VarDateFromR4, 1.5f); EXPECT(1.5); -} - -static void test_VarDateFromR8(void) -{ - CONVVARS(double); - - CHECKPTR(VarDateFromR8); - CONVERT(VarDateFromR8, -1.0f); EXPECT(-1.0); - CONVERT(VarDateFromR8, 0.0f); EXPECT(0.0); - CONVERT(VarDateFromR8, 1.0f); EXPECT(1.0); - CONVERT(VarDateFromR8, 1.5f); EXPECT(1.5); -} - -static void test_VarDateFromBool(void) -{ - CONVVARS(VARIANT_BOOL); - - CHECKPTR(VarDateFromBool); - CONVERT(VarDateFromBool, VARIANT_TRUE); EXPECT(VARIANT_TRUE * 1.0); - CONVERT(VarDateFromBool, VARIANT_FALSE); EXPECT(VARIANT_FALSE * 1.0); -} - -static void test_VarDateFromCy(void) -{ - CONVVARS(CY); - - CHECKPTR(VarDateFromCy); - CONVERT_CY(VarDateFromCy,-32769); EXPECT(-32769.0); - CONVERT_CY(VarDateFromCy,-32768); EXPECT(-32768.0); - CONVERT_CY(VarDateFromCy,-1); EXPECT(-1.0); - CONVERT_CY(VarDateFromCy,0); EXPECT(0.0); - CONVERT_CY(VarDateFromCy,1); EXPECT(1.0); - CONVERT_CY(VarDateFromCy,32767); EXPECT(32767.0); - CONVERT_CY(VarDateFromCy,32768); EXPECT(32768.0); - - CONVERT_CY(VarDateFromCy,-1.5); EXPECT(-1.5); - CONVERT_CY(VarDateFromCy,-0.6); EXPECT(-0.6); - CONVERT_CY(VarDateFromCy,-0.5); EXPECT(-0.5); - CONVERT_CY(VarDateFromCy,-0.4); EXPECT(-0.4); - CONVERT_CY(VarDateFromCy,0.4); EXPECT(0.4); - CONVERT_CY(VarDateFromCy,0.5); EXPECT(0.5); - CONVERT_CY(VarDateFromCy,0.6); EXPECT(0.6); - CONVERT_CY(VarDateFromCy,1.5); EXPECT(1.5); -} - -static void test_VarDateFromI8(void) -{ - CONVVARS(LONG64); - - CHECKPTR(VarDateFromI8); - CONVERT(VarDateFromI8, DATE_MIN-1); EXPECT_OVERFLOW; - CONVERT(VarDateFromI8, DATE_MIN); EXPECT(DATE_MIN); - CONVERT(VarDateFromI8, -1); EXPECT(-1.0); - CONVERT(VarDateFromI8, 0); EXPECT(0.0); - CONVERT(VarDateFromI8, 1); EXPECT(1.0); - CONVERT(VarDateFromI8, DATE_MAX); EXPECT(DATE_MAX); - CONVERT(VarDateFromI8, DATE_MAX+1); EXPECT_OVERFLOW; -} - -static void test_VarDateFromUI8(void) -{ - CONVVARS(ULONG64); - - CHECKPTR(VarDateFromUI8); - CONVERT(VarDateFromUI8, 0); EXPECT(0.0); - CONVERT(VarDateFromUI8, 1); EXPECT(1.0); - CONVERT(VarDateFromUI8, DATE_MAX); EXPECT(DATE_MAX); - CONVERT(VarDateFromUI8, DATE_MAX+1); EXPECT_OVERFLOW; -} - -static void test_VarDateFromDec(void) -{ - CONVVARS(DECIMAL); - - CHECKPTR(VarDateFromDec); - - CONVERT_BADDEC(VarDateFromDec); - - CONVERT_DEC(VarDateFromDec,0,0x80,0,32768); EXPECT(-32768.0); - CONVERT_DEC(VarDateFromDec,0,0x80,0,1); EXPECT(-1.0); - CONVERT_DEC(VarDateFromDec,0,0,0,0); EXPECT(0.0); - CONVERT_DEC(VarDateFromDec,0,0,0,1); EXPECT(1.0); - CONVERT_DEC(VarDateFromDec,0,0,0,32767); EXPECT(32767.0); - - CONVERT_DEC(VarDateFromDec,2,0x80,0,3276800); EXPECT(-32768.0); - CONVERT_DEC(VarDateFromDec,2,0,0,3276700); EXPECT(32767.0); -} - -#define DFS(str) \ - buff[0] = '\0'; out = 0.0; \ - if (str) MultiByteToWideChar(CP_ACP,0,str,-1,buff,sizeof(buff)/sizeof(WCHAR)); \ - hres = pVarDateFromStr(str ? buff : NULL,lcid,LOCALE_NOUSEROVERRIDE,&out) - -#define MKRELDATE(day,mth) st.wMonth = mth; st.wDay = day; \ - pSystemTimeToVariantTime(&st,&relative) - -static const char * const BadDateStrings[] = -{ - "True", "False", /* Plain text */ - "0.", ".0", "-1.1", "1.1-", /* Partial specifications */ - "1;2;3", "1*2*3", "1@2@3", "1#2#3", "(1:2)","<1:2>","1|2|3", /* Bad chars */ - "0", "1", /* 1 element */ - "0.60", "24.00", "0:60", "24:00", "1 2 am", "1 am 2", /* 2 elements */ - "1.5 2", "1 5.2", "2 32 3", "1 2 am 3", /* 3 elements */ - "1 2.3 4", "1.2.3 4", "1 2.3.4", "1.2 3.4", "1.2.3.4", "1 2 3 4", - "1 am 2 3.4", "1 2 am 3.4", "1.2 3 am 4", "1.2 3 4 am", /* 4 elements */ - "1.2.3.4.5", "1.2.3.4 5", "1.2.3 4.5", "1.2 3.4.5", "1.2 3.4 5", "1.2 3 4.5", - "1 2.3.4.5", "1 2.3.4 5", "1 2.3 4.5", "1 2.3 4 5", "1 2 3.4 5", "1 2 3 4 5", - "1.2.3 4 am 5", "1.2.3 4 5 am", "1.2 3 am 4 5", - "1.2 3 4 am 5", "1.2 3 4 5 am", "1 am 2 3.4.5", "1 2 am 3.4.5", - "1 am 2 3 4.5", "1 2 am 3 4.5", "1 2 3 am 4.5", /* 5 elements */ - /* 6 elements */ - "1.2.3.4.5.6", "1.2.3.4.5 6", "1.2.3.4 5.6", "1.2.3.4 5 6", "1.2.3 4.5.6", - "1.2.3 4.5 6", "1.2.3 4 5.6", "1.2 3.4.5.6", "1.2 3.4.5 6", "1.2 3.4 5.6", - "1.2 3.4 5 6", "1.2 3 4.5.6", "1.2 3 4.5 6", "1.2 3 4 5.6", "1.2 3 4 5 6", - "1 2.3.4.5.6", "1 2.3.4.5 6", "1 2.3.4 5.6", "1 2.3.4 5 6", "1 2.3 4.5.6", -#if 0 - /* following throws an exception on winME */ - "1 2.3 4.5 6", "1 2.3 4 5.6", "1 2.3 4 5 6", "1 2 3.4.5.6", "1 2 3.4.5 6", -#endif - "1 2 3.4 5.6", "1 2 3.4 5 6", "1 2 3 4.5 6", "1 2 3 4 5.6", "1 2 3 4 5 6", -#if 0 - /* following throws an exception on winME */ - "1.2.3 4 am 5 6", "1.2.3 4 5 am 6", "1.2.3 4 5 6 am", "1 am 2 3 4.5.6", -#endif - "1 2 am 3 4.5.6", "1 2 3 am 4.5.6" -}; - -static void test_VarDateFromStr(void) -{ - LCID lcid; - DATE out, relative; - HRESULT hres; - SYSTEMTIME st; - OLECHAR buff[128]; - size_t i; - - lcid = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT); - - CHECKPTR(VarDateFromStr); - CHECKPTR(SystemTimeToVariantTime); - - /* Some date formats are relative, so we need to find the current year */ - GetSystemTime(&st); - st.wHour = st.wMinute = st.wSecond = st.wMilliseconds = 0; - DFS(NULL); EXPECT_MISMATCH; - - /* Floating point number are not recognised */ - DFS("0.0"); - if (hres == S_OK) - EXPECT_DBL(0.0); /* Very old versions accept this string */ - else - EXPECT_MISMATCH; - - /* 1 element - can only be a time, and only if it has am/pm */ - DFS("1 am"); EXPECT_DBL(0.04166666666666666); - /* 2 elements */ - /* A decimal point is treated as a time separator. - * The following are converted as hours/minutes. - */ - DFS("0.1"); EXPECT_DBL(0.0006944444444444445); - DFS("0.40"); EXPECT_DBL(0.02777777777777778); - DFS("2.5"); EXPECT_DBL(0.08680555555555555); - /* A colon acts as a decimal point */ - DFS("0:1"); EXPECT_DBL(0.0006944444444444445); - DFS("0:20"); EXPECT_DBL(0.01388888888888889); - DFS("0:40"); EXPECT_DBL(0.02777777777777778); - DFS("3:5"); EXPECT_DBL(0.1284722222222222); - /* Check the am/pm limits */ - DFS("00:00 AM"); EXPECT_DBL(0.0); - DFS("00:00 a"); EXPECT_DBL(0.0); - DFS("12:59 AM"); EXPECT_DBL(0.04097222222222222); - DFS("12:59 A"); EXPECT_DBL(0.04097222222222222); - DFS("00:00 pm"); EXPECT_DBL(0.5); - DFS("00:00 p"); EXPECT_DBL(0.5); - DFS("12:59 pm"); EXPECT_DBL(0.5409722222222222); - DFS("12:59 p"); EXPECT_DBL(0.5409722222222222); - /* AM/PM is ignored if hours > 12 */ - DFS("13:00 AM"); EXPECT_DBL(0.5416666666666666); - DFS("13:00 PM"); EXPECT_DBL(0.5416666666666666); - - /* Space, dash and slash all indicate a date format. */ - /* If both numbers are valid month values => month/day of current year */ - DFS("1 2"); MKRELDATE(2,1); EXPECT_DBL(relative); - DFS("2 1"); MKRELDATE(1,2); EXPECT_DBL(relative); - /* one number not valid month, is a valid day, other number valid month: - * that number becomes the day. - */ - DFS("14 1"); MKRELDATE(14,1); EXPECT_DBL(relative); - DFS("1 14"); EXPECT_DBL(relative); - /* If the numbers can't be day/month, they are assumed to be year/month */ - DFS("30 2"); EXPECT_DBL(10990.0); - DFS("2 30"); EXPECT_DBL(10990.0); - DFS("32 49"); EXPECT_MISMATCH; /* Can't be any format */ - DFS("0 49"); EXPECT_MISMATCH; /* Can't be any format */ - /* If a month name is given the other number is the day */ - DFS("Jan 2"); MKRELDATE(2,1); EXPECT_DBL(relative); - DFS("2 Jan"); EXPECT_DBL(relative); - /* Unless it can't be, in which case it becomes the year */ - DFS("Jan 35"); EXPECT_DBL(12785.0); - DFS("35 Jan"); EXPECT_DBL(12785.0); - DFS("Jan-35"); EXPECT_DBL(12785.0); - DFS("35-Jan"); EXPECT_DBL(12785.0); - DFS("Jan/35"); EXPECT_DBL(12785.0); - DFS("35/Jan"); EXPECT_DBL(12785.0); - /* 3 elements */ - /* 3 numbers and time separator => h:m:s */ - DFS("0.1.0"); EXPECT_DBL(0.0006944444444444445); - DFS("1.5.2"); EXPECT_DBL(0.04516203703703704); - /* 3 numbers => picks date giving preference to lcid format */ - DFS("1 2 3"); EXPECT_DBL(37623.0); - DFS("14 2 3"); EXPECT_DBL(41673.0); - DFS("2 14 3"); EXPECT_DBL(37666.0); - DFS("2 3 14"); EXPECT_DBL(41673.0); - DFS("32 2 3"); EXPECT_DBL(11722.0); - DFS("2 3 32"); EXPECT_DBL(11722.0); - DFS("1 2 29"); EXPECT_DBL(47120.0); - /* After 30, two digit dates are expected to be in the 1900's */ - DFS("1 2 30"); EXPECT_DBL(10960.0); - DFS("1 2 31"); EXPECT_DBL(11325.0); - DFS("3 am 1 2"); MKRELDATE(2,1); relative += 0.125; EXPECT_DBL(relative); - DFS("1 2 3 am"); EXPECT_DBL(relative); - - /* 4 elements -interpreted as 2 digit date & time */ - DFS("1.2 3 4"); MKRELDATE(4,3); relative += 0.04305555556; EXPECT_DBL(relative); - DFS("3 4 1.2"); EXPECT_DBL(relative); - /* 5 elements - interpreted as 2 & 3 digit date/times */ - DFS("1.2.3 4 5"); MKRELDATE(5,4); relative += 0.04309027778; EXPECT_DBL(relative); - DFS("1.2 3 4 5"); EXPECT_DBL(38415.04305555556); -#if 0 - /* following throws an exception on winME */ - DFS("1 2 3.4.5"); MKRELDATE(2,1); relative += 0.12783564815; EXPECT_DBL(relative); -#endif - DFS("1 2 3 4.5"); EXPECT_DBL(37623.17013888889); - /* 6 elements - interpreted as 3 digit date/times */ - DFS("1.2.3 4 5 6"); EXPECT_DBL(38812.04309027778); - DFS("1 2 3 4.5.6"); EXPECT_DBL(37623.17020833334); - - for (i = 0; i < sizeof(BadDateStrings)/sizeof(char*); i++) - { - DFS(BadDateStrings[i]); EXPECT_MISMATCH; - } - - /* Some normal-ish strings */ - DFS("2 January, 1970"); EXPECT_DBL(25570.0); - DFS("2 January 1970"); EXPECT_DBL(25570.0); - DFS("2 Jan 1970"); EXPECT_DBL(25570.0); - DFS("2/Jan/1970"); EXPECT_DBL(25570.0); - DFS("2-Jan-1970"); EXPECT_DBL(25570.0); - DFS("1 2 1970"); EXPECT_DBL(25570.0); - DFS("1/2/1970"); EXPECT_DBL(25570.0); - DFS("1-2-1970"); EXPECT_DBL(25570.0); - /* Native fails "1999 January 3, 9AM". I consider that a bug in native */ - - /* test a non-english data string */ - DFS("02.01.1970"); EXPECT_MISMATCH; - DFS("02.01.1970 00:00:00"); EXPECT_MISMATCH; - lcid = MAKELCID(MAKELANGID(LANG_GERMAN,SUBLANG_GERMAN),SORT_DEFAULT); - DFS("02.01.1970"); EXPECT_DBL(25570.0); - DFS("02.01.1970 00:00:00"); EXPECT_DBL(25570.0); - lcid = MAKELCID(MAKELANGID(LANG_SPANISH,SUBLANG_SPANISH),SORT_DEFAULT); - DFS("02.01.1970"); EXPECT_MISMATCH; - DFS("02.01.1970 00:00:00"); EXPECT_MISMATCH; -} - -static void test_VarDateCopy(void) -{ - COPYTEST(77665544.0, VT_DATE, V_DATE(&vSrc), V_DATE(&vDst), V_DATEREF(&vSrc), - V_DATEREF(&vDst), "%16.16g"); -} - -static const char* wtoascii(LPWSTR lpszIn) -{ - static char buff[256]; - WideCharToMultiByte(CP_ACP, 0, lpszIn, -1, buff, sizeof(buff), NULL, NULL); - return buff; -} - -static void test_VarDateChangeTypeEx(void) -{ - static const WCHAR sz25570[] = { - '1','/','2','/','1','9','7','0','\0' }; - static const WCHAR sz25570_2[] = { - '1','/','2','/','7','0','\0' }; - static const WCHAR sz25570Nls[] = { - '1','/','2','/','1','9','7','0',' ','1','2',':','0','0',':','0','0',' ','A','M','\0' }; - CONVVARS(CONV_TYPE); - VARIANTARG vSrc, vDst; - LCID lcid; - - in = 1.0; - -#ifdef HAS_UINT64_TO_FLOAT - INITIAL_TYPETEST(VT_DATE, V_DATE, "%g"); - COMMON_TYPETEST; -#endif - - V_VT(&vDst) = VT_EMPTY; - V_VT(&vSrc) = VT_DATE; - V_DATE(&vSrc) = 25570.0; - lcid = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT); - - hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, VARIANT_NOUSEROVERRIDE, VT_BSTR); - ok(hres == S_OK && V_VT(&vDst) == VT_BSTR && V_BSTR(&vDst) && - (!lstrcmpW(V_BSTR(&vDst), sz25570) || !lstrcmpW(V_BSTR(&vDst), sz25570_2)), - "hres=0x%X, type=%d (should be VT_BSTR), *bstr=%s\n", - hres, V_VT(&vDst), V_BSTR(&vDst) ? wtoascii(V_BSTR(&vDst)) : "?"); - VariantClear(&vDst); - - lcid = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT); - if (HAVE_OLEAUT32_LOCALES) - { - hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, VARIANT_NOUSEROVERRIDE|VARIANT_USE_NLS, VT_BSTR); - ok(hres == S_OK && V_VT(&vDst) == VT_BSTR && V_BSTR(&vDst) && !lstrcmpW(V_BSTR(&vDst), sz25570Nls), - "hres=0x%X, type=%d (should be VT_BSTR), *bstr=%s\n", - hres, V_VT(&vDst), V_BSTR(&vDst) ? wtoascii(V_BSTR(&vDst)) : "?"); - VariantClear(&vDst); - } -} - -/* - * VT_CY - */ - -#undef CONV_TYPE -#define CONV_TYPE CY -#undef EXPECTRES -#define EXPECTRES(res, x) \ - ok(hres == S_OK || ((HRESULT)res != S_OK && hres == (HRESULT)res), \ - "expected hres " #x ", got hres=0x%08x\n", hres) - -#define EXPECTCY(x) \ - ok((hres == S_OK && out.int64 == (LONGLONG)(x*CY_MULTIPLIER)), \ - "expected " #x "*CY_MULTIPLIER, got (%8x %8x); hres=0x%08x\n", S(out).Hi, S(out).Lo, hres) - -#define EXPECTCY64(x,y) \ - ok(hres == S_OK && S(out).Hi == (LONG)x && S(out).Lo == y, \ - "expected " #x " " #y " (%u,%u), got (%u,%u); hres=0x%08x\n", \ - (ULONG)(x), (ULONG)(y), S(out).Hi, S(out).Lo, hres) - -static void test_VarCyFromI1(void) -{ - CONVVARS(signed char); - int i; - - CHECKPTR(VarCyFromI1); - for (i = -128; i < 128; i++) - { - CONVERT(VarCyFromI1,i); EXPECTCY(i); - } -} - -static void test_VarCyFromUI1(void) -{ - CONVVARS(BYTE); - int i; - - CHECKPTR(VarCyFromUI1); - for (i = 0; i < 256; i++) - { - CONVERT(VarCyFromUI1,i); EXPECTCY(i); - } -} - -static void test_VarCyFromI2(void) -{ - CONVVARS(SHORT); - int i; - - CHECKPTR(VarCyFromI2); - for (i = -16384; i < 16384; i++) - { - CONVERT(VarCyFromI2,i); EXPECTCY(i); - } -} - -static void test_VarCyFromUI2(void) -{ - CONVVARS(int); - int i; - - CHECKPTR(VarCyFromUI2); - for (i = 0; i < 32768; i++) - { - CONVERT(VarCyFromUI2,i); EXPECTCY(i); - } -} - -static void test_VarCyFromI4(void) -{ - CONVVARS(int); - - CHECKPTR(VarCyFromI4); - CONVERT(VarCyFromI4, -1); EXPECTCY(-1); - CONVERT(VarCyFromI4, 0); EXPECTCY(0); - CONVERT(VarCyFromI4, 1); EXPECTCY(1); - CONVERT(VarCyFromI4, 0x7fffffff); EXPECTCY64(0x1387, 0xffffd8f0); - CONVERT(VarCyFromI4, 0x80000000); EXPECTCY64(0xffffec78, 0); -} - -static void test_VarCyFromUI4(void) -{ - CONVVARS(unsigned int); - - CHECKPTR(VarCyFromUI4); - CONVERT(VarCyFromUI4, 0); EXPECTCY(0); - CONVERT(VarCyFromUI4, 1); EXPECTCY(1); - CONVERT(VarCyFromUI4, 0x80000000); EXPECTCY64(5000, 0); -} - -static void test_VarCyFromR4(void) -{ - CONVVARS(FLOAT); - - CHECKPTR(VarCyFromR4); - CONVERT(VarCyFromR4, -1.0f); EXPECTCY(-1); - CONVERT(VarCyFromR4, 0.0f); EXPECTCY(0); - CONVERT(VarCyFromR4, 1.0f); EXPECTCY(1); - CONVERT(VarCyFromR4, 1.5f); EXPECTCY(1.5); - - CONVERT(VarCyFromR4, -1.5f); EXPECTCY(-1.5); - CONVERT(VarCyFromR4, -0.6f); EXPECTCY(-0.6); - CONVERT(VarCyFromR4, -0.5f); EXPECTCY(-0.5); - CONVERT(VarCyFromR4, -0.4f); EXPECTCY(-0.4); - CONVERT(VarCyFromR4, 0.4f); EXPECTCY(0.4); - CONVERT(VarCyFromR4, 0.5f); EXPECTCY(0.5); - CONVERT(VarCyFromR4, 0.6f); EXPECTCY(0.6); - CONVERT(VarCyFromR4, 1.5f); EXPECTCY(1.5); - CONVERT(VarCyFromR4, 1.00009f); EXPECTCY(1.0001); - CONVERT(VarCyFromR4, -1.00001f); EXPECTCY(-1); - CONVERT(VarCyFromR4, -1.00005f); EXPECTCY(-1); - CONVERT(VarCyFromR4, -0.00009f); EXPECTCY(-0.0001); - CONVERT(VarCyFromR4, -0.00005f); EXPECTCY(0); - CONVERT(VarCyFromR4, -0.00001f); EXPECTCY(0); - CONVERT(VarCyFromR4, 0.00001f); EXPECTCY(0); - CONVERT(VarCyFromR4, 0.00005f); EXPECTCY(0); - CONVERT(VarCyFromR4, 0.00009f); EXPECTCY(0.0001); - CONVERT(VarCyFromR4, -1.00001f); EXPECTCY(-1); - CONVERT(VarCyFromR4, -1.00005f); EXPECTCY(-1); - CONVERT(VarCyFromR4, -1.00009f); EXPECTCY(-1.0001); -} - -static void test_VarCyFromR8(void) -{ - CONVVARS(DOUBLE); - - CHECKPTR(VarCyFromR8); - -#if defined(__i386__) && (defined(_MSC_VER) || defined(__GNUC__)) - /* Test our rounding is exactly the same. This fails if the special x86 - * code is taken out of VarCyFromR8. - */ - CONVERT(VarCyFromR8, -461168601842738.7904); EXPECTCY64(0xbfffffff, 0xffffff23); -#endif - - CONVERT(VarCyFromR8, -4611686018427388416.1); EXPECT_OVERFLOW; - CONVERT(VarCyFromR8, -1.0); EXPECTCY(-1); - CONVERT(VarCyFromR8, -0.0); EXPECTCY(0); - CONVERT(VarCyFromR8, 1.0); EXPECTCY(1); - CONVERT(VarCyFromR8, 4611686018427387648.0); EXPECT_OVERFLOW; - - /* Rounding */ - CONVERT(VarCyFromR8, -1.5f); EXPECTCY(-1.5); - CONVERT(VarCyFromR8, -0.6f); EXPECTCY(-0.6); - CONVERT(VarCyFromR8, -0.5f); EXPECTCY(-0.5); - CONVERT(VarCyFromR8, -0.4f); EXPECTCY(-0.4); - CONVERT(VarCyFromR8, 0.4f); EXPECTCY(0.4); - CONVERT(VarCyFromR8, 0.5f); EXPECTCY(0.5); - CONVERT(VarCyFromR8, 0.6f); EXPECTCY(0.6); - CONVERT(VarCyFromR8, 1.5f); EXPECTCY(1.5); - CONVERT(VarCyFromR8, 1.00009f); EXPECTCY(1.0001); - CONVERT(VarCyFromR8, -1.00001f); EXPECTCY(-1); - CONVERT(VarCyFromR8, -1.00005f); EXPECTCY(-1); - CONVERT(VarCyFromR8, -0.00009f); EXPECTCY(-0.0001); - CONVERT(VarCyFromR8, -0.00005f); EXPECTCY(0); - CONVERT(VarCyFromR8, -0.00001f); EXPECTCY(0); - CONVERT(VarCyFromR8, 0.00001f); EXPECTCY(0); - CONVERT(VarCyFromR8, 0.00005f); EXPECTCY(0); - CONVERT(VarCyFromR8, 0.00009f); EXPECTCY(0.0001); - CONVERT(VarCyFromR8, -1.00001f); EXPECTCY(-1); - CONVERT(VarCyFromR8, -1.00005f); EXPECTCY(-1); - CONVERT(VarCyFromR8, -1.00009f); EXPECTCY(-1.0001); -} - -static void test_VarCyFromBool(void) -{ - CONVVARS(VARIANT_BOOL); - int i; - - CHECKPTR(VarCyFromBool); - for (i = -32768; i < 32768; i++) - { - CONVERT(VarCyFromBool, i); EXPECTCY(i); - } -} - -static void test_VarCyFromI8(void) -{ - CONVVARS(LONG64); - - CHECKPTR(VarCyFromI8); - CONVERT_I8(VarCyFromI8, -214749, 2728163227ul); EXPECT_OVERFLOW; - CONVERT_I8(VarCyFromI8, -214749, 2728163228ul); EXPECTCY64(2147483648ul,15808); - CONVERT(VarCyFromI8, -1); EXPECTCY(-1); - CONVERT(VarCyFromI8, 0); EXPECTCY(0); - CONVERT(VarCyFromI8, 1); EXPECTCY(1); - CONVERT_I8(VarCyFromI8, 214748, 1566804068); EXPECTCY64(2147483647ul, 4294951488ul); - CONVERT_I8(VarCyFromI8, 214748, 1566804069); EXPECT_OVERFLOW; -} - -static void test_VarCyFromUI8(void) -{ - CONVVARS(ULONG64); - - CHECKPTR(VarCyFromUI8); - CONVERT(VarCyFromUI8, 0); EXPECTCY(0); - CONVERT(VarCyFromUI8, 1); EXPECTCY(1); - CONVERT_I8(VarCyFromUI8, 214748, 1566804068); EXPECTCY64(2147483647ul, 4294951488ul); - CONVERT_I8(VarCyFromUI8, 214748, 1566804069); EXPECT_OVERFLOW; -} - -static void test_VarCyFromDec(void) -{ - CONVVARS(DECIMAL); - - CHECKPTR(VarCyFromDec); - - CONVERT_BADDEC(VarCyFromDec); - - CONVERT_DEC(VarCyFromDec,0,0x80,0,1); EXPECTCY(-1); - CONVERT_DEC(VarCyFromDec,0,0,0,0); EXPECTCY(0); - CONVERT_DEC(VarCyFromDec,0,0,0,1); EXPECTCY(1); - - CONVERT_DEC64(VarCyFromDec,0,0,0,214748, 1566804068); EXPECTCY64(2147483647ul, 4294951488ul); - CONVERT_DEC64(VarCyFromDec,0,0,0,214748, 1566804069); EXPECT_OVERFLOW; - - CONVERT_DEC(VarCyFromDec,2,0,0,100); EXPECTCY(1); - CONVERT_DEC(VarCyFromDec,2,0x80,0,100); EXPECTCY(-1); - CONVERT_DEC(VarCyFromDec,2,0x80,0,1); EXPECTCY(-0.01); - CONVERT_DEC(VarCyFromDec,2,0,0,1); EXPECTCY(0.01); - CONVERT_DEC(VarCyFromDec,2,0x80,0,1); EXPECTCY(-0.01); - CONVERT_DEC(VarCyFromDec,2,0,0,999); EXPECTCY(9.99); - CONVERT_DEC(VarCyFromDec,2,0x80,0,999); EXPECTCY(-9.99); - CONVERT_DEC(VarCyFromDec,2,0,0,1500); EXPECTCY(15); - CONVERT_DEC(VarCyFromDec,2,0x80,0,1500); EXPECTCY(-15); -} - -static void test_VarCyFromDate(void) -{ - CONVVARS(DATE); - - CHECKPTR(VarCyFromDate); - -#if defined(__i386__) && (defined(_MSC_VER) || defined(__GNUC__)) - CONVERT(VarCyFromR8, -461168601842738.7904); EXPECTCY64(0xbfffffff, 0xffffff23); -#endif - - CONVERT(VarCyFromDate, -1.0); EXPECTCY(-1); - CONVERT(VarCyFromDate, -0.0); EXPECTCY(0); - CONVERT(VarCyFromDate, 1.0); EXPECTCY(1); - CONVERT(VarCyFromDate, -4611686018427388416.1); EXPECT_OVERFLOW; - CONVERT(VarCyFromDate, 4611686018427387648.0); EXPECT_OVERFLOW; - - /* Rounding */ - CONVERT(VarCyFromDate, -1.5f); EXPECTCY(-1.5); - CONVERT(VarCyFromDate, -0.6f); EXPECTCY(-0.6); - CONVERT(VarCyFromDate, -0.5f); EXPECTCY(-0.5); - CONVERT(VarCyFromDate, -0.4f); EXPECTCY(-0.4); - CONVERT(VarCyFromDate, 0.4f); EXPECTCY(0.4); - CONVERT(VarCyFromDate, 0.5f); EXPECTCY(0.5); - CONVERT(VarCyFromDate, 0.6f); EXPECTCY(0.6); - CONVERT(VarCyFromDate, 1.5f); EXPECTCY(1.5); - CONVERT(VarCyFromDate, 1.00009f); EXPECTCY(1.0001); - CONVERT(VarCyFromDate, -1.00001f); EXPECTCY(-1); - CONVERT(VarCyFromDate, -1.00005f); EXPECTCY(-1); - CONVERT(VarCyFromDate, -0.00009f); EXPECTCY(-0.0001); - CONVERT(VarCyFromDate, -0.00005f); EXPECTCY(0); - CONVERT(VarCyFromDate, -0.00001f); EXPECTCY(0); - CONVERT(VarCyFromDate, 0.00001f); EXPECTCY(0); - CONVERT(VarCyFromDate, 0.00005f); EXPECTCY(0); - CONVERT(VarCyFromDate, 0.00009f); EXPECTCY(0.0001); - CONVERT(VarCyFromDate, -1.00001f); EXPECTCY(-1); - CONVERT(VarCyFromDate, -1.00005f); EXPECTCY(-1); - CONVERT(VarCyFromDate, -1.00009f); EXPECTCY(-1.0001); -} - -#define MATHVARS1 HRESULT hres; double left = 0.0; CY cyLeft, out -#define MATHVARS2 MATHVARS1; double right = 0.0; CY cyRight -#define MATH1(func, l) left = (double)l; pVarCyFromR8(left, &cyLeft); hres = p##func(cyLeft, &out) -#define MATH2(func, l, r) left = (double)l; right = (double)r; \ - pVarCyFromR8(left, &cyLeft); pVarCyFromR8(right, &cyRight); \ - hres = p##func(cyLeft, cyRight, &out) - -static void test_VarCyAdd(void) -{ - MATHVARS2; - - CHECKPTR(VarCyAdd); - MATH2(VarCyAdd, 0.5, 0.5); EXPECTCY(1); - MATH2(VarCyAdd, 0.5, -0.4); EXPECTCY(0.1); - MATH2(VarCyAdd, 0.5, -0.6); EXPECTCY(-0.1); - MATH2(VarCyAdd, -0.5, -0.5); EXPECTCY(-1); - MATH2(VarCyAdd, -922337203685476.0, -922337203685476.0); EXPECT_OVERFLOW; - MATH2(VarCyAdd, -922337203685476.0, 922337203685476.0); EXPECTCY(0); - MATH2(VarCyAdd, 922337203685476.0, -922337203685476.0); EXPECTCY(0); - MATH2(VarCyAdd, 922337203685476.0, 922337203685476.0); EXPECT_OVERFLOW; -} - -static void test_VarCyMul(void) -{ - MATHVARS2; - - CHECKPTR(VarCyMul); - MATH2(VarCyMul, 534443.0, 0.0); EXPECTCY(0); - MATH2(VarCyMul, 0.5, 0.5); EXPECTCY(0.25); - MATH2(VarCyMul, 0.5, -0.4); EXPECTCY(-0.2); - MATH2(VarCyMul, 0.5, -0.6); EXPECTCY(-0.3); - MATH2(VarCyMul, -0.5, -0.5); EXPECTCY(0.25); - MATH2(VarCyMul, 922337203685476.0, 20000); EXPECT_OVERFLOW; -} - -static void test_VarCySub(void) -{ - MATHVARS2; - - CHECKPTR(VarCySub); - MATH2(VarCySub, 0.5, 0.5); EXPECTCY(0); - MATH2(VarCySub, 0.5, -0.4); EXPECTCY(0.9); - MATH2(VarCySub, 0.5, -0.6); EXPECTCY(1.1); - MATH2(VarCySub, -0.5, -0.5); EXPECTCY(0); - MATH2(VarCySub, -922337203685476.0, -922337203685476.0); EXPECTCY(0); - MATH2(VarCySub, -922337203685476.0, 922337203685476.0); EXPECT_OVERFLOW; - MATH2(VarCySub, 922337203685476.0, -922337203685476.0); EXPECT_OVERFLOW; - MATH2(VarCySub, 922337203685476.0, 922337203685476.0); EXPECTCY(0); -} - -static void test_VarCyAbs(void) -{ - MATHVARS1; - - CHECKPTR(VarCyAbs); - MATH1(VarCyAbs, 0.5); EXPECTCY(0.5); - MATH1(VarCyAbs, -0.5); EXPECTCY(0.5); - MATH1(VarCyAbs, 922337203685476.0); EXPECTCY64(2147483647ul,4294951488ul); - MATH1(VarCyAbs, -922337203685476.0); EXPECTCY64(2147483647ul,4294951488ul); -} - -static void test_VarCyNeg(void) -{ - MATHVARS1; - - CHECKPTR(VarCyNeg); - MATH1(VarCyNeg, 0.5); EXPECTCY(-0.5); - MATH1(VarCyNeg, -0.5); EXPECTCY(0.5); - MATH1(VarCyNeg, 922337203685476.0); EXPECTCY64(2147483648ul,15808); - MATH1(VarCyNeg, -922337203685476.0); EXPECTCY64(2147483647ul,4294951488ul); -} - -#define MATHMULI4(l, r) left = l; right = r; pVarCyFromR8(left, &cyLeft); \ - hres = pVarCyMulI4(cyLeft, right, &out) - -static void test_VarCyMulI4(void) -{ - MATHVARS1; - LONG right; - - CHECKPTR(VarCyMulI4); - MATHMULI4(534443.0, 0); EXPECTCY(0); - MATHMULI4(0.5, 1); EXPECTCY(0.5); - MATHMULI4(0.5, 2); EXPECTCY(1); - MATHMULI4(922337203685476.0, 1); EXPECTCY64(2147483647ul,4294951488ul); - MATHMULI4(922337203685476.0, 2); EXPECT_OVERFLOW; -} - -#define MATHMULI8(l, r) left = l; right = r; pVarCyFromR8(left, &cyLeft); \ - hres = pVarCyMulI8(cyLeft, right, &out) - -static void test_VarCyMulI8(void) -{ - MATHVARS1; - LONG64 right; - - CHECKPTR(VarCyMulI8); - MATHMULI8(534443.0, 0); EXPECTCY(0); - MATHMULI8(0.5, 1); EXPECTCY(0.5); - MATHMULI8(0.5, 2); EXPECTCY(1); - MATHMULI8(922337203685476.0, 1); EXPECTCY64(2147483647ul,4294951488ul); - MATHMULI8(922337203685476.0, 2); EXPECT_OVERFLOW; -} - -#define MATHCMP(l, r) left = l; right = r; pVarCyFromR8(left, &cyLeft); pVarCyFromR8(right, &cyRight); \ - hres = pVarCyCmp(cyLeft, cyRight); out.int64 = hres - -static void test_VarCyCmp(void) -{ - MATHVARS2; - - CHECKPTR(VarCyCmp); - MATHCMP(-1.0, -1.0); EXPECT_EQ; - MATHCMP(-1.0, 0.0); EXPECT_LT; - MATHCMP(-1.0, 1.0); EXPECT_LT; - MATHCMP(-1.0, 2.0); EXPECT_LT; - MATHCMP(0.0, 1.0); EXPECT_LT; - MATHCMP(0.0, 0.0); EXPECT_EQ; - MATHCMP(0.0, -1.0); EXPECT_GT; - MATHCMP(1.0, -1.0); EXPECT_GT; - MATHCMP(1.0, 0.0); EXPECT_GT; - MATHCMP(1.0, 1.0); EXPECT_EQ; - MATHCMP(1.0, 2.0); EXPECT_LT; -} - -#define MATHCMPR8(l, r) left = l; right = r; pVarCyFromR8(left, &cyLeft); \ - hres = pVarCyCmpR8(cyLeft, right); out.int64 = hres - -static void test_VarCyCmpR8(void) -{ - MATHVARS1; - double right; - - CHECKPTR(VarCyCmpR8); - MATHCMPR8(-1.0, -1.0); EXPECT_EQ; - MATHCMPR8(-1.0, 0.0); EXPECT_LT; - MATHCMPR8(-1.0, 1.0); EXPECT_LT; - MATHCMPR8(-1.0, 2.0); EXPECT_LT; - MATHCMPR8(0.0, 1.0); EXPECT_LT; - MATHCMPR8(0.0, 0.0); EXPECT_EQ; - MATHCMPR8(0.0, -1.0); EXPECT_GT; - MATHCMPR8(1.0, -1.0); EXPECT_GT; - MATHCMPR8(1.0, 0.0); EXPECT_GT; - MATHCMPR8(1.0, 1.0); EXPECT_EQ; - MATHCMPR8(1.0, 2.0); EXPECT_LT; -} - -#undef MATHRND -#define MATHRND(l, r) left = l; right = r; pVarCyFromR8(left, &cyLeft); \ - hres = pVarCyRound(cyLeft, right, &out) - -static void test_VarCyRound(void) -{ - MATHVARS1; - int right; - - CHECKPTR(VarCyRound); - MATHRND(0.5432, 5); EXPECTCY(0.5432); - MATHRND(0.5432, 4); EXPECTCY(0.5432); - MATHRND(0.5432, 3); EXPECTCY(0.543); - MATHRND(0.5432, 2); EXPECTCY(0.54); - MATHRND(0.5432, 1); EXPECTCY(0.5); - MATHRND(0.5532, 0); EXPECTCY(1); - MATHRND(0.5532, -1); EXPECT_INVALID; - - MATHRND(0.5568, 5); EXPECTCY(0.5568); - MATHRND(0.5568, 4); EXPECTCY(0.5568); - MATHRND(0.5568, 3); EXPECTCY(0.557); - MATHRND(0.5568, 2); EXPECTCY(0.56); - MATHRND(0.5568, 1); EXPECTCY(0.6); - MATHRND(0.5568, 0); EXPECTCY(1); - MATHRND(0.5568, -1); EXPECT_INVALID; - - MATHRND(0.4999, 0); EXPECTCY(0); - MATHRND(0.5000, 0); EXPECTCY(0); - MATHRND(0.5001, 0); EXPECTCY(1); - MATHRND(1.4999, 0); EXPECTCY(1); - MATHRND(1.5000, 0); EXPECTCY(2); - MATHRND(1.5001, 0); EXPECTCY(2); -} - -#define MATHFIX(l) left = l; pVarCyFromR8(left, &cyLeft); \ - hres = pVarCyFix(cyLeft, &out) - -static void test_VarCyFix(void) -{ - MATHVARS1; - - CHECKPTR(VarCyFix); - MATHFIX(-1.0001); EXPECTCY(-1); - MATHFIX(-1.4999); EXPECTCY(-1); - MATHFIX(-1.5001); EXPECTCY(-1); - MATHFIX(-1.9999); EXPECTCY(-1); - MATHFIX(-0.0001); EXPECTCY(0); - MATHFIX(-0.4999); EXPECTCY(0); - MATHFIX(-0.5001); EXPECTCY(0); - MATHFIX(-0.9999); EXPECTCY(0); - MATHFIX(0.0001); EXPECTCY(0); - MATHFIX(0.4999); EXPECTCY(0); - MATHFIX(0.5001); EXPECTCY(0); - MATHFIX(0.9999); EXPECTCY(0); - MATHFIX(1.0001); EXPECTCY(1); - MATHFIX(1.4999); EXPECTCY(1); - MATHFIX(1.5001); EXPECTCY(1); - MATHFIX(1.9999); EXPECTCY(1); -} - -#define MATHINT(l) left = l; pVarCyFromR8(left, &cyLeft); \ - hres = pVarCyInt(cyLeft, &out) - -static void test_VarCyInt(void) -{ - MATHVARS1; - - CHECKPTR(VarCyInt); - MATHINT(-1.0001); EXPECTCY(-2); - MATHINT(-1.4999); EXPECTCY(-2); - MATHINT(-1.5001); EXPECTCY(-2); - MATHINT(-1.9999); EXPECTCY(-2); - MATHINT(-0.0001); EXPECTCY(-1); - MATHINT(-0.4999); EXPECTCY(-1); - MATHINT(-0.5001); EXPECTCY(-1); - MATHINT(-0.9999); EXPECTCY(-1); - MATHINT(0.0001); EXPECTCY(0); - MATHINT(0.4999); EXPECTCY(0); - MATHINT(0.5001); EXPECTCY(0); - MATHINT(0.9999); EXPECTCY(0); - MATHINT(1.0001); EXPECTCY(1); - MATHINT(1.4999); EXPECTCY(1); - MATHINT(1.5001); EXPECTCY(1); - MATHINT(1.9999); EXPECTCY(1); -} - -/* - * VT_DECIMAL - */ - -#undef CONV_TYPE -#define CONV_TYPE DECIMAL -#undef EXPECTRES -#define EXPECTRES(res, x) \ - ok(hres == S_OK || ((HRESULT)res != S_OK && hres == (HRESULT)res), \ - "expected hres " #x ", got hres=0x%08x\n", hres) - -#define EXPECTDEC(scl, sgn, hi, lo) ok(hres == S_OK && \ - S(U(out)).scale == (BYTE)(scl) && S(U(out)).sign == (BYTE)(sgn) && \ - out.Hi32 == (ULONG)(hi) && U1(out).Lo64 == (ULONG64)(lo), \ - "expected (%d,%d,%d,(%x %x)), got (%d,%d,%d,(%x %x)) hres 0x%08x\n", \ - scl, sgn, hi, (LONG)((LONG64)(lo) >> 32), (LONG)((lo) & 0xffffffff), S(U(out)).scale, \ - S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres) - -#define EXPECTDEC64(scl, sgn, hi, mid, lo) ok(hres == S_OK && \ - S(U(out)).scale == (BYTE)(scl) && S(U(out)).sign == (BYTE)(sgn) && \ - out.Hi32 == (ULONG)(hi) && S1(U1(out)).Mid32 == (ULONG)(mid) && \ - S1(U1(out)).Lo32 == (ULONG)(lo), \ - "expected (%d,%d,%d,(%x %x)), got (%d,%d,%d,(%x %x)) hres 0x%08x\n", \ - scl, sgn, hi, (LONG)(mid), (LONG)(lo), S(U(out)).scale, \ - S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres) - -/* expect either a positive or negative zero */ -#define EXPECTDECZERO() ok(hres == S_OK && S(U(out)).scale == 0 && \ - (S(U(out)).sign == 0 || S(U(out)).sign == 0x80) && out.Hi32 == 0 && U1(out).Lo64 == 0, \ - "expected zero, got (%d,%d,%d,(%x %x)) hres 0x%08x\n", \ - S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres) - -#define EXPECTDECI if (i < 0) EXPECTDEC(0, 0x80, 0, -i); else EXPECTDEC(0, 0, 0, i) - -static void test_VarDecFromI1(void) -{ - CONVVARS(signed char); - int i; - - CHECKPTR(VarDecFromI1); - for (i = -128; i < 128; i++) - { - CONVERT(VarDecFromI1,i); EXPECTDECI; - } -} - -static void test_VarDecFromI2(void) -{ - CONVVARS(SHORT); - int i; - - CHECKPTR(VarDecFromI2); - for (i = -32768; i < 32768; i++) - { - CONVERT(VarDecFromI2,i); EXPECTDECI; - } -} - -static void test_VarDecFromI4(void) -{ - CONVVARS(LONG); - int i; - - CHECKPTR(VarDecFromI4); - for (i = -32768; i < 32768; i++) - { - CONVERT(VarDecFromI4,i); EXPECTDECI; - } -} - -static void test_VarDecFromI8(void) -{ - CONVVARS(LONG64); - int i; - - CHECKPTR(VarDecFromI8); - for (i = -32768; i < 32768; i++) - { - CONVERT(VarDecFromI8,i); EXPECTDECI; - } -} - -static void test_VarDecFromUI1(void) -{ - CONVVARS(BYTE); - int i; - - CHECKPTR(VarDecFromUI1); - for (i = 0; i < 256; i++) - { - CONVERT(VarDecFromUI1,i); EXPECTDECI; - } -} - -static void test_VarDecFromUI2(void) -{ - CONVVARS(USHORT); - int i; - - CHECKPTR(VarDecFromUI2); - for (i = 0; i < 65536; i++) - { - CONVERT(VarDecFromUI2,i); EXPECTDECI; - } -} - -static void test_VarDecFromUI4(void) -{ - CONVVARS(ULONG); - int i; - - CHECKPTR(VarDecFromUI4); - for (i = 0; i < 65536; i++) - { - CONVERT(VarDecFromUI4,i); EXPECTDECI; - } -} - -static void test_VarDecFromUI8(void) -{ - CONVVARS(ULONG64); - int i; - - CHECKPTR(VarDecFromUI8); - for (i = 0; i < 65536; i++) - { - CONVERT(VarDecFromUI8,i); EXPECTDECI; - } -} - -static void test_VarDecFromBool(void) -{ - CONVVARS(SHORT); - int i; - - CHECKPTR(VarDecFromBool); - /* Test all possible type values. Note that the result is reduced to 0 or -1 */ - for (i = -32768; i < 0; i++) - { - CONVERT(VarDecFromBool,i); - if (i) - EXPECTDEC(0,0x80,0,1); - else - EXPECTDEC(0,0,0,0); - } -} - -static void test_VarDecFromR4(void) -{ - CONVVARS(float); - - CHECKPTR(VarDecFromR4); - - CONVERT(VarDecFromR4,-0.6f); EXPECTDEC(1,0x80,0,6); - CONVERT(VarDecFromR4,-0.5f); EXPECTDEC(1,0x80,0,5); - CONVERT(VarDecFromR4,-0.4f); EXPECTDEC(1,0x80,0,4); - CONVERT(VarDecFromR4,0.0f); EXPECTDEC(0,0,0,0); - CONVERT(VarDecFromR4,0.4f); EXPECTDEC(1,0,0,4); - CONVERT(VarDecFromR4,0.5f); EXPECTDEC(1,0,0,5); - CONVERT(VarDecFromR4,0.6f); EXPECTDEC(1,0,0,6); -} - -static void test_VarDecFromR8(void) -{ - CONVVARS(double); - - CHECKPTR(VarDecFromR8); - - CONVERT(VarDecFromR8,-0.6); EXPECTDEC(1,0x80,0,6); - CONVERT(VarDecFromR8,-0.5); EXPECTDEC(1,0x80,0,5); - CONVERT(VarDecFromR8,-0.4); EXPECTDEC(1,0x80,0,4); - CONVERT(VarDecFromR8,0.0); EXPECTDEC(0,0,0,0); - CONVERT(VarDecFromR8,0.4); EXPECTDEC(1,0,0,4); - CONVERT(VarDecFromR8,0.5); EXPECTDEC(1,0,0,5); - CONVERT(VarDecFromR8,0.6); EXPECTDEC(1,0,0,6); -} - -static void test_VarDecFromDate(void) -{ - CONVVARS(DATE); - - CHECKPTR(VarDecFromDate); - - CONVERT(VarDecFromDate,-0.6); EXPECTDEC(1,0x80,0,6); - CONVERT(VarDecFromDate,-0.5); EXPECTDEC(1,0x80,0,5); - CONVERT(VarDecFromDate,-0.4); EXPECTDEC(1,0x80,0,4); - CONVERT(VarDecFromDate,0.0); EXPECTDEC(0,0,0,0); - CONVERT(VarDecFromDate,0.4); EXPECTDEC(1,0,0,4); - CONVERT(VarDecFromDate,0.5); EXPECTDEC(1,0,0,5); - CONVERT(VarDecFromDate,0.6); EXPECTDEC(1,0,0,6); -} - -static void test_VarDecFromStr(void) -{ - CONVVARS(LCID); - OLECHAR buff[128]; - - CHECKPTR(VarDecFromStr); - - in = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); - - CONVERT_STR(VarDecFromStr,NULL,0); EXPECT_MISMATCH; - CONVERT_STR(VarDecFromStr,"-1", LOCALE_NOUSEROVERRIDE); EXPECTDEC(0,0x80,0,1); - CONVERT_STR(VarDecFromStr,"0", LOCALE_NOUSEROVERRIDE); EXPECTDEC(0,0,0,0); - CONVERT_STR(VarDecFromStr,"1", LOCALE_NOUSEROVERRIDE); EXPECTDEC(0,0,0,1); - CONVERT_STR(VarDecFromStr,"0.5", LOCALE_NOUSEROVERRIDE); EXPECTDEC(1,0,0,5); - CONVERT_STR(VarDecFromStr,"4294967296", LOCALE_NOUSEROVERRIDE); EXPECTDEC64(0,0,0,1,0); - CONVERT_STR(VarDecFromStr,"18446744073709551616", LOCALE_NOUSEROVERRIDE); EXPECTDEC(0,0,1,0); - CONVERT_STR(VarDecFromStr,"4294967296.0", LOCALE_NOUSEROVERRIDE); EXPECTDEC64(0,0,0,1,0); - CONVERT_STR(VarDecFromStr,"18446744073709551616.0", LOCALE_NOUSEROVERRIDE); EXPECTDEC(0,0,1,0); -} - -static void test_VarDecFromCy(void) -{ - CONVVARS(CY); - - CHECKPTR(VarDecFromCy); - - CONVERT_CY(VarDecFromCy, -1); EXPECTDEC(4,0x80,0,10000); - CONVERT_CY(VarDecFromCy, 0); EXPECTDEC(4,0,0,0); - CONVERT_CY(VarDecFromCy, 1); EXPECTDEC(4,0,0,10000); - CONVERT_CY(VarDecFromCy, 0.5); EXPECTDEC(4,0,0,5000); -} - -#undef MATHVARS1 -#define MATHVARS1 HRESULT hres; DECIMAL l, out -#undef MATHVARS2 -#define MATHVARS2 MATHVARS1; DECIMAL r -#undef MATH1 -#define MATH1(func) hres = p##func(&l, &out) -#undef MATH2 -#define MATH2(func) hres = p##func(&l, &r, &out) - -static void test_VarDecAbs(void) -{ - MATHVARS1; - - CHECKPTR(VarDecAbs); - SETDEC(l,0,0x80,0,1); MATH1(VarDecAbs); EXPECTDEC(0,0,0,1); - SETDEC(l,0,0,0,0); MATH1(VarDecAbs); EXPECTDEC(0,0,0,0); - SETDEC(l,0,0x80,0,0); MATH1(VarDecAbs); EXPECTDEC(0,0,0,0); - SETDEC(l,0,0,0,1); MATH1(VarDecAbs); EXPECTDEC(0,0,0,1); - - /* Doesn't check for invalid input */ - SETDEC(l,0,0x7f,0,1); MATH1(VarDecAbs); EXPECTDEC(0,0x7f,0,1); - SETDEC(l,0,0x80,29,1); MATH1(VarDecAbs); EXPECTDEC(0,0,29,1); -} - -static void test_VarDecNeg(void) -{ - MATHVARS1; - - CHECKPTR(VarDecNeg); - SETDEC(l,0,0x80,0,1); MATH1(VarDecNeg); EXPECTDEC(0,0,0,1); - SETDEC(l,0,0,0,0); MATH1(VarDecNeg); EXPECTDEC(0,0x80,0,0); /* '-0'! */ - SETDEC(l,0,0x80,0,0); MATH1(VarDecNeg); EXPECTDEC(0,0,0,0); - SETDEC(l,0,0,0,1); MATH1(VarDecNeg); EXPECTDEC(0,0x80,0,1); - - /* Doesn't check for invalid input */ - SETDEC(l,0,0x7f,0,1); MATH1(VarDecNeg); EXPECTDEC(0,0xff,0,1); - SETDEC(l,0,0x80,29,1); MATH1(VarDecNeg); EXPECTDEC(0,0,29,1); - SETDEC(l,0,0,29,1); MATH1(VarDecNeg); EXPECTDEC(0,0x80,29,1); -} - -static void test_VarDecAdd(void) -{ - MATHVARS2; - - CHECKPTR(VarDecAdd); - SETDEC(l,0,0,0,0); SETDEC(r,0,0,0,0); MATH2(VarDecAdd); EXPECTDEC(0,0,0,0); - SETDEC(l,0,0,0,0); SETDEC(r,0,0x80,0,1); MATH2(VarDecAdd); EXPECTDEC(0,0x80,0,1); - SETDEC(l,0,0,0,0); SETDEC(r,0,0,0,1); MATH2(VarDecAdd); EXPECTDEC(0,0,0,1); - - SETDEC(l,0,0,0,1); SETDEC(r,0,0,0,0); MATH2(VarDecAdd); EXPECTDEC(0,0,0,1); - SETDEC(l,0,0,0,1); SETDEC(r,0,0,0,1); MATH2(VarDecAdd); EXPECTDEC(0,0,0,2); - SETDEC(l,0,0,0,1); SETDEC(r,0,0x80,0,1); MATH2(VarDecAdd); EXPECTDECZERO(); - SETDEC(l,0,0,0,1); SETDEC(r,0,0x80,0,2); MATH2(VarDecAdd); EXPECTDEC(0,0x80,0,1); - - SETDEC(l,0,0x80,0,0); SETDEC(r,0,0,0,1); MATH2(VarDecAdd); EXPECTDEC(0,0,0,1); - SETDEC(l,0,0x80,0,1); SETDEC(r,0,0,0,1); MATH2(VarDecAdd); EXPECTDECZERO(); - SETDEC(l,0,0x80,0,1); SETDEC(r,0,0,0,2); MATH2(VarDecAdd); EXPECTDEC(0,0,0,1); - SETDEC(l,0,0x80,0,1); SETDEC(r,0,0x80,0,1); MATH2(VarDecAdd); EXPECTDEC(0,0x80,0,2); - SETDEC(l,0,0x80,0,2); SETDEC(r,0,0,0,1); MATH2(VarDecAdd); EXPECTDEC(0,0x80,0,1); - - SETDEC(l,0,0,0,0xffffffff); SETDEC(r,0,0x80,0,1); MATH2(VarDecAdd); EXPECTDEC(0,0,0,0xfffffffe); - SETDEC(l,0,0,0,0xffffffff); SETDEC(r,0,0,0,1); MATH2(VarDecAdd); EXPECTDEC(0,0,0,(ULONG64)1 << 32); - SETDEC(l,0,0,0,0xffffffff); SETDEC(r,0,0,0,1); MATH2(VarDecAdd); EXPECTDEC(0,0,0,(ULONG64)1 << 32); - - SETDEC64(l,0,0,0,0xffffffff,0); SETDEC(r,0,0,0,1); MATH2(VarDecAdd); EXPECTDEC64(0,0,0,0xffffffff,1); - SETDEC64(l,0,0,0,0xffffffff,0); SETDEC(r,0,0x80,0,1); MATH2(VarDecAdd); - EXPECTDEC64(0,0,0,0xfffffffe,0xffffffff); - - SETDEC64(l,0,0,0,0xffffffff,0xffffffff); SETDEC(r,0,0,0,1); MATH2(VarDecAdd); EXPECTDEC(0,0,1,0); - SETDEC64(l,0,0,0,0xffffffff,0xffffffff); SETDEC(r,0,0x80,0,1); MATH2(VarDecAdd); - EXPECTDEC64(0,0,0,0xffffffff,0xfffffffe); - - SETDEC(l,0,0,0xffffffff,0); SETDEC(r,0,0,0,1); MATH2(VarDecAdd); EXPECTDEC(0,0,0xffffffff,1); - SETDEC(l,0,0,0xffffffff,0); SETDEC(r,0,0x80,0,1); MATH2(VarDecAdd); - EXPECTDEC64(0,0,0xfffffffe,0xffffffff,0xffffffff); - - SETDEC64(l,0,0,0xffffffff,0xffffffff,0xffffffff);SETDEC(r,0,0x80,0,1); MATH2(VarDecAdd); - EXPECTDEC64(0,0,0xffffffff,0xffffffff,0xfffffffe); - SETDEC64(l,0,0,0xffffffff,0xffffffff,0xffffffff);SETDEC(r,0,0,0,1); MATH2(VarDecAdd); - ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%d,(%8x,%8x)x) hres 0x%08x\n", - S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres); - - /* Promotes to the highest scale, so here the results are in the scale of 2 */ - SETDEC(l,2,0,0,0); SETDEC(r,0,0,0,0); MATH2(VarDecAdd); EXPECTDEC(2,0,0,0); - SETDEC(l,2,0,0,100); SETDEC(r,0,0,0,1); MATH2(VarDecAdd); EXPECTDEC(2,0,0,200); -} - -static void test_VarDecSub(void) -{ - MATHVARS2; - - CHECKPTR(VarDecSub); - SETDEC(l,0,0,0,0); SETDEC(r,0,0,0,0); MATH2(VarDecSub); EXPECTDECZERO(); - SETDEC(l,0,0,0,0); SETDEC(r,0,0,0,1); MATH2(VarDecSub); EXPECTDEC(0,0x80,0,1); - SETDEC(l,0,0,0,1); SETDEC(r,0,0,0,1); MATH2(VarDecSub); EXPECTDECZERO(); - SETDEC(l,0,0,0,1); SETDEC(r,0,0x80,0,1); MATH2(VarDecSub); EXPECTDEC(0,0,0,2); -} - -static void test_VarDecMul(void) -{ - MATHVARS2; - - CHECKPTR(VarDecMul); - SETDEC(l,0,0,0,0); SETDEC(r,0,0,0,0); MATH2(VarDecMul); EXPECTDEC(0,0,0,0); - SETDEC(l,0,0,0,1); SETDEC(r,0,0,0,0); MATH2(VarDecMul); EXPECTDEC(0,0,0,0); - SETDEC(l,0,0,0,0); SETDEC(r,0,0,0,1); MATH2(VarDecMul); EXPECTDEC(0,0,0,0); - SETDEC(l,0,0,0,1); SETDEC(r,0,0,0,1); MATH2(VarDecMul); EXPECTDEC(0,0,0,1); - SETDEC(l,0,0,0,45000);SETDEC(r,0,0,0,2); MATH2(VarDecMul); EXPECTDEC(0,0,0,90000); - SETDEC(l,0,0,0,2); SETDEC(r,0,0,0,45000); MATH2(VarDecMul); EXPECTDEC(0,0,0,90000); - - SETDEC(l,0,0x80,0,2); SETDEC(r,0,0,0,2); MATH2(VarDecMul); EXPECTDEC(0,0x80,0,4); - SETDEC(l,0,0,0,2); SETDEC(r,0,0x80,0,2); MATH2(VarDecMul); EXPECTDEC(0,0x80,0,4); - SETDEC(l,0,0x80,0,2); SETDEC(r,0,0x80,0,2); MATH2(VarDecMul); EXPECTDEC(0,0,0,4); - - SETDEC(l,4,0,0,2); SETDEC(r,0,0,0,2); MATH2(VarDecMul); EXPECTDEC(4,0,0,4); - SETDEC(l,0,0,0,2); SETDEC(r,3,0,0,2); MATH2(VarDecMul); EXPECTDEC(3,0,0,4); - SETDEC(l,4,0,0,2); SETDEC(r,3,0,0,2); MATH2(VarDecMul); EXPECTDEC(7,0,0,4); - /* this last one shows that native oleaut32 does *not* gratuitously seize opportunities - to reduce the scale if possible - the canonical result for the expected value is (6,0,0,1) - */ - SETDEC(l,4,0,0,5); SETDEC(r,3,0,0,2); MATH2(VarDecMul); EXPECTDEC(7,0,0,10); - - SETDEC64(l,0,0,0,0xFFFFFFFF,0xFFFFFFFF); SETDEC(r,0,0,0,2); MATH2(VarDecMul); EXPECTDEC64(0,0,1,0xFFFFFFFF,0xFFFFFFFE); - SETDEC(l,0,0,0,2); SETDEC64(r,0,0,0,0xFFFFFFFF,0xFFFFFFFF); MATH2(VarDecMul); EXPECTDEC64(0,0,1,0xFFFFFFFF,0xFFFFFFFE); - SETDEC(l,0,0,1,1); SETDEC(r,0,0,0,0x80000000); MATH2(VarDecMul); EXPECTDEC(0,0,0x80000000,0x80000000); - SETDEC(l,0,0,0,0x80000000); SETDEC(r,0,0,1,1); MATH2(VarDecMul); EXPECTDEC(0,0,0x80000000,0x80000000); - - /* near-overflow, used as a reference */ - SETDEC64(l,0,0,0,0xFFFFFFFF,0xFFFFFFFF); SETDEC(r,0,0,0,2000000000); MATH2(VarDecMul);EXPECTDEC64(0,0,1999999999,0xFFFFFFFF,0x88CA6C00); - /* actual overflow - right operand is 10 times the previous value */ - SETDEC64(l,0,0,0,0xFFFFFFFF,0xFFFFFFFF); SETDEC64(r,0,0,0,4,0xA817C800); MATH2(VarDecMul); - ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%d,(%8x,%8x)x) hres 0x%08x\n", - S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres); - /* here, native oleaut32 has an opportunity to avert the overflow, by reducing the scale of the result */ - SETDEC64(l,1,0,0,0xFFFFFFFF,0xFFFFFFFF); SETDEC64(r,0,0,0,4,0xA817C800); MATH2(VarDecMul);EXPECTDEC64(0,0,1999999999,0xFFFFFFFF,0x88CA6C00); - - /* near-overflow, used as a reference */ - SETDEC64(l,0,0,1,0xFFFFFFFF,0xFFFFFFFE); SETDEC(r,0,0,0,1000000000); MATH2(VarDecMul);EXPECTDEC64(0,0,1999999999,0xFFFFFFFF,0x88CA6C00); - /* actual overflow - right operand is 10 times the previous value */ - SETDEC64(l,0,0,1,0xFFFFFFFF,0xFFFFFFFE); SETDEC64(r,0,0,0,2,0x540BE400); MATH2(VarDecMul); - ok(hres == DISP_E_OVERFLOW,"Expected overflow, got (%d,%d,%d,(%8x,%8x)x) hres 0x%08x\n", - S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres); - /* here, native oleaut32 has an opportunity to avert the overflow, by reducing the scale of the result */ - SETDEC64(l,1,0,1,0xFFFFFFFF,0xFFFFFFFE); SETDEC64(r,0,0,0,2,0x540BE400); MATH2(VarDecMul);EXPECTDEC64(0,0,1999999999,0xFFFFFFFF,0x88CA6C00); - - /* this one shows that native oleaut32 is willing to lose significant digits in order to avert an overflow */ - SETDEC64(l,2,0,0,0xFFFFFFFF,0xFFFFFFFF); SETDEC64(r,0,0,0,9,0x502F9001); MATH2(VarDecMul);EXPECTDEC64(1,0,0xee6b2800,0x19999998,0xab2e719a); -} - -static void test_VarDecDiv(void) -{ - MATHVARS2; - - CHECKPTR(VarDecDiv); - /* identity divisions */ - SETDEC(l,0,0,0,0); SETDEC(r,0,0,0,1); MATH2(VarDecDiv); EXPECTDEC(0,0,0,0); - SETDEC(l,0,0,0,1); SETDEC(r,0,0,0,1); MATH2(VarDecDiv); EXPECTDEC(0,0,0,1); - SETDEC(l,1,0,0,1); SETDEC(r,0,0,0,1); MATH2(VarDecDiv); EXPECTDEC(1,0,0,1); - - /* exact divisions */ - SETDEC(l,0,0,0,45); SETDEC(r,0,0,0,9); MATH2(VarDecDiv); EXPECTDEC(0,0,0,5); - SETDEC(l,1,0,0,45); SETDEC(r,0,0,0,9); MATH2(VarDecDiv); EXPECTDEC(1,0,0,5); - SETDEC(l,0,0,0,45); SETDEC(r,1,0,0,9); MATH2(VarDecDiv); EXPECTDEC(0,0,0,50); - SETDEC(l,1,0,0,45); SETDEC(r,2,0,0,9); MATH2(VarDecDiv); EXPECTDEC(0,0,0,50); - /* these last three results suggest that native oleaut32 scales both operands down to zero - before the division, but does not always try to scale the result, even if it is possible - - analogous to multiplication behavior. - */ - SETDEC(l,1,0,0,45); SETDEC(r,1,0,0,9); MATH2(VarDecDiv); EXPECTDEC(0,0,0,5); - SETDEC(l,2,0,0,450); SETDEC(r,1,0,0,9); MATH2(VarDecDiv); - if (S(U(out)).scale == 1) EXPECTDEC(1,0,0,50); - else EXPECTDEC(0,0,0,5); - - /* inexact divisions */ - SETDEC(l,0,0,0,1); SETDEC(r,0,0,0,3); MATH2(VarDecDiv); EXPECTDEC64(28,0,180700362,0x14b700cb,0x05555555); - SETDEC(l,1,0,0,1); SETDEC(r,0,0,0,3); MATH2(VarDecDiv); EXPECTDEC64(28,0,18070036,0x35458014,0x4d555555); - SETDEC(l,0,0,0,1); SETDEC(r,1,0,0,3); MATH2(VarDecDiv); EXPECTDEC64(28,0,1807003620,0xcf2607ee,0x35555555); - SETDEC(l,1,0,0,1); SETDEC(r,2,0,0,3); MATH2(VarDecDiv); EXPECTDEC64(28,0,1807003620,0xcf2607ee,0x35555555); - SETDEC(l,1,0,0,1); SETDEC(r,1,0,0,3); MATH2(VarDecDiv); EXPECTDEC64(28,0,180700362,0x14b700cb,0x05555555); - SETDEC(l,2,0,0,10); SETDEC(r,1,0,0,3); MATH2(VarDecDiv); EXPECTDEC64(28,0,180700362,0x14b700cb,0x05555555); - - /* this one shows that native oleaut32 rounds up the result */ - SETDEC(l,0,0,0,2); SETDEC(r,0,0,0,3); MATH2(VarDecDiv); EXPECTDEC64(28,0,361400724,0x296e0196,0x0aaaaaab); - - /* sign tests */ - SETDEC(l,0,0x80,0,45); SETDEC(r,0,0,0,9); MATH2(VarDecDiv); EXPECTDEC(0,0x80,0,5); - SETDEC(l,0,0,0,45); SETDEC(r,0,0x80,0,9); MATH2(VarDecDiv);EXPECTDEC(0,0x80,0,5); - SETDEC(l,0,0x80,0,45); SETDEC(r,0,0x80,0,9); MATH2(VarDecDiv);EXPECTDEC(0,0,0,5); - - /* oddballs */ - SETDEC(l,0,0,0,0); SETDEC(r,0,0,0,0); MATH2(VarDecDiv);/* indeterminate */ - ok(hres == DISP_E_DIVBYZERO,"Expected division-by-zero, got (%d,%d,%d,(%8x,%8x)x) hres 0x%08x\n", - S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres); - SETDEC(l,0,0,0,1); SETDEC(r,0,0,0,0); MATH2(VarDecDiv);/* division by zero */ - ok(hres == DISP_E_DIVBYZERO,"Expected division-by-zero, got (%d,%d,%d,(%8x,%8x)x) hres 0x%08x\n", - S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres); - -} - -static void test_VarDecCmp(void) -{ - MATHVARS1; - - CHECKPTR(VarDecCmp); - - SETDEC(l,0,0,0,1); SETDEC(out,0,0,0,1); MATH1(VarDecCmp); EXPECT_EQ; - SETDEC(l,0,0,0,1); SETDEC(out,0,0,0,0); MATH1(VarDecCmp); EXPECT_GT; - SETDEC(l,0,0,0,1); SETDEC(out,0,0,-1,-1); MATH1(VarDecCmp); EXPECT_LT; - - SETDEC(l,0,0,0,1); SETDEC(out,0,DECIMAL_NEG,0,1); MATH1(VarDecCmp); EXPECT_GT; - SETDEC(l,0,0,0,1); SETDEC(out,0,DECIMAL_NEG,0,0); MATH1(VarDecCmp); EXPECT_GT; - SETDEC(l,0,0,0,1); SETDEC(out,0,DECIMAL_NEG,-1,-1); MATH1(VarDecCmp); EXPECT_GT; - - SETDEC(l,0,DECIMAL_NEG,0,1); SETDEC(out,0,0,0,1); MATH1(VarDecCmp); EXPECT_LT; - SETDEC(l,0,DECIMAL_NEG,0,1); SETDEC(out,0,0,0,0); MATH1(VarDecCmp); EXPECT_LT; - SETDEC(l,0,DECIMAL_NEG,0,1); SETDEC(out,0,0,-1,-1); MATH1(VarDecCmp); EXPECT_LT; - - SETDEC(l,0,DECIMAL_NEG,0,1); SETDEC(out,0,DECIMAL_NEG,0,1); MATH1(VarDecCmp); EXPECT_EQ; - SETDEC(l,0,DECIMAL_NEG,0,1); SETDEC(out,0,DECIMAL_NEG,0,0); MATH1(VarDecCmp); EXPECT_LT; - SETDEC(l,0,DECIMAL_NEG,0,1); SETDEC(out,0,DECIMAL_NEG,-1,-1); MATH1(VarDecCmp); EXPECT_GT; - - SETDEC(l,0,0,0,0); SETDEC(out,0,0,0,1); MATH1(VarDecCmp); EXPECT_LT; - SETDEC(l,0,0,0,0); SETDEC(out,0,0,0,0); MATH1(VarDecCmp); EXPECT_EQ; - SETDEC(l,0,0,0,0); SETDEC(out,0,0,-1,-1); MATH1(VarDecCmp); EXPECT_LT; - - SETDEC(l,0,0,0,0); SETDEC(out,0,DECIMAL_NEG,0,1); MATH1(VarDecCmp); EXPECT_GT; - SETDEC(l,0,0,0,0); SETDEC(out,0,DECIMAL_NEG,0,0); MATH1(VarDecCmp); EXPECT_EQ; - SETDEC(l,0,0,0,0); SETDEC(out,0,DECIMAL_NEG,-1,-1); MATH1(VarDecCmp); EXPECT_GT; - - SETDEC(l,0,DECIMAL_NEG,0,0); SETDEC(out,0,0,0,1); MATH1(VarDecCmp); EXPECT_LT; - SETDEC(l,0,DECIMAL_NEG,0,0); SETDEC(out,0,0,0,0); MATH1(VarDecCmp); EXPECT_EQ; - SETDEC(l,0,DECIMAL_NEG,0,0); SETDEC(out,0,0,-1,-1); MATH1(VarDecCmp); EXPECT_LT; - - SETDEC(l,0,DECIMAL_NEG,0,0); SETDEC(out,0,DECIMAL_NEG,0,1); MATH1(VarDecCmp); EXPECT_GT; - SETDEC(l,0,DECIMAL_NEG,0,0); SETDEC(out,0,DECIMAL_NEG,0,0); MATH1(VarDecCmp); EXPECT_EQ; - SETDEC(l,0,DECIMAL_NEG,0,0); SETDEC(out,0,DECIMAL_NEG,-1,-1); MATH1(VarDecCmp); EXPECT_GT; - - SETDEC(l,0,0,-1,-1); SETDEC(out,0,0,0,1); MATH1(VarDecCmp); EXPECT_GT; - SETDEC(l,0,0,-1,-1); SETDEC(out,0,0,0,0); MATH1(VarDecCmp); EXPECT_GT; - SETDEC(l,0,0,-1,-1); SETDEC(out,0,0,-1,-1); MATH1(VarDecCmp); EXPECT_EQ; - - SETDEC(l,0,0,-1,-1); SETDEC(out,0,DECIMAL_NEG,0,1); MATH1(VarDecCmp); EXPECT_GT; - SETDEC(l,0,0,-1,-1); SETDEC(out,0,DECIMAL_NEG,0,0); MATH1(VarDecCmp); EXPECT_GT; - SETDEC(l,0,0,-1,-1); SETDEC(out,0,DECIMAL_NEG,-1,-1); MATH1(VarDecCmp); EXPECT_GT; - - SETDEC(l,0,DECIMAL_NEG,-1,-1); SETDEC(out,0,0,0,1); MATH1(VarDecCmp); EXPECT_LT; - SETDEC(l,0,DECIMAL_NEG,-1,-1); SETDEC(out,0,0,0,0); MATH1(VarDecCmp); EXPECT_LT; - SETDEC(l,0,DECIMAL_NEG,-1,-1); SETDEC(out,0,0,-1,-1); MATH1(VarDecCmp); EXPECT_LT; - - SETDEC(l,0,DECIMAL_NEG,-1,-1); SETDEC(out,0,DECIMAL_NEG,0,1); MATH1(VarDecCmp); EXPECT_LT; - SETDEC(l,0,DECIMAL_NEG,-1,-1); SETDEC(out,0,DECIMAL_NEG,0,0); MATH1(VarDecCmp); EXPECT_LT; - SETDEC(l,0,DECIMAL_NEG,-1,-1); SETDEC(out,0,DECIMAL_NEG,-1,-1); MATH1(VarDecCmp); EXPECT_EQ; - - - SETDEC(out,0,0,0,1); SETDEC(l,0,0,0,1); MATH1(VarDecCmp); EXPECT_EQ; - SETDEC(out,0,0,0,1); SETDEC(l,0,0,0,0); MATH1(VarDecCmp); EXPECT_LT; - SETDEC(out,0,0,0,1); SETDEC(l,0,0,-1,-1); MATH1(VarDecCmp); EXPECT_GT; - - SETDEC(out,0,0,0,1); SETDEC(l,0,DECIMAL_NEG,0,1); MATH1(VarDecCmp); EXPECT_LT; - SETDEC(out,0,0,0,1); SETDEC(l,0,DECIMAL_NEG,0,0); MATH1(VarDecCmp); EXPECT_LT; - SETDEC(out,0,0,0,1); SETDEC(l,0,DECIMAL_NEG,-1,-1); MATH1(VarDecCmp); EXPECT_LT; - - SETDEC(out,0,DECIMAL_NEG,0,1); SETDEC(l,0,0,0,1); MATH1(VarDecCmp); EXPECT_GT; - SETDEC(out,0,DECIMAL_NEG,0,1); SETDEC(l,0,0,0,0); MATH1(VarDecCmp); EXPECT_GT; - SETDEC(out,0,DECIMAL_NEG,0,1); SETDEC(l,0,0,-1,-1); MATH1(VarDecCmp); EXPECT_GT; - - SETDEC(out,0,DECIMAL_NEG,0,1); SETDEC(l,0,DECIMAL_NEG,0,1); MATH1(VarDecCmp); EXPECT_EQ; - SETDEC(out,0,DECIMAL_NEG,0,1); SETDEC(l,0,DECIMAL_NEG,0,0); MATH1(VarDecCmp); EXPECT_GT; - SETDEC(out,0,DECIMAL_NEG,0,1); SETDEC(l,0,DECIMAL_NEG,-1,-1); MATH1(VarDecCmp); EXPECT_LT; - - SETDEC(out,0,0,0,0); SETDEC(l,0,0,0,1); MATH1(VarDecCmp); EXPECT_GT; - SETDEC(out,0,0,0,0); SETDEC(l,0,0,0,0); MATH1(VarDecCmp); EXPECT_EQ; - SETDEC(out,0,0,0,0); SETDEC(l,0,0,-1,-1); MATH1(VarDecCmp); EXPECT_GT; - - SETDEC(out,0,0,0,0); SETDEC(l,0,DECIMAL_NEG,0,1); MATH1(VarDecCmp); EXPECT_LT; - SETDEC(out,0,0,0,0); SETDEC(l,0,DECIMAL_NEG,0,0); MATH1(VarDecCmp); EXPECT_EQ; - SETDEC(out,0,0,0,0); SETDEC(l,0,DECIMAL_NEG,-1,-1); MATH1(VarDecCmp); EXPECT_LT; - - SETDEC(out,0,DECIMAL_NEG,0,0); SETDEC(l,0,0,0,1); MATH1(VarDecCmp); EXPECT_GT; - SETDEC(out,0,DECIMAL_NEG,0,0); SETDEC(l,0,0,0,0); MATH1(VarDecCmp); EXPECT_EQ; - SETDEC(out,0,DECIMAL_NEG,0,0); SETDEC(l,0,0,-1,-1); MATH1(VarDecCmp); EXPECT_GT; - - SETDEC(out,0,DECIMAL_NEG,0,0); SETDEC(l,0,DECIMAL_NEG,0,1); MATH1(VarDecCmp); EXPECT_LT; - SETDEC(out,0,DECIMAL_NEG,0,0); SETDEC(l,0,DECIMAL_NEG,0,0); MATH1(VarDecCmp); EXPECT_EQ; - SETDEC(out,0,DECIMAL_NEG,0,0); SETDEC(l,0,DECIMAL_NEG,-1,-1); MATH1(VarDecCmp); EXPECT_LT; - - SETDEC(out,0,0,-1,-1); SETDEC(l,0,0,0,1); MATH1(VarDecCmp); EXPECT_LT; - SETDEC(out,0,0,-1,-1); SETDEC(l,0,0,0,0); MATH1(VarDecCmp); EXPECT_LT; - SETDEC(out,0,0,-1,-1); SETDEC(l,0,0,-1,-1); MATH1(VarDecCmp); EXPECT_EQ; - - SETDEC(out,0,0,-1,-1); SETDEC(l,0,DECIMAL_NEG,0,1); MATH1(VarDecCmp); EXPECT_LT; - SETDEC(out,0,0,-1,-1); SETDEC(l,0,DECIMAL_NEG,0,0); MATH1(VarDecCmp); EXPECT_LT; - SETDEC(out,0,0,-1,-1); SETDEC(l,0,DECIMAL_NEG,-1,-1); MATH1(VarDecCmp); EXPECT_LT; - - SETDEC(out,0,DECIMAL_NEG,-1,-1); SETDEC(l,0,0,0,1); MATH1(VarDecCmp); EXPECT_GT; - SETDEC(out,0,DECIMAL_NEG,-1,-1); SETDEC(l,0,0,0,0); MATH1(VarDecCmp); EXPECT_GT; - SETDEC(out,0,DECIMAL_NEG,-1,-1); SETDEC(l,0,0,-1,-1); MATH1(VarDecCmp); EXPECT_GT; - - SETDEC(out,0,DECIMAL_NEG,-1,-1); SETDEC(l,0,DECIMAL_NEG,0,1); MATH1(VarDecCmp); EXPECT_GT; - SETDEC(out,0,DECIMAL_NEG,-1,-1); SETDEC(l,0,DECIMAL_NEG,0,0); MATH1(VarDecCmp); EXPECT_GT; - SETDEC(out,0,DECIMAL_NEG,-1,-1); SETDEC(l,0,DECIMAL_NEG,-1,-1); MATH1(VarDecCmp); EXPECT_EQ; - -} - -/* - * VT_BOOL - */ - -#undef CONV_TYPE -#define CONV_TYPE VARIANT_BOOL -#undef _EXPECTRES -#define _EXPECTRES(res, x, fs) \ - ok((hres == S_OK && out == (CONV_TYPE)(x)) || ((HRESULT)res != S_OK && hres == (HRESULT)res), \ - "expected " #x ", got " fs "; hres=0x%08x\n", out, hres) -#undef EXPECTRES -#define EXPECTRES(res, x) _EXPECTRES(res, x, "%d") -#undef CONVERTRANGE -#define CONVERTRANGE(func,start,end) for (i = start; i < end; i++) { \ - CONVERT(func, i); if (i) { EXPECT(VARIANT_TRUE); } else { EXPECT(VARIANT_FALSE); } } - -static void test_VarBoolFromI1(void) -{ - CONVVARS(signed char); - int i; - - CHECKPTR(VarBoolFromI1); - CONVERTRANGE(VarBoolFromI1, -128, 128); -} - -static void test_VarBoolFromUI1(void) -{ - CONVVARS(BYTE); - int i; - - CHECKPTR(VarBoolFromUI1); - CONVERTRANGE(VarBoolFromUI1, 0, 256); -} - -static void test_VarBoolFromI2(void) -{ - CONVVARS(SHORT); - int i; - - CHECKPTR(VarBoolFromI2); - CONVERTRANGE(VarBoolFromI2, -32768, 32768); -} - -static void test_VarBoolFromUI2(void) -{ - CONVVARS(USHORT); - int i; - - CHECKPTR(VarBoolFromUI2); - CONVERTRANGE(VarBoolFromUI2, 0, 65536); -} - -static void test_VarBoolFromI4(void) -{ - CONVVARS(int); - - CHECKPTR(VarBoolFromI4); - CONVERT(VarBoolFromI4, 0x80000000); EXPECT(VARIANT_TRUE); - CONVERT(VarBoolFromI4, -1); EXPECT(VARIANT_TRUE); - CONVERT(VarBoolFromI4, 0); EXPECT(VARIANT_FALSE); - CONVERT(VarBoolFromI4, 1); EXPECT(VARIANT_TRUE); - CONVERT(VarBoolFromI4, 0x7fffffff); EXPECT(VARIANT_TRUE); -} - -static void test_VarBoolFromUI4(void) -{ - CONVVARS(ULONG); - - CHECKPTR(VarBoolFromUI4); - CONVERT(VarBoolFromI4, 0); EXPECT(VARIANT_FALSE); - CONVERT(VarBoolFromI4, 1); EXPECT(VARIANT_TRUE); - CONVERT(VarBoolFromI4, 0x80000000); EXPECT(VARIANT_TRUE); -} - -static void test_VarBoolFromR4(void) -{ - CONVVARS(FLOAT); - - CHECKPTR(VarBoolFromR4); - CONVERT(VarBoolFromR4, -1.0f); EXPECT(VARIANT_TRUE); - CONVERT(VarBoolFromR4, 0.0f); EXPECT(VARIANT_FALSE); - CONVERT(VarBoolFromR4, 1.0f); EXPECT(VARIANT_TRUE); - CONVERT(VarBoolFromR4, 1.5f); EXPECT(VARIANT_TRUE); - - /* Rounding */ - CONVERT(VarBoolFromR4, -1.5f); EXPECT(VARIANT_TRUE); - CONVERT(VarBoolFromR4, -0.6f); EXPECT(VARIANT_TRUE); - CONVERT(VarBoolFromR4, -0.5f); EXPECT(VARIANT_TRUE); - CONVERT(VarBoolFromR4, -0.4f); EXPECT(VARIANT_TRUE); - CONVERT(VarBoolFromR4, 0.4f); EXPECT(VARIANT_TRUE); - CONVERT(VarBoolFromR4, 0.5f); EXPECT(VARIANT_TRUE); - CONVERT(VarBoolFromR4, 0.6f); EXPECT(VARIANT_TRUE); - CONVERT(VarBoolFromR4, 1.5f); EXPECT(VARIANT_TRUE); -} - -static void test_VarBoolFromR8(void) -{ - CONVVARS(DOUBLE); - - /* Hopefully we made the point with R4 above that rounding is - * irrelevant, so we'll skip that for R8 and Date - */ - CHECKPTR(VarBoolFromR8); - CONVERT(VarBoolFromR8, -1.0); EXPECT(VARIANT_TRUE); - CONVERT(VarBoolFromR8, -0.0); EXPECT(VARIANT_FALSE); - CONVERT(VarBoolFromR8, 1.0); EXPECT(VARIANT_TRUE); -} - -static void test_VarBoolFromCy(void) -{ - CONVVARS(CY); - - CHECKPTR(VarBoolFromCy); - CONVERT_CY(VarBoolFromCy, -32769); EXPECT(VARIANT_TRUE); - CONVERT_CY(VarBoolFromCy, -32768); EXPECT(VARIANT_TRUE); - CONVERT_CY(VarBoolFromCy, -1); EXPECT(VARIANT_TRUE); - CONVERT_CY(VarBoolFromCy, 0); EXPECT(VARIANT_FALSE); - CONVERT_CY(VarBoolFromCy, 1); EXPECT(VARIANT_TRUE); - CONVERT_CY(VarBoolFromCy, 32767); EXPECT(VARIANT_TRUE); - CONVERT_CY(VarBoolFromCy, 32768); EXPECT(VARIANT_TRUE); -} - -static void test_VarBoolFromI8(void) -{ - CONVVARS(LONG64); - - CHECKPTR(VarBoolFromI8); - CONVERT(VarBoolFromI8, -1); EXPECT(VARIANT_TRUE); - CONVERT(VarBoolFromI8, 0); EXPECT(VARIANT_FALSE); - CONVERT(VarBoolFromI8, 1); EXPECT(VARIANT_TRUE); -} - -static void test_VarBoolFromUI8(void) -{ - CONVVARS(ULONG64); - - CHECKPTR(VarBoolFromUI8); - CONVERT(VarBoolFromUI8, 0); EXPECT(VARIANT_FALSE); - CONVERT(VarBoolFromUI8, 1); EXPECT(VARIANT_TRUE); -} - -static void test_VarBoolFromDec(void) -{ - CONVVARS(DECIMAL); - - CHECKPTR(VarBoolFromDec); - CONVERT_BADDEC(VarBoolFromDec); - - if (HAVE_OLEAUT32_DECIMAL) - { - /* Early versions of oleaut32 don't catch these errors */ - CONVERT_DEC(VarBoolFromDec,29,0,0,0); EXPECT_INVALID; - CONVERT_DEC(VarBoolFromDec,0,0x1,0,0); EXPECT_INVALID; - CONVERT_DEC(VarBoolFromDec,0,0x40,0,0); EXPECT_INVALID; - CONVERT_DEC(VarBoolFromDec,0,0x7f,0,0); EXPECT_INVALID; - } - - CONVERT_DEC(VarBoolFromDec,0,0x80,0,1); EXPECT(VARIANT_TRUE); - CONVERT_DEC(VarBoolFromDec,0,0,0,0); EXPECT(VARIANT_FALSE); - CONVERT_DEC(VarBoolFromDec,0,0,0,1); EXPECT(VARIANT_TRUE); - CONVERT_DEC(VarBoolFromDec,0,0,1,0); EXPECT(VARIANT_TRUE); - - CONVERT_DEC(VarBoolFromDec,2,0,0,CY_MULTIPLIER); EXPECT(VARIANT_TRUE); - CONVERT_DEC(VarBoolFromDec,2,0x80,0,CY_MULTIPLIER); EXPECT(VARIANT_TRUE); -} - -static void test_VarBoolFromDate(void) -{ - CONVVARS(DATE); - - CHECKPTR(VarBoolFromDate); - CONVERT(VarBoolFromDate, -1.0); EXPECT(VARIANT_TRUE); - CONVERT(VarBoolFromDate, -0.0); EXPECT(VARIANT_FALSE); - CONVERT(VarBoolFromDate, 1.0); EXPECT(VARIANT_TRUE); -} - -static void test_VarBoolFromStr(void) -{ - CONVVARS(LCID); - OLECHAR buff[128]; - - CHECKPTR(VarBoolFromStr); - - in = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); - - CONVERT_STR(VarBoolFromStr,NULL,0); - if (hres != E_INVALIDARG) - EXPECT_MISMATCH; - - /* #FALSE# and #TRUE# Are always accepted */ - CONVERT_STR(VarBoolFromStr,"#FALSE#",0); EXPECT(VARIANT_FALSE); - CONVERT_STR(VarBoolFromStr,"#TRUE#",0); EXPECT(VARIANT_TRUE); - - /* Match of #FALSE# and #TRUE# is case sensitive */ - CONVERT_STR(VarBoolFromStr,"#False#",0); EXPECT_MISMATCH; - /* But match against English is not */ - CONVERT_STR(VarBoolFromStr,"false",0); EXPECT(VARIANT_FALSE); - CONVERT_STR(VarBoolFromStr,"False",0); EXPECT(VARIANT_FALSE); - /* On/Off and yes/no are not acceptable inputs, with any flags set */ - CONVERT_STR(VarBoolFromStr,"On",0xffffffff); EXPECT_MISMATCH; - CONVERT_STR(VarBoolFromStr,"Yes",0xffffffff); EXPECT_MISMATCH; - - /* Change the LCID. This doesn't make any difference for text,unless we ask - * to check local boolean text with the VARIANT_LOCALBOOL flag. */ - in = MAKELCID(MAKELANGID(LANG_FRENCH, SUBLANG_DEFAULT), SORT_DEFAULT); - - /* #FALSE# and #TRUE# are accepted in all locales */ - CONVERT_STR(VarBoolFromStr,"#FALSE#",0); EXPECT(VARIANT_FALSE); - CONVERT_STR(VarBoolFromStr,"#TRUE#",0); EXPECT(VARIANT_TRUE); - CONVERT_STR(VarBoolFromStr,"#FALSE#",VARIANT_LOCALBOOL); EXPECT(VARIANT_FALSE); - CONVERT_STR(VarBoolFromStr,"#TRUE#",VARIANT_LOCALBOOL); EXPECT(VARIANT_TRUE); - - /* English is accepted regardless of the locale */ - CONVERT_STR(VarBoolFromStr,"false",0); EXPECT(VARIANT_FALSE); - /* And is still not case sensitive */ - CONVERT_STR(VarBoolFromStr,"False",0); EXPECT(VARIANT_FALSE); - - if (HAVE_OLEAUT32_LOCALES) - { - /* French is rejected without VARIANT_LOCALBOOL */ - CONVERT_STR(VarBoolFromStr,"faux",0); EXPECT_MISMATCH; - /* But accepted if this flag is given */ - CONVERT_STR(VarBoolFromStr,"faux",VARIANT_LOCALBOOL); EXPECT(VARIANT_FALSE); - /* Regardless of case - from this we assume locale text comparisons ignore case */ - CONVERT_STR(VarBoolFromStr,"Faux",VARIANT_LOCALBOOL); EXPECT(VARIANT_FALSE); - - /* Changing the locale prevents the localised text from being compared - - * this demonstrates that only the indicated LCID and English are searched */ - in = MAKELCID(MAKELANGID(LANG_POLISH, SUBLANG_DEFAULT), SORT_DEFAULT); - CONVERT_STR(VarBoolFromStr,"faux",VARIANT_LOCALBOOL); EXPECT_MISMATCH; - } - - /* Numeric strings are read as 0 or non-0 */ - CONVERT_STR(VarBoolFromStr,"0",0); EXPECT(VARIANT_FALSE); - CONVERT_STR(VarBoolFromStr,"-1",0); EXPECT(VARIANT_TRUE); - CONVERT_STR(VarBoolFromStr,"+1",0); EXPECT(VARIANT_TRUE); - - if (HAVE_OLEAUT32_LOCALES) - { - /* Numeric strings are read as floating point numbers. The line below fails - * because '.' is not a valid decimal separator for Polish numbers */ - CONVERT_STR(VarBoolFromStr,"0.1",LOCALE_NOUSEROVERRIDE); EXPECT_MISMATCH; - } - - /* Changing the lcid back to US English reads the r8 correctly */ - in = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); - CONVERT_STR(VarBoolFromStr,"0.1",LOCALE_NOUSEROVERRIDE); EXPECT(VARIANT_TRUE); -} - -static void test_VarBoolCopy(void) -{ - COPYTEST(1, VT_BOOL, V_BOOL(&vSrc), V_BOOL(&vDst), V_BOOLREF(&vSrc), V_BOOLREF(&vDst), "%d"); -} - -#define BOOL_STR(flags, str) hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, flags, VT_BSTR); \ - ok(hres == S_OK && V_VT(&vDst) == VT_BSTR && \ - V_BSTR(&vDst) && !memcmp(V_BSTR(&vDst), str, sizeof(str)), \ - "hres=0x%X, type=%d (should be VT_BSTR), *bstr='%c'\n", \ - hres, V_VT(&vDst), V_BSTR(&vDst) ? *V_BSTR(&vDst) : '?'); \ - VariantClear(&vDst) - -static void test_VarBoolChangeTypeEx(void) -{ - static const WCHAR szTrue[] = { 'T','r','u','e','\0' }; - static const WCHAR szFalse[] = { 'F','a','l','s','e','\0' }; - static const WCHAR szFaux[] = { 'F','a','u','x','\0' }; - CONVVARS(CONV_TYPE); - VARIANTARG vSrc, vDst; - LCID lcid; - - in = 1; - - INITIAL_TYPETEST(VT_BOOL, V_BOOL, "%d"); - COMMON_TYPETEST; - - /* The common tests convert to a number. Try the different flags */ - lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); - - V_VT(&vSrc) = VT_BOOL; - V_BOOL(&vSrc) = 1; - - if (!IS_ANCIENT) - { - BOOL_STR(VARIANT_ALPHABOOL, szTrue); - V_BOOL(&vSrc) = 0; - BOOL_STR(VARIANT_ALPHABOOL, szFalse); - } - - if (HAVE_OLEAUT32_LOCALES) - { - lcid = MAKELCID(MAKELANGID(LANG_FRENCH, SUBLANG_DEFAULT), SORT_DEFAULT); - - /* VARIANT_ALPHABOOL is always English */ - BOOL_STR(VARIANT_ALPHABOOL, szFalse); - /* VARIANT_LOCALBOOL uses the localised text */ - BOOL_STR(VARIANT_LOCALBOOL, szFaux); - /* Both flags together acts as VARIANT_LOCALBOOL */ - BOOL_STR(VARIANT_ALPHABOOL|VARIANT_LOCALBOOL, szFaux); - } -} - -/* - * BSTR - */ - -static void test_VarBstrFromR4(void) -{ - static const WCHAR szNative[] = { '6','5','4','3','2','2','.','3','\0' }; - static const WCHAR szZero[] = {'0', '\0'}; - static const WCHAR szOneHalf_English[] = { '0','.','5','\0' }; /* uses period */ - static const WCHAR szOneHalf_Spanish[] = { '0',',','5','\0' }; /* uses comma */ - LCID lcid; - LCID lcid_spanish; - HRESULT hres; - BSTR bstr = NULL; - - float f; - - CHECKPTR(VarBstrFromR4); - - lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); - lcid_spanish = MAKELCID(MAKELANGID(LANG_SPANISH, SUBLANG_SPANISH), SORT_DEFAULT); - f = 654322.23456f; - hres = pVarBstrFromR4(f, lcid, 0, &bstr); - ok(hres == S_OK, "got hres 0x%08x\n", hres); - if (bstr) - { - todo_wine { - /* MSDN states that rounding of R4/R8 is dependent on the underlying - * bit pattern of the number and so is architecture dependent. In this - * case Wine returns .2 (which is more correct) and Native returns .3 - */ - ok(memcmp(bstr, szNative, sizeof(szNative)) == 0, "string different\n"); - } - SysFreeString(bstr); - } - - f = -0.0; - hres = pVarBstrFromR4(f, lcid, 0, &bstr); - ok(hres == S_OK, "got hres 0x%08x\n", hres); - if (bstr) - { - if (bstr[0] == '-') - ok(memcmp(bstr + 1, szZero, sizeof(szZero)) == 0, "negative zero (got %s)\n", wtoascii(bstr)); - else - ok(memcmp(bstr, szZero, sizeof(szZero)) == 0, "negative zero (got %s)\n", wtoascii(bstr)); - SysFreeString(bstr); - } - - /* The following tests that lcid is used for decimal separator even without LOCALE_USE_NLS */ - f = 0.5; - hres = pVarBstrFromR4(f, lcid, LOCALE_NOUSEROVERRIDE, &bstr); - ok(hres == S_OK, "got hres 0x%08x\n", hres); - if (bstr) - { - ok(memcmp(bstr, szOneHalf_English, sizeof(szOneHalf_English)) == 0, "English locale failed (got %s)\n", wtoascii(bstr)); - SysFreeString(bstr); - } - f = 0.5; - hres = pVarBstrFromR4(f, lcid_spanish, LOCALE_NOUSEROVERRIDE, &bstr); - ok(hres == S_OK, "got hres 0x%08x\n", hres); - if (bstr) - { - ok(memcmp(bstr, szOneHalf_Spanish, sizeof(szOneHalf_Spanish)) == 0, "Spanish locale failed (got %s)\n", wtoascii(bstr)); - SysFreeString(bstr); - } -} - -#define BSTR_DATE(dt,str) \ - bstr = NULL; \ - hres = pVarBstrFromDate(dt,lcid,LOCALE_NOUSEROVERRIDE,&bstr); \ - if (bstr) {WideCharToMultiByte(CP_ACP, 0, bstr, -1, buff, sizeof(buff), 0, 0); SysFreeString(bstr);} \ - else buff[0] = 0; \ - ok(hres == S_OK && !strcmp(str,buff), "Expected '%s', got '%s', hres = 0x%08x\n", \ - str, buff, hres) - -static void test_VarBstrFromDate(void) -{ - char buff[256]; - LCID lcid; - HRESULT hres; - BSTR bstr; - - CHECKPTR(VarBstrFromDate); - lcid = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT); - - BSTR_DATE(0.0, "12:00:00 AM"); - BSTR_DATE(3.34, "1/2/1900 8:09:36 AM"); - BSTR_DATE(3339.34, "2/20/1909 8:09:36 AM"); - BSTR_DATE(365.00, "12/30/1900"); - BSTR_DATE(365.25, "12/30/1900 6:00:00 AM"); - BSTR_DATE(1461.0, "12/31/1903"); - BSTR_DATE(1461.5, "12/31/1903 12:00:00 PM"); - todo_wine { BSTR_DATE(-657434.0, "1/1/100"); } - BSTR_DATE(2958465.0, "12/31/9999"); -} - -#define BSTR_CY(l, a, b, e) \ - S(l).Lo = b; S(l).Hi = a; \ - hres = pVarBstrFromCy(l, lcid, LOCALE_NOUSEROVERRIDE, &bstr);\ - ok(hres == S_OK, "got hres 0x%08x\n", hres);\ - if (hres== S_OK && bstr)\ - {\ - ok(lstrcmpW(bstr, e) == 0, "invalid number (got %s)\n", wtoascii(bstr));\ - SysFreeString(bstr);\ - } - -static void test_VarBstrFromCy(void) -{ - LCID lcid; - HRESULT hres; - BSTR bstr = NULL; - CY l; - - static const WCHAR szZero[] = {'0', '\0'}; - static const WCHAR szOne[] = {'1', '\0'}; - static const WCHAR szOnePointFive[] = {'1','.','5','\0'}; - static const WCHAR szMinusOnePointFive[] = {'-','1','.','5','\0'}; - static const WCHAR szBigNum1[] = {'4','2','9','4','9','6','.','7','2','9','5','\0'}; /* (1 << 32) - 1 / 1000 */ - static const WCHAR szBigNum2[] = {'4','2','9','4','9','6','.','7','2','9','6','\0'}; /* (1 << 32) / 1000 */ - static const WCHAR szBigNum3[] = {'9','2','2','3','3','7','2','0','3','6','8','5','4','7','7','.','5','8','0','7','\0'}; /* ((1 << 63) - 1)/10000 */ - - static const WCHAR szSmallNumber_English[] = {'0','.','0','0','0','9','\0'}; - static const WCHAR szSmallNumber_Spanish[] = {'0',',','0','0','0','9','\0'}; - - CHECKPTR(VarBstrFromCy); - lcid = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT); - - /* check zero */ - BSTR_CY(l, 0,0, szZero); - - /* check one */ - BSTR_CY(l, 0, 10000, szOne); - - /* check one point five */ - BSTR_CY(l, 0, 15000, szOnePointFive); - - /* check minus one point five */ - BSTR_CY(l, 0xffffffff, ((15000)^0xffffffff)+1, szMinusOnePointFive); - - /* check bignum (1) */ - BSTR_CY(l, 0, 0xffffffff, szBigNum1); - - /* check bignum (2) */ - BSTR_CY(l, 1,0, szBigNum2); - - /* check bignum (3) */ - BSTR_CY(l, 0x7fffffff,0xffffffff, szBigNum3); - - /* check leading zeros and decimal sep. for English locale */ - BSTR_CY(l, 0,9, szSmallNumber_English); - - lcid = MAKELCID(MAKELANGID(LANG_SPANISH, SUBLANG_DEFAULT), SORT_DEFAULT); - - /* check leading zeros and decimal sep. for Spanish locale */ - BSTR_CY(l, 0,9, szSmallNumber_Spanish); -} - -#undef BSTR_CY - -#define BSTR_DEC(l, a, b, c, d, e) \ - SETDEC(l, a,b,c,d);\ - hres = pVarBstrFromDec(&l, lcid, LOCALE_NOUSEROVERRIDE, &bstr);\ - ok(hres == S_OK, "got hres 0x%08x\n", hres);\ - if (hres== S_OK && bstr)\ - {\ - ok(lstrcmpW(bstr, e) == 0, "invalid number (got %s)\n", wtoascii(bstr));\ - SysFreeString(bstr);\ - } - -#define BSTR_DEC64(l, a, b, c, x, d, e) \ - SETDEC64(l, a,b,c,x,d);\ - hres = pVarBstrFromDec(&l, lcid, LOCALE_NOUSEROVERRIDE, &bstr);\ - ok(hres == S_OK, "got hres 0x%08x\n", hres);\ - if (hres== S_OK && bstr)\ - {\ - ok(lstrcmpW(bstr, e) == 0, "invalid number (got %s)\n", wtoascii(bstr));\ - SysFreeString(bstr);\ - } - -static void test_VarBstrFromDec(void) -{ - LCID lcid; - HRESULT hres; - BSTR bstr = NULL; - DECIMAL l; - - static const WCHAR szZero[] = {'0', '\0'}; - static const WCHAR szOne[] = {'1', '\0'}; - static const WCHAR szOnePointFive[] = {'1','.','5','\0'}; - static const WCHAR szMinusOnePointFive[] = {'-','1','.','5','\0'}; - static const WCHAR szBigNum1[] = {'4','2','9','4','9','6','7','2','9','5','\0'}; /* (1 << 32) - 1 */ - static const WCHAR szBigNum2[] = {'4','2','9','4','9','6','7','2','9','6','\0'}; /* (1 << 32) */ - static const WCHAR szBigNum3[] = {'1','8','4','4','6','7','4','4','0','7','3','7','0','9','5','5','1','6','1','5','\0'}; /* (1 << 64) - 1 */ - static const WCHAR szBigNum4[] = {'1','8','4','4','6','7','4','4','0','7','3','7','0','9','5','5','1','6','1','6','\0'}; /* (1 << 64) */ - static const WCHAR szBigNum5[] = {'7','9','2','2','8','1','6','2','5','1','4','2','6','4','3','3','7','5','9','3','5','4','3','9','5','0','3','3','5','\0'}; /* (1 << 96) - 1 */ - static const WCHAR szBigScale1[] = {'0','.','0','0','0','0','0','0','0','0','0','1','\0'}; /* 1 * 10^-10 */ - static const WCHAR szBigScale2[] = {'7','9','2','2','8','1','6','2','5','1','4','2','6','4','3','3','7','5','9','.','3','5','4','3','9','5','0','3','3','5','\0'}; /* ((1 << 96) - 1) * 10^-10 */ - static const WCHAR szBigScale3[] = {'7','.','9','2','2','8','1','6','2','5','1','4','2','6','4','3','3','7','5','9','3','5','4','3','9','5','0','3','3','5','\0'}; /* ((1 << 96) - 1) * 10^-28 */ - - static const WCHAR szSmallNumber_English[] = {'0','.','0','0','0','9','\0'}; - static const WCHAR szSmallNumber_Spanish[] = {'0',',','0','0','0','9','\0'}; - - CHECKPTR(VarBstrFromDec); - lcid = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT); - - /* check zero */ - BSTR_DEC(l, 0,0,0,0, szZero); - - /* check one */ - BSTR_DEC(l, 0,0,0,1, szOne); - BSTR_DEC(l, 1,0,0,10,szOne); - BSTR_DEC(l, 2,0,0,100,szOne); - BSTR_DEC(l, 3,0,0,1000,szOne); - - /* check one point five */ - BSTR_DEC(l, 1,0,0,15, szOnePointFive); - BSTR_DEC(l, 2,0,0,150, szOnePointFive); - BSTR_DEC(l, 3,0,0,1500, szOnePointFive); - - /* check minus one point five */ - BSTR_DEC(l, 1,0x80,0,15, szMinusOnePointFive); - - /* check bignum (1) */ - BSTR_DEC(l, 0,0,0,0xffffffff, szBigNum1); - - /* check bignum (2) */ - BSTR_DEC64(l, 0,0,0,1,0, szBigNum2); - - /* check bignum (3) */ - BSTR_DEC64(l, 0,0,0,0xffffffff,0xffffffff, szBigNum3); - - /* check bignum (4) */ - BSTR_DEC(l, 0,0,1,0, szBigNum4); - - /* check bignum (5) */ - BSTR_DEC64(l, 0,0,0xffffffff,0xffffffff,0xffffffff, szBigNum5); - - /* check bigscale (1) */ - BSTR_DEC(l, 10,0,0,1, szBigScale1); - - /* check bigscale (2) */ - BSTR_DEC64(l, 10,0,0xffffffffUL,0xffffffff,0xffffffff, szBigScale2); - - /* check bigscale (3) */ - BSTR_DEC64(l, 28,0,0xffffffffUL,0xffffffff,0xffffffff, szBigScale3); - - /* check leading zeros and decimal sep. for English locale */ - BSTR_DEC(l, 4,0,0,9, szSmallNumber_English); - BSTR_DEC(l, 5,0,0,90, szSmallNumber_English); - BSTR_DEC(l, 6,0,0,900, szSmallNumber_English); - BSTR_DEC(l, 7,0,0,9000, szSmallNumber_English); - - lcid = MAKELCID(MAKELANGID(LANG_SPANISH, SUBLANG_DEFAULT), SORT_DEFAULT); - - /* check leading zeros and decimal sep. for Spanish locale */ - BSTR_DEC(l, 4,0,0,9, szSmallNumber_Spanish); - BSTR_DEC(l, 5,0,0,90, szSmallNumber_Spanish); - BSTR_DEC(l, 6,0,0,900, szSmallNumber_Spanish); - BSTR_DEC(l, 7,0,0,9000, szSmallNumber_Spanish); -} -#undef BSTR_DEC -#undef BSTR_DEC64 - -#define _VARBSTRCMP(left,right,lcid,flags,result) \ - hres = pVarBstrCmp(left,right,lcid,flags); \ - ok(hres == result, "VarBstrCmp: expected " #result ", got hres=0x%x\n", hres) -#define VARBSTRCMP(left,right,flags,result) \ - _VARBSTRCMP(left,right,lcid,flags,result) - -static void test_VarBstrCmp(void) -{ - LCID lcid; - HRESULT hres; - static const WCHAR sz[] = {'W','u','r','s','c','h','t','\0'}; - static const WCHAR szempty[] = {'\0'}; - static const WCHAR sz1[] = { 'a',0 }; - static const WCHAR sz2[] = { 'A',0 }; - static const WCHAR s1[] = { 'a',0 }; - static const WCHAR s2[] = { 'a',0,'b' }; - static const char sb1[] = {1,0,1}; - static const char sb2[] = {1,0,2}; - static const char sbchr0[] = {0,0}; - static const char sbchr00[] = {0,0,0}; - BSTR bstr, bstrempty, bstr2; - - CHECKPTR(VarBstrCmp); - - lcid = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT); - bstr = SysAllocString(sz); - bstrempty = SysAllocString(szempty); - - /* NULL handling. Yepp, MSDN is totally wrong here */ - VARBSTRCMP(NULL,NULL,0,VARCMP_EQ); - VARBSTRCMP(bstr,NULL,0,VARCMP_GT); - VARBSTRCMP(NULL,bstr,0,VARCMP_LT); - - /* NULL and empty string comparisons */ - VARBSTRCMP(bstrempty,NULL,0,VARCMP_EQ); - VARBSTRCMP(NULL,bstrempty,0,VARCMP_EQ); - - SysFreeString(bstr); - bstr = SysAllocString(sz1); - - bstr2 = SysAllocString(sz2); - VARBSTRCMP(bstr,bstr2,0,VARCMP_LT); - VARBSTRCMP(bstr,bstr2,NORM_IGNORECASE,VARCMP_EQ); - SysFreeString(bstr2); - /* These two strings are considered equal even though one is - * NULL-terminated and the other not. - */ - bstr2 = SysAllocStringLen(s1, sizeof(s1) / sizeof(WCHAR)); - VARBSTRCMP(bstr,bstr2,0,VARCMP_EQ); - SysFreeString(bstr2); - - /* These two strings are not equal */ - bstr2 = SysAllocStringLen(s2, sizeof(s2) / sizeof(WCHAR)); - VARBSTRCMP(bstr,bstr2,0,VARCMP_LT); - SysFreeString(bstr2); - - SysFreeString(bstr); - - bstr = SysAllocStringByteLen(sbchr0, sizeof(sbchr0)); - bstr2 = SysAllocStringByteLen(sbchr0, sizeof(sbchr00)); - VARBSTRCMP(bstr,bstrempty,0,VARCMP_GT); - VARBSTRCMP(bstrempty,bstr,0,VARCMP_LT); - VARBSTRCMP(bstr2,bstrempty,0,VARCMP_GT); - VARBSTRCMP(bstr2,bstr,0,VARCMP_EQ); - SysFreeString(bstr2); - SysFreeString(bstr); - - /* When (LCID == 0) it should be a binary comparison - * so these two strings could not match. - */ - bstr = SysAllocStringByteLen(sb1, sizeof(sb1)); - bstr2 = SysAllocStringByteLen(sb2, sizeof(sb2)); - lcid = 0; - VARBSTRCMP(bstr,bstr2,0,VARCMP_LT); - SysFreeString(bstr2); - SysFreeString(bstr); - - bstr = SysAllocStringByteLen(sbchr0, sizeof(sbchr0)); - bstr2 = SysAllocStringByteLen(sbchr0, sizeof(sbchr00)); - VARBSTRCMP(bstr,bstrempty,0,VARCMP_GT); - VARBSTRCMP(bstrempty,bstr,0,VARCMP_LT); - VARBSTRCMP(bstr2,bstrempty,0,VARCMP_GT); - VARBSTRCMP(bstr2,bstr,0,VARCMP_GT); - SysFreeString(bstr2); - SysFreeString(bstr); - SysFreeString(bstrempty); -} - -/* Get the internal representation of a BSTR */ -static inline LPINTERNAL_BSTR Get(const BSTR lpszString) -{ - return lpszString ? (LPINTERNAL_BSTR)((char*)lpszString - sizeof(DWORD)) : NULL; -} - -static inline BSTR GetBSTR(const LPINTERNAL_BSTR bstr) -{ - return (BSTR)bstr->szString; -} - -static void test_SysStringLen(void) -{ - INTERNAL_BSTR bstr; - BSTR str = GetBSTR(&bstr); - - bstr.dwLen = 0; - ok (SysStringLen(str) == 0, "Expected dwLen 0, got %d\n", SysStringLen(str)); - bstr.dwLen = 2; - ok (SysStringLen(str) == 1, "Expected dwLen 1, got %d\n", SysStringLen(str)); -} - -static void test_SysStringByteLen(void) -{ - INTERNAL_BSTR bstr; - BSTR str = GetBSTR(&bstr); - - bstr.dwLen = 0; - ok (SysStringByteLen(str) == 0, "Expected dwLen 0, got %d\n", SysStringByteLen(str)); - bstr.dwLen = 2; - ok (SysStringByteLen(str) == 2, "Expected dwLen 2, got %d\n", SysStringByteLen(str)); -} - -static void test_SysAllocString(void) -{ - const OLECHAR szTest[5] = { 'T','e','s','t','\0' }; - BSTR str; - - str = SysAllocString(NULL); - ok (str == NULL, "Expected NULL, got %p\n", str); - - str = SysAllocString(szTest); - ok (str != NULL, "Expected non-NULL\n"); - if (str) - { - LPINTERNAL_BSTR bstr = Get(str); - - ok (bstr->dwLen == 8, "Expected 8, got %d\n", bstr->dwLen); - ok (!lstrcmpW(bstr->szString, szTest), "String different\n"); - SysFreeString(str); - } -} - -static void test_SysAllocStringLen(void) -{ - const OLECHAR szTest[5] = { 'T','e','s','t','\0' }; - BSTR str; - - /* Very early native dlls do not limit the size of strings, so skip this test */ - if (0) - { - str = SysAllocStringLen(szTest, 0x80000000); - ok (str == NULL, "Expected NULL, got %p\n", str); - } - - str = SysAllocStringLen(NULL, 0); - ok (str != NULL, "Expected non-NULL\n"); - if (str) - { - LPINTERNAL_BSTR bstr = Get(str); - - ok (bstr->dwLen == 0, "Expected 0, got %d\n", bstr->dwLen); - ok (!bstr->szString[0], "String not empty\n"); - SysFreeString(str); - } - - str = SysAllocStringLen(szTest, 4); - ok (str != NULL, "Expected non-NULL\n"); - if (str) - { - LPINTERNAL_BSTR bstr = Get(str); - - ok (bstr->dwLen == 8, "Expected 8, got %d\n", bstr->dwLen); - ok (!lstrcmpW(bstr->szString, szTest), "String different\n"); - SysFreeString(str); - } -} - -static void test_SysAllocStringByteLen(void) -{ - const OLECHAR szTest[10] = { 'T','e','s','t','\0' }; - const CHAR szTestA[6] = { 'T','e','s','t','\0','?' }; - BSTR str; - - if (sizeof(void *) == 4) /* not limited to 0x80000000 on Win64 */ - { - str = SysAllocStringByteLen(szTestA, 0x80000000); - ok (str == NULL, "Expected NULL, got %p\n", str); - } - - str = SysAllocStringByteLen(szTestA, 0xffffffff); - ok (str == NULL, "Expected NULL, got %p\n", str); - - str = SysAllocStringByteLen(NULL, 0); - ok (str != NULL, "Expected non-NULL\n"); - if (str) - { - LPINTERNAL_BSTR bstr = Get(str); - - ok (bstr->dwLen == 0, "Expected 0, got %d\n", bstr->dwLen); - ok (!bstr->szString[0], "String not empty\n"); - SysFreeString(str); - } - - str = SysAllocStringByteLen(szTestA, 4); - ok (str != NULL, "Expected non-NULL\n"); - if (str) - { - LPINTERNAL_BSTR bstr = Get(str); - - ok (bstr->dwLen == 4, "Expected 4, got %d\n", bstr->dwLen); - ok (!lstrcmpA((LPCSTR)bstr->szString, szTestA), "String different\n"); - SysFreeString(str); - } - - /* Odd lengths are allocated rounded up, but truncated at the right position */ - str = SysAllocStringByteLen(szTestA, 3); - ok (str != NULL, "Expected non-NULL\n"); - if (str) - { - const CHAR szTestTruncA[4] = { 'T','e','s','\0' }; - LPINTERNAL_BSTR bstr = Get(str); - - ok (bstr->dwLen == 3, "Expected 3, got %d\n", bstr->dwLen); - ok (!lstrcmpA((LPCSTR)bstr->szString, szTestTruncA), "String different\n"); - SysFreeString(str); - } - - str = SysAllocStringByteLen((LPCSTR)szTest, 8); - ok (str != NULL, "Expected non-NULL\n"); - if (str) - { - LPINTERNAL_BSTR bstr = Get(str); - - ok (bstr->dwLen == 8, "Expected 8, got %d\n", bstr->dwLen); - ok (!lstrcmpW(bstr->szString, szTest), "String different\n"); - SysFreeString(str); - } -} - -static void test_SysReAllocString(void) -{ - const OLECHAR szTest[5] = { 'T','e','s','t','\0' }; - const OLECHAR szSmaller[2] = { 'x','\0' }; - const OLECHAR szLarger[7] = { 'L','a','r','g','e','r','\0' }; - BSTR str; - - str = SysAllocStringLen(szTest, 4); - ok (str != NULL, "Expected non-NULL\n"); - if (str) - { - LPINTERNAL_BSTR bstr; - int changed; - - bstr = Get(str); - ok (bstr->dwLen == 8, "Expected 8, got %d\n", bstr->dwLen); - ok (!lstrcmpW(bstr->szString, szTest), "String different\n"); - - changed = SysReAllocString(&str, szSmaller); - ok (changed == 1, "Expected 1, got %d\n", changed); - /* Vista creates a new string, but older versions reuse the existing string. */ - /*ok (str == oldstr, "Created new string\n");*/ - bstr = Get(str); - ok (bstr->dwLen == 2, "Expected 2, got %d\n", bstr->dwLen); - ok (!lstrcmpW(bstr->szString, szSmaller), "String different\n"); - - changed = SysReAllocString(&str, szLarger); - ok (changed == 1, "Expected 1, got %d\n", changed); - /* Early versions always make new strings rather than resizing */ - /* ok (str == oldstr, "Created new string\n"); */ - bstr = Get(str); - ok (bstr->dwLen == 12, "Expected 12, got %d\n", bstr->dwLen); - ok (!lstrcmpW(bstr->szString, szLarger), "String different\n"); - - SysFreeString(str); - } -} - -static void test_SysReAllocStringLen(void) -{ - const OLECHAR szTest[5] = { 'T','e','s','t','\0' }; - const OLECHAR szSmaller[2] = { 'x','\0' }; - const OLECHAR szLarger[7] = { 'L','a','r','g','e','r','\0' }; - BSTR str; - - str = SysAllocStringLen(szTest, 4); - ok (str != NULL, "Expected non-NULL\n"); - if (str) - { - LPINTERNAL_BSTR bstr; - int changed; - - bstr = Get(str); - ok (bstr->dwLen == 8, "Expected 8, got %d\n", bstr->dwLen); - ok (!lstrcmpW(bstr->szString, szTest), "String different\n"); - - changed = SysReAllocStringLen(&str, szSmaller, 1); - ok (changed == 1, "Expected 1, got %d\n", changed); - /* Vista creates a new string, but older versions reuse the existing string. */ - /*ok (str == oldstr, "Created new string\n");*/ - bstr = Get(str); - ok (bstr->dwLen == 2, "Expected 2, got %d\n", bstr->dwLen); - ok (!lstrcmpW(bstr->szString, szSmaller), "String different\n"); - - changed = SysReAllocStringLen(&str, szLarger, 6); - ok (changed == 1, "Expected 1, got %d\n", changed); - /* Early versions always make new strings rather than resizing */ - /* ok (str == oldstr, "Created new string\n"); */ - bstr = Get(str); - ok (bstr->dwLen == 12, "Expected 12, got %d\n", bstr->dwLen); - ok (!lstrcmpW(bstr->szString, szLarger), "String different\n"); - - changed = SysReAllocStringLen(&str, str, 6); - ok (changed == 1, "Expected 1, got %d\n", changed); - - SysFreeString(str); - } - - /* Windows always returns null terminated strings */ - str = SysAllocStringLen(szTest, 4); - ok (str != NULL, "Expected non-NULL\n"); - if (str) - { - const int CHUNK_SIZE = 64; - const int STRING_SIZE = 24; - int changed; - changed = SysReAllocStringLen(&str, NULL, CHUNK_SIZE); - ok (changed == 1, "Expected 1, got %d\n", changed); - ok (str != NULL, "Expected non-NULL\n"); - if (str) - { - BSTR oldstr = str; - - /* Filling string */ - memset (str, 0xAB, CHUNK_SIZE * sizeof (OLECHAR)); - /* Checking null terminator */ - changed = SysReAllocStringLen(&str, NULL, STRING_SIZE); - ok (changed == 1, "Expected 1, got %d\n", changed); - ok (str != NULL, "Expected non-NULL\n"); - if (str) - { - ok (str == oldstr, "Expected reuse of the old string memory\n"); - ok (str[STRING_SIZE] == 0, - "Expected null terminator, got 0x%04X\n", str[STRING_SIZE]); - SysFreeString(str); - } - } - } - - /* Some Windows applications use the same pointer for pbstr and psz */ - str = SysAllocStringLen(szTest, 4); - ok(str != NULL, "Expected non-NULL\n"); - if(str) - { - SysReAllocStringLen(&str, str, 1000000); - ok(SysStringLen(str)==1000000, "Incorrect string length\n"); - ok(!memcmp(szTest, str, 4*sizeof(WCHAR)), "Incorrect string returned\n"); - - SysFreeString(str); - } -} - -static void test_BstrCopy(void) -{ - const CHAR szTestA[6] = { 'T','e','s','t','\0','?' }; - const CHAR szTestTruncA[4] = { 'T','e','s','\0' }; - LPINTERNAL_BSTR bstr; - BSTR str; - HRESULT hres; - VARIANT vt1, vt2; - - str = SysAllocStringByteLen(szTestA, 3); - ok (str != NULL, "Expected non-NULL\n"); - if (str) - { - V_VT(&vt1) = VT_BSTR; - V_BSTR(&vt1) = str; - V_VT(&vt2) = VT_EMPTY; - hres = VariantCopy(&vt2, &vt1); - ok (hres == S_OK,"Failed to copy binary bstring with hres 0x%08x\n", hres); - bstr = Get(V_BSTR(&vt2)); - ok (bstr->dwLen == 3, "Expected 3, got %d\n", bstr->dwLen); - ok (!lstrcmpA((LPCSTR)bstr->szString, szTestTruncA), "String different\n"); - VariantClear(&vt2); - VariantClear(&vt1); - } -} - -static void test_VarBstrCat(void) -{ - static const WCHAR sz1[] = { 'a',0 }; - static const WCHAR sz2[] = { 'b',0 }; - static const WCHAR sz1sz2[] = { 'a','b',0 }; - static const WCHAR s1[] = { 'a',0 }; - static const WCHAR s2[] = { 'b',0 }; - static const WCHAR s1s2[] = { 'a',0,'b',0 }; - static const char str1A[] = "Have "; - static const char str2A[] = "A Cigar"; - HRESULT ret; - BSTR str1, str2, res; - UINT len; - -if (0) -{ - /* Crash */ - ret = VarBstrCat(NULL, NULL, NULL); -} - - /* Concatenation of two NULL strings works */ - ret = VarBstrCat(NULL, NULL, &res); - ok(ret == S_OK, "VarBstrCat failed: %08x\n", ret); - ok(res != NULL, "Expected a string\n"); - ok(SysStringLen(res) == 0, "Expected a 0-length string\n"); - SysFreeString(res); - - str1 = SysAllocString(sz1); - - /* Concatenation with one NULL arg */ - ret = VarBstrCat(NULL, str1, &res); - ok(ret == S_OK, "VarBstrCat failed: %08x\n", ret); - ok(res != NULL, "Expected a string\n"); - ok(SysStringLen(res) == SysStringLen(str1), "Unexpected length\n"); - ok(!memcmp(res, sz1, SysStringLen(str1)), "Unexpected value\n"); - SysFreeString(res); - ret = VarBstrCat(str1, NULL, &res); - ok(ret == S_OK, "VarBstrCat failed: %08x\n", ret); - ok(res != NULL, "Expected a string\n"); - ok(SysStringLen(res) == SysStringLen(str1), "Unexpected length\n"); - ok(!memcmp(res, sz1, SysStringLen(str1)), "Unexpected value\n"); - SysFreeString(res); - - /* Concatenation of two zero-terminated strings */ - str2 = SysAllocString(sz2); - ret = VarBstrCat(str1, str2, &res); - ok(ret == S_OK, "VarBstrCat failed: %08x\n", ret); - ok(res != NULL, "Expected a string\n"); - ok(SysStringLen(res) == sizeof(sz1sz2) / sizeof(WCHAR) - 1, - "Unexpected length\n"); - ok(!memcmp(res, sz1sz2, sizeof(sz1sz2)), "Unexpected value\n"); - SysFreeString(res); - - SysFreeString(str2); - SysFreeString(str1); - - /* Concatenation of two strings with embedded NULLs */ - str1 = SysAllocStringLen(s1, sizeof(s1) / sizeof(WCHAR)); - str2 = SysAllocStringLen(s2, sizeof(s2) / sizeof(WCHAR)); - - ret = VarBstrCat(str1, str2, &res); - ok(ret == S_OK, "VarBstrCat failed: %08x\n", ret); - ok(res != NULL, "Expected a string\n"); - ok(SysStringLen(res) == sizeof(s1s2) / sizeof(WCHAR), - "Unexpected length\n"); - ok(!memcmp(res, s1s2, sizeof(s1s2)), "Unexpected value\n"); - SysFreeString(res); - - SysFreeString(str2); - SysFreeString(str1); - - /* Concatenation of ansi BSTRs, both odd byte count not including termination */ - str1 = SysAllocStringByteLen(str1A, sizeof(str1A)-1); - str2 = SysAllocStringByteLen(str2A, sizeof(str2A)-1); - len = SysStringLen(str1); - ok(len == (sizeof(str1A)-1)/sizeof(WCHAR), "got length %u\n", len); - len = SysStringLen(str2); - ok(len == (sizeof(str2A)-1)/sizeof(WCHAR), "got length %u\n", len); - - ret = VarBstrCat(str1, str2, &res); - ok(ret == S_OK, "VarBstrCat failed: %08x\n", ret); - ok(res != NULL, "Expected a string\n"); - len = (sizeof(str1A) + sizeof(str2A) - 2)/sizeof(WCHAR); - ok(SysStringLen(res) == len, "got %d, expected %u\n", SysStringLen(res), len); - ok(!memcmp(res, "Have A Cigar", sizeof(str1A) + sizeof(str2A) - 1), "got (%s)\n", (char*)res); - SysFreeString(res); - - SysFreeString(str2); - SysFreeString(str1); - - /* Concatenation of ansi BSTRs, both 1 byte length not including termination */ - str1 = SysAllocStringByteLen(str1A, 1); - str2 = SysAllocStringByteLen(str2A, 1); - len = SysStringLen(str1); - ok(len == 0, "got length %u\n", len); - len = SysStringLen(str2); - ok(len == 0, "got length %u\n", len); - - ret = VarBstrCat(str1, str2, &res); - ok(ret == S_OK, "VarBstrCat failed: %08x\n", ret); - ok(res != NULL, "Expected a string\n"); - ok(SysStringLen(res) == 1, "got %d, expected 1\n", SysStringLen(res)); - ok(!memcmp(res, "HA", 2), "got (%s)\n", (char*)res); - SysFreeString(res); - - SysFreeString(str2); - SysFreeString(str1); -} - -/* IUnknown */ - -static void test_IUnknownClear(void) -{ - HRESULT hres; - VARIANTARG v; - DummyDispatch u = { &DummyDispatch_VTable, 1, VT_UI1, FALSE }; - IUnknown* pu = (IUnknown*)&u; - - /* Test that IUnknown_Release is called on by-value */ - V_VT(&v) = VT_UNKNOWN; - V_UNKNOWN(&v) = (IUnknown*)&u; - hres = VariantClear(&v); - ok(hres == S_OK && u.ref == 0 && V_VT(&v) == VT_EMPTY, - "clear unknown: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n", - S_OK, 0, VT_EMPTY, hres, u.ref, V_VT(&v)); - - /* But not when clearing a by-reference*/ - u.ref = 1; - V_VT(&v) = VT_UNKNOWN|VT_BYREF; - V_UNKNOWNREF(&v) = &pu; - hres = VariantClear(&v); - ok(hres == S_OK && u.ref == 1 && V_VT(&v) == VT_EMPTY, - "clear dispatch: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n", - S_OK, 1, VT_EMPTY, hres, u.ref, V_VT(&v)); -} - -static void test_IUnknownCopy(void) -{ - HRESULT hres; - VARIANTARG vSrc, vDst; - DummyDispatch u = { &DummyDispatch_VTable, 1, VT_UI1, FALSE }; - IUnknown* pu = (IUnknown*)&u; - - /* AddRef is called on by-value copy */ - VariantInit(&vDst); - V_VT(&vSrc) = VT_UNKNOWN; - V_UNKNOWN(&vSrc) = pu; - hres = VariantCopy(&vDst, &vSrc); - ok(hres == S_OK && u.ref == 2 && V_VT(&vDst) == VT_UNKNOWN, - "copy unknown: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n", - S_OK, 2, VT_EMPTY, hres, u.ref, V_VT(&vDst)); - - /* AddRef is skipped on copy of by-reference IDispatch */ - VariantInit(&vDst); - u.ref = 1; - V_VT(&vSrc) = VT_UNKNOWN|VT_BYREF; - V_UNKNOWNREF(&vSrc) = &pu; - hres = VariantCopy(&vDst, &vSrc); - ok(hres == S_OK && u.ref == 1 && V_VT(&vDst) == (VT_UNKNOWN|VT_BYREF), - "copy unknown: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n", - S_OK, 1, VT_DISPATCH, hres, u.ref, V_VT(&vDst)); - - /* AddRef is called copying by-reference IDispatch with indirection */ - VariantInit(&vDst); - u.ref = 1; - V_VT(&vSrc) = VT_UNKNOWN|VT_BYREF; - V_UNKNOWNREF(&vSrc) = &pu; - hres = VariantCopyInd(&vDst, &vSrc); - ok(hres == S_OK && u.ref == 2 && V_VT(&vDst) == VT_UNKNOWN, - "copy unknown: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n", - S_OK, 2, VT_DISPATCH, hres, u.ref, V_VT(&vDst)); - - /* Indirection in place also calls AddRef */ - u.ref = 1; - V_VT(&vSrc) = VT_UNKNOWN|VT_BYREF; - V_UNKNOWNREF(&vSrc) = &pu; - hres = VariantCopyInd(&vSrc, &vSrc); - ok(hres == S_OK && u.ref == 2 && V_VT(&vSrc) == VT_UNKNOWN, - "copy unknown: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n", - S_OK, 2, VT_DISPATCH, hres, u.ref, V_VT(&vSrc)); -} - -static void test_IUnknownChangeTypeEx(void) -{ - HRESULT hres; - VARIANTARG vSrc, vDst; - LCID lcid; - VARTYPE vt; - DummyDispatch u = { &DummyDispatch_VTable, 1, VT_UI1, FALSE }; - IUnknown* pu = (IUnknown*)&u; - - lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); - - V_VT(&vSrc) = VT_UNKNOWN; - V_UNKNOWN(&vSrc) = pu; - - /* =>IDispatch in place */ - hres = VariantChangeTypeEx(&vSrc, &vSrc, lcid, 0, VT_DISPATCH); - ok(hres == S_OK && u.ref == 1 && - V_VT(&vSrc) == VT_DISPATCH && V_DISPATCH(&vSrc) == (IDispatch*)pu, - "change unk(src=src): expected 0x%08x,%d,%d,%p, got 0x%08x,%d,%d,%p\n", - S_OK, 1, VT_DISPATCH, pu, hres, u.ref, V_VT(&vSrc), V_DISPATCH(&vSrc)); - - /* =>IDispatch */ - u.ref = 1; - V_VT(&vSrc) = VT_UNKNOWN; - V_UNKNOWN(&vSrc) = pu; - VariantInit(&vDst); - hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, VT_UNKNOWN); - /* Note vSrc is not cleared, as final refcount is 2 */ - ok(hres == S_OK && u.ref == 2 && - V_VT(&vDst) == VT_UNKNOWN && V_UNKNOWN(&vDst) == pu, - "change unk(src,dst): expected 0x%08x,%d,%d,%p, got 0x%08x,%d,%d,%p\n", - S_OK, 2, VT_UNKNOWN, pu, hres, u.ref, V_VT(&vDst), V_UNKNOWN(&vDst)); - - /* Can't change unknown to anything else */ - for (vt = 0; vt <= VT_BSTR_BLOB; vt++) - { - HRESULT hExpected = DISP_E_BADVARTYPE; - - V_VT(&vSrc) = VT_UNKNOWN; - V_UNKNOWN(&vSrc) = pu; - VariantInit(&vDst); - - if (vt == VT_UNKNOWN || vt == VT_DISPATCH || vt == VT_EMPTY || vt == VT_NULL) - hExpected = S_OK; - else - { - if (vt == VT_I8 || vt == VT_UI8) - { - if (HAVE_OLEAUT32_I8) - hExpected = DISP_E_TYPEMISMATCH; - } - else if (vt == VT_RECORD) - { - if (HAVE_OLEAUT32_RECORD) - hExpected = DISP_E_TYPEMISMATCH; - } - else if (vt >= VT_I2 && vt <= VT_UINT && vt != (VARTYPE)15) - hExpected = DISP_E_TYPEMISMATCH; - } - if (IS_ANCIENT && IS_MODERN_VTYPE(vt)) - hExpected = DISP_E_BADVARTYPE; - - hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, vt); - ok(hres == hExpected, - "change unk(badvar): vt %d expected 0x%08x, got 0x%08x\n", - vt, hExpected, hres); - } -} - -/* IDispatch */ -static void test_IDispatchClear(void) -{ - HRESULT hres; - VARIANTARG v; - DummyDispatch d = { &DummyDispatch_VTable, 1, VT_UI1, FALSE }; - IDispatch* pd = (IDispatch*)&d; - - /* As per IUnknown */ - - V_VT(&v) = VT_DISPATCH; - V_DISPATCH(&v) = pd; - hres = VariantClear(&v); - ok(hres == S_OK && d.ref == 0 && V_VT(&v) == VT_EMPTY, - "clear dispatch: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n", - S_OK, 0, VT_EMPTY, hres, d.ref, V_VT(&v)); - - d.ref = 1; - V_VT(&v) = VT_DISPATCH|VT_BYREF; - V_DISPATCHREF(&v) = &pd; - hres = VariantClear(&v); - ok(hres == S_OK && d.ref == 1 && V_VT(&v) == VT_EMPTY, - "clear dispatch: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n", - S_OK, 1, VT_EMPTY, hres, d.ref, V_VT(&v)); -} - -static void test_IDispatchCopy(void) -{ - HRESULT hres; - VARIANTARG vSrc, vDst; - DummyDispatch d = { &DummyDispatch_VTable, 1, VT_UI1, FALSE }; - IDispatch* pd = (IDispatch*)&d; - - /* As per IUnknown */ - - VariantInit(&vDst); - V_VT(&vSrc) = VT_DISPATCH; - V_DISPATCH(&vSrc) = pd; - hres = VariantCopy(&vDst, &vSrc); - ok(hres == S_OK && d.ref == 2 && V_VT(&vDst) == VT_DISPATCH, - "copy dispatch: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n", - S_OK, 2, VT_EMPTY, hres, d.ref, V_VT(&vDst)); - - VariantInit(&vDst); - d.ref = 1; - V_VT(&vSrc) = VT_DISPATCH|VT_BYREF; - V_DISPATCHREF(&vSrc) = &pd; - hres = VariantCopy(&vDst, &vSrc); - ok(hres == S_OK && d.ref == 1 && V_VT(&vDst) == (VT_DISPATCH|VT_BYREF), - "copy dispatch: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n", - S_OK, 1, VT_DISPATCH, hres, d.ref, V_VT(&vDst)); - - VariantInit(&vDst); - d.ref = 1; - V_VT(&vSrc) = VT_DISPATCH|VT_BYREF; - V_DISPATCHREF(&vSrc) = &pd; - hres = VariantCopyInd(&vDst, &vSrc); - ok(hres == S_OK && d.ref == 2 && V_VT(&vDst) == VT_DISPATCH, - "copy dispatch: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n", - S_OK, 2, VT_DISPATCH, hres, d.ref, V_VT(&vDst)); - - d.ref = 1; - V_VT(&vSrc) = VT_DISPATCH|VT_BYREF; - V_DISPATCHREF(&vSrc) = &pd; - hres = VariantCopyInd(&vSrc, &vSrc); - ok(hres == S_OK && d.ref == 2 && V_VT(&vSrc) == VT_DISPATCH, - "copy dispatch: expected 0x%08x, %d, %d, got 0x%08x, %d, %d\n", - S_OK, 2, VT_DISPATCH, hres, d.ref, V_VT(&vSrc)); -} - -static void test_IDispatchChangeTypeEx(void) -{ - HRESULT hres; - VARIANTARG vSrc, vDst; - LCID lcid; - DummyDispatch d = { &DummyDispatch_VTable, 1, VT_UI1, FALSE }; - IDispatch* pd = (IDispatch*)&d; - - lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); - - V_VT(&vSrc) = VT_DISPATCH; - V_DISPATCH(&vSrc) = pd; - - /* =>IUnknown in place */ - hres = VariantChangeTypeEx(&vSrc, &vSrc, lcid, 0, VT_UNKNOWN); - ok(hres == S_OK && d.ref == 1 && - V_VT(&vSrc) == VT_UNKNOWN && V_UNKNOWN(&vSrc) == (IUnknown*)pd, - "change disp(src=src): expected 0x%08x,%d,%d,%p, got 0x%08x,%d,%d,%p\n", - S_OK, 1, VT_UNKNOWN, pd, hres, d.ref, V_VT(&vSrc), V_UNKNOWN(&vSrc)); - - /* =>IUnknown */ - d.ref = 1; - V_VT(&vSrc) = VT_DISPATCH; - V_DISPATCH(&vSrc) = pd; - VariantInit(&vDst); - hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, VT_UNKNOWN); - /* Note vSrc is not cleared, as final refcount is 2 */ - ok(hres == S_OK && d.ref == 2 && - V_VT(&vDst) == VT_UNKNOWN && V_UNKNOWN(&vDst) == (IUnknown*)pd, - "change disp(src,dst): expected 0x%08x,%d,%d,%p, got 0x%08x,%d,%d,%p\n", - S_OK, 2, VT_UNKNOWN, pd, hres, d.ref, V_VT(&vDst), V_UNKNOWN(&vDst)); - - /* FIXME: Verify that VARIANT_NOVALUEPROP prevents conversion to integral - * types. this requires that the xxxFromDisp tests work first. - */ -} - -/* VT_ERROR */ -static void test_ErrorChangeTypeEx(void) -{ - HRESULT hres; - VARIANTARG vSrc, vDst; - VARTYPE vt; - LCID lcid; - - lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); - - for (vt = 0; vt <= VT_BSTR_BLOB; vt++) - { - HRESULT hExpected = DISP_E_BADVARTYPE; - - V_VT(&vSrc) = VT_ERROR; - V_ERROR(&vSrc) = 1; - VariantInit(&vDst); - hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, vt); - - if (vt == VT_ERROR) - hExpected = S_OK; - else - { - if (vt == VT_I8 || vt == VT_UI8) - { - if (HAVE_OLEAUT32_I8) - hExpected = DISP_E_TYPEMISMATCH; - } - else if (vt == VT_RECORD) - { - if (HAVE_OLEAUT32_RECORD) - hExpected = DISP_E_TYPEMISMATCH; - } - else if (vt <= VT_UINT && vt != (VARTYPE)15) - hExpected = DISP_E_TYPEMISMATCH; - } - if (IS_ANCIENT && IS_MODERN_VTYPE(vt)) - hExpected = DISP_E_BADVARTYPE; - - ok(hres == hExpected, - "change err: vt %d expected 0x%08x, got 0x%08x\n", vt, hExpected, hres); - } -} - -/* VT_EMPTY */ -static void test_EmptyChangeTypeEx(void) -{ - HRESULT hres; - VARIANTARG vSrc, vDst; - VARTYPE vt; - LCID lcid; - - lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); - - for (vt = 0; vt <= VT_BSTR_BLOB; vt++) - { - HRESULT hExpected = DISP_E_BADVARTYPE; - - VariantInit(&vSrc); - memset(&vDst, 0, sizeof(vDst)); - V_VT(&vDst) = VT_EMPTY; - - if (vt == VT_I8 || vt == VT_UI8) - { - if (HAVE_OLEAUT32_I8) - hExpected = S_OK; - } - else if (vt == VT_RECORD) - { - if (HAVE_OLEAUT32_RECORD) - hExpected = DISP_E_TYPEMISMATCH; - } - else if (vt == VT_VARIANT || vt == VT_DISPATCH || - vt == VT_UNKNOWN || vt == VT_ERROR) - { - hExpected = DISP_E_TYPEMISMATCH; - } - else if (vt <= VT_UINT && vt != (VARTYPE)15) - hExpected = S_OK; - - if (IS_ANCIENT && IS_MODERN_VTYPE(vt)) - hExpected = DISP_E_BADVARTYPE; - - hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, vt); - - ok(hres == hExpected && (hres != S_OK || V_VT(&vDst) == vt), - "change empty: vt %d expected 0x%08x, got 0x%08x, vt %d\n", - vt, hExpected, hres, V_VT(&vDst)); - if(hres == S_OK) VariantClear(&vDst); - } -} - -/* VT_NULL */ -static void test_NullChangeTypeEx(void) -{ - HRESULT hres; - VARIANTARG vSrc, vDst; - VARTYPE vt; - LCID lcid; - - lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); - - for (vt = 0; vt <= VT_BSTR_BLOB; vt++) - { - HRESULT hExpected = DISP_E_BADVARTYPE; - - VariantInit(&vSrc); - V_VT(&vSrc) = VT_NULL; - memset(&vDst, 0, sizeof(vDst)); - V_VT(&vDst) = VT_EMPTY; - - if (vt == VT_I8 || vt == VT_UI8) - { - if (HAVE_OLEAUT32_I8) - hExpected = DISP_E_TYPEMISMATCH; - } - else if (vt == VT_RECORD) - { - if (HAVE_OLEAUT32_RECORD) - hExpected = DISP_E_TYPEMISMATCH; - } - else if (vt == VT_NULL) - { - hExpected = S_OK; - } - else if (vt == VT_VARIANT || vt == VT_DISPATCH || - vt == VT_UNKNOWN || vt == VT_ERROR || - (vt <= VT_UINT && vt != (VARTYPE)15)) - hExpected = DISP_E_TYPEMISMATCH; - - if (IS_ANCIENT && IS_MODERN_VTYPE(vt)) - hExpected = DISP_E_BADVARTYPE; - - hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, vt); - - ok(hres == hExpected && (hres != S_OK || V_VT(&vDst) == vt), - "change null: vt %d expected 0x%08x, got 0x%08x, vt %d\n", - vt, hExpected, hres, V_VT(&vDst)); - } -} - - -/* VT_UINT */ -static void test_UintChangeTypeEx(void) -{ - HRESULT hres; - VARIANTARG vSrc, vDst; - LCID lcid; - - lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); - - /* Converting a VT_UINT to a VT_INT does not check for overflow */ - V_VT(&vDst) = VT_EMPTY; - V_VT(&vSrc) = VT_UINT; - V_UI4(&vSrc) = -1; - hres = VariantChangeTypeEx(&vDst, &vSrc, lcid, 0, VT_I4); - ok(hres == S_OK && V_VT(&vDst) == VT_I4 && V_I4(&vDst) == -1, - "change uint: Expected %d,0x%08x,%d got %d,0x%08x,%d\n", - VT_I4, S_OK, -1, V_VT(&vDst), hres, V_I4(&vDst)); -} - -#define NUM_CUST_ITEMS 16 - -static void test_ClearCustData(void) -{ - CUSTDATA ci; - unsigned i; - - CHECKPTR(ClearCustData); - - ci.cCustData = NUM_CUST_ITEMS; - ci.prgCustData = CoTaskMemAlloc( sizeof(CUSTDATAITEM) * NUM_CUST_ITEMS ); - for (i = 0; i < NUM_CUST_ITEMS; i++) - VariantInit(&ci.prgCustData[i].varValue); - pClearCustData(&ci); - ok(!ci.cCustData && !ci.prgCustData, "ClearCustData didn't clear fields!\n"); -} - -static void test_NullByRef(void) -{ - VARIANT v1, v2; - HRESULT hRes; - - VariantInit(&v1); - VariantInit(&v2); - V_VT(&v1) = VT_BYREF|VT_VARIANT; - V_BYREF(&v1) = 0; - - hRes = VariantChangeTypeEx(&v2, &v1, 0, 0, VT_I4); - ok(hRes == DISP_E_TYPEMISMATCH, "VariantChangeTypeEx should return DISP_E_TYPEMISMATCH\n"); - - VariantClear(&v1); - V_VT(&v1) = VT_BYREF|VT_VARIANT; - V_BYREF(&v1) = 0; - V_VT(&v2) = VT_I4; - V_I4(&v2) = 123; - - hRes = VariantChangeTypeEx(&v2, &v1, 0, 0, VT_VARIANT); - ok(hRes == DISP_E_TYPEMISMATCH, "VariantChangeTypeEx should return DISP_E_TYPEMISMATCH\n"); - ok(V_VT(&v2) == VT_I4 && V_I4(&v2) == 123, "VariantChangeTypeEx shouldn't change pvargDest\n"); - - hRes = VariantChangeTypeEx(&v2, &v1, 0, 0, VT_BYREF|VT_I4); - ok(hRes == DISP_E_TYPEMISMATCH, "VariantChangeTypeEx should return DISP_E_TYPEMISMATCH\n"); - - hRes = VariantChangeTypeEx(&v2, &v1, 0, 0, 0x3847); - ok(hRes == DISP_E_BADVARTYPE, "VariantChangeTypeEx should return DISP_E_BADVARTYPE\n"); -} - -/* Dst Variant should remain unchanged if VariantChangeType cannot convert */ -static void test_ChangeType_keep_dst(void) -{ - VARIANT v1, v2; - BSTR bstr; - static const WCHAR testW[] = {'t','e','s','t',0}; - HRESULT hres; - - bstr = SysAllocString(testW); - VariantInit(&v1); - VariantInit(&v2); - V_VT(&v1) = VT_BSTR; - V_BSTR(&v1) = bstr; - hres = VariantChangeTypeEx(&v1, &v1, 0, 0, VT_INT); - ok(hres == DISP_E_TYPEMISMATCH, "VariantChangeTypeEx returns %08x\n", hres); - ok(V_VT(&v1) == VT_BSTR && V_BSTR(&v1) == bstr, "VariantChangeTypeEx changed dst variant\n"); - V_VT(&v2) = VT_INT; - V_INT(&v2) = 4; - hres = VariantChangeTypeEx(&v2, &v1, 0, 0, VT_INT); - ok(hres == DISP_E_TYPEMISMATCH, "VariantChangeTypeEx returns %08x\n", hres); - ok(V_VT(&v2) == VT_INT && V_INT(&v2) == 4, "VariantChangeTypeEx changed dst variant\n"); - SysFreeString(bstr); -} - -START_TEST(vartype) -{ - hOleaut32 = GetModuleHandleA("oleaut32.dll"); - - trace("LCID's: System=0x%08x, User=0x%08x\n", GetSystemDefaultLCID(), - GetUserDefaultLCID()); - - test_VarI1FromI2(); - test_VarI1FromI4(); - test_VarI1FromI8(); - test_VarI1FromUI1(); - test_VarI1FromUI2(); - test_VarI1FromUI4(); - test_VarI1FromUI8(); - test_VarI1FromBool(); - test_VarI1FromR4(); - test_VarI1FromR8(); - test_VarI1FromDate(); - test_VarI1FromCy(); - test_VarI1FromDec(); - test_VarI1FromStr(); - test_VarUI1FromDisp(); - test_VarI1Copy(); - test_VarI1ChangeTypeEx(); - - test_VarUI1FromI1(); - test_VarUI1FromI2(); - test_VarUI1FromI4(); - test_VarUI1FromI8(); - test_VarUI1FromUI2(); - test_VarUI1FromUI4(); - test_VarUI1FromUI8(); - test_VarUI1FromBool(); - test_VarUI1FromR4(); - test_VarUI1FromR8(); - test_VarUI1FromDate(); - test_VarUI1FromCy(); - test_VarUI1FromDec(); - test_VarUI1FromStr(); - test_VarUI1Copy(); - test_VarUI1ChangeTypeEx(); - - test_VarI2FromI1(); - test_VarI2FromI4(); - test_VarI2FromI8(); - test_VarI2FromUI1(); - test_VarI2FromUI2(); - test_VarI2FromUI4(); - test_VarI2FromUI8(); - test_VarI2FromBool(); - test_VarI2FromR4(); - test_VarI2FromR8(); - test_VarI2FromDate(); - test_VarI2FromCy(); - test_VarI2FromDec(); - test_VarI2FromStr(); - test_VarI2Copy(); - test_VarI2ChangeTypeEx(); - - test_VarUI2FromI1(); - test_VarUI2FromI2(); - test_VarUI2FromI4(); - test_VarUI2FromI8(); - test_VarUI2FromUI1(); - test_VarUI2FromUI4(); - test_VarUI2FromUI8(); - test_VarUI2FromBool(); - test_VarUI2FromR4(); - test_VarUI2FromR8(); - test_VarUI2FromDate(); - test_VarUI2FromCy(); - test_VarUI2FromDec(); - test_VarUI2FromStr(); - test_VarUI2Copy(); - test_VarUI2ChangeTypeEx(); - - test_VarI4FromI1(); - test_VarI4FromI2(); - test_VarI4FromI8(); - test_VarI4FromUI1(); - test_VarI4FromUI2(); - test_VarI4FromUI4(); - test_VarI4FromUI8(); - test_VarI4FromBool(); - test_VarI4FromR4(); - test_VarI4FromR8(); - test_VarI4FromDate(); - test_VarI4FromCy(); - test_VarI4FromDec(); - test_VarI4FromStr(); - test_VarI4Copy(); - test_VarI4ChangeTypeEx(); - - test_VarUI4FromI1(); - test_VarUI4FromI2(); - test_VarUI4FromUI2(); - test_VarUI4FromI8(); - test_VarUI4FromUI1(); - test_VarUI4FromI4(); - test_VarUI4FromUI8(); - test_VarUI4FromBool(); - test_VarUI4FromR4(); - test_VarUI4FromR8(); - test_VarUI4FromDate(); - test_VarUI4FromCy(); - test_VarUI4FromDec(); - test_VarUI4FromStr(); - test_VarUI4Copy(); - test_VarUI4ChangeTypeEx(); - - test_VarI8FromI1(); - test_VarI8FromUI1(); - test_VarI8FromI2(); - test_VarI8FromUI2(); - test_VarI8FromUI4(); - test_VarI8FromR4(); - test_VarI8FromR8(); - test_VarI8FromBool(); - test_VarI8FromUI8(); - test_VarI8FromCy(); - test_VarI8FromDec(); - test_VarI8FromDate(); - test_VarI8FromStr(); - test_VarI8Copy(); - test_VarI8ChangeTypeEx(); - - test_VarUI8FromI1(); - test_VarUI8FromUI1(); - test_VarUI8FromI2(); - test_VarUI8FromUI2(); - test_VarUI8FromUI4(); - test_VarUI8FromR4(); - test_VarUI8FromR8(); - test_VarUI8FromBool(); - test_VarUI8FromI8(); - test_VarUI8FromCy(); - test_VarUI8FromDec(); - test_VarUI8FromDate(); - test_VarUI8FromStr(); - test_VarUI8Copy(); - test_VarUI8ChangeTypeEx(); - - test_VarR4FromI1(); - test_VarR4FromUI1(); - test_VarR4FromI2(); - test_VarR4FromUI2(); - test_VarR4FromI4(); - test_VarR4FromUI4(); - test_VarR4FromR8(); - test_VarR4FromBool(); - test_VarR4FromCy(); - test_VarR4FromI8(); - test_VarR4FromUI8(); - test_VarR4FromDec(); - test_VarR4FromDate(); - test_VarR4FromStr(); - test_VarR4Copy(); - test_VarR4ChangeTypeEx(); - - test_VarR8FromI1(); - test_VarR8FromUI1(); - test_VarR8FromI2(); - test_VarR8FromUI2(); - test_VarR8FromI4(); - test_VarR8FromUI4(); - test_VarR8FromR4(); - test_VarR8FromBool(); - test_VarR8FromCy(); - test_VarR8FromI8(); - test_VarR8FromUI8(); - test_VarR8FromDec(); - test_VarR8FromDate(); - test_VarR8FromStr(); - test_VarR8Copy(); - test_VarR8ChangeTypeEx(); - test_VarR8Round(); - - test_VarDateFromI1(); - test_VarDateFromUI1(); - test_VarDateFromI2(); - test_VarDateFromUI2(); - test_VarDateFromI4(); - test_VarDateFromUI4(); - test_VarDateFromR4(); - test_VarDateFromR8(); - test_VarDateFromBool(); - test_VarDateFromCy(); - test_VarDateFromI8(); - test_VarDateFromUI8(); - test_VarDateFromDec(); - test_VarDateFromStr(); - test_VarDateCopy(); - test_VarDateChangeTypeEx(); - - test_VarCyFromI1(); - test_VarCyFromUI1(); - test_VarCyFromI2(); - test_VarCyFromUI2(); - test_VarCyFromI4(); - test_VarCyFromUI4(); - test_VarCyFromR4(); - test_VarCyFromR8(); - test_VarCyFromBool(); - test_VarCyFromI8(); - test_VarCyFromUI8(); - test_VarCyFromDec(); - test_VarCyFromDate(); - - test_VarCyAdd(); - test_VarCyMul(); - test_VarCySub(); - test_VarCyAbs(); - test_VarCyNeg(); - test_VarCyMulI4(); - test_VarCyMulI8(); - test_VarCyCmp(); - test_VarCyCmpR8(); - test_VarCyRound(); - test_VarCyFix(); - test_VarCyInt(); - - test_VarDecFromI1(); - test_VarDecFromI2(); - test_VarDecFromI4(); - test_VarDecFromI8(); - test_VarDecFromUI1(); - test_VarDecFromUI2(); - test_VarDecFromUI4(); - test_VarDecFromUI8(); - test_VarDecFromR4(); - test_VarDecFromR8(); - test_VarDecFromDate(); - test_VarDecFromStr(); - test_VarDecFromCy(); - test_VarDecFromDate(); - test_VarDecFromBool(); - - test_VarDecAbs(); - test_VarDecNeg(); - test_VarDecAdd(); - test_VarDecSub(); - test_VarDecCmp(); - test_VarDecMul(); - test_VarDecDiv(); - - test_VarBoolFromI1(); - test_VarBoolFromUI1(); - test_VarBoolFromI2(); - test_VarBoolFromUI2(); - test_VarBoolFromI4(); - test_VarBoolFromUI4(); - test_VarBoolFromR4(); - test_VarBoolFromR8(); - test_VarBoolFromCy(); - test_VarBoolFromI8(); - test_VarBoolFromUI8(); - test_VarBoolFromDec(); - test_VarBoolFromDate(); - test_VarBoolFromStr(); - test_VarBoolCopy(); - test_VarBoolChangeTypeEx(); - - test_VarBstrFromR4(); - test_VarBstrFromDate(); - test_VarBstrFromCy(); - test_VarBstrFromDec(); - test_VarBstrCmp(); - test_SysStringLen(); - test_SysStringByteLen(); - test_SysAllocString(); - test_SysAllocStringLen(); - test_SysAllocStringByteLen(); - test_SysReAllocString(); - test_SysReAllocStringLen(); - test_BstrCopy(); - test_VarBstrCat(); - - test_IUnknownClear(); - test_IUnknownCopy(); - test_IUnknownChangeTypeEx(); - - test_IDispatchClear(); - test_IDispatchCopy(); - test_IDispatchChangeTypeEx(); - - test_ErrorChangeTypeEx(); - test_EmptyChangeTypeEx(); - test_NullChangeTypeEx(); - test_UintChangeTypeEx(); - - test_ClearCustData(); - - test_NullByRef(); - test_ChangeType_keep_dst(); -} diff --git a/rostests/winetests/opengl32/CMakeLists.txt b/rostests/winetests/opengl32/CMakeLists.txt deleted file mode 100644 index 5f65ee56c53..00000000000 --- a/rostests/winetests/opengl32/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(opengl32_winetest opengl.c testlist.c) -target_link_libraries(opengl32_winetest wine) -set_module_type(opengl32_winetest win32cui) -add_importlibs(opengl32_winetest opengl32 gdi32 user32 msvcrt kernel32 ntdll) -add_cd_file(TARGET opengl32_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/opengl32/opengl.c b/rostests/winetests/opengl32/opengl.c deleted file mode 100644 index 2b81ddabdba..00000000000 --- a/rostests/winetests/opengl32/opengl.c +++ /dev/null @@ -1,980 +0,0 @@ -/* - * Some tests for OpenGL functions - * - * Copyright (C) 2007-2008 Roderick Colenbrander - * - * 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 "wine/test.h" - -void WINAPI glClearColor(float red, float green, float blue, float alpha); -void WINAPI glClear(unsigned int mask); -void WINAPI glFinish(void); -#define GL_COLOR_BUFFER_BIT 0x00004000 -const unsigned char * WINAPI glGetString(unsigned int); -#define GL_VENDOR 0x1F00 -#define GL_RENDERER 0x1F01 -#define GL_VERSION 0x1F02 - -#define MAX_FORMATS 256 -typedef void* HPBUFFERARB; - -/* WGL_ARB_create_context */ -HGLRC (WINAPI *pwglCreateContextAttribsARB)(HDC hDC, HGLRC hShareContext, const int *attribList); -/* GetLastError */ -#define ERROR_INVALID_VERSION_ARB 0x2095 -#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 -#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 -#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 -#define WGL_CONTEXT_FLAGS_ARB 0x2094 -/* Flags for WGL_CONTEXT_FLAGS_ARB */ -#define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001 -#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002 - -/* WGL_ARB_extensions_string */ -static const char* (WINAPI *pwglGetExtensionsStringARB)(HDC); -static int (WINAPI *pwglReleasePbufferDCARB)(HPBUFFERARB, HDC); - -/* WGL_ARB_make_current_read */ -static BOOL (WINAPI *pwglMakeContextCurrentARB)(HDC hdraw, HDC hread, HGLRC hglrc); -static HDC (WINAPI *pwglGetCurrentReadDCARB)(void); - -/* WGL_ARB_pixel_format */ -#define WGL_ACCELERATION_ARB 0x2003 -#define WGL_COLOR_BITS_ARB 0x2014 -#define WGL_RED_BITS_ARB 0x2015 -#define WGL_GREEN_BITS_ARB 0x2017 -#define WGL_BLUE_BITS_ARB 0x2019 -#define WGL_ALPHA_BITS_ARB 0x201B -#define WGL_SUPPORT_GDI_ARB 0x200F -#define WGL_DOUBLE_BUFFER_ARB 0x2011 -#define WGL_NO_ACCELERATION_ARB 0x2025 -#define WGL_GENERIC_ACCELERATION_ARB 0x2026 -#define WGL_FULL_ACCELERATION_ARB 0x2027 - -static BOOL (WINAPI *pwglChoosePixelFormatARB)(HDC, const int *, const FLOAT *, UINT, int *, UINT *); -static BOOL (WINAPI *pwglGetPixelFormatAttribivARB)(HDC, int, int, UINT, const int *, int *); - -/* WGL_ARB_pbuffer */ -#define WGL_DRAW_TO_PBUFFER_ARB 0x202D -static HPBUFFERARB* (WINAPI *pwglCreatePbufferARB)(HDC, int, int, int, const int *); -static HDC (WINAPI *pwglGetPbufferDCARB)(HPBUFFERARB); - -static const char* wgl_extensions = NULL; - -static void init_functions(void) -{ -#define GET_PROC(func) \ - p ## func = (void*)wglGetProcAddress(#func); \ - if(!p ## func) \ - trace("wglGetProcAddress(%s) failed\n", #func); - - /* WGL_ARB_create_context */ - GET_PROC(wglCreateContextAttribsARB); - - /* WGL_ARB_extensions_string */ - GET_PROC(wglGetExtensionsStringARB) - - /* WGL_ARB_make_current_read */ - GET_PROC(wglMakeContextCurrentARB); - GET_PROC(wglGetCurrentReadDCARB); - - /* WGL_ARB_pixel_format */ - GET_PROC(wglChoosePixelFormatARB) - GET_PROC(wglGetPixelFormatAttribivARB) - - /* WGL_ARB_pbuffer */ - GET_PROC(wglCreatePbufferARB) - GET_PROC(wglGetPbufferDCARB) - GET_PROC(wglReleasePbufferDCARB) - -#undef GET_PROC -} - -static void test_pbuffers(HDC hdc) -{ - const int iAttribList[] = { WGL_DRAW_TO_PBUFFER_ARB, 1, /* Request pbuffer support */ - 0 }; - int iFormats[MAX_FORMATS]; - unsigned int nOnscreenFormats; - unsigned int nFormats; - int i, res; - int iPixelFormat = 0; - - nOnscreenFormats = DescribePixelFormat(hdc, 0, 0, NULL); - - /* When you want to render to a pbuffer you need to call wglGetPbufferDCARB which - * returns a 'magic' HDC which you can then pass to wglMakeCurrent to switch rendering - * to the pbuffer. Below some tests are performed on what happens if you use standard WGL calls - * on this 'magic' HDC for both a pixelformat that support onscreen and offscreen rendering - * and a pixelformat that's only available for offscreen rendering (this means that only - * wglChoosePixelFormatARB and friends know about the format. - * - * The first thing we need are pixelformats with pbuffer capabilities. - */ - res = pwglChoosePixelFormatARB(hdc, iAttribList, NULL, MAX_FORMATS, iFormats, &nFormats); - if(res <= 0) - { - skip("No pbuffer compatible formats found while WGL_ARB_pbuffer is supported\n"); - return; - } - trace("nOnscreenFormats: %d\n", nOnscreenFormats); - trace("Total number of pbuffer capable pixelformats: %d\n", nFormats); - - /* Try to select an onscreen pixelformat out of the list */ - for(i=0; i < nFormats; i++) - { - /* Check if the format is onscreen, if it is choose it */ - if(iFormats[i] <= nOnscreenFormats) - { - iPixelFormat = iFormats[i]; - trace("Selected iPixelFormat=%d\n", iPixelFormat); - break; - } - } - - /* A video driver supports a large number of onscreen and offscreen pixelformats. - * The traditional WGL calls only see a subset of the whole pixelformat list. First - * of all they only see the onscreen formats (the offscreen formats are at the end of the - * pixelformat list) and second extended pixelformat capabilities are hidden from the - * standard WGL calls. Only functions that depend on WGL_ARB_pixel_format can see them. - * - * Below we check if the pixelformat is also supported onscreen. - */ - if(iPixelFormat != 0) - { - HDC pbuffer_hdc; - HPBUFFERARB pbuffer = pwglCreatePbufferARB(hdc, iPixelFormat, 640 /* width */, 480 /* height */, NULL); - if(!pbuffer) - skip("Pbuffer creation failed!\n"); - - /* Test the pixelformat returned by GetPixelFormat on a pbuffer as the behavior is not clear */ - pbuffer_hdc = pwglGetPbufferDCARB(pbuffer); - res = GetPixelFormat(pbuffer_hdc); - ok(res == iPixelFormat, "Unexpected iPixelFormat=%d returned by GetPixelFormat for format %d\n", res, iPixelFormat); - trace("iPixelFormat returned by GetPixelFormat: %d\n", res); - trace("PixelFormat from wglChoosePixelFormatARB: %d\n", iPixelFormat); - - pwglReleasePbufferDCARB(pbuffer, hdc); - } - else skip("Pbuffer test for onscreen pixelformat skipped as no onscreen format with pbuffer capabilities have been found\n"); - - /* Search for a real offscreen format */ - for(i=0, iPixelFormat=0; i nOnscreenFormats) - { - iPixelFormat = iFormats[i]; - trace("Selected iPixelFormat: %d\n", iPixelFormat); - break; - } - } - - if(iPixelFormat != 0) - { - HDC pbuffer_hdc; - HPBUFFERARB pbuffer = pwglCreatePbufferARB(hdc, iPixelFormat, 640 /* width */, 480 /* height */, NULL); - if(!pbuffer) - skip("Pbuffer creation failed!\n"); - - /* Test the pixelformat returned by GetPixelFormat on a pbuffer as the behavior is not clear */ - pbuffer_hdc = pwglGetPbufferDCARB(pbuffer); - res = GetPixelFormat(pbuffer_hdc); - - ok(res == 1, "Unexpected iPixelFormat=%d (1 expected) returned by GetPixelFormat for offscreen format %d\n", res, iPixelFormat); - trace("iPixelFormat returned by GetPixelFormat: %d\n", res); - trace("PixelFormat from wglChoosePixelFormatARB: %d\n", iPixelFormat); - pwglReleasePbufferDCARB(pbuffer, hdc); - } - else skip("Pbuffer test for offscreen pixelformat skipped as no offscreen-only format with pbuffer capabilities has been found\n"); -} - -static void test_setpixelformat(HDC winhdc) -{ - int res = 0; - int nCfgs; - int pf; - int i; - HWND hwnd; - PIXELFORMATDESCRIPTOR pfd = { - sizeof(PIXELFORMATDESCRIPTOR), - 1, /* version */ - PFD_DRAW_TO_WINDOW | - PFD_SUPPORT_OPENGL | - PFD_DOUBLEBUFFER, - PFD_TYPE_RGBA, - 24, /* 24-bit color depth */ - 0, 0, 0, 0, 0, 0, /* color bits */ - 0, /* alpha buffer */ - 0, /* shift bit */ - 0, /* accumulation buffer */ - 0, 0, 0, 0, /* accum bits */ - 32, /* z-buffer */ - 0, /* stencil buffer */ - 0, /* auxiliary buffer */ - PFD_MAIN_PLANE, /* main layer */ - 0, /* reserved */ - 0, 0, 0 /* layer masks */ - }; - - HDC hdc = GetDC(0); - ok(hdc != 0, "GetDC(0) failed!\n"); - - /* This should pass even on the main device context */ - pf = ChoosePixelFormat(hdc, &pfd); - ok(pf != 0, "ChoosePixelFormat failed on main device context\n"); - - /* SetPixelFormat on the main device context 'X root window' should fail, - * but some broken drivers allow it - */ - res = SetPixelFormat(hdc, pf, &pfd); - trace("SetPixelFormat on main device context %s\n", res ? "succeeded" : "failed"); - - /* Setting the same format that was set on the HDC is allowed; other - formats fail */ - nCfgs = DescribePixelFormat(winhdc, 0, 0, NULL); - pf = GetPixelFormat(winhdc); - for(i = 1;i <= nCfgs;i++) - { - int res = SetPixelFormat(winhdc, i, NULL); - if(i == pf) ok(res, "Failed to set the same pixel format\n"); - else ok(!res, "Unexpectedly set an alternate pixel format\n"); - } - - hwnd = CreateWindow("static", "Title", WS_OVERLAPPEDWINDOW, - 10, 10, 200, 200, NULL, NULL, NULL, NULL); - ok(hwnd != NULL, "err: %d\n", GetLastError()); - if (hwnd) - { - HDC hdc = GetDC( hwnd ); - pf = ChoosePixelFormat( hdc, &pfd ); - ok( pf != 0, "ChoosePixelFormat failed\n" ); - res = SetPixelFormat( hdc, pf, &pfd ); - ok( res != 0, "SetPixelFormat failed\n" ); - i = GetPixelFormat( hdc ); - ok( i == pf, "GetPixelFormat returned wrong format %d/%d\n", i, pf ); - ReleaseDC( hwnd, hdc ); - hdc = GetWindowDC( hwnd ); - i = GetPixelFormat( hdc ); - ok( i == pf, "GetPixelFormat returned wrong format %d/%d\n", i, pf ); - ReleaseDC( hwnd, hdc ); - DestroyWindow( hwnd ); - } - - hwnd = CreateWindow("static", "Title", WS_OVERLAPPEDWINDOW, - 10, 10, 200, 200, NULL, NULL, NULL, NULL); - ok(hwnd != NULL, "err: %d\n", GetLastError()); - if (hwnd) - { - HDC hdc = GetWindowDC( hwnd ); - pf = ChoosePixelFormat( hdc, &pfd ); - ok( pf != 0, "ChoosePixelFormat failed\n" ); - res = SetPixelFormat( hdc, pf, &pfd ); - ok( res != 0, "SetPixelFormat failed\n" ); - i = GetPixelFormat( hdc ); - ok( i == pf, "GetPixelFormat returned wrong format %d/%d\n", i, pf ); - ReleaseDC( hwnd, hdc ); - DestroyWindow( hwnd ); - } -} - -static void test_sharelists(HDC winhdc) -{ - HGLRC hglrc1, hglrc2, hglrc3; - int res; - - hglrc1 = wglCreateContext(winhdc); - res = wglShareLists(0, 0); - ok(res == FALSE, "Sharing display lists for no contexts passed!\n"); - - /* Test 1: Create a context and just share lists without doing anything special */ - hglrc2 = wglCreateContext(winhdc); - if(hglrc2) - { - res = wglShareLists(hglrc1, hglrc2); - ok(res, "Sharing of display lists failed\n"); - wglDeleteContext(hglrc2); - } - - /* Test 2: Share display lists with a 'destination' context which has been made current */ - hglrc2 = wglCreateContext(winhdc); - if(hglrc2) - { - res = wglMakeCurrent(winhdc, hglrc2); - ok(res, "Make current failed\n"); - res = wglShareLists(hglrc1, hglrc2); - todo_wine ok(res, "Sharing display lists with a destination context which has been made current failed\n"); - wglMakeCurrent(0, 0); - wglDeleteContext(hglrc2); - } - - /* Test 3: Share display lists with a context which already shares display lists with another context. - * According to MSDN the second parameter cannot share any display lists but some buggy drivers might allow it */ - hglrc3 = wglCreateContext(winhdc); - if(hglrc3) - { - res = wglShareLists(hglrc3, hglrc1); - ok(res == FALSE, "Sharing of display lists passed for a context which already shared lists before\n"); - wglDeleteContext(hglrc3); - } - - /* Test 4: Share display lists with a 'source' context which has been made current */ - hglrc2 = wglCreateContext(winhdc); - if(hglrc2) - { - res = wglMakeCurrent(winhdc, hglrc1); - ok(res, "Make current failed\n"); - res = wglShareLists(hglrc1, hglrc2); - ok(res, "Sharing display lists with a source context which has been made current failed\n"); - wglMakeCurrent(0, 0); - wglDeleteContext(hglrc2); - } -} - -static void test_makecurrent(HDC winhdc) -{ - BOOL ret; - HGLRC hglrc; - DWORD error; - - hglrc = wglCreateContext(winhdc); - ok( hglrc != 0, "wglCreateContext failed\n" ); - - ret = wglMakeCurrent( winhdc, hglrc ); - ok( ret, "wglMakeCurrent failed\n" ); - - ok( wglGetCurrentContext() == hglrc, "wrong context\n" ); - - /* set the same context again */ - ret = wglMakeCurrent( winhdc, hglrc ); - ok( ret, "wglMakeCurrent failed\n" ); - - /* check wglMakeCurrent(x, y) after another call to wglMakeCurrent(x, y) */ - ret = wglMakeCurrent( winhdc, NULL ); - ok( ret, "wglMakeCurrent failed\n" ); - - ret = wglMakeCurrent( winhdc, NULL ); - ok( ret, "wglMakeCurrent failed\n" ); - - SetLastError( 0xdeadbeef ); - ret = wglMakeCurrent( NULL, NULL ); - ok( !ret, "wglMakeCurrent succeeded\n" ); - error = GetLastError(); - ok( error == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got error=%x\n", error); - - ret = wglMakeCurrent( winhdc, NULL ); - ok( ret, "wglMakeCurrent failed\n" ); - - ret = wglMakeCurrent( winhdc, hglrc ); - ok( ret, "wglMakeCurrent failed\n" ); - - ret = wglMakeCurrent( NULL, NULL ); - ok( ret, "wglMakeCurrent failed\n" ); - - SetLastError( 0xdeadbeef ); - ret = wglMakeCurrent( NULL, NULL ); - ok( !ret, "wglMakeCurrent succeeded\n" ); - error = GetLastError(); - ok( error == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got error=%x\n", error); - - ret = wglMakeCurrent( winhdc, hglrc ); - ok( ret, "wglMakeCurrent failed\n" ); -} - -static void test_colorbits(HDC hdc) -{ - const int iAttribList[] = { WGL_COLOR_BITS_ARB, WGL_RED_BITS_ARB, WGL_GREEN_BITS_ARB, - WGL_BLUE_BITS_ARB, WGL_ALPHA_BITS_ARB }; - int iAttribRet[sizeof(iAttribList)/sizeof(iAttribList[0])]; - const int iAttribs[] = { WGL_ALPHA_BITS_ARB, 1, 0 }; - unsigned int nFormats; - int res; - int iPixelFormat = 0; - - if (!pwglChoosePixelFormatARB) - { - win_skip("wglChoosePixelFormatARB is not available\n"); - return; - } - - /* We need a pixel format with at least one bit of alpha */ - res = pwglChoosePixelFormatARB(hdc, iAttribs, NULL, 1, &iPixelFormat, &nFormats); - if(res == FALSE || nFormats == 0) - { - skip("No suitable pixel formats found\n"); - return; - } - - res = pwglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0, - sizeof(iAttribList)/sizeof(iAttribList[0]), iAttribList, iAttribRet); - if(res == FALSE) - { - skip("wglGetPixelFormatAttribivARB failed\n"); - return; - } - iAttribRet[1] += iAttribRet[2]+iAttribRet[3]+iAttribRet[4]; - ok(iAttribRet[0] == iAttribRet[1], "WGL_COLOR_BITS_ARB (%d) does not equal R+G+B+A (%d)!\n", - iAttribRet[0], iAttribRet[1]); -} - -static void test_gdi_dbuf(HDC hdc) -{ - const int iAttribList[] = { WGL_SUPPORT_GDI_ARB, WGL_DOUBLE_BUFFER_ARB }; - int iAttribRet[sizeof(iAttribList)/sizeof(iAttribList[0])]; - unsigned int nFormats; - int iPixelFormat; - int res; - - if (!pwglGetPixelFormatAttribivARB) - { - win_skip("wglGetPixelFormatAttribivARB is not available\n"); - return; - } - - nFormats = DescribePixelFormat(hdc, 0, 0, NULL); - for(iPixelFormat = 1;iPixelFormat <= nFormats;iPixelFormat++) - { - res = pwglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0, - sizeof(iAttribList)/sizeof(iAttribList[0]), iAttribList, - iAttribRet); - ok(res!=FALSE, "wglGetPixelFormatAttribivARB failed for pixel format %d\n", iPixelFormat); - if(res == FALSE) - continue; - - ok(!(iAttribRet[0] && iAttribRet[1]), "GDI support and double buffering on pixel format %d\n", iPixelFormat); - } -} - -static void test_acceleration(HDC hdc) -{ - const int iAttribList[] = { WGL_ACCELERATION_ARB }; - int iAttribRet[sizeof(iAttribList)/sizeof(iAttribList[0])]; - unsigned int nFormats; - int iPixelFormat; - int res; - PIXELFORMATDESCRIPTOR pfd; - - if (!pwglGetPixelFormatAttribivARB) - { - win_skip("wglGetPixelFormatAttribivARB is not available\n"); - return; - } - - nFormats = DescribePixelFormat(hdc, 0, 0, NULL); - for(iPixelFormat = 1; iPixelFormat <= nFormats; iPixelFormat++) - { - res = pwglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0, - sizeof(iAttribList)/sizeof(iAttribList[0]), iAttribList, - iAttribRet); - ok(res!=FALSE, "wglGetPixelFormatAttribivARB failed for pixel format %d\n", iPixelFormat); - if(res == FALSE) - continue; - - memset(&pfd, 0, sizeof(PIXELFORMATDESCRIPTOR)); - DescribePixelFormat(hdc, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd); - - switch(iAttribRet[0]) - { - case WGL_NO_ACCELERATION_ARB: - ok( (pfd.dwFlags & (PFD_GENERIC_FORMAT | PFD_GENERIC_ACCELERATED)) == PFD_GENERIC_FORMAT , "Expected only PFD_GENERIC_FORMAT to be set for WGL_NO_ACCELERATION_ARB!: iPixelFormat=%d, dwFlags=%x!\n", iPixelFormat, pfd.dwFlags); - break; - case WGL_GENERIC_ACCELERATION_ARB: - ok( (pfd.dwFlags & (PFD_GENERIC_FORMAT | PFD_GENERIC_ACCELERATED)) == (PFD_GENERIC_FORMAT | PFD_GENERIC_ACCELERATED), "Expected both PFD_GENERIC_FORMAT and PFD_GENERIC_ACCELERATION to be set for WGL_GENERIC_ACCELERATION_ARB: iPixelFormat=%d, dwFlags=%x!\n", iPixelFormat, pfd.dwFlags); - break; - case WGL_FULL_ACCELERATION_ARB: - ok( (pfd.dwFlags & (PFD_GENERIC_FORMAT | PFD_GENERIC_ACCELERATED)) == 0, "Expected no PFD_GENERIC_FORMAT/_ACCELERATION to be set for WGL_FULL_ACCELERATION_ARB: iPixelFormat=%d, dwFlags=%x!\n", iPixelFormat, pfd.dwFlags); - break; - } - } -} - -static void test_bitmap_rendering(void) -{ - PIXELFORMATDESCRIPTOR pfd; - int i, iPixelFormat=0; - unsigned int nFormats; - HGLRC hglrc; - BITMAPINFO biDst; - HBITMAP bmpDst, oldDst; - HDC hdcDst, hdcScreen; - UINT32 *dstBuffer; - - memset(&biDst, 0, sizeof(BITMAPINFO)); - biDst.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - biDst.bmiHeader.biWidth = 2; - biDst.bmiHeader.biHeight = -2; - biDst.bmiHeader.biPlanes = 1; - biDst.bmiHeader.biBitCount = 32; - biDst.bmiHeader.biCompression = BI_RGB; - - hdcScreen = CreateCompatibleDC(0); - if(GetDeviceCaps(hdcScreen, BITSPIXEL) != 32) - { - DeleteDC(hdcScreen); - trace("Skipping bitmap rendering test\n"); - return; - } - - hdcDst = CreateCompatibleDC(hdcScreen); - bmpDst = CreateDIBSection(hdcDst, &biDst, DIB_RGB_COLORS, (void**)&dstBuffer, NULL, 0); - oldDst = SelectObject(hdcDst, bmpDst); - - /* Pick a pixel format by hand because ChoosePixelFormat is unreliable */ - nFormats = DescribePixelFormat(hdcDst, 0, 0, NULL); - for(i=1; i<=nFormats; i++) - { - memset(&pfd, 0, sizeof(PIXELFORMATDESCRIPTOR)); - DescribePixelFormat(hdcDst, i, sizeof(PIXELFORMATDESCRIPTOR), &pfd); - - if((pfd.dwFlags & PFD_DRAW_TO_BITMAP) && - (pfd.dwFlags & PFD_SUPPORT_OPENGL) && - (pfd.cColorBits == 32) && - (pfd.cAlphaBits == 8) ) - { - iPixelFormat = i; - break; - } - } - - if(!iPixelFormat) - { - skip("Unable to find a suitable pixel format\n"); - } - else - { - SetPixelFormat(hdcDst, iPixelFormat, &pfd); - hglrc = wglCreateContext(hdcDst); - todo_wine ok(hglrc != NULL, "Unable to create a context\n"); - - if(hglrc) - { - wglMakeCurrent(hdcDst, hglrc); - - /* Note this is RGBA but we read ARGB back */ - glClearColor((float)0x22/0xff, (float)0x33/0xff, (float)0x44/0xff, (float)0x11/0xff); - glClear(GL_COLOR_BUFFER_BIT); - glFinish(); - - /* Note apparently the alpha channel is not supported by the software renderer (bitmap only works using software) */ - ok(dstBuffer[0] == 0x223344, "Expected color=0x223344, received color=%x\n", dstBuffer[0]); - - wglMakeCurrent(NULL, NULL); - wglDeleteContext(hglrc); - } - } - - SelectObject(hdcDst, oldDst); - DeleteObject(bmpDst); - DeleteDC(hdcDst); - - DeleteDC(hdcScreen); -} - -struct wgl_thread_param -{ - HANDLE test_finished; - HGLRC hglrc; - BOOL hglrc_deleted; -}; - -static DWORD WINAPI wgl_thread(void *param) -{ - struct wgl_thread_param *p = param; - - p->hglrc_deleted = wglDeleteContext(p->hglrc); - SetEvent(p->test_finished); - - return 0; -} - -static void test_deletecontext(HDC hdc) -{ - struct wgl_thread_param thread_params; - HGLRC hglrc = wglCreateContext(hdc); - HANDLE thread_handle; - DWORD res, tid; - - if(!hglrc) - { - skip("wglCreateContext failed!\n"); - return; - } - - res = wglMakeCurrent(hdc, hglrc); - if(!res) - { - skip("wglMakeCurrent failed!\n"); - return; - } - - /* WGL doesn't allow you to delete a context from a different thread than the one in which it is current. - * This differs from GLX which does allow it but it delays actual deletion until the context becomes not current. - */ - thread_params.hglrc = hglrc; - thread_params.test_finished = CreateEvent(NULL, FALSE, FALSE, NULL); - thread_handle = CreateThread(NULL, 0, wgl_thread, &thread_params, 0, &tid); - ok(!!thread_handle, "Failed to create thread, last error %#x.\n", GetLastError()); - if(thread_handle) - { - WaitForSingleObject(thread_handle, INFINITE); - ok(thread_params.hglrc_deleted == FALSE, "Attempt to delete WGL context from another thread passed but should fail!\n"); - } - CloseHandle(thread_params.test_finished); - - res = wglDeleteContext(hglrc); - ok(res == TRUE, "wglDeleteContext failed\n"); - - /* WGL makes a context not current when deleting it. This differs from GLX behavior where - * deletion takes place when the thread becomes not current. */ - hglrc = wglGetCurrentContext(); - ok(hglrc == NULL, "A WGL context is active while none was expected\n"); -} - -static void test_make_current_read(HDC hdc) -{ - int res; - HDC hread; - HGLRC hglrc = wglCreateContext(hdc); - - if(!hglrc) - { - skip("wglCreateContext failed!\n"); - return; - } - - res = wglMakeCurrent(hdc, hglrc); - if(!res) - { - skip("wglMakeCurrent failed!\n"); - return; - } - - /* Test what wglGetCurrentReadDCARB does for wglMakeCurrent as the spec doesn't mention it */ - hread = pwglGetCurrentReadDCARB(); - trace("hread %p, hdc %p\n", hread, hdc); - ok(hread == hdc, "wglGetCurrentReadDCARB failed for standard wglMakeCurrent\n"); - - pwglMakeContextCurrentARB(hdc, hdc, hglrc); - hread = pwglGetCurrentReadDCARB(); - ok(hread == hdc, "wglGetCurrentReadDCARB failed for wglMakeContextCurrent\n"); -} - -static void test_dc(HWND hwnd, HDC hdc) -{ - int pf1, pf2; - HDC hdc2; - - /* Get another DC and make sure it has the same pixel format */ - hdc2 = GetDC(hwnd); - if(hdc != hdc2) - { - pf1 = GetPixelFormat(hdc); - pf2 = GetPixelFormat(hdc2); - ok(pf1 == pf2, "Second DC does not have the same format (%d != %d)\n", pf1, pf2); - } - else - skip("Could not get a different DC for the window\n"); - - if(hdc2) - { - ReleaseDC(hwnd, hdc2); - hdc2 = NULL; - } -} - -/* Nvidia converts win32 error codes to (0xc007 << 16) | win32_error_code */ -#define NVIDIA_HRESULT_FROM_WIN32(x) (HRESULT_FROM_WIN32(x) | 0x40000000) -static void test_opengl3(HDC hdc) -{ - /* Try to create a context compatible with OpenGL 1.x; 1.0-2.1 is allowed */ - { - HGLRC gl3Ctx; - int attribs[] = {WGL_CONTEXT_MAJOR_VERSION_ARB, 1, 0}; - - gl3Ctx = pwglCreateContextAttribsARB(hdc, 0, attribs); - ok(gl3Ctx != 0, "pwglCreateContextAttribsARB for a 1.x context failed!\n"); - wglDeleteContext(gl3Ctx); - } - - /* Try to pass an invalid HDC */ - { - HGLRC gl3Ctx; - DWORD error; - gl3Ctx = pwglCreateContextAttribsARB((HDC)0xdeadbeef, 0, 0); - ok(gl3Ctx == 0, "pwglCreateContextAttribsARB using an invalid HDC passed\n"); - error = GetLastError(); - todo_wine ok(error == ERROR_DC_NOT_FOUND || - broken(error == NVIDIA_HRESULT_FROM_WIN32(ERROR_INVALID_DATA)), /* Nvidia Vista + Win7 */ - "Expected ERROR_DC_NOT_FOUND, got error=%x\n", error); - wglDeleteContext(gl3Ctx); - } - - /* Try to pass an invalid shareList */ - { - HGLRC gl3Ctx; - DWORD error; - gl3Ctx = pwglCreateContextAttribsARB(hdc, (HGLRC)0xdeadbeef, 0); - todo_wine ok(gl3Ctx == 0, "pwglCreateContextAttribsARB using an invalid shareList passed\n"); - error = GetLastError(); - /* The Nvidia implementation seems to return hresults instead of win32 error codes */ - todo_wine ok(error == ERROR_INVALID_OPERATION || - error == NVIDIA_HRESULT_FROM_WIN32(ERROR_INVALID_OPERATION), "Expected ERROR_INVALID_OPERATION, got error=%x\n", error); - wglDeleteContext(gl3Ctx); - } - - /* Try to create an OpenGL 3.0 context */ - { - int attribs[] = {WGL_CONTEXT_MAJOR_VERSION_ARB, 3, WGL_CONTEXT_MINOR_VERSION_ARB, 0, 0}; - HGLRC gl3Ctx = pwglCreateContextAttribsARB(hdc, 0, attribs); - - if(gl3Ctx == NULL) - { - skip("Skipping the rest of the WGL_ARB_create_context test due to lack of OpenGL 3.0\n"); - return; - } - - wglDeleteContext(gl3Ctx); - } - - /* Test matching an OpenGL 3.0 context with an older one, OpenGL 3.0 should allow it until the new object model is introduced in a future revision */ - { - HGLRC glCtx = wglCreateContext(hdc); - - int attribs[] = {WGL_CONTEXT_MAJOR_VERSION_ARB, 3, WGL_CONTEXT_MINOR_VERSION_ARB, 0, 0}; - int attribs_future[] = {WGL_CONTEXT_FLAGS_ARB, WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB, WGL_CONTEXT_MAJOR_VERSION_ARB, 3, WGL_CONTEXT_MINOR_VERSION_ARB, 0, 0}; - - HGLRC gl3Ctx = pwglCreateContextAttribsARB(hdc, glCtx, attribs); - ok(gl3Ctx != NULL, "Sharing of a display list between OpenGL 3.0 and OpenGL 1.x/2.x failed!\n"); - if(gl3Ctx) - wglDeleteContext(gl3Ctx); - - gl3Ctx = pwglCreateContextAttribsARB(hdc, glCtx, attribs_future); - ok(gl3Ctx != NULL, "Sharing of a display list between a forward compatible OpenGL 3.0 context and OpenGL 1.x/2.x failed!\n"); - if(gl3Ctx) - wglDeleteContext(gl3Ctx); - - if(glCtx) - wglDeleteContext(glCtx); - } - - /* Try to create an OpenGL 3.0 context and test windowless rendering */ - { - HGLRC gl3Ctx; - int attribs[] = {WGL_CONTEXT_MAJOR_VERSION_ARB, 3, WGL_CONTEXT_MINOR_VERSION_ARB, 0, 0}; - BOOL res; - - gl3Ctx = pwglCreateContextAttribsARB(hdc, 0, attribs); - ok(gl3Ctx != 0, "pwglCreateContextAttribsARB for a 3.0 context failed!\n"); - - /* OpenGL 3.0 allows offscreen rendering WITHOUT a drawable - * Neither AMD or Nvidia support it at this point. The WGL_ARB_create_context specs also say that - * it is hard because drivers use the HDC to enter the display driver and it sounds like they don't - * expect drivers to ever offer it. - */ - res = wglMakeCurrent(0, gl3Ctx); - ok(res == FALSE, "Wow, OpenGL 3.0 windowless rendering passed while it was expected not to!\n"); - if(res) - wglMakeCurrent(0, 0); - - if(gl3Ctx) - wglDeleteContext(gl3Ctx); - } -} - -static void test_minimized(void) -{ - PIXELFORMATDESCRIPTOR pf_desc = - { - sizeof(PIXELFORMATDESCRIPTOR), - 1, /* version */ - PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER, - PFD_TYPE_RGBA, - 24, /* 24-bit color depth */ - 0, 0, 0, 0, 0, 0, /* color bits */ - 0, /* alpha buffer */ - 0, /* shift bit */ - 0, /* accumulation buffer */ - 0, 0, 0, 0, /* accum bits */ - 32, /* z-buffer */ - 0, /* stencil buffer */ - 0, /* auxiliary buffer */ - PFD_MAIN_PLANE, /* main layer */ - 0, /* reserved */ - 0, 0, 0 /* layer masks */ - }; - int pixel_format; - HWND window; - LONG style; - HGLRC ctx; - BOOL ret; - HDC dc; - - window = CreateWindowA("static", "opengl32_test", - WS_POPUP | WS_MINIMIZE, 0, 0, 640, 480, 0, 0, 0, 0); - ok(!!window, "Failed to create window, last error %#x.\n", GetLastError()); - - dc = GetDC(window); - ok(!!dc, "Failed to get DC.\n"); - - pixel_format = ChoosePixelFormat(dc, &pf_desc); - if (!pixel_format) - { - win_skip("Failed to find pixel format.\n"); - ReleaseDC(window, dc); - DestroyWindow(window); - return; - } - - ret = SetPixelFormat(dc, pixel_format, &pf_desc); - ok(ret, "Failed to set pixel format, last error %#x.\n", GetLastError()); - - style = GetWindowLongA(window, GWL_STYLE); - ok(style & WS_MINIMIZE, "Window should be minimized, got style %#x.\n", style); - - ctx = wglCreateContext(dc); - ok(!!ctx, "Failed to create GL context, last error %#x.\n", GetLastError()); - - ret = wglMakeCurrent(dc, ctx); - ok(ret, "Failed to make context current, last error %#x.\n", GetLastError()); - - style = GetWindowLongA(window, GWL_STYLE); - ok(style & WS_MINIMIZE, "window should be minimized, got style %#x.\n", style); - - ret = wglMakeCurrent(NULL, NULL); - ok(ret, "Failed to clear current context, last error %#x.\n", GetLastError()); - - ret = wglDeleteContext(ctx); - ok(ret, "Failed to delete GL context, last error %#x.\n", GetLastError()); - - ReleaseDC(window, dc); - DestroyWindow(window); -} - -START_TEST(opengl) -{ - HWND hwnd; - PIXELFORMATDESCRIPTOR pfd = { - sizeof(PIXELFORMATDESCRIPTOR), - 1, /* version */ - PFD_DRAW_TO_WINDOW | - PFD_SUPPORT_OPENGL | - PFD_DOUBLEBUFFER, - PFD_TYPE_RGBA, - 24, /* 24-bit color depth */ - 0, 0, 0, 0, 0, 0, /* color bits */ - 0, /* alpha buffer */ - 0, /* shift bit */ - 0, /* accumulation buffer */ - 0, 0, 0, 0, /* accum bits */ - 32, /* z-buffer */ - 0, /* stencil buffer */ - 0, /* auxiliary buffer */ - PFD_MAIN_PLANE, /* main layer */ - 0, /* reserved */ - 0, 0, 0 /* layer masks */ - }; - - hwnd = CreateWindow("static", "Title", WS_OVERLAPPEDWINDOW, - 10, 10, 200, 200, NULL, NULL, NULL, NULL); - ok(hwnd != NULL, "err: %d\n", GetLastError()); - if (hwnd) - { - HDC hdc; - int iPixelFormat, res; - HGLRC hglrc; - DWORD error; - ShowWindow(hwnd, SW_SHOW); - - hdc = GetDC(hwnd); - - iPixelFormat = ChoosePixelFormat(hdc, &pfd); - if(iPixelFormat == 0) - { - /* This should never happen as ChoosePixelFormat always returns a closest match, but currently this fails in Wine if we don't have glX */ - win_skip("Unable to find pixel format.\n"); - goto cleanup; - } - - /* We shouldn't be able to create a context from a hdc which doesn't have a pixel format set */ - hglrc = wglCreateContext(hdc); - ok(hglrc == NULL, "wglCreateContext should fail when no pixel format has been set, but it passed\n"); - error = GetLastError(); - ok(error == ERROR_INVALID_PIXEL_FORMAT, "expected ERROR_INVALID_PIXEL_FORMAT for wglCreateContext without a pixelformat set, but received %#x\n", error); - - res = SetPixelFormat(hdc, iPixelFormat, &pfd); - ok(res, "SetPixelformat failed: %x\n", GetLastError()); - - test_bitmap_rendering(); - test_minimized(); - test_dc(hwnd, hdc); - - hglrc = wglCreateContext(hdc); - res = wglMakeCurrent(hdc, hglrc); - ok(res, "wglMakeCurrent failed!\n"); - if(res) - { - trace("OpenGL renderer: %s\n", glGetString(GL_RENDERER)); - trace("OpenGL driver version: %s\n", glGetString(GL_VERSION)); - trace("OpenGL vendor: %s\n", glGetString(GL_VENDOR)); - } - else - { - skip("Skipping OpenGL tests without a current context\n"); - return; - } - - /* Initialisation of WGL functions depends on an implicit WGL context. For this reason we can't load them before making - * any WGL call :( On Wine this would work but not on real Windows because there can be different implementations (software, ICD, MCD). - */ - init_functions(); - /* The lack of wglGetExtensionsStringARB in general means broken software rendering or the lack of decent OpenGL support, skip tests in such cases */ - if (!pwglGetExtensionsStringARB) - { - win_skip("wglGetExtensionsStringARB is not available\n"); - return; - } - - test_deletecontext(hdc); - test_makecurrent(hdc); - test_setpixelformat(hdc); - test_sharelists(hdc); - test_colorbits(hdc); - test_gdi_dbuf(hdc); - test_acceleration(hdc); - - wgl_extensions = pwglGetExtensionsStringARB(hdc); - if(wgl_extensions == NULL) skip("Skipping opengl32 tests because this OpenGL implementation doesn't support WGL extensions!\n"); - - if(strstr(wgl_extensions, "WGL_ARB_create_context")) - test_opengl3(hdc); - - if(strstr(wgl_extensions, "WGL_ARB_make_current_read")) - test_make_current_read(hdc); - else - skip("WGL_ARB_make_current_read not supported, skipping test\n"); - - if(strstr(wgl_extensions, "WGL_ARB_pbuffer")) - test_pbuffers(hdc); - else - skip("WGL_ARB_pbuffer not supported, skipping pbuffer test\n"); - -cleanup: - ReleaseDC(hwnd, hdc); - DestroyWindow(hwnd); - } -} diff --git a/rostests/winetests/opengl32/opengl32.rbuild b/rostests/winetests/opengl32/opengl32.rbuild deleted file mode 100644 index d6b67d3860a..00000000000 --- a/rostests/winetests/opengl32/opengl32.rbuild +++ /dev/null @@ -1,15 +0,0 @@ - - - - - -Wno-format - - . - wine - opengl32 - gdi32 - user32 - opengl.c - testlist.c - - diff --git a/rostests/winetests/opengl32/testlist.c b/rostests/winetests/opengl32/testlist.c deleted file mode 100644 index fcbbe172aa0..00000000000 --- a/rostests/winetests/opengl32/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_opengl(void); - -const struct test winetest_testlist[] = -{ - { "opengl", func_opengl }, - { 0, 0 } -}; diff --git a/rostests/winetests/pdh/CMakeLists.txt b/rostests/winetests/pdh/CMakeLists.txt deleted file mode 100644 index 1825834d6ca..00000000000 --- a/rostests/winetests/pdh/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(pdh_winetest pdh.c testlist.c) -target_link_libraries(pdh_winetest wine) -set_module_type(pdh_winetest win32cui) -add_importlibs(pdh_winetest pdh msvcrt kernel32 ntdll) -add_cd_file(TARGET pdh_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/pdh/pdh.c b/rostests/winetests/pdh/pdh.c deleted file mode 100644 index 094ad74f14b..00000000000 --- a/rostests/winetests/pdh/pdh.c +++ /dev/null @@ -1,1001 +0,0 @@ -/* - * Tests for pdh.dll (Performance Data Helper) - * - * Copyright 2007 Hans Leidekker - * - * 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 "windows.h" - -#include "pdh.h" -#include "pdhmsg.h" - -#include "wine/test.h" - -static HMODULE pdh; - -static PDH_STATUS (WINAPI *pPdhAddEnglishCounterA)(PDH_HQUERY, LPCSTR, DWORD_PTR, PDH_HCOUNTER *); -static PDH_STATUS (WINAPI *pPdhAddEnglishCounterW)(PDH_HQUERY, LPCWSTR, DWORD_PTR, PDH_HCOUNTER *); -static PDH_STATUS (WINAPI *pPdhCollectQueryDataWithTime)(PDH_HQUERY, LONGLONG *); -static PDH_STATUS (WINAPI *pPdhValidatePathExA)(PDH_HLOG, LPCSTR); -static PDH_STATUS (WINAPI *pPdhValidatePathExW)(PDH_HLOG, LPCWSTR); - -#define GETFUNCPTR(func) p##func = (void *)GetProcAddress( pdh, #func ); - -static void init_function_ptrs( void ) -{ - pdh = GetModuleHandle( "pdh" ); - GETFUNCPTR( PdhAddEnglishCounterA ) - GETFUNCPTR( PdhAddEnglishCounterW ) - GETFUNCPTR( PdhCollectQueryDataWithTime ) - GETFUNCPTR( PdhValidatePathExA ) - GETFUNCPTR( PdhValidatePathExW ) -} - -static const WCHAR processor_time[] = - {'%',' ','P','r','o','c','e','s','s','o','r',' ','T','i','m','e',0}; -static const WCHAR uptime[] = - {'S','y','s','t','e','m',' ','U','p',' ','T','i','m','e',0}; - -static const WCHAR system_uptime[] = - {'\\','S','y','s','t','e','m','\\','S','y','s','t','e','m',' ','U','p',' ','T','i','m','e',0}; -static const WCHAR system_downtime[] = /* does not exist */ - {'\\','S','y','s','t','e','m','\\','S','y','s','t','e','m',' ','D','o','w','n',' ','T','i','m','e',0}; -static const WCHAR percentage_processor_time[] = - {'\\','P','r','o','c','e','s','s','o','r','(','_','T','o','t','a','l',')', - '\\','%',' ','P','r','o','c','e','s','s','o','r',' ','T','i','m','e',0}; - -static void test_PdhOpenQueryA( void ) -{ - PDH_STATUS ret; - PDH_HQUERY query; - - ret = PdhOpenQueryA( NULL, 0, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhOpenQueryA failed 0x%08x\n", ret); - - ret = PdhOpenQueryA( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08x\n", ret); - - ret = PdhCloseQuery( NULL ); - ok(ret == PDH_INVALID_HANDLE, "PdhCloseQuery failed 0x%08x\n", ret); - - ret = PdhCloseQuery( &query ); - ok(ret == PDH_INVALID_HANDLE, "PdhCloseQuery failed 0x%08x\n", ret); - - ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); - - ret = PdhCloseQuery( query ); - ok(ret == PDH_INVALID_HANDLE, "PdhCloseQuery failed 0x%08x\n", ret); -} - -static void test_PdhOpenQueryW( void ) -{ - PDH_STATUS ret; - PDH_HQUERY query; - - ret = PdhOpenQueryW( NULL, 0, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhOpenQueryW failed 0x%08x\n", ret); - - ret = PdhOpenQueryW( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryW failed 0x%08x\n", ret); - - ret = PdhCloseQuery( NULL ); - ok(ret == PDH_INVALID_HANDLE, "PdhCloseQuery failed 0x%08x\n", ret); - - ret = PdhCloseQuery( &query ); - ok(ret == PDH_INVALID_HANDLE, "PdhCloseQuery failed 0x%08x\n", ret); - - ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); - - ret = PdhCloseQuery( query ); - ok(ret == PDH_INVALID_HANDLE, "PdhCloseQuery failed 0x%08x\n", ret); -} - -static void test_PdhAddCounterA( void ) -{ - PDH_STATUS ret; - PDH_HQUERY query; - PDH_HCOUNTER counter; - - ret = PdhOpenQueryA( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08x\n", ret); - - ret = PdhAddCounterA( NULL, "\\System\\System Up Time", 0, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddCounterA failed 0x%08x\n", ret); - - ret = PdhAddCounterA( NULL, "\\System\\System Up Time", 0, &counter ); - ok(ret == PDH_INVALID_HANDLE, "PdhAddCounterA failed 0x%08x\n", ret); - - ret = PdhAddCounterA( query, NULL, 0, &counter ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddCounterA failed 0x%08x\n", ret); - - ret = PdhAddCounterA( query, "\\System\\System Up Time", 0, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddCounterA failed 0x%08x\n", ret); - - ret = PdhAddCounterA( query, "\\System\\System Down Time", 0, &counter ); - ok(ret == PDH_CSTATUS_NO_COUNTER, "PdhAddCounterA failed 0x%08x\n", ret); - ok(!counter, "PdhAddCounterA failed %p\n", counter); - - ret = PdhAddCounterA( query, "\\System\\System Up Time", 0, &counter ); - ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08x\n", ret); - - ret = PdhCollectQueryData( NULL ); - ok(ret == PDH_INVALID_HANDLE, "PdhCollectQueryData failed 0x%08x\n", ret); - - ret = PdhCollectQueryData( counter ); - ok(ret == PDH_INVALID_HANDLE, "PdhCollectQueryData failed 0x%08x\n", ret); - - ret = PdhCollectQueryData( query ); - ok(ret == ERROR_SUCCESS, "PdhCollectQueryData failed 0x%08x\n", ret); - - ret = PdhRemoveCounter( NULL ); - ok(ret == PDH_INVALID_HANDLE, "PdhRemoveCounter failed 0x%08x\n", ret); - - ret = PdhRemoveCounter( counter ); - ok(ret == ERROR_SUCCESS, "PdhRemoveCounter failed 0x%08x\n", ret); - - ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); -} - -static void test_PdhAddCounterW( void ) -{ - PDH_STATUS ret; - PDH_HQUERY query; - PDH_HCOUNTER counter; - - ret = PdhOpenQueryW( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryW failed 0x%08x\n", ret); - - ret = PdhAddCounterW( NULL, percentage_processor_time, 0, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddCounterW failed 0x%08x\n", ret); - - ret = PdhAddCounterW( NULL, percentage_processor_time, 0, &counter ); - ok(ret == PDH_INVALID_HANDLE, "PdhAddCounterW failed 0x%08x\n", ret); - - ret = PdhAddCounterW( query, NULL, 0, &counter ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddCounterW failed 0x%08x\n", ret); - - ret = PdhAddCounterW( query, percentage_processor_time, 0, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddCounterW failed 0x%08x\n", ret); - - ret = PdhAddCounterW( query, system_downtime, 0, &counter ); - ok(ret == PDH_CSTATUS_NO_COUNTER, "PdhAddCounterW failed 0x%08x\n", ret); - ok(!counter, "PdhAddCounterW failed %p\n", counter); - - ret = PdhAddCounterW( query, percentage_processor_time, 0, &counter ); - ok(ret == ERROR_SUCCESS, "PdhAddCounterW failed 0x%08x\n", ret); - - ret = PdhCollectQueryData( NULL ); - ok(ret == PDH_INVALID_HANDLE, "PdhCollectQueryData failed 0x%08x\n", ret); - - ret = PdhCollectQueryData( counter ); - ok(ret == PDH_INVALID_HANDLE, "PdhCollectQueryData failed 0x%08x\n", ret); - - ret = PdhCollectQueryData( query ); - ok(ret == ERROR_SUCCESS, "PdhCollectQueryData failed 0x%08x\n", ret); - - ret = PdhRemoveCounter( NULL ); - ok(ret == PDH_INVALID_HANDLE, "PdhRemoveCounter failed 0x%08x\n", ret); - - ret = PdhRemoveCounter( counter ); - ok(ret == ERROR_SUCCESS, "PdhRemoveCounter failed 0x%08x\n", ret); - - ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); -} - -static void test_PdhAddEnglishCounterA( void ) -{ - PDH_STATUS ret; - PDH_HQUERY query; - PDH_HCOUNTER counter; - - ret = PdhOpenQueryA( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08x\n", ret); - - ret = PdhCollectQueryData( query ); - ok(ret == PDH_NO_DATA, "PdhCollectQueryData failed 0x%08x\n", ret); - - ret = pPdhAddEnglishCounterA( NULL, "\\System\\System Up Time", 0, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterA failed 0x%08x\n", ret); - - ret = pPdhAddEnglishCounterA( NULL, "\\System\\System Up Time", 0, &counter ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterA failed 0x%08x\n", ret); - - ret = pPdhAddEnglishCounterA( query, NULL, 0, &counter ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterA failed 0x%08x\n", ret); - - ret = pPdhAddEnglishCounterA( query, "\\System\\System Up Time", 0, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterA failed 0x%08x\n", ret); - - ret = pPdhAddEnglishCounterA( query, "\\System\\System Down Time", 0, &counter ); - ok(ret == PDH_CSTATUS_NO_COUNTER, "PdhAddEnglishCounterA failed 0x%08x\n", ret); - ok(!counter, "PdhAddEnglishCounterA failed %p\n", counter); - - ret = pPdhAddEnglishCounterA( query, "\\System\\System Up Time", 0, &counter ); - ok(ret == ERROR_SUCCESS, "PdhAddEnglishCounterA failed 0x%08x\n", ret); - - ret = PdhCollectQueryData( query ); - ok(ret == ERROR_SUCCESS, "PdhCollectQueryData failed 0x%08x\n", ret); - - ret = PdhRemoveCounter( counter ); - ok(ret == ERROR_SUCCESS, "PdhRemoveCounter failed 0x%08x\n", ret); - - ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); -} - -static void test_PdhAddEnglishCounterW( void ) -{ - PDH_STATUS ret; - PDH_HQUERY query; - PDH_HCOUNTER counter; - - ret = PdhOpenQueryW( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryW failed 0x%08x\n", ret); - - ret = PdhCollectQueryData( query ); - ok(ret == PDH_NO_DATA, "PdhCollectQueryData failed 0x%08x\n", ret); - - ret = pPdhAddEnglishCounterW( NULL, system_uptime, 0, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterW failed 0x%08x\n", ret); - - ret = pPdhAddEnglishCounterW( NULL, system_uptime, 0, &counter ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterW failed 0x%08x\n", ret); - - ret = pPdhAddEnglishCounterW( query, NULL, 0, &counter ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterW failed 0x%08x\n", ret); - - ret = pPdhAddEnglishCounterW( query, system_uptime, 0, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterW failed 0x%08x\n", ret); - - ret = pPdhAddEnglishCounterW( query, system_downtime, 0, &counter ); - ok(ret == PDH_CSTATUS_NO_COUNTER, "PdhAddEnglishCounterW failed 0x%08x\n", ret); - ok(!counter, "PdhAddEnglishCounterA failed %p\n", counter); - - ret = pPdhAddEnglishCounterW( query, system_uptime, 0, &counter ); - ok(ret == ERROR_SUCCESS, "PdhAddEnglishCounterW failed 0x%08x\n", ret); - - ret = PdhCollectQueryData( query ); - ok(ret == ERROR_SUCCESS, "PdhCollectQueryData failed 0x%08x\n", ret); - - ret = PdhRemoveCounter( counter ); - ok(ret == ERROR_SUCCESS, "PdhRemoveCounter failed 0x%08x\n", ret); - - ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); -} - -static void test_PdhCollectQueryDataWithTime( void ) -{ - PDH_STATUS ret; - PDH_HQUERY query; - PDH_HCOUNTER counter; - LONGLONG time; - - ret = PdhOpenQueryA( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08x\n", ret); - - ret = PdhCollectQueryData( query ); - ok(ret == PDH_NO_DATA, "PdhCollectQueryData failed 0x%08x\n", ret); - - ret = PdhAddCounterA( query, "\\System\\System Up Time", 0, &counter ); - ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08x\n", ret); - - ret = pPdhCollectQueryDataWithTime( NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhCollectQueryDataWithTime failed 0x%08x\n", ret); - - ret = pPdhCollectQueryDataWithTime( query, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhCollectQueryDataWithTime failed 0x%08x\n", ret); - - ret = pPdhCollectQueryDataWithTime( NULL, &time ); - ok(ret == PDH_INVALID_HANDLE, "PdhCollectQueryDataWithTime failed 0x%08x\n", ret); - - ret = pPdhCollectQueryDataWithTime( query, &time ); - ok(ret == ERROR_SUCCESS, "PdhCollectQueryDataWithTime failed 0x%08x\n", ret); - - ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); -} - -static void test_PdhGetFormattedCounterValue( void ) -{ - PDH_STATUS ret; - PDH_HQUERY query; - PDH_HCOUNTER counter; - PDH_FMT_COUNTERVALUE value; - - ret = PdhOpenQueryA( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08x\n", ret); - - ret = PdhAddCounterA( query, "\\System\\System Up Time", 0, &counter ); - ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08x\n", ret); - - ret = PdhGetFormattedCounterValue( NULL, PDH_FMT_LARGE, NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); - - ret = PdhGetFormattedCounterValue( NULL, PDH_FMT_LARGE, NULL, &value ); - ok(ret == PDH_INVALID_HANDLE, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); - - ret = PdhGetFormattedCounterValue( counter, PDH_FMT_LARGE, NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); - - ret = PdhGetFormattedCounterValue( counter, PDH_FMT_LARGE, NULL, &value ); - ok(ret == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); - - ret = PdhCollectQueryData( query ); - ok(ret == ERROR_SUCCESS, "PdhCollectQueryData failed 0x%08x\n", ret); - - ret = PdhGetFormattedCounterValue( counter, PDH_FMT_LARGE, NULL, &value ); - ok(ret == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); - - ret = PdhGetFormattedCounterValue( counter, PDH_FMT_LARGE | PDH_FMT_NOSCALE, NULL, &value ); - ok(ret == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); - - ret = PdhGetFormattedCounterValue( counter, PDH_FMT_LARGE | PDH_FMT_NOCAP100, NULL, &value ); - ok(ret == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); - - ret = PdhGetFormattedCounterValue( counter, PDH_FMT_LARGE | PDH_FMT_1000, NULL, &value ); - ok(ret == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); - - ret = PdhSetCounterScaleFactor( counter, 2 ); - ok(ret == ERROR_SUCCESS, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); - - ret = PdhGetFormattedCounterValue( counter, PDH_FMT_LARGE, NULL, &value ); - ok(ret == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); - - ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); -} - -static void test_PdhGetRawCounterValue( void ) -{ - PDH_STATUS ret; - PDH_HQUERY query; - PDH_HCOUNTER counter; - PDH_RAW_COUNTER value; - - ret = PdhOpenQueryA( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08x\n", ret); - - ret = PdhAddCounterA( query, "\\System\\System Up Time", 0, &counter ); - ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08x\n", ret); - - ret = PdhGetRawCounterValue( NULL, NULL, &value ); - ok(ret == PDH_INVALID_HANDLE, "PdhGetRawCounterValue failed 0x%08x\n", ret); - - ret = PdhGetRawCounterValue( counter, NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhGetRawCounterValue failed 0x%08x\n", ret); - - ret = PdhGetRawCounterValue( counter, NULL, &value ); - ok(ret == ERROR_SUCCESS, "PdhGetRawCounterValue failed 0x%08x\n", ret); - ok(value.CStatus == ERROR_SUCCESS, "expected ERROR_SUCCESS got %x\n", value.CStatus); - - ret = PdhCollectQueryData( query ); - ok(ret == ERROR_SUCCESS, "PdhCollectQueryData failed 0x%08x\n", ret); - - ret = PdhGetRawCounterValue( counter, NULL, &value ); - ok(ret == ERROR_SUCCESS, "PdhGetRawCounterValue failed 0x%08x\n", ret); - ok(value.CStatus == ERROR_SUCCESS, "expected ERROR_SUCCESS got %x\n", value.CStatus); - - ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); -} - -static void test_PdhSetCounterScaleFactor( void ) -{ - PDH_STATUS ret; - PDH_HQUERY query; - PDH_HCOUNTER counter; - - ret = PdhOpenQueryA( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08x\n", ret); - - ret = PdhAddCounterA( query, "\\System\\System Up Time", 0, &counter ); - ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08x\n", ret); - - ret = PdhSetCounterScaleFactor( NULL, 8 ); - ok(ret == PDH_INVALID_HANDLE, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); - - ret = PdhSetCounterScaleFactor( NULL, 1 ); - ok(ret == PDH_INVALID_HANDLE, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); - - ret = PdhSetCounterScaleFactor( counter, 8 ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); - - ret = PdhSetCounterScaleFactor( counter, -8 ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); - - ret = PdhSetCounterScaleFactor( counter, 7 ); - ok(ret == ERROR_SUCCESS, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); - - ret = PdhSetCounterScaleFactor( counter, 0 ); - ok(ret == ERROR_SUCCESS, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); - - ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); -} - -static void test_PdhGetCounterTimeBase( void ) -{ - PDH_STATUS ret; - PDH_HQUERY query; - PDH_HCOUNTER counter; - LONGLONG base; - - ret = PdhOpenQueryA( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08x\n", ret); - - ret = PdhAddCounterA( query, "\\System\\System Up Time", 0, &counter ); - ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08x\n", ret); - - ret = PdhGetCounterTimeBase( NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhGetCounterTimeBase failed 0x%08x\n", ret); - - ret = PdhGetCounterTimeBase( NULL, &base ); - ok(ret == PDH_INVALID_HANDLE, "PdhGetCounterTimeBase failed 0x%08x\n", ret); - - ret = PdhGetCounterTimeBase( counter, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhGetCounterTimeBase failed 0x%08x\n", ret); - - ret = PdhGetCounterTimeBase( counter, &base ); - ok(ret == ERROR_SUCCESS, "PdhGetCounterTimeBase failed 0x%08x\n", ret); - - ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); -} - -static void test_PdhGetCounterInfoA( void ) -{ - PDH_STATUS ret; - PDH_HQUERY query; - PDH_HCOUNTER counter; - PDH_COUNTER_INFO_A info; - DWORD size; - - ret = PdhOpenQueryA( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08x\n", ret); - - ret = PdhAddCounterA( query, "\\System\\System Up Time", 0, &counter ); - ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08x\n", ret); - - ret = PdhGetCounterInfoA( NULL, 0, NULL, NULL ); - ok(ret == PDH_INVALID_HANDLE || ret == PDH_INVALID_ARGUMENT, "PdhGetCounterInfoA failed 0x%08x\n", ret); - - ret = PdhGetCounterInfoA( counter, 0, NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhGetCounterInfoA failed 0x%08x\n", ret); - - ret = PdhGetCounterInfoA( counter, 0, NULL, &info ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhGetCounterInfoA failed 0x%08x\n", ret); - - size = sizeof(info) - 1; - ret = PdhGetCounterInfoA( counter, 0, &size, NULL ); - ok(ret == PDH_MORE_DATA || ret == PDH_INVALID_ARGUMENT, "PdhGetCounterInfoA failed 0x%08x\n", ret); - - size = sizeof(info); - ret = PdhGetCounterInfoA( counter, 0, &size, &info ); - ok(ret == ERROR_SUCCESS, "PdhGetCounterInfoA failed 0x%08x\n", ret); - ok(size == sizeof(info), "PdhGetCounterInfoA failed %d\n", size); - - ret = PdhGetCounterInfoA( counter, 0, &size, &info ); - ok(ret == ERROR_SUCCESS, "PdhGetCounterInfoA failed 0x%08x\n", ret); - ok(info.lScale == 0, "lScale %d\n", info.lScale); - - ret = PdhSetCounterScaleFactor( counter, 0 ); - ok(ret == ERROR_SUCCESS, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); - - ret = PdhGetCounterInfoA( counter, 0, &size, &info ); - ok(ret == ERROR_SUCCESS, "PdhGetCounterInfoA failed 0x%08x\n", ret); - ok(info.lScale == 0, "lScale %d\n", info.lScale); - - ret = PdhSetCounterScaleFactor( counter, -5 ); - ok(ret == ERROR_SUCCESS, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); - - ret = PdhGetCounterInfoA( counter, 0, &size, &info ); - ok(ret == ERROR_SUCCESS, "PdhGetCounterInfoA failed 0x%08x\n", ret); - ok(info.lScale == -5, "lScale %d\n", info.lScale); - - ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); -} - -static void test_PdhGetCounterInfoW( void ) -{ - PDH_STATUS ret; - PDH_HQUERY query; - PDH_HCOUNTER counter; - PDH_COUNTER_INFO_W info; - DWORD size; - - ret = PdhOpenQueryW( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryW failed 0x%08x\n", ret); - - ret = PdhAddCounterW( query, percentage_processor_time, 0, &counter ); - ok(ret == ERROR_SUCCESS, "PdhAddCounterW failed 0x%08x\n", ret); - - ret = PdhGetCounterInfoW( NULL, 0, NULL, NULL ); - ok(ret == PDH_INVALID_HANDLE || ret == PDH_INVALID_ARGUMENT, "PdhGetCounterInfoW failed 0x%08x\n", ret); - - ret = PdhGetCounterInfoW( counter, 0, NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhGetCounterInfoW failed 0x%08x\n", ret); - - ret = PdhGetCounterInfoW( counter, 0, NULL, &info ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhGetCounterInfoW failed 0x%08x\n", ret); - - size = sizeof(info) - 1; - ret = PdhGetCounterInfoW( counter, 0, &size, NULL ); - ok(ret == PDH_MORE_DATA || ret == PDH_INVALID_ARGUMENT, "PdhGetCounterInfoW failed 0x%08x\n", ret); - - size = sizeof(info); - ret = PdhGetCounterInfoW( counter, 0, &size, &info ); - ok(ret == ERROR_SUCCESS, "PdhGetCounterInfoW failed 0x%08x\n", ret); - ok(size == sizeof(info), "PdhGetCounterInfoW failed %d\n", size); - - ret = PdhGetCounterInfoW( counter, 0, &size, &info ); - ok(ret == ERROR_SUCCESS, "PdhGetCounterInfoW failed 0x%08x\n", ret); - ok(info.lScale == 0, "lScale %d\n", info.lScale); - - ret = PdhSetCounterScaleFactor( counter, 0 ); - ok(ret == ERROR_SUCCESS, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); - - ret = PdhGetCounterInfoW( counter, 0, &size, &info ); - ok(ret == ERROR_SUCCESS, "PdhGetCounterInfoW failed 0x%08x\n", ret); - ok(info.lScale == 0, "lScale %d\n", info.lScale); - - ret = PdhSetCounterScaleFactor( counter, -5 ); - ok(ret == ERROR_SUCCESS, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); - - ret = PdhGetCounterInfoW( counter, 0, &size, &info ); - ok(ret == ERROR_SUCCESS, "PdhGetCounterInfoW failed 0x%08x\n", ret); - ok(info.lScale == -5, "lScale %d\n", info.lScale); - - ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); -} - -static void test_PdhLookupPerfIndexByNameA( void ) -{ - PDH_STATUS ret; - DWORD index; - - ret = PdhLookupPerfIndexByNameA( NULL, NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfIndexByNameA failed 0x%08x\n", ret); - - ret = PdhLookupPerfIndexByNameA( NULL, NULL, &index ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfIndexByNameA failed 0x%08x\n", ret); - - ret = PdhLookupPerfIndexByNameA( NULL, "No Counter", &index ); - ok(ret == PDH_STRING_NOT_FOUND, "PdhLookupPerfIndexByNameA failed 0x%08x\n", ret); - - ret = PdhLookupPerfIndexByNameA( NULL, "% Processor Time", NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfIndexByNameA failed 0x%08x\n", ret); - - ret = PdhLookupPerfIndexByNameA( NULL, "% Processor Time", &index ); - ok(ret == ERROR_SUCCESS, "PdhLookupPerfIndexByNameA failed 0x%08x\n", ret); - ok(index == 6, "PdhLookupPerfIndexByNameA failed %d\n", index); - - ret = PdhLookupPerfIndexByNameA( NULL, "System Up Time", &index ); - ok(ret == ERROR_SUCCESS, "PdhLookupPerfIndexByNameA failed 0x%08x\n", ret); - ok(index == 674, "PdhLookupPerfIndexByNameA failed %d\n", index); -} - -static void test_PdhLookupPerfIndexByNameW( void ) -{ - PDH_STATUS ret; - DWORD index; - - static const WCHAR no_counter[] = {'N','o',' ','C','o','u','n','t','e','r',0}; - - ret = PdhLookupPerfIndexByNameW( NULL, NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfIndexByNameW failed 0x%08x\n", ret); - - ret = PdhLookupPerfIndexByNameW( NULL, NULL, &index ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfIndexByNameW failed 0x%08x\n", ret); - - ret = PdhLookupPerfIndexByNameW( NULL, no_counter, &index ); - ok(ret == PDH_STRING_NOT_FOUND, "PdhLookupPerfIndexByNameW failed 0x%08x\n", ret); - - ret = PdhLookupPerfIndexByNameW( NULL, processor_time, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfIndexByNameW failed 0x%08x\n", ret); - - ret = PdhLookupPerfIndexByNameW( NULL, processor_time, &index ); - ok(ret == ERROR_SUCCESS, "PdhLookupPerfIndexByNameW failed 0x%08x\n", ret); - ok(index == 6, "PdhLookupPerfIndexByNameW failed %d\n", index); - - ret = PdhLookupPerfIndexByNameW( NULL, uptime, &index ); - ok(ret == ERROR_SUCCESS, "PdhLookupPerfIndexByNameW failed 0x%08x\n", ret); - ok(index == 674, "PdhLookupPerfIndexByNameW failed %d\n", index); -} - -static void test_PdhLookupPerfNameByIndexA( void ) -{ - PDH_STATUS ret; - char buffer[PDH_MAX_COUNTER_NAME] = "!!"; - DWORD size; - - ret = PdhLookupPerfNameByIndexA( NULL, 0, NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfNameByIndexA failed 0x%08x\n", ret); - - size = 0; - ret = PdhLookupPerfNameByIndexA( NULL, 6, buffer, &size ); - ok(ret == PDH_MORE_DATA || ret == PDH_INSUFFICIENT_BUFFER, "PdhLookupPerfNameByIndexA failed 0x%08x\n", ret); - - size = sizeof(buffer); - ret = PdhLookupPerfNameByIndexA( NULL, 6, buffer, &size ); - ok(ret == ERROR_SUCCESS, "PdhLookupPerfNameByIndexA failed 0x%08x\n", ret); - ok(!lstrcmpA( buffer, "% Processor Time" ), - "PdhLookupPerfNameByIndexA failed, got %s expected \'%% Processor Time\'\n", buffer); - ok(size == sizeof("% Processor Time"), "PdhLookupPerfNameByIndexA failed %d\n", size); - - size = sizeof(buffer); - ret = PdhLookupPerfNameByIndexA( NULL, 674, NULL, &size ); - ok(ret == PDH_INVALID_ARGUMENT || - ret == PDH_MORE_DATA, /* win2k3 */ - "PdhLookupPerfNameByIndexA failed 0x%08x\n", ret); - - size = sizeof(buffer); - ret = PdhLookupPerfNameByIndexA( NULL, 674, buffer, &size ); - ok(ret == ERROR_SUCCESS, "PdhLookupPerfNameByIndexA failed 0x%08x\n", ret); - ok(!lstrcmpA( buffer, "System Up Time" ), - "PdhLookupPerfNameByIndexA failed, got %s expected \'System Up Time\'\n", buffer); - ok(size == sizeof("System Up Time"), "PdhLookupPerfNameByIndexA failed %d\n", size); -} - -static void test_PdhLookupPerfNameByIndexW( void ) -{ - PDH_STATUS ret; - WCHAR buffer[PDH_MAX_COUNTER_NAME]; - DWORD size; - - ret = PdhLookupPerfNameByIndexW( NULL, 0, NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfNameByIndexW failed 0x%08x\n", ret); - - size = 0; - ret = PdhLookupPerfNameByIndexW( NULL, 6, buffer, &size ); - ok(ret == PDH_MORE_DATA || ret == PDH_INSUFFICIENT_BUFFER, "PdhLookupPerfNameByIndexW failed 0x%08x\n", ret); - - size = sizeof(buffer) / sizeof(WCHAR); - ret = PdhLookupPerfNameByIndexW( NULL, 6, buffer, &size ); - ok(ret == ERROR_SUCCESS, "PdhLookupPerfNameByIndexW failed 0x%08x\n", ret); - ok(size == sizeof(processor_time) / sizeof(WCHAR), "PdhLookupPerfNameByIndexW failed %d\n", size); - - size = sizeof(buffer) / sizeof(WCHAR); - ret = PdhLookupPerfNameByIndexW( NULL, 674, NULL, &size ); - ok(ret == PDH_INVALID_ARGUMENT || - ret == PDH_MORE_DATA, /* win2k3 */ - "PdhLookupPerfNameByIndexW failed 0x%08x\n", ret); - - size = sizeof(buffer) / sizeof(WCHAR); - ret = PdhLookupPerfNameByIndexW( NULL, 674, buffer, &size ); - ok(ret == ERROR_SUCCESS, "PdhLookupPerfNameByIndexW failed 0x%08x\n", ret); - ok(size == sizeof(uptime) / sizeof(WCHAR), "PdhLookupPerfNameByIndexW failed %d\n", size); -} - -static void test_PdhValidatePathA( void ) -{ - PDH_STATUS ret; - - ret = PdhValidatePathA( NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhValidatePathA failed 0x%08x\n", ret); - - ret = PdhValidatePathA( "" ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhValidatePathA failed 0x%08x\n", ret); - - ret = PdhValidatePathA( "\\System" ); - ok(ret == PDH_CSTATUS_BAD_COUNTERNAME, "PdhValidatePathA failed 0x%08x\n", ret); - - ret = PdhValidatePathA( "System Up Time" ); - ok(ret == PDH_CSTATUS_BAD_COUNTERNAME, "PdhValidatePathA failed 0x%08x\n", ret); - - ret = PdhValidatePathA( "\\System\\System Down Time" ); - ok(ret == PDH_CSTATUS_NO_COUNTER, "PdhValidatePathA failed 0x%08x\n", ret); - - ret = PdhValidatePathA( "\\System\\System Up Time" ); - ok(ret == ERROR_SUCCESS, "PdhValidatePathA failed 0x%08x\n", ret); -} - -static void test_PdhValidatePathW( void ) -{ - PDH_STATUS ret; - - static const WCHAR empty[] = {0}; - static const WCHAR system[] = {'\\','S','y','s','t','e','m',0}; - - ret = PdhValidatePathW( NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhValidatePathW failed 0x%08x\n", ret); - - ret = PdhValidatePathW( empty ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhValidatePathW failed 0x%08x\n", ret); - - ret = PdhValidatePathW( system ); - ok(ret == PDH_CSTATUS_BAD_COUNTERNAME, "PdhValidatePathW failed 0x%08x\n", ret); - - ret = PdhValidatePathW( uptime ); - ok(ret == PDH_CSTATUS_BAD_COUNTERNAME, "PdhValidatePathW failed 0x%08x\n", ret); - - ret = PdhValidatePathW( system_downtime ); - ok(ret == PDH_CSTATUS_NO_COUNTER, "PdhValidatePathW failed 0x%08x\n", ret); - - ret = PdhValidatePathW( system_uptime ); - ok(ret == ERROR_SUCCESS, "PdhValidatePathW failed 0x%08x\n", ret); -} - -static void test_PdhValidatePathExA( void ) -{ - PDH_STATUS ret; - - ret = pPdhValidatePathExA( NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhValidatePathExA failed 0x%08x\n", ret); - - ret = pPdhValidatePathExA( NULL, "" ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhValidatePathExA failed 0x%08x\n", ret); - - ret = pPdhValidatePathExA( NULL, "\\System" ); - ok(ret == PDH_CSTATUS_BAD_COUNTERNAME, "PdhValidatePathExA failed 0x%08x\n", ret); - - ret = pPdhValidatePathExA( NULL, "System Up Time" ); - ok(ret == PDH_CSTATUS_BAD_COUNTERNAME, "PdhValidatePathExA failed 0x%08x\n", ret); - - ret = pPdhValidatePathExA( NULL, "\\System\\System Down Time" ); - ok(ret == PDH_CSTATUS_NO_COUNTER, "PdhValidatePathExA failed 0x%08x\n", ret); - - ret = pPdhValidatePathExA( NULL, "\\System\\System Up Time" ); - ok(ret == ERROR_SUCCESS, "PdhValidatePathExA failed 0x%08x\n", ret); -} - -static void test_PdhValidatePathExW( void ) -{ - PDH_STATUS ret; - - static const WCHAR empty[] = {0}; - static const WCHAR system[] = {'\\','S','y','s','t','e','m',0}; - - ret = pPdhValidatePathExW( NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhValidatePathExW failed 0x%08x\n", ret); - - ret = pPdhValidatePathExW( NULL, empty ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhValidatePathExW failed 0x%08x\n", ret); - - ret = pPdhValidatePathExW( NULL, system ); - ok(ret == PDH_CSTATUS_BAD_COUNTERNAME, "PdhValidatePathExW failed 0x%08x\n", ret); - - ret = pPdhValidatePathExW( NULL, uptime ); - ok(ret == PDH_CSTATUS_BAD_COUNTERNAME, "PdhValidatePathExW failed 0x%08x\n", ret); - - ret = pPdhValidatePathExW( NULL, system_downtime ); - ok(ret == PDH_CSTATUS_NO_COUNTER, "PdhValidatePathExW failed 0x%08x\n", ret); - - ret = pPdhValidatePathExW( NULL, system_uptime ); - ok(ret == ERROR_SUCCESS, "PdhValidatePathExW failed 0x%08x\n", ret); -} - -static void test_PdhCollectQueryDataEx(void) -{ - PDH_STATUS status; - PDH_HQUERY query; - PDH_HCOUNTER counter; - HANDLE event; - BOOL ret; - UINT i; - - status = PdhOpenQueryA( NULL, 0, &query ); - ok(status == ERROR_SUCCESS, "PdhOpenQuery failed 0x%08x\n", status); - - event = CreateEventA( NULL, FALSE, FALSE, "winetest" ); - ok(event != NULL, "CreateEvent failed\n"); - - status = PdhAddCounterA( query, "\\System\\System Up Time", 0, &counter ); - ok(status == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08x\n", status); - - status = PdhCollectQueryDataEx( NULL, 1, event ); - ok(status == PDH_INVALID_HANDLE, "PdhCollectQueryDataEx failed 0x%08x\n", status); - - status = PdhCollectQueryDataEx( query, 1, NULL ); - ok(status == ERROR_SUCCESS, "PdhCollectQueryDataEx failed 0x%08x\n", status); - - status = PdhCollectQueryDataEx( query, 1, event ); - ok(status == ERROR_SUCCESS, "PdhCollectQueryDataEx failed 0x%08x\n", status); - - status = PdhCollectQueryData( query ); - ok(status == ERROR_SUCCESS, "PdhCollectQueryData failed 0x%08x\n", status); - - for (i = 0; i < 3; i++) - { - if (WaitForSingleObject( event, INFINITE ) == WAIT_OBJECT_0) - { - PDH_FMT_COUNTERVALUE value; - - status = PdhGetFormattedCounterValue( counter, PDH_FMT_LARGE, NULL, &value ); - ok(status == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08x\n", status); - - trace( "uptime %x%08x\n", (DWORD)(U(value).largeValue >> 32), (DWORD)U(value).largeValue ); - } - } - - ret = CloseHandle( event ); - ok(ret, "CloseHandle failed\n"); - - status = PdhCloseQuery( query ); - ok(status == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", status); -} - -static void test_PdhMakeCounterPathA(void) -{ - PDH_STATUS ret; - PDH_COUNTER_PATH_ELEMENTS_A e; - char buffer[1024]; - DWORD buflen; - - ret = PdhMakeCounterPathA(NULL, NULL, NULL, 0); - ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08x\n", ret); - - buflen = 0; - ret = PdhMakeCounterPathA(NULL, NULL, &buflen, 0); - ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08x\n", ret); - - buflen = 0; - ret = PdhMakeCounterPathA(NULL, buffer, &buflen, 0); - ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08x\n", ret); - - buflen = sizeof(buffer); - memset(&e, 0, sizeof(e)); - ret = PdhMakeCounterPathA(&e, buffer, &buflen, 0); - ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08x\n", ret); - - buffer[0] = 0; - buflen = sizeof(buffer); - e.szMachineName = (char *)"machine"; - ret = PdhMakeCounterPathA(&e, buffer, &buflen, 0); - ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08x\n", ret); - ok(!strcmp(buffer, ""), "expected \"machine\" got %s\n", buffer); - - buffer[0] = 0; - buflen = sizeof(buffer); - e.szObjectName = (char *)"object"; - ret = PdhMakeCounterPathA(&e, buffer, &buflen, 0); - ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08x\n", ret); - ok(!strcmp(buffer, ""), "expected \"machine\" got %s\n", buffer); - - buffer[0] = 0; - buflen = sizeof(buffer); - e.szInstanceName = (char *)"instance"; - ret = PdhMakeCounterPathA(&e, buffer, &buflen, 0); - ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08x\n", ret); - ok(!strcmp(buffer, ""), "expected \"machine\" got %s\n", buffer); - - buffer[0] = 0; - buflen = sizeof(buffer); - e.szParentInstance = (char *)"parent"; - ret = PdhMakeCounterPathA(&e, buffer, &buflen, 0); - ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08x\n", ret); - ok(!strcmp(buffer, ""), "expected \"machine\" got %s\n", buffer); - - buffer[0] = 0; - buflen = sizeof(buffer); - e.dwInstanceIndex = 1; - ret = PdhMakeCounterPathA(&e, buffer, &buflen, 0); - ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08x\n", ret); - ok(!strcmp(buffer, ""), "expected \"machine\" got %s\n", buffer); - - buffer[0] = 0; - buflen = sizeof(buffer); - e.szCounterName = (char *)"counter"; - ret = PdhMakeCounterPathA(&e, buffer, &buflen, 0); - ok(ret == ERROR_SUCCESS, "PdhMakeCounterPathA failed 0x%08x\n", ret); - ok(!strcmp(buffer, "\\\\machine\\object(parent/instance#1)\\counter"), - "expected \"\\\\machine\\object(parent/instance#1)\\counter\" got %s\n", buffer); - - buffer[0] = 0; - buflen = sizeof(buffer); - e.szParentInstance = NULL; - ret = PdhMakeCounterPathA(&e, buffer, &buflen, 0); - ok(ret == ERROR_SUCCESS, "PdhMakeCounterPathA failed 0x%08x\n", ret); - ok(!strcmp(buffer, "\\\\machine\\object(instance#1)\\counter"), - "expected \"\\\\machine\\object(instance#1)\\counter\" got %s\n", buffer); - - buffer[0] = 0; - buflen = sizeof(buffer); - e.szInstanceName = NULL; - ret = PdhMakeCounterPathA(&e, buffer, &buflen, 0); - ok(ret == ERROR_SUCCESS, "PdhMakeCounterPathA failed 0x%08x\n", ret); - ok(!strcmp(buffer, "\\\\machine\\object\\counter"), - "expected \"\\\\machine\\object\\counter\" got %s\n", buffer); - - buffer[0] = 0; - buflen = sizeof(buffer); - e.szMachineName = NULL; - ret = PdhMakeCounterPathA(&e, buffer, &buflen, 0); - ok(ret == ERROR_SUCCESS, "PdhMakeCounterPathA failed 0x%08x\n", ret); - ok(!strcmp(buffer, "\\object\\counter"), - "expected \"\\object\\counter\" got %s\n", buffer); - - buffer[0] = 0; - buflen = sizeof(buffer); - e.szObjectName = NULL; - ret = PdhMakeCounterPathA(&e, buffer, &buflen, 0); - ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08x\n", ret); -} - -static void test_PdhGetDllVersion(void) -{ - PDH_STATUS ret; - DWORD version; - - ret = PdhGetDllVersion(NULL); - ok(ret == PDH_INVALID_ARGUMENT || - broken(ret == ERROR_SUCCESS), /* Vista+ */ - "Expected PdhGetDllVersion to return PDH_INVALID_ARGUMENT, got %d\n", ret); - - ret = PdhGetDllVersion(&version); - ok(ret == ERROR_SUCCESS, - "Expected PdhGetDllVersion to return ERROR_SUCCESS, got %d\n", ret); - - if (ret == ERROR_SUCCESS) - { - ok(version == PDH_CVERSION_WIN50 || - version == PDH_VERSION, - "Expected version number to be PDH_CVERSION_WIN50 or PDH_VERSION, got %u\n", version); - } -} - -START_TEST(pdh) -{ - if (PRIMARYLANGID(LANGIDFROMLCID(GetThreadLocale())) != LANG_ENGLISH) - { - skip("non-english locale\n"); - return; - } - init_function_ptrs(); - - test_PdhOpenQueryA(); - test_PdhOpenQueryW(); - - test_PdhAddCounterA(); - test_PdhAddCounterW(); - - if (pPdhAddEnglishCounterA) test_PdhAddEnglishCounterA(); - if (pPdhAddEnglishCounterW) test_PdhAddEnglishCounterW(); - if (pPdhCollectQueryDataWithTime) test_PdhCollectQueryDataWithTime(); - - test_PdhGetFormattedCounterValue(); - test_PdhGetRawCounterValue(); - test_PdhSetCounterScaleFactor(); - test_PdhGetCounterTimeBase(); - - test_PdhGetCounterInfoA(); - test_PdhGetCounterInfoW(); - - test_PdhLookupPerfIndexByNameA(); - test_PdhLookupPerfIndexByNameW(); - - test_PdhLookupPerfNameByIndexA(); - test_PdhLookupPerfNameByIndexW(); - - test_PdhValidatePathA(); - test_PdhValidatePathW(); - - if (pPdhValidatePathExA) test_PdhValidatePathExA(); - if (pPdhValidatePathExW) test_PdhValidatePathExW(); - - test_PdhCollectQueryDataEx(); - test_PdhMakeCounterPathA(); - test_PdhGetDllVersion(); -} diff --git a/rostests/winetests/pdh/pdh.rbuild b/rostests/winetests/pdh/pdh.rbuild deleted file mode 100644 index ee4439487d8..00000000000 --- a/rostests/winetests/pdh/pdh.rbuild +++ /dev/null @@ -1,9 +0,0 @@ - - . - - pdh.c - testlist.c - wine - pdh - ntdll - diff --git a/rostests/winetests/pdh/testlist.c b/rostests/winetests/pdh/testlist.c deleted file mode 100644 index c480a0add8c..00000000000 --- a/rostests/winetests/pdh/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_pdh(void); - -const struct test winetest_testlist[] = -{ - { "pdh", func_pdh }, - { 0, 0 } -}; diff --git a/rostests/winetests/powrprof/CMakeLists.txt b/rostests/winetests/powrprof/CMakeLists.txt deleted file mode 100644 index 3ae788bee91..00000000000 --- a/rostests/winetests/powrprof/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP - -D_UNICODE -DUNICODE) - -add_executable(powrprof_winetest pwrprof.c testlist.c) -set_module_type(powrprof_winetest win32cui) -add_importlibs(powrprof_winetest advapi32 powrprof msvcrt kernel32 ntdll) -add_cd_file(TARGET powrprof_winetest DESTINATION reactos/bin FOR all) - -if(NOT MSVC) - allow_warnings(powrprof_winetest) -endif() diff --git a/rostests/winetests/powrprof/powrprof.rbuild b/rostests/winetests/powrprof/powrprof.rbuild deleted file mode 100644 index 24587e4c50b..00000000000 --- a/rostests/winetests/powrprof/powrprof.rbuild +++ /dev/null @@ -1,11 +0,0 @@ - - . - - - - powrprof - ntdll - advapi32 - testlist.c - pwrprof.c - diff --git a/rostests/winetests/powrprof/pwrprof.c b/rostests/winetests/powrprof/pwrprof.c deleted file mode 100644 index 4820ef992a7..00000000000 --- a/rostests/winetests/powrprof/pwrprof.c +++ /dev/null @@ -1,4889 +0,0 @@ -#include -#include "ntstatus.h" -#define WIN32_NO_STATUS -#define STANDALONE -#include "wine/test.h" -#include "winternl.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "powrprof.h" -#include "assert.h" -#include "winnt.h" - -/* - LONG WINAPI RegOpenCurrentUser(REGSAM a,PHKEY b) - { - *b = HKEY_CURRENT_USER; - return ERROR_SUCCESS; - } - */ -unsigned int g_NumPwrSchemes = 0; -unsigned int g_NumPwrSchemesEnumerated = 0; -unsigned int g_ActivePwrScheme = 3; -unsigned int g_TempPwrScheme = 99; - -POWER_POLICY g_PowerPolicy; - -static const WCHAR szMachPowerPoliciesSubKey[] = { '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', '\\', 'C', 'o', 'n', 't', 'r', 'o', 'l', 's', ' ', 'F', 'o', 'l', 'd', - 'e', 'r', '\\', 'P', 'o', 'w', 'e', 'r', 'C', 'f', 'g', '\\', 'P', 'o', 'w', 'e', - 'r', 'P', 'o', 'l', 'i', 'c', 'i', 'e', 's', 0}; - -static const WCHAR szTempPwrScheme[] = { '9', '9', 0 }; - -void test_ValidatePowerPolicies_Next(PGLOBAL_POWER_POLICY pGPP_original,PPOWER_POLICY pPP_original); - -void test_CallNtPowerInformation(void) -{ - DWORD retval; - ADMINISTRATOR_POWER_POLICY apolicy; - ULONGLONG atime, ctime; - PROCESSOR_POWER_INFORMATION ppi, *pppi; - PROCESSOR_POWER_POLICY ppp; - SYSTEM_BATTERY_STATE sbs; - SYSTEM_POWER_CAPABILITIES spc; - SYSTEM_POWER_INFORMATION spi; - SYSTEM_POWER_POLICY spp; - HANDLE x=NULL; - - /* AdministratorPowerPolicy tests */ - retval = CallNtPowerInformation(AdministratorPowerPolicy, 0, 0, 0, 0); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(AdministratorPowerPolicy, 0, 0, &apolicy, sizeof(ADMINISTRATOR_POWER_POLICY)); - ok(retval == STATUS_SUCCESS, "function expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(AdministratorPowerPolicy, &apolicy, sizeof(ADMINISTRATOR_POWER_POLICY), 0, 0); - ok(retval != STATUS_PRIVILEGE_NOT_HELD, "Privileg not held!!!! more errors to expect\n"); - ok(retval == STATUS_SUCCESS, "function expected STATUS_SUCCESS but got %d\n", (UINT)retval); - - /* LastSleepTime tests */ - retval = CallNtPowerInformation(LastSleepTime, 0, 0, 0, 0); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(LastSleepTime, &atime, sizeof(sizeof(ULONGLONG)), 0, 0); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(LastSleepTime, &atime, sizeof(ULONGLONG), &ctime, sizeof(ULONGLONG)); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(LastSleepTime, 0, 0, &atime, sizeof(ULONGLONG)); - ok(retval == STATUS_SUCCESS, "function expected STATUS_SUCCESS but got %d\n",(UINT)retval); - - /* LastWakeTime tests */ - retval = CallNtPowerInformation(LastWakeTime, 0, 0, 0, 0); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(LastWakeTime, &atime, sizeof(sizeof(ULONGLONG)), 0, 0); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(LastWakeTime, &atime, sizeof(ULONGLONG), &ctime, sizeof(ULONGLONG)); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(LastWakeTime, 0, 0, &atime, sizeof(ULONGLONG)); - ok(retval == STATUS_SUCCESS, "function expected STATUS_SUCCESS but got %d\n",(UINT)retval); - - /* ProcessorInformation tests */ - retval = CallNtPowerInformation(ProcessorInformation, 0, 0, 0, 0); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(ProcessorInformation, 0, 0, &ppi, sizeof(PROCESSOR_POWER_INFORMATION)); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(ProcessorInformation, &ppi, sizeof(PROCESSOR_POWER_INFORMATION), 0, 0); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(ProcessorInformation, &ppi, sizeof(PROCESSOR_POWER_INFORMATION), &ppi, sizeof(PROCESSOR_POWER_INFORMATION)); - - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(ProcessorInformation, 0, 0, &pppi, sizeof(PPROCESSOR_POWER_INFORMATION)); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(ProcessorInformation, &pppi, sizeof(PPROCESSOR_POWER_INFORMATION), 0, 0); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(ProcessorInformation, &pppi, sizeof(PPROCESSOR_POWER_INFORMATION), &pppi, sizeof(PPROCESSOR_POWER_INFORMATION)); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - - /* ProcessorPowerPolicyAc tests */ - retval = CallNtPowerInformation(ProcessorPowerPolicyAc, 0, 0, 0, 0); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(ProcessorPowerPolicyAc, 0, 0, &ppp, sizeof(PROCESSOR_POWER_POLICY)); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(ProcessorPowerPolicyAc, &ppp, sizeof(PROCESSOR_POWER_POLICY), 0, 0); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(ProcessorPowerPolicyAc, &ppp, sizeof(PROCESSOR_POWER_POLICY), &ppp, sizeof(PROCESSOR_POWER_POLICY)); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - - /* ProcessorPowerPolicyCurrent tests */ - retval = CallNtPowerInformation(ProcessorPowerPolicyCurrent, 0, 0, 0, 0); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(ProcessorPowerPolicyCurrent, 0, 0, &ppp, sizeof(PROCESSOR_POWER_POLICY)); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(ProcessorPowerPolicyCurrent, &ppp, sizeof(PROCESSOR_POWER_POLICY), 0, 0); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(ProcessorPowerPolicyCurrent, &ppp, sizeof(PROCESSOR_POWER_POLICY), &ppp, sizeof(PROCESSOR_POWER_POLICY)); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - - /* ProcessorPowerPolicyDc tests */ - retval = CallNtPowerInformation(ProcessorPowerPolicyDc, 0, 0, 0, 0); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(ProcessorPowerPolicyDc, 0, 0, &ppp, sizeof(PROCESSOR_POWER_POLICY)); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(ProcessorPowerPolicyDc, &ppp, sizeof(PROCESSOR_POWER_POLICY), 0, 0); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(ProcessorPowerPolicyDc, &ppp, sizeof(PROCESSOR_POWER_POLICY), &ppp, sizeof(PROCESSOR_POWER_POLICY)); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - - /* SystemBatteryState tests */ - retval = CallNtPowerInformation(SystemBatteryState, 0, 0, 0, 0); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(SystemBatteryState, 0, 0, &sbs, sizeof(SYSTEM_BATTERY_STATE)); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(SystemBatteryState, &sbs, sizeof(SYSTEM_BATTERY_STATE), 0, 0); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(SystemBatteryState, &sbs, sizeof(SYSTEM_BATTERY_STATE), &sbs, sizeof(SYSTEM_BATTERY_STATE)); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - - /* SystemExecutionState tests */ - retval = CallNtPowerInformation(SystemExecutionState, 0, 0, 0, 0); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - - /* SystemPowerCapabilities tests */ - retval = CallNtPowerInformation(SystemPowerCapabilities, 0, 0, 0, 0); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(SystemPowerCapabilities, 0, 0, &spc, sizeof(SYSTEM_POWER_CAPABILITIES)); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(SystemPowerCapabilities, &spc, sizeof(SYSTEM_POWER_CAPABILITIES), 0, 0); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(SystemPowerCapabilities, &spc, sizeof(SYSTEM_POWER_CAPABILITIES), &spc, sizeof(SYSTEM_POWER_CAPABILITIES)); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - - /* SystemPowerInformation tests */ - retval = CallNtPowerInformation(SystemPowerInformation, 0, 0, 0, 0); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(SystemPowerInformation, 0, 0, &spi, sizeof(SYSTEM_POWER_INFORMATION)); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(SystemPowerInformation, &spi, sizeof(SYSTEM_POWER_INFORMATION), 0, 0); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(SystemPowerInformation, &spi, sizeof(SYSTEM_POWER_INFORMATION), &spi, sizeof(SYSTEM_POWER_INFORMATION)); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(SystemPowerInformation, &spp, sizeof(SYSTEM_POWER_POLICY), 0, 0); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(SystemPowerInformation, &spp, sizeof(SYSTEM_POWER_POLICY), &spi, sizeof(SYSTEM_POWER_INFORMATION)); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - - /* SystemPowerPolicyAc tests */ - retval = CallNtPowerInformation(SystemPowerPolicyAc, 0, 0, 0, 0); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(SystemPowerPolicyAc, 0, 0, &spp, sizeof(SYSTEM_POWER_POLICY)); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(SystemPowerPolicyAc, &spp, sizeof(SYSTEM_POWER_POLICY), 0, 0); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(SystemPowerPolicyAc, &spp, sizeof(SYSTEM_POWER_POLICY), &spp, sizeof(SYSTEM_POWER_POLICY)); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - - /* SystemPowerPolicyCurrent tests */ - retval = CallNtPowerInformation(SystemPowerPolicyCurrent, 0, 0, 0, 0); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(SystemPowerPolicyCurrent, 0, 0, &spp, sizeof(SYSTEM_POWER_POLICY)); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(SystemPowerPolicyCurrent, &spp, sizeof(SYSTEM_POWER_POLICY), 0, 0); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(SystemPowerPolicyCurrent, &spp, sizeof(SYSTEM_POWER_POLICY), &spp, sizeof(SYSTEM_POWER_POLICY)); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - - /* SystemPowerPolicyDc tests */ - retval = CallNtPowerInformation(SystemPowerPolicyDc, 0, 0, 0, 0); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(SystemPowerPolicyDc, 0, 0, &spp, sizeof(SYSTEM_POWER_POLICY)); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(SystemPowerPolicyDc, &spp, sizeof(SYSTEM_POWER_POLICY), 0, 0); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(SystemPowerPolicyDc, &spp, sizeof(SYSTEM_POWER_POLICY), &spp, sizeof(SYSTEM_POWER_POLICY)); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - - /* SystemReserveHiberFile tests */ -/* - retval = CallNtPowerInformation(SystemReserveHiberFile, 0, 0, 0, 0); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %ld\n", retval); - bln=TRUE; - retval = CallNtPowerInformation(SystemReserveHiberFile, &bln, sizeof(bln), 0, 0); - ok(retval == STATUS_DISK_FULL, "function result wrong expected STATUS_DISK_FULL but got %ld\n", nret); - bln=FALSE; - retval = CallNtPowerInformation(SystemReserveHiberFile, &bln, sizeof(bln), 0, 0); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %ld\n", nret); - - bln2=TRUE; - nret = CallNtPowerInformation(SystemReserveHiberFile, 0, 0, &bln2, sizeof(bln2)); - ok(nret == STATUS_DATATYPE_MISALIGNMENT, "function result wrong expected STATUS_DATATYPE_MISALIGNMENT but got %ld\n", nret); - bln2=FALSE; - nret = CallNtPowerInformation(SystemReserveHiberFile, 0, 0, &bln2, sizeof(bln2)); - ok(nret == STATUS_DATATYPE_MISALIGNMENT, "function result wrong expected STATUS_DATATYPE_MISALIGNMENT but got %ld\n", nret); - - bln=TRUE; - bln2=TRUE; - nret = CallNtPowerInformation(SystemReserveHiberFile, &bln, sizeof(bln), &bln2, sizeof(bln2)); - ok(nret == STATUS_DATATYPE_MISALIGNMENT, "function result wrong expected STATUS_DATATYPE_MISALIGNMENT but got %ld\n", nret); - bln2=FALSE; - nret = CallNtPowerInformation(SystemReserveHiberFile, &bln, sizeof(bln), &bln2, sizeof(bln2)); - ok(nret == STATUS_DATATYPE_MISALIGNMENT, "function result wrong expected STATUS_DATATYPE_MISALIGNMENT but got %ld\n", nret); - bln=FALSE; - bln2=TRUE; - nret = CallNtPowerInformation(SystemReserveHiberFile, &bln, sizeof(bln), &bln2, sizeof(bln2)); - ok(nret == STATUS_DATATYPE_MISALIGNMENT, "function result wrong expected STATUS_DATATYPE_MISALIGNMENT but got %ld\n", nret); - bln2=FALSE; - nret = CallNtPowerInformation(SystemReserveHiberFile, &bln, sizeof(bln), &bln2, sizeof(bln2)); - ok(nret == STATUS_DATATYPE_MISALIGNMENT, "function result wrong expected STATUS_DATATYPE_MISALIGNMENT but got %ld\n", nret); - */ - - /* VerifyProcessorPowerPolicyAc tests */ - retval = CallNtPowerInformation(VerifyProcessorPowerPolicyAc, 0, 0, 0, 0); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(VerifyProcessorPowerPolicyAc, 0, 0, &ppp, sizeof(PROCESSOR_POWER_POLICY)); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(VerifyProcessorPowerPolicyAc, &ppp, sizeof(PROCESSOR_POWER_POLICY), 0, 0); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(VerifyProcessorPowerPolicyAc, &ppp, sizeof(PROCESSOR_POWER_POLICY), &ppp, sizeof(PROCESSOR_POWER_POLICY)); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - - /* VerifyProcessorPowerPolicyDc tests */ - retval = CallNtPowerInformation(VerifyProcessorPowerPolicyDc, 0, 0, 0, 0); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(VerifyProcessorPowerPolicyDc, 0, 0, &ppp, sizeof(PROCESSOR_POWER_POLICY)); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(VerifyProcessorPowerPolicyDc, &ppp, sizeof(PROCESSOR_POWER_POLICY), 0, 0); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(VerifyProcessorPowerPolicyDc, &ppp, sizeof(PROCESSOR_POWER_POLICY), &ppp, sizeof(PROCESSOR_POWER_POLICY)); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - - /* VerifySystemPolicyAc tests */ - retval = CallNtPowerInformation(VerifySystemPolicyAc, 0, 0, 0, 0); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(VerifySystemPolicyAc, 0, 0, &spp, sizeof(SYSTEM_POWER_POLICY)); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(VerifySystemPolicyAc, &spp, sizeof(SYSTEM_POWER_POLICY), 0, 0); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(VerifySystemPolicyAc, &spp, sizeof(SYSTEM_POWER_POLICY), &spp, sizeof(SYSTEM_POWER_POLICY)); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - - /* VerifySystemPolicyDc tests */ - retval = CallNtPowerInformation(VerifySystemPolicyDc, 0, 0, 0, 0); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(VerifySystemPolicyDc, 0, 0, &spp, sizeof(SYSTEM_POWER_POLICY)); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(VerifySystemPolicyDc, &spp, sizeof(SYSTEM_POWER_POLICY), 0, 0); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(VerifySystemPolicyDc, &spp, sizeof(SYSTEM_POWER_POLICY), &spp, sizeof(SYSTEM_POWER_POLICY)); - ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but got %d\n", (UINT)retval); - - /* SystemPowerStateHandler tests */ - retval = CallNtPowerInformation(SystemPowerStateHandler, 0, 0, 0, 0); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(SystemPowerStateHandler, 0, 0, x, sizeof(HANDLE)); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - - /* ProcessorStateHandler tests */ - retval = CallNtPowerInformation(ProcessorStateHandler, 0, 0, 0, 0); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(ProcessorStateHandler, 0, 0, x, sizeof(HANDLE)); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - - /* ProcessorStateHandler2 tests */ - retval = CallNtPowerInformation(ProcessorStateHandler2, 0, 0, 0, 0); - ok(retval == STATUS_ACCESS_DENIED, "function result wrong expected STATUS_ACCESS_DENIED but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(ProcessorStateHandler2, 0, 0, x, sizeof(HANDLE)); - ok(retval == STATUS_ACCESS_DENIED, "function result wrong expected STATUS_ACCESS_DENIED but got %d\n", (UINT)retval); - - /* SystemPowerStateNotifyHandler tests */ - retval = CallNtPowerInformation(SystemPowerStateNotifyHandler, 0, 0, 0, 0); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - retval = CallNtPowerInformation(SystemPowerStateNotifyHandler, 0, 0, x, sizeof(HANDLE)); - ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval); - -} - -/* - @implemented - */ -void test_CanUserWritePwrScheme(void) -{ - DWORD error, retval; - - retval = CanUserWritePwrScheme(); - - error = GetLastError(); - - if (retval) - ok(retval, "function failed?"); - else - ok(error == ERROR_ACCESS_DENIED, "function last error wrong expected ERROR_ACCESS_DENIED but got %d\n", (UINT)error); - -} -BOOLEAN CALLBACK test_callback_EnumPwrScheme(UINT uiIndex, DWORD dwName, LPWSTR sName, DWORD dwDesc, - LPWSTR sDesc, PPOWER_POLICY pp,LPARAM lParam ) -{ - ok(uiIndex == g_NumPwrSchemes, "expected power scheme index of %d but got %d\n", g_NumPwrSchemes, uiIndex); - g_NumPwrSchemes++; - - ok(lParam == 0xDEADBEEF, "expected function lParam to be 0xDEADBEEF but got %d\n", (UINT)lParam); - - return TRUE; -} - -BOOLEAN CALLBACK test_callback_stop_EnumPwrScheme(UINT uiIndex, DWORD dwName, LPWSTR sName, DWORD dwDesc, - LPWSTR sDesc, PPOWER_POLICY pp,LPARAM lParam ) -{ - ok((!uiIndex || g_NumPwrSchemesEnumerated + 1 == uiIndex), "expected power scheme %d but got %d\n",g_NumPwrSchemesEnumerated+1, uiIndex); - g_NumPwrSchemesEnumerated = uiIndex; - - ok(uiIndex <= (UINT)lParam, "enumeration should have already been stopped at index %d current index %d\n", (UINT)lParam, uiIndex); - if (uiIndex == (UINT)lParam) - return FALSE; - else - return TRUE; -} - -void test_DeletePwrScheme(void) -{ - DWORD retval; - HKEY hSubKey = NULL; - - - /* - * try inexistant profile number, should fail - */ - - retval = DeletePwrScheme(0xFFFFFFFF); - ok(!retval, "function should have failed error %x\n",(UINT)GetLastError()); - - /* - * delete active power scheme, should fail - */ - - retval = GetActivePwrScheme(&g_ActivePwrScheme); - ok(retval, "function was expected to succeed, error %x\n",(UINT)GetLastError()); - - retval = DeletePwrScheme(g_ActivePwrScheme); - ok(!retval, "function should have failed\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "function should have failed with ERROR_ACCESS_DENIED but got %x\n", (UINT)GetLastError()); - - /* - * delete a temporarly created power scheme - */ - retval = DeletePwrScheme(g_TempPwrScheme); - ok(retval, "function should have succeeded\n"); - -/* - * clean up, delete illegal entry, witch was created for this test - */ - - if (RegOpenKeyW(HKEY_LOCAL_MACHINE, szMachPowerPoliciesSubKey, &hSubKey) == ERROR_SUCCESS) - { - if (RegDeleteKeyW(hSubKey, szTempPwrScheme) != STATUS_SUCCESS) - printf("#1 failed to delete subkey %i (testentry)\n", g_TempPwrScheme); - RegCloseKey(hSubKey); - } - -} - -void test_EnumPwrSchemes(void) -{ - BOOLEAN retval; - - /* - * test EnumPwrScheme with null pointer callback - */ - - retval = EnumPwrSchemes(0, 0); - ok(!retval, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER but got %x\n",(UINT)GetLastError()); - - /* - * enumerate power schemes, should succeed - */ - - retval = EnumPwrSchemes(test_callback_EnumPwrScheme, 0xDEADBEEF); - ok(retval, "function was expected to succeed %d\n",retval); - ok(g_NumPwrSchemes, "Warning: no power schemes available\n"); - - /* - * stop enumeration after first power scheme - */ - - retval = EnumPwrSchemes(test_callback_stop_EnumPwrScheme, (LPARAM)0); - ok(!retval, "function was expected to false\n"); - - /* - * enumerate half of all avalailble profiles - */ - - g_NumPwrSchemesEnumerated = 0; - retval = EnumPwrSchemes(test_callback_stop_EnumPwrScheme, (LPARAM)g_NumPwrSchemes / 2); - ok(retval, "function was expected to succeed but got %i\n", (UINT)retval); - ok(g_NumPwrSchemesEnumerated == g_NumPwrSchemes / 2, "function did not enumerate requested num of profiles %d enumerated %d\n", g_NumPwrSchemes / 2, g_NumPwrSchemesEnumerated); - - -} - -void test_GetSetActivePwrScheme(void) -{ - DWORD retval; - UINT current_scheme = 2; - UINT temp_scheme = 0; - - /* - * read active power scheme - */ - - retval = GetActivePwrScheme(&g_ActivePwrScheme); - - ok(retval, "function was expected to succeed, error %x\n",(UINT)GetLastError()); - ok(retval <= g_NumPwrSchemes, "expected index lower as power scheme count %d but got %d\n", g_NumPwrSchemes, g_ActivePwrScheme); - - /* - * sets active power scheme to inexistant profile - * -> corrupts power scheme enumeration on Windows XP SP2 - */ - //corrupts registry - //retval = SetActivePwrScheme(0xFFFFFFFF, 0, 0); - //ok(!retval, "function was expected to fail"); - //current_scheme = min(active_scheme+1, g_NumPwrSchemes-1); - - /* - * sets the active power scheme to profile with index 0 - */ - - retval = SetActivePwrScheme(current_scheme, 0, 0); - ok(retval, "function was expected to succeed, error %x\n",(UINT)GetLastError()); - - /* - * read back the active power scheme - */ - - retval = GetActivePwrScheme(&temp_scheme); - ok(retval, "function was expected to succeed, error %x\n",(UINT)GetLastError()); - ok(temp_scheme == current_scheme, "expected %d but got %d\n", (UINT)current_scheme, (UINT)temp_scheme); - - /* - * restore previous active power scheme - */ - - retval = SetActivePwrScheme(g_ActivePwrScheme, 0, 0); - ok(retval, "Warning: failed to restore old active power scheme %d\n", (UINT)g_ActivePwrScheme); -} - -void test_GetCurrentPowerPolicies(void) -{ - GLOBAL_POWER_POLICY gpp; - POWER_POLICY pp; - BOOLEAN ret; - UINT current_scheme = 2; - - g_ActivePwrScheme=3; - ret = GetActivePwrScheme(&g_ActivePwrScheme); - - ok(ret, "function was expected to succeed, error %x\n",(UINT)GetLastError()); - ret = SetActivePwrScheme(0, &gpp, 0); - - ok(!ret, "function was expected to fail\n"); - - ret = SetActivePwrScheme(0, 0, &pp); - ok(!ret, "function was expected to fail\n"); - - ret = SetActivePwrScheme(0, &gpp, &pp); - ok(!ret, "function was expected to fail\n"); - - ret = SetActivePwrScheme(current_scheme, &gpp, 0); - ok(!ret, "function was expected to fail\n"); - - ret = SetActivePwrScheme(current_scheme, 0, &pp); - ok(!ret, "function was expected to fail\n"); - - ret = SetActivePwrScheme(current_scheme, &gpp, &pp); - ok(!ret, "function was expected to fail\n"); - - ret = SetActivePwrScheme(g_ActivePwrScheme, 0, 0); - ok(ret, "Warning: failed to restore old active power scheme %d\n", (UINT)g_ActivePwrScheme); - - ret = GetCurrentPowerPolicies(0,0); - ok(ret, "function was expected to succeed, error %x\n",(UINT)GetLastError()); - - ret = GetCurrentPowerPolicies(&gpp,0); - ok(ret, "function was expected to succeed, error %x\n",(UINT)GetLastError()); - - ret = GetCurrentPowerPolicies(0,&pp); - ok(ret, "function was expected to succeed, error %x\n",(UINT)GetLastError()); - - ret = GetCurrentPowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed, error %x\n",(UINT)GetLastError()); - ok(gpp.mach.Revision == 1,"Global Mach Revision was expected to be 1 got %i\n",(UINT)gpp.mach.Revision); - ok(gpp.user.Revision == 1,"Global User Revision was expected to be 1 got %i\n",(UINT)gpp.mach.Revision); - ok(pp.mach.Revision == 1,"Mach Revision was expected to be 1 got %i\n",(UINT)gpp.mach.Revision); - ok(pp.user.Revision == 1,"User Revision was expected to be 1 got %i\n",(UINT)gpp.mach.Revision); - - - ret = GetActivePwrScheme(&g_ActivePwrScheme); - ok(ret, "function was expected to succeed, error %x\n",(UINT)GetLastError()); - - ret = SetActivePwrScheme(0, &gpp, 0); - ok(ret, "function was expected to succeed, error %x\n",(UINT)GetLastError()); - - ret = SetActivePwrScheme(0, 0, &pp); - ok(ret, "function was expected to succeed, error %x\n",(UINT)GetLastError()); - - ret = SetActivePwrScheme(0, &gpp, &pp); - ok(ret, "function was expected to succeed, error %x\n",(UINT)GetLastError()); - - ret = SetActivePwrScheme(current_scheme, &gpp, 0); - ok(ret, "function was expected to succeed, error %x\n",(UINT)GetLastError()); - - ret = SetActivePwrScheme(current_scheme, 0, &pp); - ok(ret, "function was expected to succeed, error %x\n",(UINT)GetLastError()); - - ret = SetActivePwrScheme(current_scheme, &gpp, &pp); - ok(ret, "function was expected to succeed, error %x\n",(UINT)GetLastError()); - - ret = SetActivePwrScheme(g_ActivePwrScheme, 0, 0); - ok(ret, "Warning: failed to restore old active power scheme %d\n", (UINT)g_ActivePwrScheme); - -} - -void test_GetPwrCapabilities(void) -{ - SYSTEM_POWER_CAPABILITIES spc; - BOOLEAN ret; - - ret = GetPwrCapabilities(0); - ok(!ret, "function was expected to fail\n"); - if (!ret) - { - ok(GetLastError() == ERROR_INVALID_PARAMETER,"function was expectet to return ERROR_INVALID_PARAMETER, but returns: %x\n",(UINT)GetLastError()); - } - ret = GetPwrCapabilities(&spc); - ok(ret, "function was expected to succeed, error %x\n",(UINT)GetLastError()); -} - -void test_GetPwrDiskSpindownRange(void) -{ - DWORD retval; - UINT min = 0; - UINT max = 0; - - /* - * invalid parameter checks - */ - - retval = GetPwrDiskSpindownRange(NULL, NULL); - ok(!retval, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected error ERROR_INVALID_PARAMETER but got %x\n", (UINT)GetLastError()); - - retval = GetPwrDiskSpindownRange(&max, NULL); - ok(!retval, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected error ERROR_INVALID_PARAMETER but got %x\n", (UINT)GetLastError()); - - retval = GetPwrDiskSpindownRange(NULL, &min); - ok(!retval, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected error ERROR_INVALID_PARAMETER but got %x\n", (UINT)GetLastError()); - - /* - * read disk spindown range - */ - - retval = GetPwrDiskSpindownRange(&max, &min); - ok(retval, "function was expected to succeed error %x\n",(UINT)GetLastError()); - ok(min <= max, "range mismatch min %d max %d\n",min, max); -} - -void test_IsAdminOverrideActive(void) -{ - ADMINISTRATOR_POWER_POLICY app; - BOOLEAN ret; - - ret = IsAdminOverrideActive(0); - ok(!ret, "function was expected to fail\n"); - - ret = IsAdminOverrideActive(&app); - ok(!ret, "function was expected to fail\n"); - - app.MinSleep = 0; - app.MaxSleep = 0; - app.MinVideoTimeout = 0; - app.MaxVideoTimeout = 0; - app.MinSpindownTimeout = 0; - app.MaxSpindownTimeout = 0; - - ret = IsAdminOverrideActive(&app); - ok(!ret, "function was expected to fail\n"); - - app.MinSleep = 1; - app.MaxSleep = 2; - app.MinVideoTimeout = 3; - app.MaxVideoTimeout = 4; - app.MinSpindownTimeout = 5; - app.MaxSpindownTimeout = 6; - - ret = IsAdminOverrideActive(&app); - ok(!ret, "function was expected to fail\n"); - -} - -void test_IsPwrHibernateAllowed(void) -{ -/* - BOOLEAN ret; - - ret = IsPwrHibernateAllowed(); - ok(!ret, "function was expected to fail\n"); - */ -} - -void test_IsPwrShutdownAllowed(void) -{ -/* - BOOLEAN ret; - - ret = IsPwrShutdownAllowed(); - ok(ret, "function was expected to succeed, error %x\n",(UINT)GetLastError()); - */ -} - -void test_IsPwrSuspendAllowed(void) -{ -/* - BOOLEAN ret; - - ret = IsPwrSuspendAllowed(); - ok(ret, "function was expected to succed, error %x\n",(UINT)GetLastError()); - */ -} - -void test_ReadGlobalPwrPolicy(void) -{ - GLOBAL_POWER_POLICY gpp; - BOOLEAN ret; - - ret = ReadGlobalPwrPolicy(&gpp); - ok(ret, "function was expected to succeed, error %x\n",(UINT)GetLastError()); - ok(gpp.mach.Revision == 1,"Global Mach Revision was expected to be 1 got %i\n",(UINT)gpp.mach.Revision); - ok(gpp.user.Revision == 1,"Global User Revision was expected to be 1 got %i\n",(UINT)gpp.mach.Revision); - - - -} - -void test_ReadProcessorPwrScheme(void) -{ - MACHINE_PROCESSOR_POWER_POLICY mppp; - BOOLEAN ret; - UINT i = 0; - DWORD err; - - do - { - RtlZeroMemory(&mppp, sizeof(MACHINE_PROCESSOR_POWER_POLICY)); - ret = ReadProcessorPwrScheme(i,&mppp); - if (ret) - { - ok(mppp.Revision == 1,"Main Revision was expected to be 1 got %i\n",(UINT)mppp.Revision); - ok(mppp.ProcessorPolicyAc.Revision == 1,"PowerAC Revision was expected to be 1 got %i\n",(UINT)mppp.ProcessorPolicyAc.Revision); - ok(mppp.ProcessorPolicyDc.Revision == 1,"PowerDC Revision was expected to be 1 got %i\n",(UINT)mppp.ProcessorPolicyDc.Revision); - } - else - { - err = GetLastError(); - ok(err == 0,"Failed Error %x\n",(UINT)err); - return; - } - i++; - if (i == g_NumPwrSchemes) - return; - } while (TRUE); - -} - -void test_ReadPwrScheme(void) -{ - DWORD retval; - - /* - * read power scheme with null pointer -> crashs on Windows XP SP2 - */ - //retval = ReadPwrScheme(0, NULL); - //ok(!retval, "function was expected to fail\n"); - //ok(GetLastError() == STATUS_INVALID_PARAMETER, "expected error ... but got %x\n", GetLastError()); - - /* - * read a power scheme with an invalid index, leads to the creation of the key - * -> corrupts power scheme enumeration - */ - //retval = ReadPwrScheme(0xFFFFFFFF, &powerPolicy); - //ok(!retval, "function was expected to fail\n"); - //ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error ERROR_ACCESS_DENIED but got %x\n", GetLastError()); - - /* - * read current active power scheme - */ - - retval = ReadPwrScheme(g_ActivePwrScheme, &g_PowerPolicy); - ok(retval, "function was expected to succeed error %x\n",(UINT)GetLastError()); - -} - -void test_SetSuspendState(void) -{ -// SetSuspendState(FALSE,FALSE,FALSE) -} - - -BOOLEAN globalcompare(GLOBAL_POWER_POLICY gpp, GLOBAL_POWER_POLICY gpp_compare) -{ - //return TRUE; - int i,j; - BOOLEAN ret; - - ret = TRUE; - if (gpp.mach.BroadcastCapacityResolution != gpp_compare.mach.BroadcastCapacityResolution) - { - printf("mach.BroadcastCapacityResolution failed %i != %i\n",gpp.mach.BroadcastCapacityResolution,gpp_compare.mach.BroadcastCapacityResolution); - ret = FALSE; - } - if (gpp.mach.LidOpenWakeAc != gpp_compare.mach.LidOpenWakeAc) - { - printf("mach.LidOpenWakeAc failed %i != %i\n",gpp.mach.LidOpenWakeAc,gpp_compare.mach.LidOpenWakeAc); - ret = FALSE; - } - if (gpp.mach.LidOpenWakeDc != gpp_compare.mach.LidOpenWakeDc) - { - printf("mach.LidOpenWakeDc failed %i != %i\n",gpp.mach.LidOpenWakeDc,gpp_compare.mach.LidOpenWakeDc); - ret = FALSE; - } - if (gpp.mach.Revision != gpp_compare.mach.Revision) - { - printf("mach.Revision failed %i != %i\n",gpp.mach.Revision,gpp_compare.mach.Revision); - ret = FALSE; - } - - if (gpp.user.PowerButtonAc.Action != gpp_compare.user.PowerButtonAc.Action) - { - printf("user.PowerButtonAc.Action failed %i != %i\n",gpp.user.PowerButtonAc.Action,gpp_compare.user.PowerButtonAc.Action); - ret = FALSE; - } - if (gpp.user.PowerButtonAc.EventCode != gpp_compare.user.PowerButtonAc.EventCode) - { - printf("user.PowerButtonAc.EventCode failed %i != %i\n",gpp.user.PowerButtonAc.EventCode,gpp_compare.user.PowerButtonAc.EventCode); - ret = FALSE; - } - if (gpp.user.PowerButtonAc.Flags != gpp_compare.user.PowerButtonAc.Flags) - { - printf("user.PowerButtonAc.Flags failed %i != %i\n",gpp.user.PowerButtonAc.Flags,gpp_compare.user.PowerButtonAc.Flags); - ret = FALSE; - } - if (gpp.user.PowerButtonDc.Action != gpp_compare.user.PowerButtonDc.Action) - { - printf("user.PowerButtonDc.Action failed %i != %i\n",gpp.user.PowerButtonDc.Action,gpp_compare.user.PowerButtonDc.Action); - ret = FALSE; - } - if (gpp.user.PowerButtonDc.EventCode != gpp_compare.user.PowerButtonDc.EventCode) - { - printf("user.PowerButtonDc.EventCode failed %i != %i\n",gpp.user.PowerButtonDc.EventCode,gpp_compare.user.PowerButtonDc.EventCode); - ret = FALSE; - } - if (gpp.user.PowerButtonDc.Flags != gpp_compare.user.PowerButtonDc.Flags) - { - printf("user.PowerButtonDc.Flags failed %i != %i\n",gpp.user.PowerButtonDc.Flags,gpp_compare.user.PowerButtonDc.Flags); - ret = FALSE; - } - if (gpp.user.SleepButtonAc.Action != gpp_compare.user.SleepButtonAc.Action) - { - printf("user.SleepButtonAc.Action failed %i != %i\n",gpp.user.SleepButtonAc.Action,gpp_compare.user.SleepButtonAc.Action); - ret = FALSE; - } - if (gpp.user.SleepButtonAc.EventCode != gpp_compare.user.SleepButtonAc.EventCode) - { - printf("user.SleepButtonAc.EventCode failed %i != %i\n",gpp.user.SleepButtonAc.EventCode,gpp_compare.user.SleepButtonAc.EventCode); - ret = FALSE; - } - if (gpp.user.SleepButtonAc.Flags != gpp_compare.user.SleepButtonAc.Flags) - { - printf("user.SleepButtonAc.Flags failed %i != %i\n",gpp.user.SleepButtonAc.Flags,gpp_compare.user.SleepButtonAc.Flags); - ret = FALSE; - } - if (gpp.user.SleepButtonDc.Action != gpp_compare.user.SleepButtonDc.Action) - { - printf("user.SleepButtonDc.Action failed %i != %i\n",gpp.user.SleepButtonDc.Action,gpp_compare.user.SleepButtonDc.Action); - ret = FALSE; - } - if (gpp.user.SleepButtonDc.EventCode != gpp_compare.user.SleepButtonDc.EventCode) - { - printf("user.SleepButtonDc.EventCode failed %i != %i\n",gpp.user.SleepButtonDc.EventCode,gpp_compare.user.SleepButtonDc.EventCode); - ret = FALSE; - } - if (gpp.user.SleepButtonDc.Flags != gpp_compare.user.SleepButtonDc.Flags) - { - printf("user.SleepButtonDc.Flags failed %i != %i\n",gpp.user.SleepButtonDc.Flags,gpp_compare.user.SleepButtonDc.Flags); - ret = FALSE; - } - if (gpp.user.LidCloseAc.Action != gpp_compare.user.LidCloseAc.Action) - { - printf("user.LidCloseAc.Action failed %i != %i\n",gpp.user.LidCloseAc.Action,gpp_compare.user.LidCloseAc.Action); - ret = FALSE; - } - if (gpp.user.LidCloseAc.EventCode != gpp_compare.user.LidCloseAc.EventCode) - { - printf("user.LidCloseAc.EventCode failed %i != %i\n",gpp.user.LidCloseAc.EventCode,gpp_compare.user.LidCloseAc.EventCode); - ret = FALSE; - } - if (gpp.user.LidCloseAc.Flags != gpp_compare.user.LidCloseAc.Flags) - { - printf("user.LidCloseAc.Flags failed %i != %i\n",gpp.user.LidCloseAc.Flags,gpp_compare.user.LidCloseAc.Flags); - ret = FALSE; - } - if (gpp.user.LidCloseDc.Action != gpp_compare.user.LidCloseDc.Action) - { - printf("user.LidCloseDc.Action failed %i != %i\n",gpp.user.LidCloseDc.Action,gpp_compare.user.LidCloseDc.Action); - ret = FALSE; - } - if (gpp.user.LidCloseDc.EventCode != gpp_compare.user.LidCloseDc.EventCode) - { - printf("user.LidCloseDc.EventCode failed %i != %i\n",gpp.user.LidCloseDc.EventCode,gpp_compare.user.LidCloseDc.EventCode); - ret = FALSE; - } - if (gpp.user.LidCloseDc.Flags != gpp_compare.user.LidCloseDc.Flags) - { - printf("user.LidCloseDc.Flags failed %i != %i\n",gpp.user.LidCloseDc.Flags,gpp_compare.user.LidCloseDc.Flags); - ret = FALSE; - } - - for(i=0;imach.LidOpenWakeAc);//1 - //printf("Old: %i\n",pGPP_original->mach.LidOpenWakeDc);//1 - //printf("Old: %i,%i,%i \n",pGPP_original->user.LidCloseAc.Action,pGPP_original->user.LidCloseAc.EventCode,pGPP_original->user.LidCloseAc.Flags);//7 - //printf("Old: %i,%i,%i \n",pGPP_original->user.LidCloseDc.Action,pGPP_original->user.LidCloseDc.EventCode,pGPP_original->user.LidCloseDc.Flags);//7 - //printf("Old: %i,%i,%i \n",pGPP_original->user.PowerButtonAc.Action,pGPP_original->user.PowerButtonAc.EventCode,pGPP_original->user.PowerButtonAc.Flags);//0,0,0 - //printf("Old: %i,%i,%i \n",pGPP_original->user.PowerButtonDc.Action,pGPP_original->user.PowerButtonDc.EventCode,pGPP_original->user.PowerButtonDc.Flags);//7,0,0 - //printf("Old: %i,%i,%i \n",pGPP_original->user.SleepButtonAc.Action,pGPP_original->user.SleepButtonAc.EventCode,pGPP_original->user.SleepButtonAc.Flags);//7,0,0 - //printf("Old: %i,%i,%i \n",pGPP_original->user.SleepButtonDc.Action,pGPP_original->user.SleepButtonDc.EventCode,pGPP_original->user.SleepButtonDc.Flags);//7,0,0 - //printf("Old: %i \n",pPP_original->mach.DozeS4TimeoutAc);//0 - //printf("Old: %i \n",pPP_original->mach.DozeS4TimeoutDc);//0 - //printf("Old: %i \n",pPP_original->mach.DozeTimeoutAc);//0 - //printf("Old: %i \n",pPP_original->mach.DozeTimeoutDc);//0 - //printf("Old: %i \n",pPP_original->mach.MinSleepAc);//1 - //printf("Old: %i \n",pPP_original->mach.MinSleepDc);//1 - //printf("Old: %i \n",pPP_original->mach.MinThrottleAc);//0 - //printf("Old: %i \n",pPP_original->mach.MinThrottleDc);//0 - //printf("Old: %i,%i,%i \n",pPP_original->mach.OverThrottledAc.Action,pPP_original->mach.OverThrottledAc.EventCode,pPP_original->mach.OverThrottledAc.Flags);//0,0,0 - //printf("Old: %i,%i,%i \n",pPP_original->mach.OverThrottledDc.Action,pPP_original->mach.OverThrottledDc.EventCode,pPP_original->mach.OverThrottledDc.Flags);//0,0,0 - //printf("Old: %i \n",pPP_original->mach.ReducedLatencySleepAc);//1 - //printf("Old: %i \n",pPP_original->mach.ReducedLatencySleepDc);//1 - //printf("Old: %i \n",pPP_original->user.FanThrottleToleranceAc);//0 - //printf("Old: %i \n",pPP_original->user.FanThrottleToleranceDc);//0 - //printf("Old: %i \n",pPP_original->user.ForcedThrottleAc);//0 - //printf("Old: %i \n",pPP_original->user.ForcedThrottleDc);//0 - //printf("Old: %i,%i,%i \n",pPP_original->user.IdleAc.Action,pPP_original->user.IdleAc.EventCode,pPP_original->user.IdleAc.Flags);//0,0,0 - //printf("Old: %i,%i,%i \n",pPP_original->user.IdleDc.Action,pPP_original->user.IdleDc.EventCode,pPP_original->user.IdleDc.Flags);//0,0,0 - //printf("Old: %i \n",pPP_original->user.IdleSensitivityAc);//0 - //printf("Old: %i \n",pPP_original->user.IdleSensitivityDc);//0 - //printf("Old: %i \n",pPP_original->user.IdleTimeoutAc);//0 - //printf("Old: %i \n",pPP_original->user.IdleTimeoutDc);//0 - //printf("Old: %i \n",pPP_original->user.MaxSleepAc);//1 - //printf("Old: %i \n",pPP_original->user.MaxSleepDc);//1 - //printf("Old: %i \n",pPP_original->user.OptimizeForPowerAc);//0 - //printf("Old: %i \n",pPP_original->user.OptimizeForPowerDc);//0 - //printf("Old: %i \n",pPP_original->user.SpindownTimeoutAc);//0 - //printf("Old: %i \n",pPP_original->user.SpindownTimeoutDc);//0 - //printf("Old: %i \n",pPP_original->user.ThrottlePolicyAc);//0 - //printf("Old: %i \n",pPP_original->user.ThrottlePolicyDc);//0 - //printf("Old: %i \n",pPP_original->user.VideoTimeoutAc);//0 - //printf("Old: %i \n",pPP_original->user.VideoTimeoutDc);//0 - - pPP_original->mach.MinSleepAc=4; -pPP_original->mach.MinSleepDc=4; -pPP_original->user.MaxSleepAc=4; -pPP_original->user.MaxSleepDc=4; -pPP_original->user.OptimizeForPowerAc=1; -pPP_original->user.OptimizeForPowerDc=1; - - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ok(compare(pp,pp_compare),"Difference Found\n"); - - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->mach.LidOpenWakeAc=PowerSystemUnspecified-2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->mach.LidOpenWakeAc=PowerSystemUnspecified-1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->mach.LidOpenWakeAc=PowerSystemUnspecified; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->mach.LidOpenWakeAc=PowerSystemWorking; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->mach.LidOpenWakeAc=PowerSystemSleeping1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - gpp_compare.mach.LidOpenWakeAc=4; - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->mach.LidOpenWakeAc=PowerSystemSleeping2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - gpp_compare.mach.LidOpenWakeAc=4; - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->mach.LidOpenWakeAc=PowerSystemSleeping3; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->mach.LidOpenWakeAc=PowerSystemHibernate; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - gpp_compare.mach.LidOpenWakeAc=4; - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->mach.LidOpenWakeAc=PowerSystemShutdown; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->mach.LidOpenWakeAc=PowerSystemMaximum; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->mach.LidOpenWakeAc=PowerSystemMaximum+1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->mach.LidOpenWakeAc=PowerSystemMaximum+2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - pGPP_original->mach.LidOpenWakeAc=PowerSystemWorking; - - - pGPP_original->mach.LidOpenWakeDc=PowerSystemUnspecified-2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->mach.LidOpenWakeDc=PowerSystemUnspecified-1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->mach.LidOpenWakeDc=PowerSystemUnspecified; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->mach.LidOpenWakeDc=PowerSystemWorking; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->mach.LidOpenWakeDc=PowerSystemSleeping1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - gpp_compare.mach.LidOpenWakeDc=4; - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->mach.LidOpenWakeDc=PowerSystemSleeping2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - gpp_compare.mach.LidOpenWakeDc=4; - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->mach.LidOpenWakeDc=PowerSystemSleeping3; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->mach.LidOpenWakeDc=PowerSystemHibernate; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - gpp_compare.mach.LidOpenWakeDc=4; - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->mach.LidOpenWakeDc=PowerSystemShutdown; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->mach.LidOpenWakeDc=PowerSystemMaximum; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->mach.LidOpenWakeDc=PowerSystemMaximum+1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->mach.LidOpenWakeDc=PowerSystemMaximum+2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - pGPP_original->mach.LidOpenWakeDc=PowerSystemWorking; - - pGPP_original->user.LidCloseAc.Action=PowerActionNone-2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %x\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.LidCloseAc.Action=PowerActionNone-1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %x\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.LidCloseAc.Action=PowerActionNone; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.LidCloseAc.Action=PowerActionReserved; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - gpp_compare.user.LidCloseAc.Action=2; - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.LidCloseAc.Action=PowerActionSleep; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.LidCloseAc.Action=PowerActionHibernate; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - gpp_compare.user.LidCloseAc.Action=2; - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.LidCloseAc.Action=PowerActionShutdown; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.LidCloseAc.Action=PowerActionShutdownReset; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.LidCloseAc.Action=PowerActionShutdownOff; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.LidCloseAc.Action=PowerActionWarmEject; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.LidCloseAc.Action=PowerActionWarmEject+1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.LidCloseAc.Action=PowerActionWarmEject+2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - pGPP_original->user.LidCloseAc.Action=PowerActionWarmEject; - - - pGPP_original->user.LidCloseDc.Action=PowerActionNone-2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %x\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.LidCloseDc.Action=PowerActionNone-1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %x\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.LidCloseDc.Action=PowerActionNone; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.LidCloseDc.Action=PowerActionReserved; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - gpp_compare.user.LidCloseDc.Action=2; - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.LidCloseDc.Action=PowerActionSleep; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.LidCloseDc.Action=PowerActionHibernate; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - gpp_compare.user.LidCloseDc.Action=2; - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.LidCloseDc.Action=PowerActionShutdown; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.LidCloseDc.Action=PowerActionShutdownReset; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.LidCloseDc.Action=PowerActionShutdownOff; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.LidCloseDc.Action=PowerActionWarmEject; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.LidCloseDc.Action=PowerActionWarmEject+1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.LidCloseDc.Action=PowerActionWarmEject+2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - pGPP_original->user.LidCloseDc.Action=PowerActionWarmEject; - - - pGPP_original->user.PowerButtonAc.Action=PowerActionNone-2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %x\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.PowerButtonAc.Action=PowerActionNone-1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %x\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.PowerButtonAc.Action=PowerActionNone; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.PowerButtonAc.Action=PowerActionReserved; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - gpp_compare.user.PowerButtonAc.Action=2; - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.PowerButtonAc.Action=PowerActionSleep; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.PowerButtonAc.Action=PowerActionHibernate; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - gpp_compare.user.PowerButtonAc.Action=2; - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.PowerButtonAc.Action=PowerActionShutdown; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.PowerButtonAc.Action=PowerActionShutdownReset; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.PowerButtonAc.Action=PowerActionShutdownOff; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.PowerButtonAc.Action=PowerActionWarmEject; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.PowerButtonAc.Action=PowerActionWarmEject+1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.PowerButtonAc.Action=PowerActionWarmEject+2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - pGPP_original->user.PowerButtonAc.Action=PowerActionNone; - - - pGPP_original->user.PowerButtonDc.Action=PowerActionNone-2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %x\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.PowerButtonDc.Action=PowerActionNone-1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %x\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.PowerButtonDc.Action=PowerActionNone; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.PowerButtonDc.Action=PowerActionReserved; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - gpp_compare.user.PowerButtonDc.Action=2; - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.PowerButtonDc.Action=PowerActionSleep; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.PowerButtonDc.Action=PowerActionHibernate; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - gpp_compare.user.PowerButtonDc.Action=2; - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.PowerButtonDc.Action=PowerActionShutdown; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.PowerButtonDc.Action=PowerActionShutdownReset; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.PowerButtonDc.Action=PowerActionShutdownOff; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.PowerButtonDc.Action=PowerActionWarmEject; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.PowerButtonDc.Action=PowerActionWarmEject+1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.PowerButtonDc.Action=PowerActionWarmEject+2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - pGPP_original->user.PowerButtonDc.Action=PowerActionWarmEject; - - - pGPP_original->user.SleepButtonAc.Action=PowerActionNone-2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %x\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.SleepButtonAc.Action=PowerActionNone-1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %x\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.SleepButtonAc.Action=PowerActionNone; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.SleepButtonAc.Action=PowerActionReserved; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - gpp_compare.user.SleepButtonAc.Action=2; - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.SleepButtonAc.Action=PowerActionSleep; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.SleepButtonAc.Action=PowerActionHibernate; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - gpp_compare.user.SleepButtonAc.Action=2; - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.SleepButtonAc.Action=PowerActionShutdown; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.SleepButtonAc.Action=PowerActionShutdownReset; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.SleepButtonAc.Action=PowerActionShutdownOff; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.SleepButtonAc.Action=PowerActionWarmEject; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.SleepButtonAc.Action=PowerActionWarmEject+1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.SleepButtonAc.Action=PowerActionWarmEject+2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - pGPP_original->user.SleepButtonAc.Action=PowerActionWarmEject; - - - pGPP_original->user.SleepButtonDc.Action=PowerActionNone-2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %x\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.SleepButtonDc.Action=PowerActionNone-1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %x\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.SleepButtonDc.Action=PowerActionNone; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.SleepButtonDc.Action=PowerActionReserved; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - gpp_compare.user.SleepButtonDc.Action=2; - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.SleepButtonDc.Action=PowerActionSleep; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.SleepButtonDc.Action=PowerActionHibernate; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - gpp_compare.user.SleepButtonDc.Action=2; - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.SleepButtonDc.Action=PowerActionShutdown; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.SleepButtonDc.Action=PowerActionShutdownReset; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.SleepButtonDc.Action=PowerActionShutdownOff; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.SleepButtonDc.Action=PowerActionWarmEject; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.SleepButtonDc.Action=PowerActionWarmEject+1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pGPP_original->user.SleepButtonDc.Action=PowerActionWarmEject+2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - pGPP_original->user.SleepButtonDc.Action=PowerActionWarmEject; - - - pPP_original->mach.MinSleepAc=PowerSystemUnspecified-2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.mach.MinSleepAc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.MinSleepAc=PowerSystemUnspecified-1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.mach.MinSleepAc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.MinSleepAc=PowerSystemUnspecified; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.mach.MinSleepAc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.MinSleepAc=PowerSystemWorking; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.mach.MinSleepAc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.MinSleepAc=PowerSystemSleeping1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.mach.MinSleepAc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.MinSleepAc=PowerSystemSleeping2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.mach.MinSleepAc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.MinSleepAc=PowerSystemSleeping3; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.MinSleepAc=PowerSystemHibernate; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.mach.MinSleepAc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.MinSleepAc=PowerSystemShutdown; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.MinSleepAc=PowerSystemMaximum; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.MinSleepAc=PowerSystemMaximum+1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.MinSleepAc=PowerSystemMaximum+2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - pPP_original->mach.MinSleepAc=PowerSystemSleeping3; - - - pPP_original->mach.MinSleepDc=PowerSystemUnspecified-2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.mach.MinSleepDc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.MinSleepDc=PowerSystemUnspecified-1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.mach.MinSleepDc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.MinSleepDc=PowerSystemUnspecified; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.mach.MinSleepDc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.MinSleepDc=PowerSystemWorking; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.mach.MinSleepDc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.MinSleepDc=PowerSystemSleeping1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.mach.MinSleepDc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.MinSleepDc=PowerSystemSleeping2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.mach.MinSleepDc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.MinSleepDc=PowerSystemSleeping3; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.MinSleepDc=PowerSystemHibernate; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.mach.MinSleepDc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.MinSleepDc=PowerSystemShutdown; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.MinSleepDc=PowerSystemMaximum; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.MinSleepDc=PowerSystemMaximum+1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.MinSleepDc=PowerSystemMaximum+2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - pPP_original->mach.MinSleepDc=PowerSystemSleeping3; - - - pPP_original->mach.OverThrottledAc.Action=PowerActionNone-2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.mach.OverThrottledAc.Action=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.OverThrottledAc.Action=PowerActionNone-1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.mach.OverThrottledAc.Action=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.OverThrottledAc.Action=PowerActionNone; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.mach.OverThrottledAc.Action=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.OverThrottledAc.Action=PowerActionReserved; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.mach.OverThrottledAc.Action=4; - pp_compare.mach.OverThrottledAc.Action=2; - pp_compare.mach.pad1[2]=2; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.OverThrottledAc.Action=PowerActionSleep; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.mach.OverThrottledAc.Action=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.OverThrottledAc.Action=PowerActionHibernate; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.mach.OverThrottledAc.Action=2; - pp_compare.mach.pad1[2]=2; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.OverThrottledAc.Action=PowerActionShutdown; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.OverThrottledAc.Action=PowerActionShutdownReset; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.mach.OverThrottledAc.Action=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.OverThrottledAc.Action=PowerActionShutdownOff; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.OverThrottledAc.Action=PowerActionWarmEject; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.OverThrottledAc.Action=PowerActionWarmEject+1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.OverThrottledAc.Action=PowerActionWarmEject+2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - pPP_original->mach.OverThrottledAc.Action=PowerActionNone; - - - pPP_original->mach.OverThrottledDc.Action=PowerActionNone-2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.mach.OverThrottledDc.Action=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.OverThrottledDc.Action=PowerActionNone-1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.mach.OverThrottledDc.Action=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.OverThrottledDc.Action=PowerActionNone; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.mach.OverThrottledDc.Action=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.OverThrottledDc.Action=PowerActionReserved; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.mach.OverThrottledDc.Action=4; - pp_compare.mach.OverThrottledDc.Action=2; - pp_compare.mach.OverThrottledAc.Action=0; - pp_compare.mach.pad1[2]=0; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.OverThrottledDc.Action=PowerActionSleep; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.mach.OverThrottledDc.Action=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.OverThrottledDc.Action=PowerActionHibernate; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.mach.OverThrottledDc.Action=2; - pp_compare.mach.OverThrottledAc.Action=0; - pp_compare.mach.pad1[2]=0; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.OverThrottledDc.Action=PowerActionShutdown; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.OverThrottledDc.Action=PowerActionShutdownReset; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.mach.OverThrottledDc.Action=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.OverThrottledDc.Action=PowerActionShutdownOff; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.OverThrottledDc.Action=PowerActionWarmEject; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.OverThrottledDc.Action=PowerActionWarmEject+1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.OverThrottledDc.Action=PowerActionWarmEject+2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - pPP_original->mach.OverThrottledDc.Action=PowerActionNone; - - - pPP_original->mach.ReducedLatencySleepAc=PowerSystemUnspecified-2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.mach.ReducedLatencySleepAc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.ReducedLatencySleepAc=PowerSystemUnspecified-1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.mach.ReducedLatencySleepAc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.ReducedLatencySleepAc=PowerSystemUnspecified; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %x\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.mach.ReducedLatencySleepAc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.ReducedLatencySleepAc=PowerSystemWorking; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.mach.ReducedLatencySleepAc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.ReducedLatencySleepAc=PowerSystemSleeping1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.mach.ReducedLatencySleepAc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.ReducedLatencySleepAc=PowerSystemSleeping2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.mach.ReducedLatencySleepAc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.ReducedLatencySleepAc=PowerSystemSleeping3; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.ReducedLatencySleepAc=PowerSystemHibernate; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.mach.ReducedLatencySleepAc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.ReducedLatencySleepAc=PowerSystemShutdown; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %x\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.ReducedLatencySleepAc=PowerSystemMaximum; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %x\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.ReducedLatencySleepAc=PowerSystemMaximum+1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %x\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.ReducedLatencySleepAc=PowerSystemMaximum+2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %x\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - pPP_original->mach.ReducedLatencySleepAc=PowerSystemWorking; - - - pPP_original->mach.ReducedLatencySleepDc=PowerSystemUnspecified-2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.mach.ReducedLatencySleepDc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.ReducedLatencySleepDc=PowerSystemUnspecified-1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.mach.ReducedLatencySleepDc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.ReducedLatencySleepDc=PowerSystemUnspecified; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %x\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.mach.ReducedLatencySleepDc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.ReducedLatencySleepDc=PowerSystemWorking; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.mach.ReducedLatencySleepDc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.ReducedLatencySleepDc=PowerSystemSleeping1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.mach.ReducedLatencySleepDc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.ReducedLatencySleepDc=PowerSystemSleeping2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.mach.ReducedLatencySleepDc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.ReducedLatencySleepDc=PowerSystemSleeping3; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.ReducedLatencySleepDc=PowerSystemHibernate; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.mach.ReducedLatencySleepDc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.ReducedLatencySleepDc=PowerSystemShutdown; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %x\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.ReducedLatencySleepDc=PowerSystemMaximum; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %x\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.ReducedLatencySleepDc=PowerSystemMaximum+1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %x\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->mach.ReducedLatencySleepDc=PowerSystemMaximum+2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %x\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - pPP_original->mach.ReducedLatencySleepDc=PowerSystemWorking; - - - pPP_original->user.IdleAc.Action=PowerActionNone-2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.user.IdleAc.Action=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.IdleAc.Action=PowerActionNone-1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.user.IdleAc.Action=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.IdleAc.Action=PowerActionNone; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.user.IdleAc.Action=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.IdleAc.Action=PowerActionReserved; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.user.IdleAc.Action=4; - pp_compare.user.IdleAc.Action=2; - //pp_compare.user.pad1[2]=2; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.IdleAc.Action=PowerActionSleep; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.user.IdleAc.Action=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.IdleAc.Action=PowerActionHibernate; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.user.IdleAc.Action=2; - //pp_compare.user.pad1[2]=2; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.IdleAc.Action=PowerActionShutdown; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.IdleAc.Action=PowerActionShutdownReset; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.user.IdleAc.Action=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.IdleAc.Action=PowerActionShutdownOff; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.IdleAc.Action=PowerActionWarmEject; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.IdleAc.Action=PowerActionWarmEject+1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.IdleAc.Action=PowerActionWarmEject+2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - pPP_original->user.IdleAc.Action=PowerActionNone; - - - - pPP_original->user.IdleDc.Action=PowerActionNone-2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.user.IdleDc.Action=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.IdleDc.Action=PowerActionNone-1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.user.IdleDc.Action=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.IdleDc.Action=PowerActionNone; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.user.IdleDc.Action=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.IdleDc.Action=PowerActionReserved; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.user.IdleDc.Action=4; - pp_compare.user.IdleDc.Action=2; -// pp_compare.user.pad1[2]=2; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.IdleDc.Action=PowerActionSleep; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.user.IdleDc.Action=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.IdleDc.Action=PowerActionHibernate; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.user.IdleDc.Action=2; -// pp_compare.user.pad1[2]=2; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.IdleDc.Action=PowerActionShutdown; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.IdleDc.Action=PowerActionShutdownReset; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.user.IdleDc.Action=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.IdleDc.Action=PowerActionShutdownOff; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.IdleDc.Action=PowerActionWarmEject; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.IdleDc.Action=PowerActionWarmEject+1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.IdleDc.Action=PowerActionWarmEject+2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "expected ERROR_INVALID_DATA but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - pPP_original->user.IdleDc.Action=PowerActionNone; - - - pPP_original->user.MaxSleepAc=PowerSystemUnspecified-2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.user.MaxSleepAc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.MaxSleepAc=PowerSystemUnspecified-1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.user.MaxSleepAc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.MaxSleepAc=PowerSystemUnspecified; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.user.MaxSleepAc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.MaxSleepAc=PowerSystemWorking; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.user.MaxSleepAc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.MaxSleepAc=PowerSystemSleeping1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.user.MaxSleepAc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.MaxSleepAc=PowerSystemSleeping2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.user.MaxSleepAc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.MaxSleepAc=PowerSystemSleeping3; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.MaxSleepAc=PowerSystemHibernate; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.user.MaxSleepAc=4; - pp_compare.user.MaxSleepAc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.MaxSleepAc=PowerSystemShutdown; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.user.MaxSleepAc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.MaxSleepAc=PowerSystemMaximum; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.user.MaxSleepAc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.MaxSleepAc=PowerSystemMaximum+1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.user.MaxSleepAc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.MaxSleepAc=PowerSystemMaximum+2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.user.MaxSleepAc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - pPP_original->user.MaxSleepAc=PowerSystemSleeping3; - - - pPP_original->user.MaxSleepDc=PowerSystemUnspecified-2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.user.MaxSleepDc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.MaxSleepDc=PowerSystemUnspecified-1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.user.MaxSleepDc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.MaxSleepDc=PowerSystemUnspecified; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(!ret, "function was expected to fail\n"); - ok(GetLastError() == ERROR_GEN_FAILURE, "expected ERROR_GEN_FAILURE but got %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - //pp_compare.user.MaxSleepDc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.MaxSleepDc=PowerSystemWorking; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.user.MaxSleepDc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.MaxSleepDc=PowerSystemSleeping1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.user.MaxSleepDc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.MaxSleepDc=PowerSystemSleeping2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.user.MaxSleepDc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.MaxSleepDc=PowerSystemSleeping3; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.MaxSleepDc=PowerSystemHibernate; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.user.MaxSleepDc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.MaxSleepDc=PowerSystemShutdown; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.user.MaxSleepDc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.MaxSleepDc=PowerSystemMaximum; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.user.MaxSleepDc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.MaxSleepDc=PowerSystemMaximum+1; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.user.MaxSleepDc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - - pPP_original->user.MaxSleepDc=PowerSystemMaximum+2; - memcpy(&gpp, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&gpp_compare, pGPP_original, sizeof(GLOBAL_POWER_POLICY)); - memcpy(&pp, pPP_original, sizeof(POWER_POLICY)); - memcpy(&pp_compare, pPP_original, sizeof(POWER_POLICY)); - ret = ValidatePowerPolicies(&gpp,&pp); - ok(ret, "function was expected to succeed error %i\n",(UINT)GetLastError()); - ok(globalcompare(gpp,gpp_compare),"Difference Found\n"); - pp_compare.user.MaxSleepDc=4; - ok(compare(pp,pp_compare),"Difference Found\n"); - pPP_original->user.MaxSleepDc=PowerSystemSleeping3; - -} - -void test_WriteGlobalPwrPolicy(void) -{ -// WriteGlobalPwrPolicy(&gpp); -} - -void test_WriteProcessorPwrScheme(void) -{ -// WriteProcessorPwrScheme(0,&mppp); -} - -void test_WritePwrScheme(void) -{ - DWORD retval; - HKEY hSubKey; - LONG lSize; - LONG Err; - WCHAR szPath[MAX_PATH]; - static const WCHAR szTestSchemeName[] = {'P','o','w','r','p','r','o','f',0}; - static const WCHAR szTestSchemeDesc[] = {'P','o','w','r','p','r','o','f',' ','S','c','h','e','m','e',0}; - - /* - * create a temporarly profile, will be deleted in test_DeletePwrScheme - */ - - retval = WritePwrScheme(&g_TempPwrScheme, (LPWSTR)szTestSchemeName, (LPWSTR)szTestSchemeDesc, &g_PowerPolicy); - ok(retval, "Warning: function should have succeeded\n"); - if (RegOpenKeyW(HKEY_LOCAL_MACHINE, szMachPowerPoliciesSubKey, &hSubKey) == ERROR_SUCCESS) - { - lSize = MAX_PATH * sizeof(WCHAR); - Err = RegQueryValueW(hSubKey, szTempPwrScheme, szPath, &lSize); - if (Err != STATUS_SUCCESS) - printf("#1 failed to query subkey %i (testentry)\n", g_TempPwrScheme); - RegCloseKey(hSubKey); - } - -} - -void func_power(void) -{ - test_CallNtPowerInformation(); - test_CanUserWritePwrScheme(); - test_EnumPwrSchemes(); - test_GetSetActivePwrScheme(); - test_ReadPwrScheme(); - test_WritePwrScheme(); - test_DeletePwrScheme(); - test_GetPwrDiskSpindownRange(); - - test_GetCurrentPowerPolicies(); - - test_GetPwrCapabilities(); - test_IsAdminOverrideActive(); - test_IsPwrHibernateAllowed(); - test_IsPwrShutdownAllowed(); - test_IsPwrSuspendAllowed(); - test_ReadGlobalPwrPolicy(); - test_ReadProcessorPwrScheme(); - test_SetSuspendState(); - test_ValidatePowerPolicies_Old(); - test_ValidatePowerPolicies(); - test_WriteGlobalPwrPolicy(); - test_WriteProcessorPwrScheme(); - -} diff --git a/rostests/winetests/powrprof/testlist.c b/rostests/winetests/powrprof/testlist.c deleted file mode 100644 index 3575ce2458b..00000000000 --- a/rostests/winetests/powrprof/testlist.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -/* stdarg.h is needed for Winelib */ -#include -#include -#include -#include "windef.h" -#include "winbase.h" - -struct test -{ - const char *name; - void (*func)(void); -}; - -extern void func_power(void); - -const struct test winetest_testlist[] = -{ - { "power", func_power }, - { 0, 0 } -}; - -#define WINETEST_WANT_MAIN -#include "wine/test.h" diff --git a/rostests/winetests/psapi/CMakeLists.txt b/rostests/winetests/psapi/CMakeLists.txt deleted file mode 100644 index 343968f0fbe..00000000000 --- a/rostests/winetests/psapi/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(psapi_winetest psapi_main.c testlist.c) -target_link_libraries(psapi_winetest wine) -set_module_type(psapi_winetest win32cui) -add_importlibs(psapi_winetest psapi msvcrt kernel32 ntdll) -add_cd_file(TARGET psapi_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/psapi/psapi.rbuild b/rostests/winetests/psapi/psapi.rbuild deleted file mode 100644 index 689556c350c..00000000000 --- a/rostests/winetests/psapi/psapi.rbuild +++ /dev/null @@ -1,10 +0,0 @@ - - - - . - - ntdll - psapi - testlist.c - psapi_main.c - diff --git a/rostests/winetests/psapi/psapi_main.c b/rostests/winetests/psapi/psapi_main.c deleted file mode 100644 index 55eb9377c54..00000000000 --- a/rostests/winetests/psapi/psapi_main.c +++ /dev/null @@ -1,376 +0,0 @@ -/* - * Unit test suite for PSAPI - * - * Copyright (C) 2005 Felix Nawothnig - * - * 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 "windows.h" -#include "wine/test.h" -#include "psapi.h" - -#define expect_eq_d(expected, actual) \ - do { \ - int value = (actual); \ - ok((expected) == value, "Expected " #actual " to be %d (" #expected ") is %d\n", \ - (expected), value); \ - } while (0) - -#define PSAPI_GET_PROC(func) \ - p ## func = (void*)GetProcAddress(hpsapi, #func); \ - if(!p ## func) { \ - ok(0, "GetProcAddress(%s) failed\n", #func); \ - FreeLibrary(hpsapi); \ - return FALSE; \ - } - -/* All PSAPI functions return non-zero and call SetLastError() - * on failure so we can use some macros for convenience */ - -#define w32_suc(x) \ - (SetLastError(0xdeadbeef), \ - (x) \ - ? (ok(1, "succeeded\n"), 1) \ - : GetLastError() == 0xdeadbeef \ - ? (ok(0, "failed without error code\n"), 0) \ - : (ok(0, "failed with %d\n", GetLastError()), 0)) - -#define w32_err(x, e) \ - (SetLastError(0xdeadbeef), \ - (x) \ - ? (ok(0, "expected error=%d but succeeded\n", e), 0) \ - : GetLastError() == e \ - ? (ok(1, "failed with %d\n", e), 1) \ - : GetLastError() == 0xdeadbeef \ - ? (ok(0, "failed without error code\n"), 0) \ - : (ok(0, "expected error=%d but failed with %d\n", \ - e, GetLastError()), 0)) - -static BOOL (WINAPI *pEmptyWorkingSet)(HANDLE); -static BOOL (WINAPI *pEnumProcesses)(DWORD*, DWORD, DWORD*); -static BOOL (WINAPI *pEnumProcessModules)(HANDLE, HMODULE*, DWORD, LPDWORD); -static DWORD (WINAPI *pGetModuleBaseNameA)(HANDLE, HMODULE, LPSTR, DWORD); -static DWORD (WINAPI *pGetModuleFileNameExA)(HANDLE, HMODULE, LPSTR, DWORD); -static BOOL (WINAPI *pGetModuleInformation)(HANDLE, HMODULE, LPMODULEINFO, DWORD); -static DWORD (WINAPI *pGetMappedFileNameA)(HANDLE, LPVOID, LPSTR, DWORD); -static DWORD (WINAPI *pGetProcessImageFileNameA)(HANDLE, LPSTR, DWORD); -static DWORD (WINAPI *pGetProcessImageFileNameW)(HANDLE, LPWSTR, DWORD); -static BOOL (WINAPI *pGetProcessMemoryInfo)(HANDLE, PPROCESS_MEMORY_COUNTERS, DWORD); -static BOOL (WINAPI *pGetWsChanges)(HANDLE, PPSAPI_WS_WATCH_INFORMATION, DWORD); -static BOOL (WINAPI *pInitializeProcessForWsWatch)(HANDLE); -static BOOL (WINAPI *pQueryWorkingSet)(HANDLE, PVOID, DWORD); - -static BOOL InitFunctionPtrs(HMODULE hpsapi) -{ - PSAPI_GET_PROC(EmptyWorkingSet); - PSAPI_GET_PROC(EnumProcessModules); - PSAPI_GET_PROC(EnumProcesses); - PSAPI_GET_PROC(GetModuleBaseNameA); - PSAPI_GET_PROC(GetModuleFileNameExA); - PSAPI_GET_PROC(GetModuleInformation); - PSAPI_GET_PROC(GetMappedFileNameA); - PSAPI_GET_PROC(GetProcessMemoryInfo); - PSAPI_GET_PROC(GetWsChanges); - PSAPI_GET_PROC(InitializeProcessForWsWatch); - PSAPI_GET_PROC(QueryWorkingSet); - /* GetProcessImageFileName is not exported on NT4 */ - pGetProcessImageFileNameA = - (void *)GetProcAddress(hpsapi, "GetProcessImageFileNameA"); - pGetProcessImageFileNameW = - (void *)GetProcAddress(hpsapi, "GetProcessImageFileNameW"); - return TRUE; -} - -static HANDLE hpSR, hpQI, hpVR, hpQV, hpAA; -static const HANDLE hBad = (HANDLE)0xdeadbeef; - -static void test_EnumProcesses(void) -{ - DWORD pid, cbUsed = 0xdeadbeef; - - if(w32_suc(pEnumProcesses(NULL, 0, &cbUsed))) - ok(cbUsed == 0, "cbUsed=%d\n", cbUsed); - if(w32_suc(pEnumProcesses(&pid, 4, &cbUsed))) - ok(cbUsed == 4, "cbUsed=%d\n", cbUsed); -} - -static void test_EnumProcessModules(void) -{ - HMODULE hMod = GetModuleHandle(NULL); - DWORD cbNeeded = 0xdeadbeef; - - w32_err(pEnumProcessModules(NULL, NULL, 0, &cbNeeded), ERROR_INVALID_HANDLE); - w32_err(pEnumProcessModules(hpQI, NULL, 0, &cbNeeded), ERROR_ACCESS_DENIED); - w32_suc(pEnumProcessModules(hpQV, NULL, 0, &cbNeeded)); - if(!w32_suc(pEnumProcessModules(hpQV, &hMod, sizeof(HMODULE), &cbNeeded))) - return; - ok(cbNeeded / sizeof(HMODULE) >= 3 && cbNeeded / sizeof(HMODULE) <= 5 * sizeof(HMODULE), - "cbNeeded=%d\n", cbNeeded); - ok(hMod == GetModuleHandle(NULL), - "hMod=%p GetModuleHandle(NULL)=%p\n", hMod, GetModuleHandle(NULL)); -} - -static void test_GetModuleInformation(void) -{ - HMODULE hMod = GetModuleHandle(NULL); - MODULEINFO info; - - w32_err(pGetModuleInformation(NULL, hMod, &info, sizeof(info)), ERROR_INVALID_HANDLE); - w32_err(pGetModuleInformation(hpQI, hMod, &info, sizeof(info)), ERROR_ACCESS_DENIED); - w32_err(pGetModuleInformation(hpQV, hBad, &info, sizeof(info)), ERROR_INVALID_HANDLE); - w32_err(pGetModuleInformation(hpQV, hMod, &info, sizeof(info)-1), ERROR_INSUFFICIENT_BUFFER); - if(w32_suc(pGetModuleInformation(hpQV, hMod, &info, sizeof(info)))) - ok(info.lpBaseOfDll == hMod, "lpBaseOfDll=%p hMod=%p\n", info.lpBaseOfDll, hMod); -} - -static void test_GetProcessMemoryInfo(void) -{ - PROCESS_MEMORY_COUNTERS pmc; - - w32_err(pGetProcessMemoryInfo(NULL, &pmc, sizeof(pmc)), ERROR_INVALID_HANDLE); - todo_wine w32_err(pGetProcessMemoryInfo(hpSR, &pmc, sizeof(pmc)), ERROR_ACCESS_DENIED); - w32_err(pGetProcessMemoryInfo(hpQI, &pmc, sizeof(pmc)-1), ERROR_INSUFFICIENT_BUFFER); - w32_suc(pGetProcessMemoryInfo(hpQI, &pmc, sizeof(pmc))); -} - -static void test_GetMappedFileName(void) -{ - HMODULE hMod = GetModuleHandle(NULL); - char szMapPath[MAX_PATH], szModPath[MAX_PATH], *szMapBaseName; - DWORD ret; - - w32_err(pGetMappedFileNameA(NULL, hMod, szMapPath, sizeof(szMapPath)), ERROR_INVALID_HANDLE); - w32_err(pGetMappedFileNameA(hpSR, hMod, szMapPath, sizeof(szMapPath)), ERROR_ACCESS_DENIED); - - SetLastError( 0xdeadbeef ); - ret = pGetMappedFileNameA(hpQI, hMod, szMapPath, sizeof(szMapPath)); - ok( ret || broken(GetLastError() == ERROR_UNEXP_NET_ERR), /* win2k */ - "GetMappedFileNameA failed with error %u\n", GetLastError() ); - if (!ret) return; - ok(ret == strlen(szMapPath), "szMapPath=\"%s\" ret=%d\n", szMapPath, ret); - ok(szMapPath[0] == '\\', "szMapPath=\"%s\"\n", szMapPath); - szMapBaseName = strrchr(szMapPath, '\\'); /* That's close enough for us */ - if(!szMapBaseName || !*szMapBaseName) - { - ok(0, "szMapPath=\"%s\"\n", szMapPath); - return; - } - GetModuleFileNameA(NULL, szModPath, sizeof(szModPath)); - ok(!strcmp(strrchr(szModPath, '\\'), szMapBaseName), - "szModPath=\"%s\" szMapBaseName=\"%s\"\n", szModPath, szMapBaseName); -} - -static void test_GetProcessImageFileName(void) -{ - HMODULE hMod = GetModuleHandle(NULL); - char szImgPath[MAX_PATH], szMapPath[MAX_PATH]; - WCHAR szImgPathW[MAX_PATH]; - DWORD ret; - - if(pGetProcessImageFileNameA == NULL) - return; - - /* This function is available on WinXP+ only */ - SetLastError(0xdeadbeef); - if(!pGetProcessImageFileNameA(hpQI, szImgPath, sizeof(szImgPath))) - { - if(GetLastError() == ERROR_INVALID_FUNCTION) { - win_skip("GetProcessImageFileName not implemented\n"); - return; - } - - if(GetLastError() == 0xdeadbeef) - todo_wine ok(0, "failed without error code\n"); - else - todo_wine ok(0, "failed with %d\n", GetLastError()); - } - - todo_wine w32_err(pGetProcessImageFileNameA(NULL, szImgPath, sizeof(szImgPath)), ERROR_INVALID_HANDLE); - todo_wine w32_err(pGetProcessImageFileNameA(hpSR, szImgPath, sizeof(szImgPath)), ERROR_ACCESS_DENIED); - todo_wine w32_err(pGetProcessImageFileNameA(hpQI, szImgPath, 0), ERROR_INSUFFICIENT_BUFFER); - todo_wine - if(w32_suc(ret = pGetProcessImageFileNameA(hpQI, szImgPath, sizeof(szImgPath))) && - w32_suc(pGetMappedFileNameA(hpQV, hMod, szMapPath, sizeof(szMapPath)))) { - /* Windows returns 2*strlen-1 */ - ok(ret >= strlen(szImgPath), "szImgPath=\"%s\" ret=%d\n", szImgPath, ret); - ok(!strcmp(szImgPath, szMapPath), - "szImgPath=\"%s\" szMapPath=\"%s\"\n", szImgPath, szMapPath); - } - - w32_err(pGetProcessImageFileNameW(NULL, szImgPathW, sizeof(szImgPathW)), ERROR_INVALID_HANDLE); - /* no information about correct buffer size returned: */ - w32_err(pGetProcessImageFileNameW(hpQI, szImgPathW, 0), ERROR_INSUFFICIENT_BUFFER); - w32_err(pGetProcessImageFileNameW(hpQI, NULL, 0), ERROR_INSUFFICIENT_BUFFER); - - /* correct call */ - memset(szImgPathW, 0xff, sizeof(szImgPathW)); - ret = pGetProcessImageFileNameW(hpQI, szImgPathW, sizeof(szImgPathW)/sizeof(WCHAR)); - ok(ret > 0, "GetProcessImageFileNameW should have succeeded.\n"); - ok(szImgPathW[0] == '\\', "GetProcessImageFileNameW should have returned an NT path.\n"); - expect_eq_d(lstrlenW(szImgPathW), ret); - - /* boundary values of 'size' */ - w32_err(pGetProcessImageFileNameW(hpQI, szImgPathW, ret), ERROR_INSUFFICIENT_BUFFER); - - memset(szImgPathW, 0xff, sizeof(szImgPathW)); - ret = pGetProcessImageFileNameW(hpQI, szImgPathW, ret + 1); - ok(ret > 0, "GetProcessImageFileNameW should have succeeded.\n"); - ok(szImgPathW[0] == '\\', "GetProcessImageFileNameW should have returned an NT path.\n"); - expect_eq_d(lstrlenW(szImgPathW), ret); -} - -static void test_GetModuleFileNameEx(void) -{ - HMODULE hMod = GetModuleHandle(NULL); - char szModExPath[MAX_PATH+1], szModPath[MAX_PATH+1]; - DWORD ret; - - w32_err(pGetModuleFileNameExA(NULL, hMod, szModExPath, sizeof(szModExPath)), ERROR_INVALID_HANDLE); - w32_err(pGetModuleFileNameExA(hpQI, hMod, szModExPath, sizeof(szModExPath)), ERROR_ACCESS_DENIED); - w32_err(pGetModuleFileNameExA(hpQV, hBad, szModExPath, sizeof(szModExPath)), ERROR_INVALID_HANDLE); - if(!w32_suc(ret = pGetModuleFileNameExA(hpQV, NULL, szModExPath, sizeof(szModExPath)))) - return; - ok(ret == strlen(szModExPath), "szModExPath=\"%s\" ret=%d\n", szModExPath, ret); - GetModuleFileNameA(NULL, szModPath, sizeof(szModPath)); - ok(!strncmp(szModExPath, szModPath, MAX_PATH), - "szModExPath=\"%s\" szModPath=\"%s\"\n", szModExPath, szModPath); -} - -static void test_GetModuleBaseName(void) -{ - HMODULE hMod = GetModuleHandle(NULL); - char szModPath[MAX_PATH], szModBaseName[MAX_PATH]; - DWORD ret; - - w32_err(pGetModuleBaseNameA(NULL, hMod, szModBaseName, sizeof(szModBaseName)), ERROR_INVALID_HANDLE); - w32_err(pGetModuleBaseNameA(hpQI, hMod, szModBaseName, sizeof(szModBaseName)), ERROR_ACCESS_DENIED); - w32_err(pGetModuleBaseNameA(hpQV, hBad, szModBaseName, sizeof(szModBaseName)), ERROR_INVALID_HANDLE); - if(!w32_suc(ret = pGetModuleBaseNameA(hpQV, NULL, szModBaseName, sizeof(szModBaseName)))) - return; - ok(ret == strlen(szModBaseName), "szModBaseName=\"%s\" ret=%d\n", szModBaseName, ret); - GetModuleFileNameA(NULL, szModPath, sizeof(szModPath)); - ok(!strcmp(strrchr(szModPath, '\\') + 1, szModBaseName), - "szModPath=\"%s\" szModBaseName=\"%s\"\n", szModPath, szModBaseName); -} - -static void test_ws_functions(void) -{ - PSAPI_WS_WATCH_INFORMATION wswi[4096]; - ULONG_PTR pages[4096]; - char *addr; - unsigned int i; - BOOL ret; - - todo_wine w32_err(pEmptyWorkingSet(NULL), ERROR_INVALID_HANDLE); - todo_wine w32_err(pEmptyWorkingSet(hpSR), ERROR_ACCESS_DENIED); - w32_suc(pEmptyWorkingSet(hpAA)); - - SetLastError( 0xdeadbeef ); - ret = pInitializeProcessForWsWatch( NULL ); - todo_wine ok( !ret, "InitializeProcessForWsWatch succeeded\n" ); - if (!ret) - { - if (GetLastError() == ERROR_INVALID_FUNCTION) /* not supported on xp in wow64 mode */ - { - trace( "InitializeProcessForWsWatch not supported\n" ); - return; - } - ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError() ); - } - w32_suc(pInitializeProcessForWsWatch(hpAA)); - - if(!w32_suc(addr = VirtualAlloc(NULL, 1, MEM_COMMIT, PAGE_READWRITE))) - return; - - *addr = 0; /* make sure it's paged in (needed on wow64) */ - if(!VirtualLock(addr, 1)) - { - trace("locking failed (error=%d) - skipping test\n", GetLastError()); - goto free_page; - } - - todo_wine if(w32_suc(pQueryWorkingSet(hpQI, pages, 4096 * sizeof(ULONG_PTR)))) - { - for(i = 0; i < pages[0]; i++) - if((pages[i+1] & ~0xfffL) == (ULONG_PTR)addr) - { - ok(1, "QueryWorkingSet found our page\n"); - goto test_gwsc; - } - - ok(0, "QueryWorkingSet didn't find our page\n"); - } - -test_gwsc: - todo_wine if(w32_suc(pGetWsChanges(hpQI, wswi, sizeof(wswi)))) - { - for(i = 0; wswi[i].FaultingVa; i++) - if(((ULONG_PTR)wswi[i].FaultingVa & ~0xfffL) == (ULONG_PTR)addr) - { - ok(1, "GetWsChanges found our page\n"); - goto free_page; - } - - ok(0, "GetWsChanges didn't find our page\n"); - } - -free_page: - VirtualFree(addr, 0, MEM_RELEASE); -} - -START_TEST(psapi_main) -{ - HMODULE hpsapi = LoadLibraryA("psapi.dll"); - - if(!hpsapi) - { - trace("Could not load psapi.dll\n"); - return; - } - - if(InitFunctionPtrs(hpsapi)) - { - DWORD pid = GetCurrentProcessId(); - - w32_suc(hpSR = OpenProcess(STANDARD_RIGHTS_REQUIRED, FALSE, pid)); - w32_suc(hpQI = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid)); - w32_suc(hpVR = OpenProcess(PROCESS_VM_READ, FALSE, pid)); - w32_suc(hpQV = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid)); - w32_suc(hpAA = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid)); - if(hpSR && hpQI && hpVR && hpQV && hpAA) - { - test_EnumProcesses(); - test_EnumProcessModules(); - test_GetModuleInformation(); - test_GetProcessMemoryInfo(); - todo_wine test_GetMappedFileName(); - test_GetProcessImageFileName(); - test_GetModuleFileNameEx(); - test_GetModuleBaseName(); - test_ws_functions(); - } - CloseHandle(hpSR); - CloseHandle(hpQI); - CloseHandle(hpVR); - CloseHandle(hpQV); - CloseHandle(hpAA); - } - - FreeLibrary(hpsapi); -} diff --git a/rostests/winetests/psapi/testlist.c b/rostests/winetests/psapi/testlist.c deleted file mode 100644 index 2ceb3610a4d..00000000000 --- a/rostests/winetests/psapi/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_psapi_main(void); - -const struct test winetest_testlist[] = -{ - { "psapi_main", func_psapi_main }, - { 0, 0 } -}; diff --git a/rostests/winetests/qmgr/CMakeLists.txt b/rostests/winetests/qmgr/CMakeLists.txt deleted file mode 100644 index 06e6baead15..00000000000 --- a/rostests/winetests/qmgr/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ - -add_definitions(-D__ROS_LONG64__) - -list(APPEND SOURCE - enum_files.c - enum_jobs.c - file.c - job.c - qmgr.c - testlist.c) - -add_executable(qmgr_winetest ${SOURCE}) -target_link_libraries(qmgr_winetest wine) - -if(MSVC) - target_link_libraries(qmgr_winetest uuid) -endif() - -set_module_type(qmgr_winetest win32cui) -add_importlibs(qmgr_winetest ole32 shlwapi user32 msvcrt kernel32 ntdll) -add_cd_file(TARGET qmgr_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/qmgr/enum_files.c b/rostests/winetests/qmgr/enum_files.c deleted file mode 100644 index eeb80095829..00000000000 --- a/rostests/winetests/qmgr/enum_files.c +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Unit test suite for Enum Background Copy Files Interface - * - * Copyright 2007, 2008 Google (Roy Shea, Dan Hipschman) - * - * 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 - -#define COBJMACROS - -#include "wine/test.h" -#include "bits.h" - -/* Globals used by many tests */ -#define NUM_FILES 2 /* At least two. */ -static const WCHAR test_remoteNameA[] = {'r','e','m','o','t','e','A', 0}; -static const WCHAR test_localNameA[] = {'l','o','c','a','l','A', 0}; -static const WCHAR test_remoteNameB[] = {'r','e','m','o','t','e','B', 0}; -static const WCHAR test_localNameB[] = {'l','o','c','a','l','B', 0}; -static const WCHAR test_displayName[] = {'T', 'e', 's', 't', 0}; -static const ULONG test_fileCount = NUM_FILES; -static IBackgroundCopyJob *test_job; -static IBackgroundCopyManager *test_manager; -static IEnumBackgroundCopyFiles *test_enumFiles; - -/* Helper function to add a file to a job. The helper function takes base - file name and creates properly formed path and URL strings for creation of - the file. */ -static HRESULT addFileHelper(IBackgroundCopyJob* job, - const WCHAR *localName, const WCHAR *remoteName) -{ - DWORD urlSize; - WCHAR localFile[MAX_PATH]; - WCHAR remoteUrl[MAX_PATH]; - WCHAR remoteFile[MAX_PATH]; - - GetCurrentDirectoryW(MAX_PATH, localFile); - PathAppendW(localFile, localName); - GetCurrentDirectoryW(MAX_PATH, remoteFile); - PathAppendW(remoteFile, remoteName); - urlSize = MAX_PATH; - UrlCreateFromPathW(remoteFile, remoteUrl, &urlSize, 0); - UrlUnescapeW(remoteUrl, NULL, &urlSize, URL_UNESCAPE_INPLACE); - return IBackgroundCopyJob_AddFile(test_job, remoteUrl, localFile); -} - -/* Generic test setup */ -static BOOL setup(void) -{ - HRESULT hres; - GUID test_jobId; - - hres = CoCreateInstance(&CLSID_BackgroundCopyManager, NULL, - CLSCTX_LOCAL_SERVER, &IID_IBackgroundCopyManager, - (void **) &test_manager); - if(hres != S_OK) - return FALSE; - - hres = IBackgroundCopyManager_CreateJob(test_manager, test_displayName, - BG_JOB_TYPE_DOWNLOAD, &test_jobId, - &test_job); - if(hres != S_OK) - { - IBackgroundCopyManager_Release(test_manager); - return FALSE; - } - - if (addFileHelper(test_job, test_localNameA, test_remoteNameA) != S_OK - || addFileHelper(test_job, test_localNameB, test_remoteNameB) != S_OK - || IBackgroundCopyJob_EnumFiles(test_job, &test_enumFiles) != S_OK) - { - IBackgroundCopyJob_Release(test_job); - IBackgroundCopyManager_Release(test_manager); - return FALSE; - } - - return TRUE; -} - -/* Generic test cleanup */ -static void teardown(void) -{ - IEnumBackgroundCopyFiles_Release(test_enumFiles); - IBackgroundCopyJob_Release(test_job); - IBackgroundCopyManager_Release(test_manager); -} - -/* Test GetCount */ -static void test_GetCount(void) -{ - HRESULT hres; - ULONG fileCount; - - hres = IEnumBackgroundCopyFiles_GetCount(test_enumFiles, &fileCount); - ok(hres == S_OK, "GetCount failed: %08x\n", hres); - if(hres != S_OK) - { - skip("Unable to get count from test_enumFiles.\n"); - return; - } - ok(fileCount == test_fileCount, "Got incorrect count\n"); -} - -/* Test Next with a NULL pceltFetched*/ -static void test_Next_walkListNull(void) -{ - HRESULT hres; - IBackgroundCopyFile *file; - ULONG i; - - /* Fetch the available files */ - for (i = 0; i < test_fileCount; i++) - { - hres = IEnumBackgroundCopyFiles_Next(test_enumFiles, 1, &file, NULL); - ok(hres == S_OK, "Next failed: %08x\n", hres); - if(hres != S_OK) - { - skip("Unable to get file from test_enumFiles\n"); - return; - } - IBackgroundCopyFile_Release(file); - } - - /* Attempt to fetch one more than the number of available files */ - hres = IEnumBackgroundCopyFiles_Next(test_enumFiles, 1, &file, NULL); - ok(hres == S_FALSE, "Next off end of available files failed: %08x\n", hres); -} - -/* Test Next by requesting one file at a time */ -static void test_Next_walkList_1(void) -{ - HRESULT hres; - IBackgroundCopyFile *file; - ULONG fetched; - ULONG i; - - /* Fetch the available files */ - for (i = 0; i < test_fileCount; i++) - { - file = NULL; - fetched = 0; - hres = IEnumBackgroundCopyFiles_Next(test_enumFiles, 1, &file, &fetched); - ok(hres == S_OK, "Next failed: %08x\n", hres); - if(hres != S_OK) - { - skip("Unable to get file from test_enumFiles\n"); - return; - } - ok(fetched == 1, "Next returned the incorrect number of files: %08x\n", hres); - ok(file != NULL, "Next returned NULL\n"); - if (file) - IBackgroundCopyFile_Release(file); - } - - /* Attempt to fetch one more than the number of available files */ - fetched = 0; - hres = IEnumBackgroundCopyFiles_Next(test_enumFiles, 1, &file, &fetched); - ok(hres == S_FALSE, "Next off end of available files failed: %08x\n", hres); - ok(fetched == 0, "Next returned the incorrect number of files: %08x\n", hres); -} - -/* Test Next by requesting multiple files at a time */ -static void test_Next_walkList_2(void) -{ - HRESULT hres; - IBackgroundCopyFile *files[NUM_FILES]; - ULONG fetched; - ULONG i; - - for (i = 0; i < test_fileCount; i++) - files[i] = NULL; - - fetched = 0; - hres = IEnumBackgroundCopyFiles_Next(test_enumFiles, test_fileCount, files, &fetched); - ok(hres == S_OK, "Next failed: %08x\n", hres); - if(hres != S_OK) - { - skip("Unable to get file from test_enumFiles\n"); - return; - } - ok(fetched == test_fileCount, "Next returned the incorrect number of files: %08x\n", hres); - - for (i = 0; i < test_fileCount; i++) - { - ok(files[i] != NULL, "Next returned NULL\n"); - if (files[i]) - IBackgroundCopyFile_Release(files[i]); - } -} - -/* Test Next Error conditions */ -static void test_Next_errors(void) -{ - HRESULT hres; - IBackgroundCopyFile *files[NUM_FILES]; - - /* E_INVALIDARG: pceltFetched can ONLY be NULL if celt is 1 */ - hres = IEnumBackgroundCopyFiles_Next(test_enumFiles, 2, files, NULL); - ok(hres == E_INVALIDARG, "Invalid call to Next succeeded: %08x\n", hres); -} - -/* Test skipping through the files in a list */ -static void test_Skip_walkList(void) -{ - HRESULT hres; - ULONG i; - - for (i = 0; i < test_fileCount; i++) - { - hres = IEnumBackgroundCopyFiles_Skip(test_enumFiles, 1); - ok(hres == S_OK, "Skip failed: %08x\n", hres); - if(hres != S_OK) - { - skip("Unable to propely Skip files\n"); - return; - } - } - - hres = IEnumBackgroundCopyFiles_Skip(test_enumFiles, 1); - ok(hres == S_FALSE, "Skip expected end of list: %08x\n", hres); -} - -/* Test skipping off the end of the list */ -static void test_Skip_offEnd(void) -{ - HRESULT hres; - - hres = IEnumBackgroundCopyFiles_Skip(test_enumFiles, test_fileCount + 1); - ok(hres == S_FALSE, "Skip expected end of list: %08x\n", hres); -} - -/* Test resetting the file enumerator */ -static void test_Reset(void) -{ - HRESULT hres; - - hres = IEnumBackgroundCopyFiles_Skip(test_enumFiles, test_fileCount); - ok(hres == S_OK, "Skip failed: %08x\n", hres); - hres = IEnumBackgroundCopyFiles_Reset(test_enumFiles); - ok(hres == S_OK, "Reset failed: %08x\n", hres); - if(hres != S_OK) - { - skip("Unable to Reset enumerator\n"); - return; - } - hres = IEnumBackgroundCopyFiles_Skip(test_enumFiles, test_fileCount); - ok(hres == S_OK, "Reset failed: %08x\n", hres); -} - -typedef void (*test_t)(void); - -START_TEST(enum_files) -{ - static const test_t tests[] = { - test_GetCount, - test_Next_walkListNull, - test_Next_walkList_1, - test_Next_walkList_2, - test_Next_errors, - test_Skip_walkList, - test_Skip_offEnd, - test_Reset, - 0 - }; - const test_t *test; - - CoInitialize(NULL); - for (test = tests; *test; ++test) - { - /* Keep state separate between tests. */ - if (!setup()) - { - skip("Unable to setup test\n"); - break; - } - (*test)(); - teardown(); - } - CoUninitialize(); -} diff --git a/rostests/winetests/qmgr/enum_jobs.c b/rostests/winetests/qmgr/enum_jobs.c deleted file mode 100644 index f95404c041c..00000000000 --- a/rostests/winetests/qmgr/enum_jobs.c +++ /dev/null @@ -1,324 +0,0 @@ -/* - * Unit test suite for Enum Background Copy Jobs Interface - * - * Copyright 2007 Google (Roy Shea, Dan Hipschman) - * - * 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 COBJMACROS - -#include "wine/test.h" -#include "bits.h" - -/* Globals used by many tests */ -static const WCHAR test_displayNameA[] = {'T','e','s','t','A', 0}; -static const WCHAR test_displayNameB[] = {'T','e','s','t','B', 0}; -static IBackgroundCopyManager *test_manager; -static IBackgroundCopyJob *test_jobA; -static IBackgroundCopyJob *test_jobB; -static ULONG test_jobCountB; -static IEnumBackgroundCopyJobs *test_enumJobsA; -static IEnumBackgroundCopyJobs *test_enumJobsB; -static GUID test_jobIdA; -static GUID test_jobIdB; - -/* Generic test setup */ -static BOOL setup(void) -{ - HRESULT hres; - - test_manager = NULL; - test_jobA = NULL; - test_jobB = NULL; - memset(&test_jobIdA, 0, sizeof test_jobIdA); - memset(&test_jobIdB, 0, sizeof test_jobIdB); - - hres = CoCreateInstance(&CLSID_BackgroundCopyManager, NULL, - CLSCTX_LOCAL_SERVER, &IID_IBackgroundCopyManager, - (void **) &test_manager); - if(hres != S_OK) - return FALSE; - - hres = IBackgroundCopyManager_CreateJob(test_manager, test_displayNameA, - BG_JOB_TYPE_DOWNLOAD, &test_jobIdA, - &test_jobA); - if(hres != S_OK) - return FALSE; - - hres = IBackgroundCopyManager_EnumJobs(test_manager, 0, &test_enumJobsA); - if(hres != S_OK) - return FALSE; - - hres = IBackgroundCopyManager_CreateJob(test_manager, test_displayNameB, - BG_JOB_TYPE_DOWNLOAD, &test_jobIdB, - &test_jobB); - if(hres != S_OK) - return FALSE; - - hres = IBackgroundCopyManager_EnumJobs(test_manager, 0, &test_enumJobsB); - if(hres != S_OK) - return FALSE; - - hres = IEnumBackgroundCopyJobs_GetCount(test_enumJobsB, &test_jobCountB); - if (hres != S_OK) - return FALSE; - - return TRUE; -} - -/* Generic test cleanup */ -static void teardown(void) -{ - if (test_enumJobsB) - IEnumBackgroundCopyJobs_Release(test_enumJobsB); - test_enumJobsB = NULL; - if (test_jobB) - IBackgroundCopyJob_Release(test_jobB); - test_jobB = NULL; - if (test_enumJobsA) - IEnumBackgroundCopyJobs_Release(test_enumJobsA); - test_enumJobsA = NULL; - if (test_jobA) - IBackgroundCopyJob_Release(test_jobA); - test_jobA = NULL; - if (test_manager) - IBackgroundCopyManager_Release(test_manager); - test_manager = NULL; -} - -/* We can't assume the job count will start at any fixed number since esp - when testing on Windows there may be other jobs created by other - processes. Even this approach of creating two jobs and checking the - difference in counts could fail if a job was created in between, but - it's probably not worth worrying about in sane test environments. */ -static void test_GetCount(void) -{ - HRESULT hres; - ULONG jobCountA, jobCountB; - - hres = IEnumBackgroundCopyJobs_GetCount(test_enumJobsA, &jobCountA); - ok(hres == S_OK, "GetCount failed: %08x\n", hres); - if(hres != S_OK) - { - skip("Couldn't get job count\n"); - return; - } - - hres = IEnumBackgroundCopyJobs_GetCount(test_enumJobsB, &jobCountB); - ok(hres == S_OK, "GetCount failed: %08x\n", hres); - if(hres != S_OK) - { - skip("Couldn't get job count\n"); - return; - } - - ok(jobCountB == jobCountA + 1, "Got incorrect count\n"); -} - -/* Test Next with a NULL pceltFetched*/ -static void test_Next_walkListNull(void) -{ - HRESULT hres; - IBackgroundCopyJob *job; - ULONG i; - - /* Fetch the available jobs */ - for (i = 0; i < test_jobCountB; i++) - { - hres = IEnumBackgroundCopyJobs_Next(test_enumJobsB, 1, &job, NULL); - ok(hres == S_OK, "Next failed: %08x\n", hres); - if(hres != S_OK) - { - skip("Unable to get job from Next\n"); - return; - } - IBackgroundCopyJob_Release(job); - } - - /* Attempt to fetch one more than the number of available jobs */ - hres = IEnumBackgroundCopyJobs_Next(test_enumJobsB, 1, &job, NULL); - ok(hres == S_FALSE, "Next off end of available jobs failed: %08x\n", hres); -} - -/* Test Next */ -static void test_Next_walkList_1(void) -{ - HRESULT hres; - IBackgroundCopyJob *job; - ULONG fetched; - ULONG i; - - /* Fetch the available jobs */ - for (i = 0; i < test_jobCountB; i++) - { - fetched = 0; - hres = IEnumBackgroundCopyJobs_Next(test_enumJobsB, 1, &job, &fetched); - ok(hres == S_OK, "Next failed: %08x\n", hres); - if(hres != S_OK) - { - skip("Unable to get job from Next\n"); - return; - } - ok(fetched == 1, "Next returned the incorrect number of jobs: %08x\n", hres); - IBackgroundCopyJob_Release(job); - } - - /* Attempt to fetch one more than the number of available jobs */ - fetched = 0; - hres = IEnumBackgroundCopyJobs_Next(test_enumJobsB, 1, &job, &fetched); - ok(hres == S_FALSE, "Next off end of available jobs failed: %08x\n", hres); - ok(fetched == 0, "Next returned the incorrect number of jobs: %08x\n", hres); -} - -/* Test Next by requesting multiple files at a time */ -static void test_Next_walkList_2(void) -{ - HRESULT hres; - IBackgroundCopyJob **jobs; - ULONG fetched; - ULONG i; - - jobs = HeapAlloc(GetProcessHeap(), 0, test_jobCountB * sizeof *jobs); - if (!jobs) - { - skip("Couldn't allocate memory\n"); - return; - } - - for (i = 0; i < test_jobCountB; i++) - jobs[i] = NULL; - - fetched = 0; - hres = IEnumBackgroundCopyJobs_Next(test_enumJobsB, test_jobCountB, jobs, &fetched); - ok(hres == S_OK, "Next failed: %08x\n", hres); - if(hres != S_OK) - { - skip("Unable to get file from test_enumJobs\n"); - HeapFree(GetProcessHeap(), 0, jobs); - return; - } - ok(fetched == test_jobCountB, "Next returned the incorrect number of jobs: %08x\n", hres); - - for (i = 0; i < test_jobCountB; i++) - { - ok(jobs[i] != NULL, "Next returned NULL\n"); - if (jobs[i]) - IBackgroundCopyFile_Release(jobs[i]); - } - - HeapFree(GetProcessHeap(), 0, jobs); -} - -/* Test Next Error conditions */ -static void test_Next_errors(void) -{ - HRESULT hres; - IBackgroundCopyJob *jobs[2]; - - /* E_INVALIDARG: pceltFetched can ONLY be NULL if celt is 1 */ - hres = IEnumBackgroundCopyJobs_Next(test_enumJobsB, 2, jobs, NULL); - ok(hres != S_OK, "Invalid call to Next succeeded: %08x\n", hres); -} - -/* Test skipping through the jobs in a list */ -static void test_Skip_walkList(void) -{ - HRESULT hres; - ULONG i; - - for (i = 0; i < test_jobCountB; i++) - { - hres = IEnumBackgroundCopyJobs_Skip(test_enumJobsB, 1); - ok(hres == S_OK, "Skip failed: %08x\n", hres); - if(hres != S_OK) - { - skip("Unable to propely Skip jobs\n"); - return; - } - } - - hres = IEnumBackgroundCopyJobs_Skip(test_enumJobsB, 1); - ok(hres == S_FALSE, "Skip expected end of list: %08x\n", hres); -} - -/* Test skipping off the end of the list */ -static void test_Skip_offEnd(void) -{ - HRESULT hres; - - hres = IEnumBackgroundCopyJobs_Skip(test_enumJobsB, test_jobCountB + 1); - ok(hres == S_FALSE, "Skip expected end of list: %08x\n", hres); -} - -/* Test reset */ -static void test_Reset(void) -{ - HRESULT hres; - - hres = IEnumBackgroundCopyJobs_Skip(test_enumJobsB, test_jobCountB); - ok(hres == S_OK, "Skip failed: %08x\n", hres); - if (hres != S_OK) - { - skip("Skip failed\n"); - return; - } - - hres = IEnumBackgroundCopyJobs_Reset(test_enumJobsB); - ok(hres == S_OK, "Reset failed: %08x\n", hres); - if(hres != S_OK) - { - skip("Unable to Reset enumerator\n"); - return; - } - - hres = IEnumBackgroundCopyJobs_Skip(test_enumJobsB, test_jobCountB); - ok(hres == S_OK, "Reset failed: %08x\n", hres); -} - -typedef void (*test_t)(void); - -START_TEST(enum_jobs) -{ - static const test_t tests[] = { - test_GetCount, - test_Next_walkListNull, - test_Next_walkList_1, - test_Next_walkList_2, - test_Next_errors, - test_Skip_walkList, - test_Skip_offEnd, - test_Reset, - 0 - }; - const test_t *test; - - CoInitialize(NULL); - for (test = tests; *test; ++test) - { - /* Keep state separate between tests */ - if (!setup()) - { - teardown(); - skip("Unable to setup test\n"); - break; - } - (*test)(); - teardown(); - } - CoUninitialize(); -} diff --git a/rostests/winetests/qmgr/file.c b/rostests/winetests/qmgr/file.c deleted file mode 100644 index 033b2c500f0..00000000000 --- a/rostests/winetests/qmgr/file.c +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Unit test suite for Background Copy File Interface - * - * Copyright 2007 Google (Roy Shea) - * - * 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 - -#define COBJMACROS - -#include "wine/test.h" -#include "bits.h" - -/* Globals used by many tests */ -#define NUM_FILES 1 -static const WCHAR test_remoteName[] = {'r','e','m','o','t','e', 0}; -static const WCHAR test_localName[] = {'l','o','c','a','l', 0}; -static WCHAR test_localFile[MAX_PATH]; -static WCHAR test_remoteUrl[MAX_PATH]; -static const ULONG test_fileCount = NUM_FILES; -static const WCHAR test_displayName[] = {'T','e','s','t', 0}; -static IBackgroundCopyJob *test_job; -static IBackgroundCopyManager *test_manager; -static IEnumBackgroundCopyFiles *test_enumFiles; -static IBackgroundCopyFile *test_file; - -/* Helper function to add a file to a job. The helper function takes base - file name and creates properly formed path and URL strings for creation of - the file. */ -static HRESULT addFileHelper(IBackgroundCopyJob* job, - const WCHAR *localName, const WCHAR *remoteName) -{ - DWORD urlSize; - - GetCurrentDirectoryW(MAX_PATH, test_localFile); - PathAppendW(test_localFile, localName); - GetCurrentDirectoryW(MAX_PATH, test_remoteUrl); - PathAppendW(test_remoteUrl, remoteName); - urlSize = MAX_PATH; - UrlCreateFromPathW(test_remoteUrl, test_remoteUrl, &urlSize, 0); - UrlUnescapeW(test_remoteUrl, NULL, &urlSize, URL_UNESCAPE_INPLACE); - return IBackgroundCopyJob_AddFile(test_job, test_remoteUrl, test_localFile); -} - -/* Generic test setup */ -static BOOL setup(void) -{ - HRESULT hres; - GUID test_jobId; - - test_manager = NULL; - test_job = NULL; - memset(&test_jobId, 0, sizeof test_jobId); - - hres = CoCreateInstance(&CLSID_BackgroundCopyManager, NULL, - CLSCTX_LOCAL_SERVER, &IID_IBackgroundCopyManager, - (void **) &test_manager); - if(hres != S_OK) - return FALSE; - - hres = IBackgroundCopyManager_CreateJob(test_manager, test_displayName, - BG_JOB_TYPE_DOWNLOAD, &test_jobId, &test_job); - if(hres != S_OK) - { - IBackgroundCopyManager_Release(test_manager); - return FALSE; - } - - if (addFileHelper(test_job, test_localName, test_remoteName) != S_OK - || IBackgroundCopyJob_EnumFiles(test_job, &test_enumFiles) != S_OK) - { - IBackgroundCopyJob_Release(test_job); - IBackgroundCopyManager_Release(test_manager); - return FALSE; - } - - hres = IEnumBackgroundCopyFiles_Next(test_enumFiles, 1, &test_file, NULL); - if(hres != S_OK) - { - IEnumBackgroundCopyFiles_Release(test_enumFiles); - IBackgroundCopyJob_Release(test_job); - IBackgroundCopyManager_Release(test_manager); - return FALSE; - } - - return TRUE; -} - -/* Generic test cleanup */ -static void teardown(void) -{ - IBackgroundCopyFile_Release(test_file); - IEnumBackgroundCopyFiles_Release(test_enumFiles); - IBackgroundCopyJob_Release(test_job); - IBackgroundCopyManager_Release(test_manager); -} - -/* Test that the remote name is properly set */ -static void test_GetRemoteName(void) -{ - HRESULT hres; - LPWSTR name; - - hres = IBackgroundCopyFile_GetRemoteName(test_file, &name); - ok(hres == S_OK, "GetRemoteName failed: %08x\n", hres); - if(hres != S_OK) - { - skip("Unable to get remote name of test_file.\n"); - return; - } - ok(lstrcmpW(name, test_remoteUrl) == 0, "Got incorrect remote name\n"); - CoTaskMemFree(name); -} - -/* Test that the local name is properly set */ -static void test_GetLocalName(void) -{ - HRESULT hres; - LPWSTR name; - - hres = IBackgroundCopyFile_GetLocalName(test_file, &name); - ok(hres == S_OK, "GetLocalName failed: %08x\n", hres); - if(hres != S_OK) - { - skip("Unable to get local name of test_file.\n"); - return; - } - ok(lstrcmpW(name, test_localFile) == 0, "Got incorrect local name\n"); - CoTaskMemFree(name); -} - -/* Test getting the progress of a file*/ -static void test_GetProgress_PreTransfer(void) -{ - HRESULT hres; - BG_FILE_PROGRESS progress; - - hres = IBackgroundCopyFile_GetProgress(test_file, &progress); - ok(hres == S_OK, "GetProgress failed: %08x\n", hres); - if(hres != S_OK) - { - skip("Unable to get progress of test_file.\n"); - return; - } - ok(progress.BytesTotal == BG_SIZE_UNKNOWN, "Got incorrect total size: %x%08x\n", - (DWORD)(progress.BytesTotal >> 32), (DWORD)progress.BytesTotal); - ok(progress.BytesTransferred == 0, "Got incorrect number of transferred bytes: %x%08x\n", - (DWORD)(progress.BytesTransferred >> 32), (DWORD)progress.BytesTransferred); - ok(progress.Completed == FALSE, "Got incorret completion status\n"); -} - -typedef void (*test_t)(void); - -START_TEST(file) -{ - static const test_t tests[] = { - test_GetRemoteName, - test_GetLocalName, - test_GetProgress_PreTransfer, - 0 - }; - const test_t *test; - - CoInitialize(NULL); - for (test = tests; *test; ++test) - { - /* Keep state separate between tests. */ - if (!setup()) - { - skip("Unable to setup test\n"); - break; - } - (*test)(); - teardown(); - } - CoUninitialize(); -} diff --git a/rostests/winetests/qmgr/job.c b/rostests/winetests/qmgr/job.c deleted file mode 100644 index d0e2306bfc0..00000000000 --- a/rostests/winetests/qmgr/job.c +++ /dev/null @@ -1,585 +0,0 @@ -/* - * Unit test suite for Background Copy Job Interface - * - * Copyright 2007 Google (Roy Shea) - * - * 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 COBJMACROS - -#include "wine/test.h" -#include "bits.h" -#include "initguid.h" - -/* Globals used by many tests */ -static const WCHAR test_displayName[] = {'T', 'e', 's', 't', 0}; -static const WCHAR test_remoteNameA[] = {'r','e','m','o','t','e','A', 0}; -static const WCHAR test_remoteNameB[] = {'r','e','m','o','t','e','B', 0}; -static const WCHAR test_localNameA[] = {'l','o','c','a','l','A', 0}; -static const WCHAR test_localNameB[] = {'l','o','c','a','l','B', 0}; -static WCHAR *test_currentDir; -static WCHAR *test_remotePathA; -static WCHAR *test_remotePathB; -static WCHAR *test_localPathA; -static WCHAR *test_localPathB; -static IBackgroundCopyManager *test_manager; -static IBackgroundCopyJob *test_job; -static GUID test_jobId; -static BG_JOB_TYPE test_type; - -static BOOL init_paths(void) -{ - static const WCHAR format[] = {'%','s','\\','%','s', 0}; - DWORD n; - - n = GetCurrentDirectoryW(0, NULL); - if (n == 0) - { - skip("Couldn't get current directory size\n"); - return FALSE; - } - - test_currentDir = HeapAlloc(GetProcessHeap(), 0, n * sizeof(WCHAR)); - test_localPathA - = HeapAlloc(GetProcessHeap(), 0, - (n + 1 + lstrlenW(test_localNameA)) * sizeof(WCHAR)); - test_localPathB - = HeapAlloc(GetProcessHeap(), 0, - (n + 1 + lstrlenW(test_localNameB)) * sizeof(WCHAR)); - test_remotePathA - = HeapAlloc(GetProcessHeap(), 0, - (n + 1 + lstrlenW(test_remoteNameA)) * sizeof(WCHAR)); - test_remotePathB - = HeapAlloc(GetProcessHeap(), 0, - (n + 1 + lstrlenW(test_remoteNameB)) * sizeof(WCHAR)); - - if (!test_currentDir || !test_localPathA || !test_localPathB - || !test_remotePathA || !test_remotePathB) - { - skip("Couldn't allocate memory for full paths\n"); - return FALSE; - } - - if (GetCurrentDirectoryW(n, test_currentDir) != n - 1) - { - skip("Couldn't get current directory\n"); - return FALSE; - } - - wsprintfW(test_localPathA, format, test_currentDir, test_localNameA); - wsprintfW(test_localPathB, format, test_currentDir, test_localNameB); - wsprintfW(test_remotePathA, format, test_currentDir, test_remoteNameA); - wsprintfW(test_remotePathB, format, test_currentDir, test_remoteNameB); - - return TRUE; -} - -/* Generic test setup */ -static BOOL setup(void) -{ - HRESULT hres; - - test_manager = NULL; - test_job = NULL; - memset(&test_jobId, 0, sizeof test_jobId); - test_type = BG_JOB_TYPE_DOWNLOAD; - - hres = CoCreateInstance(&CLSID_BackgroundCopyManager, NULL, - CLSCTX_LOCAL_SERVER, - &IID_IBackgroundCopyManager, - (void **) &test_manager); - if(hres != S_OK) - return FALSE; - - hres = IBackgroundCopyManager_CreateJob(test_manager, test_displayName, - test_type, &test_jobId, &test_job); - if(hres != S_OK) - { - IBackgroundCopyManager_Release(test_manager); - return FALSE; - } - - return TRUE; -} - -/* Generic test cleanup */ -static void teardown(void) -{ - IBackgroundCopyJob_Release(test_job); - IBackgroundCopyManager_Release(test_manager); -} - -/* FIXME: Remove when Wine has implemented this */ -DEFINE_GUID(CLSID_BackgroundCopyManager2_0, 0x6d18ad12, 0xbde3, 0x4393, 0xb3,0x11, 0x09,0x9c,0x34,0x6e,0x6d,0xf9); - -static BOOL check_bits20(void) -{ - HRESULT hres; - IBackgroundCopyManager *manager; - BOOL ret = TRUE; - - hres = CoCreateInstance(&CLSID_BackgroundCopyManager2_0, NULL, - CLSCTX_LOCAL_SERVER, - &IID_IBackgroundCopyManager, - (void **) &manager); - - if (hres == REGDB_E_CLASSNOTREG) - { - ret = FALSE; - - /* FIXME: Wine implements 2.0 functionality but doesn't advertise 2.0 - * - * Remove when Wine is fixed - */ - if (setup()) - { - HRESULT hres2; - - hres2 = IBackgroundCopyJob_AddFile(test_job, test_remotePathA, - test_localPathA); - if (hres2 == S_OK) - { - trace("Running on Wine, claim 2.0 is present\n"); - ret = TRUE; - } - teardown(); - } - } - - if (manager) - IBackgroundCopyManager_Release(manager); - - return ret; -} - -/* Test that the jobId is properly set */ -static void test_GetId(void) -{ - HRESULT hres; - GUID tmpId; - - hres = IBackgroundCopyJob_GetId(test_job, &tmpId); - ok(hres == S_OK, "GetId failed: %08x\n", hres); - if(hres != S_OK) - { - skip("Unable to get ID of test_job.\n"); - return; - } - ok(memcmp(&tmpId, &test_jobId, sizeof tmpId) == 0, "Got incorrect GUID\n"); -} - -/* Test that the type is properly set */ -static void test_GetType(void) -{ - HRESULT hres; - BG_JOB_TYPE type; - - hres = IBackgroundCopyJob_GetType(test_job, &type); - ok(hres == S_OK, "GetType failed: %08x\n", hres); - if(hres != S_OK) - { - skip("Unable to get type of test_job.\n"); - return; - } - ok(type == test_type, "Got incorrect type\n"); -} - -/* Test that the display name is properly set */ -static void test_GetName(void) -{ - HRESULT hres; - LPWSTR displayName; - - hres = IBackgroundCopyJob_GetDisplayName(test_job, &displayName); - ok(hres == S_OK, "GetName failed: %08x\n", hres); - if(hres != S_OK) - { - skip("Unable to get display name of test_job.\n"); - return; - } - ok(lstrcmpW(displayName, test_displayName) == 0, "Got incorrect type\n"); - CoTaskMemFree(displayName); -} - -/* Test adding a file */ -static void test_AddFile(void) -{ - HRESULT hres; - - hres = IBackgroundCopyJob_AddFile(test_job, test_remotePathA, - test_localPathA); - ok(hres == S_OK, "First call to AddFile failed: 0x%08x\n", hres); - if (hres != S_OK) - { - skip("Unable to add first file to job\n"); - return; - } - - hres = IBackgroundCopyJob_AddFile(test_job, test_remotePathB, - test_localPathB); - ok(hres == S_OK, "Second call to AddFile failed: 0x%08x\n", hres); -} - -/* Test adding a set of files */ -static void test_AddFileSet(void) -{ - HRESULT hres; - BG_FILE_INFO files[2] = - { - {test_remotePathA, test_localPathA}, - {test_remotePathB, test_localPathB} - }; - hres = IBackgroundCopyJob_AddFileSet(test_job, 2, files); - ok(hres == S_OK, "AddFileSet failed: 0x%08x\n", hres); -} - -/* Test creation of a job enumerator */ -static void test_EnumFiles(void) -{ - HRESULT hres; - IEnumBackgroundCopyFiles *enumFiles; - ULONG res; - - hres = IBackgroundCopyJob_AddFile(test_job, test_remotePathA, - test_localPathA); - if (hres != S_OK) - { - skip("Unable to add file to job\n"); - return; - } - - hres = IBackgroundCopyJob_EnumFiles(test_job, &enumFiles); - ok(hres == S_OK, "EnumFiles failed: 0x%08x\n", hres); - if(hres != S_OK) - { - skip("Unable to create file enumerator.\n"); - return; - } - - res = IEnumBackgroundCopyFiles_Release(enumFiles); - ok(res == 0, "Bad ref count on release: %u\n", res); -} - -/* Test getting job progress */ -static void test_GetProgress_preTransfer(void) -{ - HRESULT hres; - BG_JOB_PROGRESS progress; - - hres = IBackgroundCopyJob_GetProgress(test_job, &progress); - ok(hres == S_OK, "GetProgress failed: 0x%08x\n", hres); - if (hres != S_OK) - { - skip("Unable to get job progress\n"); - teardown(); - return; - } - - ok(progress.BytesTotal == 0, "Incorrect BytesTotal: %x%08x\n", - (DWORD)(progress.BytesTotal >> 32), (DWORD)progress.BytesTotal); - ok(progress.BytesTransferred == 0, "Incorrect BytesTransferred: %x%08x\n", - (DWORD)(progress.BytesTransferred >> 32), (DWORD)progress.BytesTransferred); - ok(progress.FilesTotal == 0, "Incorrect FilesTotal: %u\n", progress.FilesTotal); - ok(progress.FilesTransferred == 0, "Incorrect FilesTransferred %u\n", progress.FilesTransferred); -} - -/* Test getting job state */ -static void test_GetState(void) -{ - HRESULT hres; - BG_JOB_STATE state; - - state = BG_JOB_STATE_ERROR; - hres = IBackgroundCopyJob_GetState(test_job, &state); - ok(hres == S_OK, "GetState failed: 0x%08x\n", hres); - if (hres != S_OK) - { - skip("Unable to get job state\n"); - return; - } - ok(state == BG_JOB_STATE_SUSPENDED, "Incorrect job state: %d\n", state); -} - -/* Test resuming a job */ -static void test_ResumeEmpty(void) -{ - HRESULT hres; - BG_JOB_STATE state; - - hres = IBackgroundCopyJob_Resume(test_job); - ok(hres == BG_E_EMPTY, "Resume failed to return BG_E_EMPTY error: 0x%08x\n", hres); - if (hres != BG_E_EMPTY) - { - skip("Failed calling resume job\n"); - return; - } - - state = BG_JOB_STATE_ERROR; - hres = IBackgroundCopyJob_GetState(test_job, &state); - if (hres != S_OK) - { - skip("Unable to get job state\n"); - return; - } - ok(state == BG_JOB_STATE_SUSPENDED, "Incorrect job state: %d\n", state); -} - -static void makeFile(WCHAR *name, const char *contents) -{ - HANDLE file; - DWORD w, len = strlen(contents); - - DeleteFileW(name); - file = CreateFileW(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, NULL); - ok(file != INVALID_HANDLE_VALUE, "CreateFile\n"); - ok(WriteFile(file, contents, len, &w, NULL), "WriteFile\n"); - CloseHandle(file); -} - -static void compareFiles(WCHAR *n1, WCHAR *n2) -{ - char b1[256]; - char b2[256]; - DWORD s1, s2; - HANDLE f1, f2; - - f1 = CreateFileW(n1, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, NULL); - ok(f1 != INVALID_HANDLE_VALUE, "CreateFile\n"); - - f2 = CreateFileW(n2, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, NULL); - ok(f2 != INVALID_HANDLE_VALUE, "CreateFile\n"); - - /* Neither of these files is very big */ - ok(ReadFile(f1, b1, sizeof b1, &s1, NULL), "ReadFile\n"); - ok(ReadFile(f2, b2, sizeof b2, &s2, NULL), "ReadFile\n"); - - CloseHandle(f1); - CloseHandle(f2); - - ok(s1 == s2, "Files differ in length\n"); - ok(memcmp(b1, b2, s1) == 0, "Files differ in contents\n"); -} - -/* Test a complete transfer for local files */ -static void test_CompleteLocal(void) -{ - static const int timeout_sec = 30; - HRESULT hres; - BG_JOB_STATE state; - int i; - - DeleteFileW(test_localPathA); - DeleteFileW(test_localPathB); - makeFile(test_remotePathA, "This is a WINE test file for BITS\n"); - makeFile(test_remotePathB, "This is another WINE test file for BITS\n"); - - hres = IBackgroundCopyJob_AddFile(test_job, test_remotePathA, - test_localPathA); - if (hres != S_OK) - { - skip("Unable to add file to job\n"); - return; - } - - hres = IBackgroundCopyJob_AddFile(test_job, test_remotePathB, - test_localPathB); - if (hres != S_OK) - { - skip("Unable to add file to job\n"); - return; - } - - hres = IBackgroundCopyJob_Resume(test_job); - ok(hres == S_OK, "IBackgroundCopyJob_Resume\n"); - - for (i = 0; i < timeout_sec; ++i) - { - hres = IBackgroundCopyJob_GetState(test_job, &state); - ok(hres == S_OK, "IBackgroundCopyJob_GetState\n"); - ok(state == BG_JOB_STATE_QUEUED || state == BG_JOB_STATE_CONNECTING - || state == BG_JOB_STATE_TRANSFERRING || state == BG_JOB_STATE_TRANSFERRED, - "Bad state: %d\n", state); - if (state == BG_JOB_STATE_TRANSFERRED) - break; - Sleep(1000); - } - - ok(i < timeout_sec, "BITS jobs timed out\n"); - hres = IBackgroundCopyJob_Complete(test_job); - ok(hres == S_OK, "IBackgroundCopyJob_Complete\n"); - hres = IBackgroundCopyJob_GetState(test_job, &state); - ok(hres == S_OK, "IBackgroundCopyJob_GetState\n"); - ok(state == BG_JOB_STATE_ACKNOWLEDGED, "Bad state: %d\n", state); - - compareFiles(test_remotePathA, test_localPathA); - compareFiles(test_remotePathB, test_localPathB); - - ok(DeleteFileW(test_remotePathA), "DeleteFile\n"); - ok(DeleteFileW(test_remotePathB), "DeleteFile\n"); - DeleteFileW(test_localPathA); - DeleteFileW(test_localPathB); -} - -/* Test a complete transfer for local files */ -static void test_CompleteLocalURL(void) -{ - static const WCHAR prot[] = {'f','i','l','e',':','/','/', 0}; - static const int timeout_sec = 30; - WCHAR *urlA, *urlB; - HRESULT hres; - BG_JOB_STATE state; - int i; - - DeleteFileW(test_localPathA); - DeleteFileW(test_localPathB); - makeFile(test_remotePathA, "This is a WINE test file for BITS\n"); - makeFile(test_remotePathB, "This is another WINE test file for BITS\n"); - - urlA = HeapAlloc(GetProcessHeap(), 0, - (7 + lstrlenW(test_remotePathA) + 1) * sizeof urlA[0]); - urlB = HeapAlloc(GetProcessHeap(), 0, - (7 + lstrlenW(test_remotePathB) + 1) * sizeof urlB[0]); - if (!urlA || !urlB) - { - skip("Unable to allocate memory for URLs\n"); - HeapFree(GetProcessHeap(), 0, urlA); - HeapFree(GetProcessHeap(), 0, urlB); - return; - } - - lstrcpyW(urlA, prot); - lstrcatW(urlA, test_remotePathA); - lstrcpyW(urlB, prot); - lstrcatW(urlB, test_remotePathB); - - hres = IBackgroundCopyJob_AddFile(test_job, urlA, test_localPathA); - if (hres != S_OK) - { - skip("Unable to add file to job\n"); - HeapFree(GetProcessHeap(), 0, urlA); - HeapFree(GetProcessHeap(), 0, urlB); - return; - } - - hres = IBackgroundCopyJob_AddFile(test_job, urlB, test_localPathB); - if (hres != S_OK) - { - skip("Unable to add file to job\n"); - HeapFree(GetProcessHeap(), 0, urlA); - HeapFree(GetProcessHeap(), 0, urlB); - return; - } - - hres = IBackgroundCopyJob_Resume(test_job); - ok(hres == S_OK, "IBackgroundCopyJob_Resume\n"); - - for (i = 0; i < timeout_sec; ++i) - { - hres = IBackgroundCopyJob_GetState(test_job, &state); - ok(hres == S_OK, "IBackgroundCopyJob_GetState\n"); - ok(state == BG_JOB_STATE_QUEUED || state == BG_JOB_STATE_CONNECTING - || state == BG_JOB_STATE_TRANSFERRING || state == BG_JOB_STATE_TRANSFERRED, - "Bad state: %d\n", state); - if (state == BG_JOB_STATE_TRANSFERRED) - break; - Sleep(1000); - } - - ok(i < timeout_sec, "BITS jobs timed out\n"); - hres = IBackgroundCopyJob_Complete(test_job); - ok(hres == S_OK, "IBackgroundCopyJob_Complete\n"); - hres = IBackgroundCopyJob_GetState(test_job, &state); - ok(hres == S_OK, "IBackgroundCopyJob_GetState\n"); - ok(state == BG_JOB_STATE_ACKNOWLEDGED, "Bad state: %d\n", state); - - compareFiles(test_remotePathA, test_localPathA); - compareFiles(test_remotePathB, test_localPathB); - - ok(DeleteFileW(test_remotePathA), "DeleteFile\n"); - ok(DeleteFileW(test_remotePathB), "DeleteFile\n"); - DeleteFileW(test_localPathA); - DeleteFileW(test_localPathB); - - HeapFree(GetProcessHeap(), 0, urlA); - HeapFree(GetProcessHeap(), 0, urlB); -} - -typedef void (*test_t)(void); - -START_TEST(job) -{ - static const test_t tests[] = { - test_GetId, - test_GetType, - test_GetName, - test_GetProgress_preTransfer, - test_GetState, - test_ResumeEmpty, - 0 - }; - static const test_t tests_bits20[] = { - test_AddFile, - test_AddFileSet, - test_EnumFiles, - test_CompleteLocal, - test_CompleteLocalURL, - 0 - }; - const test_t *test; - - if (!init_paths()) - return; - - CoInitialize(NULL); - - for (test = tests; *test; ++test) - { - /* Keep state separate between tests. */ - if (!setup()) - { - skip("Unable to setup test\n"); - break; - } - (*test)(); - teardown(); - } - - if (check_bits20()) - { - for (test = tests_bits20; *test; ++test) - { - /* Keep state separate between tests. */ - if (!setup()) - { - skip("Unable to setup test\n"); - break; - } - (*test)(); - teardown(); - } - } - else - { - win_skip("Tests need BITS 2.0 or higher\n"); - } - - CoUninitialize(); -} diff --git a/rostests/winetests/qmgr/qmgr.c b/rostests/winetests/qmgr/qmgr.c deleted file mode 100644 index 8c955862a11..00000000000 --- a/rostests/winetests/qmgr/qmgr.c +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Unit test suite for bits functions - * - * Copyright 2007 Google (Roy Shea) - * - * 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 COBJMACROS - -#include "wine/test.h" -#include "initguid.h" -#include "bits.h" - -static WCHAR progname[MAX_PATH]; - -static void -test_CreateInstance(void) -{ - HRESULT hres; - ULONG res; - IBackgroundCopyManager *manager = NULL; - - /* Creating BITS instance */ - hres = CoCreateInstance(&CLSID_BackgroundCopyManager, NULL, CLSCTX_LOCAL_SERVER, - &IID_IBackgroundCopyManager, (void **) &manager); - ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres); - if(hres != S_OK) { - skip("Unable to create bits instance.\n"); - return; - } - - /* Releasing bits manager */ - res = IBackgroundCopyManager_Release(manager); - ok(res == 0, "Bad ref count on release: %u\n", res); - -} - -static void test_CreateJob(void) -{ - /* Job information */ - static const WCHAR copyNameW[] = {'T', 'e', 's', 't', 0}; - IBackgroundCopyJob* job = NULL; - GUID tmpId; - HRESULT hres; - ULONG res; - IBackgroundCopyManager* manager = NULL; - - /* Setup */ - hres = CoCreateInstance(&CLSID_BackgroundCopyManager, NULL, - CLSCTX_LOCAL_SERVER, &IID_IBackgroundCopyManager, - (void **) &manager); - if(hres != S_OK) - { - skip("Unable to create bits instance required for test.\n"); - return; - } - - /* Create bits job */ - hres = IBackgroundCopyManager_CreateJob(manager, copyNameW, - BG_JOB_TYPE_DOWNLOAD, &tmpId, - &job); - ok(hres == S_OK, "CreateJob failed: %08x\n", hres); - if(hres != S_OK) - skip("Unable to create bits job.\n"); - else - { - res = IBackgroundCopyJob_Release(job); - ok(res == 0, "Bad ref count on release: %u\n", res); - } - - IBackgroundCopyManager_Release(manager); -} - -static void test_EnumJobs(void) -{ - /* Job Enumerator */ - IEnumBackgroundCopyJobs* enumJobs; - - static const WCHAR copyNameW[] = {'T', 'e', 's', 't', 0}; - IBackgroundCopyManager *manager = NULL; - IBackgroundCopyJob *job = NULL; - HRESULT hres; - GUID tmpId; - ULONG res; - - /* Setup */ - hres = CoCreateInstance(&CLSID_BackgroundCopyManager, NULL, - CLSCTX_LOCAL_SERVER, &IID_IBackgroundCopyManager, - (void **) &manager); - if(hres != S_OK) - { - skip("Unable to create bits instance required for test.\n"); - return; - } - hres = IBackgroundCopyManager_CreateJob(manager, copyNameW, - BG_JOB_TYPE_DOWNLOAD, &tmpId, - &job); - if(hres != S_OK) - { - skip("Unable to create bits job.\n"); - IBackgroundCopyManager_Release(manager); - return; - } - - hres = IBackgroundCopyManager_EnumJobs(manager, 0, &enumJobs); - ok(hres == S_OK, "EnumJobs failed: %08x\n", hres); - if(hres != S_OK) - skip("Unable to create job enumerator.\n"); - else - { - res = IEnumBackgroundCopyJobs_Release(enumJobs); - ok(res == 0, "Bad ref count on release: %u\n", res); - } - - /* Tear down */ - IBackgroundCopyJob_Release(job); - IBackgroundCopyManager_Release(manager); -} - -static void run_child(WCHAR *secret) -{ - static const WCHAR format[] = {'%','s',' ','q','m','g','r',' ','%','s', 0}; - WCHAR cmdline[MAX_PATH]; - PROCESS_INFORMATION info; - STARTUPINFOW startup; - - memset(&startup, 0, sizeof startup); - startup.cb = sizeof startup; - - wsprintfW(cmdline, format, progname, secret); - ok(CreateProcessW(NULL, cmdline, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info), "CreateProcess\n"); - winetest_wait_child_process(info.hProcess); - ok(CloseHandle(info.hProcess), "CloseHandle\n"); - ok(CloseHandle(info.hThread), "CloseHandle\n"); -} - -static void do_child(const char *secretA) -{ - WCHAR secretW[MAX_PATH]; - IBackgroundCopyManager *manager = NULL; - GUID id; - IBackgroundCopyJob *job; - HRESULT hres; - hres = CoCreateInstance(&CLSID_BackgroundCopyManager, NULL, - CLSCTX_LOCAL_SERVER, &IID_IBackgroundCopyManager, - (void **) &manager); - if(hres != S_OK) - { - skip("Unable to create bits instance required for test.\n"); - return; - } - - MultiByteToWideChar(CP_ACP, 0, secretA, -1, secretW, MAX_PATH); - hres = IBackgroundCopyManager_CreateJob(manager, secretW, - BG_JOB_TYPE_DOWNLOAD, &id, &job); - ok(hres == S_OK, "CreateJob in child process\n"); - IBackgroundCopyJob_Release(job); - IBackgroundCopyManager_Release(manager); -} - -static void test_globalness(void) -{ - static const WCHAR format[] = {'t','e','s','t','_','%','u', 0}; - WCHAR secretName[MAX_PATH]; - IEnumBackgroundCopyJobs* enumJobs; - IBackgroundCopyManager *manager = NULL; - HRESULT hres; - hres = CoCreateInstance(&CLSID_BackgroundCopyManager, NULL, - CLSCTX_LOCAL_SERVER, &IID_IBackgroundCopyManager, - (void **) &manager); - if(hres != S_OK) - { - skip("Unable to create bits instance required for test.\n"); - return; - } - - wsprintfW(secretName, format, GetTickCount()); - run_child(secretName); - - hres = IBackgroundCopyManager_EnumJobs(manager, 0, &enumJobs); - ok(hres == S_OK, "EnumJobs failed: %08x\n", hres); - if(hres != S_OK) - skip("Unable to create job enumerator.\n"); - else - { - ULONG i, n; - IBackgroundCopyJob *job; - BOOL found = FALSE; - - hres = IEnumBackgroundCopyJobs_GetCount(enumJobs, &n); - for (i = 0; i < n && !found; ++i) - { - LPWSTR name; - IEnumBackgroundCopyJobs_Next(enumJobs, 1, &job, NULL); - IBackgroundCopyJob_GetDisplayName(job, &name); - if (lstrcmpW(name, secretName) == 0) - found = TRUE; - CoTaskMemFree(name); - IBackgroundCopyJob_Release(job); - } - hres = IEnumBackgroundCopyJobs_Release(enumJobs); - ok(found, "Adding a job in another process failed\n"); - } - - IBackgroundCopyManager_Release(manager); -} - -START_TEST(qmgr) -{ - char **argv; - int argc = winetest_get_mainargs(&argv); - MultiByteToWideChar(CP_ACP, 0, argv[0], -1, progname, MAX_PATH); - - CoInitialize(NULL); - if (argc == 3) - do_child(argv[2]); - else - { - test_CreateInstance(); - test_CreateJob(); - test_EnumJobs(); - test_globalness(); - } - CoUninitialize(); -} diff --git a/rostests/winetests/qmgr/qmgr.rbuild b/rostests/winetests/qmgr/qmgr.rbuild deleted file mode 100644 index ea3ecdea9c3..00000000000 --- a/rostests/winetests/qmgr/qmgr.rbuild +++ /dev/null @@ -1,15 +0,0 @@ - - . - - enum_files.c - enum_jobs.c - file.c - job.c - qmgr.c - testlist.c - wine - ole32 - shlwapi - user32 - ntdll - diff --git a/rostests/winetests/qmgr/testlist.c b/rostests/winetests/qmgr/testlist.c deleted file mode 100644 index 7292b44ab5f..00000000000 --- a/rostests/winetests/qmgr/testlist.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_qmgr(void); -extern void func_job(void); -extern void func_file(void); -extern void func_enum_jobs(void); -extern void func_enum_files(void); - -const struct test winetest_testlist[] = -{ - { "qmgr", func_qmgr }, - { "job", func_job }, - { "file", func_file }, - { "enum_jobs", func_enum_jobs }, - { "enum_files", func_enum_files }, - { 0, 0 } -}; diff --git a/rostests/winetests/quartz/CMakeLists.txt b/rostests/winetests/quartz/CMakeLists.txt deleted file mode 100644 index fae39d3708d..00000000000 --- a/rostests/winetests/quartz/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - avisplitter.c - dsoundrender.c - filtergraph.c - filtermapper.c - memallocator.c - misc.c - referenceclock.c - videorenderer.c - testlist.c) - -add_executable(quartz_winetest ${SOURCE}) -target_link_libraries(quartz_winetest wine uuid) -set_module_type(quartz_winetest win32cui) -add_importlibs(quartz_winetest ole32 oleaut32 advapi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET quartz_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/quartz/avisplitter.c b/rostests/winetests/quartz/avisplitter.c deleted file mode 100644 index 33a0d6d24e2..00000000000 --- a/rostests/winetests/quartz/avisplitter.c +++ /dev/null @@ -1,477 +0,0 @@ -/* - * Unit tests for the avi splitter functions - * - * Copyright (C) 2007 Google (Lei Zhang) - * Copyright (C) 2008 Google (Maarten Lankhorst) - * - * 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 - -#include "wine/test.h" -#include "dshow.h" -#include "tlhelp32.h" - -static HANDLE (WINAPI *pCreateToolhelp32Snapshot)(DWORD, DWORD); -static BOOL (WINAPI *pThread32First)(HANDLE, LPTHREADENTRY32); -static BOOL (WINAPI *pThread32Next)(HANDLE, LPTHREADENTRY32); - -static IUnknown *pAviSplitter = NULL; - -static int count_threads(void) -{ - THREADENTRY32 te; - int threads; - HANDLE h; - - h = pCreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0); - te.dwSize = sizeof(te); - - if (h == INVALID_HANDLE_VALUE) - return -1; - - pThread32First(h, &te); - if (te.th32OwnerProcessID == GetCurrentProcessId()) - threads = 1; - else - threads = 0; - - while (pThread32Next(h, &te)) - if (te.th32OwnerProcessID == GetCurrentProcessId()) - ++threads; - - CloseHandle(h); - return threads; -} - -static int create_avisplitter(void) -{ - HRESULT hr; - - hr = CoCreateInstance(&CLSID_AviSplitter, NULL, CLSCTX_INPROC_SERVER, - &IID_IUnknown, (LPVOID*)&pAviSplitter); - return (hr == S_OK && pAviSplitter != NULL); -} - -static void release_avisplitter(void) -{ - HRESULT hr; - - Sleep(1000); - hr = IUnknown_Release(pAviSplitter); - - /* Looks like wine has a reference leak somewhere on test_threads tests, - * it passes in windows - */ - ok(hr == 0, "IUnknown_Release failed with %d\n", (INT)hr); - - while (hr > 0) - hr = IUnknown_Release(pAviSplitter); - pAviSplitter = NULL; -} - -static void test_query_interface(void) -{ - HRESULT hr; - ULONG ref; - IUnknown *iface= NULL; - - hr = IUnknown_QueryInterface(pAviSplitter, &IID_IBaseFilter, - (void**)&iface); - - ok(hr == S_OK, - "IID_IBaseFilter should exist, got %08x!\n", GetLastError()); - if (hr == S_OK) - { - ref = IUnknown_Release(iface); - iface = NULL; - ok(ref == 1, "Reference is %u, expected 1\n", ref); - } - - hr = IUnknown_QueryInterface(pAviSplitter, &IID_IMediaSeeking, - (void**)&iface); - if (hr == S_OK) - ref = IUnknown_Release(iface); - iface = NULL; - todo_wine ok(hr == E_NOINTERFACE, - "Query for IMediaSeeking returned: %08x\n", hr); - -/* These interfaces should not be present: - IID_IKsPropertySet, IID_IMediaPosition, IID_IQualityControl, IID_IQualProp -*/ -} - -static void test_pin(IPin *pin) -{ - IMemInputPin *mpin = NULL; - - IPin_QueryInterface(pin, &IID_IMemInputPin, (void **)&mpin); - - ok(mpin == NULL, "IMemInputPin found!\n"); - if (mpin) - IMemInputPin_Release(mpin); - /* TODO */ -} - -static void test_basefilter(void) -{ - IEnumPins *pin_enum = NULL; - IBaseFilter *base = NULL; - IPin *pins[2]; - ULONG ref; - HRESULT hr; - - IUnknown_QueryInterface(pAviSplitter, &IID_IBaseFilter, (void *)&base); - if (base == NULL) - { - /* test_query_interface handles this case */ - skip("No IBaseFilter\n"); - return; - } - - hr = IBaseFilter_EnumPins(base, NULL); - ok(hr == E_POINTER, "hr = %08x and not E_POINTER\n", hr); - - hr= IBaseFilter_EnumPins(base, &pin_enum); - ok(hr == S_OK, "hr = %08x and not S_OK\n", hr); - - hr = IEnumPins_Next(pin_enum, 1, NULL, NULL); - ok(hr == E_POINTER, "hr = %08x and not E_POINTER\n", hr); - - hr = IEnumPins_Next(pin_enum, 2, pins, NULL); - ok(hr == E_INVALIDARG, "hr = %08x and not E_INVALIDARG\n", hr); - - pins[0] = (void *)0xdead; - pins[1] = (void *)0xdeed; - - hr = IEnumPins_Next(pin_enum, 2, pins, &ref); - ok(hr == S_FALSE, "hr = %08x instead of S_FALSE\n", hr); - ok(pins[0] != (void *)0xdead && pins[0] != NULL, - "pins[0] = %p\n", pins[0]); - if (pins[0] != (void *)0xdead && pins[0] != NULL) - { - test_pin(pins[0]); - IPin_Release(pins[0]); - } - - ok(pins[1] == (void *)0xdeed, "pins[1] = %p\n", pins[1]); - - ref = IEnumPins_Release(pin_enum); - ok(ref == 0, "ref is %u and not 0!\n", ref); - - IBaseFilter_Release(base); -} - -static const WCHAR wfile[] = {'t','e','s','t','.','a','v','i',0}; -static const char afile[] = "test.avi"; - -/* This test doesn't use the quartz filtergraph because it makes it impossible - * to be certain that a thread is really one owned by the avi splitter - * A lot of the decoder filters will also have their own thread, and windows' - * filtergraph has a separate thread for start/stop/seeking requests. - * By avoiding the filtergraph all together and connecting streams directly to - * the null renderer I am sure that this is not the case here. - */ -static void test_threads(void) -{ - IFileSourceFilter *pfile = NULL; - IBaseFilter *preader = NULL, *pavi = NULL; - IEnumPins *enumpins = NULL; - IPin *filepin = NULL, *avipin = NULL; - HRESULT hr; - int baselevel, curlevel, expected; - HANDLE file = NULL; - PIN_DIRECTION dir = PINDIR_OUTPUT; - char buffer[13]; - DWORD readbytes; - FILTER_STATE state; - - /* We need another way of counting threads on NT4. Skip these tests (for now) */ - if (!pCreateToolhelp32Snapshot || !pThread32First || !pThread32Next) - { - win_skip("Needed thread functions are not available (NT4)\n"); - return; - } - - /* Before doing anything (number of threads at the start differs per OS) */ - baselevel = count_threads(); - - file = CreateFileW(wfile, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, - NULL, OPEN_EXISTING, 0, NULL); - if (file == INVALID_HANDLE_VALUE) - { - skip("Could not read test file \"%s\", skipping test\n", afile); - return; - } - - memset(buffer, 0, 13); - readbytes = 12; - ReadFile(file, buffer, readbytes, &readbytes, NULL); - CloseHandle(file); - if (strncmp(buffer, "RIFF", 4) || strcmp(buffer + 8, "AVI ")) - { - skip("%s is not an avi riff file, not doing the avi splitter test\n", - afile); - return; - } - - hr = IUnknown_QueryInterface(pAviSplitter, &IID_IFileSourceFilter, - (void **)&pfile); - ok(hr == E_NOINTERFACE, - "Avi splitter returns unexpected error: %08x\n", hr); - if (pfile) - IUnknown_Release(pfile); - pfile = NULL; - - hr = CoCreateInstance(&CLSID_AsyncReader, NULL, CLSCTX_INPROC_SERVER, - &IID_IBaseFilter, (LPVOID*)&preader); - ok(hr == S_OK, "Could not create asynchronous reader: %08x\n", hr); - if (hr != S_OK) - goto fail; - - hr = IUnknown_QueryInterface(preader, &IID_IFileSourceFilter, - (void**)&pfile); - ok(hr == S_OK, "Could not get IFileSourceFilter: %08x\n", hr); - if (hr != S_OK) - goto fail; - - hr = IUnknown_QueryInterface(pAviSplitter, &IID_IBaseFilter, - (void**)&pavi); - ok(hr == S_OK, "Could not get base filter: %08x\n", hr); - if (hr != S_OK) - goto fail; - - hr = IFileSourceFilter_Load(pfile, wfile, NULL); - if (hr != S_OK) - { - trace("Could not load file\n"); - goto fail; - } - - hr = IBaseFilter_EnumPins(preader, &enumpins); - ok(hr == S_OK, "No enumpins: %08x\n", hr); - if (hr != S_OK) - goto fail; - - hr = IEnumPins_Next(enumpins, 1, &filepin, NULL); - ok(hr == S_OK, "No pin: %08x\n", hr); - if (hr != S_OK) - goto fail; - - IUnknown_Release(enumpins); - enumpins = NULL; - - hr = IBaseFilter_EnumPins(pavi, &enumpins); - ok(hr == S_OK, "No enumpins: %08x\n", hr); - if (hr != S_OK) - goto fail; - - hr = IEnumPins_Next(enumpins, 1, &avipin, NULL); - ok(hr == S_OK, "No pin: %08x\n", hr); - if (hr != S_OK) - goto fail; - - curlevel = count_threads(); - ok(curlevel == baselevel, - "Amount of threads should be %d not %d\n", baselevel, curlevel); - - hr = IPin_Connect(filepin, avipin, NULL); - ok(hr == S_OK, "Could not connect: %08x\n", hr); - if (hr != S_OK) - goto fail; - - expected = 1 + baselevel; - curlevel = count_threads(); - ok(curlevel == expected, - "Amount of threads should be %d not %d\n", expected, curlevel); - - IUnknown_Release(avipin); - avipin = NULL; - - IEnumPins_Reset(enumpins); - - /* Windows puts the pins in the order: Outputpins - Inputpin, - * wine does the reverse, just don't test it for now - * Hate to admit it, but windows way makes more sense - */ - while (IEnumPins_Next(enumpins, 1, &avipin, NULL) == S_OK) - { - ok(hr == S_OK, "hr: %08x\n", hr); - IPin_QueryDirection(avipin, &dir); - if (dir == PINDIR_OUTPUT) - { - /* Well, connect it to a null renderer! */ - IBaseFilter *pnull = NULL; - IEnumPins *nullenum = NULL; - IPin *nullpin = NULL; - - hr = CoCreateInstance(&CLSID_NullRenderer, NULL, - CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (LPVOID*)&pnull); - ok(hr == S_OK, "Could not create null renderer: %08x\n", hr); - if (hr != S_OK) - break; - - IBaseFilter_EnumPins(pnull, &nullenum); - IEnumPins_Next(nullenum, 1, &nullpin, NULL); - IEnumPins_Release(nullenum); - IPin_QueryDirection(nullpin, &dir); - - hr = IPin_Connect(avipin, nullpin, NULL); - ok(hr == S_OK, "Failed to connect output pin: %08x\n", hr); - IPin_Release(nullpin); - if (hr != S_OK) - { - IBaseFilter_Release(pnull); - break; - } - IBaseFilter_Run(pnull, 0); - ++expected; - } - - IUnknown_Release(avipin); - avipin = NULL; - } - - if (avipin) - IUnknown_Release(avipin); - avipin = NULL; - - if (hr != S_OK) - goto fail2; - /* At this point there is a minimalistic connected avi splitter that can - * Be used for all sorts of source filter tests, however that still needs - * to be written at a later time. - * - * Interesting tests: - * - Can you disconnect an output pin while running? - * Expecting: Yes - * - Can you disconnect the pullpin while running? - * Expecting: No - * - Is the reference count incremented during playback or when connected? - * Does this happen once for every output pin? Or is there something else - * going on. - * Expecting: You tell me - */ - - IBaseFilter_Run(preader, 0); - IBaseFilter_Run(pavi, 0); - IBaseFilter_GetState(pavi, INFINITE, &state); - - curlevel = count_threads(); - ok(curlevel == expected, - "Amount of threads should be %d not %d\n", expected, curlevel); - - IBaseFilter_Pause(pavi); - IBaseFilter_Pause(preader); - IBaseFilter_Stop(pavi); - IBaseFilter_Stop(preader); - IBaseFilter_GetState(pavi, INFINITE, &state); - IBaseFilter_GetState(preader, INFINITE, &state); - -fail2: - IEnumPins_Reset(enumpins); - while (IEnumPins_Next(enumpins, 1, &avipin, NULL) == S_OK) - { - IPin *to = NULL; - - IPin_QueryDirection(avipin, &dir); - IPin_ConnectedTo(avipin, &to); - if (to) - { - IPin_Release(to); - - if (dir == PINDIR_OUTPUT) - { - PIN_INFO info; - IPin_QueryPinInfo(to, &info); - - /* Release twice: Once normal, second from the - * previous while loop - */ - IBaseFilter_Stop(info.pFilter); - IPin_Disconnect(to); - IPin_Disconnect(avipin); - IBaseFilter_Release(info.pFilter); - IBaseFilter_Release(info.pFilter); - } - else - { - IPin_Disconnect(to); - IPin_Disconnect(avipin); - } - } - IPin_Release(avipin); - avipin = NULL; - } - -fail: - if (hr != S_OK) - skip("Prerequisites not matched, skipping remainder of test\n"); - if (enumpins) - IUnknown_Release(enumpins); - - if (avipin) - IUnknown_Release(avipin); - if (filepin) - { - IPin *to = NULL; - - IPin_ConnectedTo(filepin, &to); - if (to) - { - IPin_Disconnect(filepin); - IPin_Disconnect(to); - } - IUnknown_Release(filepin); - } - - if (preader) - IUnknown_Release(preader); - if (pavi) - IUnknown_Release(pavi); - if (pfile) - IUnknown_Release(pfile); - - curlevel = count_threads(); - todo_wine - ok(curlevel == baselevel, - "Amount of threads should be %d not %d\n", baselevel, curlevel); -} - -START_TEST(avisplitter) -{ - HMODULE kernel32 = GetModuleHandleA("kernel32.dll"); - - pCreateToolhelp32Snapshot = (void*)GetProcAddress(kernel32, "CreateToolhelp32Snapshot"); - pThread32First = (void*)GetProcAddress(kernel32, "Thread32First"); - pThread32Next = (void*)GetProcAddress(kernel32, "Thread32Next"); - - CoInitialize(NULL); - - if (!create_avisplitter()) - { - skip("Could not create avisplitter\n"); - return; - } - - test_query_interface(); - test_basefilter(); - test_threads(); - - release_avisplitter(); - - CoUninitialize(); -} diff --git a/rostests/winetests/quartz/dsoundrender.c b/rostests/winetests/quartz/dsoundrender.c deleted file mode 100644 index 5ecdaaac9a1..00000000000 --- a/rostests/winetests/quartz/dsoundrender.c +++ /dev/null @@ -1,234 +0,0 @@ -/* - * Unit tests for DSound Renderer functions - * - * Copyright (C) 2010 Maarten Lankhorst for CodeWeavers - * Copyright (C) 2007 Google (Lei Zhang) - * - * 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 - -#include "wine/test.h" -#include "dshow.h" -#include "initguid.h" -#include "dsound.h" -#include "amaudio.h" - -#define QI_SUCCEED(iface, riid, ppv) hr = IUnknown_QueryInterface(iface, &riid, (LPVOID*)&ppv); \ - ok(hr == S_OK, "IUnknown_QueryInterface returned %x\n", hr); \ - ok(ppv != NULL, "Pointer is NULL\n"); - -#define RELEASE_EXPECT(iface, num) if (iface) { \ - hr = IUnknown_Release(iface); \ - ok(hr == num, "IUnknown_Release should return %d, got %d\n", num, hr); \ -} - -static IUnknown *pDSRender = NULL; - -static int create_dsound_renderer(void) -{ - HRESULT hr; - - hr = CoCreateInstance(&CLSID_DSoundRender, NULL, CLSCTX_INPROC_SERVER, - &IID_IUnknown, (LPVOID*)&pDSRender); - return (hr == S_OK && pDSRender != NULL); -} - -static void release_dsound_renderer(void) -{ - HRESULT hr; - - hr = IUnknown_Release(pDSRender); - ok(hr == 0, "IUnknown_Release failed with %x\n", hr); -} - -static HRESULT WINAPI PB_QueryInterface(IPropertyBag *iface, REFIID riid, void **ppv) -{ - ok(0, "Should not be called\n"); - *ppv = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI PB_AddRef(IPropertyBag *iface) -{ - ok(0, "Should not be called\n"); - return 2; -} - -static ULONG WINAPI PB_Release(IPropertyBag *iface) -{ - ok(0, "Should not be called\n"); - return 1; -} - -static HRESULT WINAPI PB_Read(IPropertyBag *iface, LPCOLESTR name, VARIANT *var, IErrorLog *log) -{ - static const WCHAR dsguid[] = { 'D','S','G','u','i','d', 0 }; - char temp[50]; - WideCharToMultiByte(CP_ACP, 0, name, -1, temp, sizeof(temp)-1, NULL, NULL); - temp[sizeof(temp)-1] = 0; - trace("Trying to read %s, type %u\n", temp, var->n1.n2.vt); - if (!lstrcmpW(name, dsguid)) - { - static const WCHAR defaultplayback[] = - { - '{','D','E','F','0','0','0','0','0','-', - '9','C','6','D','-','4','7','E','D','-', - 'A','A','F','1','-','4','D','D','A','8', - 'F','2','B','5','C','0','3','}',0 - }; - ok(var->n1.n2.vt == VT_BSTR, "Wrong type asked: %u\n", var->n1.n2.vt); - var->n1.n2.n3.bstrVal = SysAllocString(defaultplayback); - return S_OK; - } - ok(0, "Unknown property '%s' queried\n", temp); - return E_FAIL; -} - -static HRESULT WINAPI PB_Write(IPropertyBag *iface, LPCOLESTR name, VARIANT *var) -{ - ok(0, "Should not be called\n"); - return E_FAIL; -} - -static IPropertyBagVtbl PB_Vtbl = -{ - PB_QueryInterface, - PB_AddRef, - PB_Release, - PB_Read, - PB_Write -}; - -static void test_query_interface(void) -{ - HRESULT hr; - IBaseFilter *pBaseFilter = NULL; - IBasicAudio *pBasicAudio = NULL; - IMediaPosition *pMediaPosition = NULL; - IMediaSeeking *pMediaSeeking = NULL; - IQualityControl *pQualityControl = NULL; - IPersistPropertyBag *ppb = NULL; - IDirectSound3DBuffer *ds3dbuf = NULL; - IReferenceClock *clock = NULL; - IAMDirectSound *pAMDirectSound = NULL; - - QI_SUCCEED(pDSRender, IID_IBaseFilter, pBaseFilter); - RELEASE_EXPECT(pBaseFilter, 1); - QI_SUCCEED(pDSRender, IID_IBasicAudio, pBasicAudio); - RELEASE_EXPECT(pBasicAudio, 1); - QI_SUCCEED(pDSRender, IID_IMediaSeeking, pMediaSeeking); - RELEASE_EXPECT(pMediaSeeking, 1); - QI_SUCCEED(pDSRender, IID_IReferenceClock, clock); - RELEASE_EXPECT(clock, 1); - QI_SUCCEED(pDSRender, IID_IAMDirectSound, pAMDirectSound); - RELEASE_EXPECT( pAMDirectSound, 1); - todo_wine { - QI_SUCCEED(pDSRender, IID_IDirectSound3DBuffer, ds3dbuf); - RELEASE_EXPECT(ds3dbuf, 1); - QI_SUCCEED(pDSRender, IID_IPersistPropertyBag, ppb); - if (ppb) - { - IPropertyBag bag = { &PB_Vtbl }; - hr = IPersistPropertyBag_Load(ppb, &bag, NULL); - ok(hr == S_OK, "Couldn't load default device: %08x\n", hr); - } - RELEASE_EXPECT(ppb, 1); - QI_SUCCEED(pDSRender, IID_IMediaPosition, pMediaPosition); - RELEASE_EXPECT(pMediaPosition, 1); - QI_SUCCEED(pDSRender, IID_IQualityControl, pQualityControl); - RELEASE_EXPECT(pQualityControl, 1); - } -} - -static void test_pin(IPin *pin) -{ - IMemInputPin *mpin = NULL; - - IPin_QueryInterface(pin, &IID_IMemInputPin, (void **)&mpin); - - ok(mpin != NULL, "No IMemInputPin found!\n"); - if (mpin) - { - ok(IMemInputPin_ReceiveCanBlock(mpin) == S_OK, "Receive can't block for pin!\n"); - ok(IMemInputPin_NotifyAllocator(mpin, NULL, 0) == E_POINTER, "NotifyAllocator likes a NULL pointer argument\n"); - IMemInputPin_Release(mpin); - } - /* TODO */ -} - -static void test_basefilter(void) -{ - IEnumPins *pin_enum = NULL; - IBaseFilter *base = NULL; - IPin *pins[2]; - ULONG ref; - HRESULT hr; - - IUnknown_QueryInterface(pDSRender, &IID_IBaseFilter, (void *)&base); - if (base == NULL) - { - /* test_query_interface handles this case */ - skip("No IBaseFilter\n"); - return; - } - - hr = IBaseFilter_EnumPins(base, NULL); - ok(hr == E_POINTER, "hr = %08x and not E_POINTER\n", hr); - - hr= IBaseFilter_EnumPins(base, &pin_enum); - ok(hr == S_OK, "hr = %08x and not S_OK\n", hr); - - hr = IEnumPins_Next(pin_enum, 1, NULL, NULL); - ok(hr == E_POINTER, "hr = %08x and not E_POINTER\n", hr); - - hr = IEnumPins_Next(pin_enum, 2, pins, NULL); - ok(hr == E_INVALIDARG, "hr = %08x and not E_INVALIDARG\n", hr); - - pins[0] = (void *)0xdead; - pins[1] = (void *)0xdeed; - - hr = IEnumPins_Next(pin_enum, 2, pins, &ref); - ok(hr == S_FALSE, "hr = %08x instead of S_FALSE\n", hr); - ok(pins[0] != (void *)0xdead && pins[0] != NULL, "pins[0] = %p\n", pins[0]); - if (pins[0] != (void *)0xdead && pins[0] != NULL) - { - test_pin(pins[0]); - IPin_Release(pins[0]); - } - - ok(pins[1] == (void *)0xdeed, "pins[1] = %p\n", pins[1]); - - ref = IEnumPins_Release(pin_enum); - ok(ref == 0, "ref is %u and not 0!\n", ref); - - IBaseFilter_Release(base); -} - -START_TEST(dsoundrender) -{ - CoInitialize(NULL); - if (!create_dsound_renderer()) - return; - - test_query_interface(); - test_basefilter(); - - release_dsound_renderer(); - - CoUninitialize(); -} diff --git a/rostests/winetests/quartz/filtergraph.c b/rostests/winetests/quartz/filtergraph.c deleted file mode 100644 index 26a72beef8d..00000000000 --- a/rostests/winetests/quartz/filtergraph.c +++ /dev/null @@ -1,1857 +0,0 @@ -/* - * Unit tests for Direct Show functions - * - * Copyright (C) 2004 Christian Costa - * Copyright (C) 2008 Alexander Dorofeyev - * - * 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 COBJMACROS - -#include "wine/test.h" -#include "dshow.h" -#include "control.h" - -#define FILE_LEN 9 -static const char avifileA[FILE_LEN] = "test.avi"; -static const char mpegfileA[FILE_LEN] = "test.mpg"; - -IGraphBuilder* pgraph; - -static int createfiltergraph(void) -{ - return S_OK == CoCreateInstance( - &CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IGraphBuilder, (LPVOID*)&pgraph); -} - -static void renderfile(const char * fileA) -{ - HRESULT hr; - WCHAR fileW[FILE_LEN]; - - MultiByteToWideChar(CP_ACP, 0, fileA, -1, fileW, FILE_LEN); - - hr = IGraphBuilder_RenderFile(pgraph, fileW, NULL); - ok(hr==S_OK, "RenderFile returned: %x\n", hr); -} - -static void rungraph(void) -{ - HRESULT hr; - IMediaControl* pmc; - IMediaEvent* pme; - IMediaFilter* pmf; - HANDLE hEvent; - - hr = IGraphBuilder_QueryInterface(pgraph, &IID_IMediaControl, (LPVOID*)&pmc); - ok(hr==S_OK, "Cannot get IMediaControl interface returned: %x\n", hr); - - hr = IGraphBuilder_QueryInterface(pgraph, &IID_IMediaFilter, (LPVOID*)&pmf); - ok(hr==S_OK, "Cannot get IMediaFilter interface returned: %x\n", hr); - - IMediaControl_Stop(pmc); - - IMediaFilter_SetSyncSource(pmf, NULL); - - IMediaFilter_Release(pmf); - - hr = IMediaControl_Run(pmc); - ok(hr==S_FALSE, "Cannot run the graph returned: %x\n", hr); - - Sleep(10); - /* Crash fun */ - trace("run -> stop\n"); - hr = IMediaControl_Stop(pmc); - ok(hr==S_OK || hr == S_FALSE, "Cannot stop the graph returned: %x\n", hr); - - IGraphBuilder_SetDefaultSyncSource(pgraph); - - Sleep(10); - trace("stop -> pause\n"); - hr = IMediaControl_Pause(pmc); - ok(hr==S_OK || hr == S_FALSE, "Cannot pause the graph returned: %x\n", hr); - - Sleep(10); - trace("pause -> run\n"); - hr = IMediaControl_Run(pmc); - ok(hr==S_OK || hr == S_FALSE, "Cannot start the graph returned: %x\n", hr); - - Sleep(10); - trace("run -> pause\n"); - hr = IMediaControl_Pause(pmc); - ok(hr==S_OK || hr == S_FALSE, "Cannot pause the graph returned: %x\n", hr); - - Sleep(10); - trace("pause -> stop\n"); - hr = IMediaControl_Stop(pmc); - ok(hr==S_OK || hr == S_FALSE, "Cannot stop the graph returned: %x\n", hr); - - Sleep(10); - trace("pause -> run\n"); - hr = IMediaControl_Run(pmc); - ok(hr==S_OK || hr == S_FALSE, "Cannot start the graph returned: %x\n", hr); - - trace("run -> stop\n"); - hr = IMediaControl_Stop(pmc); - ok(hr==S_OK || hr == S_FALSE, "Cannot stop the graph returned: %x\n", hr); - - trace("stop -> run\n"); - hr = IMediaControl_Run(pmc); - ok(hr==S_OK || hr == S_FALSE, "Cannot start the graph returned: %x\n", hr); - - hr = IGraphBuilder_QueryInterface(pgraph, &IID_IMediaEvent, (LPVOID*)&pme); - ok(hr==S_OK, "Cannot get IMediaEvent interface returned: %x\n", hr); - - hr = IMediaEvent_GetEventHandle(pme, (OAEVENT*)&hEvent); - ok(hr==S_OK, "Cannot get event handle returned: %x\n", hr); - - /* WaitForSingleObject(hEvent, INFINITE); */ - Sleep(20000); - - hr = IMediaEvent_Release(pme); - ok(hr==2, "Releasing mediaevent returned: %x\n", hr); - - hr = IMediaControl_Stop(pmc); - ok(hr==S_OK, "Cannot stop the graph returned: %x\n", hr); - - hr = IMediaControl_Release(pmc); - ok(hr==1, "Releasing mediacontrol returned: %x\n", hr); -} - -static void releasefiltergraph(void) -{ - HRESULT hr; - - hr = IGraphBuilder_Release(pgraph); - ok(hr==0, "Releasing filtergraph returned: %x\n", hr); -} - -static void test_render_run(const char * fileA) -{ - HANDLE h; - - if (!createfiltergraph()) - return; - - h = CreateFileA(fileA, 0, 0, NULL, OPEN_EXISTING, 0, NULL); - if (h != INVALID_HANDLE_VALUE) { - CloseHandle(h); - renderfile(fileA); - rungraph(); - } - - releasefiltergraph(); -} - -static void test_graph_builder(void) -{ - HRESULT hr; - IBaseFilter *pF = NULL; - IBaseFilter *pF2 = NULL; - IPin *pIn = NULL; - IEnumPins *pEnum = NULL; - PIN_DIRECTION dir; - static const WCHAR testFilterW[] = {'t','e','s','t','F','i','l','t','e','r',0}; - static const WCHAR fooBarW[] = {'f','o','o','B','a','r',0}; - - if (!createfiltergraph()) - return; - - /* create video filter */ - hr = CoCreateInstance(&CLSID_VideoRenderer, NULL, CLSCTX_INPROC_SERVER, - &IID_IBaseFilter, (LPVOID*)&pF); - ok(hr == S_OK, "CoCreateInstance failed with %x\n", hr); - ok(pF != NULL, "pF is NULL\n"); - - /* add the two filters to the graph */ - hr = IGraphBuilder_AddFilter(pgraph, pF, testFilterW); - ok(hr == S_OK, "failed to add pF to the graph: %x\n", hr); - - /* find the pins */ - hr = IBaseFilter_EnumPins(pF, &pEnum); - ok(hr == S_OK, "IBaseFilter_EnumPins failed for pF: %x\n", hr); - ok(pEnum != NULL, "pEnum is NULL\n"); - hr = IEnumPins_Next(pEnum, 1, &pIn, NULL); - ok(hr == S_OK, "IEnumPins_Next failed for pF: %x\n", hr); - ok(pIn != NULL, "pIn is NULL\n"); - hr = IPin_QueryDirection(pIn, &dir); - ok(hr == S_OK, "IPin_QueryDirection failed: %x\n", hr); - ok(dir == PINDIR_INPUT, "pin has wrong direction\n"); - - hr = IGraphBuilder_FindFilterByName(pgraph, fooBarW, &pF2); - ok(hr == VFW_E_NOT_FOUND, "IGraphBuilder_FindFilterByName returned %x\n", hr); - ok(pF2 == NULL, "IGraphBuilder_FindFilterByName returned %p\n", pF2); - hr = IGraphBuilder_FindFilterByName(pgraph, testFilterW, &pF2); - ok(hr == S_OK, "IGraphBuilder_FindFilterByName returned %x\n", hr); - ok(pF2 != NULL, "IGraphBuilder_FindFilterByName returned NULL\n"); - hr = IGraphBuilder_FindFilterByName(pgraph, testFilterW, NULL); - ok(hr == E_POINTER, "IGraphBuilder_FindFilterByName returned %x\n", hr); - - if (pIn) IPin_Release(pIn); - if (pEnum) IEnumPins_Release(pEnum); - if (pF) IBaseFilter_Release(pF); - if (pF2) IBaseFilter_Release(pF2); - - releasefiltergraph(); -} - -static void test_graph_builder_addfilter(void) -{ - HRESULT hr; - IBaseFilter *pF = NULL; - static const WCHAR testFilterW[] = {'t','e','s','t','F','i','l','t','e','r',0}; - - if (!createfiltergraph()) - return; - - hr = IGraphBuilder_AddFilter(pgraph, NULL, testFilterW); - ok(hr == E_POINTER, "IGraphBuilder_AddFilter returned: %x\n", hr); - - /* create video filter */ - hr = CoCreateInstance(&CLSID_VideoRenderer, NULL, CLSCTX_INPROC_SERVER, - &IID_IBaseFilter, (LPVOID*)&pF); - ok(hr == S_OK, "CoCreateInstance failed with %x\n", hr); - ok(pF != NULL, "pF is NULL\n"); - if (!pF) { - skip("failed to created filter, skipping\n"); - return; - } - - hr = IGraphBuilder_AddFilter(pgraph, pF, NULL); - ok(hr == S_OK, "IGraphBuilder_AddFilter returned: %x\n", hr); - IMediaFilter_Release(pF); -} - -static void test_mediacontrol(void) -{ - HRESULT hr; - LONGLONG pos = 0xdeadbeef; - IMediaSeeking *seeking = NULL; - IMediaFilter *filter = NULL; - IMediaControl *control = NULL; - - IFilterGraph2_SetDefaultSyncSource(pgraph); - hr = IFilterGraph2_QueryInterface(pgraph, &IID_IMediaSeeking, (void**) &seeking); - ok(hr == S_OK, "QueryInterface IMediaControl failed: %08x\n", hr); - if (FAILED(hr)) - return; - - hr = IFilterGraph2_QueryInterface(pgraph, &IID_IMediaFilter, (void**) &filter); - ok(hr == S_OK, "QueryInterface IMediaFilter failed: %08x\n", hr); - if (FAILED(hr)) - { - IUnknown_Release(seeking); - return; - } - - hr = IFilterGraph2_QueryInterface(pgraph, &IID_IMediaControl, (void**) &control); - ok(hr == S_OK, "QueryInterface IMediaControl failed: %08x\n", hr); - if (FAILED(hr)) - { - IUnknown_Release(seeking); - IUnknown_Release(filter); - return; - } - - hr = IMediaSeeking_GetCurrentPosition(seeking, &pos); - ok(hr == S_OK, "GetCurrentPosition failed: %08x\n", hr); - ok(pos == 0, "Position != 0 (%x%08x)\n", (DWORD)(pos >> 32), (DWORD)pos); - - hr = IMediaSeeking_SetPositions(seeking, NULL, AM_SEEKING_ReturnTime, NULL, AM_SEEKING_NoPositioning); - ok(hr == S_OK, "SetPositions failed: %08x\n", hr); - hr = IMediaSeeking_SetPositions(seeking, NULL, AM_SEEKING_NoPositioning, NULL, AM_SEEKING_ReturnTime); - ok(hr == S_OK, "SetPositions failed: %08x\n", hr); - - IMediaFilter_SetSyncSource(filter, NULL); - pos = 0xdeadbeef; - hr = IMediaSeeking_GetCurrentPosition(seeking, &pos); - ok(hr == S_OK, "GetCurrentPosition failed: %08x\n", hr); - ok(pos == 0, "Position != 0 (%x%08x)\n", (DWORD)(pos >> 32), (DWORD)pos); - - hr = IMediaControl_GetState(control, 1000, NULL); - ok(hr == E_POINTER, "GetState expected %08x, got %08x\n", E_POINTER, hr); - - IUnknown_Release(control); - IUnknown_Release(seeking); - IUnknown_Release(filter); - releasefiltergraph(); -} - -static void test_filter_graph2(void) -{ - HRESULT hr; - IFilterGraph2 *pF = NULL; - - hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, - &IID_IFilterGraph2, (LPVOID*)&pF); - ok(hr == S_OK, "CoCreateInstance failed with %x\n", hr); - ok(pF != NULL, "pF is NULL\n"); - - hr = IFilterGraph2_Release(pF); - ok(hr == 0, "IFilterGraph2_Release returned: %x\n", hr); -} - -/* IEnumMediaTypes implementation (supporting code for Render() test.) */ -static void FreeMediaType(AM_MEDIA_TYPE * pMediaType) -{ - if (pMediaType->pbFormat) - { - CoTaskMemFree(pMediaType->pbFormat); - pMediaType->pbFormat = NULL; - } - if (pMediaType->pUnk) - { - IUnknown_Release(pMediaType->pUnk); - pMediaType->pUnk = NULL; - } -} - -static HRESULT CopyMediaType(AM_MEDIA_TYPE * pDest, const AM_MEDIA_TYPE *pSrc) -{ - *pDest = *pSrc; - if (!pSrc->pbFormat) return S_OK; - if (!(pDest->pbFormat = CoTaskMemAlloc(pSrc->cbFormat))) - return E_OUTOFMEMORY; - memcpy(pDest->pbFormat, pSrc->pbFormat, pSrc->cbFormat); - if (pDest->pUnk) - IUnknown_AddRef(pDest->pUnk); - return S_OK; -} - -static AM_MEDIA_TYPE * CreateMediaType(AM_MEDIA_TYPE const * pSrc) -{ - AM_MEDIA_TYPE * pDest; - - pDest = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE)); - if (!pDest) - return NULL; - - if (FAILED(CopyMediaType(pDest, pSrc))) - { - CoTaskMemFree(pDest); - return NULL; - } - - return pDest; -} - -static BOOL CompareMediaTypes(const AM_MEDIA_TYPE * pmt1, const AM_MEDIA_TYPE * pmt2, BOOL bWildcards) -{ - return (((bWildcards && (IsEqualGUID(&pmt1->majortype, &GUID_NULL) || IsEqualGUID(&pmt2->majortype, &GUID_NULL))) || IsEqualGUID(&pmt1->majortype, &pmt2->majortype)) && - ((bWildcards && (IsEqualGUID(&pmt1->subtype, &GUID_NULL) || IsEqualGUID(&pmt2->subtype, &GUID_NULL))) || IsEqualGUID(&pmt1->subtype, &pmt2->subtype))); -} - -static void DeleteMediaType(AM_MEDIA_TYPE * pMediaType) -{ - FreeMediaType(pMediaType); - CoTaskMemFree(pMediaType); -} - -typedef struct IEnumMediaTypesImpl -{ - const IEnumMediaTypesVtbl * lpVtbl; - LONG refCount; - AM_MEDIA_TYPE *pMediaTypes; - ULONG cMediaTypes; - ULONG uIndex; -} IEnumMediaTypesImpl; - -static const struct IEnumMediaTypesVtbl IEnumMediaTypesImpl_Vtbl; - -static HRESULT IEnumMediaTypesImpl_Construct(const AM_MEDIA_TYPE * pMediaTypes, ULONG cMediaTypes, IEnumMediaTypes ** ppEnum) -{ - ULONG i; - IEnumMediaTypesImpl * pEnumMediaTypes = CoTaskMemAlloc(sizeof(IEnumMediaTypesImpl)); - - if (!pEnumMediaTypes) - { - *ppEnum = NULL; - return E_OUTOFMEMORY; - } - pEnumMediaTypes->lpVtbl = &IEnumMediaTypesImpl_Vtbl; - pEnumMediaTypes->refCount = 1; - pEnumMediaTypes->uIndex = 0; - pEnumMediaTypes->cMediaTypes = cMediaTypes; - pEnumMediaTypes->pMediaTypes = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE) * cMediaTypes); - for (i = 0; i < cMediaTypes; i++) - if (FAILED(CopyMediaType(&pEnumMediaTypes->pMediaTypes[i], &pMediaTypes[i]))) - { - while (i--) - FreeMediaType(&pEnumMediaTypes->pMediaTypes[i]); - CoTaskMemFree(pEnumMediaTypes->pMediaTypes); - return E_OUTOFMEMORY; - } - *ppEnum = (IEnumMediaTypes *)(&pEnumMediaTypes->lpVtbl); - return S_OK; -} - -static HRESULT WINAPI IEnumMediaTypesImpl_QueryInterface(IEnumMediaTypes * iface, REFIID riid, LPVOID * ppv) -{ - *ppv = NULL; - - if (IsEqualIID(riid, &IID_IUnknown)) - *ppv = iface; - else if (IsEqualIID(riid, &IID_IEnumMediaTypes)) - *ppv = iface; - - if (*ppv) - { - IUnknown_AddRef((IUnknown *)(*ppv)); - return S_OK; - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI IEnumMediaTypesImpl_AddRef(IEnumMediaTypes * iface) -{ - IEnumMediaTypesImpl *This = (IEnumMediaTypesImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->refCount); - - return refCount; -} - -static ULONG WINAPI IEnumMediaTypesImpl_Release(IEnumMediaTypes * iface) -{ - IEnumMediaTypesImpl *This = (IEnumMediaTypesImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->refCount); - - if (!refCount) - { - int i; - for (i = 0; i < This->cMediaTypes; i++) - FreeMediaType(&This->pMediaTypes[i]); - CoTaskMemFree(This->pMediaTypes); - CoTaskMemFree(This); - } - return refCount; -} - -static HRESULT WINAPI IEnumMediaTypesImpl_Next(IEnumMediaTypes * iface, ULONG cMediaTypes, AM_MEDIA_TYPE ** ppMediaTypes, ULONG * pcFetched) -{ - ULONG cFetched; - IEnumMediaTypesImpl *This = (IEnumMediaTypesImpl *)iface; - - cFetched = min(This->cMediaTypes, This->uIndex + cMediaTypes) - This->uIndex; - - if (cFetched > 0) - { - ULONG i; - for (i = 0; i < cFetched; i++) - if (!(ppMediaTypes[i] = CreateMediaType(&This->pMediaTypes[This->uIndex + i]))) - { - while (i--) - DeleteMediaType(ppMediaTypes[i]); - *pcFetched = 0; - return E_OUTOFMEMORY; - } - } - - if ((cMediaTypes != 1) || pcFetched) - *pcFetched = cFetched; - - This->uIndex += cFetched; - - if (cFetched != cMediaTypes) - return S_FALSE; - return S_OK; -} - -static HRESULT WINAPI IEnumMediaTypesImpl_Skip(IEnumMediaTypes * iface, ULONG cMediaTypes) -{ - IEnumMediaTypesImpl *This = (IEnumMediaTypesImpl *)iface; - - if (This->uIndex + cMediaTypes < This->cMediaTypes) - { - This->uIndex += cMediaTypes; - return S_OK; - } - return S_FALSE; -} - -static HRESULT WINAPI IEnumMediaTypesImpl_Reset(IEnumMediaTypes * iface) -{ - IEnumMediaTypesImpl *This = (IEnumMediaTypesImpl *)iface; - - This->uIndex = 0; - return S_OK; -} - -static HRESULT WINAPI IEnumMediaTypesImpl_Clone(IEnumMediaTypes * iface, IEnumMediaTypes ** ppEnum) -{ - HRESULT hr; - IEnumMediaTypesImpl *This = (IEnumMediaTypesImpl *)iface; - - hr = IEnumMediaTypesImpl_Construct(This->pMediaTypes, This->cMediaTypes, ppEnum); - if (FAILED(hr)) - return hr; - return IEnumMediaTypes_Skip(*ppEnum, This->uIndex); -} - -static const IEnumMediaTypesVtbl IEnumMediaTypesImpl_Vtbl = -{ - IEnumMediaTypesImpl_QueryInterface, - IEnumMediaTypesImpl_AddRef, - IEnumMediaTypesImpl_Release, - IEnumMediaTypesImpl_Next, - IEnumMediaTypesImpl_Skip, - IEnumMediaTypesImpl_Reset, - IEnumMediaTypesImpl_Clone -}; - -/* Implementation of a very stripped down pin for the test filter. Just enough - functionality for connecting and Render() to work. */ - -static void Copy_PinInfo(PIN_INFO * pDest, const PIN_INFO * pSrc) -{ - lstrcpyW(pDest->achName, pSrc->achName); - pDest->dir = pSrc->dir; - pDest->pFilter = pSrc->pFilter; -} - -typedef struct ITestPinImpl -{ - const struct IPinVtbl * lpVtbl; - LONG refCount; - LPCRITICAL_SECTION pCritSec; - PIN_INFO pinInfo; - IPin * pConnectedTo; - AM_MEDIA_TYPE mtCurrent; - LPVOID pUserData; -} ITestPinImpl; - -static HRESULT WINAPI TestFilter_Pin_QueryInterface(IPin * iface, REFIID riid, LPVOID * ppv) -{ - *ppv = NULL; - - if (IsEqualIID(riid, &IID_IUnknown)) - *ppv = iface; - else if (IsEqualIID(riid, &IID_IPin)) - *ppv = iface; - - if (*ppv) - { - IUnknown_AddRef((IUnknown *)(*ppv)); - return S_OK; - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI TestFilter_Pin_AddRef(IPin * iface) -{ - ITestPinImpl *This = (ITestPinImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->refCount); - return refCount; -} - -static ULONG WINAPI TestFilter_Pin_Release(IPin * iface) -{ - ITestPinImpl *This = (ITestPinImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->refCount); - - if (!refCount) - { - FreeMediaType(&This->mtCurrent); - This->lpVtbl = NULL; - CoTaskMemFree(This); - return 0; - } - else - return refCount; -} - -static HRESULT WINAPI TestFilter_InputPin_Connect(IPin * iface, IPin * pConnector, const AM_MEDIA_TYPE * pmt) -{ - return E_UNEXPECTED; -} - -static HRESULT WINAPI TestFilter_InputPin_ReceiveConnection(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt) -{ - ITestPinImpl *This = (ITestPinImpl *)iface; - PIN_DIRECTION pindirReceive; - HRESULT hr = S_OK; - - EnterCriticalSection(This->pCritSec); - { - if (!(IsEqualIID(&pmt->majortype, &This->mtCurrent.majortype) && (IsEqualIID(&pmt->subtype, &This->mtCurrent.subtype) || - IsEqualIID(&GUID_NULL, &This->mtCurrent.subtype)))) - hr = VFW_E_TYPE_NOT_ACCEPTED; - - if (This->pConnectedTo) - hr = VFW_E_ALREADY_CONNECTED; - - if (SUCCEEDED(hr)) - { - IPin_QueryDirection(pReceivePin, &pindirReceive); - - if (pindirReceive != PINDIR_OUTPUT) - { - hr = VFW_E_INVALID_DIRECTION; - } - } - - if (SUCCEEDED(hr)) - { - CopyMediaType(&This->mtCurrent, pmt); - This->pConnectedTo = pReceivePin; - IPin_AddRef(pReceivePin); - } - } - LeaveCriticalSection(This->pCritSec); - - return hr; -} - -static HRESULT WINAPI TestFilter_Pin_Disconnect(IPin * iface) -{ - HRESULT hr; - ITestPinImpl *This = (ITestPinImpl *)iface; - - EnterCriticalSection(This->pCritSec); - { - if (This->pConnectedTo) - { - IPin_Release(This->pConnectedTo); - This->pConnectedTo = NULL; - hr = S_OK; - } - else - hr = S_FALSE; - } - LeaveCriticalSection(This->pCritSec); - - return hr; -} - -static HRESULT WINAPI TestFilter_Pin_ConnectedTo(IPin * iface, IPin ** ppPin) -{ - HRESULT hr; - ITestPinImpl *This = (ITestPinImpl *)iface; - - EnterCriticalSection(This->pCritSec); - { - if (This->pConnectedTo) - { - *ppPin = This->pConnectedTo; - IPin_AddRef(*ppPin); - hr = S_OK; - } - else - { - hr = VFW_E_NOT_CONNECTED; - *ppPin = NULL; - } - } - LeaveCriticalSection(This->pCritSec); - - return hr; -} - -static HRESULT WINAPI TestFilter_Pin_ConnectionMediaType(IPin * iface, AM_MEDIA_TYPE * pmt) -{ - HRESULT hr; - ITestPinImpl *This = (ITestPinImpl *)iface; - - EnterCriticalSection(This->pCritSec); - { - if (This->pConnectedTo) - { - CopyMediaType(pmt, &This->mtCurrent); - hr = S_OK; - } - else - { - ZeroMemory(pmt, sizeof(*pmt)); - hr = VFW_E_NOT_CONNECTED; - } - } - LeaveCriticalSection(This->pCritSec); - - return hr; -} - -static HRESULT WINAPI TestFilter_Pin_QueryPinInfo(IPin * iface, PIN_INFO * pInfo) -{ - ITestPinImpl *This = (ITestPinImpl *)iface; - - Copy_PinInfo(pInfo, &This->pinInfo); - IBaseFilter_AddRef(pInfo->pFilter); - - return S_OK; -} - -static HRESULT WINAPI TestFilter_Pin_QueryDirection(IPin * iface, PIN_DIRECTION * pPinDir) -{ - ITestPinImpl *This = (ITestPinImpl *)iface; - - *pPinDir = This->pinInfo.dir; - - return S_OK; -} - -static HRESULT WINAPI TestFilter_Pin_QueryId(IPin * iface, LPWSTR * Id) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI TestFilter_Pin_QueryAccept(IPin * iface, const AM_MEDIA_TYPE * pmt) -{ - ITestPinImpl *This = (ITestPinImpl *)iface; - - if (IsEqualIID(&pmt->majortype, &This->mtCurrent.majortype) && (IsEqualIID(&pmt->subtype, &This->mtCurrent.subtype) || - IsEqualIID(&GUID_NULL, &This->mtCurrent.subtype))) - return S_OK; - else - return VFW_E_TYPE_NOT_ACCEPTED; -} - -static HRESULT WINAPI TestFilter_Pin_EnumMediaTypes(IPin * iface, IEnumMediaTypes ** ppEnum) -{ - ITestPinImpl *This = (ITestPinImpl *)iface; - - return IEnumMediaTypesImpl_Construct(&This->mtCurrent, 1, ppEnum); -} - -static HRESULT WINAPI TestFilter_Pin_QueryInternalConnections(IPin * iface, IPin ** apPin, ULONG * cPin) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI TestFilter_Pin_BeginFlush(IPin * iface) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI TestFilter_Pin_EndFlush(IPin * iface) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI TestFilter_Pin_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI TestFilter_Pin_EndOfStream(IPin * iface) -{ - return E_NOTIMPL; -} - -static const IPinVtbl TestFilter_InputPin_Vtbl = -{ - TestFilter_Pin_QueryInterface, - TestFilter_Pin_AddRef, - TestFilter_Pin_Release, - TestFilter_InputPin_Connect, - TestFilter_InputPin_ReceiveConnection, - TestFilter_Pin_Disconnect, - TestFilter_Pin_ConnectedTo, - TestFilter_Pin_ConnectionMediaType, - TestFilter_Pin_QueryPinInfo, - TestFilter_Pin_QueryDirection, - TestFilter_Pin_QueryId, - TestFilter_Pin_QueryAccept, - TestFilter_Pin_EnumMediaTypes, - TestFilter_Pin_QueryInternalConnections, - TestFilter_Pin_EndOfStream, - TestFilter_Pin_BeginFlush, - TestFilter_Pin_EndFlush, - TestFilter_Pin_NewSegment -}; - -static HRESULT WINAPI TestFilter_OutputPin_ReceiveConnection(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt) -{ - return E_UNEXPECTED; -} - -/* Private helper function */ -static HRESULT TestFilter_OutputPin_ConnectSpecific(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt) -{ - ITestPinImpl *This = (ITestPinImpl *)iface; - HRESULT hr; - - This->pConnectedTo = pReceivePin; - IPin_AddRef(pReceivePin); - - hr = IPin_ReceiveConnection(pReceivePin, iface, pmt); - - if (FAILED(hr)) - { - IPin_Release(This->pConnectedTo); - This->pConnectedTo = NULL; - } - - return hr; -} - -static HRESULT WINAPI TestFilter_OutputPin_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt) -{ - ITestPinImpl *This = (ITestPinImpl *)iface; - HRESULT hr; - - EnterCriticalSection(This->pCritSec); - { - /* if we have been a specific type to connect with, then we can either connect - * with that or fail. We cannot choose different AM_MEDIA_TYPE */ - if (pmt && !IsEqualGUID(&pmt->majortype, &GUID_NULL) && !IsEqualGUID(&pmt->subtype, &GUID_NULL)) - hr = TestFilter_OutputPin_ConnectSpecific(iface, pReceivePin, pmt); - else - { - if (( !pmt || CompareMediaTypes(pmt, &This->mtCurrent, TRUE) ) && - (TestFilter_OutputPin_ConnectSpecific(iface, pReceivePin, &This->mtCurrent) == S_OK)) - hr = S_OK; - else hr = VFW_E_NO_ACCEPTABLE_TYPES; - } /* if negotiate media type */ - } /* if succeeded */ - LeaveCriticalSection(This->pCritSec); - - return hr; -} - -static const IPinVtbl TestFilter_OutputPin_Vtbl = -{ - TestFilter_Pin_QueryInterface, - TestFilter_Pin_AddRef, - TestFilter_Pin_Release, - TestFilter_OutputPin_Connect, - TestFilter_OutputPin_ReceiveConnection, - TestFilter_Pin_Disconnect, - TestFilter_Pin_ConnectedTo, - TestFilter_Pin_ConnectionMediaType, - TestFilter_Pin_QueryPinInfo, - TestFilter_Pin_QueryDirection, - TestFilter_Pin_QueryId, - TestFilter_Pin_QueryAccept, - TestFilter_Pin_EnumMediaTypes, - TestFilter_Pin_QueryInternalConnections, - TestFilter_Pin_EndOfStream, - TestFilter_Pin_BeginFlush, - TestFilter_Pin_EndFlush, - TestFilter_Pin_NewSegment -}; - -static HRESULT TestFilter_Pin_Construct(const IPinVtbl *Pin_Vtbl, const PIN_INFO * pPinInfo, AM_MEDIA_TYPE *pinmt, - LPCRITICAL_SECTION pCritSec, IPin ** ppPin) -{ - ITestPinImpl * pPinImpl; - - *ppPin = NULL; - - pPinImpl = CoTaskMemAlloc(sizeof(ITestPinImpl)); - - if (!pPinImpl) - return E_OUTOFMEMORY; - - pPinImpl->refCount = 1; - pPinImpl->pConnectedTo = NULL; - pPinImpl->pCritSec = pCritSec; - Copy_PinInfo(&pPinImpl->pinInfo, pPinInfo); - pPinImpl->mtCurrent = *pinmt; - - pPinImpl->lpVtbl = Pin_Vtbl; - - *ppPin = (IPin *)pPinImpl; - return S_OK; -} - -/* IEnumPins implementation */ - -typedef HRESULT (* FNOBTAINPIN)(IBaseFilter *iface, ULONG pos, IPin **pin, DWORD *lastsynctick); - -typedef struct IEnumPinsImpl -{ - const IEnumPinsVtbl * lpVtbl; - LONG refCount; - ULONG uIndex; - IBaseFilter *base; - FNOBTAINPIN receive_pin; - DWORD synctime; -} IEnumPinsImpl; - -static const struct IEnumPinsVtbl IEnumPinsImpl_Vtbl; - -static HRESULT IEnumPinsImpl_Construct(IEnumPins ** ppEnum, FNOBTAINPIN receive_pin, IBaseFilter *base) -{ - IEnumPinsImpl * pEnumPins; - - if (!ppEnum) - return E_POINTER; - - pEnumPins = CoTaskMemAlloc(sizeof(IEnumPinsImpl)); - if (!pEnumPins) - { - *ppEnum = NULL; - return E_OUTOFMEMORY; - } - pEnumPins->lpVtbl = &IEnumPinsImpl_Vtbl; - pEnumPins->refCount = 1; - pEnumPins->uIndex = 0; - pEnumPins->receive_pin = receive_pin; - pEnumPins->base = base; - IBaseFilter_AddRef(base); - *ppEnum = (IEnumPins *)(&pEnumPins->lpVtbl); - - receive_pin(base, ~0, NULL, &pEnumPins->synctime); - - return S_OK; -} - -static HRESULT WINAPI IEnumPinsImpl_QueryInterface(IEnumPins * iface, REFIID riid, LPVOID * ppv) -{ - *ppv = NULL; - - if (IsEqualIID(riid, &IID_IUnknown)) - *ppv = iface; - else if (IsEqualIID(riid, &IID_IEnumPins)) - *ppv = iface; - - if (*ppv) - { - IUnknown_AddRef((IUnknown *)(*ppv)); - return S_OK; - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI IEnumPinsImpl_AddRef(IEnumPins * iface) -{ - IEnumPinsImpl *This = (IEnumPinsImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->refCount); - - return refCount; -} - -static ULONG WINAPI IEnumPinsImpl_Release(IEnumPins * iface) -{ - IEnumPinsImpl *This = (IEnumPinsImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->refCount); - - if (!refCount) - { - IBaseFilter_Release(This->base); - CoTaskMemFree(This); - return 0; - } - else - return refCount; -} - -static HRESULT WINAPI IEnumPinsImpl_Next(IEnumPins * iface, ULONG cPins, IPin ** ppPins, ULONG * pcFetched) -{ - IEnumPinsImpl *This = (IEnumPinsImpl *)iface; - DWORD synctime = This->synctime; - HRESULT hr = S_OK; - ULONG i = 0; - - if (!ppPins) - return E_POINTER; - - if (cPins > 1 && !pcFetched) - return E_INVALIDARG; - - if (pcFetched) - *pcFetched = 0; - - while (i < cPins && hr == S_OK) - { - hr = This->receive_pin(This->base, This->uIndex + i, &ppPins[i], &synctime); - - if (hr == S_OK) - ++i; - - if (synctime != This->synctime) - break; - } - - if (!i && synctime != This->synctime) - return VFW_E_ENUM_OUT_OF_SYNC; - - if (pcFetched) - *pcFetched = i; - This->uIndex += i; - - if (i < cPins) - return S_FALSE; - return S_OK; -} - -static HRESULT WINAPI IEnumPinsImpl_Skip(IEnumPins * iface, ULONG cPins) -{ - IEnumPinsImpl *This = (IEnumPinsImpl *)iface; - DWORD synctime = This->synctime; - HRESULT hr; - IPin *pin = NULL; - - hr = This->receive_pin(This->base, This->uIndex + cPins, &pin, &synctime); - if (pin) - IPin_Release(pin); - - if (synctime != This->synctime) - return VFW_E_ENUM_OUT_OF_SYNC; - - if (hr == S_OK) - This->uIndex += cPins; - - return hr; -} - -static HRESULT WINAPI IEnumPinsImpl_Reset(IEnumPins * iface) -{ - IEnumPinsImpl *This = (IEnumPinsImpl *)iface; - - This->receive_pin(This->base, ~0, NULL, &This->synctime); - - This->uIndex = 0; - return S_OK; -} - -static HRESULT WINAPI IEnumPinsImpl_Clone(IEnumPins * iface, IEnumPins ** ppEnum) -{ - HRESULT hr; - IEnumPinsImpl *This = (IEnumPinsImpl *)iface; - - hr = IEnumPinsImpl_Construct(ppEnum, This->receive_pin, This->base); - if (FAILED(hr)) - return hr; - return IEnumPins_Skip(*ppEnum, This->uIndex); -} - -static const IEnumPinsVtbl IEnumPinsImpl_Vtbl = -{ - IEnumPinsImpl_QueryInterface, - IEnumPinsImpl_AddRef, - IEnumPinsImpl_Release, - IEnumPinsImpl_Next, - IEnumPinsImpl_Skip, - IEnumPinsImpl_Reset, - IEnumPinsImpl_Clone -}; - -/* Test filter implementation - a filter that has few predefined pins with single media type - * that accept only this single media type. Enough for Render(). */ - -typedef struct TestFilterPinData -{ -PIN_DIRECTION pinDir; -const GUID *mediasubtype; -} TestFilterPinData; - -typedef struct TestFilterImpl -{ - const IBaseFilterVtbl * lpVtbl; - - LONG refCount; - CRITICAL_SECTION csFilter; - FILTER_STATE state; - FILTER_INFO filterInfo; - CLSID clsid; - IPin ** ppPins; - UINT nPins; -} TestFilterImpl; - -static const IBaseFilterVtbl TestFilter_Vtbl; - -static HRESULT TestFilter_Create(const CLSID* pClsid, const TestFilterPinData *pinData, LPVOID * ppv) -{ - static const WCHAR wcsInputPinName[] = {'i','n','p','u','t',' ','p','i','n',0}; - static const WCHAR wcsOutputPinName[] = {'o','u','t','p','u','t',' ','p','i','n',0}; - HRESULT hr; - PIN_INFO pinInfo; - TestFilterImpl* pTestFilter = NULL; - UINT nPins, i; - AM_MEDIA_TYPE mt; - - pTestFilter = CoTaskMemAlloc(sizeof(TestFilterImpl)); - if (!pTestFilter) return E_OUTOFMEMORY; - - pTestFilter->clsid = *pClsid; - pTestFilter->lpVtbl = &TestFilter_Vtbl; - pTestFilter->refCount = 1; - InitializeCriticalSection(&pTestFilter->csFilter); - pTestFilter->state = State_Stopped; - - ZeroMemory(&pTestFilter->filterInfo, sizeof(FILTER_INFO)); - - nPins = 0; - while(pinData[nPins].mediasubtype) ++nPins; - - pTestFilter->ppPins = CoTaskMemAlloc(nPins * sizeof(IPin *)); - if (!pTestFilter->ppPins) - { - hr = E_OUTOFMEMORY; - goto error; - } - ZeroMemory(pTestFilter->ppPins, nPins * sizeof(IPin *)); - - for (i = 0; i < nPins; i++) - { - ZeroMemory(&mt, sizeof(mt)); - mt.majortype = MEDIATYPE_Video; - mt.formattype = FORMAT_None; - mt.subtype = *pinData[i].mediasubtype; - - pinInfo.dir = pinData[i].pinDir; - pinInfo.pFilter = (IBaseFilter *)pTestFilter; - if (pinInfo.dir == PINDIR_INPUT) - { - lstrcpynW(pinInfo.achName, wcsInputPinName, sizeof(pinInfo.achName) / sizeof(pinInfo.achName[0])); - hr = TestFilter_Pin_Construct(&TestFilter_InputPin_Vtbl, &pinInfo, &mt, &pTestFilter->csFilter, - &pTestFilter->ppPins[i]); - - } - else - { - lstrcpynW(pinInfo.achName, wcsOutputPinName, sizeof(pinInfo.achName) / sizeof(pinInfo.achName[0])); - hr = TestFilter_Pin_Construct(&TestFilter_OutputPin_Vtbl, &pinInfo, &mt, &pTestFilter->csFilter, - &pTestFilter->ppPins[i]); - } - if (FAILED(hr) || !pTestFilter->ppPins[i]) goto error; - } - - pTestFilter->nPins = nPins; - *ppv = pTestFilter; - return S_OK; - - error: - - if (pTestFilter->ppPins) - { - for (i = 0; i < nPins; i++) - { - if (pTestFilter->ppPins[i]) IPin_Release(pTestFilter->ppPins[i]); - } - } - CoTaskMemFree(pTestFilter->ppPins); - DeleteCriticalSection(&pTestFilter->csFilter); - CoTaskMemFree(pTestFilter); - - return hr; -} - -static HRESULT WINAPI TestFilter_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv) -{ - TestFilterImpl *This = (TestFilterImpl *)iface; - - *ppv = NULL; - - if (IsEqualIID(riid, &IID_IUnknown)) - *ppv = This; - else if (IsEqualIID(riid, &IID_IPersist)) - *ppv = This; - else if (IsEqualIID(riid, &IID_IMediaFilter)) - *ppv = This; - else if (IsEqualIID(riid, &IID_IBaseFilter)) - *ppv = This; - - if (*ppv) - { - IUnknown_AddRef((IUnknown *)(*ppv)); - return S_OK; - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI TestFilter_AddRef(IBaseFilter * iface) -{ - TestFilterImpl *This = (TestFilterImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->refCount); - - return refCount; -} - -static ULONG WINAPI TestFilter_Release(IBaseFilter * iface) -{ - TestFilterImpl *This = (TestFilterImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->refCount); - - if (!refCount) - { - ULONG i; - - for (i = 0; i < This->nPins; i++) - { - IPin *pConnectedTo; - - if (SUCCEEDED(IPin_ConnectedTo(This->ppPins[i], &pConnectedTo))) - { - IPin_Disconnect(pConnectedTo); - IPin_Release(pConnectedTo); - } - IPin_Disconnect(This->ppPins[i]); - - IPin_Release(This->ppPins[i]); - } - - CoTaskMemFree(This->ppPins); - This->lpVtbl = NULL; - - DeleteCriticalSection(&This->csFilter); - - CoTaskMemFree(This); - - return 0; - } - else - return refCount; -} -/** IPersist methods **/ - -static HRESULT WINAPI TestFilter_GetClassID(IBaseFilter * iface, CLSID * pClsid) -{ - TestFilterImpl *This = (TestFilterImpl *)iface; - - *pClsid = This->clsid; - - return S_OK; -} - -/** IMediaFilter methods **/ - -static HRESULT WINAPI TestFilter_Stop(IBaseFilter * iface) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI TestFilter_Pause(IBaseFilter * iface) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI TestFilter_Run(IBaseFilter * iface, REFERENCE_TIME tStart) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI TestFilter_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState) -{ - TestFilterImpl *This = (TestFilterImpl *)iface; - - EnterCriticalSection(&This->csFilter); - { - *pState = This->state; - } - LeaveCriticalSection(&This->csFilter); - - return S_OK; -} - -static HRESULT WINAPI TestFilter_SetSyncSource(IBaseFilter * iface, IReferenceClock *pClock) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI TestFilter_GetSyncSource(IBaseFilter * iface, IReferenceClock **ppClock) -{ - return E_NOTIMPL; -} - -/** IBaseFilter implementation **/ - -static HRESULT TestFilter_GetPin(IBaseFilter *iface, ULONG pos, IPin **pin, DWORD *lastsynctick) -{ - TestFilterImpl *This = (TestFilterImpl *)iface; - - /* Our pins are static, not changing so setting static tick count is ok */ - *lastsynctick = 0; - - if (pos >= This->nPins) - return S_FALSE; - - *pin = This->ppPins[pos]; - IPin_AddRef(*pin); - return S_OK; -} - -static HRESULT WINAPI TestFilter_EnumPins(IBaseFilter * iface, IEnumPins **ppEnum) -{ - return IEnumPinsImpl_Construct(ppEnum, TestFilter_GetPin, iface); -} - -static HRESULT WINAPI TestFilter_FindPin(IBaseFilter * iface, LPCWSTR Id, IPin **ppPin) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI TestFilter_QueryFilterInfo(IBaseFilter * iface, FILTER_INFO *pInfo) -{ - TestFilterImpl *This = (TestFilterImpl *)iface; - - lstrcpyW(pInfo->achName, This->filterInfo.achName); - pInfo->pGraph = This->filterInfo.pGraph; - - if (pInfo->pGraph) - IFilterGraph_AddRef(pInfo->pGraph); - - return S_OK; -} - -static HRESULT WINAPI TestFilter_JoinFilterGraph(IBaseFilter * iface, IFilterGraph *pGraph, LPCWSTR pName) -{ - HRESULT hr = S_OK; - TestFilterImpl *This = (TestFilterImpl *)iface; - - EnterCriticalSection(&This->csFilter); - { - if (pName) - lstrcpyW(This->filterInfo.achName, pName); - else - *This->filterInfo.achName = '\0'; - This->filterInfo.pGraph = pGraph; /* NOTE: do NOT increase ref. count */ - } - LeaveCriticalSection(&This->csFilter); - - return hr; -} - -static HRESULT WINAPI TestFilter_QueryVendorInfo(IBaseFilter * iface, LPWSTR *pVendorInfo) -{ - return E_NOTIMPL; -} - -static const IBaseFilterVtbl TestFilter_Vtbl = -{ - TestFilter_QueryInterface, - TestFilter_AddRef, - TestFilter_Release, - TestFilter_GetClassID, - TestFilter_Stop, - TestFilter_Pause, - TestFilter_Run, - TestFilter_GetState, - TestFilter_SetSyncSource, - TestFilter_GetSyncSource, - TestFilter_EnumPins, - TestFilter_FindPin, - TestFilter_QueryFilterInfo, - TestFilter_JoinFilterGraph, - TestFilter_QueryVendorInfo -}; - -/* IClassFactory implementation */ - -typedef struct TestClassFactoryImpl -{ - IClassFactoryVtbl *lpVtbl; - const TestFilterPinData *filterPinData; - const CLSID *clsid; -} TestClassFactoryImpl; - -static HRESULT WINAPI Test_IClassFactory_QueryInterface( - LPCLASSFACTORY iface, - REFIID riid, - LPVOID *ppvObj) -{ - if (ppvObj == NULL) return E_POINTER; - - if (IsEqualGUID(riid, &IID_IUnknown) || - IsEqualGUID(riid, &IID_IClassFactory)) - { - *ppvObj = iface; - IClassFactory_AddRef(iface); - return S_OK; - } - - *ppvObj = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI Test_IClassFactory_AddRef(LPCLASSFACTORY iface) -{ - return 2; /* non-heap-based object */ -} - -static ULONG WINAPI Test_IClassFactory_Release(LPCLASSFACTORY iface) -{ - return 1; /* non-heap-based object */ -} - -static HRESULT WINAPI Test_IClassFactory_CreateInstance( - LPCLASSFACTORY iface, - LPUNKNOWN pUnkOuter, - REFIID riid, - LPVOID *ppvObj) -{ - TestClassFactoryImpl *This = (TestClassFactoryImpl *)iface; - HRESULT hr; - IUnknown *punk = NULL; - - *ppvObj = NULL; - - if (pUnkOuter) return CLASS_E_NOAGGREGATION; - - hr = TestFilter_Create(This->clsid, This->filterPinData, (LPVOID *) &punk); - if (SUCCEEDED(hr)) { - hr = IUnknown_QueryInterface(punk, riid, ppvObj); - IUnknown_Release(punk); - } - return hr; -} - -static HRESULT WINAPI Test_IClassFactory_LockServer( - LPCLASSFACTORY iface, - BOOL fLock) -{ - return S_OK; -} - -static IClassFactoryVtbl TestClassFactory_Vtbl = -{ - Test_IClassFactory_QueryInterface, - Test_IClassFactory_AddRef, - Test_IClassFactory_Release, - Test_IClassFactory_CreateInstance, - Test_IClassFactory_LockServer -}; - -static HRESULT get_connected_filter_name(TestFilterImpl *pFilter, char *FilterName) -{ - IPin *pin = NULL; - PIN_INFO pinInfo; - FILTER_INFO filterInfo; - HRESULT hr; - - FilterName[0] = 0; - - hr = IPin_ConnectedTo(pFilter->ppPins[0], &pin); - ok(hr == S_OK, "IPin_ConnectedTo failed with %x\n", hr); - if (FAILED(hr)) return hr; - - hr = IPin_QueryPinInfo(pin, &pinInfo); - ok(hr == S_OK, "IPin_QueryPinInfo failed with %x\n", hr); - IPin_Release(pin); - if (FAILED(hr)) return hr; - - SetLastError(0xdeadbeef); - hr = IBaseFilter_QueryFilterInfo(pinInfo.pFilter, &filterInfo); - if (hr == S_OK && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - IBaseFilter_Release(pinInfo.pFilter); - return E_NOTIMPL; - } - ok(hr == S_OK, "IBaseFilter_QueryFilterInfo failed with %x\n", hr); - IBaseFilter_Release(pinInfo.pFilter); - if (FAILED(hr)) return hr; - - IFilterGraph_Release(filterInfo.pGraph); - - WideCharToMultiByte(CP_ACP, 0, filterInfo.achName, -1, FilterName, MAX_FILTER_NAME, NULL, NULL); - - return S_OK; -} - -static void test_render_filter_priority(void) -{ - /* Tests filter choice priorities in Render(). */ - DWORD cookie1 = 0, cookie2 = 0, cookie3 = 0; - HRESULT hr; - IFilterGraph2* pgraph2 = NULL; - IFilterMapper2 *pMapper2 = NULL; - IBaseFilter* ptestfilter = NULL; - IBaseFilter* ptestfilter2 = NULL; - static const CLSID CLSID_TestFilter2 = { - 0x37a4edb0, - 0x4d13, - 0x11dd, - {0xe8, 0x9b, 0x00, 0x19, 0x66, 0x2f, 0xf0, 0xce} - }; - static const CLSID CLSID_TestFilter3 = { - 0x37a4f2d8, - 0x4d13, - 0x11dd, - {0xe8, 0x9b, 0x00, 0x19, 0x66, 0x2f, 0xf0, 0xce} - }; - static const CLSID CLSID_TestFilter4 = { - 0x37a4f3b4, - 0x4d13, - 0x11dd, - {0xe8, 0x9b, 0x00, 0x19, 0x66, 0x2f, 0xf0, 0xce} - }; - static const GUID mediasubtype1 = { - 0x37a4f51c, - 0x4d13, - 0x11dd, - {0xe8, 0x9b, 0x00, 0x19, 0x66, 0x2f, 0xf0, 0xce} - }; - static const GUID mediasubtype2 = { - 0x37a4f5c6, - 0x4d13, - 0x11dd, - {0xe8, 0x9b, 0x00, 0x19, 0x66, 0x2f, 0xf0, 0xce} - }; - static const TestFilterPinData PinData1[] = { - { PINDIR_OUTPUT, &mediasubtype1 }, - { 0, 0 } - }; - static const TestFilterPinData PinData2[] = { - { PINDIR_INPUT, &mediasubtype1 }, - { 0, 0 } - }; - static const TestFilterPinData PinData3[] = { - { PINDIR_INPUT, &GUID_NULL }, - { 0, 0 } - }; - static const TestFilterPinData PinData4[] = { - { PINDIR_INPUT, &mediasubtype1 }, - { PINDIR_OUTPUT, &mediasubtype2 }, - { 0, 0 } - }; - static const TestFilterPinData PinData5[] = { - { PINDIR_INPUT, &mediasubtype2 }, - { 0, 0 } - }; - TestClassFactoryImpl Filter1ClassFactory = { &TestClassFactory_Vtbl, PinData2, &CLSID_TestFilter2 }; - TestClassFactoryImpl Filter2ClassFactory = { &TestClassFactory_Vtbl, PinData4, &CLSID_TestFilter3 }; - TestClassFactoryImpl Filter3ClassFactory = { &TestClassFactory_Vtbl, PinData5, &CLSID_TestFilter4 }; - char ConnectedFilterName1[MAX_FILTER_NAME]; - char ConnectedFilterName2[MAX_FILTER_NAME]; - REGFILTER2 rgf2; - REGFILTERPINS2 rgPins2[2]; - REGPINTYPES rgPinType[2]; - static const WCHAR wszFilterInstanceName1[] = {'T', 'e', 's', 't', 'f', 'i', 'l', 't', 'e', 'r', 'I', - 'n', 's', 't', 'a', 'n', 'c', 'e', '1', 0 }; - static const WCHAR wszFilterInstanceName2[] = {'T', 'e', 's', 't', 'f', 'i', 'l', 't', 'e', 'r', 'I', - 'n', 's', 't', 'a', 'n', 'c', 'e', '2', 0 }; - static const WCHAR wszFilterInstanceName3[] = {'T', 'e', 's', 't', 'f', 'i', 'l', 't', 'e', 'r', 'I', - 'n', 's', 't', 'a', 'n', 'c', 'e', '3', 0 }; - static const WCHAR wszFilterInstanceName4[] = {'T', 'e', 's', 't', 'f', 'i', 'l', 't', 'e', 'r', 'I', - 'n', 's', 't', 'a', 'n', 'c', 'e', '4', 0 }; - - /* Test which renderer of two already added to the graph will be chosen (one is "exact" match, other is - "wildcard" match. Seems to very by order in which filters are added to the graph, thus indicating - no preference given to exact match. */ - hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterGraph2, (LPVOID*)&pgraph2); - ok(hr == S_OK, "CoCreateInstance failed with %08x\n", hr); - if (!pgraph2) return; - - hr = TestFilter_Create(&GUID_NULL, PinData1, (LPVOID)&ptestfilter); - ok(hr == S_OK, "TestFilter_Create failed with %08x\n", hr); - if (FAILED(hr)) goto out; - - hr = IFilterGraph2_AddFilter(pgraph2, ptestfilter, wszFilterInstanceName1); - ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); - - hr = TestFilter_Create(&GUID_NULL, PinData2, (LPVOID)&ptestfilter2); - ok(hr == S_OK, "TestFilter_Create failed with %08x\n", hr); - if (FAILED(hr)) goto out; - - hr = IFilterGraph2_AddFilter(pgraph2, ptestfilter2, wszFilterInstanceName2); - ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); - - IBaseFilter_Release(ptestfilter2); - ptestfilter2 = NULL; - - hr = TestFilter_Create(&GUID_NULL, PinData3, (LPVOID)&ptestfilter2); - ok(hr == S_OK, "TestFilter_Create failed with %08x\n", hr); - if (FAILED(hr)) goto out; - - hr = IFilterGraph2_AddFilter(pgraph2, ptestfilter2, wszFilterInstanceName3); - ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); - - hr = IFilterGraph2_Render(pgraph2, ((TestFilterImpl*)ptestfilter)->ppPins[0]); - ok(hr == S_OK, "IFilterGraph2_Render failed with %08x\n", hr); - - hr = get_connected_filter_name((TestFilterImpl*)ptestfilter, ConnectedFilterName1); - - IFilterGraph2_Release(pgraph2); - pgraph2 = NULL; - IBaseFilter_Release(ptestfilter); - ptestfilter = NULL; - IBaseFilter_Release(ptestfilter2); - ptestfilter2 = NULL; - - if (hr == E_NOTIMPL) - { - win_skip("Needed functions are not implemented\n"); - return; - } - - hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterGraph2, (LPVOID*)&pgraph2); - ok(hr == S_OK, "CoCreateInstance failed with %08x\n", hr); - if (!pgraph2) goto out; - - hr = TestFilter_Create(&GUID_NULL, PinData1, (LPVOID)&ptestfilter); - ok(hr == S_OK, "TestFilter_Create failed with %08x\n", hr); - if (FAILED(hr)) goto out; - - hr = IFilterGraph2_AddFilter(pgraph2, ptestfilter, wszFilterInstanceName1); - ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); - - hr = TestFilter_Create(&GUID_NULL, PinData3, (LPVOID)&ptestfilter2); - ok(hr == S_OK, "TestFilter_Create failed with %08x\n", hr); - if (FAILED(hr)) goto out; - - hr = IFilterGraph2_AddFilter(pgraph2, ptestfilter2, wszFilterInstanceName3); - ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); - - IBaseFilter_Release(ptestfilter2); - ptestfilter2 = NULL; - - hr = TestFilter_Create(&GUID_NULL, PinData2, (LPVOID)&ptestfilter2); - ok(hr == S_OK, "TestFilter_Create failed with %08x\n", hr); - if (FAILED(hr)) goto out; - - hr = IFilterGraph2_AddFilter(pgraph2, ptestfilter2, wszFilterInstanceName2); - ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); - - hr = IFilterGraph2_Render(pgraph2, ((TestFilterImpl*)ptestfilter)->ppPins[0]); - ok(hr == S_OK, "IFilterGraph2_Render failed with %08x\n", hr); - - hr = IFilterGraph2_Disconnect(pgraph2, NULL); - ok(hr == E_POINTER, "IFilterGraph2_Disconnect failed. Expected E_POINTER, received %08x\n", hr); - - get_connected_filter_name((TestFilterImpl*)ptestfilter, ConnectedFilterName2); - ok(lstrcmp(ConnectedFilterName1, ConnectedFilterName2), - "expected connected filters to be different but got %s both times\n", ConnectedFilterName1); - - IFilterGraph2_Release(pgraph2); - pgraph2 = NULL; - IBaseFilter_Release(ptestfilter); - ptestfilter = NULL; - IBaseFilter_Release(ptestfilter2); - ptestfilter2 = NULL; - - /* Test if any preference is given to existing renderer which renders the pin directly vs - an existing renderer which renders the pin indirectly, through an additional middle filter, - again trying different orders of creation. Native appears not to give a preference. */ - - hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterGraph2, (LPVOID*)&pgraph2); - ok(hr == S_OK, "CoCreateInstance failed with %08x\n", hr); - if (!pgraph2) goto out; - - hr = TestFilter_Create(&GUID_NULL, PinData1, (LPVOID)&ptestfilter); - ok(hr == S_OK, "TestFilter_Create failed with %08x\n", hr); - if (FAILED(hr)) goto out; - - hr = IFilterGraph2_AddFilter(pgraph2, ptestfilter, wszFilterInstanceName1); - ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); - - hr = TestFilter_Create(&GUID_NULL, PinData2, (LPVOID)&ptestfilter2); - ok(hr == S_OK, "TestFilter_Create failed with %08x\n", hr); - if (FAILED(hr)) goto out; - - hr = IFilterGraph2_AddFilter(pgraph2, ptestfilter2, wszFilterInstanceName2); - ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); - - IBaseFilter_Release(ptestfilter2); - ptestfilter2 = NULL; - - hr = TestFilter_Create(&GUID_NULL, PinData4, (LPVOID)&ptestfilter2); - ok(hr == S_OK, "TestFilter_Create failed with %08x\n", hr); - if (FAILED(hr)) goto out; - - hr = IFilterGraph2_AddFilter(pgraph2, ptestfilter2, wszFilterInstanceName3); - ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); - - IBaseFilter_Release(ptestfilter2); - ptestfilter2 = NULL; - - hr = TestFilter_Create(&GUID_NULL, PinData5, (LPVOID)&ptestfilter2); - ok(hr == S_OK, "TestFilter_Create failed with %08x\n", hr); - if (FAILED(hr)) goto out; - - hr = IFilterGraph2_AddFilter(pgraph2, ptestfilter2, wszFilterInstanceName4); - ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); - - hr = IFilterGraph2_Render(pgraph2, ((TestFilterImpl*)ptestfilter)->ppPins[0]); - ok(hr == S_OK, "IFilterGraph2_Render failed with %08x\n", hr); - - get_connected_filter_name((TestFilterImpl*)ptestfilter, ConnectedFilterName1); - ok(!lstrcmp(ConnectedFilterName1, "TestfilterInstance3") || !lstrcmp(ConnectedFilterName1, "TestfilterInstance2"), - "unexpected connected filter: %s\n", ConnectedFilterName1); - - IFilterGraph2_Release(pgraph2); - pgraph2 = NULL; - IBaseFilter_Release(ptestfilter); - ptestfilter = NULL; - IBaseFilter_Release(ptestfilter2); - ptestfilter2 = NULL; - - hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterGraph2, (LPVOID*)&pgraph2); - ok(hr == S_OK, "CoCreateInstance failed with %08x\n", hr); - if (!pgraph2) goto out; - - hr = TestFilter_Create(&GUID_NULL, PinData1, (LPVOID)&ptestfilter); - ok(hr == S_OK, "TestFilter_Create failed with %08x\n", hr); - if (FAILED(hr)) goto out; - - hr = IFilterGraph2_AddFilter(pgraph2, ptestfilter, wszFilterInstanceName1); - ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); - - hr = TestFilter_Create(&GUID_NULL, PinData4, (LPVOID)&ptestfilter2); - ok(hr == S_OK, "TestFilter_Create failed with %08x\n", hr); - if (FAILED(hr)) goto out; - - hr = IFilterGraph2_AddFilter(pgraph2, ptestfilter2, wszFilterInstanceName3); - ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); - - IBaseFilter_Release(ptestfilter2); - ptestfilter2 = NULL; - - hr = TestFilter_Create(&GUID_NULL, PinData5, (LPVOID)&ptestfilter2); - ok(hr == S_OK, "TestFilter_Create failed with %08x\n", hr); - if (FAILED(hr)) goto out; - - hr = IFilterGraph2_AddFilter(pgraph2, ptestfilter2, wszFilterInstanceName4); - ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); - - IBaseFilter_Release(ptestfilter2); - ptestfilter2 = NULL; - - hr = TestFilter_Create(&GUID_NULL, PinData2, (LPVOID)&ptestfilter2); - ok(hr == S_OK, "TestFilter_Create failed with %08x\n", hr); - if (FAILED(hr)) goto out; - - hr = IFilterGraph2_AddFilter(pgraph2, ptestfilter2, wszFilterInstanceName2); - ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); - - hr = IFilterGraph2_Render(pgraph2, ((TestFilterImpl*)ptestfilter)->ppPins[0]); - ok(hr == S_OK, "IFilterGraph2_Render failed with %08x\n", hr); - - get_connected_filter_name((TestFilterImpl*)ptestfilter, ConnectedFilterName2); - ok(!lstrcmp(ConnectedFilterName2, "TestfilterInstance3") || !lstrcmp(ConnectedFilterName2, "TestfilterInstance2"), - "unexpected connected filter: %s\n", ConnectedFilterName2); - ok(lstrcmp(ConnectedFilterName1, ConnectedFilterName2), - "expected connected filters to be different but got %s both times\n", ConnectedFilterName1); - - IFilterGraph2_Release(pgraph2); - pgraph2 = NULL; - IBaseFilter_Release(ptestfilter); - ptestfilter = NULL; - IBaseFilter_Release(ptestfilter2); - ptestfilter2 = NULL; - - /* Test if renderers are tried before non-renderers (intermediary filters). */ - hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterGraph2, (LPVOID*)&pgraph2); - ok(hr == S_OK, "CoCreateInstance failed with %08x\n", hr); - if (!pgraph2) goto out; - - hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterMapper2, (LPVOID*)&pMapper2); - ok(hr == S_OK, "CoCreateInstance failed with %08x\n", hr); - if (!pMapper2) goto out; - - hr = TestFilter_Create(&GUID_NULL, PinData1, (LPVOID)&ptestfilter); - ok(hr == S_OK, "TestFilter_Create failed with %08x\n", hr); - if (FAILED(hr)) goto out; - - hr = IFilterGraph2_AddFilter(pgraph2, ptestfilter, wszFilterInstanceName1); - ok(hr == S_OK, "IFilterGraph2_AddFilter failed with %08x\n", hr); - - /* Register our filters with COM and with Filtermapper. */ - hr = CoRegisterClassObject(Filter1ClassFactory.clsid, (IUnknown *)&Filter1ClassFactory, - CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &cookie1); - ok(hr == S_OK, "CoRegisterClassObject failed with %08x\n", hr); - if (FAILED(hr)) goto out; - hr = CoRegisterClassObject(Filter2ClassFactory.clsid, (IUnknown *)&Filter2ClassFactory, - CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &cookie2); - ok(hr == S_OK, "CoRegisterClassObject failed with %08x\n", hr); - if (FAILED(hr)) goto out; - hr = CoRegisterClassObject(Filter3ClassFactory.clsid, (IUnknown *)&Filter3ClassFactory, - CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &cookie3); - ok(hr == S_OK, "CoRegisterClassObject failed with %08x\n", hr); - if (FAILED(hr)) goto out; - - rgf2.dwVersion = 2; - rgf2.dwMerit = MERIT_UNLIKELY; - S1(U(rgf2)).cPins2 = 1; - S1(U(rgf2)).rgPins2 = rgPins2; - rgPins2[0].dwFlags = REG_PINFLAG_B_RENDERER; - rgPins2[0].cInstances = 1; - rgPins2[0].nMediaTypes = 1; - rgPins2[0].lpMediaType = &rgPinType[0]; - rgPins2[0].nMediums = 0; - rgPins2[0].lpMedium = NULL; - rgPins2[0].clsPinCategory = NULL; - rgPinType[0].clsMajorType = &MEDIATYPE_Video; - rgPinType[0].clsMinorType = &mediasubtype1; - - hr = IFilterMapper2_RegisterFilter(pMapper2, &CLSID_TestFilter2, wszFilterInstanceName2, NULL, - &CLSID_LegacyAmFilterCategory, NULL, &rgf2); - ok(hr == S_OK, "IFilterMapper2_RegisterFilter failed with %x\n", hr); - - rgf2.dwMerit = MERIT_PREFERRED; - rgPinType[0].clsMinorType = &mediasubtype2; - - hr = IFilterMapper2_RegisterFilter(pMapper2, &CLSID_TestFilter4, wszFilterInstanceName4, NULL, - &CLSID_LegacyAmFilterCategory, NULL, &rgf2); - ok(hr == S_OK, "IFilterMapper2_RegisterFilter failed with %x\n", hr); - - S1(U(rgf2)).cPins2 = 2; - rgPins2[0].dwFlags = 0; - rgPinType[0].clsMinorType = &mediasubtype1; - - rgPins2[1].dwFlags = REG_PINFLAG_B_OUTPUT; - rgPins2[1].cInstances = 1; - rgPins2[1].nMediaTypes = 1; - rgPins2[1].lpMediaType = &rgPinType[1]; - rgPins2[1].nMediums = 0; - rgPins2[1].lpMedium = NULL; - rgPins2[1].clsPinCategory = NULL; - rgPinType[1].clsMajorType = &MEDIATYPE_Video; - rgPinType[1].clsMinorType = &mediasubtype2; - - hr = IFilterMapper2_RegisterFilter(pMapper2, &CLSID_TestFilter3, wszFilterInstanceName3, NULL, - &CLSID_LegacyAmFilterCategory, NULL, &rgf2); - ok(hr == S_OK, "IFilterMapper2_RegisterFilter failed with %x\n", hr); - - hr = IFilterGraph2_Render(pgraph2, ((TestFilterImpl*)ptestfilter)->ppPins[0]); - ok(hr == S_OK, "IFilterGraph2_Render failed with %08x\n", hr); - - get_connected_filter_name((TestFilterImpl*)ptestfilter, ConnectedFilterName1); - ok(!lstrcmp(ConnectedFilterName1, "TestfilterInstance3"), - "unexpected connected filter: %s\n", ConnectedFilterName1); - - hr = IFilterMapper2_UnregisterFilter(pMapper2, &CLSID_LegacyAmFilterCategory, NULL, - &CLSID_TestFilter2); - ok(SUCCEEDED(hr), "IFilterMapper2_UnregisterFilter failed with %x\n", hr); - hr = IFilterMapper2_UnregisterFilter(pMapper2, &CLSID_LegacyAmFilterCategory, NULL, - &CLSID_TestFilter3); - ok(SUCCEEDED(hr), "IFilterMapper2_UnregisterFilter failed with %x\n", hr); - hr = IFilterMapper2_UnregisterFilter(pMapper2, &CLSID_LegacyAmFilterCategory, NULL, - &CLSID_TestFilter4); - ok(SUCCEEDED(hr), "IFilterMapper2_UnregisterFilter failed with %x\n", hr); - - out: - - if (ptestfilter) IBaseFilter_Release(ptestfilter); - if (ptestfilter2) IBaseFilter_Release(ptestfilter2); - if (pgraph2) IFilterGraph2_Release(pgraph2); - if (pMapper2) IFilterMapper2_Release(pMapper2); - - hr = CoRevokeClassObject(cookie1); - ok(hr == S_OK, "CoRevokeClassObject failed with %08x\n", hr); - hr = CoRevokeClassObject(cookie2); - ok(hr == S_OK, "CoRevokeClassObject failed with %08x\n", hr); - hr = CoRevokeClassObject(cookie3); - ok(hr == S_OK, "CoRevokeClassObject failed with %08x\n", hr); -} - -START_TEST(filtergraph) -{ - CoInitializeEx(NULL, COINIT_MULTITHREADED); - test_render_run(avifileA); - test_render_run(mpegfileA); - test_graph_builder(); - test_graph_builder_addfilter(); - test_mediacontrol(); - test_filter_graph2(); - test_render_filter_priority(); - CoUninitialize(); -} diff --git a/rostests/winetests/quartz/filtermapper.c b/rostests/winetests/quartz/filtermapper.c deleted file mode 100644 index 4a8a3bb579b..00000000000 --- a/rostests/winetests/quartz/filtermapper.c +++ /dev/null @@ -1,466 +0,0 @@ -/* - * Filtermapper unit tests for Quartz - * - * Copyright (C) 2008 Alexander Dorofeyev - * - * 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 - -#include "wine/test.h" -#include "winbase.h" -#include "initguid.h" -#include "dshow.h" - -DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); - -/* Helper function, checks if filter with given name was enumerated. */ -static BOOL enum_find_filter(const WCHAR *wszFilterName, IEnumMoniker *pEnum) -{ - IMoniker *pMoniker = NULL; - BOOL found = FALSE; - ULONG nb; - HRESULT hr; - static const WCHAR wszFriendlyName[] = {'F','r','i','e','n','d','l','y','N','a','m','e',0}; - - while(!found && IEnumMoniker_Next(pEnum, 1, &pMoniker, &nb) == S_OK) - { - IPropertyBag * pPropBagCat = NULL; - VARIANT var; - - VariantInit(&var); - - hr = IMoniker_BindToStorage(pMoniker, NULL, NULL, &IID_IPropertyBag, (LPVOID*)&pPropBagCat); - ok(SUCCEEDED(hr), "IMoniker_BindToStorage failed with %x\n", hr); - if (FAILED(hr) || !pPropBagCat) - { - VariantClear(&var); - IMoniker_Release(pMoniker); - continue; - } - - hr = IPropertyBag_Read(pPropBagCat, wszFriendlyName, &var, NULL); - ok(SUCCEEDED(hr), "IPropertyBag_Read failed with %x\n", hr); - - if (SUCCEEDED(hr)) - { - CHAR val1[512], val2[512]; - - WideCharToMultiByte(CP_ACP, 0, V_UNION(&var, bstrVal), -1, val1, sizeof(val1), 0, 0); - WideCharToMultiByte(CP_ACP, 0, wszFilterName, -1, val2, sizeof(val2), 0, 0); - if (!lstrcmpA(val1, val2)) found = TRUE; - } - - IPropertyBag_Release(pPropBagCat); - IMoniker_Release(pMoniker); - VariantClear(&var); - } - - return found; -} - -static void test_fm2_enummatchingfilters(void) -{ - IFilterMapper2 *pMapper = NULL; - HRESULT hr; - REGFILTER2 rgf2; - REGFILTERPINS2 rgPins2[2]; - REGPINTYPES rgPinType; - static const WCHAR wszFilterName1[] = {'T', 'e', 's', 't', 'f', 'i', 'l', 't', 'e', 'r', '1', 0 }; - static const WCHAR wszFilterName2[] = {'T', 'e', 's', 't', 'f', 'i', 'l', 't', 'e', 'r', '2', 0 }; - CLSID clsidFilter1; - CLSID clsidFilter2; - IEnumMoniker *pEnum = NULL; - BOOL found; - - ZeroMemory(&rgf2, sizeof(rgf2)); - - hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER, - &IID_IFilterMapper2, (LPVOID*)&pMapper); - ok(hr == S_OK, "CoCreateInstance failed with %x\n", hr); - if (FAILED(hr)) goto out; - - hr = CoCreateGuid(&clsidFilter1); - ok(hr == S_OK, "CoCreateGuid failed with %x\n", hr); - hr = CoCreateGuid(&clsidFilter2); - ok(hr == S_OK, "CoCreateGuid failed with %x\n", hr); - - /* Test that a test renderer filter is returned when enumerating filters with bRender=FALSE */ - rgf2.dwVersion = 2; - rgf2.dwMerit = MERIT_UNLIKELY; - S1(U(rgf2)).cPins2 = 1; - S1(U(rgf2)).rgPins2 = rgPins2; - - rgPins2[0].dwFlags = REG_PINFLAG_B_RENDERER; - rgPins2[0].cInstances = 1; - rgPins2[0].nMediaTypes = 1; - rgPins2[0].lpMediaType = &rgPinType; - rgPins2[0].nMediums = 0; - rgPins2[0].lpMedium = NULL; - rgPins2[0].clsPinCategory = NULL; - - rgPinType.clsMajorType = &GUID_NULL; - rgPinType.clsMinorType = &GUID_NULL; - - hr = IFilterMapper2_RegisterFilter(pMapper, &clsidFilter1, wszFilterName1, NULL, - &CLSID_LegacyAmFilterCategory, NULL, &rgf2); - ok(hr == S_OK, "IFilterMapper2_RegisterFilter failed with %x\n", hr); - - rgPins2[0].dwFlags = 0; - - rgPins2[1].dwFlags = REG_PINFLAG_B_OUTPUT; - rgPins2[1].cInstances = 1; - rgPins2[1].nMediaTypes = 1; - rgPins2[1].lpMediaType = &rgPinType; - rgPins2[1].nMediums = 0; - rgPins2[1].lpMedium = NULL; - rgPins2[1].clsPinCategory = NULL; - - S1(U(rgf2)).cPins2 = 2; - - hr = IFilterMapper2_RegisterFilter(pMapper, &clsidFilter2, wszFilterName2, NULL, - &CLSID_LegacyAmFilterCategory, NULL, &rgf2); - ok(hr == S_OK, "IFilterMapper2_RegisterFilter failed with %x\n", hr); - - hr = IFilterMapper2_EnumMatchingFilters(pMapper, &pEnum, 0, TRUE, MERIT_UNLIKELY, TRUE, - 0, NULL, NULL, &GUID_NULL, FALSE, FALSE, 0, NULL, NULL, &GUID_NULL); - ok(hr == S_OK, "IFilterMapper2_EnumMatchingFilters failed with %x\n", hr); - if (SUCCEEDED(hr) && pEnum) - { - found = enum_find_filter(wszFilterName1, pEnum); - ok(found, "EnumMatchingFilters failed to return the test filter 1\n"); - } - - if (pEnum) IEnumMoniker_Release(pEnum); - pEnum = NULL; - - hr = IFilterMapper2_EnumMatchingFilters(pMapper, &pEnum, 0, TRUE, MERIT_UNLIKELY, TRUE, - 0, NULL, NULL, &GUID_NULL, FALSE, FALSE, 0, NULL, NULL, &GUID_NULL); - ok(hr == S_OK, "IFilterMapper2_EnumMatchingFilters failed with %x\n", hr); - if (SUCCEEDED(hr) && pEnum) - { - found = enum_find_filter(wszFilterName2, pEnum); - ok(found, "EnumMatchingFilters failed to return the test filter 2\n"); - } - - if (pEnum) IEnumMoniker_Release(pEnum); - pEnum = NULL; - - /* Non renderer must not be returned with bRender=TRUE */ - - hr = IFilterMapper2_EnumMatchingFilters(pMapper, &pEnum, 0, TRUE, MERIT_UNLIKELY, TRUE, - 0, NULL, NULL, &GUID_NULL, TRUE, FALSE, 0, NULL, NULL, &GUID_NULL); - ok(hr == S_OK, "IFilterMapper2_EnumMatchingFilters failed with %x\n", hr); - - if (SUCCEEDED(hr) && pEnum) - { - found = enum_find_filter(wszFilterName1, pEnum); - ok(found, "EnumMatchingFilters failed to return the test filter 1\n"); - } - - if (pEnum) IEnumMoniker_Release(pEnum); - pEnum = NULL; - - hr = IFilterMapper2_EnumMatchingFilters(pMapper, &pEnum, 0, TRUE, MERIT_UNLIKELY, TRUE, - 0, NULL, NULL, &GUID_NULL, TRUE, FALSE, 0, NULL, NULL, &GUID_NULL); - ok(hr == S_OK, "IFilterMapper2_EnumMatchingFilters failed with %x\n", hr); - - if (SUCCEEDED(hr) && pEnum) - { - found = enum_find_filter(wszFilterName2, pEnum); - ok(!found, "EnumMatchingFilters should not return the test filter 2\n"); - } - - hr = IFilterMapper2_UnregisterFilter(pMapper, &CLSID_LegacyAmFilterCategory, NULL, - &clsidFilter1); - ok(SUCCEEDED(hr), "IFilterMapper2_UnregisterFilter failed with %x\n", hr); - - hr = IFilterMapper2_UnregisterFilter(pMapper, &CLSID_LegacyAmFilterCategory, NULL, - &clsidFilter2); - ok(SUCCEEDED(hr), "IFilterMapper2_UnregisterFilter failed with %x\n", hr); - - out: - - if (pEnum) IEnumMoniker_Release(pEnum); - if (pMapper) IFilterMapper2_Release(pMapper); -} - -static void test_legacy_filter_registration(void) -{ - IFilterMapper2 *pMapper2 = NULL; - IFilterMapper *pMapper = NULL; - HRESULT hr; - static const WCHAR wszFilterName[] = {'T', 'e', 's', 't', 'f', 'i', 'l', 't', 'e', 'r', 0 }; - static const CHAR szFilterName[] = "Testfilter"; - static const WCHAR wszPinName[] = {'P', 'i', 'n', '1', 0 }; - CLSID clsidFilter; - CHAR szRegKey[MAX_PATH]; - static const CHAR szClsid[] = "CLSID"; - WCHAR wszGuidstring[MAX_PATH]; - CHAR szGuidstring[MAX_PATH]; - LONG lRet; - HKEY hKey = NULL; - IEnumMoniker *pEnum = NULL; - BOOL found; - IEnumRegFilters *pRegEnum = NULL; - - /* Test if legacy filter registration scheme works (filter is added to HKCR\Filter). IFilterMapper_RegisterFilter - * registers in this way. Filters so registered must then be accessible through both IFilterMapper_EnumMatchingFilters - * and IFilterMapper2_EnumMatchingFilters. */ - hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER, - &IID_IFilterMapper2, (LPVOID*)&pMapper2); - ok(hr == S_OK, "CoCreateInstance failed with %x\n", hr); - if (FAILED(hr)) goto out; - - hr = IFilterMapper2_QueryInterface(pMapper2, &IID_IFilterMapper, (LPVOID)&pMapper); - ok(hr == S_OK, "IFilterMapper2_QueryInterface failed with %x\n", hr); - if (FAILED(hr)) goto out; - - /* Register a test filter. */ - hr = CoCreateGuid(&clsidFilter); - ok(hr == S_OK, "CoCreateGuid failed with %x\n", hr); - - lRet = StringFromGUID2(&clsidFilter, wszGuidstring, MAX_PATH); - ok(lRet > 0, "StringFromGUID2 failed\n"); - if (!lRet) goto out; - WideCharToMultiByte(CP_ACP, 0, wszGuidstring, -1, szGuidstring, MAX_PATH, 0, 0); - - lstrcpyA(szRegKey, szClsid); - lstrcatA(szRegKey, "\\"); - lstrcatA(szRegKey, szGuidstring); - - /* Register---- functions need a filter class key to write pin and pin media type data to. Create a bogus - * class key for it. */ - lRet = RegCreateKeyExA(HKEY_CLASSES_ROOT, szRegKey, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL); - ok(lRet == ERROR_SUCCESS, "RegCreateKeyExA failed with %x\n", HRESULT_FROM_WIN32(lRet)); - - /* Set default value - this is interpreted as "friendly name" later. */ - lRet = RegSetValueExA(hKey, NULL, 0, REG_SZ, (LPBYTE)szFilterName, lstrlenA(szFilterName) + 1); - ok(lRet == ERROR_SUCCESS, "RegSetValueExA failed with %x\n", HRESULT_FROM_WIN32(lRet)); - - if (hKey) RegCloseKey(hKey); - hKey = NULL; - - hr = IFilterMapper_RegisterFilter(pMapper, clsidFilter, wszFilterName, MERIT_UNLIKELY); - ok(hr == S_OK, "IFilterMapper_RegisterFilter failed with %x\n", hr); - - hr = IFilterMapper_RegisterPin(pMapper, clsidFilter, wszPinName, TRUE, FALSE, FALSE, FALSE, GUID_NULL, NULL); - ok(hr == S_OK, "IFilterMapper_RegisterPin failed with %x\n", hr); - - hr = IFilterMapper_RegisterPinType(pMapper, clsidFilter, wszPinName, GUID_NULL, GUID_NULL); - ok(hr == S_OK, "IFilterMapper_RegisterPinType failed with %x\n", hr); - - hr = IFilterMapper2_EnumMatchingFilters(pMapper2, &pEnum, 0, TRUE, MERIT_UNLIKELY, TRUE, - 0, NULL, NULL, &GUID_NULL, FALSE, FALSE, 0, NULL, NULL, &GUID_NULL); - ok(hr == S_OK, "IFilterMapper2_EnumMatchingFilters failed with %x\n", hr); - if (SUCCEEDED(hr) && pEnum) - { - found = enum_find_filter(wszFilterName, pEnum); - ok(found, "IFilterMapper2_EnumMatchingFilters failed to return the test filter\n"); - } - - if (pEnum) IEnumMoniker_Release(pEnum); - pEnum = NULL; - - found = FALSE; - hr = IFilterMapper_EnumMatchingFilters(pMapper, &pRegEnum, MERIT_UNLIKELY, TRUE, GUID_NULL, GUID_NULL, - FALSE, FALSE, GUID_NULL, GUID_NULL); - ok(hr == S_OK, "IFilterMapper_EnumMatchingFilters failed with %x\n", hr); - if (SUCCEEDED(hr) && pRegEnum) - { - ULONG cFetched; - REGFILTER *prgf; - - while(!found && IEnumRegFilters_Next(pRegEnum, 1, &prgf, &cFetched) == S_OK) - { - CHAR val[512]; - - WideCharToMultiByte(CP_ACP, 0, prgf->Name, -1, val, sizeof(val), 0, 0); - if (!lstrcmpA(val, szFilterName)) found = TRUE; - - CoTaskMemFree(prgf); - } - - IEnumRegFilters_Release(pRegEnum); - } - ok(found, "IFilterMapper_EnumMatchingFilters failed to return the test filter\n"); - - hr = IFilterMapper_UnregisterFilter(pMapper, clsidFilter); - ok(hr == S_OK, "FilterMapper_UnregisterFilter failed with %x\n", hr); - - lRet = RegOpenKeyExA(HKEY_CLASSES_ROOT, szClsid, 0, KEY_WRITE | DELETE, &hKey); - ok(lRet == ERROR_SUCCESS, "RegOpenKeyExA failed with %x\n", HRESULT_FROM_WIN32(lRet)); - - lRet = RegDeleteKeyA(hKey, szGuidstring); - ok(lRet == ERROR_SUCCESS, "RegDeleteKeyA failed with %x\n", HRESULT_FROM_WIN32(lRet)); - - if (hKey) RegCloseKey(hKey); - hKey = NULL; - - out: - - if (pMapper) IFilterMapper_Release(pMapper); - if (pMapper2) IFilterMapper2_Release(pMapper2); -} - -static ULONG getRefcount(IUnknown *iface) -{ - IUnknown_AddRef(iface); - return IUnknown_Release(iface); -} - -static void test_ifiltermapper_from_filtergraph(void) -{ - IFilterGraph2* pgraph2 = NULL; - IFilterMapper2 *pMapper2 = NULL; - IFilterGraph *filtergraph = NULL; - HRESULT hr; - ULONG refcount; - - hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterGraph2, (LPVOID*)&pgraph2); - ok(hr == S_OK, "CoCreateInstance failed with %08x\n", hr); - if (!pgraph2) goto out; - - hr = IFilterGraph2_QueryInterface(pgraph2, &IID_IFilterMapper2, (LPVOID*)&pMapper2); - ok(hr == S_OK, "IFilterGraph2_QueryInterface failed with %08x\n", hr); - if (!pMapper2) goto out; - - refcount = getRefcount((IUnknown*)pgraph2); - ok(refcount == 2, "unexpected reference count: %u\n", refcount); - refcount = getRefcount((IUnknown*)pMapper2); - ok(refcount == 2, "unexpected reference count: %u\n", refcount); - - IFilterMapper2_AddRef(pMapper2); - refcount = getRefcount((IUnknown*)pgraph2); - ok(refcount == 3, "unexpected reference count: %u\n", refcount); - refcount = getRefcount((IUnknown*)pMapper2); - ok(refcount == 3, "unexpected reference count: %u\n", refcount); - IFilterMapper2_Release(pMapper2); - - hr = IFilterMapper2_QueryInterface(pMapper2, &IID_IFilterGraph, (LPVOID*)&filtergraph); - ok(hr == S_OK, "IFilterMapper2_QueryInterface failed with %08x\n", hr); - if (!filtergraph) goto out; - - IFilterMapper2_Release(pMapper2); - pMapper2 = NULL; - IFilterGraph_Release(filtergraph); - filtergraph = NULL; - - hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterMapper2, (LPVOID*)&pMapper2); - ok(hr == S_OK, "CoCreateInstance failed with %08x\n", hr); - if (!pMapper2) goto out; - - hr = IFilterMapper2_QueryInterface(pMapper2, &IID_IFilterGraph, (LPVOID*)&filtergraph); - ok(hr == E_NOINTERFACE, "IFilterMapper2_QueryInterface unexpected result: %08x\n", hr); - - out: - - if (pMapper2) IFilterMapper2_Release(pMapper2); - if (filtergraph) IFilterGraph_Release(filtergraph); - if (pgraph2) IFilterGraph2_Release(pgraph2); -} - -static void test_register_filter_with_null_clsMinorType(void) -{ - IFilterMapper2 *pMapper = NULL; - HRESULT hr; - REGFILTER2 rgf2; - REGFILTERPINS rgPins; - REGFILTERPINS2 rgPins2; - REGPINTYPES rgPinType; - static WCHAR wszPinName[] = {'P', 'i', 'n', 0 }; - static const WCHAR wszFilterName1[] = {'T', 'e', 's', 't', 'f', 'i', 'l', 't', 'e', 'r', '1', 0 }; - static const WCHAR wszFilterName2[] = {'T', 'e', 's', 't', 'f', 'i', 'l', 't', 'e', 'r', '2', 0 }; - CLSID clsidFilter1; - CLSID clsidFilter2; - - hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER, - &IID_IFilterMapper2, (LPVOID*)&pMapper); - ok(hr == S_OK, "CoCreateInstance failed with %x\n", hr); - if (FAILED(hr)) goto out; - - hr = CoCreateGuid(&clsidFilter1); - ok(hr == S_OK, "CoCreateGuid failed with %x\n", hr); - hr = CoCreateGuid(&clsidFilter2); - ok(hr == S_OK, "CoCreateGuid failed with %x\n", hr); - - rgPinType.clsMajorType = &GUID_NULL; - /* Make sure quartz accepts it without crashing */ - rgPinType.clsMinorType = NULL; - - /* Test with pin descript version 1 */ - ZeroMemory(&rgf2, sizeof(rgf2)); - rgf2.dwVersion = 1; - rgf2.dwMerit = MERIT_UNLIKELY; - S(U(rgf2)).cPins = 1; - S(U(rgf2)).rgPins = &rgPins; - - rgPins.strName = wszPinName; - rgPins.bRendered = 1; - rgPins.bOutput = 0; - rgPins.bZero = 0; - rgPins.bMany = 0; - rgPins.clsConnectsToFilter = NULL; - rgPins.strConnectsToPin = NULL; - rgPins.nMediaTypes = 1; - rgPins.lpMediaType = &rgPinType; - - hr = IFilterMapper2_RegisterFilter(pMapper, &clsidFilter1, wszFilterName1, NULL, - &CLSID_LegacyAmFilterCategory, NULL, &rgf2); - ok(hr == S_OK, "IFilterMapper2_RegisterFilter failed with %x\n", hr); - - hr = IFilterMapper2_UnregisterFilter(pMapper, &CLSID_LegacyAmFilterCategory, NULL, &clsidFilter1); - ok(hr == S_OK, "FilterMapper_UnregisterFilter failed with %x\n", hr); - - /* Test with pin descript version 2 */ - ZeroMemory(&rgf2, sizeof(rgf2)); - rgf2.dwVersion = 2; - rgf2.dwMerit = MERIT_UNLIKELY; - S1(U(rgf2)).cPins2 = 1; - S1(U(rgf2)).rgPins2 = &rgPins2; - - rgPins2.dwFlags = REG_PINFLAG_B_RENDERER; - rgPins2.cInstances = 1; - rgPins2.nMediaTypes = 1; - rgPins2.lpMediaType = &rgPinType; - rgPins2.nMediums = 0; - rgPins2.lpMedium = NULL; - rgPins2.clsPinCategory = NULL; - - hr = IFilterMapper2_RegisterFilter(pMapper, &clsidFilter2, wszFilterName2, NULL, - &CLSID_LegacyAmFilterCategory, NULL, &rgf2); - ok(hr == S_OK, "IFilterMapper2_RegisterFilter failed with %x\n", hr); - - hr = IFilterMapper2_UnregisterFilter(pMapper, &CLSID_LegacyAmFilterCategory, NULL, &clsidFilter2); - ok(hr == S_OK, "FilterMapper_UnregisterFilter failed with %x\n", hr); - - out: - - if (pMapper) IFilterMapper2_Release(pMapper); -} - - -START_TEST(filtermapper) -{ - CoInitialize(NULL); - - test_fm2_enummatchingfilters(); - test_legacy_filter_registration(); - test_ifiltermapper_from_filtergraph(); - test_register_filter_with_null_clsMinorType(); - - CoUninitialize(); -} diff --git a/rostests/winetests/quartz/memallocator.c b/rostests/winetests/quartz/memallocator.c deleted file mode 100644 index c5313f74dd4..00000000000 --- a/rostests/winetests/quartz/memallocator.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Unit tests for Direct Show functions - * - * Copyright (C) 2005 Christian Costa - * - * 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 COBJMACROS - -#include "wine/test.h" -#include "uuids.h" -#include "dshow.h" -#include "control.h" - -static void CommitDecommitTest(void) -{ - IMemAllocator* pMemAllocator; - HRESULT hr; - - hr = CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (LPVOID*)&pMemAllocator); - ok(hr==S_OK, "Unable to create memory allocator %x\n", hr); - - if (hr == S_OK) - { - ALLOCATOR_PROPERTIES RequestedProps; - ALLOCATOR_PROPERTIES ActualProps; - - IMediaSample *sample = NULL, *sample2 = NULL; - - RequestedProps.cBuffers = 2; - RequestedProps.cbBuffer = 65536; - RequestedProps.cbAlign = 1; - RequestedProps.cbPrefix = 0; - - hr = IMemAllocator_SetProperties(pMemAllocator, &RequestedProps, &ActualProps); - ok(hr==S_OK, "SetProperties returned: %x\n", hr); - - hr = IMemAllocator_Commit(pMemAllocator); - ok(hr==S_OK, "Commit returned: %x\n", hr); - hr = IMemAllocator_Commit(pMemAllocator); - ok(hr==S_OK, "Commit returned: %x\n", hr); - - hr = IMemAllocator_GetBuffer(pMemAllocator, &sample, NULL, NULL, 0); - ok(hr==S_OK, "Could not get a buffer: %x\n", hr); - - hr = IMemAllocator_Decommit(pMemAllocator); - ok(hr==S_OK, "Decommit returned: %x\n", hr); - hr = IMemAllocator_Decommit(pMemAllocator); - ok(hr==S_OK, "Cecommit returned: %x\n", hr); - - /* Decommit and recommit while holding a sample */ - if (sample) - { - hr = IMemAllocator_Commit(pMemAllocator); - ok(hr==S_OK, "Commit returned: %x\n", hr); - - hr = IMemAllocator_GetBuffer(pMemAllocator, &sample2, NULL, NULL, 0); - ok(hr==S_OK, "Could not get a buffer: %x\n", hr); - IUnknown_Release(sample); - if (sample2) - IUnknown_Release(sample2); - - hr = IMemAllocator_Decommit(pMemAllocator); - ok(hr==S_OK, "Cecommit returned: %x\n", hr); - } - IMemAllocator_Release(pMemAllocator); - } -} - -START_TEST(memallocator) -{ - CoInitialize(NULL); - - CommitDecommitTest(); - - CoUninitialize(); -} diff --git a/rostests/winetests/quartz/misc.c b/rostests/winetests/quartz/misc.c deleted file mode 100644 index 74c386b6670..00000000000 --- a/rostests/winetests/quartz/misc.c +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Misc unit tests for Quartz - * - * Copyright (C) 2007 Google (Lei Zhang) - * - * 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 - -#include "wine/test.h" -#include "dshow.h" - -#define QI_SUCCEED(iface, riid, ppv) hr = IUnknown_QueryInterface(iface, &riid, (LPVOID*)&ppv); \ - ok(hr == S_OK, "IUnknown_QueryInterface returned %x\n", hr); \ - ok(ppv != NULL, "Pointer is NULL\n"); - -#define QI_FAIL(iface, riid, ppv) hr = IUnknown_QueryInterface(iface, &riid, (LPVOID*)&ppv); \ - ok(hr == E_NOINTERFACE, "IUnknown_QueryInterface returned %x\n", hr); \ - ok(ppv == NULL, "Pointer is %p\n", ppv); - -#define ADDREF_EXPECT(iface, num) if (iface) { \ - refCount = IUnknown_AddRef(iface); \ - ok(refCount == num, "IUnknown_AddRef should return %d, got %d\n", num, refCount); \ -} - -#define RELEASE_EXPECT(iface, num) if (iface) { \ - refCount = IUnknown_Release(iface); \ - ok(refCount == num, "IUnknown_Release should return %d, got %d\n", num, refCount); \ -} - -static void test_aggregation(const CLSID clsidOuter, const CLSID clsidInner, - const IID iidOuter, const IID iidInner) -{ - HRESULT hr; - ULONG refCount; - IUnknown *pUnkOuter = NULL; - IUnknown *pUnkInner = NULL; - IUnknown *pUnkInnerFail = NULL; - IUnknown *pUnkOuterTest = NULL; - IUnknown *pUnkInnerTest = NULL; - IUnknown *pUnkAggregatee = NULL; - IUnknown *pUnkAggregator = NULL; - IUnknown *pUnkTest = NULL; - - hr = CoCreateInstance(&clsidOuter, NULL, CLSCTX_INPROC_SERVER, - &IID_IUnknown, (LPVOID*)&pUnkOuter); - ok(hr == S_OK, "CoCreateInstance failed with %x\n", hr); - ok(pUnkOuter != NULL, "pUnkOuter is NULL\n"); - - if (!pUnkOuter) - { - skip("pUnkOuter is NULL\n"); - return; - } - - /* for aggregation, we should only be able to request IUnknown */ - hr = CoCreateInstance(&clsidInner, pUnkOuter, CLSCTX_INPROC_SERVER, - &iidInner, (LPVOID*)&pUnkInnerFail); - ok(hr == E_NOINTERFACE, "CoCreateInstance returned %x\n", hr); - ok(pUnkInnerFail == NULL, "pUnkInnerFail is not NULL\n"); - - /* aggregation, request IUnknown */ - hr = CoCreateInstance(&clsidInner, pUnkOuter, CLSCTX_INPROC_SERVER, - &IID_IUnknown, (LPVOID*)&pUnkInner); - ok(hr == S_OK, "CoCreateInstance returned %x\n", hr); - ok(pUnkInner != NULL, "pUnkInner is NULL\n"); - - if (!pUnkInner) - { - skip("pUnkInner is NULL\n"); - return; - } - - ADDREF_EXPECT(pUnkOuter, 2); - ADDREF_EXPECT(pUnkInner, 2); - RELEASE_EXPECT(pUnkOuter, 1); - RELEASE_EXPECT(pUnkInner, 1); - - QI_FAIL(pUnkOuter, iidInner, pUnkAggregatee); - QI_FAIL(pUnkInner, iidOuter, pUnkAggregator); - - /* these QueryInterface calls should work */ - QI_SUCCEED(pUnkOuter, iidOuter, pUnkAggregator); - QI_SUCCEED(pUnkOuter, IID_IUnknown, pUnkOuterTest); - /* IGraphConfig interface comes with DirectShow 9 */ - if(IsEqualGUID(&IID_IGraphConfig, &iidInner)) - { - hr = IUnknown_QueryInterface(pUnkInner, &iidInner, (LPVOID*)&pUnkAggregatee); - ok(hr == S_OK || broken(hr == E_NOINTERFACE), "IUnknown_QueryInterface returned %x\n", hr); - ok(pUnkAggregatee != NULL || broken(!pUnkAggregatee), "Pointer is NULL\n"); - } - else - { - QI_SUCCEED(pUnkInner, iidInner, pUnkAggregatee); - } - QI_SUCCEED(pUnkInner, IID_IUnknown, pUnkInnerTest); - - if (!pUnkAggregator || !pUnkOuterTest || !pUnkAggregatee - || !pUnkInnerTest) - { - skip("One of the required interfaces is NULL\n"); - return; - } - - ADDREF_EXPECT(pUnkAggregator, 5); - ADDREF_EXPECT(pUnkOuterTest, 6); - ADDREF_EXPECT(pUnkAggregatee, 7); - ADDREF_EXPECT(pUnkInnerTest, 3); - RELEASE_EXPECT(pUnkAggregator, 6); - RELEASE_EXPECT(pUnkOuterTest, 5); - RELEASE_EXPECT(pUnkAggregatee, 4); - RELEASE_EXPECT(pUnkInnerTest, 2); - - QI_SUCCEED(pUnkAggregator, IID_IUnknown, pUnkTest); - QI_SUCCEED(pUnkOuterTest, IID_IUnknown, pUnkTest); - QI_SUCCEED(pUnkAggregatee, IID_IUnknown, pUnkTest); - QI_SUCCEED(pUnkInnerTest, IID_IUnknown, pUnkTest); - - QI_FAIL(pUnkAggregator, iidInner, pUnkTest); - QI_FAIL(pUnkOuterTest, iidInner, pUnkTest); - QI_FAIL(pUnkAggregatee, iidInner, pUnkTest); - QI_SUCCEED(pUnkInnerTest, iidInner, pUnkTest); - - QI_SUCCEED(pUnkAggregator, iidOuter, pUnkTest); - QI_SUCCEED(pUnkOuterTest, iidOuter, pUnkTest); - QI_SUCCEED(pUnkAggregatee, iidOuter, pUnkTest); - QI_FAIL(pUnkInnerTest, iidOuter, pUnkTest); - - RELEASE_EXPECT(pUnkAggregator, 10); - RELEASE_EXPECT(pUnkOuterTest, 9); - RELEASE_EXPECT(pUnkAggregatee, 8); - RELEASE_EXPECT(pUnkInnerTest, 2); - RELEASE_EXPECT(pUnkOuter, 7); - RELEASE_EXPECT(pUnkInner, 1); - - do - { - refCount = IUnknown_Release(pUnkInner); - } while (refCount); - - do - { - refCount = IUnknown_Release(pUnkOuter); - } while (refCount); -} - -static void test_video_renderer_aggregations(void) -{ - const IID * iids[] = { - &IID_IMediaFilter, &IID_IBaseFilter, &IID_IBasicVideo, &IID_IVideoWindow - }; - int i; - - for (i = 0; i < sizeof(iids) / sizeof(iids[0]); i++) - { - test_aggregation(CLSID_SystemClock, CLSID_VideoRenderer, - IID_IReferenceClock, *iids[i]); - } -} - -static void test_filter_graph_aggregations(void) -{ - const IID * iids[] = { - &IID_IFilterGraph2, &IID_IMediaControl, &IID_IGraphBuilder, - &IID_IFilterGraph, &IID_IMediaSeeking, &IID_IBasicAudio, &IID_IBasicVideo, - &IID_IVideoWindow, &IID_IMediaEventEx, &IID_IMediaFilter, - &IID_IMediaEventSink, &IID_IGraphConfig, &IID_IMediaPosition - }; - int i; - - for (i = 0; i < sizeof(iids) / sizeof(iids[0]); i++) - { - test_aggregation(CLSID_SystemClock, CLSID_FilterGraph, - IID_IReferenceClock, *iids[i]); - } -} - -static void test_filter_mapper_aggregations(void) -{ - const IID * iids[] = { - &IID_IFilterMapper2, &IID_IFilterMapper - }; - int i; - - for (i = 0; i < sizeof(iids) / sizeof(iids[0]); i++) - { - test_aggregation(CLSID_SystemClock, CLSID_FilterMapper2, - IID_IReferenceClock, *iids[i]); - } -} - -START_TEST(misc) -{ - CoInitialize(NULL); - - test_video_renderer_aggregations(); - test_filter_graph_aggregations(); - test_filter_mapper_aggregations(); - - CoUninitialize(); -} diff --git a/rostests/winetests/quartz/quartz.rbuild b/rostests/winetests/quartz/quartz.rbuild deleted file mode 100644 index fe3d780268a..00000000000 --- a/rostests/winetests/quartz/quartz.rbuild +++ /dev/null @@ -1,18 +0,0 @@ - - . - - avisplitter.c - dsoundrender.c - filtergraph.c - filtermapper.c - memallocator.c - misc.c - referenceclock.c - videorenderer.c - testlist.c - wine - oleaut32 - ole32 - advapi32 - ntdll - diff --git a/rostests/winetests/quartz/referenceclock.c b/rostests/winetests/quartz/referenceclock.c deleted file mode 100644 index ddce02eaa72..00000000000 --- a/rostests/winetests/quartz/referenceclock.c +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Unit tests for Direct Show functions - IReferenceClock - * - * Copyright (C) 2007 Alex Villacís Lasso - * - * 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 COBJMACROS - -#include "wine/test.h" -#include "uuids.h" -#include "dshow.h" -#include "control.h" - -static void test_IReferenceClock_query_interface(const char * clockdesc, IReferenceClock * pClock) -{ - HRESULT hr; - IUnknown *pF; - - hr = IReferenceClock_QueryInterface(pClock, &IID_IUnknown, (LPVOID *)&pF); - ok(hr == S_OK, "IReferenceClock_QueryInterface returned %x\n", hr); - ok(pF != NULL, "pF is NULL\n"); - - hr = IReferenceClock_QueryInterface(pClock, &IID_IDirectDraw, (LPVOID *)&pF); - ok(hr == E_NOINTERFACE, "IReferenceClock_QueryInterface returned %x\n", hr); - ok(pF == NULL, "pF is not NULL\n"); - - hr = IReferenceClock_QueryInterface(pClock, &IID_IReferenceClock, (LPVOID *)&pF); - ok(hr == S_OK, "IReferenceClock_QueryInterface returned %x\n", hr); - ok(pF != NULL, "pF is NULL\n"); -} - -/* The following method expects a reference clock that will keep ticking for - * at least 5 seconds since its creation. This method assumes no other methods - * were called on the IReferenceClock interface since its creation. - */ -static void test_IReferenceClock_methods(const char * clockdesc, IReferenceClock * pClock) -{ - HRESULT hr; - REFERENCE_TIME time1; - REFERENCE_TIME time2; - LONG diff; - - /* Test response from invalid (NULL) argument */ - hr = IReferenceClock_GetTime(pClock, NULL); - ok (hr == E_POINTER, "%s - Expected E_POINTER (0x%08x), got 0x%08x\n", clockdesc, E_POINTER, hr); - - /* Test response for valid value - try 1 */ - /* TODO: test whether Windows actually returns S_FALSE in its first invocation */ - time1 = (REFERENCE_TIME)0xdeadbeef; - hr = IReferenceClock_GetTime(pClock, &time1); - ok (hr == S_FALSE || hr == S_OK, "%s - Expected S_OK or S_FALSE, got 0x%08x\n", clockdesc, hr); - ok (time1 != 0xdeadbeef, "%s - value was NOT changed on return!\n", clockdesc); - - /* Test response for valid value - try 2 */ - time2 = (REFERENCE_TIME)0xdeadbeef; - hr = IReferenceClock_GetTime(pClock, &time2); - ok (hr == S_FALSE || hr == S_OK, "%s - Expected S_OK or S_FALSE, got 0x%08x\n", clockdesc, hr); - ok (time2 != 0xdeadbeef, "%s - value was NOT changed on return!\n", clockdesc); - - /* In case the second invocation managed to return S_FALSE, MSDN says the - returned time is the same as the previous one. */ - ok ((hr != S_FALSE || time1 == time2), "%s - returned S_FALSE, but values not equal!\n", clockdesc); - - time1 = time2; - Sleep(1000); /* Sleep for at least 1 second */ - hr = IReferenceClock_GetTime(pClock, &time2); - /* After a 1-second sleep, there is no excuse to get S_FALSE (see TODO above) */ - ok (hr == S_OK, "%s - Expected S_OK, got 0x%08x\n", clockdesc, hr); - - /* FIXME: How much deviation should be allowed after a sleep? */ - /* 0.3% is common, and 0.4% is sometimes observed. */ - diff = time2 - time1; - ok (9940000 <= diff && diff <= 10240000, "%s - Expected difference around 10000000, got %u\n", clockdesc, diff); - -} - -static void test_IReferenceClock_SystemClock(void) -{ - IReferenceClock * pReferenceClock; - HRESULT hr; - - hr = CoCreateInstance(&CLSID_SystemClock, NULL, CLSCTX_INPROC_SERVER, &IID_IReferenceClock, (LPVOID*)&pReferenceClock); - ok(hr == S_OK, "Unable to create reference clock from system clock %x\n", hr); - if (hr == S_OK) - { - test_IReferenceClock_query_interface("SystemClock", pReferenceClock); - test_IReferenceClock_methods("SystemClock", pReferenceClock); - IReferenceClock_Release(pReferenceClock); - } -} - -START_TEST(referenceclock) -{ - CoInitialize(NULL); - - test_IReferenceClock_SystemClock(); - - CoUninitialize(); -} diff --git a/rostests/winetests/quartz/testlist.c b/rostests/winetests/quartz/testlist.c deleted file mode 100644 index c5d360b8ef7..00000000000 --- a/rostests/winetests/quartz/testlist.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_avisplitter(void); -extern void func_dsoundrender(void); -extern void func_filtergraph(void); -extern void func_filtermapper(void); -extern void func_memallocator(void); -extern void func_misc(void); -extern void func_referenceclock(void); -extern void func_videorenderer(void); - -const struct test winetest_testlist[] = -{ - { "avisplitter", func_avisplitter }, - { "dsoundrender", func_dsoundrender }, - { "filtergraph", func_filtergraph }, - { "filtermapper", func_filtermapper }, - { "memallocator", func_memallocator }, - { "misc", func_misc }, - { "videorenderer", func_videorenderer }, - { "referenceclock", func_referenceclock }, - { 0, 0 } -}; diff --git a/rostests/winetests/quartz/videorenderer.c b/rostests/winetests/quartz/videorenderer.c deleted file mode 100644 index 967abd4ff96..00000000000 --- a/rostests/winetests/quartz/videorenderer.c +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Unit tests for Video Renderer functions - * - * Copyright (C) 2007 Google (Lei Zhang) - * - * 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 - -#include "wine/test.h" -#include "dshow.h" - -#define QI_SUCCEED(iface, riid, ppv) hr = IUnknown_QueryInterface(iface, &riid, (LPVOID*)&ppv); \ - ok(hr == S_OK, "IUnknown_QueryInterface returned %x\n", hr); \ - ok(ppv != NULL, "Pointer is NULL\n"); - -#define RELEASE_EXPECT(iface, num) if (iface) { \ - hr = IUnknown_Release(iface); \ - ok(hr == num, "IUnknown_Release should return %d, got %d\n", num, hr); \ -} - -static IUnknown *pVideoRenderer = NULL; - -static int create_video_renderer(void) -{ - HRESULT hr; - - hr = CoCreateInstance(&CLSID_VideoRenderer, NULL, CLSCTX_INPROC_SERVER, - &IID_IUnknown, (LPVOID*)&pVideoRenderer); - return (hr == S_OK && pVideoRenderer != NULL); -} - -static void release_video_renderer(void) -{ - HRESULT hr; - - hr = IUnknown_Release(pVideoRenderer); - ok(hr == 0, "IUnknown_Release failed with %x\n", hr); -} - -static void test_query_interface(void) -{ - HRESULT hr; - IBaseFilter *pBaseFilter = NULL; - IBasicVideo *pBasicVideo = NULL; - IDirectDrawVideo *pDirectDrawVideo = NULL; - IKsPropertySet *pKsPropertySet = NULL; - IMediaPosition *pMediaPosition = NULL; - IMediaSeeking *pMediaSeeking = NULL; - IQualityControl *pQualityControl = NULL; - IQualProp *pQualProp = NULL; - IVideoWindow *pVideoWindow = NULL; - - QI_SUCCEED(pVideoRenderer, IID_IBaseFilter, pBaseFilter); - RELEASE_EXPECT(pBaseFilter, 1); - QI_SUCCEED(pVideoRenderer, IID_IBasicVideo, pBasicVideo); - RELEASE_EXPECT(pBasicVideo, 1); - QI_SUCCEED(pVideoRenderer, IID_IMediaSeeking, pMediaSeeking); - RELEASE_EXPECT(pMediaSeeking, 1); - todo_wine { - QI_SUCCEED(pVideoRenderer, IID_IDirectDrawVideo, pDirectDrawVideo); - RELEASE_EXPECT(pDirectDrawVideo, 1); - QI_SUCCEED(pVideoRenderer, IID_IKsPropertySet, pKsPropertySet); - RELEASE_EXPECT(pKsPropertySet, 1); - QI_SUCCEED(pVideoRenderer, IID_IMediaPosition, pMediaPosition); - RELEASE_EXPECT(pMediaPosition, 1); - QI_SUCCEED(pVideoRenderer, IID_IQualityControl, pQualityControl); - RELEASE_EXPECT(pQualityControl, 1); - QI_SUCCEED(pVideoRenderer, IID_IQualProp, pQualProp); - RELEASE_EXPECT(pQualProp, 1); - } - QI_SUCCEED(pVideoRenderer, IID_IVideoWindow, pVideoWindow); - RELEASE_EXPECT(pVideoWindow, 1); -} - -static void test_pin(IPin *pin) -{ - IMemInputPin *mpin = NULL; - - IPin_QueryInterface(pin, &IID_IMemInputPin, (void **)&mpin); - - ok(mpin != NULL, "No IMemInputPin found!\n"); - if (mpin) - { - ok(IMemInputPin_ReceiveCanBlock(mpin) == S_OK, "Receive can't block for pin!\n"); - ok(IMemInputPin_NotifyAllocator(mpin, NULL, 0) == E_POINTER, "NotifyAllocator likes a NULL pointer argument\n"); - IMemInputPin_Release(mpin); - } - /* TODO */ -} - -static void test_basefilter(void) -{ - IEnumPins *pin_enum = NULL; - IBaseFilter *base = NULL; - IPin *pins[2]; - ULONG ref; - HRESULT hr; - - IUnknown_QueryInterface(pVideoRenderer, &IID_IBaseFilter, (void *)&base); - if (base == NULL) - { - /* test_query_interface handles this case */ - skip("No IBaseFilter\n"); - return; - } - - hr = IBaseFilter_EnumPins(base, NULL); - ok(hr == E_POINTER, "hr = %08x and not E_POINTER\n", hr); - - hr= IBaseFilter_EnumPins(base, &pin_enum); - ok(hr == S_OK, "hr = %08x and not S_OK\n", hr); - - hr = IEnumPins_Next(pin_enum, 1, NULL, NULL); - ok(hr == E_POINTER, "hr = %08x and not E_POINTER\n", hr); - - hr = IEnumPins_Next(pin_enum, 2, pins, NULL); - ok(hr == E_INVALIDARG, "hr = %08x and not E_INVALIDARG\n", hr); - - pins[0] = (void *)0xdead; - pins[1] = (void *)0xdeed; - - hr = IEnumPins_Next(pin_enum, 2, pins, &ref); - ok(hr == S_FALSE, "hr = %08x instead of S_FALSE\n", hr); - ok(pins[0] != (void *)0xdead && pins[0] != NULL, "pins[0] = %p\n", pins[0]); - if (pins[0] != (void *)0xdead && pins[0] != NULL) - { - test_pin(pins[0]); - IPin_Release(pins[0]); - } - - ok(pins[1] == (void *)0xdeed, "pins[1] = %p\n", pins[1]); - - ref = IEnumPins_Release(pin_enum); - ok(ref == 0, "ref is %u and not 0!\n", ref); - - IBaseFilter_Release(base); -} - -START_TEST(videorenderer) -{ - CoInitialize(NULL); - if (!create_video_renderer()) - return; - - test_query_interface(); - test_basefilter(); - - release_video_renderer(); - - CoUninitialize(); -} diff --git a/rostests/winetests/rasapi32/CMakeLists.txt b/rostests/winetests/rasapi32/CMakeLists.txt deleted file mode 100644 index 658cface760..00000000000 --- a/rostests/winetests/rasapi32/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(rasapi32_winetest rasapi.c testlist.c) -target_link_libraries(rasapi32_winetest wine) -set_module_type(rasapi32_winetest win32cui) -add_importlibs(rasapi32_winetest msvcrt kernel32 ntdll) -add_cd_file(TARGET rasapi32_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/rasapi32/rasapi.c b/rostests/winetests/rasapi32/rasapi.c deleted file mode 100644 index d25c7411301..00000000000 --- a/rostests/winetests/rasapi32/rasapi.c +++ /dev/null @@ -1,169 +0,0 @@ -/* -* Unit test suite for rasapi32 functions -* -* Copyright 2008 Austin English -* -* 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 "ras.h" -#include "raserror.h" - -static HMODULE hmodule; -static DWORD (WINAPI *pRasEnumDevicesA)(LPRASDEVINFOA, LPDWORD, LPDWORD); - -#define RASAPI32_GET_PROC(func) \ - p ## func = (void*)GetProcAddress(hmodule, #func); \ - if(!p ## func) \ - trace("GetProcAddress(%s) failed\n", #func); - -static void InitFunctionPtrs(void) -{ - hmodule = LoadLibraryA("rasapi32.dll"); - - RASAPI32_GET_PROC(RasEnumDevicesA) -} - -static void test_rasenum(void) -{ - DWORD result; - DWORD cDevices = 0; - DWORD bufsize = 0, cb = 0; - LPRASDEVINFOA rasDevInfo; - - if(!pRasEnumDevicesA) { - win_skip("Skipping RasEnumDevicesA tests, function not present\n"); - return; - } - - /* create the return buffer */ - result = pRasEnumDevicesA(NULL, &bufsize, &cDevices); - if(ERROR_RASMAN_CANNOT_INITIALIZE == result || - ERROR_STATE_MACHINES_NOT_STARTED == result) { - win_skip("RAS configuration problem\n"); - return; - } - if(ERROR_SUCCESS == result) { - win_skip("RasEnumDevicesA found nothing to enumerate\n"); - return; - } - trace("RasEnumDevicesA: returned %d buffersize %d\n", result, bufsize); - ok(result == ERROR_BUFFER_TOO_SMALL, - "Expected ERROR_BUFFER_TOO_SMALL, got %08d\n", result); - - rasDevInfo = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, - max(bufsize,sizeof(RASDEVINFOA))); - if(!rasDevInfo) { - win_skip("failed to allocate buffer for RasEnumDevicesA tests\n"); - return; - } - - /* test first parameter */ - cb = bufsize; - result = pRasEnumDevicesA(NULL, &cb, &cDevices); - ok(result == ERROR_BUFFER_TOO_SMALL || - result == ERROR_INVALID_USER_BUFFER, /* win98 */ - "Expected ERROR_BUFFER_TOO_SMALL, got %08d\n", result); - - rasDevInfo[0].dwSize = 0; - cb = bufsize; - result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices); - todo_wine - ok(result == ERROR_INVALID_SIZE || - result == ERROR_INVALID_USER_BUFFER, /* win98 */ - "Expected ERROR_INVALID_SIZE, got %08d\n", result); - - rasDevInfo[0].dwSize = sizeof(RASDEVINFOA) -1; - cb = bufsize; - result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices); - todo_wine - ok(result == ERROR_INVALID_SIZE || - result == ERROR_INVALID_USER_BUFFER, /* win98 */ - "Expected ERROR_INVALID_SIZE, got %08d\n", result); - - rasDevInfo[0].dwSize = sizeof(RASDEVINFOA) +1; - cb = bufsize; - result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices); - todo_wine - ok(result == ERROR_INVALID_SIZE || - result == ERROR_INVALID_USER_BUFFER, /* win98 */ - "Expected ERROR_INVALID_SIZE, got %08d\n", result); - - /* test second parameter */ - rasDevInfo[0].dwSize = sizeof(RASDEVINFOA); - result = pRasEnumDevicesA(rasDevInfo, NULL, &cDevices); - ok(result == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08d\n", result); - - rasDevInfo[0].dwSize = sizeof(RASDEVINFOA); - cb = 0; - result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices); - ok(result == ERROR_BUFFER_TOO_SMALL || - result == ERROR_INVALID_SIZE, /* vista, 2k8 */ - "Expected ERROR_BUFFER_TOO_SMALL/ERROR_INVALID_SIZE, got %08d\n", result); - - rasDevInfo[0].dwSize = sizeof(RASDEVINFOA); - cb = bufsize -1; - result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices); - ok(result == ERROR_BUFFER_TOO_SMALL, - "Expected ERROR_BUFFER_TOO_SMALL, got %08d\n", result); - - rasDevInfo[0].dwSize = sizeof(RASDEVINFOA); - cb = bufsize +1; - result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices); - ok(result == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got %08d\n", result); - - /* test third parameter */ - rasDevInfo[0].dwSize = sizeof(RASDEVINFOA); - cb = bufsize; - result = pRasEnumDevicesA(rasDevInfo, &cb, NULL); - ok(result == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08d\n", result); - - /* test combinations of invalid parameters */ - result = pRasEnumDevicesA(NULL, NULL, &cDevices); - ok(result == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08d\n", result); - - result = pRasEnumDevicesA(NULL, &cb, NULL); - ok(result == ERROR_INVALID_PARAMETER || - result == ERROR_INVALID_USER_BUFFER, /* win98 */ - "Expected ERROR_INVALID_PARAMETER, got %08d\n", result); - - cb = 0; - rasDevInfo[0].dwSize = 0; - result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices); - todo_wine - ok(result == ERROR_INVALID_SIZE || - broken(result == ERROR_BUFFER_TOO_SMALL), /* win98 */ - "Expected ERROR_INVALID_SIZE, got %08d\n", result); - - HeapFree(GetProcessHeap(), 0, rasDevInfo); -} - -START_TEST(rasapi) -{ - InitFunctionPtrs(); - - test_rasenum(); - - FreeLibrary(hmodule); -} diff --git a/rostests/winetests/rasapi32/rasapi32.rbuild b/rostests/winetests/rasapi32/rasapi32.rbuild deleted file mode 100644 index dff0d77da22..00000000000 --- a/rostests/winetests/rasapi32/rasapi32.rbuild +++ /dev/null @@ -1,8 +0,0 @@ - - . - - rasapi.c - testlist.c - wine - ntdll - diff --git a/rostests/winetests/rasapi32/testlist.c b/rostests/winetests/rasapi32/testlist.c deleted file mode 100644 index a608f4e2785..00000000000 --- a/rostests/winetests/rasapi32/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_rasapi(void); - -const struct test winetest_testlist[] = -{ - { "rasapi", func_rasapi }, - { 0, 0 } -}; diff --git a/rostests/winetests/riched20/CMakeLists.txt b/rostests/winetests/riched20/CMakeLists.txt deleted file mode 100644 index a1998306025..00000000000 --- a/rostests/winetests/riched20/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - editor.c - richole.c - testlist.c - txtsrv.c) - -add_executable(riched20_winetest ${SOURCE}) -target_link_libraries(riched20_winetest wine uuid) -set_module_type(riched20_winetest win32cui) -add_importlibs(riched20_winetest ole32 oleaut32 user32 gdi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET riched20_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/riched20/editor.c b/rostests/winetests/riched20/editor.c deleted file mode 100644 index 827f35dffe4..00000000000 --- a/rostests/winetests/riched20/editor.c +++ /dev/null @@ -1,7244 +0,0 @@ -/* -* Unit test suite for rich edit control -* -* Copyright 2006 Google (Thomas Kho) -* Copyright 2007 Matt Finnicum -* Copyright 2007 Dmitry Timoshkov -* -* 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 -#include -#include -#include -#include -#include - -#define ID_RICHEDITTESTDBUTTON 0x123 - -static CHAR string1[MAX_PATH], string2[MAX_PATH], string3[MAX_PATH]; - -#define ok_w3(format, szString1, szString2, szString3) \ - WideCharToMultiByte(CP_ACP, 0, szString1, -1, string1, MAX_PATH, NULL, NULL); \ - WideCharToMultiByte(CP_ACP, 0, szString2, -1, string2, MAX_PATH, NULL, NULL); \ - WideCharToMultiByte(CP_ACP, 0, szString3, -1, string3, MAX_PATH, NULL, NULL); \ - ok(!lstrcmpW(szString3, szString1) || !lstrcmpW(szString3, szString2), \ - format, string1, string2, string3); - -static HMODULE hmoduleRichEdit; - -static HWND new_window(LPCSTR lpClassName, DWORD dwStyle, HWND parent) { - HWND hwnd; - hwnd = CreateWindowA(lpClassName, NULL, dwStyle|WS_POPUP|WS_HSCROLL|WS_VSCROLL - |WS_VISIBLE, 0, 0, 200, 60, parent, NULL, - hmoduleRichEdit, NULL); - ok(hwnd != NULL, "class: %s, error: %d\n", lpClassName, (int) GetLastError()); - return hwnd; -} - -static HWND new_windowW(LPCWSTR lpClassName, DWORD dwStyle, HWND parent) { - HWND hwnd; - hwnd = CreateWindowW(lpClassName, NULL, dwStyle|WS_POPUP|WS_HSCROLL|WS_VSCROLL - |WS_VISIBLE, 0, 0, 200, 60, parent, NULL, - hmoduleRichEdit, NULL); - ok(hwnd != NULL, "class: %s, error: %d\n", wine_dbgstr_w(lpClassName), (int) GetLastError()); - return hwnd; -} - -static HWND new_richedit(HWND parent) { - return new_window(RICHEDIT_CLASS, ES_MULTILINE, parent); -} - -static HWND new_richeditW(HWND parent) { - return new_windowW(RICHEDIT_CLASS20W, ES_MULTILINE, parent); -} - -/* Keeps the window reponsive for the deley_time in seconds. - * This is useful for debugging a test to see what is happening. */ -static void keep_responsive(time_t delay_time) -{ - MSG msg; - time_t end; - - /* The message pump uses PeekMessage() to empty the queue and then - * sleeps for 50ms before retrying the queue. */ - end = time(NULL) + delay_time; - while (time(NULL) < end) { - if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } else { - Sleep(50); - } - } -} - -static void simulate_typing_characters(HWND hwnd, const char* szChars) -{ - int ret; - - while (*szChars != '\0') { - SendMessageA(hwnd, WM_KEYDOWN, *szChars, 1); - ret = SendMessageA(hwnd, WM_CHAR, *szChars, 1); - ok(ret == 0, "WM_CHAR('%c') ret=%d\n", *szChars, ret); - SendMessageA(hwnd, WM_KEYUP, *szChars, 1); - szChars++; - } -} - -static BOOL hold_key(int vk) -{ - BYTE key_state[256]; - BOOL result; - - result = GetKeyboardState(key_state); - ok(result, "GetKeyboardState failed.\n"); - if (!result) return FALSE; - key_state[vk] |= 0x80; - result = SetKeyboardState(key_state); - ok(result, "SetKeyboardState failed.\n"); - return result != 0; -} - -static BOOL release_key(int vk) -{ - BYTE key_state[256]; - BOOL result; - - result = GetKeyboardState(key_state); - ok(result, "GetKeyboardState failed.\n"); - if (!result) return FALSE; - key_state[vk] &= ~0x80; - result = SetKeyboardState(key_state); - ok(result, "SetKeyboardState failed.\n"); - return result != 0; -} - -static const char haystack[] = "WINEWine wineWine wine WineWine"; - /* ^0 ^10 ^20 ^30 */ - -struct find_s { - int start; - int end; - const char *needle; - int flags; - int expected_loc; -}; - - -static struct find_s find_tests[] = { - /* Find in empty text */ - {0, -1, "foo", FR_DOWN, -1}, - {0, -1, "foo", 0, -1}, - {0, -1, "", FR_DOWN, -1}, - {20, 5, "foo", FR_DOWN, -1}, - {5, 20, "foo", FR_DOWN, -1} -}; - -static struct find_s find_tests2[] = { - /* No-result find */ - {0, -1, "foo", FR_DOWN | FR_MATCHCASE, -1}, - {5, 20, "WINE", FR_DOWN | FR_MATCHCASE, -1}, - - /* Subsequent finds */ - {0, -1, "Wine", FR_DOWN | FR_MATCHCASE, 4}, - {5, 31, "Wine", FR_DOWN | FR_MATCHCASE, 13}, - {14, 31, "Wine", FR_DOWN | FR_MATCHCASE, 23}, - {24, 31, "Wine", FR_DOWN | FR_MATCHCASE, 27}, - - /* Find backwards */ - {19, 20, "Wine", FR_MATCHCASE, 13}, - {10, 20, "Wine", FR_MATCHCASE, 4}, - {20, 10, "Wine", FR_MATCHCASE, 13}, - - /* Case-insensitive */ - {1, 31, "wInE", FR_DOWN, 4}, - {1, 31, "Wine", FR_DOWN, 4}, - - /* High-to-low ranges */ - {20, 5, "Wine", FR_DOWN, -1}, - {2, 1, "Wine", FR_DOWN, -1}, - {30, 29, "Wine", FR_DOWN, -1}, - {20, 5, "Wine", 0, 13}, - - /* Find nothing */ - {5, 10, "", FR_DOWN, -1}, - {10, 5, "", FR_DOWN, -1}, - {0, -1, "", FR_DOWN, -1}, - {10, 5, "", 0, -1}, - - /* Whole-word search */ - {0, -1, "wine", FR_DOWN | FR_WHOLEWORD, 18}, - {0, -1, "win", FR_DOWN | FR_WHOLEWORD, -1}, - {13, -1, "wine", FR_DOWN | FR_WHOLEWORD, 18}, - {0, -1, "winewine", FR_DOWN | FR_WHOLEWORD, 0}, - {10, -1, "winewine", FR_DOWN | FR_WHOLEWORD, 23}, - {11, -1, "winewine", FR_WHOLEWORD, 0}, - {31, -1, "winewine", FR_WHOLEWORD, 23}, - - /* Bad ranges */ - {5, 200, "XXX", FR_DOWN, -1}, - {-20, 20, "Wine", FR_DOWN, -1}, - {-20, 20, "Wine", FR_DOWN, -1}, - {-15, -20, "Wine", FR_DOWN, -1}, - {1<<12, 1<<13, "Wine", FR_DOWN, -1}, - - /* Check the case noted in bug 4479 where matches at end aren't recognized */ - {23, 31, "Wine", FR_DOWN | FR_MATCHCASE, 23}, - {27, 31, "Wine", FR_DOWN | FR_MATCHCASE, 27}, - {27, 32, "Wine", FR_DOWN | FR_MATCHCASE, 27}, - {13, 31, "WineWine", FR_DOWN | FR_MATCHCASE, 23}, - {13, 32, "WineWine", FR_DOWN | FR_MATCHCASE, 23}, - - /* The backwards case of bug 4479; bounds look right - * Fails because backward find is wrong */ - {19, 20, "WINE", FR_MATCHCASE, 0}, - {0, 20, "WINE", FR_MATCHCASE, -1}, - - {0, -1, "wineWine wine", 0, -1}, -}; - -static void check_EM_FINDTEXT(HWND hwnd, const char *name, struct find_s *f, int id) { - int findloc; - FINDTEXT ft; - memset(&ft, 0, sizeof(ft)); - ft.chrg.cpMin = f->start; - ft.chrg.cpMax = f->end; - ft.lpstrText = f->needle; - findloc = SendMessage(hwnd, EM_FINDTEXT, f->flags, (LPARAM) &ft); - ok(findloc == f->expected_loc, - "EM_FINDTEXT(%s,%d) '%s' in range(%d,%d), flags %08x, got start at %d, expected %d\n", - name, id, f->needle, f->start, f->end, f->flags, findloc, f->expected_loc); -} - -static void check_EM_FINDTEXTEX(HWND hwnd, const char *name, struct find_s *f, - int id) { - int findloc; - FINDTEXTEX ft; - int expected_end_loc; - - memset(&ft, 0, sizeof(ft)); - ft.chrg.cpMin = f->start; - ft.chrg.cpMax = f->end; - ft.lpstrText = f->needle; - findloc = SendMessage(hwnd, EM_FINDTEXTEX, f->flags, (LPARAM) &ft); - ok(findloc == f->expected_loc, - "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, start at %d\n", - name, id, f->needle, f->start, f->end, f->flags, findloc); - ok(ft.chrgText.cpMin == f->expected_loc, - "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, start at %d\n", - name, id, f->needle, f->start, f->end, f->flags, ft.chrgText.cpMin); - expected_end_loc = ((f->expected_loc == -1) ? -1 - : f->expected_loc + strlen(f->needle)); - ok(ft.chrgText.cpMax == expected_end_loc, - "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, end at %d, expected %d\n", - name, id, f->needle, f->start, f->end, f->flags, ft.chrgText.cpMax, expected_end_loc); -} - -static void run_tests_EM_FINDTEXT(HWND hwnd, const char *name, struct find_s *find, - int num_tests) -{ - int i; - - for (i = 0; i < num_tests; i++) { - check_EM_FINDTEXT(hwnd, name, &find[i], i); - check_EM_FINDTEXTEX(hwnd, name, &find[i], i); - } -} - -static void test_EM_FINDTEXT(void) -{ - HWND hwndRichEdit = new_richedit(NULL); - CHARFORMAT2 cf2; - - /* Empty rich edit control */ - run_tests_EM_FINDTEXT(hwndRichEdit, "1", find_tests, - sizeof(find_tests)/sizeof(struct find_s)); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) haystack); - - /* Haystack text */ - run_tests_EM_FINDTEXT(hwndRichEdit, "2", find_tests2, - sizeof(find_tests2)/sizeof(struct find_s)); - - /* Setting a format on an arbitrary range should have no effect in search - results. This tests correct offset reporting across runs. */ - cf2.cbSize = sizeof(CHARFORMAT2); - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, SCF_DEFAULT, (LPARAM)&cf2); - cf2.dwMask = CFM_ITALIC | cf2.dwMask; - cf2.dwEffects = CFE_ITALIC ^ cf2.dwEffects; - SendMessage(hwndRichEdit, EM_SETSEL, 6, 20); - SendMessage(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf2); - - /* Haystack text, again */ - run_tests_EM_FINDTEXT(hwndRichEdit, "2-bis", find_tests2, - sizeof(find_tests2)/sizeof(struct find_s)); - - /* Yet another range */ - cf2.dwMask = CFM_BOLD | cf2.dwMask; - cf2.dwEffects = CFE_BOLD ^ cf2.dwEffects; - SendMessage(hwndRichEdit, EM_SETSEL, 11, 15); - SendMessage(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf2); - - /* Haystack text, again */ - run_tests_EM_FINDTEXT(hwndRichEdit, "2-bisbis", find_tests2, - sizeof(find_tests2)/sizeof(struct find_s)); - - DestroyWindow(hwndRichEdit); -} - -static const struct getline_s { - int line; - size_t buffer_len; - const char *text; -} gl[] = { - {0, 10, "foo bar\r"}, - {1, 10, "\r"}, - {2, 10, "bar\r"}, - {3, 10, "\r"}, - - /* Buffer smaller than line length */ - {0, 2, "foo bar\r"}, - {0, 1, "foo bar\r"}, - {0, 0, "foo bar\r"} -}; - -static void test_EM_GETLINE(void) -{ - int i; - HWND hwndRichEdit = new_richedit(NULL); - static const int nBuf = 1024; - char dest[1024], origdest[1024]; - const char text[] = "foo bar\n" - "\n" - "bar\n"; - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text); - - memset(origdest, 0xBB, nBuf); - for (i = 0; i < sizeof(gl)/sizeof(struct getline_s); i++) - { - int nCopied; - int expected_nCopied = min(gl[i].buffer_len, strlen(gl[i].text)); - int expected_bytes_written = min(gl[i].buffer_len, strlen(gl[i].text)); - memset(dest, 0xBB, nBuf); - *(WORD *) dest = gl[i].buffer_len; - - /* EM_GETLINE appends a "\r\0" to the end of the line - * nCopied counts up to and including the '\r' */ - nCopied = SendMessage(hwndRichEdit, EM_GETLINE, gl[i].line, (LPARAM) dest); - ok(nCopied == expected_nCopied, "%d: %d!=%d\n", i, nCopied, - expected_nCopied); - /* two special cases since a parameter is passed via dest */ - if (gl[i].buffer_len == 0) - ok(!dest[0] && !dest[1] && !strncmp(dest+2, origdest+2, nBuf-2), - "buffer_len=0\n"); - else if (gl[i].buffer_len == 1) - ok(dest[0] == gl[i].text[0] && !dest[1] && - !strncmp(dest+2, origdest+2, nBuf-2), "buffer_len=1\n"); - else - { - /* Prepare hex strings of buffers to dump on failure. */ - char expectedbuf[1024]; - char resultbuf[1024]; - int j; - resultbuf[0] = '\0'; - for (j = 0; j < 32; j++) - sprintf(resultbuf+strlen(resultbuf), "%02x", dest[j] & 0xFF); - expectedbuf[0] = '\0'; - for (j = 0; j < expected_bytes_written; j++) /* Written bytes */ - sprintf(expectedbuf+strlen(expectedbuf), "%02x", gl[i].text[j] & 0xFF); - for (; j < gl[i].buffer_len; j++) /* Ignored bytes */ - sprintf(expectedbuf+strlen(expectedbuf), "??"); - for (; j < 32; j++) /* Bytes after declared buffer size */ - sprintf(expectedbuf+strlen(expectedbuf), "%02x", origdest[j] & 0xFF); - - /* Test the part of the buffer that is expected to be written according - * to the MSDN documentation fo EM_GETLINE, which does not state that - * a NULL terminating character will be added unless no text is copied. - * - * Windows NT does not append a NULL terminating character, but - * Windows 2000 and up do append a NULL terminating character if there - * is space in the buffer. The test will ignore this difference. */ - ok(!strncmp(dest, gl[i].text, expected_bytes_written), - "%d: expected_bytes_written=%d\n" "expected=0x%s\n" "but got= 0x%s\n", - i, expected_bytes_written, expectedbuf, resultbuf); - /* Test the part of the buffer after the declared length to make sure - * there are no buffer overruns. */ - ok(!strncmp(dest + gl[i].buffer_len, origdest + gl[i].buffer_len, - nBuf - gl[i].buffer_len), - "%d: expected_bytes_written=%d\n" "expected=0x%s\n" "but got= 0x%s\n", - i, expected_bytes_written, expectedbuf, resultbuf); - } - } - - DestroyWindow(hwndRichEdit); -} - -static void test_EM_LINELENGTH(void) -{ - HWND hwndRichEdit = new_richedit(NULL); - const char * text = - "richedit1\r" - "richedit1\n" - "richedit1\r\n" - "richedit1"; - int offset_test[10][2] = { - {0, 9}, - {5, 9}, - {10, 9}, - {15, 9}, - {20, 9}, - {25, 9}, - {30, 9}, - {35, 9}, - {40, 0}, - {45, 0}, - }; - int i; - LRESULT result; - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text); - - for (i = 0; i < 10; i++) { - result = SendMessage(hwndRichEdit, EM_LINELENGTH, offset_test[i][0], 0); - ok(result == offset_test[i][1], "Length of line at offset %d is %ld, expected %d\n", - offset_test[i][0], result, offset_test[i][1]); - } - - DestroyWindow(hwndRichEdit); -} - -static int get_scroll_pos_y(HWND hwnd) -{ - POINT p = {-1, -1}; - SendMessage(hwnd, EM_GETSCROLLPOS, 0, (LPARAM) &p); - ok(p.x != -1 && p.y != -1, "p.x:%d p.y:%d\n", p.x, p.y); - return p.y; -} - -static void move_cursor(HWND hwnd, LONG charindex) -{ - CHARRANGE cr; - cr.cpMax = charindex; - cr.cpMin = charindex; - SendMessage(hwnd, EM_EXSETSEL, 0, (LPARAM) &cr); -} - -static void line_scroll(HWND hwnd, int amount) -{ - SendMessage(hwnd, EM_LINESCROLL, 0, amount); -} - -static void test_EM_SCROLLCARET(void) -{ - int prevY, curY; - const char text[] = "aa\n" - "this is a long line of text that should be longer than the " - "control's width\n" - "cc\n" - "dd\n" - "ee\n" - "ff\n" - "gg\n" - "hh\n"; - /* The richedit window height needs to be large enough vertically to fit in - * more than two lines of text, so the new_richedit function can't be used - * since a height of 60 was not large enough on some systems. - */ - HWND hwndRichEdit = CreateWindow(RICHEDIT_CLASS, NULL, - ES_MULTILINE|WS_POPUP|WS_HSCROLL|WS_VSCROLL|WS_VISIBLE, - 0, 0, 200, 80, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwndRichEdit != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); - - /* Can't verify this */ - SendMessage(hwndRichEdit, EM_SCROLLCARET, 0, 0); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text); - - /* Caret above visible window */ - line_scroll(hwndRichEdit, 3); - prevY = get_scroll_pos_y(hwndRichEdit); - SendMessage(hwndRichEdit, EM_SCROLLCARET, 0, 0); - curY = get_scroll_pos_y(hwndRichEdit); - ok(prevY != curY, "%d == %d\n", prevY, curY); - - /* Caret below visible window */ - move_cursor(hwndRichEdit, sizeof(text) - 1); - line_scroll(hwndRichEdit, -3); - prevY = get_scroll_pos_y(hwndRichEdit); - SendMessage(hwndRichEdit, EM_SCROLLCARET, 0, 0); - curY = get_scroll_pos_y(hwndRichEdit); - ok(prevY != curY, "%d == %d\n", prevY, curY); - - /* Caret in visible window */ - move_cursor(hwndRichEdit, sizeof(text) - 2); - prevY = get_scroll_pos_y(hwndRichEdit); - SendMessage(hwndRichEdit, EM_SCROLLCARET, 0, 0); - curY = get_scroll_pos_y(hwndRichEdit); - ok(prevY == curY, "%d != %d\n", prevY, curY); - - /* Caret still in visible window */ - line_scroll(hwndRichEdit, -1); - prevY = get_scroll_pos_y(hwndRichEdit); - SendMessage(hwndRichEdit, EM_SCROLLCARET, 0, 0); - curY = get_scroll_pos_y(hwndRichEdit); - ok(prevY == curY, "%d != %d\n", prevY, curY); - - DestroyWindow(hwndRichEdit); -} - -static void test_EM_POSFROMCHAR(void) -{ - HWND hwndRichEdit = new_richedit(NULL); - int i, expected; - LRESULT result; - unsigned int height = 0; - int xpos = 0; - POINTL pt; - LOCALESIGNATURE sig; - BOOL rtl; - static const char text[] = "aa\n" - "this is a long line of text that should be longer than the " - "control's width\n" - "cc\n" - "dd\n" - "ee\n" - "ff\n" - "gg\n" - "hh\n"; - - rtl = (GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_FONTSIGNATURE, - (LPSTR) &sig, sizeof(LOCALESIGNATURE)) && - (sig.lsUsb[3] & 0x08000000) != 0); - - /* Fill the control to lines to ensure that most of them are offscreen */ - for (i = 0; i < 50; i++) - { - /* Do not modify the string; it is exactly 16 characters long. */ - SendMessage(hwndRichEdit, EM_SETSEL, 0, 0); - SendMessage(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM)"0123456789ABCDE\n"); - } - - /* - Richedit 1.0 receives a POINTL* on wParam and character offset on lParam, returns void. - Richedit 2.0 receives character offset on wParam, ignores lParam, returns MAKELONG(x,y) - Richedit 3.0 accepts either of the above API conventions. - */ - - /* Testing Richedit 2.0 API format */ - - /* Testing start of lines. X-offset should be constant on all cases (native is 1). - Since all lines are identical and drawn with the same font, - they should have the same height... right? - */ - for (i = 0; i < 50; i++) - { - /* All the lines are 16 characters long */ - result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, i * 16, 0); - if (i == 0) - { - ok(HIWORD(result) == 0, "EM_POSFROMCHAR reports y=%d, expected 0\n", HIWORD(result)); - ok(LOWORD(result) == 1, "EM_POSFROMCHAR reports x=%d, expected 1\n", LOWORD(result)); - xpos = LOWORD(result); - } - else if (i == 1) - { - ok(HIWORD(result) > 0, "EM_POSFROMCHAR reports y=%d, expected > 0\n", HIWORD(result)); - ok(LOWORD(result) == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", LOWORD(result)); - height = HIWORD(result); - } - else - { - ok(HIWORD(result) == i * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", HIWORD(result), i * height); - ok(LOWORD(result) == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", LOWORD(result)); - } - } - - /* Testing position at end of text */ - result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, 50 * 16, 0); - ok(HIWORD(result) == 50 * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", HIWORD(result), 50 * height); - ok(LOWORD(result) == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", LOWORD(result)); - - /* Testing position way past end of text */ - result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, 55 * 16, 0); - ok(HIWORD(result) == 50 * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", HIWORD(result), 50 * height); - expected = (rtl ? 8 : 1); - ok(LOWORD(result) == expected, "EM_POSFROMCHAR reports x=%d, expected %d\n", LOWORD(result), expected); - - /* Testing that vertical scrolling does, in fact, have an effect on EM_POSFROMCHAR */ - SendMessage(hwndRichEdit, EM_SCROLL, SB_LINEDOWN, 0); /* line down */ - for (i = 0; i < 50; i++) - { - /* All the lines are 16 characters long */ - result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, i * 16, 0); - ok((signed short)(HIWORD(result)) == (i - 1) * height, - "EM_POSFROMCHAR reports y=%hd, expected %d\n", - (signed short)(HIWORD(result)), (i - 1) * height); - ok(LOWORD(result) == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", LOWORD(result)); - } - - /* Testing position at end of text */ - result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, 50 * 16, 0); - ok(HIWORD(result) == (50 - 1) * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", HIWORD(result), (50 - 1) * height); - ok(LOWORD(result) == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", LOWORD(result)); - - /* Testing position way past end of text */ - result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, 55 * 16, 0); - ok(HIWORD(result) == (50 - 1) * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", HIWORD(result), (50 - 1) * height); - expected = (rtl ? 8 : 1); - ok(LOWORD(result) == expected, "EM_POSFROMCHAR reports x=%d, expected %d\n", LOWORD(result), expected); - - /* Testing that horizontal scrolling does, in fact, have an effect on EM_POSFROMCHAR */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text); - SendMessage(hwndRichEdit, EM_SCROLL, SB_LINEUP, 0); /* line up */ - - result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, 0, 0); - ok(HIWORD(result) == 0, "EM_POSFROMCHAR reports y=%d, expected 0\n", HIWORD(result)); - ok(LOWORD(result) == 1, "EM_POSFROMCHAR reports x=%d, expected 1\n", LOWORD(result)); - xpos = LOWORD(result); - - SendMessage(hwndRichEdit, WM_HSCROLL, SB_LINERIGHT, 0); - result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, 0, 0); - ok(HIWORD(result) == 0, "EM_POSFROMCHAR reports y=%d, expected 0\n", HIWORD(result)); - ok((signed short)(LOWORD(result)) < xpos, - "EM_POSFROMCHAR reports x=%hd, expected value less than %d\n", - (signed short)(LOWORD(result)), xpos); - SendMessage(hwndRichEdit, WM_HSCROLL, SB_LINELEFT, 0); - - /* Test around end of text that doesn't end in a newline. */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) "12345678901234"); - SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pt, - SendMessage(hwndRichEdit, WM_GETTEXTLENGTH, 0, 0)-1); - ok(pt.x > 1, "pt.x = %d\n", pt.x); - xpos = pt.x; - SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pt, - SendMessage(hwndRichEdit, WM_GETTEXTLENGTH, 0, 0)); - ok(pt.x > xpos, "pt.x = %d\n", pt.x); - xpos = (rtl ? pt.x + 7 : pt.x); - SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pt, - SendMessage(hwndRichEdit, WM_GETTEXTLENGTH, 0, 0)+1); - ok(pt.x == xpos, "pt.x = %d\n", pt.x); - - /* Try a negative position. */ - SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pt, -1); - ok(pt.x == 1, "pt.x = %d\n", pt.x); - - DestroyWindow(hwndRichEdit); -} - -static void test_EM_SETCHARFORMAT(void) -{ - HWND hwndRichEdit = new_richedit(NULL); - CHARFORMAT2 cf2; - int rc = 0; - int tested_effects[] = { - CFE_BOLD, - CFE_ITALIC, - CFE_UNDERLINE, - CFE_STRIKEOUT, - CFE_PROTECTED, - CFE_LINK, - CFE_SUBSCRIPT, - CFE_SUPERSCRIPT, - 0 - }; - int i; - CHARRANGE cr; - LOCALESIGNATURE sig; - BOOL rtl; - - rtl = (GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_FONTSIGNATURE, - (LPSTR) &sig, sizeof(LOCALESIGNATURE)) && - (sig.lsUsb[3] & 0x08000000) != 0); - - /* Invalid flags, CHARFORMAT2 structure blanked out */ - memset(&cf2, 0, sizeof(cf2)); - rc = SendMessage(hwndRichEdit, EM_SETCHARFORMAT, (WPARAM) 0xfffffff0, - (LPARAM) &cf2); - ok(rc == 0, "EM_SETCHARFORMAT returned %d instead of 0\n", rc); - - /* A valid flag, CHARFORMAT2 structure blanked out */ - memset(&cf2, 0, sizeof(cf2)); - rc = SendMessage(hwndRichEdit, EM_SETCHARFORMAT, (WPARAM) SCF_DEFAULT, - (LPARAM) &cf2); - ok(rc == 0, "EM_SETCHARFORMAT returned %d instead of 0\n", rc); - - /* A valid flag, CHARFORMAT2 structure blanked out */ - memset(&cf2, 0, sizeof(cf2)); - rc = SendMessage(hwndRichEdit, EM_SETCHARFORMAT, (WPARAM) SCF_SELECTION, - (LPARAM) &cf2); - ok(rc == 0, "EM_SETCHARFORMAT returned %d instead of 0\n", rc); - - /* A valid flag, CHARFORMAT2 structure blanked out */ - memset(&cf2, 0, sizeof(cf2)); - rc = SendMessage(hwndRichEdit, EM_SETCHARFORMAT, (WPARAM) SCF_WORD, - (LPARAM) &cf2); - ok(rc == 0, "EM_SETCHARFORMAT returned %d instead of 0\n", rc); - - /* A valid flag, CHARFORMAT2 structure blanked out */ - memset(&cf2, 0, sizeof(cf2)); - rc = SendMessage(hwndRichEdit, EM_SETCHARFORMAT, (WPARAM) SCF_ALL, - (LPARAM) &cf2); - ok(rc == 0, "EM_SETCHARFORMAT returned %d instead of 0\n", rc); - - /* Invalid flags, CHARFORMAT2 structure minimally filled */ - memset(&cf2, 0, sizeof(cf2)); - cf2.cbSize = sizeof(CHARFORMAT2); - rc = SendMessage(hwndRichEdit, EM_SETCHARFORMAT, (WPARAM) 0xfffffff0, - (LPARAM) &cf2); - ok(rc == 1, "EM_SETCHARFORMAT returned %d instead of 1\n", rc); - rc = SendMessage(hwndRichEdit, EM_CANUNDO, 0, 0); - ok(rc == FALSE, "Should not be able to undo here.\n"); - SendMessage(hwndRichEdit, EM_EMPTYUNDOBUFFER, 0, 0); - - /* A valid flag, CHARFORMAT2 structure minimally filled */ - memset(&cf2, 0, sizeof(cf2)); - cf2.cbSize = sizeof(CHARFORMAT2); - rc = SendMessage(hwndRichEdit, EM_SETCHARFORMAT, (WPARAM) SCF_DEFAULT, - (LPARAM) &cf2); - ok(rc == 1, "EM_SETCHARFORMAT returned %d instead of 1\n", rc); - rc = SendMessage(hwndRichEdit, EM_CANUNDO, 0, 0); - ok(rc == FALSE, "Should not be able to undo here.\n"); - SendMessage(hwndRichEdit, EM_EMPTYUNDOBUFFER, 0, 0); - - /* A valid flag, CHARFORMAT2 structure minimally filled */ - memset(&cf2, 0, sizeof(cf2)); - cf2.cbSize = sizeof(CHARFORMAT2); - rc = SendMessage(hwndRichEdit, EM_SETCHARFORMAT, (WPARAM) SCF_SELECTION, - (LPARAM) &cf2); - ok(rc == 1, "EM_SETCHARFORMAT returned %d instead of 1\n", rc); - rc = SendMessage(hwndRichEdit, EM_CANUNDO, 0, 0); - ok(rc == FALSE, "Should not be able to undo here.\n"); - SendMessage(hwndRichEdit, EM_EMPTYUNDOBUFFER, 0, 0); - - /* A valid flag, CHARFORMAT2 structure minimally filled */ - memset(&cf2, 0, sizeof(cf2)); - cf2.cbSize = sizeof(CHARFORMAT2); - rc = SendMessage(hwndRichEdit, EM_SETCHARFORMAT, (WPARAM) SCF_WORD, - (LPARAM) &cf2); - ok(rc == 1, "EM_SETCHARFORMAT returned %d instead of 1\n", rc); - rc = SendMessage(hwndRichEdit, EM_CANUNDO, 0, 0); - todo_wine ok(rc == TRUE, "Should not be able to undo here.\n"); - SendMessage(hwndRichEdit, EM_EMPTYUNDOBUFFER, 0, 0); - - /* A valid flag, CHARFORMAT2 structure minimally filled */ - memset(&cf2, 0, sizeof(cf2)); - cf2.cbSize = sizeof(CHARFORMAT2); - rc = SendMessage(hwndRichEdit, EM_SETCHARFORMAT, (WPARAM) SCF_ALL, - (LPARAM) &cf2); - ok(rc == 1, "EM_SETCHARFORMAT returned %d instead of 1\n", rc); - rc = SendMessage(hwndRichEdit, EM_CANUNDO, 0, 0); - ok(rc == TRUE, "Should not be able to undo here.\n"); - SendMessage(hwndRichEdit, EM_EMPTYUNDOBUFFER, 0, 0); - - cf2.cbSize = sizeof(CHARFORMAT2); - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, (WPARAM) SCF_DEFAULT, - (LPARAM) &cf2); - - /* Test state of modify flag before and after valid EM_SETCHARFORMAT */ - cf2.cbSize = sizeof(CHARFORMAT2); - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, (WPARAM) SCF_DEFAULT, - (LPARAM) &cf2); - cf2.dwMask = CFM_ITALIC | cf2.dwMask; - cf2.dwEffects = CFE_ITALIC ^ cf2.dwEffects; - - /* wParam==0 is default char format, does not set modify */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - rc = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok(rc == 0, "Text marked as modified, expected not modified!\n"); - rc = SendMessage(hwndRichEdit, EM_SETCHARFORMAT, 0, (LPARAM) &cf2); - ok(rc == 1, "EM_SETCHARFORMAT returned %d instead of 1\n", rc); - if (! rtl) - { - rc = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok(rc == 0, "Text marked as modified, expected not modified!\n"); - } - else - skip("RTL language found\n"); - - /* wParam==SCF_SELECTION sets modify if nonempty selection */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - rc = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok(rc == 0, "Text marked as modified, expected not modified!\n"); - rc = SendMessage(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf2); - ok(rc == 1, "EM_SETCHARFORMAT returned %d instead of 1\n", rc); - rc = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok(rc == 0, "Text marked as modified, expected not modified!\n"); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"wine"); - rc = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok(rc == 0, "Text marked as modified, expected not modified!\n"); - rc = SendMessage(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf2); - ok(rc == 1, "EM_SETCHARFORMAT returned %d instead of 1\n", rc); - rc = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok(rc == 0, "Text marked as modified, expected not modified!\n"); - SendMessage(hwndRichEdit, EM_SETSEL, 0, 2); - rc = SendMessage(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf2); - ok(rc == 1, "EM_SETCHARFORMAT returned %d instead of 1\n", rc); - rc = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok(rc == -1, "Text not marked as modified, expected modified! (%d)\n", rc); - - /* wParam==SCF_ALL sets modify regardless of whether text is present */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - rc = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok(rc == 0, "Text marked as modified, expected not modified!\n"); - rc = SendMessage(hwndRichEdit, EM_SETCHARFORMAT, (WPARAM) SCF_ALL, (LPARAM) &cf2); - ok(rc == 1, "EM_SETCHARFORMAT returned %d instead of 1\n", rc); - rc = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok(rc == -1, "Text not marked as modified, expected modified! (%d)\n", rc); - - DestroyWindow(hwndRichEdit); - - /* EM_GETCHARFORMAT tests */ - for (i = 0; tested_effects[i]; i++) - { - hwndRichEdit = new_richedit(NULL); - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"wine"); - - /* Need to set a TrueType font to get consistent CFM_BOLD results */ - memset(&cf2, 0, sizeof(CHARFORMAT2)); - cf2.cbSize = sizeof(CHARFORMAT2); - cf2.dwMask = CFM_FACE|CFM_WEIGHT; - cf2.dwEffects = 0; - strcpy(cf2.szFaceName, "Courier New"); - cf2.wWeight = FW_DONTCARE; - SendMessage(hwndRichEdit, EM_SETCHARFORMAT, SCF_ALL, (LPARAM) &cf2); - - memset(&cf2, 0, sizeof(CHARFORMAT2)); - cf2.cbSize = sizeof(CHARFORMAT2); - SendMessage(hwndRichEdit, EM_SETSEL, 0, 4); - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf2); - ok ((((tested_effects[i] == CFE_SUBSCRIPT || tested_effects[i] == CFE_SUPERSCRIPT) && - (cf2.dwMask & CFM_SUPERSCRIPT) == CFM_SUPERSCRIPT) - || - (cf2.dwMask & tested_effects[i]) == tested_effects[i]), - "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n", i, cf2.dwMask, tested_effects[i]); - ok((cf2.dwEffects & tested_effects[i]) == 0, - "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x clear\n", i, cf2.dwEffects, tested_effects[i]); - - memset(&cf2, 0, sizeof(CHARFORMAT2)); - cf2.cbSize = sizeof(CHARFORMAT2); - cf2.dwMask = tested_effects[i]; - if (cf2.dwMask == CFE_SUBSCRIPT || cf2.dwMask == CFE_SUPERSCRIPT) - cf2.dwMask = CFM_SUPERSCRIPT; - cf2.dwEffects = tested_effects[i]; - SendMessage(hwndRichEdit, EM_SETSEL, 0, 2); - SendMessage(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf2); - - memset(&cf2, 0, sizeof(CHARFORMAT2)); - cf2.cbSize = sizeof(CHARFORMAT2); - SendMessage(hwndRichEdit, EM_SETSEL, 0, 2); - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf2); - ok ((((tested_effects[i] == CFE_SUBSCRIPT || tested_effects[i] == CFE_SUPERSCRIPT) && - (cf2.dwMask & CFM_SUPERSCRIPT) == CFM_SUPERSCRIPT) - || - (cf2.dwMask & tested_effects[i]) == tested_effects[i]), - "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n", i, cf2.dwMask, tested_effects[i]); - ok((cf2.dwEffects & tested_effects[i]) == tested_effects[i], - "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x\n", i, cf2.dwEffects, tested_effects[i]); - - memset(&cf2, 0, sizeof(CHARFORMAT2)); - cf2.cbSize = sizeof(CHARFORMAT2); - SendMessage(hwndRichEdit, EM_SETSEL, 2, 4); - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf2); - ok ((((tested_effects[i] == CFE_SUBSCRIPT || tested_effects[i] == CFE_SUPERSCRIPT) && - (cf2.dwMask & CFM_SUPERSCRIPT) == CFM_SUPERSCRIPT) - || - (cf2.dwMask & tested_effects[i]) == tested_effects[i]), - "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n", i, cf2.dwMask, tested_effects[i]); - ok((cf2.dwEffects & tested_effects[i]) == 0, - "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x clear\n", i, cf2.dwEffects, tested_effects[i]); - - memset(&cf2, 0, sizeof(CHARFORMAT2)); - cf2.cbSize = sizeof(CHARFORMAT2); - SendMessage(hwndRichEdit, EM_SETSEL, 1, 3); - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf2); - ok ((((tested_effects[i] == CFE_SUBSCRIPT || tested_effects[i] == CFE_SUPERSCRIPT) && - (cf2.dwMask & CFM_SUPERSCRIPT) == 0) - || - (cf2.dwMask & tested_effects[i]) == 0), - "%d, cf2.dwMask == 0x%08x expected mask 0x%08x clear\n", i, cf2.dwMask, tested_effects[i]); - - DestroyWindow(hwndRichEdit); - } - - for (i = 0; tested_effects[i]; i++) - { - hwndRichEdit = new_richedit(NULL); - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"wine"); - - /* Need to set a TrueType font to get consistent CFM_BOLD results */ - memset(&cf2, 0, sizeof(CHARFORMAT2)); - cf2.cbSize = sizeof(CHARFORMAT2); - cf2.dwMask = CFM_FACE|CFM_WEIGHT; - cf2.dwEffects = 0; - strcpy(cf2.szFaceName, "Courier New"); - cf2.wWeight = FW_DONTCARE; - SendMessage(hwndRichEdit, EM_SETCHARFORMAT, SCF_ALL, (LPARAM) &cf2); - - memset(&cf2, 0, sizeof(CHARFORMAT2)); - cf2.cbSize = sizeof(CHARFORMAT2); - cf2.dwMask = tested_effects[i]; - if (cf2.dwMask == CFE_SUBSCRIPT || cf2.dwMask == CFE_SUPERSCRIPT) - cf2.dwMask = CFM_SUPERSCRIPT; - cf2.dwEffects = tested_effects[i]; - SendMessage(hwndRichEdit, EM_SETSEL, 2, 4); - SendMessage(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf2); - - memset(&cf2, 0, sizeof(CHARFORMAT2)); - cf2.cbSize = sizeof(CHARFORMAT2); - SendMessage(hwndRichEdit, EM_SETSEL, 0, 2); - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf2); - ok ((((tested_effects[i] == CFE_SUBSCRIPT || tested_effects[i] == CFE_SUPERSCRIPT) && - (cf2.dwMask & CFM_SUPERSCRIPT) == CFM_SUPERSCRIPT) - || - (cf2.dwMask & tested_effects[i]) == tested_effects[i]), - "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n", i, cf2.dwMask, tested_effects[i]); - ok((cf2.dwEffects & tested_effects[i]) == 0, - "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x clear\n", i, cf2.dwEffects, tested_effects[i]); - - memset(&cf2, 0, sizeof(CHARFORMAT2)); - cf2.cbSize = sizeof(CHARFORMAT2); - SendMessage(hwndRichEdit, EM_SETSEL, 2, 4); - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf2); - ok ((((tested_effects[i] == CFE_SUBSCRIPT || tested_effects[i] == CFE_SUPERSCRIPT) && - (cf2.dwMask & CFM_SUPERSCRIPT) == CFM_SUPERSCRIPT) - || - (cf2.dwMask & tested_effects[i]) == tested_effects[i]), - "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n", i, cf2.dwMask, tested_effects[i]); - ok((cf2.dwEffects & tested_effects[i]) == tested_effects[i], - "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x\n", i, cf2.dwEffects, tested_effects[i]); - - memset(&cf2, 0, sizeof(CHARFORMAT2)); - cf2.cbSize = sizeof(CHARFORMAT2); - SendMessage(hwndRichEdit, EM_SETSEL, 1, 3); - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf2); - ok ((((tested_effects[i] == CFE_SUBSCRIPT || tested_effects[i] == CFE_SUPERSCRIPT) && - (cf2.dwMask & CFM_SUPERSCRIPT) == 0) - || - (cf2.dwMask & tested_effects[i]) == 0), - "%d, cf2.dwMask == 0x%08x expected mask 0x%08x clear\n", i, cf2.dwMask, tested_effects[i]); - ok((cf2.dwEffects & tested_effects[i]) == tested_effects[i], - "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x set\n", i, cf2.dwEffects, tested_effects[i]); - - DestroyWindow(hwndRichEdit); - } - - /* Effects applied on an empty selection should take effect when selection is - replaced with text */ - hwndRichEdit = new_richedit(NULL); - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"wine"); - SendMessage(hwndRichEdit, EM_SETSEL, 2, 2); /* Empty selection */ - - memset(&cf2, 0, sizeof(CHARFORMAT2)); - cf2.cbSize = sizeof(CHARFORMAT2); - cf2.dwMask = CFM_BOLD; - cf2.dwEffects = CFE_BOLD; - SendMessage(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf2); - - /* Selection is now nonempty */ - SendMessage(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM)"newi"); - - memset(&cf2, 0, sizeof(CHARFORMAT2)); - cf2.cbSize = sizeof(CHARFORMAT2); - SendMessage(hwndRichEdit, EM_SETSEL, 2, 6); - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf2); - - ok (((cf2.dwMask & CFM_BOLD) == CFM_BOLD), - "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n", i, cf2.dwMask, CFM_BOLD); - ok((cf2.dwEffects & CFE_BOLD) == CFE_BOLD, - "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x\n", i, cf2.dwEffects, CFE_BOLD); - - - /* Set two effects on an empty selection */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"wine"); - SendMessage(hwndRichEdit, EM_SETSEL, 2, 2); /* Empty selection */ - - memset(&cf2, 0, sizeof(CHARFORMAT2)); - cf2.cbSize = sizeof(CHARFORMAT2); - cf2.dwMask = CFM_BOLD; - cf2.dwEffects = CFE_BOLD; - SendMessage(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf2); - cf2.dwMask = CFM_ITALIC; - cf2.dwEffects = CFE_ITALIC; - SendMessage(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf2); - - /* Selection is now nonempty */ - SendMessage(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM)"newi"); - - memset(&cf2, 0, sizeof(CHARFORMAT2)); - cf2.cbSize = sizeof(CHARFORMAT2); - SendMessage(hwndRichEdit, EM_SETSEL, 2, 6); - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf2); - - ok (((cf2.dwMask & (CFM_BOLD|CFM_ITALIC)) == (CFM_BOLD|CFM_ITALIC)), - "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n", i, cf2.dwMask, (CFM_BOLD|CFM_ITALIC)); - ok((cf2.dwEffects & (CFE_BOLD|CFE_ITALIC)) == (CFE_BOLD|CFE_ITALIC), - "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x\n", i, cf2.dwEffects, (CFE_BOLD|CFE_ITALIC)); - - /* Setting the (empty) selection to exactly the same place as before should - NOT clear the insertion style! */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"wine"); - SendMessage(hwndRichEdit, EM_SETSEL, 2, 2); /* Empty selection */ - - memset(&cf2, 0, sizeof(CHARFORMAT2)); - cf2.cbSize = sizeof(CHARFORMAT2); - cf2.dwMask = CFM_BOLD; - cf2.dwEffects = CFE_BOLD; - SendMessage(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf2); - - /* Empty selection in same place, insert style should NOT be forgotten here. */ - SendMessage(hwndRichEdit, EM_SETSEL, 2, 2); - - /* Selection is now nonempty */ - SendMessage(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM)"newi"); - - memset(&cf2, 0, sizeof(CHARFORMAT2)); - cf2.cbSize = sizeof(CHARFORMAT2); - SendMessage(hwndRichEdit, EM_SETSEL, 2, 6); - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf2); - - ok (((cf2.dwMask & CFM_BOLD) == CFM_BOLD), - "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n", i, cf2.dwMask, CFM_BOLD); - ok((cf2.dwEffects & CFE_BOLD) == CFE_BOLD, - "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x\n", i, cf2.dwEffects, CFE_BOLD); - - /* Ditto with EM_EXSETSEL */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"wine"); - cr.cpMin = 2; cr.cpMax = 2; - SendMessage(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM)&cr); /* Empty selection */ - - memset(&cf2, 0, sizeof(CHARFORMAT2)); - cf2.cbSize = sizeof(CHARFORMAT2); - cf2.dwMask = CFM_BOLD; - cf2.dwEffects = CFE_BOLD; - SendMessage(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf2); - - /* Empty selection in same place, insert style should NOT be forgotten here. */ - cr.cpMin = 2; cr.cpMax = 2; - SendMessage(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM)&cr); /* Empty selection */ - - /* Selection is now nonempty */ - SendMessage(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM)"newi"); - - memset(&cf2, 0, sizeof(CHARFORMAT2)); - cf2.cbSize = sizeof(CHARFORMAT2); - cr.cpMin = 2; cr.cpMax = 6; - SendMessage(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM)&cr); /* Empty selection */ - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf2); - - ok (((cf2.dwMask & CFM_BOLD) == CFM_BOLD), - "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n", i, cf2.dwMask, CFM_BOLD); - ok((cf2.dwEffects & CFE_BOLD) == CFE_BOLD, - "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x\n", i, cf2.dwEffects, CFE_BOLD); - - DestroyWindow(hwndRichEdit); -} - -static void test_EM_SETTEXTMODE(void) -{ - HWND hwndRichEdit = new_richedit(NULL); - CHARFORMAT2 cf2, cf2test; - CHARRANGE cr; - int rc = 0; - - /*Attempt to use mutually exclusive modes*/ - rc = SendMessage(hwndRichEdit, EM_SETTEXTMODE, (WPARAM) TM_PLAINTEXT|TM_RICHTEXT, 0); - ok(rc == E_INVALIDARG, - "EM_SETTEXTMODE: using mutually exclusive mode flags - returned: %x\n", rc); - - /*Test that EM_SETTEXTMODE fails if text exists within the control*/ - /*Insert text into the control*/ - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) "wine"); - - /*Attempt to change the control to plain text mode*/ - rc = SendMessage(hwndRichEdit, EM_SETTEXTMODE, (WPARAM) TM_PLAINTEXT, 0); - ok(rc == E_UNEXPECTED, - "EM_SETTEXTMODE: changed text mode in control containing text - returned: %x\n", rc); - - /*Test that EM_SETTEXTMODE does not allow rich edit text to be pasted. - If rich text is pasted, it should have the same formatting as the rest - of the text in the control*/ - - /*Italicize the text - *NOTE: If the default text was already italicized, the test will simply - reverse; in other words, it will copy a regular "wine" into a plain - text window that uses an italicized format*/ - cf2.cbSize = sizeof(CHARFORMAT2); - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, (WPARAM) SCF_DEFAULT, - (LPARAM) &cf2); - - cf2.dwMask = CFM_ITALIC | cf2.dwMask; - cf2.dwEffects = CFE_ITALIC ^ cf2.dwEffects; - - rc = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok(rc == 0, "Text marked as modified, expected not modified!\n"); - - /*EM_SETCHARFORMAT is not yet fully implemented for all WPARAMs in wine; - however, SCF_ALL has been implemented*/ - rc = SendMessage(hwndRichEdit, EM_SETCHARFORMAT, (WPARAM) SCF_ALL, (LPARAM) &cf2); - ok(rc == 1, "EM_SETCHARFORMAT returned %d instead of 1\n", rc); - - rc = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok(rc == -1, "Text not marked as modified, expected modified! (%d)\n", rc); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) "wine"); - - /*Select the string "wine"*/ - cr.cpMin = 0; - cr.cpMax = 4; - SendMessage(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM) &cr); - - /*Copy the italicized "wine" to the clipboard*/ - SendMessage(hwndRichEdit, WM_COPY, 0, 0); - - /*Reset the formatting to default*/ - cf2.dwEffects = CFE_ITALIC^cf2.dwEffects; - rc = SendMessage(hwndRichEdit, EM_SETCHARFORMAT, (WPARAM) SCF_ALL, (LPARAM) &cf2); - ok(rc == 1, "EM_SETCHARFORMAT returned %d instead of 1\n", rc); - - /*Clear the text in the control*/ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) ""); - - /*Switch to Plain Text Mode*/ - rc = SendMessage(hwndRichEdit, EM_SETTEXTMODE, (WPARAM) TM_PLAINTEXT, 0); - ok(rc == 0, "EM_SETTEXTMODE: unable to switch to plain text mode with empty control: returned: %d\n", rc); - - /*Input "wine" again in normal format*/ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) "wine"); - - /*Paste the italicized "wine" into the control*/ - SendMessage(hwndRichEdit, WM_PASTE, 0, 0); - - /*Select a character from the first "wine" string*/ - cr.cpMin = 2; - cr.cpMax = 3; - SendMessage(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM) &cr); - - /*Retrieve its formatting*/ - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, (WPARAM) SCF_SELECTION, - (LPARAM) &cf2); - - /*Select a character from the second "wine" string*/ - cr.cpMin = 5; - cr.cpMax = 6; - SendMessage(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM) &cr); - - /*Retrieve its formatting*/ - cf2test.cbSize = sizeof(CHARFORMAT2); - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, (WPARAM) SCF_SELECTION, - (LPARAM) &cf2test); - - /*Compare the two formattings*/ - ok((cf2.dwMask == cf2test.dwMask) && (cf2.dwEffects == cf2test.dwEffects), - "two formats found in plain text mode - cf2.dwEffects: %x cf2test.dwEffects: %x\n", - cf2.dwEffects, cf2test.dwEffects); - /*Test TM_RICHTEXT by: switching back to Rich Text mode - printing "wine" in the current format(normal) - pasting "wine" from the clipboard(italicized) - comparing the two formats(should differ)*/ - - /*Attempt to switch with text in control*/ - rc = SendMessage(hwndRichEdit, EM_SETTEXTMODE, (WPARAM) TM_RICHTEXT, 0); - ok(rc != 0, "EM_SETTEXTMODE: changed from plain text to rich text with text in control - returned: %d\n", rc); - - /*Clear control*/ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) ""); - - /*Switch into Rich Text mode*/ - rc = SendMessage(hwndRichEdit, EM_SETTEXTMODE, (WPARAM) TM_RICHTEXT, 0); - ok(rc == 0, "EM_SETTEXTMODE: unable to change to rich text with empty control - returned: %d\n", rc); - - /*Print "wine" in normal formatting into the control*/ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) "wine"); - - /*Paste italicized "wine" into the control*/ - SendMessage(hwndRichEdit, WM_PASTE, 0, 0); - - /*Select text from the first "wine" string*/ - cr.cpMin = 1; - cr.cpMax = 3; - SendMessage(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM) &cr); - - /*Retrieve its formatting*/ - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, (WPARAM) SCF_SELECTION, - (LPARAM) &cf2); - - /*Select text from the second "wine" string*/ - cr.cpMin = 6; - cr.cpMax = 7; - SendMessage(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM) &cr); - - /*Retrieve its formatting*/ - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, (WPARAM) SCF_SELECTION, - (LPARAM) &cf2test); - - /*Test that the two formattings are not the same*/ - todo_wine ok((cf2.dwMask == cf2test.dwMask) && (cf2.dwEffects != cf2test.dwEffects), - "expected different formats - cf2.dwMask: %x, cf2test.dwMask: %x, cf2.dwEffects: %x, cf2test.dwEffects: %x\n", - cf2.dwMask, cf2test.dwMask, cf2.dwEffects, cf2test.dwEffects); - - DestroyWindow(hwndRichEdit); -} - -static void test_SETPARAFORMAT(void) -{ - HWND hwndRichEdit = new_richedit(NULL); - PARAFORMAT2 fmt; - HRESULT ret; - LONG expectedMask = PFM_ALL2 & ~PFM_TABLEROWDELIMITER; - fmt.cbSize = sizeof(PARAFORMAT2); - fmt.dwMask = PFM_ALIGNMENT; - fmt.wAlignment = PFA_LEFT; - - ret = SendMessage(hwndRichEdit, EM_SETPARAFORMAT, 0, (LPARAM) &fmt); - ok(ret != 0, "expected non-zero got %d\n", ret); - - fmt.cbSize = sizeof(PARAFORMAT2); - fmt.dwMask = -1; - ret = SendMessage(hwndRichEdit, EM_GETPARAFORMAT, 0, (LPARAM) &fmt); - /* Ignore the PFM_TABLEROWDELIMITER bit because it changes - * between richedit different native builds of riched20.dll - * used on different Windows versions. */ - ret &= ~PFM_TABLEROWDELIMITER; - fmt.dwMask &= ~PFM_TABLEROWDELIMITER; - - ok(ret == expectedMask, "expected %x got %x\n", expectedMask, ret); - ok(fmt.dwMask == expectedMask, "expected %x got %x\n", expectedMask, fmt.dwMask); - - DestroyWindow(hwndRichEdit); -} - -static void test_TM_PLAINTEXT(void) -{ - /*Tests plain text properties*/ - - HWND hwndRichEdit = new_richedit(NULL); - CHARFORMAT2 cf2, cf2test; - CHARRANGE cr; - int rc = 0; - - /*Switch to plain text mode*/ - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) ""); - SendMessage(hwndRichEdit, EM_SETTEXTMODE, TM_PLAINTEXT, 0); - - /*Fill control with text*/ - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) "Is Wine an emulator? No it's not"); - - /*Select some text and bold it*/ - - cr.cpMin = 10; - cr.cpMax = 20; - SendMessage(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM) &cr); - cf2.cbSize = sizeof(CHARFORMAT2); - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, SCF_DEFAULT, (LPARAM)&cf2); - - cf2.dwMask = CFM_BOLD | cf2.dwMask; - cf2.dwEffects = CFE_BOLD ^ cf2.dwEffects; - - rc = SendMessage(hwndRichEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); - ok(rc == 0, "EM_SETCHARFORMAT returned %d instead of 0\n", rc); - - rc = SendMessage(hwndRichEdit, EM_SETCHARFORMAT, SCF_WORD | SCF_SELECTION, (LPARAM)&cf2); - ok(rc == 0, "EM_SETCHARFORMAT returned %d instead of 0\n", rc); - - rc = SendMessage(hwndRichEdit, EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf2); - ok(rc == 1, "EM_SETCHARFORMAT returned %d instead of 1\n", rc); - - /*Get the formatting of those characters*/ - - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); - - /*Get the formatting of some other characters*/ - cf2test.cbSize = sizeof(CHARFORMAT2); - cr.cpMin = 21; - cr.cpMax = 30; - SendMessage(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM) &cr); - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2test); - - /*Test that they are the same as plain text allows only one formatting*/ - - ok((cf2.dwMask == cf2test.dwMask) && (cf2.dwEffects == cf2test.dwEffects), - "two selections' formats differ - cf2.dwMask: %x, cf2test.dwMask %x, cf2.dwEffects: %x, cf2test.dwEffects: %x\n", - cf2.dwMask, cf2test.dwMask, cf2.dwEffects, cf2test.dwEffects); - - /*Fill the control with a "wine" string, which when inserted will be bold*/ - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) "wine"); - - /*Copy the bolded "wine" string*/ - - cr.cpMin = 0; - cr.cpMax = 4; - SendMessage(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM) &cr); - SendMessage(hwndRichEdit, WM_COPY, 0, 0); - - /*Swap back to rich text*/ - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) ""); - SendMessage(hwndRichEdit, EM_SETTEXTMODE, TM_RICHTEXT, 0); - - /*Set the default formatting to bold italics*/ - - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, SCF_DEFAULT, (LPARAM)&cf2); - cf2.dwMask |= CFM_ITALIC; - cf2.dwEffects ^= CFE_ITALIC; - rc = SendMessage(hwndRichEdit, EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf2); - ok(rc == 1, "EM_SETCHARFORMAT returned %d instead of 1\n", rc); - - /*Set the text in the control to "wine", which will be bold and italicized*/ - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) "wine"); - - /*Paste the plain text "wine" string, which should take the insert - formatting, which at the moment is bold italics*/ - - SendMessage(hwndRichEdit, WM_PASTE, 0, 0); - - /*Select the first "wine" string and retrieve its formatting*/ - - cr.cpMin = 1; - cr.cpMax = 3; - SendMessage(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM) &cr); - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); - - /*Select the second "wine" string and retrieve its formatting*/ - - cr.cpMin = 5; - cr.cpMax = 7; - SendMessage(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM) &cr); - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2test); - - /*Compare the two formattings. They should be the same.*/ - - ok((cf2.dwMask == cf2test.dwMask) && (cf2.dwEffects == cf2test.dwEffects), - "Copied text retained formatting - cf2.dwMask: %x, cf2test.dwMask: %x, cf2.dwEffects: %x, cf2test.dwEffects: %x\n", - cf2.dwMask, cf2test.dwMask, cf2.dwEffects, cf2test.dwEffects); - DestroyWindow(hwndRichEdit); -} - -static void test_WM_GETTEXT(void) -{ - HWND hwndRichEdit = new_richedit(NULL); - static const char text[] = "Hello. My name is RichEdit!"; - static const char text2[] = "Hello. My name is RichEdit!\r"; - static const char text2_after[] = "Hello. My name is RichEdit!\r\n"; - char buffer[1024] = {0}; - int result; - - /* Baseline test with normal-sized buffer */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text); - result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok(result == lstrlen(buffer), - "WM_GETTEXT returned %d, expected %d\n", result, lstrlen(buffer)); - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - result = strcmp(buffer,text); - ok(result == 0, - "WM_GETTEXT: settext and gettext differ. strcmp: %d\n", result); - - /* Test for returned value of WM_GETTEXTLENGTH */ - result = SendMessage(hwndRichEdit, WM_GETTEXTLENGTH, 0, 0); - ok(result == lstrlen(text), - "WM_GETTEXTLENGTH reports incorrect length %d, expected %d\n", - result, lstrlen(text)); - - /* Test for behavior in overflow case */ - memset(buffer, 0, 1024); - result = SendMessage(hwndRichEdit, WM_GETTEXT, strlen(text), (LPARAM)buffer); - ok(result == 0 || - result == lstrlenA(text) - 1, /* XP, win2k3 */ - "WM_GETTEXT returned %d, expected 0 or %d\n", result, lstrlenA(text) - 1); - result = strcmp(buffer,text); - if (result) - result = strncmp(buffer, text, lstrlenA(text) - 1); /* XP, win2k3 */ - ok(result == 0, - "WM_GETTEXT: settext and gettext differ. strcmp: %d\n", result); - - /* Baseline test with normal-sized buffer and carriage return */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text2); - result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok(result == lstrlen(buffer), - "WM_GETTEXT returned %d, expected %d\n", result, lstrlen(buffer)); - result = strcmp(buffer,text2_after); - ok(result == 0, - "WM_GETTEXT: settext and gettext differ. strcmp: %d\n", result); - - /* Test for returned value of WM_GETTEXTLENGTH */ - result = SendMessage(hwndRichEdit, WM_GETTEXTLENGTH, 0, 0); - ok(result == lstrlen(text2_after), - "WM_GETTEXTLENGTH reports incorrect length %d, expected %d\n", - result, lstrlen(text2_after)); - - /* Test for behavior of CRLF conversion in case of overflow */ - memset(buffer, 0, 1024); - result = SendMessage(hwndRichEdit, WM_GETTEXT, strlen(text2), (LPARAM)buffer); - ok(result == 0 || - result == lstrlenA(text2) - 1, /* XP, win2k3 */ - "WM_GETTEXT returned %d, expected 0 or %d\n", result, lstrlenA(text2) - 1); - result = strcmp(buffer,text2); - if (result) - result = strncmp(buffer, text2, lstrlenA(text2) - 1); /* XP, win2k3 */ - ok(result == 0, - "WM_GETTEXT: settext and gettext differ. strcmp: %d\n", result); - - DestroyWindow(hwndRichEdit); -} - -static void test_EM_GETTEXTRANGE(void) -{ - HWND hwndRichEdit = new_richedit(NULL); - const char * text1 = "foo bar\r\nfoo bar"; - const char * text2 = "foo bar\rfoo bar"; - const char * expect = "bar\rfoo"; - char buffer[1024] = {0}; - LRESULT result; - TEXTRANGEA textRange; - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text1); - - textRange.lpstrText = buffer; - textRange.chrg.cpMin = 4; - textRange.chrg.cpMax = 11; - result = SendMessage(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == 7, "EM_GETTEXTRANGE returned %ld\n", result); - ok(!strcmp(expect, buffer), "EM_GETTEXTRANGE filled %s\n", buffer); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text2); - - textRange.lpstrText = buffer; - textRange.chrg.cpMin = 4; - textRange.chrg.cpMax = 11; - result = SendMessage(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == 7, "EM_GETTEXTRANGE returned %ld\n", result); - ok(!strcmp(expect, buffer), "EM_GETTEXTRANGE filled %s\n", buffer); - - /* cpMax of text length is used instead of -1 in this case */ - textRange.lpstrText = buffer; - textRange.chrg.cpMin = 0; - textRange.chrg.cpMax = -1; - result = SendMessage(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == strlen(text2), "EM_GETTEXTRANGE returned %ld\n", result); - ok(!strcmp(text2, buffer), "EM_GETTEXTRANGE filled %s\n", buffer); - - /* cpMin < 0 causes no text to be copied, and 0 to be returned */ - textRange.lpstrText = buffer; - textRange.chrg.cpMin = -1; - textRange.chrg.cpMax = 1; - result = SendMessage(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == 0, "EM_GETTEXTRANGE returned %ld\n", result); - ok(!strcmp(text2, buffer), "EM_GETTEXTRANGE filled %s\n", buffer); - - /* cpMax of -1 is not replaced with text length if cpMin != 0 */ - textRange.lpstrText = buffer; - textRange.chrg.cpMin = 1; - textRange.chrg.cpMax = -1; - result = SendMessage(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == 0, "EM_GETTEXTRANGE returned %ld\n", result); - ok(!strcmp(text2, buffer), "EM_GETTEXTRANGE filled %s\n", buffer); - - /* no end character is copied if cpMax - cpMin < 0 */ - textRange.lpstrText = buffer; - textRange.chrg.cpMin = 5; - textRange.chrg.cpMax = 5; - result = SendMessage(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == 0, "EM_GETTEXTRANGE returned %ld\n", result); - ok(!strcmp(text2, buffer), "EM_GETTEXTRANGE filled %s\n", buffer); - - /* cpMax of text length is used if cpMax > text length*/ - textRange.lpstrText = buffer; - textRange.chrg.cpMin = 0; - textRange.chrg.cpMax = 1000; - result = SendMessage(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == strlen(text2), "EM_GETTEXTRANGE returned %ld\n", result); - ok(!strcmp(text2, buffer), "EM_GETTEXTRANGE filled %s\n", buffer); - - DestroyWindow(hwndRichEdit); -} - -static void test_EM_GETSELTEXT(void) -{ - HWND hwndRichEdit = new_richedit(NULL); - const char * text1 = "foo bar\r\nfoo bar"; - const char * text2 = "foo bar\rfoo bar"; - const char * expect = "bar\rfoo"; - char buffer[1024] = {0}; - LRESULT result; - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text1); - - SendMessage(hwndRichEdit, EM_SETSEL, 4, 11); - result = SendMessage(hwndRichEdit, EM_GETSELTEXT, 0, (LPARAM)buffer); - ok(result == 7, "EM_GETTEXTRANGE returned %ld\n", result); - ok(!strcmp(expect, buffer), "EM_GETTEXTRANGE filled %s\n", buffer); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text2); - - SendMessage(hwndRichEdit, EM_SETSEL, 4, 11); - result = SendMessage(hwndRichEdit, EM_GETSELTEXT, 0, (LPARAM)buffer); - ok(result == 7, "EM_GETTEXTRANGE returned %ld\n", result); - ok(!strcmp(expect, buffer), "EM_GETTEXTRANGE filled %s\n", buffer); - - DestroyWindow(hwndRichEdit); -} - -/* FIXME: need to test unimplemented options and robustly test wparam */ -static void test_EM_SETOPTIONS(void) -{ - HWND hwndRichEdit; - static const char text[] = "Hello. My name is RichEdit!"; - char buffer[1024] = {0}; - DWORD dwStyle, options, oldOptions; - DWORD optionStyles = ES_AUTOVSCROLL|ES_AUTOHSCROLL|ES_NOHIDESEL| - ES_READONLY|ES_WANTRETURN|ES_SAVESEL| - ES_SELECTIONBAR|ES_VERTICAL; - - /* Test initial options. */ - hwndRichEdit = CreateWindow(RICHEDIT_CLASS, NULL, WS_POPUP, - 0, 0, 200, 60, NULL, NULL, - hmoduleRichEdit, NULL); - ok(hwndRichEdit != NULL, "class: %s, error: %d\n", - RICHEDIT_CLASS, (int) GetLastError()); - options = SendMessage(hwndRichEdit, EM_GETOPTIONS, 0, 0); - ok(options == 0, "Incorrect initial options %x\n", options); - DestroyWindow(hwndRichEdit); - - hwndRichEdit = CreateWindow(RICHEDIT_CLASS, NULL, - WS_POPUP|WS_HSCROLL|WS_VSCROLL|WS_VISIBLE, - 0, 0, 200, 60, NULL, NULL, - hmoduleRichEdit, NULL); - ok(hwndRichEdit != NULL, "class: %s, error: %d\n", - RICHEDIT_CLASS, (int) GetLastError()); - options = SendMessage(hwndRichEdit, EM_GETOPTIONS, 0, 0); - /* WS_[VH]SCROLL cause the ECO_AUTO[VH]SCROLL options to be set */ - ok(options == (ECO_AUTOVSCROLL|ECO_AUTOHSCROLL), - "Incorrect initial options %x\n", options); - - /* NEGATIVE TESTING - NO OPTIONS SET */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text); - SendMessage(hwndRichEdit, EM_SETOPTIONS, ECOOP_SET, 0); - - /* testing no readonly by sending 'a' to the control*/ - SendMessage(hwndRichEdit, WM_CHAR, 'a', 0x1E0001); - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok(buffer[0]=='a', - "EM_SETOPTIONS: Text not changed! s1:%s s2:%s\n", text, buffer); - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text); - - /* READONLY - sending 'a' to the control */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text); - SendMessage(hwndRichEdit, EM_SETOPTIONS, ECOOP_SET, ECO_READONLY); - SendMessage(hwndRichEdit, WM_CHAR, 'a', 0x1E0001); - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok(buffer[0]==text[0], - "EM_SETOPTIONS: Text changed! s1:%s s2:%s\n", text, buffer); - - /* EM_SETOPTIONS changes the window style, but changing the - * window style does not change the options. */ - dwStyle = GetWindowLong(hwndRichEdit, GWL_STYLE); - ok(dwStyle & ES_READONLY, "Readonly style not set by EM_SETOPTIONS\n"); - SetWindowLong(hwndRichEdit, GWL_STYLE, dwStyle & ~ES_READONLY); - options = SendMessage(hwndRichEdit, EM_GETOPTIONS, 0, 0); - ok(options & ES_READONLY, "Readonly option set by SetWindowLong\n"); - /* Confirm that the text is still read only. */ - SendMessage(hwndRichEdit, WM_CHAR, 'a', ('a' << 16) | 0x0001); - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok(buffer[0]==text[0], - "EM_SETOPTIONS: Text changed! s1:%s s2:%s\n", text, buffer); - - oldOptions = options; - SetWindowLong(hwndRichEdit, GWL_STYLE, dwStyle|optionStyles); - options = SendMessage(hwndRichEdit, EM_GETOPTIONS, 0, 0); - ok(options == oldOptions, - "Options set by SetWindowLong (%x -> %x)\n", oldOptions, options); - - DestroyWindow(hwndRichEdit); -} - -static int check_CFE_LINK_selection(HWND hwnd, int sel_start, int sel_end) -{ - CHARFORMAT2W text_format; - text_format.cbSize = sizeof(text_format); - SendMessage(hwnd, EM_SETSEL, sel_start, sel_end); - SendMessage(hwnd, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM) &text_format); - return (text_format.dwEffects & CFE_LINK) ? 1 : 0; -} - -static void check_CFE_LINK_rcvd(HWND hwnd, int is_url, const char * url) -{ - int link_present = 0; - - link_present = check_CFE_LINK_selection(hwnd, 0, 1); - if (is_url) - { /* control text is url; should get CFE_LINK */ - ok(0 != link_present, "URL Case: CFE_LINK not set for [%s].\n", url); - } - else - { - ok(0 == link_present, "Non-URL Case: CFE_LINK set for [%s].\n", url); - } -} - -static HWND new_static_wnd(HWND parent) { - return new_window("Static", 0, parent); -} - -static void test_EM_AUTOURLDETECT(void) -{ - /* DO NOT change the properties of the first two elements. To shorten the - tests, all tests after WM_SETTEXT test just the first two elements - - one non-URL and one URL */ - struct urls_s { - const char *text; - int is_url; - } urls[12] = { - {"winehq.org", 0}, - {"http://www.winehq.org", 1}, - {"http//winehq.org", 0}, - {"ww.winehq.org", 0}, - {"www.winehq.org", 1}, - {"ftp://192.168.1.1", 1}, - {"ftp//192.168.1.1", 0}, - {"mailto:your@email.com", 1}, - {"prospero:prosperoserver", 1}, - {"telnet:test", 1}, - {"news:newserver", 1}, - {"wais:waisserver", 1} - }; - - int i, j; - int urlRet=-1; - HWND hwndRichEdit, parent; - - /* All of the following should cause the URL to be detected */ - const char * templates_delim[] = { - "This is some text with X on it", - "This is some text with (X) on it", - "This is some text with X\r on it", - "This is some text with ---X--- on it", - "This is some text with \"X\" on it", - "This is some text with 'X' on it", - "This is some text with 'X' on it", - "This is some text with :X: on it", - - "This text ends with X", - - "This is some text with X) on it", - "This is some text with X--- on it", - "This is some text with X\" on it", - "This is some text with X' on it", - "This is some text with X: on it", - - "This is some text with (X on it", - "This is some text with \rX on it", - "This is some text with ---X on it", - "This is some text with \"X on it", - "This is some text with 'X on it", - "This is some text with :X on it", - }; - /* None of these should cause the URL to be detected */ - const char * templates_non_delim[] = { - "This is some text with |X| on it", - "This is some text with *X* on it", - "This is some text with /X/ on it", - "This is some text with +X+ on it", - "This is some text with %X% on it", - "This is some text with #X# on it", - "This is some text with @X@ on it", - "This is some text with \\X\\ on it", - "This is some text with |X on it", - "This is some text with *X on it", - "This is some text with /X on it", - "This is some text with +X on it", - "This is some text with %X on it", - "This is some text with #X on it", - "This is some text with @X on it", - "This is some text with \\X on it", - }; - /* All of these cause the URL detection to be extended by one more byte, - thus demonstrating that the tested character is considered as part - of the URL. */ - const char * templates_xten_delim[] = { - "This is some text with X| on it", - "This is some text with X* on it", - "This is some text with X/ on it", - "This is some text with X+ on it", - "This is some text with X% on it", - "This is some text with X# on it", - "This is some text with X@ on it", - "This is some text with X\\ on it", - }; - char buffer[1024]; - - parent = new_static_wnd(NULL); - hwndRichEdit = new_richedit(parent); - /* Try and pass EM_AUTOURLDETECT some test wParam values */ - urlRet=SendMessage(hwndRichEdit, EM_AUTOURLDETECT, FALSE, 0); - ok(urlRet==0, "Good wParam: urlRet is: %d\n", urlRet); - urlRet=SendMessage(hwndRichEdit, EM_AUTOURLDETECT, 1, 0); - ok(urlRet==0, "Good wParam2: urlRet is: %d\n", urlRet); - /* Windows returns -2147024809 (0x80070057) on bad wParam values */ - urlRet=SendMessage(hwndRichEdit, EM_AUTOURLDETECT, 8, 0); - ok(urlRet==E_INVALIDARG, "Bad wParam: urlRet is: %d\n", urlRet); - urlRet=SendMessage(hwndRichEdit, EM_AUTOURLDETECT, (WPARAM)"h", (LPARAM)"h"); - ok(urlRet==E_INVALIDARG, "Bad wParam2: urlRet is: %d\n", urlRet); - /* for each url, check the text to see if CFE_LINK effect is present */ - for (i = 0; i < sizeof(urls)/sizeof(struct urls_s); i++) { - - SendMessage(hwndRichEdit, EM_AUTOURLDETECT, FALSE, 0); - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) urls[i].text); - check_CFE_LINK_rcvd(hwndRichEdit, 0, urls[i].text); - - /* Link detection should happen immediately upon WM_SETTEXT */ - SendMessage(hwndRichEdit, EM_AUTOURLDETECT, TRUE, 0); - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) urls[i].text); - check_CFE_LINK_rcvd(hwndRichEdit, urls[i].is_url, urls[i].text); - } - DestroyWindow(hwndRichEdit); - - /* Test detection of URLs within normal text - WM_SETTEXT case. */ - for (i = 0; i < sizeof(urls)/sizeof(struct urls_s); i++) { - hwndRichEdit = new_richedit(parent); - - for (j = 0; j < sizeof(templates_delim) / sizeof(const char *); j++) { - char * at_pos; - int at_offset; - int end_offset; - - at_pos = strchr(templates_delim[j], 'X'); - at_offset = at_pos - templates_delim[j]; - strncpy(buffer, templates_delim[j], at_offset); - buffer[at_offset] = '\0'; - strcat(buffer, urls[i].text); - strcat(buffer, templates_delim[j] + at_offset + 1); - end_offset = at_offset + strlen(urls[i].text); - - SendMessage(hwndRichEdit, EM_AUTOURLDETECT, TRUE, 0); - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) buffer); - - /* This assumes no templates start with the URL itself, and that they - have at least two characters before the URL text */ - ok(!check_CFE_LINK_selection(hwndRichEdit, 0, 1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset -2, at_offset -1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset -1, at_offset), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset, buffer); - - if (urls[i].is_url) - { - ok(check_CFE_LINK_selection(hwndRichEdit, at_offset, at_offset +1), - "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1, buffer); - ok(check_CFE_LINK_selection(hwndRichEdit, end_offset -1, end_offset), - "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset, buffer); - } - else - { - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset, at_offset +1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset -1, end_offset), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset, buffer); - } - if (buffer[end_offset] != '\0') - { - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset, end_offset +1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1, buffer); - if (buffer[end_offset +1] != '\0') - { - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset +1, end_offset +2), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2, buffer); - } - } - } - - for (j = 0; j < sizeof(templates_non_delim) / sizeof(const char *); j++) { - char * at_pos; - int at_offset; - int end_offset; - - at_pos = strchr(templates_non_delim[j], 'X'); - at_offset = at_pos - templates_non_delim[j]; - strncpy(buffer, templates_non_delim[j], at_offset); - buffer[at_offset] = '\0'; - strcat(buffer, urls[i].text); - strcat(buffer, templates_non_delim[j] + at_offset + 1); - end_offset = at_offset + strlen(urls[i].text); - - SendMessage(hwndRichEdit, EM_AUTOURLDETECT, TRUE, 0); - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) buffer); - - /* This assumes no templates start with the URL itself, and that they - have at least two characters before the URL text */ - ok(!check_CFE_LINK_selection(hwndRichEdit, 0, 1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset -2, at_offset -1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset -1, at_offset), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset, buffer); - - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset, at_offset +1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset -1, end_offset), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset, buffer); - if (buffer[end_offset] != '\0') - { - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset, end_offset +1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1, buffer); - if (buffer[end_offset +1] != '\0') - { - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset +1, end_offset +2), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2, buffer); - } - } - } - - for (j = 0; j < sizeof(templates_xten_delim) / sizeof(const char *); j++) { - char * at_pos; - int at_offset; - int end_offset; - - at_pos = strchr(templates_xten_delim[j], 'X'); - at_offset = at_pos - templates_xten_delim[j]; - strncpy(buffer, templates_xten_delim[j], at_offset); - buffer[at_offset] = '\0'; - strcat(buffer, urls[i].text); - strcat(buffer, templates_xten_delim[j] + at_offset + 1); - end_offset = at_offset + strlen(urls[i].text); - - SendMessage(hwndRichEdit, EM_AUTOURLDETECT, TRUE, 0); - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) buffer); - - /* This assumes no templates start with the URL itself, and that they - have at least two characters before the URL text */ - ok(!check_CFE_LINK_selection(hwndRichEdit, 0, 1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset -2, at_offset -1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset -1, at_offset), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset, buffer); - - if (urls[i].is_url) - { - ok(check_CFE_LINK_selection(hwndRichEdit, at_offset, at_offset +1), - "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1, buffer); - ok(check_CFE_LINK_selection(hwndRichEdit, end_offset -1, end_offset), - "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset, buffer); - ok(check_CFE_LINK_selection(hwndRichEdit, end_offset, end_offset +1), - "CFE_LINK not set in (%d-%d), text: %s\n", end_offset, end_offset +1, buffer); - } - else - { - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset, at_offset +1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset -1, end_offset), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset, end_offset +1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset +1, buffer); - } - if (buffer[end_offset +1] != '\0') - { - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset +1, end_offset +2), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset + 2, buffer); - if (buffer[end_offset +2] != '\0') - { - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset +2, end_offset +3), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +2, end_offset +3, buffer); - } - } - } - - DestroyWindow(hwndRichEdit); - hwndRichEdit = NULL; - } - - /* Test detection of URLs within normal text - WM_CHAR case. */ - /* Test only the first two URL examples for brevity */ - for (i = 0; i < 2; i++) { - hwndRichEdit = new_richedit(parent); - - /* Also for brevity, test only the first three delimiters */ - for (j = 0; j < 3; j++) { - char * at_pos; - int at_offset; - int end_offset; - int u, v; - - at_pos = strchr(templates_delim[j], 'X'); - at_offset = at_pos - templates_delim[j]; - end_offset = at_offset + strlen(urls[i].text); - - SendMessage(hwndRichEdit, EM_AUTOURLDETECT, TRUE, 0); - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - for (u = 0; templates_delim[j][u]; u++) { - if (templates_delim[j][u] == '\r') { - simulate_typing_characters(hwndRichEdit, "\r"); - } else if (templates_delim[j][u] != 'X') { - SendMessage(hwndRichEdit, WM_CHAR, templates_delim[j][u], 1); - } else { - for (v = 0; urls[i].text[v]; v++) { - SendMessage(hwndRichEdit, WM_CHAR, urls[i].text[v], 1); - } - } - } - SendMessage(hwndRichEdit, WM_GETTEXT, sizeof(buffer), (LPARAM)buffer); - - /* This assumes no templates start with the URL itself, and that they - have at least two characters before the URL text */ - ok(!check_CFE_LINK_selection(hwndRichEdit, 0, 1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset -2, at_offset -1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset -1, at_offset), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset, buffer); - - if (urls[i].is_url) - { - ok(check_CFE_LINK_selection(hwndRichEdit, at_offset, at_offset +1), - "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1, buffer); - ok(check_CFE_LINK_selection(hwndRichEdit, end_offset -1, end_offset), - "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset, buffer); - } - else - { - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset, at_offset +1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset -1, end_offset), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset, buffer); - } - if (buffer[end_offset] != '\0') - { - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset, end_offset +1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1, buffer); - if (buffer[end_offset +1] != '\0') - { - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset +1, end_offset +2), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2, buffer); - } - } - - /* The following will insert a paragraph break after the first character - of the URL candidate, thus breaking the URL. It is expected that the - CFE_LINK attribute should break across both pieces of the URL */ - SendMessage(hwndRichEdit, EM_SETSEL, at_offset+1, at_offset+1); - simulate_typing_characters(hwndRichEdit, "\r"); - SendMessage(hwndRichEdit, WM_GETTEXT, sizeof(buffer), (LPARAM)buffer); - - ok(!check_CFE_LINK_selection(hwndRichEdit, 0, 1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset -2, at_offset -1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset -1, at_offset), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset, buffer); - - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset, at_offset +1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1, buffer); - /* end_offset moved because of paragraph break */ - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset -1, end_offset), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset+1, buffer); - ok(buffer[end_offset], "buffer \"%s\" ended prematurely. Is it missing a newline character?\n", buffer); - if (buffer[end_offset] != 0 && buffer[end_offset+1] != '\0') - { - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset+1, end_offset +2), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset+1, end_offset +2, buffer); - if (buffer[end_offset +2] != '\0') - { - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset +2, end_offset +3), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +2, end_offset +3, buffer); - } - } - - /* The following will remove the just-inserted paragraph break, thus - restoring the URL */ - SendMessage(hwndRichEdit, EM_SETSEL, at_offset+2, at_offset+2); - simulate_typing_characters(hwndRichEdit, "\b"); - SendMessage(hwndRichEdit, WM_GETTEXT, sizeof(buffer), (LPARAM)buffer); - - ok(!check_CFE_LINK_selection(hwndRichEdit, 0, 1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset -2, at_offset -1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset -1, at_offset), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset, buffer); - - if (urls[i].is_url) - { - ok(check_CFE_LINK_selection(hwndRichEdit, at_offset, at_offset +1), - "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1, buffer); - ok(check_CFE_LINK_selection(hwndRichEdit, end_offset -1, end_offset), - "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset, buffer); - } - else - { - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset, at_offset +1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset -1, end_offset), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset, buffer); - } - if (buffer[end_offset] != '\0') - { - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset, end_offset +1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1, buffer); - if (buffer[end_offset +1] != '\0') - { - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset +1, end_offset +2), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2, buffer); - } - } - } - DestroyWindow(hwndRichEdit); - hwndRichEdit = NULL; - } - - /* Test detection of URLs within normal text - EM_SETTEXTEX case. */ - /* Test just the first two URL examples for brevity */ - for (i = 0; i < 2; i++) { - SETTEXTEX st; - - hwndRichEdit = new_richedit(parent); - - /* There are at least three ways in which EM_SETTEXTEX must cause URLs to - be detected: - 1) Set entire text, a la WM_SETTEXT - 2) Set a selection of the text to the URL - 3) Set a portion of the text at a time, which eventually results in - an URL - All of them should give equivalent results - */ - - /* Set entire text in one go, like WM_SETTEXT */ - for (j = 0; j < sizeof(templates_delim) / sizeof(const char *); j++) { - char * at_pos; - int at_offset; - int end_offset; - - st.codepage = CP_ACP; - st.flags = ST_DEFAULT; - - at_pos = strchr(templates_delim[j], 'X'); - at_offset = at_pos - templates_delim[j]; - strncpy(buffer, templates_delim[j], at_offset); - buffer[at_offset] = '\0'; - strcat(buffer, urls[i].text); - strcat(buffer, templates_delim[j] + at_offset + 1); - end_offset = at_offset + strlen(urls[i].text); - - SendMessage(hwndRichEdit, EM_AUTOURLDETECT, TRUE, 0); - SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&st, (LPARAM) buffer); - - /* This assumes no templates start with the URL itself, and that they - have at least two characters before the URL text */ - ok(!check_CFE_LINK_selection(hwndRichEdit, 0, 1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset -2, at_offset -1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset -1, at_offset), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset, buffer); - - if (urls[i].is_url) - { - ok(check_CFE_LINK_selection(hwndRichEdit, at_offset, at_offset +1), - "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1, buffer); - ok(check_CFE_LINK_selection(hwndRichEdit, end_offset -1, end_offset), - "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset, buffer); - } - else - { - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset, at_offset +1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset -1, end_offset), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset, buffer); - } - if (buffer[end_offset] != '\0') - { - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset, end_offset +1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1, buffer); - if (buffer[end_offset +1] != '\0') - { - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset +1, end_offset +2), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2, buffer); - } - } - } - - /* Set selection with X to the URL */ - for (j = 0; j < sizeof(templates_delim) / sizeof(const char *); j++) { - char * at_pos; - int at_offset; - int end_offset; - - at_pos = strchr(templates_delim[j], 'X'); - at_offset = at_pos - templates_delim[j]; - end_offset = at_offset + strlen(urls[i].text); - - st.codepage = CP_ACP; - st.flags = ST_DEFAULT; - SendMessage(hwndRichEdit, EM_AUTOURLDETECT, TRUE, 0); - SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&st, (LPARAM) templates_delim[j]); - st.flags = ST_SELECTION; - SendMessage(hwndRichEdit, EM_SETSEL, at_offset, at_offset+1); - SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&st, (LPARAM) urls[i].text); - SendMessage(hwndRichEdit, WM_GETTEXT, sizeof(buffer), (LPARAM)buffer); - - /* This assumes no templates start with the URL itself, and that they - have at least two characters before the URL text */ - ok(!check_CFE_LINK_selection(hwndRichEdit, 0, 1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset -2, at_offset -1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset -1, at_offset), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset, buffer); - - if (urls[i].is_url) - { - ok(check_CFE_LINK_selection(hwndRichEdit, at_offset, at_offset +1), - "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1, buffer); - ok(check_CFE_LINK_selection(hwndRichEdit, end_offset -1, end_offset), - "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset, buffer); - } - else - { - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset, at_offset +1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset -1, end_offset), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset, buffer); - } - if (buffer[end_offset] != '\0') - { - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset, end_offset +1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1, buffer); - if (buffer[end_offset +1] != '\0') - { - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset +1, end_offset +2), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2, buffer); - } - } - } - - /* Set selection with X to the first character of the URL, then the rest */ - for (j = 0; j < sizeof(templates_delim) / sizeof(const char *); j++) { - char * at_pos; - int at_offset; - int end_offset; - - at_pos = strchr(templates_delim[j], 'X'); - at_offset = at_pos - templates_delim[j]; - end_offset = at_offset + strlen(urls[i].text); - - strcpy(buffer, "YY"); - buffer[0] = urls[i].text[0]; - - st.codepage = CP_ACP; - st.flags = ST_DEFAULT; - SendMessage(hwndRichEdit, EM_AUTOURLDETECT, TRUE, 0); - SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&st, (LPARAM) templates_delim[j]); - st.flags = ST_SELECTION; - SendMessage(hwndRichEdit, EM_SETSEL, at_offset, at_offset+1); - SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&st, (LPARAM) buffer); - SendMessage(hwndRichEdit, EM_SETSEL, at_offset+1, at_offset+2); - SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&st, (LPARAM)(urls[i].text + 1)); - SendMessage(hwndRichEdit, WM_GETTEXT, sizeof(buffer), (LPARAM)buffer); - - /* This assumes no templates start with the URL itself, and that they - have at least two characters before the URL text */ - ok(!check_CFE_LINK_selection(hwndRichEdit, 0, 1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset -2, at_offset -1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset -1, at_offset), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset, buffer); - - if (urls[i].is_url) - { - ok(check_CFE_LINK_selection(hwndRichEdit, at_offset, at_offset +1), - "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1, buffer); - ok(check_CFE_LINK_selection(hwndRichEdit, end_offset -1, end_offset), - "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset, buffer); - } - else - { - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset, at_offset +1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset -1, end_offset), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset, buffer); - } - if (buffer[end_offset] != '\0') - { - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset, end_offset +1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1, buffer); - if (buffer[end_offset +1] != '\0') - { - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset +1, end_offset +2), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2, buffer); - } - } - } - - DestroyWindow(hwndRichEdit); - hwndRichEdit = NULL; - } - - /* Test detection of URLs within normal text - EM_REPLACESEL case. */ - /* Test just the first two URL examples for brevity */ - for (i = 0; i < 2; i++) { - hwndRichEdit = new_richedit(parent); - - /* Set selection with X to the URL */ - for (j = 0; j < sizeof(templates_delim) / sizeof(const char *); j++) { - char * at_pos; - int at_offset; - int end_offset; - - at_pos = strchr(templates_delim[j], 'X'); - at_offset = at_pos - templates_delim[j]; - end_offset = at_offset + strlen(urls[i].text); - - SendMessage(hwndRichEdit, EM_AUTOURLDETECT, TRUE, 0); - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) templates_delim[j]); - SendMessage(hwndRichEdit, EM_SETSEL, at_offset, at_offset+1); - SendMessage(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM) urls[i].text); - SendMessage(hwndRichEdit, WM_GETTEXT, sizeof(buffer), (LPARAM)buffer); - - /* This assumes no templates start with the URL itself, and that they - have at least two characters before the URL text */ - ok(!check_CFE_LINK_selection(hwndRichEdit, 0, 1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset -2, at_offset -1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset -1, at_offset), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset, buffer); - - if (urls[i].is_url) - { - ok(check_CFE_LINK_selection(hwndRichEdit, at_offset, at_offset +1), - "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1, buffer); - ok(check_CFE_LINK_selection(hwndRichEdit, end_offset -1, end_offset), - "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset, buffer); - } - else - { - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset, at_offset +1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset -1, end_offset), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset, buffer); - } - if (buffer[end_offset] != '\0') - { - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset, end_offset +1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1, buffer); - if (buffer[end_offset +1] != '\0') - { - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset +1, end_offset +2), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2, buffer); - } - } - } - - /* Set selection with X to the first character of the URL, then the rest */ - for (j = 0; j < sizeof(templates_delim) / sizeof(const char *); j++) { - char * at_pos; - int at_offset; - int end_offset; - - at_pos = strchr(templates_delim[j], 'X'); - at_offset = at_pos - templates_delim[j]; - end_offset = at_offset + strlen(urls[i].text); - - strcpy(buffer, "YY"); - buffer[0] = urls[i].text[0]; - - SendMessage(hwndRichEdit, EM_AUTOURLDETECT, TRUE, 0); - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) templates_delim[j]); - SendMessage(hwndRichEdit, EM_SETSEL, at_offset, at_offset+1); - SendMessage(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM) buffer); - SendMessage(hwndRichEdit, EM_SETSEL, at_offset+1, at_offset+2); - SendMessage(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM)(urls[i].text + 1)); - SendMessage(hwndRichEdit, WM_GETTEXT, sizeof(buffer), (LPARAM)buffer); - - /* This assumes no templates start with the URL itself, and that they - have at least two characters before the URL text */ - ok(!check_CFE_LINK_selection(hwndRichEdit, 0, 1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", 0, 1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset -2, at_offset -1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -2, at_offset -1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset -1, at_offset), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset -1, at_offset, buffer); - - if (urls[i].is_url) - { - ok(check_CFE_LINK_selection(hwndRichEdit, at_offset, at_offset +1), - "CFE_LINK not set in (%d-%d), text: %s\n", at_offset, at_offset +1, buffer); - ok(check_CFE_LINK_selection(hwndRichEdit, end_offset -1, end_offset), - "CFE_LINK not set in (%d-%d), text: %s\n", end_offset -1, end_offset, buffer); - } - else - { - ok(!check_CFE_LINK_selection(hwndRichEdit, at_offset, at_offset +1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", at_offset, at_offset + 1, buffer); - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset -1, end_offset), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset -1, end_offset, buffer); - } - if (buffer[end_offset] != '\0') - { - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset, end_offset +1), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset, end_offset + 1, buffer); - if (buffer[end_offset +1] != '\0') - { - ok(!check_CFE_LINK_selection(hwndRichEdit, end_offset +1, end_offset +2), - "CFE_LINK incorrectly set in (%d-%d), text: %s\n", end_offset +1, end_offset +2, buffer); - } - } - } - - DestroyWindow(hwndRichEdit); - hwndRichEdit = NULL; - } - - DestroyWindow(parent); -} - -static void test_EM_SCROLL(void) -{ - int i, j; - int r; /* return value */ - int expr; /* expected return value */ - HWND hwndRichEdit = new_richedit(NULL); - int y_before, y_after; /* units of lines of text */ - - /* test a richedit box containing a single line of text */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) "a");/* one line of text */ - expr = 0x00010000; - for (i = 0; i < 4; i++) { - static const int cmd[4] = { SB_PAGEDOWN, SB_PAGEUP, SB_LINEDOWN, SB_LINEUP }; - - r = SendMessage(hwndRichEdit, EM_SCROLL, cmd[i], 0); - y_after = SendMessage(hwndRichEdit, EM_GETFIRSTVISIBLELINE, 0, 0); - ok(expr == r, "EM_SCROLL improper return value returned (i == %d). " - "Got 0x%08x, expected 0x%08x\n", i, r, expr); - ok(y_after == 0, "EM_SCROLL improper scroll. scrolled to line %d, not 1 " - "(i == %d)\n", y_after, i); - } - - /* - * test a richedit box that will scroll. There are two general - * cases: the case without any long lines and the case with a long - * line. - */ - for (i = 0; i < 2; i++) { /* iterate through different bodies of text */ - if (i == 0) - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) "a\nb\nc\nd\ne"); - else - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) - "a LONG LINE LONG LINE LONG LINE LONG LINE LONG LINE " - "LONG LINE LONG LINE LONG LINE LONG LINE LONG LINE " - "LONG LINE \nb\nc\nd\ne"); - for (j = 0; j < 12; j++) /* reset scroll position to top */ - SendMessage(hwndRichEdit, EM_SCROLL, SB_PAGEUP, 0); - - /* get first visible line */ - y_before = SendMessage(hwndRichEdit, EM_GETFIRSTVISIBLELINE, 0, 0); - r = SendMessage(hwndRichEdit, EM_SCROLL, SB_PAGEDOWN, 0); /* page down */ - - /* get new current first visible line */ - y_after = SendMessage(hwndRichEdit, EM_GETFIRSTVISIBLELINE, 0, 0); - - ok(((r & 0xffffff00) == 0x00010000) && - ((r & 0x000000ff) != 0x00000000), - "EM_SCROLL page down didn't scroll by a small positive number of " - "lines (r == 0x%08x)\n", r); - ok(y_after > y_before, "EM_SCROLL page down not functioning " - "(line %d scrolled to line %d\n", y_before, y_after); - - y_before = y_after; - - r = SendMessage(hwndRichEdit, EM_SCROLL, SB_PAGEUP, 0); /* page up */ - y_after = SendMessage(hwndRichEdit, EM_GETFIRSTVISIBLELINE, 0, 0); - ok(((r & 0xffffff00) == 0x0001ff00), - "EM_SCROLL page up didn't scroll by a small negative number of lines " - "(r == 0x%08x)\n", r); - ok(y_after < y_before, "EM_SCROLL page up not functioning (line " - "%d scrolled to line %d\n", y_before, y_after); - - y_before = y_after; - - r = SendMessage(hwndRichEdit, EM_SCROLL, SB_LINEDOWN, 0); /* line down */ - - y_after = SendMessage(hwndRichEdit, EM_GETFIRSTVISIBLELINE, 0, 0); - - ok(r == 0x00010001, "EM_SCROLL line down didn't scroll by one line " - "(r == 0x%08x)\n", r); - ok(y_after -1 == y_before, "EM_SCROLL line down didn't go down by " - "1 line (%d scrolled to %d)\n", y_before, y_after); - - y_before = y_after; - - r = SendMessage(hwndRichEdit, EM_SCROLL, SB_LINEUP, 0); /* line up */ - - y_after = SendMessage(hwndRichEdit, EM_GETFIRSTVISIBLELINE, 0, 0); - - ok(r == 0x0001ffff, "EM_SCROLL line up didn't scroll by one line " - "(r == 0x%08x)\n", r); - ok(y_after +1 == y_before, "EM_SCROLL line up didn't go up by 1 " - "line (%d scrolled to %d)\n", y_before, y_after); - - y_before = y_after; - - r = SendMessage(hwndRichEdit, EM_SCROLL, - SB_LINEUP, 0); /* lineup beyond top */ - - y_after = SendMessage(hwndRichEdit, EM_GETFIRSTVISIBLELINE, 0, 0); - - ok(r == 0x00010000, - "EM_SCROLL line up returned indicating movement (0x%08x)\n", r); - ok(y_before == y_after, - "EM_SCROLL line up beyond top worked (%d)\n", y_after); - - y_before = y_after; - - r = SendMessage(hwndRichEdit, EM_SCROLL, - SB_PAGEUP, 0);/*page up beyond top */ - - y_after = SendMessage(hwndRichEdit, EM_GETFIRSTVISIBLELINE, 0, 0); - - ok(r == 0x00010000, - "EM_SCROLL page up returned indicating movement (0x%08x)\n", r); - ok(y_before == y_after, - "EM_SCROLL page up beyond top worked (%d)\n", y_after); - - for (j = 0; j < 12; j++) /* page down all the way to the bottom */ - SendMessage(hwndRichEdit, EM_SCROLL, SB_PAGEDOWN, 0); - y_before = SendMessage(hwndRichEdit, EM_GETFIRSTVISIBLELINE, 0, 0); - r = SendMessage(hwndRichEdit, EM_SCROLL, - SB_PAGEDOWN, 0); /* page down beyond bot */ - y_after = SendMessage(hwndRichEdit, EM_GETFIRSTVISIBLELINE, 0, 0); - - ok(r == 0x00010000, - "EM_SCROLL page down returned indicating movement (0x%08x)\n", r); - ok(y_before == y_after, - "EM_SCROLL page down beyond bottom worked (%d -> %d)\n", - y_before, y_after); - - y_before = SendMessage(hwndRichEdit, EM_GETFIRSTVISIBLELINE, 0, 0); - SendMessage(hwndRichEdit, EM_SCROLL, - SB_LINEDOWN, 0); /* line down beyond bot */ - y_after = SendMessage(hwndRichEdit, EM_GETFIRSTVISIBLELINE, 0, 0); - - ok(r == 0x00010000, - "EM_SCROLL line down returned indicating movement (0x%08x)\n", r); - ok(y_before == y_after, - "EM_SCROLL line down beyond bottom worked (%d -> %d)\n", - y_before, y_after); - } - DestroyWindow(hwndRichEdit); -} - -static unsigned int recursionLevel = 0; -static unsigned int WM_SIZE_recursionLevel = 0; -static BOOL bailedOutOfRecursion = FALSE; -static LRESULT (WINAPI *richeditProc)(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); - -static LRESULT WINAPI RicheditStupidOverrideProcA(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - LRESULT r; - - if (bailedOutOfRecursion) return 0; - if (recursionLevel >= 32) { - bailedOutOfRecursion = TRUE; - return 0; - } - - recursionLevel++; - switch (message) { - case WM_SIZE: - WM_SIZE_recursionLevel++; - r = richeditProc(hwnd, message, wParam, lParam); - /* Because, uhhhh... I never heard of ES_DISABLENOSCROLL */ - ShowScrollBar(hwnd, SB_VERT, TRUE); - WM_SIZE_recursionLevel--; - break; - default: - r = richeditProc(hwnd, message, wParam, lParam); - break; - } - recursionLevel--; - return r; -} - -static void test_scrollbar_visibility(void) -{ - HWND hwndRichEdit; - const char * text="a\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\n"; - SCROLLINFO si; - WNDCLASSA cls; - BOOL r; - - /* These tests show that richedit should temporarily refrain from automatically - hiding or showing its scrollbars (vertical at least) when an explicit request - is made via ShowScrollBar() or similar, outside of standard richedit logic. - Some applications depend on forced showing (when otherwise richedit would - hide the vertical scrollbar) and are thrown on an endless recursive loop - if richedit auto-hides the scrollbar again. Apparently they never heard of - the ES_DISABLENOSCROLL style... */ - - hwndRichEdit = new_richedit(NULL); - - /* Test default scrollbar visibility behavior */ - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), - "Vertical scrollbar is visible, should be invisible.\n"); - ok(si.nPage == 0 && si.nMin == 0 && (si.nMax == 0 || si.nMax == 100), - "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n", - si.nPage, si.nMin, si.nMax); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), - "Vertical scrollbar is visible, should be invisible.\n"); - ok(si.nPage == 0 && si.nMin == 0 && (si.nMax == 0 || si.nMax == 100), - "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n", - si.nPage, si.nMin, si.nMax); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, - "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", - si.nPage, si.nMin, si.nMax); - - /* Oddly, setting text to NULL does *not* reset the scrollbar range, - even though it hides the scrollbar */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), - "Vertical scrollbar is visible, should be invisible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, - "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", - si.nPage, si.nMin, si.nMax); - - /* Setting non-scrolling text again does *not* reset scrollbar range */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a"); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), - "Vertical scrollbar is visible, should be invisible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, - "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", - si.nPage, si.nMin, si.nMax); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), - "Vertical scrollbar is visible, should be invisible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, - "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", - si.nPage, si.nMin, si.nMax); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a"); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), - "Vertical scrollbar is visible, should be invisible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, - "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", - si.nPage, si.nMin, si.nMax); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)""); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), - "Vertical scrollbar is visible, should be invisible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, - "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", - si.nPage, si.nMin, si.nMax); - - DestroyWindow(hwndRichEdit); - - /* Test again, with ES_DISABLENOSCROLL style */ - hwndRichEdit = new_window(RICHEDIT_CLASS, ES_MULTILINE|ES_DISABLENOSCROLL, NULL); - - /* Test default scrollbar visibility behavior */ - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 1, - "reported page/range is %d (%d..%d) expected 0 (0..1)\n", - si.nPage, si.nMin, si.nMax); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 1, - "reported page/range is %d (%d..%d) expected 0 (0..1)\n", - si.nPage, si.nMin, si.nMax); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax > 1, - "reported page/range is %d (%d..%d)\n", - si.nPage, si.nMin, si.nMax); - - /* Oddly, setting text to NULL does *not* reset the scrollbar range */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax > 1, - "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", - si.nPage, si.nMin, si.nMax); - - /* Setting non-scrolling text again does *not* reset scrollbar range */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a"); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax > 1, - "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", - si.nPage, si.nMin, si.nMax); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax > 1, - "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", - si.nPage, si.nMin, si.nMax); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a"); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax > 1, - "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", - si.nPage, si.nMin, si.nMax); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)""); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax > 1, - "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", - si.nPage, si.nMin, si.nMax); - - DestroyWindow(hwndRichEdit); - - /* Test behavior with explicit visibility request, using ShowScrollBar() */ - hwndRichEdit = new_richedit(NULL); - - /* Previously failed because builtin incorrectly re-hides scrollbar forced visible */ - ShowScrollBar(hwndRichEdit, SB_VERT, TRUE); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - todo_wine { - ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 100, - "reported page/range is %d (%d..%d) expected 0 (0..100)\n", - si.nPage, si.nMin, si.nMax); - } - - /* Ditto, see above */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - todo_wine { - ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 100, - "reported page/range is %d (%d..%d) expected 0 (0..100)\n", - si.nPage, si.nMin, si.nMax); - } - - /* Ditto, see above */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a"); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - todo_wine { - ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 100, - "reported page/range is %d (%d..%d) expected 0 (0..100)\n", - si.nPage, si.nMin, si.nMax); - } - - /* Ditto, see above */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a\na"); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - todo_wine { - ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 100, - "reported page/range is %d (%d..%d) expected 0 (0..100)\n", - si.nPage, si.nMin, si.nMax); - } - - /* Ditto, see above */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - todo_wine { - ok(si.nPage == 0 && si.nMin == 0 && si.nMax == 100, - "reported page/range is %d (%d..%d) expected 0 (0..100)\n", - si.nPage, si.nMin, si.nMax); - } - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text); - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), - "Vertical scrollbar is visible, should be invisible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, - "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", - si.nPage, si.nMin, si.nMax); - - DestroyWindow(hwndRichEdit); - - hwndRichEdit = new_richedit(NULL); - - ShowScrollBar(hwndRichEdit, SB_VERT, FALSE); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), - "Vertical scrollbar is visible, should be invisible.\n"); - ok(si.nPage == 0 && si.nMin == 0 && (si.nMax == 0 || si.nMax == 100), - "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n", - si.nPage, si.nMin, si.nMax); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), - "Vertical scrollbar is visible, should be invisible.\n"); - ok(si.nPage == 0 && si.nMin == 0 && (si.nMax == 0 || si.nMax == 100), - "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n", - si.nPage, si.nMin, si.nMax); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a"); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), - "Vertical scrollbar is visible, should be invisible.\n"); - ok(si.nPage == 0 && si.nMin == 0 && (si.nMax == 0 || si.nMax == 100), - "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n", - si.nPage, si.nMin, si.nMax); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), - "Vertical scrollbar is visible, should be invisible.\n"); - ok(si.nPage == 0 && si.nMin == 0 && (si.nMax == 0 || si.nMax == 100), - "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n", - si.nPage, si.nMin, si.nMax); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, - "reported page/range is %d (%d..%d)\n", - si.nPage, si.nMin, si.nMax); - - /* Previously, builtin incorrectly re-shows explicitly hidden scrollbar */ - ShowScrollBar(hwndRichEdit, SB_VERT, FALSE); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), - "Vertical scrollbar is visible, should be invisible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, - "reported page/range is %d (%d..%d)\n", - si.nPage, si.nMin, si.nMax); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), - "Vertical scrollbar is visible, should be invisible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, - "reported page/range is %d (%d..%d)\n", - si.nPage, si.nMin, si.nMax); - - /* Testing effect of EM_SCROLL on scrollbar visibility. It seems that - EM_SCROLL will make visible any forcefully invisible scrollbar */ - SendMessage(hwndRichEdit, EM_SCROLL, SB_LINEDOWN, 0); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, - "reported page/range is %d (%d..%d)\n", - si.nPage, si.nMin, si.nMax); - - ShowScrollBar(hwndRichEdit, SB_VERT, FALSE); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), - "Vertical scrollbar is visible, should be invisible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, - "reported page/range is %d (%d..%d)\n", - si.nPage, si.nMin, si.nMax); - - /* Again, EM_SCROLL, with SB_LINEUP */ - SendMessage(hwndRichEdit, EM_SCROLL, SB_LINEUP, 0); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, - "reported page/range is %d (%d..%d)\n", - si.nPage, si.nMin, si.nMax); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), - "Vertical scrollbar is visible, should be invisible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, - "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", - si.nPage, si.nMin, si.nMax); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, - "reported page/range is %d (%d..%d)\n", - si.nPage, si.nMin, si.nMax); - - DestroyWindow(hwndRichEdit); - - - /* Test behavior with explicit visibility request, using SetWindowLong()() */ - hwndRichEdit = new_richedit(NULL); - -#define ENABLE_WS_VSCROLL(hwnd) \ - SetWindowLongA(hwnd, GWL_STYLE, GetWindowLongA(hwnd, GWL_STYLE) | WS_VSCROLL) -#define DISABLE_WS_VSCROLL(hwnd) \ - SetWindowLongA(hwnd, GWL_STYLE, GetWindowLongA(hwnd, GWL_STYLE) & ~WS_VSCROLL) - - /* Previously failed because builtin incorrectly re-hides scrollbar forced visible */ - ENABLE_WS_VSCROLL(hwndRichEdit); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - ok(si.nPage == 0 && si.nMin == 0 && (si.nMax == 0 || si.nMax == 100), - "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n", - si.nPage, si.nMin, si.nMax); - - /* Ditto, see above */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - ok(si.nPage == 0 && si.nMin == 0 && (si.nMax == 0 || si.nMax == 100), - "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n", - si.nPage, si.nMin, si.nMax); - - /* Ditto, see above */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a"); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - ok(si.nPage == 0 && si.nMin == 0 && (si.nMax == 0 || si.nMax == 100), - "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n", - si.nPage, si.nMin, si.nMax); - - /* Ditto, see above */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a\na"); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - ok(si.nPage == 0 && si.nMin == 0 && (si.nMax == 0 || si.nMax == 100), - "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n", - si.nPage, si.nMin, si.nMax); - - /* Ditto, see above */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - ok(si.nPage == 0 && si.nMin == 0 && (si.nMax == 0 || si.nMax == 100), - "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n", - si.nPage, si.nMin, si.nMax); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text); - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), - "Vertical scrollbar is visible, should be invisible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, - "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", - si.nPage, si.nMin, si.nMax); - - DestroyWindow(hwndRichEdit); - - hwndRichEdit = new_richedit(NULL); - - DISABLE_WS_VSCROLL(hwndRichEdit); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), - "Vertical scrollbar is visible, should be invisible.\n"); - ok(si.nPage == 0 && si.nMin == 0 && (si.nMax == 0 || si.nMax == 100), - "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n", - si.nPage, si.nMin, si.nMax); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), - "Vertical scrollbar is visible, should be invisible.\n"); - ok(si.nPage == 0 && si.nMin == 0 && (si.nMax == 0 || si.nMax == 100), - "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n", - si.nPage, si.nMin, si.nMax); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a"); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), - "Vertical scrollbar is visible, should be invisible.\n"); - ok(si.nPage == 0 && si.nMin == 0 && (si.nMax == 0 || si.nMax == 100), - "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n", - si.nPage, si.nMin, si.nMax); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), - "Vertical scrollbar is visible, should be invisible.\n"); - ok(si.nPage == 0 && si.nMin == 0 && (si.nMax == 0 || si.nMax == 100), - "reported page/range is %d (%d..%d) expected all 0 or nMax=100\n", - si.nPage, si.nMin, si.nMax); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, - "reported page/range is %d (%d..%d)\n", - si.nPage, si.nMin, si.nMax); - - /* Previously, builtin incorrectly re-shows explicitly hidden scrollbar */ - DISABLE_WS_VSCROLL(hwndRichEdit); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), - "Vertical scrollbar is visible, should be invisible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, - "reported page/range is %d (%d..%d)\n", - si.nPage, si.nMin, si.nMax); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), - "Vertical scrollbar is visible, should be invisible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, - "reported page/range is %d (%d..%d) expected nMax/nPage nonzero\n", - si.nPage, si.nMin, si.nMax); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, - "reported page/range is %d (%d..%d)\n", - si.nPage, si.nMin, si.nMax); - - DISABLE_WS_VSCROLL(hwndRichEdit); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), - "Vertical scrollbar is visible, should be invisible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, - "reported page/range is %d (%d..%d)\n", - si.nPage, si.nMin, si.nMax); - - /* Testing effect of EM_SCROLL on scrollbar visibility. It seems that - EM_SCROLL will make visible any forcefully invisible scrollbar */ - SendMessage(hwndRichEdit, EM_SCROLL, SB_LINEDOWN, 0); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, - "reported page/range is %d (%d..%d)\n", - si.nPage, si.nMin, si.nMax); - - DISABLE_WS_VSCROLL(hwndRichEdit); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) == 0), - "Vertical scrollbar is visible, should be invisible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, - "reported page/range is %d (%d..%d)\n", - si.nPage, si.nMin, si.nMax); - - /* Again, EM_SCROLL, with SB_LINEUP */ - SendMessage(hwndRichEdit, EM_SCROLL, SB_LINEUP, 0); - memset(&si, 0, sizeof(si)); - si.cbSize = sizeof(si); - si.fMask = SIF_PAGE | SIF_RANGE; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok (((GetWindowLongA(hwndRichEdit, GWL_STYLE) & WS_VSCROLL) != 0), - "Vertical scrollbar is invisible, should be visible.\n"); - ok(si.nPage != 0 && si.nMin == 0 && si.nMax != 0, - "reported page/range is %d (%d..%d)\n", - si.nPage, si.nMin, si.nMax); - - DestroyWindow(hwndRichEdit); - - /* This window proc models what is going on with Corman Lisp 3.0. - At WM_SIZE, this proc unconditionally calls ShowScrollBar() to - force the scrollbar into visibility. Recursion should NOT happen - as a result of this action. - */ - r = GetClassInfoA(NULL, RICHEDIT_CLASS, &cls); - if (r) { - richeditProc = cls.lpfnWndProc; - cls.lpfnWndProc = RicheditStupidOverrideProcA; - cls.lpszClassName = "RicheditStupidOverride"; - if(!RegisterClassA(&cls)) assert(0); - - recursionLevel = 0; - WM_SIZE_recursionLevel = 0; - bailedOutOfRecursion = FALSE; - hwndRichEdit = new_window(cls.lpszClassName, ES_MULTILINE, NULL); - ok(!bailedOutOfRecursion, - "WM_SIZE/scrollbar mutual recursion detected, expected none!\n"); - - recursionLevel = 0; - WM_SIZE_recursionLevel = 0; - bailedOutOfRecursion = FALSE; - MoveWindow(hwndRichEdit, 0, 0, 250, 100, TRUE); - ok(!bailedOutOfRecursion, - "WM_SIZE/scrollbar mutual recursion detected, expected none!\n"); - - /* Unblock window in order to process WM_DESTROY */ - recursionLevel = 0; - bailedOutOfRecursion = FALSE; - WM_SIZE_recursionLevel = 0; - DestroyWindow(hwndRichEdit); - } -} - -static void test_EM_SETUNDOLIMIT(void) -{ - /* cases we test for: - * default behaviour - limiting at 100 undo's - * undo disabled - setting a limit of 0 - * undo limited - undo limit set to some to some number, like 2 - * bad input - sending a negative number should default to 100 undo's */ - - HWND hwndRichEdit = new_richedit(NULL); - CHARRANGE cr; - int i; - int result; - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) "x"); - cr.cpMin = 0; - cr.cpMax = 1; - SendMessage(hwndRichEdit, WM_COPY, 0, 0); - /*Load "x" into the clipboard. Paste is an easy, undo'able operation. - also, multiple pastes don't combine like WM_CHAR would */ - SendMessage(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM) &cr); - - /* first case - check the default */ - SendMessage(hwndRichEdit,EM_EMPTYUNDOBUFFER, 0,0); - for (i=0; i<101; i++) /* Put 101 undo's on the stack */ - SendMessage(hwndRichEdit, WM_PASTE, 0, 0); - for (i=0; i<100; i++) /* Undo 100 of them */ - SendMessage(hwndRichEdit, WM_UNDO, 0, 0); - ok(!SendMessage(hwndRichEdit, EM_CANUNDO, 0, 0), - "EM_SETUNDOLIMIT allowed more than a hundred undo's by default.\n"); - - /* second case - cannot undo */ - SendMessage(hwndRichEdit,EM_EMPTYUNDOBUFFER, 0, 0); - SendMessage(hwndRichEdit, EM_SETUNDOLIMIT, 0, 0); - SendMessage(hwndRichEdit, - WM_PASTE, 0, 0); /* Try to put something in the undo stack */ - ok(!SendMessage(hwndRichEdit, EM_CANUNDO, 0, 0), - "EM_SETUNDOLIMIT allowed undo with UNDOLIMIT set to 0\n"); - - /* third case - set it to an arbitrary number */ - SendMessage(hwndRichEdit,EM_EMPTYUNDOBUFFER, 0, 0); - SendMessage(hwndRichEdit, EM_SETUNDOLIMIT, 2, 0); - SendMessage(hwndRichEdit, WM_PASTE, 0, 0); - SendMessage(hwndRichEdit, WM_PASTE, 0, 0); - SendMessage(hwndRichEdit, WM_PASTE, 0, 0); - /* If SETUNDOLIMIT is working, there should only be two undo's after this */ - ok(SendMessage(hwndRichEdit, EM_CANUNDO, 0,0), - "EM_SETUNDOLIMIT didn't allow the first undo with UNDOLIMIT set to 2\n"); - SendMessage(hwndRichEdit, WM_UNDO, 0, 0); - ok(SendMessage(hwndRichEdit, EM_CANUNDO, 0, 0), - "EM_SETUNDOLIMIT didn't allow a second undo with UNDOLIMIT set to 2\n"); - SendMessage(hwndRichEdit, WM_UNDO, 0, 0); - ok(!SendMessage(hwndRichEdit, EM_CANUNDO, 0, 0), - "EM_SETUNDOLIMIT allowed a third undo with UNDOLIMIT set to 2\n"); - - /* fourth case - setting negative numbers should default to 100 undos */ - SendMessage(hwndRichEdit,EM_EMPTYUNDOBUFFER, 0,0); - result = SendMessage(hwndRichEdit, EM_SETUNDOLIMIT, -1, 0); - ok (result == 100, - "EM_SETUNDOLIMIT returned %d when set to -1, instead of 100\n",result); - - DestroyWindow(hwndRichEdit); -} - -static void test_ES_PASSWORD(void) -{ - /* This isn't hugely testable, so we're just going to run it through its paces */ - - HWND hwndRichEdit = new_richedit(NULL); - WCHAR result; - - /* First, check the default of a regular control */ - result = SendMessage(hwndRichEdit, EM_GETPASSWORDCHAR, 0, 0); - ok (result == 0, - "EM_GETPASSWORDCHAR returned %c by default, instead of NULL\n",result); - - /* Now, set it to something normal */ - SendMessage(hwndRichEdit, EM_SETPASSWORDCHAR, 'x', 0); - result = SendMessage(hwndRichEdit, EM_GETPASSWORDCHAR, 0, 0); - ok (result == 120, - "EM_GETPASSWORDCHAR returned %c (%d) when set to 'x', instead of x (120)\n",result,result); - - /* Now, set it to something odd */ - SendMessage(hwndRichEdit, EM_SETPASSWORDCHAR, (WCHAR)1234, 0); - result = SendMessage(hwndRichEdit, EM_GETPASSWORDCHAR, 0, 0); - ok (result == 1234, - "EM_GETPASSWORDCHAR returned %c (%d) when set to 'x', instead of x (120)\n",result,result); - DestroyWindow(hwndRichEdit); -} - -static DWORD CALLBACK test_WM_SETTEXT_esCallback(DWORD_PTR dwCookie, - LPBYTE pbBuff, - LONG cb, - LONG *pcb) -{ - char** str = (char**)dwCookie; - *pcb = cb; - if (*pcb > 0) { - memcpy(*str, pbBuff, *pcb); - *str += *pcb; - } - return 0; -} - -static void test_WM_SETTEXT(void) -{ - HWND hwndRichEdit = new_richedit(NULL); - const char * TestItem1 = "TestSomeText"; - const char * TestItem2 = "TestSomeText\r"; - const char * TestItem2_after = "TestSomeText\r\n"; - const char * TestItem3 = "TestSomeText\rSomeMoreText\r"; - const char * TestItem3_after = "TestSomeText\r\nSomeMoreText\r\n"; - const char * TestItem4 = "TestSomeText\n\nTestSomeText"; - const char * TestItem4_after = "TestSomeText\r\n\r\nTestSomeText"; - const char * TestItem5 = "TestSomeText\r\r\nTestSomeText"; - const char * TestItem5_after = "TestSomeText TestSomeText"; - const char * TestItem6 = "TestSomeText\r\r\n\rTestSomeText"; - const char * TestItem6_after = "TestSomeText \r\nTestSomeText"; - const char * TestItem7 = "TestSomeText\r\n\r\r\n\rTestSomeText"; - const char * TestItem7_after = "TestSomeText\r\n \r\nTestSomeText"; - - const char rtftextA[] = "{\\rtf sometext}"; - const char urtftextA[] = "{\\urtf sometext}"; - const WCHAR rtftextW[] = {'{','\\','r','t','f',' ','s','o','m','e','t','e','x','t','}',0}; - const WCHAR urtftextW[] = {'{','\\','u','r','t','f',' ','s','o','m','e','t','e','x','t','}',0}; - const WCHAR sometextW[] = {'s','o','m','e','t','e','x','t',0}; - - char buf[1024] = {0}; - WCHAR bufW[1024] = {0}; - LRESULT result; - - /* This test attempts to show that WM_SETTEXT on a riched20 control causes - any solitary \r to be converted to \r\n on return. Properly paired - \r\n are not affected. It also shows that the special sequence \r\r\n - gets converted to a single space. - */ - -#define TEST_SETTEXT(a, b) \ - result = SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) a); \ - ok (result == 1, "WM_SETTEXT returned %ld instead of 1\n", result); \ - result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buf); \ - ok (result == lstrlen(buf), \ - "WM_GETTEXT returned %ld instead of expected %u\n", \ - result, lstrlen(buf)); \ - result = strcmp(b, buf); \ - ok(result == 0, \ - "WM_SETTEXT round trip: strcmp = %ld, text=\"%s\"\n", result, buf); - - TEST_SETTEXT(TestItem1, TestItem1) - TEST_SETTEXT(TestItem2, TestItem2_after) - TEST_SETTEXT(TestItem3, TestItem3_after) - TEST_SETTEXT(TestItem3_after, TestItem3_after) - TEST_SETTEXT(TestItem4, TestItem4_after) - TEST_SETTEXT(TestItem5, TestItem5_after) - TEST_SETTEXT(TestItem6, TestItem6_after) - TEST_SETTEXT(TestItem7, TestItem7_after) - - /* The following tests demonstrate that WM_SETTEXT supports RTF strings */ - TEST_SETTEXT(rtftextA, "sometext") /* interpreted as ascii rtf */ - TEST_SETTEXT(urtftextA, "sometext") /* interpreted as ascii rtf */ - TEST_SETTEXT(rtftextW, "{") /* interpreted as ascii text */ - TEST_SETTEXT(urtftextW, "{") /* interpreted as ascii text */ - DestroyWindow(hwndRichEdit); -#undef TEST_SETTEXT - -#define TEST_SETTEXTW(a, b) \ - result = SendMessageW(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) a); \ - ok (result == 1, "WM_SETTEXT returned %ld instead of 1\n", result); \ - result = SendMessageW(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) bufW); \ - ok (result == lstrlenW(bufW), \ - "WM_GETTEXT returned %ld instead of expected %u\n", \ - result, lstrlenW(bufW)); \ - result = lstrcmpW(b, bufW); \ - ok(result == 0, "WM_SETTEXT round trip: strcmp = %ld\n", result); - - hwndRichEdit = CreateWindowW(RICHEDIT_CLASS20W, NULL, - ES_MULTILINE|WS_POPUP|WS_HSCROLL|WS_VSCROLL|WS_VISIBLE, - 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwndRichEdit != NULL, "class: RichEdit20W, error: %d\n", (int) GetLastError()); - TEST_SETTEXTW(rtftextA, sometextW) /* interpreted as ascii rtf */ - TEST_SETTEXTW(urtftextA, sometextW) /* interpreted as ascii rtf */ - TEST_SETTEXTW(rtftextW, rtftextW) /* interpreted as ascii text */ - TEST_SETTEXTW(urtftextW, urtftextW) /* interpreted as ascii text */ - DestroyWindow(hwndRichEdit); -#undef TEST_SETTEXTW -} - -static void test_EM_STREAMOUT(void) -{ - HWND hwndRichEdit = new_richedit(NULL); - int r; - EDITSTREAM es; - char buf[1024] = {0}; - char * p; - - const char * TestItem1 = "TestSomeText"; - const char * TestItem2 = "TestSomeText\r"; - const char * TestItem3 = "TestSomeText\r\n"; - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) TestItem1); - p = buf; - es.dwCookie = (DWORD_PTR)&p; - es.dwError = 0; - es.pfnCallback = test_WM_SETTEXT_esCallback; - memset(buf, 0, sizeof(buf)); - SendMessage(hwndRichEdit, EM_STREAMOUT, SF_TEXT, (LPARAM)&es); - r = strlen(buf); - ok(r == 12, "streamed text length is %d, expecting 12\n", r); - ok(strcmp(buf, TestItem1) == 0, - "streamed text different, got %s\n", buf); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) TestItem2); - p = buf; - es.dwCookie = (DWORD_PTR)&p; - es.dwError = 0; - es.pfnCallback = test_WM_SETTEXT_esCallback; - memset(buf, 0, sizeof(buf)); - SendMessage(hwndRichEdit, EM_STREAMOUT, SF_TEXT, (LPARAM)&es); - r = strlen(buf); - /* Here again, \r gets converted to \r\n, like WM_GETTEXT */ - ok(r == 14, "streamed text length is %d, expecting 14\n", r); - ok(strcmp(buf, TestItem3) == 0, - "streamed text different from, got %s\n", buf); - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) TestItem3); - p = buf; - es.dwCookie = (DWORD_PTR)&p; - es.dwError = 0; - es.pfnCallback = test_WM_SETTEXT_esCallback; - memset(buf, 0, sizeof(buf)); - SendMessage(hwndRichEdit, EM_STREAMOUT, SF_TEXT, (LPARAM)&es); - r = strlen(buf); - ok(r == 14, "streamed text length is %d, expecting 14\n", r); - ok(strcmp(buf, TestItem3) == 0, - "streamed text different, got %s\n", buf); - - DestroyWindow(hwndRichEdit); -} - -static void test_EM_STREAMOUT_FONTTBL(void) -{ - HWND hwndRichEdit = new_richedit(NULL); - EDITSTREAM es; - char buf[1024] = {0}; - char * p; - char * fontTbl; - int brackCount; - - const char * TestItem = "TestSomeText"; - - /* fills in the richedit control with some text */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) TestItem); - - /* streams out the text in rtf format */ - p = buf; - es.dwCookie = (DWORD_PTR)&p; - es.dwError = 0; - es.pfnCallback = test_WM_SETTEXT_esCallback; - memset(buf, 0, sizeof(buf)); - SendMessage(hwndRichEdit, EM_STREAMOUT, SF_RTF, (LPARAM)&es); - - /* scans for \fonttbl, error if not found */ - fontTbl = strstr(buf, "\\fonttbl"); - ok(fontTbl != NULL, "missing \\fonttbl section\n"); - if(fontTbl) - { - /* scans for terminating closing bracket */ - brackCount = 1; - while(*fontTbl && brackCount) - { - if(*fontTbl == '{') - brackCount++; - else if(*fontTbl == '}') - brackCount--; - fontTbl++; - } - /* checks whether closing bracket is ok */ - ok(brackCount == 0, "missing closing bracket in \\fonttbl block\n"); - if(!brackCount) - { - /* char before closing fonttbl block should be a closed bracket */ - fontTbl -= 2; - ok(*fontTbl == '}', "spurious character '%02x' before \\fonttbl closing bracket\n", *fontTbl); - - /* char after fonttbl block should be a crlf */ - fontTbl += 2; - ok(*fontTbl == 0x0d && *(fontTbl+1) == 0x0a, "missing crlf after \\fonttbl block\n"); - } - } - DestroyWindow(hwndRichEdit); -} - - -static void test_EM_SETTEXTEX(void) -{ - HWND hwndRichEdit, parent; - SCROLLINFO si; - int sel_start, sel_end; - SETTEXTEX setText; - GETTEXTEX getText; - WCHAR TestItem1[] = {'T', 'e', 's', 't', - 'S', 'o', 'm', 'e', - 'T', 'e', 'x', 't', 0}; - WCHAR TestItem1alt[] = {'T', 'T', 'e', 's', - 't', 'S', 'o', 'm', - 'e', 'T', 'e', 'x', - 't', 't', 'S', 'o', - 'm', 'e', 'T', 'e', - 'x', 't', 0}; - WCHAR TestItem1altn[] = {'T','T','e','s','t','S','o','m','e','T','e','x','t', - '\r','t','S','o','m','e','T','e','x','t',0}; - WCHAR TestItem2[] = {'T', 'e', 's', 't', - 'S', 'o', 'm', 'e', - 'T', 'e', 'x', 't', - '\r', 0}; - const char * TestItem2_after = "TestSomeText\r\n"; - WCHAR TestItem3[] = {'T', 'e', 's', 't', - 'S', 'o', 'm', 'e', - 'T', 'e', 'x', 't', - '\r','\n','\r','\n', 0}; - WCHAR TestItem3alt[] = {'T', 'e', 's', 't', - 'S', 'o', 'm', 'e', - 'T', 'e', 'x', 't', - '\n','\n', 0}; - WCHAR TestItem3_after[] = {'T', 'e', 's', 't', - 'S', 'o', 'm', 'e', - 'T', 'e', 'x', 't', - '\r','\r', 0}; - WCHAR TestItem4[] = {'T', 'e', 's', 't', - 'S', 'o', 'm', 'e', - 'T', 'e', 'x', 't', - '\r','\r','\n','\r', - '\n', 0}; - WCHAR TestItem4_after[] = {'T', 'e', 's', 't', - 'S', 'o', 'm', 'e', - 'T', 'e', 'x', 't', - ' ','\r', 0}; -#define MAX_BUF_LEN 1024 - WCHAR buf[MAX_BUF_LEN]; - char bufACP[MAX_BUF_LEN]; - char * p; - int result; - CHARRANGE cr; - EDITSTREAM es; - WNDCLASSA cls; - - /* Test the scroll position with and without a parent window. - * - * For some reason the scroll position is 0 after EM_SETTEXTEX - * with the ST_SELECTION flag only when the control has a parent - * window, even though the selection is at the end. */ - cls.style = 0; - cls.lpfnWndProc = DefWindowProcA; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(0); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "ParentTestClass"; - if(!RegisterClassA(&cls)) assert(0); - - parent = CreateWindow(cls.lpszClassName, NULL, WS_POPUP|WS_VISIBLE, - 0, 0, 200, 60, NULL, NULL, NULL, NULL); - ok (parent != 0, "Failed to create parent window\n"); - - hwndRichEdit = CreateWindowEx(0, - RICHEDIT_CLASS, NULL, - ES_MULTILINE|WS_VSCROLL|WS_VISIBLE|WS_CHILD, - 0, 0, 200, 60, parent, NULL, - hmoduleRichEdit, NULL); - - setText.codepage = CP_ACP; - setText.flags = ST_SELECTION; - SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, - (LPARAM)"{\\rtf 1\\par 2\\par 3\\par 4\\par 5\\par 6\\par 7\\par 8\\par 9\\par}"); - si.cbSize = sizeof(si); - si.fMask = SIF_ALL; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - todo_wine ok(si.nPos == 0, "Position is incorrectly at %d\n", si.nPos); - SendMessage(hwndRichEdit, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); - ok(sel_start == 18, "Selection start incorrectly at %d\n", sel_start); - ok(sel_end == 18, "Selection end incorrectly at %d\n", sel_end); - - DestroyWindow(parent); - - /* Test without a parent window */ - hwndRichEdit = new_richedit(NULL); - setText.codepage = CP_ACP; - setText.flags = ST_SELECTION; - SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, - (LPARAM)"{\\rtf 1\\par 2\\par 3\\par 4\\par 5\\par 6\\par 7\\par 8\\par 9\\par}"); - si.cbSize = sizeof(si); - si.fMask = SIF_ALL; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok(si.nPos != 0, "Position is incorrectly at %d\n", si.nPos); - SendMessage(hwndRichEdit, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); - ok(sel_start == 18, "Selection start incorrectly at %d\n", sel_start); - ok(sel_end == 18, "Selection end incorrectly at %d\n", sel_end); - - /* The scroll position should also be 0 after EM_SETTEXTEX with ST_DEFAULT, - * but this time it is because the selection is at the beginning. */ - setText.codepage = CP_ACP; - setText.flags = ST_DEFAULT; - SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, - (LPARAM)"{\\rtf 1\\par 2\\par 3\\par 4\\par 5\\par 6\\par 7\\par 8\\par 9\\par}"); - si.cbSize = sizeof(si); - si.fMask = SIF_ALL; - GetScrollInfo(hwndRichEdit, SB_VERT, &si); - ok(si.nPos == 0, "Position is incorrectly at %d\n", si.nPos); - SendMessage(hwndRichEdit, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); - ok(sel_start == 0, "Selection start incorrectly at %d\n", sel_start); - ok(sel_end == 0, "Selection end incorrectly at %d\n", sel_end); - - setText.codepage = 1200; /* no constant for unicode */ - getText.codepage = 1200; /* no constant for unicode */ - getText.cb = MAX_BUF_LEN; - getText.flags = GT_DEFAULT; - getText.lpDefaultChar = NULL; - getText.lpUsedDefChar = NULL; - - setText.flags = 0; - SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem1); - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf); - ok(lstrcmpW(buf, TestItem1) == 0, - "EM_GETTEXTEX results not what was set by EM_SETTEXTEX\n"); - - /* Unlike WM_SETTEXT/WM_GETTEXT pair, EM_SETTEXTEX/EM_GETTEXTEX does not - convert \r to \r\n on return: !ST_SELECTION && Unicode && !\rtf - */ - setText.codepage = 1200; /* no constant for unicode */ - getText.codepage = 1200; /* no constant for unicode */ - getText.cb = MAX_BUF_LEN; - getText.flags = GT_DEFAULT; - getText.lpDefaultChar = NULL; - getText.lpUsedDefChar = NULL; - setText.flags = 0; - SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem2); - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf); - ok(lstrcmpW(buf, TestItem2) == 0, - "EM_GETTEXTEX results not what was set by EM_SETTEXTEX\n"); - - /* However, WM_GETTEXT *does* see \r\n where EM_GETTEXTEX would see \r */ - SendMessage(hwndRichEdit, WM_GETTEXT, MAX_BUF_LEN, (LPARAM)buf); - ok(strcmp((const char *)buf, TestItem2_after) == 0, - "WM_GETTEXT did *not* see \\r converted to \\r\\n pairs.\n"); - - /* Baseline test for just-enough buffer space for string */ - getText.cb = (lstrlenW(TestItem2) + 1) * sizeof(WCHAR); - getText.codepage = 1200; /* no constant for unicode */ - getText.flags = GT_DEFAULT; - getText.lpDefaultChar = NULL; - getText.lpUsedDefChar = NULL; - memset(buf, 0, MAX_BUF_LEN); - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf); - ok(lstrcmpW(buf, TestItem2) == 0, - "EM_GETTEXTEX results not what was set by EM_SETTEXTEX\n"); - - /* When there is enough space for one character, but not both, of the CRLF - pair at the end of the string, the CR is not copied at all. That is, - the caller must not see CRLF pairs truncated to CR at the end of the - string. - */ - getText.cb = (lstrlenW(TestItem2) + 1) * sizeof(WCHAR); - getText.codepage = 1200; /* no constant for unicode */ - getText.flags = GT_USECRLF; /* <-- asking for CR -> CRLF conversion */ - getText.lpDefaultChar = NULL; - getText.lpUsedDefChar = NULL; - memset(buf, 0, MAX_BUF_LEN); - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf); - ok(lstrcmpW(buf, TestItem1) == 0, - "EM_GETTEXTEX results not what was set by EM_SETTEXTEX\n"); - - - /* \r\n pairs get changed into \r: !ST_SELECTION && Unicode && !\rtf */ - setText.codepage = 1200; /* no constant for unicode */ - getText.codepage = 1200; /* no constant for unicode */ - getText.cb = MAX_BUF_LEN; - getText.flags = GT_DEFAULT; - getText.lpDefaultChar = NULL; - getText.lpUsedDefChar = NULL; - setText.flags = 0; - SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem3); - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf); - ok(lstrcmpW(buf, TestItem3_after) == 0, - "EM_SETTEXTEX did not convert properly\n"); - - /* \n also gets changed to \r: !ST_SELECTION && Unicode && !\rtf */ - setText.codepage = 1200; /* no constant for unicode */ - getText.codepage = 1200; /* no constant for unicode */ - getText.cb = MAX_BUF_LEN; - getText.flags = GT_DEFAULT; - getText.lpDefaultChar = NULL; - getText.lpUsedDefChar = NULL; - setText.flags = 0; - SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem3alt); - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf); - ok(lstrcmpW(buf, TestItem3_after) == 0, - "EM_SETTEXTEX did not convert properly\n"); - - /* \r\r\n gets changed into single space: !ST_SELECTION && Unicode && !\rtf */ - setText.codepage = 1200; /* no constant for unicode */ - getText.codepage = 1200; /* no constant for unicode */ - getText.cb = MAX_BUF_LEN; - getText.flags = GT_DEFAULT; - getText.lpDefaultChar = NULL; - getText.lpUsedDefChar = NULL; - setText.flags = 0; - SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem4); - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf); - ok(lstrcmpW(buf, TestItem4_after) == 0, - "EM_SETTEXTEX did not convert properly\n"); - - /* !ST_SELECTION && Unicode && !\rtf */ - result = SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, 0); - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf); - - ok (result == 1, - "EM_SETTEXTEX returned %d, instead of 1\n",result); - ok(lstrlenW(buf) == 0, - "EM_SETTEXTEX with NULL lParam should clear rich edit.\n"); - - /* put some text back: !ST_SELECTION && Unicode && !\rtf */ - setText.flags = 0; - SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem1); - /* select some text */ - cr.cpMax = 1; - cr.cpMin = 3; - SendMessage(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM) &cr); - /* replace current selection: ST_SELECTION && Unicode && !\rtf */ - setText.flags = ST_SELECTION; - result = SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, 0); - ok(result == 0, - "EM_SETTEXTEX with NULL lParam to replace selection" - " with no text should return 0. Got %i\n", - result); - - /* put some text back: !ST_SELECTION && Unicode && !\rtf */ - setText.flags = 0; - SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem1); - /* select some text */ - cr.cpMax = 1; - cr.cpMin = 3; - SendMessage(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM) &cr); - /* replace current selection: ST_SELECTION && Unicode && !\rtf */ - setText.flags = ST_SELECTION; - result = SendMessage(hwndRichEdit, EM_SETTEXTEX, - (WPARAM)&setText, (LPARAM) TestItem1); - /* get text */ - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf); - ok(result == lstrlenW(TestItem1), - "EM_SETTEXTEX with NULL lParam to replace selection" - " with no text should return 0. Got %i\n", - result); - ok(lstrlenW(buf) == 22, - "EM_SETTEXTEX to replace selection with more text failed: %i.\n", - lstrlenW(buf) ); - - /* The following test demonstrates that EM_SETTEXTEX supports RTF strings */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) "TestSomeText"); /* TestItem1 */ - p = (char *)buf; - es.dwCookie = (DWORD_PTR)&p; - es.dwError = 0; - es.pfnCallback = test_WM_SETTEXT_esCallback; - memset(buf, 0, sizeof(buf)); - SendMessage(hwndRichEdit, EM_STREAMOUT, - (WPARAM)(SF_RTF), (LPARAM)&es); - trace("EM_STREAMOUT produced:\n%s\n", (char *)buf); - - /* !ST_SELECTION && !Unicode && \rtf */ - setText.codepage = CP_ACP;/* EM_STREAMOUT saved as ANSI string */ - getText.codepage = 1200; /* no constant for unicode */ - getText.cb = MAX_BUF_LEN; - getText.flags = GT_DEFAULT; - getText.lpDefaultChar = NULL; - getText.lpUsedDefChar = NULL; - - setText.flags = 0; - SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) buf); - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf); - ok(lstrcmpW(buf, TestItem1) == 0, - "EM_GETTEXTEX results not what was set by EM_SETTEXTEX\n"); - - /* The following test demonstrates that EM_SETTEXTEX treats text as ASCII if it - * starts with ASCII characters "{\rtf" even when the codepage is unicode. */ - setText.codepage = 1200; /* Lie about code page (actual ASCII) */ - getText.codepage = CP_ACP; - getText.cb = MAX_BUF_LEN; - getText.flags = GT_DEFAULT; - getText.lpDefaultChar = NULL; - getText.lpUsedDefChar = NULL; - - setText.flags = ST_SELECTION; - SendMessage(hwndRichEdit, EM_SETSEL, 0, -1); - result = SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) "{\\rtf not unicode}"); - todo_wine ok(result == 11, "EM_SETTEXTEX incorrectly returned %d\n", result); - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) bufACP); - ok(lstrcmpA(bufACP, "not unicode") == 0, "'%s' != 'not unicode'\n", bufACP); - - /* The following test demonstrates that EM_SETTEXTEX supports RTF strings with a selection */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) "TestSomeText"); /* TestItem1 */ - p = (char *)buf; - es.dwCookie = (DWORD_PTR)&p; - es.dwError = 0; - es.pfnCallback = test_WM_SETTEXT_esCallback; - memset(buf, 0, sizeof(buf)); - SendMessage(hwndRichEdit, EM_STREAMOUT, - (WPARAM)(SF_RTF), (LPARAM)&es); - trace("EM_STREAMOUT produced:\n%s\n", (char *)buf); - - /* select some text */ - cr.cpMax = 1; - cr.cpMin = 3; - SendMessage(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM) &cr); - - /* ST_SELECTION && !Unicode && \rtf */ - setText.codepage = CP_ACP;/* EM_STREAMOUT saved as ANSI string */ - getText.codepage = 1200; /* no constant for unicode */ - getText.cb = MAX_BUF_LEN; - getText.flags = GT_DEFAULT; - getText.lpDefaultChar = NULL; - getText.lpUsedDefChar = NULL; - - setText.flags = ST_SELECTION; - SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) buf); - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf); - ok_w3("Expected \"%s\" or \"%s\", got \"%s\"\n", TestItem1alt, TestItem1altn, buf); - - /* The following test demonstrates that EM_SETTEXTEX replacing a selection */ - setText.codepage = 1200; /* no constant for unicode */ - getText.codepage = CP_ACP; - getText.cb = MAX_BUF_LEN; - - setText.flags = 0; - SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem1); /* TestItem1 */ - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) bufACP); - - /* select some text */ - cr.cpMax = 1; - cr.cpMin = 3; - SendMessage(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM) &cr); - - /* ST_SELECTION && !Unicode && !\rtf */ - setText.codepage = CP_ACP; - getText.codepage = 1200; /* no constant for unicode */ - getText.cb = MAX_BUF_LEN; - getText.flags = GT_DEFAULT; - getText.lpDefaultChar = NULL; - getText.lpUsedDefChar = NULL; - - setText.flags = ST_SELECTION; - SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) bufACP); - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf); - ok(lstrcmpW(buf, TestItem1alt) == 0, - "EM_GETTEXTEX results not what was set by EM_SETTEXTEX when" - " using ST_SELECTION and non-Unicode\n"); - - /* Test setting text using rich text format */ - setText.flags = 0; - setText.codepage = CP_ACP; - SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM)"{\\rtf richtext}"); - getText.codepage = CP_ACP; - getText.cb = MAX_BUF_LEN; - getText.flags = GT_DEFAULT; - getText.lpDefaultChar = NULL; - getText.lpUsedDefChar = NULL; - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) bufACP); - ok(!strcmp(bufACP, "richtext"), "expected 'richtext' but got '%s'\n", bufACP); - - setText.flags = 0; - setText.codepage = CP_ACP; - SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM)"{\\urtf morerichtext}"); - getText.codepage = CP_ACP; - getText.cb = MAX_BUF_LEN; - getText.flags = GT_DEFAULT; - getText.lpDefaultChar = NULL; - getText.lpUsedDefChar = NULL; - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) bufACP); - ok(!strcmp(bufACP, "morerichtext"), "expected 'morerichtext' but got '%s'\n", bufACP); - - DestroyWindow(hwndRichEdit); -} - -static void test_EM_LIMITTEXT(void) -{ - int ret; - - HWND hwndRichEdit = new_richedit(NULL); - - /* The main purpose of this test is to demonstrate that the nonsense in MSDN - * about setting the length to -1 for multiline edit controls doesn't happen. - */ - - /* Don't check default gettextlimit case. That's done in other tests */ - - /* Set textlimit to 100 */ - SendMessage (hwndRichEdit, EM_LIMITTEXT, 100, 0); - ret = SendMessage (hwndRichEdit, EM_GETLIMITTEXT, 0, 0); - ok (ret == 100, - "EM_LIMITTEXT: set to 100, returned: %d, expected: 100\n", ret); - - /* Set textlimit to 0 */ - SendMessage (hwndRichEdit, EM_LIMITTEXT, 0, 0); - ret = SendMessage (hwndRichEdit, EM_GETLIMITTEXT, 0, 0); - ok (ret == 65536, - "EM_LIMITTEXT: set to 0, returned: %d, expected: 65536\n", ret); - - /* Set textlimit to -1 */ - SendMessage (hwndRichEdit, EM_LIMITTEXT, -1, 0); - ret = SendMessage (hwndRichEdit, EM_GETLIMITTEXT, 0, 0); - ok (ret == -1, - "EM_LIMITTEXT: set to -1, returned: %d, expected: -1\n", ret); - - /* Set textlimit to -2 */ - SendMessage (hwndRichEdit, EM_LIMITTEXT, -2, 0); - ret = SendMessage (hwndRichEdit, EM_GETLIMITTEXT, 0, 0); - ok (ret == -2, - "EM_LIMITTEXT: set to -2, returned: %d, expected: -2\n", ret); - - DestroyWindow (hwndRichEdit); -} - - -static void test_EM_EXLIMITTEXT(void) -{ - int i, selBegin, selEnd, len1, len2; - int result; - char text[1024 + 1]; - char buffer[1024 + 1]; - int textlimit = 0; /* multiple of 100 */ - HWND hwndRichEdit = new_richedit(NULL); - - i = SendMessage(hwndRichEdit, EM_GETLIMITTEXT, 0, 0); - ok(32767 == i, "EM_EXLIMITTEXT: expected: %d, actual: %d\n", 32767, i); /* default */ - - textlimit = 256000; - SendMessage(hwndRichEdit, EM_EXLIMITTEXT, 0, textlimit); - i = SendMessage(hwndRichEdit, EM_GETLIMITTEXT, 0, 0); - /* set higher */ - ok(textlimit == i, "EM_EXLIMITTEXT: expected: %d, actual: %d\n", textlimit, i); - - textlimit = 1000; - SendMessage(hwndRichEdit, EM_EXLIMITTEXT, 0, textlimit); - i = SendMessage(hwndRichEdit, EM_GETLIMITTEXT, 0, 0); - /* set lower */ - ok(textlimit == i, "EM_EXLIMITTEXT: expected: %d, actual: %d\n", textlimit, i); - - SendMessage(hwndRichEdit, EM_EXLIMITTEXT, 0, 0); - i = SendMessage(hwndRichEdit, EM_GETLIMITTEXT, 0, 0); - /* default for WParam = 0 */ - ok(65536 == i, "EM_EXLIMITTEXT: expected: %d, actual: %d\n", 65536, i); - - textlimit = sizeof(text)-1; - memset(text, 'W', textlimit); - text[sizeof(text)-1] = 0; - SendMessage(hwndRichEdit, EM_EXLIMITTEXT, 0, textlimit); - /* maxed out text */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text); - - SendMessage(hwndRichEdit, EM_SETSEL, 0, -1); /* select everything */ - SendMessage(hwndRichEdit, EM_GETSEL, (WPARAM)&selBegin, (LPARAM)&selEnd); - len1 = selEnd - selBegin; - - SendMessage(hwndRichEdit, WM_KEYDOWN, VK_BACK, 1); - SendMessage(hwndRichEdit, WM_CHAR, VK_BACK, 1); - SendMessage(hwndRichEdit, WM_KEYUP, VK_BACK, 1); - SendMessage(hwndRichEdit, EM_SETSEL, 0, -1); - SendMessage(hwndRichEdit, EM_GETSEL, (WPARAM)&selBegin, (LPARAM)&selEnd); - len2 = selEnd - selBegin; - - ok(len1 != len2, - "EM_EXLIMITTEXT: Change Expected\nOld Length: %d, New Length: %d, Limit: %d\n", - len1,len2,i); - - SendMessage(hwndRichEdit, WM_KEYDOWN, 'A', 1); - SendMessage(hwndRichEdit, WM_CHAR, 'A', 1); - SendMessage(hwndRichEdit, WM_KEYUP, 'A', 1); - SendMessage(hwndRichEdit, EM_SETSEL, 0, -1); - SendMessage(hwndRichEdit, EM_GETSEL, (WPARAM)&selBegin, (LPARAM)&selEnd); - len1 = selEnd - selBegin; - - ok(len1 != len2, - "EM_EXLIMITTEXT: Change Expected\nOld Length: %d, New Length: %d, Limit: %d\n", - len1,len2,i); - - SendMessage(hwndRichEdit, WM_KEYDOWN, 'A', 1); - SendMessage(hwndRichEdit, WM_CHAR, 'A', 1); - SendMessage(hwndRichEdit, WM_KEYUP, 'A', 1); /* full; should be no effect */ - SendMessage(hwndRichEdit, EM_SETSEL, 0, -1); - SendMessage(hwndRichEdit, EM_GETSEL, (WPARAM)&selBegin, (LPARAM)&selEnd); - len2 = selEnd - selBegin; - - ok(len1 == len2, - "EM_EXLIMITTEXT: No Change Expected\nOld Length: %d, New Length: %d, Limit: %d\n", - len1,len2,i); - - /* set text up to the limit, select all the text, then add a char */ - textlimit = 5; - memset(text, 'W', textlimit); - text[textlimit] = 0; - SendMessage(hwndRichEdit, EM_EXLIMITTEXT, 0, textlimit); - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text); - SendMessage(hwndRichEdit, EM_SETSEL, 0, -1); - SendMessage(hwndRichEdit, WM_CHAR, 'A', 1); - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - result = strcmp(buffer, "A"); - ok(0 == result, "got string = \"%s\"\n", buffer); - - /* WM_SETTEXT not limited */ - textlimit = 10; - memset(text, 'W', textlimit); - text[textlimit] = 0; - SendMessage(hwndRichEdit, EM_EXLIMITTEXT, 0, textlimit-5); - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text); - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - i = strlen(buffer); - ok(10 == i, "expected 10 chars\n"); - i = SendMessage(hwndRichEdit, EM_GETLIMITTEXT, 0, 0); - ok(10 == i, "EM_EXLIMITTEXT: expected: %d, actual: %d\n", 10, i); - - /* try inserting more text at end */ - i = SendMessage(hwndRichEdit, WM_CHAR, 'A', 0); - ok(0 == i, "WM_CHAR wasn't processed\n"); - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - i = strlen(buffer); - ok(10 == i, "expected 10 chars, got %i\n", i); - i = SendMessage(hwndRichEdit, EM_GETLIMITTEXT, 0, 0); - ok(10 == i, "EM_EXLIMITTEXT: expected: %d, actual: %d\n", 10, i); - - /* try inserting text at beginning */ - SendMessage(hwndRichEdit, EM_SETSEL, 0, 0); - i = SendMessage(hwndRichEdit, WM_CHAR, 'A', 0); - ok(0 == i, "WM_CHAR wasn't processed\n"); - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - i = strlen(buffer); - ok(10 == i, "expected 10 chars, got %i\n", i); - i = SendMessage(hwndRichEdit, EM_GETLIMITTEXT, 0, 0); - ok(10 == i, "EM_EXLIMITTEXT: expected: %d, actual: %d\n", 10, i); - - /* WM_CHAR is limited */ - textlimit = 1; - SendMessage(hwndRichEdit, EM_EXLIMITTEXT, 0, textlimit); - SendMessage(hwndRichEdit, EM_SETSEL, 0, -1); /* select everything */ - i = SendMessage(hwndRichEdit, WM_CHAR, 'A', 0); - ok(0 == i, "WM_CHAR wasn't processed\n"); - i = SendMessage(hwndRichEdit, WM_CHAR, 'A', 0); - ok(0 == i, "WM_CHAR wasn't processed\n"); - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - i = strlen(buffer); - ok(1 == i, "expected 1 chars, got %i instead\n", i); - - DestroyWindow(hwndRichEdit); -} - -static void test_EM_GETLIMITTEXT(void) -{ - int i; - HWND hwndRichEdit = new_richedit(NULL); - - i = SendMessage(hwndRichEdit, EM_GETLIMITTEXT, 0, 0); - ok(32767 == i, "expected: %d, actual: %d\n", 32767, i); /* default value */ - - SendMessage(hwndRichEdit, EM_EXLIMITTEXT, 0, 50000); - i = SendMessage(hwndRichEdit, EM_GETLIMITTEXT, 0, 0); - ok(50000 == i, "expected: %d, actual: %d\n", 50000, i); - - DestroyWindow(hwndRichEdit); -} - -static void test_WM_SETFONT(void) -{ - /* There is no invalid input or error conditions for this function. - * NULL wParam and lParam just fall back to their default values - * It should be noted that even if you use a gibberish name for your fonts - * here, it will still work because the name is stored. They will display as - * System, but will report their name to be whatever they were created as */ - - HWND hwndRichEdit = new_richedit(NULL); - HFONT testFont1 = CreateFontA (0,0,0,0,FW_LIGHT, 0, 0, 0, ANSI_CHARSET, - OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | - FF_DONTCARE, "Marlett"); - HFONT testFont2 = CreateFontA (0,0,0,0,FW_LIGHT, 0, 0, 0, ANSI_CHARSET, - OUT_TT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | - FF_DONTCARE, "MS Sans Serif"); - HFONT testFont3 = CreateFontA (0,0,0,0,FW_LIGHT, 0, 0, 0, ANSI_CHARSET, - OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | - FF_DONTCARE, "Courier"); - LOGFONTA sentLogFont; - CHARFORMAT2A returnedCF2A; - - returnedCF2A.cbSize = sizeof(returnedCF2A); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) "x"); - SendMessage(hwndRichEdit, WM_SETFONT, (WPARAM)testFont1, MAKELPARAM(TRUE, 0)); - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, SCF_DEFAULT, (LPARAM) &returnedCF2A); - - GetObjectA(testFont1, sizeof(LOGFONTA), &sentLogFont); - ok (!strcmp(sentLogFont.lfFaceName,returnedCF2A.szFaceName), - "EM_GETCHARFORMAT: Returned wrong font on test 1. Sent: %s, Returned: %s\n", - sentLogFont.lfFaceName,returnedCF2A.szFaceName); - - SendMessage(hwndRichEdit, WM_SETFONT, (WPARAM)testFont2, MAKELPARAM(TRUE, 0)); - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, SCF_DEFAULT, (LPARAM) &returnedCF2A); - GetObjectA(testFont2, sizeof(LOGFONTA), &sentLogFont); - ok (!strcmp(sentLogFont.lfFaceName,returnedCF2A.szFaceName), - "EM_GETCHARFORMAT: Returned wrong font on test 2. Sent: %s, Returned: %s\n", - sentLogFont.lfFaceName,returnedCF2A.szFaceName); - - SendMessage(hwndRichEdit, WM_SETFONT, (WPARAM)testFont3, MAKELPARAM(TRUE, 0)); - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, SCF_DEFAULT, (LPARAM) &returnedCF2A); - GetObjectA(testFont3, sizeof(LOGFONTA), &sentLogFont); - ok (!strcmp(sentLogFont.lfFaceName,returnedCF2A.szFaceName), - "EM_GETCHARFORMAT: Returned wrong font on test 3. Sent: %s, Returned: %s\n", - sentLogFont.lfFaceName,returnedCF2A.szFaceName); - - /* This last test is special since we send in NULL. We clear the variables - * and just compare to "System" instead of the sent in font name. */ - ZeroMemory(&returnedCF2A,sizeof(returnedCF2A)); - ZeroMemory(&sentLogFont,sizeof(sentLogFont)); - returnedCF2A.cbSize = sizeof(returnedCF2A); - - SendMessage(hwndRichEdit, WM_SETFONT, 0, MAKELPARAM((WORD) TRUE, 0)); - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, SCF_DEFAULT, (LPARAM) &returnedCF2A); - GetObjectA(NULL, sizeof(LOGFONTA), &sentLogFont); - ok (!strcmp("System",returnedCF2A.szFaceName), - "EM_GETCHARFORMAT: Returned wrong font on test 4. Sent: NULL, Returned: %s. Expected \"System\".\n",returnedCF2A.szFaceName); - - DestroyWindow(hwndRichEdit); -} - - -static DWORD CALLBACK test_EM_GETMODIFY_esCallback(DWORD_PTR dwCookie, - LPBYTE pbBuff, - LONG cb, - LONG *pcb) -{ - const char** str = (const char**)dwCookie; - int size = strlen(*str); - if(size > 3) /* let's make it piecemeal for fun */ - size = 3; - *pcb = cb; - if (*pcb > size) { - *pcb = size; - } - if (*pcb > 0) { - memcpy(pbBuff, *str, *pcb); - *str += *pcb; - } - return 0; -} - -static void test_EM_GETMODIFY(void) -{ - HWND hwndRichEdit = new_richedit(NULL); - LRESULT result; - SETTEXTEX setText; - WCHAR TestItem1[] = {'T', 'e', 's', 't', - 'S', 'o', 'm', 'e', - 'T', 'e', 'x', 't', 0}; - WCHAR TestItem2[] = {'T', 'e', 's', 't', - 'S', 'o', 'm', 'e', - 'O', 't', 'h', 'e', 'r', - 'T', 'e', 'x', 't', 0}; - const char* streamText = "hello world"; - CHARFORMAT2 cf2; - PARAFORMAT2 pf2; - EDITSTREAM es; - - HFONT testFont = CreateFontA (0,0,0,0,FW_LIGHT, 0, 0, 0, ANSI_CHARSET, - OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | - FF_DONTCARE, "Courier"); - - setText.codepage = 1200; /* no constant for unicode */ - setText.flags = ST_KEEPUNDO; - - - /* modify flag shouldn't be set when richedit is first created */ - result = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok (result == 0, - "EM_GETMODIFY returned non-zero, instead of zero on create\n"); - - /* setting modify flag should actually set it */ - SendMessage(hwndRichEdit, EM_SETMODIFY, TRUE, 0); - result = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok (result != 0, - "EM_GETMODIFY returned zero, instead of non-zero on EM_SETMODIFY\n"); - - /* clearing modify flag should actually clear it */ - SendMessage(hwndRichEdit, EM_SETMODIFY, FALSE, 0); - result = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok (result == 0, - "EM_GETMODIFY returned non-zero, instead of zero on EM_SETMODIFY\n"); - - /* setting font doesn't change modify flag */ - SendMessage(hwndRichEdit, EM_SETMODIFY, FALSE, 0); - SendMessage(hwndRichEdit, WM_SETFONT, (WPARAM)testFont, MAKELPARAM(TRUE, 0)); - result = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok (result == 0, - "EM_GETMODIFY returned non-zero, instead of zero on setting font\n"); - - /* setting text should set modify flag */ - SendMessage(hwndRichEdit, EM_SETMODIFY, FALSE, 0); - SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM)TestItem1); - result = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok (result != 0, - "EM_GETMODIFY returned zero, instead of non-zero on setting text\n"); - - /* undo previous text doesn't reset modify flag */ - SendMessage(hwndRichEdit, WM_UNDO, 0, 0); - result = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok (result != 0, - "EM_GETMODIFY returned zero, instead of non-zero on undo after setting text\n"); - - /* set text with no flag to keep undo stack should not set modify flag */ - SendMessage(hwndRichEdit, EM_SETMODIFY, FALSE, 0); - setText.flags = 0; - SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM)TestItem1); - result = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok (result == 0, - "EM_GETMODIFY returned non-zero, instead of zero when setting text while not keeping undo stack\n"); - - /* WM_SETTEXT doesn't modify */ - SendMessage(hwndRichEdit, EM_SETMODIFY, FALSE, 0); - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)TestItem2); - result = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok (result == 0, - "EM_GETMODIFY returned non-zero for WM_SETTEXT\n"); - - /* clear the text */ - SendMessage(hwndRichEdit, EM_SETMODIFY, FALSE, 0); - SendMessage(hwndRichEdit, WM_CLEAR, 0, 0); - result = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok (result == 0, - "EM_GETMODIFY returned non-zero, instead of zero for WM_CLEAR\n"); - - /* replace text */ - SendMessage(hwndRichEdit, EM_SETMODIFY, FALSE, 0); - SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM)TestItem1); - SendMessage(hwndRichEdit, EM_SETSEL, 0, 2); - SendMessage(hwndRichEdit, EM_REPLACESEL, TRUE, (LPARAM)TestItem2); - result = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok (result != 0, - "EM_GETMODIFY returned zero, instead of non-zero when replacing text\n"); - - /* copy/paste text 1 */ - SendMessage(hwndRichEdit, EM_SETMODIFY, FALSE, 0); - SendMessage(hwndRichEdit, EM_SETSEL, 0, 2); - SendMessage(hwndRichEdit, WM_COPY, 0, 0); - SendMessage(hwndRichEdit, WM_PASTE, 0, 0); - result = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok (result != 0, - "EM_GETMODIFY returned zero, instead of non-zero when pasting identical text\n"); - - /* copy/paste text 2 */ - SendMessage(hwndRichEdit, EM_SETMODIFY, FALSE, 0); - SendMessage(hwndRichEdit, EM_SETSEL, 0, 2); - SendMessage(hwndRichEdit, WM_COPY, 0, 0); - SendMessage(hwndRichEdit, EM_SETSEL, 0, 3); - SendMessage(hwndRichEdit, WM_PASTE, 0, 0); - result = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok (result != 0, - "EM_GETMODIFY returned zero, instead of non-zero when pasting different text\n"); - - /* press char */ - SendMessage(hwndRichEdit, EM_SETMODIFY, FALSE, 0); - SendMessage(hwndRichEdit, EM_SETSEL, 0, 1); - SendMessage(hwndRichEdit, WM_CHAR, 'A', 0); - result = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok (result != 0, - "EM_GETMODIFY returned zero, instead of non-zero for WM_CHAR\n"); - - /* press del */ - SendMessage(hwndRichEdit, WM_CHAR, 'A', 0); - SendMessage(hwndRichEdit, EM_SETMODIFY, FALSE, 0); - SendMessage(hwndRichEdit, WM_KEYDOWN, VK_BACK, 0); - result = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok (result != 0, - "EM_GETMODIFY returned zero, instead of non-zero for backspace\n"); - - /* set char format */ - SendMessage(hwndRichEdit, EM_SETMODIFY, FALSE, 0); - cf2.cbSize = sizeof(CHARFORMAT2); - SendMessage(hwndRichEdit, EM_GETCHARFORMAT, SCF_DEFAULT, (LPARAM)&cf2); - cf2.dwMask = CFM_ITALIC | cf2.dwMask; - cf2.dwEffects = CFE_ITALIC ^ cf2.dwEffects; - SendMessage(hwndRichEdit, EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf2); - result = SendMessage(hwndRichEdit, EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf2); - ok(result == 1, "EM_SETCHARFORMAT returned %ld instead of 1\n", result); - result = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok (result != 0, - "EM_GETMODIFY returned zero, instead of non-zero for EM_SETCHARFORMAT\n"); - - /* set para format */ - SendMessage(hwndRichEdit, EM_SETMODIFY, FALSE, 0); - pf2.cbSize = sizeof(PARAFORMAT2); - SendMessage(hwndRichEdit, EM_GETPARAFORMAT, 0, - (LPARAM) &pf2); - pf2.dwMask = PFM_ALIGNMENT | pf2.dwMask; - pf2.wAlignment = PFA_RIGHT; - SendMessage(hwndRichEdit, EM_SETPARAFORMAT, 0, (LPARAM) &pf2); - result = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok (result == 0, - "EM_GETMODIFY returned zero, instead of non-zero for EM_SETPARAFORMAT\n"); - - /* EM_STREAM */ - SendMessage(hwndRichEdit, EM_SETMODIFY, FALSE, 0); - es.dwCookie = (DWORD_PTR)&streamText; - es.dwError = 0; - es.pfnCallback = test_EM_GETMODIFY_esCallback; - SendMessage(hwndRichEdit, EM_STREAMIN, SF_TEXT, (LPARAM)&es); - result = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); - ok (result != 0, - "EM_GETMODIFY returned zero, instead of non-zero for EM_STREAM\n"); - - DestroyWindow(hwndRichEdit); -} - -struct exsetsel_s { - LONG min; - LONG max; - LRESULT expected_retval; - int expected_getsel_start; - int expected_getsel_end; - int _getsel_todo_wine; -}; - -const struct exsetsel_s exsetsel_tests[] = { - /* sanity tests */ - {5, 10, 10, 5, 10, 0}, - {15, 17, 17, 15, 17, 0}, - /* test cpMax > strlen() */ - {0, 100, 18, 0, 18, 1}, - /* test cpMin == cpMax */ - {5, 5, 5, 5, 5, 0}, - /* test cpMin < 0 && cpMax >= 0 (bug 4462) */ - {-1, 0, 5, 5, 5, 0}, - {-1, 17, 5, 5, 5, 0}, - {-1, 18, 5, 5, 5, 0}, - /* test cpMin < 0 && cpMax < 0 */ - {-1, -1, 17, 17, 17, 0}, - {-4, -5, 17, 17, 17, 0}, - /* test cMin >=0 && cpMax < 0 (bug 6814) */ - {0, -1, 18, 0, 18, 1}, - {17, -5, 18, 17, 18, 1}, - {18, -3, 17, 17, 17, 0}, - /* test if cpMin > cpMax */ - {15, 19, 18, 15, 18, 1}, - {19, 15, 18, 15, 18, 1} -}; - -static void check_EM_EXSETSEL(HWND hwnd, const struct exsetsel_s *setsel, int id) { - CHARRANGE cr; - LRESULT result; - int start, end; - - cr.cpMin = setsel->min; - cr.cpMax = setsel->max; - result = SendMessage(hwnd, EM_EXSETSEL, 0, (LPARAM) &cr); - - ok(result == setsel->expected_retval, "EM_EXSETSEL(%d): expected: %ld actual: %ld\n", id, setsel->expected_retval, result); - - SendMessage(hwnd, EM_GETSEL, (WPARAM) &start, (LPARAM) &end); - - if (setsel->_getsel_todo_wine) { - todo_wine { - ok(start == setsel->expected_getsel_start && end == setsel->expected_getsel_end, "EM_EXSETSEL(%d): expected (%d,%d) actual:(%d,%d)\n", id, setsel->expected_getsel_start, setsel->expected_getsel_end, start, end); - } - } else { - ok(start == setsel->expected_getsel_start && end == setsel->expected_getsel_end, "EM_EXSETSEL(%d): expected (%d,%d) actual:(%d,%d)\n", id, setsel->expected_getsel_start, setsel->expected_getsel_end, start, end); - } -} - -static void test_EM_EXSETSEL(void) -{ - HWND hwndRichEdit = new_richedit(NULL); - int i; - const int num_tests = sizeof(exsetsel_tests)/sizeof(struct exsetsel_s); - - /* sending some text to the window */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) "testing selection"); - /* 01234567890123456*/ - /* 10 */ - - for (i = 0; i < num_tests; i++) { - check_EM_EXSETSEL(hwndRichEdit, &exsetsel_tests[i], i); - } - - DestroyWindow(hwndRichEdit); -} - -static void test_EM_REPLACESEL(int redraw) -{ - HWND hwndRichEdit = new_richedit(NULL); - char buffer[1024] = {0}; - int r; - GETTEXTEX getText; - CHARRANGE cr; - - /* sending some text to the window */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) "testing selection"); - /* 01234567890123456*/ - /* 10 */ - - /* FIXME add more tests */ - SendMessage(hwndRichEdit, EM_SETSEL, 7, 17); - r = SendMessage(hwndRichEdit, EM_REPLACESEL, 0, 0); - ok(0 == r, "EM_REPLACESEL returned %d, expected 0\n", r); - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - r = strcmp(buffer, "testing"); - ok(0 == r, "expected %d, got %d\n", 0, r); - - DestroyWindow(hwndRichEdit); - - hwndRichEdit = new_richedit(NULL); - - trace("Testing EM_REPLACESEL behavior with redraw=%d\n", redraw); - SendMessage(hwndRichEdit, WM_SETREDRAW, redraw, 0); - - /* Test behavior with carriage returns and newlines */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - r = SendMessage(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM) "RichEdit1"); - ok(9 == r, "EM_REPLACESEL returned %d, expected 9\n", r); - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - r = strcmp(buffer, "RichEdit1"); - ok(0 == r, "expected %d, got %d\n", 0, r); - getText.cb = 1024; - getText.codepage = CP_ACP; - getText.flags = GT_DEFAULT; - getText.lpDefaultChar = NULL; - getText.lpUsedDefChar = NULL; - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer); - ok(strcmp(buffer, "RichEdit1") == 0, - "EM_GETTEXTEX results not what was set by EM_REPLACESEL\n"); - - /* Test number of lines reported after EM_REPLACESEL */ - r = SendMessage(hwndRichEdit, EM_GETLINECOUNT, 0, 0); - ok(r == 1, "EM_GETLINECOUNT returned %d, expected 1\n", r); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - r = SendMessage(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM) "RichEdit1\r"); - ok(10 == r, "EM_REPLACESEL returned %d, expected 10\n", r); - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - r = strcmp(buffer, "RichEdit1\r\n"); - ok(0 == r, "expected %d, got %d\n", 0, r); - getText.cb = 1024; - getText.codepage = CP_ACP; - getText.flags = GT_DEFAULT; - getText.lpDefaultChar = NULL; - getText.lpUsedDefChar = NULL; - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer); - ok(strcmp(buffer, "RichEdit1\r") == 0, - "EM_GETTEXTEX returned incorrect string\n"); - - /* Test number of lines reported after EM_REPLACESEL */ - r = SendMessage(hwndRichEdit, EM_GETLINECOUNT, 0, 0); - ok(r == 2, "EM_GETLINECOUNT returned %d, expected 2\n", r); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - r = SendMessage(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM) "RichEdit1\r\n"); - ok(r == 11, "EM_REPLACESEL returned %d, expected 11\n", r); - - /* Test number of lines reported after EM_REPLACESEL */ - r = SendMessage(hwndRichEdit, EM_GETLINECOUNT, 0, 0); - ok(r == 2, "EM_GETLINECOUNT returned %d, expected 2\n", r); - - r = SendMessage(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); - ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); - ok(cr.cpMin == 10, "EM_EXGETSEL returned cpMin=%d, expected 10\n", cr.cpMin); - ok(cr.cpMax == 10, "EM_EXGETSEL returned cpMax=%d, expected 10\n", cr.cpMax); - - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - r = strcmp(buffer, "RichEdit1\r\n"); - ok(0 == r, "expected %d, got %d\n", 0, r); - getText.cb = 1024; - getText.codepage = CP_ACP; - getText.flags = GT_DEFAULT; - getText.lpDefaultChar = NULL; - getText.lpUsedDefChar = NULL; - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer); - ok(strcmp(buffer, "RichEdit1\r") == 0, - "EM_GETTEXTEX returned incorrect string\n"); - - r = SendMessage(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); - ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); - ok(cr.cpMin == 10, "EM_EXGETSEL returned cpMin=%d, expected 10\n", cr.cpMin); - ok(cr.cpMax == 10, "EM_EXGETSEL returned cpMax=%d, expected 10\n", cr.cpMax); - - /* The following tests show that richedit should handle the special \r\r\n - sequence by turning it into a single space on insertion. However, - EM_REPLACESEL on WinXP returns the number of characters in the original - string. - */ - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - r = SendMessage(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM) "\r\r"); - ok(2 == r, "EM_REPLACESEL returned %d, expected 4\n", r); - r = SendMessage(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); - ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); - ok(cr.cpMin == 2, "EM_EXGETSEL returned cpMin=%d, expected 2\n", cr.cpMin); - ok(cr.cpMax == 2, "EM_EXGETSEL returned cpMax=%d, expected 2\n", cr.cpMax); - - /* Test the actual string */ - getText.cb = 1024; - getText.codepage = CP_ACP; - getText.flags = GT_DEFAULT; - getText.lpDefaultChar = NULL; - getText.lpUsedDefChar = NULL; - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer); - ok(strcmp(buffer, "\r\r") == 0, - "EM_GETTEXTEX returned incorrect string\n"); - - /* Test number of lines reported after EM_REPLACESEL */ - r = SendMessage(hwndRichEdit, EM_GETLINECOUNT, 0, 0); - ok(r == 3, "EM_GETLINECOUNT returned %d, expected 3\n", r); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - r = SendMessage(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM) "\r\r\n"); - ok(r == 3, "EM_REPLACESEL returned %d, expected 3\n", r); - r = SendMessage(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); - ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); - ok(cr.cpMin == 1, "EM_EXGETSEL returned cpMin=%d, expected 1\n", cr.cpMin); - ok(cr.cpMax == 1, "EM_EXGETSEL returned cpMax=%d, expected 1\n", cr.cpMax); - - /* Test the actual string */ - getText.cb = 1024; - getText.codepage = CP_ACP; - getText.flags = GT_DEFAULT; - getText.lpDefaultChar = NULL; - getText.lpUsedDefChar = NULL; - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer); - ok(strcmp(buffer, " ") == 0, - "EM_GETTEXTEX returned incorrect string\n"); - - /* Test number of lines reported after EM_REPLACESEL */ - r = SendMessage(hwndRichEdit, EM_GETLINECOUNT, 0, 0); - ok(r == 1, "EM_GETLINECOUNT returned %d, expected 1\n", r); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - r = SendMessage(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM) "\r\r\r\r\r\n\r\r\r"); - ok(r == 9, "EM_REPLACESEL returned %d, expected 9\n", r); - r = SendMessage(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); - ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); - ok(cr.cpMin == 7, "EM_EXGETSEL returned cpMin=%d, expected 7\n", cr.cpMin); - ok(cr.cpMax == 7, "EM_EXGETSEL returned cpMax=%d, expected 7\n", cr.cpMax); - - /* Test the actual string */ - getText.cb = 1024; - getText.codepage = CP_ACP; - getText.flags = GT_DEFAULT; - getText.lpDefaultChar = NULL; - getText.lpUsedDefChar = NULL; - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer); - ok(strcmp(buffer, "\r\r\r \r\r\r") == 0, - "EM_GETTEXTEX returned incorrect string\n"); - - /* Test number of lines reported after EM_REPLACESEL */ - r = SendMessage(hwndRichEdit, EM_GETLINECOUNT, 0, 0); - ok(r == 7, "EM_GETLINECOUNT returned %d, expected 7\n", r); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - r = SendMessage(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM) "\r\r\n\r\n"); - ok(r == 5, "EM_REPLACESEL returned %d, expected 5\n", r); - r = SendMessage(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); - ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); - ok(cr.cpMin == 2, "EM_EXGETSEL returned cpMin=%d, expected 2\n", cr.cpMin); - ok(cr.cpMax == 2, "EM_EXGETSEL returned cpMax=%d, expected 2\n", cr.cpMax); - - /* Test the actual string */ - getText.cb = 1024; - getText.codepage = CP_ACP; - getText.flags = GT_DEFAULT; - getText.lpDefaultChar = NULL; - getText.lpUsedDefChar = NULL; - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer); - ok(strcmp(buffer, " \r") == 0, - "EM_GETTEXTEX returned incorrect string\n"); - - /* Test number of lines reported after EM_REPLACESEL */ - r = SendMessage(hwndRichEdit, EM_GETLINECOUNT, 0, 0); - ok(r == 2, "EM_GETLINECOUNT returned %d, expected 2\n", r); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - r = SendMessage(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM) "\r\r\n\r\r"); - ok(r == 5, "EM_REPLACESEL returned %d, expected 5\n", r); - r = SendMessage(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); - ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); - ok(cr.cpMin == 3, "EM_EXGETSEL returned cpMin=%d, expected 3\n", cr.cpMin); - ok(cr.cpMax == 3, "EM_EXGETSEL returned cpMax=%d, expected 3\n", cr.cpMax); - - /* Test the actual string */ - getText.cb = 1024; - getText.codepage = CP_ACP; - getText.flags = GT_DEFAULT; - getText.lpDefaultChar = NULL; - getText.lpUsedDefChar = NULL; - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer); - ok(strcmp(buffer, " \r\r") == 0, - "EM_GETTEXTEX returned incorrect string\n"); - - /* Test number of lines reported after EM_REPLACESEL */ - r = SendMessage(hwndRichEdit, EM_GETLINECOUNT, 0, 0); - ok(r == 3, "EM_GETLINECOUNT returned %d, expected 3\n", r); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - r = SendMessage(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM) "\rX\r\n\r\r"); - ok(r == 6, "EM_REPLACESEL returned %d, expected 6\n", r); - r = SendMessage(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); - ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); - ok(cr.cpMin == 5, "EM_EXGETSEL returned cpMin=%d, expected 5\n", cr.cpMin); - ok(cr.cpMax == 5, "EM_EXGETSEL returned cpMax=%d, expected 5\n", cr.cpMax); - - /* Test the actual string */ - getText.cb = 1024; - getText.codepage = CP_ACP; - getText.flags = GT_DEFAULT; - getText.lpDefaultChar = NULL; - getText.lpUsedDefChar = NULL; - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer); - ok(strcmp(buffer, "\rX\r\r\r") == 0, - "EM_GETTEXTEX returned incorrect string\n"); - - /* Test number of lines reported after EM_REPLACESEL */ - r = SendMessage(hwndRichEdit, EM_GETLINECOUNT, 0, 0); - ok(r == 5, "EM_GETLINECOUNT returned %d, expected 5\n", r); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - r = SendMessage(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM) "\n\n"); - ok(2 == r, "EM_REPLACESEL returned %d, expected 2\n", r); - r = SendMessage(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); - ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); - ok(cr.cpMin == 2, "EM_EXGETSEL returned cpMin=%d, expected 2\n", cr.cpMin); - ok(cr.cpMax == 2, "EM_EXGETSEL returned cpMax=%d, expected 2\n", cr.cpMax); - - /* Test the actual string */ - getText.cb = 1024; - getText.codepage = CP_ACP; - getText.flags = GT_DEFAULT; - getText.lpDefaultChar = NULL; - getText.lpUsedDefChar = NULL; - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer); - ok(strcmp(buffer, "\r\r") == 0, - "EM_GETTEXTEX returned incorrect string\n"); - - /* Test number of lines reported after EM_REPLACESEL */ - r = SendMessage(hwndRichEdit, EM_GETLINECOUNT, 0, 0); - ok(r == 3, "EM_GETLINECOUNT returned %d, expected 3\n", r); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - r = SendMessage(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM) "\n\n\n\n\r\r\r\r\n"); - ok(r == 9, "EM_REPLACESEL returned %d, expected 9\n", r); - r = SendMessage(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); - ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); - ok(cr.cpMin == 7, "EM_EXGETSEL returned cpMin=%d, expected 7\n", cr.cpMin); - ok(cr.cpMax == 7, "EM_EXGETSEL returned cpMax=%d, expected 7\n", cr.cpMax); - - /* Test the actual string */ - getText.cb = 1024; - getText.codepage = CP_ACP; - getText.flags = GT_DEFAULT; - getText.lpDefaultChar = NULL; - getText.lpUsedDefChar = NULL; - SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer); - ok(strcmp(buffer, "\r\r\r\r\r\r ") == 0, - "EM_GETTEXTEX returned incorrect string\n"); - - /* Test number of lines reported after EM_REPLACESEL */ - r = SendMessage(hwndRichEdit, EM_GETLINECOUNT, 0, 0); - ok(r == 7, "EM_GETLINECOUNT returned %d, expected 7\n", r); - - if (!redraw) - /* This is needed to avoid interferring with keybd_event calls - * on other tests that simulate keyboard events. */ - SendMessage(hwndRichEdit, WM_SETREDRAW, TRUE, 0); - - DestroyWindow(hwndRichEdit); -} - -/* Native riched20 inspects the keyboard state (e.g. GetKeyState) - * to test the state of the modifiers (Ctrl/Alt/Shift). - * - * Therefore Ctrl- keystrokes need to be simulated with - * keybd_event or by using SetKeyboardState to set the modifiers - * and SendMessage to simulate the keystrokes. - */ -static LRESULT send_ctrl_key(HWND hwnd, UINT key) -{ - LRESULT result; - hold_key(VK_CONTROL); - result = SendMessage(hwnd, WM_KEYDOWN, key, 1); - release_key(VK_CONTROL); - return result; -} - -static void test_WM_PASTE(void) -{ - int result; - char buffer[1024] = {0}; - const char* text1 = "testing paste\r"; - const char* text1_step1 = "testing paste\r\ntesting paste\r\n"; - const char* text1_after = "testing paste\r\n"; - const char* text2 = "testing paste\r\rtesting paste"; - const char* text2_after = "testing paste\r\n\r\ntesting paste"; - const char* text3 = "testing paste\r\npaste\r\ntesting paste"; - HWND hwndRichEdit = new_richedit(NULL); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text1); - SendMessage(hwndRichEdit, EM_SETSEL, 0, 14); - - send_ctrl_key(hwndRichEdit, 'C'); /* Copy */ - SendMessage(hwndRichEdit, EM_SETSEL, 14, 14); - send_ctrl_key(hwndRichEdit, 'V'); /* Paste */ - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - /* Pasted text should be visible at this step */ - result = strcmp(text1_step1, buffer); - ok(result == 0, - "test paste: strcmp = %i, text='%s'\n", result, buffer); - - send_ctrl_key(hwndRichEdit, 'Z'); /* Undo */ - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - /* Text should be the same as before (except for \r -> \r\n conversion) */ - result = strcmp(text1_after, buffer); - ok(result == 0, - "test paste: strcmp = %i, text='%s'\n", result, buffer); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text2); - SendMessage(hwndRichEdit, EM_SETSEL, 8, 13); - send_ctrl_key(hwndRichEdit, 'C'); /* Copy */ - SendMessage(hwndRichEdit, EM_SETSEL, 14, 14); - send_ctrl_key(hwndRichEdit, 'V'); /* Paste */ - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - /* Pasted text should be visible at this step */ - result = strcmp(text3, buffer); - ok(result == 0, - "test paste: strcmp = %i\n", result); - send_ctrl_key(hwndRichEdit, 'Z'); /* Undo */ - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - /* Text should be the same as before (except for \r -> \r\n conversion) */ - result = strcmp(text2_after, buffer); - ok(result == 0, - "test paste: strcmp = %i\n", result); - send_ctrl_key(hwndRichEdit, 'Y'); /* Redo */ - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - /* Text should revert to post-paste state */ - result = strcmp(buffer,text3); - ok(result == 0, - "test paste: strcmp = %i\n", result); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - /* Send WM_CHAR to simulates Ctrl-V */ - SendMessage(hwndRichEdit, WM_CHAR, 22, - (MapVirtualKey('V', MAPVK_VK_TO_VSC) << 16) | 1); - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - /* Shouldn't paste because pasting is handled by WM_KEYDOWN */ - result = strcmp(buffer,""); - ok(result == 0, - "test paste: strcmp = %i, actual = '%s'\n", result, buffer); - - /* Send keystrokes with WM_KEYDOWN after setting the modifiers - * with SetKeyboard state. */ - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - /* Simulates paste (Ctrl-V) */ - hold_key(VK_CONTROL); - SendMessage(hwndRichEdit, WM_KEYDOWN, 'V', - (MapVirtualKey('V', MAPVK_VK_TO_VSC) << 16) | 1); - release_key(VK_CONTROL); - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - result = strcmp(buffer,"paste"); - ok(result == 0, - "test paste: strcmp = %i, actual = '%s'\n", result, buffer); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text1); - SendMessage(hwndRichEdit, EM_SETSEL, 0, 7); - /* Simulates copy (Ctrl-C) */ - hold_key(VK_CONTROL); - SendMessage(hwndRichEdit, WM_KEYDOWN, 'C', - (MapVirtualKey('C', MAPVK_VK_TO_VSC) << 16) | 1); - release_key(VK_CONTROL); - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - SendMessage(hwndRichEdit, WM_PASTE, 0, 0); - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - result = strcmp(buffer,"testing"); - ok(result == 0, - "test paste: strcmp = %i, actual = '%s'\n", result, buffer); - - /* Cut with WM_KEYDOWN to simulate Ctrl-X */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) "cut"); - /* Simulates select all (Ctrl-A) */ - hold_key(VK_CONTROL); - SendMessage(hwndRichEdit, WM_KEYDOWN, 'A', - (MapVirtualKey('A', MAPVK_VK_TO_VSC) << 16) | 1); - /* Simulates select cut (Ctrl-X) */ - SendMessage(hwndRichEdit, WM_KEYDOWN, 'X', - (MapVirtualKey('X', MAPVK_VK_TO_VSC) << 16) | 1); - release_key(VK_CONTROL); - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - result = strcmp(buffer,""); - ok(result == 0, - "test paste: strcmp = %i, actual = '%s'\n", result, buffer); - SendMessage(hwndRichEdit, WM_SETTEXT, 0, 0); - SendMessage(hwndRichEdit, WM_PASTE, 0, 0); - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - result = strcmp(buffer,"cut\r\n"); - todo_wine ok(result == 0, - "test paste: strcmp = %i, actual = '%s'\n", result, buffer); - /* Simulates undo (Ctrl-Z) */ - hold_key(VK_CONTROL); - SendMessage(hwndRichEdit, WM_KEYDOWN, 'Z', - (MapVirtualKey('Z', MAPVK_VK_TO_VSC) << 16) | 1); - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - result = strcmp(buffer,""); - ok(result == 0, - "test paste: strcmp = %i, actual = '%s'\n", result, buffer); - /* Simulates redo (Ctrl-Y) */ - SendMessage(hwndRichEdit, WM_KEYDOWN, 'Y', - (MapVirtualKey('Y', MAPVK_VK_TO_VSC) << 16) | 1); - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - result = strcmp(buffer,"cut\r\n"); - todo_wine ok(result == 0, - "test paste: strcmp = %i, actual = '%s'\n", result, buffer); - release_key(VK_CONTROL); - - DestroyWindow(hwndRichEdit); -} - -static void test_EM_FORMATRANGE(void) -{ - int r, i, tpp_x, tpp_y; - HDC hdc; - HWND hwndRichEdit = new_richedit(NULL); - FORMATRANGE fr; - BOOL skip_non_english; - static const struct { - const char *string; /* The string */ - int first; /* First 'pagebreak', 0 for don't care */ - int second; /* Second 'pagebreak', 0 for don't care */ - } fmtstrings[] = { - {"WINE wine", 0, 0}, - {"WINE wineWine", 0, 0}, - {"WINE\r\nwine\r\nwine", 5, 10}, - {"WINE\r\nWINEwine\r\nWINEwine", 5, 14}, - {"WINE\r\n\r\nwine\r\nwine", 5, 6} - }; - - skip_non_english = (PRIMARYLANGID(GetUserDefaultLangID()) != LANG_ENGLISH); - if (skip_non_english) - skip("Skipping some tests on non-English platform\n"); - - hdc = GetDC(hwndRichEdit); - ok(hdc != NULL, "Could not get HDC\n"); - - /* Calculate the twips per pixel */ - tpp_x = 1440 / GetDeviceCaps(hdc, LOGPIXELSX); - tpp_y = 1440 / GetDeviceCaps(hdc, LOGPIXELSY); - - /* Test the simple case where all the text fits in the page rect. */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"a"); - fr.hdc = fr.hdcTarget = hdc; - fr.rc.top = fr.rcPage.top = fr.rc.left = fr.rcPage.left = 0; - fr.rc.right = fr.rcPage.right = 500 * tpp_x; - fr.rc.bottom = fr.rcPage.bottom = 500 * tpp_y; - fr.chrg.cpMin = 0; - fr.chrg.cpMax = -1; - r = SendMessage(hwndRichEdit, EM_FORMATRANGE, FALSE, (LPARAM)&fr); - todo_wine ok(r == 2, "r=%d expected r=2\n", r); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"ab"); - fr.rc.bottom = fr.rcPage.bottom; - r = SendMessage(hwndRichEdit, EM_FORMATRANGE, FALSE, (LPARAM)&fr); - todo_wine ok(r == 3, "r=%d expected r=3\n", r); - - SendMessage(hwndRichEdit, EM_FORMATRANGE, FALSE, 0); - - for (i = 0; i < sizeof(fmtstrings)/sizeof(fmtstrings[0]); i++) - { - GETTEXTLENGTHEX gtl; - SIZE stringsize; - int len; - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) fmtstrings[i].string); - - gtl.flags = GTL_NUMCHARS | GTL_PRECISE; - gtl.codepage = CP_ACP; - len = SendMessageA(hwndRichEdit, EM_GETTEXTLENGTHEX, (WPARAM)>l, 0); - - /* Get some size information for the string */ - GetTextExtentPoint32(hdc, fmtstrings[i].string, strlen(fmtstrings[i].string), &stringsize); - - /* Define the box to be half the width needed and a bit larger than the height. - * Changes to the width means we have at least 2 pages. Changes to the height - * is done so we can check the changing of fr.rc.bottom. - */ - fr.hdc = fr.hdcTarget = hdc; - fr.rc.top = fr.rcPage.top = fr.rc.left = fr.rcPage.left = 0; - fr.rc.right = fr.rcPage.right = (stringsize.cx / 2) * tpp_x; - fr.rc.bottom = fr.rcPage.bottom = (stringsize.cy + 10) * tpp_y; - - r = SendMessage(hwndRichEdit, EM_FORMATRANGE, TRUE, 0); - todo_wine { - ok(r == len, "Expected %d, got %d\n", len, r); - } - - /* We know that the page can't hold the full string. See how many characters - * are on the first one - */ - fr.chrg.cpMin = 0; - fr.chrg.cpMax = -1; - r = SendMessage(hwndRichEdit, EM_FORMATRANGE, TRUE, (LPARAM) &fr); - todo_wine { - if (! skip_non_english) - ok(fr.rc.bottom == (stringsize.cy * tpp_y), "Expected bottom to be %d, got %d\n", (stringsize.cy * tpp_y), fr.rc.bottom); - } - if (fmtstrings[i].first) - todo_wine { - ok(r == fmtstrings[i].first, "Expected %d, got %d\n", fmtstrings[i].first, r); - } - else - ok(r < len, "Expected < %d, got %d\n", len, r); - - /* Do another page */ - fr.chrg.cpMin = r; - r = SendMessage(hwndRichEdit, EM_FORMATRANGE, TRUE, (LPARAM) &fr); - if (fmtstrings[i].second) - todo_wine { - ok(r == fmtstrings[i].second, "Expected %d, got %d\n", fmtstrings[i].second, r); - } - else if (! skip_non_english) - ok (r < len, "Expected < %d, got %d\n", len, r); - - /* There is at least on more page, but we don't care */ - - r = SendMessage(hwndRichEdit, EM_FORMATRANGE, TRUE, 0); - todo_wine { - ok(r == len, "Expected %d, got %d\n", len, r); - } - } - - ReleaseDC(NULL, hdc); - DestroyWindow(hwndRichEdit); -} - -static int nCallbackCount = 0; - -static DWORD CALLBACK EditStreamCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, - LONG cb, LONG* pcb) -{ - const char text[] = {'t','e','s','t'}; - - if (sizeof(text) <= cb) - { - if ((int)dwCookie != nCallbackCount) - { - *pcb = 0; - return 0; - } - - memcpy (pbBuff, text, sizeof(text)); - *pcb = sizeof(text); - - nCallbackCount++; - - return 0; - } - else - return 1; /* indicates callback failed */ -} - -static DWORD CALLBACK test_EM_STREAMIN_esCallback(DWORD_PTR dwCookie, - LPBYTE pbBuff, - LONG cb, - LONG *pcb) -{ - const char** str = (const char**)dwCookie; - int size = strlen(*str); - *pcb = cb; - if (*pcb > size) { - *pcb = size; - } - if (*pcb > 0) { - memcpy(pbBuff, *str, *pcb); - *str += *pcb; - } - return 0; -} - -struct StringWithLength { - int length; - char *buffer; -}; - -/* This callback is used to handled the null characters in a string. */ -static DWORD CALLBACK test_EM_STREAMIN_esCallback2(DWORD_PTR dwCookie, - LPBYTE pbBuff, - LONG cb, - LONG *pcb) -{ - struct StringWithLength* str = (struct StringWithLength*)dwCookie; - int size = str->length; - *pcb = cb; - if (*pcb > size) { - *pcb = size; - } - if (*pcb > 0) { - memcpy(pbBuff, str->buffer, *pcb); - str->buffer += *pcb; - str->length -= *pcb; - } - return 0; -} - -static void test_EM_STREAMIN(void) -{ - HWND hwndRichEdit = new_richedit(NULL); - LRESULT result; - EDITSTREAM es; - char buffer[1024] = {0}; - - const char * streamText0 = "{\\rtf1 TestSomeText}"; - const char * streamText0a = "{\\rtf1 TestSomeText\\par}"; - const char * streamText0b = "{\\rtf1 TestSomeText\\par\\par}"; - - const char * streamText1 = - "{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang12298{\\fonttbl{\\f0\\fswiss\\fprq2\\fcharset0 System;}}\r\n" - "\\viewkind4\\uc1\\pard\\f0\\fs17 TestSomeText\\par\r\n" - "}\r\n"; - - /* In richedit 2.0 mode, this should NOT be accepted, unlike 1.0 */ - const char * streamText2 = - "{{\\colortbl;\\red0\\green255\\blue102;\\red255\\green255\\blue255;" - "\\red170\\green255\\blue255;\\red255\\green238\\blue0;\\red51\\green255" - "\\blue221;\\red238\\green238\\blue238;}\\tx0 \\tx424 \\tx848 \\tx1272 " - "\\tx1696 \\tx2120 \\tx2544 \\tx2968 \\tx3392 \\tx3816 \\tx4240 \\tx4664 " - "\\tx5088 \\tx5512 \\tx5936 \\tx6360 \\tx6784 \\tx7208 \\tx7632 \\tx8056 " - "\\tx8480 \\tx8904 \\tx9328 \\tx9752 \\tx10176 \\tx10600 \\tx11024 " - "\\tx11448 \\tx11872 \\tx12296 \\tx12720 \\tx13144 \\cf2 RichEdit1\\line }"; - - const char * streamText3 = "RichEdit1"; - - const char * streamText4 = - "This text just needs to be long enough to cause run to be split onto " - "two separate lines and make sure the null terminating character is " - "handled properly.\0"; - int length4 = strlen(streamText4) + 1; - struct StringWithLength cookieForStream4 = { - length4, - (char *)streamText4, - }; - - const WCHAR streamText5[] = { 'T', 'e', 's', 't', 'S', 'o', 'm', 'e', 'T', 'e', 'x', 't' }; - int length5 = sizeof(streamText5) / sizeof(WCHAR); - struct StringWithLength cookieForStream5 = { - sizeof(streamText5), - (char *)streamText5, - }; - - /* Minimal test without \par at the end */ - es.dwCookie = (DWORD_PTR)&streamText0; - es.dwError = 0; - es.pfnCallback = test_EM_STREAMIN_esCallback; - result = SendMessage(hwndRichEdit, EM_STREAMIN, SF_RTF, (LPARAM)&es); - ok(result == 12, "got %ld, expected %d\n", result, 12); - - result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok (result == 12, - "EM_STREAMIN: Test 0 returned %ld, expected 12\n", result); - result = strcmp (buffer,"TestSomeText"); - ok (result == 0, - "EM_STREAMIN: Test 0 set wrong text: Result: %s\n",buffer); - ok(es.dwError == 0, "EM_STREAMIN: Test 0 set error %d, expected %d\n", es.dwError, 0); - - /* Native richedit 2.0 ignores last \par */ - es.dwCookie = (DWORD_PTR)&streamText0a; - es.dwError = 0; - es.pfnCallback = test_EM_STREAMIN_esCallback; - result = SendMessage(hwndRichEdit, EM_STREAMIN, SF_RTF, (LPARAM)&es); - ok(result == 12, "got %ld, expected %d\n", result, 12); - - result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok (result == 12, - "EM_STREAMIN: Test 0-a returned %ld, expected 12\n", result); - result = strcmp (buffer,"TestSomeText"); - ok (result == 0, - "EM_STREAMIN: Test 0-a set wrong text: Result: %s\n",buffer); - ok(es.dwError == 0, "EM_STREAMIN: Test 0-a set error %d, expected %d\n", es.dwError, 0); - - /* Native richedit 2.0 ignores last \par, next-to-last \par appears */ - es.dwCookie = (DWORD_PTR)&streamText0b; - es.dwError = 0; - es.pfnCallback = test_EM_STREAMIN_esCallback; - result = SendMessage(hwndRichEdit, EM_STREAMIN, SF_RTF, (LPARAM)&es); - ok(result == 13, "got %ld, expected %d\n", result, 13); - - result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok (result == 14, - "EM_STREAMIN: Test 0-b returned %ld, expected 14\n", result); - result = strcmp (buffer,"TestSomeText\r\n"); - ok (result == 0, - "EM_STREAMIN: Test 0-b set wrong text: Result: %s\n",buffer); - ok(es.dwError == 0, "EM_STREAMIN: Test 0-b set error %d, expected %d\n", es.dwError, 0); - - es.dwCookie = (DWORD_PTR)&streamText1; - es.dwError = 0; - es.pfnCallback = test_EM_STREAMIN_esCallback; - result = SendMessage(hwndRichEdit, EM_STREAMIN, SF_RTF, (LPARAM)&es); - ok(result == 12, "got %ld, expected %d\n", result, 12); - - result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok (result == 12, - "EM_STREAMIN: Test 1 returned %ld, expected 12\n", result); - result = strcmp (buffer,"TestSomeText"); - ok (result == 0, - "EM_STREAMIN: Test 1 set wrong text: Result: %s\n",buffer); - ok(es.dwError == 0, "EM_STREAMIN: Test 1 set error %d, expected %d\n", es.dwError, 0); - - es.dwCookie = (DWORD_PTR)&streamText2; - es.dwError = 0; - result = SendMessage(hwndRichEdit, EM_STREAMIN, SF_RTF, (LPARAM)&es); - ok(result == 0, "got %ld, expected %d\n", result, 0); - - result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok (result == 0, - "EM_STREAMIN: Test 2 returned %ld, expected 0\n", result); - ok (strlen(buffer) == 0, - "EM_STREAMIN: Test 2 set wrong text: Result: %s\n",buffer); - ok(es.dwError == -16, "EM_STREAMIN: Test 2 set error %d, expected %d\n", es.dwError, -16); - - es.dwCookie = (DWORD_PTR)&streamText3; - es.dwError = 0; - result = SendMessage(hwndRichEdit, EM_STREAMIN, SF_RTF, (LPARAM)&es); - ok(result == 0, "got %ld, expected %d\n", result, 0); - - result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok (result == 0, - "EM_STREAMIN: Test 3 returned %ld, expected 0\n", result); - ok (strlen(buffer) == 0, - "EM_STREAMIN: Test 3 set wrong text: Result: %s\n",buffer); - ok(es.dwError == -16, "EM_STREAMIN: Test 3 set error %d, expected %d\n", es.dwError, -16); - - es.dwCookie = (DWORD_PTR)&cookieForStream4; - es.dwError = 0; - es.pfnCallback = test_EM_STREAMIN_esCallback2; - result = SendMessage(hwndRichEdit, EM_STREAMIN, SF_TEXT, (LPARAM)&es); - ok(result == length4, "got %ld, expected %d\n", result, length4); - - result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok (result == length4, - "EM_STREAMIN: Test 4 returned %ld, expected %d\n", result, length4); - ok(es.dwError == 0, "EM_STREAMIN: Test 4 set error %d, expected %d\n", es.dwError, 0); - - es.dwCookie = (DWORD_PTR)&cookieForStream5; - es.dwError = 0; - es.pfnCallback = test_EM_STREAMIN_esCallback2; - result = SendMessage(hwndRichEdit, EM_STREAMIN, SF_TEXT | SF_UNICODE, (LPARAM)&es); - ok(result == sizeof(streamText5), "got %ld, expected %u\n", result, (UINT)sizeof(streamText5)); - - result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok (result == length5, - "EM_STREAMIN: Test 4 returned %ld, expected %d\n", result, length5); - ok(es.dwError == 0, "EM_STREAMIN: Test 5 set error %d, expected %d\n", es.dwError, 0); - - DestroyWindow(hwndRichEdit); -} - -static void test_EM_StreamIn_Undo(void) -{ - /* The purpose of this test is to determine when a EM_StreamIn should be - * undoable. This is important because WM_PASTE currently uses StreamIn and - * pasting should always be undoable but streaming isn't always. - * - * cases to test: - * StreamIn plain text without SFF_SELECTION. - * StreamIn plain text with SFF_SELECTION set but a zero-length selection - * StreamIn plain text with SFF_SELECTION and a valid, normal selection - * StreamIn plain text with SFF_SELECTION and a backwards-selection (from>to) - * Feel free to add tests for other text modes or StreamIn things. - */ - - - HWND hwndRichEdit = new_richedit(NULL); - LRESULT result; - EDITSTREAM es; - char buffer[1024] = {0}; - const char randomtext[] = "Some text"; - - es.pfnCallback = (EDITSTREAMCALLBACK) EditStreamCallback; - - /* StreamIn, no SFF_SELECTION */ - es.dwCookie = nCallbackCount; - SendMessage(hwndRichEdit,EM_EMPTYUNDOBUFFER, 0,0); - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) randomtext); - SendMessage(hwndRichEdit, EM_SETSEL,0,0); - SendMessage(hwndRichEdit, EM_STREAMIN, SF_TEXT, (LPARAM)&es); - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - result = strcmp (buffer,"test"); - ok (result == 0, - "EM_STREAMIN: Test 1 set wrong text: Result: %s\n",buffer); - - result = SendMessage(hwndRichEdit, EM_CANUNDO, 0, 0); - ok (result == FALSE, - "EM_STREAMIN without SFF_SELECTION wrongly allows undo\n"); - - /* StreamIn, SFF_SELECTION, but nothing selected */ - es.dwCookie = nCallbackCount; - SendMessage(hwndRichEdit,EM_EMPTYUNDOBUFFER, 0,0); - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) randomtext); - SendMessage(hwndRichEdit, EM_SETSEL,0,0); - SendMessage(hwndRichEdit, EM_STREAMIN, SF_TEXT|SFF_SELECTION, (LPARAM)&es); - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - result = strcmp (buffer,"testSome text"); - ok (result == 0, - "EM_STREAMIN: Test 2 set wrong text: Result: %s\n",buffer); - - result = SendMessage(hwndRichEdit, EM_CANUNDO, 0, 0); - ok (result == TRUE, - "EM_STREAMIN with SFF_SELECTION but no selection set " - "should create an undo\n"); - - /* StreamIn, SFF_SELECTION, with a selection */ - es.dwCookie = nCallbackCount; - SendMessage(hwndRichEdit,EM_EMPTYUNDOBUFFER, 0,0); - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) randomtext); - SendMessage(hwndRichEdit, EM_SETSEL,4,5); - SendMessage(hwndRichEdit, EM_STREAMIN, SF_TEXT|SFF_SELECTION, (LPARAM)&es); - SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - result = strcmp (buffer,"Sometesttext"); - ok (result == 0, - "EM_STREAMIN: Test 2 set wrong text: Result: %s\n",buffer); - - result = SendMessage(hwndRichEdit, EM_CANUNDO, 0, 0); - ok (result == TRUE, - "EM_STREAMIN with SFF_SELECTION and selection set " - "should create an undo\n"); - - DestroyWindow(hwndRichEdit); -} - -static BOOL is_em_settextex_supported(HWND hwnd) -{ - SETTEXTEX stex = { ST_DEFAULT, CP_ACP }; - return SendMessageA(hwnd, EM_SETTEXTEX, (WPARAM)&stex, 0) != 0; -} - -static void test_unicode_conversions(void) -{ - static const WCHAR tW[] = {'t',0}; - static const WCHAR teW[] = {'t','e',0}; - static const WCHAR textW[] = {'t','e','s','t',0}; - static const char textA[] = "test"; - char bufA[64]; - WCHAR bufW[64]; - HWND hwnd; - int em_settextex_supported, ret; - -#define set_textA(hwnd, wm_set_text, txt) \ - do { \ - SETTEXTEX stex = { ST_DEFAULT, CP_ACP }; \ - WPARAM wparam = (wm_set_text == WM_SETTEXT) ? 0 : (WPARAM)&stex; \ - assert(wm_set_text == WM_SETTEXT || wm_set_text == EM_SETTEXTEX); \ - ret = SendMessageA(hwnd, wm_set_text, wparam, (LPARAM)txt); \ - ok(ret, "SendMessageA(%02x) error %u\n", wm_set_text, GetLastError()); \ - } while(0) -#define expect_textA(hwnd, wm_get_text, txt) \ - do { \ - GETTEXTEX gtex = { 64, GT_DEFAULT, CP_ACP, NULL, NULL }; \ - WPARAM wparam = (wm_get_text == WM_GETTEXT) ? 64 : (WPARAM)>ex; \ - assert(wm_get_text == WM_GETTEXT || wm_get_text == EM_GETTEXTEX); \ - memset(bufA, 0xAA, sizeof(bufA)); \ - ret = SendMessageA(hwnd, wm_get_text, wparam, (LPARAM)bufA); \ - ok(ret, "SendMessageA(%02x) error %u\n", wm_get_text, GetLastError()); \ - ret = lstrcmpA(bufA, txt); \ - ok(!ret, "%02x: strings do not match: expected %s got %s\n", wm_get_text, txt, bufA); \ - } while(0) - -#define set_textW(hwnd, wm_set_text, txt) \ - do { \ - SETTEXTEX stex = { ST_DEFAULT, 1200 }; \ - WPARAM wparam = (wm_set_text == WM_SETTEXT) ? 0 : (WPARAM)&stex; \ - assert(wm_set_text == WM_SETTEXT || wm_set_text == EM_SETTEXTEX); \ - ret = SendMessageW(hwnd, wm_set_text, wparam, (LPARAM)txt); \ - ok(ret, "SendMessageW(%02x) error %u\n", wm_set_text, GetLastError()); \ - } while(0) -#define expect_textW(hwnd, wm_get_text, txt) \ - do { \ - GETTEXTEX gtex = { 64, GT_DEFAULT, 1200, NULL, NULL }; \ - WPARAM wparam = (wm_get_text == WM_GETTEXT) ? 64 : (WPARAM)>ex; \ - assert(wm_get_text == WM_GETTEXT || wm_get_text == EM_GETTEXTEX); \ - memset(bufW, 0xAA, sizeof(bufW)); \ - ret = SendMessageW(hwnd, wm_get_text, wparam, (LPARAM)bufW); \ - ok(ret, "SendMessageW(%02x) error %u\n", wm_get_text, GetLastError()); \ - ret = lstrcmpW(bufW, txt); \ - ok(!ret, "%02x: strings do not match: expected[0] %x got[0] %x\n", wm_get_text, txt[0], bufW[0]); \ - } while(0) -#define expect_empty(hwnd, wm_get_text) \ - do { \ - GETTEXTEX gtex = { 64, GT_DEFAULT, CP_ACP, NULL, NULL }; \ - WPARAM wparam = (wm_get_text == WM_GETTEXT) ? 64 : (WPARAM)>ex; \ - assert(wm_get_text == WM_GETTEXT || wm_get_text == EM_GETTEXTEX); \ - memset(bufA, 0xAA, sizeof(bufA)); \ - ret = SendMessageA(hwnd, wm_get_text, wparam, (LPARAM)bufA); \ - ok(!ret, "empty richedit should return 0, got %d\n", ret); \ - ok(!*bufA, "empty richedit should return empty string, got %s\n", bufA); \ - } while(0) - - hwnd = CreateWindowExA(0, "RichEdit20W", NULL, WS_POPUP, - 0, 0, 200, 60, 0, 0, 0, 0); - ok(hwnd != 0, "CreateWindowExA error %u\n", GetLastError()); - - ret = IsWindowUnicode(hwnd); - ok(ret, "RichEdit20W should be unicode under NT\n"); - - /* EM_SETTEXTEX is supported starting from version 3.0 */ - em_settextex_supported = is_em_settextex_supported(hwnd); - trace("EM_SETTEXTEX is %ssupported on this platform\n", - em_settextex_supported ? "" : "NOT "); - - expect_empty(hwnd, WM_GETTEXT); - expect_empty(hwnd, EM_GETTEXTEX); - - ret = SendMessageA(hwnd, WM_CHAR, textW[0], 0); - ok(!ret, "SendMessageA(WM_CHAR) should return 0, got %d\n", ret); - expect_textA(hwnd, WM_GETTEXT, "t"); - expect_textA(hwnd, EM_GETTEXTEX, "t"); - expect_textW(hwnd, EM_GETTEXTEX, tW); - - ret = SendMessageA(hwnd, WM_CHAR, textA[1], 0); - ok(!ret, "SendMessageA(WM_CHAR) should return 0, got %d\n", ret); - expect_textA(hwnd, WM_GETTEXT, "te"); - expect_textA(hwnd, EM_GETTEXTEX, "te"); - expect_textW(hwnd, EM_GETTEXTEX, teW); - - set_textA(hwnd, WM_SETTEXT, NULL); - expect_empty(hwnd, WM_GETTEXT); - expect_empty(hwnd, EM_GETTEXTEX); - - set_textA(hwnd, WM_SETTEXT, textA); - expect_textA(hwnd, WM_GETTEXT, textA); - expect_textA(hwnd, EM_GETTEXTEX, textA); - expect_textW(hwnd, EM_GETTEXTEX, textW); - - if (em_settextex_supported) - { - set_textA(hwnd, EM_SETTEXTEX, textA); - expect_textA(hwnd, WM_GETTEXT, textA); - expect_textA(hwnd, EM_GETTEXTEX, textA); - expect_textW(hwnd, EM_GETTEXTEX, textW); - } - - set_textW(hwnd, WM_SETTEXT, textW); - expect_textW(hwnd, WM_GETTEXT, textW); - expect_textA(hwnd, WM_GETTEXT, textA); - expect_textW(hwnd, EM_GETTEXTEX, textW); - expect_textA(hwnd, EM_GETTEXTEX, textA); - - if (em_settextex_supported) - { - set_textW(hwnd, EM_SETTEXTEX, textW); - expect_textW(hwnd, WM_GETTEXT, textW); - expect_textA(hwnd, WM_GETTEXT, textA); - expect_textW(hwnd, EM_GETTEXTEX, textW); - expect_textA(hwnd, EM_GETTEXTEX, textA); - } - DestroyWindow(hwnd); - - hwnd = CreateWindowExA(0, "RichEdit20A", NULL, WS_POPUP, - 0, 0, 200, 60, 0, 0, 0, 0); - ok(hwnd != 0, "CreateWindowExA error %u\n", GetLastError()); - - ret = IsWindowUnicode(hwnd); - ok(!ret, "RichEdit20A should NOT be unicode\n"); - - set_textA(hwnd, WM_SETTEXT, textA); - expect_textA(hwnd, WM_GETTEXT, textA); - expect_textA(hwnd, EM_GETTEXTEX, textA); - expect_textW(hwnd, EM_GETTEXTEX, textW); - - if (em_settextex_supported) - { - set_textA(hwnd, EM_SETTEXTEX, textA); - expect_textA(hwnd, WM_GETTEXT, textA); - expect_textA(hwnd, EM_GETTEXTEX, textA); - expect_textW(hwnd, EM_GETTEXTEX, textW); - } - - set_textW(hwnd, WM_SETTEXT, textW); - expect_textW(hwnd, WM_GETTEXT, textW); - expect_textA(hwnd, WM_GETTEXT, textA); - expect_textW(hwnd, EM_GETTEXTEX, textW); - expect_textA(hwnd, EM_GETTEXTEX, textA); - - if (em_settextex_supported) - { - set_textW(hwnd, EM_SETTEXTEX, textW); - expect_textW(hwnd, WM_GETTEXT, textW); - expect_textA(hwnd, WM_GETTEXT, textA); - expect_textW(hwnd, EM_GETTEXTEX, textW); - expect_textA(hwnd, EM_GETTEXTEX, textA); - } - DestroyWindow(hwnd); -} - -static void test_WM_CHAR(void) -{ - HWND hwnd; - int ret; - const char * char_list = "abc\rabc\r"; - const char * expected_content_single = "abcabc"; - const char * expected_content_multi = "abc\r\nabc\r\n"; - char buffer[64] = {0}; - const char * p; - - /* single-line control must IGNORE carriage returns */ - hwnd = CreateWindowExA(0, "RichEdit20W", NULL, WS_POPUP, - 0, 0, 200, 60, 0, 0, 0, 0); - ok(hwnd != 0, "CreateWindowExA error %u\n", GetLastError()); - - p = char_list; - while (*p != '\0') { - SendMessageA(hwnd, WM_KEYDOWN, *p, 1); - ret = SendMessageA(hwnd, WM_CHAR, *p, 1); - ok(ret == 0, "WM_CHAR('%c') ret=%d\n", *p, ret); - SendMessageA(hwnd, WM_KEYUP, *p, 1); - p++; - } - - SendMessage(hwnd, WM_GETTEXT, sizeof(buffer), (LPARAM)buffer); - ret = strcmp(buffer, expected_content_single); - ok(ret == 0, "WM_GETTEXT recovered incorrect string!\n"); - - DestroyWindow(hwnd); - - /* multi-line control inserts CR normally */ - hwnd = CreateWindowExA(0, "RichEdit20W", NULL, WS_POPUP|ES_MULTILINE, - 0, 0, 200, 60, 0, 0, 0, 0); - ok(hwnd != 0, "CreateWindowExA error %u\n", GetLastError()); - - p = char_list; - while (*p != '\0') { - SendMessageA(hwnd, WM_KEYDOWN, *p, 1); - ret = SendMessageA(hwnd, WM_CHAR, *p, 1); - ok(ret == 0, "WM_CHAR('%c') ret=%d\n", *p, ret); - SendMessageA(hwnd, WM_KEYUP, *p, 1); - p++; - } - - SendMessage(hwnd, WM_GETTEXT, sizeof(buffer), (LPARAM)buffer); - ret = strcmp(buffer, expected_content_multi); - ok(ret == 0, "WM_GETTEXT recovered incorrect string!\n"); - - DestroyWindow(hwnd); -} - -static void test_EM_GETTEXTLENGTHEX(void) -{ - HWND hwnd; - GETTEXTLENGTHEX gtl; - int ret; - const char * base_string = "base string"; - const char * test_string = "a\nb\n\n\r\n"; - const char * test_string_after = "a"; - const char * test_string_2 = "a\rtest\rstring"; - char buffer[64] = {0}; - - /* single line */ - hwnd = CreateWindowExA(0, "RichEdit20W", NULL, WS_POPUP, - 0, 0, 200, 60, 0, 0, 0, 0); - ok(hwnd != 0, "CreateWindowExA error %u\n", GetLastError()); - - gtl.flags = GTL_NUMCHARS | GTL_PRECISE | GTL_USECRLF; - gtl.codepage = CP_ACP; - ret = SendMessageA(hwnd, EM_GETTEXTLENGTHEX, (WPARAM)>l, 0); - ok(ret == 0, "ret %d\n",ret); - - gtl.flags = GTL_NUMCHARS | GTL_PRECISE; - gtl.codepage = CP_ACP; - ret = SendMessageA(hwnd, EM_GETTEXTLENGTHEX, (WPARAM)>l, 0); - ok(ret == 0, "ret %d\n",ret); - - SendMessage(hwnd, WM_SETTEXT, 0, (LPARAM) base_string); - - gtl.flags = GTL_NUMCHARS | GTL_PRECISE | GTL_USECRLF; - gtl.codepage = CP_ACP; - ret = SendMessageA(hwnd, EM_GETTEXTLENGTHEX, (WPARAM)>l, 0); - ok(ret == strlen(base_string), "ret %d\n",ret); - - gtl.flags = GTL_NUMCHARS | GTL_PRECISE; - gtl.codepage = CP_ACP; - ret = SendMessageA(hwnd, EM_GETTEXTLENGTHEX, (WPARAM)>l, 0); - ok(ret == strlen(base_string), "ret %d\n",ret); - - SendMessage(hwnd, WM_SETTEXT, 0, (LPARAM) test_string); - - gtl.flags = GTL_NUMCHARS | GTL_PRECISE | GTL_USECRLF; - gtl.codepage = CP_ACP; - ret = SendMessageA(hwnd, EM_GETTEXTLENGTHEX, (WPARAM)>l, 0); - ok(ret == 1, "ret %d\n",ret); - - gtl.flags = GTL_NUMCHARS | GTL_PRECISE; - gtl.codepage = CP_ACP; - ret = SendMessageA(hwnd, EM_GETTEXTLENGTHEX, (WPARAM)>l, 0); - ok(ret == 1, "ret %d\n",ret); - - SendMessage(hwnd, WM_GETTEXT, sizeof(buffer), (LPARAM)buffer); - ret = strcmp(buffer, test_string_after); - ok(ret == 0, "WM_GETTEXT recovered incorrect string!\n"); - - DestroyWindow(hwnd); - - /* multi line */ - hwnd = CreateWindowExA(0, "RichEdit20W", NULL, WS_POPUP | ES_MULTILINE, - 0, 0, 200, 60, 0, 0, 0, 0); - ok(hwnd != 0, "CreateWindowExA error %u\n", GetLastError()); - - gtl.flags = GTL_NUMCHARS | GTL_PRECISE | GTL_USECRLF; - gtl.codepage = CP_ACP; - ret = SendMessageA(hwnd, EM_GETTEXTLENGTHEX, (WPARAM)>l, 0); - ok(ret == 0, "ret %d\n",ret); - - gtl.flags = GTL_NUMCHARS | GTL_PRECISE; - gtl.codepage = CP_ACP; - ret = SendMessageA(hwnd, EM_GETTEXTLENGTHEX, (WPARAM)>l, 0); - ok(ret == 0, "ret %d\n",ret); - - SendMessage(hwnd, WM_SETTEXT, 0, (LPARAM) base_string); - - gtl.flags = GTL_NUMCHARS | GTL_PRECISE | GTL_USECRLF; - gtl.codepage = CP_ACP; - ret = SendMessageA(hwnd, EM_GETTEXTLENGTHEX, (WPARAM)>l, 0); - ok(ret == strlen(base_string), "ret %d\n",ret); - - gtl.flags = GTL_NUMCHARS | GTL_PRECISE; - gtl.codepage = CP_ACP; - ret = SendMessageA(hwnd, EM_GETTEXTLENGTHEX, (WPARAM)>l, 0); - ok(ret == strlen(base_string), "ret %d\n",ret); - - SendMessage(hwnd, WM_SETTEXT, 0, (LPARAM) test_string_2); - - gtl.flags = GTL_NUMCHARS | GTL_PRECISE | GTL_USECRLF; - gtl.codepage = CP_ACP; - ret = SendMessageA(hwnd, EM_GETTEXTLENGTHEX, (WPARAM)>l, 0); - ok(ret == strlen(test_string_2) + 2, "ret %d\n",ret); - - gtl.flags = GTL_NUMCHARS | GTL_PRECISE; - gtl.codepage = CP_ACP; - ret = SendMessageA(hwnd, EM_GETTEXTLENGTHEX, (WPARAM)>l, 0); - ok(ret == strlen(test_string_2), "ret %d\n",ret); - - SendMessage(hwnd, WM_SETTEXT, 0, (LPARAM) test_string); - - gtl.flags = GTL_NUMCHARS | GTL_PRECISE | GTL_USECRLF; - gtl.codepage = CP_ACP; - ret = SendMessageA(hwnd, EM_GETTEXTLENGTHEX, (WPARAM)>l, 0); - ok(ret == 10, "ret %d\n",ret); - - gtl.flags = GTL_NUMCHARS | GTL_PRECISE; - gtl.codepage = CP_ACP; - ret = SendMessageA(hwnd, EM_GETTEXTLENGTHEX, (WPARAM)>l, 0); - ok(ret == 6, "ret %d\n",ret); - - /* Unicode/NUMCHARS/NUMBYTES */ - SendMessage(hwnd, WM_SETTEXT, 0, (LPARAM) test_string_2); - - gtl.flags = GTL_DEFAULT; - gtl.codepage = 1200; - ret = SendMessage(hwnd, EM_GETTEXTLENGTHEX, (WPARAM) >l, 0); - ok(ret == lstrlen(test_string_2), - "GTL_DEFAULT gave %i, expected %i\n", ret, lstrlen(test_string_2)); - - gtl.flags = GTL_NUMCHARS; - gtl.codepage = 1200; - ret = SendMessage(hwnd, EM_GETTEXTLENGTHEX, (WPARAM) >l, 0); - ok(ret == lstrlen(test_string_2), - "GTL_NUMCHARS gave %i, expected %i\n", ret, lstrlen(test_string_2)); - - gtl.flags = GTL_NUMBYTES; - gtl.codepage = 1200; - ret = SendMessage(hwnd, EM_GETTEXTLENGTHEX, (WPARAM) >l, 0); - ok(ret == lstrlen(test_string_2)*2, - "GTL_NUMBYTES gave %i, expected %i\n", ret, lstrlen(test_string_2)*2); - - gtl.flags = GTL_PRECISE; - gtl.codepage = 1200; - ret = SendMessage(hwnd, EM_GETTEXTLENGTHEX, (WPARAM) >l, 0); - ok(ret == lstrlen(test_string_2)*2, - "GTL_PRECISE gave %i, expected %i\n", ret, lstrlen(test_string_2)*2); - - gtl.flags = GTL_NUMCHARS | GTL_PRECISE; - gtl.codepage = 1200; - ret = SendMessage(hwnd, EM_GETTEXTLENGTHEX, (WPARAM) >l, 0); - ok(ret == lstrlen(test_string_2), - "GTL_NUMCHAR | GTL_PRECISE gave %i, expected %i\n", ret, lstrlen(test_string_2)); - - gtl.flags = GTL_NUMCHARS | GTL_NUMBYTES; - gtl.codepage = 1200; - ret = SendMessage(hwnd, EM_GETTEXTLENGTHEX, (WPARAM) >l, 0); - ok(ret == E_INVALIDARG, - "GTL_NUMCHARS | GTL_NUMBYTES gave %i, expected %i\n", ret, E_INVALIDARG); - - DestroyWindow(hwnd); -} - - -/* globals that parent and child access when checking event masks & notifications */ -static HWND eventMaskEditHwnd = 0; -static int queriedEventMask; -static int watchForEventMask = 0; - -/* parent proc that queries the edit's event mask when it gets a WM_COMMAND */ -static LRESULT WINAPI ParentMsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - if(message == WM_COMMAND && (watchForEventMask & (wParam >> 16))) - { - queriedEventMask = SendMessage(eventMaskEditHwnd, EM_GETEVENTMASK, 0, 0); - } - return DefWindowProcA(hwnd, message, wParam, lParam); -} - -/* test event masks in combination with WM_COMMAND */ -static void test_eventMask(void) -{ - HWND parent; - int ret, style; - WNDCLASSA cls; - const char text[] = "foo bar\n"; - int eventMask; - - /* register class to capture WM_COMMAND */ - cls.style = 0; - cls.lpfnWndProc = ParentMsgCheckProcA; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(0); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "EventMaskParentClass"; - if(!RegisterClassA(&cls)) assert(0); - - parent = CreateWindow(cls.lpszClassName, NULL, WS_POPUP|WS_VISIBLE, - 0, 0, 200, 60, NULL, NULL, NULL, NULL); - ok (parent != 0, "Failed to create parent window\n"); - - eventMaskEditHwnd = new_richedit(parent); - ok(eventMaskEditHwnd != 0, "Failed to create edit window\n"); - - eventMask = ENM_CHANGE | ENM_UPDATE; - ret = SendMessage(eventMaskEditHwnd, EM_SETEVENTMASK, 0, eventMask); - ok(ret == ENM_NONE, "wrong event mask\n"); - ret = SendMessage(eventMaskEditHwnd, EM_GETEVENTMASK, 0, 0); - ok(ret == eventMask, "failed to set event mask\n"); - - /* check what happens when we ask for EN_CHANGE and send WM_SETTEXT */ - queriedEventMask = 0; /* initialize to something other than we expect */ - watchForEventMask = EN_CHANGE; - ret = SendMessage(eventMaskEditHwnd, WM_SETTEXT, 0, (LPARAM) text); - ok(ret == TRUE, "failed to set text\n"); - /* richedit should mask off ENM_CHANGE when it sends an EN_CHANGE - notification in response to WM_SETTEXT */ - ok(queriedEventMask == (eventMask & ~ENM_CHANGE), - "wrong event mask (0x%x) during WM_COMMAND\n", queriedEventMask); - - /* check to see if EN_CHANGE is sent when redraw is turned off */ - SendMessage(eventMaskEditHwnd, WM_CLEAR, 0, 0); - ok(IsWindowVisible(eventMaskEditHwnd), "Window should be visible.\n"); - SendMessage(eventMaskEditHwnd, WM_SETREDRAW, FALSE, 0); - /* redraw is disabled by making the window invisible. */ - ok(!IsWindowVisible(eventMaskEditHwnd), "Window shouldn't be visible.\n"); - queriedEventMask = 0; /* initialize to something other than we expect */ - SendMessage(eventMaskEditHwnd, EM_REPLACESEL, 0, (LPARAM) text); - ok(queriedEventMask == (eventMask & ~ENM_CHANGE), - "wrong event mask (0x%x) during WM_COMMAND\n", queriedEventMask); - SendMessage(eventMaskEditHwnd, WM_SETREDRAW, TRUE, 0); - ok(IsWindowVisible(eventMaskEditHwnd), "Window should be visible.\n"); - - /* check to see if EN_UPDATE is sent when the editor isn't visible */ - SendMessage(eventMaskEditHwnd, WM_CLEAR, 0, 0); - style = GetWindowLong(eventMaskEditHwnd, GWL_STYLE); - SetWindowLong(eventMaskEditHwnd, GWL_STYLE, style & ~WS_VISIBLE); - ok(!IsWindowVisible(eventMaskEditHwnd), "Window shouldn't be visible.\n"); - watchForEventMask = EN_UPDATE; - queriedEventMask = 0; /* initialize to something other than we expect */ - SendMessage(eventMaskEditHwnd, EM_REPLACESEL, 0, (LPARAM) text); - ok(queriedEventMask == 0, - "wrong event mask (0x%x) during WM_COMMAND\n", queriedEventMask); - SetWindowLong(eventMaskEditHwnd, GWL_STYLE, style); - ok(IsWindowVisible(eventMaskEditHwnd), "Window should be visible.\n"); - queriedEventMask = 0; /* initialize to something other than we expect */ - SendMessage(eventMaskEditHwnd, EM_REPLACESEL, 0, (LPARAM) text); - ok(queriedEventMask == eventMask, - "wrong event mask (0x%x) during WM_COMMAND\n", queriedEventMask); - - - DestroyWindow(parent); -} - -static int received_WM_NOTIFY = 0; -static int modify_at_WM_NOTIFY = 0; -static BOOL filter_on_WM_NOTIFY = FALSE; -static HWND hwndRichedit_WM_NOTIFY; - -static LRESULT WINAPI WM_NOTIFY_ParentMsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - if(message == WM_NOTIFY) - { - received_WM_NOTIFY = 1; - modify_at_WM_NOTIFY = SendMessage(hwndRichedit_WM_NOTIFY, EM_GETMODIFY, 0, 0); - if (filter_on_WM_NOTIFY) return TRUE; - } - return DefWindowProcA(hwnd, message, wParam, lParam); -} - -static void test_WM_NOTIFY(void) -{ - HWND parent; - WNDCLASSA cls; - CHARFORMAT2 cf2; - int sel_start, sel_end; - - /* register class to capture WM_NOTIFY */ - cls.style = 0; - cls.lpfnWndProc = WM_NOTIFY_ParentMsgCheckProcA; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(0); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "WM_NOTIFY_ParentClass"; - if(!RegisterClassA(&cls)) assert(0); - - parent = CreateWindow(cls.lpszClassName, NULL, WS_POPUP|WS_VISIBLE, - 0, 0, 200, 60, NULL, NULL, NULL, NULL); - ok (parent != 0, "Failed to create parent window\n"); - - hwndRichedit_WM_NOTIFY = new_richedit(parent); - ok(hwndRichedit_WM_NOTIFY != 0, "Failed to create edit window\n"); - - SendMessage(hwndRichedit_WM_NOTIFY, EM_SETEVENTMASK, 0, ENM_SELCHANGE); - - /* Notifications for selection change should only be sent when selection - actually changes. EM_SETCHARFORMAT is one message that calls - ME_CommitUndo, which should check whether message should be sent */ - received_WM_NOTIFY = 0; - cf2.cbSize = sizeof(CHARFORMAT2); - SendMessage(hwndRichedit_WM_NOTIFY, EM_GETCHARFORMAT, SCF_DEFAULT, (LPARAM)&cf2); - cf2.dwMask = CFM_ITALIC | cf2.dwMask; - cf2.dwEffects = CFE_ITALIC ^ cf2.dwEffects; - SendMessage(hwndRichedit_WM_NOTIFY, EM_SETCHARFORMAT, 0, (LPARAM) &cf2); - ok(received_WM_NOTIFY == 0, "Unexpected WM_NOTIFY was sent!\n"); - - /* WM_SETTEXT should NOT cause a WM_NOTIFY to be sent when selection is - already at 0. */ - received_WM_NOTIFY = 0; - modify_at_WM_NOTIFY = 0; - SendMessage(hwndRichedit_WM_NOTIFY, WM_SETTEXT, 0, (LPARAM)"sometext"); - ok(received_WM_NOTIFY == 0, "Unexpected WM_NOTIFY was sent!\n"); - ok(modify_at_WM_NOTIFY == 0, "WM_NOTIFY callback saw text flagged as modified!\n"); - - received_WM_NOTIFY = 0; - modify_at_WM_NOTIFY = 0; - SendMessage(hwndRichedit_WM_NOTIFY, EM_SETSEL, 4, 4); - ok(received_WM_NOTIFY == 1, "Expected WM_NOTIFY was NOT sent!\n"); - - received_WM_NOTIFY = 0; - modify_at_WM_NOTIFY = 0; - SendMessage(hwndRichedit_WM_NOTIFY, WM_SETTEXT, 0, (LPARAM)"sometext"); - ok(received_WM_NOTIFY == 1, "Expected WM_NOTIFY was NOT sent!\n"); - ok(modify_at_WM_NOTIFY == 0, "WM_NOTIFY callback saw text flagged as modified!\n"); - - /* Test for WM_NOTIFY messages with redraw disabled. */ - SendMessage(hwndRichedit_WM_NOTIFY, EM_SETSEL, 0, 0); - SendMessage(hwndRichedit_WM_NOTIFY, WM_SETREDRAW, FALSE, 0); - received_WM_NOTIFY = 0; - SendMessage(hwndRichedit_WM_NOTIFY, EM_REPLACESEL, FALSE, (LPARAM)"inserted"); - ok(received_WM_NOTIFY == 1, "Expected WM_NOTIFY was NOT sent!\n"); - SendMessage(hwndRichedit_WM_NOTIFY, WM_SETREDRAW, TRUE, 0); - - /* Test filtering key events. */ - SendMessage(hwndRichedit_WM_NOTIFY, EM_SETSEL, 0, 0); - SendMessage(hwndRichedit_WM_NOTIFY, EM_SETEVENTMASK, 0, ENM_KEYEVENTS); - SendMessage(hwndRichedit_WM_NOTIFY, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); - received_WM_NOTIFY = 0; - SendMessage(hwndRichedit_WM_NOTIFY, WM_KEYDOWN, VK_RIGHT, 0); - SendMessage(hwndRichedit_WM_NOTIFY, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); - ok(sel_start == 1 && sel_end == 1, - "selections is incorrectly at (%d,%d)\n", sel_start, sel_end); - filter_on_WM_NOTIFY = TRUE; - received_WM_NOTIFY = 0; - SendMessage(hwndRichedit_WM_NOTIFY, WM_KEYDOWN, VK_RIGHT, 0); - SendMessage(hwndRichedit_WM_NOTIFY, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); - ok(sel_start == 1 && sel_end == 1, - "selections is incorrectly at (%d,%d)\n", sel_start, sel_end); - - /* test with owner set to NULL */ - SetWindowLongPtr(hwndRichedit_WM_NOTIFY, GWLP_HWNDPARENT, 0); - SendMessage(hwndRichedit_WM_NOTIFY, WM_KEYDOWN, VK_RIGHT, 0); - SendMessage(hwndRichedit_WM_NOTIFY, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); - ok(sel_start == 1 && sel_end == 1, - "selections is incorrectly at (%d,%d)\n", sel_start, sel_end); - - DestroyWindow(hwndRichedit_WM_NOTIFY); - DestroyWindow(parent); -} - -static void test_undo_coalescing(void) -{ - HWND hwnd; - int result; - char buffer[64] = {0}; - - /* multi-line control inserts CR normally */ - hwnd = CreateWindowExA(0, "RichEdit20W", NULL, WS_POPUP|ES_MULTILINE, - 0, 0, 200, 60, 0, 0, 0, 0); - ok(hwnd != 0, "CreateWindowExA error %u\n", GetLastError()); - - result = SendMessage(hwnd, EM_CANUNDO, 0, 0); - ok (result == FALSE, "Can undo after window creation.\n"); - result = SendMessage(hwnd, EM_UNDO, 0, 0); - ok (result == FALSE, "Undo operation successful with nothing to undo.\n"); - result = SendMessage(hwnd, EM_CANREDO, 0, 0); - ok (result == FALSE, "Can redo after window creation.\n"); - result = SendMessage(hwnd, EM_REDO, 0, 0); - ok (result == FALSE, "Redo operation successful with nothing undone.\n"); - - /* Test the effect of arrows keys during typing on undo transactions*/ - simulate_typing_characters(hwnd, "one two three"); - SendMessage(hwnd, WM_KEYDOWN, VK_RIGHT, 1); - SendMessage(hwnd, WM_KEYUP, VK_RIGHT, 1); - simulate_typing_characters(hwnd, " four five six"); - - result = SendMessage(hwnd, EM_CANREDO, 0, 0); - ok (result == FALSE, "Can redo before anything is undone.\n"); - result = SendMessage(hwnd, EM_CANUNDO, 0, 0); - ok (result == TRUE, "Cannot undo typed characters.\n"); - result = SendMessage(hwnd, EM_UNDO, 0, 0); - ok (result == TRUE, "EM_UNDO Failed to undo typed characters.\n"); - result = SendMessage(hwnd, EM_CANREDO, 0, 0); - ok (result == TRUE, "Cannot redo after undo.\n"); - SendMessageA(hwnd, WM_GETTEXT, sizeof(buffer), (LPARAM)buffer); - result = strcmp(buffer, "one two three"); - ok (result == 0, "expected '%s' but got '%s'\n", "one two three", buffer); - - result = SendMessage(hwnd, EM_CANUNDO, 0, 0); - ok (result == TRUE, "Cannot undo typed characters.\n"); - result = SendMessage(hwnd, WM_UNDO, 0, 0); - ok (result == TRUE, "Failed to undo typed characters.\n"); - SendMessageA(hwnd, WM_GETTEXT, sizeof(buffer), (LPARAM)buffer); - result = strcmp(buffer, ""); - ok (result == 0, "expected '%s' but got '%s'\n", "", buffer); - - /* Test the effect of focus changes during typing on undo transactions*/ - simulate_typing_characters(hwnd, "one two three"); - result = SendMessage(hwnd, EM_CANREDO, 0, 0); - ok (result == FALSE, "Redo buffer should have been cleared by typing.\n"); - SendMessage(hwnd, WM_KILLFOCUS, 0, 0); - SendMessage(hwnd, WM_SETFOCUS, 0, 0); - simulate_typing_characters(hwnd, " four five six"); - result = SendMessage(hwnd, EM_UNDO, 0, 0); - ok (result == TRUE, "Failed to undo typed characters.\n"); - SendMessageA(hwnd, WM_GETTEXT, sizeof(buffer), (LPARAM)buffer); - result = strcmp(buffer, "one two three"); - ok (result == 0, "expected '%s' but got '%s'\n", "one two three", buffer); - - /* Test the effect of the back key during typing on undo transactions */ - SendMessage(hwnd, EM_EMPTYUNDOBUFFER, 0, 0); - result = SendMessageA(hwnd, WM_SETTEXT, 0, (LPARAM)""); - ok (result == TRUE, "Failed to clear the text.\n"); - simulate_typing_characters(hwnd, "one two threa"); - result = SendMessage(hwnd, EM_CANREDO, 0, 0); - ok (result == FALSE, "Redo buffer should have been cleared by typing.\n"); - SendMessage(hwnd, WM_KEYDOWN, VK_BACK, 1); - SendMessage(hwnd, WM_KEYUP, VK_BACK, 1); - simulate_typing_characters(hwnd, "e four five six"); - result = SendMessage(hwnd, EM_UNDO, 0, 0); - ok (result == TRUE, "Failed to undo typed characters.\n"); - SendMessageA(hwnd, WM_GETTEXT, sizeof(buffer), (LPARAM)buffer); - result = strcmp(buffer, ""); - ok (result == 0, "expected '%s' but got '%s'\n", "", buffer); - - /* Test the effect of the delete key during typing on undo transactions */ - SendMessage(hwnd, EM_EMPTYUNDOBUFFER, 0, 0); - result = SendMessageA(hwnd, WM_SETTEXT, 0, (LPARAM)"abcd"); - ok(result == TRUE, "Failed to set the text.\n"); - SendMessage(hwnd, EM_SETSEL, 1, 1); - SendMessage(hwnd, WM_KEYDOWN, VK_DELETE, 1); - SendMessage(hwnd, WM_KEYUP, VK_DELETE, 1); - SendMessage(hwnd, WM_KEYDOWN, VK_DELETE, 1); - SendMessage(hwnd, WM_KEYUP, VK_DELETE, 1); - result = SendMessage(hwnd, EM_UNDO, 0, 0); - ok (result == TRUE, "Failed to undo typed characters.\n"); - SendMessageA(hwnd, WM_GETTEXT, sizeof(buffer), (LPARAM)buffer); - result = strcmp(buffer, "acd"); - ok (result == 0, "expected '%s' but got '%s'\n", "acd", buffer); - result = SendMessage(hwnd, EM_UNDO, 0, 0); - ok (result == TRUE, "Failed to undo typed characters.\n"); - SendMessageA(hwnd, WM_GETTEXT, sizeof(buffer), (LPARAM)buffer); - result = strcmp(buffer, "abcd"); - ok (result == 0, "expected '%s' but got '%s'\n", "abcd", buffer); - - /* Test the effect of EM_STOPGROUPTYPING on undo transactions*/ - SendMessage(hwnd, EM_EMPTYUNDOBUFFER, 0, 0); - result = SendMessageA(hwnd, WM_SETTEXT, 0, (LPARAM)""); - ok (result == TRUE, "Failed to clear the text.\n"); - simulate_typing_characters(hwnd, "one two three"); - result = SendMessage(hwnd, EM_STOPGROUPTYPING, 0, 0); - ok (result == 0, "expected %d but got %d\n", 0, result); - simulate_typing_characters(hwnd, " four five six"); - result = SendMessage(hwnd, EM_UNDO, 0, 0); - ok (result == TRUE, "Failed to undo typed characters.\n"); - SendMessageA(hwnd, WM_GETTEXT, sizeof(buffer), (LPARAM)buffer); - result = strcmp(buffer, "one two three"); - ok (result == 0, "expected '%s' but got '%s'\n", "one two three", buffer); - result = SendMessage(hwnd, EM_UNDO, 0, 0); - ok (result == TRUE, "Failed to undo typed characters.\n"); - ok (result == TRUE, "Failed to undo typed characters.\n"); - SendMessageA(hwnd, WM_GETTEXT, sizeof(buffer), (LPARAM)buffer); - result = strcmp(buffer, ""); - ok (result == 0, "expected '%s' but got '%s'\n", "", buffer); - - DestroyWindow(hwnd); -} - -static LONG CALLBACK customWordBreakProc(WCHAR *text, int pos, int bytes, int code) -{ - int length; - - /* MSDN lied, length is actually the number of bytes. */ - length = bytes / sizeof(WCHAR); - switch(code) - { - case WB_ISDELIMITER: - return text[pos] == 'X'; - case WB_LEFT: - case WB_MOVEWORDLEFT: - if (customWordBreakProc(text, pos, bytes, WB_ISDELIMITER)) - return pos-1; - return min(customWordBreakProc(text, pos, bytes, WB_LEFTBREAK)-1, 0); - case WB_LEFTBREAK: - pos--; - while (pos > 0 && !customWordBreakProc(text, pos, bytes, WB_ISDELIMITER)) - pos--; - return pos; - case WB_RIGHT: - case WB_MOVEWORDRIGHT: - if (customWordBreakProc(text, pos, bytes, WB_ISDELIMITER)) - return pos+1; - return min(customWordBreakProc(text, pos, bytes, WB_RIGHTBREAK)+1, length); - case WB_RIGHTBREAK: - pos++; - while (pos < length && !customWordBreakProc(text, pos, bytes, WB_ISDELIMITER)) - pos++; - return pos; - default: - ok(FALSE, "Unexpected code %d\n", code); - break; - } - return 0; -} - -static void test_word_movement(void) -{ - HWND hwnd; - int result; - int sel_start, sel_end; - const WCHAR textW[] = {'o','n','e',' ','t','w','o','X','t','h','r','e','e',0}; - - /* multi-line control inserts CR normally */ - hwnd = new_richedit(NULL); - - result = SendMessageA(hwnd, WM_SETTEXT, 0, (LPARAM)"one two three"); - ok (result == TRUE, "Failed to clear the text.\n"); - SendMessage(hwnd, EM_SETSEL, 0, 0); - /* |one two three */ - - send_ctrl_key(hwnd, VK_RIGHT); - /* one |two three */ - SendMessage(hwnd, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); - ok(sel_start == sel_end, "Selection should be empty\n"); - ok(sel_start == 4, "Cursor is at %d instead of %d\n", sel_start, 4); - - send_ctrl_key(hwnd, VK_RIGHT); - /* one two |three */ - SendMessage(hwnd, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); - ok(sel_start == sel_end, "Selection should be empty\n"); - ok(sel_start == 9, "Cursor is at %d instead of %d\n", sel_start, 9); - - send_ctrl_key(hwnd, VK_LEFT); - /* one |two three */ - SendMessage(hwnd, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); - ok(sel_start == sel_end, "Selection should be empty\n"); - ok(sel_start == 4, "Cursor is at %d instead of %d\n", sel_start, 4); - - send_ctrl_key(hwnd, VK_LEFT); - /* |one two three */ - SendMessage(hwnd, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); - ok(sel_start == sel_end, "Selection should be empty\n"); - ok(sel_start == 0, "Cursor is at %d instead of %d\n", sel_start, 0); - - SendMessage(hwnd, EM_SETSEL, 8, 8); - /* one two | three */ - send_ctrl_key(hwnd, VK_RIGHT); - /* one two |three */ - SendMessage(hwnd, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); - ok(sel_start == sel_end, "Selection should be empty\n"); - ok(sel_start == 9, "Cursor is at %d instead of %d\n", sel_start, 9); - - SendMessage(hwnd, EM_SETSEL, 11, 11); - /* one two th|ree */ - send_ctrl_key(hwnd, VK_LEFT); - /* one two |three */ - SendMessage(hwnd, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); - ok(sel_start == sel_end, "Selection should be empty\n"); - ok(sel_start == 9, "Cursor is at %d instead of %d\n", sel_start, 9); - - /* Test with a custom word break procedure that uses X as the delimiter. */ - result = SendMessageA(hwnd, WM_SETTEXT, 0, (LPARAM)"one twoXthree"); - ok (result == TRUE, "Failed to clear the text.\n"); - SendMessage(hwnd, EM_SETWORDBREAKPROC, 0, (LPARAM)customWordBreakProc); - /* |one twoXthree */ - send_ctrl_key(hwnd, VK_RIGHT); - /* one twoX|three */ - SendMessage(hwnd, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); - ok(sel_start == sel_end, "Selection should be empty\n"); - ok(sel_start == 8, "Cursor is at %d instead of %d\n", sel_start, 8); - - DestroyWindow(hwnd); - - /* Make sure the behaviour is the same with a unicode richedit window, - * and using unicode functions. */ - - hwnd = CreateWindowW(RICHEDIT_CLASS20W, NULL, - ES_MULTILINE|WS_POPUP|WS_HSCROLL|WS_VSCROLL|WS_VISIBLE, - 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); - - /* Test with a custom word break procedure that uses X as the delimiter. */ - result = SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)textW); - ok (result == TRUE, "Failed to clear the text.\n"); - SendMessageW(hwnd, EM_SETWORDBREAKPROC, 0, (LPARAM)customWordBreakProc); - /* |one twoXthree */ - send_ctrl_key(hwnd, VK_RIGHT); - /* one twoX|three */ - SendMessageW(hwnd, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); - ok(sel_start == sel_end, "Selection should be empty\n"); - ok(sel_start == 8, "Cursor is at %d instead of %d\n", sel_start, 8); - - DestroyWindow(hwnd); -} - -static void test_EM_CHARFROMPOS(void) -{ - HWND hwnd; - int result; - RECT rcClient; - POINTL point; - point.x = 0; - point.y = 40; - - /* multi-line control inserts CR normally */ - hwnd = new_richedit(NULL); - result = SendMessageA(hwnd, WM_SETTEXT, 0, - (LPARAM)"one two three four five six seven\reight"); - ok(result == 1, "Expected 1, got %d\n", result); - GetClientRect(hwnd, &rcClient); - - result = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM)&point); - ok(result == 34, "expected character index of 34 but got %d\n", result); - - /* Test with points outside the bounds of the richedit control. */ - point.x = -1; - point.y = 40; - result = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM)&point); - todo_wine ok(result == 34, "expected character index of 34 but got %d\n", result); - - point.x = 1000; - point.y = 0; - result = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM)&point); - todo_wine ok(result == 33, "expected character index of 33 but got %d\n", result); - - point.x = 1000; - point.y = 36; - result = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM)&point); - todo_wine ok(result == 39, "expected character index of 39 but got %d\n", result); - - point.x = 1000; - point.y = -1; - result = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM)&point); - todo_wine ok(result == 0, "expected character index of 0 but got %d\n", result); - - point.x = 1000; - point.y = rcClient.bottom + 1; - result = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM)&point); - todo_wine ok(result == 34, "expected character index of 34 but got %d\n", result); - - point.x = 1000; - point.y = rcClient.bottom; - result = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM)&point); - todo_wine ok(result == 39, "expected character index of 39 but got %d\n", result); - - DestroyWindow(hwnd); -} - -static void test_word_wrap(void) -{ - HWND hwnd; - POINTL point = {0, 60}; /* This point must be below the first line */ - const char *text = "Must be long enough to test line wrapping"; - DWORD dwCommonStyle = WS_VISIBLE|WS_POPUP|WS_VSCROLL|ES_MULTILINE; - int res, pos, lines; - - /* Test the effect of WS_HSCROLL and ES_AUTOHSCROLL styles on wrapping - * when specified on window creation and set later. */ - hwnd = CreateWindow(RICHEDIT_CLASS, NULL, dwCommonStyle, - 0, 0, 200, 80, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "error: %d\n", (int) GetLastError()); - res = SendMessage(hwnd, WM_SETTEXT, 0, (LPARAM) text); - ok(res, "WM_SETTEXT failed.\n"); - pos = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM) &point); - ok(pos, "pos=%d indicating no word wrap when it is expected.\n", pos); - lines = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0); - ok(lines > 1, "Line was expected to wrap (lines=%d).\n", lines); - - SetWindowLongW(hwnd, GWL_STYLE, dwCommonStyle|WS_HSCROLL|ES_AUTOHSCROLL); - pos = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM) &point); - ok(pos, "pos=%d indicating no word wrap when it is expected.\n", pos); - DestroyWindow(hwnd); - - hwnd = CreateWindow(RICHEDIT_CLASS, NULL, dwCommonStyle|WS_HSCROLL, - 0, 0, 200, 80, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "error: %d\n", (int) GetLastError()); - - res = SendMessage(hwnd, WM_SETTEXT, 0, (LPARAM) text); - ok(res, "WM_SETTEXT failed.\n"); - pos = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM) &point); - ok(!pos, "pos=%d indicating word wrap when none is expected.\n", pos); - lines = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0); - ok(lines == 1, "Line wasn't expected to wrap (lines=%d).\n", lines); - - SetWindowLongW(hwnd, GWL_STYLE, dwCommonStyle); - pos = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM) &point); - ok(!pos, "pos=%d indicating word wrap when none is expected.\n", pos); - DestroyWindow(hwnd); - - hwnd = CreateWindow(RICHEDIT_CLASS, NULL, dwCommonStyle|ES_AUTOHSCROLL, - 0, 0, 200, 80, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "error: %d\n", (int) GetLastError()); - res = SendMessage(hwnd, WM_SETTEXT, 0, (LPARAM) text); - ok(res, "WM_SETTEXT failed.\n"); - pos = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM) &point); - ok(!pos, "pos=%d indicating word wrap when none is expected.\n", pos); - - SetWindowLongW(hwnd, GWL_STYLE, dwCommonStyle); - pos = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM) &point); - ok(!pos, "pos=%d indicating word wrap when none is expected.\n", pos); - DestroyWindow(hwnd); - - hwnd = CreateWindow(RICHEDIT_CLASS, NULL, - dwCommonStyle|WS_HSCROLL|ES_AUTOHSCROLL, - 0, 0, 200, 80, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "error: %d\n", (int) GetLastError()); - res = SendMessage(hwnd, WM_SETTEXT, 0, (LPARAM) text); - ok(res, "WM_SETTEXT failed.\n"); - pos = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM) &point); - ok(!pos, "pos=%d indicating word wrap when none is expected.\n", pos); - - SetWindowLongW(hwnd, GWL_STYLE, dwCommonStyle); - pos = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM) &point); - ok(!pos, "pos=%d indicating word wrap when none is expected.\n", pos); - - /* Test the effect of EM_SETTARGETDEVICE on word wrap. */ - res = SendMessage(hwnd, EM_SETTARGETDEVICE, 0, 1); - ok(res, "EM_SETTARGETDEVICE failed (returned %d).\n", res); - pos = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM) &point); - ok(!pos, "pos=%d indicating word wrap when none is expected.\n", pos); - - res = SendMessage(hwnd, EM_SETTARGETDEVICE, 0, 0); - ok(res, "EM_SETTARGETDEVICE failed (returned %d).\n", res); - pos = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM) &point); - ok(pos, "pos=%d indicating no word wrap when it is expected.\n", pos); - DestroyWindow(hwnd); - - /* Test to see if wrapping happens with redraw disabled. */ - hwnd = CreateWindow(RICHEDIT_CLASS, NULL, dwCommonStyle, - 0, 0, 400, 80, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "error: %d\n", (int) GetLastError()); - SendMessage(hwnd, WM_SETREDRAW, FALSE, 0); - res = SendMessage(hwnd, EM_REPLACESEL, FALSE, (LPARAM) text); - ok(res, "EM_REPLACESEL failed.\n"); - lines = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0); - ok(lines == 1, "Line wasn't expected to wrap (lines=%d).\n", lines); - MoveWindow(hwnd, 0, 0, 200, 80, FALSE); - lines = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0); - ok(lines > 1, "Line was expected to wrap (lines=%d).\n", lines); - - SendMessage(hwnd, WM_SETREDRAW, TRUE, 0); - DestroyWindow(hwnd); -} - -static void test_autoscroll(void) -{ - HWND hwnd = new_richedit(NULL); - int lines, ret, redraw; - POINT pt; - - for (redraw = 0; redraw <= 1; redraw++) { - trace("testing with WM_SETREDRAW=%d\n", redraw); - SendMessage(hwnd, WM_SETREDRAW, redraw, 0); - SendMessage(hwnd, EM_REPLACESEL, 0, (LPARAM)"1\n2\n3\n4\n5\n6\n7\n8"); - lines = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0); - ok(lines == 8, "%d lines instead of 8\n", lines); - ret = SendMessage(hwnd, EM_GETSCROLLPOS, 0, (LPARAM)&pt); - ok(ret == 1, "EM_GETSCROLLPOS returned %d instead of 1\n", ret); - ok(pt.y != 0, "Didn't scroll down after replacing text.\n"); - ret = GetWindowLong(hwnd, GWL_STYLE); - ok(ret & WS_VSCROLL, "Scrollbar was not shown yet (style=%x).\n", (UINT)ret); - - SendMessage(hwnd, WM_SETTEXT, 0, 0); - lines = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0); - ok(lines == 1, "%d lines instead of 1\n", lines); - ret = SendMessage(hwnd, EM_GETSCROLLPOS, 0, (LPARAM)&pt); - ok(ret == 1, "EM_GETSCROLLPOS returned %d instead of 1\n", ret); - ok(pt.y == 0, "y scroll position is %d after clearing text.\n", pt.y); - ret = GetWindowLong(hwnd, GWL_STYLE); - ok(!(ret & WS_VSCROLL), "Scrollbar is still shown (style=%x).\n", (UINT)ret); - } - - SendMessage(hwnd, WM_SETREDRAW, TRUE, 0); - DestroyWindow(hwnd); - - /* The WS_VSCROLL and WS_HSCROLL styles implicitly set - * auto vertical/horizontal scrolling options. */ - hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, - WS_POPUP|ES_MULTILINE|WS_VSCROLL|WS_HSCROLL, - 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); - ret = SendMessage(hwnd, EM_GETOPTIONS, 0, 0); - ok(ret & ECO_AUTOVSCROLL, "ECO_AUTOVSCROLL isn't set.\n"); - ok(ret & ECO_AUTOHSCROLL, "ECO_AUTOHSCROLL isn't set.\n"); - ret = GetWindowLong(hwnd, GWL_STYLE); - ok(!(ret & ES_AUTOVSCROLL), "ES_AUTOVSCROLL is set.\n"); - ok(!(ret & ES_AUTOHSCROLL), "ES_AUTOHSCROLL is set.\n"); - DestroyWindow(hwnd); - - hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, - WS_POPUP|ES_MULTILINE, - 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); - ret = SendMessage(hwnd, EM_GETOPTIONS, 0, 0); - ok(!(ret & ECO_AUTOVSCROLL), "ECO_AUTOVSCROLL is set.\n"); - ok(!(ret & ECO_AUTOHSCROLL), "ECO_AUTOHSCROLL is set.\n"); - ret = GetWindowLong(hwnd, GWL_STYLE); - ok(!(ret & ES_AUTOVSCROLL), "ES_AUTOVSCROLL is set.\n"); - ok(!(ret & ES_AUTOHSCROLL), "ES_AUTOHSCROLL is set.\n"); - DestroyWindow(hwnd); -} - - -static void test_format_rect(void) -{ - HWND hwnd; - RECT rc, expected, clientRect; - int n; - DWORD options; - - hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, - ES_MULTILINE|WS_POPUP|WS_HSCROLL|WS_VSCROLL|WS_VISIBLE, - 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); - - GetClientRect(hwnd, &clientRect); - - expected = clientRect; - expected.left += 1; - expected.right -= 1; - SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); - - for (n = -3; n <= 3; n++) - { - rc = clientRect; - rc.top += n; - rc.left += n; - rc.bottom -= n; - rc.right -= n; - SendMessageA(hwnd, EM_SETRECT, 0, (LPARAM)&rc); - - expected = rc; - expected.top = max(0, rc.top); - expected.left = max(0, rc.left); - expected.bottom = min(clientRect.bottom, rc.bottom); - expected.right = min(clientRect.right, rc.right); - SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "[n=%d] rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - n, rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); - } - - rc = clientRect; - SendMessageA(hwnd, EM_SETRECT, 0, (LPARAM)&rc); - expected = clientRect; - SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); - - /* Adding the selectionbar adds the selectionbar width to the left side. */ - SendMessageA(hwnd, EM_SETOPTIONS, ECOOP_OR, ECO_SELECTIONBAR); - options = SendMessageA(hwnd, EM_GETOPTIONS, 0, 0); - ok(options & ECO_SELECTIONBAR, "EM_SETOPTIONS failed to add selectionbar.\n"); - expected.left += 8; /* selection bar width */ - SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); - - rc = clientRect; - SendMessageA(hwnd, EM_SETRECT, 0, (LPARAM)&rc); - expected = clientRect; - SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); - - /* Removing the selectionbar subtracts the selectionbar width from the left side, - * even if the left side is already 0. */ - SendMessageA(hwnd, EM_SETOPTIONS, ECOOP_AND, ~ECO_SELECTIONBAR); - options = SendMessageA(hwnd, EM_GETOPTIONS, 0, 0); - ok(!(options & ECO_SELECTIONBAR), "EM_SETOPTIONS failed to remove selectionbar.\n"); - expected.left -= 8; /* selection bar width */ - SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); - - /* Set the absolute value of the formatting rectangle. */ - rc = clientRect; - SendMessageA(hwnd, EM_SETRECT, 0, (LPARAM)&rc); - expected = clientRect; - SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "[n=%d] rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - n, rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); - - /* MSDN documents the EM_SETRECT message as using the rectangle provided in - * LPARAM as being a relative offset when the WPARAM value is 1, but these - * tests show that this isn't true. */ - rc.top = 15; - rc.left = 15; - rc.bottom = clientRect.bottom - 15; - rc.right = clientRect.right - 15; - expected = rc; - SendMessageA(hwnd, EM_SETRECT, 1, (LPARAM)&rc); - SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); - - /* For some reason it does not limit the values to the client rect with - * a WPARAM value of 1. */ - rc.top = -15; - rc.left = -15; - rc.bottom = clientRect.bottom + 15; - rc.right = clientRect.right + 15; - expected = rc; - SendMessageA(hwnd, EM_SETRECT, 1, (LPARAM)&rc); - SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); - - /* Reset to default rect and check how the format rect adjusts to window - * resize and how it copes with very small windows */ - SendMessageA(hwnd, EM_SETRECT, 0, (LPARAM)NULL); - - MoveWindow(hwnd, 0, 0, 100, 30, FALSE); - GetClientRect(hwnd, &clientRect); - - expected = clientRect; - expected.left += 1; - expected.right -= 1; - SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); - - MoveWindow(hwnd, 0, 0, 0, 30, FALSE); - GetClientRect(hwnd, &clientRect); - - expected = clientRect; - expected.left += 1; - expected.right -= 1; - SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); - - MoveWindow(hwnd, 0, 0, 100, 0, FALSE); - GetClientRect(hwnd, &clientRect); - - expected = clientRect; - expected.left += 1; - expected.right -= 1; - SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); - - DestroyWindow(hwnd); - - /* The extended window style affects the formatting rectangle. */ - hwnd = CreateWindowEx(WS_EX_CLIENTEDGE, RICHEDIT_CLASS, NULL, - ES_MULTILINE|WS_POPUP|WS_HSCROLL|WS_VSCROLL|WS_VISIBLE, - 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); - - GetClientRect(hwnd, &clientRect); - - expected = clientRect; - expected.left += 1; - expected.top += 1; - expected.right -= 1; - SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); - - rc = clientRect; - rc.top += 5; - rc.left += 5; - rc.bottom -= 5; - rc.right -= 5; - expected = rc; - expected.top -= 1; - expected.left -= 1; - expected.right += 1; - SendMessageA(hwnd, EM_SETRECT, 0, (LPARAM)&rc); - SendMessageA(hwnd, EM_GETRECT, 0, (LPARAM)&rc); - ok(rc.top == expected.top && rc.left == expected.left && - rc.bottom == expected.bottom && rc.right == expected.right, - "rect a(t=%d, l=%d, b=%d, r=%d) != e(t=%d, l=%d, b=%d, r=%d)\n", - rc.top, rc.left, rc.bottom, rc.right, - expected.top, expected.left, expected.bottom, expected.right); - - DestroyWindow(hwnd); -} - -static void test_WM_GETDLGCODE(void) -{ - HWND hwnd; - UINT res, expected; - MSG msg; - - expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL|DLGC_WANTMESSAGE; - - hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, - ES_MULTILINE|ES_WANTRETURN|WS_POPUP, - 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); - msg.hwnd = hwnd; - res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, 0); - expected = expected | DLGC_WANTMESSAGE; - ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", - res, expected); - DestroyWindow(hwnd); - - msg.message = WM_KEYDOWN; - msg.wParam = VK_RETURN; - msg.lParam = (MapVirtualKey(VK_RETURN, MAPVK_VK_TO_VSC) << 16) | 0x0001; - msg.pt.x = 0; - msg.pt.y = 0; - msg.time = GetTickCount(); - - hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, - ES_MULTILINE|ES_WANTRETURN|WS_POPUP, - 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); - msg.hwnd = hwnd; - res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); - expected = expected | DLGC_WANTMESSAGE; - ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", - res, expected); - DestroyWindow(hwnd); - - hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, - ES_MULTILINE|WS_POPUP, - 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); - msg.hwnd = hwnd; - res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); - expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL|DLGC_WANTMESSAGE; - ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", - res, expected); - DestroyWindow(hwnd); - - hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, - ES_WANTRETURN|WS_POPUP, - 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); - msg.hwnd = hwnd; - res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); - expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; - ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", - res, expected); - DestroyWindow(hwnd); - - hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, - WS_POPUP, - 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); - msg.hwnd = hwnd; - res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); - expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; - ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", - res, expected); - DestroyWindow(hwnd); - - msg.wParam = VK_TAB; - msg.lParam = (MapVirtualKey(VK_TAB, MAPVK_VK_TO_VSC) << 16) | 0x0001; - - hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, - ES_MULTILINE|WS_POPUP, - 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); - msg.hwnd = hwnd; - res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); - expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL|DLGC_WANTMESSAGE; - ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", - res, expected); - DestroyWindow(hwnd); - - hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, - WS_POPUP, - 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); - msg.hwnd = hwnd; - res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); - expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; - ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", - res, expected); - DestroyWindow(hwnd); - - hold_key(VK_CONTROL); - - hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, - ES_MULTILINE|WS_POPUP, - 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); - msg.hwnd = hwnd; - res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); - expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL|DLGC_WANTMESSAGE; - ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", - res, expected); - DestroyWindow(hwnd); - - hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, - WS_POPUP, - 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); - msg.hwnd = hwnd; - res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); - expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; - ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", - res, expected); - DestroyWindow(hwnd); - - release_key(VK_CONTROL); - - msg.wParam = 'a'; - msg.lParam = (MapVirtualKey('a', MAPVK_VK_TO_VSC) << 16) | 0x0001; - - hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, - ES_MULTILINE|WS_POPUP, - 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); - msg.hwnd = hwnd; - res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); - expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL|DLGC_WANTMESSAGE; - ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", - res, expected); - DestroyWindow(hwnd); - - hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, - WS_POPUP, - 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); - msg.hwnd = hwnd; - res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); - expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; - ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", - res, expected); - DestroyWindow(hwnd); - - msg.message = WM_CHAR; - - hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, - ES_MULTILINE|WS_POPUP, - 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); - msg.hwnd = hwnd; - res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); - expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL|DLGC_WANTMESSAGE; - ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", - res, expected); - DestroyWindow(hwnd); - - hwnd = CreateWindowEx(0, RICHEDIT_CLASS, NULL, - WS_POPUP, - 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); - msg.hwnd = hwnd; - res = SendMessage(hwnd, WM_GETDLGCODE, VK_RETURN, (LPARAM)&msg); - expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; - ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", - res, expected); - DestroyWindow(hwnd); -} - -static void test_zoom(void) -{ - HWND hwnd; - UINT ret; - RECT rc; - POINT pt; - int numerator, denominator; - - hwnd = new_richedit(NULL); - GetClientRect(hwnd, &rc); - pt.x = (rc.right - rc.left) / 2; - pt.y = (rc.bottom - rc.top) / 2; - ClientToScreen(hwnd, &pt); - - /* Test initial zoom value */ - ret = SendMessage(hwnd, EM_GETZOOM, (WPARAM)&numerator, (LPARAM)&denominator); - ok(numerator == 0, "Numerator should be initialized to 0 (got %d).\n", numerator); - ok(denominator == 0, "Denominator should be initialized to 0 (got %d).\n", denominator); - ok(ret == TRUE, "EM_GETZOOM failed (%d).\n", ret); - - /* test scroll wheel */ - hold_key(VK_CONTROL); - ret = SendMessage(hwnd, WM_MOUSEWHEEL, MAKEWPARAM(MK_CONTROL, WHEEL_DELTA), - MAKELPARAM(pt.x, pt.y)); - ok(!ret, "WM_MOUSEWHEEL failed (%d).\n", ret); - release_key(VK_CONTROL); - - ret = SendMessage(hwnd, EM_GETZOOM, (WPARAM)&numerator, (LPARAM)&denominator); - ok(numerator == 110, "incorrect numerator is %d\n", numerator); - ok(denominator == 100, "incorrect denominator is %d\n", denominator); - ok(ret == TRUE, "EM_GETZOOM failed (%d).\n", ret); - - /* Test how much the mouse wheel can zoom in and out. */ - ret = SendMessage(hwnd, EM_SETZOOM, 490, 100); - ok(ret == TRUE, "EM_SETZOOM failed (%d).\n", ret); - - hold_key(VK_CONTROL); - ret = SendMessage(hwnd, WM_MOUSEWHEEL, MAKEWPARAM(MK_CONTROL, WHEEL_DELTA), - MAKELPARAM(pt.x, pt.y)); - ok(!ret, "WM_MOUSEWHEEL failed (%d).\n", ret); - release_key(VK_CONTROL); - - ret = SendMessage(hwnd, EM_GETZOOM, (WPARAM)&numerator, (LPARAM)&denominator); - ok(numerator == 500, "incorrect numerator is %d\n", numerator); - ok(denominator == 100, "incorrect denominator is %d\n", denominator); - ok(ret == TRUE, "EM_GETZOOM failed (%d).\n", ret); - - ret = SendMessage(hwnd, EM_SETZOOM, 491, 100); - ok(ret == TRUE, "EM_SETZOOM failed (%d).\n", ret); - - hold_key(VK_CONTROL); - ret = SendMessage(hwnd, WM_MOUSEWHEEL, MAKEWPARAM(MK_CONTROL, WHEEL_DELTA), - MAKELPARAM(pt.x, pt.y)); - ok(!ret, "WM_MOUSEWHEEL failed (%d).\n", ret); - release_key(VK_CONTROL); - - ret = SendMessage(hwnd, EM_GETZOOM, (WPARAM)&numerator, (LPARAM)&denominator); - ok(numerator == 491, "incorrect numerator is %d\n", numerator); - ok(denominator == 100, "incorrect denominator is %d\n", denominator); - ok(ret == TRUE, "EM_GETZOOM failed (%d).\n", ret); - - ret = SendMessage(hwnd, EM_SETZOOM, 20, 100); - ok(ret == TRUE, "EM_SETZOOM failed (%d).\n", ret); - - hold_key(VK_CONTROL); - ret = SendMessage(hwnd, WM_MOUSEWHEEL, MAKEWPARAM(MK_CONTROL, -WHEEL_DELTA), - MAKELPARAM(pt.x, pt.y)); - ok(!ret, "WM_MOUSEWHEEL failed (%d).\n", ret); - release_key(VK_CONTROL); - - ret = SendMessage(hwnd, EM_GETZOOM, (WPARAM)&numerator, (LPARAM)&denominator); - ok(numerator == 10, "incorrect numerator is %d\n", numerator); - ok(denominator == 100, "incorrect denominator is %d\n", denominator); - ok(ret == TRUE, "EM_GETZOOM failed (%d).\n", ret); - - ret = SendMessage(hwnd, EM_SETZOOM, 19, 100); - ok(ret == TRUE, "EM_SETZOOM failed (%d).\n", ret); - - hold_key(VK_CONTROL); - ret = SendMessage(hwnd, WM_MOUSEWHEEL, MAKEWPARAM(MK_CONTROL, -WHEEL_DELTA), - MAKELPARAM(pt.x, pt.y)); - ok(!ret, "WM_MOUSEWHEEL failed (%d).\n", ret); - release_key(VK_CONTROL); - - ret = SendMessage(hwnd, EM_GETZOOM, (WPARAM)&numerator, (LPARAM)&denominator); - ok(numerator == 19, "incorrect numerator is %d\n", numerator); - ok(denominator == 100, "incorrect denominator is %d\n", denominator); - ok(ret == TRUE, "EM_GETZOOM failed (%d).\n", ret); - - /* Test how WM_SCROLLWHEEL treats our custom denominator. */ - ret = SendMessage(hwnd, EM_SETZOOM, 50, 13); - ok(ret == TRUE, "EM_SETZOOM failed (%d).\n", ret); - - hold_key(VK_CONTROL); - ret = SendMessage(hwnd, WM_MOUSEWHEEL, MAKEWPARAM(MK_CONTROL, WHEEL_DELTA), - MAKELPARAM(pt.x, pt.y)); - ok(!ret, "WM_MOUSEWHEEL failed (%d).\n", ret); - release_key(VK_CONTROL); - - ret = SendMessage(hwnd, EM_GETZOOM, (WPARAM)&numerator, (LPARAM)&denominator); - ok(numerator == 394, "incorrect numerator is %d\n", numerator); - ok(denominator == 100, "incorrect denominator is %d\n", denominator); - ok(ret == TRUE, "EM_GETZOOM failed (%d).\n", ret); - - /* Test bounds checking on EM_SETZOOM */ - ret = SendMessage(hwnd, EM_SETZOOM, 2, 127); - ok(ret == TRUE, "EM_SETZOOM rejected valid values (%d).\n", ret); - - ret = SendMessage(hwnd, EM_SETZOOM, 127, 2); - ok(ret == TRUE, "EM_SETZOOM rejected valid values (%d).\n", ret); - - ret = SendMessage(hwnd, EM_SETZOOM, 2, 128); - ok(ret == FALSE, "EM_SETZOOM accepted invalid values (%d).\n", ret); - - ret = SendMessage(hwnd, EM_GETZOOM, (WPARAM)&numerator, (LPARAM)&denominator); - ok(numerator == 127, "incorrect numerator is %d\n", numerator); - ok(denominator == 2, "incorrect denominator is %d\n", denominator); - ok(ret == TRUE, "EM_GETZOOM failed (%d).\n", ret); - - ret = SendMessage(hwnd, EM_SETZOOM, 128, 2); - ok(ret == FALSE, "EM_SETZOOM accepted invalid values (%d).\n", ret); - - /* See if negative numbers are accepted. */ - ret = SendMessage(hwnd, EM_SETZOOM, -100, -100); - ok(ret == FALSE, "EM_SETZOOM accepted invalid values (%d).\n", ret); - - /* See if negative numbers are accepted. */ - ret = SendMessage(hwnd, EM_SETZOOM, 0, 100); - ok(ret == FALSE, "EM_SETZOOM failed (%d).\n", ret); - - ret = SendMessage(hwnd, EM_GETZOOM, (WPARAM)&numerator, (LPARAM)&denominator); - ok(numerator == 127, "incorrect numerator is %d\n", numerator); - ok(denominator == 2, "incorrect denominator is %d\n", denominator); - ok(ret == TRUE, "EM_GETZOOM failed (%d).\n", ret); - - /* Reset the zoom value */ - ret = SendMessage(hwnd, EM_SETZOOM, 0, 0); - ok(ret == TRUE, "EM_SETZOOM failed (%d).\n", ret); - - DestroyWindow(hwnd); -} - -struct dialog_mode_messages -{ - int wm_getdefid, wm_close, wm_nextdlgctl; -}; - -static struct dialog_mode_messages dm_messages; - -#define test_dm_messages(wmclose, wmgetdefid, wmnextdlgctl) \ - ok(dm_messages.wm_close == wmclose, "expected %d WM_CLOSE message, " \ - "got %d\n", wmclose, dm_messages.wm_close); \ - ok(dm_messages.wm_getdefid == wmgetdefid, "expected %d WM_GETDIFID message, " \ - "got %d\n", wmgetdefid, dm_messages.wm_getdefid);\ - ok(dm_messages.wm_nextdlgctl == wmnextdlgctl, "expected %d WM_NEXTDLGCTL message, " \ - "got %d\n", wmnextdlgctl, dm_messages.wm_nextdlgctl) - -static LRESULT CALLBACK dialog_mode_wnd_proc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) -{ - switch (iMsg) - { - case DM_GETDEFID: - dm_messages.wm_getdefid++; - return MAKELONG(ID_RICHEDITTESTDBUTTON, DC_HASDEFID); - case WM_NEXTDLGCTL: - dm_messages.wm_nextdlgctl++; - break; - case WM_CLOSE: - dm_messages.wm_close++; - break; - } - - return DefWindowProc(hwnd, iMsg, wParam, lParam); -} - -static void test_dialogmode(void) -{ - HWND hwRichEdit, hwParent, hwButton; - MSG msg= {0}; - int lcount, r; - WNDCLASSA cls; - - cls.style = 0; - cls.lpfnWndProc = dialog_mode_wnd_proc; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(0); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "DialogModeParentClass"; - if(!RegisterClassA(&cls)) assert(0); - - hwParent = CreateWindow("DialogModeParentClass", NULL, WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, 0, 200, 120, NULL, NULL, GetModuleHandleA(0), NULL); - - /* Test richedit(ES_MULTILINE) */ - - hwRichEdit = new_window(RICHEDIT_CLASS, ES_MULTILINE, hwParent); - - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - ok(0 == r, "expected 0, got %d\n", r); - lcount = SendMessage(hwRichEdit, EM_GETLINECOUNT, 0, 0); - ok(2 == lcount, "expected 2, got %d\n", lcount); - - r = SendMessage(hwRichEdit, WM_GETDLGCODE, 0, 0); - ok(0x8f == r, "expected 0x8f, got 0x%x\n", r); - - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - ok(0 == r, "expected 0, got %d\n", r); - lcount = SendMessage(hwRichEdit, EM_GETLINECOUNT, 0, 0); - ok(3 == lcount, "expected 3, got %d\n", lcount); - - r = SendMessage(hwRichEdit, WM_GETDLGCODE, 0, (LPARAM)&msg); - ok(0x8f == r, "expected 0x8f, got 0x%x\n", r); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - ok(0 == r, "expected 0, got %d\n", r); - lcount = SendMessage(hwRichEdit, EM_GETLINECOUNT, 0, 0); - ok(3 == lcount, "expected 3, got %d\n", lcount); - - DestroyWindow(hwRichEdit); - - /* Test standalone richedit(ES_MULTILINE) */ - - hwRichEdit = new_window(RICHEDIT_CLASS, ES_MULTILINE, NULL); - - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - ok(0 == r, "expected 0, got %d\n", r); - lcount = SendMessage(hwRichEdit, EM_GETLINECOUNT, 0, 0); - ok(2 == lcount, "expected 2, got %d\n", lcount); - - r = SendMessage(hwRichEdit, WM_GETDLGCODE, 0, (LPARAM)&msg); - ok(0x8f == r, "expected 0x8f, got 0x%x\n", r); - - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - ok(0 == r, "expected 0, got %d\n", r); - lcount = SendMessage(hwRichEdit, EM_GETLINECOUNT, 0, 0); - ok(2 == lcount, "expected 2, got %d\n", lcount); - - DestroyWindow(hwRichEdit); - - /* Check a destination for messages */ - - hwRichEdit = new_window(RICHEDIT_CLASS, ES_MULTILINE, hwParent); - - SetWindowLong(hwRichEdit, GWL_STYLE, GetWindowLong(hwRichEdit, GWL_STYLE)& ~WS_POPUP); - SetParent( hwRichEdit, NULL); - - r = SendMessage(hwRichEdit, WM_GETDLGCODE, 0, (LPARAM)&msg); - ok(0x8f == r, "expected 0x8f, got 0x%x\n", r); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 1, 0); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_TAB, 0xf0001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 0, 1); - - DestroyWindow(hwRichEdit); - - /* Check messages from richedit(ES_MULTILINE) */ - - hwRichEdit = new_window(RICHEDIT_CLASS, ES_MULTILINE, hwParent); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 0, 0); - - lcount = SendMessage(hwRichEdit, EM_GETLINECOUNT, 0, 0); - ok(2 == lcount, "expected 2, got %d\n", lcount); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_ESCAPE, 0x10001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 0, 0); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_TAB, 0xf0001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 0, 0); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_GETDLGCODE, 0, (LPARAM)&msg); - ok(0x8f == r, "expected 0x8f, got 0x%x\n", r); - test_dm_messages(0, 0, 0); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 1, 0); - - lcount = SendMessage(hwRichEdit, EM_GETLINECOUNT, 0, 0); - ok(2 == lcount, "expected 2, got %d\n", lcount); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_ESCAPE, 0x10001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 0, 0); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_TAB, 0xf0001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 0, 1); - - hwButton = CreateWindow("BUTTON", "OK", WS_VISIBLE|WS_CHILD|BS_PUSHBUTTON, - 100, 100, 50, 20, hwParent, (HMENU)ID_RICHEDITTESTDBUTTON, GetModuleHandleA(0), NULL); - ok(hwButton!=NULL, "CreateWindow failed with error code %d\n", GetLastError()); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 1, 1); - - lcount = SendMessage(hwRichEdit, EM_GETLINECOUNT, 0, 0); - ok(2 == lcount, "expected 2, got %d\n", lcount); - - DestroyWindow(hwButton); - DestroyWindow(hwRichEdit); - - /* Check messages from richedit(ES_MULTILINE|ES_WANTRETURN) */ - - hwRichEdit = new_window(RICHEDIT_CLASS, ES_MULTILINE|ES_WANTRETURN, hwParent); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 0, 0); - - lcount = SendMessage(hwRichEdit, EM_GETLINECOUNT, 0, 0); - ok(2 == lcount, "expected 2, got %d\n", lcount); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_ESCAPE, 0x10001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 0, 0); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_TAB, 0xf0001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 0, 0); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_GETDLGCODE, 0, (LPARAM)&msg); - ok(0x8f == r, "expected 0x8f, got 0x%x\n", r); - test_dm_messages(0, 0, 0); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 0, 0); - - lcount = SendMessage(hwRichEdit, EM_GETLINECOUNT, 0, 0); - ok(3 == lcount, "expected 3, got %d\n", lcount); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_ESCAPE, 0x10001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 0, 0); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_TAB, 0xf0001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 0, 1); - - hwButton = CreateWindow("BUTTON", "OK", WS_VISIBLE|WS_CHILD|BS_PUSHBUTTON, - 100, 100, 50, 20, hwParent, (HMENU)ID_RICHEDITTESTDBUTTON, GetModuleHandleA(0), NULL); - ok(hwButton!=NULL, "CreateWindow failed with error code %d\n", GetLastError()); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 0, 0); - - lcount = SendMessage(hwRichEdit, EM_GETLINECOUNT, 0, 0); - ok(4 == lcount, "expected 4, got %d\n", lcount); - - DestroyWindow(hwButton); - DestroyWindow(hwRichEdit); - - /* Check messages from richedit(0) */ - - hwRichEdit = new_window(RICHEDIT_CLASS, 0, hwParent); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 0, 0); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_ESCAPE, 0x10001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 0, 0); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_TAB, 0xf0001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 0, 0); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_GETDLGCODE, 0, (LPARAM)&msg); - ok(0x8b == r, "expected 0x8b, got 0x%x\n", r); - test_dm_messages(0, 0, 0); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 1, 0); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_ESCAPE, 0x10001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 0, 0); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_TAB, 0xf0001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 0, 1); - - hwButton = CreateWindow("BUTTON", "OK", WS_VISIBLE|WS_CHILD|BS_PUSHBUTTON, - 100, 100, 50, 20, hwParent, (HMENU)ID_RICHEDITTESTDBUTTON, GetModuleHandleA(0), NULL); - ok(hwButton!=NULL, "CreateWindow failed with error code %d\n", GetLastError()); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 1, 1); - - DestroyWindow(hwRichEdit); - - /* Check messages from richedit(ES_WANTRETURN) */ - - hwRichEdit = new_window(RICHEDIT_CLASS, ES_WANTRETURN, hwParent); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 0, 0); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_GETDLGCODE, 0, (LPARAM)&msg); - ok(0x8b == r, "expected 0x8b, got 0x%x\n", r); - test_dm_messages(0, 0, 0); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 0, 0); - - hwButton = CreateWindow("BUTTON", "OK", WS_VISIBLE|WS_CHILD|BS_PUSHBUTTON, - 100, 100, 50, 20, hwParent, (HMENU)ID_RICHEDITTESTDBUTTON, GetModuleHandleA(0), NULL); - ok(hwButton!=NULL, "CreateWindow failed with error code %d\n", GetLastError()); - - memset(&dm_messages, 0, sizeof(dm_messages)); - r = SendMessage(hwRichEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - ok(0 == r, "expected 0, got %d\n", r); - test_dm_messages(0, 0, 0); - - DestroyWindow(hwRichEdit); - DestroyWindow(hwParent); -} - -static void test_EM_FINDWORDBREAK_W(void) -{ - static const struct { - WCHAR c; - BOOL isdelimiter; /* expected result of WB_ISDELIMITER */ - } delimiter_tests[] = { - {0x0a, FALSE}, /* newline */ - {0x0b, FALSE}, /* vertical tab */ - {0x0c, FALSE}, /* form feed */ - {0x0d, FALSE}, /* carriage return */ - {0x20, TRUE}, /* space */ - {0x61, FALSE}, /* capital letter a */ - {0xa0, FALSE}, /* no-break space */ - {0x2000, FALSE}, /* en quad */ - {0x3000, FALSE}, /* Ideographic space */ - {0x1100, FALSE}, /* Hangul Choseong Kiyeok (G sound) Ordinary Letter*/ - {0x11ff, FALSE}, /* Hangul Jongseoung Kiyeok-Hieuh (Hard N sound) Ordinary Letter*/ - {0x115f, FALSE}, /* Hangul Choseong Filler (no sound, used with two letter Hangul words) Ordinary Letter */ - {0xac00, FALSE}, /* Hangul character GA*/ - {0xd7af, FALSE}, /* End of Hangul character chart */ - {0xf020, TRUE}, /* MS private for CP_SYMBOL round trip?, see kb897872 */ - {0xff20, FALSE}, /* fullwidth commercial @ */ - {WCH_EMBEDDING, FALSE}, /* object replacement character*/ - }; - int i; - HWND hwndRichEdit = new_richeditW(NULL); - ok(IsWindowUnicode(hwndRichEdit), "window should be unicode\n"); - for (i = 0; i < sizeof(delimiter_tests)/sizeof(delimiter_tests[0]); i++) - { - WCHAR wbuf[2]; - int result; - - wbuf[0] = delimiter_tests[i].c; - wbuf[1] = 0; - SendMessageW(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)wbuf); - result = SendMessageW(hwndRichEdit, EM_FINDWORDBREAK, WB_ISDELIMITER,0); - if (wbuf[0] == 0x20 || wbuf[0] == 0xf020) - todo_wine - ok(result == delimiter_tests[i].isdelimiter, - "wanted ISDELIMITER_W(0x%x) %d, got %d\n", - delimiter_tests[i].c, delimiter_tests[i].isdelimiter,result); - else - ok(result == delimiter_tests[i].isdelimiter, - "wanted ISDELIMITER_W(0x%x) %d, got %d\n", - delimiter_tests[i].c, delimiter_tests[i].isdelimiter, result); - } - DestroyWindow(hwndRichEdit); -} - -static void test_EM_FINDWORDBREAK_A(void) -{ - static const struct { - WCHAR c; - BOOL isdelimiter; /* expected result of WB_ISDELIMITER */ - } delimiter_tests[] = { - {0x0a, FALSE}, /* newline */ - {0x0b, FALSE}, /* vertical tab */ - {0x0c, FALSE}, /* form feed */ - {0x0d, FALSE}, /* carriage return */ - {0x20, TRUE}, /* space */ - {0x61, FALSE}, /* capital letter a */ - }; - int i; - HWND hwndRichEdit = new_richedit(NULL); - - ok(!IsWindowUnicode(hwndRichEdit), "window should not be unicode\n"); - for (i = 0; i < sizeof(delimiter_tests)/sizeof(delimiter_tests[0]); i++) - { - int result; - char buf[2]; - buf[0] = delimiter_tests[i].c; - buf[1] = 0; - SendMessageW(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)buf); - result = SendMessage(hwndRichEdit, EM_FINDWORDBREAK, WB_ISDELIMITER, 0); - if (buf[0] == 0x20) - todo_wine - ok(result == delimiter_tests[i].isdelimiter, - "wanted ISDELIMITER_A(0x%x) %d, got %d\n", - delimiter_tests[i].c, delimiter_tests[i].isdelimiter,result); - else - ok(result == delimiter_tests[i].isdelimiter, - "wanted ISDELIMITER_A(0x%x) %d, got %d\n", - delimiter_tests[i].c, delimiter_tests[i].isdelimiter, result); - } - DestroyWindow(hwndRichEdit); -} - -START_TEST( editor ) -{ - BOOL ret; - /* Must explicitly LoadLibrary(). The test has no references to functions in - * RICHED20.DLL, so the linker doesn't actually link to it. */ - hmoduleRichEdit = LoadLibrary("RICHED20.DLL"); - ok(hmoduleRichEdit != NULL, "error: %d\n", (int) GetLastError()); - - test_WM_CHAR(); - test_EM_FINDTEXT(); - test_EM_GETLINE(); - test_EM_POSFROMCHAR(); - test_EM_SCROLLCARET(); - test_EM_SCROLL(); - test_scrollbar_visibility(); - test_WM_SETTEXT(); - test_EM_LINELENGTH(); - test_EM_SETCHARFORMAT(); - test_EM_SETTEXTMODE(); - test_TM_PLAINTEXT(); - test_EM_SETOPTIONS(); - test_WM_GETTEXT(); - test_EM_GETTEXTRANGE(); - test_EM_GETSELTEXT(); - test_EM_SETUNDOLIMIT(); - test_ES_PASSWORD(); - test_EM_SETTEXTEX(); - test_EM_LIMITTEXT(); - test_EM_EXLIMITTEXT(); - test_EM_GETLIMITTEXT(); - test_WM_SETFONT(); - test_EM_GETMODIFY(); - test_EM_EXSETSEL(); - test_WM_PASTE(); - test_EM_STREAMIN(); - test_EM_STREAMOUT(); - test_EM_STREAMOUT_FONTTBL(); - test_EM_StreamIn_Undo(); - test_EM_FORMATRANGE(); - test_unicode_conversions(); - test_EM_GETTEXTLENGTHEX(); - test_EM_REPLACESEL(1); - test_EM_REPLACESEL(0); - test_WM_NOTIFY(); - test_EM_AUTOURLDETECT(); - test_eventMask(); - test_undo_coalescing(); - test_word_movement(); - test_EM_CHARFROMPOS(); - test_SETPARAFORMAT(); - test_word_wrap(); - test_autoscroll(); - test_format_rect(); - test_WM_GETDLGCODE(); - test_zoom(); - test_dialogmode(); - test_EM_FINDWORDBREAK_W(); - test_EM_FINDWORDBREAK_A(); - - /* Set the environment variable WINETEST_RICHED20 to keep windows - * responsive and open for 30 seconds. This is useful for debugging. - */ - if (getenv( "WINETEST_RICHED20" )) { - keep_responsive(30); - } - - OleFlushClipboard(); - ret = FreeLibrary(hmoduleRichEdit); - ok(ret, "error: %d\n", (int) GetLastError()); -} diff --git a/rostests/winetests/riched20/riched20.rbuild b/rostests/winetests/riched20/riched20.rbuild deleted file mode 100644 index a1515c64a48..00000000000 --- a/rostests/winetests/riched20/riched20.rbuild +++ /dev/null @@ -1,19 +0,0 @@ - - - - - . - - editor.c - richole.c - testlist.c - txtsrv.c - wine - uuid - ole32 - oleaut32 - user32 - gdi32 - ntdll - - diff --git a/rostests/winetests/riched20/richole.c b/rostests/winetests/riched20/richole.c deleted file mode 100644 index ee89086416f..00000000000 --- a/rostests/winetests/riched20/richole.c +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Tests for IRichEditOle and friends. - * - * Copyright 2008 Google (Dan Hipschman) - * - * 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 - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static HMODULE hmoduleRichEdit; - -static HWND new_window(LPCTSTR lpClassName, DWORD dwStyle, HWND parent) -{ - HWND hwnd - = CreateWindow(lpClassName, NULL, - dwStyle | WS_POPUP | WS_HSCROLL | WS_VSCROLL | WS_VISIBLE, - 0, 0, 200, 60, parent, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "class: %s, error: %d\n", lpClassName, (int) GetLastError()); - return hwnd; -} - -static HWND new_richedit(HWND parent) -{ - return new_window(RICHEDIT_CLASS, ES_MULTILINE, parent); -} - - -START_TEST(richole) -{ - IRichEditOle *reOle = NULL; - ITextDocument *txtDoc = NULL; - ITextSelection *txtSel = NULL; - IUnknown *punk; - HRESULT hres; - LRESULT res; - HWND w; - - /* Must explicitly LoadLibrary(). The test has no references to functions in - * RICHED20.DLL, so the linker doesn't actually link to it. */ - hmoduleRichEdit = LoadLibrary("RICHED20.DLL"); - ok(hmoduleRichEdit != NULL, "error: %d\n", (int) GetLastError()); - - w = new_richedit(NULL); - if (!w) { - skip("Couldn't create window\n"); - return; - } - - res = SendMessage(w, EM_GETOLEINTERFACE, 0, (LPARAM) &reOle); - ok(res, "SendMessage\n"); - ok(reOle != NULL, "EM_GETOLEINTERFACE\n"); - - hres = IUnknown_QueryInterface(reOle, &IID_ITextDocument, - (void **) &txtDoc); - ok(hres == S_OK, "IRichEditOle_QueryInterface\n"); - ok(txtDoc != NULL, "IRichEditOle_QueryInterface\n"); - - hres = ITextDocument_GetSelection(txtDoc, &txtSel); - ok(hres == S_OK, "ITextDocument_GetSelection\n"); - ok(txtSel != NULL, "ITextDocument_GetSelection\n"); - - punk = NULL; - hres = ITextSelection_QueryInterface(txtSel, &IID_ITextSelection, (void **) &punk); - ok(hres == S_OK, "ITextSelection_QueryInterface\n"); - ok(punk != NULL, "ITextSelection_QueryInterface\n"); - IUnknown_Release(punk); - - punk = NULL; - hres = ITextSelection_QueryInterface(txtSel, &IID_ITextRange, (void **) &punk); - ok(hres == S_OK, "ITextSelection_QueryInterface\n"); - ok(punk != NULL, "ITextSelection_QueryInterface\n"); - IUnknown_Release(punk); - - punk = NULL; - hres = ITextSelection_QueryInterface(txtSel, &IID_IDispatch, (void **) &punk); - ok(hres == S_OK, "ITextSelection_QueryInterface\n"); - ok(punk != NULL, "ITextSelection_QueryInterface\n"); - IUnknown_Release(punk); - - ITextDocument_Release(txtDoc); - IUnknown_Release(reOle); - DestroyWindow(w); - - /* Methods should return CO_E_RELEASED if the backing document has - been released. One test should suffice. */ - hres = ITextSelection_CanEdit(txtSel, NULL); - ok(hres == CO_E_RELEASED, "ITextSelection after ITextDocument destroyed\n"); - - ITextSelection_Release(txtSel); -} diff --git a/rostests/winetests/riched20/testlist.c b/rostests/winetests/riched20/testlist.c deleted file mode 100644 index 0688dbfc303..00000000000 --- a/rostests/winetests/riched20/testlist.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_editor(void); -extern void func_richole(void); -extern void func_txtsrv(void); - -const struct test winetest_testlist[] = -{ - { "editor", func_editor }, - { "richole", func_richole }, - { "txtsrv", func_txtsrv }, - { 0, 0 } -}; diff --git a/rostests/winetests/riched20/txtsrv.c b/rostests/winetests/riched20/txtsrv.c deleted file mode 100644 index 8d126ea4a95..00000000000 --- a/rostests/winetests/riched20/txtsrv.c +++ /dev/null @@ -1,840 +0,0 @@ -/* - * Unit test suite for windowless rich edit controls - * - * Copyright 2008 Maarten Lankhorst - * Copyright 2008 Austin Lund - * Copyright 2008 Dylan Smith - * - * 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 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static HMODULE hmoduleRichEdit; -static IID *pIID_ITextServices; -static IID *pIID_ITextHost; -static IID *pIID_ITextHost2; - -static const char *debugstr_guid(REFIID riid) -{ - static char buf[50]; - - if(!riid) - return "(null)"; - - sprintf(buf, "{%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]); - - return buf; -} - -/* Define C Macros for ITextServices calls. */ - -/* Use a special table for x86 machines to convert the thiscall - * calling convention. This isn't needed on other platforms. */ -#ifdef __i386__ -static ITextServicesVtbl itextServicesStdcallVtbl; -#define TXTSERV_VTABLE(This) (&itextServicesStdcallVtbl) -#else /* __i386__ */ -#define TXTSERV_VTABLE(This) (This)->lpVtbl -#endif /* __i386__ */ - -#define ITextServices_TxSendMessage(This,a,b,c,d) TXTSERV_VTABLE(This)->TxSendMessage(This,a,b,c,d) -#define ITextServices_TxDraw(This,a,b,c,d,e,f,g,h,i,j,k,l) TXTSERV_VTABLE(This)->TxDraw(This,a,b,c,d,e,f,g,h,i,j,k,l) -#define ITextServices_TxGetHScroll(This,a,b,c,d,e) TXTSERV_VTABLE(This)->TxGetHScroll(This,a,b,c,d,e) -#define ITextServices_TxGetVScroll(This,a,b,c,d,e) TXTSERV_VTABLE(This)->TxGetVScroll(This,a,b,c,d,e) -#define ITextServices_OnTxSetCursor(This,a,b,c,d,e,f,g,h,i) TXTSERV_VTABLE(This)->OnTxSetCursor(This,a,b,c,d,e,f,g,h,i) -#define ITextServices_TxQueryHitPoint(This,a,b,c,d,e,f,g,h,i,j) TXTSERV_VTABLE(This)->TxQueryHitPoint(This,a,b,c,d,e,f,g,h,i,j) -#define ITextServices_OnTxInplaceActivate(This,a) TXTSERV_VTABLE(This)->OnTxInplaceActivate(This,a) -#define ITextServices_OnTxInplaceDeactivate(This) TXTSERV_VTABLE(This)->OnTxInplaceDeactivate(This) -#define ITextServices_OnTxUIActivate(This) TXTSERV_VTABLE(This)->OnTxUIActivate(This) -#define ITextServices_OnTxUIDeactivate(This) TXTSERV_VTABLE(This)->OnTxUIDeactivate(This) -#define ITextServices_TxGetText(This,a) TXTSERV_VTABLE(This)->TxGetText(This,a) -#define ITextServices_TxSetText(This,a) TXTSERV_VTABLE(This)->TxSetText(This,a) -#define ITextServices_TxGetCurrentTargetX(This,a) TXTSERV_VTABLE(This)->TxGetCurrentTargetX(This,a) -#define ITextServices_TxGetBaseLinePos(This,a) TXTSERV_VTABLE(This)->TxGetBaseLinePos(This,a) -#define ITextServices_TxGetNaturalSize(This,a,b,c,d,e,f,g,h) TXTSERV_VTABLE(This)->TxGetNaturalSize(This,a,b,c,d,e,f,g,h) -#define ITextServices_TxGetDropTarget(This,a) TXTSERV_VTABLE(This)->TxGetDropTarget(This,a) -#define ITextServices_OnTxPropertyBitsChange(This,a,b) TXTSERV_VTABLE(This)->OnTxPropertyBitsChange(This,a,b) -#define ITextServices_TxGetCachedSize(This,a,b) TXTSERV_VTABLE(This)->TxGetCachedSize(This,a,b) - -/* Set the WINETEST_DEBUG environment variable to be greater than 1 for verbose - * function call traces of ITextHost. */ -#define TRACECALL if(winetest_debug > 1) trace - -/************************************************************************/ -/* ITextHost implementation for conformance testing. */ - -typedef struct ITextHostTestImpl -{ - ITextHost ITextHost_iface; - LONG refCount; -} ITextHostTestImpl; - -static inline ITextHostTestImpl *impl_from_ITextHost(ITextHost *iface) -{ - return CONTAINING_RECORD(iface, ITextHostTestImpl, ITextHost_iface); -} - -static HRESULT WINAPI ITextHostImpl_QueryInterface(ITextHost *iface, - REFIID riid, - LPVOID *ppvObject) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - - if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, pIID_ITextHost)) { - *ppvObject = This; - ITextHost_AddRef((ITextHost *)*ppvObject); - return S_OK; - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI ITextHostImpl_AddRef(ITextHost *iface) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - ULONG refCount = InterlockedIncrement(&This->refCount); - return refCount; -} - -static ULONG WINAPI ITextHostImpl_Release(ITextHost *iface) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - ULONG refCount = InterlockedDecrement(&This->refCount); - - if (!refCount) - { - CoTaskMemFree(This); - return 0; - } else { - return refCount; - } -} - -static HDC WINAPI ITextHostImpl_TxGetDC(ITextHost *iface) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxGetDC(%p)\n", This); - return NULL; -} - -static INT WINAPI ITextHostImpl_TxReleaseDC(ITextHost *iface, - HDC hdc) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxReleaseDC(%p)\n", This); - return 0; -} - -static BOOL WINAPI ITextHostImpl_TxShowScrollBar(ITextHost *iface, - INT fnBar, - BOOL fShow) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxShowScrollBar(%p, fnBar=%d, fShow=%d)\n", - This, fnBar, fShow); - return FALSE; -} - -static BOOL WINAPI ITextHostImpl_TxEnableScrollBar(ITextHost *iface, - INT fuSBFlags, - INT fuArrowflags) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxEnableScrollBar(%p, fuSBFlags=%d, fuArrowflags=%d)\n", - This, fuSBFlags, fuArrowflags); - return FALSE; -} - -static BOOL WINAPI ITextHostImpl_TxSetScrollRange(ITextHost *iface, - INT fnBar, - LONG nMinPos, - INT nMaxPos, - BOOL fRedraw) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxSetScrollRange(%p, fnBar=%d, nMinPos=%d, nMaxPos=%d, fRedraw=%d)\n", - This, fnBar, nMinPos, nMaxPos, fRedraw); - return FALSE; -} - -static BOOL WINAPI ITextHostImpl_TxSetScrollPos(ITextHost *iface, - INT fnBar, - INT nPos, - BOOL fRedraw) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxSetScrollPos(%p, fnBar=%d, nPos=%d, fRedraw=%d)\n", - This, fnBar, nPos, fRedraw); - return FALSE; -} - -static void WINAPI ITextHostImpl_TxInvalidateRect(ITextHost *iface, - LPCRECT prc, - BOOL fMode) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxInvalidateRect(%p, prc=%p, fMode=%d)\n", - This, prc, fMode); -} - -static void WINAPI ITextHostImpl_TxViewChange(ITextHost *iface, BOOL fUpdate) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxViewChange(%p, fUpdate=%d)\n", - This, fUpdate); -} - -static BOOL WINAPI ITextHostImpl_TxCreateCaret(ITextHost *iface, - HBITMAP hbmp, - INT xWidth, INT yHeight) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxCreateCaret(%p, nbmp=%p, xWidth=%d, yHeight=%d)\n", - This, hbmp, xWidth, yHeight); - return FALSE; -} - -static BOOL WINAPI ITextHostImpl_TxShowCaret(ITextHost *iface, BOOL fShow) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxShowCaret(%p, fShow=%d)\n", - This, fShow); - return FALSE; -} - -static BOOL WINAPI ITextHostImpl_TxSetCaretPos(ITextHost *iface, - INT x, INT y) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxSetCaretPos(%p, x=%d, y=%d)\n", This, x, y); - return FALSE; -} - -static BOOL WINAPI ITextHostImpl_TxSetTimer(ITextHost *iface, - UINT idTimer, UINT uTimeout) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxSetTimer(%p, idTimer=%u, uTimeout=%u)\n", - This, idTimer, uTimeout); - return FALSE; -} - -static void WINAPI ITextHostImpl_TxKillTimer(ITextHost *iface, UINT idTimer) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxKillTimer(%p, idTimer=%u)\n", This, idTimer); -} - -static void WINAPI ITextHostImpl_TxScrollWindowEx(ITextHost *iface, - INT dx, INT dy, - LPCRECT lprcScroll, - LPCRECT lprcClip, - HRGN hRgnUpdate, - LPRECT lprcUpdate, - UINT fuScroll) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxScrollWindowEx(%p, %d, %d, %p, %p, %p, %p, %d)\n", - This, dx, dy, lprcScroll, lprcClip, hRgnUpdate, lprcUpdate, fuScroll); -} - -static void WINAPI ITextHostImpl_TxSetCapture(ITextHost *iface, BOOL fCapture) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxSetCapture(%p, fCapture=%d)\n", This, fCapture); -} - -static void WINAPI ITextHostImpl_TxSetFocus(ITextHost *iface) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxSetFocus(%p)\n", This); -} - -static void WINAPI ITextHostImpl_TxSetCursor(ITextHost *iface, - HCURSOR hcur, - BOOL fText) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxSetCursor(%p, hcur=%p, fText=%d)\n", - This, hcur, fText); -} - -static BOOL WINAPI ITextHostImpl_TxScreenToClient(ITextHost *iface, - LPPOINT lppt) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxScreenToClient(%p, lppt=%p)\n", This, lppt); - return FALSE; -} - -static BOOL WINAPI ITextHostImpl_TxClientToScreen(ITextHost *iface, - LPPOINT lppt) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxClientToScreen(%p, lppt=%p)\n", This, lppt); - return FALSE; -} - -static HRESULT WINAPI ITextHostImpl_TxActivate(ITextHost *iface, - LONG *plOldState) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxActivate(%p, plOldState=%p)\n", This, plOldState); - return E_NOTIMPL; -} - -static HRESULT WINAPI ITextHostImpl_TxDeactivate(ITextHost *iface, - LONG lNewState) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxDeactivate(%p, lNewState=%d)\n", This, lNewState); - return E_NOTIMPL; -} - -static HRESULT WINAPI ITextHostImpl_TxGetClientRect(ITextHost *iface, - LPRECT prc) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxGetClientRect(%p, prc=%p)\n", This, prc); - return E_NOTIMPL; -} - -static HRESULT WINAPI ITextHostImpl_TxGetViewInset(ITextHost *iface, - LPRECT prc) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxGetViewInset(%p, prc=%p)\n", This, prc); - return E_NOTIMPL; -} - -static HRESULT WINAPI ITextHostImpl_TxGetCharFormat(ITextHost *iface, - const CHARFORMATW **ppCF) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxGetCharFormat(%p, ppCF=%p)\n", This, ppCF); - return E_NOTIMPL; -} - -static HRESULT WINAPI ITextHostImpl_TxGetParaFormat(ITextHost *iface, - const PARAFORMAT **ppPF) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxGetParaFormat(%p, ppPF=%p)\n", This, ppPF); - return E_NOTIMPL; -} - -static COLORREF WINAPI ITextHostImpl_TxGetSysColor(ITextHost *iface, - int nIndex) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxGetSysColor(%p, nIndex=%d)\n", This, nIndex); - return E_NOTIMPL; -} - -static HRESULT WINAPI ITextHostImpl_TxGetBackStyle(ITextHost *iface, - TXTBACKSTYLE *pStyle) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxGetBackStyle(%p, pStyle=%p)\n", This, pStyle); - return E_NOTIMPL; -} - -static HRESULT WINAPI ITextHostImpl_TxGetMaxLength(ITextHost *iface, - DWORD *pLength) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxGetMaxLength(%p, pLength=%p)\n", This, pLength); - return E_NOTIMPL; -} - -static HRESULT WINAPI ITextHostImpl_TxGetScrollBars(ITextHost *iface, - DWORD *pdwScrollBar) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxGetScrollBars(%p, pdwScrollBar=%p)\n", - This, pdwScrollBar); - return E_NOTIMPL; -} - -static HRESULT WINAPI ITextHostImpl_TxGetPasswordChar(ITextHost *iface, - WCHAR *pch) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxGetPasswordChar(%p, pch=%p)\n", This, pch); - return E_NOTIMPL; -} - -static HRESULT WINAPI ITextHostImpl_TxGetAcceleratorPos(ITextHost *iface, - LONG *pch) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxGetAcceleratorPos(%p, pch=%p)\n", This, pch); - return E_NOTIMPL; -} - -static HRESULT WINAPI ITextHostImpl_TxGetExtent(ITextHost *iface, - LPSIZEL lpExtent) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxGetExtent(%p, lpExtent=%p)\n", This, lpExtent); - return E_NOTIMPL; -} - -static HRESULT WINAPI ITextHostImpl_OnTxCharFormatChange(ITextHost *iface, - const CHARFORMATW *pcf) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to OnTxCharFormatChange(%p, pcf=%p)\n", This, pcf); - return E_NOTIMPL; -} - -static HRESULT WINAPI ITextHostImpl_OnTxParaFormatChange(ITextHost *iface, - const PARAFORMAT *ppf) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to OnTxParaFormatChange(%p, ppf=%p)\n", This, ppf); - return E_NOTIMPL; -} - -/* This must return S_OK for the native ITextServices object to - initialize. */ -static HRESULT WINAPI ITextHostImpl_TxGetPropertyBits(ITextHost *iface, - DWORD dwMask, - DWORD *pdwBits) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxGetPropertyBits(%p, dwMask=0x%08x, pdwBits=%p)\n", - This, dwMask, pdwBits); - *pdwBits = 0; - return S_OK; -} - -static HRESULT WINAPI ITextHostImpl_TxNotify(ITextHost *iface, DWORD iNotify, - void *pv) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxNotify(%p, iNotify=%d, pv=%p)\n", This, iNotify, pv); - return E_NOTIMPL; -} - -static HIMC WINAPI ITextHostImpl_TxImmGetContext(ITextHost *iface) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxImmGetContext(%p)\n", This); - return 0; -} - -static void WINAPI ITextHostImpl_TxImmReleaseContext(ITextHost *iface, HIMC himc) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxImmReleaseContext(%p, himc=%p)\n", This, himc); -} - -/* This function must set the variable pointed to by *lSelBarWidth. - Otherwise an uninitialized value will be used to calculate - positions and sizes even if E_NOTIMPL is returned. */ -static HRESULT WINAPI ITextHostImpl_TxGetSelectionBarWidth(ITextHost *iface, - LONG *lSelBarWidth) -{ - ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxGetSelectionBarWidth(%p, lSelBarWidth=%p)\n", - This, lSelBarWidth); - *lSelBarWidth = 0; - return E_NOTIMPL; -} - -static ITextHostVtbl itextHostVtbl = { - ITextHostImpl_QueryInterface, - ITextHostImpl_AddRef, - ITextHostImpl_Release, - ITextHostImpl_TxGetDC, - ITextHostImpl_TxReleaseDC, - ITextHostImpl_TxShowScrollBar, - ITextHostImpl_TxEnableScrollBar, - ITextHostImpl_TxSetScrollRange, - ITextHostImpl_TxSetScrollPos, - ITextHostImpl_TxInvalidateRect, - ITextHostImpl_TxViewChange, - ITextHostImpl_TxCreateCaret, - ITextHostImpl_TxShowCaret, - ITextHostImpl_TxSetCaretPos, - ITextHostImpl_TxSetTimer, - ITextHostImpl_TxKillTimer, - ITextHostImpl_TxScrollWindowEx, - ITextHostImpl_TxSetCapture, - ITextHostImpl_TxSetFocus, - ITextHostImpl_TxSetCursor, - ITextHostImpl_TxScreenToClient, - ITextHostImpl_TxClientToScreen, - ITextHostImpl_TxActivate, - ITextHostImpl_TxDeactivate, - ITextHostImpl_TxGetClientRect, - ITextHostImpl_TxGetViewInset, - ITextHostImpl_TxGetCharFormat, - ITextHostImpl_TxGetParaFormat, - ITextHostImpl_TxGetSysColor, - ITextHostImpl_TxGetBackStyle, - ITextHostImpl_TxGetMaxLength, - ITextHostImpl_TxGetScrollBars, - ITextHostImpl_TxGetPasswordChar, - ITextHostImpl_TxGetAcceleratorPos, - ITextHostImpl_TxGetExtent, - ITextHostImpl_OnTxCharFormatChange, - ITextHostImpl_OnTxParaFormatChange, - ITextHostImpl_TxGetPropertyBits, - ITextHostImpl_TxNotify, - ITextHostImpl_TxImmGetContext, - ITextHostImpl_TxImmReleaseContext, - ITextHostImpl_TxGetSelectionBarWidth -}; - -static ITextServices *txtserv = NULL; -static ITextHostTestImpl *dummyTextHost; -static void *wrapperCodeMem = NULL; - -#include "pshpack1.h" - -/* Code structure for x86 byte code */ -typedef struct -{ - BYTE pop_eax; /* popl %eax */ - BYTE push_ecx; /* pushl %ecx */ - BYTE push_eax; /* pushl %eax */ - BYTE jmp_func; /* jmp $func */ - DWORD func; -} THISCALL_TO_STDCALL_THUNK; - -typedef struct -{ - BYTE pop_eax; /* popl %eax */ - BYTE pop_ecx; /* popl %ecx */ - BYTE push_eax; /* pushl %eax */ - BYTE mov_vtable_eax[2]; /* movl (%ecx), %eax */ - BYTE jmp_eax[2]; /* jmp *$vtablefunc_offset(%eax) */ - int vtablefunc_offset; -} STDCALL_TO_THISCALL_THUNK; - -#include "poppack.h" - -static void setup_thiscall_wrappers(void) -{ -#ifdef __i386__ - void** pVtable; - void** pVtableEnd; - THISCALL_TO_STDCALL_THUNK *thunk; - STDCALL_TO_THISCALL_THUNK *thunk2; - - wrapperCodeMem = VirtualAlloc(NULL, - (sizeof(ITextHostVtbl)/sizeof(void*) - 3) - * sizeof(THISCALL_TO_STDCALL_THUNK) - +(sizeof(ITextServicesVtbl)/sizeof(void*) - 3) - * sizeof(STDCALL_TO_THISCALL_THUNK), - MEM_COMMIT, PAGE_EXECUTE_READWRITE); - thunk = wrapperCodeMem; - - /* Wrap all ITextHostImpl methods with code to perform a thiscall to - * stdcall conversion. The thiscall calling convention places the This - * pointer in ecx on the x86 platform, and the stdcall calling convention - * pushes the This pointer on the stack as the first argument. - * - * The byte code does the conversion then jumps to the real function. - * - * Each wrapper needs to be modified so that the function to jump to is - * modified in the byte code. */ - - /* Skip QueryInterface, AddRef, and Release native actually - * defined them with the stdcall calling convention. */ - pVtable = (void**)&itextHostVtbl + 3; - pVtableEnd = (void**)(&itextHostVtbl + 1); - while (pVtable != pVtableEnd) { - /* write byte code to executable memory */ - thunk->pop_eax = 0x58; /* popl %eax */ - thunk->push_ecx = 0x51; /* pushl %ecx */ - thunk->push_eax = 0x50; /* pushl %eax */ - thunk->jmp_func = 0xe9; /* jmp $func */ - /* The address needs to be relative to the end of the jump instructions. */ - thunk->func = (char*)*pVtable - (char*)(&thunk->func + 1); - *pVtable = thunk; - pVtable++; - thunk++; - } - - /* Setup an ITextServices standard call vtable that will call the - * native thiscall vtable when the methods are called. */ - - /* QueryInterface, AddRef, and Release should be called directly on the - * real vtable since they use the stdcall calling convention. */ - thunk2 = (STDCALL_TO_THISCALL_THUNK *)thunk; - pVtable = (void**)&itextServicesStdcallVtbl + 3; - pVtableEnd = (void**)(&itextServicesStdcallVtbl + 1); - while (pVtable != pVtableEnd) { - /* write byte code to executable memory */ - thunk2->pop_eax = 0x58; /* popl %eax */ - thunk2->pop_ecx = 0x59; /* popl %ecx */ - thunk2->push_eax = 0x50; /* pushl %eax */ - thunk2->mov_vtable_eax[0] = 0x8b; /* movl (%ecx), %eax */ - thunk2->mov_vtable_eax[1] = 0x01; - thunk2->jmp_eax[0] = 0xff; /* jmp *$vtablefunc_offset(%eax) */ - thunk2->jmp_eax[1] = 0xa0; - thunk2->vtablefunc_offset = (char*)pVtable - (char*)&itextServicesStdcallVtbl; - *pVtable = thunk2; - pVtable++; - thunk2++; - } -#endif /* __i386__ */ -} - -/*************************************************************************/ -/* Conformance test functions. */ - -/* Initialize the test texthost structure */ -static BOOL init_texthost(void) -{ - IUnknown *init; - HRESULT result; - PCreateTextServices pCreateTextServices; - - dummyTextHost = CoTaskMemAlloc(sizeof(*dummyTextHost)); - if (dummyTextHost == NULL) { - skip("Insufficient memory to create ITextHost interface\n"); - return FALSE; - } - dummyTextHost->ITextHost_iface.lpVtbl = &itextHostVtbl; - dummyTextHost->refCount = 1; - - /* MSDN states that an IUnknown object is returned by - CreateTextServices which is then queried to obtain a - ITextServices object. */ - pCreateTextServices = (void*)GetProcAddress(hmoduleRichEdit, "CreateTextServices"); - result = (*pCreateTextServices)(NULL, &dummyTextHost->ITextHost_iface, &init); - ok(result == S_OK, "Did not return S_OK when created (result = %x)\n", result); - if (result != S_OK) { - CoTaskMemFree(dummyTextHost); - skip("CreateTextServices failed.\n"); - return FALSE; - } - - result = IUnknown_QueryInterface(init, pIID_ITextServices, - (void **)&txtserv); - ok((result == S_OK) && (txtserv != NULL), "Querying interface failed (result = %x, txtserv = %p)\n", result, txtserv); - IUnknown_Release(init); - if (!((result == S_OK) && (txtserv != NULL))) { - CoTaskMemFree(dummyTextHost); - skip("Could not retrieve ITextServices interface\n"); - return FALSE; - } - - return TRUE; -} - -static void free_texthost(void) -{ - IUnknown_Release(txtserv); - CoTaskMemFree(dummyTextHost); -} - -static void test_TxGetText(void) -{ - HRESULT hres; - BSTR rettext; - - if (!init_texthost()) - return; - - hres = ITextServices_TxGetText(txtserv, &rettext); - ok(hres == S_OK, "ITextServices_TxGetText failed (result = %x)\n", hres); - - free_texthost(); -} - -static void test_TxSetText(void) -{ - HRESULT hres; - BSTR rettext; - WCHAR settext[] = {'T','e','s','t',0}; - - if (!init_texthost()) - return; - - hres = ITextServices_TxSetText(txtserv, settext); - ok(hres == S_OK, "ITextServices_TxSetText failed (result = %x)\n", hres); - - hres = ITextServices_TxGetText(txtserv, &rettext); - ok(hres == S_OK, "ITextServices_TxGetText failed (result = %x)\n", hres); - - ok(SysStringLen(rettext) == 4, - "String returned of wrong length (expected 4, got %d)\n", SysStringLen(rettext)); - ok(memcmp(rettext,settext,SysStringByteLen(rettext)) == 0, - "String returned differs\n"); - - SysFreeString(rettext); - free_texthost(); -} - -static void test_TxGetNaturalSize(void) { - HRESULT result; - BOOL ret; - - /* This value is used when calling TxGetNaturalSize. MSDN says - that this is not supported however a null pointer cannot be - used as it will cause a segmentation violation. The values in - the structure being pointed to are required to be INT_MAX - otherwise calculations can give wrong values. */ - const SIZEL psizelExtent = {INT_MAX,INT_MAX}; - - static const WCHAR oneA[] = {'A',0}; - - /* Results of measurements */ - LONG xdim, ydim; - - /* The device context to do the tests in */ - HDC hdcDraw; - - /* Variables with the text metric information */ - INT charwidth_caps_text[26]; - TEXTMETRIC tmInfo_text; - - if (!init_texthost()) - return; - - hdcDraw = GetDC(NULL); - SaveDC(hdcDraw); - - /* Populate the metric strucs */ - SetMapMode(hdcDraw,MM_TEXT); - GetTextMetrics(hdcDraw, &tmInfo_text); - SetLastError(0xdeadbeef); - ret = GetCharWidth32(hdcDraw,'A','Z',charwidth_caps_text); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) { - win_skip("GetCharWidth32 is not available\n"); - goto cleanup; - } - - /* Make measurements in MM_TEXT */ - SetMapMode(hdcDraw,MM_TEXT); - xdim = 0; ydim = 0; - - result = ITextServices_TxSetText(txtserv, oneA); - ok(result == S_OK, "ITextServices_TxSetText failed (result = %x)\n", result); - if (result != S_OK) { - skip("Could not set text\n"); - goto cleanup; - } - - SetLastError(0xdeadbeef); - result = ITextServices_TxGetNaturalSize(txtserv, DVASPECT_CONTENT, - hdcDraw, NULL, NULL, - TXTNS_FITTOCONTENT, &psizelExtent, - &xdim, &ydim); - todo_wine ok(result == S_OK || broken(result == E_FAIL), /* WINXP Arabic Language */ - "TxGetNaturalSize gave unexpected return value (result = %x)\n", result); - if (result == S_OK) { - todo_wine ok(ydim == tmInfo_text.tmHeight, - "Height calculated incorrectly (expected %d, got %d)\n", - tmInfo_text.tmHeight, ydim); - /* The native DLL adds one pixel extra when calculating widths. */ - todo_wine ok(xdim >= charwidth_caps_text[0] && xdim <= charwidth_caps_text[0] + 1, - "Width calculated incorrectly (expected %d {+1}, got %d)\n", - charwidth_caps_text[0], xdim); - } else - skip("TxGetNaturalSize measurements not performed (xdim = %d, ydim = %d, result = %x, error = %x)\n", - xdim, ydim, result, GetLastError()); - -cleanup: - RestoreDC(hdcDraw,1); - ReleaseDC(NULL,hdcDraw); - free_texthost(); -} - -static void test_TxDraw(void) -{ - HDC tmphdc = GetDC(NULL); - DWORD dwAspect = DVASPECT_CONTENT; - HDC hicTargetDev = NULL; /* Means "default" device */ - DVTARGETDEVICE *ptd = NULL; - void *pvAspect = NULL; - HRESULT result; - RECTL client = {0,0,100,100}; - - if (!init_texthost()) - return; - - todo_wine { - result = ITextServices_TxDraw(txtserv, dwAspect, 0, pvAspect, ptd, - tmphdc, hicTargetDev, &client, NULL, - NULL, NULL, 0, 0); - ok(result == S_OK, "TxDraw failed (result = %x)\n", result); - } - - free_texthost(); - -} - -DEFINE_GUID(expected_iid_itextservices, 0x8d33f740, 0xcf58, 0x11ce, 0xa8, 0x9d, 0x00, 0xaa, 0x00, 0x6c, 0xad, 0xc5); -DEFINE_GUID(expected_iid_itexthost, 0x13e670f4,0x1a5a,0x11cf,0xab,0xeb,0x00,0xaa,0x00,0xb6,0x5e,0xa1); -DEFINE_GUID(expected_iid_itexthost2, 0x13e670f5,0x1a5a,0x11cf,0xab,0xeb,0x00,0xaa,0x00,0xb6,0x5e,0xa1); - -static void test_IIDs(void) -{ - ok(IsEqualIID(pIID_ITextServices, &expected_iid_itextservices), - "unexpected value for IID_ITextServices: %s\n", debugstr_guid(pIID_ITextServices)); - ok(IsEqualIID(pIID_ITextHost, &expected_iid_itexthost), - "unexpected value for IID_ITextHost: %s\n", debugstr_guid(pIID_ITextHost)); - ok(IsEqualIID(pIID_ITextHost2, &expected_iid_itexthost2), - "unexpected value for IID_ITextHost2: %s\n", debugstr_guid(pIID_ITextHost2)); -} - - -START_TEST( txtsrv ) -{ - setup_thiscall_wrappers(); - - /* Must explicitly LoadLibrary(). The test has no references to functions in - * RICHED20.DLL, so the linker doesn't actually link to it. */ - hmoduleRichEdit = LoadLibrary("RICHED20.DLL"); - ok(hmoduleRichEdit != NULL, "error: %d\n", (int) GetLastError()); - - pIID_ITextServices = (IID*)GetProcAddress(hmoduleRichEdit, "IID_ITextServices"); - pIID_ITextHost = (IID*)GetProcAddress(hmoduleRichEdit, "IID_ITextHost"); - pIID_ITextHost2 = (IID*)GetProcAddress(hmoduleRichEdit, "IID_ITextHost2"); - test_IIDs(); - - if (init_texthost()) - { - free_texthost(); - - test_TxGetText(); - test_TxSetText(); - test_TxGetNaturalSize(); - test_TxDraw(); - } - if (wrapperCodeMem) VirtualFree(wrapperCodeMem, 0, MEM_RELEASE); -} diff --git a/rostests/winetests/riched32/CMakeLists.txt b/rostests/winetests/riched32/CMakeLists.txt deleted file mode 100644 index 2e57015b04d..00000000000 --- a/rostests/winetests/riched32/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(riched32_winetest editor.c testlist.c) -target_link_libraries(riched32_winetest wine) -set_module_type(riched32_winetest win32cui) -add_importlibs(riched32_winetest ole32 user32 msvcrt kernel32 ntdll) -add_cd_file(TARGET riched32_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/riched32/editor.c b/rostests/winetests/riched32/editor.c deleted file mode 100644 index 5cc269d855d..00000000000 --- a/rostests/winetests/riched32/editor.c +++ /dev/null @@ -1,1105 +0,0 @@ -/* -* Unit test suite for rich edit control 1.0 -* -* Copyright 2006 Google (Thomas Kho) -* Copyright 2007 Matt Finnicum -* Copyright 2007 Dmitry Timoshkov -* Copyright 2007 Alex Villacís Lasso -* -* 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 -#include -#include -#include -#include - -static HMODULE hmoduleRichEdit; - -static HWND new_window(LPCTSTR lpClassName, DWORD dwStyle, HWND parent) { - HWND hwnd; - hwnd = CreateWindow(lpClassName, NULL, dwStyle|WS_POPUP|WS_HSCROLL|WS_VSCROLL - |WS_VISIBLE, 0, 0, 200, 60, parent, NULL, - hmoduleRichEdit, NULL); - ok(hwnd != NULL, "class: %s, error: %d\n", lpClassName, (int) GetLastError()); - return hwnd; -} - -static HWND new_richedit(HWND parent) { - return new_window(RICHEDIT_CLASS10A, ES_MULTILINE, parent); -} - -static void test_WM_SETTEXT(void) -{ - static const struct { - const char *itemtext; - DWORD lines; - DWORD lines_broken; - } testitems[] = { - { "TestSomeText", 1}, - { "TestSomeText\r", 1}, - { "TestSomeText\rSomeMoreText\r", 2, 1}, /* NT4 and below */ - { "TestSomeText\n\nTestSomeText", 3}, - { "TestSomeText\r\r\nTestSomeText", 2}, - { "TestSomeText\r\r\n\rTestSomeText", 3, 2}, /* NT4 and below */ - { "TestSomeText\r\n\r\r\n\rTestSomeText", 4, 3}, /* NT4 and below */ - { "TestSomeText\r\n" ,2}, - { "TestSomeText\r\nSomeMoreText\r\n", 3}, - { "TestSomeText\r\n\r\nTestSomeText", 3}, - { "TestSomeText TestSomeText" ,1}, - { "TestSomeText \r\nTestSomeText", 2}, - { "TestSomeText\r\n \r\nTestSomeText", 3}, - { "TestSomeText\n", 2}, - { "TestSomeText\r\r\r", 3, 1}, /* NT4 and below */ - { "TestSomeText\r\r\rSomeMoreText", 4, 2} /* NT4 and below */ - }; - HWND hwndRichEdit = new_richedit(NULL); - int i; - - /* This test attempts to show that WM_SETTEXT on a riched32 control does not - * attempt to modify the text that is pasted into the control, and should - * return it as is. In particular, \r\r\n is NOT converted, unlike riched20. - * - * For riched32, the rules for breaking lines seem to be the following: - * - \r\n is one line break. This is the normal case. - * - \r{0,2}\n is one line break. In particular, \n by itself is a line break. - * - \r{0,N-1}\r\r\n is N line breaks. - * - \n{1,N} are that many line breaks. - * - \r with text or other characters (except \n) past it, is a line break. That - * is, a run of \r{N} without a terminating \n is considered N line breaks - * - \r at the end of the text is NOT a line break. This differs from riched20, - * where \r at the end of the text is a proper line break. - */ - - for (i = 0; i < sizeof(testitems)/sizeof(testitems[0]); i++) { - - char buf[1024] = {0}; - LRESULT result; - - result = SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) testitems[i].itemtext); - ok (result == 1, "[%d] WM_SETTEXT returned %ld instead of 1\n", i, result); - result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buf); - ok (result == lstrlen(buf), - "[%d] WM_GETTEXT returned %ld instead of expected %u\n", - i, result, lstrlen(buf)); - result = strcmp(testitems[i].itemtext, buf); - ok (result == 0, - "[%d] WM_SETTEXT round trip: strcmp = %ld\n", i, result); - result = SendMessage(hwndRichEdit, EM_GETLINECOUNT, 0, 0); - ok (result == testitems[i].lines || - broken(testitems[i].lines_broken && result == testitems[i].lines_broken), - "[%d] EM_GETLINECOUNT returned %ld, expected %d\n", i, result, testitems[i].lines); - } - - DestroyWindow(hwndRichEdit); -} - -static void test_WM_GETTEXTLENGTH(void) -{ - HWND hwndRichEdit = new_richedit(NULL); - static const char text3[] = "aaa\r\nbbb\r\nccc\r\nddd\r\neee"; - static const char text4[] = "aaa\r\nbbb\r\nccc\r\nddd\r\neee\r\n"; - int result; - - /* Test for WM_GETTEXTLENGTH */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text3); - result = SendMessage(hwndRichEdit, WM_GETTEXTLENGTH, 0, 0); - ok(result == lstrlen(text3), - "WM_GETTEXTLENGTH reports incorrect length %d, expected %d\n", - result, lstrlen(text3)); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text4); - result = SendMessage(hwndRichEdit, WM_GETTEXTLENGTH, 0, 0); - ok(result == lstrlen(text4), - "WM_GETTEXTLENGTH reports incorrect length %d, expected %d\n", - result, lstrlen(text4)); - - DestroyWindow(hwndRichEdit); -} - -static DWORD CALLBACK test_EM_STREAMIN_esCallback(DWORD_PTR dwCookie, - LPBYTE pbBuff, - LONG cb, - LONG *pcb) -{ - const char** str = (const char**)dwCookie; - int size = strlen(*str); - *pcb = cb; - if (*pcb > size) { - *pcb = size; - } - if (*pcb > 0) { - memcpy(pbBuff, *str, *pcb); - *str += *pcb; - } - return 0; -} - - -static void test_EM_STREAMIN(void) -{ - HWND hwndRichEdit = new_richedit(NULL); - LRESULT result; - EDITSTREAM es; - char buffer[1024] = {0}; - - const char * streamText0 = "{\\rtf1 TestSomeText}"; - const char * streamText0a = "{\\rtf1 TestSomeText\\par}"; - const char * streamText0b = "{\\rtf1 TestSomeText\\par\\par}"; - - const char * streamText1 = - "{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang12298{\\fonttbl{\\f0\\fswiss\\fprq2\\fcharset0 System;}}\r\n" - "\\viewkind4\\uc1\\pard\\f0\\fs17 TestSomeText\\par\r\n" - "}\r\n"; - - /* This should be accepted in richedit 1.0 emulation. See bug #8326 */ - const char * streamText2 = - "{{\\colortbl;\\red0\\green255\\blue102;\\red255\\green255\\blue255;" - "\\red170\\green255\\blue255;\\red255\\green238\\blue0;\\red51\\green255" - "\\blue221;\\red238\\green238\\blue238;}\\tx0 \\tx424 \\tx848 \\tx1272 " - "\\tx1696 \\tx2120 \\tx2544 \\tx2968 \\tx3392 \\tx3816 \\tx4240 \\tx4664 " - "\\tx5088 \\tx5512 \\tx5936 \\tx6360 \\tx6784 \\tx7208 \\tx7632 \\tx8056 " - "\\tx8480 \\tx8904 \\tx9328 \\tx9752 \\tx10176 \\tx10600 \\tx11024 " - "\\tx11448 \\tx11872 \\tx12296 \\tx12720 \\tx13144 \\cf2 RichEdit1\\line }"; - - const char * streamText3 = "RichEdit1"; - - /* Minimal test without \par at the end */ - es.dwCookie = (DWORD_PTR)&streamText0; - es.dwError = 0; - es.pfnCallback = test_EM_STREAMIN_esCallback; - SendMessage(hwndRichEdit, EM_STREAMIN, - (WPARAM)(SF_RTF), (LPARAM)&es); - - result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok (result == 12, - "EM_STREAMIN: Test 0 returned %ld, expected 12\n", result); - result = strcmp (buffer,"TestSomeText"); - ok (result == 0, - "EM_STREAMIN: Test 0 set wrong text: Result: %s\n",buffer); - ok(es.dwError == 0, "EM_STREAMIN: Test 0 set error %d, expected %d\n", es.dwError, 0); - - /* Native richedit 2.0 ignores last \par */ - es.dwCookie = (DWORD_PTR)&streamText0a; - es.dwError = 0; - es.pfnCallback = test_EM_STREAMIN_esCallback; - SendMessage(hwndRichEdit, EM_STREAMIN, - (WPARAM)(SF_RTF), (LPARAM)&es); - - result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok (result == 12, - "EM_STREAMIN: Test 0-a returned %ld, expected 12\n", result); - result = strcmp (buffer,"TestSomeText"); - ok (result == 0, - "EM_STREAMIN: Test 0-a set wrong text: Result: %s\n",buffer); - ok(es.dwError == 0, "EM_STREAMIN: Test 0 set error %d, expected %d\n", es.dwError, 0); - - /* Native richedit 2.0 ignores last \par, next-to-last \par appears */ - es.dwCookie = (DWORD_PTR)&streamText0b; - es.dwError = 0; - es.pfnCallback = test_EM_STREAMIN_esCallback; - SendMessage(hwndRichEdit, EM_STREAMIN, - (WPARAM)(SF_RTF), (LPARAM)&es); - - result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok (result == 14, - "EM_STREAMIN: Test 0-b returned %ld, expected 14\n", result); - result = strcmp (buffer,"TestSomeText\r\n"); - ok (result == 0, - "EM_STREAMIN: Test 0-b set wrong text: Result: %s\n",buffer); - ok(es.dwError == 0, "EM_STREAMIN: Test 0 set error %d, expected %d\n", es.dwError, 0); - - es.dwCookie = (DWORD_PTR)&streamText1; - es.dwError = 0; - es.pfnCallback = test_EM_STREAMIN_esCallback; - SendMessage(hwndRichEdit, EM_STREAMIN, - (WPARAM)(SF_RTF), (LPARAM)&es); - - result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok (result == 12, - "EM_STREAMIN: Test 1 returned %ld, expected 12\n", result); - result = strcmp (buffer,"TestSomeText"); - ok (result == 0, - "EM_STREAMIN: Test 1 set wrong text: Result: %s\n",buffer); - ok(es.dwError == 0, "EM_STREAMIN: Test 0 set error %d, expected %d\n", es.dwError, 0); - - - es.dwCookie = (DWORD_PTR)&streamText2; - es.dwError = 0; - SendMessage(hwndRichEdit, EM_STREAMIN, - (WPARAM)(SF_RTF), (LPARAM)&es); - - result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - todo_wine { - ok (result == 9, - "EM_STREAMIN: Test 2 returned %ld, expected 9\n", result); - } - result = strcmp (buffer,"RichEdit1"); - todo_wine { - ok (result == 0, - "EM_STREAMIN: Test 2 set wrong text: Result: %s\n",buffer); - } - ok(es.dwError == 0, "EM_STREAMIN: Test 0 set error %d, expected %d\n", es.dwError, 0); - - es.dwCookie = (DWORD_PTR)&streamText3; - es.dwError = 0; - SendMessage(hwndRichEdit, EM_STREAMIN, - (WPARAM)(SF_RTF), (LPARAM)&es); - - result = SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok (result == 0, - "EM_STREAMIN: Test 3 returned %ld, expected 0\n", result); - ok (strlen(buffer) == 0, - "EM_STREAMIN: Test 3 set wrong text: Result: %s\n",buffer); - ok(es.dwError == -16, "EM_STREAMIN: Test 0 set error %d, expected %d\n", es.dwError, -16); - - DestroyWindow(hwndRichEdit); -} - -static DWORD CALLBACK test_WM_SETTEXT_esCallback(DWORD_PTR dwCookie, - LPBYTE pbBuff, - LONG cb, - LONG *pcb) -{ - char** str = (char**)dwCookie; - *pcb = cb; - if (*pcb > 0) { - memcpy(*str, pbBuff, *pcb); - *str += *pcb; - } - return 0; -} - -static void test_EM_STREAMOUT(void) -{ - HWND hwndRichEdit = new_richedit(NULL); - int r; - EDITSTREAM es; - char buf[1024] = {0}; - char * p; - - const char * TestItem1 = "TestSomeText"; - const char * TestItem2 = "TestSomeText\r"; - const char * TestItem3 = "TestSomeText\r\n"; - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) TestItem1); - p = buf; - es.dwCookie = (DWORD_PTR)&p; - es.dwError = 0; - es.pfnCallback = test_WM_SETTEXT_esCallback; - memset(buf, 0, sizeof(buf)); - SendMessage(hwndRichEdit, EM_STREAMOUT, - (WPARAM)(SF_TEXT), (LPARAM)&es); - r = strlen(buf); - ok(r == 12, "streamed text length is %d, expecting 12\n", r); - ok(strcmp(buf, TestItem1) == 0, - "streamed text different, got %s\n", buf); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) TestItem2); - p = buf; - es.dwCookie = (DWORD_PTR)&p; - es.dwError = 0; - es.pfnCallback = test_WM_SETTEXT_esCallback; - memset(buf, 0, sizeof(buf)); - SendMessage(hwndRichEdit, EM_STREAMOUT, - (WPARAM)(SF_TEXT), (LPARAM)&es); - r = strlen(buf); - - ok(r == 13, "streamed text length is %d, expecting 13\n", r); - ok(strcmp(buf, TestItem2) == 0, - "streamed text different, got %s\n", buf); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) TestItem3); - p = buf; - es.dwCookie = (DWORD_PTR)&p; - es.dwError = 0; - es.pfnCallback = test_WM_SETTEXT_esCallback; - memset(buf, 0, sizeof(buf)); - SendMessage(hwndRichEdit, EM_STREAMOUT, - (WPARAM)(SF_TEXT), (LPARAM)&es); - r = strlen(buf); - ok(r == 14, "streamed text length is %d, expecting 14\n", r); - ok(strcmp(buf, TestItem3) == 0, - "streamed text different, got %s\n", buf); - - DestroyWindow(hwndRichEdit); -} - -static const struct getline_s { - int line; - size_t buffer_len; - const char *text; - const char *broken_text; -} gl[] = { - {0, 10, "foo bar\r\n", "foo bar\r\n"}, - {1, 10, "\r", "\r\r\r\n"}, - {2, 10, "\r\r\n", "bar\n"}, - {3, 10, "bar\n", "\r\n"}, - {4, 10, "\r\n"}, - - /* Buffer smaller than line length */ - {0, 2, "foo bar\r"}, - {0, 1, "foo bar\r"}, - {0, 0, "foo bar\r"} -}; - -static void test_EM_GETLINE(void) -{ - int i; - HWND hwndRichEdit = new_richedit(NULL); - static const int nBuf = 1024; - char dest[1024], origdest[1024]; - LRESULT linecount; - const char text[] = "foo bar\r\n" - "\r" - "\r\r\n" - "bar\n"; - BOOL broken_os = FALSE; - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text); - linecount = SendMessage(hwndRichEdit, EM_GETLINECOUNT, 0, 0); - if (linecount == 4) - { - broken_os = TRUE; - win_skip("Win9x, WinME and NT4 handle '\\r only' differently\n"); - } - - memset(origdest, 0xBB, nBuf); - for (i = 0; i < sizeof(gl)/sizeof(struct getline_s); i++) - { - int nCopied, expected_nCopied, expected_bytes_written; - char gl_text[1024]; - - if (gl[i].line >= linecount) - continue; /* Win9x, WinME and NT4 */ - - if (broken_os && gl[i].broken_text) - /* Win9x, WinME and NT4 */ - strcpy(gl_text, gl[i].broken_text); - else - strcpy(gl_text, gl[i].text); - - expected_nCopied = min(gl[i].buffer_len, strlen(gl_text)); - /* Cater for the fact that Win9x, WinME and NT4 don't append the '\0' */ - expected_bytes_written = min(gl[i].buffer_len, strlen(gl_text) + (broken_os ? 0 : 1)); - - memset(dest, 0xBB, nBuf); - *(WORD *) dest = gl[i].buffer_len; - - /* EM_GETLINE appends a "\r\0" to the end of the line - * nCopied counts up to and including the '\r' */ - nCopied = SendMessage(hwndRichEdit, EM_GETLINE, gl[i].line, (LPARAM) dest); - ok(nCopied == expected_nCopied, "%d: %d!=%d\n", i, nCopied, - expected_nCopied); - /* two special cases since a parameter is passed via dest */ - if (gl[i].buffer_len == 0) - ok(!dest[0] && !dest[1] && !strncmp(dest+2, origdest+2, nBuf-2), - "buffer_len=0\n"); - else if (gl[i].buffer_len == 1) - ok(dest[0] == gl_text[0] && !dest[1] && - !strncmp(dest+2, origdest+2, nBuf-2), "buffer_len=1\n"); - else - { - ok(!strncmp(dest, gl_text, expected_bytes_written), - "%d: expected_bytes_written=%d\n", i, expected_bytes_written); - ok(!strncmp(dest + expected_bytes_written, origdest - + expected_bytes_written, nBuf - expected_bytes_written), - "%d: expected_bytes_written=%d\n", i, expected_bytes_written); - } - } - - DestroyWindow(hwndRichEdit); -} - -static void test_EM_LINELENGTH(void) -{ - HWND hwndRichEdit = new_richedit(NULL); - const char * text = - "richedit1\r" - "richedit1\n" - "richedit1\r\n" - "short\r" - "richedit1\r" - "\r" - "\r" - "\r\r\n"; - int offset_test[16][2] = { - {0, 9}, /* Line 1: |richedit1\r */ - {5, 9}, /* Line 1: riche|dit1\r */ - {10, 9}, /* Line 2: |richedit1\n */ - {15, 9}, /* Line 2: riche|dit1\n */ - {20, 9}, /* Line 3: |richedit1\r\n */ - {25, 9}, /* Line 3: riche|dit1\r\n */ - {30, 9}, /* Line 3: richedit1\r|\n */ - {31, 5}, /* Line 4: |short\r */ - {42, 9}, /* Line 5: riche|dit1\r */ - {46, 9}, /* Line 5: richedit1|\r */ - {47, 0}, /* Line 6: |\r */ - {48, 0}, /* Line 7: |\r */ - {49, 0}, /* Line 8: |\r\r\n */ - {50, 0}, /* Line 8: \r|\r\n */ - {51, 0}, /* Line 8: \r\r|\n */ - {52, 0}, /* Line 9: \r\r\n| */ - }; - int i; - LRESULT result; - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text); - - result = SendMessage(hwndRichEdit, EM_GETLINECOUNT, 0, 0); - if (result == 4) { - win_skip("Win9x, WinME and NT4 don't handle '\\r only' correctly\n"); - return; - } - ok(result == 9, "Incorrect line count of %ld\n", result); - - for (i = 0; i < sizeof(offset_test)/sizeof(offset_test[0]); i++) { - result = SendMessage(hwndRichEdit, EM_LINELENGTH, offset_test[i][0], 0); - ok(result == offset_test[i][1], "Length of line at offset %d is %ld, expected %d\n", - offset_test[i][0], result, offset_test[i][1]); - } - - DestroyWindow(hwndRichEdit); -} - -static void test_EM_GETTEXTRANGE(void) -{ - HWND hwndRichEdit = new_richedit(NULL); - const char * text1 = "foo bar\r\nfoo bar"; - const char * text3 = "foo bar\rfoo bar"; - const char * expect1 = "bar\r\nfoo"; - const char * expect2 = "\nfoo"; - const char * expect3 = "bar\rfoo"; - char buffer[1024] = {0}; - LRESULT result; - TEXTRANGEA textRange; - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text1); - - textRange.lpstrText = buffer; - textRange.chrg.cpMin = 4; - textRange.chrg.cpMax = 12; - result = SendMessage(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == 8, "EM_GETTEXTRANGE returned %ld\n", result); - ok(!strcmp(expect1, buffer), "EM_GETTEXTRANGE filled %s\n", buffer); - - textRange.lpstrText = buffer; - textRange.chrg.cpMin = 8; - textRange.chrg.cpMax = 12; - result = SendMessage(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == 4, "EM_GETTEXTRANGE returned %ld\n", result); - ok(!strcmp(expect2, buffer), "EM_GETTEXTRANGE filled %s\n", buffer); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text3); - - textRange.lpstrText = buffer; - textRange.chrg.cpMin = 4; - textRange.chrg.cpMax = 11; - result = SendMessage(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == 7, "EM_GETTEXTRANGE returned %ld\n", result); - - ok(!strcmp(expect3, buffer), "EM_GETTEXTRANGE filled %s\n", buffer); - - - DestroyWindow(hwndRichEdit); -} - -static void test_EM_GETSELTEXT(void) -{ - HWND hwndRichEdit = new_richedit(NULL); - const char * text1 = "foo bar\r\nfoo bar"; - const char * text2 = "foo bar\rfoo bar"; - const char * expect1 = "bar\r\nfoo"; - const char * expect2 = "bar\rfoo"; - char buffer[1024] = {0}; - LRESULT result; - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text1); - - SendMessage(hwndRichEdit, EM_SETSEL, 4, 12); - result = SendMessage(hwndRichEdit, EM_GETSELTEXT, 0, (LPARAM)buffer); - ok(result == 8, "EM_GETTEXTRANGE returned %ld\n", result); - ok(!strcmp(expect1, buffer), "EM_GETTEXTRANGE filled %s\n", buffer); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text2); - - SendMessage(hwndRichEdit, EM_SETSEL, 4, 11); - result = SendMessage(hwndRichEdit, EM_GETSELTEXT, 0, (LPARAM)buffer); - ok(result == 7, "EM_GETTEXTRANGE returned %ld\n", result); - - ok(!strcmp(expect2, buffer), "EM_GETTEXTRANGE filled %s\n", buffer); - - - DestroyWindow(hwndRichEdit); -} - -static const char haystack[] = "WINEWine wineWine wine WineWine"; - /* ^0 ^10 ^20 ^30 */ - -static const char haystack2[] = "first\r\r\nsecond"; - -struct find_s { - int start; - int end; - const char *needle; - int flags; - int expected_loc; -}; - - -struct find_s find_tests[] = { - /* Find in empty text */ - {0, -1, "foo", FR_DOWN, -1}, - {0, -1, "foo", 0, -1}, - {0, -1, "", FR_DOWN, -1}, - {20, 5, "foo", FR_DOWN, -1}, - {5, 20, "foo", FR_DOWN, -1} -}; - -struct find_s find_tests2[] = { - /* No-result find */ - {0, -1, "foo", FR_DOWN | FR_MATCHCASE, -1}, - {5, 20, "WINE", FR_DOWN | FR_MATCHCASE, -1}, - - /* Subsequent finds */ - {0, -1, "Wine", FR_DOWN | FR_MATCHCASE, 4}, - {5, 31, "Wine", FR_DOWN | FR_MATCHCASE, 13}, - {14, 31, "Wine", FR_DOWN | FR_MATCHCASE, 23}, - {24, 31, "Wine", FR_DOWN | FR_MATCHCASE, 27}, - - /* Find backwards */ - {19, 20, "Wine", FR_MATCHCASE, -1}, - {10, 20, "Wine", FR_MATCHCASE, 13}, - {20, 10, "Wine", FR_MATCHCASE, -1}, - - /* Case-insensitive */ - {1, 31, "wInE", FR_DOWN, 4}, - {1, 31, "Wine", FR_DOWN, 4}, - - /* High-to-low ranges */ - {20, 5, "Wine", FR_DOWN, -1}, - {2, 1, "Wine", FR_DOWN, -1}, - {30, 29, "Wine", FR_DOWN, -1}, - {20, 5, "Wine", 0, /*13*/ -1}, - - /* Find nothing */ - {5, 10, "", FR_DOWN, -1}, - {10, 5, "", FR_DOWN, -1}, - {0, -1, "", FR_DOWN, -1}, - {10, 5, "", 0, -1}, - - /* Whole-word search */ - {0, -1, "wine", FR_DOWN | FR_WHOLEWORD, 18}, - {0, -1, "win", FR_DOWN | FR_WHOLEWORD, -1}, - {13, -1, "wine", FR_DOWN | FR_WHOLEWORD, 18}, - {0, -1, "winewine", FR_DOWN | FR_WHOLEWORD, 0}, - {10, -1, "winewine", FR_DOWN | FR_WHOLEWORD, 23}, - {11, -1, "winewine", FR_WHOLEWORD, 23}, - {31, -1, "winewine", FR_WHOLEWORD, -1}, - - /* Bad ranges */ - {5, 200, "XXX", FR_DOWN, -1}, - {-20, 20, "Wine", FR_DOWN, -1}, - {-20, 20, "Wine", FR_DOWN, -1}, - {-15, -20, "Wine", FR_DOWN, -1}, - {1<<12, 1<<13, "Wine", FR_DOWN, -1}, - - /* Check the case noted in bug 4479 where matches at end aren't recognized */ - {23, 31, "Wine", FR_DOWN | FR_MATCHCASE, 23}, - {27, 31, "Wine", FR_DOWN | FR_MATCHCASE, 27}, - {27, 32, "Wine", FR_DOWN | FR_MATCHCASE, 27}, - {13, 31, "WineWine", FR_DOWN | FR_MATCHCASE, 23}, - {13, 32, "WineWine", FR_DOWN | FR_MATCHCASE, 23}, - - /* The backwards case of bug 4479; bounds look right - * Fails because backward find is wrong */ - {19, 20, "WINE", FR_MATCHCASE, -1}, - {0, 20, "WINE", FR_MATCHCASE, 0}, - - {0, -1, "wineWine wine", FR_DOWN, 0}, - {0, -1, "wineWine wine", 0, 0}, - {0, -1, "INEW", 0, 1}, - {0, 31, "INEW", 0, 1}, - {4, -1, "INEW", 0, 10}, -}; - -struct find_s find_tests3[] = { - /* Searching for end of line characters */ - {0, -1, "t\r\r\ns", FR_DOWN | FR_MATCHCASE, 4}, - {6, -1, "\r\n", FR_DOWN | FR_MATCHCASE, 6}, - {7, -1, "\n", FR_DOWN | FR_MATCHCASE, 7}, -}; - -static void check_EM_FINDTEXT(HWND hwnd, const char *name, struct find_s *f, int id) { - int findloc; - FINDTEXT ft; - memset(&ft, 0, sizeof(ft)); - ft.chrg.cpMin = f->start; - ft.chrg.cpMax = f->end; - ft.lpstrText = f->needle; - findloc = SendMessage(hwnd, EM_FINDTEXT, f->flags, (LPARAM) &ft); - ok(findloc == f->expected_loc, - "EM_FINDTEXT(%s,%d) '%s' in range(%d,%d), flags %08x, got start at %d, expected %d\n", - name, id, f->needle, f->start, f->end, f->flags, findloc, f->expected_loc); -} - -static void check_EM_FINDTEXTEX(HWND hwnd, const char *name, struct find_s *f, - int id) { - int findloc; - FINDTEXTEX ft; - int expected_end_loc; - - memset(&ft, 0, sizeof(ft)); - ft.chrg.cpMin = f->start; - ft.chrg.cpMax = f->end; - ft.lpstrText = f->needle; - ft.chrgText.cpMax = 0xdeadbeef; - findloc = SendMessage(hwnd, EM_FINDTEXTEX, f->flags, (LPARAM) &ft); - ok(findloc == f->expected_loc, - "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, start at %d\n", - name, id, f->needle, f->start, f->end, f->flags, findloc); - ok(ft.chrgText.cpMin == f->expected_loc, - "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, start at %d, expected %d\n", - name, id, f->needle, f->start, f->end, f->flags, ft.chrgText.cpMin, f->expected_loc); - expected_end_loc = ((f->expected_loc == -1) ? -1 - : f->expected_loc + strlen(f->needle)); - ok(ft.chrgText.cpMax == expected_end_loc || - broken(ft.chrgText.cpMin == -1 && ft.chrgText.cpMax == 0xdeadbeef), /* Win9x, WinME and NT4 */ - "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, end at %d, expected %d\n", - name, id, f->needle, f->start, f->end, f->flags, ft.chrgText.cpMax, expected_end_loc); -} - -static void run_tests_EM_FINDTEXT(HWND hwnd, const char *name, struct find_s *find, - int num_tests) -{ - int i; - - for (i = 0; i < num_tests; i++) { - check_EM_FINDTEXT(hwnd, name, &find[i], i); - check_EM_FINDTEXTEX(hwnd, name, &find[i], i); - } -} - -static void test_EM_FINDTEXT(void) -{ - HWND hwndRichEdit = new_richedit(NULL); - - /* Empty rich edit control */ - run_tests_EM_FINDTEXT(hwndRichEdit, "1", find_tests, - sizeof(find_tests)/sizeof(struct find_s)); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) haystack); - - /* Haystack text */ - run_tests_EM_FINDTEXT(hwndRichEdit, "2", find_tests2, - sizeof(find_tests2)/sizeof(struct find_s)); - - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) haystack2); - - /* Haystack text 2 (with EOL characters) */ - run_tests_EM_FINDTEXT(hwndRichEdit, "3", find_tests3, - sizeof(find_tests3)/sizeof(struct find_s)); - - DestroyWindow(hwndRichEdit); -} - -static void test_EM_POSFROMCHAR(void) -{ - HWND hwndRichEdit = new_richedit(NULL); - int i; - POINTL pl; - LRESULT result; - unsigned int height = 0; - int xpos = 0; - static const char text[] = "aa\n" - "this is a long line of text that should be longer than the " - "control's width\n" - "cc\n" - "dd\n" - "ee\n" - "ff\n" - "gg\n" - "hh\n"; - - /* Fill the control to lines to ensure that most of them are offscreen */ - for (i = 0; i < 50; i++) - { - /* Do not modify the string; it is exactly 16 characters long. */ - SendMessage(hwndRichEdit, EM_SETSEL, 0, 0); - SendMessage(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM)"0123456789ABCD\r\n"); - } - - /* - Richedit 1.0 receives a POINTL* on wParam and character offset on lParam, returns void. - Richedit 2.0 receives character offset on wParam, ignores lParam, returns MAKELONG(x,y) - Richedit 3.0 accepts either of the above API conventions. - */ - - /* Testing Richedit 1.0 API format */ - - /* Testing start of lines. X-offset should be constant on all cases (native is 1). - Since all lines are identical and drawn with the same font, - they should have the same height... right? - */ - for (i = 0; i < 50; i++) - { - /* All the lines are 16 characters long */ - result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, i * 16); - ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); - if (i == 0) - { - ok(pl.y == 0, "EM_POSFROMCHAR reports y=%d, expected 0\n", pl.y); - ok(pl.x == 1 || - broken(pl.x == 0), /* Win9x, WinME and NT4 */ - "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); - xpos = pl.x; - } - else if (i == 1) - { - ok(pl.y > 0, "EM_POSFROMCHAR reports y=%d, expected > 0\n", pl.y); - ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); - height = pl.y; - } - else - { - ok(pl.y == i * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, i * height); - ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); - } - } - - /* Testing position at end of text */ - result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 50 * 16); - ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); - ok(pl.y == 50 * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, 50 * height); - ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); - - /* Testing position way past end of text */ - result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 55 * 16); - ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); - ok(pl.y == 50 * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, 50 * height); - ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); - - - /* Testing that vertical scrolling does, in fact, have an effect on EM_POSFROMCHAR */ - SendMessage(hwndRichEdit, EM_SCROLL, SB_LINEDOWN, 0); /* line down */ - for (i = 0; i < 50; i++) - { - /* All the lines are 16 characters long */ - result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, i * 16); - ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); - ok(pl.y == (i - 1) * height, - "EM_POSFROMCHAR reports y=%d, expected %d\n", - pl.y, (i - 1) * height); - ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); - } - - /* Testing position at end of text */ - result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 50 * 16); - ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); - ok(pl.y == (50 - 1) * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, (50 - 1) * height); - ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); - - /* Testing position way past end of text */ - result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 55 * 16); - ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); - ok(pl.y == (50 - 1) * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, (50 - 1) * height); - ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); - - /* Testing that horizontal scrolling does, in fact, have an effect on EM_POSFROMCHAR */ - SendMessage(hwndRichEdit, WM_SETTEXT, 0, (LPARAM) text); - SendMessage(hwndRichEdit, EM_SCROLL, SB_LINEUP, 0); /* line up */ - - result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 0); - ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); - ok(pl.y == 0, "EM_POSFROMCHAR reports y=%d, expected 0\n", pl.y); - ok(pl.x == 1 || - broken(pl.x == 0), /* Win9x, WinME and NT4 */ - "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); - xpos = pl.x; - - SendMessage(hwndRichEdit, WM_HSCROLL, SB_LINERIGHT, 0); - result = SendMessage(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 0); - ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); - ok(pl.y == 0, "EM_POSFROMCHAR reports y=%d, expected 0\n", pl.y); - todo_wine { - /* Fails on builtin because horizontal scrollbar is not being shown */ - ok(pl.x < xpos || - broken(pl.x == xpos), /* Win9x, WinME and NT4 */ - "EM_POSFROMCHAR reports x=%hd, expected value less than %d\n", pl.x, xpos); - } - DestroyWindow(hwndRichEdit); -} - -static void test_word_wrap(void) -{ - HWND hwnd; - POINTL point = {0, 60}; /* This point must be below the first line */ - const char *text = "Must be long enough to test line wrapping"; - DWORD dwCommonStyle = WS_VISIBLE|WS_POPUP|WS_VSCROLL|ES_MULTILINE; - int res, pos, lines, prevlines, reflines[3]; - - /* Test the effect of WS_HSCROLL and ES_AUTOHSCROLL styles on wrapping - * when specified on window creation and set later. */ - hwnd = CreateWindow(RICHEDIT_CLASS10A, NULL, dwCommonStyle, - 0, 0, 200, 80, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "error: %d\n", (int) GetLastError()); - res = SendMessage(hwnd, WM_SETTEXT, 0, (LPARAM) text); - ok(res, "WM_SETTEXT failed.\n"); - pos = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM) &point); - ok(pos, "pos=%d indicating no word wrap when it is expected.\n", pos); - lines = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0); - ok(lines > 1, "Line was expected to wrap (lines=%d).\n", lines); - - SetWindowLong(hwnd, GWL_STYLE, dwCommonStyle|WS_HSCROLL|ES_AUTOHSCROLL); - pos = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM) &point); - ok(pos, "pos=%d indicating no word wrap when it is expected.\n", pos); - DestroyWindow(hwnd); - - hwnd = CreateWindow(RICHEDIT_CLASS10A, NULL, dwCommonStyle|WS_HSCROLL, - 0, 0, 200, 80, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "error: %d\n", (int) GetLastError()); - - res = SendMessage(hwnd, WM_SETTEXT, 0, (LPARAM) text); - ok(res, "WM_SETTEXT failed.\n"); - pos = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM) &point); - ok(pos, "pos=%d indicating no word wrap when it is expected.\n", pos); - lines = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0); - ok(lines > 1, "Line was expected to wrap (lines=%d).\n", lines); - - SetWindowLong(hwnd, GWL_STYLE, dwCommonStyle|WS_HSCROLL|ES_AUTOHSCROLL); - pos = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM) &point); - ok(pos, "pos=%d indicating no word wrap when it is expected.\n", pos); - DestroyWindow(hwnd); - - hwnd = CreateWindow(RICHEDIT_CLASS10A, NULL, dwCommonStyle|ES_AUTOHSCROLL, - 0, 0, 200, 80, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "error: %d\n", (int) GetLastError()); - res = SendMessage(hwnd, WM_SETTEXT, 0, (LPARAM) text); - ok(res, "WM_SETTEXT failed.\n"); - pos = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM) &point); - ok(!pos || - broken(pos == lstrlen(text)), /* Win9x, WinME and NT4 */ - "pos=%d indicating word wrap when none is expected.\n", pos); - lines = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0); - ok(lines == 1, "Line was not expected to wrap (lines=%d).\n", lines); - - SetWindowLong(hwnd, GWL_STYLE, dwCommonStyle); - pos = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM) &point); - ok(!pos || - broken(pos == lstrlen(text)), /* Win9x, WinME and NT4 */ - "pos=%d indicating word wrap when none is expected.\n", pos); - lines = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0); - ok(lines == 1, "Line was not expected to wrap (lines=%d).\n", lines); - DestroyWindow(hwnd); - - hwnd = CreateWindow(RICHEDIT_CLASS10A, NULL, - dwCommonStyle|WS_HSCROLL|ES_AUTOHSCROLL, - 0, 0, 200, 80, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "error: %d\n", (int) GetLastError()); - res = SendMessage(hwnd, WM_SETTEXT, 0, (LPARAM) text); - ok(res, "WM_SETTEXT failed.\n"); - pos = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM) &point); - ok(!pos || - broken(pos == lstrlen(text)), /* Win9x, WinME and NT4 */ - "pos=%d indicating word wrap when none is expected.\n", pos); - lines = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0); - ok(lines == 1, "Line was not expected to wrap (lines=%d).\n", lines); - - SetWindowLong(hwnd, GWL_STYLE, dwCommonStyle); - pos = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM) &point); - ok(!pos || - broken(pos == lstrlen(text)), /* Win9x, WinME and NT4 */ - "pos=%d indicating word wrap when none is expected.\n", pos); - lines = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0); - ok(lines == 1, "Line was not expected to wrap (lines=%d).\n", lines); - - /* Test the effect of EM_SETTARGETDEVICE on word wrap. */ - res = SendMessage(hwnd, EM_SETTARGETDEVICE, 0, 1); - ok(res, "EM_SETTARGETDEVICE failed (returned %d).\n", res); - pos = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM) &point); - ok(!pos || - broken(pos == lstrlen(text)), /* Win9x, WinME and NT4 */ - "pos=%d indicating word wrap when none is expected.\n", pos); - lines = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0); - ok(lines == 1, "Line was not expected to wrap (lines=%d).\n", lines); - - res = SendMessage(hwnd, EM_SETTARGETDEVICE, 0, 0); - ok(res, "EM_SETTARGETDEVICE failed (returned %d).\n", res); - pos = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM) &point); - ok(pos, "pos=%d indicating no word wrap when it is expected.\n", pos); - DestroyWindow(hwnd); - - /* First lets see if the text would wrap normally (needed for reference) */ - hwnd = CreateWindow(RICHEDIT_CLASS10A, NULL, dwCommonStyle, - 0, 0, 200, 80, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "error: %d\n", (int) GetLastError()); - ok(IsWindowVisible(hwnd), "Window should be visible.\n"); - res = SendMessage(hwnd, EM_REPLACESEL, FALSE, (LPARAM) text); - ok(res, "EM_REPLACESEL failed.\n"); - /* Should have wrapped */ - reflines[0] = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0); - ok(reflines[0] > 1, "Line was expected to wrap (%d lines).\n", reflines[0]); - /* Resize the window to fit the line */ - MoveWindow(hwnd, 0, 0, 600, 80, TRUE); - /* Text should not be wrapped */ - reflines[1] = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0); - ok(reflines[1] == 1, "Line wasn't expected to wrap (%d lines).\n", reflines[1]); - /* Resize the window again to make sure the line wraps again */ - MoveWindow(hwnd, 0, 0, 10, 80, TRUE); - reflines[2] = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0); - ok(reflines[2] > 1, "Line was expected to wrap (%d lines).\n", reflines[2]); - DestroyWindow(hwnd); - - /* Same test with redraw disabled */ - hwnd = CreateWindow(RICHEDIT_CLASS10A, NULL, dwCommonStyle, - 0, 0, 200, 80, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "error: %d\n", (int) GetLastError()); - ok(IsWindowVisible(hwnd), "Window should be visible.\n"); - /* Redraw is disabled by making the window invisible. */ - SendMessage(hwnd, WM_SETREDRAW, FALSE, 0); - ok(!IsWindowVisible(hwnd), "Window shouldn't be visible.\n"); - res = SendMessage(hwnd, EM_REPLACESEL, FALSE, (LPARAM) text); - ok(res, "EM_REPLACESEL failed.\n"); - /* Should have wrapped */ - prevlines = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0); - ok(prevlines == reflines[0], - "Line was expected to wrap (%d lines).\n", prevlines); - /* Resize the window to fit the line, no change to the number of lines */ - MoveWindow(hwnd, 0, 0, 600, 80, TRUE); - lines = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0); - todo_wine - ok(lines == prevlines || - broken(lines == reflines[1]), /* Win98, WinME and NT4 */ - "Expected no change in the number of lines\n"); - /* Resize the window again to make sure the line wraps again */ - MoveWindow(hwnd, 0, 0, 10, 80, TRUE); - lines = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0); - todo_wine - ok(lines == prevlines || - broken(lines == reflines[2]), /* Win98, WinME and NT4 */ - "Expected no change in the number of lines\n"); - DestroyWindow(hwnd); -} - -static void test_EM_GETOPTIONS(void) -{ - HWND hwnd; - DWORD options; - - hwnd = CreateWindow(RICHEDIT_CLASS10A, NULL, - WS_POPUP, - 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); - options = SendMessage(hwnd, EM_GETOPTIONS, 0, 0); - ok(options == 0, "Incorrect options %x\n", options); - DestroyWindow(hwnd); - - hwnd = CreateWindow(RICHEDIT_CLASS10A, NULL, - WS_POPUP|WS_VSCROLL|WS_HSCROLL, - 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); - options = SendMessage(hwnd, EM_GETOPTIONS, 0, 0); - ok(options == ECO_AUTOVSCROLL || - broken(options == 0), /* Win9x, WinME and NT4 */ - "Incorrect initial options %x\n", options); - DestroyWindow(hwnd); -} - -static void test_autoscroll(void) -{ - HWND hwnd; - UINT ret; - - /* The WS_VSCROLL and WS_HSCROLL styles implicitly set - * auto vertical/horizontal scrolling options. */ - hwnd = CreateWindowEx(0, RICHEDIT_CLASS10A, NULL, - WS_POPUP|ES_MULTILINE|WS_VSCROLL|WS_HSCROLL, - 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS10A, (int) GetLastError()); - ret = SendMessage(hwnd, EM_GETOPTIONS, 0, 0); - ok(ret & ECO_AUTOVSCROLL || - broken(!(ret & ECO_AUTOVSCROLL)), /* Win9x, WinME and NT4 */ - "ECO_AUTOVSCROLL isn't set.\n"); - ok(!(ret & ECO_AUTOHSCROLL), "ECO_AUTOHSCROLL is set.\n"); - ret = GetWindowLong(hwnd, GWL_STYLE); - todo_wine - ok(ret & ES_AUTOVSCROLL || - broken(!(ret & ES_AUTOVSCROLL)), /* Win9x, WinMe and NT4 */ - "ES_AUTOVSCROLL isn't set.\n"); - ok(!(ret & ES_AUTOHSCROLL), "ES_AUTOHSCROLL is set.\n"); - DestroyWindow(hwnd); - - hwnd = CreateWindowEx(0, RICHEDIT_CLASS10A, NULL, - WS_POPUP|ES_MULTILINE, - 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); - ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS10A, (int) GetLastError()); - ret = SendMessage(hwnd, EM_GETOPTIONS, 0, 0); - ok(!(ret & ECO_AUTOVSCROLL), "ECO_AUTOVSCROLL is set.\n"); - ok(!(ret & ECO_AUTOHSCROLL), "ECO_AUTOHSCROLL is set.\n"); - ret = GetWindowLong(hwnd, GWL_STYLE); - ok(!(ret & ES_AUTOVSCROLL), "ES_AUTOVSCROLL is set.\n"); - ok(!(ret & ES_AUTOHSCROLL), "ES_AUTOHSCROLL is set.\n"); - DestroyWindow(hwnd); -} - -START_TEST( editor ) -{ - MSG msg; - time_t end; - - /* Must explicitly LoadLibrary(). The test has no references to functions in - * RICHED32.DLL, so the linker doesn't actually link to it. */ - hmoduleRichEdit = LoadLibrary("RICHED32.DLL"); - ok(hmoduleRichEdit != NULL, "error: %d\n", (int) GetLastError()); - - test_WM_SETTEXT(); - test_EM_GETTEXTRANGE(); - test_EM_GETSELTEXT(); - test_WM_GETTEXTLENGTH(); - test_EM_STREAMIN(); - test_EM_STREAMOUT(); - test_EM_GETLINE(); - test_EM_LINELENGTH(); - test_EM_FINDTEXT(); - test_EM_POSFROMCHAR(); - test_word_wrap(); - test_EM_GETOPTIONS(); - test_autoscroll(); - - /* Set the environment variable WINETEST_RICHED32 to keep windows - * responsive and open for 30 seconds. This is useful for debugging. - * - * The message pump uses PeekMessage() to empty the queue and then sleeps for - * 50ms before retrying the queue. */ - end = time(NULL) + 30; - if (getenv( "WINETEST_RICHED32" )) { - while (time(NULL) < end) { - if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } else { - Sleep(50); - } - } - } - - OleFlushClipboard(); - ok(FreeLibrary(hmoduleRichEdit) != 0, "error: %d\n", (int) GetLastError()); -} diff --git a/rostests/winetests/riched32/riched32.rbuild b/rostests/winetests/riched32/riched32.rbuild deleted file mode 100644 index 13d3136017e..00000000000 --- a/rostests/winetests/riched32/riched32.rbuild +++ /dev/null @@ -1,14 +0,0 @@ - - - - - . - - editor.c - testlist.c - wine - ole32 - user32 - ntdll - - diff --git a/rostests/winetests/riched32/testlist.c b/rostests/winetests/riched32/testlist.c deleted file mode 100644 index 1248a7cdc6a..00000000000 --- a/rostests/winetests/riched32/testlist.c +++ /dev/null @@ -1,13 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - - -const struct test winetest_testlist[] = -{ - { 0, 0 } -}; diff --git a/rostests/winetests/rpcrt4/CMakeLists.txt b/rostests/winetests/rpcrt4/CMakeLists.txt deleted file mode 100644 index 215dbeccaba..00000000000 --- a/rostests/winetests/rpcrt4/CMakeLists.txt +++ /dev/null @@ -1,51 +0,0 @@ - -remove_definitions(-DWINVER=0x502 -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x502) - -add_definitions(-D_WIN32_WINNT=0x500) - -add_definitions( - -D__ROS_LONG64__) - -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - -if(MSVC) - set(IDL_FLAGS ${IDL_FLAGS} /prefix server s_ /app_config) -else() - set(IDL_FLAGS ${IDL_FLAGS} --prefix-server=s_) -endif() - -add_rpc_files(client server.idl) -add_rpc_files(server server.idl) -unset(IDL_FLAGS) - -list(APPEND SOURCE - cstub.c - generated.c - ndr_marshall.c - rpc.c - rpc_async.c - rpc_protseq.c - server.c - testlist.c - ${CMAKE_CURRENT_BINARY_DIR}/server_c.c - ${CMAKE_CURRENT_BINARY_DIR}/server_s.c) - -if(MSVC) - # The nmake generator misses this dependency, so set it explicitly until this bug is fixed. - set_source_files_properties(server.c PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/server_s.h) -endif() - -add_executable(rpcrt4_winetest ${SOURCE}) -target_link_libraries(rpcrt4_winetest - uuid - wine - ${PSEH_LIB}) - -set_module_type(rpcrt4_winetest win32cui) -add_importlibs(rpcrt4_winetest ole32 rpcrt4 msvcrt kernel32 ntdll) -add_cd_file(TARGET rpcrt4_winetest DESTINATION reactos/bin FOR all) - -if(NOT MSVC) - add_target_compile_flags(rpcrt4_winetest "-Wno-format") - allow_warnings(rpcrt4_winetest) -endif() diff --git a/rostests/winetests/rpcrt4/cstub.c b/rostests/winetests/rpcrt4/cstub.c deleted file mode 100644 index 7882e20b900..00000000000 --- a/rostests/winetests/rpcrt4/cstub.c +++ /dev/null @@ -1,1181 +0,0 @@ -/* - * Unit test suite for cstubs - * - * Copyright 2006 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 - */ - -#include - -#define PROXY_DELEGATION -#define COBJMACROS - -#include "wine/test.h" -#include -#include -#include -#include - - -#include "initguid.h" -#include "rpc.h" -#include "rpcdce.h" -#include "rpcproxy.h" - -static CStdPSFactoryBuffer PSFactoryBuffer; - -CSTDSTUBBUFFERRELEASE(&PSFactoryBuffer) -CSTDSTUBBUFFER2RELEASE(&PSFactoryBuffer) - -static GUID IID_if1 = {0x12345678, 1234, 5678, {12,34,56,78,90,0xab,0xcd,0xef}}; -static GUID IID_if2 = {0x12345679, 1234, 5678, {12,34,56,78,90,0xab,0xcd,0xef}}; -static GUID IID_if3 = {0x1234567a, 1234, 5678, {12,34,56,78,90,0xab,0xcd,0xef}}; -static GUID IID_if4 = {0x1234567b, 1234, 5678, {12,34,56,78,90,0xab,0xcd,0xef}}; - -static int my_alloc_called; -static int my_free_called; - -static void * CALLBACK my_alloc(SIZE_T size) -{ - my_alloc_called++; - return NdrOleAllocate(size); -} - -static void CALLBACK my_free(void *ptr) -{ - my_free_called++; - NdrOleFree(ptr); -} - -typedef struct _MIDL_PROC_FORMAT_STRING -{ - short Pad; - unsigned char Format[ 2 ]; -} MIDL_PROC_FORMAT_STRING; - -typedef struct _MIDL_TYPE_FORMAT_STRING -{ - short Pad; - unsigned char Format[ 2 ]; -} MIDL_TYPE_FORMAT_STRING; - - -static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString = -{ - 0, - { - 0, 0 - } -}; - -static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString = -{ - 0, - { - 0, 0 - } -}; - -static const MIDL_STUB_DESC Object_StubDesc = - { - NULL, - my_alloc, - my_free, - { 0 }, - 0, - 0, - 0, - 0, - __MIDL_TypeFormatString.Format, - 1, /* -error bounds_check flag */ - 0x20000, /* Ndr library version */ - 0, - 0x50100a4, /* MIDL Version 5.1.164 */ - 0, - NULL, - 0, /* notify & notify_flag routine table */ - 1, /* Flags */ - 0, /* Reserved3 */ - 0, /* Reserved4 */ - 0 /* Reserved5 */ - }; - -static HRESULT WINAPI if1_fn1_Proxy(void *This) -{ - return S_OK; -} - -static void __RPC_STUB if1_fn1_Stub( - IRpcStubBuffer *This, - IRpcChannelBuffer *_pRpcChannelBuffer, - PRPC_MESSAGE _pRpcMessage, - DWORD *_pdwStubPhase) -{ - trace("fn1 stub\n"); -} - -static HRESULT WINAPI if1_fn2_Proxy(void *This) -{ - return S_OK; -} - -static void __RPC_STUB if1_fn2_Stub( - IRpcStubBuffer *This, - IRpcChannelBuffer *_pRpcChannelBuffer, - PRPC_MESSAGE _pRpcMessage, - DWORD *_pdwStubPhase) -{ - trace("fn2 stub\n"); -} - -static CINTERFACE_PROXY_VTABLE(5) if1_proxy_vtbl = -{ - { &IID_if1 }, - { IUnknown_QueryInterface_Proxy, - IUnknown_AddRef_Proxy, - IUnknown_Release_Proxy , - if1_fn1_Proxy, - if1_fn2_Proxy - } -}; - - -static const unsigned short if1_FormatStringOffsetTable[] = - { - 0, - 0 - }; - -static const MIDL_SERVER_INFO if1_server_info = - { - &Object_StubDesc, - 0, - __MIDL_ProcFormatString.Format, - &if1_FormatStringOffsetTable[-3], - 0, - 0, - 0, - 0}; - - -static const PRPC_STUB_FUNCTION if1_table[] = -{ - if1_fn1_Stub, - if1_fn2_Stub -}; - -static CInterfaceStubVtbl if1_stub_vtbl = -{ - { - &IID_if1, - &if1_server_info, - 5, - &if1_table[-3] - }, - { CStdStubBuffer_METHODS } -}; - -static CINTERFACE_PROXY_VTABLE(13) if2_proxy_vtbl = -{ - { &IID_if2 }, - { IUnknown_QueryInterface_Proxy, - IUnknown_AddRef_Proxy, - IUnknown_Release_Proxy , - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - } -}; - -static const unsigned short if2_FormatStringOffsetTable[] = - { - (unsigned short) -1, - (unsigned short) -1, - (unsigned short) -1, - (unsigned short) -1, - (unsigned short) -1, - (unsigned short) -1, - (unsigned short) -1, - (unsigned short) -1, - (unsigned short) -1, - (unsigned short) -1, - 0 - }; - -static const MIDL_SERVER_INFO if2_server_info = - { - &Object_StubDesc, - 0, - __MIDL_ProcFormatString.Format, - &if2_FormatStringOffsetTable[-3], - 0, - 0, - 0, - 0}; - - -static const PRPC_STUB_FUNCTION if2_table[] = -{ - STUB_FORWARDING_FUNCTION, - STUB_FORWARDING_FUNCTION, - STUB_FORWARDING_FUNCTION, - STUB_FORWARDING_FUNCTION, - STUB_FORWARDING_FUNCTION, - STUB_FORWARDING_FUNCTION, - STUB_FORWARDING_FUNCTION, - STUB_FORWARDING_FUNCTION, - STUB_FORWARDING_FUNCTION, - STUB_FORWARDING_FUNCTION -}; - -static CInterfaceStubVtbl if2_stub_vtbl = -{ - { - &IID_if2, - &if2_server_info, - 13, - &if2_table[-3] - }, - { CStdStubBuffer_DELEGATING_METHODS } -}; - -static CINTERFACE_PROXY_VTABLE(5) if3_proxy_vtbl = -{ - { &IID_if3 }, - { IUnknown_QueryInterface_Proxy, - IUnknown_AddRef_Proxy, - IUnknown_Release_Proxy , - if1_fn1_Proxy, - 0 - } -}; - - -static const unsigned short if3_FormatStringOffsetTable[] = - { - 0, - 0 - }; - -static const MIDL_SERVER_INFO if3_server_info = - { - &Object_StubDesc, - 0, - __MIDL_ProcFormatString.Format, - &if3_FormatStringOffsetTable[-3], - 0, - 0, - 0, - 0}; - - -static const PRPC_STUB_FUNCTION if3_table[] = -{ - if1_fn1_Stub -}; - -static CInterfaceStubVtbl if3_stub_vtbl = -{ - { - &IID_if3, - &if3_server_info, - 5, - &if1_table[-3] - }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } -}; - -static CINTERFACE_PROXY_VTABLE(7) if4_proxy_vtbl = -{ - { &IID_if4 }, - { IUnknown_QueryInterface_Proxy, - IUnknown_AddRef_Proxy, - IUnknown_Release_Proxy , - 0, - 0, - 0, - 0 - } -}; - -static const unsigned short if4_FormatStringOffsetTable[] = - { - (unsigned short) -1, - (unsigned short) -1, - (unsigned short) -1, - (unsigned short) -1, - 0 - }; - -static const MIDL_SERVER_INFO if4_server_info = - { - &Object_StubDesc, - 0, - __MIDL_ProcFormatString.Format, - &if4_FormatStringOffsetTable[-3], - 0, - 0, - 0, - 0}; - - -static const PRPC_STUB_FUNCTION if4_table[] = -{ - STUB_FORWARDING_FUNCTION, - STUB_FORWARDING_FUNCTION, - STUB_FORWARDING_FUNCTION, - STUB_FORWARDING_FUNCTION, -}; - -static CInterfaceStubVtbl if4_stub_vtbl = -{ - { - &IID_if4, - &if4_server_info, - 7, - &if2_table[-3] - }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } -}; - -static const CInterfaceProxyVtbl *cstub_ProxyVtblList[] = -{ - (const CInterfaceProxyVtbl *) &if1_proxy_vtbl, - (const CInterfaceProxyVtbl *) &if2_proxy_vtbl, - (const CInterfaceProxyVtbl *) &if3_proxy_vtbl, - (const CInterfaceProxyVtbl *) &if4_proxy_vtbl, - NULL -}; - -static const CInterfaceStubVtbl *cstub_StubVtblList[] = -{ - &if1_stub_vtbl, - &if2_stub_vtbl, - &if3_stub_vtbl, - &if4_stub_vtbl, - NULL -}; - -static PCInterfaceName const if_name_list[] = -{ - "if1", - "if2", - "if3", - "if4", - NULL -}; - -static const IID *base_iid_list[] = -{ - NULL, - &IID_ITypeLib, - NULL, - &IID_IDispatch, - NULL -}; - -#define cstub_CHECK_IID(n) IID_GENERIC_CHECK_IID( cstub, pIID, n) - -static int __stdcall iid_lookup( const IID * pIID, int * pIndex ) -{ - IID_BS_LOOKUP_SETUP - - IID_BS_LOOKUP_INITIAL_TEST( cstub, 4, 4 ) - IID_BS_LOOKUP_NEXT_TEST( cstub, 2 ) - IID_BS_LOOKUP_NEXT_TEST( cstub, 1 ) - IID_BS_LOOKUP_RETURN_RESULT( cstub, 4, *pIndex ) - -} - - -static BOOL check_address(void *actual, void *expected) -{ - static void *ole32_start = NULL; - static void *ole32_end = NULL; - - if (actual == expected) - return TRUE; - - /* On Win7, actual can be located inside ole32.dll */ - if (ole32_start == NULL || ole32_end == NULL) - { - PIMAGE_NT_HEADERS nt_headers; - ole32_start = (void *) GetModuleHandleA("ole32.dll"); - if (ole32_start == NULL) - return FALSE; - nt_headers = (PIMAGE_NT_HEADERS)((char *) ole32_start + ((PIMAGE_DOS_HEADER) ole32_start)->e_lfanew); - ole32_end = (void *)((char *) ole32_start + nt_headers->OptionalHeader.SizeOfImage); - } - - return ole32_start <= actual && actual < ole32_end; -} - -static const ExtendedProxyFileInfo my_proxy_file_info = -{ - (const PCInterfaceProxyVtblList *) &cstub_ProxyVtblList, - (const PCInterfaceStubVtblList *) &cstub_StubVtblList, - (const PCInterfaceName *) &if_name_list, - (const IID **) &base_iid_list, - &iid_lookup, - 4, - 1, - NULL, - 0, - 0, - 0 -}; - -static const ProxyFileInfo *proxy_file_list[] = { - &my_proxy_file_info, - NULL -}; - - -static IPSFactoryBuffer *test_NdrDllGetClassObject(void) -{ - HMODULE rpcrt4 = GetModuleHandleA("rpcrt4.dll"); - IPSFactoryBuffer *ppsf = NULL; - const PCInterfaceProxyVtblList* proxy_vtbl; - const PCInterfaceStubVtblList* stub_vtbl; - const CLSID PSDispatch = {0x20420, 0, 0, {0xc0, 0, 0, 0, 0, 0, 0, 0x46}}; - const CLSID CLSID_Unknown = {0x45678, 0x1234, 0x6666, {0xff, 0x67, 0x45, 0x98, 0x76, 0x12, 0x34, 0x56}}; - static const GUID * const interfaces[] = { &IID_if1, &IID_if2, &IID_if3, &IID_if4 }; - UINT i; - HRESULT r; - HMODULE hmod = GetModuleHandleA("rpcrt4.dll"); - void *CStd_QueryInterface = GetProcAddress(hmod, "CStdStubBuffer_QueryInterface"); - void *CStd_AddRef = GetProcAddress(hmod, "CStdStubBuffer_AddRef"); - void *CStd_Release = GetProcAddress(hmod, "NdrCStdStubBuffer_Release"); - void *CStd_Connect = GetProcAddress(hmod, "CStdStubBuffer_Connect"); - void *CStd_Disconnect = GetProcAddress(hmod, "CStdStubBuffer_Disconnect"); - void *CStd_Invoke = GetProcAddress(hmod, "CStdStubBuffer_Invoke"); - void *CStd_IsIIDSupported = GetProcAddress(hmod, "CStdStubBuffer_IsIIDSupported"); - void *CStd_CountRefs = GetProcAddress(hmod, "CStdStubBuffer_CountRefs"); - void *CStd_DebugServerQueryInterface = GetProcAddress(hmod, "CStdStubBuffer_DebugServerQueryInterface"); - void *CStd_DebugServerRelease = GetProcAddress(hmod, "CStdStubBuffer_DebugServerRelease"); - - r = NdrDllGetClassObject(&PSDispatch, &IID_IPSFactoryBuffer, (void**)&ppsf, proxy_file_list, - &CLSID_Unknown, &PSFactoryBuffer); - ok(r == CLASS_E_CLASSNOTAVAILABLE, "NdrDllGetClassObject with unknown clsid should have returned CLASS_E_CLASSNOTAVAILABLE instead of 0x%x\n", r); - ok(ppsf == NULL, "NdrDllGetClassObject should have set ppsf to NULL on failure\n"); - - r = NdrDllGetClassObject(&PSDispatch, &IID_IPSFactoryBuffer, (void**)&ppsf, proxy_file_list, - &PSDispatch, &PSFactoryBuffer); - - ok(r == S_OK, "ret %08x\n", r); - ok(ppsf != NULL, "ppsf == NULL\n"); - - proxy_vtbl = PSFactoryBuffer.pProxyFileList[0]->pProxyVtblList; - stub_vtbl = PSFactoryBuffer.pProxyFileList[0]->pStubVtblList; - ok(PSFactoryBuffer.pProxyFileList == proxy_file_list, "pfl not the same\n"); - ok(proxy_vtbl == (PCInterfaceProxyVtblList *) &cstub_ProxyVtblList, "proxy vtbllist not the same\n"); - ok(stub_vtbl == (PCInterfaceStubVtblList *) &cstub_StubVtblList, "stub vtbllist not the same\n"); - - /* if1 is non-delegating, if2 is delegating, if3 is non-delegating - but I've zero'ed the vtbl entries, similarly if4 is delegating - with zero'ed vtbl entries */ - -#define VTBL_TEST_NOT_CHANGE_TO(name, i) \ - ok(stub_vtbl[i]->Vtbl.name != CStd_##name, #name "vtbl %d updated %p %p\n", \ - i, stub_vtbl[i]->Vtbl.name, CStd_##name ) -#define VTBL_TEST_CHANGE_TO(name, i) \ - ok(check_address(stub_vtbl[i]->Vtbl.name, CStd_##name), #name "vtbl %d not updated %p %p\n", \ - i, stub_vtbl[i]->Vtbl.name, CStd_##name ) -#define VTBL_TEST_ZERO(name, i) \ - ok(stub_vtbl[i]->Vtbl.name == NULL, #name "vtbl %d not null %p\n", \ - i, stub_vtbl[i]->Vtbl.name ) - - VTBL_TEST_NOT_CHANGE_TO(QueryInterface, 0); - VTBL_TEST_NOT_CHANGE_TO(AddRef, 0); - VTBL_TEST_NOT_CHANGE_TO(Release, 0); - VTBL_TEST_NOT_CHANGE_TO(Connect, 0); - VTBL_TEST_NOT_CHANGE_TO(Disconnect, 0); - VTBL_TEST_NOT_CHANGE_TO(Invoke, 0); - VTBL_TEST_NOT_CHANGE_TO(IsIIDSupported, 0); - VTBL_TEST_NOT_CHANGE_TO(CountRefs, 0); - VTBL_TEST_NOT_CHANGE_TO(DebugServerQueryInterface, 0); - VTBL_TEST_NOT_CHANGE_TO(DebugServerRelease, 0); - - VTBL_TEST_CHANGE_TO(QueryInterface, 1); - VTBL_TEST_CHANGE_TO(AddRef, 1); - VTBL_TEST_NOT_CHANGE_TO(Release, 1); - VTBL_TEST_NOT_CHANGE_TO(Connect, 1); - VTBL_TEST_NOT_CHANGE_TO(Disconnect, 1); - VTBL_TEST_CHANGE_TO(Invoke, 1); - VTBL_TEST_CHANGE_TO(IsIIDSupported, 1); - VTBL_TEST_NOT_CHANGE_TO(CountRefs, 1); - VTBL_TEST_CHANGE_TO(DebugServerQueryInterface, 1); - VTBL_TEST_CHANGE_TO(DebugServerRelease, 1); - - VTBL_TEST_CHANGE_TO(QueryInterface, 2); - VTBL_TEST_CHANGE_TO(AddRef, 2); - VTBL_TEST_ZERO(Release, 2); - VTBL_TEST_CHANGE_TO(Connect, 2); - VTBL_TEST_CHANGE_TO(Disconnect, 2); - VTBL_TEST_CHANGE_TO(Invoke, 2); - VTBL_TEST_CHANGE_TO(IsIIDSupported, 2); - VTBL_TEST_CHANGE_TO(CountRefs, 2); - VTBL_TEST_CHANGE_TO(DebugServerQueryInterface, 2); - VTBL_TEST_CHANGE_TO(DebugServerRelease, 2); - - VTBL_TEST_CHANGE_TO(QueryInterface, 3); - VTBL_TEST_CHANGE_TO(AddRef, 3); - VTBL_TEST_ZERO(Release, 3); - VTBL_TEST_NOT_CHANGE_TO(Connect, 3); - VTBL_TEST_NOT_CHANGE_TO(Disconnect, 3); - VTBL_TEST_CHANGE_TO(Invoke, 3); - VTBL_TEST_CHANGE_TO(IsIIDSupported, 3); - VTBL_TEST_NOT_CHANGE_TO(CountRefs, 3); - VTBL_TEST_CHANGE_TO(DebugServerQueryInterface, 3); - VTBL_TEST_CHANGE_TO(DebugServerRelease, 3); - -#define VTBL_PROXY_TEST(i,num,ptr) \ - ok( check_address(proxy_vtbl[i]->Vtbl[num], (ptr)), "wrong proxy %u func %u %p/%p\n", \ - (i), (num), proxy_vtbl[i]->Vtbl[num], (ptr) ) -#define VTBL_PROXY_TEST_NOT_ZERO(i,num) \ - ok( proxy_vtbl[i]->Vtbl[num] != NULL, "wrong proxy %u func %u is NULL\n", (i), (num)) - - VTBL_PROXY_TEST(0, 0, IUnknown_QueryInterface_Proxy); - VTBL_PROXY_TEST(0, 1, IUnknown_AddRef_Proxy); - VTBL_PROXY_TEST(0, 2, IUnknown_Release_Proxy); - VTBL_PROXY_TEST(0, 3, if1_fn1_Proxy); - VTBL_PROXY_TEST(0, 4, if1_fn2_Proxy); - - VTBL_PROXY_TEST(1, 0, GetProcAddress(rpcrt4,"IUnknown_QueryInterface_Proxy")); - VTBL_PROXY_TEST(1, 1, GetProcAddress(rpcrt4,"IUnknown_AddRef_Proxy")); - VTBL_PROXY_TEST(1, 2, GetProcAddress(rpcrt4,"IUnknown_Release_Proxy")); - VTBL_PROXY_TEST_NOT_ZERO(1, 3); - VTBL_PROXY_TEST_NOT_ZERO(1, 4); - VTBL_PROXY_TEST_NOT_ZERO(1, 5); - VTBL_PROXY_TEST_NOT_ZERO(1, 6); - VTBL_PROXY_TEST_NOT_ZERO(1, 7); - VTBL_PROXY_TEST_NOT_ZERO(1, 8); - VTBL_PROXY_TEST_NOT_ZERO(1, 9); - VTBL_PROXY_TEST_NOT_ZERO(1, 10); - VTBL_PROXY_TEST_NOT_ZERO(1, 11); - VTBL_PROXY_TEST_NOT_ZERO(1, 12); - - VTBL_PROXY_TEST(2, 0, IUnknown_QueryInterface_Proxy); - VTBL_PROXY_TEST(2, 1, IUnknown_AddRef_Proxy); - VTBL_PROXY_TEST(2, 2, IUnknown_Release_Proxy); - VTBL_PROXY_TEST(2, 3, if1_fn1_Proxy); - todo_wine VTBL_PROXY_TEST_NOT_ZERO(2, 4); - - VTBL_PROXY_TEST(3, 0, GetProcAddress(rpcrt4,"IUnknown_QueryInterface_Proxy")); - VTBL_PROXY_TEST(3, 1, GetProcAddress(rpcrt4,"IUnknown_AddRef_Proxy")); - VTBL_PROXY_TEST(3, 2, GetProcAddress(rpcrt4,"IUnknown_Release_Proxy")); - VTBL_PROXY_TEST_NOT_ZERO(3, 3); - VTBL_PROXY_TEST_NOT_ZERO(3, 4); - VTBL_PROXY_TEST_NOT_ZERO(3, 5); - VTBL_PROXY_TEST_NOT_ZERO(3, 6); - -#undef VTBL_TEST_NOT_CHANGE_TO -#undef VTBL_TEST_CHANGE_TO -#undef VTBL_TEST_ZERO -#undef VTBL_PROXY_TEST -#undef VTBL_PROXY_TEST_NOT_ZERO - - for (i = 0; i < sizeof(interfaces)/sizeof(interfaces[0]); i++) - ok( proxy_vtbl[i]->header.piid == interfaces[i], - "wrong proxy %u iid %p/%p\n", i, proxy_vtbl[i]->header.piid, interfaces[i] ); - - ok(PSFactoryBuffer.RefCount == 1, "ref count %d\n", PSFactoryBuffer.RefCount); - IPSFactoryBuffer_Release(ppsf); - - r = NdrDllGetClassObject(&IID_if3, &IID_IPSFactoryBuffer, (void**)&ppsf, proxy_file_list, - NULL, &PSFactoryBuffer); - ok(r == S_OK, "ret %08x\n", r); - ok(ppsf != NULL, "ppsf == NULL\n"); - - return ppsf; -} - -static int base_buffer_invoke_called; -static HRESULT WINAPI base_buffer_Invoke(IRpcStubBuffer *This, RPCOLEMESSAGE *msg, IRpcChannelBuffer *channel) -{ - base_buffer_invoke_called++; - ok(msg == (RPCOLEMESSAGE*)0xcafebabe, "msg ptr changed\n"); - ok(channel == (IRpcChannelBuffer*)0xdeadbeef, "channel ptr changed\n"); - return S_OK; /* returning any failure here results in an exception */ -} - -static IRpcStubBufferVtbl base_buffer_vtbl = { - (void*)0xcafebab0, - (void*)0xcafebab1, - (void*)0xcafebab2, - (void*)0xcafebab3, - (void*)0xcafebab4, - base_buffer_Invoke, - (void*)0xcafebab6, - (void*)0xcafebab7, - (void*)0xcafebab8, - (void*)0xcafebab9 -}; - -static void test_NdrStubForwardingFunction(void) -{ - void *This[5]; - void *real_this; - IRpcChannelBuffer *channel = (IRpcChannelBuffer*)0xdeadbeef; - RPC_MESSAGE *msg = (RPC_MESSAGE*)0xcafebabe; - DWORD *phase = (DWORD*)0x12345678; - IRpcStubBufferVtbl *base_buffer_vtbl_ptr = &base_buffer_vtbl; - IRpcStubBuffer *base_stub_buffer = (IRpcStubBuffer*)&base_buffer_vtbl_ptr; - - memset(This, 0xcc, sizeof(This)); - This[0] = base_stub_buffer; - real_this = &This[1]; - - NdrStubForwardingFunction( real_this, channel, msg, phase ); - ok(base_buffer_invoke_called == 1, "base_buffer_invoke called %d times\n", base_buffer_invoke_called); - -} - -static IRpcStubBuffer *create_stub(IPSFactoryBuffer *ppsf, REFIID iid, IUnknown *obj, HRESULT expected_result) -{ - IRpcStubBuffer *pstub = NULL; - HRESULT r; - - r = IPSFactoryBuffer_CreateStub(ppsf, iid, obj, &pstub); - ok(r == expected_result, "CreateStub returned %08x expected %08x\n", r, expected_result); - return pstub; -} - -static HRESULT WINAPI create_stub_test_QI(IUnknown *This, REFIID iid, void **ppv) -{ - ok(IsEqualIID(iid, &IID_if1), "incorrect iid\n"); - *ppv = (void*)0xdeadbeef; - return S_OK; -} - -static IUnknownVtbl create_stub_test_vtbl = -{ - create_stub_test_QI, - NULL, - NULL -}; - -static HRESULT WINAPI create_stub_test_fail_QI(IUnknown *This, REFIID iid, void **ppv) -{ - ok(IsEqualIID(iid, &IID_if1), "incorrect iid\n"); - *ppv = NULL; - return E_NOINTERFACE; -} - -static IUnknownVtbl create_stub_test_fail_vtbl = -{ - create_stub_test_fail_QI, - NULL, - NULL -}; - -struct dummy_unknown -{ - IUnknown IUnknown_iface; - LONG ref; -}; - -static inline struct dummy_unknown *impl_from_IUnknown(IUnknown *iface) -{ - return CONTAINING_RECORD(iface, struct dummy_unknown, IUnknown_iface); -} - -static HRESULT WINAPI dummy_QueryInterface(IUnknown *This, REFIID iid, void **ppv) -{ - *ppv = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI dummy_AddRef(LPUNKNOWN iface) -{ - struct dummy_unknown *this = impl_from_IUnknown(iface); - return InterlockedIncrement( &this->ref ); -} - -static ULONG WINAPI dummy_Release(LPUNKNOWN iface) -{ - struct dummy_unknown *this = impl_from_IUnknown(iface); - return InterlockedDecrement( &this->ref ); -} - -static IUnknownVtbl dummy_unknown_vtbl = -{ - dummy_QueryInterface, - dummy_AddRef, - dummy_Release -}; -static struct dummy_unknown dummy_unknown = { { &dummy_unknown_vtbl }, 0 }; - -static void create_proxy_test( IPSFactoryBuffer *ppsf, REFIID iid, const void *expected_vtbl ) -{ - IRpcProxyBuffer *proxy = NULL; - IUnknown *iface = NULL; - HRESULT r; - ULONG count; - - r = IPSFactoryBuffer_CreateProxy(ppsf, NULL, iid, &proxy, (void **)&iface); - ok( r == S_OK, "IPSFactoryBuffer_CreateProxy failed %x\n", r ); - ok( *(void **)iface == expected_vtbl, "wrong iface pointer %p/%p\n", *(void **)iface, expected_vtbl ); - count = IUnknown_Release( iface ); - ok( count == 1, "wrong refcount %u\n", count ); - count = IRpcProxyBuffer_Release( proxy ); - ok( count == 0, "wrong refcount %u\n", count ); - - dummy_unknown.ref = 4; - r = IPSFactoryBuffer_CreateProxy(ppsf, &dummy_unknown.IUnknown_iface, iid, &proxy, - (void **)&iface); - ok( r == S_OK, "IPSFactoryBuffer_CreateProxy failed %x\n", r ); - ok( dummy_unknown.ref == 5, "wrong refcount %u\n", dummy_unknown.ref ); - ok( *(void **)iface == expected_vtbl, "wrong iface pointer %p/%p\n", *(void **)iface, expected_vtbl ); - count = IUnknown_Release( iface ); - ok( count == 4, "wrong refcount %u\n", count ); - ok( dummy_unknown.ref == 4, "wrong refcount %u\n", dummy_unknown.ref ); - count = IRpcProxyBuffer_Release( proxy ); - ok( count == 0, "wrong refcount %u\n", count ); - ok( dummy_unknown.ref == 4, "wrong refcount %u\n", dummy_unknown.ref ); -} - -static void test_CreateProxy( IPSFactoryBuffer *ppsf ) -{ - create_proxy_test( ppsf, &IID_if1, if1_proxy_vtbl.Vtbl ); - create_proxy_test( ppsf, &IID_if2, if2_proxy_vtbl.Vtbl ); - create_proxy_test( ppsf, &IID_if3, if3_proxy_vtbl.Vtbl ); - create_proxy_test( ppsf, &IID_if4, if4_proxy_vtbl.Vtbl ); -} - -static void test_CreateStub(IPSFactoryBuffer *ppsf) -{ - IUnknownVtbl *vtbl = &create_stub_test_vtbl; - IUnknown *obj = (IUnknown*)&vtbl; - IRpcStubBuffer *pstub = create_stub(ppsf, &IID_if1, obj, S_OK); - CStdStubBuffer *cstd_stub = (CStdStubBuffer*)pstub; - const CInterfaceStubHeader *header = &CONTAINING_RECORD(cstd_stub->lpVtbl, const CInterfaceStubVtbl, Vtbl)->header; - - ok(IsEqualIID(header->piid, &IID_if1), "header iid differs\n"); - ok(cstd_stub->RefCount == 1, "ref count %d\n", cstd_stub->RefCount); - /* 0xdeadbeef returned from create_stub_test_QI */ - ok(cstd_stub->pvServerObject == (void*)0xdeadbeef, "pvServerObject %p\n", cstd_stub->pvServerObject); - ok(cstd_stub->pPSFactory != NULL, "pPSFactory was NULL\n"); - cstd_stub->pvServerObject = NULL; - IRpcStubBuffer_Release(pstub); - - vtbl = &create_stub_test_fail_vtbl; - pstub = create_stub(ppsf, &IID_if1, obj, E_NOINTERFACE); - ok(pstub == S_OK, "create_stub failed: %u\n", GetLastError()); - -} - -static HRESULT WINAPI connect_test_orig_QI(IUnknown *This, REFIID iid, void **ppv) -{ - ok(IsEqualIID(iid, &IID_if1) || - IsEqualIID(iid, &IID_if2), "incorrect iid\n"); - *ppv = (void*)This; - return S_OK; -} - -static int connect_test_orig_release_called; -static ULONG WINAPI connect_test_orig_release(IUnknown *This) -{ - connect_test_orig_release_called++; - return 0; -} - -static IUnknownVtbl connect_test_orig_vtbl = -{ - connect_test_orig_QI, - NULL, - connect_test_orig_release -}; - -static HRESULT WINAPI connect_test_new_QI(IUnknown *This, REFIID iid, void **ppv) -{ - ok(IsEqualIID(iid, &IID_if1) || - IsEqualIID(iid, &IID_if2), "incorrect iid\n"); - *ppv = (void*)0xcafebabe; - return S_OK; -} - -static IUnknownVtbl connect_test_new_vtbl = -{ - connect_test_new_QI, - NULL, - NULL -}; - -static HRESULT WINAPI connect_test_new_fail_QI(IUnknown *This, REFIID iid, void **ppv) -{ - ok(IsEqualIID(iid, &IID_if1), "incorrect iid\n"); - *ppv = (void*)0xdeadbeef; - return E_NOINTERFACE; -} - -static IUnknownVtbl connect_test_new_fail_vtbl = -{ - connect_test_new_fail_QI, - NULL, - NULL -}; - -static int connect_test_base_Connect_called; -static HRESULT WINAPI connect_test_base_Connect(IRpcStubBuffer *pstub, IUnknown *obj) -{ - connect_test_base_Connect_called++; - ok(*(void**)obj == (void*)0xbeefcafe, "unexpected obj %p\n", obj); - return S_OK; -} - -static IRpcStubBufferVtbl connect_test_base_stub_buffer_vtbl = -{ - (void*)0xcafebab0, - (void*)0xcafebab1, - (void*)0xcafebab2, - connect_test_base_Connect, - (void*)0xcafebab4, - (void*)0xcafebab5, - (void*)0xcafebab6, - (void*)0xcafebab7, - (void*)0xcafebab8, - (void*)0xcafebab9 -}; - -static void test_Connect(IPSFactoryBuffer *ppsf) -{ - IUnknownVtbl *orig_vtbl = &connect_test_orig_vtbl; - IUnknownVtbl *new_vtbl = &connect_test_new_vtbl; - IUnknownVtbl *new_fail_vtbl = &connect_test_new_fail_vtbl; - IUnknown *obj = (IUnknown*)&orig_vtbl; - IRpcStubBuffer *pstub = create_stub(ppsf, &IID_if1, obj, S_OK); - CStdStubBuffer *cstd_stub = (CStdStubBuffer*)pstub; - IRpcStubBufferVtbl *base_stub_buf_vtbl = &connect_test_base_stub_buffer_vtbl; - HRESULT r; - - obj = (IUnknown*)&new_vtbl; - r = IRpcStubBuffer_Connect(pstub, obj); - ok(r == S_OK, "r %08x\n", r); - ok(connect_test_orig_release_called == 1, "release called %d\n", connect_test_orig_release_called); - ok(cstd_stub->pvServerObject == (void*)0xcafebabe, "pvServerObject %p\n", cstd_stub->pvServerObject); - - cstd_stub->pvServerObject = (IUnknown*)&orig_vtbl; - obj = (IUnknown*)&new_fail_vtbl; - r = IRpcStubBuffer_Connect(pstub, obj); - ok(r == E_NOINTERFACE, "r %08x\n", r); - ok(cstd_stub->pvServerObject == (void*)0xdeadbeef, "pvServerObject %p\n", cstd_stub->pvServerObject); - ok(connect_test_orig_release_called == 2, "release called %d\n", connect_test_orig_release_called); - - /* Now use a delegated stub. - - We know from the NdrStubForwardFunction test that - (void**)pstub-1 is the base interface stub buffer. This shows - that (void**)pstub-2 contains the address of a vtable that gets - passed to the base interface's Connect method. Note that - (void**)pstub-2 itself gets passed to Connect and not - *((void**)pstub-2), so it should contain the vtable ptr and not - an interface ptr. */ - - obj = (IUnknown*)&orig_vtbl; - pstub = create_stub(ppsf, &IID_if2, obj, S_OK); - *((void**)pstub-1) = &base_stub_buf_vtbl; - *((void**)pstub-2) = (void*)0xbeefcafe; - - obj = (IUnknown*)&new_vtbl; - r = IRpcStubBuffer_Connect(pstub, obj); - ok(r == S_OK, "r %08x\n", r); - ok(connect_test_base_Connect_called == 1, "connect_test_bsae_Connect called %d times\n", - connect_test_base_Connect_called); - ok(connect_test_orig_release_called == 3, "release called %d\n", connect_test_orig_release_called); - cstd_stub = (CStdStubBuffer*)pstub; - ok(cstd_stub->pvServerObject == (void*)0xcafebabe, "pvServerObject %p\n", cstd_stub->pvServerObject); -} - -static void test_Disconnect(IPSFactoryBuffer *ppsf) -{ - IUnknownVtbl *orig_vtbl = &connect_test_orig_vtbl; - IUnknown *obj = (IUnknown*)&orig_vtbl; - IRpcStubBuffer *pstub = create_stub(ppsf, &IID_if1, obj, S_OK); - CStdStubBuffer *cstd_stub = (CStdStubBuffer*)pstub; - - connect_test_orig_release_called = 0; - IRpcStubBuffer_Disconnect(pstub); - ok(connect_test_orig_release_called == 1, "release called %d\n", connect_test_orig_release_called); - ok(cstd_stub->pvServerObject == NULL, "pvServerObject %p\n", cstd_stub->pvServerObject); - IRpcStubBuffer_Release(pstub); -} - - -static int release_test_psfacbuf_release_called; -static ULONG WINAPI release_test_pretend_psfacbuf_release(IUnknown *pUnk) -{ - release_test_psfacbuf_release_called++; - return 1; -} - -static IUnknownVtbl release_test_pretend_psfacbuf_vtbl = -{ - NULL, - NULL, - release_test_pretend_psfacbuf_release -}; - -static void test_Release(IPSFactoryBuffer *ppsf) -{ - LONG facbuf_refs; - IUnknownVtbl *orig_vtbl = &connect_test_orig_vtbl; - IUnknown *obj = (IUnknown*)&orig_vtbl; - IUnknownVtbl *pretend_psfacbuf_vtbl = &release_test_pretend_psfacbuf_vtbl; - IUnknown *pretend_psfacbuf = (IUnknown *)&pretend_psfacbuf_vtbl; - IRpcStubBuffer *pstub = create_stub(ppsf, &IID_if1, obj, S_OK); - CStdStubBuffer *cstd_stub = (CStdStubBuffer*)pstub; - - facbuf_refs = PSFactoryBuffer.RefCount; - - /* This shows that NdrCStdStubBuffer_Release doesn't call Disconnect */ - ok(cstd_stub->RefCount == 1, "ref count %d\n", cstd_stub->RefCount); - connect_test_orig_release_called = 0; - IRpcStubBuffer_Release(pstub); -todo_wine { - ok(connect_test_orig_release_called == 0, "release called %d\n", connect_test_orig_release_called); -} - ok(PSFactoryBuffer.RefCount == facbuf_refs - 1, "factory buffer refs %d orig %d\n", PSFactoryBuffer.RefCount, facbuf_refs); - - /* This shows that NdrCStdStubBuffer_Release calls Release on its 2nd arg, rather than on This->pPSFactory - (which are usually the same and indeed it's odd that _Release requires this 2nd arg). */ - pstub = create_stub(ppsf, &IID_if1, obj, S_OK); - ok(PSFactoryBuffer.RefCount == facbuf_refs, "factory buffer refs %d orig %d\n", PSFactoryBuffer.RefCount, facbuf_refs); - NdrCStdStubBuffer_Release(pstub, (IPSFactoryBuffer*)pretend_psfacbuf); - ok(release_test_psfacbuf_release_called == 1, "pretend_psfacbuf_release called %d\n", release_test_psfacbuf_release_called); - ok(PSFactoryBuffer.RefCount == facbuf_refs, "factory buffer refs %d orig %d\n", PSFactoryBuffer.RefCount, facbuf_refs); -} - -static HRESULT WINAPI delegating_invoke_test_QI(ITypeLib *pUnk, REFIID iid, void** ppv) -{ - - *ppv = pUnk; - return S_OK; -} - -static ULONG WINAPI delegating_invoke_test_addref(ITypeLib *pUnk) -{ - return 1; -} - -static ULONG WINAPI delegating_invoke_test_release(ITypeLib *pUnk) -{ - return 1; -} - -static UINT WINAPI delegating_invoke_test_get_type_info_count(ITypeLib *pUnk) -{ - return 0xabcdef; -} - -static ITypeLibVtbl delegating_invoke_test_obj_vtbl = -{ - delegating_invoke_test_QI, - delegating_invoke_test_addref, - delegating_invoke_test_release, - delegating_invoke_test_get_type_info_count, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL -}; - -static HRESULT WINAPI delegating_invoke_chan_query_interface(IRpcChannelBuffer *pchan, - REFIID iid, - void **ppv) -{ - ok(0, "call to QueryInterface not expected\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI delegating_invoke_chan_add_ref(IRpcChannelBuffer *pchan) -{ - return 2; -} - -static ULONG WINAPI delegating_invoke_chan_release(IRpcChannelBuffer *pchan) -{ - return 1; -} - -static HRESULT WINAPI delegating_invoke_chan_get_buffer(IRpcChannelBuffer *pchan, - RPCOLEMESSAGE *msg, - REFIID iid) -{ - msg->Buffer = HeapAlloc(GetProcessHeap(), 0, msg->cbBuffer); - return S_OK; -} - -static HRESULT WINAPI delegating_invoke_chan_send_receive(IRpcChannelBuffer *pchan, - RPCOLEMESSAGE *pMessage, - ULONG *pStatus) -{ - ok(0, "call to SendReceive not expected\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI delegating_invoke_chan_free_buffer(IRpcChannelBuffer *pchan, - RPCOLEMESSAGE *pMessage) -{ - ok(0, "call to FreeBuffer not expected\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI delegating_invoke_chan_get_dest_ctx(IRpcChannelBuffer *pchan, - DWORD *pdwDestContext, - void **ppvDestContext) -{ - *pdwDestContext = MSHCTX_LOCAL; - *ppvDestContext = NULL; - return S_OK; -} - -static HRESULT WINAPI delegating_invoke_chan_is_connected(IRpcChannelBuffer *pchan) -{ - ok(0, "call to IsConnected not expected\n"); - return E_NOTIMPL; -} - -static IRpcChannelBufferVtbl delegating_invoke_test_rpc_chan_vtbl = -{ - delegating_invoke_chan_query_interface, - delegating_invoke_chan_add_ref, - delegating_invoke_chan_release, - delegating_invoke_chan_get_buffer, - delegating_invoke_chan_send_receive, - delegating_invoke_chan_free_buffer, - delegating_invoke_chan_get_dest_ctx, - delegating_invoke_chan_is_connected -}; - -static void test_delegating_Invoke(IPSFactoryBuffer *ppsf) -{ - ITypeLibVtbl *obj_vtbl = &delegating_invoke_test_obj_vtbl; - IUnknown *obj = (IUnknown*)&obj_vtbl; - IRpcStubBuffer *pstub = create_stub(ppsf, &IID_if2, obj, S_OK); - IRpcChannelBufferVtbl *pchan_vtbl = &delegating_invoke_test_rpc_chan_vtbl; - IRpcChannelBuffer *pchan = (IRpcChannelBuffer *)&pchan_vtbl; - HRESULT r = E_FAIL; - RPCOLEMESSAGE msg; - - memset(&msg, 0, sizeof(msg)); - msg.dataRepresentation = NDR_LOCAL_DATA_REPRESENTATION; - msg.iMethod = 3; - r = IRpcStubBuffer_Invoke(pstub, &msg, pchan); - ok(r == S_OK, "ret %08x\n", r); - if(r == S_OK) - { - ok(*(DWORD*)msg.Buffer == 0xabcdef, "buf[0] %08x\n", *(DWORD*)msg.Buffer); - ok(*((DWORD*)msg.Buffer + 1) == S_OK, "buf[1] %08x\n", *((DWORD*)msg.Buffer + 1)); - } - /* free the buffer allocated by delegating_invoke_chan_get_buffer */ - HeapFree(GetProcessHeap(), 0, msg.Buffer); - IRpcStubBuffer_Release(pstub); -} -static const CInterfaceProxyVtbl *cstub_ProxyVtblList2[] = -{ - NULL -}; - -static const CInterfaceStubVtbl *cstub_StubVtblList2[] = -{ - NULL -}; - -static PCInterfaceName const if_name_list2[] = -{ - NULL -}; - -static const IID *base_iid_list2[] = -{ - NULL, -}; - -static const ExtendedProxyFileInfo my_proxy_file_info2 = -{ - (const PCInterfaceProxyVtblList *) &cstub_ProxyVtblList2, - (const PCInterfaceStubVtblList *) &cstub_StubVtblList2, - (const PCInterfaceName *) &if_name_list2, - (const IID **) &base_iid_list2, - &iid_lookup, - 0, - 1, - NULL, - 0, - 0, - 0 -}; - -static const ProxyFileInfo *proxy_file_list2[] = { - &my_proxy_file_info2, - NULL -}; - -static void test_NdrDllRegisterProxy( void ) -{ - HRESULT res; - const ExtendedProxyFileInfo *pf; - HMODULE hmod = GetModuleHandleA(NULL); - - - res = NdrDllRegisterProxy(NULL, NULL, NULL); - ok(res == E_HANDLE, "Incorrect return code %x\n",res); - pf = NULL; - res = NdrDllRegisterProxy(hmod, &pf, NULL); - ok(res == E_NOINTERFACE, "Incorrect return code %x\n",res); - res = NdrDllRegisterProxy(hmod, proxy_file_list2, NULL); - ok(res == E_NOINTERFACE, "Incorrect return code %x\n",res); - /* This fails on Vista and Windows 7 due to permissions */ - res = NdrDllRegisterProxy(hmod, proxy_file_list, NULL); - ok(res == S_OK || res == E_ACCESSDENIED, "NdrDllRegisterProxy failed %x\n",res); - if (res == S_OK) - { - res = NdrDllUnregisterProxy(hmod,proxy_file_list, NULL); - ok(res == S_OK, "NdrDllUnregisterProxy failed %x\n",res); - } -} - -START_TEST( cstub ) -{ - IPSFactoryBuffer *ppsf; - - OleInitialize(NULL); - - ppsf = test_NdrDllGetClassObject(); - test_NdrStubForwardingFunction(); - test_CreateProxy(ppsf); - test_CreateStub(ppsf); - test_Connect(ppsf); - test_Disconnect(ppsf); - test_Release(ppsf); - test_delegating_Invoke(ppsf); - test_NdrDllRegisterProxy(); - - OleUninitialize(); -} diff --git a/rostests/winetests/rpcrt4/generated.c b/rostests/winetests/rpcrt4/generated.c deleted file mode 100644 index 4b9d16cba07..00000000000 --- a/rostests/winetests/rpcrt4/generated.c +++ /dev/null @@ -1,1865 +0,0 @@ -/* File generated automatically from tools/winapi/tests.dat; do not edit! */ -/* This file can be copied, modified and distributed without restriction. */ - -/* - * Unit tests for data structure packing - */ - -#define WINVER 0x0501 -#define _WIN32_IE 0x0501 -#define _WIN32_WINNT 0x0501 - -#define WINE_NOWINSOCK - -#include -#include "windef.h" -#include "winbase.h" -#include "rpc.h" -#include "rpcndr.h" -#include "rpcproxy.h" - -#include "wine/test.h" - -/*********************************************************************** - * Compatibility macros - */ - -#define DWORD_PTR UINT_PTR -#define LONG_PTR INT_PTR -#define ULONG_PTR UINT_PTR - -/*********************************************************************** - * Windows API extension - */ - -#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus) -# define _TYPE_ALIGNMENT(type) __alignof(type) -#elif defined(__GNUC__) -# define _TYPE_ALIGNMENT(type) __alignof__(type) -#else -/* - * FIXME: May not be possible without a compiler extension - * (if type is not just a name that is, otherwise the normal - * TYPE_ALIGNMENT can be used) - */ -#endif - -#if defined(TYPE_ALIGNMENT) && defined(_MSC_VER) && _MSC_VER >= 800 && !defined(__cplusplus) -#pragma warning(disable:4116) -#endif - -#if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT) -# define TYPE_ALIGNMENT _TYPE_ALIGNMENT -#endif - -/*********************************************************************** - * Test helper macros - */ - -#define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size); - -#ifdef TYPE_ALIGNMENT -# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align); -#else -# define TEST_TYPE_ALIGN(type, align) -#endif - -#ifdef _TYPE_ALIGNMENT -# define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align); -# define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align); -#else -# define TEST_TARGET_ALIGN(type, align) -# define TEST_FIELD_ALIGN(type, field, align) -#endif - -#define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset); - -#define TEST_TARGET_SIZE(type, size) TEST_TYPE_SIZE(*(type)0, size) -#define TEST_FIELD_SIZE(type, field, size) TEST_TYPE_SIZE((((type*)0)->field), size) -#define TEST_TYPE_SIGNED(type) C_ASSERT((type) -1 < 0); -#define TEST_TYPE_UNSIGNED(type) C_ASSERT((type) -1 > 0); - - -#ifdef _WIN64 - -static void test_pack_I_RPC_HANDLE(void) -{ - /* I_RPC_HANDLE */ - TEST_TYPE_SIZE (I_RPC_HANDLE, 8) - TEST_TYPE_ALIGN (I_RPC_HANDLE, 8) -} - -static void test_pack_RPC_STATUS(void) -{ - /* RPC_STATUS */ - TEST_TYPE_SIZE (RPC_STATUS, 4) - TEST_TYPE_ALIGN (RPC_STATUS, 4) -} - -static void test_pack_PRPC_POLICY(void) -{ - /* PRPC_POLICY */ - TEST_TYPE_SIZE (PRPC_POLICY, 8) - TEST_TYPE_ALIGN (PRPC_POLICY, 8) - TEST_TARGET_SIZE (PRPC_POLICY, 12) - TEST_TARGET_ALIGN(PRPC_POLICY, 4) -} - -static void test_pack_RPC_AUTH_IDENTITY_HANDLE(void) -{ - /* RPC_AUTH_IDENTITY_HANDLE */ - TEST_TYPE_SIZE (RPC_AUTH_IDENTITY_HANDLE, 8) - TEST_TYPE_ALIGN (RPC_AUTH_IDENTITY_HANDLE, 8) -} - -static void test_pack_RPC_AUTH_KEY_RETRIEVAL_FN(void) -{ - /* RPC_AUTH_KEY_RETRIEVAL_FN */ -} - -static void test_pack_RPC_AUTHZ_HANDLE(void) -{ - /* RPC_AUTHZ_HANDLE */ - TEST_TYPE_SIZE (RPC_AUTHZ_HANDLE, 8) - TEST_TYPE_ALIGN (RPC_AUTHZ_HANDLE, 8) -} - -static void test_pack_RPC_BINDING_HANDLE(void) -{ - /* RPC_BINDING_HANDLE */ - TEST_TYPE_SIZE (RPC_BINDING_HANDLE, 8) - TEST_TYPE_ALIGN (RPC_BINDING_HANDLE, 8) -} - -static void test_pack_RPC_BINDING_VECTOR(void) -{ - /* RPC_BINDING_VECTOR */ - TEST_TYPE_SIZE (RPC_BINDING_VECTOR, 16) - TEST_TYPE_ALIGN (RPC_BINDING_VECTOR, 8) - TEST_FIELD_SIZE (RPC_BINDING_VECTOR, Count, 4) - TEST_FIELD_ALIGN (RPC_BINDING_VECTOR, Count, 4) - TEST_FIELD_OFFSET(RPC_BINDING_VECTOR, Count, 0) - TEST_FIELD_SIZE (RPC_BINDING_VECTOR, BindingH, 8) - TEST_FIELD_ALIGN (RPC_BINDING_VECTOR, BindingH, 8) - TEST_FIELD_OFFSET(RPC_BINDING_VECTOR, BindingH, 8) -} - -static void test_pack_RPC_IF_HANDLE(void) -{ - /* RPC_IF_HANDLE */ - TEST_TYPE_SIZE (RPC_IF_HANDLE, 8) - TEST_TYPE_ALIGN (RPC_IF_HANDLE, 8) -} - -static void test_pack_RPC_IF_ID(void) -{ - /* RPC_IF_ID */ - TEST_TYPE_SIZE (RPC_IF_ID, 20) - TEST_TYPE_ALIGN (RPC_IF_ID, 4) - TEST_FIELD_SIZE (RPC_IF_ID, Uuid, 16) - TEST_FIELD_ALIGN (RPC_IF_ID, Uuid, 4) - TEST_FIELD_OFFSET(RPC_IF_ID, Uuid, 0) - TEST_FIELD_SIZE (RPC_IF_ID, VersMajor, 2) - TEST_FIELD_ALIGN (RPC_IF_ID, VersMajor, 2) - TEST_FIELD_OFFSET(RPC_IF_ID, VersMajor, 16) - TEST_FIELD_SIZE (RPC_IF_ID, VersMinor, 2) - TEST_FIELD_ALIGN (RPC_IF_ID, VersMinor, 2) - TEST_FIELD_OFFSET(RPC_IF_ID, VersMinor, 18) -} - -static void test_pack_RPC_POLICY(void) -{ - /* RPC_POLICY */ - TEST_TYPE_SIZE (RPC_POLICY, 12) - TEST_TYPE_ALIGN (RPC_POLICY, 4) - TEST_FIELD_SIZE (RPC_POLICY, Length, 4) - TEST_FIELD_ALIGN (RPC_POLICY, Length, 4) - TEST_FIELD_OFFSET(RPC_POLICY, Length, 0) - TEST_FIELD_SIZE (RPC_POLICY, EndpointFlags, 4) - TEST_FIELD_ALIGN (RPC_POLICY, EndpointFlags, 4) - TEST_FIELD_OFFSET(RPC_POLICY, EndpointFlags, 4) - TEST_FIELD_SIZE (RPC_POLICY, NICFlags, 4) - TEST_FIELD_ALIGN (RPC_POLICY, NICFlags, 4) - TEST_FIELD_OFFSET(RPC_POLICY, NICFlags, 8) -} - -static void test_pack_UUID_VECTOR(void) -{ - /* UUID_VECTOR */ - TEST_TYPE_SIZE (UUID_VECTOR, 16) - TEST_TYPE_ALIGN (UUID_VECTOR, 8) - TEST_FIELD_SIZE (UUID_VECTOR, Count, 4) - TEST_FIELD_ALIGN (UUID_VECTOR, Count, 4) - TEST_FIELD_OFFSET(UUID_VECTOR, Count, 0) - TEST_FIELD_SIZE (UUID_VECTOR, Uuid, 8) - TEST_FIELD_ALIGN (UUID_VECTOR, Uuid, 8) - TEST_FIELD_OFFSET(UUID_VECTOR, Uuid, 8) -} - -static void test_pack_PRPC_CLIENT_INTERFACE(void) -{ - /* PRPC_CLIENT_INTERFACE */ - TEST_TYPE_SIZE (PRPC_CLIENT_INTERFACE, 8) - TEST_TYPE_ALIGN (PRPC_CLIENT_INTERFACE, 8) - TEST_TARGET_SIZE (PRPC_CLIENT_INTERFACE, 96) - TEST_TARGET_ALIGN(PRPC_CLIENT_INTERFACE, 8) -} - -static void test_pack_PRPC_DISPATCH_TABLE(void) -{ - /* PRPC_DISPATCH_TABLE */ - TEST_TYPE_SIZE (PRPC_DISPATCH_TABLE, 8) - TEST_TYPE_ALIGN (PRPC_DISPATCH_TABLE, 8) - TEST_TARGET_SIZE (PRPC_DISPATCH_TABLE, 24) - TEST_TARGET_ALIGN(PRPC_DISPATCH_TABLE, 8) -} - -static void test_pack_PRPC_MESSAGE(void) -{ - /* PRPC_MESSAGE */ - TEST_TYPE_SIZE (PRPC_MESSAGE, 8) - TEST_TYPE_ALIGN (PRPC_MESSAGE, 8) - TEST_TARGET_SIZE (PRPC_MESSAGE, 80) - TEST_TARGET_ALIGN(PRPC_MESSAGE, 8) -} - -static void test_pack_PRPC_PROTSEQ_ENDPOINT(void) -{ - /* PRPC_PROTSEQ_ENDPOINT */ - TEST_TYPE_SIZE (PRPC_PROTSEQ_ENDPOINT, 8) - TEST_TYPE_ALIGN (PRPC_PROTSEQ_ENDPOINT, 8) - TEST_TARGET_SIZE (PRPC_PROTSEQ_ENDPOINT, 16) - TEST_TARGET_ALIGN(PRPC_PROTSEQ_ENDPOINT, 8) -} - -static void test_pack_PRPC_SERVER_INTERFACE(void) -{ - /* PRPC_SERVER_INTERFACE */ - TEST_TYPE_SIZE (PRPC_SERVER_INTERFACE, 8) - TEST_TYPE_ALIGN (PRPC_SERVER_INTERFACE, 8) - TEST_TARGET_SIZE (PRPC_SERVER_INTERFACE, 96) - TEST_TARGET_ALIGN(PRPC_SERVER_INTERFACE, 8) -} - -static void test_pack_PRPC_SYNTAX_IDENTIFIER(void) -{ - /* PRPC_SYNTAX_IDENTIFIER */ - TEST_TYPE_SIZE (PRPC_SYNTAX_IDENTIFIER, 8) - TEST_TYPE_ALIGN (PRPC_SYNTAX_IDENTIFIER, 8) - TEST_TARGET_SIZE (PRPC_SYNTAX_IDENTIFIER, 20) - TEST_TARGET_ALIGN(PRPC_SYNTAX_IDENTIFIER, 4) -} - -static void test_pack_RPC_CLIENT_INTERFACE(void) -{ - /* RPC_CLIENT_INTERFACE */ - TEST_TYPE_SIZE (RPC_CLIENT_INTERFACE, 96) - TEST_TYPE_ALIGN (RPC_CLIENT_INTERFACE, 8) - TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, Length, 4) - TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, Length, 4) - TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, Length, 0) - TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, InterfaceId, 20) - TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, InterfaceId, 4) - TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, InterfaceId, 4) - TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, TransferSyntax, 20) - TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, TransferSyntax, 4) - TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, TransferSyntax, 24) - TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, DispatchTable, 8) - TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, DispatchTable, 8) - TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, DispatchTable, 48) - TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, RpcProtseqEndpointCount, 4) - TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, RpcProtseqEndpointCount, 4) - TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, RpcProtseqEndpointCount, 56) - TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, RpcProtseqEndpoint, 8) - TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, RpcProtseqEndpoint, 8) - TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, RpcProtseqEndpoint, 64) - TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, Reserved, 8) - TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, Reserved, 8) - TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, Reserved, 72) - TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, InterpreterInfo, 8) - TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, InterpreterInfo, 8) - TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, InterpreterInfo, 80) - TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, Flags, 4) - TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, Flags, 4) - TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, Flags, 88) -} - -static void test_pack_RPC_DISPATCH_FUNCTION(void) -{ - /* RPC_DISPATCH_FUNCTION */ -} - -static void test_pack_RPC_DISPATCH_TABLE(void) -{ - /* RPC_DISPATCH_TABLE */ - TEST_TYPE_SIZE (RPC_DISPATCH_TABLE, 24) - TEST_TYPE_ALIGN (RPC_DISPATCH_TABLE, 8) - TEST_FIELD_SIZE (RPC_DISPATCH_TABLE, DispatchTableCount, 4) - TEST_FIELD_ALIGN (RPC_DISPATCH_TABLE, DispatchTableCount, 4) - TEST_FIELD_OFFSET(RPC_DISPATCH_TABLE, DispatchTableCount, 0) - TEST_FIELD_SIZE (RPC_DISPATCH_TABLE, DispatchTable, 8) - TEST_FIELD_ALIGN (RPC_DISPATCH_TABLE, DispatchTable, 8) - TEST_FIELD_OFFSET(RPC_DISPATCH_TABLE, DispatchTable, 8) - TEST_FIELD_SIZE (RPC_DISPATCH_TABLE, Reserved, 8) - TEST_FIELD_ALIGN (RPC_DISPATCH_TABLE, Reserved, 8) - TEST_FIELD_OFFSET(RPC_DISPATCH_TABLE, Reserved, 16) -} - -static void test_pack_RPC_MESSAGE(void) -{ - /* RPC_MESSAGE */ - TEST_TYPE_SIZE (RPC_MESSAGE, 80) - TEST_TYPE_ALIGN (RPC_MESSAGE, 8) - TEST_FIELD_SIZE (RPC_MESSAGE, Handle, 8) - TEST_FIELD_ALIGN (RPC_MESSAGE, Handle, 8) - TEST_FIELD_OFFSET(RPC_MESSAGE, Handle, 0) - TEST_FIELD_SIZE (RPC_MESSAGE, DataRepresentation, 4) - TEST_FIELD_ALIGN (RPC_MESSAGE, DataRepresentation, 4) - TEST_FIELD_OFFSET(RPC_MESSAGE, DataRepresentation, 8) - TEST_FIELD_SIZE (RPC_MESSAGE, Buffer, 8) - TEST_FIELD_ALIGN (RPC_MESSAGE, Buffer, 8) - TEST_FIELD_OFFSET(RPC_MESSAGE, Buffer, 16) - TEST_FIELD_SIZE (RPC_MESSAGE, BufferLength, 4) - TEST_FIELD_ALIGN (RPC_MESSAGE, BufferLength, 4) - TEST_FIELD_OFFSET(RPC_MESSAGE, BufferLength, 24) - TEST_FIELD_SIZE (RPC_MESSAGE, ProcNum, 4) - TEST_FIELD_ALIGN (RPC_MESSAGE, ProcNum, 4) - TEST_FIELD_OFFSET(RPC_MESSAGE, ProcNum, 28) - TEST_FIELD_SIZE (RPC_MESSAGE, TransferSyntax, 8) - TEST_FIELD_ALIGN (RPC_MESSAGE, TransferSyntax, 8) - TEST_FIELD_OFFSET(RPC_MESSAGE, TransferSyntax, 32) - TEST_FIELD_SIZE (RPC_MESSAGE, RpcInterfaceInformation, 8) - TEST_FIELD_ALIGN (RPC_MESSAGE, RpcInterfaceInformation, 8) - TEST_FIELD_OFFSET(RPC_MESSAGE, RpcInterfaceInformation, 40) - TEST_FIELD_SIZE (RPC_MESSAGE, ReservedForRuntime, 8) - TEST_FIELD_ALIGN (RPC_MESSAGE, ReservedForRuntime, 8) - TEST_FIELD_OFFSET(RPC_MESSAGE, ReservedForRuntime, 48) - TEST_FIELD_SIZE (RPC_MESSAGE, ManagerEpv, 8) - TEST_FIELD_ALIGN (RPC_MESSAGE, ManagerEpv, 8) - TEST_FIELD_OFFSET(RPC_MESSAGE, ManagerEpv, 56) - TEST_FIELD_SIZE (RPC_MESSAGE, ImportContext, 8) - TEST_FIELD_ALIGN (RPC_MESSAGE, ImportContext, 8) - TEST_FIELD_OFFSET(RPC_MESSAGE, ImportContext, 64) - TEST_FIELD_SIZE (RPC_MESSAGE, RpcFlags, 4) - TEST_FIELD_ALIGN (RPC_MESSAGE, RpcFlags, 4) - TEST_FIELD_OFFSET(RPC_MESSAGE, RpcFlags, 72) -} - -static void test_pack_RPC_PROTSEQ_ENDPOINT(void) -{ - /* RPC_PROTSEQ_ENDPOINT */ - TEST_TYPE_SIZE (RPC_PROTSEQ_ENDPOINT, 16) - TEST_TYPE_ALIGN (RPC_PROTSEQ_ENDPOINT, 8) - TEST_FIELD_SIZE (RPC_PROTSEQ_ENDPOINT, RpcProtocolSequence, 8) - TEST_FIELD_ALIGN (RPC_PROTSEQ_ENDPOINT, RpcProtocolSequence, 8) - TEST_FIELD_OFFSET(RPC_PROTSEQ_ENDPOINT, RpcProtocolSequence, 0) - TEST_FIELD_SIZE (RPC_PROTSEQ_ENDPOINT, Endpoint, 8) - TEST_FIELD_ALIGN (RPC_PROTSEQ_ENDPOINT, Endpoint, 8) - TEST_FIELD_OFFSET(RPC_PROTSEQ_ENDPOINT, Endpoint, 8) -} - -static void test_pack_RPC_SERVER_INTERFACE(void) -{ - /* RPC_SERVER_INTERFACE */ - TEST_TYPE_SIZE (RPC_SERVER_INTERFACE, 96) - TEST_TYPE_ALIGN (RPC_SERVER_INTERFACE, 8) - TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, Length, 4) - TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, Length, 4) - TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, Length, 0) - TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, InterfaceId, 20) - TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, InterfaceId, 4) - TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, InterfaceId, 4) - TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, TransferSyntax, 20) - TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, TransferSyntax, 4) - TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, TransferSyntax, 24) - TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, DispatchTable, 8) - TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, DispatchTable, 8) - TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, DispatchTable, 48) - TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, RpcProtseqEndpointCount, 4) - TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, RpcProtseqEndpointCount, 4) - TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, RpcProtseqEndpointCount, 56) - TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, RpcProtseqEndpoint, 8) - TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, RpcProtseqEndpoint, 8) - TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, RpcProtseqEndpoint, 64) - TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, DefaultManagerEpv, 8) - TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, DefaultManagerEpv, 8) - TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, DefaultManagerEpv, 72) - TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, InterpreterInfo, 8) - TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, InterpreterInfo, 8) - TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, InterpreterInfo, 80) - TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, Flags, 4) - TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, Flags, 4) - TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, Flags, 88) -} - -static void test_pack_RPC_SYNTAX_IDENTIFIER(void) -{ - /* RPC_SYNTAX_IDENTIFIER */ - TEST_TYPE_SIZE (RPC_SYNTAX_IDENTIFIER, 20) - TEST_TYPE_ALIGN (RPC_SYNTAX_IDENTIFIER, 4) - TEST_FIELD_SIZE (RPC_SYNTAX_IDENTIFIER, SyntaxGUID, 16) - TEST_FIELD_ALIGN (RPC_SYNTAX_IDENTIFIER, SyntaxGUID, 4) - TEST_FIELD_OFFSET(RPC_SYNTAX_IDENTIFIER, SyntaxGUID, 0) - TEST_FIELD_SIZE (RPC_SYNTAX_IDENTIFIER, SyntaxVersion, 4) - TEST_FIELD_ALIGN (RPC_SYNTAX_IDENTIFIER, SyntaxVersion, 2) - TEST_FIELD_OFFSET(RPC_SYNTAX_IDENTIFIER, SyntaxVersion, 16) -} - -static void test_pack_RPC_VERSION(void) -{ - /* RPC_VERSION */ - TEST_TYPE_SIZE (RPC_VERSION, 4) - TEST_TYPE_ALIGN (RPC_VERSION, 2) - TEST_FIELD_SIZE (RPC_VERSION, MajorVersion, 2) - TEST_FIELD_ALIGN (RPC_VERSION, MajorVersion, 2) - TEST_FIELD_OFFSET(RPC_VERSION, MajorVersion, 0) - TEST_FIELD_SIZE (RPC_VERSION, MinorVersion, 2) - TEST_FIELD_ALIGN (RPC_VERSION, MinorVersion, 2) - TEST_FIELD_OFFSET(RPC_VERSION, MinorVersion, 2) -} - -static void test_pack_ARRAY_INFO(void) -{ - /* ARRAY_INFO */ - TEST_TYPE_SIZE (ARRAY_INFO, 48) - TEST_TYPE_ALIGN (ARRAY_INFO, 8) - TEST_FIELD_SIZE (ARRAY_INFO, Dimension, 4) - TEST_FIELD_ALIGN (ARRAY_INFO, Dimension, 4) - TEST_FIELD_OFFSET(ARRAY_INFO, Dimension, 0) - TEST_FIELD_SIZE (ARRAY_INFO, BufferConformanceMark, 8) - TEST_FIELD_ALIGN (ARRAY_INFO, BufferConformanceMark, 8) - TEST_FIELD_OFFSET(ARRAY_INFO, BufferConformanceMark, 8) - TEST_FIELD_SIZE (ARRAY_INFO, BufferVarianceMark, 8) - TEST_FIELD_ALIGN (ARRAY_INFO, BufferVarianceMark, 8) - TEST_FIELD_OFFSET(ARRAY_INFO, BufferVarianceMark, 16) - TEST_FIELD_SIZE (ARRAY_INFO, MaxCountArray, 8) - TEST_FIELD_ALIGN (ARRAY_INFO, MaxCountArray, 8) - TEST_FIELD_OFFSET(ARRAY_INFO, MaxCountArray, 24) - TEST_FIELD_SIZE (ARRAY_INFO, OffsetArray, 8) - TEST_FIELD_ALIGN (ARRAY_INFO, OffsetArray, 8) - TEST_FIELD_OFFSET(ARRAY_INFO, OffsetArray, 32) - TEST_FIELD_SIZE (ARRAY_INFO, ActualCountArray, 8) - TEST_FIELD_ALIGN (ARRAY_INFO, ActualCountArray, 8) - TEST_FIELD_OFFSET(ARRAY_INFO, ActualCountArray, 40) -} - -static void test_pack_COMM_FAULT_OFFSETS(void) -{ - /* COMM_FAULT_OFFSETS */ - TEST_TYPE_SIZE (COMM_FAULT_OFFSETS, 4) - TEST_TYPE_ALIGN (COMM_FAULT_OFFSETS, 2) - TEST_FIELD_SIZE (COMM_FAULT_OFFSETS, CommOffset, 2) - TEST_FIELD_ALIGN (COMM_FAULT_OFFSETS, CommOffset, 2) - TEST_FIELD_OFFSET(COMM_FAULT_OFFSETS, CommOffset, 0) - TEST_FIELD_SIZE (COMM_FAULT_OFFSETS, FaultOffset, 2) - TEST_FIELD_ALIGN (COMM_FAULT_OFFSETS, FaultOffset, 2) - TEST_FIELD_OFFSET(COMM_FAULT_OFFSETS, FaultOffset, 2) -} - -static void test_pack_CS_STUB_INFO(void) -{ - /* CS_STUB_INFO */ - TEST_TYPE_SIZE (CS_STUB_INFO, 16) - TEST_TYPE_ALIGN (CS_STUB_INFO, 8) - TEST_FIELD_SIZE (CS_STUB_INFO, WireCodeset, 4) - TEST_FIELD_ALIGN (CS_STUB_INFO, WireCodeset, 4) - TEST_FIELD_OFFSET(CS_STUB_INFO, WireCodeset, 0) - TEST_FIELD_SIZE (CS_STUB_INFO, DesiredReceivingCodeset, 4) - TEST_FIELD_ALIGN (CS_STUB_INFO, DesiredReceivingCodeset, 4) - TEST_FIELD_OFFSET(CS_STUB_INFO, DesiredReceivingCodeset, 4) - TEST_FIELD_SIZE (CS_STUB_INFO, CSArrayInfo, 8) - TEST_FIELD_ALIGN (CS_STUB_INFO, CSArrayInfo, 8) - TEST_FIELD_OFFSET(CS_STUB_INFO, CSArrayInfo, 8) -} - -static void test_pack_EXPR_EVAL(void) -{ - /* EXPR_EVAL */ -} - -static void test_pack_FULL_PTR_TO_REFID_ELEMENT(void) -{ - /* FULL_PTR_TO_REFID_ELEMENT */ - TEST_TYPE_SIZE (FULL_PTR_TO_REFID_ELEMENT, 24) - TEST_TYPE_ALIGN (FULL_PTR_TO_REFID_ELEMENT, 8) - TEST_FIELD_SIZE (FULL_PTR_TO_REFID_ELEMENT, Next, 8) - TEST_FIELD_ALIGN (FULL_PTR_TO_REFID_ELEMENT, Next, 8) - TEST_FIELD_OFFSET(FULL_PTR_TO_REFID_ELEMENT, Next, 0) - TEST_FIELD_SIZE (FULL_PTR_TO_REFID_ELEMENT, Pointer, 8) - TEST_FIELD_ALIGN (FULL_PTR_TO_REFID_ELEMENT, Pointer, 8) - TEST_FIELD_OFFSET(FULL_PTR_TO_REFID_ELEMENT, Pointer, 8) - TEST_FIELD_SIZE (FULL_PTR_TO_REFID_ELEMENT, RefId, 4) - TEST_FIELD_ALIGN (FULL_PTR_TO_REFID_ELEMENT, RefId, 4) - TEST_FIELD_OFFSET(FULL_PTR_TO_REFID_ELEMENT, RefId, 16) - TEST_FIELD_SIZE (FULL_PTR_TO_REFID_ELEMENT, State, 1) - TEST_FIELD_ALIGN (FULL_PTR_TO_REFID_ELEMENT, State, 1) - TEST_FIELD_OFFSET(FULL_PTR_TO_REFID_ELEMENT, State, 20) -} - -static void test_pack_FULL_PTR_XLAT_TABLES(void) -{ - /* FULL_PTR_XLAT_TABLES */ -} - -static void test_pack_GENERIC_BINDING_INFO(void) -{ - /* GENERIC_BINDING_INFO */ - TEST_FIELD_SIZE (GENERIC_BINDING_INFO, pObj, 8) - TEST_FIELD_ALIGN (GENERIC_BINDING_INFO, pObj, 8) - TEST_FIELD_OFFSET(GENERIC_BINDING_INFO, pObj, 0) - TEST_FIELD_SIZE (GENERIC_BINDING_INFO, Size, 4) - TEST_FIELD_ALIGN (GENERIC_BINDING_INFO, Size, 4) - TEST_FIELD_OFFSET(GENERIC_BINDING_INFO, Size, 8) -} - -static void test_pack_GENERIC_BINDING_ROUTINE_PAIR(void) -{ - /* GENERIC_BINDING_ROUTINE_PAIR */ -} - -static void test_pack_MALLOC_FREE_STRUCT(void) -{ - /* MALLOC_FREE_STRUCT */ -} - -static void test_pack_MIDL_FORMAT_STRING(void) -{ - /* MIDL_FORMAT_STRING */ - TEST_FIELD_SIZE (MIDL_FORMAT_STRING, Pad, 2) - TEST_FIELD_ALIGN (MIDL_FORMAT_STRING, Pad, 2) - TEST_FIELD_OFFSET(MIDL_FORMAT_STRING, Pad, 0) -} - -static void test_pack_MIDL_SERVER_INFO(void) -{ - /* MIDL_SERVER_INFO */ - TEST_TYPE_SIZE (MIDL_SERVER_INFO, 64) - TEST_TYPE_ALIGN (MIDL_SERVER_INFO, 8) - TEST_FIELD_SIZE (MIDL_SERVER_INFO, pStubDesc, 8) - TEST_FIELD_ALIGN (MIDL_SERVER_INFO, pStubDesc, 8) - TEST_FIELD_OFFSET(MIDL_SERVER_INFO, pStubDesc, 0) - TEST_FIELD_SIZE (MIDL_SERVER_INFO, DispatchTable, 8) - TEST_FIELD_ALIGN (MIDL_SERVER_INFO, DispatchTable, 8) - TEST_FIELD_OFFSET(MIDL_SERVER_INFO, DispatchTable, 8) - TEST_FIELD_SIZE (MIDL_SERVER_INFO, ProcString, 8) - TEST_FIELD_ALIGN (MIDL_SERVER_INFO, ProcString, 8) - TEST_FIELD_OFFSET(MIDL_SERVER_INFO, ProcString, 16) - TEST_FIELD_SIZE (MIDL_SERVER_INFO, FmtStringOffset, 8) - TEST_FIELD_ALIGN (MIDL_SERVER_INFO, FmtStringOffset, 8) - TEST_FIELD_OFFSET(MIDL_SERVER_INFO, FmtStringOffset, 24) - TEST_FIELD_SIZE (MIDL_SERVER_INFO, ThunkTable, 8) - TEST_FIELD_ALIGN (MIDL_SERVER_INFO, ThunkTable, 8) - TEST_FIELD_OFFSET(MIDL_SERVER_INFO, ThunkTable, 32) - TEST_FIELD_SIZE (MIDL_SERVER_INFO, pTransferSyntax, 8) - TEST_FIELD_ALIGN (MIDL_SERVER_INFO, pTransferSyntax, 8) - TEST_FIELD_OFFSET(MIDL_SERVER_INFO, pTransferSyntax, 40) - TEST_FIELD_SIZE (MIDL_SERVER_INFO, nCount, 8) - TEST_FIELD_ALIGN (MIDL_SERVER_INFO, nCount, 8) - TEST_FIELD_OFFSET(MIDL_SERVER_INFO, nCount, 48) - TEST_FIELD_SIZE (MIDL_SERVER_INFO, pSyntaxInfo, 8) - TEST_FIELD_ALIGN (MIDL_SERVER_INFO, pSyntaxInfo, 8) - TEST_FIELD_OFFSET(MIDL_SERVER_INFO, pSyntaxInfo, 56) -} - -static void test_pack_MIDL_STUB_DESC(void) -{ - /* MIDL_STUB_DESC */ - TEST_FIELD_SIZE (MIDL_STUB_DESC, RpcInterfaceInformation, 8) - TEST_FIELD_ALIGN (MIDL_STUB_DESC, RpcInterfaceInformation, 8) - TEST_FIELD_OFFSET(MIDL_STUB_DESC, RpcInterfaceInformation, 0) -} - -static void test_pack_MIDL_STUB_MESSAGE(void) -{ - /* MIDL_STUB_MESSAGE */ - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, RpcMsg, 8) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, RpcMsg, 8) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, RpcMsg, 0) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, Buffer, 8) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, Buffer, 8) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, Buffer, 8) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, BufferStart, 8) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferStart, 8) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferStart, 16) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, BufferEnd, 8) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferEnd, 8) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferEnd, 24) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, BufferMark, 8) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferMark, 8) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferMark, 32) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, BufferLength, 4) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferLength, 4) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferLength, 40) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, MemorySize, 4) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, MemorySize, 4) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, MemorySize, 44) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, Memory, 8) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, Memory, 8) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, Memory, 48) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, ReuseBuffer, 4) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, ReuseBuffer, 4) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, ReuseBuffer, 60) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, pAllocAllNodesContext, 8) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, pAllocAllNodesContext, 8) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, pAllocAllNodesContext, 64) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, pPointerQueueState, 8) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, pPointerQueueState, 8) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, pPointerQueueState, 72) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, IgnoreEmbeddedPointers, 4) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, IgnoreEmbeddedPointers, 4) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, IgnoreEmbeddedPointers, 80) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, PointerBufferMark, 8) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, PointerBufferMark, 8) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, PointerBufferMark, 88) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, CorrDespIncrement, 1) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, CorrDespIncrement, 1) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, CorrDespIncrement, 96) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, uFlags, 1) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, uFlags, 1) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, uFlags, 97) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, MaxCount, 8) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, MaxCount, 8) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, MaxCount, 104) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, Offset, 4) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, Offset, 4) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, Offset, 112) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, ActualCount, 4) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, ActualCount, 4) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, ActualCount, 116) -} - -static void test_pack_MIDL_STUBLESS_PROXY_INFO(void) -{ - /* MIDL_STUBLESS_PROXY_INFO */ - TEST_TYPE_SIZE (MIDL_STUBLESS_PROXY_INFO, 48) - TEST_TYPE_ALIGN (MIDL_STUBLESS_PROXY_INFO, 8) - TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, pStubDesc, 8) - TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, pStubDesc, 8) - TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, pStubDesc, 0) - TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, ProcFormatString, 8) - TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, ProcFormatString, 8) - TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, ProcFormatString, 8) - TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, FormatStringOffset, 8) - TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, FormatStringOffset, 8) - TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, FormatStringOffset, 16) - TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, pTransferSyntax, 8) - TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, pTransferSyntax, 8) - TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, pTransferSyntax, 24) - TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, nCount, 8) - TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, nCount, 8) - TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, nCount, 32) - TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, pSyntaxInfo, 8) - TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, pSyntaxInfo, 8) - TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, pSyntaxInfo, 40) -} - -static void test_pack_MIDL_SYNTAX_INFO(void) -{ - /* MIDL_SYNTAX_INFO */ - TEST_TYPE_SIZE (MIDL_SYNTAX_INFO, 80) - TEST_TYPE_ALIGN (MIDL_SYNTAX_INFO, 8) - TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, TransferSyntax, 20) - TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, TransferSyntax, 4) - TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, TransferSyntax, 0) - TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, DispatchTable, 8) - TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, DispatchTable, 8) - TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, DispatchTable, 24) - TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, ProcString, 8) - TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, ProcString, 8) - TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, ProcString, 32) - TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, FmtStringOffset, 8) - TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, FmtStringOffset, 8) - TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, FmtStringOffset, 40) - TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, TypeString, 8) - TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, TypeString, 8) - TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, TypeString, 48) - TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, aUserMarshalQuadruple, 8) - TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, aUserMarshalQuadruple, 8) - TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, aUserMarshalQuadruple, 56) - TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, pReserved1, 8) - TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, pReserved1, 8) - TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, pReserved1, 64) - TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, pReserved2, 8) - TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, pReserved2, 8) - TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, pReserved2, 72) -} - -static void test_pack_NDR_CCONTEXT(void) -{ - /* NDR_CCONTEXT */ - TEST_TYPE_SIZE (NDR_CCONTEXT, 8) - TEST_TYPE_ALIGN (NDR_CCONTEXT, 8) -} - -static void test_pack_NDR_NOTIFY_ROUTINE(void) -{ - /* NDR_NOTIFY_ROUTINE */ -} - -static void test_pack_NDR_NOTIFY2_ROUTINE(void) -{ - /* NDR_NOTIFY2_ROUTINE */ -} - -static void test_pack_NDR_RUNDOWN(void) -{ - /* NDR_RUNDOWN */ -} - -static void test_pack_NDR_SCONTEXT(void) -{ - /* NDR_SCONTEXT */ - TEST_TYPE_SIZE (NDR_SCONTEXT, 8) - TEST_TYPE_ALIGN (NDR_SCONTEXT, 8) -} - -static void test_pack_NDR_USER_MARSHAL_INFO(void) -{ - /* NDR_USER_MARSHAL_INFO */ - TEST_FIELD_SIZE (NDR_USER_MARSHAL_INFO, InformationLevel, 4) - TEST_FIELD_ALIGN (NDR_USER_MARSHAL_INFO, InformationLevel, 4) - TEST_FIELD_OFFSET(NDR_USER_MARSHAL_INFO, InformationLevel, 0) -} - -static void test_pack_NDR_USER_MARSHAL_INFO_LEVEL1(void) -{ - /* NDR_USER_MARSHAL_INFO_LEVEL1 */ - TEST_FIELD_SIZE (NDR_USER_MARSHAL_INFO_LEVEL1, Buffer, 8) - TEST_FIELD_ALIGN (NDR_USER_MARSHAL_INFO_LEVEL1, Buffer, 8) - TEST_FIELD_OFFSET(NDR_USER_MARSHAL_INFO_LEVEL1, Buffer, 0) - TEST_FIELD_SIZE (NDR_USER_MARSHAL_INFO_LEVEL1, BufferSize, 4) - TEST_FIELD_ALIGN (NDR_USER_MARSHAL_INFO_LEVEL1, BufferSize, 4) - TEST_FIELD_OFFSET(NDR_USER_MARSHAL_INFO_LEVEL1, BufferSize, 8) -} - -static void test_pack_PARRAY_INFO(void) -{ - /* PARRAY_INFO */ - TEST_TYPE_SIZE (PARRAY_INFO, 8) - TEST_TYPE_ALIGN (PARRAY_INFO, 8) - TEST_TARGET_SIZE (PARRAY_INFO, 48) - TEST_TARGET_ALIGN(PARRAY_INFO, 8) -} - -static void test_pack_PFORMAT_STRING(void) -{ - /* PFORMAT_STRING */ - TEST_TYPE_SIZE (PFORMAT_STRING, 8) - TEST_TYPE_ALIGN (PFORMAT_STRING, 8) -} - -static void test_pack_PFULL_PTR_TO_REFID_ELEMENT(void) -{ - /* PFULL_PTR_TO_REFID_ELEMENT */ - TEST_TYPE_SIZE (PFULL_PTR_TO_REFID_ELEMENT, 8) - TEST_TYPE_ALIGN (PFULL_PTR_TO_REFID_ELEMENT, 8) - TEST_TARGET_SIZE (PFULL_PTR_TO_REFID_ELEMENT, 24) - TEST_TARGET_ALIGN(PFULL_PTR_TO_REFID_ELEMENT, 8) -} - -static void test_pack_PFULL_PTR_XLAT_TABLES(void) -{ - /* PFULL_PTR_XLAT_TABLES */ - TEST_TYPE_SIZE (PFULL_PTR_XLAT_TABLES, 8) - TEST_TYPE_ALIGN (PFULL_PTR_XLAT_TABLES, 8) -} - -static void test_pack_PGENERIC_BINDING_INFO(void) -{ - /* PGENERIC_BINDING_INFO */ - TEST_TYPE_SIZE (PGENERIC_BINDING_INFO, 8) - TEST_TYPE_ALIGN (PGENERIC_BINDING_INFO, 8) -} - -static void test_pack_PGENERIC_BINDING_ROUTINE_PAIR(void) -{ - /* PGENERIC_BINDING_ROUTINE_PAIR */ - TEST_TYPE_SIZE (PGENERIC_BINDING_ROUTINE_PAIR, 8) - TEST_TYPE_ALIGN (PGENERIC_BINDING_ROUTINE_PAIR, 8) -} - -static void test_pack_PMIDL_SERVER_INFO(void) -{ - /* PMIDL_SERVER_INFO */ - TEST_TYPE_SIZE (PMIDL_SERVER_INFO, 8) - TEST_TYPE_ALIGN (PMIDL_SERVER_INFO, 8) - TEST_TARGET_SIZE (PMIDL_SERVER_INFO, 64) - TEST_TARGET_ALIGN(PMIDL_SERVER_INFO, 8) -} - -static void test_pack_PMIDL_STUB_DESC(void) -{ - /* PMIDL_STUB_DESC */ - TEST_TYPE_SIZE (PMIDL_STUB_DESC, 8) - TEST_TYPE_ALIGN (PMIDL_STUB_DESC, 8) -} - -static void test_pack_PMIDL_STUB_MESSAGE(void) -{ - /* PMIDL_STUB_MESSAGE */ - TEST_TYPE_SIZE (PMIDL_STUB_MESSAGE, 8) - TEST_TYPE_ALIGN (PMIDL_STUB_MESSAGE, 8) -} - -static void test_pack_PMIDL_STUBLESS_PROXY_INFO(void) -{ - /* PMIDL_STUBLESS_PROXY_INFO */ - TEST_TYPE_SIZE (PMIDL_STUBLESS_PROXY_INFO, 8) - TEST_TYPE_ALIGN (PMIDL_STUBLESS_PROXY_INFO, 8) - TEST_TARGET_SIZE (PMIDL_STUBLESS_PROXY_INFO, 48) - TEST_TARGET_ALIGN(PMIDL_STUBLESS_PROXY_INFO, 8) -} - -static void test_pack_PMIDL_SYNTAX_INFO(void) -{ - /* PMIDL_SYNTAX_INFO */ - TEST_TYPE_SIZE (PMIDL_SYNTAX_INFO, 8) - TEST_TYPE_ALIGN (PMIDL_SYNTAX_INFO, 8) - TEST_TARGET_SIZE (PMIDL_SYNTAX_INFO, 80) - TEST_TARGET_ALIGN(PMIDL_SYNTAX_INFO, 8) -} - -static void test_pack_PNDR_ASYNC_MESSAGE(void) -{ - /* PNDR_ASYNC_MESSAGE */ - TEST_TYPE_SIZE (PNDR_ASYNC_MESSAGE, 8) - TEST_TYPE_ALIGN (PNDR_ASYNC_MESSAGE, 8) -} - -static void test_pack_PNDR_CORRELATION_INFO(void) -{ - /* PNDR_CORRELATION_INFO */ - TEST_TYPE_SIZE (PNDR_CORRELATION_INFO, 8) - TEST_TYPE_ALIGN (PNDR_CORRELATION_INFO, 8) -} - -static void test_pack_PSCONTEXT_QUEUE(void) -{ - /* PSCONTEXT_QUEUE */ - TEST_TYPE_SIZE (PSCONTEXT_QUEUE, 8) - TEST_TYPE_ALIGN (PSCONTEXT_QUEUE, 8) - TEST_TARGET_SIZE (PSCONTEXT_QUEUE, 16) - TEST_TARGET_ALIGN(PSCONTEXT_QUEUE, 8) -} - -static void test_pack_PXMIT_ROUTINE_QUINTUPLE(void) -{ - /* PXMIT_ROUTINE_QUINTUPLE */ - TEST_TYPE_SIZE (PXMIT_ROUTINE_QUINTUPLE, 8) - TEST_TYPE_ALIGN (PXMIT_ROUTINE_QUINTUPLE, 8) -} - -static void test_pack_SCONTEXT_QUEUE(void) -{ - /* SCONTEXT_QUEUE */ - TEST_TYPE_SIZE (SCONTEXT_QUEUE, 16) - TEST_TYPE_ALIGN (SCONTEXT_QUEUE, 8) - TEST_FIELD_SIZE (SCONTEXT_QUEUE, NumberOfObjects, 4) - TEST_FIELD_ALIGN (SCONTEXT_QUEUE, NumberOfObjects, 4) - TEST_FIELD_OFFSET(SCONTEXT_QUEUE, NumberOfObjects, 0) - TEST_FIELD_SIZE (SCONTEXT_QUEUE, ArrayOfObjects, 8) - TEST_FIELD_ALIGN (SCONTEXT_QUEUE, ArrayOfObjects, 8) - TEST_FIELD_OFFSET(SCONTEXT_QUEUE, ArrayOfObjects, 8) -} - -static void test_pack_SERVER_ROUTINE(void) -{ - /* SERVER_ROUTINE */ -} - -static void test_pack_STUB_THUNK(void) -{ - /* STUB_THUNK */ -} - -static void test_pack_USER_MARSHAL_CB(void) -{ - /* USER_MARSHAL_CB */ - TEST_FIELD_SIZE (USER_MARSHAL_CB, Flags, 4) - TEST_FIELD_ALIGN (USER_MARSHAL_CB, Flags, 4) - TEST_FIELD_OFFSET(USER_MARSHAL_CB, Flags, 0) - TEST_FIELD_SIZE (USER_MARSHAL_CB, pStubMsg, 8) - TEST_FIELD_ALIGN (USER_MARSHAL_CB, pStubMsg, 8) - TEST_FIELD_OFFSET(USER_MARSHAL_CB, pStubMsg, 8) - TEST_FIELD_SIZE (USER_MARSHAL_CB, pReserve, 8) - TEST_FIELD_ALIGN (USER_MARSHAL_CB, pReserve, 8) - TEST_FIELD_OFFSET(USER_MARSHAL_CB, pReserve, 16) - TEST_FIELD_SIZE (USER_MARSHAL_CB, Signature, 4) - TEST_FIELD_ALIGN (USER_MARSHAL_CB, Signature, 4) - TEST_FIELD_OFFSET(USER_MARSHAL_CB, Signature, 24) -} - -static void test_pack_USER_MARSHAL_FREEING_ROUTINE(void) -{ - /* USER_MARSHAL_FREEING_ROUTINE */ -} - -static void test_pack_USER_MARSHAL_MARSHALLING_ROUTINE(void) -{ - /* USER_MARSHAL_MARSHALLING_ROUTINE */ -} - -static void test_pack_USER_MARSHAL_ROUTINE_QUADRUPLE(void) -{ - /* USER_MARSHAL_ROUTINE_QUADRUPLE */ -} - -static void test_pack_USER_MARSHAL_SIZING_ROUTINE(void) -{ - /* USER_MARSHAL_SIZING_ROUTINE */ -} - -static void test_pack_USER_MARSHAL_UNMARSHALLING_ROUTINE(void) -{ - /* USER_MARSHAL_UNMARSHALLING_ROUTINE */ -} - -static void test_pack_XMIT_HELPER_ROUTINE(void) -{ - /* XMIT_HELPER_ROUTINE */ -} - -static void test_pack_XMIT_ROUTINE_QUINTUPLE(void) -{ - /* XMIT_ROUTINE_QUINTUPLE */ -} - -static void test_pack_PRPC_STUB_FUNCTION(void) -{ - /* PRPC_STUB_FUNCTION */ -} - -#else /* _WIN64 */ - -static void test_pack_I_RPC_HANDLE(void) -{ - /* I_RPC_HANDLE */ - TEST_TYPE_SIZE (I_RPC_HANDLE, 4) - TEST_TYPE_ALIGN (I_RPC_HANDLE, 4) -} - -static void test_pack_RPC_STATUS(void) -{ - /* RPC_STATUS */ - TEST_TYPE_SIZE (RPC_STATUS, 4) - TEST_TYPE_ALIGN (RPC_STATUS, 4) -} - -static void test_pack_PRPC_POLICY(void) -{ - /* PRPC_POLICY */ - TEST_TYPE_SIZE (PRPC_POLICY, 4) - TEST_TYPE_ALIGN (PRPC_POLICY, 4) - TEST_TARGET_SIZE (PRPC_POLICY, 12) - TEST_TARGET_ALIGN(PRPC_POLICY, 4) -} - -static void test_pack_RPC_AUTH_IDENTITY_HANDLE(void) -{ - /* RPC_AUTH_IDENTITY_HANDLE */ - TEST_TYPE_SIZE (RPC_AUTH_IDENTITY_HANDLE, 4) - TEST_TYPE_ALIGN (RPC_AUTH_IDENTITY_HANDLE, 4) -} - -static void test_pack_RPC_AUTH_KEY_RETRIEVAL_FN(void) -{ - /* RPC_AUTH_KEY_RETRIEVAL_FN */ -} - -static void test_pack_RPC_AUTHZ_HANDLE(void) -{ - /* RPC_AUTHZ_HANDLE */ - TEST_TYPE_SIZE (RPC_AUTHZ_HANDLE, 4) - TEST_TYPE_ALIGN (RPC_AUTHZ_HANDLE, 4) -} - -static void test_pack_RPC_BINDING_HANDLE(void) -{ - /* RPC_BINDING_HANDLE */ - TEST_TYPE_SIZE (RPC_BINDING_HANDLE, 4) - TEST_TYPE_ALIGN (RPC_BINDING_HANDLE, 4) -} - -static void test_pack_RPC_BINDING_VECTOR(void) -{ - /* RPC_BINDING_VECTOR */ - TEST_TYPE_SIZE (RPC_BINDING_VECTOR, 8) - TEST_TYPE_ALIGN (RPC_BINDING_VECTOR, 4) - TEST_FIELD_SIZE (RPC_BINDING_VECTOR, Count, 4) - TEST_FIELD_ALIGN (RPC_BINDING_VECTOR, Count, 4) - TEST_FIELD_OFFSET(RPC_BINDING_VECTOR, Count, 0) - TEST_FIELD_SIZE (RPC_BINDING_VECTOR, BindingH, 4) - TEST_FIELD_ALIGN (RPC_BINDING_VECTOR, BindingH, 4) - TEST_FIELD_OFFSET(RPC_BINDING_VECTOR, BindingH, 4) -} - -static void test_pack_RPC_IF_HANDLE(void) -{ - /* RPC_IF_HANDLE */ - TEST_TYPE_SIZE (RPC_IF_HANDLE, 4) - TEST_TYPE_ALIGN (RPC_IF_HANDLE, 4) -} - -static void test_pack_RPC_IF_ID(void) -{ - /* RPC_IF_ID */ - TEST_TYPE_SIZE (RPC_IF_ID, 20) - TEST_TYPE_ALIGN (RPC_IF_ID, 4) - TEST_FIELD_SIZE (RPC_IF_ID, Uuid, 16) - TEST_FIELD_ALIGN (RPC_IF_ID, Uuid, 4) - TEST_FIELD_OFFSET(RPC_IF_ID, Uuid, 0) - TEST_FIELD_SIZE (RPC_IF_ID, VersMajor, 2) - TEST_FIELD_ALIGN (RPC_IF_ID, VersMajor, 2) - TEST_FIELD_OFFSET(RPC_IF_ID, VersMajor, 16) - TEST_FIELD_SIZE (RPC_IF_ID, VersMinor, 2) - TEST_FIELD_ALIGN (RPC_IF_ID, VersMinor, 2) - TEST_FIELD_OFFSET(RPC_IF_ID, VersMinor, 18) -} - -static void test_pack_RPC_POLICY(void) -{ - /* RPC_POLICY */ - TEST_TYPE_SIZE (RPC_POLICY, 12) - TEST_TYPE_ALIGN (RPC_POLICY, 4) - TEST_FIELD_SIZE (RPC_POLICY, Length, 4) - TEST_FIELD_ALIGN (RPC_POLICY, Length, 4) - TEST_FIELD_OFFSET(RPC_POLICY, Length, 0) - TEST_FIELD_SIZE (RPC_POLICY, EndpointFlags, 4) - TEST_FIELD_ALIGN (RPC_POLICY, EndpointFlags, 4) - TEST_FIELD_OFFSET(RPC_POLICY, EndpointFlags, 4) - TEST_FIELD_SIZE (RPC_POLICY, NICFlags, 4) - TEST_FIELD_ALIGN (RPC_POLICY, NICFlags, 4) - TEST_FIELD_OFFSET(RPC_POLICY, NICFlags, 8) -} - -static void test_pack_UUID_VECTOR(void) -{ - /* UUID_VECTOR */ - TEST_TYPE_SIZE (UUID_VECTOR, 8) - TEST_TYPE_ALIGN (UUID_VECTOR, 4) - TEST_FIELD_SIZE (UUID_VECTOR, Count, 4) - TEST_FIELD_ALIGN (UUID_VECTOR, Count, 4) - TEST_FIELD_OFFSET(UUID_VECTOR, Count, 0) - TEST_FIELD_SIZE (UUID_VECTOR, Uuid, 4) - TEST_FIELD_ALIGN (UUID_VECTOR, Uuid, 4) - TEST_FIELD_OFFSET(UUID_VECTOR, Uuid, 4) -} - -static void test_pack_PRPC_CLIENT_INTERFACE(void) -{ - /* PRPC_CLIENT_INTERFACE */ - TEST_TYPE_SIZE (PRPC_CLIENT_INTERFACE, 4) - TEST_TYPE_ALIGN (PRPC_CLIENT_INTERFACE, 4) - TEST_TARGET_SIZE (PRPC_CLIENT_INTERFACE, 68) - TEST_TARGET_ALIGN(PRPC_CLIENT_INTERFACE, 4) -} - -static void test_pack_PRPC_DISPATCH_TABLE(void) -{ - /* PRPC_DISPATCH_TABLE */ - TEST_TYPE_SIZE (PRPC_DISPATCH_TABLE, 4) - TEST_TYPE_ALIGN (PRPC_DISPATCH_TABLE, 4) - TEST_TARGET_SIZE (PRPC_DISPATCH_TABLE, 12) - TEST_TARGET_ALIGN(PRPC_DISPATCH_TABLE, 4) -} - -static void test_pack_PRPC_MESSAGE(void) -{ - /* PRPC_MESSAGE */ - TEST_TYPE_SIZE (PRPC_MESSAGE, 4) - TEST_TYPE_ALIGN (PRPC_MESSAGE, 4) - TEST_TARGET_SIZE (PRPC_MESSAGE, 44) - TEST_TARGET_ALIGN(PRPC_MESSAGE, 4) -} - -static void test_pack_PRPC_PROTSEQ_ENDPOINT(void) -{ - /* PRPC_PROTSEQ_ENDPOINT */ - TEST_TYPE_SIZE (PRPC_PROTSEQ_ENDPOINT, 4) - TEST_TYPE_ALIGN (PRPC_PROTSEQ_ENDPOINT, 4) - TEST_TARGET_SIZE (PRPC_PROTSEQ_ENDPOINT, 8) - TEST_TARGET_ALIGN(PRPC_PROTSEQ_ENDPOINT, 4) -} - -static void test_pack_PRPC_SERVER_INTERFACE(void) -{ - /* PRPC_SERVER_INTERFACE */ - TEST_TYPE_SIZE (PRPC_SERVER_INTERFACE, 4) - TEST_TYPE_ALIGN (PRPC_SERVER_INTERFACE, 4) - TEST_TARGET_SIZE (PRPC_SERVER_INTERFACE, 68) - TEST_TARGET_ALIGN(PRPC_SERVER_INTERFACE, 4) -} - -static void test_pack_PRPC_SYNTAX_IDENTIFIER(void) -{ - /* PRPC_SYNTAX_IDENTIFIER */ - TEST_TYPE_SIZE (PRPC_SYNTAX_IDENTIFIER, 4) - TEST_TYPE_ALIGN (PRPC_SYNTAX_IDENTIFIER, 4) - TEST_TARGET_SIZE (PRPC_SYNTAX_IDENTIFIER, 20) - TEST_TARGET_ALIGN(PRPC_SYNTAX_IDENTIFIER, 4) -} - -static void test_pack_RPC_CLIENT_INTERFACE(void) -{ - /* RPC_CLIENT_INTERFACE */ - TEST_TYPE_SIZE (RPC_CLIENT_INTERFACE, 68) - TEST_TYPE_ALIGN (RPC_CLIENT_INTERFACE, 4) - TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, Length, 4) - TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, Length, 4) - TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, Length, 0) - TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, InterfaceId, 20) - TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, InterfaceId, 4) - TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, InterfaceId, 4) - TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, TransferSyntax, 20) - TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, TransferSyntax, 4) - TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, TransferSyntax, 24) - TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, DispatchTable, 4) - TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, DispatchTable, 4) - TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, DispatchTable, 44) - TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, RpcProtseqEndpointCount, 4) - TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, RpcProtseqEndpointCount, 4) - TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, RpcProtseqEndpointCount, 48) - TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, RpcProtseqEndpoint, 4) - TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, RpcProtseqEndpoint, 4) - TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, RpcProtseqEndpoint, 52) - TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, Reserved, 4) - TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, Reserved, 4) - TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, Reserved, 56) - TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, InterpreterInfo, 4) - TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, InterpreterInfo, 4) - TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, InterpreterInfo, 60) - TEST_FIELD_SIZE (RPC_CLIENT_INTERFACE, Flags, 4) - TEST_FIELD_ALIGN (RPC_CLIENT_INTERFACE, Flags, 4) - TEST_FIELD_OFFSET(RPC_CLIENT_INTERFACE, Flags, 64) -} - -static void test_pack_RPC_DISPATCH_FUNCTION(void) -{ - /* RPC_DISPATCH_FUNCTION */ -} - -static void test_pack_RPC_DISPATCH_TABLE(void) -{ - /* RPC_DISPATCH_TABLE */ - TEST_TYPE_SIZE (RPC_DISPATCH_TABLE, 12) - TEST_TYPE_ALIGN (RPC_DISPATCH_TABLE, 4) - TEST_FIELD_SIZE (RPC_DISPATCH_TABLE, DispatchTableCount, 4) - TEST_FIELD_ALIGN (RPC_DISPATCH_TABLE, DispatchTableCount, 4) - TEST_FIELD_OFFSET(RPC_DISPATCH_TABLE, DispatchTableCount, 0) - TEST_FIELD_SIZE (RPC_DISPATCH_TABLE, DispatchTable, 4) - TEST_FIELD_ALIGN (RPC_DISPATCH_TABLE, DispatchTable, 4) - TEST_FIELD_OFFSET(RPC_DISPATCH_TABLE, DispatchTable, 4) - TEST_FIELD_SIZE (RPC_DISPATCH_TABLE, Reserved, 4) - TEST_FIELD_ALIGN (RPC_DISPATCH_TABLE, Reserved, 4) - TEST_FIELD_OFFSET(RPC_DISPATCH_TABLE, Reserved, 8) -} - -static void test_pack_RPC_MESSAGE(void) -{ - /* RPC_MESSAGE */ - TEST_TYPE_SIZE (RPC_MESSAGE, 44) - TEST_TYPE_ALIGN (RPC_MESSAGE, 4) - TEST_FIELD_SIZE (RPC_MESSAGE, Handle, 4) - TEST_FIELD_ALIGN (RPC_MESSAGE, Handle, 4) - TEST_FIELD_OFFSET(RPC_MESSAGE, Handle, 0) - TEST_FIELD_SIZE (RPC_MESSAGE, DataRepresentation, 4) - TEST_FIELD_ALIGN (RPC_MESSAGE, DataRepresentation, 4) - TEST_FIELD_OFFSET(RPC_MESSAGE, DataRepresentation, 4) - TEST_FIELD_SIZE (RPC_MESSAGE, Buffer, 4) - TEST_FIELD_ALIGN (RPC_MESSAGE, Buffer, 4) - TEST_FIELD_OFFSET(RPC_MESSAGE, Buffer, 8) - TEST_FIELD_SIZE (RPC_MESSAGE, BufferLength, 4) - TEST_FIELD_ALIGN (RPC_MESSAGE, BufferLength, 4) - TEST_FIELD_OFFSET(RPC_MESSAGE, BufferLength, 12) - TEST_FIELD_SIZE (RPC_MESSAGE, ProcNum, 4) - TEST_FIELD_ALIGN (RPC_MESSAGE, ProcNum, 4) - TEST_FIELD_OFFSET(RPC_MESSAGE, ProcNum, 16) - TEST_FIELD_SIZE (RPC_MESSAGE, TransferSyntax, 4) - TEST_FIELD_ALIGN (RPC_MESSAGE, TransferSyntax, 4) - TEST_FIELD_OFFSET(RPC_MESSAGE, TransferSyntax, 20) - TEST_FIELD_SIZE (RPC_MESSAGE, RpcInterfaceInformation, 4) - TEST_FIELD_ALIGN (RPC_MESSAGE, RpcInterfaceInformation, 4) - TEST_FIELD_OFFSET(RPC_MESSAGE, RpcInterfaceInformation, 24) - TEST_FIELD_SIZE (RPC_MESSAGE, ReservedForRuntime, 4) - TEST_FIELD_ALIGN (RPC_MESSAGE, ReservedForRuntime, 4) - TEST_FIELD_OFFSET(RPC_MESSAGE, ReservedForRuntime, 28) - TEST_FIELD_SIZE (RPC_MESSAGE, ManagerEpv, 4) - TEST_FIELD_ALIGN (RPC_MESSAGE, ManagerEpv, 4) - TEST_FIELD_OFFSET(RPC_MESSAGE, ManagerEpv, 32) - TEST_FIELD_SIZE (RPC_MESSAGE, ImportContext, 4) - TEST_FIELD_ALIGN (RPC_MESSAGE, ImportContext, 4) - TEST_FIELD_OFFSET(RPC_MESSAGE, ImportContext, 36) - TEST_FIELD_SIZE (RPC_MESSAGE, RpcFlags, 4) - TEST_FIELD_ALIGN (RPC_MESSAGE, RpcFlags, 4) - TEST_FIELD_OFFSET(RPC_MESSAGE, RpcFlags, 40) -} - -static void test_pack_RPC_PROTSEQ_ENDPOINT(void) -{ - /* RPC_PROTSEQ_ENDPOINT */ - TEST_TYPE_SIZE (RPC_PROTSEQ_ENDPOINT, 8) - TEST_TYPE_ALIGN (RPC_PROTSEQ_ENDPOINT, 4) - TEST_FIELD_SIZE (RPC_PROTSEQ_ENDPOINT, RpcProtocolSequence, 4) - TEST_FIELD_ALIGN (RPC_PROTSEQ_ENDPOINT, RpcProtocolSequence, 4) - TEST_FIELD_OFFSET(RPC_PROTSEQ_ENDPOINT, RpcProtocolSequence, 0) - TEST_FIELD_SIZE (RPC_PROTSEQ_ENDPOINT, Endpoint, 4) - TEST_FIELD_ALIGN (RPC_PROTSEQ_ENDPOINT, Endpoint, 4) - TEST_FIELD_OFFSET(RPC_PROTSEQ_ENDPOINT, Endpoint, 4) -} - -static void test_pack_RPC_SERVER_INTERFACE(void) -{ - /* RPC_SERVER_INTERFACE */ - TEST_TYPE_SIZE (RPC_SERVER_INTERFACE, 68) - TEST_TYPE_ALIGN (RPC_SERVER_INTERFACE, 4) - TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, Length, 4) - TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, Length, 4) - TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, Length, 0) - TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, InterfaceId, 20) - TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, InterfaceId, 4) - TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, InterfaceId, 4) - TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, TransferSyntax, 20) - TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, TransferSyntax, 4) - TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, TransferSyntax, 24) - TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, DispatchTable, 4) - TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, DispatchTable, 4) - TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, DispatchTable, 44) - TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, RpcProtseqEndpointCount, 4) - TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, RpcProtseqEndpointCount, 4) - TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, RpcProtseqEndpointCount, 48) - TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, RpcProtseqEndpoint, 4) - TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, RpcProtseqEndpoint, 4) - TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, RpcProtseqEndpoint, 52) - TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, DefaultManagerEpv, 4) - TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, DefaultManagerEpv, 4) - TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, DefaultManagerEpv, 56) - TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, InterpreterInfo, 4) - TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, InterpreterInfo, 4) - TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, InterpreterInfo, 60) - TEST_FIELD_SIZE (RPC_SERVER_INTERFACE, Flags, 4) - TEST_FIELD_ALIGN (RPC_SERVER_INTERFACE, Flags, 4) - TEST_FIELD_OFFSET(RPC_SERVER_INTERFACE, Flags, 64) -} - -static void test_pack_RPC_SYNTAX_IDENTIFIER(void) -{ - /* RPC_SYNTAX_IDENTIFIER */ - TEST_TYPE_SIZE (RPC_SYNTAX_IDENTIFIER, 20) - TEST_TYPE_ALIGN (RPC_SYNTAX_IDENTIFIER, 4) - TEST_FIELD_SIZE (RPC_SYNTAX_IDENTIFIER, SyntaxGUID, 16) - TEST_FIELD_ALIGN (RPC_SYNTAX_IDENTIFIER, SyntaxGUID, 4) - TEST_FIELD_OFFSET(RPC_SYNTAX_IDENTIFIER, SyntaxGUID, 0) - TEST_FIELD_SIZE (RPC_SYNTAX_IDENTIFIER, SyntaxVersion, 4) - TEST_FIELD_ALIGN (RPC_SYNTAX_IDENTIFIER, SyntaxVersion, 2) - TEST_FIELD_OFFSET(RPC_SYNTAX_IDENTIFIER, SyntaxVersion, 16) -} - -static void test_pack_RPC_VERSION(void) -{ - /* RPC_VERSION */ - TEST_TYPE_SIZE (RPC_VERSION, 4) - TEST_TYPE_ALIGN (RPC_VERSION, 2) - TEST_FIELD_SIZE (RPC_VERSION, MajorVersion, 2) - TEST_FIELD_ALIGN (RPC_VERSION, MajorVersion, 2) - TEST_FIELD_OFFSET(RPC_VERSION, MajorVersion, 0) - TEST_FIELD_SIZE (RPC_VERSION, MinorVersion, 2) - TEST_FIELD_ALIGN (RPC_VERSION, MinorVersion, 2) - TEST_FIELD_OFFSET(RPC_VERSION, MinorVersion, 2) -} - -static void test_pack_ARRAY_INFO(void) -{ - /* ARRAY_INFO */ - TEST_TYPE_SIZE (ARRAY_INFO, 24) - TEST_TYPE_ALIGN (ARRAY_INFO, 4) - TEST_FIELD_SIZE (ARRAY_INFO, Dimension, 4) - TEST_FIELD_ALIGN (ARRAY_INFO, Dimension, 4) - TEST_FIELD_OFFSET(ARRAY_INFO, Dimension, 0) - TEST_FIELD_SIZE (ARRAY_INFO, BufferConformanceMark, 4) - TEST_FIELD_ALIGN (ARRAY_INFO, BufferConformanceMark, 4) - TEST_FIELD_OFFSET(ARRAY_INFO, BufferConformanceMark, 4) - TEST_FIELD_SIZE (ARRAY_INFO, BufferVarianceMark, 4) - TEST_FIELD_ALIGN (ARRAY_INFO, BufferVarianceMark, 4) - TEST_FIELD_OFFSET(ARRAY_INFO, BufferVarianceMark, 8) - TEST_FIELD_SIZE (ARRAY_INFO, MaxCountArray, 4) - TEST_FIELD_ALIGN (ARRAY_INFO, MaxCountArray, 4) - TEST_FIELD_OFFSET(ARRAY_INFO, MaxCountArray, 12) - TEST_FIELD_SIZE (ARRAY_INFO, OffsetArray, 4) - TEST_FIELD_ALIGN (ARRAY_INFO, OffsetArray, 4) - TEST_FIELD_OFFSET(ARRAY_INFO, OffsetArray, 16) - TEST_FIELD_SIZE (ARRAY_INFO, ActualCountArray, 4) - TEST_FIELD_ALIGN (ARRAY_INFO, ActualCountArray, 4) - TEST_FIELD_OFFSET(ARRAY_INFO, ActualCountArray, 20) -} - -static void test_pack_COMM_FAULT_OFFSETS(void) -{ - /* COMM_FAULT_OFFSETS */ - TEST_TYPE_SIZE (COMM_FAULT_OFFSETS, 4) - TEST_TYPE_ALIGN (COMM_FAULT_OFFSETS, 2) - TEST_FIELD_SIZE (COMM_FAULT_OFFSETS, CommOffset, 2) - TEST_FIELD_ALIGN (COMM_FAULT_OFFSETS, CommOffset, 2) - TEST_FIELD_OFFSET(COMM_FAULT_OFFSETS, CommOffset, 0) - TEST_FIELD_SIZE (COMM_FAULT_OFFSETS, FaultOffset, 2) - TEST_FIELD_ALIGN (COMM_FAULT_OFFSETS, FaultOffset, 2) - TEST_FIELD_OFFSET(COMM_FAULT_OFFSETS, FaultOffset, 2) -} - -static void test_pack_CS_STUB_INFO(void) -{ - /* CS_STUB_INFO */ - TEST_TYPE_SIZE (CS_STUB_INFO, 12) - TEST_TYPE_ALIGN (CS_STUB_INFO, 4) - TEST_FIELD_SIZE (CS_STUB_INFO, WireCodeset, 4) - TEST_FIELD_ALIGN (CS_STUB_INFO, WireCodeset, 4) - TEST_FIELD_OFFSET(CS_STUB_INFO, WireCodeset, 0) - TEST_FIELD_SIZE (CS_STUB_INFO, DesiredReceivingCodeset, 4) - TEST_FIELD_ALIGN (CS_STUB_INFO, DesiredReceivingCodeset, 4) - TEST_FIELD_OFFSET(CS_STUB_INFO, DesiredReceivingCodeset, 4) - TEST_FIELD_SIZE (CS_STUB_INFO, CSArrayInfo, 4) - TEST_FIELD_ALIGN (CS_STUB_INFO, CSArrayInfo, 4) - TEST_FIELD_OFFSET(CS_STUB_INFO, CSArrayInfo, 8) -} - -static void test_pack_EXPR_EVAL(void) -{ - /* EXPR_EVAL */ -} - -static void test_pack_FULL_PTR_TO_REFID_ELEMENT(void) -{ - /* FULL_PTR_TO_REFID_ELEMENT */ - TEST_TYPE_SIZE (FULL_PTR_TO_REFID_ELEMENT, 16) - TEST_TYPE_ALIGN (FULL_PTR_TO_REFID_ELEMENT, 4) - TEST_FIELD_SIZE (FULL_PTR_TO_REFID_ELEMENT, Next, 4) - TEST_FIELD_ALIGN (FULL_PTR_TO_REFID_ELEMENT, Next, 4) - TEST_FIELD_OFFSET(FULL_PTR_TO_REFID_ELEMENT, Next, 0) - TEST_FIELD_SIZE (FULL_PTR_TO_REFID_ELEMENT, Pointer, 4) - TEST_FIELD_ALIGN (FULL_PTR_TO_REFID_ELEMENT, Pointer, 4) - TEST_FIELD_OFFSET(FULL_PTR_TO_REFID_ELEMENT, Pointer, 4) - TEST_FIELD_SIZE (FULL_PTR_TO_REFID_ELEMENT, RefId, 4) - TEST_FIELD_ALIGN (FULL_PTR_TO_REFID_ELEMENT, RefId, 4) - TEST_FIELD_OFFSET(FULL_PTR_TO_REFID_ELEMENT, RefId, 8) - TEST_FIELD_SIZE (FULL_PTR_TO_REFID_ELEMENT, State, 1) - TEST_FIELD_ALIGN (FULL_PTR_TO_REFID_ELEMENT, State, 1) - TEST_FIELD_OFFSET(FULL_PTR_TO_REFID_ELEMENT, State, 12) -} - -static void test_pack_FULL_PTR_XLAT_TABLES(void) -{ - /* FULL_PTR_XLAT_TABLES */ -} - -static void test_pack_GENERIC_BINDING_INFO(void) -{ - /* GENERIC_BINDING_INFO */ - TEST_FIELD_SIZE (GENERIC_BINDING_INFO, pObj, 4) - TEST_FIELD_ALIGN (GENERIC_BINDING_INFO, pObj, 4) - TEST_FIELD_OFFSET(GENERIC_BINDING_INFO, pObj, 0) - TEST_FIELD_SIZE (GENERIC_BINDING_INFO, Size, 4) - TEST_FIELD_ALIGN (GENERIC_BINDING_INFO, Size, 4) - TEST_FIELD_OFFSET(GENERIC_BINDING_INFO, Size, 4) -} - -static void test_pack_GENERIC_BINDING_ROUTINE_PAIR(void) -{ - /* GENERIC_BINDING_ROUTINE_PAIR */ -} - -static void test_pack_MALLOC_FREE_STRUCT(void) -{ - /* MALLOC_FREE_STRUCT */ -} - -static void test_pack_MIDL_FORMAT_STRING(void) -{ - /* MIDL_FORMAT_STRING */ - TEST_FIELD_SIZE (MIDL_FORMAT_STRING, Pad, 2) - TEST_FIELD_ALIGN (MIDL_FORMAT_STRING, Pad, 2) - TEST_FIELD_OFFSET(MIDL_FORMAT_STRING, Pad, 0) -} - -static void test_pack_MIDL_SERVER_INFO(void) -{ - /* MIDL_SERVER_INFO */ - TEST_TYPE_SIZE (MIDL_SERVER_INFO, 32) - TEST_TYPE_ALIGN (MIDL_SERVER_INFO, 4) - TEST_FIELD_SIZE (MIDL_SERVER_INFO, pStubDesc, 4) - TEST_FIELD_ALIGN (MIDL_SERVER_INFO, pStubDesc, 4) - TEST_FIELD_OFFSET(MIDL_SERVER_INFO, pStubDesc, 0) - TEST_FIELD_SIZE (MIDL_SERVER_INFO, DispatchTable, 4) - TEST_FIELD_ALIGN (MIDL_SERVER_INFO, DispatchTable, 4) - TEST_FIELD_OFFSET(MIDL_SERVER_INFO, DispatchTable, 4) - TEST_FIELD_SIZE (MIDL_SERVER_INFO, ProcString, 4) - TEST_FIELD_ALIGN (MIDL_SERVER_INFO, ProcString, 4) - TEST_FIELD_OFFSET(MIDL_SERVER_INFO, ProcString, 8) - TEST_FIELD_SIZE (MIDL_SERVER_INFO, FmtStringOffset, 4) - TEST_FIELD_ALIGN (MIDL_SERVER_INFO, FmtStringOffset, 4) - TEST_FIELD_OFFSET(MIDL_SERVER_INFO, FmtStringOffset, 12) - TEST_FIELD_SIZE (MIDL_SERVER_INFO, ThunkTable, 4) - TEST_FIELD_ALIGN (MIDL_SERVER_INFO, ThunkTable, 4) - TEST_FIELD_OFFSET(MIDL_SERVER_INFO, ThunkTable, 16) - TEST_FIELD_SIZE (MIDL_SERVER_INFO, pTransferSyntax, 4) - TEST_FIELD_ALIGN (MIDL_SERVER_INFO, pTransferSyntax, 4) - TEST_FIELD_OFFSET(MIDL_SERVER_INFO, pTransferSyntax, 20) - TEST_FIELD_SIZE (MIDL_SERVER_INFO, nCount, 4) - TEST_FIELD_ALIGN (MIDL_SERVER_INFO, nCount, 4) - TEST_FIELD_OFFSET(MIDL_SERVER_INFO, nCount, 24) - TEST_FIELD_SIZE (MIDL_SERVER_INFO, pSyntaxInfo, 4) - TEST_FIELD_ALIGN (MIDL_SERVER_INFO, pSyntaxInfo, 4) - TEST_FIELD_OFFSET(MIDL_SERVER_INFO, pSyntaxInfo, 28) -} - -static void test_pack_MIDL_STUB_DESC(void) -{ - /* MIDL_STUB_DESC */ - TEST_FIELD_SIZE (MIDL_STUB_DESC, RpcInterfaceInformation, 4) - TEST_FIELD_ALIGN (MIDL_STUB_DESC, RpcInterfaceInformation, 4) - TEST_FIELD_OFFSET(MIDL_STUB_DESC, RpcInterfaceInformation, 0) -} - -static void test_pack_MIDL_STUB_MESSAGE(void) -{ - /* MIDL_STUB_MESSAGE */ - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, RpcMsg, 4) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, RpcMsg, 4) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, RpcMsg, 0) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, Buffer, 4) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, Buffer, 4) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, Buffer, 4) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, BufferStart, 4) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferStart, 4) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferStart, 8) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, BufferEnd, 4) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferEnd, 4) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferEnd, 12) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, BufferMark, 4) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferMark, 4) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferMark, 16) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, BufferLength, 4) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, BufferLength, 4) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, BufferLength, 20) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, MemorySize, 4) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, MemorySize, 4) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, MemorySize, 24) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, Memory, 4) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, Memory, 4) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, Memory, 28) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, ReuseBuffer, 4) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, ReuseBuffer, 4) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, ReuseBuffer, 36) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, pAllocAllNodesContext, 4) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, pAllocAllNodesContext, 4) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, pAllocAllNodesContext, 40) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, pPointerQueueState, 4) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, pPointerQueueState, 4) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, pPointerQueueState, 44) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, IgnoreEmbeddedPointers, 4) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, IgnoreEmbeddedPointers, 4) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, IgnoreEmbeddedPointers, 48) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, PointerBufferMark, 4) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, PointerBufferMark, 4) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, PointerBufferMark, 52) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, CorrDespIncrement, 1) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, CorrDespIncrement, 1) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, CorrDespIncrement, 56) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, uFlags, 1) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, uFlags, 1) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, uFlags, 57) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, MaxCount, 4) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, MaxCount, 4) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, MaxCount, 60) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, Offset, 4) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, Offset, 4) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, Offset, 64) - TEST_FIELD_SIZE (MIDL_STUB_MESSAGE, ActualCount, 4) - TEST_FIELD_ALIGN (MIDL_STUB_MESSAGE, ActualCount, 4) - TEST_FIELD_OFFSET(MIDL_STUB_MESSAGE, ActualCount, 68) -} - -static void test_pack_MIDL_STUBLESS_PROXY_INFO(void) -{ - /* MIDL_STUBLESS_PROXY_INFO */ - TEST_TYPE_SIZE (MIDL_STUBLESS_PROXY_INFO, 24) - TEST_TYPE_ALIGN (MIDL_STUBLESS_PROXY_INFO, 4) - TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, pStubDesc, 4) - TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, pStubDesc, 4) - TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, pStubDesc, 0) - TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, ProcFormatString, 4) - TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, ProcFormatString, 4) - TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, ProcFormatString, 4) - TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, FormatStringOffset, 4) - TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, FormatStringOffset, 4) - TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, FormatStringOffset, 8) - TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, pTransferSyntax, 4) - TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, pTransferSyntax, 4) - TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, pTransferSyntax, 12) - TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, nCount, 4) - TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, nCount, 4) - TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, nCount, 16) - TEST_FIELD_SIZE (MIDL_STUBLESS_PROXY_INFO, pSyntaxInfo, 4) - TEST_FIELD_ALIGN (MIDL_STUBLESS_PROXY_INFO, pSyntaxInfo, 4) - TEST_FIELD_OFFSET(MIDL_STUBLESS_PROXY_INFO, pSyntaxInfo, 20) -} - -static void test_pack_MIDL_SYNTAX_INFO(void) -{ - /* MIDL_SYNTAX_INFO */ - TEST_TYPE_SIZE (MIDL_SYNTAX_INFO, 48) - TEST_TYPE_ALIGN (MIDL_SYNTAX_INFO, 4) - TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, TransferSyntax, 20) - TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, TransferSyntax, 4) - TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, TransferSyntax, 0) - TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, DispatchTable, 4) - TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, DispatchTable, 4) - TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, DispatchTable, 20) - TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, ProcString, 4) - TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, ProcString, 4) - TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, ProcString, 24) - TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, FmtStringOffset, 4) - TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, FmtStringOffset, 4) - TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, FmtStringOffset, 28) - TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, TypeString, 4) - TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, TypeString, 4) - TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, TypeString, 32) - TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, aUserMarshalQuadruple, 4) - TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, aUserMarshalQuadruple, 4) - TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, aUserMarshalQuadruple, 36) - TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, pReserved1, 4) - TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, pReserved1, 4) - TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, pReserved1, 40) - TEST_FIELD_SIZE (MIDL_SYNTAX_INFO, pReserved2, 4) - TEST_FIELD_ALIGN (MIDL_SYNTAX_INFO, pReserved2, 4) - TEST_FIELD_OFFSET(MIDL_SYNTAX_INFO, pReserved2, 44) -} - -static void test_pack_NDR_CCONTEXT(void) -{ - /* NDR_CCONTEXT */ - TEST_TYPE_SIZE (NDR_CCONTEXT, 4) - TEST_TYPE_ALIGN (NDR_CCONTEXT, 4) -} - -static void test_pack_NDR_NOTIFY_ROUTINE(void) -{ - /* NDR_NOTIFY_ROUTINE */ -} - -static void test_pack_NDR_NOTIFY2_ROUTINE(void) -{ - /* NDR_NOTIFY2_ROUTINE */ -} - -static void test_pack_NDR_RUNDOWN(void) -{ - /* NDR_RUNDOWN */ -} - -static void test_pack_NDR_SCONTEXT(void) -{ - /* NDR_SCONTEXT */ - TEST_TYPE_SIZE (NDR_SCONTEXT, 4) - TEST_TYPE_ALIGN (NDR_SCONTEXT, 4) -} - -static void test_pack_NDR_USER_MARSHAL_INFO(void) -{ - /* NDR_USER_MARSHAL_INFO */ - TEST_FIELD_SIZE (NDR_USER_MARSHAL_INFO, InformationLevel, 4) - TEST_FIELD_ALIGN (NDR_USER_MARSHAL_INFO, InformationLevel, 4) - TEST_FIELD_OFFSET(NDR_USER_MARSHAL_INFO, InformationLevel, 0) -} - -static void test_pack_NDR_USER_MARSHAL_INFO_LEVEL1(void) -{ - /* NDR_USER_MARSHAL_INFO_LEVEL1 */ - TEST_FIELD_SIZE (NDR_USER_MARSHAL_INFO_LEVEL1, Buffer, 4) - TEST_FIELD_ALIGN (NDR_USER_MARSHAL_INFO_LEVEL1, Buffer, 4) - TEST_FIELD_OFFSET(NDR_USER_MARSHAL_INFO_LEVEL1, Buffer, 0) - TEST_FIELD_SIZE (NDR_USER_MARSHAL_INFO_LEVEL1, BufferSize, 4) - TEST_FIELD_ALIGN (NDR_USER_MARSHAL_INFO_LEVEL1, BufferSize, 4) - TEST_FIELD_OFFSET(NDR_USER_MARSHAL_INFO_LEVEL1, BufferSize, 4) -} - -static void test_pack_PARRAY_INFO(void) -{ - /* PARRAY_INFO */ - TEST_TYPE_SIZE (PARRAY_INFO, 4) - TEST_TYPE_ALIGN (PARRAY_INFO, 4) - TEST_TARGET_SIZE (PARRAY_INFO, 24) - TEST_TARGET_ALIGN(PARRAY_INFO, 4) -} - -static void test_pack_PFORMAT_STRING(void) -{ - /* PFORMAT_STRING */ - TEST_TYPE_SIZE (PFORMAT_STRING, 4) - TEST_TYPE_ALIGN (PFORMAT_STRING, 4) -} - -static void test_pack_PFULL_PTR_TO_REFID_ELEMENT(void) -{ - /* PFULL_PTR_TO_REFID_ELEMENT */ - TEST_TYPE_SIZE (PFULL_PTR_TO_REFID_ELEMENT, 4) - TEST_TYPE_ALIGN (PFULL_PTR_TO_REFID_ELEMENT, 4) - TEST_TARGET_SIZE (PFULL_PTR_TO_REFID_ELEMENT, 16) - TEST_TARGET_ALIGN(PFULL_PTR_TO_REFID_ELEMENT, 4) -} - -static void test_pack_PFULL_PTR_XLAT_TABLES(void) -{ - /* PFULL_PTR_XLAT_TABLES */ - TEST_TYPE_SIZE (PFULL_PTR_XLAT_TABLES, 4) - TEST_TYPE_ALIGN (PFULL_PTR_XLAT_TABLES, 4) -} - -static void test_pack_PGENERIC_BINDING_INFO(void) -{ - /* PGENERIC_BINDING_INFO */ - TEST_TYPE_SIZE (PGENERIC_BINDING_INFO, 4) - TEST_TYPE_ALIGN (PGENERIC_BINDING_INFO, 4) -} - -static void test_pack_PGENERIC_BINDING_ROUTINE_PAIR(void) -{ - /* PGENERIC_BINDING_ROUTINE_PAIR */ - TEST_TYPE_SIZE (PGENERIC_BINDING_ROUTINE_PAIR, 4) - TEST_TYPE_ALIGN (PGENERIC_BINDING_ROUTINE_PAIR, 4) -} - -static void test_pack_PMIDL_SERVER_INFO(void) -{ - /* PMIDL_SERVER_INFO */ - TEST_TYPE_SIZE (PMIDL_SERVER_INFO, 4) - TEST_TYPE_ALIGN (PMIDL_SERVER_INFO, 4) - TEST_TARGET_SIZE (PMIDL_SERVER_INFO, 32) - TEST_TARGET_ALIGN(PMIDL_SERVER_INFO, 4) -} - -static void test_pack_PMIDL_STUB_DESC(void) -{ - /* PMIDL_STUB_DESC */ - TEST_TYPE_SIZE (PMIDL_STUB_DESC, 4) - TEST_TYPE_ALIGN (PMIDL_STUB_DESC, 4) -} - -static void test_pack_PMIDL_STUB_MESSAGE(void) -{ - /* PMIDL_STUB_MESSAGE */ - TEST_TYPE_SIZE (PMIDL_STUB_MESSAGE, 4) - TEST_TYPE_ALIGN (PMIDL_STUB_MESSAGE, 4) -} - -static void test_pack_PMIDL_STUBLESS_PROXY_INFO(void) -{ - /* PMIDL_STUBLESS_PROXY_INFO */ - TEST_TYPE_SIZE (PMIDL_STUBLESS_PROXY_INFO, 4) - TEST_TYPE_ALIGN (PMIDL_STUBLESS_PROXY_INFO, 4) - TEST_TARGET_SIZE (PMIDL_STUBLESS_PROXY_INFO, 24) - TEST_TARGET_ALIGN(PMIDL_STUBLESS_PROXY_INFO, 4) -} - -static void test_pack_PMIDL_SYNTAX_INFO(void) -{ - /* PMIDL_SYNTAX_INFO */ - TEST_TYPE_SIZE (PMIDL_SYNTAX_INFO, 4) - TEST_TYPE_ALIGN (PMIDL_SYNTAX_INFO, 4) - TEST_TARGET_SIZE (PMIDL_SYNTAX_INFO, 48) - TEST_TARGET_ALIGN(PMIDL_SYNTAX_INFO, 4) -} - -static void test_pack_PNDR_ASYNC_MESSAGE(void) -{ - /* PNDR_ASYNC_MESSAGE */ - TEST_TYPE_SIZE (PNDR_ASYNC_MESSAGE, 4) - TEST_TYPE_ALIGN (PNDR_ASYNC_MESSAGE, 4) -} - -static void test_pack_PNDR_CORRELATION_INFO(void) -{ - /* PNDR_CORRELATION_INFO */ - TEST_TYPE_SIZE (PNDR_CORRELATION_INFO, 4) - TEST_TYPE_ALIGN (PNDR_CORRELATION_INFO, 4) -} - -static void test_pack_PSCONTEXT_QUEUE(void) -{ - /* PSCONTEXT_QUEUE */ - TEST_TYPE_SIZE (PSCONTEXT_QUEUE, 4) - TEST_TYPE_ALIGN (PSCONTEXT_QUEUE, 4) - TEST_TARGET_SIZE (PSCONTEXT_QUEUE, 8) - TEST_TARGET_ALIGN(PSCONTEXT_QUEUE, 4) -} - -static void test_pack_PXMIT_ROUTINE_QUINTUPLE(void) -{ - /* PXMIT_ROUTINE_QUINTUPLE */ - TEST_TYPE_SIZE (PXMIT_ROUTINE_QUINTUPLE, 4) - TEST_TYPE_ALIGN (PXMIT_ROUTINE_QUINTUPLE, 4) -} - -static void test_pack_SCONTEXT_QUEUE(void) -{ - /* SCONTEXT_QUEUE */ - TEST_TYPE_SIZE (SCONTEXT_QUEUE, 8) - TEST_TYPE_ALIGN (SCONTEXT_QUEUE, 4) - TEST_FIELD_SIZE (SCONTEXT_QUEUE, NumberOfObjects, 4) - TEST_FIELD_ALIGN (SCONTEXT_QUEUE, NumberOfObjects, 4) - TEST_FIELD_OFFSET(SCONTEXT_QUEUE, NumberOfObjects, 0) - TEST_FIELD_SIZE (SCONTEXT_QUEUE, ArrayOfObjects, 4) - TEST_FIELD_ALIGN (SCONTEXT_QUEUE, ArrayOfObjects, 4) - TEST_FIELD_OFFSET(SCONTEXT_QUEUE, ArrayOfObjects, 4) -} - -static void test_pack_SERVER_ROUTINE(void) -{ - /* SERVER_ROUTINE */ -} - -static void test_pack_STUB_THUNK(void) -{ - /* STUB_THUNK */ -} - -static void test_pack_USER_MARSHAL_CB(void) -{ - /* USER_MARSHAL_CB */ - TEST_FIELD_SIZE (USER_MARSHAL_CB, Flags, 4) - TEST_FIELD_ALIGN (USER_MARSHAL_CB, Flags, 4) - TEST_FIELD_OFFSET(USER_MARSHAL_CB, Flags, 0) - TEST_FIELD_SIZE (USER_MARSHAL_CB, pStubMsg, 4) - TEST_FIELD_ALIGN (USER_MARSHAL_CB, pStubMsg, 4) - TEST_FIELD_OFFSET(USER_MARSHAL_CB, pStubMsg, 4) - TEST_FIELD_SIZE (USER_MARSHAL_CB, pReserve, 4) - TEST_FIELD_ALIGN (USER_MARSHAL_CB, pReserve, 4) - TEST_FIELD_OFFSET(USER_MARSHAL_CB, pReserve, 8) - TEST_FIELD_SIZE (USER_MARSHAL_CB, Signature, 4) - TEST_FIELD_ALIGN (USER_MARSHAL_CB, Signature, 4) - TEST_FIELD_OFFSET(USER_MARSHAL_CB, Signature, 12) -} - -static void test_pack_USER_MARSHAL_FREEING_ROUTINE(void) -{ - /* USER_MARSHAL_FREEING_ROUTINE */ -} - -static void test_pack_USER_MARSHAL_MARSHALLING_ROUTINE(void) -{ - /* USER_MARSHAL_MARSHALLING_ROUTINE */ -} - -static void test_pack_USER_MARSHAL_ROUTINE_QUADRUPLE(void) -{ - /* USER_MARSHAL_ROUTINE_QUADRUPLE */ -} - -static void test_pack_USER_MARSHAL_SIZING_ROUTINE(void) -{ - /* USER_MARSHAL_SIZING_ROUTINE */ -} - -static void test_pack_USER_MARSHAL_UNMARSHALLING_ROUTINE(void) -{ - /* USER_MARSHAL_UNMARSHALLING_ROUTINE */ -} - -static void test_pack_XMIT_HELPER_ROUTINE(void) -{ - /* XMIT_HELPER_ROUTINE */ -} - -static void test_pack_XMIT_ROUTINE_QUINTUPLE(void) -{ - /* XMIT_ROUTINE_QUINTUPLE */ -} - -static void test_pack_PRPC_STUB_FUNCTION(void) -{ - /* PRPC_STUB_FUNCTION */ -} - -#endif /* _WIN64 */ - -static void test_pack(void) -{ - test_pack_ARRAY_INFO(); - test_pack_COMM_FAULT_OFFSETS(); - test_pack_CS_STUB_INFO(); - test_pack_EXPR_EVAL(); - test_pack_FULL_PTR_TO_REFID_ELEMENT(); - test_pack_FULL_PTR_XLAT_TABLES(); - test_pack_GENERIC_BINDING_INFO(); - test_pack_GENERIC_BINDING_ROUTINE_PAIR(); - test_pack_I_RPC_HANDLE(); - test_pack_MALLOC_FREE_STRUCT(); - test_pack_MIDL_FORMAT_STRING(); - test_pack_MIDL_SERVER_INFO(); - test_pack_MIDL_STUBLESS_PROXY_INFO(); - test_pack_MIDL_STUB_DESC(); - test_pack_MIDL_STUB_MESSAGE(); - test_pack_MIDL_SYNTAX_INFO(); - test_pack_NDR_CCONTEXT(); - test_pack_NDR_NOTIFY2_ROUTINE(); - test_pack_NDR_NOTIFY_ROUTINE(); - test_pack_NDR_RUNDOWN(); - test_pack_NDR_SCONTEXT(); - test_pack_NDR_USER_MARSHAL_INFO(); - test_pack_NDR_USER_MARSHAL_INFO_LEVEL1(); - test_pack_PARRAY_INFO(); - test_pack_PFORMAT_STRING(); - test_pack_PFULL_PTR_TO_REFID_ELEMENT(); - test_pack_PFULL_PTR_XLAT_TABLES(); - test_pack_PGENERIC_BINDING_INFO(); - test_pack_PGENERIC_BINDING_ROUTINE_PAIR(); - test_pack_PMIDL_SERVER_INFO(); - test_pack_PMIDL_STUBLESS_PROXY_INFO(); - test_pack_PMIDL_STUB_DESC(); - test_pack_PMIDL_STUB_MESSAGE(); - test_pack_PMIDL_SYNTAX_INFO(); - test_pack_PNDR_ASYNC_MESSAGE(); - test_pack_PNDR_CORRELATION_INFO(); - test_pack_PRPC_CLIENT_INTERFACE(); - test_pack_PRPC_DISPATCH_TABLE(); - test_pack_PRPC_MESSAGE(); - test_pack_PRPC_POLICY(); - test_pack_PRPC_PROTSEQ_ENDPOINT(); - test_pack_PRPC_SERVER_INTERFACE(); - test_pack_PRPC_STUB_FUNCTION(); - test_pack_PRPC_SYNTAX_IDENTIFIER(); - test_pack_PSCONTEXT_QUEUE(); - test_pack_PXMIT_ROUTINE_QUINTUPLE(); - test_pack_RPC_AUTHZ_HANDLE(); - test_pack_RPC_AUTH_IDENTITY_HANDLE(); - test_pack_RPC_AUTH_KEY_RETRIEVAL_FN(); - test_pack_RPC_BINDING_HANDLE(); - test_pack_RPC_BINDING_VECTOR(); - test_pack_RPC_CLIENT_INTERFACE(); - test_pack_RPC_DISPATCH_FUNCTION(); - test_pack_RPC_DISPATCH_TABLE(); - test_pack_RPC_IF_HANDLE(); - test_pack_RPC_IF_ID(); - test_pack_RPC_MESSAGE(); - test_pack_RPC_POLICY(); - test_pack_RPC_PROTSEQ_ENDPOINT(); - test_pack_RPC_SERVER_INTERFACE(); - test_pack_RPC_STATUS(); - test_pack_RPC_SYNTAX_IDENTIFIER(); - test_pack_RPC_VERSION(); - test_pack_SCONTEXT_QUEUE(); - test_pack_SERVER_ROUTINE(); - test_pack_STUB_THUNK(); - test_pack_USER_MARSHAL_CB(); - test_pack_USER_MARSHAL_FREEING_ROUTINE(); - test_pack_USER_MARSHAL_MARSHALLING_ROUTINE(); - test_pack_USER_MARSHAL_ROUTINE_QUADRUPLE(); - test_pack_USER_MARSHAL_SIZING_ROUTINE(); - test_pack_USER_MARSHAL_UNMARSHALLING_ROUTINE(); - test_pack_UUID_VECTOR(); - test_pack_XMIT_HELPER_ROUTINE(); - test_pack_XMIT_ROUTINE_QUINTUPLE(); -} - -START_TEST(generated) -{ - test_pack(); -} diff --git a/rostests/winetests/rpcrt4/ndr_marshall.c b/rostests/winetests/rpcrt4/ndr_marshall.c deleted file mode 100644 index 549d09ee87d..00000000000 --- a/rostests/winetests/rpcrt4/ndr_marshall.c +++ /dev/null @@ -1,2426 +0,0 @@ -/* - * Unit test suite for ndr marshalling functions - * - * Copyright 2006 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 - */ - -#include - -#define NTDDI_WIN2K 0x05000000 -#define NTDDI_VERSION NTDDI_WIN2K /* for some MIDL_STUB_MESSAGE fields */ - -#include "wine/test.h" -#include -#include -#include -#include - -#include "rpc.h" -#include "rpcdce.h" -#include "rpcproxy.h" - - -static int my_alloc_called; -static int my_free_called; -static void * CALLBACK my_alloc(SIZE_T size) -{ - my_alloc_called++; - return NdrOleAllocate(size); -} - -static void CALLBACK my_free(void *ptr) -{ - my_free_called++; - NdrOleFree(ptr); -} - -static const MIDL_STUB_DESC Object_StubDesc = - { - NULL, - my_alloc, - my_free, - { 0 }, - 0, - 0, - 0, - 0, - NULL, /* format string, filled in by tests */ - 1, /* -error bounds_check flag */ - 0x20000, /* Ndr library version */ - 0, - 0x50100a4, /* MIDL Version 5.1.164 */ - 0, - NULL, - 0, /* notify & notify_flag routine table */ - 1, /* Flags */ - 0, /* Reserved3 */ - 0, /* Reserved4 */ - 0 /* Reserved5 */ - }; - -static RPC_DISPATCH_FUNCTION IFoo_table[] = -{ - 0 -}; - -static RPC_DISPATCH_TABLE IFoo_v0_0_DispatchTable = -{ - 0, - IFoo_table -}; - -static const RPC_SERVER_INTERFACE IFoo___RpcServerInterface = -{ - sizeof(RPC_SERVER_INTERFACE), - {{0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x34}},{0,0}}, - {{0x8a885d04,0x1ceb,0x11c9,{0x9f,0xe8,0x08,0x00,0x2b,0x10,0x48,0x60}},{2,0}}, - &IFoo_v0_0_DispatchTable, - 0, - 0, - 0, - 0, - 0, -}; - -static RPC_IF_HANDLE IFoo_v0_0_s_ifspec = (RPC_IF_HANDLE)& IFoo___RpcServerInterface; -static BOOL use_pointer_ids = FALSE; - -static void determine_pointer_marshalling_style(void) -{ - RPC_MESSAGE RpcMessage; - MIDL_STUB_MESSAGE StubMsg; - MIDL_STUB_DESC StubDesc; - char ch = 0xde; - - static const unsigned char fmtstr_up_char[] = - { - 0x12, 0x8, /* FC_UP [simple_pointer] */ - 0x2, /* FC_CHAR */ - 0x5c, /* FC_PAD */ - }; - - StubDesc = Object_StubDesc; - StubDesc.pFormatTypes = NULL; - - NdrClientInitializeNew( - &RpcMessage, - &StubMsg, - &StubDesc, - 0); - - StubMsg.BufferLength = 8; - StubMsg.RpcMsg->Buffer = StubMsg.BufferStart = StubMsg.Buffer = HeapAlloc(GetProcessHeap(), 0, StubMsg.BufferLength); - NdrPointerMarshall(&StubMsg, (unsigned char*)&ch, fmtstr_up_char); - ok(StubMsg.Buffer == StubMsg.BufferStart + 5, "%p %p\n", StubMsg.Buffer, StubMsg.BufferStart); - - use_pointer_ids = (*(unsigned int *)StubMsg.BufferStart != (UINT_PTR)&ch); - trace("Pointer marshalling using %s\n", use_pointer_ids ? "pointer ids" : "pointer value"); - - HeapFree(GetProcessHeap(), 0, StubMsg.BufferStart); -} - -static void test_ndr_simple_type(void) -{ - RPC_MESSAGE RpcMessage; - MIDL_STUB_MESSAGE StubMsg; - MIDL_STUB_DESC StubDesc; - LONG l, l2 = 0; - - StubDesc = Object_StubDesc; - StubDesc.pFormatTypes = NULL; - - NdrClientInitializeNew( - &RpcMessage, - &StubMsg, - &StubDesc, - 0); - - StubMsg.BufferLength = 16; - StubMsg.RpcMsg->Buffer = StubMsg.BufferStart = StubMsg.Buffer = HeapAlloc(GetProcessHeap(), 0, StubMsg.BufferLength); - l = 0xcafebabe; - NdrSimpleTypeMarshall(&StubMsg, (unsigned char*)&l, 8 /* FC_LONG */); - ok(StubMsg.Buffer == StubMsg.BufferStart + 4, "%p %p\n", StubMsg.Buffer, StubMsg.BufferStart); - ok(*(LONG*)StubMsg.BufferStart == l, "%d\n", *(LONG*)StubMsg.BufferStart); - - StubMsg.Buffer = StubMsg.BufferStart + 1; - NdrSimpleTypeMarshall(&StubMsg, (unsigned char*)&l, 8 /* FC_LONG */); - ok(StubMsg.Buffer == StubMsg.BufferStart + 8, "%p %p\n", StubMsg.Buffer, StubMsg.BufferStart); - ok(*(LONG*)(StubMsg.BufferStart + 4) == l, "%d\n", *(LONG*)StubMsg.BufferStart); - - StubMsg.Buffer = StubMsg.BufferStart + 1; - NdrSimpleTypeUnmarshall(&StubMsg, (unsigned char*)&l2, 8 /* FC_LONG */); - ok(StubMsg.Buffer == StubMsg.BufferStart + 8, "%p %p\n", StubMsg.Buffer, StubMsg.BufferStart); - ok(l2 == l, "%d\n", l2); - - HeapFree(GetProcessHeap(), 0, StubMsg.BufferStart); -} - -static void test_pointer_marshal(const unsigned char *formattypes, - void *memsrc, DWORD srcsize, - const void *wiredata, - ULONG wiredatalen, - int(*cmp)(const void*,const void*,size_t), - int num_additional_allocs, - const char *msgpfx) -{ - RPC_MESSAGE RpcMessage; - MIDL_STUB_MESSAGE StubMsg; - MIDL_STUB_DESC StubDesc; - DWORD size; - void *ptr; - unsigned char *mem, *mem_orig; - - my_alloc_called = my_free_called = 0; - if(!cmp) - cmp = memcmp; - - StubDesc = Object_StubDesc; - StubDesc.pFormatTypes = formattypes; - - NdrClientInitializeNew( - &RpcMessage, - &StubMsg, - &StubDesc, - 0); - - StubMsg.BufferLength = 0; - NdrPointerBufferSize( &StubMsg, - memsrc, - formattypes ); - ok(StubMsg.BufferLength >= wiredatalen, "%s: length %d\n", msgpfx, StubMsg.BufferLength); - - /*NdrGetBuffer(&_StubMsg, _StubMsg.BufferLength, NULL);*/ - StubMsg.RpcMsg->Buffer = StubMsg.BufferStart = StubMsg.Buffer = HeapAlloc(GetProcessHeap(), 0, StubMsg.BufferLength); - StubMsg.BufferEnd = StubMsg.BufferStart + StubMsg.BufferLength; - - memset(StubMsg.BufferStart, 0x0, StubMsg.BufferLength); /* This is a hack to clear the padding between the ptr and longlong/double */ - - ptr = NdrPointerMarshall( &StubMsg, memsrc, formattypes ); - ok(ptr == NULL, "%s: ret %p\n", msgpfx, ptr); - if (srcsize == 8 && wiredatalen == 16 && StubMsg.Buffer - StubMsg.BufferStart == 12) - { - /* win9x doesn't align 8-byte types properly */ - wiredatalen = 12; - } - else - { - ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); - ok(!memcmp(StubMsg.BufferStart, wiredata, wiredatalen), "%s: incorrectly marshaled\n", msgpfx); - } - - StubMsg.Buffer = StubMsg.BufferStart; - StubMsg.MemorySize = 0; - - size = NdrPointerMemorySize( &StubMsg, formattypes ); - ok(size == StubMsg.MemorySize, "%s: mem size %u size %u\n", msgpfx, StubMsg.MemorySize, size); - ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); - if(formattypes[1] & 0x10 /* FC_POINTER_DEREF */) - ok(size == srcsize + sizeof(void *), "%s: mem size %u\n", msgpfx, size); - else - ok(size == srcsize, "%s: mem size %u\n", msgpfx, size); - - StubMsg.Buffer = StubMsg.BufferStart; - StubMsg.MemorySize = 16; - size = NdrPointerMemorySize( &StubMsg, formattypes ); - ok(size == StubMsg.MemorySize, "%s: mem size %u size %u\n", msgpfx, StubMsg.MemorySize, size); - ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); - if(formattypes[1] & 0x10 /* FC_POINTER_DEREF */) - ok(size == srcsize + sizeof(void *) + 16, "%s: mem size %u\n", msgpfx, size); - else - ok(size == srcsize + 16, "%s: mem size %u\n", msgpfx, size); - - StubMsg.Buffer = StubMsg.BufferStart; - StubMsg.MemorySize = 1; - size = NdrPointerMemorySize( &StubMsg, formattypes ); - ok(size == StubMsg.MemorySize, "%s: mem size %u size %u\n", msgpfx, StubMsg.MemorySize, size); - ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); - if(formattypes[1] & 0x10 /* FC_POINTER_DEREF */) - ok(size == srcsize + sizeof(void *) + (srcsize == 8 ? 8 : sizeof(void *)), "%s: mem size %u\n", msgpfx, size); - else - ok(size == srcsize + (srcsize == 8 ? 8 : sizeof(void *)), "%s: mem size %u\n", msgpfx, size); - - size = srcsize; - if(formattypes[1] & 0x10) size += 4; - - StubMsg.Buffer = StubMsg.BufferStart; - StubMsg.MemorySize = 0; - mem_orig = mem = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); - - if(formattypes[1] & 0x10 /* FC_POINTER_DEREF */) - *(void**)mem = NULL; - ptr = NdrPointerUnmarshall( &StubMsg, &mem, formattypes, 0 ); - ok(ptr == NULL, "%s: ret %p\n", msgpfx, ptr); - ok(mem == mem_orig, "%s: mem has changed %p %p\n", msgpfx, mem, mem_orig); - ok(!cmp(mem, memsrc, srcsize), "%s: incorrectly unmarshaled\n", msgpfx); - ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); - ok(StubMsg.MemorySize == 0, "%s: memorysize %d\n", msgpfx, StubMsg.MemorySize); - ok(my_alloc_called == num_additional_allocs, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called); - my_alloc_called = 0; - - /* reset the buffer and call with must alloc */ - StubMsg.Buffer = StubMsg.BufferStart; - if(formattypes[1] & 0x10 /* FC_POINTER_DEREF */) - *(void**)mem = NULL; - ptr = NdrPointerUnmarshall( &StubMsg, &mem, formattypes, 1 ); - ok(ptr == NULL, "%s: ret %p\n", msgpfx, ptr); - /* doesn't allocate mem in this case */ -todo_wine { - ok(mem == mem_orig, "%s: mem has changed %p %p\n", msgpfx, mem, mem_orig); - } - ok(!cmp(mem, memsrc, srcsize), "%s: incorrectly unmarshaled\n", msgpfx); - ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); - ok(StubMsg.MemorySize == 0, "%s: memorysize %d\n", msgpfx, StubMsg.MemorySize); - -todo_wine { - ok(my_alloc_called == num_additional_allocs, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called); -} - my_alloc_called = 0; - if(formattypes[0] != 0x11 /* FC_RP */) - { - /* now pass the address of a NULL ptr */ - mem = NULL; - StubMsg.Buffer = StubMsg.BufferStart; - ptr = NdrPointerUnmarshall( &StubMsg, &mem, formattypes, 0 ); - ok(ptr == NULL, "%s: ret %p\n", msgpfx, ptr); - ok(mem != StubMsg.BufferStart + wiredatalen - srcsize, "%s: mem points to buffer %p %p\n", msgpfx, mem, StubMsg.BufferStart); - ok(!cmp(mem, memsrc, size), "%s: incorrectly unmarshaled\n", msgpfx); - ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); - ok(StubMsg.MemorySize == 0, "%s: memorysize %d\n", msgpfx, StubMsg.MemorySize); - ok(my_alloc_called == num_additional_allocs + 1, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called); - my_alloc_called = 0; - NdrPointerFree(&StubMsg, mem, formattypes); - - /* again pass address of NULL ptr, but pretend we're a server */ - if (0) /* crashes on Win9x and NT4 */ - { - mem = NULL; - StubMsg.Buffer = StubMsg.BufferStart; - StubMsg.IsClient = 0; - ptr = NdrPointerUnmarshall( &StubMsg, &mem, formattypes, 0 ); - ok(ptr == NULL, "%s: ret %p\n", msgpfx, ptr); - if (formattypes[2] == 0xd /* FC_ENUM16 */) - ok(mem != StubMsg.BufferStart + wiredatalen - srcsize, "%s: mem points to buffer %p %p\n", msgpfx, mem, StubMsg.BufferStart); - else - ok(mem == StubMsg.BufferStart + wiredatalen - srcsize, "%s: mem doesn't point to buffer %p %p\n", msgpfx, mem, StubMsg.BufferStart); - ok(!cmp(mem, memsrc, size), "%s: incorrectly unmarshaled\n", msgpfx); - ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); - ok(StubMsg.MemorySize == 0, "%s: memorysize %d\n", msgpfx, StubMsg.MemorySize); - if (formattypes[2] != 0xd /* FC_ENUM16 */) { - ok(my_alloc_called == num_additional_allocs, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called); - my_alloc_called = 0; - } - } - } - HeapFree(GetProcessHeap(), 0, mem_orig); - HeapFree(GetProcessHeap(), 0, StubMsg.BufferStart); -} - -static int deref_cmp(const void *s1, const void *s2, size_t num) -{ - return memcmp(*(const void *const *)s1, *(const void *const *)s2, num); -} - - -static void test_simple_types(void) -{ - unsigned char wiredata[16]; - unsigned char ch; - unsigned char *ch_ptr; - unsigned short s; - unsigned int i; - ULONG l; - ULONGLONG ll; - float f; - double d; - - static const unsigned char fmtstr_up_char[] = - { - 0x12, 0x8, /* FC_UP [simple_pointer] */ - 0x2, /* FC_CHAR */ - 0x5c, /* FC_PAD */ - }; - static const unsigned char fmtstr_up_byte[] = - { - 0x12, 0x8, /* FC_UP [simple_pointer] */ - 0x1, /* FC_BYTE */ - 0x5c, /* FC_PAD */ - }; - static const unsigned char fmtstr_up_small[] = - { - 0x12, 0x8, /* FC_UP [simple_pointer] */ - 0x3, /* FC_SMALL */ - 0x5c, /* FC_PAD */ - }; - static const unsigned char fmtstr_up_usmall[] = - { - 0x12, 0x8, /* FC_UP [simple_pointer] */ - 0x4, /* FC_USMALL */ - 0x5c, /* FC_PAD */ - }; - static const unsigned char fmtstr_rp_char[] = - { - 0x11, 0x8, /* FC_RP [simple_pointer] */ - 0x2, /* FC_CHAR */ - 0x5c, /* FC_PAD */ - }; - static const unsigned char fmtstr_rpup_char[] = - { - 0x11, 0x14, /* FC_RP [alloced_on_stack] */ - NdrFcShort( 0x2 ), /* Offset= 2 (4) */ - 0x12, 0x8, /* FC_UP [simple_pointer] */ - 0x2, /* FC_CHAR */ - 0x5c, /* FC_PAD */ - }; - static const unsigned char fmtstr_rpup_char2[] = - { - 0x11, 0x04, /* FC_RP [alloced_on_stack] */ - NdrFcShort( 0x2 ), /* Offset= 2 (4) */ - 0x12, 0x8, /* FC_UP [simple_pointer] */ - 0x2, /* FC_CHAR */ - 0x5c, /* FC_PAD */ - }; - - static const unsigned char fmtstr_up_wchar[] = - { - 0x12, 0x8, /* FC_UP [simple_pointer] */ - 0x5, /* FC_WCHAR */ - 0x5c, /* FC_PAD */ - }; - static const unsigned char fmtstr_up_short[] = - { - 0x12, 0x8, /* FC_UP [simple_pointer] */ - 0x6, /* FC_SHORT */ - 0x5c, /* FC_PAD */ - }; - static const unsigned char fmtstr_up_ushort[] = - { - 0x12, 0x8, /* FC_UP [simple_pointer] */ - 0x7, /* FC_USHORT */ - 0x5c, /* FC_PAD */ - }; - static const unsigned char fmtstr_up_enum16[] = - { - 0x12, 0x8, /* FC_UP [simple_pointer] */ - 0xd, /* FC_ENUM16 */ - 0x5c, /* FC_PAD */ - }; - static const unsigned char fmtstr_up_long[] = - { - 0x12, 0x8, /* FC_UP [simple_pointer] */ - 0x8, /* FC_LONG */ - 0x5c, /* FC_PAD */ - }; - static const unsigned char fmtstr_up_ulong[] = - { - 0x12, 0x8, /* FC_UP [simple_pointer] */ - 0x9, /* FC_ULONG */ - 0x5c, /* FC_PAD */ - }; - static const unsigned char fmtstr_up_enum32[] = - { - 0x12, 0x8, /* FC_UP [simple_pointer] */ - 0xe, /* FC_ENUM32 */ - 0x5c, /* FC_PAD */ - }; - static const unsigned char fmtstr_up_errorstatus[] = - { - 0x12, 0x8, /* FC_UP [simple_pointer] */ - 0x10, /* FC_ERROR_STATUS_T */ - 0x5c, /* FC_PAD */ - }; - - static const unsigned char fmtstr_up_longlong[] = - { - 0x12, 0x8, /* FC_UP [simple_pointer] */ - 0xb, /* FC_HYPER */ - 0x5c, /* FC_PAD */ - }; - static const unsigned char fmtstr_up_float[] = - { - 0x12, 0x8, /* FC_UP [simple_pointer] */ - 0xa, /* FC_FLOAT */ - 0x5c, /* FC_PAD */ - }; - static const unsigned char fmtstr_up_double[] = - { - 0x12, 0x8, /* FC_UP [simple_pointer] */ - 0xc, /* FC_DOUBLE */ - 0x5c, /* FC_PAD */ - }; - - ch = 0xa5; - ch_ptr = &ch; - if (use_pointer_ids) - *(unsigned int *)wiredata = 0x20000; - else - *(unsigned int *)wiredata = (UINT_PTR)ch_ptr; - wiredata[4] = ch; - - test_pointer_marshal(fmtstr_up_char, ch_ptr, 1, wiredata, 5, NULL, 0, "up_char"); - test_pointer_marshal(fmtstr_up_byte, ch_ptr, 1, wiredata, 5, NULL, 0, "up_byte"); - test_pointer_marshal(fmtstr_up_small, ch_ptr, 1, wiredata, 5, NULL, 0, "up_small"); - test_pointer_marshal(fmtstr_up_usmall, ch_ptr, 1, wiredata, 5, NULL, 0, "up_usmall"); - - test_pointer_marshal(fmtstr_rp_char, ch_ptr, 1, &ch, 1, NULL, 0, "rp_char"); - - test_pointer_marshal(fmtstr_rpup_char, &ch_ptr, 1, wiredata, 5, deref_cmp, 1, "rpup_char"); - test_pointer_marshal(fmtstr_rpup_char2, ch_ptr, 1, wiredata, 5, NULL, 0, "rpup_char2"); - - s = 0xa597; - if (use_pointer_ids) - *(unsigned int *)wiredata = 0x20000; - else - *(unsigned int *)wiredata = (UINT_PTR)&s; - *(unsigned short*)(wiredata + 4) = s; - - test_pointer_marshal(fmtstr_up_wchar, &s, 2, wiredata, 6, NULL, 0, "up_wchar"); - test_pointer_marshal(fmtstr_up_short, &s, 2, wiredata, 6, NULL, 0, "up_short"); - test_pointer_marshal(fmtstr_up_ushort, &s, 2, wiredata, 6, NULL, 0, "up_ushort"); - - i = 0x7fff; - if (use_pointer_ids) - *(unsigned int *)wiredata = 0x20000; - else - *(unsigned int *)wiredata = (UINT_PTR)&i; - *(unsigned short*)(wiredata + 4) = i; - test_pointer_marshal(fmtstr_up_enum16, &i, 4, wiredata, 6, NULL, 0, "up_enum16"); - - l = 0xcafebabe; - if (use_pointer_ids) - *(unsigned int *)wiredata = 0x20000; - else - *(unsigned int *)wiredata = (UINT_PTR)&l; - *(ULONG*)(wiredata + 4) = l; - - test_pointer_marshal(fmtstr_up_long, &l, 4, wiredata, 8, NULL, 0, "up_long"); - test_pointer_marshal(fmtstr_up_ulong, &l, 4, wiredata, 8, NULL, 0, "up_ulong"); - test_pointer_marshal(fmtstr_up_enum32, &l, 4, wiredata, 8, NULL, 0, "up_emun32"); - test_pointer_marshal(fmtstr_up_errorstatus, &l, 4, wiredata, 8, NULL, 0, "up_errorstatus"); - - ll = ((ULONGLONG)0xcafebabe) << 32 | 0xdeadbeef; - if (use_pointer_ids) - *(unsigned int *)wiredata = 0x20000; - else - *(unsigned int *)wiredata = (UINT_PTR)≪ - *(unsigned int *)(wiredata + 4) = 0; - *(ULONGLONG*)(wiredata + 8) = ll; - test_pointer_marshal(fmtstr_up_longlong, &ll, 8, wiredata, 16, NULL, 0, "up_longlong"); - - f = 3.1415f; - if (use_pointer_ids) - *(unsigned int *)wiredata = 0x20000; - else - *(unsigned int *)wiredata = (UINT_PTR)&f; - *(float*)(wiredata + 4) = f; - test_pointer_marshal(fmtstr_up_float, &f, 4, wiredata, 8, NULL, 0, "up_float"); - - d = 3.1415; - if (use_pointer_ids) - *(unsigned int *)wiredata = 0x20000; - else - *(unsigned int *)wiredata = (UINT_PTR)&d; - *(unsigned int *)(wiredata + 4) = 0; - *(double*)(wiredata + 8) = d; - test_pointer_marshal(fmtstr_up_double, &d, 8, wiredata, 16, NULL, 0, "up_double"); - -} - -static void test_nontrivial_pointer_types(void) -{ - RPC_MESSAGE RpcMessage; - MIDL_STUB_MESSAGE StubMsg; - MIDL_STUB_DESC StubDesc; - DWORD size; - void *ptr; - char **p1; - char *p2; - char ch; - unsigned char *mem, *mem_orig; - - static const unsigned char fmtstr_ref_unique_out[] = - { - 0x12, 0x8, /* FC_UP [simple_pointer] */ - 0x2, /* FC_CHAR */ - 0x5c, /* FC_PAD */ - 0x11, 0x14, /* FC_RP [alloced_on_stack] [pointer_deref] */ - NdrFcShort( 0xfffffffa ), /* Offset= -6 (0) */ - }; - - p1 = &p2; - p2 = &ch; - ch = 0x22; - - StubDesc = Object_StubDesc; - StubDesc.pFormatTypes = fmtstr_ref_unique_out; - - NdrClientInitializeNew( - &RpcMessage, - &StubMsg, - &StubDesc, - 0); - - StubMsg.BufferLength = 0; - NdrPointerBufferSize( &StubMsg, - (unsigned char *)p1, - &fmtstr_ref_unique_out[4] ); - - /* Windows overestimates the buffer size */ - ok(StubMsg.BufferLength >= 5, "length %d\n", StubMsg.BufferLength); - - /*NdrGetBuffer(&_StubMsg, _StubMsg.BufferLength, NULL);*/ - StubMsg.RpcMsg->Buffer = StubMsg.BufferStart = StubMsg.Buffer = HeapAlloc(GetProcessHeap(), 0, StubMsg.BufferLength); - StubMsg.BufferEnd = StubMsg.BufferStart + StubMsg.BufferLength; - - ptr = NdrPointerMarshall( &StubMsg, (unsigned char *)p1, &fmtstr_ref_unique_out[4] ); - ok(ptr == NULL, "ret %p\n", ptr); - size = StubMsg.Buffer - StubMsg.BufferStart; - ok(size == 5, "Buffer %p Start %p len %d\n", StubMsg.Buffer, StubMsg.BufferStart, size); - ok(*(unsigned int *)StubMsg.BufferStart != 0, "pointer ID marshalled incorrectly\n"); - ok(*(unsigned char *)(StubMsg.BufferStart + 4) == 0x22, "char data marshalled incorrectly: 0x%x\n", - *(unsigned char *)(StubMsg.BufferStart + 4)); - - StubMsg.Buffer = StubMsg.BufferStart; - StubMsg.MemorySize = 0; - mem = NULL; - - /* Client */ - my_alloc_called = 0; - StubMsg.Buffer = StubMsg.BufferStart; - mem = mem_orig = HeapAlloc(GetProcessHeap(), 0, sizeof(void *)); - *(void **)mem = NULL; - NdrPointerUnmarshall( &StubMsg, &mem, &fmtstr_ref_unique_out[4], 0); - ok(mem == mem_orig, "mem alloced\n"); - ok(my_alloc_called == 1, "alloc called %d\n", my_alloc_called); - - my_alloc_called = 0; - StubMsg.Buffer = StubMsg.BufferStart; - NdrPointerUnmarshall( &StubMsg, &mem, &fmtstr_ref_unique_out[4], 1); - todo_wine { - ok(mem == mem_orig, "mem alloced\n"); - ok(my_alloc_called == 0, "alloc called %d\n", my_alloc_called); - } - - my_free_called = 0; - StubMsg.Buffer = StubMsg.BufferStart; - NdrPointerFree( &StubMsg, mem, &fmtstr_ref_unique_out[4] ); - ok(my_free_called == 1, "free called %d\n", my_free_called); - - mem = my_alloc(sizeof(void *)); - *(void **)mem = NULL; - my_free_called = 0; - StubMsg.Buffer = StubMsg.BufferStart; - NdrPointerFree( &StubMsg, mem, &fmtstr_ref_unique_out[4] ); - ok(my_free_called == 0, "free called %d\n", my_free_called); - my_free(mem); - - mem = my_alloc(sizeof(void *)); - *(void **)mem = my_alloc(sizeof(char)); - my_free_called = 0; - StubMsg.Buffer = StubMsg.BufferStart; - NdrPointerFree( &StubMsg, mem, &fmtstr_ref_unique_out[4] ); - ok(my_free_called == 1, "free called %d\n", my_free_called); - my_free(mem); - - /* Server */ - my_alloc_called = 0; - StubMsg.IsClient = 0; - mem = NULL; - StubMsg.Buffer = StubMsg.BufferStart; - NdrPointerUnmarshall( &StubMsg, &mem, &fmtstr_ref_unique_out[4], 0); - ok(mem != StubMsg.BufferStart, "mem pointing at buffer\n"); - todo_wine - ok(my_alloc_called == 1, "alloc called %d\n", my_alloc_called); - NdrPointerFree( &StubMsg, mem, &fmtstr_ref_unique_out[4] ); - - my_alloc_called = 0; - mem = NULL; - StubMsg.Buffer = StubMsg.BufferStart; - NdrPointerUnmarshall( &StubMsg, &mem, &fmtstr_ref_unique_out[4], 1); - ok(mem != StubMsg.BufferStart, "mem pointing at buffer\n"); - todo_wine - ok(my_alloc_called == 1, "alloc called %d\n", my_alloc_called); - NdrPointerFree( &StubMsg, mem, &fmtstr_ref_unique_out[4] ); - - my_alloc_called = 0; - mem = mem_orig; - *(void **)mem = NULL; - StubMsg.Buffer = StubMsg.BufferStart; - NdrPointerUnmarshall( &StubMsg, &mem, &fmtstr_ref_unique_out[4], 0); - todo_wine { - ok(mem == mem_orig, "mem alloced\n"); - ok(my_alloc_called == 0, "alloc called %d\n", my_alloc_called); - } - - my_alloc_called = 0; - mem = mem_orig; - *(void **)mem = NULL; - StubMsg.Buffer = StubMsg.BufferStart; - NdrPointerUnmarshall( &StubMsg, &mem, &fmtstr_ref_unique_out[4], 1); - todo_wine { - ok(mem == mem_orig, "mem alloced\n"); - ok(my_alloc_called == 0, "alloc called %d\n", my_alloc_called); - } - - mem = my_alloc(sizeof(void *)); - *(void **)mem = NULL; - my_free_called = 0; - StubMsg.Buffer = StubMsg.BufferStart; - NdrPointerFree( &StubMsg, mem, &fmtstr_ref_unique_out[4] ); - ok(my_free_called == 0, "free called %d\n", my_free_called); - my_free(mem); - - mem = my_alloc(sizeof(void *)); - *(void **)mem = my_alloc(sizeof(char)); - my_free_called = 0; - StubMsg.Buffer = StubMsg.BufferStart; - NdrPointerFree( &StubMsg, mem, &fmtstr_ref_unique_out[4] ); - ok(my_free_called == 1, "free called %d\n", my_free_called); - my_free(mem); - - HeapFree(GetProcessHeap(), 0, mem_orig); - HeapFree(GetProcessHeap(), 0, StubMsg.RpcMsg->Buffer); -} - -static void test_simple_struct_marshal(const unsigned char *formattypes, - void *memsrc, DWORD srcsize, - const void *wiredata, - ULONG wiredatalen, - int(*cmp)(const void*,const void*,size_t), - int num_additional_allocs, - const char *msgpfx) -{ - RPC_MESSAGE RpcMessage; - MIDL_STUB_MESSAGE StubMsg; - MIDL_STUB_DESC StubDesc; - DWORD size; - void *ptr; - unsigned char *mem, *mem_orig; - - my_alloc_called = my_free_called = 0; - if(!cmp) - cmp = memcmp; - - StubDesc = Object_StubDesc; - StubDesc.pFormatTypes = formattypes; - - NdrClientInitializeNew(&RpcMessage, &StubMsg, &StubDesc, 0); - - StubMsg.BufferLength = 0; - NdrSimpleStructBufferSize( &StubMsg, memsrc, formattypes ); - ok(StubMsg.BufferLength >= wiredatalen, "%s: length %d\n", msgpfx, StubMsg.BufferLength); - StubMsg.RpcMsg->Buffer = StubMsg.BufferStart = StubMsg.Buffer = HeapAlloc(GetProcessHeap(), 0, StubMsg.BufferLength); - StubMsg.BufferEnd = StubMsg.BufferStart + StubMsg.BufferLength; - ptr = NdrSimpleStructMarshall( &StubMsg, memsrc, formattypes ); - ok(ptr == NULL, "%s: ret %p\n", msgpfx, ptr); - ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart); - ok(!memcmp(StubMsg.BufferStart, wiredata, wiredatalen), "%s: incorrectly marshaled %08x %08x %08x\n", msgpfx, *(DWORD*)StubMsg.BufferStart,*((DWORD*)StubMsg.BufferStart+1),*((DWORD*)StubMsg.BufferStart+2)); - - StubMsg.Buffer = StubMsg.BufferStart; - StubMsg.MemorySize = 0; - size = NdrSimpleStructMemorySize( &StubMsg, formattypes ); - ok(size == StubMsg.MemorySize, "%s: size != MemorySize\n", msgpfx); - ok(size == srcsize, "%s: mem size %u\n", msgpfx, size); - ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart); - - StubMsg.Buffer = StubMsg.BufferStart; - size = NdrSimpleStructMemorySize( &StubMsg, formattypes ); - ok(size == StubMsg.MemorySize, "%s: size != MemorySize\n", msgpfx); - ok(StubMsg.MemorySize == ((srcsize + 3) & ~3) + srcsize, "%s: mem size %u\n", msgpfx, size); - ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart); - size = srcsize; - /*** Unmarshalling first with must_alloc false ***/ - - StubMsg.Buffer = StubMsg.BufferStart; - StubMsg.MemorySize = 0; - mem_orig = mem = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, srcsize); - ptr = NdrSimpleStructUnmarshall( &StubMsg, &mem, formattypes, 0 ); - ok(ptr == NULL, "%s: ret %p\n", msgpfx, ptr); - ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart); - ok(mem == mem_orig, "%s: mem has changed %p %p\n", msgpfx, mem, mem_orig); - ok(!cmp(mem, memsrc, srcsize), "%s: incorrectly unmarshaled\n", msgpfx); - ok(my_alloc_called == num_additional_allocs, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called); - my_alloc_called = 0; - ok(StubMsg.MemorySize == 0, "%s: memorysize touched in unmarshal\n", msgpfx); - - /* If we're a server we still use the supplied memory */ - StubMsg.Buffer = StubMsg.BufferStart; - StubMsg.IsClient = 0; - ptr = NdrSimpleStructUnmarshall( &StubMsg, &mem, formattypes, 0 ); - ok(ptr == NULL, "%s: ret %p\n", msgpfx, ptr); - ok(mem == mem_orig, "%s: mem has changed %p %p\n", msgpfx, mem, mem_orig); - ok(!cmp(mem, memsrc, srcsize), "%s: incorrectly unmarshaled\n", msgpfx); - ok(my_alloc_called == num_additional_allocs, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called); - my_alloc_called = 0; - ok(StubMsg.MemorySize == 0, "%s: memorysize touched in unmarshal\n", msgpfx); - - /* ...unless we pass a NULL ptr, then the buffer is used. - Passing a NULL ptr while we're a client && !must_alloc - crashes on Windows, so we won't do that. */ - - if (0) /* crashes on Win9x and NT4 */ - { - mem = NULL; - StubMsg.IsClient = 0; - StubMsg.Buffer = StubMsg.BufferStart; - ptr = NdrSimpleStructUnmarshall( &StubMsg, &mem, formattypes, FALSE ); - ok(ptr == NULL, "%s: ret %p\n", msgpfx, ptr); - ok(mem == StubMsg.BufferStart, "%s: mem not equal buffer\n", msgpfx); - ok(!cmp(mem, memsrc, srcsize), "%s: incorrectly unmarshaled\n", msgpfx); - ok(my_alloc_called == num_additional_allocs, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called); - my_alloc_called = 0; - ok(StubMsg.MemorySize == 0, "%s: memorysize touched in unmarshal\n", msgpfx); - } - - /*** now must_alloc is true ***/ - - /* with must_alloc set we always allocate new memory whether or not we're - a server and also when passing NULL */ - mem = mem_orig; - StubMsg.IsClient = 1; - StubMsg.Buffer = StubMsg.BufferStart; - ptr = NdrSimpleStructUnmarshall( &StubMsg, &mem, formattypes, 1 ); - ok(ptr == NULL, "ret %p\n", ptr); - ok(mem != mem_orig, "mem not changed %p %p\n", mem, mem_orig); - ok(!cmp(mem, memsrc, srcsize), "incorrectly unmarshaled\n"); - ok(my_alloc_called == num_additional_allocs + 1, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called); - my_alloc_called = 0; - ok(StubMsg.MemorySize == 0, "memorysize touched in unmarshal\n"); - - mem = NULL; - StubMsg.Buffer = StubMsg.BufferStart; - ptr = NdrSimpleStructUnmarshall( &StubMsg, &mem, formattypes, 1 ); - ok(ptr == NULL, "ret %p\n", ptr); - ok(mem != mem_orig, "mem not changed %p %p\n", mem, mem_orig); - ok(!cmp(mem, memsrc, srcsize), "incorrectly unmarshaled\n"); - ok(my_alloc_called == num_additional_allocs + 1, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called); - my_alloc_called = 0; - ok(StubMsg.MemorySize == 0, "memorysize touched in unmarshal\n"); - - mem = mem_orig; - StubMsg.Buffer = StubMsg.BufferStart; - StubMsg.IsClient = 0; - StubMsg.ReuseBuffer = 1; - ptr = NdrSimpleStructUnmarshall( &StubMsg, &mem, formattypes, 1 ); - ok(ptr == NULL, "ret %p\n", ptr); - ok(mem != mem_orig, "mem not changed %p %p\n", mem, mem_orig); - ok(mem != StubMsg.BufferStart, "mem is buffer mem\n"); - ok(!cmp(mem, memsrc, srcsize), "incorrectly unmarshaled\n"); - ok(my_alloc_called == num_additional_allocs + 1, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called); - my_alloc_called = 0; - ok(StubMsg.MemorySize == 0, "memorysize touched in unmarshal\n"); - - mem = NULL; - StubMsg.Buffer = StubMsg.BufferStart; - StubMsg.IsClient = 0; - StubMsg.ReuseBuffer = 1; - ptr = NdrSimpleStructUnmarshall( &StubMsg, &mem, formattypes, 1 ); - ok(ptr == NULL, "ret %p\n", ptr); - ok(mem != StubMsg.BufferStart, "mem is buffer mem\n"); - ok(!cmp(mem, memsrc, srcsize), "incorrectly unmarshaled\n"); - ok(my_alloc_called == num_additional_allocs + 1, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called); - my_alloc_called = 0; - ok(StubMsg.MemorySize == 0, "memorysize touched in unmarshal\n"); - - HeapFree(GetProcessHeap(), 0, mem_orig); - HeapFree(GetProcessHeap(), 0, StubMsg.BufferStart); -} - -typedef struct -{ - LONG l1; - LONG *pl1; - char *pc1; -} ps1_t; - -static int ps1_cmp(const void *s1, const void *s2, size_t num) -{ - const ps1_t *p1, *p2; - - p1 = s1; - p2 = s2; - - if(p1->l1 != p2->l1) - return 1; - - if(p1->pl1 && p2->pl1) - { - if(*p1->pl1 != *p2->pl1) - return 1; - } - else if(p1->pl1 || p2->pl1) - return 1; - - if(p1->pc1 && p2->pc1) - { - if(*p1->pc1 != *p2->pc1) - return 1; - } - else if(p1->pc1 || p2->pc1) - return 1; - - return 0; -} - -static void test_simple_struct(void) -{ - unsigned char wiredata[28]; - ULONG wiredatalen; - LONG l; - char c; - ps1_t ps1; - - static const unsigned char fmtstr_simple_struct[] = - { - 0x12, 0x0, /* FC_UP */ - NdrFcShort( 0x2 ), /* Offset=2 */ - 0x15, 0x3, /* FC_STRUCT [align 4] */ - NdrFcShort( 0x18 ), /* [size 24] */ - 0x6, /* FC_SHORT */ - 0x2, /* FC_CHAR */ - 0x38, /* FC_ALIGNM4 */ - 0x8, /* FC_LONG */ - 0x8, /* FC_LONG */ - 0x39, /* FC_ALIGNM8 */ - 0xb, /* FC_HYPER */ - 0x5b, /* FC_END */ - }; - struct { - short s; - char c; - LONG l1, l2; - LONGLONG ll; - } s1; - - static const unsigned char fmtstr_pointer_struct[] = - { - 0x12, 0x0, /* FC_UP */ - NdrFcShort( 0x2 ), /* Offset=2 */ -#ifdef _WIN64 - 0x1a, /* FC_BOGUS_STRUCT */ - 0x3, /* 3 */ - NdrFcShort(0x18), /* [size 24] */ - NdrFcShort(0x0), - NdrFcShort(0x8), /* Offset= 8 (266) */ - 0x08, /* FC_LONG */ - 0x39, /* FC_ALIGNM8 */ - 0x36, /* FC_POINTER */ - 0x36, /* FC_POINTER */ - 0x5c, /* FC_PAD */ - 0x5b, /* FC_END */ - 0x12, 0x8, /* FC_UP [simple_pointer] */ - 0x08, /* FC_LONG */ - 0x5c, /* FC_PAD */ - 0x12, 0x8, /* FC_UP [simple_pointer] */ - 0x02, /* FC_CHAR */ - 0x5c, /* FC_PAD */ -#else - 0x16, 0x3, /* FC_PSTRUCT [align 4] */ - NdrFcShort( 0xc ), /* [size 12] */ - 0x4b, /* FC_PP */ - 0x5c, /* FC_PAD */ - 0x46, /* FC_NO_REPEAT */ - 0x5c, /* FC_PAD */ - NdrFcShort( 0x4 ), /* 4 */ - NdrFcShort( 0x4 ), /* 4 */ - 0x13, 0x8, /* FC_OP [simple_pointer] */ - 0x8, /* FC_LONG */ - 0x5c, /* FC_PAD */ - 0x46, /* FC_NO_REPEAT */ - 0x5c, /* FC_PAD */ - NdrFcShort( 0x8 ), /* 8 */ - NdrFcShort( 0x8 ), /* 8 */ - 0x13, 0x8, /* FC_OP [simple_pointer] */ - 0x2, /* FC_CHAR */ - 0x5c, /* FC_PAD */ - 0x5b, /* FC_END */ - 0x8, /* FC_LONG */ - 0x8, /* FC_LONG */ - 0x8, /* FC_LONG */ - 0x5c, /* FC_PAD */ - 0x5b, /* FC_END */ -#endif - }; - - /* zero the entire structure, including the holes */ - memset(&s1, 0, sizeof(s1)); - - /* FC_STRUCT */ - s1.s = 0x1234; - s1.c = 0xa5; - s1.l1 = 0xdeadbeef; - s1.l2 = 0xcafebabe; - s1.ll = ((LONGLONG) 0xbadefeed << 32) | 0x2468ace0; - - wiredatalen = 24; - memcpy(wiredata, &s1, wiredatalen); - test_simple_struct_marshal(fmtstr_simple_struct + 4, &s1, 24, wiredata, 24, NULL, 0, "struct"); - - if (use_pointer_ids) - *(unsigned int *)wiredata = 0x20000; - else - *(unsigned int *)wiredata = (UINT_PTR)&s1; - memcpy(wiredata + 4, &s1, wiredatalen); - test_pointer_marshal(fmtstr_simple_struct, &s1, 24, wiredata, 28, NULL, 0, "struct"); - - if (sizeof(void *) == 8) return; /* it cannot be represented as a simple struct on Win64 */ - - /* zero the entire structure, including the hole */ - memset(&ps1, 0, sizeof(ps1)); - - /* FC_PSTRUCT */ - ps1.l1 = 0xdeadbeef; - l = 0xcafebabe; - ps1.pl1 = &l; - c = 'a'; - ps1.pc1 = &c; - *(unsigned int *)(wiredata + 4) = 0xdeadbeef; - if (use_pointer_ids) - { - *(unsigned int *)(wiredata + 8) = 0x20000; - *(unsigned int *)(wiredata + 12) = 0x20004; - } - else - { - *(unsigned int *)(wiredata + 8) = (UINT_PTR)&l; - *(unsigned int *)(wiredata + 12) = (UINT_PTR)&c; - } - memcpy(wiredata + 16, &l, 4); - memcpy(wiredata + 20, &c, 1); - - test_simple_struct_marshal(fmtstr_pointer_struct + 4, &ps1, 17, wiredata + 4, 17, ps1_cmp, 2, "pointer_struct"); - if (use_pointer_ids) - { - *(unsigned int *)wiredata = 0x20000; - *(unsigned int *)(wiredata + 8) = 0x20004; - *(unsigned int *)(wiredata + 12) = 0x20008; - } - else - *(unsigned int *)wiredata = (UINT_PTR)&ps1; - test_pointer_marshal(fmtstr_pointer_struct, &ps1, 17, wiredata, 21, ps1_cmp, 2, "pointer_struct"); -} - -static void test_fullpointer_xlat(void) -{ - PFULL_PTR_XLAT_TABLES pXlatTables; - ULONG RefId; - int ret; - void *Pointer; - - pXlatTables = NdrFullPointerXlatInit(2, XLAT_CLIENT); - - /* "marshaling" phase */ - - ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xcafebeef, 1, &RefId); - ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret); - ok(RefId == 0x1, "RefId should be 0x1 instead of 0x%x\n", RefId); - - ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xcafebeef, 0, &RefId); - ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret); - ok(RefId == 0x1, "RefId should be 0x1 instead of 0x%x\n", RefId); - - ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xcafebabe, 0, &RefId); - ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret); - ok(RefId == 0x2, "RefId should be 0x2 instead of 0x%x\n", RefId); - - ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xdeadbeef, 0, &RefId); - ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret); - ok(RefId == 0x3, "RefId should be 0x3 instead of 0x%x\n", RefId); - - ret = NdrFullPointerQueryPointer(pXlatTables, NULL, 0, &RefId); - ok(ret == 1, "ret should be 1 instead of 0x%x\n", ret); - ok(RefId == 0, "RefId should be 0 instead of 0x%x\n", RefId); - - /* "unmarshaling" phase */ - - ret = NdrFullPointerQueryRefId(pXlatTables, 0x0, 0, &Pointer); - ok(ret == 1, "ret should be 1 instead of 0x%x\n", ret); - - ret = NdrFullPointerQueryRefId(pXlatTables, 0x2, 0, &Pointer); - ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret); - ok(Pointer == (void *)0xcafebabe, "Pointer should be 0xcafebabe instead of %p\n", Pointer); - - ret = NdrFullPointerQueryRefId(pXlatTables, 0x4, 0, &Pointer); - ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret); - ok(Pointer == NULL, "Pointer should be NULL instead of %p\n", Pointer); - - NdrFullPointerInsertRefId(pXlatTables, 0x4, (void *)0xdeadbabe); - - ret = NdrFullPointerQueryRefId(pXlatTables, 0x4, 1, &Pointer); - ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret); - ok(Pointer == (void *)0xdeadbabe, "Pointer should be (void *)0xdeadbabe instead of %p\n", Pointer); - - NdrFullPointerXlatFree(pXlatTables); - - pXlatTables = NdrFullPointerXlatInit(2, XLAT_SERVER); - - /* "unmarshaling" phase */ - - ret = NdrFullPointerQueryRefId(pXlatTables, 0x2, 1, &Pointer); - ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret); - ok(Pointer == NULL, "Pointer should be NULL instead of %p\n", Pointer); - - NdrFullPointerInsertRefId(pXlatTables, 0x2, (void *)0xcafebabe); - - ret = NdrFullPointerQueryRefId(pXlatTables, 0x2, 0, &Pointer); - ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret); - ok(Pointer == (void *)0xcafebabe, "Pointer should be (void *)0xcafebabe instead of %p\n", Pointer); - - ret = NdrFullPointerQueryRefId(pXlatTables, 0x2, 1, &Pointer); - ok(ret == 1, "ret should be 1 instead of 0x%x\n", ret); - ok(Pointer == (void *)0xcafebabe, "Pointer should be (void *)0xcafebabe instead of %p\n", Pointer); - - /* "marshaling" phase */ - - ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xcafebeef, 1, &RefId); - ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret); - ok(RefId == 0x3, "RefId should be 0x3 instead of 0x%x\n", RefId); - - ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xcafebeef, 1, &RefId); - ok(ret == 1, "ret should be 1 instead of 0x%x\n", ret); - ok(RefId == 0x3, "RefId should be 0x3 instead of 0x%x\n", RefId); - - ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xcafebeef, 0, &RefId); - ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret); - ok(RefId == 0x3, "RefId should be 0x3 instead of 0x%x\n", RefId); - - ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xcafebabe, 0, &RefId); - ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret); - ok(RefId == 0x2, "RefId should be 0x2 instead of 0x%x\n", RefId); - - ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xdeadbeef, 0, &RefId); - ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret); - ok(RefId == 0x4, "RefId should be 0x4 instead of 0x%x\n", RefId); - - /* "freeing" phase */ - - ret = NdrFullPointerFree(pXlatTables, (void *)0xcafebeef); - ok(ret == 1, "ret should be 1 instead of 0x%x\n", ret); - - ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xcafebeef, 0x20, &RefId); - ok(ret == 1, "ret should be 1 instead of 0x%x\n", ret); - ok(RefId == 0x3, "RefId should be 0x3 instead of 0x%x\n", RefId); - - ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xcafebeef, 1, &RefId); - ok(ret == 1, "ret should be 1 instead of 0x%x\n", ret); - ok(RefId == 0x3, "RefId should be 0x3 instead of 0x%x\n", RefId); - - ret = NdrFullPointerFree(pXlatTables, (void *)0xcafebabe); - ok(ret == 1, "ret should be 1 instead of 0x%x\n", ret); - - ret = NdrFullPointerFree(pXlatTables, (void *)0xdeadbeef); - ok(ret == 1, "ret should be 1 instead of 0x%x\n", ret); - - ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xdeadbeef, 0x20, &RefId); - ok(ret == 1, "ret should be 1 instead of 0x%x\n", ret); - ok(RefId == 0x4, "RefId should be 0x4 instead of 0x%x\n", RefId); - - ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xdeadbeef, 1, &RefId); - ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret); - ok(RefId == 0x4, "RefId should be 0x4 instead of 0x%x\n", RefId); - - ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xdeadbeef, 1, &RefId); - ok(ret == 1, "ret should be 1 instead of 0x%x\n", ret); - ok(RefId == 0x4, "RefId should be 0x4 instead of 0x%x\n", RefId); - - ret = NdrFullPointerFree(pXlatTables, (void *)0xdeadbeef); - ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret); - - NdrFullPointerXlatFree(pXlatTables); -} - -/* verify stub data that is identical between client and server */ -static void test_common_stub_data( const char *prefix, const MIDL_STUB_MESSAGE *stubMsg ) -{ - void *unset_ptr; - - memset(&unset_ptr, 0xcc, sizeof(unset_ptr)); - -#define TEST_ZERO(field, fmt) ok(stubMsg->field == 0, "%s: " #field " should have been set to zero instead of " fmt "\n", prefix, stubMsg->field) -#define TEST_POINTER_UNSET(field) ok(stubMsg->field == unset_ptr, "%s: " #field " should have been unset instead of %p\n", prefix, stubMsg->field) -#define TEST_ULONG_UNSET(field) ok(stubMsg->field == 0xcccccccc, "%s: " #field " should have been unset instead of 0x%x\n", prefix, stubMsg->field) -#define TEST_ULONG_PTR_UNSET(field) ok(stubMsg->field == (ULONG_PTR)unset_ptr, "%s: " #field " should have been unset instead of 0x%lx\n", prefix, stubMsg->field) - - TEST_POINTER_UNSET(BufferMark); - TEST_ULONG_UNSET(MemorySize); - TEST_POINTER_UNSET(Memory); - TEST_ZERO(pAllocAllNodesContext, "%p"); - ok(stubMsg->pPointerQueueState == 0 || - broken(stubMsg->pPointerQueueState == unset_ptr), /* win2k */ - "%s: pPointerQueueState should have been unset instead of %p\n", - prefix, stubMsg->pPointerQueueState); - TEST_ZERO(IgnoreEmbeddedPointers, "%d"); - TEST_ZERO(PointerBufferMark, "%p"); - ok( stubMsg->uFlags == 0 || - broken(stubMsg->uFlags == 0xcc), /* win9x */ - "%s: uFlags should have been set to zero instead of 0x%x\n", prefix, stubMsg->uFlags ); - /* FIXME: UniquePtrCount */ - TEST_ULONG_PTR_UNSET(MaxCount); - TEST_ULONG_UNSET(Offset); - TEST_ULONG_UNSET(ActualCount); - ok(stubMsg->pfnAllocate == my_alloc, "%s: pfnAllocate should have been %p instead of %p\n", - prefix, my_alloc, stubMsg->pfnAllocate); - ok(stubMsg->pfnFree == my_free, "%s: pfnFree should have been %p instead of %p\n", - prefix, my_free, stubMsg->pfnFree); - TEST_ZERO(StackTop, "%p"); - TEST_POINTER_UNSET(pPresentedType); - TEST_POINTER_UNSET(pTransmitType); - TEST_POINTER_UNSET(SavedHandle); - ok(stubMsg->StubDesc == &Object_StubDesc, "%s: StubDesc should have been %p instead of %p\n", - prefix, &Object_StubDesc, stubMsg->StubDesc); - TEST_ZERO(FullPtrRefId, "%d"); - ok( stubMsg->PointerLength == 0 || - broken(stubMsg->PointerLength == 1), /* win9x, nt4 */ - "%s: pAsyncMsg should have been set to zero instead of %d\n", prefix, stubMsg->PointerLength ); - TEST_ZERO(fInDontFree, "%d"); - TEST_ZERO(fDontCallFreeInst, "%d"); - ok( stubMsg->fHasReturn == 0 || broken(stubMsg->fHasReturn), /* win9x, nt4 */ - "%s: fHasReturn should have been set to zero instead of %d\n", prefix, stubMsg->fHasReturn ); - TEST_ZERO(fHasExtensions, "%d"); - TEST_ZERO(fHasNewCorrDesc, "%d"); - ok(stubMsg->fIsIn == 0 || broken(stubMsg->fIsIn), /* win9x, nt4 */ - "%s: fIsIn should have been set to 0 instead of %d\n", prefix, stubMsg->fIsIn); - TEST_ZERO(fIsOicf, "%d"); - ok(stubMsg->fBufferValid == 0, - "%s: fBufferValid should have been set to 0 instead of %d\n", prefix, stubMsg->fBufferValid); - TEST_ZERO(fNeedMCCP, "%d"); - ok(stubMsg->fUnused == 0 || - stubMsg->fUnused == -2, /* Vista */ - "%s: fUnused should have been set to 0 or -2 instead of %d\n", prefix, stubMsg->fUnused); - ok(stubMsg->fUnused2 == 0xffffcccc, "%s: fUnused2 should have been 0xffffcccc instead of 0x%x\n", - prefix, stubMsg->fUnused2); - ok(stubMsg->dwDestContext == MSHCTX_DIFFERENTMACHINE, - "%s: dwDestContext should have been MSHCTX_DIFFERENTMACHINE instead of %d\n", - prefix, stubMsg->dwDestContext); - TEST_ZERO(pvDestContext, "%p"); - TEST_POINTER_UNSET(SavedContextHandles); - TEST_ULONG_UNSET(ParamNumber); - TEST_ZERO(pRpcChannelBuffer, "%p"); - TEST_ZERO(pArrayInfo, "%p"); - TEST_POINTER_UNSET(SizePtrCountArray); - TEST_POINTER_UNSET(SizePtrOffsetArray); - TEST_POINTER_UNSET(SizePtrLengthArray); - TEST_POINTER_UNSET(pArgQueue); - TEST_ZERO(dwStubPhase, "%d"); - /* FIXME: where does this value come from? */ - trace("%s: LowStackMark is %p\n", prefix, stubMsg->LowStackMark); - ok( stubMsg->pAsyncMsg == 0 || broken(stubMsg->pAsyncMsg == unset_ptr), /* win9x, nt4 */ - "%s: pAsyncMsg should have been set to zero instead of %p\n", prefix, stubMsg->pAsyncMsg ); - ok( stubMsg->pCorrInfo == 0 || broken(stubMsg->pCorrInfo == unset_ptr), /* win9x, nt4 */ - "%s: pCorrInfo should have been set to zero instead of %p\n", prefix, stubMsg->pCorrInfo ); - ok( stubMsg->pCorrMemory == 0 || broken(stubMsg->pCorrMemory == unset_ptr), /* win9x, nt4 */ - "%s: pCorrMemory should have been set to zero instead of %p\n", prefix, stubMsg->pCorrMemory ); - ok( stubMsg->pMemoryList == 0 || broken(stubMsg->pMemoryList == unset_ptr), /* win9x, nt4 */ - "%s: pMemoryList should have been set to zero instead of %p\n", prefix, stubMsg->pMemoryList ); - TEST_POINTER_UNSET(pCSInfo); - TEST_POINTER_UNSET(ConformanceMark); - TEST_POINTER_UNSET(VarianceMark); - ok(stubMsg->Unused == (ULONG_PTR)unset_ptr, "%s: Unused should have be unset instead of 0x%lx\n", - prefix, stubMsg->Unused); - TEST_POINTER_UNSET(pContext); - TEST_POINTER_UNSET(ContextHandleHash); - TEST_POINTER_UNSET(pUserMarshalList); - TEST_ULONG_PTR_UNSET(Reserved51_3); - TEST_ULONG_PTR_UNSET(Reserved51_4); - TEST_ULONG_PTR_UNSET(Reserved51_5); - -#undef TEST_ULONG_PTR_UNSET -#undef TEST_ULONG_UNSET -#undef TEST_POINTER_UNSET -#undef TEST_ZERO -} - -static void test_client_init(void) -{ - MIDL_STUB_MESSAGE stubMsg; - RPC_MESSAGE rpcMsg; - void *unset_ptr; - - memset(&rpcMsg, 0xcc, sizeof(rpcMsg)); - memset(&stubMsg, 0xcc, sizeof(stubMsg)); - memset(&unset_ptr, 0xcc, sizeof(unset_ptr)); - - NdrClientInitializeNew(&rpcMsg, &stubMsg, &Object_StubDesc, 1); - - test_common_stub_data( "NdrClientInitializeNew", &stubMsg ); - - ok(stubMsg.RpcMsg == &rpcMsg, "stubMsg.RpcMsg should have been %p instead of %p\n", &rpcMsg, stubMsg.RpcMsg); - ok(rpcMsg.Handle == NULL, "rpcMsg.Handle should have been NULL instead of %p\n", rpcMsg.Handle); - ok(rpcMsg.Buffer == unset_ptr, "rpcMsg.Buffer should have been unset instead of %p\n", - rpcMsg.Buffer); - ok(rpcMsg.BufferLength == 0xcccccccc, "rpcMsg.BufferLength should have been unset instead of %d\n", rpcMsg.BufferLength); - ok(rpcMsg.ProcNum == 0x8001, "rpcMsg.ProcNum should have been 0x8001 instead of 0x%x\n", rpcMsg.ProcNum); - ok(rpcMsg.TransferSyntax == unset_ptr, "rpcMsg.TransferSyntax should have been unset instead of %p\n", rpcMsg.TransferSyntax); - ok(rpcMsg.RpcInterfaceInformation == Object_StubDesc.RpcInterfaceInformation, - "rpcMsg.RpcInterfaceInformation should have been %p instead of %p\n", - Object_StubDesc.RpcInterfaceInformation, rpcMsg.RpcInterfaceInformation); - /* Note: ReservedForRuntime not tested */ - ok(rpcMsg.ManagerEpv == unset_ptr, "rpcMsg.ManagerEpv should have been unset instead of %p\n", rpcMsg.ManagerEpv); - ok(rpcMsg.ImportContext == unset_ptr, "rpcMsg.ImportContext should have been unset instead of %p\n", rpcMsg.ImportContext); - ok(rpcMsg.RpcFlags == 0, "rpcMsg.RpcFlags should have been 0 instead of 0x%x\n", rpcMsg.RpcFlags); - - ok(stubMsg.Buffer == unset_ptr, "stubMsg.Buffer should have been unset instead of %p\n", - stubMsg.Buffer); - ok(stubMsg.BufferStart == NULL, "stubMsg.BufferStart should have been NULL instead of %p\n", - stubMsg.BufferStart); - ok(stubMsg.BufferEnd == NULL, "stubMsg.BufferEnd should have been NULL instead of %p\n", - stubMsg.BufferEnd); - ok(stubMsg.BufferLength == 0, "stubMsg.BufferLength should have been 0 instead of %u\n", - stubMsg.BufferLength); - ok(stubMsg.IsClient == 1, "stubMsg.IsClient should have been 1 instead of %u\n", stubMsg.IsClient); - ok(stubMsg.ReuseBuffer == 0, "stubMsg.ReuseBuffer should have been 0 instead of %d\n", - stubMsg.ReuseBuffer); - ok(stubMsg.CorrDespIncrement == 0, "stubMsg.CorrDespIncrement should have been 0 instead of %d\n", - stubMsg.CorrDespIncrement); - ok(stubMsg.FullPtrXlatTables == unset_ptr, "stubMsg.FullPtrXlatTables should have been unset instead of %p\n", - stubMsg.FullPtrXlatTables); -} - -static void test_server_init(void) -{ - MIDL_STUB_MESSAGE stubMsg; - RPC_MESSAGE rpcMsg; - unsigned char *ret; - unsigned char buffer[256]; - - memset(&rpcMsg, 0, sizeof(rpcMsg)); - rpcMsg.Buffer = buffer; - rpcMsg.BufferLength = sizeof(buffer); - rpcMsg.RpcFlags = RPC_BUFFER_COMPLETE; - - memset(&stubMsg, 0xcc, sizeof(stubMsg)); - - ret = NdrServerInitializeNew(&rpcMsg, &stubMsg, &Object_StubDesc); - ok(ret == NULL, "NdrServerInitializeNew should have returned NULL instead of %p\n", ret); - - test_common_stub_data( "NdrServerInitializeNew", &stubMsg ); - - ok(stubMsg.RpcMsg == &rpcMsg, "stubMsg.RpcMsg should have been %p instead of %p\n", &rpcMsg, stubMsg.RpcMsg); - ok(stubMsg.Buffer == buffer, "stubMsg.Buffer should have been %p instead of %p\n", buffer, stubMsg.Buffer); - ok(stubMsg.BufferStart == buffer, "stubMsg.BufferStart should have been %p instead of %p\n", buffer, stubMsg.BufferStart); - ok(stubMsg.BufferEnd == buffer + sizeof(buffer), "stubMsg.BufferEnd should have been %p instead of %p\n", buffer + sizeof(buffer), stubMsg.BufferEnd); -todo_wine - ok(stubMsg.BufferLength == 0, "stubMsg.BufferLength should have been 0 instead of %u\n", stubMsg.BufferLength); - ok(stubMsg.IsClient == 0, "stubMsg.IsClient should have been 0 instead of %u\n", stubMsg.IsClient); - ok(stubMsg.ReuseBuffer == 0 || - broken(stubMsg.ReuseBuffer == 1), /* win2k */ - "stubMsg.ReuseBuffer should have been set to zero instead of %d\n", stubMsg.ReuseBuffer); - ok(stubMsg.CorrDespIncrement == 0xcc || - stubMsg.CorrDespIncrement == 0, - "CorrDespIncrement should have been unset instead of 0x%x\n", stubMsg.CorrDespIncrement); - ok(stubMsg.FullPtrXlatTables == 0, "stubMsg.BufferLength should have been 0 instead of %p\n", stubMsg.FullPtrXlatTables); -} - -static void test_ndr_allocate(void) -{ - RPC_MESSAGE RpcMessage; - MIDL_STUB_MESSAGE StubMsg; - MIDL_STUB_DESC StubDesc; - void *p1, *p2; - struct tag_mem_list_v2_t - { - DWORD magic; - DWORD size; - DWORD unknown; - struct tag_mem_list_v2_t *next; - } *mem_list_v2; - const DWORD magic_MEML = 'M' << 24 | 'E' << 16 | 'M' << 8 | 'L'; - - StubDesc = Object_StubDesc; - NdrClientInitializeNew(&RpcMessage, &StubMsg, &StubDesc, 0); - - my_alloc_called = my_free_called = 0; - p1 = NdrAllocate(&StubMsg, 10); - p2 = NdrAllocate(&StubMsg, 24); - ok(my_alloc_called == 2, "alloc called %d\n", my_alloc_called); - ok(StubMsg.pMemoryList != NULL, "StubMsg.pMemoryList NULL\n"); - if(StubMsg.pMemoryList) - { - mem_list_v2 = StubMsg.pMemoryList; - if (mem_list_v2->size == 24) - { - trace("v2 mem list format\n"); - ok((char *)mem_list_v2 == (char *)p2 + 24, "expected mem_list_v2 pointer %p, but got %p\n", (char *)p2 + 24, mem_list_v2); - ok(mem_list_v2->magic == magic_MEML, "magic %08x\n", mem_list_v2->magic); - ok(mem_list_v2->size == 24, "wrong size for p2 %d\n", mem_list_v2->size); - ok(mem_list_v2->unknown == 0, "wrong unknown for p2 0x%x\n", mem_list_v2->unknown); - ok(mem_list_v2->next != NULL, "next NULL\n"); - mem_list_v2 = mem_list_v2->next; - if(mem_list_v2) - { - ok((char *)mem_list_v2 == (char *)p1 + 16, "expected mem_list_v2 pointer %p, but got %p\n", (char *)p1 + 16, mem_list_v2); - ok(mem_list_v2->magic == magic_MEML, "magic %08x\n", mem_list_v2->magic); - ok(mem_list_v2->size == 16, "wrong size for p1 %d\n", mem_list_v2->size); - ok(mem_list_v2->unknown == 0, "wrong unknown for p1 0x%x\n", mem_list_v2->unknown); - ok(mem_list_v2->next == NULL, "next %p\n", mem_list_v2->next); - } - } - else win_skip("v1 mem list format\n"); - } - /* NdrFree isn't exported so we can't test free'ing */ -} - -static void test_conformant_array(void) -{ - RPC_MESSAGE RpcMessage; - MIDL_STUB_MESSAGE StubMsg; - MIDL_STUB_DESC StubDesc; - void *ptr; - unsigned char *mem, *mem_orig; - unsigned char memsrc[20]; - unsigned int i; - - static const unsigned char fmtstr_conf_array[] = - { - 0x1b, /* FC_CARRAY */ - 0x0, /* align */ - NdrFcShort( 0x1 ), /* elem size */ - 0x40, /* Corr desc: const */ - 0x0, - NdrFcShort(0x10), /* const = 0x10 */ - 0x1, /* FC_BYTE */ - 0x5b /* FC_END */ - }; - - for (i = 0; i < sizeof(memsrc); i++) - memsrc[i] = i * i; - - StubDesc = Object_StubDesc; - StubDesc.pFormatTypes = fmtstr_conf_array; - - NdrClientInitializeNew( - &RpcMessage, - &StubMsg, - &StubDesc, - 0); - - StubMsg.BufferLength = 0; - NdrConformantArrayBufferSize( &StubMsg, - memsrc, - fmtstr_conf_array ); - ok(StubMsg.BufferLength >= 20, "length %d\n", StubMsg.BufferLength); - - /*NdrGetBuffer(&_StubMsg, _StubMsg.BufferLength, NULL);*/ - StubMsg.RpcMsg->Buffer = StubMsg.BufferStart = StubMsg.Buffer = HeapAlloc(GetProcessHeap(), 0, StubMsg.BufferLength); - StubMsg.BufferEnd = StubMsg.BufferStart + StubMsg.BufferLength; - - ptr = NdrConformantArrayMarshall( &StubMsg, memsrc, fmtstr_conf_array ); - ok(ptr == NULL, "ret %p\n", ptr); - ok(StubMsg.Buffer - StubMsg.BufferStart == 20, "Buffer %p Start %p len %d\n", StubMsg.Buffer, StubMsg.BufferStart, 20); - ok(!memcmp(StubMsg.BufferStart + 4, memsrc, 16), "incorrectly marshaled\n"); - - StubMsg.Buffer = StubMsg.BufferStart; - StubMsg.MemorySize = 0; - mem = NULL; - - /* Client */ - my_alloc_called = 0; - /* passing mem == NULL with must_alloc == 0 crashes under Windows */ - NdrConformantArrayUnmarshall( &StubMsg, &mem, fmtstr_conf_array, 1); - ok(mem != NULL, "mem not alloced\n"); - ok(mem != StubMsg.BufferStart + 4, "mem pointing at buffer\n"); - ok(my_alloc_called == 1, "alloc called %d\n", my_alloc_called); - - my_alloc_called = 0; - StubMsg.Buffer = StubMsg.BufferStart; - mem_orig = mem; - NdrConformantArrayUnmarshall( &StubMsg, &mem, fmtstr_conf_array, 0); - ok(mem == mem_orig, "mem alloced\n"); - ok(mem != StubMsg.BufferStart + 4, "mem pointing at buffer\n"); - ok(my_alloc_called == 0, "alloc called %d\n", my_alloc_called); - - my_alloc_called = 0; - StubMsg.Buffer = StubMsg.BufferStart; - NdrConformantArrayUnmarshall( &StubMsg, &mem, fmtstr_conf_array, 1); - ok(mem != mem_orig, "mem not alloced\n"); - ok(mem != StubMsg.BufferStart + 4, "mem pointing at buffer\n"); - ok(my_alloc_called == 1, "alloc called %d\n", my_alloc_called); - - my_free_called = 0; - StubMsg.Buffer = StubMsg.BufferStart; - NdrConformantArrayFree( &StubMsg, mem, fmtstr_conf_array ); - ok(my_free_called == 0, "free called %d\n", my_free_called); - StubMsg.pfnFree(mem); - - /* Server */ - my_alloc_called = 0; - StubMsg.IsClient = 0; - mem = NULL; - StubMsg.Buffer = StubMsg.BufferStart; - NdrConformantArrayUnmarshall( &StubMsg, &mem, fmtstr_conf_array, 0); - ok(mem == StubMsg.BufferStart + 4 || broken(!mem), /* win9x, nt4 */ - "mem not pointing at buffer %p/%p\n", mem, StubMsg.BufferStart + 4); - ok(my_alloc_called == 0, "alloc called %d\n", my_alloc_called); - my_alloc_called = 0; - mem = NULL; - StubMsg.Buffer = StubMsg.BufferStart; - NdrConformantArrayUnmarshall( &StubMsg, &mem, fmtstr_conf_array, 1); - ok(mem != StubMsg.BufferStart + 4, "mem pointing at buffer\n"); - ok(my_alloc_called == 1, "alloc called %d\n", my_alloc_called); - StubMsg.pfnFree(mem); - - my_alloc_called = 0; - mem = mem_orig; - StubMsg.Buffer = StubMsg.BufferStart; - NdrConformantArrayUnmarshall( &StubMsg, &mem, fmtstr_conf_array, 0); - ok(mem == mem_orig, "mem alloced\n"); - ok(my_alloc_called == 0, "alloc called %d\n", my_alloc_called); - - my_alloc_called = 0; - mem = mem_orig; - StubMsg.Buffer = StubMsg.BufferStart; - NdrConformantArrayUnmarshall( &StubMsg, &mem, fmtstr_conf_array, 1); - ok(mem != StubMsg.BufferStart + 4, "mem pointing at buffer\n"); - ok(my_alloc_called == 1, "alloc called %d\n", my_alloc_called); - StubMsg.pfnFree(mem); - StubMsg.pfnFree(mem_orig); - - HeapFree(GetProcessHeap(), 0, StubMsg.RpcMsg->Buffer); -} - -static void test_conformant_string(void) -{ - RPC_MESSAGE RpcMessage; - MIDL_STUB_MESSAGE StubMsg; - MIDL_STUB_DESC StubDesc; - DWORD size; - void *ptr; - unsigned char *mem, *mem_orig; - char memsrc[] = "This is a test string"; - - static const unsigned char fmtstr_conf_str[] = - { - 0x11, 0x8, /* FC_RP [simple_pointer] */ - 0x22, /* FC_C_CSTRING */ - 0x5c, /* FC_PAD */ - }; - - StubDesc = Object_StubDesc; - StubDesc.pFormatTypes = fmtstr_conf_str; - - memset( &StubMsg, 0, sizeof(StubMsg) ); /* needed on win9x and nt4 */ - NdrClientInitializeNew( - &RpcMessage, - &StubMsg, - &StubDesc, - 0); - - StubMsg.BufferLength = 0; - NdrPointerBufferSize( &StubMsg, - (unsigned char *)memsrc, - fmtstr_conf_str ); - ok(StubMsg.BufferLength >= sizeof(memsrc) + 12, "length %d\n", StubMsg.BufferLength); - - /*NdrGetBuffer(&_StubMsg, _StubMsg.BufferLength, NULL);*/ - StubMsg.RpcMsg->Buffer = StubMsg.BufferStart = StubMsg.Buffer = HeapAlloc(GetProcessHeap(), 0, StubMsg.BufferLength); - StubMsg.BufferEnd = StubMsg.BufferStart + StubMsg.BufferLength; - - ptr = NdrPointerMarshall( &StubMsg, (unsigned char *)memsrc, fmtstr_conf_str ); - ok(ptr == NULL, "ret %p\n", ptr); - size = StubMsg.Buffer - StubMsg.BufferStart; - ok(size == sizeof(memsrc) + 12, "Buffer %p Start %p len %d\n", - StubMsg.Buffer, StubMsg.BufferStart, size); - ok(!memcmp(StubMsg.BufferStart + 12, memsrc, sizeof(memsrc)), "incorrectly marshaled\n"); - - StubMsg.Buffer = StubMsg.BufferStart; - StubMsg.MemorySize = 0; - mem = NULL; - - /* Client */ - my_alloc_called = 0; - StubMsg.Buffer = StubMsg.BufferStart; - mem = mem_orig = HeapAlloc(GetProcessHeap(), 0, sizeof(memsrc)); - /* Windows apparently checks string length on the output buffer to determine its size... */ - memset( mem, 'x', sizeof(memsrc) - 1 ); - mem[sizeof(memsrc) - 1] = 0; - NdrPointerUnmarshall( &StubMsg, &mem, fmtstr_conf_str, 0); - ok(mem == mem_orig, "mem not alloced\n"); - ok(my_alloc_called == 0, "alloc called %d\n", my_alloc_called); - - my_alloc_called = 0; - StubMsg.Buffer = StubMsg.BufferStart; - NdrPointerUnmarshall( &StubMsg, &mem, fmtstr_conf_str, 1); -todo_wine { - ok(mem == mem_orig, "mem not alloced\n"); - ok(my_alloc_called == 0, "alloc called %d\n", my_alloc_called); -} - - my_free_called = 0; - StubMsg.Buffer = StubMsg.BufferStart; - NdrPointerFree( &StubMsg, mem, fmtstr_conf_str ); - ok(my_free_called == 1, "free called %d\n", my_free_called); - - mem = my_alloc(10); - my_free_called = 0; - StubMsg.Buffer = StubMsg.BufferStart; - NdrPointerFree( &StubMsg, mem, fmtstr_conf_str ); - ok(my_free_called == 1, "free called %d\n", my_free_called); - - /* Server */ - my_alloc_called = 0; - StubMsg.IsClient = 0; - mem = NULL; - StubMsg.Buffer = StubMsg.BufferStart; - NdrPointerUnmarshall( &StubMsg, &mem, fmtstr_conf_str, 0); - ok(mem == StubMsg.BufferStart + 12 || broken(!mem), /* win9x, nt4 */ - "mem not pointing at buffer %p/%p\n", mem, StubMsg.BufferStart + 12 ); - ok(my_alloc_called == 0, "alloc called %d\n", my_alloc_called); - - my_alloc_called = 0; - mem = NULL; - StubMsg.Buffer = StubMsg.BufferStart; - NdrPointerUnmarshall( &StubMsg, &mem, fmtstr_conf_str, 1); -todo_wine { - ok(mem == StubMsg.BufferStart + 12 || broken(!mem), /* win9x, nt4 */ - "mem not pointing at buffer %p/%p\n", mem, StubMsg.BufferStart + 12 ); - ok(my_alloc_called == 0, "alloc called %d\n", my_alloc_called); -} - - my_alloc_called = 0; - mem = mem_orig = HeapAlloc(GetProcessHeap(), 0, sizeof(memsrc)); - StubMsg.Buffer = StubMsg.BufferStart; - NdrPointerUnmarshall( &StubMsg, &mem, fmtstr_conf_str, 0); - ok(mem == StubMsg.BufferStart + 12 || broken(!mem), /* win9x, nt4 */ - "mem not pointing at buffer %p/%p\n", mem, StubMsg.BufferStart + 12 ); - ok(my_alloc_called == 0, "alloc called %d\n", my_alloc_called); - - my_alloc_called = 0; - mem = mem_orig; - StubMsg.Buffer = StubMsg.BufferStart; - NdrPointerUnmarshall( &StubMsg, &mem, fmtstr_conf_str, 1); -todo_wine { - ok(mem == StubMsg.BufferStart + 12 || broken(!mem), /* win9x, nt4 */ - "mem not pointing at buffer %p/%p\n", mem, StubMsg.BufferStart + 12 ); - ok(my_alloc_called == 0, "alloc called %d\n", my_alloc_called); -} - - mem = my_alloc(10); - my_free_called = 0; - StubMsg.Buffer = StubMsg.BufferStart; - NdrPointerFree( &StubMsg, mem, fmtstr_conf_str ); - ok(my_free_called == 1, "free called %d\n", my_free_called); - - HeapFree(GetProcessHeap(), 0, mem_orig); - HeapFree(GetProcessHeap(), 0, StubMsg.RpcMsg->Buffer); -} - -static void test_nonconformant_string(void) -{ - RPC_MESSAGE RpcMessage; - MIDL_STUB_MESSAGE StubMsg; - MIDL_STUB_DESC StubDesc; - DWORD size; - void *ptr; - unsigned char *mem, *mem_orig; - unsigned char memsrc[10] = "This is"; - unsigned char memsrc2[10] = "This is a"; - - static const unsigned char fmtstr_nonconf_str[] = - { - 0x26, /* FC_CSTRING */ - 0x5c, /* FC_PAD */ - NdrFcShort( 0xa ), /* 10 */ - }; - - StubDesc = Object_StubDesc; - StubDesc.pFormatTypes = fmtstr_nonconf_str; - - /* length < size */ - NdrClientInitializeNew( - &RpcMessage, - &StubMsg, - &StubDesc, - 0); - - StubMsg.BufferLength = 0; - - NdrNonConformantStringBufferSize( &StubMsg, memsrc, fmtstr_nonconf_str ); - ok(StubMsg.BufferLength >= strlen((char *)memsrc) + 1 + 8, "length %d\n", StubMsg.BufferLength); - - /*NdrGetBuffer(&_StubMsg, _StubMsg.BufferLength, NULL);*/ - StubMsg.RpcMsg->Buffer = StubMsg.BufferStart = StubMsg.Buffer = HeapAlloc(GetProcessHeap(), 0, StubMsg.BufferLength); - StubMsg.BufferEnd = StubMsg.BufferStart + StubMsg.BufferLength; - - ptr = NdrNonConformantStringMarshall( &StubMsg, memsrc, fmtstr_nonconf_str ); - ok(ptr == NULL, "ret %p\n", ptr); - size = StubMsg.Buffer - StubMsg.BufferStart; - ok(size == strlen((char *)memsrc) + 1 + 8, "Buffer %p Start %p len %d\n", - StubMsg.Buffer, StubMsg.BufferStart, size); - ok(!memcmp(StubMsg.BufferStart + 8, memsrc, strlen((char *)memsrc) + 1), "incorrectly marshaled\n"); - - StubMsg.Buffer = StubMsg.BufferStart; - StubMsg.MemorySize = 0; - mem = NULL; - - /* Client */ - my_alloc_called = 0; - StubMsg.Buffer = StubMsg.BufferStart; - mem = mem_orig = HeapAlloc(GetProcessHeap(), 0, sizeof(memsrc)); - NdrNonConformantStringUnmarshall( &StubMsg, &mem, fmtstr_nonconf_str, 0); - ok(mem == mem_orig, "mem alloced\n"); - ok(my_alloc_called == 0, "alloc called %d\n", my_alloc_called); - - my_alloc_called = 0; - StubMsg.Buffer = StubMsg.BufferStart; - NdrNonConformantStringUnmarshall( &StubMsg, &mem, fmtstr_nonconf_str, 1); - todo_wine - ok(mem == mem_orig, "mem alloced\n"); - todo_wine - ok(my_alloc_called == 0, "alloc called %d\n", my_alloc_called); - - /* Server */ - my_alloc_called = 0; - StubMsg.IsClient = 0; - mem = NULL; - StubMsg.Buffer = StubMsg.BufferStart; - NdrNonConformantStringUnmarshall( &StubMsg, &mem, fmtstr_nonconf_str, 0); - ok(mem != mem_orig, "mem not alloced\n"); - ok(mem != StubMsg.BufferStart + 8, "mem pointing at buffer\n"); - ok(my_alloc_called == 1, "alloc called %d\n", my_alloc_called); - NdrOleFree(mem); - - my_alloc_called = 0; - mem = mem_orig; - StubMsg.Buffer = StubMsg.BufferStart; - NdrNonConformantStringUnmarshall( &StubMsg, &mem, fmtstr_nonconf_str, 0); - ok(mem == mem_orig, "mem alloced\n"); - ok(my_alloc_called == 0, "alloc called %d\n", my_alloc_called); - - my_alloc_called = 0; - mem = mem_orig; - StubMsg.Buffer = StubMsg.BufferStart; - NdrNonConformantStringUnmarshall( &StubMsg, &mem, fmtstr_nonconf_str, 1); - todo_wine - ok(mem == mem_orig, "mem alloced\n"); - todo_wine - ok(my_alloc_called == 0, "alloc called %d\n", my_alloc_called); - - HeapFree(GetProcessHeap(), 0, mem_orig); - HeapFree(GetProcessHeap(), 0, StubMsg.RpcMsg->Buffer); - - /* length = size */ - NdrClientInitializeNew( - &RpcMessage, - &StubMsg, - &StubDesc, - 0); - - StubMsg.BufferLength = 0; - - NdrNonConformantStringBufferSize( &StubMsg, memsrc2, fmtstr_nonconf_str ); - ok(StubMsg.BufferLength >= strlen((char *)memsrc2) + 1 + 8, "length %d\n", StubMsg.BufferLength); - - /*NdrGetBuffer(&_StubMsg, _StubMsg.BufferLength, NULL);*/ - StubMsg.RpcMsg->Buffer = StubMsg.BufferStart = StubMsg.Buffer = HeapAlloc(GetProcessHeap(), 0, StubMsg.BufferLength); - StubMsg.BufferEnd = StubMsg.BufferStart + StubMsg.BufferLength; - - ptr = NdrNonConformantStringMarshall( &StubMsg, memsrc2, fmtstr_nonconf_str ); - ok(ptr == NULL, "ret %p\n", ptr); - size = StubMsg.Buffer - StubMsg.BufferStart; - ok(size == strlen((char *)memsrc2) + 1 + 8, "Buffer %p Start %p len %d\n", - StubMsg.Buffer, StubMsg.BufferStart, size); - ok(!memcmp(StubMsg.BufferStart + 8, memsrc2, strlen((char *)memsrc2) + 1), "incorrectly marshaled\n"); - - StubMsg.Buffer = StubMsg.BufferStart; - StubMsg.MemorySize = 0; - mem = NULL; - - /* Client */ - my_alloc_called = 0; - StubMsg.Buffer = StubMsg.BufferStart; - mem = mem_orig = HeapAlloc(GetProcessHeap(), 0, sizeof(memsrc)); - NdrNonConformantStringUnmarshall( &StubMsg, &mem, fmtstr_nonconf_str, 0); - ok(mem == mem_orig, "mem alloced\n"); - ok(my_alloc_called == 0, "alloc called %d\n", my_alloc_called); - - my_alloc_called = 0; - StubMsg.Buffer = StubMsg.BufferStart; - NdrNonConformantStringUnmarshall( &StubMsg, &mem, fmtstr_nonconf_str, 1); - todo_wine - ok(mem == mem_orig, "mem alloced\n"); - todo_wine - ok(my_alloc_called == 0, "alloc called %d\n", my_alloc_called); - - /* Server */ - my_alloc_called = 0; - StubMsg.IsClient = 0; - mem = NULL; - StubMsg.Buffer = StubMsg.BufferStart; - NdrNonConformantStringUnmarshall( &StubMsg, &mem, fmtstr_nonconf_str, 0); - ok(mem != mem_orig, "mem not alloced\n"); - ok(mem != StubMsg.BufferStart + 8, "mem pointing at buffer\n"); - ok(my_alloc_called == 1, "alloc called %d\n", my_alloc_called); - NdrOleFree(mem); - - my_alloc_called = 0; - mem = mem_orig; - StubMsg.Buffer = StubMsg.BufferStart; - NdrNonConformantStringUnmarshall( &StubMsg, &mem, fmtstr_nonconf_str, 0); - ok(mem == mem_orig, "mem alloced\n"); - ok(my_alloc_called == 0, "alloc called %d\n", my_alloc_called); - - my_alloc_called = 0; - mem = mem_orig; - StubMsg.Buffer = StubMsg.BufferStart; - NdrNonConformantStringUnmarshall( &StubMsg, &mem, fmtstr_nonconf_str, 1); - todo_wine - ok(mem == mem_orig, "mem alloced\n"); - todo_wine - ok(my_alloc_called == 0, "alloc called %d\n", my_alloc_called); - - HeapFree(GetProcessHeap(), 0, mem_orig); - HeapFree(GetProcessHeap(), 0, StubMsg.RpcMsg->Buffer); -} - -static void test_conf_complex_struct(void) -{ - RPC_MESSAGE RpcMessage; - MIDL_STUB_MESSAGE StubMsg; - MIDL_STUB_DESC StubDesc; - void *ptr; - unsigned int i; - struct conf_complex - { - unsigned int size; - unsigned int *array[1]; - }; - struct conf_complex *memsrc; - struct conf_complex *mem; - - static const unsigned char fmtstr_complex_struct[] = - { -/* 0 */ - 0x1b, /* FC_CARRAY */ - 0x3, /* 3 */ -/* 2 */ NdrFcShort( 0x4 ), /* 4 */ -/* 4 */ 0x8, /* Corr desc: FC_LONG */ - 0x0, /* */ -/* 6 */ NdrFcShort( 0xfffc ), /* -4 */ -/* 8 */ - 0x4b, /* FC_PP */ - 0x5c, /* FC_PAD */ -/* 10 */ - 0x48, /* FC_VARIABLE_REPEAT */ - 0x49, /* FC_FIXED_OFFSET */ -/* 12 */ NdrFcShort( 0x4 ), /* 4 */ -/* 14 */ NdrFcShort( 0x0 ), /* 0 */ -/* 16 */ NdrFcShort( 0x1 ), /* 1 */ -/* 18 */ NdrFcShort( 0x0 ), /* 0 */ -/* 20 */ NdrFcShort( 0x0 ), /* 0 */ -/* 22 */ 0x12, 0x8, /* FC_UP [simple_pointer] */ -/* 24 */ 0x8, /* FC_LONG */ - 0x5c, /* FC_PAD */ -/* 26 */ - 0x5b, /* FC_END */ - - 0x8, /* FC_LONG */ -/* 28 */ 0x5c, /* FC_PAD */ - 0x5b, /* FC_END */ -/* 30 */ - 0x1a, /* FC_BOGUS_STRUCT */ - 0x3, /* 3 */ -/* 32 */ NdrFcShort( 0x4 ), /* 4 */ -/* 34 */ NdrFcShort( 0xffffffde ), /* Offset= -34 (0) */ -/* 36 */ NdrFcShort( 0x0 ), /* Offset= 0 (36) */ -/* 38 */ 0x8, /* FC_LONG */ - 0x5b, /* FC_END */ - }; - - memsrc = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, - FIELD_OFFSET(struct conf_complex, array[20])); - memsrc->size = 20; - - StubDesc = Object_StubDesc; - StubDesc.pFormatTypes = fmtstr_complex_struct; - - NdrClientInitializeNew( - &RpcMessage, - &StubMsg, - &StubDesc, - 0); - - StubMsg.BufferLength = 0; - NdrComplexStructBufferSize( &StubMsg, - (unsigned char *)memsrc, - &fmtstr_complex_struct[30] ); - ok(StubMsg.BufferLength >= 28, "length %d\n", StubMsg.BufferLength); - - /*NdrGetBuffer(&_StubMsg, _StubMsg.BufferLength, NULL);*/ - StubMsg.RpcMsg->Buffer = StubMsg.BufferStart = StubMsg.Buffer = HeapAlloc(GetProcessHeap(), 0, StubMsg.BufferLength); - StubMsg.BufferEnd = StubMsg.BufferStart + StubMsg.BufferLength; - - ptr = NdrComplexStructMarshall( &StubMsg, (unsigned char *)memsrc, - &fmtstr_complex_struct[30] ); - ok(ptr == NULL, "ret %p\n", ptr); - ok(*(unsigned int *)StubMsg.BufferStart == 20, "Conformance should have been 20 instead of %d\n", *(unsigned int *)StubMsg.BufferStart); - ok(*(unsigned int *)(StubMsg.BufferStart + 4) == 20, "conf_complex.size should have been 20 instead of %d\n", *(unsigned int *)(StubMsg.BufferStart + 4)); - for (i = 0; i < 20; i++) - ok(*(unsigned int *)(StubMsg.BufferStart + 8 + i * 4) == 0, "pointer id for conf_complex.array[%d] should have been 0 instead of 0x%x\n", i, *(unsigned int *)(StubMsg.BufferStart + 8 + i * 4)); - - /* Server */ - my_alloc_called = 0; - StubMsg.IsClient = 0; - mem = NULL; - StubMsg.Buffer = StubMsg.BufferStart; - ptr = NdrComplexStructUnmarshall( &StubMsg, (unsigned char **)&mem, &fmtstr_complex_struct[30], 0); - ok(ptr == NULL, "ret %p\n", ptr); - ok(mem->size == 20, "mem->size wasn't unmarshalled correctly (%d)\n", mem->size); - ok(mem->array[0] == NULL, "mem->array[0] wasn't unmarshalled correctly (%p)\n", mem->array[0]); - StubMsg.pfnFree(mem); - - HeapFree(GetProcessHeap(), 0, StubMsg.RpcMsg->Buffer); - HeapFree(GetProcessHeap(), 0, memsrc); -} - - -static void test_conf_complex_array(void) -{ - RPC_MESSAGE RpcMessage; - MIDL_STUB_MESSAGE StubMsg; - MIDL_STUB_DESC StubDesc; - void *ptr; - unsigned int i, j; - struct conf_complex - { - unsigned int dim1, dim2; - DWORD **array; - }; - struct conf_complex memsrc; - struct conf_complex *mem; - DWORD *buf, expected_length; - - static const unsigned char fmtstr_complex_array[] = - { - -/* 0 */ 0x21, /* FC_BOGUS_ARRAY */ - 0x3, /* 3 */ -/* 2 */ NdrFcShort( 0x0 ), /* 0 */ -/* 4 */ 0x19, 0x0, /* Corr desc: field pointer, FC_ULONG */ -/* 6 */ NdrFcShort( 0x4 ), /* 4 */ -/* 8 */ NdrFcLong( 0xffffffff ), /* -1 */ -/* 12 */ 0x8, /* FC_LONG */ - 0x5b, /* FC_END */ -/* 14 */ - 0x21, /* FC_BOGUS_ARRAY */ - 0x3, /* 3 */ -/* 16 */ NdrFcShort( 0x0 ), /* 0 */ -/* 18 */ 0x19, /* Corr desc: field pointer, FC_ULONG */ - 0x0, /* */ -/* 20 */ NdrFcShort( 0x0 ), /* 0 */ -/* 22 */ NdrFcLong( 0xffffffff ), /* -1 */ -/* 26 */ 0x12, 0x0, /* FC_UP */ -/* 28 */ NdrFcShort( 0xffe4 ), /* Offset= -28 (0) */ -/* 30 */ 0x5c, /* FC_PAD */ - 0x5b, /* FC_END */ - -#ifdef _WIN64 -/* 32 */ 0x1a, /* FC_BOGUS_STRUCT */ - 0x3, /* 3 */ -/* 34 */ NdrFcShort( 0x10 ), /* 16 */ -/* 36 */ NdrFcShort( 0x0 ), /* 0 */ -/* 38 */ NdrFcShort( 0x6 ), /* Offset= 6 (44) */ -/* 40 */ 0x8, /* FC_LONG */ - 0x8, /* FC_LONG */ -/* 42 */ 0x36, /* FC_POINTER */ - 0x5b, /* FC_END */ -/* 44 */ - 0x12, 0x0, /* FC_UP */ -/* 46 */ NdrFcShort( 0xffe0 ), /* Offset= -32 (14) */ -#else -/* 32 */ - 0x16, /* FC_PSTRUCT */ - 0x3, /* 3 */ -/* 34 */ NdrFcShort( 0xc ), /* 12 */ -/* 36 */ 0x4b, /* FC_PP */ - 0x5c, /* FC_PAD */ -/* 38 */ 0x46, /* FC_NO_REPEAT */ - 0x5c, /* FC_PAD */ -/* 40 */ NdrFcShort( 0x8 ), /* 8 */ -/* 42 */ NdrFcShort( 0x8 ), /* 8 */ -/* 44 */ 0x12, 0x0, /* FC_UP */ -/* 46 */ NdrFcShort( 0xffe0 ), /* Offset= -32 (14) */ -/* 48 */ 0x5b, /* FC_END */ - 0x8, /* FC_LONG */ -/* 50 */ 0x8, /* FC_LONG */ - 0x8, /* FC_LONG */ -/* 52 */ 0x5c, /* FC_PAD */ - 0x5b, /* FC_END */ -#endif - }; - - memsrc.dim1 = 5; - memsrc.dim2 = 3; - - memsrc.array = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, memsrc.dim1 * sizeof(DWORD*)); - - for(i = 0; i < memsrc.dim1; i++) - { - memsrc.array[i] = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, memsrc.dim2 * sizeof(DWORD)); - for(j = 0; j < memsrc.dim2; j++) - memsrc.array[i][j] = i * memsrc.dim2 + j; - } - - StubDesc = Object_StubDesc; - StubDesc.pFormatTypes = fmtstr_complex_array; - - NdrClientInitializeNew( - &RpcMessage, - &StubMsg, - &StubDesc, - 0); - - StubMsg.BufferLength = 0; - -#ifdef _WIN64 - NdrComplexStructBufferSize( &StubMsg, - (unsigned char *)&memsrc, - &fmtstr_complex_array[32] ); -#else - NdrSimpleStructBufferSize( &StubMsg, - (unsigned char *)&memsrc, - &fmtstr_complex_array[32] ); -#endif - - expected_length = (4 + memsrc.dim1 * (2 + memsrc.dim2)) * 4; - if (StubMsg.BufferLength == 96) - { - win_skip("Tests crash on Win9x, WinMe and NT4\n"); - goto cleanup; - } - ok(StubMsg.BufferLength >= expected_length, "length %d\n", StubMsg.BufferLength); - - /*NdrGetBuffer(&_StubMsg, _StubMsg.BufferLength, NULL);*/ - StubMsg.RpcMsg->Buffer = StubMsg.BufferStart = StubMsg.Buffer = HeapAlloc(GetProcessHeap(), 0, StubMsg.BufferLength); - StubMsg.BufferEnd = StubMsg.BufferStart + StubMsg.BufferLength; - -#ifdef _WIN64 - ptr = NdrComplexStructMarshall( &StubMsg, (unsigned char *)&memsrc, - &fmtstr_complex_array[32] ); -#else - ptr = NdrSimpleStructMarshall( &StubMsg, (unsigned char *)&memsrc, - &fmtstr_complex_array[32] ); -#endif - - ok(ptr == NULL, "ret %p\n", ptr); - ok((char*)StubMsg.Buffer == (char*)StubMsg.BufferStart + expected_length, "not at expected length\n"); - - buf = (DWORD *)StubMsg.BufferStart; - - ok(*buf == memsrc.dim1, "dim1 should have been %d instead of %08x\n", memsrc.dim1, *buf); - buf++; - ok(*buf == memsrc.dim2, "dim2 should have been %d instead of %08x\n", memsrc.dim2, *buf); - buf++; - ok(*buf != 0, "pointer id should be non-zero\n"); - buf++; - ok(*buf == memsrc.dim1, "Conformance should have been %d instead of %08x\n", memsrc.dim1, *buf); - buf++; - for(i = 0; i < memsrc.dim1; i++) - { - ok(*buf != 0, "pointer id[%d] should be non-zero\n", i); - buf++; - } - for(i = 0; i < memsrc.dim1; i++) - { - ok(*buf == memsrc.dim2, "Conformance should have been %d instead of %08x\n", memsrc.dim2, *buf); - buf++; - for(j = 0; j < memsrc.dim2; j++) - { - ok(*buf == i * memsrc.dim2 + j, "got %08x\n", *buf); - buf++; - } - } - - ok((void*)buf == StubMsg.Buffer, "not at end of buffer\n"); - - /* Server */ - my_alloc_called = 0; - StubMsg.IsClient = 0; - mem = NULL; - StubMsg.Buffer = StubMsg.BufferStart; -#ifdef _WIN64 - ptr = NdrComplexStructUnmarshall( &StubMsg, (unsigned char **)&mem, &fmtstr_complex_array[32], 0); -#else - ptr = NdrSimpleStructUnmarshall( &StubMsg, (unsigned char **)&mem, &fmtstr_complex_array[32], 0); -#endif - ok(ptr == NULL, "ret %p\n", ptr); - ok(mem->dim1 == memsrc.dim1, "mem->dim1 wasn't unmarshalled correctly (%d)\n", mem->dim1); - ok(mem->dim2 == memsrc.dim2, "mem->dim2 wasn't unmarshalled correctly (%d)\n", mem->dim2); - ok(mem->array[1][0] == memsrc.dim2, "mem->array[1][0] wasn't unmarshalled correctly (%d)\n", mem->array[1][0]); - - StubMsg.Buffer = StubMsg.BufferStart; -#ifdef _WIN64 - NdrComplexStructFree( &StubMsg, (unsigned char*)mem, &fmtstr_complex_array[32]); -#else - NdrSimpleStructFree( &StubMsg, (unsigned char*)mem, &fmtstr_complex_array[32]); -#endif - - HeapFree(GetProcessHeap(), 0, StubMsg.RpcMsg->Buffer); - -cleanup: - for(i = 0; i < memsrc.dim1; i++) - HeapFree(GetProcessHeap(), 0, memsrc.array[i]); - HeapFree(GetProcessHeap(), 0, memsrc.array); -} - -static void test_ndr_buffer(void) -{ - static unsigned char ncalrpc[] = "ncalrpc"; - static unsigned char endpoint[] = "winetest:test_ndr_buffer"; - RPC_MESSAGE RpcMessage; - MIDL_STUB_MESSAGE StubMsg; - MIDL_STUB_DESC StubDesc = Object_StubDesc; - unsigned char *ret; - unsigned char *binding; - RPC_BINDING_HANDLE Handle; - RPC_STATUS status; - ULONG prev_buffer_length; - BOOL old_buffer_valid_location; - - StubDesc.RpcInterfaceInformation = (void *)&IFoo___RpcServerInterface; - - status = RpcServerUseProtseqEp(ncalrpc, 20, endpoint, NULL); - ok(RPC_S_OK == status, "RpcServerUseProtseqEp failed with status %u\n", status); - status = RpcServerRegisterIf(IFoo_v0_0_s_ifspec, NULL, NULL); - ok(RPC_S_OK == status, "RpcServerRegisterIf failed with status %u\n", status); - status = RpcServerListen(1, 20, TRUE); - ok(RPC_S_OK == status, "RpcServerListen failed with status %u\n", status); - if (status != RPC_S_OK) - { - /* Failed to create a server, running client tests is useless */ - return; - } - - status = RpcStringBindingCompose(NULL, ncalrpc, NULL, endpoint, NULL, &binding); - ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%u)\n", status); - - status = RpcBindingFromStringBinding(binding, &Handle); - ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%u)\n", status); - RpcStringFree(&binding); - - NdrClientInitializeNew(&RpcMessage, &StubMsg, &StubDesc, 5); - - ret = NdrGetBuffer(&StubMsg, 10, Handle); - ok(ret == StubMsg.Buffer, "NdrGetBuffer should have returned the same value as StubMsg.Buffer instead of %p\n", ret); - ok(RpcMessage.Handle != NULL, "RpcMessage.Handle should not have been NULL\n"); - ok(RpcMessage.Buffer != NULL, "RpcMessage.Buffer should not have been NULL\n"); - ok(RpcMessage.BufferLength == 10 || - broken(RpcMessage.BufferLength == 12), /* win2k */ - "RpcMessage.BufferLength should have been 10 instead of %d\n", RpcMessage.BufferLength); - ok(RpcMessage.RpcFlags == 0, "RpcMessage.RpcFlags should have been 0x0 instead of 0x%x\n", RpcMessage.RpcFlags); - ok(StubMsg.Buffer != NULL, "Buffer should not have been NULL\n"); - ok(!StubMsg.BufferStart, "BufferStart should have been NULL instead of %p\n", StubMsg.BufferStart); - ok(!StubMsg.BufferEnd, "BufferEnd should have been NULL instead of %p\n", StubMsg.BufferEnd); -todo_wine - ok(StubMsg.BufferLength == 0, "BufferLength should have left as 0 instead of being set to %d\n", StubMsg.BufferLength); - old_buffer_valid_location = !StubMsg.fBufferValid; - if (old_buffer_valid_location) - ok(broken(StubMsg.CorrDespIncrement == TRUE), "fBufferValid should have been TRUE instead of 0x%x\n", StubMsg.CorrDespIncrement); - else - ok(StubMsg.fBufferValid, "fBufferValid should have been non-zero instead of 0x%x\n", StubMsg.fBufferValid); - - prev_buffer_length = RpcMessage.BufferLength; - StubMsg.BufferLength = 1; - NdrFreeBuffer(&StubMsg); - ok(RpcMessage.Handle != NULL, "RpcMessage.Handle should not have been NULL\n"); - ok(RpcMessage.Buffer != NULL, "RpcMessage.Buffer should not have been NULL\n"); - ok(RpcMessage.BufferLength == prev_buffer_length, "RpcMessage.BufferLength should have been left as %d instead of %d\n", prev_buffer_length, RpcMessage.BufferLength); - ok(StubMsg.Buffer != NULL, "Buffer should not have been NULL\n"); - ok(StubMsg.BufferLength == 1, "BufferLength should have left as 1 instead of being set to %d\n", StubMsg.BufferLength); - if (old_buffer_valid_location) - ok(broken(StubMsg.CorrDespIncrement == FALSE), "fBufferValid should have been FALSE instead of 0x%x\n", StubMsg.CorrDespIncrement); - else - ok(!StubMsg.fBufferValid, "fBufferValid should have been FALSE instead of %d\n", StubMsg.fBufferValid); - - /* attempt double-free */ - NdrFreeBuffer(&StubMsg); - - RpcBindingFree(&Handle); - - status = RpcServerUnregisterIf(NULL, NULL, FALSE); - ok(status == RPC_S_OK, "RpcServerUnregisterIf failed (%u)\n", status); -} - -static void test_NdrMapCommAndFaultStatus(void) -{ - RPC_STATUS rpc_status; - MIDL_STUB_MESSAGE StubMsg; - RPC_MESSAGE RpcMessage; - - NdrClientInitializeNew(&RpcMessage, &StubMsg, &Object_StubDesc, 5); - - for (rpc_status = 0; rpc_status < 10000; rpc_status++) - { - RPC_STATUS status; - ULONG comm_status = 0; - ULONG fault_status = 0; - ULONG expected_comm_status = 0; - ULONG expected_fault_status = 0; - status = NdrMapCommAndFaultStatus(&StubMsg, &comm_status, &fault_status, rpc_status); - ok(status == RPC_S_OK, "NdrMapCommAndFaultStatus failed with error %d\n", status); - switch (rpc_status) - { - case ERROR_INVALID_HANDLE: - case RPC_S_INVALID_BINDING: - case RPC_S_UNKNOWN_IF: - case RPC_S_SERVER_UNAVAILABLE: - case RPC_S_SERVER_TOO_BUSY: - case RPC_S_CALL_FAILED_DNE: - case RPC_S_PROTOCOL_ERROR: - case RPC_S_UNSUPPORTED_TRANS_SYN: - case RPC_S_UNSUPPORTED_TYPE: - case RPC_S_PROCNUM_OUT_OF_RANGE: - case EPT_S_NOT_REGISTERED: - case RPC_S_COMM_FAILURE: - expected_comm_status = rpc_status; - break; - default: - expected_fault_status = rpc_status; - } - ok(comm_status == expected_comm_status, "NdrMapCommAndFaultStatus should have mapped %d to comm status %d instead of %d\n", - rpc_status, expected_comm_status, comm_status); - ok(fault_status == expected_fault_status, "NdrMapCommAndFaultStatus should have mapped %d to fault status %d instead of %d\n", - rpc_status, expected_fault_status, fault_status); - } -} - -static void test_NdrGetUserMarshalInfo(void) -{ - RPC_STATUS status; - MIDL_STUB_MESSAGE stubmsg; - USER_MARSHAL_CB umcb; - NDR_USER_MARSHAL_INFO umi; - unsigned char buffer[16]; - void *rpc_channel_buffer = (void *)(ULONG_PTR)0xcafebabe; - RPC_MESSAGE rpc_msg; - RPC_STATUS (RPC_ENTRY *pNdrGetUserMarshalInfo)(ULONG *,ULONG,NDR_USER_MARSHAL_INFO *); - - pNdrGetUserMarshalInfo = (void *)GetProcAddress(GetModuleHandle("rpcrt4.dll"), "NdrGetUserMarshalInfo"); - if (!pNdrGetUserMarshalInfo) - { - skip("NdrGetUserMarshalInfo not exported\n"); - return; - } - - /* unmarshall */ - - memset(&rpc_msg, 0xcc, sizeof(rpc_msg)); - rpc_msg.Buffer = buffer; - rpc_msg.BufferLength = 16; - - memset(&stubmsg, 0xcc, sizeof(stubmsg)); - stubmsg.RpcMsg = &rpc_msg; - stubmsg.dwDestContext = MSHCTX_INPROC; - stubmsg.pvDestContext = NULL; - stubmsg.Buffer = buffer + 15; - stubmsg.BufferLength = 0; - stubmsg.BufferEnd = NULL; - stubmsg.pRpcChannelBuffer = rpc_channel_buffer; - stubmsg.StubDesc = NULL; - stubmsg.pfnAllocate = my_alloc; - stubmsg.pfnFree = my_free; - - memset(&umcb, 0xcc, sizeof(umcb)); - umcb.Flags = MAKELONG(MSHCTX_INPROC, NDR_LOCAL_DATA_REPRESENTATION); - umcb.pStubMsg = &stubmsg; - umcb.Signature = USER_MARSHAL_CB_SIGNATURE; - umcb.CBType = USER_MARSHAL_CB_UNMARSHALL; - - memset(&umi, 0xaa, sizeof(umi)); - - status = pNdrGetUserMarshalInfo(&umcb.Flags, 1, &umi); - ok(status == RPC_S_OK, "NdrGetUserMarshalInfo failed with error %d\n", status); - ok( umi.InformationLevel == 1, - "umi.InformationLevel was %u instead of 1\n", - umi.InformationLevel); - ok( U1(umi).Level1.Buffer == buffer + 15, - "umi.Level1.Buffer was %p instead of %p\n", - U1(umi).Level1.Buffer, buffer); - ok( U1(umi).Level1.BufferSize == 1, - "umi.Level1.BufferSize was %u instead of 1\n", - U1(umi).Level1.BufferSize); - ok( U1(umi).Level1.pfnAllocate == my_alloc, - "umi.Level1.pfnAllocate was %p instead of %p\n", - U1(umi).Level1.pfnAllocate, my_alloc); - ok( U1(umi).Level1.pfnFree == my_free, - "umi.Level1.pfnFree was %p instead of %p\n", - U1(umi).Level1.pfnFree, my_free); - ok( U1(umi).Level1.pRpcChannelBuffer == rpc_channel_buffer, - "umi.Level1.pRpcChannelBuffer was %p instead of %p\n", - U1(umi).Level1.pRpcChannelBuffer, rpc_channel_buffer); - - /* buffer size */ - - rpc_msg.Buffer = buffer; - rpc_msg.BufferLength = 16; - - stubmsg.Buffer = buffer; - stubmsg.BufferLength = 16; - stubmsg.BufferEnd = NULL; - - umcb.CBType = USER_MARSHAL_CB_BUFFER_SIZE; - - memset(&umi, 0xaa, sizeof(umi)); - - status = pNdrGetUserMarshalInfo(&umcb.Flags, 1, &umi); - ok(status == RPC_S_OK, "NdrGetUserMarshalInfo failed with error %d\n", status); - ok( umi.InformationLevel == 1, - "umi.InformationLevel was %u instead of 1\n", - umi.InformationLevel); - ok( U1(umi).Level1.Buffer == NULL, - "umi.Level1.Buffer was %p instead of NULL\n", - U1(umi).Level1.Buffer); - ok( U1(umi).Level1.BufferSize == 0, - "umi.Level1.BufferSize was %u instead of 0\n", - U1(umi).Level1.BufferSize); - ok( U1(umi).Level1.pfnAllocate == my_alloc, - "umi.Level1.pfnAllocate was %p instead of %p\n", - U1(umi).Level1.pfnAllocate, my_alloc); - ok( U1(umi).Level1.pfnFree == my_free, - "umi.Level1.pfnFree was %p instead of %p\n", - U1(umi).Level1.pfnFree, my_free); - ok( U1(umi).Level1.pRpcChannelBuffer == rpc_channel_buffer, - "umi.Level1.pRpcChannelBuffer was %p instead of %p\n", - U1(umi).Level1.pRpcChannelBuffer, rpc_channel_buffer); - - /* marshall */ - - rpc_msg.Buffer = buffer; - rpc_msg.BufferLength = 16; - - stubmsg.Buffer = buffer + 15; - stubmsg.BufferLength = 0; - stubmsg.BufferEnd = NULL; - - umcb.CBType = USER_MARSHAL_CB_MARSHALL; - - memset(&umi, 0xaa, sizeof(umi)); - - status = pNdrGetUserMarshalInfo(&umcb.Flags, 1, &umi); - ok(status == RPC_S_OK, "NdrGetUserMarshalInfo failed with error %d\n", status); - ok( umi.InformationLevel == 1, - "umi.InformationLevel was %u instead of 1\n", - umi.InformationLevel); - ok( U1(umi).Level1.Buffer == buffer + 15, - "umi.Level1.Buffer was %p instead of %p\n", - U1(umi).Level1.Buffer, buffer); - ok( U1(umi).Level1.BufferSize == 1, - "umi.Level1.BufferSize was %u instead of 1\n", - U1(umi).Level1.BufferSize); - ok( U1(umi).Level1.pfnAllocate == my_alloc, - "umi.Level1.pfnAllocate was %p instead of %p\n", - U1(umi).Level1.pfnAllocate, my_alloc); - ok( U1(umi).Level1.pfnFree == my_free, - "umi.Level1.pfnFree was %p instead of %p\n", - U1(umi).Level1.pfnFree, my_free); - ok( U1(umi).Level1.pRpcChannelBuffer == rpc_channel_buffer, - "umi.Level1.pRpcChannelBuffer was %p instead of %p\n", - U1(umi).Level1.pRpcChannelBuffer, rpc_channel_buffer); - - /* free */ - - rpc_msg.Buffer = buffer; - rpc_msg.BufferLength = 16; - - stubmsg.Buffer = buffer; - stubmsg.BufferLength = 16; - stubmsg.BufferEnd = NULL; - - umcb.CBType = USER_MARSHAL_CB_FREE; - - memset(&umi, 0xaa, sizeof(umi)); - - status = pNdrGetUserMarshalInfo(&umcb.Flags, 1, &umi); - ok(status == RPC_S_OK, "NdrGetUserMarshalInfo failed with error %d\n", status); - ok( umi.InformationLevel == 1, - "umi.InformationLevel was %u instead of 1\n", - umi.InformationLevel); - ok( U1(umi).Level1.Buffer == NULL, - "umi.Level1.Buffer was %p instead of NULL\n", - U1(umi).Level1.Buffer); - ok( U1(umi).Level1.BufferSize == 0, - "umi.Level1.BufferSize was %u instead of 0\n", - U1(umi).Level1.BufferSize); - ok( U1(umi).Level1.pfnAllocate == my_alloc, - "umi.Level1.pfnAllocate was %p instead of %p\n", - U1(umi).Level1.pfnAllocate, my_alloc); - ok( U1(umi).Level1.pfnFree == my_free, - "umi.Level1.pfnFree was %p instead of %p\n", - U1(umi).Level1.pfnFree, my_free); - ok( U1(umi).Level1.pRpcChannelBuffer == rpc_channel_buffer, - "umi.Level1.pRpcChannelBuffer was %p instead of %p\n", - U1(umi).Level1.pRpcChannelBuffer, rpc_channel_buffer); - - /* boundary test */ - - rpc_msg.Buffer = buffer; - rpc_msg.BufferLength = 15; - - stubmsg.Buffer = buffer + 15; - stubmsg.BufferLength = 0; - stubmsg.BufferEnd = NULL; - - umcb.CBType = USER_MARSHAL_CB_MARSHALL; - - status = pNdrGetUserMarshalInfo(&umcb.Flags, 1, &umi); - ok(status == RPC_S_OK, "NdrGetUserMarshalInfo failed with error %d\n", status); - ok( U1(umi).Level1.BufferSize == 0, - "umi.Level1.BufferSize was %u instead of 0\n", - U1(umi).Level1.BufferSize); - - /* error conditions */ - - rpc_msg.BufferLength = 14; - status = pNdrGetUserMarshalInfo(&umcb.Flags, 1, &umi); - ok(status == ERROR_INVALID_USER_BUFFER, - "NdrGetUserMarshalInfo should have failed with ERROR_INVALID_USER_BUFFER instead of %d\n", status); - - rpc_msg.BufferLength = 15; - status = pNdrGetUserMarshalInfo(&umcb.Flags, 9999, &umi); - ok(status == RPC_S_INVALID_ARG, - "NdrGetUserMarshalInfo should have failed with RPC_S_INVALID_ARG instead of %d\n", status); - - umcb.CBType = 9999; - status = pNdrGetUserMarshalInfo(&umcb.Flags, 1, &umi); - ok(status == RPC_S_OK, "NdrGetUserMarshalInfo failed with error %d\n", status); - - umcb.CBType = USER_MARSHAL_CB_MARSHALL; - umcb.Signature = 0; - status = pNdrGetUserMarshalInfo(&umcb.Flags, 1, &umi); - ok(status == RPC_S_INVALID_ARG, - "NdrGetUserMarshalInfo should have failed with RPC_S_INVALID_ARG instead of %d\n", status); -} - -START_TEST( ndr_marshall ) -{ - determine_pointer_marshalling_style(); - - test_ndr_simple_type(); - test_simple_types(); - test_nontrivial_pointer_types(); - test_simple_struct(); - test_fullpointer_xlat(); - test_client_init(); - test_server_init(); - test_ndr_allocate(); - test_conformant_array(); - test_conformant_string(); - test_nonconformant_string(); - test_conf_complex_struct(); - test_conf_complex_array(); - test_ndr_buffer(); - test_NdrMapCommAndFaultStatus(); - test_NdrGetUserMarshalInfo(); -} diff --git a/rostests/winetests/rpcrt4/rpc.c b/rostests/winetests/rpcrt4/rpc.c deleted file mode 100644 index 8e965e594ca..00000000000 --- a/rostests/winetests/rpcrt4/rpc.c +++ /dev/null @@ -1,871 +0,0 @@ -/* - * Unit test suite for rpc functions - * - * Copyright 2002 Greg Turner - * - * 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 -#define WIN32_NO_STATUS -#include "wine/test.h" -#include -#include -#include -#include -#include - -#include "rpc.h" -#include "rpcdce.h" - -typedef unsigned int unsigned32; -typedef struct twr_t - { - unsigned32 tower_length; - /* [size_is] */ byte tower_octet_string[ 1 ]; - } twr_t; - -RPC_STATUS WINAPI TowerExplode(const twr_t *tower, RPC_SYNTAX_IDENTIFIER *object, RPC_SYNTAX_IDENTIFIER *syntax, char **protseq, char **endpoint, char **address); -RPC_STATUS WINAPI TowerConstruct(const RPC_SYNTAX_IDENTIFIER *object, const RPC_SYNTAX_IDENTIFIER *syntax, const char *protseq, const char *endpoint, const char *address, twr_t **tower); - -static UUID Uuid_Table[10] = { - { 0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }, /* 0 (null) */ - { 0xdeadbeef, 0xdead, 0xbeef, {0x10, 0x21, 0x35, 0x56, 0x89, 0xa0, 0xf4, 0x8a} }, /* 1 */ - { 0xabadfeed, 0x49ff, 0xbead, {0x8a, 0xf4, 0xa0, 0x89, 0x56, 0x35, 0x21, 0x10} }, /* 2 */ - { 0x93da375c, 0x1324, 0x1355, {0x87, 0xff, 0x49, 0x44, 0x34, 0x44, 0x22, 0x19} }, /* 3 */ - { 0xdeadbeef, 0xdead, 0xbeef, {0x10, 0x21, 0x35, 0x56, 0x89, 0xa0, 0xf4, 0x8b} }, /* 4 (~1) */ - { 0x9badfeed, 0x49ff, 0xbead, {0x8a, 0xf4, 0xa0, 0x89, 0x56, 0x35, 0x21, 0x10} }, /* 5 (~2) */ - { 0x00000000, 0x0001, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }, /* 6 (~0) */ - { 0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01} }, /* 7 (~0) */ - { 0x12312312, 0x1231, 0x1231, {0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xff} }, /* 8 */ - { 0x11111111, 0x1111, 0x1111, {0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11} } /* 9 */ -}; - -/* index of "10" means "NULL" */ -static BOOL Uuid_Comparison_Grid[11][11] = { - { TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE }, - { FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE }, - { FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE }, - { FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE }, - { FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE }, - { FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, - { FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE }, - { FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE }, - { FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE }, - { FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE }, - { TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE } -}; - -static void UuidConversionAndComparison(void) { - CHAR strx[100], x; - LPSTR str = strx; - WCHAR wstrx[100], wx; - LPWSTR wstr = wstrx; - - UUID Uuid1, Uuid2, *PUuid1, *PUuid2; - RPC_STATUS rslt; - - int i1,i2; - - /* Uuid Equality */ - for (i1 = 0; i1 < 11; i1++) - for (i2 = 0; i2 < 11; i2++) { - if (i1 < 10) { - Uuid1 = Uuid_Table[i1]; - PUuid1 = &Uuid1; - } else { - PUuid1 = NULL; - } - if (i2 < 10) { - Uuid2 = Uuid_Table[i2]; - PUuid2 = &Uuid2; - } else { - PUuid2 = NULL; - } - ok( (UuidEqual(PUuid1, PUuid2, &rslt) == Uuid_Comparison_Grid[i1][i2]), "UUID Equality\n" ); - } - - /* Uuid to String to Uuid (char) */ - for (i1 = 0; i1 < 10; i1++) { - Uuid1 = Uuid_Table[i1]; - ok( (UuidToStringA(&Uuid1, (unsigned char**)&str) == RPC_S_OK), "Simple UUID->String copy\n" ); - ok( (UuidFromStringA((unsigned char*)str, &Uuid2) == RPC_S_OK), "Simple String->UUID copy from generated UUID String\n" ); - ok( UuidEqual(&Uuid1, &Uuid2, &rslt), "Uuid -> String -> Uuid transform\n" ); - /* invalid uuid tests -- size of valid UUID string=36 */ - for (i2 = 0; i2 < 36; i2++) { - x = str[i2]; - str[i2] = 'g'; /* whatever, but "g" is a good boundary condition */ - ok( (UuidFromStringA((unsigned char*)str, &Uuid1) == RPC_S_INVALID_STRING_UUID), "Invalid UUID String\n" ); - str[i2] = x; /* change it back so remaining tests are interesting. */ - } - RpcStringFree((unsigned char **)&str); - } - - /* Uuid to String to Uuid (wchar) */ - for (i1 = 0; i1 < 10; i1++) { - Uuid1 = Uuid_Table[i1]; - rslt=UuidToStringW(&Uuid1, &wstr); - ok( (rslt == RPC_S_OK), "Simple UUID->WString copy\n" ); - ok( (UuidFromStringW(wstr, &Uuid2) == RPC_S_OK), "Simple WString->UUID copy from generated UUID String\n" ); - ok( UuidEqual(&Uuid1, &Uuid2, &rslt), "Uuid -> WString -> Uuid transform\n" ); - /* invalid uuid tests -- size of valid UUID string=36 */ - for (i2 = 0; i2 < 36; i2++) { - wx = wstr[i2]; - wstr[i2] = 'g'; /* whatever, but "g" is a good boundary condition */ - ok( (UuidFromStringW(wstr, &Uuid1) == RPC_S_INVALID_STRING_UUID), "Invalid UUID WString\n" ); - wstr[i2] = wx; /* change it back so remaining tests are interesting. */ - } - RpcStringFreeW(&wstr); - } -} - -static void TestDceErrorInqText (void) -{ - char bufferInvalid [1024]; - char buffer [1024]; /* The required size is not documented but would - * appear to be 256. - */ - DWORD dwCount; - - dwCount = FormatMessageA (FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, RPC_S_NOT_RPC_ERROR, 0, bufferInvalid, - sizeof(bufferInvalid)/sizeof(bufferInvalid[0]), NULL); - - /* A random sample of DceErrorInqText */ - /* 0 is success */ - ok ((DceErrorInqTextA (0, (unsigned char*)buffer) == RPC_S_OK), - "DceErrorInqTextA(0...)\n"); - /* A real RPC_S error */ - ok ((DceErrorInqTextA (RPC_S_INVALID_STRING_UUID, (unsigned char*)buffer) == RPC_S_OK), - "DceErrorInqTextA(valid...)\n"); - - if (dwCount) - { - /* A message for which FormatMessage should fail - * which should return RPC_S_OK and the - * fixed "not valid" message - */ - ok ((DceErrorInqTextA (35, (unsigned char*)buffer) == RPC_S_OK && - strcmp (buffer, bufferInvalid) == 0), - "DceErrorInqTextA(unformattable...)\n"); - /* One for which FormatMessage should succeed but - * DceErrorInqText should "fail" - * 3814 is generally quite a long message - */ - ok ((DceErrorInqTextA (3814, (unsigned char*)buffer) == RPC_S_OK && - strcmp (buffer, bufferInvalid) == 0), - "DceErrorInqTextA(deviation...)\n"); - } - else - ok (0, "Cannot set up for DceErrorInqText\n"); -} - -static RPC_DISPATCH_FUNCTION IFoo_table[] = -{ - 0 -}; - -static RPC_DISPATCH_TABLE IFoo_v0_0_DispatchTable = -{ - 0, - IFoo_table -}; - -static const RPC_SERVER_INTERFACE IFoo___RpcServerInterface = -{ - sizeof(RPC_SERVER_INTERFACE), - {{0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x34}},{0,0}}, - {{0x8a885d04,0x1ceb,0x11c9,{0x9f,0xe8,0x08,0x00,0x2b,0x10,0x48,0x60}},{2,0}}, - &IFoo_v0_0_DispatchTable, - 0, - 0, - 0, - 0, - 0, -}; - -static RPC_IF_HANDLE IFoo_v0_0_s_ifspec = (RPC_IF_HANDLE)& IFoo___RpcServerInterface; - -static void test_rpc_ncacn_ip_tcp(void) -{ - RPC_STATUS status; - unsigned char *binding, *principal; - handle_t IFoo_IfHandle; - ULONG level, authnsvc, authzsvc; - RPC_AUTH_IDENTITY_HANDLE identity; - static unsigned char foo[] = "foo"; - static unsigned char ncacn_ip_tcp[] = "ncacn_ip_tcp"; - static unsigned char address[] = "127.0.0.1"; - static unsigned char endpoint[] = "4114"; - static unsigned char spn[] = "principal"; - - status = RpcNetworkIsProtseqValid(foo); - ok(status == RPC_S_INVALID_RPC_PROTSEQ, "return wrong\n"); - - status = RpcNetworkIsProtseqValid(ncacn_ip_tcp); - ok(status == RPC_S_OK, "return wrong\n"); - - status = RpcMgmtStopServerListening(NULL); -todo_wine { - ok(status == RPC_S_NOT_LISTENING, - "wrong RpcMgmtStopServerListening error (%u)\n", status); -} - - status = RpcMgmtWaitServerListen(); - ok(status == RPC_S_NOT_LISTENING, - "wrong RpcMgmtWaitServerListen error status (%u)\n", status); - - status = RpcServerListen(1, 20, FALSE); - ok(status == RPC_S_NO_PROTSEQS_REGISTERED, - "wrong RpcServerListen error (%u)\n", status); - - status = RpcServerUseProtseqEp(ncacn_ip_tcp, 20, endpoint, NULL); - ok(status == RPC_S_OK, "RpcServerUseProtseqEp failed (%u)\n", status); - - status = RpcServerRegisterIf(IFoo_v0_0_s_ifspec, NULL, NULL); - ok(status == RPC_S_OK, "RpcServerRegisterIf failed (%u)\n", status); - - status = RpcServerListen(1, 20, TRUE); -todo_wine { - ok(status == RPC_S_OK, "RpcServerListen failed (%u)\n", status); -} - - status = RpcServerListen(1, 20, TRUE); -todo_wine { - ok(status == RPC_S_ALREADY_LISTENING, - "wrong RpcServerListen error (%u)\n", status); -} - - status = RpcStringBindingCompose(NULL, ncacn_ip_tcp, address, - endpoint, NULL, &binding); - ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%u)\n", status); - - status = RpcBindingFromStringBinding(binding, &IFoo_IfHandle); - ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%u)\n", - status); - - status = RpcBindingSetAuthInfo(IFoo_IfHandle, NULL, RPC_C_AUTHN_LEVEL_NONE, - RPC_C_AUTHN_WINNT, NULL, RPC_C_AUTHZ_NAME); - ok(status == RPC_S_OK, "RpcBindingSetAuthInfo failed (%u)\n", status); - - status = RpcBindingInqAuthInfo(IFoo_IfHandle, NULL, NULL, NULL, NULL, NULL); - ok(status == RPC_S_BINDING_HAS_NO_AUTH, "RpcBindingInqAuthInfo failed (%u)\n", - status); - - status = RpcBindingSetAuthInfo(IFoo_IfHandle, spn, RPC_C_AUTHN_LEVEL_PKT_PRIVACY, - RPC_C_AUTHN_WINNT, NULL, RPC_C_AUTHZ_NAME); - ok(status == RPC_S_OK, "RpcBindingSetAuthInfo failed (%u)\n", status); - - level = authnsvc = authzsvc = 0; - principal = (unsigned char *)0xdeadbeef; - identity = (RPC_AUTH_IDENTITY_HANDLE *)0xdeadbeef; - status = RpcBindingInqAuthInfo(IFoo_IfHandle, &principal, &level, &authnsvc, - &identity, &authzsvc); - - ok(status == RPC_S_OK, "RpcBindingInqAuthInfo failed (%u)\n", status); - ok(identity == NULL, "expected NULL identity, got %p\n", identity); - ok(principal != (unsigned char *)0xdeadbeef, "expected valid principal, got %p\n", principal); - ok(level == RPC_C_AUTHN_LEVEL_PKT_PRIVACY, "expected RPC_C_AUTHN_LEVEL_PKT_PRIVACY, got %d\n", level); - ok(authnsvc == RPC_C_AUTHN_WINNT, "expected RPC_C_AUTHN_WINNT, got %d\n", authnsvc); - todo_wine ok(authzsvc == RPC_C_AUTHZ_NAME, "expected RPC_C_AUTHZ_NAME, got %d\n", authzsvc); - if (status == RPC_S_OK) RpcStringFree(&principal); - - status = RpcMgmtStopServerListening(NULL); - ok(status == RPC_S_OK, "RpcMgmtStopServerListening failed (%u)\n", - status); - - status = RpcMgmtStopServerListening(NULL); - ok(status == RPC_S_OK, "RpcMgmtStopServerListening failed (%u)\n", - status); - - status = RpcServerUnregisterIf(NULL, NULL, FALSE); - ok(status == RPC_S_OK, "RpcServerUnregisterIf failed (%u)\n", status); - - status = RpcMgmtWaitServerListen(); -todo_wine { - ok(status == RPC_S_OK, "RpcMgmtWaitServerListen failed (%u)\n", status); -} - - status = RpcStringFree(&binding); - ok(status == RPC_S_OK, "RpcStringFree failed (%u)\n", status); - - status = RpcBindingFree(&IFoo_IfHandle); - ok(status == RPC_S_OK, "RpcBindingFree failed (%u)\n", status); -} - -/* this is what's generated with MS/RPC - it includes an extra 2 - * bytes in the protocol floor */ -static const unsigned char tower_data_tcp_ip1[] = -{ - 0x05,0x00,0x13,0x00,0x0d,0x00,0xdb,0xf1, - 0xa4,0x47,0xca,0x67,0x10,0xb3,0x1f,0x00, - 0xdd,0x01,0x06,0x62,0xda,0x00,0x00,0x02, - 0x00,0x00,0x00,0x13,0x00,0x0d,0x04,0x5d, - 0x88,0x8a,0xeb,0x1c,0xc9,0x11,0x9f,0xe8, - 0x08,0x00,0x2b,0x10,0x48,0x60,0x02,0x00, - 0x02,0x00,0x00,0x00,0x01,0x00,0x0b,0x02, - 0x00,0x00,0x00,0x01,0x00,0x07,0x02,0x00, - 0x00,0x87,0x01,0x00,0x09,0x04,0x00,0x0a, - 0x00,0x00,0x01, -}; -/* this is the optimal data that i think should be generated */ -static const unsigned char tower_data_tcp_ip2[] = -{ - 0x05,0x00,0x13,0x00,0x0d,0x00,0xdb,0xf1, - 0xa4,0x47,0xca,0x67,0x10,0xb3,0x1f,0x00, - 0xdd,0x01,0x06,0x62,0xda,0x00,0x00,0x02, - 0x00,0x00,0x00,0x13,0x00,0x0d,0x04,0x5d, - 0x88,0x8a,0xeb,0x1c,0xc9,0x11,0x9f,0xe8, - 0x08,0x00,0x2b,0x10,0x48,0x60,0x02,0x00, - 0x02,0x00,0x00,0x00,0x01,0x00,0x0b,0x00, - 0x00,0x01,0x00,0x07,0x02,0x00,0x00,0x87, - 0x01,0x00,0x09,0x04,0x00,0x0a,0x00,0x00, - 0x01, -}; - -static void test_towers(void) -{ - RPC_STATUS ret; - twr_t *tower; - static const RPC_SYNTAX_IDENTIFIER mapi_if_id = { { 0xa4f1db00, 0xca47, 0x1067, { 0xb3, 0x1f, 0x00, 0xdd, 0x01, 0x06, 0x62, 0xda } }, { 0, 0 } }; - static const RPC_SYNTAX_IDENTIFIER ndr_syntax = { { 0x8a885d04, 0x1ceb, 0x11c9, { 0x9f, 0xe8, 0x08, 0x00, 0x2b, 0x10, 0x48, 0x60 } }, { 2, 0 } }; - RPC_SYNTAX_IDENTIFIER object, syntax; - char *protseq, *endpoint, *address; - BOOL same; - - ret = TowerConstruct(&mapi_if_id, &ndr_syntax, "ncacn_ip_tcp", "135", "10.0.0.1", &tower); - ok(ret == RPC_S_OK || - broken(ret == RPC_S_INVALID_RPC_PROTSEQ), /* Vista */ - "TowerConstruct failed with error %d\n", ret); - if (ret == RPC_S_INVALID_RPC_PROTSEQ) - { - /* Windows Vista fails with this error and crashes if we continue */ - win_skip("TowerConstruct failed, we are most likely on Windows Vista\n"); - return; - } - - /* first check we have the right amount of data */ - ok(tower->tower_length == sizeof(tower_data_tcp_ip1) || - tower->tower_length == sizeof(tower_data_tcp_ip2), - "Wrong size of tower %d\n", tower->tower_length); - - /* then do a byte-by-byte comparison */ - same = ((tower->tower_length == sizeof(tower_data_tcp_ip1)) && - !memcmp(&tower->tower_octet_string, tower_data_tcp_ip1, sizeof(tower_data_tcp_ip1))) || - ((tower->tower_length == sizeof(tower_data_tcp_ip2)) && - !memcmp(&tower->tower_octet_string, tower_data_tcp_ip2, sizeof(tower_data_tcp_ip2))); - - ok(same, "Tower data differs\n"); - if (!same) - { - unsigned32 i; - for (i = 0; i < tower->tower_length; i++) - { - if (i % 8 == 0) printf(" "); - printf("0x%02x,", tower->tower_octet_string[i]); - if (i % 8 == 7) printf("\n"); - } - printf("\n"); - } - - ret = TowerExplode(tower, &object, &syntax, &protseq, &endpoint, &address); - ok(ret == RPC_S_OK, "TowerExplode failed with error %d\n", ret); - ok(!memcmp(&object, &mapi_if_id, sizeof(mapi_if_id)), "object id didn't match\n"); - ok(!memcmp(&syntax, &ndr_syntax, sizeof(syntax)), "syntax id didn't match\n"); - ok(!strcmp(protseq, "ncacn_ip_tcp"), "protseq was \"%s\" instead of \"ncacn_ip_tcp\"\n", protseq); - ok(!strcmp(endpoint, "135"), "endpoint was \"%s\" instead of \"135\"\n", endpoint); - ok(!strcmp(address, "10.0.0.1"), "address was \"%s\" instead of \"10.0.0.1\"\n", address); - - I_RpcFree(protseq); - I_RpcFree(endpoint); - I_RpcFree(address); - - ret = TowerExplode(tower, NULL, NULL, NULL, NULL, NULL); - ok(ret == RPC_S_OK, "TowerExplode failed with error %d\n", ret); - - I_RpcFree(tower); - - /* test the behaviour for ip_tcp with name instead of dotted IP notation */ - ret = TowerConstruct(&mapi_if_id, &ndr_syntax, "ncacn_ip_tcp", "135", "localhost", &tower); - ok(ret == RPC_S_OK, "TowerConstruct failed with error %d\n", ret); - ret = TowerExplode(tower, NULL, NULL, NULL, NULL, &address); - ok(ret == RPC_S_OK, "TowerExplode failed with error %d\n", ret); - ok(!strcmp(address, "0.0.0.0") || - broken(!strcmp(address, "255.255.255.255")), - "address was \"%s\" instead of \"0.0.0.0\"\n", address); - - I_RpcFree(address); - I_RpcFree(tower); - - /* test the behaviour for np with no address */ - ret = TowerConstruct(&mapi_if_id, &ndr_syntax, "ncacn_np", "\\pipe\\test", NULL, &tower); - ok(ret == RPC_S_OK, "TowerConstruct failed with error %d\n", ret); - ret = TowerExplode(tower, NULL, NULL, NULL, NULL, &address); - ok(ret == RPC_S_OK || - broken(ret != RPC_S_OK), /* win2k, indeterminate */ - "TowerExplode failed with error %d\n", ret); - /* Windows XP SP3 sets address to NULL */ - ok(!address || !strcmp(address, ""), "address was \"%s\" instead of \"\" or NULL (XP SP3)\n", address); - - I_RpcFree(address); - I_RpcFree(tower); -} - -static void test_I_RpcMapWin32Status(void) -{ - LONG win32status; - RPC_STATUS rpc_status; - BOOL w2k3_up = FALSE; - - /* Windows 2003 and Vista return STATUS_UNSUCCESSFUL if given an unknown status */ - win32status = I_RpcMapWin32Status(9999); - if (win32status == STATUS_UNSUCCESSFUL) - { - trace("We are on Windows 2003 or Vista\n"); - w2k3_up = TRUE; - } - - /* On Windows XP-SP1 and below some statuses are not mapped and return - * the given status - */ - for (rpc_status = 0; rpc_status < 10000; rpc_status++) - { - LONG expected_win32status; - BOOL missing = FALSE; - - win32status = I_RpcMapWin32Status(rpc_status); - switch (rpc_status) - { - case ERROR_SUCCESS: expected_win32status = ERROR_SUCCESS; break; - case ERROR_ACCESS_DENIED: expected_win32status = STATUS_ACCESS_DENIED; break; - case ERROR_INVALID_HANDLE: expected_win32status = RPC_NT_SS_CONTEXT_MISMATCH; break; - case ERROR_OUTOFMEMORY: expected_win32status = STATUS_NO_MEMORY; break; - case ERROR_INVALID_PARAMETER: expected_win32status = STATUS_INVALID_PARAMETER; break; - case ERROR_INSUFFICIENT_BUFFER: expected_win32status = STATUS_BUFFER_TOO_SMALL; break; - case ERROR_MAX_THRDS_REACHED: expected_win32status = STATUS_NO_MEMORY; break; - case ERROR_NOACCESS: expected_win32status = STATUS_ACCESS_VIOLATION; break; - case ERROR_NOT_ENOUGH_SERVER_MEMORY: expected_win32status = STATUS_INSUFF_SERVER_RESOURCES; break; - case ERROR_WRONG_PASSWORD: expected_win32status = STATUS_WRONG_PASSWORD; missing = TRUE; break; - case ERROR_INVALID_LOGON_HOURS: expected_win32status = STATUS_INVALID_LOGON_HOURS; missing = TRUE; break; - case ERROR_PASSWORD_EXPIRED: expected_win32status = STATUS_PASSWORD_EXPIRED; missing = TRUE; break; - case ERROR_ACCOUNT_DISABLED: expected_win32status = STATUS_ACCOUNT_DISABLED; missing = TRUE; break; - case ERROR_INVALID_SECURITY_DESCR: expected_win32status = STATUS_INVALID_SECURITY_DESCR; break; - case RPC_S_INVALID_STRING_BINDING: expected_win32status = RPC_NT_INVALID_STRING_BINDING; break; - case RPC_S_WRONG_KIND_OF_BINDING: expected_win32status = RPC_NT_WRONG_KIND_OF_BINDING; break; - case RPC_S_INVALID_BINDING: expected_win32status = RPC_NT_INVALID_BINDING; break; - case RPC_S_PROTSEQ_NOT_SUPPORTED: expected_win32status = RPC_NT_PROTSEQ_NOT_SUPPORTED; break; - case RPC_S_INVALID_RPC_PROTSEQ: expected_win32status = RPC_NT_INVALID_RPC_PROTSEQ; break; - case RPC_S_INVALID_STRING_UUID: expected_win32status = RPC_NT_INVALID_STRING_UUID; break; - case RPC_S_INVALID_ENDPOINT_FORMAT: expected_win32status = RPC_NT_INVALID_ENDPOINT_FORMAT; break; - case RPC_S_INVALID_NET_ADDR: expected_win32status = RPC_NT_INVALID_NET_ADDR; break; - case RPC_S_NO_ENDPOINT_FOUND: expected_win32status = RPC_NT_NO_ENDPOINT_FOUND; break; - case RPC_S_INVALID_TIMEOUT: expected_win32status = RPC_NT_INVALID_TIMEOUT; break; - case RPC_S_OBJECT_NOT_FOUND: expected_win32status = RPC_NT_OBJECT_NOT_FOUND; break; - case RPC_S_ALREADY_REGISTERED: expected_win32status = RPC_NT_ALREADY_REGISTERED; break; - case RPC_S_TYPE_ALREADY_REGISTERED: expected_win32status = RPC_NT_TYPE_ALREADY_REGISTERED; break; - case RPC_S_ALREADY_LISTENING: expected_win32status = RPC_NT_ALREADY_LISTENING; break; - case RPC_S_NO_PROTSEQS_REGISTERED: expected_win32status = RPC_NT_NO_PROTSEQS_REGISTERED; break; - case RPC_S_NOT_LISTENING: expected_win32status = RPC_NT_NOT_LISTENING; break; - case RPC_S_UNKNOWN_MGR_TYPE: expected_win32status = RPC_NT_UNKNOWN_MGR_TYPE; break; - case RPC_S_UNKNOWN_IF: expected_win32status = RPC_NT_UNKNOWN_IF; break; - case RPC_S_NO_BINDINGS: expected_win32status = RPC_NT_NO_BINDINGS; break; - case RPC_S_NO_PROTSEQS: expected_win32status = RPC_NT_NO_PROTSEQS; break; - case RPC_S_CANT_CREATE_ENDPOINT: expected_win32status = RPC_NT_CANT_CREATE_ENDPOINT; break; - case RPC_S_OUT_OF_RESOURCES: expected_win32status = RPC_NT_OUT_OF_RESOURCES; break; - case RPC_S_SERVER_UNAVAILABLE: expected_win32status = RPC_NT_SERVER_UNAVAILABLE; break; - case RPC_S_SERVER_TOO_BUSY: expected_win32status = RPC_NT_SERVER_TOO_BUSY; break; - case RPC_S_INVALID_NETWORK_OPTIONS: expected_win32status = RPC_NT_INVALID_NETWORK_OPTIONS; break; - case RPC_S_NO_CALL_ACTIVE: expected_win32status = RPC_NT_NO_CALL_ACTIVE; break; - case RPC_S_CALL_FAILED: expected_win32status = RPC_NT_CALL_FAILED; break; - case RPC_S_CALL_FAILED_DNE: expected_win32status = RPC_NT_CALL_FAILED_DNE; break; - case RPC_S_PROTOCOL_ERROR: expected_win32status = RPC_NT_PROTOCOL_ERROR; break; - case RPC_S_UNSUPPORTED_TRANS_SYN: expected_win32status = RPC_NT_UNSUPPORTED_TRANS_SYN; break; - case RPC_S_UNSUPPORTED_TYPE: expected_win32status = RPC_NT_UNSUPPORTED_TYPE; break; - case RPC_S_INVALID_TAG: expected_win32status = RPC_NT_INVALID_TAG; break; - case RPC_S_INVALID_BOUND: expected_win32status = RPC_NT_INVALID_BOUND; break; - case RPC_S_NO_ENTRY_NAME: expected_win32status = RPC_NT_NO_ENTRY_NAME; break; - case RPC_S_INVALID_NAME_SYNTAX: expected_win32status = RPC_NT_INVALID_NAME_SYNTAX; break; - case RPC_S_UNSUPPORTED_NAME_SYNTAX: expected_win32status = RPC_NT_UNSUPPORTED_NAME_SYNTAX; break; - case RPC_S_UUID_NO_ADDRESS: expected_win32status = RPC_NT_UUID_NO_ADDRESS; break; - case RPC_S_DUPLICATE_ENDPOINT: expected_win32status = RPC_NT_DUPLICATE_ENDPOINT; break; - case RPC_S_UNKNOWN_AUTHN_TYPE: expected_win32status = RPC_NT_UNKNOWN_AUTHN_TYPE; break; - case RPC_S_MAX_CALLS_TOO_SMALL: expected_win32status = RPC_NT_MAX_CALLS_TOO_SMALL; break; - case RPC_S_STRING_TOO_LONG: expected_win32status = RPC_NT_STRING_TOO_LONG; break; - case RPC_S_PROTSEQ_NOT_FOUND: expected_win32status = RPC_NT_PROTSEQ_NOT_FOUND; break; - case RPC_S_PROCNUM_OUT_OF_RANGE: expected_win32status = RPC_NT_PROCNUM_OUT_OF_RANGE; break; - case RPC_S_BINDING_HAS_NO_AUTH: expected_win32status = RPC_NT_BINDING_HAS_NO_AUTH; break; - case RPC_S_UNKNOWN_AUTHN_SERVICE: expected_win32status = RPC_NT_UNKNOWN_AUTHN_SERVICE; break; - case RPC_S_UNKNOWN_AUTHN_LEVEL: expected_win32status = RPC_NT_UNKNOWN_AUTHN_LEVEL; break; - case RPC_S_INVALID_AUTH_IDENTITY: expected_win32status = RPC_NT_INVALID_AUTH_IDENTITY; break; - case RPC_S_UNKNOWN_AUTHZ_SERVICE: expected_win32status = RPC_NT_UNKNOWN_AUTHZ_SERVICE; break; - case EPT_S_INVALID_ENTRY: expected_win32status = EPT_NT_INVALID_ENTRY; break; - case EPT_S_CANT_PERFORM_OP: expected_win32status = EPT_NT_CANT_PERFORM_OP; break; - case EPT_S_NOT_REGISTERED: expected_win32status = EPT_NT_NOT_REGISTERED; break; - case EPT_S_CANT_CREATE: expected_win32status = EPT_NT_CANT_CREATE; break; - case RPC_S_NOTHING_TO_EXPORT: expected_win32status = RPC_NT_NOTHING_TO_EXPORT; break; - case RPC_S_INCOMPLETE_NAME: expected_win32status = RPC_NT_INCOMPLETE_NAME; break; - case RPC_S_INVALID_VERS_OPTION: expected_win32status = RPC_NT_INVALID_VERS_OPTION; break; - case RPC_S_NO_MORE_MEMBERS: expected_win32status = RPC_NT_NO_MORE_MEMBERS; break; - case RPC_S_NOT_ALL_OBJS_UNEXPORTED: expected_win32status = RPC_NT_NOT_ALL_OBJS_UNEXPORTED; break; - case RPC_S_INTERFACE_NOT_FOUND: expected_win32status = RPC_NT_INTERFACE_NOT_FOUND; break; - case RPC_S_ENTRY_ALREADY_EXISTS: expected_win32status = RPC_NT_ENTRY_ALREADY_EXISTS; break; - case RPC_S_ENTRY_NOT_FOUND: expected_win32status = RPC_NT_ENTRY_NOT_FOUND; break; - case RPC_S_NAME_SERVICE_UNAVAILABLE: expected_win32status = RPC_NT_NAME_SERVICE_UNAVAILABLE; break; - case RPC_S_INVALID_NAF_ID: expected_win32status = RPC_NT_INVALID_NAF_ID; break; - case RPC_S_CANNOT_SUPPORT: expected_win32status = RPC_NT_CANNOT_SUPPORT; break; - case RPC_S_NO_CONTEXT_AVAILABLE: expected_win32status = RPC_NT_NO_CONTEXT_AVAILABLE; break; - case RPC_S_INTERNAL_ERROR: expected_win32status = RPC_NT_INTERNAL_ERROR; break; - case RPC_S_ZERO_DIVIDE: expected_win32status = RPC_NT_ZERO_DIVIDE; break; - case RPC_S_ADDRESS_ERROR: expected_win32status = RPC_NT_ADDRESS_ERROR; break; - case RPC_S_FP_DIV_ZERO: expected_win32status = RPC_NT_FP_DIV_ZERO; break; - case RPC_S_FP_UNDERFLOW: expected_win32status = RPC_NT_FP_UNDERFLOW; break; - case RPC_S_FP_OVERFLOW: expected_win32status = RPC_NT_FP_OVERFLOW; break; - case RPC_S_CALL_IN_PROGRESS: expected_win32status = RPC_NT_CALL_IN_PROGRESS; break; - case RPC_S_NO_MORE_BINDINGS: expected_win32status = RPC_NT_NO_MORE_BINDINGS; break; - case RPC_S_CALL_CANCELLED: expected_win32status = RPC_NT_CALL_CANCELLED; missing = TRUE; break; - case RPC_S_INVALID_OBJECT: expected_win32status = RPC_NT_INVALID_OBJECT; break; - case RPC_S_INVALID_ASYNC_HANDLE: expected_win32status = RPC_NT_INVALID_ASYNC_HANDLE; missing = TRUE; break; - case RPC_S_INVALID_ASYNC_CALL: expected_win32status = RPC_NT_INVALID_ASYNC_CALL; missing = TRUE; break; - case RPC_S_GROUP_MEMBER_NOT_FOUND: expected_win32status = RPC_NT_GROUP_MEMBER_NOT_FOUND; break; - case RPC_X_NO_MORE_ENTRIES: expected_win32status = RPC_NT_NO_MORE_ENTRIES; break; - case RPC_X_SS_CHAR_TRANS_OPEN_FAIL: expected_win32status = RPC_NT_SS_CHAR_TRANS_OPEN_FAIL; break; - case RPC_X_SS_CHAR_TRANS_SHORT_FILE: expected_win32status = RPC_NT_SS_CHAR_TRANS_SHORT_FILE; break; - case RPC_X_SS_IN_NULL_CONTEXT: expected_win32status = RPC_NT_SS_IN_NULL_CONTEXT; break; - case RPC_X_SS_CONTEXT_DAMAGED: expected_win32status = RPC_NT_SS_CONTEXT_DAMAGED; break; - case RPC_X_SS_HANDLES_MISMATCH: expected_win32status = RPC_NT_SS_HANDLES_MISMATCH; break; - case RPC_X_SS_CANNOT_GET_CALL_HANDLE: expected_win32status = RPC_NT_SS_CANNOT_GET_CALL_HANDLE; break; - case RPC_X_NULL_REF_POINTER: expected_win32status = RPC_NT_NULL_REF_POINTER; break; - case RPC_X_ENUM_VALUE_OUT_OF_RANGE: expected_win32status = RPC_NT_ENUM_VALUE_OUT_OF_RANGE; break; - case RPC_X_BYTE_COUNT_TOO_SMALL: expected_win32status = RPC_NT_BYTE_COUNT_TOO_SMALL; break; - case RPC_X_BAD_STUB_DATA: expected_win32status = RPC_NT_BAD_STUB_DATA; break; - case RPC_X_PIPE_CLOSED: expected_win32status = RPC_NT_PIPE_CLOSED; missing = TRUE; break; - case RPC_X_PIPE_DISCIPLINE_ERROR: expected_win32status = RPC_NT_PIPE_DISCIPLINE_ERROR; missing = TRUE; break; - case RPC_X_PIPE_EMPTY: expected_win32status = RPC_NT_PIPE_EMPTY; missing = TRUE; break; - case ERROR_PASSWORD_MUST_CHANGE: expected_win32status = STATUS_PASSWORD_MUST_CHANGE; missing = TRUE; break; - case ERROR_ACCOUNT_LOCKED_OUT: expected_win32status = STATUS_ACCOUNT_LOCKED_OUT; missing = TRUE; break; - default: - if (w2k3_up) - expected_win32status = STATUS_UNSUCCESSFUL; - else - expected_win32status = rpc_status; - } - - ok(win32status == expected_win32status || - broken(missing && win32status == rpc_status), - "I_RpcMapWin32Status(%d) should have returned 0x%x instead of 0x%x%s\n", - rpc_status, expected_win32status, win32status, - broken(missing) ? " (or have returned with the given status)" : ""); - } -} - -static void test_RpcStringBindingParseA(void) -{ - static unsigned char valid_binding[] = "00000000-0000-0000-c000-000000000046@ncacn_np:.[endpoint=\\pipe\\test]"; - static unsigned char valid_binding2[] = "00000000-0000-0000-c000-000000000046@ncacn_np:.[\\pipe\\test]"; - static unsigned char invalid_uuid_binding[] = "{00000000-0000-0000-c000-000000000046}@ncacn_np:.[endpoint=\\pipe\\test]"; - static unsigned char invalid_ep_binding[] = "00000000-0000-0000-c000-000000000046@ncacn_np:.[endpoint=test]"; - static unsigned char invalid_binding[] = "00000000-0000-0000-c000-000000000046@ncacn_np"; - RPC_STATUS status; - unsigned char *uuid; - unsigned char *protseq; - unsigned char *network_addr; - unsigned char *endpoint; - unsigned char *options; - - /* test all parameters */ - status = RpcStringBindingParseA(valid_binding, &uuid, &protseq, &network_addr, &endpoint, &options); - ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %d\n", status); - ok(!strcmp((char *)uuid, "00000000-0000-0000-c000-000000000046"), "uuid should have been 00000000-0000-0000-C000-000000000046 instead of %s\n", uuid); - ok(!strcmp((char *)protseq, "ncacn_np"), "protseq should have been ncacn_np instead of %s\n", protseq); - ok(!strcmp((char *)network_addr, "."), "network_addr should have been . instead of %s\n", network_addr); - ok(!strcmp((char *)endpoint, "pipetest"), "endpoint should have been pipetest instead of %s\n", endpoint); - if (options) - ok(!strcmp((char *)options, ""), "options should have been \"\" of \"%s\"\n", options); - else - todo_wine ok(FALSE, "options is NULL\n"); - RpcStringFreeA(&uuid); - RpcStringFreeA(&protseq); - RpcStringFreeA(&network_addr); - RpcStringFreeA(&endpoint); - RpcStringFreeA(&options); - - /* test all parameters with different type of string binding */ - status = RpcStringBindingParseA(valid_binding2, &uuid, &protseq, &network_addr, &endpoint, &options); - ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %d\n", status); - ok(!strcmp((char *)uuid, "00000000-0000-0000-c000-000000000046"), "uuid should have been 00000000-0000-0000-C000-000000000046 instead of %s\n", uuid); - ok(!strcmp((char *)protseq, "ncacn_np"), "protseq should have been ncacn_np instead of %s\n", protseq); - ok(!strcmp((char *)network_addr, "."), "network_addr should have been . instead of %s\n", network_addr); - ok(!strcmp((char *)endpoint, "pipetest"), "endpoint should have been pipetest instead of %s\n", endpoint); - if (options) - ok(!strcmp((char *)options, ""), "options should have been \"\" of \"%s\"\n", options); - else - todo_wine ok(FALSE, "options is NULL\n"); - RpcStringFreeA(&uuid); - RpcStringFreeA(&protseq); - RpcStringFreeA(&network_addr); - RpcStringFreeA(&endpoint); - RpcStringFreeA(&options); - - /* test with as many parameters NULL as possible */ - status = RpcStringBindingParseA(valid_binding, NULL, &protseq, NULL, NULL, NULL); - ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %d\n", status); - ok(!strcmp((char *)protseq, "ncacn_np"), "protseq should have been ncacn_np instead of %s\n", protseq); - RpcStringFreeA(&protseq); - - /* test with invalid uuid */ - status = RpcStringBindingParseA(invalid_uuid_binding, NULL, &protseq, NULL, NULL, NULL); - ok(status == RPC_S_INVALID_STRING_UUID, "RpcStringBindingParseA should have returned RPC_S_INVALID_STRING_UUID instead of %d\n", status); - ok(protseq == NULL, "protseq was %p instead of NULL\n", protseq); - - /* test with invalid endpoint */ - status = RpcStringBindingParseA(invalid_ep_binding, NULL, &protseq, NULL, NULL, NULL); - ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %d\n", status); - RpcStringFreeA(&protseq); - - /* test with invalid binding */ - status = RpcStringBindingParseA(invalid_binding, &uuid, &protseq, &network_addr, &endpoint, &options); - todo_wine - ok(status == RPC_S_INVALID_STRING_BINDING, "RpcStringBindingParseA should have returned RPC_S_INVALID_STRING_BINDING instead of %d\n", status); - todo_wine - ok(uuid == NULL, "uuid was %p instead of NULL\n", uuid); - if (uuid) - RpcStringFreeA(&uuid); - ok(protseq == NULL, "protseq was %p instead of NULL\n", protseq); - todo_wine - ok(network_addr == NULL, "network_addr was %p instead of NULL\n", network_addr); - if (network_addr) - RpcStringFreeA(&network_addr); - ok(endpoint == NULL, "endpoint was %p instead of NULL\n", endpoint); - ok(options == NULL, "options was %p instead of NULL\n", options); -} - -static void test_I_RpcExceptionFilter(void) -{ - ULONG exception; - int retval; - int (WINAPI *pI_RpcExceptionFilter)(ULONG) = (void *)GetProcAddress(GetModuleHandle("rpcrt4.dll"), "I_RpcExceptionFilter"); - - if (!pI_RpcExceptionFilter) - { - skip("I_RpcExceptionFilter not exported\n"); - return; - } - - for (exception = 0; exception < STATUS_REG_NAT_CONSUMPTION; exception++) - { - /* skip over uninteresting bits of the number space */ - if (exception == 2000) exception = 0x40000000; - if (exception == 0x40000005) exception = 0x80000000; - if (exception == 0x80000005) exception = 0xc0000000; - - retval = pI_RpcExceptionFilter(exception); - switch (exception) - { - case STATUS_DATATYPE_MISALIGNMENT: - case STATUS_BREAKPOINT: - case STATUS_ACCESS_VIOLATION: - case STATUS_ILLEGAL_INSTRUCTION: - case STATUS_PRIVILEGED_INSTRUCTION: - case 0xc00000aa /* STATUS_INSTRUCTION_MISALIGNMENT */: - case STATUS_STACK_OVERFLOW: - case 0xc0000194 /* STATUS_POSSIBLE_DEADLOCK */: - ok(retval == EXCEPTION_CONTINUE_SEARCH, "I_RpcExceptionFilter(0x%x) should have returned %d instead of %d\n", - exception, EXCEPTION_CONTINUE_SEARCH, retval); - break; - case STATUS_GUARD_PAGE_VIOLATION: - case STATUS_IN_PAGE_ERROR: - case STATUS_HANDLE_NOT_CLOSABLE: - trace("I_RpcExceptionFilter(0x%x) returned %d\n", exception, retval); - break; - default: - ok(retval == EXCEPTION_EXECUTE_HANDLER, "I_RpcExceptionFilter(0x%x) should have returned %d instead of %d\n", - exception, EXCEPTION_EXECUTE_HANDLER, retval); - } - } -} - -static void test_RpcStringBindingFromBinding(void) -{ - static unsigned char ncacn_np[] = "ncacn_np"; - static unsigned char address[] = "."; - static unsigned char endpoint[] = "\\pipe\\wine_rpc_test"; - RPC_STATUS status; - handle_t handle; - RPC_CSTR binding; - - status = RpcStringBindingCompose(NULL, ncacn_np, address, - endpoint, NULL, &binding); - ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%u)\n", status); - - status = RpcBindingFromStringBinding(binding, &handle); - ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%u)\n", status); - RpcStringFree(&binding); - - status = RpcBindingToStringBinding(handle, &binding); - ok(status == RPC_S_OK, "RpcStringBindingFromBinding failed with error %u\n", status); - - ok(!strcmp((const char *)binding, "ncacn_np:.[\\\\pipe\\\\wine_rpc_test]"), - "binding string didn't match what was expected: \"%s\"\n", binding); - RpcStringFree(&binding); - - status = RpcBindingFree(&handle); - ok(status == RPC_S_OK, "RpcBindingFree failed with error %u\n", status); -} - -static char *printGuid(char *buf, int size, const UUID *guid) -{ - snprintf(buf, size, "{%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]); - return buf; -} - -static void test_UuidCreate(void) -{ - UUID guid; - BYTE version; - - UuidCreate(&guid); - version = (guid.Data3 & 0xf000) >> 12; - ok(version == 4 || broken(version == 1), "unexpected version %d\n", - version); - if (version == 4) - { - static UUID v4and = { 0, 0, 0x4000, { 0x80,0,0,0,0,0,0,0 } }; - static UUID v4or = { 0xffffffff, 0xffff, 0x4fff, - { 0xbf,0xff,0xff,0xff,0xff,0xff,0xff,0xff } }; - UUID and, or; - RPC_STATUS rslt; - int i; - char buf[39]; - - and = guid; - or = guid; - /* Generate a bunch of UUIDs and mask them. By the end, we expect - * every randomly generated bit to have been zero at least once, - * resulting in no bits set in the and mask except those which are not - * randomly generated: the version number and the topmost bits of the - * Data4 field (treated as big-endian.) Similarly, we expect only - * the bits which are not randomly set to be cleared in the or mask. - */ - for (i = 0; i < 1000; i++) - { - LPBYTE src, dst; - - UuidCreate(&guid); - for (src = (LPBYTE)&guid, dst = (LPBYTE)∧ - src - (LPBYTE)&guid < sizeof(guid); src++, dst++) - *dst &= *src; - for (src = (LPBYTE)&guid, dst = (LPBYTE)∨ - src - (LPBYTE)&guid < sizeof(guid); src++, dst++) - *dst |= *src; - } - ok(UuidEqual(&and, &v4and, &rslt), - "unexpected bits set in V4 UUID: %s\n", printGuid(buf, sizeof(buf), &and)); - ok(UuidEqual(&or, &v4or, &rslt), - "unexpected bits set in V4 UUID: %s\n", printGuid(buf, sizeof(buf), &or)); - } - else - { - /* Older versions of Windows generate V1 UUIDs. For these, there are - * many stable bits, including at least the MAC address if one is - * present. Just check that Data4[0]'s most significant bits are - * set as expected. - */ - ok((guid.Data4[0] & 0xc0) == 0x80, - "unexpected value in Data4[0]: %02x\n", guid.Data4[0] & 0xc0); - } -} - -static void test_UuidCreateSequential(void) -{ - UUID guid1; - BYTE version; - RPC_STATUS (WINAPI *pUuidCreateSequential)(UUID *) = (void *)GetProcAddress(GetModuleHandle("rpcrt4.dll"), "UuidCreateSequential"); - RPC_STATUS ret; - - if (!pUuidCreateSequential) - { - skip("UuidCreateSequential not exported\n"); - return; - } - ret = pUuidCreateSequential(&guid1); - ok(!ret || ret == RPC_S_UUID_LOCAL_ONLY, - "expected RPC_S_OK or RPC_S_UUID_LOCAL_ONLY, got %08x\n", ret); - version = (guid1.Data3 & 0xf000) >> 12; - ok(version == 1, "unexpected version %d\n", version); - if (version == 1) - { - UUID guid2; - - if (!ret) - { - /* If the call succeeded, there's a valid (non-multicast) MAC - * address in the uuid: - */ - ok(!(guid1.Data4[2] & 0x01), - "GUID does not appear to contain a MAC address\n"); - } - else - { - /* Otherwise, there's a randomly generated multicast MAC address - * address in the uuid: - */ - ok((guid1.Data4[2] & 0x01), - "GUID does not appear to contain a multicast MAC address\n"); - } - /* Generate another GUID, and make sure its MAC address matches the - * first. - */ - ret = pUuidCreateSequential(&guid2); - ok(!ret || ret == RPC_S_UUID_LOCAL_ONLY, - "expected RPC_S_OK or RPC_S_UUID_LOCAL_ONLY, got %08x\n", ret); - version = (guid2.Data3 & 0xf000) >> 12; - ok(version == 1, "unexpected version %d\n", version); - ok(!memcmp(guid1.Data4, guid2.Data4, sizeof(guid2.Data4)), - "unexpected value in MAC address\n"); - } -} - -static void test_RpcBindingFree(void) -{ - RPC_BINDING_HANDLE binding = NULL; - RPC_STATUS status; - - status = RpcBindingFree(&binding); - ok(status == RPC_S_INVALID_BINDING, - "RpcBindingFree should have returned RPC_S_INVALID_BINDING instead of %d\n", - status); -} - -START_TEST( rpc ) -{ - UuidConversionAndComparison(); - TestDceErrorInqText(); - test_rpc_ncacn_ip_tcp(); - test_towers(); - test_I_RpcMapWin32Status(); - test_RpcStringBindingParseA(); - test_I_RpcExceptionFilter(); - test_RpcStringBindingFromBinding(); - test_UuidCreate(); - test_UuidCreateSequential(); - test_RpcBindingFree(); -} diff --git a/rostests/winetests/rpcrt4/rpc_async.c b/rostests/winetests/rpcrt4/rpc_async.c deleted file mode 100644 index 2cd95c8c254..00000000000 --- a/rostests/winetests/rpcrt4/rpc_async.c +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Unit test suite for rpc functions - * - * Copyright 2008 Robert Shearman (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 - -#include "wine/test.h" - -#include -#include - -static RPC_STATUS (RPC_ENTRY *pRpcAsyncInitializeHandle)(PRPC_ASYNC_STATE,unsigned int); -static RPC_STATUS (RPC_ENTRY *pRpcAsyncGetCallStatus)(PRPC_ASYNC_STATE); - -static void test_RpcAsyncInitializeHandle(void) -{ - char buffer[256]; - RPC_ASYNC_STATE async; - RPC_STATUS status; - int i; - void *unset_ptr; - - status = pRpcAsyncInitializeHandle((PRPC_ASYNC_STATE)buffer, sizeof(buffer)); - ok(status == ERROR_INVALID_PARAMETER, "RpcAsyncInitializeHandle with large Size should have returned ERROR_INVALID_PARAMETER instead of %d\n", status); - - status = pRpcAsyncInitializeHandle(&async, sizeof(async) - 1); - ok(status == ERROR_INVALID_PARAMETER, "RpcAsyncInitializeHandle with small Size should have returned ERROR_INVALID_PARAMETER instead of %d\n", status); - - memset(&async, 0xcc, sizeof(async)); - memset(&unset_ptr, 0xcc, sizeof(unset_ptr)); - status = pRpcAsyncInitializeHandle(&async, sizeof(async)); - ok(status == RPC_S_OK, "RpcAsyncInitializeHandle failed with error %d\n", status); - - ok(async.Size == sizeof(async), "async.Size wrong: %d\n", async.Size); - ok(async.Signature == 0x43595341, "async.Signature should be 0x43595341, but is 0x%x instead\n", async.Signature); - ok(async.Lock == 0, "async.Lock should be 0, but is %d instead\n", async.Lock); - ok(async.Flags == 0, "async.Flags should be 0, but is %d instead\n", async.Flags); - ok(async.StubInfo == NULL, "async.StubInfo should be NULL, not %p\n", async.StubInfo); - ok(async.UserInfo == unset_ptr, "async.UserInfo should be unset, not %p\n", async.UserInfo); - ok(async.RuntimeInfo == NULL, "async.RuntimeInfo should be NULL, not %p\n", async.RuntimeInfo); - ok(async.Event == 0xcccccccc, "async.Event should be unset, not %d\n", async.Event); - ok(async.NotificationType == 0xcccccccc, "async.NotificationType should be unset, not %d\n", async.NotificationType); - for (i = 0; i < 4; i++) - ok(async.Reserved[i] == 0x0, "async.Reserved[%d] should be 0x0, not 0x%lx\n", i, async.Reserved[i]); -} - -static void test_RpcAsyncGetCallStatus(void) -{ - RPC_ASYNC_STATE async; - RPC_STATUS status; - - status = pRpcAsyncInitializeHandle(&async, sizeof(async)); - ok(status == RPC_S_OK, "RpcAsyncInitializeHandle failed with error %d\n", status); - - status = pRpcAsyncGetCallStatus(&async); - todo_wine - ok(status == RPC_S_INVALID_BINDING, "RpcAsyncGetCallStatus should have returned RPC_S_INVALID_BINDING instead of %d\n", status); - - memset(&async, 0, sizeof(async)); - status = pRpcAsyncGetCallStatus(&async); - todo_wine - ok(status == RPC_S_INVALID_BINDING, "RpcAsyncGetCallStatus should have returned RPC_S_INVALID_BINDING instead of %d\n", status); -} - -START_TEST( rpc_async ) -{ - HMODULE hRpcRt4 = GetModuleHandle("rpcrt4.dll"); - pRpcAsyncInitializeHandle = (void *)GetProcAddress(hRpcRt4, "RpcAsyncInitializeHandle"); - pRpcAsyncGetCallStatus = (void *)GetProcAddress(hRpcRt4, "RpcAsyncGetCallStatus"); - if (!pRpcAsyncInitializeHandle || !pRpcAsyncGetCallStatus) - { - win_skip("asynchronous functions not available\n"); - return; - } - test_RpcAsyncInitializeHandle(); - test_RpcAsyncGetCallStatus(); -} diff --git a/rostests/winetests/rpcrt4/rpc_protseq.c b/rostests/winetests/rpcrt4/rpc_protseq.c deleted file mode 100644 index 36aea30bf88..00000000000 --- a/rostests/winetests/rpcrt4/rpc_protseq.c +++ /dev/null @@ -1,205 +0,0 @@ -/* - * RPC Protocol Sequence Server Tests - * - * Copyright 2008-2009 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 -#include - -#include "wine/test.h" -#include -#include -#include -#include - -#include "rpc.h" -#include "rpcdce.h" - -static void test_RpcServerUseProtseq(void) -{ - RPC_STATUS status; - RPC_BINDING_VECTOR *bindings; - ULONG i; - ULONG binding_count_before; - ULONG binding_count_after1; - ULONG binding_count_after2; - ULONG endpoints_registered = 0; - static unsigned char iptcp[] = "ncacn_ip_tcp"; - static unsigned char np[] = "ncacn_np"; - static unsigned char ncalrpc[] = "ncalrpc"; - - status = RpcServerInqBindings(&bindings); - if (status == RPC_S_NO_BINDINGS) - binding_count_before = 0; - else - { - binding_count_before = bindings->Count; - ok(status == RPC_S_OK, "RpcServerInqBindings failed with status %d\n", status); - RpcBindingVectorFree(&bindings); - } - - /* show that RpcServerUseProtseqEp(..., NULL, ...) is the same as - * RpcServerUseProtseq(...) */ - status = RpcServerUseProtseqEp(ncalrpc, 0, NULL, NULL); - ok(status == RPC_S_OK || broken(status == RPC_S_INVALID_ENDPOINT_FORMAT), - "RpcServerUseProtseqEp with NULL endpoint failed with status %d\n", - status); - - /* register protocol sequences without explicit endpoints */ - status = RpcServerUseProtseq(np, 0, NULL); - if (status == RPC_S_PROTSEQ_NOT_SUPPORTED) - win_skip("ncacn_np not supported\n"); - else - ok(status == RPC_S_OK, "RpcServerUseProtseq(ncacn_np) failed with status %d\n", status); - if (status == RPC_S_OK) endpoints_registered++; - - status = RpcServerUseProtseq(iptcp, 0, NULL); - ok(status == RPC_S_OK, "RpcServerUseProtseq(ncacn_ip_tcp) failed with status %d\n", status); - if (status == RPC_S_OK) endpoints_registered++; - - status = RpcServerUseProtseq(ncalrpc, 0, NULL); - ok(status == RPC_S_OK, "RpcServerUseProtseqEp(ncalrpc) failed with status %d\n", status); - if (status == RPC_S_OK) endpoints_registered++; - - status = RpcServerInqBindings(&bindings); - ok(status == RPC_S_OK, "RpcServerInqBindings failed with status %d\n", status); - binding_count_after1 = bindings->Count; - ok(binding_count_after1 == binding_count_before + endpoints_registered, - "wrong binding count - before: %u, after %u, endpoints registered %u\n", - binding_count_before, binding_count_after1, endpoints_registered); - for (i = 0; i < bindings->Count; i++) - { - RPC_CSTR str_bind; - status = RpcBindingToStringBinding(bindings->BindingH[i], &str_bind); - ok(status == RPC_S_OK, "RpcBindingToStringBinding failed with status %d\n", status); - trace("string binding: %s\n", str_bind); - RpcStringFree(&str_bind); - } - RpcBindingVectorFree(&bindings); - - /* re-register - endpoints should be reused */ - status = RpcServerUseProtseq(np, 0, NULL); - if (status == RPC_S_PROTSEQ_NOT_SUPPORTED) - win_skip("ncacn_np not supported\n"); - else - ok(status == RPC_S_OK, "RpcServerUseProtseq(ncacn_np) failed with status %d\n", status); - - status = RpcServerUseProtseq(iptcp, 0, NULL); - ok(status == RPC_S_OK, "RpcServerUseProtseq(ncacn_ip_tcp) failed with status %d\n", status); - - status = RpcServerUseProtseq(ncalrpc, 0, NULL); - ok(status == RPC_S_OK, "RpcServerUseProtseqEp(ncalrpc) failed with status %d\n", status); - - status = RpcServerInqBindings(&bindings); - ok(status == RPC_S_OK, "RpcServerInqBindings failed with status %d\n", status); - binding_count_after2 = bindings->Count; - ok(binding_count_after2 == binding_count_after1, - "bindings should have been re-used - after1: %u after2: %u\n", - binding_count_after1, binding_count_after2); - RpcBindingVectorFree(&bindings); -} - -static RPC_DISPATCH_FUNCTION IFoo_table[] = -{ - 0 -}; - -static RPC_DISPATCH_TABLE IFoo_v0_0_DispatchTable = -{ - 0, - IFoo_table -}; - -static const RPC_SERVER_INTERFACE IFoo___RpcServerInterface = -{ - sizeof(RPC_SERVER_INTERFACE), - {{0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x34}},{0,0}}, - {{0x8a885d04,0x1ceb,0x11c9,{0x9f,0xe8,0x08,0x00,0x2b,0x10,0x48,0x60}},{2,0}}, - &IFoo_v0_0_DispatchTable, - 0, - 0, - 0, - 0, - 0, -}; - -static RPC_IF_HANDLE IFoo_v0_0_s_ifspec = (RPC_IF_HANDLE)& IFoo___RpcServerInterface; - -static void test_endpoint_mapper(RPC_CSTR protseq, RPC_CSTR address) -{ - static unsigned char annotation[] = "Test annotation string."; - RPC_STATUS status; - RPC_BINDING_VECTOR *binding_vector; - handle_t handle; - unsigned char *binding; - - status = RpcServerRegisterIf(IFoo_v0_0_s_ifspec, NULL, NULL); - ok(status == RPC_S_OK, "%s: RpcServerRegisterIf failed (%u)\n", protseq, status); - - status = RpcServerInqBindings(&binding_vector); - ok(status == RPC_S_OK, "%s: RpcServerInqBindings failed with error %u\n", protseq, status); - - /* register endpoints created in test_RpcServerUseProtseq */ - status = RpcEpRegisterA(IFoo_v0_0_s_ifspec, binding_vector, NULL, annotation); - ok(status == RPC_S_OK, "%s: RpcEpRegisterA failed with error %u\n", protseq, status); - /* reregister the same endpoint with no annotation */ - status = RpcEpRegisterA(IFoo_v0_0_s_ifspec, binding_vector, NULL, NULL); - ok(status == RPC_S_OK, "%s: RpcEpRegisterA failed with error %u\n", protseq, status); - - status = RpcStringBindingCompose(NULL, protseq, address, - NULL, NULL, &binding); - ok(status == RPC_S_OK, "%s: RpcStringBindingCompose failed (%u)\n", protseq, status); - - status = RpcBindingFromStringBinding(binding, &handle); - ok(status == RPC_S_OK, "%s: RpcBindingFromStringBinding failed (%u)\n", protseq, status); - - RpcStringFree(&binding); - - status = RpcBindingReset(handle); - ok(status == RPC_S_OK, "%s: RpcBindingReset failed with error %u\n", protseq, status); - - status = RpcEpResolveBinding(handle, IFoo_v0_0_s_ifspec); - ok(status == RPC_S_OK || broken(status == RPC_S_SERVER_UNAVAILABLE), /* win9x */ - "%s: RpcEpResolveBinding failed with error %u\n", protseq, status); - - status = RpcBindingReset(handle); - ok(status == RPC_S_OK, "%s: RpcBindingReset failed with error %u\n", protseq, status); - - status = RpcBindingFree(&handle); - ok(status == RPC_S_OK, "%s: RpcBindingFree failed with error %u\n", protseq, status); - - status = RpcServerUnregisterIf(NULL, NULL, FALSE); - ok(status == RPC_S_OK, "%s: RpcServerUnregisterIf failed (%u)\n", protseq, status); - - status = RpcEpUnregister(IFoo_v0_0_s_ifspec, binding_vector, NULL); - ok(status == RPC_S_OK, "%s: RpcEpUnregisterA failed with error %u\n", protseq, status); - - status = RpcBindingVectorFree(&binding_vector); - ok(status == RPC_S_OK, "%s: RpcBindingVectorFree failed with error %u\n", protseq, status); -} - -START_TEST( rpc_protseq ) -{ - static unsigned char ncacn_np[] = "ncacn_np"; - static unsigned char ncalrpc[] = "ncalrpc"; - static unsigned char np_address[] = "."; - - test_RpcServerUseProtseq(); - test_endpoint_mapper(ncacn_np, np_address); - test_endpoint_mapper(ncalrpc, NULL); -} diff --git a/rostests/winetests/rpcrt4/rpcrt4.rbuild b/rostests/winetests/rpcrt4/rpcrt4.rbuild deleted file mode 100644 index dea00074b0e..00000000000 --- a/rostests/winetests/rpcrt4/rpcrt4.rbuild +++ /dev/null @@ -1,35 +0,0 @@ - - - - - server.idl - - - server.idl - - - . - . - - 0x0500 - - IServer_v0_0_s_ifspec - wine - pseh - ole32 - uuid - advapi32 - rpcrt4_winetest_server - rpcrt4_winetest_client - rpcrt4 - ntdll - cstub.c - generated.c - ndr_marshall.c - rpc.c - rpc_async.c - rpc_protseq.c - server.c - testlist.c - - diff --git a/rostests/winetests/rpcrt4/server.c b/rostests/winetests/rpcrt4/server.c deleted file mode 100644 index a822b317cc3..00000000000 --- a/rostests/winetests/rpcrt4/server.c +++ /dev/null @@ -1,1665 +0,0 @@ -/* - * Tests for WIDL and RPC server/clients. - * - * Copyright (C) Google 2007 (Dan Hipschman) - * - * 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 "wine/test.h" -#include "server_s.h" -#include "server_defines.h" - -#include -#include -#include - -#define PORT "4114" -#define PIPE "\\pipe\\wine_rpcrt4_test" - -#define INT_CODE 4198 - -static const char *progname; -static BOOL old_windows_version; - -static HANDLE stop_event; - -static void (WINAPI *pNDRSContextMarshall2)(RPC_BINDING_HANDLE, NDR_SCONTEXT, void*, NDR_RUNDOWN, void*, ULONG); -static NDR_SCONTEXT (WINAPI *pNDRSContextUnmarshall2)(RPC_BINDING_HANDLE, void*, ULONG, void*, ULONG); -static RPC_STATUS (WINAPI *pRpcServerRegisterIfEx)(RPC_IF_HANDLE,UUID*, RPC_MGR_EPV*, unsigned int, - unsigned int,RPC_IF_CALLBACK_FN*); -static BOOLEAN (WINAPI *pGetUserNameExA)(EXTENDED_NAME_FORMAT, LPSTR, PULONG); -static RPC_STATUS (WINAPI *pRpcBindingSetAuthInfoExA)(RPC_BINDING_HANDLE, RPC_CSTR, ULONG, ULONG, - RPC_AUTH_IDENTITY_HANDLE, ULONG, RPC_SECURITY_QOS *); -static RPC_STATUS (WINAPI *pRpcServerRegisterAuthInfoA)(RPC_CSTR, ULONG, RPC_AUTH_KEY_RETRIEVAL_FN, LPVOID); - -static char *domain_and_user; - -/* type check statements generated in header file */ -fnprintf *p_printf = printf; - -static void InitFunctionPointers(void) -{ - HMODULE hrpcrt4 = GetModuleHandleA("rpcrt4.dll"); - HMODULE hsecur32 = LoadLibraryA("secur32.dll"); - - pNDRSContextMarshall2 = (void *)GetProcAddress(hrpcrt4, "NDRSContextMarshall2"); - pNDRSContextUnmarshall2 = (void *)GetProcAddress(hrpcrt4, "NDRSContextUnmarshall2"); - pRpcServerRegisterIfEx = (void *)GetProcAddress(hrpcrt4, "RpcServerRegisterIfEx"); - pRpcBindingSetAuthInfoExA = (void *)GetProcAddress(hrpcrt4, "RpcBindingSetAuthInfoExA"); - pRpcServerRegisterAuthInfoA = (void *)GetProcAddress(hrpcrt4, "RpcServerRegisterAuthInfoA"); - pGetUserNameExA = (void *)GetProcAddress(hsecur32, "GetUserNameExA"); - - if (!pNDRSContextMarshall2) old_windows_version = TRUE; -} - -void __RPC_FAR *__RPC_USER -midl_user_allocate(SIZE_T n) -{ - return HeapAlloc(GetProcessHeap(), 0, n); -} - -void __RPC_USER -midl_user_free(void __RPC_FAR *p) -{ - HeapFree(GetProcessHeap(), 0, p); -} - -static char * -xstrdup(const char *s) -{ - char *d = HeapAlloc(GetProcessHeap(), 0, strlen(s) + 1); - strcpy(d, s); - return d; -} - -int __cdecl s_int_return(void) -{ - return INT_CODE; -} - -int __cdecl s_square(int x) -{ - return x * x; -} - -int __cdecl s_sum(int x, int y) -{ - return x + y; -} - -signed char __cdecl s_sum_char(signed char x, signed char y) -{ - return x + y; -} - -short __cdecl s_sum_short(short x, short y) -{ - return x + y; -} - -int __cdecl s_sum_float(float x, float y) -{ - return x + y; -} - -int __cdecl s_sum_double_int(int x, double y) -{ - return x + y; -} - -hyper __cdecl s_sum_hyper(hyper x, hyper y) -{ - return x + y; -} - -int __cdecl s_sum_hyper_int(hyper x, hyper y) -{ - return x + y; -} - -int __cdecl s_sum_char_hyper(signed char x, hyper y) -{ - return x + y; -} - -void __cdecl s_square_out(int x, int *y) -{ - *y = s_square(x); -} - -void __cdecl s_square_ref(int *x) -{ - *x = s_square(*x); -} - -int __cdecl s_str_length(const char *s) -{ - return strlen(s); -} - -int __cdecl s_str_t_length(str_t s) -{ - return strlen(s); -} - -int __cdecl s_cstr_length(const char *s, int n) -{ - int len = 0; - while (0 < n-- && *s++) - ++len; - return len; -} - -int __cdecl s_dot_self(vector_t *v) -{ - return s_square(v->x) + s_square(v->y) + s_square(v->z); -} - -double __cdecl s_square_half(double x, double *y) -{ - *y = x / 2.0; - return x * x; -} - -float __cdecl s_square_half_float(float x, float *y) -{ - *y = x / 2.0f; - return x * x; -} - -LONG __cdecl s_square_half_long(LONG x, LONG *y) -{ - *y = x / 2; - return x * x; -} - -int __cdecl s_sum_fixed_array(int a[5]) -{ - return a[0] + a[1] + a[2] + a[3] + a[4]; -} - -int __cdecl s_pints_sum(pints_t *pints) -{ - return *pints->pi + **pints->ppi + ***pints->pppi; -} - -double __cdecl s_ptypes_sum(ptypes_t *pt) -{ - return *pt->pc + *pt->ps + *pt->pl + *pt->pf + *pt->pd; -} - -int __cdecl s_dot_pvectors(pvectors_t *p) -{ - return p->pu->x * (*p->pv)->x + p->pu->y * (*p->pv)->y + p->pu->z * (*p->pv)->z; -} - -int __cdecl s_sum_sp(sp_t *sp) -{ - return sp->x + sp->s->x; -} - -double __cdecl s_square_sun(sun_t *su) -{ - switch (su->s) - { - case SUN_I: return su->u.i * su->u.i; - case SUN_F1: - case SUN_F2: return su->u.f * su->u.f; - case SUN_PI: return (*su->u.pi) * (*su->u.pi); - default: - return 0.0; - } -} - -int __cdecl s_test_list_length(test_list_t *list) -{ - return (list->t == TL_LIST - ? 1 + s_test_list_length(list->u.tail) - : 0); -} - -int __cdecl s_sum_fixed_int_3d(int m[2][3][4]) -{ - int i, j, k; - int sum = 0; - - for (i = 0; i < 2; ++i) - for (j = 0; j < 3; ++j) - for (k = 0; k < 4; ++k) - sum += m[i][j][k]; - - return sum; -} - -int __cdecl s_sum_conf_array(int x[], int n) -{ - int *p = x, *end = p + n; - int sum = 0; - - while (p < end) - sum += *p++; - - return sum; -} - -int __cdecl s_sum_conf_ptr_by_conf_ptr(int n1, int *n2_then_x1, int *x2) -{ - int i; - int sum = 0; - if(n1 == 0) - return 0; - - for(i = 1; i < n1; ++i) - sum += n2_then_x1[i]; - - for(i = 0; i < *n2_then_x1; ++i) - sum += x2[i]; - - return sum; -} - -int __cdecl s_sum_unique_conf_array(int x[], int n) -{ - return s_sum_conf_array(x, n); -} - -int __cdecl s_sum_unique_conf_ptr(int *x, int n) -{ - return x ? s_sum_conf_array(x, n) : 0; -} - -int __cdecl s_sum_var_array(int x[20], int n) -{ - ok(0 <= n, "RPC sum_var_array\n"); - ok(n <= 20, "RPC sum_var_array\n"); - - return s_sum_conf_array(x, n); -} - -int __cdecl s_sum_complex_array(int n, refpint_t pi[]) -{ - int total = 0; - for (; n > 0; n--) - total += *pi[n - 1]; - return total; -} - -int __cdecl s_dot_two_vectors(vector_t vs[2]) -{ - return vs[0].x * vs[1].x + vs[0].y * vs[1].y + vs[0].z * vs[1].z; -} - -void __cdecl s_get_number_array(int x[20], int *n) -{ - int c[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; - memcpy(x, c, sizeof(c)); - *n = sizeof(c)/sizeof(c[0]); -} - -int __cdecl s_sum_cs(cs_t *cs) -{ - return s_sum_conf_array(cs->ca, cs->n); -} - -int __cdecl s_sum_cps(cps_t *cps) -{ - int sum = 0; - int i; - - for (i = 0; i < *cps->pn; ++i) - sum += cps->ca1[i]; - - for (i = 0; i < 2 * cps->n; ++i) - sum += cps->ca2[i]; - - return sum; -} - -int __cdecl s_sum_cpsc(cpsc_t *cpsc) -{ - int sum = 0; - int i; - for (i = 0; i < (cpsc->c ? cpsc->a : cpsc->b); ++i) - sum += cpsc->ca[i]; - return sum; -} - -int __cdecl s_get_cpsc(int n, cpsc_t *cpsc) -{ - int i, ret; - - cpsc->a = 2 * n; - cpsc->b = 2; - cpsc->c = 1; - cpsc->ca = MIDL_user_allocate( cpsc->a * sizeof(int) ); - for (i = ret = 0; i < cpsc->a; i++) cpsc->ca[i] = i; - for (i = ret = 0; i < cpsc->a; i++) ret += cpsc->ca[i]; - return ret; -} - -int __cdecl s_square_puint(puint_t p) -{ - int n = atoi(p); - return n * n; -} - -int __cdecl s_sum_puints(puints_t *p) -{ - int sum = 0; - int i; - for (i = 0; i < p->n; ++i) - sum += atoi(p->ps[i]); - return sum; -} - -int __cdecl s_sum_cpuints(cpuints_t *p) -{ - int sum = 0; - int i; - for (i = 0; i < p->n; ++i) - sum += atoi(p->ps[i]); - return sum; -} - -int __cdecl s_dot_copy_vectors(vector_t u, vector_t v) -{ - return u.x * v.x + u.y * v.y + u.z * v.z; -} - -int __cdecl s_square_test_us(test_us_t *tus) -{ - int n = atoi(tus->us.x); - return n * n; -} - -double __cdecl s_square_encu(encu_t *eu) -{ - switch (eu->t) - { - case ENCU_I: return eu->tagged_union.i * eu->tagged_union.i; - case ENCU_F: return eu->tagged_union.f * eu->tagged_union.f; - default: - return 0.0; - } -} - -double __cdecl s_square_unencu(int t, unencu_t *eu) -{ - switch (t) - { - case ENCU_I: return eu->i * eu->i; - case ENCU_F: return eu->f * eu->f; - default: - return 0.0; - } -} - -void __cdecl s_check_se2(se_t *s) -{ - ok(s->f == E2, "check_se2\n"); -} - -int __cdecl s_sum_parr(int *a[3]) -{ - return s_sum_pcarr(a, 3); -} - -int __cdecl s_sum_pcarr(int *a[], int n) -{ - int i, s = 0; - for (i = 0; i < n; ++i) - s += *a[i]; - return s; -} - -int __cdecl s_enum_ord(e_t e) -{ - switch (e) - { - case E1: return 1; - case E2: return 2; - case E3: return 3; - case E4: return 4; - default: - return 0; - } -} - -double __cdecl s_square_encue(encue_t *eue) -{ - switch (eue->t) - { - case E1: return eue->tagged_union.i1 * eue->tagged_union.i1; - case E2: return eue->tagged_union.f2 * eue->tagged_union.f2; - default: - return 0.0; - } -} - -int __cdecl s_sum_toplev_conf_2n(int *x, int n) -{ - int sum = 0; - int i; - for (i = 0; i < 2 * n; ++i) - sum += x[i]; - return sum; -} - -int __cdecl s_sum_toplev_conf_cond(int *x, int a, int b, int c) -{ - int sum = 0; - int n = c ? a : b; - int i; - for (i = 0; i < n; ++i) - sum += x[i]; - return sum; -} - -double __cdecl s_sum_aligns(aligns_t *a) -{ - return a->c + a->i + a->s + a->d; -} - -int __cdecl s_sum_padded(padded_t *p) -{ - return p->i + p->c; -} - -int __cdecl s_sum_padded2(padded_t ps[2]) -{ - return s_sum_padded(&ps[0]) + s_sum_padded(&ps[1]); -} - -int __cdecl s_sum_padded_conf(padded_t *ps, int n) -{ - int sum = 0; - int i; - for (i = 0; i < n; ++i) - sum += s_sum_padded(&ps[i]); - return sum; -} - -int __cdecl s_sum_bogus(bogus_t *b) -{ - return *b->h.p1 + *b->p2 + *b->p3 + b->c; -} - -void __cdecl s_check_null(int *null) -{ - ok(!null, "RPC check_null\n"); -} - -int __cdecl s_str_struct_len(str_struct_t *s) -{ - return lstrlenA(s->s); -} - -int __cdecl s_wstr_struct_len(wstr_struct_t *s) -{ - return lstrlenW(s->s); -} - -int __cdecl s_sum_doub_carr(doub_carr_t *dc) -{ - int i, j; - int sum = 0; - for (i = 0; i < dc->n; ++i) - for (j = 0; j < dc->a[i]->n; ++j) - sum += dc->a[i]->a[j]; - return sum; -} - -void __cdecl s_make_pyramid_doub_carr(unsigned char n, doub_carr_t **dc) -{ - doub_carr_t *t; - int i, j; - t = MIDL_user_allocate(FIELD_OFFSET(doub_carr_t, a[n])); - t->n = n; - for (i = 0; i < n; ++i) - { - int v = i + 1; - t->a[i] = MIDL_user_allocate(FIELD_OFFSET(doub_carr_1_t, a[v])); - t->a[i]->n = v; - for (j = 0; j < v; ++j) - t->a[i]->a[j] = j + 1; - } - *dc = t; -} - -unsigned __cdecl s_hash_bstr(bstr_t b) -{ - short n = b[-1]; - short *s = b; - unsigned hash = 0; - short i; - for (i = 0; i < n; ++i) - hash = 5 * hash + (unsigned) s[i]; - return hash; -} - -void __cdecl s_get_a_bstr(bstr_t *b) -{ - bstr_t bstr; - short str[] = {5, 'W', 'i', 'n', 'e', 0}; - bstr = HeapAlloc(GetProcessHeap(), 0, sizeof(str)); - memcpy(bstr, str, sizeof(str)); - *b = bstr + 1; -} - -void __cdecl s_get_name(name_t *name) -{ - const char bossman[] = "Jeremy White"; - memcpy(name->name, bossman, min(name->size, sizeof(bossman))); - /* ensure nul-termination */ - if (name->size < sizeof(bossman)) - name->name[name->size - 1] = 0; -} - -int __cdecl s_sum_pcarr2(int n, int **pa) -{ - return s_sum_conf_array(*pa, n); -} - -int __cdecl s_sum_L1_norms(int n, vector_t *vs) -{ - int i; - int sum = 0; - for (i = 0; i < n; ++i) - sum += abs(vs[i].x) + abs(vs[i].y) + abs(vs[i].z); - return sum; -} - -s123_t * __cdecl s_get_s123(void) -{ - s123_t *s = MIDL_user_allocate(sizeof *s); - s->f1 = 1; - s->f2 = 2; - s->f3 = 3; - return s; -} - -str_t __cdecl s_get_filename(void) -{ - return (char *)__FILE__; -} - -int __cdecl s_echo_ranged_int(int i, int j, int k) -{ - return min( 100, i + j + k ); -} - -int __cdecl s_echo_ranged_int2(int i) -{ - return i; -} - -void __cdecl s_get_ranged_enum(renum_t *re) -{ - *re = RE3; -} - -void __cdecl s_context_handle_test(void) -{ - NDR_SCONTEXT h; - RPC_BINDING_HANDLE binding; - RPC_STATUS status; - unsigned char buf[20]; - static RPC_SERVER_INTERFACE server_if = - { - sizeof(RPC_SERVER_INTERFACE), - {{0x00000000,0x4114,0x0704,{0x23,0x01,0x00,0x00,0x00,0x00,0x00,0x00}},{1,0}}, - {{0x8a885d04,0x1ceb,0x11c9,{0x9f,0xe8,0x08,0x00,0x2b,0x10,0x48,0x60}},{2,0}}, - NULL, - 0, - 0, - 0, - 0, - 0, - }; - - binding = I_RpcGetCurrentCallHandle(); - ok(binding != NULL, "I_RpcGetCurrentCallHandle returned NULL\n"); - - if (!pNDRSContextMarshall2 || !pNDRSContextUnmarshall2) - { - win_skip("NDRSContextMarshall2 or NDRSContextUnmarshall2 not exported from rpcrt4.dll\n"); - return; - } - - h = pNDRSContextUnmarshall2(binding, NULL, NDR_LOCAL_DATA_REPRESENTATION, NULL, 0); - ok(h != NULL, "NDRSContextUnmarshall2 returned NULL\n"); - - /* marshal a context handle with NULL userContext */ - memset(buf, 0xcc, sizeof(buf)); - pNDRSContextMarshall2(binding, h, buf, NULL, NULL, 0); - ok(*(ULONG *)buf == 0, "attributes should have been set to 0 instead of 0x%x\n", *(ULONG *)buf); - ok(UuidIsNil((UUID *)&buf[4], &status), "uuid should have been nil\n"); - - h = pNDRSContextUnmarshall2(binding, NULL, NDR_LOCAL_DATA_REPRESENTATION, NULL, 0); - ok(h != NULL, "NDRSContextUnmarshall2 returned NULL\n"); - - /* marshal a context handle with non-NULL userContext */ - memset(buf, 0xcc, sizeof(buf)); - h->userContext = (void *)0xdeadbeef; - pNDRSContextMarshall2(binding, h, buf, NULL, NULL, 0); - ok(*(ULONG *)buf == 0, "attributes should have been set to 0 instead of 0x%x\n", *(ULONG *)buf); - ok(!UuidIsNil((UUID *)&buf[4], &status), "uuid should not have been nil\n"); - - /* raises ERROR_INVALID_HANDLE exception on Vista upwards */ - if (0) - { - h = pNDRSContextUnmarshall2(binding, buf, NDR_LOCAL_DATA_REPRESENTATION, NULL, 0); - ok(h != NULL, "NDRSContextUnmarshall2 returned NULL\n"); - ok(h->userContext == (void *)0xdeadbeef, "userContext of interface didn't unmarshal properly: %p\n", h->userContext); - - /* marshal a context handle with an interface specified */ - h = pNDRSContextUnmarshall2(binding, NULL, NDR_LOCAL_DATA_REPRESENTATION, &server_if.InterfaceId, 0); - ok(h != NULL, "NDRSContextUnmarshall2 returned NULL\n"); - - memset(buf, 0xcc, sizeof(buf)); - h->userContext = (void *)0xcafebabe; - pNDRSContextMarshall2(binding, h, buf, NULL, &server_if.InterfaceId, 0); - ok(*(ULONG *)buf == 0, "attributes should have been set to 0 instead of 0x%x\n", *(ULONG *)buf); - ok(!UuidIsNil((UUID *)&buf[4], &status), "uuid should not have been nil\n"); - - h = pNDRSContextUnmarshall2(binding, buf, NDR_LOCAL_DATA_REPRESENTATION, &server_if.InterfaceId, 0); - ok(h != NULL, "NDRSContextUnmarshall2 returned NULL\n"); - ok(h->userContext == (void *)0xcafebabe, "userContext of interface didn't unmarshal properly: %p\n", h->userContext); - } - - /* test same interface data, but different pointer */ - /* raises ERROR_INVALID_HANDLE exception */ - if (0) - { - RPC_SERVER_INTERFACE server_if_clone = server_if; - - pNDRSContextUnmarshall2(binding, buf, NDR_LOCAL_DATA_REPRESENTATION, &server_if_clone.InterfaceId, 0); - } - - /* test different interface data, but different pointer */ - /* raises ERROR_INVALID_HANDLE exception */ - if (0) - { - static RPC_SERVER_INTERFACE server_if2 = - { - sizeof(RPC_SERVER_INTERFACE), - {{0x00000000,0x4114,0x0704,{0x23,0x01,0x00,0x00,0x00,0x00,0x00,0x00}},{1,0}}, - {{0x8a885d04,0x1ceb,0x11c9,{0x9f,0xe8,0x08,0x00,0x2b,0x10,0x48,0x60}},{2,0}}, - NULL, - 0, - 0, - 0, - 0, - 0, - }; - pNDRSContextMarshall2(binding, h, buf, NULL, &server_if.InterfaceId, 0); - - pNDRSContextUnmarshall2(binding, buf, NDR_LOCAL_DATA_REPRESENTATION, &server_if2.InterfaceId, 0); - } -} - -void __cdecl s_get_numbers(int length, int size, pints_t n[]) -{ - int i; - for (i = 0; i < length; i++) - { - n[i].pi = midl_user_allocate(sizeof(*n[i].pi)); - *n[i].pi = i; - n[i].ppi = NULL; - n[i].pppi = NULL; - } -} - -void __cdecl s_get_numbers_struct(numbers_struct_t **ns) -{ - int i; - *ns = midl_user_allocate(FIELD_OFFSET(numbers_struct_t, numbers[5])); - if (!*ns) return; - (*ns)->length = 5; - (*ns)->size = 5; - for (i = 0; i < (*ns)->length; i++) - { - (*ns)->numbers[i].pi = NULL; - (*ns)->numbers[i].ppi = NULL; - (*ns)->numbers[i].pppi = NULL; - } - (*ns)->numbers[0].pi = midl_user_allocate(sizeof(*(*ns)->numbers[i].pi)); - *(*ns)->numbers[0].pi = 5; -} - -void __cdecl s_full_pointer_test(int *a, int *b) -{ - ok(*a == 42, "Expected *a to be 42 instead of %d\n", *a); - ok(*b == 42, "Expected *b to be 42 instead of %d\n", *a); - ok(a == b, "Expected a (%p) to point to the same memory as b (%p)\n", a, b); -} - -void __cdecl s_full_pointer_null_test(int *a, int *b) -{ - ok(*a == 42, "Expected *a to be 42 instead of %d\n", *a); - ok(b == NULL, "Expected b to be NULL instead of %p\n", b); -} - -void __cdecl s_stop(void) -{ - ok(RPC_S_OK == RpcMgmtStopServerListening(NULL), "RpcMgmtStopServerListening\n"); - ok(RPC_S_OK == RpcServerUnregisterIf(NULL, NULL, FALSE), "RpcServerUnregisterIf\n"); - ok(SetEvent(stop_event), "SetEvent\n"); -} - -static void -make_cmdline(char buffer[MAX_PATH], const char *test) -{ - sprintf(buffer, "%s server %s", progname, test); -} - -static void -run_client(const char *test) -{ - char cmdline[MAX_PATH]; - PROCESS_INFORMATION info; - STARTUPINFOA startup; - - memset(&startup, 0, sizeof startup); - startup.cb = sizeof startup; - - make_cmdline(cmdline, test); - ok(CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info), "CreateProcess\n"); - winetest_wait_child_process( info.hProcess ); - ok(CloseHandle(info.hProcess), "CloseHandle\n"); - ok(CloseHandle(info.hThread), "CloseHandle\n"); -} - -static void -basic_tests(void) -{ - char string[] = "I am a string"; - WCHAR wstring[] = {'I',' ','a','m',' ','a',' ','w','s','t','r','i','n','g', 0}; - int f[5] = {1, 3, 0, -2, -4}; - vector_t a = {1, 3, 7}; - vector_t vec1 = {4, -2, 1}, vec2 = {-5, 2, 3}, *pvec2 = &vec2; - pvectors_t pvecs = {&vec1, &pvec2}; - sp_inner_t spi = {42}; - sp_t sp = {-13, &spi}; - aligns_t aligns; - pints_t pints; - ptypes_t ptypes; - padded_t padded; - padded_t padded2[2]; - bogus_t bogus; - int i1, i2, i3, *pi2, *pi3, **ppi3; - double u, v; - float s, t; - LONG q, r; - short h; - char c; - int x; - hyper y; - str_struct_t ss = {string}; - wstr_struct_t ws = {wstring}; - str_t str; - se_t se; - renum_t re; - - ok(int_return() == INT_CODE, "RPC int_return\n"); - - ok(square(7) == 49, "RPC square\n"); - x = sum(23, -4); - ok(x == 19, "RPC sum got %d\n", x); - c = sum_char(-23, 50); - ok(c == 27, "RPC sum_char got %d\n", (int)c); - h = sum_short(1122, -344); - ok(h == 778, "RPC sum_short got %d\n", (int)h); - x = sum_float(123.45, -32.2); - ok(x == 91, "RPC sum_float got %d\n", x); - x = sum_double_int(-78, 148.46); - ok(x == 70, "RPC sum_double_int got %d\n", x); - y = sum_hyper((hyper)0x12345678 << 16, (hyper)0x33557799 << 16); - ok(y == (hyper)0x4589ce11 << 16, "RPC hyper got %x%08x\n", (DWORD)(y >> 32), (DWORD)y); - x = sum_hyper_int((hyper)0x24242424 << 16, -((hyper)0x24241212 << 16)); - ok(x == 0x12120000, "RPC hyper_int got 0x%x\n", x); - x = sum_char_hyper( 12, ((hyper)0x42424242 << 32) | 0x33334444 ); - ok(x == 0x33334450, "RPC char_hyper got 0x%x\n", x); - - x = 0; - square_out(11, &x); - ok(x == 121, "RPC square_out\n"); - - x = 5; - square_ref(&x); - ok(x == 25, "RPC square_ref\n"); - - ok(str_length(string) == strlen(string), "RPC str_length\n"); - ok(str_t_length(string) == strlen(string), "RPC str_length\n"); - ok(dot_self(&a) == 59, "RPC dot_self\n"); - - ok(str_struct_len(&ss) == lstrlenA(string), "RPC str_struct_len\n"); - ok(wstr_struct_len(&ws) == lstrlenW(wstring), "RPC str_struct_len\n"); - - v = 0.0; - u = square_half(3.0, &v); - ok(u == 9.0, "RPC square_half\n"); - ok(v == 1.5, "RPC square_half\n"); - - t = 0.0f; - s = square_half_float(3.0f, &t); - ok(s == 9.0f, "RPC square_half_float\n"); - ok(t == 1.5f, "RPC square_half_float\n"); - - r = 0; - q = square_half_long(3, &r); - ok(q == 9, "RPC square_half_long\n"); - ok(r == 1, "RPC square_half_long\n"); - - i1 = 19; - i2 = -3; - i3 = -29; - pi2 = &i2; - pi3 = &i3; - ppi3 = &pi3; - pints.pi = &i1; - pints.ppi = &pi2; - pints.pppi = &ppi3; - ok(pints_sum(&pints) == -13, "RPC pints_sum\n"); - - c = 10; - h = 3; - q = 14; - s = -5.0f; - u = 11.0; - ptypes.pc = &c; - ptypes.ps = &h; - ptypes.pl = &q; - ptypes.pf = &s; - ptypes.pd = &u; - ok(ptypes_sum(&ptypes) == 33.0, "RPC ptypes_sum\n"); - - ok(dot_pvectors(&pvecs) == -21, "RPC dot_pvectors\n"); - ok(dot_copy_vectors(vec1, vec2) == -21, "RPC dot_copy_vectors\n"); - ok(sum_fixed_array(f) == -2, "RPC sum_fixed_array\n"); - ok(sum_sp(&sp) == 29, "RPC sum_sp\n"); - - ok(enum_ord(E1) == 1, "RPC enum_ord\n"); - ok(enum_ord(E2) == 2, "RPC enum_ord\n"); - ok(enum_ord(E3) == 3, "RPC enum_ord\n"); - ok(enum_ord(E4) == 4, "RPC enum_ord\n"); - - se.f = E2; - check_se2(&se); - - memset(&aligns, 0, sizeof(aligns)); - aligns.c = 3; - aligns.i = 4; - aligns.s = 5; - aligns.d = 6.0; - ok(sum_aligns(&aligns) == 18.0, "RPC sum_aligns\n"); - - padded.i = -3; - padded.c = 8; - ok(sum_padded(&padded) == 5, "RPC sum_padded\n"); - padded2[0].i = -5; - padded2[0].c = 1; - padded2[1].i = 3; - padded2[1].c = 7; - ok(sum_padded2(padded2) == 6, "RPC sum_padded2\n"); - padded2[0].i = -5; - padded2[0].c = 1; - padded2[1].i = 3; - padded2[1].c = 7; - ok(sum_padded_conf(padded2, 2) == 6, "RPC sum_padded_conf\n"); - - i1 = 14; - i2 = -7; - i3 = -4; - bogus.h.p1 = &i1; - bogus.p2 = &i2; - bogus.p3 = &i3; - bogus.c = 9; - ok(sum_bogus(&bogus) == 12, "RPC sum_bogus\n"); - - check_null(NULL); - - str = get_filename(); - ok(!strcmp(str, __FILE__), "get_filename() returned %s instead of %s\n", str, __FILE__); - midl_user_free(str); - - x = echo_ranged_int(0,0,0); - ok(x == 0, "echo_ranged_int() returned %d instead of 0\n", x); - x = echo_ranged_int(10,20,100); - ok(x == 100, "echo_ranged_int() returned %d instead of 100\n", x); - x = echo_ranged_int2(40); - ok(x == 40, "echo_ranged_int() returned %d instead of 40\n", x); - - if (!old_windows_version) - { - get_ranged_enum(&re); - ok(re == RE3, "get_ranged_enum() returned %d instead of RE3\n", re); - } -} - -static void -union_tests(void) -{ - encue_t eue; - encu_t eu; - unencu_t uneu; - sun_t su; - int i; - - su.s = SUN_I; - su.u.i = 9; - ok(square_sun(&su) == 81.0, "RPC square_sun\n"); - - su.s = SUN_F1; - su.u.f = 5.0; - ok(square_sun(&su) == 25.0, "RPC square_sun\n"); - - su.s = SUN_F2; - su.u.f = -2.0; - ok(square_sun(&su) == 4.0, "RPC square_sun\n"); - - su.s = SUN_PI; - su.u.pi = &i; - i = 11; - ok(square_sun(&su) == 121.0, "RPC square_sun\n"); - - eu.t = ENCU_I; - eu.tagged_union.i = 7; - ok(square_encu(&eu) == 49.0, "RPC square_encu\n"); - - eu.t = ENCU_F; - eu.tagged_union.f = 3.0; - ok(square_encu(&eu) == 9.0, "RPC square_encu\n"); - - uneu.i = 4; - ok(square_unencu(ENCU_I, &uneu) == 16.0, "RPC square_unencu\n"); - - uneu.f = 5.0; - ok(square_unencu(ENCU_F, &uneu) == 25.0, "RPC square_unencu\n"); - - eue.t = E1; - eue.tagged_union.i1 = 8; - ok(square_encue(&eue) == 64.0, "RPC square_encue\n"); - - eue.t = E2; - eue.tagged_union.f2 = 10.0; - ok(square_encue(&eue) == 100.0, "RPC square_encue\n"); -} - -static test_list_t * -null_list(void) -{ - test_list_t *n = HeapAlloc(GetProcessHeap(), 0, sizeof *n); - n->t = TL_NULL; - n->u.x = 0; - return n; -} - -static test_list_t * -make_list(test_list_t *tail) -{ - test_list_t *n = HeapAlloc(GetProcessHeap(), 0, sizeof *n); - n->t = TL_LIST; - n->u.tail = tail; - return n; -} - -static void -free_list(test_list_t *list) -{ - if (list->t == TL_LIST) - free_list(list->u.tail); - HeapFree(GetProcessHeap(), 0, list); -} - -ULONG __RPC_USER -puint_t_UserSize(ULONG *flags, ULONG start, puint_t *p) -{ - return start + sizeof(int); -} - -unsigned char * __RPC_USER -puint_t_UserMarshal(ULONG *flags, unsigned char *buffer, puint_t *p) -{ - int n = atoi(*p); - memcpy(buffer, &n, sizeof n); - return buffer + sizeof n; -} - -unsigned char * __RPC_USER -puint_t_UserUnmarshal(ULONG *flags, unsigned char *buffer, puint_t *p) -{ - int n; - memcpy(&n, buffer, sizeof n); - *p = HeapAlloc(GetProcessHeap(), 0, 10); - sprintf(*p, "%d", n); - return buffer + sizeof n; -} - -void __RPC_USER -puint_t_UserFree(ULONG *flags, puint_t *p) -{ - HeapFree(GetProcessHeap(), 0, *p); -} - -ULONG __RPC_USER -us_t_UserSize(ULONG *flags, ULONG start, us_t *pus) -{ - return start + sizeof(struct wire_us); -} - -unsigned char * __RPC_USER -us_t_UserMarshal(ULONG *flags, unsigned char *buffer, us_t *pus) -{ - struct wire_us wus; - wus.x = atoi(pus->x); - memcpy(buffer, &wus, sizeof wus); - return buffer + sizeof wus; -} - -unsigned char * __RPC_USER -us_t_UserUnmarshal(ULONG *flags, unsigned char *buffer, us_t *pus) -{ - struct wire_us wus; - memcpy(&wus, buffer, sizeof wus); - pus->x = HeapAlloc(GetProcessHeap(), 0, 10); - sprintf(pus->x, "%d", wus.x); - return buffer + sizeof wus; -} - -void __RPC_USER -us_t_UserFree(ULONG *flags, us_t *pus) -{ - HeapFree(GetProcessHeap(), 0, pus->x); -} - -ULONG __RPC_USER -bstr_t_UserSize(ULONG *flags, ULONG start, bstr_t *b) -{ - return start + FIELD_OFFSET(user_bstr_t, data[(*b)[-1]]); -} - -unsigned char * __RPC_USER -bstr_t_UserMarshal(ULONG *flags, unsigned char *buffer, bstr_t *b) -{ - wire_bstr_t wb = (wire_bstr_t) buffer; - wb->n = (*b)[-1]; - memcpy(&wb->data, *b, wb->n * sizeof wb->data[0]); - return buffer + FIELD_OFFSET(user_bstr_t, data[wb->n]); -} - -unsigned char * __RPC_USER -bstr_t_UserUnmarshal(ULONG *flags, unsigned char *buffer, bstr_t *b) -{ - wire_bstr_t wb = (wire_bstr_t) buffer; - short *data = HeapAlloc(GetProcessHeap(), 0, (wb->n + 1) * sizeof *data); - data[0] = wb->n; - memcpy(&data[1], wb->data, wb->n * sizeof data[1]); - *b = &data[1]; - return buffer + FIELD_OFFSET(user_bstr_t, data[wb->n]); -} - -void __RPC_USER -bstr_t_UserFree(ULONG *flags, bstr_t *b) -{ - HeapFree(GetProcessHeap(), 0, &((*b)[-1])); -} - -static void -pointer_tests(void) -{ - int a[] = {1, 2, 3, 4}; - char p1[] = "11"; - test_list_t *list = make_list(make_list(make_list(null_list()))); - test_us_t tus = {{p1}}; - int *pa[4]; - puints_t pus; - cpuints_t cpus; - short bstr_data[] = { 5, 'H', 'e', 'l', 'l', 'o' }; - bstr_t bstr = &bstr_data[1], bstr2; - name_t name; - void *buffer; - int *pa2; - s123_t *s123; - int val = 42; - - ok(test_list_length(list) == 3, "RPC test_list_length\n"); - ok(square_puint(p1) == 121, "RPC square_puint\n"); - pus.n = 4; - pus.ps = HeapAlloc(GetProcessHeap(), 0, pus.n * sizeof pus.ps[0]); - pus.ps[0] = xstrdup("5"); - pus.ps[1] = xstrdup("6"); - pus.ps[2] = xstrdup("7"); - pus.ps[3] = xstrdup("8"); - ok(sum_puints(&pus) == 26, "RPC sum_puints\n"); - HeapFree(GetProcessHeap(), 0, pus.ps[0]); - HeapFree(GetProcessHeap(), 0, pus.ps[1]); - HeapFree(GetProcessHeap(), 0, pus.ps[2]); - HeapFree(GetProcessHeap(), 0, pus.ps[3]); - HeapFree(GetProcessHeap(), 0, pus.ps); - cpus.n = 4; - cpus.ps = HeapAlloc(GetProcessHeap(), 0, cpus.n * sizeof cpus.ps[0]); - cpus.ps[0] = xstrdup("5"); - cpus.ps[1] = xstrdup("6"); - cpus.ps[2] = xstrdup("7"); - cpus.ps[3] = xstrdup("8"); - ok(sum_cpuints(&cpus) == 26, "RPC sum_puints\n"); - HeapFree(GetProcessHeap(), 0, cpus.ps[0]); - HeapFree(GetProcessHeap(), 0, cpus.ps[1]); - HeapFree(GetProcessHeap(), 0, cpus.ps[2]); - HeapFree(GetProcessHeap(), 0, cpus.ps[3]); - HeapFree(GetProcessHeap(), 0, cpus.ps); - ok(square_test_us(&tus) == 121, "RPC square_test_us\n"); - - pa[0] = &a[0]; - pa[1] = &a[1]; - pa[2] = &a[2]; - ok(sum_parr(pa) == 6, "RPC sum_parr\n"); - - pa[0] = &a[0]; - pa[1] = &a[1]; - pa[2] = &a[2]; - pa[3] = &a[3]; - ok(sum_pcarr(pa, 4) == 10, "RPC sum_pcarr\n"); - - ok(hash_bstr(bstr) == s_hash_bstr(bstr), "RPC hash_bstr_data\n"); - - get_a_bstr(&bstr); - s_get_a_bstr(&bstr2); - ok(!lstrcmpW((LPCWSTR)bstr, (LPCWSTR)bstr2), "bstr mismatch\n"); - HeapFree(GetProcessHeap(), 0, bstr - 1); - HeapFree(GetProcessHeap(), 0, bstr2 - 1); - - free_list(list); - - if (!old_windows_version) - { - name.size = 10; - name.name = buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, name.size); - get_name(&name); - ok(name.name == buffer, "[in,out] pointer should have stayed as %p but instead changed to %p\n", name.name, buffer); - ok(!strcmp(name.name, "Jeremy Wh"), "name didn't unmarshall properly, expected \"Jeremy Wh\", but got \"%s\"\n", name.name); - HeapFree(GetProcessHeap(), 0, name.name); - } - - pa2 = a; - ok(sum_pcarr2(4, &pa2) == 10, "RPC sum_pcarr2\n"); - - s123 = get_s123(); - ok(s123->f1 == 1 && s123->f2 == 2 && s123->f3 == 3, "RPC get_s123\n"); - MIDL_user_free(s123); - - full_pointer_test(&val, &val); - full_pointer_null_test(&val, NULL); -} - -static int -check_pyramid_doub_carr(doub_carr_t *dc) -{ - int i, j; - for (i = 0; i < dc->n; ++i) - for (j = 0; j < dc->a[i]->n; ++j) - if (dc->a[i]->a[j] != j + 1) - return FALSE; - return TRUE; -} - -static void -free_pyramid_doub_carr(doub_carr_t *dc) -{ - int i; - for (i = 0; i < dc->n; ++i) - MIDL_user_free(dc->a[i]); - MIDL_user_free(dc); -} - -static void -array_tests(void) -{ - int m[2][3][4] = - { - {{1, 2, 3, 4}, {-1, -3, -5, -7}, {0, 2, 4, 6}}, - {{1, -2, 3, -4}, {2, 3, 5, 7}, {-4, -1, -14, 4114}} - }; - int c[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; - int c2[] = {10, 100, 200}; - int c3[20]; - vector_t vs[2] = {{1, -2, 3}, {4, -5, -6}}; - cps_t cps; - cpsc_t cpsc; - cs_t *cs; - int n; - int ca[5] = {1, -2, 3, -4, 5}; - int tmp[10]; - doub_carr_t *dc; - int *pi; - pints_t api[5]; - numbers_struct_t *ns; - refpint_t rpi[5]; - - if (!old_windows_version) - { - const char str1[25] = "Hello"; - ok(cstr_length(str1, sizeof str1) == strlen(str1), "RPC cstr_length\n"); - } - - ok(sum_fixed_int_3d(m) == 4116, "RPC sum_fixed_int_3d\n"); - - ok(sum_conf_array(c, 10) == 45, "RPC sum_conf_array\n"); - ok(sum_conf_array(&c[5], 2) == 11, "RPC sum_conf_array\n"); - ok(sum_conf_array(&c[7], 1) == 7, "RPC sum_conf_array\n"); - ok(sum_conf_array(&c[2], 0) == 0, "RPC sum_conf_array\n"); - - ok(sum_conf_ptr_by_conf_ptr(1, c2, c) == 45, "RPC sum_conf_ptr_by_conf_ptr\n"); - ok(sum_conf_ptr_by_conf_ptr(3, c2, c) == 345, "RPC sum_conf_ptr_by_conf_ptr\n"); - c2[0] = 0; - ok(sum_conf_ptr_by_conf_ptr(3, c2, c) == 300, "RPC sum_conf_ptr_by_conf_ptr\n"); - - ok(sum_unique_conf_array(ca, 4) == -2, "RPC sum_unique_conf_array\n"); - ok(sum_unique_conf_ptr(ca, 5) == 3, "RPC sum_unique_conf_array\n"); - ok(sum_unique_conf_ptr(NULL, 10) == 0, "RPC sum_unique_conf_array\n"); - - get_number_array(c3, &n); - ok(n == 10, "RPC get_num_array\n"); - for (; n > 0; n--) - ok(c3[n-1] == c[n-1], "get_num_array returned wrong value %d @ %d\n", - c3[n-1], n); - ok(sum_var_array(c, 10) == 45, "RPC sum_conf_array\n"); - ok(sum_var_array(&c[5], 2) == 11, "RPC sum_conf_array\n"); - ok(sum_var_array(&c[7], 1) == 7, "RPC sum_conf_array\n"); - ok(sum_var_array(&c[2], 0) == 0, "RPC sum_conf_array\n"); - - ok(dot_two_vectors(vs) == -4, "RPC dot_two_vectors\n"); - cs = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(cs_t, ca[5])); - cs->n = 5; - cs->ca[0] = 3; - cs->ca[1] = 5; - cs->ca[2] = -2; - cs->ca[3] = -1; - cs->ca[4] = -4; - ok(sum_cs(cs) == 1, "RPC sum_cs\n"); - HeapFree(GetProcessHeap(), 0, cs); - - n = 5; - cps.pn = &n; - cps.ca1 = &c[2]; - cps.n = 3; - cps.ca2 = &c[3]; - ok(sum_cps(&cps) == 53, "RPC sum_cps\n"); - - cpsc.a = 4; - cpsc.b = 5; - cpsc.c = 1; - cpsc.ca = c; - ok(sum_cpsc(&cpsc) == 6, "RPC sum_cpsc\n"); - cpsc.a = 4; - cpsc.b = 5; - cpsc.c = 0; - cpsc.ca = c; - ok(sum_cpsc(&cpsc) == 10, "RPC sum_cpsc\n"); - - cpsc.ca = NULL; - ok(get_cpsc(5, &cpsc) == 45, "RPC sum_cpsc\n"); - ok( cpsc.a == 10, "RPC get_cpsc %u\n", cpsc.a ); - for (n = 0; n < 10; n++) ok( cpsc.ca[n] == n, "RPC get_cpsc[%d] = %d\n", n, cpsc.ca[n] ); - - memset( tmp, 0x33, sizeof(tmp) ); - cpsc.ca = tmp; - ok(get_cpsc(4, &cpsc) == 28, "RPC sum_cpsc\n"); - ok( cpsc.a == 8, "RPC get_cpsc %u\n", cpsc.a ); - ok( cpsc.ca == tmp, "RPC get_cpsc %p/%p\n", cpsc.ca, tmp ); - for (n = 0; n < 8; n++) ok( cpsc.ca[n] == n, "RPC get_cpsc[%d] = %d\n", n, cpsc.ca[n] ); - - ok(sum_toplev_conf_2n(c, 3) == 15, "RPC sum_toplev_conf_2n\n"); - ok(sum_toplev_conf_cond(c, 5, 6, 1) == 10, "RPC sum_toplev_conf_cond\n"); - ok(sum_toplev_conf_cond(c, 5, 6, 0) == 15, "RPC sum_toplev_conf_cond\n"); - - dc = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(doub_carr_t, a[2])); - dc->n = 2; - dc->a[0] = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(doub_carr_1_t, a[3])); - dc->a[0]->n = 3; - dc->a[0]->a[0] = 5; - dc->a[0]->a[1] = 1; - dc->a[0]->a[2] = 8; - dc->a[1] = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(doub_carr_1_t, a[2])); - dc->a[1]->n = 2; - dc->a[1]->a[0] = 2; - dc->a[1]->a[1] = 3; - ok(sum_doub_carr(dc) == 19, "RPC sum_doub_carr\n"); - HeapFree(GetProcessHeap(), 0, dc->a[0]); - HeapFree(GetProcessHeap(), 0, dc->a[1]); - HeapFree(GetProcessHeap(), 0, dc); - - dc = NULL; - make_pyramid_doub_carr(4, &dc); - ok(check_pyramid_doub_carr(dc), "RPC make_pyramid_doub_carr\n"); - free_pyramid_doub_carr(dc); - - ok(sum_L1_norms(2, vs) == 21, "RPC sum_L1_norms\n"); - - memset(api, 0, sizeof(api)); - pi = HeapAlloc(GetProcessHeap(), 0, sizeof(*pi)); - *pi = -1; - api[0].pi = pi; - get_numbers(1, 1, api); - ok(api[0].pi == pi, "RPC conformant varying array [out] pointer changed from %p to %p\n", pi, api[0].pi); - ok(*api[0].pi == 0, "pi unmarshalled incorrectly %d\n", *api[0].pi); - - if (!old_windows_version) - { - ns = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, FIELD_OFFSET(numbers_struct_t, numbers[5])); - ns->length = 5; - ns->size = 5; - ns->numbers[0].pi = pi; - get_numbers_struct(&ns); - ok(ns->numbers[0].pi == pi, "RPC conformant varying struct embedded pointer changed from %p to %p\n", pi, ns->numbers[0].pi); - ok(*ns->numbers[0].pi == 5, "pi unmarshalled incorrectly %d\n", *ns->numbers[0].pi); - HeapFree(GetProcessHeap(), 0, ns); - } - HeapFree(GetProcessHeap(), 0, pi); - - pi = HeapAlloc(GetProcessHeap(), 0, 5 * sizeof(*pi)); - pi[0] = 3; rpi[0] = &pi[0]; - pi[1] = 5; rpi[1] = &pi[1]; - pi[2] = -2; rpi[2] = &pi[2]; - pi[3] = -1; rpi[3] = &pi[3]; - pi[4] = -4; rpi[4] = &pi[4]; - ok(sum_complex_array(5, rpi) == 1, "RPC sum_complex_array\n"); - HeapFree(GetProcessHeap(), 0, pi); -} - -void __cdecl s_authinfo_test(unsigned int protseq, int secure) -{ - RPC_BINDING_HANDLE binding; - RPC_STATUS status; - ULONG level, authnsvc; - RPC_AUTHZ_HANDLE privs; - unsigned char *principal; - - binding = I_RpcGetCurrentCallHandle(); - ok(binding != NULL, "I_RpcGetCurrentCallHandle returned NULL\n"); - - level = authnsvc = 0xdeadbeef; - privs = (RPC_AUTHZ_HANDLE)0xdeadbeef; - principal = (unsigned char *)0xdeadbeef; - - if (secure || protseq == RPC_PROTSEQ_LRPC) - { - status = RpcBindingInqAuthClientA(binding, &privs, &principal, &level, &authnsvc, NULL); - if (status == RPC_S_CANNOT_SUPPORT) - { - win_skip("RpcBindingInqAuthClientA not supported\n"); - return; - } - ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status); - ok(privs != (RPC_AUTHZ_HANDLE)0xdeadbeef, "privs unchanged\n"); - ok(principal != (unsigned char *)0xdeadbeef, "principal unchanged\n"); - if (protseq != RPC_PROTSEQ_LRPC) - { - todo_wine - ok(principal != NULL, "NULL principal\n"); - } - if (protseq == RPC_PROTSEQ_LRPC && principal && pGetUserNameExA) - { - int len; - char *spn; - - len = WideCharToMultiByte(CP_ACP, 0, (const WCHAR *)privs, -1, NULL, 0, NULL, NULL); - spn = HeapAlloc( GetProcessHeap(), 0, len ); - WideCharToMultiByte(CP_ACP, 0, (const WCHAR *)privs, -1, spn, len, NULL, NULL); - - ok(!strcmp(domain_and_user, spn), "expected %s got %s\n", domain_and_user, spn); - HeapFree( GetProcessHeap(), 0, spn ); - } - ok(level == RPC_C_AUTHN_LEVEL_PKT_PRIVACY, "level unchanged\n"); - ok(authnsvc == RPC_C_AUTHN_WINNT, "authnsvc unchanged\n"); - - status = RpcImpersonateClient(NULL); - ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status); - status = RpcRevertToSelf(); - ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status); - - } - else - { - status = RpcBindingInqAuthClientA(binding, &privs, &principal, &level, &authnsvc, NULL); - ok(status == RPC_S_BINDING_HAS_NO_AUTH, "expected RPC_S_BINDING_HAS_NO_AUTH got %u\n", status); - ok(privs == (RPC_AUTHZ_HANDLE)0xdeadbeef, "got %p\n", privs); - ok(principal == (unsigned char *)0xdeadbeef, "got %s\n", principal); - ok(level == 0xdeadbeef, "got %u\n", level); - ok(authnsvc == 0xdeadbeef, "got %u\n", authnsvc); - } -} - -static void -run_tests(void) -{ - basic_tests(); - union_tests(); - pointer_tests(); - array_tests(); - context_handle_test(); -} - -static void -set_auth_info(RPC_BINDING_HANDLE handle) -{ - RPC_STATUS status; - RPC_SECURITY_QOS qos; - - if (!pGetUserNameExA) - return; - - qos.Version = 1; - qos.Capabilities = RPC_C_QOS_CAPABILITIES_MUTUAL_AUTH; - qos.IdentityTracking = RPC_C_QOS_IDENTITY_STATIC; - qos.ImpersonationType = RPC_C_IMP_LEVEL_IMPERSONATE; - - status = pRpcBindingSetAuthInfoExA(handle, (RPC_CSTR)domain_and_user, RPC_C_AUTHN_LEVEL_PKT_PRIVACY, - RPC_C_AUTHN_WINNT, NULL, 0, &qos); - ok(status == RPC_S_OK, "RpcBindingSetAuthInfoExA failed %d\n", status); -} - -static void -client(const char *test) -{ - static unsigned char iptcp[] = "ncacn_ip_tcp"; - static unsigned char np[] = "ncacn_np"; - static unsigned char ncalrpc[] = "ncalrpc"; - static unsigned char address[] = "127.0.0.1"; - static unsigned char address_np[] = "\\\\."; - static unsigned char port[] = PORT; - static unsigned char pipe[] = PIPE; - static unsigned char guid[] = "00000000-4114-0704-2301-000000000000"; - - unsigned char *binding; - - if (strcmp(test, "tcp_basic") == 0) - { - ok(RPC_S_OK == RpcStringBindingCompose(NULL, iptcp, address, port, NULL, &binding), "RpcStringBindingCompose\n"); - ok(RPC_S_OK == RpcBindingFromStringBinding(binding, &IServer_IfHandle), "RpcBindingFromStringBinding\n"); - - run_tests(); - authinfo_test(RPC_PROTSEQ_TCP, 0); - - ok(RPC_S_OK == RpcStringFree(&binding), "RpcStringFree\n"); - ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n"); - } - else if (strcmp(test, "tcp_secure") == 0) - { - ok(RPC_S_OK == RpcStringBindingCompose(NULL, iptcp, address, port, NULL, &binding), "RpcStringBindingCompose\n"); - ok(RPC_S_OK == RpcBindingFromStringBinding(binding, &IServer_IfHandle), "RpcBindingFromStringBinding\n"); - - set_auth_info(IServer_IfHandle); - authinfo_test(RPC_PROTSEQ_TCP, 1); - - ok(RPC_S_OK == RpcStringFree(&binding), "RpcStringFree\n"); - ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n"); - } - else if (strcmp(test, "ncalrpc_basic") == 0) - { - ok(RPC_S_OK == RpcStringBindingCompose(NULL, ncalrpc, NULL, guid, NULL, &binding), "RpcStringBindingCompose\n"); - ok(RPC_S_OK == RpcBindingFromStringBinding(binding, &IServer_IfHandle), "RpcBindingFromStringBinding\n"); - - run_tests(); /* can cause RPC_X_BAD_STUB_DATA exception */ - authinfo_test(RPC_PROTSEQ_LRPC, 0); - - ok(RPC_S_OK == RpcStringFree(&binding), "RpcStringFree\n"); - ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n"); - } - else if (strcmp(test, "ncalrpc_secure") == 0) - { - ok(RPC_S_OK == RpcStringBindingCompose(NULL, ncalrpc, NULL, guid, NULL, &binding), "RpcStringBindingCompose\n"); - ok(RPC_S_OK == RpcBindingFromStringBinding(binding, &IServer_IfHandle), "RpcBindingFromStringBinding\n"); - - set_auth_info(IServer_IfHandle); - authinfo_test(RPC_PROTSEQ_LRPC, 1); - - ok(RPC_S_OK == RpcStringFree(&binding), "RpcStringFree\n"); - ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n"); - } - else if (strcmp(test, "np_basic") == 0) - { - ok(RPC_S_OK == RpcStringBindingCompose(NULL, np, address_np, pipe, NULL, &binding), "RpcStringBindingCompose\n"); - ok(RPC_S_OK == RpcBindingFromStringBinding(binding, &IServer_IfHandle), "RpcBindingFromStringBinding\n"); - - run_tests(); - authinfo_test(RPC_PROTSEQ_NMP, 0); - stop(); - - ok(RPC_S_OK == RpcStringFree(&binding), "RpcStringFree\n"); - ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n"); - } -} - -static void -server(void) -{ - static unsigned char iptcp[] = "ncacn_ip_tcp"; - static unsigned char port[] = PORT; - static unsigned char np[] = "ncacn_np"; - static unsigned char pipe[] = PIPE; - static unsigned char ncalrpc[] = "ncalrpc"; - static unsigned char guid[] = "00000000-4114-0704-2301-000000000000"; - RPC_STATUS status, iptcp_status, np_status, ncalrpc_status; - DWORD ret; - - iptcp_status = RpcServerUseProtseqEp(iptcp, 20, port, NULL); - ok(iptcp_status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_ip_tcp) failed with status %d\n", iptcp_status); - - ncalrpc_status = RpcServerUseProtseqEp(ncalrpc, 0, guid, NULL); - ok(ncalrpc_status == RPC_S_OK, "RpcServerUseProtseqEp(ncalrpc) failed with status %d\n", ncalrpc_status); - - np_status = RpcServerUseProtseqEp(np, 0, pipe, NULL); - if (np_status == RPC_S_PROTSEQ_NOT_SUPPORTED) - skip("Protocol sequence ncacn_np is not supported\n"); - else - ok(np_status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_np) failed with status %d\n", np_status); - - if (pRpcServerRegisterIfEx) - { - trace("Using RpcServerRegisterIfEx\n"); - status = pRpcServerRegisterIfEx(s_IServer_v0_0_s_ifspec, NULL, NULL, - RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH, - RPC_C_LISTEN_MAX_CALLS_DEFAULT, NULL); - } - else - status = RpcServerRegisterIf(s_IServer_v0_0_s_ifspec, NULL, NULL); - ok(status == RPC_S_OK, "RpcServerRegisterIf failed with status %d\n", status); - status = RpcServerListen(1, 20, TRUE); - ok(status == RPC_S_OK, "RpcServerListen failed with status %d\n", status); - stop_event = CreateEvent(NULL, FALSE, FALSE, NULL); - ok(stop_event != NULL, "CreateEvent failed with error %d\n", GetLastError()); - - if (iptcp_status == RPC_S_OK) - run_client("tcp_basic"); - else - skip("tcp tests skipped due to earlier failure\n"); - - if (ncalrpc_status == RPC_S_OK) - { - run_client("ncalrpc_basic"); - if (pGetUserNameExA) - { - /* we don't need to register RPC_C_AUTHN_WINNT for ncalrpc */ - run_client("ncalrpc_secure"); - } - } - else - skip("lrpc tests skipped due to earlier failure\n"); - - if (np_status == RPC_S_OK) - run_client("np_basic"); - else - { - skip("np_basic tests skipped due to earlier failure\n"); - /* np client is what signals stop_event, so bail out if we didn't run do it */ - return; - } - - ret = WaitForSingleObject(stop_event, 1000); - ok(WAIT_OBJECT_0 == ret, "WaitForSingleObject\n"); - /* if the stop event didn't fire then RpcMgmtWaitServerListen will wait - * forever, so don't bother calling it in this case */ - if (ret == WAIT_OBJECT_0) - { - status = RpcMgmtWaitServerListen(); - todo_wine { - ok(status == RPC_S_OK, "RpcMgmtWaitServerListening failed with status %d\n", status); - } - } -} - -START_TEST(server) -{ - int argc; - char **argv; - - InitFunctionPointers(); - - if (pGetUserNameExA) - { - ULONG size = 0; - ok(!pGetUserNameExA(NameSamCompatible, NULL, &size), "GetUserNameExA\n"); - domain_and_user = HeapAlloc(GetProcessHeap(), 0, size); - ok(pGetUserNameExA(NameSamCompatible, domain_and_user, &size), "GetUserNameExA\n"); - } - else - win_skip("GetUserNameExA is needed for some authentication tests\n"); - - argc = winetest_get_mainargs(&argv); - progname = argv[0]; - - if (argc == 3) - { - RpcTryExcept - { - client(argv[2]); - } - RpcExcept(TRUE) - { - trace("Exception %d\n", RpcExceptionCode()); - } - RpcEndExcept - } - else - server(); - - HeapFree(GetProcessHeap(), 0, domain_and_user); -} diff --git a/rostests/winetests/rpcrt4/server.idl b/rostests/winetests/rpcrt4/server.idl deleted file mode 100644 index 2e305c16232..00000000000 --- a/rostests/winetests/rpcrt4/server.idl +++ /dev/null @@ -1,378 +0,0 @@ -/* - * A simple interface to test the RPC server. - * - * Copyright (C) Google 2007 (Dan Hipschman) - * - * 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 "server_defines.h" - -typedef struct tag_vector -{ - int x; - int y; - int z; -} vector_t; - -typedef int fnprintf(const char *format, ...); - -[ - uuid(00000000-4114-0704-2301-000000000000), - implicit_handle(handle_t IServer_IfHandle) -] -interface IServer -{ -cpp_quote("#if 0") - typedef wchar_t WCHAR; -cpp_quote("#endif") - - typedef [string] char *str_t; - typedef [string] WCHAR *wstr_t; - - typedef struct - { - int *pi; - int **ppi; - int ***pppi; - } pints_t; - - typedef struct - { - char *pc; - short *ps; - long *pl; - float *pf; - double *pd; - } ptypes_t; - - typedef struct - { - vector_t *pu; - vector_t **pv; - } pvectors_t; - - typedef struct - { - [switch_is(s)] union - { - [case(SUN_I)] int i; - [case(SUN_F1, SUN_F2)] float f; - [case(SUN_PI)] int *pi; - } u; - - int s; - } sun_t; - - int int_return(void); - int square(int x); - int sum(int x, int y); - signed char sum_char(signed char x, signed char y); - short sum_short(short x, short y); - int sum_float(float x, float y); - int sum_double_int(int x, double y); - hyper sum_hyper(hyper x, hyper y); - int sum_hyper_int(hyper x, hyper y); - int sum_char_hyper(signed char x, hyper y); - void square_out(int x, [out] int *y); - void square_ref([in, out] int *x); - int str_length([string] const char *s); - int str_t_length(str_t s); - int cstr_length([string, size_is(n)] const char *s, int n); - int dot_self(vector_t *v); - double square_half(double x, [out] double *y); - float square_half_float(float x, [out] float *y); - long square_half_long(long x, [out] long *y); - int sum_fixed_array(int a[5]); - int pints_sum(pints_t *pints); - double ptypes_sum(ptypes_t *ptypes); - int dot_pvectors(pvectors_t *pvectors); - - /* don't use this anywhere except in sp_t */ - typedef struct - { - int x; - } sp_inner_t; - - typedef struct - { - int x; - sp_inner_t *s; - } sp_t; - - int sum_sp(sp_t *sp); - double square_sun(sun_t *su); - - typedef struct test_list - { - int t; - [switch_is(t)] union - { - [case(TL_NULL)] char x; /* end of list */ - [case(TL_LIST)] struct test_list *tail; - } u; - } test_list_t; - - typedef [ref] int *refpint_t; - - int test_list_length(test_list_t *ls); - int sum_fixed_int_3d(int m[2][3][4]); - int sum_conf_array([size_is(n)] int x[], int n); - int sum_conf_ptr_by_conf_ptr(int n1, [size_is(n1)] int *n2_then_x1, [size_is(*n2_then_x1)] int *x2); - int sum_unique_conf_array([size_is(n), unique] int x[], int n); - int sum_unique_conf_ptr([size_is(n), unique] int *x, int n); - int sum_var_array([length_is(n)] int x[20], int n); - int dot_two_vectors(vector_t vs[2]); - void get_number_array([out, length_is(*n)] int x[20], [out] int *n); - - typedef struct - { - int n; - [size_is(n)] int ca[]; - } cs_t; - - typedef struct - { - int *pn; - [size_is(*pn)] int *ca1; - [size_is(n * 2)] int *ca2; - int n; - } cps_t; - - typedef struct - { - [size_is(c ? a : b)] int *ca; - int a; - int b; - int c; - } cpsc_t; - - int sum_cs(cs_t *cs); - int sum_cps(cps_t *cps); - int sum_cpsc(cpsc_t *cpsc); - int get_cpsc(int n, [out] cpsc_t *cpsc ); - int sum_complex_array(int n, [size_is(n)] refpint_t pi[]); - - typedef [wire_marshal(int)] void *puint_t; - int square_puint(puint_t p); - - typedef struct - { - [size_is(n)] puint_t *ps; - int n; - } puints_t; - - /* Same thing as puints_t, but make it complex (needs padding). */ - typedef struct - { - [size_is(n)] puint_t *ps; - char n; - } cpuints_t; - - int sum_puints(puints_t *p); - int sum_cpuints(cpuints_t *p); - int dot_copy_vectors(vector_t u, vector_t v); - - typedef struct wire_us *wire_us_t; - typedef [wire_marshal(wire_us_t)] struct us us_t; - struct us - { - void *x; - }; - struct wire_us - { - int x; - }; - typedef struct - { - us_t us; - } test_us_t; - - int square_test_us(test_us_t *tus); - - typedef union encu switch (int t) - { - case ENCU_I: int i; - case ENCU_F: float f; - } encu_t; - - typedef [switch_type(int)] union unencu - { - [case (ENCU_I)] int i; - [case (ENCU_F)] float f; - } unencu_t; - - typedef enum - { - E1 = 23, - E2 = 4, - E3 = 0, - E4 = 64 - } e_t; - - typedef union encue switch (e_t t) - { - case E1: int i1; - case E2: float f2; - } encue_t; - - typedef struct - { - e_t f; - } se_t; - - double square_encu(encu_t *eu); - double square_unencu(int t, [switch_is(t)] unencu_t *eu); - int sum_parr(int *a[3]); - int sum_pcarr([size_is(n)] int *a[], int n); - int enum_ord(e_t e); - double square_encue(encue_t *eue); - void check_se2(se_t *s); - - int sum_toplev_conf_2n([size_is(n * 2)] int *x, int n); - int sum_toplev_conf_cond([size_is(c ? a : b)] int *x, int a, int b, int c); - - typedef struct - { - char c; - int i; - short s; - double d; - } aligns_t; - - double sum_aligns(aligns_t *a); - - typedef struct - { - int i; - char c; - } padded_t; - - int sum_padded(padded_t *p); - int sum_padded2(padded_t ps[2]); - int sum_padded_conf([size_is(n)] padded_t *ps, int n); - - typedef struct - { - int *p1; - } bogus_helper_t; - - typedef struct - { - bogus_helper_t h; - int *p2; - int *p3; - char c; - } bogus_t; - - int sum_bogus(bogus_t *b); - void check_null([unique] int *null); - - typedef struct - { - str_t s; - } str_struct_t; - - typedef struct - { - wstr_t s; - } wstr_struct_t; - - int str_struct_len(str_struct_t *s); - int wstr_struct_len(wstr_struct_t *s); - - typedef struct - { - unsigned int n; - [size_is(n)] byte a[]; - } doub_carr_1_t; - - typedef struct - { - int n; - [size_is(n)] doub_carr_1_t *a[]; - } doub_carr_t; - - int sum_doub_carr(doub_carr_t *dc); - void make_pyramid_doub_carr(unsigned char n, [out] doub_carr_t **dc); - - typedef struct - { - short n; - [size_is(n)] short data[]; - } user_bstr_t; - - typedef [unique] user_bstr_t *wire_bstr_t; - typedef [wire_marshal(wire_bstr_t)] short *bstr_t; - unsigned hash_bstr(bstr_t s); - void get_a_bstr([out]bstr_t *s); - typedef struct - { - [string, size_is(size)] char *name; - unsigned int size; - } name_t; - void get_name([in,out] name_t *name); - - int sum_pcarr2(int n, [size_is(, n)] int **pa); - int sum_L1_norms(int n, [size_is(n)] vector_t *vs); - - /* Don't use this except in the get_s123 test. */ - typedef struct - { - int f1; - int f2; - int f3; - } s123_t; - - /* Make sure WIDL generates a type format string for a previously unseen - type as a return value. */ - s123_t *get_s123(void); - - typedef struct - { - unsigned int length; - unsigned int size; - [size_is(size), length_is(length)] pints_t numbers[]; - } numbers_struct_t; - - void get_numbers([in] int length, [in] int size, [out, length_is(length), size_is(size)] pints_t pn[]); - void get_numbers_struct([out] numbers_struct_t **ns); - - str_t get_filename(void); - - enum renum - { - RE0, - RE1, - RE2, - RE3, - }; - const int RE_MIN = RE0; - const int RE_MAX = RE3; - typedef [range(RE_MIN, RE_MAX)] enum renum renum_t; - typedef [range(0, 100)] int rint_t; - rint_t echo_ranged_int([range(0, 10)] int i, [range(0, 20)] int j, [range(0, 100)] int k); - rint_t echo_ranged_int2([range(0, 40)] int i); - void get_ranged_enum([out] renum_t *re); - - void context_handle_test(void); - - void full_pointer_test([in, ptr] int *a, [in, ptr] int *b); - void full_pointer_null_test([in, ptr] int *a, [in, ptr] int *b); - - void authinfo_test(unsigned int protseq, int secure); - - void stop(void); -} diff --git a/rostests/winetests/rpcrt4/server_defines.h b/rostests/winetests/rpcrt4/server_defines.h deleted file mode 100644 index 51f934f2488..00000000000 --- a/rostests/winetests/rpcrt4/server_defines.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Constants shared between server.c and server.idl - * - * Copyright (C) Google 2007 (Dan Hipschman) - * - * 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 - */ - -/* sun_t case values */ -#define SUN_I 10 -#define SUN_F1 -2 -#define SUN_F2 7 -#define SUN_PI 399 - -/* test_list_t case values */ -#define TL_NULL 0 -#define TL_LIST 1 - -/* encu_t case values */ -#define ENCU_I 27 -#define ENCU_F 0 diff --git a/rostests/winetests/rpcrt4/testlist.c b/rostests/winetests/rpcrt4/testlist.c deleted file mode 100644 index 71ed0c9e831..00000000000 --- a/rostests/winetests/rpcrt4/testlist.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_cstub(void); -extern void func_generated(void); -extern void func_ndr_marshall(void); -extern void func_rpc(void); -extern void func_rpc_async(void); -extern void func_rpc_protseq(void); -extern void func_server(void); - -const struct test winetest_testlist[] = -{ - { "cstub", func_cstub }, - { "generated", func_generated }, - { "ndr_marshall", func_ndr_marshall }, - { "rpc", func_rpc }, - { "rpc_async", func_rpc_async }, - { "rpc_protseq", func_rpc_protseq }, - { "server", func_server }, - { 0, 0 } -}; diff --git a/rostests/winetests/rpcrt4/warningfix.diff b/rostests/winetests/rpcrt4/warningfix.diff deleted file mode 100644 index ba36e4bbbeb..00000000000 --- a/rostests/winetests/rpcrt4/warningfix.diff +++ /dev/null @@ -1,30 +0,0 @@ -Index: server.c -=================================================================== ---- server.c (revision 38883) -+++ server.c (working copy) -@@ -352,12 +352,6 @@ - } - - int --s_sum_parr(int *a[3]) --{ -- return s_sum_pcarr(a, 3); --} -- --int - s_sum_pcarr(int *a[], int n) - { - int i, s = 0; -@@ -367,6 +361,12 @@ - } - - int -+s_sum_parr(int *a[3]) -+{ -+ return s_sum_pcarr(a, 3); -+} -+ -+int - s_enum_ord(e_t e) - { - switch (e) diff --git a/rostests/winetests/rsabase/CMakeLists.txt b/rostests/winetests/rsabase/CMakeLists.txt deleted file mode 100644 index ca96b1d245e..00000000000 --- a/rostests/winetests/rsabase/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(rsabase_winetest rsabase.c testlist.c) -target_link_libraries(rsabase_winetest wine) -set_module_type(rsabase_winetest win32cui) -add_importlibs(rsabase_winetest advapi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET rsabase_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/rsabase/rsabase.c b/rostests/winetests/rsabase/rsabase.c deleted file mode 100644 index b7746b10319..00000000000 --- a/rostests/winetests/rsabase/rsabase.c +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Unit tests for rsabase functions - * - * Copyright (c) 2004 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 St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "wincrypt.h" - -HCRYPTPROV hProv; -static const char szContainer[] = "Wine Test Container"; -static const char szProvider[] = MS_DEF_PROV_A; - -static int init_environment(void) -{ - hProv = (HCRYPTPROV)INVALID_HANDLE_VALUE; - - if (!CryptAcquireContext(&hProv, szContainer, szProvider, PROV_RSA_FULL, 0)) - { - if (GetLastError()==NTE_BAD_KEYSET) - { - if(!CryptAcquireContext(&hProv, szContainer, szProvider, PROV_RSA_FULL, CRYPT_NEWKEYSET)) - { - trace("%08x\n", GetLastError()); - return 0; - } - } - else - { - trace("%08x\n", GetLastError()); - return 0; - } - } - - return 1; -} - -static void clean_up_environment(void) -{ - CryptAcquireContext(&hProv, szContainer, szProvider, PROV_RSA_FULL, CRYPT_DELETEKEYSET); -} - -static void test_gen_random(void) -{ - BOOL result; - BYTE rnd1[16], rnd2[16]; - - memset(rnd1, 0, sizeof(rnd1)); - memset(rnd2, 0, sizeof(rnd2)); - - result = CryptGenRandom(hProv, sizeof(rnd1), rnd1); - ok(result, "%08x\n", GetLastError()); - - result = CryptGenRandom(hProv, sizeof(rnd2), rnd2); - ok(result, "%08x\n", GetLastError()); - - ok(memcmp(rnd1, rnd2, sizeof(rnd1)), "CryptGenRandom generates non random data\n"); -} - -START_TEST(rsabase) -{ - if (!init_environment()) - return; - test_gen_random(); - clean_up_environment(); -} diff --git a/rostests/winetests/rsabase/rsabase.rbuild b/rostests/winetests/rsabase/rsabase.rbuild deleted file mode 100644 index 0aba4aa4238..00000000000 --- a/rostests/winetests/rsabase/rsabase.rbuild +++ /dev/null @@ -1,11 +0,0 @@ - - - - . - - wine - advapi32 - ntdll - rsabase.c - testlist.c - diff --git a/rostests/winetests/rsabase/testlist.c b/rostests/winetests/rsabase/testlist.c deleted file mode 100644 index d55586bacd5..00000000000 --- a/rostests/winetests/rsabase/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_rsabase(void); - -const struct test winetest_testlist[] = -{ - { "rsabase", func_rsabase }, - { 0, 0 } -}; diff --git a/rostests/winetests/rsaenh/CMakeLists.txt b/rostests/winetests/rsaenh/CMakeLists.txt deleted file mode 100644 index db0dcb76f9a..00000000000 --- a/rostests/winetests/rsaenh/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(rsaenh_winetest rsaenh.c testlist.c) -target_link_libraries(rsaenh_winetest wine) -set_module_type(rsaenh_winetest win32cui) -add_importlibs(rsaenh_winetest advapi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET rsaenh_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/rsaenh/rsaenh.c b/rostests/winetests/rsaenh/rsaenh.c deleted file mode 100644 index 5ee85f42a05..00000000000 --- a/rostests/winetests/rsaenh/rsaenh.c +++ /dev/null @@ -1,2871 +0,0 @@ -/* - * Unit tests for rsaenh functions - * - * Copyright (c) 2004 Michael Jung - * Copyright (c) 2006 Juan Lang - * Copyright (c) 2007 Vijay Kiran Kamuju - * - * 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 "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "wincrypt.h" -#include "winreg.h" - -static HCRYPTPROV hProv; -static const char szContainer[] = "winetest"; -static const char szProvider[] = MS_ENHANCED_PROV_A; - -typedef struct _ctdatatype { - unsigned char origstr[32]; - unsigned char decstr[32]; - int strlen; - int enclen; - int buflen; -} cryptdata; - -static const cryptdata cTestData[4] = { - {"abcdefghijkl", - {'a','b','c','d','e','f','g','h',0x2,0x2,'k','l',0}, - 12,8,16}, - {"abcdefghij", - {'a','b','c','d','e','f','g','h',0x2,0x2,0}, - 10,8,16}, - {"abcdefgh", - {'a','b','c','d','e','f','g','h',0}, - 8,8,16}, - {"abcdefghijkl", - {'a','b','c','d','e','f','g','h','i','j','k','l',0}, - 12,12,16} -}; - -/* - * 1. Take the MD5 Hash of the container name (with an extra null byte) - * 2. Turn the hash into a 4 DWORD hex value - * 3. Append a '_' - * 4. Add the MachineGuid - * - */ -static void uniquecontainer(char *unique) -{ - /* MD5 hash of "winetest\0" in 4 DWORD hex */ - static const char szContainer_md5[] = "9d20fd8d05ed2b8455d125d0bf6d6a70"; - static const char szCryptography[] = "Software\\Microsoft\\Cryptography"; - static const char szMachineGuid[] = "MachineGuid"; - HKEY hkey; - char guid[MAX_PATH]; - DWORD size = MAX_PATH; - HRESULT ret; - - /* Get the MachineGUID */ - ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, szCryptography, 0, KEY_READ | KEY_WOW64_64KEY, &hkey); - if (ret == ERROR_ACCESS_DENIED) - { - /* Windows 2000 can't handle KEY_WOW64_64KEY */ - RegOpenKeyA(HKEY_LOCAL_MACHINE, szCryptography, &hkey); - } - RegQueryValueExA(hkey, szMachineGuid, NULL, NULL, (LPBYTE)guid, &size); - RegCloseKey(hkey); - - lstrcpy(unique, szContainer_md5); - lstrcat(unique, "_"); - lstrcat(unique, guid); -} - -static void printBytes(const char *heading, const BYTE *pb, size_t cb) -{ - size_t i; - printf("%s: ",heading); - for(i=0;i - - - - . - - rsaenh.c - testlist.c - wine - advapi32 - ntdll - - diff --git a/rostests/winetests/rsaenh/testlist.c b/rostests/winetests/rsaenh/testlist.c deleted file mode 100644 index 0c1563415d0..00000000000 --- a/rostests/winetests/rsaenh/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_rsaenh(void); - -const struct test winetest_testlist[] = -{ - { "rsaenh", func_rsaenh }, - { 0, 0 } -}; diff --git a/rostests/winetests/schannel/CMakeLists.txt b/rostests/winetests/schannel/CMakeLists.txt deleted file mode 100644 index 60474f6ca67..00000000000 --- a/rostests/winetests/schannel/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(schannel_winetest main.c testlist.c) -target_link_libraries(schannel_winetest wine) -set_module_type(schannel_winetest win32cui) -add_importlibs(schannel_winetest msvcrt kernel32 ntdll) -add_cd_file(TARGET schannel_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/schannel/main.c b/rostests/winetests/schannel/main.c deleted file mode 100644 index b5768481ec8..00000000000 --- a/rostests/winetests/schannel/main.c +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Schannel tests - * - * Copyright 2006 Yuval Fledel - * - * 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 "ntstatus.h" -#define WIN32_NO_STATUS -#include -#include -#define SECURITY_WIN32 -#include -#include -#include -#include - -#include "wine/test.h" - -/* Helper macros to find the size of SECPKG_FUNCTION_TABLE */ -#define SECPKG_FUNCTION_TABLE_SIZE_1 FIELD_OFFSET(SECPKG_FUNCTION_TABLE, \ - SetContextAttributes) -#define SECPKG_FUNCTION_TABLE_SIZE_2 FIELD_OFFSET(SECPKG_FUNCTION_TABLE, \ - SetCredentialsAttributes) -#define SECPKG_FUNCTION_TABLE_SIZE_3 FIELD_OFFSET(SECPKG_FUNCTION_TABLE, \ - ChangeAccountPassword) -#define SECPKG_FUNCTION_TABLE_SIZE_4 FIELD_OFFSET(SECPKG_FUNCTION_TABLE, \ - QueryMetaData) -#define SECPKG_FUNCTION_TABLE_SIZE_5 FIELD_OFFSET(SECPKG_FUNCTION_TABLE, \ - ValidateTargetInfo) -#define SECPKG_FUNCTION_TABLE_SIZE_6 sizeof(SECPKG_FUNCTION_TABLE) - -static NTSTATUS (NTAPI *pSpLsaModeInitialize)(ULONG, PULONG, - PSECPKG_FUNCTION_TABLE*, PULONG); -static NTSTATUS (NTAPI *pSpUserModeInitialize)(ULONG, PULONG, - PSECPKG_USER_FUNCTION_TABLE*, PULONG); - -static void testInitialize(void) -{ - PSECPKG_USER_FUNCTION_TABLE pUserTables, pUserTables2; - PSECPKG_FUNCTION_TABLE pTables, pTables2; - ULONG cTables = 0, cUserTables = 0, Version = 0; - NTSTATUS status; - - /* Passing NULL into one of the parameters of SpLsaModeInitialize or - SpUserModeInitialize causes a crash. */ - - /* SpLsaModeInitialize does not care about the LSA version. */ - status = pSpLsaModeInitialize(0, &Version, &pTables2, &cTables); - ok(status == STATUS_SUCCESS, "status: 0x%x\n", status); - ok(cTables == 2 || - broken(cTables == 1), /* Win2k */ - "cTables: %d\n", cTables); - ok(pTables2 != NULL,"pTables: %p\n", pTables2); - - /* We can call it as many times we want. */ - status = pSpLsaModeInitialize(0x10000, &Version, &pTables, &cTables); - ok(status == STATUS_SUCCESS, "status: 0x%x\n", status); - ok(cTables == 2 || - broken(cTables == 1), /* Win2k */ - "cTables: %d\n", cTables); - ok(pTables != NULL, "pTables: %p\n", pTables); - /* It will always return the same pointer. */ - ok(pTables == pTables2, "pTables: %p, pTables2: %p\n", pTables, pTables2); - - status = pSpLsaModeInitialize(0x23456, &Version, &pTables, &cTables); - ok(status == STATUS_SUCCESS, "status: 0x%x\n", status); - ok(cTables == 2 || - broken(cTables == 1), /* Win2k */ - "cTables: %d\n", cTables); - ok(pTables != NULL, "pTables: %p\n", pTables); - ok(pTables == pTables2, "pTables: %p, pTables2: %p\n", pTables, pTables2); - - /* Bad versions to SpUserModeInitialize. Parameters unchanged */ - Version = 0xdead; - cUserTables = 0xdead; - pUserTables = NULL; - status = pSpUserModeInitialize(0, &Version, &pUserTables, &cUserTables); - ok(status == STATUS_INVALID_PARAMETER, "status: 0x%x\n", status); - ok(Version == 0xdead, "Version: 0x%x\n", Version); - ok(cUserTables == 0xdead, "cTables: %d\n", cUserTables); - ok(pUserTables == NULL, "pUserTables: %p\n", pUserTables); - - status = pSpUserModeInitialize(0x20000, &Version, &pUserTables, - &cUserTables); - ok(status == STATUS_INVALID_PARAMETER, "status: 0x%x\n", status); - ok(Version == 0xdead, "Version: 0x%x\n", Version); - ok(cUserTables == 0xdead, "cTables: %d\n", cUserTables); - ok(pUserTables == NULL, "pUserTables: %p\n", pUserTables); - - /* Good version to SpUserModeInitialize */ - status = pSpUserModeInitialize(SECPKG_INTERFACE_VERSION, &Version, - &pUserTables, &cUserTables); - ok(status == STATUS_SUCCESS, "status: 0x%x\n", status); - ok(Version == SECPKG_INTERFACE_VERSION, "Version: 0x%x\n", Version); - ok(cUserTables == 2 || - broken(cUserTables == 4), /* Win2k */ - "cUserTables: %d\n", cUserTables); - ok(pUserTables != NULL, "pUserTables: %p\n", pUserTables); - - /* Initializing user again */ - status = pSpUserModeInitialize(SECPKG_INTERFACE_VERSION, &Version, - &pUserTables2, &cTables); - ok(status == STATUS_SUCCESS, "status: 0x%x\n", status); - ok(pUserTables == pUserTables2, "pUserTables: %p, pUserTables2: %p\n", - pUserTables, pUserTables2); -} - -/* A helper function to find the dispatch table of the next package. - Needed because SECPKG_FUNCTION_TABLE's size depend on the version */ -static PSECPKG_FUNCTION_TABLE getNextSecPkgTable(PSECPKG_FUNCTION_TABLE pTable, - ULONG Version) -{ - size_t size; - PSECPKG_FUNCTION_TABLE pNextTable; - - if (Version == SECPKG_INTERFACE_VERSION) - size = SECPKG_FUNCTION_TABLE_SIZE_1; - else if (Version == SECPKG_INTERFACE_VERSION_2) - size = SECPKG_FUNCTION_TABLE_SIZE_2; - else if (Version == SECPKG_INTERFACE_VERSION_3) - size = SECPKG_FUNCTION_TABLE_SIZE_3; - else if (Version == SECPKG_INTERFACE_VERSION_4) - size = SECPKG_FUNCTION_TABLE_SIZE_4; - else if (Version == SECPKG_INTERFACE_VERSION_5) - size = SECPKG_FUNCTION_TABLE_SIZE_5; - else if (Version == SECPKG_INTERFACE_VERSION_6) - size = SECPKG_FUNCTION_TABLE_SIZE_6; - else { - ok(FALSE, "Unknown package version 0x%x\n", Version); - return NULL; - } - - pNextTable = (PSECPKG_FUNCTION_TABLE)((PBYTE)pTable + size); - /* Win7 function tables appear to be SECPKG_INTERFACE_VERSION_6 format, - but unfortunately SpLsaModeInitialize returns SECPKG_INTERFACE_VERSION_3. - We detect that by comparing the "Initialize" pointer from the old table - to the "FreeCredentialsHandle" pointer of the new table. These functions - have different numbers of arguments, so they can't possibly point to the - same implementation */ - if (broken((void *) pTable->Initialize == (void *) pNextTable->FreeCredentialsHandle && - pNextTable->FreeCredentialsHandle != NULL)) - { - win_skip("Invalid function pointers for next package\n"); - return NULL; - } - - return pNextTable; -} - -static void testGetInfo(void) -{ - PSECPKG_FUNCTION_TABLE pTables; - SecPkgInfoW PackageInfo; - ULONG cTables, Version; - NTSTATUS status; - - /* Get the dispatch table */ - status = pSpLsaModeInitialize(0, &Version, &pTables, &cTables); - ok(status == STATUS_SUCCESS, "status: 0x%x\n", status); - - /* Passing NULL into ->GetInfo causes a crash. */ - - /* First package: Unified */ - status = pTables->GetInfo(&PackageInfo); - ok(status == STATUS_SUCCESS, "status: 0x%x\n", status); - ok(PackageInfo.fCapabilities == 0x107b3, "fCapabilities: 0x%x\n", - PackageInfo.fCapabilities); - ok(PackageInfo.wVersion == 1, "wVersion: %d\n", PackageInfo.wVersion); - ok(PackageInfo.wRPCID == 14, "wRPCID: %d\n", PackageInfo.wRPCID); - ok(PackageInfo.cbMaxToken == 0x4000 || - PackageInfo.cbMaxToken == 0x6000, /* Vista */ - "cbMaxToken: 0x%x\n", - PackageInfo.cbMaxToken); - - /* Second package */ - if (cTables == 1) - { - win_skip("Second package missing\n"); - return; - } - pTables = getNextSecPkgTable(pTables, Version); - if (!pTables) - return; - status = pTables->GetInfo(&PackageInfo); - ok(status == STATUS_SUCCESS || - status == SEC_E_UNSUPPORTED_FUNCTION, /* win2k3 */ - "status: 0x%x\n", status); - - if (status == STATUS_SUCCESS) - { - ok(PackageInfo.fCapabilities == 0x107b3, "fCapabilities: 0x%x\n", - PackageInfo.fCapabilities); - ok(PackageInfo.wVersion == 1, "wVersion: %d\n", PackageInfo.wVersion); - ok(PackageInfo.wRPCID == 14, "wRPCID: %d\n", PackageInfo.wRPCID); - ok(PackageInfo.cbMaxToken == 0x4000 || - PackageInfo.cbMaxToken == 0x6000, /* Win7 */ - "cbMaxToken: 0x%x\n", - PackageInfo.cbMaxToken); - } -} - -START_TEST(main) -{ - HMODULE hMod = LoadLibraryA("schannel.dll"); - if (!hMod) { - win_skip("schannel.dll not available\n"); - return; - } - - pSpLsaModeInitialize = (void *)GetProcAddress(hMod, "SpLsaModeInitialize"); - pSpUserModeInitialize = (void *)GetProcAddress(hMod, "SpUserModeInitialize"); - - if (pSpLsaModeInitialize && pSpUserModeInitialize) - { - testInitialize(); - testGetInfo(); - } - else win_skip( "schannel functions not found\n" ); - - FreeLibrary(hMod); -} diff --git a/rostests/winetests/schannel/schannel.rbuild b/rostests/winetests/schannel/schannel.rbuild deleted file mode 100644 index 22fb80863ed..00000000000 --- a/rostests/winetests/schannel/schannel.rbuild +++ /dev/null @@ -1,12 +0,0 @@ - - - - - . - - wine - ntdll - main.c - testlist.c - - diff --git a/rostests/winetests/schannel/testlist.c b/rostests/winetests/schannel/testlist.c deleted file mode 100644 index 6f0c3974819..00000000000 --- a/rostests/winetests/schannel/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_main(void); - -const struct test winetest_testlist[] = -{ - { "main", func_main }, - { 0, 0 } -}; diff --git a/rostests/winetests/secur32/CMakeLists.txt b/rostests/winetests/secur32/CMakeLists.txt deleted file mode 100644 index 70456672101..00000000000 --- a/rostests/winetests/secur32/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - main.c - ntlm.c - schannel.c - secur32.c - testlist.c) - -add_executable(secur32_winetest ${SOURCE}) -target_link_libraries(secur32_winetest wine) -set_module_type(secur32_winetest win32cui) -add_importlibs(secur32_winetest advapi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET secur32_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/secur32/main.c b/rostests/winetests/secur32/main.c deleted file mode 100644 index e652485859b..00000000000 --- a/rostests/winetests/secur32/main.c +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Miscellaneous secur32 tests - * - * Copyright 2005, 2006 Kai Blin - * - * 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 SECURITY_WIN32 - -#include -#include -#include -#include -#include -#include - -#include "wine/test.h" - -static HMODULE secdll; -static PSecurityFunctionTableA (SEC_ENTRY * pInitSecurityInterfaceA)(void); -static SECURITY_STATUS (SEC_ENTRY * pEnumerateSecurityPackagesA)(PULONG, PSecPkgInfoA*); -static SECURITY_STATUS (SEC_ENTRY * pFreeContextBuffer)(PVOID pv); -static SECURITY_STATUS (SEC_ENTRY * pQuerySecurityPackageInfoA)(SEC_CHAR*, PSecPkgInfoA*); -static SECURITY_STATUS (SEC_ENTRY * pAcquireCredentialsHandleA)(SEC_CHAR*, SEC_CHAR*, - ULONG, PLUID, PVOID, SEC_GET_KEY_FN, PVOID, PCredHandle, PTimeStamp); -static SECURITY_STATUS (SEC_ENTRY * pInitializeSecurityContextA)(PCredHandle, PCtxtHandle, - SEC_CHAR*, ULONG, ULONG, ULONG, PSecBufferDesc, ULONG, - PCtxtHandle, PSecBufferDesc, PULONG, PTimeStamp); -static SECURITY_STATUS (SEC_ENTRY * pCompleteAuthToken)(PCtxtHandle, PSecBufferDesc); -static SECURITY_STATUS (SEC_ENTRY * pAcceptSecurityContext)(PCredHandle, PCtxtHandle, - PSecBufferDesc, ULONG, ULONG, PCtxtHandle, PSecBufferDesc, - PULONG, PTimeStamp); -static SECURITY_STATUS (SEC_ENTRY * pFreeCredentialsHandle)(PCredHandle); -static SECURITY_STATUS (SEC_ENTRY * pDeleteSecurityContext)(PCtxtHandle); -static SECURITY_STATUS (SEC_ENTRY * pQueryContextAttributesA)(PCtxtHandle, ULONG, PVOID); - -static void InitFunctionPtrs(void) -{ - secdll = LoadLibraryA("secur32.dll"); - if(!secdll) - secdll = LoadLibraryA("security.dll"); - if(secdll) - { - pInitSecurityInterfaceA = (PVOID)GetProcAddress(secdll, "InitSecurityInterfaceA"); - pEnumerateSecurityPackagesA = (PVOID)GetProcAddress(secdll, "EnumerateSecurityPackagesA"); - pFreeContextBuffer = (PVOID)GetProcAddress(secdll, "FreeContextBuffer"); - pQuerySecurityPackageInfoA = (PVOID)GetProcAddress(secdll, "QuerySecurityPackageInfoA"); - pAcquireCredentialsHandleA = (PVOID)GetProcAddress(secdll, "AcquireCredentialsHandleA"); - pInitializeSecurityContextA = (PVOID)GetProcAddress(secdll, "InitializeSecurityContextA"); - pCompleteAuthToken = (PVOID)GetProcAddress(secdll, "CompleteAuthToken"); - pAcceptSecurityContext = (PVOID)GetProcAddress(secdll, "AcceptSecurityContext"); - pFreeCredentialsHandle = (PVOID)GetProcAddress(secdll, "FreeCredentialsHandle"); - pDeleteSecurityContext = (PVOID)GetProcAddress(secdll, "DeleteSecurityContext"); - pQueryContextAttributesA = (PVOID)GetProcAddress(secdll, "QueryContextAttributesA"); - } -} - -/*---------------------------------------------------------*/ -/* General helper functions */ - -static const char* getSecError(SECURITY_STATUS status) -{ - static char buf[20]; - -#define _SEC_ERR(x) case (x): return #x; - switch(status) - { - _SEC_ERR(SEC_E_OK); - _SEC_ERR(SEC_E_INSUFFICIENT_MEMORY); - _SEC_ERR(SEC_E_INVALID_HANDLE); - _SEC_ERR(SEC_E_UNSUPPORTED_FUNCTION); - _SEC_ERR(SEC_E_TARGET_UNKNOWN); - _SEC_ERR(SEC_E_INTERNAL_ERROR); - _SEC_ERR(SEC_E_SECPKG_NOT_FOUND); - _SEC_ERR(SEC_E_NOT_OWNER); - _SEC_ERR(SEC_E_CANNOT_INSTALL); - _SEC_ERR(SEC_E_INVALID_TOKEN); - _SEC_ERR(SEC_E_CANNOT_PACK); - _SEC_ERR(SEC_E_QOP_NOT_SUPPORTED); - _SEC_ERR(SEC_E_NO_IMPERSONATION); - _SEC_ERR(SEC_I_CONTINUE_NEEDED); - _SEC_ERR(SEC_E_BUFFER_TOO_SMALL); - _SEC_ERR(SEC_E_ILLEGAL_MESSAGE); - _SEC_ERR(SEC_E_LOGON_DENIED); - _SEC_ERR(SEC_E_NO_CREDENTIALS); - _SEC_ERR(SEC_E_OUT_OF_SEQUENCE); - default: - sprintf(buf, "%08x\n", status); - return buf; - } -#undef _SEC_ERR -} - -/*---------------------------------------------------------*/ -/* Helper for testQuerySecurityPagageInfo */ - -static SECURITY_STATUS setupPackageA(SEC_CHAR *p_package_name, - PSecPkgInfo *p_pkg_info) -{ - SECURITY_STATUS ret; - - ret = pQuerySecurityPackageInfoA( p_package_name, p_pkg_info); - return ret; -} - -/*--------------------------------------------------------- */ -/* The test functions */ - -static void testInitSecurityInterface(void) -{ - PSecurityFunctionTable sec_fun_table = NULL; - - sec_fun_table = pInitSecurityInterfaceA(); - ok(sec_fun_table != NULL, "InitSecurityInterface() returned NULL.\n"); - -} - -static void testEnumerateSecurityPackages(void) -{ - - SECURITY_STATUS sec_status; - ULONG num_packages, i; - PSecPkgInfo pkg_info = NULL; - - trace("Running testEnumerateSecurityPackages\n"); - - sec_status = pEnumerateSecurityPackagesA(&num_packages, &pkg_info); - - ok(sec_status == SEC_E_OK, - "EnumerateSecurityPackages() should return %d, not %08x\n", - SEC_E_OK, sec_status); - - if (num_packages == 0) - { - todo_wine - ok(num_packages > 0, "Number of sec packages should be > 0 ,but is %d\n", - num_packages); - skip("no sec packages to check\n"); - return; - } - else - ok(num_packages > 0, "Number of sec packages should be > 0 ,but is %d\n", - num_packages); - - ok(pkg_info != NULL, - "pkg_info should not be NULL after EnumerateSecurityPackages\n"); - - trace("Number of packages: %d\n", num_packages); - for(i = 0; i < num_packages; ++i){ - trace("%d: Package \"%s\"\n", i, pkg_info[i].Name); - trace("Supported flags:\n"); - if(pkg_info[i].fCapabilities & SECPKG_FLAG_INTEGRITY) - trace("\tSECPKG_FLAG_INTEGRITY\n"); - if(pkg_info[i].fCapabilities & SECPKG_FLAG_PRIVACY) - trace("\tSECPKG_FLAG_PRIVACY\n"); - if(pkg_info[i].fCapabilities & SECPKG_FLAG_TOKEN_ONLY) - trace("\tSECPKG_FLAG_TOKEN_ONLY\n"); - if(pkg_info[i].fCapabilities & SECPKG_FLAG_DATAGRAM) - trace("\tSECPKG_FLAG_DATAGRAM\n"); - if(pkg_info[i].fCapabilities & SECPKG_FLAG_CONNECTION) - trace("\tSECPKG_FLAG_CONNECTION\n"); - if(pkg_info[i].fCapabilities & SECPKG_FLAG_MULTI_REQUIRED) - trace("\tSECPKG_FLAG_MULTI_REQUIRED\n"); - if(pkg_info[i].fCapabilities & SECPKG_FLAG_CLIENT_ONLY) - trace("\tSECPKG_FLAG_CLIENT_ONLY\n"); - if(pkg_info[i].fCapabilities & SECPKG_FLAG_EXTENDED_ERROR) - trace("\tSECPKG_FLAG_EXTENDED_ERROR\n"); - if(pkg_info[i].fCapabilities & SECPKG_FLAG_IMPERSONATION) - trace("\tSECPKG_FLAG_IMPERSONATION\n"); - if(pkg_info[i].fCapabilities & SECPKG_FLAG_ACCEPT_WIN32_NAME) - trace("\tSECPKG_FLAG_ACCEPT_WIN32_NAME\n"); - if(pkg_info[i].fCapabilities & SECPKG_FLAG_STREAM) - trace("\tSECPKG_FLAG_STREAM\n"); - if(pkg_info[i].fCapabilities & SECPKG_FLAG_READONLY_WITH_CHECKSUM) - trace("\tSECPKG_FLAG_READONLY_WITH_CHECKSUM\n"); - trace("Comment: %s\n", pkg_info[i].Comment); - trace("\n"); - } - - pFreeContextBuffer(pkg_info); -} - - -static void testQuerySecurityPackageInfo(void) -{ - SECURITY_STATUS sec_status; - PSecPkgInfo pkg_info; - static SEC_CHAR ntlm[] = "NTLM", - winetest[] = "Winetest"; - - trace("Running testQuerySecurityPackageInfo\n"); - - /* Test with an existing package. Test should pass */ - - pkg_info = (void *)0xdeadbeef; - sec_status = setupPackageA(ntlm, &pkg_info); - - ok((sec_status == SEC_E_OK) || (sec_status == SEC_E_SECPKG_NOT_FOUND) || - broken(sec_status == SEC_E_UNSUPPORTED_FUNCTION), /* win95 */ - "Return value of QuerySecurityPackageInfo() shouldn't be %s\n", - getSecError(sec_status) ); - - if (sec_status == SEC_E_OK) - { - ok(pkg_info != (void *)0xdeadbeef, "wrong pkg_info address %p\n", pkg_info); - ok(pkg_info->wVersion == 1, "wVersion always should be 1, but is %d\n", pkg_info->wVersion); - /* there is no point in testing pkg_info->cbMaxToken since it varies - * between implementations. - */ - - sec_status = pFreeContextBuffer(pkg_info); - ok( sec_status == SEC_E_OK, - "Return value of FreeContextBuffer() shouldn't be %s\n", - getSecError(sec_status) ); - } - - /* Test with a nonexistent package, test should fail */ - - pkg_info = (void *)0xdeadbeef; - sec_status = pQuerySecurityPackageInfoA(winetest, &pkg_info); - - ok( sec_status == SEC_E_SECPKG_NOT_FOUND, - "Return value of QuerySecurityPackageInfo() should be %s for a nonexistent package\n", - getSecError(SEC_E_SECPKG_NOT_FOUND)); - - ok(pkg_info == (void *)0xdeadbeef, "wrong pkg_info address %p\n", pkg_info); -} - -START_TEST(main) -{ - InitFunctionPtrs(); - if(pInitSecurityInterfaceA) - testInitSecurityInterface(); - if(pFreeContextBuffer) - { - if(pEnumerateSecurityPackagesA) - testEnumerateSecurityPackages(); - if(pQuerySecurityPackageInfoA) - { - testQuerySecurityPackageInfo(); - } - } - if(secdll) - FreeLibrary(secdll); -} diff --git a/rostests/winetests/secur32/ntlm.c b/rostests/winetests/secur32/ntlm.c deleted file mode 100644 index 027e0942905..00000000000 --- a/rostests/winetests/secur32/ntlm.c +++ /dev/null @@ -1,1406 +0,0 @@ -/* - * Tests for the NTLM security provider - * - * Copyright 2005, 2006 Kai Blin - * Copyright 2006 Dmitry Timoshkov - * - * 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 - * - * The code that tests for the behaviour of ISC_REQ_ALLOCATE_MEMORY is based - * on code written by Dmitry Timoshkov. - - */ - -#include -#include -#include -#include -#include -#define SECURITY_WIN32 -#include -#include -#include -#include - -#include "wine/test.h" - -static HMODULE secdll; -static PSecurityFunctionTableA (SEC_ENTRY * pInitSecurityInterfaceA)(void); -static SECURITY_STATUS (SEC_ENTRY * pFreeContextBuffer)(PVOID pv); -static SECURITY_STATUS (SEC_ENTRY * pQuerySecurityPackageInfoA)(SEC_CHAR*, PSecPkgInfoA*); -static SECURITY_STATUS (SEC_ENTRY * pAcquireCredentialsHandleA)(SEC_CHAR*, SEC_CHAR*, - ULONG, PLUID, PVOID, SEC_GET_KEY_FN, PVOID, PCredHandle, PTimeStamp); -static SECURITY_STATUS (SEC_ENTRY * pInitializeSecurityContextA)(PCredHandle, PCtxtHandle, - SEC_CHAR*, ULONG, ULONG, ULONG, PSecBufferDesc, ULONG, - PCtxtHandle, PSecBufferDesc, PULONG, PTimeStamp); -static SECURITY_STATUS (SEC_ENTRY * pCompleteAuthToken)(PCtxtHandle, PSecBufferDesc); -static SECURITY_STATUS (SEC_ENTRY * pAcceptSecurityContext)(PCredHandle, PCtxtHandle, - PSecBufferDesc, ULONG, ULONG, PCtxtHandle, PSecBufferDesc, - PULONG, PTimeStamp); -static SECURITY_STATUS (SEC_ENTRY * pFreeCredentialsHandle)(PCredHandle); -static SECURITY_STATUS (SEC_ENTRY * pDeleteSecurityContext)(PCtxtHandle); -static SECURITY_STATUS (SEC_ENTRY * pQueryContextAttributesA)(PCtxtHandle, ULONG, PVOID); -static SECURITY_STATUS (SEC_ENTRY * pMakeSignature)(PCtxtHandle, ULONG, - PSecBufferDesc, ULONG); -static SECURITY_STATUS (SEC_ENTRY * pVerifySignature)(PCtxtHandle, PSecBufferDesc, - ULONG, PULONG); -static SECURITY_STATUS (SEC_ENTRY * pEncryptMessage)(PCtxtHandle, ULONG, - PSecBufferDesc, ULONG); -static SECURITY_STATUS (SEC_ENTRY * pDecryptMessage)(PCtxtHandle, PSecBufferDesc, - ULONG, PULONG); -static BOOLEAN (WINAPI * pGetUserNameExA)(EXTENDED_NAME_FORMAT, LPSTR, PULONG); - -typedef struct _SspiData { - CredHandle cred; - CtxtHandle ctxt; - PSecBufferDesc in_buf; - PSecBufferDesc out_buf; - PSEC_WINNT_AUTH_IDENTITY id; - ULONG max_token; -} SspiData; - -static BYTE network_challenge[] = - {0x4e, 0x54, 0x4c, 0x4d, 0x53, 0x53, 0x50, 0x00, 0x02, 0x00, - 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x30, 0x00, 0x00, 0x00, - 0x05, 0x82, 0x82, 0xa0, 0xe9, 0x58, 0x7f, 0x14, 0xa2, 0x86, - 0x3b, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x54, 0x00, 0x54, 0x00, 0x40, 0x00, 0x00, 0x00, 0x43, 0x00, - 0x41, 0x00, 0x53, 0x00, 0x49, 0x00, 0x4e, 0x00, 0x4f, 0x00, - 0x30, 0x00, 0x31, 0x00, 0x02, 0x00, 0x10, 0x00, 0x43, 0x00, - 0x41, 0x00, 0x53, 0x00, 0x49, 0x00, 0x4e, 0x00, 0x4f, 0x00, - 0x30, 0x00, 0x31, 0x00, 0x01, 0x00, 0x10, 0x00, 0x43, 0x00, - 0x41, 0x00, 0x53, 0x00, 0x49, 0x00, 0x4e, 0x00, 0x4f, 0x00, - 0x30, 0x00, 0x31, 0x00, 0x04, 0x00, 0x10, 0x00, 0x63, 0x00, - 0x61, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x6f, 0x00, - 0x30, 0x00, 0x31, 0x00, 0x03, 0x00, 0x10, 0x00, 0x63, 0x00, - 0x61, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x6f, 0x00, - 0x30, 0x00, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00}; - -static BYTE native_challenge[] = - {0x4e, 0x54, 0x4c, 0x4d, 0x53, 0x53, 0x50, 0x00, 0x02, 0x00, - 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x30, 0x00, 0x00, 0x00, - 0x05, 0x82, 0x82, 0xa0, 0xb5, 0x60, 0x8e, 0x95, 0xb5, 0x3c, - 0xee, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x54, 0x00, 0x54, 0x00, 0x40, 0x00, 0x00, 0x00, 0x43, 0x00, - 0x41, 0x00, 0x53, 0x00, 0x49, 0x00, 0x4e, 0x00, 0x4f, 0x00, - 0x30, 0x00, 0x31, 0x00, 0x02, 0x00, 0x10, 0x00, 0x43, 0x00, - 0x41, 0x00, 0x53, 0x00, 0x49, 0x00, 0x4e, 0x00, 0x4f, 0x00, - 0x30, 0x00, 0x31, 0x00, 0x01, 0x00, 0x10, 0x00, 0x43, 0x00, - 0x41, 0x00, 0x53, 0x00, 0x49, 0x00, 0x4e, 0x00, 0x4f, 0x00, - 0x30, 0x00, 0x31, 0x00, 0x04, 0x00, 0x10, 0x00, 0x63, 0x00, - 0x61, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x6f, 0x00, - 0x30, 0x00, 0x31, 0x00, 0x03, 0x00, 0x10, 0x00, 0x63, 0x00, - 0x61, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x6f, 0x00, - 0x30, 0x00, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00}; - -static BYTE message_signature[] = - {0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - -static BYTE message_binary[] = - {0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x2c, 0x20, 0x77, 0x6f, 0x72, - 0x6c, 0x64, 0x21}; - -static char message[] = "Hello, world!"; - -static char message_header[] = "Header Test"; - -static BYTE crypt_trailer_client[] = - {0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0xc7, - 0xaa, 0x26, 0x16, 0x39, 0x07, 0x4e}; - -static BYTE crypt_message_client[] = - {0x86, 0x9c, 0x5a, 0x10, 0x78, 0xb3, 0x30, 0x98, 0x46, 0x15, - 0xa0, 0x31, 0xd9}; - -static BYTE crypt_trailer_client2[] = - {0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc5, 0xa7, - 0xf7, 0x0f, 0x5b, 0x25, 0xbe, 0xa4}; - -static BYTE crypt_message_client2[] = - {0x20, 0x6c, 0x01, 0xab, 0xb0, 0x4c, 0x93, 0xe4, 0x1e, 0xfc, - 0xe1, 0xfa, 0xfe}; - -static BYTE crypt_trailer_server[] = - {0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x46, - 0x2e, 0x77, 0xeb, 0xf0, 0xf6, 0x9e}; - -static BYTE crypt_message_server[] = - {0xf6, 0xb7, 0x92, 0x0c, 0xac, 0xea, 0x98, 0xe6, 0xef, 0xa0, - 0x29, 0x66, 0xfd}; - -static BYTE crypt_trailer_server2[] = - {0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb1, 0x4e, - 0x46, 0xb7, 0xca, 0xf7, 0x7f, 0xb3}; - -static BYTE crypt_message_server2[] = - {0xc8, 0xf2, 0x39, 0x7f, 0x0c, 0xaf, 0xf5, 0x5d, 0xef, 0x0c, - 0x8b, 0x5f, 0x82}; - -static void InitFunctionPtrs(void) -{ - secdll = LoadLibraryA("secur32.dll"); - if(!secdll) - secdll = LoadLibraryA("security.dll"); - if(secdll) - { - pInitSecurityInterfaceA = (PVOID)GetProcAddress(secdll, "InitSecurityInterfaceA"); - pFreeContextBuffer = (PVOID)GetProcAddress(secdll, "FreeContextBuffer"); - pQuerySecurityPackageInfoA = (PVOID)GetProcAddress(secdll, "QuerySecurityPackageInfoA"); - pAcquireCredentialsHandleA = (PVOID)GetProcAddress(secdll, "AcquireCredentialsHandleA"); - pInitializeSecurityContextA = (PVOID)GetProcAddress(secdll, "InitializeSecurityContextA"); - pCompleteAuthToken = (PVOID)GetProcAddress(secdll, "CompleteAuthToken"); - pAcceptSecurityContext = (PVOID)GetProcAddress(secdll, "AcceptSecurityContext"); - pFreeCredentialsHandle = (PVOID)GetProcAddress(secdll, "FreeCredentialsHandle"); - pDeleteSecurityContext = (PVOID)GetProcAddress(secdll, "DeleteSecurityContext"); - pQueryContextAttributesA = (PVOID)GetProcAddress(secdll, "QueryContextAttributesA"); - pMakeSignature = (PVOID)GetProcAddress(secdll, "MakeSignature"); - pVerifySignature = (PVOID)GetProcAddress(secdll, "VerifySignature"); - pEncryptMessage = (PVOID)GetProcAddress(secdll, "EncryptMessage"); - pDecryptMessage = (PVOID)GetProcAddress(secdll, "DecryptMessage"); - pGetUserNameExA = (PVOID)GetProcAddress(secdll, "GetUserNameExA"); - } -} - -static const char* getSecError(SECURITY_STATUS status) -{ - static char buf[20]; - -#define _SEC_ERR(x) case (x): return #x; - switch(status) - { - _SEC_ERR(SEC_E_OK); - _SEC_ERR(SEC_E_INSUFFICIENT_MEMORY); - _SEC_ERR(SEC_E_INVALID_HANDLE); - _SEC_ERR(SEC_E_UNSUPPORTED_FUNCTION); - _SEC_ERR(SEC_E_TARGET_UNKNOWN); - _SEC_ERR(SEC_E_INTERNAL_ERROR); - _SEC_ERR(SEC_E_SECPKG_NOT_FOUND); - _SEC_ERR(SEC_E_NOT_OWNER); - _SEC_ERR(SEC_E_CANNOT_INSTALL); - _SEC_ERR(SEC_E_INVALID_TOKEN); - _SEC_ERR(SEC_E_CANNOT_PACK); - _SEC_ERR(SEC_E_QOP_NOT_SUPPORTED); - _SEC_ERR(SEC_E_NO_IMPERSONATION); - _SEC_ERR(SEC_I_CONTINUE_NEEDED); - _SEC_ERR(SEC_E_BUFFER_TOO_SMALL); - _SEC_ERR(SEC_E_ILLEGAL_MESSAGE); - _SEC_ERR(SEC_E_LOGON_DENIED); - _SEC_ERR(SEC_E_NO_CREDENTIALS); - _SEC_ERR(SEC_E_OUT_OF_SEQUENCE); - _SEC_ERR(SEC_E_MESSAGE_ALTERED); - default: - sprintf(buf, "%08x\n", status); - return buf; - } -#undef _SEC_ERR -} - -/**********************************************************************/ - -static SECURITY_STATUS setupBuffers(SspiData *sspi_data, SecPkgInfoA *sec_pkg_info) -{ - - sspi_data->in_buf = HeapAlloc(GetProcessHeap(), 0, sizeof(SecBufferDesc)); - sspi_data->out_buf = HeapAlloc(GetProcessHeap(), 0, sizeof(SecBufferDesc)); - sspi_data->max_token = sec_pkg_info->cbMaxToken; - - if(sspi_data->in_buf != NULL) - { - PSecBuffer sec_buffer = HeapAlloc(GetProcessHeap(), 0, - sizeof(SecBuffer)); - if(sec_buffer == NULL){ - trace("in_buf: sec_buffer == NULL\n"); - return SEC_E_INSUFFICIENT_MEMORY; - } - - sspi_data->in_buf->ulVersion = SECBUFFER_VERSION; - sspi_data->in_buf->cBuffers = 1; - sspi_data->in_buf->pBuffers = sec_buffer; - - sec_buffer->cbBuffer = sec_pkg_info->cbMaxToken; - sec_buffer->BufferType = SECBUFFER_TOKEN; - if((sec_buffer->pvBuffer = HeapAlloc(GetProcessHeap(), 0, - sec_pkg_info->cbMaxToken)) == NULL) - { - trace("in_buf: sec_buffer->pvBuffer == NULL\n"); - return SEC_E_INSUFFICIENT_MEMORY; - } - } - else - { - trace("HeapAlloc in_buf returned NULL\n"); - return SEC_E_INSUFFICIENT_MEMORY; - } - - if(sspi_data->out_buf != NULL) - { - PSecBuffer sec_buffer = HeapAlloc(GetProcessHeap(), 0, - sizeof(SecBuffer)); - - if(sec_buffer == NULL){ - trace("out_buf: sec_buffer == NULL\n"); - return SEC_E_INSUFFICIENT_MEMORY; - } - - sspi_data->out_buf->ulVersion = SECBUFFER_VERSION; - sspi_data->out_buf->cBuffers = 1; - sspi_data->out_buf->pBuffers = sec_buffer; - - sec_buffer->cbBuffer = sec_pkg_info->cbMaxToken; - sec_buffer->BufferType = SECBUFFER_TOKEN; - if((sec_buffer->pvBuffer = HeapAlloc(GetProcessHeap(), 0, - sec_pkg_info->cbMaxToken)) == NULL){ - trace("out_buf: sec_buffer->pvBuffer == NULL\n"); - return SEC_E_INSUFFICIENT_MEMORY; - } - } - else - { - trace("HeapAlloc out_buf returned NULL\n"); - return SEC_E_INSUFFICIENT_MEMORY; - } - - return SEC_E_OK; -} - -/**********************************************************************/ - -static void cleanupBuffers(SspiData *sspi_data) -{ - ULONG i; - - if(sspi_data->in_buf != NULL) - { - for(i = 0; i < sspi_data->in_buf->cBuffers; ++i) - { - HeapFree(GetProcessHeap(), 0, sspi_data->in_buf->pBuffers[i].pvBuffer); - } - HeapFree(GetProcessHeap(), 0, sspi_data->in_buf->pBuffers); - HeapFree(GetProcessHeap(), 0, sspi_data->in_buf); - } - - if(sspi_data->out_buf != NULL) - { - for(i = 0; i < sspi_data->out_buf->cBuffers; ++i) - { - HeapFree(GetProcessHeap(), 0, sspi_data->out_buf->pBuffers[i].pvBuffer); - } - HeapFree(GetProcessHeap(), 0, sspi_data->out_buf->pBuffers); - HeapFree(GetProcessHeap(), 0, sspi_data->out_buf); - } -} - -/**********************************************************************/ - -static SECURITY_STATUS setupClient(SspiData *sspi_data, SEC_CHAR *provider) -{ - SECURITY_STATUS ret; - TimeStamp ttl; - SecPkgInfoA *sec_pkg_info; - - trace("Running setupClient\n"); - - ret = pQuerySecurityPackageInfoA(provider, &sec_pkg_info); - - ok(ret == SEC_E_OK, "QuerySecurityPackageInfo returned %s\n", getSecError(ret)); - - setupBuffers(sspi_data, sec_pkg_info); - pFreeContextBuffer(sec_pkg_info); - - if((ret = pAcquireCredentialsHandleA(NULL, provider, SECPKG_CRED_OUTBOUND, - NULL, sspi_data->id, NULL, NULL, &sspi_data->cred, &ttl)) - != SEC_E_OK) - { - trace("AcquireCredentialsHandle() returned %s\n", getSecError(ret)); - } - - ok(ret == SEC_E_OK, "AcquireCredentialsHande() returned %s\n", - getSecError(ret)); - - return ret; -} -/**********************************************************************/ - -static SECURITY_STATUS setupServer(SspiData *sspi_data, SEC_CHAR *provider) -{ - SECURITY_STATUS ret; - TimeStamp ttl; - SecPkgInfoA *sec_pkg_info; - - trace("Running setupServer\n"); - - ret = pQuerySecurityPackageInfoA(provider, &sec_pkg_info); - - ok(ret == SEC_E_OK, "QuerySecurityPackageInfo returned %s\n", getSecError(ret)); - - setupBuffers(sspi_data, sec_pkg_info); - pFreeContextBuffer(sec_pkg_info); - - if((ret = pAcquireCredentialsHandleA(NULL, provider, SECPKG_CRED_INBOUND, - NULL, NULL, NULL, NULL, &sspi_data->cred, &ttl)) != SEC_E_OK) - { - trace("AcquireCredentialsHandle() returned %s\n", getSecError(ret)); - } - - ok(ret == SEC_E_OK, "AcquireCredentialsHande() returned %s\n", - getSecError(ret)); - - return ret; -} - -/**********************************************************************/ - -static SECURITY_STATUS setupFakeServer(SspiData *sspi_data, SEC_CHAR *provider) -{ - SECURITY_STATUS ret; - SecPkgInfoA *sec_pkg_info; - - trace("Running setupFakeServer\n"); - - ret = pQuerySecurityPackageInfoA(provider, &sec_pkg_info); - - ok(ret == SEC_E_OK, "QuerySecurityPackageInfo returned %s\n", getSecError(ret)); - - ret = setupBuffers(sspi_data, sec_pkg_info); - pFreeContextBuffer(sec_pkg_info); - - return ret; -} - - -/**********************************************************************/ - -static SECURITY_STATUS runClient(SspiData *sspi_data, BOOL first, ULONG data_rep) -{ - SECURITY_STATUS ret; - ULONG req_attr = 0; - ULONG ctxt_attr; - TimeStamp ttl; - PSecBufferDesc in_buf = sspi_data->in_buf; - PSecBufferDesc out_buf = sspi_data->out_buf; - - assert(in_buf->cBuffers >= 1); - assert(in_buf->pBuffers[0].pvBuffer != NULL); - assert(in_buf->pBuffers[0].cbBuffer != 0); - - assert(out_buf->cBuffers >= 1); - assert(out_buf->pBuffers[0].pvBuffer != NULL); - assert(out_buf->pBuffers[0].cbBuffer != 0); - - trace("Running the client the %s time.\n", first?"first":"second"); - - /* We can either use ISC_REQ_ALLOCATE_MEMORY flag to ask the provider - * always allocate output buffers for us, or initialize cbBuffer - * before each call because the API changes it to represent actual - * amount of data in the buffer. - */ - - /* test a failing call only the first time, otherwise we get - * SEC_E_OUT_OF_SEQUENCE - */ - if (first) - { - void *old_buf; - - /* pass NULL as an output buffer */ - ret = pInitializeSecurityContextA(&sspi_data->cred, NULL, NULL, req_attr, - 0, data_rep, NULL, 0, &sspi_data->ctxt, NULL, - &ctxt_attr, &ttl); - - ok(ret == SEC_E_BUFFER_TOO_SMALL, "expected SEC_E_BUFFER_TOO_SMALL, got %s\n", getSecError(ret)); - - /* pass NULL as an output buffer */ - old_buf = out_buf->pBuffers[0].pvBuffer; - out_buf->pBuffers[0].pvBuffer = NULL; - - ret = pInitializeSecurityContextA(&sspi_data->cred, NULL, NULL, req_attr, - 0, data_rep, NULL, 0, &sspi_data->ctxt, out_buf, - &ctxt_attr, &ttl); - - ok(ret == SEC_E_INTERNAL_ERROR || ret == SEC_I_CONTINUE_NEEDED, - "expected SEC_E_INTERNAL_ERROR or SEC_I_CONTINUE_NEEDED, got %s\n", getSecError(ret)); - - out_buf->pBuffers[0].pvBuffer = old_buf; - - /* pass an output buffer of 0 size */ - out_buf->pBuffers[0].cbBuffer = 0; - - ret = pInitializeSecurityContextA(&sspi_data->cred, NULL, NULL, req_attr, - 0, data_rep, NULL, 0, &sspi_data->ctxt, out_buf, - &ctxt_attr, &ttl); - - ok(ret == SEC_E_BUFFER_TOO_SMALL, "expected SEC_E_BUFFER_TOO_SMALL, got %s\n", getSecError(ret)); - - ok(out_buf->pBuffers[0].cbBuffer == 0, - "InitializeSecurityContext set buffer size to %u\n", out_buf->pBuffers[0].cbBuffer); - - out_buf->pBuffers[0].cbBuffer = sspi_data->max_token; - out_buf->pBuffers[0].BufferType = SECBUFFER_DATA; - - ret = pInitializeSecurityContextA(&sspi_data->cred, NULL, NULL, req_attr, - 0, data_rep, NULL, 0, &sspi_data->ctxt, out_buf, - &ctxt_attr, &ttl); - - ok(ret == SEC_E_BUFFER_TOO_SMALL, "expected SEC_E_BUFFER_TOO_SMALL, got %s\n", getSecError(ret)); - out_buf->pBuffers[0].BufferType = SECBUFFER_TOKEN; - } - - out_buf->pBuffers[0].cbBuffer = sspi_data->max_token; - - ret = pInitializeSecurityContextA(first?&sspi_data->cred:NULL, first?NULL:&sspi_data->ctxt, NULL, req_attr, - 0, data_rep, first?NULL:in_buf, 0, &sspi_data->ctxt, out_buf, - &ctxt_attr, &ttl); - - if(ret == SEC_I_COMPLETE_AND_CONTINUE || ret == SEC_I_COMPLETE_NEEDED) - { - pCompleteAuthToken(&sspi_data->ctxt, out_buf); - if(ret == SEC_I_COMPLETE_AND_CONTINUE) - ret = SEC_I_CONTINUE_NEEDED; - else if(ret == SEC_I_COMPLETE_NEEDED) - ret = SEC_E_OK; - } - - ok(out_buf->pBuffers[0].BufferType == SECBUFFER_TOKEN, - "buffer type was changed from SECBUFFER_TOKEN to %d\n", out_buf->pBuffers[0].BufferType); - ok(out_buf->pBuffers[0].cbBuffer < sspi_data->max_token, - "InitializeSecurityContext set buffer size to %u\n", out_buf->pBuffers[0].cbBuffer); - - return ret; -} - -/**********************************************************************/ - -static SECURITY_STATUS runServer(SspiData *sspi_data, BOOL first, ULONG data_rep) -{ - SECURITY_STATUS ret; - ULONG ctxt_attr; - TimeStamp ttl; - - trace("Running the server the %s time\n", first?"first":"second"); - - ret = pAcceptSecurityContext(&sspi_data->cred, first?NULL:&sspi_data->ctxt, - sspi_data->in_buf, 0, data_rep, &sspi_data->ctxt, - sspi_data->out_buf, &ctxt_attr, &ttl); - - if(ret == SEC_I_COMPLETE_AND_CONTINUE || ret == SEC_I_COMPLETE_NEEDED) - { - pCompleteAuthToken(&sspi_data->ctxt, sspi_data->out_buf); - if(ret == SEC_I_COMPLETE_AND_CONTINUE) - ret = SEC_I_CONTINUE_NEEDED; - else if(ret == SEC_I_COMPLETE_NEEDED) - ret = SEC_E_OK; - } - - return ret; -} - -/**********************************************************************/ - -static SECURITY_STATUS runFakeServer(SspiData *sspi_data, BOOL first, ULONG data_rep) -{ - trace("Running the fake server the %s time\n", first?"first":"second"); - - if(!first) - { - sspi_data->out_buf->pBuffers[0].cbBuffer = 0; - return SEC_E_OK; - } - - if(data_rep == SECURITY_NATIVE_DREP) - { - sspi_data->out_buf->pBuffers[0].cbBuffer = sizeof(native_challenge); - memcpy(sspi_data->out_buf->pBuffers[0].pvBuffer, native_challenge, - sspi_data->out_buf->pBuffers[0].cbBuffer); - } - else - { - sspi_data->out_buf->pBuffers[0].cbBuffer = sizeof(network_challenge); - memcpy(sspi_data->out_buf->pBuffers[0].pvBuffer, network_challenge, - sspi_data->out_buf->pBuffers[0].cbBuffer); - } - - return SEC_I_CONTINUE_NEEDED; -} - -/**********************************************************************/ - -static void communicate(SspiData *from, SspiData *to) -{ - if(from->out_buf != NULL && to->in_buf != NULL) - { - trace("Running communicate.\n"); - if((from->out_buf->cBuffers >= 1) && (to->in_buf->cBuffers >= 1)) - { - if((from->out_buf->pBuffers[0].pvBuffer != NULL) && - (to->in_buf->pBuffers[0].pvBuffer != NULL)) - { - memset(to->in_buf->pBuffers[0].pvBuffer, 0, to->max_token); - - memcpy(to->in_buf->pBuffers[0].pvBuffer, - from->out_buf->pBuffers[0].pvBuffer, - from->out_buf->pBuffers[0].cbBuffer); - - to->in_buf->pBuffers[0].cbBuffer = from->out_buf->pBuffers[0].cbBuffer; - - memset(from->out_buf->pBuffers[0].pvBuffer, 0, from->max_token); - } - } - } -} - -/**********************************************************************/ -static void testInitializeSecurityContextFlags(void) -{ - SECURITY_STATUS sec_status; - PSecPkgInfo pkg_info = NULL; - SspiData client; - SEC_WINNT_AUTH_IDENTITY id; - static char sec_pkg_name[] = "NTLM", - test_user[] = "testuser", - workgroup[] = "WORKGROUP", - test_pass[] = "testpass"; - ULONG req_attr, ctxt_attr; - TimeStamp ttl; - PBYTE packet; - - if(pQuerySecurityPackageInfoA( sec_pkg_name, &pkg_info) != SEC_E_OK) - { - skip("Package not installed, skipping test!\n"); - return; - } - - pFreeContextBuffer(pkg_info); - id.User = (unsigned char*) test_user; - id.UserLength = strlen((char *) id.User); - id.Domain = (unsigned char *) workgroup; - id.DomainLength = strlen((char *) id.Domain); - id.Password = (unsigned char*) test_pass; - id.PasswordLength = strlen((char *) id.Password); - id.Flags = SEC_WINNT_AUTH_IDENTITY_ANSI; - - client.id = &id; - - if((sec_status = setupClient(&client, sec_pkg_name)) != SEC_E_OK) - { - skip("Setting up the client returned %s, skipping test!\n", - getSecError(sec_status)); - return; - } - - packet = client.out_buf->pBuffers[0].pvBuffer; - - /* Due to how the requesting of the flags is implemented in ntlm_auth, - * the tests need to be in this order, as there is no way to specify - * "I request no special features" in ntlm_auth */ - - /* Without any flags, the lowest byte should not have bits 0x20 or 0x10 set*/ - req_attr = 0; - - if((sec_status = pInitializeSecurityContextA(&client.cred, NULL, NULL, req_attr, - 0, SECURITY_NETWORK_DREP, NULL, 0, &client.ctxt, client.out_buf, - &ctxt_attr, &ttl)) != SEC_I_CONTINUE_NEEDED) - { - trace("InitializeSecurityContext returned %s not SEC_I_CONTINUE_NEEDED, aborting.\n", - getSecError(sec_status)); - goto tISCFend; - } - - ok(((packet[12] & 0x10) == 0) && ((packet[12] & 0x20) == 0), - "With req_attr == 0, flags are 0x%02x%02x%02x%02x.\n", - packet[15], packet[14], packet[13], packet[12]); - pDeleteSecurityContext(&client.ctxt); - - /* With ISC_REQ_CONNECTION, the lowest byte should not have bits 0x20 or 0x10 set*/ - req_attr = ISC_REQ_CONNECTION; - - if((sec_status = pInitializeSecurityContextA(&client.cred, NULL, NULL, req_attr, - 0, SECURITY_NETWORK_DREP, NULL, 0, &client.ctxt, client.out_buf, - &ctxt_attr, &ttl)) != SEC_I_CONTINUE_NEEDED) - { - trace("InitializeSecurityContext returned %s not SEC_I_CONTINUE_NEEDED, aborting.\n", - getSecError(sec_status)); - goto tISCFend; - } - - ok(((packet[12] & 0x10) == 0) && ((packet[12] & 0x20) == 0), - "For ISC_REQ_CONNECTION, flags are 0x%02x%02x%02x%02x.\n", - packet[15], packet[14], packet[13], packet[12]); - pDeleteSecurityContext(&client.ctxt); - - /* With ISC_REQ_EXTENDED_ERROR, the lowest byte should not have bits 0x20 or 0x10 set*/ - req_attr = ISC_REQ_EXTENDED_ERROR; - - if((sec_status = pInitializeSecurityContextA(&client.cred, NULL, NULL, req_attr, - 0, SECURITY_NETWORK_DREP, NULL, 0, &client.ctxt, client.out_buf, - &ctxt_attr, &ttl)) != SEC_I_CONTINUE_NEEDED) - { - trace("InitializeSecurityContext returned %s not SEC_I_CONTINUE_NEEDED, aborting.\n", - getSecError(sec_status)); - goto tISCFend; - } - - ok(((packet[12] & 0x10) == 0) && ((packet[12] & 0x20) == 0), - "For ISC_REQ_EXTENDED_ERROR, flags are 0x%02x%02x%02x%02x.\n", - packet[15], packet[14], packet[13], packet[12]); - pDeleteSecurityContext(&client.ctxt); - - /* With ISC_REQ_MUTUAL_AUTH, the lowest byte should not have bits 0x20 or 0x10 set*/ - req_attr = ISC_REQ_MUTUAL_AUTH; - - if((sec_status = pInitializeSecurityContextA(&client.cred, NULL, NULL, req_attr, - 0, SECURITY_NETWORK_DREP, NULL, 0, &client.ctxt, client.out_buf, - &ctxt_attr, &ttl)) != SEC_I_CONTINUE_NEEDED) - { - trace("InitializeSecurityContext returned %s not SEC_I_CONTINUE_NEEDED, aborting.\n", - getSecError(sec_status)); - goto tISCFend; - } - - ok(((packet[12] & 0x10) == 0) && ((packet[12] & 0x20) == 0), - "For ISC_REQ_MUTUAL_AUTH, flags are 0x%02x%02x%02x%02x.\n", - packet[15], packet[14], packet[13], packet[12]); - pDeleteSecurityContext(&client.ctxt); - - /* With ISC_REQ_USE_DCE_STYLE, the lowest byte should not have bits 0x20 or 0x10 set*/ - req_attr = ISC_REQ_USE_DCE_STYLE; - - if((sec_status = pInitializeSecurityContextA(&client.cred, NULL, NULL, req_attr, - 0, SECURITY_NETWORK_DREP, NULL, 0, &client.ctxt, client.out_buf, - &ctxt_attr, &ttl)) != SEC_I_CONTINUE_NEEDED) - { - trace("InitializeSecurityContext returned %s not SEC_I_CONTINUE_NEEDED, aborting.\n", - getSecError(sec_status)); - goto tISCFend; - } - - ok(((packet[12] & 0x10) == 0) && ((packet[12] & 0x20) == 0), - "For ISC_REQ_USE_DCE_STYLE, flags are 0x%02x%02x%02x%02x.\n", - packet[15], packet[14], packet[13], packet[12]); - pDeleteSecurityContext(&client.ctxt); - - /* With ISC_REQ_DELEGATE, the lowest byte should not have bits 0x20 or 0x10 set*/ - req_attr = ISC_REQ_DELEGATE; - - if((sec_status = pInitializeSecurityContextA(&client.cred, NULL, NULL, req_attr, - 0, SECURITY_NETWORK_DREP, NULL, 0, &client.ctxt, client.out_buf, - &ctxt_attr, &ttl)) != SEC_I_CONTINUE_NEEDED) - { - trace("InitializeSecurityContext returned %s not SEC_I_CONTINUE_NEEDED, aborting.\n", - getSecError(sec_status)); - goto tISCFend; - } - - ok(((packet[12] & 0x10) == 0) && ((packet[12] & 0x20) == 0), - "For ISC_REQ_DELEGATE, flags are 0x%02x%02x%02x%02x.\n", - packet[15], packet[14], packet[13], packet[12]); - pDeleteSecurityContext(&client.ctxt); - - /* With ISC_REQ_INTEGRITY, the lowest byte should have bit 0x10 set */ - req_attr = ISC_REQ_INTEGRITY; - - if((sec_status = pInitializeSecurityContextA(&client.cred, NULL, NULL, req_attr, - 0, SECURITY_NETWORK_DREP, NULL, 0, &client.ctxt, client.out_buf, - &ctxt_attr, &ttl)) != SEC_I_CONTINUE_NEEDED) - { - trace("InitializeSecurityContext returned %s not SEC_I_CONTINUE_NEEDED, aborting.\n", - getSecError(sec_status)); - goto tISCFend; - } - - ok((packet[12] & 0x10) != 0, - "For ISC_REQ_INTEGRITY, flags are 0x%02x%02x%02x%02x.\n", - packet[15], packet[14], packet[13], packet[12]); - pDeleteSecurityContext(&client.ctxt); - - /* With ISC_REQ_REPLAY_DETECT, the lowest byte should have bit 0x10 set */ - req_attr = ISC_REQ_REPLAY_DETECT; - - if((sec_status = pInitializeSecurityContextA(&client.cred, NULL, NULL, req_attr, - 0, SECURITY_NETWORK_DREP, NULL, 0, &client.ctxt, client.out_buf, - &ctxt_attr, &ttl)) != SEC_I_CONTINUE_NEEDED) - { - trace("InitializeSecurityContext returned %s not SEC_I_CONTINUE_NEEDED, aborting.\n", - getSecError(sec_status)); - goto tISCFend; - } - - ok((packet[12] & 0x10) != 0, - "For ISC_REQ_REPLAY_DETECT, flags are 0x%02x%02x%02x%02x.\n", - packet[15], packet[14], packet[13], packet[12]); - pDeleteSecurityContext(&client.ctxt); - - /* With ISC_REQ_SEQUENCE_DETECT, the lowest byte should have bit 0x10 set */ - req_attr = ISC_REQ_SEQUENCE_DETECT; - - if((sec_status = pInitializeSecurityContextA(&client.cred, NULL, NULL, req_attr, - 0, SECURITY_NETWORK_DREP, NULL, 0, &client.ctxt, client.out_buf, - &ctxt_attr, &ttl)) != SEC_I_CONTINUE_NEEDED) - { - trace("InitializeSecurityContext returned %s not SEC_I_CONTINUE_NEEDED, aborting.\n", - getSecError(sec_status)); - goto tISCFend; - } - - ok((packet[12] & 0x10) != 0, - "For ISC_REQ_SEQUENCE_DETECT, flags are 0x%02x%02x%02x%02x.\n", - packet[15], packet[14], packet[13], packet[12]); - pDeleteSecurityContext(&client.ctxt); - - /* With ISC_REQ_CONFIDENTIALITY, the lowest byte should have bit 0x20 set */ - req_attr = ISC_REQ_CONFIDENTIALITY; - - if((sec_status = pInitializeSecurityContextA(&client.cred, NULL, NULL, req_attr, - 0, SECURITY_NETWORK_DREP, NULL, 0, &client.ctxt, client.out_buf, - &ctxt_attr, &ttl)) != SEC_I_CONTINUE_NEEDED) - { - trace("InitializeSecurityContext returned %s not SEC_I_CONTINUE_NEEDED, aborting.\n", - getSecError(sec_status)); - goto tISCFend; - } - - ok((packet[12] & 0x20) != 0, - "For ISC_REQ_CONFIDENTIALITY, flags are 0x%02x%02x%02x%02x.\n", - packet[15], packet[14], packet[13], packet[12]); - pDeleteSecurityContext(&client.ctxt); - -tISCFend: - cleanupBuffers(&client); - pFreeCredentialsHandle(&client.cred); -} - -/**********************************************************************/ - -static void testAuth(ULONG data_rep, BOOL fake) -{ - SECURITY_STATUS client_stat = SEC_I_CONTINUE_NEEDED; - SECURITY_STATUS server_stat = SEC_I_CONTINUE_NEEDED; - SECURITY_STATUS sec_status; - PSecPkgInfo pkg_info = NULL; - BOOL first = TRUE; - SspiData client, server; - SEC_WINNT_AUTH_IDENTITY id; - SecPkgContext_Sizes ctxt_sizes; - static char sec_pkg_name[] = "NTLM", - test_user[] = "testuser", - workgroup[] = "WORKGROUP", - test_pass[] = "testpass"; - - if(pQuerySecurityPackageInfoA( sec_pkg_name, &pkg_info)!= SEC_E_OK) - { - skip("Package not installed, skipping test.\n"); - return; - } - - pFreeContextBuffer(pkg_info); - id.User = (unsigned char*) test_user; - id.UserLength = strlen((char *) id.User); - id.Domain = (unsigned char *) workgroup; - id.DomainLength = strlen((char *) id.Domain); - id.Password = (unsigned char*) test_pass; - id.PasswordLength = strlen((char *) id.Password); - id.Flags = SEC_WINNT_AUTH_IDENTITY_ANSI; - - client.id = &id; - - sec_status = setupClient(&client, sec_pkg_name); - - if(sec_status != SEC_E_OK) - { - skip("Error: Setting up the client returned %s, exiting test!\n", - getSecError(sec_status)); - pFreeCredentialsHandle(&client.cred); - return; - } - - if(fake) - sec_status = setupFakeServer(&server, sec_pkg_name); - else - sec_status = setupServer(&server, sec_pkg_name); - - if(sec_status != SEC_E_OK) - { - skip("Error: Setting up the server returned %s, exiting test!\n", - getSecError(sec_status)); - pFreeCredentialsHandle(&server.cred); - pFreeCredentialsHandle(&client.cred); - return; - } - - while(client_stat == SEC_I_CONTINUE_NEEDED && server_stat == SEC_I_CONTINUE_NEEDED) - { - client_stat = runClient(&client, first, data_rep); - - ok(client_stat == SEC_E_OK || client_stat == SEC_I_CONTINUE_NEEDED, - "Running the client returned %s, more tests will fail.\n", - getSecError(client_stat)); - - communicate(&client, &server); - - if(fake) - server_stat = runFakeServer(&server, first, data_rep); - else - server_stat = runServer(&server, first, data_rep); - - ok(server_stat == SEC_E_OK || server_stat == SEC_I_CONTINUE_NEEDED || - server_stat == SEC_E_LOGON_DENIED, - "Running the server returned %s, more tests will fail from now.\n", - getSecError(server_stat)); - - communicate(&server, &client); - trace("Looping\n"); - first = FALSE; - } - - if(client_stat != SEC_E_OK) - { - skip("Authentication failed, skipping test.\n"); - goto tAuthend; - } - - sec_status = pQueryContextAttributesA(&client.ctxt, - SECPKG_ATTR_SIZES, &ctxt_sizes); - - ok(sec_status == SEC_E_OK, - "pQueryContextAttributesA(SECPKG_ATTR_SIZES) returned %s\n", - getSecError(sec_status)); - ok((ctxt_sizes.cbMaxToken == 1904) || (ctxt_sizes.cbMaxToken == 2888), - "cbMaxToken should be 1904 or 2888 but is %u\n", - ctxt_sizes.cbMaxToken); - ok(ctxt_sizes.cbMaxSignature == 16, - "cbMaxSignature should be 16 but is %u\n", - ctxt_sizes.cbMaxSignature); - ok(ctxt_sizes.cbSecurityTrailer == 16, - "cbSecurityTrailer should be 16 but is %u\n", - ctxt_sizes.cbSecurityTrailer); - ok(ctxt_sizes.cbBlockSize == 0, - "cbBlockSize should be 0 but is %u\n", - ctxt_sizes.cbBlockSize); - -tAuthend: - cleanupBuffers(&client); - cleanupBuffers(&server); - - if(!fake) - { - sec_status = pDeleteSecurityContext(&server.ctxt); - ok(sec_status == SEC_E_OK, "DeleteSecurityContext(server) returned %s\n", - getSecError(sec_status)); - } - - sec_status = pDeleteSecurityContext(&client.ctxt); - ok(sec_status == SEC_E_OK, "DeleteSecurityContext(client) returned %s\n", - getSecError(sec_status)); - - if(!fake) - { - sec_status = pFreeCredentialsHandle(&server.cred); - ok(sec_status == SEC_E_OK, "FreeCredentialsHandle(server) returned %s\n", - getSecError(sec_status)); - } - - sec_status = pFreeCredentialsHandle(&client.cred); - ok(sec_status == SEC_E_OK, "FreeCredentialsHandle(client) returned %s\n", - getSecError(sec_status)); -} - -static void testSignSeal(void) -{ - SECURITY_STATUS client_stat = SEC_I_CONTINUE_NEEDED; - SECURITY_STATUS server_stat = SEC_I_CONTINUE_NEEDED; - SECURITY_STATUS sec_status; - PSecPkgInfo pkg_info = NULL; - BOOL first = TRUE; - SspiData client, server; - SEC_WINNT_AUTH_IDENTITY id; - static char sec_pkg_name[] = "NTLM"; - SecBufferDesc crypt; - SecBuffer data[2], fake_data[2], complex_data[4]; - ULONG qop = 0; - SecPkgContext_Sizes ctxt_sizes; - static char test_user[] = "testuser", - workgroup[] = "WORKGROUP", - test_pass[] = "testpass"; - - complex_data[1].pvBuffer = complex_data[3].pvBuffer = NULL; - - /**************************************************************** - * This is basically the same as in testAuth with a fake server, - * as we need a valid, authenticated context. - */ - if(pQuerySecurityPackageInfoA( sec_pkg_name, &pkg_info) != SEC_E_OK) - { - skip("Package not installed, skipping test.\n"); - return; - } - - pFreeContextBuffer(pkg_info); - id.User = (unsigned char*) test_user; - id.UserLength = strlen((char *) id.User); - id.Domain = (unsigned char *) workgroup; - id.DomainLength = strlen((char *) id.Domain); - id.Password = (unsigned char*) test_pass; - id.PasswordLength = strlen((char *) id.Password); - id.Flags = SEC_WINNT_AUTH_IDENTITY_ANSI; - - client.id = &id; - - sec_status = setupClient(&client, sec_pkg_name); - - if(sec_status != SEC_E_OK) - { - skip("Error: Setting up the client returned %s, exiting test!\n", - getSecError(sec_status)); - pFreeCredentialsHandle(&client.cred); - return; - } - - sec_status = setupFakeServer(&server, sec_pkg_name); - - while(client_stat == SEC_I_CONTINUE_NEEDED && server_stat == SEC_I_CONTINUE_NEEDED) - { - client_stat = runClient(&client, first, SECURITY_NETWORK_DREP); - - communicate(&client, &server); - - server_stat = runFakeServer(&server, first, SECURITY_NETWORK_DREP); - - communicate(&server, &client); - trace("Looping\n"); - first = FALSE; - } - - /******************************************** - * Now start with the actual testing * - ********************************************/ - - if(pQueryContextAttributesA(&client.ctxt, SECPKG_ATTR_SIZES, - &ctxt_sizes) != SEC_E_OK) - { - skip("Failed to get context sizes, aborting test.\n"); - goto end; - } - - crypt.ulVersion = SECBUFFER_VERSION; - crypt.cBuffers = 2; - - crypt.pBuffers = fake_data; - - fake_data[0].BufferType = SECBUFFER_DATA; - fake_data[0].cbBuffer = ctxt_sizes.cbSecurityTrailer; - fake_data[0].pvBuffer = HeapAlloc(GetProcessHeap(), 0, fake_data[0].cbBuffer); - - fake_data[1].BufferType = SECBUFFER_DATA; - fake_data[1].cbBuffer = lstrlen(message); - fake_data[1].pvBuffer = HeapAlloc(GetProcessHeap(), 0, fake_data[1].cbBuffer); - - sec_status = pMakeSignature(&client.ctxt, 0, &crypt, 0); - ok(sec_status == SEC_E_INVALID_TOKEN, - "MakeSignature returned %s, not SEC_E_INVALID_TOKEN.\n", - getSecError(sec_status)); - - crypt.pBuffers = data; - - data[0].BufferType = SECBUFFER_TOKEN; - data[0].cbBuffer = ctxt_sizes.cbSecurityTrailer; - data[0].pvBuffer = HeapAlloc(GetProcessHeap(), 0, data[0].cbBuffer); - - data[1].BufferType = SECBUFFER_DATA; - data[1].cbBuffer = lstrlen(message); - data[1].pvBuffer = HeapAlloc(GetProcessHeap(), 0, data[1].cbBuffer); - memcpy(data[1].pvBuffer, message, data[1].cbBuffer); - - /* As we forced NTLM to fall back to a password-derived session key, - * we should get the same signature for our data, no matter if - * it is sent by the client or the server - */ - sec_status = pMakeSignature(&client.ctxt, 0, &crypt, 0); - ok(sec_status == SEC_E_OK, "MakeSignature returned %s, not SEC_E_OK.\n", - getSecError(sec_status)); - ok(!memcmp(crypt.pBuffers[0].pvBuffer, message_signature, - crypt.pBuffers[0].cbBuffer), "Signature is not as expected.\n"); - - data[0].cbBuffer = sizeof(message_signature); - - memcpy(data[0].pvBuffer, crypt_trailer_client, data[0].cbBuffer); - - sec_status = pVerifySignature(&client.ctxt, &crypt, 0, &qop); - ok(sec_status == SEC_E_MESSAGE_ALTERED, - "VerifySignature returned %s, not SEC_E_MESSAGE_ALTERED.\n", - getSecError(sec_status)); - - memcpy(data[0].pvBuffer, message_signature, data[0].cbBuffer); - - sec_status = pVerifySignature(&client.ctxt, &crypt, 0, &qop); - ok(sec_status == SEC_E_OK, "VerifySignature returned %s, not SEC_E_OK.\n", - getSecError(sec_status)); - - sec_status = pEncryptMessage(&client.ctxt, 0, &crypt, 0); - if (sec_status == SEC_E_UNSUPPORTED_FUNCTION) - { - skip("Encrypt message returned SEC_E_UNSUPPORTED_FUNCTION. " - "Expected on Vista.\n"); - goto end; - } - ok(sec_status == SEC_E_OK, "EncryptMessage returned %s, not SEC_E_OK.\n", - getSecError(sec_status)); - - ok(!memcmp(crypt.pBuffers[0].pvBuffer, crypt_trailer_client, - crypt.pBuffers[0].cbBuffer), "Crypt trailer not as expected.\n"); - if (memcmp(crypt.pBuffers[0].pvBuffer, crypt_trailer_client, - crypt.pBuffers[0].cbBuffer)) - { - int i; - for (i = 0; i < crypt.pBuffers[0].cbBuffer; i++) - { - if (i % 8 == 0) printf(" "); - printf("0x%02x,", ((unsigned char *)crypt.pBuffers[0].pvBuffer)[i]); - if (i % 8 == 7) printf("\n"); - } - printf("\n"); - } - ok(!memcmp(crypt.pBuffers[1].pvBuffer, crypt_message_client, - crypt.pBuffers[1].cbBuffer), "Crypt message not as expected.\n"); - if (memcmp(crypt.pBuffers[1].pvBuffer, crypt_message_client, - crypt.pBuffers[1].cbBuffer)) - { - int i; - for (i = 0; i < crypt.pBuffers[1].cbBuffer; i++) - { - if (i % 8 == 0) printf(" "); - printf("0x%02x,", ((unsigned char *)crypt.pBuffers[1].pvBuffer)[i]); - if (i % 8 == 7) printf("\n"); - } - printf("\n"); - } - - data[0].cbBuffer = sizeof(crypt_trailer_server); - data[1].cbBuffer = sizeof(crypt_message_server); - memcpy(data[0].pvBuffer, crypt_trailer_server, data[0].cbBuffer); - memcpy(data[1].pvBuffer, crypt_message_server, data[1].cbBuffer); - - sec_status = pDecryptMessage(&client.ctxt, &crypt, 0, &qop); - - ok(sec_status == SEC_E_OK, "DecryptMessage returned %s, not SEC_E_OK.\n", - getSecError(sec_status)); - ok(!memcmp(crypt.pBuffers[1].pvBuffer, message_binary, - crypt.pBuffers[1].cbBuffer), - "Failed to decrypt message correctly.\n"); - - trace("Testing with more than one buffer.\n"); - - crypt.cBuffers = sizeof(complex_data)/sizeof(complex_data[0]); - crypt.pBuffers = complex_data; - - complex_data[0].BufferType = SECBUFFER_DATA|SECBUFFER_READONLY_WITH_CHECKSUM; - complex_data[0].cbBuffer = sizeof(message_header); - complex_data[0].pvBuffer = message_header; - - complex_data[1].BufferType = SECBUFFER_DATA; - complex_data[1].cbBuffer = lstrlen(message); - complex_data[1].pvBuffer = HeapAlloc(GetProcessHeap(), 0, data[1].cbBuffer); - memcpy(complex_data[1].pvBuffer, message, complex_data[1].cbBuffer); - - complex_data[2].BufferType = SECBUFFER_DATA|SECBUFFER_READONLY_WITH_CHECKSUM; - complex_data[2].cbBuffer = sizeof(message_header); - complex_data[2].pvBuffer = message_header; - - complex_data[3].BufferType = SECBUFFER_TOKEN; - complex_data[3].cbBuffer = ctxt_sizes.cbSecurityTrailer; - complex_data[3].pvBuffer = HeapAlloc(GetProcessHeap(), 0, complex_data[3].cbBuffer); - - /* We should get a dummy signature again. */ - sec_status = pMakeSignature(&client.ctxt, 0, &crypt, 0); - ok(sec_status == SEC_E_OK, "MakeSignature returned %s, not SEC_E_OK.\n", - getSecError(sec_status)); - ok(!memcmp(crypt.pBuffers[3].pvBuffer, message_signature, - crypt.pBuffers[3].cbBuffer), "Signature is not as expected.\n"); - - /* Being a dummy signature, it will verify right away, as if the server - * sent it */ - sec_status = pVerifySignature(&client.ctxt, &crypt, 0, &qop); - ok(sec_status == SEC_E_OK, "VerifySignature returned %s, not SEC_E_OK\n", - getSecError(sec_status)); - - sec_status = pEncryptMessage(&client.ctxt, 0, &crypt, 0); - ok(sec_status == SEC_E_OK, "EncryptMessage returned %s, not SEC_E_OK.\n", - getSecError(sec_status)); - - ok(!memcmp(crypt.pBuffers[3].pvBuffer, crypt_trailer_client2, - crypt.pBuffers[3].cbBuffer), "Crypt trailer not as expected.\n"); - if (memcmp(crypt.pBuffers[3].pvBuffer, crypt_trailer_client2, - crypt.pBuffers[3].cbBuffer)) - { - int i; - for (i = 0; i < crypt.pBuffers[3].cbBuffer; i++) - { - if (i % 8 == 0) printf(" "); - printf("0x%02x,", ((unsigned char *)crypt.pBuffers[3].pvBuffer)[i]); - if (i % 8 == 7) printf("\n"); - } - printf("\n"); - } - - ok(!memcmp(crypt.pBuffers[1].pvBuffer, crypt_message_client2, - crypt.pBuffers[1].cbBuffer), "Crypt message not as expected.\n"); - if (memcmp(crypt.pBuffers[1].pvBuffer, crypt_message_client2, - crypt.pBuffers[1].cbBuffer)) - { - int i; - for (i = 0; i < crypt.pBuffers[1].cbBuffer; i++) - { - if (i % 8 == 0) printf(" "); - printf("0x%02x,", ((unsigned char *)crypt.pBuffers[1].pvBuffer)[i]); - if (i % 8 == 7) printf("\n"); - } - printf("\n"); - } - - memcpy(complex_data[1].pvBuffer, crypt_message_server2, complex_data[1].cbBuffer); - memcpy(complex_data[3].pvBuffer, crypt_trailer_server2, complex_data[3].cbBuffer); - - sec_status = pDecryptMessage(&client.ctxt, &crypt, 0, &qop); - ok(sec_status == SEC_E_OK, "DecryptMessage returned %s, not SEC_E_OK.\n", - getSecError(sec_status)); - - -end: - cleanupBuffers(&client); - cleanupBuffers(&server); - - pDeleteSecurityContext(&client.ctxt); - pFreeCredentialsHandle(&client.cred); - - HeapFree(GetProcessHeap(), 0, fake_data[0].pvBuffer); - HeapFree(GetProcessHeap(), 0, fake_data[1].pvBuffer); - HeapFree(GetProcessHeap(), 0, data[0].pvBuffer); - HeapFree(GetProcessHeap(), 0, data[1].pvBuffer); - HeapFree(GetProcessHeap(), 0, complex_data[1].pvBuffer); - HeapFree(GetProcessHeap(), 0, complex_data[3].pvBuffer); -} - -static void testAcquireCredentialsHandle(void) -{ - CredHandle cred; - TimeStamp ttl; - static char test_user[] = "testuser", - workgroup[] = "WORKGROUP", - test_pass[] = "testpass", - sec_pkg_name[] = "NTLM"; - SECURITY_STATUS ret; - SEC_WINNT_AUTH_IDENTITY id; - PSecPkgInfo pkg_info = NULL; - - if(pQuerySecurityPackageInfoA(sec_pkg_name, &pkg_info) != SEC_E_OK) - { - skip("NTLM package not installed, skipping test\n"); - return; - } - pFreeContextBuffer(pkg_info); - - id.User = (unsigned char*) test_user; - id.UserLength = strlen((char *) id.User); - id.Domain = (unsigned char *) workgroup; - id.DomainLength = strlen((char *) id.Domain); - id.Password = (unsigned char*) test_pass; - id.PasswordLength = strlen((char *) id.Password); - id.Flags = SEC_WINNT_AUTH_IDENTITY_ANSI; - - ret = pAcquireCredentialsHandleA(NULL, sec_pkg_name, SECPKG_CRED_OUTBOUND, - NULL, &id, NULL, NULL, &cred, &ttl); - ok(ret == SEC_E_OK, "AcquireCredentialsHande() returned %s\n", - getSecError(ret)); - pFreeCredentialsHandle(&cred); - - id.DomainLength = 0; - ret = pAcquireCredentialsHandleA(NULL, sec_pkg_name, SECPKG_CRED_OUTBOUND, - NULL, &id, NULL, NULL, &cred, &ttl); - ok(ret == SEC_E_OK, "AcquireCredentialsHande() returned %s\n", - getSecError(ret)); - pFreeCredentialsHandle(&cred); - - id.Domain = NULL; - ret = pAcquireCredentialsHandleA(NULL, sec_pkg_name, SECPKG_CRED_OUTBOUND, - NULL, &id, NULL, NULL, &cred, &ttl); - ok(ret == SEC_E_OK, "AcquireCredentialsHande() returned %s\n", - getSecError(ret)); - pFreeCredentialsHandle(&cred); - - id.Domain = (unsigned char *) workgroup; - id.DomainLength = strlen((char *) id.Domain); - id.UserLength = 0; - id.User = NULL; - ret = pAcquireCredentialsHandleA(NULL, sec_pkg_name, SECPKG_CRED_OUTBOUND, - NULL, &id, NULL, NULL, &cred, &ttl); - ok(ret == SEC_E_OK, "AcquireCredentialsHande() returned %s\n", - getSecError(ret)); - pFreeCredentialsHandle(&cred); - - id.User = (unsigned char*) test_user; - id.UserLength = strlen((char *) id.User); - id.Password = NULL; - id.PasswordLength = 0; - ret = pAcquireCredentialsHandleA(NULL, sec_pkg_name, SECPKG_CRED_OUTBOUND, - NULL, &id, NULL, NULL, &cred, &ttl); - ok(ret == SEC_E_OK, "AcquireCredentialsHande() returned %s\n", - getSecError(ret)); - pFreeCredentialsHandle(&cred); -} - -static void test_cred_multiple_use(void) -{ - static char test_user[] = "testuser", - workgroup[] = "WORKGROUP", - test_pass[] = "testpass", - sec_pkg_name[] = "NTLM"; - SECURITY_STATUS ret; - SEC_WINNT_AUTH_IDENTITY id; - PSecPkgInfo pkg_info = NULL; - CredHandle cred; - CtxtHandle ctxt1; - CtxtHandle ctxt2; - SecBufferDesc buffer_desc; - SecBuffer buffers[1]; - ULONG ctxt_attr; - TimeStamp ttl; - - if(pQuerySecurityPackageInfoA(sec_pkg_name, &pkg_info) != SEC_E_OK) - { - skip("NTLM package not installed, skipping test\n"); - return; - } - buffers[0].cbBuffer = pkg_info->cbMaxToken; - buffers[0].BufferType = SECBUFFER_TOKEN; - buffers[0].pvBuffer = HeapAlloc(GetProcessHeap(), 0, buffers[0].cbBuffer); - - pFreeContextBuffer(pkg_info); - - id.User = (unsigned char*) test_user; - id.UserLength = strlen((char *) id.User); - id.Domain = (unsigned char *) workgroup; - id.DomainLength = strlen((char *) id.Domain); - id.Password = (unsigned char*) test_pass; - id.PasswordLength = strlen((char *) id.Password); - id.Flags = SEC_WINNT_AUTH_IDENTITY_ANSI; - - ret = pAcquireCredentialsHandleA(NULL, sec_pkg_name, SECPKG_CRED_OUTBOUND, - NULL, &id, NULL, NULL, &cred, &ttl); - ok(ret == SEC_E_OK, "AcquireCredentialsHande() returned %s\n", - getSecError(ret)); - - buffer_desc.ulVersion = SECBUFFER_VERSION; - buffer_desc.cBuffers = sizeof(buffers)/sizeof(buffers[0]); - buffer_desc.pBuffers = buffers; - - ret = pInitializeSecurityContextA(&cred, NULL, NULL, ISC_REQ_CONNECTION, - 0, SECURITY_NETWORK_DREP, NULL, 0, &ctxt1, &buffer_desc, - &ctxt_attr, &ttl); - ok(ret == SEC_I_CONTINUE_NEEDED, "InitializeSecurityContextA failed with error 0x%x\n", ret); - - ret = pInitializeSecurityContextA(&cred, NULL, NULL, ISC_REQ_CONNECTION, - 0, SECURITY_NETWORK_DREP, NULL, 0, &ctxt2, &buffer_desc, - &ctxt_attr, &ttl); - ok(ret == SEC_I_CONTINUE_NEEDED, "Second InitializeSecurityContextA on cred handle failed with error 0x%x\n", ret); - - ret = pDeleteSecurityContext(&ctxt1); - ok(ret == SEC_E_OK, "DeleteSecurityContext failed with error 0x%x\n", ret); - ret = pDeleteSecurityContext(&ctxt2); - ok(ret == SEC_E_OK, "DeleteSecurityContext failed with error 0x%x\n", ret); - ret = pFreeCredentialsHandle(&cred); - ok(ret == SEC_E_OK, "FreeCredentialsHandle failed with error 0x%x\n", ret); - - HeapFree(GetProcessHeap(), 0, buffers[0].pvBuffer); -} - -static void test_null_auth_data(void) -{ - SECURITY_STATUS status; - PSecPkgInfo info; - CredHandle cred; - CtxtHandle ctx; - SecBufferDesc buffer_desc; - SecBuffer buffers[1]; - char user[256]; - TimeStamp ttl; - ULONG attr, size; - BOOLEAN ret; - - if(pQuerySecurityPackageInfoA((SEC_CHAR *)"NTLM", &info) != SEC_E_OK) - { - skip("NTLM package not installed, skipping test\n"); - return; - } - - status = pAcquireCredentialsHandleA(NULL, (SEC_CHAR *)"NTLM", SECPKG_CRED_OUTBOUND, - NULL, NULL, NULL, NULL, &cred, &ttl); - ok(status == SEC_E_OK, "AcquireCredentialsHande() failed %s\n", getSecError(status)); - - buffers[0].cbBuffer = info->cbMaxToken; - buffers[0].BufferType = SECBUFFER_TOKEN; - buffers[0].pvBuffer = HeapAlloc(GetProcessHeap(), 0, buffers[0].cbBuffer); - - buffer_desc.ulVersion = SECBUFFER_VERSION; - buffer_desc.cBuffers = sizeof(buffers)/sizeof(buffers[0]); - buffer_desc.pBuffers = buffers; - - size = sizeof(user); - ret = pGetUserNameExA(NameSamCompatible, user, &size); - ok(ret, "GetUserNameExA failed %u\n", GetLastError()); - - status = pInitializeSecurityContextA(&cred, NULL, (SEC_CHAR *)user, - ISC_REQ_CONNECTION, 0, SECURITY_NETWORK_DREP, - NULL, 0, &ctx, &buffer_desc, &attr, &ttl); - ok(status == SEC_I_CONTINUE_NEEDED, "InitializeSecurityContextA failed %s\n", getSecError(status)); - - ret = pDeleteSecurityContext(&ctx); - ok(ret == SEC_E_OK, "DeleteSecurityContext failed with error 0x%x\n", ret); - ret = pFreeCredentialsHandle(&cred); - ok(ret == SEC_E_OK, "FreeCredentialsHandle failed with error 0x%x\n", ret); - - pFreeContextBuffer(info); - HeapFree(GetProcessHeap(), 0, buffers[0].pvBuffer); -} - -START_TEST(ntlm) -{ - InitFunctionPtrs(); - - if(pFreeCredentialsHandle && pDeleteSecurityContext && - pDeleteSecurityContext && pAcquireCredentialsHandleA && - pInitializeSecurityContextA && pCompleteAuthToken && - pQuerySecurityPackageInfoA) - { - testAcquireCredentialsHandle(); - testInitializeSecurityContextFlags(); - if(pAcceptSecurityContext) - { - testAuth(SECURITY_NATIVE_DREP, TRUE); - testAuth(SECURITY_NETWORK_DREP, TRUE); - testAuth(SECURITY_NATIVE_DREP, FALSE); - testAuth(SECURITY_NETWORK_DREP, FALSE); - } - if(pMakeSignature && pVerifySignature && pEncryptMessage && - pDecryptMessage) - testSignSeal(); - - test_cred_multiple_use(); - if (pGetUserNameExA) test_null_auth_data(); - } - else - win_skip("Needed functions are not available\n"); - - if(secdll) - FreeLibrary(secdll); -} diff --git a/rostests/winetests/secur32/schannel.c b/rostests/winetests/secur32/schannel.c deleted file mode 100644 index 82e27db3e84..00000000000 --- a/rostests/winetests/secur32/schannel.c +++ /dev/null @@ -1,467 +0,0 @@ -/* - * Schannel tests - * - * Copyright 2006 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 - */ -#include -#include -#include -#include -#define SECURITY_WIN32 -#include -#include - -#include "wine/test.h" - -static HMODULE secdll, crypt32dll; - -static ACQUIRE_CREDENTIALS_HANDLE_FN_A pAcquireCredentialsHandleA; -static ENUMERATE_SECURITY_PACKAGES_FN_A pEnumerateSecurityPackagesA; -static FREE_CONTEXT_BUFFER_FN pFreeContextBuffer; -static FREE_CREDENTIALS_HANDLE_FN pFreeCredentialsHandle; -static QUERY_CREDENTIALS_ATTRIBUTES_FN_A pQueryCredentialsAttributesA; - -static PCCERT_CONTEXT (WINAPI *pCertCreateCertificateContext)(DWORD,const BYTE*,DWORD); -static BOOL (WINAPI *pCertFreeCertificateContext)(PCCERT_CONTEXT); -static BOOL (WINAPI *pCertSetCertificateContextProperty)(PCCERT_CONTEXT,DWORD,DWORD,const void*); - -static BOOL (WINAPI *pCryptAcquireContextW)(HCRYPTPROV*, LPCWSTR, LPCWSTR, DWORD, DWORD); -static BOOL (WINAPI *pCryptDestroyKey)(HCRYPTKEY); -static BOOL (WINAPI *pCryptImportKey)(HCRYPTPROV,CONST BYTE*,DWORD,HCRYPTKEY,DWORD,HCRYPTKEY*); -static BOOL (WINAPI *pCryptReleaseContext)(HCRYPTPROV,ULONG_PTR); - -static const BYTE bigCert[] = { 0x30, 0x7a, 0x02, 0x01, 0x01, 0x30, 0x02, 0x06, - 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, - 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x22, - 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, - 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, - 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, - 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, 0x01, - 0x00, 0xa3, 0x16, 0x30, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, - 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x01 }; -static WCHAR cspNameW[] = { 'W','i','n','e','C','r','y','p','t','T','e', - 'm','p',0 }; -static BYTE privKey[] = { - 0x07, 0x02, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x52, 0x53, 0x41, 0x32, 0x00, - 0x02, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x79, 0x10, 0x1c, 0xd0, 0x6b, 0x10, - 0x18, 0x30, 0x94, 0x61, 0xdc, 0x0e, 0xcb, 0x96, 0x4e, 0x21, 0x3f, 0x79, 0xcd, - 0xa9, 0x17, 0x62, 0xbc, 0xbb, 0x61, 0x4c, 0xe0, 0x75, 0x38, 0x6c, 0xf3, 0xde, - 0x60, 0x86, 0x03, 0x97, 0x65, 0xeb, 0x1e, 0x6b, 0xdb, 0x53, 0x85, 0xad, 0x68, - 0x21, 0xf1, 0x5d, 0xe7, 0x1f, 0xe6, 0x53, 0xb4, 0xbb, 0x59, 0x3e, 0x14, 0x27, - 0xb1, 0x83, 0xa7, 0x3a, 0x54, 0xe2, 0x8f, 0x65, 0x8e, 0x6a, 0x4a, 0xcf, 0x3b, - 0x1f, 0x65, 0xff, 0xfe, 0xf1, 0x31, 0x3a, 0x37, 0x7a, 0x8b, 0xcb, 0xc6, 0xd4, - 0x98, 0x50, 0x36, 0x67, 0xe4, 0xa1, 0xe8, 0x7e, 0x8a, 0xc5, 0x23, 0xf2, 0x77, - 0xf5, 0x37, 0x61, 0x49, 0x72, 0x59, 0xe8, 0x3d, 0xf7, 0x60, 0xb2, 0x77, 0xca, - 0x78, 0x54, 0x6d, 0x65, 0x9e, 0x03, 0x97, 0x1b, 0x61, 0xbd, 0x0c, 0xd8, 0x06, - 0x63, 0xe2, 0xc5, 0x48, 0xef, 0xb3, 0xe2, 0x6e, 0x98, 0x7d, 0xbd, 0x4e, 0x72, - 0x91, 0xdb, 0x31, 0x57, 0xe3, 0x65, 0x3a, 0x49, 0xca, 0xec, 0xd2, 0x02, 0x4e, - 0x22, 0x7e, 0x72, 0x8e, 0xf9, 0x79, 0x84, 0x82, 0xdf, 0x7b, 0x92, 0x2d, 0xaf, - 0xc9, 0xe4, 0x33, 0xef, 0x89, 0x5c, 0x66, 0x99, 0xd8, 0x80, 0x81, 0x47, 0x2b, - 0xb1, 0x66, 0x02, 0x84, 0x59, 0x7b, 0xc3, 0xbe, 0x98, 0x45, 0x4a, 0x3d, 0xdd, - 0xea, 0x2b, 0xdf, 0x4e, 0xb4, 0x24, 0x6b, 0xec, 0xe7, 0xd9, 0x0c, 0x45, 0xb8, - 0xbe, 0xca, 0x69, 0x37, 0x92, 0x4c, 0x38, 0x6b, 0x96, 0x6d, 0xcd, 0x86, 0x67, - 0x5c, 0xea, 0x54, 0x94, 0xa4, 0xca, 0xa4, 0x02, 0xa5, 0x21, 0x4d, 0xae, 0x40, - 0x8f, 0x9d, 0x51, 0x83, 0xf2, 0x3f, 0x33, 0xc1, 0x72, 0xb4, 0x1d, 0x94, 0x6e, - 0x7d, 0xe4, 0x27, 0x3f, 0xea, 0xff, 0xe5, 0x9b, 0xa7, 0x5e, 0x55, 0x8e, 0x0d, - 0x69, 0x1c, 0x7a, 0xff, 0x81, 0x9d, 0x53, 0x52, 0x97, 0x9a, 0x76, 0x79, 0xda, - 0x93, 0x32, 0x16, 0xec, 0x69, 0x51, 0x1a, 0x4e, 0xc3, 0xf1, 0x72, 0x80, 0x78, - 0x5e, 0x66, 0x4a, 0x8d, 0x85, 0x2f, 0x3f, 0xb2, 0xa7 }; - -static const BYTE selfSignedCert[] = { - 0x30, 0x82, 0x01, 0x1f, 0x30, 0x81, 0xce, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, - 0x10, 0xeb, 0x0d, 0x57, 0x2a, 0x9c, 0x09, 0xba, 0xa4, 0x4a, 0xb7, 0x25, 0x49, - 0xd9, 0x3e, 0xb5, 0x73, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02, 0x1d, - 0x05, 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, - 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, - 0x1e, 0x17, 0x0d, 0x30, 0x36, 0x30, 0x36, 0x32, 0x39, 0x30, 0x35, 0x30, 0x30, - 0x34, 0x36, 0x5a, 0x17, 0x0d, 0x30, 0x37, 0x30, 0x36, 0x32, 0x39, 0x31, 0x31, - 0x30, 0x30, 0x34, 0x36, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, - 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, - 0x67, 0x00, 0x30, 0x5c, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, - 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x4b, 0x00, 0x30, 0x48, 0x02, 0x41, - 0x00, 0xe2, 0x54, 0x3a, 0xa7, 0x83, 0xb1, 0x27, 0x14, 0x3e, 0x59, 0xbb, 0xb4, - 0x53, 0xe6, 0x1f, 0xe7, 0x5d, 0xf1, 0x21, 0x68, 0xad, 0x85, 0x53, 0xdb, 0x6b, - 0x1e, 0xeb, 0x65, 0x97, 0x03, 0x86, 0x60, 0xde, 0xf3, 0x6c, 0x38, 0x75, 0xe0, - 0x4c, 0x61, 0xbb, 0xbc, 0x62, 0x17, 0xa9, 0xcd, 0x79, 0x3f, 0x21, 0x4e, 0x96, - 0xcb, 0x0e, 0xdc, 0x61, 0x94, 0x30, 0x18, 0x10, 0x6b, 0xd0, 0x1c, 0x10, 0x79, - 0x02, 0x03, 0x01, 0x00, 0x01, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02, - 0x1d, 0x05, 0x00, 0x03, 0x41, 0x00, 0x25, 0x90, 0x53, 0x34, 0xd9, 0x56, 0x41, - 0x5e, 0xdb, 0x7e, 0x01, 0x36, 0xec, 0x27, 0x61, 0x5e, 0xb7, 0x4d, 0x90, 0x66, - 0xa2, 0xe1, 0x9d, 0x58, 0x76, 0xd4, 0x9c, 0xba, 0x2c, 0x84, 0xc6, 0x83, 0x7a, - 0x22, 0x0d, 0x03, 0x69, 0x32, 0x1a, 0x6d, 0xcb, 0x0c, 0x15, 0xb3, 0x6b, 0xc7, - 0x0a, 0x8c, 0xb4, 0x5c, 0x34, 0x78, 0xe0, 0x3c, 0x9c, 0xe9, 0xf3, 0x30, 0x9f, - 0xa8, 0x76, 0x57, 0x92, 0x36 }; - -static void InitFunctionPtrs(void) -{ - HMODULE advapi32dll; - - crypt32dll = LoadLibraryA("crypt32.dll"); - secdll = LoadLibraryA("secur32.dll"); - if(!secdll) - secdll = LoadLibraryA("security.dll"); - advapi32dll = GetModuleHandleA("advapi32.dll"); - -#define GET_PROC(h, func) p ## func = (void*)GetProcAddress(h, #func) - - if(secdll) - { - GET_PROC(secdll, AcquireCredentialsHandleA); - GET_PROC(secdll, EnumerateSecurityPackagesA); - GET_PROC(secdll, FreeContextBuffer); - GET_PROC(secdll, FreeCredentialsHandle); - GET_PROC(secdll, QueryCredentialsAttributesA); - } - - GET_PROC(advapi32dll, CryptAcquireContextW); - GET_PROC(advapi32dll, CryptDestroyKey); - GET_PROC(advapi32dll, CryptImportKey); - GET_PROC(advapi32dll, CryptReleaseContext); - - GET_PROC(crypt32dll, CertFreeCertificateContext); - GET_PROC(crypt32dll, CertSetCertificateContextProperty); - GET_PROC(crypt32dll, CertCreateCertificateContext); - -#undef GET_PROC -} - -static void test_strength(PCredHandle handle) -{ - SecPkgCred_CipherStrengths strength = {-1,-1}; - SECURITY_STATUS st; - - st = pQueryCredentialsAttributesA(handle, SECPKG_ATTR_CIPHER_STRENGTHS, &strength); - ok(st == SEC_E_OK, "QueryCredentialsAttributesA failed: %u\n", GetLastError()); - ok(strength.dwMinimumCipherStrength, "dwMinimumCipherStrength not changed\n"); - ok(strength.dwMaximumCipherStrength, "dwMaximumCipherStrength not changed\n"); - trace("strength %d - %d\n", strength.dwMinimumCipherStrength, strength.dwMaximumCipherStrength); -} - -static void testAcquireSecurityContext(void) -{ - BOOL has_schannel = FALSE; - SecPkgInfoA *package_info; - ULONG i; - SECURITY_STATUS st; - CredHandle cred; - TimeStamp exp; - SCHANNEL_CRED schanCred; - PCCERT_CONTEXT certs[2]; - HCRYPTPROV csp; - static CHAR unisp_name_a[] = UNISP_NAME_A; - WCHAR ms_def_prov_w[MAX_PATH]; - BOOL ret; - HCRYPTKEY key; - CRYPT_KEY_PROV_INFO keyProvInfo; - - if (!pAcquireCredentialsHandleA || !pCertCreateCertificateContext || - !pEnumerateSecurityPackagesA || !pFreeContextBuffer || - !pFreeCredentialsHandle || !pCryptAcquireContextW) - { - win_skip("Needed functions are not available\n"); - return; - } - - if (SUCCEEDED(pEnumerateSecurityPackagesA(&i, &package_info))) - { - while(i--) - { - if (!strcmp(package_info[i].Name, unisp_name_a)) - { - has_schannel = TRUE; - break; - } - } - pFreeContextBuffer(package_info); - } - if (!has_schannel) - { - skip("Schannel not available\n"); - return; - } - - lstrcpyW(ms_def_prov_w, MS_DEF_PROV_W); - - keyProvInfo.pwszContainerName = cspNameW; - keyProvInfo.pwszProvName = ms_def_prov_w; - keyProvInfo.dwProvType = PROV_RSA_FULL; - keyProvInfo.dwFlags = 0; - keyProvInfo.cProvParam = 0; - keyProvInfo.rgProvParam = NULL; - keyProvInfo.dwKeySpec = AT_SIGNATURE; - - certs[0] = pCertCreateCertificateContext(X509_ASN_ENCODING, bigCert, - sizeof(bigCert)); - certs[1] = pCertCreateCertificateContext(X509_ASN_ENCODING, selfSignedCert, - sizeof(selfSignedCert)); - - SetLastError(0xdeadbeef); - ret = pCryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, - CRYPT_DELETEKEYSET); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - /* WinMe would crash on some tests */ - win_skip("CryptAcquireContextW is not implemented\n"); - return; - } - - st = pAcquireCredentialsHandleA(NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, - NULL); - ok(st == SEC_E_SECPKG_NOT_FOUND, - "Expected SEC_E_SECPKG_NOT_FOUND, got %08x\n", st); - if (0) - { - /* Crashes on Win2K */ - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, 0, NULL, NULL, NULL, - NULL, NULL, NULL); - ok(st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_NO_CREDENTIALS, got %08x\n", - st); - } - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_BOTH, NULL, - NULL, NULL, NULL, NULL, NULL); - ok(st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_NO_CREDENTIALS, got %08x\n", - st); - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, - NULL, NULL, NULL, NULL, NULL, NULL); - ok(st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_NO_CREDENTIALS, got %08x\n", - st); - if (0) - { - /* Crashes */ - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, - NULL, NULL, NULL, NULL, NULL, NULL); - } - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, - NULL, NULL, NULL, NULL, &cred, NULL); - ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", st); - if(st == SEC_E_OK) - pFreeCredentialsHandle(&cred); - memset(&cred, 0, sizeof(cred)); - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, - NULL, NULL, NULL, NULL, &cred, &exp); - ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", st); - /* expriy is indeterminate in win2k3 */ - trace("expiry: %08x%08x\n", exp.HighPart, exp.LowPart); - pFreeCredentialsHandle(&cred); - - /* Bad version in SCHANNEL_CRED */ - memset(&schanCred, 0, sizeof(schanCred)); - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, - NULL, &schanCred, NULL, NULL, NULL, NULL); - ok(st == SEC_E_INTERNAL_ERROR || - st == SEC_E_UNKNOWN_CREDENTIALS /* Vista/win2k8 */, - "Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, - NULL, &schanCred, NULL, NULL, NULL, NULL); - ok(st == SEC_E_INTERNAL_ERROR || - st == SEC_E_UNKNOWN_CREDENTIALS /* Vista/win2k8 */, - "Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); - - /* No cert in SCHANNEL_CRED succeeds for outbound.. */ - schanCred.dwVersion = SCHANNEL_CRED_VERSION; - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, - NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", st); - pFreeCredentialsHandle(&cred); - /* but fails for inbound. */ - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, - NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_NO_CREDENTIALS || - st == SEC_E_OK /* Vista/win2k8 */, - "Expected SEC_E_NO_CREDENTIALS or SEC_E_OK, got %08x\n", st); - - if (0) - { - /* Crashes with bad paCred pointer */ - schanCred.cCreds = 1; - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, - NULL, &schanCred, NULL, NULL, NULL, NULL); - } - - /* Bogus cert in SCHANNEL_CRED. Windows fails with - * SEC_E_UNKNOWN_CREDENTIALS, but I'll accept SEC_E_NO_CREDENTIALS too. - */ - schanCred.cCreds = 1; - schanCred.paCred = &certs[0]; - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, - NULL, &schanCred, NULL, NULL, NULL, NULL); - ok(st == SEC_E_UNKNOWN_CREDENTIALS || st == SEC_E_NO_CREDENTIALS, - "Expected SEC_E_UNKNOWN_CREDENTIALS or SEC_E_NO_CREDENTIALS, got %08x\n", - st); - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, - NULL, &schanCred, NULL, NULL, NULL, NULL); - ok(st == SEC_E_UNKNOWN_CREDENTIALS || st == SEC_E_NO_CREDENTIALS, - "Expected SEC_E_UNKNOWN_CREDENTIALS or SEC_E_NO_CREDENTIALS, got %08x\n", - st); - - /* Good cert, but missing private key. Windows fails with - * SEC_E_NO_CREDENTIALS, but I'll accept SEC_E_UNKNOWN_CREDENTIALS too. - */ - schanCred.cCreds = 1; - schanCred.paCred = &certs[1]; - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, - NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_UNKNOWN_CREDENTIALS || st == SEC_E_NO_CREDENTIALS || - st == SEC_E_INTERNAL_ERROR, /* win2k */ - "Expected SEC_E_UNKNOWN_CREDENTIALS, SEC_E_NO_CREDENTIALS " - "or SEC_E_INTERNAL_ERROR, got %08x\n", st); - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, - NULL, &schanCred, NULL, NULL, NULL, NULL); - ok(st == SEC_E_UNKNOWN_CREDENTIALS || st == SEC_E_NO_CREDENTIALS || - st == SEC_E_INTERNAL_ERROR, /* win2k */ - "Expected SEC_E_UNKNOWN_CREDENTIALS, SEC_E_NO_CREDENTIALS " - "or SEC_E_INTERNAL_ERROR, got %08x\n", st); - - /* Good cert, with CRYPT_KEY_PROV_INFO set before it's had a key loaded. */ - if (pCertSetCertificateContextProperty) - { - ret = pCertSetCertificateContextProperty(certs[1], - CERT_KEY_PROV_INFO_PROP_ID, 0, &keyProvInfo); - schanCred.dwVersion = SCH_CRED_V3; - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, - NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_UNKNOWN_CREDENTIALS, - "Expected SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, - NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_UNKNOWN_CREDENTIALS, - "Expected SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); - } - - ret = pCryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, - CRYPT_NEWKEYSET); - ok(ret, "CryptAcquireContextW failed: %08x\n", GetLastError()); - ret = 0; - if (pCryptImportKey) - { - ret = pCryptImportKey(csp, privKey, sizeof(privKey), 0, 0, &key); - ok(ret, "CryptImportKey failed: %08x\n", GetLastError()); - } - if (ret) - { - PCCERT_CONTEXT tmp; - - if (0) - { - /* Crashes */ - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, - NULL, &schanCred, NULL, NULL, NULL, NULL); - } - /* Good cert with private key, bogus version */ - schanCred.dwVersion = SCH_CRED_V1; - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, - NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_INTERNAL_ERROR || - st == SEC_E_UNKNOWN_CREDENTIALS /* Vista/win2k8 */, - "Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, - NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_INTERNAL_ERROR || - st == SEC_E_UNKNOWN_CREDENTIALS /* Vista/win2k8 */, - "Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); - schanCred.dwVersion = SCH_CRED_V2; - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, - NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_INTERNAL_ERROR || - st == SEC_E_UNKNOWN_CREDENTIALS /* Vista/win2k8 */, - "Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, - NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_INTERNAL_ERROR || - st == SEC_E_UNKNOWN_CREDENTIALS /* Vista/win2k8 */, - "Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); - - /* Succeeds on V3 or higher */ - schanCred.dwVersion = SCH_CRED_V3; - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, - NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", st); - pFreeCredentialsHandle(&cred); - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, - NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_OK || - st == SEC_E_UNKNOWN_CREDENTIALS, /* win2k3 */ - "AcquireCredentialsHandleA failed: %08x\n", st); - pFreeCredentialsHandle(&cred); - schanCred.dwVersion = SCHANNEL_CRED_VERSION; - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, - NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", st); - pFreeCredentialsHandle(&cred); - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, - NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_OK || - st == SEC_E_UNKNOWN_CREDENTIALS, /* win2k3 */ - "AcquireCredentialsHandleA failed: %08x\n", st); - if (st == SEC_E_OK) test_strength(&cred); - pFreeCredentialsHandle(&cred); - - /* How about more than one cert? */ - schanCred.cCreds = 2; - schanCred.paCred = certs; - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, - NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_UNKNOWN_CREDENTIALS || - st == SEC_E_NO_CREDENTIALS /* Vista/win2k8 */, - "Expected SEC_E_UNKNOWN_CREDENTIALS or SEC_E_NO_CREDENTIALS, got %08x\n", st); - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, - NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_UNKNOWN_CREDENTIALS || - st == SEC_E_NO_CREDENTIALS, - "Expected SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); - tmp = certs[0]; - certs[0] = certs[1]; - certs[1] = tmp; - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, - NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_UNKNOWN_CREDENTIALS || - st == SEC_E_NO_CREDENTIALS, - "Expected SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); - st = pAcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, - NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_UNKNOWN_CREDENTIALS, - "Expected SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); - /* FIXME: what about two valid certs? */ - - if (pCryptDestroyKey) - pCryptDestroyKey(key); - } - - if (pCryptReleaseContext) - pCryptReleaseContext(csp, 0); - pCryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, - CRYPT_DELETEKEYSET); - - if (pCertFreeCertificateContext) - { - pCertFreeCertificateContext(certs[0]); - pCertFreeCertificateContext(certs[1]); - } -} - -START_TEST(schannel) -{ - InitFunctionPtrs(); - - testAcquireSecurityContext(); - - if(secdll) - FreeLibrary(secdll); - if(crypt32dll) - FreeLibrary(crypt32dll); -} diff --git a/rostests/winetests/secur32/secur32.c b/rostests/winetests/secur32/secur32.c deleted file mode 100644 index 0ad6f0f5523..00000000000 --- a/rostests/winetests/secur32/secur32.c +++ /dev/null @@ -1,265 +0,0 @@ -/* - * tests - * - * Copyright 2006 Robert Reif - * - * 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 -#define SECURITY_WIN32 -#include -#include - -#include "wine/test.h" - -static HMODULE secdll; - -static BOOLEAN (WINAPI * pGetComputerObjectNameA)(EXTENDED_NAME_FORMAT NameFormat, LPSTR lpNameBuffer, PULONG lpnSize); -static BOOLEAN (WINAPI * pGetComputerObjectNameW)(EXTENDED_NAME_FORMAT NameFormat, LPWSTR lpNameBuffer, PULONG lpnSize); -static BOOLEAN (WINAPI * pGetUserNameExA)(EXTENDED_NAME_FORMAT NameFormat, LPSTR lpNameBuffer, PULONG lpnSize); -static BOOLEAN (WINAPI * pGetUserNameExW)(EXTENDED_NAME_FORMAT NameFormat, LPWSTR lpNameBuffer, PULONG lpnSize); -static PSecurityFunctionTableA (SEC_ENTRY * pInitSecurityInterfaceA)(void); -static PSecurityFunctionTableW (SEC_ENTRY * pInitSecurityInterfaceW)(void); - -static EXTENDED_NAME_FORMAT formats[] = { - NameUnknown, NameFullyQualifiedDN, NameSamCompatible, NameDisplay, - NameUniqueId, NameCanonical, NameUserPrincipal, NameCanonicalEx, - NameServicePrincipal, NameDnsDomain -}; - -static void testGetComputerObjectNameA(void) -{ - char name[256]; - ULONG size; - BOOLEAN rc; - UINT i; - - for (i = 0; i < (sizeof(formats) / sizeof(formats[0])); i++) { - size = sizeof(name); - ZeroMemory(name, sizeof(name)); - rc = pGetComputerObjectNameA(formats[i], name, &size); - ok(rc || ((formats[i] == NameUnknown) && - (GetLastError() == ERROR_INVALID_PARAMETER)) || - (GetLastError() == ERROR_CANT_ACCESS_DOMAIN_INFO) || - (GetLastError() == ERROR_NO_SUCH_DOMAIN) || - (GetLastError() == ERROR_NO_SUCH_USER) || - (GetLastError() == ERROR_NONE_MAPPED) || - (GetLastError() == ERROR_ACCESS_DENIED), - "GetComputerObjectNameA(%d) failed: %d\n", - formats[i], GetLastError()); - if (rc) - trace("GetComputerObjectNameA() returned %s\n", name); - } -} - -static void testGetComputerObjectNameW(void) -{ - WCHAR nameW[256]; - ULONG size; - BOOLEAN rc; - UINT i; - - for (i = 0; i < (sizeof(formats) / sizeof(formats[0])); i++) { - size = sizeof(nameW)/sizeof(nameW[0]); - ZeroMemory(nameW, sizeof(nameW)); - rc = pGetComputerObjectNameW(formats[i], nameW, &size); - ok(rc || ((formats[i] == NameUnknown) && - (GetLastError() == ERROR_INVALID_PARAMETER)) || - (GetLastError() == ERROR_CANT_ACCESS_DOMAIN_INFO) || - (GetLastError() == ERROR_NO_SUCH_DOMAIN) || - (GetLastError() == ERROR_NO_SUCH_USER) || - (GetLastError() == ERROR_NONE_MAPPED) || - (GetLastError() == ERROR_ACCESS_DENIED), - "GetComputerObjectNameW(%d) failed: %d\n", - formats[i], GetLastError()); - if (rc) { - char name[256]; - WideCharToMultiByte( CP_ACP, 0, nameW, -1, name, sizeof(name), NULL, NULL ); - trace("GetComputerObjectNameW() returned %s\n", name); - } - } -} - -static void testGetUserNameExA(void) -{ - char name[256]; - ULONG size; - BOOLEAN rc; - UINT i; - - for (i = 0; i < (sizeof(formats) / sizeof(formats[0])); i++) { - size = sizeof(name); - ZeroMemory(name, sizeof(name)); - rc = pGetUserNameExA(formats[i], name, &size); - ok(rc || - (formats[i] == NameUnknown && - GetLastError() == ERROR_NO_SUCH_USER) || - GetLastError() == ERROR_NONE_MAPPED || - broken(formats[i] == NameDnsDomain && - GetLastError() == ERROR_INVALID_PARAMETER), - "GetUserNameExW(%d) failed: %d\n", - formats[i], GetLastError()); - } - - if (0) /* Crashes on Windows */ - rc = pGetUserNameExA(NameSamCompatible, NULL, NULL); - - size = 0; - rc = pGetUserNameExA(NameSamCompatible, NULL, &size); - ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %u\n", rc, GetLastError()); - ok(size != 0, "Expected size to be set to required size\n"); - - if (0) /* Crashes on Windows with big enough size */ - { - /* Returned size is already big enough */ - rc = pGetUserNameExA(NameSamCompatible, NULL, &size); - } - - size = 0; - rc = pGetUserNameExA(NameSamCompatible, name, &size); - ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %u\n", rc, GetLastError()); - ok(size != 0, "Expected size to be set to required size\n"); - size = 1; - name[0] = 0xff; - rc = pGetUserNameExA(NameSamCompatible, name, &size); - ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %u\n", rc, GetLastError()); - ok(1 < size, "Expected size to be set to required size\n"); - ok(name[0] == (char) 0xff, "Expected unchanged buffer\n"); -} - -static void testGetUserNameExW(void) -{ - WCHAR nameW[256]; - ULONG size; - BOOLEAN rc; - UINT i; - - for (i = 0; i < (sizeof(formats) / sizeof(formats[0])); i++) { - size = sizeof(nameW); - ZeroMemory(nameW, sizeof(nameW)); - rc = pGetUserNameExW(formats[i], nameW, &size); - ok(rc || - (formats[i] == NameUnknown && - GetLastError() == ERROR_NO_SUCH_USER) || - GetLastError() == ERROR_NONE_MAPPED || - broken(formats[i] == NameDnsDomain && - GetLastError() == ERROR_INVALID_PARAMETER), - "GetUserNameExW(%d) failed: %d\n", - formats[i], GetLastError()); - } - - if (0) /* Crashes on Windows */ - rc = pGetUserNameExW(NameSamCompatible, NULL, NULL); - - size = 0; - rc = pGetUserNameExW(NameSamCompatible, NULL, &size); - ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %u\n", rc, GetLastError()); - ok(size != 0, "Expected size to be set to required size\n"); - - if (0) /* Crashes on Windows with big enough size */ - { - /* Returned size is already big enough */ - rc = pGetUserNameExW(NameSamCompatible, NULL, &size); - } - - size = 0; - rc = pGetUserNameExW(NameSamCompatible, nameW, &size); - ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %u\n", rc, GetLastError()); - ok(size != 0, "Expected size to be set to required size\n"); - size = 1; - nameW[0] = 0xff; - rc = pGetUserNameExW(NameSamCompatible, nameW, &size); - ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %u\n", rc, GetLastError()); - ok(1 < size, "Expected size to be set to required size\n"); - ok(nameW[0] == (WCHAR) 0xff, "Expected unchanged buffer\n"); -} - -static void test_InitSecurityInterface(void) -{ - PSecurityFunctionTableA sftA; - PSecurityFunctionTableW sftW; - - sftA = pInitSecurityInterfaceA(); - ok(sftA != NULL, "pInitSecurityInterfaceA failed\n"); - ok(sftA->dwVersion == SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION, "wrong dwVersion %d in security function table\n", sftA->dwVersion); - ok(!sftA->Reserved2 || broken(sftA->Reserved2 != NULL) /* WinME */, - "Reserved2 should be NULL instead of %p in security function table\n", - sftA->Reserved2); - ok(sftA->Reserved3 == sftA->EncryptMessage || - broken(sftA->Reserved3 != sftA->EncryptMessage) /* Win9x */, - "Reserved3 should be equal to EncryptMessage in the security function table\n"); - ok(sftA->Reserved4 == sftA->DecryptMessage || - broken(sftA->Reserved4 != sftA->DecryptMessage) /* Win9x */, - "Reserved4 should be equal to DecryptMessage in the security function table\n"); - - if (!pInitSecurityInterfaceW) - { - win_skip("InitSecurityInterfaceW not exported by secur32.dll\n"); - return; - } - - sftW = pInitSecurityInterfaceW(); - ok(sftW != NULL, "pInitSecurityInterfaceW failed\n"); - ok(sftW->dwVersion == SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION, "wrong dwVersion %d in security function table\n", sftW->dwVersion); - ok(!sftW->Reserved2, "Reserved2 should be NULL instead of %p in security function table\n", sftW->Reserved2); - ok(sftW->Reserved3 == sftW->EncryptMessage, "Reserved3 should be equal to EncryptMessage in the security function table\n"); - ok(sftW->Reserved4 == sftW->DecryptMessage, "Reserved4 should be equal to DecryptMessage in the security function table\n"); -} - -START_TEST(secur32) -{ - secdll = LoadLibraryA("secur32.dll"); - - if (!secdll) - secdll = LoadLibraryA("security.dll"); - - if (secdll) - { - pGetComputerObjectNameA = (PVOID)GetProcAddress(secdll, "GetComputerObjectNameA"); - pGetComputerObjectNameW = (PVOID)GetProcAddress(secdll, "GetComputerObjectNameW"); - pGetUserNameExA = (PVOID)GetProcAddress(secdll, "GetUserNameExA"); - pGetUserNameExW = (PVOID)GetProcAddress(secdll, "GetUserNameExW"); - pInitSecurityInterfaceA = (PVOID)GetProcAddress(secdll, "InitSecurityInterfaceA"); - pInitSecurityInterfaceW = (PVOID)GetProcAddress(secdll, "InitSecurityInterfaceW"); - - if (pGetComputerObjectNameA) - testGetComputerObjectNameA(); - else - win_skip("GetComputerObjectNameA not exported by secur32.dll\n"); - - if (pGetComputerObjectNameW) - testGetComputerObjectNameW(); - else - win_skip("GetComputerObjectNameW not exported by secur32.dll\n"); - - if (pGetUserNameExA) - testGetUserNameExA(); - else - win_skip("GetUserNameExA not exported by secur32.dll\n"); - - if (pGetUserNameExW) - testGetUserNameExW(); - else - win_skip("GetUserNameExW not exported by secur32.dll\n"); - - test_InitSecurityInterface(); - - FreeLibrary(secdll); - } -} diff --git a/rostests/winetests/secur32/secur32.rbuild b/rostests/winetests/secur32/secur32.rbuild deleted file mode 100644 index 9aa670f26fb..00000000000 --- a/rostests/winetests/secur32/secur32.rbuild +++ /dev/null @@ -1,12 +0,0 @@ - - . - - main.c - ntlm.c - schannel.c - secur32.c - testlist.c - wine - advapi32 - ntdll - diff --git a/rostests/winetests/secur32/testlist.c b/rostests/winetests/secur32/testlist.c deleted file mode 100644 index cc04b8414f0..00000000000 --- a/rostests/winetests/secur32/testlist.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_secur32(void); -extern void func_schannel(void); -extern void func_ntlm(void); -extern void func_main(void); - -const struct test winetest_testlist[] = -{ - { "secur32", func_secur32 }, - { "schannel", func_schannel }, - { "ntlm", func_ntlm }, - { "main", func_main }, - { 0, 0 } -}; diff --git a/rostests/winetests/serialui/CMakeLists.txt b/rostests/winetests/serialui/CMakeLists.txt deleted file mode 100644 index 8be75876805..00000000000 --- a/rostests/winetests/serialui/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(serialui_winetest confdlg.c testlist.c) -target_link_libraries(serialui_winetest wine) -set_module_type(serialui_winetest win32cui) -add_importlibs(serialui_winetest msvcrt kernel32 ntdll) -add_cd_file(TARGET serialui_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/serialui/confdlg.c b/rostests/winetests/serialui/confdlg.c deleted file mode 100644 index 4606a75b60b..00000000000 --- a/rostests/winetests/serialui/confdlg.c +++ /dev/null @@ -1,431 +0,0 @@ -/* - * Unit test suite for serialui API functions - * - * Copyright 2007 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 -#include - -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "winnls.h" - -#include "wine/test.h" - - -static HINSTANCE hdll; -static DWORD (WINAPI *pCommConfigDialogA)(LPCSTR, HWND, LPCOMMCONFIG); -static DWORD (WINAPI *pCommConfigDialogW)(LPCWSTR, HWND, LPCOMMCONFIG); -static DWORD (WINAPI *pGetDefaultCommConfigA)(LPCSTR, LPCOMMCONFIG, LPDWORD); -static DWORD (WINAPI *pGetDefaultCommConfigW)(LPCWSTR, LPCOMMCONFIG, LPDWORD); - - -static const CHAR com1A[] = "com1"; -static const CHAR emptyA[] = ""; -static const CHAR fmt_comA[] = "com%d"; -static const CHAR str_colonA[] = ":"; - -static const WCHAR com1W[] = {'c','o','m','1',0}; -static const WCHAR emptyW[] = {0}; -static const WCHAR str_colonW[] = {':',0}; - -/* ################# */ - -static LPCSTR load_functions(void) -{ - LPCSTR ptr; - - ptr = "serialui.dll"; - hdll = LoadLibraryA(ptr); - if (!hdll) return ptr; - - ptr = "drvCommConfigDialogA"; - pCommConfigDialogA = (VOID *) GetProcAddress(hdll, ptr); - if (!pCommConfigDialogA) return ptr; - - ptr = "drvCommConfigDialogW"; - pCommConfigDialogW = (VOID *) GetProcAddress(hdll, ptr); - if (!pCommConfigDialogW) return ptr; - - ptr = "drvGetDefaultCommConfigA"; - pGetDefaultCommConfigA = (VOID *) GetProcAddress(hdll, ptr); - if (!pGetDefaultCommConfigA) return ptr; - - ptr = "drvGetDefaultCommConfigW"; - pGetDefaultCommConfigW = (VOID *) GetProcAddress(hdll, ptr); - if (!pGetDefaultCommConfigW) return ptr; - - - return NULL; -} - -/* ################# */ - -static void test_drvCommConfigDialogA(void) -{ - COMMCONFIG pCC[3]; - CHAR bufferA[16]; - DWORD i; - DWORD res; - DWORD len; - - - /* test ports "com1" - "com4" */ - for (i = 1; i < 5 ; i++) { - sprintf(bufferA, fmt_comA, i); - len = sizeof(pCC); - ZeroMemory(pCC, sizeof(pCC)); - SetLastError(0xdeadbeef); - res = pGetDefaultCommConfigA(bufferA, pCC, &len); - if (res == ERROR_CALL_NOT_IMPLEMENTED) { - /* NT does not implement the ANSI API */ - win_skip("*A not implemented\n"); - return; - } - - if (res == ERROR_SUCCESS) { - - if (winetest_interactive) { - SetLastError(0xdeadbeef); - res = pCommConfigDialogA(bufferA, NULL, pCC); - /* OK: ERROR_SUCCESS, Cancel: ERROR_CANCELLED */ - trace("returned %u with %u for '%s'\n", res, GetLastError(), bufferA); - } - - ZeroMemory(pCC, sizeof(pCC)); - SetLastError(0xdeadbeef); - res = pCommConfigDialogA(bufferA, NULL, pCC); - ok( res == ERROR_INSUFFICIENT_BUFFER, - "returned %u with %u for '%s' (expected ERROR_INSUFFICIENT_BUFFER)\n", - res, GetLastError(), bufferA); - - - SetLastError(0xdeadbeef); - res = pCommConfigDialogA(bufferA, NULL, NULL); - ok( res == ERROR_INVALID_PARAMETER, - "returned %u with %u for '%s' (expected ERROR_INVALID_PARAMETER)\n", - res, GetLastError(), bufferA); - } - } - - - ZeroMemory(pCC, sizeof(pCC)); - SetLastError(0xdeadbeef); - res = pCommConfigDialogA(emptyA, NULL, pCC); - ok( res == ERROR_INSUFFICIENT_BUFFER, - "returned %u with %u (expected ERROR_INSUFFICIENT_BUFFER)\n", - res, GetLastError()); - - - ZeroMemory(pCC, sizeof(pCC)); - pCC[0].dwSize = sizeof(COMMCONFIG); - SetLastError(0xdeadbeef); - res = pCommConfigDialogA(emptyA, NULL, pCC); - ok( res == ERROR_BADKEY, "returned %u with %u (expected ERROR_BADKEY)\n", - res, GetLastError()); - - - ZeroMemory(pCC, sizeof(pCC)); - SetLastError(0xdeadbeef); - res = pCommConfigDialogA(NULL, NULL, pCC); - ok( res == ERROR_INVALID_PARAMETER, - "returned %u with %u (expected ERROR_INVALID_PARAMETER)\n", - res, GetLastError()); -} - -/* ################# */ - -static void test_drvCommConfigDialogW(void) -{ - COMMCONFIG pCC[3]; - CHAR bufferA[16]; - WCHAR bufferW[16]; - DWORD i; - DWORD res; - DWORD len; - - - /* test ports "com1" - "com4" */ - for (i = 1; i < 5 ; i++) { - sprintf(bufferA, fmt_comA, i); - MultiByteToWideChar( CP_ACP, 0, bufferA, -1, bufferW, sizeof(bufferW)/sizeof(WCHAR) ); - len = sizeof(pCC); - ZeroMemory(pCC, sizeof(pCC)); - SetLastError(0xdeadbeef); - res = pGetDefaultCommConfigW(bufferW, pCC, &len); - if (res == ERROR_CALL_NOT_IMPLEMENTED) { - win_skip("*W not implemented\n"); - return; - } - - if (res == ERROR_SUCCESS) { - - if (winetest_interactive) { - SetLastError(0xdeadbeef); - res = pCommConfigDialogW(bufferW, NULL, pCC); - /* OK: ERROR_SUCCESS, Cancel: ERROR_CANCELLED */ - trace("returned %u with %u for '%s'\n", res, GetLastError(), bufferA); - } - - ZeroMemory(pCC, sizeof(pCC)); - SetLastError(0xdeadbeef); - res = pCommConfigDialogW(bufferW, NULL, pCC); - ok( res == ERROR_INSUFFICIENT_BUFFER, - "returned %u with %u for '%s' (expected ERROR_INSUFFICIENT_BUFFER)\n", - res, GetLastError(), bufferA); - - SetLastError(0xdeadbeef); - res = pCommConfigDialogW(bufferW, NULL, NULL); - ok( res == ERROR_INVALID_PARAMETER, - "returned %u with %u for '%s' (expected ERROR_INVALID_PARAMETER)\n", - res, GetLastError(), bufferA); - } - } - - - ZeroMemory(pCC, sizeof(pCC)); - SetLastError(0xdeadbeef); - res = pCommConfigDialogW(emptyW, NULL, pCC); - ok( res == ERROR_INSUFFICIENT_BUFFER, - "returned %u with %u (expected ERROR_INSUFFICIENT_BUFFER)\n", - res, GetLastError()); - - - ZeroMemory(pCC, sizeof(pCC)); - pCC[0].dwSize = sizeof(COMMCONFIG); - SetLastError(0xdeadbeef); - res = pCommConfigDialogW(emptyW, NULL, pCC); - ok( res == ERROR_BADKEY, "returned %u with %u (expected ERROR_BADKEY)\n", - res, GetLastError()); - - - ZeroMemory(pCC, sizeof(pCC)); - SetLastError(0xdeadbeef); - res = pCommConfigDialogW(NULL, NULL, pCC); - ok( res == ERROR_INVALID_PARAMETER, - "returned %u with %u (expected ERROR_INVALID_PARAMETER)\n", - res, GetLastError()); -} - - -/* ################# */ - -static void test_drvGetDefaultCommConfigA(void) -{ - COMMCONFIG pCC[3]; - CHAR bufferA[16]; - DWORD i; - DWORD res; - DWORD len; - - - /* off by one: one byte smaller */ - i = sizeof(COMMCONFIG); - len = sizeof(COMMCONFIG) -1; - ZeroMemory(pCC, sizeof(pCC)); - SetLastError(0xdeadbeef); - res = pGetDefaultCommConfigA(com1A, pCC, &len); - if (res == ERROR_CALL_NOT_IMPLEMENTED) { - /* NT does not implement the ANSI API */ - win_skip("*A not implemented\n"); - return; - } - ok( (res == ERROR_INSUFFICIENT_BUFFER) && (len >= i), - "returned %u with %u and %u (expected " - "ERROR_INSUFFICIENT_BUFFER and '>= %u')\n", res, GetLastError(), len, i); - - /* test ports "com0" - "com10" */ - for (i = 0; i < 11 ; i++) { - sprintf(bufferA, fmt_comA, i); - len = sizeof(pCC); - ZeroMemory(pCC, sizeof(pCC)); - SetLastError(0xdeadbeef); - res = pGetDefaultCommConfigA(bufferA, pCC, &len); - if (i == 0) { - ok( res == ERROR_BADKEY, - "returned %u with %u and %u for %s (expected " - "ERROR_BADKEY)\n", res, GetLastError(), len, bufferA); - } - else - { - ok((res == ERROR_SUCCESS) || (res == ERROR_BADKEY), - "returned %u with %u and %u for %s (expected ERROR_SUCCESS or " - "ERROR_BADKEY)\n", res, GetLastError(), len, bufferA); - } - - /* a name with a colon is invalid */ - if (res == ERROR_SUCCESS) { - lstrcatA(bufferA, str_colonA); - len = sizeof(pCC); - ZeroMemory(pCC, sizeof(pCC)); - res = pGetDefaultCommConfigA(bufferA, pCC, &len); - ok( res == ERROR_BADKEY, - "returned %u with %u and %u for %s (expected '0' with " - "ERROR_BADKEY)\n", res, GetLastError(), len, bufferA); - } - } - - - /* an empty String is not allowed */ - len = sizeof(pCC); - ZeroMemory(pCC, sizeof(pCC)); - SetLastError(0xdeadbeef); - res = pGetDefaultCommConfigA(emptyA, pCC, &len); - ok( res == ERROR_BADKEY, - "returned %u with %u and %u for %s (expected ERROR_BADKEY)\n", - res, GetLastError(), len, emptyA); - - /* some NULL checks */ - len = sizeof(pCC); - ZeroMemory(pCC, sizeof(pCC)); - SetLastError(0xdeadbeef); - res = pGetDefaultCommConfigA(NULL, pCC, &len); - ok( res == ERROR_INVALID_PARAMETER, - "returned %u with %u and %u for NULL (expected ERROR_INVALID_PARAMETER)\n", - res, GetLastError(), len); - - - len = sizeof(pCC); - SetLastError(0xdeadbeef); - res = pGetDefaultCommConfigA(com1A, NULL, &len); - ok( res == ERROR_INVALID_PARAMETER, - "returned %u with %u and %u (expected ERROR_INVALID_PARAMETER)\n", - res, GetLastError(), len); - - - SetLastError(0xdeadbeef); - res = pGetDefaultCommConfigA(com1A, pCC, NULL); - ok( res == ERROR_INVALID_PARAMETER, - "returned %u with %u (expected ERROR_INVALID_PARAMETER)\n", - res, GetLastError()); -} - -/* ################# */ - -static void test_drvGetDefaultCommConfigW(void) -{ - COMMCONFIG pCC[3]; - WCHAR bufferW[16]; - CHAR bufferA[16]; - DWORD i; - DWORD res; - DWORD len; - - - /* off by one: one byte smaller */ - i = sizeof(COMMCONFIG); - len = sizeof(COMMCONFIG) -1; - ZeroMemory(pCC, sizeof(pCC)); - SetLastError(0xdeadbeef); - res = pGetDefaultCommConfigW(com1W, pCC, &len); - if (res == ERROR_CALL_NOT_IMPLEMENTED) { - win_skip("*W not implemented\n"); - return; - } - ok( (res == ERROR_INSUFFICIENT_BUFFER) && (len >= i), - "returned %u with %u and %u (expected " - "ERROR_INSUFFICIENT_BUFFER and '>= %u')\n", res, GetLastError(), len, i); - - /* test ports "com0" - "com10" */ - for (i = 0; i < 11 ; i++) { - sprintf(bufferA, fmt_comA, i); - MultiByteToWideChar( CP_ACP, 0, bufferA, -1, bufferW, sizeof(bufferW)/sizeof(WCHAR) ); - len = sizeof(pCC); - ZeroMemory(pCC, sizeof(pCC)); - SetLastError(0xdeadbeef); - res = pGetDefaultCommConfigW(bufferW, pCC, &len); - if (i == 0) { - ok( res == ERROR_BADKEY, - "returned %u with %u and %u for %s (expected " - "ERROR_BADKEY)\n", res, GetLastError(), len, bufferA); - } - else - { - ok((res == ERROR_SUCCESS) || (res == ERROR_BADKEY), - "returned %u with %u and %u for %s (expected ERROR_SUCCESS or " - "ERROR_BADKEY)\n", res, GetLastError(), len, bufferA); - } - - /* a name with a colon is invalid */ - if (res == ERROR_SUCCESS) { - lstrcatA(bufferA, str_colonA); - lstrcatW(bufferW, str_colonW); - len = sizeof(pCC); - ZeroMemory(pCC, sizeof(pCC)); - res = pGetDefaultCommConfigW(bufferW, pCC, &len); - ok( res == ERROR_BADKEY, - "returned %u with %u and %u for %s (expected '0' with " - "ERROR_BADKEY)\n", res, GetLastError(), len, bufferA); - } - } - - /* an empty String is not allowed */ - len = sizeof(pCC); - ZeroMemory(pCC, sizeof(pCC)); - SetLastError(0xdeadbeef); - res = pGetDefaultCommConfigW(emptyW, pCC, &len); - ok( res == ERROR_BADKEY, - "returned %u with %u and %u for %s (expected ERROR_BADKEY)\n", - res, GetLastError(), len, emptyA); - - /* some NULL checks */ - len = sizeof(pCC); - ZeroMemory(pCC, sizeof(pCC)); - SetLastError(0xdeadbeef); - res = pGetDefaultCommConfigW(NULL, pCC, &len); - ok( res == ERROR_INVALID_PARAMETER, - "returned %u with %u and %u for NULL (expected ERROR_INVALID_PARAMETER)\n", - res, GetLastError(), len); - - - len = sizeof(pCC); - SetLastError(0xdeadbeef); - res = pGetDefaultCommConfigW(com1W, NULL, &len); - ok( res == ERROR_INVALID_PARAMETER, - "returned %u with %u and %u (expected ERROR_INVALID_PARAMETER)\n", - res, GetLastError(), len); - - - SetLastError(0xdeadbeef); - res = pGetDefaultCommConfigW(com1W, pCC, NULL); - ok( res == ERROR_INVALID_PARAMETER, - "returned %u with %u (expected ERROR_INVALID_PARAMETER)\n", - res, GetLastError()); - -} - -/* ################# */ - -START_TEST(confdlg) -{ - LPCSTR ptr; - - ptr = load_functions(); - if (ptr) { - win_skip("got NULL with %u for %s\n", GetLastError(), ptr); - return; - } - - test_drvCommConfigDialogA(); - test_drvCommConfigDialogW(); - test_drvGetDefaultCommConfigA(); - test_drvGetDefaultCommConfigW(); - -} diff --git a/rostests/winetests/serialui/serialui.rbuild b/rostests/winetests/serialui/serialui.rbuild deleted file mode 100644 index 9c5e14d62ec..00000000000 --- a/rostests/winetests/serialui/serialui.rbuild +++ /dev/null @@ -1,8 +0,0 @@ - - . - - confdlg.c - testlist.c - wine - ntdll - diff --git a/rostests/winetests/serialui/testlist.c b/rostests/winetests/serialui/testlist.c deleted file mode 100644 index f4b05a73b78..00000000000 --- a/rostests/winetests/serialui/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_confdlg(void); - -const struct test winetest_testlist[] = -{ - { "confdlg", func_confdlg }, - { 0, 0 } -}; diff --git a/rostests/winetests/setupapi/CMakeLists.txt b/rostests/winetests/setupapi/CMakeLists.txt deleted file mode 100644 index 2f3ff6e9eb6..00000000000 --- a/rostests/winetests/setupapi/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__) - -list(APPEND SOURCE - devclass.c - devinst.c - install.c - misc.c - parser.c - query.c - setupcab.c - stringtable.c - testlist.c) - -add_executable(setupapi_winetest ${SOURCE}) -target_link_libraries(setupapi_winetest wine) -set_module_type(setupapi_winetest win32cui) -add_importlibs(setupapi_winetest advapi32 setupapi user32 msvcrt kernel32 ntdll) -add_cd_file(TARGET setupapi_winetest DESTINATION reactos/bin FOR all) - -if(NOT MSVC) - add_target_compile_flags(setupapi_winetest "-Wno-format") -endif() diff --git a/rostests/winetests/setupapi/devclass.c b/rostests/winetests/setupapi/devclass.c deleted file mode 100644 index b525c980b57..00000000000 --- a/rostests/winetests/setupapi/devclass.c +++ /dev/null @@ -1,346 +0,0 @@ -/* - * SetupAPI device class-related functions tests - * - * Copyright 2006 Hervé Poussineau - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public Licence as - * published by the Free Software Foundation; either version 2 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 - * General Public License for more details. - * - * You should have received a copy of the GNU 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 - -#undef __ROS_LONG64__ -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winreg.h" -#include "cfgmgr32.h" -#include "setupapi.h" - -#include "wine/test.h" - -static GUID test_class_guid = { 0x4d36e967, 0xe325, 0x11ce, { 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 } }; -static char test_class_name[MAX_CLASS_NAME_LEN] = "DiskDrive"; - -static const char *debugstr_guid(const GUID *guid) -{ - static char guidSTR1[39]; - static char guidSTR2[39]; - char* guidSTR; - static BOOL index; - - if (!guid) return NULL; - - index = !index; - guidSTR = index ? guidSTR1 : guidSTR2; - - snprintf(guidSTR, sizeof(guidSTR1), - "{%08lx-%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]); - return guidSTR; -} - -static void test_SetupDiBuildClassInfoList(void) -{ - LPGUID guid_list = NULL; - DWORD required_size, size; - - SetLastError( 0xdeadbeef ); - ok( !SetupDiBuildClassInfoList( 0, NULL, 0, NULL ), - "Fail expected" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, - "Expected error %lx, got %lx", ERROR_INVALID_PARAMETER, GetLastError() ); - - SetLastError( 0xdeadbeef ); - ok( !SetupDiBuildClassInfoList( 0, NULL, 0, &required_size ), - "Fail expected\n" ); - ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected error %lx, got %lx\n", ERROR_INSUFFICIENT_BUFFER, GetLastError() ); - - guid_list = HeapAlloc( GetProcessHeap(), 0, ( required_size + 1 ) * sizeof( GUID ) ); - if ( !guid_list ) - return; - - SetLastError( 0xdeadbeef ); - ok( SetupDiBuildClassInfoList( 0, guid_list, required_size, &size ), - "Error reported %lx\n", GetLastError() ); - ok( size == required_size, "Expected size %lu, got %lu\n", required_size, size ); - SetLastError( 0xdeadbeef ); - ok( SetupDiBuildClassInfoList( 0, guid_list, required_size + 1, &size ), - "Error reported %lx\n", GetLastError() ); - ok( size == required_size, "Expected size %lu, got %lu\n", required_size, size ); - - if ( size > 0 ) - { - /* That's better to use the first class found, as we know for sure that it exists */ - memcpy(&test_class_guid, &guid_list[0], sizeof( GUID ) ); - SetupDiClassNameFromGuidA( &test_class_guid, test_class_name, sizeof( test_class_name ), NULL ); - } - HeapFree( GetProcessHeap(), 0, guid_list ); -} - -static void test_SetupDiClassGuidsFromNameA(void) -{ - LPGUID guid_list = NULL; - DWORD required_size, size; - - SetLastError( 0xdeadbeef ); - ok( !SetupDiClassGuidsFromNameA( NULL, NULL, 0, NULL ), - "Fail expected\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, - "Expected error %lx, got %lx\n", ERROR_INVALID_PARAMETER, GetLastError() ); - - SetLastError( 0xdeadbeef ); - ok( !SetupDiClassGuidsFromNameA( NULL, NULL, 0, &required_size ), - "Fail expected\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, - "Expected error %lx, got %lx\n", ERROR_INVALID_PARAMETER, GetLastError() ); - - SetLastError( 0xdeadbeef ); - ok( SetupDiClassGuidsFromNameA( "", NULL, 0, &required_size ), - "Error reported %lx\n", GetLastError() ); - ok( required_size == 0, "Expected 0, got %lu\n", required_size ); - - SetLastError( 0xdeadbeef ); - ok( !SetupDiClassGuidsFromNameA( test_class_name, NULL, 0, &required_size ), - "Fail expected\n" ); - ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected error %lx, got %lx\n", ERROR_INSUFFICIENT_BUFFER, GetLastError() ); - ok( required_size > 0, "Expected > 0, got %lu\n", required_size ); - - guid_list = HeapAlloc( GetProcessHeap(), 0, ( required_size + 1 ) * sizeof( GUID ) ); - if ( !guid_list ) - return; - - SetLastError( 0xdeadbeef ); - ok( SetupDiClassGuidsFromNameA( test_class_name, guid_list, required_size, &size ), - "Error reported %lx\n", GetLastError() ); - ok( size == required_size, "Expected size %lu, got %lu\n", required_size, size ); - ok( IsEqualIID( &guid_list[0], &test_class_guid ), - "Expected %s, got %s\n", debugstr_guid( &test_class_guid ), debugstr_guid( &guid_list[0] ) ); - SetLastError( 0xdeadbeef ); - ok( SetupDiClassGuidsFromNameA( test_class_name, guid_list, required_size + 1, &size ), - "Error reported %lx\n", GetLastError() ); - ok( size == required_size, "Expected size %lu, got %lu\n", required_size, size ); - ok( IsEqualIID( &guid_list[0], &test_class_guid ), - "Expected %s, got %s\n", debugstr_guid( &test_class_guid ), debugstr_guid( &guid_list[0] ) ); - - HeapFree( GetProcessHeap(), 0, guid_list ); -} - -static void test_SetupDiClassNameFromGuidA(void) -{ - CHAR* class_name = NULL; - DWORD required_size, size; - - SetLastError( 0xdeadbeef ); - ok( !SetupDiClassNameFromGuidA( NULL, NULL, 0, NULL ), - "Fail expected\n" ); - ok( GetLastError() == ERROR_INVALID_CLASS, - "Expected error %x, got %lx\n", ERROR_INVALID_CLASS, GetLastError() ); - - SetLastError( 0xdeadbeef ); - ok( !SetupDiClassNameFromGuidA( NULL, NULL, 0, &required_size ), - "Fail expected\n" ); - ok( GetLastError() == ERROR_INVALID_CLASS, - "Expected error %x, got %lx\n", ERROR_INVALID_CLASS, GetLastError() ); - - SetLastError( 0xdeadbeef ); - ok( !SetupDiClassNameFromGuidA( &test_class_guid, NULL, 0, &required_size ), - "Fail expected\n" ); - ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected error %lx, got %lx\n", ERROR_INSUFFICIENT_BUFFER, GetLastError() ); - ok( required_size > 0, "Expected > 0, got %lu\n", required_size ); - ok( required_size < MAX_CLASS_NAME_LEN, "Expected < %u, got %lu\n", MAX_CLASS_NAME_LEN, required_size ); - - class_name = HeapAlloc( GetProcessHeap(), 0, required_size ); - if ( !class_name ) - return; - - SetLastError( 0xdeadbeef ); - ok( SetupDiClassNameFromGuidA( &test_class_guid, class_name, required_size, &size ), - "Error reported %lx\n", GetLastError() ); - ok( size == required_size, "Expected size %lu, got %lu\n", required_size, size ); - ok( !strcmp( class_name, test_class_name ), - "Expected %s, got %s\n", test_class_name, class_name ); - SetLastError( 0xdeadbeef ); - ok( SetupDiClassNameFromGuidA( &test_class_guid, class_name, required_size + 1, &size ), - "Error reported %lx\n", GetLastError() ); - ok( size == required_size, "Expected size %lu, got %lu\n", required_size, size ); - ok( !strcmp( class_name, test_class_name ), - "Expected %s, got %s\n", test_class_name, class_name ); - - HeapFree( GetProcessHeap(), 0, class_name ); -} - -static void test_SetupDiGetClassDescriptionA(void) -{ - CHAR* class_desc = NULL; - DWORD required_size, size; - - SetLastError( 0xdeadbeef ); - ok( !SetupDiGetClassDescriptionA( NULL, NULL, 0, NULL ), - "Fail expected\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, - "Expected error %lx, got %lx\n", ERROR_INVALID_PARAMETER, GetLastError() ); - - SetLastError( 0xdeadbeef ); - ok( !SetupDiGetClassDescriptionA( NULL, NULL, 0, &required_size ), - "Fail expected\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, - "Expected error %lx, got %lx\n", ERROR_INVALID_PARAMETER, GetLastError() ); - - SetLastError( 0xdeadbeef ); - ok( !SetupDiGetClassDescriptionA( &test_class_guid, NULL, 0, &required_size ), - "Fail expected\n" ); - ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected error %lx, got %lx\n", ERROR_INSUFFICIENT_BUFFER, GetLastError() ); - ok( required_size > 0, "Expected > 0, got %lu\n", required_size ); - ok( required_size < LINE_LEN, "Expected < %u, got %lu\n", LINE_LEN, required_size ); - - class_desc = HeapAlloc( GetProcessHeap(), 0, required_size ); - if ( !class_desc ) - return; - - SetLastError( 0xdeadbeef ); - ok( SetupDiGetClassDescriptionA( &test_class_guid, class_desc, required_size, &size ), - "Error reported %lx\n", GetLastError() ); - ok( size == required_size, "Expected size %lu, got %lu\n", required_size, size ); - SetLastError( 0xdeadbeef ); - ok( SetupDiGetClassDescriptionA( &test_class_guid, class_desc, required_size + 1, &size ), - "Error reported %lx\n", GetLastError() ); - ok( size == required_size, "Expected size %lu, got %lu\n", required_size, size ); - - HeapFree( GetProcessHeap(), 0, class_desc ); -} - -static void test_SetupDiGetClassDevsA(void) -{ - HDEVINFO device_info; - - SetLastError( 0xdeadbeef ); - device_info = SetupDiGetClassDevs( NULL, NULL, NULL, 0 ); - ok( device_info == INVALID_HANDLE_VALUE, - "Fail expected\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, - "Expected error %lx, got %lx\n", ERROR_INVALID_PARAMETER, GetLastError() ); - - SetLastError( 0xdeadbeef ); - device_info = SetupDiGetClassDevs( NULL, NULL, NULL, DIGCF_ALLCLASSES ); - ok( device_info != INVALID_HANDLE_VALUE, - "Error reported %lx\n", GetLastError() ); - SetLastError( 0xdeadbeef ); - ok( SetupDiDestroyDeviceInfoList( device_info ), - "Error reported %lx\n", GetLastError() ); - - SetLastError( 0xdeadbeef ); - device_info = SetupDiGetClassDevs( NULL, NULL, NULL, DIGCF_DEVICEINTERFACE ); - ok( device_info == INVALID_HANDLE_VALUE, - "Fail expected\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, - "Expected error %lx, got %lx\n", ERROR_INVALID_PARAMETER, GetLastError() ); - - SetLastError( 0xdeadbeef ); - device_info = SetupDiGetClassDevs( &test_class_guid, NULL, NULL, 0 ); - ok( device_info != INVALID_HANDLE_VALUE, - "Error reported %lx\n", GetLastError() ); - SetLastError( 0xdeadbeef ); - ok( SetupDiDestroyDeviceInfoList( device_info ), - "Error reported %lx\n", GetLastError() ); - - SetLastError( 0xdeadbeef ); - device_info = SetupDiGetClassDevs( NULL, "(invalid enumerator)", NULL, DIGCF_ALLCLASSES ); - ok( device_info == INVALID_HANDLE_VALUE, - "Fail expected\n" ); - ok( GetLastError() == ERROR_INVALID_DATA, - "Expected error %lx, got %lx\n", ERROR_INVALID_DATA, GetLastError() ); - - SetLastError( 0xdeadbeef ); - device_info = SetupDiGetClassDevs( NULL, "Root", NULL, DIGCF_ALLCLASSES ); - ok( device_info != INVALID_HANDLE_VALUE, - "Error reported %lx\n", GetLastError() ); - SetLastError( 0xdeadbeef ); - ok( SetupDiDestroyDeviceInfoList( device_info ), - "Error reported %lx\n", GetLastError() ); -} - -static void test_SetupDiOpenClassRegKeyExA(void) -{ - HKEY hkey; - LONG err; - - SetLastError( 0xdeadbeef ); - hkey = SetupDiOpenClassRegKeyExA( NULL, 0, 0, NULL, NULL ); - ok( hkey == INVALID_HANDLE_VALUE, - "Fail expected\n" ); - ok( GetLastError() == ERROR_INVALID_FLAGS, - "Expected error %lx, got %lx\n", ERROR_INVALID_FLAGS, GetLastError() ); - - SetLastError( 0xdeadbeef ); - hkey = SetupDiOpenClassRegKeyExA( NULL, 0, DIOCR_INSTALLER | DIOCR_INTERFACE, NULL, NULL ); - ok( hkey == INVALID_HANDLE_VALUE, - "Fail expected\n" ); - ok( GetLastError() == ERROR_INVALID_FLAGS, - "Expected error %lx, got %lx\n", ERROR_INVALID_FLAGS, GetLastError() ); - - SetLastError( 0xdeadbeef ); - hkey = SetupDiOpenClassRegKeyExA( NULL, 0, DIOCR_INSTALLER, NULL, NULL ); - ok( hkey == INVALID_HANDLE_VALUE, - "Fail expected\n" ); - ok( GetLastError() == ERROR_INVALID_CLASS, - "Expected error %x, got %lx\n", ERROR_INVALID_CLASS, GetLastError() ); - - SetLastError( 0xdeadbeef ); - hkey = SetupDiOpenClassRegKeyExA( NULL, 0, DIOCR_INTERFACE, NULL, NULL ); - ok( hkey == INVALID_HANDLE_VALUE, - "Fail expected\n" ); - ok( GetLastError() == ERROR_INVALID_CLASS, - "Expected error %x, got %lx\n", ERROR_INVALID_CLASS, GetLastError() ); - - SetLastError( 0xdeadbeef ); - hkey = SetupDiOpenClassRegKeyExA( NULL, KEY_QUERY_VALUE, DIOCR_INSTALLER, NULL, NULL ); - ok( hkey != INVALID_HANDLE_VALUE, "Got error %lx\n", GetLastError() ); - err = RegCloseKey( hkey ); - ok( err == ERROR_SUCCESS, "Got error %lx\n", err ); - - SetLastError( 0xdeadbeef ); - hkey = SetupDiOpenClassRegKeyExA( NULL, KEY_QUERY_VALUE, DIOCR_INTERFACE, NULL, NULL ); - ok( hkey != INVALID_HANDLE_VALUE, "Got error %lx\n", GetLastError() ); - err = RegCloseKey( hkey ); - ok( err == ERROR_SUCCESS, "Got error %lx\n", err ); - - SetLastError( 0xdeadbeef ); - hkey = SetupDiOpenClassRegKeyExA( &test_class_guid, KEY_QUERY_VALUE, DIOCR_INSTALLER, NULL, NULL ); - ok( hkey != INVALID_HANDLE_VALUE, "Got error %lx\n", GetLastError() ); - err = RegCloseKey( hkey ); - ok( err == ERROR_SUCCESS, "Got error %lx\n", err ); - - err = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "System\\CurrentControlSet\\Control\\Class", 0, KEY_SET_VALUE, &hkey); - ok( err == ERROR_SUCCESS, "Got error %lx\n", err ); -} - -START_TEST(devclass) -{ - test_SetupDiBuildClassInfoList(); - test_SetupDiClassGuidsFromNameA(); - test_SetupDiClassNameFromGuidA(); - test_SetupDiGetClassDescriptionA(); - test_SetupDiGetClassDevsA(); - test_SetupDiOpenClassRegKeyExA(); -} diff --git a/rostests/winetests/setupapi/devinst.c b/rostests/winetests/setupapi/devinst.c deleted file mode 100644 index 1ae0720198e..00000000000 --- a/rostests/winetests/setupapi/devinst.c +++ /dev/null @@ -1,1384 +0,0 @@ -/* - * Devinst tests - * - * Copyright 2006 Christian Gmeiner - * - * 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 "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winreg.h" -#include "guiddef.h" -#include "setupapi.h" - -#include "wine/test.h" - -/* function pointers */ -static HMODULE hSetupAPI; -static HDEVINFO (WINAPI *pSetupDiCreateDeviceInfoList)(GUID*,HWND); -static HDEVINFO (WINAPI *pSetupDiCreateDeviceInfoListExW)(GUID*,HWND,PCWSTR,PVOID); -static BOOL (WINAPI *pSetupDiCreateDeviceInterfaceA)(HDEVINFO, PSP_DEVINFO_DATA, const GUID *, PCSTR, DWORD, PSP_DEVICE_INTERFACE_DATA); -static BOOL (WINAPI *pSetupDiCallClassInstaller)(DI_FUNCTION, HDEVINFO, PSP_DEVINFO_DATA); -static BOOL (WINAPI *pSetupDiDestroyDeviceInfoList)(HDEVINFO); -static BOOL (WINAPI *pSetupDiEnumDeviceInfo)(HDEVINFO, DWORD, PSP_DEVINFO_DATA); -static BOOL (WINAPI *pSetupDiEnumDeviceInterfaces)(HDEVINFO, PSP_DEVINFO_DATA, const GUID *, DWORD, PSP_DEVICE_INTERFACE_DATA); -static BOOL (WINAPI *pSetupDiInstallClassA)(HWND, PCSTR, DWORD, HSPFILEQ); -static HKEY (WINAPI *pSetupDiOpenClassRegKeyExA)(GUID*,REGSAM,DWORD,PCSTR,PVOID); -static HKEY (WINAPI *pSetupDiOpenDevRegKey)(HDEVINFO, PSP_DEVINFO_DATA, DWORD, DWORD, DWORD, REGSAM); -static HKEY (WINAPI *pSetupDiCreateDevRegKeyW)(HDEVINFO, PSP_DEVINFO_DATA, DWORD, DWORD, DWORD, HINF, PCWSTR); -static BOOL (WINAPI *pSetupDiCreateDeviceInfoA)(HDEVINFO, PCSTR, GUID *, PCSTR, HWND, DWORD, PSP_DEVINFO_DATA); -static BOOL (WINAPI *pSetupDiCreateDeviceInfoW)(HDEVINFO, PCWSTR, GUID *, PCWSTR, HWND, DWORD, PSP_DEVINFO_DATA); -static BOOL (WINAPI *pSetupDiGetDeviceInstanceIdA)(HDEVINFO, PSP_DEVINFO_DATA, PSTR, DWORD, PDWORD); -static BOOL (WINAPI *pSetupDiGetDeviceInterfaceDetailA)(HDEVINFO, PSP_DEVICE_INTERFACE_DATA, PSP_DEVICE_INTERFACE_DETAIL_DATA_A, DWORD, PDWORD, PSP_DEVINFO_DATA); -static BOOL (WINAPI *pSetupDiGetDeviceInterfaceDetailW)(HDEVINFO, PSP_DEVICE_INTERFACE_DATA, PSP_DEVICE_INTERFACE_DETAIL_DATA_W, DWORD, PDWORD, PSP_DEVINFO_DATA); -static BOOL (WINAPI *pSetupDiRegisterDeviceInfo)(HDEVINFO, PSP_DEVINFO_DATA, DWORD, PSP_DETSIG_CMPPROC, PVOID, PSP_DEVINFO_DATA); -static HDEVINFO (WINAPI *pSetupDiGetClassDevsA)(CONST GUID *, LPCSTR, HWND, DWORD); -static HDEVINFO (WINAPI *pSetupDiGetClassDevsW)(CONST GUID *, LPCWSTR, HWND, DWORD); -static BOOL (WINAPI *pSetupDiSetDeviceRegistryPropertyA)(HDEVINFO, PSP_DEVINFO_DATA, DWORD, const BYTE *, DWORD); -static BOOL (WINAPI *pSetupDiSetDeviceRegistryPropertyW)(HDEVINFO, PSP_DEVINFO_DATA, DWORD, const BYTE *, DWORD); -static BOOL (WINAPI *pSetupDiGetDeviceRegistryPropertyA)(HDEVINFO, PSP_DEVINFO_DATA, DWORD, PDWORD, PBYTE, DWORD, PDWORD); -static BOOL (WINAPI *pSetupDiGetDeviceRegistryPropertyW)(HDEVINFO, PSP_DEVINFO_DATA, DWORD, PDWORD, PBYTE, DWORD, PDWORD); - -/* This is a unique guid for testing purposes */ -static GUID guid = {0x6a55b5a4, 0x3f65, 0x11db, {0xb7,0x04,0x00,0x11,0x95,0x5c,0x2b,0xdb}}; - -static void init_function_pointers(void) -{ - hSetupAPI = GetModuleHandleA("setupapi.dll"); - - pSetupDiCreateDeviceInfoA = (void *)GetProcAddress(hSetupAPI, "SetupDiCreateDeviceInfoA"); - pSetupDiCreateDeviceInfoW = (void *)GetProcAddress(hSetupAPI, "SetupDiCreateDeviceInfoW"); - pSetupDiCreateDeviceInfoList = (void *)GetProcAddress(hSetupAPI, "SetupDiCreateDeviceInfoList"); - pSetupDiCreateDeviceInfoListExW = (void *)GetProcAddress(hSetupAPI, "SetupDiCreateDeviceInfoListExW"); - pSetupDiCreateDeviceInterfaceA = (void *)GetProcAddress(hSetupAPI, "SetupDiCreateDeviceInterfaceA"); - pSetupDiDestroyDeviceInfoList = (void *)GetProcAddress(hSetupAPI, "SetupDiDestroyDeviceInfoList"); - pSetupDiCallClassInstaller = (void *)GetProcAddress(hSetupAPI, "SetupDiCallClassInstaller"); - pSetupDiEnumDeviceInfo = (void *)GetProcAddress(hSetupAPI, "SetupDiEnumDeviceInfo"); - pSetupDiEnumDeviceInterfaces = (void *)GetProcAddress(hSetupAPI, "SetupDiEnumDeviceInterfaces"); - pSetupDiGetDeviceInstanceIdA = (void *)GetProcAddress(hSetupAPI, "SetupDiGetDeviceInstanceIdA"); - pSetupDiGetDeviceInterfaceDetailA = (void *)GetProcAddress(hSetupAPI, "SetupDiGetDeviceInterfaceDetailA"); - pSetupDiGetDeviceInterfaceDetailW = (void *)GetProcAddress(hSetupAPI, "SetupDiGetDeviceInterfaceDetailW"); - pSetupDiInstallClassA = (void *)GetProcAddress(hSetupAPI, "SetupDiInstallClassA"); - pSetupDiOpenClassRegKeyExA = (void *)GetProcAddress(hSetupAPI, "SetupDiOpenClassRegKeyExA"); - pSetupDiOpenDevRegKey = (void *)GetProcAddress(hSetupAPI, "SetupDiOpenDevRegKey"); - pSetupDiCreateDevRegKeyW = (void *)GetProcAddress(hSetupAPI, "SetupDiCreateDevRegKeyW"); - pSetupDiRegisterDeviceInfo = (void *)GetProcAddress(hSetupAPI, "SetupDiRegisterDeviceInfo"); - pSetupDiGetClassDevsA = (void *)GetProcAddress(hSetupAPI, "SetupDiGetClassDevsA"); - pSetupDiGetClassDevsW = (void *)GetProcAddress(hSetupAPI, "SetupDiGetClassDevsW"); - pSetupDiSetDeviceRegistryPropertyA = (void *)GetProcAddress(hSetupAPI, "SetupDiSetDeviceRegistryPropertyA"); - pSetupDiSetDeviceRegistryPropertyW = (void *)GetProcAddress(hSetupAPI, "SetupDiSetDeviceRegistryPropertyW"); - pSetupDiGetDeviceRegistryPropertyA = (void *)GetProcAddress(hSetupAPI, "SetupDiGetDeviceRegistryPropertyA"); - pSetupDiGetDeviceRegistryPropertyW = (void *)GetProcAddress(hSetupAPI, "SetupDiGetDeviceRegistryPropertyW"); -} - -static void change_reg_permissions(const WCHAR *regkey) -{ - HKEY hkey; - SID_IDENTIFIER_AUTHORITY ident = { SECURITY_WORLD_SID_AUTHORITY }; - SECURITY_DESCRIPTOR sd; - PSID EveryoneSid; - PACL pacl = NULL; - - RegOpenKeyExW(HKEY_LOCAL_MACHINE, regkey, 0, WRITE_DAC, &hkey); - - /* Initialize the 'Everyone' sid */ - AllocateAndInitializeSid(&ident, 1, SECURITY_WORLD_RID, 0, 0, 0, 0, 0, 0, 0, &EveryoneSid); - - pacl = HeapAlloc(GetProcessHeap(), 0, 256); - InitializeAcl(pacl, 256, ACL_REVISION); - - /* Add 'Full Control' for 'Everyone' */ - AddAccessAllowedAce(pacl, ACL_REVISION, KEY_ALL_ACCESS, EveryoneSid); - - InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION); - - SetSecurityDescriptorDacl(&sd, TRUE, pacl, FALSE); - - /* Set the new security on the registry key */ - RegSetKeySecurity(hkey, DACL_SECURITY_INFORMATION, &sd); - - RegCloseKey(hkey); - - HeapFree(GetProcessHeap(), 0, pacl); - if (EveryoneSid) - FreeSid(EveryoneSid); -} - -static BOOL remove_device(void) -{ - HDEVINFO set; - SP_DEVINFO_DATA devInfo = { sizeof(devInfo), { 0 } }; - BOOL ret; - - SetLastError(0xdeadbeef); - set = pSetupDiGetClassDevsA(&guid, NULL, 0, 0); - ok(set != INVALID_HANDLE_VALUE, "SetupDiGetClassDevsA failed: %08x\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ok(pSetupDiEnumDeviceInfo(set, 0, &devInfo), - "SetupDiEnumDeviceInfo failed: %08x\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = pSetupDiCallClassInstaller(DIF_REMOVE, set, &devInfo); - todo_wine - ok(ret, "SetupDiCallClassInstaller(DIF_REMOVE...) failed: %08x\n", GetLastError()); - - SetLastError(0xdeadbeef); - ok(pSetupDiDestroyDeviceInfoList(set), - "SetupDiDestroyDeviceInfoList failed: %08x\n", GetLastError()); - - return ret; -} - -/* RegDeleteTreeW from dlls/advapi32/registry.c */ -static LSTATUS devinst_RegDeleteTreeW(HKEY hKey, LPCWSTR lpszSubKey) -{ - LONG ret; - DWORD dwMaxSubkeyLen, dwMaxValueLen; - DWORD dwMaxLen, dwSize; - WCHAR szNameBuf[MAX_PATH], *lpszName = szNameBuf; - HKEY hSubKey = hKey; - - if(lpszSubKey) - { - ret = RegOpenKeyExW(hKey, lpszSubKey, 0, KEY_READ, &hSubKey); - if (ret) return ret; - } - - /* Get highest length for keys, values */ - ret = RegQueryInfoKeyW(hSubKey, NULL, NULL, NULL, NULL, - &dwMaxSubkeyLen, NULL, NULL, &dwMaxValueLen, NULL, NULL, NULL); - if (ret) goto cleanup; - - dwMaxSubkeyLen++; - dwMaxValueLen++; - dwMaxLen = max(dwMaxSubkeyLen, dwMaxValueLen); - if (dwMaxLen > sizeof(szNameBuf)/sizeof(WCHAR)) - { - /* Name too big: alloc a buffer for it */ - if (!(lpszName = HeapAlloc( GetProcessHeap(), 0, dwMaxLen*sizeof(WCHAR)))) - { - ret = ERROR_NOT_ENOUGH_MEMORY; - goto cleanup; - } - } - - - /* Recursively delete all the subkeys */ - while (TRUE) - { - dwSize = dwMaxLen; - if (RegEnumKeyExW(hSubKey, 0, lpszName, &dwSize, NULL, - NULL, NULL, NULL)) break; - - ret = devinst_RegDeleteTreeW(hSubKey, lpszName); - if (ret) goto cleanup; - } - - if (lpszSubKey) - ret = RegDeleteKeyW(hKey, lpszSubKey); - else - while (TRUE) - { - dwSize = dwMaxLen; - if (RegEnumValueW(hKey, 0, lpszName, &dwSize, - NULL, NULL, NULL, NULL)) break; - - ret = RegDeleteValueW(hKey, lpszName); - if (ret) goto cleanup; - } - -cleanup: - /* Free buffer if allocated */ - if (lpszName != szNameBuf) - HeapFree( GetProcessHeap(), 0, lpszName); - if(lpszSubKey) - RegCloseKey(hSubKey); - return ret; -} - -static void clean_devclass_key(void) -{ - static const WCHAR devclass[] = {'S','y','s','t','e','m','\\', - 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', - 'C','o','n','t','r','o','l','\\','D','e','v','i','c','e','C','l','a','s','s','e','s','\\', - '{','6','a','5','5','b','5','a','4','-','3','f','6','5','-', - '1','1','d','b','-','b','7','0','4','-', - '0','0','1','1','9','5','5','c','2','b','d','b','}',0}; - HKEY key; - DWORD subkeys; - - /* Check if we have subkeys as Windows 2000 doesn't delete - * the keys under the DeviceClasses key after a SetupDiDestroyDeviceInfoList. - */ - RegOpenKeyW(HKEY_LOCAL_MACHINE, devclass, &key); - RegQueryInfoKey(key, NULL, NULL, NULL, &subkeys, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - if (subkeys > 0) - { - trace("We are most likely on Windows 2000\n"); - devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, devclass); - } - else - { - ok(!RegDeleteKeyW(HKEY_LOCAL_MACHINE, devclass), - "Couldn't delete deviceclass key\n"); - } -} - -static void test_SetupDiCreateDeviceInfoListEx(void) -{ - HDEVINFO devlist; - BOOL ret; - DWORD error; - static CHAR notnull[] = "NotNull"; - static const WCHAR machine[] = { 'd','u','m','m','y',0 }; - - SetLastError(0xdeadbeef); - /* create empty DeviceInfoList, but set Reserved to a value, which is not NULL */ - devlist = pSetupDiCreateDeviceInfoListExW(NULL, NULL, NULL, notnull); - - error = GetLastError(); - if (error == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("SetupDiCreateDeviceInfoListExW is not implemented\n"); - return; - } - ok(devlist == INVALID_HANDLE_VALUE, "SetupDiCreateDeviceInfoListExW failed : %p %d (expected %p)\n", devlist, error, INVALID_HANDLE_VALUE); - ok(error == ERROR_INVALID_PARAMETER, "GetLastError returned wrong value : %d, (expected %d)\n", error, ERROR_INVALID_PARAMETER); - - SetLastError(0xdeadbeef); - /* create empty DeviceInfoList, but set MachineName to something */ - devlist = pSetupDiCreateDeviceInfoListExW(NULL, NULL, machine, NULL); - - error = GetLastError(); - ok(devlist == INVALID_HANDLE_VALUE, "SetupDiCreateDeviceInfoListExW failed : %p %d (expected %p)\n", devlist, error, INVALID_HANDLE_VALUE); - ok(error == ERROR_INVALID_MACHINENAME || error == ERROR_MACHINE_UNAVAILABLE, "GetLastError returned wrong value : %d, (expected %d or %d)\n", error, ERROR_INVALID_MACHINENAME, ERROR_MACHINE_UNAVAILABLE); - - /* create empty DeviceInfoList */ - devlist = pSetupDiCreateDeviceInfoListExW(NULL, NULL, NULL, NULL); - ok(devlist && devlist != INVALID_HANDLE_VALUE, "SetupDiCreateDeviceInfoListExW failed : %p %d (expected != %p)\n", devlist, error, INVALID_HANDLE_VALUE); - - /* destroy DeviceInfoList */ - ret = pSetupDiDestroyDeviceInfoList(devlist); - ok(ret, "SetupDiDestroyDeviceInfoList failed : %d\n", error); -} - -static void test_SetupDiOpenClassRegKeyExA(void) -{ - static const CHAR guidString[] = "{6a55b5a4-3f65-11db-b704-0011955c2bdb}"; - HKEY hkey; - - /* Check return value for nonexistent key */ - hkey = pSetupDiOpenClassRegKeyExA(&guid, KEY_ALL_ACCESS, - DIOCR_INSTALLER, NULL, NULL); - ok(hkey == INVALID_HANDLE_VALUE, - "returned %p (expected INVALID_HANDLE_VALUE)\n", hkey); - - /* Test it for a key that exists */ - hkey = SetupDiOpenClassRegKey(NULL, KEY_ALL_ACCESS); - if (hkey != INVALID_HANDLE_VALUE) - { - HKEY classKey; - if (RegCreateKeyA(hkey, guidString, &classKey) == ERROR_SUCCESS) - { - RegCloseKey(classKey); - SetLastError(0xdeadbeef); - classKey = pSetupDiOpenClassRegKeyExA(&guid, KEY_ALL_ACCESS, - DIOCR_INSTALLER, NULL, NULL); - ok(classKey != INVALID_HANDLE_VALUE, - "opening class registry key failed with error %d\n", - GetLastError()); - if (classKey != INVALID_HANDLE_VALUE) - RegCloseKey(classKey); - RegDeleteKeyA(hkey, guidString); - } - else - trace("failed to create registry key for test\n"); - - RegCloseKey(hkey); - } - else - trace("failed to open classes key\n"); -} - -static void create_inf_file(LPCSTR filename) -{ - DWORD dwNumberOfBytesWritten; - HANDLE hf = CreateFile(filename, GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - - static const char data[] = - "[Version]\n" - "Signature=\"$Chicago$\"\n" - "Class=Bogus\n" - "ClassGUID={6a55b5a4-3f65-11db-b704-0011955c2bdb}\n" - "[ClassInstall32]\n" - "AddReg=BogusClass.NT.AddReg\n" - "[BogusClass.NT.AddReg]\n" - "HKR,,,,\"Wine test devices\"\n"; - - WriteFile(hf, data, sizeof(data) - 1, &dwNumberOfBytesWritten, NULL); - CloseHandle(hf); -} - -static void get_temp_filename(LPSTR path) -{ - static char curr[MAX_PATH] = { 0 }; - char temp[MAX_PATH]; - LPSTR ptr; - - if (!*curr) - GetCurrentDirectoryA(MAX_PATH, curr); - GetTempFileNameA(curr, "set", 0, temp); - ptr = strrchr(temp, '\\'); - - lstrcpyA(path, ptr + 1); -} - -static void testInstallClass(void) -{ - static const WCHAR classKey[] = {'S','y','s','t','e','m','\\', - 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', - 'C','o','n','t','r','o','l','\\','C','l','a','s','s','\\', - '{','6','a','5','5','b','5','a','4','-','3','f','6','5','-', - '1','1','d','b','-','b','7','0','4','-', - '0','0','1','1','9','5','5','c','2','b','d','b','}',0}; - char tmpfile[MAX_PATH]; - BOOL ret; - - tmpfile[0] = '.'; - tmpfile[1] = '\\'; - get_temp_filename(tmpfile + 2); - create_inf_file(tmpfile + 2); - - ret = pSetupDiInstallClassA(NULL, NULL, 0, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); - ret = pSetupDiInstallClassA(NULL, NULL, DI_NOVCP, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); - ret = pSetupDiInstallClassA(NULL, tmpfile + 2, DI_NOVCP, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); - ret = pSetupDiInstallClassA(NULL, tmpfile + 2, 0, NULL); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - /* The next call will succeed. Information is put into the registry but the - * location(s) is/are depending on the Windows version. - */ - ret = pSetupDiInstallClassA(NULL, tmpfile, 0, NULL); - ok(ret, "SetupDiInstallClassA failed: %08x\n", GetLastError()); - - ok(!RegDeleteKeyW(HKEY_LOCAL_MACHINE, classKey), - "Couldn't delete classkey\n"); - - DeleteFile(tmpfile); -} - -static void testCreateDeviceInfo(void) -{ - BOOL ret; - HDEVINFO set; - HKEY key; - LONG res; - static const WCHAR bogus[] = {'S','y','s','t','e','m','\\', - 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', - 'E','n','u','m','\\','R','o','o','t','\\', - 'L','E','G','A','C','Y','_','B','O','G','U','S',0}; - - SetLastError(0xdeadbeef); - ret = pSetupDiCreateDeviceInfoA(NULL, NULL, NULL, NULL, NULL, 0, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_DEVINST_NAME || - GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, - "Unexpected last error, got %08x\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = pSetupDiCreateDeviceInfoA(NULL, "Root\\LEGACY_BOGUS\\0000", NULL, - NULL, NULL, 0, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLEHANDLE, got %08x\n", GetLastError()); - set = pSetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != NULL, "SetupDiCreateDeviceInfoList failed: %08x\n", - GetLastError()); - if (set) - { - SP_DEVINFO_DATA devInfo = { 0 }; - DWORD i; - static GUID deadbeef = - {0xdeadbeef, 0xdead, 0xbeef, {0xde,0xad,0xbe,0xef,0xde,0xad,0xbe,0xef}}; - LONG res; - HKEY key; - static const WCHAR bogus0000[] = {'S','y','s','t','e','m','\\', - 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', - 'E','n','u','m','\\','R','o','o','t','\\', - 'L','E','G','A','C','Y','_','B','O','G','U','S','\\','0','0','0','0',0}; - - /* So we know we have a clean start */ - res = RegOpenKeyW(HKEY_LOCAL_MACHINE, bogus0000, &key); - ok(res != ERROR_SUCCESS, "Expected key to not exist\n"); - /* No GUID given */ - SetLastError(0xdeadbeef); - ret = pSetupDiCreateDeviceInfoA(set, "Root\\LEGACY_BOGUS\\0000", NULL, - NULL, NULL, 0, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); - /* Even though NT4 fails it still adds some stuff to the registry that - * can't be deleted via normal setupapi functions. As the registry is written - * by a different user (SYSTEM) we have to do some magic to get rid of the key - */ - if (!RegOpenKeyW(HKEY_LOCAL_MACHINE, bogus0000, &key)) - { - trace("NT4 created a bogus key on failure, will be removed now\n"); - change_reg_permissions(bogus0000); - ok(!RegDeleteKeyW(HKEY_LOCAL_MACHINE, bogus0000), - "Could not delete LEGACY_BOGUS\\0000 key\n"); - } - /* We can't add device information to the set with a different GUID */ - SetLastError(0xdeadbeef); - ret = pSetupDiCreateDeviceInfoA(set, "Root\\LEGACY_BOGUS\\0000", - &deadbeef, NULL, NULL, 0, NULL); - ok(!ret && GetLastError() == ERROR_CLASS_MISMATCH, - "Expected ERROR_CLASS_MISMATCH, got %08x\n", GetLastError()); - if (!RegOpenKeyW(HKEY_LOCAL_MACHINE, bogus0000, &key)) - { - trace("NT4 created a bogus key on failure, will be removed now\n"); - change_reg_permissions(bogus0000); - ok(!RegDeleteKeyW(HKEY_LOCAL_MACHINE, bogus0000), - "Could not delete LEGACY_BOGUS\\0000 key\n"); - } - /* Finally, with all three required parameters, this succeeds: */ - ret = pSetupDiCreateDeviceInfoA(set, "Root\\LEGACY_BOGUS\\0000", &guid, - NULL, NULL, 0, NULL); - ok(ret, "SetupDiCreateDeviceInfoA failed: %08x\n", GetLastError()); - /* This fails because the device ID already exists.. */ - SetLastError(0xdeadbeef); - ret = pSetupDiCreateDeviceInfoA(set, "Root\\LEGACY_BOGUS\\0000", &guid, - NULL, NULL, 0, &devInfo); - ok(!ret && GetLastError() == ERROR_DEVINST_ALREADY_EXISTS, - "Expected ERROR_DEVINST_ALREADY_EXISTS, got %08x\n", GetLastError()); - /* whereas this "fails" because cbSize is wrong.. */ - SetLastError(0xdeadbeef); - ret = pSetupDiCreateDeviceInfoA(set, "LEGACY_BOGUS", &guid, NULL, NULL, - DICD_GENERATE_ID, &devInfo); - ok(!ret && GetLastError() == ERROR_INVALID_USER_BUFFER, - "Expected ERROR_INVALID_USER_BUFFER, got %08x\n", GetLastError()); - /* and this finally succeeds. */ - devInfo.cbSize = sizeof(devInfo); - ret = pSetupDiCreateDeviceInfoA(set, "LEGACY_BOGUS", &guid, NULL, NULL, - DICD_GENERATE_ID, &devInfo); - ok(ret, "SetupDiCreateDeviceInfoA failed: %08x\n", GetLastError()); - /* There were three devices added, however - the second failure just - * resulted in the SP_DEVINFO_DATA not getting copied. - */ - SetLastError(0xdeadbeef); - i = 0; - while (pSetupDiEnumDeviceInfo(set, i, &devInfo)) - i++; - ok(i == 3, "Expected 3 devices, got %d\n", i); - ok(GetLastError() == ERROR_NO_MORE_ITEMS, - "SetupDiEnumDeviceInfo failed: %08x\n", GetLastError()); - pSetupDiDestroyDeviceInfoList(set); - } - - /* The bogus registry key shouldn't be there after this test. The only - * reasons this key would still be present: - * - * - We are running on Wine which has to be fixed - * - We have leftovers from old tests - */ - res = RegOpenKeyW(HKEY_LOCAL_MACHINE, bogus, &key); - todo_wine - ok(res == ERROR_FILE_NOT_FOUND, "Expected key to not exist\n"); - if (res == ERROR_SUCCESS) - { - DWORD subkeys; - - /* Check if we have subkeys */ - RegQueryInfoKey(key, NULL, NULL, NULL, &subkeys, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - if (subkeys > 0) - { - int i; - - /* Leftovers from old tests */ - trace("Going to remove %d devices\n", subkeys); - for (i = 0; i < subkeys; i++) - { - BOOL ret; - - ret = remove_device(); - ok(ret, "Expected a device to be removed\n"); - } - } - else - { - /* Wine doesn't delete the bogus key itself currently */ - trace("We are most likely on Wine\n"); - RegDeleteKeyW(HKEY_LOCAL_MACHINE, bogus); - } - } -} - -static void testGetDeviceInstanceId(void) -{ - BOOL ret; - HDEVINFO set; - SP_DEVINFO_DATA devInfo = { 0 }; - - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceInstanceIdA(NULL, NULL, NULL, 0, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceInstanceIdA(NULL, &devInfo, NULL, 0, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %08x\n", GetLastError()); - set = pSetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != NULL, "SetupDiCreateDeviceInfoList failed: %08x\n", - GetLastError()); - if (set) - { - char instanceID[MAX_PATH]; - DWORD size; - - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceInstanceIdA(set, NULL, NULL, 0, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceInstanceIdA(set, &devInfo, NULL, 0, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceInstanceIdA(set, &devInfo, NULL, 0, &size); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); - devInfo.cbSize = sizeof(devInfo); - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceInstanceIdA(set, &devInfo, NULL, 0, &size); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); - ret = pSetupDiCreateDeviceInfoA(set, "Root\\LEGACY_BOGUS\\0000", &guid, - NULL, NULL, 0, &devInfo); - ok(ret, "SetupDiCreateDeviceInfoA failed: %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceInstanceIdA(set, &devInfo, NULL, 0, &size); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %08x\n", GetLastError()); - ret = pSetupDiGetDeviceInstanceIdA(set, &devInfo, instanceID, - sizeof(instanceID), NULL); - ok(ret, "SetupDiGetDeviceInstanceIdA failed: %08x\n", GetLastError()); - ok(!lstrcmpA(instanceID, "ROOT\\LEGACY_BOGUS\\0000"), - "Unexpected instance ID %s\n", instanceID); - ret = pSetupDiCreateDeviceInfoA(set, "LEGACY_BOGUS", &guid, - NULL, NULL, DICD_GENERATE_ID, &devInfo); - ok(ret, "SetupDiCreateDeviceInfoA failed: %08x\n", GetLastError()); - ret = pSetupDiGetDeviceInstanceIdA(set, &devInfo, instanceID, - sizeof(instanceID), NULL); - ok(ret, "SetupDiGetDeviceInstanceIdA failed: %08x\n", GetLastError()); - /* NT4 returns 'Root' and W2K and above 'ROOT' */ - ok(!lstrcmpiA(instanceID, "ROOT\\LEGACY_BOGUS\\0001"), - "Unexpected instance ID %s\n", instanceID); - pSetupDiDestroyDeviceInfoList(set); - } -} - -static void testRegisterDeviceInfo(void) -{ - BOOL ret; - HDEVINFO set; - - SetLastError(0xdeadbeef); - ret = pSetupDiRegisterDeviceInfo(NULL, NULL, 0, NULL, NULL, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - set = pSetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != NULL, "SetupDiCreateDeviceInfoList failed: %d\n", GetLastError()); - if (set) - { - SP_DEVINFO_DATA devInfo = { 0 }; - - SetLastError(0xdeadbeef); - ret = pSetupDiRegisterDeviceInfo(set, NULL, 0, NULL, NULL, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiRegisterDeviceInfo(set, &devInfo, 0, NULL, NULL, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - devInfo.cbSize = sizeof(devInfo); - SetLastError(0xdeadbeef); - ret = pSetupDiRegisterDeviceInfo(set, &devInfo, 0, NULL, NULL, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - ret = pSetupDiCreateDeviceInfoA(set, "USB\\BOGUS\\0000", &guid, - NULL, NULL, 0, &devInfo); - ok(ret || GetLastError() == ERROR_DEVINST_ALREADY_EXISTS, - "SetupDiCreateDeviceInfoA failed: %d\n", GetLastError()); - if (ret) - { - /* If it already existed, registering it again will fail */ - ret = pSetupDiRegisterDeviceInfo(set, &devInfo, 0, NULL, NULL, - NULL); - ok(ret, "SetupDiCreateDeviceInfoA failed: %d\n", GetLastError()); - } - /* FIXME: On Win2K+ systems, this is now persisted to registry in - * HKLM\System\CCS\Enum\USB\Bogus\0000. - * FIXME: the key also becomes undeletable. How to get rid of it? - */ - pSetupDiDestroyDeviceInfoList(set); - } -} - -static void testCreateDeviceInterface(void) -{ - BOOL ret; - HDEVINFO set; - HKEY key; - static const WCHAR bogus[] = {'S','y','s','t','e','m','\\', - 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', - 'E','n','u','m','\\','R','o','o','t','\\', - 'L','E','G','A','C','Y','_','B','O','G','U','S',0}; - static const WCHAR devclass[] = {'S','y','s','t','e','m','\\', - 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', - 'C','o','n','t','r','o','l','\\','D','e','v','i','c','e','C','l','a','s','s','e','s','\\', - '{','6','a','5','5','b','5','a','4','-','3','f','6','5','-', - '1','1','d','b','-','b','7','0','4','-', - '0','0','1','1','9','5','5','c','2','b','d','b','}',0}; - - if (!pSetupDiCreateDeviceInterfaceA || !pSetupDiEnumDeviceInterfaces) - { - win_skip("SetupDiCreateDeviceInterfaceA and/or SetupDiEnumDeviceInterfaces are not available\n"); - return; - } - SetLastError(0xdeadbeef); - ret = pSetupDiCreateDeviceInterfaceA(NULL, NULL, NULL, NULL, 0, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiCreateDeviceInterfaceA(NULL, NULL, &guid, NULL, 0, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - set = pSetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != NULL, "SetupDiCreateDeviceInfoList failed: %d\n", GetLastError()); - if (set) - { - SP_DEVINFO_DATA devInfo = { 0 }; - SP_DEVICE_INTERFACE_DATA interfaceData = { sizeof(interfaceData), - { 0 } }; - DWORD i; - - SetLastError(0xdeadbeef); - ret = pSetupDiCreateDeviceInterfaceA(set, NULL, NULL, NULL, 0, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiCreateDeviceInterfaceA(set, &devInfo, NULL, NULL, 0, - NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - devInfo.cbSize = sizeof(devInfo); - ret = pSetupDiCreateDeviceInfoA(set, "ROOT\\LEGACY_BOGUS\\0000", &guid, - NULL, NULL, 0, &devInfo); - ok(ret, "SetupDiCreateDeviceInfoA failed: %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiCreateDeviceInterfaceA(set, &devInfo, NULL, NULL, 0, - NULL); - ok(!ret && GetLastError() == ERROR_INVALID_USER_BUFFER, - "Expected ERROR_INVALID_USER_BUFFER, got %08x\n", GetLastError()); - ret = pSetupDiCreateDeviceInterfaceA(set, &devInfo, &guid, NULL, 0, - NULL); - ok(ret, "SetupDiCreateDeviceInterfaceA failed: %08x\n", GetLastError()); - /* Creating the same interface a second time succeeds */ - ret = pSetupDiCreateDeviceInterfaceA(set, &devInfo, &guid, NULL, 0, - NULL); - ok(ret, "SetupDiCreateDeviceInterfaceA failed: %08x\n", GetLastError()); - ret = pSetupDiCreateDeviceInterfaceA(set, &devInfo, &guid, "Oogah", 0, - NULL); - ok(ret, "SetupDiCreateDeviceInterfaceA failed: %08x\n", GetLastError()); - ret = pSetupDiEnumDeviceInterfaces(set, &devInfo, &guid, 0, - &interfaceData); - ok(ret, "SetupDiEnumDeviceInterfaces failed: %d\n", GetLastError()); - i = 0; - while (pSetupDiEnumDeviceInterfaces(set, &devInfo, &guid, i, - &interfaceData)) - i++; - ok(i == 2, "expected 2 interfaces, got %d\n", i); - ok(GetLastError() == ERROR_NO_MORE_ITEMS, - "SetupDiEnumDeviceInterfaces failed: %08x\n", GetLastError()); - ret = pSetupDiDestroyDeviceInfoList(set); - ok(ret, "SetupDiDestroyDeviceInfoList failed: %08x\n", GetLastError()); - - /* Cleanup */ - /* FIXME: On Wine we still have the bogus entry in Enum\Root and - * subkeys, as well as the deviceclass key with subkeys. - * Only clean the deviceclass key once Wine if fixed. - */ - if (!RegOpenKeyW(HKEY_LOCAL_MACHINE, bogus, &key)) - { - /* Wine doesn't delete the information currently */ - trace("We are most likely on Wine\n"); - devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, bogus); - devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, devclass); - } - else - { - clean_devclass_key(); - } - } -} - -static void testGetDeviceInterfaceDetail(void) -{ - BOOL ret; - HDEVINFO set; - static const WCHAR bogus[] = {'S','y','s','t','e','m','\\', - 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', - 'E','n','u','m','\\','R','o','o','t','\\', - 'L','E','G','A','C','Y','_','B','O','G','U','S',0}; - static const WCHAR devclass[] = {'S','y','s','t','e','m','\\', - 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', - 'C','o','n','t','r','o','l','\\','D','e','v','i','c','e','C','l','a','s','s','e','s','\\', - '{','6','a','5','5','b','5','a','4','-','3','f','6','5','-', - '1','1','d','b','-','b','7','0','4','-', - '0','0','1','1','9','5','5','c','2','b','d','b','}',0}; - - if (!pSetupDiCreateDeviceInterfaceA || !pSetupDiGetDeviceInterfaceDetailA) - { - win_skip("SetupDiCreateDeviceInterfaceA and/or SetupDiGetDeviceInterfaceDetailA are not available\n"); - return; - } - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceInterfaceDetailA(NULL, NULL, NULL, 0, NULL, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - set = pSetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != NULL, "SetupDiCreateDeviceInfoList failed: %d\n", GetLastError()); - if (set) - { - SP_DEVINFO_DATA devInfo = { sizeof(devInfo), { 0 } }; - SP_DEVICE_INTERFACE_DATA interfaceData = { sizeof(interfaceData), - { 0 } }; - DWORD size = 0; - HKEY key; - - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceInterfaceDetailA(set, NULL, NULL, 0, NULL, - NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - ret = pSetupDiCreateDeviceInfoA(set, "ROOT\\LEGACY_BOGUS\\0000", &guid, - NULL, NULL, 0, &devInfo); - ok(ret, "SetupDiCreateDeviceInfoA failed: %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiCreateDeviceInterfaceA(set, &devInfo, &guid, NULL, 0, - &interfaceData); - ok(ret, "SetupDiCreateDeviceInterfaceA failed: %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceInterfaceDetailA(set, &interfaceData, NULL, - 0, NULL, NULL); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceInterfaceDetailA(set, &interfaceData, NULL, - 100, NULL, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_USER_BUFFER, - "Expected ERROR_INVALID_USER_BUFFER, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceInterfaceDetailA(set, &interfaceData, NULL, - 0, &size, NULL); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - if (!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER) - { - static const char path[] = - "\\\\?\\root#legacy_bogus#0000#{6a55b5a4-3f65-11db-b704-0011955c2bdb}"; - static const char path_w2k[] = - "\\\\?\\root#legacy_bogus#0000#{6a55b5a4-3f65-11db-b704-0011955c2bdb}\\"; - LPBYTE buf = HeapAlloc(GetProcessHeap(), 0, size); - SP_DEVICE_INTERFACE_DETAIL_DATA_A *detail = - (SP_DEVICE_INTERFACE_DETAIL_DATA_A *)buf; - DWORD expectedsize = FIELD_OFFSET(SP_DEVICE_INTERFACE_DETAIL_DATA_W, DevicePath) + sizeof(WCHAR)*(1 + strlen(path)); - - detail->cbSize = 0; - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceInterfaceDetailA(set, &interfaceData, detail, - size, &size, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_USER_BUFFER, - "Expected ERROR_INVALID_USER_BUFFER, got %08x\n", GetLastError()); - detail->cbSize = size; - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceInterfaceDetailA(set, &interfaceData, detail, - size, &size, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_USER_BUFFER, - "Expected ERROR_INVALID_USER_BUFFER, got %08x\n", GetLastError()); - detail->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA_A); - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceInterfaceDetailA(set, &interfaceData, detail, - size, &size, NULL); - ok(ret, "SetupDiGetDeviceInterfaceDetailA failed: %d\n", - GetLastError()); - ok(!lstrcmpiA(path, detail->DevicePath) || - !lstrcmpiA(path_w2k, detail->DevicePath), "Unexpected path %s\n", - detail->DevicePath); - /* Check SetupDiGetDeviceInterfaceDetailW */ - ret = pSetupDiGetDeviceInterfaceDetailW(set, &interfaceData, NULL, 0, &size, NULL); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got error code: %d\n", GetLastError()); - ok(expectedsize == size || - (expectedsize + sizeof(WCHAR)) == size /* W2K adds a backslash */, - "SetupDiGetDeviceInterfaceDetailW returned wrong reqsize, got %d\n", - size); - - HeapFree(GetProcessHeap(), 0, buf); - } - pSetupDiDestroyDeviceInfoList(set); - - /* Cleanup */ - /* FIXME: On Wine we still have the bogus entry in Enum\Root and - * subkeys, as well as the deviceclass key with subkeys. - * Only do the RegDeleteKey, once Wine is fixed. - */ - if (!RegOpenKeyW(HKEY_LOCAL_MACHINE, bogus, &key)) - { - /* Wine doesn't delete the information currently */ - trace("We are most likely on Wine\n"); - devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, bogus); - devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, devclass); - } - else - { - clean_devclass_key(); - } - } -} - -static void testDevRegKey(void) -{ - static const WCHAR classKey[] = {'S','y','s','t','e','m','\\', - 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', - 'C','o','n','t','r','o','l','\\','C','l','a','s','s','\\', - '{','6','a','5','5','b','5','a','4','-','3','f','6','5','-', - '1','1','d','b','-','b','7','0','4','-', - '0','0','1','1','9','5','5','c','2','b','d','b','}',0}; - static const WCHAR bogus[] = {'S','y','s','t','e','m','\\', - 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', - 'E','n','u','m','\\','R','o','o','t','\\', - 'L','E','G','A','C','Y','_','B','O','G','U','S',0}; - BOOL ret; - HDEVINFO set; - HKEY key = NULL; - BOOL classKeyCreated; - - SetLastError(0xdeadbeef); - key = pSetupDiCreateDevRegKeyW(NULL, NULL, 0, 0, 0, NULL, NULL); - ok(key == INVALID_HANDLE_VALUE, - "Expected INVALID_HANDLE_VALUE, got %p\n", key); - ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %08x\n", GetLastError()); - - set = pSetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != NULL, "SetupDiCreateDeviceInfoList failed: %d\n", GetLastError()); - if (set) - { - SP_DEVINFO_DATA devInfo = { sizeof(devInfo), { 0 } }; - LONG res; - - /* The device info key shouldn't be there */ - res = RegOpenKeyW(HKEY_LOCAL_MACHINE, bogus, &key); - ok(res != ERROR_SUCCESS, "Expected key to not exist\n"); - RegCloseKey(key); - /* Create the device information */ - ret = pSetupDiCreateDeviceInfoA(set, "ROOT\\LEGACY_BOGUS\\0000", &guid, - NULL, NULL, 0, &devInfo); - ok(ret, "SetupDiCreateDeviceInfoA failed: %08x\n", GetLastError()); - /* The device info key should have been created */ - ok(!RegOpenKeyW(HKEY_LOCAL_MACHINE, bogus, &key), - "Expected registry key to exist\n"); - RegCloseKey(key); - SetLastError(0xdeadbeef); - key = pSetupDiOpenDevRegKey(NULL, NULL, 0, 0, 0, 0); - ok(!key || key == INVALID_HANDLE_VALUE, - "Expected INVALID_HANDLE_VALUE or a NULL key (NT4)\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - SetLastError(0xdeadbeef); - key = pSetupDiOpenDevRegKey(set, NULL, 0, 0, 0, 0); - ok(key == INVALID_HANDLE_VALUE && - GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - SetLastError(0xdeadbeef); - key = pSetupDiOpenDevRegKey(set, &devInfo, 0, 0, 0, 0); - ok(key == INVALID_HANDLE_VALUE && - GetLastError() == ERROR_INVALID_FLAGS, - "Expected ERROR_INVALID_FLAGS, got %d\n", GetLastError()); - SetLastError(0xdeadbeef); - key = pSetupDiOpenDevRegKey(set, &devInfo, DICS_FLAG_GLOBAL, 0, 0, 0); - ok(key == INVALID_HANDLE_VALUE && - GetLastError() == ERROR_INVALID_FLAGS, - "Expected ERROR_INVALID_FLAGS, got %d\n", GetLastError()); - SetLastError(0xdeadbeef); - key = pSetupDiOpenDevRegKey(set, &devInfo, DICS_FLAG_GLOBAL, 0, - DIREG_BOTH, 0); - ok(key == INVALID_HANDLE_VALUE && - GetLastError() == ERROR_INVALID_FLAGS, - "Expected ERROR_INVALID_FLAGS, got %d\n", GetLastError()); - SetLastError(0xdeadbeef); - key = pSetupDiOpenDevRegKey(set, &devInfo, DICS_FLAG_GLOBAL, 0, - DIREG_DRV, 0); - ok(key == INVALID_HANDLE_VALUE && - GetLastError() == ERROR_DEVINFO_NOT_REGISTERED, - "Expected ERROR_DEVINFO_NOT_REGISTERED, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiRegisterDeviceInfo(set, &devInfo, 0, NULL, NULL, NULL); - ok(ret, "SetupDiRegisterDeviceInfo failed: %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - key = pSetupDiOpenDevRegKey(set, &devInfo, DICS_FLAG_GLOBAL, 0, - DIREG_DRV, 0); - /* The software key isn't created by default */ - todo_wine - ok(key == INVALID_HANDLE_VALUE && - GetLastError() == ERROR_KEY_DOES_NOT_EXIST, - "Expected ERROR_KEY_DOES_NOT_EXIST, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - key = pSetupDiOpenDevRegKey(set, &devInfo, DICS_FLAG_GLOBAL, 0, - DIREG_DEV, 0); - todo_wine - ok(key == INVALID_HANDLE_VALUE && - GetLastError() == ERROR_KEY_DOES_NOT_EXIST, - "Expected ERROR_KEY_DOES_NOT_EXIST, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - /* The class key shouldn't be there */ - res = RegOpenKeyW(HKEY_LOCAL_MACHINE, classKey, &key); - todo_wine - ok(res != ERROR_SUCCESS, "Expected key to not exist\n"); - RegCloseKey(key); - /* Create the device reg key */ - key = pSetupDiCreateDevRegKeyW(set, &devInfo, DICS_FLAG_GLOBAL, 0, - DIREG_DRV, NULL, NULL); - /* Vista and higher don't actually create the key */ - ok(key != INVALID_HANDLE_VALUE || GetLastError() == ERROR_KEY_DOES_NOT_EXIST, - "SetupDiCreateDevRegKey failed: %08x\n", GetLastError()); - if (key != INVALID_HANDLE_VALUE) - { - classKeyCreated = TRUE; - RegCloseKey(key); - /* The class key should have been created */ - ok(!RegOpenKeyW(HKEY_LOCAL_MACHINE, classKey, &key), - "Expected registry key to exist\n"); - RegCloseKey(key); - SetLastError(0xdeadbeef); - key = pSetupDiOpenDevRegKey(set, &devInfo, DICS_FLAG_GLOBAL, 0, - DIREG_DRV, 0); - todo_wine - ok(key == INVALID_HANDLE_VALUE && - (GetLastError() == ERROR_INVALID_DATA || - GetLastError() == ERROR_ACCESS_DENIED), /* win2k3 */ - "Expected ERROR_INVALID_DATA or ERROR_ACCESS_DENIED, got %08x\n", GetLastError()); - key = pSetupDiOpenDevRegKey(set, &devInfo, DICS_FLAG_GLOBAL, 0, - DIREG_DRV, KEY_READ); - ok(key != INVALID_HANDLE_VALUE, "SetupDiOpenDevRegKey failed: %08x\n", - GetLastError()); - pSetupDiDestroyDeviceInfoList(set); - } - else - classKeyCreated = FALSE; - - /* Cleanup */ - ret = remove_device(); - todo_wine - ok(ret, "Expected the device to be removed: %08x\n", GetLastError()); - - /* FIXME: Only do the RegDeleteKey, once Wine is fixed */ - if (!ret) - { - /* Wine doesn't delete the information currently */ - trace("We are most likely on Wine\n"); - devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, bogus); - devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, classKey); - } - else if (classKeyCreated) - { - /* There should only be a class key entry, so a simple - * RegDeleteKey should work - * - * This could fail if it's the first time for this new test - * after running the old tests. - */ - ok(!RegDeleteKeyW(HKEY_LOCAL_MACHINE, classKey), - "Couldn't delete classkey\n"); - } - } -} - -static void testRegisterAndGetDetail(void) -{ - HDEVINFO set; - BOOL ret; - SP_DEVINFO_DATA devInfo = { sizeof(SP_DEVINFO_DATA), { 0 } }; - SP_DEVICE_INTERFACE_DATA interfaceData = { sizeof(interfaceData), { 0 } }; - DWORD dwSize = 0; - static const WCHAR bogus[] = {'S','y','s','t','e','m','\\', - 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', - 'E','n','u','m','\\','R','o','o','t','\\', - 'L','E','G','A','C','Y','_','B','O','G','U','S',0}; - static const WCHAR devclass[] = {'S','y','s','t','e','m','\\', - 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', - 'C','o','n','t','r','o','l','\\','D','e','v','i','c','e','C','l','a','s','s','e','s','\\', - '{','6','a','5','5','b','5','a','4','-','3','f','6','5','-', - '1','1','d','b','-','b','7','0','4','-', - '0','0','1','1','9','5','5','c','2','b','d','b','}',0}; - - if (!pSetupDiCreateDeviceInterfaceA || !pSetupDiEnumDeviceInterfaces || - !pSetupDiGetDeviceInterfaceDetailA) - { - win_skip("Needed functions are not available\n"); - return; - } - - SetLastError(0xdeadbeef); - set = pSetupDiGetClassDevsA(&guid, NULL, 0, DIGCF_ALLCLASSES); - ok(set != INVALID_HANDLE_VALUE, "SetupDiGetClassDevsA failed: %08x\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ret = pSetupDiCreateDeviceInfoA(set, "LEGACY_BOGUS", &guid, NULL, 0, - DICD_GENERATE_ID, &devInfo); - ok(ret, "SetupDiCreateDeviceInfoA failed: %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiCreateDeviceInterfaceA(set, &devInfo, &guid, NULL, 0, &interfaceData); - ok(ret, "SetupDiCreateDeviceInterfaceA failed: %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiRegisterDeviceInfo(set, &devInfo, 0, NULL, NULL, NULL); - ok(ret, "SetupDiRegisterDeviceInfo failed: %08x\n", GetLastError()); - - pSetupDiDestroyDeviceInfoList(set); - - SetLastError(0xdeadbeef); - set = pSetupDiGetClassDevsA(&guid, NULL, 0, DIGCF_DEVICEINTERFACE); - ok(set != INVALID_HANDLE_VALUE, "SetupDiGetClassDevsA failed: %08x\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ret = pSetupDiEnumDeviceInterfaces(set, NULL, &guid, 0, &interfaceData); - ok(ret, "SetupDiEnumDeviceInterfaces failed: %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceInterfaceDetailA(set, &interfaceData, NULL, 0, &dwSize, NULL); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %08x\n", GetLastError()); - if (!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER) - { - static const char path[] = - "\\\\?\\root#legacy_bogus#0000#{6a55b5a4-3f65-11db-b704-0011955c2bdb}"; - static const char path_w2k[] = - "\\\\?\\root#legacy_bogus#0000#{6a55b5a4-3f65-11db-b704-0011955c2bdb}\\"; - PSP_DEVICE_INTERFACE_DETAIL_DATA_A detail = NULL; - - detail = HeapAlloc(GetProcessHeap(), 0, dwSize); - if (detail) - { - detail->cbSize = sizeof(*detail); - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceInterfaceDetailA(set, &interfaceData, - detail, dwSize, &dwSize, NULL); - ok(ret, "SetupDiGetDeviceInterfaceDetailA failed: %08x\n", GetLastError()); - /* FIXME: This one only worked because old data wasn't removed properly. As soon - * as all the tests are cleaned up correctly this has to be (or should be) fixed - */ - todo_wine - ok(!lstrcmpiA(path, detail->DevicePath) || - !lstrcmpiA(path_w2k, detail->DevicePath), "Unexpected path %s\n", - detail->DevicePath); - HeapFree(GetProcessHeap(), 0, detail); - } - } - - pSetupDiDestroyDeviceInfoList(set); - - /* Cleanup */ - ret = remove_device(); - todo_wine - ok(ret, "Expected the device to be removed: %08x\n", GetLastError()); - - /* FIXME: Only do the RegDeleteKey, once Wine is fixed */ - if (!ret) - { - /* Wine doesn't delete the information currently */ - trace("We are most likely on Wine\n"); - devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, bogus); - devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, devclass); - } - else - { - clean_devclass_key(); - } -} - -static void testDeviceRegistryPropertyA(void) -{ - HDEVINFO set; - SP_DEVINFO_DATA devInfo = { sizeof(SP_DEVINFO_DATA), { 0 } }; - CHAR devName[] = "LEGACY_BOGUS"; - CHAR friendlyName[] = "Bogus"; - CHAR buf[6] = ""; - DWORD buflen = 6; - DWORD size; - DWORD regType; - BOOL ret; - LONG res; - HKEY key; - static const CHAR bogus[] = - "System\\CurrentControlSet\\Enum\\Root\\LEGACY_BOGUS"; - - SetLastError(0xdeadbeef); - set = pSetupDiGetClassDevsA(&guid, NULL, 0, DIGCF_DEVICEINTERFACE); - ok(set != INVALID_HANDLE_VALUE, "SetupDiGetClassDevsA failed: %08x\n", - GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiCreateDeviceInfoA(set, devName, &guid, NULL, NULL, - DICD_GENERATE_ID, &devInfo); - ok(ret, "SetupDiCreateDeviceInfoA failed: %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiSetDeviceRegistryPropertyA(NULL, NULL, -1, NULL, 0); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiSetDeviceRegistryPropertyA(set, NULL, -1, NULL, 0); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiSetDeviceRegistryPropertyA(set, &devInfo, -1, NULL, 0); - todo_wine - ok(!ret && GetLastError() == ERROR_INVALID_REG_PROPERTY, - "Expected ERROR_INVALID_REG_PROPERTY, got %08x\n", GetLastError()); - /* GetLastError() returns nonsense in win2k3 */ - ret = pSetupDiSetDeviceRegistryPropertyA(set, &devInfo, SPDRP_FRIENDLYNAME, - NULL, 0); - todo_wine - ok(!ret, "Expected failure, got %d\n", ret); - SetLastError(0xdeadbeef); - ret = pSetupDiSetDeviceRegistryPropertyA(set, &devInfo, SPDRP_FRIENDLYNAME, - (PBYTE)friendlyName, buflen); - ok(ret, "SetupDiSetDeviceRegistryPropertyA failed: %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceRegistryPropertyA(NULL, NULL, -1, NULL, NULL, 0, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceRegistryPropertyA(set, NULL, -1, NULL, NULL, 0, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceRegistryPropertyA(set, &devInfo, -1, NULL, NULL, 0, NULL); - todo_wine - ok(!ret && GetLastError() == ERROR_INVALID_REG_PROPERTY, - "Expected ERROR_INVALID_REG_PROPERTY, got %08x\n", GetLastError()); - /* GetLastError() returns nonsense in win2k3 */ - ret = pSetupDiGetDeviceRegistryPropertyA(set, &devInfo, SPDRP_FRIENDLYNAME, - NULL, NULL, buflen, NULL); - ok(!ret, "Expected failure, got %d\n", ret); - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceRegistryPropertyA(set, &devInfo, SPDRP_FRIENDLYNAME, - NULL, NULL, 0, &size); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %08x\n", GetLastError()); - ok(buflen == size, "Unexpected size: %d\n", size); - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceRegistryPropertyA(set, &devInfo, SPDRP_FRIENDLYNAME, - NULL, (PBYTE)buf, buflen, NULL); - ok(ret, "SetupDiGetDeviceRegistryPropertyA failed: %08x\n", GetLastError()); - ok(!lstrcmpiA(friendlyName, buf), "Unexpected property\n"); - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceRegistryPropertyA(set, &devInfo, SPDRP_FRIENDLYNAME, - ®Type, (PBYTE)buf, buflen, NULL); - ok(ret, "SetupDiGetDeviceRegistryPropertyA failed: %08x\n", GetLastError()); - ok(!lstrcmpiA(friendlyName, buf), "Unexpected value of property\n"); - ok(regType == REG_SZ, "Unexpected type of property: %d\n", regType); - SetLastError(0xdeadbeef); - ret = pSetupDiSetDeviceRegistryPropertyA(set, &devInfo, SPDRP_FRIENDLYNAME, - NULL, 0); - ok(ret, "SetupDiSetDeviceRegistryPropertyA failed: %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceRegistryPropertyA(set, &devInfo, SPDRP_FRIENDLYNAME, - NULL, (PBYTE)buf, buflen, &size); - todo_wine - ok(!ret && GetLastError() == ERROR_INVALID_DATA, - "Expected ERROR_INVALID_DATA, got %08x\n", GetLastError()); - pSetupDiDestroyDeviceInfoList(set); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, bogus, &key); - todo_wine - ok(res == ERROR_FILE_NOT_FOUND, "Expected key to not exist\n"); - /* FIXME: Remove when Wine is fixed */ - if (res == ERROR_SUCCESS) - { - /* Wine doesn't delete the information currently */ - trace("We are most likely on Wine\n"); - RegDeleteKeyA(HKEY_LOCAL_MACHINE, bogus); - } -} - -static void testDeviceRegistryPropertyW(void) -{ - HDEVINFO set; - SP_DEVINFO_DATA devInfo = { sizeof(SP_DEVINFO_DATA), { 0 } }; - WCHAR devName[] = {'L','E','G','A','C','Y','_','B','O','G','U','S',0}; - WCHAR friendlyName[] = {'B','o','g','u','s',0}; - WCHAR buf[6] = {0}; - DWORD buflen = 6 * sizeof(WCHAR); - DWORD size; - DWORD regType; - BOOL ret; - LONG res; - HKEY key; - static const WCHAR bogus[] = {'S','y','s','t','e','m','\\', - 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', - 'E','n','u','m','\\','R','o','o','t','\\', - 'L','E','G','A','C','Y','_','B','O','G','U','S',0}; - - SetLastError(0xdeadbeef); - set = pSetupDiGetClassDevsW(&guid, NULL, 0, DIGCF_DEVICEINTERFACE); - ok(set != INVALID_HANDLE_VALUE, "SetupDiGetClassDevsW failed: %08x\n", - GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiCreateDeviceInfoW(set, devName, &guid, NULL, NULL, - DICD_GENERATE_ID, &devInfo); - ok(ret, "SetupDiCreateDeviceInfoW failed: %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiSetDeviceRegistryPropertyW(NULL, NULL, -1, NULL, 0); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiSetDeviceRegistryPropertyW(set, NULL, -1, NULL, 0); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiSetDeviceRegistryPropertyW(set, &devInfo, -1, NULL, 0); - todo_wine - ok(!ret && GetLastError() == ERROR_INVALID_REG_PROPERTY, - "Expected ERROR_INVALID_REG_PROPERTY, got %08x\n", GetLastError()); - /* GetLastError() returns nonsense in win2k3 */ - ret = pSetupDiSetDeviceRegistryPropertyW(set, &devInfo, SPDRP_FRIENDLYNAME, - NULL, 0); - todo_wine - ok(!ret, "Expected failure, got %d\n", ret); - SetLastError(0xdeadbeef); - ret = pSetupDiSetDeviceRegistryPropertyW(set, &devInfo, SPDRP_FRIENDLYNAME, - (PBYTE)friendlyName, buflen); - ok(ret, "SetupDiSetDeviceRegistryPropertyW failed: %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceRegistryPropertyW(NULL, NULL, -1, NULL, NULL, 0, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, - "Expected ERROR_INVALID_HANDLE, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceRegistryPropertyW(set, NULL, -1, NULL, NULL, 0, NULL); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceRegistryPropertyW(set, &devInfo, -1, NULL, NULL, 0, NULL); - todo_wine - ok(!ret && GetLastError() == ERROR_INVALID_REG_PROPERTY, - "Expected ERROR_INVALID_REG_PROPERTY, got %08x\n", GetLastError()); - /* GetLastError() returns nonsense in win2k3 */ - ret = pSetupDiGetDeviceRegistryPropertyW(set, &devInfo, SPDRP_FRIENDLYNAME, - NULL, NULL, buflen, NULL); - ok(!ret, "Expected failure, got %d\n", ret); - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceRegistryPropertyW(set, &devInfo, SPDRP_FRIENDLYNAME, - NULL, NULL, 0, &size); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %08x\n", GetLastError()); - ok(buflen == size, "Unexpected size: %d\n", size); - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceRegistryPropertyW(set, &devInfo, SPDRP_FRIENDLYNAME, - NULL, (PBYTE)buf, buflen, NULL); - ok(ret, "SetupDiGetDeviceRegistryPropertyW failed: %08x\n", GetLastError()); - ok(!lstrcmpiW(friendlyName, buf), "Unexpected property\n"); - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceRegistryPropertyW(set, &devInfo, SPDRP_FRIENDLYNAME, - ®Type, (PBYTE)buf, buflen, NULL); - ok(ret, "SetupDiGetDeviceRegistryPropertyW failed: %08x\n", GetLastError()); - ok(!lstrcmpiW(friendlyName, buf), "Unexpected value of property\n"); - ok(regType == REG_SZ, "Unexpected type of property: %d\n", regType); - SetLastError(0xdeadbeef); - ret = pSetupDiSetDeviceRegistryPropertyW(set, &devInfo, SPDRP_FRIENDLYNAME, - NULL, 0); - ok(ret, "SetupDiSetDeviceRegistryPropertyW failed: %08x\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = pSetupDiGetDeviceRegistryPropertyW(set, &devInfo, SPDRP_FRIENDLYNAME, - NULL, (PBYTE)buf, buflen, &size); - todo_wine - ok(!ret && GetLastError() == ERROR_INVALID_DATA, - "Expected ERROR_INVALID_DATA, got %08x\n", GetLastError()); - pSetupDiDestroyDeviceInfoList(set); - - res = RegOpenKeyW(HKEY_LOCAL_MACHINE, bogus, &key); - todo_wine - ok(res == ERROR_FILE_NOT_FOUND, "Expected key to not exist\n"); - /* FIXME: Remove when Wine is fixed */ - if (res == ERROR_SUCCESS) - { - /* Wine doesn't delete the information currently */ - trace("We are most likely on Wine\n"); - RegDeleteKeyW(HKEY_LOCAL_MACHINE, bogus); - } -} - -START_TEST(devinst) -{ - HDEVINFO set; - - init_function_pointers(); - - /* Win9x/WinMe does things totally different so we skip all the tests - * - * We don't want to exclude NT4 so hence this check. - */ - SetLastError(0xdeadbeef); - set = pSetupDiGetClassDevsW(NULL, NULL, 0, 0); - if (set == INVALID_HANDLE_VALUE && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("Win9x/WinMe has totally different behavior\n"); - return; - } - - if (pSetupDiCreateDeviceInfoListExW) - test_SetupDiCreateDeviceInfoListEx(); - else - win_skip("SetupDiCreateDeviceInfoListExW is not available\n"); - - if (pSetupDiOpenClassRegKeyExA) - test_SetupDiOpenClassRegKeyExA(); - else - win_skip("SetupDiOpenClassRegKeyExA is not available\n"); - - testInstallClass(); - testCreateDeviceInfo(); - testGetDeviceInstanceId(); - testRegisterDeviceInfo(); - testCreateDeviceInterface(); - testGetDeviceInterfaceDetail(); - testDevRegKey(); - testRegisterAndGetDetail(); - testDeviceRegistryPropertyA(); - testDeviceRegistryPropertyW(); -} diff --git a/rostests/winetests/setupapi/install.c b/rostests/winetests/setupapi/install.c deleted file mode 100644 index f5df3df2e7b..00000000000 --- a/rostests/winetests/setupapi/install.c +++ /dev/null @@ -1,762 +0,0 @@ -/* - * Unit test for setupapi.dll install functions - * - * Copyright 2007 Misha Koshelev - * - * 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 "windef.h" -#include "winbase.h" -#include "winnls.h" -#include "winuser.h" -#include "winreg.h" -#include "winsvc.h" -#include "setupapi.h" -#include "shlobj.h" - -#include "wine/test.h" - -static const char inffile[] = "test.inf"; -static const WCHAR inffileW[] = {'t','e','s','t','.','i','n','f',0}; -static char CURR_DIR[MAX_PATH]; - -/* Notes on InstallHinfSectionA/W: - * - InstallHinfSectionW on Win98 and InstallHinfSectionA on WinXP seem to be stubs - they do not do anything - * and simply return without displaying any error message or setting last error. We test whether - * InstallHinfSectionA sets last error, and if it doesn't we set it to NULL and use the W version if available. - * - These functions do not return a value and do not always set last error to ERROR_SUCCESS when installation still - * occurs (e.g., unquoted inf file with spaces, registry keys are written but last error is 6). Also, on Win98 last error - * is set to ERROR_SUCCESS even if install fails (e.g., quoted inf file with spaces, no registry keys set, MessageBox with - * "Installation Error" displayed). Thus, we must use functional tests (e.g., is registry key created) to determine whether - * or not installation occurred. - * - On installation problems, a MessageBox() is displayed and a Beep() is issued. The MessageBox() is disabled with a - * CBT hook. - */ - -static void (WINAPI *pInstallHinfSectionA)(HWND, HINSTANCE, LPCSTR, INT); -static void (WINAPI *pInstallHinfSectionW)(HWND, HINSTANCE, LPCWSTR, INT); -static BOOL (WINAPI *pSetupGetInfFileListA)(PCSTR, DWORD, PSTR, DWORD, PDWORD); -static BOOL (WINAPI *pSetupGetInfFileListW)(PCWSTR, DWORD, PWSTR, DWORD, PDWORD); - -/* - * Helpers - */ - -static void create_inf_file(LPCSTR filename, const char *data) -{ - DWORD res; - HANDLE handle = CreateFile(filename, GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - assert(handle != INVALID_HANDLE_VALUE); - assert(WriteFile(handle, data, strlen(data), &res, NULL)); - CloseHandle(handle); -} - -/* CBT hook to ensure a window (e.g., MessageBox) cannot be created */ -static HHOOK hhook; -static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam) -{ - return nCode == HCBT_CREATEWND ? 1: CallNextHookEx(hhook, nCode, wParam, lParam); -} - -/* - * Tests - */ - -static const char *cmdline_inf = "[Version]\n" - "Signature=\"$Chicago$\"\n" - "[DefaultInstall]\n" - "AddReg=Add.Settings\n" - "[Add.Settings]\n" - "HKCU,Software\\Wine\\setupapitest,,\n"; - -static void run_cmdline(LPCSTR section, int mode, LPCSTR path) -{ - CHAR cmdline[MAX_PATH * 2]; - - sprintf(cmdline, "%s %d %s", section, mode, path); - if (pInstallHinfSectionA) pInstallHinfSectionA(NULL, NULL, cmdline, 0); - else - { - WCHAR cmdlinew[MAX_PATH * 2]; - MultiByteToWideChar(CP_ACP, 0, cmdline, -1, cmdlinew, MAX_PATH*2); - pInstallHinfSectionW(NULL, NULL, cmdlinew, 0); - } -} - -static void ok_registry(BOOL expectsuccess) -{ - LONG ret; - - /* Functional tests for success of install and clean up */ - ret = RegDeleteKey(HKEY_CURRENT_USER, "Software\\Wine\\setupapitest"); - ok((expectsuccess && ret == ERROR_SUCCESS) || - (!expectsuccess && ret == ERROR_FILE_NOT_FOUND), - "Expected registry key Software\\Wine\\setupapitest to %s, RegDeleteKey returned %d\n", - expectsuccess ? "exist" : "not exist", - ret); -} - -/* Test command line processing */ -static void test_cmdline(void) -{ - static const char infwithspaces[] = "test file.inf"; - char path[MAX_PATH]; - - create_inf_file(inffile, cmdline_inf); - sprintf(path, "%s\\%s", CURR_DIR, inffile); - run_cmdline("DefaultInstall", 128, path); - ok_registry(TRUE); - ok(DeleteFile(inffile), "Expected source inf to exist, last error was %d\n", GetLastError()); - - /* Test handling of spaces in path, unquoted and quoted */ - create_inf_file(infwithspaces, cmdline_inf); - - sprintf(path, "%s\\%s", CURR_DIR, infwithspaces); - run_cmdline("DefaultInstall", 128, path); - ok_registry(TRUE); - - sprintf(path, "\"%s\\%s\"", CURR_DIR, infwithspaces); - run_cmdline("DefaultInstall", 128, path); - ok_registry(FALSE); - - ok(DeleteFile(infwithspaces), "Expected source inf to exist, last error was %d\n", GetLastError()); -} - -static const char *cmdline_inf_reg = "[Version]\n" - "Signature=\"$Chicago$\"\n" - "[DefaultInstall]\n" - "DelReg=Del.Settings\n" - "[Del.Settings]\n" - "HKCU,Software\\Wine\\setupapitest\n"; - -static void test_registry(void) -{ - HKEY key; - LONG res; - char path[MAX_PATH]; - - /* First create a registry structure we would like to be deleted */ - ok(!RegCreateKeyA(HKEY_CURRENT_USER, "Software\\Wine\\setupapitest\\setupapitest", &key), - "Expected RegCreateKeyA to succeed\n"); - - /* Doublecheck if the registry key is present */ - ok(!RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Wine\\setupapitest\\setupapitest", &key), - "Expected registry key to exist\n"); - - create_inf_file(inffile, cmdline_inf_reg); - sprintf(path, "%s\\%s", CURR_DIR, inffile); - run_cmdline("DefaultInstall", 128, path); - - /* Check if the registry key is recursively deleted */ - res = RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Wine\\setupapitest", &key); - todo_wine - ok(res == ERROR_FILE_NOT_FOUND, "Didn't expect the registry key to exist\n"); - /* Just in case */ - if (res == ERROR_SUCCESS) - { - RegDeleteKeyA(HKEY_CURRENT_USER, "Software\\Wine\\setupapitest\\setupapitest"); - RegDeleteKeyA(HKEY_CURRENT_USER, "Software\\Wine\\setupapitest"); - } - ok(DeleteFile(inffile), "Expected source inf to exist, last error was %d\n", GetLastError()); -} - -static void test_install_svc_from(void) -{ - char inf[2048]; - char path[MAX_PATH]; - HINF infhandle; - BOOL ret; - SC_HANDLE scm_handle, svc_handle; - - /* Bail out if we are on win98 */ - SetLastError(0xdeadbeef); - scm_handle = OpenSCManagerA(NULL, NULL, GENERIC_ALL); - - if (!scm_handle && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) - { - win_skip("OpenSCManagerA is not implemented, we are most likely on win9x\n"); - return; - } - CloseServiceHandle(scm_handle); - - /* Basic inf file to satisfy SetupOpenInfFileA */ - strcpy(inf, "[Version]\nSignature=\"$Chicago$\"\n"); - create_inf_file(inffile, inf); - sprintf(path, "%s\\%s", CURR_DIR, inffile); - infhandle = SetupOpenInfFileA(path, NULL, INF_STYLE_WIN4, NULL); - - /* Nothing but the Version section */ - SetLastError(0xdeadbeef); - ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_SECTION_NOT_FOUND, - "Expected ERROR_SECTION_NOT_FOUND, got %08x\n", GetLastError()); - SetupCloseInfFile(infhandle); - DeleteFile(inffile); - - /* Add the section */ - strcat(inf, "[Winetest.Services]\n"); - create_inf_file(inffile, inf); - infhandle = SetupOpenInfFileA(path, NULL, INF_STYLE_WIN4, NULL); - SetLastError(0xdeadbeef); - ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_SECTION_NOT_FOUND, - "Expected ERROR_SECTION_NOT_FOUND, got %08x\n", GetLastError()); - SetupCloseInfFile(infhandle); - DeleteFile(inffile); - - /* Add a reference */ - strcat(inf, "AddService=Winetest,,Winetest.Service\n"); - create_inf_file(inffile, inf); - infhandle = SetupOpenInfFileA(path, NULL, INF_STYLE_WIN4, NULL); - SetLastError(0xdeadbeef); - ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_BAD_SERVICE_INSTALLSECT, - "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n", GetLastError()); - SetupCloseInfFile(infhandle); - DeleteFile(inffile); - - /* Add the section */ - strcat(inf, "[Winetest.Service]\n"); - create_inf_file(inffile, inf); - infhandle = SetupOpenInfFileA(path, NULL, INF_STYLE_WIN4, NULL); - SetLastError(0xdeadbeef); - ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_BAD_SERVICE_INSTALLSECT, - "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n", GetLastError()); - SetupCloseInfFile(infhandle); - DeleteFile(inffile); - - /* Just the ServiceBinary */ - strcat(inf, "ServiceBinary=%12%\\winetest.sys\n"); - create_inf_file(inffile, inf); - infhandle = SetupOpenInfFileA(path, NULL, INF_STYLE_WIN4, NULL); - SetLastError(0xdeadbeef); - ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_BAD_SERVICE_INSTALLSECT, - "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n", GetLastError()); - SetupCloseInfFile(infhandle); - DeleteFile(inffile); - - /* Add the ServiceType */ - strcat(inf, "ServiceType=1\n"); - create_inf_file(inffile, inf); - infhandle = SetupOpenInfFileA(path, NULL, INF_STYLE_WIN4, NULL); - SetLastError(0xdeadbeef); - ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_BAD_SERVICE_INSTALLSECT, - "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n", GetLastError()); - SetupCloseInfFile(infhandle); - DeleteFile(inffile); - - /* Add the StartType */ - strcat(inf, "StartType=4\n"); - create_inf_file(inffile, inf); - infhandle = SetupOpenInfFileA(path, NULL, INF_STYLE_WIN4, NULL); - SetLastError(0xdeadbeef); - ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_BAD_SERVICE_INSTALLSECT, - "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n", GetLastError()); - SetupCloseInfFile(infhandle); - DeleteFile(inffile); - - /* This should be it, the minimal entries to install a service */ - strcat(inf, "ErrorControl=1"); - create_inf_file(inffile, inf); - infhandle = SetupOpenInfFileA(path, NULL, INF_STYLE_WIN4, NULL); - SetLastError(0xdeadbeef); - ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); - if (!ret && GetLastError() == ERROR_ACCESS_DENIED) - { - skip("Not enough rights to install the service\n"); - SetupCloseInfFile(infhandle); - DeleteFile(inffile); - return; - } - ok(ret, "Expected success\n"); - ok(GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got %08x\n", GetLastError()); - SetupCloseInfFile(infhandle); - DeleteFile(inffile); - - scm_handle = OpenSCManagerA(NULL, NULL, GENERIC_ALL); - - /* Open the service to see if it's really there */ - svc_handle = OpenServiceA(scm_handle, "Winetest", DELETE); - ok(svc_handle != NULL, "Service was not created\n"); - - SetLastError(0xdeadbeef); - ret = DeleteService(svc_handle); - ok(ret, "Service could not be deleted : %d\n", GetLastError()); - - CloseServiceHandle(svc_handle); - CloseServiceHandle(scm_handle); - - /* TODO: Test the Flags */ -} - -static void test_driver_install(void) -{ - HANDLE handle; - SC_HANDLE scm_handle, svc_handle; - BOOL ret; - char path[MAX_PATH], windir[MAX_PATH], driver[MAX_PATH]; - DWORD attrs; - /* Minimal stuff needed */ - static const char *inf = - "[Version]\n" - "Signature=\"$Chicago$\"\n" - "[DestinationDirs]\n" - "Winetest.DriverFiles=12\n" - "[DefaultInstall]\n" - "CopyFiles=Winetest.DriverFiles\n" - "[DefaultInstall.Services]\n" - "AddService=Winetest,,Winetest.Service\n" - "[Winetest.Service]\n" - "ServiceBinary=%12%\\winetest.sys\n" - "ServiceType=1\n" - "StartType=4\n" - "ErrorControl=1\n" - "[Winetest.DriverFiles]\n" - "winetest.sys"; - - /* Bail out if we are on win98 */ - SetLastError(0xdeadbeef); - scm_handle = OpenSCManagerA(NULL, NULL, GENERIC_ALL); - - if (!scm_handle && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) - { - win_skip("OpenSCManagerA is not implemented, we are most likely on win9x\n"); - return; - } - else if (!scm_handle && (GetLastError() == ERROR_ACCESS_DENIED)) - { - skip("Not enough rights to install the service\n"); - return; - } - CloseServiceHandle(scm_handle); - - /* Place where we expect the driver to be installed */ - GetWindowsDirectoryA(windir, MAX_PATH); - lstrcpyA(driver, windir); - lstrcatA(driver, "\\system32\\drivers\\winetest.sys"); - - /* Create a dummy driver file */ - handle = CreateFileA("winetest.sys", GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - CloseHandle(handle); - - create_inf_file(inffile, inf); - sprintf(path, "%s\\%s", CURR_DIR, inffile); - run_cmdline("DefaultInstall", 128, path); - - /* Driver should have been installed */ - attrs = GetFileAttributes(driver); - ok(attrs != INVALID_FILE_ATTRIBUTES, "Expected driver to exist\n"); - - scm_handle = OpenSCManagerA(NULL, NULL, GENERIC_ALL); - - /* Open the service to see if it's really there */ - svc_handle = OpenServiceA(scm_handle, "Winetest", DELETE); - ok(svc_handle != NULL, "Service was not created\n"); - - SetLastError(0xdeadbeef); - ret = DeleteService(svc_handle); - ok(ret, "Service could not be deleted : %d\n", GetLastError()); - - CloseServiceHandle(svc_handle); - CloseServiceHandle(scm_handle); - - /* File cleanup */ - DeleteFile(inffile); - DeleteFile("winetest.sys"); - DeleteFile(driver); -} - -static void test_profile_items(void) -{ - char path[MAX_PATH], commonprogs[MAX_PATH]; - HMODULE hShell32; - BOOL (WINAPI *pSHGetFolderPathA)(HWND hwnd, int nFolder, HANDLE hToken, DWORD dwFlags, LPSTR pszPath); - - static const char *inf = - "[Version]\n" - "Signature=\"$Chicago$\"\n" - "[DefaultInstall]\n" - "ProfileItems=TestItem,TestItem2,TestGroup\n" - "[TestItem]\n" - "Name=TestItem\n" - "CmdLine=11,,notepad.exe\n" - "[TestItem2]\n" - "Name=TestItem2\n" - "CmdLine=11,,notepad.exe\n" - "SubDir=TestDir\n" - "[TestGroup]\n" - "Name=TestGroup,4\n" - ; - - hShell32 = LoadLibraryA("shell32"); - pSHGetFolderPathA = (void*)GetProcAddress(hShell32, "SHGetFolderPathA"); - if (!pSHGetFolderPathA) - { - win_skip("SHGetFolderPathA is not available\n"); - goto cleanup; - } - - if (S_OK != pSHGetFolderPathA(NULL, CSIDL_COMMON_PROGRAMS, NULL, SHGFP_TYPE_CURRENT, commonprogs)) - { - skip("No common program files directory exists\n"); - goto cleanup; - } - - create_inf_file(inffile, inf); - sprintf(path, "%s\\%s", CURR_DIR, inffile); - run_cmdline("DefaultInstall", 128, path); - - snprintf(path, MAX_PATH, "%s\\TestItem.lnk", commonprogs); - if (INVALID_FILE_ATTRIBUTES == GetFileAttributes(path)) - { - win_skip("ProfileItems not implemented on this system\n"); - } - else - { - snprintf(path, MAX_PATH, "%s\\TestDir", commonprogs); - ok(INVALID_FILE_ATTRIBUTES != GetFileAttributes(path), "directory not created\n"); - snprintf(path, MAX_PATH, "%s\\TestDir\\TestItem2.lnk", commonprogs); - ok(INVALID_FILE_ATTRIBUTES != GetFileAttributes(path), "link not created\n"); - snprintf(path, MAX_PATH, "%s\\TestGroup", commonprogs); - ok(INVALID_FILE_ATTRIBUTES != GetFileAttributes(path), "group not created\n"); - } - - snprintf(path, MAX_PATH, "%s\\TestItem.lnk", commonprogs); - DeleteFile(path); - snprintf(path, MAX_PATH, "%s\\TestDir\\TestItem2.lnk", commonprogs); - DeleteFile(path); - snprintf(path, MAX_PATH, "%s\\TestItem2.lnk", commonprogs); - DeleteFile(path); - snprintf(path, MAX_PATH, "%s\\TestDir", commonprogs); - RemoveDirectory(path); - snprintf(path, MAX_PATH, "%s\\TestGroup", commonprogs); - RemoveDirectory(path); - -cleanup: - if (hShell32) FreeLibrary(hShell32); - DeleteFile(inffile); -} - -static void test_inffilelistA(void) -{ - static const char inffile2[] = "test2.inf"; - static const char *inf = - "[Version]\n" - "Signature=\"$Chicago$\""; - - char buffer[MAX_PATH] = { 0 }; - char dir[MAX_PATH], *p; - DWORD expected, outsize; - BOOL ret; - - if(!pSetupGetInfFileListA) - { - win_skip("SetupGetInfFileListA not present\n"); - return; - } - - /* create a private directory, the temp directory may contain some - * inf files left over from old installations - */ - if (!GetTempFileNameA(CURR_DIR, "inftest", 1, dir)) - { - win_skip("GetTempFileNameA failed with error %d\n", GetLastError()); - return; - } - if (!CreateDirectoryA(dir, NULL )) - { - win_skip("CreateDirectoryA(%s) failed with error %d\n", dir, GetLastError()); - return; - } - if (!SetCurrentDirectoryA(dir)) - { - win_skip("SetCurrentDirectoryA failed with error %d\n", GetLastError()); - RemoveDirectoryA(dir); - return; - } - - create_inf_file(inffile, inf); - create_inf_file(inffile2, inf); - - /* mixed style - */ - expected = 3 + strlen(inffile) + strlen(inffile2); - ret = pSetupGetInfFileListA(dir, INF_STYLE_OLDNT | INF_STYLE_WIN4, buffer, - MAX_PATH, &outsize); - ok(ret, "expected SetupGetInfFileListA to succeed!\n"); - ok(expected == outsize, "expected required buffersize to be %d, got %d\n", - expected, outsize); - for(p = buffer; lstrlenA(p) && (outsize > (p - buffer)); p+=lstrlenA(p) + 1) - ok(!lstrcmpA(p,inffile2) || !lstrcmpA(p,inffile), - "unexpected filename %s\n",p); - - DeleteFile(inffile); - DeleteFile(inffile2); - SetCurrentDirectoryA(CURR_DIR); - RemoveDirectoryA(dir); -} - -static void test_inffilelist(void) -{ - static const char inffile2[] = "test2.inf"; - static const WCHAR inffile2W[] = {'t','e','s','t','2','.','i','n','f',0}; - static const char invalid_inf[] = "invalid.inf"; - static const WCHAR invalid_infW[] = {'i','n','v','a','l','i','d','.','i','n','f',0}; - static const char *inf = - "[Version]\n" - "Signature=\"$Chicago$\""; - static const char *inf2 = - "[Version]\n" - "Signature=\"$CHICAGO$\""; - static const char *infNT = - "[Version]\n" - "Signature=\"$WINDOWS NT$\""; - - WCHAR *p, *ptr; - char dirA[MAX_PATH]; - WCHAR dir[MAX_PATH] = { 0 }; - WCHAR buffer[MAX_PATH] = { 0 }; - DWORD expected, outsize; - BOOL ret; - - if(!pSetupGetInfFileListW) - { - win_skip("SetupGetInfFileListW not present\n"); - return; - } - - /* NULL means %windir%\\inf - * get the value as reference - */ - expected = 0; - SetLastError(0xdeadbeef); - ret = pSetupGetInfFileListW(NULL, INF_STYLE_WIN4, NULL, 0, &expected); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("SetupGetInfFileListW not implemented\n"); - return; - } - ok(ret, "expected SetupGetInfFileListW to succeed! Error: %d\n", GetLastError()); - ok(expected > 0, "expected required buffersize to be at least 1\n"); - - /* check if an empty string doesn't behaves like NULL */ - outsize = 0; - SetLastError(0xdeadbeef); - ret = pSetupGetInfFileListW(dir, INF_STYLE_WIN4, NULL, 0, &outsize); - ok(!ret, "expected SetupGetInfFileListW to fail!\n"); - - /* create a private directory, the temp directory may contain some - * inf files left over from old installations - */ - if (!GetTempFileNameA(CURR_DIR, "inftest", 1, dirA)) - { - win_skip("GetTempFileNameA failed with error %d\n", GetLastError()); - return; - } - if (!CreateDirectoryA(dirA, NULL )) - { - win_skip("CreateDirectoryA(%s) failed with error %d\n", dirA, GetLastError()); - return; - } - if (!SetCurrentDirectoryA(dirA)) - { - win_skip("SetCurrentDirectoryA failed with error %d\n", GetLastError()); - RemoveDirectoryA(dirA); - return; - } - - MultiByteToWideChar(CP_ACP, 0, dirA, -1, dir, MAX_PATH); - /* check a not existing directory - */ - ptr = dir + lstrlenW(dir); - MultiByteToWideChar(CP_ACP, 0, "\\not_existent", -1, ptr, MAX_PATH - lstrlenW(dir)); - outsize = 0xffffffff; - SetLastError(0xdeadbeef); - ret = pSetupGetInfFileListW(dir, INF_STYLE_WIN4, NULL, 0, &outsize); - ok(ret, "expected SetupGetInfFileListW to succeed!\n"); - ok(outsize == 1, "expected required buffersize to be 1, got %d\n", outsize); - ok(ERROR_PATH_NOT_FOUND == GetLastError(), - "expected error ERROR_PATH_NOT_FOUND, got %d\n", GetLastError()); - - create_inf_file(inffile, inf); - create_inf_file(inffile2, inf); - create_inf_file(invalid_inf, "This content does not match the inf file format"); - - /* pass a filename instead of a directory - */ - *ptr = '\\'; - MultiByteToWideChar(CP_ACP, 0, invalid_inf, -1, ptr+1, MAX_PATH - lstrlenW(dir)); - outsize = 0xffffffff; - SetLastError(0xdeadbeef); - ret = pSetupGetInfFileListW(dir, INF_STYLE_WIN4, NULL, 0, &outsize); - ok(!ret, "expected SetupGetInfFileListW to fail!\n"); - ok(ERROR_DIRECTORY == GetLastError(), - "expected error ERROR_DIRECTORY, got %d\n", GetLastError()); - - /* make the filename look like directory - */ - dir[1 + lstrlenW(dir)] = 0; - dir[lstrlenW(dir)] = '\\'; - SetLastError(0xdeadbeef); - ret = pSetupGetInfFileListW(dir, INF_STYLE_WIN4, NULL, 0, &outsize); - ok(!ret, "expected SetupGetInfFileListW to fail!\n"); - ok(ERROR_DIRECTORY == GetLastError(), - "expected error ERROR_DIRECTORY, got %d\n", GetLastError()); - - /* now check the buffer content of a vaild call - */ - *ptr = 0; - expected = 3 + strlen(inffile) + strlen(inffile2); - ret = pSetupGetInfFileListW(dir, INF_STYLE_WIN4, buffer, MAX_PATH, &outsize); - ok(ret, "expected SetupGetInfFileListW to succeed!\n"); - ok(expected == outsize, "expected required buffersize to be %d, got %d\n", - expected, outsize); - for(p = buffer; lstrlenW(p) && (outsize > (p - buffer)); p+=lstrlenW(p) + 1) - ok(!lstrcmpW(p,inffile2W) || !lstrcmpW(p,inffileW), - "unexpected filename %s\n",wine_dbgstr_w(p)); - - /* upper case value - */ - create_inf_file(inffile2, inf2); - ret = pSetupGetInfFileListW(dir, INF_STYLE_WIN4, buffer, MAX_PATH, &outsize); - ok(ret, "expected SetupGetInfFileListW to succeed!\n"); - ok(expected == outsize, "expected required buffersize to be %d, got %d\n", - expected, outsize); - for(p = buffer; lstrlenW(p) && (outsize > (p - buffer)); p+=lstrlenW(p) + 1) - ok(!lstrcmpW(p,inffile2W) || !lstrcmpW(p,inffileW), - "unexpected filename %s\n",wine_dbgstr_w(p)); - - /* signature Windows NT is also inf style win4 - */ - create_inf_file(inffile2, infNT); - expected = 3 + strlen(inffile) + strlen(inffile2); - ret = pSetupGetInfFileListW(dir, INF_STYLE_WIN4, buffer, MAX_PATH, &outsize); - ok(ret, "expected SetupGetInfFileListW to succeed!\n"); - ok(expected == outsize, "expected required buffersize to be %d, got %d\n", - expected, outsize); - for(p = buffer; lstrlenW(p) && (outsize > (p - buffer)); p+=lstrlenW(p) + 1) - ok(!lstrcmpW(p,inffile2W) || !lstrcmpW(p,inffileW), - "unexpected filename %s\n",wine_dbgstr_w(p)); - - /* old style - */ - expected = 2 + strlen(invalid_inf); - ret = pSetupGetInfFileListW(dir, INF_STYLE_OLDNT, buffer, MAX_PATH, &outsize); - ok(ret, "expected SetupGetInfFileListW to succeed!\n"); - ok(expected == outsize, "expected required buffersize to be %d, got %d\n", - expected, outsize); - for(p = buffer; lstrlenW(p) && (outsize > (p - buffer)); p+=lstrlenW(p) + 1) - ok(!lstrcmpW(p,invalid_infW), "unexpected filename %s\n",wine_dbgstr_w(p)); - - /* mixed style - */ - expected = 4 + strlen(inffile) + strlen(inffile2) + strlen(invalid_inf); - ret = pSetupGetInfFileListW(dir, INF_STYLE_OLDNT | INF_STYLE_WIN4, buffer, - MAX_PATH, &outsize); - ok(ret, "expected SetupGetInfFileListW to succeed!\n"); - ok(expected == outsize, "expected required buffersize to be %d, got %d\n", - expected, outsize); - for(p = buffer; lstrlenW(p) && (outsize > (p - buffer)); p+=lstrlenW(p) + 1) - ok(!lstrcmpW(p,inffile2W) || !lstrcmpW(p,inffileW) || !lstrcmpW(p,invalid_infW), - "unexpected filename %s\n",wine_dbgstr_w(p)); - - DeleteFile(inffile); - DeleteFile(inffile2); - DeleteFile(invalid_inf); - SetCurrentDirectoryA(CURR_DIR); - RemoveDirectoryA(dirA); -} - -START_TEST(install) -{ - HMODULE hsetupapi = GetModuleHandle("setupapi.dll"); - char temp_path[MAX_PATH], prev_path[MAX_PATH]; - DWORD len; - - GetCurrentDirectory(MAX_PATH, prev_path); - GetTempPath(MAX_PATH, temp_path); - SetCurrentDirectory(temp_path); - - strcpy(CURR_DIR, temp_path); - len = strlen(CURR_DIR); - if(len && (CURR_DIR[len - 1] == '\\')) - CURR_DIR[len - 1] = 0; - - pInstallHinfSectionA = (void *)GetProcAddress(hsetupapi, "InstallHinfSectionA"); - pInstallHinfSectionW = (void *)GetProcAddress(hsetupapi, "InstallHinfSectionW"); - pSetupGetInfFileListA = (void *)GetProcAddress(hsetupapi, "SetupGetInfFileListA"); - pSetupGetInfFileListW = (void *)GetProcAddress(hsetupapi, "SetupGetInfFileListW"); - - if (pInstallHinfSectionA) - { - /* Check if pInstallHinfSectionA sets last error or is a stub (as on WinXP) */ - static const char *minimal_inf = "[Version]\nSignature=\"$Chicago$\"\n"; - char cmdline[MAX_PATH*2]; - create_inf_file(inffile, minimal_inf); - sprintf(cmdline, "DefaultInstall 128 %s\\%s", CURR_DIR, inffile); - SetLastError(0xdeadbeef); - pInstallHinfSectionA(NULL, NULL, cmdline, 0); - if (GetLastError() == 0xdeadbeef) - { - skip("InstallHinfSectionA is broken (stub)\n"); - pInstallHinfSectionA = NULL; - } - ok(DeleteFile(inffile), "Expected source inf to exist, last error was %d\n", GetLastError()); - } - if (!pInstallHinfSectionW && !pInstallHinfSectionA) - win_skip("InstallHinfSectionA and InstallHinfSectionW are not available\n"); - else - { - /* Set CBT hook to disallow MessageBox creation in current thread */ - hhook = SetWindowsHookExA(WH_CBT, cbt_hook_proc, 0, GetCurrentThreadId()); - assert(hhook != 0); - - test_cmdline(); - test_registry(); - test_install_svc_from(); - test_driver_install(); - - UnhookWindowsHookEx(hhook); - - /* We have to run this test after the CBT hook is disabled because - ProfileItems needs to create a window on Windows XP. */ - test_profile_items(); - } - - test_inffilelist(); - test_inffilelistA(); - - SetCurrentDirectory(prev_path); -} diff --git a/rostests/winetests/setupapi/misc.c b/rostests/winetests/setupapi/misc.c deleted file mode 100644 index f2d885d9904..00000000000 --- a/rostests/winetests/setupapi/misc.c +++ /dev/null @@ -1,738 +0,0 @@ -/* - * Miscellaneous tests - * - * Copyright 2007 James Hawkins - * Copyright 2007 Hans Leidekker - * - * 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 "windef.h" -#include "winbase.h" -#include "winnls.h" -#include "winuser.h" -#include "winreg.h" -#include "setupapi.h" - -#include "wine/test.h" - -static CHAR CURR_DIR[MAX_PATH]; - -/* test: - * - fails if not administrator - * - what if it's not a .inf file? - * - copied to %windir%/Inf - * - SourceInfFileName should be a full path - * - SourceInfFileName should be <= MAX_PATH - * - copy styles - */ - -static BOOL (WINAPI *pSetupGetFileCompressionInfoExA)(PCSTR, PSTR, DWORD, PDWORD, PDWORD, PDWORD, PUINT); -static BOOL (WINAPI *pSetupCopyOEMInfA)(PCSTR, PCSTR, DWORD, DWORD, PSTR, DWORD, PDWORD, PSTR *); -static BOOL (WINAPI *pSetupQueryInfOriginalFileInformationA)(PSP_INF_INFORMATION, UINT, PSP_ALTPLATFORM_INFO, PSP_ORIGINAL_FILE_INFO_A); -static BOOL (WINAPI *pSetupUninstallOEMInfA)(PCSTR, DWORD, PVOID); - -static void create_inf_file(LPCSTR filename) -{ - DWORD dwNumberOfBytesWritten; - HANDLE hf = CreateFile(filename, GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - - static const char data[] = - "[Version]\n" - "Signature=\"$Chicago$\"\n" - "AdvancedINF=2.5\n" - "[DefaultInstall]\n" - "RegisterOCXs=RegisterOCXsSection\n" - "[RegisterOCXsSection]\n" - "%%11%%\\ole32.dll\n"; - - WriteFile(hf, data, sizeof(data) - 1, &dwNumberOfBytesWritten, NULL); - CloseHandle(hf); -} - -static void get_temp_filename(LPSTR path) -{ - CHAR temp[MAX_PATH]; - LPSTR ptr; - - GetTempFileName(CURR_DIR, "set", 0, temp); - ptr = strrchr(temp, '\\'); - - lstrcpy(path, ptr + 1); -} - -static BOOL file_exists(LPSTR path) -{ - return GetFileAttributes(path) != INVALID_FILE_ATTRIBUTES; -} - -static BOOL check_format(LPSTR path, LPSTR inf) -{ - CHAR check[MAX_PATH]; - BOOL res; - - static const CHAR format[] = "\\INF\\oem"; - - GetWindowsDirectory(check, MAX_PATH); - lstrcat(check, format); - res = CompareString(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE, check, -1, path, lstrlen(check)) == CSTR_EQUAL && - path[lstrlen(check)] != '\\'; - - return (!inf) ? res : res && (inf == path + lstrlen(check) - 3); -} - -static void test_original_file_name(LPCSTR original, LPCSTR dest) -{ - HINF hinf; - PSP_INF_INFORMATION pspii; - SP_ORIGINAL_FILE_INFO spofi; - BOOL res; - DWORD size; - - if (!pSetupQueryInfOriginalFileInformationA) - { - win_skip("SetupQueryInfOriginalFileInformationA is not available\n"); - return; - } - - hinf = SetupOpenInfFileA(dest, NULL, INF_STYLE_WIN4, NULL); - ok(hinf != NULL, "SetupOpenInfFileA failed with error %d\n", GetLastError()); - - res = SetupGetInfInformation(hinf, INFINFO_INF_SPEC_IS_HINF, NULL, 0, &size); - ok(res, "SetupGetInfInformation failed with error %d\n", GetLastError()); - - pspii = HeapAlloc(GetProcessHeap(), 0, size); - - res = SetupGetInfInformation(hinf, INFINFO_INF_SPEC_IS_HINF, pspii, size, NULL); - ok(res, "SetupGetInfInformation failed with error %d\n", GetLastError()); - - spofi.cbSize = 0; - res = pSetupQueryInfOriginalFileInformationA(pspii, 0, NULL, &spofi); - ok(!res && GetLastError() == ERROR_INVALID_USER_BUFFER, - "SetupQueryInfOriginalFileInformationA should have failed with ERROR_INVALID_USER_BUFFER instead of %d\n", GetLastError()); - - spofi.cbSize = sizeof(spofi); - res = pSetupQueryInfOriginalFileInformationA(pspii, 0, NULL, &spofi); - ok(res, "SetupQueryInfOriginalFileInformationA failed with error %d\n", GetLastError()); - ok(!spofi.OriginalCatalogName[0], "spofi.OriginalCatalogName should have been \"\" instead of \"%s\"\n", spofi.OriginalCatalogName); - todo_wine - ok(!strcmp(original, spofi.OriginalInfName), "spofi.OriginalInfName of %s didn't match real original name %s\n", spofi.OriginalInfName, original); - - HeapFree(GetProcessHeap(), 0, pspii); - - SetupCloseInfFile(hinf); -} - -static void test_SetupCopyOEMInf(void) -{ - CHAR toolong[MAX_PATH * 2]; - CHAR path[MAX_PATH], dest[MAX_PATH]; - CHAR tmpfile[MAX_PATH], dest_save[MAX_PATH]; - LPSTR inf = NULL; - DWORD size; - BOOL res; - - /* try NULL SourceInfFileName */ - SetLastError(0xdeadbeef); - res = pSetupCopyOEMInfA(NULL, NULL, 0, SP_COPY_NOOVERWRITE, NULL, 0, NULL, NULL); - ok(res == FALSE, "Expected FALSE, got %d\n", res); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* try empty SourceInfFileName */ - SetLastError(0xdeadbeef); - res = pSetupCopyOEMInfA("", NULL, 0, SP_COPY_NOOVERWRITE, NULL, 0, NULL, NULL); - ok(res == FALSE, "Expected FALSE, got %d\n", res); - ok(GetLastError() == ERROR_FILE_NOT_FOUND || - GetLastError() == ERROR_BAD_PATHNAME || /* Win98 */ - GetLastError() == ERROR_INVALID_PARAMETER, /* Vista, W2K8 */ - "Unexpected error : %d\n", GetLastError()); - - /* try a relative nonexistent SourceInfFileName */ - SetLastError(0xdeadbeef); - res = pSetupCopyOEMInfA("nonexistent", NULL, 0, SP_COPY_NOOVERWRITE, NULL, 0, NULL, NULL); - ok(res == FALSE, "Expected FALSE, got %d\n", res); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - - /* try an absolute nonexistent SourceInfFileName */ - lstrcpy(path, CURR_DIR); - lstrcat(path, "\\nonexistent"); - SetLastError(0xdeadbeef); - res = pSetupCopyOEMInfA(path, NULL, 0, SP_COPY_NOOVERWRITE, NULL, 0, NULL, NULL); - ok(res == FALSE, "Expected FALSE, got %d\n", res); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - - /* try a long SourceInfFileName */ - memset(toolong, 'a', MAX_PATH * 2); - toolong[MAX_PATH * 2 - 1] = '\0'; - SetLastError(0xdeadbeef); - res = pSetupCopyOEMInfA(toolong, NULL, 0, SP_COPY_NOOVERWRITE, NULL, 0, NULL, NULL); - ok(res == FALSE, "Expected FALSE, got %d\n", res); - ok(GetLastError() == ERROR_FILE_NOT_FOUND || - GetLastError() == ERROR_FILENAME_EXCED_RANGE, /* Win98 */ - "Expected ERROR_FILE_NOT_FOUND or ERROR_FILENAME_EXCED_RANGE, got %d\n", GetLastError()); - - get_temp_filename(tmpfile); - create_inf_file(tmpfile); - - /* try a relative SourceInfFileName */ - SetLastError(0xdeadbeef); - res = pSetupCopyOEMInfA(tmpfile, NULL, 0, SP_COPY_NOOVERWRITE, NULL, 0, NULL, NULL); - ok(res == FALSE || - broken(res == TRUE), /* Win98 */ - "Expected FALSE, got %d\n", res); - if (GetLastError() == ERROR_WRONG_INF_TYPE || GetLastError() == ERROR_UNSUPPORTED_TYPE /* Win7 */) - { - /* FIXME: - * Vista needs a [Manufacturer] entry in the inf file. Doing this will give some - * popups during the installation though as it also needs a catalog file (signed?). - */ - win_skip("Needs a different inf file on Vista+\n"); - DeleteFile(tmpfile); - return; - } - - ok(GetLastError() == ERROR_FILE_NOT_FOUND || - broken(GetLastError() == ERROR_SUCCESS), /* Win98 */ - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - ok(file_exists(tmpfile), "Expected tmpfile to exist\n"); - - /* try SP_COPY_REPLACEONLY, dest does not exist */ - SetLastError(0xdeadbeef); - res = pSetupCopyOEMInfA(path, NULL, SPOST_NONE, SP_COPY_REPLACEONLY, NULL, 0, NULL, NULL); - ok(res == FALSE, "Expected FALSE, got %d\n", res); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - ok(file_exists(tmpfile), "Expected source inf to exist\n"); - - /* try an absolute SourceInfFileName, without DestinationInfFileName */ - lstrcpy(path, CURR_DIR); - lstrcat(path, "\\"); - lstrcat(path, tmpfile); - SetLastError(0xdeadbeef); - res = pSetupCopyOEMInfA(path, NULL, SPOST_NONE, 0, NULL, 0, NULL, NULL); - ok(res == TRUE, "Expected TRUE, got %d\n", res); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); - ok(file_exists(path), "Expected source inf to exist\n"); - - /* try SP_COPY_REPLACEONLY, dest exists */ - SetLastError(0xdeadbeef); - res = pSetupCopyOEMInfA(path, NULL, SPOST_NONE, SP_COPY_REPLACEONLY, NULL, 0, NULL, NULL); - ok(res == TRUE, "Expected TRUE, got %d\n", res); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); - ok(file_exists(path), "Expected source inf to exist\n"); - - /* try SP_COPY_NOOVERWRITE */ - SetLastError(0xdeadbeef); - res = pSetupCopyOEMInfA(path, NULL, SPOST_NONE, SP_COPY_NOOVERWRITE, NULL, 0, NULL, NULL); - ok(res == FALSE, "Expected FALSE, got %d\n", res); - ok(GetLastError() == ERROR_FILE_EXISTS, - "Expected ERROR_FILE_EXISTS, got %d\n", GetLastError()); - - /* get the DestinationInfFileName */ - SetLastError(0xdeadbeef); - res = pSetupCopyOEMInfA(path, NULL, SPOST_NONE, 0, dest, MAX_PATH, NULL, NULL); - ok(res == TRUE, "Expected TRUE, got %d\n", res); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); - ok(lstrlen(dest) != 0, "Expected a non-zero length string\n"); - ok(file_exists(dest), "Expected destination inf to exist\n"); - ok(check_format(dest, NULL), "Expected %%windir%%\\inf\\OEMx.inf, got %s\n", dest); - ok(file_exists(path), "Expected source inf to exist\n"); - - lstrcpy(dest_save, dest); - DeleteFile(dest_save); - - /* get the DestinationInfFileName, DestinationInfFileNameSize is too small - * - inf is still copied - */ - lstrcpy(dest, "aaa"); - size = 0; - SetLastError(0xdeadbeef); - res = pSetupCopyOEMInfA(path, NULL, SPOST_NONE, 0, dest, 5, &size, NULL); - ok(res == FALSE, "Expected FALSE, got %d\n", res); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(file_exists(path), "Expected source inf to exist\n"); - ok(file_exists(dest_save), "Expected dest inf to exist\n"); - ok(!lstrcmp(dest, "aaa"), "Expected dest to be unchanged\n"); - ok(size == lstrlen(dest_save) + 1, "Expected size to be lstrlen(dest_save) + 1\n"); - - /* get the DestinationInfFileName and DestinationInfFileNameSize */ - SetLastError(0xdeadbeef); - res = pSetupCopyOEMInfA(path, NULL, SPOST_NONE, 0, dest, MAX_PATH, &size, NULL); - ok(res == TRUE, "Expected TRUE, got %d\n", res); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); - ok(lstrlen(dest) + 1 == size, "Expected sizes to match, got (%d, %d)\n", lstrlen(dest), size); - ok(file_exists(dest), "Expected destination inf to exist\n"); - ok(check_format(dest, NULL), "Expected %%windir%%\\inf\\OEMx.inf, got %s\n", dest); - ok(file_exists(path), "Expected source inf to exist\n"); - ok(size == lstrlen(dest_save) + 1, "Expected size to be lstrlen(dest_save) + 1\n"); - - test_original_file_name(strrchr(path, '\\') + 1, dest); - - /* get the DestinationInfFileName, DestinationInfFileNameSize, and DestinationInfFileNameComponent */ - SetLastError(0xdeadbeef); - res = pSetupCopyOEMInfA(path, NULL, SPOST_NONE, 0, dest, MAX_PATH, &size, &inf); - ok(res == TRUE, "Expected TRUE, got %d\n", res); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); - ok(lstrlen(dest) + 1 == size, "Expected sizes to match, got (%d, %d)\n", lstrlen(dest), size); - ok(file_exists(dest), "Expected destination inf to exist\n"); - ok((inf && inf[0] != 0) || - broken(!inf), /* Win98 */ - "Expected inf to point to the filename\n"); - ok(check_format(dest, inf), "Expected %%windir%%\\inf\\OEMx.inf, got %s\n", dest); - ok(file_exists(path), "Expected source inf to exist\n"); - ok(size == lstrlen(dest_save) + 1, "Expected size to be lstrlen(dest_save) + 1\n"); - - /* try SP_COPY_DELETESOURCE */ - SetLastError(0xdeadbeef); - res = pSetupCopyOEMInfA(path, NULL, SPOST_NONE, SP_COPY_DELETESOURCE, NULL, 0, NULL, NULL); - ok(res == TRUE, "Expected TRUE, got %d\n", res); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); - ok(!file_exists(path), "Expected source inf to not exist\n"); - - if (pSetupUninstallOEMInfA) - { - char *destfile = strrchr(dest, '\\') + 1; - - SetLastError(0xdeadbeef); - ok(pSetupUninstallOEMInfA(destfile, 0, NULL), "Failed to uninstall '%s' : %d\n", destfile, GetLastError()); - } - else - { - /* Win9x/WinMe */ - SetLastError(0xdeadbeef); - ok(DeleteFileA(dest), "Failed to delete file '%s' : %d\n", dest, GetLastError()); - - /* On WinMe we also need to remove the .pnf file */ - *(strrchr(dest, '.') + 1) = 'p'; - DeleteFileA(dest); - } -} - -static void create_source_file(LPSTR filename, const BYTE *data, DWORD size) -{ - HANDLE handle; - DWORD written; - - handle = CreateFileA(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - WriteFile(handle, data, size, &written, NULL); - CloseHandle(handle); -} - -static BOOL compare_file_data(LPSTR file, const BYTE *data, DWORD size) -{ - DWORD read; - HANDLE handle; - BOOL ret = FALSE; - LPBYTE buffer; - - handle = CreateFileA(file, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - buffer = HeapAlloc(GetProcessHeap(), 0, size); - if (buffer) - { - ReadFile(handle, buffer, size, &read, NULL); - if (read == size && !memcmp(data, buffer, size)) ret = TRUE; - HeapFree(GetProcessHeap(), 0, buffer); - } - CloseHandle(handle); - return ret; -} - -static const BYTE uncompressed[] = { - 'u','n','c','o','m','p','r','e','s','s','e','d','\r','\n' -}; -static const BYTE laurence[] = { - 'l','a','u','r','e','n','c','e','\r','\n' -}; -static const BYTE comp_lzx[] = { - 0x53, 0x5a, 0x44, 0x44, 0x88, 0xf0, 0x27, 0x33, 0x41, 0x00, 0x0e, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x3f, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64 -}; -static const BYTE comp_zip[] = { - 0x50, 0x4b, 0x03, 0x04, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbd, 0xae, 0x81, 0x36, 0x75, 0x11, - 0x2c, 0x1b, 0x0e, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x04, 0x00, 0x15, 0x00, 0x77, 0x69, - 0x6e, 0x65, 0x55, 0x54, 0x09, 0x00, 0x03, 0xd6, 0x0d, 0x10, 0x46, 0xfd, 0x0d, 0x10, 0x46, 0x55, - 0x78, 0x04, 0x00, 0xe8, 0x03, 0xe8, 0x03, 0x00, 0x00, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x72, - 0x65, 0x73, 0x73, 0x65, 0x64, 0x50, 0x4b, 0x01, 0x02, 0x17, 0x03, 0x0a, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xbd, 0xae, 0x81, 0x36, 0x75, 0x11, 0x2c, 0x1b, 0x0e, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, - 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x81, 0x00, - 0x00, 0x00, 0x00, 0x77, 0x69, 0x6e, 0x65, 0x55, 0x54, 0x05, 0x00, 0x03, 0xd6, 0x0d, 0x10, 0x46, - 0x55, 0x78, 0x00, 0x00, 0x50, 0x4b, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, - 0x3f, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00 -}; -static const BYTE comp_cab_lzx[] = { - 0x4d, 0x53, 0x43, 0x46, 0x00, 0x00, 0x00, 0x00, 0x6b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x0f, 0x0e, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x36, 0x86, 0x72, 0x20, 0x00, 0x77, 0x69, 0x6e, 0x65, - 0x00, 0x19, 0xd0, 0x1a, 0xe3, 0x22, 0x00, 0x0e, 0x00, 0x5b, 0x80, 0x80, 0x8d, 0x00, 0x30, 0xe0, - 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x63, - 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x0d, 0x0a -}; -static const BYTE comp_cab_zip[] = { - 0x4d, 0x53, 0x43, 0x46, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x0e, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x36, 0x2f, 0xa5, 0x20, 0x00, 0x77, 0x69, 0x6e, 0x65, - 0x00, 0x7c, 0x80, 0x26, 0x2b, 0x12, 0x00, 0x0e, 0x00, 0x43, 0x4b, 0x2b, 0xcd, 0x4b, 0xce, 0xcf, - 0x2d, 0x28, 0x4a, 0x2d, 0x2e, 0x4e, 0x4d, 0xe1, 0xe5, 0x02, 0x00 -}; -static const BYTE comp_cab_zip_multi[] = { - 0x4d, 0x53, 0x43, 0x46, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x01, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd1, 0x38, 0xf0, 0x48, 0x20, 0x00, 0x74, 0x72, 0x69, 0x73, - 0x74, 0x72, 0x61, 0x6d, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd1, - 0x38, 0xf0, 0x48, 0x20, 0x00, 0x77, 0x69, 0x6e, 0x65, 0x00, 0x08, 0x00, 0x00, 0x00, 0x18, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xd1, 0x38, 0xf0, 0x48, 0x20, 0x00, 0x73, 0x68, 0x61, 0x6e, 0x64, 0x79, - 0x00, 0x67, 0x2c, 0x03, 0x85, 0x23, 0x00, 0x20, 0x00, 0x43, 0x4b, 0xcb, 0x49, 0x2c, 0x2d, 0x4a, - 0xcd, 0x4b, 0x4e, 0xe5, 0xe5, 0x2a, 0xcd, 0x4b, 0xce, 0xcf, 0x2d, 0x28, 0x4a, 0x2d, 0x2e, 0x4e, - 0x4d, 0xe1, 0xe5, 0x2a, 0x2e, 0x49, 0x2d, 0xca, 0x03, 0x8a, 0x02, 0x00 -}; - -static void test_SetupGetFileCompressionInfo(void) -{ - DWORD ret, source_size, target_size; - char source[MAX_PATH], temp[MAX_PATH], *name; - UINT type; - - GetTempPathA(sizeof(temp), temp); - GetTempFileNameA(temp, "fci", 0, source); - - create_source_file(source, uncompressed, sizeof(uncompressed)); - - ret = SetupGetFileCompressionInfoA(NULL, NULL, NULL, NULL, NULL); - ok(ret == ERROR_INVALID_PARAMETER, "SetupGetFileCompressionInfo failed unexpectedly\n"); - - ret = SetupGetFileCompressionInfoA(source, NULL, NULL, NULL, NULL); - ok(ret == ERROR_INVALID_PARAMETER, "SetupGetFileCompressionInfo failed unexpectedly\n"); - - ret = SetupGetFileCompressionInfoA(source, &name, NULL, NULL, NULL); - ok(ret == ERROR_INVALID_PARAMETER, "SetupGetFileCompressionInfo failed unexpectedly\n"); - - ret = SetupGetFileCompressionInfoA(source, &name, &source_size, NULL, NULL); - ok(ret == ERROR_INVALID_PARAMETER, "SetupGetFileCompressionInfo failed unexpectedly\n"); - - ret = SetupGetFileCompressionInfoA(source, &name, &source_size, &target_size, NULL); - ok(ret == ERROR_INVALID_PARAMETER, "SetupGetFileCompressionInfo failed unexpectedly\n"); - - name = NULL; - source_size = target_size = 0; - type = 5; - - ret = SetupGetFileCompressionInfoA(source, &name, &source_size, &target_size, &type); - ok(!ret, "SetupGetFileCompressionInfo failed unexpectedly\n"); - ok(name && !lstrcmpA(name, source), "got %s, expected %s\n", name, source); - ok(source_size == sizeof(uncompressed), "got %d\n", source_size); - ok(target_size == sizeof(uncompressed), "got %d\n", target_size); - ok(type == FILE_COMPRESSION_NONE, "got %d, expected FILE_COMPRESSION_NONE\n", type); - - MyFree(name); - DeleteFileA(source); -} - -static void test_SetupGetFileCompressionInfoEx(void) -{ - BOOL ret; - DWORD required_len, source_size, target_size; - char source[MAX_PATH], temp[MAX_PATH], name[MAX_PATH]; - UINT type; - - GetTempPathA(sizeof(temp), temp); - GetTempFileNameA(temp, "doc", 0, source); - - ret = pSetupGetFileCompressionInfoExA(NULL, NULL, 0, NULL, NULL, NULL, NULL); - ok(!ret, "SetupGetFileCompressionInfoEx succeeded unexpectedly\n"); - - ret = pSetupGetFileCompressionInfoExA(source, NULL, 0, NULL, NULL, NULL, NULL); - ok(!ret, "SetupGetFileCompressionInfoEx succeeded unexpectedly\n"); - - ret = pSetupGetFileCompressionInfoExA(source, NULL, 0, &required_len, NULL, NULL, NULL); - ok(!ret, "SetupGetFileCompressionInfoEx succeeded unexpectedly\n"); - ok(required_len == lstrlenA(source) + 1, "got %d, expected %d\n", required_len, lstrlenA(source) + 1); - - create_source_file(source, comp_lzx, sizeof(comp_lzx)); - - ret = pSetupGetFileCompressionInfoExA(source, name, sizeof(name), &required_len, &source_size, &target_size, &type); - ok(ret, "SetupGetFileCompressionInfoEx failed unexpectedly: %d\n", ret); - ok(!lstrcmpA(name, source), "got %s, expected %s\n", name, source); - ok(required_len == lstrlenA(source) + 1, "got %d, expected %d\n", required_len, lstrlenA(source) + 1); - ok(source_size == sizeof(comp_lzx), "got %d\n", source_size); - ok(target_size == sizeof(uncompressed), "got %d\n", target_size); - ok(type == FILE_COMPRESSION_WINLZA, "got %d, expected FILE_COMPRESSION_WINLZA\n", type); - DeleteFileA(source); - - create_source_file(source, comp_zip, sizeof(comp_zip)); - - ret = pSetupGetFileCompressionInfoExA(source, name, sizeof(name), &required_len, &source_size, &target_size, &type); - ok(ret, "SetupGetFileCompressionInfoEx failed unexpectedly: %d\n", ret); - ok(!lstrcmpA(name, source), "got %s, expected %s\n", name, source); - ok(required_len == lstrlenA(source) + 1, "got %d, expected %d\n", required_len, lstrlenA(source) + 1); - ok(source_size == sizeof(comp_zip), "got %d\n", source_size); - ok(target_size == sizeof(comp_zip), "got %d\n", target_size); - ok(type == FILE_COMPRESSION_NONE, "got %d, expected FILE_COMPRESSION_NONE\n", type); - DeleteFileA(source); - - create_source_file(source, comp_cab_lzx, sizeof(comp_cab_lzx)); - - ret = pSetupGetFileCompressionInfoExA(source, name, sizeof(name), &required_len, &source_size, &target_size, &type); - ok(ret, "SetupGetFileCompressionInfoEx failed unexpectedly: %d\n", ret); - ok(!lstrcmpA(name, source), "got %s, expected %s\n", name, source); - ok(required_len == lstrlenA(source) + 1, "got %d, expected %d\n", required_len, lstrlenA(source) + 1); - ok(source_size == sizeof(comp_cab_lzx), "got %d\n", source_size); - ok(target_size == sizeof(uncompressed), "got %d\n", target_size); - ok(type == FILE_COMPRESSION_MSZIP, "got %d, expected FILE_COMPRESSION_MSZIP\n", type); - DeleteFileA(source); - - create_source_file(source, comp_cab_zip, sizeof(comp_cab_zip)); - - ret = pSetupGetFileCompressionInfoExA(source, name, sizeof(name), &required_len, &source_size, &target_size, &type); - ok(ret, "SetupGetFileCompressionInfoEx failed unexpectedly: %d\n", ret); - ok(!lstrcmpA(name, source), "got %s, expected %s\n", name, source); - ok(required_len == lstrlenA(source) + 1, "got %d, expected %d\n", required_len, lstrlenA(source) + 1); - ok(source_size == sizeof(comp_cab_zip), "got %d\n", source_size); - ok(target_size == sizeof(uncompressed), "got %d\n", target_size); - ok(type == FILE_COMPRESSION_MSZIP, "got %d, expected FILE_COMPRESSION_MSZIP\n", type); - DeleteFileA(source); -} - -static void test_SetupDecompressOrCopyFile(void) -{ - DWORD ret; - char source[MAX_PATH], target[MAX_PATH], temp[MAX_PATH], *p; - UINT type; - int i; - - const struct - { - PCSTR source; - PCSTR target; - PUINT type; - } invalid_parameters[] = - { - {NULL, NULL, NULL}, - {NULL, NULL, &type}, - {NULL, target, NULL}, - {NULL, target, &type}, - {source, NULL, NULL}, - {source, NULL, &type}, - }; - - const struct - { - const char *filename; - const BYTE *expected_buffer; - const size_t buffer_size; - } zip_multi_tests[] = - { - {"tristram", laurence, sizeof(laurence)}, - {"tristram.txt", laurence, sizeof(laurence)}, - {"wine", laurence, sizeof(laurence)}, - {"wine.txt", laurence, sizeof(laurence)}, - {"shandy", laurence, sizeof(laurence)}, - {"shandy.txt", laurence, sizeof(laurence)}, - {"deadbeef", laurence, sizeof(laurence)}, - {"deadbeef.txt", laurence, sizeof(laurence)}, - }; - - GetTempPathA(sizeof(temp), temp); - GetTempFileNameA(temp, "doc", 0, source); - GetTempFileNameA(temp, "doc", 0, target); - - /* parameter tests */ - - create_source_file(source, uncompressed, sizeof(uncompressed)); - - for (i = 0; i < sizeof(invalid_parameters)/sizeof(invalid_parameters[0]); i++) - { - type = FILE_COMPRESSION_NONE; - ret = SetupDecompressOrCopyFileA(invalid_parameters[i].source, - invalid_parameters[i].target, - invalid_parameters[i].type); - ok(ret == ERROR_INVALID_PARAMETER, - "[%d] Expected SetupDecompressOrCopyFileA to return ERROR_INVALID_PARAMETER, got %u\n", - i, ret); - - /* try an invalid compression type */ - type = 5; - ret = SetupDecompressOrCopyFileA(invalid_parameters[i].source, - invalid_parameters[i].target, - invalid_parameters[i].type); - ok(ret == ERROR_INVALID_PARAMETER, - "[%d] Expected SetupDecompressOrCopyFileA to return ERROR_INVALID_PARAMETER, got %u\n", - i, ret); - } - - type = 5; /* try an invalid compression type */ - ret = SetupDecompressOrCopyFileA(source, target, &type); - ok(ret == ERROR_INVALID_PARAMETER, "SetupDecompressOrCopyFile failed unexpectedly\n"); - - DeleteFileA(target); - - /* no compression tests */ - - ret = SetupDecompressOrCopyFileA(source, target, NULL); - ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret); - ok(compare_file_data(target, uncompressed, sizeof(uncompressed)), "incorrect target file\n"); - - /* try overwriting existing file */ - ret = SetupDecompressOrCopyFileA(source, target, NULL); - ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret); - DeleteFileA(target); - - type = FILE_COMPRESSION_NONE; - ret = SetupDecompressOrCopyFileA(source, target, &type); - ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret); - ok(compare_file_data(target, uncompressed, sizeof(uncompressed)), "incorrect target file\n"); - DeleteFileA(target); - - type = FILE_COMPRESSION_WINLZA; - ret = SetupDecompressOrCopyFileA(source, target, &type); - ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret); - ok(compare_file_data(target, uncompressed, sizeof(uncompressed)), "incorrect target file\n"); - DeleteFileA(target); - - /* lz compression tests */ - - create_source_file(source, comp_lzx, sizeof(comp_lzx)); - - ret = SetupDecompressOrCopyFileA(source, target, NULL); - ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret); - DeleteFileA(target); - - /* zip compression tests */ - - create_source_file(source, comp_zip, sizeof(comp_zip)); - - ret = SetupDecompressOrCopyFileA(source, target, NULL); - ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret); - ok(compare_file_data(target, comp_zip, sizeof(comp_zip)), "incorrect target file\n"); - DeleteFileA(target); - - /* cabinet compression tests */ - - create_source_file(source, comp_cab_zip, sizeof(comp_cab_zip)); - - p = strrchr(target, '\\'); - lstrcpyA(p + 1, "wine"); - - ret = SetupDecompressOrCopyFileA(source, target, NULL); - ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret); - ok(compare_file_data(target, uncompressed, sizeof(uncompressed)), "incorrect target file\n"); - - /* try overwriting existing file */ - ret = SetupDecompressOrCopyFileA(source, target, NULL); - ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret); - - /* try zip compression */ - type = FILE_COMPRESSION_MSZIP; - ret = SetupDecompressOrCopyFileA(source, target, &type); - ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret); - ok(compare_file_data(target, uncompressed, sizeof(uncompressed)), "incorrect target file\n"); - - /* try no compression */ - type = FILE_COMPRESSION_NONE; - ret = SetupDecompressOrCopyFileA(source, target, &type); - ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret); - ok(compare_file_data(target, comp_cab_zip, sizeof(comp_cab_zip)), "incorrect target file\n"); - - /* Show that SetupDecompressOrCopyFileA simply extracts the first file it - * finds within the compressed cabinet. Contents are: - * tristram -> "laurence\r\n" - * wine -> "uncompressed\r\n" - * shandy -> "sterne\r\n" */ - - create_source_file(source, comp_cab_zip_multi, sizeof(comp_cab_zip_multi)); - - p = strrchr(target, '\\'); - - for (i = 0; i < sizeof(zip_multi_tests)/sizeof(zip_multi_tests[0]); i++) - { - lstrcpyA(p + 1, zip_multi_tests[i].filename); - - ret = SetupDecompressOrCopyFileA(source, target, NULL); - ok(!ret, "[%d] SetupDecompressOrCopyFile failed unexpectedly: %d\n", i, ret); - ok(compare_file_data(target, zip_multi_tests[i].expected_buffer, zip_multi_tests[i].buffer_size), - "[%d] incorrect target file\n", i); - DeleteFileA(target); - } - - DeleteFileA(source); -} - -static void test_SetupUninstallOEMInf(void) -{ - BOOL ret; - - SetLastError(0xdeadbeef); - ret = pSetupUninstallOEMInfA(NULL, 0, NULL); - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = pSetupUninstallOEMInfA("", 0, NULL); - todo_wine - { - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - } - - SetLastError(0xdeadbeef); - ret = pSetupUninstallOEMInfA("nonexistent.inf", 0, NULL); - todo_wine - { - ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); - } -} - -START_TEST(misc) -{ - HMODULE hsetupapi = GetModuleHandle("setupapi.dll"); - - pSetupGetFileCompressionInfoExA = (void*)GetProcAddress(hsetupapi, "SetupGetFileCompressionInfoExA"); - pSetupCopyOEMInfA = (void*)GetProcAddress(hsetupapi, "SetupCopyOEMInfA"); - pSetupQueryInfOriginalFileInformationA = (void*)GetProcAddress(hsetupapi, "SetupQueryInfOriginalFileInformationA"); - pSetupUninstallOEMInfA = (void*)GetProcAddress(hsetupapi, "SetupUninstallOEMInfA"); - - GetCurrentDirectoryA(MAX_PATH, CURR_DIR); - - if (pSetupCopyOEMInfA) - test_SetupCopyOEMInf(); - else - win_skip("SetupCopyOEMInfA is not available\n"); - - test_SetupGetFileCompressionInfo(); - - if (pSetupGetFileCompressionInfoExA) - test_SetupGetFileCompressionInfoEx(); - else - win_skip("SetupGetFileCompressionInfoExA is not available\n"); - - test_SetupDecompressOrCopyFile(); - - if (pSetupUninstallOEMInfA) - test_SetupUninstallOEMInf(); - else - win_skip("SetupUninstallOEMInfA is not available\n"); -} diff --git a/rostests/winetests/setupapi/parser.c b/rostests/winetests/setupapi/parser.c deleted file mode 100644 index 072ac9794cc..00000000000 --- a/rostests/winetests/setupapi/parser.c +++ /dev/null @@ -1,781 +0,0 @@ -/* - * INF file parsing tests - * - * Copyright 2002, 2005 Alexandre Julliard for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winreg.h" -#include "setupapi.h" - -#include "wine/test.h" - -/* function pointers */ -static HMODULE hSetupAPI; -static LPCSTR (WINAPI *pSetupGetFieldA)(PINFCONTEXT,DWORD); -static LPCWSTR (WINAPI *pSetupGetFieldW)(PINFCONTEXT,DWORD); -static BOOL (WINAPI *pSetupEnumInfSectionsA)( HINF hinf, UINT index, PSTR buffer, DWORD size, UINT *need ); - -static void init_function_pointers(void) -{ - hSetupAPI = GetModuleHandleA("setupapi.dll"); - - /* Nice, pSetupGetField is either A or W depending on the Windows version! The actual test - * takes care of this difference */ - pSetupGetFieldA = (void *)GetProcAddress(hSetupAPI, "pSetupGetField"); - pSetupGetFieldW = (void *)GetProcAddress(hSetupAPI, "pSetupGetField"); - pSetupEnumInfSectionsA = (void *)GetProcAddress(hSetupAPI, "SetupEnumInfSectionsA" ); -} - -static const char tmpfilename[] = ".\\tmp.inf"; - -/* some large strings */ -#define A255 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" -#define A256 "a" A255 -#define A400 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ - "aaaaaaaaaaaaaaaa" A256 -#define A1200 A400 A400 A400 -#define A511 A255 A256 -#define A4097 "a" A256 A256 A256 A256 A256 A256 A256 A256 A256 A256 A256 A256 A256 A256 A256 A256 - -#define STD_HEADER "[Version]\r\nSignature=\"$CHICAGO$\"\r\n" - -#define STR_SECTION "[Strings]\nfoo=aaa\nbar=bbb\nloop=%loop2%\nloop2=%loop%\n" \ - "per%%cent=abcd\nper=1\ncent=2\n22=foo\n" \ - "big=" A400 "\n" \ - "mydrive=\"C:\\\"\n" \ - "verybig=" A1200 "\n" - -/* create a new file with specified contents and open it */ -static HINF test_file_contents( const char *data, UINT *err_line ) -{ - DWORD res; - HANDLE handle = CreateFileA( tmpfilename, GENERIC_READ|GENERIC_WRITE, - FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, 0, 0 ); - if (handle == INVALID_HANDLE_VALUE) return 0; - if (!WriteFile( handle, data, strlen(data), &res, NULL )) trace( "write error\n" ); - CloseHandle( handle ); - return SetupOpenInfFileA( tmpfilename, 0, INF_STYLE_WIN4, err_line ); -} - -static const char *get_string_field( INFCONTEXT *context, DWORD index ) -{ - static char buffer[MAX_INF_STRING_LENGTH+32]; - if (SetupGetStringFieldA( context, index, buffer, sizeof(buffer), NULL )) return buffer; - return NULL; -} - -static const char *get_line_text( INFCONTEXT *context ) -{ - static char buffer[MAX_INF_STRING_LENGTH+32]; - if (SetupGetLineTextA( context, 0, 0, 0, buffer, sizeof(buffer), NULL )) return buffer; - return NULL; -} - - -/* Test various valid/invalid file formats */ - -static const struct -{ - const char *data; - DWORD error; - UINT err_line; - int todo; -} invalid_files[] = -{ - /* file contents expected error (or 0) errline todo */ - { "\r\n", ERROR_WRONG_INF_STYLE, 0, 0 }, - { "abcd\r\n", ERROR_WRONG_INF_STYLE, 0, 1 }, - { "[Version]\r\n", ERROR_WRONG_INF_STYLE, 0, 0 }, - { "[Version]\nSignature=", ERROR_WRONG_INF_STYLE, 0, 0 }, - { "[Version]\nSignature=foo", ERROR_WRONG_INF_STYLE, 0, 0 }, - { "[version]\nsignature=$chicago$", 0, 0, 0 }, - { "[VERSION]\nSIGNATURE=$CHICAGO$", 0, 0, 0 }, - { "[Version]\nSignature=$chicago$,abcd", 0, 0, 0 }, - { "[Version]\nabc=def\nSignature=$chicago$", 0, 0, 0 }, - { "[Version]\nabc=def\n[Version]\nSignature=$chicago$", 0, 0, 0 }, - { STD_HEADER, 0, 0, 0 }, - { STD_HEADER "[]\r\n", 0, 0, 0 }, - { STD_HEADER "]\r\n", 0, 0, 0 }, - { STD_HEADER "[" A255 "]\r\n", 0, 0, 0 }, - { STD_HEADER "[ab\r\n", ERROR_BAD_SECTION_NAME_LINE, 3, 0 }, - { STD_HEADER "\n\n[ab\x1a]\n", ERROR_BAD_SECTION_NAME_LINE, 5, 0 }, - { STD_HEADER "[" A256 "]\r\n", ERROR_SECTION_NAME_TOO_LONG, 3, 0 }, - { "[abc]\n" STD_HEADER, 0, 0, 0 }, - { "abc\r\n" STD_HEADER, ERROR_EXPECTED_SECTION_NAME, 1, 0 }, - { ";\n;\nabc\r\n" STD_HEADER, ERROR_EXPECTED_SECTION_NAME, 3, 0 }, - { ";\n;\nab\nab\n" STD_HEADER, ERROR_EXPECTED_SECTION_NAME, 3, 0 }, - { ";aa\n;bb\n" STD_HEADER, 0, 0, 0 }, - { STD_HEADER " [TestSection\x00]\n", ERROR_BAD_SECTION_NAME_LINE, 3, 0 }, - { STD_HEADER " [Test\x00Section]\n", ERROR_BAD_SECTION_NAME_LINE, 3, 0 }, - { STD_HEADER " [TestSection\x00]\n", ERROR_BAD_SECTION_NAME_LINE, 3, 0 }, - { STD_HEADER " [Test\x00Section]\n", ERROR_BAD_SECTION_NAME_LINE, 3, 0 }, -}; - -static void test_invalid_files(void) -{ - unsigned int i; - UINT err_line; - HINF hinf; - DWORD err; - - for (i = 0; i < sizeof(invalid_files)/sizeof(invalid_files[0]); i++) - { - SetLastError( 0xdeadbeef ); - err_line = 0xdeadbeef; - hinf = test_file_contents( invalid_files[i].data, &err_line ); - err = GetLastError(); - trace( "hinf=%p err=0x%x line=%d\n", hinf, err, err_line ); - if (invalid_files[i].error) /* should fail */ - { - ok( hinf == INVALID_HANDLE_VALUE, "file %u: Open succeeded\n", i ); - if (invalid_files[i].todo) todo_wine - { - ok( err == invalid_files[i].error, "file %u: Bad error %u/%u\n", - i, err, invalid_files[i].error ); - ok( err_line == invalid_files[i].err_line, "file %u: Bad error line %d/%d\n", - i, err_line, invalid_files[i].err_line ); - } - else - { - ok( err == invalid_files[i].error, "file %u: Bad error %u/%u\n", - i, err, invalid_files[i].error ); - ok( err_line == invalid_files[i].err_line, "file %u: Bad error line %d/%d\n", - i, err_line, invalid_files[i].err_line ); - } - } - else /* should succeed */ - { - ok( hinf != INVALID_HANDLE_VALUE, "file %u: Open failed\n", i ); - ok( err == 0, "file %u: Error code set to %u\n", i, err ); - } - SetupCloseInfFile( hinf ); - } -} - - -/* Test various section names */ - -static const struct -{ - const char *data; - const char *section; - DWORD error; -} section_names[] = -{ - /* file contents section name error code */ - { STD_HEADER "[TestSection]", "TestSection", 0 }, - { STD_HEADER "[TestSection]\n", "TestSection", 0 }, - { STD_HEADER "[TESTSECTION]\r\n", "TestSection", 0 }, - { STD_HEADER "[TestSection]\n[abc]", "testsection", 0 }, - { STD_HEADER ";[TestSection]\n", "TestSection", ERROR_SECTION_NOT_FOUND }, - { STD_HEADER "[TestSection]\n", "Bad name", ERROR_SECTION_NOT_FOUND }, - /* spaces */ - { STD_HEADER "[TestSection] \r\n", "TestSection", 0 }, - { STD_HEADER " [TestSection]\r\n", "TestSection", 0 }, - { STD_HEADER " [TestSection] dummy\r\n", "TestSection", 0 }, - { STD_HEADER " [TestSection] [foo]\r\n", "TestSection", 0 }, - { STD_HEADER " [ Test Section ] dummy\r\n", " Test Section ", 0 }, - { STD_HEADER "[TestSection] \032\ndummy", "TestSection", 0 }, - { STD_HEADER "[TestSection] \n\032dummy", "TestSection", 0 }, - /* special chars in section name */ - { STD_HEADER "[Test[Section]\r\n", "Test[Section", 0 }, - { STD_HEADER "[Test[S]ection]\r\n", "Test[S", 0 }, - { STD_HEADER "[Test[[[Section]\r\n", "Test[[[Section", 0 }, - { STD_HEADER "[]\r\n", "", 0 }, - { STD_HEADER "[[[]\n", "[[", 0 }, - { STD_HEADER "[Test\"Section]\r\n", "Test\"Section", 0 }, - { STD_HEADER "[Test\\Section]\r\n", "Test\\Section", 0 }, - { STD_HEADER "[Test\\ Section]\r\n", "Test\\ Section", 0 }, - { STD_HEADER "[Test;Section]\r\n", "Test;Section", 0 }, - /* various control chars */ - { STD_HEADER " [Test\r\b\tSection] \n", "Test\r\b\tSection", 0 }, - /* nulls */ -}; - -static void test_section_names(void) -{ - unsigned int i; - UINT err_line; - HINF hinf; - DWORD err; - LONG ret; - - for (i = 0; i < sizeof(section_names)/sizeof(section_names[0]); i++) - { - SetLastError( 0xdeadbeef ); - hinf = test_file_contents( section_names[i].data, &err_line ); - ok( hinf != INVALID_HANDLE_VALUE, "line %u: open failed err %u\n", i, GetLastError() ); - if (hinf == INVALID_HANDLE_VALUE) continue; - - ret = SetupGetLineCountA( hinf, section_names[i].section ); - err = GetLastError(); - trace( "hinf=%p ret=%d err=0x%x\n", hinf, ret, err ); - if (ret != -1) - { - ok( !section_names[i].error, "line %u: section name %s found\n", - i, section_names[i].section ); - ok( !err, "line %u: bad error code %u\n", i, err ); - } - else - { - ok( section_names[i].error, "line %u: section name %s not found\n", - i, section_names[i].section ); - ok( err == section_names[i].error, "line %u: bad error %u/%u\n", - i, err, section_names[i].error ); - } - SetupCloseInfFile( hinf ); - } -} - -static void test_enum_sections(void) -{ - static const char *contents = STD_HEADER "[s1]\nfoo=bar\n[s2]\nbar=foo\n[s3]\n[strings]\na=b\n"; - - BOOL ret; - DWORD len; - HINF hinf; - UINT err, index; - char buffer[256]; - - if (!pSetupEnumInfSectionsA) - { - win_skip( "SetupEnumInfSectionsA not available\n" ); - return; - } - - hinf = test_file_contents( contents, &err ); - ok( hinf != NULL, "Expected valid INF file\n" ); - - for (index = 0; ; index++) - { - SetLastError( 0xdeadbeef ); - ret = pSetupEnumInfSectionsA( hinf, index, NULL, 0, &len ); - err = GetLastError(); - if (!ret && GetLastError() == ERROR_NO_MORE_ITEMS) break; - ok( ret, "SetupEnumInfSectionsA failed\n" ); - ok( len == 3 || len == 8, "wrong len %u\n", len ); - - SetLastError( 0xdeadbeef ); - ret = pSetupEnumInfSectionsA( hinf, index, NULL, sizeof(buffer), &len ); - err = GetLastError(); - ok( !ret, "SetupEnumInfSectionsA succeeded\n" ); - ok( err == ERROR_INVALID_USER_BUFFER, "wrong error %u\n", err ); - ok( len == 3 || len == 8, "wrong len %u\n", len ); - - SetLastError( 0xdeadbeef ); - ret = pSetupEnumInfSectionsA( hinf, index, buffer, sizeof(buffer), &len ); - ok( ret, "SetupEnumInfSectionsA failed err %u\n", GetLastError() ); - ok( len == 3 || len == 8, "wrong len %u\n", len ); - ok( !lstrcmpi( buffer, "version" ) || !lstrcmpi( buffer, "s1" ) || - !lstrcmpi( buffer, "s2" ) || !lstrcmpi( buffer, "s3" ) || !lstrcmpi( buffer, "strings" ), - "bad section '%s'\n", buffer ); - } - SetupCloseInfFile( hinf ); -} - - -/* Test various key and value names */ - -static const struct -{ - const char *data; - const char *key; - const char *fields[10]; -} key_names[] = -{ -/* file contents expected key expected fields */ - { "ab=cd", "ab", { "cd" } }, - { "ab=cd,ef,gh,ij", "ab", { "cd", "ef", "gh", "ij" } }, - { "ab", "ab", { "ab" } }, - { "ab,cd", NULL, { "ab", "cd" } }, - { "ab,cd=ef", NULL, { "ab", "cd=ef" } }, - { "=abcd,ef", "", { "abcd", "ef" } }, - /* backslashes */ - { "ba\\\ncd=ef", "bacd", { "ef" } }, - { "ab \\ \ncd=ef", "abcd", { "ef" } }, - { "ab\\\ncd,ef", NULL, { "abcd", "ef" } }, - { "ab \\ ;cc\ncd=ef", "abcd", { "ef" } }, - { "ab \\ \\ \ncd=ef", "abcd", { "ef" } }, - { "ba \\ dc=xx", "ba \\ dc", { "xx" } }, - { "ba \\\\ \nc=d", "bac", { "d" } }, - { "a=b\\\\c", "a", { "b\\\\c" } }, - { "ab=cd \\ ", "ab", { "cd" } }, - { "ba=c \\ \n \\ \n a", "ba", { "ca" } }, - { "ba=c \\ \n \\ a", "ba", { "c\\ a" } }, - { " \\ a= \\ b", "\\ a", { "\\ b" } }, - /* quotes */ - { "Ab\"Cd\"=Ef", "AbCd", { "Ef" } }, - { "Ab\"Cd=Ef\"", "AbCd=Ef", { "AbCd=Ef" } }, - { "ab\"\"\"cd,ef=gh\"", "ab\"cd,ef=gh", { "ab\"cd,ef=gh" } }, - { "ab\"\"cd=ef", "abcd", { "ef" } }, - { "ab\"\"cd=ef,gh", "abcd", { "ef", "gh" } }, - { "ab=cd\"\"ef", "ab", { "cdef" } }, - { "ab=cd\",\"ef", "ab", { "cd,ef" } }, - { "ab=cd\",ef", "ab", { "cd,ef" } }, - { "ab=cd\",ef\\\nab", "ab", { "cd,ef\\" } }, - - /* single quotes (unhandled)*/ - { "HKLM,A,B,'C',D", NULL, { "HKLM", "A","B","'C'","D" } }, - /* spaces */ - { " a b = c , d \n", "a b", { "c", "d" } }, - { " a b = c ,\" d\" \n", "a b", { "c", " d" } }, - { " a b\r = c\r\n", "a b", { "c" } }, - /* empty fields */ - { "a=b,,,c,,,d", "a", { "b", "", "", "c", "", "", "d" } }, - { "a=b,\"\",c,\" \",d", "a", { "b", "", "c", " ", "d" } }, - { "=,,b", "", { "", "", "b" } }, - { ",=,,b", NULL, { "", "=", "", "b" } }, - { "a=\n", "a", { "" } }, - { "=", "", { "" } }, - /* eof */ - { "ab=c\032d", "ab", { "c" } }, - { "ab\032=cd", "ab", { "ab" } }, - /* nulls */ - { "abcd=ef\x0gh", "abcd", { "ef" } }, - /* multiple sections with same name */ - { "[Test2]\nab\n[Test]\nee=ff\n", "ee", { "ff" } }, - /* string substitution */ - { "%foo%=%bar%\n" STR_SECTION, "aaa", { "bbb" } }, - { "%foo%xx=%bar%yy\n" STR_SECTION, "aaaxx", { "bbbyy" } }, - { "%% %foo%=%bar%\n" STR_SECTION, "% aaa", { "bbb" } }, - { "%f\"o\"o%=ccc\n" STR_SECTION, "aaa", { "ccc" } }, - { "abc=%bar;bla%\n" STR_SECTION, "abc", { "%bar" } }, - { "loop=%loop%\n" STR_SECTION, "loop", { "%loop2%" } }, - { "%per%%cent%=100\n" STR_SECTION, "12", { "100" } }, - { "a=%big%\n" STR_SECTION, "a", { A400 } }, - { "a=%verybig%\n" STR_SECTION, "a", { A511 } }, /* truncated to 511, not on Vista/W2K8 */ - { "a=%big%%big%%big%%big%\n" STR_SECTION, "a", { A400 A400 A400 A400 } }, - { "a=%big%%big%%big%%big%%big%%big%%big%%big%%big%\n" STR_SECTION, "a", { A400 A400 A400 A400 A400 A400 A400 A400 A400 } }, - { "a=%big%%big%%big%%big%%big%%big%%big%%big%%big%%big%%big%\n" STR_SECTION, "a", { A4097 /*MAX_INF_STRING_LENGTH+1*/ } }, - - /* Prove expansion of system entries removes extra \'s and string - replacements doesn't */ - { "ab=\"%24%\"\n" STR_SECTION, "ab", { "C:\\" } }, - { "ab=\"%mydrive%\"\n" STR_SECTION, "ab", { "C:\\" } }, - { "ab=\"%24%\\fred\"\n" STR_SECTION, "ab", { "C:\\fred" } }, - { "ab=\"%mydrive%\\fred\"\n" STR_SECTION,"ab", { "C:\\\\fred" } }, - /* Confirm duplicate \'s kept */ - { "ab=\"%24%\\\\fred\"", "ab", { "C:\\\\fred" } }, - { "ab=C:\\\\FRED", "ab", { "C:\\\\FRED" } }, -}; - -/* check the key of a certain line */ -static const char *check_key( INFCONTEXT *context, const char *wanted ) -{ - const char *key = get_string_field( context, 0 ); - DWORD err = GetLastError(); - - if (!key) - { - ok( !wanted, "missing key %s\n", wanted ); - ok( err == 0 || err == ERROR_INVALID_PARAMETER, "last error set to %u\n", err ); - } - else - { - ok( !strcmp( key, wanted ), "bad key %s/%s\n", key, wanted ); - ok( err == 0, "last error set to %u\n", err ); - } - return key; -} - -static void test_key_names(void) -{ - char buffer[MAX_INF_STRING_LENGTH+32]; - const char *key, *line; - unsigned int i, index, count; - UINT err_line; - HINF hinf; - DWORD err; - BOOL ret; - INFCONTEXT context; - - for (i = 0; i < sizeof(key_names)/sizeof(key_names[0]); i++) - { - strcpy( buffer, STD_HEADER "[Test]\n" ); - strcat( buffer, key_names[i].data ); - SetLastError( 0xdeadbeef ); - hinf = test_file_contents( buffer, &err_line ); - ok( hinf != INVALID_HANDLE_VALUE, "line %u: open failed err %u\n", i, GetLastError() ); - if (hinf == INVALID_HANDLE_VALUE) continue; - - ret = SetupFindFirstLineA( hinf, "Test", 0, &context ); - assert( ret ); - - key = check_key( &context, key_names[i].key ); - - buffer[0] = buffer[1] = 0; /* build the full line */ - for (index = 0; ; index++) - { - const char *field = get_string_field( &context, index + 1 ); - err = GetLastError(); - if (field) - { - ok( err == 0, "line %u: bad error %u\n", i, err ); - if (key_names[i].fields[index]) - { - if (i == 49) - ok( !strcmp( field, key_names[i].fields[index] ) || - !strcmp( field, A1200), /* Vista, W2K8 */ - "line %u: bad field %s/%s\n", - i, field, key_names[i].fields[index] ); - else /* don't compare drive letter of paths */ - if (field[0] && field[1] == ':' && field[2] == '\\') - ok( !strcmp( field + 1, key_names[i].fields[index] + 1 ), - "line %u: bad field %s/%s\n", - i, field, key_names[i].fields[index] ); - else - ok( !strcmp( field, key_names[i].fields[index] ), "line %u: bad field %s/%s\n", - i, field, key_names[i].fields[index] ); - } - else - ok( 0, "line %u: got extra field %s\n", i, field ); - strcat( buffer, "," ); - strcat( buffer, field ); - } - else - { - ok( err == 0 || err == ERROR_INVALID_PARAMETER, - "line %u: bad error %u\n", i, err ); - if (key_names[i].fields[index]) - ok( 0, "line %u: missing field %s\n", i, key_names[i].fields[index] ); - } - if (!key_names[i].fields[index]) break; - } - count = SetupGetFieldCount( &context ); - ok( count == index, "line %u: bad count %d/%d\n", i, index, count ); - - line = get_line_text( &context ); - ok( line != NULL, "line %u: SetupGetLineText failed\n", i ); - if (line) ok( !strcmp( line, buffer+1 ), "line %u: bad text %s/%s\n", i, line, buffer+1 ); - - SetupCloseInfFile( hinf ); - } - -} - -static void test_close_inf_file(void) -{ - SetLastError(0xdeadbeef); - SetupCloseInfFile(NULL); - ok(GetLastError() == 0xdeadbeef || - GetLastError() == ERROR_INVALID_PARAMETER, /* Win9x, WinMe */ - "Expected 0xdeadbeef, got %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - SetupCloseInfFile(INVALID_HANDLE_VALUE); - ok(GetLastError() == 0xdeadbeef || - GetLastError() == ERROR_INVALID_PARAMETER, /* Win9x, WinMe */ - "Expected 0xdeadbeef, got %u\n", GetLastError()); -} - -static const char *contents = "[Version]\n" - "Signature=\"$Windows NT$\"\n" - "FileVersion=5.1.1.2\n" - "[FileBranchInfo]\n" - "RTMQFE=\"%RTMGFE_NAME%\",SP1RTM,"A4097"\n" - "[Strings]\n" - "RTMQFE_NAME = \"RTMQFE\"\n"; - -static const CHAR getfield_resA[][20] = -{ - "RTMQFE", - "%RTMGFE_NAME%", - "SP1RTM", -}; - -static const WCHAR getfield_resW[][20] = -{ - {'R','T','M','Q','F','E',0}, - {'%','R','T','M','G','F','E','_','N','A','M','E','%',0}, - {'S','P','1','R','T','M',0}, -}; - -static void test_pSetupGetField(void) -{ - UINT err; - BOOL ret; - HINF hinf; - LPCSTR fieldA; - LPCWSTR fieldW; - INFCONTEXT context; - int i; - int len; - BOOL unicode = TRUE; - - SetLastError(0xdeadbeef); - lstrcmpW(NULL, NULL); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("Using A-functions instead of W\n"); - unicode = FALSE; - } - - hinf = test_file_contents( contents, &err ); - ok( hinf != NULL, "Expected valid INF file\n" ); - - ret = SetupFindFirstLine( hinf, "FileBranchInfo", NULL, &context ); - ok( ret, "Failed to find first line\n" ); - - /* native Windows crashes if a NULL context is sent in */ - - for ( i = 0; i < 3; i++ ) - { - if (unicode) - { - fieldW = pSetupGetFieldW( &context, i ); - ok( fieldW != NULL, "Failed to get field %i\n", i ); - ok( !lstrcmpW( getfield_resW[i], fieldW ), "Wrong string returned\n" ); - } - else - { - fieldA = pSetupGetFieldA( &context, i ); - ok( fieldA != NULL, "Failed to get field %i\n", i ); - ok( !lstrcmpA( getfield_resA[i], fieldA ), "Wrong string returned\n" ); - } - } - - if (unicode) - { - fieldW = pSetupGetFieldW( &context, 3 ); - ok( fieldW != NULL, "Failed to get field 3\n" ); - len = lstrlenW( fieldW ); - ok( len == 511 || /* NT4, W2K, XP and W2K3 */ - len == 4096, /* Vista */ - "Unexpected length, got %d\n", len ); - - fieldW = pSetupGetFieldW( &context, 4 ); - ok( fieldW == NULL, "Expected NULL, got %p\n", fieldW ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError() ); - } - else - { - fieldA = pSetupGetFieldA( &context, 3 ); - ok( fieldA != NULL, "Failed to get field 3\n" ); - len = lstrlenA( fieldA ); - ok( len == 511, /* Win9x, WinME */ - "Unexpected length, got %d\n", len ); - - fieldA = pSetupGetFieldA( &context, 4 ); - ok( fieldA == NULL, "Expected NULL, got %p\n", fieldA ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError() ); - } - - SetupCloseInfFile( hinf ); -} - -static void test_SetupGetIntField(void) -{ - static const struct - { - const char *key; - const char *fields; - DWORD index; - INT value; - DWORD err; - } keys[] = - { - /* key fields index expected int errorcode */ - { "Key", "48", 1, 48, ERROR_SUCCESS }, - { "Key", "48", 0, -1, ERROR_INVALID_DATA }, - { "123", "48", 0, 123, ERROR_SUCCESS }, - { "Key", "0x4", 1, 4, ERROR_SUCCESS }, - { "Key", "Field1", 1, -1, ERROR_INVALID_DATA }, - { "Key", "Field1,34", 2, 34, ERROR_SUCCESS }, - { "Key", "Field1,,Field3", 2, 0, ERROR_SUCCESS }, - { "Key", "Field1,", 2, 0, ERROR_SUCCESS } - }; - unsigned int i; - - for (i = 0; i < sizeof(keys)/sizeof(keys[0]); i++) - { - HINF hinf; - char buffer[MAX_INF_STRING_LENGTH]; - INFCONTEXT context; - UINT err; - BOOL retb; - INT intfield; - - strcpy( buffer, STD_HEADER "[TestSection]\n" ); - strcat( buffer, keys[i].key ); - strcat( buffer, "=" ); - strcat( buffer, keys[i].fields ); - hinf = test_file_contents( buffer, &err); - ok( hinf != NULL, "Expected valid INF file\n" ); - - SetupFindFirstLineA( hinf, "TestSection", keys[i].key, &context ); - SetLastError( 0xdeadbeef ); - intfield = -1; - retb = SetupGetIntField( &context, keys[i].index, &intfield ); - if ( keys[i].err == ERROR_SUCCESS ) - { - ok( retb, "%u: Expected success\n", i ); - ok( GetLastError() == ERROR_SUCCESS || - GetLastError() == 0xdeadbeef /* win9x, NT4 */, - "%u: Expected ERROR_SUCCESS or 0xdeadbeef, got %u\n", i, GetLastError() ); - } - else - { - ok( !retb, "%u: Expected failure\n", i ); - ok( GetLastError() == keys[i].err, - "%u: Expected %d, got %u\n", i, keys[i].err, GetLastError() ); - } - ok( intfield == keys[i].value, "%u: Expected %d, got %d\n", i, keys[i].value, intfield ); - - SetupCloseInfFile( hinf ); - } -} - -static void test_GLE(void) -{ - static const char *inf = - "[Version]\n" - "Signature=\"$Windows NT$\"\n" - "[Sectionname]\n" - "Keyname1=Field1,Field2,Field3\n" - "\n" - "Keyname2=Field4,Field5\n"; - HINF hinf; - UINT err; - INFCONTEXT context; - BOOL retb; - LONG retl; - char buf[MAX_INF_STRING_LENGTH]; - int bufsize = MAX_INF_STRING_LENGTH; - DWORD retsize; - - hinf = test_file_contents( inf, &err ); - ok( hinf != NULL, "Expected valid INF file\n" ); - - SetLastError(0xdeadbeef); - retb = SetupFindFirstLineA( hinf, "ImNotThere", NULL, &context ); - ok(!retb, "Expected failure\n"); - ok(GetLastError() == ERROR_LINE_NOT_FOUND, - "Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError()); - - SetLastError(0xdeadbeef); - retb = SetupFindFirstLineA( hinf, "ImNotThere", "ImNotThere", &context ); - ok(!retb, "Expected failure\n"); - ok(GetLastError() == ERROR_LINE_NOT_FOUND, - "Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError()); - - SetLastError(0xdeadbeef); - retb = SetupFindFirstLineA( hinf, "Sectionname", NULL, &context ); - ok(retb, "Expected success\n"); - ok(GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got %08x\n", GetLastError()); - - SetLastError(0xdeadbeef); - retb = SetupFindFirstLineA( hinf, "Sectionname", "ImNotThere", &context ); - ok(!retb, "Expected failure\n"); - ok(GetLastError() == ERROR_LINE_NOT_FOUND, - "Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError()); - - SetLastError(0xdeadbeef); - retb = SetupFindFirstLineA( hinf, "Sectionname", "Keyname1", &context ); - ok(retb, "Expected success\n"); - ok(GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got %08x\n", GetLastError()); - - SetLastError(0xdeadbeef); - retb = SetupFindNextMatchLineA( &context, "ImNotThere", &context ); - ok(!retb, "Expected failure\n"); - ok(GetLastError() == ERROR_LINE_NOT_FOUND, - "Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError()); - - SetLastError(0xdeadbeef); - retb = SetupFindNextMatchLineA( &context, "Keyname2", &context ); - ok(retb, "Expected success\n"); - ok(GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got %08x\n", GetLastError()); - - SetLastError(0xdeadbeef); - retl = SetupGetLineCountA( hinf, "ImNotThere"); - ok(retl == -1, "Expected -1, got %d\n", retl); - ok(GetLastError() == ERROR_SECTION_NOT_FOUND, - "Expected ERROR_SECTION_NOT_FOUND, got %08x\n", GetLastError()); - - SetLastError(0xdeadbeef); - retl = SetupGetLineCountA( hinf, "Sectionname"); - ok(retl == 2, "Expected 2, got %d\n", retl); - ok(GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got %08x\n", GetLastError()); - - SetLastError(0xdeadbeef); - retb = SetupGetLineTextA( NULL, hinf, "ImNotThere", "ImNotThere", buf, bufsize, &retsize); - ok(!retb, "Expected failure\n"); - ok(GetLastError() == ERROR_LINE_NOT_FOUND, - "Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError()); - - SetLastError(0xdeadbeef); - retb = SetupGetLineTextA( NULL, hinf, "Sectionname", "ImNotThere", buf, bufsize, &retsize); - ok(!retb, "Expected failure\n"); - ok(GetLastError() == ERROR_LINE_NOT_FOUND, - "Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError()); - - SetLastError(0xdeadbeef); - retb = SetupGetLineTextA( NULL, hinf, "Sectionname", "Keyname1", buf, bufsize, &retsize); - ok(retb, "Expected success\n"); - ok(GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got %08x\n", GetLastError()); - - SetLastError(0xdeadbeef); - retb = SetupGetLineByIndexA( hinf, "ImNotThere", 1, &context ); - ok(!retb, "Expected failure\n"); - ok(GetLastError() == ERROR_LINE_NOT_FOUND, - "Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError()); - - SetLastError(0xdeadbeef); - retb = SetupGetLineByIndexA( hinf, "Sectionname", 1, &context ); - ok(retb, "Expected success\n"); - ok(GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got %08x\n", GetLastError()); - - SetLastError(0xdeadbeef); - retb = SetupGetLineByIndexA( hinf, "Sectionname", 3, &context ); - ok(!retb, "Expected failure\n"); - ok(GetLastError() == ERROR_LINE_NOT_FOUND, - "Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError()); - - SetupCloseInfFile( hinf ); -} - -START_TEST(parser) -{ - init_function_pointers(); - test_invalid_files(); - test_section_names(); - test_enum_sections(); - test_key_names(); - test_close_inf_file(); - test_pSetupGetField(); - test_SetupGetIntField(); - test_GLE(); - DeleteFileA( tmpfilename ); -} diff --git a/rostests/winetests/setupapi/query.c b/rostests/winetests/setupapi/query.c deleted file mode 100644 index 6e956a2a096..00000000000 --- a/rostests/winetests/setupapi/query.c +++ /dev/null @@ -1,515 +0,0 @@ -/* - * Unit tests for setupapi.dll query functions - * - * Copyright (C) 2006 James Hawkins - * - * 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 "wine/test.h" - -CHAR CURR_DIR[MAX_PATH]; -CHAR WIN_DIR[MAX_PATH]; - -static void get_directories(void) -{ - int len; - - GetCurrentDirectoryA(MAX_PATH, CURR_DIR); - len = lstrlenA(CURR_DIR); - - if(len && (CURR_DIR[len-1] == '\\')) - CURR_DIR[len-1] = 0; - - GetWindowsDirectoryA(WIN_DIR, MAX_PATH); - len = lstrlenA(WIN_DIR); - - if (len && (WIN_DIR[len-1] == '\\')) - WIN_DIR[len-1] = 0; -} - -static const char inf_data1[] = - "[Version]\n" - "Signature=\"$Chicago$\"\n" - "AdvancedINF=2.5\n" - "[SourceDisksNames]\n" - "2 = %SrcDiskName%, LANCOM\\LANtools\\lanconf.cab\n" - "[SourceDisksFiles]\n" - "lanconf.exe = 2\n" - "[DestinationDirs]\n" - "DefaultDestDir = 24, %DefaultDest%\n" - "[Strings]\n" - "LangDir = english\n" - "DefaultDest = LANCOM\n" - "SrcDiskName = \"LANCOM Software CD\"\n"; - -static const char inf_data2[] = - "[SourceFileInfo]\n" - "sp1qfe\\bitsinst.exe=250B3702C7CCD7C2F9E4DAA1555C933E,000600060A28062C,27136,SP1QFE\n" - "sp1qfe\\bitsprx2.dll=4EBEA67F4BB4EB402E725CA7CA2857AE,000600060A280621,7680,SP1QFE\n" - "sp1qfe\\bitsprx3.dll=C788A1D9330DA011EF25E95D3BC7BDE5,000600060A280621,7168,SP1QFE\n" - "sp1qfe\\qmgr.dll=696AC82FB290A03F205901442E0E9589,000600060A280621,361984,SP1QFE\n" - "sp1qfe\\qmgrprxy.dll=8B5848144829E1BC985EA4C3D8CA7E3F,000600060A280621,17408,SP1QFE\n" - "sp1qfe\\winhttp.dll=3EC6F518114606CA59D4160322077437,000500010A280615,331776,SP1QFE\n" - "sp1qfe\\xpob2res.dll=DB83156B9F496F20D1EA70E4ABEC0166,000500010A280622,158720,SP1QFE\n"; - -static const char inf_data3[] = - "[Version]\n" - "Signature = \"$Windows NT$\"\n" - "[DestinationDirs]\n" - "CopyAlways.Windir.files = 10\n" - "[CopyAlways.Windir.Files]\n" - "WindowsCodecs.dll\n"; - -static const char inf_data4[] = - "[Version]\n" - "Signature = \"$Windows NT$\"\n" - "[CopyAlways.System32.Files]\n" - "WindowsCodecs.dll\n"; - -static const char inf_data5[] = - "[Version]\n" - "Signature = \"$Windows NT$\"\n" - "[DestinationDirs]\n" - "DefaultDestDir = 11\n" - "CopyAlways.Windir.files = 10\n" - "[CopyAlways.Windir.Files]\n" - "WindowsCodecs.dll\n"; - -static const char inf_data6[] = - "[Version]\n" - "Signature = \"$Windows NT$\"\n" - "[DestinationDirs]\n" - "DefaultDestDir = 10\n" - "[CopyAlways.Windir.Files]\n" - "WindowsCodecs.dll\n"; - -static void create_inf_file(LPSTR filename, const char *data, DWORD size) -{ - DWORD dwNumberOfBytesWritten; - HANDLE hf = CreateFile(filename, GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - WriteFile(hf, data, size, &dwNumberOfBytesWritten, NULL); - CloseHandle(hf); -} - -static BOOL check_info_filename(PSP_INF_INFORMATION info, LPSTR test) -{ - LPSTR filename; - DWORD size; - BOOL ret = FALSE; - - if (!SetupQueryInfFileInformationA(info, 0, NULL, 0, &size)) - return FALSE; - - filename = HeapAlloc(GetProcessHeap(), 0, size); - if (!filename) - return FALSE; - - SetupQueryInfFileInformationA(info, 0, filename, size, &size); - - if (!lstrcmpiA(test, filename)) - ret = TRUE; - - HeapFree(GetProcessHeap(), 0, filename); - return ret; -} - -static PSP_INF_INFORMATION alloc_inf_info(LPCSTR filename, DWORD search, PDWORD size) -{ - PSP_INF_INFORMATION info; - BOOL ret; - - ret = SetupGetInfInformationA(filename, search, NULL, 0, size); - if (!ret) - return NULL; - - info = HeapAlloc(GetProcessHeap(), 0, *size); - return info; -} - -static void test_SetupGetInfInformation(void) -{ - PSP_INF_INFORMATION info; - CHAR inf_filename[MAX_PATH]; - CHAR inf_one[MAX_PATH], inf_two[MAX_PATH]; - LPSTR revfile; - DWORD size; - HINF hinf; - BOOL ret; - - lstrcpyA(inf_filename, CURR_DIR); - lstrcatA(inf_filename, "\\"); - lstrcatA(inf_filename, "test.inf"); - - /* try an invalid inf handle */ - size = 0xdeadbeef; - SetLastError(0xbeefcafe); - ret = SetupGetInfInformationA(NULL, INFINFO_INF_SPEC_IS_HINF, NULL, 0, &size); - ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE || - broken(GetLastError() == ERROR_BAD_PATHNAME) || /* win95 */ - broken(GetLastError() == ERROR_FILE_NOT_FOUND) || /* win98 */ - broken(GetLastError() == ERROR_PATH_NOT_FOUND) || /* NT4 */ - broken(GetLastError() == ERROR_INVALID_NAME) || /* win2k */ - broken(GetLastError() == ERROR_GENERAL_SYNTAX), /* another win2k / winMe */ - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); - ok(size == 0xdeadbeef, "Expected size to remain unchanged\n"); - - /* try an invalid inf filename */ - /* do not use NULL as absolute inf filename on win9x/winMe (crash) */ - if ((GetLastError() != ERROR_BAD_PATHNAME) && /* win95 */ - (GetLastError() != ERROR_FILE_NOT_FOUND) && /* win98 */ - (GetLastError() != ERROR_GENERAL_SYNTAX)) /* winMe */ - { - size = 0xdeadbeef; - SetLastError(0xbeefcafe); - ret = SetupGetInfInformationA(NULL, INFINFO_INF_NAME_IS_ABSOLUTE, NULL, 0, &size); - ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - ok(size == 0xdeadbeef, "Expected size to remain unchanged\n"); - } - - create_inf_file(inf_filename, inf_data1, sizeof(inf_data1) - 1); - - /* try an invalid search flag */ - size = 0xdeadbeef; - SetLastError(0xbeefcafe); - ret = SetupGetInfInformationA(inf_filename, -1, NULL, 0, &size); - ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - ok(size == 0xdeadbeef, "Expected size to remain unchanged\n"); - - /* try a nonexistent inf file */ - size = 0xdeadbeef; - SetLastError(0xbeefcafe); - ret = SetupGetInfInformationA("idontexist", INFINFO_INF_NAME_IS_ABSOLUTE, NULL, 0, &size); - ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - ok(size == 0xdeadbeef, "Expected size to remain unchanged\n"); - - /* successfully open the inf file */ - size = 0xdeadbeef; - ret = SetupGetInfInformationA(inf_filename, INFINFO_INF_NAME_IS_ABSOLUTE, NULL, 0, &size); - ok(ret == TRUE, "Expected SetupGetInfInformation to succeed\n"); - ok(size != 0xdeadbeef, "Expected a valid size on return\n"); - - /* set ReturnBuffer to NULL and ReturnBufferSize to non-zero value 'size' */ - SetLastError(0xbeefcafe); - ret = SetupGetInfInformationA(inf_filename, INFINFO_INF_NAME_IS_ABSOLUTE, NULL, size, &size); - ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - - /* set ReturnBuffer to NULL and ReturnBufferSize to non-zero value 'size-1' */ - ret = SetupGetInfInformationA(inf_filename, INFINFO_INF_NAME_IS_ABSOLUTE, NULL, size-1, &size); - ok(ret == TRUE, "Expected SetupGetInfInformation to succeed\n"); - - /* some tests for behaviour with a NULL RequiredSize pointer */ - ret = SetupGetInfInformationA(inf_filename, INFINFO_INF_NAME_IS_ABSOLUTE, NULL, 0, NULL); - ok(ret == TRUE, "Expected SetupGetInfInformation to succeed\n"); - ret = SetupGetInfInformationA(inf_filename, INFINFO_INF_NAME_IS_ABSOLUTE, NULL, size - 1, NULL); - ok(ret == TRUE, "Expected SetupGetInfInformation to succeed\n"); - ret = SetupGetInfInformationA(inf_filename, INFINFO_INF_NAME_IS_ABSOLUTE, NULL, size, NULL); - ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n"); - - info = HeapAlloc(GetProcessHeap(), 0, size); - - /* try valid ReturnBuffer but too small size */ - SetLastError(0xbeefcafe); - ret = SetupGetInfInformationA(inf_filename, INFINFO_INF_NAME_IS_ABSOLUTE, info, size - 1, &size); - ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - - /* successfully get the inf information */ - ret = SetupGetInfInformationA(inf_filename, INFINFO_INF_NAME_IS_ABSOLUTE, info, size, &size); - ok(ret == TRUE, "Expected SetupGetInfInformation to succeed\n"); - ok(check_info_filename(info, inf_filename), "Expected returned filename to be equal\n"); - - HeapFree(GetProcessHeap(), 0, info); - - /* try the INFINFO_INF_SPEC_IS_HINF search flag */ - hinf = SetupOpenInfFileA(inf_filename, NULL, INF_STYLE_WIN4, NULL); - info = alloc_inf_info(hinf, INFINFO_INF_SPEC_IS_HINF, &size); - ret = SetupGetInfInformationA(hinf, INFINFO_INF_SPEC_IS_HINF, info, size, &size); - ok(ret == TRUE, "Expected SetupGetInfInformation to succeed\n"); - ok(check_info_filename(info, inf_filename), "Expected returned filename to be equal\n"); - SetupCloseInfFile(hinf); - - lstrcpyA(inf_two, WIN_DIR); - lstrcatA(inf_two, "\\system32\\"); - lstrcatA(inf_two, "test.inf"); - create_inf_file(inf_two, inf_data1, sizeof(inf_data1) - 1); - - HeapFree(GetProcessHeap(), 0, info); - info = alloc_inf_info("test.inf", INFINFO_DEFAULT_SEARCH, &size); - - /* check if system32 is searched for inf */ - ret = SetupGetInfInformationA("test.inf", INFINFO_DEFAULT_SEARCH, info, size, &size); - if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) - revfile = inf_one; /* Vista */ - else - revfile = inf_two; - - lstrcpyA(inf_one, WIN_DIR); - lstrcatA(inf_one, "\\inf\\"); - lstrcatA(inf_one, "test.inf"); - create_inf_file(inf_one, inf_data1, sizeof(inf_data1) - 1); - - HeapFree(GetProcessHeap(), 0, info); - info = alloc_inf_info("test.inf", INFINFO_DEFAULT_SEARCH, &size); - - /* test the INFINFO_DEFAULT_SEARCH search flag */ - ret = SetupGetInfInformationA("test.inf", INFINFO_DEFAULT_SEARCH, info, size, &size); - ok(ret == TRUE, "Expected SetupGetInfInformation to succeed: %d\n", GetLastError()); - ok(check_info_filename(info, inf_one), "Expected returned filename to be equal\n"); - - HeapFree(GetProcessHeap(), 0, info); - info = alloc_inf_info("test.inf", INFINFO_REVERSE_DEFAULT_SEARCH, &size); - - /* test the INFINFO_REVERSE_DEFAULT_SEARCH search flag */ - ret = SetupGetInfInformationA("test.inf", INFINFO_REVERSE_DEFAULT_SEARCH, info, size, &size); - ok(ret == TRUE, "Expected SetupGetInfInformation to succeed\n"); - ok(check_info_filename(info, revfile), "Expected returned filename to be equal\n"); - - HeapFree(GetProcessHeap(), 0, info); - - DeleteFileA(inf_filename); - DeleteFileA(inf_one); - DeleteFileA(inf_two); -} - -static void test_SetupGetSourceFileLocation(void) -{ - char buffer[MAX_PATH] = "not empty", inf_filename[MAX_PATH]; - UINT source_id; - DWORD required, error; - HINF hinf; - BOOL ret; - - lstrcpyA(inf_filename, CURR_DIR); - lstrcatA(inf_filename, "\\"); - lstrcatA(inf_filename, "test.inf"); - - create_inf_file(inf_filename, inf_data1, sizeof(inf_data1) - 1); - - hinf = SetupOpenInfFileA(inf_filename, NULL, INF_STYLE_WIN4, NULL); - ok(hinf != INVALID_HANDLE_VALUE, "could not open inf file\n"); - - required = 0; - source_id = 0; - - ret = SetupGetSourceFileLocationA(hinf, NULL, "lanconf.exe", &source_id, buffer, sizeof(buffer), &required); - ok(ret, "SetupGetSourceFileLocation failed\n"); - - ok(required == 1, "unexpected required size: %d\n", required); - ok(source_id == 2, "unexpected source id: %d\n", source_id); - ok(!lstrcmpA("", buffer), "unexpected result string: %s\n", buffer); - - SetupCloseInfFile(hinf); - DeleteFileA(inf_filename); - - create_inf_file(inf_filename, inf_data2, sizeof(inf_data2) - 1); - - SetLastError(0xdeadbeef); - hinf = SetupOpenInfFileA(inf_filename, NULL, INF_STYLE_WIN4, NULL); - error = GetLastError(); - ok(hinf == INVALID_HANDLE_VALUE, "could open inf file\n"); - ok(error == ERROR_WRONG_INF_STYLE, "got wrong error: %d\n", error); - - hinf = SetupOpenInfFileA(inf_filename, NULL, INF_STYLE_OLDNT, NULL); - ok(hinf != INVALID_HANDLE_VALUE, "could not open inf file\n"); - - ret = SetupGetSourceFileLocationA(hinf, NULL, "", &source_id, buffer, sizeof(buffer), &required); - ok(!ret, "SetupGetSourceFileLocation succeeded\n"); - - SetupCloseInfFile(hinf); - DeleteFileA(inf_filename); -} - -static void test_SetupGetSourceInfo(void) -{ - char buffer[MAX_PATH], inf_filename[MAX_PATH]; - DWORD required; - HINF hinf; - BOOL ret; - - lstrcpyA(inf_filename, CURR_DIR); - lstrcatA(inf_filename, "\\"); - lstrcatA(inf_filename, "test.inf"); - - create_inf_file(inf_filename, inf_data1, sizeof(inf_data1) - 1); - - hinf = SetupOpenInfFileA(inf_filename, NULL, INF_STYLE_WIN4, NULL); - ok(hinf != INVALID_HANDLE_VALUE, "could not open inf file\n"); - - required = 0; - - ret = SetupGetSourceInfoA(hinf, 2, SRCINFO_PATH, buffer, sizeof(buffer), &required); - ok(ret, "SetupGetSourceInfoA failed\n"); - - ok(required == 1, "unexpected required size: %d\n", required); - ok(!lstrcmpA("", buffer), "unexpected result string: %s\n", buffer); - - required = 0; - buffer[0] = 0; - - ret = SetupGetSourceInfoA(hinf, 2, SRCINFO_TAGFILE, buffer, sizeof(buffer), &required); - ok(ret, "SetupGetSourceInfoA failed\n"); - - ok(required == 28, "unexpected required size: %d\n", required); - ok(!lstrcmpA("LANCOM\\LANtools\\lanconf.cab", buffer), "unexpected result string: %s\n", buffer); - - required = 0; - buffer[0] = 0; - - ret = SetupGetSourceInfoA(hinf, 2, SRCINFO_DESCRIPTION, buffer, sizeof(buffer), &required); - ok(ret, "SetupGetSourceInfoA failed\n"); - - ok(required == 19, "unexpected required size: %d\n", required); - ok(!lstrcmpA("LANCOM Software CD", buffer), "unexpected result string: %s\n", buffer); - - SetupCloseInfFile(hinf); - DeleteFileA(inf_filename); -} - -static void test_SetupGetTargetPath(void) -{ - char buffer[MAX_PATH], inf_filename[MAX_PATH]; - char destfile[MAX_PATH]; - DWORD required; - HINF hinf; - INFCONTEXT ctx; - BOOL ret; - - lstrcpyA(inf_filename, CURR_DIR); - lstrcatA(inf_filename, "\\"); - lstrcatA(inf_filename, "test.inf"); - - create_inf_file(inf_filename, inf_data1, sizeof(inf_data1) - 1); - - hinf = SetupOpenInfFileA(inf_filename, NULL, INF_STYLE_WIN4, NULL); - ok(hinf != INVALID_HANDLE_VALUE, "could not open inf file\n"); - - ctx.Inf = hinf; - ctx.CurrentInf = hinf; - ctx.Section = 7; - ctx.Line = 0; - - required = 0; - - ret = SetupGetTargetPathA(hinf, &ctx, NULL, buffer, sizeof(buffer), &required); - ok(ret, "SetupGetTargetPathA failed\n"); - ok(required == 10, "unexpected required size: %d\n", required); - /* Retrieve the system drive from the windows directory. - * (%SystemDrive% is not available on Win9x) - */ - lstrcpyA(destfile, WIN_DIR); - destfile[3] = '\0'; - lstrcatA(destfile, "LANCOM"); - ok(!lstrcmpiA(destfile, buffer), "unexpected result string: %s\n", buffer); - - SetupCloseInfFile(hinf); - DeleteFileA(inf_filename); - - create_inf_file(inf_filename, inf_data3, sizeof(inf_data3) - 1); - - hinf = SetupOpenInfFileA(inf_filename, NULL, INF_STYLE_WIN4, NULL); - ok(hinf != INVALID_HANDLE_VALUE, "could not open inf file\n"); - - required = 0; - - ret = SetupGetTargetPathA(hinf, NULL, "CopyAlways.Windir.Files", buffer, sizeof(buffer), &required); - ok(ret, "SetupGetTargetPathA failed\n"); - - lstrcpyA(destfile, WIN_DIR); - - ok(required == lstrlenA(destfile) + 1, "unexpected required size: %d\n", required); - ok(!lstrcmpiA(buffer, destfile), "unexpected path: %s\n", buffer); - - SetupCloseInfFile(hinf); - DeleteFileA(inf_filename); - - create_inf_file(inf_filename, inf_data4, sizeof(inf_data4) - 1); - - hinf = SetupOpenInfFileA(inf_filename, NULL, INF_STYLE_WIN4, NULL); - ok(hinf != INVALID_HANDLE_VALUE, "could not open inf file\n"); - - required = 0; - - ret = SetupGetTargetPathA(hinf, NULL, "CopyAlways.System32.Files", buffer, sizeof(buffer), &required); - ok(ret, "SetupGetTargetPathA failed\n"); - - GetSystemDirectoryA(destfile, MAX_PATH); - - ok(required == lstrlenA(destfile) + 1, "unexpected required size: %d\n", required); - ok(!lstrcmpiA(buffer, destfile), "unexpected path: %s\n", buffer); - - SetupCloseInfFile(hinf); - DeleteFileA(inf_filename); - - create_inf_file(inf_filename, inf_data5, sizeof(inf_data5) - 1); - - hinf = SetupOpenInfFileA(inf_filename, NULL, INF_STYLE_WIN4, NULL); - ok(hinf != INVALID_HANDLE_VALUE, "could not open inf file\n"); - - required = 0; - - ret = SetupGetTargetPathA(hinf, NULL, "CopyAlways.Windir.Files", buffer, sizeof(buffer), &required); - ok(ret, "SetupGetTargetPathA failed\n"); - - lstrcpyA(destfile, WIN_DIR); - - ok(required == lstrlenA(destfile) + 1, "unexpected required size: %d\n", required); - ok(!lstrcmpiA(buffer, destfile), "unexpected path: %s\n", buffer); - - SetupCloseInfFile(hinf); - DeleteFileA(inf_filename); - - create_inf_file(inf_filename, inf_data6, sizeof(inf_data6) - 1); - - hinf = SetupOpenInfFileA(inf_filename, NULL, INF_STYLE_WIN4, NULL); - ok(hinf != INVALID_HANDLE_VALUE, "could not open inf file\n"); - - required = 0; - - ret = SetupGetTargetPathA(hinf, NULL, "CopyAlways.Windir.Files", buffer, sizeof(buffer), &required); - ok(ret, "SetupGetTargetPathA failed\n"); - - lstrcpyA(destfile, WIN_DIR); - - ok(required == lstrlenA(destfile) + 1, "unexpected required size: %d\n", required); - ok(!lstrcmpiA(buffer, destfile), "unexpected path: %s\n", buffer); - - SetupCloseInfFile(hinf); - DeleteFileA(inf_filename); -} - -START_TEST(query) -{ - get_directories(); - - test_SetupGetInfInformation(); - test_SetupGetSourceFileLocation(); - test_SetupGetSourceInfo(); - test_SetupGetTargetPath(); -} diff --git a/rostests/winetests/setupapi/setupapi.rbuild b/rostests/winetests/setupapi/setupapi.rbuild deleted file mode 100644 index 4689c48d0d5..00000000000 --- a/rostests/winetests/setupapi/setupapi.rbuild +++ /dev/null @@ -1,19 +0,0 @@ - - - - . - - ntdll - advapi32 - setupapi - user32 - devclass.c - devinst.c - install.c - misc.c - parser.c - query.c - setupcab.c - stringtable.c - testlist.c - diff --git a/rostests/winetests/setupapi/setupcab.c b/rostests/winetests/setupapi/setupcab.c deleted file mode 100644 index 47a9ab95126..00000000000 --- a/rostests/winetests/setupapi/setupcab.c +++ /dev/null @@ -1,456 +0,0 @@ -/* - * Unit tests for SetupIterateCabinet - * - * Copyright 2007 Hans Leidekker - * Copyright 2010 Andrew Nguyen - * - * 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 "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winreg.h" -#include "setupapi.h" -#include "wine/test.h" - -static const BYTE comp_cab_zip_multi[] = { - 0x4d, 0x53, 0x43, 0x46, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x01, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd1, 0x38, 0xf0, 0x48, 0x20, 0x00, 0x74, 0x72, 0x69, 0x73, - 0x74, 0x72, 0x61, 0x6d, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd1, - 0x38, 0xf0, 0x48, 0x20, 0x00, 0x77, 0x69, 0x6e, 0x65, 0x00, 0x08, 0x00, 0x00, 0x00, 0x18, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xd1, 0x38, 0xf0, 0x48, 0x20, 0x00, 0x73, 0x68, 0x61, 0x6e, 0x64, 0x79, - 0x00, 0x67, 0x2c, 0x03, 0x85, 0x23, 0x00, 0x20, 0x00, 0x43, 0x4b, 0xcb, 0x49, 0x2c, 0x2d, 0x4a, - 0xcd, 0x4b, 0x4e, 0xe5, 0xe5, 0x2a, 0xcd, 0x4b, 0xce, 0xcf, 0x2d, 0x28, 0x4a, 0x2d, 0x2e, 0x4e, - 0x4d, 0xe1, 0xe5, 0x2a, 0x2e, 0x49, 0x2d, 0xca, 0x03, 0x8a, 0x02, 0x00 -}; - -static const WCHAR docW[] = {'d','o','c',0}; - -static void create_source_fileA(LPSTR filename, const BYTE *data, DWORD size) -{ - HANDLE handle; - DWORD written; - - handle = CreateFileA(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, NULL); - WriteFile(handle, data, size, &written, NULL); - CloseHandle(handle); -} - -static void create_source_fileW(LPWSTR filename, const BYTE *data, DWORD size) -{ - HANDLE handle; - DWORD written; - - handle = CreateFileW(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, NULL); - WriteFile(handle, data, size, &written, NULL); - CloseHandle(handle); -} - -static UINT CALLBACK dummy_callbackA(PVOID Context, UINT Notification, - UINT_PTR Param1, UINT_PTR Param2) -{ - ok(0, "Received unexpected notification (%p, %u, %lu, %lu)\n", Context, - Notification, Param1, Param2); - return 0; -} - -static UINT CALLBACK dummy_callbackW(PVOID Context, UINT Notification, - UINT_PTR Param1, UINT_PTR Param2) -{ - ok(0, "Received unexpected notification (%p, %u, %lu, %lu)\n", Context, - Notification, Param1, Param2); - return 0; -} - -static void test_invalid_parametersA(void) -{ - BOOL ret; - char source[MAX_PATH], temp[MAX_PATH]; - int i; - - const struct - { - PCSTR CabinetFile; - PSP_FILE_CALLBACK MsgHandler; - DWORD expected_lasterror; - int todo_lasterror; - } invalid_parameters[] = - { - {NULL, NULL, ERROR_INVALID_PARAMETER}, - {NULL, dummy_callbackA, ERROR_INVALID_PARAMETER}, - {"c:\\nonexistent.cab", NULL, ERROR_FILE_NOT_FOUND}, - {"c:\\nonexistent.cab", dummy_callbackA, ERROR_FILE_NOT_FOUND}, - {source, NULL, ERROR_INVALID_DATA, 1}, - {source, dummy_callbackA, ERROR_INVALID_DATA, 1}, - }; - - GetTempPathA(sizeof(temp), temp); - GetTempFileNameA(temp, "doc", 0, source); - - create_source_fileA(source, NULL, 0); - - for (i = 0; i < sizeof(invalid_parameters)/sizeof(invalid_parameters[0]); i++) - { - SetLastError(0xdeadbeef); - ret = SetupIterateCabinetA(invalid_parameters[i].CabinetFile, 0, - invalid_parameters[i].MsgHandler, NULL); - ok(!ret, "[%d] Expected SetupIterateCabinetA to return 0, got %d\n", i, ret); - if (invalid_parameters[i].todo_lasterror) - { - todo_wine - ok(GetLastError() == invalid_parameters[i].expected_lasterror, - "[%d] Expected GetLastError() to return %u, got %u\n", - i, invalid_parameters[i].expected_lasterror, GetLastError()); - } - else - { - ok(GetLastError() == invalid_parameters[i].expected_lasterror, - "[%d] Expected GetLastError() to return %u, got %u\n", - i, invalid_parameters[i].expected_lasterror, GetLastError()); - } - } - - SetLastError(0xdeadbeef); - ret = SetupIterateCabinetA("", 0, NULL, NULL); - ok(!ret, "Expected SetupIterateCabinetA to return 0, got %d\n", ret); - ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY || - GetLastError() == ERROR_FILE_NOT_FOUND, /* Win9x/NT4/Win2k */ - "Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %u\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ret = SetupIterateCabinetA("", 0, dummy_callbackA, NULL); - ok(!ret, "Expected SetupIterateCabinetA to return 0, got %d\n", ret); - ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY || - GetLastError() == ERROR_FILE_NOT_FOUND, /* Win9x/NT4/Win2k */ - "Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %u\n", - GetLastError()); - - DeleteFileA(source); -} - -static void test_invalid_parametersW(void) -{ - static const WCHAR nonexistentW[] = {'c',':','\\','n','o','n','e','x','i','s','t','e','n','t','.','c','a','b',0}; - static const WCHAR emptyW[] = {0}; - - BOOL ret; - WCHAR source[MAX_PATH], temp[MAX_PATH]; - int i; - - const struct - { - PCWSTR CabinetFile; - PSP_FILE_CALLBACK MsgHandler; - DWORD expected_lasterror; - int todo_lasterror; - } invalid_parameters[] = - { - {nonexistentW, NULL, ERROR_FILE_NOT_FOUND}, - {nonexistentW, dummy_callbackW, ERROR_FILE_NOT_FOUND}, - {source, NULL, ERROR_INVALID_DATA, 1}, - {source, dummy_callbackW, ERROR_INVALID_DATA, 1}, - }; - - ret = SetupIterateCabinetW(NULL, 0, NULL, NULL); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("SetupIterateCabinetW is not available\n"); - return; - } - - GetTempPathW(sizeof(temp)/sizeof(WCHAR), temp); - GetTempFileNameW(temp, docW, 0, source); - - create_source_fileW(source, NULL, 0); - - for (i = 0; i < sizeof(invalid_parameters)/sizeof(invalid_parameters[0]); i++) - { - SetLastError(0xdeadbeef); - ret = SetupIterateCabinetW(invalid_parameters[i].CabinetFile, 0, - invalid_parameters[i].MsgHandler, NULL); - ok(!ret, "[%d] Expected SetupIterateCabinetW to return 0, got %d\n", i, ret); - if (invalid_parameters[i].todo_lasterror) - { - todo_wine - ok(GetLastError() == invalid_parameters[i].expected_lasterror, - "[%d] Expected GetLastError() to return %u, got %u\n", - i, invalid_parameters[i].expected_lasterror, GetLastError()); - } - else - { - ok(GetLastError() == invalid_parameters[i].expected_lasterror, - "[%d] Expected GetLastError() to return %u, got %u\n", - i, invalid_parameters[i].expected_lasterror, GetLastError()); - } - } - - SetLastError(0xdeadbeef); - ret = SetupIterateCabinetW(NULL, 0, NULL, NULL); - ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_NOT_ENOUGH_MEMORY, /* Vista/Win2k8 */ - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ret = SetupIterateCabinetW(NULL, 0, dummy_callbackW, NULL); - ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER || - GetLastError() == ERROR_NOT_ENOUGH_MEMORY, /* Vista/Win2k8 */ - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ret = SetupIterateCabinetW(emptyW, 0, NULL, NULL); - ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret); - ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY || - GetLastError() == ERROR_FILE_NOT_FOUND, /* NT4/Win2k */ - "Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %u\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ret = SetupIterateCabinetW(emptyW, 0, dummy_callbackW, NULL); - ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret); - ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY || - GetLastError() == ERROR_FILE_NOT_FOUND, /* NT4/Win2k */ - "Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %u\n", - GetLastError()); - - DeleteFileW(source); -} - -static UINT CALLBACK crash_callbackA(PVOID Context, UINT Notification, - UINT_PTR Param1, UINT_PTR Param2) -{ - *(volatile char*)0 = 2; - return 0; -} - -static UINT CALLBACK crash_callbackW(PVOID Context, UINT Notification, - UINT_PTR Param1, UINT_PTR Param2) -{ - *(volatile char*)0 = 2; - return 0; -} - -static void test_invalid_callbackA(void) -{ - BOOL ret; - char source[MAX_PATH], temp[MAX_PATH]; - - GetTempPathA(sizeof(temp), temp); - GetTempFileNameA(temp, "doc", 0, source); - - create_source_fileA(source, comp_cab_zip_multi, sizeof(comp_cab_zip_multi)); - - SetLastError(0xdeadbeef); - ret = SetupIterateCabinetA(source, 0, NULL, NULL); - ok(!ret, "Expected SetupIterateCabinetA to return 0, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_DATA, - "Expected GetLastError() to return ERROR_INVALID_DATA, got %u\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ret = SetupIterateCabinetA(source, 0, crash_callbackA, NULL); - ok(!ret, "Expected SetupIterateCabinetA to return 0, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_DATA, - "Expected GetLastError() to return ERROR_INVALID_DATA, got %u\n", - GetLastError()); - - DeleteFileA(source); -} - -static void test_invalid_callbackW(void) -{ - BOOL ret; - WCHAR source[MAX_PATH], temp[MAX_PATH]; - - ret = SetupIterateCabinetW(NULL, 0, NULL, NULL); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("SetupIterateCabinetW is not available\n"); - return; - } - - GetTempPathW(sizeof(temp)/sizeof(WCHAR), temp); - GetTempFileNameW(temp, docW, 0, source); - - create_source_fileW(source, comp_cab_zip_multi, sizeof(comp_cab_zip_multi)); - - SetLastError(0xdeadbeef); - ret = SetupIterateCabinetW(source, 0, NULL, NULL); - ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_DATA, - "Expected GetLastError() to return ERROR_INVALID_DATA, got %u\n", - GetLastError()); - - SetLastError(0xdeadbeef); - ret = SetupIterateCabinetW(source, 0, crash_callbackW, NULL); - ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_DATA, - "Expected GetLastError() to return ERROR_INVALID_DATA, got %u\n", - GetLastError()); - - DeleteFileW(source); -} - -static const char *expected_files[] = {"tristram", "wine", "shandy"}; - -static UINT CALLBACK simple_callbackA(PVOID Context, UINT Notification, - UINT_PTR Param1, UINT_PTR Param2) -{ - static int index; - int *file_count = Context; - - switch (Notification) - { - case SPFILENOTIFY_CABINETINFO: - index = 0; - return NO_ERROR; - case SPFILENOTIFY_FILEINCABINET: - { - FILE_IN_CABINET_INFO_A *info = (FILE_IN_CABINET_INFO_A *)Param1; - - (*file_count)++; - - if (index < sizeof(expected_files)/sizeof(char *)) - { - ok(!strcmp(expected_files[index], info->NameInCabinet), - "[%d] Expected file \"%s\", got \"%s\"\n", - index, expected_files[index], info->NameInCabinet); - index++; - return FILEOP_SKIP; - } - else - { - ok(0, "Unexpectedly enumerated more than number of files in cabinet, index = %d\n", index); - return FILEOP_ABORT; - } - } - default: - return NO_ERROR; - } -} - -static void test_simple_enumerationA(void) -{ - BOOL ret; - char source[MAX_PATH], temp[MAX_PATH]; - int enum_count = 0; - - GetTempPathA(sizeof(temp), temp); - GetTempFileNameA(temp, "doc", 0, source); - - create_source_fileA(source, comp_cab_zip_multi, sizeof(comp_cab_zip_multi)); - - ret = SetupIterateCabinetA(source, 0, simple_callbackA, &enum_count); - ok(ret == 1, "Expected SetupIterateCabinetA to return 1, got %d\n", ret); - ok(enum_count == sizeof(expected_files)/sizeof(char *), - "Unexpectedly enumerated %d files\n", enum_count); - - DeleteFileA(source); -} - -static const WCHAR tristramW[] = {'t','r','i','s','t','r','a','m',0}; -static const WCHAR wineW[] = {'w','i','n','e',0}; -static const WCHAR shandyW[] = {'s','h','a','n','d','y',0}; -static const WCHAR *expected_filesW[] = {tristramW, wineW, shandyW}; - -static UINT CALLBACK simple_callbackW(PVOID Context, UINT Notification, - UINT_PTR Param1, UINT_PTR Param2) -{ - static int index; - int *file_count = Context; - - switch (Notification) - { - case SPFILENOTIFY_CABINETINFO: - index = 0; - return NO_ERROR; - case SPFILENOTIFY_FILEINCABINET: - { - FILE_IN_CABINET_INFO_W *info = (FILE_IN_CABINET_INFO_W *)Param1; - - (*file_count)++; - - if (index < sizeof(expected_filesW)/sizeof(WCHAR *)) - { - ok(!lstrcmpW(expected_filesW[index], info->NameInCabinet), - "[%d] Expected file %s, got %s\n", - index, wine_dbgstr_w(expected_filesW[index]), wine_dbgstr_w(info->NameInCabinet)); - index++; - return FILEOP_SKIP; - } - else - { - ok(0, "Unexpectedly enumerated more than number of files in cabinet, index = %d\n", index); - return FILEOP_ABORT; - } - } - default: - return NO_ERROR; - } -} - -static void test_simple_enumerationW(void) -{ - BOOL ret; - WCHAR source[MAX_PATH], temp[MAX_PATH]; - int enum_count = 0; - - ret = SetupIterateCabinetW(NULL, 0, NULL, NULL); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("SetupIterateCabinetW is not available\n"); - return; - } - - GetTempPathW(sizeof(temp)/sizeof(WCHAR), temp); - GetTempFileNameW(temp, docW, 0, source); - - create_source_fileW(source, comp_cab_zip_multi, sizeof(comp_cab_zip_multi)); - - ret = SetupIterateCabinetW(source, 0, simple_callbackW, &enum_count); - ok(ret == 1, "Expected SetupIterateCabinetW to return 1, got %d\n", ret); - ok(enum_count == sizeof(expected_files)/sizeof(WCHAR *), - "Unexpectedly enumerated %d files\n", enum_count); - - DeleteFileW(source); -} - -START_TEST(setupcab) -{ - test_invalid_parametersA(); - test_invalid_parametersW(); - - /* Tests crash on NT4/Win9x/Win2k and Wine. */ - if (0) - { - test_invalid_callbackA(); - test_invalid_callbackW(); - } - - test_simple_enumerationA(); - test_simple_enumerationW(); -} diff --git a/rostests/winetests/setupapi/stringtable.c b/rostests/winetests/setupapi/stringtable.c deleted file mode 100644 index fbe1037da8a..00000000000 --- a/rostests/winetests/setupapi/stringtable.c +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Unit test suite for StringTable functions - * - * Copyright 2005 Steven Edwards for ReactOS - * - * 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: - * Add test for StringTableStringFromIdEx - */ - -#include - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winreg.h" -#include "setupapi.h" - -#include "wine/test.h" - -/* Flags for StringTableAddString and StringTableLookUpString */ -#define ST_CASE_SENSITIVE_COMPARE 0x00000001 - -static DWORD (WINAPI *pStringTableAddString)(HSTRING_TABLE, LPWSTR, DWORD); -static DWORD (WINAPI *pStringTableAddStringEx)(HSTRING_TABLE, LPWSTR, DWORD, LPVOID, DWORD); -static VOID (WINAPI *pStringTableDestroy)(HSTRING_TABLE); -static HSTRING_TABLE (WINAPI *pStringTableDuplicate)(HSTRING_TABLE hStringTable); -static HSTRING_TABLE (WINAPI *pStringTableInitialize)(VOID); -static HSTRING_TABLE (WINAPI *pStringTableInitializeEx)(DWORD, DWORD); -static DWORD (WINAPI *pStringTableLookUpString)(HSTRING_TABLE, LPWSTR, DWORD); -static DWORD (WINAPI *pStringTableLookUpStringEx)(HSTRING_TABLE, LPWSTR, DWORD, LPVOID, DWORD); -static LPWSTR (WINAPI *pStringTableStringFromId)(HSTRING_TABLE, DWORD); -#if 0 -static BOOL (WINAPI *pStringTableStringFromIdEx)(HSTRING_TABLE, DWORD, LPWSTR, LPDWORD); -static VOID (WINAPI *pStringTableTrim)(HSTRING_TABLE); -#endif - -HMODULE hdll; -static WCHAR string[] = {'s','t','r','i','n','g',0}; -static WCHAR String[] = {'S','t','r','i','n','g',0}; -static WCHAR foo[] = {'f','o','o',0}; - -static void load_it_up(void) -{ - hdll = GetModuleHandleA("setupapi.dll"); - - pStringTableInitialize = (void*)GetProcAddress(hdll, "StringTableInitialize"); - if (!pStringTableInitialize) - pStringTableInitialize = (void*)GetProcAddress(hdll, "pSetupStringTableInitialize"); - - pStringTableInitializeEx = (void*)GetProcAddress(hdll, "StringTableInitializeEx"); - if (!pStringTableInitializeEx) - pStringTableInitializeEx = (void*)GetProcAddress(hdll, "pSetupStringTableInitializeEx"); - - pStringTableAddString = (void*)GetProcAddress(hdll, "StringTableAddString"); - if (!pStringTableAddString) - pStringTableAddString = (void*)GetProcAddress(hdll, "pSetupStringTableAddString"); - - pStringTableAddStringEx = (void*)GetProcAddress(hdll, "StringTableAddStringEx"); - if (!pStringTableAddStringEx) - pStringTableAddStringEx = (void*)GetProcAddress(hdll, "pSetupStringTableAddStringEx"); - - pStringTableDuplicate = (void*)GetProcAddress(hdll, "StringTableDuplicate"); - if (!pStringTableDuplicate) - pStringTableDuplicate = (void*)GetProcAddress(hdll, "pSetupStringTableDuplicate"); - - pStringTableDestroy = (void*)GetProcAddress(hdll, "StringTableDestroy"); - if (!pStringTableDestroy) - pStringTableDestroy = (void*)GetProcAddress(hdll, "pSetupStringTableDestroy"); - - pStringTableLookUpString = (void*)GetProcAddress(hdll, "StringTableLookUpString"); - if (!pStringTableLookUpString) - pStringTableLookUpString = (void*)GetProcAddress(hdll, "pSetupStringTableLookUpString"); - - pStringTableLookUpStringEx = (void*)GetProcAddress(hdll, "StringTableLookUpStringEx"); - if (!pStringTableLookUpStringEx) - pStringTableLookUpStringEx = (void*)GetProcAddress(hdll, "pSetupStringTableLookUpStringEx"); - - pStringTableStringFromId = (void*)GetProcAddress(hdll, "StringTableStringFromId"); - if (!pStringTableStringFromId) - pStringTableStringFromId = (void*)GetProcAddress(hdll, "pSetupStringTableStringFromId"); -} - -static void test_StringTableAddString(void) -{ - DWORD retval, hstring, hString, hfoo; - HANDLE table; - - table = pStringTableInitialize(); - ok(table != NULL, "failed to initialize string table\n"); - - /* case insensitive */ - hstring=pStringTableAddString(table,string,0); - ok(hstring!=-1,"Failed to add string to String Table\n"); - - retval=pStringTableAddString(table,String,0); - ok(retval!=-1,"Failed to add String to String Table\n"); - ok(hstring==retval,"string handle %x != String handle %x in String Table\n", hstring, retval); - - hfoo=pStringTableAddString(table,foo,0); - ok(hfoo!=-1,"Failed to add foo to String Table\n"); - ok(hfoo!=hstring,"foo and string share the same ID %x in String Table\n", hfoo); - - /* case sensitive */ - hString=pStringTableAddString(table,String,ST_CASE_SENSITIVE_COMPARE); - ok(hstring!=hString,"String handle and string share same ID %x in Table\n", hstring); - - pStringTableDestroy(table); -} - -static void test_StringTableAddStringEx(void) -{ - DWORD retval, hstring, hString, hfoo; - HANDLE table; - - table = pStringTableInitialize(); - ok(table != NULL,"Failed to Initialize String Table\n"); - - /* case insensitive */ - hstring = pStringTableAddStringEx(table, string, 0, NULL, 0); - ok(hstring != ~0u, "Failed to add string to String Table\n"); - - retval = pStringTableAddStringEx(table, String, 0, NULL, 0); - ok(retval != ~0u, "Failed to add String to String Table\n"); - ok(hstring == retval, "string handle %x != String handle %x in String Table\n", hstring, retval); - - hfoo = pStringTableAddStringEx(table, foo, 0, NULL, 0); - ok(hfoo != ~0u, "Failed to add foo to String Table\n"); - ok(hfoo != hstring, "foo and string share the same ID %x in String Table\n", hfoo); - - /* case sensitive */ - hString = pStringTableAddStringEx(table, String, ST_CASE_SENSITIVE_COMPARE, NULL, 0); - ok(hstring != hString, "String handle and string share same ID %x in Table\n", hstring); - - pStringTableDestroy(table); -} - -static void test_StringTableDuplicate(void) -{ - HANDLE table, table2; - - table = pStringTableInitialize(); - ok(table != NULL,"Failed to Initialize String Table\n"); - - table2=pStringTableDuplicate(table); - ok(table2!=NULL,"Failed to duplicate String Table\n"); - - pStringTableDestroy(table); - pStringTableDestroy(table2); -} - -static void test_StringTableLookUpString(void) -{ - DWORD retval, retval2, hstring, hString, hfoo; - HANDLE table, table2; - - table = pStringTableInitialize(); - ok(table != NULL,"failed to initialize string table\n"); - - hstring = pStringTableAddString(table, string, 0); - ok(hstring != ~0u, "failed to add 'string' to string table\n"); - - hString = pStringTableAddString(table, String, 0); - ok(hString != ~0u,"failed to add 'String' to string table\n"); - - hfoo = pStringTableAddString(table, foo, 0); - ok(hfoo != ~0u, "failed to add 'foo' to string table\n"); - - table2 = pStringTableDuplicate(table); - ok(table2 != NULL, "Failed to duplicate String Table\n"); - - /* case insensitive */ - retval=pStringTableLookUpString(table,string,0); - ok(retval!=-1,"Failed find string in String Table 1\n"); - ok(retval==hstring, - "Lookup for string (%x) does not match previous handle (%x) in String Table 1\n", - retval, hstring); - - retval=pStringTableLookUpString(table2,string,0); - ok(retval!=-1,"Failed find string in String Table 2\n"); - - retval=pStringTableLookUpString(table,String,0); - ok(retval!=-1,"Failed find String in String Table 1\n"); - - retval=pStringTableLookUpString(table2,String,0); - ok(retval!=-1,"Failed find String in String Table 2\n"); - - retval=pStringTableLookUpString(table,foo,0); - ok(retval!=-1,"Failed find foo in String Table 1\n"); - ok(retval==hfoo, - "Lookup for foo (%x) does not match previous handle (%x) in String Table 1\n", - retval, hfoo); - - retval=pStringTableLookUpString(table2,foo,0); - ok(retval!=-1,"Failed find foo in String Table 2\n"); - - /* case sensitive */ - retval=pStringTableLookUpString(table,string,ST_CASE_SENSITIVE_COMPARE); - retval2=pStringTableLookUpString(table,String,ST_CASE_SENSITIVE_COMPARE); - ok(retval!=retval2,"Lookup of string equals String in Table 1\n"); - ok(retval==hString, - "Lookup for String (%x) does not match previous handle (%x) in String Table 1\n", - retval, hString); - - pStringTableDestroy(table); - pStringTableDestroy(table2); -} - -static void test_StringTableLookUpStringEx(void) -{ - static WCHAR uilevel[] = {'U','I','L','E','V','E','L',0}; - DWORD retval, retval2, hstring, hString, hfoo, data; - HANDLE table, table2; - char buffer[4]; - - table = pStringTableInitialize(); - ok(table != NULL,"Failed to Initialize String Table\n"); - - hstring = pStringTableAddString(table, string, 0); - ok(hstring != ~0u, "failed to add 'string' to string table\n"); - - hString = pStringTableAddString(table, String, 0); - ok(hString != ~0u,"failed to add 'String' to string table\n"); - - hfoo = pStringTableAddString(table, foo, 0); - ok(hfoo != ~0u, "failed to add 'foo' to string table\n"); - - table2 = pStringTableDuplicate(table); - ok(table2 != NULL, "Failed to duplicate String Table\n"); - - /* case insensitive */ - retval = pStringTableLookUpStringEx(table, string, 0, NULL, 0); - ok(retval != ~0u, "Failed find string in String Table 1\n"); - ok(retval == hstring, - "Lookup for string (%x) does not match previous handle (%x) in String Table 1\n", - retval, hstring); - - retval = pStringTableLookUpStringEx(table2, string, 0, NULL, 0); - ok(retval != ~0u, "Failed find string in String Table 2\n"); - - retval = pStringTableLookUpStringEx(table, String, 0, NULL, 0); - ok(retval != ~0u, "Failed find String in String Table 1\n"); - - retval = pStringTableLookUpStringEx(table2, String, 0, NULL, 0); - ok(retval != ~0u, "Failed find String in String Table 2\n"); - - retval=pStringTableLookUpStringEx(table, foo, 0, NULL, 0); - ok(retval != ~0u, "Failed find foo in String Table 1\n"); - ok(retval == hfoo, - "Lookup for foo (%x) does not match previous handle (%x) in String Table 1\n", - retval, hfoo); - - retval = pStringTableLookUpStringEx(table2, foo, 0, NULL, 0); - ok(retval != ~0u, "Failed find foo in String Table 2\n"); - - /* case sensitive */ - retval = pStringTableLookUpStringEx(table, string,ST_CASE_SENSITIVE_COMPARE, NULL, 0); - retval2 = pStringTableLookUpStringEx(table, String, ST_CASE_SENSITIVE_COMPARE, NULL, 0); - ok(retval != retval2, "Lookup of string equals String in Table 1\n"); - ok(retval == hString, - "Lookup for String (%x) does not match previous handle (%x) in String Table 1\n", - retval, hString); - - pStringTableDestroy(table); - - table = pStringTableInitializeEx(0x1000, 0); - ok(table != NULL, "failed to initialize string table\n"); - - data = 0xaaaaaaaa; - retval = pStringTableAddStringEx(table, uilevel, 0x5, &data, sizeof(data)); - ok(retval != ~0u, "failed to add 'UILEVEL' to string table\n"); - - memset(buffer, 0x55, sizeof(buffer)); - retval = pStringTableLookUpStringEx(table, uilevel, ST_CASE_SENSITIVE_COMPARE, buffer, 0); - ok(retval != ~0u, "failed find 'UILEVEL' in string table\n"); - ok(memcmp(buffer, &data, 4), "unexpected data\n"); - - memset(buffer, 0x55, sizeof(buffer)); - retval = pStringTableLookUpStringEx(table, uilevel, ST_CASE_SENSITIVE_COMPARE, buffer, 2); - ok(retval != ~0u, "failed find 'UILEVEL' in string table\n"); - ok(!memcmp(buffer, &data, 2), "unexpected data\n"); - - memset(buffer, 0x55, sizeof(buffer)); - retval = pStringTableLookUpStringEx(table, uilevel, ST_CASE_SENSITIVE_COMPARE, buffer, sizeof(buffer)); - ok(retval != ~0u, "failed find 'UILEVEL' in string table\n"); - ok(!memcmp(buffer, &data, 4), "unexpected data\n"); - - pStringTableDestroy(table); - pStringTableDestroy(table2); -} - -static void test_StringTableStringFromId(void) -{ - HANDLE table; - DWORD hstring; - WCHAR *string2; - int result; - - table = pStringTableInitialize(); - ok(table != NULL,"Failed to Initialize String Table\n"); - - hstring = pStringTableAddString(table, string, 0); - ok(hstring != ~0u,"failed to add 'string' to string table\n"); - - /* correct */ - string2=pStringTableStringFromId(table,pStringTableLookUpString(table,string,0)); - ok(string2!=NULL,"Failed to look up string by ID from String Table\n"); - - result=lstrcmpiW(string, string2); - ok(result==0,"StringID %p does not match requested StringID %p\n",string,string2); - - pStringTableDestroy(table); -} - -START_TEST(stringtable) -{ - load_it_up(); - - test_StringTableAddString(); - test_StringTableAddStringEx(); - test_StringTableDuplicate(); - test_StringTableLookUpString(); - test_StringTableLookUpStringEx(); - test_StringTableStringFromId(); -} diff --git a/rostests/winetests/setupapi/testlist.c b/rostests/winetests/setupapi/testlist.c deleted file mode 100644 index bfa1f9ce0e4..00000000000 --- a/rostests/winetests/setupapi/testlist.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_devclass(void); -extern void func_devinst(void); -extern void func_install(void); -extern void func_misc(void); -extern void func_parser(void); -extern void func_query(void); -extern void func_setupcab(void); -extern void func_stringtable(void); - -const struct test winetest_testlist[] = -{ - { "devclass", func_devclass }, - { "devinst", func_devinst }, - { "install", func_install }, - { "misc", func_misc }, - { "parser", func_parser }, - { "query", func_query }, - { "setupcab", func_setupcab }, - { "stringtable", func_stringtable }, - { 0, 0 } -}; diff --git a/rostests/winetests/shdocvw/CMakeLists.txt b/rostests/winetests/shdocvw/CMakeLists.txt deleted file mode 100644 index 5bf15d81a79..00000000000 --- a/rostests/winetests/shdocvw/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - intshcut.c - shdocvw.c - shortcut.c - webbrowser.c - testlist.c) - -add_executable(shdocvw_winetest ${SOURCE}) -target_link_libraries(shdocvw_winetest wine uuid) -set_module_type(shdocvw_winetest win32cui) -add_importlibs(shdocvw_winetest gdi32 shell32 ole32 oleaut32 user32 advapi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET shdocvw_winetest DESTINATION reactos/bin FOR all) - -if(NOT MSVC) - allow_warnings(shdocvw_winetest) -endif() diff --git a/rostests/winetests/shdocvw/intshcut.c b/rostests/winetests/shdocvw/intshcut.c deleted file mode 100644 index cf0b2251b93..00000000000 --- a/rostests/winetests/shdocvw/intshcut.c +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Unit tests to document InternetShortcut's behaviour - * - * Copyright 2008 Damjan Jovanovic - * - * 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 - -#define COBJMACROS - -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "winerror.h" - -#include "shlobj.h" -#include "shobjidl.h" -#include "shlguid.h" -#include "ole2.h" -#include "initguid.h" -#include "isguids.h" -#include "intshcut.h" - -#include "wine/test.h" - -static HRESULT WINAPI Unknown_QueryInterface(IUnknown *pUnknown, REFIID riid, void **ppvObject) -{ - if (IsEqualGUID(&IID_IUnknown, riid)) - { - *ppvObject = pUnknown; - return S_OK; - } - return E_NOINTERFACE; -} - -static ULONG WINAPI Unknown_AddRef(IUnknown *pUnknown) -{ - return 2; -} - -static ULONG WINAPI Unknown_Release(IUnknown *pUnknown) -{ - return 1; -} - -static IUnknownVtbl unknownVtbl = { - Unknown_QueryInterface, - Unknown_AddRef, - Unknown_Release -}; - -static IUnknown unknown = { - &unknownVtbl -}; - -static const char *printGUID(const GUID *guid) -{ - static char guidSTR[39]; - - if (!guid) return NULL; - - sprintf(guidSTR, "{%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]); - return guidSTR; -} - -static void test_Aggregability(void) -{ - HRESULT hr; - IUnknown *pUnknown = NULL; - - hr = CoCreateInstance(&CLSID_InternetShortcut, NULL, CLSCTX_ALL, &IID_IUnknown, (void**)&pUnknown); - ok(SUCCEEDED(hr), "could not create instance of CLSID_InternetShortcut with IID_IUnknown, hr = 0x%x\n", hr); - if (pUnknown) - IUnknown_Release(pUnknown); - - hr = CoCreateInstance(&CLSID_InternetShortcut, NULL, CLSCTX_ALL, &IID_IUniformResourceLocatorA, (void**)&pUnknown); - ok(SUCCEEDED(hr), "could not create instance of CLSID_InternetShortcut with IID_IUniformResourceLocatorA, hr = 0x%x\n", hr); - if (pUnknown) - IUnknown_Release(pUnknown); - - hr = CoCreateInstance(&CLSID_InternetShortcut, &unknown, CLSCTX_ALL, &IID_IUnknown, (void**)&pUnknown); - ok(FAILED(hr), "aggregation didn't fail like it should, hr = 0x%x\n", hr); - if (pUnknown) - IUnknown_Release(pUnknown); -} - -static void can_query_interface(IUnknown *pUnknown, REFIID riid) -{ - HRESULT hr; - IUnknown *newInterface; - hr = IUnknown_QueryInterface(pUnknown, riid, (void**)&newInterface); - ok(SUCCEEDED(hr), "interface %s could not be queried\n", printGUID(riid)); - if (SUCCEEDED(hr)) - IUnknown_Release(newInterface); -} - -static void test_QueryInterface(void) -{ - HRESULT hr; - IUnknown *pUnknown; - - hr = CoCreateInstance(&CLSID_InternetShortcut, NULL, CLSCTX_ALL, &IID_IUnknown, (void**)&pUnknown); - if (SUCCEEDED(hr)) - { - can_query_interface(pUnknown, &IID_IUniformResourceLocatorA); - can_query_interface(pUnknown, &IID_IUniformResourceLocatorW); - can_query_interface(pUnknown, &IID_IPersistFile); - IUnknown_Release(pUnknown); - } - else - skip("could not create a CLSID_InternetShortcut for QueryInterface tests, hr=0x%x\n", hr); -} - -static CHAR *set_and_get_url(IUniformResourceLocatorA *urlA, LPCSTR input, DWORD flags) -{ - HRESULT hr; - hr = urlA->lpVtbl->SetURL(urlA, input, flags); - if (SUCCEEDED(hr)) - { - CHAR *output; - hr = urlA->lpVtbl->GetURL(urlA, &output); - if (SUCCEEDED(hr)) - return output; - else - skip("GetUrl failed, hr=0x%x\n", hr); - } - else - skip("SetUrl (%s, 0x%x) failed, hr=0x%x\n", input, flags, hr); - return NULL; -} - -static void check_string_transform(IUniformResourceLocatorA *urlA, LPCSTR input, DWORD flags, LPCSTR expectedOutput) -{ - CHAR *output = set_and_get_url(urlA, input, flags); - if (output != NULL) - { - ok(lstrcmpA(output, expectedOutput) == 0, "unexpected URL change %s -> %s (expected %s)\n", - input, output, expectedOutput); - CoTaskMemFree(output); - } -} - -static void test_NullURLs(void) -{ - HRESULT hr; - IUniformResourceLocatorA *urlA; - - hr = CoCreateInstance(&CLSID_InternetShortcut, NULL, CLSCTX_ALL, &IID_IUniformResourceLocatorA, (void**)&urlA); - if (SUCCEEDED(hr)) - { - LPSTR url = NULL; - - hr = urlA->lpVtbl->GetURL(urlA, &url); - ok(SUCCEEDED(hr), "getting uninitialized URL unexpectedly failed, hr=0x%x\n", hr); - ok(url == NULL, "uninitialized URL is not NULL but %s\n", url); - - hr = urlA->lpVtbl->SetURL(urlA, NULL, 0); - ok(SUCCEEDED(hr), "setting NULL URL unexpectedly failed, hr=0x%x\n", hr); - - hr = urlA->lpVtbl->GetURL(urlA, &url); - ok(SUCCEEDED(hr), "getting NULL URL unexpectedly failed, hr=0x%x\n", hr); - ok(url == NULL, "URL unexpectedly not NULL but %s\n", url); - - urlA->lpVtbl->Release(urlA); - } - else - skip("could not create a CLSID_InternetShortcut for NullURL tests, hr=0x%x\n", hr); -} - -static void test_SetURLFlags(void) -{ - HRESULT hr; - IUniformResourceLocatorA *urlA; - - hr = CoCreateInstance(&CLSID_InternetShortcut, NULL, CLSCTX_ALL, &IID_IUniformResourceLocatorA, (void**)&urlA); - if (SUCCEEDED(hr)) - { - check_string_transform(urlA, "somerandomstring", 0, "somerandomstring"); - check_string_transform(urlA, "www.winehq.org", 0, "www.winehq.org"); - - todo_wine - { - check_string_transform(urlA, "www.winehq.org", IURL_SETURL_FL_GUESS_PROTOCOL, "http://www.winehq.org/"); - check_string_transform(urlA, "ftp.winehq.org", IURL_SETURL_FL_GUESS_PROTOCOL, "ftp://ftp.winehq.org/"); - } - - urlA->lpVtbl->Release(urlA); - } - else - skip("could not create a CLSID_InternetShortcut for SetUrl tests, hr=0x%x\n", hr); -} - -static void test_InternetShortcut(void) -{ - test_Aggregability(); - test_QueryInterface(); - test_NullURLs(); - test_SetURLFlags(); -} - -START_TEST(intshcut) -{ - OleInitialize(NULL); - test_InternetShortcut(); - OleUninitialize(); -} diff --git a/rostests/winetests/shdocvw/shdocvw.c b/rostests/winetests/shdocvw/shdocvw.c deleted file mode 100644 index 17ea8d08625..00000000000 --- a/rostests/winetests/shdocvw/shdocvw.c +++ /dev/null @@ -1,361 +0,0 @@ -/* - * Unit tests for misc shdocvw functions - * - * Copyright 2008 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 - -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wininet.h" -#include "winnls.h" - -#include "wine/test.h" - -/* ################ */ - -static HMODULE hshdocvw; -static HRESULT (WINAPI *pURLSubRegQueryA)(LPCSTR, LPCSTR, DWORD, LPVOID, DWORD, DWORD); -static DWORD (WINAPI *pParseURLFromOutsideSourceA)(LPCSTR, LPSTR, LPDWORD, LPDWORD); -static DWORD (WINAPI *pParseURLFromOutsideSourceW)(LPCWSTR, LPWSTR, LPDWORD, LPDWORD); - -static CHAR appdata[] = "AppData"; -static CHAR common_appdata[] = "Common AppData"; -static CHAR default_page_url[] = "Default_Page_URL"; -static CHAR does_not_exist[] = "does_not_exist"; -static CHAR regpath_iemain[] = "Software\\Microsoft\\Internet Explorer\\Main"; -static CHAR regpath_shellfolders[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"; -static CHAR start_page[] = "Start Page"; - -/* ################ */ - -static const struct { - const char *url; - const char *newurl; - DWORD len; -} ParseURL_table[] = { - {"http://www.winehq.org", "http://www.winehq.org/", 22}, - {"www.winehq.org", "http://www.winehq.org/", 22}, - {"winehq.org", "http://winehq.org/", 18}, - {"ftp.winehq.org", "ftp://ftp.winehq.org/", 21}, - {"http://winehq.org", "http://winehq.org/", 18}, - {"https://winehq.org", "https://winehq.org/", 19}, - {"https://www.winehq.org", "https://www.winehq.org/", 23}, - {"ftp://winehq.org", "ftp://winehq.org/", 17}, - {"ftp://ftp.winehq.org", "ftp://ftp.winehq.org/", 21}, - {"about:blank", "about:blank", 11}, - {"about:home", "about:home", 10}, - {"about:mozilla", "about:mozilla", 13}, - /* a space at the start is not allowed */ - {" http://www.winehq.org", "http://%20http://www.winehq.org", 31} - -}; - -/* ################ */ - -static void init_functions(void) -{ - hshdocvw = LoadLibraryA("shdocvw.dll"); - pURLSubRegQueryA = (void *) GetProcAddress(hshdocvw, (LPSTR) 151); - pParseURLFromOutsideSourceA = (void *) GetProcAddress(hshdocvw, (LPSTR) 169); - pParseURLFromOutsideSourceW = (void *) GetProcAddress(hshdocvw, (LPSTR) 170); -} - -/* ################ */ - -static void test_URLSubRegQueryA(void) -{ - CHAR buffer[INTERNET_MAX_URL_LENGTH]; - HRESULT hr; - DWORD used; - DWORD len; - - if (!pURLSubRegQueryA) { - skip("URLSubRegQueryA not found\n"); - return; - } - - memset(buffer, '#', sizeof(buffer)-1); - buffer[sizeof(buffer)-1] = '\0'; - /* called by inetcpl.cpl */ - hr = pURLSubRegQueryA(regpath_iemain, default_page_url, REG_SZ, buffer, INTERNET_MAX_URL_LENGTH, -1); - ok(hr == E_FAIL || hr == S_OK, "got 0x%x (expected E_FAIL or S_OK)\n", hr); - - memset(buffer, '#', sizeof(buffer)-1); - buffer[sizeof(buffer)-1] = '\0'; - /* called by inetcpl.cpl */ - hr = pURLSubRegQueryA(regpath_iemain, start_page, REG_SZ, buffer, INTERNET_MAX_URL_LENGTH, -1); - len = lstrlenA(buffer); - /* respect privacy: do not dump the url */ - ok(hr == S_OK, "got 0x%x and %d (expected S_OK)\n", hr, len); - - /* test buffer length: just large enough */ - memset(buffer, '#', sizeof(buffer)-1); - buffer[sizeof(buffer)-1] = '\0'; - hr = pURLSubRegQueryA(regpath_iemain, start_page, REG_SZ, buffer, len+1, -1); - used = lstrlenA(buffer); - /* respect privacy: do not dump the url */ - ok((hr == S_OK) && (used == len), - "got 0x%x and %d (expected S_OK and %d)\n", hr, used, len); - - /* no space for terminating 0: result is truncated */ - memset(buffer, '#', sizeof(buffer)-1); - buffer[sizeof(buffer)-1] = '\0'; - hr = pURLSubRegQueryA(regpath_iemain, start_page, REG_SZ, buffer, len, -1); - used = lstrlenA(buffer); - ok((hr == S_OK) && (used == len - 1), - "got 0x%x and %d (expected S_OK and %d)\n", hr, used, len - 1); - - /* no space for the complete result: truncate another char */ - if (len > 1) { - memset(buffer, '#', sizeof(buffer)-1); - buffer[sizeof(buffer)-1] = '\0'; - hr = pURLSubRegQueryA(regpath_iemain, start_page, REG_SZ, buffer, len-1, -1); - used = lstrlenA(buffer); - ok((hr == S_OK) && (used == (len - 2)), - "got 0x%x and %d (expected S_OK and %d)\n", hr, used, len - 2); - } - - /* only space for the terminating 0: function still succeded */ - memset(buffer, '#', sizeof(buffer)-1); - buffer[sizeof(buffer)-1] = '\0'; - hr = pURLSubRegQueryA(regpath_iemain, start_page, REG_SZ, buffer, 1, -1); - used = lstrlenA(buffer); - ok((hr == S_OK) && !used, - "got 0x%x and %d (expected S_OK and 0)\n", hr, used); - - /* size of buffer is 0, but the function still succeed. - buffer[0] is cleared in IE 5.01 and IE 5.5 (Buffer Overflow) */ - memset(buffer, '#', sizeof(buffer)-1); - buffer[sizeof(buffer)-1] = '\0'; - hr = pURLSubRegQueryA(regpath_iemain, start_page, REG_SZ, buffer, 0, -1); - used = lstrlenA(buffer); - ok( (hr == S_OK) && - ((used == INTERNET_MAX_URL_LENGTH - 1) || broken(used == 0)) , - "got 0x%x and %d (expected S_OK and INTERNET_MAX_URL_LENGTH - 1)\n", - hr, used); - - /* still succeed without a buffer for the result */ - hr = pURLSubRegQueryA(regpath_iemain, start_page, REG_SZ, NULL, 0, -1); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); - - /* still succeed, when a length is given without a buffer */ - hr = pURLSubRegQueryA(regpath_iemain, start_page, REG_SZ, NULL, INTERNET_MAX_URL_LENGTH, -1); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); - - /* this value does not exist */ - memset(buffer, '#', sizeof(buffer)-1); - buffer[sizeof(buffer)-1] = '\0'; - hr = pURLSubRegQueryA(regpath_iemain, does_not_exist, REG_SZ, buffer, INTERNET_MAX_URL_LENGTH, -1); - /* random bytes are copied to the buffer */ - ok((hr == E_FAIL), "got 0x%x (expected E_FAIL)\n", hr); - - /* the third parameter is ignored. Is it really a type? (data is REG_SZ) */ - memset(buffer, '#', sizeof(buffer)-1); - buffer[sizeof(buffer)-1] = '\0'; - hr = pURLSubRegQueryA(regpath_iemain, start_page, REG_DWORD, buffer, INTERNET_MAX_URL_LENGTH, -1); - used = lstrlenA(buffer); - ok((hr == S_OK) && (used == len), - "got 0x%x and %d (expected S_OK and %d)\n", hr, used, len); - - /* the function works for HKCU and HKLM */ - memset(buffer, '#', sizeof(buffer)-1); - buffer[sizeof(buffer)-1] = '\0'; - hr = pURLSubRegQueryA(regpath_shellfolders, appdata, REG_SZ, buffer, INTERNET_MAX_URL_LENGTH, -1); - used = lstrlenA(buffer); - ok(hr == S_OK, "got 0x%x and %d (expected S_OK)\n", hr, used); - - memset(buffer, '#', sizeof(buffer)-1); - buffer[sizeof(buffer)-1] = '\0'; - hr = pURLSubRegQueryA(regpath_shellfolders, common_appdata, REG_SZ, buffer, INTERNET_MAX_URL_LENGTH, -1); - used = lstrlenA(buffer); - ok(hr == S_OK, "got 0x%x and %d (expected S_OK)\n", hr, used); - - /* todo: what does the last parameter mean? */ -} - -/* ################ */ - -static void test_ParseURLFromOutsideSourceA(void) -{ - CHAR buffer[INTERNET_MAX_URL_LENGTH]; - DWORD dummy; - DWORD maxlen; - DWORD len; - DWORD res; - int i; - - if (!pParseURLFromOutsideSourceA) { - skip("ParseURLFromOutsideSourceA not found\n"); - return; - } - - for(i = 0; i < sizeof(ParseURL_table)/sizeof(ParseURL_table[0]); i++) { - memset(buffer, '#', sizeof(buffer)-1); - buffer[sizeof(buffer)-1] = '\0'; - len = sizeof(buffer); - dummy = 0; - /* on success, len+1 is returned. No idea, if someone depend on this */ - res = pParseURLFromOutsideSourceA(ParseURL_table[i].url, buffer, &len, &dummy); - /* len does not include the terminating 0, when buffer is large enough */ - ok( res != 0 && len == ParseURL_table[i].len && - !lstrcmpA(buffer, ParseURL_table[i].newurl), - "#%d: got %d and %d with '%s' (expected '!=0' and %d with '%s')\n", - i, res, len, buffer, ParseURL_table[i].len, ParseURL_table[i].newurl); - - - /* use the size test only for the first examples */ - if (i > 4) continue; - - maxlen = len; - - memset(buffer, '#', sizeof(buffer)-1); - buffer[sizeof(buffer)-1] = '\0'; - len = maxlen + 1; - dummy = 0; - res = pParseURLFromOutsideSourceA(ParseURL_table[i].url, buffer, &len, &dummy); - ok( res != 0 && len == ParseURL_table[i].len && - !lstrcmpA(buffer, ParseURL_table[i].newurl), - "#%d (+1): got %d and %d with '%s' (expected '!=0' and %d with '%s')\n", - i, res, len, buffer, ParseURL_table[i].len, ParseURL_table[i].newurl); - - memset(buffer, '#', sizeof(buffer)-1); - buffer[sizeof(buffer)-1] = '\0'; - len = maxlen; - dummy = 0; - res = pParseURLFromOutsideSourceA(ParseURL_table[i].url, buffer, &len, &dummy); - /* len includes the terminating 0, when the buffer is too small */ - ok( res == 0 && len == ParseURL_table[i].len + 1, - "#%d (==): got %d and %d (expected '0' and %d)\n", - i, res, len, ParseURL_table[i].len + 1); - - memset(buffer, '#', sizeof(buffer)-1); - buffer[sizeof(buffer)-1] = '\0'; - len = maxlen-1; - dummy = 0; - res = pParseURLFromOutsideSourceA(ParseURL_table[i].url, buffer, &len, &dummy); - /* len includes the terminating 0 on XP SP1 and before, when the buffer is too small */ - ok( res == 0 && (len == ParseURL_table[i].len || len == ParseURL_table[i].len + 1), - "#%d (-1): got %d and %d (expected '0' and %d or %d)\n", - i, res, len, ParseURL_table[i].len, ParseURL_table[i].len + 1); - - memset(buffer, '#', sizeof(buffer)-1); - buffer[sizeof(buffer)-1] = '\0'; - len = maxlen+1; - dummy = 0; - res = pParseURLFromOutsideSourceA(ParseURL_table[i].url, NULL, &len, &dummy); - /* len does not include the terminating 0, when buffer is NULL */ - ok( res == 0 && len == ParseURL_table[i].len, - "#%d (buffer): got %d and %d (expected '0' and %d)\n", - i, res, len, ParseURL_table[i].len); - - if (0) { - /* that test crash on native shdocvw */ - res = pParseURLFromOutsideSourceA(ParseURL_table[i].url, buffer, NULL, &dummy); - } - - memset(buffer, '#', sizeof(buffer)-1); - buffer[sizeof(buffer)-1] = '\0'; - len = maxlen+1; - dummy = 0; - res = pParseURLFromOutsideSourceA(ParseURL_table[i].url, buffer, &len, NULL); - ok( res != 0 && len == ParseURL_table[i].len && - !lstrcmpA(buffer, ParseURL_table[i].newurl), - "#%d (unknown): got %d and %d with '%s' (expected '!=0' and %d with '%s')\n", - i, res, len, buffer, ParseURL_table[i].len, ParseURL_table[i].newurl); - } -} - -/* ################ */ - -static void test_ParseURLFromOutsideSourceW(void) -{ - WCHAR urlW[INTERNET_MAX_URL_LENGTH]; - WCHAR bufferW[INTERNET_MAX_URL_LENGTH]; - CHAR bufferA[INTERNET_MAX_URL_LENGTH]; - DWORD maxlen; - DWORD dummy; - DWORD len; - DWORD res; - - if (!pParseURLFromOutsideSourceW) { - skip("ParseURLFromOutsideSourceW not found\n"); - return; - } - MultiByteToWideChar(CP_ACP, 0, ParseURL_table[0].url, -1, urlW, INTERNET_MAX_URL_LENGTH); - - memset(bufferA, '#', sizeof(bufferA)-1); - bufferA[sizeof(bufferA) - 1] = '\0'; - MultiByteToWideChar(CP_ACP, 0, bufferA, -1, bufferW, INTERNET_MAX_URL_LENGTH); - - /* len is in characters */ - len = sizeof(bufferW)/sizeof(bufferW[0]); - dummy = 0; - res = pParseURLFromOutsideSourceW(urlW, bufferW, &len, &dummy); - WideCharToMultiByte(CP_ACP, 0, bufferW, -1, bufferA, sizeof(bufferA), NULL, NULL); - ok( res != 0 && len == ParseURL_table[0].len && - !lstrcmpA(bufferA, ParseURL_table[0].newurl), - "got %d and %d with '%s' (expected '!=0' and %d with '%s')\n", - res, len, bufferA, ParseURL_table[0].len, ParseURL_table[0].newurl); - - - maxlen = len; - - memset(bufferA, '#', sizeof(bufferA)-1); - bufferA[sizeof(bufferA) - 1] = '\0'; - MultiByteToWideChar(CP_ACP, 0, bufferA, -1, bufferW, INTERNET_MAX_URL_LENGTH); - len = maxlen+1; - dummy = 0; - res = pParseURLFromOutsideSourceW(urlW, bufferW, &len, &dummy); - WideCharToMultiByte(CP_ACP, 0, bufferW, -1, bufferA, sizeof(bufferA), NULL, NULL); - /* len does not include the terminating 0, when buffer is large enough */ - ok( res != 0 && len == ParseURL_table[0].len && - !lstrcmpA(bufferA, ParseURL_table[0].newurl), - "+1: got %d and %d with '%s' (expected '!=0' and %d with '%s')\n", - res, len, bufferA, ParseURL_table[0].len, ParseURL_table[0].newurl); - - len = maxlen; - dummy = 0; - res = pParseURLFromOutsideSourceW(urlW, bufferW, &len, &dummy); - /* len includes the terminating 0, when the buffer is too small */ - ok( res == 0 && len == ParseURL_table[0].len + 1, - "==: got %d and %d (expected '0' and %d)\n", - res, len, ParseURL_table[0].len + 1); - - len = maxlen - 1; - dummy = 0; - res = pParseURLFromOutsideSourceW(urlW, bufferW, &len, &dummy); - /* len includes the terminating 0 on XP SP1 and before, when the buffer is too small */ - ok( res == 0 && (len == ParseURL_table[0].len || len == ParseURL_table[0].len + 1), - "-1: got %d and %d (expected '0' and %d or %d)\n", - res, len, ParseURL_table[0].len, ParseURL_table[0].len + 1); - -} - -/* ################ */ - -START_TEST(shdocvw) -{ - init_functions(); - test_URLSubRegQueryA(); - test_ParseURLFromOutsideSourceA(); - test_ParseURLFromOutsideSourceW(); - FreeLibrary(hshdocvw); -} diff --git a/rostests/winetests/shdocvw/shdocvw.rbuild b/rostests/winetests/shdocvw/shdocvw.rbuild deleted file mode 100644 index 181826f91e0..00000000000 --- a/rostests/winetests/shdocvw/shdocvw.rbuild +++ /dev/null @@ -1,21 +0,0 @@ - - - - - . - - intshcut.c - shdocvw.c - shortcut.c - webbrowser.c - testlist.c - wine - gdi32 - shell32 - ole32 - oleaut32 - user32 - advapi32 - ntdll - - diff --git a/rostests/winetests/shdocvw/shortcut.c b/rostests/winetests/shdocvw/shortcut.c deleted file mode 100644 index f38ae2b379c..00000000000 --- a/rostests/winetests/shdocvw/shortcut.c +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Unit tests to document shdocvw's 'Shell Instance Objects' features - * - * Copyright 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 St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -/* At least since Windows 2000 it's possible to add FolderShortcut objects - * by creating some registry entries. Those objects, which refer to some - * point in the filesystem, can be registered in the shell namespace like other - * shell namespace extensions. Icons, names and filesystem location can be - * configured. This is documented at http://www.virtualplastic.net/html/ui_shell.html - * You can also google for a tool called "ShellObjectEditor" by "Tropical - * Technologies". This mechanism would be cool for wine, since we could - * map Gnome's virtual devices to FolderShortcuts and have them appear in the - * file dialogs. These unit tests are meant to document how this mechanism - * works on windows. - * - * Search MSDN for "Creating Shell Extensions with Shell Instance Objects" for - * more documentation.*/ - -#include - -#define COBJMACROS - -#include "windef.h" -#include "winbase.h" -#include "winreg.h" - -#include "shlobj.h" -#include "shobjidl.h" -#include "shlguid.h" -#include "ole2.h" - -#include "wine/test.h" - -/* The following definitions and helper functions are meant to make the de-/registration - * of the various necessary registry keys easier. */ - -struct registry_value { - const char *szName; - const DWORD dwType; - const char *szValue; - const DWORD dwValue; -}; - -#define REG_VALUE_ADDR(x) ((x->dwType==REG_SZ)?(const BYTE *)x->szValue:(const BYTE *)&x->dwValue) -#define REG_VALUE_SIZE(x) ((x->dwType==REG_SZ)?strlen(x->szValue)+1:sizeof(DWORD)) - -struct registry_key { - const char *szName; - const struct registry_value *pValues; - const unsigned int cValues; - const struct registry_key *pSubKeys; - const unsigned int cSubKeys; -}; - -static const struct registry_value ShellFolder_values[] = { - { "WantsFORPARSING", REG_SZ, "", 0 }, - { "Attributes", REG_DWORD, NULL, 0xF8000100 } -}; - -static const struct registry_value Instance_values[] = { - { "CLSID", REG_SZ, "{0AFACED1-E828-11D1-9187-B532F1E9575D}", 0 } -}; - -static const struct registry_value InitPropertyBag_values[] = { - { "Attributes", REG_DWORD, NULL, 0x00000015 }, - { "Target", REG_SZ, "C:\\", 0 } -}; - -static const struct registry_key Instance_keys[] = { - { "InitPropertyBag", InitPropertyBag_values, 2, NULL, 0 } -}; - -static const struct registry_value InProcServer32_values[] = { - { NULL, REG_SZ, "shdocvw.dll", 0 }, - { "ThreadingModel", REG_SZ, "Apartment", 0 } -}; - -static const struct registry_value DefaultIcon_values[] = { - { NULL, REG_SZ,"shell32.dll,8", 0 } -}; - -static const struct registry_key ShortcutCLSID_keys[] = { - { "DefaultIcon", DefaultIcon_values, 1, NULL, 0 }, - { "InProcServer32", InProcServer32_values, 2, NULL, 0 }, - { "Instance", Instance_values, 1, Instance_keys, 1 }, - { "ShellFolder", ShellFolder_values, 2, NULL, 0 } -}; - -static const struct registry_value ShortcutCLSID_values[] = { - { NULL, REG_SZ, "WineTest", 0 } -}; - -static const struct registry_key HKEY_CLASSES_ROOT_keys[] = { - { "CLSID\\{9B352EBF-2765-45C1-B4C6-85CC7F7ABC64}", ShortcutCLSID_values, 1, ShortcutCLSID_keys, 4} -}; - -/* register_keys - helper function, which recursively creates the registry keys and values in - * parameter 'keys' in the registry under hRootKey. */ -static BOOL register_keys(HKEY hRootKey, const struct registry_key *keys, unsigned int numKeys) { - HKEY hKey; - unsigned int iKey, iValue; - - for (iKey = 0; iKey < numKeys; iKey++) { - if (ERROR_SUCCESS == RegCreateKeyExA(hRootKey, keys[iKey].szName, 0, NULL, 0, - KEY_WRITE, NULL, &hKey, NULL)) - { - for (iValue = 0; iValue < keys[iKey].cValues; iValue++) { - const struct registry_value * value = &keys[iKey].pValues[iValue]; - if (ERROR_SUCCESS != RegSetValueExA(hKey, value->szName, 0, value->dwType, - REG_VALUE_ADDR(value), REG_VALUE_SIZE(value))) - { - RegCloseKey(hKey); - return FALSE; - } - } - - if (!register_keys(hKey, keys[iKey].pSubKeys, keys[iKey].cSubKeys)) { - RegCloseKey(hKey); - return FALSE; - } - - RegCloseKey(hKey); - } - } - - return TRUE; -} - -/* unregister_keys - clean up after register_keys */ -static void unregister_keys(HKEY hRootKey, const struct registry_key *keys, unsigned int numKeys) { - HKEY hKey; - unsigned int iKey; - - for (iKey = 0; iKey < numKeys; iKey++) { - if (ERROR_SUCCESS == RegOpenKeyExA(hRootKey, keys[iKey].szName, 0, DELETE, &hKey)) { - unregister_keys(hKey, keys[iKey].pSubKeys, keys[iKey].cSubKeys); - RegCloseKey(hKey); - } - RegDeleteKeyA(hRootKey, keys[iKey].szName); - } -} - -static void test_ShortcutFolder(void) { - LPSHELLFOLDER pDesktopFolder, pWineTestFolder; - IPersistFolder3 *pWineTestPersistFolder; - LPITEMIDLIST pidlWineTestFolder, pidlCurFolder; - HRESULT hr; - CLSID clsid; - const CLSID CLSID_WineTest = - { 0x9b352ebf, 0x2765, 0x45c1, { 0xb4, 0xc6, 0x85, 0xcc, 0x7f, 0x7a, 0xbc, 0x64 } }; - WCHAR wszWineTestFolder[] = { - ':',':','{','9','B','3','5','2','E','B','F','-','2','7','6','5','-','4','5','C','1','-', - 'B','4','C','6','-','8','5','C','C','7','F','7','A','B','C','6','4','}',0 }; - - /* First, we register all the necessary registry keys/values for our 'WineTest' - * shell object. */ - register_keys(HKEY_CLASSES_ROOT, HKEY_CLASSES_ROOT_keys, 1); - - hr = SHGetDesktopFolder(&pDesktopFolder); - ok (SUCCEEDED(hr), "SHGetDesktopFolder failed! hr = %08x\n", hr); - if (FAILED(hr)) goto cleanup; - - /* Convert the wszWineTestFolder string to an ITEMIDLIST. */ - hr = IShellFolder_ParseDisplayName(pDesktopFolder, NULL, NULL, wszWineTestFolder, NULL, - &pidlWineTestFolder, NULL); - todo_wine - { - ok (hr == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), - "Expected %08x, got %08x\n", HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), hr); - } - if (FAILED(hr)) { - IShellFolder_Release(pDesktopFolder); - goto cleanup; - } - - /* FIXME: these tests are never run */ - - /* Bind to a WineTest folder object. There has to be some support for this in shdocvw.dll. - * This isn't implemented in wine yet.*/ - hr = IShellFolder_BindToObject(pDesktopFolder, pidlWineTestFolder, NULL, &IID_IShellFolder, - (LPVOID*)&pWineTestFolder); - IShellFolder_Release(pDesktopFolder); - ILFree(pidlWineTestFolder); - ok (SUCCEEDED(hr), "IShellFolder::BindToObject(WineTestFolder) failed! hr = %08x\n", hr); - if (FAILED(hr)) goto cleanup; - - hr = IShellFolder_QueryInterface(pWineTestFolder, &IID_IPersistFolder3, (LPVOID*)&pWineTestPersistFolder); - ok (SUCCEEDED(hr), "IShellFolder::QueryInterface(IPersistFolder3) failed! hr = %08x\n", hr); - IShellFolder_Release(pWineTestFolder); - if (FAILED(hr)) goto cleanup; - - /* The resulting folder object has the FolderShortcut CLSID, instead of it's own. */ - hr = IPersistFolder3_GetClassID(pWineTestPersistFolder, &clsid); - ok (SUCCEEDED(hr), "IPersist::GetClassID failed! hr = %08x\n", hr); - ok (IsEqualCLSID(&CLSID_FolderShortcut, &clsid), "GetClassId returned wrong CLSID!\n"); - - pidlCurFolder = (LPITEMIDLIST)0xdeadbeef; - hr = IPersistFolder3_GetCurFolder(pWineTestPersistFolder, &pidlCurFolder); - ok (SUCCEEDED(hr), "IPersistFolder3::GetCurFolder failed! hr = %08x\n", hr); - ok (pidlCurFolder->mkid.cb == 20 && ((LPSHITEMID)((BYTE*)pidlCurFolder+20))->cb == 0 && - IsEqualCLSID(&CLSID_WineTest, (REFCLSID)((LPBYTE)pidlCurFolder+4)), - "GetCurFolder returned unexpected pidl!\n"); - - ILFree(pidlCurFolder); - IPersistFolder3_Release(pWineTestPersistFolder); - -cleanup: - unregister_keys(HKEY_CLASSES_ROOT, HKEY_CLASSES_ROOT_keys, 1); -} - -START_TEST(shortcut) -{ - OleInitialize(NULL); - test_ShortcutFolder(); - OleUninitialize(); -} diff --git a/rostests/winetests/shdocvw/testlist.c b/rostests/winetests/shdocvw/testlist.c deleted file mode 100644 index 18ce563f47a..00000000000 --- a/rostests/winetests/shdocvw/testlist.c +++ /dev/null @@ -1,22 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_intshcut(void); -extern void func_shdocvw(void); -extern void func_shortcut(void); -extern void func_protocol(void); -extern void func_webbrowser(void); - -const struct test winetest_testlist[] = -{ - { "intshcut", func_intshcut }, - { "shdocvw", func_shdocvw }, - { "shortcut", func_shortcut }, - { "webbrowser", func_webbrowser }, - { 0, 0 } -}; diff --git a/rostests/winetests/shdocvw/webbrowser.c b/rostests/winetests/shdocvw/webbrowser.c deleted file mode 100644 index 15fc1ec0d72..00000000000 --- a/rostests/winetests/shdocvw/webbrowser.c +++ /dev/null @@ -1,2552 +0,0 @@ -/* - * 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 - */ - -#define COBJMACROS -#define CONST_VTABLE - -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "initguid.h" -#include "ole2.h" -#include "exdisp.h" -#include "htiframe.h" -#include "mshtmhst.h" -#include "mshtmcid.h" -#include "mshtml.h" -#include "idispids.h" -#include "olectl.h" -#include "mshtmdid.h" -#include "shobjidl.h" -#include "shlguid.h" -#include "exdispid.h" -#include "mimeinfo.h" - -DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); -DEFINE_OLEGUID(CGID_DocHostCmdPriv, 0x000214D4L, 0, 0); - -#define DEFINE_EXPECT(func) \ - static BOOL expect_ ## func = FALSE, called_ ## func = FALSE - -#define SET_EXPECT(func) \ - expect_ ## func = TRUE - -#define CHECK_EXPECT2(func) \ - do { \ - ok(expect_ ##func, "unexpected call " #func "\n"); \ - called_ ## func = TRUE; \ - }while(0) - -#define CHECK_EXPECT(func) \ - do { \ - CHECK_EXPECT2(func); \ - expect_ ## func = FALSE; \ - }while(0) - -#define CHECK_CALLED(func) \ - do { \ - ok(called_ ## func, "expected " #func "\n"); \ - expect_ ## func = called_ ## func = FALSE; \ - }while(0) - -#define CHECK_CALLED_BROKEN(func) \ - do { \ - ok(called_ ## func || broken(!called_ ## func), "expected " #func "\n"); \ - expect_ ## func = called_ ## func = FALSE; \ - }while(0) - -#define CLEAR_CALLED(func) \ - expect_ ## func = called_ ## func = FALSE - -DEFINE_EXPECT(GetContainer); -DEFINE_EXPECT(Site_GetWindow); -DEFINE_EXPECT(ShowObject); -DEFINE_EXPECT(CanInPlaceActivate); -DEFINE_EXPECT(OnInPlaceActivate); -DEFINE_EXPECT(OnUIActivate); -DEFINE_EXPECT(GetWindowContext); -DEFINE_EXPECT(Frame_GetWindow); -DEFINE_EXPECT(Frame_SetActiveObject); -DEFINE_EXPECT(UIWindow_SetActiveObject); -DEFINE_EXPECT(SetMenu); -DEFINE_EXPECT(Invoke_AMBIENT_USERMODE); -DEFINE_EXPECT(Invoke_AMBIENT_DLCONTROL); -DEFINE_EXPECT(Invoke_AMBIENT_USERAGENT); -DEFINE_EXPECT(Invoke_AMBIENT_PALETTE); -DEFINE_EXPECT(Invoke_AMBIENT_SILENT); -DEFINE_EXPECT(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); -DEFINE_EXPECT(Invoke_STATUSTEXTCHANGE); -DEFINE_EXPECT(Invoke_PROPERTYCHANGE); -DEFINE_EXPECT(Invoke_DOWNLOADBEGIN); -DEFINE_EXPECT(Invoke_BEFORENAVIGATE2); -DEFINE_EXPECT(Invoke_SETSECURELOCKICON); -DEFINE_EXPECT(Invoke_FILEDOWNLOAD); -DEFINE_EXPECT(Invoke_COMMANDSTATECHANGE); -DEFINE_EXPECT(Invoke_DOWNLOADCOMPLETE); -DEFINE_EXPECT(Invoke_ONMENUBAR); -DEFINE_EXPECT(Invoke_ONADDRESSBAR); -DEFINE_EXPECT(Invoke_ONSTATUSBAR); -DEFINE_EXPECT(Invoke_ONTOOLBAR); -DEFINE_EXPECT(Invoke_ONFULLSCREEN); -DEFINE_EXPECT(Invoke_ONTHEATERMODE); -DEFINE_EXPECT(Invoke_WINDOWSETRESIZABLE); -DEFINE_EXPECT(Invoke_TITLECHANGE); -DEFINE_EXPECT(Invoke_NAVIGATECOMPLETE2); -DEFINE_EXPECT(Invoke_PROGRESSCHANGE); -DEFINE_EXPECT(Invoke_DOCUMENTCOMPLETE); -DEFINE_EXPECT(Invoke_282); -DEFINE_EXPECT(EnableModeless_TRUE); -DEFINE_EXPECT(EnableModeless_FALSE); -DEFINE_EXPECT(GetHostInfo); -DEFINE_EXPECT(GetOptionKeyPath); -DEFINE_EXPECT(GetOverridesKeyPath); -DEFINE_EXPECT(SetStatusText); -DEFINE_EXPECT(UpdateUI); -DEFINE_EXPECT(Exec_SETDOWNLOADSTATE_0); -DEFINE_EXPECT(Exec_SETDOWNLOADSTATE_1); -DEFINE_EXPECT(Exec_SETPROGRESSMAX); -DEFINE_EXPECT(Exec_SETPROGRESSPOS); -DEFINE_EXPECT(QueryStatus_SETPROGRESSTEXT); -DEFINE_EXPECT(QueryStatus_STOP); -DEFINE_EXPECT(DocHost_EnableModeless_TRUE); -DEFINE_EXPECT(DocHost_EnableModeless_FALSE); -DEFINE_EXPECT(GetDropTarget); -DEFINE_EXPECT(TranslateUrl); - -static const WCHAR wszItem[] = {'i','t','e','m',0}; -static const WCHAR emptyW[] = {0}; - -static VARIANT_BOOL exvb; -static IWebBrowser2 *wb; - -static HWND container_hwnd, shell_embedding_hwnd; -static BOOL is_downloading, is_first_load; -static const char *current_url; - -#define DWL_EXPECT_BEFORE_NAVIGATE 0x01 -#define DWL_FROM_PUT_HREF 0x02 - -static DWORD dwl_flags; - -static int strcmp_wa(LPCWSTR strw, const char *stra) -{ - CHAR buf[512]; - WideCharToMultiByte(CP_ACP, 0, strw, -1, buf, sizeof(buf), NULL, NULL); - return lstrcmpA(stra, buf); -} - -static const char *debugstr_guid(REFIID riid) -{ - static char buf[50]; - - sprintf(buf, "{%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]); - - return buf; -} - -static BSTR a2bstr(const char *str) -{ - BSTR ret; - int len; - - len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); - ret = SysAllocStringLen(NULL, len); - MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len); - - return ret; -} - -#define test_LocationURL(a,b) _test_LocationURL(__LINE__,a,b) -static void _test_LocationURL(unsigned line, IUnknown *unk, const char *exurl) -{ - IWebBrowser2 *wb; - BSTR url = (void*)0xdeadbeef; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IWebBrowser2, (void**)&wb); - ok(hres == S_OK, "Could not get IWebBrowser2 interface: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IWebBrowser2_get_LocationURL(wb, &url); - ok_(__FILE__,line) (hres == (*exurl ? S_OK : S_FALSE), "get_LocationURL failed: %08x\n", hres); - ok_(__FILE__,line) (!strcmp_wa(url, exurl), "unexpected URL: %s\n", wine_dbgstr_w(url)); - - SysFreeString(url); - IWebBrowser2_Release(wb); -} - -#define test_ready_state(ex) _test_ready_state(__LINE__,ex); -static void _test_ready_state(unsigned line, READYSTATE exstate) -{ - READYSTATE state; - HRESULT hres; - - hres = IWebBrowser2_get_ReadyState(wb, &state); - ok_(__FILE__,line)(hres == S_OK, "get_ReadyState failed: %08x\n", hres); - ok_(__FILE__,line)(state == exstate, "ReadyState = %d, expected %d\n", state, exstate); -} - -static HRESULT QueryInterface(REFIID,void**); - -static HRESULT WINAPI OleCommandTarget_QueryInterface(IOleCommandTarget *iface, - REFIID riid, void **ppv) -{ - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI OleCommandTarget_AddRef(IOleCommandTarget *iface) -{ - return 2; -} - -static ULONG WINAPI OleCommandTarget_Release(IOleCommandTarget *iface) -{ - return 1; -} - -static HRESULT WINAPI OleCommandTarget_QueryStatus(IOleCommandTarget *iface, const GUID *pguidCmdGroup, - ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText) -{ - ok(!pguidCmdGroup, "pguidCmdGroup != MULL\n"); - ok(cCmds == 1, "cCmds=%d, expected 1\n", cCmds); - ok(!pCmdText, "pCmdText != NULL\n"); - - switch(prgCmds[0].cmdID) { - case OLECMDID_STOP: - CHECK_EXPECT2(QueryStatus_STOP); - prgCmds[0].cmdf = OLECMDF_SUPPORTED; - return S_OK; - case OLECMDID_SETPROGRESSTEXT: - CHECK_EXPECT(QueryStatus_SETPROGRESSTEXT); - prgCmds[0].cmdf = OLECMDF_ENABLED; - return S_OK; - default: - ok(0, "unexpected command %d\n", prgCmds[0].cmdID); - } - - return E_FAIL; -} - -static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID *pguidCmdGroup, - DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) -{ - if(!pguidCmdGroup) { - switch(nCmdID) { - case OLECMDID_SETPROGRESSMAX: - CHECK_EXPECT2(Exec_SETPROGRESSMAX); - ok(nCmdexecopt == OLECMDEXECOPT_DONTPROMPTUSER, "nCmdexecopts=%08x\n", nCmdexecopt); - ok(pvaIn != NULL, "pvaIn == NULL\n"); - if(pvaIn) - ok(V_VT(pvaIn) == VT_I4, "V_VT(pvaIn)=%d, expected VT_I4\n", V_VT(pvaIn)); - ok(pvaOut == NULL, "pvaOut=%p, expected NULL\n", pvaOut); - return S_OK; - case OLECMDID_SETPROGRESSPOS: - CHECK_EXPECT2(Exec_SETPROGRESSPOS); - ok(nCmdexecopt == OLECMDEXECOPT_DONTPROMPTUSER, "nCmdexecopts=%08x\n", nCmdexecopt); - ok(pvaIn != NULL, "pvaIn == NULL\n"); - if(pvaIn) - ok(V_VT(pvaIn) == VT_I4, "V_VT(pvaIn)=%d, expected VT_I4\n", V_VT(pvaIn)); - ok(pvaOut == NULL, "pvaOut=%p, expected NULL\n", pvaOut); - return S_OK; - case OLECMDID_SETDOWNLOADSTATE: - if(is_downloading) - ok(nCmdexecopt == OLECMDEXECOPT_DONTPROMPTUSER || !nCmdexecopt, - "nCmdexecopts=%08x\n", nCmdexecopt); - else - ok(!nCmdexecopt, "nCmdexecopts=%08x\n", nCmdexecopt); - ok(pvaOut == NULL, "pvaOut=%p\n", pvaOut); - ok(pvaIn != NULL, "pvaIn == NULL\n"); - ok(V_VT(pvaIn) == VT_I4, "V_VT(pvaIn)=%d\n", V_VT(pvaIn)); - switch(V_I4(pvaIn)) { - case 0: - CHECK_EXPECT2(Exec_SETDOWNLOADSTATE_0); - break; - case 1: - CHECK_EXPECT2(Exec_SETDOWNLOADSTATE_1); - break; - default: - ok(0, "unexpevted V_I4(pvaIn)=%d\n", V_I4(pvaIn)); - } - return S_OK; - default: - ok(0, "unexpected nsCmdID %d\n", nCmdID); - } - }else if(IsEqualGUID(&CGID_Explorer, pguidCmdGroup)) { - switch(nCmdID) { - case 24: /* TODO */ - case 25: /* IE5 */ - case 37: /* TODO */ - case 39: /* TODO */ - case 66: /* TODO */ - case 67: /* TODO */ - case 69: /* TODO */ - case 101: /* TODO (IE8) */ - return E_FAIL; - default: - ok(0, "unexpected nCmdID %d\n", nCmdID); - } - }else if(IsEqualGUID(&CGID_ShellDocView, pguidCmdGroup)) { - switch(nCmdID) { - case 105: /* TODO */ - case 140: /* TODO (Win7) */ - return E_FAIL; - default: - ok(0, "unexpected nCmdID %d\n", nCmdID); - } - }else if(IsEqualGUID(&CGID_DocHostCmdPriv, pguidCmdGroup)) { - switch(nCmdID) { - case 11: /* TODO */ - break; - default: - ok(0, "unexpected nCmdID %d of CGID_DocHostCmdPriv\n", nCmdID); - } - }else { - ok(0, "unexpected pguidCmdGroup %s\n", debugstr_guid(pguidCmdGroup)); - } - - return E_FAIL; -} - -static IOleCommandTargetVtbl OleCommandTargetVtbl = { - OleCommandTarget_QueryInterface, - OleCommandTarget_AddRef, - OleCommandTarget_Release, - OleCommandTarget_QueryStatus, - OleCommandTarget_Exec -}; - -static IOleCommandTarget OleCommandTarget = { &OleCommandTargetVtbl }; - -static HRESULT WINAPI OleContainer_QueryInterface(IOleContainer *iface, REFIID riid, void **ppv) -{ - if(IsEqualGUID(&IID_ITargetContainer, riid)) - return E_NOINTERFACE; /* TODO */ - - if(IsEqualGUID(&IID_IOleCommandTarget, riid)) { - *ppv = &OleCommandTarget; - return S_OK; - } - - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI OleContainer_AddRef(IOleContainer *iface) -{ - return 2; -} - -static ULONG WINAPI OleContainer_Release(IOleContainer *iface) -{ - return 1; -} - -static HRESULT WINAPI OleContainer_ParseDisplayName(IOleContainer *iface, IBindCtx *pbc, - LPOLESTR pszDiaplayName, ULONG *pchEaten, IMoniker **ppmkOut) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI OleContainer_EnumObjects(IOleContainer *iface, DWORD grfFlags, - IEnumUnknown **ppenum) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI OleContainer_LockContainer(IOleContainer *iface, BOOL fLock) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static const IOleContainerVtbl OleContainerVtbl = { - OleContainer_QueryInterface, - OleContainer_AddRef, - OleContainer_Release, - OleContainer_ParseDisplayName, - OleContainer_EnumObjects, - OleContainer_LockContainer -}; - -static IOleContainer OleContainer = { &OleContainerVtbl }; - -static HRESULT WINAPI Dispatch_QueryInterface(IDispatch *iface, REFIID riid, void **ppv) -{ - return QueryInterface(riid, ppv); -} - -static ULONG WINAPI Dispatch_AddRef(IDispatch *iface) -{ - return 2; -} - -static ULONG WINAPI Dispatch_Release(IDispatch *iface) -{ - return 1; -} - -static HRESULT WINAPI Dispatch_GetTypeInfoCount(IDispatch *iface, UINT *pctinfo) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Dispatch_GetTypeInfo(IDispatch *iface, UINT iTInfo, LCID lcid, - ITypeInfo **ppTInfo) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Dispatch_GetIDsOfNames(IDispatch *iface, REFIID riid, LPOLESTR *rgszNames, - UINT cNames, LCID lcid, DISPID *rgDispId) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Dispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REFIID riid, - LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, - EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - ok(IsEqualGUID(&IID_NULL, riid), "riid != IID_NULL\n"); - ok(pDispParams != NULL, "pDispParams == NULL\n"); - ok(pExcepInfo == NULL, "pExcepInfo=%p, expected NULL\n", pExcepInfo); - ok(V_VT(pVarResult) == VT_EMPTY, "V_VT(pVarResult)=%d\n", V_VT(pVarResult)); - ok(wFlags == DISPATCH_PROPERTYGET, "wFlags=%08x, expected DISPATCH_PROPERTYGET\n", wFlags); - ok(pDispParams->rgvarg == NULL, "pDispParams->rgvarg = %p\n", pDispParams->rgvarg); - ok(pDispParams->rgdispidNamedArgs == NULL, - "pDispParams->rgdispidNamedArgs = %p\n", pDispParams->rgdispidNamedArgs); - ok(pDispParams->cArgs == 0, "pDispParams->cArgs = %d\n", pDispParams->cArgs); - ok(pDispParams->cNamedArgs == 0, "pDispParams->cNamedArgs = %d\n", pDispParams->cNamedArgs); - - switch(dispIdMember) { - case DISPID_AMBIENT_USERMODE: - CHECK_EXPECT2(Invoke_AMBIENT_USERMODE); - return E_FAIL; - case DISPID_AMBIENT_DLCONTROL: - CHECK_EXPECT(Invoke_AMBIENT_DLCONTROL); - ok(puArgErr != NULL, "puArgErr=%p\n", puArgErr); - return E_FAIL; - case DISPID_AMBIENT_USERAGENT: - CHECK_EXPECT(Invoke_AMBIENT_USERAGENT); - ok(puArgErr != NULL, "puArgErr=%p\n", puArgErr); - return E_FAIL; - case DISPID_AMBIENT_PALETTE: - CHECK_EXPECT(Invoke_AMBIENT_PALETTE); - ok(puArgErr != NULL, "puArgErr=%p\n", puArgErr); - return E_FAIL; - case DISPID_AMBIENT_OFFLINEIFNOTCONNECTED: - CHECK_EXPECT(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); - ok(puArgErr == NULL, "puArgErr=%p\n", puArgErr); - V_VT(pVarResult) = VT_BOOL; - V_BOOL(pVarResult) = VARIANT_FALSE; - return S_OK; - case DISPID_AMBIENT_SILENT: - CHECK_EXPECT(Invoke_AMBIENT_SILENT); - ok(puArgErr == NULL, "puArgErr=%p\n", puArgErr); - V_VT(pVarResult) = VT_BOOL; - V_BOOL(pVarResult) = VARIANT_FALSE; - return S_OK; - } - - ok(0, "unexpected dispIdMember %d\n", dispIdMember); - return E_NOTIMPL; -} - -static IDispatchVtbl DispatchVtbl = { - Dispatch_QueryInterface, - Dispatch_AddRef, - Dispatch_Release, - Dispatch_GetTypeInfoCount, - Dispatch_GetTypeInfo, - Dispatch_GetIDsOfNames, - Dispatch_Invoke -}; - -static IDispatch Dispatch = { &DispatchVtbl }; - -static HRESULT WINAPI WebBrowserEvents2_QueryInterface(IDispatch *iface, REFIID riid, void **ppv) -{ - *ppv = NULL; - - if(IsEqualGUID(&DIID_DWebBrowserEvents2, riid)) { - *ppv = iface; - return S_OK; - } - - ok(0, "unexpected riid %s\n", debugstr_guid(riid)); - return E_NOINTERFACE; -} - -#define test_invoke_bool(p,s) _test_invoke_bool(__LINE__,p,s) -static void _test_invoke_bool(unsigned line, const DISPPARAMS *params, BOOL strict) -{ - ok_(__FILE__,line) (params->rgvarg != NULL, "rgvarg == NULL\n"); - ok_(__FILE__,line) (params->cArgs == 1, "cArgs=%d, expected 1\n", params->cArgs); - ok_(__FILE__,line) (V_VT(params->rgvarg) == VT_BOOL, "V_VT(arg)=%d\n", V_VT(params->rgvarg)); - if(strict) - ok_(__FILE__,line) (V_BOOL(params->rgvarg) == exvb, "V_VT(arg)=%x, expected %x\n", - V_BOOL(params->rgvarg), exvb); - else - ok_(__FILE__,line) (!V_BOOL(params->rgvarg) == !exvb, "V_VT(arg)=%x, expected %x\n", - V_BOOL(params->rgvarg), exvb); -} - -static void test_OnBeforeNavigate(const VARIANT *disp, const VARIANT *url, const VARIANT *flags, - const VARIANT *frame, const VARIANT *post_data, const VARIANT *headers, const VARIANT *cancel) -{ - ok(V_VT(disp) == VT_DISPATCH, "V_VT(disp)=%d, expected VT_DISPATCH\n", V_VT(disp)); - ok(V_DISPATCH(disp) != NULL, "V_DISPATCH(disp) == NULL\n"); - ok(V_DISPATCH(disp) == (IDispatch*)wb, "V_DISPATCH(disp)=%p, wb=%p\n", V_DISPATCH(disp), wb); - - ok(V_VT(url) == (VT_BYREF|VT_VARIANT), "V_VT(url)=%x, expected VT_BYREF|VT_VARIANT\n", V_VT(url)); - ok(V_VARIANTREF(url) != NULL, "V_VARIANTREF(url) == NULL)\n"); - if(V_VARIANTREF(url)) { - ok(V_VT(V_VARIANTREF(url)) == VT_BSTR, "V_VT(V_VARIANTREF(url))=%d, expected VT_BSTR\n", - V_VT(V_VARIANTREF(url))); - ok(V_BSTR(V_VARIANTREF(url)) != NULL, "V_BSTR(V_VARIANTREF(url)) == NULL\n"); - ok(!strcmp_wa(V_BSTR(V_VARIANTREF(url)), current_url), "unexpected url %s, expected %s\n", - wine_dbgstr_w(V_BSTR(V_VARIANTREF(url))), current_url); - } - - ok(V_VT(flags) == (VT_BYREF|VT_VARIANT), "V_VT(flags)=%x, expected VT_BYREF|VT_VARIANT\n", - V_VT(flags)); - ok(V_VT(flags) == (VT_BYREF|VT_VARIANT), "V_VT(flags)=%x, expected VT_BYREF|VT_VARIANT\n", - V_VT(flags)); - ok(V_VARIANTREF(flags) != NULL, "V_VARIANTREF(flags) == NULL)\n"); - if(V_VARIANTREF(flags)) { - ok(V_VT(V_VARIANTREF(flags)) == VT_I4, "V_VT(V_VARIANTREF(flags))=%d, expected VT_I4\n", - V_VT(V_VARIANTREF(flags))); - if(is_first_load) { - ok(V_I4(V_VARIANTREF(flags)) == 0, "V_I4(V_VARIANTREF(flags)) = %x, expected 0\n", - V_I4(V_VARIANTREF(flags))); - }else { - ok((V_I4(V_VARIANTREF(flags)) & ~0x40) == 0, "V_I4(V_VARIANTREF(flags)) = %x, expected 0x40 or 0\n", - V_I4(V_VARIANTREF(flags))); - } - } - - ok(V_VT(frame) == (VT_BYREF|VT_VARIANT), "V_VT(frame)=%x, expected VT_BYREF|VT_VARIANT\n", - V_VT(frame)); - ok(V_VT(frame) == (VT_BYREF|VT_VARIANT), "V_VT(frame)=%x, expected VT_BYREF|VT_VARIANT\n", - V_VT(frame)); - ok(V_VARIANTREF(frame) != NULL, "V_VARIANTREF(frame) == NULL)\n"); - if(V_VARIANTREF(frame)) { - ok(V_VT(V_VARIANTREF(frame)) == VT_BSTR, "V_VT(V_VARIANTREF(frame))=%d, expected VT_BSTR\n", - V_VT(V_VARIANTREF(frame))); - ok(V_BSTR(V_VARIANTREF(frame)) == NULL, "V_BSTR(V_VARIANTREF(frame)) = %p, expected NULL\n", - V_BSTR(V_VARIANTREF(frame))); - } - - ok(V_VT(post_data) == (VT_BYREF|VT_VARIANT), "V_VT(post_data)=%x, expected VT_BYREF|VT_VARIANT\n", - V_VT(post_data)); - ok(V_VT(post_data) == (VT_BYREF|VT_VARIANT), "V_VT(post_data)=%x, expected VT_BYREF|VT_VARIANT\n", - V_VT(post_data)); - ok(V_VARIANTREF(post_data) != NULL, "V_VARIANTREF(post_data) == NULL)\n"); - if(V_VARIANTREF(post_data)) { - ok(V_VT(V_VARIANTREF(post_data)) == (VT_VARIANT|VT_BYREF), - "V_VT(V_VARIANTREF(post_data))=%d, expected VT_VARIANT|VT_BYREF\n", - V_VT(V_VARIANTREF(post_data))); - ok(V_VARIANTREF(V_VARIANTREF(post_data)) != NULL, - "V_VARIANTREF(V_VARIANTREF(post_data)) == NULL\n"); - if(V_VARIANTREF(V_VARIANTREF(post_data))) { - ok(V_VT(V_VARIANTREF(V_VARIANTREF(post_data))) == VT_EMPTY, - "V_VT(V_VARIANTREF(V_VARIANTREF(post_data))) = %d, expected VT_EMPTY\n", - V_VT(V_VARIANTREF(V_VARIANTREF(post_data)))); - - if(V_VT(V_VARIANTREF(V_VARIANTREF(post_data))) == (VT_UI1|VT_ARRAY)) { - const SAFEARRAY *sa = V_ARRAY(V_VARIANTREF(V_VARIANTREF(post_data))); - - ok(sa->cDims == 1, "sa->cDims = %d, expected 1\n", sa->cDims); - ok(sa->fFeatures == 0, "sa->fFeatures = %d, expected 0\n", sa->fFeatures); - } - } - } - - ok(V_VT(headers) == (VT_BYREF|VT_VARIANT), "V_VT(headers)=%x, expected VT_BYREF|VT_VARIANT\n", - V_VT(headers)); - ok(V_VARIANTREF(headers) != NULL, "V_VARIANTREF(headers) == NULL)\n"); - if(V_VARIANTREF(headers)) { - ok(V_VT(V_VARIANTREF(headers)) == VT_BSTR, "V_VT(V_VARIANTREF(headers))=%d, expected VT_BSTR\n", - V_VT(V_VARIANTREF(headers))); - ok(V_BSTR(V_VARIANTREF(headers)) == NULL, "V_BSTR(V_VARIANTREF(heders)) = %p, expected NULL\n", - V_BSTR(V_VARIANTREF(headers))); - } - - ok(V_VT(cancel) == (VT_BYREF|VT_BOOL), "V_VT(cancel)=%x, expected VT_BYREF|VT_BOOL\n", - V_VT(cancel)); - ok(V_BOOLREF(cancel) != NULL, "V_BOOLREF(pDispParams->rgvarg[0] == NULL)\n"); - if(V_BOOLREF(cancel)) - ok(*V_BOOLREF(cancel) == VARIANT_FALSE, "*V_BOOLREF(calcel) = %x, expected VARIANT_FALSE\n", - *V_BOOLREF(cancel)); -} - -static HRESULT WINAPI WebBrowserEvents2_Invoke(IDispatch *iface, DISPID dispIdMember, REFIID riid, - LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, - EXCEPINFO *pExcepInfo, UINT *puArgErr) -{ - ok(IsEqualGUID(&IID_NULL, riid), "riid != IID_NULL\n"); - ok(pDispParams != NULL, "pDispParams == NULL\n"); - ok(pExcepInfo == NULL, "pExcepInfo=%p, expected NULL\n", pExcepInfo); - ok(pVarResult == NULL, "pVarResult=%p\n", pVarResult); - ok(wFlags == DISPATCH_METHOD, "wFlags=%08x, expected DISPATCH_METHOD\n", wFlags); - ok(pDispParams->rgdispidNamedArgs == NULL, - "pDispParams->rgdispidNamedArgs = %p\n", pDispParams->rgdispidNamedArgs); - ok(pDispParams->cNamedArgs == 0, "pDispParams->cNamedArgs = %d\n", pDispParams->cNamedArgs); - - switch(dispIdMember) { - case DISPID_STATUSTEXTCHANGE: - CHECK_EXPECT2(Invoke_STATUSTEXTCHANGE); - - ok(pDispParams->rgvarg != NULL, "rgvarg == NULL\n"); - ok(pDispParams->cArgs == 1, "cArgs=%d, expected 1\n", pDispParams->cArgs); - ok(V_VT(pDispParams->rgvarg) == VT_BSTR, "V_VT(pDispParams->rgvarg)=%d, expected VT_BSTR\n", - V_VT(pDispParams->rgvarg)); - /* TODO: Check text */ - break; - - case DISPID_PROPERTYCHANGE: - CHECK_EXPECT2(Invoke_PROPERTYCHANGE); - - ok(pDispParams->rgvarg != NULL, "rgvarg == NULL\n"); - ok(pDispParams->cArgs == 1, "cArgs=%d, expected 1\n", pDispParams->cArgs); - /* TODO: Check args */ - break; - - case DISPID_DOWNLOADBEGIN: - CHECK_EXPECT(Invoke_DOWNLOADBEGIN); - - ok(pDispParams->rgvarg == NULL, "rgvarg=%p, expected NULL\n", pDispParams->rgvarg); - ok(pDispParams->cArgs == 0, "cArgs=%d, expected 0\n", pDispParams->cArgs); - test_ready_state(READYSTATE_LOADING); - break; - - case DISPID_BEFORENAVIGATE2: - CHECK_EXPECT(Invoke_BEFORENAVIGATE2); - - ok(pDispParams->rgvarg != NULL, "rgvarg == NULL\n"); - ok(pDispParams->cArgs == 7, "cArgs=%d, expected 7\n", pDispParams->cArgs); - test_OnBeforeNavigate(pDispParams->rgvarg+6, pDispParams->rgvarg+5, pDispParams->rgvarg+4, - pDispParams->rgvarg+3, pDispParams->rgvarg+2, pDispParams->rgvarg+1, - pDispParams->rgvarg); - test_ready_state((dwl_flags & DWL_FROM_PUT_HREF) ? READYSTATE_COMPLETE : READYSTATE_LOADING); - break; - - case DISPID_SETSECURELOCKICON: - CHECK_EXPECT2(Invoke_SETSECURELOCKICON); - - ok(pDispParams->rgvarg != NULL, "rgvarg == NULL\n"); - ok(pDispParams->cArgs == 1, "cArgs=%d, expected 1\n", pDispParams->cArgs); - /* TODO: Check args */ - break; - - case DISPID_FILEDOWNLOAD: - CHECK_EXPECT(Invoke_FILEDOWNLOAD); - - ok(pDispParams->rgvarg != NULL, "rgvarg == NULL\n"); - ok(pDispParams->cArgs == 2, "cArgs=%d, expected 2\n", pDispParams->cArgs); - /* TODO: Check args */ - break; - - case DISPID_COMMANDSTATECHANGE: - CHECK_EXPECT2(Invoke_COMMANDSTATECHANGE); - - ok(pDispParams->rgvarg != NULL, "rgvarg == NULL\n"); - ok(pDispParams->cArgs == 2, "cArgs=%d, expected 2\n", pDispParams->cArgs); - /* TODO: Check args */ - break; - - case DISPID_DOWNLOADCOMPLETE: - CHECK_EXPECT(Invoke_DOWNLOADCOMPLETE); - - ok(pDispParams->rgvarg == NULL, "rgvarg=%p, expected NULL\n", pDispParams->rgvarg); - ok(pDispParams->cArgs == 0, "cArgs=%d, expected 0\n", pDispParams->cArgs); - test_ready_state(READYSTATE_LOADING); - break; - - case DISPID_ONMENUBAR: - CHECK_EXPECT(Invoke_ONMENUBAR); - test_invoke_bool(pDispParams, TRUE); - break; - - case DISPID_ONADDRESSBAR: - CHECK_EXPECT(Invoke_ONADDRESSBAR); - test_invoke_bool(pDispParams, TRUE); - break; - - case DISPID_ONSTATUSBAR: - CHECK_EXPECT(Invoke_ONSTATUSBAR); - test_invoke_bool(pDispParams, TRUE); - break; - - case DISPID_ONTOOLBAR: - CHECK_EXPECT(Invoke_ONTOOLBAR); - test_invoke_bool(pDispParams, FALSE); - break; - - case DISPID_ONFULLSCREEN: - CHECK_EXPECT(Invoke_ONFULLSCREEN); - test_invoke_bool(pDispParams, TRUE); - break; - - case DISPID_ONTHEATERMODE: - CHECK_EXPECT(Invoke_ONTHEATERMODE); - test_invoke_bool(pDispParams, TRUE); - break; - - case DISPID_WINDOWSETRESIZABLE: - CHECK_EXPECT(Invoke_WINDOWSETRESIZABLE); - test_invoke_bool(pDispParams, TRUE); - break; - - case DISPID_TITLECHANGE: - CHECK_EXPECT2(Invoke_TITLECHANGE); - /* FIXME */ - break; - - case DISPID_NAVIGATECOMPLETE2: - CHECK_EXPECT(Invoke_NAVIGATECOMPLETE2); - /* FIXME */ - test_ready_state((dwl_flags & DWL_FROM_PUT_HREF) ? READYSTATE_COMPLETE : READYSTATE_LOADING); - break; - - case DISPID_PROGRESSCHANGE: - CHECK_EXPECT(Invoke_PROGRESSCHANGE); - /* FIXME */ - break; - - case DISPID_DOCUMENTCOMPLETE: - CHECK_EXPECT(Invoke_DOCUMENTCOMPLETE); - /* FIXME */ - test_ready_state(READYSTATE_COMPLETE); - break; - - case 282: /* FIXME */ - CHECK_EXPECT2(Invoke_282); - break; - - default: - ok(0, "unexpected dispIdMember %d\n", dispIdMember); - } - - return S_OK; -} - -static IDispatchVtbl WebBrowserEvents2Vtbl = { - WebBrowserEvents2_QueryInterface, - Dispatch_AddRef, - Dispatch_Release, - Dispatch_GetTypeInfoCount, - Dispatch_GetTypeInfo, - Dispatch_GetIDsOfNames, - WebBrowserEvents2_Invoke -}; - -static IDispatch WebBrowserEvents2 = { &WebBrowserEvents2Vtbl }; - -static HRESULT WINAPI ClientSite_QueryInterface(IOleClientSite *iface, REFIID riid, void **ppv) -{ - return QueryInterface(riid, ppv); -} - -static ULONG WINAPI ClientSite_AddRef(IOleClientSite *iface) -{ - return 2; -} - -static ULONG WINAPI ClientSite_Release(IOleClientSite *iface) -{ - return 1; -} - -static HRESULT WINAPI ClientSite_SaveObject(IOleClientSite *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ClientSite_GetMoniker(IOleClientSite *iface, DWORD dwAssign, DWORD dwWhichMoniker, - IMoniker **ppmon) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ClientSite_GetContainer(IOleClientSite *iface, IOleContainer **ppContainer) -{ - CHECK_EXPECT(GetContainer); - - ok(ppContainer != NULL, "ppContainer == NULL\n"); - if(ppContainer) - *ppContainer = &OleContainer; - - return S_OK; -} - -static HRESULT WINAPI ClientSite_ShowObject(IOleClientSite *iface) -{ - CHECK_EXPECT(ShowObject); - return S_OK; -} - -static HRESULT WINAPI ClientSite_OnShowWindow(IOleClientSite *iface, BOOL fShow) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ClientSite_RequestNewObjectLayout(IOleClientSite *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static const IOleClientSiteVtbl ClientSiteVtbl = { - ClientSite_QueryInterface, - ClientSite_AddRef, - ClientSite_Release, - ClientSite_SaveObject, - ClientSite_GetMoniker, - ClientSite_GetContainer, - ClientSite_ShowObject, - ClientSite_OnShowWindow, - ClientSite_RequestNewObjectLayout -}; - -static IOleClientSite ClientSite = { &ClientSiteVtbl }; - -static HRESULT WINAPI InPlaceUIWindow_QueryInterface(IOleInPlaceFrame *iface, - REFIID riid, void **ppv) -{ - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI InPlaceUIWindow_AddRef(IOleInPlaceFrame *iface) -{ - return 2; -} - -static ULONG WINAPI InPlaceUIWindow_Release(IOleInPlaceFrame *iface) -{ - return 1; -} - -static HRESULT WINAPI InPlaceUIWindow_GetWindow(IOleInPlaceFrame *iface, HWND *phwnd) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_GetWindow(IOleInPlaceFrame *iface, HWND *phwnd) -{ - CHECK_EXPECT(Frame_GetWindow); - ok(phwnd != NULL, "phwnd == NULL\n"); - if(phwnd) - *phwnd = container_hwnd; - return S_OK; -} - -static HRESULT WINAPI InPlaceUIWindow_ContextSensitiveHelp(IOleInPlaceFrame *iface, BOOL fEnterMode) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceUIWindow_GetBorder(IOleInPlaceFrame *iface, LPRECT lprectBorder) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceUIWindow_RequestBorderSpace(IOleInPlaceFrame *iface, - LPCBORDERWIDTHS pborderwidths) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceUIWindow_SetBorderSpace(IOleInPlaceFrame *iface, - LPCBORDERWIDTHS pborderwidths) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceUIWindow_SetActiveObject(IOleInPlaceFrame *iface, - IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName) -{ - CHECK_EXPECT(UIWindow_SetActiveObject); - ok(pActiveObject != NULL, "pActiveObject = NULL\n"); - ok(!lstrcmpW(pszObjName, wszItem), "unexpected pszObjName\n"); - return S_OK; -} - -static HRESULT WINAPI InPlaceFrame_SetActiveObject(IOleInPlaceFrame *iface, - IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName) -{ - CHECK_EXPECT(Frame_SetActiveObject); - ok(pActiveObject != NULL, "pActiveObject = NULL\n"); - ok(!lstrcmpW(pszObjName, wszItem), "unexpected pszObjName\n"); - return S_OK; -} - -static HRESULT WINAPI InPlaceFrame_InsertMenus(IOleInPlaceFrame *iface, HMENU hmenuShared, - LPOLEMENUGROUPWIDTHS lpMenuWidths) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_SetMenu(IOleInPlaceFrame *iface, HMENU hmenuShared, - HOLEMENU holemenu, HWND hwndActiveObject) -{ - CHECK_EXPECT(SetMenu); - ok(hmenuShared == NULL, "hmenuShared=%p\n", hmenuShared); - ok(holemenu == NULL, "holemenu=%p\n", holemenu); - ok(hwndActiveObject == shell_embedding_hwnd, "hwndActiveObject=%p, expected %p\n", - hwndActiveObject, shell_embedding_hwnd); - return S_OK; -} - -static HRESULT WINAPI InPlaceFrame_RemoveMenus(IOleInPlaceFrame *iface, HMENU hmenuShared) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceFrame_SetStatusText(IOleInPlaceFrame *iface, LPCOLESTR pszStatusText) -{ - CHECK_EXPECT2(SetStatusText); - /* FIXME: Check pszStatusText */ - return S_OK; -} - -static HRESULT WINAPI InPlaceFrame_EnableModeless(IOleInPlaceFrame *iface, BOOL fEnable) -{ - if(fEnable) - CHECK_EXPECT2(EnableModeless_TRUE); - else - CHECK_EXPECT2(EnableModeless_FALSE); - return S_OK; -} - -static HRESULT WINAPI InPlaceFrame_TranslateAccelerator(IOleInPlaceFrame *iface, LPMSG lpmsg, WORD wID) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static const IOleInPlaceFrameVtbl InPlaceUIWindowVtbl = { - InPlaceUIWindow_QueryInterface, - InPlaceUIWindow_AddRef, - InPlaceUIWindow_Release, - InPlaceUIWindow_GetWindow, - InPlaceUIWindow_ContextSensitiveHelp, - InPlaceUIWindow_GetBorder, - InPlaceUIWindow_RequestBorderSpace, - InPlaceUIWindow_SetBorderSpace, - InPlaceUIWindow_SetActiveObject, -}; - -static IOleInPlaceUIWindow InPlaceUIWindow = { (IOleInPlaceUIWindowVtbl*)&InPlaceUIWindowVtbl }; - -static const IOleInPlaceFrameVtbl InPlaceFrameVtbl = { - InPlaceUIWindow_QueryInterface, - InPlaceUIWindow_AddRef, - InPlaceUIWindow_Release, - InPlaceFrame_GetWindow, - InPlaceUIWindow_ContextSensitiveHelp, - InPlaceUIWindow_GetBorder, - InPlaceUIWindow_RequestBorderSpace, - InPlaceUIWindow_SetBorderSpace, - InPlaceFrame_SetActiveObject, - InPlaceFrame_InsertMenus, - InPlaceFrame_SetMenu, - InPlaceFrame_RemoveMenus, - InPlaceFrame_SetStatusText, - InPlaceFrame_EnableModeless, - InPlaceFrame_TranslateAccelerator -}; - -static IOleInPlaceFrame InPlaceFrame = { &InPlaceFrameVtbl }; - -static HRESULT WINAPI InPlaceSite_QueryInterface(IOleInPlaceSiteEx *iface, REFIID riid, void **ppv) -{ - return QueryInterface(riid, ppv); -} - -static ULONG WINAPI InPlaceSite_AddRef(IOleInPlaceSiteEx *iface) -{ - return 2; -} - -static ULONG WINAPI InPlaceSite_Release(IOleInPlaceSiteEx *iface) -{ - return 1; -} - -static HRESULT WINAPI InPlaceSite_GetWindow(IOleInPlaceSiteEx *iface, HWND *phwnd) -{ - CHECK_EXPECT(Site_GetWindow); - ok(phwnd != NULL, "phwnd == NULL\n"); - if(phwnd) - *phwnd = container_hwnd; - return S_OK; -} - -static HRESULT WINAPI InPlaceSite_ContextSensitiveHelp(IOleInPlaceSiteEx *iface, BOOL fEnterMode) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSite_CanInPlaceActivate(IOleInPlaceSiteEx *iface) -{ - CHECK_EXPECT(CanInPlaceActivate); - return S_OK; -} - -static HRESULT WINAPI InPlaceSite_OnInPlaceActivate(IOleInPlaceSiteEx *iface) -{ - CHECK_EXPECT(OnInPlaceActivate); - return S_OK; -} - -static HRESULT WINAPI InPlaceSite_OnUIActivate(IOleInPlaceSiteEx *iface) -{ - CHECK_EXPECT(OnUIActivate); - return S_OK; -} - -static HRESULT WINAPI InPlaceSite_GetWindowContext(IOleInPlaceSiteEx *iface, - IOleInPlaceFrame **ppFrame, IOleInPlaceUIWindow **ppDoc, LPRECT lprcPosRect, - LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo) -{ - static const RECT pos_rect = {2,1,1002,901}; - static const RECT clip_rect = {10,10,990,890}; - - CHECK_EXPECT(GetWindowContext); - - ok(ppFrame != NULL, "ppFrame = NULL\n"); - if(ppFrame) - *ppFrame = &InPlaceFrame; - - ok(ppDoc != NULL, "ppDoc = NULL\n"); - if(ppDoc) - *ppDoc = &InPlaceUIWindow; - - ok(lprcPosRect != NULL, "lprcPosRect = NULL\n"); - if(lprcPosRect) - memcpy(lprcPosRect, &pos_rect, sizeof(RECT)); - - ok(lprcClipRect != NULL, "lprcClipRect = NULL\n"); - if(lprcClipRect) - memcpy(lprcClipRect, &clip_rect, sizeof(RECT)); - - ok(lpFrameInfo != NULL, "lpFrameInfo = NULL\n"); - if(lpFrameInfo) { - lpFrameInfo->cb = sizeof(*lpFrameInfo); - lpFrameInfo->fMDIApp = FALSE; - lpFrameInfo->hwndFrame = container_hwnd; - lpFrameInfo->haccel = NULL; - lpFrameInfo->cAccelEntries = 0; - } - - return S_OK; -} - -static HRESULT WINAPI InPlaceSite_Scroll(IOleInPlaceSiteEx *iface, SIZE scrollExtant) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSite_OnUIDeactivate(IOleInPlaceSiteEx *iface, BOOL fUndoable) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSite_OnInPlaceDeactivate(IOleInPlaceSiteEx *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSite_DiscardUndoState(IOleInPlaceSiteEx *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSite_DeactivateAndUndo(IOleInPlaceSiteEx *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSite_OnPosRectChange(IOleInPlaceSiteEx *iface, LPCRECT lprcPosRect) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSite_OnInPlaceActivateEx(IOleInPlaceSiteEx *iface, - BOOL *pNoRedraw, DWORD dwFlags) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSite_OnInPlaceDeactivateEx(IOleInPlaceSiteEx *iface, - BOOL fNoRedraw) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InPlaceSite_RequestUIActivate(IOleInPlaceSiteEx *iface) -{ - ok(0, "unexpected call\n"); - return S_OK; -} - -static const IOleInPlaceSiteExVtbl InPlaceSiteExVtbl = { - InPlaceSite_QueryInterface, - InPlaceSite_AddRef, - InPlaceSite_Release, - InPlaceSite_GetWindow, - InPlaceSite_ContextSensitiveHelp, - InPlaceSite_CanInPlaceActivate, - InPlaceSite_OnInPlaceActivate, - InPlaceSite_OnUIActivate, - InPlaceSite_GetWindowContext, - InPlaceSite_Scroll, - InPlaceSite_OnUIDeactivate, - InPlaceSite_OnInPlaceDeactivate, - InPlaceSite_DiscardUndoState, - InPlaceSite_DeactivateAndUndo, - InPlaceSite_OnPosRectChange, - InPlaceSite_OnInPlaceActivateEx, - InPlaceSite_OnInPlaceDeactivateEx, - InPlaceSite_RequestUIActivate -}; - -static IOleInPlaceSiteEx InPlaceSite = { &InPlaceSiteExVtbl }; - -static HRESULT WINAPI DocHostUIHandler_QueryInterface(IDocHostUIHandler2 *iface, REFIID riid, void **ppv) -{ - return QueryInterface(riid, ppv); -} - -static ULONG WINAPI DocHostUIHandler_AddRef(IDocHostUIHandler2 *iface) -{ - return 2; -} - -static ULONG WINAPI DocHostUIHandler_Release(IDocHostUIHandler2 *iface) -{ - return 1; -} - -static HRESULT WINAPI DocHostUIHandler_ShowContextMenu(IDocHostUIHandler2 *iface, DWORD dwID, POINT *ppt, - IUnknown *pcmdtReserved, IDispatch *pdicpReserved) -{ - ok(0, "unexpected call %d %p %p %p\n", dwID, ppt, pcmdtReserved, pdicpReserved); - return S_FALSE; -} - -static HRESULT WINAPI DocHostUIHandler_GetHostInfo(IDocHostUIHandler2 *iface, DOCHOSTUIINFO *pInfo) -{ - CHECK_EXPECT2(GetHostInfo); - ok(pInfo != NULL, "pInfo=NULL\n"); - if(pInfo) { - ok(pInfo->cbSize == sizeof(DOCHOSTUIINFO) || broken(!pInfo->cbSize), "pInfo->cbSize=%u\n", pInfo->cbSize); - ok(!pInfo->dwFlags, "pInfo->dwFlags=%08x, expected 0\n", pInfo->dwFlags); - ok(!pInfo->dwDoubleClick, "pInfo->dwDoubleClick=%08x, expected 0\n", pInfo->dwDoubleClick); - ok(!pInfo->pchHostCss, "pInfo->pchHostCss=%p, expected NULL\n", pInfo->pchHostCss); - ok(!pInfo->pchHostNS, "pInfo->pchhostNS=%p, expected NULL\n", pInfo->pchHostNS); - } - return E_FAIL; -} - -static HRESULT WINAPI DocHostUIHandler_ShowUI(IDocHostUIHandler2 *iface, DWORD dwID, - IOleInPlaceActiveObject *pActiveObject, IOleCommandTarget *pCommandTarget, - IOleInPlaceFrame *pFrame, IOleInPlaceUIWindow *pDoc) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_HideUI(IDocHostUIHandler2 *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_UpdateUI(IDocHostUIHandler2 *iface) -{ - CHECK_EXPECT(UpdateUI); - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_EnableModeless(IDocHostUIHandler2 *iface, BOOL fEnable) -{ - if(fEnable) - CHECK_EXPECT(DocHost_EnableModeless_TRUE); - else - CHECK_EXPECT(DocHost_EnableModeless_FALSE); - - return S_OK; -} - -static HRESULT WINAPI DocHostUIHandler_OnDocWindowActivate(IDocHostUIHandler2 *iface, BOOL fActivate) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_OnFrameWindowActivate(IDocHostUIHandler2 *iface, BOOL fActivate) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_ResizeBorder(IDocHostUIHandler2 *iface, LPCRECT prcBorder, - IOleInPlaceUIWindow *pUIWindow, BOOL fRameWindow) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_TranslateAccelerator(IDocHostUIHandler2 *iface, LPMSG lpMsg, - const GUID *pguidCmdGroup, DWORD nCmdID) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_GetOptionKeyPath(IDocHostUIHandler2 *iface, - LPOLESTR *pchKey, DWORD dw) -{ - CHECK_EXPECT(GetOptionKeyPath); - ok(pchKey != NULL, "pchKey==NULL\n"); - if(pchKey) - ok(*pchKey == NULL, "*pchKey=%p\n", *pchKey); - ok(!dw, "dw=%x\n", dw); - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_GetDropTarget(IDocHostUIHandler2 *iface, - IDropTarget *pDropTarget, IDropTarget **ppDropTarget) -{ - CHECK_EXPECT(GetDropTarget); - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_GetExternal(IDocHostUIHandler2 *iface, IDispatch **ppDispatch) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_TranslateUrl(IDocHostUIHandler2 *iface, DWORD dwTranslate, - OLECHAR *pchURLIn, OLECHAR **ppchURLOut) -{ - if(is_downloading && !(dwl_flags & DWL_EXPECT_BEFORE_NAVIGATE)) - todo_wine CHECK_EXPECT(TranslateUrl); - else - CHECK_EXPECT(TranslateUrl); - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_FilterDataObject(IDocHostUIHandler2 *iface, IDataObject *pDO, - IDataObject **ppPORet) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI DocHostUIHandler_GetOverrideKeyPath(IDocHostUIHandler2 *iface, - LPOLESTR *pchKey, DWORD dw) -{ - CHECK_EXPECT(GetOverridesKeyPath); - ok(pchKey != NULL, "pchKey==NULL\n"); - if(pchKey) - ok(*pchKey == NULL, "*pchKey=%p\n", *pchKey); - ok(!dw, "dw=%x\n", dw); - return E_NOTIMPL; -} - -static const IDocHostUIHandler2Vtbl DocHostUIHandlerVtbl = { - DocHostUIHandler_QueryInterface, - DocHostUIHandler_AddRef, - DocHostUIHandler_Release, - DocHostUIHandler_ShowContextMenu, - DocHostUIHandler_GetHostInfo, - DocHostUIHandler_ShowUI, - DocHostUIHandler_HideUI, - DocHostUIHandler_UpdateUI, - DocHostUIHandler_EnableModeless, - DocHostUIHandler_OnDocWindowActivate, - DocHostUIHandler_OnFrameWindowActivate, - DocHostUIHandler_ResizeBorder, - DocHostUIHandler_TranslateAccelerator, - DocHostUIHandler_GetOptionKeyPath, - DocHostUIHandler_GetDropTarget, - DocHostUIHandler_GetExternal, - DocHostUIHandler_TranslateUrl, - DocHostUIHandler_FilterDataObject, - DocHostUIHandler_GetOverrideKeyPath -}; - -static IDocHostUIHandler2 DocHostUIHandler = { &DocHostUIHandlerVtbl }; - - -static HRESULT WINAPI ServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv) -{ - return QueryInterface(riid, ppv); -} - -static ULONG WINAPI ServiceProvider_AddRef(IServiceProvider *iface) -{ - return 2; -} - -static ULONG WINAPI ServiceProvider_Release(IServiceProvider *iface) -{ - return 1; -} - -static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, - REFGUID guidService, REFIID riid, void **ppv) -{ - *ppv = NULL; - - if(!winetest_interactive) - return E_NOINTERFACE; - - if (IsEqualGUID(&SID_STopLevelBrowser, guidService)) - trace("Service SID_STopLevelBrowser\n"); - else if (IsEqualGUID(&SID_SEditCommandTarget, guidService)) - trace("Service SID_SEditCommandTarget\n"); - else if (IsEqualGUID(&IID_ITargetFrame2, guidService)) - trace("Service IID_ITargetFrame2\n"); - else if (IsEqualGUID(&SID_SInternetSecurityManager, guidService)) - trace("Service SID_SInternetSecurityManager\n"); - else if (IsEqualGUID(&SID_SOleUndoManager, guidService)) - trace("Service SID_SOleUndoManager\n"); - else if (IsEqualGUID(&SID_IMimeInfo, guidService)) - trace("Service SID_IMimeInfo\n"); - else if (IsEqualGUID(&SID_STopWindow, guidService)) - trace("Service SID_STopWindow\n"); - - /* 30D02401-6A81-11D0-8274-00C04FD5AE38 Explorer Bar: Search */ - /* D1E7AFEC-6A2E-11D0-8C78-00C04FD918B4 no info */ - /* A9227C3C-7F8E-11D0-8CB0-00A0C92DBFE8 no info */ - /* 371EA634-DC5C-11D1-BA57-00C04FC2040E one reference to IVersionHost */ - /* 3050F429-98B5-11CF-BB82-00AA00BDCE0B IID_IElementBehaviorFactory */ - /* 6D12FE80-7911-11CF-9534-0000C05BAE0B SID_DefView */ - /* AD7F6C62-F6BD-11D2-959B-006097C553C8 no info */ - /* 53A2D5B1-D2FC-11D0-84E0-006097C9987D no info */ - /* 3050F312-98B5-11CF-BB82-00AA00BDCE0B HTMLFrameBaseClass */ - /* 639447BD-B2D3-44B9-9FB0-510F23CB45E4 no info */ - /* 20C46561-8491-11CF-960C-0080C7F4EE85 no info */ - - else - trace("Service %s not supported\n", debugstr_guid(guidService)); - - return E_NOINTERFACE; -} - - -static const IServiceProviderVtbl ServiceProviderVtbl = { - ServiceProvider_QueryInterface, - ServiceProvider_AddRef, - ServiceProvider_Release, - ServiceProvider_QueryService -}; - -static IServiceProvider ServiceProvider = { &ServiceProviderVtbl }; - - -static HRESULT QueryInterface(REFIID riid, void **ppv) -{ - *ppv = NULL; - - if(IsEqualGUID(&IID_IUnknown, riid) - || IsEqualGUID(&IID_IOleClientSite, riid)) - *ppv = &ClientSite; - else if(IsEqualGUID(&IID_IOleWindow, riid) - || IsEqualGUID(&IID_IOleInPlaceSite, riid) - || IsEqualGUID(&IID_IOleInPlaceSiteEx, riid)) - *ppv = &InPlaceSite; - else if(IsEqualGUID(&IID_IDocHostUIHandler, riid) - || IsEqualGUID(&IID_IDocHostUIHandler2, riid)) - *ppv = &DocHostUIHandler; - else if(IsEqualGUID(&IID_IDispatch, riid)) - *ppv = &Dispatch; - else if(IsEqualGUID(&IID_IServiceProvider, riid)) - *ppv = &ServiceProvider; - else if(IsEqualGUID(&IID_IDocHostShowUI, riid)) - trace("interface IID_IDocHostShowUI\n"); - else if(IsEqualGUID(&IID_IOleControlSite, riid)) - trace("interface IID_IOleControlSite\n"); - else if(IsEqualGUID(&IID_IOleCommandTarget, riid)) - trace("interface IID_IOleCommandTarget\n"); - - /* B6EA2050-048A-11D1-82B9-00C04FB9942E IAxWinHostWindow */ - - else - { - /* are there more interfaces, that a host can support? */ - trace("%s: interface not supported\n", debugstr_guid(riid)); - } - - return (*ppv) ? S_OK : E_NOINTERFACE; -} - -static LRESULT WINAPI wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - return DefWindowProcW(hwnd, msg, wParam, lParam); -} - -static HWND create_container_window(void) -{ - static const WCHAR wszWebBrowserContainer[] = - {'W','e','b','B','r','o','w','s','e','r','C','o','n','t','a','i','n','e','r',0}; - static WNDCLASSEXW wndclass = { - sizeof(WNDCLASSEXW), - 0, - wnd_proc, - 0, 0, NULL, NULL, NULL, NULL, NULL, - wszWebBrowserContainer, - NULL - }; - - RegisterClassExW(&wndclass); - return CreateWindowW(wszWebBrowserContainer, wszWebBrowserContainer, - WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - CW_USEDEFAULT, NULL, NULL, NULL, NULL); -} - -static void test_DoVerb(IUnknown *unk) -{ - IOleObject *oleobj; - RECT rect = {0,0,1000,1000}; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IOleObject, (void**)&oleobj); - ok(hres == S_OK, "QueryInterface(IID_OleObject) failed: %08x\n", hres); - if(FAILED(hres)) - return; - - SET_EXPECT(CanInPlaceActivate); - SET_EXPECT(Site_GetWindow); - SET_EXPECT(OnInPlaceActivate); - SET_EXPECT(GetWindowContext); - SET_EXPECT(ShowObject); - SET_EXPECT(GetContainer); - SET_EXPECT(Frame_GetWindow); - SET_EXPECT(OnUIActivate); - SET_EXPECT(Frame_SetActiveObject); - SET_EXPECT(UIWindow_SetActiveObject); - SET_EXPECT(SetMenu); - - hres = IOleObject_DoVerb(oleobj, OLEIVERB_SHOW, NULL, &ClientSite, - 0, (HWND)0xdeadbeef, &rect); - ok(hres == S_OK, "DoVerb failed: %08x\n", hres); - - CHECK_CALLED(CanInPlaceActivate); - CHECK_CALLED(Site_GetWindow); - CHECK_CALLED(OnInPlaceActivate); - CHECK_CALLED(GetWindowContext); - CHECK_CALLED(ShowObject); - CHECK_CALLED(GetContainer); - CHECK_CALLED(Frame_GetWindow); - CHECK_CALLED(OnUIActivate); - CHECK_CALLED(Frame_SetActiveObject); - CHECK_CALLED(UIWindow_SetActiveObject); - CHECK_CALLED(SetMenu); - - hres = IOleObject_DoVerb(oleobj, OLEIVERB_SHOW, NULL, &ClientSite, - 0, (HWND)0xdeadbeef, &rect); - ok(hres == S_OK, "DoVerb failed: %08x\n", hres); - - IOleObject_Release(oleobj); -} - -static void test_GetMiscStatus(IOleObject *oleobj) -{ - DWORD st, i; - HRESULT hres; - - for(i=0; i<10; i++) { - st = 0xdeadbeef; - hres = IOleObject_GetMiscStatus(oleobj, i, &st); - ok(hres == S_OK, "GetMiscStatus failed: %08x\n", hres); - ok(st == (OLEMISC_SETCLIENTSITEFIRST|OLEMISC_ACTIVATEWHENVISIBLE|OLEMISC_INSIDEOUT - |OLEMISC_CANTLINKINSIDE|OLEMISC_RECOMPOSEONRESIZE), - "st=%08x, expected OLEMISC_SETCLIENTSITEFIRST|OLEMISC_ACTIVATEWHENVISIBLE|" - "OLEMISC_INSIDEOUT|OLEMISC_CANTLINKINSIDE|OLEMISC_RECOMPOSEONRESIZE)\n", st); - } -} - -static void test_SetHostNames(IOleObject *oleobj) -{ - HRESULT hres; - - static const WCHAR test_appW[] = {'t','e','s','t',' ','a','p','p',0}; - - hres = IOleObject_SetHostNames(oleobj, test_appW, (void*)0xdeadbeef); - ok(hres == S_OK, "SetHostNames failed: %08x\n", hres); -} - -static void test_ClientSite(IUnknown *unk, IOleClientSite *client, BOOL stop_download) -{ - IOleObject *oleobj; - IOleInPlaceObject *inplace; - HWND hwnd; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IOleObject, (void**)&oleobj); - ok(hres == S_OK, "QueryInterface(IID_OleObject) failed: %08x\n", hres); - if(FAILED(hres)) - return; - - test_GetMiscStatus(oleobj); - test_SetHostNames(oleobj); - - hres = IUnknown_QueryInterface(unk, &IID_IOleInPlaceObject, (void**)&inplace); - ok(hres == S_OK, "QueryInterface(IID_OleInPlaceObject) failed: %08x\n", hres); - if(FAILED(hres)) { - IOleObject_Release(oleobj); - return; - } - - hres = IOleInPlaceObject_GetWindow(inplace, &hwnd); - ok(hres == S_OK, "GetWindow failed: %08x\n", hres); - ok((hwnd == NULL) ^ (client == NULL), "unexpected hwnd %p\n", hwnd); - - if(client) { - SET_EXPECT(GetContainer); - SET_EXPECT(Site_GetWindow); - SET_EXPECT(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); - SET_EXPECT(Invoke_AMBIENT_SILENT); - }else if(stop_download) { - SET_EXPECT(Invoke_DOWNLOADCOMPLETE); - SET_EXPECT(Exec_SETDOWNLOADSTATE_0); - SET_EXPECT(Invoke_COMMANDSTATECHANGE); - } - - hres = IOleObject_SetClientSite(oleobj, client); - ok(hres == S_OK, "SetClientSite failed: %08x\n", hres); - - if(client) { - CHECK_CALLED(GetContainer); - CHECK_CALLED(Site_GetWindow); - CHECK_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); - CHECK_CALLED(Invoke_AMBIENT_SILENT); - }else if(stop_download) { - todo_wine CHECK_CALLED(Invoke_DOWNLOADCOMPLETE); - todo_wine CHECK_CALLED(Exec_SETDOWNLOADSTATE_0); - todo_wine CHECK_CALLED(Invoke_COMMANDSTATECHANGE); - } - - hres = IOleInPlaceObject_GetWindow(inplace, &hwnd); - ok(hres == S_OK, "GetWindow failed: %08x\n", hres); - ok((hwnd == NULL) == (client == NULL), "unexpected hwnd %p\n", hwnd); - - shell_embedding_hwnd = hwnd; - - test_SetHostNames(oleobj); - - IOleInPlaceObject_Release(inplace); - IOleObject_Release(oleobj); -} - -static void test_ClassInfo(IUnknown *unk) -{ - IProvideClassInfo2 *class_info; - GUID guid; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IProvideClassInfo2, (void**)&class_info); - ok(hres == S_OK, "QueryInterface(IID_IProvideClassInfo) failed: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IProvideClassInfo2_GetGUID(class_info, GUIDKIND_DEFAULT_SOURCE_DISP_IID, &guid); - ok(hres == S_OK, "GetGUID failed: %08x\n", hres); - ok(IsEqualGUID(&DIID_DWebBrowserEvents2, &guid), "wrong guid\n"); - - hres = IProvideClassInfo2_GetGUID(class_info, 0, &guid); - ok(hres == E_FAIL, "GetGUID failed: %08x, expected E_FAIL\n", hres); - ok(IsEqualGUID(&IID_NULL, &guid), "wrong guid\n"); - - hres = IProvideClassInfo2_GetGUID(class_info, 2, &guid); - ok(hres == E_FAIL, "GetGUID failed: %08x, expected E_FAIL\n", hres); - ok(IsEqualGUID(&IID_NULL, &guid), "wrong guid\n"); - - hres = IProvideClassInfo2_GetGUID(class_info, GUIDKIND_DEFAULT_SOURCE_DISP_IID, NULL); - ok(hres == E_POINTER, "GetGUID failed: %08x, expected E_POINTER\n", hres); - - hres = IProvideClassInfo2_GetGUID(class_info, 0, NULL); - ok(hres == E_POINTER, "GetGUID failed: %08x, expected E_POINTER\n", hres); - - IProvideClassInfo2_Release(class_info); -} - -static void test_ie_funcs(IUnknown *unk) -{ - IWebBrowser2 *wb; - IDispatch *disp; - VARIANT_BOOL b; - int i; - LONG hwnd; - HRESULT hres; - BSTR sName; - - hres = IUnknown_QueryInterface(unk, &IID_IWebBrowser2, (void**)&wb); - ok(hres == S_OK, "Could not get IWebBrowser2 interface: %08x\n", hres); - if(FAILED(hres)) - return; - - /* HWND */ - - hwnd = 0xdeadbeef; - hres = IWebBrowser2_get_HWND(wb, &hwnd); - ok(hres == E_FAIL, "get_HWND failed: %08x, expected E_FAIL\n", hres); - ok(hwnd == 0, "unexpected hwnd %x\n", hwnd); - - /* MenuBar */ - - hres = IWebBrowser2_get_MenuBar(wb, &b); - ok(hres == S_OK, "get_MenuBar failed: %08x\n", hres); - ok(b == VARIANT_TRUE, "b=%x\n", b); - - SET_EXPECT(Invoke_ONMENUBAR); - hres = IWebBrowser2_put_MenuBar(wb, (exvb = VARIANT_FALSE)); - ok(hres == S_OK, "put_MenuBar failed: %08x\n", hres); - CHECK_CALLED(Invoke_ONMENUBAR); - - hres = IWebBrowser2_get_MenuBar(wb, &b); - ok(hres == S_OK, "get_MenuBar failed: %08x\n", hres); - ok(b == VARIANT_FALSE, "b=%x\n", b); - - SET_EXPECT(Invoke_ONMENUBAR); - hres = IWebBrowser2_put_MenuBar(wb, (exvb = 100)); - ok(hres == S_OK, "put_MenuBar failed: %08x\n", hres); - CHECK_CALLED(Invoke_ONMENUBAR); - - hres = IWebBrowser2_get_MenuBar(wb, &b); - ok(hres == S_OK, "get_MenuBar failed: %08x\n", hres); - ok(b == VARIANT_TRUE, "b=%x\n", b); - - /* AddressBar */ - - hres = IWebBrowser2_get_AddressBar(wb, &b); - ok(hres == S_OK, "get_AddressBar failed: %08x\n", hres); - ok(b == VARIANT_TRUE, "b=%x\n", b); - - SET_EXPECT(Invoke_ONADDRESSBAR); - hres = IWebBrowser2_put_AddressBar(wb, (exvb = VARIANT_FALSE)); - ok(hres == S_OK, "put_AddressBar failed: %08x\n", hres); - CHECK_CALLED(Invoke_ONADDRESSBAR); - - hres = IWebBrowser2_get_AddressBar(wb, &b); - ok(hres == S_OK, "get_MenuBar failed: %08x\n", hres); - ok(b == VARIANT_FALSE, "b=%x\n", b); - - SET_EXPECT(Invoke_ONADDRESSBAR); - hres = IWebBrowser2_put_AddressBar(wb, (exvb = 100)); - ok(hres == S_OK, "put_AddressBar failed: %08x\n", hres); - CHECK_CALLED(Invoke_ONADDRESSBAR); - - hres = IWebBrowser2_get_AddressBar(wb, &b); - ok(hres == S_OK, "get_AddressBar failed: %08x\n", hres); - ok(b == VARIANT_TRUE, "b=%x\n", b); - - SET_EXPECT(Invoke_ONADDRESSBAR); - hres = IWebBrowser2_put_AddressBar(wb, (exvb = VARIANT_TRUE)); - ok(hres == S_OK, "put_MenuBar failed: %08x\n", hres); - CHECK_CALLED(Invoke_ONADDRESSBAR); - - /* StatusBar */ - - hres = IWebBrowser2_get_StatusBar(wb, &b); - ok(hres == S_OK, "get_StatusBar failed: %08x\n", hres); - ok(b == VARIANT_TRUE, "b=%x\n", b); - - SET_EXPECT(Invoke_ONSTATUSBAR); - hres = IWebBrowser2_put_StatusBar(wb, (exvb = VARIANT_TRUE)); - ok(hres == S_OK, "put_StatusBar failed: %08x\n", hres); - CHECK_CALLED(Invoke_ONSTATUSBAR); - - hres = IWebBrowser2_get_StatusBar(wb, &b); - ok(hres == S_OK, "get_StatusBar failed: %08x\n", hres); - ok(b == VARIANT_TRUE, "b=%x\n", b); - - SET_EXPECT(Invoke_ONSTATUSBAR); - hres = IWebBrowser2_put_StatusBar(wb, (exvb = VARIANT_FALSE)); - ok(hres == S_OK, "put_StatusBar failed: %08x\n", hres); - CHECK_CALLED(Invoke_ONSTATUSBAR); - - hres = IWebBrowser2_get_StatusBar(wb, &b); - ok(hres == S_OK, "get_StatusBar failed: %08x\n", hres); - ok(b == VARIANT_FALSE, "b=%x\n", b); - - SET_EXPECT(Invoke_ONSTATUSBAR); - hres = IWebBrowser2_put_StatusBar(wb, (exvb = 100)); - ok(hres == S_OK, "put_StatusBar failed: %08x\n", hres); - CHECK_CALLED(Invoke_ONSTATUSBAR); - - hres = IWebBrowser2_get_StatusBar(wb, &b); - ok(hres == S_OK, "get_StatusBar failed: %08x\n", hres); - ok(b == VARIANT_TRUE, "b=%x\n", b); - - /* ToolBar */ - - hres = IWebBrowser2_get_ToolBar(wb, &i); - ok(hres == S_OK, "get_ToolBar failed: %08x\n", hres); - ok(i, "i=%x\n", i); - - SET_EXPECT(Invoke_ONTOOLBAR); - hres = IWebBrowser2_put_ToolBar(wb, (exvb = VARIANT_FALSE)); - ok(hres == S_OK, "put_ToolBar failed: %08x\n", hres); - CHECK_CALLED(Invoke_ONTOOLBAR); - - hres = IWebBrowser2_get_ToolBar(wb, &i); - ok(hres == S_OK, "get_ToolBar failed: %08x\n", hres); - ok(i == VARIANT_FALSE, "b=%x\n", i); - - SET_EXPECT(Invoke_ONTOOLBAR); - hres = IWebBrowser2_put_ToolBar(wb, (exvb = 100)); - ok(hres == S_OK, "put_ToolBar failed: %08x\n", hres); - CHECK_CALLED(Invoke_ONTOOLBAR); - - hres = IWebBrowser2_get_ToolBar(wb, &i); - ok(hres == S_OK, "get_ToolBar failed: %08x\n", hres); - ok(i, "i=%x\n", i); - - SET_EXPECT(Invoke_ONTOOLBAR); - hres = IWebBrowser2_put_ToolBar(wb, (exvb = VARIANT_TRUE)); - ok(hres == S_OK, "put_ToolBar failed: %08x\n", hres); - CHECK_CALLED(Invoke_ONTOOLBAR); - - /* FullScreen */ - - hres = IWebBrowser2_get_FullScreen(wb, &b); - ok(hres == S_OK, "get_FullScreen failed: %08x\n", hres); - ok(b == VARIANT_FALSE, "b=%x\n", b); - - SET_EXPECT(Invoke_ONFULLSCREEN); - hres = IWebBrowser2_put_FullScreen(wb, (exvb = VARIANT_TRUE)); - ok(hres == S_OK, "put_FullScreen failed: %08x\n", hres); - CHECK_CALLED(Invoke_ONFULLSCREEN); - - hres = IWebBrowser2_get_FullScreen(wb, &b); - ok(hres == S_OK, "get_FullScreen failed: %08x\n", hres); - ok(b == VARIANT_TRUE, "b=%x\n", b); - - SET_EXPECT(Invoke_ONFULLSCREEN); - hres = IWebBrowser2_put_FullScreen(wb, (exvb = 100)); - ok(hres == S_OK, "put_FullScreen failed: %08x\n", hres); - CHECK_CALLED(Invoke_ONFULLSCREEN); - - hres = IWebBrowser2_get_FullScreen(wb, &b); - ok(hres == S_OK, "get_FullScreen failed: %08x\n", hres); - ok(b == VARIANT_TRUE, "b=%x\n", b); - - SET_EXPECT(Invoke_ONFULLSCREEN); - hres = IWebBrowser2_put_FullScreen(wb, (exvb = VARIANT_FALSE)); - ok(hres == S_OK, "put_FullScreen failed: %08x\n", hres); - CHECK_CALLED(Invoke_ONFULLSCREEN); - - /* TheaterMode */ - - hres = IWebBrowser2_get_TheaterMode(wb, &b); - ok(hres == S_OK, "get_TheaterMode failed: %08x\n", hres); - ok(b == VARIANT_FALSE, "b=%x\n", b); - - SET_EXPECT(Invoke_ONTHEATERMODE); - hres = IWebBrowser2_put_TheaterMode(wb, (exvb = VARIANT_TRUE)); - ok(hres == S_OK, "put_TheaterMode failed: %08x\n", hres); - CHECK_CALLED(Invoke_ONTHEATERMODE); - - hres = IWebBrowser2_get_TheaterMode(wb, &b); - ok(hres == S_OK, "get_TheaterMode failed: %08x\n", hres); - ok(b == VARIANT_TRUE, "b=%x\n", b); - - SET_EXPECT(Invoke_ONTHEATERMODE); - hres = IWebBrowser2_put_TheaterMode(wb, (exvb = 100)); - ok(hres == S_OK, "put_TheaterMode failed: %08x\n", hres); - CHECK_CALLED(Invoke_ONTHEATERMODE); - - hres = IWebBrowser2_get_TheaterMode(wb, &b); - ok(hres == S_OK, "get_TheaterMode failed: %08x\n", hres); - ok(b == VARIANT_TRUE, "b=%x\n", b); - - SET_EXPECT(Invoke_ONTHEATERMODE); - hres = IWebBrowser2_put_TheaterMode(wb, (exvb = VARIANT_FALSE)); - ok(hres == S_OK, "put_TheaterMode failed: %08x\n", hres); - CHECK_CALLED(Invoke_ONTHEATERMODE); - - /* Resizable */ - - b = 0x100; - hres = IWebBrowser2_get_Resizable(wb, &b); - ok(hres == E_NOTIMPL, "get_Resizable failed: %08x\n", hres); - ok(b == 0x100, "b=%x\n", b); - - SET_EXPECT(Invoke_WINDOWSETRESIZABLE); - hres = IWebBrowser2_put_Resizable(wb, (exvb = VARIANT_TRUE)); - ok(hres == S_OK || broken(hres == E_NOTIMPL), "put_Resizable failed: %08x\n", hres); - CHECK_CALLED_BROKEN(Invoke_WINDOWSETRESIZABLE); - - SET_EXPECT(Invoke_WINDOWSETRESIZABLE); - hres = IWebBrowser2_put_Resizable(wb, (exvb = VARIANT_FALSE)); - ok(hres == S_OK || broken(hres == E_NOTIMPL), "put_Resizable failed: %08x\n", hres); - CHECK_CALLED_BROKEN(Invoke_WINDOWSETRESIZABLE); - - hres = IWebBrowser2_get_Resizable(wb, &b); - ok(hres == E_NOTIMPL, "get_Resizable failed: %08x\n", hres); - ok(b == 0x100, "b=%x\n", b); - - /* Application */ - - disp = NULL; - hres = IWebBrowser2_get_Application(wb, &disp); - ok(hres == S_OK, "get_Application failed: %08x\n", hres); - ok(disp == (void*)wb, "disp=%p, expected %p\n", disp, wb); - if(disp) - IDispatch_Release(disp); - - hres = IWebBrowser2_get_Application(wb, NULL); - ok(hres == E_POINTER, "get_Application failed: %08x, expected E_POINTER\n", hres); - - /* Name */ - hres = IWebBrowser2_get_Name(wb, &sName); - ok(hres == S_OK, "getName failed: %08x, expected S_OK\n", hres); - if (PRIMARYLANGID(LANGIDFROMLCID(GetThreadLocale())) == LANG_ENGLISH) - ok(!strcmp_wa(sName, "Microsoft Web Browser Control"), "got '%s', expected 'Microsoft Web Browser Control'\n", wine_dbgstr_w(sName)); - else /* Non-English cannot be blank. */ - ok(sName!=NULL, "get_Name return a NULL string.\n"); - SysFreeString(sName); - - /* Quit */ - - hres = IWebBrowser2_Quit(wb); - ok(hres == E_FAIL, "Quit failed: %08x, expected E_FAIL\n", hres); - - IWebBrowser2_Release(wb); -} - -static void test_Silent(IWebBrowser2 *wb, IOleControl *control, BOOL is_clientsite) -{ - VARIANT_BOOL b; - HRESULT hres; - - b = 100; - hres = IWebBrowser2_get_Silent(wb, &b); - ok(hres == S_OK, "get_Silent failed: %08x\n", hres); - ok(b == VARIANT_FALSE, "b=%x\n", b); - - hres = IWebBrowser2_put_Silent(wb, VARIANT_TRUE); - ok(hres == S_OK, "set_Silent failed: %08x\n", hres); - - b = 100; - hres = IWebBrowser2_get_Silent(wb, &b); - ok(hres == S_OK, "get_Silent failed: %08x\n", hres); - ok(b == VARIANT_TRUE, "b=%x\n", b); - - hres = IWebBrowser2_put_Silent(wb, 100); - ok(hres == S_OK, "set_Silent failed: %08x\n", hres); - - b = 100; - hres = IWebBrowser2_get_Silent(wb, &b); - ok(hres == S_OK, "get_Silent failed: %08x\n", hres); - ok(b == VARIANT_TRUE, "b=%x\n", b); - - hres = IWebBrowser2_put_Silent(wb, VARIANT_FALSE); - ok(hres == S_OK, "set_Silent failed: %08x\n", hres); - - b = 100; - hres = IWebBrowser2_get_Silent(wb, &b); - ok(hres == S_OK, "get_Silent failed: %08x\n", hres); - ok(b == VARIANT_FALSE, "b=%x\n", b); - - if(is_clientsite) { - hres = IWebBrowser2_put_Silent(wb, VARIANT_TRUE); - ok(hres == S_OK, "set_Silent failed: %08x\n", hres); - - SET_EXPECT(Invoke_AMBIENT_SILENT); - } - - hres = IOleControl_OnAmbientPropertyChange(control, DISPID_AMBIENT_SILENT); - ok(hres == S_OK, "OnAmbientPropertyChange failed %08x\n", hres); - - if(is_clientsite) - CHECK_CALLED(Invoke_AMBIENT_SILENT); - - b = 100; - hres = IWebBrowser2_get_Silent(wb, &b); - ok(hres == S_OK, "get_Silent failed: %08x\n", hres); - ok(b == VARIANT_FALSE, "b=%x\n", b); -} - -static void test_Offline(IWebBrowser2 *wb, IOleControl *control, BOOL is_clientsite) -{ - VARIANT_BOOL b; - HRESULT hres; - - b = 100; - hres = IWebBrowser2_get_Offline(wb, &b); - ok(hres == S_OK, "get_Offline failed: %08x\n", hres); - ok(b == VARIANT_FALSE, "b=%x\n", b); - - hres = IWebBrowser2_put_Offline(wb, VARIANT_TRUE); - ok(hres == S_OK, "set_Offline failed: %08x\n", hres); - - b = 100; - hres = IWebBrowser2_get_Offline(wb, &b); - ok(hres == S_OK, "get_Offline failed: %08x\n", hres); - ok(b == VARIANT_TRUE, "b=%x\n", b); - - hres = IWebBrowser2_put_Offline(wb, 100); - ok(hres == S_OK, "set_Offline failed: %08x\n", hres); - - b = 100; - hres = IWebBrowser2_get_Offline(wb, &b); - ok(hres == S_OK, "get_Offline failed: %08x\n", hres); - ok(b == VARIANT_TRUE, "b=%x\n", b); - - hres = IWebBrowser2_put_Offline(wb, VARIANT_FALSE); - ok(hres == S_OK, "set_Offline failed: %08x\n", hres); - - b = 100; - hres = IWebBrowser2_get_Offline(wb, &b); - ok(hres == S_OK, "get_Offline failed: %08x\n", hres); - ok(b == VARIANT_FALSE, "b=%x\n", b); - - if(is_clientsite) { - hres = IWebBrowser2_put_Offline(wb, VARIANT_TRUE); - ok(hres == S_OK, "set_Offline failed: %08x\n", hres); - - SET_EXPECT(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); - } - - hres = IOleControl_OnAmbientPropertyChange(control, DISPID_AMBIENT_OFFLINEIFNOTCONNECTED); - ok(hres == S_OK, "OnAmbientPropertyChange failed %08x\n", hres); - - if(is_clientsite) - CHECK_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); - - b = 100; - hres = IWebBrowser2_get_Offline(wb, &b); - ok(hres == S_OK, "get_Offline failed: %08x\n", hres); - ok(b == VARIANT_FALSE, "b=%x\n", b); -} - -static void test_ambient_unknown(IWebBrowser2 *wb, IOleControl *control, BOOL is_clientsite) -{ - HRESULT hres; - - SET_EXPECT(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); - SET_EXPECT(Invoke_AMBIENT_SILENT); - SET_EXPECT(Invoke_AMBIENT_USERMODE); - SET_EXPECT(Invoke_AMBIENT_DLCONTROL); - SET_EXPECT(Invoke_AMBIENT_USERAGENT); - SET_EXPECT(Invoke_AMBIENT_PALETTE); - - hres = IOleControl_OnAmbientPropertyChange(control, DISPID_UNKNOWN); - ok(hres == S_OK, "OnAmbientPropertyChange failed %08x\n", hres); - - CHECK_EXPECT(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); - CHECK_EXPECT(Invoke_AMBIENT_SILENT); - CHECK_EXPECT(Invoke_AMBIENT_USERMODE); - CHECK_EXPECT(Invoke_AMBIENT_DLCONTROL); - CHECK_EXPECT(Invoke_AMBIENT_USERAGENT); - CHECK_EXPECT(Invoke_AMBIENT_PALETTE); - - CLEAR_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); - CLEAR_CALLED(Invoke_AMBIENT_SILENT); - CLEAR_CALLED(Invoke_AMBIENT_USERMODE); - CLEAR_CALLED(Invoke_AMBIENT_DLCONTROL); - CLEAR_CALLED(Invoke_AMBIENT_USERAGENT); - CLEAR_CALLED(Invoke_AMBIENT_PALETTE); -} - -static void test_wb_funcs(IUnknown *unk, BOOL is_clientsite) -{ - IWebBrowser2 *wb; - IOleControl *control; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IWebBrowser2, (void**)&wb); - ok(hres == S_OK, "Could not get IWebBrowser2 interface: %08x\n", hres); - - hres = IUnknown_QueryInterface(unk, &IID_IOleControl, (void**)&control); - ok(hres == S_OK, "Could not get IOleControl interface: %08x\n", hres); - - test_Silent(wb, control, is_clientsite); - test_Offline(wb, control, is_clientsite); - test_ambient_unknown(wb, control, is_clientsite); - - IWebBrowser_Release(wb); - IOleControl_Release(control); -} - -static void test_GetControlInfo(IUnknown *unk) -{ - IOleControl *control; - CONTROLINFO info; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IOleControl, (void**)&control); - ok(hres == S_OK, "Could not get IOleControl: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IOleControl_GetControlInfo(control, &info); - ok(hres == E_NOTIMPL, "GetControlInfo failed: %08x, exxpected E_NOTIMPL\n", hres); - hres = IOleControl_GetControlInfo(control, NULL); - ok(hres == E_NOTIMPL, "GetControlInfo failed: %08x, exxpected E_NOTIMPL\n", hres); - - IOleControl_Release(control); -} - -static void test_Extent(IUnknown *unk) -{ - IOleObject *oleobj; - SIZE size, expected; - HRESULT hres; - DWORD dpi_x; - DWORD dpi_y; - HDC hdc; - - /* default aspect ratio is 96dpi / 96dpi */ - hdc = GetDC(0); - dpi_x = GetDeviceCaps(hdc, LOGPIXELSX); - dpi_y = GetDeviceCaps(hdc, LOGPIXELSY); - ReleaseDC(0, hdc); - if (dpi_x != 96 || dpi_y != 96) - trace("dpi: %d / %d\n", dpi_y, dpi_y); - - hres = IUnknown_QueryInterface(unk, &IID_IOleObject, (void**)&oleobj); - ok(hres == S_OK, "Could not get IOleObkect: %08x\n", hres); - if(FAILED(hres)) - return; - - size.cx = size.cy = 0xdeadbeef; - hres = IOleObject_GetExtent(oleobj, DVASPECT_CONTENT, &size); - ok(hres == S_OK, "GetExtent failed: %08x\n", hres); - /* Default size is 50x20 pixels, in himetric units */ - expected.cx = MulDiv( 50, 2540, dpi_x ); - expected.cy = MulDiv( 20, 2540, dpi_y ); - ok(size.cx == expected.cx && size.cy == expected.cy, "size = {%d %d} (expected %d %d)\n", - size.cx, size.cy, expected.cx, expected.cy ); - - size.cx = 800; - size.cy = 700; - hres = IOleObject_SetExtent(oleobj, DVASPECT_CONTENT, &size); - ok(hres == S_OK, "SetExtent failed: %08x\n", hres); - - size.cx = size.cy = 0xdeadbeef; - hres = IOleObject_GetExtent(oleobj, DVASPECT_CONTENT, &size); - ok(hres == S_OK, "GetExtent failed: %08x\n", hres); - ok(size.cx == 800 && size.cy == 700, "size = {%d %d}\n", size.cx, size.cy); - - size.cx = size.cy = 0xdeadbeef; - hres = IOleObject_GetExtent(oleobj, 0, &size); - ok(hres == S_OK, "GetExtent failed: %08x\n", hres); - ok(size.cx == 800 && size.cy == 700, "size = {%d %d}\n", size.cx, size.cy); - - size.cx = 900; - size.cy = 800; - hres = IOleObject_SetExtent(oleobj, 0, &size); - ok(hres == S_OK, "SetExtent failed: %08x\n", hres); - - size.cx = size.cy = 0xdeadbeef; - hres = IOleObject_GetExtent(oleobj, 0, &size); - ok(hres == S_OK, "GetExtent failed: %08x\n", hres); - ok(size.cx == 900 && size.cy == 800, "size = {%d %d}\n", size.cx, size.cy); - - size.cx = size.cy = 0xdeadbeef; - hres = IOleObject_GetExtent(oleobj, 0xdeadbeef, &size); - ok(hres == S_OK, "GetExtent failed: %08x\n", hres); - ok(size.cx == 900 && size.cy == 800, "size = {%d %d}\n", size.cx, size.cy); - - size.cx = 1000; - size.cy = 900; - hres = IOleObject_SetExtent(oleobj, 0xdeadbeef, &size); - ok(hres == S_OK, "SetExtent failed: %08x\n", hres); - - size.cx = size.cy = 0xdeadbeef; - hres = IOleObject_GetExtent(oleobj, 0xdeadbeef, &size); - ok(hres == S_OK, "GetExtent failed: %08x\n", hres); - ok(size.cx == 1000 && size.cy == 900, "size = {%d %d}\n", size.cx, size.cy); - - size.cx = size.cy = 0xdeadbeef; - hres = IOleObject_GetExtent(oleobj, DVASPECT_CONTENT, &size); - ok(hres == S_OK, "GetExtent failed: %08x\n", hres); - ok(size.cx == 1000 && size.cy == 900, "size = {%d %d}\n", size.cx, size.cy); - - IOleObject_Release(oleobj); -} - -static void test_ConnectionPoint(IUnknown *unk, BOOL init) -{ - IConnectionPointContainer *container; - IConnectionPoint *point; - HRESULT hres; - - static DWORD dw = 100; - - hres = IUnknown_QueryInterface(unk, &IID_IConnectionPointContainer, (void**)&container); - ok(hres == S_OK, "QueryInterface(IID_IConnectionPointContainer) failed: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IConnectionPointContainer_FindConnectionPoint(container, &DIID_DWebBrowserEvents2, &point); - IConnectionPointContainer_Release(container); - ok(hres == S_OK, "FindConnectionPoint failed: %08x\n", hres); - if(FAILED(hres)) - return; - - if(init) { - hres = IConnectionPoint_Advise(point, (IUnknown*)&WebBrowserEvents2, &dw); - ok(hres == S_OK, "Advise failed: %08x\n", hres); - ok(dw == 1, "dw=%d, expected 1\n", dw); - }else { - hres = IConnectionPoint_Unadvise(point, dw); - ok(hres == S_OK, "Unadvise failed: %08x\n", hres); - } - - IConnectionPoint_Release(point); -} - -static void test_Navigate2(IUnknown *unk) -{ - IWebBrowser2 *webbrowser; - VARIANT url; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IWebBrowser2, (void**)&webbrowser); - ok(hres == S_OK, "QueryInterface(IID_IWebBrowser) failed: %08x\n", hres); - if(FAILED(hres)) - return; - - test_LocationURL(unk, is_first_load ? "" : current_url); - test_ready_state(is_first_load ? READYSTATE_UNINITIALIZED : READYSTATE_COMPLETE); - - V_VT(&url) = VT_BSTR; - V_BSTR(&url) = a2bstr("about:blank"); - current_url = "about:blank"; - - if(is_first_load) { - SET_EXPECT(Invoke_AMBIENT_USERMODE); - SET_EXPECT(Invoke_PROPERTYCHANGE); - SET_EXPECT(Invoke_BEFORENAVIGATE2); - SET_EXPECT(Invoke_DOWNLOADBEGIN); - SET_EXPECT(Exec_SETDOWNLOADSTATE_1); - SET_EXPECT(EnableModeless_FALSE); - SET_EXPECT(Invoke_STATUSTEXTCHANGE); - SET_EXPECT(SetStatusText); - SET_EXPECT(GetHostInfo); - SET_EXPECT(Invoke_AMBIENT_DLCONTROL); - SET_EXPECT(Invoke_AMBIENT_USERAGENT); - SET_EXPECT(Invoke_AMBIENT_PALETTE); - SET_EXPECT(GetOptionKeyPath); - SET_EXPECT(GetOverridesKeyPath); - SET_EXPECT(QueryStatus_SETPROGRESSTEXT); - SET_EXPECT(Exec_SETPROGRESSMAX); - SET_EXPECT(Exec_SETPROGRESSPOS); - SET_EXPECT(Invoke_SETSECURELOCKICON); - SET_EXPECT(Invoke_FILEDOWNLOAD); - SET_EXPECT(Exec_SETDOWNLOADSTATE_0); - SET_EXPECT(Invoke_COMMANDSTATECHANGE); - SET_EXPECT(EnableModeless_TRUE); - } - - hres = IWebBrowser2_Navigate2(webbrowser, &url, NULL, NULL, NULL, NULL); - ok(hres == S_OK, "Navigate2 failed: %08x\n", hres); - - if(is_first_load) { - CHECK_CALLED(Invoke_AMBIENT_USERMODE); - todo_wine CHECK_CALLED(Invoke_PROPERTYCHANGE); - CHECK_CALLED(Invoke_BEFORENAVIGATE2); - todo_wine CHECK_CALLED(Invoke_DOWNLOADBEGIN); - todo_wine CHECK_CALLED(Exec_SETDOWNLOADSTATE_1); - CHECK_CALLED(EnableModeless_FALSE); - CHECK_CALLED(Invoke_STATUSTEXTCHANGE); - CHECK_CALLED(SetStatusText); - CHECK_CALLED(GetHostInfo); - CHECK_CALLED(Invoke_AMBIENT_DLCONTROL); - CHECK_CALLED(Invoke_AMBIENT_USERAGENT); - CHECK_CALLED(Invoke_AMBIENT_PALETTE); - CHECK_CALLED(GetOptionKeyPath); - CHECK_CALLED_BROKEN(GetOverridesKeyPath); - todo_wine CHECK_CALLED(QueryStatus_SETPROGRESSTEXT); - todo_wine CHECK_CALLED(Exec_SETPROGRESSMAX); - todo_wine CHECK_CALLED(Exec_SETPROGRESSPOS); - todo_wine CHECK_CALLED_BROKEN(Invoke_SETSECURELOCKICON); - todo_wine CHECK_CALLED_BROKEN(Invoke_FILEDOWNLOAD); - todo_wine CHECK_CALLED(Invoke_COMMANDSTATECHANGE); - todo_wine CHECK_CALLED(Exec_SETDOWNLOADSTATE_0); - CHECK_CALLED(EnableModeless_TRUE); - } - - VariantClear(&url); - IWebBrowser2_Release(webbrowser); - - test_ready_state(READYSTATE_LOADING); -} - -static void test_download(DWORD flags) -{ - MSG msg; - - is_downloading = TRUE; - dwl_flags = flags; - - test_ready_state((flags & DWL_FROM_PUT_HREF) ? READYSTATE_COMPLETE : READYSTATE_LOADING); - - if(flags & DWL_EXPECT_BEFORE_NAVIGATE) { - SET_EXPECT(Invoke_PROPERTYCHANGE); - SET_EXPECT(Invoke_BEFORENAVIGATE2); - SET_EXPECT(TranslateUrl); - } - SET_EXPECT(Exec_SETPROGRESSMAX); - SET_EXPECT(Exec_SETPROGRESSPOS); - SET_EXPECT(Exec_SETDOWNLOADSTATE_1); - SET_EXPECT(DocHost_EnableModeless_FALSE); - SET_EXPECT(DocHost_EnableModeless_TRUE); - SET_EXPECT(Invoke_SETSECURELOCKICON); - SET_EXPECT(Invoke_282); - SET_EXPECT(EnableModeless_FALSE); - SET_EXPECT(Invoke_COMMANDSTATECHANGE); - SET_EXPECT(Invoke_STATUSTEXTCHANGE); - SET_EXPECT(SetStatusText); - SET_EXPECT(EnableModeless_TRUE); - if(is_first_load) - SET_EXPECT(QueryStatus_STOP); - else - SET_EXPECT(GetHostInfo); - SET_EXPECT(Exec_SETDOWNLOADSTATE_0); - SET_EXPECT(Invoke_TITLECHANGE); - SET_EXPECT(Invoke_NAVIGATECOMPLETE2); - if(is_first_load) - SET_EXPECT(GetDropTarget); - SET_EXPECT(Invoke_PROGRESSCHANGE); - SET_EXPECT(Invoke_DOCUMENTCOMPLETE); - while(!called_Invoke_DOCUMENTCOMPLETE && GetMessage(&msg, NULL, 0, 0)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - if(flags & DWL_EXPECT_BEFORE_NAVIGATE) { - todo_wine CHECK_CALLED(Invoke_PROPERTYCHANGE); - CHECK_CALLED(Invoke_BEFORENAVIGATE2); - CHECK_CALLED(TranslateUrl); - } - todo_wine CHECK_CALLED(Exec_SETPROGRESSMAX); - todo_wine CHECK_CALLED(Exec_SETPROGRESSPOS); - todo_wine CHECK_CALLED(Exec_SETDOWNLOADSTATE_1); - CLEAR_CALLED(DocHost_EnableModeless_FALSE); /* IE 7 */ - CLEAR_CALLED(DocHost_EnableModeless_TRUE); /* IE 7 */ - todo_wine CHECK_CALLED(Invoke_SETSECURELOCKICON); - CLEAR_CALLED(Invoke_282); /* IE 7 */ - if(is_first_load) - todo_wine CHECK_CALLED(EnableModeless_FALSE); - else - CLEAR_CALLED(EnableModeless_FALSE); /* IE 8 */ - CLEAR_CALLED(Invoke_COMMANDSTATECHANGE); - todo_wine CHECK_CALLED(Invoke_STATUSTEXTCHANGE); - todo_wine CHECK_CALLED(SetStatusText); - if(is_first_load) - todo_wine CHECK_CALLED(EnableModeless_TRUE); - else - CLEAR_CALLED(EnableModeless_FALSE); /* IE 8 */ - if(is_first_load) - todo_wine CHECK_CALLED(QueryStatus_STOP); - else - todo_wine CHECK_CALLED(GetHostInfo); - todo_wine CHECK_CALLED(Exec_SETDOWNLOADSTATE_0); - todo_wine CHECK_CALLED(Invoke_TITLECHANGE); - CHECK_CALLED(Invoke_NAVIGATECOMPLETE2); - if(is_first_load) - todo_wine CHECK_CALLED(GetDropTarget); - todo_wine CHECK_CALLED(Invoke_PROGRESSCHANGE); - CHECK_CALLED(Invoke_DOCUMENTCOMPLETE); - - is_downloading = FALSE; - - test_ready_state(READYSTATE_COMPLETE); -} - -static void test_olecmd(IUnknown *unk, BOOL loaded) -{ - IOleCommandTarget *cmdtrg; - OLECMD cmds[3]; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IOleCommandTarget, (void**)&cmdtrg); - ok(hres == S_OK, "Could not get IOleCommandTarget iface: %08x\n", hres); - if(FAILED(hres)) - return; - - cmds[0].cmdID = OLECMDID_SPELL; - cmds[0].cmdf = 0xdeadbeef; - cmds[1].cmdID = OLECMDID_REFRESH; - cmds[1].cmdf = 0xdeadbeef; - hres = IOleCommandTarget_QueryStatus(cmdtrg, NULL, 2, cmds, NULL); - if(loaded) { - ok(hres == S_OK, "QueryStatus failed: %08x\n", hres); - ok(cmds[0].cmdf == OLECMDF_SUPPORTED, "OLECMDID_SPELL cmdf = %x\n", cmds[0].cmdf); - ok(cmds[1].cmdf == (OLECMDF_ENABLED|OLECMDF_SUPPORTED), - "OLECMDID_REFRESH cmdf = %x\n", cmds[1].cmdf); - }else { - ok(hres == 0x80040104, "QueryStatus failed: %08x\n", hres); - ok(cmds[0].cmdf == 0xdeadbeef, "OLECMDID_SPELL cmdf = %x\n", cmds[0].cmdf); - ok(cmds[1].cmdf == 0xdeadbeef, "OLECMDID_REFRESH cmdf = %x\n", cmds[0].cmdf); - } - - IOleCommandTarget_Release(cmdtrg); -} - -static void test_IServiceProvider(IUnknown *unk) -{ - IServiceProvider *servprov = (void*)0xdeadbeef; - HRESULT hres; - IUnknown *ret = NULL; - static const IID IID_IBrowserService2 = - {0x68BD21CC,0x438B,0x11d2,{0xA5,0x60,0x00,0xA0,0xC,0x2D,0xBF,0xE8}}; - - hres = IUnknown_QueryInterface(unk, &IID_IServiceProvider, (void**)&servprov); - ok(hres == S_OK, "QueryInterface returned %08x, expected S_OK\n", hres); - if(FAILED(hres)) - return; - - hres = IServiceProvider_QueryService(servprov, &SID_STopLevelBrowser, &IID_IBrowserService2, (LPVOID*)&ret); - ok(hres == E_FAIL, "QueryService returned %08x, expected E_FAIL\n", hres); - ok(ret == NULL, "ret returned %p, expected NULL\n", ret); - if(hres == S_OK) - { - IUnknown_Release(ret); - } - - IServiceProvider_Release(servprov); -} - -#define get_document(u) _get_document(__LINE__,u) -static IDispatch *_get_document(unsigned line, IUnknown *unk) -{ - IHTMLDocument2 *html_doc; - IWebBrowser2 *wb; - IDispatch *disp; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IWebBrowser2, (void**)&wb); - ok_(__FILE__,line)(hres == S_OK, "QueryInterface(IID_IWebBrowser2) failed: %08x\n", hres); - - disp = NULL; - hres = IWebBrowser2_get_Document(wb, &disp); - IWebBrowser2_Release(wb); - ok_(__FILE__,line)(hres == S_OK, "get_Document failed: %08x\n", hres); - ok_(__FILE__,line)(disp != NULL, "doc_disp == NULL\n"); - - hres = IDispatch_QueryInterface(disp, &IID_IHTMLDocument2, (void**)&html_doc); - ok_(__FILE__,line)(hres == S_OK, "Could not get IHTMLDocument iface: %08x\n", hres); - ok(disp == (IDispatch*)html_doc, "disp != html_doc\n"); - IHTMLDocument_Release(html_doc); - - return disp; -} - -static void test_put_href(IUnknown *unk) -{ - IHTMLLocation *location; - IHTMLDocument2 *doc; - IDispatch *doc_disp; - BSTR str; - HRESULT hres; - - doc_disp = get_document(unk); - - hres = IDispatch_QueryInterface(doc_disp, &IID_IHTMLDocument2, (void**)&doc); - IDispatch_Release(doc_disp); - ok(hres == S_OK, "QueryInterface(IID_IHTMLDocument2 failed: %08x\n", hres); - - location = NULL; - hres = IHTMLDocument2_get_location(doc, &location); - IHTMLDocument2_Release(doc); - ok(hres == S_OK, "get_location failed: %08x\n", hres); - ok(location != NULL, "location == NULL\n"); - - SET_EXPECT(TranslateUrl); - SET_EXPECT(Invoke_BEFORENAVIGATE2); - SET_EXPECT(Invoke_PROPERTYCHANGE); - - dwl_flags = DWL_FROM_PUT_HREF; - - str = a2bstr("about:test"); - current_url = "about:test"; - is_first_load = FALSE; - hres = IHTMLLocation_put_href(location, str); - - CHECK_CALLED(TranslateUrl); - CHECK_CALLED(Invoke_BEFORENAVIGATE2); - todo_wine CHECK_CALLED(Invoke_PROPERTYCHANGE); - - IHTMLLocation_Release(location); - SysFreeString(str); - ok(hres == S_OK, "put_href failed: %08x\n", hres); - - test_ready_state(READYSTATE_COMPLETE); -} - -static void test_QueryInterface(IUnknown *unk) -{ - IQuickActivate *qa = (IQuickActivate*)0xdeadbeef; - IRunnableObject *runnable = (IRunnableObject*)0xdeadbeef; - IPerPropertyBrowsing *propbrowse = (void*)0xdeadbeef; - IOleInPlaceSite *inplace = (void*)0xdeadbeef; - IOleCache *cache = (void*)0xdeadbeef; - IObjectWithSite *site = (void*)0xdeadbeef; - IViewObjectEx *viewex = (void*)0xdeadbeef; - HRESULT hres; - - hres = IUnknown_QueryInterface(unk, &IID_IQuickActivate, (void**)&qa); - ok(hres == E_NOINTERFACE, "QueryInterface returned %08x, expected E_NOINTERFACE\n", hres); - ok(qa == NULL, "qa=%p, expected NULL\n", qa); - - hres = IUnknown_QueryInterface(unk, &IID_IRunnableObject, (void**)&runnable); - ok(hres == E_NOINTERFACE, "QueryInterface returned %08x, expected E_NOINTERFACE\n", hres); - ok(runnable == NULL, "runnable=%p, expected NULL\n", runnable); - - hres = IUnknown_QueryInterface(unk, &IID_IPerPropertyBrowsing, (void**)&propbrowse); - ok(hres == E_NOINTERFACE, "QueryInterface returned %08x, expected E_NOINTERFACE\n", hres); - ok(propbrowse == NULL, "propbrowse=%p, expected NULL\n", propbrowse); - - hres = IUnknown_QueryInterface(unk, &IID_IOleCache, (void**)&cache); - ok(hres == E_NOINTERFACE, "QueryInterface returned %08x, expected E_NOINTERFACE\n", hres); - ok(cache == NULL, "cache=%p, expected NULL\n", cache); - - hres = IUnknown_QueryInterface(unk, &IID_IOleInPlaceSite, (void**)&inplace); - ok(hres == E_NOINTERFACE, "QueryInterface returned %08x, expected E_NOINTERFACE\n", hres); - ok(inplace == NULL, "inplace=%p, expected NULL\n", inplace); - - hres = IUnknown_QueryInterface(unk, &IID_IObjectWithSite, (void**)&site); - ok(hres == E_NOINTERFACE, "QueryInterface returned %08x, expected E_NOINTERFACE\n", hres); - ok(site == NULL, "site=%p, expected NULL\n", site); - - hres = IUnknown_QueryInterface(unk, &IID_IViewObjectEx, (void**)&viewex); - ok(hres == E_NOINTERFACE, "QueryInterface returned %08x, expected E_NOINTERFACE\n", hres); - ok(viewex == NULL, "viewex=%p, expected NULL\n", viewex); - -} - -static void test_WebBrowser(BOOL do_download) -{ - IUnknown *unk = NULL; - ULONG ref; - HRESULT hres; - - hres = CoCreateInstance(&CLSID_WebBrowser, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, - &IID_IUnknown, (void**)&unk); - ok(hres == S_OK, "CoCreateInterface failed: %08x\n", hres); - if(FAILED(hres)) - return; - - is_downloading = FALSE; - is_first_load = TRUE; - - hres = IUnknown_QueryInterface(unk, &IID_IWebBrowser2, (void**)&wb); - ok(hres == S_OK, "Could not get IWebBrowser2 iface: %08x\n", hres); - - test_QueryInterface(unk); - test_ready_state(READYSTATE_UNINITIALIZED); - test_ClassInfo(unk); - test_LocationURL(unk, ""); - test_ConnectionPoint(unk, TRUE); - test_ClientSite(unk, &ClientSite, !do_download); - test_Extent(unk); - test_wb_funcs(unk, TRUE); - test_DoVerb(unk); - test_olecmd(unk, FALSE); - test_Navigate2(unk); - - if(do_download) { - IDispatch *doc, *doc2; - - test_download(0); - test_olecmd(unk, TRUE); - doc = get_document(unk); - - test_put_href(unk); - test_download(DWL_FROM_PUT_HREF); - doc2 = get_document(unk); - ok(doc == doc2, "doc != doc2\n"); - IDispatch_Release(doc2); - - test_Navigate2(unk); - test_download(DWL_EXPECT_BEFORE_NAVIGATE); - doc2 = get_document(unk); - ok(doc == doc2, "doc != doc2\n"); - IDispatch_Release(doc2); - IDispatch_Release(doc2); - } - - test_ClientSite(unk, NULL, !do_download); - test_ie_funcs(unk); - test_GetControlInfo(unk); - test_wb_funcs(unk, FALSE); - test_ConnectionPoint(unk, FALSE); - test_IServiceProvider(unk); - - IWebBrowser2_Release(wb); - ref = IUnknown_Release(unk); - ok(ref == 0, "ref=%d, expected 0\n", ref); -} - -START_TEST(webbrowser) -{ - container_hwnd = create_container_window(); - - OleInitialize(NULL); - - trace("Testing WebBrowser (no download)...\n"); - test_WebBrowser(FALSE); - trace("Testing WebBrowser...\n"); - test_WebBrowser(TRUE); - - OleUninitialize(); -} diff --git a/rostests/winetests/shell32/CMakeLists.txt b/rostests/winetests/shell32/CMakeLists.txt deleted file mode 100644 index e69d17b2a6c..00000000000 --- a/rostests/winetests/shell32/CMakeLists.txt +++ /dev/null @@ -1,34 +0,0 @@ - -remove_definitions(-DWINVER=0x502 -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x502) - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - appbar.c - autocomplete.c - brsfolder.c - ebrowser.c - generated.c - progman_dde.c - recyclebin.c - shelldispatch.c - shelllink.c - shellole.c - shellpath.c - shfldr_special.c - shlexec.c - shlfileop.c - shlfolder.c - shlview.c - string.c - systray.c - testlist.c - rsrc.rc) - -add_executable(shell32_winetest ${SOURCE}) -target_link_libraries(shell32_winetest wine uuid) -set_module_type(shell32_winetest win32cui) -add_importlibs(shell32_winetest shell32 ole32 oleaut32 user32 advapi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET shell32_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/shell32/appbar.c b/rostests/winetests/shell32/appbar.c deleted file mode 100644 index 5e5dfafbd22..00000000000 --- a/rostests/winetests/shell32/appbar.c +++ /dev/null @@ -1,444 +0,0 @@ -/* Unit tests for appbars - * - * Copyright 2008 Vincent Povirk 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 -#include - -#include - -#include "wine/test.h" - -#define MSG_APPBAR WM_APP - -static const CHAR testwindow_class[] = "testwindow"; - -static HMONITOR (WINAPI *pMonitorFromWindow)(HWND, DWORD); - -typedef BOOL (*boolean_function)(void); - -struct testwindow_info -{ - HWND hwnd; - BOOL registered; - BOOL to_be_deleted; - RECT desired_rect; - UINT edge; - RECT allocated_rect; -}; - -static struct testwindow_info windows[3]; - -static int expected_bottom; - -static void testwindow_setpos(HWND hwnd) -{ - struct testwindow_info* info = (struct testwindow_info*)GetWindowLongPtr(hwnd, GWLP_USERDATA); - APPBARDATA abd; - BOOL ret; - - ok(info != NULL, "got unexpected ABN_POSCHANGED notification\n"); - - if (!info || !info->registered) - { - return; - } - - if (info->to_be_deleted) - { - win_skip("Some Win95 and NT4 systems send messages to removed taskbars\n"); - return; - } - - abd.cbSize = sizeof(abd); - abd.hWnd = hwnd; - abd.uEdge = info->edge; - abd.rc = info->desired_rect; - ret = SHAppBarMessage(ABM_QUERYPOS, &abd); - ok(ret == TRUE, "SHAppBarMessage returned %i\n", ret); - switch (info->edge) - { - case ABE_BOTTOM: - ok(info->desired_rect.top == abd.rc.top, "ABM_QUERYPOS changed top of rect from %i to %i\n", info->desired_rect.top, abd.rc.top); - abd.rc.top = abd.rc.bottom - (info->desired_rect.bottom - info->desired_rect.top); - break; - case ABE_LEFT: - ok(info->desired_rect.right == abd.rc.right, "ABM_QUERYPOS changed right of rect from %i to %i\n", info->desired_rect.right, abd.rc.right); - abd.rc.right = abd.rc.left + (info->desired_rect.right - info->desired_rect.left); - break; - case ABE_RIGHT: - ok(info->desired_rect.left == abd.rc.left, "ABM_QUERYPOS changed left of rect from %i to %i\n", info->desired_rect.left, abd.rc.left); - abd.rc.left = abd.rc.right - (info->desired_rect.right - info->desired_rect.left); - break; - case ABE_TOP: - ok(info->desired_rect.bottom == abd.rc.bottom, "ABM_QUERYPOS changed bottom of rect from %i to %i\n", info->desired_rect.bottom, abd.rc.bottom); - abd.rc.bottom = abd.rc.top + (info->desired_rect.bottom - info->desired_rect.top); - break; - } - - ret = SHAppBarMessage(ABM_SETPOS, &abd); - ok(ret == TRUE, "SHAppBarMessage returned %i\n", ret); - - info->allocated_rect = abd.rc; - MoveWindow(hwnd, abd.rc.left, abd.rc.top, abd.rc.right-abd.rc.left, abd.rc.bottom-abd.rc.top, TRUE); -} - -static LRESULT CALLBACK testwindow_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - switch(msg) - { - case MSG_APPBAR: - { - switch(wparam) - { - case ABN_POSCHANGED: - testwindow_setpos(hwnd); - break; - } - return 0; - } - } - - return DefWindowProc(hwnd, msg, wparam, lparam); -} - -/* process pending messages until a condition is true or 3 seconds pass */ -static void do_events_until(boolean_function test) -{ - MSG msg; - UINT_PTR timerid; - BOOL timedout=FALSE; - - timerid = SetTimer(0, 0, 3000, NULL); - - while (1) - { - while (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) - { - if (msg.hwnd == 0 && msg.message == WM_TIMER && msg.wParam == timerid) - timedout = TRUE; - TranslateMessage(&msg); - DispatchMessageA(&msg); - } - if (timedout || test()) - break; - WaitMessage(); - } - - KillTimer(0, timerid); -} - -/* process any pending messages */ -static void do_events(void) -{ - MSG msg; - - while (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) - { - TranslateMessage(&msg); - DispatchMessageA(&msg); - } -} - -static BOOL no_appbars_intersect(void) -{ - int i, j; - RECT rc; - - for (i=0; i<2; i++) - { - for (j=i+1; j<3; j++) - { - if (windows[i].registered && windows[j].registered && - IntersectRect(&rc, &windows[i].allocated_rect, &windows[j].allocated_rect)) - return FALSE; - } - } - return TRUE; -} - -static BOOL got_expected_bottom(void) -{ - return (no_appbars_intersect() && windows[1].allocated_rect.bottom == expected_bottom); -} - -static void register_testwindow_class(void) -{ - WNDCLASSEXA cls; - - ZeroMemory(&cls, sizeof(cls)); - cls.cbSize = sizeof(cls); - cls.style = 0; - cls.lpfnWndProc = testwindow_wndproc; - cls.hInstance = NULL; - cls.hCursor = LoadCursor(0, IDC_ARROW); - cls.hbrBackground = (HBRUSH) COLOR_WINDOW; - cls.lpszClassName = testwindow_class; - - RegisterClassExA(&cls); -} - -#define test_window_rects(a, b) \ - ok(!IntersectRect(&rc, &windows[a].allocated_rect, &windows[b].allocated_rect), \ - "rectangles intersect (%i,%i,%i,%i)/(%i,%i,%i,%i)\n", \ - windows[a].allocated_rect.left, windows[a].allocated_rect.top, windows[a].allocated_rect.right, windows[a].allocated_rect.bottom, \ - windows[b].allocated_rect.left, windows[b].allocated_rect.top, windows[b].allocated_rect.right, windows[b].allocated_rect.bottom) - -static void test_setpos(void) -{ - APPBARDATA abd; - RECT rc; - int screen_width, screen_height; - BOOL ret; - int org_bottom1; - - screen_width = GetSystemMetrics(SM_CXSCREEN); - screen_height = GetSystemMetrics(SM_CYSCREEN); - - /* create and register windows[0] */ - windows[0].hwnd = CreateWindowExA(WS_EX_TOOLWINDOW|WS_EX_TOPMOST, - testwindow_class, testwindow_class, WS_POPUP|WS_VISIBLE, 0, 0, 0, 0, - NULL, NULL, NULL, NULL); - ok(windows[0].hwnd != NULL, "couldn't create window\n"); - do_events(); - abd.cbSize = sizeof(abd); - abd.hWnd = windows[0].hwnd; - abd.uCallbackMessage = MSG_APPBAR; - ret = SHAppBarMessage(ABM_NEW, &abd); - ok(ret == TRUE, "SHAppBarMessage returned %i\n", ret); - - /* ABM_NEW should return FALSE if the window is already registered */ - ret = SHAppBarMessage(ABM_NEW, &abd); - ok(ret == FALSE, "SHAppBarMessage returned %i\n", ret); - do_events(); - - /* dock windows[0] to the bottom of the screen */ - windows[0].registered = TRUE; - windows[0].to_be_deleted = FALSE; - windows[0].edge = ABE_BOTTOM; - windows[0].desired_rect.left = 0; - windows[0].desired_rect.right = screen_width; - windows[0].desired_rect.top = screen_height - 15; - windows[0].desired_rect.bottom = screen_height; - SetWindowLongPtr(windows[0].hwnd, GWLP_USERDATA, (LONG_PTR)&windows[0]); - testwindow_setpos(windows[0].hwnd); - do_events(); - - /* create and register windows[1] */ - windows[1].hwnd = CreateWindowExA(WS_EX_TOOLWINDOW|WS_EX_TOPMOST, - testwindow_class, testwindow_class, WS_POPUP|WS_VISIBLE, 0, 0, 0, 0, - NULL, NULL, NULL, NULL); - ok(windows[1].hwnd != NULL, "couldn't create window\n"); - abd.hWnd = windows[1].hwnd; - ret = SHAppBarMessage(ABM_NEW, &abd); - ok(ret == TRUE, "SHAppBarMessage returned %i\n", ret); - - /* dock windows[1] to the bottom of the screen */ - windows[1].registered = TRUE; - windows[1].to_be_deleted = FALSE; - windows[1].edge = ABE_BOTTOM; - windows[1].desired_rect.left = 0; - windows[1].desired_rect.right = screen_width; - windows[1].desired_rect.top = screen_height - 10; - windows[1].desired_rect.bottom = screen_height; - SetWindowLongPtr(windows[1].hwnd, GWLP_USERDATA, (LONG_PTR)&windows[1]); - testwindow_setpos(windows[1].hwnd); - - /* the windows are adjusted to they don't overlap */ - do_events_until(no_appbars_intersect); - test_window_rects(0, 1); - - /* make windows[0] larger, forcing windows[1] to move out of its way */ - windows[0].desired_rect.top = screen_height - 20; - testwindow_setpos(windows[0].hwnd); - do_events_until(no_appbars_intersect); - test_window_rects(0, 1); - - /* create and register windows[2] */ - windows[2].hwnd = CreateWindowExA(WS_EX_TOOLWINDOW|WS_EX_TOPMOST, - testwindow_class, testwindow_class, WS_POPUP|WS_VISIBLE, 0, 0, 0, 0, - NULL, NULL, NULL, NULL); - ok(windows[2].hwnd != NULL, "couldn't create window\n"); - do_events(); - - abd.hWnd = windows[2].hwnd; - ret = SHAppBarMessage(ABM_NEW, &abd); - ok(ret == TRUE, "SHAppBarMessage returned %i\n", ret); - - /* dock windows[2] to the bottom of the screen */ - windows[2].registered = TRUE; - windows[2].to_be_deleted = FALSE; - windows[2].edge = ABE_BOTTOM; - windows[2].desired_rect.left = 0; - windows[2].desired_rect.right = screen_width; - windows[2].desired_rect.top = screen_height - 10; - windows[2].desired_rect.bottom = screen_height; - SetWindowLongPtr(windows[2].hwnd, GWLP_USERDATA, (LONG_PTR)&windows[2]); - testwindow_setpos(windows[2].hwnd); - - do_events_until(no_appbars_intersect); - test_window_rects(0, 1); - test_window_rects(0, 2); - test_window_rects(1, 2); - - /* move windows[2] to the right side of the screen */ - windows[2].edge = ABE_RIGHT; - windows[2].desired_rect.left = screen_width - 15; - windows[2].desired_rect.right = screen_width; - windows[2].desired_rect.top = 0; - windows[2].desired_rect.bottom = screen_height; - testwindow_setpos(windows[2].hwnd); - - do_events_until(no_appbars_intersect); - test_window_rects(0, 1); - test_window_rects(0, 2); - test_window_rects(1, 2); - - /* move windows[1] to the top of the screen */ - windows[1].edge = ABE_TOP; - windows[1].desired_rect.left = 0; - windows[1].desired_rect.right = screen_width; - windows[1].desired_rect.top = 0; - windows[1].desired_rect.bottom = 15; - testwindow_setpos(windows[1].hwnd); - - do_events_until(no_appbars_intersect); - test_window_rects(0, 1); - test_window_rects(0, 2); - test_window_rects(1, 2); - - /* move windows[1] back to the bottom of the screen */ - windows[1].edge = ABE_BOTTOM; - windows[1].desired_rect.left = 0; - windows[1].desired_rect.right = screen_width; - windows[1].desired_rect.top = screen_height - 10; - windows[1].desired_rect.bottom = screen_height; - testwindow_setpos(windows[1].hwnd); - - do_events_until(no_appbars_intersect); - test_window_rects(0, 1); - test_window_rects(0, 2); - test_window_rects(1, 2); - - /* removing windows[0] will cause windows[1] to move down into its space */ - expected_bottom = max(windows[0].allocated_rect.bottom, windows[1].allocated_rect.bottom); - org_bottom1 = windows[1].allocated_rect.bottom; - ok(windows[0].allocated_rect.bottom > windows[1].allocated_rect.bottom, - "Expected windows[0] to be lower than windows[1]\n"); - - abd.hWnd = windows[0].hwnd; - windows[0].to_be_deleted = TRUE; - ret = SHAppBarMessage(ABM_REMOVE, &abd); - ok(ret == TRUE, "SHAppBarMessage returned %i\n", ret); - windows[0].registered = FALSE; - DestroyWindow(windows[0].hwnd); - - do_events_until(got_expected_bottom); - - if (windows[1].allocated_rect.bottom == org_bottom1) - win_skip("Some broken Vista boxes don't move the higher appbar down\n"); - else - ok(windows[1].allocated_rect.bottom == expected_bottom, - "windows[1]'s bottom is %i, expected %i\n", - windows[1].allocated_rect.bottom, expected_bottom); - - test_window_rects(1, 2); - - /* remove the other windows */ - abd.hWnd = windows[1].hwnd; - windows[1].to_be_deleted = TRUE; - ret = SHAppBarMessage(ABM_REMOVE, &abd); - ok(ret == TRUE, "SHAppBarMessage returned %i\n", ret); - windows[1].registered = FALSE; - DestroyWindow(windows[1].hwnd); - - abd.hWnd = windows[2].hwnd; - windows[2].to_be_deleted = TRUE; - ret = SHAppBarMessage(ABM_REMOVE, &abd); - ok(ret == TRUE, "SHAppBarMessage returned %i\n", ret); - windows[2].registered = FALSE; - DestroyWindow(windows[2].hwnd); -} - -static void test_appbarget(void) -{ - APPBARDATA abd; - HWND hwnd, foregnd, unset_hwnd; - UINT_PTR ret; - - memset(&abd, 0xcc, sizeof(abd)); - memset(&unset_hwnd, 0xcc, sizeof(unset_hwnd)); - abd.cbSize = sizeof(abd); - abd.uEdge = ABE_BOTTOM; - - hwnd = (HWND)SHAppBarMessage(ABM_GETAUTOHIDEBAR, &abd); - ok(hwnd == NULL || IsWindow(hwnd), "ret %p which is not a window\n", hwnd); - ok(abd.hWnd == unset_hwnd, "hWnd overwritten %p\n",abd.hWnd); - - if (!pMonitorFromWindow) - { - win_skip("MonitorFromWindow is not available\n"); - } - else - { - /* Presumably one can pass a hwnd with ABM_GETAUTOHIDEBAR to specify a monitor. - Pass the foreground window and check */ - foregnd = GetForegroundWindow(); - if(foregnd) - { - abd.hWnd = foregnd; - hwnd = (HWND)SHAppBarMessage(ABM_GETAUTOHIDEBAR, &abd); - ok(hwnd == NULL || IsWindow(hwnd), "ret %p which is not a window\n", hwnd); - ok(abd.hWnd == foregnd, "hWnd overwritten\n"); - if(hwnd) - { - HMONITOR appbar_mon, foregnd_mon; - appbar_mon = pMonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST); - foregnd_mon = pMonitorFromWindow(foregnd, MONITOR_DEFAULTTONEAREST); - ok(appbar_mon == foregnd_mon, "Windows on different monitors\n"); - } - } - } - - memset(&abd, 0xcc, sizeof(abd)); - abd.cbSize = sizeof(abd); - ret = SHAppBarMessage(ABM_GETTASKBARPOS, &abd); - if(ret) - { - ok(abd.hWnd == (HWND)0xcccccccc, "hWnd overwritten\n"); - ok(abd.uEdge <= ABE_BOTTOM || - broken(abd.uEdge == 0xcccccccc), /* Some Win95 and NT4 */ - "uEdge not returned\n"); - ok(abd.rc.left != 0xcccccccc, "rc not updated\n"); - } - - return; -} - -START_TEST(appbar) -{ - HMODULE huser32; - - huser32 = GetModuleHandleA("user32.dll"); - pMonitorFromWindow = (void*)GetProcAddress(huser32, "MonitorFromWindow"); - - register_testwindow_class(); - - test_setpos(); - test_appbarget(); -} diff --git a/rostests/winetests/shell32/autocomplete.c b/rostests/winetests/shell32/autocomplete.c deleted file mode 100644 index 5ff88479c1a..00000000000 --- a/rostests/winetests/shell32/autocomplete.c +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Tests for autocomplete - * - * Copyright 2008 Jan de Mooij - * - * 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 - -#include -#include - -#include "windows.h" -#include "shobjidl.h" -#include "shlguid.h" -#include "initguid.h" -#include "shldisp.h" - -static HWND hMainWnd, hEdit; -static HINSTANCE hinst; -static int killfocus_count; - -static void test_invalid_init(void) -{ - HRESULT hr; - IAutoComplete *ac; - IUnknown *acSource; - HWND edit_control; - - /* AutoComplete instance */ - hr = CoCreateInstance(&CLSID_AutoComplete, NULL, CLSCTX_INPROC_SERVER, - &IID_IAutoComplete, (void **)&ac); - if (hr == REGDB_E_CLASSNOTREG) - { - win_skip("CLSID_AutoComplete is not registered\n"); - return; - } - ok(hr == S_OK, "no IID_IAutoComplete (0x%08x)\n", hr); - - /* AutoComplete source */ - hr = CoCreateInstance(&CLSID_ACLMulti, NULL, CLSCTX_INPROC_SERVER, - &IID_IACList, (void **)&acSource); - if (hr == REGDB_E_CLASSNOTREG) - { - win_skip("CLSID_ACLMulti is not registered\n"); - IAutoComplete_Release(ac); - return; - } - ok(hr == S_OK, "no IID_IACList (0x%08x)\n", hr); - - edit_control = CreateWindowExA(0, "EDIT", "Some text", 0, 10, 10, 300, 300, - hMainWnd, NULL, hinst, NULL); - ok(edit_control != NULL, "Can't create edit control\n"); - - /* The refcount of acSource would be incremented on older Windows. */ - hr = IAutoComplete_Init(ac, NULL, acSource, NULL, NULL); - ok(hr == E_INVALIDARG || - broken(hr == S_OK), /* Win2k/XP/Win2k3 */ - "Init returned 0x%08x\n", hr); - if (hr == E_INVALIDARG) - { - LONG ref; - - IUnknown_AddRef(acSource); - ref = IUnknown_Release(acSource); - ok(ref == 1, "Expected AutoComplete source refcount to be 1, got %d\n", ref); - } - -if (0) -{ - /* Older Windows versions never check the window handle, while newer - * versions only check for NULL. Subsequent attempts to initialize the - * object after this call succeeds would fail, because initialization - * state is determined by whether a non-NULL window handle is stored. */ - hr = IAutoComplete_Init(ac, (HWND)0xdeadbeef, acSource, NULL, NULL); - ok(hr == S_OK, "Init returned 0x%08x\n", hr); - - /* Tests crash on older Windows. */ - hr = IAutoComplete_Init(ac, NULL, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "Init returned 0x%08x\n", hr); - - hr = IAutoComplete_Init(ac, edit_control, NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "Init returned 0x%08x\n", hr); -} - - /* bind to edit control */ - hr = IAutoComplete_Init(ac, edit_control, acSource, NULL, NULL); - ok(hr == S_OK, "Init returned 0x%08x\n", hr); - - /* try invalid parameters after successful initialization .*/ - hr = IAutoComplete_Init(ac, NULL, NULL, NULL, NULL); - ok(hr == E_INVALIDARG || - hr == E_FAIL, /* Win2k/XP/Win2k3 */ - "Init returned 0x%08x\n", hr); - - hr = IAutoComplete_Init(ac, NULL, acSource, NULL, NULL); - ok(hr == E_INVALIDARG || - hr == E_FAIL, /* Win2k/XP/Win2k3 */ - "Init returned 0x%08x\n", hr); - - hr = IAutoComplete_Init(ac, edit_control, NULL, NULL, NULL); - ok(hr == E_INVALIDARG || - hr == E_FAIL, /* Win2k/XP/Win2k3 */ - "Init returned 0x%08x\n", hr); - - /* try initializing twice on the same control */ - hr = IAutoComplete_Init(ac, edit_control, acSource, NULL, NULL); - ok(hr == E_FAIL, "Init returned 0x%08x\n", hr); - - /* try initializing with a different control */ - hr = IAutoComplete_Init(ac, hEdit, acSource, NULL, NULL); - ok(hr == E_FAIL, "Init returned 0x%08x\n", hr); - - DestroyWindow(edit_control); - - /* try initializing with a different control after - * destroying the original initialization control */ - hr = IAutoComplete_Init(ac, hEdit, acSource, NULL, NULL); - ok(hr == E_UNEXPECTED || - hr == E_FAIL, /* Win2k/XP/Win2k3 */ - "Init returned 0x%08x\n", hr); - - IUnknown_Release(acSource); - IAutoComplete_Release(ac); -} -static IAutoComplete *test_init(void) -{ - HRESULT r; - IAutoComplete *ac; - IUnknown *acSource; - LONG_PTR user_data; - - /* AutoComplete instance */ - r = CoCreateInstance(&CLSID_AutoComplete, NULL, CLSCTX_INPROC_SERVER, - &IID_IAutoComplete, (LPVOID*)&ac); - if (r == REGDB_E_CLASSNOTREG) - { - win_skip("CLSID_AutoComplete is not registered\n"); - return NULL; - } - ok(r == S_OK, "no IID_IAutoComplete (0x%08x)\n", r); - - /* AutoComplete source */ - r = CoCreateInstance(&CLSID_ACLMulti, NULL, CLSCTX_INPROC_SERVER, - &IID_IACList, (LPVOID*)&acSource); - if (r == REGDB_E_CLASSNOTREG) - { - win_skip("CLSID_ACLMulti is not registered\n"); - IAutoComplete_Release(ac); - return NULL; - } - ok(r == S_OK, "no IID_IACList (0x%08x)\n", r); - - user_data = GetWindowLongPtrA(hEdit, GWLP_USERDATA); - ok(user_data == 0, "Expected the edit control user data to be zero\n"); - - /* bind to edit control */ - r = IAutoComplete_Init(ac, hEdit, acSource, NULL, NULL); - ok(r == S_OK, "Init returned 0x%08x\n", r); - - user_data = GetWindowLongPtrA(hEdit, GWLP_USERDATA); - ok(user_data == 0, "Expected the edit control user data to be zero\n"); - - IUnknown_Release(acSource); - - return ac; -} - -static void test_killfocus(void) -{ - /* Test if WM_KILLFOCUS messages are handled properly by checking if - * the parent receives an EN_KILLFOCUS message. */ - SetFocus(hEdit); - killfocus_count = 0; - SetFocus(0); - ok(killfocus_count == 1, "Expected one EN_KILLFOCUS message, got: %d\n", killfocus_count); -} - -static LRESULT CALLBACK MyWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch(msg) { - case WM_CREATE: - /* create edit control */ - hEdit = CreateWindowEx(0, "EDIT", "Some text", 0, 10, 10, 300, 300, - hWnd, NULL, hinst, NULL); - ok(hEdit != NULL, "Can't create edit control\n"); - break; - case WM_COMMAND: - if(HIWORD(wParam) == EN_KILLFOCUS) - killfocus_count++; - break; - } - return DefWindowProcA(hWnd, msg, wParam, lParam); -} - -static void createMainWnd(void) -{ - WNDCLASSA wc; - wc.style = CS_HREDRAW | CS_VREDRAW; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = GetModuleHandleA(NULL); - wc.hIcon = NULL; - wc.hCursor = LoadCursorA(NULL, IDC_IBEAM); - wc.hbrBackground = GetSysColorBrush(COLOR_WINDOW); - wc.lpszMenuName = NULL; - wc.lpszClassName = "MyTestWnd"; - wc.lpfnWndProc = MyWndProc; - RegisterClassA(&wc); - - hMainWnd = CreateWindowExA(0, "MyTestWnd", "Blah", WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, 130, 105, NULL, NULL, GetModuleHandleA(NULL), 0); -} - -START_TEST(autocomplete) -{ - HRESULT r; - MSG msg; - IAutoComplete* ac; - - r = CoInitialize(NULL); - ok(r == S_OK, "CoInitialize failed (0x%08x). Tests aborted.\n", r); - if (r != S_OK) - return; - - createMainWnd(); - ok(hMainWnd != NULL, "Failed to create parent window. Tests aborted.\n"); - if (!hMainWnd) return; - - test_invalid_init(); - ac = test_init(); - if (!ac) - goto cleanup; - test_killfocus(); - - PostQuitMessage(0); - while(GetMessageA(&msg,0,0,0)) { - TranslateMessage(&msg); - DispatchMessageA(&msg); - } - - IAutoComplete_Release(ac); - -cleanup: - DestroyWindow(hEdit); - DestroyWindow(hMainWnd); - - CoUninitialize(); -} diff --git a/rostests/winetests/shell32/brsfolder.c b/rostests/winetests/shell32/brsfolder.c deleted file mode 100644 index 7b87967f46b..00000000000 --- a/rostests/winetests/shell32/brsfolder.c +++ /dev/null @@ -1,365 +0,0 @@ -/* - * Unit test of the SHBrowseForFolder function. - * - * Copyright 2009-2010 Michael Mc Donnell - * Copyright 2011 André Hentschel - * - * 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/test.h" -#define IDD_MAKENEWFOLDER 0x3746 /* From "../shresdef.h" */ -#define TIMER_WAIT_MS 50 /* Should be long enough for slow systems */ - -static const char new_folder_name[] = "foo"; -static LPITEMIDLIST selected_folder_pidl; - -/* - * Returns the number of folders in a folder. - */ -static int get_number_of_folders(LPCSTR path) -{ - int number_of_folders = 0; - char path_search_string[MAX_PATH]; - WIN32_FIND_DATA find_data; - HANDLE find_handle; - - strncpy(path_search_string, path, MAX_PATH); - strncat(path_search_string, "*", 1); - - find_handle = FindFirstFile(path_search_string, &find_data); - if (find_handle == INVALID_HANDLE_VALUE) - return -1; - - do - { - if ((find_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && - strcmp(find_data.cFileName, ".") != 0 && - strcmp(find_data.cFileName, "..") != 0) - { - number_of_folders++; - } - } - while (FindNextFile(find_handle, &find_data) != 0); - - FindClose(find_handle); - return number_of_folders; -} - -static BOOL does_folder_or_file_exist(LPCSTR folder_path) -{ - DWORD file_attributes = GetFileAttributesA(folder_path); - return !(file_attributes == INVALID_FILE_ATTRIBUTES); -} - -/* - * Timer callback used by test_click_make_new_folder_button. It simulates a user - * making a new folder and calling it "foo". - */ -static void CALLBACK make_new_folder_timer_callback(HWND hwnd, UINT uMsg, - UINT_PTR idEvent, DWORD dwTime) -{ - static int step = 0; - - switch (step++) - { - case 0: - /* Click "Make New Folder" button */ - PostMessage(hwnd, WM_COMMAND, IDD_MAKENEWFOLDER, 0); - break; - case 1: - /* Set the new folder name to foo by replacing text in edit control */ - SendMessage(GetFocus(), EM_REPLACESEL, 0, (LPARAM) new_folder_name); - SetFocus(hwnd); - break; - case 2: - /* - * The test does not trigger the correct state on Windows. This results - * in the new folder pidl not being returned. The result is as - * expected if the same steps are done manually. - * Sending the down key selects the new folder again which sets the - * correct state. This ensures that the correct pidl is returned. - */ - keybd_event(VK_DOWN, 0, 0, 0); - break; - case 3: - keybd_event(VK_DOWN, 0, KEYEVENTF_KEYUP, 0); - break; - case 4: - KillTimer(hwnd, idEvent); - /* Close dialog box */ - SendMessage(hwnd, WM_COMMAND, IDOK, 0); - break; - default: - break; - } -} - -/* - * Callback used by test_click_make_new_folder_button. It sets up a timer to - * simulate user input. - */ -static int CALLBACK create_new_folder_callback(HWND hwnd, UINT uMsg, - LPARAM lParam, LPARAM lpData) -{ - switch (uMsg) - { - case BFFM_INITIALIZED: - /* User input is simulated in timer callback */ - SetTimer(hwnd, 0, TIMER_WAIT_MS, make_new_folder_timer_callback); - return TRUE; - default: - return FALSE; - } -} - -/* - * Tests if clicking the "Make New Folder" button in a SHBrowseForFolder - * dialog box creates a new folder. (Bug 17986). - * - * Here follows a description of what happens on W2K,Vista, W2K8, W7: - * When the "Make New Folder" button is clicked a new folder is created and - * inserted into the tree. The folder is given a default name that depends on - * the locale (e.g. "New Folder"). The folder name is selected and the dialog - * waits for the user to type in a new name. The folder is renamed when the user - * types in a name and presses enter. - * - * Note that XP and W2K3 do not select the folder name or wait for the user - * to type in a new folder name. This behavior is considered broken as most - * users would like to give the folder a name after creating it. The fact that - * it originally waited for the user to type in a new folder name(W2K), and then - * again was changed back wait for the new folder name(Vista, W2K8, W7), - * indicates that MS also believes that it was broken in XP and W2K3. - */ -static void test_click_make_new_folder_button(void) -{ - HRESULT resCoInit, hr; - BROWSEINFO bi; - LPITEMIDLIST pidl = NULL; - LPITEMIDLIST test_folder_pidl; - IShellFolder *test_folder_object; - char test_folder_path[MAX_PATH]; - WCHAR test_folder_pathW[MAX_PATH]; - CHAR new_folder_path[MAX_PATH]; - CHAR new_folder_pidl_path[MAX_PATH]; - char selected_folder[MAX_PATH]; - const CHAR title[] = "test_click_make_new_folder_button"; - int number_of_folders = -1; - SHFILEOPSTRUCT shfileop; - - if (does_folder_or_file_exist(title)) - { - skip("The test folder already exists.\n"); - return; - } - - /* Must initialize COM if using the NEWDIAlOGSTYLE according to MSDN. */ - resCoInit = CoInitialize(NULL); - if(!(resCoInit == S_OK || resCoInit == S_FALSE)) - { - skip("COM could not be initialized %u\n", GetLastError()); - return; - } - - /* Leave room for concatenating title, two backslashes, and an extra NULL. */ - if (!GetCurrentDirectoryA(MAX_PATH-strlen(title)-3, test_folder_path)) - { - skip("GetCurrentDirectoryA failed %u\n", GetLastError()); - } - strncat(test_folder_path, "\\", 1); - strncat(test_folder_path, title, MAX_PATH-1); - strncat(test_folder_path, "\\", 1); - - /* Avoid conflicts by creating a test folder. */ - if (!CreateDirectoryA(title, NULL)) - { - skip("CreateDirectoryA failed %u\n", GetLastError()); - return; - } - - /* Initialize browse info struct for SHBrowseForFolder */ - bi.hwndOwner = NULL; - bi.pszDisplayName = (LPTSTR) &selected_folder; - bi.lpszTitle = (LPTSTR) title; - bi.ulFlags = BIF_NEWDIALOGSTYLE; - bi.lpfn = create_new_folder_callback; - /* Use test folder as the root folder for dialog box */ - MultiByteToWideChar(CP_UTF8, 0, test_folder_path, MAX_PATH, - test_folder_pathW, MAX_PATH); - hr = SHGetDesktopFolder(&test_folder_object); - ok (SUCCEEDED(hr), "SHGetDesktopFolder failed with hr 0x%08x\n", hr); - if (FAILED(hr)) { - skip("SHGetDesktopFolder failed - skipping\n"); - return; - } - test_folder_object->lpVtbl->ParseDisplayName(test_folder_object, NULL, NULL, - test_folder_pathW, 0UL, &test_folder_pidl, 0UL); - bi.pidlRoot = test_folder_pidl; - - /* Display dialog box and let callback click the buttons */ - pidl = SHBrowseForFolder(&bi); - - number_of_folders = get_number_of_folders(test_folder_path); - ok(number_of_folders == 1 || broken(number_of_folders == 0) /* W95, W98 */, - "Clicking \"Make New Folder\" button did not result in a new folder.\n"); - - /* There should be a new folder foo inside the test folder */ - strcpy(new_folder_path, test_folder_path); - strcat(new_folder_path, new_folder_name); - ok(does_folder_or_file_exist(new_folder_path) - || broken(!does_folder_or_file_exist(new_folder_path)) /* W95, W98, XP, W2K3 */, - "The new folder did not get the name %s\n", new_folder_name); - - /* Dialog should return a pidl pointing to the new folder */ - ok(SHGetPathFromIDListA(pidl, new_folder_pidl_path), - "SHGetPathFromIDList failed for new folder.\n"); - ok(strcmp(new_folder_path, new_folder_pidl_path) == 0 - || broken(strcmp(new_folder_path, new_folder_pidl_path) != 0) /* earlier than Vista */, - "SHBrowseForFolder did not return the pidl for the new folder. " - "Expected '%s' got '%s'\n", new_folder_path, new_folder_pidl_path); - - /* Remove test folder and any subfolders created in this test */ - shfileop.hwnd = NULL; - shfileop.wFunc = FO_DELETE; - /* Path must be double NULL terminated */ - test_folder_path[strlen(test_folder_path)+1] = '\0'; - shfileop.pFrom = test_folder_path; - shfileop.pTo = NULL; - shfileop.fFlags = FOF_NOCONFIRMATION|FOF_NOERRORUI|FOF_SILENT; - SHFileOperation(&shfileop); - - if (pidl) - CoTaskMemFree(pidl); - if (test_folder_pidl) - CoTaskMemFree(test_folder_pidl); - test_folder_object->lpVtbl->Release(test_folder_object); - - CoUninitialize(); -} - - -/* - * Callback used by test_selection. - */ -static int CALLBACK selection_callback(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData) -{ - DWORD ret; - - switch (uMsg) - { - case BFFM_INITIALIZED: - /* test with zero values */ - ret = SendMessage(hwnd, BFFM_SETSELECTIONA, 0, 0); - ok(!ret, "SendMessage returned: %u\n", ret); - ret = SendMessage(hwnd, BFFM_SETSELECTIONW, 0, 0); - ok(!ret, "SendMessage returned: %u\n", ret); - - ret = SendMessage(hwnd, BFFM_SETSELECTIONA, 1, 0); - ok(!ret, "SendMessage returned: %u\n", ret); - - if(0) - { - /* Crashes on NT4 */ - ret = SendMessage(hwnd, BFFM_SETSELECTIONW, 1, 0); - ok(!ret, "SendMessage returned: %u\n", ret); - } - - ret = SendMessage(hwnd, BFFM_SETSELECTIONA, 0, (LPARAM)selected_folder_pidl); - ok(!ret, "SendMessage returned: %u\n", ret); - ret = SendMessage(hwnd, BFFM_SETSELECTIONW, 0, (LPARAM)selected_folder_pidl); - ok(!ret, "SendMessage returned: %u\n", ret); - - ret = SendMessage(hwnd, BFFM_SETSELECTIONA, 1, (LPARAM)selected_folder_pidl); - ok(!ret, "SendMessage returned: %u\n", ret); - ret = SendMessage(hwnd, BFFM_SETSELECTIONW, 1, (LPARAM)selected_folder_pidl); - ok(!ret, "SendMessage returned: %u\n", ret); - - ret = SendMessage(hwnd, BFFM_SETSELECTIONA, 1, (LPARAM)new_folder_name); - ok(!ret, "SendMessage returned: %u\n", ret); - ret = SendMessage(hwnd, BFFM_SETSELECTIONW, 1, (LPARAM)new_folder_name); - ok(!ret, "SendMessage returned: %u\n", ret); - - SendMessage(hwnd, WM_COMMAND, IDOK, 0); - return TRUE; - default: - return FALSE; - } -} - -static void test_selection(void) -{ - HRESULT resCoInit, hr; - BROWSEINFO bi; - LPITEMIDLIST pidl = NULL; - IShellFolder *desktop_object; - WCHAR selected_folderW[MAX_PATH]; - const CHAR title[] = "test_selection"; - - resCoInit = CoInitialize(NULL); - if(!(resCoInit == S_OK || resCoInit == S_FALSE)) - { - skip("COM could not be initialized %u\n", GetLastError()); - return; - } - - if (!GetCurrentDirectoryW(MAX_PATH, selected_folderW)) - { - skip("GetCurrentDirectoryW failed %u\n", GetLastError()); - } - - /* Initialize browse info struct for SHBrowseForFolder */ - bi.hwndOwner = NULL; - bi.pszDisplayName = NULL; - bi.lpszTitle = (LPTSTR) title; - bi.lpfn = selection_callback; - - hr = SHGetDesktopFolder(&desktop_object); - ok (SUCCEEDED(hr), "SHGetDesktopFolder failed with hr 0x%08x\n", hr); - if (FAILED(hr)) { - skip("SHGetDesktopFolder failed - skipping\n"); - return; - } - desktop_object->lpVtbl->ParseDisplayName(desktop_object, NULL, NULL, - selected_folderW, 0UL, &selected_folder_pidl, 0UL); - bi.pidlRoot = selected_folder_pidl; - - /* test without flags */ - bi.ulFlags = 0; - pidl = SHBrowseForFolder(&bi); - - if (pidl) - CoTaskMemFree(pidl); - - /* test with flag */ - bi.ulFlags = BIF_NEWDIALOGSTYLE; - pidl = SHBrowseForFolder(&bi); - - if (pidl) - CoTaskMemFree(pidl); - - desktop_object->lpVtbl->Release(desktop_object); - - CoUninitialize(); -} - -START_TEST(brsfolder) -{ - test_click_make_new_folder_button(); - test_selection(); -} diff --git a/rostests/winetests/shell32/ebrowser.c b/rostests/winetests/shell32/ebrowser.c deleted file mode 100644 index 8149f8f95a4..00000000000 --- a/rostests/winetests/shell32/ebrowser.c +++ /dev/null @@ -1,1799 +0,0 @@ -/* - * Unit tests for the Explorer Browser control - * - * Copyright 2010 David Hedberg - * - * 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 COBJMACROS -#define CONST_VTABLE - -#include "shlobj.h" -#include "shlwapi.h" - -#include "wine/test.h" - -#include "initguid.h" -#include "mshtml.h" - -/********************************************************************** - * Some IIDs for test_SetSite. - */ -DEFINE_GUID(IID_IBrowserSettings, 0xDD1E21CC, 0xE2C7, 0x402C, 0xBF,0x05, 0x10,0x32,0x8D,0x3F,0x6B,0xAD); -DEFINE_GUID(IID_IShellBrowserService, 0xDFBC7E30, 0xF9E5, 0x455F, 0x88,0xF8, 0xFA,0x98,0xC1,0xE4,0x94,0xCA); -DEFINE_GUID(IID_IShellTaskScheduler, 0x6CCB7BE0, 0x6807, 0x11D0, 0xB8,0x10, 0x00,0xC0,0x4F,0xD7,0x06,0xEC); -DEFINE_GUID(IID_IBrowserWithActivationNotification, - 0x6DB89131, 0x7B4C, 0x4E1C, 0x8B,0x01, 0x5D,0x31,0x2C,0x9C,0x73,0x88); -DEFINE_GUID(IID_ILayoutModifier, 0x90B4135A, 0x95BA, 0x46EA, 0x8C,0xAA, 0xE0,0x5B,0x45,0xCD,0x80,0x1E); -DEFINE_GUID(CLSID_Desktop, 0x00021400, 0x0000, 0x0000, 0xC0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46); -DEFINE_GUID(IID_IFileDialogPrivate, 0xAC92FFC5, 0xF0E9, 0x455A, 0x90,0x6B, 0x4A,0x83,0xE7,0x4A,0x80,0x3B); -DEFINE_GUID(IID_IWebbrowserApp, 0x0002df05, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46); -DEFINE_GUID(IID_IBrowserSettings_Vista, 0xF81B80BC, 0x29D1, 0x4734, 0xB5,0x15, 0x77,0x24,0xBF,0xF1,0x60,0x01); -DEFINE_GUID(IID_IFolderTypeModifier, 0x04BA120E, 0xAD52, 0x4A2D, 0x98,0x07, 0x2D,0xA1,0x78,0xD0,0xC3,0xE1); -DEFINE_GUID(IID_IShellBrowserService_Vista, 0xF5A24314, 0x5B8B, 0x44FA, 0xBC,0x2E, 0x31,0x28,0x55,0x44,0xB5,0x20); -DEFINE_GUID(IID_IFileDialogPrivate_Vista, 0x2539E31C, 0x857F, 0x43C4, 0x88,0x72, 0x45,0xBD,0x6A,0x02,0x48,0x92); -DEFINE_GUID(SID_SMenuBandParent, 0x8C278EEC, 0x3EAB, 0x11D1, 0x8C,0xB0 ,0x00,0xC0,0x4F,0xD9,0x18,0xD0); -DEFINE_GUID(SID_SMenuPopup, 0xD1E7AFEB, 0x6A2E, 0x11D0, 0x8C,0x78, 0x00,0xC0,0x4F,0xD9,0x18,0xB4); -DEFINE_GUID(IID_IShellMenu, 0xEE1F7637, 0xE138, 0x11D1, 0x83,0x79, 0x00,0xC0,0x4F,0xD9,0x18,0xD0); - -DEFINE_GUID(IID_UnknownInterface1, 0x3934E4C2, 0x8143, 0x4E4C, 0xA1,0xDC, 0x71,0x8F,0x85,0x63,0xF3,0x37); -DEFINE_GUID(IID_UnknownInterface2, 0x3E24A11C, 0x15B2, 0x4F71, 0xB8,0x1E, 0x00,0x8F,0x77,0x99,0x8E,0x9F); -DEFINE_GUID(IID_UnknownInterface3, 0xE38FE0F3, 0x3DB0, 0x47EE, 0xA3,0x14, 0x25,0xCF,0x7F,0x4B,0xF5,0x21); -DEFINE_GUID(IID_UnknownInterface4, 0xFAD451C2, 0xAF58, 0x4161, 0xB9,0xFF, 0x57,0xAF,0xBB,0xED,0x0A,0xD2); -DEFINE_GUID(IID_UnknownInterface5, 0xF80C2137, 0x5829, 0x4CE9, 0x9F,0x81, 0xA9,0x5E,0x15,0x9D,0xD8,0xD5); -DEFINE_GUID(IID_UnknownInterface6, 0xD7F81F62, 0x491F, 0x49BC, 0x89,0x1D, 0x56,0x65,0x08,0x5D,0xF9,0x69); -DEFINE_GUID(IID_UnknownInterface7, 0x68A4FDBA, 0xA48A, 0x4A86, 0xA3,0x29, 0x1B,0x69,0xB9,0xB1,0x9E,0x89); -DEFINE_GUID(IID_UnknownInterface8, 0xD3B1CAF5, 0xEC4F, 0x4B2E, 0xBC,0xB0, 0x60,0xD7,0x15,0xC9,0x3C,0xB2); -DEFINE_GUID(IID_UnknownInterface9, 0x9536CA39, 0x1ACB, 0x4AE6, 0xAD,0x27, 0x24,0x03,0xD0,0x4C,0xA2,0x8F); -DEFINE_GUID(IID_UnknownInterface10, 0xB722BE00, 0x4E68, 0x101B, 0xA2,0xBC, 0x00,0xAA,0x00,0x40,0x47,0x70); - -static HWND hwnd; - -static HRESULT (WINAPI *pSHCreateShellItem)(LPCITEMIDLIST,IShellFolder*,LPCITEMIDLIST,IShellItem**); -static HRESULT (WINAPI *pSHParseDisplayName)(LPCWSTR,IBindCtx*,LPITEMIDLIST*,SFGAOF,SFGAOF*); - -static void init_function_pointers(void) -{ - HMODULE hmod; - - hmod = GetModuleHandleA("shell32.dll"); - pSHCreateShellItem = (void*)GetProcAddress(hmod, "SHCreateShellItem"); - pSHParseDisplayName = (void*)GetProcAddress(hmod, "SHParseDisplayName"); -} - -/********************************************************************* - * Some simple helpers - */ -static HRESULT ebrowser_instantiate(IExplorerBrowser **peb) -{ - return CoCreateInstance(&CLSID_ExplorerBrowser, NULL, CLSCTX_INPROC_SERVER, - &IID_IExplorerBrowser, (void**)peb); -} - -static HRESULT ebrowser_initialize(IExplorerBrowser *peb) -{ - RECT rc; - rc.top = rc.left = 0; rc.bottom = rc.right = 500; - return IExplorerBrowser_Initialize(peb, hwnd, &rc, NULL); -} - -static HRESULT ebrowser_browse_to_desktop(IExplorerBrowser *peb) -{ - LPITEMIDLIST pidl_desktop; - HRESULT hr; - SHGetSpecialFolderLocation (hwnd, CSIDL_DESKTOP, &pidl_desktop); - hr = IExplorerBrowser_BrowseToIDList(peb, pidl_desktop, 0); - ILFree(pidl_desktop); - return hr; -} - -/* Process some messages */ -static void process_msgs(void) -{ - MSG msg; - while(PeekMessage( &msg, NULL, 0, 0, PM_REMOVE)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } -} - -static void dbg_print_guid(const GUID *guid) { - WCHAR buf[MAX_PATH]; - - StringFromGUID2(guid, buf, MAX_PATH); - printf("guid:[%s]\n", wine_dbgstr_wn(buf, lstrlenW(buf))); -} - -/********************************************************************* - * IExplorerBrowserEvents implementation - */ -typedef struct { - IExplorerBrowserEvents IExplorerBrowserEvents_iface; - LONG ref; - UINT pending, created, completed, failed; -} IExplorerBrowserEventsImpl; - -static IExplorerBrowserEventsImpl ebev; - -static inline IExplorerBrowserEventsImpl *impl_from_IExplorerBrowserEvents(IExplorerBrowserEvents *iface) -{ - return CONTAINING_RECORD(iface, IExplorerBrowserEventsImpl, IExplorerBrowserEvents_iface); -} - -static HRESULT WINAPI IExplorerBrowserEvents_fnQueryInterface(IExplorerBrowserEvents *iface, - REFIID riid, void **ppvObj) -{ - ok(0, "Never called.\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI IExplorerBrowserEvents_fnAddRef(IExplorerBrowserEvents *iface) -{ - IExplorerBrowserEventsImpl *This = impl_from_IExplorerBrowserEvents(iface); - return InterlockedIncrement(&This->ref); -} - -static ULONG WINAPI IExplorerBrowserEvents_fnRelease(IExplorerBrowserEvents *iface) -{ - IExplorerBrowserEventsImpl *This = impl_from_IExplorerBrowserEvents(iface); - return InterlockedDecrement(&This->ref); -} - -static HRESULT WINAPI IExplorerBrowserEvents_fnOnNavigationPending(IExplorerBrowserEvents *iface, - PCIDLIST_ABSOLUTE pidlFolder) -{ - IExplorerBrowserEventsImpl *This = impl_from_IExplorerBrowserEvents(iface); - This->pending++; - return S_OK; -} - -static HRESULT WINAPI IExplorerBrowserEvents_fnOnNavigationComplete(IExplorerBrowserEvents *iface, - PCIDLIST_ABSOLUTE pidlFolder) -{ - IExplorerBrowserEventsImpl *This = impl_from_IExplorerBrowserEvents(iface); - This->completed++; - return S_OK; -} -static HRESULT WINAPI IExplorerBrowserEvents_fnOnNavigationFailed(IExplorerBrowserEvents *iface, - PCIDLIST_ABSOLUTE pidlFolder) -{ - IExplorerBrowserEventsImpl *This = impl_from_IExplorerBrowserEvents(iface); - This->failed++; - return S_OK; -} -static HRESULT WINAPI IExplorerBrowserEvents_fnOnViewCreated(IExplorerBrowserEvents *iface, - IShellView *psv) -{ - IExplorerBrowserEventsImpl *This = impl_from_IExplorerBrowserEvents(iface); - This->created++; - return S_OK; -} - -static const IExplorerBrowserEventsVtbl ebevents = -{ - IExplorerBrowserEvents_fnQueryInterface, - IExplorerBrowserEvents_fnAddRef, - IExplorerBrowserEvents_fnRelease, - IExplorerBrowserEvents_fnOnNavigationPending, - IExplorerBrowserEvents_fnOnViewCreated, - IExplorerBrowserEvents_fnOnNavigationComplete, - IExplorerBrowserEvents_fnOnNavigationFailed -}; - -/********************************************************************* - * IExplorerPaneVisibility implementation - */ -typedef struct -{ - IExplorerPaneVisibility IExplorerPaneVisibility_iface; - LONG ref; - LONG count; - LONG np, cp, cp_o, cp_v, dp, pp, qp, aqp, unk; /* The panes */ -} IExplorerPaneVisibilityImpl; - -static inline IExplorerPaneVisibilityImpl *impl_from_IExplorerPaneVisibility(IExplorerPaneVisibility *iface) -{ - return CONTAINING_RECORD(iface, IExplorerPaneVisibilityImpl, IExplorerPaneVisibility_iface); -} - -static HRESULT WINAPI IExplorerPaneVisibility_fnQueryInterface(IExplorerPaneVisibility *iface, - REFIID riid, LPVOID *ppvObj) -{ - ok(0, "Not called.\n"); - trace("REFIID:"); dbg_print_guid(riid); - *ppvObj = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI IExplorerPaneVisibility_fnAddRef(IExplorerPaneVisibility *iface) -{ - IExplorerPaneVisibilityImpl *This = impl_from_IExplorerPaneVisibility(iface); - return InterlockedIncrement(&This->ref); -} - -static ULONG WINAPI IExplorerPaneVisibility_fnRelease(IExplorerPaneVisibility *iface) -{ - IExplorerPaneVisibilityImpl *This = impl_from_IExplorerPaneVisibility(iface); - ULONG ref = InterlockedDecrement(&This->ref); - - if(!ref) - HeapFree(GetProcessHeap(), 0, This); - - return ref; -} - -static HRESULT WINAPI IExplorerPaneVisibility_fnGetPaneState(IExplorerPaneVisibility *iface, - REFEXPLORERPANE ep, - EXPLORERPANESTATE *peps) -{ - IExplorerPaneVisibilityImpl *This = impl_from_IExplorerPaneVisibility(iface); - This->count++; - - ok(ep != NULL, "ep is NULL.\n"); - ok(peps != NULL, "peps is NULL.\n"); - ok(*peps == 0, "got %d\n", *peps); - - *peps = EPS_FORCE; - if(IsEqualGUID(&EP_NavPane, ep)) This->np++; - else if(IsEqualGUID(&EP_Commands, ep)) This->cp++; - else if(IsEqualGUID(&EP_Commands_Organize, ep)) This->cp_o++; - else if(IsEqualGUID(&EP_Commands_View, ep)) This->cp_v++; - else if(IsEqualGUID(&EP_DetailsPane, ep)) This->dp++; - else if(IsEqualGUID(&EP_PreviewPane, ep)) This->pp++; - else if(IsEqualGUID(&EP_QueryPane, ep)) This->qp++; - else if(IsEqualGUID(&EP_AdvQueryPane, ep)) This->aqp++; - else - { - trace("Unknown explorer pane: "); dbg_print_guid(ep); - This->unk++; - } - - return S_OK; -} - -static const IExplorerPaneVisibilityVtbl epvvt = -{ - IExplorerPaneVisibility_fnQueryInterface, - IExplorerPaneVisibility_fnAddRef, - IExplorerPaneVisibility_fnRelease, - IExplorerPaneVisibility_fnGetPaneState -}; - -static IExplorerPaneVisibilityImpl *create_explorerpanevisibility(void) -{ - IExplorerPaneVisibilityImpl *epv; - - epv = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IExplorerPaneVisibilityImpl)); - epv->IExplorerPaneVisibility_iface.lpVtbl = &epvvt; - epv->ref = 1; - - return epv; -} - -/********************************************************************* - * ICommDlgBrowser3 implementation - */ -typedef struct -{ - ICommDlgBrowser3 ICommDlgBrowser3_iface; - LONG ref; - UINT OnDefaultCommand, OnStateChange, IncludeObject; - UINT Notify, GetDefaultMenuText, GetViewFlags; - UINT OnColumnClicked, GetCurrentFilter, OnPreviewCreated; -} ICommDlgBrowser3Impl; - -static inline ICommDlgBrowser3Impl *impl_from_ICommDlgBrowser3(ICommDlgBrowser3 *iface) -{ - return CONTAINING_RECORD(iface, ICommDlgBrowser3Impl, ICommDlgBrowser3_iface); -} - -static HRESULT WINAPI ICommDlgBrowser3_fnQueryInterface(ICommDlgBrowser3 *iface, REFIID riid, LPVOID *ppvObj) -{ - ok(0, "Not called.\n"); - trace("riid:"); dbg_print_guid(riid); - *ppvObj = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI ICommDlgBrowser3_fnAddRef(ICommDlgBrowser3 *iface) -{ - ICommDlgBrowser3Impl *This = impl_from_ICommDlgBrowser3(iface); - return InterlockedIncrement(&This->ref); -} - -static ULONG WINAPI ICommDlgBrowser3_fnRelease(ICommDlgBrowser3 *iface) -{ - ICommDlgBrowser3Impl *This = impl_from_ICommDlgBrowser3(iface); - ULONG ref = InterlockedDecrement(&This->ref); - - if(!ref) - HeapFree(GetProcessHeap(), 0, This); - - return ref; -} - -static HRESULT WINAPI ICommDlgBrowser3_fnOnDefaultCommand(ICommDlgBrowser3* iface, IShellView *shv) -{ - ICommDlgBrowser3Impl *This = impl_from_ICommDlgBrowser3(iface); - This->OnDefaultCommand++; - return E_NOTIMPL; -} - -static HRESULT WINAPI ICommDlgBrowser3_fnOnStateChange( - ICommDlgBrowser3* iface, - IShellView *shv, - ULONG uChange) -{ - ICommDlgBrowser3Impl *This = impl_from_ICommDlgBrowser3(iface); - This->OnStateChange++; - return E_NOTIMPL; -} - -static HRESULT WINAPI ICommDlgBrowser3_fnIncludeObject( - ICommDlgBrowser3* iface, - IShellView *shv, - LPCITEMIDLIST pidl) -{ - ICommDlgBrowser3Impl *This = impl_from_ICommDlgBrowser3(iface); - This->IncludeObject++; - return S_OK; -} - -static HRESULT WINAPI ICommDlgBrowser3_fnNotify( - ICommDlgBrowser3* iface, - IShellView *ppshv, - DWORD dwNotifyType) -{ - ICommDlgBrowser3Impl *This = impl_from_ICommDlgBrowser3(iface); - This->Notify++; - return E_NOTIMPL; -} - -static HRESULT WINAPI ICommDlgBrowser3_fnGetDefaultMenuText( - ICommDlgBrowser3* iface, - IShellView *ppshv, - LPWSTR pszText, - int cchMax) -{ - ICommDlgBrowser3Impl *This = impl_from_ICommDlgBrowser3(iface); - This->GetDefaultMenuText++; - return E_NOTIMPL; -} - -static HRESULT WINAPI ICommDlgBrowser3_fnGetViewFlags( - ICommDlgBrowser3* iface, - DWORD *pdwFlags) -{ - ICommDlgBrowser3Impl *This = impl_from_ICommDlgBrowser3(iface); - This->GetViewFlags++; - return E_NOTIMPL; -} - -static HRESULT WINAPI ICommDlgBrowser3_fnOnColumnClicked( - ICommDlgBrowser3* iface, - IShellView *ppshv, - int iColumn) -{ - ICommDlgBrowser3Impl *This = impl_from_ICommDlgBrowser3(iface); - This->OnColumnClicked++; - return E_NOTIMPL; -} - -static HRESULT WINAPI ICommDlgBrowser3_fnGetCurrentFilter( - ICommDlgBrowser3* iface, - LPWSTR pszFileSpec, - int cchFileSpec) -{ - ICommDlgBrowser3Impl *This = impl_from_ICommDlgBrowser3(iface); - This->GetCurrentFilter++; - return E_NOTIMPL; -} - -static HRESULT WINAPI ICommDlgBrowser3_fnOnPreviewCreated( - ICommDlgBrowser3* iface, - IShellView *ppshv) -{ - ICommDlgBrowser3Impl *This = impl_from_ICommDlgBrowser3(iface); - This->OnPreviewCreated++; - return E_NOTIMPL; -} - -static const ICommDlgBrowser3Vtbl cdbvtbl = -{ - ICommDlgBrowser3_fnQueryInterface, - ICommDlgBrowser3_fnAddRef, - ICommDlgBrowser3_fnRelease, - ICommDlgBrowser3_fnOnDefaultCommand, - ICommDlgBrowser3_fnOnStateChange, - ICommDlgBrowser3_fnIncludeObject, - ICommDlgBrowser3_fnNotify, - ICommDlgBrowser3_fnGetDefaultMenuText, - ICommDlgBrowser3_fnGetViewFlags, - ICommDlgBrowser3_fnOnColumnClicked, - ICommDlgBrowser3_fnGetCurrentFilter, - ICommDlgBrowser3_fnOnPreviewCreated -}; - -static ICommDlgBrowser3Impl *create_commdlgbrowser3(void) -{ - ICommDlgBrowser3Impl *cdb; - - cdb = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ICommDlgBrowser3Impl)); - cdb->ICommDlgBrowser3_iface.lpVtbl = &cdbvtbl; - cdb->ref = 1; - - return cdb; -} - -/********************************************************************* - * IServiceProvider Implementation - */ -typedef struct { - IServiceProvider IServiceProvider_iface; - LONG ref; - struct services { - REFGUID service; - REFIID id; - int count; - void *punk; - } *interfaces; -} IServiceProviderImpl; - -static inline IServiceProviderImpl *impl_from_IServiceProvider(IServiceProvider *iface) -{ - return CONTAINING_RECORD(iface, IServiceProviderImpl, IServiceProvider_iface); -} - -static HRESULT WINAPI IServiceProvider_fnQueryInterface(IServiceProvider *iface, REFIID riid, LPVOID *ppvObj) -{ - *ppvObj = NULL; - if(IsEqualIID(riid, &IID_IServiceProvider)) - { - *ppvObj = iface; - IServiceProvider_AddRef(iface); - return S_OK; - } - - if(IsEqualIID(riid, &IID_IOleCommandTarget)) - { - /* Windows Vista. */ - return E_NOINTERFACE; - } - - ok(0, "Unexpected interface requested.\n"); - trace("riid: "); dbg_print_guid(riid); - return E_NOINTERFACE; -} - -static ULONG WINAPI IServiceProvider_fnAddRef(IServiceProvider *iface) -{ - IServiceProviderImpl *This = impl_from_IServiceProvider(iface); - return InterlockedIncrement(&This->ref); -} - -static ULONG WINAPI IServiceProvider_fnRelease(IServiceProvider *iface) -{ - IServiceProviderImpl *This = impl_from_IServiceProvider(iface); - LONG ref = InterlockedDecrement(&This->ref); - - if(!ref) - HeapFree(GetProcessHeap(), 0, This); - - return ref; -} - -static HRESULT WINAPI IServiceProvider_fnQueryService(IServiceProvider *iface, - REFGUID guidService, - REFIID riid, - void **ppv) -{ - IServiceProviderImpl *This = impl_from_IServiceProvider(iface); - BOOL was_in_list = FALSE; - IUnknown *punk = NULL; - UINT i; - - *ppv = NULL; - for(i = 0; This->interfaces[i].service != NULL; i++) - { - if(IsEqualGUID(This->interfaces[i].service, guidService) && - IsEqualIID(This->interfaces[i].id, riid)) - { - was_in_list = TRUE; - This->interfaces[i].count++; - punk = This->interfaces[i].punk; - break; - } - } - - ok(was_in_list, "-- Unknown service requested --\n"); - if(!was_in_list) - { - trace("guidService: "); dbg_print_guid(guidService); - trace("riid: "); dbg_print_guid(riid); - } - - /* Give back an interface, if any. */ - if(punk) - { - *ppv = punk; - IUnknown_AddRef(punk); - return S_OK; - } - - return E_NOINTERFACE; -} - -static const IServiceProviderVtbl spvtbl = -{ - IServiceProvider_fnQueryInterface, - IServiceProvider_fnAddRef, - IServiceProvider_fnRelease, - IServiceProvider_fnQueryService -}; - -static IServiceProviderImpl *create_serviceprovider(void) -{ - IServiceProviderImpl *sp = HeapAlloc(GetProcessHeap(), 0, sizeof(IServiceProviderImpl)); - sp->IServiceProvider_iface.lpVtbl = &spvtbl; - sp->ref = 1; - return sp; -} - -static void test_QueryInterface(void) -{ - IExplorerBrowser *peb; - IUnknown *punk; - HRESULT hr; - LONG lres; - - hr = ebrowser_instantiate(&peb); - ok(hr == S_OK, "Got 0x%08x\n", hr); - -#define test_qinterface(iid, exp) \ - do { \ - hr = IExplorerBrowser_QueryInterface(peb, &iid, (void**)&punk); \ - ok(hr == exp, "(%s:)Expected (0x%08x), got (0x%08x)\n", \ - #iid, exp, hr); \ - if(SUCCEEDED(hr)) IUnknown_Release(punk); \ - } while(0) - - test_qinterface(IID_IUnknown, S_OK); - test_qinterface(IID_IExplorerBrowser, S_OK); - test_qinterface(IID_IShellBrowser, S_OK); - todo_wine test_qinterface(IID_IOleWindow, S_OK); - test_qinterface(IID_ICommDlgBrowser, S_OK); - test_qinterface(IID_ICommDlgBrowser2, S_OK); - test_qinterface(IID_ICommDlgBrowser3, S_OK); - todo_wine test_qinterface(IID_IServiceProvider, S_OK); - test_qinterface(IID_IObjectWithSite, S_OK); - todo_wine test_qinterface(IID_IConnectionPointContainer, S_OK); - test_qinterface(IID_IOleObject, E_NOINTERFACE); - test_qinterface(IID_IViewObject, E_NOINTERFACE); - test_qinterface(IID_IViewObject2, E_NOINTERFACE); - test_qinterface(IID_IViewObjectEx, E_NOINTERFACE); - test_qinterface(IID_IConnectionPoint, E_NOINTERFACE); - test_qinterface(IID_IShellView, E_NOINTERFACE); - test_qinterface(IID_INameSpaceTreeControlEvents, E_NOINTERFACE); - -#undef test_qinterface - - lres = IExplorerBrowser_Release(peb); - ok(lres == 0, "Got %d\n", lres); -} - -static void test_SB_misc(void) -{ - IExplorerBrowser *peb; - IShellBrowser *psb; - IUnknown *punk; - HRESULT hr; - HWND retHwnd; - LRESULT lres; - LONG ref; - - ebrowser_instantiate(&peb); - hr = IExplorerBrowser_QueryInterface(peb, &IID_IShellBrowser, (void**)&psb); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(FAILED(hr)) - { - skip("Failed to get IShellBrowser interface.\n"); - return; - } - - /* Some unimplemented methods */ - retHwnd = (HWND)0xDEADBEEF; - hr = IShellBrowser_GetControlWindow(psb, FCW_TOOLBAR, &retHwnd); - ok(hr == E_NOTIMPL, "got (0x%08x)\n", hr); - ok(retHwnd == (HWND)0xDEADBEEF, "HWND overwritten\n"); - - hr = IShellBrowser_GetControlWindow(psb, FCW_STATUS, &retHwnd); - ok(hr == E_NOTIMPL, "got (0x%08x)\n", hr); - ok(retHwnd == (HWND)0xDEADBEEF, "HWND overwritten\n"); - - hr = IShellBrowser_GetControlWindow(psb, FCW_TREE, &retHwnd); - ok(hr == E_NOTIMPL, "got (0x%08x)\n", hr); - ok(retHwnd == (HWND)0xDEADBEEF, "HWND overwritten\n"); - - hr = IShellBrowser_GetControlWindow(psb, FCW_PROGRESS, &retHwnd); - ok(hr == E_NOTIMPL, "got (0x%08x)\n", hr); - ok(retHwnd == (HWND)0xDEADBEEF, "HWND overwritten\n"); - - /* ::InsertMenuSB */ - hr = IShellBrowser_InsertMenusSB(psb, NULL, NULL); - ok(hr == E_NOTIMPL, "got (0x%08x)\n", hr); - - /* ::RemoveMenusSB */ - hr = IShellBrowser_RemoveMenusSB(psb, NULL); - ok(hr == E_NOTIMPL, "got (0x%08x)\n", hr); - - /* ::SetMenuSB */ - hr = IShellBrowser_SetMenuSB(psb, NULL, NULL, NULL); - ok(hr == E_NOTIMPL, "got (0x%08x)\n", hr); - - /***** Before EB::Initialize *****/ - - /* ::GetWindow */ - retHwnd = (HWND)0xDEADBEEF; - hr = IShellBrowser_GetWindow(psb, &retHwnd); - ok(hr == E_FAIL, "got (0x%08x)\n", hr); - ok(retHwnd == (HWND)0xDEADBEEF, "HWND overwritten\n"); - - todo_wine - { - - /* ::SendControlMsg */ - lres = 0xDEADBEEF; - hr = IShellBrowser_SendControlMsg(psb, FCW_STATUS, 0, 0, 0, &lres); - ok(hr == S_OK, "got (0x%08x)\n", hr); - ok(lres == 0, "lres was %ld\n", lres); - - lres = 0xDEADBEEF; - hr = IShellBrowser_SendControlMsg(psb, FCW_TOOLBAR, TB_CHECKBUTTON, - FCIDM_TB_SMALLICON, TRUE, &lres); - ok(hr == S_OK, "got (0x%08x)\n", hr); - ok(lres == 0, "lres was %ld\n", lres); - - hr = IShellBrowser_SendControlMsg(psb, FCW_STATUS, 0, 0, 0, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - hr = IShellBrowser_SendControlMsg(psb, FCW_TREE, 0, 0, 0, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - hr = IShellBrowser_SendControlMsg(psb, FCW_PROGRESS, 0, 0, 0, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); - } - - /* ::QueryActiveShellView */ - hr = IShellBrowser_QueryActiveShellView(psb, (IShellView**)&punk); - ok(hr == E_FAIL, "got (0x%08x)\n", hr); - - /* Initialize ExplorerBrowser */ - ebrowser_initialize(peb); - - /***** After EB::Initialize *****/ - - /* ::GetWindow */ - hr = IShellBrowser_GetWindow(psb, &retHwnd); - ok(hr == S_OK, "got (0x%08x)\n", hr); - ok(GetParent(retHwnd) == hwnd, "The HWND returned is not our child.\n"); - - todo_wine - { - /* ::SendControlMsg */ - hr = IShellBrowser_SendControlMsg(psb, FCW_STATUS, 0, 0, 0, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - lres = 0xDEADBEEF; - hr = IShellBrowser_SendControlMsg(psb, FCW_TOOLBAR, 0, 0, 0, &lres); - ok(hr == S_OK, "got (0x%08x)\n", hr); - ok(lres == 0, "lres was %ld\n", lres); - - lres = 0xDEADBEEF; - hr = IShellBrowser_SendControlMsg(psb, FCW_STATUS, 0, 0, 0, &lres); - ok(hr == S_OK, "got (0x%08x)\n", hr); - ok(lres == 0, "lres was %ld\n", lres); - - lres = 0xDEADBEEF; - hr = IShellBrowser_SendControlMsg(psb, 1234, 0, 0, 0, &lres); - ok(hr == S_OK, "got (0x%08x)\n", hr); - ok(lres == 0, "lres was %ld\n", lres); - - /* Returns S_OK */ - hr = IShellBrowser_SetStatusTextSB(psb, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - hr = IShellBrowser_ContextSensitiveHelp(psb, FALSE); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - hr = IShellBrowser_EnableModelessSB(psb, TRUE); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - hr = IShellBrowser_SetToolbarItems(psb, NULL, 1, 1); - ok(hr == S_OK, "got (0x%08x)\n", hr); - } - - hr = IShellBrowser_QueryActiveShellView(psb, (IShellView**)&punk); - ok(hr == E_FAIL, "got (0x%08x)\n", hr); - - IShellBrowser_Release(psb); - IExplorerBrowser_Destroy(peb); - IExplorerBrowser_Release(peb); - - /* Browse to the desktop. */ - ebrowser_instantiate(&peb); - ebrowser_initialize(peb); - IExplorerBrowser_QueryInterface(peb, &IID_IShellBrowser, (void**)&psb); - - process_msgs(); - hr = ebrowser_browse_to_desktop(peb); - ok(hr == S_OK, "got (0x%08x)\n", hr); - process_msgs(); - - /****** After Browsing *****/ - - hr = IShellBrowser_QueryActiveShellView(psb, (IShellView**)&punk); - ok(hr == S_OK, "got (0x%08x)\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); - - IShellBrowser_Release(psb); - IExplorerBrowser_Destroy(peb); - ref = IExplorerBrowser_Release(peb); - ok(ref == 0, "Got %d\n", ref); -} - -static void test_initialization(void) -{ - IExplorerBrowser *peb; - IShellBrowser *psb; - HRESULT hr; - ULONG lres; - RECT rc; - - ebrowser_instantiate(&peb); - - if(0) - { - /* Crashes on Windows 7 */ - IExplorerBrowser_Initialize(peb, NULL, NULL, NULL); - IExplorerBrowser_Initialize(peb, hwnd, NULL, NULL); - } - - ZeroMemory(&rc, sizeof(RECT)); - - hr = IExplorerBrowser_Initialize(peb, NULL, &rc, NULL); - ok(hr == E_INVALIDARG, "got (0x%08x)\n", hr); - - hr = IExplorerBrowser_Initialize(peb, hwnd, &rc, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - /* Initialize twice */ - hr = IExplorerBrowser_Initialize(peb, hwnd, &rc, NULL); - ok(hr == E_UNEXPECTED, "got (0x%08x)\n", hr); - - hr = IExplorerBrowser_Destroy(peb); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - /* Initialize again */ - hr = IExplorerBrowser_Initialize(peb, hwnd, &rc, NULL); - ok(hr == E_UNEXPECTED, "got (0x%08x)\n", hr); - - /* Destroy again */ - hr = IExplorerBrowser_Destroy(peb); - ok(hr == S_OK, "got (0x%08x)\n", hr); - lres = IExplorerBrowser_Release(peb); - ok(lres == 0, "Got %d\n", lres); - - /* Initialize with a few different rectangles */ - peb = NULL; - ebrowser_instantiate(&peb); - rc.left = 50; rc.top = 20; rc.right = 100; rc.bottom = 80; - hr = IExplorerBrowser_Initialize(peb, hwnd, &rc, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); - hr = IExplorerBrowser_QueryInterface(peb, &IID_IShellBrowser, (void**)&psb); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - HWND eb_hwnd; - RECT eb_rc; - char buf[1024]; - LONG style, expected_style; - static const RECT exp_rc = {0, 0, 48, 58}; - - hr = IShellBrowser_GetWindow(psb, &eb_hwnd); - ok(hr == S_OK, "Got 0x%08x\n", hr); - - GetClientRect(eb_hwnd, &eb_rc); - ok(EqualRect(&eb_rc, &exp_rc), "Got client rect (%d, %d)-(%d, %d)\n", - eb_rc.left, eb_rc.top, eb_rc.right, eb_rc.bottom); - - GetWindowRect(eb_hwnd, &eb_rc); - ok(eb_rc.right - eb_rc.left == 50, "Got window width %d\n", eb_rc.right - eb_rc.left); - ok(eb_rc.bottom - eb_rc.top == 60, "Got window height %d\n", eb_rc.bottom - eb_rc.top); - - buf[0] = '\0'; - GetClassNameA(eb_hwnd, buf, 1024); - ok(!lstrcmpA(buf, "ExplorerBrowserControl"), "Unexpected classname %s\n", buf); - - expected_style = WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_BORDER; - style = GetWindowLongPtrW(eb_hwnd, GWL_STYLE); - todo_wine ok(style == expected_style, "Got style 0x%08x, expected 0x%08x\n", style, expected_style); - - expected_style = WS_EX_CONTROLPARENT; - style = GetWindowLongPtrW(eb_hwnd, GWL_EXSTYLE); - ok(style == expected_style, "Got exstyle 0x%08x, expected 0x%08x\n", style, expected_style); - - ok(GetParent(eb_hwnd) == hwnd, "GetParent returns %p\n", GetParent(eb_hwnd)); - - /* ::Destroy() destroys the window. */ - ok(IsWindow(eb_hwnd), "eb_hwnd invalid.\n"); - IExplorerBrowser_Destroy(peb); - ok(!IsWindow(eb_hwnd), "eb_hwnd valid.\n"); - - IShellBrowser_Release(psb); - lres = IExplorerBrowser_Release(peb); - ok(lres == 0, "Got refcount %d\n", lres); - } - else - { - skip("Skipping some tests.\n"); - - IExplorerBrowser_Destroy(peb); - lres = IExplorerBrowser_Release(peb); - ok(lres == 0, "Got refcount %d\n", lres); - } - - ebrowser_instantiate(&peb); - rc.left = 0; rc.top = 0; rc.right = 0; rc.bottom = 0; - hr = IExplorerBrowser_Initialize(peb, hwnd, &rc, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); - IExplorerBrowser_Destroy(peb); - lres = IExplorerBrowser_Release(peb); - ok(lres == 0, "Got refcount %d\n", lres); - - ebrowser_instantiate(&peb); - rc.left = -1; rc.top = -1; rc.right = 1; rc.bottom = 1; - hr = IExplorerBrowser_Initialize(peb, hwnd, &rc, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); - IExplorerBrowser_Destroy(peb); - lres = IExplorerBrowser_Release(peb); - ok(lres == 0, "Got refcount %d\n", lres); - - ebrowser_instantiate(&peb); - rc.left = 10; rc.top = 10; rc.right = 5; rc.bottom = 5; - hr = IExplorerBrowser_Initialize(peb, hwnd, &rc, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); - IExplorerBrowser_Destroy(peb); - lres = IExplorerBrowser_Release(peb); - ok(lres == 0, "Got refcount %d\n", lres); - - ebrowser_instantiate(&peb); - rc.left = 10; rc.top = 10; rc.right = 5; rc.bottom = 5; - hr = IExplorerBrowser_Initialize(peb, hwnd, &rc, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); - IExplorerBrowser_Destroy(peb); - lres = IExplorerBrowser_Release(peb); - ok(lres == 0, "Got refcount %d\n", lres); -} - -static void test_SetSite(void) -{ - IExplorerBrowser *peb; - IServiceProviderImpl *spimpl = create_serviceprovider(); - ICommDlgBrowser3Impl *cdbimpl = create_commdlgbrowser3(); - IExplorerPaneVisibilityImpl *epvimpl = create_explorerpanevisibility(); - IObjectWithSite *pow; - HRESULT hr; - LONG ref; - UINT i; - struct services expected[] = { - /* Win 7 */ - { &SID_STopLevelBrowser, &IID_ICommDlgBrowser2, 0, cdbimpl }, - { &SID_STopLevelBrowser, &IID_IShellBrowserService, 0, NULL }, - { &SID_STopLevelBrowser, &IID_IShellBrowser, 0, NULL }, - { &SID_STopLevelBrowser, &IID_UnknownInterface8, 0, NULL }, - { &SID_STopLevelBrowser, &IID_IConnectionPointContainer, 0, NULL }, - { &SID_STopLevelBrowser, &IID_IProfferService, 0, NULL }, - { &SID_STopLevelBrowser, &IID_UnknownInterface9, 0, NULL }, - { &SID_ExplorerPaneVisibility, &IID_IExplorerPaneVisibility, 0, epvimpl }, - { &SID_SExplorerBrowserFrame, &IID_ICommDlgBrowser2, 0, cdbimpl }, - { &SID_SExplorerBrowserFrame, &IID_ICommDlgBrowser3, 0, cdbimpl }, - { &IID_IFileDialogPrivate, &IID_IFileDialogPrivate, 0, NULL }, - { &IID_IFileDialogPrivate, &IID_IFileDialog, 0, NULL }, - { &IID_IShellTaskScheduler, &IID_IShellTaskScheduler, 0, NULL }, - { &IID_IShellTaskScheduler, &IID_UnknownInterface2, 0, NULL }, - { &IID_IWebbrowserApp, &IID_IConnectionPointContainer, 0, NULL }, - { &IID_IFolderView, &IID_IFolderView, 0, NULL }, - { &IID_ILayoutModifier, &IID_ILayoutModifier, 0, NULL }, - { &IID_IBrowserSettings, &IID_IBrowserSettings, 0, NULL }, - { &CLSID_Desktop, &IID_IUnknown, 0, NULL }, - { &IID_UnknownInterface1, &IID_UnknownInterface1, 0, NULL }, - { &IID_UnknownInterface3, &IID_UnknownInterface3, 0, NULL }, - { &IID_UnknownInterface4, &IID_IUnknown, 0, NULL }, - { &IID_UnknownInterface6, &IID_UnknownInterface7, 0, NULL }, - { &IID_IBrowserWithActivationNotification, &IID_IBrowserWithActivationNotification, 0, NULL }, - - /* Other services requested in Vista, Windows 2008 but not in Windows 7 */ - { &IID_IBrowserSettings_Vista, &IID_IBrowserSettings_Vista, 0, NULL }, - { &IID_IFolderTypeModifier, &IID_IFolderTypeModifier, 0, NULL }, - { &SID_STopLevelBrowser, &IID_IShellBrowserService_Vista, 0, NULL }, - { &IID_UnknownInterface5, &IID_UnknownInterface5, 0, NULL }, - { &IID_ICommDlgBrowser, &IID_ICommDlgBrowser, 0, cdbimpl }, - { &IID_IFileDialogPrivate_Vista,&IID_IFileDialogPrivate_Vista, 0, NULL}, - { &IID_IFileDialogPrivate_Vista,&IID_IFileDialog, 0, NULL}, - { &IID_UnknownInterface10, &IID_IHTMLDocument2, 0, NULL}, - { &SID_SMenuBandParent, &IID_IOleCommandTarget, 0, NULL}, - { &SID_SMenuBandParent, &IID_IShellMenu, 0, NULL}, - { &SID_STopLevelBrowser, &IID_IOleWindow, 0, NULL}, - { &SID_SMenuPopup, &IID_IOleCommandTarget, 0, NULL}, - { NULL } - }; - - ebrowser_instantiate(&peb); - IExplorerBrowser_SetOptions(peb, EBO_SHOWFRAMES); - - hr = IExplorerBrowser_QueryInterface(peb, &IID_IObjectWithSite, (void**)&pow); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - spimpl->interfaces = expected; - - hr = IObjectWithSite_SetSite(pow, (IUnknown*)&spimpl->IServiceProvider_iface); - ok(hr == S_OK, "Got 0x%08x\n", hr); - - if(FAILED(hr)) - IObjectWithSite_Release(pow); - } - - if(FAILED(hr)) - { - skip("Failed to set site.\n"); - - IServiceProvider_Release(&spimpl->IServiceProvider_iface); - ICommDlgBrowser3_Release(&cdbimpl->ICommDlgBrowser3_iface); - IExplorerPaneVisibility_Release(&epvimpl->IExplorerPaneVisibility_iface); - IExplorerBrowser_Destroy(peb); - ref = IExplorerBrowser_Release(peb); - ok(ref == 0, "Got ref %d\n", ref); - - return; - } - - ShowWindow(hwnd, TRUE); - ebrowser_initialize(peb); - ebrowser_browse_to_desktop(peb); - - for(i = 0; i < 10; i++) - { - Sleep(100); - process_msgs(); - } - ShowWindow(hwnd, FALSE); - - /* ICommDlgBrowser3 */ - ok(!cdbimpl->OnDefaultCommand, "Got %d\n", cdbimpl->OnDefaultCommand); - todo_wine ok(cdbimpl->OnStateChange, "Got %d\n", cdbimpl->OnStateChange); - ok(cdbimpl->IncludeObject, "Got %d\n", cdbimpl->IncludeObject); - ok(!cdbimpl->Notify, "Got %d\n", cdbimpl->Notify); - ok(!cdbimpl->GetDefaultMenuText, "Got %d\n", cdbimpl->GetDefaultMenuText); - todo_wine ok(cdbimpl->GetViewFlags, "Got %d\n", cdbimpl->GetViewFlags); - ok(!cdbimpl->OnColumnClicked, "Got %d\n", cdbimpl->OnColumnClicked); - ok(!cdbimpl->GetCurrentFilter, "Got %d\n", cdbimpl->GetCurrentFilter); - todo_wine ok(cdbimpl->OnPreviewCreated, "Got %d\n", cdbimpl->OnPreviewCreated); - - /* IExplorerPaneVisibility */ - ok(epvimpl->np, "Got %d\n", epvimpl->np); - todo_wine ok(epvimpl->cp, "Got %d\n", epvimpl->cp); - todo_wine ok(epvimpl->cp_o, "Got %d\n", epvimpl->cp_o); - todo_wine ok(epvimpl->cp_v, "Got %d\n", epvimpl->cp_v); - todo_wine ok(epvimpl->dp, "Got %d\n", epvimpl->dp); - todo_wine ok(epvimpl->pp, "Got %d\n", epvimpl->pp); - ok(!epvimpl->qp, "Got %d\n", epvimpl->qp); - ok(!epvimpl->aqp, "Got %d\n", epvimpl->aqp); - ok(!epvimpl->unk, "Got %d\n", epvimpl->unk); - - if(0) - { - for(i = 0; expected[i].service != NULL; i++) - if(!expected[i].count) trace("count %d was 0.\n", i); - } - - /* Test when IServiceProvider is released. */ - IServiceProvider_AddRef(&spimpl->IServiceProvider_iface); - ref = IServiceProvider_Release(&spimpl->IServiceProvider_iface); - ok(ref == 2, "Got ref %d\n", ref); - - hr = IObjectWithSite_SetSite(pow, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); - - IServiceProvider_AddRef(&spimpl->IServiceProvider_iface); - ref = IServiceProvider_Release(&spimpl->IServiceProvider_iface); - ok(ref == 1, "Got ref %d\n", ref); - - hr = IObjectWithSite_SetSite(pow, (IUnknown*)&spimpl->IServiceProvider_iface); - ok(hr == S_OK, "Got 0x%08x\n", hr); - - IServiceProvider_AddRef(&spimpl->IServiceProvider_iface); - ref = IServiceProvider_Release(&spimpl->IServiceProvider_iface); - ok(ref == 2, "Got ref %d\n", ref); - - IExplorerBrowser_Destroy(peb); - - IServiceProvider_AddRef(&spimpl->IServiceProvider_iface); - ref = IServiceProvider_Release(&spimpl->IServiceProvider_iface); - ok(ref == 2, "Got ref %d\n", ref); - - IObjectWithSite_Release(pow); - ref = IExplorerBrowser_Release(peb); - ok(ref == 0, "Got ref %d\n", ref); - - ref = IServiceProvider_Release(&spimpl->IServiceProvider_iface); - ok(ref == 0, "Got ref %d\n", ref); - - ref = ICommDlgBrowser3_Release(&cdbimpl->ICommDlgBrowser3_iface); - ok(ref == 0, "Got ref %d\n", ref); - ref = IExplorerPaneVisibility_Release(&epvimpl->IExplorerPaneVisibility_iface); - ok(ref == 0, "Got ref %d\n", ref); -} - -static void test_basics(void) -{ - IExplorerBrowser *peb; - IShellBrowser *psb; - FOLDERSETTINGS fs; - ULONG lres; - DWORD flags; - HDWP hdwp; - RECT rc; - HRESULT hr; - static const WCHAR winetest[] = {'W','i','n','e','T','e','s','t',0}; - - ebrowser_instantiate(&peb); - ebrowser_initialize(peb); - - /* SetRect */ - rc.left = 0; rc.top = 0; rc.right = 0; rc.bottom = 0; - hr = IExplorerBrowser_SetRect(peb, NULL, rc); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - rc.left = 100; rc.top = 100; rc.right = 10; rc.bottom = 10; - hr = IExplorerBrowser_SetRect(peb, NULL, rc); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - /* SetRect with DeferWindowPos */ - rc.left = rc.top = 0; rc.right = rc.bottom = 10; - hdwp = BeginDeferWindowPos(1); - hr = IExplorerBrowser_SetRect(peb, &hdwp, rc); - ok(hr == S_OK, "got (0x%08x)\n", hr); - lres = EndDeferWindowPos(hdwp); - ok(lres, "EndDeferWindowPos failed.\n"); - - hdwp = NULL; - hr = IExplorerBrowser_SetRect(peb, &hdwp, rc); - ok(hr == S_OK, "got (0x%08x)\n", hr); - ok(hdwp == NULL, "got %p\n", hdwp); - lres = EndDeferWindowPos(hdwp); - ok(!lres, "EndDeferWindowPos succeeded unexpectedly.\n"); - - /* Test positioning */ - rc.left = 10; rc.top = 20; rc.right = 50; rc.bottom = 50; - hr = IExplorerBrowser_SetRect(peb, NULL, rc); - ok(hr == S_OK, "got (0x%08x)\n", hr); - hr = IExplorerBrowser_QueryInterface(peb, &IID_IShellBrowser, (void**)&psb); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - HWND eb_hwnd; - RECT eb_rc; - static const RECT exp_rc = {11, 21, 49, 49}; - static const RECT exp_rc2 = {11, 21, 49, 24}; - - hr = IShellBrowser_GetWindow(psb, &eb_hwnd); - ok(hr == S_OK, "Got 0x%08x\n", hr); - - GetClientRect(eb_hwnd, &eb_rc); - MapWindowPoints(eb_hwnd, hwnd, (POINT*)&eb_rc, 2); - ok(EqualRect(&eb_rc, &exp_rc), "Got rect (%d, %d) - (%d, %d)\n", - eb_rc.left, eb_rc.top, eb_rc.right, eb_rc.bottom); - - /* Try resizing with invalid hdwp */ - rc.bottom = 25; - hdwp = (HDWP)0xdeadbeef; - hr = IExplorerBrowser_SetRect(peb, &hdwp, rc); - ok(hr == E_FAIL, "Got 0x%08x\n", hr); - GetClientRect(eb_hwnd, &eb_rc); - MapWindowPoints(eb_hwnd, hwnd, (POINT*)&eb_rc, 2); - ok(EqualRect(&eb_rc, &exp_rc), "Got rect (%d, %d) - (%d, %d)\n", - eb_rc.left, eb_rc.top, eb_rc.right, eb_rc.bottom); - - hdwp = NULL; - hr = IExplorerBrowser_SetRect(peb, &hdwp, rc); - ok(hr == S_OK, "Got 0x%08x\n", hr); - GetClientRect(eb_hwnd, &eb_rc); - MapWindowPoints(eb_hwnd, hwnd, (POINT*)&eb_rc, 2); - ok(EqualRect(&eb_rc, &exp_rc2), "Got rect (%d, %d) - (%d, %d)\n", - eb_rc.left, eb_rc.top, eb_rc.right, eb_rc.bottom); - - IShellBrowser_Release(psb); - } - - IExplorerBrowser_Destroy(peb); - IExplorerBrowser_Release(peb); - - /* GetOptions/SetOptions*/ - ebrowser_instantiate(&peb); - - if(0) { - /* Crashes on Windows 7 */ - IExplorerBrowser_GetOptions(peb, NULL); - } - - hr = IExplorerBrowser_GetOptions(peb, &flags); - ok(hr == S_OK, "got (0x%08x)\n", hr); - ok(flags == 0, "got (0x%08x)\n", flags); - - /* Settings preserved through Initialize. */ - hr = IExplorerBrowser_SetOptions(peb, 0xDEADBEEF); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - ebrowser_initialize(peb); - - hr = IExplorerBrowser_GetOptions(peb, &flags); - ok(flags == 0xDEADBEEF, "got (0x%08x)\n", flags); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - IExplorerBrowser_Destroy(peb); - IExplorerBrowser_Release(peb); - - ebrowser_instantiate(&peb); - ebrowser_initialize(peb); - - /* SetFolderSettings */ - hr = IExplorerBrowser_SetFolderSettings(peb, NULL); - ok(hr == E_INVALIDARG, "got (0x%08x)\n", hr); - fs.ViewMode = 0; fs.fFlags = 0; - hr = IExplorerBrowser_SetFolderSettings(peb, &fs); - todo_wine ok(hr == E_INVALIDARG, "got (0x%08x)\n", hr); - - /* SetPropertyBag */ - hr = IExplorerBrowser_SetPropertyBag(peb, NULL); - ok(hr == E_INVALIDARG, "Got 0x%08x\n", hr); - hr = IExplorerBrowser_SetPropertyBag(peb, winetest); - ok(hr == S_OK, "Got 0x%08x\n", hr); - - /* TODO: Test after browsing somewhere. */ - - IExplorerBrowser_Destroy(peb); - lres = IExplorerBrowser_Release(peb); - ok(lres == 0, "Got %d\n", lres); -} - -static void test_Advise(void) -{ - IExplorerBrowser *peb; - IExplorerBrowserEvents *pebe; - DWORD cookies[10]; - HRESULT hr; - UINT i, ref; - - /* Set up our IExplorerBrowserEvents implementation */ - ebev.IExplorerBrowserEvents_iface.lpVtbl = &ebevents; - pebe = &ebev.IExplorerBrowserEvents_iface; - - ebrowser_instantiate(&peb); - - if(0) - { - /* Crashes on Windows 7 */ - IExplorerBrowser_Advise(peb, pebe, NULL); - IExplorerBrowser_Advise(peb, NULL, &cookies[0]); - } - - /* Using Unadvise with a cookie that has yet to be given out - * results in E_INVALIDARG */ - hr = IExplorerBrowser_Unadvise(peb, 11); - ok(hr == E_INVALIDARG, "got (0x%08x)\n", hr); - - /* Add some before initialization */ - for(i = 0; i < 5; i++) - { - hr = IExplorerBrowser_Advise(peb, pebe, &cookies[i]); - ok(hr == S_OK, "got (0x%08x)\n", hr); - } - - ebrowser_initialize(peb); - - /* Add some after initialization */ - for(i = 5; i < 10; i++) - { - hr = IExplorerBrowser_Advise(peb, pebe, &cookies[i]); - ok(hr == S_OK, "got (0x%08x)\n", hr); - } - - ok(ebev.ref == 10, "Got %d\n", ebev.ref); - - ebev.completed = 0; - ebrowser_browse_to_desktop(peb); - process_msgs(); - ok(ebev.completed == 10, "Got %d\n", ebev.completed); - - /* Remove a bunch somewhere in the middle */ - for(i = 4; i < 8; i++) - { - hr = IExplorerBrowser_Unadvise(peb, cookies[i]); - ok(hr == S_OK, "got (0x%08x)\n", hr); - } - - ebev.completed = 0; - ebrowser_browse_to_desktop(peb); - process_msgs(); - ok(ebev.completed == 6, "Got %d\n", ebev.completed); - - if(0) - { - /* Using unadvise with a previously unadvised cookie results - * in a crash. */ - IExplorerBrowser_Unadvise(peb, cookies[5]); - } - - /* Remove the rest. */ - for(i = 0; i < 10; i++) - { - if(i<4||i>7) - { - hr = IExplorerBrowser_Unadvise(peb, cookies[i]); - ok(hr == S_OK, "%d: got (0x%08x)\n", i, hr); - } - } - - ok(ebev.ref == 0, "Got %d\n", ebev.ref); - - ebev.completed = 0; - ebrowser_browse_to_desktop(peb); - process_msgs(); - ok(ebev.completed == 0, "Got %d\n", ebev.completed); - - /* ::Destroy implies ::Unadvise. */ - hr = IExplorerBrowser_Advise(peb, pebe, &cookies[0]); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(ebev.ref == 1, "Got %d\n", ebev.ref); - - hr = IExplorerBrowser_Destroy(peb); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(ebev.ref == 0, "Got %d\n", ebev.ref); - - ref = IExplorerBrowser_Release(peb); - ok(!ref, "Got %d\n", ref); -} - -/* Based on PathAddBackslashW from dlls/shlwapi/path.c */ -static LPWSTR myPathAddBackslashW( LPWSTR lpszPath ) -{ - size_t iLen; - - if (!lpszPath || (iLen = lstrlenW(lpszPath)) >= MAX_PATH) - return NULL; - - if (iLen) - { - lpszPath += iLen; - if (lpszPath[-1] != '\\') - { - *lpszPath++ = '\\'; - *lpszPath = '\0'; - } - } - return lpszPath; -} - -static void test_browse_pidl_(IExplorerBrowser *peb, IExplorerBrowserEventsImpl *ebev, - LPITEMIDLIST pidl, UINT uFlags, - HRESULT hr_exp, UINT pending, UINT created, UINT failed, UINT completed, - const char *file, int line) -{ - HRESULT hr; - ebev->completed = ebev->created = ebev->pending = ebev->failed = 0; - - hr = IExplorerBrowser_BrowseToIDList(peb, pidl, uFlags); - ok_(file, line) (hr == hr_exp, "BrowseToIDList returned 0x%08x\n", hr); - process_msgs(); - - ok_(file, line) - (ebev->pending == pending && ebev->created == created && - ebev->failed == failed && ebev->completed == completed, - "Events occurred: %d, %d, %d, %d\n", - ebev->pending, ebev->created, ebev->failed, ebev->completed); -} -#define test_browse_pidl(peb, ebev, pidl, uFlags, hr, p, cr, f, co) \ - test_browse_pidl_(peb, ebev, pidl, uFlags, hr, p, cr, f, co, __FILE__, __LINE__) - -static void test_browse_pidl_sb_(IExplorerBrowser *peb, IExplorerBrowserEventsImpl *ebev, - LPITEMIDLIST pidl, UINT uFlags, - HRESULT hr_exp, UINT pending, UINT created, UINT failed, UINT completed, - const char *file, int line) -{ - IShellBrowser *psb; - HRESULT hr; - - hr = IExplorerBrowser_QueryInterface(peb, &IID_IShellBrowser, (void**)&psb); - ok_(file, line) (hr == S_OK, "QueryInterface returned 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - ebev->completed = ebev->created = ebev->pending = ebev->failed = 0; - - hr = IShellBrowser_BrowseObject(psb, pidl, uFlags); - ok_(file, line) (hr == hr_exp, "BrowseObject returned 0x%08x\n", hr); - process_msgs(); - - ok_(file, line) - (ebev->pending == pending && ebev->created == created && - ebev->failed == failed && ebev->completed == completed, - "Events occurred: %d, %d, %d, %d\n", - ebev->pending, ebev->created, ebev->failed, ebev->completed); - - IShellBrowser_Release(psb); - } -} -#define test_browse_pidl_sb(peb, ebev, pidl, uFlags, hr, p, cr, f, co) \ - test_browse_pidl_sb_(peb, ebev, pidl, uFlags, hr, p, cr, f, co, __FILE__, __LINE__) - -static void test_navigation(void) -{ - IExplorerBrowser *peb, *peb2; - IFolderView *pfv; - IShellItem *psi; - IShellFolder *psf; - LPITEMIDLIST pidl_current, pidl_child; - DWORD cookie, cookie2; - HRESULT hr; - LONG lres; - WCHAR current_path[MAX_PATH]; - WCHAR child_path[MAX_PATH]; - static const WCHAR testfolderW[] = - {'w','i','n','e','t','e','s','t','f','o','l','d','e','r','\0'}; - - ok(pSHParseDisplayName != NULL, "pSHParseDisplayName unexpectedly missing.\n"); - ok(pSHCreateShellItem != NULL, "pSHCreateShellItem unexpectedly missing.\n"); - - GetCurrentDirectoryW(MAX_PATH, current_path); - if(!lstrlenW(current_path)) - { - skip("Failed to create test-directory.\n"); - return; - } - - lstrcpyW(child_path, current_path); - myPathAddBackslashW(child_path); - lstrcatW(child_path, testfolderW); - - CreateDirectoryW(child_path, NULL); - - pSHParseDisplayName(current_path, NULL, &pidl_current, 0, NULL); - pSHParseDisplayName(child_path, NULL, &pidl_child, 0, NULL); - - ebrowser_instantiate(&peb); - ebrowser_initialize(peb); - - ebrowser_instantiate(&peb2); - ebrowser_initialize(peb2); - - /* Set up our IExplorerBrowserEvents implementation */ - ebev.IExplorerBrowserEvents_iface.lpVtbl = &ebevents; - - IExplorerBrowser_Advise(peb, &ebev.IExplorerBrowserEvents_iface, &cookie); - IExplorerBrowser_Advise(peb2, &ebev.IExplorerBrowserEvents_iface, &cookie2); - - /* These should all fail */ - test_browse_pidl(peb, &ebev, 0, SBSP_ABSOLUTE | SBSP_RELATIVE, E_FAIL, 0, 0, 0, 0); - test_browse_pidl_sb(peb2, &ebev, 0, SBSP_ABSOLUTE | SBSP_RELATIVE, E_FAIL, 0, 0, 0, 0); - test_browse_pidl(peb, &ebev, 0, SBSP_ABSOLUTE, E_INVALIDARG, 0, 0, 0, 0); - test_browse_pidl_sb(peb2, &ebev, 0, SBSP_ABSOLUTE, E_INVALIDARG, 0, 0, 0, 0); - test_browse_pidl(peb, &ebev, 0, SBSP_RELATIVE, E_FAIL, 0, 0, 0, 0); - test_browse_pidl_sb(peb2, &ebev, 0, SBSP_RELATIVE, E_FAIL, 0, 0, 0, 0); - test_browse_pidl(peb, &ebev, 0, SBSP_PARENT, E_FAIL, 0, 0, 0, 0); - test_browse_pidl_sb(peb2, &ebev, 0, SBSP_PARENT, E_FAIL, 0, 0, 0, 0); - test_browse_pidl(peb, &ebev, 0, SBSP_NAVIGATEFORWARD, E_FAIL, 0, 0, 0, 0); - test_browse_pidl_sb(peb2, &ebev, 0, SBSP_NAVIGATEFORWARD, E_FAIL, 0, 0, 0, 0); - test_browse_pidl(peb, &ebev, 0, SBSP_NAVIGATEBACK, E_FAIL, 0, 0, 0, 0); - test_browse_pidl_sb(peb2, &ebev, 0, SBSP_NAVIGATEBACK, E_FAIL, 0, 0, 0, 0); - - /* "The first browse is synchronous" */ - test_browse_pidl(peb, &ebev, pidl_child, SBSP_ABSOLUTE, S_OK, 1, 1, 0, 1); - test_browse_pidl_sb(peb2, &ebev, pidl_child, SBSP_ABSOLUTE, S_OK, 1, 1, 0, 1); - - /* Navigate empty history */ - test_browse_pidl(peb, &ebev, 0, SBSP_NAVIGATEFORWARD, S_OK, 0, 0, 0, 0); - test_browse_pidl_sb(peb2, &ebev, 0, SBSP_NAVIGATEFORWARD, S_OK, 0, 0, 0, 0); - test_browse_pidl(peb, &ebev, 0, SBSP_NAVIGATEBACK, S_OK, 0, 0, 0, 0); - test_browse_pidl_sb(peb2, &ebev, 0, SBSP_NAVIGATEBACK, S_OK, 0, 0, 0, 0); - - /* Navigate history */ - test_browse_pidl(peb, &ebev, 0, SBSP_PARENT, S_OK, 1, 1, 0, 1); - test_browse_pidl_sb(peb2, &ebev, 0, SBSP_PARENT, S_OK, 1, 1, 0, 1); - test_browse_pidl(peb, &ebev, 0, SBSP_NAVIGATEBACK, S_OK, 1, 1, 0, 1); - test_browse_pidl_sb(peb2, &ebev, 0, SBSP_NAVIGATEBACK, S_OK, 1, 1, 0, 1); - test_browse_pidl(peb, &ebev, 0, SBSP_NAVIGATEFORWARD, S_OK, 1, 1, 0, 1); - test_browse_pidl_sb(peb2, &ebev, 0, SBSP_NAVIGATEFORWARD, S_OK, 1, 1, 0, 1); - test_browse_pidl(peb, &ebev, 0, SBSP_ABSOLUTE, S_OK, 0, 0, 0, 0); - test_browse_pidl_sb(peb2, &ebev, 0, SBSP_ABSOLUTE, S_OK, 0, 0, 0, 0); - - /* Relative navigation */ - test_browse_pidl(peb, &ebev, pidl_current, SBSP_ABSOLUTE, S_OK, 1, 0, 0, 1); - test_browse_pidl_sb(peb2, &ebev, pidl_current, SBSP_ABSOLUTE, S_OK, 1, 0, 0, 1); - - hr = IExplorerBrowser_GetCurrentView(peb, &IID_IFolderView, (void**)&pfv); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - LPITEMIDLIST pidl_relative; - - hr = IFolderView_GetFolder(pfv, &IID_IShellFolder, (void**)&psf); - ok(hr == S_OK, "Got 0x%08x\n", hr); - hr = IShellFolder_ParseDisplayName(psf, NULL, NULL, (LPWSTR)testfolderW, - NULL, &pidl_relative, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); - - /* Browsing to another location here before using the - * pidl_relative would make ExplorerBrowser in Windows 7 show a - * not-available dialog. Also, passing a relative pidl without - * specifying SBSP_RELATIVE makes it look for the pidl on the - * desktop - */ - - test_browse_pidl(peb, &ebev, pidl_relative, SBSP_RELATIVE, S_OK, 1, 1, 0, 1); - test_browse_pidl_sb(peb2, &ebev, pidl_relative, SBSP_RELATIVE, S_OK, 1, 1, 0, 1); - - ILFree(pidl_relative); - /* IShellFolder_Release(psf); */ - IFolderView_Release(pfv); - } - - /* misc **/ - test_browse_pidl(peb, &ebev, NULL, SBSP_ABSOLUTE, S_OK, 0, 0, 0, 0); - test_browse_pidl_sb(peb2, &ebev, NULL, SBSP_ABSOLUTE, S_OK, 0, 0, 0, 0); - test_browse_pidl(peb, &ebev, NULL, SBSP_DEFBROWSER, S_OK, 0, 0, 0, 0); - test_browse_pidl_sb(peb2, &ebev, NULL, SBSP_DEFBROWSER, S_OK, 0, 0, 0, 0); - test_browse_pidl(peb, &ebev, pidl_current, SBSP_SAMEBROWSER, S_OK, 1, 1, 0, 1); - test_browse_pidl_sb(peb2, &ebev, pidl_current, SBSP_SAMEBROWSER, S_OK, 1, 1, 0, 1); - test_browse_pidl(peb, &ebev, pidl_current, SBSP_SAMEBROWSER, S_OK, 1, 0, 0, 1); - test_browse_pidl_sb(peb2, &ebev, pidl_current, SBSP_SAMEBROWSER, S_OK, 1, 0, 0, 1); - - test_browse_pidl(peb, &ebev, pidl_current, SBSP_EXPLOREMODE, E_INVALIDARG, 0, 0, 0, 0); - test_browse_pidl_sb(peb2, &ebev, pidl_current, SBSP_EXPLOREMODE, E_INVALIDARG, 0, 0, 0, 0); - test_browse_pidl(peb, &ebev, pidl_current, SBSP_OPENMODE, S_OK, 1, 0, 0, 1); - test_browse_pidl_sb(peb2, &ebev, pidl_current, SBSP_OPENMODE, S_OK, 1, 0, 0, 1); - - /* SBSP_NEWBROWSER will return E_INVALIDARG, claims MSDN, but in - * reality it works as one would expect (Windows 7 only?). - */ - if(0) - { - IExplorerBrowser_BrowseToIDList(peb, NULL, SBSP_NEWBROWSER); - } - - hr = IExplorerBrowser_Unadvise(peb, cookie); - ok(hr == S_OK, "Got 0x%08x\n", hr); - IExplorerBrowser_Destroy(peb); - process_msgs(); - hr = IExplorerBrowser_Unadvise(peb2, cookie2); - ok(hr == S_OK, "Got 0x%08x\n", hr); - IExplorerBrowser_Destroy(peb2); - process_msgs(); - - /* Attempt browsing after destroyed */ - test_browse_pidl(peb, &ebev, pidl_child, SBSP_ABSOLUTE, HRESULT_FROM_WIN32(ERROR_BUSY), 0, 0, 0, 0); - test_browse_pidl_sb(peb2, &ebev, pidl_child, SBSP_ABSOLUTE, HRESULT_FROM_WIN32(ERROR_BUSY), 0, 0, 0, 0); - - lres = IExplorerBrowser_Release(peb); - ok(lres == 0, "Got lres %d\n", lres); - lres = IExplorerBrowser_Release(peb2); - ok(lres == 0, "Got lres %d\n", lres); - - /******************************************/ - /* Test some options that affect browsing */ - - ebrowser_instantiate(&peb); - hr = IExplorerBrowser_Advise(peb, &ebev.IExplorerBrowserEvents_iface, &cookie); - ok(hr == S_OK, "Got 0x%08x\n", hr); - hr = IExplorerBrowser_SetOptions(peb, EBO_NAVIGATEONCE); - ok(hr == S_OK, "got (0x%08x)\n", hr); - ebrowser_initialize(peb); - - test_browse_pidl(peb, &ebev, pidl_current, 0, S_OK, 1, 1, 0, 1); - test_browse_pidl(peb, &ebev, pidl_current, 0, E_FAIL, 0, 0, 0, 0); - - hr = IExplorerBrowser_SetOptions(peb, 0); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - test_browse_pidl(peb, &ebev, pidl_current, 0, S_OK, 1, 0, 0, 1); - test_browse_pidl(peb, &ebev, pidl_current, 0, S_OK, 1, 0, 0, 1); - - /* Difference in behavior lies where? */ - hr = IExplorerBrowser_SetOptions(peb, EBO_ALWAYSNAVIGATE); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - test_browse_pidl(peb, &ebev, pidl_current, 0, S_OK, 1, 0, 0, 1); - test_browse_pidl(peb, &ebev, pidl_current, 0, S_OK, 1, 0, 0, 1); - - hr = IExplorerBrowser_Unadvise(peb, cookie); - ok(hr == S_OK, "Got 0x%08x\n", hr); - - IExplorerBrowser_Destroy(peb); - lres = IExplorerBrowser_Release(peb); - ok(lres == 0, "Got lres %d\n", lres); - - /* BrowseToObject tests */ - ebrowser_instantiate(&peb); - ebrowser_initialize(peb); - - /* Browse to the desktop by passing an IShellFolder */ - hr = SHGetDesktopFolder(&psf); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - hr = IExplorerBrowser_BrowseToObject(peb, (IUnknown*)psf, SBSP_DEFBROWSER); - ok(hr == S_OK, "got (0x%08x)\n", hr); - if(hr == S_OK) process_msgs(); - - IShellFolder_Release(psf); - } - - /* Browse to the current directory by passing a ShellItem */ - hr = pSHCreateShellItem(NULL, NULL, pidl_current, &psi); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - hr = IExplorerBrowser_BrowseToObject(peb, (IUnknown*)psi, SBSP_DEFBROWSER); - ok(hr == S_OK, "got (0x%08x)\n", hr); - process_msgs(); - - IShellItem_Release(psi); - } - - IExplorerBrowser_Destroy(peb); - lres = IExplorerBrowser_Release(peb); - ok(lres == 0, "Got lres %d\n", lres); - - /* Cleanup */ - RemoveDirectoryW(child_path); - ILFree(pidl_current); - ILFree(pidl_child); -} - -static void test_GetCurrentView(void) -{ - IExplorerBrowser *peb; - IUnknown *punk; - HRESULT hr; - - /* GetCurrentView */ - ebrowser_instantiate(&peb); - - if(0) - { - /* Crashes under Windows 7 */ - IExplorerBrowser_GetCurrentView(peb, NULL, NULL); - } - hr = IExplorerBrowser_GetCurrentView(peb, NULL, (void**)&punk); - ok(hr == E_FAIL, "Got 0x%08x\n", hr); - -#define test_gcv(iid, exp) \ - do { \ - hr = IExplorerBrowser_GetCurrentView(peb, &iid, (void**)&punk); \ - ok(hr == exp, "(%s:)Expected (0x%08x), got: (0x%08x)\n", \ - #iid ,exp, hr); \ - if(SUCCEEDED(hr)) IUnknown_Release(punk); \ - } while(0) - - test_gcv(IID_IUnknown, E_FAIL); - test_gcv(IID_IUnknown, E_FAIL); - test_gcv(IID_IShellView, E_FAIL); - test_gcv(IID_IShellView2, E_FAIL); - test_gcv(IID_IFolderView, E_FAIL); - test_gcv(IID_IPersistFolder, E_FAIL); - test_gcv(IID_IPersistFolder2, E_FAIL); - test_gcv(IID_ICommDlgBrowser, E_FAIL); - test_gcv(IID_ICommDlgBrowser2, E_FAIL); - test_gcv(IID_ICommDlgBrowser3, E_FAIL); - - ebrowser_initialize(peb); - ebrowser_browse_to_desktop(peb); - - test_gcv(IID_IUnknown, S_OK); - test_gcv(IID_IUnknown, S_OK); - test_gcv(IID_IShellView, S_OK); - test_gcv(IID_IShellView2, S_OK); - test_gcv(IID_IFolderView, S_OK); - todo_wine test_gcv(IID_IPersistFolder, S_OK); - test_gcv(IID_IPersistFolder2, E_NOINTERFACE); - test_gcv(IID_ICommDlgBrowser, E_NOINTERFACE); - test_gcv(IID_ICommDlgBrowser2, E_NOINTERFACE); - test_gcv(IID_ICommDlgBrowser3, E_NOINTERFACE); - -#undef test_gcv - - IExplorerBrowser_Destroy(peb); - IExplorerBrowser_Release(peb); -} - -static void test_InputObject(void) -{ - IExplorerBrowser *peb; - IShellFolder *psf; - IInputObject *pio; - HRESULT hr; - RECT rc; - UINT i; - WPARAM supported_key_accels_mode1[] = { - VK_BACK, VK_TAB, VK_RETURN, VK_PRIOR, VK_NEXT, VK_END, VK_HOME, - VK_LEFT, VK_UP, VK_RIGHT, VK_DOWN, VK_DELETE, VK_F1, VK_F2, - VK_F5, VK_F6, VK_F10, 0 }; - WPARAM supported_key_accels_mode2[] = { - VK_RETURN, VK_PRIOR, VK_NEXT, VK_END, VK_HOME, - VK_LEFT, VK_UP, VK_RIGHT, VK_DOWN, VK_DELETE, VK_F1, VK_F2, - VK_F10, 0 }; - WPARAM *key_accels; - MSG msg_a = { - hwnd, - WM_KEYDOWN, - VK_F5, 0, - GetTickCount(), - {5, 2} - }; - - ebrowser_instantiate(&peb); - hr = IExplorerBrowser_QueryInterface(peb, &IID_IInputObject, (void**)&pio); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(FAILED(hr)) - { - win_skip("IInputObject not supported.\n"); - return; - } - - /* Before initializing */ - hr = IInputObject_TranslateAcceleratorIO(pio, &msg_a); - todo_wine ok(hr == E_FAIL, "Got 0x%08x\n", hr); - - hr = IInputObject_HasFocusIO(pio); - todo_wine ok(hr == E_FAIL, "Got 0x%08x\n", hr); - - hr = IInputObject_UIActivateIO(pio, TRUE, &msg_a); - todo_wine ok(hr == S_OK, "Got 0x%08x\n", hr); - - hr = IInputObject_HasFocusIO(pio); - todo_wine ok(hr == E_FAIL, "Got 0x%08x\n", hr); - - hr = IInputObject_TranslateAcceleratorIO(pio, &msg_a); - todo_wine ok(hr == E_FAIL, "Got 0x%08x\n", hr); - - rc.left = 0; rc.top = 0; rc.right = 100; rc.bottom = 100; - hr = IExplorerBrowser_Initialize(peb, hwnd, &rc, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); - - hr = IInputObject_HasFocusIO(pio); - todo_wine ok(hr == E_FAIL, "Got 0x%08x\n", hr); - - hr = IInputObject_TranslateAcceleratorIO(pio, &msg_a); - todo_wine ok(hr == E_FAIL, "Got 0x%08x\n", hr); - - /* Browse to the desktop */ - SHGetDesktopFolder(&psf); - hr = IExplorerBrowser_BrowseToObject(peb, (IUnknown*)psf, SBSP_DEFBROWSER); - ok(hr == S_OK, "Got 0x%08x\n", hr); - IShellFolder_Release(psf); - - hr = IInputObject_UIActivateIO(pio, TRUE, &msg_a); - todo_wine ok(hr == S_OK, "Got 0x%08x\n", hr); - - hr = IInputObject_HasFocusIO(pio); - todo_wine ok(hr == S_OK, "Got 0x%08x\n", hr); - - hr = IInputObject_UIActivateIO(pio, FALSE, &msg_a); - todo_wine ok(hr == S_OK, "Got 0x%08x\n", hr); - - hr = IInputObject_HasFocusIO(pio); - todo_wine ok(hr == S_OK, "Got 0x%08x\n", hr); - - hr = IInputObject_TranslateAcceleratorIO(pio, &msg_a); - if(hr == S_OK) - key_accels = supported_key_accels_mode1; - else - key_accels = supported_key_accels_mode2; - - for(i = 0; i < 0x100; i++) - { - BOOL found = FALSE; - UINT j; - for(j = 0; key_accels[j] != 0; j++) - if(key_accels[j] == i) - { - found = TRUE; - break; - } - - msg_a.wParam = i; - process_msgs(); - hr = IInputObject_TranslateAcceleratorIO(pio, &msg_a); - todo_wine ok(hr == (found ? S_OK : S_FALSE), "Got 0x%08x (%04x)\n", hr, i); - if(i == VK_F5) - Sleep(1000); /* Needed for w2k8 (64bit) */ - } - - process_msgs(); - - IInputObject_Release(pio); - IExplorerBrowser_Destroy(peb); - IExplorerBrowser_Release(peb); -} - -static BOOL test_instantiate_control(void) -{ - IExplorerBrowser *peb; - HRESULT hr; - - hr = ebrowser_instantiate(&peb); - ok(hr == S_OK || hr == REGDB_E_CLASSNOTREG, "Got (0x%08x)\n", hr); - if(FAILED(hr)) - return FALSE; - - IExplorerBrowser_Release(peb); - return TRUE; -} - -static void setup_window(void) -{ - WNDCLASSW wc; - static const WCHAR ebtestW[] = {'e','b','t','e','s','t',0}; - - ZeroMemory(&wc, sizeof(WNDCLASSW)); - wc.lpfnWndProc = DefWindowProcW; - wc.lpszClassName = ebtestW; - RegisterClassW(&wc); - hwnd = CreateWindowExW(0, ebtestW, NULL, 0, - 0, 0, 500, 500, - NULL, 0, 0, NULL); - ok(hwnd != NULL, "Failed to create window for tests.\n"); -} - -START_TEST(ebrowser) -{ - OleInitialize(NULL); - - if(!test_instantiate_control()) - { - win_skip("No ExplorerBrowser control..\n"); - OleUninitialize(); - return; - } - - setup_window(); - init_function_pointers(); - - test_QueryInterface(); - test_SB_misc(); - test_initialization(); - test_basics(); - test_Advise(); - test_navigation(); - test_GetCurrentView(); - test_SetSite(); - test_InputObject(); - - DestroyWindow(hwnd); - OleUninitialize(); -} diff --git a/rostests/winetests/shell32/generated.c b/rostests/winetests/shell32/generated.c deleted file mode 100755 index ace877eb420..00000000000 --- a/rostests/winetests/shell32/generated.c +++ /dev/null @@ -1,3867 +0,0 @@ -/* File generated automatically from tools/winapi/tests.dat; do not edit! */ -/* This file can be copied, modified and distributed without restriction. */ - -/* - * Unit tests for data structure packing - */ - -#define WINVER 0x0501 -#define _WIN32_IE 0x0501 -#define _WIN32_WINNT 0x0501 - -#define WINE_NOWINSOCK - -#include -#include "windef.h" -#include "winbase.h" -#include "wtypes.h" -#include "shellapi.h" -#include "winuser.h" -#include "wingdi.h" -#include "shlobj.h" - -#include "wine/test.h" - -/*********************************************************************** - * Compatibility macros - */ - -#define DWORD_PTR UINT_PTR -#define LONG_PTR INT_PTR -#define ULONG_PTR UINT_PTR - -/*********************************************************************** - * Windows API extension - */ - -#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus) -# define _TYPE_ALIGNMENT(type) __alignof(type) -#elif defined(__GNUC__) -# define _TYPE_ALIGNMENT(type) __alignof__(type) -#else -/* - * FIXME: May not be possible without a compiler extension - * (if type is not just a name that is, otherwise the normal - * TYPE_ALIGNMENT can be used) - */ -#endif - -#if defined(TYPE_ALIGNMENT) && defined(_MSC_VER) && _MSC_VER >= 800 && !defined(__cplusplus) -#pragma warning(disable:4116) -#endif - -#if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT) -# define TYPE_ALIGNMENT _TYPE_ALIGNMENT -#endif - -/*********************************************************************** - * Test helper macros - */ - -#define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size); - -#ifdef TYPE_ALIGNMENT -# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align); -#else -# define TEST_TYPE_ALIGN(type, align) -#endif - -#ifdef _TYPE_ALIGNMENT -# define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align); -# define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align); -#else -# define TEST_TARGET_ALIGN(type, align) -# define TEST_FIELD_ALIGN(type, field, align) -#endif - -#define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset); - -#define TEST_TARGET_SIZE(type, size) TEST_TYPE_SIZE(*(type)0, size) -#define TEST_FIELD_SIZE(type, field, size) TEST_TYPE_SIZE((((type*)0)->field), size) -#define TEST_TYPE_SIGNED(type) C_ASSERT((type) -1 < 0); -#define TEST_TYPE_UNSIGNED(type) C_ASSERT((type) -1 > 0); - - -#ifdef _WIN64 - -static void test_pack_BLOB(void) -{ - /* BLOB */ - TEST_TYPE_SIZE (BLOB, 16) - TEST_TYPE_ALIGN (BLOB, 8) - TEST_FIELD_SIZE (BLOB, cbSize, 4) - TEST_FIELD_ALIGN (BLOB, cbSize, 4) - TEST_FIELD_OFFSET(BLOB, cbSize, 0) - TEST_FIELD_SIZE (BLOB, pBlobData, 8) - TEST_FIELD_ALIGN (BLOB, pBlobData, 8) - TEST_FIELD_OFFSET(BLOB, pBlobData, 8) -} - -static void test_pack_BSTR(void) -{ - /* BSTR */ - TEST_TYPE_SIZE (BSTR, 8) - TEST_TYPE_ALIGN (BSTR, 8) - TEST_TARGET_SIZE (BSTR, 2) - TEST_TARGET_ALIGN(BSTR, 2) -} - -static void test_pack_BSTRBLOB(void) -{ - /* BSTRBLOB */ - TEST_TYPE_SIZE (BSTRBLOB, 16) - TEST_TYPE_ALIGN (BSTRBLOB, 8) - TEST_FIELD_SIZE (BSTRBLOB, cbSize, 4) - TEST_FIELD_ALIGN (BSTRBLOB, cbSize, 4) - TEST_FIELD_OFFSET(BSTRBLOB, cbSize, 0) - TEST_FIELD_SIZE (BSTRBLOB, pData, 8) - TEST_FIELD_ALIGN (BSTRBLOB, pData, 8) - TEST_FIELD_OFFSET(BSTRBLOB, pData, 8) -} - -static void test_pack_BYTE_BLOB(void) -{ - /* BYTE_BLOB */ - TEST_TYPE_SIZE (BYTE_BLOB, 8) - TEST_TYPE_ALIGN (BYTE_BLOB, 4) - TEST_FIELD_SIZE (BYTE_BLOB, clSize, 4) - TEST_FIELD_ALIGN (BYTE_BLOB, clSize, 4) - TEST_FIELD_OFFSET(BYTE_BLOB, clSize, 0) - TEST_FIELD_SIZE (BYTE_BLOB, abData, 1) - TEST_FIELD_ALIGN (BYTE_BLOB, abData, 1) - TEST_FIELD_OFFSET(BYTE_BLOB, abData, 4) -} - -static void test_pack_BYTE_SIZEDARR(void) -{ - /* BYTE_SIZEDARR */ - TEST_TYPE_SIZE (BYTE_SIZEDARR, 16) - TEST_TYPE_ALIGN (BYTE_SIZEDARR, 8) - TEST_FIELD_SIZE (BYTE_SIZEDARR, clSize, 4) - TEST_FIELD_ALIGN (BYTE_SIZEDARR, clSize, 4) - TEST_FIELD_OFFSET(BYTE_SIZEDARR, clSize, 0) - TEST_FIELD_SIZE (BYTE_SIZEDARR, pData, 8) - TEST_FIELD_ALIGN (BYTE_SIZEDARR, pData, 8) - TEST_FIELD_OFFSET(BYTE_SIZEDARR, pData, 8) -} - -static void test_pack_CLIPDATA(void) -{ - /* CLIPDATA */ - TEST_TYPE_SIZE (CLIPDATA, 16) - TEST_TYPE_ALIGN (CLIPDATA, 8) - TEST_FIELD_SIZE (CLIPDATA, cbSize, 4) - TEST_FIELD_ALIGN (CLIPDATA, cbSize, 4) - TEST_FIELD_OFFSET(CLIPDATA, cbSize, 0) - TEST_FIELD_SIZE (CLIPDATA, ulClipFmt, 4) - TEST_FIELD_ALIGN (CLIPDATA, ulClipFmt, 4) - TEST_FIELD_OFFSET(CLIPDATA, ulClipFmt, 4) - TEST_FIELD_SIZE (CLIPDATA, pClipData, 8) - TEST_FIELD_ALIGN (CLIPDATA, pClipData, 8) - TEST_FIELD_OFFSET(CLIPDATA, pClipData, 8) -} - -static void test_pack_CLIPFORMAT(void) -{ - /* CLIPFORMAT */ - TEST_TYPE_SIZE (CLIPFORMAT, 2) - TEST_TYPE_ALIGN (CLIPFORMAT, 2) - TEST_TYPE_UNSIGNED(CLIPFORMAT) -} - -static void test_pack_COAUTHIDENTITY(void) -{ - /* COAUTHIDENTITY */ - TEST_TYPE_SIZE (COAUTHIDENTITY, 48) - TEST_TYPE_ALIGN (COAUTHIDENTITY, 8) - TEST_FIELD_SIZE (COAUTHIDENTITY, User, 8) - TEST_FIELD_ALIGN (COAUTHIDENTITY, User, 8) - TEST_FIELD_OFFSET(COAUTHIDENTITY, User, 0) - TEST_FIELD_SIZE (COAUTHIDENTITY, UserLength, 4) - TEST_FIELD_ALIGN (COAUTHIDENTITY, UserLength, 4) - TEST_FIELD_OFFSET(COAUTHIDENTITY, UserLength, 8) - TEST_FIELD_SIZE (COAUTHIDENTITY, Domain, 8) - TEST_FIELD_ALIGN (COAUTHIDENTITY, Domain, 8) - TEST_FIELD_OFFSET(COAUTHIDENTITY, Domain, 16) - TEST_FIELD_SIZE (COAUTHIDENTITY, DomainLength, 4) - TEST_FIELD_ALIGN (COAUTHIDENTITY, DomainLength, 4) - TEST_FIELD_OFFSET(COAUTHIDENTITY, DomainLength, 24) - TEST_FIELD_SIZE (COAUTHIDENTITY, Password, 8) - TEST_FIELD_ALIGN (COAUTHIDENTITY, Password, 8) - TEST_FIELD_OFFSET(COAUTHIDENTITY, Password, 32) - TEST_FIELD_SIZE (COAUTHIDENTITY, PasswordLength, 4) - TEST_FIELD_ALIGN (COAUTHIDENTITY, PasswordLength, 4) - TEST_FIELD_OFFSET(COAUTHIDENTITY, PasswordLength, 40) - TEST_FIELD_SIZE (COAUTHIDENTITY, Flags, 4) - TEST_FIELD_ALIGN (COAUTHIDENTITY, Flags, 4) - TEST_FIELD_OFFSET(COAUTHIDENTITY, Flags, 44) -} - -static void test_pack_COAUTHINFO(void) -{ - /* COAUTHINFO */ - TEST_TYPE_SIZE (COAUTHINFO, 40) - TEST_TYPE_ALIGN (COAUTHINFO, 8) - TEST_FIELD_SIZE (COAUTHINFO, dwAuthnSvc, 4) - TEST_FIELD_ALIGN (COAUTHINFO, dwAuthnSvc, 4) - TEST_FIELD_OFFSET(COAUTHINFO, dwAuthnSvc, 0) - TEST_FIELD_SIZE (COAUTHINFO, dwAuthzSvc, 4) - TEST_FIELD_ALIGN (COAUTHINFO, dwAuthzSvc, 4) - TEST_FIELD_OFFSET(COAUTHINFO, dwAuthzSvc, 4) - TEST_FIELD_SIZE (COAUTHINFO, pwszServerPrincName, 8) - TEST_FIELD_ALIGN (COAUTHINFO, pwszServerPrincName, 8) - TEST_FIELD_OFFSET(COAUTHINFO, pwszServerPrincName, 8) - TEST_FIELD_SIZE (COAUTHINFO, dwAuthnLevel, 4) - TEST_FIELD_ALIGN (COAUTHINFO, dwAuthnLevel, 4) - TEST_FIELD_OFFSET(COAUTHINFO, dwAuthnLevel, 16) - TEST_FIELD_SIZE (COAUTHINFO, dwImpersonationLevel, 4) - TEST_FIELD_ALIGN (COAUTHINFO, dwImpersonationLevel, 4) - TEST_FIELD_OFFSET(COAUTHINFO, dwImpersonationLevel, 20) - TEST_FIELD_SIZE (COAUTHINFO, pAuthIdentityData, 8) - TEST_FIELD_ALIGN (COAUTHINFO, pAuthIdentityData, 8) - TEST_FIELD_OFFSET(COAUTHINFO, pAuthIdentityData, 24) - TEST_FIELD_SIZE (COAUTHINFO, dwCapabilities, 4) - TEST_FIELD_ALIGN (COAUTHINFO, dwCapabilities, 4) - TEST_FIELD_OFFSET(COAUTHINFO, dwCapabilities, 32) -} - -static void test_pack_DATE(void) -{ - /* DATE */ - TEST_TYPE_SIZE (DATE, 8) - TEST_TYPE_ALIGN (DATE, 8) -} - -static void test_pack_DOUBLE(void) -{ - /* DOUBLE */ - TEST_TYPE_SIZE (DOUBLE, 8) - TEST_TYPE_ALIGN (DOUBLE, 8) -} - -static void test_pack_DWORD_SIZEDARR(void) -{ - /* DWORD_SIZEDARR */ - TEST_TYPE_SIZE (DWORD_SIZEDARR, 16) - TEST_TYPE_ALIGN (DWORD_SIZEDARR, 8) - TEST_FIELD_SIZE (DWORD_SIZEDARR, clSize, 4) - TEST_FIELD_ALIGN (DWORD_SIZEDARR, clSize, 4) - TEST_FIELD_OFFSET(DWORD_SIZEDARR, clSize, 0) - TEST_FIELD_SIZE (DWORD_SIZEDARR, pData, 8) - TEST_FIELD_ALIGN (DWORD_SIZEDARR, pData, 8) - TEST_FIELD_OFFSET(DWORD_SIZEDARR, pData, 8) -} - -static void test_pack_FLAGGED_BYTE_BLOB(void) -{ - /* FLAGGED_BYTE_BLOB */ - TEST_TYPE_SIZE (FLAGGED_BYTE_BLOB, 12) - TEST_TYPE_ALIGN (FLAGGED_BYTE_BLOB, 4) - TEST_FIELD_SIZE (FLAGGED_BYTE_BLOB, fFlags, 4) - TEST_FIELD_ALIGN (FLAGGED_BYTE_BLOB, fFlags, 4) - TEST_FIELD_OFFSET(FLAGGED_BYTE_BLOB, fFlags, 0) - TEST_FIELD_SIZE (FLAGGED_BYTE_BLOB, clSize, 4) - TEST_FIELD_ALIGN (FLAGGED_BYTE_BLOB, clSize, 4) - TEST_FIELD_OFFSET(FLAGGED_BYTE_BLOB, clSize, 4) - TEST_FIELD_SIZE (FLAGGED_BYTE_BLOB, abData, 1) - TEST_FIELD_ALIGN (FLAGGED_BYTE_BLOB, abData, 1) - TEST_FIELD_OFFSET(FLAGGED_BYTE_BLOB, abData, 8) -} - -static void test_pack_FLAGGED_WORD_BLOB(void) -{ - /* FLAGGED_WORD_BLOB */ - TEST_TYPE_SIZE (FLAGGED_WORD_BLOB, 12) - TEST_TYPE_ALIGN (FLAGGED_WORD_BLOB, 4) - TEST_FIELD_SIZE (FLAGGED_WORD_BLOB, fFlags, 4) - TEST_FIELD_ALIGN (FLAGGED_WORD_BLOB, fFlags, 4) - TEST_FIELD_OFFSET(FLAGGED_WORD_BLOB, fFlags, 0) - TEST_FIELD_SIZE (FLAGGED_WORD_BLOB, clSize, 4) - TEST_FIELD_ALIGN (FLAGGED_WORD_BLOB, clSize, 4) - TEST_FIELD_OFFSET(FLAGGED_WORD_BLOB, clSize, 4) - TEST_FIELD_SIZE (FLAGGED_WORD_BLOB, asData, 2) - TEST_FIELD_ALIGN (FLAGGED_WORD_BLOB, asData, 2) - TEST_FIELD_OFFSET(FLAGGED_WORD_BLOB, asData, 8) -} - -static void test_pack_HMETAFILEPICT(void) -{ - /* HMETAFILEPICT */ - TEST_TYPE_SIZE (HMETAFILEPICT, 8) - TEST_TYPE_ALIGN (HMETAFILEPICT, 8) -} - -static void test_pack_HYPER_SIZEDARR(void) -{ - /* HYPER_SIZEDARR */ - TEST_TYPE_SIZE (HYPER_SIZEDARR, 16) - TEST_TYPE_ALIGN (HYPER_SIZEDARR, 8) - TEST_FIELD_SIZE (HYPER_SIZEDARR, clSize, 4) - TEST_FIELD_ALIGN (HYPER_SIZEDARR, clSize, 4) - TEST_FIELD_OFFSET(HYPER_SIZEDARR, clSize, 0) - TEST_FIELD_SIZE (HYPER_SIZEDARR, pData, 8) - TEST_FIELD_ALIGN (HYPER_SIZEDARR, pData, 8) - TEST_FIELD_OFFSET(HYPER_SIZEDARR, pData, 8) -} - -static void test_pack_LPBLOB(void) -{ - /* LPBLOB */ - TEST_TYPE_SIZE (LPBLOB, 8) - TEST_TYPE_ALIGN (LPBLOB, 8) -} - -static void test_pack_LPBSTR(void) -{ - /* LPBSTR */ - TEST_TYPE_SIZE (LPBSTR, 8) - TEST_TYPE_ALIGN (LPBSTR, 8) - TEST_TARGET_SIZE (LPBSTR, 8) - TEST_TARGET_ALIGN(LPBSTR, 8) -} - -static void test_pack_LPBSTRBLOB(void) -{ - /* LPBSTRBLOB */ - TEST_TYPE_SIZE (LPBSTRBLOB, 8) - TEST_TYPE_ALIGN (LPBSTRBLOB, 8) -} - -static void test_pack_LPCOLESTR(void) -{ - /* LPCOLESTR */ - TEST_TYPE_SIZE (LPCOLESTR, 8) - TEST_TYPE_ALIGN (LPCOLESTR, 8) - TEST_TARGET_SIZE (LPCOLESTR, 2) - TEST_TARGET_ALIGN(LPCOLESTR, 2) -} - -static void test_pack_LPCY(void) -{ - /* LPCY */ - TEST_TYPE_SIZE (LPCY, 8) - TEST_TYPE_ALIGN (LPCY, 8) -} - -static void test_pack_LPDECIMAL(void) -{ - /* LPDECIMAL */ - TEST_TYPE_SIZE (LPDECIMAL, 8) - TEST_TYPE_ALIGN (LPDECIMAL, 8) -} - -static void test_pack_LPOLESTR(void) -{ - /* LPOLESTR */ - TEST_TYPE_SIZE (LPOLESTR, 8) - TEST_TYPE_ALIGN (LPOLESTR, 8) - TEST_TARGET_SIZE (LPOLESTR, 2) - TEST_TARGET_ALIGN(LPOLESTR, 2) -} - -static void test_pack_OLECHAR(void) -{ - /* OLECHAR */ - TEST_TYPE_SIZE (OLECHAR, 2) - TEST_TYPE_ALIGN (OLECHAR, 2) -} - -static void test_pack_PROPID(void) -{ - /* PROPID */ - TEST_TYPE_SIZE (PROPID, 4) - TEST_TYPE_ALIGN (PROPID, 4) -} - -static void test_pack_RemHBITMAP(void) -{ - /* RemHBITMAP */ - TEST_TYPE_SIZE (RemHBITMAP, 8) - TEST_TYPE_ALIGN (RemHBITMAP, 4) - TEST_FIELD_SIZE (RemHBITMAP, cbData, 4) - TEST_FIELD_ALIGN (RemHBITMAP, cbData, 4) - TEST_FIELD_OFFSET(RemHBITMAP, cbData, 0) - TEST_FIELD_SIZE (RemHBITMAP, data, 1) - TEST_FIELD_ALIGN (RemHBITMAP, data, 1) - TEST_FIELD_OFFSET(RemHBITMAP, data, 4) -} - -static void test_pack_RemHENHMETAFILE(void) -{ - /* RemHENHMETAFILE */ - TEST_TYPE_SIZE (RemHENHMETAFILE, 8) - TEST_TYPE_ALIGN (RemHENHMETAFILE, 4) - TEST_FIELD_SIZE (RemHENHMETAFILE, cbData, 4) - TEST_FIELD_ALIGN (RemHENHMETAFILE, cbData, 4) - TEST_FIELD_OFFSET(RemHENHMETAFILE, cbData, 0) - TEST_FIELD_SIZE (RemHENHMETAFILE, data, 1) - TEST_FIELD_ALIGN (RemHENHMETAFILE, data, 1) - TEST_FIELD_OFFSET(RemHENHMETAFILE, data, 4) -} - -static void test_pack_RemHGLOBAL(void) -{ - /* RemHGLOBAL */ - TEST_TYPE_SIZE (RemHGLOBAL, 12) - TEST_TYPE_ALIGN (RemHGLOBAL, 4) - TEST_FIELD_SIZE (RemHGLOBAL, fNullHGlobal, 4) - TEST_FIELD_ALIGN (RemHGLOBAL, fNullHGlobal, 4) - TEST_FIELD_OFFSET(RemHGLOBAL, fNullHGlobal, 0) - TEST_FIELD_SIZE (RemHGLOBAL, cbData, 4) - TEST_FIELD_ALIGN (RemHGLOBAL, cbData, 4) - TEST_FIELD_OFFSET(RemHGLOBAL, cbData, 4) - TEST_FIELD_SIZE (RemHGLOBAL, data, 1) - TEST_FIELD_ALIGN (RemHGLOBAL, data, 1) - TEST_FIELD_OFFSET(RemHGLOBAL, data, 8) -} - -static void test_pack_RemHMETAFILEPICT(void) -{ - /* RemHMETAFILEPICT */ - TEST_TYPE_SIZE (RemHMETAFILEPICT, 20) - TEST_TYPE_ALIGN (RemHMETAFILEPICT, 4) - TEST_FIELD_SIZE (RemHMETAFILEPICT, mm, 4) - TEST_FIELD_ALIGN (RemHMETAFILEPICT, mm, 4) - TEST_FIELD_OFFSET(RemHMETAFILEPICT, mm, 0) - TEST_FIELD_SIZE (RemHMETAFILEPICT, xExt, 4) - TEST_FIELD_ALIGN (RemHMETAFILEPICT, xExt, 4) - TEST_FIELD_OFFSET(RemHMETAFILEPICT, xExt, 4) - TEST_FIELD_SIZE (RemHMETAFILEPICT, yExt, 4) - TEST_FIELD_ALIGN (RemHMETAFILEPICT, yExt, 4) - TEST_FIELD_OFFSET(RemHMETAFILEPICT, yExt, 8) - TEST_FIELD_SIZE (RemHMETAFILEPICT, cbData, 4) - TEST_FIELD_ALIGN (RemHMETAFILEPICT, cbData, 4) - TEST_FIELD_OFFSET(RemHMETAFILEPICT, cbData, 12) - TEST_FIELD_SIZE (RemHMETAFILEPICT, data, 1) - TEST_FIELD_ALIGN (RemHMETAFILEPICT, data, 1) - TEST_FIELD_OFFSET(RemHMETAFILEPICT, data, 16) -} - -static void test_pack_RemHPALETTE(void) -{ - /* RemHPALETTE */ - TEST_TYPE_SIZE (RemHPALETTE, 8) - TEST_TYPE_ALIGN (RemHPALETTE, 4) - TEST_FIELD_SIZE (RemHPALETTE, cbData, 4) - TEST_FIELD_ALIGN (RemHPALETTE, cbData, 4) - TEST_FIELD_OFFSET(RemHPALETTE, cbData, 0) - TEST_FIELD_SIZE (RemHPALETTE, data, 1) - TEST_FIELD_ALIGN (RemHPALETTE, data, 1) - TEST_FIELD_OFFSET(RemHPALETTE, data, 4) -} - -static void test_pack_SCODE(void) -{ - /* SCODE */ - TEST_TYPE_SIZE (SCODE, 4) - TEST_TYPE_ALIGN (SCODE, 4) -} - -static void test_pack_UP_BYTE_BLOB(void) -{ - /* UP_BYTE_BLOB */ - TEST_TYPE_SIZE (UP_BYTE_BLOB, 8) - TEST_TYPE_ALIGN (UP_BYTE_BLOB, 8) - TEST_TARGET_SIZE (UP_BYTE_BLOB, 8) - TEST_TARGET_ALIGN(UP_BYTE_BLOB, 4) -} - -static void test_pack_UP_FLAGGED_BYTE_BLOB(void) -{ - /* UP_FLAGGED_BYTE_BLOB */ - TEST_TYPE_SIZE (UP_FLAGGED_BYTE_BLOB, 8) - TEST_TYPE_ALIGN (UP_FLAGGED_BYTE_BLOB, 8) - TEST_TARGET_SIZE (UP_FLAGGED_BYTE_BLOB, 12) - TEST_TARGET_ALIGN(UP_FLAGGED_BYTE_BLOB, 4) -} - -static void test_pack_UP_FLAGGED_WORD_BLOB(void) -{ - /* UP_FLAGGED_WORD_BLOB */ - TEST_TYPE_SIZE (UP_FLAGGED_WORD_BLOB, 8) - TEST_TYPE_ALIGN (UP_FLAGGED_WORD_BLOB, 8) - TEST_TARGET_SIZE (UP_FLAGGED_WORD_BLOB, 12) - TEST_TARGET_ALIGN(UP_FLAGGED_WORD_BLOB, 4) -} - -static void test_pack_VARIANT_BOOL(void) -{ - /* VARIANT_BOOL */ - TEST_TYPE_SIZE (VARIANT_BOOL, 2) - TEST_TYPE_ALIGN (VARIANT_BOOL, 2) - TEST_TYPE_SIGNED(VARIANT_BOOL) -} - -static void test_pack_VARTYPE(void) -{ - /* VARTYPE */ - TEST_TYPE_SIZE (VARTYPE, 2) - TEST_TYPE_ALIGN (VARTYPE, 2) - TEST_TYPE_UNSIGNED(VARTYPE) -} - -static void test_pack_WORD_SIZEDARR(void) -{ - /* WORD_SIZEDARR */ - TEST_TYPE_SIZE (WORD_SIZEDARR, 16) - TEST_TYPE_ALIGN (WORD_SIZEDARR, 8) - TEST_FIELD_SIZE (WORD_SIZEDARR, clSize, 4) - TEST_FIELD_ALIGN (WORD_SIZEDARR, clSize, 4) - TEST_FIELD_OFFSET(WORD_SIZEDARR, clSize, 0) - TEST_FIELD_SIZE (WORD_SIZEDARR, pData, 8) - TEST_FIELD_ALIGN (WORD_SIZEDARR, pData, 8) - TEST_FIELD_OFFSET(WORD_SIZEDARR, pData, 8) -} - -static void test_pack_remoteMETAFILEPICT(void) -{ - /* remoteMETAFILEPICT */ - TEST_TYPE_SIZE (remoteMETAFILEPICT, 24) - TEST_TYPE_ALIGN (remoteMETAFILEPICT, 8) - TEST_FIELD_SIZE (remoteMETAFILEPICT, mm, 4) - TEST_FIELD_ALIGN (remoteMETAFILEPICT, mm, 4) - TEST_FIELD_OFFSET(remoteMETAFILEPICT, mm, 0) - TEST_FIELD_SIZE (remoteMETAFILEPICT, xExt, 4) - TEST_FIELD_ALIGN (remoteMETAFILEPICT, xExt, 4) - TEST_FIELD_OFFSET(remoteMETAFILEPICT, xExt, 4) - TEST_FIELD_SIZE (remoteMETAFILEPICT, yExt, 4) - TEST_FIELD_ALIGN (remoteMETAFILEPICT, yExt, 4) - TEST_FIELD_OFFSET(remoteMETAFILEPICT, yExt, 8) - TEST_FIELD_SIZE (remoteMETAFILEPICT, hMF, 8) - TEST_FIELD_ALIGN (remoteMETAFILEPICT, hMF, 8) - TEST_FIELD_OFFSET(remoteMETAFILEPICT, hMF, 16) -} - -static void test_pack_userBITMAP(void) -{ - /* userBITMAP */ - TEST_TYPE_SIZE (userBITMAP, 28) - TEST_TYPE_ALIGN (userBITMAP, 4) - TEST_FIELD_SIZE (userBITMAP, bmType, 4) - TEST_FIELD_ALIGN (userBITMAP, bmType, 4) - TEST_FIELD_OFFSET(userBITMAP, bmType, 0) - TEST_FIELD_SIZE (userBITMAP, bmWidth, 4) - TEST_FIELD_ALIGN (userBITMAP, bmWidth, 4) - TEST_FIELD_OFFSET(userBITMAP, bmWidth, 4) - TEST_FIELD_SIZE (userBITMAP, bmHeight, 4) - TEST_FIELD_ALIGN (userBITMAP, bmHeight, 4) - TEST_FIELD_OFFSET(userBITMAP, bmHeight, 8) - TEST_FIELD_SIZE (userBITMAP, bmWidthBytes, 4) - TEST_FIELD_ALIGN (userBITMAP, bmWidthBytes, 4) - TEST_FIELD_OFFSET(userBITMAP, bmWidthBytes, 12) - TEST_FIELD_SIZE (userBITMAP, bmPlanes, 2) - TEST_FIELD_ALIGN (userBITMAP, bmPlanes, 2) - TEST_FIELD_OFFSET(userBITMAP, bmPlanes, 16) - TEST_FIELD_SIZE (userBITMAP, bmBitsPixel, 2) - TEST_FIELD_ALIGN (userBITMAP, bmBitsPixel, 2) - TEST_FIELD_OFFSET(userBITMAP, bmBitsPixel, 18) - TEST_FIELD_SIZE (userBITMAP, cbSize, 4) - TEST_FIELD_ALIGN (userBITMAP, cbSize, 4) - TEST_FIELD_OFFSET(userBITMAP, cbSize, 20) - TEST_FIELD_SIZE (userBITMAP, pBuffer, 1) - TEST_FIELD_ALIGN (userBITMAP, pBuffer, 1) - TEST_FIELD_OFFSET(userBITMAP, pBuffer, 24) -} - -static void test_pack_userCLIPFORMAT(void) -{ - /* userCLIPFORMAT */ - TEST_FIELD_SIZE (userCLIPFORMAT, fContext, 4) - TEST_FIELD_ALIGN (userCLIPFORMAT, fContext, 4) - TEST_FIELD_OFFSET(userCLIPFORMAT, fContext, 0) -} - -static void test_pack_userHBITMAP(void) -{ - /* userHBITMAP */ - TEST_FIELD_SIZE (userHBITMAP, fContext, 4) - TEST_FIELD_ALIGN (userHBITMAP, fContext, 4) - TEST_FIELD_OFFSET(userHBITMAP, fContext, 0) -} - -static void test_pack_userHENHMETAFILE(void) -{ - /* userHENHMETAFILE */ - TEST_FIELD_SIZE (userHENHMETAFILE, fContext, 4) - TEST_FIELD_ALIGN (userHENHMETAFILE, fContext, 4) - TEST_FIELD_OFFSET(userHENHMETAFILE, fContext, 0) -} - -static void test_pack_userHGLOBAL(void) -{ - /* userHGLOBAL */ - TEST_FIELD_SIZE (userHGLOBAL, fContext, 4) - TEST_FIELD_ALIGN (userHGLOBAL, fContext, 4) - TEST_FIELD_OFFSET(userHGLOBAL, fContext, 0) -} - -static void test_pack_userHMETAFILE(void) -{ - /* userHMETAFILE */ - TEST_FIELD_SIZE (userHMETAFILE, fContext, 4) - TEST_FIELD_ALIGN (userHMETAFILE, fContext, 4) - TEST_FIELD_OFFSET(userHMETAFILE, fContext, 0) -} - -static void test_pack_userHMETAFILEPICT(void) -{ - /* userHMETAFILEPICT */ - TEST_FIELD_SIZE (userHMETAFILEPICT, fContext, 4) - TEST_FIELD_ALIGN (userHMETAFILEPICT, fContext, 4) - TEST_FIELD_OFFSET(userHMETAFILEPICT, fContext, 0) -} - -static void test_pack_userHPALETTE(void) -{ - /* userHPALETTE */ - TEST_FIELD_SIZE (userHPALETTE, fContext, 4) - TEST_FIELD_ALIGN (userHPALETTE, fContext, 4) - TEST_FIELD_OFFSET(userHPALETTE, fContext, 0) -} - -static void test_pack_wireBSTR(void) -{ - /* wireBSTR */ - TEST_TYPE_SIZE (wireBSTR, 8) - TEST_TYPE_ALIGN (wireBSTR, 8) - TEST_TARGET_SIZE (wireBSTR, 12) - TEST_TARGET_ALIGN(wireBSTR, 4) -} - -static void test_pack_wireCLIPFORMAT(void) -{ - /* wireCLIPFORMAT */ - TEST_TYPE_SIZE (wireCLIPFORMAT, 8) - TEST_TYPE_ALIGN (wireCLIPFORMAT, 8) -} - -static void test_pack_wireHBITMAP(void) -{ - /* wireHBITMAP */ - TEST_TYPE_SIZE (wireHBITMAP, 8) - TEST_TYPE_ALIGN (wireHBITMAP, 8) -} - -static void test_pack_wireHENHMETAFILE(void) -{ - /* wireHENHMETAFILE */ - TEST_TYPE_SIZE (wireHENHMETAFILE, 8) - TEST_TYPE_ALIGN (wireHENHMETAFILE, 8) -} - -static void test_pack_wireHGLOBAL(void) -{ - /* wireHGLOBAL */ - TEST_TYPE_SIZE (wireHGLOBAL, 8) - TEST_TYPE_ALIGN (wireHGLOBAL, 8) -} - -static void test_pack_wireHMETAFILE(void) -{ - /* wireHMETAFILE */ - TEST_TYPE_SIZE (wireHMETAFILE, 8) - TEST_TYPE_ALIGN (wireHMETAFILE, 8) -} - -static void test_pack_wireHMETAFILEPICT(void) -{ - /* wireHMETAFILEPICT */ - TEST_TYPE_SIZE (wireHMETAFILEPICT, 8) - TEST_TYPE_ALIGN (wireHMETAFILEPICT, 8) -} - -static void test_pack_wireHPALETTE(void) -{ - /* wireHPALETTE */ - TEST_TYPE_SIZE (wireHPALETTE, 8) - TEST_TYPE_ALIGN (wireHPALETTE, 8) -} - -static void test_pack_CLSID(void) -{ - /* CLSID */ - TEST_TYPE_SIZE (CLSID, 16) - TEST_TYPE_ALIGN (CLSID, 4) -} - -static void test_pack_FMTID(void) -{ - /* FMTID */ - TEST_TYPE_SIZE (FMTID, 16) - TEST_TYPE_ALIGN (FMTID, 4) -} - -static void test_pack_IID(void) -{ - /* IID */ - TEST_TYPE_SIZE (IID, 16) - TEST_TYPE_ALIGN (IID, 4) -} - -static void test_pack_APPBARDATA(void) -{ - /* APPBARDATA */ - TEST_TYPE_SIZE (APPBARDATA, 48) - TEST_TYPE_ALIGN (APPBARDATA, 8) - TEST_FIELD_SIZE (APPBARDATA, cbSize, 4) - TEST_FIELD_ALIGN (APPBARDATA, cbSize, 4) - TEST_FIELD_OFFSET(APPBARDATA, cbSize, 0) - TEST_FIELD_SIZE (APPBARDATA, hWnd, 8) - TEST_FIELD_ALIGN (APPBARDATA, hWnd, 8) - TEST_FIELD_OFFSET(APPBARDATA, hWnd, 8) - TEST_FIELD_SIZE (APPBARDATA, uCallbackMessage, 4) - TEST_FIELD_ALIGN (APPBARDATA, uCallbackMessage, 4) - TEST_FIELD_OFFSET(APPBARDATA, uCallbackMessage, 16) - TEST_FIELD_SIZE (APPBARDATA, uEdge, 4) - TEST_FIELD_ALIGN (APPBARDATA, uEdge, 4) - TEST_FIELD_OFFSET(APPBARDATA, uEdge, 20) - TEST_FIELD_SIZE (APPBARDATA, rc, 16) - TEST_FIELD_ALIGN (APPBARDATA, rc, 4) - TEST_FIELD_OFFSET(APPBARDATA, rc, 24) - TEST_FIELD_SIZE (APPBARDATA, lParam, 8) - TEST_FIELD_ALIGN (APPBARDATA, lParam, 8) - TEST_FIELD_OFFSET(APPBARDATA, lParam, 40) -} - -static void test_pack_DRAGINFOA(void) -{ - /* DRAGINFOA */ - TEST_TYPE_SIZE (DRAGINFOA, 32) - TEST_TYPE_ALIGN (DRAGINFOA, 8) - TEST_FIELD_SIZE (DRAGINFOA, uSize, 4) - TEST_FIELD_ALIGN (DRAGINFOA, uSize, 4) - TEST_FIELD_OFFSET(DRAGINFOA, uSize, 0) - TEST_FIELD_SIZE (DRAGINFOA, pt, 8) - TEST_FIELD_ALIGN (DRAGINFOA, pt, 4) - TEST_FIELD_OFFSET(DRAGINFOA, pt, 4) - TEST_FIELD_SIZE (DRAGINFOA, fNC, 4) - TEST_FIELD_ALIGN (DRAGINFOA, fNC, 4) - TEST_FIELD_OFFSET(DRAGINFOA, fNC, 12) - TEST_FIELD_SIZE (DRAGINFOA, lpFileList, 8) - TEST_FIELD_ALIGN (DRAGINFOA, lpFileList, 8) - TEST_FIELD_OFFSET(DRAGINFOA, lpFileList, 16) - TEST_FIELD_SIZE (DRAGINFOA, grfKeyState, 4) - TEST_FIELD_ALIGN (DRAGINFOA, grfKeyState, 4) - TEST_FIELD_OFFSET(DRAGINFOA, grfKeyState, 24) -} - -static void test_pack_DRAGINFOW(void) -{ - /* DRAGINFOW */ - TEST_TYPE_SIZE (DRAGINFOW, 32) - TEST_TYPE_ALIGN (DRAGINFOW, 8) - TEST_FIELD_SIZE (DRAGINFOW, uSize, 4) - TEST_FIELD_ALIGN (DRAGINFOW, uSize, 4) - TEST_FIELD_OFFSET(DRAGINFOW, uSize, 0) - TEST_FIELD_SIZE (DRAGINFOW, pt, 8) - TEST_FIELD_ALIGN (DRAGINFOW, pt, 4) - TEST_FIELD_OFFSET(DRAGINFOW, pt, 4) - TEST_FIELD_SIZE (DRAGINFOW, fNC, 4) - TEST_FIELD_ALIGN (DRAGINFOW, fNC, 4) - TEST_FIELD_OFFSET(DRAGINFOW, fNC, 12) - TEST_FIELD_SIZE (DRAGINFOW, lpFileList, 8) - TEST_FIELD_ALIGN (DRAGINFOW, lpFileList, 8) - TEST_FIELD_OFFSET(DRAGINFOW, lpFileList, 16) - TEST_FIELD_SIZE (DRAGINFOW, grfKeyState, 4) - TEST_FIELD_ALIGN (DRAGINFOW, grfKeyState, 4) - TEST_FIELD_OFFSET(DRAGINFOW, grfKeyState, 24) -} - -static void test_pack_FILEOP_FLAGS(void) -{ - /* FILEOP_FLAGS */ - TEST_TYPE_SIZE (FILEOP_FLAGS, 2) - TEST_TYPE_ALIGN (FILEOP_FLAGS, 2) - TEST_TYPE_UNSIGNED(FILEOP_FLAGS) -} - -static void test_pack_LPDRAGINFOA(void) -{ - /* LPDRAGINFOA */ - TEST_TYPE_SIZE (LPDRAGINFOA, 8) - TEST_TYPE_ALIGN (LPDRAGINFOA, 8) - TEST_TARGET_SIZE (LPDRAGINFOA, 32) - TEST_TARGET_ALIGN(LPDRAGINFOA, 8) -} - -static void test_pack_LPDRAGINFOW(void) -{ - /* LPDRAGINFOW */ - TEST_TYPE_SIZE (LPDRAGINFOW, 8) - TEST_TYPE_ALIGN (LPDRAGINFOW, 8) - TEST_TARGET_SIZE (LPDRAGINFOW, 32) - TEST_TARGET_ALIGN(LPDRAGINFOW, 8) -} - -static void test_pack_LPSHELLEXECUTEINFOA(void) -{ - /* LPSHELLEXECUTEINFOA */ - TEST_TYPE_SIZE (LPSHELLEXECUTEINFOA, 8) - TEST_TYPE_ALIGN (LPSHELLEXECUTEINFOA, 8) -} - -static void test_pack_LPSHELLEXECUTEINFOW(void) -{ - /* LPSHELLEXECUTEINFOW */ - TEST_TYPE_SIZE (LPSHELLEXECUTEINFOW, 8) - TEST_TYPE_ALIGN (LPSHELLEXECUTEINFOW, 8) -} - -static void test_pack_LPSHFILEOPSTRUCTA(void) -{ - /* LPSHFILEOPSTRUCTA */ - TEST_TYPE_SIZE (LPSHFILEOPSTRUCTA, 8) - TEST_TYPE_ALIGN (LPSHFILEOPSTRUCTA, 8) - TEST_TARGET_SIZE (LPSHFILEOPSTRUCTA, 56) - TEST_TARGET_ALIGN(LPSHFILEOPSTRUCTA, 8) -} - -static void test_pack_LPSHFILEOPSTRUCTW(void) -{ - /* LPSHFILEOPSTRUCTW */ - TEST_TYPE_SIZE (LPSHFILEOPSTRUCTW, 8) - TEST_TYPE_ALIGN (LPSHFILEOPSTRUCTW, 8) - TEST_TARGET_SIZE (LPSHFILEOPSTRUCTW, 56) - TEST_TARGET_ALIGN(LPSHFILEOPSTRUCTW, 8) -} - -static void test_pack_LPSHNAMEMAPPINGA(void) -{ - /* LPSHNAMEMAPPINGA */ - TEST_TYPE_SIZE (LPSHNAMEMAPPINGA, 8) - TEST_TYPE_ALIGN (LPSHNAMEMAPPINGA, 8) - TEST_TARGET_SIZE (LPSHNAMEMAPPINGA, 24) - TEST_TARGET_ALIGN(LPSHNAMEMAPPINGA, 8) -} - -static void test_pack_LPSHNAMEMAPPINGW(void) -{ - /* LPSHNAMEMAPPINGW */ - TEST_TYPE_SIZE (LPSHNAMEMAPPINGW, 8) - TEST_TYPE_ALIGN (LPSHNAMEMAPPINGW, 8) - TEST_TARGET_SIZE (LPSHNAMEMAPPINGW, 24) - TEST_TARGET_ALIGN(LPSHNAMEMAPPINGW, 8) -} - -static void test_pack_NOTIFYICONDATAA(void) -{ - /* NOTIFYICONDATAA */ - TEST_FIELD_SIZE (NOTIFYICONDATAA, cbSize, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAA, cbSize, 4) - TEST_FIELD_OFFSET(NOTIFYICONDATAA, cbSize, 0) - TEST_FIELD_SIZE (NOTIFYICONDATAA, hWnd, 8) - TEST_FIELD_ALIGN (NOTIFYICONDATAA, hWnd, 8) - TEST_FIELD_OFFSET(NOTIFYICONDATAA, hWnd, 8) - TEST_FIELD_SIZE (NOTIFYICONDATAA, uID, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAA, uID, 4) - TEST_FIELD_OFFSET(NOTIFYICONDATAA, uID, 16) - TEST_FIELD_SIZE (NOTIFYICONDATAA, uFlags, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAA, uFlags, 4) - TEST_FIELD_OFFSET(NOTIFYICONDATAA, uFlags, 20) - TEST_FIELD_SIZE (NOTIFYICONDATAA, uCallbackMessage, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAA, uCallbackMessage, 4) - TEST_FIELD_OFFSET(NOTIFYICONDATAA, uCallbackMessage, 24) - TEST_FIELD_SIZE (NOTIFYICONDATAA, hIcon, 8) - TEST_FIELD_ALIGN (NOTIFYICONDATAA, hIcon, 8) - TEST_FIELD_OFFSET(NOTIFYICONDATAA, hIcon, 32) - TEST_FIELD_SIZE (NOTIFYICONDATAA, szTip, 128) - TEST_FIELD_ALIGN (NOTIFYICONDATAA, szTip, 1) - TEST_FIELD_OFFSET(NOTIFYICONDATAA, szTip, 40) - TEST_FIELD_SIZE (NOTIFYICONDATAA, dwState, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAA, dwState, 4) - TEST_FIELD_OFFSET(NOTIFYICONDATAA, dwState, 168) - TEST_FIELD_SIZE (NOTIFYICONDATAA, dwStateMask, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAA, dwStateMask, 4) - TEST_FIELD_OFFSET(NOTIFYICONDATAA, dwStateMask, 172) - TEST_FIELD_SIZE (NOTIFYICONDATAA, szInfo, 256) - TEST_FIELD_ALIGN (NOTIFYICONDATAA, szInfo, 1) - TEST_FIELD_OFFSET(NOTIFYICONDATAA, szInfo, 176) -} - -static void test_pack_NOTIFYICONDATAW(void) -{ - /* NOTIFYICONDATAW */ - TEST_FIELD_SIZE (NOTIFYICONDATAW, cbSize, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAW, cbSize, 4) - TEST_FIELD_OFFSET(NOTIFYICONDATAW, cbSize, 0) - TEST_FIELD_SIZE (NOTIFYICONDATAW, hWnd, 8) - TEST_FIELD_ALIGN (NOTIFYICONDATAW, hWnd, 8) - TEST_FIELD_OFFSET(NOTIFYICONDATAW, hWnd, 8) - TEST_FIELD_SIZE (NOTIFYICONDATAW, uID, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAW, uID, 4) - TEST_FIELD_OFFSET(NOTIFYICONDATAW, uID, 16) - TEST_FIELD_SIZE (NOTIFYICONDATAW, uFlags, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAW, uFlags, 4) - TEST_FIELD_OFFSET(NOTIFYICONDATAW, uFlags, 20) - TEST_FIELD_SIZE (NOTIFYICONDATAW, uCallbackMessage, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAW, uCallbackMessage, 4) - TEST_FIELD_OFFSET(NOTIFYICONDATAW, uCallbackMessage, 24) - TEST_FIELD_SIZE (NOTIFYICONDATAW, hIcon, 8) - TEST_FIELD_ALIGN (NOTIFYICONDATAW, hIcon, 8) - TEST_FIELD_OFFSET(NOTIFYICONDATAW, hIcon, 32) - TEST_FIELD_SIZE (NOTIFYICONDATAW, szTip, 256) - TEST_FIELD_ALIGN (NOTIFYICONDATAW, szTip, 2) - TEST_FIELD_OFFSET(NOTIFYICONDATAW, szTip, 40) - TEST_FIELD_SIZE (NOTIFYICONDATAW, dwState, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAW, dwState, 4) - TEST_FIELD_OFFSET(NOTIFYICONDATAW, dwState, 296) - TEST_FIELD_SIZE (NOTIFYICONDATAW, dwStateMask, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAW, dwStateMask, 4) - TEST_FIELD_OFFSET(NOTIFYICONDATAW, dwStateMask, 300) - TEST_FIELD_SIZE (NOTIFYICONDATAW, szInfo, 512) - TEST_FIELD_ALIGN (NOTIFYICONDATAW, szInfo, 2) - TEST_FIELD_OFFSET(NOTIFYICONDATAW, szInfo, 304) -} - -static void test_pack_PAPPBARDATA(void) -{ - /* PAPPBARDATA */ - TEST_TYPE_SIZE (PAPPBARDATA, 8) - TEST_TYPE_ALIGN (PAPPBARDATA, 8) - TEST_TARGET_SIZE (PAPPBARDATA, 48) - TEST_TARGET_ALIGN(PAPPBARDATA, 8) -} - -static void test_pack_PNOTIFYICONDATAA(void) -{ - /* PNOTIFYICONDATAA */ - TEST_TYPE_SIZE (PNOTIFYICONDATAA, 8) - TEST_TYPE_ALIGN (PNOTIFYICONDATAA, 8) -} - -static void test_pack_PNOTIFYICONDATAW(void) -{ - /* PNOTIFYICONDATAW */ - TEST_TYPE_SIZE (PNOTIFYICONDATAW, 8) - TEST_TYPE_ALIGN (PNOTIFYICONDATAW, 8) -} - -static void test_pack_PRINTEROP_FLAGS(void) -{ - /* PRINTEROP_FLAGS */ - TEST_TYPE_SIZE (PRINTEROP_FLAGS, 2) - TEST_TYPE_ALIGN (PRINTEROP_FLAGS, 2) - TEST_TYPE_UNSIGNED(PRINTEROP_FLAGS) -} - -static void test_pack_SHELLEXECUTEINFOA(void) -{ - /* SHELLEXECUTEINFOA */ - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, cbSize, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, cbSize, 4) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, cbSize, 0) - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, fMask, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, fMask, 4) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, fMask, 4) - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, hwnd, 8) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, hwnd, 8) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, hwnd, 8) - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, lpVerb, 8) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, lpVerb, 8) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, lpVerb, 16) - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, lpFile, 8) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, lpFile, 8) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, lpFile, 24) - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, lpParameters, 8) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, lpParameters, 8) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, lpParameters, 32) - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, lpDirectory, 8) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, lpDirectory, 8) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, lpDirectory, 40) - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, nShow, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, nShow, 4) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, nShow, 48) - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, hInstApp, 8) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, hInstApp, 8) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, hInstApp, 56) - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, lpIDList, 8) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, lpIDList, 8) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, lpIDList, 64) - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, lpClass, 8) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, lpClass, 8) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, lpClass, 72) - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, hkeyClass, 8) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, hkeyClass, 8) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, hkeyClass, 80) - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, dwHotKey, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, dwHotKey, 4) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, dwHotKey, 88) -} - -static void test_pack_SHELLEXECUTEINFOW(void) -{ - /* SHELLEXECUTEINFOW */ - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, cbSize, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, cbSize, 4) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, cbSize, 0) - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, fMask, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, fMask, 4) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, fMask, 4) - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, hwnd, 8) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, hwnd, 8) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, hwnd, 8) - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, lpVerb, 8) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, lpVerb, 8) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, lpVerb, 16) - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, lpFile, 8) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, lpFile, 8) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, lpFile, 24) - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, lpParameters, 8) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, lpParameters, 8) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, lpParameters, 32) - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, lpDirectory, 8) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, lpDirectory, 8) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, lpDirectory, 40) - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, nShow, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, nShow, 4) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, nShow, 48) - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, hInstApp, 8) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, hInstApp, 8) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, hInstApp, 56) - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, lpIDList, 8) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, lpIDList, 8) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, lpIDList, 64) - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, lpClass, 8) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, lpClass, 8) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, lpClass, 72) - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, hkeyClass, 8) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, hkeyClass, 8) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, hkeyClass, 80) - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, dwHotKey, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, dwHotKey, 4) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, dwHotKey, 88) -} - -static void test_pack_SHFILEINFOA(void) -{ - /* SHFILEINFOA */ - TEST_TYPE_SIZE (SHFILEINFOA, 360) - TEST_TYPE_ALIGN (SHFILEINFOA, 8) - TEST_FIELD_SIZE (SHFILEINFOA, hIcon, 8) - TEST_FIELD_ALIGN (SHFILEINFOA, hIcon, 8) - TEST_FIELD_OFFSET(SHFILEINFOA, hIcon, 0) - TEST_FIELD_SIZE (SHFILEINFOA, iIcon, 4) - TEST_FIELD_ALIGN (SHFILEINFOA, iIcon, 4) - TEST_FIELD_OFFSET(SHFILEINFOA, iIcon, 8) - TEST_FIELD_SIZE (SHFILEINFOA, dwAttributes, 4) - TEST_FIELD_ALIGN (SHFILEINFOA, dwAttributes, 4) - TEST_FIELD_OFFSET(SHFILEINFOA, dwAttributes, 12) - TEST_FIELD_SIZE (SHFILEINFOA, szDisplayName, 260) - TEST_FIELD_ALIGN (SHFILEINFOA, szDisplayName, 1) - TEST_FIELD_OFFSET(SHFILEINFOA, szDisplayName, 16) - TEST_FIELD_SIZE (SHFILEINFOA, szTypeName, 80) - TEST_FIELD_ALIGN (SHFILEINFOA, szTypeName, 1) - TEST_FIELD_OFFSET(SHFILEINFOA, szTypeName, 276) -} - -static void test_pack_SHFILEINFOW(void) -{ - /* SHFILEINFOW */ - TEST_TYPE_SIZE (SHFILEINFOW, 696) - TEST_TYPE_ALIGN (SHFILEINFOW, 8) - TEST_FIELD_SIZE (SHFILEINFOW, hIcon, 8) - TEST_FIELD_ALIGN (SHFILEINFOW, hIcon, 8) - TEST_FIELD_OFFSET(SHFILEINFOW, hIcon, 0) - TEST_FIELD_SIZE (SHFILEINFOW, iIcon, 4) - TEST_FIELD_ALIGN (SHFILEINFOW, iIcon, 4) - TEST_FIELD_OFFSET(SHFILEINFOW, iIcon, 8) - TEST_FIELD_SIZE (SHFILEINFOW, dwAttributes, 4) - TEST_FIELD_ALIGN (SHFILEINFOW, dwAttributes, 4) - TEST_FIELD_OFFSET(SHFILEINFOW, dwAttributes, 12) - TEST_FIELD_SIZE (SHFILEINFOW, szDisplayName, 520) - TEST_FIELD_ALIGN (SHFILEINFOW, szDisplayName, 2) - TEST_FIELD_OFFSET(SHFILEINFOW, szDisplayName, 16) - TEST_FIELD_SIZE (SHFILEINFOW, szTypeName, 160) - TEST_FIELD_ALIGN (SHFILEINFOW, szTypeName, 2) - TEST_FIELD_OFFSET(SHFILEINFOW, szTypeName, 536) -} - -static void test_pack_SHFILEOPSTRUCTA(void) -{ - /* SHFILEOPSTRUCTA */ - TEST_TYPE_SIZE (SHFILEOPSTRUCTA, 56) - TEST_TYPE_ALIGN (SHFILEOPSTRUCTA, 8) - TEST_FIELD_SIZE (SHFILEOPSTRUCTA, hwnd, 8) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTA, hwnd, 8) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTA, hwnd, 0) - TEST_FIELD_SIZE (SHFILEOPSTRUCTA, wFunc, 4) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTA, wFunc, 4) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTA, wFunc, 8) - TEST_FIELD_SIZE (SHFILEOPSTRUCTA, pFrom, 8) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTA, pFrom, 8) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTA, pFrom, 16) - TEST_FIELD_SIZE (SHFILEOPSTRUCTA, pTo, 8) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTA, pTo, 8) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTA, pTo, 24) - TEST_FIELD_SIZE (SHFILEOPSTRUCTA, fFlags, 2) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTA, fFlags, 2) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTA, fFlags, 32) - TEST_FIELD_SIZE (SHFILEOPSTRUCTA, fAnyOperationsAborted, 4) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTA, fAnyOperationsAborted, 4) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTA, fAnyOperationsAborted, 36) - TEST_FIELD_SIZE (SHFILEOPSTRUCTA, hNameMappings, 8) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTA, hNameMappings, 8) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTA, hNameMappings, 40) - TEST_FIELD_SIZE (SHFILEOPSTRUCTA, lpszProgressTitle, 8) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTA, lpszProgressTitle, 8) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTA, lpszProgressTitle, 48) -} - -static void test_pack_SHFILEOPSTRUCTW(void) -{ - /* SHFILEOPSTRUCTW */ - TEST_TYPE_SIZE (SHFILEOPSTRUCTW, 56) - TEST_TYPE_ALIGN (SHFILEOPSTRUCTW, 8) - TEST_FIELD_SIZE (SHFILEOPSTRUCTW, hwnd, 8) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTW, hwnd, 8) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTW, hwnd, 0) - TEST_FIELD_SIZE (SHFILEOPSTRUCTW, wFunc, 4) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTW, wFunc, 4) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTW, wFunc, 8) - TEST_FIELD_SIZE (SHFILEOPSTRUCTW, pFrom, 8) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTW, pFrom, 8) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTW, pFrom, 16) - TEST_FIELD_SIZE (SHFILEOPSTRUCTW, pTo, 8) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTW, pTo, 8) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTW, pTo, 24) - TEST_FIELD_SIZE (SHFILEOPSTRUCTW, fFlags, 2) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTW, fFlags, 2) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTW, fFlags, 32) - TEST_FIELD_SIZE (SHFILEOPSTRUCTW, fAnyOperationsAborted, 4) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTW, fAnyOperationsAborted, 4) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTW, fAnyOperationsAborted, 36) - TEST_FIELD_SIZE (SHFILEOPSTRUCTW, hNameMappings, 8) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTW, hNameMappings, 8) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTW, hNameMappings, 40) - TEST_FIELD_SIZE (SHFILEOPSTRUCTW, lpszProgressTitle, 8) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTW, lpszProgressTitle, 8) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTW, lpszProgressTitle, 48) -} - -static void test_pack_SHNAMEMAPPINGA(void) -{ - /* SHNAMEMAPPINGA */ - TEST_TYPE_SIZE (SHNAMEMAPPINGA, 24) - TEST_TYPE_ALIGN (SHNAMEMAPPINGA, 8) - TEST_FIELD_SIZE (SHNAMEMAPPINGA, pszOldPath, 8) - TEST_FIELD_ALIGN (SHNAMEMAPPINGA, pszOldPath, 8) - TEST_FIELD_OFFSET(SHNAMEMAPPINGA, pszOldPath, 0) - TEST_FIELD_SIZE (SHNAMEMAPPINGA, pszNewPath, 8) - TEST_FIELD_ALIGN (SHNAMEMAPPINGA, pszNewPath, 8) - TEST_FIELD_OFFSET(SHNAMEMAPPINGA, pszNewPath, 8) - TEST_FIELD_SIZE (SHNAMEMAPPINGA, cchOldPath, 4) - TEST_FIELD_ALIGN (SHNAMEMAPPINGA, cchOldPath, 4) - TEST_FIELD_OFFSET(SHNAMEMAPPINGA, cchOldPath, 16) - TEST_FIELD_SIZE (SHNAMEMAPPINGA, cchNewPath, 4) - TEST_FIELD_ALIGN (SHNAMEMAPPINGA, cchNewPath, 4) - TEST_FIELD_OFFSET(SHNAMEMAPPINGA, cchNewPath, 20) -} - -static void test_pack_SHNAMEMAPPINGW(void) -{ - /* SHNAMEMAPPINGW */ - TEST_TYPE_SIZE (SHNAMEMAPPINGW, 24) - TEST_TYPE_ALIGN (SHNAMEMAPPINGW, 8) - TEST_FIELD_SIZE (SHNAMEMAPPINGW, pszOldPath, 8) - TEST_FIELD_ALIGN (SHNAMEMAPPINGW, pszOldPath, 8) - TEST_FIELD_OFFSET(SHNAMEMAPPINGW, pszOldPath, 0) - TEST_FIELD_SIZE (SHNAMEMAPPINGW, pszNewPath, 8) - TEST_FIELD_ALIGN (SHNAMEMAPPINGW, pszNewPath, 8) - TEST_FIELD_OFFSET(SHNAMEMAPPINGW, pszNewPath, 8) - TEST_FIELD_SIZE (SHNAMEMAPPINGW, cchOldPath, 4) - TEST_FIELD_ALIGN (SHNAMEMAPPINGW, cchOldPath, 4) - TEST_FIELD_OFFSET(SHNAMEMAPPINGW, cchOldPath, 16) - TEST_FIELD_SIZE (SHNAMEMAPPINGW, cchNewPath, 4) - TEST_FIELD_ALIGN (SHNAMEMAPPINGW, cchNewPath, 4) - TEST_FIELD_OFFSET(SHNAMEMAPPINGW, cchNewPath, 20) -} - -static void test_pack_ITEMIDLIST(void) -{ - /* ITEMIDLIST (pack 1) */ - TEST_TYPE_SIZE (ITEMIDLIST, 3) - TEST_TYPE_ALIGN (ITEMIDLIST, 1) - TEST_FIELD_SIZE (ITEMIDLIST, mkid, 3) - TEST_FIELD_ALIGN (ITEMIDLIST, mkid, 1) - TEST_FIELD_OFFSET(ITEMIDLIST, mkid, 0) -} - -static void test_pack_LPCITEMIDLIST(void) -{ - /* LPCITEMIDLIST */ - TEST_TYPE_SIZE (LPCITEMIDLIST, 8) - TEST_TYPE_ALIGN (LPCITEMIDLIST, 8) - TEST_TARGET_SIZE (LPCITEMIDLIST, 3) - TEST_TARGET_ALIGN(LPCITEMIDLIST, 1) -} - -static void test_pack_LPCSHITEMID(void) -{ - /* LPCSHITEMID */ - TEST_TYPE_SIZE (LPCSHITEMID, 8) - TEST_TYPE_ALIGN (LPCSHITEMID, 8) - TEST_TARGET_SIZE (LPCSHITEMID, 3) - TEST_TARGET_ALIGN(LPCSHITEMID, 1) -} - -static void test_pack_LPITEMIDLIST(void) -{ - /* LPITEMIDLIST */ - TEST_TYPE_SIZE (LPITEMIDLIST, 8) - TEST_TYPE_ALIGN (LPITEMIDLIST, 8) -} - -static void test_pack_LPSHELLDETAILS(void) -{ - /* LPSHELLDETAILS */ - TEST_TYPE_SIZE (LPSHELLDETAILS, 8) - TEST_TYPE_ALIGN (LPSHELLDETAILS, 8) -} - -static void test_pack_LPSHITEMID(void) -{ - /* LPSHITEMID */ - TEST_TYPE_SIZE (LPSHITEMID, 8) - TEST_TYPE_ALIGN (LPSHITEMID, 8) -} - -static void test_pack_LPSTRRET(void) -{ - /* LPSTRRET */ - TEST_TYPE_SIZE (LPSTRRET, 8) - TEST_TYPE_ALIGN (LPSTRRET, 8) -} - -static void test_pack_SHELLDETAILS(void) -{ - /* SHELLDETAILS (pack 1) */ - TEST_FIELD_SIZE (SHELLDETAILS, fmt, 4) - TEST_FIELD_ALIGN (SHELLDETAILS, fmt, 1) - TEST_FIELD_OFFSET(SHELLDETAILS, fmt, 0) - TEST_FIELD_SIZE (SHELLDETAILS, cxChar, 4) - TEST_FIELD_ALIGN (SHELLDETAILS, cxChar, 1) - TEST_FIELD_OFFSET(SHELLDETAILS, cxChar, 4) -} - -static void test_pack_SHITEMID(void) -{ - /* SHITEMID (pack 1) */ - TEST_TYPE_SIZE (SHITEMID, 3) - TEST_TYPE_ALIGN (SHITEMID, 1) - TEST_FIELD_SIZE (SHITEMID, cb, 2) - TEST_FIELD_ALIGN (SHITEMID, cb, 1) - TEST_FIELD_OFFSET(SHITEMID, cb, 0) - TEST_FIELD_SIZE (SHITEMID, abID, 1) - TEST_FIELD_ALIGN (SHITEMID, abID, 1) - TEST_FIELD_OFFSET(SHITEMID, abID, 2) -} - -static void test_pack_STRRET(void) -{ - /* STRRET (pack 8) */ - TEST_FIELD_SIZE (STRRET, uType, 4) - TEST_FIELD_ALIGN (STRRET, uType, 4) - TEST_FIELD_OFFSET(STRRET, uType, 0) -} - -static void test_pack_AUTO_SCROLL_DATA(void) -{ - /* AUTO_SCROLL_DATA (pack 1) */ - TEST_TYPE_SIZE (AUTO_SCROLL_DATA, 48) - TEST_TYPE_ALIGN (AUTO_SCROLL_DATA, 1) - TEST_FIELD_SIZE (AUTO_SCROLL_DATA, iNextSample, 4) - TEST_FIELD_ALIGN (AUTO_SCROLL_DATA, iNextSample, 1) - TEST_FIELD_OFFSET(AUTO_SCROLL_DATA, iNextSample, 0) - TEST_FIELD_SIZE (AUTO_SCROLL_DATA, dwLastScroll, 4) - TEST_FIELD_ALIGN (AUTO_SCROLL_DATA, dwLastScroll, 1) - TEST_FIELD_OFFSET(AUTO_SCROLL_DATA, dwLastScroll, 4) - TEST_FIELD_SIZE (AUTO_SCROLL_DATA, bFull, 4) - TEST_FIELD_ALIGN (AUTO_SCROLL_DATA, bFull, 1) - TEST_FIELD_OFFSET(AUTO_SCROLL_DATA, bFull, 8) - TEST_FIELD_SIZE (AUTO_SCROLL_DATA, pts, 24) - TEST_FIELD_ALIGN (AUTO_SCROLL_DATA, pts, 1) - TEST_FIELD_OFFSET(AUTO_SCROLL_DATA, pts, 12) - TEST_FIELD_SIZE (AUTO_SCROLL_DATA, dwTimes, 12) - TEST_FIELD_ALIGN (AUTO_SCROLL_DATA, dwTimes, 1) - TEST_FIELD_OFFSET(AUTO_SCROLL_DATA, dwTimes, 36) -} - -static void test_pack_BFFCALLBACK(void) -{ - /* BFFCALLBACK */ - TEST_TYPE_SIZE (BFFCALLBACK, 8) - TEST_TYPE_ALIGN (BFFCALLBACK, 8) -} - -static void test_pack_BROWSEINFOA(void) -{ - /* BROWSEINFOA (pack 8) */ - TEST_TYPE_SIZE (BROWSEINFOA, 64) - TEST_TYPE_ALIGN (BROWSEINFOA, 8) - TEST_FIELD_SIZE (BROWSEINFOA, hwndOwner, 8) - TEST_FIELD_ALIGN (BROWSEINFOA, hwndOwner, 8) - TEST_FIELD_OFFSET(BROWSEINFOA, hwndOwner, 0) - TEST_FIELD_SIZE (BROWSEINFOA, pidlRoot, 8) - TEST_FIELD_ALIGN (BROWSEINFOA, pidlRoot, 8) - TEST_FIELD_OFFSET(BROWSEINFOA, pidlRoot, 8) - TEST_FIELD_SIZE (BROWSEINFOA, pszDisplayName, 8) - TEST_FIELD_ALIGN (BROWSEINFOA, pszDisplayName, 8) - TEST_FIELD_OFFSET(BROWSEINFOA, pszDisplayName, 16) - TEST_FIELD_SIZE (BROWSEINFOA, lpszTitle, 8) - TEST_FIELD_ALIGN (BROWSEINFOA, lpszTitle, 8) - TEST_FIELD_OFFSET(BROWSEINFOA, lpszTitle, 24) - TEST_FIELD_SIZE (BROWSEINFOA, ulFlags, 4) - TEST_FIELD_ALIGN (BROWSEINFOA, ulFlags, 4) - TEST_FIELD_OFFSET(BROWSEINFOA, ulFlags, 32) - TEST_FIELD_SIZE (BROWSEINFOA, lpfn, 8) - TEST_FIELD_ALIGN (BROWSEINFOA, lpfn, 8) - TEST_FIELD_OFFSET(BROWSEINFOA, lpfn, 40) - TEST_FIELD_SIZE (BROWSEINFOA, lParam, 8) - TEST_FIELD_ALIGN (BROWSEINFOA, lParam, 8) - TEST_FIELD_OFFSET(BROWSEINFOA, lParam, 48) - TEST_FIELD_SIZE (BROWSEINFOA, iImage, 4) - TEST_FIELD_ALIGN (BROWSEINFOA, iImage, 4) - TEST_FIELD_OFFSET(BROWSEINFOA, iImage, 56) -} - -static void test_pack_BROWSEINFOW(void) -{ - /* BROWSEINFOW (pack 8) */ - TEST_TYPE_SIZE (BROWSEINFOW, 64) - TEST_TYPE_ALIGN (BROWSEINFOW, 8) - TEST_FIELD_SIZE (BROWSEINFOW, hwndOwner, 8) - TEST_FIELD_ALIGN (BROWSEINFOW, hwndOwner, 8) - TEST_FIELD_OFFSET(BROWSEINFOW, hwndOwner, 0) - TEST_FIELD_SIZE (BROWSEINFOW, pidlRoot, 8) - TEST_FIELD_ALIGN (BROWSEINFOW, pidlRoot, 8) - TEST_FIELD_OFFSET(BROWSEINFOW, pidlRoot, 8) - TEST_FIELD_SIZE (BROWSEINFOW, pszDisplayName, 8) - TEST_FIELD_ALIGN (BROWSEINFOW, pszDisplayName, 8) - TEST_FIELD_OFFSET(BROWSEINFOW, pszDisplayName, 16) - TEST_FIELD_SIZE (BROWSEINFOW, lpszTitle, 8) - TEST_FIELD_ALIGN (BROWSEINFOW, lpszTitle, 8) - TEST_FIELD_OFFSET(BROWSEINFOW, lpszTitle, 24) - TEST_FIELD_SIZE (BROWSEINFOW, ulFlags, 4) - TEST_FIELD_ALIGN (BROWSEINFOW, ulFlags, 4) - TEST_FIELD_OFFSET(BROWSEINFOW, ulFlags, 32) - TEST_FIELD_SIZE (BROWSEINFOW, lpfn, 8) - TEST_FIELD_ALIGN (BROWSEINFOW, lpfn, 8) - TEST_FIELD_OFFSET(BROWSEINFOW, lpfn, 40) - TEST_FIELD_SIZE (BROWSEINFOW, lParam, 8) - TEST_FIELD_ALIGN (BROWSEINFOW, lParam, 8) - TEST_FIELD_OFFSET(BROWSEINFOW, lParam, 48) - TEST_FIELD_SIZE (BROWSEINFOW, iImage, 4) - TEST_FIELD_ALIGN (BROWSEINFOW, iImage, 4) - TEST_FIELD_OFFSET(BROWSEINFOW, iImage, 56) -} - -static void test_pack_CABINETSTATE(void) -{ - /* CABINETSTATE (pack 1) */ - TEST_TYPE_SIZE (CABINETSTATE, 12) - TEST_TYPE_ALIGN (CABINETSTATE, 1) - TEST_FIELD_SIZE (CABINETSTATE, cLength, 2) - TEST_FIELD_ALIGN (CABINETSTATE, cLength, 1) - TEST_FIELD_OFFSET(CABINETSTATE, cLength, 0) - TEST_FIELD_SIZE (CABINETSTATE, nVersion, 2) - TEST_FIELD_ALIGN (CABINETSTATE, nVersion, 1) - TEST_FIELD_OFFSET(CABINETSTATE, nVersion, 2) - TEST_FIELD_SIZE (CABINETSTATE, fMenuEnumFilter, 4) - TEST_FIELD_ALIGN (CABINETSTATE, fMenuEnumFilter, 1) - TEST_FIELD_OFFSET(CABINETSTATE, fMenuEnumFilter, 8) -} - -static void test_pack_CIDA(void) -{ - /* CIDA (pack 1) */ - TEST_TYPE_SIZE (CIDA, 8) - TEST_TYPE_ALIGN (CIDA, 1) - TEST_FIELD_SIZE (CIDA, cidl, 4) - TEST_FIELD_ALIGN (CIDA, cidl, 1) - TEST_FIELD_OFFSET(CIDA, cidl, 0) - TEST_FIELD_SIZE (CIDA, aoffset, 4) - TEST_FIELD_ALIGN (CIDA, aoffset, 1) - TEST_FIELD_OFFSET(CIDA, aoffset, 4) -} - -static void test_pack_CSFV(void) -{ - /* CSFV (pack 8) */ - TEST_FIELD_SIZE (CSFV, cbSize, 4) - TEST_FIELD_ALIGN (CSFV, cbSize, 4) - TEST_FIELD_OFFSET(CSFV, cbSize, 0) - TEST_FIELD_SIZE (CSFV, pshf, 8) - TEST_FIELD_ALIGN (CSFV, pshf, 8) - TEST_FIELD_OFFSET(CSFV, pshf, 8) - TEST_FIELD_SIZE (CSFV, psvOuter, 8) - TEST_FIELD_ALIGN (CSFV, psvOuter, 8) - TEST_FIELD_OFFSET(CSFV, psvOuter, 16) - TEST_FIELD_SIZE (CSFV, pidl, 8) - TEST_FIELD_ALIGN (CSFV, pidl, 8) - TEST_FIELD_OFFSET(CSFV, pidl, 24) - TEST_FIELD_SIZE (CSFV, lEvents, 4) - TEST_FIELD_ALIGN (CSFV, lEvents, 4) - TEST_FIELD_OFFSET(CSFV, lEvents, 32) - TEST_FIELD_SIZE (CSFV, pfnCallback, 8) - TEST_FIELD_ALIGN (CSFV, pfnCallback, 8) - TEST_FIELD_OFFSET(CSFV, pfnCallback, 40) -} - -static void test_pack_DROPFILES(void) -{ - /* DROPFILES (pack 1) */ - TEST_TYPE_SIZE (DROPFILES, 20) - TEST_TYPE_ALIGN (DROPFILES, 1) - TEST_FIELD_SIZE (DROPFILES, pFiles, 4) - TEST_FIELD_ALIGN (DROPFILES, pFiles, 1) - TEST_FIELD_OFFSET(DROPFILES, pFiles, 0) - TEST_FIELD_SIZE (DROPFILES, pt, 8) - TEST_FIELD_ALIGN (DROPFILES, pt, 1) - TEST_FIELD_OFFSET(DROPFILES, pt, 4) - TEST_FIELD_SIZE (DROPFILES, fNC, 4) - TEST_FIELD_ALIGN (DROPFILES, fNC, 1) - TEST_FIELD_OFFSET(DROPFILES, fNC, 12) - TEST_FIELD_SIZE (DROPFILES, fWide, 4) - TEST_FIELD_ALIGN (DROPFILES, fWide, 1) - TEST_FIELD_OFFSET(DROPFILES, fWide, 16) -} - -static void test_pack_FILEDESCRIPTORA(void) -{ - /* FILEDESCRIPTORA (pack 1) */ - TEST_TYPE_SIZE (FILEDESCRIPTORA, 332) - TEST_TYPE_ALIGN (FILEDESCRIPTORA, 1) - TEST_FIELD_SIZE (FILEDESCRIPTORA, dwFlags, 4) - TEST_FIELD_ALIGN (FILEDESCRIPTORA, dwFlags, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORA, dwFlags, 0) - TEST_FIELD_SIZE (FILEDESCRIPTORA, clsid, 16) - TEST_FIELD_ALIGN (FILEDESCRIPTORA, clsid, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORA, clsid, 4) - TEST_FIELD_SIZE (FILEDESCRIPTORA, sizel, 8) - TEST_FIELD_ALIGN (FILEDESCRIPTORA, sizel, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORA, sizel, 20) - TEST_FIELD_SIZE (FILEDESCRIPTORA, pointl, 8) - TEST_FIELD_ALIGN (FILEDESCRIPTORA, pointl, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORA, pointl, 28) - TEST_FIELD_SIZE (FILEDESCRIPTORA, dwFileAttributes, 4) - TEST_FIELD_ALIGN (FILEDESCRIPTORA, dwFileAttributes, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORA, dwFileAttributes, 36) - TEST_FIELD_SIZE (FILEDESCRIPTORA, ftCreationTime, 8) - TEST_FIELD_ALIGN (FILEDESCRIPTORA, ftCreationTime, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORA, ftCreationTime, 40) - TEST_FIELD_SIZE (FILEDESCRIPTORA, ftLastAccessTime, 8) - TEST_FIELD_ALIGN (FILEDESCRIPTORA, ftLastAccessTime, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORA, ftLastAccessTime, 48) - TEST_FIELD_SIZE (FILEDESCRIPTORA, ftLastWriteTime, 8) - TEST_FIELD_ALIGN (FILEDESCRIPTORA, ftLastWriteTime, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORA, ftLastWriteTime, 56) - TEST_FIELD_SIZE (FILEDESCRIPTORA, nFileSizeHigh, 4) - TEST_FIELD_ALIGN (FILEDESCRIPTORA, nFileSizeHigh, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORA, nFileSizeHigh, 64) - TEST_FIELD_SIZE (FILEDESCRIPTORA, nFileSizeLow, 4) - TEST_FIELD_ALIGN (FILEDESCRIPTORA, nFileSizeLow, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORA, nFileSizeLow, 68) - TEST_FIELD_SIZE (FILEDESCRIPTORA, cFileName, 260) - TEST_FIELD_ALIGN (FILEDESCRIPTORA, cFileName, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORA, cFileName, 72) -} - -static void test_pack_FILEDESCRIPTORW(void) -{ - /* FILEDESCRIPTORW (pack 1) */ - TEST_TYPE_SIZE (FILEDESCRIPTORW, 592) - TEST_TYPE_ALIGN (FILEDESCRIPTORW, 1) - TEST_FIELD_SIZE (FILEDESCRIPTORW, dwFlags, 4) - TEST_FIELD_ALIGN (FILEDESCRIPTORW, dwFlags, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORW, dwFlags, 0) - TEST_FIELD_SIZE (FILEDESCRIPTORW, clsid, 16) - TEST_FIELD_ALIGN (FILEDESCRIPTORW, clsid, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORW, clsid, 4) - TEST_FIELD_SIZE (FILEDESCRIPTORW, sizel, 8) - TEST_FIELD_ALIGN (FILEDESCRIPTORW, sizel, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORW, sizel, 20) - TEST_FIELD_SIZE (FILEDESCRIPTORW, pointl, 8) - TEST_FIELD_ALIGN (FILEDESCRIPTORW, pointl, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORW, pointl, 28) - TEST_FIELD_SIZE (FILEDESCRIPTORW, dwFileAttributes, 4) - TEST_FIELD_ALIGN (FILEDESCRIPTORW, dwFileAttributes, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORW, dwFileAttributes, 36) - TEST_FIELD_SIZE (FILEDESCRIPTORW, ftCreationTime, 8) - TEST_FIELD_ALIGN (FILEDESCRIPTORW, ftCreationTime, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORW, ftCreationTime, 40) - TEST_FIELD_SIZE (FILEDESCRIPTORW, ftLastAccessTime, 8) - TEST_FIELD_ALIGN (FILEDESCRIPTORW, ftLastAccessTime, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORW, ftLastAccessTime, 48) - TEST_FIELD_SIZE (FILEDESCRIPTORW, ftLastWriteTime, 8) - TEST_FIELD_ALIGN (FILEDESCRIPTORW, ftLastWriteTime, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORW, ftLastWriteTime, 56) - TEST_FIELD_SIZE (FILEDESCRIPTORW, nFileSizeHigh, 4) - TEST_FIELD_ALIGN (FILEDESCRIPTORW, nFileSizeHigh, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORW, nFileSizeHigh, 64) - TEST_FIELD_SIZE (FILEDESCRIPTORW, nFileSizeLow, 4) - TEST_FIELD_ALIGN (FILEDESCRIPTORW, nFileSizeLow, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORW, nFileSizeLow, 68) - TEST_FIELD_SIZE (FILEDESCRIPTORW, cFileName, 520) - TEST_FIELD_ALIGN (FILEDESCRIPTORW, cFileName, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORW, cFileName, 72) -} - -static void test_pack_FILEGROUPDESCRIPTORA(void) -{ - /* FILEGROUPDESCRIPTORA (pack 1) */ - TEST_TYPE_SIZE (FILEGROUPDESCRIPTORA, 336) - TEST_TYPE_ALIGN (FILEGROUPDESCRIPTORA, 1) - TEST_FIELD_SIZE (FILEGROUPDESCRIPTORA, cItems, 4) - TEST_FIELD_ALIGN (FILEGROUPDESCRIPTORA, cItems, 1) - TEST_FIELD_OFFSET(FILEGROUPDESCRIPTORA, cItems, 0) - TEST_FIELD_SIZE (FILEGROUPDESCRIPTORA, fgd, 332) - TEST_FIELD_ALIGN (FILEGROUPDESCRIPTORA, fgd, 1) - TEST_FIELD_OFFSET(FILEGROUPDESCRIPTORA, fgd, 4) -} - -static void test_pack_FILEGROUPDESCRIPTORW(void) -{ - /* FILEGROUPDESCRIPTORW (pack 1) */ - TEST_TYPE_SIZE (FILEGROUPDESCRIPTORW, 596) - TEST_TYPE_ALIGN (FILEGROUPDESCRIPTORW, 1) - TEST_FIELD_SIZE (FILEGROUPDESCRIPTORW, cItems, 4) - TEST_FIELD_ALIGN (FILEGROUPDESCRIPTORW, cItems, 1) - TEST_FIELD_OFFSET(FILEGROUPDESCRIPTORW, cItems, 0) - TEST_FIELD_SIZE (FILEGROUPDESCRIPTORW, fgd, 592) - TEST_FIELD_ALIGN (FILEGROUPDESCRIPTORW, fgd, 1) - TEST_FIELD_OFFSET(FILEGROUPDESCRIPTORW, fgd, 4) -} - -static void test_pack_ITEMSPACING(void) -{ - /* ITEMSPACING (pack 8) */ - TEST_TYPE_SIZE (ITEMSPACING, 16) - TEST_TYPE_ALIGN (ITEMSPACING, 4) - TEST_FIELD_SIZE (ITEMSPACING, cxSmall, 4) - TEST_FIELD_ALIGN (ITEMSPACING, cxSmall, 4) - TEST_FIELD_OFFSET(ITEMSPACING, cxSmall, 0) - TEST_FIELD_SIZE (ITEMSPACING, cySmall, 4) - TEST_FIELD_ALIGN (ITEMSPACING, cySmall, 4) - TEST_FIELD_OFFSET(ITEMSPACING, cySmall, 4) - TEST_FIELD_SIZE (ITEMSPACING, cxLarge, 4) - TEST_FIELD_ALIGN (ITEMSPACING, cxLarge, 4) - TEST_FIELD_OFFSET(ITEMSPACING, cxLarge, 8) - TEST_FIELD_SIZE (ITEMSPACING, cyLarge, 4) - TEST_FIELD_ALIGN (ITEMSPACING, cyLarge, 4) - TEST_FIELD_OFFSET(ITEMSPACING, cyLarge, 12) -} - -static void test_pack_LPBROWSEINFOA(void) -{ - /* LPBROWSEINFOA */ - TEST_TYPE_SIZE (LPBROWSEINFOA, 8) - TEST_TYPE_ALIGN (LPBROWSEINFOA, 8) - TEST_TARGET_SIZE (LPBROWSEINFOA, 64) - TEST_TARGET_ALIGN(LPBROWSEINFOA, 8) -} - -static void test_pack_LPBROWSEINFOW(void) -{ - /* LPBROWSEINFOW */ - TEST_TYPE_SIZE (LPBROWSEINFOW, 8) - TEST_TYPE_ALIGN (LPBROWSEINFOW, 8) - TEST_TARGET_SIZE (LPBROWSEINFOW, 64) - TEST_TARGET_ALIGN(LPBROWSEINFOW, 8) -} - -static void test_pack_LPCABINETSTATE(void) -{ - /* LPCABINETSTATE */ - TEST_TYPE_SIZE (LPCABINETSTATE, 8) - TEST_TYPE_ALIGN (LPCABINETSTATE, 8) - TEST_TARGET_SIZE (LPCABINETSTATE, 12) - TEST_TARGET_ALIGN(LPCABINETSTATE, 1) -} - -static void test_pack_LPCSFV(void) -{ - /* LPCSFV */ - TEST_TYPE_SIZE (LPCSFV, 8) - TEST_TYPE_ALIGN (LPCSFV, 8) -} - -static void test_pack_LPDROPFILES(void) -{ - /* LPDROPFILES */ - TEST_TYPE_SIZE (LPDROPFILES, 8) - TEST_TYPE_ALIGN (LPDROPFILES, 8) - TEST_TARGET_SIZE (LPDROPFILES, 20) - TEST_TARGET_ALIGN(LPDROPFILES, 1) -} - -static void test_pack_LPFILEDESCRIPTORA(void) -{ - /* LPFILEDESCRIPTORA */ - TEST_TYPE_SIZE (LPFILEDESCRIPTORA, 8) - TEST_TYPE_ALIGN (LPFILEDESCRIPTORA, 8) - TEST_TARGET_SIZE (LPFILEDESCRIPTORA, 332) - TEST_TARGET_ALIGN(LPFILEDESCRIPTORA, 1) -} - -static void test_pack_LPFILEDESCRIPTORW(void) -{ - /* LPFILEDESCRIPTORW */ - TEST_TYPE_SIZE (LPFILEDESCRIPTORW, 8) - TEST_TYPE_ALIGN (LPFILEDESCRIPTORW, 8) - TEST_TARGET_SIZE (LPFILEDESCRIPTORW, 592) - TEST_TARGET_ALIGN(LPFILEDESCRIPTORW, 1) -} - -static void test_pack_LPFILEGROUPDESCRIPTORA(void) -{ - /* LPFILEGROUPDESCRIPTORA */ - TEST_TYPE_SIZE (LPFILEGROUPDESCRIPTORA, 8) - TEST_TYPE_ALIGN (LPFILEGROUPDESCRIPTORA, 8) - TEST_TARGET_SIZE (LPFILEGROUPDESCRIPTORA, 336) - TEST_TARGET_ALIGN(LPFILEGROUPDESCRIPTORA, 1) -} - -static void test_pack_LPFILEGROUPDESCRIPTORW(void) -{ - /* LPFILEGROUPDESCRIPTORW */ - TEST_TYPE_SIZE (LPFILEGROUPDESCRIPTORW, 8) - TEST_TYPE_ALIGN (LPFILEGROUPDESCRIPTORW, 8) - TEST_TARGET_SIZE (LPFILEGROUPDESCRIPTORW, 596) - TEST_TARGET_ALIGN(LPFILEGROUPDESCRIPTORW, 1) -} - -static void test_pack_LPFNVIEWCALLBACK(void) -{ - /* LPFNVIEWCALLBACK */ - TEST_TYPE_SIZE (LPFNVIEWCALLBACK, 8) - TEST_TYPE_ALIGN (LPFNVIEWCALLBACK, 8) -} - -static void test_pack_LPIDA(void) -{ - /* LPIDA */ - TEST_TYPE_SIZE (LPIDA, 8) - TEST_TYPE_ALIGN (LPIDA, 8) - TEST_TARGET_SIZE (LPIDA, 8) - TEST_TARGET_ALIGN(LPIDA, 1) -} - -static void test_pack_LPQCMINFO(void) -{ - /* LPQCMINFO */ - TEST_TYPE_SIZE (LPQCMINFO, 8) - TEST_TYPE_ALIGN (LPQCMINFO, 8) - TEST_TARGET_SIZE (LPQCMINFO, 32) - TEST_TARGET_ALIGN(LPQCMINFO, 8) -} - -static void test_pack_LPSHChangeDWORDAsIDList(void) -{ - /* LPSHChangeDWORDAsIDList */ - TEST_TYPE_SIZE (LPSHChangeDWORDAsIDList, 8) - TEST_TYPE_ALIGN (LPSHChangeDWORDAsIDList, 8) - TEST_TARGET_SIZE (LPSHChangeDWORDAsIDList, 12) - TEST_TARGET_ALIGN(LPSHChangeDWORDAsIDList, 1) -} - -static void test_pack_LPSHChangeProductKeyAsIDList(void) -{ - /* LPSHChangeProductKeyAsIDList */ - TEST_TYPE_SIZE (LPSHChangeProductKeyAsIDList, 8) - TEST_TYPE_ALIGN (LPSHChangeProductKeyAsIDList, 8) - TEST_TARGET_SIZE (LPSHChangeProductKeyAsIDList, 82) - TEST_TARGET_ALIGN(LPSHChangeProductKeyAsIDList, 1) -} - -static void test_pack_LPSHDESCRIPTIONID(void) -{ - /* LPSHDESCRIPTIONID */ - TEST_TYPE_SIZE (LPSHDESCRIPTIONID, 8) - TEST_TYPE_ALIGN (LPSHDESCRIPTIONID, 8) - TEST_TARGET_SIZE (LPSHDESCRIPTIONID, 20) - TEST_TARGET_ALIGN(LPSHDESCRIPTIONID, 4) -} - -static void test_pack_LPSHELLFLAGSTATE(void) -{ - /* LPSHELLFLAGSTATE */ - TEST_TYPE_SIZE (LPSHELLFLAGSTATE, 8) - TEST_TYPE_ALIGN (LPSHELLFLAGSTATE, 8) - TEST_TARGET_SIZE (LPSHELLFLAGSTATE, 4) - TEST_TARGET_ALIGN(LPSHELLFLAGSTATE, 1) -} - -static void test_pack_LPSHELLSTATE(void) -{ - /* LPSHELLSTATE */ - TEST_TYPE_SIZE (LPSHELLSTATE, 8) - TEST_TYPE_ALIGN (LPSHELLSTATE, 8) - TEST_TARGET_SIZE (LPSHELLSTATE, 32) - TEST_TARGET_ALIGN(LPSHELLSTATE, 1) -} - -static void test_pack_LPTBINFO(void) -{ - /* LPTBINFO */ - TEST_TYPE_SIZE (LPTBINFO, 8) - TEST_TYPE_ALIGN (LPTBINFO, 8) - TEST_TARGET_SIZE (LPTBINFO, 8) - TEST_TARGET_ALIGN(LPTBINFO, 4) -} - -static void test_pack_PBROWSEINFOA(void) -{ - /* PBROWSEINFOA */ - TEST_TYPE_SIZE (PBROWSEINFOA, 8) - TEST_TYPE_ALIGN (PBROWSEINFOA, 8) - TEST_TARGET_SIZE (PBROWSEINFOA, 64) - TEST_TARGET_ALIGN(PBROWSEINFOA, 8) -} - -static void test_pack_PBROWSEINFOW(void) -{ - /* PBROWSEINFOW */ - TEST_TYPE_SIZE (PBROWSEINFOW, 8) - TEST_TYPE_ALIGN (PBROWSEINFOW, 8) - TEST_TARGET_SIZE (PBROWSEINFOW, 64) - TEST_TARGET_ALIGN(PBROWSEINFOW, 8) -} - -static void test_pack_QCMINFO(void) -{ - /* QCMINFO (pack 8) */ - TEST_TYPE_SIZE (QCMINFO, 32) - TEST_TYPE_ALIGN (QCMINFO, 8) - TEST_FIELD_SIZE (QCMINFO, hmenu, 8) - TEST_FIELD_ALIGN (QCMINFO, hmenu, 8) - TEST_FIELD_OFFSET(QCMINFO, hmenu, 0) - TEST_FIELD_SIZE (QCMINFO, indexMenu, 4) - TEST_FIELD_ALIGN (QCMINFO, indexMenu, 4) - TEST_FIELD_OFFSET(QCMINFO, indexMenu, 8) - TEST_FIELD_SIZE (QCMINFO, idCmdFirst, 4) - TEST_FIELD_ALIGN (QCMINFO, idCmdFirst, 4) - TEST_FIELD_OFFSET(QCMINFO, idCmdFirst, 12) - TEST_FIELD_SIZE (QCMINFO, idCmdLast, 4) - TEST_FIELD_ALIGN (QCMINFO, idCmdLast, 4) - TEST_FIELD_OFFSET(QCMINFO, idCmdLast, 16) - TEST_FIELD_SIZE (QCMINFO, pIdMap, 8) - TEST_FIELD_ALIGN (QCMINFO, pIdMap, 8) - TEST_FIELD_OFFSET(QCMINFO, pIdMap, 24) -} - -static void test_pack_QCMINFO_IDMAP(void) -{ - /* QCMINFO_IDMAP (pack 8) */ - TEST_TYPE_SIZE (QCMINFO_IDMAP, 12) - TEST_TYPE_ALIGN (QCMINFO_IDMAP, 4) - TEST_FIELD_SIZE (QCMINFO_IDMAP, nMaxIds, 4) - TEST_FIELD_ALIGN (QCMINFO_IDMAP, nMaxIds, 4) - TEST_FIELD_OFFSET(QCMINFO_IDMAP, nMaxIds, 0) - TEST_FIELD_SIZE (QCMINFO_IDMAP, pIdList, 8) - TEST_FIELD_ALIGN (QCMINFO_IDMAP, pIdList, 4) - TEST_FIELD_OFFSET(QCMINFO_IDMAP, pIdList, 4) -} - -static void test_pack_QCMINFO_IDMAP_PLACEMENT(void) -{ - /* QCMINFO_IDMAP_PLACEMENT (pack 8) */ - TEST_TYPE_SIZE (QCMINFO_IDMAP_PLACEMENT, 8) - TEST_TYPE_ALIGN (QCMINFO_IDMAP_PLACEMENT, 4) - TEST_FIELD_SIZE (QCMINFO_IDMAP_PLACEMENT, id, 4) - TEST_FIELD_ALIGN (QCMINFO_IDMAP_PLACEMENT, id, 4) - TEST_FIELD_OFFSET(QCMINFO_IDMAP_PLACEMENT, id, 0) - TEST_FIELD_SIZE (QCMINFO_IDMAP_PLACEMENT, fFlags, 4) - TEST_FIELD_ALIGN (QCMINFO_IDMAP_PLACEMENT, fFlags, 4) - TEST_FIELD_OFFSET(QCMINFO_IDMAP_PLACEMENT, fFlags, 4) -} - -static void test_pack_SFV_CREATE(void) -{ - /* SFV_CREATE (pack 8) */ - TEST_TYPE_SIZE (SFV_CREATE, 32) - TEST_TYPE_ALIGN (SFV_CREATE, 8) - TEST_FIELD_SIZE (SFV_CREATE, cbSize, 4) - TEST_FIELD_ALIGN (SFV_CREATE, cbSize, 4) - TEST_FIELD_OFFSET(SFV_CREATE, cbSize, 0) - TEST_FIELD_SIZE (SFV_CREATE, pshf, 8) - TEST_FIELD_ALIGN (SFV_CREATE, pshf, 8) - TEST_FIELD_OFFSET(SFV_CREATE, pshf, 8) - TEST_FIELD_SIZE (SFV_CREATE, psvOuter, 8) - TEST_FIELD_ALIGN (SFV_CREATE, psvOuter, 8) - TEST_FIELD_OFFSET(SFV_CREATE, psvOuter, 16) - TEST_FIELD_SIZE (SFV_CREATE, psfvcb, 8) - TEST_FIELD_ALIGN (SFV_CREATE, psfvcb, 8) - TEST_FIELD_OFFSET(SFV_CREATE, psfvcb, 24) -} - -static void test_pack_SHChangeDWORDAsIDList(void) -{ - /* SHChangeDWORDAsIDList (pack 1) */ - TEST_TYPE_SIZE (SHChangeDWORDAsIDList, 12) - TEST_TYPE_ALIGN (SHChangeDWORDAsIDList, 1) - TEST_FIELD_SIZE (SHChangeDWORDAsIDList, cb, 2) - TEST_FIELD_ALIGN (SHChangeDWORDAsIDList, cb, 1) - TEST_FIELD_OFFSET(SHChangeDWORDAsIDList, cb, 0) - TEST_FIELD_SIZE (SHChangeDWORDAsIDList, dwItem1, 4) - TEST_FIELD_ALIGN (SHChangeDWORDAsIDList, dwItem1, 1) - TEST_FIELD_OFFSET(SHChangeDWORDAsIDList, dwItem1, 2) - TEST_FIELD_SIZE (SHChangeDWORDAsIDList, dwItem2, 4) - TEST_FIELD_ALIGN (SHChangeDWORDAsIDList, dwItem2, 1) - TEST_FIELD_OFFSET(SHChangeDWORDAsIDList, dwItem2, 6) - TEST_FIELD_SIZE (SHChangeDWORDAsIDList, cbZero, 2) - TEST_FIELD_ALIGN (SHChangeDWORDAsIDList, cbZero, 1) - TEST_FIELD_OFFSET(SHChangeDWORDAsIDList, cbZero, 10) -} - -static void test_pack_SHChangeNotifyEntry(void) -{ - /* SHChangeNotifyEntry (pack 1) */ - TEST_TYPE_SIZE (SHChangeNotifyEntry, 12) - TEST_TYPE_ALIGN (SHChangeNotifyEntry, 1) - TEST_FIELD_SIZE (SHChangeNotifyEntry, pidl, 8) - TEST_FIELD_ALIGN (SHChangeNotifyEntry, pidl, 1) - TEST_FIELD_OFFSET(SHChangeNotifyEntry, pidl, 0) - TEST_FIELD_SIZE (SHChangeNotifyEntry, fRecursive, 4) - TEST_FIELD_ALIGN (SHChangeNotifyEntry, fRecursive, 1) - TEST_FIELD_OFFSET(SHChangeNotifyEntry, fRecursive, 8) -} - -static void test_pack_SHChangeProductKeyAsIDList(void) -{ - /* SHChangeProductKeyAsIDList (pack 1) */ - TEST_TYPE_SIZE (SHChangeProductKeyAsIDList, 82) - TEST_TYPE_ALIGN (SHChangeProductKeyAsIDList, 1) - TEST_FIELD_SIZE (SHChangeProductKeyAsIDList, cb, 2) - TEST_FIELD_ALIGN (SHChangeProductKeyAsIDList, cb, 1) - TEST_FIELD_OFFSET(SHChangeProductKeyAsIDList, cb, 0) - TEST_FIELD_SIZE (SHChangeProductKeyAsIDList, wszProductKey, 78) - TEST_FIELD_ALIGN (SHChangeProductKeyAsIDList, wszProductKey, 1) - TEST_FIELD_OFFSET(SHChangeProductKeyAsIDList, wszProductKey, 2) - TEST_FIELD_SIZE (SHChangeProductKeyAsIDList, cbZero, 2) - TEST_FIELD_ALIGN (SHChangeProductKeyAsIDList, cbZero, 1) - TEST_FIELD_OFFSET(SHChangeProductKeyAsIDList, cbZero, 80) -} - -static void test_pack_SHDESCRIPTIONID(void) -{ - /* SHDESCRIPTIONID (pack 8) */ - TEST_TYPE_SIZE (SHDESCRIPTIONID, 20) - TEST_TYPE_ALIGN (SHDESCRIPTIONID, 4) - TEST_FIELD_SIZE (SHDESCRIPTIONID, dwDescriptionId, 4) - TEST_FIELD_ALIGN (SHDESCRIPTIONID, dwDescriptionId, 4) - TEST_FIELD_OFFSET(SHDESCRIPTIONID, dwDescriptionId, 0) - TEST_FIELD_SIZE (SHDESCRIPTIONID, clsid, 16) - TEST_FIELD_ALIGN (SHDESCRIPTIONID, clsid, 4) - TEST_FIELD_OFFSET(SHDESCRIPTIONID, clsid, 4) -} - -static void test_pack_SHELLFLAGSTATE(void) -{ - /* SHELLFLAGSTATE (pack 1) */ - TEST_TYPE_SIZE (SHELLFLAGSTATE, 4) - TEST_TYPE_ALIGN (SHELLFLAGSTATE, 1) -} - -static void test_pack_SHELLSTATE(void) -{ - /* SHELLSTATE (pack 1) */ - TEST_TYPE_SIZE (SHELLSTATE, 32) - TEST_TYPE_ALIGN (SHELLSTATE, 1) - TEST_FIELD_SIZE (SHELLSTATE, dwWin95Unused, 4) - TEST_FIELD_ALIGN (SHELLSTATE, dwWin95Unused, 1) - TEST_FIELD_OFFSET(SHELLSTATE, dwWin95Unused, 4) - TEST_FIELD_SIZE (SHELLSTATE, uWin95Unused, 4) - TEST_FIELD_ALIGN (SHELLSTATE, uWin95Unused, 1) - TEST_FIELD_OFFSET(SHELLSTATE, uWin95Unused, 8) - TEST_FIELD_SIZE (SHELLSTATE, lParamSort, 4) - TEST_FIELD_ALIGN (SHELLSTATE, lParamSort, 1) - TEST_FIELD_OFFSET(SHELLSTATE, lParamSort, 12) - TEST_FIELD_SIZE (SHELLSTATE, iSortDirection, 4) - TEST_FIELD_ALIGN (SHELLSTATE, iSortDirection, 1) - TEST_FIELD_OFFSET(SHELLSTATE, iSortDirection, 16) - TEST_FIELD_SIZE (SHELLSTATE, version, 4) - TEST_FIELD_ALIGN (SHELLSTATE, version, 1) - TEST_FIELD_OFFSET(SHELLSTATE, version, 20) - TEST_FIELD_SIZE (SHELLSTATE, uNotUsed, 4) - TEST_FIELD_ALIGN (SHELLSTATE, uNotUsed, 1) - TEST_FIELD_OFFSET(SHELLSTATE, uNotUsed, 24) -} - -static void test_pack_TBINFO(void) -{ - /* TBINFO (pack 8) */ - TEST_TYPE_SIZE (TBINFO, 8) - TEST_TYPE_ALIGN (TBINFO, 4) - TEST_FIELD_SIZE (TBINFO, cbuttons, 4) - TEST_FIELD_ALIGN (TBINFO, cbuttons, 4) - TEST_FIELD_OFFSET(TBINFO, cbuttons, 0) - TEST_FIELD_SIZE (TBINFO, uFlags, 4) - TEST_FIELD_ALIGN (TBINFO, uFlags, 4) - TEST_FIELD_OFFSET(TBINFO, uFlags, 4) -} - -#else /* _WIN64 */ - -static void test_pack_BLOB(void) -{ - /* BLOB */ - TEST_TYPE_SIZE (BLOB, 8) - TEST_TYPE_ALIGN (BLOB, 4) - TEST_FIELD_SIZE (BLOB, cbSize, 4) - TEST_FIELD_ALIGN (BLOB, cbSize, 4) - TEST_FIELD_OFFSET(BLOB, cbSize, 0) - TEST_FIELD_SIZE (BLOB, pBlobData, 4) - TEST_FIELD_ALIGN (BLOB, pBlobData, 4) - TEST_FIELD_OFFSET(BLOB, pBlobData, 4) -} - -static void test_pack_BSTR(void) -{ - /* BSTR */ - TEST_TYPE_SIZE (BSTR, 4) - TEST_TYPE_ALIGN (BSTR, 4) - TEST_TARGET_SIZE (BSTR, 2) - TEST_TARGET_ALIGN(BSTR, 2) -} - -static void test_pack_BSTRBLOB(void) -{ - /* BSTRBLOB */ - TEST_TYPE_SIZE (BSTRBLOB, 8) - TEST_TYPE_ALIGN (BSTRBLOB, 4) - TEST_FIELD_SIZE (BSTRBLOB, cbSize, 4) - TEST_FIELD_ALIGN (BSTRBLOB, cbSize, 4) - TEST_FIELD_OFFSET(BSTRBLOB, cbSize, 0) - TEST_FIELD_SIZE (BSTRBLOB, pData, 4) - TEST_FIELD_ALIGN (BSTRBLOB, pData, 4) - TEST_FIELD_OFFSET(BSTRBLOB, pData, 4) -} - -static void test_pack_BYTE_BLOB(void) -{ - /* BYTE_BLOB */ - TEST_TYPE_SIZE (BYTE_BLOB, 8) - TEST_TYPE_ALIGN (BYTE_BLOB, 4) - TEST_FIELD_SIZE (BYTE_BLOB, clSize, 4) - TEST_FIELD_ALIGN (BYTE_BLOB, clSize, 4) - TEST_FIELD_OFFSET(BYTE_BLOB, clSize, 0) - TEST_FIELD_SIZE (BYTE_BLOB, abData, 1) - TEST_FIELD_ALIGN (BYTE_BLOB, abData, 1) - TEST_FIELD_OFFSET(BYTE_BLOB, abData, 4) -} - -static void test_pack_BYTE_SIZEDARR(void) -{ - /* BYTE_SIZEDARR */ - TEST_TYPE_SIZE (BYTE_SIZEDARR, 8) - TEST_TYPE_ALIGN (BYTE_SIZEDARR, 4) - TEST_FIELD_SIZE (BYTE_SIZEDARR, clSize, 4) - TEST_FIELD_ALIGN (BYTE_SIZEDARR, clSize, 4) - TEST_FIELD_OFFSET(BYTE_SIZEDARR, clSize, 0) - TEST_FIELD_SIZE (BYTE_SIZEDARR, pData, 4) - TEST_FIELD_ALIGN (BYTE_SIZEDARR, pData, 4) - TEST_FIELD_OFFSET(BYTE_SIZEDARR, pData, 4) -} - -static void test_pack_CLIPDATA(void) -{ - /* CLIPDATA */ - TEST_TYPE_SIZE (CLIPDATA, 12) - TEST_TYPE_ALIGN (CLIPDATA, 4) - TEST_FIELD_SIZE (CLIPDATA, cbSize, 4) - TEST_FIELD_ALIGN (CLIPDATA, cbSize, 4) - TEST_FIELD_OFFSET(CLIPDATA, cbSize, 0) - TEST_FIELD_SIZE (CLIPDATA, ulClipFmt, 4) - TEST_FIELD_ALIGN (CLIPDATA, ulClipFmt, 4) - TEST_FIELD_OFFSET(CLIPDATA, ulClipFmt, 4) - TEST_FIELD_SIZE (CLIPDATA, pClipData, 4) - TEST_FIELD_ALIGN (CLIPDATA, pClipData, 4) - TEST_FIELD_OFFSET(CLIPDATA, pClipData, 8) -} - -static void test_pack_CLIPFORMAT(void) -{ - /* CLIPFORMAT */ - TEST_TYPE_SIZE (CLIPFORMAT, 2) - TEST_TYPE_ALIGN (CLIPFORMAT, 2) - TEST_TYPE_UNSIGNED(CLIPFORMAT) -} - -static void test_pack_COAUTHIDENTITY(void) -{ - /* COAUTHIDENTITY */ - TEST_TYPE_SIZE (COAUTHIDENTITY, 28) - TEST_TYPE_ALIGN (COAUTHIDENTITY, 4) - TEST_FIELD_SIZE (COAUTHIDENTITY, User, 4) - TEST_FIELD_ALIGN (COAUTHIDENTITY, User, 4) - TEST_FIELD_OFFSET(COAUTHIDENTITY, User, 0) - TEST_FIELD_SIZE (COAUTHIDENTITY, UserLength, 4) - TEST_FIELD_ALIGN (COAUTHIDENTITY, UserLength, 4) - TEST_FIELD_OFFSET(COAUTHIDENTITY, UserLength, 4) - TEST_FIELD_SIZE (COAUTHIDENTITY, Domain, 4) - TEST_FIELD_ALIGN (COAUTHIDENTITY, Domain, 4) - TEST_FIELD_OFFSET(COAUTHIDENTITY, Domain, 8) - TEST_FIELD_SIZE (COAUTHIDENTITY, DomainLength, 4) - TEST_FIELD_ALIGN (COAUTHIDENTITY, DomainLength, 4) - TEST_FIELD_OFFSET(COAUTHIDENTITY, DomainLength, 12) - TEST_FIELD_SIZE (COAUTHIDENTITY, Password, 4) - TEST_FIELD_ALIGN (COAUTHIDENTITY, Password, 4) - TEST_FIELD_OFFSET(COAUTHIDENTITY, Password, 16) - TEST_FIELD_SIZE (COAUTHIDENTITY, PasswordLength, 4) - TEST_FIELD_ALIGN (COAUTHIDENTITY, PasswordLength, 4) - TEST_FIELD_OFFSET(COAUTHIDENTITY, PasswordLength, 20) - TEST_FIELD_SIZE (COAUTHIDENTITY, Flags, 4) - TEST_FIELD_ALIGN (COAUTHIDENTITY, Flags, 4) - TEST_FIELD_OFFSET(COAUTHIDENTITY, Flags, 24) -} - -static void test_pack_COAUTHINFO(void) -{ - /* COAUTHINFO */ - TEST_TYPE_SIZE (COAUTHINFO, 28) - TEST_TYPE_ALIGN (COAUTHINFO, 4) - TEST_FIELD_SIZE (COAUTHINFO, dwAuthnSvc, 4) - TEST_FIELD_ALIGN (COAUTHINFO, dwAuthnSvc, 4) - TEST_FIELD_OFFSET(COAUTHINFO, dwAuthnSvc, 0) - TEST_FIELD_SIZE (COAUTHINFO, dwAuthzSvc, 4) - TEST_FIELD_ALIGN (COAUTHINFO, dwAuthzSvc, 4) - TEST_FIELD_OFFSET(COAUTHINFO, dwAuthzSvc, 4) - TEST_FIELD_SIZE (COAUTHINFO, pwszServerPrincName, 4) - TEST_FIELD_ALIGN (COAUTHINFO, pwszServerPrincName, 4) - TEST_FIELD_OFFSET(COAUTHINFO, pwszServerPrincName, 8) - TEST_FIELD_SIZE (COAUTHINFO, dwAuthnLevel, 4) - TEST_FIELD_ALIGN (COAUTHINFO, dwAuthnLevel, 4) - TEST_FIELD_OFFSET(COAUTHINFO, dwAuthnLevel, 12) - TEST_FIELD_SIZE (COAUTHINFO, dwImpersonationLevel, 4) - TEST_FIELD_ALIGN (COAUTHINFO, dwImpersonationLevel, 4) - TEST_FIELD_OFFSET(COAUTHINFO, dwImpersonationLevel, 16) - TEST_FIELD_SIZE (COAUTHINFO, pAuthIdentityData, 4) - TEST_FIELD_ALIGN (COAUTHINFO, pAuthIdentityData, 4) - TEST_FIELD_OFFSET(COAUTHINFO, pAuthIdentityData, 20) - TEST_FIELD_SIZE (COAUTHINFO, dwCapabilities, 4) - TEST_FIELD_ALIGN (COAUTHINFO, dwCapabilities, 4) - TEST_FIELD_OFFSET(COAUTHINFO, dwCapabilities, 24) -} - -static void test_pack_DATE(void) -{ - /* DATE */ - TEST_TYPE_SIZE (DATE, 8) - TEST_TYPE_ALIGN (DATE, 8) -} - -static void test_pack_DOUBLE(void) -{ - /* DOUBLE */ - TEST_TYPE_SIZE (DOUBLE, 8) - TEST_TYPE_ALIGN (DOUBLE, 8) -} - -static void test_pack_DWORD_SIZEDARR(void) -{ - /* DWORD_SIZEDARR */ - TEST_TYPE_SIZE (DWORD_SIZEDARR, 8) - TEST_TYPE_ALIGN (DWORD_SIZEDARR, 4) - TEST_FIELD_SIZE (DWORD_SIZEDARR, clSize, 4) - TEST_FIELD_ALIGN (DWORD_SIZEDARR, clSize, 4) - TEST_FIELD_OFFSET(DWORD_SIZEDARR, clSize, 0) - TEST_FIELD_SIZE (DWORD_SIZEDARR, pData, 4) - TEST_FIELD_ALIGN (DWORD_SIZEDARR, pData, 4) - TEST_FIELD_OFFSET(DWORD_SIZEDARR, pData, 4) -} - -static void test_pack_FLAGGED_BYTE_BLOB(void) -{ - /* FLAGGED_BYTE_BLOB */ - TEST_TYPE_SIZE (FLAGGED_BYTE_BLOB, 12) - TEST_TYPE_ALIGN (FLAGGED_BYTE_BLOB, 4) - TEST_FIELD_SIZE (FLAGGED_BYTE_BLOB, fFlags, 4) - TEST_FIELD_ALIGN (FLAGGED_BYTE_BLOB, fFlags, 4) - TEST_FIELD_OFFSET(FLAGGED_BYTE_BLOB, fFlags, 0) - TEST_FIELD_SIZE (FLAGGED_BYTE_BLOB, clSize, 4) - TEST_FIELD_ALIGN (FLAGGED_BYTE_BLOB, clSize, 4) - TEST_FIELD_OFFSET(FLAGGED_BYTE_BLOB, clSize, 4) - TEST_FIELD_SIZE (FLAGGED_BYTE_BLOB, abData, 1) - TEST_FIELD_ALIGN (FLAGGED_BYTE_BLOB, abData, 1) - TEST_FIELD_OFFSET(FLAGGED_BYTE_BLOB, abData, 8) -} - -static void test_pack_FLAGGED_WORD_BLOB(void) -{ - /* FLAGGED_WORD_BLOB */ - TEST_TYPE_SIZE (FLAGGED_WORD_BLOB, 12) - TEST_TYPE_ALIGN (FLAGGED_WORD_BLOB, 4) - TEST_FIELD_SIZE (FLAGGED_WORD_BLOB, fFlags, 4) - TEST_FIELD_ALIGN (FLAGGED_WORD_BLOB, fFlags, 4) - TEST_FIELD_OFFSET(FLAGGED_WORD_BLOB, fFlags, 0) - TEST_FIELD_SIZE (FLAGGED_WORD_BLOB, clSize, 4) - TEST_FIELD_ALIGN (FLAGGED_WORD_BLOB, clSize, 4) - TEST_FIELD_OFFSET(FLAGGED_WORD_BLOB, clSize, 4) - TEST_FIELD_SIZE (FLAGGED_WORD_BLOB, asData, 2) - TEST_FIELD_ALIGN (FLAGGED_WORD_BLOB, asData, 2) - TEST_FIELD_OFFSET(FLAGGED_WORD_BLOB, asData, 8) -} - -static void test_pack_HMETAFILEPICT(void) -{ - /* HMETAFILEPICT */ - TEST_TYPE_SIZE (HMETAFILEPICT, 4) - TEST_TYPE_ALIGN (HMETAFILEPICT, 4) -} - -static void test_pack_HYPER_SIZEDARR(void) -{ - /* HYPER_SIZEDARR */ - TEST_TYPE_SIZE (HYPER_SIZEDARR, 8) - TEST_TYPE_ALIGN (HYPER_SIZEDARR, 4) - TEST_FIELD_SIZE (HYPER_SIZEDARR, clSize, 4) - TEST_FIELD_ALIGN (HYPER_SIZEDARR, clSize, 4) - TEST_FIELD_OFFSET(HYPER_SIZEDARR, clSize, 0) - TEST_FIELD_SIZE (HYPER_SIZEDARR, pData, 4) - TEST_FIELD_ALIGN (HYPER_SIZEDARR, pData, 4) - TEST_FIELD_OFFSET(HYPER_SIZEDARR, pData, 4) -} - -static void test_pack_LPBLOB(void) -{ - /* LPBLOB */ - TEST_TYPE_SIZE (LPBLOB, 4) - TEST_TYPE_ALIGN (LPBLOB, 4) -} - -static void test_pack_LPBSTR(void) -{ - /* LPBSTR */ - TEST_TYPE_SIZE (LPBSTR, 4) - TEST_TYPE_ALIGN (LPBSTR, 4) - TEST_TARGET_SIZE (LPBSTR, 4) - TEST_TARGET_ALIGN(LPBSTR, 4) -} - -static void test_pack_LPBSTRBLOB(void) -{ - /* LPBSTRBLOB */ - TEST_TYPE_SIZE (LPBSTRBLOB, 4) - TEST_TYPE_ALIGN (LPBSTRBLOB, 4) -} - -static void test_pack_LPCOLESTR(void) -{ - /* LPCOLESTR */ - TEST_TYPE_SIZE (LPCOLESTR, 4) - TEST_TYPE_ALIGN (LPCOLESTR, 4) - TEST_TARGET_SIZE (LPCOLESTR, 2) - TEST_TARGET_ALIGN(LPCOLESTR, 2) -} - -static void test_pack_LPCY(void) -{ - /* LPCY */ - TEST_TYPE_SIZE (LPCY, 4) - TEST_TYPE_ALIGN (LPCY, 4) -} - -static void test_pack_LPDECIMAL(void) -{ - /* LPDECIMAL */ - TEST_TYPE_SIZE (LPDECIMAL, 4) - TEST_TYPE_ALIGN (LPDECIMAL, 4) -} - -static void test_pack_LPOLESTR(void) -{ - /* LPOLESTR */ - TEST_TYPE_SIZE (LPOLESTR, 4) - TEST_TYPE_ALIGN (LPOLESTR, 4) - TEST_TARGET_SIZE (LPOLESTR, 2) - TEST_TARGET_ALIGN(LPOLESTR, 2) -} - -static void test_pack_OLECHAR(void) -{ - /* OLECHAR */ - TEST_TYPE_SIZE (OLECHAR, 2) - TEST_TYPE_ALIGN (OLECHAR, 2) -} - -static void test_pack_PROPID(void) -{ - /* PROPID */ - TEST_TYPE_SIZE (PROPID, 4) - TEST_TYPE_ALIGN (PROPID, 4) -} - -static void test_pack_RemHBITMAP(void) -{ - /* RemHBITMAP */ - TEST_TYPE_SIZE (RemHBITMAP, 8) - TEST_TYPE_ALIGN (RemHBITMAP, 4) - TEST_FIELD_SIZE (RemHBITMAP, cbData, 4) - TEST_FIELD_ALIGN (RemHBITMAP, cbData, 4) - TEST_FIELD_OFFSET(RemHBITMAP, cbData, 0) - TEST_FIELD_SIZE (RemHBITMAP, data, 1) - TEST_FIELD_ALIGN (RemHBITMAP, data, 1) - TEST_FIELD_OFFSET(RemHBITMAP, data, 4) -} - -static void test_pack_RemHENHMETAFILE(void) -{ - /* RemHENHMETAFILE */ - TEST_TYPE_SIZE (RemHENHMETAFILE, 8) - TEST_TYPE_ALIGN (RemHENHMETAFILE, 4) - TEST_FIELD_SIZE (RemHENHMETAFILE, cbData, 4) - TEST_FIELD_ALIGN (RemHENHMETAFILE, cbData, 4) - TEST_FIELD_OFFSET(RemHENHMETAFILE, cbData, 0) - TEST_FIELD_SIZE (RemHENHMETAFILE, data, 1) - TEST_FIELD_ALIGN (RemHENHMETAFILE, data, 1) - TEST_FIELD_OFFSET(RemHENHMETAFILE, data, 4) -} - -static void test_pack_RemHGLOBAL(void) -{ - /* RemHGLOBAL */ - TEST_TYPE_SIZE (RemHGLOBAL, 12) - TEST_TYPE_ALIGN (RemHGLOBAL, 4) - TEST_FIELD_SIZE (RemHGLOBAL, fNullHGlobal, 4) - TEST_FIELD_ALIGN (RemHGLOBAL, fNullHGlobal, 4) - TEST_FIELD_OFFSET(RemHGLOBAL, fNullHGlobal, 0) - TEST_FIELD_SIZE (RemHGLOBAL, cbData, 4) - TEST_FIELD_ALIGN (RemHGLOBAL, cbData, 4) - TEST_FIELD_OFFSET(RemHGLOBAL, cbData, 4) - TEST_FIELD_SIZE (RemHGLOBAL, data, 1) - TEST_FIELD_ALIGN (RemHGLOBAL, data, 1) - TEST_FIELD_OFFSET(RemHGLOBAL, data, 8) -} - -static void test_pack_RemHMETAFILEPICT(void) -{ - /* RemHMETAFILEPICT */ - TEST_TYPE_SIZE (RemHMETAFILEPICT, 20) - TEST_TYPE_ALIGN (RemHMETAFILEPICT, 4) - TEST_FIELD_SIZE (RemHMETAFILEPICT, mm, 4) - TEST_FIELD_ALIGN (RemHMETAFILEPICT, mm, 4) - TEST_FIELD_OFFSET(RemHMETAFILEPICT, mm, 0) - TEST_FIELD_SIZE (RemHMETAFILEPICT, xExt, 4) - TEST_FIELD_ALIGN (RemHMETAFILEPICT, xExt, 4) - TEST_FIELD_OFFSET(RemHMETAFILEPICT, xExt, 4) - TEST_FIELD_SIZE (RemHMETAFILEPICT, yExt, 4) - TEST_FIELD_ALIGN (RemHMETAFILEPICT, yExt, 4) - TEST_FIELD_OFFSET(RemHMETAFILEPICT, yExt, 8) - TEST_FIELD_SIZE (RemHMETAFILEPICT, cbData, 4) - TEST_FIELD_ALIGN (RemHMETAFILEPICT, cbData, 4) - TEST_FIELD_OFFSET(RemHMETAFILEPICT, cbData, 12) - TEST_FIELD_SIZE (RemHMETAFILEPICT, data, 1) - TEST_FIELD_ALIGN (RemHMETAFILEPICT, data, 1) - TEST_FIELD_OFFSET(RemHMETAFILEPICT, data, 16) -} - -static void test_pack_RemHPALETTE(void) -{ - /* RemHPALETTE */ - TEST_TYPE_SIZE (RemHPALETTE, 8) - TEST_TYPE_ALIGN (RemHPALETTE, 4) - TEST_FIELD_SIZE (RemHPALETTE, cbData, 4) - TEST_FIELD_ALIGN (RemHPALETTE, cbData, 4) - TEST_FIELD_OFFSET(RemHPALETTE, cbData, 0) - TEST_FIELD_SIZE (RemHPALETTE, data, 1) - TEST_FIELD_ALIGN (RemHPALETTE, data, 1) - TEST_FIELD_OFFSET(RemHPALETTE, data, 4) -} - -static void test_pack_SCODE(void) -{ - /* SCODE */ - TEST_TYPE_SIZE (SCODE, 4) - TEST_TYPE_ALIGN (SCODE, 4) -} - -static void test_pack_UP_BYTE_BLOB(void) -{ - /* UP_BYTE_BLOB */ - TEST_TYPE_SIZE (UP_BYTE_BLOB, 4) - TEST_TYPE_ALIGN (UP_BYTE_BLOB, 4) - TEST_TARGET_SIZE (UP_BYTE_BLOB, 8) - TEST_TARGET_ALIGN(UP_BYTE_BLOB, 4) -} - -static void test_pack_UP_FLAGGED_BYTE_BLOB(void) -{ - /* UP_FLAGGED_BYTE_BLOB */ - TEST_TYPE_SIZE (UP_FLAGGED_BYTE_BLOB, 4) - TEST_TYPE_ALIGN (UP_FLAGGED_BYTE_BLOB, 4) - TEST_TARGET_SIZE (UP_FLAGGED_BYTE_BLOB, 12) - TEST_TARGET_ALIGN(UP_FLAGGED_BYTE_BLOB, 4) -} - -static void test_pack_UP_FLAGGED_WORD_BLOB(void) -{ - /* UP_FLAGGED_WORD_BLOB */ - TEST_TYPE_SIZE (UP_FLAGGED_WORD_BLOB, 4) - TEST_TYPE_ALIGN (UP_FLAGGED_WORD_BLOB, 4) - TEST_TARGET_SIZE (UP_FLAGGED_WORD_BLOB, 12) - TEST_TARGET_ALIGN(UP_FLAGGED_WORD_BLOB, 4) -} - -static void test_pack_VARIANT_BOOL(void) -{ - /* VARIANT_BOOL */ - TEST_TYPE_SIZE (VARIANT_BOOL, 2) - TEST_TYPE_ALIGN (VARIANT_BOOL, 2) - TEST_TYPE_SIGNED(VARIANT_BOOL) -} - -static void test_pack_VARTYPE(void) -{ - /* VARTYPE */ - TEST_TYPE_SIZE (VARTYPE, 2) - TEST_TYPE_ALIGN (VARTYPE, 2) - TEST_TYPE_UNSIGNED(VARTYPE) -} - -static void test_pack_WORD_SIZEDARR(void) -{ - /* WORD_SIZEDARR */ - TEST_TYPE_SIZE (WORD_SIZEDARR, 8) - TEST_TYPE_ALIGN (WORD_SIZEDARR, 4) - TEST_FIELD_SIZE (WORD_SIZEDARR, clSize, 4) - TEST_FIELD_ALIGN (WORD_SIZEDARR, clSize, 4) - TEST_FIELD_OFFSET(WORD_SIZEDARR, clSize, 0) - TEST_FIELD_SIZE (WORD_SIZEDARR, pData, 4) - TEST_FIELD_ALIGN (WORD_SIZEDARR, pData, 4) - TEST_FIELD_OFFSET(WORD_SIZEDARR, pData, 4) -} - -static void test_pack_remoteMETAFILEPICT(void) -{ - /* remoteMETAFILEPICT */ - TEST_TYPE_SIZE (remoteMETAFILEPICT, 16) - TEST_TYPE_ALIGN (remoteMETAFILEPICT, 4) - TEST_FIELD_SIZE (remoteMETAFILEPICT, mm, 4) - TEST_FIELD_ALIGN (remoteMETAFILEPICT, mm, 4) - TEST_FIELD_OFFSET(remoteMETAFILEPICT, mm, 0) - TEST_FIELD_SIZE (remoteMETAFILEPICT, xExt, 4) - TEST_FIELD_ALIGN (remoteMETAFILEPICT, xExt, 4) - TEST_FIELD_OFFSET(remoteMETAFILEPICT, xExt, 4) - TEST_FIELD_SIZE (remoteMETAFILEPICT, yExt, 4) - TEST_FIELD_ALIGN (remoteMETAFILEPICT, yExt, 4) - TEST_FIELD_OFFSET(remoteMETAFILEPICT, yExt, 8) - TEST_FIELD_SIZE (remoteMETAFILEPICT, hMF, 4) - TEST_FIELD_ALIGN (remoteMETAFILEPICT, hMF, 4) - TEST_FIELD_OFFSET(remoteMETAFILEPICT, hMF, 12) -} - -static void test_pack_userBITMAP(void) -{ - /* userBITMAP */ - TEST_TYPE_SIZE (userBITMAP, 28) - TEST_TYPE_ALIGN (userBITMAP, 4) - TEST_FIELD_SIZE (userBITMAP, bmType, 4) - TEST_FIELD_ALIGN (userBITMAP, bmType, 4) - TEST_FIELD_OFFSET(userBITMAP, bmType, 0) - TEST_FIELD_SIZE (userBITMAP, bmWidth, 4) - TEST_FIELD_ALIGN (userBITMAP, bmWidth, 4) - TEST_FIELD_OFFSET(userBITMAP, bmWidth, 4) - TEST_FIELD_SIZE (userBITMAP, bmHeight, 4) - TEST_FIELD_ALIGN (userBITMAP, bmHeight, 4) - TEST_FIELD_OFFSET(userBITMAP, bmHeight, 8) - TEST_FIELD_SIZE (userBITMAP, bmWidthBytes, 4) - TEST_FIELD_ALIGN (userBITMAP, bmWidthBytes, 4) - TEST_FIELD_OFFSET(userBITMAP, bmWidthBytes, 12) - TEST_FIELD_SIZE (userBITMAP, bmPlanes, 2) - TEST_FIELD_ALIGN (userBITMAP, bmPlanes, 2) - TEST_FIELD_OFFSET(userBITMAP, bmPlanes, 16) - TEST_FIELD_SIZE (userBITMAP, bmBitsPixel, 2) - TEST_FIELD_ALIGN (userBITMAP, bmBitsPixel, 2) - TEST_FIELD_OFFSET(userBITMAP, bmBitsPixel, 18) - TEST_FIELD_SIZE (userBITMAP, cbSize, 4) - TEST_FIELD_ALIGN (userBITMAP, cbSize, 4) - TEST_FIELD_OFFSET(userBITMAP, cbSize, 20) - TEST_FIELD_SIZE (userBITMAP, pBuffer, 1) - TEST_FIELD_ALIGN (userBITMAP, pBuffer, 1) - TEST_FIELD_OFFSET(userBITMAP, pBuffer, 24) -} - -static void test_pack_userCLIPFORMAT(void) -{ - /* userCLIPFORMAT */ - TEST_FIELD_SIZE (userCLIPFORMAT, fContext, 4) - TEST_FIELD_ALIGN (userCLIPFORMAT, fContext, 4) - TEST_FIELD_OFFSET(userCLIPFORMAT, fContext, 0) -} - -static void test_pack_userHBITMAP(void) -{ - /* userHBITMAP */ - TEST_FIELD_SIZE (userHBITMAP, fContext, 4) - TEST_FIELD_ALIGN (userHBITMAP, fContext, 4) - TEST_FIELD_OFFSET(userHBITMAP, fContext, 0) -} - -static void test_pack_userHENHMETAFILE(void) -{ - /* userHENHMETAFILE */ - TEST_FIELD_SIZE (userHENHMETAFILE, fContext, 4) - TEST_FIELD_ALIGN (userHENHMETAFILE, fContext, 4) - TEST_FIELD_OFFSET(userHENHMETAFILE, fContext, 0) -} - -static void test_pack_userHGLOBAL(void) -{ - /* userHGLOBAL */ - TEST_FIELD_SIZE (userHGLOBAL, fContext, 4) - TEST_FIELD_ALIGN (userHGLOBAL, fContext, 4) - TEST_FIELD_OFFSET(userHGLOBAL, fContext, 0) -} - -static void test_pack_userHMETAFILE(void) -{ - /* userHMETAFILE */ - TEST_FIELD_SIZE (userHMETAFILE, fContext, 4) - TEST_FIELD_ALIGN (userHMETAFILE, fContext, 4) - TEST_FIELD_OFFSET(userHMETAFILE, fContext, 0) -} - -static void test_pack_userHMETAFILEPICT(void) -{ - /* userHMETAFILEPICT */ - TEST_FIELD_SIZE (userHMETAFILEPICT, fContext, 4) - TEST_FIELD_ALIGN (userHMETAFILEPICT, fContext, 4) - TEST_FIELD_OFFSET(userHMETAFILEPICT, fContext, 0) -} - -static void test_pack_userHPALETTE(void) -{ - /* userHPALETTE */ - TEST_FIELD_SIZE (userHPALETTE, fContext, 4) - TEST_FIELD_ALIGN (userHPALETTE, fContext, 4) - TEST_FIELD_OFFSET(userHPALETTE, fContext, 0) -} - -static void test_pack_wireBSTR(void) -{ - /* wireBSTR */ - TEST_TYPE_SIZE (wireBSTR, 4) - TEST_TYPE_ALIGN (wireBSTR, 4) - TEST_TARGET_SIZE (wireBSTR, 12) - TEST_TARGET_ALIGN(wireBSTR, 4) -} - -static void test_pack_wireCLIPFORMAT(void) -{ - /* wireCLIPFORMAT */ - TEST_TYPE_SIZE (wireCLIPFORMAT, 4) - TEST_TYPE_ALIGN (wireCLIPFORMAT, 4) -} - -static void test_pack_wireHBITMAP(void) -{ - /* wireHBITMAP */ - TEST_TYPE_SIZE (wireHBITMAP, 4) - TEST_TYPE_ALIGN (wireHBITMAP, 4) -} - -static void test_pack_wireHENHMETAFILE(void) -{ - /* wireHENHMETAFILE */ - TEST_TYPE_SIZE (wireHENHMETAFILE, 4) - TEST_TYPE_ALIGN (wireHENHMETAFILE, 4) -} - -static void test_pack_wireHGLOBAL(void) -{ - /* wireHGLOBAL */ - TEST_TYPE_SIZE (wireHGLOBAL, 4) - TEST_TYPE_ALIGN (wireHGLOBAL, 4) -} - -static void test_pack_wireHMETAFILE(void) -{ - /* wireHMETAFILE */ - TEST_TYPE_SIZE (wireHMETAFILE, 4) - TEST_TYPE_ALIGN (wireHMETAFILE, 4) -} - -static void test_pack_wireHMETAFILEPICT(void) -{ - /* wireHMETAFILEPICT */ - TEST_TYPE_SIZE (wireHMETAFILEPICT, 4) - TEST_TYPE_ALIGN (wireHMETAFILEPICT, 4) -} - -static void test_pack_wireHPALETTE(void) -{ - /* wireHPALETTE */ - TEST_TYPE_SIZE (wireHPALETTE, 4) - TEST_TYPE_ALIGN (wireHPALETTE, 4) -} - -static void test_pack_CLSID(void) -{ - /* CLSID */ - TEST_TYPE_SIZE (CLSID, 16) - TEST_TYPE_ALIGN (CLSID, 4) -} - -static void test_pack_FMTID(void) -{ - /* FMTID */ - TEST_TYPE_SIZE (FMTID, 16) - TEST_TYPE_ALIGN (FMTID, 4) -} - -static void test_pack_IID(void) -{ - /* IID */ - TEST_TYPE_SIZE (IID, 16) - TEST_TYPE_ALIGN (IID, 4) -} - -static void test_pack_APPBARDATA(void) -{ - /* APPBARDATA (pack 1) */ - TEST_TYPE_SIZE (APPBARDATA, 36) - TEST_TYPE_ALIGN (APPBARDATA, 1) - TEST_FIELD_SIZE (APPBARDATA, cbSize, 4) - TEST_FIELD_ALIGN (APPBARDATA, cbSize, 1) - TEST_FIELD_OFFSET(APPBARDATA, cbSize, 0) - TEST_FIELD_SIZE (APPBARDATA, hWnd, 4) - TEST_FIELD_ALIGN (APPBARDATA, hWnd, 1) - TEST_FIELD_OFFSET(APPBARDATA, hWnd, 4) - TEST_FIELD_SIZE (APPBARDATA, uCallbackMessage, 4) - TEST_FIELD_ALIGN (APPBARDATA, uCallbackMessage, 1) - TEST_FIELD_OFFSET(APPBARDATA, uCallbackMessage, 8) - TEST_FIELD_SIZE (APPBARDATA, uEdge, 4) - TEST_FIELD_ALIGN (APPBARDATA, uEdge, 1) - TEST_FIELD_OFFSET(APPBARDATA, uEdge, 12) - TEST_FIELD_SIZE (APPBARDATA, rc, 16) - TEST_FIELD_ALIGN (APPBARDATA, rc, 1) - TEST_FIELD_OFFSET(APPBARDATA, rc, 16) - TEST_FIELD_SIZE (APPBARDATA, lParam, 4) - TEST_FIELD_ALIGN (APPBARDATA, lParam, 1) - TEST_FIELD_OFFSET(APPBARDATA, lParam, 32) -} - -static void test_pack_DRAGINFOA(void) -{ - /* DRAGINFOA (pack 1) */ - TEST_TYPE_SIZE (DRAGINFOA, 24) - TEST_TYPE_ALIGN (DRAGINFOA, 1) - TEST_FIELD_SIZE (DRAGINFOA, uSize, 4) - TEST_FIELD_ALIGN (DRAGINFOA, uSize, 1) - TEST_FIELD_OFFSET(DRAGINFOA, uSize, 0) - TEST_FIELD_SIZE (DRAGINFOA, pt, 8) - TEST_FIELD_ALIGN (DRAGINFOA, pt, 1) - TEST_FIELD_OFFSET(DRAGINFOA, pt, 4) - TEST_FIELD_SIZE (DRAGINFOA, fNC, 4) - TEST_FIELD_ALIGN (DRAGINFOA, fNC, 1) - TEST_FIELD_OFFSET(DRAGINFOA, fNC, 12) - TEST_FIELD_SIZE (DRAGINFOA, lpFileList, 4) - TEST_FIELD_ALIGN (DRAGINFOA, lpFileList, 1) - TEST_FIELD_OFFSET(DRAGINFOA, lpFileList, 16) - TEST_FIELD_SIZE (DRAGINFOA, grfKeyState, 4) - TEST_FIELD_ALIGN (DRAGINFOA, grfKeyState, 1) - TEST_FIELD_OFFSET(DRAGINFOA, grfKeyState, 20) -} - -static void test_pack_DRAGINFOW(void) -{ - /* DRAGINFOW (pack 1) */ - TEST_TYPE_SIZE (DRAGINFOW, 24) - TEST_TYPE_ALIGN (DRAGINFOW, 1) - TEST_FIELD_SIZE (DRAGINFOW, uSize, 4) - TEST_FIELD_ALIGN (DRAGINFOW, uSize, 1) - TEST_FIELD_OFFSET(DRAGINFOW, uSize, 0) - TEST_FIELD_SIZE (DRAGINFOW, pt, 8) - TEST_FIELD_ALIGN (DRAGINFOW, pt, 1) - TEST_FIELD_OFFSET(DRAGINFOW, pt, 4) - TEST_FIELD_SIZE (DRAGINFOW, fNC, 4) - TEST_FIELD_ALIGN (DRAGINFOW, fNC, 1) - TEST_FIELD_OFFSET(DRAGINFOW, fNC, 12) - TEST_FIELD_SIZE (DRAGINFOW, lpFileList, 4) - TEST_FIELD_ALIGN (DRAGINFOW, lpFileList, 1) - TEST_FIELD_OFFSET(DRAGINFOW, lpFileList, 16) - TEST_FIELD_SIZE (DRAGINFOW, grfKeyState, 4) - TEST_FIELD_ALIGN (DRAGINFOW, grfKeyState, 1) - TEST_FIELD_OFFSET(DRAGINFOW, grfKeyState, 20) -} - -static void test_pack_FILEOP_FLAGS(void) -{ - /* FILEOP_FLAGS */ - TEST_TYPE_SIZE (FILEOP_FLAGS, 2) - TEST_TYPE_ALIGN (FILEOP_FLAGS, 2) - TEST_TYPE_UNSIGNED(FILEOP_FLAGS) -} - -static void test_pack_LPDRAGINFOA(void) -{ - /* LPDRAGINFOA */ - TEST_TYPE_SIZE (LPDRAGINFOA, 4) - TEST_TYPE_ALIGN (LPDRAGINFOA, 4) - TEST_TARGET_SIZE (LPDRAGINFOA, 24) - TEST_TARGET_ALIGN(LPDRAGINFOA, 1) -} - -static void test_pack_LPDRAGINFOW(void) -{ - /* LPDRAGINFOW */ - TEST_TYPE_SIZE (LPDRAGINFOW, 4) - TEST_TYPE_ALIGN (LPDRAGINFOW, 4) - TEST_TARGET_SIZE (LPDRAGINFOW, 24) - TEST_TARGET_ALIGN(LPDRAGINFOW, 1) -} - -static void test_pack_LPSHELLEXECUTEINFOA(void) -{ - /* LPSHELLEXECUTEINFOA */ - TEST_TYPE_SIZE (LPSHELLEXECUTEINFOA, 4) - TEST_TYPE_ALIGN (LPSHELLEXECUTEINFOA, 4) -} - -static void test_pack_LPSHELLEXECUTEINFOW(void) -{ - /* LPSHELLEXECUTEINFOW */ - TEST_TYPE_SIZE (LPSHELLEXECUTEINFOW, 4) - TEST_TYPE_ALIGN (LPSHELLEXECUTEINFOW, 4) -} - -static void test_pack_LPSHFILEOPSTRUCTA(void) -{ - /* LPSHFILEOPSTRUCTA */ - TEST_TYPE_SIZE (LPSHFILEOPSTRUCTA, 4) - TEST_TYPE_ALIGN (LPSHFILEOPSTRUCTA, 4) - TEST_TARGET_SIZE (LPSHFILEOPSTRUCTA, 30) - TEST_TARGET_ALIGN(LPSHFILEOPSTRUCTA, 1) -} - -static void test_pack_LPSHFILEOPSTRUCTW(void) -{ - /* LPSHFILEOPSTRUCTW */ - TEST_TYPE_SIZE (LPSHFILEOPSTRUCTW, 4) - TEST_TYPE_ALIGN (LPSHFILEOPSTRUCTW, 4) - TEST_TARGET_SIZE (LPSHFILEOPSTRUCTW, 30) - TEST_TARGET_ALIGN(LPSHFILEOPSTRUCTW, 1) -} - -static void test_pack_LPSHNAMEMAPPINGA(void) -{ - /* LPSHNAMEMAPPINGA */ - TEST_TYPE_SIZE (LPSHNAMEMAPPINGA, 4) - TEST_TYPE_ALIGN (LPSHNAMEMAPPINGA, 4) - TEST_TARGET_SIZE (LPSHNAMEMAPPINGA, 16) - TEST_TARGET_ALIGN(LPSHNAMEMAPPINGA, 1) -} - -static void test_pack_LPSHNAMEMAPPINGW(void) -{ - /* LPSHNAMEMAPPINGW */ - TEST_TYPE_SIZE (LPSHNAMEMAPPINGW, 4) - TEST_TYPE_ALIGN (LPSHNAMEMAPPINGW, 4) - TEST_TARGET_SIZE (LPSHNAMEMAPPINGW, 16) - TEST_TARGET_ALIGN(LPSHNAMEMAPPINGW, 1) -} - -static void test_pack_NOTIFYICONDATAA(void) -{ - /* NOTIFYICONDATAA (pack 1) */ - TEST_FIELD_SIZE (NOTIFYICONDATAA, cbSize, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAA, cbSize, 1) - TEST_FIELD_OFFSET(NOTIFYICONDATAA, cbSize, 0) - TEST_FIELD_SIZE (NOTIFYICONDATAA, hWnd, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAA, hWnd, 1) - TEST_FIELD_OFFSET(NOTIFYICONDATAA, hWnd, 4) - TEST_FIELD_SIZE (NOTIFYICONDATAA, uID, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAA, uID, 1) - TEST_FIELD_OFFSET(NOTIFYICONDATAA, uID, 8) - TEST_FIELD_SIZE (NOTIFYICONDATAA, uFlags, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAA, uFlags, 1) - TEST_FIELD_OFFSET(NOTIFYICONDATAA, uFlags, 12) - TEST_FIELD_SIZE (NOTIFYICONDATAA, uCallbackMessage, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAA, uCallbackMessage, 1) - TEST_FIELD_OFFSET(NOTIFYICONDATAA, uCallbackMessage, 16) - TEST_FIELD_SIZE (NOTIFYICONDATAA, hIcon, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAA, hIcon, 1) - TEST_FIELD_OFFSET(NOTIFYICONDATAA, hIcon, 20) - TEST_FIELD_SIZE (NOTIFYICONDATAA, szTip, 128) - TEST_FIELD_ALIGN (NOTIFYICONDATAA, szTip, 1) - TEST_FIELD_OFFSET(NOTIFYICONDATAA, szTip, 24) - TEST_FIELD_SIZE (NOTIFYICONDATAA, dwState, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAA, dwState, 1) - TEST_FIELD_OFFSET(NOTIFYICONDATAA, dwState, 152) - TEST_FIELD_SIZE (NOTIFYICONDATAA, dwStateMask, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAA, dwStateMask, 1) - TEST_FIELD_OFFSET(NOTIFYICONDATAA, dwStateMask, 156) - TEST_FIELD_SIZE (NOTIFYICONDATAA, szInfo, 256) - TEST_FIELD_ALIGN (NOTIFYICONDATAA, szInfo, 1) - TEST_FIELD_OFFSET(NOTIFYICONDATAA, szInfo, 160) -} - -static void test_pack_NOTIFYICONDATAW(void) -{ - /* NOTIFYICONDATAW (pack 1) */ - TEST_FIELD_SIZE (NOTIFYICONDATAW, cbSize, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAW, cbSize, 1) - TEST_FIELD_OFFSET(NOTIFYICONDATAW, cbSize, 0) - TEST_FIELD_SIZE (NOTIFYICONDATAW, hWnd, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAW, hWnd, 1) - TEST_FIELD_OFFSET(NOTIFYICONDATAW, hWnd, 4) - TEST_FIELD_SIZE (NOTIFYICONDATAW, uID, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAW, uID, 1) - TEST_FIELD_OFFSET(NOTIFYICONDATAW, uID, 8) - TEST_FIELD_SIZE (NOTIFYICONDATAW, uFlags, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAW, uFlags, 1) - TEST_FIELD_OFFSET(NOTIFYICONDATAW, uFlags, 12) - TEST_FIELD_SIZE (NOTIFYICONDATAW, uCallbackMessage, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAW, uCallbackMessage, 1) - TEST_FIELD_OFFSET(NOTIFYICONDATAW, uCallbackMessage, 16) - TEST_FIELD_SIZE (NOTIFYICONDATAW, hIcon, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAW, hIcon, 1) - TEST_FIELD_OFFSET(NOTIFYICONDATAW, hIcon, 20) - TEST_FIELD_SIZE (NOTIFYICONDATAW, szTip, 256) - TEST_FIELD_ALIGN (NOTIFYICONDATAW, szTip, 1) - TEST_FIELD_OFFSET(NOTIFYICONDATAW, szTip, 24) - TEST_FIELD_SIZE (NOTIFYICONDATAW, dwState, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAW, dwState, 1) - TEST_FIELD_OFFSET(NOTIFYICONDATAW, dwState, 280) - TEST_FIELD_SIZE (NOTIFYICONDATAW, dwStateMask, 4) - TEST_FIELD_ALIGN (NOTIFYICONDATAW, dwStateMask, 1) - TEST_FIELD_OFFSET(NOTIFYICONDATAW, dwStateMask, 284) - TEST_FIELD_SIZE (NOTIFYICONDATAW, szInfo, 512) - TEST_FIELD_ALIGN (NOTIFYICONDATAW, szInfo, 1) - TEST_FIELD_OFFSET(NOTIFYICONDATAW, szInfo, 288) -} - -static void test_pack_PAPPBARDATA(void) -{ - /* PAPPBARDATA */ - TEST_TYPE_SIZE (PAPPBARDATA, 4) - TEST_TYPE_ALIGN (PAPPBARDATA, 4) - TEST_TARGET_SIZE (PAPPBARDATA, 36) - TEST_TARGET_ALIGN(PAPPBARDATA, 1) -} - -static void test_pack_PNOTIFYICONDATAA(void) -{ - /* PNOTIFYICONDATAA */ - TEST_TYPE_SIZE (PNOTIFYICONDATAA, 4) - TEST_TYPE_ALIGN (PNOTIFYICONDATAA, 4) -} - -static void test_pack_PNOTIFYICONDATAW(void) -{ - /* PNOTIFYICONDATAW */ - TEST_TYPE_SIZE (PNOTIFYICONDATAW, 4) - TEST_TYPE_ALIGN (PNOTIFYICONDATAW, 4) -} - -static void test_pack_PRINTEROP_FLAGS(void) -{ - /* PRINTEROP_FLAGS */ - TEST_TYPE_SIZE (PRINTEROP_FLAGS, 2) - TEST_TYPE_ALIGN (PRINTEROP_FLAGS, 2) - TEST_TYPE_UNSIGNED(PRINTEROP_FLAGS) -} - -static void test_pack_SHELLEXECUTEINFOA(void) -{ - /* SHELLEXECUTEINFOA (pack 1) */ - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, cbSize, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, cbSize, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, cbSize, 0) - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, fMask, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, fMask, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, fMask, 4) - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, hwnd, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, hwnd, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, hwnd, 8) - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, lpVerb, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, lpVerb, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, lpVerb, 12) - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, lpFile, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, lpFile, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, lpFile, 16) - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, lpParameters, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, lpParameters, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, lpParameters, 20) - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, lpDirectory, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, lpDirectory, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, lpDirectory, 24) - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, nShow, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, nShow, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, nShow, 28) - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, hInstApp, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, hInstApp, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, hInstApp, 32) - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, lpIDList, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, lpIDList, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, lpIDList, 36) - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, lpClass, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, lpClass, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, lpClass, 40) - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, hkeyClass, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, hkeyClass, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, hkeyClass, 44) - TEST_FIELD_SIZE (SHELLEXECUTEINFOA, dwHotKey, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOA, dwHotKey, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOA, dwHotKey, 48) -} - -static void test_pack_SHELLEXECUTEINFOW(void) -{ - /* SHELLEXECUTEINFOW (pack 1) */ - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, cbSize, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, cbSize, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, cbSize, 0) - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, fMask, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, fMask, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, fMask, 4) - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, hwnd, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, hwnd, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, hwnd, 8) - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, lpVerb, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, lpVerb, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, lpVerb, 12) - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, lpFile, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, lpFile, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, lpFile, 16) - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, lpParameters, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, lpParameters, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, lpParameters, 20) - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, lpDirectory, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, lpDirectory, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, lpDirectory, 24) - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, nShow, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, nShow, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, nShow, 28) - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, hInstApp, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, hInstApp, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, hInstApp, 32) - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, lpIDList, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, lpIDList, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, lpIDList, 36) - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, lpClass, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, lpClass, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, lpClass, 40) - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, hkeyClass, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, hkeyClass, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, hkeyClass, 44) - TEST_FIELD_SIZE (SHELLEXECUTEINFOW, dwHotKey, 4) - TEST_FIELD_ALIGN (SHELLEXECUTEINFOW, dwHotKey, 1) - TEST_FIELD_OFFSET(SHELLEXECUTEINFOW, dwHotKey, 48) -} - -static void test_pack_SHFILEINFOA(void) -{ - /* SHFILEINFOA (pack 1) */ - TEST_TYPE_SIZE (SHFILEINFOA, 352) - TEST_TYPE_ALIGN (SHFILEINFOA, 1) - TEST_FIELD_SIZE (SHFILEINFOA, hIcon, 4) - TEST_FIELD_ALIGN (SHFILEINFOA, hIcon, 1) - TEST_FIELD_OFFSET(SHFILEINFOA, hIcon, 0) - TEST_FIELD_SIZE (SHFILEINFOA, iIcon, 4) - TEST_FIELD_ALIGN (SHFILEINFOA, iIcon, 1) - TEST_FIELD_OFFSET(SHFILEINFOA, iIcon, 4) - TEST_FIELD_SIZE (SHFILEINFOA, dwAttributes, 4) - TEST_FIELD_ALIGN (SHFILEINFOA, dwAttributes, 1) - TEST_FIELD_OFFSET(SHFILEINFOA, dwAttributes, 8) - TEST_FIELD_SIZE (SHFILEINFOA, szDisplayName, 260) - TEST_FIELD_ALIGN (SHFILEINFOA, szDisplayName, 1) - TEST_FIELD_OFFSET(SHFILEINFOA, szDisplayName, 12) - TEST_FIELD_SIZE (SHFILEINFOA, szTypeName, 80) - TEST_FIELD_ALIGN (SHFILEINFOA, szTypeName, 1) - TEST_FIELD_OFFSET(SHFILEINFOA, szTypeName, 272) -} - -static void test_pack_SHFILEINFOW(void) -{ - /* SHFILEINFOW (pack 1) */ - TEST_TYPE_SIZE (SHFILEINFOW, 692) - TEST_TYPE_ALIGN (SHFILEINFOW, 1) - TEST_FIELD_SIZE (SHFILEINFOW, hIcon, 4) - TEST_FIELD_ALIGN (SHFILEINFOW, hIcon, 1) - TEST_FIELD_OFFSET(SHFILEINFOW, hIcon, 0) - TEST_FIELD_SIZE (SHFILEINFOW, iIcon, 4) - TEST_FIELD_ALIGN (SHFILEINFOW, iIcon, 1) - TEST_FIELD_OFFSET(SHFILEINFOW, iIcon, 4) - TEST_FIELD_SIZE (SHFILEINFOW, dwAttributes, 4) - TEST_FIELD_ALIGN (SHFILEINFOW, dwAttributes, 1) - TEST_FIELD_OFFSET(SHFILEINFOW, dwAttributes, 8) - TEST_FIELD_SIZE (SHFILEINFOW, szDisplayName, 520) - TEST_FIELD_ALIGN (SHFILEINFOW, szDisplayName, 1) - TEST_FIELD_OFFSET(SHFILEINFOW, szDisplayName, 12) - TEST_FIELD_SIZE (SHFILEINFOW, szTypeName, 160) - TEST_FIELD_ALIGN (SHFILEINFOW, szTypeName, 1) - TEST_FIELD_OFFSET(SHFILEINFOW, szTypeName, 532) -} - -static void test_pack_SHFILEOPSTRUCTA(void) -{ - /* SHFILEOPSTRUCTA (pack 1) */ - TEST_TYPE_SIZE (SHFILEOPSTRUCTA, 30) - TEST_TYPE_ALIGN (SHFILEOPSTRUCTA, 1) - TEST_FIELD_SIZE (SHFILEOPSTRUCTA, hwnd, 4) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTA, hwnd, 1) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTA, hwnd, 0) - TEST_FIELD_SIZE (SHFILEOPSTRUCTA, wFunc, 4) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTA, wFunc, 1) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTA, wFunc, 4) - TEST_FIELD_SIZE (SHFILEOPSTRUCTA, pFrom, 4) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTA, pFrom, 1) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTA, pFrom, 8) - TEST_FIELD_SIZE (SHFILEOPSTRUCTA, pTo, 4) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTA, pTo, 1) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTA, pTo, 12) - TEST_FIELD_SIZE (SHFILEOPSTRUCTA, fFlags, 2) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTA, fFlags, 1) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTA, fFlags, 16) - TEST_FIELD_SIZE (SHFILEOPSTRUCTA, fAnyOperationsAborted, 4) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTA, fAnyOperationsAborted, 1) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTA, fAnyOperationsAborted, 18) - TEST_FIELD_SIZE (SHFILEOPSTRUCTA, hNameMappings, 4) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTA, hNameMappings, 1) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTA, hNameMappings, 22) - TEST_FIELD_SIZE (SHFILEOPSTRUCTA, lpszProgressTitle, 4) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTA, lpszProgressTitle, 1) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTA, lpszProgressTitle, 26) -} - -static void test_pack_SHFILEOPSTRUCTW(void) -{ - /* SHFILEOPSTRUCTW (pack 1) */ - TEST_TYPE_SIZE (SHFILEOPSTRUCTW, 30) - TEST_TYPE_ALIGN (SHFILEOPSTRUCTW, 1) - TEST_FIELD_SIZE (SHFILEOPSTRUCTW, hwnd, 4) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTW, hwnd, 1) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTW, hwnd, 0) - TEST_FIELD_SIZE (SHFILEOPSTRUCTW, wFunc, 4) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTW, wFunc, 1) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTW, wFunc, 4) - TEST_FIELD_SIZE (SHFILEOPSTRUCTW, pFrom, 4) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTW, pFrom, 1) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTW, pFrom, 8) - TEST_FIELD_SIZE (SHFILEOPSTRUCTW, pTo, 4) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTW, pTo, 1) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTW, pTo, 12) - TEST_FIELD_SIZE (SHFILEOPSTRUCTW, fFlags, 2) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTW, fFlags, 1) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTW, fFlags, 16) - TEST_FIELD_SIZE (SHFILEOPSTRUCTW, fAnyOperationsAborted, 4) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTW, fAnyOperationsAborted, 1) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTW, fAnyOperationsAborted, 18) - TEST_FIELD_SIZE (SHFILEOPSTRUCTW, hNameMappings, 4) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTW, hNameMappings, 1) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTW, hNameMappings, 22) - TEST_FIELD_SIZE (SHFILEOPSTRUCTW, lpszProgressTitle, 4) - TEST_FIELD_ALIGN (SHFILEOPSTRUCTW, lpszProgressTitle, 1) - TEST_FIELD_OFFSET(SHFILEOPSTRUCTW, lpszProgressTitle, 26) -} - -static void test_pack_SHNAMEMAPPINGA(void) -{ - /* SHNAMEMAPPINGA (pack 1) */ - TEST_TYPE_SIZE (SHNAMEMAPPINGA, 16) - TEST_TYPE_ALIGN (SHNAMEMAPPINGA, 1) - TEST_FIELD_SIZE (SHNAMEMAPPINGA, pszOldPath, 4) - TEST_FIELD_ALIGN (SHNAMEMAPPINGA, pszOldPath, 1) - TEST_FIELD_OFFSET(SHNAMEMAPPINGA, pszOldPath, 0) - TEST_FIELD_SIZE (SHNAMEMAPPINGA, pszNewPath, 4) - TEST_FIELD_ALIGN (SHNAMEMAPPINGA, pszNewPath, 1) - TEST_FIELD_OFFSET(SHNAMEMAPPINGA, pszNewPath, 4) - TEST_FIELD_SIZE (SHNAMEMAPPINGA, cchOldPath, 4) - TEST_FIELD_ALIGN (SHNAMEMAPPINGA, cchOldPath, 1) - TEST_FIELD_OFFSET(SHNAMEMAPPINGA, cchOldPath, 8) - TEST_FIELD_SIZE (SHNAMEMAPPINGA, cchNewPath, 4) - TEST_FIELD_ALIGN (SHNAMEMAPPINGA, cchNewPath, 1) - TEST_FIELD_OFFSET(SHNAMEMAPPINGA, cchNewPath, 12) -} - -static void test_pack_SHNAMEMAPPINGW(void) -{ - /* SHNAMEMAPPINGW (pack 1) */ - TEST_TYPE_SIZE (SHNAMEMAPPINGW, 16) - TEST_TYPE_ALIGN (SHNAMEMAPPINGW, 1) - TEST_FIELD_SIZE (SHNAMEMAPPINGW, pszOldPath, 4) - TEST_FIELD_ALIGN (SHNAMEMAPPINGW, pszOldPath, 1) - TEST_FIELD_OFFSET(SHNAMEMAPPINGW, pszOldPath, 0) - TEST_FIELD_SIZE (SHNAMEMAPPINGW, pszNewPath, 4) - TEST_FIELD_ALIGN (SHNAMEMAPPINGW, pszNewPath, 1) - TEST_FIELD_OFFSET(SHNAMEMAPPINGW, pszNewPath, 4) - TEST_FIELD_SIZE (SHNAMEMAPPINGW, cchOldPath, 4) - TEST_FIELD_ALIGN (SHNAMEMAPPINGW, cchOldPath, 1) - TEST_FIELD_OFFSET(SHNAMEMAPPINGW, cchOldPath, 8) - TEST_FIELD_SIZE (SHNAMEMAPPINGW, cchNewPath, 4) - TEST_FIELD_ALIGN (SHNAMEMAPPINGW, cchNewPath, 1) - TEST_FIELD_OFFSET(SHNAMEMAPPINGW, cchNewPath, 12) -} - -static void test_pack_ITEMIDLIST(void) -{ - /* ITEMIDLIST (pack 1) */ - TEST_TYPE_SIZE (ITEMIDLIST, 3) - TEST_TYPE_ALIGN (ITEMIDLIST, 1) - TEST_FIELD_SIZE (ITEMIDLIST, mkid, 3) - TEST_FIELD_ALIGN (ITEMIDLIST, mkid, 1) - TEST_FIELD_OFFSET(ITEMIDLIST, mkid, 0) -} - -static void test_pack_LPCITEMIDLIST(void) -{ - /* LPCITEMIDLIST */ - TEST_TYPE_SIZE (LPCITEMIDLIST, 4) - TEST_TYPE_ALIGN (LPCITEMIDLIST, 4) - TEST_TARGET_SIZE (LPCITEMIDLIST, 3) - TEST_TARGET_ALIGN(LPCITEMIDLIST, 1) -} - -static void test_pack_LPCSHITEMID(void) -{ - /* LPCSHITEMID */ - TEST_TYPE_SIZE (LPCSHITEMID, 4) - TEST_TYPE_ALIGN (LPCSHITEMID, 4) - TEST_TARGET_SIZE (LPCSHITEMID, 3) - TEST_TARGET_ALIGN(LPCSHITEMID, 1) -} - -static void test_pack_LPITEMIDLIST(void) -{ - /* LPITEMIDLIST */ - TEST_TYPE_SIZE (LPITEMIDLIST, 4) - TEST_TYPE_ALIGN (LPITEMIDLIST, 4) -} - -static void test_pack_LPSHELLDETAILS(void) -{ - /* LPSHELLDETAILS */ - TEST_TYPE_SIZE (LPSHELLDETAILS, 4) - TEST_TYPE_ALIGN (LPSHELLDETAILS, 4) -} - -static void test_pack_LPSHITEMID(void) -{ - /* LPSHITEMID */ - TEST_TYPE_SIZE (LPSHITEMID, 4) - TEST_TYPE_ALIGN (LPSHITEMID, 4) -} - -static void test_pack_LPSTRRET(void) -{ - /* LPSTRRET */ - TEST_TYPE_SIZE (LPSTRRET, 4) - TEST_TYPE_ALIGN (LPSTRRET, 4) -} - -static void test_pack_SHELLDETAILS(void) -{ - /* SHELLDETAILS (pack 1) */ - TEST_FIELD_SIZE (SHELLDETAILS, fmt, 4) - TEST_FIELD_ALIGN (SHELLDETAILS, fmt, 1) - TEST_FIELD_OFFSET(SHELLDETAILS, fmt, 0) - TEST_FIELD_SIZE (SHELLDETAILS, cxChar, 4) - TEST_FIELD_ALIGN (SHELLDETAILS, cxChar, 1) - TEST_FIELD_OFFSET(SHELLDETAILS, cxChar, 4) -} - -static void test_pack_SHITEMID(void) -{ - /* SHITEMID (pack 1) */ - TEST_TYPE_SIZE (SHITEMID, 3) - TEST_TYPE_ALIGN (SHITEMID, 1) - TEST_FIELD_SIZE (SHITEMID, cb, 2) - TEST_FIELD_ALIGN (SHITEMID, cb, 1) - TEST_FIELD_OFFSET(SHITEMID, cb, 0) - TEST_FIELD_SIZE (SHITEMID, abID, 1) - TEST_FIELD_ALIGN (SHITEMID, abID, 1) - TEST_FIELD_OFFSET(SHITEMID, abID, 2) -} - -static void test_pack_STRRET(void) -{ - /* STRRET (pack 8) */ - TEST_FIELD_SIZE (STRRET, uType, 4) - TEST_FIELD_ALIGN (STRRET, uType, 4) - TEST_FIELD_OFFSET(STRRET, uType, 0) -} - -static void test_pack_AUTO_SCROLL_DATA(void) -{ - /* AUTO_SCROLL_DATA (pack 1) */ - TEST_TYPE_SIZE (AUTO_SCROLL_DATA, 48) - TEST_TYPE_ALIGN (AUTO_SCROLL_DATA, 1) - TEST_FIELD_SIZE (AUTO_SCROLL_DATA, iNextSample, 4) - TEST_FIELD_ALIGN (AUTO_SCROLL_DATA, iNextSample, 1) - TEST_FIELD_OFFSET(AUTO_SCROLL_DATA, iNextSample, 0) - TEST_FIELD_SIZE (AUTO_SCROLL_DATA, dwLastScroll, 4) - TEST_FIELD_ALIGN (AUTO_SCROLL_DATA, dwLastScroll, 1) - TEST_FIELD_OFFSET(AUTO_SCROLL_DATA, dwLastScroll, 4) - TEST_FIELD_SIZE (AUTO_SCROLL_DATA, bFull, 4) - TEST_FIELD_ALIGN (AUTO_SCROLL_DATA, bFull, 1) - TEST_FIELD_OFFSET(AUTO_SCROLL_DATA, bFull, 8) - TEST_FIELD_SIZE (AUTO_SCROLL_DATA, pts, 24) - TEST_FIELD_ALIGN (AUTO_SCROLL_DATA, pts, 1) - TEST_FIELD_OFFSET(AUTO_SCROLL_DATA, pts, 12) - TEST_FIELD_SIZE (AUTO_SCROLL_DATA, dwTimes, 12) - TEST_FIELD_ALIGN (AUTO_SCROLL_DATA, dwTimes, 1) - TEST_FIELD_OFFSET(AUTO_SCROLL_DATA, dwTimes, 36) -} - -static void test_pack_BFFCALLBACK(void) -{ - /* BFFCALLBACK */ - TEST_TYPE_SIZE (BFFCALLBACK, 4) - TEST_TYPE_ALIGN (BFFCALLBACK, 4) -} - -static void test_pack_BROWSEINFOA(void) -{ - /* BROWSEINFOA (pack 8) */ - TEST_TYPE_SIZE (BROWSEINFOA, 32) - TEST_TYPE_ALIGN (BROWSEINFOA, 4) - TEST_FIELD_SIZE (BROWSEINFOA, hwndOwner, 4) - TEST_FIELD_ALIGN (BROWSEINFOA, hwndOwner, 4) - TEST_FIELD_OFFSET(BROWSEINFOA, hwndOwner, 0) - TEST_FIELD_SIZE (BROWSEINFOA, pidlRoot, 4) - TEST_FIELD_ALIGN (BROWSEINFOA, pidlRoot, 4) - TEST_FIELD_OFFSET(BROWSEINFOA, pidlRoot, 4) - TEST_FIELD_SIZE (BROWSEINFOA, pszDisplayName, 4) - TEST_FIELD_ALIGN (BROWSEINFOA, pszDisplayName, 4) - TEST_FIELD_OFFSET(BROWSEINFOA, pszDisplayName, 8) - TEST_FIELD_SIZE (BROWSEINFOA, lpszTitle, 4) - TEST_FIELD_ALIGN (BROWSEINFOA, lpszTitle, 4) - TEST_FIELD_OFFSET(BROWSEINFOA, lpszTitle, 12) - TEST_FIELD_SIZE (BROWSEINFOA, ulFlags, 4) - TEST_FIELD_ALIGN (BROWSEINFOA, ulFlags, 4) - TEST_FIELD_OFFSET(BROWSEINFOA, ulFlags, 16) - TEST_FIELD_SIZE (BROWSEINFOA, lpfn, 4) - TEST_FIELD_ALIGN (BROWSEINFOA, lpfn, 4) - TEST_FIELD_OFFSET(BROWSEINFOA, lpfn, 20) - TEST_FIELD_SIZE (BROWSEINFOA, lParam, 4) - TEST_FIELD_ALIGN (BROWSEINFOA, lParam, 4) - TEST_FIELD_OFFSET(BROWSEINFOA, lParam, 24) - TEST_FIELD_SIZE (BROWSEINFOA, iImage, 4) - TEST_FIELD_ALIGN (BROWSEINFOA, iImage, 4) - TEST_FIELD_OFFSET(BROWSEINFOA, iImage, 28) -} - -static void test_pack_BROWSEINFOW(void) -{ - /* BROWSEINFOW (pack 8) */ - TEST_TYPE_SIZE (BROWSEINFOW, 32) - TEST_TYPE_ALIGN (BROWSEINFOW, 4) - TEST_FIELD_SIZE (BROWSEINFOW, hwndOwner, 4) - TEST_FIELD_ALIGN (BROWSEINFOW, hwndOwner, 4) - TEST_FIELD_OFFSET(BROWSEINFOW, hwndOwner, 0) - TEST_FIELD_SIZE (BROWSEINFOW, pidlRoot, 4) - TEST_FIELD_ALIGN (BROWSEINFOW, pidlRoot, 4) - TEST_FIELD_OFFSET(BROWSEINFOW, pidlRoot, 4) - TEST_FIELD_SIZE (BROWSEINFOW, pszDisplayName, 4) - TEST_FIELD_ALIGN (BROWSEINFOW, pszDisplayName, 4) - TEST_FIELD_OFFSET(BROWSEINFOW, pszDisplayName, 8) - TEST_FIELD_SIZE (BROWSEINFOW, lpszTitle, 4) - TEST_FIELD_ALIGN (BROWSEINFOW, lpszTitle, 4) - TEST_FIELD_OFFSET(BROWSEINFOW, lpszTitle, 12) - TEST_FIELD_SIZE (BROWSEINFOW, ulFlags, 4) - TEST_FIELD_ALIGN (BROWSEINFOW, ulFlags, 4) - TEST_FIELD_OFFSET(BROWSEINFOW, ulFlags, 16) - TEST_FIELD_SIZE (BROWSEINFOW, lpfn, 4) - TEST_FIELD_ALIGN (BROWSEINFOW, lpfn, 4) - TEST_FIELD_OFFSET(BROWSEINFOW, lpfn, 20) - TEST_FIELD_SIZE (BROWSEINFOW, lParam, 4) - TEST_FIELD_ALIGN (BROWSEINFOW, lParam, 4) - TEST_FIELD_OFFSET(BROWSEINFOW, lParam, 24) - TEST_FIELD_SIZE (BROWSEINFOW, iImage, 4) - TEST_FIELD_ALIGN (BROWSEINFOW, iImage, 4) - TEST_FIELD_OFFSET(BROWSEINFOW, iImage, 28) -} - -static void test_pack_CABINETSTATE(void) -{ - /* CABINETSTATE (pack 1) */ - TEST_TYPE_SIZE (CABINETSTATE, 12) - TEST_TYPE_ALIGN (CABINETSTATE, 1) - TEST_FIELD_SIZE (CABINETSTATE, cLength, 2) - TEST_FIELD_ALIGN (CABINETSTATE, cLength, 1) - TEST_FIELD_OFFSET(CABINETSTATE, cLength, 0) - TEST_FIELD_SIZE (CABINETSTATE, nVersion, 2) - TEST_FIELD_ALIGN (CABINETSTATE, nVersion, 1) - TEST_FIELD_OFFSET(CABINETSTATE, nVersion, 2) - TEST_FIELD_SIZE (CABINETSTATE, fMenuEnumFilter, 4) - TEST_FIELD_ALIGN (CABINETSTATE, fMenuEnumFilter, 1) - TEST_FIELD_OFFSET(CABINETSTATE, fMenuEnumFilter, 8) -} - -static void test_pack_CIDA(void) -{ - /* CIDA (pack 1) */ - TEST_TYPE_SIZE (CIDA, 8) - TEST_TYPE_ALIGN (CIDA, 1) - TEST_FIELD_SIZE (CIDA, cidl, 4) - TEST_FIELD_ALIGN (CIDA, cidl, 1) - TEST_FIELD_OFFSET(CIDA, cidl, 0) - TEST_FIELD_SIZE (CIDA, aoffset, 4) - TEST_FIELD_ALIGN (CIDA, aoffset, 1) - TEST_FIELD_OFFSET(CIDA, aoffset, 4) -} - -static void test_pack_CSFV(void) -{ - /* CSFV (pack 8) */ - TEST_FIELD_SIZE (CSFV, cbSize, 4) - TEST_FIELD_ALIGN (CSFV, cbSize, 4) - TEST_FIELD_OFFSET(CSFV, cbSize, 0) - TEST_FIELD_SIZE (CSFV, pshf, 4) - TEST_FIELD_ALIGN (CSFV, pshf, 4) - TEST_FIELD_OFFSET(CSFV, pshf, 4) - TEST_FIELD_SIZE (CSFV, psvOuter, 4) - TEST_FIELD_ALIGN (CSFV, psvOuter, 4) - TEST_FIELD_OFFSET(CSFV, psvOuter, 8) - TEST_FIELD_SIZE (CSFV, pidl, 4) - TEST_FIELD_ALIGN (CSFV, pidl, 4) - TEST_FIELD_OFFSET(CSFV, pidl, 12) - TEST_FIELD_SIZE (CSFV, lEvents, 4) - TEST_FIELD_ALIGN (CSFV, lEvents, 4) - TEST_FIELD_OFFSET(CSFV, lEvents, 16) - TEST_FIELD_SIZE (CSFV, pfnCallback, 4) - TEST_FIELD_ALIGN (CSFV, pfnCallback, 4) - TEST_FIELD_OFFSET(CSFV, pfnCallback, 20) -} - -static void test_pack_DROPFILES(void) -{ - /* DROPFILES (pack 1) */ - TEST_TYPE_SIZE (DROPFILES, 20) - TEST_TYPE_ALIGN (DROPFILES, 1) - TEST_FIELD_SIZE (DROPFILES, pFiles, 4) - TEST_FIELD_ALIGN (DROPFILES, pFiles, 1) - TEST_FIELD_OFFSET(DROPFILES, pFiles, 0) - TEST_FIELD_SIZE (DROPFILES, pt, 8) - TEST_FIELD_ALIGN (DROPFILES, pt, 1) - TEST_FIELD_OFFSET(DROPFILES, pt, 4) - TEST_FIELD_SIZE (DROPFILES, fNC, 4) - TEST_FIELD_ALIGN (DROPFILES, fNC, 1) - TEST_FIELD_OFFSET(DROPFILES, fNC, 12) - TEST_FIELD_SIZE (DROPFILES, fWide, 4) - TEST_FIELD_ALIGN (DROPFILES, fWide, 1) - TEST_FIELD_OFFSET(DROPFILES, fWide, 16) -} - -static void test_pack_FILEDESCRIPTORA(void) -{ - /* FILEDESCRIPTORA (pack 1) */ - TEST_TYPE_SIZE (FILEDESCRIPTORA, 332) - TEST_TYPE_ALIGN (FILEDESCRIPTORA, 1) - TEST_FIELD_SIZE (FILEDESCRIPTORA, dwFlags, 4) - TEST_FIELD_ALIGN (FILEDESCRIPTORA, dwFlags, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORA, dwFlags, 0) - TEST_FIELD_SIZE (FILEDESCRIPTORA, clsid, 16) - TEST_FIELD_ALIGN (FILEDESCRIPTORA, clsid, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORA, clsid, 4) - TEST_FIELD_SIZE (FILEDESCRIPTORA, sizel, 8) - TEST_FIELD_ALIGN (FILEDESCRIPTORA, sizel, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORA, sizel, 20) - TEST_FIELD_SIZE (FILEDESCRIPTORA, pointl, 8) - TEST_FIELD_ALIGN (FILEDESCRIPTORA, pointl, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORA, pointl, 28) - TEST_FIELD_SIZE (FILEDESCRIPTORA, dwFileAttributes, 4) - TEST_FIELD_ALIGN (FILEDESCRIPTORA, dwFileAttributes, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORA, dwFileAttributes, 36) - TEST_FIELD_SIZE (FILEDESCRIPTORA, ftCreationTime, 8) - TEST_FIELD_ALIGN (FILEDESCRIPTORA, ftCreationTime, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORA, ftCreationTime, 40) - TEST_FIELD_SIZE (FILEDESCRIPTORA, ftLastAccessTime, 8) - TEST_FIELD_ALIGN (FILEDESCRIPTORA, ftLastAccessTime, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORA, ftLastAccessTime, 48) - TEST_FIELD_SIZE (FILEDESCRIPTORA, ftLastWriteTime, 8) - TEST_FIELD_ALIGN (FILEDESCRIPTORA, ftLastWriteTime, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORA, ftLastWriteTime, 56) - TEST_FIELD_SIZE (FILEDESCRIPTORA, nFileSizeHigh, 4) - TEST_FIELD_ALIGN (FILEDESCRIPTORA, nFileSizeHigh, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORA, nFileSizeHigh, 64) - TEST_FIELD_SIZE (FILEDESCRIPTORA, nFileSizeLow, 4) - TEST_FIELD_ALIGN (FILEDESCRIPTORA, nFileSizeLow, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORA, nFileSizeLow, 68) - TEST_FIELD_SIZE (FILEDESCRIPTORA, cFileName, 260) - TEST_FIELD_ALIGN (FILEDESCRIPTORA, cFileName, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORA, cFileName, 72) -} - -static void test_pack_FILEDESCRIPTORW(void) -{ - /* FILEDESCRIPTORW (pack 1) */ - TEST_TYPE_SIZE (FILEDESCRIPTORW, 592) - TEST_TYPE_ALIGN (FILEDESCRIPTORW, 1) - TEST_FIELD_SIZE (FILEDESCRIPTORW, dwFlags, 4) - TEST_FIELD_ALIGN (FILEDESCRIPTORW, dwFlags, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORW, dwFlags, 0) - TEST_FIELD_SIZE (FILEDESCRIPTORW, clsid, 16) - TEST_FIELD_ALIGN (FILEDESCRIPTORW, clsid, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORW, clsid, 4) - TEST_FIELD_SIZE (FILEDESCRIPTORW, sizel, 8) - TEST_FIELD_ALIGN (FILEDESCRIPTORW, sizel, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORW, sizel, 20) - TEST_FIELD_SIZE (FILEDESCRIPTORW, pointl, 8) - TEST_FIELD_ALIGN (FILEDESCRIPTORW, pointl, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORW, pointl, 28) - TEST_FIELD_SIZE (FILEDESCRIPTORW, dwFileAttributes, 4) - TEST_FIELD_ALIGN (FILEDESCRIPTORW, dwFileAttributes, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORW, dwFileAttributes, 36) - TEST_FIELD_SIZE (FILEDESCRIPTORW, ftCreationTime, 8) - TEST_FIELD_ALIGN (FILEDESCRIPTORW, ftCreationTime, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORW, ftCreationTime, 40) - TEST_FIELD_SIZE (FILEDESCRIPTORW, ftLastAccessTime, 8) - TEST_FIELD_ALIGN (FILEDESCRIPTORW, ftLastAccessTime, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORW, ftLastAccessTime, 48) - TEST_FIELD_SIZE (FILEDESCRIPTORW, ftLastWriteTime, 8) - TEST_FIELD_ALIGN (FILEDESCRIPTORW, ftLastWriteTime, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORW, ftLastWriteTime, 56) - TEST_FIELD_SIZE (FILEDESCRIPTORW, nFileSizeHigh, 4) - TEST_FIELD_ALIGN (FILEDESCRIPTORW, nFileSizeHigh, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORW, nFileSizeHigh, 64) - TEST_FIELD_SIZE (FILEDESCRIPTORW, nFileSizeLow, 4) - TEST_FIELD_ALIGN (FILEDESCRIPTORW, nFileSizeLow, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORW, nFileSizeLow, 68) - TEST_FIELD_SIZE (FILEDESCRIPTORW, cFileName, 520) - TEST_FIELD_ALIGN (FILEDESCRIPTORW, cFileName, 1) - TEST_FIELD_OFFSET(FILEDESCRIPTORW, cFileName, 72) -} - -static void test_pack_FILEGROUPDESCRIPTORA(void) -{ - /* FILEGROUPDESCRIPTORA (pack 1) */ - TEST_TYPE_SIZE (FILEGROUPDESCRIPTORA, 336) - TEST_TYPE_ALIGN (FILEGROUPDESCRIPTORA, 1) - TEST_FIELD_SIZE (FILEGROUPDESCRIPTORA, cItems, 4) - TEST_FIELD_ALIGN (FILEGROUPDESCRIPTORA, cItems, 1) - TEST_FIELD_OFFSET(FILEGROUPDESCRIPTORA, cItems, 0) - TEST_FIELD_SIZE (FILEGROUPDESCRIPTORA, fgd, 332) - TEST_FIELD_ALIGN (FILEGROUPDESCRIPTORA, fgd, 1) - TEST_FIELD_OFFSET(FILEGROUPDESCRIPTORA, fgd, 4) -} - -static void test_pack_FILEGROUPDESCRIPTORW(void) -{ - /* FILEGROUPDESCRIPTORW (pack 1) */ - TEST_TYPE_SIZE (FILEGROUPDESCRIPTORW, 596) - TEST_TYPE_ALIGN (FILEGROUPDESCRIPTORW, 1) - TEST_FIELD_SIZE (FILEGROUPDESCRIPTORW, cItems, 4) - TEST_FIELD_ALIGN (FILEGROUPDESCRIPTORW, cItems, 1) - TEST_FIELD_OFFSET(FILEGROUPDESCRIPTORW, cItems, 0) - TEST_FIELD_SIZE (FILEGROUPDESCRIPTORW, fgd, 592) - TEST_FIELD_ALIGN (FILEGROUPDESCRIPTORW, fgd, 1) - TEST_FIELD_OFFSET(FILEGROUPDESCRIPTORW, fgd, 4) -} - -static void test_pack_ITEMSPACING(void) -{ - /* ITEMSPACING (pack 8) */ - TEST_TYPE_SIZE (ITEMSPACING, 16) - TEST_TYPE_ALIGN (ITEMSPACING, 4) - TEST_FIELD_SIZE (ITEMSPACING, cxSmall, 4) - TEST_FIELD_ALIGN (ITEMSPACING, cxSmall, 4) - TEST_FIELD_OFFSET(ITEMSPACING, cxSmall, 0) - TEST_FIELD_SIZE (ITEMSPACING, cySmall, 4) - TEST_FIELD_ALIGN (ITEMSPACING, cySmall, 4) - TEST_FIELD_OFFSET(ITEMSPACING, cySmall, 4) - TEST_FIELD_SIZE (ITEMSPACING, cxLarge, 4) - TEST_FIELD_ALIGN (ITEMSPACING, cxLarge, 4) - TEST_FIELD_OFFSET(ITEMSPACING, cxLarge, 8) - TEST_FIELD_SIZE (ITEMSPACING, cyLarge, 4) - TEST_FIELD_ALIGN (ITEMSPACING, cyLarge, 4) - TEST_FIELD_OFFSET(ITEMSPACING, cyLarge, 12) -} - -static void test_pack_LPBROWSEINFOA(void) -{ - /* LPBROWSEINFOA */ - TEST_TYPE_SIZE (LPBROWSEINFOA, 4) - TEST_TYPE_ALIGN (LPBROWSEINFOA, 4) - TEST_TARGET_SIZE (LPBROWSEINFOA, 32) - TEST_TARGET_ALIGN(LPBROWSEINFOA, 4) -} - -static void test_pack_LPBROWSEINFOW(void) -{ - /* LPBROWSEINFOW */ - TEST_TYPE_SIZE (LPBROWSEINFOW, 4) - TEST_TYPE_ALIGN (LPBROWSEINFOW, 4) - TEST_TARGET_SIZE (LPBROWSEINFOW, 32) - TEST_TARGET_ALIGN(LPBROWSEINFOW, 4) -} - -static void test_pack_LPCABINETSTATE(void) -{ - /* LPCABINETSTATE */ - TEST_TYPE_SIZE (LPCABINETSTATE, 4) - TEST_TYPE_ALIGN (LPCABINETSTATE, 4) - TEST_TARGET_SIZE (LPCABINETSTATE, 12) - TEST_TARGET_ALIGN(LPCABINETSTATE, 1) -} - -static void test_pack_LPCSFV(void) -{ - /* LPCSFV */ - TEST_TYPE_SIZE (LPCSFV, 4) - TEST_TYPE_ALIGN (LPCSFV, 4) -} - -static void test_pack_LPDROPFILES(void) -{ - /* LPDROPFILES */ - TEST_TYPE_SIZE (LPDROPFILES, 4) - TEST_TYPE_ALIGN (LPDROPFILES, 4) - TEST_TARGET_SIZE (LPDROPFILES, 20) - TEST_TARGET_ALIGN(LPDROPFILES, 1) -} - -static void test_pack_LPFILEDESCRIPTORA(void) -{ - /* LPFILEDESCRIPTORA */ - TEST_TYPE_SIZE (LPFILEDESCRIPTORA, 4) - TEST_TYPE_ALIGN (LPFILEDESCRIPTORA, 4) - TEST_TARGET_SIZE (LPFILEDESCRIPTORA, 332) - TEST_TARGET_ALIGN(LPFILEDESCRIPTORA, 1) -} - -static void test_pack_LPFILEDESCRIPTORW(void) -{ - /* LPFILEDESCRIPTORW */ - TEST_TYPE_SIZE (LPFILEDESCRIPTORW, 4) - TEST_TYPE_ALIGN (LPFILEDESCRIPTORW, 4) - TEST_TARGET_SIZE (LPFILEDESCRIPTORW, 592) - TEST_TARGET_ALIGN(LPFILEDESCRIPTORW, 1) -} - -static void test_pack_LPFILEGROUPDESCRIPTORA(void) -{ - /* LPFILEGROUPDESCRIPTORA */ - TEST_TYPE_SIZE (LPFILEGROUPDESCRIPTORA, 4) - TEST_TYPE_ALIGN (LPFILEGROUPDESCRIPTORA, 4) - TEST_TARGET_SIZE (LPFILEGROUPDESCRIPTORA, 336) - TEST_TARGET_ALIGN(LPFILEGROUPDESCRIPTORA, 1) -} - -static void test_pack_LPFILEGROUPDESCRIPTORW(void) -{ - /* LPFILEGROUPDESCRIPTORW */ - TEST_TYPE_SIZE (LPFILEGROUPDESCRIPTORW, 4) - TEST_TYPE_ALIGN (LPFILEGROUPDESCRIPTORW, 4) - TEST_TARGET_SIZE (LPFILEGROUPDESCRIPTORW, 596) - TEST_TARGET_ALIGN(LPFILEGROUPDESCRIPTORW, 1) -} - -static void test_pack_LPFNVIEWCALLBACK(void) -{ - /* LPFNVIEWCALLBACK */ - TEST_TYPE_SIZE (LPFNVIEWCALLBACK, 4) - TEST_TYPE_ALIGN (LPFNVIEWCALLBACK, 4) -} - -static void test_pack_LPIDA(void) -{ - /* LPIDA */ - TEST_TYPE_SIZE (LPIDA, 4) - TEST_TYPE_ALIGN (LPIDA, 4) - TEST_TARGET_SIZE (LPIDA, 8) - TEST_TARGET_ALIGN(LPIDA, 1) -} - -static void test_pack_LPQCMINFO(void) -{ - /* LPQCMINFO */ - TEST_TYPE_SIZE (LPQCMINFO, 4) - TEST_TYPE_ALIGN (LPQCMINFO, 4) - TEST_TARGET_SIZE (LPQCMINFO, 20) - TEST_TARGET_ALIGN(LPQCMINFO, 4) -} - -static void test_pack_LPSHChangeDWORDAsIDList(void) -{ - /* LPSHChangeDWORDAsIDList */ - TEST_TYPE_SIZE (LPSHChangeDWORDAsIDList, 4) - TEST_TYPE_ALIGN (LPSHChangeDWORDAsIDList, 4) - TEST_TARGET_SIZE (LPSHChangeDWORDAsIDList, 12) - TEST_TARGET_ALIGN(LPSHChangeDWORDAsIDList, 1) -} - -static void test_pack_LPSHChangeProductKeyAsIDList(void) -{ - /* LPSHChangeProductKeyAsIDList */ - TEST_TYPE_SIZE (LPSHChangeProductKeyAsIDList, 4) - TEST_TYPE_ALIGN (LPSHChangeProductKeyAsIDList, 4) - TEST_TARGET_SIZE (LPSHChangeProductKeyAsIDList, 82) - TEST_TARGET_ALIGN(LPSHChangeProductKeyAsIDList, 1) -} - -static void test_pack_LPSHDESCRIPTIONID(void) -{ - /* LPSHDESCRIPTIONID */ - TEST_TYPE_SIZE (LPSHDESCRIPTIONID, 4) - TEST_TYPE_ALIGN (LPSHDESCRIPTIONID, 4) - TEST_TARGET_SIZE (LPSHDESCRIPTIONID, 20) - TEST_TARGET_ALIGN(LPSHDESCRIPTIONID, 4) -} - -static void test_pack_LPSHELLFLAGSTATE(void) -{ - /* LPSHELLFLAGSTATE */ - TEST_TYPE_SIZE (LPSHELLFLAGSTATE, 4) - TEST_TYPE_ALIGN (LPSHELLFLAGSTATE, 4) - TEST_TARGET_SIZE (LPSHELLFLAGSTATE, 4) - TEST_TARGET_ALIGN(LPSHELLFLAGSTATE, 1) -} - -static void test_pack_LPSHELLSTATE(void) -{ - /* LPSHELLSTATE */ - TEST_TYPE_SIZE (LPSHELLSTATE, 4) - TEST_TYPE_ALIGN (LPSHELLSTATE, 4) - TEST_TARGET_SIZE (LPSHELLSTATE, 32) - TEST_TARGET_ALIGN(LPSHELLSTATE, 1) -} - -static void test_pack_LPTBINFO(void) -{ - /* LPTBINFO */ - TEST_TYPE_SIZE (LPTBINFO, 4) - TEST_TYPE_ALIGN (LPTBINFO, 4) - TEST_TARGET_SIZE (LPTBINFO, 8) - TEST_TARGET_ALIGN(LPTBINFO, 4) -} - -static void test_pack_PBROWSEINFOA(void) -{ - /* PBROWSEINFOA */ - TEST_TYPE_SIZE (PBROWSEINFOA, 4) - TEST_TYPE_ALIGN (PBROWSEINFOA, 4) - TEST_TARGET_SIZE (PBROWSEINFOA, 32) - TEST_TARGET_ALIGN(PBROWSEINFOA, 4) -} - -static void test_pack_PBROWSEINFOW(void) -{ - /* PBROWSEINFOW */ - TEST_TYPE_SIZE (PBROWSEINFOW, 4) - TEST_TYPE_ALIGN (PBROWSEINFOW, 4) - TEST_TARGET_SIZE (PBROWSEINFOW, 32) - TEST_TARGET_ALIGN(PBROWSEINFOW, 4) -} - -static void test_pack_QCMINFO(void) -{ - /* QCMINFO (pack 8) */ - TEST_TYPE_SIZE (QCMINFO, 20) - TEST_TYPE_ALIGN (QCMINFO, 4) - TEST_FIELD_SIZE (QCMINFO, hmenu, 4) - TEST_FIELD_ALIGN (QCMINFO, hmenu, 4) - TEST_FIELD_OFFSET(QCMINFO, hmenu, 0) - TEST_FIELD_SIZE (QCMINFO, indexMenu, 4) - TEST_FIELD_ALIGN (QCMINFO, indexMenu, 4) - TEST_FIELD_OFFSET(QCMINFO, indexMenu, 4) - TEST_FIELD_SIZE (QCMINFO, idCmdFirst, 4) - TEST_FIELD_ALIGN (QCMINFO, idCmdFirst, 4) - TEST_FIELD_OFFSET(QCMINFO, idCmdFirst, 8) - TEST_FIELD_SIZE (QCMINFO, idCmdLast, 4) - TEST_FIELD_ALIGN (QCMINFO, idCmdLast, 4) - TEST_FIELD_OFFSET(QCMINFO, idCmdLast, 12) - TEST_FIELD_SIZE (QCMINFO, pIdMap, 4) - TEST_FIELD_ALIGN (QCMINFO, pIdMap, 4) - TEST_FIELD_OFFSET(QCMINFO, pIdMap, 16) -} - -static void test_pack_QCMINFO_IDMAP(void) -{ - /* QCMINFO_IDMAP (pack 8) */ - TEST_TYPE_SIZE (QCMINFO_IDMAP, 12) - TEST_TYPE_ALIGN (QCMINFO_IDMAP, 4) - TEST_FIELD_SIZE (QCMINFO_IDMAP, nMaxIds, 4) - TEST_FIELD_ALIGN (QCMINFO_IDMAP, nMaxIds, 4) - TEST_FIELD_OFFSET(QCMINFO_IDMAP, nMaxIds, 0) - TEST_FIELD_SIZE (QCMINFO_IDMAP, pIdList, 8) - TEST_FIELD_ALIGN (QCMINFO_IDMAP, pIdList, 4) - TEST_FIELD_OFFSET(QCMINFO_IDMAP, pIdList, 4) -} - -static void test_pack_QCMINFO_IDMAP_PLACEMENT(void) -{ - /* QCMINFO_IDMAP_PLACEMENT (pack 8) */ - TEST_TYPE_SIZE (QCMINFO_IDMAP_PLACEMENT, 8) - TEST_TYPE_ALIGN (QCMINFO_IDMAP_PLACEMENT, 4) - TEST_FIELD_SIZE (QCMINFO_IDMAP_PLACEMENT, id, 4) - TEST_FIELD_ALIGN (QCMINFO_IDMAP_PLACEMENT, id, 4) - TEST_FIELD_OFFSET(QCMINFO_IDMAP_PLACEMENT, id, 0) - TEST_FIELD_SIZE (QCMINFO_IDMAP_PLACEMENT, fFlags, 4) - TEST_FIELD_ALIGN (QCMINFO_IDMAP_PLACEMENT, fFlags, 4) - TEST_FIELD_OFFSET(QCMINFO_IDMAP_PLACEMENT, fFlags, 4) -} - -static void test_pack_SFV_CREATE(void) -{ - /* SFV_CREATE (pack 8) */ - TEST_TYPE_SIZE (SFV_CREATE, 16) - TEST_TYPE_ALIGN (SFV_CREATE, 4) - TEST_FIELD_SIZE (SFV_CREATE, cbSize, 4) - TEST_FIELD_ALIGN (SFV_CREATE, cbSize, 4) - TEST_FIELD_OFFSET(SFV_CREATE, cbSize, 0) - TEST_FIELD_SIZE (SFV_CREATE, pshf, 4) - TEST_FIELD_ALIGN (SFV_CREATE, pshf, 4) - TEST_FIELD_OFFSET(SFV_CREATE, pshf, 4) - TEST_FIELD_SIZE (SFV_CREATE, psvOuter, 4) - TEST_FIELD_ALIGN (SFV_CREATE, psvOuter, 4) - TEST_FIELD_OFFSET(SFV_CREATE, psvOuter, 8) - TEST_FIELD_SIZE (SFV_CREATE, psfvcb, 4) - TEST_FIELD_ALIGN (SFV_CREATE, psfvcb, 4) - TEST_FIELD_OFFSET(SFV_CREATE, psfvcb, 12) -} - -static void test_pack_SHChangeDWORDAsIDList(void) -{ - /* SHChangeDWORDAsIDList (pack 1) */ - TEST_TYPE_SIZE (SHChangeDWORDAsIDList, 12) - TEST_TYPE_ALIGN (SHChangeDWORDAsIDList, 1) - TEST_FIELD_SIZE (SHChangeDWORDAsIDList, cb, 2) - TEST_FIELD_ALIGN (SHChangeDWORDAsIDList, cb, 1) - TEST_FIELD_OFFSET(SHChangeDWORDAsIDList, cb, 0) - TEST_FIELD_SIZE (SHChangeDWORDAsIDList, dwItem1, 4) - TEST_FIELD_ALIGN (SHChangeDWORDAsIDList, dwItem1, 1) - TEST_FIELD_OFFSET(SHChangeDWORDAsIDList, dwItem1, 2) - TEST_FIELD_SIZE (SHChangeDWORDAsIDList, dwItem2, 4) - TEST_FIELD_ALIGN (SHChangeDWORDAsIDList, dwItem2, 1) - TEST_FIELD_OFFSET(SHChangeDWORDAsIDList, dwItem2, 6) - TEST_FIELD_SIZE (SHChangeDWORDAsIDList, cbZero, 2) - TEST_FIELD_ALIGN (SHChangeDWORDAsIDList, cbZero, 1) - TEST_FIELD_OFFSET(SHChangeDWORDAsIDList, cbZero, 10) -} - -static void test_pack_SHChangeNotifyEntry(void) -{ - /* SHChangeNotifyEntry (pack 1) */ - TEST_TYPE_SIZE (SHChangeNotifyEntry, 8) - TEST_TYPE_ALIGN (SHChangeNotifyEntry, 1) - TEST_FIELD_SIZE (SHChangeNotifyEntry, pidl, 4) - TEST_FIELD_ALIGN (SHChangeNotifyEntry, pidl, 1) - TEST_FIELD_OFFSET(SHChangeNotifyEntry, pidl, 0) - TEST_FIELD_SIZE (SHChangeNotifyEntry, fRecursive, 4) - TEST_FIELD_ALIGN (SHChangeNotifyEntry, fRecursive, 1) - TEST_FIELD_OFFSET(SHChangeNotifyEntry, fRecursive, 4) -} - -static void test_pack_SHChangeProductKeyAsIDList(void) -{ - /* SHChangeProductKeyAsIDList (pack 1) */ - TEST_TYPE_SIZE (SHChangeProductKeyAsIDList, 82) - TEST_TYPE_ALIGN (SHChangeProductKeyAsIDList, 1) - TEST_FIELD_SIZE (SHChangeProductKeyAsIDList, cb, 2) - TEST_FIELD_ALIGN (SHChangeProductKeyAsIDList, cb, 1) - TEST_FIELD_OFFSET(SHChangeProductKeyAsIDList, cb, 0) - TEST_FIELD_SIZE (SHChangeProductKeyAsIDList, wszProductKey, 78) - TEST_FIELD_ALIGN (SHChangeProductKeyAsIDList, wszProductKey, 1) - TEST_FIELD_OFFSET(SHChangeProductKeyAsIDList, wszProductKey, 2) - TEST_FIELD_SIZE (SHChangeProductKeyAsIDList, cbZero, 2) - TEST_FIELD_ALIGN (SHChangeProductKeyAsIDList, cbZero, 1) - TEST_FIELD_OFFSET(SHChangeProductKeyAsIDList, cbZero, 80) -} - -static void test_pack_SHDESCRIPTIONID(void) -{ - /* SHDESCRIPTIONID (pack 8) */ - TEST_TYPE_SIZE (SHDESCRIPTIONID, 20) - TEST_TYPE_ALIGN (SHDESCRIPTIONID, 4) - TEST_FIELD_SIZE (SHDESCRIPTIONID, dwDescriptionId, 4) - TEST_FIELD_ALIGN (SHDESCRIPTIONID, dwDescriptionId, 4) - TEST_FIELD_OFFSET(SHDESCRIPTIONID, dwDescriptionId, 0) - TEST_FIELD_SIZE (SHDESCRIPTIONID, clsid, 16) - TEST_FIELD_ALIGN (SHDESCRIPTIONID, clsid, 4) - TEST_FIELD_OFFSET(SHDESCRIPTIONID, clsid, 4) -} - -static void test_pack_SHELLFLAGSTATE(void) -{ - /* SHELLFLAGSTATE (pack 1) */ - TEST_TYPE_SIZE (SHELLFLAGSTATE, 4) - TEST_TYPE_ALIGN (SHELLFLAGSTATE, 1) -} - -static void test_pack_SHELLSTATE(void) -{ - /* SHELLSTATE (pack 1) */ - TEST_TYPE_SIZE (SHELLSTATE, 32) - TEST_TYPE_ALIGN (SHELLSTATE, 1) - TEST_FIELD_SIZE (SHELLSTATE, dwWin95Unused, 4) - TEST_FIELD_ALIGN (SHELLSTATE, dwWin95Unused, 1) - TEST_FIELD_OFFSET(SHELLSTATE, dwWin95Unused, 4) - TEST_FIELD_SIZE (SHELLSTATE, uWin95Unused, 4) - TEST_FIELD_ALIGN (SHELLSTATE, uWin95Unused, 1) - TEST_FIELD_OFFSET(SHELLSTATE, uWin95Unused, 8) - TEST_FIELD_SIZE (SHELLSTATE, lParamSort, 4) - TEST_FIELD_ALIGN (SHELLSTATE, lParamSort, 1) - TEST_FIELD_OFFSET(SHELLSTATE, lParamSort, 12) - TEST_FIELD_SIZE (SHELLSTATE, iSortDirection, 4) - TEST_FIELD_ALIGN (SHELLSTATE, iSortDirection, 1) - TEST_FIELD_OFFSET(SHELLSTATE, iSortDirection, 16) - TEST_FIELD_SIZE (SHELLSTATE, version, 4) - TEST_FIELD_ALIGN (SHELLSTATE, version, 1) - TEST_FIELD_OFFSET(SHELLSTATE, version, 20) - TEST_FIELD_SIZE (SHELLSTATE, uNotUsed, 4) - TEST_FIELD_ALIGN (SHELLSTATE, uNotUsed, 1) - TEST_FIELD_OFFSET(SHELLSTATE, uNotUsed, 24) -} - -static void test_pack_TBINFO(void) -{ - /* TBINFO (pack 8) */ - TEST_TYPE_SIZE (TBINFO, 8) - TEST_TYPE_ALIGN (TBINFO, 4) - TEST_FIELD_SIZE (TBINFO, cbuttons, 4) - TEST_FIELD_ALIGN (TBINFO, cbuttons, 4) - TEST_FIELD_OFFSET(TBINFO, cbuttons, 0) - TEST_FIELD_SIZE (TBINFO, uFlags, 4) - TEST_FIELD_ALIGN (TBINFO, uFlags, 4) - TEST_FIELD_OFFSET(TBINFO, uFlags, 4) -} - -#endif /* _WIN64 */ - -static void test_pack(void) -{ - test_pack_APPBARDATA(); - test_pack_AUTO_SCROLL_DATA(); - test_pack_BFFCALLBACK(); - test_pack_BLOB(); - test_pack_BROWSEINFOA(); - test_pack_BROWSEINFOW(); - test_pack_BSTR(); - test_pack_BSTRBLOB(); - test_pack_BYTE_BLOB(); - test_pack_BYTE_SIZEDARR(); - test_pack_CABINETSTATE(); - test_pack_CIDA(); - test_pack_CLIPDATA(); - test_pack_CLIPFORMAT(); - test_pack_CLSID(); - test_pack_COAUTHIDENTITY(); - test_pack_COAUTHINFO(); - test_pack_CSFV(); - test_pack_DATE(); - test_pack_DOUBLE(); - test_pack_DRAGINFOA(); - test_pack_DRAGINFOW(); - test_pack_DROPFILES(); - test_pack_DWORD_SIZEDARR(); - test_pack_FILEDESCRIPTORA(); - test_pack_FILEDESCRIPTORW(); - test_pack_FILEGROUPDESCRIPTORA(); - test_pack_FILEGROUPDESCRIPTORW(); - test_pack_FILEOP_FLAGS(); - test_pack_FLAGGED_BYTE_BLOB(); - test_pack_FLAGGED_WORD_BLOB(); - test_pack_FMTID(); - test_pack_HMETAFILEPICT(); - test_pack_HYPER_SIZEDARR(); - test_pack_IID(); - test_pack_ITEMIDLIST(); - test_pack_ITEMSPACING(); - test_pack_LPBLOB(); - test_pack_LPBROWSEINFOA(); - test_pack_LPBROWSEINFOW(); - test_pack_LPBSTR(); - test_pack_LPBSTRBLOB(); - test_pack_LPCABINETSTATE(); - test_pack_LPCITEMIDLIST(); - test_pack_LPCOLESTR(); - test_pack_LPCSFV(); - test_pack_LPCSHITEMID(); - test_pack_LPCY(); - test_pack_LPDECIMAL(); - test_pack_LPDRAGINFOA(); - test_pack_LPDRAGINFOW(); - test_pack_LPDROPFILES(); - test_pack_LPFILEDESCRIPTORA(); - test_pack_LPFILEDESCRIPTORW(); - test_pack_LPFILEGROUPDESCRIPTORA(); - test_pack_LPFILEGROUPDESCRIPTORW(); - test_pack_LPFNVIEWCALLBACK(); - test_pack_LPIDA(); - test_pack_LPITEMIDLIST(); - test_pack_LPOLESTR(); - test_pack_LPQCMINFO(); - test_pack_LPSHChangeDWORDAsIDList(); - test_pack_LPSHChangeProductKeyAsIDList(); - test_pack_LPSHDESCRIPTIONID(); - test_pack_LPSHELLDETAILS(); - test_pack_LPSHELLEXECUTEINFOA(); - test_pack_LPSHELLEXECUTEINFOW(); - test_pack_LPSHELLFLAGSTATE(); - test_pack_LPSHELLSTATE(); - test_pack_LPSHFILEOPSTRUCTA(); - test_pack_LPSHFILEOPSTRUCTW(); - test_pack_LPSHITEMID(); - test_pack_LPSHNAMEMAPPINGA(); - test_pack_LPSHNAMEMAPPINGW(); - test_pack_LPSTRRET(); - test_pack_LPTBINFO(); - test_pack_NOTIFYICONDATAA(); - test_pack_NOTIFYICONDATAW(); - test_pack_OLECHAR(); - test_pack_PAPPBARDATA(); - test_pack_PBROWSEINFOA(); - test_pack_PBROWSEINFOW(); - test_pack_PNOTIFYICONDATAA(); - test_pack_PNOTIFYICONDATAW(); - test_pack_PRINTEROP_FLAGS(); - test_pack_PROPID(); - test_pack_QCMINFO(); - test_pack_QCMINFO_IDMAP(); - test_pack_QCMINFO_IDMAP_PLACEMENT(); - test_pack_RemHBITMAP(); - test_pack_RemHENHMETAFILE(); - test_pack_RemHGLOBAL(); - test_pack_RemHMETAFILEPICT(); - test_pack_RemHPALETTE(); - test_pack_SCODE(); - test_pack_SFV_CREATE(); - test_pack_SHChangeDWORDAsIDList(); - test_pack_SHChangeNotifyEntry(); - test_pack_SHChangeProductKeyAsIDList(); - test_pack_SHDESCRIPTIONID(); - test_pack_SHELLDETAILS(); - test_pack_SHELLEXECUTEINFOA(); - test_pack_SHELLEXECUTEINFOW(); - test_pack_SHELLFLAGSTATE(); - test_pack_SHELLSTATE(); - test_pack_SHFILEINFOA(); - test_pack_SHFILEINFOW(); - test_pack_SHFILEOPSTRUCTA(); - test_pack_SHFILEOPSTRUCTW(); - test_pack_SHITEMID(); - test_pack_SHNAMEMAPPINGA(); - test_pack_SHNAMEMAPPINGW(); - test_pack_STRRET(); - test_pack_TBINFO(); - test_pack_UP_BYTE_BLOB(); - test_pack_UP_FLAGGED_BYTE_BLOB(); - test_pack_UP_FLAGGED_WORD_BLOB(); - test_pack_VARIANT_BOOL(); - test_pack_VARTYPE(); - test_pack_WORD_SIZEDARR(); - test_pack_remoteMETAFILEPICT(); - test_pack_userBITMAP(); - test_pack_userCLIPFORMAT(); - test_pack_userHBITMAP(); - test_pack_userHENHMETAFILE(); - test_pack_userHGLOBAL(); - test_pack_userHMETAFILE(); - test_pack_userHMETAFILEPICT(); - test_pack_userHPALETTE(); - test_pack_wireBSTR(); - test_pack_wireCLIPFORMAT(); - test_pack_wireHBITMAP(); - test_pack_wireHENHMETAFILE(); - test_pack_wireHGLOBAL(); - test_pack_wireHMETAFILE(); - test_pack_wireHMETAFILEPICT(); - test_pack_wireHPALETTE(); -} - -START_TEST(generated) -{ - test_pack(); -} diff --git a/rostests/winetests/shell32/msg.h b/rostests/winetests/shell32/msg.h deleted file mode 100644 index 361ccdbf598..00000000000 --- a/rostests/winetests/shell32/msg.h +++ /dev/null @@ -1,294 +0,0 @@ -/* Message Sequence Testing Code - * - * Copyright (C) 2007 James Hawkins - * Copyright (C) 2007 Lei Zhang - * - * 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 "wine/test.h" - -/* undocumented SWP flags - from SDK 3.1 */ -#define SWP_NOCLIENTSIZE 0x0800 -#define SWP_NOCLIENTMOVE 0x1000 - -typedef enum -{ - sent = 0x1, - posted = 0x2, - parent = 0x4, - wparam = 0x8, - lparam = 0x10, - defwinproc = 0x20, - beginpaint = 0x40, - optional = 0x80, - hook = 0x100, - winevent_hook =0x200, - id = 0x400 -} msg_flags_t; - -struct message -{ - UINT message; /* the WM_* code */ - msg_flags_t flags; /* message props */ - WPARAM wParam; /* expected value of wParam */ - LPARAM lParam; /* expected value of lParam */ - UINT id; /* extra message data: id of the window, - notify code etc. */ -}; - -struct msg_sequence -{ - int count; - int size; - struct message *sequence; -}; - -static void add_message(struct msg_sequence **seq, int sequence_index, - const struct message *msg) -{ - struct msg_sequence *msg_seq = seq[sequence_index]; - - if (!msg_seq->sequence) - { - msg_seq->size = 10; - msg_seq->sequence = HeapAlloc(GetProcessHeap(), 0, - msg_seq->size * sizeof (struct message)); - } - - if (msg_seq->count == msg_seq->size) - { - msg_seq->size *= 2; - msg_seq->sequence = HeapReAlloc(GetProcessHeap(), 0, - msg_seq->sequence, - msg_seq->size * sizeof (struct message)); - } - - assert(msg_seq->sequence); - - msg_seq->sequence[msg_seq->count].message = msg->message; - msg_seq->sequence[msg_seq->count].flags = msg->flags; - msg_seq->sequence[msg_seq->count].wParam = msg->wParam; - msg_seq->sequence[msg_seq->count].lParam = msg->lParam; - msg_seq->sequence[msg_seq->count].id = msg->id; - - msg_seq->count++; -} - -static void flush_sequence(struct msg_sequence **seg, int sequence_index) -{ - struct msg_sequence *msg_seq = seg[sequence_index]; - HeapFree(GetProcessHeap(), 0, msg_seq->sequence); - msg_seq->sequence = NULL; - msg_seq->count = msg_seq->size = 0; -} - -static void flush_sequences(struct msg_sequence **seq, int n) -{ - int i; - - for (i = 0; i < n; i++) - flush_sequence(seq, i); -} - -static void ok_sequence_(struct msg_sequence **seq, int sequence_index, - const struct message *expected, const char *context, int todo, - const char *file, int line) -{ - struct msg_sequence *msg_seq = seq[sequence_index]; - static const struct message end_of_sequence = {0, 0, 0, 0}; - const struct message *actual, *sequence; - int failcount = 0; - - add_message(seq, sequence_index, &end_of_sequence); - - sequence = msg_seq->sequence; - actual = sequence; - - while (expected->message && actual->message) - { - trace_( file, line)("expected %04x - actual %04x\n", expected->message, actual->message); - - if (expected->message == actual->message) - { - if (expected->flags & wparam) - { - if (expected->wParam != actual->wParam && todo) - { - todo_wine - { - failcount++; - ok_(file, line) (FALSE, - "%s: in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n", - context, expected->message, expected->wParam, actual->wParam); - } - } - else - { - ok_(file, line) (expected->wParam == actual->wParam, - "%s: in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n", - context, expected->message, expected->wParam, actual->wParam); - } - } - - if (expected->flags & lparam) - { - if (expected->lParam != actual->lParam && todo) - { - todo_wine - { - failcount++; - ok_(file, line) (FALSE, - "%s: in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n", - context, expected->message, expected->lParam, actual->lParam); - } - } - else - { - ok_(file, line) (expected->lParam == actual->lParam, - "%s: in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n", - context, expected->message, expected->lParam, actual->lParam); - } - } - - if (expected->flags & id) - { - if (expected->id != actual->id && expected->flags & optional) - { - expected++; - continue; - } - if (expected->id != actual->id && todo) - { - todo_wine - { - failcount++; - ok_(file, line) (FALSE, - "%s: in msg 0x%04x expecting id 0x%x got 0x%x\n", - context, expected->message, expected->id, actual->id); - } - } - else - { - ok_(file, line) (expected->id == actual->id, - "%s: in msg 0x%04x expecting id 0x%x got 0x%x\n", - context, expected->message, expected->id, actual->id); - } - } - - if ((expected->flags & defwinproc) != (actual->flags & defwinproc) && todo) - { - todo_wine - { - failcount++; - ok_(file, line) (FALSE, - "%s: the msg 0x%04x should %shave been sent by DefWindowProc\n", - context, expected->message, (expected->flags & defwinproc) ? "" : "NOT "); - } - } - else - { - ok_(file, line) ((expected->flags & defwinproc) == (actual->flags & defwinproc), - "%s: the msg 0x%04x should %shave been sent by DefWindowProc\n", - context, expected->message, (expected->flags & defwinproc) ? "" : "NOT "); - } - - ok_(file, line) ((expected->flags & beginpaint) == (actual->flags & beginpaint), - "%s: the msg 0x%04x should %shave been sent by BeginPaint\n", - context, expected->message, (expected->flags & beginpaint) ? "" : "NOT "); - ok_(file, line) ((expected->flags & (sent|posted)) == (actual->flags & (sent|posted)), - "%s: the msg 0x%04x should have been %s\n", - context, expected->message, (expected->flags & posted) ? "posted" : "sent"); - ok_(file, line) ((expected->flags & parent) == (actual->flags & parent), - "%s: the msg 0x%04x was expected in %s\n", - context, expected->message, (expected->flags & parent) ? "parent" : "child"); - ok_(file, line) ((expected->flags & hook) == (actual->flags & hook), - "%s: the msg 0x%04x should have been sent by a hook\n", - context, expected->message); - ok_(file, line) ((expected->flags & winevent_hook) == (actual->flags & winevent_hook), - "%s: the msg 0x%04x should have been sent by a winevent hook\n", - context, expected->message); - expected++; - actual++; - } - else if (expected->flags & optional) - expected++; - else if (todo) - { - failcount++; - todo_wine - { - ok_(file, line) (FALSE, "%s: the msg 0x%04x was expected, but got msg 0x%04x instead\n", - context, expected->message, actual->message); - } - - flush_sequence(seq, sequence_index); - return; - } - else - { - ok_(file, line) (FALSE, "%s: the msg 0x%04x was expected, but got msg 0x%04x instead\n", - context, expected->message, actual->message); - expected++; - actual++; - } - } - - /* skip all optional trailing messages */ - while (expected->message && ((expected->flags & optional))) - expected++; - - if (todo) - { - todo_wine - { - if (expected->message || actual->message) - { - failcount++; - ok_(file, line) (FALSE, "%s: the msg sequence is not complete: expected %04x - actual %04x\n", - context, expected->message, actual->message); - } - } - } - else if (expected->message || actual->message) - { - ok_(file, line) (FALSE, "%s: the msg sequence is not complete: expected %04x - actual %04x\n", - context, expected->message, actual->message); - } - - if(todo && !failcount) /* succeeded yet marked todo */ - { - todo_wine - { - ok_(file, line)(TRUE, "%s: marked \"todo_wine\" but succeeds\n", context); - } - } - - flush_sequence(seq, sequence_index); -} - -#define ok_sequence(seq, index, exp, contx, todo) \ - ok_sequence_(seq, index, (exp), (contx), (todo), __FILE__, __LINE__) - - -static void init_msg_sequences(struct msg_sequence **seq, int n) -{ - int i; - - for (i = 0; i < n; i++) - seq[i] = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct msg_sequence)); -} diff --git a/rostests/winetests/shell32/progman_dde.c b/rostests/winetests/shell32/progman_dde.c deleted file mode 100644 index 1e3239da818..00000000000 --- a/rostests/winetests/shell32/progman_dde.c +++ /dev/null @@ -1,749 +0,0 @@ -/* - * Unit test of the Program Manager DDE Interfaces - * - * Copyright 2009 Mikey Alexander - * - * 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 - */ - -/* DDE Program Manager Tests - * - Covers basic CreateGroup, ShowGroup, DeleteGroup, AddItem, and DeleteItem - * functionality - * - Todo: Handle CommonGroupFlag - * Better AddItem Tests (Lots of parameters to test) - * Tests for Invalid Characters in Names / Invalid Parameters - */ - -#include -#include -#include -#include "dde.h" -#include "ddeml.h" -#include "winuser.h" -#include "shlobj.h" - -/* Timeout on DdeClientTransaction Call */ -#define MS_TIMEOUT_VAL 1000 -/* # of times to poll for window creation */ -#define PDDE_POLL_NUM 150 -/* time to sleep between polls */ -#define PDDE_POLL_TIME 300 - -/* Call Info */ -#define DDE_TEST_MISC 0x00010000 -#define DDE_TEST_CREATEGROUP 0x00020000 -#define DDE_TEST_DELETEGROUP 0x00030000 -#define DDE_TEST_SHOWGROUP 0x00040000 -#define DDE_TEST_ADDITEM 0x00050000 -#define DDE_TEST_DELETEITEM 0x00060000 -#define DDE_TEST_COMPOUND 0x00070000 -#define DDE_TEST_CALLMASK 0x00ff0000 - -#define DDE_TEST_NUMMASK 0x0000ffff - -static HRESULT (WINAPI *pSHGetLocalizedName)(LPCWSTR, LPWSTR, UINT, int *); -static BOOL (WINAPI *pSHGetSpecialFolderPathA)(HWND, LPSTR, int, BOOL); -static BOOL (WINAPI *pReadCabinetState)(CABINETSTATE *, int); - -static void init_function_pointers(void) -{ - HMODULE hmod; - - hmod = GetModuleHandleA("shell32.dll"); - pSHGetLocalizedName = (void*)GetProcAddress(hmod, "SHGetLocalizedName"); - pSHGetSpecialFolderPathA = (void*)GetProcAddress(hmod, "SHGetSpecialFolderPathA"); - pReadCabinetState = (void*)GetProcAddress(hmod, "ReadCabinetState"); - if (!pReadCabinetState) - pReadCabinetState = (void*)GetProcAddress(hmod, (LPSTR)651); -} - -static BOOL use_common(void) -{ - HMODULE hmod; - static BOOL (WINAPI *pIsNTAdmin)(DWORD, LPDWORD); - - /* IsNTAdmin() is available on all platforms. */ - hmod = LoadLibraryA("advpack.dll"); - pIsNTAdmin = (void*)GetProcAddress(hmod, "IsNTAdmin"); - - if (!pIsNTAdmin(0, NULL)) - { - /* We are definitely not an administrator */ - FreeLibrary(hmod); - return FALSE; - } - FreeLibrary(hmod); - - /* If we end up here we are on NT4+ as Win9x and WinMe don't have the - * notion of administrators (as we need it). - */ - - /* As of Vista we should always use the users directory. Tests with the - * real Administrator account on Windows 7 proved this. - * - * FIXME: We need a better way of identifying Vista+ as currently this check - * also covers Wine and we don't know yet which behavior we want to follow. - */ - if (pSHGetLocalizedName) - return FALSE; - - return TRUE; -} - -static BOOL full_title(void) -{ - CABINETSTATE cs; - - memset(&cs, 0, sizeof(cs)); - if (pReadCabinetState) - { - pReadCabinetState(&cs, sizeof(cs)); - } - else - { - HKEY key; - DWORD size; - - win_skip("ReadCabinetState is not available, reading registry directly\n"); - RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CabinetState", &key); - size = sizeof(cs); - RegQueryValueExA(key, "Settings", NULL, NULL, (LPBYTE)&cs, &size); - RegCloseKey(key); - } - - return (cs.fFullPathTitle == -1); -} - -static char ProgramsDir[MAX_PATH]; - -static char Group1Title[MAX_PATH] = "Group1"; -static char Group2Title[MAX_PATH] = "Group2"; -static char Group3Title[MAX_PATH] = "Group3"; -static char StartupTitle[MAX_PATH] = "Startup"; - -static void init_strings(void) -{ - char startup[MAX_PATH]; - char commonprograms[MAX_PATH]; - char programs[MAX_PATH]; - - if (pSHGetSpecialFolderPathA) - { - pSHGetSpecialFolderPathA(NULL, programs, CSIDL_PROGRAMS, FALSE); - pSHGetSpecialFolderPathA(NULL, commonprograms, CSIDL_COMMON_PROGRAMS, FALSE); - pSHGetSpecialFolderPathA(NULL, startup, CSIDL_STARTUP, FALSE); - } - else - { - HKEY key; - DWORD size; - - /* Older Win9x and NT4 */ - - RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", &key); - size = sizeof(programs); - RegQueryValueExA(key, "Programs", NULL, NULL, (LPBYTE)&programs, &size); - size = sizeof(startup); - RegQueryValueExA(key, "Startup", NULL, NULL, (LPBYTE)&startup, &size); - RegCloseKey(key); - - RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", &key); - size = sizeof(commonprograms); - RegQueryValueExA(key, "Common Programs", NULL, NULL, (LPBYTE)&commonprograms, &size); - RegCloseKey(key); - } - - /* ProgramsDir on Vista+ is always the users one (CSIDL_PROGRAMS). Before Vista - * it depends on whether the user is an administrator (CSIDL_COMMON_PROGRAMS) or - * not (CSIDL_PROGRAMS). - */ - if (use_common()) - lstrcpyA(ProgramsDir, commonprograms); - else - lstrcpyA(ProgramsDir, programs); - - if (full_title()) - { - lstrcpyA(Group1Title, ProgramsDir); - lstrcatA(Group1Title, "\\Group1"); - lstrcpyA(Group2Title, ProgramsDir); - lstrcatA(Group2Title, "\\Group2"); - lstrcpyA(Group3Title, ProgramsDir); - lstrcatA(Group3Title, "\\Group3"); - - lstrcpyA(StartupTitle, startup); - } - else - { - /* Vista has the nice habit of displaying the full path in English - * and the short one localized. CSIDL_STARTUP on Vista gives us the - * English version so we have to 'translate' this one. - * - * MSDN claims it should be used for files not folders but this one - * suits our purposes just fine. - */ - if (pSHGetLocalizedName) - { - WCHAR startupW[MAX_PATH]; - WCHAR module[MAX_PATH]; - WCHAR module_expanded[MAX_PATH]; - WCHAR localized[MAX_PATH]; - HRESULT hr; - int id; - - MultiByteToWideChar(CP_ACP, 0, startup, -1, startupW, sizeof(startupW)/sizeof(WCHAR)); - hr = pSHGetLocalizedName(startupW, module, MAX_PATH, &id); - todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); - /* check to be removed when SHGetLocalizedName is implemented */ - if (hr == S_OK) - { - ExpandEnvironmentStringsW(module, module_expanded, MAX_PATH); - LoadStringW(GetModuleHandleW(module_expanded), id, localized, MAX_PATH); - - WideCharToMultiByte(CP_ACP, 0, localized, -1, StartupTitle, sizeof(StartupTitle), NULL, NULL); - } - else - lstrcpyA(StartupTitle, (strrchr(startup, '\\') + 1)); - } - else - { - lstrcpyA(StartupTitle, (strrchr(startup, '\\') + 1)); - } - } -} - -static HDDEDATA CALLBACK DdeCallback(UINT type, UINT format, HCONV hConv, HSZ hsz1, HSZ hsz2, - HDDEDATA hDDEData, ULONG_PTR data1, ULONG_PTR data2) -{ - trace("Callback: type=%i, format=%i\n", type, format); - return NULL; -} - -/* - * Encoded String for Error Messages so that inner failures can determine - * what test is failing. Format is: [Code:TestNum] - */ -static const char * GetStringFromTestParams(int testParams) -{ - int testNum; - static char testParamString[64]; - const char *callId; - - testNum = testParams & DDE_TEST_NUMMASK; - switch (testParams & DDE_TEST_CALLMASK) - { - default: - case DDE_TEST_MISC: - callId = "MISC"; - break; - case DDE_TEST_CREATEGROUP: - callId = "C_G"; - break; - case DDE_TEST_DELETEGROUP: - callId = "D_G"; - break; - case DDE_TEST_SHOWGROUP: - callId = "S_G"; - break; - case DDE_TEST_ADDITEM: - callId = "A_I"; - break; - case DDE_TEST_DELETEITEM: - callId = "D_I"; - break; - case DDE_TEST_COMPOUND: - callId = "CPD"; - break; - } - - sprintf(testParamString, " [%s:%i]", callId, testNum); - return testParamString; -} - -/* Transfer DMLERR's into text readable strings for Error Messages */ -#define DMLERR_TO_STR(x) case x: return#x; -static const char * GetStringFromError(UINT err) -{ - switch (err) - { - DMLERR_TO_STR(DMLERR_NO_ERROR); - DMLERR_TO_STR(DMLERR_ADVACKTIMEOUT); - DMLERR_TO_STR(DMLERR_BUSY); - DMLERR_TO_STR(DMLERR_DATAACKTIMEOUT); - DMLERR_TO_STR(DMLERR_DLL_NOT_INITIALIZED); - DMLERR_TO_STR(DMLERR_DLL_USAGE); - DMLERR_TO_STR(DMLERR_EXECACKTIMEOUT); - DMLERR_TO_STR(DMLERR_INVALIDPARAMETER); - DMLERR_TO_STR(DMLERR_LOW_MEMORY); - DMLERR_TO_STR(DMLERR_MEMORY_ERROR); - DMLERR_TO_STR(DMLERR_NOTPROCESSED); - DMLERR_TO_STR(DMLERR_NO_CONV_ESTABLISHED); - DMLERR_TO_STR(DMLERR_POKEACKTIMEOUT); - DMLERR_TO_STR(DMLERR_POSTMSG_FAILED); - DMLERR_TO_STR(DMLERR_REENTRANCY); - DMLERR_TO_STR(DMLERR_SERVER_DIED); - DMLERR_TO_STR(DMLERR_SYS_ERROR); - DMLERR_TO_STR(DMLERR_UNADVACKTIMEOUT); - DMLERR_TO_STR(DMLERR_UNFOUND_QUEUE_ID); - default: - return "Unknown DML Error"; - } -} - -/* Helper Function to Transfer DdeGetLastError into a String */ -static const char * GetDdeLastErrorStr(DWORD instance) -{ - UINT err = DdeGetLastError(instance); - - return GetStringFromError(err); -} - -/* Execute a Dde Command and return the error & result */ -/* Note: Progman DDE always returns a pointer to 0x00000001 on a successful result */ -static void DdeExecuteCommand(DWORD instance, HCONV hConv, const char *strCmd, HDDEDATA *hData, UINT *err, int testParams) -{ - HDDEDATA command; - - command = DdeCreateDataHandle(instance, (LPBYTE) strCmd, strlen(strCmd)+1, 0, 0L, 0, 0); - ok (command != NULL, "DdeCreateDataHandle Error %s.%s\n", - GetDdeLastErrorStr(instance), GetStringFromTestParams(testParams)); - *hData = DdeClientTransaction((void *) command, - -1, - hConv, - 0, - 0, - XTYP_EXECUTE, - MS_TIMEOUT_VAL, - NULL); - - /* hData is technically a pointer, but for Program Manager, - * it is NULL (error) or 1 (success) - * TODO: Check other versions of Windows to verify 1 is returned. - * While it is unlikely that anyone is actually testing that the result is 1 - * if all versions of windows return 1, Wine should also. - */ - if (*hData == NULL) - { - *err = DdeGetLastError(instance); - } - else - { - *err = DMLERR_NO_ERROR; - todo_wine - { - ok(*hData == (HDDEDATA) 1, "Expected HDDEDATA Handle == 1, actually %p.%s\n", - *hData, GetStringFromTestParams(testParams)); - } - } - DdeFreeDataHandle(command); -} - -/* - * Check if Window is onscreen with the appropriate name. - * - * Windows are not created synchronously. So we do not know - * when and if the window will be created/shown on screen. - * This function implements a polling mechanism to determine - * creation. - * A more complicated method would be to use SetWindowsHookEx. - * Since polling worked fine in my testing, no reason to implement - * the other. Comments about other methods of determining when - * window creation happened were not encouraging (not including - * SetWindowsHookEx). - */ -static void CheckWindowCreated(const char *winName, int closeWindow, int testParams) -{ - HWND window = NULL; - int i; - - /* Poll for Window Creation */ - for (i = 0; window == NULL && i < PDDE_POLL_NUM; i++) - { - Sleep(PDDE_POLL_TIME); - window = FindWindowA(NULL, winName); - } - ok (window != NULL, "Window \"%s\" was not created in %i seconds - assumed failure.%s\n", - winName, PDDE_POLL_NUM*PDDE_POLL_TIME/1000, GetStringFromTestParams(testParams)); - - /* Close Window as desired. */ - if (window != NULL && closeWindow) - { - SendMessageA(window, WM_SYSCOMMAND, SC_CLOSE, 0); - } -} - -/* Check for Existence (or non-existence) of a file or group - * When testing for existence of a group, groupName is not needed - */ -static void CheckFileExistsInProgramGroups(const char *nameToCheck, int shouldExist, int isGroup, - const char *groupName, int testParams) -{ - char path[MAX_PATH]; - DWORD attributes; - int len; - - lstrcpyA(path, ProgramsDir); - - len = strlen(path) + strlen(nameToCheck)+1; - if (groupName != NULL) - { - len += strlen(groupName)+1; - } - ok (len <= MAX_PATH, "Path Too Long.%s\n", GetStringFromTestParams(testParams)); - if (len <= MAX_PATH) - { - if (groupName != NULL) - { - strcat(path, "\\"); - strcat(path, groupName); - } - strcat(path, "\\"); - strcat(path, nameToCheck); - attributes = GetFileAttributes(path); - if (!shouldExist) - { - ok (attributes == INVALID_FILE_ATTRIBUTES , "File exists and shouldn't %s.%s\n", - path, GetStringFromTestParams(testParams)); - } else { - if (attributes == INVALID_FILE_ATTRIBUTES) - { - ok (FALSE, "Created File %s doesn't exist.%s\n", path, GetStringFromTestParams(testParams)); - } else if (isGroup) { - ok (attributes & FILE_ATTRIBUTE_DIRECTORY, "%s is not a folder (attr=%x).%s\n", - path, attributes, GetStringFromTestParams(testParams)); - } else { - ok (attributes & FILE_ATTRIBUTE_ARCHIVE, "Created File %s has wrong attributes (%x).%s\n", - path, attributes, GetStringFromTestParams(testParams)); - } - } - } -} - -/* Create Group Test. - * command and expected_result. - * if expected_result is DMLERR_NO_ERROR, test - * 1. group was created - * 2. window is open - */ -static void CreateGroupTest(DWORD instance, HCONV hConv, const char *command, UINT expected_result, - const char *groupName, const char *windowTitle, int testParams) -{ - HDDEDATA hData; - UINT error; - - /* Execute Command & Check Result */ - DdeExecuteCommand(instance, hConv, command, &hData, &error, testParams); - todo_wine - { - ok (expected_result == error, "CreateGroup %s: Expected Error %s, received %s.%s\n", - groupName, GetStringFromError(expected_result), GetStringFromError(error), - GetStringFromTestParams(testParams)); - } - - /* No Error */ - if (error == DMLERR_NO_ERROR) - { - - /* Check if Group Now Exists */ - CheckFileExistsInProgramGroups(groupName, TRUE, TRUE, NULL, testParams); - /* Check if Window is Open (polling) */ - CheckWindowCreated(windowTitle, TRUE, testParams); - } -} - -/* Show Group Test. - * DDE command, expected_result, and the group name to check for existence - * if expected_result is DMLERR_NO_ERROR, test - * 1. window is open - */ -static void ShowGroupTest(DWORD instance, HCONV hConv, const char *command, UINT expected_result, - const char *groupName, const char *windowTitle, int closeAfterShowing, int testParams) -{ - HDDEDATA hData; - UINT error; - - DdeExecuteCommand(instance, hConv, command, &hData, &error, testParams); -/* todo_wine... Is expected to fail, wine stubbed functions DO fail */ -/* TODO REMOVE THIS CODE!!! */ - if (expected_result == DMLERR_NOTPROCESSED) - { - ok (expected_result == error, "ShowGroup %s: Expected Error %s, received %s.%s\n", - groupName, GetStringFromError(expected_result), GetStringFromError(error), - GetStringFromTestParams(testParams)); - } else { - todo_wine - { - ok (expected_result == error, "ShowGroup %s: Expected Error %s, received %s.%s\n", - groupName, GetStringFromError(expected_result), GetStringFromError(error), - GetStringFromTestParams(testParams)); - } - } - - if (error == DMLERR_NO_ERROR) - { - /* Check if Window is Open (polling) */ - CheckWindowCreated(windowTitle, closeAfterShowing, testParams); - } -} - -/* Delete Group Test. - * DDE command, expected_result, and the group name to check for existence - * if expected_result is DMLERR_NO_ERROR, test - * 1. group does not exist - */ -static void DeleteGroupTest(DWORD instance, HCONV hConv, const char *command, UINT expected_result, - const char *groupName, int testParams) -{ - HDDEDATA hData; - UINT error; - - DdeExecuteCommand(instance, hConv, command, &hData, &error, testParams); - todo_wine - { - ok (expected_result == error, "DeleteGroup %s: Expected Error %s, received %s.%s\n", - groupName, GetStringFromError(expected_result), GetStringFromError(error), - GetStringFromTestParams(testParams)); - } - - if (error == DMLERR_NO_ERROR) - { - /* Check that Group does not exist */ - CheckFileExistsInProgramGroups(groupName, FALSE, TRUE, NULL, testParams); - } -} - -/* Add Item Test - * DDE command, expected result, and group and file name where it should exist. - * checks to make sure error code matches expected error code - * checks to make sure item exists if successful - */ -static void AddItemTest(DWORD instance, HCONV hConv, const char *command, UINT expected_result, - const char *fileName, const char *groupName, int testParams) -{ - HDDEDATA hData; - UINT error; - - DdeExecuteCommand(instance, hConv, command, &hData, &error, testParams); - todo_wine - { - ok (expected_result == error, "AddItem %s: Expected Error %s, received %s.%s\n", - fileName, GetStringFromError(expected_result), GetStringFromError(error), - GetStringFromTestParams(testParams)); - } - - if (error == DMLERR_NO_ERROR) - { - /* Check that File exists */ - CheckFileExistsInProgramGroups(fileName, TRUE, FALSE, groupName, testParams); - } -} - -/* Delete Item Test. - * DDE command, expected result, and group and file name where it should exist. - * checks to make sure error code matches expected error code - * checks to make sure item does not exist if successful - */ -static void DeleteItemTest(DWORD instance, HCONV hConv, const char *command, UINT expected_result, - const char *fileName, const char *groupName, int testParams) -{ - HDDEDATA hData; - UINT error; - - DdeExecuteCommand(instance, hConv, command, &hData, &error, testParams); - todo_wine - { - ok (expected_result == error, "DeleteItem %s: Expected Error %s, received %s.%s\n", - fileName, GetStringFromError(expected_result), GetStringFromError(error), - GetStringFromTestParams(testParams)); - } - - if (error == DMLERR_NO_ERROR) - { - /* Check that File does not exist */ - CheckFileExistsInProgramGroups(fileName, FALSE, FALSE, groupName, testParams); - } -} - -/* Compound Command Test. - * not really generic, assumes command of the form: - * [CreateGroup ...][AddItem ...][AddItem ...] - * All samples I've seen using Compound were of this form (CreateGroup, - * AddItems) so this covers minimum expected functionality. - */ -static void CompoundCommandTest(DWORD instance, HCONV hConv, const char *command, UINT expected_result, - const char *groupName, const char *windowTitle, const char *fileName1, - const char *fileName2, int testParams) -{ - HDDEDATA hData; - UINT error; - - DdeExecuteCommand(instance, hConv, command, &hData, &error, testParams); - todo_wine - { - ok (expected_result == error, "Compound String %s: Expected Error %s, received %s.%s\n", - command, GetStringFromError(expected_result), GetStringFromError(error), - GetStringFromTestParams(testParams)); - } - - if (error == DMLERR_NO_ERROR) - { - /* Check that File exists */ - CheckFileExistsInProgramGroups(groupName, TRUE, TRUE, NULL, testParams); - CheckWindowCreated(windowTitle, FALSE, testParams); - CheckFileExistsInProgramGroups(fileName1, TRUE, FALSE, groupName, testParams); - CheckFileExistsInProgramGroups(fileName2, TRUE, FALSE, groupName, testParams); - } -} - -static void CreateAddItemText(char *itemtext, const char *cmdline, const char *name) -{ - lstrcpyA(itemtext, "[AddItem("); - lstrcatA(itemtext, cmdline); - lstrcatA(itemtext, ","); - lstrcatA(itemtext, name); - lstrcatA(itemtext, ")]"); -} - -/* 1st set of tests */ -static int DdeTestProgman(DWORD instance, HCONV hConv) -{ - HDDEDATA hData; - UINT error; - int testnum; - char temppath[MAX_PATH]; - char f1g1[MAX_PATH], f2g1[MAX_PATH], f3g1[MAX_PATH], f1g3[MAX_PATH], f2g3[MAX_PATH]; - char itemtext[MAX_PATH + 20]; - char comptext[2 * (MAX_PATH + 20) + 21]; - - testnum = 1; - /* Invalid Command */ - DdeExecuteCommand(instance, hConv, "[InvalidCommand()]", &hData, &error, DDE_TEST_MISC|testnum++); - ok (error == DMLERR_NOTPROCESSED, "InvalidCommand(), expected error %s, received %s.\n", - GetStringFromError(DMLERR_NOTPROCESSED), GetStringFromError(error)); - - /* On Vista+ the files have to exist when adding a link */ - GetTempPathA(MAX_PATH, temppath); - GetTempFileNameA(temppath, "dde", 0, f1g1); - GetTempFileNameA(temppath, "dde", 0, f2g1); - GetTempFileNameA(temppath, "dde", 0, f3g1); - GetTempFileNameA(temppath, "dde", 0, f1g3); - GetTempFileNameA(temppath, "dde", 0, f2g3); - - /* CreateGroup Tests (including AddItem, DeleteItem) */ - CreateGroupTest(instance, hConv, "[CreateGroup(Group1)]", DMLERR_NO_ERROR, "Group1", Group1Title, DDE_TEST_CREATEGROUP|testnum++); - CreateAddItemText(itemtext, f1g1, "f1g1Name"); - AddItemTest(instance, hConv, itemtext, DMLERR_NO_ERROR, "f1g1Name.lnk", "Group1", DDE_TEST_ADDITEM|testnum++); - CreateAddItemText(itemtext, f2g1, "f2g1Name"); - AddItemTest(instance, hConv, itemtext, DMLERR_NO_ERROR, "f2g1Name.lnk", "Group1", DDE_TEST_ADDITEM|testnum++); - DeleteItemTest(instance, hConv, "[DeleteItem(f2g1Name)]", DMLERR_NO_ERROR, "f2g1Name.lnk", "Group1", DDE_TEST_DELETEITEM|testnum++); - CreateAddItemText(itemtext, f3g1, "f3g1Name"); - AddItemTest(instance, hConv, itemtext, DMLERR_NO_ERROR, "f3g1Name.lnk", "Group1", DDE_TEST_ADDITEM|testnum++); - CreateGroupTest(instance, hConv, "[CreateGroup(Group2)]", DMLERR_NO_ERROR, "Group2", Group2Title, DDE_TEST_CREATEGROUP|testnum++); - /* Create Group that already exists - same instance */ - CreateGroupTest(instance, hConv, "[CreateGroup(Group1)]", DMLERR_NO_ERROR, "Group1", Group1Title, DDE_TEST_CREATEGROUP|testnum++); - - /* ShowGroup Tests */ - ShowGroupTest(instance, hConv, "[ShowGroup(Group1)]", DMLERR_NOTPROCESSED, "Group1", Group1Title, TRUE, DDE_TEST_SHOWGROUP|testnum++); - DeleteItemTest(instance, hConv, "[DeleteItem(f3g1Name)]", DMLERR_NO_ERROR, "f3g1Name.lnk", "Group1", DDE_TEST_DELETEITEM|testnum++); - ShowGroupTest(instance, hConv, "[ShowGroup(Startup,0)]", DMLERR_NO_ERROR, "Startup", StartupTitle, TRUE, DDE_TEST_SHOWGROUP|testnum++); - ShowGroupTest(instance, hConv, "[ShowGroup(Group1,0)]", DMLERR_NO_ERROR, "Group1", Group1Title, FALSE, DDE_TEST_SHOWGROUP|testnum++); - - /* DeleteGroup Test - Note that Window is Open for this test */ - DeleteGroupTest(instance, hConv, "[DeleteGroup(Group1)]", DMLERR_NO_ERROR, "Group1", DDE_TEST_DELETEGROUP|testnum++); - - /* Compound Execute String Command */ - lstrcpyA(comptext, "[CreateGroup(Group3)]"); - CreateAddItemText(itemtext, f1g3, "f1g3Name"); - lstrcatA(comptext, itemtext); - CreateAddItemText(itemtext, f2g3, "f2g3Name"); - lstrcatA(comptext, itemtext); - CompoundCommandTest(instance, hConv, comptext, DMLERR_NO_ERROR, "Group3", Group3Title, "f1g3Name.lnk", "f2g3Name.lnk", DDE_TEST_COMPOUND|testnum++); - - DeleteGroupTest(instance, hConv, "[DeleteGroup(Group3)]", DMLERR_NO_ERROR, "Group3", DDE_TEST_DELETEGROUP|testnum++); - - /* Full Parameters of Add Item */ - /* AddItem(CmdLine[,Name[,IconPath[,IconIndex[,xPos,yPos[,DefDir[,HotKey[,fMinimize[fSeparateSpace]]]]]]]) */ - - DeleteFileA(f1g1); - DeleteFileA(f2g1); - DeleteFileA(f3g1); - DeleteFileA(f1g3); - DeleteFileA(f2g3); - - return testnum; -} - -/* 2nd set of tests - 2nd connection */ -static void DdeTestProgman2(DWORD instance, HCONV hConv, int testnum) -{ - /* Create Group that already exists on a separate connection */ - CreateGroupTest(instance, hConv, "[CreateGroup(Group2)]", DMLERR_NO_ERROR, "Group2", Group2Title, DDE_TEST_CREATEGROUP|testnum++); - DeleteGroupTest(instance, hConv, "[DeleteGroup(Group2)]", DMLERR_NO_ERROR, "Group2", DDE_TEST_DELETEGROUP|testnum++); -} - -START_TEST(progman_dde) -{ - DWORD instance = 0; - UINT err; - HSZ hszProgman; - HCONV hConv; - int testnum; - - init_function_pointers(); - init_strings(); - - /* Initialize DDE Instance */ - err = DdeInitialize(&instance, DdeCallback, APPCMD_CLIENTONLY, 0); - ok (err == DMLERR_NO_ERROR, "DdeInitialize Error %s\n", GetStringFromError(err)); - - /* Create Connection */ - hszProgman = DdeCreateStringHandle(instance, "PROGMAN", CP_WINANSI); - ok (hszProgman != NULL, "DdeCreateStringHandle Error %s\n", GetDdeLastErrorStr(instance)); - hConv = DdeConnect(instance, hszProgman, hszProgman, NULL); - ok (DdeFreeStringHandle(instance, hszProgman), "DdeFreeStringHandle failure\n"); - /* Seeing failures on early versions of Windows Connecting to progman, exit if connection fails */ - if (hConv == NULL) - { - ok (DdeUninitialize(instance), "DdeUninitialize failed\n"); - return; - } - - /* Run Tests */ - testnum = DdeTestProgman(instance, hConv); - - /* Cleanup & Exit */ - ok (DdeDisconnect(hConv), "DdeDisonnect Error %s\n", GetDdeLastErrorStr(instance)); - ok (DdeUninitialize(instance), "DdeUninitialize failed\n"); - - /* 2nd Instance (Followup Tests) */ - /* Initialize DDE Instance */ - instance = 0; - err = DdeInitialize(&instance, DdeCallback, APPCMD_CLIENTONLY, 0); - ok (err == DMLERR_NO_ERROR, "DdeInitialize Error %s\n", GetStringFromError(err)); - - /* Create Connection */ - hszProgman = DdeCreateStringHandle(instance, "PROGMAN", CP_WINANSI); - ok (hszProgman != NULL, "DdeCreateStringHandle Error %s\n", GetDdeLastErrorStr(instance)); - hConv = DdeConnect(instance, hszProgman, hszProgman, NULL); - ok (hConv != NULL, "DdeConnect Error %s\n", GetDdeLastErrorStr(instance)); - ok (DdeFreeStringHandle(instance, hszProgman), "DdeFreeStringHandle failure\n"); - - /* Run Tests */ - DdeTestProgman2(instance, hConv, testnum); - - /* Cleanup & Exit */ - ok (DdeDisconnect(hConv), "DdeDisonnect Error %s\n", GetDdeLastErrorStr(instance)); - ok (DdeUninitialize(instance), "DdeUninitialize failed\n"); -} diff --git a/rostests/winetests/shell32/recyclebin.c b/rostests/winetests/shell32/recyclebin.c deleted file mode 100644 index d449b7e4f01..00000000000 --- a/rostests/winetests/shell32/recyclebin.c +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Tests for recycle bin functions - * - * Copyright 2011 Jay Yang - * - * 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 WIN32_LEAN_AND_MEAN -#include -#include "shellapi.h" - -#include -#include "wine/test.h" - -static int (WINAPI *pSHQueryRecycleBinA)(LPCSTR,LPSHQUERYRBINFO); -static int (WINAPI *pSHFileOperationA)(LPSHFILEOPSTRUCTA); - -static char int64_buffer[65]; -/* Note: This function uses a single buffer for the return value.*/ -static const char* str_from_int64(__int64 ll) -{ - - if (sizeof(ll) > sizeof(unsigned long) && ll >> 32) - sprintf(int64_buffer,"%lx%08lx",(unsigned long)(ll >> 32),(unsigned long)ll); - else - sprintf(int64_buffer,"%lx",(unsigned long)ll); - return int64_buffer; -} - -static void setup_pointers(void) -{ - HMODULE hshell32 = GetModuleHandleA("shell32.dll"); - pSHQueryRecycleBinA = (void*)GetProcAddress(hshell32, "SHQueryRecycleBinA"); - pSHFileOperationA = (void*)GetProcAddress(hshell32, "SHFileOperationA"); -} - -static void test_query_recyclebin(void) -{ - SHQUERYRBINFO info1={sizeof(info1),0xdeadbeef,0xdeadbeef}; - SHQUERYRBINFO info2={sizeof(info2),0xdeadbeef,0xdeadbeef}; - UINT written; - HRESULT hr; - HANDLE file; - SHFILEOPSTRUCTA shfo; - const CHAR name[] = "test.txt"; - CHAR buf[MAX_PATH + sizeof(name) + 1]; - if(!pSHQueryRecycleBinA) - { - skip("SHQueryRecycleBinA does not exist\n"); - return; - } - if(!pSHFileOperationA) - { - skip("SHFileOperationA does not exist\n"); - return; - } - GetCurrentDirectoryA(MAX_PATH, buf); - strcat(buf,"\\"); - strcat(buf,name); - buf[strlen(buf) + 1] = '\0'; - hr = pSHQueryRecycleBinA(buf,&info1); - ok(hr == S_OK, "SHQueryRecycleBinA failed with error 0x%x\n", hr); - ok(info1.i64Size!=0xdeadbeef,"i64Size not set\n"); - ok(info1.i64NumItems!=0xdeadbeef,"i64NumItems not set\n"); - /*create and send a file to the recycle bin*/ - file = CreateFileA(name,GENERIC_WRITE,0,NULL,CREATE_ALWAYS,0,NULL); - ok(file != INVALID_HANDLE_VALUE, "Failure to open file %s\n",name); - WriteFile(file,name,strlen(name),&written,NULL); - CloseHandle(file); - shfo.hwnd = NULL; - shfo.wFunc = FO_DELETE; - shfo.pFrom = buf; - shfo.pTo = NULL; - shfo.fFlags = FOF_FILESONLY | FOF_NOCONFIRMATION | FOF_SILENT | FOF_ALLOWUNDO; - shfo.hNameMappings = NULL; - shfo.lpszProgressTitle = NULL; - ok(!pSHFileOperationA(&shfo), "Deletion was not successful\n"); - hr = pSHQueryRecycleBinA(buf,&info2); - ok(hr == S_OK, "SHQueryRecycleBinW failed with error 0x%x\n", hr); - if(info2.i64Size!=info1.i64Size || info2.i64NumItems!=info1.i64NumItems) { - ok(info2.i64Size==info1.i64Size+written,"Expected recycle bin to have 0x%s bytes\n",str_from_int64(info1.i64Size+written)); - ok(info2.i64NumItems==info1.i64NumItems+1,"Expected recycle bin to have 0x%s items\n",str_from_int64(info1.i64NumItems+1)); - } else todo_wine { - ok(info2.i64Size==info1.i64Size+written,"Expected recycle bin to have 0x%s bytes\n",str_from_int64(info1.i64Size+written)); - ok(info2.i64NumItems==info1.i64NumItems+1,"Expected recycle bin to have 0x%s items\n",str_from_int64(info1.i64NumItems+1)); - } -} - - -START_TEST(recyclebin) -{ - setup_pointers(); - test_query_recyclebin(); -} diff --git a/rostests/winetests/shell32/rsrc.rc b/rostests/winetests/shell32/rsrc.rc deleted file mode 100644 index 00c949bcae7..00000000000 --- a/rostests/winetests/shell32/rsrc.rc +++ /dev/null @@ -1,28 +0,0 @@ -/* String resource for shlfolder test. - * - * Copyright 2008 Vincent Povirk 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 "windef.h" -#include "winuser.h" - -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL - -STRINGTABLE -{ - 1 "Folder Name Resource" -} diff --git a/rostests/winetests/shell32/shell32.rbuild b/rostests/winetests/shell32/shell32.rbuild deleted file mode 100644 index a503d9c6225..00000000000 --- a/rostests/winetests/shell32/shell32.rbuild +++ /dev/null @@ -1,39 +0,0 @@ - - - - - . - - 0x0501 - wine - shell32 - ole32 - oleaut32 - shlwapi - user32 - gdi32 - advapi32 - uuid - ntdll - appbar.c - autocomplete.c - brsfolder.c - ebrowser.c - generated.c - progman_dde.c - recyclebin.c - shelldispatch.c - shelllink.c - shellole.c - shellpath.c - shfldr_special.c - shlexec.c - shlfileop.c - shlfolder.c - shlview.c - string.c - systray.c - testlist.c - rsrc.rc - - diff --git a/rostests/winetests/shell32/shell32_test.h b/rostests/winetests/shell32/shell32_test.h deleted file mode 100755 index 42a74fb2d5f..00000000000 --- a/rostests/winetests/shell32/shell32_test.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Unit test suite for shell32 functions - * - * Copyright 2005 Francois Gouget 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 - */ - - -/* Helper function for creating .lnk files */ -typedef struct -{ - const char* description; - const char* workdir; - const char* path; - LPITEMIDLIST pidl; - const char* arguments; - int showcmd; - const char* icon; - int icon_id; - WORD hotkey; -} lnk_desc_t; - -#define create_lnk(a,b,c) create_lnk_(__LINE__, (a), (b), (c)) -void create_lnk_(int,const WCHAR*,lnk_desc_t*,int); diff --git a/rostests/winetests/shell32/shelldispatch.c b/rostests/winetests/shell32/shelldispatch.c deleted file mode 100644 index 2ccc364a2be..00000000000 --- a/rostests/winetests/shell32/shelldispatch.c +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Unit tests for IShellDispatch - * - * Copyright 2010 Alexander Morozov for Etersoft - * - * 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 NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include "shldisp.h" -#include "shlobj.h" -#include "shlwapi.h" -#include "wine/test.h" - -static HRESULT (WINAPI *pSHGetFolderPathW)(HWND, int, HANDLE, DWORD, LPWSTR); -static HRESULT (WINAPI *pSHGetNameFromIDList)(PCIDLIST_ABSOLUTE,SIGDN,PWSTR*); -static HRESULT (WINAPI *pSHGetSpecialFolderLocation)(HWND, int, LPITEMIDLIST *); -static DWORD (WINAPI *pGetLongPathNameW)(LPCWSTR, LPWSTR, DWORD); - -static void init_function_pointers(void) -{ - HMODULE hshell32, hkernel32; - - hshell32 = GetModuleHandleA("shell32.dll"); - hkernel32 = GetModuleHandleA("kernel32.dll"); - pSHGetFolderPathW = (void*)GetProcAddress(hshell32, "SHGetFolderPathW"); - pSHGetNameFromIDList = (void*)GetProcAddress(hshell32, "SHGetNameFromIDList"); - pSHGetSpecialFolderLocation = (void*)GetProcAddress(hshell32, - "SHGetSpecialFolderLocation"); - pGetLongPathNameW = (void*)GetProcAddress(hkernel32, "GetLongPathNameW"); -} - -static void test_namespace(void) -{ - static const WCHAR winetestW[] = {'w','i','n','e','t','e','s','t',0}; - static const WCHAR backslashW[] = {'\\',0}; - static const WCHAR clsidW[] = { - ':',':','{','6','4','5','F','F','0','4','0','-','5','0','8','1','-', - '1','0','1','B','-','9','F','0','8','-', - '0','0','A','A','0','0','2','F','9','5','4','E','}',0}; - - static WCHAR tempW[MAX_PATH], curW[MAX_PATH]; - WCHAR *long_pathW = NULL; - HRESULT r; - IShellDispatch *sd; - Folder *folder; - Folder2 *folder2; - FolderItem *item; - VARIANT var; - BSTR title, item_path; - int len; - - r = CoCreateInstance(&CLSID_Shell, NULL, CLSCTX_INPROC_SERVER, - &IID_IShellDispatch, (LPVOID*)&sd); - if (r == REGDB_E_CLASSNOTREG) /* NT4 */ - { - win_skip("skipping IShellDispatch tests\n"); - return; - } - ok(SUCCEEDED(r), "CoCreateInstance failed: %08x\n", r); - if (FAILED(r)) - return; - - VariantInit(&var); - folder = (void*)0xdeadbeef; - r = IShellDispatch_NameSpace(sd, var, &folder); - ok(r == S_FALSE, "expected S_FALSE, got %08x\n", r); - ok(folder == NULL, "expected NULL, got %p\n", folder); - - V_VT(&var) = VT_I4; - V_I4(&var) = -1; - folder = (void*)0xdeadbeef; - r = IShellDispatch_NameSpace(sd, var, &folder); - todo_wine { - ok(r == S_FALSE, "expected S_FALSE, got %08x\n", r); - ok(folder == NULL, "got %p\n", folder); -} - V_VT(&var) = VT_I4; - V_I4(&var) = ssfPROGRAMFILES; - r = IShellDispatch_NameSpace(sd, var, &folder); - ok(r == S_OK || - broken(r == S_FALSE), /* NT4 */ - "IShellDispatch::NameSpace failed: %08x\n", r); - if (r == S_OK) - { - static WCHAR path[MAX_PATH]; - - if (pSHGetFolderPathW) - { - r = pSHGetFolderPathW(NULL, CSIDL_PROGRAM_FILES, NULL, - SHGFP_TYPE_CURRENT, path); - ok(r == S_OK, "SHGetFolderPath failed: %08x\n", r); - } - r = Folder_get_Title(folder, &title); - todo_wine - ok(r == S_OK, "Folder::get_Title failed: %08x\n", r); - if (r == S_OK) - { - /* On Win2000-2003 title is equal to program files directory name in - HKLM\Software\Microsoft\Windows\CurrentVersion\ProgramFilesDir. - On newer Windows it seems constant and is not changed - if the program files directory name is changed */ - if (pSHGetSpecialFolderLocation && pSHGetNameFromIDList) - { - LPITEMIDLIST pidl; - PWSTR name; - - r = pSHGetSpecialFolderLocation(NULL, CSIDL_PROGRAM_FILES, &pidl); - ok(r == S_OK, "SHGetSpecialFolderLocation failed: %08x\n", r); - r = pSHGetNameFromIDList(pidl, SIGDN_NORMALDISPLAY, &name); - ok(r == S_OK, "SHGetNameFromIDList failed: %08x\n", r); - todo_wine - ok(!lstrcmpW(title, name), "expected %s, got %s\n", - wine_dbgstr_w(name), wine_dbgstr_w(title)); - CoTaskMemFree(name); - CoTaskMemFree(pidl); - } - else if (pSHGetFolderPathW) - { - WCHAR *p; - - p = path + lstrlenW(path); - while (path < p && *(p - 1) != '\\') - p--; - ok(!lstrcmpW(title, p), "expected %s, got %s\n", - wine_dbgstr_w(p), wine_dbgstr_w(title)); - } - else skip("skipping Folder::get_Title test\n"); - SysFreeString(title); - } - r = Folder_QueryInterface(folder, &IID_Folder2, (LPVOID*)&folder2); - ok(r == S_OK, "Folder::QueryInterface failed: %08x\n", r); - if (r == S_OK) - { - r = Folder2_get_Self(folder2, &item); - ok(r == S_OK, "Folder::get_Self failed: %08x\n", r); - if (r == S_OK) - { - r = FolderItem_get_Path(item, &item_path); - ok(r == S_OK, "FolderItem::get_Path failed: %08x\n", r); - if (pSHGetFolderPathW) - ok(!lstrcmpW(item_path, path), "expected %s, got %s\n", - wine_dbgstr_w(path), wine_dbgstr_w(item_path)); - SysFreeString(item_path); - FolderItem_Release(item); - } - Folder2_Release(folder2); - } - Folder_Release(folder); - } - - V_VT(&var) = VT_I4; - V_I4(&var) = ssfBITBUCKET; - r = IShellDispatch_NameSpace(sd, var, &folder); - ok(r == S_OK || - broken(r == S_FALSE), /* NT4 */ - "IShellDispatch::NameSpace failed: %08x\n", r); - if (r == S_OK) - { - r = Folder_QueryInterface(folder, &IID_Folder2, (LPVOID*)&folder2); - ok(r == S_OK || - broken(r == E_NOINTERFACE), /* NT4 */ - "Folder::QueryInterface failed: %08x\n", r); - if (r == S_OK) - { - r = Folder2_get_Self(folder2, &item); - ok(r == S_OK, "Folder::get_Self failed: %08x\n", r); - if (r == S_OK) - { - r = FolderItem_get_Path(item, &item_path); - todo_wine - ok(r == S_OK, "FolderItem::get_Path failed: %08x\n", r); - todo_wine - ok(!lstrcmpW(item_path, clsidW), "expected %s, got %s\n", - wine_dbgstr_w(clsidW), wine_dbgstr_w(item_path)); - SysFreeString(item_path); - FolderItem_Release(item); - } - Folder2_Release(folder2); - } - Folder_Release(folder); - } - - GetTempPathW(MAX_PATH, tempW); - GetCurrentDirectoryW(MAX_PATH, curW); - SetCurrentDirectoryW(tempW); - CreateDirectoryW(winetestW, NULL); - V_VT(&var) = VT_BSTR; - V_BSTR(&var) = SysAllocString(winetestW); - r = IShellDispatch_NameSpace(sd, var, &folder); - ok(r == S_FALSE, "expected S_FALSE, got %08x\n", r); - SysFreeString(V_BSTR(&var)); - - GetFullPathNameW(winetestW, MAX_PATH, tempW, NULL); - if (pGetLongPathNameW) - { - len = pGetLongPathNameW(tempW, NULL, 0); - long_pathW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); - if (long_pathW) - pGetLongPathNameW(tempW, long_pathW, len); - } - V_VT(&var) = VT_BSTR; - V_BSTR(&var) = SysAllocString(tempW); - r = IShellDispatch_NameSpace(sd, var, &folder); - ok(r == S_OK, "IShellDispatch::NameSpace failed: %08x\n", r); - if (r == S_OK) - { - r = Folder_get_Title(folder, &title); - ok(r == S_OK, "Folder::get_Title failed: %08x\n", r); - if (r == S_OK) - { - ok(!lstrcmpW(title, winetestW), "bad title: %s\n", - wine_dbgstr_w(title)); - SysFreeString(title); - } - r = Folder_QueryInterface(folder, &IID_Folder2, (LPVOID*)&folder2); - ok(r == S_OK || - broken(r == E_NOINTERFACE), /* NT4 */ - "Folder::QueryInterface failed: %08x\n", r); - if (r == S_OK) - { - r = Folder2_get_Self(folder2, &item); - ok(r == S_OK, "Folder::get_Self failed: %08x\n", r); - if (r == S_OK) - { - r = FolderItem_get_Path(item, &item_path); - ok(r == S_OK, "FolderItem::get_Path failed: %08x\n", r); - if (long_pathW) - ok(!lstrcmpW(item_path, long_pathW), - "expected %s, got %s\n", wine_dbgstr_w(long_pathW), - wine_dbgstr_w(item_path)); - SysFreeString(item_path); - FolderItem_Release(item); - } - Folder2_Release(folder2); - } - Folder_Release(folder); - } - SysFreeString(V_BSTR(&var)); - - len = lstrlenW(tempW); - if (len < MAX_PATH - 1) - { - lstrcatW(tempW, backslashW); - V_VT(&var) = VT_BSTR; - V_BSTR(&var) = SysAllocString(tempW); - r = IShellDispatch_NameSpace(sd, var, &folder); - ok(r == S_OK, "IShellDispatch::NameSpace failed: %08x\n", r); - if (r == S_OK) - { - r = Folder_get_Title(folder, &title); - ok(r == S_OK, "Folder::get_Title failed: %08x\n", r); - if (r == S_OK) - { - ok(!lstrcmpW(title, winetestW), "bad title: %s\n", - wine_dbgstr_w(title)); - SysFreeString(title); - } - r = Folder_QueryInterface(folder, &IID_Folder2, (LPVOID*)&folder2); - ok(r == S_OK || - broken(r == E_NOINTERFACE), /* NT4 */ - "Folder::QueryInterface failed: %08x\n", r); - if (r == S_OK) - { - r = Folder2_get_Self(folder2, &item); - ok(r == S_OK, "Folder::get_Self failed: %08x\n", r); - if (r == S_OK) - { - r = FolderItem_get_Path(item, &item_path); - ok(r == S_OK, "FolderItem::get_Path failed: %08x\n", r); - if (long_pathW) - ok(!lstrcmpW(item_path, long_pathW), - "expected %s, got %s\n", wine_dbgstr_w(long_pathW), - wine_dbgstr_w(item_path)); - SysFreeString(item_path); - FolderItem_Release(item); - } - Folder2_Release(folder2); - } - Folder_Release(folder); - } - SysFreeString(V_BSTR(&var)); - } - - HeapFree(GetProcessHeap(), 0, long_pathW); - RemoveDirectoryW(winetestW); - SetCurrentDirectoryW(curW); - IShellDispatch_Release(sd); -} - -START_TEST(shelldispatch) -{ - HRESULT r; - - r = CoInitialize(NULL); - ok(SUCCEEDED(r), "CoInitialize failed: %08x\n", r); - if (FAILED(r)) - return; - - init_function_pointers(); - test_namespace(); - - CoUninitialize(); -} diff --git a/rostests/winetests/shell32/shelllink.c b/rostests/winetests/shell32/shelllink.c deleted file mode 100755 index d28cff0ac27..00000000000 --- a/rostests/winetests/shell32/shelllink.c +++ /dev/null @@ -1,1028 +0,0 @@ -/* - * Unit tests for shelllinks - * - * Copyright 2004 Mike McCormack - * - * 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 - * This is a test program for the SHGet{Special}Folder{Path|Location} functions - * of shell32, that get either a filesystem path or a LPITEMIDLIST (shell - * namespace) path for a given folder (CSIDL value). - * - */ - -#define COBJMACROS - -#include "initguid.h" -#include "windows.h" -#include "shlguid.h" -#include "shobjidl.h" -#include "shlobj.h" -#include "wine/test.h" - -#include "shell32_test.h" - -#ifndef SLDF_HAS_LOGO3ID -# define SLDF_HAS_LOGO3ID 0x00000800 /* not available in the Vista SDK */ -#endif - -typedef void (WINAPI *fnILFree)(LPITEMIDLIST); -typedef BOOL (WINAPI *fnILIsEqual)(LPCITEMIDLIST, LPCITEMIDLIST); -typedef HRESULT (WINAPI *fnSHILCreateFromPath)(LPCWSTR, LPITEMIDLIST *,DWORD*); -typedef HRESULT (WINAPI *fnSHDefExtractIconA)(LPCSTR, int, UINT, HICON*, HICON*, UINT); - -static fnILFree pILFree; -static fnILIsEqual pILIsEqual; -static fnSHILCreateFromPath pSHILCreateFromPath; -static fnSHDefExtractIconA pSHDefExtractIconA; - -static DWORD (WINAPI *pGetLongPathNameA)(LPCSTR, LPSTR, DWORD); -static DWORD (WINAPI *pGetShortPathNameA)(LPCSTR, LPSTR, DWORD); - -static const GUID _IID_IShellLinkDataList = { - 0x45e2b4ae, 0xb1c3, 0x11d0, - { 0xb9, 0x2f, 0x00, 0xa0, 0xc9, 0x03, 0x12, 0xe1 } -}; - -static const WCHAR notafile[]= { 'C',':','\\','n','o','n','e','x','i','s','t','e','n','t','\\','f','i','l','e',0 }; - - -/* For some reason SHILCreateFromPath does not work on Win98 and - * SHSimpleIDListFromPathA does not work on NT4. But if we call both we - * get what we want on all platforms. - */ -static LPITEMIDLIST (WINAPI *pSHSimpleIDListFromPathAW)(LPCVOID); - -static LPITEMIDLIST path_to_pidl(const char* path) -{ - LPITEMIDLIST pidl; - - if (!pSHSimpleIDListFromPathAW) - { - HMODULE hdll=GetModuleHandleA("shell32.dll"); - pSHSimpleIDListFromPathAW=(void*)GetProcAddress(hdll, (char*)162); - if (!pSHSimpleIDListFromPathAW) - win_skip("SHSimpleIDListFromPathAW not found in shell32.dll\n"); - } - - pidl=NULL; - /* pSHSimpleIDListFromPathAW maps to A on non NT platforms */ - if (pSHSimpleIDListFromPathAW && (GetVersion() & 0x80000000)) - pidl=pSHSimpleIDListFromPathAW(path); - - if (!pidl) - { - WCHAR* pathW; - HRESULT r; - int len; - - len=MultiByteToWideChar(CP_ACP, 0, path, -1, NULL, 0); - pathW=HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)); - MultiByteToWideChar(CP_ACP, 0, path, -1, pathW, len); - - r=pSHILCreateFromPath(pathW, &pidl, NULL); - ok(r == S_OK, "SHILCreateFromPath failed (0x%08x)\n", r); - HeapFree(GetProcessHeap(), 0, pathW); - } - return pidl; -} - - -/* - * Test manipulation of an IShellLink's properties. - */ - -static void test_get_set(void) -{ - HRESULT r; - IShellLinkA *sl; - IShellLinkW *slW = NULL; - char mypath[MAX_PATH]; - char buffer[INFOTIPSIZE]; - LPITEMIDLIST pidl, tmp_pidl; - const char * str; - int i; - WORD w; - - r = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, - &IID_IShellLinkA, (LPVOID*)&sl); - ok(r == S_OK, "no IID_IShellLinkA (0x%08x)\n", r); - if (r != S_OK) - return; - - /* Test Getting / Setting the description */ - strcpy(buffer,"garbage"); - r = IShellLinkA_GetDescription(sl, buffer, sizeof(buffer)); - ok(r == S_OK, "GetDescription failed (0x%08x)\n", r); - ok(*buffer=='\0', "GetDescription returned '%s'\n", buffer); - - str="Some description"; - r = IShellLinkA_SetDescription(sl, str); - ok(r == S_OK, "SetDescription failed (0x%08x)\n", r); - - strcpy(buffer,"garbage"); - r = IShellLinkA_GetDescription(sl, buffer, sizeof(buffer)); - ok(r == S_OK, "GetDescription failed (0x%08x)\n", r); - ok(lstrcmp(buffer,str)==0, "GetDescription returned '%s'\n", buffer); - - r = IShellLinkA_SetDescription(sl, NULL); - ok(r == S_OK, "SetDescription failed (0x%08x)\n", r); - - strcpy(buffer,"garbage"); - r = IShellLinkA_GetDescription(sl, buffer, sizeof(buffer)); - ok(r == S_OK, "GetDescription failed (0x%08x)\n", r); - ok(*buffer=='\0' || broken(lstrcmp(buffer,str)==0), "GetDescription returned '%s'\n", buffer); /* NT4 */ - - - /* Test Getting / Setting the work directory */ - strcpy(buffer,"garbage"); - r = IShellLinkA_GetWorkingDirectory(sl, buffer, sizeof(buffer)); - ok(r == S_OK, "GetWorkingDirectory failed (0x%08x)\n", r); - ok(*buffer=='\0', "GetWorkingDirectory returned '%s'\n", buffer); - - str="c:\\nonexistent\\directory"; - r = IShellLinkA_SetWorkingDirectory(sl, str); - ok(r == S_OK, "SetWorkingDirectory failed (0x%08x)\n", r); - - strcpy(buffer,"garbage"); - r = IShellLinkA_GetWorkingDirectory(sl, buffer, sizeof(buffer)); - ok(r == S_OK, "GetWorkingDirectory failed (0x%08x)\n", r); - ok(lstrcmpi(buffer,str)==0, "GetWorkingDirectory returned '%s'\n", buffer); - - /* Test Getting / Setting the path */ - strcpy(buffer,"garbage"); - r = IShellLinkA_GetPath(sl, buffer, sizeof(buffer), NULL, SLGP_RAWPATH); - todo_wine ok(r == S_FALSE || broken(r == S_OK) /* NT4/W2K */, "GetPath failed (0x%08x)\n", r); - ok(*buffer=='\0', "GetPath returned '%s'\n", buffer); - - CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, - &IID_IShellLinkW, (LPVOID*)&slW); - if (!slW /* Win9x */ || !pGetLongPathNameA /* NT4 */) - skip("SetPath with NULL parameter crashes on Win9x and some NT4\n"); - else - { - IShellLinkW_Release(slW); - r = IShellLinkA_SetPath(sl, NULL); - ok(r==E_INVALIDARG || - broken(r==S_OK), /* Some Win95 and NT4 */ - "SetPath returned wrong error (0x%08x)\n", r); - } - - r = IShellLinkA_SetPath(sl, ""); - ok(r==S_OK, "SetPath failed (0x%08x)\n", r); - - strcpy(buffer,"garbage"); - r = IShellLinkA_GetPath(sl, buffer, sizeof(buffer), NULL, SLGP_RAWPATH); - todo_wine ok(r == S_FALSE, "GetPath failed (0x%08x)\n", r); - ok(*buffer=='\0', "GetPath returned '%s'\n", buffer); - - /* Win98 returns S_FALSE, but WinXP returns S_OK */ - str="c:\\nonexistent\\file"; - r = IShellLinkA_SetPath(sl, str); - ok(r==S_FALSE || r==S_OK, "SetPath failed (0x%08x)\n", r); - - strcpy(buffer,"garbage"); - r = IShellLinkA_GetPath(sl, buffer, sizeof(buffer), NULL, SLGP_RAWPATH); - ok(r == S_OK, "GetPath failed (0x%08x)\n", r); - ok(lstrcmpi(buffer,str)==0, "GetPath returned '%s'\n", buffer); - - /* Get some real path to play with */ - GetWindowsDirectoryA( mypath, sizeof(mypath)-12 ); - strcat(mypath, "\\regedit.exe"); - - /* Test the interaction of SetPath and SetIDList */ - tmp_pidl=NULL; - r = IShellLinkA_GetIDList(sl, &tmp_pidl); - ok(r == S_OK, "GetIDList failed (0x%08x)\n", r); - if (r == S_OK) - { - BOOL ret; - - strcpy(buffer,"garbage"); - ret = SHGetPathFromIDListA(tmp_pidl, buffer); - ok(ret, "SHGetPathFromIDListA failed\n"); - if (ret) - ok(lstrcmpi(buffer,str)==0, "GetIDList returned '%s'\n", buffer); - pILFree(tmp_pidl); - } - - pidl=path_to_pidl(mypath); - ok(pidl!=NULL, "path_to_pidl returned a NULL pidl\n"); - - if (pidl) - { - LPITEMIDLIST second_pidl; - - r = IShellLinkA_SetIDList(sl, pidl); - ok(r == S_OK, "SetIDList failed (0x%08x)\n", r); - - tmp_pidl=NULL; - r = IShellLinkA_GetIDList(sl, &tmp_pidl); - ok(r == S_OK, "GetIDList failed (0x%08x)\n", r); - ok(tmp_pidl && pILIsEqual(pidl, tmp_pidl), - "GetIDList returned an incorrect pidl\n"); - - r = IShellLinkA_GetIDList(sl, &second_pidl); - ok(r == S_OK, "GetIDList failed (0x%08x)\n", r); - ok(second_pidl && pILIsEqual(pidl, second_pidl), - "GetIDList returned an incorrect pidl\n"); - ok(second_pidl != tmp_pidl, "pidls are the same\n"); - - pILFree(second_pidl); - pILFree(tmp_pidl); - pILFree(pidl); - - strcpy(buffer,"garbage"); - r = IShellLinkA_GetPath(sl, buffer, sizeof(buffer), NULL, SLGP_RAWPATH); - ok(r == S_OK, "GetPath failed (0x%08x)\n", r); - todo_wine - ok(lstrcmpi(buffer, mypath)==0, "GetPath returned '%s'\n", buffer); - - } - - /* test path with quotes (IShellLinkA_SetPath returns S_FALSE on W2K and below and S_OK on XP and above */ - r = IShellLinkA_SetPath(sl, "\"c:\\nonexistent\\file\""); - ok(r==S_FALSE || r == S_OK, "SetPath failed (0x%08x)\n", r); - - strcpy(buffer,"garbage"); - r = IShellLinkA_GetPath(sl, buffer, sizeof(buffer), NULL, SLGP_RAWPATH); - ok(r==S_OK, "GetPath failed (0x%08x)\n", r); - ok(!lstrcmp(buffer, "C:\\nonexistent\\file") || - broken(!lstrcmp(buffer, "C:\\\"c:\\nonexistent\\file\"")), /* NT4 */ - "case doesn't match\n"); - - r = IShellLinkA_SetPath(sl, "\"c:\\foo"); - ok(r==S_FALSE || r == S_OK || r == E_INVALIDARG /* Vista */, "SetPath failed (0x%08x)\n", r); - - r = IShellLinkA_SetPath(sl, "\"\"c:\\foo"); - ok(r==S_FALSE || r == S_OK || r == E_INVALIDARG /* Vista */, "SetPath failed (0x%08x)\n", r); - - r = IShellLinkA_SetPath(sl, "c:\\foo\""); - ok(r==S_FALSE || r == S_OK || r == E_INVALIDARG /* Vista */, "SetPath failed (0x%08x)\n", r); - - r = IShellLinkA_SetPath(sl, "\"\"c:\\foo\""); - ok(r==S_FALSE || r == S_OK || r == E_INVALIDARG /* Vista */, "SetPath failed (0x%08x)\n", r); - - r = IShellLinkA_SetPath(sl, "\"\"c:\\foo\"\""); - ok(r==S_FALSE || r == S_OK || r == E_INVALIDARG /* Vista */, "SetPath failed (0x%08x)\n", r); - - /* Test Getting / Setting the arguments */ - strcpy(buffer,"garbage"); - r = IShellLinkA_GetArguments(sl, buffer, sizeof(buffer)); - ok(r == S_OK, "GetArguments failed (0x%08x)\n", r); - ok(*buffer=='\0', "GetArguments returned '%s'\n", buffer); - - str="param1 \"spaced param2\""; - r = IShellLinkA_SetArguments(sl, str); - ok(r == S_OK, "SetArguments failed (0x%08x)\n", r); - - strcpy(buffer,"garbage"); - r = IShellLinkA_GetArguments(sl, buffer, sizeof(buffer)); - ok(r == S_OK, "GetArguments failed (0x%08x)\n", r); - ok(lstrcmp(buffer,str)==0, "GetArguments returned '%s'\n", buffer); - - strcpy(buffer,"garbage"); - r = IShellLinkA_SetArguments(sl, NULL); - ok(r == S_OK, "SetArguments failed (0x%08x)\n", r); - r = IShellLinkA_GetArguments(sl, buffer, sizeof(buffer)); - ok(r == S_OK, "GetArguments failed (0x%08x)\n", r); - ok(!buffer[0] || lstrcmp(buffer,str)==0, "GetArguments returned '%s'\n", buffer); - - strcpy(buffer,"garbage"); - r = IShellLinkA_SetArguments(sl, ""); - ok(r == S_OK, "SetArguments failed (0x%08x)\n", r); - r = IShellLinkA_GetArguments(sl, buffer, sizeof(buffer)); - ok(r == S_OK, "GetArguments failed (0x%08x)\n", r); - ok(!buffer[0], "GetArguments returned '%s'\n", buffer); - - /* Test Getting / Setting showcmd */ - i=0xdeadbeef; - r = IShellLinkA_GetShowCmd(sl, &i); - ok(r == S_OK, "GetShowCmd failed (0x%08x)\n", r); - ok(i==SW_SHOWNORMAL, "GetShowCmd returned %d\n", i); - - r = IShellLinkA_SetShowCmd(sl, SW_SHOWMAXIMIZED); - ok(r == S_OK, "SetShowCmd failed (0x%08x)\n", r); - - i=0xdeadbeef; - r = IShellLinkA_GetShowCmd(sl, &i); - ok(r == S_OK, "GetShowCmd failed (0x%08x)\n", r); - ok(i==SW_SHOWMAXIMIZED, "GetShowCmd returned %d'\n", i); - - /* Test Getting / Setting the icon */ - i=0xdeadbeef; - strcpy(buffer,"garbage"); - r = IShellLinkA_GetIconLocation(sl, buffer, sizeof(buffer), &i); - ok(r == S_OK, "GetIconLocation failed (0x%08x)\n", r); - ok(*buffer=='\0', "GetIconLocation returned '%s'\n", buffer); - ok(i==0, "GetIconLocation returned %d\n", i); - - str="c:\\nonexistent\\file"; - r = IShellLinkA_SetIconLocation(sl, str, 0xbabecafe); - ok(r == S_OK, "SetIconLocation failed (0x%08x)\n", r); - - i=0xdeadbeef; - r = IShellLinkA_GetIconLocation(sl, buffer, sizeof(buffer), &i); - ok(r == S_OK, "GetIconLocation failed (0x%08x)\n", r); - ok(lstrcmpi(buffer,str)==0, "GetIconLocation returned '%s'\n", buffer); - ok(i==0xbabecafe, "GetIconLocation returned %d'\n", i); - - /* Test Getting / Setting the hot key */ - w=0xbeef; - r = IShellLinkA_GetHotkey(sl, &w); - ok(r == S_OK, "GetHotkey failed (0x%08x)\n", r); - ok(w==0, "GetHotkey returned %d\n", w); - - r = IShellLinkA_SetHotkey(sl, 0x5678); - ok(r == S_OK, "SetHotkey failed (0x%08x)\n", r); - - w=0xbeef; - r = IShellLinkA_GetHotkey(sl, &w); - ok(r == S_OK, "GetHotkey failed (0x%08x)\n", r); - ok(w==0x5678, "GetHotkey returned %d'\n", w); - - IShellLinkA_Release(sl); -} - - -/* - * Test saving and loading .lnk files - */ - -#define lok ok_(__FILE__, line) -#define lok_todo_4(todo_flag,a,b,c,d) \ - if ((todo & todo_flag) == 0) lok((a), (b), (c), (d)); \ - else todo_wine lok((a), (b), (c), (d)); -#define lok_todo_2(todo_flag,a,b) \ - if ((todo & todo_flag) == 0) lok((a), (b)); \ - else todo_wine lok((a), (b)); -#define check_lnk(a,b,c) check_lnk_(__LINE__, (a), (b), (c)) - -void create_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int save_fails) -{ - HRESULT r; - IShellLinkA *sl; - IPersistFile *pf; - - r = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, - &IID_IShellLinkA, (LPVOID*)&sl); - lok(r == S_OK, "no IID_IShellLinkA (0x%08x)\n", r); - if (r != S_OK) - return; - - if (desc->description) - { - r = IShellLinkA_SetDescription(sl, desc->description); - lok(r == S_OK, "SetDescription failed (0x%08x)\n", r); - } - if (desc->workdir) - { - r = IShellLinkA_SetWorkingDirectory(sl, desc->workdir); - lok(r == S_OK, "SetWorkingDirectory failed (0x%08x)\n", r); - } - if (desc->path) - { - r = IShellLinkA_SetPath(sl, desc->path); - lok(SUCCEEDED(r), "SetPath failed (0x%08x)\n", r); - } - if (desc->pidl) - { - r = IShellLinkA_SetIDList(sl, desc->pidl); - lok(r == S_OK, "SetIDList failed (0x%08x)\n", r); - } - if (desc->arguments) - { - r = IShellLinkA_SetArguments(sl, desc->arguments); - lok(r == S_OK, "SetArguments failed (0x%08x)\n", r); - } - if (desc->showcmd) - { - r = IShellLinkA_SetShowCmd(sl, desc->showcmd); - lok(r == S_OK, "SetShowCmd failed (0x%08x)\n", r); - } - if (desc->icon) - { - r = IShellLinkA_SetIconLocation(sl, desc->icon, desc->icon_id); - lok(r == S_OK, "SetIconLocation failed (0x%08x)\n", r); - } - if (desc->hotkey) - { - r = IShellLinkA_SetHotkey(sl, desc->hotkey); - lok(r == S_OK, "SetHotkey failed (0x%08x)\n", r); - } - - r = IShellLinkW_QueryInterface(sl, &IID_IPersistFile, (LPVOID*)&pf); - lok(r == S_OK, "no IID_IPersistFile (0x%08x)\n", r); - if (r == S_OK) - { - LPOLESTR str; - - if (0) - { - /* crashes on XP */ - IPersistFile_GetCurFile(pf, NULL); - } - - /* test GetCurFile before ::Save */ - str = (LPWSTR)0xdeadbeef; - r = IPersistFile_GetCurFile(pf, &str); - lok(r == S_FALSE || - broken(r == S_OK), /* shell32 < 5.0 */ - "got 0x%08x\n", r); - lok(str == NULL, "got %p\n", str); - - r = IPersistFile_Save(pf, path, TRUE); - if (save_fails) - { - todo_wine { - lok(r == S_OK, "save failed (0x%08x)\n", r); - } - } - else - { - lok(r == S_OK, "save failed (0x%08x)\n", r); - } - - /* test GetCurFile after ::Save */ - r = IPersistFile_GetCurFile(pf, &str); - lok(r == S_OK, "got 0x%08x\n", r); - lok(str != NULL || - broken(str == NULL), /* shell32 < 5.0 */ - "Didn't expect NULL\n"); - if (str != NULL) - { - IMalloc *pmalloc; - - lok(!winetest_strcmpW(path, str), "Expected %s, got %s\n", - wine_dbgstr_w(path), wine_dbgstr_w(str)); - - SHGetMalloc(&pmalloc); - IMalloc_Free(pmalloc, str); - } - else - win_skip("GetCurFile fails on shell32 < 5.0\n"); - - IPersistFile_Release(pf); - } - - IShellLinkA_Release(sl); -} - -static void check_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int todo) -{ - HRESULT r; - IShellLinkA *sl; - IPersistFile *pf; - char buffer[INFOTIPSIZE]; - LPOLESTR str; - - r = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, - &IID_IShellLinkA, (LPVOID*)&sl); - lok(r == S_OK, "no IID_IShellLinkA (0x%08x)\n", r); - if (r != S_OK) - return; - - r = IShellLinkA_QueryInterface(sl, &IID_IPersistFile, (LPVOID*)&pf); - lok(r == S_OK, "no IID_IPersistFile (0x%08x)\n", r); - if (r != S_OK) - { - IShellLinkA_Release(sl); - return; - } - - /* test GetCurFile before ::Load */ - str = (LPWSTR)0xdeadbeef; - r = IPersistFile_GetCurFile(pf, &str); - lok(r == S_FALSE || - broken(r == S_OK), /* shell32 < 5.0 */ - "got 0x%08x\n", r); - lok(str == NULL, "got %p\n", str); - - r = IPersistFile_Load(pf, path, STGM_READ); - lok(r == S_OK, "load failed (0x%08x)\n", r); - - /* test GetCurFile after ::Save */ - r = IPersistFile_GetCurFile(pf, &str); - lok(r == S_OK, "got 0x%08x\n", r); - lok(str != NULL || - broken(str == NULL), /* shell32 < 5.0 */ - "Didn't expect NULL\n"); - if (str != NULL) - { - IMalloc *pmalloc; - - lok(!winetest_strcmpW(path, str), "Expected %s, got %s\n", - wine_dbgstr_w(path), wine_dbgstr_w(str)); - - SHGetMalloc(&pmalloc); - IMalloc_Free(pmalloc, str); - } - else - win_skip("GetCurFile fails on shell32 < 5.0\n"); - - IPersistFile_Release(pf); - if (r != S_OK) - { - IShellLinkA_Release(sl); - return; - } - - if (desc->description) - { - strcpy(buffer,"garbage"); - r = IShellLinkA_GetDescription(sl, buffer, sizeof(buffer)); - lok(r == S_OK, "GetDescription failed (0x%08x)\n", r); - lok_todo_4(0x1, lstrcmp(buffer, desc->description)==0, - "GetDescription returned '%s' instead of '%s'\n", - buffer, desc->description); - } - if (desc->workdir) - { - strcpy(buffer,"garbage"); - r = IShellLinkA_GetWorkingDirectory(sl, buffer, sizeof(buffer)); - lok(r == S_OK, "GetWorkingDirectory failed (0x%08x)\n", r); - lok_todo_4(0x2, lstrcmpi(buffer, desc->workdir)==0, - "GetWorkingDirectory returned '%s' instead of '%s'\n", - buffer, desc->workdir); - } - if (desc->path) - { - strcpy(buffer,"garbage"); - r = IShellLinkA_GetPath(sl, buffer, sizeof(buffer), NULL, SLGP_RAWPATH); - lok(SUCCEEDED(r), "GetPath failed (0x%08x)\n", r); - lok_todo_4(0x4, lstrcmpi(buffer, desc->path)==0, - "GetPath returned '%s' instead of '%s'\n", - buffer, desc->path); - } - if (desc->pidl) - { - LPITEMIDLIST pidl=NULL; - r = IShellLinkA_GetIDList(sl, &pidl); - lok(r == S_OK, "GetIDList failed (0x%08x)\n", r); - lok_todo_2(0x8, pILIsEqual(pidl, desc->pidl), - "GetIDList returned an incorrect pidl\n"); - } - if (desc->showcmd) - { - int i=0xdeadbeef; - r = IShellLinkA_GetShowCmd(sl, &i); - lok(r == S_OK, "GetShowCmd failed (0x%08x)\n", r); - lok_todo_4(0x10, i==desc->showcmd, - "GetShowCmd returned 0x%0x instead of 0x%0x\n", - i, desc->showcmd); - } - if (desc->icon) - { - int i=0xdeadbeef; - strcpy(buffer,"garbage"); - r = IShellLinkA_GetIconLocation(sl, buffer, sizeof(buffer), &i); - lok(r == S_OK, "GetIconLocation failed (0x%08x)\n", r); - lok_todo_4(0x20, lstrcmpi(buffer, desc->icon)==0, - "GetIconLocation returned '%s' instead of '%s'\n", - buffer, desc->icon); - lok_todo_4(0x20, i==desc->icon_id, - "GetIconLocation returned 0x%0x instead of 0x%0x\n", - i, desc->icon_id); - } - if (desc->hotkey) - { - WORD i=0xbeef; - r = IShellLinkA_GetHotkey(sl, &i); - lok(r == S_OK, "GetHotkey failed (0x%08x)\n", r); - lok_todo_4(0x40, i==desc->hotkey, - "GetHotkey returned 0x%04x instead of 0x%04x\n", - i, desc->hotkey); - } - - IShellLinkA_Release(sl); -} - -static void test_load_save(void) -{ - WCHAR lnkfile[MAX_PATH]; - char lnkfileA[MAX_PATH]; - static const char lnkfileA_name[] = "\\test.lnk"; - - lnk_desc_t desc; - char mypath[MAX_PATH]; - char mydir[MAX_PATH]; - char realpath[MAX_PATH]; - char* p; - HANDLE hf; - DWORD r; - - if (!pGetLongPathNameA) - { - win_skip("GetLongPathNameA is not available\n"); - return; - } - - /* Don't used a fixed path for the test.lnk file */ - GetTempPathA(MAX_PATH, lnkfileA); - lstrcatA(lnkfileA, lnkfileA_name); - MultiByteToWideChar(CP_ACP, 0, lnkfileA, -1, lnkfile, MAX_PATH); - - /* Save an empty .lnk file */ - memset(&desc, 0, sizeof(desc)); - create_lnk(lnkfile, &desc, 0); - - /* It should come back as a bunch of empty strings */ - desc.description=""; - desc.workdir=""; - desc.path=""; - desc.arguments=""; - desc.icon=""; - check_lnk(lnkfile, &desc, 0x0); - - /* Point a .lnk file to nonexistent files */ - desc.description=""; - desc.workdir="c:\\Nonexitent\\work\\directory"; - desc.path="c:\\nonexistent\\path"; - desc.pidl=NULL; - desc.arguments=""; - desc.showcmd=0; - desc.icon="c:\\nonexistent\\icon\\file"; - desc.icon_id=1234; - desc.hotkey=0; - create_lnk(lnkfile, &desc, 0); - check_lnk(lnkfile, &desc, 0x0); - - r=GetModuleFileName(NULL, mypath, sizeof(mypath)); - ok(r','p','l','T',']','j','I','{','j','f','(','=','1','&','L','[','-','8', - '1','-',']',':',':',0 }; - static const WCHAR comp[] = { - '2','6',',','!','!','g','x','s','f','(','N','g',']','q','F','`','H','{', - 'L','s','A','C','C','E','S','S','F','i','l','e','s','>','p','l','T',']', - 'j','I','{','j','f','(','=','1','&','L','[','-','8','1','-',']',0 }; - IShellLinkDataList *dl = NULL; - IShellLinkW *sl = NULL; - HRESULT r; - DWORD flags = 0; - EXP_DARWIN_LINK *dar; - - r = CoCreateInstance( &CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, - &IID_IShellLinkW, (LPVOID*)&sl ); - ok( r == S_OK || - broken(r == E_NOINTERFACE), /* Win9x */ - "CoCreateInstance failed (0x%08x)\n", r); - if (!sl) - { - win_skip("no shelllink\n"); - return; - } - - r = IShellLinkW_QueryInterface( sl, &_IID_IShellLinkDataList, (LPVOID*) &dl ); - ok( r == S_OK || - broken(r == E_NOINTERFACE), /* NT4 */ - "IShellLinkW_QueryInterface failed (0x%08x)\n", r); - - if (!dl) - { - win_skip("no datalink interface\n"); - IShellLinkW_Release( sl ); - return; - } - - flags = 0; - r = IShellLinkDataList_GetFlags( dl, &flags ); - ok( r == S_OK, "GetFlags failed\n"); - ok( flags == 0, "GetFlags returned wrong flags\n"); - - dar = (void*)-1; - r = IShellLinkDataList_CopyDataBlock( dl, EXP_DARWIN_ID_SIG, (LPVOID*) &dar ); - ok( r == E_FAIL, "CopyDataBlock failed\n"); - ok( dar == NULL, "should be null\n"); - - if (!pGetLongPathNameA /* NT4 */) - skip("SetPath with NULL parameter crashes on NT4\n"); - else - { - r = IShellLinkW_SetPath(sl, NULL); - ok(r == E_INVALIDARG, "SetPath returned wrong error (0x%08x)\n", r); - } - - r = IShellLinkW_SetPath(sl, lnk); - ok(r == S_OK, "SetPath failed\n"); - -if (0) -{ - /* the following crashes */ - IShellLinkDataList_GetFlags( dl, NULL ); -} - - flags = 0; - r = IShellLinkDataList_GetFlags( dl, &flags ); - ok( r == S_OK, "GetFlags failed\n"); - /* SLDF_HAS_LOGO3ID is no longer supported on Vista+, filter it out */ - ok( (flags & (~ SLDF_HAS_LOGO3ID)) == SLDF_HAS_DARWINID, - "GetFlags returned wrong flags\n"); - - dar = NULL; - r = IShellLinkDataList_CopyDataBlock( dl, EXP_DARWIN_ID_SIG, (LPVOID*) &dar ); - ok( r == S_OK, "CopyDataBlock failed\n"); - - ok( dar && ((DATABLOCK_HEADER*)dar)->dwSignature == EXP_DARWIN_ID_SIG, "signature wrong\n"); - ok( dar && 0==lstrcmpW(dar->szwDarwinID, comp ), "signature wrong\n"); - - LocalFree( dar ); - - IUnknown_Release( dl ); - IShellLinkW_Release( sl ); -} - -static void test_shdefextracticon(void) -{ - HICON hiconlarge=NULL, hiconsmall=NULL; - HRESULT res; - - if (!pSHDefExtractIconA) - { - win_skip("SHDefExtractIconA is unavailable\n"); - return; - } - - res = pSHDefExtractIconA("shell32.dll", 0, 0, &hiconlarge, &hiconsmall, MAKELONG(16,24)); - ok(SUCCEEDED(res), "SHDefExtractIconA failed, res=%x\n", res); - ok(hiconlarge != NULL, "got null hiconlarge\n"); - ok(hiconsmall != NULL, "got null hiconsmall\n"); - DestroyIcon(hiconlarge); - DestroyIcon(hiconsmall); - - hiconsmall = NULL; - res = pSHDefExtractIconA("shell32.dll", 0, 0, NULL, &hiconsmall, MAKELONG(16,24)); - ok(SUCCEEDED(res), "SHDefExtractIconA failed, res=%x\n", res); - ok(hiconsmall != NULL, "got null hiconsmall\n"); - DestroyIcon(hiconsmall); - - res = pSHDefExtractIconA("shell32.dll", 0, 0, NULL, NULL, MAKELONG(16,24)); - ok(SUCCEEDED(res), "SHDefExtractIconA failed, res=%x\n", res); -} - -static void test_GetIconLocation(void) -{ - IShellLinkA *sl; - const char *str; - char buffer[INFOTIPSIZE], mypath[MAX_PATH]; - int i; - HRESULT r; - LPITEMIDLIST pidl; - - r = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, - &IID_IShellLinkA, (LPVOID*)&sl); - ok(r == S_OK, "no IID_IShellLinkA (0x%08x)\n", r); - if(r != S_OK) - return; - - i = 0xdeadbeef; - strcpy(buffer, "garbage"); - r = IShellLinkA_GetIconLocation(sl, buffer, sizeof(buffer), &i); - ok(r == S_OK, "GetIconLocation failed (0x%08x)\n", r); - ok(*buffer == '\0', "GetIconLocation returned '%s'\n", buffer); - ok(i == 0, "GetIconLocation returned %d\n", i); - - str = "c:\\some\\path"; - r = IShellLinkA_SetPath(sl, str); - ok(r == S_FALSE || r == S_OK, "SetPath failed (0x%08x)\n", r); - - i = 0xdeadbeef; - strcpy(buffer, "garbage"); - r = IShellLinkA_GetIconLocation(sl, buffer, sizeof(buffer), &i); - ok(r == S_OK, "GetIconLocation failed (0x%08x)\n", r); - ok(*buffer == '\0', "GetIconLocation returned '%s'\n", buffer); - ok(i == 0, "GetIconLocation returned %d\n", i); - - GetWindowsDirectoryA(mypath, sizeof(mypath) - 12); - strcat(mypath, "\\regedit.exe"); - pidl = path_to_pidl(mypath); - r = IShellLinkA_SetIDList(sl, pidl); - ok(r == S_OK, "SetPath failed (0x%08x)\n", r); - pILFree(pidl); - - i = 0xdeadbeef; - strcpy(buffer, "garbage"); - r = IShellLinkA_GetIconLocation(sl, buffer, sizeof(buffer), &i); - ok(r == S_OK, "GetIconLocation failed (0x%08x)\n", r); - ok(*buffer == '\0', "GetIconLocation returned '%s'\n", buffer); - ok(i == 0, "GetIconLocation returned %d\n", i); - - str = "c:\\nonexistent\\file"; - r = IShellLinkA_SetIconLocation(sl, str, 0xbabecafe); - ok(r == S_OK, "SetIconLocation failed (0x%08x)\n", r); - - i = 0xdeadbeef; - r = IShellLinkA_GetIconLocation(sl, buffer, sizeof(buffer), &i); - ok(r == S_OK, "GetIconLocation failed (0x%08x)\n", r); - ok(lstrcmpi(buffer,str) == 0, "GetIconLocation returned '%s'\n", buffer); - ok(i == 0xbabecafe, "GetIconLocation returned %d'\n", i); - - IShellLinkA_Release(sl); -} - -START_TEST(shelllink) -{ - HRESULT r; - HMODULE hmod = GetModuleHandleA("shell32.dll"); - HMODULE hkernel32 = GetModuleHandleA("kernel32.dll"); - - pILFree = (fnILFree) GetProcAddress(hmod, (LPSTR)155); - pILIsEqual = (fnILIsEqual) GetProcAddress(hmod, (LPSTR)21); - pSHILCreateFromPath = (fnSHILCreateFromPath) GetProcAddress(hmod, (LPSTR)28); - pSHDefExtractIconA = (fnSHDefExtractIconA) GetProcAddress(hmod, "SHDefExtractIconA"); - - pGetLongPathNameA = (void *)GetProcAddress(hkernel32, "GetLongPathNameA"); - pGetShortPathNameA = (void *)GetProcAddress(hkernel32, "GetShortPathNameA"); - - r = CoInitialize(NULL); - ok(r == S_OK, "CoInitialize failed (0x%08x)\n", r); - if (r != S_OK) - return; - - test_get_set(); - test_load_save(); - test_datalink(); - test_shdefextracticon(); - test_GetIconLocation(); - - CoUninitialize(); -} diff --git a/rostests/winetests/shell32/shellole.c b/rostests/winetests/shell32/shellole.c deleted file mode 100644 index da1f667932e..00000000000 --- a/rostests/winetests/shell32/shellole.c +++ /dev/null @@ -1,437 +0,0 @@ -/* - * Copyright 2010 Piotr 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 - */ - -#define COBJMACROS -#define CONST_VTABLE -#define NONAMELESSUNION - -#include -#include - -#include "winbase.h" -#include "shlobj.h" -#include "initguid.h" - -DEFINE_GUID(FMTID_Test,0x12345678,0x1234,0x1234,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12); -DEFINE_GUID(FMTID_NotExisting, 0x12345678,0x1234,0x1234,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x13); - -#define DEFINE_EXPECT(func) \ - static BOOL expect_ ## func = FALSE, called_ ## func = FALSE - -#define SET_EXPECT(func) \ - expect_ ## func = TRUE - -#define CHECK_EXPECT2(func) \ - do { \ - ok(expect_ ##func, "unexpected call " #func "\n"); \ - called_ ## func = TRUE; \ - }while(0) - -#define CHECK_EXPECT(func) \ - do { \ - CHECK_EXPECT2(func); \ - expect_ ## func = FALSE; \ - }while(0) - -#define CHECK_CALLED(func) \ - do { \ - ok(called_ ## func, "expected " #func "\n"); \ - expect_ ## func = called_ ## func = FALSE; \ - }while(0) - -DEFINE_EXPECT(Create); -DEFINE_EXPECT(Delete); -DEFINE_EXPECT(Open); -DEFINE_EXPECT(ReadMultiple); -DEFINE_EXPECT(ReadMultipleCodePage); -DEFINE_EXPECT(Release); -DEFINE_EXPECT(Stat); -DEFINE_EXPECT(WriteMultiple); - -static HRESULT (WINAPI *pSHPropStgCreate)(IPropertySetStorage*, REFFMTID, const CLSID*, - DWORD, DWORD, DWORD, IPropertyStorage**, UINT*); -static HRESULT (WINAPI *pSHPropStgReadMultiple)(IPropertyStorage*, UINT, - ULONG, const PROPSPEC*, PROPVARIANT*); -static HRESULT (WINAPI *pSHPropStgWriteMultiple)(IPropertyStorage*, UINT*, - ULONG, const PROPSPEC*, PROPVARIANT*, PROPID); - -static void init(void) -{ - HMODULE hmod = GetModuleHandleA("shell32.dll"); - - pSHPropStgCreate = (void*)GetProcAddress(hmod, "SHPropStgCreate"); - pSHPropStgReadMultiple = (void*)GetProcAddress(hmod, "SHPropStgReadMultiple"); - pSHPropStgWriteMultiple = (void*)GetProcAddress(hmod, "SHPropStgWriteMultiple"); -} - -static HRESULT WINAPI PropertyStorage_QueryInterface(IPropertyStorage *This, - REFIID riid, void **ppvObject) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static ULONG WINAPI PropertyStorage_AddRef(IPropertyStorage *This) -{ - ok(0, "unexpected call\n"); - return 2; -} - -static ULONG WINAPI PropertyStorage_Release(IPropertyStorage *This) -{ - CHECK_EXPECT(Release); - return 1; -} - -static HRESULT WINAPI PropertyStorage_ReadMultiple(IPropertyStorage *This, ULONG cpspec, - const PROPSPEC *rgpspec, PROPVARIANT *rgpropvar) -{ - if(cpspec == 1) { - CHECK_EXPECT(ReadMultipleCodePage); - - ok(rgpspec != NULL, "rgpspec = NULL\n"); - ok(rgpropvar != NULL, "rgpropvar = NULL\n"); - - ok(rgpspec[0].ulKind == PRSPEC_PROPID, "rgpspec[0].ulKind = %d\n", rgpspec[0].ulKind); - ok(rgpspec[0].u.propid == PID_CODEPAGE, "rgpspec[0].propid = %d\n", rgpspec[0].u.propid); - - rgpropvar[0].vt = VT_I2; - rgpropvar[0].u.iVal = 1234; - } else { - CHECK_EXPECT(ReadMultiple); - - ok(cpspec == 10, "cpspec = %u\n", cpspec); - ok(rgpspec == (void*)0xdeadbeef, "rgpspec = %p\n", rgpspec); - ok(rgpropvar != NULL, "rgpropvar = NULL\n"); - - ok(rgpropvar[0].vt==0 || broken(rgpropvar[0].vt==VT_BSTR), "rgpropvar[0].vt = %d\n", rgpropvar[0].vt); - - rgpropvar[0].vt = VT_BSTR; - rgpropvar[0].u.bstrVal = (void*)0xdeadbeef; - rgpropvar[1].vt = VT_LPSTR; - rgpropvar[1].u.pszVal = (void*)0xdeadbeef; - rgpropvar[2].vt = VT_BYREF|VT_I1; - rgpropvar[2].u.pcVal = (void*)0xdeadbeef; - rgpropvar[3].vt = VT_BYREF|VT_VARIANT; - rgpropvar[3].u.pvarVal = (void*)0xdeadbeef; - } - - return S_OK; -} - -static HRESULT WINAPI PropertyStorage_WriteMultiple(IPropertyStorage *This, ULONG cpspec, - const PROPSPEC *rgpspec, const PROPVARIANT *rgpropvar, - PROPID propidNameFirst) -{ - CHECK_EXPECT(WriteMultiple); - - ok(cpspec == 20, "cpspec = %d\n", cpspec); - ok(rgpspec == (void*)0xdeadbeef, "rgpspec = %p\n", rgpspec); - ok(rgpropvar == (void*)0xdeadbeef, "rgpropvar = %p\n", rgpspec); - ok(propidNameFirst == PID_FIRST_USABLE, "propidNameFirst = %d\n", propidNameFirst); - return S_OK; -} - -static HRESULT WINAPI PropertyStorage_DeleteMultiple(IPropertyStorage *This, ULONG cpspec, - const PROPSPEC *rgpspec) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI PropertyStorage_ReadPropertyNames(IPropertyStorage *This, ULONG cpropid, - const PROPID *rgpropid, LPOLESTR *rglpwstrName) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI PropertyStorage_WritePropertyNames(IPropertyStorage *This, ULONG cpropid, - const PROPID *rgpropid, const LPOLESTR *rglpwstrName) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI PropertyStorage_DeletePropertyNames(IPropertyStorage *This, ULONG cpropid, - const PROPID *rgpropid) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI PropertyStorage_Commit(IPropertyStorage *This, DWORD grfCommitFlags) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI PropertyStorage_Revert(IPropertyStorage *This) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI PropertyStorage_Enum(IPropertyStorage *This, IEnumSTATPROPSTG **ppenum) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI PropertyStorage_SetTimes(IPropertyStorage *This, const FILETIME *pctime, - const FILETIME *patime, const FILETIME *pmtime) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI PropertyStorage_SetClass(IPropertyStorage *This, REFCLSID clsid) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI PropertyStorage_Stat(IPropertyStorage *This, STATPROPSETSTG *statpsstg) -{ - CHECK_EXPECT(Stat); - - memset(statpsstg, 0, sizeof(STATPROPSETSTG)); - memcpy(&statpsstg->fmtid, &FMTID_Test, sizeof(FMTID)); - statpsstg->grfFlags = PROPSETFLAG_ANSI; - return S_OK; -} - -static IPropertyStorageVtbl PropertyStorageVtbl = { - PropertyStorage_QueryInterface, - PropertyStorage_AddRef, - PropertyStorage_Release, - PropertyStorage_ReadMultiple, - PropertyStorage_WriteMultiple, - PropertyStorage_DeleteMultiple, - PropertyStorage_ReadPropertyNames, - PropertyStorage_WritePropertyNames, - PropertyStorage_DeletePropertyNames, - PropertyStorage_Commit, - PropertyStorage_Revert, - PropertyStorage_Enum, - PropertyStorage_SetTimes, - PropertyStorage_SetClass, - PropertyStorage_Stat -}; - -static IPropertyStorage PropertyStorage = { &PropertyStorageVtbl }; - -static HRESULT WINAPI PropertySetStorage_QueryInterface(IPropertySetStorage *This, - REFIID riid, void **ppvObject) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static ULONG WINAPI PropertySetStorage_AddRef(IPropertySetStorage *This) -{ - ok(0, "unexpected call\n"); - return 2; -} - -static ULONG WINAPI PropertySetStorage_Release(IPropertySetStorage *This) -{ - ok(0, "unexpected call\n"); - return 1; -} - -static HRESULT WINAPI PropertySetStorage_Create(IPropertySetStorage *This, - REFFMTID rfmtid, const CLSID *pclsid, DWORD grfFlags, - DWORD grfMode, IPropertyStorage **ppprstg) -{ - CHECK_EXPECT(Create); - ok(IsEqualGUID(rfmtid, &FMTID_Test) || IsEqualGUID(rfmtid, &FMTID_NotExisting), - "Incorrect rfmtid value\n"); - ok(pclsid == NULL, "pclsid != NULL\n"); - ok(grfFlags == PROPSETFLAG_ANSI, "grfFlags = %x\n", grfFlags); - ok(grfMode == STGM_READ, "grfMode = %x\n", grfMode); - - *ppprstg = &PropertyStorage; - return S_OK; -} - -static HRESULT WINAPI PropertySetStorage_Open(IPropertySetStorage *This, - REFFMTID rfmtid, DWORD grfMode, IPropertyStorage **ppprstg) -{ - CHECK_EXPECT(Open); - - if(IsEqualGUID(rfmtid, &FMTID_Test)) { - ok(grfMode == STGM_READ, "grfMode = %x\n", grfMode); - - *ppprstg = &PropertyStorage; - return S_OK; - } - - return STG_E_FILENOTFOUND; -} - -static HRESULT WINAPI PropertySetStorage_Delete(IPropertySetStorage *This, - REFFMTID rfmtid) -{ - CHECK_EXPECT(Delete); - ok(IsEqualGUID(rfmtid, &FMTID_Test), "wrong rfmtid value\n"); - return S_OK; -} - -static HRESULT WINAPI PropertySetStorage_Enum(IPropertySetStorage *This, - IEnumSTATPROPSETSTG **ppenum) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static IPropertySetStorageVtbl PropertySetStorageVtbl = { - PropertySetStorage_QueryInterface, - PropertySetStorage_AddRef, - PropertySetStorage_Release, - PropertySetStorage_Create, - PropertySetStorage_Open, - PropertySetStorage_Delete, - PropertySetStorage_Enum -}; - -static IPropertySetStorage PropertySetStorage = { &PropertySetStorageVtbl }; - -static void test_SHPropStg_functions(void) -{ - IPropertyStorage *property_storage; - UINT codepage; - PROPVARIANT read[10]; - HRESULT hres; - - if(!pSHPropStgCreate || !pSHPropStgReadMultiple || !pSHPropStgWriteMultiple) { - win_skip("SHPropStg* functions are missing\n"); - return; - } - - if(0) { - /* Crashes on Windows */ - pSHPropStgCreate(NULL, &FMTID_Test, NULL, PROPSETFLAG_DEFAULT, - STGM_READ, OPEN_EXISTING, &property_storage, &codepage); - pSHPropStgCreate(&PropertySetStorage, NULL, NULL, PROPSETFLAG_DEFAULT, - STGM_READ, OPEN_EXISTING, &property_storage, &codepage); - pSHPropStgCreate(&PropertySetStorage, &FMTID_Test, NULL, PROPSETFLAG_DEFAULT, - STGM_READ, OPEN_EXISTING, NULL, &codepage); - } - - SET_EXPECT(Open); - SET_EXPECT(ReadMultipleCodePage); - hres = pSHPropStgCreate(&PropertySetStorage, &FMTID_Test, NULL, PROPSETFLAG_DEFAULT, - STGM_READ, OPEN_EXISTING, &property_storage, &codepage); - ok(codepage == 1234, "codepage = %d\n", codepage); - ok(hres == S_OK, "hres = %x\n", hres); - CHECK_CALLED(Open); - CHECK_CALLED(ReadMultipleCodePage); - - SET_EXPECT(Open); - hres = pSHPropStgCreate(&PropertySetStorage, &FMTID_NotExisting, NULL, - PROPSETFLAG_DEFAULT, STGM_READ, OPEN_EXISTING, &property_storage, &codepage); - ok(hres == STG_E_FILENOTFOUND, "hres = %x\n", hres); - CHECK_CALLED(Open); - - SET_EXPECT(Open); - SET_EXPECT(Release); - SET_EXPECT(Delete); - SET_EXPECT(Create); - SET_EXPECT(ReadMultipleCodePage); - hres = pSHPropStgCreate(&PropertySetStorage, &FMTID_Test, NULL, PROPSETFLAG_ANSI, - STGM_READ, CREATE_ALWAYS, &property_storage, &codepage); - ok(codepage == 1234, "codepage = %d\n", codepage); - ok(hres == S_OK, "hres = %x\n", hres); - CHECK_CALLED(Open); - CHECK_CALLED(Release); - CHECK_CALLED(Delete); - CHECK_CALLED(Create); - CHECK_CALLED(ReadMultipleCodePage); - - SET_EXPECT(Open); - SET_EXPECT(Create); - SET_EXPECT(ReadMultipleCodePage); - hres = pSHPropStgCreate(&PropertySetStorage, &FMTID_NotExisting, NULL, PROPSETFLAG_ANSI, - STGM_READ, CREATE_ALWAYS, &property_storage, &codepage); - ok(codepage == 1234, "codepage = %d\n", codepage); - ok(hres == S_OK, "hres = %x\n", hres); - CHECK_CALLED(Open); - CHECK_CALLED(Create); - CHECK_CALLED(ReadMultipleCodePage); - - SET_EXPECT(Open); - hres = pSHPropStgCreate(&PropertySetStorage, &FMTID_Test, &FMTID_NotExisting, - PROPSETFLAG_DEFAULT, STGM_READ, OPEN_EXISTING, &property_storage, NULL); - ok(hres == S_OK, "hres = %x\n", hres); - CHECK_CALLED(Open); - - SET_EXPECT(Stat); - SET_EXPECT(ReadMultipleCodePage); - SET_EXPECT(WriteMultiple); - codepage = 0; - hres = pSHPropStgWriteMultiple(property_storage, &codepage, 20, (void*)0xdeadbeef, (void*)0xdeadbeef, PID_FIRST_USABLE); - ok(hres == S_OK, "hres = %x\n", hres); - ok(codepage == 1234, "codepage = %d\n", codepage); - CHECK_CALLED(Stat); - CHECK_CALLED(ReadMultipleCodePage); - CHECK_CALLED(WriteMultiple); - - SET_EXPECT(Stat); - SET_EXPECT(ReadMultipleCodePage); - SET_EXPECT(WriteMultiple); - hres = pSHPropStgWriteMultiple(property_storage, NULL, 20, (void*)0xdeadbeef, (void*)0xdeadbeef, PID_FIRST_USABLE); - ok(hres == S_OK, "hres = %x\n", hres); - CHECK_CALLED(Stat); - CHECK_CALLED(ReadMultipleCodePage); - CHECK_CALLED(WriteMultiple); - - SET_EXPECT(Stat); - SET_EXPECT(WriteMultiple); - codepage = 1000; - hres = pSHPropStgWriteMultiple(property_storage, &codepage, 20, (void*)0xdeadbeef, (void*)0xdeadbeef, PID_FIRST_USABLE); - ok(hres == S_OK, "hres = %x\n", hres); - ok(codepage == 1000, "codepage = %d\n", codepage); - CHECK_CALLED(Stat); - CHECK_CALLED(WriteMultiple); - - read[0].vt = VT_BSTR; - read[0].u.bstrVal = (void*)0xdeadbeef; - SET_EXPECT(ReadMultiple); - SET_EXPECT(ReadMultipleCodePage); - SET_EXPECT(Stat); - hres = pSHPropStgReadMultiple(property_storage, 0, 10, (void*)0xdeadbeef, read); - ok(hres == S_OK, "hres = %x\n", hres); - CHECK_CALLED(ReadMultiple); - CHECK_CALLED(ReadMultipleCodePage); - CHECK_CALLED(Stat); - - SET_EXPECT(ReadMultiple); - SET_EXPECT(Stat); - hres = pSHPropStgReadMultiple(property_storage, 1251, 10, (void*)0xdeadbeef, read); - ok(hres == S_OK, "hres = %x\n", hres); - CHECK_CALLED(ReadMultiple); - CHECK_CALLED(Stat); -} - -START_TEST(shellole) -{ - init(); - - test_SHPropStg_functions(); -} diff --git a/rostests/winetests/shell32/shellpath.c b/rostests/winetests/shell32/shellpath.c deleted file mode 100644 index 0db72dfc15e..00000000000 --- a/rostests/winetests/shell32/shellpath.c +++ /dev/null @@ -1,2519 +0,0 @@ -/* - * Unit tests for shell32 SHGet{Special}Folder{Path|Location} functions. - * - * 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 - * This is a test program for the SHGet{Special}Folder{Path|Location} functions - * of shell32, that get either a filesystem path or a LPITEMIDLIST (shell - * namespace) path for a given folder (CSIDL value). - */ - -#define COBJMACROS - -#include -#include -#include "windef.h" -#include "winbase.h" -#include "shlguid.h" -#include "shlobj.h" -#include "shlwapi.h" -#include "initguid.h" -#include "knownfolders.h" -#include "wine/test.h" - -/* CSIDL_MYDOCUMENTS is now the same as CSIDL_PERSONAL, but what we want - * here is its original value. - */ -#define OLD_CSIDL_MYDOCUMENTS 0x000c - -DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); - -#ifndef ARRAY_SIZE -#define ARRAY_SIZE(x) ( sizeof(x) / sizeof((x)[0]) ) -#endif - -/* from pidl.h, not included here: */ -#ifndef PT_CPL /* Guess, Win7 uses this for CSIDL_CONTROLS */ -#define PT_CPL 0x01 /* no path */ -#endif -#ifndef PT_GUID -#define PT_GUID 0x1f /* no path */ -#endif -#ifndef PT_DRIVE -#define PT_DRIVE 0x23 /* has path */ -#endif -#ifndef PT_DRIVE2 -#define PT_DRIVE2 0x25 /* has path */ -#endif -#ifndef PT_SHELLEXT -#define PT_SHELLEXT 0x2e /* no path */ -#endif -#ifndef PT_FOLDER -#define PT_FOLDER 0x31 /* has path */ -#endif -#ifndef PT_FOLDERW -#define PT_FOLDERW 0x35 /* has path */ -#endif -#ifndef PT_WORKGRP -#define PT_WORKGRP 0x41 /* no path */ -#endif -#ifndef PT_YAGUID -#define PT_YAGUID 0x70 /* no path */ -#endif -/* FIXME: this is used for history/favorites folders; what's a better name? */ -#ifndef PT_IESPECIAL2 -#define PT_IESPECIAL2 0xb1 /* has path */ -#endif - -static GUID CLSID_CommonDocuments = { 0x0000000c, 0x0000, 0x0000, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x1a } }; - -struct shellExpectedValues { - int folder; - int numTypes; - const BYTE *types; -}; - -static HRESULT (WINAPI *pDllGetVersion)(DLLVERSIONINFO *); -static HRESULT (WINAPI *pSHGetFolderPathA)(HWND, int, HANDLE, DWORD, LPSTR); -static HRESULT (WINAPI *pSHGetFolderLocation)(HWND, int, HANDLE, DWORD, - LPITEMIDLIST *); -static BOOL (WINAPI *pSHGetSpecialFolderPathA)(HWND, LPSTR, int, BOOL); -static HRESULT (WINAPI *pSHGetSpecialFolderLocation)(HWND, int, LPITEMIDLIST *); -static LPITEMIDLIST (WINAPI *pILFindLastID)(LPCITEMIDLIST); -static int (WINAPI *pSHFileOperationA)(LPSHFILEOPSTRUCTA); -static HRESULT (WINAPI *pSHGetMalloc)(LPMALLOC *); -static UINT (WINAPI *pGetSystemWow64DirectoryA)(LPSTR,UINT); -static HRESULT (WINAPI *pSHGetKnownFolderPath)(REFKNOWNFOLDERID, DWORD, HANDLE, PWSTR *); -static HRESULT (WINAPI *pSHSetKnownFolderPath)(REFKNOWNFOLDERID, DWORD, HANDLE, PWSTR); -static HRESULT (WINAPI *pSHGetFolderPathEx)(REFKNOWNFOLDERID, DWORD, HANDLE, LPWSTR, DWORD); - -static DLLVERSIONINFO shellVersion = { 0 }; -static LPMALLOC pMalloc; -static const BYTE guidType[] = { PT_GUID }; -static const BYTE controlPanelType[] = { PT_SHELLEXT, PT_GUID, PT_CPL }; -static const BYTE folderType[] = { PT_FOLDER, PT_FOLDERW }; -static const BYTE favoritesType[] = { PT_FOLDER, PT_FOLDERW, 0, PT_IESPECIAL2 /* Win98 */ }; -static const BYTE folderOrSpecialType[] = { PT_FOLDER, PT_IESPECIAL2 }; -static const BYTE personalType[] = { PT_FOLDER, PT_GUID, PT_DRIVE, 0xff /* Win9x */, - PT_IESPECIAL2 /* Win98 */, 0 /* Vista */ }; -/* FIXME: don't know the type of 0x71 returned by Vista/2008 for printers */ -static const BYTE printersType[] = { PT_YAGUID, PT_SHELLEXT, 0x71 }; -static const BYTE ieSpecialType[] = { PT_IESPECIAL2 }; -static const BYTE shellExtType[] = { PT_SHELLEXT }; -static const BYTE workgroupType[] = { PT_WORKGRP }; -#define DECLARE_TYPE(x, y) { x, sizeof(y) / sizeof(y[0]), y } -static const struct shellExpectedValues requiredShellValues[] = { - DECLARE_TYPE(CSIDL_BITBUCKET, guidType), - DECLARE_TYPE(CSIDL_CONTROLS, controlPanelType), - DECLARE_TYPE(CSIDL_COOKIES, folderType), - DECLARE_TYPE(CSIDL_DESKTOPDIRECTORY, folderType), - DECLARE_TYPE(CSIDL_DRIVES, guidType), - DECLARE_TYPE(CSIDL_FAVORITES, favoritesType), - DECLARE_TYPE(CSIDL_FONTS, folderOrSpecialType), -/* FIXME: the following fails in Wine, returns type PT_FOLDER - DECLARE_TYPE(CSIDL_HISTORY, ieSpecialType), - */ - DECLARE_TYPE(CSIDL_INTERNET, guidType), - DECLARE_TYPE(CSIDL_NETHOOD, folderType), - DECLARE_TYPE(CSIDL_NETWORK, guidType), - DECLARE_TYPE(CSIDL_PERSONAL, personalType), - DECLARE_TYPE(CSIDL_PRINTERS, printersType), - DECLARE_TYPE(CSIDL_PRINTHOOD, folderType), - DECLARE_TYPE(CSIDL_PROGRAMS, folderType), - DECLARE_TYPE(CSIDL_RECENT, folderOrSpecialType), - DECLARE_TYPE(CSIDL_SENDTO, folderType), - DECLARE_TYPE(CSIDL_STARTMENU, folderType), - DECLARE_TYPE(CSIDL_STARTUP, folderType), - DECLARE_TYPE(CSIDL_TEMPLATES, folderType), -}; -static const struct shellExpectedValues optionalShellValues[] = { -/* FIXME: the following only semi-succeed; they return NULL PIDLs on XP.. hmm. - DECLARE_TYPE(CSIDL_ALTSTARTUP, folderType), - DECLARE_TYPE(CSIDL_COMMON_ALTSTARTUP, folderType), - DECLARE_TYPE(CSIDL_COMMON_OEM_LINKS, folderType), - */ -/* Windows NT-only: */ - DECLARE_TYPE(CSIDL_COMMON_DESKTOPDIRECTORY, folderType), - DECLARE_TYPE(CSIDL_COMMON_DOCUMENTS, shellExtType), - DECLARE_TYPE(CSIDL_COMMON_FAVORITES, folderType), - DECLARE_TYPE(CSIDL_COMMON_PROGRAMS, folderType), - DECLARE_TYPE(CSIDL_COMMON_STARTMENU, folderType), - DECLARE_TYPE(CSIDL_COMMON_STARTUP, folderType), - DECLARE_TYPE(CSIDL_COMMON_TEMPLATES, folderType), -/* first appearing in shell32 version 4.71: */ - DECLARE_TYPE(CSIDL_APPDATA, folderType), -/* first appearing in shell32 version 4.72: */ - DECLARE_TYPE(CSIDL_INTERNET_CACHE, ieSpecialType), -/* first appearing in shell32 version 5.0: */ - DECLARE_TYPE(CSIDL_ADMINTOOLS, folderType), - DECLARE_TYPE(CSIDL_COMMON_APPDATA, folderType), - DECLARE_TYPE(CSIDL_LOCAL_APPDATA, folderType), - DECLARE_TYPE(OLD_CSIDL_MYDOCUMENTS, folderType), - DECLARE_TYPE(CSIDL_MYMUSIC, folderType), - DECLARE_TYPE(CSIDL_MYPICTURES, folderType), - DECLARE_TYPE(CSIDL_MYVIDEO, folderType), - DECLARE_TYPE(CSIDL_PROFILE, folderType), - DECLARE_TYPE(CSIDL_PROGRAM_FILES, folderType), - DECLARE_TYPE(CSIDL_PROGRAM_FILESX86, folderType), - DECLARE_TYPE(CSIDL_PROGRAM_FILES_COMMON, folderType), - DECLARE_TYPE(CSIDL_PROGRAM_FILES_COMMONX86, folderType), - DECLARE_TYPE(CSIDL_SYSTEM, folderType), - DECLARE_TYPE(CSIDL_WINDOWS, folderType), -/* first appearing in shell32 6.0: */ - DECLARE_TYPE(CSIDL_CDBURN_AREA, folderType), - DECLARE_TYPE(CSIDL_COMMON_MUSIC, folderType), - DECLARE_TYPE(CSIDL_COMMON_PICTURES, folderType), - DECLARE_TYPE(CSIDL_COMMON_VIDEO, folderType), - DECLARE_TYPE(CSIDL_COMPUTERSNEARME, workgroupType), - DECLARE_TYPE(CSIDL_RESOURCES, folderType), - DECLARE_TYPE(CSIDL_RESOURCES_LOCALIZED, folderType), -}; -#undef DECLARE_TYPE - -static void loadShell32(void) -{ - HMODULE hShell32 = GetModuleHandleA("shell32"); - -#define GET_PROC(func) \ - p ## func = (void*)GetProcAddress(hShell32, #func); \ - if(!p ## func) \ - trace("GetProcAddress(%s) failed\n", #func); - - GET_PROC(DllGetVersion) - GET_PROC(SHGetFolderPathA) - GET_PROC(SHGetFolderPathEx) - GET_PROC(SHGetFolderLocation) - GET_PROC(SHGetKnownFolderPath) - GET_PROC(SHSetKnownFolderPath) - GET_PROC(SHGetSpecialFolderPathA) - GET_PROC(SHGetSpecialFolderLocation) - GET_PROC(ILFindLastID) - if (!pILFindLastID) - pILFindLastID = (void *)GetProcAddress(hShell32, (LPCSTR)16); - GET_PROC(SHFileOperationA) - GET_PROC(SHGetMalloc) - - ok(pSHGetMalloc != NULL, "shell32 is missing SHGetMalloc\n"); - if (pSHGetMalloc) - { - HRESULT hr = pSHGetMalloc(&pMalloc); - - ok(hr == S_OK, "SHGetMalloc failed: 0x%08x\n", hr); - ok(pMalloc != NULL, "SHGetMalloc returned a NULL IMalloc\n"); - } - - if (pDllGetVersion) - { - shellVersion.cbSize = sizeof(shellVersion); - pDllGetVersion(&shellVersion); - trace("shell32 version is %d.%d\n", - shellVersion.dwMajorVersion, shellVersion.dwMinorVersion); - } -#undef GET_PROC -} - -#ifndef CSIDL_PROFILES -#define CSIDL_PROFILES 0x003e -#endif - -/* A couple utility printing functions */ -static const char *getFolderName(int folder) -{ - static char unknown[32]; - -#define CSIDL_TO_STR(x) case x: return#x; - switch (folder) - { - CSIDL_TO_STR(CSIDL_DESKTOP); - CSIDL_TO_STR(CSIDL_INTERNET); - CSIDL_TO_STR(CSIDL_PROGRAMS); - CSIDL_TO_STR(CSIDL_CONTROLS); - CSIDL_TO_STR(CSIDL_PRINTERS); - CSIDL_TO_STR(CSIDL_PERSONAL); - CSIDL_TO_STR(CSIDL_FAVORITES); - CSIDL_TO_STR(CSIDL_STARTUP); - CSIDL_TO_STR(CSIDL_RECENT); - CSIDL_TO_STR(CSIDL_SENDTO); - CSIDL_TO_STR(CSIDL_BITBUCKET); - CSIDL_TO_STR(CSIDL_STARTMENU); - CSIDL_TO_STR(OLD_CSIDL_MYDOCUMENTS); - CSIDL_TO_STR(CSIDL_MYMUSIC); - CSIDL_TO_STR(CSIDL_MYVIDEO); - CSIDL_TO_STR(CSIDL_DESKTOPDIRECTORY); - CSIDL_TO_STR(CSIDL_DRIVES); - CSIDL_TO_STR(CSIDL_NETWORK); - CSIDL_TO_STR(CSIDL_NETHOOD); - CSIDL_TO_STR(CSIDL_FONTS); - CSIDL_TO_STR(CSIDL_TEMPLATES); - CSIDL_TO_STR(CSIDL_COMMON_STARTMENU); - CSIDL_TO_STR(CSIDL_COMMON_PROGRAMS); - CSIDL_TO_STR(CSIDL_COMMON_STARTUP); - CSIDL_TO_STR(CSIDL_COMMON_DESKTOPDIRECTORY); - CSIDL_TO_STR(CSIDL_APPDATA); - CSIDL_TO_STR(CSIDL_PRINTHOOD); - CSIDL_TO_STR(CSIDL_LOCAL_APPDATA); - CSIDL_TO_STR(CSIDL_ALTSTARTUP); - CSIDL_TO_STR(CSIDL_COMMON_ALTSTARTUP); - CSIDL_TO_STR(CSIDL_COMMON_FAVORITES); - CSIDL_TO_STR(CSIDL_INTERNET_CACHE); - CSIDL_TO_STR(CSIDL_COOKIES); - CSIDL_TO_STR(CSIDL_HISTORY); - CSIDL_TO_STR(CSIDL_COMMON_APPDATA); - CSIDL_TO_STR(CSIDL_WINDOWS); - CSIDL_TO_STR(CSIDL_SYSTEM); - CSIDL_TO_STR(CSIDL_PROGRAM_FILES); - CSIDL_TO_STR(CSIDL_MYPICTURES); - CSIDL_TO_STR(CSIDL_PROFILE); - CSIDL_TO_STR(CSIDL_SYSTEMX86); - CSIDL_TO_STR(CSIDL_PROGRAM_FILESX86); - CSIDL_TO_STR(CSIDL_PROGRAM_FILES_COMMON); - CSIDL_TO_STR(CSIDL_PROGRAM_FILES_COMMONX86); - CSIDL_TO_STR(CSIDL_COMMON_TEMPLATES); - CSIDL_TO_STR(CSIDL_COMMON_DOCUMENTS); - CSIDL_TO_STR(CSIDL_COMMON_ADMINTOOLS); - CSIDL_TO_STR(CSIDL_ADMINTOOLS); - CSIDL_TO_STR(CSIDL_CONNECTIONS); - CSIDL_TO_STR(CSIDL_PROFILES); - CSIDL_TO_STR(CSIDL_COMMON_MUSIC); - CSIDL_TO_STR(CSIDL_COMMON_PICTURES); - CSIDL_TO_STR(CSIDL_COMMON_VIDEO); - CSIDL_TO_STR(CSIDL_RESOURCES); - CSIDL_TO_STR(CSIDL_RESOURCES_LOCALIZED); - CSIDL_TO_STR(CSIDL_COMMON_OEM_LINKS); - CSIDL_TO_STR(CSIDL_CDBURN_AREA); - CSIDL_TO_STR(CSIDL_COMPUTERSNEARME); -#undef CSIDL_TO_STR - default: - sprintf(unknown, "unknown (0x%04x)", folder); - return unknown; - } -} - -static const char *printGUID(const GUID *guid, char * guidSTR) -{ - if (!guid) return NULL; - - sprintf(guidSTR, "{%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]); - return guidSTR; -} - -static void test_parameters(void) -{ - LPITEMIDLIST pidl = NULL; - char path[MAX_PATH]; - HRESULT hr; - - if (pSHGetFolderLocation) - { - /* check a bogus CSIDL: */ - pidl = NULL; - hr = pSHGetFolderLocation(NULL, 0xeeee, NULL, 0, &pidl); - ok(hr == E_INVALIDARG, "got 0x%08x, expected E_INVALIDARG\n", hr); - if (hr == S_OK) IMalloc_Free(pMalloc, pidl); - - /* check a bogus user token: */ - pidl = NULL; - hr = pSHGetFolderLocation(NULL, CSIDL_FAVORITES, (HANDLE)2, 0, &pidl); - ok(hr == E_FAIL || hr == E_HANDLE, "got 0x%08x, expected E_FAIL or E_HANDLE\n", hr); - if (hr == S_OK) IMalloc_Free(pMalloc, pidl); - - /* a NULL pidl pointer crashes, so don't test it */ - } - - if (pSHGetSpecialFolderLocation) - { - if (0) - /* crashes */ - SHGetSpecialFolderLocation(NULL, 0, NULL); - - hr = pSHGetSpecialFolderLocation(NULL, 0xeeee, &pidl); - ok(hr == E_INVALIDARG, "got returned 0x%08x\n", hr); - } - - if (pSHGetFolderPathA) - { - /* expect 2's a bogus handle, especially since we didn't open it */ - hr = pSHGetFolderPathA(NULL, CSIDL_DESKTOP, (HANDLE)2, SHGFP_TYPE_DEFAULT, path); - ok(hr == E_FAIL || hr == E_HANDLE || /* Vista and 2k8 */ - broken(hr == S_OK), /* W2k and Me */ "got 0x%08x, expected E_FAIL\n", hr); - - hr = pSHGetFolderPathA(NULL, 0xeeee, NULL, SHGFP_TYPE_DEFAULT, path); - ok(hr == E_INVALIDARG, "got 0x%08x, expected E_INVALIDARG\n", hr); - } - - if (pSHGetSpecialFolderPathA) - { - BOOL ret; - - if (0) - pSHGetSpecialFolderPathA(NULL, NULL, CSIDL_BITBUCKET, FALSE); - - /* odd but true: calling with a NULL path still succeeds if it's a real - * dir (on some windows platform). on winME it generates exception. - */ - ret = pSHGetSpecialFolderPathA(NULL, path, CSIDL_PROGRAMS, FALSE); - ok(ret, "got %d\n", ret); - - ret = pSHGetSpecialFolderPathA(NULL, path, 0xeeee, FALSE); - ok(!ret, "got %d\n", ret); - } -} - -/* Returns the folder's PIDL type, or 0xff if one can't be found. */ -static BYTE testSHGetFolderLocation(int folder) -{ - LPITEMIDLIST pidl; - HRESULT hr; - BYTE ret = 0xff; - - /* treat absence of function as success */ - if (!pSHGetFolderLocation) return TRUE; - - pidl = NULL; - hr = pSHGetFolderLocation(NULL, folder, NULL, 0, &pidl); - if (hr == S_OK) - { - if (pidl) - { - LPITEMIDLIST pidlLast = pILFindLastID(pidl); - - ok(pidlLast != NULL, "%s: ILFindLastID failed\n", - getFolderName(folder)); - if (pidlLast) - ret = pidlLast->mkid.abID[0]; - IMalloc_Free(pMalloc, pidl); - } - } - return ret; -} - -/* Returns the folder's PIDL type, or 0xff if one can't be found. */ -static BYTE testSHGetSpecialFolderLocation(int folder) -{ - LPITEMIDLIST pidl; - HRESULT hr; - BYTE ret = 0xff; - - /* treat absence of function as success */ - if (!pSHGetSpecialFolderLocation) return TRUE; - - pidl = NULL; - hr = pSHGetSpecialFolderLocation(NULL, folder, &pidl); - if (hr == S_OK) - { - if (pidl) - { - LPITEMIDLIST pidlLast = pILFindLastID(pidl); - - ok(pidlLast != NULL, - "%s: ILFindLastID failed\n", getFolderName(folder)); - if (pidlLast) - ret = pidlLast->mkid.abID[0]; - IMalloc_Free(pMalloc, pidl); - } - } - return ret; -} - -static void test_SHGetFolderPath(BOOL optional, int folder) -{ - char path[MAX_PATH]; - HRESULT hr; - - if (!pSHGetFolderPathA) return; - - hr = pSHGetFolderPathA(NULL, folder, NULL, SHGFP_TYPE_CURRENT, path); - ok(hr == S_OK || optional, - "SHGetFolderPathA(NULL, %s, NULL, SHGFP_TYPE_CURRENT, path) failed: 0x%08x\n", getFolderName(folder), hr); -} - -static void test_SHGetSpecialFolderPath(BOOL optional, int folder) -{ - char path[MAX_PATH]; - BOOL ret; - - if (!pSHGetSpecialFolderPathA) return; - - ret = pSHGetSpecialFolderPathA(NULL, path, folder, FALSE); - if (ret && winetest_interactive) - printf("%s: %s\n", getFolderName(folder), path); - ok(ret || optional, - "SHGetSpecialFolderPathA(NULL, path, %s, FALSE) failed\n", - getFolderName(folder)); -} - -static void test_ShellValues(const struct shellExpectedValues testEntries[], - int numEntries, BOOL optional) -{ - int i; - - for (i = 0; i < numEntries; i++) - { - BYTE type; - int j; - BOOL foundTypeMatch = FALSE; - - if (pSHGetFolderLocation) - { - type = testSHGetFolderLocation(testEntries[i].folder); - for (j = 0; !foundTypeMatch && j < testEntries[i].numTypes; j++) - if (testEntries[i].types[j] == type) - foundTypeMatch = TRUE; - ok(foundTypeMatch || optional || broken(type == 0xff) /* Win9x */, - "%s has unexpected type %d (0x%02x)\n", - getFolderName(testEntries[i].folder), type, type); - } - type = testSHGetSpecialFolderLocation(testEntries[i].folder); - for (j = 0, foundTypeMatch = FALSE; !foundTypeMatch && - j < testEntries[i].numTypes; j++) - if (testEntries[i].types[j] == type) - foundTypeMatch = TRUE; - ok(foundTypeMatch || optional || broken(type == 0xff) /* Win9x */, - "%s has unexpected type %d (0x%02x)\n", - getFolderName(testEntries[i].folder), type, type); - switch (type) - { - case PT_FOLDER: - case PT_DRIVE: - case PT_DRIVE2: - case PT_IESPECIAL2: - test_SHGetFolderPath(optional, testEntries[i].folder); - test_SHGetSpecialFolderPath(optional, testEntries[i].folder); - break; - } - } -} - -/* Attempts to verify that the folder path corresponding to the folder CSIDL - * value has the same value as the environment variable with name envVar. - * Doesn't mind if SHGetSpecialFolderPath fails for folder or if envVar isn't - * set in this environment; different OS and shell version behave differently. - * However, if both are present, fails if envVar's value is not the same - * (byte-for-byte) as what SHGetSpecialFolderPath returns. - */ -static void matchSpecialFolderPathToEnv(int folder, const char *envVar) -{ - char path[MAX_PATH]; - - if (!pSHGetSpecialFolderPathA) return; - - if (pSHGetSpecialFolderPathA(NULL, path, folder, FALSE)) - { - char *envVal = getenv(envVar); - - ok(!envVal || !lstrcmpiA(envVal, path), - "%%%s%% does not match SHGetSpecialFolderPath:\n" - "%%%s%% is %s\nSHGetSpecialFolderPath returns %s\n", - envVar, envVar, envVal, path); - } -} - -/* Attempts to match the GUID returned by SHGetFolderLocation for folder with - * GUID. Assumes the type of the returned PIDL is in fact a GUID, but doesn't - * fail if it isn't--that check should already have been done. - * Fails if the returned PIDL is a GUID whose value does not match guid. - */ -static void matchGUID(int folder, const GUID *guid, const GUID *guid_alt) -{ - LPITEMIDLIST pidl; - HRESULT hr; - - if (!pSHGetFolderLocation) return; - if (!guid) return; - - pidl = NULL; - hr = pSHGetFolderLocation(NULL, folder, NULL, 0, &pidl); - if (hr == S_OK) - { - LPITEMIDLIST pidlLast = pILFindLastID(pidl); - - if (pidlLast && (pidlLast->mkid.abID[0] == PT_SHELLEXT || - pidlLast->mkid.abID[0] == PT_GUID)) - { - GUID *shellGuid = (GUID *)(pidlLast->mkid.abID + 2); - char shellGuidStr[39], guidStr[39], guid_altStr[39]; - - if (!guid_alt) - ok(IsEqualIID(shellGuid, guid), - "%s: got GUID %s, expected %s\n", getFolderName(folder), - printGUID(shellGuid, shellGuidStr), printGUID(guid, guidStr)); - else - ok(IsEqualIID(shellGuid, guid) || - IsEqualIID(shellGuid, guid_alt), - "%s: got GUID %s, expected %s or %s\n", getFolderName(folder), - printGUID(shellGuid, shellGuidStr), printGUID(guid, guidStr), - printGUID(guid_alt, guid_altStr)); - } - IMalloc_Free(pMalloc, pidl); - } -} - -/* Checks the PIDL type of all the known values. */ -static void test_PidlTypes(void) -{ - /* Desktop */ - test_SHGetFolderPath(FALSE, CSIDL_DESKTOP); - test_SHGetSpecialFolderPath(FALSE, CSIDL_DESKTOP); - - test_ShellValues(requiredShellValues, ARRAY_SIZE(requiredShellValues), FALSE); - test_ShellValues(optionalShellValues, ARRAY_SIZE(optionalShellValues), TRUE); -} - -/* FIXME: Should be in shobjidl.idl */ -DEFINE_GUID(CLSID_NetworkExplorerFolder, 0xF02C1A0D, 0xBE21, 0x4350, 0x88, 0xB0, 0x73, 0x67, 0xFC, 0x96, 0xEF, 0x3C); - -/* Verifies various shell virtual folders have the correct well-known GUIDs. */ -static void test_GUIDs(void) -{ - matchGUID(CSIDL_BITBUCKET, &CLSID_RecycleBin, NULL); - matchGUID(CSIDL_CONTROLS, &CLSID_ControlPanel, NULL); - matchGUID(CSIDL_DRIVES, &CLSID_MyComputer, NULL); - matchGUID(CSIDL_INTERNET, &CLSID_Internet, NULL); - matchGUID(CSIDL_NETWORK, &CLSID_NetworkPlaces, &CLSID_NetworkExplorerFolder); /* Vista and higher */ - matchGUID(CSIDL_PERSONAL, &CLSID_MyDocuments, NULL); - matchGUID(CSIDL_COMMON_DOCUMENTS, &CLSID_CommonDocuments, NULL); - matchGUID(CSIDL_PRINTERS, &CLSID_Printers, NULL); -} - -/* Verifies various shell paths match the environment variables to which they - * correspond. - */ -static void test_EnvVars(void) -{ - matchSpecialFolderPathToEnv(CSIDL_PROGRAM_FILES, "ProgramFiles"); - matchSpecialFolderPathToEnv(CSIDL_APPDATA, "APPDATA"); - matchSpecialFolderPathToEnv(CSIDL_PROFILE, "USERPROFILE"); - matchSpecialFolderPathToEnv(CSIDL_WINDOWS, "SystemRoot"); - matchSpecialFolderPathToEnv(CSIDL_WINDOWS, "windir"); - matchSpecialFolderPathToEnv(CSIDL_PROGRAM_FILES_COMMON, "CommonProgramFiles"); - /* this is only set on Wine, but can't hurt to verify it: */ - matchSpecialFolderPathToEnv(CSIDL_SYSTEM, "winsysdir"); -} - -/* Loosely based on PathRemoveBackslashA from dlls/shlwapi/path.c */ -static BOOL myPathIsRootA(LPCSTR lpszPath) -{ - if (lpszPath && *lpszPath && - lpszPath[1] == ':' && lpszPath[2] == '\\' && lpszPath[3] == '\0') - return TRUE; /* X:\ */ - return FALSE; -} -static LPSTR myPathRemoveBackslashA( LPSTR lpszPath ) -{ - LPSTR szTemp = NULL; - - if(lpszPath) - { - szTemp = CharPrevA(lpszPath, lpszPath + strlen(lpszPath)); - if (!myPathIsRootA(lpszPath) && *szTemp == '\\') - *szTemp = '\0'; - } - return szTemp; -} - -/* Verifies the shell path for CSIDL_WINDOWS matches the return from - * GetWindowsDirectory. If SHGetSpecialFolderPath fails, no harm, no foul--not - * every shell32 version supports CSIDL_WINDOWS. - */ -static void testWinDir(void) -{ - char windowsShellPath[MAX_PATH], windowsDir[MAX_PATH] = { 0 }; - - if (!pSHGetSpecialFolderPathA) return; - - if (pSHGetSpecialFolderPathA(NULL, windowsShellPath, CSIDL_WINDOWS, FALSE)) - { - myPathRemoveBackslashA(windowsShellPath); - GetWindowsDirectoryA(windowsDir, sizeof(windowsDir)); - myPathRemoveBackslashA(windowsDir); - ok(!lstrcmpiA(windowsDir, windowsShellPath), - "GetWindowsDirectory returns %s SHGetSpecialFolderPath returns %s\n", - windowsDir, windowsShellPath); - } -} - -/* Verifies the shell path for CSIDL_SYSTEM matches the return from - * GetSystemDirectory. If SHGetSpecialFolderPath fails, no harm, - * no foul--not every shell32 version supports CSIDL_SYSTEM. - */ -static void testSystemDir(void) -{ - char systemShellPath[MAX_PATH], systemDir[MAX_PATH], systemDirx86[MAX_PATH]; - - if (!pSHGetSpecialFolderPathA) return; - - GetSystemDirectoryA(systemDir, sizeof(systemDir)); - myPathRemoveBackslashA(systemDir); - if (pSHGetSpecialFolderPathA(NULL, systemShellPath, CSIDL_SYSTEM, FALSE)) - { - myPathRemoveBackslashA(systemShellPath); - ok(!lstrcmpiA(systemDir, systemShellPath), - "GetSystemDirectory returns %s SHGetSpecialFolderPath returns %s\n", - systemDir, systemShellPath); - } - - if (!pGetSystemWow64DirectoryA || !pGetSystemWow64DirectoryA(systemDirx86, sizeof(systemDirx86))) - GetSystemDirectoryA(systemDirx86, sizeof(systemDirx86)); - myPathRemoveBackslashA(systemDirx86); - if (pSHGetSpecialFolderPathA(NULL, systemShellPath, CSIDL_SYSTEMX86, FALSE)) - { - myPathRemoveBackslashA(systemShellPath); - ok(!lstrcmpiA(systemDirx86, systemShellPath) || broken(!lstrcmpiA(systemDir, systemShellPath)), - "GetSystemDirectory returns %s SHGetSpecialFolderPath returns %s\n", - systemDir, systemShellPath); - } -} - -/* Globals used by subprocesses */ -static int myARGC; -static char **myARGV; -static char base[MAX_PATH]; -static char selfname[MAX_PATH]; - -static int init(void) -{ - myARGC = winetest_get_mainargs(&myARGV); - if (!GetCurrentDirectoryA(sizeof(base), base)) return 0; - strcpy(selfname, myARGV[0]); - return 1; -} - -static void doChild(const char *arg) -{ - char path[MAX_PATH]; - HRESULT hr; - - if (arg[0] == '1') - { - LPITEMIDLIST pidl; - char *p; - - /* test what happens when CSIDL_FAVORITES is set to a nonexistent directory */ - - /* test some failure cases first: */ - hr = pSHGetFolderPathA(NULL, CSIDL_FAVORITES, NULL, SHGFP_TYPE_CURRENT, path); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "SHGetFolderPath returned 0x%08x, expected 0x80070002\n", hr); - - pidl = NULL; - hr = pSHGetFolderLocation(NULL, CSIDL_FAVORITES, NULL, 0, &pidl); - ok(hr == E_FAIL || hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "SHGetFolderLocation returned 0x%08x\n", hr); - if (hr == S_OK && pidl) IMalloc_Free(pMalloc, pidl); - - ok(!pSHGetSpecialFolderPathA(NULL, path, CSIDL_FAVORITES, FALSE), - "SHGetSpecialFolderPath succeeded, expected failure\n"); - - pidl = NULL; - hr = pSHGetSpecialFolderLocation(NULL, CSIDL_FAVORITES, &pidl); - ok(hr == E_FAIL || hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "SHGetFolderLocation returned 0x%08x\n", hr); - - if (hr == S_OK && pidl) IMalloc_Free(pMalloc, pidl); - - /* now test success: */ - hr = pSHGetFolderPathA(NULL, CSIDL_FAVORITES | CSIDL_FLAG_CREATE, NULL, - SHGFP_TYPE_CURRENT, path); - ok (hr == S_OK, "got 0x%08x\n", hr); - if (hr == S_OK) - { - BOOL ret; - - trace("CSIDL_FAVORITES was changed to %s\n", path); - ret = CreateDirectoryA(path, NULL); - ok(!ret, "expected failure with ERROR_ALREADY_EXISTS\n"); - if (!ret) - ok(GetLastError() == ERROR_ALREADY_EXISTS, - "got %d, expected ERROR_ALREADY_EXISTS\n", GetLastError()); - - p = path + strlen(path); - strcpy(p, "\\desktop.ini"); - DeleteFileA(path); - *p = 0; - SetFileAttributesA( path, FILE_ATTRIBUTE_NORMAL ); - ret = RemoveDirectoryA(path); - ok( ret, "failed to remove %s error %u\n", path, GetLastError() ); - } - } - else if (arg[0] == '2') - { - /* make sure SHGetFolderPath still succeeds when the - original value of CSIDL_FAVORITES is restored. */ - hr = pSHGetFolderPathA(NULL, CSIDL_FAVORITES | CSIDL_FLAG_CREATE, NULL, - SHGFP_TYPE_CURRENT, path); - ok(hr == S_OK, "SHGetFolderPath failed: 0x%08x\n", hr); - } -} - -/* Tests the return values from the various shell functions both with and - * without the use of the CSIDL_FLAG_CREATE flag. This flag only appeared in - * version 5 of the shell, so don't test unless it's at least version 5. - * The test reads a value from the registry, modifies it, calls - * SHGetFolderPath once with the CSIDL_FLAG_CREATE flag, and immediately - * afterward without it. Then it restores the registry and deletes the folder - * that was created. - * One oddity with respect to restoration: shell32 caches somehow, so it needs - * to be reloaded in order to see the correct (restored) value. - * Some APIs unrelated to the ones under test may fail, but I expect they're - * covered by other unit tests; I just print out something about failure to - * help trace what's going on. - */ -static void test_NonExistentPath(void) -{ - static const char userShellFolders[] = - "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders"; - char originalPath[MAX_PATH], modifiedPath[MAX_PATH]; - HKEY key; - - if (!pSHGetFolderPathA) return; - if (!pSHGetFolderLocation) return; - if (!pSHGetSpecialFolderPathA) return; - if (!pSHGetSpecialFolderLocation) return; - if (!pSHFileOperationA) return; - if (shellVersion.dwMajorVersion < 5) return; - - if (!RegOpenKeyExA(HKEY_CURRENT_USER, userShellFolders, 0, KEY_ALL_ACCESS, - &key)) - { - DWORD len, type; - - len = sizeof(originalPath); - if (!RegQueryValueExA(key, "Favorites", NULL, &type, - (LPBYTE)&originalPath, &len)) - { - size_t len = strlen(originalPath); - - memcpy(modifiedPath, originalPath, len); - modifiedPath[len++] = '2'; - modifiedPath[len++] = '\0'; - trace("Changing CSIDL_FAVORITES to %s\n", modifiedPath); - if (!RegSetValueExA(key, "Favorites", 0, type, - (LPBYTE)modifiedPath, len)) - { - char buffer[MAX_PATH+20]; - STARTUPINFOA startup; - PROCESS_INFORMATION info; - - sprintf(buffer, "%s tests/shellpath.c 1", selfname); - memset(&startup, 0, sizeof(startup)); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW; - startup.dwFlags = SW_SHOWNORMAL; - CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, - &startup, &info); - winetest_wait_child_process( info.hProcess ); - - /* restore original values: */ - trace("Restoring CSIDL_FAVORITES to %s\n", originalPath); - RegSetValueExA(key, "Favorites", 0, type, (LPBYTE) originalPath, - strlen(originalPath) + 1); - RegFlushKey(key); - - sprintf(buffer, "%s tests/shellpath.c 2", selfname); - memset(&startup, 0, sizeof(startup)); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW; - startup.dwFlags = SW_SHOWNORMAL; - CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0L, NULL, NULL, - &startup, &info); - ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, - "child process termination\n"); - } - } - else skip("RegQueryValueExA(key, Favorites, ...) failed\n"); - if (key) - RegCloseKey(key); - } - else skip("RegOpenKeyExA(HKEY_CURRENT_USER, %s, ...) failed\n", userShellFolders); -} - -static void test_SHGetFolderPathEx(void) -{ - HRESULT hr; - WCHAR buffer[MAX_PATH], *path; - DWORD len; - - if (!pSHGetKnownFolderPath || !pSHGetFolderPathEx) - { - win_skip("SHGetKnownFolderPath or SHGetFolderPathEx not available\n"); - return; - } - -if (0) { /* crashes */ - hr = pSHGetKnownFolderPath(&FOLDERID_Desktop, 0, NULL, NULL); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08x\n", hr); -} - path = NULL; - hr = pSHGetKnownFolderPath(&FOLDERID_Desktop, 0, NULL, &path); - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); - ok(path != NULL, "expected path != NULL\n"); - - hr = pSHGetFolderPathEx(&FOLDERID_Desktop, 0, NULL, buffer, MAX_PATH); - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); - ok(!lstrcmpiW(path, buffer), "expected equal paths\n"); - len = lstrlenW(buffer); - CoTaskMemFree(path); - - hr = pSHGetFolderPathEx(&FOLDERID_Desktop, 0, NULL, buffer, 0); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08x\n", hr); - -if (0) { /* crashes */ - hr = pSHGetFolderPathEx(&FOLDERID_Desktop, 0, NULL, NULL, len + 1); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08x\n", hr); - - hr = pSHGetFolderPathEx(NULL, 0, NULL, buffer, MAX_PATH); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08x\n", hr); -} - hr = pSHGetFolderPathEx(&FOLDERID_Desktop, 0, NULL, buffer, len); - ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), "expected 0x8007007a, got 0x%08x\n", hr); - - hr = pSHGetFolderPathEx(&FOLDERID_Desktop, 0, NULL, buffer, len + 1); - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); -} - -/* Standard CSIDL values (and their flags) uses only two less-significant bytes */ -#define NO_CSIDL 0x10000 -#define CSIDL_TODO_WINE 0x20000 -#define KNOWN_FOLDER(id, csidl, name, category, parent, relative_path, parsing_name, attributes, definitionFlags) \ - { &id, # id, csidl, # csidl, name, category, &parent, # parent, relative_path, parsing_name, attributes, definitionFlags, __LINE__ } - -/* non-published known folders test */ -static const GUID _FOLDERID_CryptoKeys = {0xB88F4DAA, 0xE7BD, 0x49A9, {0xB7, 0x4D, 0x02, 0x88, 0x5A, 0x5D, 0xC7, 0x65} }; -static const GUID _FOLDERID_DpapiKeys = {0x10C07CD0, 0xEF91, 0x4567, {0xB8, 0x50, 0x44, 0x8B, 0x77, 0xCB, 0x37, 0xF9} }; -static const GUID _FOLDERID_SystemCertificates = {0x54EED2E0, 0xE7CA, 0x4FDB, {0x91, 0x48, 0x0F, 0x42, 0x47, 0x29, 0x1C, 0xFA} }; -static const GUID _FOLDERID_CredentialManager = {0x915221FB, 0x9EFE, 0x4BDA, {0x8F, 0xD7, 0xF7, 0x8D, 0xCA, 0x77, 0x4F, 0x87} }; - -struct knownFolderDef { - const KNOWNFOLDERID *folderId; - const char *sFolderId; - const int csidl; - const char *sCsidl; - const char *sName; - const KF_CATEGORY category; - const KNOWNFOLDERID *fidParent; - const char *sParent; - const char *sRelativePath; - const char *sParsingName; - const DWORD attributes; - const KF_DEFINITION_FLAGS definitionFlags; - const int line; -}; - -/* Note: content of parsing name may vary between Windows versions. - * As a base, values from 6.0 (Vista) were used. Some entries may contain - * alternative values. In that case, Windows version where the value was - * found is noted. - * - * The list of values for parsing name was encoded as a number of null- - * terminated strings placed one by one (separated by null byte only). - * End of list is marked by two consecutive null bytes. - */ -static const struct knownFolderDef known_folders[] = { - KNOWN_FOLDER(FOLDERID_AddNewPrograms, - NO_CSIDL, - "AddNewProgramsFolder", - KF_CATEGORY_VIRTUAL, - GUID_NULL, - NULL, - "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{15eae92e-f17a-4431-9f28-805e482dafd4}\0" - "shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{15eae92e-f17a-4431-9f28-805e482dafd4}\0\0" /* 6.1 */, - 0, - 0), - KNOWN_FOLDER(FOLDERID_AdminTools, - CSIDL_ADMINTOOLS, - "Administrative Tools", - KF_CATEGORY_PERUSER, - FOLDERID_Programs, - "Administrative Tools", - NULL, - FILE_ATTRIBUTE_READONLY, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_AppUpdates, - NO_CSIDL, - "AppUpdatesFolder", - KF_CATEGORY_VIRTUAL, - GUID_NULL, - NULL, - "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{7b81be6a-ce2b-4676-a29e-eb907a5126c5}\\::{d450a8a1-9568-45c7-9c0e-b4f9fb4537bd}\0" - "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{7b81be6a-ce2b-4676-a29e-eb907a5126c5}\\::{d450a8a1-9568-45c7-9c0e-b4f9fb4537bd}\0\0" /* 6.1 */, - 0, - 0), - KNOWN_FOLDER(FOLDERID_CDBurning, - CSIDL_CDBURN_AREA, - "CD Burning", - KF_CATEGORY_PERUSER, - FOLDERID_LocalAppData, - "Microsoft\\Windows\\Burn\\Burn", - NULL, - FILE_ATTRIBUTE_READONLY, - KFDF_LOCAL_REDIRECT_ONLY), - KNOWN_FOLDER(FOLDERID_ChangeRemovePrograms, - NO_CSIDL, - "ChangeRemoveProgramsFolder", - KF_CATEGORY_VIRTUAL, - GUID_NULL, - NULL, - "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{7b81be6a-ce2b-4676-a29e-eb907a5126c5}\0" - "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{7b81be6a-ce2b-4676-a29e-eb907a5126c5}\0\0" /* 6.1 */, - 0, - 0), - KNOWN_FOLDER(FOLDERID_CommonAdminTools, - CSIDL_COMMON_ADMINTOOLS, - "Common Administrative Tools", - KF_CATEGORY_COMMON, - FOLDERID_CommonPrograms, - "Administrative Tools", - NULL, - FILE_ATTRIBUTE_READONLY, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_CommonOEMLinks, - CSIDL_COMMON_OEM_LINKS,"OEM Links", - KF_CATEGORY_COMMON, - FOLDERID_ProgramData, - "OEM Links", - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_CommonPrograms, - CSIDL_COMMON_PROGRAMS, - "Common Programs", - KF_CATEGORY_COMMON, - FOLDERID_CommonStartMenu, - "Programs", - NULL, - FILE_ATTRIBUTE_READONLY, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_CommonStartMenu, - CSIDL_COMMON_STARTMENU, - "Common Start Menu", - KF_CATEGORY_COMMON, - FOLDERID_ProgramData, - "Microsoft\\Windows\\Start Menu", - NULL, - FILE_ATTRIBUTE_READONLY, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_CommonStartup, - CSIDL_COMMON_STARTUP, - "Common Startup", - KF_CATEGORY_COMMON, - FOLDERID_CommonPrograms, - "StartUp", - NULL, - FILE_ATTRIBUTE_READONLY, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_CommonTemplates, - CSIDL_COMMON_TEMPLATES, - "Common Templates", - KF_CATEGORY_COMMON, - FOLDERID_ProgramData, - "Microsoft\\Windows\\Templates", - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_ComputerFolder, - CSIDL_DRIVES, - "MyComputerFolder", - KF_CATEGORY_VIRTUAL, - GUID_NULL, - NULL, - "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\0\0", - 0, - 0), - KNOWN_FOLDER(FOLDERID_ConflictFolder, - NO_CSIDL, - "ConflictFolder", - KF_CATEGORY_VIRTUAL, - GUID_NULL, - NULL, - "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{E413D040-6788-4C22-957E-175D1C513A34},\0" - "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{E413D040-6788-4C22-957E-175D1C513A34},\0\0" /* 6.1 */, - 0, - 0), - KNOWN_FOLDER(FOLDERID_ConnectionsFolder, - CSIDL_CONNECTIONS, - "ConnectionsFolder", - KF_CATEGORY_VIRTUAL, - GUID_NULL, - NULL, - "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{7007ACC7-3202-11D1-AAD2-00805FC1270E}\0" - "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{7007ACC7-3202-11D1-AAD2-00805FC1270E}\0\0" /* 6.1 */, - 0, - 0), - KNOWN_FOLDER(FOLDERID_Contacts, - NO_CSIDL, - "Contacts", - KF_CATEGORY_PERUSER, - FOLDERID_Profile, - "Contacts", - "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{56784854-C6CB-462B-8169-88E350ACB882}\0\0", - FILE_ATTRIBUTE_READONLY, - KFDF_ROAMABLE | KFDF_PRECREATE | KFDF_PUBLISHEXPANDEDPATH), - KNOWN_FOLDER(FOLDERID_ControlPanelFolder, - CSIDL_CONTROLS, - "ControlPanelFolder", - KF_CATEGORY_VIRTUAL, - GUID_NULL, - NULL, - "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\0" - "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\0\0" /* 6.1 */, - 0, - 0), - KNOWN_FOLDER(FOLDERID_Cookies, - CSIDL_COOKIES, - "Cookies", - KF_CATEGORY_PERUSER, - FOLDERID_RoamingAppData, - "Microsoft\\Windows\\Cookies", - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_Desktop, - CSIDL_DESKTOP, - "Desktop", - KF_CATEGORY_PERUSER, - FOLDERID_Profile, - "Desktop", - NULL, - FILE_ATTRIBUTE_READONLY, - KFDF_ROAMABLE | KFDF_PRECREATE | KFDF_PUBLISHEXPANDEDPATH), - KNOWN_FOLDER(FOLDERID_DeviceMetadataStore, - NO_CSIDL, - "Device Metadata Store", - KF_CATEGORY_COMMON, - FOLDERID_ProgramData, - "Microsoft\\Windows\\DeviceMetadataStore", - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_Documents, - CSIDL_MYDOCUMENTS, - "Personal", - KF_CATEGORY_PERUSER, - FOLDERID_Profile, - "Documents", - "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{FDD39AD0-238F-46AF-ADB4-6C85480369C7}\0\0", - FILE_ATTRIBUTE_READONLY, - KFDF_ROAMABLE | KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_DocumentsLibrary, - NO_CSIDL, - "DocumentsLibrary", - KF_CATEGORY_PERUSER, - FOLDERID_Libraries, - "Documents.library-ms", - "::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\\{7b0db17d-9cd2-4a93-9733-46cc89022e7c}\0\0", - 0, - KFDF_PRECREATE | KFDF_STREAM), - KNOWN_FOLDER(FOLDERID_Downloads, - NO_CSIDL, - "Downloads", - KF_CATEGORY_PERUSER, - FOLDERID_Profile, - "Downloads", - NULL, - FILE_ATTRIBUTE_READONLY, - KFDF_ROAMABLE | KFDF_PRECREATE | KFDF_PUBLISHEXPANDEDPATH), - KNOWN_FOLDER(FOLDERID_Favorites, - CSIDL_FAVORITES, - "Favorites", - KF_CATEGORY_PERUSER, - FOLDERID_Profile, - "Favorites", - NULL, - FILE_ATTRIBUTE_READONLY, - KFDF_ROAMABLE | KFDF_PRECREATE | KFDF_PUBLISHEXPANDEDPATH), - KNOWN_FOLDER(FOLDERID_Fonts, - CSIDL_FONTS, - "Fonts", - KF_CATEGORY_FIXED, - FOLDERID_Windows, - NULL, - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_Games, - NO_CSIDL, - "Games", - KF_CATEGORY_VIRTUAL, - GUID_NULL, - NULL, - "::{ED228FDF-9EA8-4870-83b1-96b02CFE0D52}\0\0", - 0, - 0), - KNOWN_FOLDER(FOLDERID_GameTasks, - NO_CSIDL, - "GameTasks", - KF_CATEGORY_PERUSER, - FOLDERID_LocalAppData, - "Microsoft\\Windows\\GameExplorer", - NULL, - 0, - KFDF_LOCAL_REDIRECT_ONLY), - KNOWN_FOLDER(FOLDERID_History, - CSIDL_HISTORY, - "History", - KF_CATEGORY_PERUSER, - FOLDERID_LocalAppData, - "Microsoft\\Windows\\History", - NULL, - 0, - KFDF_LOCAL_REDIRECT_ONLY), - KNOWN_FOLDER(FOLDERID_HomeGroup, - NO_CSIDL, - "HomeGroupFolder", - KF_CATEGORY_VIRTUAL, - GUID_NULL, - NULL, - "::{B4FB3F98-C1EA-428d-A78A-D1F5659CBA93}\0\0", - 0, - 0), - KNOWN_FOLDER(FOLDERID_ImplicitAppShortcuts, - NO_CSIDL, - "ImplicitAppShortcuts", - KF_CATEGORY_PERUSER, - FOLDERID_UserPinned, - "ImplicitAppShortcuts", - NULL, - 0, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_InternetCache, - CSIDL_INTERNET_CACHE, - "Cache", - KF_CATEGORY_PERUSER, - FOLDERID_LocalAppData, - "Microsoft\\Windows\\Temporary Internet Files", - NULL, - 0, - KFDF_LOCAL_REDIRECT_ONLY), - KNOWN_FOLDER(FOLDERID_InternetFolder, - CSIDL_INTERNET, - "InternetFolder", - KF_CATEGORY_VIRTUAL, - GUID_NULL, - NULL, - "::{871C5380-42A0-1069-A2EA-08002B30309D}\0\0", - 0, - 0), - KNOWN_FOLDER(FOLDERID_Libraries, - NO_CSIDL, - "Libraries", - KF_CATEGORY_PERUSER, - FOLDERID_RoamingAppData, - "Microsoft\\Windows\\Libraries", - NULL, - 0, - KFDF_PRECREATE | KFDF_PUBLISHEXPANDEDPATH), - KNOWN_FOLDER(FOLDERID_Links, - NO_CSIDL, - "Links", - KF_CATEGORY_PERUSER, - FOLDERID_Profile, - "Links", - "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{bfb9d5e0-c6a9-404c-b2b2-ae6db6af4968}\0\0", - FILE_ATTRIBUTE_READONLY, - KFDF_ROAMABLE | KFDF_PRECREATE | KFDF_PUBLISHEXPANDEDPATH), - KNOWN_FOLDER(FOLDERID_LocalAppData, - CSIDL_LOCAL_APPDATA, - "Local AppData", - KF_CATEGORY_PERUSER, - FOLDERID_Profile, - "AppData\\Local", - NULL, - 0, - KFDF_LOCAL_REDIRECT_ONLY | KFDF_PUBLISHEXPANDEDPATH), - KNOWN_FOLDER(FOLDERID_LocalAppDataLow, - NO_CSIDL, - "LocalAppDataLow", - KF_CATEGORY_PERUSER, - FOLDERID_Profile, - "AppData\\LocalLow", - NULL, - FILE_ATTRIBUTE_NOT_CONTENT_INDEXED, - KFDF_LOCAL_REDIRECT_ONLY | KFDF_PRECREATE | KFDF_PUBLISHEXPANDEDPATH), - KNOWN_FOLDER(FOLDERID_LocalizedResourcesDir, - CSIDL_RESOURCES_LOCALIZED, - "LocalizedResourcesDir", - KF_CATEGORY_FIXED, - GUID_NULL, - NULL, - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_Music, - CSIDL_MYMUSIC, - "My Music", - KF_CATEGORY_PERUSER, - FOLDERID_Profile, - "Music", - "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{4BD8D571-6D19-48D3-BE97-422220080E43}\0\0", - FILE_ATTRIBUTE_READONLY, - KFDF_ROAMABLE | KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_MusicLibrary, - NO_CSIDL, - "MusicLibrary", - KF_CATEGORY_PERUSER, - FOLDERID_Libraries, - "Music.library-ms", - "::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\\{2112AB0A-C86A-4ffe-A368-0DE96E47012E}\0\0", - 0, - KFDF_PRECREATE | KFDF_STREAM), - KNOWN_FOLDER(FOLDERID_NetHood, - CSIDL_NETHOOD, - "NetHood", - KF_CATEGORY_PERUSER, - FOLDERID_RoamingAppData, - "Microsoft\\Windows\\Network Shortcuts", - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_NetworkFolder, - CSIDL_NETWORK, - "NetworkPlacesFolder", - KF_CATEGORY_VIRTUAL, - GUID_NULL, - NULL, - "::{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}\0\0", - 0, - 0), - KNOWN_FOLDER(FOLDERID_OriginalImages, - NO_CSIDL, - "Original Images", - KF_CATEGORY_PERUSER, - FOLDERID_LocalAppData, - "Microsoft\\Windows Photo Gallery\\Original Images", - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_PhotoAlbums, - NO_CSIDL, - "PhotoAlbums", - KF_CATEGORY_PERUSER, - FOLDERID_Pictures, - "Slide Shows", - NULL, - FILE_ATTRIBUTE_READONLY, - 0), - KNOWN_FOLDER(FOLDERID_Pictures, - CSIDL_MYPICTURES, - "My Pictures", - KF_CATEGORY_PERUSER, - FOLDERID_Profile, - "Pictures", - "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{33E28130-4E1E-4676-835A-98395C3BC3BB}\0\0", - FILE_ATTRIBUTE_READONLY, - KFDF_ROAMABLE | KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_PicturesLibrary, - NO_CSIDL, - "PicturesLibrary", - KF_CATEGORY_PERUSER, - FOLDERID_Libraries, - "Pictures.library-ms", - "::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\\{A990AE9F-A03B-4e80-94BC-9912D7504104}\0\0", - 0, - KFDF_PRECREATE | KFDF_STREAM), - KNOWN_FOLDER(FOLDERID_Playlists, - NO_CSIDL, - "Playlists", - KF_CATEGORY_PERUSER, - FOLDERID_Music, - "Playlists", - NULL, - FILE_ATTRIBUTE_READONLY, - 0), - KNOWN_FOLDER(FOLDERID_PrintersFolder, - CSIDL_PRINTERS, - "PrintersFolder", - KF_CATEGORY_VIRTUAL, - GUID_NULL, - NULL, - "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{2227A280-3AEA-1069-A2DE-08002B30309D}\0\0", - 0, - 0), - KNOWN_FOLDER(FOLDERID_PrintHood, - CSIDL_PRINTHOOD, - "PrintHood", - KF_CATEGORY_PERUSER, - FOLDERID_RoamingAppData, - "Microsoft\\Windows\\Printer Shortcuts", - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_Profile, - CSIDL_PROFILE, - "Profile", - KF_CATEGORY_FIXED, - GUID_NULL, - NULL, - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_ProgramData, - CSIDL_COMMON_APPDATA, - "Common AppData", - KF_CATEGORY_FIXED, - GUID_NULL, - NULL, - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_ProgramFiles, - CSIDL_PROGRAM_FILES, - "ProgramFiles", - KF_CATEGORY_FIXED, - GUID_NULL, - NULL, - NULL, - FILE_ATTRIBUTE_READONLY, - KFDF_PRECREATE - ), - KNOWN_FOLDER(FOLDERID_ProgramFilesCommon, - CSIDL_PROGRAM_FILES_COMMON, - "ProgramFilesCommon", - KF_CATEGORY_FIXED, - GUID_NULL, - NULL, - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_ProgramFilesCommonX64, - NO_CSIDL, - "ProgramFilesCommonX64", - KF_CATEGORY_FIXED, - GUID_NULL, - NULL, - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_ProgramFilesCommonX86, - NO_CSIDL, - "ProgramFilesCommonX86", - KF_CATEGORY_FIXED, - GUID_NULL, - NULL, - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_ProgramFilesX64, - NO_CSIDL, - "ProgramFilesX64", - KF_CATEGORY_FIXED, - GUID_NULL, - NULL, - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_ProgramFilesX86, - CSIDL_PROGRAM_FILESX86, - "ProgramFilesX86", - KF_CATEGORY_FIXED, - GUID_NULL, - NULL, - NULL, - FILE_ATTRIBUTE_READONLY, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_Programs, - CSIDL_PROGRAMS, - "Programs", - KF_CATEGORY_PERUSER, - FOLDERID_StartMenu, - "Programs", - NULL, - FILE_ATTRIBUTE_READONLY, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_Public, - NO_CSIDL, - "Public", - KF_CATEGORY_FIXED, - GUID_NULL, - NULL, - "::{4336a54d-038b-4685-ab02-99bb52d3fb8b}\0" - "(null)\0\0" /* 6.1 */, - FILE_ATTRIBUTE_READONLY, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_PublicDesktop, - CSIDL_COMMON_DESKTOPDIRECTORY, - "Common Desktop", - KF_CATEGORY_COMMON, - FOLDERID_Public, - "Desktop", - NULL, - FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_HIDDEN, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_PublicDocuments, - CSIDL_COMMON_DOCUMENTS, - "Common Documents", - KF_CATEGORY_COMMON, - FOLDERID_Public, - "Documents", - NULL, - FILE_ATTRIBUTE_READONLY, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_PublicDownloads, - NO_CSIDL, - "CommonDownloads", - KF_CATEGORY_COMMON, - FOLDERID_Public, - "Downloads", - NULL, - FILE_ATTRIBUTE_READONLY, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_PublicGameTasks, - NO_CSIDL, - "PublicGameTasks", - KF_CATEGORY_COMMON, - FOLDERID_ProgramData, - "Microsoft\\Windows\\GameExplorer", - NULL, - 0, - KFDF_LOCAL_REDIRECT_ONLY), - KNOWN_FOLDER(FOLDERID_PublicLibraries, - NO_CSIDL, - "PublicLibraries", - KF_CATEGORY_COMMON, - FOLDERID_Public, - "Libraries", - NULL, - FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_HIDDEN, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_PublicMusic, - CSIDL_COMMON_MUSIC, - "CommonMusic", - KF_CATEGORY_COMMON, - FOLDERID_Public, - "Music", - NULL, - FILE_ATTRIBUTE_READONLY, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_PublicPictures, - CSIDL_COMMON_PICTURES, - "CommonPictures", - KF_CATEGORY_COMMON, - FOLDERID_Public, - "Pictures", - NULL, - FILE_ATTRIBUTE_READONLY, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_PublicRingtones, - NO_CSIDL, - "CommonRingtones", - KF_CATEGORY_COMMON, - FOLDERID_ProgramData, - "Microsoft\\Windows\\Ringtones", - NULL, - 0, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_PublicVideos, - CSIDL_COMMON_VIDEO, - "CommonVideo", - KF_CATEGORY_COMMON, - FOLDERID_Public, - "Videos", - NULL, - FILE_ATTRIBUTE_READONLY, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_QuickLaunch, - NO_CSIDL, - "Quick Launch", - KF_CATEGORY_PERUSER, - FOLDERID_RoamingAppData, - "Microsoft\\Internet Explorer\\Quick Launch", - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_Recent, - CSIDL_RECENT, - "Recent", - KF_CATEGORY_PERUSER, - FOLDERID_RoamingAppData, - "Microsoft\\Windows\\Recent", - NULL, - FILE_ATTRIBUTE_READONLY, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_RecordedTVLibrary, - NO_CSIDL, - "RecordedTVLibrary", - KF_CATEGORY_COMMON, - FOLDERID_PublicLibraries, - "RecordedTV.library-ms", - NULL, - 0, - KFDF_PRECREATE | KFDF_STREAM), - KNOWN_FOLDER(FOLDERID_RecycleBinFolder, - CSIDL_BITBUCKET, - "RecycleBinFolder", - KF_CATEGORY_VIRTUAL, - GUID_NULL, - NULL, - "::{645FF040-5081-101B-9F08-00AA002F954E}\0\0", - 0, - 0), - KNOWN_FOLDER(FOLDERID_ResourceDir, - CSIDL_RESOURCES, - "ResourceDir", - KF_CATEGORY_FIXED, - GUID_NULL, - NULL, - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_Ringtones, - NO_CSIDL, - "Ringtones", - KF_CATEGORY_PERUSER, - FOLDERID_LocalAppData, - "Microsoft\\Windows\\Ringtones", - NULL, - 0, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_RoamingAppData, - CSIDL_APPDATA, - "AppData", - KF_CATEGORY_PERUSER, - FOLDERID_Profile, - "AppData\\Roaming", - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_SampleMusic, - NO_CSIDL, - "SampleMusic", - KF_CATEGORY_COMMON, - FOLDERID_PublicMusic, - "Sample Music", - NULL, - FILE_ATTRIBUTE_READONLY, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_SamplePictures, - NO_CSIDL, - "SamplePictures", - KF_CATEGORY_COMMON, - FOLDERID_PublicPictures, - "Sample Pictures", - NULL, - FILE_ATTRIBUTE_READONLY, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_SamplePlaylists, - NO_CSIDL, - "SamplePlaylists", - KF_CATEGORY_COMMON, - FOLDERID_PublicMusic, - "Sample Playlists", - NULL, - FILE_ATTRIBUTE_READONLY, - 0), - KNOWN_FOLDER(FOLDERID_SampleVideos, - NO_CSIDL, - "SampleVideos", - KF_CATEGORY_COMMON, - FOLDERID_PublicVideos, - "Sample Videos", - NULL, - FILE_ATTRIBUTE_READONLY, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_SavedGames, - NO_CSIDL, - "SavedGames", - KF_CATEGORY_PERUSER, - FOLDERID_Profile, - "Saved Games", - "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{4C5C32FF-BB9D-43b0-B5B4-2D72E54EAAA4}\0\0", - FILE_ATTRIBUTE_READONLY, - KFDF_ROAMABLE | KFDF_PRECREATE | KFDF_PUBLISHEXPANDEDPATH), - KNOWN_FOLDER(FOLDERID_SavedSearches, - NO_CSIDL, - "Searches", - KF_CATEGORY_PERUSER, - FOLDERID_Profile, - "Searches", - "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{7d1d3a04-debb-4115-95cf-2f29da2920da}\0\0", - FILE_ATTRIBUTE_READONLY, - KFDF_PRECREATE | KFDF_PUBLISHEXPANDEDPATH), - KNOWN_FOLDER(FOLDERID_SEARCH_CSC, - NO_CSIDL, - "CSCFolder", - KF_CATEGORY_VIRTUAL, - GUID_NULL, - NULL, - "shell:::{BD7A2E7B-21CB-41b2-A086-B309680C6B7E}\\*\0\0", - 0, - 0), - KNOWN_FOLDER(FOLDERID_SearchHome, - NO_CSIDL, - "SearchHomeFolder", - KF_CATEGORY_VIRTUAL, - GUID_NULL, - NULL, - "::{9343812e-1c37-4a49-a12e-4b2d810d956b}\0\0", - 0, - 0), - KNOWN_FOLDER(FOLDERID_SEARCH_MAPI, - NO_CSIDL, - "MAPIFolder", - KF_CATEGORY_VIRTUAL, - GUID_NULL, - NULL, - "shell:::{89D83576-6BD1-4C86-9454-BEB04E94C819}\\*\0\0", - 0, - 0), - KNOWN_FOLDER(FOLDERID_SendTo, - CSIDL_SENDTO, - "SendTo", - KF_CATEGORY_PERUSER, - FOLDERID_RoamingAppData, - "Microsoft\\Windows\\SendTo", - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_SidebarDefaultParts, - NO_CSIDL, - "Default Gadgets", - KF_CATEGORY_COMMON, - FOLDERID_ProgramFiles, - "Windows Sidebar\\Gadgets", - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_SidebarParts, - NO_CSIDL, - "Gadgets", - KF_CATEGORY_PERUSER, - FOLDERID_LocalAppData, - "Microsoft\\Windows Sidebar\\Gadgets", - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_StartMenu, - CSIDL_STARTMENU, - "Start Menu", - KF_CATEGORY_PERUSER, - FOLDERID_RoamingAppData, - "Microsoft\\Windows\\Start Menu", - NULL, - FILE_ATTRIBUTE_READONLY, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_Startup, - CSIDL_STARTUP, - "Startup", - KF_CATEGORY_PERUSER, - FOLDERID_Programs, - "StartUp", - NULL, - FILE_ATTRIBUTE_READONLY, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_SyncManagerFolder, - NO_CSIDL, - "SyncCenterFolder", - KF_CATEGORY_VIRTUAL, - GUID_NULL, - NULL, - "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\0" - "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\0\0" /* 6.1 */, - 0, - 0), - KNOWN_FOLDER(FOLDERID_SyncResultsFolder, - NO_CSIDL, - "SyncResultsFolder", - KF_CATEGORY_VIRTUAL, - GUID_NULL, - NULL, - "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{BC48B32F-5910-47F5-8570-5074A8A5636A},\0" - "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{BC48B32F-5910-47F5-8570-5074A8A5636A},\0\0", - 0, - 0), - KNOWN_FOLDER(FOLDERID_SyncSetupFolder, - NO_CSIDL, - "SyncSetupFolder", - KF_CATEGORY_VIRTUAL, - GUID_NULL, - NULL, - "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{F1390A9A-A3F4-4E5D-9C5F-98F3BD8D935C},\0" - "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{F1390A9A-A3F4-4E5D-9C5F-98F3BD8D935C},\0\0" /* 6.1 */, - 0, - 0), - KNOWN_FOLDER(FOLDERID_System, - CSIDL_SYSTEM, - "System", - KF_CATEGORY_FIXED, - GUID_NULL, - NULL, - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_SystemX86, - CSIDL_SYSTEMX86, - "SystemX86", - KF_CATEGORY_FIXED, - GUID_NULL, - NULL, - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_Templates, - CSIDL_TEMPLATES, - "Templates", - KF_CATEGORY_PERUSER, - FOLDERID_RoamingAppData, - "Microsoft\\Windows\\Templates", - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_UserPinned, - NO_CSIDL, - "User Pinned", - KF_CATEGORY_PERUSER, - FOLDERID_QuickLaunch, - "User Pinned", - NULL, - FILE_ATTRIBUTE_HIDDEN, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_UserProfiles, - NO_CSIDL, - "UserProfiles", - KF_CATEGORY_FIXED, - GUID_NULL, - NULL, - NULL, - FILE_ATTRIBUTE_READONLY, - KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_UserProgramFiles, - NO_CSIDL, - "UserProgramFiles", - KF_CATEGORY_PERUSER, - FOLDERID_LocalAppData, - "Programs", - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_UserProgramFilesCommon, - NO_CSIDL, - "UserProgramFilesCommon", - KF_CATEGORY_PERUSER, - FOLDERID_UserProgramFiles, - "Common", - NULL, - 0, - 0), - KNOWN_FOLDER(FOLDERID_UsersFiles, - NO_CSIDL, - "UsersFilesFolder", - KF_CATEGORY_VIRTUAL, - GUID_NULL, - NULL, - "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\0\0", - 0, - 0), - KNOWN_FOLDER(FOLDERID_UsersLibraries, - NO_CSIDL, - "UsersLibrariesFolder", - KF_CATEGORY_VIRTUAL, - GUID_NULL, - NULL, - "::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\0\0", - 0, - 0), - KNOWN_FOLDER(FOLDERID_Videos, - CSIDL_MYVIDEO, - "My Video", - KF_CATEGORY_PERUSER, - FOLDERID_Profile, - "Videos", - "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{18989B1D-99B5-455B-841C-AB7C74E4DDFC}\0\0", - FILE_ATTRIBUTE_READONLY, - KFDF_ROAMABLE | KFDF_PRECREATE), - KNOWN_FOLDER(FOLDERID_VideosLibrary, - NO_CSIDL, - "VideosLibrary", - KF_CATEGORY_PERUSER, - FOLDERID_Libraries, - "Videos.library-ms", - "::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\\{491E922F-5643-4af4-A7EB-4E7A138D8174}\0\0", - 0, - KFDF_PRECREATE | KFDF_STREAM), - KNOWN_FOLDER(FOLDERID_Windows, - CSIDL_WINDOWS, - "Windows", - KF_CATEGORY_FIXED, - GUID_NULL, - NULL, - NULL, - 0, - 0), - KNOWN_FOLDER(_FOLDERID_CredentialManager, - NO_CSIDL, - "CredentialManager", - KF_CATEGORY_FIXED, - GUID_NULL, - NULL, - NULL, - 0, - 0), - KNOWN_FOLDER(_FOLDERID_CryptoKeys, - NO_CSIDL, - "CryptoKeys", - KF_CATEGORY_FIXED, - GUID_NULL, - NULL, - NULL, - 0, - 0), - KNOWN_FOLDER(_FOLDERID_DpapiKeys, - NO_CSIDL, - "DpapiKeys", - KF_CATEGORY_FIXED, - GUID_NULL, - NULL, - NULL, - 0, - 0), - KNOWN_FOLDER(_FOLDERID_SystemCertificates, - NO_CSIDL, - "SystemCertificates", - KF_CATEGORY_FIXED, - GUID_NULL, - NULL, - NULL, - 0, - 0), - { NULL, NULL, 0, NULL, NULL, 0, 0 } -}; -#undef KNOWN_FOLDER -BOOL known_folder_found[sizeof(known_folders)/sizeof(known_folders[0])-1]; - -static void check_known_folder(IKnownFolderManager *mgr, KNOWNFOLDERID *folderId) -{ - HRESULT hr; - const struct knownFolderDef *known_folder = &known_folders[0]; - int csidl, expectedCsidl, ret; - KNOWNFOLDER_DEFINITION kfd; - IKnownFolder *folder; - WCHAR sName[1024], sRelativePath[MAX_PATH], sParsingName[MAX_PATH]; - BOOL validPath; - char sParentGuid[39]; - BOOL *current_known_folder_found = &known_folder_found[0]; - BOOL found = FALSE; - const char *srcParsingName; - - while(known_folder->folderId != NULL) - { - if(IsEqualGUID(known_folder->folderId, folderId)) - { - *current_known_folder_found = TRUE; - found = TRUE; - /* verify CSIDL */ - if(known_folder->csidl != NO_CSIDL) - { - expectedCsidl = known_folder->csidl & (~CSIDL_TODO_WINE); - - hr = IKnownFolderManager_FolderIdToCsidl(mgr, folderId, &csidl); - ok_(__FILE__, known_folder->line)(hr == S_OK, "cannot retrieve CSIDL for folder %s\n", known_folder->sFolderId); - - if(known_folder->csidl & CSIDL_TODO_WINE) - todo_wine ok_(__FILE__, known_folder->line)(csidl == expectedCsidl, "invalid CSIDL retrieved for folder %s. %d (%s) expected, but %d found\n", known_folder->sFolderId, expectedCsidl, known_folder->sCsidl, csidl); - else - ok_(__FILE__, known_folder->line)(csidl == expectedCsidl, "invalid CSIDL retrieved for folder %s. %d (%s) expected, but %d found\n", known_folder->sFolderId, expectedCsidl, known_folder->sCsidl, csidl); - } - - hr = IKnownFolderManager_GetFolder(mgr, folderId, &folder); - ok_(__FILE__, known_folder->line)(hr == S_OK, "cannot get known folder for %s\n", known_folder->sFolderId); - if(SUCCEEDED(hr)) - { - hr = IKnownFolder_GetFolderDefinition(folder, &kfd); - todo_wine - ok_(__FILE__, known_folder->line)(hr == S_OK, "cannot get known folder definition for %s\n", known_folder->sFolderId); - if(SUCCEEDED(hr)) - { - ret = MultiByteToWideChar(CP_ACP, 0, known_folder->sName, -1, sName, sizeof(sName)/sizeof(sName[0])); - ok_(__FILE__, known_folder->line)(ret != 0, "cannot convert known folder name \"%s\" to wide characters\n", known_folder->sName); - - todo_wine - ok_(__FILE__, known_folder->line)(lstrcmpW(kfd.pszName, sName)==0, "invalid known folder name returned for %s: %s expected, but %s retrieved\n", known_folder->sFolderId, wine_dbgstr_w(sName), wine_dbgstr_w(kfd.pszName)); - - ok_(__FILE__, known_folder->line)(kfd.category == known_folder->category, "invalid known folder category for %s: %d expected, but %d retrieved\n", known_folder->sFolderId, known_folder->category, kfd.category); - - printGUID(&kfd.fidParent, sParentGuid); - ok_(__FILE__, known_folder->line)(IsEqualGUID(known_folder->fidParent, &kfd.fidParent), "invalid known folder parent for %s: %s expected, but %s retrieved\n", known_folder->sFolderId, known_folder->sParent, sParentGuid); - - if(!known_folder->sRelativePath) - validPath = (kfd.pszRelativePath==NULL); - else - { - ret = MultiByteToWideChar(CP_ACP, 0, known_folder->sRelativePath, -1, sRelativePath, sizeof(sRelativePath)/sizeof(sRelativePath[0])); - ok_(__FILE__, known_folder->line)(ret != 0, "cannot convert known folder path \"%s\" to wide characters\n", known_folder->sRelativePath); - - validPath = (lstrcmpW(kfd.pszRelativePath, sRelativePath)==0); - } - - ok_(__FILE__, known_folder->line)(validPath, "invalid known folder relative path returned for %s: %s expected, but %s retrieved\n", known_folder->sFolderId, known_folder->sRelativePath, wine_dbgstr_w(kfd.pszRelativePath)); - - /* to check parsing name, we need to iterate list */ - srcParsingName = known_folder->sParsingName; - - /* if we expect NULL, then we don't even check the list */ - validPath = (srcParsingName==NULL) && (kfd.pszParsingName==NULL); - - if(srcParsingName) - while(*srcParsingName && !validPath) - { - /* when NULL is only one of possible value, we mark path as valid */ - validPath = (strcmp(srcParsingName, "(null)")==0) && (kfd.pszParsingName==NULL); - - /* in the other case, we compare string from list with retrieved value */ - if(!validPath) - { - ret = MultiByteToWideChar(CP_ACP, 0, srcParsingName, -1, sParsingName, sizeof(sParsingName)/sizeof(sParsingName[0])); - ok_(__FILE__, known_folder->line)(ret != 0, "cannot convert known folder path \"%s\" to wide characters\n", srcParsingName); - - validPath = (lstrcmpW(kfd.pszParsingName, sParsingName)==0); - } - - srcParsingName += strlen(srcParsingName)+1; - } - - ok_(__FILE__, known_folder->line)(validPath, "invalid known folder parsing name returned for %s: %s retrieved\n", known_folder->sFolderId, wine_dbgstr_w(kfd.pszParsingName)); - - ok_(__FILE__, known_folder->line)(known_folder->attributes == kfd.dwAttributes, "invalid known folder attributes for %s: 0x%08x expected, but 0x%08x retrieved\n", known_folder->sFolderId, known_folder->attributes, kfd.dwAttributes); - - ok_(__FILE__, known_folder->line)(!(kfd.kfdFlags & (~known_folder->definitionFlags)), "invalid known folder flags for %s: 0x%08x expected, but 0x%08x retrieved\n", known_folder->sFolderId, known_folder->definitionFlags, kfd.kfdFlags); - - FreeKnownFolderDefinitionFields(&kfd); - } - - IKnownFolder_Release(folder); - } - - break; - } - known_folder++; - current_known_folder_found++; - } - - if(!found) - { - printGUID(folderId, sParentGuid); - trace("unknown known folder found: %s\n", sParentGuid); - - hr = IKnownFolderManager_GetFolder(mgr, folderId, &folder); - ok(hr == S_OK, "cannot get known folder for %s\n", sParentGuid); - if(SUCCEEDED(hr)) - { - hr = IKnownFolder_GetFolderDefinition(folder, &kfd); - todo_wine - ok(hr == S_OK, "cannot get known folder definition for %s\n", sParentGuid); - if(SUCCEEDED(hr)) - { - trace(" category: %d\n", kfd.category); - trace(" name: %s\n", wine_dbgstr_w(kfd.pszName)); - trace(" description: %s\n", wine_dbgstr_w(kfd.pszDescription)); - printGUID(&kfd.fidParent, sParentGuid); - trace(" parent: %s\n", sParentGuid); - trace(" relative path: %s\n", wine_dbgstr_w(kfd.pszRelativePath)); - trace(" parsing name: %s\n", wine_dbgstr_w(kfd.pszParsingName)); - trace(" tooltip: %s\n", wine_dbgstr_w(kfd.pszTooltip)); - trace(" localized name: %s\n", wine_dbgstr_w(kfd.pszLocalizedName)); - trace(" icon: %s\n", wine_dbgstr_w(kfd.pszIcon)); - trace(" security: %s\n", wine_dbgstr_w(kfd.pszSecurity)); - trace(" attributes: 0x%08x\n", kfd.dwAttributes); - trace(" flags: 0x%08x\n", kfd.kfdFlags); - printGUID(&kfd.ftidType, sParentGuid); - trace(" type: %s\n", sParentGuid); - FreeKnownFolderDefinitionFields(&kfd); - } - - IKnownFolder_Release(folder); - } - } -} -#undef NO_CSIDL -#undef CSIDL_TODO_WINE - -static void test_knownFolders(void) -{ - static const WCHAR sWindows[] = {'W','i','n','d','o','w','s',0}; - static const WCHAR sExample[] = {'E','x','a','m','p','l','e',0}; - static const WCHAR sExample2[] = {'E','x','a','m','p','l','e','2',0}; - static const WCHAR sSubFolder[] = {'S','u','b','F','o','l','d','e','r',0}; - static const WCHAR sBackslash[] = {'\\',0}; - static const KNOWNFOLDERID newFolderId = {0x01234567, 0x89AB, 0xCDEF, {0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x01} }; - static const KNOWNFOLDERID subFolderId = {0xFEDCBA98, 0x7654, 0x3210, {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF} }; - HRESULT hr; - IKnownFolderManager *mgr = NULL; - IKnownFolder *folder = NULL, *subFolder = NULL; - KNOWNFOLDERID folderId, *folders; - KF_CATEGORY cat = 0; - KNOWNFOLDER_DEFINITION kfDefinition, kfSubDefinition; - int csidl, i; - UINT nCount = 0; - LPWSTR folderPath, errorMsg; - KF_REDIRECTION_CAPABILITIES redirectionCapabilities = 1; - WCHAR sWinDir[MAX_PATH], sExamplePath[MAX_PATH], sExample2Path[MAX_PATH], sSubFolderPath[MAX_PATH], sSubFolder2Path[MAX_PATH]; - BOOL bRes; - DWORD dwAttributes; - - GetWindowsDirectoryW( sWinDir, MAX_PATH ); - - GetTempPathW(sizeof(sExamplePath)/sizeof(sExamplePath[0]), sExamplePath); - lstrcatW(sExamplePath, sExample); - - GetTempPathW(sizeof(sExample2Path)/sizeof(sExample2Path[0]), sExample2Path); - lstrcatW(sExample2Path, sExample2); - - lstrcpyW(sSubFolderPath, sExamplePath); - lstrcatW(sSubFolderPath, sBackslash); - lstrcatW(sSubFolderPath, sSubFolder); - - lstrcpyW(sSubFolder2Path, sExample2Path); - lstrcatW(sSubFolder2Path, sBackslash); - lstrcatW(sSubFolder2Path, sSubFolder); - - CoInitialize(NULL); - - hr = CoCreateInstance(&CLSID_KnownFolderManager, NULL, CLSCTX_INPROC_SERVER, - &IID_IKnownFolderManager, (LPVOID*)&mgr); - if(hr == REGDB_E_CLASSNOTREG) - win_skip("IKnownFolderManager unavailable\n"); - else - { - ok(hr == S_OK, "failed to create KnownFolderManager instance: 0x%08x\n", hr); - - hr = IKnownFolderManager_FolderIdFromCsidl(mgr, CSIDL_WINDOWS, &folderId); - ok(hr == S_OK, "failed to convert CSIDL to KNOWNFOLDERID: 0x%08x\n", hr); - ok(IsEqualGUID(&folderId, &FOLDERID_Windows)==TRUE, "invalid KNOWNFOLDERID returned\n"); - - hr = IKnownFolderManager_FolderIdToCsidl(mgr, &FOLDERID_Windows, &csidl); - ok(hr == S_OK, "failed to convert CSIDL to KNOWNFOLDERID: 0x%08x\n", hr); - ok(csidl == CSIDL_WINDOWS, "invalid CSIDL returned\n"); - - hr = IKnownFolderManager_GetFolder(mgr, &FOLDERID_Windows, &folder); - ok(hr == S_OK, "failed to get known folder: 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - hr = IKnownFolder_GetCategory(folder, &cat); - todo_wine - ok(hr == S_OK, "failed to get folder category: 0x%08x\n", hr); - todo_wine - ok(cat==KF_CATEGORY_FIXED, "invalid folder category: %d\n", cat); - - hr = IKnownFolder_GetId(folder, &folderId); - ok(hr == S_OK, "failed to get folder id: 0x%08x\n", hr); - ok(IsEqualGUID(&folderId, &FOLDERID_Windows)==TRUE, "invalid KNOWNFOLDERID returned\n"); - - hr = IKnownFolder_GetPath(folder, 0, &folderPath); - ok(lstrcmpiW(sWinDir, folderPath)==0, "invalid path returned: \"%s\", expected: \"%s\"\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sWinDir)); - CoTaskMemFree(folderPath); - - hr = IKnownFolder_GetRedirectionCapabilities(folder, &redirectionCapabilities); - todo_wine - ok(hr == S_OK, "failed to get redirection capabilities: 0x%08x\n", hr); - todo_wine - ok(redirectionCapabilities==0, "invalid redirection capabilities returned: %d\n", redirectionCapabilities); - - hr = IKnownFolder_SetPath(folder, 0, sWinDir); - todo_wine - ok(hr == E_INVALIDARG, "unexpected value from SetPath: 0x%08x\n", hr); - - hr = IKnownFolder_GetFolderDefinition(folder, &kfDefinition); - todo_wine - ok(hr == S_OK, "failed to get folder definition: 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - todo_wine - ok(kfDefinition.category==KF_CATEGORY_FIXED, "invalid folder category: 0x%08x\n", kfDefinition.category); - todo_wine - ok(lstrcmpW(kfDefinition.pszName, sWindows)==0, "invalid folder name: %s\n", wine_dbgstr_w(kfDefinition.pszName)); - todo_wine - ok(kfDefinition.dwAttributes==0, "invalid folder attributes: %d\n", kfDefinition.dwAttributes); - FreeKnownFolderDefinitionFields(&kfDefinition); - } - - hr = IKnownFolder_Release(folder); - ok(hr == S_OK, "failed to release KnownFolder instance: 0x%08x\n", hr); - } - - hr = IKnownFolderManager_GetFolderByName(mgr, sWindows, &folder); - todo_wine - ok(hr == S_OK, "failed to get known folder: 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - hr = IKnownFolder_GetId(folder, &folderId); - ok(hr == S_OK, "failed to get folder id: 0x%08x\n", hr); - ok(IsEqualGUID(&folderId, &FOLDERID_Windows)==TRUE, "invalid KNOWNFOLDERID returned\n"); - - hr = IKnownFolder_Release(folder); - ok(hr == S_OK, "failed to release KnownFolder instance: 0x%08x\n", hr); - } - - for(i=0; i= 3) - doChild(myARGV[2]); - else - { - /* Report missing functions once */ - if (!pSHGetFolderLocation) - win_skip("SHGetFolderLocation is not available\n"); - - /* first test various combinations of parameters: */ - test_parameters(); - - /* check known values: */ - test_PidlTypes(); - test_GUIDs(); - test_EnvVars(); - testWinDir(); - testSystemDir(); - test_NonExistentPath(); - test_SHGetFolderPathEx(); - test_knownFolders(); - } -} diff --git a/rostests/winetests/shell32/shfldr_special.c b/rostests/winetests/shell32/shfldr_special.c deleted file mode 100644 index cfb31bec7e8..00000000000 --- a/rostests/winetests/shell32/shfldr_special.c +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Tests for special shell folders - * - * Copyright 2008 Robert Shearman for CodeWeavers - * Copyright 2008 Owen Rudge - * - * 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 - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#define WIN32_LEAN_AND_MEAN -#include -#include "shellapi.h" -#include "shlobj.h" - -#include "wine/test.h" - -static inline BOOL SHELL_OsIsUnicode(void) -{ - return !(GetVersion() & 0x80000000); -} - -/* Tests for My Network Places */ -static void test_parse_for_entire_network(void) -{ - static WCHAR my_network_places_path[] = { - ':',':','{','2','0','8','D','2','C','6','0','-','3','A','E','A','-', - '1','0','6','9','-','A','2','D','7','-','0','8','0','0','2','B','3','0','3','0','9','D','}', 0 }; - static WCHAR entire_network_path[] = { - ':',':','{','2','0','8','D','2','C','6','0','-','3','A','E','A','-', - '1','0','6','9','-','A','2','D','7','-','0','8','0','0','2','B','3','0','3','0','9','D', - '}','\\','E','n','t','i','r','e','N','e','t','w','o','r','k',0 }; - IShellFolder *psfDesktop; - HRESULT hr; - DWORD eaten = 0xdeadbeef; - LPITEMIDLIST pidl; - DWORD attr = ~0; - DWORD expected_attr; - - hr = SHGetDesktopFolder(&psfDesktop); - ok(hr == S_OK, "SHGetDesktopFolder failed with error 0x%x\n", hr); - - hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, my_network_places_path, &eaten, &pidl, &attr); - ok(hr == S_OK, "IShellFolder_ParseDisplayName failed with error 0x%x\n", hr); - todo_wine - ok(eaten == 0xdeadbeef, "eaten should not have been set to %u\n", eaten); - expected_attr = SFGAO_HASSUBFOLDER|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR|SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANRENAME|SFGAO_CANLINK; - todo_wine - ok((attr == expected_attr) || /* Win9x, NT4 */ - (attr == (expected_attr | SFGAO_STREAM)) || /* W2K */ - (attr == (expected_attr | SFGAO_CANDELETE)) || /* XP, W2K3 */ - (attr == (expected_attr | SFGAO_CANDELETE | SFGAO_NONENUMERATED)), /* Vista */ - "Unexpected attributes : %08x\n", attr); - - ILFree(pidl); - - /* Start clean again */ - eaten = 0xdeadbeef; - attr = ~0; - - hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, entire_network_path, &eaten, &pidl, &attr); - if (hr == HRESULT_FROM_WIN32(ERROR_BAD_NET_NAME) || - hr == HRESULT_FROM_WIN32(ERROR_NO_NET_OR_BAD_PATH) || - hr == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER)) - { - win_skip("'EntireNetwork' is not available on Win9x, NT4 and Vista\n"); - return; - } - ok(hr == S_OK, "IShellFolder_ParseDisplayName failed with error 0x%x\n", hr); - todo_wine - ok(eaten == 0xdeadbeef, "eaten should not have been set to %u\n", eaten); - expected_attr = SFGAO_HASSUBFOLDER|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR|SFGAO_HASPROPSHEET|SFGAO_CANLINK; - todo_wine - ok(attr == expected_attr || /* winme, nt4 */ - attr == (expected_attr | SFGAO_STREAM) || /* win2k */ - attr == (expected_attr | SFGAO_STORAGEANCESTOR), /* others */ - "attr should be 0x%x, not 0x%x\n", expected_attr, attr); - - ILFree(pidl); -} - -/* Tests for Control Panel */ -static void test_parse_for_control_panel(void) -{ - /* path of My Computer\Control Panel */ - static WCHAR control_panel_path[] = { - ':',':','{','2','0','D','0','4','F','E','0','-','3','A','E','A','-','1','0','6','9','-','A','2','D','8','-','0','8','0','0','2','B','3','0','3','0','9','D','}','\\', - ':',':','{','2','1','E','C','2','0','2','0','-','3','A','E','A','-','1','0','6','9','-','A','2','D','D','-','0','8','0','0','2','B','3','0','3','0','9','D','}', 0 }; - IShellFolder *psfDesktop; - HRESULT hr; - DWORD eaten = 0xdeadbeef; - LPITEMIDLIST pidl; - DWORD attr = ~0; - - hr = SHGetDesktopFolder(&psfDesktop); - ok(hr == S_OK, "SHGetDesktopFolder failed with error 0x%x\n", hr); - - hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, control_panel_path, &eaten, &pidl, &attr); - ok(hr == S_OK, "IShellFolder_ParseDisplayName failed with error 0x%x\n", hr); - todo_wine ok(eaten == 0xdeadbeef, "eaten should not have been set to %u\n", eaten); - todo_wine - ok((attr == (SFGAO_CANLINK | SFGAO_FOLDER)) || /* Win9x, NT4 */ - (attr == (SFGAO_CANLINK | SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_STREAM)) || /* W2K */ - (attr == (SFGAO_CANLINK | SFGAO_FOLDER | SFGAO_HASSUBFOLDER)) || /* W2K, XP, W2K3 */ - (attr == (SFGAO_CANLINK | SFGAO_NONENUMERATED)) || /* Vista */ - (attr == SFGAO_CANLINK), /* Vista, W2K8 */ - "Unexpected attributes : %08x\n", attr); - - ILFree(pidl); -} - -static void test_printers_folder(void) -{ - IShellFolder2 *folder; - IPersistFolder2 *pf; - SHELLDETAILS details; - SHCOLSTATEF state; - LPITEMIDLIST pidl1, pidl2; - HRESULT hr; - INT i; - - CoInitialize( NULL ); - - hr = CoCreateInstance(&CLSID_Printers, NULL, CLSCTX_INPROC_SERVER, &IID_IShellFolder2, (void**)&folder); - if (hr != S_OK) - { - win_skip("Failed to created IShellFolder2 for Printers folder\n"); - CoUninitialize(); - return; - } - -if (0) -{ - /* crashes on XP */ - IShellFolder2_GetDetailsOf(folder, NULL, 0, NULL); - IShellFolder2_GetDefaultColumnState(folder, 0, NULL); - IPersistFolder2_GetCurFolder(pf, NULL); -} - - /* 5 columns defined */ - hr = IShellFolder2_GetDetailsOf(folder, NULL, 6, &details); - ok(hr == E_NOTIMPL, "got 0x%08x\n", hr); - - hr = IShellFolder2_GetDefaultColumnState(folder, 6, &state); - ok(broken(hr == E_NOTIMPL) || hr == E_INVALIDARG /* Win7 */, "got 0x%08x\n", hr); - - details.str.u.pOleStr = NULL; - hr = IShellFolder2_GetDetailsOf(folder, NULL, 0, &details); - ok(hr == S_OK || broken(E_NOTIMPL) /* W2K */, "got 0x%08x\n", hr); - if (SHELL_OsIsUnicode()) SHFree(details.str.u.pOleStr); - - /* test every column if method is implemented */ - if (hr == S_OK) - { - ok(details.str.uType == STRRET_WSTR, "got %d\n", details.str.uType); - - for(i = 0; i < 6; i++) - { - hr = IShellFolder2_GetDetailsOf(folder, NULL, i, &details); - ok(hr == S_OK, "got 0x%08x\n", hr); - - /* all columns are left-aligned */ - ok(details.fmt == LVCFMT_LEFT, "got 0x%x\n", details.fmt); - /* can't be on w9x at this point, IShellFolder2 unsupported there, - check present for running Wine with w9x setup */ - if (SHELL_OsIsUnicode()) SHFree(details.str.u.pOleStr); - - hr = IShellFolder2_GetDefaultColumnState(folder, i, &state); - ok(hr == S_OK, "got 0x%08x\n", hr); - /* all columns are string except document count */ - if (i == 1) - ok(state == (SHCOLSTATE_TYPE_INT | SHCOLSTATE_ONBYDEFAULT), "got 0x%x\n", state); - else - ok(state == (SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT), "got 0x%x\n", state); - } - } - - /* default pidl */ - hr = IShellFolder2_QueryInterface(folder, &IID_IPersistFolder2, (void**)&pf); - ok(hr == S_OK, "got 0x%08x\n", hr); - - /* not initialized */ - pidl1 = (void*)0xdeadbeef; - hr = IPersistFolder2_GetCurFolder(pf, &pidl1); - ok(hr == S_FALSE, "got 0x%08x\n", hr); - ok(pidl1 == NULL, "got %p\n", pidl1); - - hr = SHGetSpecialFolderLocation(NULL, CSIDL_PRINTERS, &pidl2); - ok(hr == S_OK, "got 0x%08x\n", hr); - - hr = IPersistFolder2_Initialize(pf, pidl2); - ok(hr == S_OK, "got 0x%08x\n", hr); - - hr = IPersistFolder2_GetCurFolder(pf, &pidl1); - ok(hr == S_OK, "got 0x%08x\n", hr); - - ok(ILIsEqual(pidl1, pidl2), "expected same PIDL\n"); - IPersistFolder2_Release(pf); - - ILFree(pidl1); - ILFree(pidl2); - IShellFolder2_Release(folder); - - CoUninitialize(); -} - -START_TEST(shfldr_special) -{ - test_parse_for_entire_network(); - test_parse_for_control_panel(); - test_printers_folder(); -} diff --git a/rostests/winetests/shell32/shlexec.c b/rostests/winetests/shell32/shlexec.c deleted file mode 100755 index 9c0bc582861..00000000000 --- a/rostests/winetests/shell32/shlexec.c +++ /dev/null @@ -1,2270 +0,0 @@ -/* - * Unit test of the ShellExecute function. - * - * Copyright 2005 Francois Gouget 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 - */ - -/* TODO: - * - test the default verb selection - * - test selection of an alternate class - * - try running executables in more ways - * - try passing arguments to executables - * - ShellExecute("foo.shlexec") with no path should work if foo.shlexec is - * in the PATH - * - test associations that use %l, %L or "%1" instead of %1 - * - we may want to test ShellExecuteEx() instead of ShellExecute() - * and then we could also check its return value - * - ShellExecuteEx() also calls SetLastError() with meaningful values which - * we could check - */ - -/* Needed to get SEE_MASK_NOZONECHECKS with the PSDK */ -#define NTDDI_WINXPSP1 0x05010100 -#define NTDDI_VERSION NTDDI_WINXPSP1 -#define _WIN32_WINNT 0x0501 - -#include -#include - -#include "wtypes.h" -#include "winbase.h" -#include "windef.h" -#include "shellapi.h" -#include "shlwapi.h" -#include "wine/test.h" - -#include "shell32_test.h" - - -static char argv0[MAX_PATH]; -static int myARGC; -static char** myARGV; -static char tmpdir[MAX_PATH]; -static char child_file[MAX_PATH]; -static DLLVERSIONINFO dllver; -static BOOL skip_noassoc_tests = FALSE; -static HANDLE dde_ready_event; - - -/*** - * - * ShellExecute wrappers - * - ***/ -static void dump_child(void); - -static HANDLE hEvent; -static void init_event(const char* child_file) -{ - char* event_name; - event_name=strrchr(child_file, '\\')+1; - hEvent=CreateEvent(NULL, FALSE, FALSE, event_name); -} - -static void strcat_param(char* str, const char* param) -{ - if (param!=NULL) - { - strcat(str, "\""); - strcat(str, param); - strcat(str, "\""); - } - else - { - strcat(str, "null"); - } -} - -static char shell_call[2048]=""; -static int shell_execute(LPCSTR operation, LPCSTR file, LPCSTR parameters, LPCSTR directory) -{ - INT_PTR rc; - - strcpy(shell_call, "ShellExecute("); - strcat_param(shell_call, operation); - strcat(shell_call, ", "); - strcat_param(shell_call, file); - strcat(shell_call, ", "); - strcat_param(shell_call, parameters); - strcat(shell_call, ", "); - strcat_param(shell_call, directory); - strcat(shell_call, ")"); - if (winetest_debug > 1) - trace("%s\n", shell_call); - - DeleteFile(child_file); - SetLastError(0xcafebabe); - - /* FIXME: We cannot use ShellExecuteEx() here because if there is no - * association it displays the 'Open With' dialog and I could not find - * a flag to prevent this. - */ - rc=(INT_PTR)ShellExecute(NULL, operation, file, parameters, directory, SW_SHOWNORMAL); - - if (rc > 32) - { - int wait_rc; - wait_rc=WaitForSingleObject(hEvent, 5000); - if (wait_rc == WAIT_TIMEOUT) - { - HWND wnd = FindWindowA("#32770", "Windows"); - if (wnd != NULL) - { - SendMessage(wnd, WM_CLOSE, 0, 0); - win_skip("Skipping shellexecute of file with unassociated extension\n"); - skip_noassoc_tests = TRUE; - rc = SE_ERR_NOASSOC; - } - } - ok(wait_rc==WAIT_OBJECT_0 || rc <= 32, "WaitForSingleObject returned %d\n", wait_rc); - } - /* The child process may have changed the result file, so let profile - * functions know about it - */ - WritePrivateProfileStringA(NULL, NULL, NULL, child_file); - if (rc > 32) - dump_child(); - - return rc; -} - -static int shell_execute_ex(DWORD mask, LPCSTR operation, LPCSTR file, - LPCSTR parameters, LPCSTR directory) -{ - SHELLEXECUTEINFO sei; - BOOL success; - INT_PTR rc; - - strcpy(shell_call, "ShellExecuteEx("); - strcat_param(shell_call, operation); - strcat(shell_call, ", "); - strcat_param(shell_call, file); - strcat(shell_call, ", "); - strcat_param(shell_call, parameters); - strcat(shell_call, ", "); - strcat_param(shell_call, directory); - strcat(shell_call, ")"); - if (winetest_debug > 1) - trace("%s\n", shell_call); - - sei.cbSize=sizeof(sei); - sei.fMask=SEE_MASK_NOCLOSEPROCESS | mask; - sei.hwnd=NULL; - sei.lpVerb=operation; - sei.lpFile=file; - sei.lpParameters=parameters; - sei.lpDirectory=directory; - sei.nShow=SW_SHOWNORMAL; - sei.hInstApp=NULL; /* Out */ - sei.lpIDList=NULL; - sei.lpClass=NULL; - sei.hkeyClass=NULL; - sei.dwHotKey=0; - U(sei).hIcon=NULL; - sei.hProcess=NULL; /* Out */ - - DeleteFile(child_file); - SetLastError(0xcafebabe); - success=ShellExecuteEx(&sei); - rc=(INT_PTR)sei.hInstApp; - ok((success && rc > 32) || (!success && rc <= 32), - "%s rc=%d and hInstApp=%ld is not allowed\n", shell_call, success, rc); - - if (rc > 32) - { - int wait_rc; - if (sei.hProcess!=NULL) - { - wait_rc=WaitForSingleObject(sei.hProcess, 5000); - ok(wait_rc==WAIT_OBJECT_0, "WaitForSingleObject(hProcess) returned %d\n", wait_rc); - } - wait_rc=WaitForSingleObject(hEvent, 5000); - ok(wait_rc==WAIT_OBJECT_0, "WaitForSingleObject returned %d\n", wait_rc); - } - /* The child process may have changed the result file, so let profile - * functions know about it - */ - WritePrivateProfileStringA(NULL, NULL, NULL, child_file); - if (rc > 32) - dump_child(); - - return rc; -} - - - -/*** - * - * Functions to create / delete associations wrappers - * - ***/ - -static BOOL create_test_association(const char* extension) -{ - HKEY hkey, hkey_shell; - char class[MAX_PATH]; - LONG rc; - - sprintf(class, "shlexec%s", extension); - rc=RegCreateKeyEx(HKEY_CLASSES_ROOT, extension, 0, NULL, 0, KEY_SET_VALUE, - NULL, &hkey, NULL); - if (rc != ERROR_SUCCESS) - return FALSE; - - rc=RegSetValueEx(hkey, NULL, 0, REG_SZ, (LPBYTE) class, strlen(class)+1); - ok(rc==ERROR_SUCCESS, "RegSetValueEx '%s' failed, expected ERROR_SUCCESS, got %d\n", class, rc); - CloseHandle(hkey); - - rc=RegCreateKeyEx(HKEY_CLASSES_ROOT, class, 0, NULL, 0, - KEY_CREATE_SUB_KEY | KEY_ENUMERATE_SUB_KEYS, NULL, &hkey, NULL); - ok(rc==ERROR_SUCCESS, "RegCreateKeyEx '%s' failed, expected ERROR_SUCCESS, got %d\n", class, rc); - - rc=RegCreateKeyEx(hkey, "shell", 0, NULL, 0, - KEY_CREATE_SUB_KEY, NULL, &hkey_shell, NULL); - ok(rc==ERROR_SUCCESS, "RegCreateKeyEx 'shell' failed, expected ERROR_SUCCESS, got %d\n", rc); - - CloseHandle(hkey); - CloseHandle(hkey_shell); - - return TRUE; -} - -/* Based on RegDeleteTreeW from dlls/advapi32/registry.c */ -static LSTATUS myRegDeleteTreeA(HKEY hKey, LPCSTR lpszSubKey) -{ - LONG ret; - DWORD dwMaxSubkeyLen, dwMaxValueLen; - DWORD dwMaxLen, dwSize; - CHAR szNameBuf[MAX_PATH], *lpszName = szNameBuf; - HKEY hSubKey = hKey; - - if(lpszSubKey) - { - ret = RegOpenKeyExA(hKey, lpszSubKey, 0, KEY_READ, &hSubKey); - if (ret) return ret; - } - - /* Get highest length for keys, values */ - ret = RegQueryInfoKeyA(hSubKey, NULL, NULL, NULL, NULL, - &dwMaxSubkeyLen, NULL, NULL, &dwMaxValueLen, NULL, NULL, NULL); - if (ret) goto cleanup; - - dwMaxSubkeyLen++; - dwMaxValueLen++; - dwMaxLen = max(dwMaxSubkeyLen, dwMaxValueLen); - if (dwMaxLen > sizeof(szNameBuf)/sizeof(CHAR)) - { - /* Name too big: alloc a buffer for it */ - if (!(lpszName = HeapAlloc( GetProcessHeap(), 0, dwMaxLen*sizeof(CHAR)))) - { - ret = ERROR_NOT_ENOUGH_MEMORY; - goto cleanup; - } - } - - - /* Recursively delete all the subkeys */ - while (TRUE) - { - dwSize = dwMaxLen; - if (RegEnumKeyExA(hSubKey, 0, lpszName, &dwSize, NULL, - NULL, NULL, NULL)) break; - - ret = myRegDeleteTreeA(hSubKey, lpszName); - if (ret) goto cleanup; - } - - if (lpszSubKey) - ret = RegDeleteKeyA(hKey, lpszSubKey); - else - while (TRUE) - { - dwSize = dwMaxLen; - if (RegEnumValueA(hKey, 0, lpszName, &dwSize, - NULL, NULL, NULL, NULL)) break; - - ret = RegDeleteValueA(hKey, lpszName); - if (ret) goto cleanup; - } - -cleanup: - /* Free buffer if allocated */ - if (lpszName != szNameBuf) - HeapFree( GetProcessHeap(), 0, lpszName); - if(lpszSubKey) - RegCloseKey(hSubKey); - return ret; -} - -static void delete_test_association(const char* extension) -{ - char class[MAX_PATH]; - - sprintf(class, "shlexec%s", extension); - myRegDeleteTreeA(HKEY_CLASSES_ROOT, class); - myRegDeleteTreeA(HKEY_CLASSES_ROOT, extension); -} - -static void create_test_verb_dde(const char* extension, const char* verb, - int rawcmd, const char* cmdtail, const char *ddeexec, - const char *application, const char *topic, - const char *ifexec) -{ - HKEY hkey_shell, hkey_verb, hkey_cmd; - char shell[MAX_PATH]; - char* cmd; - LONG rc; - - sprintf(shell, "shlexec%s\\shell", extension); - rc=RegOpenKeyEx(HKEY_CLASSES_ROOT, shell, 0, - KEY_CREATE_SUB_KEY, &hkey_shell); - assert(rc==ERROR_SUCCESS); - rc=RegCreateKeyEx(hkey_shell, verb, 0, NULL, 0, KEY_CREATE_SUB_KEY, - NULL, &hkey_verb, NULL); - assert(rc==ERROR_SUCCESS); - rc=RegCreateKeyEx(hkey_verb, "command", 0, NULL, 0, KEY_SET_VALUE, - NULL, &hkey_cmd, NULL); - assert(rc==ERROR_SUCCESS); - - if (rawcmd) - { - rc=RegSetValueEx(hkey_cmd, NULL, 0, REG_SZ, (LPBYTE)cmdtail, strlen(cmdtail)+1); - } - else - { - cmd=HeapAlloc(GetProcessHeap(), 0, strlen(argv0)+10+strlen(child_file)+2+strlen(cmdtail)+1); - sprintf(cmd,"%s shlexec \"%s\" %s", argv0, child_file, cmdtail); - rc=RegSetValueEx(hkey_cmd, NULL, 0, REG_SZ, (LPBYTE)cmd, strlen(cmd)+1); - assert(rc==ERROR_SUCCESS); - HeapFree(GetProcessHeap(), 0, cmd); - } - - if (ddeexec) - { - HKEY hkey_ddeexec, hkey_application, hkey_topic, hkey_ifexec; - - rc=RegCreateKeyEx(hkey_verb, "ddeexec", 0, NULL, 0, KEY_SET_VALUE | - KEY_CREATE_SUB_KEY, NULL, &hkey_ddeexec, NULL); - assert(rc==ERROR_SUCCESS); - rc=RegSetValueEx(hkey_ddeexec, NULL, 0, REG_SZ, (LPBYTE)ddeexec, - strlen(ddeexec)+1); - assert(rc==ERROR_SUCCESS); - if (application) - { - rc=RegCreateKeyEx(hkey_ddeexec, "application", 0, NULL, 0, KEY_SET_VALUE, - NULL, &hkey_application, NULL); - assert(rc==ERROR_SUCCESS); - rc=RegSetValueEx(hkey_application, NULL, 0, REG_SZ, (LPBYTE)application, - strlen(application)+1); - assert(rc==ERROR_SUCCESS); - CloseHandle(hkey_application); - } - if (topic) - { - rc=RegCreateKeyEx(hkey_ddeexec, "topic", 0, NULL, 0, KEY_SET_VALUE, - NULL, &hkey_topic, NULL); - assert(rc==ERROR_SUCCESS); - rc=RegSetValueEx(hkey_topic, NULL, 0, REG_SZ, (LPBYTE)topic, - strlen(topic)+1); - assert(rc==ERROR_SUCCESS); - CloseHandle(hkey_topic); - } - if (ifexec) - { - rc=RegCreateKeyEx(hkey_ddeexec, "ifexec", 0, NULL, 0, KEY_SET_VALUE, - NULL, &hkey_ifexec, NULL); - assert(rc==ERROR_SUCCESS); - rc=RegSetValueEx(hkey_ifexec, NULL, 0, REG_SZ, (LPBYTE)ifexec, - strlen(ifexec)+1); - assert(rc==ERROR_SUCCESS); - CloseHandle(hkey_ifexec); - } - CloseHandle(hkey_ddeexec); - } - - CloseHandle(hkey_shell); - CloseHandle(hkey_verb); - CloseHandle(hkey_cmd); -} - -static void create_test_verb(const char* extension, const char* verb, - int rawcmd, const char* cmdtail) -{ - create_test_verb_dde(extension, verb, rawcmd, cmdtail, NULL, NULL, - NULL, NULL); -} - -/*** - * - * Functions to check that the child process was started just right - * (borrowed from dlls/kernel32/tests/process.c) - * - ***/ - -static const char* encodeA(const char* str) -{ - static char encoded[2*1024+1]; - char* ptr; - size_t len,i; - - if (!str) return ""; - len = strlen(str) + 1; - if (len >= sizeof(encoded)/2) - { - fprintf(stderr, "string is too long!\n"); - assert(0); - } - ptr = encoded; - for (i = 0; i < len; i++) - sprintf(&ptr[i * 2], "%02x", (unsigned char)str[i]); - ptr[2 * len] = '\0'; - return ptr; -} - -static unsigned decode_char(char c) -{ - if (c >= '0' && c <= '9') return c - '0'; - if (c >= 'a' && c <= 'f') return c - 'a' + 10; - assert(c >= 'A' && c <= 'F'); - return c - 'A' + 10; -} - -static char* decodeA(const char* str) -{ - static char decoded[1024]; - char* ptr; - size_t len,i; - - len = strlen(str) / 2; - if (!len--) return NULL; - if (len >= sizeof(decoded)) - { - fprintf(stderr, "string is too long!\n"); - assert(0); - } - ptr = decoded; - for (i = 0; i < len; i++) - ptr[i] = (decode_char(str[2 * i]) << 4) | decode_char(str[2 * i + 1]); - ptr[len] = '\0'; - return ptr; -} - -static void childPrintf(HANDLE h, const char* fmt, ...) -{ - va_list valist; - char buffer[1024]; - DWORD w; - - va_start(valist, fmt); - vsprintf(buffer, fmt, valist); - va_end(valist); - WriteFile(h, buffer, strlen(buffer), &w, NULL); -} - -static DWORD ddeInst; -static HSZ hszTopic; -static char ddeExec[MAX_PATH], ddeApplication[MAX_PATH]; -static BOOL post_quit_on_execute; - -static HDDEDATA CALLBACK ddeCb(UINT uType, UINT uFmt, HCONV hConv, - HSZ hsz1, HSZ hsz2, HDDEDATA hData, - ULONG_PTR dwData1, ULONG_PTR dwData2) -{ - DWORD size = 0; - - if (winetest_debug > 2) - trace("dde_cb: %04x, %04x, %p, %p, %p, %p, %08lx, %08lx\n", - uType, uFmt, hConv, hsz1, hsz2, hData, dwData1, dwData2); - - switch (uType) - { - case XTYP_CONNECT: - if (!DdeCmpStringHandles(hsz1, hszTopic)) - { - size = DdeQueryString(ddeInst, hsz2, ddeApplication, MAX_PATH, CP_WINANSI); - assert(size < MAX_PATH); - return (HDDEDATA)TRUE; - } - return (HDDEDATA)FALSE; - - case XTYP_EXECUTE: - size = DdeGetData(hData, (LPBYTE)ddeExec, MAX_PATH, 0L); - assert(size < MAX_PATH); - DdeFreeDataHandle(hData); - if (post_quit_on_execute) - PostQuitMessage(0); - return (HDDEDATA)DDE_FACK; - - default: - return NULL; - } -} - -/* - * This is just to make sure the child won't run forever stuck in a GetMessage() - * loop when DDE fails for some reason. - */ -static void CALLBACK childTimeout(HWND wnd, UINT msg, UINT_PTR timer, DWORD time) -{ - trace("childTimeout called\n"); - - PostQuitMessage(0); -} - -static void doChild(int argc, char** argv) -{ - char *filename, longpath[MAX_PATH] = ""; - HANDLE hFile, map; - int i; - int rc; - HSZ hszApplication; - UINT_PTR timer; - HANDLE dde_ready; - MSG msg; - char *shared_block; - - filename=argv[2]; - hFile=CreateFileA(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - if (hFile == INVALID_HANDLE_VALUE) - return; - - /* Arguments */ - childPrintf(hFile, "[Arguments]\r\n"); - if (winetest_debug > 2) - trace("argcA=%d\n", argc); - childPrintf(hFile, "argcA=%d\r\n", argc); - for (i = 0; i < argc; i++) - { - if (winetest_debug > 2) - trace("argvA%d=%s\n", i, argv[i]); - childPrintf(hFile, "argvA%d=%s\r\n", i, encodeA(argv[i])); - } - GetModuleFileNameA(GetModuleHandleA(NULL), longpath, MAX_PATH); - childPrintf(hFile, "longPath=%s\r\n", encodeA(longpath)); - - map = OpenFileMappingA(FILE_MAP_READ, FALSE, "winetest_shlexec_dde_map"); - if (map != NULL) - { - shared_block = MapViewOfFile(map, FILE_MAP_READ, 0, 0, 4096); - CloseHandle(map); - if (shared_block[0] != '\0' || shared_block[1] != '\0') - { - post_quit_on_execute = TRUE; - ddeInst = 0; - rc = DdeInitializeA(&ddeInst, ddeCb, CBF_SKIP_ALLNOTIFICATIONS | CBF_FAIL_ADVISES | - CBF_FAIL_POKES | CBF_FAIL_REQUESTS, 0L); - assert(rc == DMLERR_NO_ERROR); - hszApplication = DdeCreateStringHandleA(ddeInst, shared_block, CP_WINANSI); - hszTopic = DdeCreateStringHandleA(ddeInst, shared_block + strlen(shared_block) + 1, CP_WINANSI); - assert(hszApplication && hszTopic); - assert(DdeNameService(ddeInst, hszApplication, 0L, DNS_REGISTER | DNS_FILTEROFF)); - - timer = SetTimer(NULL, 0, 2500, childTimeout); - - dde_ready = OpenEvent(EVENT_MODIFY_STATE, FALSE, "winetest_shlexec_dde_ready"); - SetEvent(dde_ready); - CloseHandle(dde_ready); - - while (GetMessage(&msg, NULL, 0, 0)) - DispatchMessage(&msg); - - Sleep(500); - KillTimer(NULL, timer); - assert(DdeNameService(ddeInst, hszApplication, 0L, DNS_UNREGISTER)); - assert(DdeFreeStringHandle(ddeInst, hszTopic)); - assert(DdeFreeStringHandle(ddeInst, hszApplication)); - assert(DdeUninitialize(ddeInst)); - } - else - { - dde_ready = OpenEvent(EVENT_MODIFY_STATE, FALSE, "winetest_shlexec_dde_ready"); - SetEvent(dde_ready); - CloseHandle(dde_ready); - } - - UnmapViewOfFile(shared_block); - - childPrintf(hFile, "ddeExec=%s\r\n", encodeA(ddeExec)); - } - - CloseHandle(hFile); - - init_event(filename); - SetEvent(hEvent); - CloseHandle(hEvent); -} - -static char* getChildString(const char* sect, const char* key) -{ - char buf[1024]; - char* ret; - - GetPrivateProfileStringA(sect, key, "-", buf, sizeof(buf), child_file); - if (buf[0] == '\0' || (buf[0] == '-' && buf[1] == '\0')) return NULL; - assert(!(strlen(buf) & 1)); - ret = decodeA(buf); - return ret; -} - -static void dump_child(void) -{ - if (winetest_debug > 1) - { - char key[18]; - char* str; - int i, c; - - c=GetPrivateProfileIntA("Arguments", "argcA", -1, child_file); - trace("argcA=%d\n",c); - for (i=0;i32, - "expected success (33), got %s (%d), lpFile: %s\n", - rc > 32 ? "success" : "failure", rc, fileA - ); - } - - /* if quoted, existing "drawback_file.noassoc" not prevents finding "drawback_file.noassoc foo.shlexec" on wine */ - testfile = "\"%s\\drawback_file.noassoc foo.shlexec\""; - sprintf(fileA, testfile, tmpdir); - rc=shell_execute(NULL, fileA, NULL, NULL); - ok(rc>32 || broken(rc == 2) /* Win95/NT4 */, - "expected success (33), got %s (%d), lpFile: %s\n", - rc > 32 ? "success" : "failure", rc, fileA - ); - - /* error should be 2, not 31 */ - testfile = "\"%s\\drawback_file.noassoc\" foo.shlexec"; - sprintf(fileA, testfile, tmpdir); - rc=shell_execute(NULL, fileA, NULL, NULL); - ok(rc==2, - "expected failure (2), got %s (%d), lpFile: %s\n", - rc > 32 ? "success" : "failure", rc, fileA - ); - - /* ""command"" not works on wine (and real win9x and w2k) */ - testfile = "\"\"%s\\simple.shlexec\"\""; - sprintf(fileA, testfile, tmpdir); - rc=shell_execute(NULL, fileA, NULL, NULL); - todo_wine { - ok(rc>32 || broken(rc == 2) /* Win9x/2000 */, - "expected success (33), got %s (%d), lpFile: %s\n", - rc > 32 ? "success" : "failure", rc, fileA - ); - } - - /* nonexisting "drawback_nonexist.noassoc" not prevents finding "drawback_nonexist.noassoc foo.shlexec" on wine */ - testfile = "%s\\drawback_nonexist.noassoc foo.shlexec"; - sprintf(fileA, testfile, tmpdir); - rc=shell_execute(NULL, fileA, NULL, NULL); - ok(rc>32, - "expected success (33), got %s (%d), lpFile: %s\n", - rc > 32 ? "success" : "failure", rc, fileA - ); - - /* is SEE_MASK_DOENVSUBST default flag? Should only be when XP emulates 9x (XP bug or real 95 or ME behavior ?) */ - testfile = "%%TEMP%%\\%s\\simple.shlexec"; - sprintf(fileA, testfile, shorttmpdir); - rc=shell_execute(NULL, fileA, NULL, NULL); - todo_wine { - ok(rc==2, - "expected failure (2), got %s (%d), lpFile: %s\n", - rc > 32 ? "success" : "failure", rc, fileA - ); - } - - /* quoted */ - testfile = "\"%%TEMP%%\\%s\\simple.shlexec\""; - sprintf(fileA, testfile, shorttmpdir); - rc=shell_execute(NULL, fileA, NULL, NULL); - todo_wine { - ok(rc==2, - "expected failure (2), got %s (%d), lpFile: %s\n", - rc > 32 ? "success" : "failure", rc, fileA - ); - } - - /* test SEE_MASK_DOENVSUBST works */ - testfile = "%%TEMP%%\\%s\\simple.shlexec"; - sprintf(fileA, testfile, shorttmpdir); - rc=shell_execute_ex(SEE_MASK_DOENVSUBST | SEE_MASK_FLAG_NO_UI, NULL, fileA, NULL, NULL); - ok(rc>32, - "expected success (33), got %s (%d), lpFile: %s\n", - rc > 32 ? "success" : "failure", rc, fileA - ); - - /* quoted lpFile not works only on real win95 and nt4 */ - testfile = "\"%%TEMP%%\\%s\\simple.shlexec\""; - sprintf(fileA, testfile, shorttmpdir); - rc=shell_execute_ex(SEE_MASK_DOENVSUBST | SEE_MASK_FLAG_NO_UI, NULL, fileA, NULL, NULL); - ok(rc>32 || broken(rc == 2) /* Win95/NT4 */, - "expected success (33), got %s (%d), lpFile: %s\n", - rc > 32 ? "success" : "failure", rc, fileA - ); - -} - -static void test_argify(void) -{ - char fileA[MAX_PATH]; - - int rc; - - sprintf(fileA, "%s\\test file.shlexec", tmpdir); - - /* %2 */ - rc=shell_execute("NoQuotesParam2", fileA, "a b", NULL); - ok(rc>32, - "expected success (33), got %s (%d), lpFile: %s\n", - rc > 32 ? "success" : "failure", rc, fileA - ); - if (rc>32) - { - okChildInt("argcA", 5); - okChildString("argvA4", "a"); - } - - /* %2 */ - /* '"a"""' -> 'a"' */ - rc=shell_execute("NoQuotesParam2", fileA, "\"a:\"\"some string\"\"\"", NULL); - ok(rc>32, - "expected success (33), got %s (%d), lpFile: %s\n", - rc > 32 ? "success" : "failure", rc, fileA - ); - if (rc>32) - { - okChildInt("argcA", 5); - todo_wine { - okChildString("argvA4", "a:some string"); - } - } - - /* %2 */ - /* backslash isn't escape char - * '"a\""' -> '"a\""' */ - rc=shell_execute("NoQuotesParam2", fileA, "\"a:\\\"some string\\\"\"", NULL); - ok(rc>32, - "expected success (33), got %s (%d), lpFile: %s\n", - rc > 32 ? "success" : "failure", rc, fileA - ); - if (rc>32) - { - okChildInt("argcA", 5); - todo_wine { - okChildString("argvA4", "a:\\"); - } - } - - /* "%2" */ - /* \t isn't whitespace */ - rc=shell_execute("QuotedParam2", fileA, "a\tb c", NULL); - ok(rc>32, - "expected success (33), got %s (%d), lpFile: %s\n", - rc > 32 ? "success" : "failure", rc, fileA - ); - if (rc>32) - { - okChildInt("argcA", 5); - todo_wine { - okChildString("argvA4", "a\tb"); - } - } - - /* %* */ - rc=shell_execute("NoQuotesAllParams", fileA, "a b c d e f g h", NULL); - ok(rc>32, - "expected success (33), got %s (%d), lpFile: %s\n", - rc > 32 ? "success" : "failure", rc, fileA - ); - if (rc>32) - { - todo_wine { - okChildInt("argcA", 12); - okChildString("argvA4", "a"); - okChildString("argvA11", "h"); - } - } - - /* %* can sometimes contain only whitespaces and no args */ - rc=shell_execute("QuotedAllParams", fileA, " ", NULL); - ok(rc>32, - "expected success (33), got %s (%d), lpFile: %s\n", - rc > 32 ? "success" : "failure", rc, fileA - ); - if (rc>32) - { - todo_wine { - okChildInt("argcA", 5); - okChildString("argvA4", " "); - } - } - - /* %~3 */ - rc=shell_execute("NoQuotesParams345etc", fileA, "a b c d e f g h", NULL); - ok(rc>32, - "expected success (33), got %s (%d), lpFile: %s\n", - rc > 32 ? "success" : "failure", rc, fileA - ); - if (rc>32) - { - todo_wine { - okChildInt("argcA", 11); - okChildString("argvA4", "b"); - okChildString("argvA10", "h"); - } - } - - /* %~3 is rest of command line starting with whitespaces after 2nd arg */ - rc=shell_execute("QuotedParams345etc", fileA, "a ", NULL); - ok(rc>32, - "expected success (33), got %s (%d), lpFile: %s\n", - rc > 32 ? "success" : "failure", rc, fileA - ); - if (rc>32) - { - okChildInt("argcA", 5); - todo_wine { - okChildString("argvA4", " "); - } - } - -} - -static void test_filename(void) -{ - char filename[MAX_PATH]; - const filename_tests_t* test; - char* c; - int rc; - - test=filename_tests; - while (test->basename) - { - BOOL quotedfile = FALSE; - - if (skip_noassoc_tests && test->rc == SE_ERR_NOASSOC) - { - win_skip("Skipping shellexecute of file with unassociated extension\n"); - test++; - continue; - } - - sprintf(filename, test->basename, tmpdir); - if (strchr(filename, '/')) - { - c=filename; - while (*c) - { - if (*c=='\\') - *c='/'; - c++; - } - } - if ((test->todo & 0x40)==0) - { - rc=shell_execute(test->verb, filename, NULL, NULL); - } - else - { - char quoted[MAX_PATH + 2]; - - quotedfile = TRUE; - sprintf(quoted, "\"%s\"", filename); - rc=shell_execute(test->verb, quoted, NULL, NULL); - } - if (rc > 32) - rc=33; - if ((test->todo & 0x1)==0) - { - ok(rc==test->rc || - broken(quotedfile && rc == 2), /* NT4 */ - "%s failed: rc=%d err=%d\n", shell_call, - rc, GetLastError()); - } - else todo_wine - { - ok(rc==test->rc, "%s failed: rc=%d err=%d\n", shell_call, - rc, GetLastError()); - } - if (rc == 33) - { - const char* verb; - if ((test->todo & 0x2)==0) - { - okChildInt("argcA", 5); - } - else todo_wine - { - okChildInt("argcA", 5); - } - verb=(test->verb ? test->verb : "Open"); - if ((test->todo & 0x4)==0) - { - okChildString("argvA3", verb); - } - else todo_wine - { - okChildString("argvA3", verb); - } - if ((test->todo & 0x8)==0) - { - okChildPath("argvA4", filename); - } - else todo_wine - { - okChildPath("argvA4", filename); - } - } - test++; - } - - test=noquotes_tests; - while (test->basename) - { - sprintf(filename, test->basename, tmpdir); - rc=shell_execute(test->verb, filename, NULL, NULL); - if (rc > 32) - rc=33; - if ((test->todo & 0x1)==0) - { - ok(rc==test->rc, "%s failed: rc=%d err=%d\n", shell_call, - rc, GetLastError()); - } - else todo_wine - { - ok(rc==test->rc, "%s failed: rc=%d err=%d\n", shell_call, - rc, GetLastError()); - } - if (rc==0) - { - int count; - const char* verb; - char* str; - - verb=(test->verb ? test->verb : "Open"); - if ((test->todo & 0x4)==0) - { - okChildString("argvA3", verb); - } - else todo_wine - { - okChildString("argvA3", verb); - } - - count=4; - str=filename; - while (1) - { - char attrib[18]; - char* space; - space=strchr(str, ' '); - if (space) - *space='\0'; - sprintf(attrib, "argvA%d", count); - if ((test->todo & 0x8)==0) - { - okChildPath(attrib, str); - } - else todo_wine - { - okChildPath(attrib, str); - } - count++; - if (!space) - break; - str=space+1; - } - if ((test->todo & 0x2)==0) - { - okChildInt("argcA", count); - } - else todo_wine - { - okChildInt("argcA", count); - } - } - test++; - } - - if (dllver.dwMajorVersion != 0) - { - /* The more recent versions of shell32.dll accept quoted filenames - * while older ones (e.g. 4.00) don't. Still we want to test this - * because IE 6 depends on the new behavior. - * One day we may need to check the exact version of the dll but for - * now making sure DllGetVersion() is present is sufficient. - */ - sprintf(filename, "\"%s\\test file.shlexec\"", tmpdir); - rc=shell_execute(NULL, filename, NULL, NULL); - ok(rc > 32, "%s failed: rc=%d err=%d\n", shell_call, rc, - GetLastError()); - okChildInt("argcA", 5); - okChildString("argvA3", "Open"); - sprintf(filename, "%s\\test file.shlexec", tmpdir); - okChildPath("argvA4", filename); - } -} - -static void test_find_executable(void) -{ - char filename[MAX_PATH]; - char command[MAX_PATH]; - const filename_tests_t* test; - INT_PTR rc; - - if (!create_test_association(".sfe")) - { - skip("Unable to create association for '.sfe'\n"); - return; - } - create_test_verb(".sfe", "Open", 1, "%1"); - - /* Don't test FindExecutable(..., NULL), it always crashes */ - - strcpy(command, "your word"); - if (0) /* Can crash on Vista! */ - { - rc=(INT_PTR)FindExecutableA(NULL, NULL, command); - ok(rc == SE_ERR_FNF || rc > 32 /* nt4 */, "FindExecutable(NULL) returned %ld\n", rc); - ok(strcmp(command, "your word") != 0, "FindExecutable(NULL) returned command=[%s]\n", command); - } - - strcpy(command, "your word"); - rc=(INT_PTR)FindExecutableA(tmpdir, NULL, command); - ok(rc == SE_ERR_NOASSOC /* >= win2000 */ || rc > 32 /* win98, nt4 */, "FindExecutable(NULL) returned %ld\n", rc); - ok(strcmp(command, "your word") != 0, "FindExecutable(NULL) returned command=[%s]\n", command); - - sprintf(filename, "%s\\test file.sfe", tmpdir); - rc=(INT_PTR)FindExecutableA(filename, NULL, command); - ok(rc > 32, "FindExecutable(%s) returned %ld\n", filename, rc); - /* Depending on the platform, command could be '%1' or 'test file.sfe' */ - - rc=(INT_PTR)FindExecutableA("test file.sfe", tmpdir, command); - ok(rc > 32, "FindExecutable(%s) returned %ld\n", filename, rc); - - rc=(INT_PTR)FindExecutableA("test file.sfe", NULL, command); - ok(rc == SE_ERR_FNF, "FindExecutable(%s) returned %ld\n", filename, rc); - - delete_test_association(".sfe"); - - if (!create_test_association(".shl")) - { - skip("Unable to create association for '.shl'\n"); - return; - } - create_test_verb(".shl", "Open", 0, "Open"); - - sprintf(filename, "%s\\test file.shl", tmpdir); - rc=(INT_PTR)FindExecutableA(filename, NULL, command); - ok(rc == SE_ERR_FNF /* NT4 */ || rc > 32, "FindExecutable(%s) returned %ld\n", filename, rc); - - sprintf(filename, "%s\\test file.shlfoo", tmpdir); - rc=(INT_PTR)FindExecutableA(filename, NULL, command); - - delete_test_association(".shl"); - - if (rc > 32) - { - /* On Windows XP and 2003 FindExecutable() is completely broken. - * Probably what it does is convert the filename to 8.3 format, - * which as a side effect converts the '.shlfoo' extension to '.shl', - * and then tries to find an association for '.shl'. This means it - * will normally fail on most extensions with more than 3 characters, - * like '.mpeg', etc. - * Also it means we cannot do any other test. - */ - win_skip("FindExecutable() is broken -> not running 4+ character extension tests\n"); - return; - } - - test=filename_tests; - while (test->basename) - { - sprintf(filename, test->basename, tmpdir); - if (strchr(filename, '/')) - { - char* c; - c=filename; - while (*c) - { - if (*c=='\\') - *c='/'; - c++; - } - } - /* Win98 does not '\0'-terminate command! */ - memset(command, '\0', sizeof(command)); - rc=(INT_PTR)FindExecutableA(filename, NULL, command); - if (rc > 32) - rc=33; - if ((test->todo & 0x10)==0) - { - ok(rc==test->rc, "FindExecutable(%s) failed: rc=%ld\n", filename, rc); - } - else todo_wine - { - ok(rc==test->rc, "FindExecutable(%s) failed: rc=%ld\n", filename, rc); - } - if (rc > 32) - { - int equal; - equal=strcmp(command, argv0) == 0 || - /* NT4 returns an extra 0x8 character! */ - (strlen(command) == strlen(argv0)+1 && strncmp(command, argv0, strlen(argv0)) == 0); - if ((test->todo & 0x20)==0) - { - ok(equal, "FindExecutable(%s) returned command='%s' instead of '%s'\n", - filename, command, argv0); - } - else todo_wine - { - ok(equal, "FindExecutable(%s) returned command='%s' instead of '%s'\n", - filename, command, argv0); - } - } - test++; - } -} - - -static filename_tests_t lnk_tests[]= -{ - /* Pass bad / nonexistent filenames as a parameter */ - {NULL, "%s\\nonexistent.shlexec", 0xa, 33}, - {NULL, "%s\\nonexistent.noassoc", 0xa, 33}, - - /* Pass regular paths as a parameter */ - {NULL, "%s\\test file.shlexec", 0xa, 33}, - {NULL, "%s/%%nasty%% $file.shlexec", 0xa, 33}, - - /* Pass filenames with no association as a parameter */ - {NULL, "%s\\test file.noassoc", 0xa, 33}, - - {NULL, NULL, 0} -}; - -static void test_lnks(void) -{ - char filename[MAX_PATH]; - char params[MAX_PATH]; - const filename_tests_t* test; - int rc; - - sprintf(filename, "%s\\test_shortcut_shlexec.lnk", tmpdir); - rc=shell_execute_ex(SEE_MASK_NOZONECHECKS, NULL, filename, NULL, NULL); - ok(rc > 32, "%s failed: rc=%d err=%d\n", shell_call, rc, - GetLastError()); - okChildInt("argcA", 5); - okChildString("argvA3", "Open"); - sprintf(params, "%s\\test file.shlexec", tmpdir); - get_long_path_name(params, filename, sizeof(filename)); - okChildPath("argvA4", filename); - - sprintf(filename, "%s\\test_shortcut_exe.lnk", tmpdir); - rc=shell_execute_ex(SEE_MASK_NOZONECHECKS, NULL, filename, NULL, NULL); - ok(rc > 32, "%s failed: rc=%d err=%d\n", shell_call, rc, - GetLastError()); - okChildInt("argcA", 4); - okChildString("argvA3", "Lnk"); - - if (dllver.dwMajorVersion>=6) - { - char* c; - /* Recent versions of shell32.dll accept '/'s in shortcut paths. - * Older versions don't or are quite buggy in this regard. - */ - sprintf(filename, "%s\\test_shortcut_exe.lnk", tmpdir); - c=filename; - while (*c) - { - if (*c=='\\') - *c='/'; - c++; - } - rc=shell_execute_ex(SEE_MASK_NOZONECHECKS, NULL, filename, NULL, NULL); - ok(rc > 32, "%s failed: rc=%d err=%d\n", shell_call, rc, - GetLastError()); - okChildInt("argcA", 4); - okChildString("argvA3", "Lnk"); - } - - sprintf(filename, "%s\\test_shortcut_exe.lnk", tmpdir); - test=lnk_tests; - while (test->basename) - { - params[0]='\"'; - sprintf(params+1, test->basename, tmpdir); - strcat(params,"\""); - rc=shell_execute_ex(SEE_MASK_NOZONECHECKS, NULL, filename, params, - NULL); - if (rc > 32) - rc=33; - if ((test->todo & 0x1)==0) - { - ok(rc==test->rc, "%s failed: rc=%d err=%d\n", shell_call, - rc, GetLastError()); - } - else todo_wine - { - ok(rc==test->rc, "%s failed: rc=%d err=%d\n", shell_call, - rc, GetLastError()); - } - if (rc==0) - { - if ((test->todo & 0x2)==0) - { - okChildInt("argcA", 5); - } - else - { - okChildInt("argcA", 5); - } - if ((test->todo & 0x4)==0) - { - okChildString("argvA3", "Lnk"); - } - else todo_wine - { - okChildString("argvA3", "Lnk"); - } - sprintf(params, test->basename, tmpdir); - if ((test->todo & 0x8)==0) - { - okChildPath("argvA4", params); - } - else - { - okChildPath("argvA4", params); - } - } - test++; - } -} - - -static void test_exes(void) -{ - char filename[MAX_PATH]; - char params[1024]; - int rc; - - sprintf(params, "shlexec \"%s\" Exec", child_file); - - /* We need NOZONECHECKS on Win2003 to block a dialog */ - rc=shell_execute_ex(SEE_MASK_NOZONECHECKS, NULL, argv0, params, - NULL); - ok(rc > 32, "%s returned %d\n", shell_call, rc); - okChildInt("argcA", 4); - okChildString("argvA3", "Exec"); - - if (! skip_noassoc_tests) - { - sprintf(filename, "%s\\test file.noassoc", tmpdir); - if (CopyFile(argv0, filename, FALSE)) - { - rc=shell_execute(NULL, filename, params, NULL); - todo_wine { - ok(rc==SE_ERR_NOASSOC, "%s succeeded: rc=%d\n", shell_call, rc); - } - } - } - else - { - win_skip("Skipping shellexecute of file with unassociated extension\n"); - } -} - -static void test_exes_long(void) -{ - char filename[MAX_PATH]; - char params[2024]; - char longparam[MAX_PATH]; - int rc; - - for (rc = 0; rc < MAX_PATH; rc++) - longparam[rc]='a'+rc%26; - longparam[MAX_PATH-1]=0; - - - sprintf(params, "shlexec \"%s\" %s", child_file,longparam); - - /* We need NOZONECHECKS on Win2003 to block a dialog */ - rc=shell_execute_ex(SEE_MASK_NOZONECHECKS, NULL, argv0, params, - NULL); - ok(rc > 32, "%s returned %d\n", shell_call, rc); - okChildInt("argcA", 4); - okChildString("argvA3", longparam); - - if (! skip_noassoc_tests) - { - sprintf(filename, "%s\\test file.noassoc", tmpdir); - if (CopyFile(argv0, filename, FALSE)) - { - rc=shell_execute(NULL, filename, params, NULL); - todo_wine { - ok(rc==SE_ERR_NOASSOC, "%s succeeded: rc=%d\n", shell_call, rc); - } - } - } - else - { - win_skip("Skipping shellexecute of file with unassociated extension\n"); - } -} - -typedef struct -{ - const char* command; - const char* ddeexec; - const char* application; - const char* topic; - const char* ifexec; - int expectedArgs; - const char* expectedDdeExec; - int todo; -} dde_tests_t; - -static dde_tests_t dde_tests[] = -{ - /* Test passing and not passing command-line - * argument, no DDE */ - {"", NULL, NULL, NULL, NULL, FALSE, "", 0x0}, - {"\"%1\"", NULL, NULL, NULL, NULL, TRUE, "", 0x0}, - - /* Test passing and not passing command-line - * argument, with DDE */ - {"", "[open(\"%1\")]", "shlexec", "dde", NULL, FALSE, "[open(\"%s\")]", 0x0}, - {"\"%1\"", "[open(\"%1\")]", "shlexec", "dde", NULL, TRUE, "[open(\"%s\")]", 0x0}, - - /* Test unquoted %1 in command and ddeexec - * (test filename has space) */ - {"%1", "[open(%1)]", "shlexec", "dde", NULL, 2, "[open(%s)]", 0x0}, - - /* Test ifexec precedence over ddeexec */ - {"", "[open(\"%1\")]", "shlexec", "dde", "[ifexec(\"%1\")]", FALSE, "[ifexec(\"%s\")]", 0x0}, - - /* Test default DDE topic */ - {"", "[open(\"%1\")]", "shlexec", NULL, NULL, FALSE, "[open(\"%s\")]", 0x0}, - - /* Test default DDE application */ - {"", "[open(\"%1\")]", NULL, "dde", NULL, FALSE, "[open(\"%s\")]", 0x0}, - - {NULL, NULL, NULL, NULL, NULL, 0, 0x0} -}; - -static DWORD WINAPI hooked_WaitForInputIdle(HANDLE process, DWORD timeout) -{ - return WaitForSingleObject(dde_ready_event, timeout); -} - -/* - * WaitForInputIdle() will normally return immediately for console apps. That's - * a problem for us because ShellExecute will assume that an app is ready to - * receive DDE messages after it has called WaitForInputIdle() on that app. - * To work around that we install our own version of WaitForInputIdle() that - * will wait for the child to explicitly tell us that it is ready. We do that - * by changing the entry for WaitForInputIdle() in the shell32 import address - * table. - */ -static void hook_WaitForInputIdle(void *new_func) -{ - char *base; - PIMAGE_NT_HEADERS nt_headers; - DWORD import_directory_rva; - PIMAGE_IMPORT_DESCRIPTOR import_descriptor; - - base = (char *) GetModuleHandleA("shell32.dll"); - nt_headers = (PIMAGE_NT_HEADERS)(base + ((PIMAGE_DOS_HEADER) base)->e_lfanew); - import_directory_rva = nt_headers->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress; - - /* Search for the correct imported module by walking the import descriptors */ - import_descriptor = (PIMAGE_IMPORT_DESCRIPTOR)(base + import_directory_rva); - while (U(*import_descriptor).OriginalFirstThunk != 0) - { - char *import_module_name; - - import_module_name = base + import_descriptor->Name; - if (lstrcmpiA(import_module_name, "user32.dll") == 0 || - lstrcmpiA(import_module_name, "user32") == 0) - { - PIMAGE_THUNK_DATA int_entry; - PIMAGE_THUNK_DATA iat_entry; - - /* The import name table and import address table are two parallel - * arrays. We need the import name table to find the imported - * routine and the import address table to patch the address, so - * walk them side by side */ - int_entry = (PIMAGE_THUNK_DATA)(base + U(*import_descriptor).OriginalFirstThunk); - iat_entry = (PIMAGE_THUNK_DATA)(base + import_descriptor->FirstThunk); - while (int_entry->u1.Ordinal != 0) - { - if (! IMAGE_SNAP_BY_ORDINAL(int_entry->u1.Ordinal)) - { - PIMAGE_IMPORT_BY_NAME import_by_name; - import_by_name = (PIMAGE_IMPORT_BY_NAME)(base + int_entry->u1.AddressOfData); - if (lstrcmpA((char *) import_by_name->Name, "WaitForInputIdle") == 0) - { - /* Found the correct routine in the correct imported module. Patch it. */ - DWORD old_prot; - VirtualProtect(&iat_entry->u1.Function, sizeof(ULONG_PTR), PAGE_READWRITE, &old_prot); - iat_entry->u1.Function = (ULONG_PTR) new_func; - VirtualProtect(&iat_entry->u1.Function, sizeof(ULONG_PTR), old_prot, &old_prot); - break; - } - } - int_entry++; - iat_entry++; - } - break; - } - - import_descriptor++; - } -} - -static void test_dde(void) -{ - char filename[MAX_PATH], defApplication[MAX_PATH]; - const dde_tests_t* test; - char params[1024]; - int rc; - HANDLE map; - char *shared_block; - - hook_WaitForInputIdle((void *) hooked_WaitForInputIdle); - - sprintf(filename, "%s\\test file.sde", tmpdir); - - /* Default service is application name minus path and extension */ - strcpy(defApplication, strrchr(argv0, '\\')+1); - *strchr(defApplication, '.') = 0; - - map = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, - 4096, "winetest_shlexec_dde_map"); - shared_block = MapViewOfFile(map, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 4096); - - test = dde_tests; - while (test->command) - { - if (!create_test_association(".sde")) - { - skip("Unable to create association for '.sde'\n"); - return; - } - create_test_verb_dde(".sde", "Open", 0, test->command, test->ddeexec, - test->application, test->topic, test->ifexec); - - if (test->application != NULL || test->topic != NULL) - { - strcpy(shared_block, test->application ? test->application : defApplication); - strcpy(shared_block + strlen(shared_block) + 1, test->topic ? test->topic : SZDDESYS_TOPIC); - } - else - { - shared_block[0] = '\0'; - shared_block[1] = '\0'; - } - ddeExec[0] = 0; - - dde_ready_event = CreateEventA(NULL, FALSE, FALSE, "winetest_shlexec_dde_ready"); - rc = shell_execute_ex(SEE_MASK_FLAG_DDEWAIT | SEE_MASK_FLAG_NO_UI, NULL, filename, NULL, NULL); - CloseHandle(dde_ready_event); - if ((test->todo & 0x1)==0) - { - ok(32 < rc, "%s failed: rc=%d err=%d\n", shell_call, - rc, GetLastError()); - } - else todo_wine - { - ok(32 < rc, "%s failed: rc=%d err=%d\n", shell_call, - rc, GetLastError()); - } - if (32 < rc) - { - if ((test->todo & 0x2)==0) - { - okChildInt("argcA", test->expectedArgs + 3); - } - else todo_wine - { - okChildInt("argcA", test->expectedArgs + 3); - } - if (test->expectedArgs == 1) - { - if ((test->todo & 0x4) == 0) - { - okChildPath("argvA3", filename); - } - else todo_wine - { - okChildPath("argvA3", filename); - } - } - if ((test->todo & 0x8) == 0) - { - sprintf(params, test->expectedDdeExec, filename); - okChildPath("ddeExec", params); - } - else todo_wine - { - sprintf(params, test->expectedDdeExec, filename); - okChildPath("ddeExec", params); - } - } - - delete_test_association(".sde"); - test++; - } - - UnmapViewOfFile(shared_block); - CloseHandle(map); - hook_WaitForInputIdle((void *) WaitForInputIdle); -} - -#define DDE_DEFAULT_APP_VARIANTS 2 -typedef struct -{ - const char* command; - const char* expectedDdeApplication[DDE_DEFAULT_APP_VARIANTS]; - int todo; - int rc[DDE_DEFAULT_APP_VARIANTS]; -} dde_default_app_tests_t; - -static dde_default_app_tests_t dde_default_app_tests[] = -{ - /* Windows XP and 98 handle default DDE app names in different ways. - * The application name we see in the first test determines the pattern - * of application names and return codes we will look for. */ - - /* Test unquoted existing filename with a space */ - {"%s\\test file.exe", {"test file", "test"}, 0x0, {33, 33}}, - {"%s\\test file.exe param", {"test file", "test"}, 0x0, {33, 33}}, - - /* Test quoted existing filename with a space */ - {"\"%s\\test file.exe\"", {"test file", "test file"}, 0x0, {33, 33}}, - {"\"%s\\test file.exe\" param", {"test file", "test file"}, 0x0, {33, 33}}, - - /* Test unquoted filename with a space that doesn't exist, but - * test2.exe does */ - {"%s\\test2 file.exe", {"test2", "test2"}, 0x0, {33, 33}}, - {"%s\\test2 file.exe param", {"test2", "test2"}, 0x0, {33, 33}}, - - /* Test quoted filename with a space that does not exist */ - {"\"%s\\test2 file.exe\"", {"", "test2 file"}, 0x0, {5, 33}}, - {"\"%s\\test2 file.exe\" param", {"", "test2 file"}, 0x0, {5, 33}}, - - /* Test filename supplied without the extension */ - {"%s\\test2", {"test2", "test2"}, 0x0, {33, 33}}, - {"%s\\test2 param", {"test2", "test2"}, 0x0, {33, 33}}, - - /* Test an unquoted nonexistent filename */ - {"%s\\notexist.exe", {"", "notexist"}, 0x0, {5, 33}}, - {"%s\\notexist.exe param", {"", "notexist"}, 0x0, {5, 33}}, - - /* Test an application that will be found on the path */ - {"cmd", {"cmd", "cmd"}, 0x0, {33, 33}}, - {"cmd param", {"cmd", "cmd"}, 0x0, {33, 33}}, - - /* Test an application that will not be found on the path */ - {"xyzwxyzwxyz", {"", "xyzwxyzwxyz"}, 0x0, {5, 33}}, - {"xyzwxyzwxyz param", {"", "xyzwxyzwxyz"}, 0x0, {5, 33}}, - - {NULL, {NULL}, 0, {0}} -}; - -typedef struct -{ - char *filename; - DWORD threadIdParent; -} dde_thread_info_t; - -static DWORD CALLBACK ddeThread(LPVOID arg) -{ - dde_thread_info_t *info = arg; - assert(info && info->filename); - PostThreadMessage(info->threadIdParent, - WM_QUIT, - shell_execute_ex(SEE_MASK_FLAG_DDEWAIT | SEE_MASK_FLAG_NO_UI, NULL, info->filename, NULL, NULL), - 0L); - ExitThread(0); -} - -static void test_dde_default_app(void) -{ - char filename[MAX_PATH]; - HSZ hszApplication; - dde_thread_info_t info = { filename, GetCurrentThreadId() }; - const dde_default_app_tests_t* test; - char params[1024]; - DWORD threadId; - MSG msg; - int rc, which = 0; - - post_quit_on_execute = FALSE; - ddeInst = 0; - rc = DdeInitializeA(&ddeInst, ddeCb, CBF_SKIP_ALLNOTIFICATIONS | CBF_FAIL_ADVISES | - CBF_FAIL_POKES | CBF_FAIL_REQUESTS, 0L); - assert(rc == DMLERR_NO_ERROR); - - sprintf(filename, "%s\\test file.sde", tmpdir); - - /* It is strictly not necessary to register an application name here, but wine's - * DdeNameService implementation complains if 0L is passed instead of - * hszApplication with DNS_FILTEROFF */ - hszApplication = DdeCreateStringHandleA(ddeInst, "shlexec", CP_WINANSI); - hszTopic = DdeCreateStringHandleA(ddeInst, "shlexec", CP_WINANSI); - assert(hszApplication && hszTopic); - assert(DdeNameService(ddeInst, hszApplication, 0L, DNS_REGISTER | DNS_FILTEROFF)); - - test = dde_default_app_tests; - while (test->command) - { - if (!create_test_association(".sde")) - { - skip("Unable to create association for '.sde'\n"); - return; - } - sprintf(params, test->command, tmpdir); - create_test_verb_dde(".sde", "Open", 1, params, "[test]", NULL, - "shlexec", NULL); - ddeApplication[0] = 0; - - /* No application will be run as we will respond to the first DDE event, - * so don't wait for it */ - SetEvent(hEvent); - - assert(CreateThread(NULL, 0, ddeThread, &info, 0, &threadId)); - while (GetMessage(&msg, NULL, 0, 0)) DispatchMessage(&msg); - rc = msg.wParam > 32 ? 33 : msg.wParam; - - /* First test, find which set of test data we expect to see */ - if (test == dde_default_app_tests) - { - int i; - for (i=0; iexpectedDdeApplication[i])) - { - which = i; - break; - } - } - if (i == DDE_DEFAULT_APP_VARIANTS) - skip("Default DDE application test does not match any available results, using first expected data set.\n"); - } - - if ((test->todo & 0x1)==0) - { - ok(rc==test->rc[which], "%s failed: rc=%d err=%d\n", shell_call, - rc, GetLastError()); - } - else todo_wine - { - ok(rc==test->rc[which], "%s failed: rc=%d err=%d\n", shell_call, - rc, GetLastError()); - } - if (rc == 33) - { - if ((test->todo & 0x2)==0) - { - ok(!strcmp(ddeApplication, test->expectedDdeApplication[which]), - "Expected application '%s', got '%s'\n", - test->expectedDdeApplication[which], ddeApplication); - } - else todo_wine - { - ok(!strcmp(ddeApplication, test->expectedDdeApplication[which]), - "Expected application '%s', got '%s'\n", - test->expectedDdeApplication[which], ddeApplication); - } - } - - delete_test_association(".sde"); - test++; - } - - assert(DdeNameService(ddeInst, hszApplication, 0L, DNS_UNREGISTER)); - assert(DdeFreeStringHandle(ddeInst, hszTopic)); - assert(DdeFreeStringHandle(ddeInst, hszApplication)); - assert(DdeUninitialize(ddeInst)); -} - -static void init_test(void) -{ - HMODULE hdll; - HRESULT (WINAPI *pDllGetVersion)(DLLVERSIONINFO*); - char filename[MAX_PATH]; - WCHAR lnkfile[MAX_PATH]; - char params[1024]; - const char* const * testfile; - lnk_desc_t desc; - DWORD rc; - HRESULT r; - - hdll=GetModuleHandleA("shell32.dll"); - pDllGetVersion=(void*)GetProcAddress(hdll, "DllGetVersion"); - if (pDllGetVersion) - { - dllver.cbSize=sizeof(dllver); - pDllGetVersion(&dllver); - trace("major=%d minor=%d build=%d platform=%d\n", - dllver.dwMajorVersion, dllver.dwMinorVersion, - dllver.dwBuildNumber, dllver.dwPlatformID); - } - else - { - memset(&dllver, 0, sizeof(dllver)); - } - - r = CoInitialize(NULL); - ok(r == S_OK, "CoInitialize failed (0x%08x)\n", r); - if (FAILED(r)) - exit(1); - - rc=GetModuleFileName(NULL, argv0, sizeof(argv0)); - assert(rc!=0 && rc 32, "%s returned %d\n", shell_call, rc); - okChildInt("argcA", 4); - okChildString("argvA3", "Exec"); - todo_wine okChildPath("longPath", path); - - DeleteFile(path); - RemoveDirectoryA(newdir); -} - -START_TEST(shlexec) -{ - - myARGC = winetest_get_mainargs(&myARGV); - if (myARGC >= 3) - { - doChild(myARGC, myARGV); - exit(0); - } - - init_test(); - - test_argify(); - test_lpFile_parsed(); - test_filename(); - test_find_executable(); - test_lnks(); - test_exes(); - test_exes_long(); - test_dde(); - test_dde_default_app(); - test_commandline(); - test_directory(); - - cleanup_test(); -} diff --git a/rostests/winetests/shell32/shlfileop.c b/rostests/winetests/shell32/shlfileop.c deleted file mode 100644 index f1e2a3ed18e..00000000000 --- a/rostests/winetests/shell32/shlfileop.c +++ /dev/null @@ -1,2421 +0,0 @@ -/* - * Unit test of the SHFileOperation function. - * - * Copyright 2002 Andriy Palamarchuk - * - * 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 - -#define WINE_NOWINSOCK -#include -#include "shellapi.h" -#include "shlobj.h" - -#include "wine/test.h" - -#ifndef FOF_NORECURSION -#define FOF_NORECURSION 0x1000 -#endif - -/* Error codes could be pre-Win32 */ -#define DE_SAMEFILE 0x71 -#define DE_MANYSRC1DEST 0x72 -#define DE_DIFFDIR 0x73 -#define DE_OPCANCELLED 0x75 -#define DE_DESTSUBTREE 0x76 -#define DE_INVALIDFILES 0x7C -#define DE_DESTSAMETREE 0x7D -#define DE_FLDDESTISFILE 0x7E -#define DE_FILEDESTISFLD 0x80 -#define expect_retval(ret, ret_prewin32)\ - ok(retval == ret ||\ - broken(retval == ret_prewin32),\ - "Expected %d, got %d\n", ret, retval) - -static BOOL old_shell32 = FALSE; - -static CHAR CURR_DIR[MAX_PATH]; -static const WCHAR UNICODE_PATH[] = {'c',':','\\',0x00ae,'\0','\0'}; - /* "c:\®" can be used in all codepages */ - /* Double-null termination needed for pFrom field of SHFILEOPSTRUCT */ - -static HMODULE hshell32; -static int (WINAPI *pSHCreateDirectoryExA)(HWND, LPCSTR, LPSECURITY_ATTRIBUTES); -static int (WINAPI *pSHCreateDirectoryExW)(HWND, LPCWSTR, LPSECURITY_ATTRIBUTES); -static int (WINAPI *pSHFileOperationW)(LPSHFILEOPSTRUCTW); -static DWORD_PTR (WINAPI *pSHGetFileInfoW)(LPCWSTR, DWORD , SHFILEINFOW*, UINT, UINT); -static int (WINAPI *pSHPathPrepareForWriteA)(HWND, IUnknown*, LPCSTR, DWORD); -static int (WINAPI *pSHPathPrepareForWriteW)(HWND, IUnknown*, LPCWSTR, DWORD); - -static void InitFunctionPointers(void) -{ - hshell32 = GetModuleHandleA("shell32.dll"); - pSHCreateDirectoryExA = (void*)GetProcAddress(hshell32, "SHCreateDirectoryExA"); - pSHCreateDirectoryExW = (void*)GetProcAddress(hshell32, "SHCreateDirectoryExW"); - pSHFileOperationW = (void*)GetProcAddress(hshell32, "SHFileOperationW"); - pSHGetFileInfoW = (void*)GetProcAddress(hshell32, "SHGetFileInfoW"); - pSHPathPrepareForWriteA = (void*)GetProcAddress(hshell32, "SHPathPrepareForWriteA"); - pSHPathPrepareForWriteW = (void*)GetProcAddress(hshell32, "SHPathPrepareForWriteW"); -} - -/* creates a file with the specified name for tests */ -static void createTestFile(const CHAR *name) -{ - HANDLE file; - DWORD written; - - file = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "Failure to open file %s\n", name); - WriteFile(file, name, strlen(name), &written, NULL); - WriteFile(file, "\n", strlen("\n"), &written, NULL); - CloseHandle(file); -} - -static void createTestFileW(const WCHAR *name) -{ - HANDLE file; - - file = CreateFileW(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "Failure to open file\n"); - CloseHandle(file); -} - -static BOOL file_exists(const CHAR *name) -{ - return GetFileAttributesA(name) != INVALID_FILE_ATTRIBUTES; -} - -static BOOL dir_exists(const CHAR *name) -{ - DWORD attr; - BOOL dir; - - attr = GetFileAttributesA(name); - dir = ((attr & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY); - - return ((attr != INVALID_FILE_ATTRIBUTES) && dir); -} - -static BOOL file_existsW(LPCWSTR name) -{ - return GetFileAttributesW(name) != INVALID_FILE_ATTRIBUTES; -} - -static BOOL file_has_content(const CHAR *name, const CHAR *content) -{ - CHAR buf[MAX_PATH]; - HANDLE file; - DWORD read; - - file = CreateFileA(name, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL); - if (file == INVALID_HANDLE_VALUE) - return FALSE; - ReadFile(file, buf, MAX_PATH - 1, &read, NULL); - buf[read] = 0; - CloseHandle(file); - return strcmp(buf, content)==0; -} - -/* initializes the tests */ -static void init_shfo_tests(void) -{ - int len; - - GetCurrentDirectoryA(MAX_PATH, CURR_DIR); - len = lstrlenA(CURR_DIR); - - if(len && (CURR_DIR[len-1] == '\\')) - CURR_DIR[len-1] = 0; - - createTestFile("test1.txt"); - createTestFile("test2.txt"); - createTestFile("test3.txt"); - createTestFile("test_5.txt"); - CreateDirectoryA("test4.txt", NULL); - CreateDirectoryA("testdir2", NULL); - CreateDirectoryA("testdir2\\nested", NULL); - createTestFile("testdir2\\one.txt"); - createTestFile("testdir2\\nested\\two.txt"); -} - -/* cleans after tests */ -static void clean_after_shfo_tests(void) -{ - DeleteFileA("test1.txt"); - DeleteFileA("test2.txt"); - DeleteFileA("test3.txt"); - DeleteFileA("test_5.txt"); - DeleteFileA("one.txt"); - DeleteFileA("test4.txt\\test1.txt"); - DeleteFileA("test4.txt\\test2.txt"); - DeleteFileA("test4.txt\\test3.txt"); - RemoveDirectoryA("test4.txt"); - DeleteFileA("testdir2\\one.txt"); - DeleteFileA("testdir2\\test1.txt"); - DeleteFileA("testdir2\\test2.txt"); - DeleteFileA("testdir2\\test3.txt"); - DeleteFileA("testdir2\\test4.txt\\test1.txt"); - DeleteFileA("testdir2\\nested\\two.txt"); - RemoveDirectoryA("testdir2\\test4.txt"); - RemoveDirectoryA("testdir2\\nested"); - RemoveDirectoryA("testdir2"); - RemoveDirectoryA("c:\\testdir3"); - DeleteFileA("nonexistent\\notreal\\test2.txt"); - RemoveDirectoryA("nonexistent\\notreal"); - RemoveDirectoryA("nonexistent"); -} - - -static void test_get_file_info(void) -{ - DWORD rc, rc2; - SHFILEINFOA shfi, shfi2; - SHFILEINFOW shfiw; - char notepad[MAX_PATH]; - - /* Test whether fields of SHFILEINFOA are always cleared */ - memset(&shfi, 0xcf, sizeof(shfi)); - rc=SHGetFileInfoA("", 0, &shfi, sizeof(shfi), 0); - ok(rc == 1, "SHGetFileInfoA('' | 0) should return 1, got 0x%x\n", rc); - todo_wine ok(shfi.hIcon == 0, "SHGetFileInfoA('' | 0) did not clear hIcon\n"); - todo_wine ok(shfi.szDisplayName[0] == 0, "SHGetFileInfoA('' | 0) did not clear szDisplayName[0]\n"); - todo_wine ok(shfi.szTypeName[0] == 0, "SHGetFileInfoA('' | 0) did not clear szTypeName[0]\n"); - ok(shfi.iIcon == 0xcfcfcfcf || - broken(shfi.iIcon != 0xcfcfcfcf), /* NT4 doesn't clear but sets this field */ - "SHGetFileInfoA('' | 0) should not clear iIcon\n"); - ok(shfi.dwAttributes == 0xcfcfcfcf || - broken(shfi.dwAttributes != 0xcfcfcfcf), /* NT4 doesn't clear but sets this field */ - "SHGetFileInfoA('' | 0) should not clear dwAttributes\n"); - - if (pSHGetFileInfoW) - { - HANDLE unset_icon; - /* Test whether fields of SHFILEINFOW are always cleared */ - memset(&shfiw, 0xcf, sizeof(shfiw)); - memset(&unset_icon, 0xcf, sizeof(unset_icon)); - rc=pSHGetFileInfoW(NULL, 0, &shfiw, sizeof(shfiw), 0); - ok(!rc, "SHGetFileInfoW(NULL | 0) should fail\n"); - ok(shfiw.hIcon == unset_icon, "SHGetFileInfoW(NULL | 0) should not clear hIcon\n"); - ok(shfiw.szDisplayName[0] == 0xcfcf, "SHGetFileInfoW(NULL | 0) should not clear szDisplayName[0]\n"); - ok(shfiw.szTypeName[0] == 0xcfcf, "SHGetFileInfoW(NULL | 0) should not clear szTypeName[0]\n"); - ok(shfiw.iIcon == 0xcfcfcfcf, "SHGetFileInfoW(NULL | 0) should not clear iIcon\n"); - ok(shfiw.dwAttributes == 0xcfcfcfcf, "SHGetFileInfoW(NULL | 0) should not clear dwAttributes\n"); - } - else - win_skip("SHGetFileInfoW is not available\n"); - - - /* Test some flag combinations that MSDN claims are not allowed, - * but which work anyway - */ - memset(&shfi, 0xcf, sizeof(shfi)); - rc=SHGetFileInfoA("c:\\nonexistent", FILE_ATTRIBUTE_DIRECTORY, - &shfi, sizeof(shfi), - SHGFI_ATTRIBUTES | SHGFI_USEFILEATTRIBUTES); - ok(rc == 1, "SHGetFileInfoA(c:\\nonexistent | SHGFI_ATTRIBUTES) should return 1, got 0x%x\n", rc); - if (rc) - ok(shfi.dwAttributes != 0xcfcfcfcf, "dwFileAttributes is not set\n"); - todo_wine ok(shfi.hIcon == 0, "SHGetFileInfoA(c:\\nonexistent | SHGFI_ATTRIBUTES) did not clear hIcon\n"); - todo_wine ok(shfi.szDisplayName[0] == 0, "SHGetFileInfoA(c:\\nonexistent | SHGFI_ATTRIBUTES) did not clear szDisplayName[0]\n"); - todo_wine ok(shfi.szTypeName[0] == 0, "SHGetFileInfoA(c:\\nonexistent | SHGFI_ATTRIBUTES) did not clear szTypeName[0]\n"); - ok(shfi.iIcon == 0xcfcfcfcf || - broken(shfi.iIcon != 0xcfcfcfcf), /* NT4 doesn't clear but sets this field */ - "SHGetFileInfoA(c:\\nonexistent | SHGFI_ATTRIBUTES) should not clear iIcon\n"); - - rc=SHGetFileInfoA("c:\\nonexistent", FILE_ATTRIBUTE_DIRECTORY, - &shfi, sizeof(shfi), - SHGFI_EXETYPE | SHGFI_USEFILEATTRIBUTES); - todo_wine ok(rc == 1, "SHGetFileInfoA(c:\\nonexistent | SHGFI_EXETYPE) should return 1, got 0x%x\n", rc); - - /* Test SHGFI_USEFILEATTRIBUTES support */ - strcpy(shfi.szDisplayName, "dummy"); - shfi.iIcon=0xdeadbeef; - rc=SHGetFileInfoA("c:\\nonexistent", FILE_ATTRIBUTE_DIRECTORY, - &shfi, sizeof(shfi), - SHGFI_ICONLOCATION | SHGFI_USEFILEATTRIBUTES); - ok(rc == 1, "SHGetFileInfoA(c:\\nonexistent) should return 1, got 0x%x\n", rc); - if (rc) - { - ok(strcpy(shfi.szDisplayName, "dummy") != 0, "SHGetFileInfoA(c:\\nonexistent) displayname is not set\n"); - ok(shfi.iIcon != 0xdeadbeef, "SHGetFileInfoA(c:\\nonexistent) iIcon is not set\n"); - } - - /* Wine does not have a default icon for text files, and Windows 98 fails - * if we give it an empty executable. So use notepad.exe as the test - */ - if (SearchPath(NULL, "notepad.exe", NULL, sizeof(notepad), notepad, NULL)) - { - strcpy(shfi.szDisplayName, "dummy"); - shfi.iIcon=0xdeadbeef; - rc=SHGetFileInfoA(notepad, GetFileAttributes(notepad), - &shfi, sizeof(shfi), - SHGFI_ICONLOCATION | SHGFI_USEFILEATTRIBUTES); - ok(rc == 1, "SHGetFileInfoA(%s, SHGFI_USEFILEATTRIBUTES) should return 1, got 0x%x\n", notepad, rc); - strcpy(shfi2.szDisplayName, "dummy"); - shfi2.iIcon=0xdeadbeef; - rc2=SHGetFileInfoA(notepad, 0, - &shfi2, sizeof(shfi2), - SHGFI_ICONLOCATION); - ok(rc2 == 1, "SHGetFileInfoA(%s) failed %x\n", notepad, rc2); - if (rc && rc2) - { - ok(lstrcmpi(shfi2.szDisplayName, shfi.szDisplayName) == 0, "wrong display name %s != %s\n", shfi.szDisplayName, shfi2.szDisplayName); - ok(shfi2.iIcon == shfi.iIcon, "wrong icon index %d != %d\n", shfi.iIcon, shfi2.iIcon); - } - } - - /* with a directory now */ - strcpy(shfi.szDisplayName, "dummy"); - shfi.iIcon=0xdeadbeef; - rc=SHGetFileInfoA("test4.txt", GetFileAttributes("test4.txt"), - &shfi, sizeof(shfi), - SHGFI_ICONLOCATION | SHGFI_USEFILEATTRIBUTES); - ok(rc == 1, "SHGetFileInfoA(test4.txt/, SHGFI_USEFILEATTRIBUTES) should return 1, got 0x%x\n", rc); - strcpy(shfi2.szDisplayName, "dummy"); - shfi2.iIcon=0xdeadbeef; - rc2=SHGetFileInfoA("test4.txt", 0, - &shfi2, sizeof(shfi2), - SHGFI_ICONLOCATION); - ok(rc2 == 1, "SHGetFileInfoA(test4.txt/) should return 1, got 0x%x\n", rc2); - if (rc && rc2) - { - ok(lstrcmpi(shfi2.szDisplayName, shfi.szDisplayName) == 0, "wrong display name %s != %s\n", shfi.szDisplayName, shfi2.szDisplayName); - ok(shfi2.iIcon == shfi.iIcon, "wrong icon index %d != %d\n", shfi.iIcon, shfi2.iIcon); - } - /* with drive root directory */ - strcpy(shfi.szDisplayName, "dummy"); - strcpy(shfi.szTypeName, "dummy"); - shfi.hIcon=(HICON) 0xdeadbeef; - shfi.iIcon=0xdeadbeef; - shfi.dwAttributes=0xdeadbeef; - rc=SHGetFileInfoA("c:\\", 0, &shfi, sizeof(shfi), - SHGFI_TYPENAME | SHGFI_DISPLAYNAME | SHGFI_ICON | SHGFI_SMALLICON); - ok(rc == 1, "SHGetFileInfoA(c:\\) should return 1, got 0x%x\n", rc); - ok(lstrcmp(shfi.szDisplayName, "dummy") != 0, "display name was expected to change\n"); - ok(lstrcmp(shfi.szTypeName, "dummy") != 0, "type name was expected to change\n"); - ok(shfi.hIcon != (HICON) 0xdeadbeef, "hIcon was expected to change\n"); - ok(shfi.iIcon != 0xdeadbeef, "iIcon was expected to change\n"); -} - -static void test_get_file_info_iconlist(void) -{ - /* Test retrieving a handle to the system image list, and - * what that returns for hIcon - */ - HRESULT hr; - HIMAGELIST hSysImageList; - LPITEMIDLIST pidList; - SHFILEINFOA shInfoa; - SHFILEINFOW shInfow; - - hr = SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidList); - if (FAILED(hr)) { - skip("can't get desktop pidl\n"); - return; - } - - memset(&shInfoa, 0xcf, sizeof(shInfoa)); - hSysImageList = (HIMAGELIST) SHGetFileInfoA((const char *)pidList, 0, - &shInfoa, sizeof(shInfoa), - SHGFI_SYSICONINDEX | SHGFI_SMALLICON | SHGFI_PIDL); - ok((hSysImageList != INVALID_HANDLE_VALUE) && (hSysImageList > (HIMAGELIST) 0xffff), "Can't get handle for CSIDL_DESKTOP imagelist\n"); - todo_wine ok(shInfoa.hIcon == 0, "SHGetFileInfoA(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL) did not clear hIcon\n"); - todo_wine ok(shInfoa.szTypeName[0] == 0, "SHGetFileInfoA(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL) did not clear szTypeName[0]\n"); - ok(shInfoa.iIcon != 0xcfcfcfcf, "SHGetFileInfoA(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL) should set iIcon\n"); - ok(shInfoa.dwAttributes == 0xcfcfcfcf || - shInfoa.dwAttributes == 0 || /* Vista */ - broken(shInfoa.dwAttributes != 0xcfcfcfcf), /* NT4 doesn't clear but sets this field */ - "SHGetFileInfoA(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL), unexpected dwAttributes\n"); - CloseHandle(hSysImageList); - - if (!pSHGetFileInfoW) - { - win_skip("SHGetFileInfoW is not available\n"); - ILFree(pidList); - return; - } - - memset(&shInfow, 0xcf, sizeof(shInfow)); - hSysImageList = (HIMAGELIST) pSHGetFileInfoW((const WCHAR *)pidList, 0, - &shInfow, sizeof(shInfow), - SHGFI_SYSICONINDEX | SHGFI_SMALLICON | SHGFI_PIDL); - if (!hSysImageList) - { - win_skip("SHGetFileInfoW is not implemented\n"); - return; - } - ok((hSysImageList != INVALID_HANDLE_VALUE) && (hSysImageList > (HIMAGELIST) 0xffff), "Can't get handle for CSIDL_DESKTOP imagelist\n"); - todo_wine ok(shInfow.hIcon == 0, "SHGetFileInfoW(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL) did not clear hIcon\n"); - ok(shInfow.szTypeName[0] == 0, "SHGetFileInfoW(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL) did not clear szTypeName[0]\n"); - ok(shInfow.iIcon != 0xcfcfcfcf, "SHGetFileInfoW(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL) should set iIcon\n"); - ok(shInfow.dwAttributes == 0xcfcfcfcf || - shInfoa.dwAttributes == 0, /* Vista */ - "SHGetFileInfoW(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL) unexpected dwAttributes\n"); - CloseHandle(hSysImageList); - - /* Various suposidly invalid flag testing */ - memset(&shInfow, 0xcf, sizeof(shInfow)); - hr = pSHGetFileInfoW((const WCHAR *)pidList, 0, &shInfow, sizeof(shInfow), - SHGFI_SYSICONINDEX|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_SMALLICON); - ok(hr != 0, "SHGFI_SYSICONINDEX|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_SMALLICON Failed\n"); - ok(shInfow.iIcon!=0xcfcfcfcf, "Icon Index Missing\n"); - ok(shInfow.dwAttributes==0xcfcfcfcf || - shInfoa.dwAttributes==0, /* Vista */ - "unexpected dwAttributes\n"); - - memset(&shInfow, 0xcf, sizeof(shInfow)); - hr = pSHGetFileInfoW((const WCHAR *)pidList, 0, &shInfow, sizeof(shInfow), - SHGFI_ICON|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_SMALLICON); - ok(hr != 0, " SHGFI_ICON|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_SMALLICON Failed\n"); - ok(shInfow.iIcon!=0xcfcfcfcf, "Icon Index Missing\n"); - ok(shInfow.hIcon!=(HICON)0xcfcfcfcf && shInfow.hIcon!=0,"hIcon invalid\n"); - if (shInfow.hIcon!=(HICON)0xcfcfcfcf) DestroyIcon(shInfow.hIcon); - todo_wine ok(shInfow.dwAttributes==0,"dwAttributes not set\n"); - - memset(&shInfow, 0xcf, sizeof(shInfow)); - hr = pSHGetFileInfoW((const WCHAR *)pidList, 0, &shInfow, sizeof(shInfow), - SHGFI_ICON|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_LARGEICON); - ok(hr != 0, "SHGFI_ICON|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_LARGEICON Failed\n"); - ok(shInfow.iIcon!=0xcfcfcfcf, "Icon Index Missing\n"); - ok(shInfow.hIcon!=(HICON)0xcfcfcfcf && shInfow.hIcon!=0,"hIcon invalid\n"); - if (shInfow.hIcon != (HICON)0xcfcfcfcf) DestroyIcon(shInfow.hIcon); - todo_wine ok(shInfow.dwAttributes==0,"dwAttributes not set\n"); - - memset(&shInfow, 0xcf, sizeof(shInfow)); - hr = pSHGetFileInfoW((const WCHAR *)pidList, 0, &shInfow, sizeof(shInfow), - SHGFI_SYSICONINDEX|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_LARGEICON); - ok(hr != 0, "SHGFI_SYSICONINDEX|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_LARGEICON Failed\n"); - ok(shInfow.iIcon!=0xcfcfcfcf, "Icon Index Missing\n"); - ok(shInfow.dwAttributes==0xcfcfcfcf || - shInfoa.dwAttributes==0, /* Vista */ - "unexpected dwAttributes\n"); - - memset(&shInfow, 0xcf, sizeof(shInfow)); - hr = pSHGetFileInfoW((const WCHAR *)pidList, 0, &shInfow, sizeof(shInfow), - SHGFI_OPENICON|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_SMALLICON); - ok(hr != 0, "SHGFI_OPENICON|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_SMALLICON Failed\n"); - todo_wine ok(shInfow.iIcon==0xcfcfcfcf, "Icon Index Modified\n"); - ok(shInfow.dwAttributes==0xcfcfcfcf,"dwAttributes modified\n"); - - memset(&shInfow, 0xcf, sizeof(shInfow)); - hr = pSHGetFileInfoW((const WCHAR *)pidList, 0, &shInfow, sizeof(shInfow), - SHGFI_SHELLICONSIZE|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_SMALLICON); - ok(hr != 0, "SHGFI_SHELLICONSIZE|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_SMALLICON Failed\n"); - todo_wine ok(shInfow.iIcon==0xcfcfcfcf, "Icon Index Modified\n"); - ok(shInfow.dwAttributes==0xcfcfcfcf,"dwAttributes modified\n"); - - memset(&shInfow, 0xcf, sizeof(shInfow)); - hr = pSHGetFileInfoW((const WCHAR *)pidList, 0, &shInfow, sizeof(shInfow), - SHGFI_SHELLICONSIZE|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_SMALLICON); - ok(hr != 0, "SHGFI_SHELLICONSIZE|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_SMALLICON Failed\n"); - todo_wine ok(shInfow.iIcon==0xcfcfcfcf, "Icon Index Modified\n"); - ok(shInfow.dwAttributes==0xcfcfcfcf,"dwAttributes modified\n"); - - memset(&shInfow, 0xcf, sizeof(shInfow)); - hr = pSHGetFileInfoW((const WCHAR *)pidList, 0, &shInfow, sizeof(shInfow), - SHGFI_SYSICONINDEX|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_SMALLICON| - SHGFI_ATTRIBUTES); - ok(hr != 0, "SHGFI_SYSICONINDEX|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_SMALLICON|SHGFI_ATTRIBUTES Failed\n"); - ok(shInfow.iIcon!=0xcfcfcfcf, "Icon Index Missing\n"); - ok(shInfow.dwAttributes!=0xcfcfcfcf,"dwAttributes not set\n"); - - memset(&shInfow, 0xcf, sizeof(shInfow)); - hr = pSHGetFileInfoW((const WCHAR *)pidList, 0, &shInfow, sizeof(shInfow), - SHGFI_SYSICONINDEX|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_SMALLICON| - SHGFI_EXETYPE); - todo_wine ok(hr != 0, "SHGFI_SYSICONINDEX|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_SMALLICON|SHGFI_EXETYPE Failed\n"); - ok(shInfow.iIcon!=0xcfcfcfcf, "Icon Index Missing\n"); - ok(shInfow.dwAttributes==0xcfcfcfcf || - shInfoa.dwAttributes==0, /* Vista */ - "unexpected dwAttributes\n"); - - memset(&shInfow, 0xcf, sizeof(shInfow)); - hr = pSHGetFileInfoW((const WCHAR *)pidList, 0, &shInfow, sizeof(shInfow), - SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_SMALLICON|SHGFI_EXETYPE); - todo_wine ok(hr != 0, "SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_SMALLICON|SHGFI_EXETYPE Failed\n"); - todo_wine ok(shInfow.iIcon==0xcfcfcfcf, "Icon Index Modified\n"); - ok(shInfow.dwAttributes==0xcfcfcfcf,"dwAttributes modified\n"); - - memset(&shInfow, 0xcf, sizeof(shInfow)); - hr = pSHGetFileInfoW((const WCHAR *)pidList, 0, &shInfow, sizeof(shInfow), - SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_SMALLICON|SHGFI_ATTRIBUTES); - ok(hr != 0, "SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_SMALLICON|SHGFI_ATTRIBUTES Failed\n"); - todo_wine ok(shInfow.iIcon==0xcfcfcfcf, "Icon Index Modified\n"); - ok(shInfow.dwAttributes!=0xcfcfcfcf,"dwAttributes not set\n"); - - memset(&shInfow, 0xcf, sizeof(shInfow)); - hr = pSHGetFileInfoW((const WCHAR *)pidList, 0, &shInfow, sizeof(shInfow), - SHGFI_SYSICONINDEX|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL| - SHGFI_ATTRIBUTES); - ok(hr != 0, "SHGFI_SYSICONINDEX|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_ATTRIBUTES Failed\n"); - ok(shInfow.iIcon!=0xcfcfcfcf, "Icon Index Missing\n"); - ok(shInfow.dwAttributes!=0xcfcfcfcf,"dwAttributes not set\n"); - - memset(&shInfow, 0xcf, sizeof(shInfow)); - hr = pSHGetFileInfoW((const WCHAR *)pidList, 0, &shInfow, sizeof(shInfow), - SHGFI_SYSICONINDEX|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_EXETYPE); - todo_wine ok(hr != 0, "SHGFI_SYSICONINDEX|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_EXETYPE Failed\n"); - ok(shInfow.iIcon!=0xcfcfcfcf, "Icon Index Missing\n"); - ok(shInfow.dwAttributes==0xcfcfcfcf || - shInfoa.dwAttributes==0, /* Vista */ - "unexpected dwAttributes\n"); - - memset(&shInfow, 0xcf, sizeof(shInfow)); - hr = pSHGetFileInfoW((const WCHAR *)pidList, 0, &shInfow, sizeof(shInfow), - SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_EXETYPE); - todo_wine ok(hr != 0, "SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_EXETYPE Failed\n"); - todo_wine ok(shInfow.iIcon==0xcfcfcfcf, "Icon Index Modified\n"); - ok(shInfow.dwAttributes==0xcfcfcfcf,"dwAttributes modified\n"); - - memset(&shInfow, 0xcf, sizeof(shInfow)); - hr = pSHGetFileInfoW((const WCHAR *)pidList, 0, &shInfow, sizeof(shInfow), - SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_ATTRIBUTES); - ok(hr != 0, "SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_ATTRIBUTES Failed\n"); - todo_wine ok(shInfow.iIcon==0xcfcfcfcf, "Icon Index Modified\n"); - ok(shInfow.dwAttributes!=0xcfcfcfcf,"dwAttributes not set\n"); - - ILFree(pidList); -} - - -/* - puts into the specified buffer file names with current directory. - files - string with file names, separated by null characters. Ends on a double - null characters -*/ -static void set_curr_dir_path(CHAR *buf, const CHAR* files) -{ - buf[0] = 0; - while (files[0]) - { - strcpy(buf, CURR_DIR); - buf += strlen(buf); - buf[0] = '\\'; - buf++; - strcpy(buf, files); - buf += strlen(buf) + 1; - files += strlen(files) + 1; - } - buf[0] = 0; -} - - -/* tests the FO_DELETE action */ -static void test_delete(void) -{ - SHFILEOPSTRUCTA shfo; - DWORD ret; - CHAR buf[sizeof(CURR_DIR)+sizeof("/test?.txt")+1]; - - sprintf(buf, "%s\\%s", CURR_DIR, "test?.txt"); - buf[strlen(buf) + 1] = '\0'; - - shfo.hwnd = NULL; - shfo.wFunc = FO_DELETE; - shfo.pFrom = buf; - shfo.pTo = NULL; - shfo.fFlags = FOF_FILESONLY | FOF_NOCONFIRMATION | FOF_SILENT; - shfo.hNameMappings = NULL; - shfo.lpszProgressTitle = NULL; - - ok(!SHFileOperationA(&shfo), "Deletion was not successful\n"); - ok(dir_exists("test4.txt"), "Directory should not have been removed\n"); - ok(!file_exists("test1.txt"), "File should have been removed\n"); - ok(!file_exists("test2.txt"), "File should have been removed\n"); - ok(!file_exists("test3.txt"), "File should have been removed\n"); - - ret = SHFileOperationA(&shfo); - ok(ret == ERROR_SUCCESS, "Directory exists, but is not removed, ret=%d\n", ret); - ok(dir_exists("test4.txt"), "Directory should not have been removed\n"); - - shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; - - ok(!SHFileOperationA(&shfo), "Directory is not removed\n"); - ok(!dir_exists("test4.txt"), "Directory should have been removed\n"); - - ret = SHFileOperationA(&shfo); - ok(!ret, "The requested file does not exist, ret=%d\n", ret); - - init_shfo_tests(); - sprintf(buf, "%s\\%s", CURR_DIR, "test4.txt"); - buf[strlen(buf) + 1] = '\0'; - ok(MoveFileA("test1.txt", "test4.txt\\test1.txt"), "Filling the subdirectory failed\n"); - ok(!SHFileOperationA(&shfo), "Directory is not removed\n"); - ok(!dir_exists("test4.txt"), "Directory is not removed\n"); - - init_shfo_tests(); - shfo.pFrom = "test1.txt\0test4.txt\0"; - ok(!SHFileOperationA(&shfo), "Directory and a file are not removed\n"); - ok(!file_exists("test1.txt"), "The file should have been removed\n"); - ok(!dir_exists("test4.txt"), "Directory should have been removed\n"); - ok(file_exists("test2.txt"), "This file should not have been removed\n"); - - /* FOF_FILESONLY does not delete a dir matching a wildcard */ - init_shfo_tests(); - shfo.fFlags |= FOF_FILESONLY; - shfo.pFrom = "*.txt\0"; - ok(!SHFileOperation(&shfo), "Failed to delete files\n"); - ok(!file_exists("test1.txt"), "test1.txt should have been removed\n"); - ok(!file_exists("test_5.txt"), "test_5.txt should have been removed\n"); - ok(dir_exists("test4.txt"), "test4.txt should not have been removed\n"); - - /* FOF_FILESONLY only deletes a dir if explicitly specified */ - init_shfo_tests(); - shfo.pFrom = "test_?.txt\0test4.txt\0"; - ok(!SHFileOperation(&shfo), "Failed to delete files and directory\n"); - ok(!dir_exists("test4.txt") || - broken(dir_exists("test4.txt")), /* NT4 */ - "test4.txt should have been removed\n"); - ok(!file_exists("test_5.txt"), "test_5.txt should have been removed\n"); - ok(file_exists("test1.txt"), "test1.txt should not have been removed\n"); - - /* try to delete an invalid filename */ - if (0) { - /* this crashes on win9x */ - init_shfo_tests(); - shfo.pFrom = "\0"; - shfo.fFlags &= ~FOF_FILESONLY; - shfo.fAnyOperationsAborted = FALSE; - ret = SHFileOperation(&shfo); - ok(ret == ERROR_ACCESS_DENIED, "Expected ERROR_ACCESS_DENIED, got %d\n", ret); - ok(!shfo.fAnyOperationsAborted, "Expected no aborted operations\n"); - ok(file_exists("test1.txt"), "Expected test1.txt to exist\n"); - } - - /* try an invalid function */ - init_shfo_tests(); - shfo.pFrom = "test1.txt\0"; - shfo.wFunc = 0; - ret = SHFileOperation(&shfo); - ok(ret == ERROR_INVALID_PARAMETER || - broken(ret == ERROR_SUCCESS), /* Win9x, NT4 */ - "Expected ERROR_INVALID_PARAMETER, got %d\n", ret); - ok(file_exists("test1.txt"), "Expected test1.txt to exist\n"); - - /* try an invalid list, only one null terminator */ - if (0) { - /* this crashes on win9x */ - init_shfo_tests(); - shfo.pFrom = ""; - shfo.wFunc = FO_DELETE; - ret = SHFileOperation(&shfo); - ok(ret == ERROR_ACCESS_DENIED, "Expected ERROR_ACCESS_DENIED, got %d\n", ret); - ok(file_exists("test1.txt"), "Expected test1.txt to exist\n"); - } - - /* delete a nonexistent file */ - shfo.pFrom = "nonexistent.txt\0"; - shfo.wFunc = FO_DELETE; - ret = SHFileOperation(&shfo); - todo_wine - ok(ret == 1026 || - ret == ERROR_FILE_NOT_FOUND || /* Vista */ - broken(ret == ERROR_SUCCESS), /* NT4 */ - "Expected 1026 or ERROR_FILE_NOT_FOUND, got %d\n", ret); - - /* delete a dir, and then a file inside the dir, same as - * deleting a nonexistent file - */ - if (ret != ERROR_FILE_NOT_FOUND) - { - /* Vista would throw up a dialog box that we can't suppress */ - init_shfo_tests(); - shfo.pFrom = "testdir2\0testdir2\\one.txt\0"; - ret = SHFileOperation(&shfo); - ok(ret == ERROR_PATH_NOT_FOUND || - broken(ret == ERROR_SUCCESS), /* NT4 */ - "Expected ERROR_PATH_NOT_FOUND, got %d\n", ret); - ok(!dir_exists("testdir2"), "Expected testdir2 to not exist\n"); - ok(!file_exists("testdir2\\one.txt"), "Expected testdir2\\one.txt to not exist\n"); - } - else - skip("Test would show a dialog box\n"); - - /* try the FOF_NORECURSION flag, continues deleting subdirs */ - init_shfo_tests(); - shfo.pFrom = "testdir2\0"; - shfo.fFlags |= FOF_NORECURSION; - ret = SHFileOperation(&shfo); - ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ok(!file_exists("testdir2\\one.txt"), "Expected testdir2\\one.txt to not exist\n"); - ok(!dir_exists("testdir2\\nested"), "Expected testdir2\\nested to not exist\n"); -} - -/* tests the FO_RENAME action */ -static void test_rename(void) -{ - SHFILEOPSTRUCTA shfo, shfo2; - CHAR from[5*MAX_PATH]; - CHAR to[5*MAX_PATH]; - DWORD retval; - - shfo.hwnd = NULL; - shfo.wFunc = FO_RENAME; - shfo.pFrom = from; - shfo.pTo = to; - shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; - shfo.hNameMappings = NULL; - shfo.lpszProgressTitle = NULL; - - set_curr_dir_path(from, "test1.txt\0"); - set_curr_dir_path(to, "test4.txt\0"); - retval = SHFileOperationA(&shfo); - ok(retval == ERROR_ALREADY_EXISTS || - retval == DE_FILEDESTISFLD || /* Vista */ - broken(retval == ERROR_INVALID_NAME), /* Win9x, NT4 */ - "Expected ERROR_ALREADY_EXISTS or DE_FILEDESTISFLD, got %d\n", retval); - ok(file_exists("test1.txt"), "The file is renamed\n"); - - set_curr_dir_path(from, "test3.txt\0"); - set_curr_dir_path(to, "test4.txt\\test1.txt\0"); - retval = SHFileOperationA(&shfo); - if (retval == DE_DIFFDIR) - { - /* Vista and W2K8 (broken or new behavior ?) */ - ok(!file_exists("test4.txt\\test1.txt"), "The file is renamed\n"); - } - else - { - ok(retval == ERROR_SUCCESS, "File is renamed moving to other directory\n"); - ok(file_exists("test4.txt\\test1.txt"), "The file is not renamed\n"); - } - - set_curr_dir_path(from, "test1.txt\0test2.txt\0test4.txt\0"); - set_curr_dir_path(to, "test6.txt\0test7.txt\0test8.txt\0"); - retval = SHFileOperationA(&shfo); - ok(retval == ERROR_GEN_FAILURE || - retval == DE_MANYSRC1DEST || /* Vista */ - broken(retval == ERROR_SUCCESS), /* Win9x */ - "Expected ERROR_GEN_FAILURE or DE_MANYSRC1DEST , got %d\n", retval); - ok(file_exists("test1.txt"), "The file is renamed - many files are specified\n"); - - memcpy(&shfo2, &shfo, sizeof(SHFILEOPSTRUCTA)); - shfo2.fFlags |= FOF_MULTIDESTFILES; - - set_curr_dir_path(from, "test1.txt\0test2.txt\0test4.txt\0"); - set_curr_dir_path(to, "test6.txt\0test7.txt\0test8.txt\0"); - retval = SHFileOperationA(&shfo2); - ok(retval == ERROR_GEN_FAILURE || - retval == DE_MANYSRC1DEST || /* Vista */ - broken(retval == ERROR_SUCCESS), /* Win9x */ - "Expected ERROR_GEN_FAILURE or DE_MANYSRC1DEST files, got %d\n", retval); - ok(file_exists("test1.txt"), "The file is not renamed - many files are specified\n"); - - set_curr_dir_path(from, "test1.txt\0"); - set_curr_dir_path(to, "test6.txt\0"); - retval = SHFileOperationA(&shfo); - ok(retval == ERROR_SUCCESS, "Rename file failed, retval = %d\n", retval); - ok(!file_exists("test1.txt"), "The file is not renamed\n"); - ok(file_exists("test6.txt"), "The file is not renamed\n"); - - set_curr_dir_path(from, "test6.txt\0"); - set_curr_dir_path(to, "test1.txt\0"); - retval = SHFileOperationA(&shfo); - ok(retval == ERROR_SUCCESS, "Rename file back failed, retval = %d\n", retval); - - set_curr_dir_path(from, "test4.txt\0"); - set_curr_dir_path(to, "test6.txt\0"); - retval = SHFileOperationA(&shfo); - ok(retval == ERROR_SUCCESS, "Rename dir failed, retval = %d\n", retval); - ok(!dir_exists("test4.txt"), "The dir is not renamed\n"); - ok(dir_exists("test6.txt"), "The dir is not renamed\n"); - - set_curr_dir_path(from, "test6.txt\0"); - set_curr_dir_path(to, "test4.txt\0"); - retval = SHFileOperationA(&shfo); - ok(retval == ERROR_SUCCESS, "Rename dir back failed, retval = %d\n", retval); - ok(dir_exists("test4.txt"), "The dir is not renamed\n"); - - /* try to rename more than one file to a single file */ - shfo.pFrom = "test1.txt\0test2.txt\0"; - shfo.pTo = "a.txt\0"; - retval = SHFileOperationA(&shfo); - ok(retval == ERROR_GEN_FAILURE || - retval == DE_MANYSRC1DEST || /* Vista */ - broken(retval == ERROR_SUCCESS), /* Win9x */ - "Expected ERROR_GEN_FAILURE or DE_MANYSRC1DEST, got %d\n", retval); - ok(file_exists("test1.txt"), "Expected test1.txt to exist\n"); - ok(file_exists("test2.txt"), "Expected test2.txt to exist\n"); - ok(!file_exists("a.txt"), "Expected a.txt to not exist\n"); - - /* pFrom doesn't exist */ - shfo.pFrom = "idontexist\0"; - shfo.pTo = "newfile\0"; - retval = SHFileOperationA(&shfo); - ok(retval == 1026 || - retval == ERROR_FILE_NOT_FOUND || /* Vista */ - broken(retval == ERROR_SUCCESS), /* NT4 */ - "Expected 1026 or ERROR_FILE_NOT_FOUND, got %d\n", retval); - ok(!file_exists("newfile"), "Expected newfile to not exist\n"); - - /* pTo already exist */ - shfo.pFrom = "test1.txt\0"; - shfo.pTo = "test2.txt\0"; - if (old_shell32) - shfo.fFlags |= FOF_NOCONFIRMMKDIR; - retval = SHFileOperationA(&shfo); - if (retval == ERROR_SUCCESS) - { - /* Vista and W2K8 (broken or new behavior ?) */ - createTestFile("test1.txt"); - } - else - { - ok(retval == ERROR_ALREADY_EXISTS || - broken(retval == DE_OPCANCELLED) || /* NT4 */ - broken(retval == ERROR_INVALID_NAME), /* Win9x */ - "Expected ERROR_ALREADY_EXISTS, got %d\n", retval); - } - - /* pFrom is valid, but pTo is empty */ - shfo.pFrom = "test1.txt\0"; - shfo.pTo = "\0"; - retval = SHFileOperationA(&shfo); - ok(retval == ERROR_CANCELLED || - retval == DE_DIFFDIR || /* Vista */ - broken(retval == DE_OPCANCELLED) || /* Win9x */ - broken(retval == 65652), /* NT4 */ - "Expected ERROR_CANCELLED or DE_DIFFDIR\n"); - ok(file_exists("test1.txt"), "Expected test1.txt to exist\n"); - - /* pFrom is empty */ - shfo.pFrom = "\0"; - retval = SHFileOperationA(&shfo); - ok(retval == ERROR_ACCESS_DENIED || - retval == DE_MANYSRC1DEST || /* Vista */ - broken(retval == ERROR_SUCCESS), /* Win9x */ - "Expected ERROR_ACCESS_DENIED or DE_MANYSRC1DEST, got %d\n", retval); - - /* pFrom is NULL, commented out because it crashes on nt 4.0 */ - if (0) - { - shfo.pFrom = NULL; - retval = SHFileOperationA(&shfo); - ok(retval == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", retval); - } -} - -/* tests the FO_COPY action */ -static void test_copy(void) -{ - SHFILEOPSTRUCTA shfo, shfo2; - CHAR from[5*MAX_PATH]; - CHAR to[5*MAX_PATH]; - FILEOP_FLAGS tmp_flags; - DWORD retval; - LPSTR ptr; - BOOL on_nt4 = FALSE; - BOOL ret; - - if (old_shell32) - { - win_skip("Too many differences for old shell32\n"); - return; - } - - shfo.hwnd = NULL; - shfo.wFunc = FO_COPY; - shfo.pFrom = from; - shfo.pTo = to; - shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; - shfo.hNameMappings = NULL; - shfo.lpszProgressTitle = NULL; - - set_curr_dir_path(from, "test1.txt\0test2.txt\0test4.txt\0"); - set_curr_dir_path(to, "test6.txt\0test7.txt\0test8.txt\0"); - retval = SHFileOperationA(&shfo); - if (dir_exists("test6.txt")) - { - /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(DeleteFileA("test6.txt\\test1.txt"), "The file is not copied - many files " - "are specified as a target\n"); - DeleteFileA("test6.txt\\test2.txt"); - RemoveDirectoryA("test6.txt\\test4.txt"); - RemoveDirectoryA("test6.txt"); - } - else - { - expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); - ok(!file_exists("test6.txt"), "The file is copied - many files are " - "specified as a target\n"); - } - - memcpy(&shfo2, &shfo, sizeof(SHFILEOPSTRUCTA)); - shfo2.fFlags |= FOF_MULTIDESTFILES; - - set_curr_dir_path(from, "test1.txt\0test2.txt\0test4.txt\0"); - set_curr_dir_path(to, "test6.txt\0test7.txt\0test8.txt\0"); - ok(!SHFileOperationA(&shfo2), "Can't copy many files\n"); - ok(file_exists("test6.txt"), "The file is not copied - many files are " - "specified as a target\n"); - DeleteFileA("test6.txt"); - DeleteFileA("test7.txt"); - RemoveDirectoryA("test8.txt"); - - /* number of sources do not correspond to number of targets */ - set_curr_dir_path(from, "test1.txt\0test2.txt\0test4.txt\0"); - set_curr_dir_path(to, "test6.txt\0test7.txt\0"); - retval = SHFileOperationA(&shfo2); - if (dir_exists("test6.txt")) - { - /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == DE_DESTSAMETREE, "Expected DE_DESTSAMETREE, got %d\n", retval); - ok(DeleteFileA("test6.txt\\test1.txt"), "The file is not copied - many files " - "are specified as a target\n"); - RemoveDirectoryA("test6.txt"); - ok(DeleteFileA("test7.txt\\test2.txt"), "The file is not copied - many files " - "are specified as a target\n"); - RemoveDirectoryA("test7.txt"); - } - else - { - expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); - ok(!file_exists("test6.txt"), "The file is copied - many files are " - "specified as a target\n"); - } - - set_curr_dir_path(from, "test1.txt\0"); - set_curr_dir_path(to, "test4.txt\0"); - ok(!SHFileOperationA(&shfo), "Prepare test to check how directories are copied recursively\n"); - ok(file_exists("test4.txt\\test1.txt"), "The file is copied\n"); - - set_curr_dir_path(from, "test?.txt\0"); - set_curr_dir_path(to, "testdir2\0"); - ok(!file_exists("testdir2\\test1.txt"), "The file is not copied yet\n"); - ok(!file_exists("testdir2\\test4.txt"), "The directory is not copied yet\n"); - ok(!SHFileOperationA(&shfo), "Files and directories are copied to directory\n"); - ok(file_exists("testdir2\\test1.txt"), "The file is copied\n"); - ok(file_exists("testdir2\\test4.txt"), "The directory is copied\n"); - ok(file_exists("testdir2\\test4.txt\\test1.txt"), "The file in subdirectory is copied\n"); - clean_after_shfo_tests(); - - init_shfo_tests(); - shfo.fFlags |= FOF_FILESONLY; - ok(!file_exists("testdir2\\test1.txt"), "The file is not copied yet\n"); - ok(!file_exists("testdir2\\test4.txt"), "The directory is not copied yet\n"); - ok(!SHFileOperationA(&shfo), "Files are copied to other directory\n"); - ok(file_exists("testdir2\\test1.txt"), "The file is copied\n"); - ok(!file_exists("testdir2\\test4.txt"), "The directory is copied\n"); - clean_after_shfo_tests(); - - init_shfo_tests(); - set_curr_dir_path(from, "test1.txt\0test2.txt\0"); - ok(!file_exists("testdir2\\test1.txt"), "The file is not copied yet\n"); - ok(!file_exists("testdir2\\test2.txt"), "The file is not copied yet\n"); - ok(!SHFileOperationA(&shfo), "Files are copied to other directory\n"); - ok(file_exists("testdir2\\test1.txt"), "The file is copied\n"); - ok(file_exists("testdir2\\test2.txt"), "The file is copied\n"); - clean_after_shfo_tests(); - - /* Copying multiple files with one not existing as source, fails the - entire operation in Win98/ME/2K/XP, but not in 95/NT */ - init_shfo_tests(); - tmp_flags = shfo.fFlags; - set_curr_dir_path(from, "test1.txt\0test10.txt\0test2.txt\0"); - ok(!file_exists("testdir2\\test1.txt"), "The file is not copied yet\n"); - ok(!file_exists("testdir2\\test2.txt"), "The file is not copied yet\n"); - retval = SHFileOperationA(&shfo); - if (retval == ERROR_SUCCESS) - /* Win 95/NT returns success but copies only the files up to the nonexistent source */ - ok(file_exists("testdir2\\test1.txt"), "The file is not copied\n"); - else - { - /* Failure if one source file does not exist */ - ok(retval == 1026 || /* Win 98/ME/2K/XP */ - retval == ERROR_FILE_NOT_FOUND, /* Vista and W2K8 */ - "Files are copied to other directory\n"); - ok(!file_exists("testdir2\\test1.txt"), "The file is copied\n"); - } - ok(!file_exists("testdir2\\test2.txt"), "The file is copied\n"); - shfo.fFlags = tmp_flags; - - /* copy into a nonexistent directory */ - init_shfo_tests(); - shfo.fFlags = FOF_NOCONFIRMMKDIR; - set_curr_dir_path(from, "test1.txt\0"); - set_curr_dir_path(to, "nonexistent\\notreal\\test2.txt\0"); - retval= SHFileOperation(&shfo); - ok(!retval, "Error copying into nonexistent directory\n"); - ok(file_exists("nonexistent"), "nonexistent not created\n"); - ok(file_exists("nonexistent\\notreal"), "nonexistent\\notreal not created\n"); - ok(file_exists("nonexistent\\notreal\\test2.txt"), "Directory not created\n"); - ok(!file_exists("nonexistent\\notreal\\test1.txt"), "test1.txt should not exist\n"); - - /* a relative dest directory is OK */ - clean_after_shfo_tests(); - init_shfo_tests(); - shfo.pFrom = "test1.txt\0test2.txt\0test3.txt\0"; - shfo.pTo = "testdir2\0"; - retval = SHFileOperation(&shfo); - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(file_exists("testdir2\\test1.txt"), "Expected testdir2\\test1 to exist\n"); - - /* try to overwrite an existing write protected file */ - clean_after_shfo_tests(); - init_shfo_tests(); - tmp_flags = shfo.fFlags; - shfo.pFrom = "test1.txt\0"; - shfo.pTo = "test2.txt\0"; - /* suppress the error-dialog in win9x here */ - shfo.fFlags = FOF_NOERRORUI | FOF_NOCONFIRMATION | FOF_SILENT; - ret = SetFileAttributesA(shfo.pTo, FILE_ATTRIBUTE_READONLY); - ok(ret, "Failure to set file attributes (error %x)\n", GetLastError()); - retval = CopyFileA(shfo.pFrom, shfo.pTo, FALSE); - ok(!retval && GetLastError() == ERROR_ACCESS_DENIED, "CopyFileA should have fail with ERROR_ACCESS_DENIED\n"); - retval = SHFileOperationA(&shfo); - /* Does not work on Win95, Win95B, NT4WS and NT4SRV */ - ok(!retval || broken(retval == DE_OPCANCELLED), "SHFileOperationA failed to copy (error %x)\n", retval); - /* Set back normal attributes to make the file deletion succeed */ - ret = SetFileAttributesA(shfo.pTo, FILE_ATTRIBUTE_NORMAL); - ok(ret, "Failure to set file attributes (error %x)\n", GetLastError()); - shfo.fFlags = tmp_flags; - - /* try to copy files to a file */ - clean_after_shfo_tests(); - init_shfo_tests(); - shfo.pFrom = from; - shfo.pTo = to; - /* suppress the error-dialog in win9x here */ - shfo.fFlags |= FOF_NOERRORUI; - set_curr_dir_path(from, "test1.txt\0test2.txt\0"); - set_curr_dir_path(to, "test3.txt\0"); - retval = SHFileOperation(&shfo); - if (retval == DE_FLDDESTISFILE || /* Vista and W2K8 */ - retval == DE_INVALIDFILES) /* Win7 */ - { - /* Most likely new behavior */ - ok(!shfo.fAnyOperationsAborted, "Didn't expect aborted operations\n"); - } - else - { - expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); - ok(shfo.fAnyOperationsAborted, "Expected aborted operations\n"); - } - ok(!file_exists("test3.txt\\test2.txt"), "Expected test3.txt\\test2.txt to not exist\n"); - - /* try to copy many files to nonexistent directory */ - DeleteFile(to); - shfo.fFlags &= ~FOF_NOERRORUI; - shfo.fAnyOperationsAborted = FALSE; - retval = SHFileOperation(&shfo); - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(DeleteFile("test3.txt\\test1.txt"), "Expected test3.txt\\test1.txt to exist\n"); - ok(DeleteFile("test3.txt\\test2.txt"), "Expected test3.txt\\test1.txt to exist\n"); - ok(RemoveDirectory(to), "Expected test3.txt to exist\n"); - - /* send in FOF_MULTIDESTFILES with too many destination files */ - init_shfo_tests(); - shfo.pFrom = "test1.txt\0test2.txt\0test3.txt\0"; - shfo.pTo = "testdir2\\a.txt\0testdir2\\b.txt\0testdir2\\c.txt\0testdir2\\d.txt\0"; - shfo.fFlags |= FOF_NOERRORUI | FOF_MULTIDESTFILES; - retval = SHFileOperation(&shfo); - if (dir_exists("testdir2\\a.txt")) - { - /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(DeleteFile("testdir2\\a.txt\\test1.txt"), "Expected testdir2\\a.txt\\test1.txt to exist\n"); - RemoveDirectory("testdir2\\a.txt"); - ok(DeleteFile("testdir2\\b.txt\\test2.txt"), "Expected testdir2\\b.txt\\test2.txt to exist\n"); - RemoveDirectory("testdir2\\b.txt"); - ok(DeleteFile("testdir2\\c.txt\\test3.txt"), "Expected testdir2\\c.txt\\test3.txt to exist\n"); - RemoveDirectory("testdir2\\c.txt"); - ok(!file_exists("testdir2\\d.txt"), "Expected testdir2\\d.txt to not exist\n"); - } - else - { - expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); - ok(shfo.fAnyOperationsAborted || - broken(!shfo.fAnyOperationsAborted), /* NT4 */ - "Expected aborted operations\n"); - ok(!file_exists("testdir2\\a.txt"), "Expected testdir2\\a.txt to not exist\n"); - } - - /* send in FOF_MULTIDESTFILES with too many destination files */ - shfo.pFrom = "test1.txt\0test2.txt\0test3.txt\0"; - shfo.pTo = "e.txt\0f.txt\0"; - shfo.fAnyOperationsAborted = FALSE; - retval = SHFileOperation(&shfo); - if (dir_exists("e.txt")) - { - /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == DE_SAMEFILE, "Expected DE_SAMEFILE, got %d\n", retval); - ok(DeleteFile("e.txt\\test1.txt"), "Expected e.txt\\test1.txt to exist\n"); - RemoveDirectory("e.txt"); - ok(DeleteFile("f.txt\\test2.txt"), "Expected f.txt\\test2.txt to exist\n"); - RemoveDirectory("f.txt"); - } - else - { - expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); - ok(shfo.fAnyOperationsAborted || - broken(!shfo.fAnyOperationsAborted), /* NT4 */ - "Expected aborted operations\n"); - ok(!file_exists("e.txt"), "Expected e.txt to not exist\n"); - } - - /* use FOF_MULTIDESTFILES with files and a source directory */ - shfo.pFrom = "test1.txt\0test2.txt\0test4.txt\0"; - shfo.pTo = "testdir2\\a.txt\0testdir2\\b.txt\0testdir2\\c.txt\0"; - shfo.fAnyOperationsAborted = FALSE; - retval = SHFileOperation(&shfo); - ok(retval == ERROR_SUCCESS || - broken(retval == 0x100a1), /* WinMe */ - "Expected ERROR_SUCCESS, got %d\n", retval); - ok(DeleteFile("testdir2\\a.txt"), "Expected testdir2\\a.txt to exist\n"); - ok(DeleteFile("testdir2\\b.txt"), "Expected testdir2\\b.txt to exist\n"); - if (retval == ERROR_SUCCESS) - ok(RemoveDirectory("testdir2\\c.txt"), "Expected testdir2\\c.txt to exist\n"); - - /* try many dest files without FOF_MULTIDESTFILES flag */ - shfo.pFrom = "test1.txt\0test2.txt\0test3.txt\0"; - shfo.pTo = "a.txt\0b.txt\0c.txt\0"; - shfo.fAnyOperationsAborted = FALSE; - shfo.fFlags &= ~FOF_MULTIDESTFILES; - retval = SHFileOperation(&shfo); - if (dir_exists("a.txt")) - { - /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(DeleteFile("a.txt\\test1.txt"), "Expected a.txt\\test1.txt to exist\n"); - ok(DeleteFile("a.txt\\test2.txt"), "Expected a.txt\\test2.txt to exist\n"); - ok(DeleteFile("a.txt\\test3.txt"), "Expected a.txt\\test3.txt to exist\n"); - RemoveDirectory("a.txt"); - } - else - { - expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); - ok(!file_exists("a.txt"), "Expected a.txt to not exist\n"); - } - - /* try a glob */ - shfo.pFrom = "test?.txt\0"; - shfo.pTo = "testdir2\0"; - shfo.fFlags &= ~FOF_MULTIDESTFILES; - retval = SHFileOperation(&shfo); - ok(retval == ERROR_SUCCESS || - broken(retval == 0x100a1), /* WinMe */ - "Expected ERROR_SUCCESS, got %d\n", retval); - ok(file_exists("testdir2\\test1.txt"), "Expected testdir2\\test1.txt to exist\n"); - - /* try a glob with FOF_FILESONLY */ - clean_after_shfo_tests(); - init_shfo_tests(); - shfo.pFrom = "test?.txt\0"; - shfo.fFlags |= FOF_FILESONLY; - retval = SHFileOperation(&shfo); - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(file_exists("testdir2\\test1.txt"), "Expected testdir2\\test1.txt to exist\n"); - ok(!dir_exists("testdir2\\test4.txt"), "Expected testdir2\\test4.txt to not exist\n"); - - /* try a glob with FOF_MULTIDESTFILES and the same number - * of dest files that we would expect - */ - clean_after_shfo_tests(); - init_shfo_tests(); - shfo.pTo = "testdir2\\a.txt\0testdir2\\b.txt\0testdir2\\c.txt\0testdir2\\d.txt\0"; - shfo.fFlags &= ~FOF_FILESONLY; - shfo.fFlags |= FOF_MULTIDESTFILES; - retval = SHFileOperation(&shfo); - if (dir_exists("testdir2\\a.txt")) - { - /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(DeleteFile("testdir2\\a.txt\\test1.txt"), "Expected testdir2\\a.txt\\test1.txt to exist\n"); - ok(DeleteFile("testdir2\\a.txt\\test2.txt"), "Expected testdir2\\a.txt\\test2.txt to exist\n"); - ok(DeleteFile("testdir2\\a.txt\\test3.txt"), "Expected testdir2\\a.txt\\test3.txt to exist\n"); - ok(RemoveDirectory("testdir2\\a.txt\\test4.txt"), "Expected testdir2\\a.txt\\test4.txt to exist\n"); - RemoveDirectory("testdir2\\a.txt"); - } - else - { - expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); - ok(shfo.fAnyOperationsAborted || - broken(!shfo.fAnyOperationsAborted), /* NT4 */ - "Expected aborted operations\n"); - ok(!file_exists("testdir2\\a.txt"), "Expected testdir2\\test1.txt to not exist\n"); - } - ok(!RemoveDirectory("b.txt"), "b.txt should not exist\n"); - - /* copy one file to two others, second is ignored */ - clean_after_shfo_tests(); - init_shfo_tests(); - shfo.pFrom = "test1.txt\0"; - shfo.pTo = "b.txt\0c.txt\0"; - shfo.fAnyOperationsAborted = FALSE; - retval = SHFileOperation(&shfo); - if (retval == DE_OPCANCELLED) - { - /* NT4 fails and doesn't copy any files */ - ok(!file_exists("b.txt"), "Expected b.txt to not exist\n"); - /* Needed to skip some tests */ - win_skip("Skipping some tests on NT4\n"); - on_nt4 = TRUE; - } - else - { - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(DeleteFile("b.txt"), "Expected b.txt to exist\n"); - } - ok(!DeleteFile("c.txt"), "Expected c.txt to not exist\n"); - - /* copy two file to three others, all fail */ - shfo.pFrom = "test1.txt\0test2.txt\0"; - shfo.pTo = "b.txt\0c.txt\0d.txt\0"; - retval = SHFileOperation(&shfo); - if (dir_exists("b.txt")) - { - /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(DeleteFile("b.txt\\test1.txt"), "Expected b.txt\\test1.txt to exist\n"); - RemoveDirectory("b.txt"); - ok(DeleteFile("c.txt\\test2.txt"), "Expected c.txt\\test2.txt to exist\n"); - RemoveDirectory("c.txt"); - } - else - { - expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); - ok(shfo.fAnyOperationsAborted || - broken(!shfo.fAnyOperationsAborted), /* NT4 */ - "Expected aborted operations\n"); - ok(!DeleteFile("b.txt"), "Expected b.txt to not exist\n"); - } - - /* copy one file and one directory to three others */ - shfo.pFrom = "test1.txt\0test4.txt\0"; - shfo.pTo = "b.txt\0c.txt\0d.txt\0"; - shfo.fAnyOperationsAborted = FALSE; - retval = SHFileOperation(&shfo); - if (dir_exists("b.txt")) - { - /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(DeleteFile("b.txt\\test1.txt"), "Expected b.txt\\test1.txt to exist\n"); - RemoveDirectory("b.txt"); - ok(RemoveDirectory("c.txt\\test4.txt"), "Expected c.txt\\test4.txt to exist\n"); - RemoveDirectory("c.txt"); - } - else - { - expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); - ok(shfo.fAnyOperationsAborted || - broken(!shfo.fAnyOperationsAborted), /* NT4 */ - "Expected aborted operations\n"); - ok(!DeleteFile("b.txt"), "Expected b.txt to not exist\n"); - ok(!DeleteFile("c.txt"), "Expected c.txt to not exist\n"); - } - - /* copy a directory with a file beneath it, plus some files */ - createTestFile("test4.txt\\a.txt"); - shfo.pFrom = "test4.txt\0test1.txt\0"; - shfo.pTo = "testdir2\0"; - shfo.fFlags &= ~FOF_MULTIDESTFILES; - shfo.fAnyOperationsAborted = FALSE; - retval = SHFileOperation(&shfo); - ok(retval == ERROR_SUCCESS || - broken(retval == 0x100a1), /* WinMe */ - "Expected ERROR_SUCCESS, got %d\n", retval); - if (retval == ERROR_SUCCESS) - { - ok(DeleteFile("testdir2\\test1.txt"), "Expected testdir2\\test1.txt to exist\n"); - ok(DeleteFile("testdir2\\test4.txt\\a.txt"), "Expected a.txt to exist\n"); - ok(RemoveDirectory("testdir2\\test4.txt"), "Expected testdir2\\test4.txt to exist\n"); - } - - /* copy one directory and a file in that dir to another dir */ - shfo.pFrom = "test4.txt\0test4.txt\\a.txt\0"; - shfo.pTo = "testdir2\0"; - retval = SHFileOperation(&shfo); - ok(retval == ERROR_SUCCESS || - broken(retval == 0x100a1), /* WinMe */ - "Expected ERROR_SUCCESS, got %d\n", retval); - if (retval == ERROR_SUCCESS) - { - ok(DeleteFile("testdir2\\test4.txt\\a.txt"), "Expected a.txt to exist\n"); - ok(DeleteFile("testdir2\\a.txt"), "Expected testdir2\\a.txt to exist\n"); - } - - /* copy a file in a directory first, and then the directory to a nonexistent dir */ - shfo.pFrom = "test4.txt\\a.txt\0test4.txt\0"; - shfo.pTo = "nonexistent\0"; - retval = SHFileOperation(&shfo); - if (dir_exists("nonexistent")) - { - /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(DeleteFile("nonexistent\\test4.txt\\a.txt"), "Expected nonexistent\\test4.txt\\a.txt to exist\n"); - RemoveDirectory("nonexistent\\test4.txt"); - ok(DeleteFile("nonexistent\\a.txt"), "Expected nonexistent\\a.txt to exist\n"); - RemoveDirectory("nonexistent"); - } - else - { - expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); - ok(shfo.fAnyOperationsAborted || - broken(!shfo.fAnyOperationsAborted), /* NT4 */ - "Expected aborted operations\n"); - ok(!file_exists("nonexistent\\test4.txt"), "Expected nonexistent\\test4.txt to not exist\n"); - } - DeleteFile("test4.txt\\a.txt"); - - /* destination is same as source file */ - shfo.pFrom = "test1.txt\0test2.txt\0test3.txt\0"; - shfo.pTo = "b.txt\0test2.txt\0c.txt\0"; - shfo.fAnyOperationsAborted = FALSE; - shfo.fFlags = FOF_NOERRORUI | FOF_MULTIDESTFILES; - retval = SHFileOperation(&shfo); - if (retval == DE_OPCANCELLED) - { - /* NT4 fails and doesn't copy any files */ - ok(!file_exists("b.txt"), "Expected b.txt to not exist\n"); - } - else - { - ok(retval == DE_SAMEFILE, "Expected DE_SAMEFILE, got %d\n", retval); - ok(DeleteFile("b.txt"), "Expected b.txt to exist\n"); - } - ok(!shfo.fAnyOperationsAborted, "Expected no operations to be aborted\n"); - ok(!file_exists("c.txt"), "Expected c.txt to not exist\n"); - - /* destination is same as source directory */ - shfo.pFrom = "test1.txt\0test4.txt\0test3.txt\0"; - shfo.pTo = "b.txt\0test4.txt\0c.txt\0"; - shfo.fAnyOperationsAborted = FALSE; - retval = SHFileOperation(&shfo); - if (retval == DE_OPCANCELLED) - { - /* NT4 fails and doesn't copy any files */ - ok(!file_exists("b.txt"), "Expected b.txt to not exist\n"); - } - else - { - ok(retval == ERROR_SUCCESS || - retval == DE_DESTSAMETREE, /* Vista */ - "Expected ERROR_SUCCESS or DE_DESTSAMETREE, got %d\n", retval); - ok(DeleteFile("b.txt"), "Expected b.txt to exist\n"); - } - ok(!file_exists("c.txt"), "Expected c.txt to not exist\n"); - - /* copy a directory into itself, error displayed in UI */ - shfo.pFrom = "test4.txt\0"; - shfo.pTo = "test4.txt\\newdir\0"; - shfo.fFlags &= ~FOF_MULTIDESTFILES; - shfo.fAnyOperationsAborted = FALSE; - retval = SHFileOperation(&shfo); - ok(retval == ERROR_SUCCESS || - retval == DE_DESTSUBTREE, /* Vista */ - "Expected ERROR_SUCCESS or DE_DESTSUBTREE, got %d\n", retval); - ok(!RemoveDirectory("test4.txt\\newdir"), "Expected test4.txt\\newdir to not exist\n"); - - /* copy a directory to itself, error displayed in UI */ - shfo.pFrom = "test4.txt\0"; - shfo.pTo = "test4.txt\0"; - shfo.fAnyOperationsAborted = FALSE; - retval = SHFileOperation(&shfo); - ok(retval == ERROR_SUCCESS || - retval == DE_DESTSUBTREE, /* Vista */ - "Expected ERROR_SUCCESS or DE_DESTSUBTREE, got %d\n", retval); - - /* copy a file into a directory, and the directory into itself */ - shfo.pFrom = "test1.txt\0test4.txt\0"; - shfo.pTo = "test4.txt\0"; - shfo.fAnyOperationsAborted = FALSE; - shfo.fFlags |= FOF_NOCONFIRMATION; - retval = SHFileOperation(&shfo); - ok(retval == ERROR_SUCCESS || - retval == DE_DESTSUBTREE, /* Vista */ - "Expected ERROR_SUCCESS or DE_DESTSUBTREE, got %d\n", retval); - ok(DeleteFile("test4.txt\\test1.txt"), "Expected test4.txt\\test1.txt to exist\n"); - - /* copy a file to a file, and the directory into itself */ - shfo.pFrom = "test1.txt\0test4.txt\0"; - shfo.pTo = "test4.txt\\a.txt\0"; - shfo.fAnyOperationsAborted = FALSE; - retval = SHFileOperation(&shfo); - if (dir_exists("test4.txt\\a.txt")) - { - /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == DE_DESTSUBTREE, "Expected DE_DESTSUBTREE, got %d\n", retval); - ok(DeleteFile("test4.txt\\a.txt\\test1.txt"), "Expected test4.txt\\a.txt\\test1.txt to exist\n"); - RemoveDirectory("test4.txt\\a.txt"); - } - else - { - expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); - ok(!file_exists("test4.txt\\a.txt"), "Expected test4.txt\\a.txt to not exist\n"); - } - - /* copy a nonexistent file to a nonexistent directory */ - shfo.pFrom = "e.txt\0"; - shfo.pTo = "nonexistent\0"; - shfo.fAnyOperationsAborted = FALSE; - retval = SHFileOperation(&shfo); - ok(retval == 1026 || - retval == ERROR_FILE_NOT_FOUND || /* Vista */ - broken(retval == ERROR_SUCCESS), /* NT4 */ - "Expected 1026 or ERROR_FILE_NOT_FOUND, got %d\n", retval); - ok(!file_exists("nonexistent\\e.txt"), "Expected nonexistent\\e.txt to not exist\n"); - ok(!file_exists("nonexistent"), "Expected nonexistent to not exist\n"); - - /* Overwrite tests */ - clean_after_shfo_tests(); - init_shfo_tests(); - if (!on_nt4) - { - /* NT4 would throw up some dialog boxes and doesn't copy files that are needed - * in subsequent tests. - */ - shfo.fFlags = FOF_NOCONFIRMATION; - shfo.pFrom = "test1.txt\0"; - shfo.pTo = "test2.txt\0"; - shfo.fAnyOperationsAborted = FALSE; - /* without FOF_NOCONFIRMATION the confirmation is Yes/No */ - retval = SHFileOperation(&shfo); - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(file_has_content("test2.txt", "test1.txt\n"), "The file was not copied\n"); - - shfo.pFrom = "test3.txt\0test1.txt\0"; - shfo.pTo = "test2.txt\0one.txt\0"; - shfo.fFlags = FOF_NOCONFIRMATION | FOF_MULTIDESTFILES; - /* without FOF_NOCONFIRMATION the confirmation is Yes/Yes to All/No/Cancel */ - retval = SHFileOperation(&shfo); - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(file_has_content("test2.txt", "test3.txt\n"), "The file was not copied\n"); - - shfo.pFrom = "one.txt\0"; - shfo.pTo = "testdir2\0"; - shfo.fFlags = FOF_NOCONFIRMATION; - /* without FOF_NOCONFIRMATION the confirmation is Yes/No */ - retval = SHFileOperation(&shfo); - ok(retval == 0, "Expected 0, got %d\n", retval); - ok(file_has_content("testdir2\\one.txt", "test1.txt\n"), "The file was not copied\n"); - } - - createTestFile("test4.txt\\test1.txt"); - shfo.pFrom = "test4.txt\0"; - shfo.pTo = "testdir2\0"; - /* WinMe needs FOF_NOERRORUI */ - shfo.fFlags = FOF_NOCONFIRMATION | FOF_NOERRORUI; - retval = SHFileOperation(&shfo); - ok(retval == ERROR_SUCCESS || - broken(retval == 0x100a1), /* WinMe */ - "Expected ERROR_SUCCESS, got %d\n", retval); - shfo.fFlags = FOF_NOCONFIRMATION; - if (ERROR_SUCCESS) - { - createTestFile("test4.txt\\.\\test1.txt"); /* modify the content of the file */ - /* without FOF_NOCONFIRMATION the confirmation is "This folder already contains a folder named ..." */ - retval = SHFileOperation(&shfo); - ok(retval == 0, "Expected 0, got %d\n", retval); - ok(file_has_content("testdir2\\test4.txt\\test1.txt", "test4.txt\\.\\test1.txt\n"), "The file was not copied\n"); - } - - createTestFile("one.txt"); - - /* pFrom contains bogus 2nd name longer than MAX_PATH */ - memset(from, 'a', MAX_PATH*2); - memset(from+MAX_PATH*2, 0, 2); - lstrcpyA(from, "one.txt"); - shfo.pFrom = from; - shfo.pTo = "two.txt\0"; - shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; - retval = SHFileOperation(&shfo); - ok(retval == 1148 || retval == 1026 || - retval == ERROR_ACCESS_DENIED || /* win2k */ - retval == DE_INVALIDFILES, /* Vista */ - "Unexpected return value, got %d\n", retval); - ok(DeleteFileA("one.txt"), "Expected file to exist\n"); - if (dir_exists("two.txt")) - /* Vista and W2K8 (broken or new behavior ?) */ - ok(RemoveDirectory("two.txt"), "Expected two.txt to exist\n"); - else - ok(!DeleteFileA("two.txt"), "Expected file to not exist\n"); - - createTestFile("one.txt"); - - /* pTo contains bogus 2nd name longer than MAX_PATH */ - memset(to, 'a', MAX_PATH*2); - memset(to+MAX_PATH*2, 0, 2); - lstrcpyA(to, "two.txt"); - shfo.pFrom = "one.txt\0"; - shfo.pTo = to; - shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; - retval = SHFileOperation(&shfo); - if (retval == DE_OPCANCELLED) - { - /* NT4 fails and doesn't copy any files */ - ok(!file_exists("two.txt"), "Expected two.txt to not exist\n"); - } - else - { - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(DeleteFileA("two.txt"), "Expected file to exist\n"); - } - ok(DeleteFileA("one.txt"), "Expected file to exist\n"); - - createTestFile("one.txt"); - - /* no FOF_MULTIDESTFILES, two files in pTo */ - shfo.pFrom = "one.txt\0"; - shfo.pTo = "two.txt\0three.txt\0"; - shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; - retval = SHFileOperation(&shfo); - if (retval == DE_OPCANCELLED) - { - /* NT4 fails and doesn't copy any files */ - ok(!file_exists("two.txt"), "Expected two.txt to not exist\n"); - } - else - { - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(DeleteFileA("two.txt"), "Expected file to exist\n"); - } - ok(DeleteFileA("one.txt"), "Expected file to exist\n"); - - createTestFile("one.txt"); - - /* both pFrom and pTo contain bogus 2nd names longer than MAX_PATH */ - memset(from, 'a', MAX_PATH*2); - memset(from+MAX_PATH*2, 0, 2); - memset(to, 'a', MAX_PATH*2); - memset(to+MAX_PATH*2, 0, 2); - lstrcpyA(from, "one.txt"); - lstrcpyA(to, "two.txt"); - shfo.pFrom = from; - shfo.pTo = to; - shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; - retval = SHFileOperation(&shfo); - ok(retval == 1148 || retval == 1026 || - retval == ERROR_ACCESS_DENIED || /* win2k */ - retval == DE_INVALIDFILES, /* Vista */ - "Unexpected return value, got %d\n", retval); - ok(DeleteFileA("one.txt"), "Expected file to exist\n"); - if (dir_exists("two.txt")) - /* Vista and W2K8 (broken or new behavior ?) */ - ok(RemoveDirectory("two.txt"), "Expected two.txt to exist\n"); - else - ok(!DeleteFileA("two.txt"), "Expected file to not exist\n"); - - createTestFile("one.txt"); - - /* pTo contains bogus 2nd name longer than MAX_PATH, FOF_MULTIDESTFILES */ - memset(to, 'a', MAX_PATH*2); - memset(to+MAX_PATH*2, 0, 2); - lstrcpyA(to, "two.txt"); - shfo.pFrom = "one.txt\0"; - shfo.pTo = to; - shfo.fFlags = FOF_MULTIDESTFILES | FOF_NOCONFIRMATION | - FOF_SILENT | FOF_NOERRORUI; - retval = SHFileOperation(&shfo); - if (retval == DE_OPCANCELLED) - { - /* NT4 fails and doesn't copy any files */ - ok(!file_exists("two.txt"), "Expected two.txt to not exist\n"); - } - else - { - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(DeleteFileA("two.txt"), "Expected file to exist\n"); - } - ok(DeleteFileA("one.txt"), "Expected file to exist\n"); - - createTestFile("one.txt"); - createTestFile("two.txt"); - - /* pTo contains bogus 2nd name longer than MAX_PATH, - * multiple source files, - * dest directory does not exist - */ - memset(to, 'a', 2 * MAX_PATH); - memset(to+MAX_PATH*2, 0, 2); - lstrcpyA(to, "threedir"); - shfo.pFrom = "one.txt\0two.txt\0"; - shfo.pTo = to; - shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; - retval = SHFileOperation(&shfo); - if (dir_exists("threedir")) - { - /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(DeleteFileA("threedir\\one.txt"), "Expected file to exist\n"); - ok(DeleteFileA("threedir\\two.txt"), "Expected file to exist\n"); - ok(RemoveDirectoryA("threedir"), "Expected dir to exist\n"); - } - else - { - expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); - ok(!DeleteFileA("threedir\\one.txt"), "Expected file to not exist\n"); - ok(!DeleteFileA("threedir\\two.txt"), "Expected file to not exist\n"); - ok(!DeleteFileA("threedir"), "Expected file to not exist\n"); - ok(!RemoveDirectoryA("threedir"), "Expected dir to not exist\n"); - } - ok(DeleteFileA("one.txt"), "Expected file to exist\n"); - ok(DeleteFileA("two.txt"), "Expected file to exist\n"); - - createTestFile("one.txt"); - createTestFile("two.txt"); - CreateDirectoryA("threedir", NULL); - - /* pTo contains bogus 2nd name longer than MAX_PATH, - * multiple source files, - * dest directory does exist - */ - memset(to, 'a', 2 * MAX_PATH); - memset(to+MAX_PATH*2, 0, 2); - lstrcpyA(to, "threedir"); - shfo.pFrom = "one.txt\0two.txt\0"; - shfo.pTo = to; - shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; - retval = SHFileOperation(&shfo); - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(DeleteFileA("threedir\\one.txt"), "Expected file to exist\n"); - ok(DeleteFileA("threedir\\two.txt"), "Expected file to exist\n"); - ok(DeleteFileA("one.txt"), "Expected file to exist\n"); - ok(DeleteFileA("two.txt"), "Expected file to exist\n"); - ok(RemoveDirectoryA("threedir"), "Expected dir to exist\n"); - - if (0) { - /* this crashes on win9x */ - createTestFile("one.txt"); - createTestFile("two.txt"); - - /* pTo contains bogus 2nd name longer than MAX_PATH, - * multiple source files, FOF_MULTIDESTFILES - * dest dir does not exist - */ - - memset(to, 'a', 2 * MAX_PATH); - memset(to+MAX_PATH*2, 0, 2); - lstrcpyA(to, "threedir"); - shfo.pFrom = "one.txt\0two.txt\0"; - shfo.pTo = to; - shfo.fFlags = FOF_MULTIDESTFILES | FOF_NOCONFIRMATION | - FOF_SILENT | FOF_NOERRORUI; - retval = SHFileOperation(&shfo); - ok(retval == ERROR_CANCELLED || - retval == ERROR_SUCCESS, /* win2k3 */ - "Expected ERROR_CANCELLED or ERROR_SUCCESS, got %d\n", retval); - ok(!DeleteFileA("threedir\\one.txt"), "Expected file to not exist\n"); - ok(!DeleteFileA("threedir\\two.txt"), "Expected file to not exist\n"); - ok(DeleteFileA("one.txt"), "Expected file to exist\n"); - ok(DeleteFileA("two.txt"), "Expected file to exist\n"); - ok(!RemoveDirectoryA("threedir"), "Expected dir to not exist\n"); - - /* file exists in win2k */ - DeleteFileA("threedir"); - } - - - createTestFile("one.txt"); - createTestFile("two.txt"); - CreateDirectoryA("threedir", NULL); - - /* pTo contains bogus 2nd name longer than MAX_PATH, - * multiple source files, FOF_MULTIDESTFILES - * dest dir does exist - */ - memset(to, 'a', 2 * MAX_PATH); - memset(to+MAX_PATH*2, 0, 2); - lstrcpyA(to, "threedir"); - ptr = to + lstrlenA(to) + 1; - lstrcpyA(ptr, "fourdir"); - shfo.pFrom = "one.txt\0two.txt\0"; - shfo.pTo = to; - shfo.fFlags = FOF_MULTIDESTFILES | FOF_NOCONFIRMATION | - FOF_SILENT | FOF_NOERRORUI; - retval = SHFileOperation(&shfo); - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(DeleteFileA("one.txt"), "Expected file to exist\n"); - ok(DeleteFileA("two.txt"), "Expected file to exist\n"); - ok(DeleteFileA("threedir\\one.txt"), "Expected file to exist\n"); - if (dir_exists("fourdir")) - { - /* Vista and W2K8 (broken or new behavior ?) */ - ok(!DeleteFileA("threedir\\two.txt"), "Expected file to not exist\n"); - ok(DeleteFileA("fourdir\\two.txt"), "Expected file to exist\n"); - RemoveDirectoryA("fourdir"); - } - else - { - ok(DeleteFileA("threedir\\two.txt"), "Expected file to exist\n"); - ok(!DeleteFileA("fourdir"), "Expected file to not exist\n"); - ok(!RemoveDirectoryA("fourdir"), "Expected dir to not exist\n"); - } - ok(RemoveDirectoryA("threedir"), "Expected dir to exist\n"); - - createTestFile("one.txt"); - createTestFile("two.txt"); - CreateDirectoryA("threedir", NULL); - - /* multiple source files, FOF_MULTIDESTFILES - * multiple dest files, but first dest dir exists - * num files in lists is equal - */ - shfo.pFrom = "one.txt\0two.txt\0"; - shfo.pTo = "threedir\0fourdir\0"; - shfo.fFlags = FOF_MULTIDESTFILES | FOF_NOCONFIRMATION | - FOF_SILENT | FOF_NOERRORUI; - retval = SHFileOperation(&shfo); - ok(retval == ERROR_CANCELLED || - retval == DE_FILEDESTISFLD || /* Vista */ - broken(retval == DE_OPCANCELLED), /* Win9x, NT4 */ - "Expected ERROR_CANCELLED or DE_FILEDESTISFLD. got %d\n", retval); - if (file_exists("threedir\\threedir")) - { - /* NT4 */ - ok(DeleteFileA("threedir\\threedir"), "Expected file to exist\n"); - } - ok(!DeleteFileA("threedir\\one.txt"), "Expected file to not exist\n"); - ok(!DeleteFileA("threedir\\two.txt"), "Expected file to not exist\n"); - ok(DeleteFileA("one.txt"), "Expected file to exist\n"); - ok(DeleteFileA("two.txt"), "Expected file to exist\n"); - ok(RemoveDirectoryA("threedir"), "Expected dir to exist\n"); - ok(!DeleteFileA("fourdir"), "Expected file to not exist\n"); - ok(!RemoveDirectoryA("fourdir"), "Expected dir to not exist\n"); - - createTestFile("one.txt"); - createTestFile("two.txt"); - CreateDirectoryA("threedir", NULL); - - /* multiple source files, FOF_MULTIDESTFILES - * multiple dest files, but first dest dir exists - * num files in lists is not equal - */ - shfo.pFrom = "one.txt\0two.txt\0"; - shfo.pTo = "threedir\0fourdir\0five\0"; - shfo.fFlags = FOF_MULTIDESTFILES | FOF_NOCONFIRMATION | - FOF_SILENT | FOF_NOERRORUI; - retval = SHFileOperation(&shfo); - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(DeleteFileA("one.txt"), "Expected file to exist\n"); - ok(DeleteFileA("two.txt"), "Expected file to exist\n"); - ok(DeleteFileA("threedir\\one.txt"), "Expected file to exist\n"); - if (dir_exists("fourdir")) - { - /* Vista and W2K8 (broken or new behavior ?) */ - ok(!DeleteFileA("threedir\\two.txt"), "Expected file to not exist\n"); - ok(DeleteFileA("fourdir\\two.txt"), "Expected file to exist\n"); - RemoveDirectoryA("fourdir"); - } - else - { - ok(DeleteFileA("threedir\\two.txt"), "Expected file to exist\n"); - ok(!DeleteFileA("fourdir"), "Expected file to not exist\n"); - ok(!RemoveDirectoryA("fourdir"), "Expected dir to not exist\n"); - } - ok(RemoveDirectoryA("threedir"), "Expected dir to exist\n"); - ok(!DeleteFileA("five"), "Expected file to not exist\n"); - ok(!RemoveDirectoryA("five"), "Expected dir to not exist\n"); - - createTestFile("aa.txt"); - createTestFile("ab.txt"); - CreateDirectoryA("one", NULL); - CreateDirectoryA("two", NULL); - - /* pFrom has a glob, pTo has more than one dest */ - shfo.pFrom = "a*.txt\0"; - shfo.pTo = "one\0two\0"; - shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; - retval = SHFileOperation(&shfo); - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(DeleteFileA("one\\aa.txt"), "Expected file to exist\n"); - ok(DeleteFileA("one\\ab.txt"), "Expected file to exist\n"); - ok(!DeleteFileA("two\\aa.txt"), "Expected file to not exist\n"); - ok(!DeleteFileA("two\\ab.txt"), "Expected file to not exist\n"); - ok(DeleteFileA("aa.txt"), "Expected file to exist\n"); - ok(DeleteFileA("ab.txt"), "Expected file to exist\n"); - ok(RemoveDirectoryA("one"), "Expected dir to exist\n"); - ok(RemoveDirectoryA("two"), "Expected dir to exist\n"); - - /* pTo is an empty string */ - CreateDirectoryA("dir", NULL); - createTestFile("dir\\abcdefgh.abc"); - shfo.pFrom = "dir\\abcdefgh.abc\0"; - shfo.pTo = "\0"; - shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; - retval = SHFileOperation(&shfo); - ok(retval == ERROR_SUCCESS || - broken(retval == DE_OPCANCELLED), /* NT4 */ - "Expected ERROR_SUCCESS, got %d\n", retval); - if (retval == ERROR_SUCCESS) - ok(DeleteFileA("abcdefgh.abc"), "Expected file to exist\n"); - ok(DeleteFileA("dir\\abcdefgh.abc"), "Expected file to exist\n"); - ok(RemoveDirectoryA("dir"), "Expected dir to exist\n"); -} - -/* tests the FO_MOVE action */ -static void test_move(void) -{ - SHFILEOPSTRUCTA shfo, shfo2; - CHAR from[5*MAX_PATH]; - CHAR to[5*MAX_PATH]; - DWORD retval; - - shfo.hwnd = NULL; - shfo.wFunc = FO_MOVE; - shfo.pFrom = from; - shfo.pTo = to; - shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; - shfo.hNameMappings = NULL; - shfo.lpszProgressTitle = NULL; - - set_curr_dir_path(from, "test1.txt\0"); - set_curr_dir_path(to, "test4.txt\0"); - ok(!SHFileOperationA(&shfo), "Prepare test to check how directories are moved recursively\n"); - ok(!file_exists("test1.txt"), "test1.txt should not exist\n"); - ok(file_exists("test4.txt\\test1.txt"), "The file is not moved\n"); - - set_curr_dir_path(from, "test?.txt\0"); - set_curr_dir_path(to, "testdir2\0"); - ok(!file_exists("testdir2\\test2.txt"), "The file is not moved yet\n"); - ok(!file_exists("testdir2\\test4.txt"), "The directory is not moved yet\n"); - ok(!SHFileOperationA(&shfo), "Files and directories are moved to directory\n"); - ok(file_exists("testdir2\\test2.txt"), "The file is moved\n"); - ok(file_exists("testdir2\\test4.txt"), "The directory is moved\n"); - ok(file_exists("testdir2\\test4.txt\\test1.txt"), "The file in subdirectory is moved\n"); - - clean_after_shfo_tests(); - init_shfo_tests(); - - memcpy(&shfo2, &shfo, sizeof(SHFILEOPSTRUCTA)); - shfo2.fFlags |= FOF_MULTIDESTFILES; - - set_curr_dir_path(from, "test1.txt\0test2.txt\0test4.txt\0"); - set_curr_dir_path(to, "test6.txt\0test7.txt\0test8.txt\0"); - if (old_shell32) - shfo2.fFlags |= FOF_NOCONFIRMMKDIR; - ok(!SHFileOperationA(&shfo2), "Move many files\n"); - ok(DeleteFileA("test6.txt"), "The file is not moved - many files are " - "specified as a target\n"); - ok(DeleteFileA("test7.txt"), "The file is not moved\n"); - ok(RemoveDirectoryA("test8.txt"), "The directory is not moved\n"); - - init_shfo_tests(); - - /* number of sources do not correspond to number of targets */ - set_curr_dir_path(from, "test1.txt\0test2.txt\0test4.txt\0"); - set_curr_dir_path(to, "test6.txt\0test7.txt\0"); - retval = SHFileOperationA(&shfo2); - if (dir_exists("test6.txt")) - { - if (retval == ERROR_SUCCESS) - { - /* Old shell32 */ - DeleteFileA("test6.txt\\test1.txt"); - DeleteFileA("test6.txt\\test2.txt"); - RemoveDirectoryA("test6.txt\\test4.txt"); - RemoveDirectoryA("test6.txt"); - } - else - { - /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == DE_DESTSAMETREE, "Expected DE_DESTSAMETREE, got %d\n", retval); - ok(DeleteFileA("test6.txt\\test1.txt"), "The file is not moved\n"); - RemoveDirectoryA("test6.txt"); - ok(DeleteFileA("test7.txt\\test2.txt"), "The file is not moved\n"); - RemoveDirectoryA("test7.txt"); - } - } - else - { - expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); - ok(!file_exists("test6.txt"), "The file is not moved - many files are " - "specified as a target\n"); - } - - init_shfo_tests(); - - set_curr_dir_path(from, "test3.txt\0"); - set_curr_dir_path(to, "test4.txt\\test1.txt\0"); - ok(!SHFileOperationA(&shfo), "Can't move file to other directory\n"); - ok(file_exists("test4.txt\\test1.txt"), "The file is not moved\n"); - - set_curr_dir_path(from, "test1.txt\0test2.txt\0test4.txt\0"); - set_curr_dir_path(to, "test6.txt\0test7.txt\0test8.txt\0"); - if (old_shell32) - shfo.fFlags |= FOF_NOCONFIRMMKDIR; - retval = SHFileOperationA(&shfo); - if (dir_exists("test6.txt")) - { - /* Old shell32 */ - /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(DeleteFileA("test6.txt\\test1.txt"), "The file is not moved. Many files are specified\n"); - ok(DeleteFileA("test6.txt\\test2.txt"), "The file is not moved. Many files are specified\n"); - ok(DeleteFileA("test6.txt\\test4.txt\\test1.txt"), "The file is not moved. Many files are specified\n"); - ok(RemoveDirectoryA("test6.txt\\test4.txt"), "The directory is not moved. Many files are specified\n"); - RemoveDirectoryA("test6.txt"); - init_shfo_tests(); - } - else - { - expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); - ok(file_exists("test1.txt"), "The file is moved. Many files are specified\n"); - ok(dir_exists("test4.txt"), "The directory is moved. Many files are specified\n"); - } - - set_curr_dir_path(from, "test1.txt\0"); - set_curr_dir_path(to, "test6.txt\0"); - ok(!SHFileOperationA(&shfo), "Move file failed\n"); - ok(!file_exists("test1.txt"), "The file is not moved\n"); - ok(file_exists("test6.txt"), "The file is not moved\n"); - set_curr_dir_path(from, "test6.txt\0"); - set_curr_dir_path(to, "test1.txt\0"); - ok(!SHFileOperationA(&shfo), "Move file back failed\n"); - - set_curr_dir_path(from, "test4.txt\0"); - set_curr_dir_path(to, "test6.txt\0"); - ok(!SHFileOperationA(&shfo), "Move dir failed\n"); - ok(!dir_exists("test4.txt"), "The dir is not moved\n"); - ok(dir_exists("test6.txt"), "The dir is moved\n"); - set_curr_dir_path(from, "test6.txt\0"); - set_curr_dir_path(to, "test4.txt\0"); - ok(!SHFileOperationA(&shfo), "Move dir back failed\n"); - - /* move one file to two others */ - init_shfo_tests(); - shfo.pFrom = "test1.txt\0"; - shfo.pTo = "a.txt\0b.txt\0"; - retval = SHFileOperationA(&shfo); - if (retval == DE_OPCANCELLED) - { - /* NT4 fails and doesn't move any files */ - ok(!file_exists("a.txt"), "Expected a.txt to not exist\n"); - DeleteFileA("test1.txt"); - } - else - { - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - if (old_shell32) - { - DeleteFile("a.txt\\a.txt"); - RemoveDirectoryA("a.txt"); - } - else - ok(DeleteFile("a.txt"), "Expected a.txt to exist\n"); - ok(!file_exists("test1.txt"), "Expected test1.txt to not exist\n"); - } - ok(!file_exists("b.txt"), "Expected b.txt to not exist\n"); - - /* move two files to one other */ - shfo.pFrom = "test2.txt\0test3.txt\0"; - shfo.pTo = "test1.txt\0"; - retval = SHFileOperationA(&shfo); - if (dir_exists("test1.txt")) - { - /* Old shell32 */ - /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(DeleteFileA("test1.txt\\test2.txt"), "Expected test1.txt\\test2.txt to exist\n"); - ok(DeleteFileA("test1.txt\\test3.txt"), "Expected test1.txt\\test3.txt to exist\n"); - RemoveDirectoryA("test1.txt"); - createTestFile("test2.txt"); - createTestFile("test3.txt"); - } - else - { - expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); - ok(!file_exists("test1.txt"), "Expected test1.txt to not exist\n"); - ok(file_exists("test2.txt"), "Expected test2.txt to exist\n"); - ok(file_exists("test3.txt"), "Expected test3.txt to exist\n"); - } - - /* move a directory into itself */ - shfo.pFrom = "test4.txt\0"; - shfo.pTo = "test4.txt\\b.txt\0"; - retval = SHFileOperationA(&shfo); - ok(retval == ERROR_SUCCESS || - retval == DE_DESTSUBTREE, /* Vista */ - "Expected ERROR_SUCCESS or DE_DESTSUBTREE, got %d\n", retval); - ok(!RemoveDirectory("test4.txt\\b.txt"), "Expected test4.txt\\b.txt to not exist\n"); - ok(dir_exists("test4.txt"), "Expected test4.txt to exist\n"); - - /* move many files without FOF_MULTIDESTFILES */ - shfo.pFrom = "test2.txt\0test3.txt\0"; - shfo.pTo = "d.txt\0e.txt\0"; - retval = SHFileOperationA(&shfo); - if (dir_exists("d.txt")) - { - /* Old shell32 */ - /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(DeleteFileA("d.txt\\test2.txt"), "Expected d.txt\\test2.txt to exist\n"); - ok(DeleteFileA("d.txt\\test3.txt"), "Expected d.txt\\test3.txt to exist\n"); - RemoveDirectoryA("d.txt"); - createTestFile("test2.txt"); - createTestFile("test3.txt"); - } - else - { - expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); - ok(!DeleteFile("d.txt"), "Expected d.txt to not exist\n"); - ok(!DeleteFile("e.txt"), "Expected e.txt to not exist\n"); - } - - /* number of sources != number of targets */ - shfo.pTo = "d.txt\0"; - shfo.fFlags |= FOF_MULTIDESTFILES; - retval = SHFileOperationA(&shfo); - if (dir_exists("d.txt")) - { - if (old_shell32) - { - DeleteFileA("d.txt\\test2.txt"); - DeleteFileA("d.txt\\test3.txt"); - RemoveDirectoryA("d.txt"); - createTestFile("test2.txt"); - } - else - { - /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == DE_SAMEFILE, - "Expected DE_SAMEFILE, got %d\n", retval); - ok(DeleteFileA("d.txt\\test2.txt"), "Expected d.txt\\test2.txt to exist\n"); - ok(!file_exists("d.txt\\test3.txt"), "Expected d.txt\\test3.txt to not exist\n"); - RemoveDirectoryA("d.txt"); - createTestFile("test2.txt"); - } - } - else - { - expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); - ok(!DeleteFile("d.txt"), "Expected d.txt to not exist\n"); - } - - /* FO_MOVE does not create dest directories */ - shfo.pFrom = "test2.txt\0"; - shfo.pTo = "dir1\\dir2\\test2.txt\0"; - retval = SHFileOperationA(&shfo); - if (dir_exists("dir1")) - { - /* Vista and W2K8 (broken or new behavior ?) */ - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(DeleteFileA("dir1\\dir2\\test2.txt"), "Expected dir1\\dir2\\test2.txt to exist\n"); - RemoveDirectoryA("dir1\\dir2"); - RemoveDirectoryA("dir1"); - createTestFile("test2.txt"); - } - else - { - expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */); - } - - /* try to overwrite an existing file */ - shfo.pTo = "test3.txt\0"; - retval = SHFileOperationA(&shfo); - if (retval == DE_OPCANCELLED) - { - /* NT4 fails and doesn't move any files */ - ok(file_exists("test2.txt"), "Expected test2.txt to exist\n"); - } - else - { - ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval); - ok(!file_exists("test2.txt"), "Expected test2.txt to not exist\n"); - if (old_shell32) - { - DeleteFileA("test3.txt\\test3.txt"); - RemoveDirectoryA("test3.txt"); - } - else - ok(file_exists("test3.txt"), "Expected test3.txt to exist\n"); - } -} - -static void test_sh_create_dir(void) -{ - CHAR path[MAX_PATH]; - int ret; - - if(!pSHCreateDirectoryExA) - { - win_skip("skipping SHCreateDirectoryExA tests\n"); - return; - } - - set_curr_dir_path(path, "testdir2\\test4.txt\0"); - ret = pSHCreateDirectoryExA(NULL, path, NULL); - ok(ERROR_SUCCESS == ret, "SHCreateDirectoryEx failed to create directory recursively, ret = %d\n", ret); - ok(file_exists("testdir2"), "The first directory is not created\n"); - ok(file_exists("testdir2\\test4.txt"), "The second directory is not created\n"); - - ret = pSHCreateDirectoryExA(NULL, path, NULL); - ok(ERROR_ALREADY_EXISTS == ret, "SHCreateDirectoryEx should fail to create existing directory, ret = %d\n", ret); - - ret = pSHCreateDirectoryExA(NULL, "c:\\testdir3", NULL); - ok(ERROR_SUCCESS == ret, "SHCreateDirectoryEx failed to create directory, ret = %d\n", ret); - ok(file_exists("c:\\testdir3"), "The directory is not created\n"); -} - -static void test_sh_path_prepare(void) -{ - HRESULT res; - CHAR path[MAX_PATH]; - CHAR UNICODE_PATH_A[MAX_PATH]; - BOOL UsedDefaultChar; - - if(!pSHPathPrepareForWriteA) - { - win_skip("skipping SHPathPrepareForWriteA tests\n"); - return; - } - - /* directory exists, SHPPFW_NONE */ - set_curr_dir_path(path, "testdir2\0"); - res = pSHPathPrepareForWriteA(0, 0, path, SHPPFW_NONE); - ok(res == S_OK, "res == 0x%08x, expected S_OK\n", res); - - /* directory exists, SHPPFW_IGNOREFILENAME */ - set_curr_dir_path(path, "testdir2\\test4.txt\0"); - res = pSHPathPrepareForWriteA(0, 0, path, SHPPFW_IGNOREFILENAME); - ok(res == S_OK, "res == 0x%08x, expected S_OK\n", res); - - /* directory exists, SHPPFW_DIRCREATE */ - set_curr_dir_path(path, "testdir2\0"); - res = pSHPathPrepareForWriteA(0, 0, path, SHPPFW_DIRCREATE); - ok(res == S_OK, "res == 0x%08x, expected S_OK\n", res); - - /* directory exists, SHPPFW_IGNOREFILENAME|SHPPFW_DIRCREATE */ - set_curr_dir_path(path, "testdir2\\test4.txt\0"); - res = pSHPathPrepareForWriteA(0, 0, path, SHPPFW_IGNOREFILENAME|SHPPFW_DIRCREATE); - ok(res == S_OK, "res == 0x%08x, expected S_OK\n", res); - ok(!file_exists("nonexistent\\"), "nonexistent\\ exists but shouldn't\n"); - - /* file exists, SHPPFW_NONE */ - set_curr_dir_path(path, "test1.txt\0"); - res = pSHPathPrepareForWriteA(0, 0, path, SHPPFW_NONE); - ok(res == HRESULT_FROM_WIN32(ERROR_DIRECTORY) || - res == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) || /* WinMe */ - res == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), /* Vista */ - "Unexpected result : 0x%08x\n", res); - - /* file exists, SHPPFW_DIRCREATE */ - res = pSHPathPrepareForWriteA(0, 0, path, SHPPFW_DIRCREATE); - ok(res == HRESULT_FROM_WIN32(ERROR_DIRECTORY) || - res == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) || /* WinMe */ - res == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), /* Vista */ - "Unexpected result : 0x%08x\n", res); - - /* file exists, SHPPFW_NONE, trailing \ */ - set_curr_dir_path(path, "test1.txt\\\0"); - res = pSHPathPrepareForWriteA(0, 0, path, SHPPFW_NONE); - ok(res == HRESULT_FROM_WIN32(ERROR_DIRECTORY) || - res == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) || /* WinMe */ - res == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), /* Vista */ - "Unexpected result : 0x%08x\n", res); - - /* relative path exists, SHPPFW_DIRCREATE */ - res = pSHPathPrepareForWriteA(0, 0, ".\\testdir2", SHPPFW_DIRCREATE); - ok(res == S_OK, "res == 0x%08x, expected S_OK\n", res); - - /* relative path doesn't exist, SHPPFW_DIRCREATE -- Windows does not create the directory in this case */ - res = pSHPathPrepareForWriteA(0, 0, ".\\testdir2\\test4.txt", SHPPFW_DIRCREATE); - ok(res == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "res == 0x%08x, expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND)\n", res); - ok(!file_exists(".\\testdir2\\test4.txt\\"), ".\\testdir2\\test4.txt\\ exists but shouldn't\n"); - - /* directory doesn't exist, SHPPFW_NONE */ - set_curr_dir_path(path, "nonexistent\0"); - res = pSHPathPrepareForWriteA(0, 0, path, SHPPFW_NONE); - ok(res == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "res == 0x%08x, expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND)\n", res); - - /* directory doesn't exist, SHPPFW_IGNOREFILENAME */ - set_curr_dir_path(path, "nonexistent\\notreal\0"); - res = pSHPathPrepareForWriteA(0, 0, path, SHPPFW_IGNOREFILENAME); - ok(res == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "res == 0x%08x, expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND)\n", res); - ok(!file_exists("nonexistent\\notreal"), "nonexistent\\notreal exists but shouldn't\n"); - ok(!file_exists("nonexistent\\"), "nonexistent\\ exists but shouldn't\n"); - - /* directory doesn't exist, SHPPFW_IGNOREFILENAME|SHPPFW_DIRCREATE */ - set_curr_dir_path(path, "testdir2\\test4.txt\\\0"); - res = pSHPathPrepareForWriteA(0, 0, path, SHPPFW_IGNOREFILENAME|SHPPFW_DIRCREATE); - ok(res == S_OK, "res == 0x%08x, expected S_OK\n", res); - ok(file_exists("testdir2\\test4.txt\\"), "testdir2\\test4.txt doesn't exist but should\n"); - - /* nested directory doesn't exist, SHPPFW_DIRCREATE */ - set_curr_dir_path(path, "nonexistent\\notreal\0"); - res = pSHPathPrepareForWriteA(0, 0, path, SHPPFW_DIRCREATE); - ok(res == S_OK, "res == 0x%08x, expected S_OK\n", res); - ok(file_exists("nonexistent\\notreal"), "nonexistent\\notreal doesn't exist but should\n"); - - /* SHPPFW_ASKDIRCREATE, SHPPFW_NOWRITECHECK, and SHPPFW_MEDIACHECKONLY are untested */ - - if(!pSHPathPrepareForWriteW) - { - win_skip("Skipping SHPathPrepareForWriteW tests\n"); - return; - } - - SetLastError(0xdeadbeef); - UsedDefaultChar = FALSE; - if (WideCharToMultiByte(CP_ACP, WC_NO_BEST_FIT_CHARS, UNICODE_PATH, -1, UNICODE_PATH_A, sizeof(UNICODE_PATH_A), NULL, &UsedDefaultChar) == 0) - { - win_skip("Could not convert Unicode path name to multibyte (%d)\n", GetLastError()); - return; - } - if (UsedDefaultChar) - { - win_skip("Could not find unique multibyte representation for directory name using default codepage\n"); - return; - } - - /* unicode directory doesn't exist, SHPPFW_NONE */ - RemoveDirectoryA(UNICODE_PATH_A); - res = pSHPathPrepareForWriteW(0, 0, UNICODE_PATH, SHPPFW_NONE); - ok(res == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "res == %08x, expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND)\n", res); - ok(!file_exists(UNICODE_PATH_A), "unicode path was created but shouldn't be\n"); - RemoveDirectoryA(UNICODE_PATH_A); - - /* unicode directory doesn't exist, SHPPFW_DIRCREATE */ - res = pSHPathPrepareForWriteW(0, 0, UNICODE_PATH, SHPPFW_DIRCREATE); - ok(res == S_OK, "res == %08x, expected S_OK\n", res); - ok(file_exists(UNICODE_PATH_A), "unicode path should've been created\n"); - - /* unicode directory exists, SHPPFW_NONE */ - res = pSHPathPrepareForWriteW(0, 0, UNICODE_PATH, SHPPFW_NONE); - ok(res == S_OK, "ret == %08x, expected S_OK\n", res); - - /* unicode directory exists, SHPPFW_DIRCREATE */ - res = pSHPathPrepareForWriteW(0, 0, UNICODE_PATH, SHPPFW_DIRCREATE); - ok(res == S_OK, "ret == %08x, expected S_OK\n", res); - RemoveDirectoryA(UNICODE_PATH_A); -} - -static void test_sh_new_link_info(void) -{ - BOOL ret, mustcopy=TRUE; - CHAR linkto[MAX_PATH]; - CHAR destdir[MAX_PATH]; - CHAR result[MAX_PATH]; - CHAR result2[MAX_PATH]; - - /* source file does not exist */ - set_curr_dir_path(linkto, "nosuchfile.txt\0"); - set_curr_dir_path(destdir, "testdir2\0"); - ret = SHGetNewLinkInfoA(linkto, destdir, result, &mustcopy, 0); - ok(ret == FALSE || - broken(ret == lstrlenA(result) + 1), /* NT4 */ - "SHGetNewLinkInfoA succeeded\n"); - ok(mustcopy == FALSE, "mustcopy should be FALSE\n"); - - /* dest dir does not exist */ - set_curr_dir_path(linkto, "test1.txt\0"); - set_curr_dir_path(destdir, "nosuchdir\0"); - ret = SHGetNewLinkInfoA(linkto, destdir, result, &mustcopy, 0); - ok(ret == TRUE || - broken(ret == lstrlenA(result) + 1), /* NT4 */ - "SHGetNewLinkInfoA failed, err=%i\n", GetLastError()); - ok(mustcopy == FALSE, "mustcopy should be FALSE\n"); - - /* source file exists */ - set_curr_dir_path(linkto, "test1.txt\0"); - set_curr_dir_path(destdir, "testdir2\0"); - ret = SHGetNewLinkInfoA(linkto, destdir, result, &mustcopy, 0); - ok(ret == TRUE || - broken(ret == lstrlenA(result) + 1), /* NT4 */ - "SHGetNewLinkInfoA failed, err=%i\n", GetLastError()); - ok(mustcopy == FALSE, "mustcopy should be FALSE\n"); - ok(CompareStringA(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE, destdir, - lstrlenA(destdir), result, lstrlenA(destdir)) == CSTR_EQUAL, - "%s does not start with %s\n", result, destdir); - ok(lstrlenA(result) > 4 && lstrcmpiA(result+lstrlenA(result)-4, ".lnk") == 0, - "%s does not end with .lnk\n", result); - - /* preferred target name already exists */ - createTestFile(result); - ret = SHGetNewLinkInfoA(linkto, destdir, result2, &mustcopy, 0); - ok(ret == TRUE || - broken(ret == lstrlenA(result2) + 1), /* NT4 */ - "SHGetNewLinkInfoA failed, err=%i\n", GetLastError()); - ok(mustcopy == FALSE, "mustcopy should be FALSE\n"); - ok(CompareStringA(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE, destdir, - lstrlenA(destdir), result2, lstrlenA(destdir)) == CSTR_EQUAL, - "%s does not start with %s\n", result2, destdir); - ok(lstrlenA(result2) > 4 && lstrcmpiA(result2+lstrlenA(result2)-4, ".lnk") == 0, - "%s does not end with .lnk\n", result2); - ok(lstrcmpiA(result, result2) != 0, "%s and %s are the same\n", result, result2); - DeleteFileA(result); -} - -static void test_unicode(void) -{ - SHFILEOPSTRUCTW shfoW; - int ret; - HANDLE file; - - if (!pSHFileOperationW) - { - skip("SHFileOperationW() is missing\n"); - return; - } - - shfoW.hwnd = NULL; - shfoW.wFunc = FO_DELETE; - shfoW.pFrom = UNICODE_PATH; - shfoW.pTo = '\0'; - shfoW.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI; - shfoW.hNameMappings = NULL; - shfoW.lpszProgressTitle = NULL; - - /* Clean up before start test */ - DeleteFileW(UNICODE_PATH); - RemoveDirectoryW(UNICODE_PATH); - - /* Make sure we are on a system that supports unicode */ - SetLastError(0xdeadbeef); - file = CreateFileW(UNICODE_PATH, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - if (GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) - { - skip("Unicode tests skipped on non-unicode system\n"); - return; - } - CloseHandle(file); - - /* Try to delete a file with unicode filename */ - ok(file_existsW(UNICODE_PATH), "The file does not exist\n"); - ret = pSHFileOperationW(&shfoW); - ok(!ret, "File is not removed, ErrorCode: %d\n", ret); - ok(!file_existsW(UNICODE_PATH), "The file should have been removed\n"); - - /* Try to trash a file with unicode filename */ - createTestFileW(UNICODE_PATH); - shfoW.fFlags |= FOF_ALLOWUNDO; - ok(file_existsW(UNICODE_PATH), "The file does not exist\n"); - ret = pSHFileOperationW(&shfoW); - ok(!ret, "File is not removed, ErrorCode: %d\n", ret); - ok(!file_existsW(UNICODE_PATH), "The file should have been removed\n"); - - if(!pSHCreateDirectoryExW) - { - skip("Skipping SHCreateDirectoryExW tests\n"); - return; - } - - /* Try to delete a directory with unicode filename */ - ret = pSHCreateDirectoryExW(NULL, UNICODE_PATH, NULL); - ok(!ret, "SHCreateDirectoryExW returned %d\n", ret); - ok(file_existsW(UNICODE_PATH), "The directory is not created\n"); - shfoW.fFlags &= ~FOF_ALLOWUNDO; - ret = pSHFileOperationW(&shfoW); - ok(!ret, "Directory is not removed, ErrorCode: %d\n", ret); - ok(!file_existsW(UNICODE_PATH), "The directory should have been removed\n"); - - /* Try to trash a directory with unicode filename */ - ret = pSHCreateDirectoryExW(NULL, UNICODE_PATH, NULL); - ok(!ret, "SHCreateDirectoryExW returned %d\n", ret); - ok(file_existsW(UNICODE_PATH), "The directory was not created\n"); - shfoW.fFlags |= FOF_ALLOWUNDO; - ret = pSHFileOperationW(&shfoW); - ok(!ret, "Directory is not removed, ErrorCode: %d\n", ret); - ok(!file_existsW(UNICODE_PATH), "The directory should have been removed\n"); -} - -static void -test_shlmenu(void) { - HRESULT hres; - hres = Shell_MergeMenus (0, 0, 0x42, 0x4242, 0x424242, 0); - ok (hres == 0x4242, "expected 0x4242 but got %x\n", hres); - hres = Shell_MergeMenus ((HMENU)42, 0, 0x42, 0x4242, 0x424242, 0); - ok (hres == 0x4242, "expected 0x4242 but got %x\n", hres); -} - -/* Check for old shell32 (4.0.x) */ -static BOOL is_old_shell32(void) -{ - SHFILEOPSTRUCTA shfo; - CHAR from[5*MAX_PATH]; - CHAR to[5*MAX_PATH]; - DWORD retval; - - shfo.hwnd = NULL; - shfo.wFunc = FO_COPY; - shfo.pFrom = from; - shfo.pTo = to; - /* FOF_NOCONFIRMMKDIR is needed for old shell32 */ - shfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI | FOF_MULTIDESTFILES | FOF_NOCONFIRMMKDIR; - shfo.hNameMappings = NULL; - shfo.lpszProgressTitle = NULL; - - set_curr_dir_path(from, "test1.txt\0test2.txt\0test3.txt\0"); - set_curr_dir_path(to, "test6.txt\0test7.txt\0"); - retval = SHFileOperationA(&shfo); - - /* Delete extra files on old shell32 and Vista+*/ - DeleteFileA("test6.txt\\test1.txt"); - /* Delete extra files on old shell32 */ - DeleteFileA("test6.txt\\test2.txt"); - DeleteFileA("test6.txt\\test3.txt"); - /* Delete extra directory on old shell32 and Vista+ */ - RemoveDirectoryA("test6.txt"); - /* Delete extra files/directories on Vista+*/ - DeleteFileA("test7.txt\\test2.txt"); - RemoveDirectoryA("test7.txt"); - - if (retval == ERROR_SUCCESS) - return TRUE; - - return FALSE; -} - -START_TEST(shlfileop) -{ - InitFunctionPointers(); - - clean_after_shfo_tests(); - - init_shfo_tests(); - old_shell32 = is_old_shell32(); - if (old_shell32) - win_skip("Need to cater for old shell32 (4.0.x) on Win95\n"); - clean_after_shfo_tests(); - - init_shfo_tests(); - test_get_file_info(); - test_get_file_info_iconlist(); - clean_after_shfo_tests(); - - init_shfo_tests(); - test_delete(); - clean_after_shfo_tests(); - - init_shfo_tests(); - test_rename(); - clean_after_shfo_tests(); - - init_shfo_tests(); - test_copy(); - clean_after_shfo_tests(); - - init_shfo_tests(); - test_move(); - clean_after_shfo_tests(); - - test_sh_create_dir(); - clean_after_shfo_tests(); - - init_shfo_tests(); - test_sh_path_prepare(); - clean_after_shfo_tests(); - - init_shfo_tests(); - test_sh_new_link_info(); - clean_after_shfo_tests(); - - test_unicode(); - - test_shlmenu(); -} diff --git a/rostests/winetests/shell32/shlfolder.c b/rostests/winetests/shell32/shlfolder.c deleted file mode 100644 index fb634b45348..00000000000 --- a/rostests/winetests/shell32/shlfolder.c +++ /dev/null @@ -1,4619 +0,0 @@ -/* - * Unit test of the IShellFolder functions. - * - * Copyright 2004 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 - */ - -#include -#include - -#define COBJMACROS -#define CONST_VTABLE - -#include "windef.h" -#include "winbase.h" -#include "wtypes.h" -#include "shellapi.h" - - -#include "shlguid.h" -#include "shlobj.h" -#include "shobjidl.h" -#include "shlwapi.h" -#include "ocidl.h" -#include "oleauto.h" - -#include "wine/test.h" - -#include -DEFINE_GUID(IID_IParentAndItem, 0xB3A4B685, 0xB685, 0x4805, 0x99,0xD9, 0x5D,0xEA,0xD2,0x87,0x32,0x36); -DEFINE_GUID(CLSID_ShellDocObjView, 0xe7e4bc40, 0xe76a, 0x11ce, 0xa9,0xbb, 0x00,0xaa,0x00,0x4a,0xe8,0x37); - -static IMalloc *ppM; - -static HRESULT (WINAPI *pSHBindToParent)(LPCITEMIDLIST, REFIID, LPVOID*, LPCITEMIDLIST*); -static HRESULT (WINAPI *pSHGetFolderPathA)(HWND, int, HANDLE, DWORD, LPSTR); -static HRESULT (WINAPI *pSHGetFolderPathAndSubDirA)(HWND, int, HANDLE, DWORD, LPCSTR, LPSTR); -static BOOL (WINAPI *pSHGetPathFromIDListW)(LPCITEMIDLIST,LPWSTR); -static HRESULT (WINAPI *pSHGetSpecialFolderLocation)(HWND, int, LPITEMIDLIST *); -static BOOL (WINAPI *pSHGetSpecialFolderPathA)(HWND, LPSTR, int, BOOL); -static BOOL (WINAPI *pSHGetSpecialFolderPathW)(HWND, LPWSTR, int, BOOL); -static HRESULT (WINAPI *pStrRetToBufW)(STRRET*,LPCITEMIDLIST,LPWSTR,UINT); -static LPITEMIDLIST (WINAPI *pILFindLastID)(LPCITEMIDLIST); -static void (WINAPI *pILFree)(LPITEMIDLIST); -static BOOL (WINAPI *pILIsEqual)(LPCITEMIDLIST, LPCITEMIDLIST); -static HRESULT (WINAPI *pSHCreateItemFromIDList)(PCIDLIST_ABSOLUTE pidl, REFIID riid, void **ppv); -static HRESULT (WINAPI *pSHCreateItemFromParsingName)(PCWSTR,IBindCtx*,REFIID,void**); -static HRESULT (WINAPI *pSHCreateShellItem)(LPCITEMIDLIST,IShellFolder*,LPCITEMIDLIST,IShellItem**); -static HRESULT (WINAPI *pSHCreateShellItemArray)(LPCITEMIDLIST,IShellFolder*,UINT,LPCITEMIDLIST*,IShellItemArray**); -static HRESULT (WINAPI *pSHCreateShellItemArrayFromDataObject)(IDataObject*, REFIID, void **); -static HRESULT (WINAPI *pSHCreateShellItemArrayFromShellItem)(IShellItem*, REFIID, void **); -static LPITEMIDLIST (WINAPI *pILCombine)(LPCITEMIDLIST,LPCITEMIDLIST); -static HRESULT (WINAPI *pSHParseDisplayName)(LPCWSTR,IBindCtx*,LPITEMIDLIST*,SFGAOF,SFGAOF*); -static LPITEMIDLIST (WINAPI *pSHSimpleIDListFromPathAW)(LPCVOID); -static HRESULT (WINAPI *pSHGetNameFromIDList)(PCIDLIST_ABSOLUTE,SIGDN,PWSTR*); -static HRESULT (WINAPI *pSHGetItemFromDataObject)(IDataObject*,DATAOBJ_GET_ITEM_FLAGS,REFIID,void**); -static HRESULT (WINAPI *pSHGetIDListFromObject)(IUnknown*, PIDLIST_ABSOLUTE*); -static HRESULT (WINAPI *pSHGetItemFromObject)(IUnknown*,REFIID,void**); -static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL); -static UINT (WINAPI *pGetSystemWow64DirectoryW)(LPWSTR, UINT); -static HRESULT (WINAPI *pSHCreateDefaultContextMenu)(const DEFCONTEXTMENU*,REFIID,void**); - -static WCHAR *make_wstr(const char *str) -{ - WCHAR *ret; - int len; - - if(!str || strlen(str) == 0) - return NULL; - - len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); - if(!len || len < 0) - return NULL; - - ret = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); - if(!ret) - return NULL; - - MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len); - return ret; -} - -static int strcmp_wa(LPCWSTR strw, const char *stra) -{ - CHAR buf[512]; - WideCharToMultiByte(CP_ACP, 0, strw, -1, buf, sizeof(buf), NULL, NULL); - return lstrcmpA(stra, buf); -} - -static void init_function_pointers(void) -{ - HMODULE hmod; - HRESULT hr; - void *ptr; - - hmod = GetModuleHandleA("shell32.dll"); - -#define MAKEFUNC(f) (p##f = (void*)GetProcAddress(hmod, #f)) - MAKEFUNC(SHBindToParent); - MAKEFUNC(SHCreateItemFromIDList); - MAKEFUNC(SHCreateItemFromParsingName); - MAKEFUNC(SHCreateShellItem); - MAKEFUNC(SHCreateShellItemArray); - MAKEFUNC(SHCreateShellItemArrayFromDataObject); - MAKEFUNC(SHCreateShellItemArrayFromShellItem); - MAKEFUNC(SHGetFolderPathA); - MAKEFUNC(SHGetFolderPathAndSubDirA); - MAKEFUNC(SHGetPathFromIDListW); - MAKEFUNC(SHGetSpecialFolderPathA); - MAKEFUNC(SHGetSpecialFolderPathW); - MAKEFUNC(SHGetSpecialFolderLocation); - MAKEFUNC(SHParseDisplayName); - MAKEFUNC(SHGetNameFromIDList); - MAKEFUNC(SHGetItemFromDataObject); - MAKEFUNC(SHGetIDListFromObject); - MAKEFUNC(SHGetItemFromObject); - MAKEFUNC(SHCreateDefaultContextMenu); -#undef MAKEFUNC - -#define MAKEFUNC_ORD(f, ord) (p##f = (void*)GetProcAddress(hmod, (LPSTR)(ord))) - MAKEFUNC_ORD(ILFindLastID, 16); - MAKEFUNC_ORD(ILIsEqual, 21); - MAKEFUNC_ORD(ILCombine, 25); - MAKEFUNC_ORD(ILFree, 155); - MAKEFUNC_ORD(SHSimpleIDListFromPathAW, 162); -#undef MAKEFUNC_ORD - - /* test named exports */ - ptr = GetProcAddress(hmod, "ILFree"); - ok(broken(ptr == 0) || ptr != 0, "expected named export for ILFree\n"); - if (ptr) - { -#define TESTNAMED(f) \ - ptr = (void*)GetProcAddress(hmod, #f); \ - ok(ptr != 0, "expected named export for " #f "\n"); - - TESTNAMED(ILAppendID); - TESTNAMED(ILClone); - TESTNAMED(ILCloneFirst); - TESTNAMED(ILCombine); - TESTNAMED(ILCreateFromPath); - TESTNAMED(ILCreateFromPathA); - TESTNAMED(ILCreateFromPathW); - TESTNAMED(ILFindChild); - TESTNAMED(ILFindLastID); - TESTNAMED(ILGetNext); - TESTNAMED(ILGetSize); - TESTNAMED(ILIsEqual); - TESTNAMED(ILIsParent); - TESTNAMED(ILRemoveLastID); - TESTNAMED(ILSaveToStream); -#undef TESTNAMED - } - - hmod = GetModuleHandleA("shlwapi.dll"); - pStrRetToBufW = (void*)GetProcAddress(hmod, "StrRetToBufW"); - - hmod = GetModuleHandleA("kernel32.dll"); - pIsWow64Process = (void*)GetProcAddress(hmod, "IsWow64Process"); - pGetSystemWow64DirectoryW = (void*)GetProcAddress(hmod, "GetSystemWow64DirectoryW"); - - hr = SHGetMalloc(&ppM); - ok(hr == S_OK, "SHGetMalloc failed %08x\n", hr); -} - -/* Based on PathAddBackslashW from dlls/shlwapi/path.c */ -static LPWSTR myPathAddBackslashW( LPWSTR lpszPath ) -{ - size_t iLen; - - if (!lpszPath || (iLen = lstrlenW(lpszPath)) >= MAX_PATH) - return NULL; - - if (iLen) - { - lpszPath += iLen; - if (lpszPath[-1] != '\\') - { - *lpszPath++ = '\\'; - *lpszPath = '\0'; - } - } - return lpszPath; -} - -static void test_ParseDisplayName(void) -{ - HRESULT hr; - IShellFolder *IDesktopFolder; - static const char *cNonExistDir1A = "c:\\nonexist_subdir"; - static const char *cNonExistDir2A = "c:\\\\nonexist_subdir"; - static const char *cInetTestA = "http:\\yyy"; - static const char *cInetTest2A = "xx:yyy"; - DWORD res; - WCHAR cTestDirW [MAX_PATH] = {0}; - ITEMIDLIST *newPIDL; - BOOL bRes; - - hr = SHGetDesktopFolder(&IDesktopFolder); - ok(hr == S_OK, "Expected SHGetDesktopFolder to return S_OK, got 0x%08x\n", hr); - if(hr != S_OK) return; - - /* Tests crash on W2K and below (SHCreateShellItem available as of XP) */ - if (pSHCreateShellItem) - { - /* null name and pidl */ - hr = IShellFolder_ParseDisplayName(IDesktopFolder, - NULL, NULL, NULL, NULL, NULL, 0); - ok(hr == E_INVALIDARG, "returned %08x, expected E_INVALIDARG\n", hr); - - /* null name */ - newPIDL = (ITEMIDLIST*)0xdeadbeef; - hr = IShellFolder_ParseDisplayName(IDesktopFolder, - NULL, NULL, NULL, NULL, &newPIDL, 0); - ok(newPIDL == 0, "expected null, got %p\n", newPIDL); - ok(hr == E_INVALIDARG, "returned %08x, expected E_INVALIDARG\n", hr); - } - else - win_skip("Tests would crash on W2K and below\n"); - - MultiByteToWideChar(CP_ACP, 0, cInetTestA, -1, cTestDirW, MAX_PATH); - hr = IShellFolder_ParseDisplayName(IDesktopFolder, - NULL, NULL, cTestDirW, NULL, &newPIDL, 0); - todo_wine ok(hr == S_OK || broken(hr == E_FAIL) /* NT4 */, - "ParseDisplayName returned %08x, expected SUCCESS or E_FAIL\n", hr); - if (hr == S_OK) - { - ok(pILFindLastID(newPIDL)->mkid.abID[0] == 0x61, "Last pidl should be of type " - "PT_IESPECIAL1, but is: %02x\n", pILFindLastID(newPIDL)->mkid.abID[0]); - IMalloc_Free(ppM, newPIDL); - } - - MultiByteToWideChar(CP_ACP, 0, cInetTest2A, -1, cTestDirW, MAX_PATH); - hr = IShellFolder_ParseDisplayName(IDesktopFolder, - NULL, NULL, cTestDirW, NULL, &newPIDL, 0); - todo_wine ok(hr == S_OK || broken(hr == E_FAIL) /* NT4 */, - "ParseDisplayName returned %08x, expected SUCCESS or E_FAIL\n", hr); - if (hr == S_OK) - { - ok(pILFindLastID(newPIDL)->mkid.abID[0] == 0x61, "Last pidl should be of type " - "PT_IESPECIAL1, but is: %02x\n", pILFindLastID(newPIDL)->mkid.abID[0]); - IMalloc_Free(ppM, newPIDL); - } - - res = GetFileAttributesA(cNonExistDir1A); - if(res != INVALID_FILE_ATTRIBUTES) - { - skip("Test directory unexpectedly exists\n"); - goto finished; - } - - MultiByteToWideChar(CP_ACP, 0, cNonExistDir1A, -1, cTestDirW, MAX_PATH); - hr = IShellFolder_ParseDisplayName(IDesktopFolder, - NULL, NULL, cTestDirW, NULL, &newPIDL, 0); - ok((hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) || (hr == E_FAIL), - "ParseDisplayName returned %08x, expected 80070002 or E_FAIL\n", hr); - - res = GetFileAttributesA(cNonExistDir2A); - if(res != INVALID_FILE_ATTRIBUTES) - { - skip("Test directory unexpectedly exists\n"); - goto finished; - } - - MultiByteToWideChar(CP_ACP, 0, cNonExistDir2A, -1, cTestDirW, MAX_PATH); - hr = IShellFolder_ParseDisplayName(IDesktopFolder, - NULL, NULL, cTestDirW, NULL, &newPIDL, 0); - ok((hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) || (hr == E_FAIL) || (hr == E_INVALIDARG), - "ParseDisplayName returned %08x, expected 80070002, E_FAIL or E_INVALIDARG\n", hr); - - /* I thought that perhaps the DesktopFolder's ParseDisplayName would recognize the - * path corresponding to CSIDL_PERSONAL and return a CLSID_MyDocuments PIDL. Turns - * out it doesn't. The magic seems to happen in the file dialogs, then. */ - if (!pSHGetSpecialFolderPathW || !pILFindLastID) - { - win_skip("SHGetSpecialFolderPathW and/or ILFindLastID are not available\n"); - goto finished; - } - - bRes = pSHGetSpecialFolderPathW(NULL, cTestDirW, CSIDL_PERSONAL, FALSE); - ok(bRes, "SHGetSpecialFolderPath(CSIDL_PERSONAL) failed! %u\n", GetLastError()); - if (!bRes) goto finished; - - hr = IShellFolder_ParseDisplayName(IDesktopFolder, NULL, NULL, cTestDirW, NULL, &newPIDL, 0); - ok(hr == S_OK, "DesktopFolder->ParseDisplayName failed. hr = %08x.\n", hr); - if (hr != S_OK) goto finished; - - ok(pILFindLastID(newPIDL)->mkid.abID[0] == 0x31 || - pILFindLastID(newPIDL)->mkid.abID[0] == 0xb1, /* Win98 */ - "Last pidl should be of type PT_FOLDER or PT_IESPECIAL2, but is: %02x\n", - pILFindLastID(newPIDL)->mkid.abID[0]); - IMalloc_Free(ppM, newPIDL); - -finished: - IShellFolder_Release(IDesktopFolder); -} - -/* creates a file with the specified name for tests */ -static void CreateTestFile(const CHAR *name) -{ - HANDLE file; - DWORD written; - - file = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - if (file != INVALID_HANDLE_VALUE) - { - WriteFile(file, name, strlen(name), &written, NULL); - WriteFile(file, "\n", strlen("\n"), &written, NULL); - CloseHandle(file); - } -} - - -/* initializes the tests */ -static void CreateFilesFolders(void) -{ - CreateDirectoryA(".\\testdir", NULL); - CreateDirectoryA(".\\testdir\\test.txt", NULL); - CreateTestFile (".\\testdir\\test1.txt "); - CreateTestFile (".\\testdir\\test2.txt "); - CreateTestFile (".\\testdir\\test3.txt "); - CreateDirectoryA(".\\testdir\\testdir2 ", NULL); - CreateDirectoryA(".\\testdir\\testdir2\\subdir", NULL); -} - -/* cleans after tests */ -static void Cleanup(void) -{ - DeleteFileA(".\\testdir\\test1.txt"); - DeleteFileA(".\\testdir\\test2.txt"); - DeleteFileA(".\\testdir\\test3.txt"); - RemoveDirectoryA(".\\testdir\\test.txt"); - RemoveDirectoryA(".\\testdir\\testdir2\\subdir"); - RemoveDirectoryA(".\\testdir\\testdir2"); - RemoveDirectoryA(".\\testdir"); -} - - -/* perform test */ -static void test_EnumObjects(IShellFolder *iFolder) -{ - IEnumIDList *iEnumList; - LPITEMIDLIST newPIDL, idlArr[10]; - ULONG NumPIDLs; - int i=0, j; - HRESULT hr; - - static const WORD iResults [5][5] = - { - { 0,-1,-1,-1,-1}, - { 1, 0,-1,-1,-1}, - { 1, 1, 0,-1,-1}, - { 1, 1, 1, 0,-1}, - { 1, 1, 1, 1, 0} - }; - -#define SFGAO_testfor SFGAO_FILESYSTEM | SFGAO_FOLDER | SFGAO_FILESYSANCESTOR | SFGAO_CAPABILITYMASK - /* Don't test for SFGAO_HASSUBFOLDER since we return real state and native cached */ - static const ULONG attrs[5] = - { - SFGAO_CAPABILITYMASK | SFGAO_FILESYSTEM | SFGAO_FOLDER | SFGAO_FILESYSANCESTOR, - SFGAO_CAPABILITYMASK | SFGAO_FILESYSTEM | SFGAO_FOLDER | SFGAO_FILESYSANCESTOR, - SFGAO_CAPABILITYMASK | SFGAO_FILESYSTEM, - SFGAO_CAPABILITYMASK | SFGAO_FILESYSTEM, - SFGAO_CAPABILITYMASK | SFGAO_FILESYSTEM, - }; - - hr = IShellFolder_EnumObjects(iFolder, NULL, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS | SHCONTF_INCLUDEHIDDEN, &iEnumList); - ok(hr == S_OK, "EnumObjects failed %08x\n", hr); - - /* This is to show that, contrary to what is said on MSDN, on IEnumIDList::Next, - * the filesystem shellfolders return S_OK even if less than 'celt' items are - * returned (in contrast to S_FALSE). We have to do it in a loop since WinXP - * only ever returns a single entry per call. */ - while (IEnumIDList_Next(iEnumList, 10-i, &idlArr[i], &NumPIDLs) == S_OK) - i += NumPIDLs; - ok (i == 5, "i: %d\n", i); - - hr = IEnumIDList_Release(iEnumList); - ok(hr == S_OK, "IEnumIDList_Release failed %08x\n", hr); - - /* Sort them first in case of wrong order from system */ - for (i=0;i<5;i++) for (j=0;j<5;j++) - if ((SHORT)IShellFolder_CompareIDs(iFolder, 0, idlArr[i], idlArr[j]) < 0) - { - newPIDL = idlArr[i]; - idlArr[i] = idlArr[j]; - idlArr[j] = newPIDL; - } - - for (i=0;i<5;i++) for (j=0;j<5;j++) - { - hr = IShellFolder_CompareIDs(iFolder, 0, idlArr[i], idlArr[j]); - ok(hr == iResults[i][j], "Got %x expected [%d]-[%d]=%x\n", hr, i, j, iResults[i][j]); - } - - - for (i = 0; i < 5; i++) - { - SFGAOF flags; -#define SFGAO_VISTA SFGAO_DROPTARGET | SFGAO_CANLINK | SFGAO_CANCOPY - /* Native returns all flags no matter what we ask for */ - flags = SFGAO_CANCOPY; - hr = IShellFolder_GetAttributesOf(iFolder, 1, (LPCITEMIDLIST*)(idlArr + i), &flags); - flags &= SFGAO_testfor; - ok(hr == S_OK, "GetAttributesOf returns %08x\n", hr); - ok(flags == (attrs[i]) || - flags == (attrs[i] & ~SFGAO_FILESYSANCESTOR) || /* Win9x, NT4 */ - flags == ((attrs[i] & ~SFGAO_CAPABILITYMASK) | SFGAO_VISTA), /* Vista and higher */ - "GetAttributesOf[%i] got %08x, expected %08x\n", i, flags, attrs[i]); - - flags = SFGAO_testfor; - hr = IShellFolder_GetAttributesOf(iFolder, 1, (LPCITEMIDLIST*)(idlArr + i), &flags); - flags &= SFGAO_testfor; - ok(hr == S_OK, "GetAttributesOf returns %08x\n", hr); - ok(flags == attrs[i] || - flags == (attrs[i] & ~SFGAO_FILESYSANCESTOR), /* Win9x, NT4 */ - "GetAttributesOf[%i] got %08x, expected %08x\n", i, flags, attrs[i]); - } - - for (i=0;i<5;i++) - IMalloc_Free(ppM, idlArr[i]); -} - -static void test_BindToObject(void) -{ - HRESULT hr; - UINT cChars; - IShellFolder *psfDesktop, *psfChild, *psfMyComputer, *psfSystemDir; - SHITEMID emptyitem = { 0, { 0 } }; - LPITEMIDLIST pidlMyComputer, pidlSystemDir, pidl, pidlEmpty = (LPITEMIDLIST)&emptyitem; - WCHAR wszSystemDir[MAX_PATH]; - char szSystemDir[MAX_PATH]; - char buf[MAX_PATH]; - WCHAR path[MAX_PATH]; - CHAR pathA[MAX_PATH]; - HANDLE hfile; - WCHAR wszMyComputer[] = { - ':',':','{','2','0','D','0','4','F','E','0','-','3','A','E','A','-','1','0','6','9','-', - 'A','2','D','8','-','0','8','0','0','2','B','3','0','3','0','9','D','}',0 }; - static const CHAR filename_html[] = "winetest.html"; - static const CHAR filename_txt[] = "winetest.txt"; - static const CHAR filename_foo[] = "winetest.foo"; - - /* The following tests shows that BindToObject should fail with E_INVALIDARG if called - * with an empty pidl. This is tested for Desktop, MyComputer and the FS ShellFolder - */ - hr = SHGetDesktopFolder(&psfDesktop); - ok (hr == S_OK, "SHGetDesktopFolder failed! hr = %08x\n", hr); - if (hr != S_OK) return; - - hr = IShellFolder_BindToObject(psfDesktop, pidlEmpty, NULL, &IID_IShellFolder, (LPVOID*)&psfChild); - ok (hr == E_INVALIDARG, "Desktop's BindToObject should fail, when called with empty pidl! hr = %08x\n", hr); - - hr = IShellFolder_BindToObject(psfDesktop, NULL, NULL, &IID_IShellFolder, (LPVOID*)&psfChild); - ok (hr == E_INVALIDARG, "Desktop's BindToObject should fail, when called with NULL pidl! hr = %08x\n", hr); - - hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, wszMyComputer, NULL, &pidlMyComputer, NULL); - ok (hr == S_OK, "Desktop's ParseDisplayName failed to parse MyComputer's CLSID! hr = %08x\n", hr); - if (hr != S_OK) { - IShellFolder_Release(psfDesktop); - return; - } - - hr = IShellFolder_BindToObject(psfDesktop, pidlMyComputer, NULL, &IID_IShellFolder, (LPVOID*)&psfMyComputer); - ok (hr == S_OK, "Desktop failed to bind to MyComputer object! hr = %08x\n", hr); - IShellFolder_Release(psfDesktop); - IMalloc_Free(ppM, pidlMyComputer); - if (hr != S_OK) return; - - hr = IShellFolder_BindToObject(psfMyComputer, pidlEmpty, NULL, &IID_IShellFolder, (LPVOID*)&psfChild); - ok (hr == E_INVALIDARG, "MyComputers's BindToObject should fail, when called with empty pidl! hr = %08x\n", hr); - -if (0) -{ - /* this call segfaults on 98SE */ - hr = IShellFolder_BindToObject(psfMyComputer, NULL, NULL, &IID_IShellFolder, (LPVOID*)&psfChild); - ok (hr == E_INVALIDARG, "MyComputers's BindToObject should fail, when called with NULL pidl! hr = %08x\n", hr); -} - - cChars = GetSystemDirectoryA(szSystemDir, MAX_PATH); - ok (cChars > 0 && cChars < MAX_PATH, "GetSystemDirectoryA failed! LastError: %u\n", GetLastError()); - if (cChars == 0 || cChars >= MAX_PATH) { - IShellFolder_Release(psfMyComputer); - return; - } - MultiByteToWideChar(CP_ACP, 0, szSystemDir, -1, wszSystemDir, MAX_PATH); - - hr = IShellFolder_ParseDisplayName(psfMyComputer, NULL, NULL, wszSystemDir, NULL, &pidlSystemDir, NULL); - ok (hr == S_OK, "MyComputers's ParseDisplayName failed to parse the SystemDirectory! hr = %08x\n", hr); - if (hr != S_OK) { - IShellFolder_Release(psfMyComputer); - return; - } - - hr = IShellFolder_BindToObject(psfMyComputer, pidlSystemDir, NULL, &IID_IShellFolder, (LPVOID*)&psfSystemDir); - ok (hr == S_OK, "MyComputer failed to bind to a FileSystem ShellFolder! hr = %08x\n", hr); - IShellFolder_Release(psfMyComputer); - IMalloc_Free(ppM, pidlSystemDir); - if (hr != S_OK) return; - - hr = IShellFolder_BindToObject(psfSystemDir, pidlEmpty, NULL, &IID_IShellFolder, (LPVOID*)&psfChild); - ok (hr == E_INVALIDARG, - "FileSystem ShellFolder's BindToObject should fail, when called with empty pidl! hr = %08x\n", hr); - -if (0) -{ - /* this call segfaults on 98SE */ - hr = IShellFolder_BindToObject(psfSystemDir, NULL, NULL, &IID_IShellFolder, (LPVOID*)&psfChild); - ok (hr == E_INVALIDARG, - "FileSystem ShellFolder's BindToObject should fail, when called with NULL pidl! hr = %08x\n", hr); -} - - IShellFolder_Release(psfSystemDir); - - GetCurrentDirectoryA(MAX_PATH, buf); - if(!lstrlenA(buf)) - { - skip("Failed to get current directory, skipping tests.\n"); - return; - } - - SHGetDesktopFolder(&psfDesktop); - - /* Attempt BindToObject on files. */ - - /* .html */ - lstrcpyA(pathA, buf); - lstrcatA(pathA, "\\"); - lstrcatA(pathA, filename_html); - hfile = CreateFileA(pathA, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - if(hfile != INVALID_HANDLE_VALUE) - { - CloseHandle(hfile); - MultiByteToWideChar(CP_ACP, 0, pathA, -1, path, MAX_PATH); - hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, path, NULL, &pidl, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - hr = IShellFolder_BindToObject(psfDesktop, pidl, NULL, &IID_IShellFolder, (void**)&psfChild); - ok(hr == S_OK || - hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), /* XP, W2K3 */ - "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - IPersist *pp; - hr = IShellFolder_QueryInterface(psfChild, &IID_IPersist, (void**)&pp); - ok(hr == S_OK || - broken(hr == E_NOINTERFACE), /* Win9x, NT4, W2K */ - "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - CLSID id; - hr = IPersist_GetClassID(pp, &id); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(IsEqualIID(&id, &CLSID_ShellDocObjView), "Unexpected classid\n"); - IPersist_Release(pp); - } - - IShellFolder_Release(psfChild); - } - pILFree(pidl); - } - DeleteFileA(pathA); - } - else - win_skip("Failed to create .html testfile.\n"); - - /* .txt */ - lstrcpyA(pathA, buf); - lstrcatA(pathA, "\\"); - lstrcatA(pathA, filename_txt); - hfile = CreateFileA(pathA, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - if(hfile != INVALID_HANDLE_VALUE) - { - CloseHandle(hfile); - MultiByteToWideChar(CP_ACP, 0, pathA, -1, path, MAX_PATH); - hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, path, NULL, &pidl, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - hr = IShellFolder_BindToObject(psfDesktop, pidl, NULL, &IID_IShellFolder, (void**)&psfChild); - ok(hr == E_FAIL || /* Vista+ */ - hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || /* XP, W2K3 */ - broken(hr == S_OK), /* Win9x, NT4, W2K */ - "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IShellFolder_Release(psfChild); - pILFree(pidl); - } - DeleteFileA(pathA); - } - else - win_skip("Failed to create .txt testfile.\n"); - - /* .foo */ - lstrcpyA(pathA, buf); - lstrcatA(pathA, "\\"); - lstrcatA(pathA, filename_foo); - hfile = CreateFileA(pathA, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - if(hfile != INVALID_HANDLE_VALUE) - { - CloseHandle(hfile); - MultiByteToWideChar(CP_ACP, 0, pathA, -1, path, MAX_PATH); - hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, path, NULL, &pidl, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - hr = IShellFolder_BindToObject(psfDesktop, pidl, NULL, &IID_IShellFolder, (void**)&psfChild); - ok(hr == E_FAIL || /* Vista+ */ - hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || /* XP, W2K3 */ - broken(hr == S_OK), /* Win9x, NT4, W2K */ - "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IShellFolder_Release(psfChild); - pILFree(pidl); - } - DeleteFileA(pathA); - } - else - win_skip("Failed to create .foo testfile.\n"); - - /* And on the desktop */ - if(pSHGetSpecialFolderPathA) - { - pSHGetSpecialFolderPathA(NULL, pathA, CSIDL_DESKTOP, FALSE); - lstrcatA(pathA, "\\"); - lstrcatA(pathA, filename_html); - hfile = CreateFileA(pathA, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - if(hfile != INVALID_HANDLE_VALUE) - { - CloseHandle(hfile); - MultiByteToWideChar(CP_ACP, 0, pathA, -1, path, MAX_PATH); - hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, path, NULL, &pidl, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - hr = IShellFolder_BindToObject(psfDesktop, pidl, NULL, &IID_IShellFolder, (void**)&psfChild); - ok(hr == S_OK || - hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), /* XP, W2K3 */ - "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IShellFolder_Release(psfChild); - pILFree(pidl); - } - if(!DeleteFileA(pathA)) - trace("Failed to delete: %d\n", GetLastError()); - - } - else - win_skip("Failed to create .html testfile.\n"); - - pSHGetSpecialFolderPathA(NULL, pathA, CSIDL_DESKTOP, FALSE); - lstrcatA(pathA, "\\"); - lstrcatA(pathA, filename_foo); - hfile = CreateFileA(pathA, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - if(hfile != INVALID_HANDLE_VALUE) - { - CloseHandle(hfile); - MultiByteToWideChar(CP_ACP, 0, pathA, -1, path, MAX_PATH); - hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, path, NULL, &pidl, NULL); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - hr = IShellFolder_BindToObject(psfDesktop, pidl, NULL, &IID_IShellFolder, (void**)&psfChild); - ok(hr == E_FAIL || /* Vista+ */ - hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || /* XP, W2K3 */ - broken(hr == S_OK), /* Win9x, NT4, W2K */ - "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IShellFolder_Release(psfChild); - pILFree(pidl); - } - DeleteFileA(pathA); - } - else - win_skip("Failed to create .foo testfile.\n"); - } - - IShellFolder_Release(psfDesktop); -} - -static void test_GetDisplayName(void) -{ - BOOL result; - HRESULT hr; - HANDLE hTestFile; - WCHAR wszTestFile[MAX_PATH], wszTestFile2[MAX_PATH]; - char szTestFile[MAX_PATH], szTestDir[MAX_PATH]; - DWORD attr; - STRRET strret; - LPSHELLFOLDER psfDesktop, psfPersonal; - IUnknown *psfFile; - SHITEMID emptyitem = { 0, { 0 } }; - LPITEMIDLIST pidlTestFile, pidlEmpty = (LPITEMIDLIST)&emptyitem; - LPCITEMIDLIST pidlLast; - static const CHAR szFileName[] = "winetest.foo"; - static const WCHAR wszFileName[] = { 'w','i','n','e','t','e','s','t','.','f','o','o',0 }; - static const WCHAR wszDirName[] = { 'w','i','n','e','t','e','s','t',0 }; - - /* I'm trying to figure if there is a functional difference between calling - * SHGetPathFromIDListW and calling GetDisplayNameOf(SHGDN_FORPARSING) after - * binding to the shellfolder. One thing I thought of was that perhaps - * SHGetPathFromIDListW would be able to get the path to a file, which does - * not exist anymore, while the other method wouldn't. It turns out there's - * no functional difference in this respect. - */ - - if(!pSHGetSpecialFolderPathA) { - win_skip("SHGetSpecialFolderPathA is not available\n"); - return; - } - - /* First creating a directory in MyDocuments and a file in this directory. */ - result = pSHGetSpecialFolderPathA(NULL, szTestDir, CSIDL_PERSONAL, FALSE); - ok(result, "SHGetSpecialFolderPathA failed! Last error: %u\n", GetLastError()); - if (!result) return; - - /* Use ANSI file functions so this works on Windows 9x */ - lstrcatA(szTestDir, "\\winetest"); - CreateDirectoryA(szTestDir, NULL); - attr=GetFileAttributesA(szTestDir); - if (attr == INVALID_FILE_ATTRIBUTES || !(attr & FILE_ATTRIBUTE_DIRECTORY)) - { - ok(0, "unable to create the '%s' directory\n", szTestDir); - return; - } - - lstrcpyA(szTestFile, szTestDir); - lstrcatA(szTestFile, "\\"); - lstrcatA(szTestFile, szFileName); - hTestFile = CreateFileA(szTestFile, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - ok((hTestFile != INVALID_HANDLE_VALUE), "CreateFileA failed! Last error: %u\n", GetLastError()); - if (hTestFile == INVALID_HANDLE_VALUE) return; - CloseHandle(hTestFile); - - /* Getting an itemidlist for the file. */ - hr = SHGetDesktopFolder(&psfDesktop); - ok(hr == S_OK, "SHGetDesktopFolder failed! hr = %08x\n", hr); - if (hr != S_OK) return; - - MultiByteToWideChar(CP_ACP, 0, szTestFile, -1, wszTestFile, MAX_PATH); - - hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, wszTestFile, NULL, &pidlTestFile, NULL); - ok(hr == S_OK, "Desktop->ParseDisplayName failed! hr = %08x\n", hr); - if (hr != S_OK) { - IShellFolder_Release(psfDesktop); - return; - } - - pidlLast = pILFindLastID(pidlTestFile); - ok(pidlLast->mkid.cb >=76 || - broken(pidlLast->mkid.cb == 28) || /* W2K */ - broken(pidlLast->mkid.cb == 40), /* Win9x, WinME */ - "Expected pidl length of at least 76, got %d.\n", pidlLast->mkid.cb); - if (pidlLast->mkid.cb >= 28) { - ok(!lstrcmpA((CHAR*)&pidlLast->mkid.abID[12], szFileName), - "Filename should be stored as ansi-string at this position!\n"); - } - /* WinXP and up store the filenames as both ANSI and UNICODE in the pidls */ - if (pidlLast->mkid.cb >= 76) { - ok(!lstrcmpW((WCHAR*)&pidlLast->mkid.abID[46], wszFileName) || - (pidlLast->mkid.cb >= 94 && !lstrcmpW((WCHAR*)&pidlLast->mkid.abID[64], wszFileName)) || /* Vista */ - (pidlLast->mkid.cb >= 98 && !lstrcmpW((WCHAR*)&pidlLast->mkid.abID[68], wszFileName)), /* Win7 */ - "Filename should be stored as wchar-string at this position!\n"); - } - - /* It seems as if we cannot bind to regular files on windows, but only directories. - */ - hr = IShellFolder_BindToObject(psfDesktop, pidlTestFile, NULL, &IID_IUnknown, (VOID**)&psfFile); - ok (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || - hr == E_NOTIMPL || /* Vista */ - broken(hr == S_OK), /* Win9x, W2K */ - "hr = %08x\n", hr); - if (hr == S_OK) { - IShellFolder_Release(psfFile); - } - - if (!pSHBindToParent) - { - win_skip("SHBindToParent is missing\n"); - DeleteFileA(szTestFile); - RemoveDirectoryA(szTestDir); - return; - } - - /* Some tests for IShellFolder::SetNameOf */ - if (pSHGetFolderPathAndSubDirA) - { - hr = pSHBindToParent(pidlTestFile, &IID_IShellFolder, (VOID**)&psfPersonal, &pidlLast); - ok(hr == S_OK, "SHBindToParent failed! hr = %08x\n", hr); - if (hr == S_OK) { - /* It's ok to use this fixed path. Call will fail anyway. */ - WCHAR wszAbsoluteFilename[] = { 'C',':','\\','w','i','n','e','t','e','s','t', 0 }; - LPITEMIDLIST pidlNew; - - /* The pidl returned through the last parameter of SetNameOf is a simple one. */ - hr = IShellFolder_SetNameOf(psfPersonal, NULL, pidlLast, wszDirName, SHGDN_NORMAL, &pidlNew); - ok (hr == S_OK, "SetNameOf failed! hr = %08x\n", hr); - if (hr == S_OK) - { - ok (((LPITEMIDLIST)((LPBYTE)pidlNew+pidlNew->mkid.cb))->mkid.cb == 0, - "pidl returned from SetNameOf should be simple!\n"); - - /* Passing an absolute path to SetNameOf fails. The HRESULT code indicates that SetNameOf - * is implemented on top of SHFileOperation in WinXP. */ - hr = IShellFolder_SetNameOf(psfPersonal, NULL, pidlNew, wszAbsoluteFilename, - SHGDN_FORPARSING, NULL); - ok (hr == HRESULT_FROM_WIN32(ERROR_CANCELLED), "SetNameOf succeeded! hr = %08x\n", hr); - - /* Rename the file back to its original name. SetNameOf ignores the fact, that the - * SHGDN flags specify an absolute path. */ - hr = IShellFolder_SetNameOf(psfPersonal, NULL, pidlNew, wszFileName, SHGDN_FORPARSING, NULL); - ok (hr == S_OK, "SetNameOf failed! hr = %08x\n", hr); - - pILFree(pidlNew); - } - - IShellFolder_Release(psfPersonal); - } - } - else - win_skip("Avoid needs of interaction on Win2k\n"); - - /* Deleting the file and the directory */ - DeleteFileA(szTestFile); - RemoveDirectoryA(szTestDir); - - /* SHGetPathFromIDListW still works, although the file is not present anymore. */ - if (pSHGetPathFromIDListW) - { - result = pSHGetPathFromIDListW(pidlTestFile, wszTestFile2); - ok (result, "SHGetPathFromIDListW failed! Last error: %u\n", GetLastError()); - ok (!lstrcmpiW(wszTestFile, wszTestFile2), "SHGetPathFromIDListW returns incorrect path!\n"); - } - - /* SHBindToParent fails, if called with a NULL PIDL. */ - hr = pSHBindToParent(NULL, &IID_IShellFolder, (VOID**)&psfPersonal, &pidlLast); - ok (hr != S_OK, "SHBindToParent(NULL) should fail!\n"); - - /* But it succeeds with an empty PIDL. */ - hr = pSHBindToParent(pidlEmpty, &IID_IShellFolder, (VOID**)&psfPersonal, &pidlLast); - ok (hr == S_OK, "SHBindToParent(empty PIDL) should succeed! hr = %08x\n", hr); - ok (pidlLast == pidlEmpty, "The last element of an empty PIDL should be the PIDL itself!\n"); - if (hr == S_OK) - IShellFolder_Release(psfPersonal); - - /* Binding to the folder and querying the display name of the file also works. */ - hr = pSHBindToParent(pidlTestFile, &IID_IShellFolder, (VOID**)&psfPersonal, &pidlLast); - ok (hr == S_OK, "SHBindToParent failed! hr = %08x\n", hr); - if (hr != S_OK) { - IShellFolder_Release(psfDesktop); - return; - } - - /* This test shows that Windows doesn't allocate a new pidlLast, but returns a pointer into - * pidlTestFile (In accordance with MSDN). */ - ok (pILFindLastID(pidlTestFile) == pidlLast, - "SHBindToParent doesn't return the last id of the pidl param!\n"); - - hr = IShellFolder_GetDisplayNameOf(psfPersonal, pidlLast, SHGDN_FORPARSING, &strret); - ok (hr == S_OK, "Personal->GetDisplayNameOf failed! hr = %08x\n", hr); - if (hr != S_OK) { - IShellFolder_Release(psfDesktop); - IShellFolder_Release(psfPersonal); - return; - } - - if (pStrRetToBufW) - { - hr = pStrRetToBufW(&strret, pidlLast, wszTestFile2, MAX_PATH); - ok (hr == S_OK, "StrRetToBufW failed! hr = %08x\n", hr); - ok (!lstrcmpiW(wszTestFile, wszTestFile2), "GetDisplayNameOf returns incorrect path!\n"); - } - - ILFree(pidlTestFile); - IShellFolder_Release(psfDesktop); - IShellFolder_Release(psfPersonal); -} - -static void test_CallForAttributes(void) -{ - HKEY hKey; - LONG lResult; - HRESULT hr; - DWORD dwSize; - LPSHELLFOLDER psfDesktop; - LPITEMIDLIST pidlMyDocuments; - DWORD dwAttributes, dwCallForAttributes, dwOrigAttributes, dwOrigCallForAttributes; - 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 }; - static const WCHAR wszMyDocumentsKey[] = { - 'C','L','S','I','D','\\','{','4','5','0','D','8','F','B','A','-','A','D','2','5','-', - '1','1','D','0','-','9','8','A','8','-','0','8','0','0','3','6','1','B','1','1','0','3','}', - '\\','S','h','e','l','l','F','o','l','d','e','r',0 }; - WCHAR wszMyDocuments[] = { - ':',':','{','4','5','0','D','8','F','B','A','-','A','D','2','5','-','1','1','D','0','-', - '9','8','A','8','-','0','8','0','0','3','6','1','B','1','1','0','3','}',0 }; - - /* For the root of a namespace extension, the attributes are not queried by binding - * to the object and calling GetAttributesOf. Instead, the attributes are read from - * the registry value HKCR/CLSID/{...}/ShellFolder/Attributes. This is documented on MSDN. - * - * The MyDocuments shellfolder on WinXP has a HKCR/CLSID/{...}/ShellFolder/CallForAttributes - * value. It seems that if the folder is queried for one of the flags set in CallForAttributes, - * the shell does bind to the folder object and calls GetAttributesOf. This is not documented - * on MSDN. This test is meant to document the observed behaviour on WinXP SP2. - */ - hr = SHGetDesktopFolder(&psfDesktop); - ok (hr == S_OK, "SHGetDesktopFolder failed! hr = %08x\n", hr); - if (hr != S_OK) return; - - hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, wszMyDocuments, NULL, - &pidlMyDocuments, NULL); - ok (hr == S_OK || - broken(hr == E_INVALIDARG), /* Win95, NT4 */ - "Desktop's ParseDisplayName failed to parse MyDocuments's CLSID! hr = %08x\n", hr); - if (hr != S_OK) { - IShellFolder_Release(psfDesktop); - return; - } - - dwAttributes = 0xffffffff; - hr = IShellFolder_GetAttributesOf(psfDesktop, 1, - (LPCITEMIDLIST*)&pidlMyDocuments, &dwAttributes); - ok (hr == S_OK, "Desktop->GetAttributesOf(MyDocuments) failed! hr = %08x\n", hr); - - /* We need the following setup (as observed on WinXP SP2), for the tests to make sense. */ - ok (dwAttributes & SFGAO_FILESYSTEM, "SFGAO_FILESYSTEM attribute is not set for MyDocuments!\n"); - ok (!(dwAttributes & SFGAO_ISSLOW), "SFGAO_ISSLOW attribute is set for MyDocuments!\n"); - ok (!(dwAttributes & SFGAO_GHOSTED), "SFGAO_GHOSTED attribute is set for MyDocuments!\n"); - - /* We don't have the MyDocuments shellfolder in wine yet, and thus we don't have the registry - * key. So the test will return at this point, if run on wine. - */ - lResult = RegOpenKeyExW(HKEY_CLASSES_ROOT, wszMyDocumentsKey, 0, KEY_WRITE|KEY_READ, &hKey); - ok (lResult == ERROR_SUCCESS || - lResult == ERROR_ACCESS_DENIED, - "RegOpenKeyEx failed! result: %08x\n", lResult); - if (lResult != ERROR_SUCCESS) { - if (lResult == ERROR_ACCESS_DENIED) - skip("Not enough rights to open the registry key\n"); - IMalloc_Free(ppM, pidlMyDocuments); - IShellFolder_Release(psfDesktop); - return; - } - - /* Query MyDocuments' Attributes value, to be able to restore it later. */ - dwSize = sizeof(DWORD); - lResult = RegQueryValueExW(hKey, wszAttributes, NULL, NULL, (LPBYTE)&dwOrigAttributes, &dwSize); - ok (lResult == ERROR_SUCCESS, "RegQueryValueEx failed! result: %08x\n", lResult); - if (lResult != ERROR_SUCCESS) { - RegCloseKey(hKey); - IMalloc_Free(ppM, pidlMyDocuments); - IShellFolder_Release(psfDesktop); - return; - } - - /* Query MyDocuments' CallForAttributes value, to be able to restore it later. */ - dwSize = sizeof(DWORD); - lResult = RegQueryValueExW(hKey, wszCallForAttributes, NULL, NULL, - (LPBYTE)&dwOrigCallForAttributes, &dwSize); - ok (lResult == ERROR_SUCCESS, "RegQueryValueEx failed! result: %08x\n", lResult); - if (lResult != ERROR_SUCCESS) { - RegCloseKey(hKey); - IMalloc_Free(ppM, pidlMyDocuments); - IShellFolder_Release(psfDesktop); - return; - } - - /* Define via the Attributes value that MyDocuments attributes are SFGAO_ISSLOW and - * SFGAO_GHOSTED and that MyDocuments should be called for the SFGAO_ISSLOW and - * SFGAO_FILESYSTEM attributes. */ - dwAttributes = SFGAO_ISSLOW|SFGAO_GHOSTED; - RegSetValueExW(hKey, wszAttributes, 0, REG_DWORD, (LPBYTE)&dwAttributes, sizeof(DWORD)); - dwCallForAttributes = SFGAO_ISSLOW|SFGAO_FILESYSTEM; - RegSetValueExW(hKey, wszCallForAttributes, 0, REG_DWORD, - (LPBYTE)&dwCallForAttributes, sizeof(DWORD)); - - /* Although it is not set in CallForAttributes, the SFGAO_GHOSTED flag is reset by - * GetAttributesOf. It seems that once there is a single attribute queried, for which - * CallForAttributes is set, all flags are taken from the GetAttributesOf call and - * the flags in Attributes are ignored. - */ - dwAttributes = SFGAO_ISSLOW|SFGAO_GHOSTED|SFGAO_FILESYSTEM; - hr = IShellFolder_GetAttributesOf(psfDesktop, 1, - (LPCITEMIDLIST*)&pidlMyDocuments, &dwAttributes); - ok (hr == S_OK, "Desktop->GetAttributesOf(MyDocuments) failed! hr = %08x\n", hr); - if (hr == S_OK) - ok (dwAttributes == SFGAO_FILESYSTEM, - "Desktop->GetAttributes(MyDocuments) returned unexpected attributes: %08x\n", - dwAttributes); - - /* Restore MyDocuments' original Attributes and CallForAttributes registry values */ - RegSetValueExW(hKey, wszAttributes, 0, REG_DWORD, (LPBYTE)&dwOrigAttributes, sizeof(DWORD)); - RegSetValueExW(hKey, wszCallForAttributes, 0, REG_DWORD, - (LPBYTE)&dwOrigCallForAttributes, sizeof(DWORD)); - RegCloseKey(hKey); - IMalloc_Free(ppM, pidlMyDocuments); - IShellFolder_Release(psfDesktop); -} - -static void test_GetAttributesOf(void) -{ - HRESULT hr; - LPSHELLFOLDER psfDesktop, psfMyComputer; - SHITEMID emptyitem = { 0, { 0 } }; - LPCITEMIDLIST pidlEmpty = (LPCITEMIDLIST)&emptyitem; - LPITEMIDLIST pidlMyComputer; - DWORD dwFlags; - static const DWORD desktopFlags[] = { - /* WinXP */ - SFGAO_STORAGE | SFGAO_HASPROPSHEET | SFGAO_STORAGEANCESTOR | SFGAO_FILESYSANCESTOR | - SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_HASSUBFOLDER, - /* Win2k */ - SFGAO_CANRENAME | SFGAO_HASPROPSHEET | SFGAO_STREAM | SFGAO_FILESYSANCESTOR | - SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_HASSUBFOLDER, - /* WinMe, Win9x, WinNT*/ - SFGAO_CANRENAME | SFGAO_HASPROPSHEET | SFGAO_FILESYSANCESTOR | - SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_HASSUBFOLDER - }; - static const DWORD myComputerFlags[] = { - /* WinXP */ - SFGAO_CANRENAME | SFGAO_CANDELETE | SFGAO_HASPROPSHEET | SFGAO_DROPTARGET | - SFGAO_FILESYSANCESTOR | SFGAO_FOLDER | SFGAO_HASSUBFOLDER, - /* Win2k */ - SFGAO_CANRENAME | SFGAO_HASPROPSHEET | SFGAO_DROPTARGET | SFGAO_STREAM | - SFGAO_FILESYSANCESTOR | SFGAO_FOLDER | SFGAO_HASSUBFOLDER, - /* WinMe, Win9x, WinNT */ - SFGAO_CANRENAME | SFGAO_HASPROPSHEET | SFGAO_DROPTARGET | SFGAO_FILESYSANCESTOR | - SFGAO_FOLDER | SFGAO_HASSUBFOLDER, - /* Win95, WinNT when queried directly */ - SFGAO_CANLINK | SFGAO_HASPROPSHEET | SFGAO_DROPTARGET | SFGAO_FILESYSANCESTOR | - SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_HASSUBFOLDER - }; - WCHAR wszMyComputer[] = { - ':',':','{','2','0','D','0','4','F','E','0','-','3','A','E','A','-','1','0','6','9','-', - 'A','2','D','8','-','0','8','0','0','2','B','3','0','3','0','9','D','}',0 }; - char cCurrDirA [MAX_PATH] = {0}; - WCHAR cCurrDirW [MAX_PATH]; - static WCHAR cTestDirW[] = {'t','e','s','t','d','i','r',0}; - IShellFolder *IDesktopFolder, *testIShellFolder; - ITEMIDLIST *newPIDL; - int len, i; - BOOL foundFlagsMatch; - - hr = SHGetDesktopFolder(&psfDesktop); - ok (hr == S_OK, "SHGetDesktopFolder failed! hr = %08x\n", hr); - if (hr != S_OK) return; - - /* The Desktop attributes can be queried with a single empty itemidlist, .. */ - dwFlags = 0xffffffff; - hr = IShellFolder_GetAttributesOf(psfDesktop, 1, &pidlEmpty, &dwFlags); - ok (hr == S_OK, "Desktop->GetAttributesOf(empty pidl) failed! hr = %08x\n", hr); - for (i = 0, foundFlagsMatch = FALSE; !foundFlagsMatch && - i < sizeof(desktopFlags) / sizeof(desktopFlags[0]); i++) - { - if (desktopFlags[i] == dwFlags) - foundFlagsMatch = TRUE; - } - ok (foundFlagsMatch, "Wrong Desktop attributes: %08x\n", dwFlags); - - /* .. or with no itemidlist at all. */ - dwFlags = 0xffffffff; - hr = IShellFolder_GetAttributesOf(psfDesktop, 0, NULL, &dwFlags); - ok (hr == S_OK, "Desktop->GetAttributesOf(NULL) failed! hr = %08x\n", hr); - for (i = 0, foundFlagsMatch = FALSE; !foundFlagsMatch && - i < sizeof(desktopFlags) / sizeof(desktopFlags[0]); i++) - { - if (desktopFlags[i] == dwFlags) - foundFlagsMatch = TRUE; - } - ok (foundFlagsMatch, "Wrong Desktop attributes: %08x\n", dwFlags); - - /* Testing the attributes of the MyComputer shellfolder */ - hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, wszMyComputer, NULL, &pidlMyComputer, NULL); - ok (hr == S_OK, "Desktop's ParseDisplayName failed to parse MyComputer's CLSID! hr = %08x\n", hr); - if (hr != S_OK) { - IShellFolder_Release(psfDesktop); - return; - } - - /* Windows sets the SFGAO_CANLINK flag, when MyComputer is queried via the Desktop - * folder object. It doesn't do this, if MyComputer is queried directly (see below). - */ - dwFlags = 0xffffffff; - hr = IShellFolder_GetAttributesOf(psfDesktop, 1, (LPCITEMIDLIST*)&pidlMyComputer, &dwFlags); - ok (hr == S_OK, "Desktop->GetAttributesOf(MyComputer) failed! hr = %08x\n", hr); - for (i = 0, foundFlagsMatch = FALSE; !foundFlagsMatch && - i < sizeof(myComputerFlags) / sizeof(myComputerFlags[0]); i++) - { - if ((myComputerFlags[i] | SFGAO_CANLINK) == dwFlags) - foundFlagsMatch = TRUE; - } - todo_wine - ok (foundFlagsMatch, "Wrong MyComputer attributes: %08x\n", dwFlags); - - hr = IShellFolder_BindToObject(psfDesktop, pidlMyComputer, NULL, &IID_IShellFolder, (LPVOID*)&psfMyComputer); - ok (hr == S_OK, "Desktop failed to bind to MyComputer object! hr = %08x\n", hr); - IShellFolder_Release(psfDesktop); - IMalloc_Free(ppM, pidlMyComputer); - if (hr != S_OK) return; - - hr = IShellFolder_GetAttributesOf(psfMyComputer, 1, &pidlEmpty, &dwFlags); - todo_wine - ok (hr == E_INVALIDARG || - broken(hr == S_OK), /* W2K and earlier */ - "MyComputer->GetAttributesOf(emtpy pidl) should fail! hr = %08x\n", hr); - - dwFlags = 0xffffffff; - hr = IShellFolder_GetAttributesOf(psfMyComputer, 0, NULL, &dwFlags); - ok (hr == S_OK, "MyComputer->GetAttributesOf(NULL) failed! hr = %08x\n", hr); - for (i = 0, foundFlagsMatch = FALSE; !foundFlagsMatch && - i < sizeof(myComputerFlags) / sizeof(myComputerFlags[0]); i++) - { - if (myComputerFlags[i] == dwFlags) - foundFlagsMatch = TRUE; - } - todo_wine - ok (foundFlagsMatch, "Wrong MyComputer attributes: %08x\n", dwFlags); - - IShellFolder_Release(psfMyComputer); - - GetCurrentDirectoryA(MAX_PATH, cCurrDirA); - len = lstrlenA(cCurrDirA); - - if (len == 0) { - win_skip("GetCurrentDirectoryA returned empty string. Skipping test_GetAttributesOf\n"); - return; - } - if (len > 3 && cCurrDirA[len-1] == '\\') - cCurrDirA[len-1] = 0; - - /* create test directory */ - CreateFilesFolders(); - - MultiByteToWideChar(CP_ACP, 0, cCurrDirA, -1, cCurrDirW, MAX_PATH); - - hr = SHGetDesktopFolder(&IDesktopFolder); - ok(hr == S_OK, "SHGetDesktopfolder failed %08x\n", hr); - - hr = IShellFolder_ParseDisplayName(IDesktopFolder, NULL, NULL, cCurrDirW, NULL, &newPIDL, 0); - ok(hr == S_OK, "ParseDisplayName failed %08x\n", hr); - - hr = IShellFolder_BindToObject(IDesktopFolder, newPIDL, NULL, (REFIID)&IID_IShellFolder, (LPVOID *)&testIShellFolder); - ok(hr == S_OK, "BindToObject failed %08x\n", hr); - - IMalloc_Free(ppM, newPIDL); - - /* get relative PIDL */ - hr = IShellFolder_ParseDisplayName(testIShellFolder, NULL, NULL, cTestDirW, NULL, &newPIDL, 0); - ok(hr == S_OK, "ParseDisplayName failed %08x\n", hr); - - /* test the shell attributes of the test directory using the relative PIDL */ - dwFlags = SFGAO_FOLDER; - hr = IShellFolder_GetAttributesOf(testIShellFolder, 1, (LPCITEMIDLIST*)&newPIDL, &dwFlags); - ok (hr == S_OK, "Desktop->GetAttributesOf() failed! hr = %08x\n", hr); - ok ((dwFlags&SFGAO_FOLDER), "Wrong directory attribute for relative PIDL: %08x\n", dwFlags); - - /* free memory */ - IMalloc_Free(ppM, newPIDL); - - /* append testdirectory name to path */ - if (cCurrDirA[len-1] == '\\') - cCurrDirA[len-1] = 0; - lstrcatA(cCurrDirA, "\\testdir"); - MultiByteToWideChar(CP_ACP, 0, cCurrDirA, -1, cCurrDirW, MAX_PATH); - - hr = IShellFolder_ParseDisplayName(IDesktopFolder, NULL, NULL, cCurrDirW, NULL, &newPIDL, 0); - ok(hr == S_OK, "ParseDisplayName failed %08x\n", hr); - - /* test the shell attributes of the test directory using the absolute PIDL */ - dwFlags = SFGAO_FOLDER; - hr = IShellFolder_GetAttributesOf(IDesktopFolder, 1, (LPCITEMIDLIST*)&newPIDL, &dwFlags); - ok (hr == S_OK, "Desktop->GetAttributesOf() failed! hr = %08x\n", hr); - ok ((dwFlags&SFGAO_FOLDER), "Wrong directory attribute for absolute PIDL: %08x\n", dwFlags); - - /* free memory */ - IMalloc_Free(ppM, newPIDL); - - IShellFolder_Release(testIShellFolder); - - Cleanup(); - - IShellFolder_Release(IDesktopFolder); -} - -static void test_SHGetPathFromIDList(void) -{ - SHITEMID emptyitem = { 0, { 0 } }; - LPCITEMIDLIST pidlEmpty = (LPCITEMIDLIST)&emptyitem; - LPITEMIDLIST pidlMyComputer; - WCHAR wszPath[MAX_PATH], wszDesktop[MAX_PATH]; - BOOL result; - HRESULT hr; - LPSHELLFOLDER psfDesktop; - WCHAR wszMyComputer[] = { - ':',':','{','2','0','D','0','4','F','E','0','-','3','A','E','A','-','1','0','6','9','-', - 'A','2','D','8','-','0','8','0','0','2','B','3','0','3','0','9','D','}',0 }; - WCHAR wszFileName[MAX_PATH]; - LPITEMIDLIST pidlTestFile; - HANDLE hTestFile; - STRRET strret; - static WCHAR wszTestFile[] = { - 'w','i','n','e','t','e','s','t','.','f','o','o',0 }; - LPITEMIDLIST pidlPrograms; - - if(!pSHGetPathFromIDListW || !pSHGetSpecialFolderPathW) - { - win_skip("SHGetPathFromIDListW() or SHGetSpecialFolderPathW() is missing\n"); - return; - } - - /* Calling SHGetPathFromIDListW with no pidl should return the empty string */ - wszPath[0] = 'a'; - wszPath[1] = '\0'; - result = pSHGetPathFromIDListW(NULL, wszPath); - ok(!result, "Expected failure\n"); - ok(!wszPath[0], "Expected empty string\n"); - - /* Calling SHGetPathFromIDListW with an empty pidl should return the desktop folder's path. */ - result = pSHGetSpecialFolderPathW(NULL, wszDesktop, CSIDL_DESKTOP, FALSE); - ok(result, "SHGetSpecialFolderPathW(CSIDL_DESKTOP) failed! Last error: %u\n", GetLastError()); - if (!result) return; - - /* Check if we are on Win9x */ - SetLastError(0xdeadbeef); - lstrcmpiW(wszDesktop, wszDesktop); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("Most W-calls are not implemented\n"); - return; - } - - result = pSHGetPathFromIDListW(pidlEmpty, wszPath); - ok(result, "SHGetPathFromIDListW failed! Last error: %u\n", GetLastError()); - if (!result) return; - ok(!lstrcmpiW(wszDesktop, wszPath), "SHGetPathFromIDListW didn't return desktop path for empty pidl!\n"); - - /* MyComputer does not map to a filesystem path. SHGetPathFromIDListW should fail. */ - hr = SHGetDesktopFolder(&psfDesktop); - ok (hr == S_OK, "SHGetDesktopFolder failed! hr = %08x\n", hr); - if (hr != S_OK) return; - - hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, wszMyComputer, NULL, &pidlMyComputer, NULL); - ok (hr == S_OK, "Desktop's ParseDisplayName failed to parse MyComputer's CLSID! hr = %08x\n", hr); - if (hr != S_OK) { - IShellFolder_Release(psfDesktop); - return; - } - - SetLastError(0xdeadbeef); - wszPath[0] = 'a'; - wszPath[1] = '\0'; - result = pSHGetPathFromIDListW(pidlMyComputer, wszPath); - ok (!result, "SHGetPathFromIDListW succeeded where it shouldn't!\n"); - ok (GetLastError()==0xdeadbeef || - GetLastError()==ERROR_SUCCESS, /* Vista and higher */ - "Unexpected last error from SHGetPathFromIDListW: %u\n", GetLastError()); - ok (!wszPath[0], "Expected empty path\n"); - if (result) { - IShellFolder_Release(psfDesktop); - return; - } - - IMalloc_Free(ppM, pidlMyComputer); - - result = pSHGetSpecialFolderPathW(NULL, wszFileName, CSIDL_DESKTOPDIRECTORY, FALSE); - ok(result, "SHGetSpecialFolderPathW failed! Last error: %u\n", GetLastError()); - if (!result) { - IShellFolder_Release(psfDesktop); - return; - } - myPathAddBackslashW(wszFileName); - lstrcatW(wszFileName, wszTestFile); - hTestFile = CreateFileW(wszFileName, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, NULL); - ok(hTestFile != INVALID_HANDLE_VALUE, "CreateFileW failed! Last error: %u\n", GetLastError()); - if (hTestFile == INVALID_HANDLE_VALUE) { - IShellFolder_Release(psfDesktop); - return; - } - CloseHandle(hTestFile); - - hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, wszTestFile, NULL, &pidlTestFile, NULL); - ok (hr == S_OK, "Desktop's ParseDisplayName failed to parse filename hr = %08x\n", hr); - if (hr != S_OK) { - IShellFolder_Release(psfDesktop); - DeleteFileW(wszFileName); - IMalloc_Free(ppM, pidlTestFile); - return; - } - - /* This test is to show that the Desktop shellfolder prepends the CSIDL_DESKTOPDIRECTORY - * path for files placed on the desktop, if called with SHGDN_FORPARSING. */ - hr = IShellFolder_GetDisplayNameOf(psfDesktop, pidlTestFile, SHGDN_FORPARSING, &strret); - ok (hr == S_OK, "Desktop's GetDisplayNamfOf failed! hr = %08x\n", hr); - IShellFolder_Release(psfDesktop); - DeleteFileW(wszFileName); - if (hr != S_OK) { - IMalloc_Free(ppM, pidlTestFile); - return; - } - if (pStrRetToBufW) - { - pStrRetToBufW(&strret, pidlTestFile, wszPath, MAX_PATH); - ok(0 == lstrcmpW(wszFileName, wszPath), - "Desktop->GetDisplayNameOf(pidlTestFile, SHGDN_FORPARSING) " - "returned incorrect path for file placed on desktop\n"); - } - - result = pSHGetPathFromIDListW(pidlTestFile, wszPath); - ok(result, "SHGetPathFromIDListW failed! Last error: %u\n", GetLastError()); - IMalloc_Free(ppM, pidlTestFile); - if (!result) return; - ok(0 == lstrcmpW(wszFileName, wszPath), "SHGetPathFromIDListW returned incorrect path for file placed on desktop\n"); - - - /* Test if we can get the path from the start menu "program files" PIDL. */ - hr = pSHGetSpecialFolderLocation(NULL, CSIDL_PROGRAM_FILES, &pidlPrograms); - ok(hr == S_OK, "SHGetFolderLocation failed: 0x%08x\n", hr); - - SetLastError(0xdeadbeef); - result = pSHGetPathFromIDListW(pidlPrograms, wszPath); - IMalloc_Free(ppM, pidlPrograms); - ok(result, "SHGetPathFromIDListW failed\n"); -} - -static void test_EnumObjects_and_CompareIDs(void) -{ - ITEMIDLIST *newPIDL; - IShellFolder *IDesktopFolder, *testIShellFolder; - char cCurrDirA [MAX_PATH] = {0}; - static const CHAR cTestDirA[] = "\\testdir"; - WCHAR cTestDirW[MAX_PATH]; - int len; - HRESULT hr; - - GetCurrentDirectoryA(MAX_PATH, cCurrDirA); - len = lstrlenA(cCurrDirA); - - if(len == 0) { - win_skip("GetCurrentDirectoryA returned empty string. Skipping test_EnumObjects_and_CompareIDs\n"); - return; - } - if(cCurrDirA[len-1] == '\\') - cCurrDirA[len-1] = 0; - - lstrcatA(cCurrDirA, cTestDirA); - MultiByteToWideChar(CP_ACP, 0, cCurrDirA, -1, cTestDirW, MAX_PATH); - - hr = SHGetDesktopFolder(&IDesktopFolder); - ok(hr == S_OK, "SHGetDesktopfolder failed %08x\n", hr); - - CreateFilesFolders(); - - hr = IShellFolder_ParseDisplayName(IDesktopFolder, NULL, NULL, cTestDirW, NULL, &newPIDL, 0); - ok(hr == S_OK, "ParseDisplayName failed %08x\n", hr); - - hr = IShellFolder_BindToObject(IDesktopFolder, newPIDL, NULL, (REFIID)&IID_IShellFolder, (LPVOID *)&testIShellFolder); - ok(hr == S_OK, "BindToObject failed %08x\n", hr); - - test_EnumObjects(testIShellFolder); - - IShellFolder_Release(testIShellFolder); - - Cleanup(); - - IMalloc_Free(ppM, newPIDL); - - IShellFolder_Release(IDesktopFolder); -} - -/* A simple implementation of an IPropertyBag, which returns fixed values for - * 'Target' and 'Attributes' properties. - */ -static HRESULT WINAPI InitPropertyBag_IPropertyBag_QueryInterface(IPropertyBag *iface, REFIID riid, - void **ppvObject) -{ - if (!ppvObject) - return E_INVALIDARG; - - if (IsEqualIID(&IID_IUnknown, riid) || IsEqualIID(&IID_IPropertyBag, riid)) { - *ppvObject = iface; - } else { - ok (FALSE, "InitPropertyBag asked for unknown interface!\n"); - return E_NOINTERFACE; - } - - IPropertyBag_AddRef(iface); - return S_OK; -} - -static ULONG WINAPI InitPropertyBag_IPropertyBag_AddRef(IPropertyBag *iface) { - return 2; -} - -static ULONG WINAPI InitPropertyBag_IPropertyBag_Release(IPropertyBag *iface) { - return 1; -} - -static HRESULT WINAPI InitPropertyBag_IPropertyBag_Read(IPropertyBag *iface, LPCOLESTR pszPropName, - VARIANT *pVar, IErrorLog *pErrorLog) -{ - static const WCHAR wszTargetSpecialFolder[] = { - 'T','a','r','g','e','t','S','p','e','c','i','a','l','F','o','l','d','e','r',0 }; - static const WCHAR wszTarget[] = { - 'T','a','r','g','e','t',0 }; - static const WCHAR wszAttributes[] = { - 'A','t','t','r','i','b','u','t','e','s',0 }; - static const WCHAR wszResolveLinkFlags[] = { - 'R','e','s','o','l','v','e','L','i','n','k','F','l','a','g','s',0 }; - static const WCHAR wszTargetKnownFolder[] = { - 'T','a','r','g','e','t','K','n','o','w','n','F','o','l','d','e','r',0 }; - static const WCHAR wszCLSID[] = { - 'C','L','S','I','D',0 }; - - if (!lstrcmpW(pszPropName, wszTargetSpecialFolder)) { - ok(V_VT(pVar) == VT_I4 || - broken(V_VT(pVar) == VT_BSTR), /* Win2k */ - "Wrong variant type for 'TargetSpecialFolder' property!\n"); - return E_INVALIDARG; - } - - if (!lstrcmpW(pszPropName, wszResolveLinkFlags)) - { - ok(V_VT(pVar) == VT_UI4, "Wrong variant type for 'ResolveLinkFlags' property!\n"); - return E_INVALIDARG; - } - - if (!lstrcmpW(pszPropName, wszTarget)) { - WCHAR wszPath[MAX_PATH]; - BOOL result; - - ok(V_VT(pVar) == VT_BSTR || - broken(V_VT(pVar) == VT_EMPTY), /* Win2k */ - "Wrong variant type for 'Target' property!\n"); - if (V_VT(pVar) != VT_BSTR) return E_INVALIDARG; - - result = pSHGetSpecialFolderPathW(NULL, wszPath, CSIDL_DESKTOPDIRECTORY, FALSE); - ok(result, "SHGetSpecialFolderPathW(DESKTOPDIRECTORY) failed! %u\n", GetLastError()); - if (!result) return E_INVALIDARG; - - V_BSTR(pVar) = SysAllocString(wszPath); - return S_OK; - } - - if (!lstrcmpW(pszPropName, wszAttributes)) { - ok(V_VT(pVar) == VT_UI4, "Wrong variant type for 'Attributes' property!\n"); - if (V_VT(pVar) != VT_UI4) return E_INVALIDARG; - V_UI4(pVar) = SFGAO_FOLDER|SFGAO_HASSUBFOLDER|SFGAO_FILESYSANCESTOR| - SFGAO_CANRENAME|SFGAO_FILESYSTEM; - return S_OK; - } - - if (!lstrcmpW(pszPropName, wszTargetKnownFolder)) { - ok(V_VT(pVar) == VT_BSTR, "Wrong variant type for 'TargetKnownFolder' property!\n"); - /* TODO */ - return E_INVALIDARG; - } - - if (!lstrcmpW(pszPropName, wszCLSID)) { - ok(V_VT(pVar) == VT_EMPTY, "Wrong variant type for 'CLSID' property!\n"); - /* TODO */ - return E_INVALIDARG; - } - - ok(FALSE, "PropertyBag was asked for unknown property %s (vt=%d)!\n", wine_dbgstr_w(pszPropName), V_VT(pVar)); - return E_INVALIDARG; -} - -static HRESULT WINAPI InitPropertyBag_IPropertyBag_Write(IPropertyBag *iface, LPCOLESTR pszPropName, - VARIANT *pVar) -{ - ok(FALSE, "Unexpected call to IPropertyBag_Write\n"); - return E_NOTIMPL; -} - -static const IPropertyBagVtbl InitPropertyBag_IPropertyBagVtbl = { - InitPropertyBag_IPropertyBag_QueryInterface, - InitPropertyBag_IPropertyBag_AddRef, - InitPropertyBag_IPropertyBag_Release, - InitPropertyBag_IPropertyBag_Read, - InitPropertyBag_IPropertyBag_Write -}; - -static struct IPropertyBag InitPropertyBag = { - &InitPropertyBag_IPropertyBagVtbl -}; - -static void test_FolderShortcut(void) { - IPersistPropertyBag *pPersistPropertyBag; - IShellFolder *pShellFolder, *pDesktopFolder; - IPersistFolder3 *pPersistFolder3; - HRESULT hr; - STRRET strret; - WCHAR wszDesktopPath[MAX_PATH], wszBuffer[MAX_PATH]; - BOOL result; - CLSID clsid; - LPITEMIDLIST pidlCurrentFolder, pidlWineTestFolder, pidlSubFolder; - HKEY hShellExtKey; - WCHAR wszWineTestFolder[] = { - ':',':','{','9','B','3','5','2','E','B','F','-','2','7','6','5','-','4','5','C','1','-', - 'B','4','C','6','-','8','5','C','C','7','F','7','A','B','C','6','4','}',0 }; - WCHAR wszShellExtKey[] = { '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','\\', - '{','9','b','3','5','2','e','b','f','-','2','7','6','5','-','4','5','c','1','-', - 'b','4','c','6','-','8','5','c','c','7','f','7','a','b','c','6','4','}',0 }; - - WCHAR wszSomeSubFolder[] = { 'S','u','b','F','o','l','d','e','r', 0}; - static const GUID CLSID_UnixDosFolder = - {0x9d20aae8, 0x0625, 0x44b0, {0x9c, 0xa7, 0x71, 0x88, 0x9c, 0x22, 0x54, 0xd9}}; - - if (!pSHGetSpecialFolderPathW || !pStrRetToBufW) { - win_skip("SHGetSpecialFolderPathW and/or StrRetToBufW are not available\n"); - return; - } - - if (!pSHGetFolderPathAndSubDirA) - { - win_skip("FolderShortcut test doesn't work on Win2k\n"); - return; - } - - /* These tests basically show, that CLSID_FolderShortcuts are initialized - * via their IPersistPropertyBag interface. And that the target folder - * is taken from the IPropertyBag's 'Target' property. - */ - hr = CoCreateInstance(&CLSID_FolderShortcut, NULL, CLSCTX_INPROC_SERVER, - &IID_IPersistPropertyBag, (LPVOID*)&pPersistPropertyBag); - if (hr == REGDB_E_CLASSNOTREG) { - win_skip("CLSID_FolderShortcut is not implemented\n"); - return; - } - ok (hr == S_OK, "CoCreateInstance failed! hr = 0x%08x\n", hr); - if (hr != S_OK) return; - - hr = IPersistPropertyBag_Load(pPersistPropertyBag, &InitPropertyBag, NULL); - ok(hr == S_OK, "IPersistPropertyBag_Load failed! hr = %08x\n", hr); - if (hr != S_OK) { - IPersistPropertyBag_Release(pPersistPropertyBag); - return; - } - - hr = IPersistPropertyBag_QueryInterface(pPersistPropertyBag, &IID_IShellFolder, - (LPVOID*)&pShellFolder); - IPersistPropertyBag_Release(pPersistPropertyBag); - ok(hr == S_OK, "IPersistPropertyBag_QueryInterface(IShellFolder) failed! hr = %08x\n", hr); - if (hr != S_OK) return; - - hr = IShellFolder_GetDisplayNameOf(pShellFolder, NULL, SHGDN_FORPARSING, &strret); - ok(hr == S_OK, "IShellFolder_GetDisplayNameOf(NULL) failed! hr = %08x\n", hr); - if (hr != S_OK) { - IShellFolder_Release(pShellFolder); - return; - } - - result = pSHGetSpecialFolderPathW(NULL, wszDesktopPath, CSIDL_DESKTOPDIRECTORY, FALSE); - ok(result, "SHGetSpecialFolderPathW(CSIDL_DESKTOPDIRECTORY) failed! %u\n", GetLastError()); - if (!result) return; - - pStrRetToBufW(&strret, NULL, wszBuffer, MAX_PATH); - ok(!lstrcmpiW(wszDesktopPath, wszBuffer), "FolderShortcut returned incorrect folder!\n"); - - hr = IShellFolder_QueryInterface(pShellFolder, &IID_IPersistFolder3, (LPVOID*)&pPersistFolder3); - IShellFolder_Release(pShellFolder); - ok(hr == S_OK, "IShellFolder_QueryInterface(IID_IPersistFolder3 failed! hr = 0x%08x\n", hr); - if (hr != S_OK) return; - - hr = IPersistFolder3_GetClassID(pPersistFolder3, &clsid); - ok(hr == S_OK, "IPersistFolder3_GetClassID failed! hr=0x%08x\n", hr); - ok(IsEqualCLSID(&clsid, &CLSID_FolderShortcut), "Unexpected CLSID!\n"); - - hr = IPersistFolder3_GetCurFolder(pPersistFolder3, &pidlCurrentFolder); - todo_wine ok(hr == S_FALSE, "IPersistFolder3_GetCurFolder failed! hr=0x%08x\n", hr); - ok(!pidlCurrentFolder, "IPersistFolder3_GetCurFolder should return a NULL pidl!\n"); - - /* For FolderShortcut objects, the Initialize method initialized the folder's position in the - * shell namespace. The target folder, read from the property bag above, remains untouched. - * The following tests show this: The itemidlist for some imaginary shellfolder object - * is created and the FolderShortcut is initialized with it. GetCurFolder now returns this - * itemidlist, but GetDisplayNameOf still returns the path from above. - */ - hr = SHGetDesktopFolder(&pDesktopFolder); - ok (hr == S_OK, "SHGetDesktopFolder failed! hr = %08x\n", hr); - if (hr != S_OK) return; - - /* Temporarily register WineTestFolder as a shell namespace extension at the Desktop. - * Otherwise ParseDisplayName fails on WinXP with E_INVALIDARG */ - RegCreateKeyW(HKEY_CURRENT_USER, wszShellExtKey, &hShellExtKey); - RegCloseKey(hShellExtKey); - hr = IShellFolder_ParseDisplayName(pDesktopFolder, NULL, NULL, wszWineTestFolder, NULL, - &pidlWineTestFolder, NULL); - RegDeleteKeyW(HKEY_CURRENT_USER, wszShellExtKey); - IShellFolder_Release(pDesktopFolder); - ok (hr == S_OK, "IShellFolder::ParseDisplayName failed! hr = %08x\n", hr); - if (hr != S_OK) return; - - hr = IPersistFolder3_Initialize(pPersistFolder3, pidlWineTestFolder); - ok (hr == S_OK, "IPersistFolder3::Initialize failed! hr = %08x\n", hr); - if (hr != S_OK) { - IPersistFolder3_Release(pPersistFolder3); - pILFree(pidlWineTestFolder); - return; - } - - hr = IPersistFolder3_GetCurFolder(pPersistFolder3, &pidlCurrentFolder); - ok(hr == S_OK, "IPersistFolder3_GetCurFolder failed! hr=0x%08x\n", hr); - ok(pILIsEqual(pidlCurrentFolder, pidlWineTestFolder), - "IPersistFolder3_GetCurFolder should return pidlWineTestFolder!\n"); - pILFree(pidlCurrentFolder); - pILFree(pidlWineTestFolder); - - hr = IPersistFolder3_QueryInterface(pPersistFolder3, &IID_IShellFolder, (LPVOID*)&pShellFolder); - IPersistFolder3_Release(pPersistFolder3); - ok(hr == S_OK, "IPersistFolder3_QueryInterface(IShellFolder) failed! hr = %08x\n", hr); - if (hr != S_OK) return; - - hr = IShellFolder_GetDisplayNameOf(pShellFolder, NULL, SHGDN_FORPARSING, &strret); - ok(hr == S_OK, "IShellFolder_GetDisplayNameOf(NULL) failed! hr = %08x\n", hr); - if (hr != S_OK) { - IShellFolder_Release(pShellFolder); - return; - } - - pStrRetToBufW(&strret, NULL, wszBuffer, MAX_PATH); - ok(!lstrcmpiW(wszDesktopPath, wszBuffer), "FolderShortcut returned incorrect folder!\n"); - - /* Next few lines are meant to show that children of FolderShortcuts are not FolderShortcuts, - * but ShellFSFolders. */ - myPathAddBackslashW(wszDesktopPath); - lstrcatW(wszDesktopPath, wszSomeSubFolder); - if (!CreateDirectoryW(wszDesktopPath, NULL)) { - IShellFolder_Release(pShellFolder); - return; - } - - hr = IShellFolder_ParseDisplayName(pShellFolder, NULL, NULL, wszSomeSubFolder, NULL, - &pidlSubFolder, NULL); - RemoveDirectoryW(wszDesktopPath); - ok (hr == S_OK, "IShellFolder::ParseDisplayName failed! hr = %08x\n", hr); - if (hr != S_OK) { - IShellFolder_Release(pShellFolder); - return; - } - - hr = IShellFolder_BindToObject(pShellFolder, pidlSubFolder, NULL, &IID_IPersistFolder3, - (LPVOID*)&pPersistFolder3); - IShellFolder_Release(pShellFolder); - pILFree(pidlSubFolder); - ok (hr == S_OK, "IShellFolder::BindToObject failed! hr = %08x\n", hr); - if (hr != S_OK) - return; - - /* On windows, we expect CLSID_ShellFSFolder. On wine we relax this constraint - * a little bit and also allow CLSID_UnixDosFolder. */ - hr = IPersistFolder3_GetClassID(pPersistFolder3, &clsid); - ok(hr == S_OK, "IPersistFolder3_GetClassID failed! hr=0x%08x\n", hr); - ok(IsEqualCLSID(&clsid, &CLSID_ShellFSFolder) || IsEqualCLSID(&clsid, &CLSID_UnixDosFolder), - "IPersistFolder3::GetClassID returned unexpected CLSID!\n"); - - IPersistFolder3_Release(pPersistFolder3); -} - -#include "pshpack1.h" -struct FileStructA { - BYTE type; - BYTE dummy; - DWORD dwFileSize; - WORD uFileDate; /* In our current implementation this is */ - WORD uFileTime; /* FileTimeToDosDate(WIN32_FIND_DATA->ftLastWriteTime) */ - WORD uFileAttribs; - CHAR szName[1]; -}; - -struct FileStructW { - WORD cbLen; /* Length of this element. */ - BYTE abFooBar1[6]; /* Beyond any recognition. */ - WORD uDate; /* FileTimeToDosDate(WIN32_FIND_DATA->ftCreationTime)? */ - WORD uTime; /* (this is currently speculation) */ - WORD uDate2; /* FileTimeToDosDate(WIN32_FIND_DATA->ftLastAccessTime)? */ - WORD uTime2; /* (this is currently speculation) */ - BYTE abFooBar2[4]; /* Beyond any recognition. */ - WCHAR wszName[1]; /* The long filename in unicode. */ - /* Just for documentation: Right after the unicode string: */ - WORD cbOffset; /* FileStructW's offset from the beginning of the SHITMEID. - * SHITEMID->cb == uOffset + cbLen */ -}; -#include "poppack.h" - -static void test_ITEMIDLIST_format(void) { - WCHAR wszPersonal[MAX_PATH]; - LPSHELLFOLDER psfDesktop, psfPersonal; - LPITEMIDLIST pidlPersonal, pidlFile; - HANDLE hFile; - HRESULT hr; - BOOL bResult; - WCHAR wszFile[3][17] = { { 'e','v','e','n','_',0 }, { 'o','d','d','_',0 }, - { 'l','o','n','g','e','r','_','t','h','a','n','.','8','_','3',0 } }; - int i; - - if (!pSHGetSpecialFolderPathW) return; - - bResult = pSHGetSpecialFolderPathW(NULL, wszPersonal, CSIDL_PERSONAL, FALSE); - ok(bResult, "SHGetSpecialFolderPathW failed! Last error: %u\n", GetLastError()); - if (!bResult) return; - - SetLastError(0xdeadbeef); - bResult = SetCurrentDirectoryW(wszPersonal); - if (!bResult && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) { - win_skip("Most W-calls are not implemented\n"); - return; - } - ok(bResult, "SetCurrentDirectory failed! Last error: %u\n", GetLastError()); - if (!bResult) return; - - hr = SHGetDesktopFolder(&psfDesktop); - ok(hr == S_OK, "SHGetDesktopFolder failed! hr: %08x\n", hr); - if (hr != S_OK) return; - - hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, wszPersonal, NULL, &pidlPersonal, NULL); - ok(hr == S_OK, "psfDesktop->ParseDisplayName failed! hr = %08x\n", hr); - if (hr != S_OK) { - IShellFolder_Release(psfDesktop); - return; - } - - hr = IShellFolder_BindToObject(psfDesktop, pidlPersonal, NULL, &IID_IShellFolder, - (LPVOID*)&psfPersonal); - IShellFolder_Release(psfDesktop); - pILFree(pidlPersonal); - ok(hr == S_OK, "psfDesktop->BindToObject failed! hr = %08x\n", hr); - if (hr != S_OK) return; - - for (i=0; i<3; i++) { - CHAR szFile[MAX_PATH]; - struct FileStructA *pFileStructA; - WORD cbOffset; - - WideCharToMultiByte(CP_ACP, 0, wszFile[i], -1, szFile, MAX_PATH, NULL, NULL); - - hFile = CreateFileW(wszFile[i], GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_FLAG_WRITE_THROUGH, NULL); - ok(hFile != INVALID_HANDLE_VALUE, "CreateFile failed! (%u)\n", GetLastError()); - if (hFile == INVALID_HANDLE_VALUE) { - IShellFolder_Release(psfPersonal); - return; - } - CloseHandle(hFile); - - hr = IShellFolder_ParseDisplayName(psfPersonal, NULL, NULL, wszFile[i], NULL, &pidlFile, NULL); - DeleteFileW(wszFile[i]); - ok(hr == S_OK, "psfPersonal->ParseDisplayName failed! hr: %08x\n", hr); - if (hr != S_OK) { - IShellFolder_Release(psfPersonal); - return; - } - - pFileStructA = (struct FileStructA *)pidlFile->mkid.abID; - ok(pFileStructA->type == 0x32, "PIDLTYPE should be 0x32!\n"); - ok(pFileStructA->dummy == 0x00, "Dummy Byte should be 0x00!\n"); - ok(pFileStructA->dwFileSize == 0, "Filesize should be zero!\n"); - - if (i < 2) /* First two file names are already in valid 8.3 format */ - ok(!strcmp(szFile, (CHAR*)&pidlFile->mkid.abID[12]), "Wrong file name!\n"); - else - /* WinXP stores a derived 8.3 dos name (LONGER~1.8_3) here. We probably - * can't implement this correctly, since unix filesystems don't support - * this nasty short/long filename stuff. So we'll probably stay with our - * current habit of storing the long filename here, which seems to work - * just fine. */ - todo_wine - ok(pidlFile->mkid.abID[18] == '~' || - broken(pidlFile->mkid.abID[34] == '~'), /* Win2k */ - "Should be derived 8.3 name!\n"); - - if (i == 0) /* First file name has an even number of chars. No need for alignment. */ - ok(pidlFile->mkid.abID[12 + strlen(szFile) + 1] != '\0' || - broken(pidlFile->mkid.cb == 2 + 12 + strlen(szFile) + 1 + 1), /* Win2k */ - "Alignment byte, where there shouldn't be!\n"); - - if (i == 1) /* Second file name has an uneven number of chars => alignment byte */ - ok(pidlFile->mkid.abID[12 + strlen(szFile) + 1] == '\0', - "There should be an alignment byte, but isn't!\n"); - - /* The offset of the FileStructW member is stored as a WORD at the end of the pidl. */ - cbOffset = *(WORD*)(((LPBYTE)pidlFile)+pidlFile->mkid.cb-sizeof(WORD)); - ok ((cbOffset >= sizeof(struct FileStructA) && - cbOffset <= pidlFile->mkid.cb - sizeof(struct FileStructW)) || - broken(pidlFile->mkid.cb == 2 + 12 + strlen(szFile) + 1 + 1) || /* Win2k on short names */ - broken(pidlFile->mkid.cb == 2 + 12 + strlen(szFile) + 1 + 12 + 1), /* Win2k on long names */ - "Wrong offset value (%d) stored at the end of the PIDL\n", cbOffset); - - if (cbOffset >= sizeof(struct FileStructA) && - cbOffset <= pidlFile->mkid.cb - sizeof(struct FileStructW)) - { - struct FileStructW *pFileStructW = (struct FileStructW *)(((LPBYTE)pidlFile)+cbOffset); - - ok(pidlFile->mkid.cb == cbOffset + pFileStructW->cbLen, - "FileStructW's offset and length should add up to the PIDL's length!\n"); - - if (pidlFile->mkid.cb == cbOffset + pFileStructW->cbLen) { - /* Since we just created the file, time of creation, - * time of last access and time of last write access just be the same. - * These tests seem to fail sometimes (on WinXP), if the test is run again shortly - * after the first run. I do remember something with NTFS keeping the creation time - * if a file is deleted and then created again within a couple of seconds or so. - * Might be the reason. */ - ok (pFileStructA->uFileDate == pFileStructW->uDate && - pFileStructA->uFileTime == pFileStructW->uTime, - "Last write time should match creation time!\n"); - - /* On FAT filesystems the last access time is midnight - local time, so the values of uDate2 and uTime2 will - depend on the local timezone. If the times are exactly - equal then the dates should be identical for both FAT - and NTFS as no timezone is more than 1 day away from UTC. - */ - if (pFileStructA->uFileTime == pFileStructW->uTime2) - { - ok (pFileStructA->uFileDate == pFileStructW->uDate2, - "Last write date and time should match last access date and time!\n"); - } - else - { - /* Filesystem may be FAT. Check date within 1 day - and seconds are zero. */ - trace ("Filesystem may be FAT. Performing less strict atime test.\n"); - ok ((pFileStructW->uTime2 & 0x1F) == 0, - "Last access time on FAT filesystems should have zero seconds.\n"); - /* TODO: Perform check for date being within one day.*/ - } - - ok (!lstrcmpW(wszFile[i], pFileStructW->wszName) || - !lstrcmpW(wszFile[i], (WCHAR *)(pFileStructW->abFooBar2 + 22)) || /* Vista */ - !lstrcmpW(wszFile[i], (WCHAR *)(pFileStructW->abFooBar2 + 26)), /* Win7 */ - "The filename should be stored in unicode at this position!\n"); - } - } - - pILFree(pidlFile); - } - - IShellFolder_Release(psfPersonal); -} - -static void test_SHGetFolderPathA(void) -{ - static const BOOL is_win64 = sizeof(void *) > sizeof(int); - BOOL is_wow64; - char path[MAX_PATH]; - char path_x86[MAX_PATH]; - char path_key[MAX_PATH]; - HRESULT hr; - HKEY key; - - if (!pSHGetFolderPathA) - { - win_skip("SHGetFolderPathA not present\n"); - return; - } - if (!pIsWow64Process || !pIsWow64Process( GetCurrentProcess(), &is_wow64 )) is_wow64 = FALSE; - - hr = pSHGetFolderPathA( 0, CSIDL_PROGRAM_FILES, 0, SHGFP_TYPE_CURRENT, path ); - ok( !hr, "SHGetFolderPathA failed %x\n", hr ); - hr = pSHGetFolderPathA( 0, CSIDL_PROGRAM_FILESX86, 0, SHGFP_TYPE_CURRENT, path_x86 ); - if (hr == E_FAIL) - { - win_skip( "Program Files (x86) not supported\n" ); - return; - } - ok( !hr, "SHGetFolderPathA failed %x\n", hr ); - if (is_win64) - { - ok( lstrcmpiA( path, path_x86 ), "paths are identical '%s'\n", path ); - ok( strstr( path, "x86" ) == NULL, "64-bit path '%s' contains x86\n", path ); - ok( strstr( path_x86, "x86" ) != NULL, "32-bit path '%s' doesn't contain x86\n", path_x86 ); - } - else - { - ok( !lstrcmpiA( path, path_x86 ), "paths differ '%s' != '%s'\n", path, path_x86 ); - if (is_wow64) - ok( strstr( path, "x86" ) != NULL, "32-bit path '%s' doesn't contain x86\n", path ); - else - ok( strstr( path, "x86" ) == NULL, "32-bit path '%s' contains x86\n", path ); - } - if (!RegOpenKeyA( HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion", &key )) - { - DWORD type, count = sizeof(path_x86); - if (!RegQueryValueExA( key, "ProgramFilesDir (x86)", NULL, &type, (BYTE *)path_key, &count )) - { - ok( is_win64 || is_wow64, "ProgramFilesDir (x86) exists on 32-bit setup\n" ); - ok( !lstrcmpiA( path_key, path_x86 ), "paths differ '%s' != '%s'\n", path_key, path_x86 ); - } - else ok( !is_win64 && !is_wow64, "ProgramFilesDir (x86) should exist on 64-bit setup\n" ); - RegCloseKey( key ); - } - - hr = pSHGetFolderPathA( 0, CSIDL_PROGRAM_FILES_COMMON, 0, SHGFP_TYPE_CURRENT, path ); - ok( !hr, "SHGetFolderPathA failed %x\n", hr ); - hr = pSHGetFolderPathA( 0, CSIDL_PROGRAM_FILES_COMMONX86, 0, SHGFP_TYPE_CURRENT, path_x86 ); - if (hr == E_FAIL) - { - win_skip( "Common Files (x86) not supported\n" ); - return; - } - ok( !hr, "SHGetFolderPathA failed %x\n", hr ); - if (is_win64) - { - ok( lstrcmpiA( path, path_x86 ), "paths are identical '%s'\n", path ); - ok( strstr( path, "x86" ) == NULL, "64-bit path '%s' contains x86\n", path ); - ok( strstr( path_x86, "x86" ) != NULL, "32-bit path '%s' doesn't contain x86\n", path_x86 ); - } - else - { - ok( !lstrcmpiA( path, path_x86 ), "paths differ '%s' != '%s'\n", path, path_x86 ); - if (is_wow64) - ok( strstr( path, "x86" ) != NULL, "32-bit path '%s' doesn't contain x86\n", path ); - else - ok( strstr( path, "x86" ) == NULL, "32-bit path '%s' contains x86\n", path ); - } - if (!RegOpenKeyA( HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion", &key )) - { - DWORD type, count = sizeof(path_x86); - if (!RegQueryValueExA( key, "CommonFilesDir (x86)", NULL, &type, (BYTE *)path_key, &count )) - { - ok( is_win64 || is_wow64, "CommonFilesDir (x86) exists on 32-bit setup\n" ); - ok( !lstrcmpiA( path_key, path_x86 ), "paths differ '%s' != '%s'\n", path_key, path_x86 ); - } - else ok( !is_win64 && !is_wow64, "CommonFilesDir (x86) should exist on 64-bit setup\n" ); - } -} - -static void test_SHGetFolderPathAndSubDirA(void) -{ - HRESULT ret; - BOOL delret; - DWORD dwret; - int i; - static char wine[] = "wine"; - static char winetemp[] = "wine\\temp"; - static char appdata[MAX_PATH]; - static char testpath[MAX_PATH]; - static char toolongpath[MAX_PATH+1]; - - if(!pSHGetFolderPathAndSubDirA) - { - win_skip("SHGetFolderPathAndSubDirA not present!\n"); - return; - } - - if(!pSHGetFolderPathA) { - win_skip("SHGetFolderPathA not present!\n"); - return; - } - if(FAILED(pSHGetFolderPathA(NULL, CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, appdata))) - { - win_skip("SHGetFolderPathA failed for CSIDL_LOCAL_APPDATA!\n"); - return; - } - - sprintf(testpath, "%s\\%s", appdata, winetemp); - delret = RemoveDirectoryA(testpath); - if(!delret && (ERROR_PATH_NOT_FOUND != GetLastError()) ) { - win_skip("RemoveDirectoryA(%s) failed with error %u\n", testpath, GetLastError()); - return; - } - - sprintf(testpath, "%s\\%s", appdata, wine); - delret = RemoveDirectoryA(testpath); - if(!delret && (ERROR_PATH_NOT_FOUND != GetLastError()) && (ERROR_FILE_NOT_FOUND != GetLastError())) { - win_skip("RemoveDirectoryA(%s) failed with error %u\n", testpath, GetLastError()); - return; - } - - /* test invalid second parameter */ - ret = pSHGetFolderPathAndSubDirA(NULL, CSIDL_FLAG_DONT_VERIFY | 0xff, NULL, SHGFP_TYPE_CURRENT, wine, testpath); - ok(E_INVALIDARG == ret, "expected E_INVALIDARG, got %x\n", ret); - - /* test fourth parameter */ - ret = pSHGetFolderPathAndSubDirA(NULL, CSIDL_FLAG_DONT_VERIFY | CSIDL_LOCAL_APPDATA, NULL, 2, winetemp, testpath); - switch(ret) { - case S_OK: /* winvista */ - ok(!strncmp(appdata, testpath, strlen(appdata)), - "expected %s to start with %s\n", testpath, appdata); - ok(!lstrcmpA(&testpath[1 + strlen(appdata)], winetemp), - "expected %s to end with %s\n", testpath, winetemp); - break; - case E_INVALIDARG: /* winxp, win2k3 */ - break; - default: - ok(0, "expected S_OK or E_INVALIDARG, got %x\n", ret); - } - - /* test fifth parameter */ - testpath[0] = '\0'; - ret = pSHGetFolderPathAndSubDirA(NULL, CSIDL_FLAG_DONT_VERIFY | CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, NULL, testpath); - ok(S_OK == ret, "expected S_OK, got %x\n", ret); - ok(!lstrcmpA(appdata, testpath), "expected %s, got %s\n", appdata, testpath); - - testpath[0] = '\0'; - ret = pSHGetFolderPathAndSubDirA(NULL, CSIDL_FLAG_DONT_VERIFY | CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, "", testpath); - ok(S_OK == ret, "expected S_OK, got %x\n", ret); - ok(!lstrcmpA(appdata, testpath), "expected %s, got %s\n", appdata, testpath); - - testpath[0] = '\0'; - ret = pSHGetFolderPathAndSubDirA(NULL, CSIDL_FLAG_DONT_VERIFY | CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, "\\", testpath); - ok(S_OK == ret, "expected S_OK, got %x\n", ret); - ok(!lstrcmpA(appdata, testpath), "expected %s, got %s\n", appdata, testpath); - - for(i=0; i< MAX_PATH; i++) - toolongpath[i] = '0' + i % 10; - toolongpath[MAX_PATH] = '\0'; - ret = pSHGetFolderPathAndSubDirA(NULL, CSIDL_FLAG_DONT_VERIFY | CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, toolongpath, testpath); - ok(HRESULT_FROM_WIN32(ERROR_FILENAME_EXCED_RANGE) == ret, - "expected %x, got %x\n", HRESULT_FROM_WIN32(ERROR_FILENAME_EXCED_RANGE), ret); - - testpath[0] = '\0'; - ret = pSHGetFolderPathAndSubDirA(NULL, CSIDL_FLAG_DONT_VERIFY | CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, wine, NULL); - ok((S_OK == ret) || (E_INVALIDARG == ret), "expected S_OK or E_INVALIDARG, got %x\n", ret); - - /* test a not existing path */ - testpath[0] = '\0'; - ret = pSHGetFolderPathAndSubDirA(NULL, CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, winetemp, testpath); - ok(HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) == ret, - "expected %x, got %x\n", HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), ret); - - /* create a directory inside a not existing directory */ - testpath[0] = '\0'; - ret = pSHGetFolderPathAndSubDirA(NULL, CSIDL_FLAG_CREATE | CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, winetemp, testpath); - ok(S_OK == ret, "expected S_OK, got %x\n", ret); - ok(!strncmp(appdata, testpath, strlen(appdata)), - "expected %s to start with %s\n", testpath, appdata); - ok(!lstrcmpA(&testpath[1 + strlen(appdata)], winetemp), - "expected %s to end with %s\n", testpath, winetemp); - dwret = GetFileAttributes(testpath); - ok(FILE_ATTRIBUTE_DIRECTORY | dwret, "expected %x to contain FILE_ATTRIBUTE_DIRECTORY\n", dwret); - - /* cleanup */ - sprintf(testpath, "%s\\%s", appdata, winetemp); - RemoveDirectoryA(testpath); - sprintf(testpath, "%s\\%s", appdata, wine); - RemoveDirectoryA(testpath); -} - -static void test_LocalizedNames(void) -{ - static char cCurrDirA[MAX_PATH]; - WCHAR cCurrDirW[MAX_PATH], tempbufW[25]; - IShellFolder *IDesktopFolder, *testIShellFolder; - ITEMIDLIST *newPIDL; - int len; - HRESULT hr; - static char resourcefile[MAX_PATH]; - DWORD res; - HANDLE file; - STRRET strret; - BOOL ret; - - static const char desktopini_contents1[] = - "[.ShellClassInfo]\r\n" - "LocalizedResourceName=@"; - static const char desktopini_contents2[] = - ",-1\r\n"; - static WCHAR foldernameW[] = {'t','e','s','t','f','o','l','d','e','r',0}; - static const WCHAR folderdisplayW[] = {'F','o','l','d','e','r',' ','N','a','m','e',' ','R','e','s','o','u','r','c','e',0}; - - /* create folder with desktop.ini and localized name in GetModuleFileNameA(NULL) */ - CreateDirectoryA(".\\testfolder", NULL); - - SetFileAttributesA(".\\testfolder", GetFileAttributesA(".\\testfolder")|FILE_ATTRIBUTE_SYSTEM); - - GetModuleFileNameA(NULL, resourcefile, MAX_PATH); - - file = CreateFileA(".\\testfolder\\desktop.ini", GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - ok(file != INVALID_HANDLE_VALUE, "CreateFileA failed %i\n", GetLastError()); - ret = WriteFile(file, desktopini_contents1, strlen(desktopini_contents1), &res, NULL) && - WriteFile(file, resourcefile, strlen(resourcefile), &res, NULL) && - WriteFile(file, desktopini_contents2, strlen(desktopini_contents2), &res, NULL); - ok(ret, "WriteFile failed %i\n", GetLastError()); - CloseHandle(file); - - /* get IShellFolder for parent */ - GetCurrentDirectoryA(MAX_PATH, cCurrDirA); - len = lstrlenA(cCurrDirA); - - if (len == 0) { - win_skip("GetCurrentDirectoryA returned empty string. Skipping test_LocalizedNames\n"); - goto cleanup; - } - if(cCurrDirA[len-1] == '\\') - cCurrDirA[len-1] = 0; - - MultiByteToWideChar(CP_ACP, 0, cCurrDirA, -1, cCurrDirW, MAX_PATH); - - hr = SHGetDesktopFolder(&IDesktopFolder); - ok(hr == S_OK, "SHGetDesktopfolder failed %08x\n", hr); - - hr = IShellFolder_ParseDisplayName(IDesktopFolder, NULL, NULL, cCurrDirW, NULL, &newPIDL, 0); - ok(hr == S_OK, "ParseDisplayName failed %08x\n", hr); - - hr = IShellFolder_BindToObject(IDesktopFolder, newPIDL, NULL, (REFIID)&IID_IShellFolder, (LPVOID *)&testIShellFolder); - ok(hr == S_OK, "BindToObject failed %08x\n", hr); - - IMalloc_Free(ppM, newPIDL); - - /* windows reads the display name from the resource */ - hr = IShellFolder_ParseDisplayName(testIShellFolder, NULL, NULL, foldernameW, NULL, &newPIDL, 0); - ok(hr == S_OK, "ParseDisplayName failed %08x\n", hr); - - hr = IShellFolder_GetDisplayNameOf(testIShellFolder, newPIDL, SHGDN_INFOLDER, &strret); - ok(hr == S_OK, "GetDisplayNameOf failed %08x\n", hr); - - if (hr == S_OK && pStrRetToBufW) - { - hr = pStrRetToBufW(&strret, newPIDL, tempbufW, sizeof(tempbufW)/sizeof(WCHAR)); - ok (hr == S_OK, "StrRetToBufW failed! hr = %08x\n", hr); - todo_wine - ok (!lstrcmpiW(tempbufW, folderdisplayW) || - broken(!lstrcmpiW(tempbufW, foldernameW)), /* W2K */ - "GetDisplayNameOf returned %s\n", wine_dbgstr_w(tempbufW)); - } - - /* editing name is also read from the resource */ - hr = IShellFolder_GetDisplayNameOf(testIShellFolder, newPIDL, SHGDN_INFOLDER|SHGDN_FOREDITING, &strret); - ok(hr == S_OK, "GetDisplayNameOf failed %08x\n", hr); - - if (hr == S_OK && pStrRetToBufW) - { - hr = pStrRetToBufW(&strret, newPIDL, tempbufW, sizeof(tempbufW)/sizeof(WCHAR)); - ok (hr == S_OK, "StrRetToBufW failed! hr = %08x\n", hr); - todo_wine - ok (!lstrcmpiW(tempbufW, folderdisplayW) || - broken(!lstrcmpiW(tempbufW, foldernameW)), /* W2K */ - "GetDisplayNameOf returned %s\n", wine_dbgstr_w(tempbufW)); - } - - /* parsing name is unchanged */ - hr = IShellFolder_GetDisplayNameOf(testIShellFolder, newPIDL, SHGDN_INFOLDER|SHGDN_FORPARSING, &strret); - ok(hr == S_OK, "GetDisplayNameOf failed %08x\n", hr); - - if (hr == S_OK && pStrRetToBufW) - { - hr = pStrRetToBufW(&strret, newPIDL, tempbufW, sizeof(tempbufW)/sizeof(WCHAR)); - ok (hr == S_OK, "StrRetToBufW failed! hr = %08x\n", hr); - ok (!lstrcmpiW(tempbufW, foldernameW), "GetDisplayNameOf returned %s\n", wine_dbgstr_w(tempbufW)); - } - - IShellFolder_Release(IDesktopFolder); - IShellFolder_Release(testIShellFolder); - - IMalloc_Free(ppM, newPIDL); - -cleanup: - DeleteFileA(".\\testfolder\\desktop.ini"); - SetFileAttributesA(".\\testfolder", GetFileAttributesA(".\\testfolder")&~FILE_ATTRIBUTE_SYSTEM); - RemoveDirectoryA(".\\testfolder"); -} - -static void test_SHCreateShellItem(void) -{ - IShellItem *shellitem, *shellitem2; - IPersistIDList *persistidl; - LPITEMIDLIST pidl_cwd=NULL, pidl_testfile, pidl_abstestfile, pidl_test, pidl_desktop; - HRESULT ret; - char curdirA[MAX_PATH]; - WCHAR curdirW[MAX_PATH]; - WCHAR fnbufW[MAX_PATH]; - IShellFolder *desktopfolder=NULL, *currentfolder=NULL; - static WCHAR testfileW[] = {'t','e','s','t','f','i','l','e',0}; - - GetCurrentDirectoryA(MAX_PATH, curdirA); - - if (!pSHCreateShellItem) - { - win_skip("SHCreateShellItem isn't available\n"); - return; - } - - if (!lstrlenA(curdirA)) - { - win_skip("GetCurrentDirectoryA returned empty string, skipping test_SHCreateShellItem\n"); - return; - } - - if(pSHGetSpecialFolderLocation) - { - ret = pSHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidl_desktop); - ok(ret == S_OK, "Got 0x%08x\n", ret); - } - else - { - win_skip("pSHGetSpecialFolderLocation missing.\n"); - pidl_desktop = NULL; - } - - MultiByteToWideChar(CP_ACP, 0, curdirA, -1, curdirW, MAX_PATH); - - ret = SHGetDesktopFolder(&desktopfolder); - ok(SUCCEEDED(ret), "SHGetShellFolder returned %x\n", ret); - - ret = IShellFolder_ParseDisplayName(desktopfolder, NULL, NULL, curdirW, NULL, &pidl_cwd, NULL); - ok(SUCCEEDED(ret), "ParseDisplayName returned %x\n", ret); - - ret = IShellFolder_BindToObject(desktopfolder, pidl_cwd, NULL, &IID_IShellFolder, (void**)¤tfolder); - ok(SUCCEEDED(ret), "BindToObject returned %x\n", ret); - - CreateTestFile(".\\testfile"); - - ret = IShellFolder_ParseDisplayName(currentfolder, NULL, NULL, testfileW, NULL, &pidl_testfile, NULL); - ok(SUCCEEDED(ret), "ParseDisplayName returned %x\n", ret); - - pidl_abstestfile = pILCombine(pidl_cwd, pidl_testfile); - - ret = pSHCreateShellItem(NULL, NULL, NULL, &shellitem); - ok(ret == E_INVALIDARG, "SHCreateShellItem returned %x\n", ret); - - if (0) /* crashes on Windows XP */ - { - pSHCreateShellItem(NULL, NULL, pidl_cwd, NULL); - pSHCreateShellItem(pidl_cwd, NULL, NULL, &shellitem); - pSHCreateShellItem(NULL, currentfolder, NULL, &shellitem); - pSHCreateShellItem(pidl_cwd, currentfolder, NULL, &shellitem); - } - - ret = pSHCreateShellItem(NULL, NULL, pidl_cwd, &shellitem); - ok(SUCCEEDED(ret), "SHCreateShellItem returned %x\n", ret); - if (SUCCEEDED(ret)) - { - ret = IShellItem_QueryInterface(shellitem, &IID_IPersistIDList, (void**)&persistidl); - ok(SUCCEEDED(ret), "QueryInterface returned %x\n", ret); - if (SUCCEEDED(ret)) - { - ret = IPersistIDList_GetIDList(persistidl, &pidl_test); - ok(SUCCEEDED(ret), "GetIDList returned %x\n", ret); - if (SUCCEEDED(ret)) - { - ok(ILIsEqual(pidl_cwd, pidl_test), "id lists are not equal\n"); - pILFree(pidl_test); - } - IPersistIDList_Release(persistidl); - } - IShellItem_Release(shellitem); - } - - ret = pSHCreateShellItem(pidl_cwd, NULL, pidl_testfile, &shellitem); - ok(SUCCEEDED(ret), "SHCreateShellItem returned %x\n", ret); - if (SUCCEEDED(ret)) - { - ret = IShellItem_QueryInterface(shellitem, &IID_IPersistIDList, (void**)&persistidl); - ok(SUCCEEDED(ret), "QueryInterface returned %x\n", ret); - if (SUCCEEDED(ret)) - { - ret = IPersistIDList_GetIDList(persistidl, &pidl_test); - ok(SUCCEEDED(ret), "GetIDList returned %x\n", ret); - if (SUCCEEDED(ret)) - { - ok(ILIsEqual(pidl_abstestfile, pidl_test), "id lists are not equal\n"); - pILFree(pidl_test); - } - IPersistIDList_Release(persistidl); - } - - ret = IShellItem_GetParent(shellitem, &shellitem2); - ok(SUCCEEDED(ret), "GetParent returned %x\n", ret); - if (SUCCEEDED(ret)) - { - ret = IShellItem_QueryInterface(shellitem2, &IID_IPersistIDList, (void**)&persistidl); - ok(SUCCEEDED(ret), "QueryInterface returned %x\n", ret); - if (SUCCEEDED(ret)) - { - ret = IPersistIDList_GetIDList(persistidl, &pidl_test); - ok(SUCCEEDED(ret), "GetIDList returned %x\n", ret); - if (SUCCEEDED(ret)) - { - ok(ILIsEqual(pidl_cwd, pidl_test), "id lists are not equal\n"); - pILFree(pidl_test); - } - IPersistIDList_Release(persistidl); - } - IShellItem_Release(shellitem2); - } - - IShellItem_Release(shellitem); - } - - ret = pSHCreateShellItem(NULL, currentfolder, pidl_testfile, &shellitem); - ok(SUCCEEDED(ret), "SHCreateShellItem returned %x\n", ret); - if (SUCCEEDED(ret)) - { - ret = IShellItem_QueryInterface(shellitem, &IID_IPersistIDList, (void**)&persistidl); - ok(SUCCEEDED(ret), "QueryInterface returned %x\n", ret); - if (SUCCEEDED(ret)) - { - ret = IPersistIDList_GetIDList(persistidl, &pidl_test); - ok(SUCCEEDED(ret), "GetIDList returned %x\n", ret); - if (SUCCEEDED(ret)) - { - ok(ILIsEqual(pidl_abstestfile, pidl_test), "id lists are not equal\n"); - pILFree(pidl_test); - } - IPersistIDList_Release(persistidl); - } - IShellItem_Release(shellitem); - } - - /* if a parent pidl and shellfolder are specified, the shellfolder is ignored */ - ret = pSHCreateShellItem(pidl_cwd, desktopfolder, pidl_testfile, &shellitem); - ok(SUCCEEDED(ret), "SHCreateShellItem returned %x\n", ret); - if (SUCCEEDED(ret)) - { - ret = IShellItem_QueryInterface(shellitem, &IID_IPersistIDList, (void**)&persistidl); - ok(SUCCEEDED(ret), "QueryInterface returned %x\n", ret); - if (SUCCEEDED(ret)) - { - ret = IPersistIDList_GetIDList(persistidl, &pidl_test); - ok(SUCCEEDED(ret), "GetIDList returned %x\n", ret); - if (SUCCEEDED(ret)) - { - ok(ILIsEqual(pidl_abstestfile, pidl_test), "id lists are not equal\n"); - pILFree(pidl_test); - } - IPersistIDList_Release(persistidl); - } - IShellItem_Release(shellitem); - } - - ret = pSHCreateShellItem(NULL, desktopfolder, pidl_testfile, &shellitem); - ok(SUCCEEDED(ret), "SHCreateShellItem returned %x\n", ret); - if (SUCCEEDED(ret)) - { - ret = IShellItem_QueryInterface(shellitem, &IID_IPersistIDList, (void**)&persistidl); - ok(SUCCEEDED(ret), "QueryInterface returned %x\n", ret); - if (SUCCEEDED(ret)) - { - ret = IPersistIDList_GetIDList(persistidl, &pidl_test); - ok(SUCCEEDED(ret), "GetIDList returned %x\n", ret); - if (SUCCEEDED(ret)) - { - ok(ILIsEqual(pidl_testfile, pidl_test), "id lists are not equal\n"); - pILFree(pidl_test); - } - IPersistIDList_Release(persistidl); - } - - IShellItem_Release(shellitem); - } - - ret = pSHCreateShellItem(NULL, NULL, pidl_desktop, &shellitem); - ok(SUCCEEDED(ret), "SHCreateShellItem returned %x\n", ret); - if (SUCCEEDED(ret)) - { - ret = IShellItem_GetParent(shellitem, &shellitem2); - ok(FAILED(ret), "Got 0x%08x\n", ret); - if(SUCCEEDED(ret)) IShellItem_Release(shellitem2); - IShellItem_Release(shellitem); - } - - /* SHCreateItemFromParsingName */ - if(pSHCreateItemFromParsingName) - { - if(0) - { - /* Crashes under windows 7 */ - pSHCreateItemFromParsingName(NULL, NULL, &IID_IShellItem, NULL); - } - - shellitem = (void*)0xdeadbeef; - ret = pSHCreateItemFromParsingName(NULL, NULL, &IID_IShellItem, (void**)&shellitem); - ok(ret == E_INVALIDARG, "SHCreateItemFromParsingName returned %x\n", ret); - ok(shellitem == NULL, "shellitem was %p.\n", shellitem); - - ret = pSHCreateItemFromParsingName(testfileW, NULL, &IID_IShellItem, (void**)&shellitem); - ok(ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "SHCreateItemFromParsingName returned %x\n", ret); - if(SUCCEEDED(ret)) IShellItem_Release(shellitem); - - lstrcpyW(fnbufW, curdirW); - myPathAddBackslashW(fnbufW); - lstrcatW(fnbufW, testfileW); - - ret = pSHCreateItemFromParsingName(fnbufW, NULL, &IID_IShellItem, (void**)&shellitem); - ok(ret == S_OK, "SHCreateItemFromParsingName returned %x\n", ret); - if(SUCCEEDED(ret)) - { - LPWSTR tmp_fname; - ret = IShellItem_GetDisplayName(shellitem, SIGDN_FILESYSPATH, &tmp_fname); - ok(ret == S_OK, "GetDisplayName returned %x\n", ret); - if(SUCCEEDED(ret)) - { - ok(!lstrcmpW(fnbufW, tmp_fname), "strings not equal\n"); - CoTaskMemFree(tmp_fname); - } - IShellItem_Release(shellitem); - } - } - else - win_skip("No SHCreateItemFromParsingName\n"); - - - /* SHCreateItemFromIDList */ - if(pSHCreateItemFromIDList) - { - if(0) - { - /* Crashes under win7 */ - pSHCreateItemFromIDList(NULL, &IID_IShellItem, NULL); - } - - ret = pSHCreateItemFromIDList(NULL, &IID_IShellItem, (void**)&shellitem); - ok(ret == E_INVALIDARG, "SHCreateItemFromIDList returned %x\n", ret); - - ret = pSHCreateItemFromIDList(pidl_cwd, &IID_IShellItem, (void**)&shellitem); - ok(ret == S_OK, "SHCreateItemFromIDList returned %x\n", ret); - if (SUCCEEDED(ret)) - { - ret = IShellItem_QueryInterface(shellitem, &IID_IPersistIDList, (void**)&persistidl); - ok(ret == S_OK, "QueryInterface returned %x\n", ret); - if (SUCCEEDED(ret)) - { - ret = IPersistIDList_GetIDList(persistidl, &pidl_test); - ok(ret == S_OK, "GetIDList returned %x\n", ret); - if (SUCCEEDED(ret)) - { - ok(ILIsEqual(pidl_cwd, pidl_test), "id lists are not equal\n"); - pILFree(pidl_test); - } - IPersistIDList_Release(persistidl); - } - IShellItem_Release(shellitem); - } - - ret = pSHCreateItemFromIDList(pidl_testfile, &IID_IShellItem, (void**)&shellitem); - ok(ret == S_OK, "SHCreateItemFromIDList returned %x\n", ret); - if (SUCCEEDED(ret)) - { - ret = IShellItem_QueryInterface(shellitem, &IID_IPersistIDList, (void**)&persistidl); - ok(ret == S_OK, "QueryInterface returned %x\n", ret); - if (SUCCEEDED(ret)) - { - ret = IPersistIDList_GetIDList(persistidl, &pidl_test); - ok(ret == S_OK, "GetIDList returned %x\n", ret); - if (SUCCEEDED(ret)) - { - ok(ILIsEqual(pidl_testfile, pidl_test), "id lists are not equal\n"); - pILFree(pidl_test); - } - IPersistIDList_Release(persistidl); - } - IShellItem_Release(shellitem); - } - } - else - win_skip("No SHCreateItemFromIDList\n"); - - DeleteFileA(".\\testfile"); - pILFree(pidl_abstestfile); - pILFree(pidl_testfile); - pILFree(pidl_desktop); - pILFree(pidl_cwd); - IShellFolder_Release(currentfolder); - IShellFolder_Release(desktopfolder); -} - -static void test_SHGetNameFromIDList(void) -{ - IShellItem *shellitem; - LPITEMIDLIST pidl; - LPWSTR name_string; - HRESULT hres; - UINT i; - static const DWORD flags[] = { - SIGDN_NORMALDISPLAY, SIGDN_PARENTRELATIVEPARSING, - SIGDN_DESKTOPABSOLUTEPARSING,SIGDN_PARENTRELATIVEEDITING, - SIGDN_DESKTOPABSOLUTEEDITING, /*SIGDN_FILESYSPATH, SIGDN_URL, */ - SIGDN_PARENTRELATIVEFORADDRESSBAR,SIGDN_PARENTRELATIVE, -1234}; - - if(!pSHGetNameFromIDList) - { - win_skip("SHGetNameFromIDList missing.\n"); - return; - } - - /* These should be available on any platform that passed the above test. */ - ok(pSHCreateShellItem != NULL, "SHCreateShellItem missing.\n"); - ok(pSHBindToParent != NULL, "SHBindToParent missing.\n"); - ok(pSHGetSpecialFolderLocation != NULL, "SHGetSpecialFolderLocation missing.\n"); - ok(pStrRetToBufW != NULL, "StrRetToBufW missing.\n"); - - if(0) - { - /* Crashes under win7 */ - pSHGetNameFromIDList(NULL, 0, NULL); - } - - hres = pSHGetNameFromIDList(NULL, 0, &name_string); - ok(hres == E_INVALIDARG, "Got 0x%08x\n", hres); - - /* Test the desktop */ - hres = pSHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidl); - ok(hres == S_OK, "Got 0x%08x\n", hres); - hres = pSHCreateShellItem(NULL, NULL, pidl, &shellitem); - ok(hres == S_OK, "Got 0x%08x\n", hres); - if(SUCCEEDED(hres)) - { - WCHAR *nameSI, *nameSH; - WCHAR buf[MAX_PATH]; - HRESULT hrSI, hrSH, hrSF; - STRRET strret; - IShellFolder *psf; - BOOL res; - - SHGetDesktopFolder(&psf); - for(i = 0; flags[i] != -1234; i++) - { - hrSI = IShellItem_GetDisplayName(shellitem, flags[i], &nameSI); - ok(hrSI == S_OK, "Got 0x%08x\n", hrSI); - hrSH = pSHGetNameFromIDList(pidl, flags[i], &nameSH); - ok(hrSH == S_OK, "Got 0x%08x\n", hrSH); - hrSF = IShellFolder_GetDisplayNameOf(psf, pidl, flags[i] & 0xffff, &strret); - ok(hrSF == S_OK, "Got 0x%08x\n", hrSF); - - if(SUCCEEDED(hrSI) && SUCCEEDED(hrSH)) - ok(!lstrcmpW(nameSI, nameSH), "Strings differ.\n"); - - if(SUCCEEDED(hrSF)) - { - pStrRetToBufW(&strret, NULL, buf, MAX_PATH); - if(SUCCEEDED(hrSI)) - ok(!lstrcmpW(nameSI, buf), "Strings differ.\n"); - if(SUCCEEDED(hrSF)) - ok(!lstrcmpW(nameSI, buf), "Strings differ.\n"); - } - if(SUCCEEDED(hrSI)) CoTaskMemFree(nameSI); - if(SUCCEEDED(hrSH)) CoTaskMemFree(nameSH); - } - IShellFolder_Release(psf); - - if(pSHGetPathFromIDListW){ - hrSI = pSHGetNameFromIDList(pidl, SIGDN_FILESYSPATH, &nameSI); - ok(hrSI == S_OK, "Got 0x%08x\n", hrSI); - res = pSHGetPathFromIDListW(pidl, buf); - ok(res == TRUE, "Got %d\n", res); - if(SUCCEEDED(hrSI) && res) - ok(!lstrcmpW(nameSI, buf), "Strings differ.\n"); - if(SUCCEEDED(hrSI)) CoTaskMemFree(nameSI); - }else - win_skip("pSHGetPathFromIDListW not available\n"); - - hres = pSHGetNameFromIDList(pidl, SIGDN_URL, &name_string); - todo_wine ok(hres == S_OK, "Got 0x%08x\n", hres); - if(SUCCEEDED(hres)) CoTaskMemFree(name_string); - - IShellItem_Release(shellitem); - } - pILFree(pidl); - - /* Test the control panel */ - hres = pSHGetSpecialFolderLocation(NULL, CSIDL_CONTROLS, &pidl); - ok(hres == S_OK, "Got 0x%08x\n", hres); - hres = pSHCreateShellItem(NULL, NULL, pidl, &shellitem); - ok(hres == S_OK, "Got 0x%08x\n", hres); - if(SUCCEEDED(hres)) - { - WCHAR *nameSI, *nameSH; - WCHAR buf[MAX_PATH]; - HRESULT hrSI, hrSH, hrSF; - STRRET strret; - IShellFolder *psf; - BOOL res; - - SHGetDesktopFolder(&psf); - for(i = 0; flags[i] != -1234; i++) - { - hrSI = IShellItem_GetDisplayName(shellitem, flags[i], &nameSI); - ok(hrSI == S_OK, "Got 0x%08x\n", hrSI); - hrSH = pSHGetNameFromIDList(pidl, flags[i], &nameSH); - ok(hrSH == S_OK, "Got 0x%08x\n", hrSH); - hrSF = IShellFolder_GetDisplayNameOf(psf, pidl, flags[i] & 0xffff, &strret); - ok(hrSF == S_OK, "Got 0x%08x\n", hrSF); - - if(SUCCEEDED(hrSI) && SUCCEEDED(hrSH)) - ok(!lstrcmpW(nameSI, nameSH), "Strings differ.\n"); - - if(SUCCEEDED(hrSF)) - { - pStrRetToBufW(&strret, NULL, buf, MAX_PATH); - if(SUCCEEDED(hrSI)) - ok(!lstrcmpW(nameSI, buf), "Strings differ.\n"); - if(SUCCEEDED(hrSF)) - ok(!lstrcmpW(nameSI, buf), "Strings differ.\n"); - } - if(SUCCEEDED(hrSI)) CoTaskMemFree(nameSI); - if(SUCCEEDED(hrSH)) CoTaskMemFree(nameSH); - } - IShellFolder_Release(psf); - - if(pSHGetPathFromIDListW){ - hrSI = pSHGetNameFromIDList(pidl, SIGDN_FILESYSPATH, &nameSI); - ok(hrSI == E_INVALIDARG, "Got 0x%08x\n", hrSI); - res = pSHGetPathFromIDListW(pidl, buf); - ok(res == FALSE, "Got %d\n", res); - if(SUCCEEDED(hrSI) && res) - ok(!lstrcmpW(nameSI, buf), "Strings differ.\n"); - if(SUCCEEDED(hrSI)) CoTaskMemFree(nameSI); - }else - win_skip("pSHGetPathFromIDListW not available\n"); - - hres = pSHGetNameFromIDList(pidl, SIGDN_URL, &name_string); - todo_wine ok(hres == E_NOTIMPL /* Win7 */ || hres == S_OK /* Vista */, - "Got 0x%08x\n", hres); - if(SUCCEEDED(hres)) CoTaskMemFree(name_string); - - IShellItem_Release(shellitem); - } - pILFree(pidl); -} - -static void test_SHGetItemFromDataObject(void) -{ - IShellFolder *psfdesktop; - IShellItem *psi; - IShellView *psv; - HRESULT hres; - - if(!pSHGetItemFromDataObject) - { - win_skip("No SHGetItemFromDataObject.\n"); - return; - } - - if(0) - { - /* Crashes under win7 */ - pSHGetItemFromDataObject(NULL, 0, &IID_IShellItem, NULL); - } - - hres = pSHGetItemFromDataObject(NULL, 0, &IID_IShellItem, (void**)&psv); - ok(hres == E_INVALIDARG, "got 0x%08x\n", hres); - - SHGetDesktopFolder(&psfdesktop); - - hres = IShellFolder_CreateViewObject(psfdesktop, NULL, &IID_IShellView, (void**)&psv); - ok(hres == S_OK, "got 0x%08x\n", hres); - if(SUCCEEDED(hres)) - { - IEnumIDList *peidl; - IDataObject *pdo; - SHCONTF enum_flags; - - enum_flags = SHCONTF_NONFOLDERS | SHCONTF_FOLDERS | SHCONTF_INCLUDEHIDDEN; - hres = IShellFolder_EnumObjects(psfdesktop, NULL, enum_flags, &peidl); - ok(hres == S_OK, "got 0x%08x\n", hres); - if(SUCCEEDED(hres)) - { - LPITEMIDLIST apidl[5]; - UINT count = 0, i; - - for(count = 0; count < 5; count++) - if(IEnumIDList_Next(peidl, 1, &apidl[count], NULL) != S_OK) - break; - - if(count) - { - hres = IShellFolder_GetUIObjectOf(psfdesktop, NULL, 1, (LPCITEMIDLIST*)apidl, - &IID_IDataObject, NULL, (void**)&pdo); - ok(hres == S_OK, "got 0x%08x\n", hres); - if(SUCCEEDED(hres)) - { - hres = pSHGetItemFromDataObject(pdo, DOGIF_DEFAULT, &IID_IShellItem, (void**)&psi); - ok(hres == S_OK, "got 0x%08x\n", hres); - if(SUCCEEDED(hres)) IShellItem_Release(psi); - hres = pSHGetItemFromDataObject(pdo, DOGIF_TRAVERSE_LINK, &IID_IShellItem, (void**)&psi); - ok(hres == S_OK, "got 0x%08x\n", hres); - if(SUCCEEDED(hres)) IShellItem_Release(psi); - hres = pSHGetItemFromDataObject(pdo, DOGIF_NO_HDROP, &IID_IShellItem, (void**)&psi); - ok(hres == S_OK, "got 0x%08x\n", hres); - if(SUCCEEDED(hres)) IShellItem_Release(psi); - hres = pSHGetItemFromDataObject(pdo, DOGIF_NO_URL, &IID_IShellItem, (void**)&psi); - ok(hres == S_OK, "got 0x%08x\n", hres); - if(SUCCEEDED(hres)) IShellItem_Release(psi); - hres = pSHGetItemFromDataObject(pdo, DOGIF_ONLY_IF_ONE, &IID_IShellItem, (void**)&psi); - ok(hres == S_OK, "got 0x%08x\n", hres); - if(SUCCEEDED(hres)) IShellItem_Release(psi); - - IDataObject_Release(pdo); - } - } - else - skip("No file(s) found - skipping single-file test.\n"); - - if(count > 1) - { - hres = IShellFolder_GetUIObjectOf(psfdesktop, NULL, count, (LPCITEMIDLIST*)apidl, - &IID_IDataObject, NULL, (void**)&pdo); - ok(hres == S_OK, "got 0x%08x\n", hres); - if(SUCCEEDED(hres)) - { - hres = pSHGetItemFromDataObject(pdo, DOGIF_DEFAULT, &IID_IShellItem, (void**)&psi); - ok(hres == S_OK, "got 0x%08x\n", hres); - if(SUCCEEDED(hres)) IShellItem_Release(psi); - hres = pSHGetItemFromDataObject(pdo, DOGIF_TRAVERSE_LINK, &IID_IShellItem, (void**)&psi); - ok(hres == S_OK, "got 0x%08x\n", hres); - if(SUCCEEDED(hres)) IShellItem_Release(psi); - hres = pSHGetItemFromDataObject(pdo, DOGIF_NO_HDROP, &IID_IShellItem, (void**)&psi); - ok(hres == S_OK, "got 0x%08x\n", hres); - if(SUCCEEDED(hres)) IShellItem_Release(psi); - hres = pSHGetItemFromDataObject(pdo, DOGIF_NO_URL, &IID_IShellItem, (void**)&psi); - ok(hres == S_OK, "got 0x%08x\n", hres); - if(SUCCEEDED(hres)) IShellItem_Release(psi); - hres = pSHGetItemFromDataObject(pdo, DOGIF_ONLY_IF_ONE, &IID_IShellItem, (void**)&psi); - ok(hres == E_FAIL, "got 0x%08x\n", hres); - if(SUCCEEDED(hres)) IShellItem_Release(psi); - IDataObject_Release(pdo); - } - } - else - skip("zero or one file found - skipping multi-file test.\n"); - - for(i = 0; i < count; i++) - pILFree(apidl[i]); - - IEnumIDList_Release(peidl); - } - - IShellView_Release(psv); - } - - IShellFolder_Release(psfdesktop); -} - -static void test_ShellItemCompare(void) -{ - IShellItem *psi[9]; /* a\a, a\b, a\c, b\a, .. */ - IShellItem *psi_a = NULL, *psi_b = NULL, *psi_c = NULL; - IShellFolder *psf_desktop, *psf_current; - LPITEMIDLIST pidl_cwd; - WCHAR curdirW[MAX_PATH]; - BOOL failed; - HRESULT hr; - static const WCHAR filesW[][9] = { - {'a','\\','a',0}, {'a','\\','b',0}, {'a','\\','c',0}, - {'b','\\','a',0}, {'b','\\','b',0}, {'b','\\','c',0}, - {'c','\\','a',0}, {'c','\\','b',0}, {'c','\\','c',0} }; - int order; - UINT i; - - if(!pSHCreateShellItem) - { - win_skip("SHCreateShellItem missing.\n"); - return; - } - - GetCurrentDirectoryW(MAX_PATH, curdirW); - if(!lstrlenW(curdirW)) - { - skip("Failed to get current directory, skipping.\n"); - return; - } - - CreateDirectoryA(".\\a", NULL); - CreateDirectoryA(".\\b", NULL); - CreateDirectoryA(".\\c", NULL); - CreateTestFile(".\\a\\a"); - CreateTestFile(".\\a\\b"); - CreateTestFile(".\\a\\c"); - CreateTestFile(".\\b\\a"); - CreateTestFile(".\\b\\b"); - CreateTestFile(".\\b\\c"); - CreateTestFile(".\\c\\a"); - CreateTestFile(".\\c\\b"); - CreateTestFile(".\\c\\c"); - - SHGetDesktopFolder(&psf_desktop); - hr = IShellFolder_ParseDisplayName(psf_desktop, NULL, NULL, curdirW, NULL, &pidl_cwd, NULL); - ok(SUCCEEDED(hr), "ParseDisplayName returned %x\n", hr); - hr = IShellFolder_BindToObject(psf_desktop, pidl_cwd, NULL, &IID_IShellFolder, (void**)&psf_current); - ok(SUCCEEDED(hr), "BindToObject returned %x\n", hr); - IShellFolder_Release(psf_desktop); - ILFree(pidl_cwd); - - /* Generate ShellItems for the files */ - memset(&psi, 0, sizeof(psi)); - failed = FALSE; - for(i = 0; i < 9; i++) - { - LPITEMIDLIST pidl_testfile = NULL; - - hr = IShellFolder_ParseDisplayName(psf_current, NULL, NULL, (LPWSTR)filesW[i], - NULL, &pidl_testfile, NULL); - ok(SUCCEEDED(hr), "ParseDisplayName returned %x\n", hr); - if(SUCCEEDED(hr)) - { - hr = pSHCreateShellItem(NULL, NULL, pidl_testfile, &psi[i]); - ok(hr == S_OK, "Got 0x%08x\n", hr); - pILFree(pidl_testfile); - } - if(FAILED(hr)) failed = TRUE; - } - if(failed) - { - skip("Failed to create all shellitems.\n"); - goto cleanup; - } - - /* Generate ShellItems for the folders */ - hr = IShellItem_GetParent(psi[0], &psi_a); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(FAILED(hr)) failed = TRUE; - hr = IShellItem_GetParent(psi[3], &psi_b); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(FAILED(hr)) failed = TRUE; - hr = IShellItem_GetParent(psi[6], &psi_c); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(FAILED(hr)) failed = TRUE; - - if(failed) - { - skip("Failed to create shellitems.\n"); - goto cleanup; - } - - if(0) - { - /* Crashes on native (win7, winxp) */ - IShellItem_Compare(psi_a, NULL, 0, NULL); - IShellItem_Compare(psi_a, psi_b, 0, NULL); - IShellItem_Compare(psi_a, NULL, 0, &order); - } - - /* Basics */ - for(i = 0; i < 9; i++) - { - hr = IShellItem_Compare(psi[i], psi[i], SICHINT_DISPLAY, &order); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(order == 0, "Got order %d\n", order); - hr = IShellItem_Compare(psi[i], psi[i], SICHINT_CANONICAL, &order); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(order == 0, "Got order %d\n", order); - hr = IShellItem_Compare(psi[i], psi[i], SICHINT_ALLFIELDS, &order); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(order == 0, "Got order %d\n", order); - } - - /* Order */ - /* a\b:a\a , a\b:a\c, a\b:a\b */ - hr = IShellItem_Compare(psi[1], psi[0], SICHINT_DISPLAY, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); - ok(order == 1, "Got order %d\n", order); - hr = IShellItem_Compare(psi[1], psi[2], SICHINT_DISPLAY, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); - ok(order == -1, "Got order %d\n", order); - hr = IShellItem_Compare(psi[1], psi[1], SICHINT_DISPLAY, &order); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(order == 0, "Got order %d\n", order); - - /* b\b:a\b, b\b:c\b, b\b:c\b */ - hr = IShellItem_Compare(psi[4], psi[1], SICHINT_DISPLAY, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); - ok(order == 1, "Got order %d\n", order); - hr = IShellItem_Compare(psi[4], psi[7], SICHINT_DISPLAY, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); - ok(order == -1, "Got order %d\n", order); - hr = IShellItem_Compare(psi[4], psi[4], SICHINT_DISPLAY, &order); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(order == 0, "Got order %d\n", order); - - /* b:a\a, b:a\c, b:a\b */ - hr = IShellItem_Compare(psi_b, psi[0], SICHINT_DISPLAY, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); - todo_wine ok(order == 1, "Got order %d\n", order); - hr = IShellItem_Compare(psi_b, psi[2], SICHINT_DISPLAY, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); - todo_wine ok(order == 1, "Got order %d\n", order); - hr = IShellItem_Compare(psi_b, psi[1], SICHINT_DISPLAY, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); - todo_wine ok(order == 1, "Got order %d\n", order); - - /* b:c\a, b:c\c, b:c\b */ - hr = IShellItem_Compare(psi_b, psi[6], SICHINT_DISPLAY, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); - ok(order == -1, "Got order %d\n", order); - hr = IShellItem_Compare(psi_b, psi[8], SICHINT_DISPLAY, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); - ok(order == -1, "Got order %d\n", order); - hr = IShellItem_Compare(psi_b, psi[7], SICHINT_DISPLAY, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); - ok(order == -1, "Got order %d\n", order); - - /* a\b:a\a , a\b:a\c, a\b:a\b */ - hr = IShellItem_Compare(psi[1], psi[0], SICHINT_CANONICAL, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); - ok(order == 1, "Got order %d\n", order); - hr = IShellItem_Compare(psi[1], psi[2], SICHINT_CANONICAL, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); - ok(order == -1, "Got order %d\n", order); - hr = IShellItem_Compare(psi[1], psi[1], SICHINT_CANONICAL, &order); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(order == 0, "Got order %d\n", order); - - /* b\b:a\b, b\b:c\b, b\b:c\b */ - hr = IShellItem_Compare(psi[4], psi[1], SICHINT_CANONICAL, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); - ok(order == 1, "Got order %d\n", order); - hr = IShellItem_Compare(psi[4], psi[7], SICHINT_CANONICAL, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); - ok(order == -1, "Got order %d\n", order); - hr = IShellItem_Compare(psi[4], psi[4], SICHINT_CANONICAL, &order); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(order == 0, "Got order %d\n", order); - - /* b:a\a, b:a\c, b:a\b */ - hr = IShellItem_Compare(psi_b, psi[0], SICHINT_CANONICAL, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); - todo_wine ok(order == 1, "Got order %d\n", order); - hr = IShellItem_Compare(psi_b, psi[2], SICHINT_CANONICAL, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); - todo_wine ok(order == 1, "Got order %d\n", order); - hr = IShellItem_Compare(psi_b, psi[1], SICHINT_CANONICAL, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); - todo_wine ok(order == 1, "Got order %d\n", order); - - /* b:c\a, b:c\c, b:c\b */ - hr = IShellItem_Compare(psi_b, psi[6], SICHINT_CANONICAL, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); - ok(order == -1, "Got order %d\n", order); - hr = IShellItem_Compare(psi_b, psi[8], SICHINT_CANONICAL, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); - ok(order == -1, "Got order %d\n", order); - hr = IShellItem_Compare(psi_b, psi[7], SICHINT_CANONICAL, &order); - ok(hr == S_FALSE, "Got 0x%08x\n", hr); - ok(order == -1, "Got order %d\n", order); - -cleanup: - IShellFolder_Release(psf_current); - - DeleteFileA(".\\a\\a"); - DeleteFileA(".\\a\\b"); - DeleteFileA(".\\a\\c"); - DeleteFileA(".\\b\\a"); - DeleteFileA(".\\b\\b"); - DeleteFileA(".\\b\\c"); - DeleteFileA(".\\c\\a"); - DeleteFileA(".\\c\\b"); - DeleteFileA(".\\c\\c"); - RemoveDirectoryA(".\\a"); - RemoveDirectoryA(".\\b"); - RemoveDirectoryA(".\\c"); - - if(psi_a) IShellItem_Release(psi_a); - if(psi_b) IShellItem_Release(psi_b); - if(psi_c) IShellItem_Release(psi_c); - - for(i = 0; i < 9; i++) - if(psi[i]) IShellItem_Release(psi[i]); -} - -/**************************************************************/ -/* IUnknown implementation for counting QueryInterface calls. */ -typedef struct { - IUnknown IUnknown_iface; - struct if_count { - REFIID id; - LONG count; - } *ifaces; - LONG unknown; -} IUnknownImpl; - -static inline IUnknownImpl *impl_from_IUnknown(IUnknown *iface) -{ - return CONTAINING_RECORD(iface, IUnknownImpl, IUnknown_iface); -} - -static HRESULT WINAPI unk_fnQueryInterface(IUnknown *iunk, REFIID riid, void** punk) -{ - IUnknownImpl *This = impl_from_IUnknown(iunk); - UINT i, found; - for(i = found = 0; This->ifaces[i].id != NULL; i++) - { - if(IsEqualIID(This->ifaces[i].id, riid)) - { - This->ifaces[i].count++; - found = 1; - break; - } - } - if(!found) - This->unknown++; - return E_NOINTERFACE; -} - -static ULONG WINAPI unk_fnAddRef(IUnknown *iunk) -{ - return 2; -} - -static ULONG WINAPI unk_fnRelease(IUnknown *iunk) -{ - return 1; -} - -static const IUnknownVtbl vt_IUnknown = { - unk_fnQueryInterface, - unk_fnAddRef, - unk_fnRelease -}; - -static void test_SHGetIDListFromObject(void) -{ - IUnknownImpl *punkimpl; - IShellFolder *psfdesktop; - IShellView *psv; - LPITEMIDLIST pidl, pidl_desktop; - HRESULT hres; - UINT i; - struct if_count ifaces[] = - { {&IID_IPersistIDList, 0}, - {&IID_IPersistFolder2, 0}, - {&IID_IDataObject, 0}, - {&IID_IParentAndItem, 0}, - {&IID_IFolderView, 0}, - {NULL, 0} }; - - if(!pSHGetIDListFromObject) - { - win_skip("SHGetIDListFromObject missing.\n"); - return; - } - - ok(pSHGetSpecialFolderLocation != NULL, "SHGetSpecialFolderLocation missing.\n"); - - if(0) - { - /* Crashes native */ - pSHGetIDListFromObject(NULL, NULL); - pSHGetIDListFromObject((void*)0xDEADBEEF, NULL); - } - - hres = pSHGetIDListFromObject(NULL, &pidl); - ok(hres == E_NOINTERFACE, "Got %x\n", hres); - - punkimpl = HeapAlloc(GetProcessHeap(), 0, sizeof(IUnknownImpl)); - punkimpl->IUnknown_iface.lpVtbl = &vt_IUnknown; - punkimpl->ifaces = ifaces; - punkimpl->unknown = 0; - - hres = pSHGetIDListFromObject((IUnknown*)punkimpl, &pidl); - ok(hres == E_NOINTERFACE, "Got %x\n", hres); - ok(ifaces[0].count, "interface not requested.\n"); - ok(ifaces[1].count, "interface not requested.\n"); - ok(ifaces[2].count, "interface not requested.\n"); - todo_wine - ok(ifaces[3].count || broken(!ifaces[3].count /*vista*/), - "interface not requested.\n"); - ok(ifaces[4].count || broken(!ifaces[4].count /*vista*/), - "interface not requested.\n"); - - ok(!punkimpl->unknown, "Got %d unknown.\n", punkimpl->unknown); - HeapFree(GetProcessHeap(), 0, punkimpl); - - pidl_desktop = NULL; - pSHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidl_desktop); - ok(pidl_desktop != NULL, "Failed to get desktop pidl.\n"); - - SHGetDesktopFolder(&psfdesktop); - - /* Test IShellItem */ - if(pSHCreateShellItem) - { - IShellItem *shellitem; - hres = pSHCreateShellItem(NULL, NULL, pidl_desktop, &shellitem); - ok(hres == S_OK, "got 0x%08x\n", hres); - if(SUCCEEDED(hres)) - { - hres = pSHGetIDListFromObject((IUnknown*)shellitem, &pidl); - ok(hres == S_OK, "got 0x%08x\n", hres); - if(SUCCEEDED(hres)) - { - ok(ILIsEqual(pidl_desktop, pidl), "pidl not equal.\n"); - pILFree(pidl); - } - IShellItem_Release(shellitem); - } - } - else - skip("no SHCreateShellItem.\n"); - - /* Test IShellFolder */ - hres = pSHGetIDListFromObject((IUnknown*)psfdesktop, &pidl); - ok(hres == S_OK, "got 0x%08x\n", hres); - if(SUCCEEDED(hres)) - { - ok(ILIsEqual(pidl_desktop, pidl), "pidl not equal.\n"); - pILFree(pidl); - } - - hres = IShellFolder_CreateViewObject(psfdesktop, NULL, &IID_IShellView, (void**)&psv); - ok(hres == S_OK, "got 0x%08x\n", hres); - if(SUCCEEDED(hres)) - { - IEnumIDList *peidl; - IDataObject *pdo; - SHCONTF enum_flags; - - /* Test IFolderView */ - hres = pSHGetIDListFromObject((IUnknown*)psv, &pidl); - ok(hres == S_OK, "got 0x%08x\n", hres); - if(SUCCEEDED(hres)) - { - ok(ILIsEqual(pidl_desktop, pidl), "pidl not equal.\n"); - pILFree(pidl); - } - - /* Test IDataObject */ - enum_flags = SHCONTF_NONFOLDERS | SHCONTF_FOLDERS | SHCONTF_INCLUDEHIDDEN; - hres = IShellFolder_EnumObjects(psfdesktop, NULL, enum_flags, &peidl); - ok(hres == S_OK, "got 0x%08x\n", hres); - if(SUCCEEDED(hres)) - { - LPITEMIDLIST apidl[5]; - UINT count = 0; - for(count = 0; count < 5; count++) - if(IEnumIDList_Next(peidl, 1, &apidl[count], NULL) != S_OK) - break; - - if(count) - { - hres = IShellFolder_GetUIObjectOf(psfdesktop, NULL, 1, (LPCITEMIDLIST*)apidl, - &IID_IDataObject, NULL, (void**)&pdo); - ok(hres == S_OK, "got 0x%08x\n", hres); - if(SUCCEEDED(hres)) - { - pidl = (void*)0xDEADBEEF; - hres = pSHGetIDListFromObject((IUnknown*)pdo, &pidl); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(pidl != NULL, "pidl is NULL.\n"); - ok(ILIsEqual(pidl, apidl[0]), "pidl not equal.\n"); - pILFree(pidl); - - IDataObject_Release(pdo); - } - } - else - skip("No files found - skipping single-file test.\n"); - - if(count > 1) - { - hres = IShellFolder_GetUIObjectOf(psfdesktop, NULL, count, (LPCITEMIDLIST*)apidl, - &IID_IDataObject, NULL, (void**)&pdo); - ok(hres == S_OK, "got 0x%08x\n", hres); - if(SUCCEEDED(hres)) - { - pidl = (void*)0xDEADBEEF; - hres = pSHGetIDListFromObject((IUnknown*)pdo, &pidl); - ok(hres == E_NOINTERFACE || hres == E_FAIL /*Vista*/, - "got 0x%08x\n", hres); - ok(pidl == NULL, "pidl is not NULL.\n"); - - IDataObject_Release(pdo); - } - } - else - skip("zero or one file found - skipping multi-file test.\n"); - - for(i = 0; i < count; i++) - pILFree(apidl[i]); - - IEnumIDList_Release(peidl); - } - - IShellView_Release(psv); - } - - IShellFolder_Release(psfdesktop); - pILFree(pidl_desktop); -} - -static void test_SHGetItemFromObject(void) -{ - IUnknownImpl *punkimpl; - IShellFolder *psfdesktop; - LPITEMIDLIST pidl; - IShellItem *psi; - IUnknown *punk; - HRESULT hres; - struct if_count ifaces[] = - { {&IID_IPersistIDList, 0}, - {&IID_IPersistFolder2, 0}, - {&IID_IDataObject, 0}, - {&IID_IParentAndItem, 0}, - {&IID_IFolderView, 0}, - {NULL, 0} }; - - if(!pSHGetItemFromObject) - { - skip("No SHGetItemFromObject.\n"); - return; - } - - SHGetDesktopFolder(&psfdesktop); - - if(0) - { - /* Crashes with Windows 7 */ - pSHGetItemFromObject((IUnknown*)psfdesktop, &IID_IUnknown, NULL); - pSHGetItemFromObject(NULL, &IID_IUnknown, NULL); - pSHGetItemFromObject((IUnknown*)psfdesktop, NULL, (void**)&punk); - } - - hres = pSHGetItemFromObject(NULL, &IID_IUnknown, (void**)&punk); - ok(hres == E_NOINTERFACE, "Got 0x%08x\n", hres); - - punkimpl = HeapAlloc(GetProcessHeap(), 0, sizeof(IUnknownImpl)); - punkimpl->IUnknown_iface.lpVtbl = &vt_IUnknown; - punkimpl->ifaces = ifaces; - punkimpl->unknown = 0; - - /* The same as SHGetIDListFromObject */ - hres = pSHGetIDListFromObject((IUnknown*)punkimpl, &pidl); - ok(hres == E_NOINTERFACE, "Got %x\n", hres); - ok(ifaces[0].count, "interface not requested.\n"); - ok(ifaces[1].count, "interface not requested.\n"); - ok(ifaces[2].count, "interface not requested.\n"); - todo_wine - ok(ifaces[3].count || broken(!ifaces[3].count /*vista*/), - "interface not requested.\n"); - ok(ifaces[4].count || broken(!ifaces[4].count /*vista*/), - "interface not requested.\n"); - - ok(!punkimpl->unknown, "Got %d unknown.\n", punkimpl->unknown); - HeapFree(GetProcessHeap(), 0, punkimpl); - - /* Test IShellItem */ - hres = pSHGetItemFromObject((IUnknown*)psfdesktop, &IID_IShellItem, (void**)&psi); - ok(hres == S_OK, "Got 0x%08x\n", hres); - if(SUCCEEDED(hres)) - { - IShellItem *psi2; - hres = pSHGetItemFromObject((IUnknown*)psi, &IID_IShellItem, (void**)&psi2); - ok(hres == S_OK, "Got 0x%08x\n", hres); - if(SUCCEEDED(hres)) - { - todo_wine - ok(psi == psi2, "Different instances (%p != %p).\n", psi, psi2); - IShellItem_Release(psi2); - } - IShellItem_Release(psi); - } - - IShellFolder_Release(psfdesktop); -} - -static void test_SHCreateShellItemArray(void) -{ - IShellFolder *pdesktopsf, *psf; - IShellItemArray *psia; - IEnumIDList *peidl; - HRESULT hr; - WCHAR cTestDirW[MAX_PATH]; - LPITEMIDLIST pidl_testdir, pidl; - static const WCHAR testdirW[] = {'t','e','s','t','d','i','r',0}; - - if(!pSHCreateShellItemArray) { - skip("No pSHCreateShellItemArray!\n"); - return; - } - - ok(pSHGetSpecialFolderLocation != NULL, "SHGetSpecialFolderLocation missing.\n"); - - if(0) - { - /* Crashes under native */ - pSHCreateShellItemArray(NULL, NULL, 0, NULL, NULL); - pSHCreateShellItemArray(NULL, NULL, 1, NULL, NULL); - pSHCreateShellItemArray(NULL, pdesktopsf, 0, NULL, NULL); - pSHCreateShellItemArray(pidl, NULL, 0, NULL, NULL); - } - - hr = pSHCreateShellItemArray(NULL, NULL, 0, NULL, &psia); - ok(hr == E_POINTER, "got 0x%08x\n", hr); - - SHGetDesktopFolder(&pdesktopsf); - hr = pSHCreateShellItemArray(NULL, pdesktopsf, 0, NULL, &psia); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); - - hr = pSHCreateShellItemArray(NULL, pdesktopsf, 1, NULL, &psia); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); - - pSHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidl); - hr = pSHCreateShellItemArray(pidl, NULL, 0, NULL, &psia); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); - pILFree(pidl); - - GetCurrentDirectoryW(MAX_PATH, cTestDirW); - myPathAddBackslashW(cTestDirW); - lstrcatW(cTestDirW, testdirW); - - CreateFilesFolders(); - - hr = IShellFolder_ParseDisplayName(pdesktopsf, NULL, NULL, cTestDirW, NULL, &pidl_testdir, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - hr = IShellFolder_BindToObject(pdesktopsf, pidl_testdir, NULL, (REFIID)&IID_IShellFolder, - (void**)&psf); - ok(hr == S_OK, "Got 0x%08x\n", hr); - } - IShellFolder_Release(pdesktopsf); - - if(FAILED(hr)) - { - skip("Failed to set up environment for SHCreateShellItemArray tests.\n"); - pILFree(pidl_testdir); - Cleanup(); - return; - } - - hr = IShellFolder_EnumObjects(psf, NULL, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS, &peidl); - ok(hr == S_OK, "Got %08x\n", hr); - if(SUCCEEDED(hr)) - { - LPITEMIDLIST apidl[5]; - UINT done, numitems, i; - - for(done = 0; done < 5; done++) - if(IEnumIDList_Next(peidl, 1, &apidl[done], NULL) != S_OK) - break; - ok(done == 5, "Got %d pidls\n", done); - IEnumIDList_Release(peidl); - - /* Create a ShellItemArray */ - hr = pSHCreateShellItemArray(NULL, psf, done, (LPCITEMIDLIST*)apidl, &psia); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - IShellItem *psi; - - if(0) - { - /* Crashes in Windows 7 */ - IShellItemArray_GetCount(psia, NULL); - } - - IShellItemArray_GetCount(psia, &numitems); - ok(numitems == done, "Got %d, expected %d\n", numitems, done); - - hr = IShellItemArray_GetItemAt(psia, numitems, &psi); - ok(hr == E_FAIL, "Got 0x%08x\n", hr); - - /* Compare all the items */ - for(i = 0; i < numitems; i++) - { - LPITEMIDLIST pidl_abs; - pidl_abs = ILCombine(pidl_testdir, apidl[i]); - - hr = IShellItemArray_GetItemAt(psia, i, &psi); - ok(hr == S_OK, "(%d) Failed with 0x%08x\n", i, hr); - if(SUCCEEDED(hr)) - { - hr = pSHGetIDListFromObject((IUnknown*)psi, &pidl); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - ok(ILIsEqual(pidl_abs, pidl), "Pidl not equal.\n"); - pILFree(pidl); - } - IShellItem_Release(psi); - } - pILFree(pidl_abs); - } - for(i = 0; i < done; i++) - pILFree(apidl[i]); - IShellItemArray_Release(psia); - } - } - - /* SHCreateShellItemArrayFromShellItem */ - if(pSHCreateShellItemArrayFromShellItem) - { - IShellItem *psi; - - if(0) - { - /* Crashes under Windows 7 */ - pSHCreateShellItemArrayFromShellItem(NULL, &IID_IShellItemArray, NULL); - pSHCreateShellItemArrayFromShellItem(NULL, &IID_IShellItemArray, (void**)&psia); - pSHCreateShellItemArrayFromShellItem(psi, &IID_IShellItemArray, NULL); - } - - hr = pSHCreateItemFromIDList(pidl_testdir, &IID_IShellItem, (void**)&psi); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - hr = pSHCreateShellItemArrayFromShellItem(psi, &IID_IShellItemArray, (void**)&psia); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - IShellItem *psi2; - UINT count; - hr = IShellItemArray_GetCount(psia, &count); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(count == 1, "Got count %d\n", count); - hr = IShellItemArray_GetItemAt(psia, 0, &psi2); - ok(hr == S_OK, "Got 0x%08x\n", hr); - todo_wine - ok(psi != psi2, "ShellItems are of the same instance.\n"); - if(SUCCEEDED(hr)) - { - LPITEMIDLIST pidl1, pidl2; - hr = pSHGetIDListFromObject((IUnknown*)psi, &pidl1); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(pidl1 != NULL, "pidl1 was null.\n"); - hr = pSHGetIDListFromObject((IUnknown*)psi2, &pidl2); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(pidl2 != NULL, "pidl2 was null.\n"); - ok(ILIsEqual(pidl1, pidl2), "pidls not equal.\n"); - pILFree(pidl1); - pILFree(pidl2); - IShellItem_Release(psi2); - } - hr = IShellItemArray_GetItemAt(psia, 1, &psi2); - ok(hr == E_FAIL, "Got 0x%08x\n", hr); - IShellItemArray_Release(psia); - } - IShellItem_Release(psi); - } - } - else - skip("No SHCreateShellItemArrayFromShellItem.\n"); - - if(pSHCreateShellItemArrayFromDataObject) - { - IShellView *psv; - - if(0) - { - /* Crashes under Windows 7 */ - pSHCreateShellItemArrayFromDataObject(NULL, &IID_IShellItemArray, NULL); - } - hr = pSHCreateShellItemArrayFromDataObject(NULL, &IID_IShellItemArray, (void**)&psia); - ok(hr == E_INVALIDARG, "Got 0x%08x\n", hr); - - hr = IShellFolder_CreateViewObject(psf, NULL, &IID_IShellView, (void**)&psv); - ok(hr == S_OK, "got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - IEnumIDList *peidl; - IDataObject *pdo; - SHCONTF enum_flags; - - enum_flags = SHCONTF_NONFOLDERS | SHCONTF_FOLDERS | SHCONTF_INCLUDEHIDDEN; - hr = IShellFolder_EnumObjects(psf, NULL, enum_flags, &peidl); - ok(hr == S_OK, "got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - LPITEMIDLIST apidl[5]; - UINT count, i; - - for(count = 0; count < 5; count++) - if(IEnumIDList_Next(peidl, 1, &apidl[count], NULL) != S_OK) - break; - ok(count == 5, "Got %d\n", count); - - if(count) - { - hr = IShellFolder_GetUIObjectOf(psf, NULL, count, (LPCITEMIDLIST*)apidl, - &IID_IDataObject, NULL, (void**)&pdo); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - hr = pSHCreateShellItemArrayFromDataObject(pdo, &IID_IShellItemArray, - (void**)&psia); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - UINT count_sia, i; - hr = IShellItemArray_GetCount(psia, &count_sia); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(count_sia == count, "Counts differ (%d, %d)\n", count, count_sia); - for(i = 0; i < count_sia; i++) - { - LPITEMIDLIST pidl_abs = ILCombine(pidl_testdir, apidl[i]); - IShellItem *psi; - hr = IShellItemArray_GetItemAt(psia, i, &psi); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - LPITEMIDLIST pidl; - hr = pSHGetIDListFromObject((IUnknown*)psi, &pidl); - ok(hr == S_OK, "Got 0x%08x\n", hr); - ok(pidl != NULL, "pidl as NULL.\n"); - ok(ILIsEqual(pidl, pidl_abs), "pidls differ.\n"); - pILFree(pidl); - IShellItem_Release(psi); - } - pILFree(pidl_abs); - } - - IShellItemArray_Release(psia); - } - - IDataObject_Release(pdo); - } - for(i = 0; i < count; i++) - pILFree(apidl[i]); - } - else - skip("No files found - skipping test.\n"); - - IEnumIDList_Release(peidl); - } - IShellView_Release(psv); - } - } - else - skip("No SHCreateShellItemArrayFromDataObject.\n"); - - IShellFolder_Release(psf); - pILFree(pidl_testdir); - Cleanup(); -} - -static void test_ShellItemBindToHandler(void) -{ - IShellItem *psi; - LPITEMIDLIST pidl_desktop; - HRESULT hr; - - if(!pSHCreateShellItem) - { - skip("SHCreateShellItem missing.\n"); - return; - } - - hr = pSHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidl_desktop); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - hr = pSHCreateShellItem(NULL, NULL, pidl_desktop, &psi); - ok(hr == S_OK, "Got 0x%08x\n", hr); - } - if(SUCCEEDED(hr)) - { - IPersistFolder2 *ppf2; - IUnknown *punk; - - if(0) - { - /* Crashes under Windows 7 */ - IShellItem_BindToHandler(psi, NULL, NULL, NULL, NULL); - IShellItem_BindToHandler(psi, NULL, &IID_IUnknown, &IID_IUnknown, NULL); - } - hr = IShellItem_BindToHandler(psi, NULL, &IID_IUnknown, &IID_IUnknown, (void**)&punk); - ok(hr == MK_E_NOOBJECT, "Got 0x%08x\n", hr); - - /* BHID_SFObject */ - hr = IShellItem_BindToHandler(psi, NULL, &BHID_SFObject, &IID_IShellFolder, (void**)&punk); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); - hr = IShellItem_BindToHandler(psi, NULL, &BHID_SFObject, &IID_IPersistFolder2, (void**)&ppf2); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - LPITEMIDLIST pidl_tmp; - hr = IPersistFolder2_GetCurFolder(ppf2, &pidl_tmp); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - ok(ILIsEqual(pidl_desktop, pidl_tmp), "Pidl not equal (%p, %p)\n", pidl_desktop, pidl_tmp); - pILFree(pidl_tmp); - } - IPersistFolder2_Release(ppf2); - } - - /* BHID_SFUIObject */ - hr = IShellItem_BindToHandler(psi, NULL, &BHID_SFUIObject, &IID_IDataObject, (void**)&punk); - ok(hr == S_OK || broken(hr == E_NOINTERFACE /* XP */), "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); - hr = IShellItem_BindToHandler(psi, NULL, &BHID_SFUIObject, &IID_IContextMenu, (void**)&punk); - ok(hr == S_OK || broken(hr == E_NOINTERFACE /* XP */), "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); - - /* BHID_DataObject */ - hr = IShellItem_BindToHandler(psi, NULL, &BHID_DataObject, &IID_IDataObject, (void**)&punk); - ok(hr == S_OK || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); - - todo_wine - { - /* BHID_SFViewObject */ - hr = IShellItem_BindToHandler(psi, NULL, &BHID_SFViewObject, &IID_IShellView, (void**)&punk); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); - hr = IShellItem_BindToHandler(psi, NULL, &BHID_SFViewObject, &IID_IShellFolderView, (void**)&punk); - ok(hr == E_NOINTERFACE, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); - - /* BHID_Storage */ - hr = IShellItem_BindToHandler(psi, NULL, &BHID_Storage, &IID_IStream, (void**)&punk); - ok(hr == E_NOINTERFACE, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); - hr = IShellItem_BindToHandler(psi, NULL, &BHID_Storage, &IID_IUnknown, (void**)&punk); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); - - /* BHID_Stream */ - hr = IShellItem_BindToHandler(psi, NULL, &BHID_Stream, &IID_IStream, (void**)&punk); - ok(hr == E_NOINTERFACE, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); - hr = IShellItem_BindToHandler(psi, NULL, &BHID_Stream, &IID_IUnknown, (void**)&punk); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); - - /* BHID_StorageEnum */ - hr = IShellItem_BindToHandler(psi, NULL, &BHID_StorageEnum, &IID_IEnumShellItems, (void**)&punk); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); - - /* BHID_Transfer */ - hr = IShellItem_BindToHandler(psi, NULL, &BHID_Transfer, &IID_IUnknown, (void**)&punk); - ok(hr == E_NOINTERFACE || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); - - /* BHID_EnumItems */ - hr = IShellItem_BindToHandler(psi, NULL, &BHID_EnumItems, &IID_IEnumShellItems, (void**)&punk); - ok(hr == S_OK || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); - - /* BHID_Filter */ - hr = IShellItem_BindToHandler(psi, NULL, &BHID_Filter, &IID_IUnknown, (void**)&punk); - ok(hr == S_OK || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); - - /* BHID_LinkTargetItem */ - hr = IShellItem_BindToHandler(psi, NULL, &BHID_LinkTargetItem, &IID_IShellItem, (void**)&punk); - ok(hr == E_NOINTERFACE || broken(hr == E_INVALIDARG /* XP */), "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); - hr = IShellItem_BindToHandler(psi, NULL, &BHID_LinkTargetItem, &IID_IUnknown, (void**)&punk); - ok(hr == E_NOINTERFACE || broken(hr == E_INVALIDARG /* XP */), "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); - - /* BHID_PropertyStore */ - hr = IShellItem_BindToHandler(psi, NULL, &BHID_PropertyStore, &IID_IPropertyStore, (void**)&punk); - ok(hr == E_NOINTERFACE || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); - hr = IShellItem_BindToHandler(psi, NULL, &BHID_PropertyStore, &IID_IPropertyStoreFactory, (void**)&punk); - ok(hr == E_NOINTERFACE || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); - - /* BHID_ThumbnailHandler */ - hr = IShellItem_BindToHandler(psi, NULL, &BHID_ThumbnailHandler, &IID_IUnknown, (void**)&punk); - ok(hr == E_INVALIDARG || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); - - /* BHID_AssociationArray */ - hr = IShellItem_BindToHandler(psi, NULL, &BHID_AssociationArray, &IID_IQueryAssociations, (void**)&punk); - ok(hr == S_OK || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); - - /* BHID_EnumAssocHandlers */ - hr = IShellItem_BindToHandler(psi, NULL, &BHID_EnumAssocHandlers, &IID_IUnknown, (void**)&punk); - ok(hr == E_NOINTERFACE || broken(hr == MK_E_NOOBJECT /* XP */), "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) IUnknown_Release(punk); - } - - IShellItem_Release(psi); - } - else - skip("Failed to create ShellItem.\n"); - - pILFree(pidl_desktop); -} - -static void test_ShellItemGetAttributes(void) -{ - IShellItem *psi; - LPITEMIDLIST pidl_desktop; - SFGAOF sfgao; - HRESULT hr; - - if(!pSHCreateShellItem) - { - skip("SHCreateShellItem missing.\n"); - return; - } - - hr = pSHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidl_desktop); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - hr = pSHCreateShellItem(NULL, NULL, pidl_desktop, &psi); - ok(hr == S_OK, "Got 0x%08x\n", hr); - pILFree(pidl_desktop); - } - if(FAILED(hr)) - { - skip("Skipping tests.\n"); - return; - } - - if(0) - { - /* Crashes on native (Win 7) */ - IShellItem_GetAttributes(psi, 0, NULL); - } - - /* Test GetAttributes on the desktop folder. */ - sfgao = 0xdeadbeef; - hr = IShellItem_GetAttributes(psi, SFGAO_FOLDER, &sfgao); - ok(hr == S_OK || broken(hr == E_FAIL) /* 0, "GetSystemDirectoryW failed: %u\n", GetLastError()); - hr = pSHParseDisplayName(dirW, NULL, &pidl1, 0, NULL); - ok(hr == S_OK, "failed %08x\n", hr); - *dirW = 0; - ok(pGetSystemWow64DirectoryW(dirW, MAX_PATH) > 0, "GetSystemWow64DirectoryW failed: %u\n", GetLastError()); - hr = pSHParseDisplayName(dirW, NULL, &pidl2, 0, NULL); - ok(hr == S_OK, "failed %08x\n", hr); - ret = pILIsEqual(pidl1, pidl2); - ok(ret == FALSE, "expected different idls\n"); - pILFree(pidl1); - pILFree(pidl2); - } - - IShellFolder_Release(desktop); -} - -static void test_desktop_IPersist(void) -{ - IShellFolder *desktop; - IPersist *persist; - IPersistFolder2 *ppf2; - CLSID clsid; - HRESULT hr; - - hr = SHGetDesktopFolder(&desktop); - ok(hr == S_OK, "failed %08x\n", hr); - - hr = IShellFolder_QueryInterface(desktop, &IID_IPersist, (void**)&persist); - ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* NT4, W9X */, "failed %08x\n", hr); - - if (hr == S_OK) - { - if (0) - { - /* crashes on native */ - IPersist_GetClassID(persist, NULL); - } - memset(&clsid, 0, sizeof(clsid)); - hr = IPersist_GetClassID(persist, &clsid); - ok(hr == S_OK, "failed %08x\n", hr); - ok(IsEqualIID(&CLSID_ShellDesktop, &clsid), "Expected CLSID_ShellDesktop\n"); - IPersist_Release(persist); - } - - hr = IShellFolder_QueryInterface(desktop, &IID_IPersistFolder2, (void**)&ppf2); - ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* pre-Vista */, "failed %08x\n", hr); - if(SUCCEEDED(hr)) - { - IPersistFolder *ppf; - LPITEMIDLIST pidl; - hr = IShellFolder_QueryInterface(desktop, &IID_IPersistFolder, (void**)&ppf); - ok(hr == S_OK, "IID_IPersistFolder2 without IID_IPersistFolder.\n"); - if(SUCCEEDED(hr)) - IPersistFolder_Release(ppf); - - todo_wine { - hr = IPersistFolder2_Initialize(ppf2, NULL); - ok(hr == S_OK, "got %08x\n", hr); - } - - pidl = NULL; - hr = IPersistFolder2_GetCurFolder(ppf2, &pidl); - ok(hr == S_OK, "got %08x\n", hr); - ok(pidl != NULL, "pidl was NULL.\n"); - if(SUCCEEDED(hr)) pILFree(pidl); - - IPersistFolder2_Release(ppf2); - } - - IShellFolder_Release(desktop); -} - -static void test_GetUIObject(void) -{ - IShellFolder *psf_desktop; - IContextMenu *pcm; - LPITEMIDLIST pidl; - HRESULT hr; - WCHAR path[MAX_PATH]; - const WCHAR filename[] = - {'\\','t','e','s','t','d','i','r','\\','t','e','s','t','1','.','t','x','t',0}; - - if(!pSHBindToParent) - { - win_skip("SHBindToParent missing.\n"); - return; - } - - GetCurrentDirectoryW(MAX_PATH, path); - if(!lstrlenW(path)) - { - skip("GetCurrentDirectoryW returned an empty string.\n"); - return; - } - lstrcatW(path, filename); - SHGetDesktopFolder(&psf_desktop); - - CreateFilesFolders(); - - hr = IShellFolder_ParseDisplayName(psf_desktop, NULL, NULL, path, NULL, &pidl, 0); - ok(hr == S_OK || broken(hr == E_FAIL) /* WinME */, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - IShellFolder *psf; - LPCITEMIDLIST pidl_child; - hr = pSHBindToParent(pidl, &IID_IShellFolder, (void**)&psf, &pidl_child); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - hr = IShellFolder_GetUIObjectOf(psf, NULL, 1, &pidl_child, &IID_IContextMenu, NULL, - (void**)&pcm); - ok(hr == S_OK, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - HMENU hmenu = CreatePopupMenu(); - INT max_id, max_id_check; - UINT count, i; - const int id_upper_limit = 32767; - hr = IContextMenu_QueryContextMenu(pcm, hmenu, 0, 0, id_upper_limit, CMF_NORMAL); - ok(SUCCEEDED(hr), "Got 0x%08x\n", hr); - max_id = HRESULT_CODE(hr) - 1; /* returns max_id + 1 */ - ok(max_id <= id_upper_limit, "Got %d\n", max_id); - count = GetMenuItemCount(hmenu); - ok(count, "Got %d\n", count); - - max_id_check = 0; - for(i = 0; i < count; i++) - { - MENUITEMINFOA mii; - INT res; - ZeroMemory(&mii, sizeof(MENUITEMINFOA)); - mii.cbSize = sizeof(MENUITEMINFOA); - mii.fMask = MIIM_ID | MIIM_FTYPE; - - SetLastError(0); - res = GetMenuItemInfoA(hmenu, i, TRUE, &mii); - ok(res, "Failed (last error: %d).\n", GetLastError()); - - ok( (mii.wID <= id_upper_limit) || (mii.fType & MFT_SEPARATOR), - "Got non-separator ID out of range: %d (type: %x)\n", mii.wID, mii.fType); - if(!(mii.fType & MFT_SEPARATOR)) - max_id_check = (mii.wID>max_id_check)?mii.wID:max_id_check; - } - ok((max_id_check == max_id) || - (max_id_check == max_id-1 /* Win 7 */), - "Not equal (or near equal), got %d and %d\n", max_id_check, max_id); - -#define is_win2k() (pSHGetFolderPathA && !pSHGetFolderPathAndSubDirA) - - if(count && !is_win2k()) /* Test is interactive on w2k, so skip */ - { - CMINVOKECOMMANDINFO cmi; - ZeroMemory(&cmi, sizeof(CMINVOKECOMMANDINFO)); - cmi.cbSize = sizeof(CMINVOKECOMMANDINFO); - - /* Attempt to execute a nonexistent command */ - cmi.lpVerb = MAKEINTRESOURCEA(9999); - hr = IContextMenu_InvokeCommand(pcm, &cmi); - ok(hr == E_INVALIDARG, "Got 0x%08x\n", hr); - - cmi.lpVerb = "foobar_wine_test"; - hr = IContextMenu_InvokeCommand(pcm, &cmi); - ok( (hr == E_INVALIDARG) || (hr == E_FAIL /* Win7 */) || - (hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION) /* Vista */), - "Got 0x%08x\n", hr); - } -#undef is_win2k - - DestroyMenu(hmenu); - IContextMenu_Release(pcm); - } - IShellFolder_Release(psf); - } - if(pILFree) pILFree(pidl); - } - - IShellFolder_Release(psf_desktop); - Cleanup(); -} - -#define verify_pidl(i,p) r_verify_pidl(__LINE__, i, p) -static void r_verify_pidl(unsigned l, LPCITEMIDLIST pidl, const WCHAR *path) -{ - LPCITEMIDLIST child; - IShellFolder *parent; - STRRET filename; - HRESULT hr; - - if(!pSHBindToParent){ - win_skip("SHBindToParent is not available, not performing full PIDL verification\n"); - if(path) - ok_(__FILE__,l)(pidl != NULL, "Expected PIDL to be non-NULL\n"); - else - ok_(__FILE__,l)(pidl == NULL, "Expected PIDL to be NULL\n"); - return; - } - - if(path){ - if(!pidl){ - ok_(__FILE__,l)(0, "didn't get expected path (%s), instead: NULL\n", wine_dbgstr_w(path)); - return; - } - - hr = pSHBindToParent(pidl, &IID_IShellFolder, (LPVOID*)&parent, &child); - ok_(__FILE__,l)(hr == S_OK, "SHBindToParent failed: 0x%08x\n", hr); - if(FAILED(hr)) - return; - - hr = IShellFolder_GetDisplayNameOf(parent, child, SHGDN_FORPARSING, &filename); - ok_(__FILE__,l)(hr == S_OK, "GetDisplayNameOf failed: 0x%08x\n", hr); - if(FAILED(hr)){ - IShellFolder_Release(parent); - return; - } - - ok_(__FILE__,l)(filename.uType == STRRET_WSTR || filename.uType == STRRET_CSTR, - "Got unexpected string type: %d\n", filename.uType); - if(filename.uType == STRRET_WSTR){ - ok_(__FILE__,l)(lstrcmpW(path, U(filename).pOleStr) == 0, - "didn't get expected path (%s), instead: %s\n", - wine_dbgstr_w(path), wine_dbgstr_w(U(filename).pOleStr)); - SHFree(U(filename).pOleStr); - }else if(filename.uType == STRRET_CSTR){ - ok_(__FILE__,l)(strcmp_wa(path, U(filename).cStr) == 0, - "didn't get expected path (%s), instead: %s\n", - wine_dbgstr_w(path), U(filename).cStr); - } - - IShellFolder_Release(parent); - }else - ok_(__FILE__,l)(pidl == NULL, "Expected PIDL to be NULL\n"); -} - -static void test_SHSimpleIDListFromPath(void) -{ - const WCHAR adirW[] = {'C',':','\\','s','i','d','l','f','p','d','i','r',0}; - const CHAR adirA[] = "C:\\sidlfpdir"; - BOOL br, is_unicode = !(GetVersion() & 0x80000000); - - LPITEMIDLIST pidl = NULL; - - if(!pSHSimpleIDListFromPathAW){ - win_skip("SHSimpleIDListFromPathAW not available\n"); - return; - } - - br = CreateDirectoryA(adirA, NULL); - ok(br == TRUE, "CreateDirectory failed: %d\n", GetLastError()); - - if(is_unicode) - pidl = pSHSimpleIDListFromPathAW(adirW); - else - pidl = pSHSimpleIDListFromPathAW(adirA); - verify_pidl(pidl, adirW); - pILFree(pidl); - - br = RemoveDirectoryA(adirA); - ok(br == TRUE, "RemoveDirectory failed: %d\n", GetLastError()); - - if(is_unicode) - pidl = pSHSimpleIDListFromPathAW(adirW); - else - pidl = pSHSimpleIDListFromPathAW(adirA); - verify_pidl(pidl, adirW); - pILFree(pidl); -} - -/* IFileSystemBindData impl */ -static HRESULT WINAPI fsbd_QueryInterface(IFileSystemBindData *fsbd, - REFIID riid, void **ppv) -{ - if(IsEqualIID(riid, &IID_IFileSystemBindData) || - IsEqualIID(riid, &IID_IUnknown)){ - *ppv = fsbd; - return S_OK; - } - return E_NOINTERFACE; -} - -static ULONG WINAPI fsbd_AddRef(IFileSystemBindData *fsbd) -{ - return 2; -} - -static ULONG WINAPI fsbd_Release(IFileSystemBindData *fsbd) -{ - return 1; -} - -static HRESULT WINAPI fsbd_SetFindData(IFileSystemBindData *fsbd, - const WIN32_FIND_DATAW *pfd) -{ - ok(0, "SetFindData called\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI fsbd_GetFindData_nul(IFileSystemBindData *fsbd, - WIN32_FIND_DATAW *pfd) -{ - memset(pfd, 0, sizeof(WIN32_FIND_DATAW)); - return S_OK; -} - -static HRESULT WINAPI fsbd_GetFindData_junk(IFileSystemBindData *fsbd, - WIN32_FIND_DATAW *pfd) -{ - memset(pfd, 0xef, sizeof(WIN32_FIND_DATAW)); - return S_OK; -} - -static HRESULT WINAPI fsbd_GetFindData_invalid(IFileSystemBindData *fsbd, - WIN32_FIND_DATAW *pfd) -{ - memset(pfd, 0, sizeof(WIN32_FIND_DATAW)); - *pfd->cFileName = 'a'; - *pfd->cAlternateFileName = 'a'; - return S_OK; -} - -static HRESULT WINAPI fsbd_GetFindData_valid(IFileSystemBindData *fsbd, - WIN32_FIND_DATAW *pfd) -{ - static const WCHAR adirW[] = {'C',':','\\','f','s','b','d','d','i','r',0}; - HANDLE handle = FindFirstFileW(adirW, pfd); - FindClose(handle); - return S_OK; -} - -static HRESULT WINAPI fsbd_GetFindData_fail(IFileSystemBindData *fsbd, - WIN32_FIND_DATAW *pfd) -{ - return E_FAIL; -} - -static IFileSystemBindDataVtbl fsbdVtbl = { - fsbd_QueryInterface, - fsbd_AddRef, - fsbd_Release, - fsbd_SetFindData, - NULL -}; - -static IFileSystemBindData fsbd = { &fsbdVtbl }; - -static void test_ParseDisplayNamePBC(void) -{ - WCHAR wFileSystemBindData[] = - {'F','i','l','e',' ','S','y','s','t','e','m',' ','B','i','n','d',' ','D','a','t','a',0}; - WCHAR adirW[] = {'C',':','\\','f','s','b','d','d','i','r',0}; - WCHAR afileW[] = {'C',':','\\','f','s','b','d','d','i','r','\\','f','i','l','e','.','t','x','t',0}; - WCHAR afile2W[] = {'C',':','\\','f','s','b','d','d','i','r','\\','s','\\','f','i','l','e','.','t','x','t',0}; - const HRESULT exp_err = HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); - - IShellFolder *psf; - IBindCtx *pbc; - HRESULT hres; - ITEMIDLIST *pidl; - - /* Check if we support WCHAR functions */ - SetLastError(0xdeadbeef); - lstrcmpiW(adirW, adirW); - if(GetLastError() == ERROR_CALL_NOT_IMPLEMENTED){ - win_skip("Most W-calls are not implemented\n"); - return; - } - - hres = SHGetDesktopFolder(&psf); - ok(hres == S_OK, "SHGetDesktopFolder failed: 0x%08x\n", hres); - if(FAILED(hres)){ - win_skip("Failed to get IShellFolder, can't run tests\n"); - return; - } - - /* fails on unknown dir with no IBindCtx */ - hres = IShellFolder_ParseDisplayName(psf, NULL, NULL, adirW, NULL, &pidl, NULL); - ok(hres == exp_err || broken(hres == E_FAIL) /* NT4 */, - "ParseDisplayName failed with wrong error: 0x%08x\n", hres); - hres = IShellFolder_ParseDisplayName(psf, NULL, NULL, afileW, NULL, &pidl, NULL); - ok(hres == exp_err || broken(hres == E_FAIL) /* NT4 */, - "ParseDisplayName failed with wrong error: 0x%08x\n", hres); - hres = IShellFolder_ParseDisplayName(psf, NULL, NULL, afile2W, NULL, &pidl, NULL); - ok(hres == exp_err || broken(hres == E_FAIL) /* NT4 */, - "ParseDisplayName failed with wrong error: 0x%08x\n", hres); - - /* fails on unknown dir with IBindCtx with no IFileSystemBindData */ - hres = CreateBindCtx(0, &pbc); - ok(hres == S_OK, "CreateBindCtx failed: 0x%08x\n", hres); - - hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, adirW, NULL, &pidl, NULL); - ok(hres == exp_err || broken(hres == E_FAIL) /* NT4 */, - "ParseDisplayName failed with wrong error: 0x%08x\n", hres); - hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afileW, NULL, &pidl, NULL); - ok(hres == exp_err || broken(hres == E_FAIL) /* NT4 */, - "ParseDisplayName failed with wrong error: 0x%08x\n", hres); - hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afile2W, NULL, &pidl, NULL); - ok(hres == exp_err || broken(hres == E_FAIL) /* NT4 */, - "ParseDisplayName failed with wrong error: 0x%08x\n", hres); - - /* unknown dir with IBindCtx with IFileSystemBindData */ - hres = IBindCtx_RegisterObjectParam(pbc, wFileSystemBindData, (IUnknown*)&fsbd); - ok(hres == S_OK, "RegisterObjectParam failed: 0x%08x\n", hres); - - /* return E_FAIL from GetFindData */ - pidl = (ITEMIDLIST*)0xdeadbeef; - fsbdVtbl.GetFindData = fsbd_GetFindData_fail; - hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, adirW, NULL, &pidl, NULL); - ok(hres == S_OK || broken(hres == E_FAIL) /* NT4 */, - "ParseDisplayName failed: 0x%08x\n", hres); - if(SUCCEEDED(hres)){ - verify_pidl(pidl, adirW); - ILFree(pidl); - } - - hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afileW, NULL, &pidl, NULL); - ok(hres == S_OK || broken(hres == E_FAIL) /* NT4 */, - "ParseDisplayName failed: 0x%08x\n", hres); - if(SUCCEEDED(hres)){ - verify_pidl(pidl, afileW); - ILFree(pidl); - } - - hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afile2W, NULL, &pidl, NULL); - ok(hres == S_OK || broken(hres == E_FAIL) /* NT4 */, - "ParseDisplayName failed: 0x%08x\n", hres); - if(SUCCEEDED(hres)){ - verify_pidl(pidl, afile2W); - ILFree(pidl); - } - - /* set FIND_DATA struct to NULLs */ - pidl = (ITEMIDLIST*)0xdeadbeef; - fsbdVtbl.GetFindData = fsbd_GetFindData_nul; - hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, adirW, NULL, &pidl, NULL); - ok(hres == S_OK || broken(hres == E_FAIL) /* NT4 */, - "ParseDisplayName failed: 0x%08x\n", hres); - if(SUCCEEDED(hres)){ - verify_pidl(pidl, adirW); - ILFree(pidl); - } - - hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afileW, NULL, &pidl, NULL); - ok(hres == S_OK || broken(hres == E_FAIL) /* NT4 */, - "ParseDisplayName failed: 0x%08x\n", hres); - if(SUCCEEDED(hres)){ - verify_pidl(pidl, afileW); - ILFree(pidl); - } - - hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afile2W, NULL, &pidl, NULL); - ok(hres == S_OK || broken(hres == E_FAIL) /* NT4 */, - "ParseDisplayName failed: 0x%08x\n", hres); - if(SUCCEEDED(hres)){ - verify_pidl(pidl, afile2W); - ILFree(pidl); - } - - /* set FIND_DATA struct to junk */ - pidl = (ITEMIDLIST*)0xdeadbeef; - fsbdVtbl.GetFindData = fsbd_GetFindData_junk; - hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, adirW, NULL, &pidl, NULL); - ok(hres == S_OK || broken(hres == E_FAIL) /* NT4 */, - "ParseDisplayName failed: 0x%08x\n", hres); - if(SUCCEEDED(hres)){ - verify_pidl(pidl, adirW); - ILFree(pidl); - } - - hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afileW, NULL, &pidl, NULL); - ok(hres == S_OK || broken(hres == E_FAIL) /* NT4 */, - "ParseDisplayName failed: 0x%08x\n", hres); - if(SUCCEEDED(hres)){ - verify_pidl(pidl, afileW); - ILFree(pidl); - } - - hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afile2W, NULL, &pidl, NULL); - ok(hres == S_OK || broken(hres == E_FAIL) /* NT4 */, - "ParseDisplayName failed: 0x%08x\n", hres); - if(SUCCEEDED(hres)){ - verify_pidl(pidl, afile2W); - ILFree(pidl); - } - - /* set FIND_DATA struct to invalid data */ - pidl = (ITEMIDLIST*)0xdeadbeef; - fsbdVtbl.GetFindData = fsbd_GetFindData_invalid; - hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, adirW, NULL, &pidl, NULL); - ok(hres == S_OK || broken(hres == E_FAIL) /* NT4 */, - "ParseDisplayName failed: 0x%08x\n", hres); - if(SUCCEEDED(hres)){ - verify_pidl(pidl, adirW); - ILFree(pidl); - } - - hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afileW, NULL, &pidl, NULL); - ok(hres == S_OK || broken(hres == E_FAIL) /* NT4 */, - "ParseDisplayName failed: 0x%08x\n", hres); - if(SUCCEEDED(hres)){ - verify_pidl(pidl, afileW); - ILFree(pidl); - } - - hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afile2W, NULL, &pidl, NULL); - ok(hres == S_OK || broken(hres == E_FAIL) /* NT4 */, - "ParseDisplayName failed: 0x%08x\n", hres); - if(SUCCEEDED(hres)){ - verify_pidl(pidl, afile2W); - ILFree(pidl); - } - - /* set FIND_DATA struct to valid data */ - pidl = (ITEMIDLIST*)0xdeadbeef; - fsbdVtbl.GetFindData = fsbd_GetFindData_valid; - hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, adirW, NULL, &pidl, NULL); - ok(hres == S_OK || broken(hres == E_FAIL) /* NT4 */, - "ParseDisplayName failed: 0x%08x\n", hres); - if(SUCCEEDED(hres)){ - verify_pidl(pidl, adirW); - ILFree(pidl); - } - - hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afileW, NULL, &pidl, NULL); - ok(hres == S_OK || broken(hres == E_FAIL) /* NT4 */, - "ParseDisplayName failed: 0x%08x\n", hres); - if(SUCCEEDED(hres)){ - verify_pidl(pidl, afileW); - ILFree(pidl); - } - - hres = IShellFolder_ParseDisplayName(psf, NULL, pbc, afile2W, NULL, &pidl, NULL); - ok(hres == S_OK || broken(hres == E_FAIL) /* NT4 */, - "ParseDisplayName failed: 0x%08x\n", hres); - if(SUCCEEDED(hres)){ - verify_pidl(pidl, afile2W); - ILFree(pidl); - } - - IBindCtx_Release(pbc); - IShellFolder_Release(psf); -} - -static const CHAR testwindow_class[] = "testwindow"; -#define WM_USER_NOTIFY (WM_APP+1) - -struct ChNotifyTest { - const char id[256]; - const UINT notify_count; - UINT missing_events; - UINT signal; - const char path_1[256]; - const char path_2[256]; -} chnotify_tests[] = { - {"MKDIR", 1, 0, SHCNE_MKDIR, "C:\\shell32_cn_test\\test", ""}, - {"CREATE", 1, 0, SHCNE_CREATE, "C:\\shell32_cn_test\\test\\file.txt", ""}, - {"RMDIR", 1, 0, SHCNE_RMDIR, "C:\\shell32_cn_test\\test", ""}, -}; - -struct ChNotifyTest *exp_data; -BOOL test_new_delivery_flag; - -static LRESULT CALLBACK testwindow_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - LONG signal = (LONG)lparam; - - switch(msg){ - case WM_USER_NOTIFY: - if(exp_data->missing_events > 0) { - WCHAR *path1, *path2; - LPITEMIDLIST *pidls = (LPITEMIDLIST*)wparam; - HANDLE hLock = NULL; - - if(test_new_delivery_flag) { - hLock = SHChangeNotification_Lock((HANDLE)wparam, lparam, &pidls, &signal); - ok(hLock != NULL, "SHChangeNotification_Lock returned NULL\n"); - } - - ok(exp_data->signal == signal, - "%s: expected notification type %x, got: %x\n", - exp_data->id, exp_data->signal, signal); - - trace("verifying pidls for: %s\n", exp_data->id); - path1 = make_wstr(exp_data->path_1); - path2 = make_wstr(exp_data->path_2); - verify_pidl(pidls[0], path1); - verify_pidl(pidls[1], path2); - HeapFree(GetProcessHeap(), 0, path1); - HeapFree(GetProcessHeap(), 0, path2); - - exp_data->missing_events--; - - if(test_new_delivery_flag) - SHChangeNotification_Unlock(hLock); - }else - ok(0, "Didn't expect a WM_USER_NOTIFY message (event: %x)\n", signal); - return 0; - } - return DefWindowProc(hwnd, msg, wparam, lparam); -} - -static void register_testwindow_class(void) -{ - WNDCLASSEXA cls; - ATOM ret; - - ZeroMemory(&cls, sizeof(cls)); - cls.cbSize = sizeof(cls); - cls.style = 0; - cls.lpfnWndProc = testwindow_wndproc; - cls.hInstance = GetModuleHandleA(NULL); - cls.lpszClassName = testwindow_class; - - SetLastError(0); - ret = RegisterClassExA(&cls); - ok(ret != 0, "RegisterClassExA failed: %d\n", GetLastError()); -} - -/* SHCNF_FLUSH doesn't seem to work as advertised for SHCNF_PATHA, so we - * have to poll repeatedly for the message to appear */ -static void do_events(void) -{ - int c = 0; - while (exp_data->missing_events && (c++ < 10)){ - MSG msg; - while(PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)){ - TranslateMessage(&msg); - DispatchMessageA(&msg); - } - if(exp_data->missing_events) - Sleep(500); - } - trace("%s: took %d tries\n", exp_data->id, c); -} - -static void test_SHChangeNotify(BOOL test_new_delivery) -{ - HWND wnd; - ULONG notifyID, i; - HRESULT hr; - BOOL br, has_unicode; - SHChangeNotifyEntry entries[1]; - const CHAR root_dirA[] = "C:\\shell32_cn_test"; - const WCHAR root_dirW[] = {'C',':','\\','s','h','e','l','l','3','2','_','c','n','_','t','e','s','t',0}; - - trace("SHChangeNotify tests (%x)\n", test_new_delivery); - - CreateDirectoryW(NULL, NULL); - has_unicode = !(GetLastError() == ERROR_CALL_NOT_IMPLEMENTED); - - test_new_delivery_flag = test_new_delivery; - if(!test_new_delivery) - register_testwindow_class(); - - wnd = CreateWindowExA(0, testwindow_class, testwindow_class, 0, - CW_USEDEFAULT, CW_USEDEFAULT, 130, 105, - NULL, NULL, GetModuleHandleA(NULL), 0); - ok(wnd != NULL, "Failed to make a window\n"); - - br = CreateDirectoryA(root_dirA, NULL); - ok(br == TRUE, "CreateDirectory failed: %d\n", GetLastError()); - - entries[0].pidl = NULL; - if(has_unicode) - hr = SHILCreateFromPath(root_dirW, (LPITEMIDLIST*)&entries[0].pidl, 0); - else - hr = SHILCreateFromPath((LPCVOID)root_dirA, (LPITEMIDLIST*)&entries[0].pidl, 0); - ok(hr == S_OK, "SHILCreateFromPath failed: 0x%08x\n", hr); - entries[0].fRecursive = TRUE; - - notifyID = SHChangeNotifyRegister(wnd, !test_new_delivery ? SHCNRF_ShellLevel : SHCNRF_ShellLevel|SHCNRF_NewDelivery, - SHCNE_ALLEVENTS, WM_USER_NOTIFY, 1, entries); - ok(notifyID != 0, "Failed to register a window for change notifications\n"); - - for(i = 0; i < sizeof(chnotify_tests) / sizeof(*chnotify_tests); ++i){ - exp_data = chnotify_tests + i; - - exp_data->missing_events = exp_data->notify_count; - SHChangeNotify(exp_data->signal, SHCNF_PATHA | SHCNF_FLUSH, - strlen(exp_data->path_1) > 0 ? exp_data->path_1 : NULL, - strlen(exp_data->path_2) > 0 ? exp_data->path_2 : NULL); - do_events(); - ok(exp_data->missing_events == 0, "%s: Expected wndproc to be called\n", exp_data->id); - - if(has_unicode){ - WCHAR *path1, *path2; - - path1 = make_wstr(exp_data->path_1); - path2 = make_wstr(exp_data->path_2); - - exp_data->missing_events = exp_data->notify_count; - SHChangeNotify(exp_data->signal, SHCNF_PATHW | SHCNF_FLUSH, path1, path2); - do_events(); - ok(exp_data->missing_events == 0, "%s: Expected wndproc to be called\n", exp_data->id); - - HeapFree(GetProcessHeap(), 0, path1); - HeapFree(GetProcessHeap(), 0, path2); - } - } - - SHChangeNotifyDeregister(notifyID); - DestroyWindow(wnd); - - ILFree((LPITEMIDLIST)entries[0].pidl); - br = RemoveDirectoryA(root_dirA); - ok(br == TRUE, "RemoveDirectory failed: %d\n", GetLastError()); -} - -static void test_SHCreateDefaultContextMenu(void) -{ - HKEY keys[16]; - WCHAR path[MAX_PATH]; - IShellFolder *desktop,*folder; - IPersistFolder2 *persist; - IContextMenu *cmenu; - LONG status; - LPITEMIDLIST pidlFolder, pidl_child, pidl; - DEFCONTEXTMENU cminfo; - HRESULT hr; - UINT i; - const WCHAR filename[] = - {'\\','t','e','s','t','d','i','r','\\','t','e','s','t','1','.','t','x','t',0}; - if(!pSHCreateDefaultContextMenu) - { - win_skip("SHCreateDefaultContextMenu missing.\n"); - return; - } - - if(!pSHBindToParent) - { - skip("SHBindToParent missing.\n"); - return; - } - - GetCurrentDirectoryW(MAX_PATH, path); - if(!lstrlenW(path)) - { - skip("GetCurrentDirectoryW returned an empty string.\n"); - return; - } - lstrcatW(path, filename); - SHGetDesktopFolder(&desktop); - - CreateFilesFolders(); - - hr = IShellFolder_ParseDisplayName(desktop, NULL, NULL, path, NULL, &pidl, 0); - ok(hr == S_OK || broken(hr == E_FAIL) /* WinME */, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - - hr = pSHBindToParent(pidl, &IID_IShellFolder, (void**)&folder, (LPCITEMIDLIST*)&pidl_child); - ok(hr == S_OK, "Got 0x%08x\n", hr); - - IShellFolder_QueryInterface(folder,&IID_IPersistFolder2,(void**)&persist); - IPersistFolder2_GetCurFolder(persist,&pidlFolder); - IPersistFolder2_Release(persist); - if(SUCCEEDED(hr)) - { - - cminfo.hwnd=NULL; - cminfo.pcmcb=NULL; - cminfo.psf=folder; - cminfo.pidlFolder=NULL; - cminfo.apidl=(LPCITEMIDLIST*)&pidl_child; - cminfo.cidl=1; - cminfo.aKeys=NULL; - cminfo.cKeys=0; - cminfo.punkAssociationInfo=NULL; - hr = pSHCreateDefaultContextMenu(&cminfo,&IID_IContextMenu,(void**)&cmenu); - ok(hr==S_OK,"Got 0x%08x\n", hr); - IContextMenu_Release(cmenu); - cminfo.pidlFolder=pidlFolder; - hr = pSHCreateDefaultContextMenu(&cminfo,&IID_IContextMenu,(void**)&cmenu); - ok(hr==S_OK,"Got 0x%08x\n", hr); - IContextMenu_Release(cmenu); - status = RegOpenKeyExA(HKEY_CLASSES_ROOT,"*",0,KEY_READ,keys); - if(status==ERROR_SUCCESS){ - for(i=1;i<16;i++) - keys[i]=keys[0]; - cminfo.aKeys=keys; - cminfo.cKeys=16; - hr = pSHCreateDefaultContextMenu(&cminfo,&IID_IContextMenu,(void**)&cmenu); - RegCloseKey(keys[0]); - ok(hr==S_OK,"Got 0x%08x\n", hr); - IContextMenu_Release(cmenu); - } - } - ILFree(pidlFolder); - IShellFolder_Release(folder); - } - IShellFolder_Release(desktop); - ILFree(pidl); - Cleanup(); -} - -START_TEST(shlfolder) -{ - init_function_pointers(); - /* if OleInitialize doesn't get called, ParseDisplayName returns - CO_E_NOTINITIALIZED for malformed directory names on win2k. */ - OleInitialize(NULL); - - test_ParseDisplayName(); - test_SHParseDisplayName(); - test_BindToObject(); - test_EnumObjects_and_CompareIDs(); - test_GetDisplayName(); - test_GetAttributesOf(); - test_SHGetPathFromIDList(); - test_CallForAttributes(); - test_FolderShortcut(); - test_ITEMIDLIST_format(); - test_SHGetFolderPathA(); - test_SHGetFolderPathAndSubDirA(); - test_LocalizedNames(); - test_SHCreateShellItem(); - test_SHCreateShellItemArray(); - test_desktop_IPersist(); - test_GetUIObject(); - test_SHSimpleIDListFromPath(); - test_ParseDisplayNamePBC(); - test_SHGetNameFromIDList(); - test_SHGetItemFromDataObject(); - test_SHGetIDListFromObject(); - test_SHGetItemFromObject(); - test_ShellItemCompare(); - test_SHChangeNotify(FALSE); - test_SHChangeNotify(TRUE); - test_ShellItemBindToHandler(); - test_ShellItemGetAttributes(); - test_SHCreateDefaultContextMenu(); - - OleUninitialize(); -} diff --git a/rostests/winetests/shell32/shlview.c b/rostests/winetests/shell32/shlview.c deleted file mode 100644 index 6e974992159..00000000000 --- a/rostests/winetests/shell32/shlview.c +++ /dev/null @@ -1,1169 +0,0 @@ -/* - * Unit test of the IShellView - * - * Copyright 2010 Nikolay Sivov 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 -#include - -#define COBJMACROS -#define CONST_VTABLE - -#include "windef.h" -#include "winbase.h" -#include "wtypes.h" -#include "shellapi.h" - -#include "shlguid.h" -#include "shlobj.h" -#include "shobjidl.h" -#include "shlwapi.h" -#include "ocidl.h" -#include "oleauto.h" - -#include "initguid.h" - -#include "wine/test.h" - -#include "msg.h" - -#define LISTVIEW_SEQ_INDEX 0 -#define NUM_MSG_SEQUENCES 1 - -DEFINE_GUID(IID_IPersistHistory, 0x91a565c1, 0xe38f, 0x11d0, 0x94, 0xbf, 0x00, 0xa0, 0xc9, 0x05, 0x5c, 0xbf); - -static struct msg_sequence *sequences[NUM_MSG_SEQUENCES]; - -static LRESULT WINAPI listview_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - WNDPROC oldproc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA); - static LONG defwndproc_counter = 0; - LRESULT ret; - struct message msg; - - trace("listview: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); - - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - add_message(sequences, LISTVIEW_SEQ_INDEX, &msg); - - defwndproc_counter++; - ret = CallWindowProcA(oldproc, hwnd, message, wParam, lParam); - defwndproc_counter--; - return ret; -} - -static HWND subclass_listview(HWND hwnd) -{ - WNDPROC oldproc; - HWND listview; - - /* listview is a first child */ - listview = FindWindowExA(hwnd, NULL, WC_LISTVIEWA, NULL); - if(!listview) - { - /* .. except for some versions of Windows XP, where things - are slightly more complicated. */ - HWND hwnd_tmp; - hwnd_tmp = FindWindowExA(hwnd, NULL, "DUIViewWndClassName", NULL); - hwnd_tmp = FindWindowExA(hwnd_tmp, NULL, "DirectUIHWND", NULL); - hwnd_tmp = FindWindowExA(hwnd_tmp, NULL, "CtrlNotifySink", NULL); - listview = FindWindowExA(hwnd_tmp, NULL, WC_LISTVIEWA, NULL); - } - - oldproc = (WNDPROC)SetWindowLongPtrA(listview, GWLP_WNDPROC, - (LONG_PTR)listview_subclass_proc); - SetWindowLongPtrA(listview, GWLP_USERDATA, (LONG_PTR)oldproc); - - return listview; -} - -static UINT get_msg_count(struct msg_sequence **seq, int sequence_index, UINT message) -{ - struct msg_sequence *msg_seq = seq[sequence_index]; - UINT i, count = 0; - - for(i = 0; i < msg_seq->count ; i++) - if(msg_seq->sequence[i].message == message) - count++; - - return count; -} - -/* Checks that every message in the sequence seq is also present in - * the UINT array msgs */ -static void verify_msgs_in_(struct msg_sequence *seq, const UINT *msgs, - const char *file, int line) -{ - UINT i, j, msg, failcount = 0; - for(i = 0; i < seq->count; i++) - { - BOOL found = FALSE; - msg = seq->sequence[i].message; - for(j = 0; msgs[j] != 0; j++) - if(msgs[j] == msg) found = TRUE; - - if(!found) - { - failcount++; - trace("Unexpected message %d\n", msg); - } - } - ok_(file, line) (!failcount, "%d failures.\n", failcount); - flush_sequences(sequences, NUM_MSG_SEQUENCES); -} - -#define verify_msgs_in(seq, msgs) \ - verify_msgs_in_(seq, msgs, __FILE__, __LINE__) - -/* dummy IDataObject implementation */ -typedef struct { - IDataObject IDataObject_iface; - LONG ref; -} IDataObjectImpl; - -static const IDataObjectVtbl IDataObjectImpl_Vtbl; - -static inline IDataObjectImpl *impl_from_IDataObject(IDataObject *iface) -{ - return CONTAINING_RECORD(iface, IDataObjectImpl, IDataObject_iface); -} - -static IDataObject* IDataObjectImpl_Construct(void) -{ - IDataObjectImpl *obj; - - obj = HeapAlloc(GetProcessHeap(), 0, sizeof(*obj)); - obj->IDataObject_iface.lpVtbl = &IDataObjectImpl_Vtbl; - obj->ref = 1; - - return &obj->IDataObject_iface; -} - -static HRESULT WINAPI IDataObjectImpl_QueryInterface(IDataObject *iface, REFIID riid, void **ppvObj) -{ - IDataObjectImpl *This = impl_from_IDataObject(iface); - - if (IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IDataObject)) - { - *ppvObj = This; - } - - if(*ppvObj) - { - IUnknown_AddRef(iface); - return S_OK; - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI IDataObjectImpl_AddRef(IDataObject * iface) -{ - IDataObjectImpl *This = impl_from_IDataObject(iface); - return InterlockedIncrement(&This->ref); -} - -static ULONG WINAPI IDataObjectImpl_Release(IDataObject * iface) -{ - IDataObjectImpl *This = impl_from_IDataObject(iface); - ULONG ref = InterlockedDecrement(&This->ref); - - if (!ref) - { - HeapFree(GetProcessHeap(), 0, This); - return 0; - } - return ref; -} - -static HRESULT WINAPI IDataObjectImpl_GetData(IDataObject *iface, FORMATETC *pformat, STGMEDIUM *pmedium) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI IDataObjectImpl_GetDataHere(IDataObject *iface, FORMATETC *pformat, STGMEDIUM *pmedium) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI IDataObjectImpl_QueryGetData(IDataObject *iface, FORMATETC *pformat) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI IDataObjectImpl_GetCanonicalFormatEtc( - IDataObject *iface, FORMATETC *pformatIn, FORMATETC *pformatOut) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI IDataObjectImpl_SetData( - IDataObject *iface, FORMATETC *pformat, STGMEDIUM *pmedium, BOOL release) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI IDataObjectImpl_EnumFormatEtc( - IDataObject *iface, DWORD direction, IEnumFORMATETC **ppenumFormatEtc) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI IDataObjectImpl_DAdvise( - IDataObject *iface, FORMATETC *pformatetc, DWORD advf, IAdviseSink *pSink, DWORD *pConnection) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI IDataObjectImpl_DUnadvise(IDataObject *iface, DWORD connection) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI IDataObjectImpl_EnumDAdvise(IDataObject *iface, IEnumSTATDATA **ppenumAdvise) -{ - return E_NOTIMPL; -} - -static const IDataObjectVtbl IDataObjectImpl_Vtbl = -{ - IDataObjectImpl_QueryInterface, - IDataObjectImpl_AddRef, - IDataObjectImpl_Release, - IDataObjectImpl_GetData, - IDataObjectImpl_GetDataHere, - IDataObjectImpl_QueryGetData, - IDataObjectImpl_GetCanonicalFormatEtc, - IDataObjectImpl_SetData, - IDataObjectImpl_EnumFormatEtc, - IDataObjectImpl_DAdvise, - IDataObjectImpl_DUnadvise, - IDataObjectImpl_EnumDAdvise -}; - -/* dummy IShellBrowser implementation */ -typedef struct { - IShellBrowser IShellBrowser_iface; - LONG ref; -} IShellBrowserImpl; - -static const IShellBrowserVtbl IShellBrowserImpl_Vtbl; - -static inline IShellBrowserImpl *impl_from_IShellBrowser(IShellBrowser *iface) -{ - return CONTAINING_RECORD(iface, IShellBrowserImpl, IShellBrowser_iface); -} - -static IShellBrowser* IShellBrowserImpl_Construct(void) -{ - IShellBrowserImpl *browser; - - browser = HeapAlloc(GetProcessHeap(), 0, sizeof(*browser)); - browser->IShellBrowser_iface.lpVtbl = &IShellBrowserImpl_Vtbl; - browser->ref = 1; - - return &browser->IShellBrowser_iface; -} - -static HRESULT WINAPI IShellBrowserImpl_QueryInterface(IShellBrowser *iface, - REFIID riid, - LPVOID *ppvObj) -{ - IShellBrowserImpl *This = impl_from_IShellBrowser(iface); - - *ppvObj = NULL; - - if(IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IOleWindow) || - IsEqualIID(riid, &IID_IShellBrowser)) - { - *ppvObj = This; - } - - if(*ppvObj) - { - IUnknown_AddRef(iface); - return S_OK; - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI IShellBrowserImpl_AddRef(IShellBrowser * iface) -{ - IShellBrowserImpl *This = impl_from_IShellBrowser(iface); - return InterlockedIncrement(&This->ref); -} - -static ULONG WINAPI IShellBrowserImpl_Release(IShellBrowser * iface) -{ - IShellBrowserImpl *This = impl_from_IShellBrowser(iface); - ULONG ref = InterlockedDecrement(&This->ref); - - if (!ref) - { - HeapFree(GetProcessHeap(), 0, This); - return 0; - } - return ref; -} - -static HRESULT WINAPI IShellBrowserImpl_GetWindow(IShellBrowser *iface, - HWND *phwnd) -{ - if (phwnd) *phwnd = GetDesktopWindow(); - return S_OK; -} - -static HRESULT WINAPI IShellBrowserImpl_ContextSensitiveHelp(IShellBrowser *iface, - BOOL fEnterMode) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface, - LPCITEMIDLIST pidl, - UINT wFlags) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI IShellBrowserImpl_EnableModelessSB(IShellBrowser *iface, - BOOL fEnable) - -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI IShellBrowserImpl_GetControlWindow(IShellBrowser *iface, - UINT id, - HWND *lphwnd) - -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI IShellBrowserImpl_GetViewStateStream(IShellBrowser *iface, - DWORD mode, - LPSTREAM *pStrm) - -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI IShellBrowserImpl_InsertMenusSB(IShellBrowser *iface, - HMENU hmenuShared, - LPOLEMENUGROUPWIDTHS lpMenuWidths) - -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI IShellBrowserImpl_OnViewWindowActive(IShellBrowser *iface, - IShellView *ppshv) - -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI IShellBrowserImpl_QueryActiveShellView(IShellBrowser *iface, - IShellView **ppshv) - -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI IShellBrowserImpl_RemoveMenusSB(IShellBrowser *iface, - HMENU hmenuShared) - -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI IShellBrowserImpl_SendControlMsg(IShellBrowser *iface, - UINT id, - UINT uMsg, - WPARAM wParam, - LPARAM lParam, - LRESULT *pret) - -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI IShellBrowserImpl_SetMenuSB(IShellBrowser *iface, - HMENU hmenuShared, - HOLEMENU holemenuReserved, - HWND hwndActiveObject) - -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI IShellBrowserImpl_SetStatusTextSB(IShellBrowser *iface, - LPCOLESTR lpszStatusText) - -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI IShellBrowserImpl_SetToolbarItems(IShellBrowser *iface, - LPTBBUTTON lpButtons, - UINT nButtons, - UINT uFlags) - -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI IShellBrowserImpl_TranslateAcceleratorSB(IShellBrowser *iface, - LPMSG lpmsg, - WORD wID) - -{ - return E_NOTIMPL; -} - -static const IShellBrowserVtbl IShellBrowserImpl_Vtbl = -{ - IShellBrowserImpl_QueryInterface, - IShellBrowserImpl_AddRef, - IShellBrowserImpl_Release, - IShellBrowserImpl_GetWindow, - IShellBrowserImpl_ContextSensitiveHelp, - IShellBrowserImpl_InsertMenusSB, - IShellBrowserImpl_SetMenuSB, - IShellBrowserImpl_RemoveMenusSB, - IShellBrowserImpl_SetStatusTextSB, - IShellBrowserImpl_EnableModelessSB, - IShellBrowserImpl_TranslateAcceleratorSB, - IShellBrowserImpl_BrowseObject, - IShellBrowserImpl_GetViewStateStream, - IShellBrowserImpl_GetControlWindow, - IShellBrowserImpl_SendControlMsg, - IShellBrowserImpl_QueryActiveShellView, - IShellBrowserImpl_OnViewWindowActive, - IShellBrowserImpl_SetToolbarItems -}; - -static const struct message empty_seq[] = { - { 0 } -}; - -static const struct message folderview_getspacing_seq[] = { - { LVM_GETITEMSPACING, wparam|sent, FALSE }, - { 0 } -}; - -static const struct message folderview_getselectionmarked_seq[] = { - { LVM_GETSELECTIONMARK, sent }, - { 0 } -}; - -static const struct message folderview_getfocused_seq[] = { - { LVM_GETNEXTITEM, sent|wparam|lparam|optional, -1, LVNI_FOCUSED }, - { 0 } -}; - -static const struct message folderview_itemcount_seq[] = { - { LVM_GETITEMCOUNT, sent }, - { 0 } -}; - -static void test_IShellView_CreateViewWindow(void) -{ - IShellFolder *desktop; - FOLDERSETTINGS settings; - IShellView *view; - IDropTarget *dt; - HWND hwnd_view; - HRESULT hr; - RECT r = {0}; - - hr = SHGetDesktopFolder(&desktop); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - hr = IShellFolder_CreateViewObject(desktop, NULL, &IID_IShellView, (void**)&view); - ok(hr == S_OK, "got (0x%08x)\n", hr); - -if (0) -{ - /* crashes on native */ - IShellView_CreateViewWindow(view, NULL, &settings, NULL, NULL, NULL); -} - - settings.ViewMode = FVM_ICON; - settings.fFlags = 0; - hwnd_view = (HWND)0xdeadbeef; - hr = IShellView_CreateViewWindow(view, NULL, &settings, NULL, NULL, &hwnd_view); - ok(hr == E_UNEXPECTED, "got (0x%08x)\n", hr); - ok(hwnd_view == 0, "got %p\n", hwnd_view); - - hwnd_view = (HWND)0xdeadbeef; - hr = IShellView_CreateViewWindow(view, NULL, &settings, NULL, &r, &hwnd_view); - ok(hr == E_UNEXPECTED, "got (0x%08x)\n", hr); - ok(hwnd_view == 0, "got %p\n", hwnd_view); - - /* ::DragLeave without drag operation */ - hr = IShellView_QueryInterface(view, &IID_IDropTarget, (void**)&dt); - ok(hr == S_OK, "got (0x%08x)\n", hr); - hr = IDropTarget_DragLeave(dt); - ok(hr == S_OK, "got (0x%08x)\n", hr); - IDropTarget_Release(dt); - - IShellView_Release(view); - IShellFolder_Release(desktop); -} - -static void test_IFolderView(void) -{ - IShellFolder *desktop, *folder; - FOLDERSETTINGS settings; - IShellView *view; - IShellBrowser *browser; - IFolderView *fv; - HWND hwnd_view, hwnd_list; - PITEMID_CHILD pidl; - HRESULT hr; - INT ret, count; - POINT pt; - LONG ref1, ref2; - RECT r; - - hr = SHGetDesktopFolder(&desktop); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - hr = IShellFolder_CreateViewObject(desktop, NULL, &IID_IShellView, (void**)&view); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - hr = IShellView_QueryInterface(view, &IID_IFolderView, (void**)&fv); - if (hr != S_OK) - { - win_skip("IFolderView not supported by desktop folder\n"); - IShellView_Release(view); - IShellFolder_Release(desktop); - return; - } - - /* call methods before window creation */ - hr = IFolderView_GetSpacing(fv, NULL); - ok(hr == S_FALSE || broken(hr == S_OK) /* win7 */, "got (0x%08x)\n", hr); - - pidl = (void*)0xdeadbeef; - hr = IFolderView_Item(fv, 0, &pidl); - ok(hr == E_INVALIDARG || broken(hr == E_FAIL) /* < Vista */, "got (0x%08x)\n", hr); - ok(pidl == 0 || broken(pidl == (void*)0xdeadbeef) /* < Vista */, "got %p\n", pidl); - -if (0) -{ - /* crashes on Vista and Win2k8 - List not created yet case */ - IFolderView_GetSpacing(fv, &pt); - - /* crashes on XP */ - IFolderView_GetSelectionMarkedItem(fv, NULL); - IFolderView_GetFocusedItem(fv, NULL); - - /* crashes on Vista+ */ - IFolderView_Item(fv, 0, NULL); -} - - browser = IShellBrowserImpl_Construct(); - - settings.ViewMode = FVM_ICON; - settings.fFlags = 0; - hwnd_view = (HWND)0xdeadbeef; - r.left = r.top = 0; - r.right = r.bottom = 100; - hr = IShellView_CreateViewWindow(view, NULL, &settings, browser, &r, &hwnd_view); - ok(hr == S_OK, "got (0x%08x)\n", hr); - ok(IsWindow(hwnd_view), "got %p\n", hwnd_view); - - hwnd_list = subclass_listview(hwnd_view); - if (!hwnd_list) - { - win_skip("Failed to subclass ListView control\n"); - IShellBrowser_Release(browser); - IFolderView_Release(fv); - IShellView_Release(view); - IShellFolder_Release(desktop); - return; - } - - /* IFolderView::GetSpacing */ - flush_sequences(sequences, NUM_MSG_SEQUENCES); - hr = IFolderView_GetSpacing(fv, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); - ok_sequence(sequences, LISTVIEW_SEQ_INDEX, empty_seq, "IFolderView::GetSpacing, empty", FALSE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - hr = IFolderView_GetSpacing(fv, &pt); - ok(hr == S_OK, "got (0x%08x)\n", hr); - /* fails with empty sequence on win7 for unknown reason */ - if (sequences[LISTVIEW_SEQ_INDEX]->count) - { - ok_sequence(sequences, LISTVIEW_SEQ_INDEX, folderview_getspacing_seq, "IFolderView::GetSpacing", FALSE); - ok(pt.x > 0, "got %d\n", pt.x); - ok(pt.y > 0, "got %d\n", pt.y); - ret = SendMessageA(hwnd_list, LVM_GETITEMSPACING, 0, 0); - ok(pt.x == LOWORD(ret) && pt.y == HIWORD(ret), "got (%d, %d)\n", LOWORD(ret), HIWORD(ret)); - } - - /* IFolderView::ItemCount */ -if (0) -{ - /* crashes on XP */ - IFolderView_ItemCount(fv, SVGIO_ALLVIEW, NULL); -} - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - IFolderView_ItemCount(fv, SVGIO_ALLVIEW, &count); - - /* IFolderView::GetSelectionMarkedItem */ -if (0) -{ - /* crashes on XP */ - IFolderView_GetSelectionMarkedItem(fv, NULL); -} - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - hr = IFolderView_GetSelectionMarkedItem(fv, &ret); - if (count) - ok(hr == S_OK, "got (0x%08x)\n", hr); - else - ok(hr == S_FALSE, "got (0x%08x)\n", hr); - ok_sequence(sequences, LISTVIEW_SEQ_INDEX, folderview_getselectionmarked_seq, - "IFolderView::GetSelectionMarkedItem", FALSE); - - /* IFolderView::GetFocusedItem */ - flush_sequences(sequences, NUM_MSG_SEQUENCES); - hr = IFolderView_GetFocusedItem(fv, &ret); - if (count) - ok(hr == S_OK, "got (0x%08x)\n", hr); - else - ok(hr == S_FALSE, "got (0x%08x)\n", hr); - ok_sequence(sequences, LISTVIEW_SEQ_INDEX, folderview_getfocused_seq, - "IFolderView::GetFocusedItem", FALSE); - - /* IFolderView::GetFolder, just return pointer */ -if (0) -{ - /* crashes on XP */ - IFolderView_GetFolder(fv, NULL, (void**)&folder); - IFolderView_GetFolder(fv, NULL, NULL); -} - - hr = IFolderView_GetFolder(fv, &IID_IShellFolder, NULL); - ok(hr == E_POINTER, "got (0x%08x)\n", hr); - - ref1 = IShellFolder_AddRef(desktop); - IShellFolder_Release(desktop); - hr = IFolderView_GetFolder(fv, &IID_IShellFolder, (void**)&folder); - ok(hr == S_OK, "got (0x%08x)\n", hr); - ref2 = IShellFolder_AddRef(desktop); - IShellFolder_Release(desktop); - ok(ref1 == ref2 || ref1 + 1 == ref2, /* >= vista */ - "expected same refcount, got %d\n", ref2); - ok(desktop == folder, "\n"); - - IShellBrowser_Release(browser); - IFolderView_Release(fv); - IShellView_Release(view); - IShellFolder_Release(desktop); -} - -static void test_GetItemObject(void) -{ - IShellFolder *desktop; - IShellView *view; - IUnknown *unk; - HRESULT hr; - - hr = SHGetDesktopFolder(&desktop); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - hr = IShellFolder_CreateViewObject(desktop, NULL, &IID_IShellView, (void**)&view); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - /* from documentation three interfaces are supported for SVGIO_BACKGROUND: - IContextMenu, IDispatch, IPersistHistory */ - hr = IShellView_GetItemObject(view, SVGIO_BACKGROUND, &IID_IContextMenu, (void**)&unk); - ok(hr == S_OK, "got (0x%08x)\n", hr); - IUnknown_Release(unk); - - unk = NULL; - hr = IShellView_GetItemObject(view, SVGIO_BACKGROUND, &IID_IDispatch, (void**)&unk); - todo_wine ok(hr == S_OK || broken(hr == E_NOTIMPL) /* NT4 */, "got (0x%08x)\n", hr); - if (unk) IUnknown_Release(unk); - - unk = NULL; - hr = IShellView_GetItemObject(view, SVGIO_BACKGROUND, &IID_IPersistHistory, (void**)&unk); - todo_wine ok(hr == S_OK || broken(hr == E_NOTIMPL) /* W9x, NT4 */, "got (0x%08x)\n", hr); - if (unk) IUnknown_Release(unk); - - /* example of unsupported interface, base for IPersistHistory */ - hr = IShellView_GetItemObject(view, SVGIO_BACKGROUND, &IID_IPersist, (void**)&unk); - ok(hr == E_NOINTERFACE || broken(hr == E_NOTIMPL) /* W2K */, "got (0x%08x)\n", hr); - - IShellView_Release(view); - IShellFolder_Release(desktop); -} - -static void test_IShellFolderView(void) -{ - IShellFolderView *folderview; - IShellFolder *desktop; - IShellView *view; - IDataObject *obj; - UINT i; - HRESULT hr; - - hr = SHGetDesktopFolder(&desktop); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - hr = IShellFolder_CreateViewObject(desktop, NULL, &IID_IShellView, (void**)&view); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - hr = IShellView_QueryInterface(view, &IID_IShellFolderView, (void**)&folderview); - if (hr != S_OK) - { - win_skip("IShellView doesn't provide IShellFolderView on this platform\n"); - IShellView_Release(view); - IShellFolder_Release(desktop); - return; - } - - /* ::MoveIcons */ - obj = IDataObjectImpl_Construct(); - hr = IShellFolderView_MoveIcons(folderview, obj); - ok(hr == E_NOTIMPL || broken(hr == S_OK) /* W98 */, "got (0x%08x)\n", hr); - IDataObject_Release(obj); - - /* ::SetRedraw without list created */ - hr = IShellFolderView_SetRedraw(folderview, TRUE); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - /* ::QuerySupport */ - hr = IShellFolderView_QuerySupport(folderview, NULL); - ok(hr == S_OK, "got (0x%08x)\n", hr); - i = 0xdeadbeef; - hr = IShellFolderView_QuerySupport(folderview, &i); - ok(hr == S_OK, "got (0x%08x)\n", hr); - ok(i == 0xdeadbeef, "got %d\n", i); - - /* ::RemoveObject */ - i = 0xdeadbeef; - hr = IShellFolderView_RemoveObject(folderview, NULL, &i); - ok(hr == S_OK || hr == E_FAIL, "got (0x%08x)\n", hr); - if (hr == S_OK) ok(i == 0 || broken(i == 0xdeadbeef) /* Vista, 2k8 */, - "got %d\n", i); - - IShellFolderView_Release(folderview); - - IShellView_Release(view); - IShellFolder_Release(desktop); -} - -static void test_IOleWindow(void) -{ - IShellFolder *desktop; - IShellView *view; - HRESULT hr; - - hr = SHGetDesktopFolder(&desktop); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - hr = IShellFolder_CreateViewObject(desktop, NULL, &IID_IShellView, (void**)&view); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - /* IShellView::ContextSensitiveHelp */ - hr = IShellView_ContextSensitiveHelp(view, TRUE); - ok(hr == E_NOTIMPL, "got (0x%08x)\n", hr); - hr = IShellView_ContextSensitiveHelp(view, FALSE); - ok(hr == E_NOTIMPL, "got (0x%08x)\n", hr); - - IShellView_Release(view); - IShellFolder_Release(desktop); -} - -static const struct message folderview_setcurrentviewmode1_2_prevista[] = { - { LVM_SETVIEW, sent|wparam, LV_VIEW_ICON}, - { LVM_SETIMAGELIST, sent|wparam, 0}, - { LVM_SETIMAGELIST, sent|wparam, 1}, - { 0x105a, sent}, - { LVM_SETBKIMAGEW, sent|optional}, /* w2k3 */ - { LVM_GETBKCOLOR, sent|optional}, /* w2k3 */ - { LVM_GETTEXTBKCOLOR, sent|optional}, /* w2k3 */ - { LVM_GETTEXTCOLOR, sent|optional}, /* w2k3 */ - { LVM_SETEXTENDEDLISTVIEWSTYLE, sent|optional|wparam, 0xc8}, /* w2k3 */ - { LVM_ARRANGE, sent }, - { LVM_ARRANGE, sent|optional }, /* WinXP */ - { 0 } -}; - -static const struct message folderview_setcurrentviewmode3_prevista[] = { - { LVM_SETVIEW, sent|wparam, LV_VIEW_LIST}, - { LVM_SETIMAGELIST, sent|wparam, 0}, - { LVM_SETIMAGELIST, sent|wparam, 1}, - { 0x105a, sent}, - { LVM_SETBKIMAGEW, sent|optional}, /* w2k3 */ - { LVM_GETBKCOLOR, sent|optional}, /* w2k3 */ - { LVM_GETTEXTBKCOLOR, sent|optional}, /* w2k3 */ - { LVM_GETTEXTCOLOR, sent|optional}, /* w2k3 */ - { LVM_SETEXTENDEDLISTVIEWSTYLE, sent|optional|wparam, 0xc8}, /* w2k3 */ - { 0 } -}; - -static const struct message folderview_setcurrentviewmode4_prevista[] = { - { LVM_GETHEADER, sent}, - { LVM_GETITEMCOUNT, sent|optional }, - { LVM_SETSELECTEDCOLUMN, sent}, - { WM_NOTIFY, sent }, - { WM_NOTIFY, sent }, - { WM_NOTIFY, sent }, - { WM_NOTIFY, sent }, - { LVM_SETVIEW, sent|wparam, LV_VIEW_DETAILS}, - { LVM_SETIMAGELIST, sent|wparam, 0}, - { LVM_SETIMAGELIST, sent|wparam, 1}, - { 0x105a, sent}, - { LVM_SETBKIMAGEW, sent|optional}, /* w2k3 */ - { LVM_GETBKCOLOR, sent|optional}, /* w2k3 */ - { LVM_GETTEXTBKCOLOR, sent|optional}, /* w2k3 */ - { LVM_GETTEXTCOLOR, sent|optional}, /* w2k3 */ - { LVM_SETEXTENDEDLISTVIEWSTYLE, sent|optional|wparam, 0xc8}, /* w2k3 */ - { 0 } -}; - -/* XP, SetCurrentViewMode(5) - 108e - LVM_SETVIEW (LV_VIEW_ICON); - 1036 - LVM_SETEXTEDEDLISTVIEWSTYLE (0x8000, 0) - 100c/104c repeated X times - 1003 - LVM_SETIMAGELIST - 1035 - LVM_SETICONSPACING - 1004 - LVM_GETITEMCOUNT - 105a - ? - 1016 - LVM_ARRANGE - 1016 - LVM_ARRANGE -*/ - -/* XP, SetCurrentViewMode(6) - 1036 - LVM_SETEXTENDEDLISTVIEWSTYLE (0x8000, 0) - 1035 - LVM_SETICONSPACING - 1003 - LVM_SETIMAGELIST - 1003 - LVM_SETIMAGELIST - 100c/104c repeated X times - 10a2 - LVM_SETTILEVIEWINFO - 108e - LVM_SETVIEW (LV_VIEW_TILE) - 1003 - LVM_SETIMAGELIST - 105a - ? - 1016 - LVM_ARRANGE - 1016 - LVM_ARRANGE -*/ - -/* XP, SetCurrentViewMode (7) - 10a2 - LVM_SETTILEVIEWINFO - 108e - LVM_SETVIEW (LV_VIEW_ICON) - 1004/10a4 (LVM_GETITEMCOUNT/LVM_SETTILEINFO) X times - 1016 - LVM_ARRANGE - 1016 - LVM_ARRANGE - ... - LVM_SETEXTENDEDLISTVIEWSTYLE (0x40000, 0x40000) - ... - LVM_SETEXTENDEDLISTVIEWSTYLE (0x8000, 0x8000) -*/ - -static void test_GetSetCurrentViewMode(void) -{ - IShellFolder *desktop; - IShellView *sview; - IFolderView *fview; - IShellBrowser *browser; - FOLDERSETTINGS fs; - UINT viewmode; - HWND hwnd; - RECT rc = {0, 0, 10, 10}; - HRESULT hr; - UINT i; - static const int winxp_res[11] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; - static const int win2k3_res[11] = {0, 1, 2, 3, 4, 5, 6, 5, 8, 0, 0}; - static const int vista_res[11] = {0, 1, 5, 3, 4, 5, 6, 7, 7, 0, 0}; - static const int win7_res[11] = {1, 1, 1, 3, 4, 1, 6, 1, 8, 8, 8}; - - hr = SHGetDesktopFolder(&desktop); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - hr = IShellFolder_CreateViewObject(desktop, NULL, &IID_IShellView, (void**)&sview); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - fs.ViewMode = 1; - fs.fFlags = 0; - browser = IShellBrowserImpl_Construct(); - hr = IShellView_CreateViewWindow(sview, NULL, &fs, browser, &rc, &hwnd); - ok(hr == S_OK || broken(hr == S_FALSE /*Win2k*/ ), "got (0x%08x)\n", hr); - - hr = IShellView_QueryInterface(sview, &IID_IFolderView, (void**)&fview); - ok(hr == S_OK || broken(hr == E_NOINTERFACE), "got (0x%08x)\n", hr); - if(SUCCEEDED(hr)) - { - HWND hwnd_lv; - UINT count; - - if (0) - { - /* Crashes under Win7/WinXP */ - IFolderView_GetCurrentViewMode(fview, NULL); - } - - hr = IFolderView_GetCurrentViewMode(fview, &viewmode); - ok(hr == S_OK, "got (0x%08x)\n", hr); - ok(viewmode == 1, "ViewMode was %d\n", viewmode); - - hr = IFolderView_SetCurrentViewMode(fview, FVM_AUTO); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - hr = IFolderView_SetCurrentViewMode(fview, 0); - ok(hr == E_INVALIDARG || broken(hr == S_OK), - "got (0x%08x)\n", hr); - - hr = IFolderView_GetCurrentViewMode(fview, &viewmode); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - for(i = 1; i < 9; i++) - { - hr = IFolderView_SetCurrentViewMode(fview, i); - ok(hr == S_OK || (i == 8 && hr == E_INVALIDARG /*Vista*/), - "(%d) got (0x%08x)\n", i, hr); - - hr = IFolderView_GetCurrentViewMode(fview, &viewmode); - ok(hr == S_OK, "(%d) got (0x%08x)\n", i, hr); - - /* Wine currently behaves like winxp here. */ - ok((viewmode == win7_res[i]) || (viewmode == vista_res[i]) || - (viewmode == win2k3_res[i]) || (viewmode == winxp_res[i]), - "(%d) got %d\n",i , viewmode); - } - - hr = IFolderView_SetCurrentViewMode(fview, 9); - ok(hr == E_INVALIDARG || broken(hr == S_OK), - "got (0x%08x)\n", hr); - - /* Test messages */ - hwnd_lv = subclass_listview(hwnd); - ok(hwnd_lv != NULL, "Failed to subclass listview\n"); - if(hwnd_lv) - { - /* Vista seems to set the viewmode by other means than - sending messages. At least no related messages are - captured by subclassing. - */ - BOOL vista_plus = FALSE; - static const UINT vista_plus_msgs[] = { - WM_SETREDRAW, WM_NOTIFY, WM_NOTIFYFORMAT, WM_QUERYUISTATE, - WM_MENUCHAR, WM_WINDOWPOSCHANGING, WM_NCCALCSIZE, WM_WINDOWPOSCHANGED, - WM_PARENTNOTIFY, LVM_GETHEADER, 0 }; - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - hr = IFolderView_SetCurrentViewMode(fview, 1); - ok(hr == S_OK, "got 0x%08x\n", hr); - - /* WM_SETREDRAW is not sent in versions before Vista. */ - vista_plus = get_msg_count(sequences, LISTVIEW_SEQ_INDEX, WM_SETREDRAW); - if(vista_plus) - verify_msgs_in(sequences[LISTVIEW_SEQ_INDEX], vista_plus_msgs); - else - ok_sequence(sequences, LISTVIEW_SEQ_INDEX, folderview_setcurrentviewmode1_2_prevista, - "IFolderView::SetCurrentViewMode(1)", TRUE); - - hr = IFolderView_SetCurrentViewMode(fview, 2); - ok(hr == S_OK, "got 0x%08x\n", hr); - if(vista_plus) - verify_msgs_in(sequences[LISTVIEW_SEQ_INDEX], vista_plus_msgs); - else - ok_sequence(sequences, LISTVIEW_SEQ_INDEX, folderview_setcurrentviewmode1_2_prevista, - "IFolderView::SetCurrentViewMode(2)", TRUE); - - hr = IFolderView_SetCurrentViewMode(fview, 3); - ok(hr == S_OK, "got 0x%08x\n", hr); - if(vista_plus) - verify_msgs_in(sequences[LISTVIEW_SEQ_INDEX], vista_plus_msgs); - else - ok_sequence(sequences, LISTVIEW_SEQ_INDEX, folderview_setcurrentviewmode3_prevista, - "IFolderView::SetCurrentViewMode(3)", TRUE); - - hr = IFolderView_SetCurrentViewMode(fview, 4); - ok(hr == S_OK, "got 0x%08x\n", hr); - if(vista_plus) - verify_msgs_in(sequences[LISTVIEW_SEQ_INDEX], vista_plus_msgs); - else - ok_sequence(sequences, LISTVIEW_SEQ_INDEX, folderview_setcurrentviewmode4_prevista, - "IFolderView::SetCurrentViewMode(4)", TRUE); - - hr = IFolderView_SetCurrentViewMode(fview, 5); - ok(hr == S_OK, "got 0x%08x\n", hr); - todo_wine - { - if(vista_plus) - { - verify_msgs_in(sequences[LISTVIEW_SEQ_INDEX], vista_plus_msgs); - } - else - { - count = get_msg_count(sequences, LISTVIEW_SEQ_INDEX, LVM_SETVIEW); - ok(count == 1, "LVM_SETVIEW sent %d times.\n", count); - count = get_msg_count(sequences, LISTVIEW_SEQ_INDEX, LVM_SETEXTENDEDLISTVIEWSTYLE); - ok(count == 1 || count == 2, "LVM_SETEXTENDEDLISTVIEWSTYLE sent %d times.\n", count); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - } - } - - hr = IFolderView_SetCurrentViewMode(fview, 6); - ok(hr == S_OK, "got 0x%08x\n", hr); - todo_wine - { - if(vista_plus) - { - verify_msgs_in(sequences[LISTVIEW_SEQ_INDEX], vista_plus_msgs); - } - else - { - count = get_msg_count(sequences, LISTVIEW_SEQ_INDEX, LVM_SETVIEW); - ok(count == 1, "LVM_SETVIEW sent %d times.\n", count); - count = get_msg_count(sequences, LISTVIEW_SEQ_INDEX, LVM_SETEXTENDEDLISTVIEWSTYLE); - ok(count == 1 || count == 2, "LVM_SETEXTENDEDLISTVIEWSTYLE sent %d times.\n", count); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - } - } - - hr = IFolderView_SetCurrentViewMode(fview, 7); - ok(hr == S_OK, "got 0x%08x\n", hr); - todo_wine - { - if(vista_plus) - { - verify_msgs_in(sequences[LISTVIEW_SEQ_INDEX], vista_plus_msgs); - } - else - { - count = get_msg_count(sequences, LISTVIEW_SEQ_INDEX, LVM_SETVIEW); - ok(count == 1, "LVM_SETVIEW sent %d times.\n", count); - count = get_msg_count(sequences, LISTVIEW_SEQ_INDEX, LVM_SETEXTENDEDLISTVIEWSTYLE); - ok(count == 2, "LVM_SETEXTENDEDLISTVIEWSTYLE sent %d times.\n", count); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - } - } - - hr = IFolderView_SetCurrentViewMode(fview, 8); - ok(hr == S_OK || broken(hr == E_INVALIDARG /* Vista */), "got 0x%08x\n", hr); - todo_wine - { - if(vista_plus) - { - verify_msgs_in(sequences[LISTVIEW_SEQ_INDEX], vista_plus_msgs); - } - else - { - count = get_msg_count(sequences, LISTVIEW_SEQ_INDEX, LVM_SETVIEW); - ok(count == 1, "LVM_SETVIEW sent %d times.\n", count); - count = get_msg_count(sequences, LISTVIEW_SEQ_INDEX, LVM_SETEXTENDEDLISTVIEWSTYLE); - ok(count == 2, "LVM_SETEXTENDEDLISTVIEWSTYLE sent %d times.\n", count); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - } - } - - hr = IFolderView_GetCurrentViewMode(fview, &viewmode); - ok(hr == S_OK, "Failed to get current viewmode.\n"); - ok_sequence(sequences, LISTVIEW_SEQ_INDEX, empty_seq, - "IFolderView::GetCurrentViewMode", FALSE); - } - - IFolderView_Release(fview); - } - else - { - skip("No IFolderView for the desktop folder.\n"); - } - - IShellBrowser_Release(browser); - IShellView_DestroyViewWindow(sview); - IShellView_Release(sview); - IShellFolder_Release(desktop); -} - -static void test_IOleCommandTarget(void) -{ - IShellFolder *psf_desktop; - IShellView *psv; - IOleCommandTarget *poct; - HRESULT hr; - - hr = SHGetDesktopFolder(&psf_desktop); - ok(hr == S_OK, "got (0x%08x)\n", hr); - - hr = IShellFolder_CreateViewObject(psf_desktop, NULL, &IID_IShellView, (void**)&psv); - ok(hr == S_OK, "got (0x%08x)\n", hr); - if(SUCCEEDED(hr)) - { - hr = IShellView_QueryInterface(psv, &IID_IOleCommandTarget, (void**)&poct); - ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* Win95/NT4 */, "Got 0x%08x\n", hr); - if(SUCCEEDED(hr)) - { - OLECMD oc; - - hr = IOleCommandTarget_QueryStatus(poct, NULL, 0, NULL, NULL); - ok(hr == E_INVALIDARG, "Got 0x%08x\n", hr); - - oc.cmdID = 1; - hr = IOleCommandTarget_QueryStatus(poct, NULL, 0, &oc, NULL); - ok(hr == OLECMDERR_E_UNKNOWNGROUP, "Got 0x%08x\n", hr); - - oc.cmdID = 1; - hr = IOleCommandTarget_QueryStatus(poct, NULL, 1, &oc, NULL); - ok(hr == OLECMDERR_E_UNKNOWNGROUP, "Got 0x%08x\n", hr); - - hr = IOleCommandTarget_Exec(poct, NULL, 0, 0, NULL, NULL); - ok(hr == OLECMDERR_E_UNKNOWNGROUP, "Got 0x%08x\n", hr); - - IOleCommandTarget_Release(poct); - } - - IShellView_Release(psv); - } - - IShellFolder_Release(psf_desktop); -} - -START_TEST(shlview) -{ - OleInitialize(NULL); - - init_msg_sequences(sequences, NUM_MSG_SEQUENCES); - - test_IShellView_CreateViewWindow(); - test_IFolderView(); - test_GetItemObject(); - test_IShellFolderView(); - test_IOleWindow(); - test_GetSetCurrentViewMode(); - test_IOleCommandTarget(); - - OleUninitialize(); -} diff --git a/rostests/winetests/shell32/string.c b/rostests/winetests/shell32/string.c deleted file mode 100755 index 1d55ecf9221..00000000000 --- a/rostests/winetests/shell32/string.c +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Unit tests for shell32 string operations - * - * Copyright 2004 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 - -#define WINE_NOWINSOCK -#include "windef.h" -#include "winbase.h" -#include "wtypes.h" -#include "shellapi.h" -#include "shtypes.h" -#include "objbase.h" - -#include "wine/test.h" - -static HMODULE hShell32; -static HRESULT (WINAPI *pStrRetToStrNAW)(LPVOID,DWORD,LPSTRRET,const ITEMIDLIST *); - -static WCHAR *CoDupStrW(const char* src) -{ - INT len = MultiByteToWideChar(CP_ACP, 0, src, -1, NULL, 0); - WCHAR* szTemp = CoTaskMemAlloc(len * sizeof(WCHAR)); - MultiByteToWideChar(CP_ACP, 0, src, -1, szTemp, len); - return szTemp; -} - -static inline int strcmpW(const WCHAR *str1, const WCHAR *str2) -{ - while (*str1 && (*str1 == *str2)) { str1++; str2++; } - return *str1 - *str2; -} - -static void test_StrRetToStringNA(void) -{ - trace("StrRetToStringNAW is Ascii\n"); - /* FIXME */ -} - -static void test_StrRetToStringNW(void) -{ - static const WCHAR szTestW[] = { 'T','e','s','t','\0' }; - ITEMIDLIST iidl[10]; - WCHAR buff[128]; - STRRET strret; - BOOL ret; - - trace("StrRetToStringNAW is Unicode\n"); - - strret.uType = STRRET_WSTR; - U(strret).pOleStr = CoDupStrW("Test"); - memset(buff, 0xff, sizeof(buff)); - ret = pStrRetToStrNAW(buff, sizeof(buff)/sizeof(WCHAR), &strret, NULL); - ok(ret == TRUE && !strcmpW(buff, szTestW), - "STRRET_WSTR: dup failed, ret=%d\n", ret); - - strret.uType = STRRET_CSTR; - lstrcpyA(U(strret).cStr, "Test"); - memset(buff, 0xff, sizeof(buff)); - ret = pStrRetToStrNAW(buff, sizeof(buff)/sizeof(WCHAR), &strret, NULL); - ok(ret == TRUE && !strcmpW(buff, szTestW), - "STRRET_CSTR: dup failed, ret=%d\n", ret); - - strret.uType = STRRET_OFFSET; - U(strret).uOffset = 1; - strcpy((char*)&iidl, " Test"); - memset(buff, 0xff, sizeof(buff)); - ret = pStrRetToStrNAW(buff, sizeof(buff)/sizeof(WCHAR), &strret, iidl); - ok(ret == TRUE && !strcmpW(buff, szTestW), - "STRRET_OFFSET: dup failed, ret=%d\n", ret); - - /* The next test crashes on W2K, WinXP and W2K3, so we don't test. */ -#if 0 - /* Invalid dest - should return FALSE, except NT4 does not, so we don't check. */ - strret.uType = STRRET_WSTR; - U(strret).pOleStr = CoDupStrW("Test"); - pStrRetToStrNAW(NULL, sizeof(buff)/sizeof(WCHAR), &strret, NULL); - trace("NULL dest: ret=%d\n", ret); -#endif -} - -START_TEST(string) -{ - CoInitialize(0); - - hShell32 = GetModuleHandleA("shell32.dll"); - - pStrRetToStrNAW = (void*)GetProcAddress(hShell32, (LPSTR)96); - if (pStrRetToStrNAW) - { - if (!(GetVersion() & 0x80000000)) - test_StrRetToStringNW(); - else - test_StrRetToStringNA(); - } - - CoUninitialize(); -} diff --git a/rostests/winetests/shell32/systray.c b/rostests/winetests/shell32/systray.c deleted file mode 100644 index 23d30341dad..00000000000 --- a/rostests/winetests/shell32/systray.c +++ /dev/null @@ -1,115 +0,0 @@ -/* Unit tests for systray - * - * Copyright 2007 Mikolaj Zalewski - * - * 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 _WIN32_IE 0x600 -#include -#include - -#include - -#include "wine/test.h" - - -static HWND hMainWnd; -static BOOL (WINAPI *pShell_NotifyIconW)(DWORD,PNOTIFYICONDATAW); - -static void test_cbsize(void) -{ - NOTIFYICONDATAA nidA; - BOOL ret; - - if (pShell_NotifyIconW) - { - NOTIFYICONDATAW nidW; - - ZeroMemory(&nidW, sizeof(nidW)); - nidW.cbSize = NOTIFYICONDATAW_V1_SIZE; - nidW.hWnd = hMainWnd; - nidW.uID = 1; - nidW.uFlags = NIF_ICON|NIF_MESSAGE; - nidW.hIcon = LoadIcon(NULL, IDI_APPLICATION); - nidW.uCallbackMessage = WM_USER+17; - ret = pShell_NotifyIconW(NIM_ADD, &nidW); - /* using an invalid cbSize does work */ - nidW.cbSize = 3; - nidW.hWnd = hMainWnd; - nidW.uID = 1; - ret = pShell_NotifyIconW(NIM_DELETE, &nidW); - ok( ret || broken(!ret), /* nt4 */ "NIM_DELETE failed!\n"); - /* as icon doesn't exist anymore - now there will be an error */ - nidW.cbSize = sizeof(nidW); - ok(!pShell_NotifyIconW(NIM_DELETE, &nidW) != !ret, "The icon was not deleted\n"); - } - - /* same for Shell_NotifyIconA */ - ZeroMemory(&nidA, sizeof(nidA)); - nidA.cbSize = NOTIFYICONDATAA_V1_SIZE; - nidA.hWnd = hMainWnd; - nidA.uID = 1; - nidA.uFlags = NIF_ICON|NIF_MESSAGE; - nidA.hIcon = LoadIcon(NULL, IDI_APPLICATION); - nidA.uCallbackMessage = WM_USER+17; - ok(Shell_NotifyIconA(NIM_ADD, &nidA), "NIM_ADD failed!\n"); - - /* using an invalid cbSize does work */ - nidA.cbSize = 3; - nidA.hWnd = hMainWnd; - nidA.uID = 1; - ret = Shell_NotifyIconA(NIM_DELETE, &nidA); - ok(ret, "NIM_DELETE failed!\n"); - /* as icon doesn't exist anymore - now there will be an error */ - nidA.cbSize = sizeof(nidA); - ok(!Shell_NotifyIconA(NIM_DELETE, &nidA) != !ret, "The icon was not deleted\n"); -} - -START_TEST(systray) -{ - WNDCLASSA wc; - MSG msg; - RECT rc; - HMODULE hshell32; - - hshell32 = GetModuleHandleA("shell32.dll"); - pShell_NotifyIconW = (void*)GetProcAddress(hshell32, "Shell_NotifyIconW"); - - wc.style = CS_HREDRAW | CS_VREDRAW; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = GetModuleHandleA(NULL); - wc.hIcon = NULL; - wc.hCursor = LoadCursorA(NULL, IDC_IBEAM); - wc.hbrBackground = GetSysColorBrush(COLOR_WINDOW); - wc.lpszMenuName = NULL; - wc.lpszClassName = "MyTestWnd"; - wc.lpfnWndProc = DefWindowProc; - RegisterClassA(&wc); - - hMainWnd = CreateWindowExA(0, "MyTestWnd", "Blah", WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, 680, 260, NULL, NULL, GetModuleHandleA(NULL), 0); - GetClientRect(hMainWnd, &rc); - ShowWindow(hMainWnd, SW_SHOW); - - test_cbsize(); - - PostQuitMessage(0); - while(GetMessageA(&msg,0,0,0)) { - TranslateMessage(&msg); - DispatchMessageA(&msg); - } - DestroyWindow(hMainWnd); -} diff --git a/rostests/winetests/shell32/testlist.c b/rostests/winetests/shell32/testlist.c deleted file mode 100644 index 67bafbcda31..00000000000 --- a/rostests/winetests/shell32/testlist.c +++ /dev/null @@ -1,49 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_appbar(void); -extern void func_autocomplete(void); -extern void func_brsfolder(void); -extern void func_ebrowser(void); -extern void func_generated(void); -extern void func_progman_dde(void); -extern void func_recyclebin(void); -extern void func_shelldispatch(void); -extern void func_shelllink(void); -extern void func_shellole(void); -extern void func_shellpath(void); -extern void func_shfldr_special(void); -extern void func_shlexec(void); -extern void func_shlfileop(void); -extern void func_shlfolder(void); -extern void func_shlview(void); -extern void func_string(void); -extern void func_systray(void); - -const struct test winetest_testlist[] = -{ - { "appbar", func_appbar }, - { "autocomplete", func_autocomplete }, - { "brsfolder", func_brsfolder }, - { "ebrowser", func_ebrowser }, - { "generated", func_generated }, - { "progman_dde", func_progman_dde }, - { "recyclebin", func_recyclebin }, - { "shelldispatch", func_shelldispatch }, - { "shelllink", func_shelllink }, - { "shellole", func_shellole }, - { "shellpath", func_shellpath }, - { "shfldr_special", func_shfldr_special }, - { "shlexec", func_shlexec }, - { "shlfileop", func_shlfileop }, - { "shlfolder", func_shlfolder }, - { "shlview", func_shlview }, - { "string", func_string }, - { "systray", func_systray }, - { 0, 0 } -}; diff --git a/rostests/winetests/shlwapi/CMakeLists.txt b/rostests/winetests/shlwapi/CMakeLists.txt deleted file mode 100644 index 807f11a2eb8..00000000000 --- a/rostests/winetests/shlwapi/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -remove_definitions(-DWINVER=0x502 -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x502) - -list(APPEND SOURCE - assoc.c - clist.c - clsid.c - generated.c - istream.c - ordinal.c - path.c - shreg.c - string.c - url.c - testlist.c - thread.c) - -add_executable(shlwapi_winetest ${SOURCE}) -target_link_libraries(shlwapi_winetest wine uuid) -set_module_type(shlwapi_winetest win32cui) -add_importlibs(shlwapi_winetest shlwapi ole32 oleaut32 user32 advapi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET shlwapi_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/shlwapi/assoc.c b/rostests/winetests/shlwapi/assoc.c deleted file mode 100644 index a6f5e2d5e61..00000000000 --- a/rostests/winetests/shlwapi/assoc.c +++ /dev/null @@ -1,291 +0,0 @@ -/* Unit test suite for SHLWAPI IQueryAssociations functions - * - * Copyright 2008 Google (Lei Zhang) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -#include "wine/test.h" -#include "shlwapi.h" -#include "shlguid.h" - -#define expect(expected, got) ok ( expected == got, "Expected %d, got %d\n", expected, got) -#define expect_hr(expected, got) ok ( expected == got, "Expected %08x, got %08x\n", expected, got) - -static HRESULT (WINAPI *pAssocQueryStringA)(ASSOCF,ASSOCSTR,LPCSTR,LPCSTR,LPSTR,LPDWORD) = NULL; -static HRESULT (WINAPI *pAssocQueryStringW)(ASSOCF,ASSOCSTR,LPCWSTR,LPCWSTR,LPWSTR,LPDWORD) = NULL; -static HRESULT (WINAPI *pAssocCreate)(CLSID, REFIID, void **) = NULL; - -/* Every version of Windows with IE should have this association? */ -static const WCHAR dotHtml[] = { '.','h','t','m','l',0 }; -static const WCHAR badBad[] = { 'b','a','d','b','a','d',0 }; -static const WCHAR dotBad[] = { '.','b','a','d',0 }; -static const WCHAR open[] = { 'o','p','e','n',0 }; -static const WCHAR invalid[] = { 'i','n','v','a','l','i','d',0 }; - -static void test_getstring_bad(void) -{ - HRESULT hr; - DWORD len; - - if (!pAssocQueryStringW) - { - win_skip("AssocQueryStringW() is missing\n"); - return; - } - - hr = pAssocQueryStringW(0, ASSOCSTR_EXECUTABLE, NULL, open, NULL, &len); - expect_hr(E_INVALIDARG, hr); - hr = pAssocQueryStringW(0, ASSOCSTR_EXECUTABLE, badBad, open, NULL, &len); - ok(hr == E_FAIL || - hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION), /* Win9x/WinMe/NT4/W2K/Vista/W2K8 */ - "Unexpected result : %08x\n", hr); - hr = pAssocQueryStringW(0, ASSOCSTR_EXECUTABLE, dotBad, open, NULL, &len); - ok(hr == E_FAIL || - hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION), /* Win9x/WinMe/NT4/W2K/Vista/W2K8 */ - "Unexpected result : %08x\n", hr); - hr = pAssocQueryStringW(0, ASSOCSTR_EXECUTABLE, dotHtml, invalid, NULL, - &len); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || - hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION), /* Win9x/WinMe/NT4/W2K/Vista/W2K8 */ - "Unexpected result : %08x\n", hr); - hr = pAssocQueryStringW(0, ASSOCSTR_EXECUTABLE, dotHtml, open, NULL, NULL); - ok(hr == E_UNEXPECTED || - hr == E_INVALIDARG, /* Win9x/WinMe/NT4/W2K/Vista/W2K8 */ - "Unexpected result : %08x\n", hr); - - hr = pAssocQueryStringW(0, ASSOCSTR_FRIENDLYAPPNAME, NULL, open, NULL, &len); - expect_hr(E_INVALIDARG, hr); - hr = pAssocQueryStringW(0, ASSOCSTR_FRIENDLYAPPNAME, badBad, open, NULL, - &len); - ok(hr == E_FAIL || - hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION), /* Win9x/WinMe/NT4/W2K/Vista/W2K8 */ - "Unexpected result : %08x\n", hr); - hr = pAssocQueryStringW(0, ASSOCSTR_FRIENDLYAPPNAME, dotBad, open, NULL, - &len); - ok(hr == E_FAIL || - hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION), /* Win9x/WinMe/NT4/W2K/Vista/W2K8 */ - "Unexpected result : %08x\n", hr); - hr = pAssocQueryStringW(0, ASSOCSTR_FRIENDLYAPPNAME, dotHtml, invalid, NULL, - &len); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || - hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION) || /* W2K/Vista/W2K8 */ - hr == E_FAIL, /* Win9x/WinMe/NT4 */ - "Unexpected result : %08x\n", hr); - hr = pAssocQueryStringW(0, ASSOCSTR_FRIENDLYAPPNAME, dotHtml, open, NULL, - NULL); - ok(hr == E_UNEXPECTED || - hr == E_INVALIDARG, /* Win9x/WinMe/NT4/W2K/Vista/W2K8 */ - "Unexpected result : %08x\n", hr); -} - -static void test_getstring_basic(void) -{ - HRESULT hr; - WCHAR * friendlyName; - WCHAR * executableName; - DWORD len, len2, slen; - - if (!pAssocQueryStringW) - { - win_skip("AssocQueryStringW() is missing\n"); - return; - } - - hr = pAssocQueryStringW(0, ASSOCSTR_EXECUTABLE, dotHtml, open, NULL, &len); - expect_hr(S_FALSE, hr); - if (hr != S_FALSE) - { - skip("failed to get initial len\n"); - return; - } - - executableName = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, - len * sizeof(WCHAR)); - if (!executableName) - { - skip("failed to allocate memory\n"); - return; - } - - len2 = len; - hr = pAssocQueryStringW(0, ASSOCSTR_EXECUTABLE, dotHtml, open, - executableName, &len2); - expect_hr(S_OK, hr); - slen = lstrlenW(executableName) + 1; - expect(len, len2); - expect(len, slen); - - hr = pAssocQueryStringW(0, ASSOCSTR_FRIENDLYAPPNAME, dotHtml, open, NULL, - &len); - ok(hr == S_FALSE || - hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), /* Win9x/NT4 */ - "Unexpected result : %08x\n", hr); - if (hr != S_FALSE) - { - HeapFree(GetProcessHeap(), 0, executableName); - skip("failed to get initial len\n"); - return; - } - - friendlyName = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, - len * sizeof(WCHAR)); - if (!friendlyName) - { - HeapFree(GetProcessHeap(), 0, executableName); - skip("failed to allocate memory\n"); - return; - } - - len2 = len; - hr = pAssocQueryStringW(0, ASSOCSTR_FRIENDLYAPPNAME, dotHtml, open, - friendlyName, &len2); - expect_hr(S_OK, hr); - slen = lstrlenW(friendlyName) + 1; - expect(len, len2); - expect(len, slen); - - HeapFree(GetProcessHeap(), 0, executableName); - HeapFree(GetProcessHeap(), 0, friendlyName); -} - -static void test_getstring_no_extra(void) -{ - LONG ret; - HKEY hkey; - HRESULT hr; - static const CHAR dotWinetest[] = { - '.','w','i','n','e','t','e','s','t',0 - }; - static const CHAR winetestfile[] = { - 'w','i','n','e','t','e','s','t', 'f','i','l','e',0 - }; - static const CHAR winetestfileAction[] = { - 'w','i','n','e','t','e','s','t','f','i','l','e', - '\\','s','h','e','l','l', - '\\','f','o','o', - '\\','c','o','m','m','a','n','d',0 - }; - static const CHAR action[] = { - 'n','o','t','e','p','a','d','.','e','x','e',0 - }; - CHAR buf[MAX_PATH]; - DWORD len = MAX_PATH; - - if (!pAssocQueryStringA) - { - win_skip("AssocQueryStringA() is missing\n"); - return; - } - - buf[0] = '\0'; - ret = RegCreateKeyA(HKEY_CLASSES_ROOT, dotWinetest, &hkey); - if (ret != ERROR_SUCCESS) { - skip("failed to create dotWinetest key\n"); - return; - } - - ret = RegSetValueA(hkey, NULL, REG_SZ, winetestfile, lstrlenA(winetestfile)); - RegCloseKey(hkey); - if (ret != ERROR_SUCCESS) - { - skip("failed to set dotWinetest key\n"); - goto cleanup; - } - - ret = RegCreateKeyA(HKEY_CLASSES_ROOT, winetestfileAction, &hkey); - if (ret != ERROR_SUCCESS) - { - skip("failed to create winetestfileAction key\n"); - goto cleanup; - } - - ret = RegSetValueA(hkey, NULL, REG_SZ, action, lstrlenA(action)); - RegCloseKey(hkey); - if (ret != ERROR_SUCCESS) - { - skip("failed to set winetestfileAction key\n"); - goto cleanup; - } - - hr = pAssocQueryStringA(0, ASSOCSTR_EXECUTABLE, dotWinetest, NULL, buf, &len); - ok(hr == S_OK || - hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), /* XP and W2K3 */ - "Unexpected result : %08x\n", hr); - hr = pAssocQueryStringA(0, ASSOCSTR_EXECUTABLE, dotWinetest, "foo", buf, &len); - expect_hr(S_OK, hr); - ok(strstr(buf, action) != NULL, - "got '%s' (Expected result to include 'notepad.exe')\n", buf); - -cleanup: - SHDeleteKeyA(HKEY_CLASSES_ROOT, dotWinetest); - SHDeleteKeyA(HKEY_CLASSES_ROOT, winetestfile); - -} - -static void test_assoc_create(void) -{ - HRESULT hr; - IQueryAssociations *pqa; - - if (!pAssocCreate) - { - win_skip("AssocCreate() is missing\n"); - return; - } - - hr = pAssocCreate(IID_NULL, &IID_NULL, NULL); - ok(hr == E_INVALIDARG, "Unexpected result : %08x\n", hr); - - hr = pAssocCreate(CLSID_QueryAssociations, &IID_NULL, (LPVOID*)&pqa); - ok(hr == CLASS_E_CLASSNOTAVAILABLE || hr == E_NOTIMPL || hr == E_NOINTERFACE - , "Unexpected result : %08x\n", hr); - - hr = pAssocCreate(IID_NULL, &IID_IQueryAssociations, (LPVOID*)&pqa); - ok(hr == CLASS_E_CLASSNOTAVAILABLE || hr == E_NOTIMPL || hr == E_INVALIDARG - , "Unexpected result : %08x\n", hr); - - hr = pAssocCreate(CLSID_QueryAssociations, &IID_IQueryAssociations, (LPVOID*)&pqa); - ok(hr == S_OK || hr == E_NOTIMPL /* win98 */ - , "Unexpected result : %08x\n", hr); - if(hr == S_OK) - { - IQueryAssociations_Release(pqa); - } - - hr = pAssocCreate(CLSID_QueryAssociations, &IID_IUnknown, (LPVOID*)&pqa); - ok(hr == S_OK || hr == E_NOTIMPL /* win98 */ - , "Unexpected result : %08x\n", hr); - if(hr == S_OK) - { - IQueryAssociations_Release(pqa); - } -} - -START_TEST(assoc) -{ - HMODULE hshlwapi; - hshlwapi = GetModuleHandleA("shlwapi.dll"); - pAssocQueryStringA = (void*)GetProcAddress(hshlwapi, "AssocQueryStringA"); - pAssocQueryStringW = (void*)GetProcAddress(hshlwapi, "AssocQueryStringW"); - pAssocCreate = (void*)GetProcAddress(hshlwapi, "AssocCreate"); - - test_getstring_bad(); - test_getstring_basic(); - test_getstring_no_extra(); - test_assoc_create(); -} diff --git a/rostests/winetests/shlwapi/clist.c b/rostests/winetests/shlwapi/clist.c deleted file mode 100755 index 3b979fdec8a..00000000000 --- a/rostests/winetests/shlwapi/clist.c +++ /dev/null @@ -1,638 +0,0 @@ -/* Unit test suite for SHLWAPI Compact List and IStream ordinal functions - * - * Copyright 2002 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 "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "objbase.h" - -typedef struct tagSHLWAPI_CLIST -{ - ULONG ulSize; - ULONG ulId; -} SHLWAPI_CLIST, *LPSHLWAPI_CLIST; - -typedef const SHLWAPI_CLIST* LPCSHLWAPI_CLIST; - -/* Items to add */ -static const SHLWAPI_CLIST SHLWAPI_CLIST_items[] = -{ - {4, 1}, - {8, 3}, - {12, 2}, - {16, 8}, - {20, 9}, - {3, 11}, - {9, 82}, - {33, 16}, - {32, 55}, - {24, 100}, - {39, 116}, - { 0, 0} -}; - -/* Dummy IStream object for testing calls */ -typedef struct -{ - void* lpVtbl; - LONG ref; - int readcalls; - BOOL failreadcall; - BOOL failreadsize; - BOOL readbeyondend; - BOOL readreturnlarge; - int writecalls; - BOOL failwritecall; - BOOL failwritesize; - int seekcalls; - int statcalls; - BOOL failstatcall; - LPCSHLWAPI_CLIST item; - ULARGE_INTEGER pos; -} _IDummyStream; - -static -HRESULT WINAPI QueryInterface(_IDummyStream *This,REFIID riid, LPVOID *ppvObj) -{ - return S_OK; -} - -static ULONG WINAPI AddRef(_IDummyStream *This) -{ - return InterlockedIncrement(&This->ref); -} - -static ULONG WINAPI Release(_IDummyStream *This) -{ - return InterlockedDecrement(&This->ref); -} - -static HRESULT WINAPI Read(_IDummyStream* This, LPVOID lpMem, ULONG ulSize, - PULONG lpRead) -{ - HRESULT hRet = S_OK; - ++This->readcalls; - - if (This->failreadcall) - { - return STG_E_ACCESSDENIED; - } - else if (This->failreadsize) - { - *lpRead = ulSize + 8; - return S_OK; - } - else if (This->readreturnlarge) - { - *((ULONG*)lpMem) = 0xffff01; - *lpRead = ulSize; - This->readreturnlarge = FALSE; - return S_OK; - } - if (ulSize == sizeof(ULONG)) - { - /* Read size of item */ - *((ULONG*)lpMem) = This->item->ulSize ? This->item->ulSize + sizeof(SHLWAPI_CLIST) : 0; - *lpRead = ulSize; - } - else - { - unsigned int i; - char* buff = lpMem; - - /* Read item data */ - if (!This->item->ulSize) - { - This->readbeyondend = TRUE; - *lpRead = 0; - return E_FAIL; /* Should never happen */ - } - *((ULONG*)lpMem) = This->item->ulId; - *lpRead = ulSize; - - for (i = 0; i < This->item->ulSize; i++) - buff[4+i] = i*2; - - This->item++; - } - return hRet; -} - -static HRESULT WINAPI Write(_IDummyStream* This, LPVOID lpMem, ULONG ulSize, - PULONG lpWritten) -{ - HRESULT hRet = S_OK; - - ++This->writecalls; - if (This->failwritecall) - { - return STG_E_ACCESSDENIED; - } - else if (This->failwritesize) - { - *lpWritten = 0; - } - else - *lpWritten = ulSize; - return hRet; -} - -static HRESULT WINAPI Seek(_IDummyStream* This, LARGE_INTEGER dlibMove, - DWORD dwOrigin, ULARGE_INTEGER* plibNewPosition) -{ - ++This->seekcalls; - This->pos.QuadPart = dlibMove.QuadPart; - if (plibNewPosition) - plibNewPosition->QuadPart = dlibMove.QuadPart; - return S_OK; -} - -static HRESULT WINAPI Stat(_IDummyStream* This, STATSTG* pstatstg, - DWORD grfStatFlag) -{ - ++This->statcalls; - if (This->failstatcall) - return E_FAIL; - if (pstatstg) - pstatstg->cbSize.QuadPart = This->pos.QuadPart; - return S_OK; -} - -/* VTable */ -static void* iclvt[] = -{ - QueryInterface, - AddRef, - Release, - Read, - Write, - Seek, - NULL, /* SetSize */ - NULL, /* CopyTo */ - NULL, /* Commit */ - NULL, /* Revert */ - NULL, /* LockRegion */ - NULL, /* UnlockRegion */ - Stat, - NULL /* Clone */ -}; - -/* Function ptrs for ordinal calls */ -static HMODULE SHLWAPI_hshlwapi = 0; - -static VOID (WINAPI *pSHLWAPI_19)(LPSHLWAPI_CLIST); -static HRESULT (WINAPI *pSHLWAPI_20)(LPSHLWAPI_CLIST*,LPCSHLWAPI_CLIST); -static BOOL (WINAPI *pSHLWAPI_21)(LPSHLWAPI_CLIST*,ULONG); -static LPSHLWAPI_CLIST (WINAPI *pSHLWAPI_22)(LPSHLWAPI_CLIST,ULONG); -static HRESULT (WINAPI *pSHLWAPI_17)(_IDummyStream*,LPSHLWAPI_CLIST); -static HRESULT (WINAPI *pSHLWAPI_18)(_IDummyStream*,LPSHLWAPI_CLIST*); - -static BOOL (WINAPI *pSHLWAPI_166)(_IDummyStream*); -static HRESULT (WINAPI *pSHLWAPI_184)(_IDummyStream*,LPVOID,ULONG); -static HRESULT (WINAPI *pSHLWAPI_212)(_IDummyStream*,LPCVOID,ULONG); -static HRESULT (WINAPI *pSHLWAPI_213)(_IDummyStream*); -static HRESULT (WINAPI *pSHLWAPI_214)(_IDummyStream*,ULARGE_INTEGER*); - - -static void InitFunctionPtrs(void) -{ - SHLWAPI_hshlwapi = GetModuleHandleA("shlwapi.dll"); - - pSHLWAPI_17 = (void *)GetProcAddress( SHLWAPI_hshlwapi, (LPSTR)17); - ok(pSHLWAPI_17 != 0, "No Ordinal 17\n"); - pSHLWAPI_18 = (void *)GetProcAddress( SHLWAPI_hshlwapi, (LPSTR)18); - ok(pSHLWAPI_18 != 0, "No Ordinal 18\n"); - pSHLWAPI_19 = (void *)GetProcAddress( SHLWAPI_hshlwapi, (LPSTR)19); - ok(pSHLWAPI_19 != 0, "No Ordinal 19\n"); - pSHLWAPI_20 = (void *)GetProcAddress( SHLWAPI_hshlwapi, (LPSTR)20); - ok(pSHLWAPI_20 != 0, "No Ordinal 20\n"); - pSHLWAPI_21 = (void *)GetProcAddress( SHLWAPI_hshlwapi, (LPSTR)21); - ok(pSHLWAPI_21 != 0, "No Ordinal 21\n"); - pSHLWAPI_22 = (void *)GetProcAddress( SHLWAPI_hshlwapi, (LPSTR)22); - ok(pSHLWAPI_22 != 0, "No Ordinal 22\n"); - pSHLWAPI_166 = (void *)GetProcAddress( SHLWAPI_hshlwapi, (LPSTR)166); - ok(pSHLWAPI_166 != 0, "No Ordinal 166\n"); - pSHLWAPI_184 = (void *)GetProcAddress( SHLWAPI_hshlwapi, (LPSTR)184); - ok(pSHLWAPI_184 != 0, "No Ordinal 184\n"); - pSHLWAPI_212 = (void *)GetProcAddress( SHLWAPI_hshlwapi, (LPSTR)212); - ok(pSHLWAPI_212 != 0, "No Ordinal 212\n"); - pSHLWAPI_213 = (void *)GetProcAddress( SHLWAPI_hshlwapi, (LPSTR)213); - ok(pSHLWAPI_213 != 0, "No Ordinal 213\n"); - pSHLWAPI_214 = (void *)GetProcAddress( SHLWAPI_hshlwapi, (LPSTR)214); - ok(pSHLWAPI_214 != 0, "No Ordinal 214\n"); -} - -static void InitDummyStream(_IDummyStream* iface) -{ - iface->lpVtbl = (void*)iclvt; - iface->ref = 1; - iface->readcalls = 0; - iface->failreadcall = FALSE; - iface->failreadsize = FALSE; - iface->readbeyondend = FALSE; - iface->readreturnlarge = FALSE; - iface->writecalls = 0; - iface->failwritecall = FALSE; - iface->failwritesize = FALSE; - iface->seekcalls = 0; - iface->statcalls = 0; - iface->failstatcall = FALSE; - iface->item = SHLWAPI_CLIST_items; - iface->pos.QuadPart = 0; -} - - -static void test_CList(void) -{ - _IDummyStream streamobj; - LPSHLWAPI_CLIST list = NULL; - LPCSHLWAPI_CLIST item = SHLWAPI_CLIST_items; - HRESULT hRet; - LPSHLWAPI_CLIST inserted; - BYTE buff[64]; - unsigned int i; - - if (!pSHLWAPI_17 || !pSHLWAPI_18 || !pSHLWAPI_19 || !pSHLWAPI_20 || - !pSHLWAPI_21 || !pSHLWAPI_22) - return; - - /* Populate a list and test the items are added correctly */ - while (item->ulSize) - { - /* Create item and fill with data */ - inserted = (LPSHLWAPI_CLIST)buff; - inserted->ulSize = item->ulSize + sizeof(SHLWAPI_CLIST); - inserted->ulId = item->ulId; - for (i = 0; i < item->ulSize; i++) - buff[sizeof(SHLWAPI_CLIST)+i] = i*2; - - /* Add it */ - hRet = pSHLWAPI_20(&list, inserted); - ok(hRet > S_OK, "failed list add\n"); - - if (hRet > S_OK) - { - ok(list && list->ulSize, "item not added\n"); - - /* Find it */ - inserted = pSHLWAPI_22(list, item->ulId); - ok(inserted != NULL, "lost after adding\n"); - - ok(!inserted || inserted->ulId != ~0U, "find returned a container\n"); - - /* Check size */ - if (inserted && inserted->ulSize & 0x3) - { - /* Contained */ - ok(inserted[-1].ulId == ~0U, "invalid size is not countained\n"); - ok(inserted[-1].ulSize > inserted->ulSize+sizeof(SHLWAPI_CLIST), - "container too small\n"); - } - else if (inserted) - { - ok(inserted->ulSize==item->ulSize+sizeof(SHLWAPI_CLIST), - "id %d wrong size %d\n", inserted->ulId, inserted->ulSize); - } - if (inserted) - { - BOOL bDataOK = TRUE; - LPBYTE bufftest = (LPBYTE)inserted; - - for (i = 0; i < inserted->ulSize - sizeof(SHLWAPI_CLIST); i++) - if (bufftest[sizeof(SHLWAPI_CLIST)+i] != i*2) - bDataOK = FALSE; - - ok(bDataOK == TRUE, "data corrupted on insert\n"); - } - ok(!inserted || inserted->ulId==item->ulId, "find got wrong item\n"); - } - item++; - } - - /* Write the list */ - InitDummyStream(&streamobj); - - hRet = pSHLWAPI_17(&streamobj, list); - ok(hRet == S_OK, "write failed\n"); - if (hRet == S_OK) - { - /* 1 call for each element, + 1 for OK (use our null element for this) */ - ok(streamobj.writecalls == sizeof(SHLWAPI_CLIST_items)/sizeof(SHLWAPI_CLIST), - "wrong call count\n"); - ok(streamobj.readcalls == 0,"called Read() in write\n"); - ok(streamobj.seekcalls == 0,"called Seek() in write\n"); - } - - /* Failure cases for writing */ - InitDummyStream(&streamobj); - streamobj.failwritecall = TRUE; - hRet = pSHLWAPI_17(&streamobj, list); - ok(hRet == STG_E_ACCESSDENIED, "changed object failure return\n"); - ok(streamobj.writecalls == 1, "called object after failure\n"); - ok(streamobj.readcalls == 0,"called Read() after failure\n"); - ok(streamobj.seekcalls == 0,"called Seek() after failure\n"); - - InitDummyStream(&streamobj); - streamobj.failwritesize = TRUE; - hRet = pSHLWAPI_17(&streamobj, list); - ok(hRet == STG_E_MEDIUMFULL || broken(hRet == E_FAIL) /* Win7 */, - "changed size failure return\n"); - ok(streamobj.writecalls == 1, "called object after size failure\n"); - ok(streamobj.readcalls == 0,"called Read() after failure\n"); - ok(streamobj.seekcalls == 0,"called Seek() after failure\n"); - - /* Invalid inputs for adding */ - inserted = (LPSHLWAPI_CLIST)buff; - inserted->ulSize = sizeof(SHLWAPI_CLIST) -1; - inserted->ulId = 33; - hRet = pSHLWAPI_20(&list, inserted); - /* The call succeeds but the item is not inserted, except on some early - * versions which return failure. Wine behaves like later versions. - */ - if (0) - { - ok(hRet == S_OK, "failed bad element size\n"); - } - inserted = pSHLWAPI_22(list, 33); - ok(inserted == NULL, "inserted bad element size\n"); - - inserted = (LPSHLWAPI_CLIST)buff; - inserted->ulSize = 44; - inserted->ulId = ~0U; - hRet = pSHLWAPI_20(&list, inserted); - /* See comment above, some early versions fail this call */ - if (0) - { - ok(hRet == S_OK, "failed adding a container\n"); - } - item = SHLWAPI_CLIST_items; - - /* Look for nonexistent item in populated list */ - inserted = pSHLWAPI_22(list, 99999999); - ok(inserted == NULL, "found a nonexistent item\n"); - - while (item->ulSize) - { - /* Delete items */ - BOOL bRet = pSHLWAPI_21(&list, item->ulId); - ok(bRet == TRUE, "couldn't find item to delete\n"); - item++; - } - - /* Look for nonexistent item in empty list */ - inserted = pSHLWAPI_22(list, 99999999); - ok(inserted == NULL, "found an item in empty list\n"); - - /* Create a list by reading in data */ - InitDummyStream(&streamobj); - - hRet = pSHLWAPI_18(&streamobj, &list); - ok(hRet == S_OK, "failed create from Read()\n"); - if (hRet == S_OK) - { - ok(streamobj.readbeyondend == FALSE, "read beyond end\n"); - /* 2 calls per item, but only 1 for the terminator */ - ok(streamobj.readcalls == sizeof(SHLWAPI_CLIST_items)/sizeof(SHLWAPI_CLIST)*2-1, - "wrong call count\n"); - ok(streamobj.writecalls == 0, "called Write() from create\n"); - ok(streamobj.seekcalls == 0,"called Seek() from create\n"); - - item = SHLWAPI_CLIST_items; - - /* Check the items were added correctly */ - while (item->ulSize) - { - inserted = pSHLWAPI_22(list, item->ulId); - ok(inserted != NULL, "lost after adding\n"); - - ok(!inserted || inserted->ulId != ~0U, "find returned a container\n"); - - /* Check size */ - if (inserted && inserted->ulSize & 0x3) - { - /* Contained */ - ok(inserted[-1].ulId == ~0U, "invalid size is not countained\n"); - ok(inserted[-1].ulSize > inserted->ulSize+sizeof(SHLWAPI_CLIST), - "container too small\n"); - } - else if (inserted) - { - ok(inserted->ulSize==item->ulSize+sizeof(SHLWAPI_CLIST), - "id %d wrong size %d\n", inserted->ulId, inserted->ulSize); - } - ok(!inserted || inserted->ulId==item->ulId, "find got wrong item\n"); - if (inserted) - { - BOOL bDataOK = TRUE; - LPBYTE bufftest = (LPBYTE)inserted; - - for (i = 0; i < inserted->ulSize - sizeof(SHLWAPI_CLIST); i++) - if (bufftest[sizeof(SHLWAPI_CLIST)+i] != i*2) - bDataOK = FALSE; - - ok(bDataOK == TRUE, "data corrupted on insert\n"); - } - item++; - } - } - - /* Failure cases for reading */ - InitDummyStream(&streamobj); - streamobj.failreadcall = TRUE; - hRet = pSHLWAPI_18(&streamobj, &list); - ok(hRet == STG_E_ACCESSDENIED, "changed object failure return\n"); - ok(streamobj.readbeyondend == FALSE, "read beyond end\n"); - ok(streamobj.readcalls == 1, "called object after read failure\n"); - ok(streamobj.writecalls == 0,"called Write() after read failure\n"); - ok(streamobj.seekcalls == 0,"called Seek() after read failure\n"); - - /* Read returns large object */ - InitDummyStream(&streamobj); - streamobj.readreturnlarge = TRUE; - hRet = pSHLWAPI_18(&streamobj, &list); - ok(hRet == S_OK, "failed create from Read() with large item\n"); - ok(streamobj.readbeyondend == FALSE, "read beyond end\n"); - ok(streamobj.readcalls == 1,"wrong call count\n"); - ok(streamobj.writecalls == 0,"called Write() after read failure\n"); - ok(streamobj.seekcalls == 2,"wrong Seek() call count (%d)\n", streamobj.seekcalls); - - pSHLWAPI_19(list); -} - -static BOOL test_SHLWAPI_166(void) -{ - _IDummyStream streamobj; - BOOL bRet; - - if (!pSHLWAPI_166) - return FALSE; - - InitDummyStream(&streamobj); - bRet = pSHLWAPI_166(&streamobj); - - if (bRet != TRUE) - return FALSE; /* This version doesn't support stream ops on clists */ - - ok(streamobj.readcalls == 0, "called Read()\n"); - ok(streamobj.writecalls == 0, "called Write()\n"); - ok(streamobj.seekcalls == 0, "called Seek()\n"); - ok(streamobj.statcalls == 1, "wrong call count\n"); - - streamobj.statcalls = 0; - streamobj.pos.QuadPart = 50001; - - bRet = pSHLWAPI_166(&streamobj); - - ok(bRet == FALSE, "failed after seek adjusted\n"); - ok(streamobj.readcalls == 0, "called Read()\n"); - ok(streamobj.writecalls == 0, "called Write()\n"); - ok(streamobj.seekcalls == 0, "called Seek()\n"); - ok(streamobj.statcalls == 1, "wrong call count\n"); - - /* Failure cases */ - InitDummyStream(&streamobj); - streamobj.pos.QuadPart = 50001; - streamobj.failstatcall = TRUE; /* 1: Stat() Bad, Read() OK */ - bRet = pSHLWAPI_166(&streamobj); - ok(bRet == FALSE, "should be FALSE after read is OK\n"); - ok(streamobj.readcalls == 1, "wrong call count\n"); - ok(streamobj.writecalls == 0, "called Write()\n"); - ok(streamobj.seekcalls == 1, "wrong call count\n"); - ok(streamobj.statcalls == 1, "wrong call count\n"); - ok(streamobj.pos.QuadPart == 0, "Didn't seek to start\n"); - - InitDummyStream(&streamobj); - streamobj.pos.QuadPart = 50001; - streamobj.failstatcall = TRUE; - streamobj.failreadcall = TRUE; /* 2: Stat() Bad, Read() Bad Also */ - bRet = pSHLWAPI_166(&streamobj); - ok(bRet == TRUE, "Should be true after read fails\n"); - ok(streamobj.readcalls == 1, "wrong call count\n"); - ok(streamobj.writecalls == 0, "called Write()\n"); - ok(streamobj.seekcalls == 0, "Called Seek()\n"); - ok(streamobj.statcalls == 1, "wrong call count\n"); - ok(streamobj.pos.QuadPart == 50001, "called Seek() after read failed\n"); - return TRUE; -} - -static void test_SHLWAPI_184(void) -{ - _IDummyStream streamobj; - char buff[256]; - HRESULT hRet; - - if (!pSHLWAPI_184) - return; - - InitDummyStream(&streamobj); - hRet = pSHLWAPI_184(&streamobj, buff, sizeof(buff)); - - ok(hRet == S_OK, "failed Read()\n"); - ok(streamobj.readcalls == 1, "wrong call count\n"); - ok(streamobj.writecalls == 0, "called Write()\n"); - ok(streamobj.seekcalls == 0, "called Seek()\n"); -} - -static void test_SHLWAPI_212(void) -{ - _IDummyStream streamobj; - char buff[256]; - HRESULT hRet; - - if (!pSHLWAPI_212) - return; - - InitDummyStream(&streamobj); - hRet = pSHLWAPI_212(&streamobj, buff, sizeof(buff)); - - ok(hRet == S_OK, "failed Write()\n"); - ok(streamobj.readcalls == 0, "called Read()\n"); - ok(streamobj.writecalls == 1, "wrong call count\n"); - ok(streamobj.seekcalls == 0, "called Seek()\n"); -} - -static void test_SHLWAPI_213(void) -{ - _IDummyStream streamobj; - ULARGE_INTEGER ul; - LARGE_INTEGER ll; - HRESULT hRet; - - if (!pSHLWAPI_213 || !pSHLWAPI_214) - return; - - InitDummyStream(&streamobj); - ll.QuadPart = 5000l; - Seek(&streamobj, ll, 0, NULL); /* Seek to 5000l */ - - streamobj.seekcalls = 0; - pSHLWAPI_213(&streamobj); /* Should rewind */ - ok(streamobj.statcalls == 0, "called Stat()\n"); - ok(streamobj.readcalls == 0, "called Read()\n"); - ok(streamobj.writecalls == 0, "called Write()\n"); - ok(streamobj.seekcalls == 1, "wrong call count\n"); - - ul.QuadPart = 50001; - hRet = pSHLWAPI_214(&streamobj, &ul); - ok(hRet == S_OK, "failed Stat()\n"); - ok(ul.QuadPart == 0, "213 didn't rewind stream\n"); -} - -static void test_SHLWAPI_214(void) -{ - _IDummyStream streamobj; - ULARGE_INTEGER ul; - LARGE_INTEGER ll; - HRESULT hRet; - - if (!pSHLWAPI_214) - return; - - InitDummyStream(&streamobj); - ll.QuadPart = 5000l; - Seek(&streamobj, ll, 0, NULL); - ul.QuadPart = 0; - streamobj.seekcalls = 0; - hRet = pSHLWAPI_214(&streamobj, &ul); - - ok(hRet == S_OK, "failed Stat()\n"); - ok(streamobj.statcalls == 1, "wrong call count\n"); - ok(streamobj.readcalls == 0, "called Read()\n"); - ok(streamobj.writecalls == 0, "called Write()\n"); - ok(streamobj.seekcalls == 0, "called Seek()\n"); - ok(ul.QuadPart == 5000l, "Stat gave wrong size\n"); -} - -START_TEST(clist) -{ - InitFunctionPtrs(); - - test_CList(); - - /* Test streaming if this version supports it */ - if (test_SHLWAPI_166()) - { - test_SHLWAPI_184(); - test_SHLWAPI_212(); - test_SHLWAPI_213(); - test_SHLWAPI_214(); - } -} diff --git a/rostests/winetests/shlwapi/clsid.c b/rostests/winetests/shlwapi/clsid.c deleted file mode 100755 index 98a8c6d4c01..00000000000 --- a/rostests/winetests/shlwapi/clsid.c +++ /dev/null @@ -1,193 +0,0 @@ -/* Unit test suite for SHLWAPI Class ID functions - * - * Copyright 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 "wine/test.h" -#include "winbase.h" -#include "winerror.h" -#include "winnls.h" -#include "winuser.h" -#include "initguid.h" -#include "shlguid.h" -#include "shobjidl.h" -#include "olectl.h" - -DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); - -/* This GUID has been removed from the PSDK */ -DEFINE_OLEGUID(WINE_IID_IDelayedRelease, 0x000214EDL, 0, 0); - -/* Function ptrs for ordinal calls */ -static HMODULE hShlwapi = 0; -static BOOL (WINAPI *pSHLWAPI_269)(LPCSTR, CLSID *) = 0; -static DWORD (WINAPI *pSHLWAPI_23)(REFGUID, LPSTR, INT) = 0; - -/* GUIDs to test */ -const GUID * TEST_guids[] = { - &CLSID_ShellDesktop, - &CLSID_ShellLink, - &CATID_BrowsableShellExt, - &CATID_BrowseInPlace, - &CATID_DeskBand, - &CATID_InfoBand, - &CATID_CommBand, - &FMTID_Intshcut, - &FMTID_InternetSite, - &CGID_Explorer, - &CGID_ShellDocView, - &CGID_ShellServiceObject, - &CGID_ExplorerBarDoc, - &IID_INewShortcutHookA, - &IID_IShellIcon, - &IID_IShellFolder, - &IID_IShellExtInit, - &IID_IShellPropSheetExt, - &IID_IPersistFolder, - &IID_IExtractIconA, - &IID_IShellDetails, - &WINE_IID_IDelayedRelease, - &IID_IShellLinkA, - &IID_IShellCopyHookA, - &IID_IFileViewerA, - &IID_ICommDlgBrowser, - &IID_IEnumIDList, - &IID_IFileViewerSite, - &IID_IContextMenu2, - &IID_IShellExecuteHookA, - &IID_IPropSheetPage, - &IID_INewShortcutHookW, - &IID_IFileViewerW, - &IID_IShellLinkW, - &IID_IExtractIconW, - &IID_IShellExecuteHookW, - &IID_IShellCopyHookW, - &IID_IRemoteComputer, - &IID_IQueryInfo, - &IID_IDockingWindow, - &IID_IDockingWindowSite, - &CLSID_NetworkPlaces, - &CLSID_NetworkDomain, - &CLSID_NetworkServer, - &CLSID_NetworkShare, - &CLSID_MyComputer, - &CLSID_Internet, - &CLSID_ShellFSFolder, - &CLSID_RecycleBin, - &CLSID_ControlPanel, - &CLSID_Printers, - &CLSID_MyDocuments, - NULL -}; - -DEFINE_GUID(IID_Endianess, 0x01020304, 0x0506, 0x0708, 0x09, 0x0A, 0x0B, - 0x0C, 0x0D, 0x0E, 0x0F, 0x0A); - -static void test_ClassIDs(void) -{ - const GUID **guids = TEST_guids; - char szBuff[256]; - GUID guid; - DWORD dwLen; - BOOL bRet; - int i = 0; - int is_vista = 0; - - if (!pSHLWAPI_269 || !pSHLWAPI_23) - return; - - while (*guids) - { - dwLen = pSHLWAPI_23(*guids, szBuff, 256); - if (!i && dwLen == S_OK) is_vista = 1; /* seems to return an HRESULT on vista */ - ok(dwLen == (is_vista ? S_OK : 39), "wrong size %u for id %d\n", dwLen, i); - - bRet = pSHLWAPI_269(szBuff, &guid); - ok(bRet != FALSE, "created invalid string '%s'\n", szBuff); - - if (bRet) - ok(IsEqualGUID(*guids, &guid), "GUID created wrong %d\n", i); - - guids++; - i++; - } - - /* Test endianess */ - dwLen = pSHLWAPI_23(&IID_Endianess, szBuff, 256); - ok(dwLen == (is_vista ? S_OK : 39), "wrong size %u for IID_Endianess\n", dwLen); - - ok(!strcmp(szBuff, "{01020304-0506-0708-090A-0B0C0D0E0F0A}"), - "Endianess Broken, got '%s'\n", szBuff); - - /* test lengths */ - szBuff[0] = ':'; - dwLen = pSHLWAPI_23(&IID_Endianess, szBuff, 0); - ok(dwLen == (is_vista ? E_FAIL : 0), "accepted bad length\n"); - ok(szBuff[0] == ':', "wrote to buffer with no length\n"); - - szBuff[0] = ':'; - dwLen = pSHLWAPI_23(&IID_Endianess, szBuff, 38); - ok(dwLen == (is_vista ? E_FAIL : 0), "accepted bad length\n"); - ok(szBuff[0] == ':', "wrote to buffer with no length\n"); - - szBuff[0] = ':'; - dwLen = pSHLWAPI_23(&IID_Endianess, szBuff, 39); - ok(dwLen == (is_vista ? S_OK : 39), "rejected ok length\n"); - ok(szBuff[0] == '{', "Didn't write to buffer with ok length\n"); - - /* Test string */ - strcpy(szBuff, "{xxx-"); - bRet = pSHLWAPI_269(szBuff, &guid); - ok(bRet == FALSE, "accepted invalid string\n"); - - dwLen = pSHLWAPI_23(&IID_Endianess, szBuff, 39); - ok(dwLen == (is_vista ? S_OK : 39), "rejected ok length\n"); - ok(szBuff[0] == '{', "Didn't write to buffer with ok length\n"); -} - -static void test_CLSIDFromProgIDWrap(void) -{ - HRESULT (WINAPI *pCLSIDFromProgIDWrap)(LPCOLESTR,LPCLSID); - CLSID clsid = IID_NULL; - HRESULT hres; - - static const WCHAR wszStdPicture[] = {'S','t','d','P','i','c','t','u','r','e',0}; - - pCLSIDFromProgIDWrap = (void*)GetProcAddress(hShlwapi,(char*)435); - - hres = pCLSIDFromProgIDWrap(wszStdPicture, &clsid); - ok(hres == S_OK, "CLSIDFromProgIDWrap failed: %08x\n", hres); - ok(IsEqualGUID(&CLSID_StdPicture, &clsid), "wrong clsid\n"); - - hres = pCLSIDFromProgIDWrap(NULL, &clsid); - ok(hres == E_INVALIDARG, "CLSIDFromProgIDWrap failed: %08x, expected E_INVALIDARG\n", hres); - - hres = pCLSIDFromProgIDWrap(wszStdPicture, NULL); - ok(hres == E_INVALIDARG, "CLSIDFromProgIDWrap failed: %08x, expected E_INVALIDARG\n", hres); -} - -START_TEST(clsid) -{ - hShlwapi = GetModuleHandleA("shlwapi.dll"); - pSHLWAPI_269 = (void*)GetProcAddress(hShlwapi, (LPSTR)269); - pSHLWAPI_23 = (void*)GetProcAddress(hShlwapi, (LPSTR)23); - - test_ClassIDs(); - test_CLSIDFromProgIDWrap(); -} diff --git a/rostests/winetests/shlwapi/generated.c b/rostests/winetests/shlwapi/generated.c deleted file mode 100755 index e5e0896af8f..00000000000 --- a/rostests/winetests/shlwapi/generated.c +++ /dev/null @@ -1,240 +0,0 @@ -/* File generated automatically from tools/winapi/tests.dat; do not edit! */ -/* This file can be copied, modified and distributed without restriction. */ - -/* - * Unit tests for data structure packing - */ - -#define WINVER 0x0501 -#define _WIN32_IE 0x0501 -#define _WIN32_WINNT 0x0501 - -#define WINE_NOWINSOCK - -#include -#include "windef.h" -#include "winbase.h" -#include "wtypes.h" -#include "winreg.h" -#include "shlwapi.h" - -#include "wine/test.h" - -/*********************************************************************** - * Compatibility macros - */ - -#define DWORD_PTR UINT_PTR -#define LONG_PTR INT_PTR -#define ULONG_PTR UINT_PTR - -/*********************************************************************** - * Windows API extension - */ - -#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus) -# define _TYPE_ALIGNMENT(type) __alignof(type) -#elif defined(__GNUC__) -# define _TYPE_ALIGNMENT(type) __alignof__(type) -#else -/* - * FIXME: May not be possible without a compiler extension - * (if type is not just a name that is, otherwise the normal - * TYPE_ALIGNMENT can be used) - */ -#endif - -#if defined(TYPE_ALIGNMENT) && defined(_MSC_VER) && _MSC_VER >= 800 && !defined(__cplusplus) -#pragma warning(disable:4116) -#endif - -#if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT) -# define TYPE_ALIGNMENT _TYPE_ALIGNMENT -#endif - -/*********************************************************************** - * Test helper macros - */ - -#define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size); - -#ifdef TYPE_ALIGNMENT -# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align); -#else -# define TEST_TYPE_ALIGN(type, align) -#endif - -#ifdef _TYPE_ALIGNMENT -# define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align); -# define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align); -#else -# define TEST_TARGET_ALIGN(type, align) -# define TEST_FIELD_ALIGN(type, field, align) -#endif - -#define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset); - -#define TEST_TARGET_SIZE(type, size) TEST_TYPE_SIZE(*(type)0, size) -#define TEST_FIELD_SIZE(type, field, size) TEST_TYPE_SIZE((((type*)0)->field), size) -#define TEST_TYPE_SIGNED(type) C_ASSERT((type) -1 < 0); -#define TEST_TYPE_UNSIGNED(type) C_ASSERT((type) -1 > 0); - - -#ifdef _WIN64 - -static void test_pack_ASSOCF(void) -{ - /* ASSOCF */ - TEST_TYPE_SIZE (ASSOCF, 4) - TEST_TYPE_ALIGN (ASSOCF, 4) - TEST_TYPE_UNSIGNED(ASSOCF) -} - -static void test_pack_DLLGETVERSIONPROC(void) -{ - /* DLLGETVERSIONPROC */ - TEST_TYPE_SIZE (DLLGETVERSIONPROC, 8) - TEST_TYPE_ALIGN (DLLGETVERSIONPROC, 8) -} - -static void test_pack_DLLVERSIONINFO(void) -{ - /* DLLVERSIONINFO (pack 8) */ - TEST_TYPE_SIZE (DLLVERSIONINFO, 20) - TEST_TYPE_ALIGN (DLLVERSIONINFO, 4) - TEST_FIELD_SIZE (DLLVERSIONINFO, cbSize, 4) - TEST_FIELD_ALIGN (DLLVERSIONINFO, cbSize, 4) - TEST_FIELD_OFFSET(DLLVERSIONINFO, cbSize, 0) - TEST_FIELD_SIZE (DLLVERSIONINFO, dwMajorVersion, 4) - TEST_FIELD_ALIGN (DLLVERSIONINFO, dwMajorVersion, 4) - TEST_FIELD_OFFSET(DLLVERSIONINFO, dwMajorVersion, 4) - TEST_FIELD_SIZE (DLLVERSIONINFO, dwMinorVersion, 4) - TEST_FIELD_ALIGN (DLLVERSIONINFO, dwMinorVersion, 4) - TEST_FIELD_OFFSET(DLLVERSIONINFO, dwMinorVersion, 8) - TEST_FIELD_SIZE (DLLVERSIONINFO, dwBuildNumber, 4) - TEST_FIELD_ALIGN (DLLVERSIONINFO, dwBuildNumber, 4) - TEST_FIELD_OFFSET(DLLVERSIONINFO, dwBuildNumber, 12) - TEST_FIELD_SIZE (DLLVERSIONINFO, dwPlatformID, 4) - TEST_FIELD_ALIGN (DLLVERSIONINFO, dwPlatformID, 4) - TEST_FIELD_OFFSET(DLLVERSIONINFO, dwPlatformID, 16) -} - -static void test_pack_DLLVERSIONINFO2(void) -{ - /* DLLVERSIONINFO2 (pack 8) */ - TEST_TYPE_SIZE (DLLVERSIONINFO2, 32) - TEST_TYPE_ALIGN (DLLVERSIONINFO2, 8) - TEST_FIELD_SIZE (DLLVERSIONINFO2, info1, 20) - TEST_FIELD_ALIGN (DLLVERSIONINFO2, info1, 4) - TEST_FIELD_OFFSET(DLLVERSIONINFO2, info1, 0) - TEST_FIELD_SIZE (DLLVERSIONINFO2, dwFlags, 4) - TEST_FIELD_ALIGN (DLLVERSIONINFO2, dwFlags, 4) - TEST_FIELD_OFFSET(DLLVERSIONINFO2, dwFlags, 20) - TEST_FIELD_SIZE (DLLVERSIONINFO2, ullVersion, 8) - TEST_FIELD_ALIGN (DLLVERSIONINFO2, ullVersion, 8) - TEST_FIELD_OFFSET(DLLVERSIONINFO2, ullVersion, 24) -} - -static void test_pack_HUSKEY(void) -{ - /* HUSKEY */ - TEST_TYPE_SIZE (HUSKEY, 8) - TEST_TYPE_ALIGN (HUSKEY, 8) -} - -static void test_pack_PHUSKEY(void) -{ - /* PHUSKEY */ - TEST_TYPE_SIZE (PHUSKEY, 8) - TEST_TYPE_ALIGN (PHUSKEY, 8) - TEST_TARGET_SIZE (PHUSKEY, 8) - TEST_TARGET_ALIGN(PHUSKEY, 8) -} - -#else /* _WIN64 */ - -static void test_pack_ASSOCF(void) -{ - /* ASSOCF */ - TEST_TYPE_SIZE (ASSOCF, 4) - TEST_TYPE_ALIGN (ASSOCF, 4) - TEST_TYPE_UNSIGNED(ASSOCF) -} - -static void test_pack_DLLGETVERSIONPROC(void) -{ - /* DLLGETVERSIONPROC */ - TEST_TYPE_SIZE (DLLGETVERSIONPROC, 4) - TEST_TYPE_ALIGN (DLLGETVERSIONPROC, 4) -} - -static void test_pack_DLLVERSIONINFO(void) -{ - /* DLLVERSIONINFO (pack 8) */ - TEST_TYPE_SIZE (DLLVERSIONINFO, 20) - TEST_TYPE_ALIGN (DLLVERSIONINFO, 4) - TEST_FIELD_SIZE (DLLVERSIONINFO, cbSize, 4) - TEST_FIELD_ALIGN (DLLVERSIONINFO, cbSize, 4) - TEST_FIELD_OFFSET(DLLVERSIONINFO, cbSize, 0) - TEST_FIELD_SIZE (DLLVERSIONINFO, dwMajorVersion, 4) - TEST_FIELD_ALIGN (DLLVERSIONINFO, dwMajorVersion, 4) - TEST_FIELD_OFFSET(DLLVERSIONINFO, dwMajorVersion, 4) - TEST_FIELD_SIZE (DLLVERSIONINFO, dwMinorVersion, 4) - TEST_FIELD_ALIGN (DLLVERSIONINFO, dwMinorVersion, 4) - TEST_FIELD_OFFSET(DLLVERSIONINFO, dwMinorVersion, 8) - TEST_FIELD_SIZE (DLLVERSIONINFO, dwBuildNumber, 4) - TEST_FIELD_ALIGN (DLLVERSIONINFO, dwBuildNumber, 4) - TEST_FIELD_OFFSET(DLLVERSIONINFO, dwBuildNumber, 12) - TEST_FIELD_SIZE (DLLVERSIONINFO, dwPlatformID, 4) - TEST_FIELD_ALIGN (DLLVERSIONINFO, dwPlatformID, 4) - TEST_FIELD_OFFSET(DLLVERSIONINFO, dwPlatformID, 16) -} - -static void test_pack_DLLVERSIONINFO2(void) -{ - /* DLLVERSIONINFO2 (pack 8) */ - TEST_TYPE_SIZE (DLLVERSIONINFO2, 32) - TEST_TYPE_ALIGN (DLLVERSIONINFO2, 8) - TEST_FIELD_SIZE (DLLVERSIONINFO2, info1, 20) - TEST_FIELD_ALIGN (DLLVERSIONINFO2, info1, 4) - TEST_FIELD_OFFSET(DLLVERSIONINFO2, info1, 0) - TEST_FIELD_SIZE (DLLVERSIONINFO2, dwFlags, 4) - TEST_FIELD_ALIGN (DLLVERSIONINFO2, dwFlags, 4) - TEST_FIELD_OFFSET(DLLVERSIONINFO2, dwFlags, 20) - TEST_FIELD_SIZE (DLLVERSIONINFO2, ullVersion, 8) - TEST_FIELD_ALIGN (DLLVERSIONINFO2, ullVersion, 8) - TEST_FIELD_OFFSET(DLLVERSIONINFO2, ullVersion, 24) -} - -static void test_pack_HUSKEY(void) -{ - /* HUSKEY */ - TEST_TYPE_SIZE (HUSKEY, 4) - TEST_TYPE_ALIGN (HUSKEY, 4) -} - -static void test_pack_PHUSKEY(void) -{ - /* PHUSKEY */ - TEST_TYPE_SIZE (PHUSKEY, 4) - TEST_TYPE_ALIGN (PHUSKEY, 4) - TEST_TARGET_SIZE (PHUSKEY, 4) - TEST_TARGET_ALIGN(PHUSKEY, 4) -} - -#endif /* _WIN64 */ - -static void test_pack(void) -{ - test_pack_ASSOCF(); - test_pack_DLLGETVERSIONPROC(); - test_pack_DLLVERSIONINFO(); - test_pack_DLLVERSIONINFO2(); - test_pack_HUSKEY(); - test_pack_PHUSKEY(); -} - -START_TEST(generated) -{ - test_pack(); -} diff --git a/rostests/winetests/shlwapi/istream.c b/rostests/winetests/shlwapi/istream.c deleted file mode 100644 index 4a36b3ab0ba..00000000000 --- a/rostests/winetests/shlwapi/istream.c +++ /dev/null @@ -1,643 +0,0 @@ -/* Unit test suite for SHLWAPI ShCreateStreamOnFile functions. - * - * Copyright 2008 Reece H. Dunn - * - * 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 - -#include -#include - -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "objbase.h" -#include "shlwapi.h" - - -/* Function pointers for the SHCreateStreamOnFile functions */ -static HMODULE hShlwapi; -static HRESULT (WINAPI *pSHCreateStreamOnFileA)(LPCSTR file, DWORD mode, IStream **stream); -static HRESULT (WINAPI *pSHCreateStreamOnFileW)(LPCWSTR file, DWORD mode, IStream **stream); -static HRESULT (WINAPI *pSHCreateStreamOnFileEx)(LPCWSTR file, DWORD mode, DWORD attributes, BOOL create, IStream *template, IStream **stream); - - -static void test_IStream_invalid_operations(IStream * stream, DWORD mode) -{ - HRESULT ret; - IStream * clone; - ULONG refcount; - ULARGE_INTEGER uzero; - ULARGE_INTEGER uret; - LARGE_INTEGER zero; - ULONG count; - char data[256]; - - U(uzero).HighPart = 0; - U(uzero).LowPart = 0; - U(uret).HighPart = 0; - U(uret).LowPart = 0; - U(zero).HighPart = 0; - U(zero).LowPart = 0; - - /* IStream::Read */ - - /* IStream_Read from the COBJMACROS is undefined by shlwapi.h, replaced by the IStream_Read helper function. */ - - ret = stream->lpVtbl->Read(stream, NULL, 0, &count); - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); - - ret = stream->lpVtbl->Read(stream, data, 5, NULL); - ok(ret == S_FALSE || ret == S_OK, "expected S_FALSE or S_OK, got 0x%08x\n", ret); - - ret = stream->lpVtbl->Read(stream, data, 0, NULL); - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); - - ret = stream->lpVtbl->Read(stream, data, 3, &count); - ok(ret == S_FALSE || ret == S_OK, "expected S_FALSE or S_OK, got 0x%08x\n", ret); - - /* IStream::Write */ - - /* IStream_Write from the COBJMACROS is undefined by shlwapi.h, replaced by the IStream_Write helper function. */ - - ret = stream->lpVtbl->Write(stream, NULL, 0, &count); - if (mode == STGM_READ) - ok(ret == STG_E_ACCESSDENIED /* XP */ || ret == S_OK /* 2000 */, - "expected STG_E_ACCESSDENIED or S_OK, got 0x%08x\n", ret); - else - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); - - strcpy(data, "Hello"); - ret = stream->lpVtbl->Write(stream, data, 5, NULL); - if (mode == STGM_READ) - ok(ret == STG_E_ACCESSDENIED /* XP */ || ret == S_OK /* 2000 */, - "expected STG_E_ACCESSDENIED or S_OK, got 0x%08x\n", ret); - else - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); - - strcpy(data, "Hello"); - ret = stream->lpVtbl->Write(stream, data, 0, NULL); - if (mode == STGM_READ) - ok(ret == STG_E_ACCESSDENIED /* XP */ || ret == S_OK /* 2000 */, - "expected STG_E_ACCESSDENIED or S_OK, got 0x%08x\n", ret); - else - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); - - strcpy(data, "Hello"); - ret = stream->lpVtbl->Write(stream, data, 0, &count); - if (mode == STGM_READ) - ok(ret == STG_E_ACCESSDENIED /* XP */ || ret == S_OK /* 2000 */, - "expected STG_E_ACCESSDENIED or S_OK, got 0x%08x\n", ret); - else - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); - - strcpy(data, "Hello"); - ret = stream->lpVtbl->Write(stream, data, 3, &count); - if (mode == STGM_READ) - ok(ret == STG_E_ACCESSDENIED /* XP */ || ret == S_OK /* 2000 */, - "expected STG_E_ACCESSDENIED or S_OK, got 0x%08x\n", ret); - else - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); - - /* IStream::Seek */ - - ret = IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); - - ret = IStream_Seek(stream, zero, 20, NULL); - ok(ret == E_INVALIDARG /* XP */ || ret == S_OK /* 2000 */, - "expected E_INVALIDARG or S_OK, got 0x%08x\n", ret); - - /* IStream::CopyTo */ - - ret = IStream_CopyTo(stream, NULL, uzero, &uret, &uret); - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); - - clone = NULL; - ret = IStream_CopyTo(stream, clone, uzero, &uret, &uret); - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); - - ret = IStream_CopyTo(stream, stream, uzero, &uret, &uret); - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); - - ret = IStream_CopyTo(stream, stream, uzero, &uret, NULL); - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); - - ret = IStream_CopyTo(stream, stream, uzero, NULL, &uret); - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); - - /* IStream::Commit */ - - ret = IStream_Commit(stream, STGC_DEFAULT); - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); - - /* IStream::Revert */ - - ret = IStream_Revert(stream); - ok(ret == E_NOTIMPL, "expected E_NOTIMPL, got 0x%08x\n", ret); - - /* IStream::LockRegion */ - - ret = IStream_LockRegion(stream, uzero, uzero, 0); - ok(ret == E_NOTIMPL /* XP */ || ret == S_OK /* Vista */, - "expected E_NOTIMPL or S_OK, got 0x%08x\n", ret); - - /* IStream::UnlockRegion */ - - if (ret == E_NOTIMPL) /* XP */ { - ret = IStream_UnlockRegion(stream, uzero, uzero, 0); - ok(ret == E_NOTIMPL, "expected E_NOTIMPL, got 0x%08x\n", ret); - } else /* Vista */ { - ret = IStream_UnlockRegion(stream, uzero, uzero, 0); - ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret); - - ret = IStream_UnlockRegion(stream, uzero, uzero, 0); - ok(ret == STG_E_LOCKVIOLATION, "expected STG_E_LOCKVIOLATION, got 0x%08x\n", ret); - } - - /* IStream::Stat */ - - ret = IStream_Stat(stream, NULL, 0); - ok(ret == STG_E_INVALIDPOINTER /* XP */ || ret == E_NOTIMPL /* 2000 */, - "expected STG_E_INVALIDPOINTER or E_NOTIMPL, got 0x%08x\n", ret); - - /* IStream::Clone */ - - /* Passing a NULL pointer for the second IStream::Clone param crashes on Win7 */ - - clone = NULL; - ret = IStream_Clone(stream, &clone); - ok(ret == E_NOTIMPL, "expected E_NOTIMPL, got 0x%08x\n", ret); - ok(clone == NULL, "expected a NULL IStream object, got %p\n", stream); - - if (clone) { - refcount = IStream_Release(clone); - ok(refcount == 0, "expected 0, got %d\n", refcount); - } -} - - -static void test_SHCreateStreamOnFileA(DWORD mode, DWORD stgm) -{ - IStream * stream; - HRESULT ret; - ULONG refcount; - char test_file[MAX_PATH]; - static const CHAR testA_txt[] = "\\testA.txt"; - - trace("SHCreateStreamOnFileA: testing mode %d, STGM flags %08x\n", mode, stgm); - - /* Don't used a fixed path for the testA.txt file */ - GetTempPathA(MAX_PATH, test_file); - lstrcatA(test_file, testA_txt); - - /* invalid arguments */ - - stream = NULL; - ret = (*pSHCreateStreamOnFileA)(NULL, mode | stgm, &stream); - if (ret == E_INVALIDARG) /* Win98 SE */ { - win_skip("Not supported\n"); - return; - } - - ok(ret == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) /* NT */ || - ret == HRESULT_FROM_WIN32(ERROR_BAD_PATHNAME) /* 9x */, - "SHCreateStreamOnFileA: expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) " - "or HRESULT_FROM_WIN32(ERROR_BAD_PATHNAME), got 0x%08x\n", ret); - ok(stream == NULL, "SHCreateStreamOnFileA: expected a NULL IStream object, got %p\n", stream); - -#if 0 /* This test crashes on WinXP SP2 */ - ret = (*pSHCreateStreamOnFileA)(test_file, mode | stgm, NULL); - ok(ret == E_INVALIDARG, "SHCreateStreamOnFileA: expected E_INVALIDARG, got 0x%08x\n", ret); -#endif - - stream = NULL; - ret = (*pSHCreateStreamOnFileA)(test_file, mode | STGM_CONVERT | stgm, &stream); - ok(ret == E_INVALIDARG, "SHCreateStreamOnFileA: expected E_INVALIDARG, got 0x%08x\n", ret); - ok(stream == NULL, "SHCreateStreamOnFileA: expected a NULL IStream object, got %p\n", stream); - - stream = NULL; - ret = (*pSHCreateStreamOnFileA)(test_file, mode | STGM_DELETEONRELEASE | stgm, &stream); - ok(ret == E_INVALIDARG, "SHCreateStreamOnFileA: expected E_INVALIDARG, got 0x%08x\n", ret); - ok(stream == NULL, "SHCreateStreamOnFileA: expected a NULL IStream object, got %p\n", stream); - - stream = NULL; - ret = (*pSHCreateStreamOnFileA)(test_file, mode | STGM_TRANSACTED | stgm, &stream); - ok(ret == E_INVALIDARG, "SHCreateStreamOnFileA: expected E_INVALIDARG, got 0x%08x\n", ret); - ok(stream == NULL, "SHCreateStreamOnFileA: expected a NULL IStream object, got %p\n", stream); - - /* file does not exist */ - - stream = NULL; - ret = (*pSHCreateStreamOnFileA)(test_file, mode | STGM_FAILIFTHERE | stgm, &stream); - ok(ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "SHCreateStreamOnFileA: expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got 0x%08x\n", ret); - ok(stream == NULL, "SHCreateStreamOnFileA: expected a NULL IStream object, got %p\n", stream); - - stream = NULL; - ret = (*pSHCreateStreamOnFileA)(test_file, mode | STGM_CREATE | stgm, &stream); - ok(ret == S_OK, "SHCreateStreamOnFileA: expected S_OK, got 0x%08x\n", ret); - ok(stream != NULL, "SHCreateStreamOnFileA: expected a valid IStream object, got NULL\n"); - - if (stream) { - test_IStream_invalid_operations(stream, mode); - - refcount = IStream_Release(stream); - ok(refcount == 0, "SHCreateStreamOnFileA: expected 0, got %d\n", refcount); - } - - /* NOTE: don't delete the file, as it will be used for the file exists tests. */ - - /* file exists */ - - stream = NULL; - ret = (*pSHCreateStreamOnFileA)(test_file, mode | STGM_FAILIFTHERE | stgm, &stream); - ok(ret == S_OK, "SHCreateStreamOnFileA: expected S_OK, got 0x%08x\n", ret); - ok(stream != NULL, "SHCreateStreamOnFileA: expected a valid IStream object, got NULL\n"); - - if (stream) { - test_IStream_invalid_operations(stream, mode); - - refcount = IStream_Release(stream); - ok(refcount == 0, "SHCreateStreamOnFileA: expected 0, got %d\n", refcount); - } - - stream = NULL; - ret = (*pSHCreateStreamOnFileA)(test_file, mode | STGM_CREATE | stgm, &stream); - ok(ret == S_OK, "SHCreateStreamOnFileA: expected S_OK, got 0x%08x\n", ret); - ok(stream != NULL, "SHCreateStreamOnFileA: expected a valid IStream object, got NULL\n"); - - if (stream) { - test_IStream_invalid_operations(stream, mode); - - refcount = IStream_Release(stream); - ok(refcount == 0, "SHCreateStreamOnFileA: expected 0, got %d\n", refcount); - - ok(DeleteFileA(test_file), "SHCreateStreamOnFileA: could not delete file '%s', got error %d\n", test_file, GetLastError()); - } -} - - -static void test_SHCreateStreamOnFileW(DWORD mode, DWORD stgm) -{ - IStream * stream; - HRESULT ret; - ULONG refcount; - WCHAR test_file[MAX_PATH]; - CHAR test_fileA[MAX_PATH]; - static const CHAR testW_txt[] = "\\testW.txt"; - - trace("SHCreateStreamOnFileW: testing mode %d, STGM flags %08x\n", mode, stgm); - - /* Don't used a fixed path for the testW.txt file */ - GetTempPathA(MAX_PATH, test_fileA); - lstrcatA(test_fileA, testW_txt); - MultiByteToWideChar(CP_ACP, 0, test_fileA, -1, test_file, MAX_PATH); - - /* invalid arguments */ - - if (0) - { - /* Crashes on NT4 */ - stream = NULL; - ret = (*pSHCreateStreamOnFileW)(NULL, mode | stgm, &stream); - ok(ret == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) || /* XP */ - ret == E_INVALIDARG /* Vista */, - "SHCreateStreamOnFileW: expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) or E_INVALIDARG, got 0x%08x\n", ret); - ok(stream == NULL, "SHCreateStreamOnFileW: expected a NULL IStream object, got %p\n", stream); - } - - if (0) - { - /* This test crashes on WinXP SP2 */ - ret = (*pSHCreateStreamOnFileW)(test_file, mode | stgm, NULL); - ok(ret == E_INVALIDARG, "SHCreateStreamOnFileW: expected E_INVALIDARG, got 0x%08x\n", ret); - } - - stream = NULL; - ret = (*pSHCreateStreamOnFileW)(test_file, mode | STGM_CONVERT | stgm, &stream); - ok(ret == E_INVALIDARG, "SHCreateStreamOnFileW: expected E_INVALIDARG, got 0x%08x\n", ret); - ok(stream == NULL, "SHCreateStreamOnFileW: expected a NULL IStream object, got %p\n", stream); - - stream = NULL; - ret = (*pSHCreateStreamOnFileW)(test_file, mode | STGM_DELETEONRELEASE | stgm, &stream); - ok(ret == E_INVALIDARG, "SHCreateStreamOnFileW: expected E_INVALIDARG, got 0x%08x\n", ret); - ok(stream == NULL, "SHCreateStreamOnFileW: expected a NULL IStream object, got %p\n", stream); - - stream = NULL; - ret = (*pSHCreateStreamOnFileW)(test_file, mode | STGM_TRANSACTED | stgm, &stream); - ok(ret == E_INVALIDARG, "SHCreateStreamOnFileW: expected E_INVALIDARG, got 0x%08x\n", ret); - ok(stream == NULL, "SHCreateStreamOnFileW: expected a NULL IStream object, got %p\n", stream); - - /* file does not exist */ - - stream = NULL; - ret = (*pSHCreateStreamOnFileW)(test_file, mode | STGM_FAILIFTHERE | stgm, &stream); - if (ret == E_INVALIDARG) /* Win98 SE */ { - win_skip("Not supported\n"); - return; - } - - ok(ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "SHCreateStreamOnFileW: expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got 0x%08x\n", ret); - ok(stream == NULL, "SHCreateStreamOnFileW: expected a NULL IStream object, got %p\n", stream); - - stream = NULL; - ret = (*pSHCreateStreamOnFileW)(test_file, mode | STGM_CREATE | stgm, &stream); - ok(ret == S_OK, "SHCreateStreamOnFileW: expected S_OK, got 0x%08x\n", ret); - ok(stream != NULL, "SHCreateStreamOnFileW: expected a valid IStream object, got NULL\n"); - - if (stream) { - test_IStream_invalid_operations(stream, mode); - - refcount = IStream_Release(stream); - ok(refcount == 0, "SHCreateStreamOnFileW: expected 0, got %d\n", refcount); - } - - /* NOTE: don't delete the file, as it will be used for the file exists tests. */ - - /* file exists */ - - stream = NULL; - ret = (*pSHCreateStreamOnFileW)(test_file, mode | STGM_FAILIFTHERE | stgm, &stream); - ok(ret == S_OK, "SHCreateStreamOnFileW: expected S_OK, got 0x%08x\n", ret); - ok(stream != NULL, "SHCreateStreamOnFileW: expected a valid IStream object, got NULL\n"); - - if (stream) { - test_IStream_invalid_operations(stream, mode); - - refcount = IStream_Release(stream); - ok(refcount == 0, "SHCreateStreamOnFileW: expected 0, got %d\n", refcount); - } - - stream = NULL; - ret = (*pSHCreateStreamOnFileW)(test_file, mode | STGM_CREATE | stgm, &stream); - ok(ret == S_OK, "SHCreateStreamOnFileW: expected S_OK, got 0x%08x\n", ret); - ok(stream != NULL, "SHCreateStreamOnFileW: expected a valid IStream object, got NULL\n"); - - if (stream) { - test_IStream_invalid_operations(stream, mode); - - refcount = IStream_Release(stream); - ok(refcount == 0, "SHCreateStreamOnFileW: expected 0, got %d\n", refcount); - - ok(DeleteFileA(test_fileA), - "SHCreateStreamOnFileW: could not delete the test file, got error %d\n", - GetLastError()); - } -} - - -static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm) -{ - IStream * stream; - IStream * template = NULL; - HRESULT ret; - ULONG refcount; - WCHAR test_file[MAX_PATH]; - CHAR test_fileA[MAX_PATH]; - static const CHAR testEx_txt[] = "\\testEx.txt"; - - trace("SHCreateStreamOnFileEx: testing mode %d, STGM flags %08x\n", mode, stgm); - - /* Don't used a fixed path for the testEx.txt file */ - GetTempPathA(MAX_PATH, test_fileA); - lstrcatA(test_fileA, testEx_txt); - MultiByteToWideChar(CP_ACP, 0, test_fileA, -1, test_file, MAX_PATH); - - /* invalid arguments */ - - if (0) - { - /* Crashes on NT4 */ - stream = NULL; - ret = (*pSHCreateStreamOnFileEx)(NULL, mode, 0, FALSE, NULL, &stream); - ok(ret == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) || /* XP */ - ret == E_INVALIDARG /* Vista */, - "SHCreateStreamOnFileEx: expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) or E_INVALIDARG, got 0x%08x\n", ret); - ok(stream == NULL, "SHCreateStreamOnFileEx: expected a NULL IStream object, got %p\n", stream); - } - - stream = NULL; - ret = (*pSHCreateStreamOnFileEx)(test_file, mode, 0, FALSE, template, &stream); - if (ret == HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED)) { - win_skip("File probably locked by Anti-Virus/Spam software, trying again\n"); - Sleep(1000); - ret = (*pSHCreateStreamOnFileEx)(test_file, mode, 0, FALSE, template, &stream); - } - ok( ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || - ret == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), - "SHCreateStreamOnFileEx: expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) or " - "HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got 0x%08x\n", ret); - - ok(stream == NULL, "SHCreateStreamOnFileEx: expected a NULL IStream object, got %p\n", stream); - - if (0) - { - /* This test crashes on WinXP SP2 */ - ret = (*pSHCreateStreamOnFileEx)(test_file, mode, 0, FALSE, NULL, NULL); - ok(ret == E_INVALIDARG, "SHCreateStreamOnFileEx: expected E_INVALIDARG, got 0x%08x\n", ret); - } - - /* file does not exist */ - - stream = NULL; - ret = (*pSHCreateStreamOnFileEx)(test_file, mode | STGM_FAILIFTHERE | stgm, 0, FALSE, NULL, &stream); - if ((stgm & STGM_TRANSACTED) == STGM_TRANSACTED && mode == STGM_READ) { - ok(ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) /* XP */ || ret == E_INVALIDARG /* Vista */, - "SHCreateStreamOnFileEx: expected E_INVALIDARG or HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got 0x%08x\n", ret); - - if (ret == E_INVALIDARG) { - skip("SHCreateStreamOnFileEx: STGM_TRANSACTED not supported in this configuration.\n"); - return; - } - } else { - ok( ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || - ret == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), - "SHCreateStreamOnFileEx: expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) or " - "HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got 0x%08x\n", ret); - } - ok(stream == NULL, "SHCreateStreamOnFileEx: expected a NULL IStream object, got %p\n", stream); - - stream = NULL; - ret = (*pSHCreateStreamOnFileEx)(test_file, mode | STGM_FAILIFTHERE | stgm, 0, TRUE, NULL, &stream); - /* not supported on win9x */ - if (broken(ret == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER) && stream == NULL)) { - skip("Not supported\n"); - DeleteFileA(test_fileA); - return; - } - - ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08x\n", ret); - ok(stream != NULL, "SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n"); - - if (stream) { - test_IStream_invalid_operations(stream, mode); - - refcount = IStream_Release(stream); - ok(refcount == 0, "SHCreateStreamOnFileEx: expected 0, got %d\n", refcount); - - ok(DeleteFileA(test_fileA), - "SHCreateStreamOnFileEx: could not delete the test file, got error %d\n", - GetLastError()); - } - - stream = NULL; - ret = (*pSHCreateStreamOnFileEx)(test_file, mode | STGM_CREATE | stgm, 0, FALSE, NULL, &stream); - if (ret == HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED)) { - win_skip("File probably locked by Anti-Virus/Spam software, trying again\n"); - Sleep(1000); - ret = (*pSHCreateStreamOnFileEx)(test_file, mode | STGM_CREATE | stgm, 0, FALSE, NULL, &stream); - } - ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08x\n", ret); - ok(stream != NULL, "SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n"); - - if (stream) { - test_IStream_invalid_operations(stream, mode); - - refcount = IStream_Release(stream); - ok(refcount == 0, "SHCreateStreamOnFileEx: expected 0, got %d\n", refcount); - - ok(DeleteFileA(test_fileA), - "SHCreateStreamOnFileEx: could not delete the test file, got error %d\n", - GetLastError()); - } - - stream = NULL; - ret = (*pSHCreateStreamOnFileEx)(test_file, mode | STGM_CREATE | stgm, 0, TRUE, NULL, &stream); - if (ret == HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED)) { - win_skip("File probably locked by Anti-Virus/Spam software, trying again\n"); - Sleep(1000); - ret = (*pSHCreateStreamOnFileEx)(test_file, mode | STGM_CREATE | stgm, 0, TRUE, NULL, &stream); - } - ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08x\n", ret); - ok(stream != NULL, "SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n"); - - if (stream) { - test_IStream_invalid_operations(stream, mode); - - refcount = IStream_Release(stream); - ok(refcount == 0, "SHCreateStreamOnFileEx: expected 0, got %d\n", refcount); - } - - /* NOTE: don't delete the file, as it will be used for the file exists tests. */ - - /* file exists */ - - stream = NULL; - ret = (*pSHCreateStreamOnFileEx)(test_file, mode | STGM_FAILIFTHERE | stgm, 0, FALSE, NULL, &stream); - ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08x\n", ret); - ok(stream != NULL, "SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n"); - - if (stream) { - test_IStream_invalid_operations(stream, mode); - - refcount = IStream_Release(stream); - ok(refcount == 0, "SHCreateStreamOnFileEx: expected 0, got %d\n", refcount); - } - - stream = NULL; - ret = (*pSHCreateStreamOnFileEx)(test_file, mode | STGM_FAILIFTHERE | stgm, 0, TRUE, NULL, &stream); - ok(ret == HRESULT_FROM_WIN32(ERROR_FILE_EXISTS), "SHCreateStreamOnFileEx: expected HRESULT_FROM_WIN32(ERROR_FILE_EXISTS), got 0x%08x\n", ret); - ok(stream == NULL, "SHCreateStreamOnFileEx: expected a NULL IStream object, got %p\n", stream); - - stream = NULL; - ret = (*pSHCreateStreamOnFileEx)(test_file, mode | STGM_CREATE | stgm, 0, FALSE, NULL, &stream); - ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08x\n", ret); - ok(stream != NULL, "SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n"); - - if (stream) { - test_IStream_invalid_operations(stream, mode); - - refcount = IStream_Release(stream); - ok(refcount == 0, "SHCreateStreamOnFileEx: expected 0, got %d\n", refcount); - } - - stream = NULL; - ret = (*pSHCreateStreamOnFileEx)(test_file, mode | STGM_CREATE | stgm, 0, TRUE, NULL, &stream); - ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08x\n", ret); - ok(stream != NULL, "SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n"); - - if (stream) { - test_IStream_invalid_operations(stream, mode); - - refcount = IStream_Release(stream); - ok(refcount == 0, "SHCreateStreamOnFileEx: expected 0, got %d\n", refcount); - } - - ok(DeleteFileA(test_fileA), - "SHCreateStreamOnFileEx: could not delete the test file, got error %d\n", - GetLastError()); -} - - -START_TEST(istream) -{ - static const DWORD stgm_access[] = { - STGM_READ, - STGM_WRITE, - STGM_READWRITE - }; - - static const DWORD stgm_sharing[] = { - 0, - STGM_SHARE_DENY_NONE, - STGM_SHARE_DENY_READ, - STGM_SHARE_DENY_WRITE, - STGM_SHARE_EXCLUSIVE - }; - - static const DWORD stgm_flags[] = { - 0, - STGM_CONVERT, - STGM_DELETEONRELEASE, - STGM_CONVERT | STGM_DELETEONRELEASE, - STGM_TRANSACTED | STGM_CONVERT, - STGM_TRANSACTED | STGM_DELETEONRELEASE, - STGM_TRANSACTED | STGM_CONVERT | STGM_DELETEONRELEASE - }; - - int i, j, k; - - hShlwapi = GetModuleHandleA("shlwapi.dll"); - - pSHCreateStreamOnFileA = (void*)GetProcAddress(hShlwapi, "SHCreateStreamOnFileA"); - pSHCreateStreamOnFileW = (void*)GetProcAddress(hShlwapi, "SHCreateStreamOnFileW"); - pSHCreateStreamOnFileEx = (void*)GetProcAddress(hShlwapi, "SHCreateStreamOnFileEx"); - - if (!pSHCreateStreamOnFileA) - skip("SHCreateStreamOnFileA not found.\n"); - - if (!pSHCreateStreamOnFileW) - skip("SHCreateStreamOnFileW not found.\n"); - - if (!pSHCreateStreamOnFileEx) - skip("SHCreateStreamOnFileEx not found.\n"); - - for (i = 0; i != sizeof(stgm_access)/sizeof(stgm_access[0]); i++) { - for (j = 0; j != sizeof(stgm_sharing)/sizeof(stgm_sharing[0]); j ++) { - if (pSHCreateStreamOnFileA) - test_SHCreateStreamOnFileA(stgm_access[i], stgm_sharing[j]); - - if (pSHCreateStreamOnFileW) - test_SHCreateStreamOnFileW(stgm_access[i], stgm_sharing[j]); - - if (pSHCreateStreamOnFileEx) { - for (k = 0; k != sizeof(stgm_flags)/sizeof(stgm_flags[0]); k++) - test_SHCreateStreamOnFileEx(stgm_access[i], stgm_sharing[j] | stgm_flags[k]); - } - } - } -} diff --git a/rostests/winetests/shlwapi/ordinal.c b/rostests/winetests/shlwapi/ordinal.c deleted file mode 100755 index bf614182771..00000000000 --- a/rostests/winetests/shlwapi/ordinal.c +++ /dev/null @@ -1,2422 +0,0 @@ -/* Unit test suite for SHLWAPI ordinal functions - * - * Copyright 2004 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 - -#define COBJMACROS -#include "wine/test.h" -#include "winbase.h" -#include "winerror.h" -#include "winuser.h" -#include "ole2.h" -#include "oaidl.h" -#include "ocidl.h" -#include "mlang.h" -#include "shlwapi.h" -#include "docobj.h" -#include "shobjidl.h" - -/* Function ptrs for ordinal calls */ -static HMODULE hShlwapi; -static BOOL is_win2k_and_lower; - -static int (WINAPI *pSHSearchMapInt)(const int*,const int*,int,int); -static HRESULT (WINAPI *pGetAcceptLanguagesA)(LPSTR,LPDWORD); - -static HANDLE (WINAPI *pSHAllocShared)(LPCVOID,DWORD,DWORD); -static LPVOID (WINAPI *pSHLockShared)(HANDLE,DWORD); -static BOOL (WINAPI *pSHUnlockShared)(LPVOID); -static BOOL (WINAPI *pSHFreeShared)(HANDLE,DWORD); -static HRESULT(WINAPIV *pSHPackDispParams)(DISPPARAMS*,VARIANTARG*,UINT,...); -static HRESULT(WINAPI *pIConnectionPoint_SimpleInvoke)(IConnectionPoint*,DISPID,DISPPARAMS*); -static HRESULT(WINAPI *pIConnectionPoint_InvokeWithCancel)(IConnectionPoint*,DISPID,DISPPARAMS*,DWORD,DWORD); -static HRESULT(WINAPI *pConnectToConnectionPoint)(IUnknown*,REFIID,BOOL,IUnknown*, LPDWORD,IConnectionPoint **); -static HRESULT(WINAPI *pSHPropertyBag_ReadLONG)(IPropertyBag *,LPCWSTR,LPLONG); -static LONG (WINAPI *pSHSetWindowBits)(HWND, INT, UINT, UINT); -static INT (WINAPI *pSHFormatDateTimeA)(const FILETIME UNALIGNED*, DWORD*, LPSTR, UINT); -static INT (WINAPI *pSHFormatDateTimeW)(const FILETIME UNALIGNED*, DWORD*, LPWSTR, UINT); -static DWORD (WINAPI *pSHGetObjectCompatFlags)(IUnknown*, const CLSID*); -static BOOL (WINAPI *pGUIDFromStringA)(LPSTR, CLSID *); -static HRESULT (WINAPI *pIUnknown_QueryServiceExec)(IUnknown*, REFIID, const GUID*, DWORD, DWORD, VARIANT*, VARIANT*); -static HRESULT (WINAPI *pIUnknown_ProfferService)(IUnknown*, REFGUID, IServiceProvider*, DWORD*); -static HWND (WINAPI *pSHCreateWorkerWindowA)(LONG, HWND, DWORD, DWORD, HMENU, LONG_PTR); - -static HMODULE hmlang; -static HRESULT (WINAPI *pLcidToRfc1766A)(LCID, LPSTR, INT); - -static const CHAR ie_international[] = { - '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','\\', - 'I','n','t','e','r','n','a','t','i','o','n','a','l',0}; -static const CHAR acceptlanguage[] = { - 'A','c','c','e','p','t','L','a','n','g','u','a','g','e',0}; - -typedef struct { - int id; - const void *args[5]; -} call_entry_t; - -typedef struct { - call_entry_t *calls; - int count; - int alloc; -} call_trace_t; - -static void init_call_trace(call_trace_t *ctrace) -{ - ctrace->alloc = 10; - ctrace->count = 0; - ctrace->calls = HeapAlloc(GetProcessHeap(), 0, sizeof(call_entry_t) * ctrace->alloc); -} - -static void free_call_trace(const call_trace_t *ctrace) -{ - HeapFree(GetProcessHeap(), 0, ctrace->calls); -} - -static void add_call(call_trace_t *ctrace, int id, const void *arg0, - const void *arg1, const void *arg2, const void *arg3, const void *arg4) -{ - call_entry_t call; - - call.id = id; - call.args[0] = arg0; - call.args[1] = arg1; - call.args[2] = arg2; - call.args[3] = arg3; - call.args[4] = arg4; - - if (ctrace->count == ctrace->alloc) - { - ctrace->alloc *= 2; - ctrace->calls = HeapReAlloc(GetProcessHeap(),0, ctrace->calls, ctrace->alloc*sizeof(call_entry_t)); - } - - ctrace->calls[ctrace->count++] = call; -} - -static void ok_trace_(call_trace_t *texpected, call_trace_t *tgot, int line) -{ - if (texpected->count == tgot->count) - { - INT i; - /* compare */ - for (i = 0; i < texpected->count; i++) - { - call_entry_t *expected = &texpected->calls[i]; - call_entry_t *got = &tgot->calls[i]; - INT j; - - ok_(__FILE__, line)(expected->id == got->id, "got different ids %d: %d, %d\n", i+1, expected->id, got->id); - - for (j = 0; j < 5; j++) - { - ok_(__FILE__, line)(expected->args[j] == got->args[j], "got different args[%d] for %d: %p, %p\n", j, i+1, - expected->args[j], got->args[j]); - } - } - } - else - ok_(__FILE__, line)(0, "traces length mismatch\n"); -} - -#define ok_trace(a, b) ok_trace_(a, b, __LINE__) - -/* trace of actually made calls */ -static call_trace_t trace_got; - -static void test_GetAcceptLanguagesA(void) -{ - static LPCSTR table[] = {"de,en-gb;q=0.7,en;q=0.3", - "de,en;q=0.3,en-gb;q=0.7", /* sorting is ignored */ - "winetest", /* content is ignored */ - "de-de,de;q=0.5", - "de", - NULL}; - - DWORD exactsize; - char original[512]; - char language[32]; - char buffer[64]; - HKEY hroot = NULL; - LONG res_query = ERROR_SUCCESS; - LONG lres; - HRESULT hr; - DWORD maxlen = sizeof(buffer) - 2; - DWORD len; - LCID lcid; - LPCSTR entry; - INT i = 0; - - if (!pGetAcceptLanguagesA) { - win_skip("GetAcceptLanguagesA is not available\n"); - return; - } - - lcid = GetUserDefaultLCID(); - - /* Get the original Value */ - lres = RegOpenKeyA(HKEY_CURRENT_USER, ie_international, &hroot); - if (lres) { - skip("RegOpenKey(%s) failed: %d\n", ie_international, lres); - return; - } - len = sizeof(original); - original[0] = 0; - res_query = RegQueryValueExA(hroot, acceptlanguage, 0, NULL, (PBYTE)original, &len); - - RegDeleteValue(hroot, acceptlanguage); - - /* Some windows versions use "lang-COUNTRY" as default */ - memset(language, 0, sizeof(language)); - len = GetLocaleInfoA(lcid, LOCALE_SISO639LANGNAME, language, sizeof(language)); - - if (len) { - lstrcat(language, "-"); - memset(buffer, 0, sizeof(buffer)); - len = GetLocaleInfoA(lcid, LOCALE_SISO3166CTRYNAME, buffer, sizeof(buffer) - len - 1); - lstrcat(language, buffer); - } - else - { - /* LOCALE_SNAME has additional parts in some languages. Try only as last chance */ - memset(language, 0, sizeof(language)); - len = GetLocaleInfoA(lcid, LOCALE_SNAME, language, sizeof(language)); - } - - /* get the default value */ - len = maxlen; - memset(buffer, '#', maxlen); - buffer[maxlen] = 0; - hr = pGetAcceptLanguagesA( buffer, &len); - - if (hr != S_OK) { - win_skip("GetAcceptLanguagesA failed with 0x%x\n", hr); - goto restore_original; - } - - if (lstrcmpA(buffer, language)) { - /* some windows versions use "lang" or "lang-country" as default */ - language[0] = 0; - if (pLcidToRfc1766A) { - hr = pLcidToRfc1766A(lcid, language, sizeof(language)); - ok(hr == S_OK, "LcidToRfc1766A returned 0x%x and %s\n", hr, language); - } - } - - ok(!lstrcmpA(buffer, language), - "have '%s' (searching for '%s')\n", language, buffer); - - if (lstrcmpA(buffer, language)) { - win_skip("no more ideas, how to build the default language '%s'\n", buffer); - goto restore_original; - } - - trace("detected default: %s\n", language); - while ((entry = table[i])) { - - exactsize = lstrlenA(entry); - - lres = RegSetValueExA(hroot, acceptlanguage, 0, REG_SZ, (const BYTE *) entry, exactsize + 1); - ok(!lres, "got %d for RegSetValueExA: %s\n", lres, entry); - - /* len includes space for the terminating 0 before vista/w2k8 */ - len = exactsize + 2; - memset(buffer, '#', maxlen); - buffer[maxlen] = 0; - hr = pGetAcceptLanguagesA( buffer, &len); - ok(((hr == E_INVALIDARG) && (len == 0)) || - (SUCCEEDED(hr) && - ((len == exactsize) || (len == exactsize+1)) && - !lstrcmpA(buffer, entry)), - "+2_#%d: got 0x%x with %d and %s\n", i, hr, len, buffer); - - len = exactsize + 1; - memset(buffer, '#', maxlen); - buffer[maxlen] = 0; - hr = pGetAcceptLanguagesA( buffer, &len); - ok(((hr == E_INVALIDARG) && (len == 0)) || - (SUCCEEDED(hr) && - ((len == exactsize) || (len == exactsize+1)) && - !lstrcmpA(buffer, entry)), - "+1_#%d: got 0x%x with %d and %s\n", i, hr, len, buffer); - - len = exactsize; - memset(buffer, '#', maxlen); - buffer[maxlen] = 0; - hr = pGetAcceptLanguagesA( buffer, &len); - - /* There is no space for the string in the registry. - When the buffer is large enough, the default language is returned - - When the buffer is too small for that fallback, win7_32 and w2k8_64 - and above fail with HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), but - recent os succeed and return a partial result while - older os succeed and overflow the buffer */ - - ok(((hr == E_INVALIDARG) && (len == 0)) || - (((hr == S_OK) && !lstrcmpA(buffer, language) && (len == lstrlenA(language))) || - ((hr == S_OK) && !memcmp(buffer, language, len)) || - ((hr == __HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)) && !len)), - "==_#%d: got 0x%x with %d and %s\n", i, hr, len, buffer); - - if (exactsize > 1) { - len = exactsize - 1; - memset(buffer, '#', maxlen); - buffer[maxlen] = 0; - hr = pGetAcceptLanguagesA( buffer, &len); - ok(((hr == E_INVALIDARG) && (len == 0)) || - (((hr == S_OK) && !lstrcmpA(buffer, language) && (len == lstrlenA(language))) || - ((hr == S_OK) && !memcmp(buffer, language, len)) || - ((hr == __HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)) && !len)), - "-1_#%d: got 0x%x with %d and %s\n", i, hr, len, buffer); - } - - len = 1; - memset(buffer, '#', maxlen); - buffer[maxlen] = 0; - hr = pGetAcceptLanguagesA( buffer, &len); - ok(((hr == E_INVALIDARG) && (len == 0)) || - (((hr == S_OK) && !lstrcmpA(buffer, language) && (len == lstrlenA(language))) || - ((hr == S_OK) && !memcmp(buffer, language, len)) || - ((hr == __HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)) && !len)), - "=1_#%d: got 0x%x with %d and %s\n", i, hr, len, buffer); - - len = maxlen; - hr = pGetAcceptLanguagesA( NULL, &len); - - /* w2k3 and below: E_FAIL and untouched len, - since w2k8: S_OK and needed size (excluding 0) */ - ok( ((hr == S_OK) && (len == exactsize)) || - ((hr == E_FAIL) && (len == maxlen)), - "NULL,max #%d: got 0x%x with %d and %s\n", i, hr, len, buffer); - - i++; - } - - /* without a value in the registry, a default language is returned */ - RegDeleteValue(hroot, acceptlanguage); - - len = maxlen; - memset(buffer, '#', maxlen); - buffer[maxlen] = 0; - hr = pGetAcceptLanguagesA( buffer, &len); - ok( ((hr == S_OK) && (len == lstrlenA(language))), - "max: got 0x%x with %d and %s (expected S_OK with %d and '%s'\n", - hr, len, buffer, lstrlenA(language), language); - - len = 2; - memset(buffer, '#', maxlen); - buffer[maxlen] = 0; - hr = pGetAcceptLanguagesA( buffer, &len); - ok( (((hr == S_OK) || (hr == E_INVALIDARG)) && !memcmp(buffer, language, len)) || - ((hr == __HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)) && !len), - "=2: got 0x%x with %d and %s\n", hr, len, buffer); - - len = 1; - memset(buffer, '#', maxlen); - buffer[maxlen] = 0; - hr = pGetAcceptLanguagesA( buffer, &len); - /* When the buffer is too small, win7_32 and w2k8_64 and above fail with - HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), other versions suceed - and return a partial 0 terminated result while other versions - fail with E_INVALIDARG and return a partial unterminated result */ - ok( (((hr == S_OK) || (hr == E_INVALIDARG)) && !memcmp(buffer, language, len)) || - ((hr == __HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)) && !len), - "=1: got 0x%x with %d and %s\n", hr, len, buffer); - - len = 0; - memset(buffer, '#', maxlen); - buffer[maxlen] = 0; - hr = pGetAcceptLanguagesA( buffer, &len); - /* w2k3 and below: E_FAIL, since w2k8: E_INVALIDARG */ - ok((hr == E_FAIL) || (hr == E_INVALIDARG), - "got 0x%x (expected E_FAIL or E_INVALIDARG)\n", hr); - - memset(buffer, '#', maxlen); - buffer[maxlen] = 0; - hr = pGetAcceptLanguagesA( buffer, NULL); - /* w2k3 and below: E_FAIL, since w2k8: E_INVALIDARG */ - ok((hr == E_FAIL) || (hr == E_INVALIDARG), - "got 0x%x (expected E_FAIL or E_INVALIDARG)\n", hr); - - - hr = pGetAcceptLanguagesA( NULL, NULL); - /* w2k3 and below: E_FAIL, since w2k8: E_INVALIDARG */ - ok((hr == E_FAIL) || (hr == E_INVALIDARG), - "got 0x%x (expected E_FAIL or E_INVALIDARG)\n", hr); - -restore_original: - if (!res_query) { - len = lstrlenA(original); - lres = RegSetValueExA(hroot, acceptlanguage, 0, REG_SZ, (const BYTE *) original, len ? len + 1: 0); - ok(!lres, "RegSetValueEx(%s) failed: %d\n", original, lres); - } - else - { - RegDeleteValue(hroot, acceptlanguage); - } - RegCloseKey(hroot); -} - -static void test_SHSearchMapInt(void) -{ - int keys[8], values[8]; - int i = 0; - - if (!pSHSearchMapInt) - return; - - memset(keys, 0, sizeof(keys)); - memset(values, 0, sizeof(values)); - keys[0] = 99; values[0] = 101; - - /* NULL key/value lists crash native, so skip testing them */ - - /* 1 element */ - i = pSHSearchMapInt(keys, values, 1, keys[0]); - ok(i == values[0], "Len 1, expected %d, got %d\n", values[0], i); - - /* Key doesn't exist */ - i = pSHSearchMapInt(keys, values, 1, 100); - ok(i == -1, "Len 1 - bad key, expected -1, got %d\n", i); - - /* Len = 0 => not found */ - i = pSHSearchMapInt(keys, values, 0, keys[0]); - ok(i == -1, "Len 1 - passed len 0, expected -1, got %d\n", i); - - /* 2 elements, len = 1 */ - keys[1] = 98; values[1] = 102; - i = pSHSearchMapInt(keys, values, 1, keys[1]); - ok(i == -1, "Len 1 - array len 2, expected -1, got %d\n", i); - - /* 2 elements, len = 2 */ - i = pSHSearchMapInt(keys, values, 2, keys[1]); - ok(i == values[1], "Len 2, expected %d, got %d\n", values[1], i); - - /* Searches forward */ - keys[2] = 99; values[2] = 103; - i = pSHSearchMapInt(keys, values, 3, keys[0]); - ok(i == values[0], "Len 3, expected %d, got %d\n", values[0], i); -} - -static void test_alloc_shared(void) -{ - DWORD procid; - HANDLE hmem; - int val; - int* p; - BOOL ret; - - procid=GetCurrentProcessId(); - hmem=pSHAllocShared(NULL,10,procid); - ok(hmem!=NULL,"SHAllocShared(NULL...) failed: %u\n", GetLastError()); - ret = pSHFreeShared(hmem, procid); - ok( ret, "SHFreeShared failed: %u\n", GetLastError()); - - val=0x12345678; - hmem=pSHAllocShared(&val,4,procid); - ok(hmem!=NULL,"SHAllocShared(NULL...) failed: %u\n", GetLastError()); - - p=pSHLockShared(hmem,procid); - ok(p!=NULL,"SHLockShared failed: %u\n", GetLastError()); - if (p!=NULL) - ok(*p==val,"Wrong value in shared memory: %d instead of %d\n",*p,val); - ret = pSHUnlockShared(p); - ok( ret, "SHUnlockShared failed: %u\n", GetLastError()); - - ret = pSHFreeShared(hmem, procid); - ok( ret, "SHFreeShared failed: %u\n", GetLastError()); -} - -static void test_fdsa(void) -{ - typedef struct - { - DWORD num_items; /* Number of elements inserted */ - void *mem; /* Ptr to array */ - DWORD blocks_alloced; /* Number of elements allocated */ - BYTE inc; /* Number of elements to grow by when we need to expand */ - BYTE block_size; /* Size in bytes of an element */ - BYTE flags; /* Flags */ - } FDSA_info; - - BOOL (WINAPI *pFDSA_Initialize)(DWORD block_size, DWORD inc, FDSA_info *info, void *mem, - DWORD init_blocks); - BOOL (WINAPI *pFDSA_Destroy)(FDSA_info *info); - DWORD (WINAPI *pFDSA_InsertItem)(FDSA_info *info, DWORD where, const void *block); - BOOL (WINAPI *pFDSA_DeleteItem)(FDSA_info *info, DWORD where); - - FDSA_info info; - int block_size = 10, init_blocks = 4, inc = 2; - DWORD ret; - char *mem; - - pFDSA_Initialize = (void *)GetProcAddress(hShlwapi, (LPSTR)208); - pFDSA_Destroy = (void *)GetProcAddress(hShlwapi, (LPSTR)209); - pFDSA_InsertItem = (void *)GetProcAddress(hShlwapi, (LPSTR)210); - pFDSA_DeleteItem = (void *)GetProcAddress(hShlwapi, (LPSTR)211); - - mem = HeapAlloc(GetProcessHeap(), 0, block_size * init_blocks); - memset(&info, 0, sizeof(info)); - - ok(pFDSA_Initialize(block_size, inc, &info, mem, init_blocks), "FDSA_Initialize rets FALSE\n"); - ok(info.num_items == 0, "num_items = %d\n", info.num_items); - ok(info.mem == mem, "mem = %p\n", info.mem); - ok(info.blocks_alloced == init_blocks, "blocks_alloced = %d\n", info.blocks_alloced); - ok(info.inc == inc, "inc = %d\n", info.inc); - ok(info.block_size == block_size, "block_size = %d\n", info.block_size); - ok(info.flags == 0, "flags = %d\n", info.flags); - - ret = pFDSA_InsertItem(&info, 1234, "1234567890"); - ok(ret == 0, "ret = %d\n", ret); - ok(info.num_items == 1, "num_items = %d\n", info.num_items); - ok(info.mem == mem, "mem = %p\n", info.mem); - ok(info.blocks_alloced == init_blocks, "blocks_alloced = %d\n", info.blocks_alloced); - ok(info.inc == inc, "inc = %d\n", info.inc); - ok(info.block_size == block_size, "block_size = %d\n", info.block_size); - ok(info.flags == 0, "flags = %d\n", info.flags); - - ret = pFDSA_InsertItem(&info, 1234, "abcdefghij"); - ok(ret == 1, "ret = %d\n", ret); - - ret = pFDSA_InsertItem(&info, 1, "klmnopqrst"); - ok(ret == 1, "ret = %d\n", ret); - - ret = pFDSA_InsertItem(&info, 0, "uvwxyzABCD"); - ok(ret == 0, "ret = %d\n", ret); - ok(info.mem == mem, "mem = %p\n", info.mem); - ok(info.flags == 0, "flags = %d\n", info.flags); - - /* This next InsertItem will cause shlwapi to allocate its own mem buffer */ - ret = pFDSA_InsertItem(&info, 0, "EFGHIJKLMN"); - ok(ret == 0, "ret = %d\n", ret); - ok(info.mem != mem, "mem = %p\n", info.mem); - ok(info.blocks_alloced == init_blocks + inc, "blocks_alloced = %d\n", info.blocks_alloced); - ok(info.flags == 0x1, "flags = %d\n", info.flags); - - ok(!memcmp(info.mem, "EFGHIJKLMNuvwxyzABCD1234567890klmnopqrstabcdefghij", 50), "mem %s\n", (char*)info.mem); - - ok(pFDSA_DeleteItem(&info, 2), "rets FALSE\n"); - ok(info.mem != mem, "mem = %p\n", info.mem); - ok(info.blocks_alloced == init_blocks + inc, "blocks_alloced = %d\n", info.blocks_alloced); - ok(info.flags == 0x1, "flags = %d\n", info.flags); - - ok(!memcmp(info.mem, "EFGHIJKLMNuvwxyzABCDklmnopqrstabcdefghij", 40), "mem %s\n", (char*)info.mem); - - ok(pFDSA_DeleteItem(&info, 3), "rets FALSE\n"); - ok(info.mem != mem, "mem = %p\n", info.mem); - ok(info.blocks_alloced == init_blocks + inc, "blocks_alloced = %d\n", info.blocks_alloced); - ok(info.flags == 0x1, "flags = %d\n", info.flags); - - ok(!memcmp(info.mem, "EFGHIJKLMNuvwxyzABCDklmnopqrst", 30), "mem %s\n", (char*)info.mem); - - ok(!pFDSA_DeleteItem(&info, 4), "does not ret FALSE\n"); - - /* As shlwapi has allocated memory internally, Destroy will ret FALSE */ - ok(!pFDSA_Destroy(&info), "FDSA_Destroy does not ret FALSE\n"); - - - /* When Initialize is called with inc = 0, set it to 1 */ - ok(pFDSA_Initialize(block_size, 0, &info, mem, init_blocks), "FDSA_Initialize rets FALSE\n"); - ok(info.inc == 1, "inc = %d\n", info.inc); - - /* This time, because shlwapi hasn't had to allocate memory - internally, Destroy rets non-zero */ - ok(pFDSA_Destroy(&info), "FDSA_Destroy rets FALSE\n"); - - - HeapFree(GetProcessHeap(), 0, mem); -} - - -typedef struct SHELL_USER_SID { - SID_IDENTIFIER_AUTHORITY sidAuthority; - DWORD dwUserGroupID; - DWORD dwUserID; -} SHELL_USER_SID, *PSHELL_USER_SID; -typedef struct SHELL_USER_PERMISSION { - SHELL_USER_SID susID; - DWORD dwAccessType; - BOOL fInherit; - DWORD dwAccessMask; - DWORD dwInheritMask; - DWORD dwInheritAccessMask; -} SHELL_USER_PERMISSION, *PSHELL_USER_PERMISSION; -static void test_GetShellSecurityDescriptor(void) -{ - SHELL_USER_PERMISSION supCurrentUserFull = { - { {SECURITY_NULL_SID_AUTHORITY}, 0, 0 }, - ACCESS_ALLOWED_ACE_TYPE, FALSE, - GENERIC_ALL, 0, 0 }; -#define MY_INHERITANCE 0xBE /* invalid value to proof behavior */ - SHELL_USER_PERMISSION supEveryoneDenied = { - { {SECURITY_WORLD_SID_AUTHORITY}, SECURITY_WORLD_RID, 0 }, - ACCESS_DENIED_ACE_TYPE, TRUE, - GENERIC_WRITE, MY_INHERITANCE | 0xDEADBA00, GENERIC_READ }; - PSHELL_USER_PERMISSION rgsup[2] = { - &supCurrentUserFull, &supEveryoneDenied, - }; - SECURITY_DESCRIPTOR* psd; - SECURITY_DESCRIPTOR* (WINAPI*pGetShellSecurityDescriptor)(PSHELL_USER_PERMISSION*,int); - - pGetShellSecurityDescriptor=(void*)GetProcAddress(hShlwapi,(char*)475); - - if(!pGetShellSecurityDescriptor) - { - win_skip("GetShellSecurityDescriptor not available\n"); - return; - } - - psd = pGetShellSecurityDescriptor(NULL, 2); - ok(psd==NULL || - broken(psd==INVALID_HANDLE_VALUE), /* IE5 */ - "GetShellSecurityDescriptor should fail\n"); - psd = pGetShellSecurityDescriptor(rgsup, 0); - ok(psd==NULL, "GetShellSecurityDescriptor should fail\n"); - - SetLastError(0xdeadbeef); - psd = pGetShellSecurityDescriptor(rgsup, 2); - if (psd == NULL && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - /* The previous calls to GetShellSecurityDescriptor don't set the last error */ - win_skip("GetShellSecurityDescriptor is not implemented\n"); - return; - } - if (psd==INVALID_HANDLE_VALUE) - { - win_skip("GetShellSecurityDescriptor is broken on IE5\n"); - return; - } - ok(psd!=NULL, "GetShellSecurityDescriptor failed\n"); - if (psd!=NULL) - { - BOOL bHasDacl = FALSE, bDefaulted; - PACL pAcl; - DWORD dwRev; - SECURITY_DESCRIPTOR_CONTROL control; - - ok(IsValidSecurityDescriptor(psd), "returned value is not valid SD\n"); - - ok(GetSecurityDescriptorControl(psd, &control, &dwRev), - "GetSecurityDescriptorControl failed with error %u\n", GetLastError()); - ok(0 == (control & SE_SELF_RELATIVE), "SD should be absolute\n"); - - ok(GetSecurityDescriptorDacl(psd, &bHasDacl, &pAcl, &bDefaulted), - "GetSecurityDescriptorDacl failed with error %u\n", GetLastError()); - - ok(bHasDacl, "SD has no DACL\n"); - if (bHasDacl) - { - ok(!bDefaulted, "DACL should not be defaulted\n"); - - ok(pAcl != NULL, "NULL DACL!\n"); - if (pAcl != NULL) - { - ACL_SIZE_INFORMATION asiSize; - - ok(IsValidAcl(pAcl), "DACL is not valid\n"); - - ok(GetAclInformation(pAcl, &asiSize, sizeof(asiSize), AclSizeInformation), - "GetAclInformation failed with error %u\n", GetLastError()); - - ok(asiSize.AceCount == 3, "Incorrect number of ACEs: %d entries\n", asiSize.AceCount); - if (asiSize.AceCount == 3) - { - ACCESS_ALLOWED_ACE *paaa; /* will use for DENIED too */ - - ok(GetAce(pAcl, 0, (LPVOID*)&paaa), "GetAce failed with error %u\n", GetLastError()); - ok(paaa->Header.AceType == ACCESS_ALLOWED_ACE_TYPE, - "Invalid ACE type %d\n", paaa->Header.AceType); - ok(paaa->Header.AceFlags == 0, "Invalid ACE flags %x\n", paaa->Header.AceFlags); - ok(paaa->Mask == GENERIC_ALL, "Invalid ACE mask %x\n", paaa->Mask); - - ok(GetAce(pAcl, 1, (LPVOID*)&paaa), "GetAce failed with error %u\n", GetLastError()); - ok(paaa->Header.AceType == ACCESS_DENIED_ACE_TYPE, - "Invalid ACE type %d\n", paaa->Header.AceType); - /* first one of two ACEs generated from inheritable entry - without inheritance */ - ok(paaa->Header.AceFlags == 0, "Invalid ACE flags %x\n", paaa->Header.AceFlags); - ok(paaa->Mask == GENERIC_WRITE, "Invalid ACE mask %x\n", paaa->Mask); - - ok(GetAce(pAcl, 2, (LPVOID*)&paaa), "GetAce failed with error %u\n", GetLastError()); - ok(paaa->Header.AceType == ACCESS_DENIED_ACE_TYPE, - "Invalid ACE type %d\n", paaa->Header.AceType); - /* second ACE - with inheritance */ - ok(paaa->Header.AceFlags == MY_INHERITANCE, - "Invalid ACE flags %x\n", paaa->Header.AceFlags); - ok(paaa->Mask == GENERIC_READ, "Invalid ACE mask %x\n", paaa->Mask); - } - } - } - - LocalFree(psd); - } -} - -static void test_SHPackDispParams(void) -{ - DISPPARAMS params; - VARIANT vars[10]; - HRESULT hres; - - if(!pSHPackDispParams) - win_skip("SHPackSidpParams not available\n"); - - memset(¶ms, 0xc0, sizeof(params)); - memset(vars, 0xc0, sizeof(vars)); - hres = pSHPackDispParams(¶ms, vars, 1, VT_I4, 0xdeadbeef); - ok(hres == S_OK, "SHPackDispParams failed: %08x\n", hres); - ok(params.cArgs == 1, "params.cArgs = %d\n", params.cArgs); - ok(params.cNamedArgs == 0, "params.cNamedArgs = %d\n", params.cArgs); - ok(params.rgdispidNamedArgs == NULL, "params.rgdispidNamedArgs = %p\n", params.rgdispidNamedArgs); - ok(params.rgvarg == vars, "params.rgvarg = %p\n", params.rgvarg); - ok(V_VT(vars) == VT_I4, "V_VT(var) = %d\n", V_VT(vars)); - ok(V_I4(vars) == 0xdeadbeef, "failed %x\n", V_I4(vars)); - - memset(¶ms, 0xc0, sizeof(params)); - hres = pSHPackDispParams(¶ms, NULL, 0, 0); - ok(hres == S_OK, "SHPackDispParams failed: %08x\n", hres); - ok(params.cArgs == 0, "params.cArgs = %d\n", params.cArgs); - ok(params.cNamedArgs == 0, "params.cNamedArgs = %d\n", params.cArgs); - ok(params.rgdispidNamedArgs == NULL, "params.rgdispidNamedArgs = %p\n", params.rgdispidNamedArgs); - ok(params.rgvarg == NULL, "params.rgvarg = %p\n", params.rgvarg); - - memset(vars, 0xc0, sizeof(vars)); - memset(¶ms, 0xc0, sizeof(params)); - hres = pSHPackDispParams(¶ms, vars, 4, VT_BSTR, (void*)0xdeadbeef, VT_EMPTY, 10, - VT_I4, 100, VT_DISPATCH, (void*)0xdeadbeef); - ok(hres == S_OK, "SHPackDispParams failed: %08x\n", hres); - ok(params.cArgs == 4, "params.cArgs = %d\n", params.cArgs); - ok(params.cNamedArgs == 0, "params.cNamedArgs = %d\n", params.cArgs); - ok(params.rgdispidNamedArgs == NULL, "params.rgdispidNamedArgs = %p\n", params.rgdispidNamedArgs); - ok(params.rgvarg == vars, "params.rgvarg = %p\n", params.rgvarg); - ok(V_VT(vars) == VT_DISPATCH, "V_VT(vars[0]) = %x\n", V_VT(vars)); - ok(V_I4(vars) == 0xdeadbeef, "V_I4(vars[0]) = %x\n", V_I4(vars)); - ok(V_VT(vars+1) == VT_I4, "V_VT(vars[1]) = %d\n", V_VT(vars+1)); - ok(V_I4(vars+1) == 100, "V_I4(vars[1]) = %x\n", V_I4(vars+1)); - ok(V_VT(vars+2) == VT_I4, "V_VT(vars[2]) = %d\n", V_VT(vars+2)); - ok(V_I4(vars+2) == 10, "V_I4(vars[2]) = %x\n", V_I4(vars+2)); - ok(V_VT(vars+3) == VT_BSTR, "V_VT(vars[3]) = %d\n", V_VT(vars+3)); - ok(V_BSTR(vars+3) == (void*)0xdeadbeef, "V_BSTR(vars[3]) = %p\n", V_BSTR(vars+3)); -} - -typedef struct _disp -{ - const IDispatchVtbl *vtbl; - LONG refCount; -} Disp; - -typedef struct _contain -{ - const IConnectionPointContainerVtbl *vtbl; - LONG refCount; - - UINT ptCount; - IConnectionPoint **pt; -} Contain; - -typedef struct _cntptn -{ - const IConnectionPointVtbl *vtbl; - LONG refCount; - - Contain *container; - GUID id; - UINT sinkCount; - IUnknown **sink; -} ConPt; - -typedef struct _enum -{ - const IEnumConnectionsVtbl *vtbl; - LONG refCount; - - UINT idx; - ConPt *pt; -} EnumCon; - -typedef struct _enumpt -{ - const IEnumConnectionPointsVtbl *vtbl; - LONG refCount; - - int idx; - Contain *container; -} EnumPt; - - -static HRESULT WINAPI Disp_QueryInterface( - IDispatch* This, - REFIID riid, - void **ppvObject) -{ - *ppvObject = NULL; - - if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IDispatch)) - { - *ppvObject = This; - } - - if (*ppvObject) - { - IUnknown_AddRef(This); - return S_OK; - } - - trace("no interface\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI Disp_AddRef(IDispatch* This) -{ - Disp *iface = (Disp*)This; - return InterlockedIncrement(&iface->refCount); -} - -static ULONG WINAPI Disp_Release(IDispatch* This) -{ - Disp *iface = (Disp*)This; - ULONG ret; - - ret = InterlockedDecrement(&iface->refCount); - if (ret == 0) - HeapFree(GetProcessHeap(),0,This); - return ret; -} - -static HRESULT WINAPI Disp_GetTypeInfoCount( - IDispatch* This, - UINT *pctinfo) -{ - return ERROR_SUCCESS; -} - -static HRESULT WINAPI Disp_GetTypeInfo( - IDispatch* This, - UINT iTInfo, - LCID lcid, - ITypeInfo **ppTInfo) -{ - return ERROR_SUCCESS; -} - -static HRESULT WINAPI Disp_GetIDsOfNames( - IDispatch* This, - REFIID riid, - LPOLESTR *rgszNames, - UINT cNames, - LCID lcid, - DISPID *rgDispId) -{ - return ERROR_SUCCESS; -} - -static HRESULT WINAPI Disp_Invoke( - IDispatch* This, - DISPID dispIdMember, - REFIID riid, - LCID lcid, - WORD wFlags, - DISPPARAMS *pDispParams, - VARIANT *pVarResult, - EXCEPINFO *pExcepInfo, - UINT *puArgErr) -{ - trace("%p %x %p %x %x %p %p %p %p\n",This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr); - - ok(dispIdMember == 0xa0 || dispIdMember == 0xa1, "Unknown dispIdMember\n"); - ok(pDispParams != NULL, "Invoked with NULL pDispParams\n"); - ok(wFlags == DISPATCH_METHOD, "Wrong flags %x\n",wFlags); - ok(lcid == 0,"Wrong lcid %x\n",lcid); - if (dispIdMember == 0xa0) - { - ok(pDispParams->cArgs == 0, "params.cArgs = %d\n", pDispParams->cArgs); - ok(pDispParams->cNamedArgs == 0, "params.cNamedArgs = %d\n", pDispParams->cArgs); - ok(pDispParams->rgdispidNamedArgs == NULL, "params.rgdispidNamedArgs = %p\n", pDispParams->rgdispidNamedArgs); - ok(pDispParams->rgvarg == NULL, "params.rgvarg = %p\n", pDispParams->rgvarg); - } - else if (dispIdMember == 0xa1) - { - ok(pDispParams->cArgs == 2, "params.cArgs = %d\n", pDispParams->cArgs); - ok(pDispParams->cNamedArgs == 0, "params.cNamedArgs = %d\n", pDispParams->cArgs); - ok(pDispParams->rgdispidNamedArgs == NULL, "params.rgdispidNamedArgs = %p\n", pDispParams->rgdispidNamedArgs); - ok(V_VT(pDispParams->rgvarg) == VT_BSTR, "V_VT(var) = %d\n", V_VT(pDispParams->rgvarg)); - ok(V_I4(pDispParams->rgvarg) == 0xdeadcafe , "failed %p\n", V_BSTR(pDispParams->rgvarg)); - ok(V_VT(pDispParams->rgvarg+1) == VT_I4, "V_VT(var) = %d\n", V_VT(pDispParams->rgvarg+1)); - ok(V_I4(pDispParams->rgvarg+1) == 0xdeadbeef, "failed %x\n", V_I4(pDispParams->rgvarg+1)); - } - - return ERROR_SUCCESS; -} - -static const IDispatchVtbl disp_vtbl = { - Disp_QueryInterface, - Disp_AddRef, - Disp_Release, - - Disp_GetTypeInfoCount, - Disp_GetTypeInfo, - Disp_GetIDsOfNames, - Disp_Invoke -}; - -static HRESULT WINAPI Enum_QueryInterface( - IEnumConnections* This, - REFIID riid, - void **ppvObject) -{ - *ppvObject = NULL; - - if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IEnumConnections)) - { - *ppvObject = This; - } - - if (*ppvObject) - { - IUnknown_AddRef(This); - return S_OK; - } - - trace("no interface\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI Enum_AddRef(IEnumConnections* This) -{ - EnumCon *iface = (EnumCon*)This; - return InterlockedIncrement(&iface->refCount); -} - -static ULONG WINAPI Enum_Release(IEnumConnections* This) -{ - EnumCon *iface = (EnumCon*)This; - ULONG ret; - - ret = InterlockedDecrement(&iface->refCount); - if (ret == 0) - HeapFree(GetProcessHeap(),0,This); - return ret; -} - -static HRESULT WINAPI Enum_Next( - IEnumConnections* This, - ULONG cConnections, - LPCONNECTDATA rgcd, - ULONG *pcFetched) -{ - EnumCon *iface = (EnumCon*)This; - - if (cConnections > 0 && iface->idx < iface->pt->sinkCount) - { - rgcd->pUnk = iface->pt->sink[iface->idx]; - IUnknown_AddRef(iface->pt->sink[iface->idx]); - rgcd->dwCookie=0xff; - if (pcFetched) - *pcFetched = 1; - iface->idx++; - return S_OK; - } - - return E_FAIL; -} - -static HRESULT WINAPI Enum_Skip( - IEnumConnections* This, - ULONG cConnections) -{ - return E_FAIL; -} - -static HRESULT WINAPI Enum_Reset( - IEnumConnections* This) -{ - return E_FAIL; -} - -static HRESULT WINAPI Enum_Clone( - IEnumConnections* This, - IEnumConnections **ppEnum) -{ - return E_FAIL; -} - -static const IEnumConnectionsVtbl enum_vtbl = { - - Enum_QueryInterface, - Enum_AddRef, - Enum_Release, - Enum_Next, - Enum_Skip, - Enum_Reset, - Enum_Clone -}; - -static HRESULT WINAPI ConPt_QueryInterface( - IConnectionPoint* This, - REFIID riid, - void **ppvObject) -{ - *ppvObject = NULL; - - if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IConnectionPoint)) - { - *ppvObject = This; - } - - if (*ppvObject) - { - IUnknown_AddRef(This); - return S_OK; - } - - trace("no interface\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI ConPt_AddRef( - IConnectionPoint* This) -{ - ConPt *iface = (ConPt*)This; - return InterlockedIncrement(&iface->refCount); -} - -static ULONG WINAPI ConPt_Release( - IConnectionPoint* This) -{ - ConPt *iface = (ConPt*)This; - ULONG ret; - - ret = InterlockedDecrement(&iface->refCount); - if (ret == 0) - { - if (iface->sinkCount > 0) - { - int i; - for (i = 0; i < iface->sinkCount; i++) - { - if (iface->sink[i]) - IUnknown_Release(iface->sink[i]); - } - HeapFree(GetProcessHeap(),0,iface->sink); - } - HeapFree(GetProcessHeap(),0,This); - } - return ret; -} - -static HRESULT WINAPI ConPt_GetConnectionInterface( - IConnectionPoint* This, - IID *pIID) -{ - static int i = 0; - ConPt *iface = (ConPt*)This; - if (i==0) - { - i++; - return E_FAIL; - } - else - memcpy(pIID,&iface->id,sizeof(GUID)); - return S_OK; -} - -static HRESULT WINAPI ConPt_GetConnectionPointContainer( - IConnectionPoint* This, - IConnectionPointContainer **ppCPC) -{ - ConPt *iface = (ConPt*)This; - - *ppCPC = (IConnectionPointContainer*)iface->container; - return S_OK; -} - -static HRESULT WINAPI ConPt_Advise( - IConnectionPoint* This, - IUnknown *pUnkSink, - DWORD *pdwCookie) -{ - ConPt *iface = (ConPt*)This; - - if (iface->sinkCount == 0) - iface->sink = HeapAlloc(GetProcessHeap(),0,sizeof(IUnknown*)); - else - iface->sink = HeapReAlloc(GetProcessHeap(),0,iface->sink,sizeof(IUnknown*)*(iface->sinkCount+1)); - iface->sink[iface->sinkCount] = pUnkSink; - IUnknown_AddRef(pUnkSink); - iface->sinkCount++; - *pdwCookie = iface->sinkCount; - return S_OK; -} - -static HRESULT WINAPI ConPt_Unadvise( - IConnectionPoint* This, - DWORD dwCookie) -{ - ConPt *iface = (ConPt*)This; - - if (dwCookie > iface->sinkCount) - return E_FAIL; - else - { - IUnknown_Release(iface->sink[dwCookie-1]); - iface->sink[dwCookie-1] = NULL; - } - return S_OK; -} - -static HRESULT WINAPI ConPt_EnumConnections( - IConnectionPoint* This, - IEnumConnections **ppEnum) -{ - EnumCon *ec; - - ec = HeapAlloc(GetProcessHeap(),0,sizeof(EnumCon)); - ec->vtbl = &enum_vtbl; - ec->refCount = 1; - ec->pt = (ConPt*)This; - ec->idx = 0; - *ppEnum = (IEnumConnections*)ec; - - return S_OK; -} - -static const IConnectionPointVtbl point_vtbl = { - ConPt_QueryInterface, - ConPt_AddRef, - ConPt_Release, - - ConPt_GetConnectionInterface, - ConPt_GetConnectionPointContainer, - ConPt_Advise, - ConPt_Unadvise, - ConPt_EnumConnections -}; - -static HRESULT WINAPI EnumPt_QueryInterface( - IEnumConnectionPoints* This, - REFIID riid, - void **ppvObject) -{ - *ppvObject = NULL; - - if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IEnumConnectionPoints)) - { - *ppvObject = This; - } - - if (*ppvObject) - { - IUnknown_AddRef(This); - return S_OK; - } - - trace("no interface\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI EnumPt_AddRef(IEnumConnectionPoints* This) -{ - EnumPt *iface = (EnumPt*)This; - return InterlockedIncrement(&iface->refCount); -} - -static ULONG WINAPI EnumPt_Release(IEnumConnectionPoints* This) -{ - EnumPt *iface = (EnumPt*)This; - ULONG ret; - - ret = InterlockedDecrement(&iface->refCount); - if (ret == 0) - HeapFree(GetProcessHeap(),0,This); - return ret; -} - -static HRESULT WINAPI EnumPt_Next( - IEnumConnectionPoints* This, - ULONG cConnections, - IConnectionPoint **rgcd, - ULONG *pcFetched) -{ - EnumPt *iface = (EnumPt*)This; - - if (cConnections > 0 && iface->idx < iface->container->ptCount) - { - *rgcd = iface->container->pt[iface->idx]; - IUnknown_AddRef(iface->container->pt[iface->idx]); - if (pcFetched) - *pcFetched = 1; - iface->idx++; - return S_OK; - } - - return E_FAIL; -} - -static HRESULT WINAPI EnumPt_Skip( - IEnumConnectionPoints* This, - ULONG cConnections) -{ - return E_FAIL; -} - -static HRESULT WINAPI EnumPt_Reset( - IEnumConnectionPoints* This) -{ - return E_FAIL; -} - -static HRESULT WINAPI EnumPt_Clone( - IEnumConnectionPoints* This, - IEnumConnectionPoints **ppEnumPt) -{ - return E_FAIL; -} - -static const IEnumConnectionPointsVtbl enumpt_vtbl = { - - EnumPt_QueryInterface, - EnumPt_AddRef, - EnumPt_Release, - EnumPt_Next, - EnumPt_Skip, - EnumPt_Reset, - EnumPt_Clone -}; - -static HRESULT WINAPI Contain_QueryInterface( - IConnectionPointContainer* This, - REFIID riid, - void **ppvObject) -{ - *ppvObject = NULL; - - if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IConnectionPointContainer)) - { - *ppvObject = This; - } - - if (*ppvObject) - { - IUnknown_AddRef(This); - return S_OK; - } - - trace("no interface\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI Contain_AddRef( - IConnectionPointContainer* This) -{ - Contain *iface = (Contain*)This; - return InterlockedIncrement(&iface->refCount); -} - -static ULONG WINAPI Contain_Release( - IConnectionPointContainer* This) -{ - Contain *iface = (Contain*)This; - ULONG ret; - - ret = InterlockedDecrement(&iface->refCount); - if (ret == 0) - { - if (iface->ptCount > 0) - { - int i; - for (i = 0; i < iface->ptCount; i++) - IUnknown_Release(iface->pt[i]); - HeapFree(GetProcessHeap(),0,iface->pt); - } - HeapFree(GetProcessHeap(),0,This); - } - return ret; -} - -static HRESULT WINAPI Contain_EnumConnectionPoints( - IConnectionPointContainer* This, - IEnumConnectionPoints **ppEnum) -{ - EnumPt *ec; - - ec = HeapAlloc(GetProcessHeap(),0,sizeof(EnumPt)); - ec->vtbl = &enumpt_vtbl; - ec->refCount = 1; - ec->idx= 0; - ec->container = (Contain*)This; - *ppEnum = (IEnumConnectionPoints*)ec; - - return S_OK; -} - -static HRESULT WINAPI Contain_FindConnectionPoint( - IConnectionPointContainer* This, - REFIID riid, - IConnectionPoint **ppCP) -{ - Contain *iface = (Contain*)This; - ConPt *pt; - - if (!IsEqualIID(riid, &IID_NULL) || iface->ptCount ==0) - { - pt = HeapAlloc(GetProcessHeap(),0,sizeof(ConPt)); - pt->vtbl = &point_vtbl; - pt->refCount = 1; - pt->sinkCount = 0; - pt->sink = NULL; - pt->container = iface; - pt->id = IID_IDispatch; - - if (iface->ptCount == 0) - iface->pt =HeapAlloc(GetProcessHeap(),0,sizeof(IUnknown*)); - else - iface->pt = HeapReAlloc(GetProcessHeap(),0,iface->pt,sizeof(IUnknown*)*(iface->ptCount+1)); - iface->pt[iface->ptCount] = (IConnectionPoint*)pt; - iface->ptCount++; - - *ppCP = (IConnectionPoint*)pt; - } - else - { - *ppCP = iface->pt[0]; - IUnknown_AddRef((IUnknown*)*ppCP); - } - - return S_OK; -} - -static const IConnectionPointContainerVtbl contain_vtbl = { - Contain_QueryInterface, - Contain_AddRef, - Contain_Release, - - Contain_EnumConnectionPoints, - Contain_FindConnectionPoint -}; - -static void test_IConnectionPoint(void) -{ - HRESULT rc; - ULONG ref; - IConnectionPoint *point; - Contain *container; - Disp *dispatch; - DWORD cookie = 0xffffffff; - DISPPARAMS params; - VARIANT vars[10]; - - if (!pIConnectionPoint_SimpleInvoke || !pConnectToConnectionPoint) - { - win_skip("IConnectionPoint Apis not present\n"); - return; - } - - container = HeapAlloc(GetProcessHeap(),0,sizeof(Contain)); - container->vtbl = &contain_vtbl; - container->refCount = 1; - container->ptCount = 0; - container->pt = NULL; - - dispatch = HeapAlloc(GetProcessHeap(),0,sizeof(Disp)); - dispatch->vtbl = &disp_vtbl; - dispatch->refCount = 1; - - rc = pConnectToConnectionPoint((IUnknown*)dispatch, &IID_NULL, TRUE, (IUnknown*)container, &cookie, &point); - ok(rc == S_OK, "pConnectToConnectionPoint failed with %x\n",rc); - ok(point != NULL, "returned ConnectionPoint is NULL\n"); - ok(cookie != 0xffffffff, "invalid cookie returned\n"); - - rc = pIConnectionPoint_SimpleInvoke(point,0xa0,NULL); - ok(rc == S_OK, "pConnectToConnectionPoint failed with %x\n",rc); - - if (pSHPackDispParams) - { - memset(¶ms, 0xc0, sizeof(params)); - memset(vars, 0xc0, sizeof(vars)); - rc = pSHPackDispParams(¶ms, vars, 2, VT_I4, 0xdeadbeef, VT_BSTR, 0xdeadcafe); - ok(rc == S_OK, "SHPackDispParams failed: %08x\n", rc); - - rc = pIConnectionPoint_SimpleInvoke(point,0xa1,¶ms); - ok(rc == S_OK, "pConnectToConnectionPoint failed with %x\n",rc); - } - else - win_skip("pSHPackDispParams not present\n"); - - rc = pConnectToConnectionPoint(NULL, &IID_NULL, FALSE, (IUnknown*)container, &cookie, NULL); - ok(rc == S_OK, "pConnectToConnectionPoint failed with %x\n",rc); - -/* MSDN says this should be required but it crashs on XP - IUnknown_Release(point); -*/ - ref = IUnknown_Release((IUnknown*)container); - ok(ref == 0, "leftover IConnectionPointContainer reference %i\n",ref); - ref = IUnknown_Release((IUnknown*)dispatch); - ok(ref == 0, "leftover IDispatch reference %i\n",ref); -} - -typedef struct _propbag -{ - const IPropertyBagVtbl *vtbl; - LONG refCount; - -} PropBag; - - -static HRESULT WINAPI Prop_QueryInterface( - IPropertyBag* This, - REFIID riid, - void **ppvObject) -{ - *ppvObject = NULL; - - if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IPropertyBag)) - { - *ppvObject = This; - } - - if (*ppvObject) - { - IUnknown_AddRef(This); - return S_OK; - } - - trace("no interface\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI Prop_AddRef( - IPropertyBag* This) -{ - PropBag *iface = (PropBag*)This; - return InterlockedIncrement(&iface->refCount); -} - -static ULONG WINAPI Prop_Release( - IPropertyBag* This) -{ - PropBag *iface = (PropBag*)This; - ULONG ret; - - ret = InterlockedDecrement(&iface->refCount); - if (ret == 0) - HeapFree(GetProcessHeap(),0,This); - return ret; -} - -static HRESULT WINAPI Prop_Read( - IPropertyBag* This, - LPCOLESTR pszPropName, - VARIANT *pVar, - IErrorLog *pErrorLog) -{ - V_VT(pVar) = VT_BLOB|VT_BYREF; - V_BYREF(pVar) = (LPVOID)0xdeadcafe; - return S_OK; -} - -static HRESULT WINAPI Prop_Write( - IPropertyBag* This, - LPCOLESTR pszPropName, - VARIANT *pVar) -{ - return S_OK; -} - - -static const IPropertyBagVtbl prop_vtbl = { - Prop_QueryInterface, - Prop_AddRef, - Prop_Release, - - Prop_Read, - Prop_Write -}; - -static void test_SHPropertyBag_ReadLONG(void) -{ - PropBag *pb; - HRESULT rc; - LONG out; - static const WCHAR szName1[] = {'n','a','m','e','1',0}; - - if (!pSHPropertyBag_ReadLONG) - { - win_skip("SHPropertyBag_ReadLONG not present\n"); - return; - } - - pb = HeapAlloc(GetProcessHeap(),0,sizeof(PropBag)); - pb->refCount = 1; - pb->vtbl = &prop_vtbl; - - out = 0xfeedface; - rc = pSHPropertyBag_ReadLONG(NULL, szName1, &out); - ok(rc == E_INVALIDARG || broken(rc == 0), "incorrect return %x\n",rc); - ok(out == 0xfeedface, "value should not have changed\n"); - rc = pSHPropertyBag_ReadLONG((IPropertyBag*)pb, NULL, &out); - ok(rc == E_INVALIDARG || broken(rc == 0) || broken(rc == 1), "incorrect return %x\n",rc); - ok(out == 0xfeedface, "value should not have changed\n"); - rc = pSHPropertyBag_ReadLONG((IPropertyBag*)pb, szName1, NULL); - ok(rc == E_INVALIDARG || broken(rc == 0) || broken(rc == 1), "incorrect return %x\n",rc); - ok(out == 0xfeedface, "value should not have changed\n"); - rc = pSHPropertyBag_ReadLONG((IPropertyBag*)pb, szName1, &out); - ok(rc == DISP_E_BADVARTYPE || broken(rc == 0) || broken(rc == 1), "incorrect return %x\n",rc); - ok(out == 0xfeedface || broken(out == 0xfeedfa00), "value should not have changed %x\n",out); - IUnknown_Release((IUnknown*)pb); -} - - - -static void test_SHSetWindowBits(void) -{ - HWND hwnd; - DWORD style, styleold; - WNDCLASSA clsA; - - if(!pSHSetWindowBits) - { - win_skip("SHSetWindowBits is not available\n"); - return; - } - - clsA.style = 0; - clsA.lpfnWndProc = DefWindowProcA; - clsA.cbClsExtra = 0; - clsA.cbWndExtra = 0; - clsA.hInstance = GetModuleHandleA(NULL); - clsA.hIcon = 0; - clsA.hCursor = LoadCursorA(0, IDC_ARROW); - clsA.hbrBackground = NULL; - clsA.lpszMenuName = NULL; - clsA.lpszClassName = "Shlwapi test class"; - RegisterClassA(&clsA); - - hwnd = CreateWindowA("Shlwapi test class", "Test", WS_VISIBLE, 0, 0, 100, 100, - NULL, NULL, GetModuleHandle(NULL), 0); - ok(IsWindow(hwnd), "failed to create window\n"); - - /* null window */ - SetLastError(0xdeadbeef); - style = pSHSetWindowBits(NULL, GWL_STYLE, 0, 0); - ok(style == 0, "expected 0 retval, got %d\n", style); - ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE || - broken(GetLastError() == 0xdeadbeef), /* Win9x/WinMe */ - "expected ERROR_INVALID_WINDOW_HANDLE, got %d\n", GetLastError()); - - /* zero mask, zero flags */ - styleold = GetWindowLongA(hwnd, GWL_STYLE); - style = pSHSetWindowBits(hwnd, GWL_STYLE, 0, 0); - ok(styleold == style, "expected old style\n"); - ok(styleold == GetWindowLongA(hwnd, GWL_STYLE), "expected to keep old style\n"); - - /* test mask */ - styleold = GetWindowLongA(hwnd, GWL_STYLE); - ok(styleold & WS_VISIBLE, "expected WS_VISIBLE\n"); - style = pSHSetWindowBits(hwnd, GWL_STYLE, WS_VISIBLE, 0); - - ok(style == styleold, "expected previous style, got %x\n", style); - ok((GetWindowLongA(hwnd, GWL_STYLE) & WS_VISIBLE) == 0, "expected updated style\n"); - - /* test mask, unset style bit used */ - styleold = GetWindowLongA(hwnd, GWL_STYLE); - style = pSHSetWindowBits(hwnd, GWL_STYLE, WS_VISIBLE, 0); - ok(style == styleold, "expected previous style, got %x\n", style); - ok(styleold == GetWindowLongA(hwnd, GWL_STYLE), "expected to keep old style\n"); - - /* set back with flags */ - styleold = GetWindowLongA(hwnd, GWL_STYLE); - style = pSHSetWindowBits(hwnd, GWL_STYLE, WS_VISIBLE, WS_VISIBLE); - ok(style == styleold, "expected previous style, got %x\n", style); - ok(GetWindowLongA(hwnd, GWL_STYLE) & WS_VISIBLE, "expected updated style\n"); - - /* reset and try to set without a mask */ - pSHSetWindowBits(hwnd, GWL_STYLE, WS_VISIBLE, 0); - ok((GetWindowLongA(hwnd, GWL_STYLE) & WS_VISIBLE) == 0, "expected updated style\n"); - styleold = GetWindowLongA(hwnd, GWL_STYLE); - style = pSHSetWindowBits(hwnd, GWL_STYLE, 0, WS_VISIBLE); - ok(style == styleold, "expected previous style, got %x\n", style); - ok((GetWindowLongA(hwnd, GWL_STYLE) & WS_VISIBLE) == 0, "expected updated style\n"); - - DestroyWindow(hwnd); - - UnregisterClassA("Shlwapi test class", GetModuleHandleA(NULL)); -} - -static void test_SHFormatDateTimeA(void) -{ - FILETIME UNALIGNED filetime; - CHAR buff[100], buff2[100], buff3[100]; - SYSTEMTIME st; - DWORD flags; - INT ret; - - if(!pSHFormatDateTimeA) - { - win_skip("pSHFormatDateTimeA isn't available\n"); - return; - } - -if (0) -{ - /* crashes on native */ - ret = pSHFormatDateTimeA(NULL, NULL, NULL, 0); -} - - GetLocalTime(&st); - SystemTimeToFileTime(&st, &filetime); - /* SHFormatDateTime expects input as utc */ - LocalFileTimeToFileTime(&filetime, &filetime); - - /* no way to get required buffer length here */ - SetLastError(0xdeadbeef); - ret = pSHFormatDateTimeA(&filetime, NULL, NULL, 0); - ok(ret == 0, "got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - buff[0] = 'a'; buff[1] = 0; - ret = pSHFormatDateTimeA(&filetime, NULL, buff, 0); - ok(ret == 0, "got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); - ok(buff[0] == 'a', "expected same string, got %s\n", buff); - - /* flags needs to have FDTF_NOAUTOREADINGORDER for these tests to succeed on Vista+ */ - - /* all combinations documented as invalid succeeded */ - flags = FDTF_NOAUTOREADINGORDER | FDTF_SHORTTIME | FDTF_LONGTIME; - SetLastError(0xdeadbeef); - ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); - ok(ret == lstrlenA(buff)+1, "got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); - - flags = FDTF_NOAUTOREADINGORDER | FDTF_SHORTDATE | FDTF_LONGDATE; - SetLastError(0xdeadbeef); - ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); - ok(ret == lstrlenA(buff)+1, "got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); - - flags = FDTF_SHORTDATE | FDTF_LTRDATE | FDTF_RTLDATE; - SetLastError(0xdeadbeef); - ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); - ok(ret == lstrlenA(buff)+1, "got %d\n", ret); - ok(GetLastError() == 0xdeadbeef || - broken(GetLastError() == ERROR_INVALID_FLAGS), /* Win9x/WinMe */ - "expected 0xdeadbeef, got %d\n", GetLastError()); - - /* now check returned strings */ - flags = FDTF_NOAUTOREADINGORDER | FDTF_SHORTTIME; - ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); - ok(ret == lstrlenA(buff)+1, "got %d\n", ret); - ret = GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOSECONDS, &st, NULL, buff2, sizeof(buff2)); - ok(ret == lstrlenA(buff2)+1, "got %d\n", ret); - ok(lstrcmpA(buff, buff2) == 0, "expected (%s), got (%s)\n", buff2, buff); - - flags = FDTF_NOAUTOREADINGORDER | FDTF_LONGTIME; - ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); - ok(ret == lstrlenA(buff)+1, "got %d\n", ret); - ret = GetTimeFormat(LOCALE_USER_DEFAULT, 0, &st, NULL, buff2, sizeof(buff2)); - ok(ret == lstrlenA(buff2)+1, "got %d\n", ret); - ok(lstrcmpA(buff, buff2) == 0, "expected (%s), got (%s)\n", buff2, buff); - - /* both time flags */ - flags = FDTF_NOAUTOREADINGORDER | FDTF_LONGTIME | FDTF_SHORTTIME; - ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); - ok(ret == lstrlenA(buff)+1, "got %d\n", ret); - ret = GetTimeFormat(LOCALE_USER_DEFAULT, 0, &st, NULL, buff2, sizeof(buff2)); - ok(ret == lstrlenA(buff2)+1, "got %d\n", ret); - ok(lstrcmpA(buff, buff2) == 0, "expected (%s), got (%s)\n", buff2, buff); - - flags = FDTF_NOAUTOREADINGORDER | FDTF_SHORTDATE; - ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); - ok(ret == lstrlenA(buff)+1, "got %d\n", ret); - ret = GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &st, NULL, buff2, sizeof(buff2)); - ok(ret == lstrlenA(buff2)+1, "got %d\n", ret); - ok(lstrcmpA(buff, buff2) == 0, "expected (%s), got (%s)\n", buff2, buff); - - flags = FDTF_NOAUTOREADINGORDER | FDTF_LONGDATE; - ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); - ok(ret == lstrlenA(buff)+1, "got %d\n", ret); - ret = GetDateFormat(LOCALE_USER_DEFAULT, DATE_LONGDATE, &st, NULL, buff2, sizeof(buff2)); - ok(ret == lstrlenA(buff2)+1, "got %d\n", ret); - ok(lstrcmpA(buff, buff2) == 0, "expected (%s), got (%s)\n", buff2, buff); - - /* both date flags */ - flags = FDTF_NOAUTOREADINGORDER | FDTF_LONGDATE | FDTF_SHORTDATE; - ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); - ok(ret == lstrlenA(buff)+1, "got %d\n", ret); - ret = GetDateFormat(LOCALE_USER_DEFAULT, DATE_LONGDATE, &st, NULL, buff2, sizeof(buff2)); - ok(ret == lstrlenA(buff2)+1, "got %d\n", ret); - ok(lstrcmpA(buff, buff2) == 0, "expected (%s), got (%s)\n", buff2, buff); - - /* various combinations of date/time flags */ - flags = FDTF_NOAUTOREADINGORDER | FDTF_LONGDATE | FDTF_SHORTTIME; - ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); - ok(ret == lstrlenA(buff)+1, "got %d, length %d\n", ret, lstrlenA(buff)+1); - ret = GetDateFormat(LOCALE_USER_DEFAULT, DATE_LONGDATE, &st, NULL, buff2, sizeof(buff2)); - ok(ret == lstrlenA(buff2)+1, "got %d\n", ret); - strcat(buff2, ", "); - ret = GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOSECONDS, &st, NULL, buff3, sizeof(buff3)); - ok(ret == lstrlenA(buff3)+1, "got %d\n", ret); - strcat(buff2, buff3); - ok(lstrcmpA(buff, buff2) == 0, "expected (%s), got (%s)\n", buff2, buff); - - flags = FDTF_NOAUTOREADINGORDER | FDTF_LONGDATE | FDTF_LONGTIME; - ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); - ok(ret == lstrlenA(buff)+1, "got %d\n", ret); - ret = GetDateFormat(LOCALE_USER_DEFAULT, DATE_LONGDATE, &st, NULL, buff2, sizeof(buff2)); - ok(ret == lstrlenA(buff2)+1, "got %d\n", ret); - strcat(buff2, ", "); - ret = GetTimeFormat(LOCALE_USER_DEFAULT, 0, &st, NULL, buff3, sizeof(buff3)); - ok(ret == lstrlenA(buff3)+1, "got %d\n", ret); - strcat(buff2, buff3); - ok(lstrcmpA(buff, buff2) == 0, "expected (%s), got (%s)\n", buff2, buff); - - flags = FDTF_NOAUTOREADINGORDER | FDTF_SHORTDATE | FDTF_SHORTTIME; - ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); - ok(ret == lstrlenA(buff)+1, "got %d\n", ret); - ret = GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &st, NULL, buff2, sizeof(buff2)); - ok(ret == lstrlenA(buff2)+1, "got %d\n", ret); - strcat(buff2, " "); - ret = GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOSECONDS, &st, NULL, buff3, sizeof(buff3)); - ok(ret == lstrlenA(buff3)+1, "got %d\n", ret); - strcat(buff2, buff3); - ok(lstrcmpA(buff, buff2) == 0, "expected (%s), got (%s)\n", buff2, buff); - - flags = FDTF_NOAUTOREADINGORDER | FDTF_SHORTDATE | FDTF_LONGTIME; - ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); - ok(ret == lstrlenA(buff)+1, "got %d\n", ret); - ret = GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &st, NULL, buff2, sizeof(buff2)); - ok(ret == lstrlenA(buff2)+1, "got %d\n", ret); - strcat(buff2, " "); - ret = GetTimeFormat(LOCALE_USER_DEFAULT, 0, &st, NULL, buff3, sizeof(buff3)); - ok(ret == lstrlenA(buff3)+1, "got %d\n", ret); - strcat(buff2, buff3); - ok(lstrcmpA(buff, buff2) == 0, "expected (%s), got (%s)\n", buff2, buff); -} - -static void test_SHFormatDateTimeW(void) -{ - FILETIME UNALIGNED filetime; - WCHAR buff[100], buff2[100], buff3[100]; - SYSTEMTIME st; - DWORD flags; - INT ret; - static const WCHAR spaceW[] = {' ',0}; - static const WCHAR commaW[] = {',',' ',0}; - - if(!pSHFormatDateTimeW) - { - win_skip("pSHFormatDateTimeW isn't available\n"); - return; - } - -if (0) -{ - /* crashes on native */ - ret = pSHFormatDateTimeW(NULL, NULL, NULL, 0); -} - - GetLocalTime(&st); - SystemTimeToFileTime(&st, &filetime); - /* SHFormatDateTime expects input as utc */ - LocalFileTimeToFileTime(&filetime, &filetime); - - /* no way to get required buffer length here */ - SetLastError(0xdeadbeef); - ret = pSHFormatDateTimeW(&filetime, NULL, NULL, 0); - ok(ret == 0, "got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - buff[0] = 'a'; buff[1] = 0; - ret = pSHFormatDateTimeW(&filetime, NULL, buff, 0); - ok(ret == 0, "got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); - ok(buff[0] == 'a', "expected same string\n"); - - /* all combinations documented as invalid succeeded */ - flags = FDTF_SHORTTIME | FDTF_LONGTIME; - SetLastError(0xdeadbeef); - ret = pSHFormatDateTimeW(&filetime, &flags, buff, sizeof(buff)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff)+1, "got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); - - flags = FDTF_SHORTDATE | FDTF_LONGDATE; - SetLastError(0xdeadbeef); - ret = pSHFormatDateTimeW(&filetime, &flags, buff, sizeof(buff)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff)+1, "got %d\n", ret); - ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); - - flags = FDTF_SHORTDATE | FDTF_LTRDATE | FDTF_RTLDATE; - SetLastError(0xdeadbeef); - buff[0] = 0; /* NT4 doesn't clear the buffer on failure */ - ret = pSHFormatDateTimeW(&filetime, &flags, buff, sizeof(buff)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff)+1, "got %d\n", ret); - ok(GetLastError() == 0xdeadbeef || - broken(GetLastError() == ERROR_INVALID_FLAGS), /* Win9x/WinMe/NT4 */ - "expected 0xdeadbeef, got %d\n", GetLastError()); - - /* now check returned strings */ - flags = FDTF_SHORTTIME; - ret = pSHFormatDateTimeW(&filetime, &flags, buff, sizeof(buff)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff)+1, "got %d\n", ret); - SetLastError(0xdeadbeef); - ret = GetTimeFormatW(LOCALE_USER_DEFAULT, TIME_NOSECONDS, &st, NULL, buff2, sizeof(buff2)/sizeof(WCHAR)); - if (ret == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("Needed W-functions are not implemented\n"); - return; - } - ok(ret == lstrlenW(buff2)+1, "got %d\n", ret); - ok(lstrcmpW(buff, buff2) == 0, "expected equal strings\n"); - - flags = FDTF_LONGTIME; - ret = pSHFormatDateTimeW(&filetime, &flags, buff, sizeof(buff)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff)+1, "got %d\n", ret); - ret = GetTimeFormatW(LOCALE_USER_DEFAULT, 0, &st, NULL, buff2, sizeof(buff2)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff2)+1, "got %d\n", ret); - ok(lstrcmpW(buff, buff2) == 0, "expected equal strings\n"); - - /* both time flags */ - flags = FDTF_LONGTIME | FDTF_SHORTTIME; - ret = pSHFormatDateTimeW(&filetime, &flags, buff, sizeof(buff)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff)+1, "got %d\n", ret); - ret = GetTimeFormatW(LOCALE_USER_DEFAULT, 0, &st, NULL, buff2, sizeof(buff2)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff2)+1, "got %d\n", ret); - ok(lstrcmpW(buff, buff2) == 0, "expected equal string\n"); - - flags = FDTF_SHORTDATE; - ret = pSHFormatDateTimeW(&filetime, &flags, buff, sizeof(buff)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff)+1, "got %d\n", ret); - ret = GetDateFormatW(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &st, NULL, buff2, sizeof(buff2)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff2)+1, "got %d\n", ret); - ok(lstrcmpW(buff, buff2) == 0, "expected equal strings\n"); - - flags = FDTF_LONGDATE; - ret = pSHFormatDateTimeW(&filetime, &flags, buff, sizeof(buff)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff)+1, "got %d\n", ret); - ret = GetDateFormatW(LOCALE_USER_DEFAULT, DATE_LONGDATE, &st, NULL, buff2, sizeof(buff2)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff2)+1, "got %d\n", ret); - ok(lstrcmpW(buff, buff2) == 0, "expected equal strings\n"); - - /* both date flags */ - flags = FDTF_LONGDATE | FDTF_SHORTDATE; - ret = pSHFormatDateTimeW(&filetime, &flags, buff, sizeof(buff)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff)+1, "got %d\n", ret); - ret = GetDateFormatW(LOCALE_USER_DEFAULT, DATE_LONGDATE, &st, NULL, buff2, sizeof(buff2)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff2)+1, "got %d\n", ret); - ok(lstrcmpW(buff, buff2) == 0, "expected equal strings\n"); - - /* various combinations of date/time flags */ - flags = FDTF_LONGDATE | FDTF_SHORTTIME; - ret = pSHFormatDateTimeW(&filetime, &flags, buff, sizeof(buff)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff)+1, "got %d, length %d\n", ret, lstrlenW(buff)+1); - ret = GetDateFormatW(LOCALE_USER_DEFAULT, DATE_LONGDATE, &st, NULL, buff2, sizeof(buff2)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff2)+1, "got %d\n", ret); - lstrcatW(buff2, commaW); - ret = GetTimeFormatW(LOCALE_USER_DEFAULT, TIME_NOSECONDS, &st, NULL, buff3, sizeof(buff3)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff3)+1, "got %d\n", ret); - lstrcatW(buff2, buff3); - ok(lstrcmpW(buff, buff2) == 0, "expected equal strings\n"); - - flags = FDTF_LONGDATE | FDTF_LONGTIME; - ret = pSHFormatDateTimeW(&filetime, &flags, buff, sizeof(buff)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff)+1, "got %d\n", ret); - ret = GetDateFormatW(LOCALE_USER_DEFAULT, DATE_LONGDATE, &st, NULL, buff2, sizeof(buff2)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff2)+1, "got %d\n", ret); - lstrcatW(buff2, commaW); - ret = GetTimeFormatW(LOCALE_USER_DEFAULT, 0, &st, NULL, buff3, sizeof(buff3)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff3)+1, "got %d\n", ret); - lstrcatW(buff2, buff3); - ok(lstrcmpW(buff, buff2) == 0, "expected equal strings\n"); - - flags = FDTF_SHORTDATE | FDTF_SHORTTIME; - ret = pSHFormatDateTimeW(&filetime, &flags, buff, sizeof(buff)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff)+1, "got %d\n", ret); - ret = GetDateFormatW(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &st, NULL, buff2, sizeof(buff2)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff2)+1, "got %d\n", ret); - lstrcatW(buff2, spaceW); - ret = GetTimeFormatW(LOCALE_USER_DEFAULT, TIME_NOSECONDS, &st, NULL, buff3, sizeof(buff3)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff3)+1, "got %d\n", ret); - lstrcatW(buff2, buff3); - ok(lstrcmpW(buff, buff2) == 0, "expected equal strings\n"); - - flags = FDTF_SHORTDATE | FDTF_LONGTIME; - ret = pSHFormatDateTimeW(&filetime, &flags, buff, sizeof(buff)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff)+1, "got %d\n", ret); - ret = GetDateFormatW(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &st, NULL, buff2, sizeof(buff2)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff2)+1, "got %d\n", ret); - lstrcatW(buff2, spaceW); - ret = GetTimeFormatW(LOCALE_USER_DEFAULT, 0, &st, NULL, buff3, sizeof(buff3)/sizeof(WCHAR)); - ok(ret == lstrlenW(buff3)+1, "got %d\n", ret); - lstrcatW(buff2, buff3); - ok(lstrcmpW(buff, buff2) == 0, "expected equal strings\n"); -} - -static void test_SHGetObjectCompatFlags(void) -{ - struct compat_value { - CHAR nameA[30]; - DWORD value; - }; - - struct compat_value values[] = { - { "OTNEEDSSFCACHE", 0x1 }, - { "NO_WEBVIEW", 0x2 }, - { "UNBINDABLE", 0x4 }, - { "PINDLL", 0x8 }, - { "NEEDSFILESYSANCESTOR", 0x10 }, - { "NOTAFILESYSTEM", 0x20 }, - { "CTXMENU_NOVERBS", 0x40 }, - { "CTXMENU_LIMITEDQI", 0x80 }, - { "COCREATESHELLFOLDERONLY", 0x100 }, - { "NEEDSSTORAGEANCESTOR", 0x200 }, - { "NOLEGACYWEBVIEW", 0x400 }, - { "CTXMENU_XPQCMFLAGS", 0x1000 }, - { "NOIPROPERTYSTORE", 0x2000 } - }; - - static const char compat_path[] = "Software\\Microsoft\\Windows\\CurrentVersion\\ShellCompatibility\\Objects"; - CHAR keyA[39]; /* {CLSID} */ - HKEY root; - DWORD ret; - int i; - - if (!pSHGetObjectCompatFlags) - { - win_skip("SHGetObjectCompatFlags isn't available\n"); - return; - } - - /* null args */ - ret = pSHGetObjectCompatFlags(NULL, NULL); - ok(ret == 0, "got %d\n", ret); - - ret = RegOpenKeyA(HKEY_LOCAL_MACHINE, compat_path, &root); - if (ret != ERROR_SUCCESS) - { - skip("No compatibility class data found\n"); - return; - } - - for (i = 0; RegEnumKeyA(root, i, keyA, sizeof(keyA)) == ERROR_SUCCESS; i++) - { - HKEY clsid_key; - - if (RegOpenKeyA(root, keyA, &clsid_key) == ERROR_SUCCESS) - { - CHAR valueA[30]; - DWORD expected = 0, got, length = sizeof(valueA); - CLSID clsid; - int v; - - for (v = 0; RegEnumValueA(clsid_key, v, valueA, &length, NULL, NULL, NULL, NULL) == ERROR_SUCCESS; v++) - { - int j; - - for (j = 0; j < sizeof(values)/sizeof(struct compat_value); j++) - if (lstrcmpA(values[j].nameA, valueA) == 0) - { - expected |= values[j].value; - break; - } - - length = sizeof(valueA); - } - - pGUIDFromStringA(keyA, &clsid); - got = pSHGetObjectCompatFlags(NULL, &clsid); - ok(got == expected, "got 0x%08x, expected 0x%08x. Key %s\n", got, expected, keyA); - - RegCloseKey(clsid_key); - } - } - - RegCloseKey(root); -} - -typedef struct { - const IOleCommandTargetVtbl *lpVtbl; - LONG ref; -} IOleCommandTargetImpl; - -static const IOleCommandTargetVtbl IOleCommandTargetImpl_Vtbl; - -static IOleCommandTarget* IOleCommandTargetImpl_Construct(void) -{ - IOleCommandTargetImpl *obj; - - obj = HeapAlloc(GetProcessHeap(), 0, sizeof(*obj)); - obj->lpVtbl = &IOleCommandTargetImpl_Vtbl; - obj->ref = 1; - - return (IOleCommandTarget*)obj; -} - -static HRESULT WINAPI IOleCommandTargetImpl_QueryInterface(IOleCommandTarget *iface, REFIID riid, void **ppvObj) -{ - IOleCommandTargetImpl *This = (IOleCommandTargetImpl *)iface; - - if (IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IOleCommandTarget)) - { - *ppvObj = This; - } - - if(*ppvObj) - { - IUnknown_AddRef(iface); - return S_OK; - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI IOleCommandTargetImpl_AddRef(IOleCommandTarget *iface) -{ - IOleCommandTargetImpl *This = (IOleCommandTargetImpl *)iface; - return InterlockedIncrement(&This->ref); -} - -static ULONG WINAPI IOleCommandTargetImpl_Release(IOleCommandTarget *iface) -{ - IOleCommandTargetImpl *This = (IOleCommandTargetImpl *)iface; - ULONG ref = InterlockedDecrement(&This->ref); - - if (!ref) - { - HeapFree(GetProcessHeap(), 0, This); - return 0; - } - return ref; -} - -static HRESULT WINAPI IOleCommandTargetImpl_QueryStatus( - IOleCommandTarget *iface, const GUID *group, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText) -{ - return E_NOTIMPL; -} - -static HRESULT WINAPI IOleCommandTargetImpl_Exec( - IOleCommandTarget *iface, - const GUID *CmdGroup, - DWORD nCmdID, - DWORD nCmdexecopt, - VARIANT *pvaIn, - VARIANT *pvaOut) -{ - add_call(&trace_got, 3, CmdGroup, (void*)(DWORD_PTR)nCmdID, (void*)(DWORD_PTR)nCmdexecopt, pvaIn, pvaOut); - return S_OK; -} - -static const IOleCommandTargetVtbl IOleCommandTargetImpl_Vtbl = -{ - IOleCommandTargetImpl_QueryInterface, - IOleCommandTargetImpl_AddRef, - IOleCommandTargetImpl_Release, - IOleCommandTargetImpl_QueryStatus, - IOleCommandTargetImpl_Exec -}; - -typedef struct { - const IServiceProviderVtbl *lpVtbl; - LONG ref; -} IServiceProviderImpl; - -typedef struct { - const IProfferServiceVtbl *lpVtbl; - LONG ref; -} IProfferServiceImpl; - - -static const IServiceProviderVtbl IServiceProviderImpl_Vtbl; -static const IProfferServiceVtbl IProfferServiceImpl_Vtbl; - -static IServiceProvider* IServiceProviderImpl_Construct(void) -{ - IServiceProviderImpl *obj; - - obj = HeapAlloc(GetProcessHeap(), 0, sizeof(*obj)); - obj->lpVtbl = &IServiceProviderImpl_Vtbl; - obj->ref = 1; - - return (IServiceProvider*)obj; -} - -static IProfferService* IProfferServiceImpl_Construct(void) -{ - IProfferServiceImpl *obj; - - obj = HeapAlloc(GetProcessHeap(), 0, sizeof(*obj)); - obj->lpVtbl = &IProfferServiceImpl_Vtbl; - obj->ref = 1; - - return (IProfferService*)obj; -} - -static HRESULT WINAPI IServiceProviderImpl_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppvObj) -{ - IServiceProviderImpl *This = (IServiceProviderImpl *)iface; - - if (IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IServiceProvider)) - { - *ppvObj = This; - } - - if(*ppvObj) - { - IUnknown_AddRef(iface); - /* native uses redefined IID_IServiceProvider symbol, so we can't compare pointers */ - if (IsEqualIID(riid, &IID_IServiceProvider)) - add_call(&trace_got, 1, iface, &IID_IServiceProvider, 0, 0, 0); - return S_OK; - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI IServiceProviderImpl_AddRef(IServiceProvider *iface) -{ - IServiceProviderImpl *This = (IServiceProviderImpl *)iface; - return InterlockedIncrement(&This->ref); -} - -static ULONG WINAPI IServiceProviderImpl_Release(IServiceProvider *iface) -{ - IServiceProviderImpl *This = (IServiceProviderImpl *)iface; - ULONG ref = InterlockedDecrement(&This->ref); - - if (!ref) - { - HeapFree(GetProcessHeap(), 0, This); - return 0; - } - return ref; -} - -static HRESULT WINAPI IServiceProviderImpl_QueryService( - IServiceProvider *iface, REFGUID service, REFIID riid, void **ppv) -{ - /* native uses redefined pointer for IID_IOleCommandTarget, not one from uuid.lib */ - if (IsEqualIID(riid, &IID_IOleCommandTarget)) - { - add_call(&trace_got, 2, iface, service, &IID_IOleCommandTarget, 0, 0); - *ppv = IOleCommandTargetImpl_Construct(); - } - if (IsEqualIID(riid, &IID_IProfferService)) - { - if (IsEqualIID(service, &IID_IProfferService)) - add_call(&trace_got, 2, &IID_IProfferService, &IID_IProfferService, 0, 0, 0); - *ppv = IProfferServiceImpl_Construct(); - } - return S_OK; -} - -static const IServiceProviderVtbl IServiceProviderImpl_Vtbl = -{ - IServiceProviderImpl_QueryInterface, - IServiceProviderImpl_AddRef, - IServiceProviderImpl_Release, - IServiceProviderImpl_QueryService -}; - -static void test_IUnknown_QueryServiceExec(void) -{ - IServiceProvider *provider = IServiceProviderImpl_Construct(); - static const GUID dummy_serviceid = { 0xdeadbeef }; - static const GUID dummy_groupid = { 0xbeefbeef }; - call_trace_t trace_expected; - HRESULT hr; - - /* on <=W2K platforms same ordinal used for another export with different - prototype, so skipping using this indirect condition */ - if (is_win2k_and_lower) - { - win_skip("IUnknown_QueryServiceExec is not available\n"); - return; - } - - /* null source pointer */ - hr = pIUnknown_QueryServiceExec(NULL, &dummy_serviceid, &dummy_groupid, 0, 0, 0, 0); - ok(hr == E_FAIL, "got 0x%08x\n", hr); - - /* expected trace: - IUnknown_QueryServiceExec( ptr1, serviceid, groupid, arg1, arg2, arg3, arg4); - -> IUnknown_QueryInterface( ptr1, &IID_IServiceProvider, &prov ); - -> IServiceProvider_QueryService( prov, serviceid, &IID_IOleCommandTarget, &obj ); - -> IOleCommandTarget_Exec( obj, groupid, arg1, arg2, arg3, arg4 ); - */ - init_call_trace(&trace_expected); - - add_call(&trace_expected, 1, provider, &IID_IServiceProvider, 0, 0, 0); - add_call(&trace_expected, 2, provider, &dummy_serviceid, &IID_IOleCommandTarget, 0, 0); - add_call(&trace_expected, 3, &dummy_groupid, (void*)0x1, (void*)0x2, (void*)0x3, (void*)0x4); - - init_call_trace(&trace_got); - hr = pIUnknown_QueryServiceExec((IUnknown*)provider, &dummy_serviceid, &dummy_groupid, 0x1, 0x2, (void*)0x3, (void*)0x4); - ok(hr == S_OK, "got 0x%08x\n", hr); - - ok_trace(&trace_expected, &trace_got); - - free_call_trace(&trace_expected); - free_call_trace(&trace_got); - - IServiceProvider_Release(provider); -} - - -static HRESULT WINAPI IProfferServiceImpl_QueryInterface(IProfferService *iface, REFIID riid, void **ppvObj) -{ - IProfferServiceImpl *This = (IProfferServiceImpl *)iface; - - if (IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IProfferService)) - { - *ppvObj = This; - } - else if (IsEqualIID(riid, &IID_IServiceProvider)) - { - *ppvObj = IServiceProviderImpl_Construct(); - add_call(&trace_got, 1, iface, &IID_IServiceProvider, 0, 0, 0); - return S_OK; - } - - if(*ppvObj) - { - IUnknown_AddRef(iface); - return S_OK; - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI IProfferServiceImpl_AddRef(IProfferService *iface) -{ - IProfferServiceImpl *This = (IProfferServiceImpl *)iface; - return InterlockedIncrement(&This->ref); -} - -static ULONG WINAPI IProfferServiceImpl_Release(IProfferService *iface) -{ - IProfferServiceImpl *This = (IProfferServiceImpl *)iface; - ULONG ref = InterlockedDecrement(&This->ref); - - if (!ref) - { - HeapFree(GetProcessHeap(), 0, This); - return 0; - } - return ref; -} - -static HRESULT WINAPI IProfferServiceImpl_ProfferService(IProfferService *iface, - REFGUID service, IServiceProvider *pService, DWORD *pCookie) -{ - add_call(&trace_got, 3, service, pService, pCookie, 0, 0); - return S_OK; -} - -static HRESULT WINAPI IProfferServiceImpl_RevokeService(IProfferService *iface, DWORD cookie) -{ - add_call(&trace_got, 4, (void*)(DWORD_PTR)cookie, 0, 0, 0, 0); - return S_OK; -} - -static const IProfferServiceVtbl IProfferServiceImpl_Vtbl = -{ - IProfferServiceImpl_QueryInterface, - IProfferServiceImpl_AddRef, - IProfferServiceImpl_Release, - IProfferServiceImpl_ProfferService, - IProfferServiceImpl_RevokeService -}; - -static void test_IUnknown_ProfferService(void) -{ - IServiceProvider *provider = IServiceProviderImpl_Construct(); - IProfferService *proff = IProfferServiceImpl_Construct(); - static const GUID dummy_serviceid = { 0xdeadbeef }; - call_trace_t trace_expected; - HRESULT hr; - DWORD cookie; - - /* on <=W2K platforms same ordinal used for another export with different - prototype, so skipping using this indirect condition */ - if (is_win2k_and_lower) - { - win_skip("IUnknown_ProfferService is not available\n"); - return; - } - - /* null source pointer */ - hr = pIUnknown_ProfferService(NULL, &dummy_serviceid, 0, 0); - ok(hr == E_FAIL, "got 0x%08x\n", hr); - - /* expected trace: - IUnknown_ProfferService( ptr1, serviceid, arg1, arg2); - -> IUnknown_QueryInterface( ptr1, &IID_IServiceProvider, &provider ); - -> IServiceProvider_QueryService( provider, &IID_IProfferService, &IID_IProfferService, &proffer ); - - if (service pointer not null): - -> IProfferService_ProfferService( proffer, serviceid, arg1, arg2 ); - else - -> IProfferService_RevokeService( proffer, *arg2 ); - */ - init_call_trace(&trace_expected); - - add_call(&trace_expected, 1, proff, &IID_IServiceProvider, 0, 0, 0); - add_call(&trace_expected, 2, &IID_IProfferService, &IID_IProfferService, 0, 0, 0); - add_call(&trace_expected, 3, &dummy_serviceid, provider, &cookie, 0, 0); - - init_call_trace(&trace_got); - hr = pIUnknown_ProfferService((IUnknown*)proff, &dummy_serviceid, provider, &cookie); - ok(hr == S_OK, "got 0x%08x\n", hr); - - ok_trace(&trace_expected, &trace_got); - free_call_trace(&trace_got); - free_call_trace(&trace_expected); - - /* same with ::Revoke path */ - init_call_trace(&trace_expected); - - add_call(&trace_expected, 1, proff, &IID_IServiceProvider, 0, 0, 0); - add_call(&trace_expected, 2, &IID_IProfferService, &IID_IProfferService, 0, 0, 0); - add_call(&trace_expected, 4, (void*)(DWORD_PTR)cookie, 0, 0, 0, 0); - - init_call_trace(&trace_got); - hr = pIUnknown_ProfferService((IUnknown*)proff, &dummy_serviceid, 0, &cookie); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok_trace(&trace_expected, &trace_got); - free_call_trace(&trace_got); - free_call_trace(&trace_expected); - - IServiceProvider_Release(provider); - IProfferService_Release(proff); -} - -static void test_SHCreateWorkerWindowA(void) -{ - WNDCLASSA cliA; - char classA[20]; - HWND hwnd; - LONG_PTR ret; - BOOL res; - - if (is_win2k_and_lower) - { - win_skip("SHCreateWorkerWindowA not available\n"); - return; - } - - hwnd = pSHCreateWorkerWindowA(0, NULL, 0, 0, 0, 0); - ok(hwnd != 0, "expected window\n"); - - GetClassName(hwnd, classA, 20); - ok(lstrcmpA(classA, "WorkerA") == 0, "expected WorkerA class, got %s\n", classA); - - ret = GetWindowLongPtrA(hwnd, 0); - ok(ret == 0, "got %ld\n", ret); - - /* class info */ - memset(&cliA, 0, sizeof(cliA)); - res = GetClassInfoA(GetModuleHandle("shlwapi.dll"), "WorkerA", &cliA); - ok(res, "failed to get class info\n"); - ok(cliA.style == 0, "got 0x%08x\n", cliA.style); - ok(cliA.cbClsExtra == 0, "got %d\n", cliA.cbClsExtra); - ok(cliA.cbWndExtra == sizeof(LONG_PTR), "got %d\n", cliA.cbWndExtra); - ok(cliA.lpszMenuName == 0, "got %s\n", cliA.lpszMenuName); - - DestroyWindow(hwnd); - - /* set extra bytes */ - hwnd = pSHCreateWorkerWindowA(0, NULL, 0, 0, 0, 0xdeadbeef); - ok(hwnd != 0, "expected window\n"); - - GetClassName(hwnd, classA, 20); - ok(lstrcmpA(classA, "WorkerA") == 0, "expected WorkerA class, got %s\n", classA); - - ret = GetWindowLongPtrA(hwnd, 0); - ok(ret == 0xdeadbeef, "got %ld\n", ret); - - /* test exstyle */ - ret = GetWindowLongA(hwnd, GWL_EXSTYLE); - ok(ret == WS_EX_WINDOWEDGE, "0x%08lx\n", ret); - - DestroyWindow(hwnd); - - hwnd = pSHCreateWorkerWindowA(0, NULL, WS_EX_TOOLWINDOW, 0, 0, 0); - ret = GetWindowLongA(hwnd, GWL_EXSTYLE); - ok(ret == (WS_EX_WINDOWEDGE|WS_EX_TOOLWINDOW), "0x%08lx\n", ret); - DestroyWindow(hwnd); -} - -static void init_pointers(void) -{ -#define MAKEFUNC(f, ord) (p##f = (void*)GetProcAddress(hShlwapi, (LPSTR)(ord))) - MAKEFUNC(SHAllocShared, 7); - MAKEFUNC(SHLockShared, 8); - MAKEFUNC(SHUnlockShared, 9); - MAKEFUNC(SHFreeShared, 10); - MAKEFUNC(GetAcceptLanguagesA, 14); - MAKEFUNC(SHSetWindowBits, 165); - MAKEFUNC(ConnectToConnectionPoint, 168); - MAKEFUNC(SHSearchMapInt, 198); - MAKEFUNC(SHCreateWorkerWindowA, 257); - MAKEFUNC(GUIDFromStringA, 269); - MAKEFUNC(SHPackDispParams, 282); - MAKEFUNC(IConnectionPoint_InvokeWithCancel, 283); - MAKEFUNC(IConnectionPoint_SimpleInvoke, 284); - MAKEFUNC(SHFormatDateTimeA, 353); - MAKEFUNC(SHFormatDateTimeW, 354); - MAKEFUNC(SHGetObjectCompatFlags, 476); - MAKEFUNC(IUnknown_QueryServiceExec, 484); - MAKEFUNC(SHPropertyBag_ReadLONG, 496); - MAKEFUNC(IUnknown_ProfferService, 514); -#undef MAKEFUNC -} - -START_TEST(ordinal) -{ - hShlwapi = GetModuleHandleA("shlwapi.dll"); - is_win2k_and_lower = GetProcAddress(hShlwapi, "StrChrNW") == 0; - - init_pointers(); - - hmlang = LoadLibraryA("mlang.dll"); - pLcidToRfc1766A = (void *)GetProcAddress(hmlang, "LcidToRfc1766A"); - - test_GetAcceptLanguagesA(); - test_SHSearchMapInt(); - test_alloc_shared(); - test_fdsa(); - test_GetShellSecurityDescriptor(); - test_SHPackDispParams(); - test_IConnectionPoint(); - test_SHPropertyBag_ReadLONG(); - test_SHSetWindowBits(); - test_SHFormatDateTimeA(); - test_SHFormatDateTimeW(); - test_SHGetObjectCompatFlags(); - test_IUnknown_QueryServiceExec(); - test_IUnknown_ProfferService(); - test_SHCreateWorkerWindowA(); -} diff --git a/rostests/winetests/shlwapi/path.c b/rostests/winetests/shlwapi/path.c deleted file mode 100755 index 3e83a4556c6..00000000000 --- a/rostests/winetests/shlwapi/path.c +++ /dev/null @@ -1,1392 +0,0 @@ -/* Unit test suite for Path functions - * - * Copyright 2002 Matthew Mastracci - * - * 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 "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "shlwapi.h" -#include "wininet.h" - -static HRESULT (WINAPI *pPathIsValidCharA)(char,DWORD); -static HRESULT (WINAPI *pPathIsValidCharW)(WCHAR,DWORD); -static LPWSTR (WINAPI *pPathCombineW)(LPWSTR, LPCWSTR, LPCWSTR); -static HRESULT (WINAPI *pPathCreateFromUrlA)(LPCSTR, LPSTR, LPDWORD, DWORD); -static HRESULT (WINAPI *pPathCreateFromUrlW)(LPCWSTR, LPWSTR, LPDWORD, DWORD); -static BOOL (WINAPI *pPathAppendA)(LPSTR, LPCSTR); - -/* ################ */ - -struct { - const char *url; - const char *path; - DWORD ret; -} TEST_PATHFROMURL[] = { - {"file:///c:/foo/ba%5Cr", "c:\\foo\\ba\\r", S_OK}, - {"file:///c:/foo/../ba%5Cr", "c:\\foo\\..\\ba\\r", S_OK}, - {"file:///host/c:/foo/bar", "\\host\\c:\\foo\\bar", S_OK}, - {"file://host/c:/foo/bar", "\\\\hostc:\\foo\\bar", S_OK}, - {"file://host/c:/foo/bar", "\\\\hostc:\\foo\\bar", S_OK}, - {"file:\\\\host\\c:\\foo\\bar", "\\\\hostc:\\foo\\bar", S_OK}, - {"file:\\\\host\\ca\\foo\\bar", "\\\\host\\ca\\foo\\bar", S_OK}, - {"file:\\\\host\\c|\\foo\\bar", "\\\\hostc|\\foo\\bar", S_OK}, - {"file:\\%5Chost\\c:\\foo\\bar", "\\\\host\\c:\\foo\\bar", S_OK}, - {"file:\\\\host\\cx:\\foo\\bar", "\\\\host\\cx:\\foo\\bar", S_OK}, - {"file://c:/foo/bar", "c:\\foo\\bar", S_OK}, - {"file://c:/d:/foo/bar", "c:\\d:\\foo\\bar", S_OK}, - {"file://c|/d|/foo/bar", "c:\\d|\\foo\\bar", S_OK}, - {"file://host/foo/bar", "\\\\host\\foo\\bar", S_OK}, - {"file:/foo/bar", "\\foo\\bar", S_OK}, - {"file:/foo/bar/", "\\foo\\bar\\", S_OK}, - {"file:foo/bar", "foo\\bar", S_OK}, - {"file:c:/foo/bar", "c:\\foo\\bar", S_OK}, - {"file:c|/foo/bar", "c:\\foo\\bar", S_OK}, - {"file:cx|/foo/bar", "cx|\\foo\\bar", S_OK}, - {"file:////c:/foo/bar", "c:\\foo\\bar", S_OK}, -/* {"file:////c:/foo/foo%20bar", "c:\\foo\\foo%20bar", S_OK},*/ - - {"c:\\foo\\bar", NULL, E_INVALIDARG}, - {"foo/bar", NULL, E_INVALIDARG}, - {"http://foo/bar", NULL, E_INVALIDARG}, - -}; - - -static struct { - const char *path; - BOOL expect; -} TEST_PATH_IS_URL[] = { - {"http://foo/bar", TRUE}, - {"c:\\foo\\bar", FALSE}, - {"c:/foo/bar", FALSE}, - {"foo://foo/bar", TRUE}, - {"foo\\bar", FALSE}, - {"foo.bar", FALSE}, - {"bogusscheme:", TRUE}, - {"http:partial", TRUE}, - {"www.winehq.org", FALSE}, - /* More examples that the user might enter as the browser start page */ - {"winehq.org", FALSE}, - {"ftp.winehq.org", FALSE}, - {"http://winehq.org", TRUE}, - {"http://www.winehq.org", TRUE}, - {"https://winehq.org", TRUE}, - {"https://www.winehq.org", TRUE}, - {"ftp://winehq.org", TRUE}, - {"ftp://ftp.winehq.org", TRUE}, - {"file://does_not_exist.txt", TRUE}, - {"about:blank", TRUE}, - {"about:home", TRUE}, - {"about:mozilla", TRUE}, - /* scheme is case independent */ - {"HTTP://www.winehq.org", TRUE}, - /* a space at the start is not allowed */ - {" http://www.winehq.org", FALSE}, - {"", FALSE}, - {NULL, FALSE} -}; - -struct { - const char *path; - const char *result; -} TEST_PATH_UNQUOTE_SPACES[] = { - { "abcdef", "abcdef" }, - { "\"abcdef\"", "abcdef" }, - { "\"abcdef", "\"abcdef" }, - { "abcdef\"", "abcdef\"" }, - { "\"\"abcdef\"\"", "\"abcdef\"" }, - { "abc\"def", "abc\"def" }, - { "\"abc\"def", "\"abc\"def" }, - { "\"abc\"def\"", "abc\"def" }, - { "\'abcdef\'", "\'abcdef\'" }, - { "\"\"", "" }, - { "\"", "" } -}; - -/* ################ */ - -static LPWSTR GetWideString(const char* szString) -{ - LPWSTR wszString = HeapAlloc(GetProcessHeap(), 0, (2*INTERNET_MAX_URL_LENGTH) * sizeof(WCHAR)); - - MultiByteToWideChar(0, 0, szString, -1, wszString, INTERNET_MAX_URL_LENGTH); - - return wszString; -} - -static void FreeWideString(LPWSTR wszString) -{ - HeapFree(GetProcessHeap(), 0, wszString); -} - -static LPSTR strdupA(LPCSTR p) -{ - LPSTR ret; - DWORD len = (strlen(p) + 1); - ret = HeapAlloc(GetProcessHeap(), 0, len); - memcpy(ret, p, len); - return ret; -} - -/* ################ */ - -static void test_PathSearchAndQualify(void) -{ - WCHAR path1[] = {'c',':','\\','f','o','o',0}; - WCHAR expect1[] = {'c',':','\\','f','o','o',0}; - WCHAR path2[] = {'c',':','f','o','o',0}; - WCHAR c_drive[] = {'c',':',0}; - WCHAR foo[] = {'f','o','o',0}; - WCHAR path3[] = {'\\','f','o','o',0}; - WCHAR winini[] = {'w','i','n','.','i','n','i',0}; - WCHAR out[MAX_PATH]; - WCHAR cur_dir[MAX_PATH]; - WCHAR dot[] = {'.',0}; - - /* c:\foo */ - ok(PathSearchAndQualifyW(path1, out, MAX_PATH) != 0, - "PathSearchAndQualify rets 0\n"); - ok(!lstrcmpiW(out, expect1), "strings don't match\n"); - - /* c:foo */ - ok(PathSearchAndQualifyW(path2, out, MAX_PATH) != 0, - "PathSearchAndQualify rets 0\n"); - GetFullPathNameW(c_drive, MAX_PATH, cur_dir, NULL); - PathAddBackslashW(cur_dir); - lstrcatW(cur_dir, foo); - ok(!lstrcmpiW(out, cur_dir), "strings don't match\n"); - - /* foo */ - ok(PathSearchAndQualifyW(foo, out, MAX_PATH) != 0, - "PathSearchAndQualify rets 0\n"); - GetFullPathNameW(dot, MAX_PATH, cur_dir, NULL); - PathAddBackslashW(cur_dir); - lstrcatW(cur_dir, foo); - ok(!lstrcmpiW(out, cur_dir), "strings don't match\n"); - - /* \foo */ - ok(PathSearchAndQualifyW(path3, out, MAX_PATH) != 0, - "PathSearchAndQualify rets 0\n"); - GetFullPathNameW(dot, MAX_PATH, cur_dir, NULL); - lstrcpyW(cur_dir + 2, path3); - ok(!lstrcmpiW(out, cur_dir), "strings don't match\n"); - - /* win.ini */ - ok(PathSearchAndQualifyW(winini, out, MAX_PATH) != 0, - "PathSearchAndQualify rets 0\n"); - if(!SearchPathW(NULL, winini, NULL, MAX_PATH, cur_dir, NULL)) - GetFullPathNameW(winini, MAX_PATH, cur_dir, NULL); - ok(!lstrcmpiW(out, cur_dir), "strings don't match\n"); - -} - -static void test_PathCreateFromUrl(void) -{ - size_t i; - char ret_path[INTERNET_MAX_URL_LENGTH]; - DWORD len, ret; - WCHAR ret_pathW[INTERNET_MAX_URL_LENGTH]; - WCHAR *pathW, *urlW; - static const char url[] = "http://www.winehq.org"; - - if (!pPathCreateFromUrlA) { - win_skip("PathCreateFromUrlA not found\n"); - return; - } - - /* Check ret_path = NULL */ - len = sizeof(url); - ret = pPathCreateFromUrlA(url, NULL, &len, 0); - ok ( ret == E_INVALIDARG, "got 0x%08x expected E_INVALIDARG\n", ret); - - for(i = 0; i < sizeof(TEST_PATHFROMURL) / sizeof(TEST_PATHFROMURL[0]); i++) { - len = INTERNET_MAX_URL_LENGTH; - ret = pPathCreateFromUrlA(TEST_PATHFROMURL[i].url, ret_path, &len, 0); - ok(ret == TEST_PATHFROMURL[i].ret, "ret %08x from url %s\n", ret, TEST_PATHFROMURL[i].url); - if(TEST_PATHFROMURL[i].path) { - ok(!lstrcmpi(ret_path, TEST_PATHFROMURL[i].path), "got %s expected %s from url %s\n", ret_path, TEST_PATHFROMURL[i].path, TEST_PATHFROMURL[i].url); - ok(len == strlen(ret_path), "ret len %d from url %s\n", len, TEST_PATHFROMURL[i].url); - } - if (pPathCreateFromUrlW) { - len = INTERNET_MAX_URL_LENGTH; - pathW = GetWideString(TEST_PATHFROMURL[i].path); - urlW = GetWideString(TEST_PATHFROMURL[i].url); - ret = pPathCreateFromUrlW(urlW, ret_pathW, &len, 0); - WideCharToMultiByte(CP_ACP, 0, ret_pathW, -1, ret_path, sizeof(ret_path),0,0); - ok(ret == TEST_PATHFROMURL[i].ret, "ret %08x from url L\"%s\"\n", ret, TEST_PATHFROMURL[i].url); - if(TEST_PATHFROMURL[i].path) { - ok(!lstrcmpiW(ret_pathW, pathW), "got %s expected %s from url L\"%s\"\n", - ret_path, TEST_PATHFROMURL[i].path, TEST_PATHFROMURL[i].url); - ok(len == lstrlenW(ret_pathW), "ret len %d from url L\"%s\"\n", len, TEST_PATHFROMURL[i].url); - } - FreeWideString(urlW); - FreeWideString(pathW); - } - } -} - - -static void test_PathIsUrl(void) -{ - size_t i; - BOOL ret; - - for(i = 0; i < sizeof(TEST_PATH_IS_URL)/sizeof(TEST_PATH_IS_URL[0]); i++) { - ret = PathIsURLA(TEST_PATH_IS_URL[i].path); - ok(ret == TEST_PATH_IS_URL[i].expect, - "returned %d from path %s, expected %d\n", ret, TEST_PATH_IS_URL[i].path, - TEST_PATH_IS_URL[i].expect); - } -} - -static const DWORD SHELL_charclass[] = -{ - 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000080, 0x00000100, 0x00000200, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000002, 0x00000100, - 0x00000040, 0x00000100, 0x00000004, 0x00000000, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0x00000100, 0x00000010, 0x00000020, - 0x00000000, 0x00000100, 0x00000000, 0x00000001, - 0x00000100, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0x00000100, - 0x00000008, 0x00000100, 0x00000100, 0x00000100, - 0x00000100, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffffffff, 0x00000100, - 0x00000000, 0x00000100, 0x00000100 -}; - -static void test_PathIsValidCharA(void) -{ - BOOL ret; - unsigned int c; - - /* For whatever reason, PathIsValidCharA and PathAppendA share the same - * ordinal number in some native versions. Check this to prevent a crash. - */ - if (!pPathIsValidCharA || pPathIsValidCharA == (void*)pPathAppendA) - { - win_skip("PathIsValidCharA isn't available\n"); - return; - } - - for (c = 0; c < 0x7f; c++) - { - ret = pPathIsValidCharA( c, ~0U ); - ok ( ret || !SHELL_charclass[c], "PathIsValidCharA failed: 0x%02x got 0x%08x\n", c, ret ); - } - - for (c = 0x7f; c <= 0xff; c++) - { - ret = pPathIsValidCharA( c, ~0U ); - ok ( ret, "PathIsValidCharA failed: 0x%02x got 0x%08x\n", c, ret ); - } -} - -static void test_PathIsValidCharW(void) -{ - BOOL ret; - unsigned int c; - - if (!pPathIsValidCharW) - { - win_skip("PathIsValidCharW isn't available\n"); - return; - } - - for (c = 0; c < 0x7f; c++) - { - ret = pPathIsValidCharW( c, ~0U ); - ok ( ret || !SHELL_charclass[c], "PathIsValidCharW failed: 0x%02x got 0x%08x\n", c, ret ); - } - - for (c = 0x007f; c <= 0xffff; c++) - { - ret = pPathIsValidCharW( c, ~0U ); - ok ( ret, "PathIsValidCharW failed: 0x%02x got 0x%08x\n", c, ret ); - } -} - -static void test_PathMakePretty(void) -{ - char buff[MAX_PATH]; - - ok (PathMakePrettyA(NULL) == FALSE, "PathMakePretty: NULL path succeeded\n"); - buff[0] = '\0'; - ok (PathMakePrettyA(buff) == TRUE, "PathMakePretty: Empty path failed\n"); - - strcpy(buff, "C:\\A LONG FILE NAME WITH \\SPACES.TXT"); - ok (PathMakePrettyA(buff) == TRUE, "PathMakePretty: Long UC name failed\n"); - ok (strcmp(buff, "C:\\a long file name with \\spaces.txt") == 0, - "PathMakePretty: Long UC name not changed\n"); - - strcpy(buff, "C:\\A LONG FILE NAME WITH \\MixedCase.TXT"); - ok (PathMakePrettyA(buff) == FALSE, "PathMakePretty: Long MC name succeeded\n"); - ok (strcmp(buff, "C:\\A LONG FILE NAME WITH \\MixedCase.TXT") == 0, - "PathMakePretty: Failed but modified path\n"); - - strcpy(buff, "TEST"); - ok (PathMakePrettyA(buff) == TRUE, "PathMakePretty: Short name failed\n"); - ok (strcmp(buff, "Test") == 0, "PathMakePretty: 1st char lowercased %s\n", buff); -} - -static void test_PathMatchSpec(void) -{ - static const char file[] = "c:\\foo\\bar\\filename.ext"; - static const char spec1[] = ".ext"; - static const char spec2[] = "*.ext"; - static const char spec3[] = "*.ext "; - static const char spec4[] = " *.ext"; - static const char spec5[] = "* .ext"; - static const char spec6[] = "*. ext"; - static const char spec7[] = "* . ext"; - static const char spec8[] = "*.e?t"; - static const char spec9[] = "filename.ext"; - static const char spec10[] = "*bar\\filename.ext"; - static const char spec11[] = " foo; *.ext"; - static const char spec12[] = "*.ext;*.bar"; - static const char spec13[] = "*bar*"; - - ok (PathMatchSpecA(file, spec1) == FALSE, "PathMatchSpec: Spec1 failed\n"); - ok (PathMatchSpecA(file, spec2) == TRUE, "PathMatchSpec: Spec2 failed\n"); - ok (PathMatchSpecA(file, spec3) == FALSE, "PathMatchSpec: Spec3 failed\n"); - ok (PathMatchSpecA(file, spec4) == TRUE, "PathMatchSpec: Spec4 failed\n"); - todo_wine ok (PathMatchSpecA(file, spec5) == TRUE, "PathMatchSpec: Spec5 failed\n"); - todo_wine ok (PathMatchSpecA(file, spec6) == TRUE, "PathMatchSpec: Spec6 failed\n"); - ok (PathMatchSpecA(file, spec7) == FALSE, "PathMatchSpec: Spec7 failed\n"); - ok (PathMatchSpecA(file, spec8) == TRUE, "PathMatchSpec: Spec8 failed\n"); - ok (PathMatchSpecA(file, spec9) == FALSE, "PathMatchSpec: Spec9 failed\n"); - ok (PathMatchSpecA(file, spec10) == TRUE, "PathMatchSpec: Spec10 failed\n"); - ok (PathMatchSpecA(file, spec11) == TRUE, "PathMatchSpec: Spec11 failed\n"); - ok (PathMatchSpecA(file, spec12) == TRUE, "PathMatchSpec: Spec12 failed\n"); - ok (PathMatchSpecA(file, spec13) == TRUE, "PathMatchSpec: Spec13 failed\n"); -} - -static void test_PathCombineW(void) -{ - LPWSTR wszString, wszString2; - WCHAR wbuf[MAX_PATH+1], wstr1[MAX_PATH] = {'C',':','\\',0}, wstr2[MAX_PATH]; - static const WCHAR expout[] = {'C',':','\\','A','A',0}; - int i; - - if (!pPathCombineW) - { - win_skip("PathCombineW isn't available\n"); - return; - } - - wszString2 = HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(WCHAR)); - - /* NULL test */ - wszString = pPathCombineW(NULL, NULL, NULL); - ok (wszString == NULL, "Expected a NULL return\n"); - - /* Some NULL */ - wszString2[0] = 'a'; - wszString = pPathCombineW(wszString2, NULL, NULL); - ok (wszString == NULL || - broken(wszString[0] == 'a'), /* Win95 and some W2K */ - "Expected a NULL return\n"); - ok (wszString2[0] == 0 || - broken(wszString2[0] == 'a'), /* Win95 and some W2K */ - "Destination string not empty\n"); - - HeapFree(GetProcessHeap(), 0, wszString2); - - /* overflow test */ - wstr2[0] = wstr2[1] = wstr2[2] = 'A'; - for (i=3; i - - - - . - - assoc.c - clist.c - clsid.c - generated.c - istream.c - ordinal.c - path.c - shreg.c - string.c - url.c - testlist.c - thread.c - wine - uuid - shlwapi - advapi32 - ole32 - oleaut32 - user32 - ntdll - - diff --git a/rostests/winetests/shlwapi/shreg.c b/rostests/winetests/shlwapi/shreg.c deleted file mode 100755 index 5fb3dacf14f..00000000000 --- a/rostests/winetests/shlwapi/shreg.c +++ /dev/null @@ -1,465 +0,0 @@ -/* Unit test suite for SHReg* functions - * - * Copyright 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 "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "winreg.h" -#include "winuser.h" -#include "shlwapi.h" - -/* Keys used for testing */ -#define REG_TEST_KEY "Software\\Wine\\Test" -#define REG_CURRENT_VERSION "Software\\Microsoft\\Windows\\CurrentVersion\\explorer" - -static HMODULE hshlwapi; -typedef DWORD (WINAPI *SHCopyKeyA_func)(HKEY,LPCSTR,HKEY,DWORD); -static SHCopyKeyA_func pSHCopyKeyA; -typedef DWORD (WINAPI *SHRegGetPathA_func)(HKEY,LPCSTR,LPCSTR,LPSTR,DWORD); -static SHRegGetPathA_func pSHRegGetPathA; -typedef LSTATUS (WINAPI *SHRegGetValueA_func)(HKEY,LPCSTR,LPCSTR,SRRF,LPDWORD,LPVOID,LPDWORD); -static SHRegGetValueA_func pSHRegGetValueA; - -static char sTestpath1[] = "%LONGSYSTEMVAR%\\subdir1"; -static char sTestpath2[] = "%FOO%\\subdir1"; - -static const char * sEnvvar1 = "bar"; -static const char * sEnvvar2 = "ImARatherLongButIndeedNeededString"; - -static char sExpTestpath1[MAX_PATH]; -static char sExpTestpath2[MAX_PATH]; -static DWORD nExpLen1; -static DWORD nExpLen2; - -static const char * sEmptyBuffer ="0123456789"; - -/* delete key and all its subkeys */ -static DWORD delete_key( HKEY hkey, LPCSTR parent, LPCSTR keyname ) -{ - HKEY parentKey; - DWORD ret; - - RegCloseKey(hkey); - - /* open the parent of the key to close */ - ret = RegOpenKeyExA( HKEY_CURRENT_USER, parent, 0, KEY_ALL_ACCESS, &parentKey); - if (ret != ERROR_SUCCESS) - return ret; - - ret = SHDeleteKeyA( parentKey, keyname ); - RegCloseKey(parentKey); - - return ret; -} - -static HKEY create_test_entries(void) -{ - HKEY hKey; - DWORD ret; - DWORD nExpectedLen1, nExpectedLen2; - - SetEnvironmentVariableA("LONGSYSTEMVAR", sEnvvar1); - SetEnvironmentVariableA("FOO", sEnvvar2); - - ret = RegCreateKeyA(HKEY_CURRENT_USER, REG_TEST_KEY, &hKey); - ok( ERROR_SUCCESS == ret, "RegCreateKeyA failed, ret=%u\n", ret); - - if (hKey) - { - ok(!RegSetValueExA(hKey,"Test1",0,REG_EXPAND_SZ, (LPBYTE) sTestpath1, strlen(sTestpath1)+1), "RegSetValueExA failed\n"); - ok(!RegSetValueExA(hKey,"Test2",0,REG_SZ, (LPBYTE) sTestpath1, strlen(sTestpath1)+1), "RegSetValueExA failed\n"); - ok(!RegSetValueExA(hKey,"Test3",0,REG_EXPAND_SZ, (LPBYTE) sTestpath2, strlen(sTestpath2)+1), "RegSetValueExA failed\n"); - } - - nExpLen1 = ExpandEnvironmentStringsA(sTestpath1, sExpTestpath1, sizeof(sExpTestpath1)); - nExpLen2 = ExpandEnvironmentStringsA(sTestpath2, sExpTestpath2, sizeof(sExpTestpath2)); - - nExpectedLen1 = strlen(sTestpath1) - strlen("%LONGSYSTEMVAR%") + strlen(sEnvvar1) + 1; - nExpectedLen2 = strlen(sTestpath2) - strlen("%FOO%") + strlen(sEnvvar2) + 1; - /* ExpandEnvironmentStringsA on NT4 returns 2x the correct result */ - trace("sExplen1 = (%d)\n", nExpLen1); - if (nExpectedLen1 != nExpLen1) - trace( "Expanding %s failed (expected %d) - known bug in NT4\n", sTestpath1, nExpectedLen1 ); - - trace("sExplen2 = (%d)\n", nExpLen2); - if (nExpectedLen2 != nExpLen2) - trace( "Expanding %s failed (expected %d) - known bug in NT4\n", sTestpath2, nExpectedLen2 ); - - /* Make sure we carry on with correct values */ - nExpLen1 = nExpectedLen1; - nExpLen2 = nExpectedLen2; - return hKey; -} - -static void test_SHGetValue(void) -{ - DWORD dwSize; - DWORD dwType; - DWORD dwRet; - char buf[MAX_PATH]; - - strcpy(buf, sEmptyBuffer); - dwSize = MAX_PATH; - dwType = -1; - dwRet = SHGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test1", &dwType, buf, &dwSize); - ok( ERROR_SUCCESS == dwRet, "SHGetValueA failed, ret=%u\n", dwRet); - ok( 0 == strcmp(sExpTestpath1, buf) || - broken(0 == strcmp(sTestpath1, buf)), /* IE4.x */ - "Comparing of (%s) with (%s) failed\n", buf, sExpTestpath1); - ok( REG_SZ == dwType || - broken(REG_EXPAND_SZ == dwType), /* IE4.x */ - "Expected REG_SZ, got (%u)\n", dwType); - - strcpy(buf, sEmptyBuffer); - dwSize = MAX_PATH; - dwType = -1; - dwRet = SHGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test2", &dwType, buf, &dwSize); - ok( ERROR_SUCCESS == dwRet, "SHGetValueA failed, ret=%u\n", dwRet); - ok( 0 == strcmp(sTestpath1, buf) , "Comparing of (%s) with (%s) failed\n", buf, sTestpath1); - ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType); -} - -static void test_SHRegGetValue(void) -{ - LSTATUS ret; - DWORD size, type; - char data[MAX_PATH]; - - if(!pSHRegGetValueA) - return; - - size = MAX_PATH; - ret = pSHRegGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test1", SRRF_RT_REG_EXPAND_SZ, &type, data, &size); - ok(ret == ERROR_INVALID_PARAMETER, "SHRegGetValue failed, ret=%u\n", ret); - - size = MAX_PATH; - ret = pSHRegGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test1", SRRF_RT_REG_SZ, &type, data, &size); - ok(ret == ERROR_SUCCESS, "SHRegGetValue failed, ret=%u\n", ret); - ok(!strcmp(data, sExpTestpath1), "data = %s, expected %s\n", data, sExpTestpath1); - ok(type == REG_SZ, "type = %d, expected REG_SZ\n", type); - - size = MAX_PATH; - ret = pSHRegGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test1", SRRF_RT_REG_DWORD, &type, data, &size); - ok(ret == ERROR_UNSUPPORTED_TYPE, "SHRegGetValue failed, ret=%u\n", ret); - - size = MAX_PATH; - ret = pSHRegGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test2", SRRF_RT_REG_EXPAND_SZ, &type, data, &size); - ok(ret == ERROR_INVALID_PARAMETER, "SHRegGetValue failed, ret=%u\n", ret); - - size = MAX_PATH; - ret = pSHRegGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test2", SRRF_RT_REG_SZ, &type, data, &size); - ok(ret == ERROR_SUCCESS, "SHRegGetValue failed, ret=%u\n", ret); - ok(!strcmp(data, sTestpath1), "data = %s, expected %s\n", data, sTestpath1); - ok(type == REG_SZ, "type = %d, expected REG_SZ\n", type); - - size = MAX_PATH; - ret = pSHRegGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test2", SRRF_RT_REG_QWORD, &type, data, &size); - ok(ret == ERROR_UNSUPPORTED_TYPE, "SHRegGetValue failed, ret=%u\n", ret); -} - -static void test_SHGetRegPath(void) -{ - char buf[MAX_PATH]; - DWORD dwRet; - - if (!pSHRegGetPathA) - return; - - strcpy(buf, sEmptyBuffer); - dwRet = (*pSHRegGetPathA)(HKEY_CURRENT_USER, REG_TEST_KEY, "Test1", buf, 0); - ok( ERROR_SUCCESS == dwRet, "SHRegGetPathA failed, ret=%u\n", dwRet); - ok( 0 == strcmp(sExpTestpath1, buf) , "Comparing (%s) with (%s) failed\n", buf, sExpTestpath1); -} - -static void test_SHQUeryValueEx(void) -{ - HKEY hKey; - DWORD dwSize; - DWORD dwType; - char buf[MAX_PATH]; - DWORD dwRet; - const char * sTestedFunction = ""; - DWORD nUsedBuffer1,nUsedBuffer2; - - sTestedFunction = "RegOpenKeyExA"; - dwRet = RegOpenKeyExA(HKEY_CURRENT_USER, REG_TEST_KEY, 0, KEY_QUERY_VALUE, &hKey); - ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet); - - /****** SHQueryValueExA ******/ - - sTestedFunction = "SHQueryValueExA"; - nUsedBuffer1 = max(strlen(sExpTestpath1)+1, strlen(sTestpath1)+1); - nUsedBuffer2 = max(strlen(sExpTestpath2)+1, strlen(sTestpath2)+1); - /* - * Case 1.1 All arguments are NULL - */ - dwRet = SHQueryValueExA( hKey, "Test1", NULL, NULL, NULL, NULL); - ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet); - - /* - * Case 1.2 dwType is set - */ - dwType = -1; - dwRet = SHQueryValueExA( hKey, "Test1", NULL, &dwType, NULL, NULL); - ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet); - ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType); - - /* - * dwSize is set - * dwExpanded < dwUnExpanded - */ - dwSize = 6; - dwRet = SHQueryValueExA( hKey, "Test1", NULL, NULL, NULL, &dwSize); - ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet); - ok( dwSize == nUsedBuffer1, "Buffer sizes (%u) and (%u) are not equal\n", dwSize, nUsedBuffer1); - - /* - * dwExpanded > dwUnExpanded - */ - dwSize = 6; - dwRet = SHQueryValueExA( hKey, "Test3", NULL, NULL, NULL, &dwSize); - ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet); - ok( dwSize >= nUsedBuffer2 || - broken(dwSize == (strlen(sTestpath2) + 1)), /* < IE4.x */ - "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2); - - /* - * Case 1 string shrinks during expanding - */ - strcpy(buf, sEmptyBuffer); - dwSize = 6; - dwType = -1; - dwRet = SHQueryValueExA( hKey, "Test1", NULL, &dwType, buf, &dwSize); - ok( ERROR_MORE_DATA == dwRet, "Expected ERROR_MORE_DATA, got (%u)\n", dwRet); - ok( 0 == strcmp(sEmptyBuffer, buf) , "Comparing (%s) with (%s) failed\n", buf, sEmptyBuffer); - ok( dwSize == nUsedBuffer1, "Buffer sizes (%u) and (%u) are not equal\n", dwSize, nUsedBuffer1); - ok( REG_SZ == dwType || - broken(REG_EXPAND_SZ == dwType), /* < IE6 */ - "Expected REG_SZ, got (%u)\n", dwType); - - /* - * string grows during expanding - * dwSize is smaller than the size of the unexpanded string - */ - strcpy(buf, sEmptyBuffer); - dwSize = 6; - dwType = -1; - dwRet = SHQueryValueExA( hKey, "Test3", NULL, &dwType, buf, &dwSize); - ok( ERROR_MORE_DATA == dwRet, "Expected ERROR_MORE_DATA, got (%u)\n", dwRet); - ok( 0 == strcmp(sEmptyBuffer, buf) , "Comparing (%s) with (%s) failed\n", buf, sEmptyBuffer); - ok( dwSize >= nUsedBuffer2 || - broken(dwSize == (strlen(sTestpath2) + 1)), /* < IE6 */ - "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2); - ok( REG_SZ == dwType || - broken(REG_EXPAND_SZ == dwType), /* < IE6 */ - "Expected REG_SZ, got (%u)\n", dwType); - - /* - * string grows during expanding - * dwSize is larger than the size of the unexpanded string, but - * smaller than the part before the backslash. If the unexpanded - * string fits into the buffer, it can get cut when expanded. - */ - strcpy(buf, sEmptyBuffer); - dwSize = strlen(sEnvvar2) - 2; - dwType = -1; - dwRet = SHQueryValueExA( hKey, "Test3", NULL, &dwType, buf, &dwSize); - ok( ERROR_MORE_DATA == dwRet || - broken(ERROR_ENVVAR_NOT_FOUND == dwRet) || /* IE5.5 */ - broken(ERROR_SUCCESS == dwRet), /* < IE5.5*/ - "Expected ERROR_MORE_DATA, got (%u)\n", dwRet); - - todo_wine - { - ok( (0 == strcmp("", buf)) || (0 == strcmp(sTestpath2, buf)), - "Expected empty or unexpanded string (win98), got (%s)\n", buf); - } - - ok( dwSize >= nUsedBuffer2 || - broken(dwSize == (strlen("") + 1)), /* < IE 5.5 */ - "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2); - ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType); - - /* - * string grows during expanding - * dwSize is larger than the size of the part before the backslash, - * but smaller than the expanded string. If the unexpanded string fits - * into the buffer, it can get cut when expanded. - */ - strcpy(buf, sEmptyBuffer); - dwSize = nExpLen2 - 4; - dwType = -1; - dwRet = SHQueryValueExA( hKey, "Test3", NULL, &dwType, buf, &dwSize); - ok( ERROR_MORE_DATA == dwRet || - broken(ERROR_ENVVAR_NOT_FOUND == dwRet) || /* IE5.5 */ - broken(ERROR_SUCCESS == dwRet), /* < IE5.5 */ - "Expected ERROR_MORE_DATA, got (%u)\n", dwRet); - - todo_wine - { - ok( (0 == strcmp("", buf)) || (0 == strcmp(sEnvvar2, buf)) || - broken(0 == strcmp(sTestpath2, buf)), /* IE 5.5 */ - "Expected empty or first part of the string \"%s\", got \"%s\"\n", sEnvvar2, buf); - } - - ok( dwSize >= nUsedBuffer2 || - broken(dwSize == (strlen(sEnvvar2) + 1)) || /* IE4.01 SP1 (W98) and IE5 (W98SE) */ - broken(dwSize == (strlen("") + 1)), /* IE4.01 (NT4) and IE5.x (W2K) */ - "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2); - ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType); - - /* - * The buffer is NULL but the size is set - */ - strcpy(buf, sEmptyBuffer); - dwSize = 6; - dwType = -1; - dwRet = SHQueryValueExA( hKey, "Test3", NULL, &dwType, NULL, &dwSize); - ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet); - ok( dwSize >= nUsedBuffer2 || - broken(dwSize == (strlen(sTestpath2) + 1)), /* IE4.01 SP1 (Win98) */ - "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2); - ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType); - - RegCloseKey(hKey); -} - -static void test_SHCopyKey(void) -{ - HKEY hKeySrc, hKeyDst; - DWORD dwRet; - - if (!pSHCopyKeyA) - { - win_skip("SHCopyKeyA is not available\n"); - return; - } - - /* Delete existing destination sub keys */ - hKeyDst = NULL; - if (!RegOpenKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\CopyDestination", &hKeyDst) && hKeyDst) - { - SHDeleteKeyA(hKeyDst, NULL); - RegCloseKey(hKeyDst); - } - - hKeyDst = NULL; - dwRet = RegCreateKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\CopyDestination", &hKeyDst); - if (dwRet || !hKeyDst) - { - ok( 0, "Destination couldn't be created, RegCreateKeyA returned (%u)\n", dwRet); - return; - } - - hKeySrc = NULL; - dwRet = RegOpenKeyA(HKEY_LOCAL_MACHINE, REG_CURRENT_VERSION, &hKeySrc); - if (dwRet || !hKeySrc) - { - ok( 0, "Source couldn't be opened, RegOpenKeyA returned (%u)\n", dwRet); - RegCloseKey(hKeyDst); - return; - } - - dwRet = (*pSHCopyKeyA)(hKeySrc, NULL, hKeyDst, 0); - ok ( ERROR_SUCCESS == dwRet, "Copy failed, ret=(%u)\n", dwRet); - - RegCloseKey(hKeySrc); - RegCloseKey(hKeyDst); - - /* Check we copied the sub keys, i.e. something that's on every windows system (including Wine) */ - hKeyDst = NULL; - dwRet = RegOpenKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\CopyDestination\\Shell Folders", &hKeyDst); - if (dwRet || !hKeyDst) - { - ok ( 0, "Copy couldn't be opened, RegOpenKeyA returned (%u)\n", dwRet); - return; - } - - /* And the we copied the values too */ - ok(!SHQueryValueExA(hKeyDst, "Common AppData", NULL, NULL, NULL, NULL), "SHQueryValueExA failed\n"); - - RegCloseKey(hKeyDst); -} - -static void test_SHDeleteKey(void) -{ - HKEY hKeyTest, hKeyS; - DWORD dwRet; - int sysfail = 1; - - if (!RegOpenKeyA(HKEY_CURRENT_USER, REG_TEST_KEY, &hKeyTest)) - { - if (!RegCreateKey(hKeyTest, "ODBC", &hKeyS)) - { - HKEY hKeyO; - - if (!RegCreateKey(hKeyS, "ODBC.INI", &hKeyO)) - { - RegCloseKey (hKeyO); - - if (!RegCreateKey(hKeyS, "ODBCINST.INI", &hKeyO)) - { - RegCloseKey (hKeyO); - sysfail = 0; - } - } - RegCloseKey (hKeyS); - } - RegCloseKey (hKeyTest); - } - - if (!sysfail) - { - - dwRet = SHDeleteKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\ODBC"); - ok ( ERROR_SUCCESS == dwRet, "SHDeleteKey failed, ret=(%u)\n", dwRet); - - dwRet = RegOpenKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\ODBC", &hKeyS); - ok ( ERROR_FILE_NOT_FOUND == dwRet, "SHDeleteKey did not delete\n"); - - if (dwRet == ERROR_SUCCESS) - RegCloseKey (hKeyS); - } - else - ok( 0, "Could not set up SHDeleteKey test\n"); -} - -START_TEST(shreg) -{ - HKEY hkey = create_test_entries(); - - if (!hkey) return; - - hshlwapi = GetModuleHandleA("shlwapi.dll"); - pSHCopyKeyA=(SHCopyKeyA_func)GetProcAddress(hshlwapi,"SHCopyKeyA"); - pSHRegGetPathA=(SHRegGetPathA_func)GetProcAddress(hshlwapi,"SHRegGetPathA"); - pSHRegGetValueA=(SHRegGetValueA_func)GetProcAddress(hshlwapi,"SHRegGetValueA"); - test_SHGetValue(); - test_SHRegGetValue(); - test_SHQUeryValueEx(); - test_SHGetRegPath(); - test_SHCopyKey(); - test_SHDeleteKey(); - delete_key( hkey, "Software\\Wine", "Test" ); -} diff --git a/rostests/winetests/shlwapi/string.c b/rostests/winetests/shlwapi/string.c deleted file mode 100755 index 17c652de411..00000000000 --- a/rostests/winetests/shlwapi/string.c +++ /dev/null @@ -1,1025 +0,0 @@ -/* Unit test suite for SHLWAPI string functions - * - * Copyright 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 "wine/test.h" -#include "winbase.h" -#include "winerror.h" -#include "winnls.h" -#define NO_SHLWAPI_REG -#define NO_SHLWAPI_PATH -#define NO_SHLWAPI_GDI -#define NO_SHLWAPI_STREAM -#include "shlwapi.h" -#include "shtypes.h" - -#define expect_eq(expr, val, type, fmt) do { \ - type ret = expr; \ - ok(ret == val, "Unexpected value of '" #expr "': " #fmt " instead of " #val "\n", ret); \ -} while (0); - -#define expect_eq2(expr, val1, val2, type, fmt) do { \ - type ret = expr; \ - ok(ret == val1 || ret == val2, "Unexpected value of '" #expr "': " #fmt " instead of " #val1 " or " #val2 "\n", ret); \ -} while (0); - -static BOOL (WINAPI *pChrCmpIA)(CHAR, CHAR); -static BOOL (WINAPI *pChrCmpIW)(WCHAR, WCHAR); -static BOOL (WINAPI *pIntlStrEqWorkerA)(BOOL,LPCSTR,LPCSTR,int); -static BOOL (WINAPI *pIntlStrEqWorkerW)(BOOL,LPCWSTR,LPCWSTR,int); -static DWORD (WINAPI *pSHAnsiToAnsi)(LPCSTR,LPSTR,int); -static DWORD (WINAPI *pSHUnicodeToUnicode)(LPCWSTR,LPWSTR,int); -static LPSTR (WINAPI *pStrCatBuffA)(LPSTR,LPCSTR,INT); -static LPWSTR (WINAPI *pStrCatBuffW)(LPWSTR,LPCWSTR,INT); -static LPSTR (WINAPI *pStrCpyNXA)(LPSTR,LPCSTR,int); -static LPWSTR (WINAPI *pStrCpyNXW)(LPWSTR,LPCWSTR,int); -static LPSTR (WINAPI *pStrFormatByteSize64A)(LONGLONG,LPSTR,UINT); -static LPSTR (WINAPI *pStrFormatKBSizeA)(LONGLONG,LPSTR,UINT); -static LPWSTR (WINAPI *pStrFormatKBSizeW)(LONGLONG,LPWSTR,UINT); -static BOOL (WINAPI *pStrIsIntlEqualA)(BOOL,LPCSTR,LPCSTR,int); -static BOOL (WINAPI *pStrIsIntlEqualW)(BOOL,LPCWSTR,LPCWSTR,int); -static HRESULT (WINAPI *pStrRetToBSTR)(STRRET*,void*,BSTR*); -static HRESULT (WINAPI *pStrRetToBufA)(STRRET*,LPCITEMIDLIST,LPSTR,UINT); -static HRESULT (WINAPI *pStrRetToBufW)(STRRET*,LPCITEMIDLIST,LPWSTR,UINT); -static INT (WINAPIV *pwnsprintfA)(LPSTR,INT,LPCSTR, ...); -static INT (WINAPIV *pwnsprintfW)(LPWSTR,INT,LPCWSTR, ...); -static LPWSTR (WINAPI *pStrChrNW)(LPWSTR,WCHAR,UINT); - -static int strcmpW(const WCHAR *str1, const WCHAR *str2) -{ - while (*str1 && (*str1 == *str2)) { str1++; str2++; } - return *str1 - *str2; -} - -/* StrToInt/StrToIntEx results */ -typedef struct tagStrToIntResult -{ - const char* string; - int str_to_int; - int str_to_int_ex; - int str_to_int_hex; -} StrToIntResult; - -static const StrToIntResult StrToInt_results[] = { - { "1099", 1099, 1099, 1099 }, - { "+88987", 0, 88987, 88987 }, - { "012", 12, 12, 12 }, - { "-55", -55, -55, -55 }, - { "-0", 0, 0, 0 }, - { "0x44ff", 0, 0, 0x44ff }, - { "+0x44f4", 0, 0, 0x44f4 }, - { "-0x44fd", 0, 0, 0x44fd }, - { "+ 88987", 0, 0, 0 }, - { "- 55", 0, 0, 0 }, - { "- 0", 0, 0, 0 }, - { "+ 0x44f4", 0, 0, 0 }, - { "--0x44fd", 0, 0, 0 }, - { " 1999", 0, 1999, 1999 }, - { " +88987", 0, 88987, 88987 }, - { " 012", 0, 12, 12 }, - { " -55", 0, -55, -55 }, - { " 0x44ff", 0, 0, 0x44ff }, - { " +0x44f4", 0, 0, 0x44f4 }, - { " -0x44fd", 0, 0, 0x44fd }, - { NULL, 0, 0, 0 } -}; - -/* pStrFormatByteSize64/StrFormatKBSize results */ -typedef struct tagStrFormatSizeResult -{ - LONGLONG value; - const char* byte_size_64; - const char* kb_size; -} StrFormatSizeResult; - - -static const StrFormatSizeResult StrFormatSize_results[] = { - { -1023, "-1023 bytes", "0 KB"}, - { -24, "-24 bytes", "0 KB"}, - { 309, "309 bytes", "1 KB"}, - { 10191, "9.95 KB", "10 KB"}, - { 100353, "98.0 KB", "99 KB"}, - { 1022286, "998 KB", "999 KB"}, - { 1046862, "0.99 MB", "1,023 KB"}, - { 1048574619, "999 MB", "1,023,999 KB"}, - { 1073741775, "0.99 GB", "1,048,576 KB"}, - { ((LONGLONG)0x000000f9 << 32) | 0xfffff94e, "999 GB", "1,048,575,999 KB"}, - { ((LONGLONG)0x000000ff << 32) | 0xfffffa9b, "0.99 TB", "1,073,741,823 KB"}, - { ((LONGLONG)0x0003e7ff << 32) | 0xfffffa9b, "999 TB", "1,073,741,823,999 KB"}, - { ((LONGLONG)0x0003ffff << 32) | 0xfffffbe8, "0.99 PB", "1,099,511,627,775 KB"}, - { ((LONGLONG)0x0f9fffff << 32) | 0xfffffd35, "999 PB", "1,099,511,627,776,000 KB"}, - { ((LONGLONG)0x0fffffff << 32) | 0xfffffa9b, "0.99 EB", "1,125,899,906,842,623 KB"}, - { 0, NULL, NULL } -}; - -/* StrFormatByteSize64/StrFormatKBSize results */ -typedef struct tagStrFromTimeIntervalResult -{ - DWORD ms; - int digits; - const char* time_interval; -} StrFromTimeIntervalResult; - - -static const StrFromTimeIntervalResult StrFromTimeInterval_results[] = { - { 1, 1, " 0 sec" }, - { 1, 2, " 0 sec" }, - { 1, 3, " 0 sec" }, - { 1, 4, " 0 sec" }, - { 1, 5, " 0 sec" }, - { 1, 6, " 0 sec" }, - { 1, 7, " 0 sec" }, - - { 1000000, 1, " 10 min" }, - { 1000000, 2, " 16 min" }, - { 1000000, 3, " 16 min 40 sec" }, - { 1000000, 4, " 16 min 40 sec" }, - { 1000000, 5, " 16 min 40 sec" }, - { 1000000, 6, " 16 min 40 sec" }, - { 1000000, 7, " 16 min 40 sec" }, - - { 1999999, 1, " 30 min" }, - { 1999999, 2, " 33 min" }, - { 1999999, 3, " 33 min 20 sec" }, - { 1999999, 4, " 33 min 20 sec" }, - { 1999999, 5, " 33 min 20 sec" }, - { 1999999, 6, " 33 min 20 sec" }, - { 1999999, 7, " 33 min 20 sec" }, - - { 3999997, 1, " 1 hr" }, - { 3999997, 2, " 1 hr 6 min" }, - { 3999997, 3, " 1 hr 6 min 40 sec" }, - { 3999997, 4, " 1 hr 6 min 40 sec" }, - { 3999997, 5, " 1 hr 6 min 40 sec" }, - { 3999997, 6, " 1 hr 6 min 40 sec" }, - { 3999997, 7, " 1 hr 6 min 40 sec" }, - - { 149999851, 7, " 41 hr 40 min 0 sec" }, - { 150999850, 1, " 40 hr" }, - { 150999850, 2, " 41 hr" }, - { 150999850, 3, " 41 hr 50 min" }, - { 150999850, 4, " 41 hr 56 min" }, - { 150999850, 5, " 41 hr 56 min 40 sec" }, - { 150999850, 6, " 41 hr 56 min 40 sec" }, - { 150999850, 7, " 41 hr 56 min 40 sec" }, - - { 493999507, 1, " 100 hr" }, - { 493999507, 2, " 130 hr" }, - { 493999507, 3, " 137 hr" }, - { 493999507, 4, " 137 hr 10 min" }, - { 493999507, 5, " 137 hr 13 min" }, - { 493999507, 6, " 137 hr 13 min 20 sec" }, - { 493999507, 7, " 137 hr 13 min 20 sec" }, - - { 0, 0, NULL } -}; - -static void test_StrChrA(void) -{ - char string[129]; - WORD count; - - /* this test crashes on win2k SP4 */ - /*ok(!StrChrA(NULL,'\0'), "found a character in a NULL string!\n");*/ - - for (count = 32; count < 128; count++) - string[count] = (char)count; - string[128] = '\0'; - - for (count = 32; count < 128; count++) - { - LPSTR result = StrChrA(string+32, count); - INT pos = result - string; - ok(pos == count, "found char '%c' in wrong place: got %d, expected %d\n", count, pos, count); - } - - for (count = 32; count < 128; count++) - { - LPSTR result = StrChrA(string+count+1, count); - ok(!result, "found char '%c' not in the string\n", count); - } -} - -static void test_StrChrW(void) -{ - WCHAR string[16385]; - WORD count; - - /* this test crashes on win2k SP4 */ - /*ok(!StrChrW(NULL,'\0'), "found a character in a NULL string!\n");*/ - - for (count = 32; count < 16384; count++) - string[count] = count; - string[16384] = '\0'; - - for (count = 32; count < 16384; count++) - { - LPWSTR result = StrChrW(string+32, count); - ok((result - string) == count, "found char %d in wrong place\n", count); - } - - for (count = 32; count < 16384; count++) - { - LPWSTR result = StrChrW(string+count+1, count); - ok(!result, "found char not in the string\n"); - } -} - -static void test_StrChrIA(void) -{ - char string[129]; - WORD count; - - /* this test crashes on win2k SP4 */ - /*ok(!StrChrIA(NULL,'\0'), "found a character in a NULL string!\n");*/ - - for (count = 32; count < 128; count++) - string[count] = (char)count; - string[128] = '\0'; - - for (count = 'A'; count <= 'X'; count++) - { - LPSTR result = StrChrIA(string+32, count); - - ok(result - string == count, "found char '%c' in wrong place\n", count); - ok(StrChrIA(result, count)!=NULL, "didn't find lowercase '%c'\n", count); - } - - for (count = 'a'; count < 'z'; count++) - { - LPSTR result = StrChrIA(string+count+1, count); - ok(!result, "found char not in the string\n"); - } -} - -static void test_StrChrIW(void) -{ - WCHAR string[129]; - WORD count; - - /* this test crashes on win2k SP4 */ - /*ok(!StrChrIA(NULL,'\0'), "found a character in a NULL string!\n");*/ - - for (count = 32; count < 128; count++) - string[count] = count; - string[128] = '\0'; - - for (count = 'A'; count <= 'X'; count++) - { - LPWSTR result = StrChrIW(string+32, count); - - ok(result - string == count, "found char '%c' in wrong place\n", count); - ok(StrChrIW(result, count)!=NULL, "didn't find lowercase '%c'\n", count); - } - - for (count = 'a'; count < 'z'; count++) - { - LPWSTR result = StrChrIW(string+count+1, count); - ok(!result, "found char not in the string\n"); - } -} - -static void test_StrRChrA(void) -{ - char string[129]; - WORD count; - - /* this test crashes on win2k SP4 */ - /*ok(!StrRChrA(NULL, NULL,'\0'), "found a character in a NULL string!\n");*/ - - for (count = 32; count < 128; count++) - string[count] = (char)count; - string[128] = '\0'; - - for (count = 32; count < 128; count++) - { - LPSTR result = StrRChrA(string+32, NULL, count); - ok(result - string == count, "found char %d in wrong place\n", count); - } - - for (count = 32; count < 128; count++) - { - LPSTR result = StrRChrA(string+count+1, NULL, count); - ok(!result, "found char not in the string\n"); - } - - for (count = 32; count < 128; count++) - { - LPSTR result = StrRChrA(string+count+1, string + 127, count); - ok(!result, "found char not in the string\n"); - } -} - -static void test_StrRChrW(void) -{ - WCHAR string[129]; - WORD count; - - /* this test crashes on win2k SP4 */ - /*ok(!StrRChrW(NULL, NULL,'\0'), "found a character in a NULL string!\n");*/ - - for (count = 32; count < 128; count++) - string[count] = count; - string[128] = '\0'; - - for (count = 32; count < 128; count++) - { - LPWSTR result = StrRChrW(string+32, NULL, count); - INT pos = result - string; - ok(pos == count, "found char %d in wrong place: got %d, expected %d\n", count, pos, count); - } - - for (count = 32; count < 128; count++) - { - LPWSTR result = StrRChrW(string+count+1, NULL, count); - ok(!result, "found char %d not in the string\n", count); - } - - for (count = 32; count < 128; count++) - { - LPWSTR result = StrRChrW(string+count+1, string + 127, count); - ok(!result, "found char %d not in the string\n", count); - } -} - -static void test_StrCpyW(void) -{ - WCHAR szSrc[256]; - WCHAR szBuff[256]; - const StrFormatSizeResult* result = StrFormatSize_results; - - - while(result->value) - { - MultiByteToWideChar(0,0,result->byte_size_64,-1,szSrc,sizeof(szSrc)/sizeof(WCHAR)); - - StrCpyW(szBuff, szSrc); - ok(!StrCmpW(szSrc, szBuff), "Copied string %s wrong\n", result->byte_size_64); - result++; - } -} - -static void test_StrChrNW(void) -{ - static WCHAR string[] = {'T','e','s','t','i','n','g',' ','S','t','r','i','n','g',0}; - LPWSTR p; - - if (!pStrChrNW) - { - win_skip("StrChrNW not available\n"); - return; - } - - p = pStrChrNW(string,'t',10); - ok(*p=='t',"Found wrong 't'\n"); - ok(*(p+1)=='i',"next should be 'i'\n"); - - p = pStrChrNW(string,'S',10); - ok(*p=='S',"Found wrong 'S'\n"); - - p = pStrChrNW(string,'r',10); - ok(p==NULL,"Should not have found 'r'\n"); -} - -static void test_StrToIntA(void) -{ - const StrToIntResult *result = StrToInt_results; - int return_val; - - while (result->string) - { - return_val = StrToIntA(result->string); - ok(return_val == result->str_to_int, "converted '%s' wrong (%d)\n", - result->string, return_val); - result++; - } -} - -static void test_StrToIntW(void) -{ - WCHAR szBuff[256]; - const StrToIntResult *result = StrToInt_results; - int return_val; - - while (result->string) - { - MultiByteToWideChar(0,0,result->string,-1,szBuff,sizeof(szBuff)/sizeof(WCHAR)); - return_val = StrToIntW(szBuff); - ok(return_val == result->str_to_int, "converted '%s' wrong (%d)\n", - result->string, return_val); - result++; - } -} - -static void test_StrToIntExA(void) -{ - const StrToIntResult *result = StrToInt_results; - int return_val; - BOOL bRet; - - while (result->string) - { - return_val = -1; - bRet = StrToIntExA(result->string,0,&return_val); - ok(!bRet || return_val != -1, "No result returned from '%s'\n", - result->string); - if (bRet) - ok(return_val == result->str_to_int_ex, "converted '%s' wrong (%d)\n", - result->string, return_val); - result++; - } - - result = StrToInt_results; - while (result->string) - { - return_val = -1; - bRet = StrToIntExA(result->string,STIF_SUPPORT_HEX,&return_val); - ok(!bRet || return_val != -1, "No result returned from '%s'\n", - result->string); - if (bRet) - ok(return_val == result->str_to_int_hex, "converted '%s' wrong (%d)\n", - result->string, return_val); - result++; - } -} - -static void test_StrToIntExW(void) -{ - WCHAR szBuff[256]; - const StrToIntResult *result = StrToInt_results; - int return_val; - BOOL bRet; - - while (result->string) - { - return_val = -1; - MultiByteToWideChar(0,0,result->string,-1,szBuff,sizeof(szBuff)/sizeof(WCHAR)); - bRet = StrToIntExW(szBuff, 0, &return_val); - ok(!bRet || return_val != -1, "No result returned from '%s'\n", - result->string); - if (bRet) - ok(return_val == result->str_to_int_ex, "converted '%s' wrong (%d)\n", - result->string, return_val); - result++; - } - - result = StrToInt_results; - while (result->string) - { - return_val = -1; - MultiByteToWideChar(0,0,result->string,-1,szBuff,sizeof(szBuff)/sizeof(WCHAR)); - bRet = StrToIntExW(szBuff, STIF_SUPPORT_HEX, &return_val); - ok(!bRet || return_val != -1, "No result returned from '%s'\n", - result->string); - if (bRet) - ok(return_val == result->str_to_int_hex, "converted '%s' wrong (%d)\n", - result->string, return_val); - result++; - } -} - -static void test_StrDupA(void) -{ - LPSTR lpszStr; - const StrFormatSizeResult* result = StrFormatSize_results; - - while(result->value) - { - lpszStr = StrDupA(result->byte_size_64); - - ok(lpszStr != NULL, "Dup failed\n"); - if (lpszStr) - { - ok(!strcmp(result->byte_size_64, lpszStr), "Copied string wrong\n"); - LocalFree(lpszStr); - } - result++; - } - - /* Later versions of shlwapi return NULL for this, but earlier versions - * returned an empty string (as Wine does). - */ - lpszStr = StrDupA(NULL); - ok(lpszStr == NULL || *lpszStr == '\0', "NULL string returned %p\n", lpszStr); - LocalFree(lpszStr); -} - -static void test_StrFormatByteSize64A(void) -{ - char szBuff[256]; - const StrFormatSizeResult* result = StrFormatSize_results; - - if (!pStrFormatByteSize64A) - { - win_skip("StrFormatByteSize64A() is not available\n"); - return; - } - - while(result->value) - { - pStrFormatByteSize64A(result->value, szBuff, 256); - - ok(!strcmp(result->byte_size_64, szBuff), - "Formatted %x%08x wrong: got %s, expected %s\n", - (LONG)(result->value >> 32), (LONG)result->value, szBuff, result->byte_size_64); - - result++; - } -} - -static void test_StrFormatKBSizeW(void) -{ - WCHAR szBuffW[256]; - char szBuff[256]; - const StrFormatSizeResult* result = StrFormatSize_results; - - if (!pStrFormatKBSizeW) - { - win_skip("StrFormatKBSizeW() is not available\n"); - return; - } - - while(result->value) - { - pStrFormatKBSizeW(result->value, szBuffW, 256); - WideCharToMultiByte(0,0,szBuffW,-1,szBuff,sizeof(szBuff)/sizeof(WCHAR),0,0); - ok(!strcmp(result->kb_size, szBuff), - "Formatted %x%08x wrong: got %s, expected %s\n", - (LONG)(result->value >> 32), (LONG)result->value, szBuff, result->kb_size); - result++; - } -} - -static void test_StrFormatKBSizeA(void) -{ - char szBuff[256]; - const StrFormatSizeResult* result = StrFormatSize_results; - - if (!pStrFormatKBSizeA) - { - win_skip("StrFormatKBSizeA() is not available\n"); - return; - } - - while(result->value) - { - pStrFormatKBSizeA(result->value, szBuff, 256); - - ok(!strcmp(result->kb_size, szBuff), - "Formatted %x%08x wrong: got %s, expected %s\n", - (LONG)(result->value >> 32), (LONG)result->value, szBuff, result->kb_size); - result++; - } -} - -static void test_StrFromTimeIntervalA(void) -{ - char szBuff[256]; - const StrFromTimeIntervalResult* result = StrFromTimeInterval_results; - - while(result->ms) - { - StrFromTimeIntervalA(szBuff, 256, result->ms, result->digits); - - ok(!strcmp(result->time_interval, szBuff), "Formatted %d %d wrong\n", - result->ms, result->digits); - result++; - } -} - -static void test_StrCmpA(void) -{ - static const char str1[] = {'a','b','c','d','e','f'}; - static const char str2[] = {'a','B','c','d','e','f'}; - ok(0 != StrCmpNA(str1, str2, 6), "StrCmpNA is case-insensitive\n"); - ok(0 == StrCmpNIA(str1, str2, 6), "StrCmpNIA is case-sensitive\n"); - if (pChrCmpIA) { - ok(!pChrCmpIA('a', 'a'), "ChrCmpIA doesn't work at all!\n"); - ok(!pChrCmpIA('b', 'B'), "ChrCmpIA is not case-insensitive\n"); - ok(pChrCmpIA('a', 'z'), "ChrCmpIA believes that a == z!\n"); - } - else - win_skip("ChrCmpIA() is not available\n"); - - if (pStrIsIntlEqualA) - { - ok(pStrIsIntlEqualA(FALSE, str1, str2, 5), "StrIsIntlEqualA(FALSE,...) isn't case-insensitive\n"); - ok(!pStrIsIntlEqualA(TRUE, str1, str2, 5), "StrIsIntlEqualA(TRUE,...) isn't case-sensitive\n"); - } - else - win_skip("StrIsIntlEqualA() is not available\n"); - - if (pIntlStrEqWorkerA) - { - ok(pIntlStrEqWorkerA(FALSE, str1, str2, 5), "IntlStrEqWorkerA(FALSE,...) isn't case-insensitive\n"); - ok(!pIntlStrEqWorkerA(TRUE, str1, str2, 5), "pIntlStrEqWorkerA(TRUE,...) isn't case-sensitive\n"); - } - else - win_skip("IntlStrEqWorkerA() is not available\n"); -} - -static void test_StrCmpW(void) -{ - static const WCHAR str1[] = {'a','b','c','d','e','f'}; - static const WCHAR str2[] = {'a','B','c','d','e','f'}; - ok(0 != StrCmpNW(str1, str2, 5), "StrCmpNW is case-insensitive\n"); - ok(0 == StrCmpNIW(str1, str2, 5), "StrCmpNIW is case-sensitive\n"); - if (pChrCmpIW) { - ok(!pChrCmpIW('a', 'a'), "ChrCmpIW doesn't work at all!\n"); - ok(!pChrCmpIW('b', 'B'), "ChrCmpIW is not case-insensitive\n"); - ok(pChrCmpIW('a', 'z'), "ChrCmpIW believes that a == z!\n"); - } - else - win_skip("ChrCmpIW() is not available\n"); - - if (pStrIsIntlEqualW) - { - ok(pStrIsIntlEqualW(FALSE, str1, str2, 5), "StrIsIntlEqualW(FALSE,...) isn't case-insensitive\n"); - ok(!pStrIsIntlEqualW(TRUE, str1, str2, 5), "StrIsIntlEqualW(TRUE,...) isn't case-sensitive\n"); - } - else - win_skip("StrIsIntlEqualW() is not available\n"); - - if (pIntlStrEqWorkerW) - { - ok(pIntlStrEqWorkerW(FALSE, str1, str2, 5), "IntlStrEqWorkerW(FALSE,...) isn't case-insensitive\n"); - ok(!pIntlStrEqWorkerW(TRUE, str1, str2, 5), "IntlStrEqWorkerW(TRUE,...) isn't case-sensitive\n"); - } - else - win_skip("IntlStrEqWorkerW() is not available\n"); -} - -static WCHAR *CoDupStrW(const char* src) -{ - INT len = MultiByteToWideChar(CP_ACP, 0, src, -1, NULL, 0); - WCHAR* szTemp = CoTaskMemAlloc(len * sizeof(WCHAR)); - MultiByteToWideChar(CP_ACP, 0, src, -1, szTemp, len); - return szTemp; -} - -static void test_StrRetToBSTR(void) -{ - static const WCHAR szTestW[] = { 'T','e','s','t','\0' }; - ITEMIDLIST iidl[10]; - BSTR bstr; - STRRET strret; - HRESULT ret; - - if (!pStrRetToBSTR) - { - win_skip("StrRetToBSTR() is not available\n"); - return; - } - - strret.uType = STRRET_WSTR; - U(strret).pOleStr = CoDupStrW("Test"); - bstr = 0; - ret = pStrRetToBSTR(&strret, NULL, &bstr); - ok(ret == S_OK && bstr && !strcmpW(bstr, szTestW), - "STRRET_WSTR: dup failed, ret=0x%08x, bstr %p\n", ret, bstr); - SysFreeString(bstr); - - strret.uType = STRRET_CSTR; - lstrcpyA(U(strret).cStr, "Test"); - ret = pStrRetToBSTR(&strret, NULL, &bstr); - ok(ret == S_OK && bstr && !strcmpW(bstr, szTestW), - "STRRET_CSTR: dup failed, ret=0x%08x, bstr %p\n", ret, bstr); - SysFreeString(bstr); - - strret.uType = STRRET_OFFSET; - U(strret).uOffset = 1; - strcpy((char*)&iidl, " Test"); - ret = pStrRetToBSTR(&strret, iidl, &bstr); - ok(ret == S_OK && bstr && !strcmpW(bstr, szTestW), - "STRRET_OFFSET: dup failed, ret=0x%08x, bstr %p\n", ret, bstr); - SysFreeString(bstr); - - /* Native crashes if str is NULL */ -} - -static void test_StrCpyNXA(void) -{ - LPCSTR lpSrc = "hello"; - LPSTR lpszRes; - char dest[8]; - - if (!pStrCpyNXA) - { - win_skip("StrCpyNXA() is not available\n"); - return; - } - - memset(dest, '\n', sizeof(dest)); - lpszRes = pStrCpyNXA(dest, lpSrc, sizeof(dest)/sizeof(dest[0])); - ok(lpszRes == dest + 5 && !memcmp(dest, "hello\0\n\n", sizeof(dest)), - "StrCpyNXA: expected %p, \"hello\\0\\n\\n\", got %p, \"%d,%d,%d,%d,%d,%d,%d,%d\"\n", - dest + 5, lpszRes, dest[0], dest[1], dest[2], dest[3], dest[4], dest[5], dest[6], dest[7]); -} - -static void test_StrCpyNXW(void) -{ - static const WCHAR lpInit[] = { '\n','\n','\n','\n','\n','\n','\n','\n' }; - static const WCHAR lpSrc[] = { 'h','e','l','l','o','\0' }; - static const WCHAR lpRes[] = { 'h','e','l','l','o','\0','\n','\n' }; - LPWSTR lpszRes; - WCHAR dest[8]; - - if (!pStrCpyNXW) - { - win_skip("StrCpyNXW() is not available\n"); - return; - } - - memcpy(dest, lpInit, sizeof(lpInit)); - lpszRes = pStrCpyNXW(dest, lpSrc, sizeof(dest)/sizeof(dest[0])); - ok(lpszRes == dest + 5 && !memcmp(dest, lpRes, sizeof(dest)), - "StrCpyNXW: expected %p, \"hello\\0\\n\\n\", got %p, \"%d,%d,%d,%d,%d,%d,%d,%d\"\n", - dest + 5, lpszRes, dest[0], dest[1], dest[2], dest[3], dest[4], dest[5], dest[6], dest[7]); -} - -#define check_strrstri(type, str, pos, needle, exp) \ - ret##type = StrRStrI##type(str, str+pos, needle); \ - ok(ret##type == (exp), "Type " #type ", expected %p but got %p (string base %p)\n", \ - (exp), ret##type, str); - -static void test_StrRStrI(void) -{ - static const CHAR szTest[] = "yAxxxxAy"; - static const CHAR szTest2[] = "ABABABAB"; - static const WCHAR wszTest[] = {'y','A','x','x','x','x','A','y',0}; - static const WCHAR wszTest2[] = {'A','B','A','B','A','B','A','B',0}; - - static const WCHAR wszPattern1[] = {'A',0}; - static const WCHAR wszPattern2[] = {'a','X',0}; - static const WCHAR wszPattern3[] = {'A','y',0}; - static const WCHAR wszPattern4[] = {'a','b',0}; - LPWSTR retW; - LPSTR retA; - - check_strrstri(A, szTest, 4, "A", szTest+1); - check_strrstri(A, szTest, 4, "aX", szTest+1); - check_strrstri(A, szTest, 4, "Ay", NULL); - check_strrstri(W, wszTest, 4, wszPattern1, wszTest+1); - check_strrstri(W, wszTest, 4, wszPattern2, wszTest+1); - check_strrstri(W, wszTest, 4, wszPattern3, NULL); - - check_strrstri(A, szTest2, 4, "ab", szTest2+2); - check_strrstri(A, szTest2, 3, "ab", szTest2+2); - check_strrstri(A, szTest2, 2, "ab", szTest2); - check_strrstri(A, szTest2, 1, "ab", szTest2); - check_strrstri(A, szTest2, 0, "ab", NULL); - check_strrstri(W, wszTest2, 4, wszPattern4, wszTest2+2); - check_strrstri(W, wszTest2, 3, wszPattern4, wszTest2+2); - check_strrstri(W, wszTest2, 2, wszPattern4, wszTest2); - check_strrstri(W, wszTest2, 1, wszPattern4, wszTest2); - check_strrstri(W, wszTest2, 0, wszPattern4, NULL); - -} - -static void test_SHAnsiToAnsi(void) -{ - char dest[8]; - DWORD dwRet; - - if (!pSHAnsiToAnsi) - { - win_skip("SHAnsiToAnsi() is not available\n"); - return; - } - - memset(dest, '\n', sizeof(dest)); - dwRet = pSHAnsiToAnsi("hello", dest, sizeof(dest)/sizeof(dest[0])); - ok(dwRet == 6 && !memcmp(dest, "hello\0\n\n", sizeof(dest)), - "SHAnsiToAnsi: expected 6, \"hello\\0\\n\\n\", got %d, \"%d,%d,%d,%d,%d,%d,%d,%d\"\n", - dwRet, dest[0], dest[1], dest[2], dest[3], dest[4], dest[5], dest[6], dest[7]); -} - -static void test_SHUnicodeToUnicode(void) -{ - static const WCHAR lpInit[] = { '\n','\n','\n','\n','\n','\n','\n','\n' }; - static const WCHAR lpSrc[] = { 'h','e','l','l','o','\0' }; - static const WCHAR lpRes[] = { 'h','e','l','l','o','\0','\n','\n' }; - WCHAR dest[8]; - DWORD dwRet; - - if (!pSHUnicodeToUnicode) - { - win_skip("SHUnicodeToUnicode() is not available\n"); - return; - } - - memcpy(dest, lpInit, sizeof(lpInit)); - dwRet = pSHUnicodeToUnicode(lpSrc, dest, sizeof(dest)/sizeof(dest[0])); - ok(dwRet == 6 && !memcmp(dest, lpRes, sizeof(dest)), - "SHUnicodeToUnicode: expected 6, \"hello\\0\\n\\n\", got %d, \"%d,%d,%d,%d,%d,%d,%d,%d\"\n", - dwRet, dest[0], dest[1], dest[2], dest[3], dest[4], dest[5], dest[6], dest[7]); -} - -static void test_StrXXX_overflows(void) -{ - CHAR str1[2*MAX_PATH+1], buf[2*MAX_PATH]; - WCHAR wstr1[2*MAX_PATH+1], wbuf[2*MAX_PATH]; - const WCHAR fmt[] = {'%','s',0}; - STRRET strret; - int ret; - int i; - - for (i=0; i<2*MAX_PATH; i++) - { - str1[i] = '0'+(i%10); - wstr1[i] = '0'+(i%10); - } - str1[2*MAX_PATH] = 0; - wstr1[2*MAX_PATH] = 0; - - memset(buf, 0xbf, sizeof(buf)); - expect_eq(StrCpyNA(buf, str1, 10), buf, PCHAR, "%p"); - expect_eq(buf[9], 0, CHAR, "%x"); - expect_eq(buf[10], '\xbf', CHAR, "%x"); - - if (pStrCatBuffA) - { - expect_eq(pStrCatBuffA(buf, str1, 100), buf, PCHAR, "%p"); - expect_eq(buf[99], 0, CHAR, "%x"); - expect_eq(buf[100], '\xbf', CHAR, "%x"); - } - else - win_skip("StrCatBuffA() is not available\n"); - -if (0) -{ - /* crashes on XP */ - StrCpyNW(wbuf, (LPCWSTR)0x1, 10); - StrCpyNW((LPWSTR)0x1, wstr1, 10); -} - - memset(wbuf, 0xbf, sizeof(wbuf)); - expect_eq(StrCpyNW(wbuf, (LPCWSTR)0x1, 1), wbuf, PWCHAR, "%p"); - expect_eq(wbuf[0], 0, WCHAR, "%x"); - expect_eq(wbuf[1], (WCHAR)0xbfbf, WCHAR, "%x"); - - memset(wbuf, 0xbf, sizeof(wbuf)); - expect_eq(StrCpyNW(wbuf, 0, 10), wbuf, PWCHAR, "%p"); - expect_eq(wbuf[0], 0, WCHAR, "%x"); - expect_eq(wbuf[1], (WCHAR)0xbfbf, WCHAR, "%x"); - - memset(wbuf, 0xbf, sizeof(wbuf)); - expect_eq(StrCpyNW(wbuf, 0, 0), wbuf, PWCHAR, "%p"); - expect_eq(wbuf[0], (WCHAR)0xbfbf, WCHAR, "%x"); - expect_eq(wbuf[1], (WCHAR)0xbfbf, WCHAR, "%x"); - - memset(wbuf, 0xbf, sizeof(wbuf)); - expect_eq(StrCpyNW(wbuf, wstr1, 0), wbuf, PWCHAR, "%p"); - expect_eq(wbuf[0], (WCHAR)0xbfbf, WCHAR, "%x"); - expect_eq(wbuf[1], (WCHAR)0xbfbf, WCHAR, "%x"); - - memset(wbuf, 0xbf, sizeof(wbuf)); - expect_eq(StrCpyNW(wbuf, wstr1, 10), wbuf, PWCHAR, "%p"); - expect_eq(wbuf[9], 0, WCHAR, "%x"); - expect_eq(wbuf[10], (WCHAR)0xbfbf, WCHAR, "%x"); - - if (pStrCatBuffW) - { - expect_eq(pStrCatBuffW(wbuf, wstr1, 100), wbuf, PWCHAR, "%p"); - expect_eq(wbuf[99], 0, WCHAR, "%x"); - expect_eq(wbuf[100], (WCHAR)0xbfbf, WCHAR, "%x"); - } - else - win_skip("StrCatBuffW() is not available\n"); - - if (pStrRetToBufW) - { - memset(wbuf, 0xbf, sizeof(wbuf)); - strret.uType = STRRET_WSTR; - U(strret).pOleStr = StrDupW(wstr1); - expect_eq2(pStrRetToBufW(&strret, NULL, wbuf, 10), S_OK, HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER) /* Vista */, HRESULT, "%x"); - expect_eq(wbuf[9], 0, WCHAR, "%x"); - expect_eq(wbuf[10], (WCHAR)0xbfbf, WCHAR, "%x"); - } - else - win_skip("StrRetToBufW() is not available\n"); - - if (pStrRetToBufA) - { - memset(buf, 0xbf, sizeof(buf)); - strret.uType = STRRET_CSTR; - StrCpyN(U(strret).cStr, str1, MAX_PATH); - expect_eq2(pStrRetToBufA(&strret, NULL, buf, 10), S_OK, HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER) /* Vista */, HRESULT, "%x"); - expect_eq(buf[9], 0, CHAR, "%x"); - expect_eq(buf[10], (CHAR)0xbf, CHAR, "%x"); - } - else - win_skip("StrRetToBufA() is not available\n"); - - if (pwnsprintfA) - { - memset(buf, 0xbf, sizeof(buf)); - ret = pwnsprintfA(buf, 10, "%s", str1); - ok(broken(ret == 9) || ret == -1 /* Vista */, "Unexpected wsnprintfA return %d, expected 9 or -1\n", ret); - expect_eq(buf[9], 0, CHAR, "%x"); - expect_eq(buf[10], (CHAR)0xbf, CHAR, "%x"); - } - else - win_skip("wnsprintfA() is not available\n"); - - if (pwnsprintfW) - { - memset(wbuf, 0xbf, sizeof(wbuf)); - ret = pwnsprintfW(wbuf, 10, fmt, wstr1); - ok(broken(ret == 9) || ret == -1 /* Vista */, "Unexpected wsnprintfW return %d, expected 9 or -1\n", ret); - expect_eq(wbuf[9], 0, WCHAR, "%x"); - expect_eq(wbuf[10], (WCHAR)0xbfbf, WCHAR, "%x"); - } - else - win_skip("wnsprintfW() is not available\n"); -} - -START_TEST(string) -{ - HMODULE hShlwapi; - TCHAR thousandDelim[8]; - TCHAR decimalDelim[8]; - CoInitialize(0); - - GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND, thousandDelim, 8); - GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, decimalDelim, 8); - - hShlwapi = GetModuleHandleA("shlwapi"); - pChrCmpIA = (void *)GetProcAddress(hShlwapi, "ChrCmpIA"); - pChrCmpIW = (void *)GetProcAddress(hShlwapi, "ChrCmpIW"); - pIntlStrEqWorkerA = (void *)GetProcAddress(hShlwapi, "IntlStrEqWorkerA"); - pIntlStrEqWorkerW = (void *)GetProcAddress(hShlwapi, "IntlStrEqWorkerW"); - pSHAnsiToAnsi = (void *)GetProcAddress(hShlwapi, (LPSTR)345); - pSHUnicodeToUnicode = (void *)GetProcAddress(hShlwapi, (LPSTR)346); - pStrCatBuffA = (void *)GetProcAddress(hShlwapi, "StrCatBuffA"); - pStrCatBuffW = (void *)GetProcAddress(hShlwapi, "StrCatBuffW"); - pStrCpyNXA = (void *)GetProcAddress(hShlwapi, (LPSTR)399); - pStrCpyNXW = (void *)GetProcAddress(hShlwapi, (LPSTR)400); - pStrChrNW = (void *)GetProcAddress(hShlwapi, "StrChrNW"); - pStrFormatByteSize64A = (void *)GetProcAddress(hShlwapi, "StrFormatByteSize64A"); - pStrFormatKBSizeA = (void *)GetProcAddress(hShlwapi, "StrFormatKBSizeA"); - pStrFormatKBSizeW = (void *)GetProcAddress(hShlwapi, "StrFormatKBSizeW"); - pStrIsIntlEqualA = (void *)GetProcAddress(hShlwapi, "StrIsIntlEqualA"); - pStrIsIntlEqualW = (void *)GetProcAddress(hShlwapi, "StrIsIntlEqualW"); - pStrRetToBSTR = (void *)GetProcAddress(hShlwapi, "StrRetToBSTR"); - pStrRetToBufA = (void *)GetProcAddress(hShlwapi, "StrRetToBufA"); - pStrRetToBufW = (void *)GetProcAddress(hShlwapi, "StrRetToBufW"); - pwnsprintfA = (void *)GetProcAddress(hShlwapi, "wnsprintfA"); - pwnsprintfW = (void *)GetProcAddress(hShlwapi, "wnsprintfW"); - - test_StrChrA(); - test_StrChrW(); - test_StrChrIA(); - test_StrChrIW(); - test_StrRChrA(); - test_StrRChrW(); - test_StrCpyW(); - test_StrChrNW(); - test_StrToIntA(); - test_StrToIntW(); - test_StrToIntExA(); - test_StrToIntExW(); - test_StrDupA(); - if (lstrcmp(thousandDelim, ",")==0 && lstrcmp(decimalDelim, ".")==0) - { - /* these tests are locale-dependent */ - test_StrFormatByteSize64A(); - test_StrFormatKBSizeA(); - test_StrFormatKBSizeW(); - } - - /* language-dependent test */ - if (PRIMARYLANGID(GetUserDefaultLangID()) != LANG_ENGLISH) - trace("Skipping StrFromTimeInterval test for non English language\n"); - else - test_StrFromTimeIntervalA(); - - test_StrCmpA(); - test_StrCmpW(); - test_StrRetToBSTR(); - test_StrCpyNXA(); - test_StrCpyNXW(); - test_StrRStrI(); - test_SHAnsiToAnsi(); - test_SHUnicodeToUnicode(); - test_StrXXX_overflows(); - - CoUninitialize(); -} diff --git a/rostests/winetests/shlwapi/testlist.c b/rostests/winetests/shlwapi/testlist.c deleted file mode 100755 index 4940c49f4c4..00000000000 --- a/rostests/winetests/shlwapi/testlist.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_clist(void); -extern void func_clsid(void); -extern void func_generated(void); -extern void func_istream(void); -extern void func_ordinal(void); -extern void func_path(void); -extern void func_shreg(void); -extern void func_string(void); -extern void func_thread(void); -extern void func_url(void); - -const struct test winetest_testlist[] = -{ - { "clist", func_clist }, - { "clsid", func_clsid }, - { "generated", func_generated }, - { "istream", func_istream }, - { "ordinal", func_ordinal }, - { "path", func_path }, - { "shreg", func_shreg }, - { "string", func_string }, - { "thread", func_thread }, - { "url", func_url }, - { 0, 0 } -}; diff --git a/rostests/winetests/shlwapi/thread.c b/rostests/winetests/shlwapi/thread.c deleted file mode 100644 index 24d5be15802..00000000000 --- a/rostests/winetests/shlwapi/thread.c +++ /dev/null @@ -1,249 +0,0 @@ -/* Tests for Thread and SHGlobalCounter functions - * - * 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 -#include - -#define COBJMACROS -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "ole2.h" -#include "shlwapi.h" - -#include "wine/test.h" - -static HRESULT (WINAPI *pSHCreateThreadRef)(LONG*, IUnknown**); -static HRESULT (WINAPI *pSHGetThreadRef)(IUnknown**); -static HRESULT (WINAPI *pSHSetThreadRef)(IUnknown*); - -static DWORD AddRef_called; - -typedef struct -{ - const IUnknownVtbl* lpVtbl; - LONG *ref; -} threadref; - -static HRESULT WINAPI threadref_QueryInterface(IUnknown *iface, REFIID riid, LPVOID *ppvObj) -{ - threadref * This = (threadref *)iface; - - trace("unexpected QueryInterface(%p, %p, %p) called\n", This, riid, ppvObj); - *ppvObj = NULL; - return E_NOINTERFACE; -} - -static ULONG WINAPI threadref_AddRef(IUnknown *iface) -{ - threadref * This = (threadref *)iface; - - AddRef_called++; - return InterlockedIncrement(This->ref); -} - -static ULONG WINAPI threadref_Release(IUnknown *iface) -{ - threadref * This = (threadref *)iface; - - trace("unexpected Release(%p) called\n", This); - return InterlockedDecrement(This->ref); -} - -/* VTable */ -static const IUnknownVtbl threadref_vt = -{ - threadref_QueryInterface, - threadref_AddRef, - threadref_Release -}; - -static void init_threadref(threadref* iface, LONG *refcount) -{ - iface->lpVtbl = &threadref_vt; - iface->ref = refcount; -} - -/* ##### */ - -static void test_SHCreateThreadRef(void) -{ - IUnknown *pobj; - IUnknown *punk; - LONG refcount; - HRESULT hr; - - /* Not present before IE 6_XP_sp2 */ - if (!pSHCreateThreadRef) { - win_skip("SHCreateThreadRef not found\n"); - return; - } - - /* start with a clean state */ - hr = pSHSetThreadRef(NULL); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); - - pobj = NULL; - refcount = 0xdeadbeef; - hr = pSHCreateThreadRef(&refcount, &pobj); - ok((hr == S_OK) && pobj && (refcount == 1), - "got 0x%x and %p with %d (expected S_OK and '!= NULL' with 1)\n", - hr, pobj, refcount); - - /* the object is not automatic set as ThreadRef */ - punk = NULL; - hr = pSHGetThreadRef(&punk); - ok( (hr == E_NOINTERFACE) && (punk == NULL), - "got 0x%x and %p (expected E_NOINTERFACE and NULL)\n", hr, punk); - - /* set the object */ - hr = pSHSetThreadRef(pobj); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); - - /* read back */ - punk = NULL; - hr = pSHGetThreadRef(&punk); - ok( (hr == S_OK) && (punk == pobj) && (refcount == 2), - "got 0x%x and %p with %d (expected S_OK and %p with 2)\n", - hr, punk, refcount, pobj); - - /* free the ref from SHGetThreadRef */ - if (SUCCEEDED(hr)) { - hr = IUnknown_Release(pobj); - ok((hr == 1) && (hr == refcount), - "got %d with %d (expected 1 with 1)\n", hr, refcount); - } - - /* free the object */ - if (pobj) { - hr = IUnknown_Release(pobj); - ok((hr == 0) && (hr == refcount), - "got %d with %d (expected 0 with 0)\n", hr, refcount); - } - - if (0) { - /* the ThreadRef has still the pointer, - but the object no longer exist after the *_Release */ - punk = NULL; - hr = pSHGetThreadRef(&punk); - trace("got 0x%x and %p with %d\n", hr, punk, refcount); - } - - /* remove the dead object pointer */ - hr = pSHSetThreadRef(NULL); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); - - /* parameter check */ - if (0) { - /* vista: E_INVALIDARG, XP: crash */ - pobj = NULL; - hr = pSHCreateThreadRef(NULL, &pobj); - ok(hr == E_INVALIDARG, "got 0x%x (expected E_INVALIDARG)\n", hr); - - refcount = 0xdeadbeef; - /* vista: E_INVALIDARG, XP: crash */ - hr = pSHCreateThreadRef(&refcount, NULL); - ok( (hr == E_INVALIDARG) && (refcount == 0xdeadbeef), - "got 0x%x with 0x%x (expected E_INVALIDARG and oxdeadbeef)\n", - hr, refcount); - } -} - - -static void test_SHGetThreadRef(void) -{ - IUnknown *punk; - HRESULT hr; - - /* Not present before IE 5 */ - if (!pSHGetThreadRef) { - win_skip("SHGetThreadRef not found\n"); - return; - } - - punk = NULL; - hr = pSHGetThreadRef(&punk); - ok( (hr == E_NOINTERFACE) && (punk == NULL), - "got 0x%x and %p (expected E_NOINTERFACE and NULL)\n", hr, punk); - - if (0) { - /* this crash on Windows */ - hr = pSHGetThreadRef(NULL); - } -} - -static void test_SHSetThreadRef(void) -{ - threadref ref; - IUnknown *punk; - HRESULT hr; - LONG refcount; - - /* Not present before IE 5 */ - if (!pSHSetThreadRef) { - win_skip("SHSetThreadRef not found\n"); - return; - } - - /* start with a clean state */ - hr = pSHSetThreadRef(NULL); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); - - /* build and set out object */ - init_threadref(&ref, &refcount); - AddRef_called = 0; - refcount = 1; - hr = pSHSetThreadRef( (IUnknown *)&ref); - ok( (hr == S_OK) && (refcount == 1) && (!AddRef_called), - "got 0x%x with %d, %d (expected S_OK with 1, 0)\n", - hr, refcount, AddRef_called); - - /* read back our object */ - AddRef_called = 0; - refcount = 1; - punk = NULL; - hr = pSHGetThreadRef(&punk); - ok( (hr == S_OK) && (punk == (IUnknown *)&ref) && (refcount == 2) && (AddRef_called == 1), - "got 0x%x and %p with %d, %d (expected S_OK and %p with 2, 1)\n", - hr, punk, refcount, AddRef_called, &ref); - - /* clear the object pointer */ - hr = pSHSetThreadRef(NULL); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); - - /* verify, that our object is no longer known as ThreadRef */ - hr = pSHGetThreadRef(&punk); - ok( (hr == E_NOINTERFACE) && (punk == NULL), - "got 0x%x and %p (expected E_NOINTERFACE and NULL)\n", hr, punk); - -} - -START_TEST(thread) -{ - HMODULE hshlwapi = GetModuleHandleA("shlwapi.dll"); - - pSHCreateThreadRef = (void *) GetProcAddress(hshlwapi, "SHCreateThreadRef"); - pSHGetThreadRef = (void *) GetProcAddress(hshlwapi, "SHGetThreadRef"); - pSHSetThreadRef = (void *) GetProcAddress(hshlwapi, "SHSetThreadRef"); - - test_SHCreateThreadRef(); - test_SHGetThreadRef(); - test_SHSetThreadRef(); - -} diff --git a/rostests/winetests/shlwapi/url.c b/rostests/winetests/shlwapi/url.c deleted file mode 100644 index 8a8f68a8f9e..00000000000 --- a/rostests/winetests/shlwapi/url.c +++ /dev/null @@ -1,1424 +0,0 @@ -/* Unit test suite for Path functions - * - * Copyright 2002 Matthew Mastracci - * Copyright 2007-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 -#include - -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "shlwapi.h" -#include "wininet.h" -#include "intshcut.h" - -/* ################ */ -static HMODULE hShlwapi; -static HRESULT (WINAPI *pUrlUnescapeA)(LPSTR,LPSTR,LPDWORD,DWORD); -static HRESULT (WINAPI *pUrlUnescapeW)(LPWSTR,LPWSTR,LPDWORD,DWORD); -static BOOL (WINAPI *pUrlIsA)(LPCSTR,URLIS); -static BOOL (WINAPI *pUrlIsW)(LPCWSTR,URLIS); -static HRESULT (WINAPI *pUrlHashA)(LPCSTR,LPBYTE,DWORD); -static HRESULT (WINAPI *pUrlHashW)(LPCWSTR,LPBYTE,DWORD); -static HRESULT (WINAPI *pUrlGetPartA)(LPCSTR,LPSTR,LPDWORD,DWORD,DWORD); -static HRESULT (WINAPI *pUrlGetPartW)(LPCWSTR,LPWSTR,LPDWORD,DWORD,DWORD); -static HRESULT (WINAPI *pUrlEscapeA)(LPCSTR,LPSTR,LPDWORD,DWORD); -static HRESULT (WINAPI *pUrlEscapeW)(LPCWSTR,LPWSTR,LPDWORD,DWORD); -static HRESULT (WINAPI *pUrlCreateFromPathA)(LPCSTR,LPSTR,LPDWORD,DWORD); -static HRESULT (WINAPI *pUrlCreateFromPathW)(LPCWSTR,LPWSTR,LPDWORD,DWORD); -static HRESULT (WINAPI *pUrlCombineA)(LPCSTR,LPCSTR,LPSTR,LPDWORD,DWORD); -static HRESULT (WINAPI *pUrlCombineW)(LPCWSTR,LPCWSTR,LPWSTR,LPDWORD,DWORD); -static HRESULT (WINAPI *pUrlCanonicalizeA)(LPCSTR, LPSTR, LPDWORD, DWORD); -static HRESULT (WINAPI *pUrlCanonicalizeW)(LPCWSTR, LPWSTR, LPDWORD, DWORD); -static HRESULT (WINAPI *pUrlApplySchemeA)(LPCSTR,LPSTR,LPDWORD,DWORD); -static HRESULT (WINAPI *pUrlApplySchemeW)(LPCWSTR,LPWSTR,LPDWORD,DWORD); -static HRESULT (WINAPI *pParseURLA)(LPCSTR,PARSEDURLA*); -static HRESULT (WINAPI *pParseURLW)(LPCWSTR,PARSEDURLW*); -static HRESULT (WINAPI *pHashData)(LPBYTE, DWORD, LPBYTE, DWORD); - -static const char* TEST_URL_1 = "http://www.winehq.org/tests?date=10/10/1923"; -static const char* TEST_URL_2 = "http://localhost:8080/tests%2e.html?date=Mon%2010/10/1923"; -static const char* TEST_URL_3 = "http://foo:bar@localhost:21/internal.php?query=x&return=y"; -static const WCHAR winehqW[] = {'h','t','t','p',':','/','/','w','w','w','.','w','i','n','e','h','q','.','o','r','g','/',0}; -static const CHAR winehqA[] = {'h','t','t','p',':','/','/','w','w','w','.','w','i','n','e','h','q','.','o','r','g','/',0}; - -/* ################ */ - -static const CHAR untouchedA[] = "untouched"; - -#define TEST_APPLY_MAX_LENGTH INTERNET_MAX_URL_LENGTH - -typedef struct _TEST_URL_APPLY { - const char * url; - DWORD flags; - HRESULT res; - DWORD newlen; - const char * newurl; -} TEST_URL_APPLY; - -static const TEST_URL_APPLY TEST_APPLY[] = { - {"www.winehq.org", URL_APPLY_GUESSSCHEME | URL_APPLY_DEFAULT, S_OK, 21, "http://www.winehq.org"}, - {"www.winehq.org", URL_APPLY_GUESSSCHEME, S_OK, 21, "http://www.winehq.org"}, - {"www.winehq.org", URL_APPLY_DEFAULT, S_OK, 21, "http://www.winehq.org"}, - {"ftp.winehq.org", URL_APPLY_GUESSSCHEME | URL_APPLY_DEFAULT, S_OK, 20, "ftp://ftp.winehq.org"}, - {"ftp.winehq.org", URL_APPLY_GUESSSCHEME, S_OK, 20, "ftp://ftp.winehq.org"}, - {"ftp.winehq.org", URL_APPLY_DEFAULT, S_OK, 21, "http://ftp.winehq.org"}, - {"winehq.org", URL_APPLY_GUESSSCHEME | URL_APPLY_DEFAULT, S_OK, 17, "http://winehq.org"}, - {"winehq.org", URL_APPLY_GUESSSCHEME, S_FALSE, TEST_APPLY_MAX_LENGTH, untouchedA}, - {"winehq.org", URL_APPLY_DEFAULT, S_OK, 17, "http://winehq.org"}, - {"", URL_APPLY_GUESSSCHEME | URL_APPLY_DEFAULT, S_OK, 7, "http://"}, - {"", URL_APPLY_GUESSSCHEME, S_FALSE, TEST_APPLY_MAX_LENGTH, untouchedA}, - {"", URL_APPLY_DEFAULT, S_OK, 7, "http://"} -}; - -/* ################ */ - -typedef struct _TEST_URL_CANONICALIZE { - const char *url; - DWORD flags; - HRESULT expectret; - const char *expecturl; - BOOL todo; -} TEST_URL_CANONICALIZE; - -static const TEST_URL_CANONICALIZE TEST_CANONICALIZE[] = { - {"http://www.winehq.org/tests/../tests/../..", 0, S_OK, "http://www.winehq.org/", TRUE}, - {"http://www.winehq.org/tests/../tests", 0, S_OK, "http://www.winehq.org/tests", FALSE}, - {"http://www.winehq.org/tests\n", URL_WININET_COMPATIBILITY|URL_ESCAPE_SPACES_ONLY|URL_ESCAPE_UNSAFE, S_OK, "http://www.winehq.org/tests", FALSE}, - {"http://www.winehq.org/tests\r", URL_WININET_COMPATIBILITY|URL_ESCAPE_SPACES_ONLY|URL_ESCAPE_UNSAFE, S_OK, "http://www.winehq.org/tests", FALSE}, - {"http://www.winehq.org/tests\r", 0, S_OK, "http://www.winehq.org/tests", FALSE}, - {"http://www.winehq.org/tests\r", URL_DONT_SIMPLIFY, S_OK, "http://www.winehq.org/tests", FALSE}, - {"http://www.winehq.org/tests/../tests/", 0, S_OK, "http://www.winehq.org/tests/", FALSE}, - {"http://www.winehq.org/tests/../tests/..", 0, S_OK, "http://www.winehq.org/", FALSE}, - {"http://www.winehq.org/tests/../tests/../", 0, S_OK, "http://www.winehq.org/", FALSE}, - {"http://www.winehq.org/tests/..", 0, S_OK, "http://www.winehq.org/", FALSE}, - {"http://www.winehq.org/tests/../", 0, S_OK, "http://www.winehq.org/", FALSE}, - {"http://www.winehq.org/tests/..?query=x&return=y", 0, S_OK, "http://www.winehq.org/?query=x&return=y", FALSE}, - {"http://www.winehq.org/tests/../?query=x&return=y", 0, S_OK, "http://www.winehq.org/?query=x&return=y", FALSE}, - {"http://www.winehq.org/tests/..#example", 0, S_OK, "http://www.winehq.org/#example", FALSE}, - {"http://www.winehq.org/tests/../#example", 0, S_OK, "http://www.winehq.org/#example", FALSE}, - {"http://www.winehq.org/tests\\../#example", 0, S_OK, "http://www.winehq.org/#example", FALSE}, - {"http://www.winehq.org/tests/..\\#example", 0, S_OK, "http://www.winehq.org/#example", FALSE}, - {"http://www.winehq.org\\tests/../#example", 0, S_OK, "http://www.winehq.org/#example", FALSE}, - {"http://www.winehq.org/tests/../#example", URL_DONT_SIMPLIFY, S_OK, "http://www.winehq.org/tests/../#example", FALSE}, - {"http://www.winehq.org/tests/foo bar", URL_ESCAPE_SPACES_ONLY| URL_DONT_ESCAPE_EXTRA_INFO , S_OK, "http://www.winehq.org/tests/foo%20bar", FALSE}, - {"http://www.winehq.org/tests/foo%20bar", URL_UNESCAPE , S_OK, "http://www.winehq.org/tests/foo bar", FALSE}, - {"file:///c:/tests/foo%20bar", URL_UNESCAPE , S_OK, "file:///c:/tests/foo bar", FALSE}, - {"file:///c:/tests\\foo%20bar", URL_UNESCAPE , S_OK, "file:///c:/tests/foo bar", FALSE}, - {"file:///c:/tests/foo%20bar", 0, S_OK, "file:///c:/tests/foo%20bar", FALSE}, - {"file:///c:/tests/foo%20bar", URL_FILE_USE_PATHURL, S_OK, "file://c:\\tests\\foo bar", FALSE}, - {"file://localhost/c:/tests/../tests/foo%20bar", URL_FILE_USE_PATHURL, S_OK, "file://c:\\tests\\foo bar", FALSE}, - {"file://localhost\\c:/tests/../tests/foo%20bar", URL_FILE_USE_PATHURL, S_OK, "file://c:\\tests\\foo bar", FALSE}, - {"file://localhost\\\\c:/tests/../tests/foo%20bar", URL_FILE_USE_PATHURL, S_OK, "file://c:\\tests\\foo bar", FALSE}, - {"file://localhost\\c:\\tests/../tests/foo%20bar", URL_FILE_USE_PATHURL, S_OK, "file://c:\\tests\\foo bar", FALSE}, - {"file://c:/tests/../tests/foo%20bar", URL_FILE_USE_PATHURL, S_OK, "file://c:\\tests\\foo bar", FALSE}, - {"file://c:/tests\\../tests/foo%20bar", URL_FILE_USE_PATHURL, S_OK, "file://c:\\tests\\foo bar", FALSE}, - {"file://c:/tests/foo%20bar", URL_FILE_USE_PATHURL, S_OK, "file://c:\\tests\\foo bar", FALSE}, - {"file:///c://tests/foo%20bar", URL_FILE_USE_PATHURL, S_OK, "file://c:\\\\tests\\foo bar", FALSE}, - {"file:///c:\\tests\\foo bar", 0, S_OK, "file:///c:/tests/foo bar", FALSE}, - {"file:///c:\\tests\\foo bar", URL_DONT_SIMPLIFY, S_OK, "file:///c:/tests/foo bar", FALSE}, - {"http://www.winehq.org/site/about", URL_FILE_USE_PATHURL, S_OK, "http://www.winehq.org/site/about", FALSE}, - {"file_://www.winehq.org/site/about", URL_FILE_USE_PATHURL, S_OK, "file_://www.winehq.org/site/about", FALSE}, - {"c:\\dir\\file", 0, S_OK, "file:///c:/dir/file", FALSE}, - {"file:///c:\\dir\\file", 0, S_OK, "file:///c:/dir/file", FALSE}, - {"c:dir\\file", 0, S_OK, "file:///c:dir/file", FALSE}, - {"c:\\tests\\foo bar", URL_FILE_USE_PATHURL, S_OK, "file://c:\\tests\\foo bar", FALSE}, - {"c:\\tests\\foo bar", 0, S_OK, "file:///c:/tests/foo%20bar", FALSE}, - {"res://file", 0, S_OK, "res://file/", FALSE}, - {"res://file", URL_FILE_USE_PATHURL, S_OK, "res://file/", FALSE}, - {"res:///c:/tests/foo%20bar", URL_UNESCAPE , S_OK, "res:///c:/tests/foo bar", FALSE}, - {"res:///c:/tests\\foo%20bar", URL_UNESCAPE , S_OK, "res:///c:/tests\\foo bar", FALSE}, - {"res:///c:/tests/foo%20bar", 0, S_OK, "res:///c:/tests/foo%20bar", FALSE}, - {"res:///c:/tests/foo%20bar", URL_FILE_USE_PATHURL, S_OK, "res:///c:/tests/foo%20bar", FALSE}, - {"res://c:/tests/../tests/foo%20bar", URL_FILE_USE_PATHURL, S_OK, "res://c:/tests/foo%20bar", FALSE}, - {"res://c:/tests\\../tests/foo%20bar", URL_FILE_USE_PATHURL, S_OK, "res://c:/tests/foo%20bar", FALSE}, - {"res://c:/tests/foo%20bar", URL_FILE_USE_PATHURL, S_OK, "res://c:/tests/foo%20bar", FALSE}, - {"res:///c://tests/foo%20bar", URL_FILE_USE_PATHURL, S_OK, "res:///c://tests/foo%20bar", FALSE}, - {"res:///c:\\tests\\foo bar", 0, S_OK, "res:///c:\\tests\\foo bar", FALSE}, - {"res:///c:\\tests\\foo bar", URL_DONT_SIMPLIFY, S_OK, "res:///c:\\tests\\foo bar", FALSE}, - {"res://c:\\tests\\foo bar/res", URL_FILE_USE_PATHURL, S_OK, "res://c:\\tests\\foo bar/res", FALSE}, - {"res://c:\\tests/res\\foo%20bar/strange\\sth", 0, S_OK, "res://c:\\tests/res\\foo%20bar/strange\\sth", FALSE}, - {"res://c:\\tests/res\\foo%20bar/strange\\sth", URL_FILE_USE_PATHURL, S_OK, "res://c:\\tests/res\\foo%20bar/strange\\sth", FALSE}, - {"res://c:\\tests/res\\foo%20bar/strange\\sth", URL_UNESCAPE, S_OK, "res://c:\\tests/res\\foo bar/strange\\sth", FALSE}, - {"A", 0, S_OK, "A", FALSE}, - {"/uri-res/N2R?urn:sha1:B3K", URL_DONT_ESCAPE_EXTRA_INFO | URL_WININET_COMPATIBILITY /*0x82000000*/, S_OK, "/uri-res/N2R?urn:sha1:B3K", FALSE} /*LimeWire online installer calls this*/, - {"http:www.winehq.org/dir/../index.html", 0, S_OK, "http:www.winehq.org/index.html"}, - {"http://localhost/test.html", URL_FILE_USE_PATHURL, S_OK, "http://localhost/test.html"}, - {"http://localhost/te%20st.html", URL_FILE_USE_PATHURL, S_OK, "http://localhost/te%20st.html"}, - {"http://www.winehq.org/%E6%A1%9C.html", URL_FILE_USE_PATHURL, S_OK, "http://www.winehq.org/%E6%A1%9C.html"} -}; - -/* ################ */ - -typedef struct _TEST_URL_ESCAPE { - const char *url; - DWORD flags; - DWORD expectescaped; - HRESULT expectret; - const char *expecturl; -} TEST_URL_ESCAPE; - -static const TEST_URL_ESCAPE TEST_ESCAPE[] = { - {"http://www.winehq.org/tests0", 0, 0, S_OK, "http://www.winehq.org/tests0"}, - {"http://www.winehq.org/tests1\n", 0, 0, S_OK, "http://www.winehq.org/tests1%0A"}, - {"http://www.winehq.org/tests2\r", 0, 0, S_OK, "http://www.winehq.org/tests2%0D"}, - {"http://www.winehq.org/tests3\r", URL_ESCAPE_SPACES_ONLY|URL_ESCAPE_UNSAFE, 0, S_OK, "http://www.winehq.org/tests3\r"}, - {"http://www.winehq.org/tests4\r", URL_ESCAPE_SPACES_ONLY, 0, S_OK, "http://www.winehq.org/tests4\r"}, - {"http://www.winehq.org/tests5\r", URL_WININET_COMPATIBILITY|URL_ESCAPE_SPACES_ONLY, 0, S_OK, "http://www.winehq.org/tests5\r"}, - {"/direct/swhelp/series6/6.2i_latestservicepack.dat\r", URL_ESCAPE_SPACES_ONLY, 0, S_OK, "/direct/swhelp/series6/6.2i_latestservicepack.dat\r"}, - - {"file://////foo/bar\\baz", 0, 0, S_OK, "file://foo/bar/baz"}, - {"file://///foo/bar\\baz", 0, 0, S_OK, "file://foo/bar/baz"}, - {"file:////foo/bar\\baz", 0, 0, S_OK, "file://foo/bar/baz"}, - {"file:///localhost/foo/bar\\baz", 0, 0, S_OK, "file:///localhost/foo/bar/baz"}, - {"file:///foo/bar\\baz", 0, 0, S_OK, "file:///foo/bar/baz"}, - {"file://loCalHost/foo/bar\\baz", 0, 0, S_OK, "file:///foo/bar/baz"}, - {"file://foo/bar\\baz", 0, 0, S_OK, "file://foo/bar/baz"}, - {"file:/localhost/foo/bar\\baz", 0, 0, S_OK, "file:///localhost/foo/bar/baz"}, - {"file:/foo/bar\\baz", 0, 0, S_OK, "file:///foo/bar/baz"}, - {"file:foo/bar\\baz", 0, 0, S_OK, "file:foo/bar/baz"}, - {"file:\\foo/bar\\baz", 0, 0, S_OK, "file:///foo/bar/baz"}, - {"file:\\\\foo/bar\\baz", 0, 0, S_OK, "file://foo/bar/baz"}, - {"file:\\\\\\foo/bar\\baz", 0, 0, S_OK, "file:///foo/bar/baz"}, - {"file:\\\\localhost\\foo/bar\\baz", 0, 0, S_OK, "file:///foo/bar/baz"}, - {"file:///f oo/b?a r\\baz", 0, 0, S_OK, "file:///f%20oo/b?a r\\baz"}, - {"file:///foo/b#a r\\baz", 0, 0, S_OK, "file:///foo/b%23a%20r/baz"}, - {"file:///f o^&`{}|][\"<>\\%o/b#a r\\baz", 0, 0, S_OK, "file:///f%20o%5E%26%60%7B%7D%7C%5D%5B%22%3C%3E/%o/b%23a%20r/baz"}, - {"file:///f o%o/b?a r\\b%az", URL_ESCAPE_PERCENT, 0, S_OK, "file:///f%20o%25o/b?a r\\b%az"}, - {"file:/foo/bar\\baz", URL_ESCAPE_SEGMENT_ONLY, 0, S_OK, "file:%2Ffoo%2Fbar%5Cbaz"}, - - {"foo/b%ar\\ba?z\\", URL_ESCAPE_SEGMENT_ONLY, 0, S_OK, "foo%2Fb%ar%5Cba%3Fz%5C"}, - {"foo/b%ar\\ba?z\\", URL_ESCAPE_PERCENT | URL_ESCAPE_SEGMENT_ONLY, 0, S_OK, "foo%2Fb%25ar%5Cba%3Fz%5C"}, - {"foo/bar\\ba?z\\", 0, 0, S_OK, "foo/bar%5Cba?z\\"}, - {"/foo/bar\\ba?z\\", 0, 0, S_OK, "/foo/bar%5Cba?z\\"}, - {"/foo/bar\\ba#z\\", 0, 0, S_OK, "/foo/bar%5Cba#z\\"}, - {"/foo/%5C", 0, 0, S_OK, "/foo/%5C"}, - {"/foo/%5C", URL_ESCAPE_PERCENT, 0, S_OK, "/foo/%255C"}, - - {"http://////foo/bar\\baz", 0, 0, S_OK, "http://////foo/bar/baz"}, - {"http://///foo/bar\\baz", 0, 0, S_OK, "http://///foo/bar/baz"}, - {"http:////foo/bar\\baz", 0, 0, S_OK, "http:////foo/bar/baz"}, - {"http:///foo/bar\\baz", 0, 0, S_OK, "http:///foo/bar/baz"}, - {"http://localhost/foo/bar\\baz", 0, 0, S_OK, "http://localhost/foo/bar/baz"}, - {"http://foo/bar\\baz", 0, 0, S_OK, "http://foo/bar/baz"}, - {"http:/foo/bar\\baz", 0, 0, S_OK, "http:/foo/bar/baz"}, - {"http:foo/bar\\ba?z\\", 0, 0, S_OK, "http:foo%2Fbar%2Fba?z\\"}, - {"http:foo/bar\\ba#z\\", 0, 0, S_OK, "http:foo%2Fbar%2Fba#z\\"}, - {"http:\\foo/bar\\baz", 0, 0, S_OK, "http:/foo/bar/baz"}, - {"http:\\\\foo/bar\\baz", 0, 0, S_OK, "http://foo/bar/baz"}, - {"http:\\\\\\foo/bar\\baz", 0, 0, S_OK, "http:///foo/bar/baz"}, - {"http:\\\\\\\\foo/bar\\baz", 0, 0, S_OK, "http:////foo/bar/baz"}, - {"http:/fo ?o/b ar\\baz", 0, 0, S_OK, "http:/fo%20?o/b ar\\baz"}, - {"http:fo ?o/b ar\\baz", 0, 0, S_OK, "http:fo%20?o/b ar\\baz"}, - {"http:/foo/bar\\baz", URL_ESCAPE_SEGMENT_ONLY, 0, S_OK, "http:%2Ffoo%2Fbar%5Cbaz"}, - - {"https://foo/bar\\baz", 0, 0, S_OK, "https://foo/bar/baz"}, - {"https:/foo/bar\\baz", 0, 0, S_OK, "https:/foo/bar/baz"}, - {"https:\\foo/bar\\baz", 0, 0, S_OK, "https:/foo/bar/baz"}, - - {"foo:////foo/bar\\baz", 0, 0, S_OK, "foo:////foo/bar%5Cbaz"}, - {"foo:///foo/bar\\baz", 0, 0, S_OK, "foo:///foo/bar%5Cbaz"}, - {"foo://localhost/foo/bar\\baz", 0, 0, S_OK, "foo://localhost/foo/bar%5Cbaz"}, - {"foo://foo/bar\\baz", 0, 0, S_OK, "foo://foo/bar%5Cbaz"}, - {"foo:/foo/bar\\baz", 0, 0, S_OK, "foo:/foo/bar%5Cbaz"}, - {"foo:foo/bar\\baz", 0, 0, S_OK, "foo:foo%2Fbar%5Cbaz"}, - {"foo:\\foo/bar\\baz", 0, 0, S_OK, "foo:%5Cfoo%2Fbar%5Cbaz"}, - {"foo:/foo/bar\\ba?\\z", 0, 0, S_OK, "foo:/foo/bar%5Cba?\\z"}, - {"foo:/foo/bar\\ba#\\z", 0, 0, S_OK, "foo:/foo/bar%5Cba#\\z"}, - - {"mailto:/fo/o@b\\%a?\\r.b#\\az", 0, 0, S_OK, "mailto:%2Ffo%2Fo@b%5C%a%3F%5Cr.b%23%5Caz"}, - {"mailto:fo/o@b\\%a?\\r.b#\\az", 0, 0, S_OK, "mailto:fo%2Fo@b%5C%a%3F%5Cr.b%23%5Caz"}, - {"mailto:fo/o@b\\%a?\\r.b#\\az", URL_ESCAPE_PERCENT, 0, S_OK, "mailto:fo%2Fo@b%5C%25a%3F%5Cr.b%23%5Caz"}, - - {"ftp:fo/o@bar.baz/foo/bar", 0, 0, S_OK, "ftp:fo%2Fo@bar.baz%2Ffoo%2Fbar"}, - {"ftp:/fo/o@bar.baz/foo/bar", 0, 0, S_OK, "ftp:/fo/o@bar.baz/foo/bar"}, - {"ftp://fo/o@bar.baz/fo?o\\bar", 0, 0, S_OK, "ftp://fo/o@bar.baz/fo?o\\bar"}, - {"ftp://fo/o@bar.baz/fo#o\\bar", 0, 0, S_OK, "ftp://fo/o@bar.baz/fo#o\\bar"}, - {"ftp://localhost/o@bar.baz/fo#o\\bar", 0, 0, S_OK, "ftp://localhost/o@bar.baz/fo#o\\bar"}, - {"ftp:///fo/o@bar.baz/foo/bar", 0, 0, S_OK, "ftp:///fo/o@bar.baz/foo/bar"}, - {"ftp:////fo/o@bar.baz/foo/bar", 0, 0, S_OK, "ftp:////fo/o@bar.baz/foo/bar"} -}; - -/* ################ */ - -typedef struct _TEST_URL_COMBINE { - const char *url1; - const char *url2; - DWORD flags; - HRESULT expectret; - const char *expecturl; -} TEST_URL_COMBINE; - -static const TEST_URL_COMBINE TEST_COMBINE[] = { - {"http://www.winehq.org/tests", "tests1", 0, S_OK, "http://www.winehq.org/tests1"}, - {"http://www.%77inehq.org/tests", "tests1", 0, S_OK, "http://www.%77inehq.org/tests1"}, - /*FIXME {"http://www.winehq.org/tests", "../tests2", 0, S_OK, "http://www.winehq.org/tests2"},*/ - {"http://www.winehq.org/tests/", "../tests3", 0, S_OK, "http://www.winehq.org/tests3"}, - {"http://www.winehq.org/tests/test1", "test2", 0, S_OK, "http://www.winehq.org/tests/test2"}, - {"http://www.winehq.org/tests/../tests", "tests4", 0, S_OK, "http://www.winehq.org/tests4"}, - {"http://www.winehq.org/tests/../tests/", "tests5", 0, S_OK, "http://www.winehq.org/tests/tests5"}, - {"http://www.winehq.org/tests/../tests/", "/tests6/..", 0, S_OK, "http://www.winehq.org/"}, - {"http://www.winehq.org/tests/../tests/..", "tests7/..", 0, S_OK, "http://www.winehq.org/"}, - {"http://www.winehq.org/tests/?query=x&return=y", "tests8", 0, S_OK, "http://www.winehq.org/tests/tests8"}, - {"http://www.winehq.org/tests/#example", "tests9", 0, S_OK, "http://www.winehq.org/tests/tests9"}, - {"http://www.winehq.org/tests/../tests/", "/tests10/..", URL_DONT_SIMPLIFY, S_OK, "http://www.winehq.org/tests10/.."}, - {"http://www.winehq.org/tests/../", "tests11", URL_DONT_SIMPLIFY, S_OK, "http://www.winehq.org/tests/../tests11"}, - {"file:///C:\\dir\\file.txt", "test.txt", 0, S_OK, "file:///C:/dir/test.txt"}, - {"file:///C:\\dir\\file.txt#hash\\hash", "test.txt", 0, S_OK, "file:///C:/dir/file.txt#hash/test.txt"}, - {"file:///C:\\dir\\file.html#hash\\hash", "test.html", 0, S_OK, "file:///C:/dir/test.html"}, - {"file:///C:\\dir\\file.htm#hash\\hash", "test.htm", 0, S_OK, "file:///C:/dir/test.htm"}, - {"file:///C:\\dir\\file.hTmL#hash\\hash", "test.hTmL", 0, S_OK, "file:///C:/dir/test.hTmL"}, - {"file:///C:\\dir.html\\file.txt#hash\\hash", "test.txt", 0, S_OK, "file:///C:/dir.html/file.txt#hash/test.txt"}, - {"C:\\winehq\\winehq.txt", "C:\\Test\\test.txt", 0, S_OK, "file:///C:/Test/test.txt"}, - {"http://www.winehq.org/test/", "test%20file.txt", 0, S_OK, "http://www.winehq.org/test/test%20file.txt"}, - {"http://www.winehq.org/test/", "test%20file.txt", URL_FILE_USE_PATHURL, S_OK, "http://www.winehq.org/test/test%20file.txt"}, - {"http://www.winehq.org%2ftest/", "test%20file.txt", URL_FILE_USE_PATHURL, S_OK, "http://www.winehq.org%2ftest/test%20file.txt"}, - {"xxx:@MSITStore:file.chm/file.html", "dir/file", 0, S_OK, "xxx:dir/file"}, - {"mk:@MSITStore:file.chm::/file.html", "/dir/file", 0, S_OK, "mk:@MSITStore:file.chm::/dir/file"}, - {"mk:@MSITStore:file.chm::/file.html", "mk:@MSITStore:file.chm::/dir/file", 0, S_OK, "mk:@MSITStore:file.chm::/dir/file"}, - {"foo:today", "foo:calendar", 0, S_OK, "foo:calendar"}, - {"foo:today", "bar:calendar", 0, S_OK, "bar:calendar"}, - {"foo:/today", "foo:calendar", 0, S_OK, "foo:/calendar"}, - {"foo:/today/", "foo:calendar", 0, S_OK, "foo:/today/calendar"}, - {"mk:@MSITStore:dir/test.chm::dir/index.html", "image.jpg", 0, S_OK, "mk:@MSITStore:dir/test.chm::dir/image.jpg"}, - {"mk:@MSITStore:dir/test.chm::dir/dir2/index.html", "../image.jpg", 0, S_OK, "mk:@MSITStore:dir/test.chm::dir/image.jpg"}, - /* UrlCombine case 2 tests. Schemes do not match */ - {"outbind://xxxxxxxxx","http://wine1/dir",0, S_OK,"http://wine1/dir"}, - {"xxxx://xxxxxxxxx","http://wine2/dir",0, S_OK,"http://wine2/dir"}, - {"ftp://xxxxxxxxx/","http://wine3/dir",0, S_OK,"http://wine3/dir"}, - {"outbind://xxxxxxxxx","http://wine4/dir",URL_PLUGGABLE_PROTOCOL, S_OK,"http://wine4/dir"}, - {"xxx://xxxxxxxxx","http://wine5/dir",URL_PLUGGABLE_PROTOCOL, S_OK,"http://wine5/dir"}, - {"ftp://xxxxxxxxx/","http://wine6/dir",URL_PLUGGABLE_PROTOCOL, S_OK,"http://wine6/dir"}, - {"http://xxxxxxxxx","outbind://wine7/dir",0, S_OK,"outbind://wine7/dir"}, - {"xxx://xxxxxxxxx","ftp://wine8/dir",0, S_OK,"ftp://wine8/dir"}, - {"ftp://xxxxxxxxx/","xxx://wine9/dir",0, S_OK,"xxx://wine9/dir"}, - {"http://xxxxxxxxx","outbind://wine10/dir",URL_PLUGGABLE_PROTOCOL, S_OK,"outbind://wine10/dir"}, - {"xxx://xxxxxxxxx","ftp://wine11/dir",URL_PLUGGABLE_PROTOCOL, S_OK,"ftp://wine11/dir"}, - {"ftp://xxxxxxxxx/","xxx://wine12/dir",URL_PLUGGABLE_PROTOCOL, S_OK,"xxx://wine12/dir"}, - {"http://xxxxxxxxx","outbind:wine13/dir",0, S_OK,"outbind:wine13/dir"}, - {"xxx://xxxxxxxxx","ftp:wine14/dir",0, S_OK,"ftp:wine14/dir"}, - {"ftp://xxxxxxxxx/","xxx:wine15/dir",0, S_OK,"xxx:wine15/dir"}, - {"outbind://xxxxxxxxx/","http:wine16/dir",0, S_OK,"http:wine16/dir"}, - {"http://xxxxxxxxx","outbind:wine17/dir",URL_PLUGGABLE_PROTOCOL, S_OK,"outbind:wine17/dir"}, - {"xxx://xxxxxxxxx","ftp:wine18/dir",URL_PLUGGABLE_PROTOCOL, S_OK,"ftp:wine18/dir"}, - {"ftp://xxxxxxxxx/","xxx:wine19/dir",URL_PLUGGABLE_PROTOCOL, S_OK,"xxx:wine19/dir"}, - {"outbind://xxxxxxxxx/","http:wine20/dir",URL_PLUGGABLE_PROTOCOL, S_OK,"http:wine20/dir"}, - {"file:///c:/dir/file.txt","index.html?test=c:/abc",URL_ESCAPE_SPACES_ONLY|URL_DONT_ESCAPE_EXTRA_INFO,S_OK,"file:///c:/dir/index.html?test=c:/abc"} -}; - -/* ################ */ - -static const struct { - const char *path; - const char *url; - DWORD ret; -} TEST_URLFROMPATH [] = { - {"foo", "file:foo", S_OK}, - {"foo\\bar", "file:foo/bar", S_OK}, - {"\\foo\\bar", "file:///foo/bar", S_OK}, - {"c:\\foo\\bar", "file:///c:/foo/bar", S_OK}, - {"c:foo\\bar", "file:///c:foo/bar", S_OK}, - {"c:\\foo/b a%r", "file:///c:/foo/b%20a%25r", S_OK}, - {"c:\\foo\\foo bar", "file:///c:/foo/foo%20bar", S_OK}, -#if 0 - /* The following test fails on native shlwapi as distributed with Win95/98. - * Wine matches the behaviour of later versions. - */ - {"xx:c:\\foo\\bar", "xx:c:\\foo\\bar", S_FALSE} -#endif -}; - -/* ################ */ - -static struct { - char url[30]; - const char *expect; -} TEST_URL_UNESCAPE[] = { - {"file://foo/bar", "file://foo/bar"}, - {"file://fo%20o%5Ca/bar", "file://fo o\\a/bar"}, - {"file://%24%25foobar", "file://$%foobar"} -}; - -/* ################ */ - -static const struct { - const char *path; - BOOL expect; -} TEST_PATH_IS_URL[] = { - {"http://foo/bar", TRUE}, - {"c:\\foo\\bar", FALSE}, - {"foo://foo/bar", TRUE}, - {"foo\\bar", FALSE}, - {"foo.bar", FALSE}, - {"bogusscheme:", TRUE}, - {"http:partial", TRUE} -}; - -/* ################ */ - -static const struct { - const char *url; - BOOL expectOpaque; - BOOL expectFile; -} TEST_URLIS_ATTRIBS[] = { - { "ftp:", FALSE, FALSE }, - { "http:", FALSE, FALSE }, - { "gopher:", FALSE, FALSE }, - { "mailto:", TRUE, FALSE }, - { "news:", FALSE, FALSE }, - { "nntp:", FALSE, FALSE }, - { "telnet:", FALSE, FALSE }, - { "wais:", FALSE, FALSE }, - { "file:", FALSE, TRUE }, - { "mk:", FALSE, FALSE }, - { "https:", FALSE, FALSE }, - { "shell:", TRUE, FALSE }, - { "https:", FALSE, FALSE }, - { "snews:", FALSE, FALSE }, - { "local:", FALSE, FALSE }, - { "javascript:", TRUE, FALSE }, - { "vbscript:", TRUE, FALSE }, - { "about:", TRUE, FALSE }, - { "res:", FALSE, FALSE }, - { "bogusscheme:", FALSE, FALSE }, - { "file:\\\\e:\\b\\c", FALSE, TRUE }, - { "file://e:/b/c", FALSE, TRUE }, - { "http:partial", FALSE, FALSE }, - { "mailto://www.winehq.org/test.html", TRUE, FALSE }, - { "file:partial", FALSE, TRUE } -}; - -/* ########################### */ - -static LPWSTR GetWideString(const char* szString) -{ - LPWSTR wszString = HeapAlloc(GetProcessHeap(), 0, (2*INTERNET_MAX_URL_LENGTH) * sizeof(WCHAR)); - - MultiByteToWideChar(0, 0, szString, -1, wszString, INTERNET_MAX_URL_LENGTH); - - return wszString; -} - - -static void FreeWideString(LPWSTR wszString) -{ - HeapFree(GetProcessHeap(), 0, wszString); -} - -/* ########################### */ - -static void test_UrlApplyScheme(void) -{ - CHAR newurl[TEST_APPLY_MAX_LENGTH]; - WCHAR urlW[TEST_APPLY_MAX_LENGTH]; - WCHAR newurlW[TEST_APPLY_MAX_LENGTH]; - HRESULT res; - DWORD len; - DWORD i; - - if (!pUrlApplySchemeA) { - win_skip("UrlApplySchemeA not found\n"); - return; - } - - for(i = 0; i < sizeof(TEST_APPLY)/sizeof(TEST_APPLY[0]); i++) { - len = TEST_APPLY_MAX_LENGTH; - lstrcpyA(newurl, untouchedA); - res = pUrlApplySchemeA(TEST_APPLY[i].url, newurl, &len, TEST_APPLY[i].flags); - ok( res == TEST_APPLY[i].res, - "#%dA: got HRESULT 0x%x (expected 0x%x)\n", i, res, TEST_APPLY[i].res); - - ok( len == TEST_APPLY[i].newlen, - "#%dA: got len %d (expected %d)\n", i, len, TEST_APPLY[i].newlen); - - ok( !lstrcmpA(newurl, TEST_APPLY[i].newurl), - "#%dA: got '%s' (expected '%s')\n", i, newurl, TEST_APPLY[i].newurl); - - /* returned length is in character */ - len = TEST_APPLY_MAX_LENGTH; - lstrcpyA(newurl, untouchedA); - MultiByteToWideChar(CP_ACP, 0, newurl, -1, newurlW, len); - MultiByteToWideChar(CP_ACP, 0, TEST_APPLY[i].url, -1, urlW, len); - - res = pUrlApplySchemeW(urlW, newurlW, &len, TEST_APPLY[i].flags); - WideCharToMultiByte(CP_ACP, 0, newurlW, -1, newurl, TEST_APPLY_MAX_LENGTH, NULL, NULL); - ok( res == TEST_APPLY[i].res, - "#%dW: got HRESULT 0x%x (expected 0x%x)\n", i, res, TEST_APPLY[i].res); - - ok( len == TEST_APPLY[i].newlen, - "#%dW: got len %d (expected %d)\n", i, len, TEST_APPLY[i].newlen); - - ok( !lstrcmpA(newurl, TEST_APPLY[i].newurl), - "#%dW: got '%s' (expected '%s')\n", i, newurl, TEST_APPLY[i].newurl); - - } - - /* buffer too small */ - lstrcpyA(newurl, untouchedA); - len = lstrlenA(TEST_APPLY[0].newurl); - res = pUrlApplySchemeA(TEST_APPLY[0].url, newurl, &len, TEST_APPLY[0].flags); - ok(res == E_POINTER, "got HRESULT 0x%x (expected E_POINTER)\n", res); - /* The returned length include the space for the terminating 0 */ - i = lstrlenA(TEST_APPLY[0].newurl)+1; - ok(len == i, "got len %d (expected %d)\n", len, i); - ok(!lstrcmpA(newurl, untouchedA), "got '%s' (expected '%s')\n", newurl, untouchedA); - - /* NULL as parameter. The length and the buffer are not modified */ - lstrcpyA(newurl, untouchedA); - len = TEST_APPLY_MAX_LENGTH; - res = pUrlApplySchemeA(NULL, newurl, &len, TEST_APPLY[0].flags); - ok(res == E_INVALIDARG, "got HRESULT 0x%x (expected E_INVALIDARG)\n", res); - ok(len == TEST_APPLY_MAX_LENGTH, "got len %d\n", len); - ok(!lstrcmpA(newurl, untouchedA), "got '%s' (expected '%s')\n", newurl, untouchedA); - - len = TEST_APPLY_MAX_LENGTH; - res = pUrlApplySchemeA(TEST_APPLY[0].url, NULL, &len, TEST_APPLY[0].flags); - ok(res == E_INVALIDARG, "got HRESULT 0x%x (expected E_INVALIDARG)\n", res); - ok(len == TEST_APPLY_MAX_LENGTH, "got len %d\n", len); - - lstrcpyA(newurl, untouchedA); - res = pUrlApplySchemeA(TEST_APPLY[0].url, newurl, NULL, TEST_APPLY[0].flags); - ok(res == E_INVALIDARG, "got HRESULT 0x%x (expected E_INVALIDARG)\n", res); - ok(!lstrcmpA(newurl, untouchedA), "got '%s' (expected '%s')\n", newurl, untouchedA); - -} - -/* ########################### */ - -static void hash_url(const char* szUrl) -{ - LPCSTR szTestUrl = szUrl; - LPWSTR wszTestUrl = GetWideString(szTestUrl); - HRESULT res; - - DWORD cbSize = sizeof(DWORD); - DWORD dwHash1, dwHash2; - res = pUrlHashA(szTestUrl, (LPBYTE)&dwHash1, cbSize); - ok(res == S_OK, "UrlHashA returned 0x%x (expected S_OK) for %s\n", res, szUrl); - if (pUrlHashW) { - res = pUrlHashW(wszTestUrl, (LPBYTE)&dwHash2, cbSize); - ok(res == S_OK, "UrlHashW returned 0x%x (expected S_OK) for %s\n", res, szUrl); - ok(dwHash1 == dwHash2, - "Hashes didn't match (A: 0x%x, W: 0x%x) for %s\n", dwHash1, dwHash2, szUrl); - } - FreeWideString(wszTestUrl); - -} - -static void test_UrlHash(void) -{ - if (!pUrlHashA) { - win_skip("UrlHashA not found\n"); - return; - } - - hash_url(TEST_URL_1); - hash_url(TEST_URL_2); - hash_url(TEST_URL_3); -} - -/* ########################### */ - -static void test_url_part(const char* szUrl, DWORD dwPart, DWORD dwFlags, const char* szExpected) -{ - CHAR szPart[INTERNET_MAX_URL_LENGTH]; - WCHAR wszPart[INTERNET_MAX_URL_LENGTH]; - LPWSTR wszUrl = GetWideString(szUrl); - LPWSTR wszConvertedPart; - HRESULT res; - DWORD dwSize; - - dwSize = 1; - res = pUrlGetPartA(szUrl, szPart, &dwSize, dwPart, dwFlags); - ok(res == E_POINTER, "UrlGetPart for \"%s\" gave: 0x%08x\n", szUrl, res); - ok(dwSize == strlen(szExpected)+1 || - (*szExpected == '?' && dwSize == strlen(szExpected)), - "UrlGetPart for \"%s\" gave size: %u\n", szUrl, dwSize); - - dwSize = INTERNET_MAX_URL_LENGTH; - res = pUrlGetPartA(szUrl, szPart, &dwSize, dwPart, dwFlags); - ok(res == S_OK, - "UrlGetPartA for \"%s\" part 0x%08x returned 0x%x and \"%s\"\n", - szUrl, dwPart, res, szPart); - if (pUrlGetPartW) { - dwSize = INTERNET_MAX_URL_LENGTH; - res = pUrlGetPartW(wszUrl, wszPart, &dwSize, dwPart, dwFlags); - ok(res == S_OK, - "UrlGetPartW for \"%s\" part 0x%08x returned 0x%x\n", - szUrl, dwPart, res); - - wszConvertedPart = GetWideString(szPart); - - ok(lstrcmpW(wszPart,wszConvertedPart)==0, - "Strings didn't match between ascii and unicode UrlGetPart!\n"); - - FreeWideString(wszConvertedPart); - } - FreeWideString(wszUrl); - - /* Note that v6.0 and later don't return '?' with the query */ - ok(strcmp(szPart,szExpected)==0 || - (*szExpected=='?' && !strcmp(szPart,szExpected+1)), - "Expected %s, but got %s\n", szExpected, szPart); -} - -/* ########################### */ - -static void test_UrlGetPart(void) -{ - const char* file_url = "file://h o s t/c:/windows/file"; - const char* http_url = "http://user:pass 123@www.wine hq.org"; - const char* res_url = "res://some.dll/find.dlg"; - const char* about_url = "about:blank"; - - CHAR szPart[INTERNET_MAX_URL_LENGTH]; - DWORD dwSize; - HRESULT res; - - if (!pUrlGetPartA) { - win_skip("UrlGetPartA not found\n"); - return; - } - - res = pUrlGetPartA(NULL, NULL, NULL, URL_PART_SCHEME, 0); - ok(res == E_INVALIDARG, "null params gave: 0x%08x\n", res); - - res = pUrlGetPartA(NULL, szPart, &dwSize, URL_PART_SCHEME, 0); - ok(res == E_INVALIDARG, "null URL gave: 0x%08x\n", res); - - res = pUrlGetPartA(res_url, NULL, &dwSize, URL_PART_SCHEME, 0); - ok(res == E_INVALIDARG, "null szPart gave: 0x%08x\n", res); - - res = pUrlGetPartA(res_url, szPart, NULL, URL_PART_SCHEME, 0); - ok(res == E_INVALIDARG, "null URL gave: 0x%08x\n", res); - - dwSize = 0; - szPart[0]='x'; szPart[1]=0; - res = pUrlGetPartA("hi", szPart, &dwSize, URL_PART_SCHEME, 0); - ok(res == E_INVALIDARG, "UrlGetPartA(*pcchOut = 0) returned %08X\n", res); - ok(szPart[0] == 'x' && szPart[1] == 0, "UrlGetPartA(*pcchOut = 0) modified szPart: \"%s\"\n", szPart); - ok(dwSize == 0, "dwSize = %d\n", dwSize); - - dwSize = sizeof szPart; - szPart[0]='x'; szPart[1]=0; - res = pUrlGetPartA("hi", szPart, &dwSize, URL_PART_SCHEME, 0); - ok (res==S_FALSE, "UrlGetPartA(\"hi\") returned %08X\n", res); - ok(szPart[0]==0, "UrlGetPartA(\"hi\") return \"%s\" instead of \"\"\n", szPart); - ok(dwSize == 0, "dwSize = %d\n", dwSize); - - dwSize = sizeof szPart; - szPart[0]='x'; szPart[1]=0; - res = pUrlGetPartA("hi", szPart, &dwSize, URL_PART_QUERY, 0); - ok (res==S_FALSE, "UrlGetPartA(\"hi\") returned %08X\n", res); - ok(szPart[0]==0, "UrlGetPartA(\"hi\") return \"%s\" instead of \"\"\n", szPart); - ok(dwSize == 0, "dwSize = %d\n", dwSize); - - test_url_part(TEST_URL_3, URL_PART_HOSTNAME, 0, "localhost"); - test_url_part(TEST_URL_3, URL_PART_PORT, 0, "21"); - test_url_part(TEST_URL_3, URL_PART_USERNAME, 0, "foo"); - test_url_part(TEST_URL_3, URL_PART_PASSWORD, 0, "bar"); - test_url_part(TEST_URL_3, URL_PART_SCHEME, 0, "http"); - test_url_part(TEST_URL_3, URL_PART_QUERY, 0, "?query=x&return=y"); - - test_url_part(file_url, URL_PART_HOSTNAME, 0, "h o s t"); - - test_url_part(http_url, URL_PART_HOSTNAME, 0, "www.wine hq.org"); - test_url_part(http_url, URL_PART_PASSWORD, 0, "pass 123"); - - test_url_part(about_url, URL_PART_SCHEME, 0, "about"); - - dwSize = sizeof(szPart); - res = pUrlGetPartA(about_url, szPart, &dwSize, URL_PART_HOSTNAME, 0); - ok(res==E_FAIL, "returned %08x\n", res); - - test_url_part(res_url, URL_PART_SCHEME, 0, "res"); - test_url_part("http://www.winehq.org", URL_PART_HOSTNAME, URL_PARTFLAG_KEEPSCHEME, "http:www.winehq.org"); - - dwSize = sizeof szPart; - szPart[0]='x'; szPart[1]=0; - res = pUrlGetPartA(res_url, szPart, &dwSize, URL_PART_QUERY, 0); - ok(res==S_FALSE, "UrlGetPartA returned %08X\n", res); - ok(szPart[0]==0, "UrlGetPartA gave \"%s\" instead of \"\"\n", szPart); - ok(dwSize == 0, "dwSize = %d\n", dwSize); - - dwSize = sizeof(szPart); - res = pUrlGetPartA("file://c:\\index.htm", szPart, &dwSize, URL_PART_HOSTNAME, 0); - ok(res==S_FALSE, "returned %08x\n", res); - ok(dwSize == 0, "dwSize = %d\n", dwSize); - - dwSize = sizeof(szPart); - szPart[0] = 'x'; szPart[1] = '\0'; - res = pUrlGetPartA("file:some text", szPart, &dwSize, URL_PART_HOSTNAME, 0); - ok(res==S_FALSE, "returned %08x\n", res); - ok(szPart[0] == '\0', "szPart[0] = %c\n", szPart[0]); - ok(dwSize == 0, "dwSize = %d\n", dwSize); - - dwSize = sizeof(szPart); - szPart[0] = 'x'; szPart[1] = '\0'; - res = pUrlGetPartA("index.htm", szPart, &dwSize, URL_PART_HOSTNAME, 0); - ok(res==E_FAIL, "returned %08x\n", res); -} - -/* ########################### */ - -static void test_url_escape(const char *szUrl, DWORD dwFlags, HRESULT dwExpectReturn, const char *szExpectUrl) -{ - CHAR szReturnUrl[INTERNET_MAX_URL_LENGTH]; - DWORD dwEscaped; - WCHAR ret_urlW[INTERNET_MAX_URL_LENGTH]; - WCHAR *urlW, *expected_urlW; - dwEscaped=INTERNET_MAX_URL_LENGTH; - - ok(pUrlEscapeA(szUrl, szReturnUrl, &dwEscaped, dwFlags) == dwExpectReturn, - "UrlEscapeA didn't return 0x%08x from \"%s\"\n", dwExpectReturn, szUrl); - ok(strcmp(szReturnUrl,szExpectUrl)==0, "Expected \"%s\", but got \"%s\" from \"%s\"\n", szExpectUrl, szReturnUrl, szUrl); - - if (pUrlEscapeW) { - dwEscaped = INTERNET_MAX_URL_LENGTH; - urlW = GetWideString(szUrl); - expected_urlW = GetWideString(szExpectUrl); - ok(pUrlEscapeW(urlW, ret_urlW, &dwEscaped, dwFlags) == dwExpectReturn, - "UrlEscapeW didn't return 0x%08x from \"%s\"\n", dwExpectReturn, szUrl); - WideCharToMultiByte(CP_ACP,0,ret_urlW,-1,szReturnUrl,INTERNET_MAX_URL_LENGTH,0,0); - ok(lstrcmpW(ret_urlW, expected_urlW)==0, - "Expected \"%s\", but got \"%s\" from \"%s\" flags %08x\n", - szExpectUrl, szReturnUrl, szUrl, dwFlags); - FreeWideString(urlW); - FreeWideString(expected_urlW); - } -} - -static void test_url_canonicalize(int index, const char *szUrl, DWORD dwFlags, HRESULT dwExpectReturn, HRESULT dwExpectReturnAlt, const char *szExpectUrl, BOOL todo) -{ - CHAR szReturnUrl[INTERNET_MAX_URL_LENGTH]; - WCHAR wszReturnUrl[INTERNET_MAX_URL_LENGTH]; - LPWSTR wszUrl = GetWideString(szUrl); - LPWSTR wszExpectUrl = GetWideString(szExpectUrl); - LPWSTR wszConvertedUrl; - HRESULT ret; - - DWORD dwSize; - - dwSize = INTERNET_MAX_URL_LENGTH; - ret = pUrlCanonicalizeA(szUrl, NULL, &dwSize, dwFlags); - ok(ret != dwExpectReturn, "got 0s%x: Unexpected return for NULL buffer, index %d\n", ret, index); - ret = pUrlCanonicalizeA(szUrl, szReturnUrl, &dwSize, dwFlags); - ok(ret == dwExpectReturn || ret == dwExpectReturnAlt, - "UrlCanonicalizeA failed: expected=0x%08x or 0x%08x, got=0x%08x, index %d\n", - dwExpectReturn, dwExpectReturnAlt, ret, index); - if (todo) - todo_wine - ok(strcmp(szReturnUrl,szExpectUrl)==0, "UrlCanonicalizeA dwFlags 0x%08x url '%s' Expected \"%s\", but got \"%s\", index %d\n", dwFlags, szUrl, szExpectUrl, szReturnUrl, index); - else - ok(strcmp(szReturnUrl,szExpectUrl)==0, "UrlCanonicalizeA dwFlags 0x%08x url '%s' Expected \"%s\", but got \"%s\", index %d\n", dwFlags, szUrl, szExpectUrl, szReturnUrl, index); - - if (pUrlCanonicalizeW) { - dwSize = INTERNET_MAX_URL_LENGTH; - ret = pUrlCanonicalizeW(wszUrl, NULL, &dwSize, dwFlags); - ok(ret != dwExpectReturn, "got 0x%x: Unexpected return for NULL buffer, index %d\n", ret, index); - ret = pUrlCanonicalizeW(wszUrl, wszReturnUrl, &dwSize, dwFlags); - ok(ret == dwExpectReturn, "UrlCanonicalizeW failed: expected 0x%08x, got 0x%x, index %d\n", - dwExpectReturn, ret, index); - - wszConvertedUrl = GetWideString(szReturnUrl); - ok(lstrcmpW(wszReturnUrl, wszConvertedUrl)==0, - "Strings didn't match between ascii and unicode UrlCanonicalize, index %d!\n", index); - FreeWideString(wszConvertedUrl); - } - - FreeWideString(wszUrl); - FreeWideString(wszExpectUrl); -} - - -static void test_UrlEscape(void) -{ - DWORD size = 0; - HRESULT ret; - unsigned int i; - char empty_string[] = ""; - - if (!pUrlEscapeA) { - win_skip("UrlEscapeA noz found\n"); - return; - } - - ret = pUrlEscapeA("/woningplan/woonkamer basis.swf", NULL, &size, URL_ESCAPE_SPACES_ONLY); - ok(ret == E_INVALIDARG, "got %x, expected %x\n", ret, E_INVALIDARG); - ok(size == 0, "got %d, expected %d\n", size, 0); - - size = 0; - ret = pUrlEscapeA("/woningplan/woonkamer basis.swf", empty_string, &size, URL_ESCAPE_SPACES_ONLY); - ok(ret == E_INVALIDARG, "got %x, expected %x\n", ret, E_INVALIDARG); - ok(size == 0, "got %d, expected %d\n", size, 0); - - size = 1; - ret = pUrlEscapeA("/woningplan/woonkamer basis.swf", NULL, &size, URL_ESCAPE_SPACES_ONLY); - ok(ret == E_INVALIDARG, "got %x, expected %x\n", ret, E_INVALIDARG); - ok(size == 1, "got %d, expected %d\n", size, 1); - - size = 1; - ret = pUrlEscapeA("/woningplan/woonkamer basis.swf", empty_string, NULL, URL_ESCAPE_SPACES_ONLY); - ok(ret == E_INVALIDARG, "got %x, expected %x\n", ret, E_INVALIDARG); - ok(size == 1, "got %d, expected %d\n", size, 1); - - size = 1; - ret = pUrlEscapeA("/woningplan/woonkamer basis.swf", empty_string, &size, URL_ESCAPE_SPACES_ONLY); - ok(ret == E_POINTER, "got %x, expected %x\n", ret, E_POINTER); - ok(size == 34, "got %d, expected %d\n", size, 34); - - for(i=0; i INTERNET_MAX_URL_SIZE */ - dwSize=sizeof(szReturnUrl); - memset(longurl, 'a', sizeof(longurl)); - memcpy(longurl, winehqA, sizeof(winehqA)-1); - longurl[sizeof(longurl)-1] = '\0'; - hr = pUrlCanonicalizeA(longurl, szReturnUrl, &dwSize, URL_WININET_COMPATIBILITY | URL_ESCAPE_UNSAFE); - ok(hr == S_OK, "hr = %x\n", hr); - - test_url_canonicalize(-1, "", 0, S_OK, S_FALSE /* Vista/win2k8 */, "", FALSE); - - /* test url-modification */ - for(i=0; iurl, &parseda); - ok(hres == test->hres, "ParseURL failed: %08x, expected %08x\n", hres, test->hres); - if(hres == S_OK) { - ok(parseda.pszProtocol == test->url, "parseda.pszProtocol = %s, expected %s\n", - parseda.pszProtocol, test->url); - ok(parseda.cchProtocol == test->protocol_len, "parseda.cchProtocol = %d, expected %d\n", - parseda.cchProtocol, test->protocol_len); - ok(parseda.pszSuffix == test->url+test->protocol_len+1, "parseda.pszSuffix = %s, expected %s\n", - parseda.pszSuffix, test->url+test->protocol_len+1); - ok(parseda.cchSuffix == strlen(test->url+test->protocol_len+1), - "parseda.pszSuffix = %d, expected %d\n", - parseda.cchSuffix, lstrlenA(test->url+test->protocol_len+1)); - ok(parseda.nScheme == test->scheme, "parseda.nScheme = %d, expected %d\n", - parseda.nScheme, test->scheme); - }else { - ok(!parseda.pszProtocol, "parseda.pszProtocol = %p\n", parseda.pszProtocol); - ok(parseda.nScheme == 0xd0d0d0d0, "nScheme = %d\n", parseda.nScheme); - } - - MultiByteToWideChar(CP_ACP, 0, test->url, -1, url, sizeof(url)/sizeof(WCHAR)); - - memset(&parsedw, 0xd0, sizeof(parsedw)); - parsedw.cbSize = sizeof(parsedw); - hres = pParseURLW(url, &parsedw); - ok(hres == test->hres, "ParseURL failed: %08x, expected %08x\n", hres, test->hres); - if(hres == S_OK) { - ok(parsedw.pszProtocol == url, "parsedw.pszProtocol = %s, expected %s\n", - wine_dbgstr_w(parsedw.pszProtocol), wine_dbgstr_w(url)); - ok(parsedw.cchProtocol == test->protocol_len, "parsedw.cchProtocol = %d, expected %d\n", - parsedw.cchProtocol, test->protocol_len); - ok(parsedw.pszSuffix == url+test->protocol_len+1, "parsedw.pszSuffix = %s, expected %s\n", - wine_dbgstr_w(parsedw.pszSuffix), wine_dbgstr_w(url+test->protocol_len+1)); - ok(parsedw.cchSuffix == strlen(test->url+test->protocol_len+1), - "parsedw.pszSuffix = %d, expected %d\n", - parsedw.cchSuffix, lstrlenA(test->url+test->protocol_len+1)); - ok(parsedw.nScheme == test->scheme, "parsedw.nScheme = %d, expected %d\n", - parsedw.nScheme, test->scheme); - }else { - ok(!parsedw.pszProtocol, "parsedw.pszProtocol = %p\n", parseda.pszProtocol); - ok(parsedw.nScheme == 0xd0d0d0d0, "nScheme = %d\n", parsedw.nScheme); - } - } -} - -static void test_HashData(void) -{ - HRESULT res; - BYTE input[16] = {0x51, 0x33, 0x4F, 0xA7, 0x45, 0x15, 0xF0, 0x52, 0x90, - 0x2B, 0xE7, 0xF5, 0xFD, 0xE1, 0xA6, 0xA7}; - BYTE output[32]; - static const BYTE expected[] = {0x54, 0x9C, 0x92, 0x55, 0xCD, 0x82, 0xFF, - 0xA1, 0x8E, 0x0F, 0xCF, 0x93, 0x14, 0xAA, - 0xE3, 0x2D}; - static const BYTE expected2[] = {0x54, 0x9C, 0x92, 0x55, 0xCD, 0x82, 0xFF, - 0xA1, 0x8E, 0x0F, 0xCF, 0x93, 0x14, 0xAA, - 0xE3, 0x2D, 0x47, 0xFC, 0x80, 0xB8, 0xD0, - 0x49, 0xE6, 0x13, 0x2A, 0x30, 0x51, 0x8D, - 0xF9, 0x4B, 0x07, 0xA6}; - static const BYTE expected3[] = {0x2B, 0xDC, 0x9A, 0x1B, 0xF0, 0x5A, 0xF9, - 0xC6, 0xBE, 0x94, 0x6D, 0xF3, 0x33, 0xC1, - 0x36, 0x07}; - int i; - - /* Test hashing with identically sized input/output buffers. */ - res = pHashData(input, 16, output, 16); - ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08x\n", res); - if(res == S_OK) - ok(!memcmp(output, expected, sizeof(expected)), - "Output buffer did not match expected contents\n"); - - /* Test hashing with larger output buffer. */ - res = pHashData(input, 16, output, 32); - ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08x\n", res); - if(res == S_OK) - ok(!memcmp(output, expected2, sizeof(expected2)), - "Output buffer did not match expected contents\n"); - - /* Test hashing with smaller input buffer. */ - res = pHashData(input, 8, output, 16); - ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08x\n", res); - if(res == S_OK) - ok(!memcmp(output, expected3, sizeof(expected3)), - "Output buffer did not match expected contents\n"); - - /* Test passing NULL pointers for input/output parameters. */ - res = pHashData(NULL, 0, NULL, 0); - ok(res == E_INVALIDARG || broken(res == S_OK), /* Windows 2000 */ - "Expected HashData to return E_INVALIDARG, got 0x%08x\n", res); - - res = pHashData(input, 0, NULL, 0); - ok(res == E_INVALIDARG || broken(res == S_OK), /* Windows 2000 */ - "Expected HashData to return E_INVALIDARG, got 0x%08x\n", res); - - res = pHashData(NULL, 0, output, 0); - ok(res == E_INVALIDARG || broken(res == S_OK), /* Windows 2000 */ - "Expected HashData to return E_INVALIDARG, got 0x%08x\n", res); - - /* Test passing valid pointers with sizes of zero. */ - for (i = 0; i < sizeof(input)/sizeof(BYTE); i++) - input[i] = 0x00; - - for (i = 0; i < sizeof(output)/sizeof(BYTE); i++) - output[i] = 0xFF; - - res = pHashData(input, 0, output, 0); - ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08x\n", res); - - /* The buffers should be unchanged. */ - for (i = 0; i < sizeof(input)/sizeof(BYTE); i++) - { - ok(input[i] == 0x00, "Expected the input buffer to be unchanged\n"); - if(input[i] != 0x00) break; - } - - for (i = 0; i < sizeof(output)/sizeof(BYTE); i++) - { - ok(output[i] == 0xFF, "Expected the output buffer to be unchanged\n"); - if(output[i] != 0xFF) break; - } - - /* Input/output parameters are not validated. */ - res = pHashData((BYTE *)0xdeadbeef, 0, (BYTE *)0xdeadbeef, 0); - ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08x\n", res); - - if (0) - { - res = pHashData((BYTE *)0xdeadbeef, 1, (BYTE *)0xdeadbeef, 1); - trace("HashData returned 0x%08x\n", res); - } -} - -/* ########################### */ - -START_TEST(url) -{ - - hShlwapi = GetModuleHandleA("shlwapi.dll"); - pUrlUnescapeA = (void *) GetProcAddress(hShlwapi, "UrlUnescapeA"); - pUrlUnescapeW = (void *) GetProcAddress(hShlwapi, "UrlUnescapeW"); - pUrlIsA = (void *) GetProcAddress(hShlwapi, "UrlIsA"); - pUrlIsW = (void *) GetProcAddress(hShlwapi, "UrlIsW"); - pUrlHashA = (void *) GetProcAddress(hShlwapi, "UrlHashA"); - pUrlHashW = (void *) GetProcAddress(hShlwapi, "UrlHashW"); - pUrlGetPartA = (void *) GetProcAddress(hShlwapi, "UrlGetPartA"); - pUrlGetPartW = (void *) GetProcAddress(hShlwapi, "UrlGetPartW"); - pUrlEscapeA = (void *) GetProcAddress(hShlwapi, "UrlEscapeA"); - pUrlEscapeW = (void *) GetProcAddress(hShlwapi, "UrlEscapeW"); - pUrlCreateFromPathA = (void *) GetProcAddress(hShlwapi, "UrlCreateFromPathA"); - pUrlCreateFromPathW = (void *) GetProcAddress(hShlwapi, "UrlCreateFromPathW"); - pUrlCombineA = (void *) GetProcAddress(hShlwapi, "UrlCombineA"); - pUrlCombineW = (void *) GetProcAddress(hShlwapi, "UrlCombineW"); - pUrlCanonicalizeA = (void *) GetProcAddress(hShlwapi, "UrlCanonicalizeA"); - pUrlCanonicalizeW = (void *) GetProcAddress(hShlwapi, "UrlCanonicalizeW"); - pUrlApplySchemeA = (void *) GetProcAddress(hShlwapi, "UrlApplySchemeA"); - pUrlApplySchemeW = (void *) GetProcAddress(hShlwapi, "UrlApplySchemeW"); - pParseURLA = (void*)GetProcAddress(hShlwapi, (LPCSTR)1); - pParseURLW = (void*)GetProcAddress(hShlwapi, (LPCSTR)2); - pHashData = (void*)GetProcAddress(hShlwapi, "HashData"); - - test_UrlApplyScheme(); - test_UrlHash(); - test_UrlGetPart(); - test_UrlCanonicalizeA(); - test_UrlCanonicalizeW(); - test_UrlEscape(); - test_UrlCombine(); - test_UrlCreateFromPath(); - test_UrlIs(); - test_UrlUnescape(); - test_ParseURL(); - test_HashData(); -} diff --git a/rostests/winetests/snmpapi/CMakeLists.txt b/rostests/winetests/snmpapi/CMakeLists.txt deleted file mode 100644 index b7ee50c1b3b..00000000000 --- a/rostests/winetests/snmpapi/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(snmpapi_winetest util.c testlist.c) -target_link_libraries(snmpapi_winetest wine) -set_module_type(snmpapi_winetest win32cui) -add_importlibs(snmpapi_winetest snmpapi msvcrt kernel32 ntdll) -add_cd_file(TARGET snmpapi_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/snmpapi/snmpapi.rbuild b/rostests/winetests/snmpapi/snmpapi.rbuild deleted file mode 100644 index e3c21397bf5..00000000000 --- a/rostests/winetests/snmpapi/snmpapi.rbuild +++ /dev/null @@ -1,9 +0,0 @@ - - . - - util.c - testlist.c - wine - snmpapi - ntdll - diff --git a/rostests/winetests/snmpapi/testlist.c b/rostests/winetests/snmpapi/testlist.c deleted file mode 100644 index a329488a0cc..00000000000 --- a/rostests/winetests/snmpapi/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_util(void); - -const struct test winetest_testlist[] = -{ - { "util", func_util }, - { 0, 0 } -}; diff --git a/rostests/winetests/snmpapi/util.c b/rostests/winetests/snmpapi/util.c deleted file mode 100644 index 908d5e29f73..00000000000 --- a/rostests/winetests/snmpapi/util.c +++ /dev/null @@ -1,579 +0,0 @@ -/* - * Copyright 2007 Hans Leidekker - * - * 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 - -static INT (WINAPI *pSnmpUtilAsnAnyCpy)(AsnAny*, AsnAny*); -static VOID (WINAPI *pSnmpUtilAsnAnyFree)(AsnAny*); -static INT (WINAPI *pSnmpUtilOctetsCmp)(AsnOctetString*, AsnOctetString*); -static INT (WINAPI *pSnmpUtilOctetsCpy)(AsnOctetString*, AsnOctetString*); -static VOID (WINAPI *pSnmpUtilOctetsFree)(AsnOctetString*); -static INT (WINAPI *pSnmpUtilOctetsNCmp)(AsnOctetString*, AsnOctetString*, UINT); - -static void InitFunctionPtrs(void) -{ - HMODULE hSnmpapi = GetModuleHandle("snmpapi.dll"); - -#define SNMPAPI_GET_PROC(func) \ - p ## func = (void*)GetProcAddress(hSnmpapi, #func); \ - if(!p ## func) \ - trace("GetProcAddress(%s) failed\n", #func); - - SNMPAPI_GET_PROC(SnmpUtilAsnAnyCpy) - SNMPAPI_GET_PROC(SnmpUtilAsnAnyFree) - SNMPAPI_GET_PROC(SnmpUtilOctetsCmp) - SNMPAPI_GET_PROC(SnmpUtilOctetsCpy) - SNMPAPI_GET_PROC(SnmpUtilOctetsFree) - SNMPAPI_GET_PROC(SnmpUtilOctetsNCmp) - -#undef SNMPAPI_GET_PROC -} - -static void test_SnmpUtilOidToA(void) -{ - LPSTR ret; - static UINT ids1[] = { 1,3,6,1,4,1,311 }; - static UINT ids2[] = { - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 }; - static UINT ids3[] = { 0xffffffff }; - static AsnObjectIdentifier oid0 = { 0, ids1 }; - static AsnObjectIdentifier oid1 = { 7, ids1 }; - static AsnObjectIdentifier oid2 = { 256, ids2 }; - static AsnObjectIdentifier oid3 = { 257, ids2 }; - static AsnObjectIdentifier oid4 = { 258, ids2 }; - static AsnObjectIdentifier oid5 = { 1, ids3 }; - static const char expect0[] = ""; - static const char expect0_alt[] = "NUL"; - static const char expect1[] = "1.3.6.1.4.1.311"; - static const char expect2[] = - "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1." - "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1." - "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1." - "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1." - "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1." - "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1." - "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1." - "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1"; - static const char expect3[] = - "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1." - "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1." - "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1." - "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1." - "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1." - "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1." - "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1." - "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1"; - static const char expect3_alt[] = - "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1." - "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1." - "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1." - "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1." - "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1." - "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1." - "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1." - "1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1"; - static const char expect4[] = "-1"; - - /* This crashes under win98 */ - if(0) - { - ret = SnmpUtilOidToA(NULL); - ok(ret != NULL, "SnmpUtilOidToA failed\n"); - ok(!strcmp(ret, expect0), "SnmpUtilOidToA failed got\n%s\n expected\n%s\n", - ret, expect1); - } - - ret = SnmpUtilOidToA(&oid0); - ok(ret != NULL, "SnmpUtilOidToA failed\n"); - ok(!strcmp(ret, expect0) || - broken(!strcmp(ret, expect0_alt)), /* Win98, WinMe, NT4 */ - "SnmpUtilOidToA failed got\n%s\n expected\n%s\n", - ret, expect0); - - ret = SnmpUtilOidToA(&oid1); - ok(ret != NULL, "SnmpUtilOidToA failed\n"); - ok(!strcmp(ret, expect1), "SnmpUtilOidToA failed got\n%s\n expected\n%s\n", - ret, expect1); - - ret = SnmpUtilOidToA(&oid2); - ok(ret != NULL, "SnmpUtilOidToA failed\n"); - ok(!strcmp(ret, expect2), "SnmpUtilOidToA failed got\n%s\n expected\n%s\n", - ret, expect2); - - ret = SnmpUtilOidToA(&oid3); - ok(ret != NULL, "SnmpUtilOidToA failed\n"); - ok(!strcmp(ret, expect3), "SnmpUtilOidToA failed got\n%s\n expected\n%s\n", - ret, expect3); - - ret = SnmpUtilOidToA(&oid4); - ok(ret != NULL, "SnmpUtilOidToA failed\n"); - ok(!strcmp(ret, expect3) || - broken(!strcmp(ret, expect3_alt)), /* Win98, WinMe, NT4 */ - "SnmpUtilOidToA failed got\n%s\n expected\n%s\n", - ret, expect3); - - ret = SnmpUtilOidToA(&oid5); - ok(ret != NULL, "SnmpUtilOidToA failed\n"); - ok(!strcmp(ret, expect4), "SnmpUtilOidToA failed got\n%s\n expected\n%s\n", - ret, expect4); -} - -static void test_SnmpUtilAsnAnyCpyFree(void) -{ - INT ret; - static AsnAny dst, src = { ASN_INTEGER, { 1 } }; - - if (0) { /* these crash on XP */ - ret = pSnmpUtilAsnAnyCpy(NULL, NULL); - ok(!ret, "SnmpUtilAsnAnyCpy succeeded\n"); - - ret = pSnmpUtilAsnAnyCpy(&dst, NULL); - ok(!ret, "SnmpUtilAsnAnyCpy succeeded\n"); - - ret = pSnmpUtilAsnAnyCpy(NULL, &src); - ok(!ret, "SnmpUtilAsnAnyCpy succeeded\n"); - } - - ret = pSnmpUtilAsnAnyCpy(&dst, &src); - ok(ret, "SnmpUtilAsnAnyCpy failed\n"); - ok(!memcmp(&src, &dst, sizeof(AsnAny)), "SnmpUtilAsnAnyCpy failed\n"); - - if (0) { /* crashes on XP */ - pSnmpUtilAsnAnyFree(NULL); - } - pSnmpUtilAsnAnyFree(&dst); - ok(dst.asnType == ASN_NULL, "SnmpUtilAsnAnyFree failed\n"); - ok(dst.asnValue.number == 1, "SnmpUtilAsnAnyFree failed\n"); -} - -static void test_SnmpUtilOctetsCpyFree(void) -{ - INT ret; - static BYTE stream[] = { '1', '2', '3', '4' }; - static AsnOctetString dst, src = { stream, 4, TRUE }; - - ret = pSnmpUtilOctetsCpy(NULL, NULL); - ok(!ret, "SnmpUtilOctetsCpy succeeded\n"); - - memset(&dst, 1, sizeof(AsnOctetString)); - ret = pSnmpUtilOctetsCpy(&dst, NULL); - ok(ret, "SnmpUtilOctetsCpy failed\n"); - ok(dst.length == 0, "SnmpUtilOctetsCpy failed\n"); - ok(dst.stream == NULL, "SnmpUtilOctetsCpy failed\n"); - ok(dst.dynamic == FALSE, "SnmpUtilOctetsCpy failed\n"); - - ret = pSnmpUtilOctetsCpy(NULL, &src); - ok(!ret, "SnmpUtilOctetsCpy succeeded\n"); - - memset(&dst, 0, sizeof(AsnOctetString)); - ret = pSnmpUtilOctetsCpy(&dst, &src); - ok(ret, "SnmpUtilOctetsCpy failed\n"); - ok(src.length == dst.length, "SnmpUtilOctetsCpy failed\n"); - ok(!memcmp(src.stream, dst.stream, dst.length), "SnmpUtilOctetsCpy failed\n"); - ok(dst.dynamic == TRUE, "SnmpUtilOctetsCpy failed\n"); - - pSnmpUtilOctetsFree(NULL); - pSnmpUtilOctetsFree(&dst); - ok(dst.stream == NULL, "SnmpUtilOctetsFree failed\n"); - ok(dst.length == 0, "SnmpUtilOctetsFree failed\n"); - ok(dst.dynamic == FALSE, "SnmpUtilOctetsFree failed\n"); -} - -static void test_SnmpUtilOidCpyFree(void) -{ - INT ret; - static UINT ids[] = { 1, 3, 6, 1, 4, 1, 311 }; - static AsnObjectIdentifier dst, src = { sizeof(ids) / sizeof(ids[0]), ids }; - - /* These crashes under win98 */ - if(0) - { - ret = SnmpUtilOidCpy(NULL, NULL); - ok(!ret, "SnmpUtilOidCpy succeeded\n"); - - memset(&dst, 1, sizeof(AsnObjectIdentifier)); - ret = SnmpUtilOidCpy(&dst, NULL); - ok(ret, "SnmpUtilOidCpy failed\n"); - ok(dst.idLength == 0, "SnmpUtilOidCpy failed\n"); - ok(dst.ids == NULL, "SnmpUtilOidCpy failed\n"); - - ret = SnmpUtilOidCpy(NULL, &src); - ok(!ret, "SnmpUtilOidCpy succeeded\n"); - } - - memset(&dst, 0, sizeof(AsnObjectIdentifier)); - ret = SnmpUtilOidCpy(&dst, &src); - ok(ret, "SnmpUtilOidCpy failed\n"); - ok(src.idLength == dst.idLength, "SnmpUtilOidCpy failed\n"); - ok(!memcmp(src.ids, dst.ids, dst.idLength * sizeof(UINT)), "SnmpUtilOidCpy failed\n"); - SnmpUtilOidFree(&dst); - - /* These crashes under win98 */ - if(0) - { - ret = SnmpUtilOidCpy(NULL, NULL); - ok(!ret, "SnmpUtilOidCpy succeeded\n"); - - memset(&dst, 1, sizeof(AsnObjectIdentifier)); - ret = SnmpUtilOidCpy(&dst, NULL); - ok(ret, "SnmpUtilOidCpy failed\n"); - ok(dst.idLength == 0, "SnmpUtilOidCpy failed\n"); - ok(dst.ids == NULL, "SnmpUtilOidCpy failed\n"); - - ret = SnmpUtilOidCpy(NULL, &src); - ok(!ret, "SnmpUtilOidCpy succeeded\n"); - } - - memset(&dst, 0, sizeof(AsnObjectIdentifier)); - ret = SnmpUtilOidCpy(&dst, &src); - ok(ret, "SnmpUtilOidCpy failed\n"); - ok(src.idLength == dst.idLength, "SnmpUtilOidCpy failed\n"); - ok(!memcmp(src.ids, dst.ids, dst.idLength * sizeof(UINT)), "SnmpUtilOidCpy failed\n"); - - /* This crashes under win98 */ - if(0) - { - SnmpUtilOidFree(NULL); - } - SnmpUtilOidFree(&dst); - ok(dst.idLength == 0, "SnmpUtilOidFree failed\n"); - ok(dst.ids == NULL, "SnmpUtilOidFree failed\n"); -} - -static void test_SnmpUtilOctetsNCmp(void) -{ - INT ret; - static BYTE stream1[] = { '1', '2', '3', '4' }; - static BYTE stream2[] = { '5', '6', '7', '8' }; - static AsnOctetString octets1 = { stream1, 4, FALSE }; - static AsnOctetString octets2 = { stream2, 4, FALSE }; - - ret = pSnmpUtilOctetsNCmp(NULL, NULL, 0); - ok(!ret, "SnmpUtilOctetsNCmp succeeded\n"); - - ret = pSnmpUtilOctetsNCmp(NULL, NULL, 1); - ok(!ret, "SnmpUtilOctetsNCmp succeeded\n"); - - ret = pSnmpUtilOctetsNCmp(&octets1, NULL, 0); - ok(!ret, "SnmpUtilOctetsNCmp succeeded\n"); - - ret = pSnmpUtilOctetsNCmp(&octets1, NULL, 1); - ok(!ret, "SnmpUtilOctetsNCmp succeeded\n"); - - ret = pSnmpUtilOctetsNCmp(NULL, &octets2, 0); - ok(!ret, "SnmpUtilOctetsNCmp succeeded\n"); - - ret = pSnmpUtilOctetsNCmp(NULL, &octets2, 1); - ok(!ret, "SnmpUtilOctetsNCmp succeeded\n"); - - ret = pSnmpUtilOctetsNCmp(&octets1, &octets1, 0); - ok(!ret, "SnmpUtilOctetsNCmp failed\n"); - - ret = pSnmpUtilOctetsNCmp(&octets1, &octets1, 4); - ok(!ret, "SnmpUtilOctetsNCmp failed\n"); - - ret = pSnmpUtilOctetsNCmp(&octets1, &octets2, 4); - ok(ret == -4, "SnmpUtilOctetsNCmp failed\n"); - - ret = pSnmpUtilOctetsNCmp(&octets2, &octets1, 4); - ok(ret == 4, "SnmpUtilOctetsNCmp failed\n"); -} - -static void test_SnmpUtilOctetsCmp(void) -{ - INT ret; - static BYTE stream1[] = { '1', '2', '3' }; - static BYTE stream2[] = { '1', '2', '3', '4' }; - static AsnOctetString octets1 = { stream1, 3, FALSE }; - static AsnOctetString octets2 = { stream2, 4, FALSE }; - - if (0) { /* these crash on XP */ - ret = pSnmpUtilOctetsCmp(NULL, NULL); - ok(!ret, "SnmpUtilOctetsCmp succeeded\n"); - - ret = pSnmpUtilOctetsCmp(&octets1, NULL); - ok(!ret, "SnmpUtilOctetsCmp succeeded\n"); - - ret = pSnmpUtilOctetsCmp(NULL, &octets2); - ok(!ret, "SnmpUtilOctetsCmp succeeded\n"); - } - - ret = pSnmpUtilOctetsCmp(&octets2, &octets1); - ok(ret == 1, "SnmpUtilOctetsCmp failed\n"); - - ret = pSnmpUtilOctetsCmp(&octets1, &octets2); - ok(ret < 0, "SnmpUtilOctetsCmp failed\n"); -} - -static void test_SnmpUtilOidNCmp(void) -{ - INT ret; - static UINT ids1[] = { 1, 2, 3, 4 }; - static UINT ids2[] = { 5, 6, 7, 8 }; - static AsnObjectIdentifier oid1 = { 4, ids1 }; - static AsnObjectIdentifier oid2 = { 4, ids2 }; - - /* This crashes under win98 */ - if(0) - { - ret = SnmpUtilOidNCmp(NULL, NULL, 0); - ok(!ret, "SnmpUtilOidNCmp succeeded\n"); - - ret = SnmpUtilOidNCmp(NULL, NULL, 1); - ok(!ret, "SnmpUtilOidNCmp succeeded\n"); - - ret = SnmpUtilOidNCmp(&oid1, NULL, 0); - ok(!ret, "SnmpUtilOidNCmp succeeded\n"); - - ret = SnmpUtilOidNCmp(&oid1, NULL, 1); - ok(!ret, "SnmpUtilOidNCmp succeeded\n"); - - ret = SnmpUtilOidNCmp(NULL, &oid2, 0); - ok(!ret, "SnmpUtilOidNCmp succeeded\n"); - - ret = SnmpUtilOidNCmp(NULL, &oid2, 1); - ok(!ret, "SnmpUtilOidNCmp succeeded\n"); - } - - ret = SnmpUtilOidNCmp(&oid1, &oid1, 0); - ok(!ret, "SnmpUtilOidNCmp failed\n"); - - ret = SnmpUtilOidNCmp(&oid1, &oid1, 4); - ok(!ret, "SnmpUtilOidNCmp failed\n"); - - ret = SnmpUtilOidNCmp(&oid1, &oid2, 4); - ok(ret < 0, "SnmpUtilOidNCmp failed: %d\n", ret); - - ret = SnmpUtilOidNCmp(&oid2, &oid1, 4); - ok(ret > 0, "SnmpUtilOidNCmp failed: %d\n", ret); - - oid1.idLength = 3; - memcpy(oid1.ids, oid2.ids, sizeof(UINT) * 4); - ret = SnmpUtilOidNCmp(&oid1, &oid1, 4); - ok(!ret, "SnmpUtilOidNCmp failed: %d\n", ret); - ret = SnmpUtilOidNCmp(&oid2, &oid1, 4); - ok(ret > 0, "SnmpUtilOidNCmp failed: %d\n", ret); - ret = SnmpUtilOidNCmp(&oid1, &oid2, 4); - ok(ret < 0, "SnmpUtilOidNCmp failed: %d\n", ret); - - ret = SnmpUtilOidNCmp(&oid1, &oid2, 2); - ok(!ret, "SnmpUtilOidNCmp failed: %d\n", ret); - ret = SnmpUtilOidNCmp(&oid2, &oid1, 2); - ok(!ret, "SnmpUtilOidNCmp failed: %d\n", ret); -} - -static void test_SnmpUtilOidCmp(void) -{ - INT ret; - static UINT ids1[] = { 1, 2, 3 }; - static UINT ids2[] = { 1, 2, 3, 4 }; - static AsnObjectIdentifier oid1 = { 3, ids1 }; - static AsnObjectIdentifier oid2 = { 4, ids2 }; - - if (0) { /* these crash on XP */ - ret = SnmpUtilOidCmp(NULL, NULL); - ok(!ret, "SnmpUtilOidCmp succeeded\n"); - - ret = SnmpUtilOidCmp(&oid1, NULL); - ok(!ret, "SnmpUtilOidCmp succeeded\n"); - - ret = SnmpUtilOidCmp(NULL, &oid2); - ok(!ret, "SnmpUtilOidCmp succeeded\n"); - } - - ret = SnmpUtilOidCmp(&oid2, &oid1); - ok(ret > 0, "SnmpUtilOidCmp failed\n"); - - ret = SnmpUtilOidCmp(&oid1, &oid2); - ok(ret < 0, "SnmpUtilOidCmp failed\n"); -} - -static void test_SnmpUtilOidAppend(void) -{ - INT ret; - UINT *ids1; - static UINT ids2[] = { 4, 5, 6 }; - static AsnObjectIdentifier oid1; - static AsnObjectIdentifier oid2 = { 3, ids2 }; - - ids1 = SnmpUtilMemAlloc(3 * sizeof(UINT)); - ids1[0] = 1; - ids1[1] = 2; - ids1[2] = 3; - - oid1.idLength = 3; - oid1.ids = ids1; - - /* This crashes under win98 */ - if(0) - { - ret = SnmpUtilOidAppend(NULL, NULL); - ok(!ret, "SnmpUtilOidAppend succeeded\n"); - - ret = SnmpUtilOidAppend(&oid1, NULL); - ok(ret, "SnmpUtilOidAppend failed\n"); - - ret = SnmpUtilOidAppend(NULL, &oid2); - ok(!ret, "SnmpUtilOidAppend succeeded\n"); - } - - ret = SnmpUtilOidAppend(&oid1, &oid2); - ok(ret, "SnmpUtilOidAppend failed\n"); - ok(oid1.idLength == 6, "SnmpUtilOidAppend failed\n"); - ok(!memcmp(&oid1.ids[3], ids2, 3 * sizeof(UINT)), - "SnmpUtilOidAppend failed\n"); - - SnmpUtilOidFree(&oid1); -} - -static void test_SnmpUtilVarBindCpyFree(void) -{ - INT ret; - static UINT ids[] = { 1, 3, 6, 1, 4, 1, 311 }; - static SnmpVarBind dst, src = { { 7, ids }, { ASN_INTEGER, { 1 } } }; - - /* This crashes under win98 */ - if(0) - { - ret = SnmpUtilVarBindCpy(NULL, NULL); - ok(!ret, "SnmpUtilVarBindCpy succeeded\n"); - - memset(&dst, 0, sizeof(SnmpVarBind)); - ret = SnmpUtilVarBindCpy(&dst, NULL); - ok(ret, "SnmpUtilVarBindCpy failed\n"); - ok(dst.name.idLength == 0, "SnmpUtilVarBindCpy failed\n"); - ok(dst.name.ids == NULL, "SnmpUtilVarBindCpy failed\n"); - ok(dst.value.asnType == ASN_NULL, "SnmpUtilVarBindCpy failed\n"); - ok(dst.value.asnValue.number == 0, "SnmpUtilVarBindCpy failed\n"); - - ret = SnmpUtilVarBindCpy(NULL, &src); - ok(!ret, "SnmpUtilVarBindCpy succeeded\n"); - } - - memset(&dst, 0, sizeof(SnmpVarBind)); - ret = SnmpUtilVarBindCpy(&dst, &src); - ok(ret, "SnmpUtilVarBindCpy failed\n"); - ok(src.name.idLength == dst.name.idLength, "SnmpUtilVarBindCpy failed\n"); - ok(!memcmp(src.name.ids, dst.name.ids, dst.name.idLength * sizeof(UINT)), - "SnmpUtilVarBindCpy failed\n"); - ok(!memcmp(&src.value, &dst.value, sizeof(AsnObjectSyntax)), - "SnmpUtilVarBindCpy failed\n"); - - /* This crashes under win98 */ - if(0) - { - SnmpUtilVarBindFree(NULL); - } - SnmpUtilVarBindFree(&dst); - ok(dst.name.idLength == 0, "SnmpUtilVarBindFree failed\n"); - ok(dst.name.ids == NULL, "SnmpUtilVarBindFree failed\n"); - ok(dst.value.asnType == ASN_NULL, "SnmpUtilVarBindFree failed\n"); - ok(dst.value.asnValue.number == 1, "SnmpUtilVarBindFree failed\n"); -} - -static void test_SnmpUtilVarBindListCpyFree(void) -{ - INT ret; - static UINT ids[] = { 1, 3, 6, 1, 4, 1, 311 }; - static SnmpVarBind src = { { 7, ids }, { ASN_INTEGER, { 1 } } }; - static SnmpVarBindList dst_list, src_list = { &src, 1 }; - - if (0) { /* these crash on XP */ - ret = SnmpUtilVarBindListCpy(NULL, NULL); - ok(!ret, "SnmpUtilVarBindCpy succeeded\n"); - - ret = SnmpUtilVarBindListCpy(NULL, &src_list); - ok(!ret, "SnmpUtilVarBindListCpy succeeded\n"); - } - - /* This crashes under win98 */ - if(0) - { - memset(&dst_list, 0xff, sizeof(SnmpVarBindList)); - ret = SnmpUtilVarBindListCpy(&dst_list, NULL); - ok(ret, "SnmpUtilVarBindListCpy failed\n"); - ok(dst_list.list == NULL, "SnmpUtilVarBindListCpy failed\n"); - ok(dst_list.len == 0, "SnmpUtilVarBindListCpy failed\n"); - } - - ret = SnmpUtilVarBindListCpy(&dst_list, &src_list); - ok(ret, "SnmpUtilVarBindListCpy failed\n"); - ok(src_list.len == dst_list.len, "SnmpUtilVarBindListCpy failed\n"); - ok(src_list.list->name.idLength == dst_list.list->name.idLength, - "SnmpUtilVarBindListCpy failed\n"); - ok(!memcmp(src_list.list->name.ids, dst_list.list->name.ids, - dst_list.list->name.idLength * sizeof(UINT)), - "SnmpUtilVarBindListCpy failed\n"); - ok(!memcmp(&src_list.list->value, &dst_list.list->value, sizeof(AsnAny)), - "SnmpUtilVarBindListCpy failed\n"); - - if (0) { /* crashes on XP */ - SnmpUtilVarBindListFree(NULL); - } - SnmpUtilVarBindListFree(&dst_list); - ok(dst_list.list == NULL, "SnmpUtilVarBindListFree failed\n"); - ok(dst_list.len == 0, "SnmpUtilVarBindListFree failed\n"); -} - -START_TEST(util) -{ - InitFunctionPtrs(); - - test_SnmpUtilOidToA(); - - if (!pSnmpUtilAsnAnyCpy || !pSnmpUtilAsnAnyFree) - win_skip("SnmpUtilAsnAnyCpy and/or SnmpUtilAsnAnyFree not available\n"); - else - test_SnmpUtilAsnAnyCpyFree(); - - if (!pSnmpUtilOctetsCpy || !pSnmpUtilOctetsFree) - win_skip("SnmpUtilOctetsCpy and/or SnmpUtilOctetsFree not available\n"); - else - test_SnmpUtilOctetsCpyFree(); - - test_SnmpUtilOidCpyFree(); - - if (!pSnmpUtilOctetsNCmp) - win_skip("SnmpUtilOctetsNCmp not available\n"); - else - test_SnmpUtilOctetsNCmp(); - - if (!pSnmpUtilOctetsCmp) - win_skip("SnmpUtilOctetsCmp not available\n"); - else - test_SnmpUtilOctetsCmp(); - - test_SnmpUtilOidCmp(); - test_SnmpUtilOidNCmp(); - test_SnmpUtilOidAppend(); - test_SnmpUtilVarBindCpyFree(); - test_SnmpUtilVarBindListCpyFree(); -} diff --git a/rostests/winetests/spoolss/CMakeLists.txt b/rostests/winetests/spoolss/CMakeLists.txt deleted file mode 100644 index cecf2069bf9..00000000000 --- a/rostests/winetests/spoolss/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(spoolss_winetest spoolss.c testlist.c) -target_link_libraries(spoolss_winetest wine) -set_module_type(spoolss_winetest win32cui) -add_importlibs(spoolss_winetest msvcrt kernel32 ntdll) -add_cd_file(TARGET spoolss_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/spoolss/spoolss.c b/rostests/winetests/spoolss/spoolss.c deleted file mode 100644 index 6a2711e1752..00000000000 --- a/rostests/winetests/spoolss/spoolss.c +++ /dev/null @@ -1,211 +0,0 @@ -/* - * Unit test suite for the Spooler-Service helper DLL - * - * Copyright 2007 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 - -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "wine/test.h" - - - -/* ##### */ - -static HMODULE hwinspool; - -static HMODULE hspl; -static BOOL (WINAPI * pBuildOtherNamesFromMachineName)(LPWSTR **, LPDWORD); -static DWORD (WINAPI * pSplInitializeWinSpoolDrv)(LPVOID *); - -#define WINSPOOL_TABLESIZE 16 - -static LPVOID fn_spl[WINSPOOL_TABLESIZE]; -static LPVOID fn_w2k[WINSPOOL_TABLESIZE]; -static LPVOID fn_xp[WINSPOOL_TABLESIZE]; -static LPVOID fn_v[WINSPOOL_TABLESIZE]; - -/* ########################### */ - -static LPCSTR load_functions(void) -{ - LPCSTR ptr; - - ptr = "spoolss.dll"; - hspl = LoadLibraryA(ptr); - if (!hspl) return ptr; - - ptr = "BuildOtherNamesFromMachineName"; - pBuildOtherNamesFromMachineName = (void *) GetProcAddress(hspl, ptr); - if (!pBuildOtherNamesFromMachineName) return ptr; - - ptr = "SplInitializeWinSpoolDrv"; - pSplInitializeWinSpoolDrv = (void *) GetProcAddress(hspl, ptr); - if (!pSplInitializeWinSpoolDrv) return ptr; - - - ptr = "winspool.drv"; - hwinspool = LoadLibraryA(ptr); - if (!hwinspool) return ptr; - - memset(fn_w2k, 0xff, sizeof(fn_w2k)); - fn_w2k[0] = (void *) GetProcAddress(hwinspool, "OpenPrinterW"); - fn_w2k[1] = (void *) GetProcAddress(hwinspool, "ClosePrinter"); - fn_w2k[2] = (void *) GetProcAddress(hwinspool, "SpoolerDevQueryPrintW"); - fn_w2k[3] = (void *) GetProcAddress(hwinspool, "SpoolerPrinterEvent"); - fn_w2k[4] = (void *) GetProcAddress(hwinspool, "DocumentPropertiesW"); - fn_w2k[5] = (void *) GetProcAddress(hwinspool, (LPSTR) 212); /* LoadPrinterDriver */ - fn_w2k[6] = (void *) GetProcAddress(hwinspool, "SetDefaultPrinterW"); - fn_w2k[7] = (void *) GetProcAddress(hwinspool, "GetDefaultPrinterW"); - fn_w2k[8] = (void *) GetProcAddress(hwinspool, (LPSTR) 213); /* RefCntLoadDriver */ - fn_w2k[9] = (void *) GetProcAddress(hwinspool, (LPSTR) 214); /* RefCntUnloadDriver */ - fn_w2k[10] = (void *) GetProcAddress(hwinspool, (LPSTR) 215); /* ForceUnloadDriver */ - - memset(fn_xp, 0xff, sizeof(fn_xp)); - fn_xp[0] = (void *) GetProcAddress(hwinspool, "OpenPrinterW"); - fn_xp[1] = (void *) GetProcAddress(hwinspool, "ClosePrinter"); - fn_xp[2] = (void *) GetProcAddress(hwinspool, "SpoolerDevQueryPrintW"); - fn_xp[3] = (void *) GetProcAddress(hwinspool, "SpoolerPrinterEvent"); - fn_xp[4] = (void *) GetProcAddress(hwinspool, "DocumentPropertiesW"); - fn_xp[5] = (void *) GetProcAddress(hwinspool, (LPSTR) 212); /* LoadPrinterDriver */ - fn_xp[6] = (void *) GetProcAddress(hwinspool, (LPSTR) 213); /* RefCntLoadDriver */ - fn_xp[7] = (void *) GetProcAddress(hwinspool, (LPSTR) 214); /* RefCntUnloadDriver */ - fn_xp[8] = (void *) GetProcAddress(hwinspool, (LPSTR) 215); /* ForceUnloadDriver */ - - memset(fn_v, 0xff, sizeof(fn_v)); - fn_v[0] = (void *) GetProcAddress(hwinspool, "OpenPrinterW"); - fn_v[1] = (void *) GetProcAddress(hwinspool, "ClosePrinter"); - fn_v[2] = (void *) GetProcAddress(hwinspool, "SpoolerDevQueryPrintW"); - fn_v[3] = (void *) GetProcAddress(hwinspool, "SpoolerPrinterEvent"); - fn_v[4] = (void *) GetProcAddress(hwinspool, "DocumentPropertiesW"); - fn_v[5] = (void *) GetProcAddress(hwinspool, (LPSTR) 212); /* LoadPrinterDriver */ - fn_v[6] = (void *) GetProcAddress(hwinspool, (LPSTR) 213); /* RefCntLoadDriver */ - fn_v[7] = (void *) GetProcAddress(hwinspool, (LPSTR) 214); /* RefCntUnloadDriver */ - fn_v[8] = (void *) GetProcAddress(hwinspool, (LPSTR) 215); /* ForceUnloadDriver */ - fn_v[9] = (void *) GetProcAddress(hwinspool, (LPSTR) 251); /* 0xfb */ - - return NULL; - -} - -/* ########################### */ - -static void test_BuildOtherNamesFromMachineName(void) -{ - LPWSTR *buffers; - DWORD numentries; - DWORD res; - - buffers = NULL; - numentries = 0; - - SetLastError(0xdeadbeef); - res = pBuildOtherNamesFromMachineName(&buffers, &numentries); - - /* An array with a number of stringpointers is returned (minimum of 3): - entry_#0: "" (empty String) - entry_#1: (this is the same as the computername) - 1 entry per Ethernet adapter : (string with a IPv4 ip-address) - - As of Vista: - - IPv6 fully disabled (lan interfaces, connections, tunnel interfaces and loopback interfaces) - entry_#0: "" (empty String) - entry_#1: (this is the same as the computername) - 1 entry per Ethernet adapter : (string with a IPv4 ip-address) - entry_#x: "::1" - - IPv6 partly disabled (lan interfaces, connections): - entry_#0: "" (empty String) - entry_#1: (this is the same as the computername) - entry_#2: "::1" - 1 entry per Ethernet adapter : (string with a IPv4 ip-address) - - IPv6 fully enabled but not on all lan interfaces: - entry_#0: "" (empty String) - entry_#1: (this is the same as the computername) - 1 entry per IPv6 enabled Ethernet adapter : (string with a Link-local IPv6 ip-address) - 1 entry per IPv4 enabled Ethernet adapter : (string with a IPv4 ip-address) - - IPv6 fully enabled on all lan interfaces: - entry_#0: "" (empty String) - entry_#1: (this is the same as the computername) - 1 entry per IPv6 enabled Ethernet adapter : (string with a Link-local IPv6 ip-address) - entry_#x: Tunnel adapter (string with a Link-local IPv6 ip-address) - 1 entry per IPv4 enabled Ethernet adapter : (string with a IPv4 ip-address) - entry_#y: Tunnel adapter (string with a IPv6 ip-address) - */ - - todo_wine - ok( res && (buffers != NULL) && (numentries >= 3) && (buffers[0] != NULL) && (buffers[0][0] == '\0'), - "got %u with %u and %p,%u (%p:%d)\n", res, GetLastError(), buffers, numentries, - ((numentries > 0) && buffers) ? buffers[0] : NULL, - ((numentries > 0) && buffers && buffers[0]) ? lstrlenW(buffers[0]) : -1); - -} - -/* ########################### */ - -static void test_SplInitializeWinSpoolDrv(VOID) -{ - LPVOID *fn_ref = fn_xp; - DWORD res; - LONG id; - - memset(fn_spl, 0xff, sizeof(fn_spl)); - SetLastError(0xdeadbeef); - res = pSplInitializeWinSpoolDrv(fn_spl); - ok(res, "got %u with %u (expected '!= 0')\n", res, GetLastError()); - - /* functions 0 to 5 are the same in "spoolss.dll" from w2k and above */ - if (fn_spl[6] == fn_w2k[6]) { - fn_ref = fn_w2k; - } - if (fn_spl[9] == fn_v[9]) { - fn_ref = fn_v; - } - - id = 0; - while (id < WINSPOOL_TABLESIZE) { - ok( fn_spl[id] == fn_ref[id], - "(#%02u) spoolss: %p (vista: %p, xp: %p, w2k: %p)\n", - id, fn_spl[id], fn_v[id], fn_xp[id], fn_w2k[id]); - id++; - } -} - -/* ########################### */ - -START_TEST(spoolss) -{ - LPCSTR ptr; - - /* spoolss.dll does not exist on win9x */ - ptr = load_functions(); - if (ptr) { - skip("%s not found\n", ptr); - return; - } - - test_BuildOtherNamesFromMachineName(); - test_SplInitializeWinSpoolDrv(); - -} diff --git a/rostests/winetests/spoolss/spoolss.rbuild b/rostests/winetests/spoolss/spoolss.rbuild deleted file mode 100644 index 5747b731b3b..00000000000 --- a/rostests/winetests/spoolss/spoolss.rbuild +++ /dev/null @@ -1,8 +0,0 @@ - - . - - spoolss.c - testlist.c - wine - ntdll - diff --git a/rostests/winetests/spoolss/testlist.c b/rostests/winetests/spoolss/testlist.c deleted file mode 100644 index c0b8fe11f44..00000000000 --- a/rostests/winetests/spoolss/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_spoolss(void); - -const struct test winetest_testlist[] = -{ - { "spoolss", func_spoolss }, - { 0, 0 } -}; diff --git a/rostests/winetests/twain_32/CMakeLists.txt b/rostests/winetests/twain_32/CMakeLists.txt deleted file mode 100644 index cd0b1c033ff..00000000000 --- a/rostests/winetests/twain_32/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(twain_32_winetest dsm.c testlist.c) -target_link_libraries(twain_32_winetest wine) -set_module_type(twain_32_winetest win32cui) -add_importlibs(twain_32_winetest user32 gdi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET twain_32_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/twain_32/dsm.c b/rostests/winetests/twain_32/dsm.c deleted file mode 100644 index f3b6f9520f7..00000000000 --- a/rostests/winetests/twain_32/dsm.c +++ /dev/null @@ -1,872 +0,0 @@ -/* Unit test suite for Twain DSM functions - * - * Copyright 2009 Jeremy White, CodeWeavers, Inc. - * - * 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 "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winerror.h" -#include "winuser.h" -#include "twain.h" - -#include "wine/test.h" - -static DSMENTRYPROC pDSM_Entry; - -static BOOL dsm_RegisterWindowClasses(void) -{ - WNDCLASSA cls; - - cls.style = 0; - cls.lpfnWndProc = DefWindowProc; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(0); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "TWAIN_dsm_class"; - if (!RegisterClassA(&cls)) return FALSE; - - return TRUE; -} - - -static void get_condition_code(TW_IDENTITY *appid, TW_IDENTITY *source, TW_STATUS *status) -{ - TW_UINT16 rc; - rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_STATUS, MSG_GET, status); - ok(rc == TWRC_SUCCESS, "Condition code not available, rc %d\n", rc); -} - -static BOOL get_onevalue(TW_HANDLE hcontainer, TW_UINT32 *ret, TW_UINT16 *type) -{ - TW_ONEVALUE *onev; - onev = GlobalLock(hcontainer); - if (onev) - { - *ret = onev->Item; - if (type) - *type = onev->ItemType; - GlobalUnlock(hcontainer); - return TRUE; - } - return FALSE; -} - -static TW_HANDLE alloc_and_set_onevalue(TW_UINT32 val, TW_UINT16 type) -{ - TW_HANDLE hcontainer; - TW_ONEVALUE *onev; - hcontainer = GlobalAlloc(0, sizeof(*onev)); - if (hcontainer) - { - onev = GlobalLock(hcontainer); - if (onev) - { - onev->ItemType = type; - onev->Item = val; - GlobalUnlock(hcontainer); - } - else - { - GlobalFree(hcontainer); - hcontainer = 0; - } - } - return hcontainer; -} - -static void check_get(TW_CAPABILITY *pCapability, TW_INT32 actual_support, - TW_UINT32 orig_value, TW_UINT32 default_value, TW_UINT32 *suggested_set_value) -{ - void *p; - if (suggested_set_value) - *suggested_set_value = orig_value + 1; - p = GlobalLock(pCapability->hContainer); - if (p) - { - if (pCapability->ConType == TWON_ONEVALUE) - { - TW_ONEVALUE *onev = p; - ok(onev->Item == orig_value || !(actual_support & TWQC_GETCURRENT), "MSG_GET of 0x%x returned 0x%x, expecting 0x%x\n", - pCapability->Cap, onev->Item, orig_value); - trace("MSG_GET of 0x%x returned val 0x%x, type %d\n", pCapability->Cap, onev->Item, onev->ItemType); - if (suggested_set_value) - *suggested_set_value = onev->Item; - } - else if (pCapability->ConType == TWON_ENUMERATION) - { - int i; - TW_UINT8 *p8; - TW_UINT16 *p16; - TW_UINT32 *p32; - TW_ENUMERATION *enumv = p; - p8 = enumv->ItemList; - p16 = (TW_UINT16 *) p8; - p32 = (TW_UINT32 *) p8; - trace("MSG_GET of 0x%x returned %d items:\n", pCapability->Cap, enumv->NumItems); - for (i = 0; i < enumv->NumItems; i++) - { - if (enumv->ItemType == TWTY_UINT8 || enumv->ItemType == TWTY_INT8) - trace(" %d: 0x%x\n", i, p8[i]); - if (enumv->ItemType == TWTY_UINT16 || enumv->ItemType == TWTY_INT16) - trace(" %d: 0x%x\n", i, p16[i]); - if (enumv->ItemType == TWTY_UINT32 || enumv->ItemType == TWTY_INT32) - trace(" %d: 0x%x\n", i, p32[i]); - } - if (enumv->ItemType == TWTY_UINT16 || enumv->ItemType == TWTY_INT16) - { - ok(p16[enumv->CurrentIndex] == orig_value, - "Type 0x%x, values from MSG_GET (0x%x) and MSG_GETCURRENT (0x%x) do not match.\n", - pCapability->Cap, p16[enumv->CurrentIndex], orig_value); - ok(p16[enumv->DefaultIndex] == default_value, - "Type 0x%x, values from MSG_GET (0x%x) and MSG_GETDEFAULT (0x%x) do not match.\n", - pCapability->Cap, p16[enumv->DefaultIndex], default_value); - if (suggested_set_value) - *suggested_set_value = p16[(enumv->CurrentIndex + 1) % enumv->NumItems]; - } - if (enumv->ItemType == TWTY_UINT32 || enumv->ItemType == TWTY_INT32) - { - ok(p32[enumv->CurrentIndex] == orig_value, - "Type 0x%x, values from MSG_GET (0x%x) and MSG_GETCURRENT (0x%x) do not match.\n", - pCapability->Cap, p32[enumv->CurrentIndex], orig_value); - ok(p32[enumv->DefaultIndex] == default_value, - "Type 0x%x, values from MSG_GET (0x%x) and MSG_GETDEFAULT (0x%x) do not match.\n", - pCapability->Cap, p32[enumv->DefaultIndex], default_value); - if (suggested_set_value) - *suggested_set_value = p32[(enumv->CurrentIndex + 1) % enumv->NumItems]; - } - } - else - trace("MSG_GET on type 0x%x returned type 0x%x, which we didn't check.\n", pCapability->Cap, pCapability->ConType); - GlobalUnlock(pCapability->hContainer); - } -} - -static void test_onevalue_cap(TW_IDENTITY *appid, TW_IDENTITY *source, TW_UINT16 captype, TW_UINT16 type, TW_INT32 minimum_support) -{ - TW_UINT16 rc; - TW_UINT16 rtype; - TW_STATUS status; - TW_CAPABILITY cap; - TW_UINT32 orig_value = 0; - TW_UINT32 new_value; - TW_UINT32 default_value = 0; - TW_INT32 actual_support; - - memset(&cap, 0, sizeof(cap)); - cap.Cap = captype; - cap.ConType = TWON_DONTCARE16; - - rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_QUERYSUPPORT, &cap); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, - "Error [rc %d|cc %d] doing MSG_QUERYSUPPORT for type 0x%x\n", rc, status.ConditionCode, captype); - if (rc != TWRC_SUCCESS) - return; - ok(get_onevalue(cap.hContainer, (TW_UINT32 *) &actual_support, NULL), "Returned cap.hContainer invalid for QuerySupport on type 0x%x\n", captype); - ok((actual_support & minimum_support) == minimum_support, - "Error: minimum support 0x%x for type 0x%x, got 0x%x\n", minimum_support, - captype, actual_support); - - - if (actual_support & TWQC_GETCURRENT) - { - memset(&cap, 0, sizeof(cap)); - cap.Cap = captype; - cap.ConType = TWON_DONTCARE16; - - rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_GETCURRENT, &cap); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, - "Error [rc %d|cc %d] doing MSG_GETCURRENT for type 0x%x\n", rc, status.ConditionCode, captype); - if (rc == TWRC_SUCCESS) - { - ok(get_onevalue(cap.hContainer, &orig_value, &rtype), "Returned cap.hContainer invalid for GETCURRENT on type 0x%x\n", captype); - ok(rtype == type, "Returned GETCURRENT type 0x%x for cap 0x%x is not expected 0x%x\n", rtype, captype, type); - GlobalFree(cap.hContainer); - } - } - - if (actual_support & TWQC_GETDEFAULT) - { - memset(&cap, 0, sizeof(cap)); - cap.Cap = captype; - cap.ConType = TWON_DONTCARE16; - - rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_GETDEFAULT, &cap); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, - "Error [rc %d|cc %d] doing MSG_GETDEFAULT for type 0x%x\n", rc, status.ConditionCode, captype); - if (rc == TWRC_SUCCESS) - { - ok(get_onevalue(cap.hContainer, &default_value, &rtype), "Returned cap.hContainer invalid for GETDEFAULT on type 0x%x\n", captype); - ok(rtype == type, "Returned GETDEFAULT type 0x%x for cap 0x%x is not expected 0x%x\n", rtype, captype, type); - GlobalFree(cap.hContainer); - } - } - - new_value = orig_value; - if (actual_support & TWQC_GET) - { - memset(&cap, 0, sizeof(cap)); - cap.Cap = captype; - cap.ConType = TWON_DONTCARE16; - - rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_GET, &cap); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, - "Error [rc %d|cc %d] doing MSG_GET for type 0x%x\n", rc, status.ConditionCode, captype); - check_get(&cap, actual_support, orig_value, default_value, &new_value); - if (rc == TWRC_SUCCESS) - GlobalFree(cap.hContainer); - } - - if (actual_support & TWQC_SET) - { - memset(&cap, 0, sizeof(cap)); - cap.Cap = captype; - cap.ConType = TWON_ONEVALUE; - cap.hContainer = alloc_and_set_onevalue(new_value, type); - - rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_SET, &cap); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, - "Error [rc %d|cc %d] doing MSG_SET for type 0x%x\n", rc, status.ConditionCode, captype); - GlobalFree(cap.hContainer); - } - - if (actual_support & TWQC_RESET) - { - memset(&cap, 0, sizeof(cap)); - cap.Cap = captype; - cap.ConType = TWON_DONTCARE16; - - rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_RESET, &cap); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, - "Error [rc %d|cc %d] doing MSG_RESET for type 0x%x\n", rc, status.ConditionCode, captype); - if (rc == TWRC_SUCCESS) - GlobalFree(cap.hContainer); - } -} - -static void test_resolution(TW_IDENTITY *appid, TW_IDENTITY *source, TW_UINT16 captype, TW_INT32 minimum_support) -{ - TW_UINT16 rc; - TW_STATUS status; - TW_CAPABILITY cap; - TW_UINT32 val; - TW_UINT16 type; - TW_INT32 actual_support; - TW_FIX32 orig_value = { 0, 0 }; - TW_UINT32 new_value = 0; - TW_FIX32 default_value = { 0, 0 }; - - memset(&cap, 0, sizeof(cap)); - cap.Cap = captype; - cap.ConType = TWON_DONTCARE16; - - rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_QUERYSUPPORT, &cap); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, - "Error [rc %d|cc %d] doing MSG_QUERYSUPPORT for type 0x%x\n", rc, status.ConditionCode, captype); - if (rc != TWRC_SUCCESS) - return; - ok(get_onevalue(cap.hContainer, (TW_UINT32 *) &actual_support, NULL), "Returned cap.hContainer invalid for QuerySupport on type 0x%x\n", captype); - ok((actual_support & minimum_support) == minimum_support, - "Error: minimum support 0x%x for type 0x%x, got 0x%x\n", minimum_support, - captype, actual_support); - - - if (actual_support & TWQC_GETCURRENT) - { - memset(&cap, 0, sizeof(cap)); - cap.Cap = captype; - cap.ConType = TWON_DONTCARE16; - - rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_GETCURRENT, &cap); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, - "Error [rc %d|cc %d] doing MSG_GETCURRENT for type 0x%x\n", rc, status.ConditionCode, captype); - if (rc == TWRC_SUCCESS) - { - get_onevalue(cap.hContainer, &val, &type); - ok(type == TWTY_FIX32, "GETCURRENT for RESOLUTION is not type FIX32, is type %d\n", type); - memcpy(&orig_value, &val, sizeof(orig_value)); - GlobalFree(cap.hContainer); - } - } - - if (actual_support & TWQC_GETDEFAULT) - { - memset(&cap, 0, sizeof(cap)); - cap.Cap = captype; - cap.ConType = TWON_DONTCARE16; - - rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_GETDEFAULT, &cap); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, - "Error [rc %d|cc %d] doing MSG_GETDEFAULT for type 0x%x\n", rc, status.ConditionCode, captype); - if (rc == TWRC_SUCCESS) - { - get_onevalue(cap.hContainer, &val, &type); - ok(type == TWTY_FIX32, "GETDEFAULT for RESOLUTION is not type FIX32, is type %d\n", type); - memcpy(&default_value, &val, sizeof(default_value)); - GlobalFree(cap.hContainer); - } - } - - if (actual_support & TWQC_GET) - { - memset(&cap, 0, sizeof(cap)); - cap.Cap = captype; - cap.ConType = TWON_DONTCARE16; - - rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_GET, &cap); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, - "Error [rc %d|cc %d] doing MSG_GET for type 0x%x\n", rc, status.ConditionCode, captype); - if (rc == TWRC_SUCCESS) - { - TW_RANGE *range; - ok(cap.ConType == TWON_RANGE, "MSG_GET for ICAP_[XY]RESOLUTION did not return TWON_RANGE, but %d\n", cap.ConType); - range = GlobalLock(cap.hContainer); - trace("MSG_GET of 0x%x returned [ItemType %d|MinValue %d|MaxValue %d|StepSize %d|DefaultValue %d|CurrentValue %d]:\n", - cap.Cap, range->ItemType, range->MinValue, range->MaxValue, range->StepSize, - range->DefaultValue, range->CurrentValue); - for (new_value = range->MinValue; new_value < range->MaxValue; new_value += range->StepSize) - if (new_value != range->CurrentValue) - break; - GlobalUnlock(cap.hContainer); - GlobalFree(cap.hContainer); - } - } - - if (actual_support & TWQC_SET) - { - memset(&cap, 0, sizeof(cap)); - cap.Cap = captype; - cap.ConType = TWON_ONEVALUE; - cap.hContainer = alloc_and_set_onevalue(new_value, TWTY_FIX32); - - rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_SET, &cap); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, - "Error [rc %d|cc %d] doing MSG_SET for type 0x%x\n", rc, status.ConditionCode, captype); - GlobalFree(cap.hContainer); - - } - - if (actual_support & TWQC_RESET) - { - memset(&cap, 0, sizeof(cap)); - cap.Cap = captype; - cap.ConType = TWON_DONTCARE16; - - rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_RESET, &cap); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, - "Error [rc %d|cc %d] doing MSG_RESET for type 0x%x\n", rc, status.ConditionCode, captype); - if (rc == TWRC_SUCCESS) - GlobalFree(cap.hContainer); - } -} - -static void test_physical(TW_IDENTITY *appid, TW_IDENTITY *source, TW_UINT16 captype, TW_INT32 minimum_support) -{ - TW_UINT16 rc; - TW_STATUS status; - TW_CAPABILITY cap; - TW_UINT32 val; - TW_UINT16 type; - TW_INT32 actual_support; - - memset(&cap, 0, sizeof(cap)); - cap.Cap = captype; - cap.ConType = TWON_DONTCARE16; - - rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_QUERYSUPPORT, &cap); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, - "Error [rc %d|cc %d] doing MSG_QUERYSUPPORT for type 0x%x\n", rc, status.ConditionCode, captype); - if (rc != TWRC_SUCCESS) - return; - ok(get_onevalue(cap.hContainer, (TW_UINT32 *) &actual_support, NULL), "Returned cap.hContainer invalid for QuerySupport on type 0x%x\n", captype); - ok((actual_support & minimum_support) == minimum_support, - "Error: minimum support 0x%x for type 0x%x, got 0x%x\n", minimum_support, - captype, actual_support); - - - if (actual_support & TWQC_GETCURRENT) - { - memset(&cap, 0, sizeof(cap)); - cap.Cap = captype; - cap.ConType = TWON_DONTCARE16; - - rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_GETCURRENT, &cap); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, - "Error [rc %d|cc %d] doing MSG_GETCURRENT for type 0x%x\n", rc, status.ConditionCode, captype); - if (rc == TWRC_SUCCESS) - { - get_onevalue(cap.hContainer, &val, &type); - ok(type == TWTY_FIX32, "GETCURRENT for PHYSICALXXX is not type FIX32, is type %d\n", type); - GlobalFree(cap.hContainer); - } - } - - if (actual_support & TWQC_GETDEFAULT) - { - memset(&cap, 0, sizeof(cap)); - cap.Cap = captype; - cap.ConType = TWON_DONTCARE16; - - rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_GETDEFAULT, &cap); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, - "Error [rc %d|cc %d] doing MSG_GETDEFAULT for type 0x%x\n", rc, status.ConditionCode, captype); - if (rc == TWRC_SUCCESS) - { - get_onevalue(cap.hContainer, &val, &type); - ok(type == TWTY_FIX32, "GETDEFAULT for PHYSICALXXX is not type FIX32, is type %d\n", type); - GlobalFree(cap.hContainer); - } - } - - if (actual_support & TWQC_GET) - { - memset(&cap, 0, sizeof(cap)); - cap.Cap = captype; - cap.ConType = TWON_DONTCARE16; - - rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_GET, &cap); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, - "Error [rc %d|cc %d] doing MSG_GET for type 0x%x\n", rc, status.ConditionCode, captype); - if (rc == TWRC_SUCCESS) - { - get_onevalue(cap.hContainer, &val, &type); - ok(type == TWTY_FIX32, "GET for PHYSICALXXX is not type FIX32, is type %d\n", type); - trace("GET for Physical type 0x%x returns 0x%x\n", captype, val); - GlobalFree(cap.hContainer); - } - } - -} - -static void test_supported_sizes(TW_IDENTITY *appid, TW_IDENTITY *source, TW_INT32 minimum_support) -{ - TW_UINT16 rc; - TW_STATUS status; - TW_CAPABILITY cap; - TW_UINT32 val; - TW_UINT16 type; - TW_INT32 actual_support; - TW_UINT32 orig_value = TWSS_NONE; - TW_UINT32 default_value = TWSS_NONE; - TW_UINT32 new_value = TWSS_NONE; - - - memset(&cap, 0, sizeof(cap)); - cap.Cap = ICAP_SUPPORTEDSIZES; - cap.ConType = TWON_DONTCARE16; - - rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_QUERYSUPPORT, &cap); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, - "Error [rc %d|cc %d] doing MSG_QUERYSUPPORT for ICAP_SUPPORTEDSIZES\n", rc, status.ConditionCode); - if (rc != TWRC_SUCCESS) - return; - ok(get_onevalue(cap.hContainer, (TW_UINT32 *) &actual_support, NULL), "Returned cap.hContainer invalid for QuerySupport on ICAP_SUPPORTEDSIZES\n"); - ok((actual_support & minimum_support) == minimum_support, - "Error: minimum support 0x%x for ICAP_SUPPORTEDSIZES, got 0x%x\n", minimum_support, actual_support); - - if (actual_support & TWQC_GETCURRENT) - { - memset(&cap, 0, sizeof(cap)); - cap.Cap = ICAP_SUPPORTEDSIZES; - cap.ConType = TWON_DONTCARE16; - - rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_GETCURRENT, &cap); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, - "Error [rc %d|cc %d] doing MSG_GETCURRENT for ICAP_SUPPORTEDSIZES\n", rc, status.ConditionCode); - if (rc == TWRC_SUCCESS) - { - get_onevalue(cap.hContainer, &val, &type); - ok(type == TWTY_UINT16, "GETCURRENT for ICAP_SUPPORTEDSIZES is not type UINT16, is type %d\n", type); - trace("Current size is %d\n", val); - GlobalFree(cap.hContainer); - orig_value = val; - } - } - - if (actual_support & TWQC_GETDEFAULT) - { - memset(&cap, 0, sizeof(cap)); - cap.Cap = ICAP_SUPPORTEDSIZES; - cap.ConType = TWON_DONTCARE16; - - rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_GETDEFAULT, &cap); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, - "Error [rc %d|cc %d] doing MSG_GETDEFAULT for ICAP_SUPPORTEDSIZES\n", rc, status.ConditionCode); - if (rc == TWRC_SUCCESS) - { - get_onevalue(cap.hContainer, &val, &type); - ok(type == TWTY_UINT16, "GETDEFAULT for PHYSICALXXX is not type TWTY_UINT16, is type %d\n", type); - trace("Default size is %d\n", val); - GlobalFree(cap.hContainer); - default_value = val; - } - } - - if (actual_support & TWQC_GET) - { - memset(&cap, 0, sizeof(cap)); - cap.Cap = ICAP_SUPPORTEDSIZES; - cap.ConType = TWON_DONTCARE16; - - rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_GET, &cap); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, - "Error [rc %d|cc %d] doing MSG_GET for ICAP_SUPPORTEDSIZES\n", rc, status.ConditionCode); - check_get(&cap, actual_support, orig_value, default_value, &new_value); - } - - if (actual_support & TWQC_SET) - { - memset(&cap, 0, sizeof(cap)); - cap.Cap = ICAP_SUPPORTEDSIZES; - cap.ConType = TWON_ONEVALUE; - cap.hContainer = alloc_and_set_onevalue(new_value, TWTY_UINT16); - - rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_SET, &cap); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, - "Error [rc %d|cc %d] doing MSG_SET for ICAP_SUPPORTEDSIZES\n", rc, status.ConditionCode); - GlobalFree(cap.hContainer); - - } - - if (actual_support & TWQC_RESET) - { - memset(&cap, 0, sizeof(cap)); - cap.Cap = ICAP_SUPPORTEDSIZES; - cap.ConType = TWON_DONTCARE16; - - rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_RESET, &cap); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, - "Error [rc %d|cc %d] doing MSG_RESET for ICAP_SUPPORTEDSIZES\n", rc, status.ConditionCode); - if (rc == TWRC_SUCCESS) - GlobalFree(cap.hContainer); - } -} - -static void test_imagelayout(TW_IDENTITY *appid, TW_IDENTITY *source) -{ - TW_UINT16 rc; - TW_STATUS status; - TW_IMAGELAYOUT layout; - - rc = pDSM_Entry(appid, source, DG_IMAGE, DAT_IMAGELAYOUT, MSG_GET, &layout); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, - "Error [rc %d|cc %d] doing MSG_GET for DG_IMAGE/DAT_IMAGELAYOUT\n", rc, status.ConditionCode); - if (rc != TWRC_SUCCESS) - return; - trace("ImageLayout [Left %x.%x|Top %x.%x|Right %x.%x|Bottom %x.%x|Document %d|Page %d|Frame %d]\n", - layout.Frame.Left.Whole, layout.Frame.Left.Frac, - layout.Frame.Top.Whole, layout.Frame.Top.Frac, - layout.Frame.Right.Whole, layout.Frame.Right.Frac, - layout.Frame.Bottom.Whole, layout.Frame.Bottom.Frac, - layout.DocumentNumber, layout.PageNumber, layout.FrameNumber); - - memset(&layout, 0, sizeof(layout)); - layout.Frame.Left.Whole = 1; - layout.Frame.Right.Whole = 2; - layout.Frame.Top.Whole = 1; - layout.Frame.Bottom.Whole = 2; - rc = pDSM_Entry(appid, source, DG_IMAGE, DAT_IMAGELAYOUT, MSG_SET, &layout); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, - "Error [rc %d|cc %d] doing MSG_SET for DG_IMAGE/DAT_IMAGELAYOUT\n", rc, status.ConditionCode); - if (rc != TWRC_SUCCESS) - return; - - rc = pDSM_Entry(appid, source, DG_IMAGE, DAT_IMAGELAYOUT, MSG_GET, &layout); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS, - "Error [rc %d|cc %d] doing MSG_GET for DG_IMAGE/DAT_IMAGELAYOUT\n", rc, status.ConditionCode); - if (rc != TWRC_SUCCESS) - return; - trace("ImageLayout after set [Left %x.%x|Top %x.%x|Right %x.%x|Bottom %x.%x|Document %d|Page %d|Frame %d]\n", - layout.Frame.Left.Whole, layout.Frame.Left.Frac, - layout.Frame.Top.Whole, layout.Frame.Top.Frac, - layout.Frame.Right.Whole, layout.Frame.Right.Frac, - layout.Frame.Bottom.Whole, layout.Frame.Bottom.Frac, - layout.DocumentNumber, layout.PageNumber, layout.FrameNumber); -} - - -static void test_single_source(TW_IDENTITY *appid, TW_IDENTITY *source) -{ - TW_UINT16 rc; - TW_STATUS status; - TW_CAPABILITY cap; - UINT16 capabilities[CAP_CUSTOMBASE]; - - memset(&cap, 0, sizeof(cap)); - cap.Cap = CAP_SUPPORTEDCAPS; - cap.ConType = TWON_DONTCARE16; - - rc = pDSM_Entry(appid, source, DG_CONTROL, DAT_CAPABILITY, MSG_GET, &cap); - get_condition_code(appid, source, &status); - ok(rc == TWRC_SUCCESS || status.ConditionCode == TWCC_SUCCESS, - "Error obtaining CAP_SUPPORTEDCAPS\n"); - - memset(capabilities, 0, sizeof(capabilities)); - if (rc == TWRC_SUCCESS && cap.ConType == TWON_ARRAY) - { - TW_ARRAY *a; - a = GlobalLock(cap.hContainer); - if (a) - { - if (a->ItemType == TWTY_UINT16) - { - int i; - UINT16 *u = (UINT16 *) a->ItemList; - trace("%d Capabilities:\n", a->NumItems); - for (i = 0; i < a->NumItems; i++) - if (u[i] < sizeof(capabilities) / sizeof(capabilities[0])) - { - capabilities[u[i]] = 1; - trace(" %d: 0x%x\n", i, u[i]); - } - } - GlobalUnlock(cap.hContainer); - } - } - - /* All sources must support: */ - ok(capabilities[CAP_SUPPORTEDCAPS], "CAP_SUPPORTEDCAPS not supported\n"); - ok(capabilities[CAP_XFERCOUNT], "CAP_XFERCOUNT not supported\n"); - if (capabilities[CAP_XFERCOUNT]) - test_onevalue_cap(appid, source, CAP_XFERCOUNT, TWTY_INT16, - TWQC_GET | TWQC_SET | TWQC_GETDEFAULT | TWQC_GETCURRENT | TWQC_RESET); - ok(capabilities[CAP_UICONTROLLABLE], "CAP_UICONTROLLABLE not supported\n"); - if (capabilities[CAP_UICONTROLLABLE]) - test_onevalue_cap(appid, source, CAP_UICONTROLLABLE, TWTY_BOOL, TWQC_GET); - - if (source->SupportedGroups & DG_IMAGE) - { - /* - Sources that supply image information must support DG_CONTROL / DAT_CAPABILITY / - MSG_GET, MSG_GETCURRENT, MSG_GETDEFAULT on: - */ - ok(capabilities[ICAP_COMPRESSION], "ICAP_COMPRESSION not supported\n"); - if (capabilities[ICAP_COMPRESSION]) - test_onevalue_cap(appid, source, ICAP_COMPRESSION, TWTY_UINT16, - TWQC_GET | TWQC_GETDEFAULT | TWQC_GETCURRENT); - todo_wine - ok(capabilities[ICAP_PLANARCHUNKY], "ICAP_PLANARCHUNKY not supported\n"); - ok(capabilities[ICAP_PHYSICALHEIGHT], "ICAP_PHYSICALHEIGHT not supported\n"); - if (capabilities[ICAP_PHYSICALHEIGHT]) - test_physical(appid, source, ICAP_PHYSICALHEIGHT, - TWQC_GET | TWQC_GETDEFAULT | TWQC_GETCURRENT); - ok(capabilities[ICAP_PHYSICALWIDTH], "ICAP_PHYSICALWIDTH not supported\n"); - if (capabilities[ICAP_PHYSICALWIDTH]) - test_physical(appid, source, ICAP_PHYSICALWIDTH, - TWQC_GET | TWQC_GETDEFAULT | TWQC_GETCURRENT); - ok(capabilities[ICAP_PIXELFLAVOR], "ICAP_PIXELFLAVOR not supported\n"); - if (capabilities[ICAP_PIXELFLAVOR]) - test_onevalue_cap(appid, source, ICAP_PIXELFLAVOR, TWTY_UINT16, - TWQC_GET | TWQC_GETDEFAULT | TWQC_GETCURRENT); - - /* - Sources that supply image information must support DG_CONTROL / DAT_CAPABILITY / - MSG_GET, MSG_GETCURRENT, MSG_GETDEFAULT, MSG_RESET and MSG_SET on: - */ - ok(capabilities[ICAP_BITDEPTH], "ICAP_BITDEPTH not supported\n"); - if (capabilities[ICAP_BITDEPTH]) - test_onevalue_cap(appid, source, ICAP_BITDEPTH, TWTY_UINT16, - TWQC_GET | TWQC_GETDEFAULT | TWQC_GETCURRENT ); - todo_wine - ok(capabilities[ICAP_BITORDER], "ICAP_BITORDER not supported\n"); - ok(capabilities[ICAP_PIXELTYPE], "ICAP_PIXELTYPE not supported\n"); - if (capabilities[ICAP_PIXELTYPE]) - test_onevalue_cap(appid, source, ICAP_PIXELTYPE, TWTY_UINT16, - TWQC_GET | TWQC_SET | TWQC_GETDEFAULT | TWQC_GETCURRENT | TWQC_RESET); - ok(capabilities[ICAP_UNITS], "ICAP_UNITS not supported\n"); - if (capabilities[ICAP_UNITS]) - test_onevalue_cap(appid, source, ICAP_UNITS, TWTY_UINT16, - TWQC_GET | TWQC_SET | TWQC_GETDEFAULT | TWQC_GETCURRENT | TWQC_RESET); - ok(capabilities[ICAP_XFERMECH], "ICAP_XFERMECH not supported\n"); - if (capabilities[ICAP_XFERMECH]) - test_onevalue_cap(appid, source, ICAP_XFERMECH, TWTY_UINT16, - TWQC_GET | TWQC_SET | TWQC_GETDEFAULT | TWQC_GETCURRENT | TWQC_RESET); - ok(capabilities[ICAP_XRESOLUTION], "ICAP_XRESOLUTION not supported\n"); - if (capabilities[ICAP_XRESOLUTION]) - test_resolution(appid, source, ICAP_XRESOLUTION, - TWQC_GET | TWQC_SET | TWQC_GETDEFAULT | TWQC_GETCURRENT | TWQC_RESET); - ok(capabilities[ICAP_YRESOLUTION], "ICAP_YRESOLUTION not supported\n"); - if (capabilities[ICAP_YRESOLUTION]) - test_resolution(appid, source, ICAP_YRESOLUTION, - TWQC_GET | TWQC_SET | TWQC_GETDEFAULT | TWQC_GETCURRENT | TWQC_RESET); - - /* Optional capabilities */ - if (capabilities[CAP_AUTOFEED]) - test_onevalue_cap(appid, source, CAP_AUTOFEED, TWTY_BOOL, - TWQC_GET | TWQC_SET | TWQC_GETDEFAULT | TWQC_GETCURRENT | TWQC_RESET); - if (capabilities[CAP_FEEDERENABLED]) - test_onevalue_cap(appid, source, CAP_FEEDERENABLED, TWTY_BOOL, - TWQC_GET | TWQC_SET | TWQC_GETDEFAULT | TWQC_GETCURRENT | TWQC_RESET); - if (capabilities[ICAP_SUPPORTEDSIZES]) - test_supported_sizes(appid, source, - TWQC_GET | TWQC_SET | TWQC_GETDEFAULT | TWQC_GETCURRENT | TWQC_RESET); - - /* Additional tests */ - test_imagelayout(appid, source); - - } -} - -static void test_sources(TW_IDENTITY *appid) -{ - TW_UINT16 rc; - TW_IDENTITY source; - TW_STATUS status; - int scannercount = 0; - - memset(&source, 0, sizeof(source)); - rc = pDSM_Entry(appid, NULL, DG_CONTROL, DAT_IDENTITY, MSG_GETFIRST, &source); - get_condition_code(appid, NULL, &status); - ok( (rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS) || - (rc == TWRC_FAILURE && status.ConditionCode == TWCC_NODS), - "Get first invalid condition code, rc %d, cc %d\n", rc, status.ConditionCode); - - while (rc == TWRC_SUCCESS) - { - scannercount++; - trace("[Scanner %d|Version %d.%d(%s)|Protocol %d.%d|SupportedGroups 0x%x|Manufacturer %s|Family %s|ProductName %s]\n", - scannercount, - source.Version.MajorNum, source.Version.MinorNum, source.Version.Info, - source.ProtocolMajor, source.ProtocolMinor, source.SupportedGroups, - source.Manufacturer, source.ProductFamily, source.ProductName); - memset(&source, 0, sizeof(source)); - rc = pDSM_Entry(appid, NULL, DG_CONTROL, DAT_IDENTITY, MSG_GETNEXT, &source); - get_condition_code(appid, NULL, &status); - ok(rc == TWRC_SUCCESS || rc == TWRC_ENDOFLIST, "Get next source failed, rc %d, cc %d\n", rc, status.ConditionCode); - } - - memset(&source, 0, sizeof(source)); - rc = pDSM_Entry(appid, NULL, DG_CONTROL, DAT_IDENTITY, MSG_GETDEFAULT, &source); - get_condition_code(appid, NULL, &status); - ok( (rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS) || - (rc == TWRC_FAILURE && status.ConditionCode == TWCC_NODS), - "Get default invalid condition code, rc %d, cc %d\n", rc, status.ConditionCode); - - /* A DS might display a Popup during MSG_OPENDS, when the scanner is not connected */ - if (rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS && winetest_interactive) - { - rc = pDSM_Entry(appid, NULL, DG_CONTROL, DAT_IDENTITY, MSG_OPENDS, &source); - get_condition_code(appid, NULL, &status); - - if (rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS) - { - rc = pDSM_Entry(appid, NULL, DG_CONTROL, DAT_IDENTITY, MSG_CLOSEDS, &source); - get_condition_code(appid, NULL, &status); - ok(rc == TWRC_SUCCESS, "Close DS Failed, rc %d, cc %d\n", rc, status.ConditionCode); - } - } - - if (winetest_interactive) - { - trace("Interactive, so trying userselect\n"); - memset(&source, 0, sizeof(source)); - rc = pDSM_Entry(appid, NULL, DG_CONTROL, DAT_IDENTITY, MSG_USERSELECT, &source); - get_condition_code(appid, NULL, &status); - ok(rc == TWRC_SUCCESS || rc == TWRC_CANCEL, "Userselect failed, rc %d, cc %d\n", rc, status.ConditionCode); - - if (rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS) - { - rc = pDSM_Entry(appid, NULL, DG_CONTROL, DAT_IDENTITY, MSG_OPENDS, &source); - get_condition_code(appid, NULL, &status); - if (rc == TWRC_SUCCESS && status.ConditionCode == TWCC_SUCCESS) - { - test_single_source(appid, &source); - rc = pDSM_Entry(appid, NULL, DG_CONTROL, DAT_IDENTITY, MSG_CLOSEDS, &source); - get_condition_code(appid, NULL, &status); - ok(rc == TWRC_SUCCESS, "Close DS Failed, rc %d, cc %d\n", rc, status.ConditionCode); - } - } - } - -} - -START_TEST(dsm) -{ - TW_IDENTITY appid; - TW_UINT16 rc; - HANDLE hwnd; - HMODULE htwain; - - if (!dsm_RegisterWindowClasses()) assert(0); - - htwain = LoadLibraryA("twain_32.dll"); - if (! htwain) - { - win_skip("twain_32.dll not available, skipping tests\n"); - return; - } - pDSM_Entry = (void*)GetProcAddress(htwain, "DSM_Entry"); - ok(pDSM_Entry != NULL, "Unable to GetProcAddress DSM_Entry\n"); - if (! pDSM_Entry) - { - win_skip("DSM_Entry not available, skipping tests\n"); - return; - } - - memset(&appid, 0, sizeof(appid)); - appid.Version.Language = TWLG_ENGLISH_USA; - appid.Version.Country = TWCY_USA; - appid.ProtocolMajor = TWON_PROTOCOLMAJOR; - appid.ProtocolMinor = TWON_PROTOCOLMINOR; - appid.SupportedGroups = DG_CONTROL | DG_IMAGE; - - hwnd = CreateWindow("TWAIN_dsm_class", "Twain Test", 0, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - NULL, NULL, GetModuleHandleA(0), NULL); - - rc = pDSM_Entry(&appid, NULL, DG_CONTROL, DAT_PARENT, MSG_OPENDSM, (TW_MEMREF) &hwnd); - ok(rc == TWRC_SUCCESS, "MSG_OPENDSM returned %d\n", rc); - - test_sources(&appid); - - rc = pDSM_Entry(&appid, NULL, DG_CONTROL, DAT_PARENT, MSG_CLOSEDSM, (TW_MEMREF) &hwnd); - ok(rc == TWRC_SUCCESS, "MSG_CLOSEDSM returned %d\n", rc); - - DestroyWindow(hwnd); - FreeLibrary(htwain); -} diff --git a/rostests/winetests/twain_32/testlist.c b/rostests/winetests/twain_32/testlist.c deleted file mode 100644 index 94d282a9e56..00000000000 --- a/rostests/winetests/twain_32/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_dsm(void); - -const struct test winetest_testlist[] = -{ - { "dsm", func_dsm }, - { 0, 0 } -}; diff --git a/rostests/winetests/twain_32/twain_32.rbuild b/rostests/winetests/twain_32/twain_32.rbuild deleted file mode 100644 index 688e6f86a6d..00000000000 --- a/rostests/winetests/twain_32/twain_32.rbuild +++ /dev/null @@ -1,10 +0,0 @@ - - . - - dsm.c - testlist.c - wine - user32 - gdi32 - ntdll - diff --git a/rostests/winetests/urlmon/CMakeLists.txt b/rostests/winetests/urlmon/CMakeLists.txt deleted file mode 100644 index 609a9aae811..00000000000 --- a/rostests/winetests/urlmon/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ - -remove_definitions(-DWINVER=0x502 -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x502) - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - generated.c - misc.c - protocol.c - sec_mgr.c - stream.c - uri.c - url.c - testlist.c) - -add_executable(urlmon_winetest ${SOURCE}) -target_link_libraries(urlmon_winetest wine uuid) -set_module_type(urlmon_winetest win32cui) -add_importlibs(urlmon_winetest urlmon ole32 oleaut32 user32 advapi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET urlmon_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/urlmon/generated.c b/rostests/winetests/urlmon/generated.c deleted file mode 100644 index 63e892bc543..00000000000 --- a/rostests/winetests/urlmon/generated.c +++ /dev/null @@ -1,629 +0,0 @@ -/* File generated automatically from tools/winapi/tests.dat; do not edit! */ -/* This file can be copied, modified and distributed without restriction. */ - -/* - * Unit tests for data structure packing - */ - -#define WINVER 0x0501 -#define _WIN32_IE 0x0501 -#define _WIN32_WINNT 0x0501 - -#define WINE_NOWINSOCK - -#include -#include "windef.h" -#include "winbase.h" -#include "urlmon.h" - -#include "wine/test.h" - -/*********************************************************************** - * Compatibility macros - */ - -#define DWORD_PTR UINT_PTR -#define LONG_PTR INT_PTR -#define ULONG_PTR UINT_PTR - -/*********************************************************************** - * Windows API extension - */ - -#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus) -# define _TYPE_ALIGNMENT(type) __alignof(type) -#elif defined(__GNUC__) -# define _TYPE_ALIGNMENT(type) __alignof__(type) -#else -/* - * FIXME: May not be possible without a compiler extension - * (if type is not just a name that is, otherwise the normal - * TYPE_ALIGNMENT can be used) - */ -#endif - -#if defined(TYPE_ALIGNMENT) && defined(_MSC_VER) && _MSC_VER >= 800 && !defined(__cplusplus) -#pragma warning(disable:4116) -#endif - -#if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT) -# define TYPE_ALIGNMENT _TYPE_ALIGNMENT -#endif - -/*********************************************************************** - * Test helper macros - */ - -#define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size); - -#ifdef TYPE_ALIGNMENT -# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align); -#else -# define TEST_TYPE_ALIGN(type, align) -#endif - -#ifdef _TYPE_ALIGNMENT -# define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align); -# define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align); -#else -# define TEST_TARGET_ALIGN(type, align) -# define TEST_FIELD_ALIGN(type, field, align) -#endif - -#define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset); - -#define TEST_TARGET_SIZE(type, size) TEST_TYPE_SIZE(*(type)0, size) -#define TEST_FIELD_SIZE(type, field, size) TEST_TYPE_SIZE((((type*)0)->field), size) -#define TEST_TYPE_SIGNED(type) C_ASSERT((type) -1 < 0); -#define TEST_TYPE_UNSIGNED(type) C_ASSERT((type) -1 > 0); - - -#ifdef _WIN64 - -static void test_pack_BINDINFO(void) -{ - /* BINDINFO */ - TEST_FIELD_SIZE (BINDINFO, cbSize, 4) - TEST_FIELD_ALIGN (BINDINFO, cbSize, 4) - TEST_FIELD_OFFSET(BINDINFO, cbSize, 0) - TEST_FIELD_SIZE (BINDINFO, szExtraInfo, 8) - TEST_FIELD_ALIGN (BINDINFO, szExtraInfo, 8) - TEST_FIELD_OFFSET(BINDINFO, szExtraInfo, 8) -} - -static void test_pack_IBindHost(void) -{ - /* IBindHost */ -} - -static void test_pack_IBindHostVtbl(void) -{ - /* IBindHostVtbl */ -} - -static void test_pack_IBindStatusCallback(void) -{ - /* IBindStatusCallback */ -} - -static void test_pack_IBindStatusCallbackVtbl(void) -{ - /* IBindStatusCallbackVtbl */ -} - -static void test_pack_IBinding(void) -{ - /* IBinding */ -} - -static void test_pack_IBindingVtbl(void) -{ - /* IBindingVtbl */ -} - -static void test_pack_IInternetProtocolInfo(void) -{ - /* IInternetProtocolInfo */ -} - -static void test_pack_IInternetProtocolInfoVtbl(void) -{ - /* IInternetProtocolInfoVtbl */ -} - -static void test_pack_IInternetSession(void) -{ - /* IInternetSession */ -} - -static void test_pack_IInternetSessionVtbl(void) -{ - /* IInternetSessionVtbl */ -} - -static void test_pack_IPersistMoniker(void) -{ - /* IPersistMoniker */ -} - -static void test_pack_IPersistMonikerVtbl(void) -{ - /* IPersistMonikerVtbl */ -} - -static void test_pack_IWinInetHttpInfo(void) -{ - /* IWinInetHttpInfo */ -} - -static void test_pack_IWinInetHttpInfoVtbl(void) -{ - /* IWinInetHttpInfoVtbl */ -} - -static void test_pack_IWinInetInfo(void) -{ - /* IWinInetInfo */ -} - -static void test_pack_IWinInetInfoVtbl(void) -{ - /* IWinInetInfoVtbl */ -} - -static void test_pack_LPBINDHOST(void) -{ - /* LPBINDHOST */ - TEST_TYPE_SIZE (LPBINDHOST, 8) - TEST_TYPE_ALIGN (LPBINDHOST, 8) -} - -static void test_pack_LPBINDING(void) -{ - /* LPBINDING */ - TEST_TYPE_SIZE (LPBINDING, 8) - TEST_TYPE_ALIGN (LPBINDING, 8) -} - -static void test_pack_LPBINDSTATUSCALLBACK(void) -{ - /* LPBINDSTATUSCALLBACK */ - TEST_TYPE_SIZE (LPBINDSTATUSCALLBACK, 8) - TEST_TYPE_ALIGN (LPBINDSTATUSCALLBACK, 8) -} - -static void test_pack_LPIINTERNETPROTOCOLINFO(void) -{ - /* LPIINTERNETPROTOCOLINFO */ - TEST_TYPE_SIZE (LPIINTERNETPROTOCOLINFO, 8) - TEST_TYPE_ALIGN (LPIINTERNETPROTOCOLINFO, 8) -} - -static void test_pack_LPIINTERNETSESSION(void) -{ - /* LPIINTERNETSESSION */ - TEST_TYPE_SIZE (LPIINTERNETSESSION, 8) - TEST_TYPE_ALIGN (LPIINTERNETSESSION, 8) -} - -static void test_pack_LPPERSISTMONIKER(void) -{ - /* LPPERSISTMONIKER */ - TEST_TYPE_SIZE (LPPERSISTMONIKER, 8) - TEST_TYPE_ALIGN (LPPERSISTMONIKER, 8) -} - -static void test_pack_LPREMFORMATETC(void) -{ - /* LPREMFORMATETC */ - TEST_TYPE_SIZE (LPREMFORMATETC, 8) - TEST_TYPE_ALIGN (LPREMFORMATETC, 8) -} - -static void test_pack_LPREMSECURITY_ATTRIBUTES(void) -{ - /* LPREMSECURITY_ATTRIBUTES */ - TEST_TYPE_SIZE (LPREMSECURITY_ATTRIBUTES, 8) - TEST_TYPE_ALIGN (LPREMSECURITY_ATTRIBUTES, 8) -} - -static void test_pack_LPWININETHTTPINFO(void) -{ - /* LPWININETHTTPINFO */ - TEST_TYPE_SIZE (LPWININETHTTPINFO, 8) - TEST_TYPE_ALIGN (LPWININETHTTPINFO, 8) -} - -static void test_pack_LPWININETINFO(void) -{ - /* LPWININETINFO */ - TEST_TYPE_SIZE (LPWININETINFO, 8) - TEST_TYPE_ALIGN (LPWININETINFO, 8) -} - -static void test_pack_PREMSECURITY_ATTRIBUTES(void) -{ - /* PREMSECURITY_ATTRIBUTES */ - TEST_TYPE_SIZE (PREMSECURITY_ATTRIBUTES, 8) - TEST_TYPE_ALIGN (PREMSECURITY_ATTRIBUTES, 8) -} - -static void test_pack_REMSECURITY_ATTRIBUTES(void) -{ - /* REMSECURITY_ATTRIBUTES */ - TEST_TYPE_SIZE (REMSECURITY_ATTRIBUTES, 12) - TEST_TYPE_ALIGN (REMSECURITY_ATTRIBUTES, 4) - TEST_FIELD_SIZE (REMSECURITY_ATTRIBUTES, nLength, 4) - TEST_FIELD_ALIGN (REMSECURITY_ATTRIBUTES, nLength, 4) - TEST_FIELD_OFFSET(REMSECURITY_ATTRIBUTES, nLength, 0) - TEST_FIELD_SIZE (REMSECURITY_ATTRIBUTES, lpSecurityDescriptor, 4) - TEST_FIELD_ALIGN (REMSECURITY_ATTRIBUTES, lpSecurityDescriptor, 4) - TEST_FIELD_OFFSET(REMSECURITY_ATTRIBUTES, lpSecurityDescriptor, 4) - TEST_FIELD_SIZE (REMSECURITY_ATTRIBUTES, bInheritHandle, 4) - TEST_FIELD_ALIGN (REMSECURITY_ATTRIBUTES, bInheritHandle, 4) - TEST_FIELD_OFFSET(REMSECURITY_ATTRIBUTES, bInheritHandle, 8) -} - -static void test_pack_RemBINDINFO(void) -{ - /* RemBINDINFO */ - TEST_TYPE_SIZE (RemBINDINFO, 96) - TEST_TYPE_ALIGN (RemBINDINFO, 8) - TEST_FIELD_SIZE (RemBINDINFO, cbSize, 4) - TEST_FIELD_ALIGN (RemBINDINFO, cbSize, 4) - TEST_FIELD_OFFSET(RemBINDINFO, cbSize, 0) - TEST_FIELD_SIZE (RemBINDINFO, szExtraInfo, 8) - TEST_FIELD_ALIGN (RemBINDINFO, szExtraInfo, 8) - TEST_FIELD_OFFSET(RemBINDINFO, szExtraInfo, 8) - TEST_FIELD_SIZE (RemBINDINFO, grfBindInfoF, 4) - TEST_FIELD_ALIGN (RemBINDINFO, grfBindInfoF, 4) - TEST_FIELD_OFFSET(RemBINDINFO, grfBindInfoF, 16) - TEST_FIELD_SIZE (RemBINDINFO, dwBindVerb, 4) - TEST_FIELD_ALIGN (RemBINDINFO, dwBindVerb, 4) - TEST_FIELD_OFFSET(RemBINDINFO, dwBindVerb, 20) - TEST_FIELD_SIZE (RemBINDINFO, szCustomVerb, 8) - TEST_FIELD_ALIGN (RemBINDINFO, szCustomVerb, 8) - TEST_FIELD_OFFSET(RemBINDINFO, szCustomVerb, 24) - TEST_FIELD_SIZE (RemBINDINFO, cbstgmedData, 4) - TEST_FIELD_ALIGN (RemBINDINFO, cbstgmedData, 4) - TEST_FIELD_OFFSET(RemBINDINFO, cbstgmedData, 32) - TEST_FIELD_SIZE (RemBINDINFO, dwOptions, 4) - TEST_FIELD_ALIGN (RemBINDINFO, dwOptions, 4) - TEST_FIELD_OFFSET(RemBINDINFO, dwOptions, 36) - TEST_FIELD_SIZE (RemBINDINFO, dwOptionsFlags, 4) - TEST_FIELD_ALIGN (RemBINDINFO, dwOptionsFlags, 4) - TEST_FIELD_OFFSET(RemBINDINFO, dwOptionsFlags, 40) - TEST_FIELD_SIZE (RemBINDINFO, dwCodePage, 4) - TEST_FIELD_ALIGN (RemBINDINFO, dwCodePage, 4) - TEST_FIELD_OFFSET(RemBINDINFO, dwCodePage, 44) - TEST_FIELD_SIZE (RemBINDINFO, securityAttributes, 12) - TEST_FIELD_ALIGN (RemBINDINFO, securityAttributes, 4) - TEST_FIELD_OFFSET(RemBINDINFO, securityAttributes, 48) - TEST_FIELD_SIZE (RemBINDINFO, iid, 16) - TEST_FIELD_ALIGN (RemBINDINFO, iid, 4) - TEST_FIELD_OFFSET(RemBINDINFO, iid, 60) - TEST_FIELD_SIZE (RemBINDINFO, pUnk, 8) - TEST_FIELD_ALIGN (RemBINDINFO, pUnk, 8) - TEST_FIELD_OFFSET(RemBINDINFO, pUnk, 80) - TEST_FIELD_SIZE (RemBINDINFO, dwReserved, 4) - TEST_FIELD_ALIGN (RemBINDINFO, dwReserved, 4) - TEST_FIELD_OFFSET(RemBINDINFO, dwReserved, 88) -} - -static void test_pack_RemFORMATETC(void) -{ - /* RemFORMATETC */ - TEST_TYPE_SIZE (RemFORMATETC, 20) - TEST_TYPE_ALIGN (RemFORMATETC, 4) - TEST_FIELD_SIZE (RemFORMATETC, cfFormat, 4) - TEST_FIELD_ALIGN (RemFORMATETC, cfFormat, 4) - TEST_FIELD_OFFSET(RemFORMATETC, cfFormat, 0) - TEST_FIELD_SIZE (RemFORMATETC, ptd, 4) - TEST_FIELD_ALIGN (RemFORMATETC, ptd, 4) - TEST_FIELD_OFFSET(RemFORMATETC, ptd, 4) - TEST_FIELD_SIZE (RemFORMATETC, dwAspect, 4) - TEST_FIELD_ALIGN (RemFORMATETC, dwAspect, 4) - TEST_FIELD_OFFSET(RemFORMATETC, dwAspect, 8) - TEST_FIELD_SIZE (RemFORMATETC, lindex, 4) - TEST_FIELD_ALIGN (RemFORMATETC, lindex, 4) - TEST_FIELD_OFFSET(RemFORMATETC, lindex, 12) - TEST_FIELD_SIZE (RemFORMATETC, tymed, 4) - TEST_FIELD_ALIGN (RemFORMATETC, tymed, 4) - TEST_FIELD_OFFSET(RemFORMATETC, tymed, 16) -} - -#else /* _WIN64 */ - -static void test_pack_BINDINFO(void) -{ - /* BINDINFO */ - TEST_FIELD_SIZE (BINDINFO, cbSize, 4) - TEST_FIELD_ALIGN (BINDINFO, cbSize, 4) - TEST_FIELD_OFFSET(BINDINFO, cbSize, 0) - TEST_FIELD_SIZE (BINDINFO, szExtraInfo, 4) - TEST_FIELD_ALIGN (BINDINFO, szExtraInfo, 4) - TEST_FIELD_OFFSET(BINDINFO, szExtraInfo, 4) -} - -static void test_pack_IBindHost(void) -{ - /* IBindHost */ -} - -static void test_pack_IBindHostVtbl(void) -{ - /* IBindHostVtbl */ -} - -static void test_pack_IBindStatusCallback(void) -{ - /* IBindStatusCallback */ -} - -static void test_pack_IBindStatusCallbackVtbl(void) -{ - /* IBindStatusCallbackVtbl */ -} - -static void test_pack_IBinding(void) -{ - /* IBinding */ -} - -static void test_pack_IBindingVtbl(void) -{ - /* IBindingVtbl */ -} - -static void test_pack_IInternetProtocolInfo(void) -{ - /* IInternetProtocolInfo */ -} - -static void test_pack_IInternetProtocolInfoVtbl(void) -{ - /* IInternetProtocolInfoVtbl */ -} - -static void test_pack_IInternetSession(void) -{ - /* IInternetSession */ -} - -static void test_pack_IInternetSessionVtbl(void) -{ - /* IInternetSessionVtbl */ -} - -static void test_pack_IPersistMoniker(void) -{ - /* IPersistMoniker */ -} - -static void test_pack_IPersistMonikerVtbl(void) -{ - /* IPersistMonikerVtbl */ -} - -static void test_pack_IWinInetHttpInfo(void) -{ - /* IWinInetHttpInfo */ -} - -static void test_pack_IWinInetHttpInfoVtbl(void) -{ - /* IWinInetHttpInfoVtbl */ -} - -static void test_pack_IWinInetInfo(void) -{ - /* IWinInetInfo */ -} - -static void test_pack_IWinInetInfoVtbl(void) -{ - /* IWinInetInfoVtbl */ -} - -static void test_pack_LPBINDHOST(void) -{ - /* LPBINDHOST */ - TEST_TYPE_SIZE (LPBINDHOST, 4) - TEST_TYPE_ALIGN (LPBINDHOST, 4) -} - -static void test_pack_LPBINDING(void) -{ - /* LPBINDING */ - TEST_TYPE_SIZE (LPBINDING, 4) - TEST_TYPE_ALIGN (LPBINDING, 4) -} - -static void test_pack_LPBINDSTATUSCALLBACK(void) -{ - /* LPBINDSTATUSCALLBACK */ - TEST_TYPE_SIZE (LPBINDSTATUSCALLBACK, 4) - TEST_TYPE_ALIGN (LPBINDSTATUSCALLBACK, 4) -} - -static void test_pack_LPIINTERNETPROTOCOLINFO(void) -{ - /* LPIINTERNETPROTOCOLINFO */ - TEST_TYPE_SIZE (LPIINTERNETPROTOCOLINFO, 4) - TEST_TYPE_ALIGN (LPIINTERNETPROTOCOLINFO, 4) -} - -static void test_pack_LPIINTERNETSESSION(void) -{ - /* LPIINTERNETSESSION */ - TEST_TYPE_SIZE (LPIINTERNETSESSION, 4) - TEST_TYPE_ALIGN (LPIINTERNETSESSION, 4) -} - -static void test_pack_LPPERSISTMONIKER(void) -{ - /* LPPERSISTMONIKER */ - TEST_TYPE_SIZE (LPPERSISTMONIKER, 4) - TEST_TYPE_ALIGN (LPPERSISTMONIKER, 4) -} - -static void test_pack_LPREMFORMATETC(void) -{ - /* LPREMFORMATETC */ - TEST_TYPE_SIZE (LPREMFORMATETC, 4) - TEST_TYPE_ALIGN (LPREMFORMATETC, 4) -} - -static void test_pack_LPREMSECURITY_ATTRIBUTES(void) -{ - /* LPREMSECURITY_ATTRIBUTES */ - TEST_TYPE_SIZE (LPREMSECURITY_ATTRIBUTES, 4) - TEST_TYPE_ALIGN (LPREMSECURITY_ATTRIBUTES, 4) -} - -static void test_pack_LPWININETHTTPINFO(void) -{ - /* LPWININETHTTPINFO */ - TEST_TYPE_SIZE (LPWININETHTTPINFO, 4) - TEST_TYPE_ALIGN (LPWININETHTTPINFO, 4) -} - -static void test_pack_LPWININETINFO(void) -{ - /* LPWININETINFO */ - TEST_TYPE_SIZE (LPWININETINFO, 4) - TEST_TYPE_ALIGN (LPWININETINFO, 4) -} - -static void test_pack_PREMSECURITY_ATTRIBUTES(void) -{ - /* PREMSECURITY_ATTRIBUTES */ - TEST_TYPE_SIZE (PREMSECURITY_ATTRIBUTES, 4) - TEST_TYPE_ALIGN (PREMSECURITY_ATTRIBUTES, 4) -} - -static void test_pack_REMSECURITY_ATTRIBUTES(void) -{ - /* REMSECURITY_ATTRIBUTES */ - TEST_TYPE_SIZE (REMSECURITY_ATTRIBUTES, 12) - TEST_TYPE_ALIGN (REMSECURITY_ATTRIBUTES, 4) - TEST_FIELD_SIZE (REMSECURITY_ATTRIBUTES, nLength, 4) - TEST_FIELD_ALIGN (REMSECURITY_ATTRIBUTES, nLength, 4) - TEST_FIELD_OFFSET(REMSECURITY_ATTRIBUTES, nLength, 0) - TEST_FIELD_SIZE (REMSECURITY_ATTRIBUTES, lpSecurityDescriptor, 4) - TEST_FIELD_ALIGN (REMSECURITY_ATTRIBUTES, lpSecurityDescriptor, 4) - TEST_FIELD_OFFSET(REMSECURITY_ATTRIBUTES, lpSecurityDescriptor, 4) - TEST_FIELD_SIZE (REMSECURITY_ATTRIBUTES, bInheritHandle, 4) - TEST_FIELD_ALIGN (REMSECURITY_ATTRIBUTES, bInheritHandle, 4) - TEST_FIELD_OFFSET(REMSECURITY_ATTRIBUTES, bInheritHandle, 8) -} - -static void test_pack_RemBINDINFO(void) -{ - /* RemBINDINFO */ - TEST_TYPE_SIZE (RemBINDINFO, 72) - TEST_TYPE_ALIGN (RemBINDINFO, 4) - TEST_FIELD_SIZE (RemBINDINFO, cbSize, 4) - TEST_FIELD_ALIGN (RemBINDINFO, cbSize, 4) - TEST_FIELD_OFFSET(RemBINDINFO, cbSize, 0) - TEST_FIELD_SIZE (RemBINDINFO, szExtraInfo, 4) - TEST_FIELD_ALIGN (RemBINDINFO, szExtraInfo, 4) - TEST_FIELD_OFFSET(RemBINDINFO, szExtraInfo, 4) - TEST_FIELD_SIZE (RemBINDINFO, grfBindInfoF, 4) - TEST_FIELD_ALIGN (RemBINDINFO, grfBindInfoF, 4) - TEST_FIELD_OFFSET(RemBINDINFO, grfBindInfoF, 8) - TEST_FIELD_SIZE (RemBINDINFO, dwBindVerb, 4) - TEST_FIELD_ALIGN (RemBINDINFO, dwBindVerb, 4) - TEST_FIELD_OFFSET(RemBINDINFO, dwBindVerb, 12) - TEST_FIELD_SIZE (RemBINDINFO, szCustomVerb, 4) - TEST_FIELD_ALIGN (RemBINDINFO, szCustomVerb, 4) - TEST_FIELD_OFFSET(RemBINDINFO, szCustomVerb, 16) - TEST_FIELD_SIZE (RemBINDINFO, cbstgmedData, 4) - TEST_FIELD_ALIGN (RemBINDINFO, cbstgmedData, 4) - TEST_FIELD_OFFSET(RemBINDINFO, cbstgmedData, 20) - TEST_FIELD_SIZE (RemBINDINFO, dwOptions, 4) - TEST_FIELD_ALIGN (RemBINDINFO, dwOptions, 4) - TEST_FIELD_OFFSET(RemBINDINFO, dwOptions, 24) - TEST_FIELD_SIZE (RemBINDINFO, dwOptionsFlags, 4) - TEST_FIELD_ALIGN (RemBINDINFO, dwOptionsFlags, 4) - TEST_FIELD_OFFSET(RemBINDINFO, dwOptionsFlags, 28) - TEST_FIELD_SIZE (RemBINDINFO, dwCodePage, 4) - TEST_FIELD_ALIGN (RemBINDINFO, dwCodePage, 4) - TEST_FIELD_OFFSET(RemBINDINFO, dwCodePage, 32) - TEST_FIELD_SIZE (RemBINDINFO, securityAttributes, 12) - TEST_FIELD_ALIGN (RemBINDINFO, securityAttributes, 4) - TEST_FIELD_OFFSET(RemBINDINFO, securityAttributes, 36) - TEST_FIELD_SIZE (RemBINDINFO, iid, 16) - TEST_FIELD_ALIGN (RemBINDINFO, iid, 4) - TEST_FIELD_OFFSET(RemBINDINFO, iid, 48) - TEST_FIELD_SIZE (RemBINDINFO, pUnk, 4) - TEST_FIELD_ALIGN (RemBINDINFO, pUnk, 4) - TEST_FIELD_OFFSET(RemBINDINFO, pUnk, 64) - TEST_FIELD_SIZE (RemBINDINFO, dwReserved, 4) - TEST_FIELD_ALIGN (RemBINDINFO, dwReserved, 4) - TEST_FIELD_OFFSET(RemBINDINFO, dwReserved, 68) -} - -static void test_pack_RemFORMATETC(void) -{ - /* RemFORMATETC */ - TEST_TYPE_SIZE (RemFORMATETC, 20) - TEST_TYPE_ALIGN (RemFORMATETC, 4) - TEST_FIELD_SIZE (RemFORMATETC, cfFormat, 4) - TEST_FIELD_ALIGN (RemFORMATETC, cfFormat, 4) - TEST_FIELD_OFFSET(RemFORMATETC, cfFormat, 0) - TEST_FIELD_SIZE (RemFORMATETC, ptd, 4) - TEST_FIELD_ALIGN (RemFORMATETC, ptd, 4) - TEST_FIELD_OFFSET(RemFORMATETC, ptd, 4) - TEST_FIELD_SIZE (RemFORMATETC, dwAspect, 4) - TEST_FIELD_ALIGN (RemFORMATETC, dwAspect, 4) - TEST_FIELD_OFFSET(RemFORMATETC, dwAspect, 8) - TEST_FIELD_SIZE (RemFORMATETC, lindex, 4) - TEST_FIELD_ALIGN (RemFORMATETC, lindex, 4) - TEST_FIELD_OFFSET(RemFORMATETC, lindex, 12) - TEST_FIELD_SIZE (RemFORMATETC, tymed, 4) - TEST_FIELD_ALIGN (RemFORMATETC, tymed, 4) - TEST_FIELD_OFFSET(RemFORMATETC, tymed, 16) -} - -#endif /* _WIN64 */ - -static void test_pack(void) -{ - test_pack_BINDINFO(); - test_pack_IBindHost(); - test_pack_IBindHostVtbl(); - test_pack_IBindStatusCallback(); - test_pack_IBindStatusCallbackVtbl(); - test_pack_IBinding(); - test_pack_IBindingVtbl(); - test_pack_IInternetProtocolInfo(); - test_pack_IInternetProtocolInfoVtbl(); - test_pack_IInternetSession(); - test_pack_IInternetSessionVtbl(); - test_pack_IPersistMoniker(); - test_pack_IPersistMonikerVtbl(); - test_pack_IWinInetHttpInfo(); - test_pack_IWinInetHttpInfoVtbl(); - test_pack_IWinInetInfo(); - test_pack_IWinInetInfoVtbl(); - test_pack_LPBINDHOST(); - test_pack_LPBINDING(); - test_pack_LPBINDSTATUSCALLBACK(); - test_pack_LPIINTERNETPROTOCOLINFO(); - test_pack_LPIINTERNETSESSION(); - test_pack_LPPERSISTMONIKER(); - test_pack_LPREMFORMATETC(); - test_pack_LPREMSECURITY_ATTRIBUTES(); - test_pack_LPWININETHTTPINFO(); - test_pack_LPWININETINFO(); - test_pack_PREMSECURITY_ATTRIBUTES(); - test_pack_REMSECURITY_ATTRIBUTES(); - test_pack_RemBINDINFO(); - test_pack_RemFORMATETC(); -} - -START_TEST(generated) -{ - test_pack(); -} diff --git a/rostests/winetests/urlmon/misc.c b/rostests/winetests/urlmon/misc.c deleted file mode 100644 index e4dc20094d4..00000000000 --- a/rostests/winetests/urlmon/misc.c +++ /dev/null @@ -1,1748 +0,0 @@ -/* - * Copyright 2005-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 - */ - -#define COBJMACROS -#define CONST_VTABLE -#define NONAMELESSUNION - -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "ole2.h" -#include "urlmon.h" - -#include "initguid.h" - -DEFINE_GUID(CLSID_AboutProtocol, 0x3050F406, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B); - -#define DEFINE_EXPECT(func) \ - static BOOL expect_ ## func = FALSE, called_ ## func = FALSE - -#define SET_EXPECT(func) \ - expect_ ## func = TRUE - -#define CHECK_EXPECT(func) \ - do { \ - ok(expect_ ##func, "unexpected call " #func "\n"); \ - expect_ ## func = FALSE; \ - called_ ## func = TRUE; \ - }while(0) - -#define CHECK_EXPECT2(func) \ - do { \ - ok(expect_ ##func, "unexpected call " #func "\n"); \ - called_ ## func = TRUE; \ - }while(0) - -#define CHECK_CALLED(func) \ - do { \ - ok(called_ ## func, "expected " #func "\n"); \ - expect_ ## func = called_ ## func = FALSE; \ - }while(0) - -DEFINE_EXPECT(ParseUrl); -DEFINE_EXPECT(QI_IInternetProtocolInfo); -DEFINE_EXPECT(CreateInstance); -DEFINE_EXPECT(unk_Release); - -static HRESULT (WINAPI *pCoInternetCompareUrl)(LPCWSTR, LPCWSTR, DWORD); -static HRESULT (WINAPI *pCoInternetGetSecurityUrl)(LPCWSTR, LPWSTR*, PSUACTION, DWORD); -static HRESULT (WINAPI *pCoInternetGetSession)(DWORD, IInternetSession **, DWORD); -static HRESULT (WINAPI *pCoInternetParseUrl)(LPCWSTR, PARSEACTION, DWORD, LPWSTR, DWORD, DWORD *, DWORD); -static HRESULT (WINAPI *pCoInternetQueryInfo)(LPCWSTR, QUERYOPTION, DWORD, LPVOID, DWORD, DWORD *, DWORD); -static HRESULT (WINAPI *pCopyStgMedium)(const STGMEDIUM *, STGMEDIUM *); -static HRESULT (WINAPI *pFindMimeFromData)(LPBC, LPCWSTR, LPVOID, DWORD, LPCWSTR, - DWORD, LPWSTR*, DWORD); -static HRESULT (WINAPI *pObtainUserAgentString)(DWORD, LPSTR, DWORD*); -static HRESULT (WINAPI *pReleaseBindInfo)(BINDINFO*); -static HRESULT (WINAPI *pUrlMkGetSessionOption)(DWORD, LPVOID, DWORD, DWORD *, DWORD); -static HRESULT (WINAPI *pCompareSecurityIds)(BYTE*,DWORD,BYTE*,DWORD,DWORD); -static HRESULT (WINAPI *pCoInternetIsFeatureEnabled)(INTERNETFEATURELIST,DWORD); -static HRESULT (WINAPI *pCoInternetSetFeatureEnabled)(INTERNETFEATURELIST,DWORD,BOOL); -static HRESULT (WINAPI *pIEInstallScope)(DWORD*); - -static void test_CreateFormatEnum(void) -{ - IEnumFORMATETC *fenum = NULL, *fenum2 = NULL; - FORMATETC fetc[5]; - ULONG ul; - HRESULT hres; - - static DVTARGETDEVICE dev = {sizeof(dev),0,0,0,0,{0}}; - static FORMATETC formatetc[] = { - {0,&dev,0,0,0}, - {0,&dev,0,1,0}, - {0,NULL,0,2,0}, - {0,NULL,0,3,0}, - {0,NULL,0,4,0} - }; - - hres = CreateFormatEnumerator(0, formatetc, &fenum); - ok(hres == E_FAIL, "CreateFormatEnumerator failed: %08x, expected E_FAIL\n", hres); - hres = CreateFormatEnumerator(0, formatetc, NULL); - ok(hres == E_INVALIDARG, "CreateFormatEnumerator failed: %08x, expected E_INVALIDARG\n", hres); - hres = CreateFormatEnumerator(5, formatetc, NULL); - ok(hres == E_INVALIDARG, "CreateFormatEnumerator failed: %08x, expected E_INVALIDARG\n", hres); - - - hres = CreateFormatEnumerator(5, formatetc, &fenum); - ok(hres == S_OK, "CreateFormatEnumerator failed: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IEnumFORMATETC_Next(fenum, 2, NULL, &ul); - ok(hres == E_INVALIDARG, "Next failed: %08x, expected E_INVALIDARG\n", hres); - ul = 100; - hres = IEnumFORMATETC_Next(fenum, 0, fetc, &ul); - ok(hres == S_OK, "Next failed: %08x\n", hres); - ok(ul == 0, "ul=%d, expected 0\n", ul); - - hres = IEnumFORMATETC_Next(fenum, 2, fetc, &ul); - ok(hres == S_OK, "Next failed: %08x\n", hres); - ok(fetc[0].lindex == 0, "fetc[0].lindex=%d, expected 0\n", fetc[0].lindex); - ok(fetc[1].lindex == 1, "fetc[1].lindex=%d, expected 1\n", fetc[1].lindex); - ok(fetc[0].ptd == &dev, "fetc[0].ptd=%p, expected %p\n", fetc[0].ptd, &dev); - ok(ul == 2, "ul=%d, expected 2\n", ul); - - hres = IEnumFORMATETC_Skip(fenum, 1); - ok(hres == S_OK, "Skip failed: %08x\n", hres); - - hres = IEnumFORMATETC_Next(fenum, 4, fetc, &ul); - ok(hres == S_FALSE, "Next failed: %08x, expected S_FALSE\n", hres); - ok(fetc[0].lindex == 3, "fetc[0].lindex=%d, expected 3\n", fetc[0].lindex); - ok(fetc[1].lindex == 4, "fetc[1].lindex=%d, expected 4\n", fetc[1].lindex); - ok(fetc[0].ptd == NULL, "fetc[0].ptd=%p, expected NULL\n", fetc[0].ptd); - ok(ul == 2, "ul=%d, expected 2\n", ul); - - hres = IEnumFORMATETC_Next(fenum, 4, fetc, &ul); - ok(hres == S_FALSE, "Next failed: %08x, expected S_FALSE\n", hres); - ok(ul == 0, "ul=%d, expected 0\n", ul); - ul = 100; - hres = IEnumFORMATETC_Next(fenum, 0, fetc, &ul); - ok(hres == S_OK, "Next failed: %08x\n", hres); - ok(ul == 0, "ul=%d, expected 0\n", ul); - - hres = IEnumFORMATETC_Skip(fenum, 3); - ok(hres == S_FALSE, "Skip failed: %08x, expected S_FALSE\n", hres); - - hres = IEnumFORMATETC_Reset(fenum); - ok(hres == S_OK, "Reset failed: %08x\n", hres); - - hres = IEnumFORMATETC_Next(fenum, 5, fetc, NULL); - ok(hres == S_OK, "Next failed: %08x\n", hres); - ok(fetc[0].lindex == 0, "fetc[0].lindex=%d, expected 0\n", fetc[0].lindex); - - hres = IEnumFORMATETC_Reset(fenum); - ok(hres == S_OK, "Reset failed: %08x\n", hres); - - hres = IEnumFORMATETC_Skip(fenum, 2); - ok(hres == S_OK, "Skip failed: %08x\n", hres); - - hres = IEnumFORMATETC_Clone(fenum, NULL); - ok(hres == E_INVALIDARG, "Clone failed: %08x, expected E_INVALIDARG\n", hres); - - hres = IEnumFORMATETC_Clone(fenum, &fenum2); - ok(hres == S_OK, "Clone failed: %08x\n", hres); - - if(SUCCEEDED(hres)) { - ok(fenum != fenum2, "fenum == fenum2\n"); - - hres = IEnumFORMATETC_Next(fenum2, 2, fetc, &ul); - ok(hres == S_OK, "Next failed: %08x\n", hres); - ok(fetc[0].lindex == 2, "fetc[0].lindex=%d, expected 2\n", fetc[0].lindex); - - IEnumFORMATETC_Release(fenum2); - } - - hres = IEnumFORMATETC_Next(fenum, 2, fetc, &ul); - ok(hres == S_OK, "Next failed: %08x\n", hres); - ok(fetc[0].lindex == 2, "fetc[0].lindex=%d, expected 2\n", fetc[0].lindex); - - hres = IEnumFORMATETC_Skip(fenum, 1); - ok(hres == S_OK, "Skip failed: %08x\n", hres); - - IEnumFORMATETC_Release(fenum); -} - -static void test_RegisterFormatEnumerator(void) -{ - IBindCtx *bctx = NULL; - IEnumFORMATETC *format = NULL, *format2 = NULL; - IUnknown *unk = NULL; - HRESULT hres; - - static FORMATETC formatetc = {0,NULL,0,0,0}; - static WCHAR wszEnumFORMATETC[] = - {'_','E','n','u','m','F','O','R','M','A','T','E','T','C','_',0}; - - CreateBindCtx(0, &bctx); - - hres = CreateFormatEnumerator(1, &formatetc, &format); - ok(hres == S_OK, "CreateFormatEnumerator failed: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = RegisterFormatEnumerator(NULL, format, 0); - ok(hres == E_INVALIDARG, - "RegisterFormatEnumerator failed: %08x, expected E_INVALIDARG\n", hres); - hres = RegisterFormatEnumerator(bctx, NULL, 0); - ok(hres == E_INVALIDARG, - "RegisterFormatEnumerator failed: %08x, expected E_INVALIDARG\n", hres); - - hres = RegisterFormatEnumerator(bctx, format, 0); - ok(hres == S_OK, "RegisterFormatEnumerator failed: %08x\n", hres); - - hres = IBindCtx_GetObjectParam(bctx, wszEnumFORMATETC, &unk); - ok(hres == S_OK, "GetObjectParam failed: %08x\n", hres); - ok(unk == (IUnknown*)format, "unk != format\n"); - - hres = RevokeFormatEnumerator(NULL, format); - ok(hres == E_INVALIDARG, - "RevokeFormatEnumerator failed: %08x, expected E_INVALIDARG\n", hres); - - hres = RevokeFormatEnumerator(bctx, format); - ok(hres == S_OK, "RevokeFormatEnumerator failed: %08x\n", hres); - - hres = RevokeFormatEnumerator(bctx, format); - ok(hres == E_FAIL, "RevokeFormatEnumerator failed: %08x, expected E_FAIL\n", hres); - - hres = IBindCtx_GetObjectParam(bctx, wszEnumFORMATETC, &unk); - ok(hres == E_FAIL, "GetObjectParam failed: %08x, expected E_FAIL\n", hres); - - hres = RegisterFormatEnumerator(bctx, format, 0); - ok(hres == S_OK, "RegisterFormatEnumerator failed: %08x\n", hres); - - hres = CreateFormatEnumerator(1, &formatetc, &format2); - ok(hres == S_OK, "CreateFormatEnumerator failed: %08x\n", hres); - - if(SUCCEEDED(hres)) { - hres = RevokeFormatEnumerator(bctx, format); - ok(hres == S_OK, "RevokeFormatEnumerator failed: %08x\n", hres); - - IEnumFORMATETC_Release(format2); - } - - hres = IBindCtx_GetObjectParam(bctx, wszEnumFORMATETC, &unk); - ok(hres == E_FAIL, "GetObjectParam failed: %08x, expected E_FAIL\n", hres); - - IEnumFORMATETC_Release(format); - - hres = RegisterFormatEnumerator(bctx, format, 0); - ok(hres == S_OK, "RegisterFormatEnumerator failed: %08x\n", hres); - hres = RevokeFormatEnumerator(bctx, NULL); - ok(hres == S_OK, "RevokeFormatEnumerator failed: %08x\n", hres); - hres = IBindCtx_GetObjectParam(bctx, wszEnumFORMATETC, &unk); - ok(hres == E_FAIL, "GetObjectParam failed: %08x, expected E_FAIL\n", hres); - - IEnumFORMATETC_Release(format); - IBindCtx_Release(bctx); -} - -static const WCHAR url1[] = {'r','e','s',':','/','/','m','s','h','t','m','l','.','d','l','l', - '/','b','l','a','n','k','.','h','t','m',0}; -static const WCHAR url2[] = {'i','n','d','e','x','.','h','t','m',0}; -static const WCHAR url3[] = {'f','i','l','e',':','/','/','c',':','\\','I','n','d','e','x','.','h','t','m',0}; -static const WCHAR url4[] = {'f','i','l','e',':','s','o','m','e','%','2','0','f','i','l','e', - '%','2','e','j','p','g',0}; -static const WCHAR url5[] = {'h','t','t','p',':','/','/','w','w','w','.','w','i','n','e','h','q', - '.','o','r','g',0}; -static const WCHAR url6[] = {'a','b','o','u','t',':','b','l','a','n','k',0}; -static const WCHAR url7[] = {'f','t','p',':','/','/','w','i','n','e','h','q','.','o','r','g','/', - 'f','i','l','e','.','t','e','s','t',0}; -static const WCHAR url8[] = {'t','e','s','t',':','1','2','3','a','b','c',0}; -static const WCHAR url9[] = - {'h','t','t','p',':','/','/','w','w','w','.','w','i','n','e','h','q','.','o','r','g', - '/','s','i','t','e','/','a','b','o','u','t',0}; -static const WCHAR url10[] = {'f','i','l','e',':','/','/','s','o','m','e','%','2','0','f','i','l','e', - '.','j','p','g',0}; -static const WCHAR url11[] = {'h','t','t','p',':','/','/','g','o','o','g','l','e','.','*','.', - 'c','o','m',0}; -static const WCHAR url4e[] = {'f','i','l','e',':','s','o','m','e',' ','f','i','l','e', - '.','j','p','g',0}; - -static const WCHAR path3[] = {'c',':','\\','I','n','d','e','x','.','h','t','m',0}; -static const WCHAR path4[] = {'s','o','m','e',' ','f','i','l','e','.','j','p','g',0}; - -static const WCHAR wszRes[] = {'r','e','s',0}; -static const WCHAR wszFile[] = {'f','i','l','e',0}; -static const WCHAR wszHttp[] = {'h','t','t','p',0}; -static const WCHAR wszAbout[] = {'a','b','o','u','t',0}; -static const WCHAR wszEmpty[] = {0}; -static const WCHAR wszGoogle[] = {'g','o','o','g','l','e','.','*','.','c','o','m',0}; - -static const WCHAR wszWineHQ[] = {'w','w','w','.','w','i','n','e','h','q','.','o','r','g',0}; -static const WCHAR wszHttpWineHQ[] = {'h','t','t','p',':','/','/','w','w','w','.', - 'w','i','n','e','h','q','.','o','r','g',0}; -static const WCHAR wszHttpGoogle[] = {'h','t','t','p',':','/','/','g','o','o','g','l','e', - '.','*','.','c','o','m',0}; - -struct parse_test { - LPCWSTR url; - HRESULT secur_hres; - LPCWSTR encoded_url; - HRESULT path_hres; - LPCWSTR path; - LPCWSTR schema; - LPCWSTR domain; - HRESULT domain_hres; - LPCWSTR rootdocument; - HRESULT rootdocument_hres; -}; - -static const struct parse_test parse_tests[] = { - {url1, S_OK, url1, E_INVALIDARG, NULL, wszRes, NULL, E_FAIL, NULL, E_FAIL}, - {url2, E_FAIL, url2, E_INVALIDARG, NULL, wszEmpty, NULL, E_FAIL, NULL, E_FAIL}, - {url3, E_FAIL, url3, S_OK, path3, wszFile, wszEmpty, S_OK, NULL, E_FAIL}, - {url4, E_FAIL, url4e, S_OK, path4, wszFile, wszEmpty, S_OK, NULL, E_FAIL}, - {url5, E_FAIL, url5, E_INVALIDARG, NULL, wszHttp, wszWineHQ, S_OK, wszHttpWineHQ, S_OK}, - {url6, S_OK, url6, E_INVALIDARG, NULL, wszAbout, NULL, E_FAIL, NULL, E_FAIL}, - {url11, E_FAIL, url11, E_INVALIDARG, NULL, wszHttp, wszGoogle, S_OK, wszHttpGoogle, S_OK} -}; - -static void test_CoInternetParseUrl(void) -{ - HRESULT hres; - DWORD size; - int i; - - static WCHAR buf[4096]; - - memset(buf, 0xf0, sizeof(buf)); - hres = pCoInternetParseUrl(parse_tests[0].url, PARSE_SCHEMA, 0, buf, - 3, &size, 0); - ok(hres == E_POINTER, "schema failed: %08x, expected E_POINTER\n", hres); - - for(i=0; i < sizeof(parse_tests)/sizeof(parse_tests[0]); i++) { - memset(buf, 0xf0, sizeof(buf)); - hres = pCoInternetParseUrl(parse_tests[i].url, PARSE_SECURITY_URL, 0, buf, - sizeof(buf)/sizeof(WCHAR), &size, 0); - ok(hres == parse_tests[i].secur_hres, "[%d] security url failed: %08x, expected %08x\n", - i, hres, parse_tests[i].secur_hres); - - memset(buf, 0xf0, sizeof(buf)); - hres = pCoInternetParseUrl(parse_tests[i].url, PARSE_ENCODE, 0, buf, - sizeof(buf)/sizeof(WCHAR), &size, 0); - ok(hres == S_OK, "[%d] encoding failed: %08x\n", i, hres); - ok(size == lstrlenW(parse_tests[i].encoded_url), "[%d] wrong size\n", i); - ok(!lstrcmpW(parse_tests[i].encoded_url, buf), "[%d] wrong encoded url\n", i); - - memset(buf, 0xf0, sizeof(buf)); - hres = pCoInternetParseUrl(parse_tests[i].url, PARSE_PATH_FROM_URL, 0, buf, - sizeof(buf)/sizeof(WCHAR), &size, 0); - ok(hres == parse_tests[i].path_hres, "[%d] path failed: %08x, expected %08x\n", - i, hres, parse_tests[i].path_hres); - if(parse_tests[i].path) { - ok(size == lstrlenW(parse_tests[i].path), "[%d] wrong size\n", i); - ok(!lstrcmpW(parse_tests[i].path, buf), "[%d] wrong path\n", i); - } - - memset(buf, 0xf0, sizeof(buf)); - hres = pCoInternetParseUrl(parse_tests[i].url, PARSE_SCHEMA, 0, buf, - sizeof(buf)/sizeof(WCHAR), &size, 0); - ok(hres == S_OK, "[%d] schema failed: %08x\n", i, hres); - ok(size == lstrlenW(parse_tests[i].schema), "[%d] wrong size\n", i); - ok(!lstrcmpW(parse_tests[i].schema, buf), "[%d] wrong schema\n", i); - - if(memcmp(parse_tests[i].url, wszRes, 3*sizeof(WCHAR)) - && memcmp(parse_tests[i].url, wszAbout, 5*sizeof(WCHAR))) { - memset(buf, 0xf0, sizeof(buf)); - hres = pCoInternetParseUrl(parse_tests[i].url, PARSE_DOMAIN, 0, buf, - sizeof(buf)/sizeof(WCHAR), &size, 0); - ok(hres == parse_tests[i].domain_hres, "[%d] domain failed: %08x\n", i, hres); - if(parse_tests[i].domain) - ok(!lstrcmpW(parse_tests[i].domain, buf), "[%d] wrong domain, received %s\n", i, wine_dbgstr_w(buf)); - } - - memset(buf, 0xf0, sizeof(buf)); - hres = pCoInternetParseUrl(parse_tests[i].url, PARSE_ROOTDOCUMENT, 0, buf, - sizeof(buf)/sizeof(WCHAR), &size, 0); - ok(hres == parse_tests[i].rootdocument_hres, "[%d] rootdocument failed: %08x\n", i, hres); - if(parse_tests[i].rootdocument) - ok(!lstrcmpW(parse_tests[i].rootdocument, buf), "[%d] wrong rootdocument, received %s\n", i, wine_dbgstr_w(buf)); - } -} - -static void test_CoInternetCompareUrl(void) -{ - HRESULT hres; - - hres = pCoInternetCompareUrl(url1, url1, 0); - ok(hres == S_OK, "CoInternetCompareUrl failed: %08x\n", hres); - - hres = pCoInternetCompareUrl(url1, url3, 0); - ok(hres == S_FALSE, "CoInternetCompareUrl failed: %08x\n", hres); - - hres = pCoInternetCompareUrl(url3, url1, 0); - ok(hres == S_FALSE, "CoInternetCompareUrl failed: %08x\n", hres); -} - -static const struct { - LPCWSTR url; - DWORD uses_net; -} query_info_tests[] = { - {url1, 0}, - {url2, 0}, - {url3, 0}, - {url4, 0}, - {url5, 0}, - {url6, 0}, - {url7, 0}, - {url8, 0} -}; - -static void test_CoInternetQueryInfo(void) -{ - BYTE buf[100]; - DWORD cb, i; - HRESULT hres; - - for(i=0; i < sizeof(query_info_tests)/sizeof(query_info_tests[0]); i++) { - cb = 0xdeadbeef; - memset(buf, '?', sizeof(buf)); - hres = pCoInternetQueryInfo(query_info_tests[0].url, QUERY_USES_NETWORK, 0, buf, sizeof(buf), &cb, 0); - ok(hres == S_OK, "[%d] CoInternetQueryInfo failed: %08x\n", i, hres); - ok(cb == sizeof(DWORD), "[%d] cb = %d\n", i, cb); - ok(*(DWORD*)buf == query_info_tests[i].uses_net, "[%d] ret %x, expected %x\n", - i, *(DWORD*)buf, query_info_tests[i].uses_net); - - hres = pCoInternetQueryInfo(query_info_tests[0].url, QUERY_USES_NETWORK, 0, buf, 3, &cb, 0); - ok(hres == E_FAIL, "[%d] CoInternetQueryInfo failed: %08x, expected E_FAIL\n", i, hres); - hres = pCoInternetQueryInfo(query_info_tests[0].url, QUERY_USES_NETWORK, 0, NULL, sizeof(buf), &cb, 0); - ok(hres == E_FAIL, "[%d] CoInternetQueryInfo failed: %08x, expected E_FAIL\n", i, hres); - - memset(buf, '?', sizeof(buf)); - hres = pCoInternetQueryInfo(query_info_tests[0].url, QUERY_USES_NETWORK, 0, buf, sizeof(buf), NULL, 0); - ok(hres == S_OK, "[%d] CoInternetQueryInfo failed: %08x\n", i, hres); - ok(*(DWORD*)buf == query_info_tests[i].uses_net, "[%d] ret %x, expected %x\n", - i, *(DWORD*)buf, query_info_tests[i].uses_net); - } -} - -static const WCHAR mimeTextHtml[] = {'t','e','x','t','/','h','t','m','l',0}; -static const WCHAR mimeTextPlain[] = {'t','e','x','t','/','p','l','a','i','n',0}; -static const WCHAR mimeTextRichtext[] = {'t','e','x','t','/','r','i','c','h','t','e','x','t',0}; -static const WCHAR mimeAppOctetStream[] = {'a','p','p','l','i','c','a','t','i','o','n','/', - 'o','c','t','e','t','-','s','t','r','e','a','m',0}; -static const WCHAR mimeImagePjpeg[] = {'i','m','a','g','e','/','p','j','p','e','g',0}; -static const WCHAR mimeImageGif[] = {'i','m','a','g','e','/','g','i','f',0}; -static const WCHAR mimeImageBmp[] = {'i','m','a','g','e','/','b','m','p',0}; -static const WCHAR mimeImageXPng[] = {'i','m','a','g','e','/','x','-','p','n','g',0}; -static const WCHAR mimeImageTiff[] = {'i','m','a','g','e','/','t','i','f','f',0}; -static const WCHAR mimeVideoAvi[] = {'v','i','d','e','o','/','a','v','i',0}; -static const WCHAR mimeVideoMpeg[] = {'v','i','d','e','o','/','m','p','e','g',0}; -static const WCHAR mimeAppPostscript[] = - {'a','p','p','l','i','c','a','t','i','o','n','/','p','o','s','t','s','c','r','i','p','t',0}; -static const WCHAR mimeAppXCompressed[] = {'a','p','p','l','i','c','a','t','i','o','n','/', - 'x','-','c','o','m','p','r','e','s','s','e','d',0}; -static const WCHAR mimeAppXZip[] = {'a','p','p','l','i','c','a','t','i','o','n','/', - 'x','-','z','i','p','-','c','o','m','p','r','e','s','s','e','d',0}; -static const WCHAR mimeAppXGzip[] = {'a','p','p','l','i','c','a','t','i','o','n','/', - 'x','-','g','z','i','p','-','c','o','m','p','r','e','s','s','e','d',0}; -static const WCHAR mimeAppJava[] = {'a','p','p','l','i','c','a','t','i','o','n','/','j','a','v','a',0}; -static const WCHAR mimeAppPdf[] = {'a','p','p','l','i','c','a','t','i','o','n','/','p','d','f',0}; -static const WCHAR mimeAppXMSDownload[] = - {'a','p','p','l','i','c','a','t','i','o','n','/','x','-','m','s','d','o','w','n','l','o','a','d',0}; -static const WCHAR mimeAudioWav[] = {'a','u','d','i','o','/','w','a','v',0}; -static const WCHAR mimeAudioBasic[] = {'a','u','d','i','o','/','b','a','s','i','c',0}; - -static const struct { - LPCWSTR url; - LPCWSTR mime; - HRESULT hres; -} mime_tests[] = { - {url1, mimeTextHtml, S_OK}, - {url2, mimeTextHtml, S_OK}, - {url3, mimeTextHtml, S_OK}, - {url4, NULL, E_FAIL}, - {url5, NULL, __HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)}, - {url6, NULL, E_FAIL}, - {url7, NULL, __HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)} -}; - -static BYTE data1[] = "test data\n"; -static BYTE data2[] = {31,'t','e','s',0xfa,'t',' ','d','a','t','a','\n',0}; -static BYTE data3[] = {0,0,0}; -static BYTE data4[] = {'t','e','s',0xfa,'t',' ','d','a','t','a','\n',0,0}; -static BYTE data5[] = {0xa,0xa,0xa,'x',32,'x',0}; -static BYTE data6[] = {0xfa,0xfa,0xfa,0xfa,'\n','\r','\t','x','x','x',1}; -static BYTE data7[] = "blahblah"; -static BYTE data8[] = {'t','e','s',0xfa,'t',' ','<','h','t','m','l','>','d','a','t','a','\n',0,0}; -static BYTE data9[] = {'t','e',0,'s',0xfa,'t',' ','<','h','t','m','l','>','d','a','t','a','\n',0,0}; -static BYTE data10[] = "blahblah"; -static BYTE data11[] = "blahblahblah"; -static BYTE data12[] = "blah'}; -static BYTE data19[] = {'G','I','F','8','7','a'}; -static BYTE data20[] = {'G','I','F','8','9','a'}; -static BYTE data21[] = {'G','I','F','8','7'}; -static BYTE data22[] = {'G','i','F','8','7','a'}; -static BYTE data23[] = {'G','i','F','8','8','a'}; -static BYTE data24[] = {'g','i','f','8','7','a'}; -static BYTE data25[] = {'G','i','F','8','7','A'}; -static BYTE data26[] = {'G','i','F','8','7','a','<','h','t','m','l','>'}; -static BYTE data27[] = {0x30,'G','i','F','8','7','A'}; -static BYTE data28[] = {0x42,0x4d,0x6e,0x42,0x1c,0x00,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00}; -static BYTE data29[] = {0x42,0x4d,'x','x','x','x',0x00,0x00,0x00,0x00,'x','x','x','x'}; -static BYTE data30[] = {0x42,0x4d,'x','x','x','x',0x00,0x01,0x00,0x00,'x','x','x','x'}; -static BYTE data31[] = {0x42,0x4d,'x','x','x','x',0x00,0x00,0x00,0x00,'<','h','t','m','l','>'}; -static BYTE data32[] = {0x42,0x4d,'x','x','x','x',0x00,0x00,0x00,0x00,'x','x','x'}; -static BYTE data33[] = {0x00,0x42,0x4d,'x','x','x','x',0x00,0x00,0x00,0x00,'x','x','x'}; -static BYTE data34[] = {0x89,'P','N','G',0x0d,0x0a,0x1a,0x0a,'x'}; -static BYTE data35[] = {0x89,'P','N','G',0x0d,0x0a,0x1a,0x0a,'x','x','x','x',0}; -static BYTE data36[] = {0x89,'P','N','G',0x0d,0x0a,0x1a,'x','x'}; -static BYTE data37[] = {0x89,'P','N','G',0x0d,0x0a,0x1a,0x0a,'<','h','t','m','l','>'}; -static BYTE data38[] = {0x00,0x89,'P','N','G',0x0d,0x0a,0x1a,0x0a,'x'}; -static BYTE data39[] = {0x4d,0x4d,0x00,0x2a}; -static BYTE data40[] = {0x4d,0x4d,0x00,0x2a,'<','h','t','m','l','>',0}; -static BYTE data41[] = {0x4d,0x4d,0xff}; -static BYTE data42[] = {0x4d,0x4d}; -static BYTE data43[] = {0x00,0x4d,0x4d,0x00}; -static BYTE data44[] = {'R','I','F','F',0xff,0xff,0xff,0xff,'A','V','I',0x20,0xff}; -static BYTE data45[] = {'R','I','F','f',0xff,0xff,0xff,0xff,'A','V','I',0x20,0xff}; -static BYTE data46[] = {'R','I','F','F',0xff,0xff,0xff,0xff,'A','V','I',0x20}; -static BYTE data47[] = {'R','I','F','F',0xff,0xff,0xff,0xff,'A','V','I',0x21,0xff}; -static BYTE data48[] = {'R','I','F','F',0xff,0xff,0xff,0xff,'A','V','I',0x20,'<','h','t','m','l','>'}; -static BYTE data49[] = {'R','I','F','F',0x0f,0x0f,0xf0,0xf0,'A','V','I',0x20,0xf0,0x00}; -static BYTE data50[] = {0x00,0x00,0x01,0xb3,0xff}; -static BYTE data51[] = {0x00,0x00,0x01,0xba,0xff}; -static BYTE data52[] = {0x00,0x00,0x01,0xb8,0xff}; -static BYTE data53[] = {0x00,0x00,0x01,0xba}; -static BYTE data54[] = {0x00,0x00,0x01,0xba,'<','h','t','m','l','>'}; -static BYTE data55[] = {0x1f,0x8b,'x'}; -static BYTE data56[] = {0x1f}; -static BYTE data57[] = {0x1f,0x8b,'<','h','t','m','l','>','t','e','s','t',0}; -static BYTE data58[] = {0x1f,0x8b}; -static BYTE data59[] = {0x50,0x4b,'x'}; -static BYTE data60[] = {0x50,0x4b}; -static BYTE data61[] = {0x50,0x4b,'<','h','t','m','l','>',0}; -static BYTE data62[] = {0xca,0xfe,0xba,0xbe,'x'}; -static BYTE data63[] = {0xca,0xfe,0xba,0xbe}; -static BYTE data64[] = {0xca,0xfe,0xba,0xbe,'<','h','t','m','l','>',0}; -static BYTE data65[] = {0x25,0x50,0x44,0x46,'x'}; -static BYTE data66[] = {0x25,0x50,0x44,0x46}; -static BYTE data67[] = {0x25,0x50,0x44,0x46,'x','<','h','t','m','l','>'}; -static BYTE data68[] = {'M','Z','x'}; -static BYTE data69[] = {'M','Z'}; -static BYTE data70[] = {'M','Z','<','h','t','m','l','>',0xff}; -static BYTE data71[] = {'{','\\','r','t','f',0}; -static BYTE data72[] = {'{','\\','r','t','f'}; -static BYTE data73[] = {' ','{','\\','r','t','f',' '}; -static BYTE data74[] = {'{','\\','r','t','f','<','h','t','m','l','>',' '}; -static BYTE data75[] = {'R','I','F','F',0xff,0xff,0xff,0xff,'W','A','V','E',0xff}; -static BYTE data76[] = {'R','I','F','F',0xff,0xff,0xff,0xff,'W','A','V','E'}; -static BYTE data77[] = {'R','I','F','F',0xff,0xff,0xff,0xff,'W','A','V',0xff,0xff}; -static BYTE data78[] = {'R','I','F','F',0xff,0xff,0xff,0xff,'<','h','t','m','l','>',0xff}; -static BYTE data79[] = {'%','!',0xff}; -static BYTE data80[] = {'%','!'}; -static BYTE data81[] = {'%','!','P','S','<','h','t','m','l','>'}; -static BYTE data82[] = {'.','s','n','d',0}; -static BYTE data83[] = {'.','s','n','d'}; -static BYTE data84[] = {'.','s','n','d',0,'<','h','t','m','l','>',1,1}; -static BYTE data85[] = {'.','S','N','D',0}; - -static const struct { - BYTE *data; - DWORD size; - LPCWSTR mime, mime_alt; -} mime_tests2[] = { - {data1, sizeof(data1), mimeTextPlain}, - {data2, sizeof(data2), mimeAppOctetStream}, - {data3, sizeof(data3), mimeAppOctetStream}, - {data4, sizeof(data4), mimeAppOctetStream}, - {data5, sizeof(data5), mimeTextPlain}, - {data6, sizeof(data6), mimeTextPlain}, - {data7, sizeof(data7), mimeTextHtml, mimeTextPlain /* IE8 */}, - {data8, sizeof(data8), mimeTextHtml, mimeTextPlain /* IE8 */}, - {data9, sizeof(data9), mimeTextHtml, mimeImagePjpeg /* IE8 */}, - {data10, sizeof(data10), mimeTextHtml, mimeTextPlain /* IE8 */}, - {data11, sizeof(data11), mimeTextHtml, mimeTextPlain /* IE8 */}, - {data12, sizeof(data12), mimeTextHtml, mimeTextPlain /* IE8 */}, - {data13, sizeof(data13), mimeTextPlain}, - {data14, sizeof(data14), mimeTextPlain}, - {data15, sizeof(data15), mimeTextPlain}, - {data16, sizeof(data16), mimeImagePjpeg}, - {data17, sizeof(data17), mimeAppOctetStream}, - {data18, sizeof(data18), mimeTextHtml}, - {data19, sizeof(data19), mimeImageGif}, - {data20, sizeof(data20), mimeImageGif}, - {data21, sizeof(data21), mimeTextPlain}, - {data22, sizeof(data22), mimeImageGif}, - {data23, sizeof(data23), mimeTextPlain}, - {data24, sizeof(data24), mimeImageGif}, - {data25, sizeof(data25), mimeImageGif}, - {data26, sizeof(data26), mimeTextHtml, mimeImageGif /* IE8 */}, - {data27, sizeof(data27), mimeTextPlain}, - {data28, sizeof(data28), mimeImageBmp}, - {data29, sizeof(data29), mimeImageBmp}, - {data30, sizeof(data30), mimeAppOctetStream}, - {data31, sizeof(data31), mimeTextHtml, mimeImageBmp /* IE8 */}, - {data32, sizeof(data32), mimeAppOctetStream}, - {data33, sizeof(data33), mimeAppOctetStream}, - {data34, sizeof(data34), mimeImageXPng}, - {data35, sizeof(data35), mimeImageXPng}, - {data36, sizeof(data36), mimeAppOctetStream}, - {data37, sizeof(data37), mimeTextHtml, mimeImageXPng /* IE8 */}, - {data38, sizeof(data38), mimeAppOctetStream}, - {data39, sizeof(data39), mimeImageTiff}, - {data40, sizeof(data40), mimeTextHtml, mimeImageTiff /* IE8 */}, - {data41, sizeof(data41), mimeImageTiff}, - {data42, sizeof(data42), mimeTextPlain}, - {data43, sizeof(data43), mimeAppOctetStream}, - {data44, sizeof(data44), mimeVideoAvi}, - {data45, sizeof(data45), mimeTextPlain}, - {data46, sizeof(data46), mimeTextPlain}, - {data47, sizeof(data47), mimeTextPlain}, - {data48, sizeof(data48), mimeTextHtml, mimeVideoAvi /* IE8 */}, - {data49, sizeof(data49), mimeVideoAvi}, - {data50, sizeof(data50), mimeVideoMpeg}, - {data51, sizeof(data51), mimeVideoMpeg}, - {data52, sizeof(data52), mimeAppOctetStream}, - {data53, sizeof(data53), mimeAppOctetStream}, - {data54, sizeof(data54), mimeTextHtml, mimeVideoMpeg /* IE8 */}, - {data55, sizeof(data55), mimeAppXGzip}, - {data56, sizeof(data56), mimeTextPlain}, - {data57, sizeof(data57), mimeTextHtml, mimeAppXGzip /* IE8 */}, - {data58, sizeof(data58), mimeAppOctetStream}, - {data59, sizeof(data59), mimeAppXZip}, - {data60, sizeof(data60), mimeTextPlain}, - {data61, sizeof(data61), mimeTextHtml, mimeAppXZip /* IE8 */}, - {data62, sizeof(data62), mimeAppJava}, - {data63, sizeof(data63), mimeTextPlain}, - {data64, sizeof(data64), mimeTextHtml, mimeAppJava /* IE8 */}, - {data65, sizeof(data65), mimeAppPdf}, - {data66, sizeof(data66), mimeTextPlain}, - {data67, sizeof(data67), mimeTextHtml, mimeAppPdf /* IE8 */}, - {data68, sizeof(data68), mimeAppXMSDownload}, - {data69, sizeof(data69), mimeTextPlain}, - {data70, sizeof(data70), mimeTextHtml, mimeAppXMSDownload /* IE8 */}, - {data71, sizeof(data71), mimeTextRichtext}, - {data72, sizeof(data72), mimeTextPlain}, - {data73, sizeof(data73), mimeTextPlain}, - {data74, sizeof(data74), mimeTextHtml, mimeTextRichtext /* IE8 */}, - {data75, sizeof(data75), mimeAudioWav}, - {data76, sizeof(data76), mimeTextPlain}, - {data77, sizeof(data77), mimeTextPlain}, - {data78, sizeof(data78), mimeTextHtml, mimeTextPlain /* IE8 */}, - {data79, sizeof(data79), mimeAppPostscript}, - {data80, sizeof(data80), mimeTextPlain}, - {data81, sizeof(data81), mimeTextHtml, mimeAppPostscript /* IE8 */}, - {data82, sizeof(data82), mimeAudioBasic}, - {data83, sizeof(data83), mimeTextPlain}, - {data84, sizeof(data84), mimeTextHtml, mimeAudioBasic /* IE8 */}, - {data85, sizeof(data85), mimeTextPlain} -}; - -static void test_FindMimeFromData(void) -{ - HRESULT hres; - LPWSTR mime; - int i; - - for(i=0; isizeof(wszFile)/sizeof(WCHAR) && - !memcmp(sec_url, wszFile, sizeof(wszFile)-sizeof(WCHAR)), - "Encoded url = %s\n", wine_dbgstr_w(sec_url)); - CoTaskMemFree(sec_url); - } - - CHECK_CALLED(QI_IInternetProtocolInfo); - CHECK_CALLED(ParseUrl); - } - - hres = IInternetSession_UnregisterNameSpace(session, &test_protocol_cf, wszTest); - ok(hres == S_OK, "UnregisterNameSpace failed: %08x\n", hres); - - hres = pCoInternetParseUrl(url8, PARSE_ENCODE, 0, buf, sizeof(buf)/sizeof(WCHAR), - &size, 0); - ok(hres == S_OK, "CoInternetParseUrl failed: %08x\n", hres); - - hres = IInternetSession_RegisterNameSpace(session, &test_protocol_cf2, &IID_NULL, - wszTest, 0, NULL, 0); - ok(hres == S_OK, "RegisterNameSpace failed: %08x\n", hres); - - hres = IInternetSession_RegisterNameSpace(session, &test_protocol_cf, &IID_NULL, - wszTest, 0, NULL, 0); - ok(hres == S_OK, "RegisterNameSpace failed: %08x\n", hres); - - hres = IInternetSession_RegisterNameSpace(session, &test_protocol_cf, &IID_NULL, - wszTest, 0, NULL, 0); - ok(hres == S_OK, "RegisterNameSpace failed: %08x\n", hres); - - SET_EXPECT(QI_IInternetProtocolInfo); - SET_EXPECT(ParseUrl); - - hres = pCoInternetParseUrl(url8, PARSE_ENCODE, 0, buf, sizeof(buf)/sizeof(WCHAR), - &size, 0); - ok(hres == S_OK, "CoInternetParseUrl failed: %08x\n", hres); - - CHECK_CALLED(QI_IInternetProtocolInfo); - CHECK_CALLED(ParseUrl); - - hres = IInternetSession_UnregisterNameSpace(session, &test_protocol_cf, wszTest); - ok(hres == S_OK, "UnregisterNameSpace failed: %08x\n", hres); - - SET_EXPECT(QI_IInternetProtocolInfo); - SET_EXPECT(ParseUrl); - - hres = pCoInternetParseUrl(url8, PARSE_ENCODE, 0, buf, sizeof(buf)/sizeof(WCHAR), - &size, 0); - ok(hres == S_OK, "CoInternetParseUrl failed: %08x\n", hres); - - CHECK_CALLED(QI_IInternetProtocolInfo); - CHECK_CALLED(ParseUrl); - - hres = IInternetSession_UnregisterNameSpace(session, &test_protocol_cf, wszTest); - ok(hres == S_OK, "UnregisterNameSpace failed: %08x\n", hres); - - expect_cf = &test_protocol_cf2; - SET_EXPECT(QI_IInternetProtocolInfo); - SET_EXPECT(ParseUrl); - - hres = pCoInternetParseUrl(url8, PARSE_ENCODE, 0, buf, sizeof(buf)/sizeof(WCHAR), - &size, 0); - ok(hres == S_OK, "CoInternetParseUrl failed: %08x\n", hres); - - CHECK_CALLED(QI_IInternetProtocolInfo); - CHECK_CALLED(ParseUrl); - - hres = IInternetSession_UnregisterNameSpace(session, &test_protocol_cf, wszTest); - ok(hres == S_OK, "UnregisterNameSpace failed: %08x\n", hres); - hres = IInternetSession_UnregisterNameSpace(session, &test_protocol_cf, wszTest); - ok(hres == S_OK, "UnregisterNameSpace failed: %08x\n", hres); - hres = IInternetSession_UnregisterNameSpace(session, &test_protocol_cf, NULL); - ok(hres == E_INVALIDARG, "UnregisterNameSpace failed: %08x\n", hres); - hres = IInternetSession_UnregisterNameSpace(session, NULL, wszTest); - ok(hres == E_INVALIDARG, "UnregisterNameSpace failed: %08x\n", hres); - - hres = IInternetSession_UnregisterNameSpace(session, &test_protocol_cf2, wszTest); - ok(hres == S_OK, "UnregisterNameSpace failed: %08x\n", hres); - - hres = pCoInternetParseUrl(url8, PARSE_ENCODE, 0, buf, sizeof(buf)/sizeof(WCHAR), - &size, 0); - ok(hres == S_OK, "CoInternetParseUrl failed: %08x\n", hres); - - IInternetSession_Release(session); -} - -static void test_MimeFilter(void) -{ - IInternetSession *session; - HRESULT hres; - - static const WCHAR mimeW[] = {'t','e','s','t','/','m','i','m','e',0}; - - hres = pCoInternetGetSession(0, &session, 0); - ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IInternetSession_RegisterMimeFilter(session, &test_cf, &IID_NULL, mimeW); - ok(hres == S_OK, "RegisterMimeFilter failed: %08x\n", hres); - - hres = IInternetSession_UnregisterMimeFilter(session, &test_cf, mimeW); - ok(hres == S_OK, "UnregisterMimeFilter failed: %08x\n", hres); - - hres = IInternetSession_UnregisterMimeFilter(session, &test_cf, mimeW); - ok(hres == S_OK, "UnregisterMimeFilter failed: %08x\n", hres); - - hres = IInternetSession_UnregisterMimeFilter(session, (void*)0xdeadbeef, mimeW); - ok(hres == S_OK, "UnregisterMimeFilter failed: %08x\n", hres); - - IInternetSession_Release(session); -} - -static ULONG WINAPI unk_Release(IUnknown *iface) -{ - CHECK_EXPECT(unk_Release); - return 0; -} - -static const IUnknownVtbl unk_vtbl = { - (void*)0xdeadbeef, - (void*)0xdeadbeef, - unk_Release -}; - -static void test_ReleaseBindInfo(void) -{ - BINDINFO bi; - IUnknown unk = { &unk_vtbl }; - - pReleaseBindInfo(NULL); /* shouldn't crash */ - - memset(&bi, 0, sizeof(bi)); - bi.cbSize = sizeof(BINDINFO); - bi.pUnk = &unk; - SET_EXPECT(unk_Release); - pReleaseBindInfo(&bi); - ok(bi.cbSize == sizeof(BINDINFO), "bi.cbSize=%d\n", bi.cbSize); - ok(bi.pUnk == NULL, "bi.pUnk=%p, expected NULL\n", bi.pUnk); - CHECK_CALLED(unk_Release); - - memset(&bi, 0, sizeof(bi)); - bi.cbSize = offsetof(BINDINFO, pUnk); - bi.pUnk = &unk; - pReleaseBindInfo(&bi); - ok(bi.cbSize == offsetof(BINDINFO, pUnk), "bi.cbSize=%d\n", bi.cbSize); - ok(bi.pUnk == &unk, "bi.pUnk=%p, expected %p\n", bi.pUnk, &unk); - - memset(&bi, 0, sizeof(bi)); - bi.pUnk = &unk; - pReleaseBindInfo(&bi); - ok(!bi.cbSize, "bi.cbSize=%d, expected 0\n", bi.cbSize); - ok(bi.pUnk == &unk, "bi.pUnk=%p, expected %p\n", bi.pUnk, &unk); -} - -static void test_CopyStgMedium(void) -{ - STGMEDIUM src, dst; - HGLOBAL empty; - HRESULT hres; - - static WCHAR fileW[] = {'f','i','l','e',0}; - - memset(&src, 0xf0, sizeof(src)); - memset(&dst, 0xe0, sizeof(dst)); - memset(&empty, 0xf0, sizeof(empty)); - src.tymed = TYMED_NULL; - src.pUnkForRelease = NULL; - hres = pCopyStgMedium(&src, &dst); - ok(hres == S_OK, "CopyStgMedium failed: %08x\n", hres); - ok(dst.tymed == TYMED_NULL, "tymed=%d\n", dst.tymed); - ok(dst.u.hGlobal == empty, "u=%p\n", dst.u.hGlobal); - ok(!dst.pUnkForRelease, "pUnkForRelease=%p, expected NULL\n", dst.pUnkForRelease); - - memset(&dst, 0xe0, sizeof(dst)); - src.tymed = TYMED_ISTREAM; - src.u.pstm = NULL; - src.pUnkForRelease = NULL; - hres = pCopyStgMedium(&src, &dst); - ok(hres == S_OK, "CopyStgMedium failed: %08x\n", hres); - ok(dst.tymed == TYMED_ISTREAM, "tymed=%d\n", dst.tymed); - ok(!dst.u.pstm, "pstm=%p\n", dst.u.pstm); - ok(!dst.pUnkForRelease, "pUnkForRelease=%p, expected NULL\n", dst.pUnkForRelease); - - memset(&dst, 0xe0, sizeof(dst)); - src.tymed = TYMED_FILE; - src.u.lpszFileName = fileW; - src.pUnkForRelease = NULL; - hres = pCopyStgMedium(&src, &dst); - ok(hres == S_OK, "CopyStgMedium failed: %08x\n", hres); - ok(dst.tymed == TYMED_FILE, "tymed=%d\n", dst.tymed); - ok(dst.u.lpszFileName && dst.u.lpszFileName != fileW, "lpszFileName=%p\n", dst.u.lpszFileName); - ok(!lstrcmpW(dst.u.lpszFileName, fileW), "wrong file name\n"); - ok(!dst.pUnkForRelease, "pUnkForRelease=%p, expected NULL\n", dst.pUnkForRelease); - ReleaseStgMedium(&dst); - - hres = pCopyStgMedium(&src, NULL); - ok(hres == E_POINTER, "CopyStgMedium failed: %08x, expected E_POINTER\n", hres); - hres = pCopyStgMedium(NULL, &dst); - ok(hres == E_POINTER, "CopyStgMedium failed: %08x, expected E_POINTER\n", hres); -} - -static void test_UrlMkGetSessionOption(void) -{ - DWORD encoding, size; - HRESULT hres; - - size = encoding = 0xdeadbeef; - hres = pUrlMkGetSessionOption(URLMON_OPTION_URL_ENCODING, &encoding, - sizeof(encoding), &size, 0); - ok(hres == S_OK, "UrlMkGetSessionOption failed: %08x\n", hres); - ok(encoding != 0xdeadbeef, "encoding not changed\n"); - ok(size == sizeof(encoding), "size=%d\n", size); - - size = encoding = 0xdeadbeef; - hres = pUrlMkGetSessionOption(URLMON_OPTION_URL_ENCODING, &encoding, - sizeof(encoding)+1, &size, 0); - ok(hres == S_OK, "UrlMkGetSessionOption failed: %08x\n", hres); - ok(encoding != 0xdeadbeef, "encoding not changed\n"); - ok(size == sizeof(encoding), "size=%d\n", size); - - size = encoding = 0xdeadbeef; - hres = pUrlMkGetSessionOption(URLMON_OPTION_URL_ENCODING, &encoding, - sizeof(encoding)-1, &size, 0); - ok(hres == E_INVALIDARG, "UrlMkGetSessionOption failed: %08x\n", hres); - ok(encoding == 0xdeadbeef, "encoding = %08x, exepcted 0xdeadbeef\n", encoding); - ok(size == 0xdeadbeef, "size=%d\n", size); - - size = encoding = 0xdeadbeef; - hres = pUrlMkGetSessionOption(URLMON_OPTION_URL_ENCODING, NULL, - sizeof(encoding)-1, &size, 0); - ok(hres == E_INVALIDARG, "UrlMkGetSessionOption failed: %08x\n", hres); - ok(encoding == 0xdeadbeef, "encoding = %08x, exepcted 0xdeadbeef\n", encoding); - ok(size == 0xdeadbeef, "size=%d\n", size); - - encoding = 0xdeadbeef; - hres = pUrlMkGetSessionOption(URLMON_OPTION_URL_ENCODING, &encoding, - sizeof(encoding)-1, NULL, 0); - ok(hres == E_INVALIDARG, "UrlMkGetSessionOption failed: %08x\n", hres); - ok(encoding == 0xdeadbeef, "encoding = %08x, exepcted 0xdeadbeef\n", encoding); -} - -static void test_user_agent(void) -{ - static const CHAR expected[] = "Mozilla/4.0 (compatible; MSIE "; - static char test_str[] = "test"; - static char test2_str[] = "test\0test"; - static CHAR str[3]; - LPSTR str2 = NULL; - HRESULT hres; - DWORD size, saved; - - hres = pObtainUserAgentString(0, NULL, NULL); - ok(hres == E_INVALIDARG, "ObtainUserAgentString failed: %08x\n", hres); - - size = 100; - hres = pObtainUserAgentString(0, NULL, &size); - ok(hres == E_INVALIDARG, "ObtainUserAgentString failed: %08x\n", hres); - ok(size == 100, "size=%d, expected %d\n", size, 100); - - size = 0; - hres = pObtainUserAgentString(0, str, &size); - ok(hres == E_OUTOFMEMORY, "ObtainUserAgentString failed: %08x\n", hres); - ok(size > 0, "size=%d, expected non-zero\n", size); - - size = 2; - str[0] = 'a'; - hres = pObtainUserAgentString(0, str, &size); - ok(hres == E_OUTOFMEMORY, "ObtainUserAgentString failed: %08x\n", hres); - ok(size > 0, "size=%d, expected non-zero\n", size); - ok(str[0] == 'a', "str[0]=%c, expected 'a'\n", str[0]); - - size = 0; - hres = pObtainUserAgentString(1, str, &size); - ok(hres == E_OUTOFMEMORY, "ObtainUserAgentString failed: %08x\n", hres); - ok(size > 0, "size=%d, expected non-zero\n", size); - - str2 = HeapAlloc(GetProcessHeap(), 0, (size+20)*sizeof(CHAR)); - saved = size; - hres = pObtainUserAgentString(0, str2, &size); - ok(hres == S_OK, "ObtainUserAgentString failed: %08x\n", hres); - ok(size == saved, "size=%d, expected %d\n", size, saved); - ok(strlen(expected) <= strlen(str2) && - !memcmp(expected, str2, strlen(expected)*sizeof(CHAR)), - "user agent was \"%s\", expected to start with \"%s\"\n", - str2, expected); - - size = saved+10; - hres = pObtainUserAgentString(0, str2, &size); - ok(hres == S_OK, "ObtainUserAgentString failed: %08x\n", hres); - ok(size == saved, "size=%d, expected %d\n", size, saved); - - size = 0; - hres = pUrlMkGetSessionOption(URLMON_OPTION_USERAGENT, NULL, 0, &size, 0); - ok(hres == E_OUTOFMEMORY, "UrlMkGetSessionOption failed: %08x\n", hres); - ok(size, "size == 0\n"); - - size = 0xdeadbeef; - hres = pUrlMkGetSessionOption(URLMON_OPTION_USERAGENT, NULL, 1000, &size, 0); - ok(hres == E_INVALIDARG, "UrlMkGetSessionOption failed: %08x\n", hres); - ok(size, "size == 0\n"); - - saved = size; - size = 0; - hres = pUrlMkGetSessionOption(URLMON_OPTION_USERAGENT, str2, saved+10, &size, 0); - ok(hres == E_OUTOFMEMORY, "UrlMkGetSessionOption failed: %08x\n", hres); - ok(size == saved, "size = %d, expected %d\n", size, saved); - ok(sizeof(expected) <= strlen(str2) && !memcmp(expected, str2, sizeof(expected)-1), - "user agent was \"%s\", expected to start with \"%s\"\n", - str2, expected); - - size = 0; - str2[0] = 0; - hres = pUrlMkGetSessionOption(URLMON_OPTION_USERAGENT, str2, saved, &size, 0); - ok(hres == E_OUTOFMEMORY, "UrlMkGetSessionOption failed: %08x\n", hres); - ok(size == saved, "size = %d, expected %d\n", size, saved); - ok(sizeof(expected) <= strlen(str2) && !memcmp(expected, str2, sizeof(expected)-1), - "user agent was \"%s\", expected to start with \"%s\"\n", - str2, expected); - - size = saved; - str2[0] = 0; - hres = pUrlMkGetSessionOption(URLMON_OPTION_USERAGENT, str2, saved-1, &size, 0); - ok(hres == E_OUTOFMEMORY, "UrlMkGetSessionOption failed: %08x\n", hres); - ok(size == saved, "size = %d, expected %d\n", size, saved); - ok(!str2[0], "buf changed\n"); - - size = saved; - str2[0] = 0; - hres = pUrlMkGetSessionOption(URLMON_OPTION_USERAGENT, str2, saved, NULL, 0); - ok(hres == E_INVALIDARG, "UrlMkGetSessionOption failed: %08x\n", hres); - ok(!str2[0], "buf changed\n"); - - hres = UrlMkSetSessionOption(URLMON_OPTION_USERAGENT, test_str, sizeof(test_str), 0); - ok(hres == S_OK, "UrlMkSetSessionOption failed: %08x\n", hres); - - size = 0; - str2[0] = 0; - hres = pUrlMkGetSessionOption(URLMON_OPTION_USERAGENT, str2, saved, &size, 0); - ok(hres == E_OUTOFMEMORY, "UrlMkGetSessionOption failed: %08x\n", hres); - ok(size == sizeof(test_str) && !memcmp(str2, test_str, sizeof(test_str)), "wrong user agent\n"); - - hres = UrlMkSetSessionOption(URLMON_OPTION_USERAGENT, test2_str, sizeof(test2_str), 0); - ok(hres == S_OK, "UrlMkSetSessionOption failed: %08x\n", hres); - - size = 0; - str2[0] = 0; - hres = pUrlMkGetSessionOption(URLMON_OPTION_USERAGENT, str2, saved, &size, 0); - ok(hres == E_OUTOFMEMORY, "UrlMkGetSessionOption failed: %08x\n", hres); - ok(size == sizeof(test_str) && !memcmp(str2, test_str, sizeof(test_str)), "wrong user agent\n"); - - hres = UrlMkSetSessionOption(URLMON_OPTION_USERAGENT, test_str, 2, 0); - ok(hres == S_OK, "UrlMkSetSessionOption failed: %08x\n", hres); - - size = 0; - str2[0] = 0; - hres = pUrlMkGetSessionOption(URLMON_OPTION_USERAGENT, str2, saved, &size, 0); - ok(hres == E_OUTOFMEMORY, "UrlMkGetSessionOption failed: %08x\n", hres); - ok(size == 3 && !strcmp(str2, "te"), "wrong user agent\n"); - - hres = UrlMkSetSessionOption(URLMON_OPTION_USERAGENT, test_str, 0, 0); - ok(hres == E_INVALIDARG, "UrlMkSetSessionOption failed: %08x\n", hres); - - hres = UrlMkSetSessionOption(URLMON_OPTION_USERAGENT, NULL, sizeof(test_str), 0); - ok(hres == E_INVALIDARG, "UrlMkSetSessionOption failed: %08x\n", hres); - - hres = UrlMkSetSessionOption(URLMON_OPTION_USERAGENT, NULL, 0, 0); - ok(hres == E_INVALIDARG, "UrlMkSetSessionOption failed: %08x\n", hres); - - HeapFree(GetProcessHeap(), 0, str2); -} - -static void test_MkParseDisplayNameEx(void) -{ - IMoniker *mon = NULL; - LPWSTR name; - DWORD issys; - ULONG eaten = 0; - IBindCtx *bctx; - HRESULT hres; - - static const WCHAR clsid_nameW[] = {'c','l','s','i','d',':', - '2','0','D','0','4','F','E','0','-','3','A','E','A','-','1','0','6','9','-','A','2','D','8', - '-','0','8','0','0','2','B','3','0','3','0','9','D',':',0}; - - const struct - { - LPBC *ppbc; - LPCWSTR szDisplayName; - ULONG *pchEaten; - LPMONIKER *ppmk; - } invalid_parameters[] = - { - {NULL, NULL, NULL, NULL}, - {NULL, NULL, NULL, &mon}, - {NULL, NULL, &eaten, NULL}, - {NULL, NULL, &eaten, &mon}, - {NULL, wszEmpty, NULL, NULL}, - {NULL, wszEmpty, NULL, &mon}, - {NULL, wszEmpty, &eaten, NULL}, - {NULL, wszEmpty, &eaten, &mon}, - {&bctx, NULL, NULL, NULL}, - {&bctx, NULL, NULL, &mon}, - {&bctx, NULL, &eaten, NULL}, - {&bctx, NULL, &eaten, &mon}, - {&bctx, wszEmpty, NULL, NULL}, - {&bctx, wszEmpty, NULL, &mon}, - {&bctx, wszEmpty, &eaten, NULL}, - {&bctx, wszEmpty, &eaten, &mon}, - }; - - int i; - - CreateBindCtx(0, &bctx); - - for (i = 0; i < sizeof(invalid_parameters)/sizeof(invalid_parameters[0]); i++) - { - eaten = 0xdeadbeef; - mon = (IMoniker *)0xdeadbeef; - hres = MkParseDisplayNameEx(invalid_parameters[i].ppbc ? *invalid_parameters[i].ppbc : NULL, - invalid_parameters[i].szDisplayName, - invalid_parameters[i].pchEaten, - invalid_parameters[i].ppmk); - ok(hres == E_INVALIDARG, - "[%d] Expected MkParseDisplayNameEx to return E_INVALIDARG, got %08x\n", i, hres); - ok(eaten == 0xdeadbeef, "[%d] Expected eaten to be 0xdeadbeef, got %u\n", i, eaten); - ok(mon == (IMoniker *)0xdeadbeef, "[%d] Expected mon to be 0xdeadbeef, got %p\n", i, mon); - } - - hres = MkParseDisplayNameEx(bctx, url9, &eaten, &mon); - ok(hres == S_OK, "MkParseDisplayNameEx failed: %08x\n", hres); - ok(eaten == sizeof(url9)/sizeof(WCHAR)-1, "eaten=%d\n", eaten); - ok(mon != NULL, "mon == NULL\n"); - - hres = IMoniker_GetDisplayName(mon, NULL, 0, &name); - ok(hres == S_OK, "GetDiasplayName failed: %08x\n", hres); - ok(!lstrcmpW(name, url9), "wrong display name %s\n", wine_dbgstr_w(name)); - CoTaskMemFree(name); - - hres = IMoniker_IsSystemMoniker(mon, &issys); - ok(hres == S_OK, "IsSystemMoniker failed: %08x\n", hres); - ok(issys == MKSYS_URLMONIKER, "issys=%x\n", issys); - - IMoniker_Release(mon); - - hres = MkParseDisplayNameEx(bctx, clsid_nameW, &eaten, &mon); - ok(hres == S_OK, "MkParseDisplayNameEx failed: %08x\n", hres); - ok(eaten == sizeof(clsid_nameW)/sizeof(WCHAR)-1, "eaten=%d\n", eaten); - ok(mon != NULL, "mon == NULL\n"); - - hres = IMoniker_IsSystemMoniker(mon, &issys); - ok(hres == S_OK, "IsSystemMoniker failed: %08x\n", hres); - ok(issys == MKSYS_CLASSMONIKER, "issys=%x\n", issys); - - IMoniker_Release(mon); - - hres = MkParseDisplayNameEx(bctx, url8, &eaten, &mon); - ok(FAILED(hres), "MkParseDisplayNameEx succeeded: %08x\n", hres); - - IBindCtx_Release(bctx); -} - -static void test_IsValidURL(void) -{ - HRESULT hr; - IBindCtx *bctx = NULL; - - hr = IsValidURL(NULL, 0, 0); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - - hr = IsValidURL(NULL, wszHttpWineHQ, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - CreateBindCtx(0, &bctx); - - hr = IsValidURL(bctx, wszHttpWineHQ, 0); - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - - IBindCtx_Release(bctx); -} - -static const struct { - INTERNETFEATURELIST feature; - DWORD get_flags; - HRESULT expected; - BOOL todo; -} default_feature_tests[] = { - {FEATURE_OBJECT_CACHING,GET_FEATURE_FROM_PROCESS,S_OK}, - {FEATURE_ZONE_ELEVATION,GET_FEATURE_FROM_PROCESS,S_FALSE}, - {FEATURE_MIME_HANDLING,GET_FEATURE_FROM_PROCESS,S_FALSE}, - {FEATURE_MIME_SNIFFING,GET_FEATURE_FROM_PROCESS,S_FALSE}, - {FEATURE_WINDOW_RESTRICTIONS,GET_FEATURE_FROM_PROCESS,S_FALSE}, - {FEATURE_WEBOC_POPUPMANAGEMENT,GET_FEATURE_FROM_PROCESS,S_FALSE}, - {FEATURE_BEHAVIORS,GET_FEATURE_FROM_PROCESS,S_OK}, - {FEATURE_DISABLE_MK_PROTOCOL,GET_FEATURE_FROM_PROCESS,S_OK}, - {FEATURE_LOCALMACHINE_LOCKDOWN,GET_FEATURE_FROM_PROCESS,S_FALSE}, - {FEATURE_SECURITYBAND,GET_FEATURE_FROM_PROCESS,S_FALSE}, - {FEATURE_RESTRICT_ACTIVEXINSTALL,GET_FEATURE_FROM_PROCESS,S_FALSE}, - {FEATURE_VALIDATE_NAVIGATE_URL,GET_FEATURE_FROM_PROCESS,S_FALSE}, - {FEATURE_RESTRICT_FILEDOWNLOAD,GET_FEATURE_FROM_PROCESS,S_FALSE}, - {FEATURE_ADDON_MANAGEMENT,GET_FEATURE_FROM_PROCESS,S_FALSE}, - {FEATURE_PROTOCOL_LOCKDOWN,GET_FEATURE_FROM_PROCESS,S_FALSE}, - {FEATURE_HTTP_USERNAME_PASSWORD_DISABLE,GET_FEATURE_FROM_PROCESS,S_FALSE}, - {FEATURE_SAFE_BINDTOOBJECT,GET_FEATURE_FROM_PROCESS,S_FALSE}, - {FEATURE_UNC_SAVEDFILECHECK,GET_FEATURE_FROM_PROCESS,S_FALSE}, - {FEATURE_GET_URL_DOM_FILEPATH_UNENCODED,GET_FEATURE_FROM_PROCESS,S_OK}, - {FEATURE_TABBED_BROWSING,GET_FEATURE_FROM_PROCESS,S_FALSE}, - {FEATURE_SSLUX,GET_FEATURE_FROM_PROCESS,S_FALSE}, - {FEATURE_DISABLE_NAVIGATION_SOUNDS,GET_FEATURE_FROM_PROCESS,S_FALSE}, - {FEATURE_DISABLE_LEGACY_COMPRESSION,GET_FEATURE_FROM_PROCESS,S_OK}, - {FEATURE_FORCE_ADDR_AND_STATUS,GET_FEATURE_FROM_PROCESS,S_FALSE}, - {FEATURE_XMLHTTP,GET_FEATURE_FROM_PROCESS,S_OK}, - {FEATURE_DISABLE_TELNET_PROTOCOL,GET_FEATURE_FROM_PROCESS,S_FALSE}, - {FEATURE_FEEDS,GET_FEATURE_FROM_PROCESS,S_FALSE}, - {FEATURE_BLOCK_INPUT_PROMPTS,GET_FEATURE_FROM_PROCESS,S_FALSE} -}; - -static void test_internet_feature_defaults(void) { - HRESULT hres; - DWORD i; - - for(i = 0; i < sizeof(default_feature_tests)/sizeof(default_feature_tests[0]); ++i) { - hres = pCoInternetIsFeatureEnabled(default_feature_tests[i].feature, default_feature_tests[i].get_flags); - if(default_feature_tests[i].todo) { - todo_wine - ok(hres == default_feature_tests[i].expected, "CoInternetIsFeatureEnabled returned %08x, expected %08x on test %d\n", - hres, default_feature_tests[i].expected, i); - } else { - ok(hres == default_feature_tests[i].expected, "CoInternetIsFeatureEnabled returned %08x, expected %08x on test %d\n", - hres, default_feature_tests[i].expected, i); - } - } -} - -/* With older versions of IE (IE 7 and earlier), urlmon caches - * the FeatureControl values from the registry when it's loaded - * into memory. Newer versions of IE conditionally cache the - * the FeatureControl registry values (i.e. When a call to - * CoInternetIsFeatureEnabled and a corresponding CoInternetSetFeatureEnabled - * call hasn't already been made for the specified Feature). Because of - * this we skip these tests on IE 7 and earlier. - */ -static void test_internet_features_registry(void) { - HRESULT hres; - DWORD res; - char module[MAX_PATH]; - char *name; - HKEY feature_control; - HKEY feature; - DWORD value; - BOOL delete_feature_key = TRUE; - BOOL delete_feature_control_key = FALSE; - - static const char* szFeatureControlKey = "Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl"; - static const char* szFeatureBehaviorsKey = "FEATURE_BEHAVIORS"; - static const char* szFeatureZoneElevationKey = "FEATURE_ZONE_ELEVATION"; - - if(!pIEInstallScope) { - win_skip("Skipping internet feature registry tests, IE is too old...\n"); - return; - } - - res = GetModuleFileNameA(NULL, module, sizeof(module)); - ok(res, "GetModuleFileName failed: %d\n", GetLastError()); - - name = strrchr(module, '\\')+1; - - /* Some Windows machines don't have a FeatureControl key in HKCU. */ - res = RegOpenKeyA(HKEY_CURRENT_USER, szFeatureControlKey, &feature_control); - if(res != ERROR_SUCCESS) { - res = RegCreateKeyA(HKEY_CURRENT_USER, szFeatureControlKey, &feature_control); - ok(res == ERROR_SUCCESS, "RegCreateKey failed: %d\n", res); - delete_feature_control_key = TRUE; - } - - res = RegOpenKeyA(feature_control, szFeatureBehaviorsKey, &feature); - if(res == ERROR_SUCCESS) - /* FEATURE_BEHAVIORS already existed, so don't delete it when we're done. */ - delete_feature_key = FALSE; - else { - res = RegCreateKeyA(feature_control, szFeatureBehaviorsKey, &feature); - ok(res == ERROR_SUCCESS, "RegCreateKey failed: %d\n", res); - } - - value = 0; - res = RegSetValueExA(feature, name, 0, REG_DWORD, (BYTE*)&value, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "RegSetValueEx failed: %d\n", res); - - hres = pCoInternetIsFeatureEnabled(FEATURE_BEHAVIORS, GET_FEATURE_FROM_PROCESS); - ok(hres == S_FALSE, "CoInternetIsFeatureEnabled returned %08x, expected S_FALSE\n", hres); - - if(delete_feature_key) { - RegCloseKey(feature); - RegDeleteKeyA(feature_control, szFeatureBehaviorsKey); - } else { - RegDeleteValue(feature, name); - RegCloseKey(feature); - } - - /* IE's feature control cached the value it got from the registry earlier. */ - hres = pCoInternetIsFeatureEnabled(FEATURE_BEHAVIORS, GET_FEATURE_FROM_PROCESS); - ok(hres == S_FALSE, "CoInternetIsFeatureEnabled returned %08x, expected S_FALSE\n", hres); - - /* Restore this feature back to its default value. */ - hres = pCoInternetSetFeatureEnabled(FEATURE_BEHAVIORS, SET_FEATURE_ON_PROCESS, TRUE); - ok(hres == S_OK, "CoInternetSetFeatureEnabled failed: %08x\n", hres); - - RegCloseKey(feature_control); - if(delete_feature_control_key) - RegDeleteKeyA(HKEY_CURRENT_USER, szFeatureControlKey); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, szFeatureControlKey, &feature_control); - ok(res == ERROR_SUCCESS, "RegOpenKey failed: %d\n", res); - - res = RegOpenKeyA(feature_control, szFeatureZoneElevationKey, &feature); - ok(res == ERROR_SUCCESS, "RegOpenKey failed: %d\n", res); - - value = 1; - res = RegSetValueExA(feature, "*", 0, REG_DWORD, (BYTE*)&value, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "RegSetValueEx failed: %d\n", res); - - hres = pCoInternetIsFeatureEnabled(FEATURE_ZONE_ELEVATION, GET_FEATURE_FROM_PROCESS); - ok(hres == S_OK, "CoInternetIsFeatureEnabled returned %08x, expected S_OK\n", hres); - - RegDeleteValueA(feature, "*"); - RegCloseKey(feature); - RegCloseKey(feature_control); - - /* Value is still cached from last time. */ - hres = pCoInternetIsFeatureEnabled(FEATURE_ZONE_ELEVATION, GET_FEATURE_FROM_PROCESS); - ok(hres == S_OK, "CoInternetIsFeatureEnabled returned %08x, expected S_OK\n", hres); - - hres = pCoInternetSetFeatureEnabled(FEATURE_ZONE_ELEVATION, SET_FEATURE_ON_PROCESS, FALSE); - ok(hres == S_OK, "CoInternetSetFeatureEnabled failed: %08x\n", hres); - - test_internet_feature_defaults(); -} - -static void test_CoInternetIsFeatureEnabled(void) { - HRESULT hres; - - hres = pCoInternetIsFeatureEnabled(FEATURE_ENTRY_COUNT, GET_FEATURE_FROM_PROCESS); - ok(hres == E_FAIL, "CoInternetIsFeatureEnabled returned %08x, expected E_FAIL\n", hres); -} - -static const struct { - INTERNETFEATURELIST feature; - DWORD set_flags; - BOOL enable; - HRESULT set_expected; - BOOL set_todo; - DWORD get_flags; - HRESULT get_expected; - BOOL get_todo; -} internet_feature_tests[] = { - {FEATURE_OBJECT_CACHING,SET_FEATURE_ON_PROCESS,FALSE,S_OK,FALSE,GET_FEATURE_FROM_PROCESS,S_FALSE}, - {FEATURE_WEBOC_POPUPMANAGEMENT,SET_FEATURE_ON_PROCESS,TRUE,S_OK,FALSE,GET_FEATURE_FROM_PROCESS,S_OK}, - {FEATURE_LOCALMACHINE_LOCKDOWN,SET_FEATURE_ON_PROCESS,TRUE,S_OK,FALSE,GET_FEATURE_FROM_PROCESS,S_OK} -}; - -static void test_CoInternetSetFeatureEnabled(void) { - HRESULT hres; - DWORD i; - - hres = pCoInternetSetFeatureEnabled(FEATURE_ENTRY_COUNT,SET_FEATURE_ON_PROCESS,TRUE); - ok(hres == E_FAIL, "CoInternetSetFeatureEnabled returned %08x, expected E_FAIL\n", hres); - - for(i = 0; i < sizeof(internet_feature_tests)/sizeof(internet_feature_tests[0]); ++i) { - hres = pCoInternetSetFeatureEnabled(internet_feature_tests[i].feature, internet_feature_tests[i].set_flags, - internet_feature_tests[i].enable); - if(internet_feature_tests[i].set_todo) { - todo_wine - ok(hres == internet_feature_tests[i].set_expected, "CoInternetSetFeatureEnabled returned %08x, expected %08x on test %d\n", - hres, internet_feature_tests[i].set_expected, i); - } else { - ok(hres == internet_feature_tests[i].set_expected, "CoInternetSetFeatureEnabled returned %08x, expected %08x on test %d\n", - hres, internet_feature_tests[i].set_expected, i); - } - - hres = pCoInternetIsFeatureEnabled(internet_feature_tests[i].feature, internet_feature_tests[i].set_flags); - if(internet_feature_tests[i].get_todo) { - todo_wine - ok(hres == internet_feature_tests[i].get_expected, "CoInternetIsFeatureEnabled returned %08x, expected %08x on test %d\n", - hres, internet_feature_tests[i].get_expected, i); - } else { - ok(hres == internet_feature_tests[i].get_expected, "CoInternetIsFeatureEnabled returned %08x, expected %08x on test %d\n", - hres, internet_feature_tests[i].get_expected, i); - } - } -} - -static void test_internet_features(void) { - if(!pCoInternetIsFeatureEnabled || !pCoInternetSetFeatureEnabled) { - win_skip("Skipping internet feature tests, IE is too old\n"); - return; - } - - test_internet_features_registry(); - test_CoInternetIsFeatureEnabled(); - test_CoInternetSetFeatureEnabled(); -} - -START_TEST(misc) -{ - HMODULE hurlmon; - - hurlmon = GetModuleHandle("urlmon.dll"); - pCoInternetCompareUrl = (void *) GetProcAddress(hurlmon, "CoInternetCompareUrl"); - pCoInternetGetSecurityUrl = (void*) GetProcAddress(hurlmon, "CoInternetGetSecurityUrl"); - pCoInternetGetSession = (void*) GetProcAddress(hurlmon, "CoInternetGetSession"); - pCoInternetParseUrl = (void*) GetProcAddress(hurlmon, "CoInternetParseUrl"); - pCoInternetQueryInfo = (void*) GetProcAddress(hurlmon, "CoInternetQueryInfo"); - pCopyStgMedium = (void*) GetProcAddress(hurlmon, "CopyStgMedium"); - pFindMimeFromData = (void*) GetProcAddress(hurlmon, "FindMimeFromData"); - pObtainUserAgentString = (void*) GetProcAddress(hurlmon, "ObtainUserAgentString"); - pReleaseBindInfo = (void*) GetProcAddress(hurlmon, "ReleaseBindInfo"); - pUrlMkGetSessionOption = (void*) GetProcAddress(hurlmon, "UrlMkGetSessionOption"); - pCompareSecurityIds = (void*) GetProcAddress(hurlmon, "CompareSecurityIds"); - pCoInternetIsFeatureEnabled = (void*) GetProcAddress(hurlmon, "CoInternetIsFeatureEnabled"); - pCoInternetSetFeatureEnabled = (void*) GetProcAddress(hurlmon, "CoInternetSetFeatureEnabled"); - pIEInstallScope = (void*) GetProcAddress(hurlmon, "IEInstallScope"); - - if (!pCoInternetCompareUrl || !pCoInternetGetSecurityUrl || - !pCoInternetGetSession || !pCoInternetParseUrl || !pCompareSecurityIds) { - win_skip("Various needed functions not present, too old IE\n"); - return; - } - - OleInitialize(NULL); - - register_protocols(); - - test_CreateFormatEnum(); - test_RegisterFormatEnumerator(); - test_CoInternetParseUrl(); - test_CoInternetCompareUrl(); - test_CoInternetQueryInfo(); - test_FindMimeFromData(); - test_NameSpace(); - test_MimeFilter(); - test_ReleaseBindInfo(); - test_CopyStgMedium(); - test_UrlMkGetSessionOption(); - test_user_agent(); - test_MkParseDisplayNameEx(); - test_IsValidURL(); - test_internet_features(); - - OleUninitialize(); -} diff --git a/rostests/winetests/urlmon/protocol.c b/rostests/winetests/urlmon/protocol.c deleted file mode 100644 index d5a0357a2fd..00000000000 --- a/rostests/winetests/urlmon/protocol.c +++ /dev/null @@ -1,3512 +0,0 @@ -/* - * Copyright 2005-2011 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 - */ - -#define COBJMACROS -#define CONST_VTABLE - -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "ole2.h" -#include "urlmon.h" -#include "wininet.h" - -static HRESULT (WINAPI *pCoInternetGetSession)(DWORD, IInternetSession **, DWORD); -static HRESULT (WINAPI *pReleaseBindInfo)(BINDINFO*); -static HRESULT (WINAPI *pCreateUri)(LPCWSTR, DWORD, DWORD_PTR, IUri**); - -#define DEFINE_EXPECT(func) \ - static BOOL expect_ ## func = FALSE, called_ ## func = FALSE - -#define SET_EXPECT(func) \ - expect_ ## func = TRUE - -#define CHECK_EXPECT2(func) \ - do { \ - ok(expect_ ##func, "unexpected call " #func "\n"); \ - called_ ## func = TRUE; \ - }while(0) - -#define CHECK_EXPECT(func) \ - do { \ - CHECK_EXPECT2(func); \ - expect_ ## func = FALSE; \ - }while(0) - -#define CHECK_CALLED(func) \ - do { \ - ok(called_ ## func, "expected " #func "\n"); \ - expect_ ## func = called_ ## func = FALSE; \ - }while(0) - -#define CHECK_NOT_CALLED(func) \ - do { \ - ok(!called_ ## func, "unexpected " #func "\n"); \ - expect_ ## func = called_ ## func = FALSE; \ - }while(0) - -#define CLEAR_CALLED(func) \ - expect_ ## func = called_ ## func = FALSE - -DEFINE_EXPECT(GetBindInfo); -DEFINE_EXPECT(ReportProgress_MIMETYPEAVAILABLE); -DEFINE_EXPECT(ReportProgress_DIRECTBIND); -DEFINE_EXPECT(ReportProgress_RAWMIMETYPE); -DEFINE_EXPECT(ReportProgress_FINDINGRESOURCE); -DEFINE_EXPECT(ReportProgress_CONNECTING); -DEFINE_EXPECT(ReportProgress_SENDINGREQUEST); -DEFINE_EXPECT(ReportProgress_CACHEFILENAMEAVAILABLE); -DEFINE_EXPECT(ReportProgress_VERIFIEDMIMETYPEAVAILABLE); -DEFINE_EXPECT(ReportProgress_PROTOCOLCLASSID); -DEFINE_EXPECT(ReportProgress_COOKIE_SENT); -DEFINE_EXPECT(ReportProgress_REDIRECTING); -DEFINE_EXPECT(ReportProgress_ENCODING); -DEFINE_EXPECT(ReportProgress_ACCEPTRANGES); -DEFINE_EXPECT(ReportProgress_PROXYDETECTING); -DEFINE_EXPECT(ReportProgress_LOADINGMIMEHANDLER); -DEFINE_EXPECT(ReportProgress_DECODING); -DEFINE_EXPECT(ReportData); -DEFINE_EXPECT(ReportData2); -DEFINE_EXPECT(ReportResult); -DEFINE_EXPECT(GetBindString_ACCEPT_MIMES); -DEFINE_EXPECT(GetBindString_USER_AGENT); -DEFINE_EXPECT(GetBindString_POST_COOKIE); -DEFINE_EXPECT(GetBindString_URL); -DEFINE_EXPECT(QueryService_HttpNegotiate); -DEFINE_EXPECT(QueryService_InternetProtocol); -DEFINE_EXPECT(QueryService_HttpSecurity); -DEFINE_EXPECT(QueryInterface_IWinInetInfo); -DEFINE_EXPECT(QueryInterface_IWinInetHttpInfo); -DEFINE_EXPECT(BeginningTransaction); -DEFINE_EXPECT(GetRootSecurityId); -DEFINE_EXPECT(OnResponse); -DEFINE_EXPECT(Switch); -DEFINE_EXPECT(Continue); -DEFINE_EXPECT(CreateInstance); -DEFINE_EXPECT(Start); -DEFINE_EXPECT(StartEx); -DEFINE_EXPECT(Terminate); -DEFINE_EXPECT(Read); -DEFINE_EXPECT(Read2); -DEFINE_EXPECT(SetPriority); -DEFINE_EXPECT(LockRequest); -DEFINE_EXPECT(UnlockRequest); -DEFINE_EXPECT(Abort); -DEFINE_EXPECT(MimeFilter_CreateInstance); -DEFINE_EXPECT(MimeFilter_Start); -DEFINE_EXPECT(MimeFilter_ReportProgress); -DEFINE_EXPECT(MimeFilter_ReportData); -DEFINE_EXPECT(MimeFilter_ReportResult); -DEFINE_EXPECT(MimeFilter_Terminate); -DEFINE_EXPECT(MimeFilter_LockRequest); -DEFINE_EXPECT(MimeFilter_UnlockRequest); -DEFINE_EXPECT(MimeFilter_Read); -DEFINE_EXPECT(MimeFilter_Switch); -DEFINE_EXPECT(MimeFilter_Continue); -DEFINE_EXPECT(Stream_Seek); -DEFINE_EXPECT(Stream_Read); - -static const WCHAR wszIndexHtml[] = {'i','n','d','e','x','.','h','t','m','l',0}; -static const WCHAR index_url[] = - {'f','i','l','e',':','i','n','d','e','x','.','h','t','m','l',0}; - -static const WCHAR acc_mimeW[] = {'*','/','*',0}; -static const WCHAR user_agentW[] = {'W','i','n','e',0}; -static const WCHAR text_htmlW[] = {'t','e','x','t','/','h','t','m','l',0}; -static const WCHAR hostW[] = {'w','w','w','.','w','i','n','e','h','q','.','o','r','g',0}; -static const WCHAR winehq_ipW[] = {'2','0','9','.','4','6','.','2','5','.','1','3','4',0}; -static const WCHAR emptyW[] = {0}; -static const WCHAR gzipW[] = {'g','z','i','p',0}; - -static HRESULT expect_hrResult; -static LPCWSTR file_name, http_url, expect_wsz; -static IInternetProtocol *async_protocol = NULL; -static BOOL first_data_notif, http_is_first, test_redirect; -static int prot_state, read_report_data, post_stream_read; -static DWORD bindf, ex_priority , pi; -static IInternetProtocol *binding_protocol, *filtered_protocol; -static IInternetBindInfo *prot_bind_info; -static IInternetProtocolSink *binding_sink, *filtered_sink; -static void *expect_pv; -static HANDLE event_complete, event_complete2, event_continue, event_continue_done; -static BOOL binding_test; -static PROTOCOLDATA protocoldata, *pdata, continue_protdata; -static DWORD prot_read, pi, filter_state, http_post_test, thread_id; -static BOOL security_problem, test_async_req, impl_protex; -static BOOL async_read_pending, mimefilter_test, direct_read, wait_for_switch, emulate_prot, short_read, test_abort; - -enum { - STATE_CONNECTING, - STATE_SENDINGREQUEST, - STATE_STARTDOWNLOADING, - STATE_DOWNLOADING -} state; - -static enum { - FILE_TEST, - HTTP_TEST, - HTTPS_TEST, - FTP_TEST, - MK_TEST, - ITS_TEST, - BIND_TEST -} tested_protocol; - -static const WCHAR protocol_names[][10] = { - {'f','i','l','e',0}, - {'h','t','t','p',0}, - {'h','t','t','p','s',0}, - {'f','t','p',0}, - {'m','k',0}, - {'i','t','s',0}, - {'t','e','s','t',0} -}; - -static const WCHAR binding_urls[][130] = { - {'f','i','l','e',':','t','e','s','t','.','h','t','m','l',0}, - {'h','t','t','p',':','/','/','w','w','w','.','w','i','n','e','h','q','.', - 'o','r','g','/','s','i','t','e','/','a','b','o','u','t',0}, - {'h','t','t','p','s',':','/','/','w','w','w','.','c','o','d','e','w','e','a','v','e','r','s', - '.','c','o','m','/','t','e','s','t','.','h','t','m','l',0}, - {'f','t','p',':','/','/','f','t','p','.','w','i','n','e','h','q','.','o','r','g', - '/','p','u','b','/','o','t','h','e','r', - '/','w','i','n','e','l','o','g','o','.','x','c','f','.','t','a','r','.','b','z','2',0}, - {'m','k',':','t','e','s','t',0}, - {'i','t','s',':','t','e','s','t','.','c','h','m',':',':','/','b','l','a','n','k','.','h','t','m','l',0}, - {'t','e','s','t',':','/','/','f','i','l','e','.','h','t','m','l',0} -}; - -static const CHAR post_data[] = "mode=Test"; - -static const char *debugstr_guid(REFIID riid) -{ - static char buf[50]; - - sprintf(buf, "{%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]); - - return buf; -} - -static int strcmp_wa(LPCWSTR strw, const char *stra) -{ - CHAR buf[512]; - WideCharToMultiByte(CP_ACP, 0, strw, -1, buf, sizeof(buf), NULL, NULL); - return lstrcmpA(stra, buf); -} - -static HRESULT WINAPI HttpSecurity_QueryInterface(IHttpSecurity *iface, REFIID riid, void **ppv) -{ - if(IsEqualGUID(&IID_IUnknown, riid) - || IsEqualGUID(&IID_IHttpSecurity, riid)) { - *ppv = iface; - return S_OK; - } - - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI HttpSecurity_AddRef(IHttpSecurity *iface) -{ - return 2; -} - -static ULONG WINAPI HttpSecurity_Release(IHttpSecurity *iface) -{ - return 1; -} - -static HRESULT WINAPI HttpSecurity_GetWindow(IHttpSecurity* iface, REFGUID rguidReason, HWND *phwnd) -{ - trace("HttpSecurity_GetWindow\n"); - - return S_FALSE; -} - -static HRESULT WINAPI HttpSecurity_OnSecurityProblem(IHttpSecurity *iface, DWORD dwProblem) -{ - trace("Security problem: %u\n", dwProblem); - ok(dwProblem == ERROR_INTERNET_SEC_CERT_REV_FAILED, "Expected ERROR_INTERNET_SEC_CERT_REV_FAILED got %u\n", dwProblem); - - /* Only retry once */ - if (security_problem) - return E_ABORT; - - security_problem = TRUE; - SET_EXPECT(BeginningTransaction); - - return RPC_E_RETRY; -} - -static IHttpSecurityVtbl HttpSecurityVtbl = { - HttpSecurity_QueryInterface, - HttpSecurity_AddRef, - HttpSecurity_Release, - HttpSecurity_GetWindow, - HttpSecurity_OnSecurityProblem -}; - -static IHttpSecurity http_security = { &HttpSecurityVtbl }; - -static HRESULT WINAPI HttpNegotiate_QueryInterface(IHttpNegotiate2 *iface, REFIID riid, void **ppv) -{ - if(IsEqualGUID(&IID_IUnknown, riid) - || IsEqualGUID(&IID_IHttpNegotiate, riid) - || IsEqualGUID(&IID_IHttpNegotiate2, riid)) { - *ppv = iface; - return S_OK; - } - - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI HttpNegotiate_AddRef(IHttpNegotiate2 *iface) -{ - return 2; -} - -static ULONG WINAPI HttpNegotiate_Release(IHttpNegotiate2 *iface) -{ - return 1; -} - -static HRESULT WINAPI HttpNegotiate_BeginningTransaction(IHttpNegotiate2 *iface, LPCWSTR szURL, - LPCWSTR szHeaders, DWORD dwReserved, LPWSTR *pszAdditionalHeaders) -{ - LPWSTR addl_headers; - - static const WCHAR wszHeaders[] = - {'C','o','n','t','e','n','t','-','T','y','p','e',':',' ','a','p','p','l','i','c','a','t', - 'i','o','n','/','x','-','w','w','w','-','f','o','r','m','-','u','r','l','e','n','c','o', - 'd','e','d','\r','\n',0}; - - CHECK_EXPECT(BeginningTransaction); - - if(binding_test) - ok(!lstrcmpW(szURL, binding_urls[tested_protocol]), "szURL != http_url\n"); - else - ok(!lstrcmpW(szURL, http_url), "szURL != http_url\n"); - ok(!dwReserved, "dwReserved=%d, expected 0\n", dwReserved); - ok(pszAdditionalHeaders != NULL, "pszAdditionalHeaders == NULL\n"); - if(pszAdditionalHeaders) - { - ok(*pszAdditionalHeaders == NULL, "*pszAdditionalHeaders != NULL\n"); - if (http_post_test) - { - addl_headers = CoTaskMemAlloc(sizeof(wszHeaders)); - memcpy(addl_headers, wszHeaders, sizeof(wszHeaders)); - *pszAdditionalHeaders = addl_headers; - } - } - - return S_OK; -} - -static HRESULT WINAPI HttpNegotiate_OnResponse(IHttpNegotiate2 *iface, DWORD dwResponseCode, - LPCWSTR szResponseHeaders, LPCWSTR szRequestHeaders, LPWSTR *pszAdditionalRequestHeaders) -{ - CHECK_EXPECT(OnResponse); - - ok(dwResponseCode == 200, "dwResponseCode=%d, expected 200\n", dwResponseCode); - ok(szResponseHeaders != NULL, "szResponseHeaders == NULL\n"); - ok(szRequestHeaders == NULL, "szRequestHeaders != NULL\n"); - ok(pszAdditionalRequestHeaders == NULL, "pszAdditionalHeaders != NULL\n"); - - return S_OK; -} - -static HRESULT WINAPI HttpNegotiate_GetRootSecurityId(IHttpNegotiate2 *iface, - BYTE *pbSecurityId, DWORD *pcbSecurityId, DWORD_PTR dwReserved) -{ - static const BYTE sec_id[] = {'h','t','t','p',':','t','e','s','t',1,0,0,0}; - - CHECK_EXPECT(GetRootSecurityId); - - ok(!dwReserved, "dwReserved=%ld, expected 0\n", dwReserved); - ok(pbSecurityId != NULL, "pbSecurityId == NULL\n"); - ok(pcbSecurityId != NULL, "pcbSecurityId == NULL\n"); - - if(pcbSecurityId) { - ok(*pcbSecurityId == 512, "*pcbSecurityId=%d, expected 512\n", *pcbSecurityId); - *pcbSecurityId = sizeof(sec_id); - } - - if(pbSecurityId) - memcpy(pbSecurityId, sec_id, sizeof(sec_id)); - - return E_FAIL; -} - -static IHttpNegotiate2Vtbl HttpNegotiateVtbl = { - HttpNegotiate_QueryInterface, - HttpNegotiate_AddRef, - HttpNegotiate_Release, - HttpNegotiate_BeginningTransaction, - HttpNegotiate_OnResponse, - HttpNegotiate_GetRootSecurityId -}; - -static IHttpNegotiate2 http_negotiate = { &HttpNegotiateVtbl }; - -static HRESULT QueryInterface(REFIID,void**); - -static HRESULT WINAPI ServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv) -{ - return QueryInterface(riid, ppv); -} - -static ULONG WINAPI ServiceProvider_AddRef(IServiceProvider *iface) -{ - return 2; -} - -static ULONG WINAPI ServiceProvider_Release(IServiceProvider *iface) -{ - return 1; -} - -static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, - REFIID riid, void **ppv) -{ - if(IsEqualGUID(&IID_IHttpNegotiate, guidService) || IsEqualGUID(&IID_IHttpNegotiate2, riid)) { - CHECK_EXPECT2(QueryService_HttpNegotiate); - return IHttpNegotiate2_QueryInterface(&http_negotiate, riid, ppv); - } - - if(IsEqualGUID(&IID_IInternetProtocol, guidService)) { - ok(IsEqualGUID(&IID_IInternetProtocol, riid), "unexpected riid\n"); - CHECK_EXPECT(QueryService_InternetProtocol); - return E_NOINTERFACE; - } - - if(IsEqualGUID(&IID_IHttpSecurity, guidService)) { - ok(IsEqualGUID(&IID_IHttpSecurity, riid), "unexpected riid\n"); - CHECK_EXPECT(QueryService_HttpSecurity); - return IHttpSecurity_QueryInterface(&http_security, riid, ppv); - } - - ok(0, "unexpected service %s\n", debugstr_guid(guidService)); - return E_FAIL; -} - -static const IServiceProviderVtbl ServiceProviderVtbl = { - ServiceProvider_QueryInterface, - ServiceProvider_AddRef, - ServiceProvider_Release, - ServiceProvider_QueryService -}; - -static IServiceProvider service_provider = { &ServiceProviderVtbl }; - -static HRESULT WINAPI Stream_QueryInterface(IStream *iface, REFIID riid, void **ppv) -{ - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI Stream_AddRef(IStream *iface) -{ - return 2; -} - -static ULONG WINAPI Stream_Release(IStream *iface) -{ - return 1; -} - -static HRESULT WINAPI Stream_Read(IStream *iface, void *pv, - ULONG cb, ULONG *pcbRead) -{ - CHECK_EXPECT2(Stream_Read); - - ok(GetCurrentThreadId() != thread_id, "wrong thread %d\n", GetCurrentThreadId()); - - ok(pv != NULL, "pv == NULL\n"); - ok(cb == 0x20000 || broken(cb == 0x2000), "cb = %d\n", cb); - ok(pcbRead != NULL, "pcbRead == NULL\n"); - - if(post_stream_read) { - *pcbRead = 0; - return S_FALSE; - } - - memcpy(pv, post_data, sizeof(post_data)-1); - post_stream_read += *pcbRead = sizeof(post_data)-1; - return S_OK; -} - -static HRESULT WINAPI Stream_Write(IStream *iface, const void *pv, - ULONG cb, ULONG *pcbWritten) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Stream_Seek(IStream *iface, LARGE_INTEGER dlibMove, - DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition) -{ - CHECK_EXPECT(Stream_Seek); - - ok(!dlibMove.QuadPart, "dlibMove != 0\n"); - ok(dwOrigin == STREAM_SEEK_SET, "dwOrigin = %d\n", dwOrigin); - ok(!plibNewPosition, "plibNewPosition == NULL\n"); - - return S_OK; -} - -static HRESULT WINAPI Stream_SetSize(IStream *iface, ULARGE_INTEGER libNewSize) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Stream_CopyTo(IStream *iface, IStream *pstm, - ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Stream_Commit(IStream *iface, DWORD grfCommitFlags) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Stream_Revert(IStream *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Stream_LockRegion(IStream *iface, ULARGE_INTEGER libOffset, - ULARGE_INTEGER cb, DWORD dwLockType) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Stream_UnlockRegion(IStream *iface, - ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Stream_Stat(IStream *iface, STATSTG *pstatstg, - DWORD dwStatFlag) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Stream_Clone(IStream *iface, IStream **ppstm) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static const IStreamVtbl StreamVtbl = { - Stream_QueryInterface, - Stream_AddRef, - Stream_Release, - Stream_Read, - Stream_Write, - Stream_Seek, - Stream_SetSize, - Stream_CopyTo, - Stream_Commit, - Stream_Revert, - Stream_LockRegion, - Stream_UnlockRegion, - Stream_Stat, - Stream_Clone -}; - -static IStream Stream = { &StreamVtbl }; - -static HRESULT WINAPI ProtocolSink_QueryInterface(IInternetProtocolSink *iface, REFIID riid, void **ppv) -{ - return QueryInterface(riid, ppv); -} - -static ULONG WINAPI ProtocolSink_AddRef(IInternetProtocolSink *iface) -{ - return 2; -} - -static ULONG WINAPI ProtocolSink_Release(IInternetProtocolSink *iface) -{ - return 1; -} - -static void call_continue(PROTOCOLDATA *protocol_data) -{ - HRESULT hres; - - if(state == STATE_CONNECTING) { - if(tested_protocol == HTTP_TEST || tested_protocol == HTTPS_TEST) - CLEAR_CALLED(ReportProgress_COOKIE_SENT); - if(tested_protocol == HTTP_TEST || tested_protocol == HTTPS_TEST || tested_protocol == FTP_TEST) { - if (http_is_first){ - CLEAR_CALLED(ReportProgress_FINDINGRESOURCE); - CLEAR_CALLED(ReportProgress_PROXYDETECTING); - } - CLEAR_CALLED(ReportProgress_CONNECTING); - } - if(tested_protocol == FTP_TEST) - todo_wine CHECK_CALLED(ReportProgress_SENDINGREQUEST); - else if (tested_protocol != HTTPS_TEST) - CHECK_CALLED(ReportProgress_SENDINGREQUEST); - if(test_redirect) - CHECK_CALLED(ReportProgress_REDIRECTING); - state = test_async_req ? STATE_SENDINGREQUEST : STATE_STARTDOWNLOADING; - } - - switch(state) { - case STATE_SENDINGREQUEST: - SET_EXPECT(Stream_Read); - SET_EXPECT(ReportProgress_SENDINGREQUEST); - break; - case STATE_STARTDOWNLOADING: - if(tested_protocol == HTTP_TEST || tested_protocol == HTTPS_TEST) { - SET_EXPECT(OnResponse); - if(tested_protocol == HTTPS_TEST || test_redirect || test_abort) - SET_EXPECT(ReportProgress_ACCEPTRANGES); - SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE); - if(bindf & BINDF_NEEDFILE) - SET_EXPECT(ReportProgress_CACHEFILENAMEAVAILABLE); - } - default: - break; - } - - if(state != STATE_SENDINGREQUEST) - SET_EXPECT(ReportData); - hres = IInternetProtocol_Continue(async_protocol, protocol_data); - ok(hres == S_OK, "Continue failed: %08x\n", hres); - if(tested_protocol == FTP_TEST || security_problem) - CLEAR_CALLED(ReportData); - else if(state != STATE_SENDINGREQUEST) - CHECK_CALLED(ReportData); - - switch(state) { - case STATE_SENDINGREQUEST: - CHECK_CALLED(Stream_Read); - CHECK_CALLED(ReportProgress_SENDINGREQUEST); - state = STATE_STARTDOWNLOADING; - break; - case STATE_STARTDOWNLOADING: - if (! security_problem) - { - state = STATE_DOWNLOADING; - if(tested_protocol == HTTP_TEST || tested_protocol == HTTPS_TEST) { - CHECK_CALLED(OnResponse); - if(tested_protocol == HTTPS_TEST) - CHECK_CALLED(ReportProgress_ACCEPTRANGES); - else if(test_redirect) - CLEAR_CALLED(ReportProgress_ACCEPTRANGES); - CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE); - if(bindf & BINDF_NEEDFILE) - CHECK_CALLED(ReportProgress_CACHEFILENAMEAVAILABLE); - } - } - else - { - security_problem = FALSE; - SET_EXPECT(ReportProgress_CONNECTING); - } - default: - break; - } -} - -static HRESULT WINAPI ProtocolSink_Switch(IInternetProtocolSink *iface, PROTOCOLDATA *pProtocolData) -{ - if(tested_protocol == FTP_TEST) - CHECK_EXPECT2(Switch); - else - CHECK_EXPECT(Switch); - - ok(pProtocolData != NULL, "pProtocolData == NULL\n"); - if(binding_test) { - ok(pProtocolData != &protocoldata, "pProtocolData == &protocoldata\n"); - ok(pProtocolData->grfFlags == protocoldata.grfFlags, "grfFlags wrong %x/%x\n", - pProtocolData->grfFlags, protocoldata.grfFlags ); - ok(pProtocolData->dwState == protocoldata.dwState, "dwState wrong %x/%x\n", - pProtocolData->dwState, protocoldata.dwState ); - ok(pProtocolData->pData == protocoldata.pData, "pData wrong %p/%p\n", - pProtocolData->pData, protocoldata.pData ); - ok(pProtocolData->cbData == protocoldata.cbData, "cbData wrong %x/%x\n", - pProtocolData->cbData, protocoldata.cbData ); - } - - pdata = pProtocolData; - - if(binding_test) { - SetEvent(event_complete); - WaitForSingleObject(event_complete2, INFINITE); - return S_OK; - }if(direct_read) { - continue_protdata = *pProtocolData; - SetEvent(event_continue); - WaitForSingleObject(event_continue_done, INFINITE); - }else { - call_continue(pProtocolData); - SetEvent(event_complete); - } - - return S_OK; -} - -static HRESULT WINAPI ProtocolSink_ReportProgress(IInternetProtocolSink *iface, ULONG ulStatusCode, - LPCWSTR szStatusText) -{ - static const WCHAR null_guid[] = {'{','0','0','0','0','0','0','0','0','-','0','0','0','0','-', - '0','0','0','0','-','0','0','0','0','-','0','0','0','0','0','0','0','0','0','0','0','0','}',0}; - static const WCHAR text_plain[] = {'t','e','x','t','/','p','l','a','i','n',0}; - - switch(ulStatusCode) { - case BINDSTATUS_MIMETYPEAVAILABLE: - CHECK_EXPECT(ReportProgress_MIMETYPEAVAILABLE); - if(tested_protocol != FILE_TEST && tested_protocol != ITS_TEST && !mimefilter_test && (pi & PI_MIMEVERIFICATION)) { - if(!short_read || !direct_read) - CHECK_CALLED(Read); /* set in Continue */ - else if(short_read) - CHECK_CALLED(Read2); /* set in Read */ - } - ok(szStatusText != NULL, "szStatusText == NULL\n"); - if(szStatusText) { - if(tested_protocol == BIND_TEST) - ok(szStatusText == expect_wsz, "unexpected szStatusText\n"); - else if (http_post_test) - ok(lstrlenW(text_plain) <= lstrlenW(szStatusText) && - !memcmp(szStatusText, text_plain, lstrlenW(text_plain)*sizeof(WCHAR)), - "szStatusText != text/plain\n"); - else if(!mimefilter_test) - ok(lstrlenW(text_htmlW) <= lstrlenW(szStatusText) && - !memcmp(szStatusText, text_htmlW, lstrlenW(text_htmlW)*sizeof(WCHAR)), - "szStatusText != text/html\n"); - } - break; - case BINDSTATUS_DIRECTBIND: - CHECK_EXPECT2(ReportProgress_DIRECTBIND); - ok(szStatusText == NULL, "szStatusText != NULL\n"); - break; - case BINDSTATUS_RAWMIMETYPE: - CHECK_EXPECT2(ReportProgress_RAWMIMETYPE); - ok(szStatusText != NULL, "szStatusText == NULL\n"); - if(szStatusText) - ok(lstrlenW(szStatusText) < lstrlenW(text_htmlW) || - !memcmp(szStatusText, text_htmlW, lstrlenW(text_htmlW)*sizeof(WCHAR)), - "szStatusText != text/html\n"); - break; - case BINDSTATUS_CACHEFILENAMEAVAILABLE: - CHECK_EXPECT(ReportProgress_CACHEFILENAMEAVAILABLE); - ok(szStatusText != NULL, "szStatusText == NULL\n"); - if(szStatusText) { - if(binding_test) - ok(!lstrcmpW(szStatusText, expect_wsz), "unexpected szStatusText\n"); - else if(tested_protocol == FILE_TEST) - ok(!lstrcmpW(szStatusText, file_name), "szStatusText = %s\n", wine_dbgstr_w(szStatusText)); - else - ok(szStatusText != NULL, "szStatusText == NULL\n"); - } - break; - case BINDSTATUS_FINDINGRESOURCE: - CHECK_EXPECT2(ReportProgress_FINDINGRESOURCE); - ok(szStatusText != NULL, "szStatusText == NULL\n"); - break; - case BINDSTATUS_CONNECTING: - CHECK_EXPECT2(ReportProgress_CONNECTING); - ok(szStatusText != NULL, "szStatusText == NULL\n"); - break; - case BINDSTATUS_SENDINGREQUEST: - CHECK_EXPECT2(ReportProgress_SENDINGREQUEST); - if(tested_protocol == FILE_TEST || tested_protocol == ITS_TEST) { - ok(szStatusText != NULL, "szStatusText == NULL\n"); - if(szStatusText) - ok(!*szStatusText, "wrong szStatusText\n"); - } - break; - case BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE: - CHECK_EXPECT(ReportProgress_VERIFIEDMIMETYPEAVAILABLE); - ok(szStatusText != NULL, "szStatusText == NULL\n"); - if(szStatusText) - ok(!lstrcmpW(szStatusText, text_htmlW), "szStatusText != text/html\n"); - break; - case BINDSTATUS_PROTOCOLCLASSID: - CHECK_EXPECT(ReportProgress_PROTOCOLCLASSID); - ok(szStatusText != NULL, "szStatusText == NULL\n"); - ok(!lstrcmpW(szStatusText, null_guid), "unexpected classid %s\n", wine_dbgstr_w(szStatusText)); - break; - case BINDSTATUS_COOKIE_SENT: - CHECK_EXPECT(ReportProgress_COOKIE_SENT); - ok(szStatusText == NULL, "szStatusText != NULL\n"); - break; - case BINDSTATUS_REDIRECTING: - CHECK_EXPECT(ReportProgress_REDIRECTING); - if(test_redirect) - ok(!strcmp_wa(szStatusText, "http://test.winehq.org/tests/hello.html"), "szStatusText = %s\n", wine_dbgstr_w(szStatusText)); - else - ok(szStatusText == NULL, "szStatusText = %s\n", wine_dbgstr_w(szStatusText)); - break; - case BINDSTATUS_ENCODING: - CHECK_EXPECT(ReportProgress_ENCODING); - ok(!strcmp_wa(szStatusText, "gzip"), "szStatusText = %s\n", wine_dbgstr_w(szStatusText)); - break; - case BINDSTATUS_ACCEPTRANGES: - CHECK_EXPECT(ReportProgress_ACCEPTRANGES); - ok(!szStatusText, "szStatusText = %s\n", wine_dbgstr_w(szStatusText)); - break; - case BINDSTATUS_PROXYDETECTING: - CHECK_EXPECT(ReportProgress_PROXYDETECTING); - SET_EXPECT(ReportProgress_CONNECTING); - ok(!szStatusText, "szStatusText = %s\n", wine_dbgstr_w(szStatusText)); - break; - case BINDSTATUS_LOADINGMIMEHANDLER: - CHECK_EXPECT(ReportProgress_LOADINGMIMEHANDLER); - ok(!szStatusText, "szStatusText = %s\n", wine_dbgstr_w(szStatusText)); - break; - case BINDSTATUS_DECODING: - CHECK_EXPECT(ReportProgress_DECODING); - ok(!lstrcmpW(szStatusText, gzipW), "szStatusText = %s\n", wine_dbgstr_w(szStatusText)); - break; - default: - ok(0, "Unexpected status %d\n", ulStatusCode); - }; - - return S_OK; -} - -static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWORD grfBSCF, - ULONG ulProgress, ULONG ulProgressMax) -{ - HRESULT hres; - - static int rec_depth; - rec_depth++; - - if(!mimefilter_test && (tested_protocol == FILE_TEST || tested_protocol == ITS_TEST)) { - CHECK_EXPECT2(ReportData); - - ok(ulProgress == ulProgressMax, "ulProgress (%d) != ulProgressMax (%d)\n", - ulProgress, ulProgressMax); - ok(ulProgressMax == 13, "ulProgressMax=%d, expected 13\n", ulProgressMax); - /* BSCF_SKIPDRAINDATAFORFILEURLS added in IE8 */ - if(tested_protocol == FILE_TEST) - ok((grfBSCF == (BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION)) || - (grfBSCF == (BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION | BSCF_SKIPDRAINDATAFORFILEURLS)), - "grcfBSCF = %08x\n", grfBSCF); - else - ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION | BSCF_DATAFULLYAVAILABLE), "grcfBSCF = %08x\n", grfBSCF); - }else if(direct_read) { - BYTE buf[14096]; - ULONG read; - - if(!read_report_data && rec_depth == 1) { - BOOL reported_all_data = called_ReportData2; - - CHECK_EXPECT2(ReportData); - - if(short_read) { - ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION|BSCF_LASTDATANOTIFICATION|BSCF_DATAFULLYAVAILABLE) - || grfBSCF == BSCF_FIRSTDATANOTIFICATION, /* < IE8 */ - "grcfBSCF = %08x\n", grfBSCF); - CHECK_CALLED(Read); /* Set in Continue */ - first_data_notif = FALSE; - }else if(first_data_notif) { - ok(grfBSCF == BSCF_FIRSTDATANOTIFICATION, "grcfBSCF = %08x\n", grfBSCF); - first_data_notif = FALSE; - }else if(reported_all_data) { - ok(grfBSCF == (BSCF_LASTDATANOTIFICATION|BSCF_INTERMEDIATEDATANOTIFICATION), - "grcfBSCF = %08x\n", grfBSCF); - }else if(!direct_read) { - ok(grfBSCF == BSCF_INTERMEDIATEDATANOTIFICATION, "grcfBSCF = %08x\n", grfBSCF); - } - - do { - read = 0; - if(emulate_prot) - SET_EXPECT(Read); - else - SET_EXPECT(ReportData2); - SET_EXPECT(ReportResult); - if(!emulate_prot) - SET_EXPECT(Switch); - hres = IInternetProtocol_Read(binding_test ? binding_protocol : async_protocol, expect_pv = buf, sizeof(buf), &read); - ok(hres == E_PENDING || hres == S_FALSE || hres == S_OK, "Read failed: %08x\n", hres); - if(hres == S_OK) - ok(read, "read == 0\n"); - if(reported_all_data) - ok(hres == S_FALSE, "Read failed: %08x, expected S_FALSE\n", hres); - if(!emulate_prot && hres != E_PENDING) - CHECK_NOT_CALLED(Switch); /* otherwise checked in wait_for_switch loop */ - if(emulate_prot) - CHECK_CALLED(Read); - if(!reported_all_data && called_ReportData2) { - if(!emulate_prot) - CHECK_CALLED(ReportData2); - CHECK_CALLED(ReportResult); - ok(hres == S_OK, "Read failed: %08x\n", hres); - reported_all_data = TRUE; - }else { - if(!emulate_prot) - CHECK_NOT_CALLED(ReportData2); - CHECK_NOT_CALLED(ReportResult); - } - }while(hres == S_OK); - if(hres == S_FALSE) - wait_for_switch = FALSE; - }else { - CHECK_EXPECT(ReportData2); - - ok(grfBSCF & BSCF_LASTDATANOTIFICATION, "grfBSCF = %08x\n", grfBSCF); - - read = 0xdeadbeef; - if(emulate_prot) - SET_EXPECT(Read2); - hres = IInternetProtocol_Read(binding_test ? binding_protocol : async_protocol, expect_pv = buf, sizeof(buf), &read); - if(emulate_prot) - CHECK_CALLED(Read2); - ok(hres == S_FALSE, "Read returned: %08x, expected E_FALSE\n", hres); - ok(!read, "read = %d\n", read); - } - }else if(!binding_test && (tested_protocol == HTTP_TEST || tested_protocol == HTTPS_TEST - || tested_protocol == FTP_TEST)) { - if(!(grfBSCF & BSCF_LASTDATANOTIFICATION) || (grfBSCF & BSCF_DATAFULLYAVAILABLE)) - CHECK_EXPECT(ReportData); - else if (http_post_test) - ok(ulProgress == 13, "Read %u bytes instead of 13\n", ulProgress); - - ok(ulProgress, "ulProgress == 0\n"); - - if(first_data_notif) { - ok(grfBSCF == BSCF_FIRSTDATANOTIFICATION - || grfBSCF == (BSCF_LASTDATANOTIFICATION|BSCF_DATAFULLYAVAILABLE), - "grcfBSCF = %08x\n", grfBSCF); - first_data_notif = FALSE; - } else { - ok(grfBSCF == BSCF_INTERMEDIATEDATANOTIFICATION - || grfBSCF == (BSCF_LASTDATANOTIFICATION|BSCF_INTERMEDIATEDATANOTIFICATION) - || broken(grfBSCF == (BSCF_FIRSTDATANOTIFICATION|BSCF_LASTDATANOTIFICATION)), - "grcfBSCF = %08x\n", grfBSCF); - } - - if(!(bindf & BINDF_FROMURLMON) && - !(grfBSCF & BSCF_LASTDATANOTIFICATION)) { - if(state == STATE_CONNECTING) { - state = STATE_DOWNLOADING; - if(http_is_first) { - CHECK_CALLED(ReportProgress_FINDINGRESOURCE); - CHECK_CALLED(ReportProgress_CONNECTING); - } - CHECK_CALLED(ReportProgress_SENDINGREQUEST); - CHECK_CALLED(OnResponse); - CHECK_CALLED(ReportProgress_RAWMIMETYPE); - } - SetEvent(event_complete); - } - }else if(!read_report_data) { - BYTE buf[1000]; - ULONG read; - HRESULT hres; - - CHECK_EXPECT(ReportData); - - if(tested_protocol != BIND_TEST) { - do { - if(mimefilter_test) - SET_EXPECT(MimeFilter_Read); - else if(rec_depth > 1) - SET_EXPECT(Read2); - else - SET_EXPECT(Read); - hres = IInternetProtocol_Read(binding_protocol, expect_pv=buf, sizeof(buf), &read); - if(mimefilter_test) - CHECK_CALLED(MimeFilter_Read); - else if(rec_depth > 1) - CHECK_CALLED(Read2); - else - CHECK_CALLED(Read); - }while(hres == S_OK); - } - } - - rec_depth--; - return S_OK; -} - -static HRESULT WINAPI ProtocolSink_ReportResult(IInternetProtocolSink *iface, HRESULT hrResult, - DWORD dwError, LPCWSTR szResult) -{ - CHECK_EXPECT(ReportResult); - - if(tested_protocol == FTP_TEST) - ok(hrResult == E_PENDING || hrResult == S_OK, "hrResult = %08x, expected E_PENDING or S_OK\n", hrResult); - else - ok(hrResult == expect_hrResult, "hrResult = %08x, expected: %08x\n", - hrResult, expect_hrResult); - if(SUCCEEDED(hrResult) || tested_protocol == FTP_TEST || test_abort) - ok(dwError == ERROR_SUCCESS, "dwError = %d, expected ERROR_SUCCESS\n", dwError); - else - ok(dwError != ERROR_SUCCESS || - broken(tested_protocol == MK_TEST), /* WinME and NT4 */ - "dwError == ERROR_SUCCESS\n"); - ok(!szResult, "szResult != NULL\n"); - - if(direct_read) - SET_EXPECT(ReportData); /* checked after main loop */ - - return S_OK; -} - -static IInternetProtocolSinkVtbl protocol_sink_vtbl = { - ProtocolSink_QueryInterface, - ProtocolSink_AddRef, - ProtocolSink_Release, - ProtocolSink_Switch, - ProtocolSink_ReportProgress, - ProtocolSink_ReportData, - ProtocolSink_ReportResult -}; - -static IInternetProtocolSink protocol_sink = { &protocol_sink_vtbl }; - -static HRESULT WINAPI MimeProtocolSink_QueryInterface(IInternetProtocolSink *iface, REFIID riid, void **ppv) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static ULONG WINAPI MimeProtocolSink_AddRef(IInternetProtocolSink *iface) -{ - return 2; -} - -static ULONG WINAPI MimeProtocolSink_Release(IInternetProtocolSink *iface) -{ - return 1; -} - -static HRESULT WINAPI MimeProtocolSink_Switch(IInternetProtocolSink *iface, PROTOCOLDATA *pProtocolData) -{ - HRESULT hres; - - CHECK_EXPECT(MimeFilter_Switch); - - SET_EXPECT(Switch); - hres = IInternetProtocolSink_Switch(filtered_sink, pProtocolData); - ok(hres == S_OK, "Switch failed: %08x\n", hres); - CHECK_CALLED(Switch); - - return S_OK; -} - -static HRESULT WINAPI MimeProtocolSink_ReportProgress(IInternetProtocolSink *iface, ULONG ulStatusCode, - LPCWSTR szStatusText) -{ - CHECK_EXPECT(MimeFilter_ReportProgress); - return S_OK; -} - -static HRESULT WINAPI MimeProtocolSink_ReportData(IInternetProtocolSink *iface, DWORD grfBSCF, - ULONG ulProgress, ULONG ulProgressMax) -{ - DWORD read = 0; - BYTE buf[8192]; - HRESULT hres; - - CHECK_EXPECT(MimeFilter_ReportData); - - if(!filter_state) { - SET_EXPECT(Read); - hres = IInternetProtocol_Read(filtered_protocol, buf, sizeof(buf), &read); - if(tested_protocol == HTTP_TEST) - ok(hres == S_OK || hres == E_PENDING || hres == S_FALSE, "Read failed: %08x\n", hres); - else - ok(hres == S_OK, "Read failed: %08x\n", hres); - CHECK_CALLED(Read); - - SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE); - hres = IInternetProtocolSink_ReportProgress(filtered_sink, BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE, text_htmlW); - ok(hres == S_OK, "ReportProgress failed: %08x\n", hres); - CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE); - - /* FIXME: test BINDSTATUS_CACHEFILENAMEAVAILABLE */ - } - - if(!read_report_data) - SET_EXPECT(ReportData); - hres = IInternetProtocolSink_ReportData(filtered_sink, grfBSCF, ulProgress, ulProgressMax); - ok(hres == S_OK, "ReportData failed: %08x\n", hres); - if(!read_report_data) - CHECK_CALLED(ReportData); - - if(!filter_state) - filter_state = 1; - - return S_OK; -} - -static HRESULT WINAPI MimeProtocolSink_ReportResult(IInternetProtocolSink *iface, HRESULT hrResult, - DWORD dwError, LPCWSTR szResult) -{ - HRESULT hres; - - CHECK_EXPECT(MimeFilter_ReportResult); - - ok(hrResult == S_OK, "hrResult = %08x\n", hrResult); - ok(dwError == ERROR_SUCCESS, "dwError = %u\n", dwError); - ok(!szResult, "szResult = %s\n", wine_dbgstr_w(szResult)); - - SET_EXPECT(ReportResult); - hres = IInternetProtocolSink_ReportResult(filtered_sink, hrResult, dwError, szResult); - ok(SUCCEEDED(hres), "ReportResult failed: %08x\n", hres); - CHECK_CALLED(ReportResult); - - return S_OK; -} - -static IInternetProtocolSinkVtbl mime_protocol_sink_vtbl = { - MimeProtocolSink_QueryInterface, - MimeProtocolSink_AddRef, - MimeProtocolSink_Release, - MimeProtocolSink_Switch, - MimeProtocolSink_ReportProgress, - MimeProtocolSink_ReportData, - MimeProtocolSink_ReportResult -}; - -static IInternetProtocolSink mime_protocol_sink = { &mime_protocol_sink_vtbl }; - -static HRESULT QueryInterface(REFIID riid, void **ppv) -{ - static const IID IID_undocumented = {0x58DFC7D0,0x5381,0x43E5,{0x9D,0x72,0x4C,0xDD,0xE4,0xCB,0x0F,0x1A}}; - - *ppv = NULL; - - if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IInternetProtocolSink, riid)) - *ppv = &protocol_sink; - if(IsEqualGUID(&IID_IServiceProvider, riid)) - *ppv = &service_provider; - if(IsEqualGUID(&IID_IUriContainer, riid)) - return E_NOINTERFACE; /* TODO */ - - /* NOTE: IE8 queries for undocumented {58DFC7D0-5381-43E5-9D72-4CDDE4CB0F1A} interface. */ - if(IsEqualGUID(&IID_undocumented, riid)) - return E_NOINTERFACE; - - if(*ppv) - return S_OK; - - ok(0, "unexpected call %s\n", debugstr_guid(riid)); - return E_NOINTERFACE; -} - -static HRESULT WINAPI BindInfo_QueryInterface(IInternetBindInfo *iface, REFIID riid, void **ppv) -{ - if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IInternetBindInfo, riid)) { - *ppv = iface; - return S_OK; - } - return E_NOINTERFACE; -} - -static ULONG WINAPI BindInfo_AddRef(IInternetBindInfo *iface) -{ - return 2; -} - -static ULONG WINAPI BindInfo_Release(IInternetBindInfo *iface) -{ - return 1; -} - -static HRESULT WINAPI BindInfo_GetBindInfo(IInternetBindInfo *iface, DWORD *grfBINDF, BINDINFO *pbindinfo) -{ - DWORD cbSize; - - CHECK_EXPECT(GetBindInfo); - - ok(grfBINDF != NULL, "grfBINDF == NULL\n"); - ok(pbindinfo != NULL, "pbindinfo == NULL\n"); - ok(pbindinfo->cbSize == sizeof(BINDINFO), "wrong size of pbindinfo: %d\n", pbindinfo->cbSize); - - *grfBINDF = bindf; - if(binding_test) - *grfBINDF |= BINDF_FROMURLMON; - cbSize = pbindinfo->cbSize; - memset(pbindinfo, 0, cbSize); - pbindinfo->cbSize = cbSize; - - if(http_post_test) - { - pbindinfo->cbstgmedData = sizeof(post_data)-1; - pbindinfo->dwBindVerb = BINDVERB_POST; - pbindinfo->stgmedData.tymed = http_post_test; - - if(http_post_test == TYMED_HGLOBAL) { - HGLOBAL data; - - /* Must be GMEM_FIXED, GMEM_MOVABLE does not work properly */ - data = GlobalAlloc(GPTR, sizeof(post_data)); - memcpy(data, post_data, sizeof(post_data)); - U(pbindinfo->stgmedData).hGlobal = data; - }else { - IStream *post_stream; - HGLOBAL data; - HRESULT hres; - - if(0) { - /* Must be GMEM_FIXED, GMEM_MOVABLE does not work properly */ - data = GlobalAlloc(GPTR, sizeof(post_data)); - memcpy(data, post_data, sizeof(post_data)); - U(pbindinfo->stgmedData).hGlobal = data; - - hres = CreateStreamOnHGlobal(data, FALSE, &post_stream); - ok(hres == S_OK, "CreateStreamOnHGlobal failed: %08x\n", hres); - - U(pbindinfo->stgmedData).pstm =post_stream;/* &Stream; */ - } - U(pbindinfo->stgmedData).pstm = &Stream; - } - } - - return S_OK; -} - -static HRESULT WINAPI BindInfo_GetBindString(IInternetBindInfo *iface, ULONG ulStringType, - LPOLESTR *ppwzStr, ULONG cEl, ULONG *pcElFetched) -{ - ok(ppwzStr != NULL, "ppwzStr == NULL\n"); - ok(pcElFetched != NULL, "pcElFetched == NULL\n"); - - switch(ulStringType) { - case BINDSTRING_ACCEPT_MIMES: - CHECK_EXPECT(GetBindString_ACCEPT_MIMES); - ok(cEl == 256, "cEl=%d, expected 256\n", cEl); - if(pcElFetched) { - ok(*pcElFetched == 256, "*pcElFetched=%d, expected 256\n", *pcElFetched); - *pcElFetched = 1; - } - if(ppwzStr) { - *ppwzStr = CoTaskMemAlloc(sizeof(acc_mimeW)); - memcpy(*ppwzStr, acc_mimeW, sizeof(acc_mimeW)); - } - return S_OK; - case BINDSTRING_USER_AGENT: - CHECK_EXPECT(GetBindString_USER_AGENT); - ok(cEl == 1, "cEl=%d, expected 1\n", cEl); - if(pcElFetched) { - ok(*pcElFetched == 0, "*pcElFetch=%d, expectd 0\n", *pcElFetched); - *pcElFetched = 1; - } - if(ppwzStr) { - *ppwzStr = CoTaskMemAlloc(sizeof(user_agentW)); - memcpy(*ppwzStr, user_agentW, sizeof(user_agentW)); - } - return S_OK; - case BINDSTRING_POST_COOKIE: - CHECK_EXPECT(GetBindString_POST_COOKIE); - ok(cEl == 1, "cEl=%d, expected 1\n", cEl); - if(pcElFetched) - ok(*pcElFetched == 0, "*pcElFetch=%d, expectd 0\n", *pcElFetched); - return S_OK; - case BINDSTRING_URL: { - DWORD size; - - CHECK_EXPECT(GetBindString_URL); - ok(cEl == 1, "cEl=%d, expected 1\n", cEl); - ok(*pcElFetched == 0, "*pcElFetch=%d, expectd 0\n", *pcElFetched); - *pcElFetched = 1; - - size = (lstrlenW(binding_urls[tested_protocol])+1)*sizeof(WCHAR); - *ppwzStr = CoTaskMemAlloc(size); - memcpy(*ppwzStr, binding_urls[tested_protocol], size); - return S_OK; - } - default: - ok(0, "unexpected call\n"); - } - - return E_NOTIMPL; -} - -static IInternetBindInfoVtbl bind_info_vtbl = { - BindInfo_QueryInterface, - BindInfo_AddRef, - BindInfo_Release, - BindInfo_GetBindInfo, - BindInfo_GetBindString -}; - -static IInternetBindInfo bind_info = { &bind_info_vtbl }; - -static HRESULT WINAPI InternetPriority_QueryInterface(IInternetPriority *iface, - REFIID riid, void **ppv) -{ - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI InternetPriority_AddRef(IInternetPriority *iface) -{ - return 2; -} - -static ULONG WINAPI InternetPriority_Release(IInternetPriority *iface) -{ - return 1; -} - -static HRESULT WINAPI InternetPriority_SetPriority(IInternetPriority *iface, LONG nPriority) -{ - CHECK_EXPECT(SetPriority); - ok(nPriority == ex_priority, "nPriority=%d\n", nPriority); - return S_OK; -} - -static HRESULT WINAPI InternetPriority_GetPriority(IInternetPriority *iface, LONG *pnPriority) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - - -static const IInternetPriorityVtbl InternetPriorityVtbl = { - InternetPriority_QueryInterface, - InternetPriority_AddRef, - InternetPriority_Release, - InternetPriority_SetPriority, - InternetPriority_GetPriority -}; - -static IInternetPriority InternetPriority = { &InternetPriorityVtbl }; - -static ULONG WINAPI Protocol_AddRef(IInternetProtocolEx *iface) -{ - return 2; -} - -static ULONG WINAPI Protocol_Release(IInternetProtocolEx *iface) -{ - return 1; -} - -static HRESULT WINAPI Protocol_Abort(IInternetProtocolEx *iface, HRESULT hrReason, - DWORD dwOptions) -{ - HRESULT hres; - - CHECK_EXPECT(Abort); - - SET_EXPECT(ReportResult); - hres = IInternetProtocolSink_ReportResult(binding_sink, S_OK, ERROR_SUCCESS, NULL); - ok(hres == S_OK, "ReportResult failed: %08x\n", hres); - CHECK_CALLED(ReportResult); - - return S_OK; -} - -static HRESULT WINAPI Protocol_Suspend(IInternetProtocolEx *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Protocol_Resume(IInternetProtocolEx *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Protocol_Seek(IInternetProtocolEx *iface, - LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ProtocolEmul_QueryInterface(IInternetProtocolEx *iface, REFIID riid, void **ppv) -{ - if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IInternetProtocol, riid)) { - *ppv = iface; - return S_OK; - } - - if(IsEqualGUID(&IID_IInternetProtocolEx, riid)) { - if(impl_protex) { - *ppv = iface; - return S_OK; - } - *ppv = NULL; - return E_NOINTERFACE; - } - - if(IsEqualGUID(&IID_IInternetPriority, riid)) { - *ppv = &InternetPriority; - return S_OK; - } - - if(IsEqualGUID(&IID_IWinInetInfo, riid)) { - CHECK_EXPECT(QueryInterface_IWinInetInfo); - *ppv = NULL; - return E_NOINTERFACE; - } - - if(IsEqualGUID(&IID_IWinInetHttpInfo, riid)) { - CHECK_EXPECT(QueryInterface_IWinInetHttpInfo); - *ppv = NULL; - return E_NOINTERFACE; - } - - ok(0, "unexpected riid %s\n", debugstr_guid(riid)); - *ppv = NULL; - return E_NOINTERFACE; -} - -static DWORD WINAPI thread_proc(PVOID arg) -{ - HRESULT hres; - - memset(&protocoldata, -1, sizeof(protocoldata)); - - prot_state = 0; - - SET_EXPECT(ReportProgress_FINDINGRESOURCE); - hres = IInternetProtocolSink_ReportProgress(binding_sink, - BINDSTATUS_FINDINGRESOURCE, hostW); - CHECK_CALLED(ReportProgress_FINDINGRESOURCE); - ok(hres == S_OK, "ReportProgress failed: %08x\n", hres); - - SET_EXPECT(ReportProgress_CONNECTING); - hres = IInternetProtocolSink_ReportProgress(binding_sink, - BINDSTATUS_CONNECTING, winehq_ipW); - CHECK_CALLED(ReportProgress_CONNECTING); - ok(hres == S_OK, "ReportProgress failed: %08x\n", hres); - - SET_EXPECT(ReportProgress_SENDINGREQUEST); - hres = IInternetProtocolSink_ReportProgress(binding_sink, - BINDSTATUS_SENDINGREQUEST, NULL); - CHECK_CALLED(ReportProgress_SENDINGREQUEST); - ok(hres == S_OK, "ReportProgress failed: %08x\n", hres); - - prot_state = 1; - SET_EXPECT(Switch); - hres = IInternetProtocolSink_Switch(binding_sink, &protocoldata); - CHECK_CALLED(Switch); - ok(hres == S_OK, "Switch failed: %08x\n", hres); - - if(!short_read) { - prot_state = 2; - if(mimefilter_test) - SET_EXPECT(MimeFilter_Switch); - else - SET_EXPECT(Switch); - hres = IInternetProtocolSink_Switch(binding_sink, &protocoldata); - ok(hres == S_OK, "Switch failed: %08x\n", hres); - if(mimefilter_test) - CHECK_CALLED(MimeFilter_Switch); - else - CHECK_CALLED(Switch); - - if(test_abort) { - SetEvent(event_complete); - return 0; - } - - prot_state = 2; - if(mimefilter_test) - SET_EXPECT(MimeFilter_Switch); - else - SET_EXPECT(Switch); - hres = IInternetProtocolSink_Switch(binding_sink, &protocoldata); - ok(hres == S_OK, "Switch failed: %08x\n", hres); - if(mimefilter_test) - CHECK_CALLED(MimeFilter_Switch); - else - CHECK_CALLED(Switch); - - prot_state = 3; - if(mimefilter_test) - SET_EXPECT(MimeFilter_Switch); - else - SET_EXPECT(Switch); - hres = IInternetProtocolSink_Switch(binding_sink, &protocoldata); - ok(hres == S_OK, "Switch failed: %08x\n", hres); - if(mimefilter_test) - CHECK_CALLED(MimeFilter_Switch); - else - CHECK_CALLED(Switch); - } - - SetEvent(event_complete); - - return 0; -} - -static void protocol_start(IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, DWORD pi) -{ - BINDINFO bindinfo, exp_bindinfo; - DWORD cbindf = 0; - HRESULT hres; - - ok(pOIProtSink != NULL, "pOIProtSink == NULL\n"); - ok(pOIBindInfo != NULL, "pOIBindInfo == NULL\n"); - ok(pOIProtSink != &protocol_sink, "unexpected pOIProtSink\n"); - ok(pOIBindInfo != &bind_info, "unexpected pOIBindInfo\n"); - ok(!pi, "pi = %x\n", pi); - - if(binding_test) - ok(pOIProtSink == binding_sink, "pOIProtSink != binding_sink\n"); - - memset(&bindinfo, 0, sizeof(bindinfo)); - bindinfo.cbSize = sizeof(bindinfo); - memcpy(&exp_bindinfo, &bindinfo, sizeof(bindinfo)); - SET_EXPECT(GetBindInfo); - hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &cbindf, &bindinfo); - ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); - CHECK_CALLED(GetBindInfo); - ok(cbindf == (bindf|BINDF_FROMURLMON), "bindf = %x, expected %x\n", - cbindf, (bindf|BINDF_FROMURLMON)); - ok(!memcmp(&exp_bindinfo, &bindinfo, sizeof(bindinfo)), "unexpected bindinfo\n"); - pReleaseBindInfo(&bindinfo); - - SET_EXPECT(ReportProgress_SENDINGREQUEST); - hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_SENDINGREQUEST, emptyW); - ok(hres == S_OK, "ReportProgress(BINDSTATUS_SENDINGREQUEST) failed: %08x\n", hres); - CHECK_CALLED(ReportProgress_SENDINGREQUEST); - - if(tested_protocol == HTTP_TEST || tested_protocol == HTTPS_TEST) { - IServiceProvider *service_provider; - IHttpNegotiate *http_negotiate; - IHttpNegotiate2 *http_negotiate2; - LPWSTR ua = (LPWSTR)0xdeadbeef, accept_mimes[256]; - LPWSTR additional_headers = NULL; - BYTE sec_id[100]; - DWORD fetched = 0, size = 100; - DWORD tid; - - SET_EXPECT(GetBindString_USER_AGENT); - hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_USER_AGENT, - &ua, 1, &fetched); - CHECK_CALLED(GetBindString_USER_AGENT); - ok(hres == S_OK, "GetBindString(BINDSTRING_USER_AGETNT) failed: %08x\n", hres); - ok(fetched == 1, "fetched = %d, expected 254\n", fetched); - ok(ua != NULL, "ua = %p\n", ua); - ok(!lstrcmpW(ua, user_agentW), "unexpected user agent %s\n", wine_dbgstr_w(ua)); - CoTaskMemFree(ua); - - fetched = 256; - SET_EXPECT(GetBindString_ACCEPT_MIMES); - hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_ACCEPT_MIMES, - accept_mimes, 256, &fetched); - CHECK_CALLED(GetBindString_ACCEPT_MIMES); - - ok(hres == S_OK, - "GetBindString(BINDSTRING_ACCEPT_MIMES) failed: %08x\n", hres); - ok(fetched == 1, "fetched = %d, expected 1\n", fetched); - ok(!lstrcmpW(acc_mimeW, accept_mimes[0]), "unexpected mimes %s\n", wine_dbgstr_w(accept_mimes[0])); - CoTaskMemFree(accept_mimes[0]); - - hres = IInternetBindInfo_QueryInterface(pOIBindInfo, &IID_IServiceProvider, - (void**)&service_provider); - ok(hres == S_OK, "QueryInterface failed: %08x\n", hres); - - SET_EXPECT(QueryService_HttpNegotiate); - hres = IServiceProvider_QueryService(service_provider, &IID_IHttpNegotiate, - &IID_IHttpNegotiate, (void**)&http_negotiate); - CHECK_CALLED(QueryService_HttpNegotiate); - ok(hres == S_OK, "QueryService failed: %08x\n", hres); - - SET_EXPECT(BeginningTransaction); - hres = IHttpNegotiate_BeginningTransaction(http_negotiate, binding_urls[tested_protocol], - NULL, 0, &additional_headers); - CHECK_CALLED(BeginningTransaction); - IHttpNegotiate_Release(http_negotiate); - ok(hres == S_OK, "BeginningTransction failed: %08x\n", hres); - ok(additional_headers == NULL, "additional_headers=%p\n", additional_headers); - - SET_EXPECT(QueryService_HttpNegotiate); - hres = IServiceProvider_QueryService(service_provider, &IID_IHttpNegotiate2, - &IID_IHttpNegotiate2, (void**)&http_negotiate2); - CHECK_CALLED(QueryService_HttpNegotiate); - ok(hres == S_OK, "QueryService failed: %08x\n", hres); - - size = 512; - SET_EXPECT(GetRootSecurityId); - hres = IHttpNegotiate2_GetRootSecurityId(http_negotiate2, sec_id, &size, 0); - CHECK_CALLED(GetRootSecurityId); - IHttpNegotiate2_Release(http_negotiate2); - ok(hres == E_FAIL, "GetRootSecurityId failed: %08x, expected E_FAIL\n", hres); - ok(size == 13, "size=%d\n", size); - - IServiceProvider_Release(service_provider); - - CreateThread(NULL, 0, thread_proc, NULL, 0, &tid); - return; - } - - SET_EXPECT(ReportProgress_CACHEFILENAMEAVAILABLE); - hres = IInternetProtocolSink_ReportProgress(pOIProtSink, - BINDSTATUS_CACHEFILENAMEAVAILABLE, expect_wsz = emptyW); - ok(hres == S_OK, "ReportProgress(BINDSTATUS_CACHEFILENAMEAVAILABLE) failed: %08x\n", hres); - CHECK_CALLED(ReportProgress_CACHEFILENAMEAVAILABLE); - - if(mimefilter_test) { - SET_EXPECT(MimeFilter_CreateInstance); - SET_EXPECT(MimeFilter_Start); - SET_EXPECT(ReportProgress_LOADINGMIMEHANDLER); - } - SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE); - hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE, - mimefilter_test ? gzipW : (expect_wsz = text_htmlW)); - ok(hres == S_OK, - "ReportProgress(BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE) failed: %08x\n", hres); - if(mimefilter_test) { - CHECK_CALLED(MimeFilter_CreateInstance); - CHECK_CALLED(MimeFilter_Start); - CHECK_CALLED(ReportProgress_LOADINGMIMEHANDLER); - todo_wine CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE); - }else { - CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE); - } - - if(mimefilter_test) - SET_EXPECT(MimeFilter_ReportData); - else - SET_EXPECT(ReportData); - hres = IInternetProtocolSink_ReportData(pOIProtSink, - BSCF_FIRSTDATANOTIFICATION | (tested_protocol == ITS_TEST ? BSCF_DATAFULLYAVAILABLE : BSCF_LASTDATANOTIFICATION), - 13, 13); - ok(hres == S_OK, "ReportData failed: %08x\n", hres); - if(mimefilter_test) - CHECK_CALLED(MimeFilter_ReportData); - else - CHECK_CALLED(ReportData); - - if(tested_protocol == ITS_TEST) { - SET_EXPECT(ReportData); - hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_BEGINDOWNLOADDATA, NULL); - ok(hres == S_OK, "ReportProgress(BINDSTATUS_BEGINDOWNLOADDATA) failed: %08x\n", hres); - CHECK_CALLED(ReportData); - } - - if(tested_protocol == BIND_TEST) { - hres = IInternetProtocol_Terminate(binding_protocol, 0); - ok(hres == E_FAIL, "Termiante failed: %08x\n", hres); - } - - if(mimefilter_test) - SET_EXPECT(MimeFilter_ReportResult); - else - SET_EXPECT(ReportResult); - hres = IInternetProtocolSink_ReportResult(pOIProtSink, S_OK, 0, NULL); - ok(hres == S_OK, "ReportResult failed: %08x\n", hres); - if(mimefilter_test) - CHECK_CALLED(MimeFilter_ReportResult); - else - CHECK_CALLED(ReportResult); -} - -static HRESULT WINAPI ProtocolEmul_Start(IInternetProtocolEx *iface, LPCWSTR szUrl, - IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, - DWORD grfPI, HANDLE_PTR dwReserved) -{ - CHECK_EXPECT(Start); - - ok(!dwReserved, "dwReserved = %lx\n", dwReserved); - protocol_start(pOIProtSink, pOIBindInfo, grfPI); - return S_OK; -} - -static HRESULT WINAPI ProtocolEmul_Continue(IInternetProtocolEx *iface, - PROTOCOLDATA *pProtocolData) -{ - DWORD bscf = 0, pr; - HRESULT hres; - - CHECK_EXPECT(Continue); - - ok(pProtocolData != NULL, "pProtocolData == NULL\n"); - if(!pProtocolData || tested_protocol == BIND_TEST) - return S_OK; - if(binding_test) { - ok(pProtocolData != &protocoldata, "pProtocolData == &protocoldata\n"); - ok(pProtocolData->grfFlags == protocoldata.grfFlags, "grfFlags wrong %x/%x\n", - pProtocolData->grfFlags, protocoldata.grfFlags ); - ok(pProtocolData->dwState == protocoldata.dwState, "dwState wrong %x/%x\n", - pProtocolData->dwState, protocoldata.dwState ); - ok(pProtocolData->pData == protocoldata.pData, "pData wrong %p/%p\n", - pProtocolData->pData, protocoldata.pData ); - ok(pProtocolData->cbData == protocoldata.cbData, "cbData wrong %x/%x\n", - pProtocolData->cbData, protocoldata.cbData ); - } - - switch(prot_state) { - case 1: { - IServiceProvider *service_provider; - IHttpNegotiate *http_negotiate; - static WCHAR header[] = {'?',0}; - - hres = IInternetProtocolSink_QueryInterface(binding_sink, &IID_IServiceProvider, - (void**)&service_provider); - ok(hres == S_OK, "Could not get IServiceProvicder\n"); - - SET_EXPECT(QueryService_HttpNegotiate); - hres = IServiceProvider_QueryService(service_provider, &IID_IHttpNegotiate, - &IID_IHttpNegotiate, (void**)&http_negotiate); - IServiceProvider_Release(service_provider); - CHECK_CALLED(QueryService_HttpNegotiate); - ok(hres == S_OK, "Could not get IHttpNegotiate\n"); - - SET_EXPECT(OnResponse); - hres = IHttpNegotiate_OnResponse(http_negotiate, 200, header, NULL, NULL); - IHttpNegotiate_Release(http_negotiate); - CHECK_CALLED(OnResponse); - IHttpNegotiate_Release(http_negotiate); - ok(hres == S_OK, "OnResponse failed: %08x\n", hres); - - if(mimefilter_test) { - SET_EXPECT(MimeFilter_CreateInstance); - SET_EXPECT(MimeFilter_Start); - SET_EXPECT(ReportProgress_LOADINGMIMEHANDLER); - }else if(!(pi & PI_MIMEVERIFICATION)) { - SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE); - } - hres = IInternetProtocolSink_ReportProgress(binding_sink, - BINDSTATUS_MIMETYPEAVAILABLE, mimefilter_test ? gzipW : text_htmlW); - if(mimefilter_test) { - CHECK_CALLED(MimeFilter_CreateInstance); - CHECK_CALLED(MimeFilter_Start); - CHECK_CALLED(ReportProgress_LOADINGMIMEHANDLER); - }else if(!(pi & PI_MIMEVERIFICATION)) { - CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE); - } - ok(hres == S_OK, - "ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08x\n", hres); - - bscf |= BSCF_FIRSTDATANOTIFICATION; - break; - } - case 2: - case 3: - bscf = BSCF_INTERMEDIATEDATANOTIFICATION; - break; - } - - pr = prot_read; - if(mimefilter_test) { - SET_EXPECT(MimeFilter_ReportData); - }else if(pi & PI_MIMEVERIFICATION) { - if(pr < 200) - SET_EXPECT(Read); /* checked in ReportData for short_read */ - if(pr == 200) { - if(!mimefilter_test) - SET_EXPECT(Read); /* checked in BINDSTATUS_MIMETYPEAVAILABLE or ReportData */ - SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE); - } - if(pr >= 200) - SET_EXPECT(ReportData); - }else { - SET_EXPECT(ReportData); - } - - hres = IInternetProtocolSink_ReportData(binding_sink, bscf, pr, 400); - ok(hres == S_OK, "ReportData failed: %08x\n", hres); - - if(mimefilter_test) { - SET_EXPECT(MimeFilter_ReportData); - }else if(pi & PI_MIMEVERIFICATION) { - if(!short_read && pr < 200) - CHECK_CALLED(Read); - if(pr == 200) { - CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE); - } - }else { - CHECK_CALLED(ReportData); - } - - if(prot_state == 3) - prot_state = 4; - - return S_OK; -} - -static HRESULT WINAPI ProtocolEmul_Terminate(IInternetProtocolEx *iface, DWORD dwOptions) -{ - CHECK_EXPECT(Terminate); - ok(!dwOptions, "dwOptions=%d\n", dwOptions); - return S_OK; -} - -static HRESULT WINAPI ProtocolEmul_Read(IInternetProtocolEx *iface, void *pv, - ULONG cb, ULONG *pcbRead) -{ - if(read_report_data) - CHECK_EXPECT2(Read2); - - if(mimefilter_test || short_read) { - if(!read_report_data) - CHECK_EXPECT2(Read); - }else if((pi & PI_MIMEVERIFICATION)) { - if(!read_report_data) - CHECK_EXPECT2(Read); - - if(prot_read < 300) { - ok(pv != expect_pv, "pv == expect_pv\n"); - if(prot_read < 300) - ok(cb == 2048-prot_read, "cb=%d\n", cb); - else - ok(cb == 700, "cb=%d\n", cb); - }else { - ok(expect_pv <= pv && (BYTE*)pv < (BYTE*)expect_pv + cb, "pv != expect_pv\n"); - } - }else { - if(!read_report_data) - CHECK_EXPECT(Read); - - ok(pv == expect_pv, "pv != expect_pv\n"); - ok(cb == 1000, "cb=%d\n", cb); - ok(!*pcbRead, "*pcbRead = %d\n", *pcbRead); - } - ok(pcbRead != NULL, "pcbRead == NULL\n"); - - if(prot_state == 3 || (short_read && prot_state != 4)) { - HRESULT hres; - - prot_state = 4; - if(short_read) { - SET_EXPECT(Read2); /* checked in BINDSTATUS_MIMETYPEAVAILABLE */ - SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE); - } - if(mimefilter_test) - SET_EXPECT(MimeFilter_ReportData); - else if(direct_read) - SET_EXPECT(ReportData2); - read_report_data++; - hres = IInternetProtocolSink_ReportData(binding_sink, - BSCF_LASTDATANOTIFICATION|BSCF_INTERMEDIATEDATANOTIFICATION, 0, 0); - read_report_data--; - ok(hres == S_OK, "ReportData failed: %08x\n", hres); - if(short_read) - CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE); - if(mimefilter_test) - CHECK_CALLED(MimeFilter_ReportData); - else if(direct_read) - CHECK_CALLED(ReportData2); - - if(mimefilter_test) - SET_EXPECT(MimeFilter_ReportResult); - else - SET_EXPECT(ReportResult); - hres = IInternetProtocolSink_ReportResult(binding_sink, S_OK, ERROR_SUCCESS, NULL); - ok(hres == S_OK, "ReportResult failed: %08x\n", hres); - if(mimefilter_test) - CHECK_CALLED(MimeFilter_ReportResult); - else - CHECK_CALLED(ReportResult); - - memset(pv, 'x', 100); - prot_read += *pcbRead = 100; - return S_OK; - }if(prot_state == 4) { - *pcbRead = 0; - return S_FALSE; - } - - if((async_read_pending = !async_read_pending)) { - *pcbRead = 0; - return tested_protocol == HTTP_TEST || tested_protocol == HTTPS_TEST ? E_PENDING : S_FALSE; - } - - memset(pv, 'x', 100); - prot_read += *pcbRead = 100; - return S_OK; -} - -static HRESULT WINAPI ProtocolEmul_LockRequest(IInternetProtocolEx *iface, DWORD dwOptions) -{ - CHECK_EXPECT(LockRequest); - ok(dwOptions == 0, "dwOptions=%x\n", dwOptions); - return S_OK; -} - -static HRESULT WINAPI ProtocolEmul_UnlockRequest(IInternetProtocolEx *iface) -{ - CHECK_EXPECT(UnlockRequest); - return S_OK; -} - -static HRESULT WINAPI ProtocolEmul_StartEx(IInternetProtocolEx *iface, IUri *pUri, - IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, - DWORD grfPI, HANDLE *dwReserved) -{ - CHECK_EXPECT(StartEx); - ok(!dwReserved, "dwReserved = %p\n", dwReserved); - protocol_start(pOIProtSink, pOIBindInfo, grfPI); - return S_OK; -} - -static const IInternetProtocolExVtbl ProtocolVtbl = { - ProtocolEmul_QueryInterface, - Protocol_AddRef, - Protocol_Release, - ProtocolEmul_Start, - ProtocolEmul_Continue, - Protocol_Abort, - ProtocolEmul_Terminate, - Protocol_Suspend, - Protocol_Resume, - ProtocolEmul_Read, - Protocol_Seek, - ProtocolEmul_LockRequest, - ProtocolEmul_UnlockRequest, - ProtocolEmul_StartEx -}; - -static IInternetProtocolEx Protocol = { &ProtocolVtbl }; - -static HRESULT WINAPI MimeProtocol_QueryInterface(IInternetProtocolEx *iface, REFIID riid, void **ppv) -{ - if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IInternetProtocol, riid)) { - *ppv = iface; - return S_OK; - } - - if(IsEqualGUID(&IID_IInternetProtocolSink, riid)) { - *ppv = &mime_protocol_sink; - return S_OK; - } - - ok(0, "unexpected riid %s\n", debugstr_guid(riid)); - *ppv = NULL; - return E_NOINTERFACE; -} - -static HRESULT WINAPI MimeProtocol_Start(IInternetProtocolEx *iface, LPCWSTR szUrl, - IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, - DWORD grfPI, HANDLE_PTR dwReserved) -{ - PROTOCOLFILTERDATA *data; - LPOLESTR url_str = NULL; - DWORD fetched = 0; - BINDINFO bindinfo; - DWORD cbindf = 0; - HRESULT hres; - - CHECK_EXPECT(MimeFilter_Start); - - ok(!lstrcmpW(szUrl, gzipW), "wrong url %s\n", wine_dbgstr_w(szUrl)); - ok(grfPI == (PI_FILTER_MODE|PI_FORCE_ASYNC), "grfPI=%x, expected PI_FILTER_MODE|PI_FORCE_ASYNC\n", grfPI); - ok(dwReserved, "dwReserved == 0\n"); - ok(pOIProtSink != NULL, "pOIProtSink == NULL\n"); - ok(pOIBindInfo != NULL, "pOIBindInfo == NULL\n"); - - if(binding_test) { - ok(pOIProtSink != binding_sink, "pOIProtSink == protocol_sink\n"); - ok(pOIBindInfo == prot_bind_info, "pOIBindInfo != bind_info\n"); - }else { - ok(pOIProtSink == &protocol_sink, "pOIProtSink != protocol_sink\n"); - ok(pOIBindInfo == &bind_info, "pOIBindInfo != bind_info\n"); - } - - data = (void*)dwReserved; - ok(data->cbSize == sizeof(*data), "data->cbSize = %d\n", data->cbSize); - ok(!data->pProtocolSink, "data->pProtocolSink != NULL\n"); - ok(data->pProtocol != NULL, "data->pProtocol == NULL\n"); - ok(!data->pUnk, "data->pUnk != NULL\n"); - ok(!data->dwFilterFlags, "data->dwProtocolFlags = %x\n", data->dwFilterFlags); - if(binding_test) { - IInternetProtocolSink *prot_sink; - - IInternetProtocol_QueryInterface(data->pProtocol, &IID_IInternetProtocolSink, (void**)&prot_sink); - ok(prot_sink == pOIProtSink, "QI(data->pProtocol, IID_IInternetProtocolSink) != pOIProtSink\n"); - IInternetProtocolSink_Release(prot_sink); - - ok(data->pProtocol != binding_protocol, "data->pProtocol == binding_protocol\n"); - - filtered_protocol = data->pProtocol; - IInternetProtocol_AddRef(filtered_protocol); - }else { - IInternetProtocol *prot; - - IInternetProtocol_QueryInterface(data->pProtocol, &IID_IInternetProtocol, (void**)&prot); - ok(prot == async_protocol, "QI(data->pProtocol, IID_IInternetProtocol) != async_protocol\n"); - IInternetProtocol_Release(prot); - - ok(data->pProtocol != async_protocol, "data->pProtocol == async_protocol\n"); - } - - filtered_sink = pOIProtSink; - - SET_EXPECT(ReportProgress_DECODING); - hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_DECODING, gzipW); - ok(hres == S_OK, "ReportProgress(BINDSTATUS_DECODING) failed: %08x\n", hres); - CHECK_CALLED(ReportProgress_DECODING); - - SET_EXPECT(GetBindInfo); - memset(&bindinfo, 0, sizeof(bindinfo)); - bindinfo.cbSize = sizeof(bindinfo); - hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &cbindf, &bindinfo); - ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); - ok(cbindf == (bindf|BINDF_FROMURLMON), "cbindf = %x, expected %x\n", cbindf, bindf); - CHECK_CALLED(GetBindInfo); - - SET_EXPECT(GetBindString_URL); - hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_URL, &url_str, 1, &fetched); - ok(hres == S_OK, "GetBindString(BINDSTRING_URL) failed: %08x\n", hres); - ok(fetched == 1, "fetched = %d\n", fetched); - ok(!lstrcmpW(url_str, binding_urls[tested_protocol]), "wrong url_str %s\n", wine_dbgstr_w(url_str)); - CoTaskMemFree(url_str); - CHECK_CALLED(GetBindString_URL); - - return S_OK; -} - -static HRESULT WINAPI Protocol_Continue(IInternetProtocolEx *iface, - PROTOCOLDATA *pProtocolData) -{ - CHECK_EXPECT(MimeFilter_Continue); - return E_NOTIMPL; -} - -static HRESULT WINAPI MimeProtocol_Terminate(IInternetProtocolEx *iface, DWORD dwOptions) -{ - HRESULT hres; - - CHECK_EXPECT(MimeFilter_Terminate); - - ok(!dwOptions, "dwOptions = %x\n", dwOptions); - - SET_EXPECT(Terminate); - hres = IInternetProtocol_Terminate(filtered_protocol, dwOptions); - ok(hres == S_OK, "Terminate failed: %08x\n", hres); - CHECK_CALLED(Terminate); - - return S_OK; -} - -static HRESULT WINAPI MimeProtocol_Read(IInternetProtocolEx *iface, void *pv, - ULONG cb, ULONG *pcbRead) -{ - BYTE buf[2096]; - DWORD read = 0; - HRESULT hres; - - CHECK_EXPECT(MimeFilter_Read); - - ok(pv != NULL, "pv == NULL\n"); - ok(cb != 0, "cb == 0\n"); - ok(pcbRead != NULL, "pcbRead == NULL\n"); - - if(read_report_data) - SET_EXPECT(Read2); - else - SET_EXPECT(Read); - hres = IInternetProtocol_Read(filtered_protocol, buf, sizeof(buf), &read); - ok(hres == S_OK || hres == S_FALSE || hres == E_PENDING, "Read failed: %08x\n", hres); - if(read_report_data) - CHECK_CALLED(Read2); - else - CHECK_CALLED(Read); - - if(pcbRead) { - ok(*pcbRead == 0, "*pcbRead=%d, expected 0\n", *pcbRead); - *pcbRead = read; - } - - memset(pv, 'x', read); - return hres; -} - -static HRESULT WINAPI MimeProtocol_LockRequest(IInternetProtocolEx *iface, DWORD dwOptions) -{ - HRESULT hres; - - CHECK_EXPECT(MimeFilter_LockRequest); - - ok(!dwOptions, "dwOptions = %x\n", dwOptions); - - SET_EXPECT(LockRequest); - hres = IInternetProtocol_LockRequest(filtered_protocol, dwOptions); - ok(hres == S_OK, "LockRequest failed: %08x\n", hres); - CHECK_CALLED(LockRequest); - - return S_OK; -} - -static HRESULT WINAPI MimeProtocol_UnlockRequest(IInternetProtocolEx *iface) -{ - HRESULT hres; - - CHECK_EXPECT(MimeFilter_UnlockRequest); - - SET_EXPECT(UnlockRequest); - hres = IInternetProtocol_UnlockRequest(filtered_protocol); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); - CHECK_CALLED(UnlockRequest); - - return S_OK; -} - -static const IInternetProtocolExVtbl MimeProtocolVtbl = { - MimeProtocol_QueryInterface, - Protocol_AddRef, - Protocol_Release, - MimeProtocol_Start, - Protocol_Continue, - Protocol_Abort, - MimeProtocol_Terminate, - Protocol_Suspend, - Protocol_Resume, - MimeProtocol_Read, - Protocol_Seek, - MimeProtocol_LockRequest, - MimeProtocol_UnlockRequest -}; - -static IInternetProtocolEx MimeProtocol = { &MimeProtocolVtbl }; - -static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv) -{ - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface) -{ - return 2; -} - -static ULONG WINAPI ClassFactory_Release(IClassFactory *iface) -{ - return 1; -} - -static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown *pOuter, - REFIID riid, void **ppv) -{ - CHECK_EXPECT(CreateInstance); - - ok(pOuter == (IUnknown*)prot_bind_info, "pOuter != protocol_unk\n"); - ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", debugstr_guid(riid)); - ok(ppv != NULL, "ppv == NULL\n"); - - *ppv = &Protocol; - return S_OK; -} - -static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL dolock) -{ - ok(0, "unexpected call\n"); - return S_OK; -} - -static const IClassFactoryVtbl ClassFactoryVtbl = { - ClassFactory_QueryInterface, - ClassFactory_AddRef, - ClassFactory_Release, - ClassFactory_CreateInstance, - ClassFactory_LockServer -}; - -static IClassFactory ClassFactory = { &ClassFactoryVtbl }; - -static HRESULT WINAPI MimeFilter_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) -{ - CHECK_EXPECT(MimeFilter_CreateInstance); - - ok(!outer, "outer = %p\n", outer); - ok(IsEqualGUID(&IID_IInternetProtocol, riid), "unexpected riid %s\n", debugstr_guid(riid)); - - *ppv = &MimeProtocol; - return S_OK; -} - -static const IClassFactoryVtbl MimeFilterCFVtbl = { - ClassFactory_QueryInterface, - ClassFactory_AddRef, - ClassFactory_Release, - MimeFilter_CreateInstance, - ClassFactory_LockServer -}; - -static IClassFactory mimefilter_cf = { &MimeFilterCFVtbl }; - -#define TEST_BINDING 0x0001 -#define TEST_FILTER 0x0002 -#define TEST_FIRST_HTTP 0x0004 -#define TEST_DIRECT_READ 0x0008 -#define TEST_POST 0x0010 -#define TEST_EMULATEPROT 0x0020 -#define TEST_SHORT_READ 0x0040 -#define TEST_REDIRECT 0x0080 -#define TEST_ABORT 0x0100 -#define TEST_ASYNCREQ 0x0200 -#define TEST_USEIURI 0x0400 -#define TEST_IMPLPROTEX 0x0800 - -static void register_filter(BOOL do_register) -{ - IInternetSession *session; - HRESULT hres; - - static const WCHAR gzipW[] = {'g','z','i','p',0}; - - hres = pCoInternetGetSession(0, &session, 0); - ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres); - - if(do_register) { - hres = IInternetSession_RegisterMimeFilter(session, &mimefilter_cf, &IID_IInternetProtocol, gzipW); - ok(hres == S_OK, "RegisterMimeFilter failed: %08x\n", hres); - }else { - hres = IInternetSession_UnregisterMimeFilter(session, &mimefilter_cf, gzipW); - ok(hres == S_OK, "RegisterMimeFilter failed: %08x\n", hres); - } - - IInternetSession_Release(session); -} - -static void init_test(int prot, DWORD flags) -{ - tested_protocol = prot; - binding_test = (flags & TEST_BINDING) != 0; - first_data_notif = TRUE; - prot_read = 0; - prot_state = 0; - async_read_pending = TRUE; - mimefilter_test = (flags & TEST_FILTER) != 0; - filter_state = 0; - post_stream_read = 0; - ResetEvent(event_complete); - ResetEvent(event_complete2); - ResetEvent(event_continue); - ResetEvent(event_continue_done); - async_protocol = binding_protocol = filtered_protocol = NULL; - filtered_sink = NULL; - http_is_first = (flags & TEST_FIRST_HTTP) != 0; - first_data_notif = TRUE; - state = STATE_CONNECTING; - test_async_req = (flags & TEST_ASYNCREQ) != 0; - direct_read = (flags & TEST_DIRECT_READ) != 0; - emulate_prot = (flags & TEST_EMULATEPROT) != 0; - wait_for_switch = TRUE; - short_read = (flags & TEST_SHORT_READ) != 0; - http_post_test = TYMED_NULL; - test_redirect = (flags & TEST_REDIRECT) != 0; - test_abort = (flags & TEST_ABORT) != 0; - impl_protex = (flags & TEST_IMPLPROTEX) != 0; - - register_filter(mimefilter_test); -} - -static void test_priority(IInternetProtocol *protocol) -{ - IInternetPriority *priority; - LONG pr; - HRESULT hres; - - hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetPriority, - (void**)&priority); - ok(hres == S_OK, "QueryInterface(IID_IInternetPriority) failed: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IInternetPriority_GetPriority(priority, &pr); - ok(hres == S_OK, "GetPriority failed: %08x\n", hres); - ok(pr == 0, "pr=%d, expected 0\n", pr); - - hres = IInternetPriority_SetPriority(priority, 1); - ok(hres == S_OK, "SetPriority failed: %08x\n", hres); - - hres = IInternetPriority_GetPriority(priority, &pr); - ok(hres == S_OK, "GetPriority failed: %08x\n", hres); - ok(pr == 1, "pr=%d, expected 1\n", pr); - - IInternetPriority_Release(priority); -} - -static void test_early_abort(const CLSID *clsid) -{ - IInternetProtocol *protocol; - HRESULT hres; - - hres = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, - &IID_IInternetProtocol, (void**)&protocol); - ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres); - - hres = IInternetProtocol_Abort(protocol, E_ABORT, 0); - ok(hres == S_OK, "Abort failed: %08x\n", hres); - - hres = IInternetProtocol_Abort(protocol, E_FAIL, 0); - ok(hres == S_OK, "Abort failed: %08x\n", hres); - - IInternetProtocol_Release(protocol); -} - -static BOOL file_protocol_start(IInternetProtocol *protocol, LPCWSTR url, - IInternetProtocolEx *protocolex, IUri *uri, BOOL is_first) -{ - HRESULT hres; - - SET_EXPECT(GetBindInfo); - if(!(bindf & BINDF_FROMURLMON)) - SET_EXPECT(ReportProgress_DIRECTBIND); - if(is_first) { - SET_EXPECT(ReportProgress_SENDINGREQUEST); - SET_EXPECT(ReportProgress_CACHEFILENAMEAVAILABLE); - if(bindf & BINDF_FROMURLMON) - SET_EXPECT(ReportProgress_VERIFIEDMIMETYPEAVAILABLE); - else - SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE); - } - SET_EXPECT(ReportData); - if(is_first) - SET_EXPECT(ReportResult); - - expect_hrResult = S_OK; - - if(protocolex) { - hres = IInternetProtocolEx_StartEx(protocolex, uri, &protocol_sink, &bind_info, 0, 0); - ok(hres == S_OK, "StartEx failed: %08x\n", hres); - }else { - hres = IInternetProtocol_Start(protocol, url, &protocol_sink, &bind_info, 0, 0); - if(hres == INET_E_RESOURCE_NOT_FOUND) { - win_skip("Start failed\n"); - return FALSE; - } - ok(hres == S_OK, "Start failed: %08x\n", hres); - } - - CHECK_CALLED(GetBindInfo); - if(!(bindf & BINDF_FROMURLMON)) - CHECK_CALLED(ReportProgress_DIRECTBIND); - if(is_first) { - CHECK_CALLED(ReportProgress_SENDINGREQUEST); - CHECK_CALLED(ReportProgress_CACHEFILENAMEAVAILABLE); - if(bindf & BINDF_FROMURLMON) - CHECK_CALLED(ReportProgress_VERIFIEDMIMETYPEAVAILABLE); - else - CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE); - } - CHECK_CALLED(ReportData); - if(is_first) - CHECK_CALLED(ReportResult); - - return TRUE; -} - -static void test_file_protocol_url(LPCWSTR url) -{ - IInternetProtocolInfo *protocol_info; - IUnknown *unk; - IClassFactory *factory; - IInternetProtocol *protocol; - BYTE buf[512]; - ULONG cb; - HRESULT hres; - - hres = CoGetClassObject(&CLSID_FileProtocol, CLSCTX_INPROC_SERVER, NULL, - &IID_IUnknown, (void**)&unk); - ok(hres == S_OK, "CoGetClassObject failed: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (void**)&protocol_info); - ok(hres == E_NOINTERFACE, - "Could not get IInternetProtocolInfo interface: %08x, expected E_NOINTERFACE\n", hres); - - hres = IUnknown_QueryInterface(unk, &IID_IClassFactory, (void**)&factory); - ok(hres == S_OK, "Could not get IClassFactory interface\n"); - IUnknown_Release(unk); - if(FAILED(hres)) - return; - - hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol); - ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); - - if(SUCCEEDED(hres)) { - if(file_protocol_start(protocol, url, NULL, NULL, TRUE)) { - hres = IInternetProtocol_Read(protocol, buf, 2, &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - ok(cb == 2, "cb=%u expected 2\n", cb); - hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); - ok(hres == S_FALSE, "Read failed: %08x\n", hres); - hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb); - ok(hres == S_FALSE, "Read failed: %08x expected S_FALSE\n", hres); - ok(cb == 0, "cb=%u expected 0\n", cb); - hres = IInternetProtocol_UnlockRequest(protocol); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); - } - - if(file_protocol_start(protocol, url, NULL, NULL, FALSE)) { - hres = IInternetProtocol_Read(protocol, buf, 2, &cb); - ok(hres == S_FALSE, "Read failed: %08x\n", hres); - hres = IInternetProtocol_LockRequest(protocol, 0); - ok(hres == S_OK, "LockRequest failed: %08x\n", hres); - hres = IInternetProtocol_UnlockRequest(protocol); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); - } - - IInternetProtocol_Release(protocol); - } - - hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol); - ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); - if(SUCCEEDED(hres)) { - if(file_protocol_start(protocol, url, NULL, NULL, TRUE)) { - hres = IInternetProtocol_LockRequest(protocol, 0); - ok(hres == S_OK, "LockRequest failed: %08x\n", hres); - hres = IInternetProtocol_Terminate(protocol, 0); - ok(hres == S_OK, "Terminate failed: %08x\n", hres); - hres = IInternetProtocol_Read(protocol, buf, 2, &cb); - ok(hres == S_OK, "Read failed: %08x\n\n", hres); - hres = IInternetProtocol_UnlockRequest(protocol); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); - hres = IInternetProtocol_Read(protocol, buf, 2, &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - hres = IInternetProtocol_Terminate(protocol, 0); - ok(hres == S_OK, "Terminate failed: %08x\n", hres); - } - - IInternetProtocol_Release(protocol); - } - - hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol); - ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); - if(SUCCEEDED(hres)) { - if(file_protocol_start(protocol, url, NULL, NULL, TRUE)) { - hres = IInternetProtocol_Terminate(protocol, 0); - ok(hres == S_OK, "Terminate failed: %08x\n", hres); - hres = IInternetProtocol_Read(protocol, buf, 2, &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - ok(cb == 2, "cb=%u expected 2\n", cb); - } - - IInternetProtocol_Release(protocol); - } - - if(pCreateUri) { - IInternetProtocolEx *protocolex; - IUri *uri; - - hres = pCreateUri(url, Uri_CREATE_FILE_USE_DOS_PATH, 0, &uri); - ok(hres == S_OK, "CreateUri failed: %08x\n", hres); - - hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocolEx, (void**)&protocolex); - ok(hres == S_OK, "Could not get IInternetProtocolEx: %08x\n", hres); - - if(file_protocol_start(NULL, NULL, protocolex, uri, TRUE)) { - hres = IInternetProtocolEx_Read(protocolex, buf, 2, &cb); - ok(hres == S_OK, "Read failed: %08x\n", hres); - hres = IInternetProtocolEx_LockRequest(protocolex, 0); - ok(hres == S_OK, "LockRequest failed: %08x\n", hres); - hres = IInternetProtocolEx_UnlockRequest(protocolex); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); - } - - IUri_Release(uri); - IInternetProtocolEx_Release(protocolex); - }else { - win_skip("Skipping file protocol StartEx tests\n"); - } - - IClassFactory_Release(factory); -} - -static void test_file_protocol_fail(void) -{ - IInternetProtocol *protocol; - HRESULT hres; - - static const WCHAR index_url2[] = - {'f','i','l','e',':','/','/','i','n','d','e','x','.','h','t','m','l',0}; - - hres = CoCreateInstance(&CLSID_FileProtocol, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, - &IID_IInternetProtocol, (void**)&protocol); - ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres); - if(FAILED(hres)) - return; - - SET_EXPECT(GetBindInfo); - expect_hrResult = MK_E_SYNTAX; - hres = IInternetProtocol_Start(protocol, wszIndexHtml, &protocol_sink, &bind_info, 0, 0); - ok(hres == MK_E_SYNTAX || - hres == E_INVALIDARG, - "Start failed: %08x, expected MK_E_SYNTAX or E_INVALIDARG\n", hres); - CLEAR_CALLED(GetBindInfo); /* GetBindInfo not called in IE7 */ - - SET_EXPECT(GetBindInfo); - if(!(bindf & BINDF_FROMURLMON)) - SET_EXPECT(ReportProgress_DIRECTBIND); - SET_EXPECT(ReportProgress_SENDINGREQUEST); - SET_EXPECT(ReportResult); - expect_hrResult = INET_E_RESOURCE_NOT_FOUND; - hres = IInternetProtocol_Start(protocol, index_url, &protocol_sink, &bind_info, 0, 0); - ok(hres == INET_E_RESOURCE_NOT_FOUND, - "Start failed: %08x expected INET_E_RESOURCE_NOT_FOUND\n", hres); - CHECK_CALLED(GetBindInfo); - if(!(bindf & BINDF_FROMURLMON)) - CHECK_CALLED(ReportProgress_DIRECTBIND); - CHECK_CALLED(ReportProgress_SENDINGREQUEST); - CHECK_CALLED(ReportResult); - - IInternetProtocol_Release(protocol); - - hres = CoCreateInstance(&CLSID_FileProtocol, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, - &IID_IInternetProtocol, (void**)&protocol); - ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres); - if(FAILED(hres)) - return; - - SET_EXPECT(GetBindInfo); - if(!(bindf & BINDF_FROMURLMON)) - SET_EXPECT(ReportProgress_DIRECTBIND); - SET_EXPECT(ReportProgress_SENDINGREQUEST); - SET_EXPECT(ReportResult); - expect_hrResult = INET_E_RESOURCE_NOT_FOUND; - - hres = IInternetProtocol_Start(protocol, index_url2, &protocol_sink, &bind_info, 0, 0); - ok(hres == INET_E_RESOURCE_NOT_FOUND, - "Start failed: %08x, expected INET_E_RESOURCE_NOT_FOUND\n", hres); - CHECK_CALLED(GetBindInfo); - if(!(bindf & BINDF_FROMURLMON)) - CHECK_CALLED(ReportProgress_DIRECTBIND); - CHECK_CALLED(ReportProgress_SENDINGREQUEST); - CHECK_CALLED(ReportResult); - - SET_EXPECT(GetBindInfo); - hres = IInternetProtocol_Start(protocol, NULL, &protocol_sink, &bind_info, 0, 0); - ok(hres == E_INVALIDARG, "Start failed: %08x, expected E_INVALIDARG\n", hres); - CLEAR_CALLED(GetBindInfo); /* GetBindInfo not called in IE7 */ - - SET_EXPECT(GetBindInfo); - hres = IInternetProtocol_Start(protocol, emptyW, &protocol_sink, &bind_info, 0, 0); - ok(hres == E_INVALIDARG, "Start failed: %08x, expected E_INVALIDARG\n", hres); - CLEAR_CALLED(GetBindInfo); /* GetBindInfo not called in IE7 */ - - IInternetProtocol_Release(protocol); -} - -static void test_file_protocol(void) { - WCHAR buf[INTERNET_MAX_URL_LENGTH], file_name_buf[MAX_PATH]; - DWORD size; - ULONG len; - HANDLE file; - - static const WCHAR wszFile[] = {'f','i','l','e',':',0}; - static const WCHAR wszFile2[] = {'f','i','l','e',':','/','/',0}; - static const WCHAR wszFile3[] = {'f','i','l','e',':','/','/','/',0}; - static const WCHAR wszFile4[] = {'f','i','l','e',':','\\','\\',0}; - static const char html_doc[] = ""; - - trace("Testing file protocol...\n"); - init_test(FILE_TEST, 0); - - SetLastError(0xdeadbeef); - file = CreateFileW(wszIndexHtml, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, NULL); - ok(file != INVALID_HANDLE_VALUE, "CreateFile failed\n"); - if(file == INVALID_HANDLE_VALUE) - return; - WriteFile(file, html_doc, sizeof(html_doc)-1, &size, NULL); - CloseHandle(file); - - file_name = wszIndexHtml; - bindf = 0; - test_file_protocol_url(index_url); - bindf = BINDF_FROMURLMON; - test_file_protocol_url(index_url); - bindf = BINDF_FROMURLMON | BINDF_NEEDFILE; - test_file_protocol_url(index_url); - - memcpy(buf, wszFile, sizeof(wszFile)); - len = sizeof(wszFile)/sizeof(WCHAR)-1; - len += GetCurrentDirectoryW(sizeof(buf)/sizeof(WCHAR)-len, buf+len); - buf[len++] = '\\'; - memcpy(buf+len, wszIndexHtml, sizeof(wszIndexHtml)); - - file_name = buf + sizeof(wszFile)/sizeof(WCHAR)-1; - bindf = 0; - test_file_protocol_url(buf); - bindf = BINDF_FROMURLMON; - test_file_protocol_url(buf); - - memcpy(buf, wszFile2, sizeof(wszFile2)); - len = GetCurrentDirectoryW(sizeof(file_name_buf)/sizeof(WCHAR), file_name_buf); - file_name_buf[len++] = '\\'; - memcpy(file_name_buf+len, wszIndexHtml, sizeof(wszIndexHtml)); - lstrcpyW(buf+sizeof(wszFile2)/sizeof(WCHAR)-1, file_name_buf); - file_name = file_name_buf; - bindf = 0; - test_file_protocol_url(buf); - bindf = BINDF_FROMURLMON; - test_file_protocol_url(buf); - - buf[sizeof(wszFile2)/sizeof(WCHAR)] = '|'; - test_file_protocol_url(buf); - - memcpy(buf, wszFile3, sizeof(wszFile3)); - len = sizeof(wszFile3)/sizeof(WCHAR)-1; - len += GetCurrentDirectoryW(sizeof(buf)/sizeof(WCHAR)-len, buf+len); - buf[len++] = '\\'; - memcpy(buf+len, wszIndexHtml, sizeof(wszIndexHtml)); - - file_name = buf + sizeof(wszFile3)/sizeof(WCHAR)-1; - bindf = 0; - test_file_protocol_url(buf); - bindf = BINDF_FROMURLMON; - test_file_protocol_url(buf); - - memcpy(buf, wszFile4, sizeof(wszFile4)); - len = GetCurrentDirectoryW(sizeof(file_name_buf)/sizeof(WCHAR), file_name_buf); - file_name_buf[len++] = '\\'; - memcpy(file_name_buf+len, wszIndexHtml, sizeof(wszIndexHtml)); - lstrcpyW(buf+sizeof(wszFile4)/sizeof(WCHAR)-1, file_name_buf); - file_name = file_name_buf; - bindf = 0; - test_file_protocol_url(buf); - bindf = BINDF_FROMURLMON; - test_file_protocol_url(buf); - - buf[sizeof(wszFile4)/sizeof(WCHAR)] = '|'; - test_file_protocol_url(buf); - - DeleteFileW(wszIndexHtml); - - bindf = 0; - test_file_protocol_fail(); - bindf = BINDF_FROMURLMON; - test_file_protocol_fail(); -} - -static BOOL http_protocol_start(LPCWSTR url, BOOL use_iuri) -{ - static BOOL got_user_agent = FALSE; - IUri *uri = NULL; - HRESULT hres; - - if(use_iuri && pCreateUri) { - hres = pCreateUri(url, 0, 0, &uri); - ok(hres == S_OK, "CreateUri failed: %08x\n", hres); - } - - SET_EXPECT(GetBindInfo); - if (!(bindf & BINDF_FROMURLMON)) - SET_EXPECT(ReportProgress_DIRECTBIND); - if(!got_user_agent) - SET_EXPECT(GetBindString_USER_AGENT); - SET_EXPECT(GetBindString_ACCEPT_MIMES); - SET_EXPECT(QueryService_HttpNegotiate); - SET_EXPECT(BeginningTransaction); - SET_EXPECT(GetRootSecurityId); - if(http_post_test) { - SET_EXPECT(GetBindString_POST_COOKIE); - if(http_post_test == TYMED_ISTREAM) - SET_EXPECT(Stream_Seek); - } - - if(uri) { - IInternetProtocolEx *protocolex; - - hres = IInternetProtocol_QueryInterface(async_protocol, &IID_IInternetProtocolEx, (void**)&protocolex); - ok(hres == S_OK, "Could not get IInternetProtocolEx iface: %08x\n", hres); - - hres = IInternetProtocolEx_StartEx(protocolex, uri, &protocol_sink, &bind_info, 0, 0); - ok(hres == S_OK, "Start failed: %08x\n", hres); - - IInternetProtocolEx_Release(protocolex); - IUri_Release(uri); - }else { - hres = IInternetProtocol_Start(async_protocol, url, &protocol_sink, &bind_info, 0, 0); - ok(hres == S_OK, "Start failed: %08x\n", hres); - } - if(FAILED(hres)) - return FALSE; - - CHECK_CALLED(GetBindInfo); - if (!(bindf & BINDF_FROMURLMON)) - CHECK_CALLED(ReportProgress_DIRECTBIND); - if (!got_user_agent) - { - CHECK_CALLED(GetBindString_USER_AGENT); - got_user_agent = TRUE; - } - CHECK_CALLED(GetBindString_ACCEPT_MIMES); - CHECK_CALLED(QueryService_HttpNegotiate); - CHECK_CALLED(BeginningTransaction); - /* GetRootSecurityId called on WinXP but not on Win98 */ - CLEAR_CALLED(GetRootSecurityId); - if(http_post_test) { - CHECK_CALLED(GetBindString_POST_COOKIE); - if(http_post_test == TYMED_ISTREAM) - CHECK_CALLED(Stream_Seek); - } - - return TRUE; -} - -static void test_protocol_terminate(IInternetProtocol *protocol) -{ - BYTE buf[3600]; - DWORD cb; - HRESULT hres; - - hres = IInternetProtocol_LockRequest(protocol, 0); - ok(hres == S_OK, "LockRequest failed: %08x\n", hres); - - hres = IInternetProtocol_Read(protocol, buf, 1, &cb); - ok(hres == test_abort ? S_OK : S_FALSE, "Read failed: %08x\n", hres); - - hres = IInternetProtocol_Terminate(protocol, 0); - ok(hres == S_OK, "Terminate failed: %08x\n", hres); - - /* This wait is to give the internet handles being freed in Terminate - * enough time to actually terminate in all cases. Internet handles - * terminate asynchronously and native reuses the main InternetOpen - * handle. The only case in which this seems to be necessary is on - * wine with native wininet and urlmon, resulting in the next time - * test_http_protocol_url being called the first data notification actually - * being an extra last data notification from the previous connection - * about once out of every ten times. */ - Sleep(100); - - hres = IInternetProtocol_UnlockRequest(protocol); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); -} - -static void test_http_info(IInternetProtocol *protocol) -{ - IWinInetHttpInfo *info; - HRESULT hres; - - hres = IInternetProtocol_QueryInterface(protocol, &IID_IWinInetHttpInfo, (void**)&info); - ok(hres == S_OK, "Could not get IWinInterHttpInfo iface: %08x\n", hres); - - /* TODO */ - - IWinInetHttpInfo_Release(info); -} - -/* is_first refers to whether this is the first call to this function - * _for this url_ */ -static void test_http_protocol_url(LPCWSTR url, int prot, DWORD flags, DWORD tymed) -{ - IInternetProtocolInfo *protocol_info; - IClassFactory *factory; - IUnknown *unk; - HRESULT hres; - - init_test(prot, flags); - http_url = url; - http_post_test = tymed; - - hres = CoGetClassObject(prot == HTTPS_TEST ? &CLSID_HttpSProtocol : &CLSID_HttpProtocol, - CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk); - ok(hres == S_OK, "CoGetClassObject failed: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (void**)&protocol_info); - ok(hres == E_NOINTERFACE, - "Could not get IInternetProtocolInfo interface: %08x, expected E_NOINTERFACE\n", - hres); - - hres = IUnknown_QueryInterface(unk, &IID_IClassFactory, (void**)&factory); - ok(hres == S_OK, "Could not get IClassFactory interface\n"); - IUnknown_Release(unk); - if(FAILED(hres)) - return; - - hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, - (void**)&async_protocol); - ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); - if(SUCCEEDED(hres)) { - BYTE buf[3600]; - DWORD cb; - ULONG ref; - - test_priority(async_protocol); - test_http_info(async_protocol); - - SET_EXPECT(ReportProgress_COOKIE_SENT); - if(http_is_first) { - SET_EXPECT(ReportProgress_FINDINGRESOURCE); - SET_EXPECT(ReportProgress_CONNECTING); - } - SET_EXPECT(ReportProgress_SENDINGREQUEST); - if(test_redirect) - SET_EXPECT(ReportProgress_REDIRECTING); - SET_EXPECT(ReportProgress_PROXYDETECTING); - if(prot == HTTP_TEST) - SET_EXPECT(ReportProgress_CACHEFILENAMEAVAILABLE); - else - SET_EXPECT(QueryService_HttpSecurity); - if(!(bindf & BINDF_FROMURLMON)) { - SET_EXPECT(OnResponse); - SET_EXPECT(ReportProgress_RAWMIMETYPE); - SET_EXPECT(ReportData); - } else { - SET_EXPECT(Switch); - } - - if(!http_protocol_start(url, (flags & TEST_USEIURI) != 0)) - return; - - if(!direct_read && !test_abort) - SET_EXPECT(ReportResult); - expect_hrResult = test_abort ? E_ABORT : S_OK; - - if(direct_read) { - SET_EXPECT(Switch); - while(wait_for_switch) { - WaitForSingleObject(event_continue, INFINITE); - CHECK_CALLED(Switch); /* Set in ReportData */ - call_continue(&continue_protdata); - SetEvent(event_continue_done); - } - }else { - hres = IInternetProtocol_Read(async_protocol, buf, 1, &cb); - ok((hres == E_PENDING && cb==0) || - (hres == S_OK && cb==1), "Read failed: %08x (%d bytes)\n", hres, cb); - - WaitForSingleObject(event_complete, INFINITE); - if(bindf & BINDF_FROMURLMON) - CHECK_CALLED(Switch); - else - CHECK_CALLED(ReportData); - if(prot == HTTPS_TEST) - CLEAR_CALLED(QueryService_HttpSecurity); - - while(1) { - if(bindf & BINDF_FROMURLMON) - SET_EXPECT(Switch); - else - SET_EXPECT(ReportData); - hres = IInternetProtocol_Read(async_protocol, buf, sizeof(buf), &cb); - if(hres == E_PENDING) { - hres = IInternetProtocol_Read(async_protocol, buf, 1, &cb); - ok((hres == E_PENDING && cb==0) || - (hres == S_OK && cb==1), "Read failed: %08x (%d bytes)\n", hres, cb); - WaitForSingleObject(event_complete, INFINITE); - if(bindf & BINDF_FROMURLMON) - CHECK_CALLED(Switch); - else - CHECK_CALLED(ReportData); - - if(test_abort) { - HRESULT hres; - - SET_EXPECT(ReportResult); - hres = IInternetProtocol_Abort(async_protocol, E_ABORT, 0); - ok(hres == S_OK, "Abort failed: %08x\n", hres); - CHECK_CALLED(ReportResult); - - hres = IInternetProtocol_Abort(async_protocol, E_ABORT, 0); - ok(hres == INET_E_RESULT_DISPATCHED, "Abort failed: %08x\n", hres); - break; - } - }else { - if(bindf & BINDF_FROMURLMON) - CHECK_NOT_CALLED(Switch); - else - CHECK_NOT_CALLED(ReportData); - if(cb == 0) break; - } - } - if(!test_abort) { - ok(hres == S_FALSE, "Read failed: %08x\n", hres); - CHECK_CALLED(ReportResult); - } - } - if(prot == HTTPS_TEST) - CLEAR_CALLED(ReportProgress_SENDINGREQUEST); - - hres = IInternetProtocol_Abort(async_protocol, E_ABORT, 0); - ok(hres == INET_E_RESULT_DISPATCHED, "Abort failed: %08x\n", hres); - - test_protocol_terminate(async_protocol); - - hres = IInternetProtocol_Abort(async_protocol, E_ABORT, 0); - ok(hres == S_OK, "Abort failed: %08x\n", hres); - - ref = IInternetProtocol_Release(async_protocol); - ok(!ref, "ref=%x\n", ref); - } - - IClassFactory_Release(factory); -} - -static void test_http_protocol(void) -{ - static const WCHAR posttest_url[] = - {'h','t','t','p',':','/','/','t','e','s','t','.','w','i','n','e','h','q','.','o','r','g','/', - 't','e','s','t','s','/','p','o','s','t','.','p','h','p',0}; - static const WCHAR redirect_url[] = - {'h','t','t','p',':','/','/','t','e','s','t','.','w','i','n','e','h','q','.','o','r','g','/', - 't','e','s','t','s','/','r','e','d','i','r','e','c','t',0}; - static const WCHAR winetest_url[] = - {'h','t','t','p',':','/','/','t','e','s','t','.','w','i','n','e','h','q','.','o','r','g','/', - 't','e','s','t','s','/','d','a','t','a','.','p','h','p',0}; - - trace("Testing http protocol (not from urlmon)...\n"); - bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA; - test_http_protocol_url(winetest_url, HTTP_TEST, TEST_FIRST_HTTP, TYMED_NULL); - - trace("Testing http protocol (from urlmon)...\n"); - bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON; - test_http_protocol_url(winetest_url, HTTP_TEST, 0, TYMED_NULL); - - trace("Testing http protocol (to file)...\n"); - bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON | BINDF_NEEDFILE; - test_http_protocol_url(winetest_url, HTTP_TEST, 0, TYMED_NULL); - - trace("Testing http protocol (post data)...\n"); - bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON; - test_http_protocol_url(posttest_url, HTTP_TEST, TEST_FIRST_HTTP|TEST_POST, TYMED_HGLOBAL); - - trace("Testing http protocol (post data stream)...\n"); - test_http_protocol_url(posttest_url, HTTP_TEST, TEST_FIRST_HTTP|TEST_POST|TEST_ASYNCREQ, TYMED_ISTREAM); - - trace("Testing http protocol (direct read)...\n"); - bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON; - test_http_protocol_url(winetest_url, HTTP_TEST, TEST_DIRECT_READ|TEST_USEIURI, TYMED_NULL); - - trace("Testing http protocol (redirected)...\n"); - bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON; - test_http_protocol_url(redirect_url, HTTP_TEST, TEST_REDIRECT, TYMED_NULL); - - trace("Testing http protocol abort...\n"); - test_http_protocol_url(winetest_url, HTTP_TEST, TEST_ABORT, TYMED_NULL); - - test_early_abort(&CLSID_HttpProtocol); - test_early_abort(&CLSID_HttpSProtocol); -} - -static void test_https_protocol(void) -{ - static const WCHAR codeweavers_url[] = - {'h','t','t','p','s',':','/','/','w','w','w','.','c','o','d','e','w','e','a','v','e','r','s', - '.','c','o','m','/','t','e','s','t','.','h','t','m','l',0}; - - trace("Testing https protocol (from urlmon)...\n"); - bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON | BINDF_NOWRITECACHE; - test_http_protocol_url(codeweavers_url, HTTPS_TEST, TEST_FIRST_HTTP, TYMED_NULL); -} - - -static void test_ftp_protocol(void) -{ - IInternetProtocolInfo *protocol_info; - IClassFactory *factory; - IUnknown *unk; - BYTE buf[4096]; - ULONG ref; - DWORD cb; - HRESULT hres; - - static const WCHAR ftp_urlW[] = {'f','t','p',':','/','/','f','t','p','.','w','i','n','e','h','q','.','o','r','g', - '/','p','u','b','/','o','t','h','e','r','/', - 'w','i','n','e','l','o','g','o','.','x','c','f','.','t','a','r','.','b','z','2',0}; - - trace("Testing ftp protocol...\n"); - - bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON | BINDF_NOWRITECACHE; - state = STATE_STARTDOWNLOADING; - tested_protocol = FTP_TEST; - first_data_notif = TRUE; - expect_hrResult = E_PENDING; - - hres = CoGetClassObject(&CLSID_FtpProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk); - ok(hres == S_OK, "CoGetClassObject failed: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (void**)&protocol_info); - ok(hres == E_NOINTERFACE, "Could not get IInternetProtocolInfo interface: %08x, expected E_NOINTERFACE\n", hres); - - hres = IUnknown_QueryInterface(unk, &IID_IClassFactory, (void**)&factory); - ok(hres == S_OK, "Could not get IClassFactory interface\n"); - IUnknown_Release(unk); - if(FAILED(hres)) - return; - - hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, - (void**)&async_protocol); - IClassFactory_Release(factory); - ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); - - test_priority(async_protocol); - test_http_info(async_protocol); - - SET_EXPECT(GetBindInfo); - SET_EXPECT(ReportProgress_FINDINGRESOURCE); - SET_EXPECT(ReportProgress_CONNECTING); - SET_EXPECT(ReportProgress_SENDINGREQUEST); - SET_EXPECT(Switch); - - hres = IInternetProtocol_Start(async_protocol, ftp_urlW, &protocol_sink, &bind_info, 0, 0); - ok(hres == S_OK, "Start failed: %08x\n", hres); - CHECK_CALLED(GetBindInfo); - - SET_EXPECT(ReportResult); - - hres = IInternetProtocol_Read(async_protocol, buf, 1, &cb); - ok((hres == E_PENDING && cb==0) || - (hres == S_OK && cb==1), "Read failed: %08x (%d bytes)\n", hres, cb); - - WaitForSingleObject(event_complete, INFINITE); - - while(1) { - hres = IInternetProtocol_Read(async_protocol, buf, sizeof(buf), &cb); - if(hres == E_PENDING) - WaitForSingleObject(event_complete, INFINITE); - else - if(cb == 0) break; - } - - ok(hres == S_FALSE, "Read failed: %08x\n", hres); - CHECK_CALLED(ReportResult); - CHECK_CALLED(Switch); - - test_protocol_terminate(async_protocol); - - if(pCreateUri) { - IInternetProtocolEx *protocolex; - - hres = IInternetProtocol_QueryInterface(async_protocol, &IID_IInternetProtocolEx, (void**)&protocolex); - ok(hres == S_OK, "Could not get IInternetProtocolEx iface: %08x\n", hres); - IInternetProtocolEx_Release(protocolex); - } - - ref = IInternetProtocol_Release(async_protocol); - ok(!ref, "ref=%d\n", ref); - - test_early_abort(&CLSID_FtpProtocol); -} - -static void test_gopher_protocol(void) -{ - IInternetProtocolInfo *protocol_info; - IClassFactory *factory; - IUnknown *unk; - HRESULT hres; - - trace("Testing gopher protocol...\n"); - - hres = CoGetClassObject(&CLSID_GopherProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk); - ok(hres == S_OK || - hres == REGDB_E_CLASSNOTREG, /* Gopher protocol has been removed as of Vista */ - "CoGetClassObject failed: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (void**)&protocol_info); - ok(hres == E_NOINTERFACE, "Could not get IInternetProtocolInfo interface: %08x, expected E_NOINTERFACE\n", hres); - - hres = IUnknown_QueryInterface(unk, &IID_IClassFactory, (void**)&factory); - ok(hres == S_OK, "Could not get IClassFactory interface\n"); - IUnknown_Release(unk); - if(FAILED(hres)) - return; - - hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, - (void**)&async_protocol); - IClassFactory_Release(factory); - ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); - - test_priority(async_protocol); - - IInternetProtocol_Release(async_protocol); - - test_early_abort(&CLSID_GopherProtocol); -} - -static void test_mk_protocol(void) -{ - IInternetProtocolInfo *protocol_info; - IInternetProtocol *protocol; - IClassFactory *factory; - IUnknown *unk; - HRESULT hres; - - static const WCHAR wrong_url1[] = {'t','e','s','t',':','@','M','S','I','T','S','t','o','r','e', - ':',':','/','t','e','s','t','.','h','t','m','l',0}; - static const WCHAR wrong_url2[] = {'m','k',':','/','t','e','s','t','.','h','t','m','l',0}; - - trace("Testing mk protocol...\n"); - init_test(MK_TEST, 0); - - hres = CoGetClassObject(&CLSID_MkProtocol, CLSCTX_INPROC_SERVER, NULL, - &IID_IUnknown, (void**)&unk); - ok(hres == S_OK, "CoGetClassObject failed: %08x\n", hres); - - hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (void**)&protocol_info); - ok(hres == E_NOINTERFACE, - "Could not get IInternetProtocolInfo interface: %08x, expected E_NOINTERFACE\n", - hres); - - hres = IUnknown_QueryInterface(unk, &IID_IClassFactory, (void**)&factory); - ok(hres == S_OK, "Could not get IClassFactory interface\n"); - IUnknown_Release(unk); - if(FAILED(hres)) - return; - - hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, - (void**)&protocol); - IClassFactory_Release(factory); - ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); - - SET_EXPECT(GetBindInfo); - hres = IInternetProtocol_Start(protocol, wrong_url1, &protocol_sink, &bind_info, 0, 0); - ok(hres == MK_E_SYNTAX || hres == INET_E_INVALID_URL, - "Start failed: %08x, expected MK_E_SYNTAX or INET_E_INVALID_URL\n", hres); - CLEAR_CALLED(GetBindInfo); - - SET_EXPECT(GetBindInfo); - SET_EXPECT(ReportProgress_DIRECTBIND); - SET_EXPECT(ReportProgress_SENDINGREQUEST); - SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE); - SET_EXPECT(ReportResult); - expect_hrResult = INET_E_RESOURCE_NOT_FOUND; - - hres = IInternetProtocol_Start(protocol, wrong_url2, &protocol_sink, &bind_info, 0, 0); - ok(hres == INET_E_RESOURCE_NOT_FOUND || - hres == INET_E_INVALID_URL, /* win2k3 */ - "Start failed: %08x, expected INET_E_RESOURCE_NOT_FOUND or INET_E_INVALID_URL\n", hres); - - if (hres == INET_E_RESOURCE_NOT_FOUND) { - CHECK_CALLED(GetBindInfo); - CLEAR_CALLED(ReportProgress_DIRECTBIND); - CHECK_CALLED(ReportProgress_SENDINGREQUEST); - CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE); - CHECK_CALLED(ReportResult); - }else { - CLEAR_CALLED(GetBindInfo); - CLEAR_CALLED(ReportProgress_DIRECTBIND); - CLEAR_CALLED(ReportProgress_SENDINGREQUEST); - CLEAR_CALLED(ReportProgress_MIMETYPEAVAILABLE); - CLEAR_CALLED(ReportResult); - } - - IInternetProtocol_Release(protocol); -} - -static void test_CreateBinding(void) -{ - IInternetProtocol *protocol; - IInternetPriority *priority; - IInternetSession *session; - IWinInetHttpInfo *http_info; - IWinInetInfo *inet_info; - LONG p; - BYTE buf[1000]; - DWORD read; - HRESULT hres; - - static const WCHAR test_url[] = - {'t','e','s','t',':','/','/','f','i','l','e','.','h','t','m','l',0}; - static const WCHAR wsz_test[] = {'t','e','s','t',0}; - - trace("Testing CreateBinding...\n"); - init_test(BIND_TEST, TEST_BINDING); - - hres = pCoInternetGetSession(0, &session, 0); - ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres); - - hres = IInternetSession_RegisterNameSpace(session, &ClassFactory, &IID_NULL, wsz_test, 0, NULL, 0); - ok(hres == S_OK, "RegisterNameSpace failed: %08x\n", hres); - - hres = IInternetSession_CreateBinding(session, NULL, test_url, NULL, NULL, &protocol, 0); - binding_protocol = protocol; - ok(hres == S_OK, "CreateBinding failed: %08x\n", hres); - ok(protocol != NULL, "protocol == NULL\n"); - - hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetBindInfo, (void**)&prot_bind_info); - ok(hres == S_OK, "QueryInterface(IID_IInternetBindInfo) failed: %08x\n", hres); - - hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetProtocolSink, (void**)&binding_sink); - ok(hres == S_OK, "Could not get IInternetProtocolSink: %08x\n", hres); - - hres = IInternetProtocol_Start(protocol, test_url, NULL, &bind_info, 0, 0); - ok(hres == E_INVALIDARG, "Start failed: %08x, expected E_INVALIDARG\n", hres); - hres = IInternetProtocol_Start(protocol, test_url, &protocol_sink, NULL, 0, 0); - ok(hres == E_INVALIDARG, "Start failed: %08x, expected E_INVALIDARG\n", hres); - hres = IInternetProtocol_Start(protocol, NULL, &protocol_sink, &bind_info, 0, 0); - ok(hres == E_INVALIDARG, "Start failed: %08x, expected E_INVALIDARG\n", hres); - - hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetPriority, (void**)&priority); - ok(hres == S_OK, "QueryInterface(IID_IInternetPriority) failed: %08x\n", hres); - - p = 0xdeadbeef; - hres = IInternetPriority_GetPriority(priority, &p); - ok(hres == S_OK, "GetPriority failed: %08x\n", hres); - ok(!p, "p=%d\n", p); - - ex_priority = 100; - hres = IInternetPriority_SetPriority(priority, 100); - ok(hres == S_OK, "SetPriority failed: %08x\n", hres); - - p = 0xdeadbeef; - hres = IInternetPriority_GetPriority(priority, &p); - ok(hres == S_OK, "GetPriority failed: %08x\n", hres); - ok(p == 100, "p=%d\n", p); - - hres = IInternetProtocol_QueryInterface(protocol, &IID_IWinInetInfo, (void**)&inet_info); - ok(hres == E_NOINTERFACE, "Could not get IWinInetInfo protocol: %08x\n", hres); - - SET_EXPECT(QueryService_InternetProtocol); - SET_EXPECT(CreateInstance); - SET_EXPECT(ReportProgress_PROTOCOLCLASSID); - SET_EXPECT(SetPriority); - SET_EXPECT(Start); - - expect_hrResult = S_OK; - hres = IInternetProtocol_Start(protocol, test_url, &protocol_sink, &bind_info, 0, 0); - ok(hres == S_OK, "Start failed: %08x\n", hres); - - CHECK_CALLED(QueryService_InternetProtocol); - CHECK_CALLED(CreateInstance); - CHECK_CALLED(ReportProgress_PROTOCOLCLASSID); - CHECK_CALLED(SetPriority); - CHECK_CALLED(Start); - - SET_EXPECT(QueryInterface_IWinInetInfo); - hres = IInternetProtocol_QueryInterface(protocol, &IID_IWinInetInfo, (void**)&inet_info); - ok(hres == E_NOINTERFACE, "Could not get IWinInetInfo protocol: %08x\n", hres); - CHECK_CALLED(QueryInterface_IWinInetInfo); - - SET_EXPECT(QueryInterface_IWinInetInfo); - hres = IInternetProtocol_QueryInterface(protocol, &IID_IWinInetInfo, (void**)&inet_info); - ok(hres == E_NOINTERFACE, "Could not get IWinInetInfo protocol: %08x\n", hres); - CHECK_CALLED(QueryInterface_IWinInetInfo); - - SET_EXPECT(QueryInterface_IWinInetHttpInfo); - hres = IInternetProtocol_QueryInterface(protocol, &IID_IWinInetHttpInfo, (void**)&http_info); - ok(hres == E_NOINTERFACE, "Could not get IWinInetInfo protocol: %08x\n", hres); - CHECK_CALLED(QueryInterface_IWinInetHttpInfo); - - SET_EXPECT(Read); - read = 0xdeadbeef; - hres = IInternetProtocol_Read(protocol, expect_pv = buf, sizeof(buf), &read); - ok(hres == S_OK, "Read failed: %08x\n", hres); - ok(read == 100, "read = %d\n", read); - CHECK_CALLED(Read); - - SET_EXPECT(Read); - read = 0xdeadbeef; - hres = IInternetProtocol_Read(protocol, expect_pv = buf, sizeof(buf), &read); - ok(hres == S_FALSE, "Read failed: %08x\n", hres); - ok(!read, "read = %d\n", read); - CHECK_CALLED(Read); - - p = 0xdeadbeef; - hres = IInternetPriority_GetPriority(priority, &p); - ok(hres == S_OK, "GetPriority failed: %08x\n", hres); - ok(p == 100, "p=%d\n", p); - - hres = IInternetPriority_SetPriority(priority, 101); - ok(hres == S_OK, "SetPriority failed: %08x\n", hres); - - SET_EXPECT(Terminate); - hres = IInternetProtocol_Terminate(protocol, 0xdeadbeef); - ok(hres == S_OK, "Terminate failed: %08x\n", hres); - CHECK_CALLED(Terminate); - - SET_EXPECT(Continue); - hres = IInternetProtocolSink_Switch(binding_sink, &protocoldata); - ok(hres == S_OK, "Switch failed: %08x\n", hres); - CHECK_CALLED(Continue); - - hres = IInternetProtocolSink_ReportProgress(binding_sink, - BINDSTATUS_CACHEFILENAMEAVAILABLE, expect_wsz = emptyW); - ok(hres == S_OK, "ReportProgress(BINDSTATUS_CACHEFILENAMEAVAILABLE) failed: %08x\n", hres); - - hres = IInternetProtocolSink_ReportResult(binding_sink, S_OK, ERROR_SUCCESS, NULL); - ok(hres == E_FAIL, "ReportResult failed: %08x, expected E_FAIL\n", hres); - - hres = IInternetProtocolSink_ReportData(binding_sink, 0, 0, 0); - ok(hres == S_OK, "ReportData failed: %08x\n", hres); - - IInternetProtocolSink_Release(binding_sink); - IInternetPriority_Release(priority); - IInternetBindInfo_Release(prot_bind_info); - IInternetProtocol_Release(protocol); - - hres = IInternetSession_CreateBinding(session, NULL, test_url, NULL, NULL, &protocol, 0); - ok(hres == S_OK, "CreateBinding failed: %08x\n", hres); - ok(protocol != NULL, "protocol == NULL\n"); - - hres = IInternetProtocol_Abort(protocol, E_ABORT, 0); - ok(hres == S_OK, "Abort failed: %08x\n", hres); - - hres = IInternetProtocol_Abort(protocol, E_FAIL, 0); - ok(hres == S_OK, "Abort failed: %08x\n", hres); - - IInternetProtocol_Release(protocol); - - hres = IInternetSession_UnregisterNameSpace(session, &ClassFactory, wsz_test); - ok(hres == S_OK, "UnregisterNameSpace failed: %08x\n", hres); - - hres = IInternetSession_CreateBinding(session, NULL, test_url, NULL, NULL, &protocol, 0); - ok(hres == S_OK, "CreateBinding failed: %08x\n", hres); - ok(protocol != NULL, "protocol == NULL\n"); - - SET_EXPECT(QueryService_InternetProtocol); - hres = IInternetProtocol_Start(protocol, test_url, &protocol_sink, &bind_info, 0, 0); - ok(hres == MK_E_SYNTAX, "Start failed: %08x, expected MK_E_SYNTAX\n", hres); - CHECK_CALLED(QueryService_InternetProtocol); - - IInternetProtocol_Release(protocol); - - IInternetSession_Release(session); -} - -static void test_binding(int prot, DWORD grf_pi, DWORD test_flags) -{ - IInternetProtocolEx *protocolex = NULL; - IInternetProtocol *protocol; - IInternetSession *session; - IUri *uri = NULL; - ULONG ref; - HRESULT hres; - - pi = grf_pi; - - init_test(prot, test_flags|TEST_BINDING); - - hres = pCoInternetGetSession(0, &session, 0); - ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres); - - if(test_flags & TEST_EMULATEPROT) { - hres = IInternetSession_RegisterNameSpace(session, &ClassFactory, &IID_NULL, protocol_names[prot], 0, NULL, 0); - ok(hres == S_OK, "RegisterNameSpace failed: %08x\n", hres); - } - - hres = IInternetSession_CreateBinding(session, NULL, binding_urls[prot], NULL, NULL, &protocol, 0); - binding_protocol = protocol; - ok(hres == S_OK, "CreateBinding failed: %08x\n", hres); - ok(protocol != NULL, "protocol == NULL\n"); - - hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetBindInfo, (void**)&prot_bind_info); - ok(hres == S_OK, "QueryInterface(IID_IInternetBindInfo) failed: %08x\n", hres); - - hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetProtocolSink, (void**)&binding_sink); - ok(hres == S_OK, "QueryInterface(IID_IInternetProtocolSink) failed: %08x\n", hres); - - if(test_flags & TEST_USEIURI) { - hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetProtocolEx, (void**)&protocolex); - ok(hres == S_OK, "Could not get IInternetProtocolEx iface: %08x\n", hres); - - hres = pCreateUri(binding_urls[prot], Uri_CREATE_FILE_USE_DOS_PATH, 0, &uri); - ok(hres == S_OK, "CreateUri failed: %08x\n", hres); - } - - ex_priority = 0; - SET_EXPECT(QueryService_InternetProtocol); - SET_EXPECT(CreateInstance); - SET_EXPECT(ReportProgress_PROTOCOLCLASSID); - SET_EXPECT(SetPriority); - if(impl_protex) - SET_EXPECT(StartEx); - else - SET_EXPECT(Start); - - expect_hrResult = S_OK; - - if(protocolex) { - hres = IInternetProtocolEx_StartEx(protocolex, uri, &protocol_sink, &bind_info, pi, 0); - ok(hres == S_OK, "StartEx failed: %08x\n", hres); - }else { - hres = IInternetProtocol_Start(protocol, binding_urls[prot], &protocol_sink, &bind_info, pi, 0); - ok(hres == S_OK, "Start failed: %08x\n", hres); - } - - CHECK_CALLED(QueryService_InternetProtocol); - CHECK_CALLED(CreateInstance); - CHECK_CALLED(ReportProgress_PROTOCOLCLASSID); - CHECK_CALLED(SetPriority); - if(impl_protex) - CHECK_CALLED(StartEx); - else - CHECK_CALLED(Start); - - if(protocolex) - IInternetProtocolEx_Release(protocolex); - if(uri) - IUri_Release(uri); - - if(prot == HTTP_TEST || prot == HTTPS_TEST) { - while(prot_state < 4) { - WaitForSingleObject(event_complete, INFINITE); - if(mimefilter_test && filtered_protocol) { - SET_EXPECT(Continue); - IInternetProtocol_Continue(filtered_protocol, pdata); - CHECK_CALLED(Continue); - }else { - SET_EXPECT(Continue); - IInternetProtocol_Continue(protocol, pdata); - CHECK_CALLED(Continue); - } - if(test_abort && prot_state == 2) { - SET_EXPECT(Abort); - hres = IInternetProtocol_Abort(protocol, E_ABORT, 0); - ok(hres == S_OK, "Abort failed: %08x\n", hres); - CHECK_CALLED(Abort); - - hres = IInternetProtocol_Abort(protocol, E_ABORT, 0); - ok(hres == S_OK, "Abort failed: %08x\n", hres); - SetEvent(event_complete2); - break; - } - SetEvent(event_complete2); - } - if(direct_read) - CHECK_CALLED(ReportData); /* Set in ReportResult */ - WaitForSingleObject(event_complete, INFINITE); - }else { - if(mimefilter_test) - SET_EXPECT(MimeFilter_LockRequest); - else - SET_EXPECT(LockRequest); - hres = IInternetProtocol_LockRequest(protocol, 0); - ok(hres == S_OK, "LockRequest failed: %08x\n", hres); - if(mimefilter_test) - CHECK_CALLED(MimeFilter_LockRequest); - else - CHECK_CALLED(LockRequest); - - if(mimefilter_test) - SET_EXPECT(MimeFilter_UnlockRequest); - else - SET_EXPECT(UnlockRequest); - hres = IInternetProtocol_UnlockRequest(protocol); - ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres); - if(mimefilter_test) - CHECK_CALLED(MimeFilter_UnlockRequest); - else - CHECK_CALLED(UnlockRequest); - } - - if(mimefilter_test) - SET_EXPECT(MimeFilter_Terminate); - else - SET_EXPECT(Terminate); - hres = IInternetProtocol_Terminate(protocol, 0); - ok(hres == S_OK, "Terminate failed: %08x\n", hres); - if(mimefilter_test) - CLEAR_CALLED(MimeFilter_Terminate); - else - CHECK_CALLED(Terminate); - - if(filtered_protocol) - IInternetProtocol_Release(filtered_protocol); - IInternetBindInfo_Release(prot_bind_info); - IInternetProtocolSink_Release(binding_sink); - ref = IInternetProtocol_Release(protocol); - ok(!ref, "ref=%u, expected 0\n", ref); - - if(test_flags & TEST_EMULATEPROT) { - hres = IInternetSession_UnregisterNameSpace(session, &ClassFactory, protocol_names[prot]); - ok(hres == S_OK, "UnregisterNameSpace failed: %08x\n", hres); - } - - IInternetSession_Release(session); -} - -START_TEST(protocol) -{ - HMODULE hurlmon; - - if(!winetest_interactive) - { - skip("protocol test skipped, bug 6381\n"); - return; - } - - hurlmon = GetModuleHandle("urlmon.dll"); - pCoInternetGetSession = (void*) GetProcAddress(hurlmon, "CoInternetGetSession"); - pReleaseBindInfo = (void*) GetProcAddress(hurlmon, "ReleaseBindInfo"); - pCreateUri = (void*) GetProcAddress(hurlmon, "CreateUri"); - - if(!GetProcAddress(hurlmon, "CompareSecurityIds")) { - win_skip("Various needed functions not present, too old IE\n"); - return; - } - - if(!pCreateUri) - win_skip("CreateUri not supported\n"); - - OleInitialize(NULL); - - event_complete = CreateEvent(NULL, FALSE, FALSE, NULL); - event_complete2 = CreateEvent(NULL, FALSE, FALSE, NULL); - event_continue = CreateEvent(NULL, FALSE, FALSE, NULL); - event_continue_done = CreateEvent(NULL, FALSE, FALSE, NULL); - thread_id = GetCurrentThreadId(); - - test_file_protocol(); - test_http_protocol(); - test_https_protocol(); - test_ftp_protocol(); - test_gopher_protocol(); - test_mk_protocol(); - test_CreateBinding(); - - bindf &= ~BINDF_FROMURLMON; - trace("Testing file binding (mime verification, emulate prot)...\n"); - test_binding(FILE_TEST, PI_MIMEVERIFICATION, TEST_EMULATEPROT); - trace("Testing http binding (mime verification, emulate prot)...\n"); - test_binding(HTTP_TEST, PI_MIMEVERIFICATION, TEST_EMULATEPROT); - trace("Testing its binding (mime verification, emulate prot)...\n"); - test_binding(ITS_TEST, PI_MIMEVERIFICATION, TEST_EMULATEPROT); - trace("Testing http binding (mime verification, emulate prot, short read, direct read)...\n"); - test_binding(HTTP_TEST, PI_MIMEVERIFICATION, TEST_EMULATEPROT|TEST_SHORT_READ|TEST_DIRECT_READ); - trace("Testing file binding (mime verification, emulate prot, mime filter)...\n"); - test_binding(FILE_TEST, PI_MIMEVERIFICATION, TEST_EMULATEPROT|TEST_FILTER); - trace("Testing http binding (mime verification, emulate prot, mime filter)...\n"); - test_binding(HTTP_TEST, PI_MIMEVERIFICATION, TEST_EMULATEPROT|TEST_FILTER); - trace("Testing http binding (mime verification, emulate prot, direct read)...\n"); - test_binding(HTTP_TEST, PI_MIMEVERIFICATION, TEST_EMULATEPROT|TEST_DIRECT_READ); - trace("Testing http binding (mime verification, emulate prot, abort)...\n"); - test_binding(HTTP_TEST, PI_MIMEVERIFICATION, TEST_EMULATEPROT|TEST_ABORT); - if(pCreateUri) { - trace("Testing file binding (use IUri, mime verification, emulate prot)...\n"); - test_binding(FILE_TEST, PI_MIMEVERIFICATION, TEST_EMULATEPROT|TEST_USEIURI); - trace("Testing file binding (use IUri, impl StartEx, mime verification, emulate prot)...\n"); - test_binding(FILE_TEST, PI_MIMEVERIFICATION, TEST_EMULATEPROT|TEST_USEIURI|TEST_IMPLPROTEX); - trace("Testing file binding (impl StartEx, mime verification, emulate prot)...\n"); - test_binding(FILE_TEST, PI_MIMEVERIFICATION, TEST_EMULATEPROT|TEST_IMPLPROTEX); - } - - CloseHandle(event_complete); - CloseHandle(event_complete2); - CloseHandle(event_continue); - CloseHandle(event_continue_done); - - OleUninitialize(); -} diff --git a/rostests/winetests/urlmon/sec_mgr.c b/rostests/winetests/urlmon/sec_mgr.c deleted file mode 100644 index c64dfe40f01..00000000000 --- a/rostests/winetests/urlmon/sec_mgr.c +++ /dev/null @@ -1,1663 +0,0 @@ -/* - * Copyright 2005-2006 Jacek Caban for CodeWeavers - * Copyright 2009-2011 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 - * 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 - -/* needed for IInternetZoneManagerEx2 */ -#define _WIN32_IE 0x0700 - -#include -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "ole2.h" -#include "urlmon.h" - -#include "initguid.h" - -#define URLZONE_CUSTOM URLZONE_USER_MIN+1 -#define URLZONE_CUSTOM2 URLZONE_CUSTOM+1 - -#define DEFINE_EXPECT(func) \ - static BOOL expect_ ## func = FALSE, called_ ## func = FALSE - -#define SET_EXPECT(func) \ - expect_ ## func = TRUE - -#define CHECK_EXPECT(func) \ - do { \ - ok(expect_ ##func, "unexpected call " #func "\n"); \ - expect_ ## func = FALSE; \ - called_ ## func = TRUE; \ - }while(0) - -#define CHECK_EXPECT2(func) \ - do { \ - ok(expect_ ##func, "unexpected call " #func "\n"); \ - called_ ## func = TRUE; \ - }while(0) - -#define CHECK_CALLED(func) \ - do { \ - ok(called_ ## func, "expected " #func "\n"); \ - expect_ ## func = called_ ## func = FALSE; \ - }while(0) - -DEFINE_EXPECT(ParseUrl_SECURITY_URL_input); -DEFINE_EXPECT(ParseUrl_SECURITY_URL_input2); -DEFINE_EXPECT(ParseUrl_SECURITY_URL_expected); -DEFINE_EXPECT(ParseUrl_SECURITY_URL_http); -DEFINE_EXPECT(ParseUrl_SECURITY_DOMAIN_expected); - -static HRESULT (WINAPI *pCoInternetCreateSecurityManager)(IServiceProvider *, IInternetSecurityManager**, DWORD); -static HRESULT (WINAPI *pCoInternetCreateZoneManager)(IServiceProvider *, IInternetZoneManager**, DWORD); -static HRESULT (WINAPI *pCoInternetGetSecurityUrl)(LPCWSTR, LPWSTR*, PSUACTION, DWORD); -static HRESULT (WINAPI *pCoInternetGetSecurityUrlEx)(IUri*, IUri**, PSUACTION, DWORD_PTR); -static HRESULT (WINAPI *pCreateUri)(LPCWSTR, DWORD, DWORD_PTR, IUri**); -static HRESULT (WINAPI *pCoInternetGetSession)(DWORD, IInternetSession**, DWORD); - -static const WCHAR url1[] = {'r','e','s',':','/','/','m','s','h','t','m','l','.','d','l','l', - '/','b','l','a','n','k','.','h','t','m',0}; -static const WCHAR url2[] = {'i','n','d','e','x','.','h','t','m',0}; -static const WCHAR url3[] = {'f','i','l','e',':','/','/','c',':','\\','I','n','d','e','x','.','h','t','m',0}; -static const WCHAR url4[] = {'f','i','l','e',':','s','o','m','e','%','2','0','f','i','l','e', - '%','2','e','j','p','g',0}; -static const WCHAR url5[] = {'h','t','t','p',':','/','/','w','w','w','.','z','o','n','e','3', - '.','w','i','n','e','t','e','s','t',0}; -static const WCHAR url6[] = {'a','b','o','u','t',':','b','l','a','n','k',0}; -static const WCHAR url7[] = {'f','t','p',':','/','/','z','o','n','e','3', - '.','w','i','n','e','t','e','s','t','/','f','i','l','e','.','t','e','s','t',0}; -static const WCHAR url8[] = {'t','e','s','t',':','1','2','3','a','b','c',0}; -static const WCHAR url9[] = {'h','t','t','p',':','/','/','w','w','w','.','z','o','n','e','3', - '.','w','i','n','e','t','e','s','t', '/','s','i','t','e','/','a','b','o','u','t',0}; -static const WCHAR url10[] = {'f','i','l','e',':','/','/','s','o','m','e','%','2','0','f','i','l','e', - '.','j','p','g',0}; - -static const WCHAR url4e[] = {'f','i','l','e',':','s','o','m','e',' ','f','i','l','e', - '.','j','p','g',0}; - -static const WCHAR winetestW[] = {'w','i','n','e','t','e','s','t',0}; -static const WCHAR security_urlW[] = {'w','i','n','e','t','e','s','t',':','t','e','s','t','i','n','g',0}; -static const WCHAR security_url2W[] = {'w','i','n','e','t','e','s','t',':','t','e','s','t','i','n','g','2',0}; -static const WCHAR security_expectedW[] = {'w','i','n','e','t','e','s','t',':','z','i','p',0}; -static const WCHAR winetest_to_httpW[] = {'w','i','n','e','t','e','s','t',':','h',0}; - -static const char *szZoneMapDomainsKey = "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap\\Domains"; -static const char *szInternetSettingsKey = "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings"; - -static const BYTE secid1[] = {'f','i','l','e',':',0,0,0,0}; -static const BYTE secid5[] = {'h','t','t','p',':','w','w','w','.','z','o','n','e','3', - '.','w','i','n','e','t','e','s','t',3,0,0,0}; -static const BYTE secid6[] = {'a','b','o','u','t',':','b','l','a','n','k',3,0,0,0}; -static const BYTE secid7[] = {'f','t','p',':','z','o','n','e','3', - '.','w','i','n','e','t','e','s','t',3,0,0,0}; -static const BYTE secid10[] = - {'f','i','l','e',':','s','o','m','e','%','2','0','f','i','l','e','.','j','p','g',3,0,0,0}; -static const BYTE secid10_2[] = - {'f','i','l','e',':','s','o','m','e',' ','f','i','l','e','.','j','p','g',3,0,0,0}; - -static const GUID CLSID_TestActiveX = - {0x178fc163,0xf585,0x4e24,{0x9c,0x13,0x4b,0xb7,0xfa,0xf8,0x06,0x46}}; - -/* Defined as extern in urlmon.idl, but not exported by uuid.lib */ -const GUID GUID_CUSTOM_CONFIRMOBJECTSAFETY = - {0x10200490,0xfa38,0x11d0,{0xac,0x0e,0x00,0xa0,0xc9,0xf,0xff,0xc0}}; - -static int called_securl_http; - -static struct secmgr_test { - LPCWSTR url; - DWORD zone; - HRESULT zone_hres; - DWORD secid_size; - const BYTE *secid; - HRESULT secid_hres; -} secmgr_tests[] = { - {url1, 0, S_OK, sizeof(secid1), secid1, S_OK}, - {url2, 100, 0x80041001, 0, NULL, E_INVALIDARG}, - {url3, 0, S_OK, sizeof(secid1), secid1, S_OK}, - {url5, 3, S_OK, sizeof(secid5), secid5, S_OK}, - {url6, 3, S_OK, sizeof(secid6), secid6, S_OK}, - {url7, 3, S_OK, sizeof(secid7), secid7, S_OK} -}; - -static int strcmp_w(const WCHAR *str1, const WCHAR *str2) -{ - DWORD len1 = lstrlenW(str1); - DWORD len2 = lstrlenW(str2); - - if(len1!=len2) return 1; - return memcmp(str1, str2, len1*sizeof(WCHAR)); -} - -static inline void heap_free(void *mem) -{ - HeapFree(GetProcessHeap(), 0, mem); -} - -static inline LPWSTR a2w(LPCSTR str) -{ - LPWSTR ret = NULL; - - if(str) { - DWORD len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); - ret = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)); - MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len); - } - - return ret; -} - -static inline DWORD strcmp_aw(LPCSTR strA, LPCWSTR strB) { - LPWSTR strAW = a2w(strA); - DWORD ret = lstrcmpW(strAW, strB); - heap_free(strAW); - return ret; -} - - -/* Based on RegDeleteTreeW from dlls/advapi32/registry.c */ -static LONG myRegDeleteTreeA(HKEY hKey, LPCSTR lpszSubKey) -{ - LONG ret; - DWORD dwMaxSubkeyLen, dwMaxValueLen; - DWORD dwMaxLen, dwSize; - CHAR szNameBuf[MAX_PATH], *lpszName = szNameBuf; - HKEY hSubKey = hKey; - - if(lpszSubKey) - { - ret = RegOpenKeyExA(hKey, lpszSubKey, 0, KEY_READ, &hSubKey); - if (ret) return ret; - } - - /* Get highest length for keys, values */ - ret = RegQueryInfoKeyA(hSubKey, NULL, NULL, NULL, NULL, - &dwMaxSubkeyLen, NULL, NULL, &dwMaxValueLen, NULL, NULL, NULL); - if (ret) goto cleanup; - - dwMaxSubkeyLen++; - dwMaxValueLen++; - dwMaxLen = max(dwMaxSubkeyLen, dwMaxValueLen); - if (dwMaxLen > sizeof(szNameBuf)/sizeof(CHAR)) - { - /* Name too big: alloc a buffer for it */ - if (!(lpszName = HeapAlloc( GetProcessHeap(), 0, dwMaxLen*sizeof(CHAR)))) - { - ret = ERROR_NOT_ENOUGH_MEMORY; - goto cleanup; - } - } - - /* Recursively delete all the subkeys */ - while (TRUE) - { - dwSize = dwMaxLen; - if (RegEnumKeyExA(hSubKey, 0, lpszName, &dwSize, NULL, - NULL, NULL, NULL)) break; - - ret = myRegDeleteTreeA(hSubKey, lpszName); - if (ret) goto cleanup; - } - - if (lpszSubKey) - ret = RegDeleteKeyA(hKey, lpszSubKey); - else - while (TRUE) - { - dwSize = dwMaxLen; - if (RegEnumValueA(hKey, 0, lpszName, &dwSize, - NULL, NULL, NULL, NULL)) break; - - ret = RegDeleteValueA(hKey, lpszName); - if (ret) goto cleanup; - } - -cleanup: - /* Free buffer if allocated */ - if (lpszName != szNameBuf) - heap_free(lpszName); - if(lpszSubKey) - RegCloseKey(hSubKey); - return ret; -} - - -static void test_SecurityManager(void) -{ - int i; - IInternetSecurityManager *secmgr = NULL; - BYTE buf[512]; - DWORD zone, size, policy; - HRESULT hres; - - if(!pCoInternetCreateSecurityManager) { - return; - } - - trace("Testing security manager...\n"); - - hres = pCoInternetCreateSecurityManager(NULL, &secmgr, 0); - ok(hres == S_OK, "CoInternetCreateSecurityManager failed: %08x\n", hres); - if(FAILED(hres)) - return; - - for(i=0; i < sizeof(secmgr_tests)/sizeof(secmgr_tests[0]); i++) { - zone = 100; - hres = IInternetSecurityManager_MapUrlToZone(secmgr, secmgr_tests[i].url, - &zone, 0); - ok(hres == secmgr_tests[i].zone_hres /* IE <=6 */ - || (FAILED(secmgr_tests[i].zone_hres) && hres == E_INVALIDARG), /* IE7 */ - "[%d] MapUrlToZone failed: %08x, expected %08x\n", - i, hres, secmgr_tests[i].zone_hres); - if(SUCCEEDED(hres)) - ok(zone == secmgr_tests[i].zone, "[%d] zone=%d, expected %d\n", i, zone, - secmgr_tests[i].zone); - else - ok(zone == secmgr_tests[i].zone || zone == -1, "[%d] zone=%d\n", i, zone); - - size = sizeof(buf); - memset(buf, 0xf0, sizeof(buf)); - hres = IInternetSecurityManager_GetSecurityId(secmgr, secmgr_tests[i].url, - buf, &size, 0); - ok(hres == secmgr_tests[i].secid_hres, - "[%d] GetSecurityId failed: %08x, expected %08x\n", - i, hres, secmgr_tests[i].secid_hres); - if(secmgr_tests[i].secid) { - ok(size == secmgr_tests[i].secid_size, "[%d] size=%d, expected %d\n", - i, size, secmgr_tests[i].secid_size); - ok(!memcmp(buf, secmgr_tests[i].secid, size), "[%d] wrong secid\n", i); - } - } - - zone = 100; - hres = IInternetSecurityManager_MapUrlToZone(secmgr, url10, &zone, 0); - ok(hres == S_OK, "MapUrlToZone failed: %08x, expected S_OK\n", hres); - ok(zone == 3, "zone=%d, expected 3\n", zone); - - /* win2k3 translates %20 into a space */ - size = sizeof(buf); - memset(buf, 0xf0, sizeof(buf)); - hres = IInternetSecurityManager_GetSecurityId(secmgr, url10, buf, &size, 0); - ok(hres == S_OK, "GetSecurityId failed: %08x, expected S_OK\n", hres); - ok(size == sizeof(secid10) || - size == sizeof(secid10_2), /* win2k3 */ - "size=%d\n", size); - ok(!memcmp(buf, secid10, size) || - !memcmp(buf, secid10_2, size), /* win2k3 */ - "wrong secid\n"); - - zone = 100; - hres = IInternetSecurityManager_MapUrlToZone(secmgr, NULL, &zone, 0); - ok(hres == E_INVALIDARG, "MapUrlToZone failed: %08x, expected E_INVALIDARG\n", hres); - ok(zone == 100 || zone == -1, "zone=%d\n", zone); - - size = sizeof(buf); - hres = IInternetSecurityManager_GetSecurityId(secmgr, NULL, buf, &size, 0); - ok(hres == E_INVALIDARG, - "GetSecurityId failed: %08x, expected E_INVALIDARG\n", hres); - hres = IInternetSecurityManager_GetSecurityId(secmgr, secmgr_tests[1].url, - NULL, &size, 0); - ok(hres == E_INVALIDARG, - "GetSecurityId failed: %08x, expected E_INVALIDARG\n", hres); - hres = IInternetSecurityManager_GetSecurityId(secmgr, secmgr_tests[1].url, - buf, NULL, 0); - ok(hres == E_INVALIDARG, - "GetSecurityId failed: %08x, expected E_INVALIDARG\n", hres); - - hres = IInternetSecurityManager_ProcessUrlAction(secmgr, NULL, URLACTION_SCRIPT_RUN, (BYTE*)&policy, - sizeof(WCHAR), NULL, 0, 0, 0); - ok(hres == E_INVALIDARG, "ProcessUrlAction failed: %08x, expected E_INVALIDARG\n", hres); - - IInternetSecurityManager_Release(secmgr); -} - -/* Check if Internet Explorer is configured to run in "Enhanced Security Configuration" (aka hardened mode) */ -/* Note: this code is duplicated in dlls/mshtml/tests/mshtml_test.h and dlls/urlmon/tests/sec_mgr.c */ -static BOOL is_ie_hardened(void) -{ - HKEY zone_map; - DWORD ie_harden, type, size; - - ie_harden = 0; - if(RegOpenKeyExA(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap", - 0, KEY_QUERY_VALUE, &zone_map) == ERROR_SUCCESS) { - size = sizeof(DWORD); - if (RegQueryValueExA(zone_map, "IEHarden", NULL, &type, (LPBYTE) &ie_harden, &size) != ERROR_SUCCESS || - type != REG_DWORD) { - ie_harden = 0; - } - RegCloseKey(zone_map); - } - - return ie_harden != 0; -} - -static void test_url_action(IInternetSecurityManager *secmgr, IInternetZoneManager *zonemgr, DWORD action) -{ - DWORD res, size, policy, reg_policy; - char buf[10]; - HKEY hkey; - HRESULT hres; - - /* FIXME: HKEY_CURRENT_USER is most of the time the default but this can be changed on a system. - * The test should be changed to cope with that, if need be. - */ - res = RegOpenKeyA(HKEY_CURRENT_USER, - "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3", &hkey); - if(res != ERROR_SUCCESS) { - ok(0, "Could not open zone key\n"); - return; - } - - wsprintf(buf, "%X", action); - size = sizeof(DWORD); - res = RegQueryValueExA(hkey, buf, NULL, NULL, (BYTE*)®_policy, &size); - RegCloseKey(hkey); - if(res != ERROR_SUCCESS || size != sizeof(DWORD)) { - policy = 0xdeadbeef; - hres = IInternetSecurityManager_ProcessUrlAction(secmgr, url9, action, (BYTE*)&policy, - sizeof(WCHAR), NULL, 0, 0, 0); - ok(hres == E_FAIL || broken(hres == HRESULT_FROM_WIN32(ERROR_NOT_FOUND)), - "(0x%x) got 0x%x (expected E_FAIL)\n", action, hres); - ok(policy == 0xdeadbeef, "(%x) policy=%x\n", action, policy); - - policy = 0xdeadbeef; - hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 3, action, (BYTE*)&policy, - sizeof(DWORD), URLZONEREG_DEFAULT); - ok(hres == E_FAIL || broken(hres == HRESULT_FROM_WIN32(ERROR_NOT_FOUND)), - "(0x%x) got 0x%x (expected E_FAIL)\n", action, hres); - ok(policy == 0xdeadbeef, "(%x) policy=%x\n", action, policy); - return; - } - - policy = 0xdeadbeef; - hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 3, action, (BYTE*)&policy, - sizeof(DWORD), URLZONEREG_DEFAULT); - ok(hres == S_OK, "GetZoneActionPolicy failed: %08x\n", hres); - ok(policy == reg_policy, "(%x) policy=%x, expected %x\n", action, policy, reg_policy); - - if(policy != URLPOLICY_QUERY) { - if(winetest_interactive || ! is_ie_hardened()) { - BOOL expect_parse_call = !called_securl_http; - - policy = 0xdeadbeef; - hres = IInternetSecurityManager_ProcessUrlAction(secmgr, url9, action, (BYTE*)&policy, - sizeof(WCHAR), NULL, 0, 0, 0); - if(reg_policy == URLPOLICY_DISALLOW) - ok(hres == S_FALSE, "ProcessUrlAction(%x) failed: %08x, expected S_FALSE\n", action, hres); - else - ok(hres == S_OK, "ProcessUrlAction(%x) failed: %08x\n", action, hres); - ok(policy == 0xdeadbeef, "(%x) policy=%x\n", action, policy); - - policy = 0xdeadbeef; - hres = IInternetSecurityManager_ProcessUrlAction(secmgr, url9, action, (BYTE*)&policy, - 2, NULL, 0, 0, 0); - if(reg_policy == URLPOLICY_DISALLOW) - ok(hres == S_FALSE, "ProcessUrlAction(%x) failed: %08x, expected S_FALSE\n", action, hres); - else - ok(hres == S_OK, "ProcessUrlAction(%x) failed: %08x\n", action, hres); - ok(policy == 0xdeadbeef, "(%x) policy=%x\n", action, policy); - - policy = 0xdeadbeef; - hres = IInternetSecurityManager_ProcessUrlAction(secmgr, url9, action, (BYTE*)&policy, - sizeof(DWORD), NULL, 0, 0, 0); - if(reg_policy == URLPOLICY_DISALLOW) - ok(hres == S_FALSE, "ProcessUrlAction(%x) failed: %08x, expected S_FALSE\n", action, hres); - else - ok(hres == S_OK, "ProcessUrlAction(%x) failed: %08x\n", action, hres); - ok(policy == reg_policy, "(%x) policy=%x\n", action, policy); - - policy = 0xdeadbeef; - hres = IInternetSecurityManager_ProcessUrlAction(secmgr, url9, action, (BYTE*)&policy, - sizeof(WCHAR), (BYTE*)0xdeadbeef, 16, 0, 0); - if(reg_policy == URLPOLICY_DISALLOW) - ok(hres == S_FALSE, "ProcessUrlAction(%x) failed: %08x, expected S_FALSE\n", action, hres); - else - ok(hres == S_OK, "ProcessUrlAction(%x) failed: %08x\n", action, hres); - ok(policy == 0xdeadbeef, "(%x) policy=%x\n", action, policy); - - policy = 0xdeadbeef; - if(expect_parse_call) - SET_EXPECT(ParseUrl_SECURITY_URL_http); - hres = IInternetSecurityManager_ProcessUrlAction(secmgr, winetest_to_httpW, action, (BYTE*)&policy, - sizeof(DWORD), NULL, 0, 0, 0); - if(expect_parse_call) - CHECK_CALLED(ParseUrl_SECURITY_URL_http); - if(reg_policy == URLPOLICY_DISALLOW) - ok(hres == S_FALSE, "ProcessUrlAction(%x) failed: %08x, expected S_FALSE\n", action, hres); - else - ok(hres == S_OK, "ProcessUrlAction(%x) failed: %08x\n", action, hres); - ok(policy == reg_policy, "(%x) policy=%x\n", action, policy); - }else { - skip("IE running in Enhanced Security Configuration\n"); - } - } -} - -static void test_special_url_action(IInternetSecurityManager *secmgr, IInternetZoneManager *zonemgr, DWORD action) -{ - DWORD policy; - HRESULT hres; - - policy = 0xdeadbeef; - hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 3, action, (BYTE*)&policy, - sizeof(DWORD), URLZONEREG_DEFAULT); - ok(hres == S_OK, "GetZoneActionPolicy failed: %08x\n", hres); - ok(policy == URLPOLICY_DISALLOW, "(%x) policy=%x, expected URLPOLICY_DISALLOW\n", action, policy); - - policy = 0xdeadbeef; - hres = IInternetSecurityManager_ProcessUrlAction(secmgr, url1, action, (BYTE*)&policy, - sizeof(WCHAR), NULL, 0, 0, 0); - ok(hres == S_FALSE, "ProcessUrlAction(%x) failed: %08x, expected S_FALSE\n", action, hres); - - policy = 0xdeadbeef; - hres = IInternetSecurityManager_ProcessUrlAction(secmgr, url1, action, (BYTE*)&policy, - sizeof(DWORD), NULL, 0, 0, 0); - ok(hres == S_FALSE, "ProcessUrlAction(%x) failed: %08x, expected S_FALSE\n", action, hres); - ok(policy == URLPOLICY_DISALLOW, "policy = %x\n", policy); -} - -static void test_activex(IInternetSecurityManager *secmgr) -{ - DWORD policy, policy_size; - struct CONFIRMSAFETY cs; - BYTE *ppolicy; - HRESULT hres; - - policy = 0xdeadbeef; - hres = IInternetSecurityManager_ProcessUrlAction(secmgr, url1, URLACTION_ACTIVEX_RUN, (BYTE*)&policy, - sizeof(DWORD), (BYTE*)&CLSID_TestActiveX, sizeof(CLSID), 0, 0); - ok(hres == S_OK, "ProcessUrlAction(URLACTION_ACTIVEX_RUN) failed: %08x\n", hres); - ok(policy == URLPOLICY_ALLOW || policy == URLPOLICY_DISALLOW, "policy = %x\n", policy); - - cs.clsid = CLSID_TestActiveX; - cs.pUnk = (IUnknown*)0xdeadbeef; - cs.dwFlags = 0; - hres = IInternetSecurityManager_QueryCustomPolicy(secmgr, url1, &GUID_CUSTOM_CONFIRMOBJECTSAFETY, - &ppolicy, &policy_size, (BYTE*)&cs, sizeof(cs), 0); - ok(hres == HRESULT_FROM_WIN32(ERROR_NOT_FOUND), "QueryCusromPolicy failed: %08x\n", hres); -} - -static void test_polices(void) -{ - IInternetZoneManager *zonemgr = NULL; - IInternetSecurityManager *secmgr = NULL; - HRESULT hres; - - trace("testing polices...\n"); - - hres = pCoInternetCreateSecurityManager(NULL, &secmgr, 0); - ok(hres == S_OK, "CoInternetCreateSecurityManager failed: %08x\n", hres); - hres = pCoInternetCreateZoneManager(NULL, &zonemgr, 0); - ok(hres == S_OK, "CoInternetCreateZoneManager failed: %08x\n", hres); - - test_url_action(secmgr, zonemgr, URLACTION_SCRIPT_RUN); - test_url_action(secmgr, zonemgr, URLACTION_ACTIVEX_RUN); - test_url_action(secmgr, zonemgr, URLACTION_ACTIVEX_OVERRIDE_OBJECT_SAFETY); - test_url_action(secmgr, zonemgr, URLACTION_CHANNEL_SOFTDIST_PERMISSIONS); - test_url_action(secmgr, zonemgr, 0xdeadbeef); - - test_special_url_action(secmgr, zonemgr, URLACTION_SCRIPT_OVERRIDE_SAFETY); - test_special_url_action(secmgr, zonemgr, URLACTION_ACTIVEX_OVERRIDE_SCRIPT_SAFETY); - - test_activex(secmgr); - - IInternetSecurityManager_Release(secmgr); - IInternetZoneManager_Release(zonemgr); -} - -/* IE (or at least newer versions of it) seem to cache the keys in ZoneMap - * when urlmon.dll is loaded and it doesn't seem to update its cache, unless - * SetZoneMapping is used. - */ -static void test_zone_domain_cache(void) -{ - HRESULT hres; - DWORD res, zone; - IInternetSecurityManager *secmgr = NULL; - HKEY domains, domain; - - static const WCHAR testing_domain_urlW[] = {'h','t','t','p',':','/','/','t','e','s','t','i','n','g','.', - 'd','o','m','a','i','n','/',0}; - - res = RegOpenKeyA(HKEY_CURRENT_USER, szZoneMapDomainsKey, &domains); - ok(res == ERROR_SUCCESS, "RegOpenKey failed: %d\n", res); - if(res != ERROR_SUCCESS) - return; - - res = RegCreateKeyA(domains, "testing.domain", &domain); - ok(res == ERROR_SUCCESS, "RegCreateKey failed: %d\n", res); - if(res != ERROR_SUCCESS) { - RegCloseKey(domains); - return; - } - - zone = URLZONE_CUSTOM; - res = RegSetValueExA(domain, "http", 0, REG_DWORD, (BYTE*)&zone, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "RegSetValueEx failed: %d\n", res); - - RegCloseKey(domain); - - hres = pCoInternetCreateSecurityManager(NULL, &secmgr, 0); - ok(hres == S_OK, "CoInternetCreateSecurityManager failed: %08x\n", hres); - - zone = URLZONE_INVALID; - hres = IInternetSecurityManager_MapUrlToZone(secmgr, testing_domain_urlW, &zone, 0); - ok(hres == S_OK, "MapUrlToZone failed: %08x\n", hres); - todo_wine ok(zone == URLZONE_INTERNET, "Got %d, expected URLZONE_INTERNET\n", zone); - - /* FIXME: Play nice with ZoneMaps that existed before the test is run. */ - res = RegDeleteKeyA(domains, "testing.domain"); - ok(res == ERROR_SUCCESS, "RegDeleteKey failed: %d\n", res); - - RegCloseKey(domains); - IInternetSecurityManager_Release(secmgr); -} - -typedef struct { - const char *domain; - const char *subdomain; - const char *scheme; - DWORD zone; -} zone_domain_mapping; - -/* FIXME: Move these into SetZoneMapping tests when the day comes... */ -static const zone_domain_mapping zone_domain_mappings[] = { - /* Implicitly means "*.yabadaba.do". */ - {"yabadaba.do",NULL,"http",URLZONE_CUSTOM}, - /* The '*' doesn't count as a wildcard, since its not the first component of the subdomain. */ - {"super.cool","testing.*","ftp",URLZONE_CUSTOM2}, - /* The '*' counts since it's the first component of the subdomain. */ - {"super.cool","*.testing","ftp",URLZONE_CUSTOM2}, - /* All known scheme types apply to wildcard schemes. */ - {"tests.test",NULL,"*",URLZONE_CUSTOM}, - /* Due to a defect with how windows checks the mappings, unknown scheme types - * never seem to get mapped properly. */ - {"tests.test",NULL,"zip",URLZONE_CUSTOM}, - {"www.testing.com",NULL,"http",URLZONE_CUSTOM}, - {"www.testing.com","testing","http",URLZONE_CUSTOM2}, - {"org",NULL,"http",URLZONE_CUSTOM}, - {"org","testing","http",URLZONE_CUSTOM2} -}; - -static void register_zone_domains(void) -{ - HKEY domains; - DWORD res, i; - - /* Some Windows versions don't seem to have a "Domains" key in their HKLM. */ - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, szZoneMapDomainsKey, &domains); - ok(res == ERROR_SUCCESS || broken(res == ERROR_FILE_NOT_FOUND), "RegOpenKey failed: %d\n", res); - if(res == ERROR_SUCCESS) { - HKEY domain; - DWORD zone = URLZONE_CUSTOM; - - res = RegCreateKeyA(domains, "local.machine", &domain); - ok(res == ERROR_SUCCESS, "RegCreateKey failed: %d\n", res); - - res = RegSetValueExA(domain, "http", 0, REG_DWORD, (BYTE*)&zone, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "RegSetValueEx failed: %d\n", res); - - RegCloseKey(domain); - RegCloseKey(domains); - } - - res = RegOpenKeyA(HKEY_CURRENT_USER, szZoneMapDomainsKey, &domains); - ok(res == ERROR_SUCCESS, "RegOpenKey failed: %d\n", res); - - for(i = 0; i < sizeof(zone_domain_mappings)/sizeof(zone_domain_mappings[0]); ++i) { - const zone_domain_mapping *test = zone_domain_mappings+i; - HKEY domain; - - res = RegCreateKeyA(domains, test->domain, &domain); - ok(res == ERROR_SUCCESS, "RegCreateKey failed with %d on test %d\n", res, i); - - /* Only set the value if there's no subdomain. */ - if(!test->subdomain) { - res = RegSetValueExA(domain, test->scheme, 0, REG_DWORD, (BYTE*)&test->zone, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "RegSetValueEx failed with %d on test %d\n", res, i); - } else { - HKEY subdomain; - - res = RegCreateKeyA(domain, test->subdomain, &subdomain); - ok(res == ERROR_SUCCESS, "RegCreateKey failed with %d on test %d\n", res, i); - - res = RegSetValueExA(subdomain, test->scheme, 0, REG_DWORD, (BYTE*)&test->zone, sizeof(DWORD)); - ok(res == ERROR_SUCCESS, "RegSetValueEx failed with %d on test %d\n", res, i); - - RegCloseKey(subdomain); - } - - RegCloseKey(domain); - } - - RegCloseKey(domains); -} - -static void unregister_zone_domains(void) -{ - HKEY domains; - DWORD res, i; - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, szZoneMapDomainsKey, &domains); - ok(res == ERROR_SUCCESS || broken(res == ERROR_FILE_NOT_FOUND), "RegOpenKey failed: %d\n", res); - if(res == ERROR_SUCCESS) { - RegDeleteKeyA(domains, "local.machine"); - RegCloseKey(domains); - } - - res = RegOpenKeyA(HKEY_CURRENT_USER, szZoneMapDomainsKey, &domains); - ok(res == ERROR_SUCCESS, "RegOpenKey failed: %d\n", res); - - for(i = 0; i < sizeof(zone_domain_mappings)/sizeof(zone_domain_mappings[0]); ++i) { - const zone_domain_mapping *test = zone_domain_mappings+i; - - /* FIXME: Uses the "cludge" approach to remove the test data from the registry! - * Although, if domain names are... unique, this shouldn't cause any harm - * to keys (if any) that existed before the tests. - */ - if(test->subdomain) { - HKEY domain; - - res = RegOpenKeyA(domains, test->domain, &domain); - if(res == ERROR_SUCCESS) { - RegDeleteKeyA(domain, test->subdomain); - RegCloseKey(domain); - } - } - RegDeleteKeyA(domains, test->domain); - } - - RegCloseKey(domains); -} - -static void run_child_process(void) -{ - char cmdline[MAX_PATH]; - char path[MAX_PATH]; - char **argv; - PROCESS_INFORMATION pi; - STARTUPINFO si = { 0 }; - BOOL ret; - - GetModuleFileNameA(NULL, path, MAX_PATH); - - si.cb = sizeof(si); - winetest_get_mainargs(&argv); - sprintf(cmdline, "\"%s\" %s domain_tests", argv[0], argv[1]); - ret = CreateProcess(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "Failed to spawn child process: %u\n", GetLastError()); - winetest_wait_child_process(pi.hProcess); - CloseHandle(pi.hThread); - CloseHandle(pi.hProcess); -} - -typedef struct { - const char *url; - DWORD zone; - BOOL todo; - DWORD broken_zone; -} zone_mapping_test; - -static const zone_mapping_test zone_mapping_tests[] = { - /* Tests for "yabadaba.do" zone mappings. */ - {"http://yabadaba.do/",URLZONE_CUSTOM}, - {"http://google.yabadaba.do/",URLZONE_CUSTOM}, - {"zip://yabadaba.do/",URLZONE_INTERNET}, - /* Tests for "super.cool" zone mappings. */ - {"ftp://testing.google.super.cool/",URLZONE_INTERNET}, - {"ftp://testing.*.super.cool/",URLZONE_CUSTOM2}, - {"ftp://google.testing.super.cool/",URLZONE_CUSTOM2}, - /* Tests for "tests.test" zone mappings. */ - {"http://tests.test/",URLZONE_CUSTOM}, - {"http://www.tests.test/",URLZONE_CUSTOM}, - {"ftp://tests.test/",URLZONE_CUSTOM}, - {"ftp://www.tests.test/",URLZONE_CUSTOM}, - {"test://www.tests.test/",URLZONE_INTERNET}, - {"test://tests.test/",URLZONE_INTERNET}, - {"zip://www.tests.test/",URLZONE_INTERNET}, - {"zip://tests.test/",URLZONE_INTERNET}, - /* Tests for "www.testing.com" zone mappings. */ - {"http://google.www.testing.com/",URLZONE_INTERNET}, - {"http://www.testing.com/",URLZONE_CUSTOM,FALSE,URLZONE_INTERNET}, - {"http://testing.www.testing.com/",URLZONE_CUSTOM2,FALSE,URLZONE_INTERNET}, - /* Tests for "org" zone mappings. */ - {"http://google.org/",URLZONE_INTERNET,FALSE,URLZONE_CUSTOM}, - {"http://org/",URLZONE_CUSTOM}, - {"http://testing.org/",URLZONE_CUSTOM2} -}; - -static void test_zone_domain_mappings(void) -{ - HRESULT hres; - DWORD i, res; - IInternetSecurityManager *secmgr = NULL; - HKEY domains; - DWORD zone = URLZONE_INVALID; - - trace("testing zone domain mappings...\n"); - - hres = pCoInternetCreateSecurityManager(NULL, &secmgr, 0); - ok(hres == S_OK, "CoInternetCreateSecurityManager failed: %08x\n", hres); - - res = RegOpenKeyA(HKEY_LOCAL_MACHINE, szZoneMapDomainsKey, &domains); - if(res == ERROR_SUCCESS) { - static const WCHAR local_machineW[] = {'h','t','t','p',':','/','/','t','e','s','t','.','l','o','c','a','l', - '.','m','a','c','h','i','n','e','/',0}; - - hres = IInternetSecurityManager_MapUrlToZone(secmgr, local_machineW, &zone, 0); - ok(hres == S_OK, "MapUrlToZone failed: %08x\n", hres); - ok(zone == URLZONE_CUSTOM, "Expected URLZONE_CUSTOM, but got %d\n", zone); - - RegCloseKey(domains); - } - - for(i = 0; i < sizeof(zone_mapping_tests)/sizeof(zone_mapping_tests[0]); ++i) { - const zone_mapping_test *test = zone_mapping_tests+i; - LPWSTR urlW = a2w(test->url); - zone = URLZONE_INVALID; - - hres = IInternetSecurityManager_MapUrlToZone(secmgr, urlW, &zone, 0); - ok(hres == S_OK, "MapUrlToZone failed: %08x\n", hres); - if(test->todo) - todo_wine - ok(zone == test->zone || broken(test->broken_zone == zone), - "Expected %d, but got %d on test %d\n", test->zone, zone, i); - else - ok(zone == test->zone || broken(test->broken_zone == zone), - "Expected %d, but got %d on test %d\n", test->zone, zone, i); - - heap_free(urlW); - } - - IInternetSecurityManager_Release(secmgr); -} - -static void test_zone_domains(void) -{ - if(is_ie_hardened()) { - skip("IE running in Enhanced Security Configuration\n"); - return; - } else if(!pCreateUri) { - win_skip("Skipping zone domain tests, IE too old\n"); - return; - } - - trace("testing zone domains...\n"); - - test_zone_domain_cache(); - - register_zone_domains(); - run_child_process(); - unregister_zone_domains(); -} - -static void test_CoInternetCreateZoneManager(void) -{ - IInternetZoneManager *zonemgr = NULL; - IUnknown *punk = NULL; - HRESULT hr; - - trace("simple zone manager tests...\n"); - - hr = pCoInternetCreateZoneManager(NULL, &zonemgr, 0); - ok(hr == S_OK, "CoInternetCreateZoneManager result: 0x%x\n", hr); - if (FAILED(hr)) - return; - - hr = IInternetZoneManager_QueryInterface(zonemgr, &IID_IUnknown, (void **) &punk); - ok(SUCCEEDED(hr), "got 0x%x with %p (expected Success)\n", hr, punk); - if (punk) - IUnknown_Release(punk); - - hr = IInternetZoneManager_QueryInterface(zonemgr, &IID_IInternetZoneManager, (void **) &punk); - ok(SUCCEEDED(hr), "got 0x%x with %p (expected Success)\n", hr, punk); - if (punk) - IUnknown_Release(punk); - - - hr = IInternetZoneManager_QueryInterface(zonemgr, &IID_IInternetZoneManagerEx, (void **) &punk); - if (SUCCEEDED(hr)) { - IUnknown_Release(punk); - - hr = IInternetZoneManager_QueryInterface(zonemgr, &IID_IInternetZoneManagerEx2, (void **) &punk); - ok(hr == S_OK || broken(hr == E_NOINTERFACE /* some W2K3 */), - "got 0x%x (expected S_OK)\n", hr); - if (punk) - IUnknown_Release(punk); - else - win_skip("InternetZoneManagerEx2 not supported\n"); - - } - else - win_skip("InternetZoneManagerEx not supported\n"); - - hr = IInternetZoneManager_Release(zonemgr); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); - -} - -static void test_CreateZoneEnumerator(void) -{ - IInternetZoneManager *zonemgr = NULL; - HRESULT hr; - DWORD dwEnum; - DWORD dwEnum2; - DWORD dwCount; - DWORD dwCount2; - - trace("testing zone enumerator...\n"); - - hr = pCoInternetCreateZoneManager(NULL, &zonemgr, 0); - ok(hr == S_OK, "CoInternetCreateZoneManager result: 0x%x\n", hr); - if (FAILED(hr)) - return; - - dwEnum=0xdeadbeef; - hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr, &dwEnum, NULL, 0); - ok((hr == E_INVALIDARG) && (dwEnum == 0xdeadbeef), - "got 0x%x with 0x%x (expected E_INVALIDARG with 0xdeadbeef)\n", hr, dwEnum); - - dwCount=0xdeadbeef; - hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr, NULL, &dwCount, 0); - ok((hr == E_INVALIDARG) && (dwCount == 0xdeadbeef), - "got 0x%x and 0x%x (expected E_INVALIDARG and 0xdeadbeef)\n", hr, dwCount); - - dwEnum=0xdeadbeef; - dwCount=0xdeadbeef; - hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr, &dwEnum, &dwCount, 0xffffffff); - ok((hr == E_INVALIDARG) && (dwEnum == 0xdeadbeef) && (dwCount == 0xdeadbeef), - "got 0x%x with 0x%x and 0x%x (expected E_INVALIDARG with 0xdeadbeef and 0xdeadbeef)\n", - hr, dwEnum, dwCount); - - dwEnum=0xdeadbeef; - dwCount=0xdeadbeef; - hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr, &dwEnum, &dwCount, 1); - ok((hr == E_INVALIDARG) && (dwEnum == 0xdeadbeef) && (dwCount == 0xdeadbeef), - "got 0x%x with 0x%x and 0x%x (expected E_INVALIDARG with 0xdeadbeef and 0xdeadbeef)\n", - hr, dwEnum, dwCount); - - dwEnum=0xdeadbeef; - dwCount=0xdeadbeef; - /* Normal use */ - hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr, &dwEnum, &dwCount, 0); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); - - if (SUCCEEDED(hr)) { - dwEnum2=0xdeadbeef; - dwCount2=0xdeadbeef; - hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr, &dwEnum2, &dwCount2, 0); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); - if (SUCCEEDED(hr)) { - /* native urlmon has an incrementing counter for dwEnum */ - hr = IInternetZoneManager_DestroyZoneEnumerator(zonemgr, dwEnum2); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); - } - - hr = IInternetZoneManager_DestroyZoneEnumerator(zonemgr, dwEnum); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); - - /* Destroy the Enumerator twice is detected and handled in native urlmon */ - hr = IInternetZoneManager_DestroyZoneEnumerator(zonemgr, dwEnum); - ok((hr == E_INVALIDARG), "got 0x%x (expected E_INVALIDARG)\n", hr); - } - - /* ::Release succeed also, when a ::DestroyZoneEnumerator is missing */ - hr = IInternetZoneManager_Release(zonemgr); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); -} - -static void test_GetZoneActionPolicy(void) -{ - IInternetZoneManager *zonemgr = NULL; - BYTE buf[32]; - HRESULT hres; - DWORD action = URLACTION_CREDENTIALS_USE; /* Implemented on all IE versions */ - - trace("testing GetZoneActionPolixy...\n"); - - hres = pCoInternetCreateZoneManager(NULL, &zonemgr, 0); - ok(hres == S_OK, "CoInternetCreateZoneManager failed: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 3, action, buf, - sizeof(DWORD), URLZONEREG_DEFAULT); - ok(hres == S_OK, "GetZoneActionPolicy failed: %08x\n", hres); - ok(*(DWORD*)buf == URLPOLICY_CREDENTIALS_SILENT_LOGON_OK || - *(DWORD*)buf == URLPOLICY_CREDENTIALS_MUST_PROMPT_USER || - *(DWORD*)buf == URLPOLICY_CREDENTIALS_CONDITIONAL_PROMPT || - *(DWORD*)buf == URLPOLICY_CREDENTIALS_ANONYMOUS_ONLY, - "unexpected policy=%d\n", *(DWORD*)buf); - - hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 3, action, NULL, - sizeof(DWORD), URLZONEREG_DEFAULT); - ok(hres == E_INVALIDARG, "GetZoneActionPolicy failed: %08x, expected E_INVALIDARG\n", hres); - - hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 3, action, buf, - 2, URLZONEREG_DEFAULT); - ok(hres == E_INVALIDARG, "GetZoneActionPolicy failed: %08x, expected E_INVALIDARG\n", hres); - - hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 3, 0x1fff, buf, - sizeof(DWORD), URLZONEREG_DEFAULT); - ok(hres == E_FAIL || broken(hres == HRESULT_FROM_WIN32(ERROR_NOT_FOUND)), - "(0x%x) got 0x%x (expected E_FAIL)\n", action, hres); - - hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 13, action, buf, - sizeof(DWORD), URLZONEREG_DEFAULT); - ok(hres == E_INVALIDARG, "GetZoneActionPolicy failed: %08x, expected E_INVALIDARG\n", hres); - - IInternetZoneManager_Release(zonemgr); -} - -static void test_GetZoneAt(void) -{ - IInternetZoneManager *zonemgr = NULL; - HRESULT hr; - DWORD dwEnum; - DWORD dwCount; - DWORD dwZone; - DWORD i; - - trace("testing GetZoneAt...\n"); - - hr = pCoInternetCreateZoneManager(NULL, &zonemgr, 0); - ok(hr == S_OK, "CoInternetCreateZoneManager result: 0x%x\n", hr); - if (FAILED(hr)) - return; - - hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr, &dwEnum, &dwCount, 0); - if (FAILED(hr)) - goto cleanup; - - if (0) { - /* this crashes with native urlmon */ - IInternetZoneManager_GetZoneAt(zonemgr, dwEnum, 0, NULL); - } - - dwZone = 0xdeadbeef; - hr = IInternetZoneManager_GetZoneAt(zonemgr, 0xdeadbeef, 0, &dwZone); - ok(hr == E_INVALIDARG, - "got 0x%x with 0x%x (expected E_INVALIDARG)\n", hr, dwZone); - - for (i = 0; i < dwCount; i++) - { - dwZone = 0xdeadbeef; - hr = IInternetZoneManager_GetZoneAt(zonemgr, dwEnum, i, &dwZone); - ok(hr == S_OK, "#%d: got x%x with %d (expected S_OK)\n", i, hr, dwZone); - } - - dwZone = 0xdeadbeef; - /* MSDN (index .. must be .. less than or equal to) is wrong */ - hr = IInternetZoneManager_GetZoneAt(zonemgr, dwEnum, dwCount, &dwZone); - ok(hr == E_INVALIDARG, - "got 0x%x with 0x%x (expected E_INVALIDARG)\n", hr, dwZone); - - hr = IInternetZoneManager_DestroyZoneEnumerator(zonemgr, dwEnum); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); - -cleanup: - hr = IInternetZoneManager_Release(zonemgr); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); -} - -static void test_GetZoneAttributes(void) -{ - IInternetZoneManager *zonemgr = NULL; - CHAR buffer [sizeof(ZONEATTRIBUTES) + 32]; - ZONEATTRIBUTES* pZA = (ZONEATTRIBUTES*) buffer; - HRESULT hr; - DWORD i; - - trace("testing GetZoneAttributes...\n"); - - hr = pCoInternetCreateZoneManager(NULL, &zonemgr, 0); - ok(hr == S_OK, "CoInternetCreateZoneManager result: 0x%x\n", hr); - if (FAILED(hr)) - return; - - /* native urlmon has Zone "0" up to Zone "4" since IE4 */ - for (i = 0; i < 5; i++) { - memset(buffer, -1, sizeof(buffer)); - hr = IInternetZoneManager_GetZoneAttributes(zonemgr, i, pZA); - ok(hr == S_OK, "#%d: got 0x%x (expected S_OK)\n", i, hr); - } - - /* IE8 no longer set cbSize */ - memset(buffer, -1, sizeof(buffer)); - pZA->cbSize = 0; - hr = IInternetZoneManager_GetZoneAttributes(zonemgr, 0, pZA); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); - ok((pZA->cbSize == 0) || (pZA->cbSize == sizeof(ZONEATTRIBUTES)), - "got cbSize = %d (expected 0)\n", pZA->cbSize); - - memset(buffer, -1, sizeof(buffer)); - pZA->cbSize = 64; - hr = IInternetZoneManager_GetZoneAttributes(zonemgr, 0, pZA); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); - ok((pZA->cbSize == 64) || (pZA->cbSize == sizeof(ZONEATTRIBUTES)), - "got cbSize = %d (expected 64)\n", pZA->cbSize); - - memset(buffer, -1, sizeof(buffer)); - hr = IInternetZoneManager_GetZoneAttributes(zonemgr, 0, pZA); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); - ok((pZA->cbSize == 0xffffffff) || (pZA->cbSize == sizeof(ZONEATTRIBUTES)), - "got cbSize = 0x%x (expected 0xffffffff)\n", pZA->cbSize); - - /* IE8 no longer fail on invalid zones */ - memset(buffer, -1, sizeof(buffer)); - hr = IInternetZoneManager_GetZoneAttributes(zonemgr, 0xdeadbeef, pZA); - ok(hr == S_OK || (hr == E_FAIL), - "got 0x%x (expected S_OK or E_FAIL)\n", hr); - - hr = IInternetZoneManager_GetZoneAttributes(zonemgr, 0, NULL); - ok(hr == E_INVALIDARG, "got 0x%x (expected E_INVALIDARG)\n", hr); - - hr = IInternetZoneManager_Release(zonemgr); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); -} - -static void test_SetZoneAttributes(void) -{ - IInternetZoneManager *zonemgr = NULL; - CHAR buffer [sizeof(ZONEATTRIBUTES) + 16]; - ZONEATTRIBUTES* pZA = (ZONEATTRIBUTES*) buffer; - CHAR regpath[MAX_PATH]; - HKEY hkey; - HRESULT hr; - DWORD res; - - trace("testing SetZoneAttributes...\n"); - hr = pCoInternetCreateZoneManager(NULL, &zonemgr, 0); - ok(hr == S_OK, "CoInternetCreateZoneManager result: 0x%x\n", hr); - if (FAILED(hr)) - return; - - memset(buffer, -1, sizeof(buffer)); - hr = IInternetZoneManager_GetZoneAttributes(zonemgr, URLZONE_LOCAL_MACHINE, pZA); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); - - sprintf(regpath, "%s\\Zones\\%d", szInternetSettingsKey, URLZONE_CUSTOM); - res = RegCreateKeyA(HKEY_CURRENT_USER, regpath, &hkey); - RegCloseKey(hkey); - - ok(res == ERROR_SUCCESS, "got %d (expected ERROR_SUCCESS)\n", res); - if (res != ERROR_SUCCESS) - goto cleanup; - - pZA->cbSize = sizeof(ZONEATTRIBUTES); - hr = IInternetZoneManager_SetZoneAttributes(zonemgr, URLZONE_CUSTOM, NULL); - ok(hr == E_INVALIDARG, "got 0x%x (expected E_INVALIDARG)\n", hr); - - /* normal use */ - hr = IInternetZoneManager_SetZoneAttributes(zonemgr, URLZONE_CUSTOM, pZA); - if (hr == E_FAIL) { - win_skip("SetZoneAttributes not supported: IE too old\n"); - goto cleanup; - } - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); - - /* native urlmon ignores cbSize */ - pZA->cbSize = sizeof(ZONEATTRIBUTES) + sizeof(DWORD); - hr = IInternetZoneManager_SetZoneAttributes(zonemgr, URLZONE_CUSTOM, pZA); - ok(hr == S_OK, "got 0x%x for sizeof(ZONEATTRIBUTES) + sizeof(DWORD) (expected S_OK)\n", hr); - - pZA->cbSize = sizeof(ZONEATTRIBUTES) - sizeof(DWORD); - hr = IInternetZoneManager_SetZoneAttributes(zonemgr, URLZONE_CUSTOM, pZA); - ok(hr == S_OK, "got 0x%x for sizeof(ZONEATTRIBUTES) - sizeof(DWORD) (expected S_OK)\n", hr); - - pZA->cbSize = 0; - hr = IInternetZoneManager_SetZoneAttributes(zonemgr, URLZONE_CUSTOM, pZA); - ok(hr == S_OK, "got 0x%x for size 0 (expected S_OK)\n", hr); - - /* The key for the zone must be present, when calling SetZoneAttributes */ - myRegDeleteTreeA(HKEY_CURRENT_USER, regpath); - /* E_FAIL is returned from IE6 here, which is resonable. - All newer IE return S_OK without saving the zone attributes to the registry. - This is a Windows bug, but we have to accept that as standard */ - hr = IInternetZoneManager_SetZoneAttributes(zonemgr, URLZONE_CUSTOM, pZA); - ok((hr == S_OK) || broken(hr == E_FAIL), "got 0x%x (expected S_OK)\n", hr); - - /* SetZoneAttributes did not create the directory */ - res = RegOpenKeyA(HKEY_CURRENT_USER, regpath, &hkey); - ok((res == ERROR_FILE_NOT_FOUND) && (hkey == NULL), - "got %u with %p (expected ERROR_FILE_NOT_FOUND with NULL)\n", res, hkey); - - if (hkey) RegCloseKey(hkey); - -cleanup: - /* delete zone settings in the registry */ - myRegDeleteTreeA(HKEY_CURRENT_USER, regpath); - - hr = IInternetZoneManager_Release(zonemgr); - ok(hr == S_OK, "got 0x%x (expected S_OK)\n", hr); -} - - -static void test_InternetSecurityMarshalling(void) -{ - IInternetSecurityManager *secmgr = NULL; - IUnknown *unk; - IStream *stream; - HRESULT hres; - - trace("testing marshalling...\n"); - - hres = pCoInternetCreateSecurityManager(NULL, &secmgr, 0); - ok(hres == S_OK, "CoInternetCreateSecurityManager failed: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IInternetSecurityManager_QueryInterface(secmgr, &IID_IUnknown, (void**)&unk); - ok(hres == S_OK, "QueryInterface returned: %08x\n", hres); - - hres = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(hres == S_OK, "CreateStreamOnHGlobal returned: %08x\n", hres); - - hres = CoMarshalInterface(stream, &IID_IInternetSecurityManager, unk, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); - /* Not supported in W98 */ - ok(hres == S_OK || broken(hres == REGDB_E_IIDNOTREG), - "CoMarshalInterface returned: %08x\n", hres); - - IStream_Release(stream); - IUnknown_Release(unk); - IInternetSecurityManager_Release(secmgr); -} - -static void test_InternetGetSecurityUrl(void) -{ - const WCHAR url5_out[] = {'h','t','t','p',':','w','w','w','.','z','o','n','e','3', - '.','w','i','n','e','t','e','s','t',0}; - const WCHAR url7_out[] = {'f','t','p',':','z','o','n','e','3','.','w','i','n','e','t','e','s','t',0}; - - const WCHAR *in[] = {url2, url3, url4, url5, url7, url8, url9, url10}; - const WCHAR *out_default[] = {url2, url3, url4, url5_out, url7_out, url8, url5_out, url10}; - const WCHAR *out_securl[] = {url2, url3, url4, url5, url7, url8, url9, url10}; - - WCHAR *sec; - DWORD i; - HRESULT hres; - - trace("testing CoInternetGetSecurityUrl...\n"); - - for(i=0; i cchResult) - return S_FALSE; - memcpy(pwzResult, ret, (*pcchResult)*sizeof(WCHAR)); - return S_OK; -} - -static HRESULT WINAPI InternetProtocolInfo_CombineUrl(IInternetProtocolInfo *iface, - LPCWSTR pwzBaseUrl, LPCWSTR pwzRelativeUrl, DWORD dwCombineFlags, - LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InternetProtocolInfo_CompareUrl(IInternetProtocolInfo *iface, - LPCWSTR pwzUrl1, LPCWSTR pwzUrl2, DWORD dwCompareFlags) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InternetProtocolInfo_QueryInfo(IInternetProtocolInfo *iface, - LPCWSTR pwzUrl, QUERYOPTION OueryOption, DWORD dwQueryFlags, LPVOID pBuffer, - DWORD cbBuffer, DWORD *pcbBuf, DWORD dwReserved) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static const IInternetProtocolInfoVtbl InternetProtocolInfoVtbl = { - InternetProtocolInfo_QueryInterface, - InternetProtocolInfo_AddRef, - InternetProtocolInfo_Release, - InternetProtocolInfo_ParseUrl, - InternetProtocolInfo_CombineUrl, - InternetProtocolInfo_CompareUrl, - InternetProtocolInfo_QueryInfo -}; - -static IInternetProtocolInfo protocol_info = { &InternetProtocolInfoVtbl }; - -static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv) -{ - if(IsEqualGUID(&IID_IInternetProtocolInfo, riid)) { - *ppv = &protocol_info; - return S_OK; - } - - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface) -{ - return 2; -} - -static ULONG WINAPI ClassFactory_Release(IClassFactory *iface) -{ - return 1; -} - -static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown *pOuter, - REFIID riid, void **ppv) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL dolock) -{ - ok(0, "unexpected call\n"); - return S_OK; -} - -static const IClassFactoryVtbl ClassFactoryVtbl = { - ClassFactory_QueryInterface, - ClassFactory_AddRef, - ClassFactory_Release, - ClassFactory_CreateInstance, - ClassFactory_LockServer -}; - -static IClassFactory protocol_cf = { &ClassFactoryVtbl }; - -static void register_protocols(void) -{ - IInternetSession *session; - HRESULT hres; - - hres = pCoInternetGetSession(0, &session, 0); - ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IInternetSession_RegisterNameSpace(session, &protocol_cf, &IID_NULL, - winetestW, 0, NULL, 0); - ok(hres == S_OK, "RegisterNameSpace failed: %08x\n", hres); - - IInternetSession_Release(session); -} - -static void unregister_protocols(void) { - IInternetSession *session; - HRESULT hr; - - hr = pCoInternetGetSession(0, &session, 0); - ok(hr == S_OK, "CoInternetGetSession failed: 0x%08x\n", hr); - if(FAILED(hr)) - return; - - hr = IInternetSession_UnregisterNameSpace(session, &protocol_cf, winetestW); - ok(hr == S_OK, "UnregisterNameSpace failed: 0x%08x\n", hr); - - IInternetSession_Release(session); -} - -static const struct { - const char *uri; - DWORD create_flags; - const char *security_uri; - HRESULT security_hres; - const char *default_uri; - HRESULT default_hres; - BOOL todo; -} sec_url_ex_tests[] = { - {"index.htm",Uri_CREATE_ALLOW_RELATIVE,"*:index.html",S_OK,"*:index.htm",S_OK}, - {"file://c:\\Index.htm",Uri_CREATE_FILE_USE_DOS_PATH,"file:///c:/Index.htm",S_OK,"file:///c:/Index.htm",S_OK}, - {"file:some%20file%2ejpg",0,NULL,E_INVALIDARG,NULL,E_INVALIDARG}, - {"file:some file.jpg",0,NULL,E_INVALIDARG,NULL,E_INVALIDARG}, - {"http://www.zone3.winetest/",0,"http://www.zone3.winetest/",S_OK,"http://www.zone3.winetest/",S_OK}, - {"about:blank",0,"about:blank",S_OK,"about:blank",S_OK}, - {"ftp://zone3.winetest/file.test",0,"ftp://zone3.winetest/file.test",S_OK,"ftp://zone3.winetest/file.test",S_OK}, - {"test:123abc",0,"test:123abc",S_OK,"test:123abc",S_OK}, - {"http:google.com/test.file",0,"http:google.com/test.file",S_OK,"http:google.com/test.file",S_OK}, - {"ftp://test@ftp.winehq.org/",0,"ftp://ftp.winehq.org/",S_OK,"ftp://ftp.winehq.org/",S_OK}, - {"test://google@ftp.winehq.org/",0,"test://google@ftp.winehq.org/",S_OK,"test://google@ftp.winehq.org/",S_OK} -}; - -static void test_InternetGetSecurityUrlEx(void) -{ - HRESULT hr; - DWORD i; - IUri *uri = NULL, *result = NULL; - - trace("testing CoInternetGetSecurityUrlEx...\n"); - - hr = pCoInternetGetSecurityUrlEx(NULL, NULL, PSU_DEFAULT, 0); - ok(hr == E_INVALIDARG, "CoInternetGetSecurityUrlEx returned 0x%08x, expected E_INVALIDARG\n", hr); - - result = (void*) 0xdeadbeef; - hr = pCoInternetGetSecurityUrlEx(NULL, &result, PSU_DEFAULT, 0); - ok(hr == E_INVALIDARG, "CoInternetGetSecurityUrlEx returned 0x%08x, expected E_INVALIDARG\n", hr); - ok(result == (void*) 0xdeadbeef, "'result' was %p\n", result); - - for(i = 0; i < sizeof(sec_url_ex_tests)/sizeof(sec_url_ex_tests[0]); ++i) { - LPWSTR uriW = a2w(sec_url_ex_tests[i].uri); - uri = NULL; - - hr = pCreateUri(uriW, sec_url_ex_tests[i].create_flags, 0, &uri); - ok(hr == S_OK, "CreateUri returned 0x%08x on test %d\n", hr, i); - if(hr == S_OK) { - result = NULL; - - hr = pCoInternetGetSecurityUrlEx(uri, &result, PSU_DEFAULT, 0); - if(sec_url_ex_tests[i].todo) { - todo_wine - ok(hr == sec_url_ex_tests[i].default_hres, - "CoInternetGetSecurityUrlEx returned 0x%08x, expected 0x%08x on test %d\n", - hr, sec_url_ex_tests[i].default_hres, i); - } else { - ok(hr == sec_url_ex_tests[i].default_hres, - "CoInternetGetSecurityUrlEx returned 0x%08x, expected 0x%08x on test %d\n", - hr, sec_url_ex_tests[i].default_hres, i); - } - if(SUCCEEDED(hr)) { - BSTR received; - - hr = IUri_GetDisplayUri(result, &received); - ok(hr == S_OK, "GetDisplayUri returned 0x%08x on test %d\n", hr, i); - if(hr == S_OK) { - if(sec_url_ex_tests[i].todo) { - todo_wine - ok(!strcmp_aw(sec_url_ex_tests[i].default_uri, received), - "Expected %s but got %s on test %d\n", sec_url_ex_tests[i].default_uri, - wine_dbgstr_w(received), i); - } else { - ok(!strcmp_aw(sec_url_ex_tests[i].default_uri, received), - "Expected %s but got %s on test %d\n", sec_url_ex_tests[i].default_uri, - wine_dbgstr_w(received), i); - } - } - SysFreeString(received); - } - if(result) IUri_Release(result); - - result = NULL; - hr = pCoInternetGetSecurityUrlEx(uri, &result, PSU_SECURITY_URL_ONLY, 0); - if(sec_url_ex_tests[i].todo) { - todo_wine - ok(hr == sec_url_ex_tests[i].default_hres, - "CoInternetGetSecurityUrlEx returned 0x%08x, expected 0x%08x on test %d\n", - hr, sec_url_ex_tests[i].default_hres, i); - } else { - ok(hr == sec_url_ex_tests[i].default_hres, - "CoInternetGetSecurityUrlEx returned 0x%08x, expected 0x%08x on test %d\n", - hr, sec_url_ex_tests[i].default_hres, i); - } - if(SUCCEEDED(hr)) { - BSTR received; - - hr = IUri_GetDisplayUri(result, &received); - ok(hr == S_OK, "GetDisplayUri returned 0x%08x on test %d\n", hr, i); - if(hr == S_OK) { - if(sec_url_ex_tests[i].todo) { - todo_wine - ok(!strcmp_aw(sec_url_ex_tests[i].default_uri, received), - "Expected %s but got %s on test %d\n", sec_url_ex_tests[i].default_uri, - wine_dbgstr_w(received), i); - } else { - ok(!strcmp_aw(sec_url_ex_tests[i].default_uri, received), - "Expected %s but got %s on test %d\n", sec_url_ex_tests[i].default_uri, - wine_dbgstr_w(received), i); - } - } - SysFreeString(received); - } - if(result) IUri_Release(result); - } - - if(uri) IUri_Release(uri); - heap_free(uriW); - } -} - -static void test_InternetGetSecurityUrlEx_Pluggable(void) -{ - HRESULT hr; - IUri *uri = NULL, *result; - - trace("testing CoInternetGetSecurityUrlEx for plugable protocols...\n"); - - hr = pCreateUri(security_urlW, 0, 0, &uri); - ok(hr == S_OK, "CreateUri returned 0x%08x\n", hr); - if(hr == S_OK) { - SET_EXPECT(ParseUrl_SECURITY_URL_input); - SET_EXPECT(ParseUrl_SECURITY_URL_expected); - SET_EXPECT(ParseUrl_SECURITY_DOMAIN_expected); - - hr = pCoInternetGetSecurityUrlEx(uri, &result, PSU_DEFAULT, 0); - ok(hr == S_OK, "CoInternetGetSecurityUrlEx returned 0x%08x, expected S_OK\n", hr); - - CHECK_CALLED(ParseUrl_SECURITY_URL_input); - CHECK_CALLED(ParseUrl_SECURITY_URL_expected); - CHECK_CALLED(ParseUrl_SECURITY_DOMAIN_expected); - - if(hr == S_OK) { - BSTR received = NULL; - - hr = IUri_GetAbsoluteUri(result, &received); - ok(hr == S_OK, "GetAbsoluteUri returned 0x%08x\n", hr); - if(hr == S_OK) { - ok(!strcmp_w(security_expectedW, received), "Expected %s but got %s\n", - wine_dbgstr_w(security_expectedW), wine_dbgstr_w(received)); - } - SysFreeString(received); - } - if(result) IUri_Release(result); - - result = NULL; - - SET_EXPECT(ParseUrl_SECURITY_URL_input); - SET_EXPECT(ParseUrl_SECURITY_URL_expected); - - hr = pCoInternetGetSecurityUrlEx(uri, &result, PSU_SECURITY_URL_ONLY, 0); - ok(hr == S_OK, "CoInternetGetSecurityUrlEx returned 0x%08x, expected S_OK\n", hr); - - CHECK_CALLED(ParseUrl_SECURITY_URL_input); - CHECK_CALLED(ParseUrl_SECURITY_URL_expected); - - if(hr == S_OK) { - BSTR received = NULL; - - hr = IUri_GetAbsoluteUri(result, &received); - ok(hr == S_OK, "GetAbsoluteUri returned 0x%08x\n", hr); - if(hr == S_OK) { - ok(!strcmp_w(security_expectedW, received), "Expected %s but got %s\n", - wine_dbgstr_w(security_expectedW), wine_dbgstr_w(received)); - } - SysFreeString(received); - } - if(result) IUri_Release(result); - } - if(uri) IUri_Release(uri); -} - -START_TEST(sec_mgr) -{ - HMODULE hurlmon; - int argc; - char **argv; - - hurlmon = GetModuleHandle("urlmon.dll"); - pCoInternetCreateSecurityManager = (void*) GetProcAddress(hurlmon, "CoInternetCreateSecurityManager"); - pCoInternetCreateZoneManager = (void*) GetProcAddress(hurlmon, "CoInternetCreateZoneManager"); - pCoInternetGetSecurityUrl = (void*) GetProcAddress(hurlmon, "CoInternetGetSecurityUrl"); - pCoInternetGetSecurityUrlEx = (void*) GetProcAddress(hurlmon, "CoInternetGetSecurityUrlEx"); - pCreateUri = (void*) GetProcAddress(hurlmon, "CreateUri"); - pCoInternetGetSession = (void*) GetProcAddress(hurlmon, "CoInternetGetSession"); - - if (!pCoInternetCreateSecurityManager || !pCoInternetCreateZoneManager || - !pCoInternetGetSecurityUrl) { - win_skip("Various CoInternet* functions not present in IE 4.0\n"); - return; - } - - argc = winetest_get_mainargs(&argv); - if(argc > 2 && !strcmp(argv[2], "domain_tests")) { - test_zone_domain_mappings(); - return; - } - - OleInitialize(NULL); - register_protocols(); - - test_InternetGetSecurityUrl(); - - if(!pCoInternetGetSecurityUrlEx || !pCreateUri) - win_skip("Skipping CoInternetGetSecurityUrlEx tests, IE too old\n"); - else { - test_InternetGetSecurityUrlEx(); - test_InternetGetSecurityUrlEx_Pluggable(); - } - - test_SecurityManager(); - test_polices(); - test_zone_domains(); - test_CoInternetCreateZoneManager(); - test_CreateZoneEnumerator(); - test_GetZoneActionPolicy(); - test_GetZoneAt(); - test_GetZoneAttributes(); - test_SetZoneAttributes(); - test_InternetSecurityMarshalling(); - - unregister_protocols(); - OleUninitialize(); -} diff --git a/rostests/winetests/urlmon/stream.c b/rostests/winetests/urlmon/stream.c deleted file mode 100644 index fc3f6394cbb..00000000000 --- a/rostests/winetests/urlmon/stream.c +++ /dev/null @@ -1,382 +0,0 @@ -/* - * Copyright 2007 Robert Shearman 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 - */ - -#define COBJMACROS -#define CONST_VTABLE - -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "ole2.h" -#include "urlmon.h" -#include "wininet.h" - -#define DEFINE_EXPECT(func) \ - static BOOL expect_ ## func = FALSE, called_ ## func = FALSE - -#define SET_EXPECT(func) \ - expect_ ## func = TRUE - -#define CHECK_EXPECT(func) \ - do { \ - ok(expect_ ##func, "unexpected call " #func "\n"); \ - expect_ ## func = FALSE; \ - called_ ## func = TRUE; \ - }while(0) - -#define CHECK_EXPECT2(func) \ - do { \ - ok(expect_ ##func, "unexpected call " #func "\n"); \ - called_ ## func = TRUE; \ - }while(0) - -#define CHECK_CALLED(func) \ - do { \ - ok(called_ ## func, "expected " #func "\n"); \ - expect_ ## func = called_ ## func = FALSE; \ - }while(0) - -#define CHECK_NOT_CALLED(func) \ - do { \ - ok(!called_ ## func, "unexpected " #func "\n"); \ - expect_ ## func = called_ ## func = FALSE; \ - }while(0) - -#define CLEAR_CALLED(func) \ - expect_ ## func = called_ ## func = FALSE - -DEFINE_EXPECT(QueryInterface_IServiceProvider); -DEFINE_EXPECT(OnStartBinding); -DEFINE_EXPECT(OnProgress_FINDINGRESOURCE); -DEFINE_EXPECT(OnProgress_CONNECTING); -DEFINE_EXPECT(OnProgress_SENDINGREQUEST); -DEFINE_EXPECT(OnProgress_MIMETYPEAVAILABLE); -DEFINE_EXPECT(OnProgress_BEGINDOWNLOADDATA); -DEFINE_EXPECT(OnProgress_DOWNLOADINGDATA); -DEFINE_EXPECT(OnProgress_ENDDOWNLOADDATA); -DEFINE_EXPECT(OnStopBinding); -DEFINE_EXPECT(OnDataAvailable); -DEFINE_EXPECT(GetBindInfo); - -static const CHAR wszIndexHtmlA[] = "index.html"; -static const WCHAR wszIndexHtml[] = {'i','n','d','e','x','.','h','t','m','l',0}; -static WCHAR INDEX_HTML[MAX_PATH]; -static const char szHtmlDoc[] = ""; - -static HRESULT WINAPI statusclb_QueryInterface(IBindStatusCallback *iface, REFIID riid, void **ppv) -{ - if (IsEqualGUID(&IID_IBindStatusCallback, riid) || - IsEqualGUID(&IID_IUnknown, riid)) - { - *ppv = iface; - return S_OK; - } - else if (IsEqualGUID(&IID_IServiceProvider, riid)) - { - CHECK_EXPECT(QueryInterface_IServiceProvider); - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI statusclb_AddRef(IBindStatusCallback *iface) -{ - return 2; -} - -static ULONG WINAPI statusclb_Release(IBindStatusCallback *iface) -{ - return 1; -} - -static HRESULT WINAPI statusclb_OnStartBinding(IBindStatusCallback *iface, DWORD dwReserved, - IBinding *pib) -{ - HRESULT hres; - IMoniker *mon; - - CHECK_EXPECT(OnStartBinding); - - ok(pib != NULL, "pib should not be NULL\n"); - - hres = IBinding_QueryInterface(pib, &IID_IMoniker, (void**)&mon); - ok(hres == E_NOINTERFACE, "IBinding should not have IMoniker interface\n"); - if(SUCCEEDED(hres)) - IMoniker_Release(mon); - - return S_OK; -} - -static HRESULT WINAPI statusclb_GetPriority(IBindStatusCallback *iface, LONG *pnPriority) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI statusclb_OnLowResource(IBindStatusCallback *iface, DWORD reserved) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI statusclb_OnProgress(IBindStatusCallback *iface, ULONG ulProgress, - ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText) -{ - switch(ulStatusCode) { - case BINDSTATUS_FINDINGRESOURCE: - CHECK_EXPECT(OnProgress_FINDINGRESOURCE); - break; - case BINDSTATUS_CONNECTING: - CHECK_EXPECT(OnProgress_CONNECTING); - break; - case BINDSTATUS_SENDINGREQUEST: - CHECK_EXPECT(OnProgress_SENDINGREQUEST); - break; - case BINDSTATUS_MIMETYPEAVAILABLE: - CHECK_EXPECT(OnProgress_MIMETYPEAVAILABLE); - break; - case BINDSTATUS_BEGINDOWNLOADDATA: - CHECK_EXPECT(OnProgress_BEGINDOWNLOADDATA); - ok(szStatusText != NULL, "szStatusText == NULL\n"); - break; - case BINDSTATUS_DOWNLOADINGDATA: - CHECK_EXPECT2(OnProgress_DOWNLOADINGDATA); - break; - case BINDSTATUS_ENDDOWNLOADDATA: - CHECK_EXPECT(OnProgress_ENDDOWNLOADDATA); - ok(szStatusText != NULL, "szStatusText == NULL\n"); - break; - case BINDSTATUS_CACHEFILENAMEAVAILABLE: - ok(szStatusText != NULL, "szStatusText == NULL\n"); - break; - default: - todo_wine { ok(0, "unexpected code %d\n", ulStatusCode); } - }; - return S_OK; -} - -static HRESULT WINAPI statusclb_OnStopBinding(IBindStatusCallback *iface, HRESULT hresult, LPCWSTR szError) -{ - CHECK_EXPECT(OnStopBinding); - - /* ignore DNS failure */ - if (hresult != HRESULT_FROM_WIN32(ERROR_INTERNET_NAME_NOT_RESOLVED)) - { - ok(SUCCEEDED(hresult), "Download failed: %08x\n", hresult); - ok(szError == NULL, "szError should be NULL\n"); - } - - return S_OK; -} - -static HRESULT WINAPI statusclb_GetBindInfo(IBindStatusCallback *iface, DWORD *grfBINDF, BINDINFO *pbindinfo) -{ - DWORD cbSize; - - CHECK_EXPECT(GetBindInfo); - - *grfBINDF = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA; - cbSize = pbindinfo->cbSize; - memset(pbindinfo, 0, cbSize); - pbindinfo->cbSize = cbSize; - - return S_OK; -} - -static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallback *iface, DWORD grfBSCF, - DWORD dwSize, FORMATETC* pformatetc, STGMEDIUM* pstgmed) -{ - HRESULT hres; - DWORD readed; - BYTE buf[512]; - - CHECK_EXPECT2(OnDataAvailable); - - if (0) - { - /* FIXME: Uncomment after removing BindToStorage hack. */ - ok(pformatetc != NULL, "pformatetx == NULL\n"); - if(pformatetc) { - ok(pformatetc->cfFormat == 0xc02d, "clipformat=%x\n", pformatetc->cfFormat); - ok(pformatetc->ptd == NULL, "ptd = %p\n", pformatetc->ptd); - ok(pformatetc->dwAspect == 1, "dwAspect=%u\n", pformatetc->dwAspect); - ok(pformatetc->lindex == -1, "lindex=%d\n", pformatetc->lindex); - ok(pformatetc->tymed == TYMED_ISTREAM, "tymed=%u\n", pformatetc->tymed); - } - - ok(pstgmed != NULL, "stgmeg == NULL\n"); - if(pstgmed) { - ok(pstgmed->tymed == TYMED_ISTREAM, "tymed=%u\n", pstgmed->tymed); - ok(U(*pstgmed).pstm != NULL, "pstm == NULL\n"); - ok(pstgmed->pUnkForRelease != NULL, "pUnkForRelease == NULL\n"); - } - } - - if(U(*pstgmed).pstm) { - do hres = IStream_Read(U(*pstgmed).pstm, buf, 512, &readed); - while(hres == S_OK); - ok(hres == S_FALSE || hres == E_PENDING, "IStream_Read returned %08x\n", hres); - } - - return S_OK; -} - -static HRESULT WINAPI statusclb_OnObjectAvailable(IBindStatusCallback *iface, REFIID riid, IUnknown *punk) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static const IBindStatusCallbackVtbl BindStatusCallbackVtbl = { - statusclb_QueryInterface, - statusclb_AddRef, - statusclb_Release, - statusclb_OnStartBinding, - statusclb_GetPriority, - statusclb_OnLowResource, - statusclb_OnProgress, - statusclb_OnStopBinding, - statusclb_GetBindInfo, - statusclb_OnDataAvailable, - statusclb_OnObjectAvailable -}; - -static IBindStatusCallback BindStatusCallback = { &BindStatusCallbackVtbl }; - -static void set_file_url(char *path) -{ - char INDEX_HTML_A[MAX_PATH]; - - lstrcpyA(INDEX_HTML_A, "file:///"); - lstrcatA(INDEX_HTML_A, path); - MultiByteToWideChar(CP_ACP, 0, INDEX_HTML_A, -1, INDEX_HTML, MAX_PATH); -} - -static void create_file(void) -{ - HANDLE file; - DWORD size; - CHAR path[MAX_PATH]; - - file = CreateFileA(wszIndexHtmlA, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, NULL); - ok(file != INVALID_HANDLE_VALUE, "CreateFile failed\n"); - if(file == INVALID_HANDLE_VALUE) - return; - - WriteFile(file, szHtmlDoc, sizeof(szHtmlDoc)-1, &size, NULL); - CloseHandle(file); - - GetCurrentDirectoryA(MAX_PATH, path); - lstrcatA(path, "\\"); - lstrcatA(path, wszIndexHtmlA); - set_file_url(path); -} - -static void test_URLOpenBlockingStreamW(void) -{ - HRESULT hr; - IStream *pStream = NULL; - char buffer[256]; - - hr = URLOpenBlockingStreamW(NULL, NULL, &pStream, 0, &BindStatusCallback); - ok(hr == E_INVALIDARG, "URLOpenBlockingStreamW should have failed with E_INVALIDARG instead of 0x%08x\n", hr); - if (0) /* crashes on Win2k */ - { - hr = URLOpenBlockingStreamW(NULL, INDEX_HTML, NULL, 0, &BindStatusCallback); - ok(hr == E_INVALIDARG, "URLOpenBlockingStreamW should have failed with E_INVALIDARG instead of 0x%08x\n", hr); - } - - SET_EXPECT(GetBindInfo); - SET_EXPECT(QueryInterface_IServiceProvider); - SET_EXPECT(OnStartBinding); - SET_EXPECT(OnProgress_SENDINGREQUEST); - SET_EXPECT(OnProgress_MIMETYPEAVAILABLE); - SET_EXPECT(OnProgress_BEGINDOWNLOADDATA); - SET_EXPECT(OnProgress_ENDDOWNLOADDATA); - SET_EXPECT(OnStopBinding); - - hr = URLOpenBlockingStreamW(NULL, INDEX_HTML, &pStream, 0, &BindStatusCallback); - ok(hr == S_OK, "URLOpenBlockingStreamW failed with error 0x%08x\n", hr); - - CHECK_CALLED(GetBindInfo); - todo_wine CHECK_CALLED(QueryInterface_IServiceProvider); - CHECK_CALLED(OnStartBinding); - CHECK_CALLED(OnProgress_SENDINGREQUEST); - CHECK_CALLED(OnProgress_MIMETYPEAVAILABLE); - CHECK_CALLED(OnProgress_BEGINDOWNLOADDATA); - CHECK_CALLED(OnProgress_ENDDOWNLOADDATA); - CHECK_CALLED(OnStopBinding); - - ok(pStream != NULL, "pStream is NULL\n"); - if(pStream) - { - hr = IStream_Read(pStream, buffer, sizeof(buffer), NULL); - ok(hr == S_OK, "IStream_Read failed with error 0x%08x\n", hr); - ok(!memcmp(buffer, szHtmlDoc, sizeof(szHtmlDoc)-1), "read data differs from file\n"); - - IStream_Release(pStream); - } -} - -static void test_URLOpenStreamW(void) -{ - HRESULT hr; - - hr = URLOpenStreamW(NULL, NULL, 0, &BindStatusCallback); - ok(hr == E_INVALIDARG, "URLOpenStreamW should have failed with E_INVALIDARG instead of 0x%08x\n", hr); - - SET_EXPECT(GetBindInfo); - SET_EXPECT(QueryInterface_IServiceProvider); - SET_EXPECT(OnStartBinding); - SET_EXPECT(OnProgress_SENDINGREQUEST); - SET_EXPECT(OnProgress_MIMETYPEAVAILABLE); - SET_EXPECT(OnProgress_BEGINDOWNLOADDATA); - SET_EXPECT(OnProgress_ENDDOWNLOADDATA); - SET_EXPECT(OnDataAvailable); - SET_EXPECT(OnStopBinding); - - hr = URLOpenStreamW(NULL, INDEX_HTML, 0, &BindStatusCallback); - ok(hr == S_OK, "URLOpenStreamW failed with error 0x%08x\n", hr); - - CHECK_CALLED(GetBindInfo); - todo_wine CHECK_CALLED(QueryInterface_IServiceProvider); - CHECK_CALLED(OnStartBinding); - CHECK_CALLED(OnProgress_SENDINGREQUEST); - CHECK_CALLED(OnProgress_MIMETYPEAVAILABLE); - CHECK_CALLED(OnProgress_BEGINDOWNLOADDATA); - CHECK_CALLED(OnProgress_ENDDOWNLOADDATA); - CHECK_CALLED(OnDataAvailable); - CHECK_CALLED(OnStopBinding); -} - -START_TEST(stream) -{ - if(!GetProcAddress(GetModuleHandleA("urlmon.dll"), "CompareSecurityIds")) { - win_skip("Too old IE\n"); - return; - } - - create_file(); - test_URLOpenBlockingStreamW(); - test_URLOpenStreamW(); - DeleteFileA(wszIndexHtmlA); -} diff --git a/rostests/winetests/urlmon/testlist.c b/rostests/winetests/urlmon/testlist.c deleted file mode 100644 index c6709e8adea..00000000000 --- a/rostests/winetests/urlmon/testlist.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_generated(void); -extern void func_misc(void); -extern void func_protocol(void); -extern void func_sec_mgr(void); -extern void func_stream(void); -extern void func_uri(void); -extern void func_url(void); - -const struct test winetest_testlist[] = -{ - { "generated", func_generated }, - { "misc", func_misc }, - { "protocol", func_protocol }, - { "sec_mgr", func_sec_mgr }, - { "stream", func_stream }, - { "uri", func_uri }, - { "url", func_url }, - { 0, 0 } -}; diff --git a/rostests/winetests/urlmon/uri.c b/rostests/winetests/urlmon/uri.c deleted file mode 100644 index 930622a8131..00000000000 --- a/rostests/winetests/urlmon/uri.c +++ /dev/null @@ -1,10140 +0,0 @@ -/* - * UrlMon IUri tests - * - * Copyright 2010 Thomas Mullaly - * - * 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 - -#define COBJMACROS -#define CONST_VTABLE - -#include "windef.h" -#include "winbase.h" -#include "urlmon.h" -#include "shlwapi.h" -#include "wininet.h" -#include "strsafe.h" - -#define URI_STR_PROPERTY_COUNT Uri_PROPERTY_STRING_LAST+1 -#define URI_DWORD_PROPERTY_COUNT (Uri_PROPERTY_DWORD_LAST - Uri_PROPERTY_DWORD_START)+1 -#define URI_BUILDER_STR_PROPERTY_COUNT 7 - -#define DEFINE_EXPECT(func) \ - static BOOL expect_ ## func = FALSE, called_ ## func = FALSE - -#define SET_EXPECT(func) \ - expect_ ## func = TRUE - -#define CHECK_EXPECT(func) \ - do { \ - ok(expect_ ##func, "unexpected call " #func "\n"); \ - expect_ ## func = FALSE; \ - called_ ## func = TRUE; \ - }while(0) - -#define CHECK_EXPECT2(func) \ - do { \ - ok(expect_ ##func, "unexpected call " #func "\n"); \ - called_ ## func = TRUE; \ - }while(0) - -#define CHECK_CALLED(func) \ - do { \ - ok(called_ ## func, "expected " #func "\n"); \ - expect_ ## func = called_ ## func = FALSE; \ - }while(0) - -DEFINE_EXPECT(CombineUrl); -DEFINE_EXPECT(ParseUrl); - -static HRESULT (WINAPI *pCreateUri)(LPCWSTR, DWORD, DWORD_PTR, IUri**); -static HRESULT (WINAPI *pCreateUriWithFragment)(LPCWSTR, LPCWSTR, DWORD, DWORD_PTR, IUri**); -static HRESULT (WINAPI *pCreateIUriBuilder)(IUri*, DWORD, DWORD_PTR, IUriBuilder**); -static HRESULT (WINAPI *pCoInternetCombineIUri)(IUri*,IUri*,DWORD,IUri**,DWORD_PTR); -static HRESULT (WINAPI *pCoInternetGetSession)(DWORD,IInternetSession**,DWORD); -static HRESULT (WINAPI *pCoInternetCombineUrlEx)(IUri*,LPCWSTR,DWORD,IUri**,DWORD_PTR); -static HRESULT (WINAPI *pCoInternetParseIUri)(IUri*,PARSEACTION,DWORD,LPWSTR,DWORD,DWORD*,DWORD_PTR); - -static const WCHAR http_urlW[] = { 'h','t','t','p',':','/','/','w','w','w','.','w','i','n','e','h','q', - '.','o','r','g','/',0}; -static const WCHAR http_url_fragW[] = { 'h','t','t','p',':','/','/','w','w','w','.','w','i','n','e','h','q', - '.','o','r','g','/','#','F','r','a','g',0}; - -static const WCHAR combine_baseW[] = {'w','i','n','e','t','e','s','t',':','?','t', - 'e','s','t','i','n','g',0}; -static const WCHAR combine_relativeW[] = {'?','t','e','s','t',0}; -static const WCHAR combine_resultW[] = {'z','i','p',':','t','e','s','t',0}; - -static const WCHAR winetestW[] = {'w','i','n','e','t','e','s','t',0}; - -static const WCHAR parse_urlW[] = {'w','i','n','e','t','e','s','t',':','t','e','s','t',0}; -static const WCHAR parse_resultW[] = {'z','i','p',':','t','e','s','t',0}; - -static PARSEACTION parse_action; -static DWORD parse_flags; - -typedef struct _uri_create_flag_test { - DWORD flags; - HRESULT expected; -} uri_create_flag_test; - -static const uri_create_flag_test invalid_flag_tests[] = { - /* Set of invalid flag combinations to test for. */ - {Uri_CREATE_DECODE_EXTRA_INFO | Uri_CREATE_NO_DECODE_EXTRA_INFO, E_INVALIDARG}, - {Uri_CREATE_CANONICALIZE | Uri_CREATE_NO_CANONICALIZE, E_INVALIDARG}, - {Uri_CREATE_CRACK_UNKNOWN_SCHEMES | Uri_CREATE_NO_CRACK_UNKNOWN_SCHEMES, E_INVALIDARG}, - {Uri_CREATE_PRE_PROCESS_HTML_URI | Uri_CREATE_NO_PRE_PROCESS_HTML_URI, E_INVALIDARG}, - {Uri_CREATE_IE_SETTINGS | Uri_CREATE_NO_IE_SETTINGS, E_INVALIDARG} -}; - -typedef struct _uri_str_property { - const char* value; - HRESULT expected; - BOOL todo; - const char* broken_value; -} uri_str_property; - -typedef struct _uri_dword_property { - DWORD value; - HRESULT expected; - BOOL todo; -} uri_dword_property; - -typedef struct _uri_properties { - const char* uri; - DWORD create_flags; - HRESULT create_expected; - BOOL create_todo; - - uri_str_property str_props[URI_STR_PROPERTY_COUNT]; - uri_dword_property dword_props[URI_DWORD_PROPERTY_COUNT]; -} uri_properties; - -static const uri_properties uri_tests[] = { - { "http://www.winehq.org/tests/../tests/../..", 0, S_OK, FALSE, - { - {"http://www.winehq.org/",S_OK,FALSE}, /* ABSOLUTE_URI */ - {"www.winehq.org",S_OK,FALSE}, /* AUTHORITY */ - {"http://www.winehq.org/",S_OK,FALSE}, /* DISPLAY_URI */ - {"winehq.org",S_OK,FALSE}, /* DOMAIN */ - {"",S_FALSE,FALSE}, /* EXTENSION */ - {"",S_FALSE,FALSE}, /* FRAGMENT */ - {"www.winehq.org",S_OK,FALSE}, /* HOST */ - {"",S_FALSE,FALSE}, /* PASSWORD */ - {"/",S_OK,FALSE}, /* PATH */ - {"/",S_OK,FALSE}, /* PATH_AND_QUERY */ - {"",S_FALSE,FALSE}, /* QUERY */ - {"http://www.winehq.org/tests/../tests/../..",S_OK,FALSE}, /* RAW_URI */ - {"http",S_OK,FALSE}, /* SCHEME_NAME */ - {"",S_FALSE,FALSE}, /* USER_INFO */ - {"",S_FALSE,FALSE} /* USER_NAME */ - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, /* HOST_TYPE */ - {80,S_OK,FALSE}, /* PORT */ - {URL_SCHEME_HTTP,S_OK,FALSE}, /* SCHEME */ - {URLZONE_INVALID,E_NOTIMPL,FALSE} /* ZONE */ - } - }, - { "http://winehq.org/tests/.././tests", 0, S_OK, FALSE, - { - {"http://winehq.org/tests",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"http://winehq.org/tests",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/tests",S_OK,FALSE}, - {"/tests",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://winehq.org/tests/.././tests",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "HtTp://www.winehq.org/tests/..?query=x&return=y", 0, S_OK, FALSE, - { - {"http://www.winehq.org/?query=x&return=y",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"http://www.winehq.org/?query=x&return=y",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/?query=x&return=y",S_OK,FALSE}, - {"?query=x&return=y",S_OK,FALSE}, - {"HtTp://www.winehq.org/tests/..?query=x&return=y",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE}, - } - }, - { "hTTp://us%45r%3Ainfo@examp%4CE.com:80/path/a/b/./c/../%2E%2E/Forbidden'<|> Characters", 0, S_OK, FALSE, - { - {"http://usEr%3Ainfo@example.com/path/a/Forbidden'%3C%7C%3E%20Characters",S_OK,FALSE}, - {"usEr%3Ainfo@example.com",S_OK,FALSE}, - {"http://example.com/path/a/Forbidden'%3C%7C%3E%20Characters",S_OK,FALSE}, - {"example.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"example.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/path/a/Forbidden'%3C%7C%3E%20Characters",S_OK,FALSE}, - {"/path/a/Forbidden'%3C%7C%3E%20Characters",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"hTTp://us%45r%3Ainfo@examp%4CE.com:80/path/a/b/./c/../%2E%2E/Forbidden'<|> Characters",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"usEr%3Ainfo",S_OK,FALSE}, - {"usEr%3Ainfo",S_OK,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE}, - } - }, - { "ftp://winepass:wine@ftp.winehq.org:9999/dir/foo bar.txt", 0, S_OK, FALSE, - { - {"ftp://winepass:wine@ftp.winehq.org:9999/dir/foo%20bar.txt",S_OK,FALSE}, - {"winepass:wine@ftp.winehq.org:9999",S_OK,FALSE}, - {"ftp://ftp.winehq.org:9999/dir/foo%20bar.txt",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {".txt",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"ftp.winehq.org",S_OK,FALSE}, - {"wine",S_OK,FALSE}, - {"/dir/foo%20bar.txt",S_OK,FALSE}, - {"/dir/foo%20bar.txt",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"ftp://winepass:wine@ftp.winehq.org:9999/dir/foo bar.txt",S_OK,FALSE}, - {"ftp",S_OK,FALSE}, - {"winepass:wine",S_OK,FALSE}, - {"winepass",S_OK,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {9999,S_OK,FALSE}, - {URL_SCHEME_FTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "file://c:\\tests\\../tests/foo%20bar.mp3", 0, S_OK, FALSE, - { - {"file:///c:/tests/foo%2520bar.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file:///c:/tests/foo%2520bar.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"/c:/tests/foo%2520bar.mp3",S_OK,FALSE}, - {"/c:/tests/foo%2520bar.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file://c:\\tests\\../tests/foo%20bar.mp3",S_OK,FALSE}, - {"file",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_FILE,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "FILE://localhost/test dir\\../tests/test%20file.README.txt", 0, S_OK, FALSE, - { - {"file:///tests/test%20file.README.txt",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file:///tests/test%20file.README.txt",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".txt",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"/tests/test%20file.README.txt",S_OK,FALSE}, - {"/tests/test%20file.README.txt",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"FILE://localhost/test dir\\../tests/test%20file.README.txt",S_OK,FALSE}, - {"file",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_FILE,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "urn:nothing:should:happen here", 0, S_OK, FALSE, - { - {"urn:nothing:should:happen here",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"urn:nothing:should:happen here",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"nothing:should:happen here",S_OK,FALSE}, - {"nothing:should:happen here",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"urn:nothing:should:happen here",S_OK,FALSE}, - {"urn",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "http://127.0.0.1/tests/../test dir/./test.txt", 0, S_OK, FALSE, - { - {"http://127.0.0.1/test%20dir/test.txt",S_OK,FALSE}, - {"127.0.0.1",S_OK,FALSE}, - {"http://127.0.0.1/test%20dir/test.txt",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".txt",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"127.0.0.1",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/test%20dir/test.txt",S_OK,FALSE}, - {"/test%20dir/test.txt",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://127.0.0.1/tests/../test dir/./test.txt",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_IPV4,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]", 0, S_OK, FALSE, - { - {"http://[fedc:ba98:7654:3210:fedc:ba98:7654:3210]/",S_OK,FALSE}, - {"[fedc:ba98:7654:3210:fedc:ba98:7654:3210]",S_OK,FALSE}, - {"http://[fedc:ba98:7654:3210:fedc:ba98:7654:3210]/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"fedc:ba98:7654:3210:fedc:ba98:7654:3210",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_IPV6,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "ftp://[::13.1.68.3]", 0, S_OK, FALSE, - { - {"ftp://[::13.1.68.3]/",S_OK,FALSE}, - {"[::13.1.68.3]",S_OK,FALSE}, - {"ftp://[::13.1.68.3]/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"::13.1.68.3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"ftp://[::13.1.68.3]",S_OK,FALSE}, - {"ftp",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_IPV6,S_OK,FALSE}, - {21,S_OK,FALSE}, - {URL_SCHEME_FTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "http://[FEDC:BA98:0:0:0:0:0:3210]", 0, S_OK, FALSE, - { - {"http://[fedc:ba98::3210]/",S_OK,FALSE}, - {"[fedc:ba98::3210]",S_OK,FALSE}, - {"http://[fedc:ba98::3210]/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"fedc:ba98::3210",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://[FEDC:BA98:0:0:0:0:0:3210]",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - }, - { - {Uri_HOST_IPV6,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "1234://www.winehq.org", 0, S_OK, FALSE, - { - {"1234://www.winehq.org/",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"1234://www.winehq.org/",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"1234://www.winehq.org",S_OK,FALSE}, - {"1234",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Test's to make sure the parser/canonicalizer handles implicit file schemes correctly. */ - { "C:/test/test.mp3", Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME, S_OK, FALSE, - { - {"file:///C:/test/test.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file:///C:/test/test.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"/C:/test/test.mp3",S_OK,FALSE}, - {"/C:/test/test.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"C:/test/test.mp3",S_OK,FALSE}, - {"file",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_FILE,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Test's to make sure the parser/canonicalizer handles implicit file schemes correctly. */ - { "\\\\Server/test.mp3", Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME, S_OK, FALSE, - { - {"file://server/test.mp3",S_OK,FALSE}, - {"server",S_OK,FALSE}, - {"file://server/test.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"server",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/test.mp3",S_OK,FALSE}, - {"/test.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"\\\\Server/test.mp3",S_OK,FALSE}, - {"file",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_FILE,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "www.winehq.org/test", Uri_CREATE_ALLOW_IMPLICIT_WILDCARD_SCHEME, S_OK, FALSE, - { - {"*:www.winehq.org/test",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"*:www.winehq.org/test",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/test",S_OK,FALSE}, - {"/test",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"www.winehq.org/test",S_OK,FALSE}, - {"*",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_WILDCARD,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Valid since the '*' is the only character in the scheme name. */ - { "*:www.winehq.org/test", 0, S_OK, FALSE, - { - {"*:www.winehq.org/test",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"*:www.winehq.org/test",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/test",S_OK,FALSE}, - {"/test",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"*:www.winehq.org/test",S_OK,FALSE}, - {"*",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_WILDCARD,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "/../some dir/test.ext", Uri_CREATE_ALLOW_RELATIVE, S_OK, FALSE, - { - {"/../some dir/test.ext",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/../some dir/test.ext",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".ext",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"/../some dir/test.ext",S_OK,FALSE}, - {"/../some dir/test.ext",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/../some dir/test.ext",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "//implicit/wildcard/uri scheme", Uri_CREATE_ALLOW_RELATIVE|Uri_CREATE_ALLOW_IMPLICIT_WILDCARD_SCHEME, S_OK, FALSE, - { - {"*://implicit/wildcard/uri%20scheme",S_OK,FALSE}, - {"",S_OK,FALSE}, - {"*://implicit/wildcard/uri%20scheme",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"//implicit/wildcard/uri%20scheme",S_OK,FALSE}, - {"//implicit/wildcard/uri%20scheme",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"//implicit/wildcard/uri scheme",S_OK,FALSE}, - {"*",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_WILDCARD,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* URI is considered opaque since CREATE_NO_CRACK_UNKNOWN_SCHEMES is set and its an unknown scheme. */ - { "zip://google.com", Uri_CREATE_NO_CRACK_UNKNOWN_SCHEMES, S_OK, FALSE, - { - {"zip:/.//google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"zip:/.//google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"/.//google.com",S_OK,FALSE}, - {"/.//google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"zip://google.com",S_OK,FALSE}, - {"zip",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Windows uses the first occurrence of ':' to delimit the userinfo. */ - { "ftp://user:pass:word@winehq.org/", 0, S_OK, FALSE, - { - {"ftp://user:pass:word@winehq.org/",S_OK,FALSE}, - {"user:pass:word@winehq.org",S_OK,FALSE}, - {"ftp://winehq.org/",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"pass:word",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"ftp://user:pass:word@winehq.org/",S_OK,FALSE}, - {"ftp",S_OK,FALSE}, - {"user:pass:word",S_OK,FALSE}, - {"user",S_OK,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {21,S_OK,FALSE}, - {URL_SCHEME_FTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Make sure % encoded unreserved characters are decoded. */ - { "ftp://w%49%4Ee:PA%53%53@ftp.google.com/", 0, S_OK, FALSE, - { - {"ftp://wINe:PASS@ftp.google.com/",S_OK,FALSE}, - {"wINe:PASS@ftp.google.com",S_OK,FALSE}, - {"ftp://ftp.google.com/",S_OK,FALSE}, - {"google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"ftp.google.com",S_OK,FALSE}, - {"PASS",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"ftp://w%49%4Ee:PA%53%53@ftp.google.com/",S_OK,FALSE}, - {"ftp",S_OK,FALSE}, - {"wINe:PASS",S_OK,FALSE}, - {"wINe",S_OK,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {21,S_OK,FALSE}, - {URL_SCHEME_FTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Make sure % encoded characters which are NOT unreserved are NOT decoded. */ - { "ftp://w%5D%5Be:PA%7B%7D@ftp.google.com/", 0, S_OK, FALSE, - { - {"ftp://w%5D%5Be:PA%7B%7D@ftp.google.com/",S_OK,FALSE}, - {"w%5D%5Be:PA%7B%7D@ftp.google.com",S_OK,FALSE}, - {"ftp://ftp.google.com/",S_OK,FALSE}, - {"google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"ftp.google.com",S_OK,FALSE}, - {"PA%7B%7D",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"ftp://w%5D%5Be:PA%7B%7D@ftp.google.com/",S_OK,FALSE}, - {"ftp",S_OK,FALSE}, - {"w%5D%5Be:PA%7B%7D",S_OK,FALSE}, - {"w%5D%5Be",S_OK,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {21,S_OK,FALSE}, - {URL_SCHEME_FTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* You're allowed to have an empty password portion in the userinfo section. */ - { "ftp://empty:@ftp.google.com/", 0, S_OK, FALSE, - { - {"ftp://empty:@ftp.google.com/",S_OK,FALSE}, - {"empty:@ftp.google.com",S_OK,FALSE}, - {"ftp://ftp.google.com/",S_OK,FALSE}, - {"google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"ftp.google.com",S_OK,FALSE}, - {"",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"ftp://empty:@ftp.google.com/",S_OK,FALSE}, - {"ftp",S_OK,FALSE}, - {"empty:",S_OK,FALSE}, - {"empty",S_OK,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {21,S_OK,FALSE}, - {URL_SCHEME_FTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Make sure forbidden characters in "userinfo" get encoded. */ - { "ftp://\" \"weird@ftp.google.com/", 0, S_OK, FALSE, - { - {"ftp://%22%20%22weird@ftp.google.com/",S_OK,FALSE}, - {"%22%20%22weird@ftp.google.com",S_OK,FALSE}, - {"ftp://ftp.google.com/",S_OK,FALSE}, - {"google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"ftp.google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"ftp://\" \"weird@ftp.google.com/",S_OK,FALSE}, - {"ftp",S_OK,FALSE}, - {"%22%20%22weird",S_OK,FALSE}, - {"%22%20%22weird",S_OK,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {21,S_OK,FALSE}, - {URL_SCHEME_FTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Make sure the forbidden characters don't get percent encoded. */ - { "ftp://\" \"weird@ftp.google.com/", Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS, S_OK, FALSE, - { - {"ftp://\" \"weird@ftp.google.com/",S_OK,FALSE}, - {"\" \"weird@ftp.google.com",S_OK,FALSE}, - {"ftp://ftp.google.com/",S_OK,FALSE}, - {"google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"ftp.google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"ftp://\" \"weird@ftp.google.com/",S_OK,FALSE}, - {"ftp",S_OK,FALSE}, - {"\" \"weird",S_OK,FALSE}, - {"\" \"weird",S_OK,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {21,S_OK,FALSE}, - {URL_SCHEME_FTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Make sure already percent encoded characters don't get unencoded. */ - { "ftp://\"%20\"weird@ftp.google.com/\"%20\"weird", Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS, S_OK, FALSE, - { - {"ftp://\"%20\"weird@ftp.google.com/\"%20\"weird",S_OK,FALSE}, - {"\"%20\"weird@ftp.google.com",S_OK,FALSE}, - {"ftp://ftp.google.com/\"%20\"weird",S_OK,FALSE}, - {"google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"ftp.google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/\"%20\"weird",S_OK,FALSE}, - {"/\"%20\"weird",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"ftp://\"%20\"weird@ftp.google.com/\"%20\"weird",S_OK,FALSE}, - {"ftp",S_OK,FALSE}, - {"\"%20\"weird",S_OK,FALSE}, - {"\"%20\"weird",S_OK,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {21,S_OK,FALSE}, - {URL_SCHEME_FTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Allowed to have invalid % encoded because its an unknown scheme type. */ - { "zip://%xy:word@winehq.org/", 0, S_OK, FALSE, - { - {"zip://%xy:word@winehq.org/",S_OK,FALSE}, - {"%xy:word@winehq.org",S_OK,FALSE}, - {"zip://%xy:word@winehq.org/",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"word",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"zip://%xy:word@winehq.org/",S_OK,FALSE}, - {"zip",S_OK,FALSE}, - {"%xy:word",S_OK,FALSE}, - {"%xy",S_OK,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Unreserved, percent encoded characters aren't decoded in the userinfo becuase the scheme - * isn't known. - */ - { "zip://%2E:%52%53ord@winehq.org/", 0, S_OK, FALSE, - { - {"zip://%2E:%52%53ord@winehq.org/",S_OK,FALSE}, - {"%2E:%52%53ord@winehq.org",S_OK,FALSE}, - {"zip://%2E:%52%53ord@winehq.org/",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"%52%53ord",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"zip://%2E:%52%53ord@winehq.org/",S_OK,FALSE}, - {"zip",S_OK,FALSE}, - {"%2E:%52%53ord",S_OK,FALSE}, - {"%2E",S_OK,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "ftp://[](),'test':word@winehq.org/", 0, S_OK, FALSE, - { - {"ftp://[](),'test':word@winehq.org/",S_OK,FALSE}, - {"[](),'test':word@winehq.org",S_OK,FALSE}, - {"ftp://winehq.org/",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"word",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"ftp://[](),'test':word@winehq.org/",S_OK,FALSE}, - {"ftp",S_OK,FALSE}, - {"[](),'test':word",S_OK,FALSE}, - {"[](),'test'",S_OK,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {21,S_OK,FALSE}, - {URL_SCHEME_FTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "ftp://test?:word@winehq.org/", 0, S_OK, FALSE, - { - {"ftp://test/?:word@winehq.org/",S_OK,FALSE}, - {"test",S_OK,FALSE}, - {"ftp://test/?:word@winehq.org/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"test",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/?:word@winehq.org/",S_OK,FALSE}, - {"?:word@winehq.org/",S_OK,FALSE}, - {"ftp://test?:word@winehq.org/",S_OK,FALSE}, - {"ftp",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {21,S_OK,FALSE}, - {URL_SCHEME_FTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "ftp://test#:word@winehq.org/", 0, S_OK, FALSE, - { - {"ftp://test/#:word@winehq.org/",S_OK,FALSE}, - {"test",S_OK,FALSE}, - {"ftp://test/#:word@winehq.org/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"#:word@winehq.org/",S_OK,FALSE}, - {"test",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"ftp://test#:word@winehq.org/",S_OK,FALSE}, - {"ftp",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {21,S_OK,FALSE}, - {URL_SCHEME_FTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Allowed to have a backslash in the userinfo since it's an unknown scheme. */ - { "zip://test\\:word@winehq.org/", 0, S_OK, FALSE, - { - {"zip://test\\:word@winehq.org/",S_OK,FALSE}, - {"test\\:word@winehq.org",S_OK,FALSE}, - {"zip://test\\:word@winehq.org/",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"word",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"zip://test\\:word@winehq.org/",S_OK,FALSE}, - {"zip",S_OK,FALSE}, - {"test\\:word",S_OK,FALSE}, - {"test\\",S_OK,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* It normalizes IPv4 addresses correctly. */ - { "http://127.000.000.100/", 0, S_OK, FALSE, - { - {"http://127.0.0.100/",S_OK,FALSE}, - {"127.0.0.100",S_OK,FALSE}, - {"http://127.0.0.100/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"127.0.0.100",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://127.000.000.100/",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_IPV4,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Make sure it normalizes partial IPv4 addresses correctly. */ - { "http://127.0/", 0, S_OK, FALSE, - { - {"http://127.0.0.0/",S_OK,FALSE}, - {"127.0.0.0",S_OK,FALSE}, - {"http://127.0.0.0/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"127.0.0.0",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://127.0/",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_IPV4,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Make sure it converts implicit IPv4's correctly. */ - { "http://123456/", 0, S_OK, FALSE, - { - {"http://0.1.226.64/",S_OK,FALSE}, - {"0.1.226.64",S_OK,FALSE}, - {"http://0.1.226.64/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"0.1.226.64",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://123456/",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_IPV4,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* UINT_MAX */ - { "http://4294967295/", 0, S_OK, FALSE, - { - {"http://255.255.255.255/",S_OK,FALSE}, - {"255.255.255.255",S_OK,FALSE}, - {"http://255.255.255.255/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"255.255.255.255",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://4294967295/",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_IPV4,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* UINT_MAX+1 */ - { "http://4294967296/", 0, S_OK, FALSE, - { - {"http://4294967296/",S_OK,FALSE}, - {"4294967296",S_OK,FALSE}, - {"http://4294967296/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"4294967296",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://4294967296/",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Window's doesn't normalize IP address for unknown schemes. */ - { "1234://4294967295/", 0, S_OK, FALSE, - { - {"1234://4294967295/",S_OK,FALSE}, - {"4294967295",S_OK,FALSE}, - {"1234://4294967295/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"4294967295",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"1234://4294967295/",S_OK,FALSE}, - {"1234",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_IPV4,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Window's doesn't normalize IP address for unknown schemes. */ - { "1234://127.001/", 0, S_OK, FALSE, - { - {"1234://127.001/",S_OK,FALSE}, - {"127.001",S_OK,FALSE}, - {"1234://127.001/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"127.001",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"1234://127.001/",S_OK,FALSE}, - {"1234",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_IPV4,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "http://[FEDC:BA98::3210]", 0, S_OK, FALSE, - { - {"http://[fedc:ba98::3210]/",S_OK,FALSE}, - {"[fedc:ba98::3210]",S_OK,FALSE}, - {"http://[fedc:ba98::3210]/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"fedc:ba98::3210",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://[FEDC:BA98::3210]",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - }, - { - {Uri_HOST_IPV6,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "http://[::]", 0, S_OK, FALSE, - { - {"http://[::]/",S_OK,FALSE}, - {"[::]",S_OK,FALSE}, - {"http://[::]/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"::",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://[::]",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - }, - { - {Uri_HOST_IPV6,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "http://[FEDC:BA98::]", 0, S_OK, FALSE, - { - {"http://[fedc:ba98::]/",S_OK,FALSE}, - {"[fedc:ba98::]",S_OK,FALSE}, - {"http://[fedc:ba98::]/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"fedc:ba98::",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://[FEDC:BA98::]",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - }, - { - {Uri_HOST_IPV6,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Valid even with 2 byte elision because it doesn't appear the beginning or end. */ - { "http://[1::3:4:5:6:7:8]", 0, S_OK, FALSE, - { - {"http://[1:0:3:4:5:6:7:8]/",S_OK,FALSE}, - {"[1:0:3:4:5:6:7:8]",S_OK,FALSE}, - {"http://[1:0:3:4:5:6:7:8]/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"1:0:3:4:5:6:7:8",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://[1::3:4:5:6:7:8]",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - }, - { - {Uri_HOST_IPV6,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "http://[v2.34]/", 0, S_OK, FALSE, - { - {"http://[v2.34]/",S_OK,FALSE}, - {"[v2.34]",S_OK,FALSE}, - {"http://[v2.34]/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"[v2.34]",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://[v2.34]/",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Windows ignores ':' if they appear after a '[' on a non-IPLiteral host. */ - { "http://[xyz:12345.com/test", 0, S_OK, FALSE, - { - {"http://[xyz:12345.com/test",S_OK,FALSE}, - {"[xyz:12345.com",S_OK,FALSE}, - {"http://[xyz:12345.com/test",S_OK,FALSE}, - {"[xyz:12345.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"[xyz:12345.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/test",S_OK,FALSE}, - {"/test",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://[xyz:12345.com/test",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Valid URI since the '[' and ']' don't appear at the beginning and end - * of the host name (respectively). - */ - { "ftp://www.[works].com/", 0, S_OK, FALSE, - { - {"ftp://www.[works].com/",S_OK,FALSE}, - {"www.[works].com",S_OK,FALSE}, - {"ftp://www.[works].com/",S_OK,FALSE}, - {"[works].com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"www.[works].com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"ftp://www.[works].com/",S_OK,FALSE}, - {"ftp",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {21,S_OK,FALSE}, - {URL_SCHEME_FTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Considers ':' a delimiter since it appears after the ']'. */ - { "http://www.google.com]:12345/", 0, S_OK, FALSE, - { - {"http://www.google.com]:12345/",S_OK,FALSE}, - {"www.google.com]:12345",S_OK,FALSE}, - {"http://www.google.com]:12345/",S_OK,FALSE}, - {"google.com]",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"www.google.com]",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://www.google.com]:12345/",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {12345,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Unknown scheme types can have invalid % encoded data in the hostname. */ - { "zip://w%XXw%GEw.google.com/", 0, S_OK, FALSE, - { - {"zip://w%XXw%GEw.google.com/",S_OK,FALSE}, - {"w%XXw%GEw.google.com",S_OK,FALSE}, - {"zip://w%XXw%GEw.google.com/",S_OK,FALSE}, - {"google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"w%XXw%GEw.google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"zip://w%XXw%GEw.google.com/",S_OK,FALSE}, - {"zip",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Unknown scheme types hostname doesn't get lower cased. */ - { "zip://GOOGLE.com/", 0, S_OK, FALSE, - { - {"zip://GOOGLE.com/",S_OK,FALSE}, - {"GOOGLE.com",S_OK,FALSE}, - {"zip://GOOGLE.com/",S_OK,FALSE}, - {"GOOGLE.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"GOOGLE.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"zip://GOOGLE.com/",S_OK,FALSE}, - {"zip",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Hostname get's lower cased for known scheme types. */ - { "http://WWW.GOOGLE.com/", 0, S_OK, FALSE, - { - {"http://www.google.com/",S_OK,FALSE}, - {"www.google.com",S_OK,FALSE}, - {"http://www.google.com/",S_OK,FALSE}, - {"google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"www.google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://WWW.GOOGLE.com/",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Characters that get % encoded in the hostname also have their percent - * encoded forms lower cased. - */ - { "http://www.%7Cgoogle|.com/", 0, S_OK, FALSE, - { - {"http://www.%7cgoogle%7c.com/",S_OK,FALSE}, - {"www.%7cgoogle%7c.com",S_OK,FALSE}, - {"http://www.%7cgoogle%7c.com/",S_OK,FALSE}, - {"%7cgoogle%7c.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"www.%7cgoogle%7c.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://www.%7Cgoogle|.com/",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* IPv4 addresses attached to IPv6 can be included in elisions. */ - { "http://[1:2:3:4:5:6:0.0.0.0]", 0, S_OK, FALSE, - { - {"http://[1:2:3:4:5:6::]/",S_OK,FALSE}, - {"[1:2:3:4:5:6::]",S_OK,FALSE}, - {"http://[1:2:3:4:5:6::]/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"1:2:3:4:5:6::",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://[1:2:3:4:5:6:0.0.0.0]",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - }, - { - {Uri_HOST_IPV6,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* IPv4 addresses get normalized. */ - { "http://[::001.002.003.000]", 0, S_OK, FALSE, - { - {"http://[::1.2.3.0]/",S_OK,FALSE}, - {"[::1.2.3.0]",S_OK,FALSE}, - {"http://[::1.2.3.0]/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"::1.2.3.0",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://[::001.002.003.000]",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - }, - { - {Uri_HOST_IPV6,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Windows doesn't do anything to IPv6's in unknown schemes. */ - { "zip://[0001:0:000:0004:0005:0006:001.002.003.000]", 0, S_OK, FALSE, - { - {"zip://[0001:0:000:0004:0005:0006:001.002.003.000]/",S_OK,FALSE}, - {"[0001:0:000:0004:0005:0006:001.002.003.000]",S_OK,FALSE}, - {"zip://[0001:0:000:0004:0005:0006:001.002.003.000]/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"0001:0:000:0004:0005:0006:001.002.003.000",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"zip://[0001:0:000:0004:0005:0006:001.002.003.000]",S_OK,FALSE}, - {"zip",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - }, - { - {Uri_HOST_IPV6,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* IPv4 address is converted into 2 h16 components. */ - { "http://[ffff::192.222.111.32]", 0, S_OK, FALSE, - { - {"http://[ffff::c0de:6f20]/",S_OK,FALSE}, - {"[ffff::c0de:6f20]",S_OK,FALSE}, - {"http://[ffff::c0de:6f20]/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"ffff::c0de:6f20",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://[ffff::192.222.111.32]",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - }, - { - {Uri_HOST_IPV6,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Max value for a port. */ - { "http://google.com:65535", 0, S_OK, FALSE, - { - {"http://google.com:65535/",S_OK,FALSE}, - {"google.com:65535",S_OK,FALSE}, - {"http://google.com:65535/",S_OK,FALSE}, - {"google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://google.com:65535",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {65535,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "zip://google.com:65536", 0, S_OK, FALSE, - { - {"zip://google.com:65536/",S_OK,FALSE}, - {"google.com:65536",S_OK,FALSE}, - {"zip://google.com:65536/",S_OK,FALSE}, - {"google.com:65536",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"google.com:65536",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"zip://google.com:65536",S_OK,FALSE}, - {"zip",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "zip://google.com:65536:25", 0, S_OK, FALSE, - { - {"zip://google.com:65536:25/",S_OK,FALSE}, - {"google.com:65536:25",S_OK,FALSE}, - {"zip://google.com:65536:25/",S_OK,FALSE}, - {"google.com:65536:25",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"google.com:65536:25",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"zip://google.com:65536:25",S_OK,FALSE}, - {"zip",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "zip://[::ffff]:abcd", 0, S_OK, FALSE, - { - {"zip://[::ffff]:abcd/",S_OK,FALSE}, - {"[::ffff]:abcd",S_OK,FALSE}, - {"zip://[::ffff]:abcd/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"[::ffff]:abcd",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"zip://[::ffff]:abcd",S_OK,FALSE}, - {"zip",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "zip://127.0.0.1:abcd", 0, S_OK, FALSE, - { - {"zip://127.0.0.1:abcd/",S_OK,FALSE}, - {"127.0.0.1:abcd",S_OK,FALSE}, - {"zip://127.0.0.1:abcd/",S_OK,FALSE}, - {"0.1:abcd",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"127.0.0.1:abcd",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"zip://127.0.0.1:abcd",S_OK,FALSE}, - {"zip",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Port is just copied over. */ - { "http://google.com:00035", Uri_CREATE_NO_CANONICALIZE, S_OK, FALSE, - { - {"http://google.com:00035",S_OK,FALSE}, - {"google.com:00035",S_OK,FALSE}, - {"http://google.com:00035",S_OK,FALSE,"http://google.com:35"}, - {"google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"http://google.com:00035",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {35,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Default port is copied over. */ - { "http://google.com:80", Uri_CREATE_NO_CANONICALIZE, S_OK, FALSE, - { - {"http://google.com:80",S_OK,FALSE}, - {"google.com:80",S_OK,FALSE}, - {"http://google.com:80",S_OK,FALSE}, - {"google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"http://google.com:80",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "http://google.com.uk", 0, S_OK, FALSE, - { - {"http://google.com.uk/",S_OK,FALSE}, - {"google.com.uk",S_OK,FALSE}, - {"http://google.com.uk/",S_OK,FALSE}, - {"google.com.uk",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"google.com.uk",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://google.com.uk",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "http://google.com.com", 0, S_OK, FALSE, - { - {"http://google.com.com/",S_OK,FALSE}, - {"google.com.com",S_OK,FALSE}, - {"http://google.com.com/",S_OK,FALSE}, - {"com.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"google.com.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://google.com.com",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "http://google.uk.1", 0, S_OK, FALSE, - { - {"http://google.uk.1/",S_OK,FALSE}, - {"google.uk.1",S_OK,FALSE}, - {"http://google.uk.1/",S_OK,FALSE}, - {"google.uk.1",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"google.uk.1",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://google.uk.1",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Since foo isn't a recognized 3 character TLD its considered the domain name. */ - { "http://google.foo.uk", 0, S_OK, FALSE, - { - {"http://google.foo.uk/",S_OK,FALSE}, - {"google.foo.uk",S_OK,FALSE}, - {"http://google.foo.uk/",S_OK,FALSE}, - {"foo.uk",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"google.foo.uk",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://google.foo.uk",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "http://.com", 0, S_OK, FALSE, - { - {"http://.com/",S_OK,FALSE}, - {".com",S_OK,FALSE}, - {"http://.com/",S_OK,FALSE}, - {".com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {".com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://.com",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "http://.uk", 0, S_OK, FALSE, - { - {"http://.uk/",S_OK,FALSE}, - {".uk",S_OK,FALSE}, - {"http://.uk/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {".uk",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://.uk",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "http://www.co.google.com.[]", 0, S_OK, FALSE, - { - {"http://www.co.google.com.[]/",S_OK,FALSE}, - {"www.co.google.com.[]",S_OK,FALSE}, - {"http://www.co.google.com.[]/",S_OK,FALSE}, - {"google.com.[]",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"www.co.google.com.[]",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://www.co.google.com.[]",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "http://co.uk", 0, S_OK, FALSE, - { - {"http://co.uk/",S_OK,FALSE}, - {"co.uk",S_OK,FALSE}, - {"http://co.uk/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"co.uk",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://co.uk",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "http://www.co.google.us.test", 0, S_OK, FALSE, - { - {"http://www.co.google.us.test/",S_OK,FALSE}, - {"www.co.google.us.test",S_OK,FALSE}, - {"http://www.co.google.us.test/",S_OK,FALSE}, - {"us.test",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"www.co.google.us.test",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://www.co.google.us.test",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "http://gov.uk", 0, S_OK, FALSE, - { - {"http://gov.uk/",S_OK,FALSE}, - {"gov.uk",S_OK,FALSE}, - {"http://gov.uk/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"gov.uk",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://gov.uk",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "zip://www.google.com\\test", Uri_CREATE_NO_CANONICALIZE, S_OK, FALSE, - { - {"zip://www.google.com\\test",S_OK,FALSE}, - {"www.google.com\\test",S_OK,FALSE}, - {"zip://www.google.com\\test",S_OK,FALSE}, - {"google.com\\test",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"www.google.com\\test",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"zip://www.google.com\\test",S_OK,FALSE}, - {"zip",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "urn:excepts:bad:%XY:encoded", 0, S_OK, FALSE, - { - {"urn:excepts:bad:%XY:encoded",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"urn:excepts:bad:%XY:encoded",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"excepts:bad:%XY:encoded",S_OK,FALSE}, - {"excepts:bad:%XY:encoded",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"urn:excepts:bad:%XY:encoded",S_OK,FALSE}, - {"urn",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Since the original URI doesn't contain an extra '/' before the path no % encoded values - * are decoded and all '%' are encoded. - */ - { "file://C:/te%3Es%2Et/tes%t.mp3", 0, S_OK, FALSE, - { - {"file:///C:/te%253Es%252Et/tes%25t.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file:///C:/te%253Es%252Et/tes%25t.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"/C:/te%253Es%252Et/tes%25t.mp3",S_OK,FALSE}, - {"/C:/te%253Es%252Et/tes%25t.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file://C:/te%3Es%2Et/tes%t.mp3",S_OK,FALSE}, - {"file",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_FILE,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Since there's a '/' in front of the drive letter, any percent encoded, non-forbidden character - * is decoded and only %'s in front of invalid hex digits are encoded. - */ - { "file:///C:/te%3Es%2Et/t%23es%t.mp3", 0, S_OK, FALSE, - { - {"file:///C:/te%3Es.t/t#es%25t.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file:///C:/te%3Es.t/t#es%25t.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"/C:/te%3Es.t/t#es%25t.mp3",S_OK,FALSE}, - {"/C:/te%3Es.t/t#es%25t.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file:///C:/te%3Es%2Et/t%23es%t.mp3",S_OK,FALSE}, - {"file",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_FILE,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Only unreserved percent encoded characters are decoded for known schemes that aren't file. */ - { "http://[::001.002.003.000]/%3F%23%2E%54/test", 0, S_OK, FALSE, - { - {"http://[::1.2.3.0]/%3F%23.T/test",S_OK,FALSE}, - {"[::1.2.3.0]",S_OK,FALSE}, - {"http://[::1.2.3.0]/%3F%23.T/test",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"::1.2.3.0",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/%3F%23.T/test",S_OK,FALSE}, - {"/%3F%23.T/test",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://[::001.002.003.000]/%3F%23%2E%54/test",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - }, - { - {Uri_HOST_IPV6,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Forbidden characters are always encoded for file URIs. */ - { "file:///C:/\"test\"/test.mp3", Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS, S_OK, FALSE, - { - {"file:///C:/%22test%22/test.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file:///C:/%22test%22/test.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"/C:/%22test%22/test.mp3",S_OK,FALSE}, - {"/C:/%22test%22/test.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file:///C:/\"test\"/test.mp3",S_OK,FALSE}, - {"file",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_FILE,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Forbidden characters are never encoded for unknown scheme types. */ - { "1234://4294967295/<|>\" test<|>", 0, S_OK, FALSE, - { - {"1234://4294967295/<|>\" test<|>",S_OK,FALSE}, - {"4294967295",S_OK,FALSE}, - {"1234://4294967295/<|>\" test<|>",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"4294967295",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/<|>\" test<|>",S_OK,FALSE}, - {"/<|>\" test<|>",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"1234://4294967295/<|>\" test<|>",S_OK,FALSE}, - {"1234",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_IPV4,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Make sure forbidden characters are percent encoded. */ - { "http://gov.uk/<|> test<|>", 0, S_OK, FALSE, - { - {"http://gov.uk/%3C%7C%3E%20test%3C%7C%3E",S_OK,FALSE}, - {"gov.uk",S_OK,FALSE}, - {"http://gov.uk/%3C%7C%3E%20test%3C%7C%3E",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"gov.uk",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/%3C%7C%3E%20test%3C%7C%3E",S_OK,FALSE}, - {"/%3C%7C%3E%20test%3C%7C%3E",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://gov.uk/<|> test<|>",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "http://gov.uk/test/../test2/././../test3/.././././", 0, S_OK, FALSE, - { - {"http://gov.uk/",S_OK,FALSE}, - {"gov.uk",S_OK,FALSE}, - {"http://gov.uk/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"gov.uk",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://gov.uk/test/../test2/././../test3/.././././",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "http://gov.uk/test/test2/../../..", 0, S_OK, FALSE, - { - {"http://gov.uk/",S_OK,FALSE}, - {"gov.uk",S_OK,FALSE}, - {"http://gov.uk/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"gov.uk",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://gov.uk/test/test2/../../..",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "http://gov.uk/test/test2/../../.", 0, S_OK, FALSE, - { - {"http://gov.uk/",S_OK,FALSE}, - {"gov.uk",S_OK,FALSE}, - {"http://gov.uk/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"gov.uk",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://gov.uk/test/test2/../../.",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "file://c:\\tests\\../tests\\./.\\..\\foo%20bar.mp3", 0, S_OK, FALSE, - { - {"file:///c:/foo%2520bar.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file:///c:/foo%2520bar.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"/c:/foo%2520bar.mp3",S_OK,FALSE}, - {"/c:/foo%2520bar.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file://c:\\tests\\../tests\\./.\\..\\foo%20bar.mp3",S_OK,FALSE}, - {"file",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_FILE,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Dot removal happens for unknown scheme types. */ - { "zip://gov.uk/test/test2/../../.", 0, S_OK, FALSE, - { - {"zip://gov.uk/",S_OK,FALSE}, - {"gov.uk",S_OK,FALSE}, - {"zip://gov.uk/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"gov.uk",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"zip://gov.uk/test/test2/../../.",S_OK,FALSE}, - {"zip",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Dot removal doesn't happen if NO_CANONICALIZE is set. */ - { "http://gov.uk/test/test2/../../.", Uri_CREATE_NO_CANONICALIZE, S_OK, FALSE, - { - {"http://gov.uk/test/test2/../../.",S_OK,FALSE}, - {"gov.uk",S_OK,FALSE}, - {"http://gov.uk/test/test2/../../.",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"gov.uk",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/test/test2/../../.",S_OK,FALSE}, - {"/test/test2/../../.",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://gov.uk/test/test2/../../.",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Dot removal doesn't happen for wildcard scheme types. */ - { "*:gov.uk/test/test2/../../.", 0, S_OK, FALSE, - { - {"*:gov.uk/test/test2/../../.",S_OK,FALSE}, - {"gov.uk",S_OK,FALSE}, - {"*:gov.uk/test/test2/../../.",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"gov.uk",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/test/test2/../../.",S_OK,FALSE}, - {"/test/test2/../../.",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"*:gov.uk/test/test2/../../.",S_OK,FALSE}, - {"*",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_WILDCARD,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Forbidden characters are encoded for opaque known scheme types. */ - { "mailto:\"acco<|>unt@example.com\"", 0, S_OK, FALSE, - { - {"mailto:%22acco%3C%7C%3Eunt@example.com%22",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"mailto:%22acco%3C%7C%3Eunt@example.com%22",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".com%22",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"%22acco%3C%7C%3Eunt@example.com%22",S_OK,FALSE}, - {"%22acco%3C%7C%3Eunt@example.com%22",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"mailto:\"acco<|>unt@example.com\"",S_OK,FALSE}, - {"mailto",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_MAILTO,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "news:test.tes<|>t.com", 0, S_OK, FALSE, - { - {"news:test.tes%3C%7C%3Et.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"news:test.tes%3C%7C%3Et.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"test.tes%3C%7C%3Et.com",S_OK,FALSE}, - {"test.tes%3C%7C%3Et.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"news:test.tes<|>t.com",S_OK,FALSE}, - {"news",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_NEWS,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Don't encode forbidden characters. */ - { "news:test.tes<|>t.com", Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS, S_OK, FALSE, - { - {"news:test.tes<|>t.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"news:test.tes<|>t.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"test.tes<|>t.com",S_OK,FALSE}, - {"test.tes<|>t.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"news:test.tes<|>t.com",S_OK,FALSE}, - {"news",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_NEWS,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Forbidden characters aren't encoded for unknown, opaque URIs. */ - { "urn:test.tes<|>t.com", 0, S_OK, FALSE, - { - {"urn:test.tes<|>t.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"urn:test.tes<|>t.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"test.tes<|>t.com",S_OK,FALSE}, - {"test.tes<|>t.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"urn:test.tes<|>t.com",S_OK,FALSE}, - {"urn",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Percent encoded unreserved characters are decoded for known opaque URIs. */ - { "news:test.%74%65%73%74.com", 0, S_OK, FALSE, - { - {"news:test.test.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"news:test.test.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"test.test.com",S_OK,FALSE}, - {"test.test.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"news:test.%74%65%73%74.com",S_OK,FALSE}, - {"news",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_NEWS,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Percent encoded characters are still decoded for known scheme types. */ - { "news:test.%74%65%73%74.com", Uri_CREATE_NO_CANONICALIZE, S_OK, FALSE, - { - {"news:test.test.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"news:test.test.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"test.test.com",S_OK,FALSE}, - {"test.test.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"news:test.%74%65%73%74.com",S_OK,FALSE}, - {"news",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_NEWS,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Percent encoded characters aren't decoded for unknown scheme types. */ - { "urn:test.%74%65%73%74.com", 0, S_OK, FALSE, - { - {"urn:test.%74%65%73%74.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"urn:test.%74%65%73%74.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"test.%74%65%73%74.com",S_OK,FALSE}, - {"test.%74%65%73%74.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"urn:test.%74%65%73%74.com",S_OK,FALSE}, - {"urn",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Unknown scheme types can have invalid % encoded data in query string. */ - { "zip://www.winehq.org/tests/..?query=%xx&return=y", 0, S_OK, FALSE, - { - {"zip://www.winehq.org/?query=%xx&return=y",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"zip://www.winehq.org/?query=%xx&return=y",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/?query=%xx&return=y",S_OK,FALSE}, - {"?query=%xx&return=y",S_OK,FALSE}, - {"zip://www.winehq.org/tests/..?query=%xx&return=y",S_OK,FALSE}, - {"zip",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE}, - } - }, - /* Known scheme types can have invalid % encoded data with the right flags. */ - { "http://www.winehq.org/tests/..?query=%xx&return=y", Uri_CREATE_NO_DECODE_EXTRA_INFO, S_OK, FALSE, - { - {"http://www.winehq.org/?query=%xx&return=y",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"http://www.winehq.org/?query=%xx&return=y",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/?query=%xx&return=y",S_OK,FALSE}, - {"?query=%xx&return=y",S_OK,FALSE}, - {"http://www.winehq.org/tests/..?query=%xx&return=y",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE}, - } - }, - /* Forbidden characters in query aren't percent encoded for known scheme types with this flag. */ - { "http://www.winehq.org/tests/..?query=<|>&return=y", Uri_CREATE_NO_DECODE_EXTRA_INFO, S_OK, FALSE, - { - {"http://www.winehq.org/?query=<|>&return=y",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"http://www.winehq.org/?query=<|>&return=y",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/?query=<|>&return=y",S_OK,FALSE}, - {"?query=<|>&return=y",S_OK,FALSE}, - {"http://www.winehq.org/tests/..?query=<|>&return=y",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE}, - } - }, - /* Forbidden characters in query aren't percent encoded for known scheme types with this flag. */ - { "http://www.winehq.org/tests/..?query=<|>&return=y", Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS, S_OK, FALSE, - { - {"http://www.winehq.org/?query=<|>&return=y",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"http://www.winehq.org/?query=<|>&return=y",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/?query=<|>&return=y",S_OK,FALSE}, - {"?query=<|>&return=y",S_OK,FALSE}, - {"http://www.winehq.org/tests/..?query=<|>&return=y",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE}, - } - }, - /* Forbidden characters are encoded for known scheme types. */ - { "http://www.winehq.org/tests/..?query=<|>&return=y", 0, S_OK, FALSE, - { - {"http://www.winehq.org/?query=%3C%7C%3E&return=y",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"http://www.winehq.org/?query=%3C%7C%3E&return=y",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/?query=%3C%7C%3E&return=y",S_OK,FALSE}, - {"?query=%3C%7C%3E&return=y",S_OK,FALSE}, - {"http://www.winehq.org/tests/..?query=<|>&return=y",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE}, - } - }, - /* Forbidden characters are not encoded for unknown scheme types. */ - { "zip://www.winehq.org/tests/..?query=<|>&return=y", 0, S_OK, FALSE, - { - {"zip://www.winehq.org/?query=<|>&return=y",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"zip://www.winehq.org/?query=<|>&return=y",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/?query=<|>&return=y",S_OK,FALSE}, - {"?query=<|>&return=y",S_OK,FALSE}, - {"zip://www.winehq.org/tests/..?query=<|>&return=y",S_OK,FALSE}, - {"zip",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE}, - } - }, - /* Percent encoded, unreserved characters are decoded for known scheme types. */ - { "http://www.winehq.org/tests/..?query=%30%31&return=y", 0, S_OK, FALSE, - { - {"http://www.winehq.org/?query=01&return=y",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"http://www.winehq.org/?query=01&return=y",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/?query=01&return=y",S_OK,FALSE}, - {"?query=01&return=y",S_OK,FALSE}, - {"http://www.winehq.org/tests/..?query=%30%31&return=y",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE}, - } - }, - /* Percent encoded, unreserved characters aren't decoded for unknown scheme types. */ - { "zip://www.winehq.org/tests/..?query=%30%31&return=y", 0, S_OK, FALSE, - { - {"zip://www.winehq.org/?query=%30%31&return=y",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"zip://www.winehq.org/?query=%30%31&return=y",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/?query=%30%31&return=y",S_OK,FALSE}, - {"?query=%30%31&return=y",S_OK,FALSE}, - {"zip://www.winehq.org/tests/..?query=%30%31&return=y",S_OK,FALSE}, - {"zip",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE}, - } - }, - /* Percent encoded characters aren't decoded when NO_DECODE_EXTRA_INFO is set. */ - { "http://www.winehq.org/tests/..?query=%30%31&return=y", Uri_CREATE_NO_DECODE_EXTRA_INFO, S_OK, FALSE, - { - {"http://www.winehq.org/?query=%30%31&return=y",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"http://www.winehq.org/?query=%30%31&return=y",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/?query=%30%31&return=y",S_OK,FALSE}, - {"?query=%30%31&return=y",S_OK,FALSE}, - {"http://www.winehq.org/tests/..?query=%30%31&return=y",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE}, - } - }, - { "http://www.winehq.org?query=12&return=y", Uri_CREATE_NO_CANONICALIZE, S_OK, FALSE, - { - {"http://www.winehq.org?query=12&return=y",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"http://www.winehq.org?query=12&return=y",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"?query=12&return=y",S_OK,FALSE}, - {"?query=12&return=y",S_OK,FALSE}, - {"http://www.winehq.org?query=12&return=y",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE}, - } - }, - /* Unknown scheme types can have invalid % encoded data in fragments. */ - { "zip://www.winehq.org/tests/#Te%xx", 0, S_OK, FALSE, - { - {"zip://www.winehq.org/tests/#Te%xx",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"zip://www.winehq.org/tests/#Te%xx",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"#Te%xx",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/tests/",S_OK,FALSE}, - {"/tests/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"zip://www.winehq.org/tests/#Te%xx",S_OK,FALSE}, - {"zip",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE}, - } - }, - /* Forbidden characters in fragment aren't encoded for unknown schemes. */ - { "zip://www.winehq.org/tests/#Te<|>", 0, S_OK, FALSE, - { - {"zip://www.winehq.org/tests/#Te<|>",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"zip://www.winehq.org/tests/#Te<|>",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"#Te<|>",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/tests/",S_OK,FALSE}, - {"/tests/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"zip://www.winehq.org/tests/#Te<|>",S_OK,FALSE}, - {"zip",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE}, - } - }, - /* Forbidden characters in the fragment are percent encoded for known schemes. */ - { "http://www.winehq.org/tests/#Te<|>", 0, S_OK, FALSE, - { - {"http://www.winehq.org/tests/#Te%3C%7C%3E",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"http://www.winehq.org/tests/#Te%3C%7C%3E",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"#Te%3C%7C%3E",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/tests/",S_OK,FALSE}, - {"/tests/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://www.winehq.org/tests/#Te<|>",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE}, - } - }, - /* Forbidden characters aren't encoded in the fragment with this flag. */ - { "http://www.winehq.org/tests/#Te<|>", Uri_CREATE_NO_DECODE_EXTRA_INFO, S_OK, FALSE, - { - {"http://www.winehq.org/tests/#Te<|>",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"http://www.winehq.org/tests/#Te<|>",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"#Te<|>",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/tests/",S_OK,FALSE}, - {"/tests/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://www.winehq.org/tests/#Te<|>",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE}, - } - }, - /* Forbidden characters aren't encoded in the fragment with this flag. */ - { "http://www.winehq.org/tests/#Te<|>", Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS, S_OK, FALSE, - { - {"http://www.winehq.org/tests/#Te<|>",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"http://www.winehq.org/tests/#Te<|>",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"#Te<|>",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/tests/",S_OK,FALSE}, - {"/tests/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://www.winehq.org/tests/#Te<|>",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE}, - } - }, - /* Percent encoded, unreserved characters aren't decoded for known scheme types. */ - { "zip://www.winehq.org/tests/#Te%30%31%32", 0, S_OK, FALSE, - { - {"zip://www.winehq.org/tests/#Te%30%31%32",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"zip://www.winehq.org/tests/#Te%30%31%32",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"#Te%30%31%32",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/tests/",S_OK,FALSE}, - {"/tests/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"zip://www.winehq.org/tests/#Te%30%31%32",S_OK,FALSE}, - {"zip",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE}, - } - }, - /* Percent encoded, unreserved characters are decoded for known schemes. */ - { "http://www.winehq.org/tests/#Te%30%31%32", 0, S_OK, FALSE, - { - {"http://www.winehq.org/tests/#Te012",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"http://www.winehq.org/tests/#Te012",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"#Te012",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/tests/",S_OK,FALSE}, - {"/tests/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://www.winehq.org/tests/#Te%30%31%32",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE}, - } - }, - /* Percent encoded, unreserved characters are decoded even if NO_CANONICALIZE is set. */ - { "http://www.winehq.org/tests/#Te%30%31%32", Uri_CREATE_NO_CANONICALIZE, S_OK, FALSE, - { - {"http://www.winehq.org/tests/#Te012",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"http://www.winehq.org/tests/#Te012",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"#Te012",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/tests/",S_OK,FALSE}, - {"/tests/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://www.winehq.org/tests/#Te%30%31%32",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE}, - } - }, - /* Percent encoded, unreserved characters aren't decoded when NO_DECODE_EXTRA is set. */ - { "http://www.winehq.org/tests/#Te%30%31%32", Uri_CREATE_NO_DECODE_EXTRA_INFO, S_OK, FALSE, - { - {"http://www.winehq.org/tests/#Te%30%31%32",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"http://www.winehq.org/tests/#Te%30%31%32",S_OK,FALSE}, - {"winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"#Te%30%31%32",S_OK,FALSE}, - {"www.winehq.org",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/tests/",S_OK,FALSE}, - {"/tests/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://www.winehq.org/tests/#Te%30%31%32",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE}, - } - }, - /* Leading/Trailing whitespace is removed. */ - { " http://google.com/ ", 0, S_OK, FALSE, - { - {"http://google.com/",S_OK,FALSE}, - {"google.com",S_OK,FALSE}, - {"http://google.com/",S_OK,FALSE}, - {"google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://google.com/",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "\t\t\r\nhttp\n://g\noogle.co\rm/\n\n\n", 0, S_OK, FALSE, - { - {"http://google.com/",S_OK,FALSE}, - {"google.com",S_OK,FALSE}, - {"http://google.com/",S_OK,FALSE}, - {"google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://google.com/",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "http://g\noogle.co\rm/\n\n\n", Uri_CREATE_NO_PRE_PROCESS_HTML_URI, S_OK, FALSE, - { - {"http://g%0aoogle.co%0dm/%0A%0A%0A",S_OK,FALSE}, - {"g%0aoogle.co%0dm",S_OK,FALSE}, - {"http://g%0aoogle.co%0dm/%0A%0A%0A",S_OK,FALSE}, - {"g%0aoogle.co%0dm",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"g%0aoogle.co%0dm",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/%0A%0A%0A",S_OK,FALSE}, - {"/%0A%0A%0A",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://g\noogle.co\rm/\n\n\n",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "zip://g\noogle.co\rm/\n\n\n", Uri_CREATE_NO_PRE_PROCESS_HTML_URI, S_OK, FALSE, - { - {"zip://g\noogle.co\rm/\n\n\n",S_OK,FALSE}, - {"g\noogle.co\rm",S_OK,FALSE}, - {"zip://g\noogle.co\rm/\n\n\n",S_OK,FALSE}, - {"g\noogle.co\rm",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"g\noogle.co\rm",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/\n\n\n",S_OK,FALSE}, - {"/\n\n\n",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"zip://g\noogle.co\rm/\n\n\n",S_OK,FALSE}, - {"zip",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Since file URLs are usually hierarchical, it returns an empty string - * for the absolute URI property since it was declared as an opaque URI. - */ - { "file:index.html", 0, S_OK, FALSE, - { - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"file:index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"index.html",S_OK,FALSE}, - {"index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file:index.html",S_OK,FALSE}, - {"file",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_FILE,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Doesn't have an absolute since it's opaque, but gets it port set. */ - { "http:test.com/index.html", 0, S_OK, FALSE, - { - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"http:test.com/index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"test.com/index.html",S_OK,FALSE}, - {"test.com/index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http:test.com/index.html",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "ftp:test.com/index.html", 0, S_OK, FALSE, - { - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"ftp:test.com/index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"test.com/index.html",S_OK,FALSE}, - {"test.com/index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"ftp:test.com/index.html",S_OK,FALSE}, - {"ftp",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {21,S_OK,FALSE}, - {URL_SCHEME_FTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "file://C|/test.mp3", 0, S_OK, FALSE, - { - {"file:///C:/test.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file:///C:/test.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"/C:/test.mp3",S_OK,FALSE}, - {"/C:/test.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file://C|/test.mp3",S_OK,FALSE}, - {"file",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_FILE,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "file:///C|/test.mp3", 0, S_OK, FALSE, - { - {"file:///C:/test.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file:///C:/test.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"/C:/test.mp3",S_OK,FALSE}, - {"/C:/test.mp3",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file:///C|/test.mp3",S_OK,FALSE}, - {"file",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_FILE,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Extra '/' isn't added before "c:" since USE_DOS_PATH is set and '/' are converted - * to '\\'. - */ - { "file://c:/dir/index.html", Uri_CREATE_FILE_USE_DOS_PATH, S_OK, FALSE, - { - {"file://c:\\dir\\index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file://c:\\dir\\index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"c:\\dir\\index.html",S_OK,FALSE}, - {"c:\\dir\\index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file://c:/dir/index.html",S_OK,FALSE}, - {"file",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_FILE,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Extra '/' after "file://" is removed. */ - { "file:///c:/dir/index.html", Uri_CREATE_FILE_USE_DOS_PATH, S_OK, FALSE, - { - {"file://c:\\dir\\index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file://c:\\dir\\index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"c:\\dir\\index.html",S_OK,FALSE}, - {"c:\\dir\\index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file:///c:/dir/index.html",S_OK,FALSE}, - {"file",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_FILE,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Allow more characters when Uri_CREATE_FILE_USE_DOS_PATH is specified */ - { "file:///c:/dir\\%%61%20%5Fname/file%2A.html", Uri_CREATE_FILE_USE_DOS_PATH, S_OK, FALSE, - { - {"file://c:\\dir\\%a _name\\file*.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file://c:\\dir\\%a _name\\file*.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"c:\\dir\\%a _name\\file*.html",S_OK,FALSE}, - {"c:\\dir\\%a _name\\file*.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file:///c:/dir\\%%61%20%5Fname/file%2A.html",S_OK,FALSE}, - {"file",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_FILE,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "file://c|/dir\\index.html", Uri_CREATE_FILE_USE_DOS_PATH, S_OK, FALSE, - { - {"file://c:\\dir\\index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file://c:\\dir\\index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"c:\\dir\\index.html",S_OK,FALSE}, - {"c:\\dir\\index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file://c|/dir\\index.html",S_OK,FALSE}, - {"file",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_FILE,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* The backslashes after the scheme name are converted to forward slashes. */ - { "file:\\\\c:\\dir\\index.html", Uri_CREATE_FILE_USE_DOS_PATH, S_OK, FALSE, - { - {"file://c:\\dir\\index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file://c:\\dir\\index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"c:\\dir\\index.html",S_OK,FALSE}, - {"c:\\dir\\index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file:\\\\c:\\dir\\index.html",S_OK,FALSE}, - {"file",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_FILE,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "file:\\\\c:/dir/index.html", 0, S_OK, FALSE, - { - {"file:///c:/dir/index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file:///c:/dir/index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"/c:/dir/index.html",S_OK,FALSE}, - {"/c:/dir/index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file:\\\\c:/dir/index.html",S_OK,FALSE}, - {"file",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_FILE,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "http:\\\\google.com", 0, S_OK, FALSE, - { - {"http://google.com/",S_OK,FALSE}, - {"google.com",S_OK,FALSE}, - {"http://google.com/",S_OK,FALSE}, - {"google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http:\\\\google.com",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* the "\\\\" aren't converted to "//" for unknown scheme types and it's considered opaque. */ - { "zip:\\\\google.com", 0, S_OK, FALSE, - { - {"zip:\\\\google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"zip:\\\\google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"\\\\google.com",S_OK,FALSE}, - {"\\\\google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"zip:\\\\google.com",S_OK,FALSE}, - {"zip",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Dot segments aren't removed. */ - { "file://c:\\dir\\../..\\./index.html", Uri_CREATE_FILE_USE_DOS_PATH, S_OK, FALSE, - { - {"file://c:\\dir\\..\\..\\.\\index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file://c:\\dir\\..\\..\\.\\index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"c:\\dir\\..\\..\\.\\index.html",S_OK,FALSE}, - {"c:\\dir\\..\\..\\.\\index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file://c:\\dir\\../..\\./index.html",S_OK,FALSE}, - {"file",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_FILE,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Forbidden characters aren't percent encoded. */ - { "file://c:\\dir\\i^|ndex.html", Uri_CREATE_FILE_USE_DOS_PATH, S_OK, FALSE, - { - {"file://c:\\dir\\i^|ndex.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file://c:\\dir\\i^|ndex.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"c:\\dir\\i^|ndex.html",S_OK,FALSE}, - {"c:\\dir\\i^|ndex.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file://c:\\dir\\i^|ndex.html",S_OK,FALSE}, - {"file",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_FILE,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* The '\' are still converted to '/' even though it's an opaque file URI. */ - { "file:c:\\dir\\../..\\index.html", 0, S_OK, FALSE, - { - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"file:c:/dir/../../index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"c:/dir/../../index.html",S_OK,FALSE}, - {"c:/dir/../../index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file:c:\\dir\\../..\\index.html",S_OK,FALSE}, - {"file",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_FILE,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* '/' are still converted to '\' even though it's an opaque URI. */ - { "file:c:/dir\\../..\\index.html", Uri_CREATE_FILE_USE_DOS_PATH, S_OK, FALSE, - { - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"file:c:\\dir\\..\\..\\index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"c:\\dir\\..\\..\\index.html",S_OK,FALSE}, - {"c:\\dir\\..\\..\\index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file:c:/dir\\../..\\index.html",S_OK,FALSE}, - {"file",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_FILE,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Forbidden characters aren't percent encoded. */ - { "file:c:\\in^|dex.html", Uri_CREATE_FILE_USE_DOS_PATH, S_OK, FALSE, - { - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"file:c:\\in^|dex.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"c:\\in^|dex.html",S_OK,FALSE}, - {"c:\\in^|dex.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file:c:\\in^|dex.html",S_OK,FALSE}, - {"file",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_FILE,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Doesn't have a UserName since the ':' appears at the beginning of the - * userinfo section. - */ - { "http://:password@gov.uk", 0, S_OK, FALSE, - { - {"http://:password@gov.uk/",S_OK,FALSE}, - {":password@gov.uk",S_OK,FALSE}, - {"http://gov.uk/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"gov.uk",S_OK,FALSE}, - {"password",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://:password@gov.uk",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {":password",S_OK,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Has a UserName since the userinfo section doesn't contain a password. */ - { "http://@gov.uk", 0, S_OK, FALSE, - { - {"http://gov.uk/",S_OK,FALSE,"http://@gov.uk/"}, - {"@gov.uk",S_OK,FALSE}, - {"http://gov.uk/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"gov.uk",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://@gov.uk",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_OK,FALSE}, - {"",S_OK,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* ":@" not included in the absolute URI. */ - { "http://:@gov.uk", 0, S_OK, FALSE, - { - {"http://gov.uk/",S_OK,FALSE,"http://:@gov.uk/"}, - {":@gov.uk",S_OK,FALSE}, - {"http://gov.uk/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"gov.uk",S_OK,FALSE}, - {"",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://:@gov.uk",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {":",S_OK,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* '@' is included because it's an unknown scheme type. */ - { "zip://@gov.uk", 0, S_OK, FALSE, - { - {"zip://@gov.uk/",S_OK,FALSE}, - {"@gov.uk",S_OK,FALSE}, - {"zip://@gov.uk/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"gov.uk",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"zip://@gov.uk",S_OK,FALSE}, - {"zip",S_OK,FALSE}, - {"",S_OK,FALSE}, - {"",S_OK,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* ":@" are included because it's an unknown scheme type. */ - { "zip://:@gov.uk", 0, S_OK, FALSE, - { - {"zip://:@gov.uk/",S_OK,FALSE}, - {":@gov.uk",S_OK,FALSE}, - {"zip://:@gov.uk/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"gov.uk",S_OK,FALSE}, - {"",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"zip://:@gov.uk",S_OK,FALSE}, - {"zip",S_OK,FALSE}, - {":",S_OK,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "about:blank", 0, S_OK, FALSE, - { - {"about:blank",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"about:blank",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"blank",S_OK,FALSE}, - {"blank",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"about:blank",S_OK,FALSE}, - {"about",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_ABOUT,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "mk:@MSITStore:C:\\Program Files/AutoCAD 2008\\Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm",0,S_OK,FALSE, - { - {"mk:@MSITStore:C:\\Program%20Files/AutoCAD%202008\\Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"mk:@MSITStore:C:\\Program%20Files/AutoCAD%202008\\Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".htm",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"@MSITStore:C:\\Program%20Files/AutoCAD%202008\\Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm",S_OK,FALSE}, - {"@MSITStore:C:\\Program%20Files/AutoCAD%202008\\Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"mk:@MSITStore:C:\\Program Files/AutoCAD 2008\\Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm",S_OK,FALSE}, - {"mk",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_MK,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "mk:@MSITStore:Z:\\home\\test\\chm\\silqhelp.chm::/thesilqquickstartguide.htm",0,S_OK,FALSE, - { - {"mk:@MSITStore:Z:\\home\\test\\chm\\silqhelp.chm::/thesilqquickstartguide.htm",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"mk:@MSITStore:Z:\\home\\test\\chm\\silqhelp.chm::/thesilqquickstartguide.htm",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".htm",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"@MSITStore:Z:\\home\\test\\chm\\silqhelp.chm::/thesilqquickstartguide.htm",S_OK,FALSE}, - {"@MSITStore:Z:\\home\\test\\chm\\silqhelp.chm::/thesilqquickstartguide.htm",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"mk:@MSITStore:Z:\\home\\test\\chm\\silqhelp.chm::/thesilqquickstartguide.htm",S_OK,FALSE}, - {"mk",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_MK,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Two '\' are added to the URI when USE_DOS_PATH is set, and it's a UNC path. */ - { "file://server/dir/index.html", Uri_CREATE_FILE_USE_DOS_PATH, S_OK, FALSE, - { - {"file://\\\\server\\dir\\index.html",S_OK,FALSE}, - {"server",S_OK,FALSE}, - {"file://\\\\server\\dir\\index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"server",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"\\dir\\index.html",S_OK,FALSE}, - {"\\dir\\index.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"file://server/dir/index.html",S_OK,FALSE}, - {"file",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_FILE,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* When CreateUri generates an IUri, it still displays the default port in the - * authority. - */ - { "http://google.com:80/", Uri_CREATE_NO_CANONICALIZE, S_OK, FALSE, - { - {"http://google.com:80/",S_OK,FALSE}, - {"google.com:80",S_OK,FALSE}, - {"http://google.com:80/",S_OK,FALSE}, - {"google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"google.com",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/",S_OK,FALSE}, - {"/",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"http://google.com:80/",S_OK,FALSE}, - {"http",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_DNS,S_OK,FALSE}, - {80,S_OK,FALSE}, - {URL_SCHEME_HTTP,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* For res URIs the host is everything up until the first '/'. */ - { "res://C:\\dir\\file.exe/DATA/test.html", 0, S_OK, FALSE, - { - {"res://C:\\dir\\file.exe/DATA/test.html",S_OK,FALSE}, - {"C:\\dir\\file.exe",S_OK,FALSE}, - {"res://C:\\dir\\file.exe/DATA/test.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"C:\\dir\\file.exe",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/DATA/test.html",S_OK,FALSE}, - {"/DATA/test.html",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"res://C:\\dir\\file.exe/DATA/test.html",S_OK,FALSE}, - {"res",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_RES,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Res URI can contain a '|' in the host name. */ - { "res://c:\\di|r\\file.exe/test", 0, S_OK, FALSE, - { - {"res://c:\\di|r\\file.exe/test",S_OK,FALSE}, - {"c:\\di|r\\file.exe",S_OK,FALSE}, - {"res://c:\\di|r\\file.exe/test",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"c:\\di|r\\file.exe",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/test",S_OK,FALSE}, - {"/test",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"res://c:\\di|r\\file.exe/test",S_OK,FALSE}, - {"res",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_RES,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE}, - } - }, - /* Res URIs can have invalid percent encoded values. */ - { "res://c:\\dir%xx\\file.exe/test", 0, S_OK, FALSE, - { - {"res://c:\\dir%xx\\file.exe/test",S_OK,FALSE}, - {"c:\\dir%xx\\file.exe",S_OK,FALSE}, - {"res://c:\\dir%xx\\file.exe/test",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"c:\\dir%xx\\file.exe",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/test",S_OK,FALSE}, - {"/test",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"res://c:\\dir%xx\\file.exe/test",S_OK,FALSE}, - {"res",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_RES,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - /* Res doesn't get forbidden characters percent encoded in it's path. */ - { "res://c:\\test/tes<|>t", 0, S_OK, FALSE, - { - {"res://c:\\test/tes<|>t",S_OK,FALSE}, - {"c:\\test",S_OK,FALSE}, - {"res://c:\\test/tes<|>t",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"c:\\test",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"/tes<|>t",S_OK,FALSE}, - {"/tes<|>t",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"res://c:\\test/tes<|>t",S_OK,FALSE}, - {"res",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_RES,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "mk:@MSITStore:Z:\\dir\\test.chm::/html/../images/xxx.jpg", 0, S_OK, FALSE, - { - {"mk:@MSITStore:Z:\\dir\\test.chm::/images/xxx.jpg",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"mk:@MSITStore:Z:\\dir\\test.chm::/images/xxx.jpg",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".jpg",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"@MSITStore:Z:\\dir\\test.chm::/images/xxx.jpg",S_OK,FALSE}, - {"@MSITStore:Z:\\dir\\test.chm::/images/xxx.jpg",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"mk:@MSITStore:Z:\\dir\\test.chm::/html/../images/xxx.jpg",S_OK,FALSE}, - {"mk",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_MK,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "mk:@MSITStore:Z:\\dir\\test.chm::/html/../images/xxx.jpg", Uri_CREATE_NO_CANONICALIZE, S_OK, FALSE, - { - {"mk:@MSITStore:Z:\\dir\\test.chm::/html/../images/xxx.jpg",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"mk:@MSITStore:Z:\\dir\\test.chm::/html/../images/xxx.jpg",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".jpg",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"@MSITStore:Z:\\dir\\test.chm::/html/../images/xxx.jpg",S_OK,FALSE}, - {"@MSITStore:Z:\\dir\\test.chm::/html/../images/xxx.jpg",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"mk:@MSITStore:Z:\\dir\\test.chm::/html/../images/xxx.jpg",S_OK,FALSE}, - {"mk",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_MK,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "xx:@MSITStore:Z:\\dir\\test.chm::/html/../images/xxx.jpg", 0, S_OK, FALSE, - { - {"xx:@MSITStore:Z:\\dir\\test.chm::/html/../images/xxx.jpg",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"xx:@MSITStore:Z:\\dir\\test.chm::/html/../images/xxx.jpg",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".jpg",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"@MSITStore:Z:\\dir\\test.chm::/html/../images/xxx.jpg",S_OK,FALSE}, - {"@MSITStore:Z:\\dir\\test.chm::/html/../images/xxx.jpg",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"xx:@MSITStore:Z:\\dir\\test.chm::/html/../images/xxx.jpg",S_OK,FALSE}, - {"xx",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_UNKNOWN,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "mk:@MSITStore:Z:\\dir\\test.chm::/html/../../images/xxx.jpg", 0, S_OK, FALSE, - { - {"mk:@MSITStore:Z:\\dir\\images/xxx.jpg",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"mk:@MSITStore:Z:\\dir\\images/xxx.jpg",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".jpg",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"@MSITStore:Z:\\dir\\images/xxx.jpg",S_OK,FALSE}, - {"@MSITStore:Z:\\dir\\images/xxx.jpg",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"mk:@MSITStore:Z:\\dir\\test.chm::/html/../../images/xxx.jpg",S_OK,FALSE}, - {"mk",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_MK,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "mk:@MSITStore:Z:\\dir\\dir2\\..\\test.chm::/html/../../images/xxx.jpg", 0, S_OK, FALSE, - { - {"mk:@MSITStore:Z:\\dir\\images/xxx.jpg",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"mk:@MSITStore:Z:\\dir\\images/xxx.jpg",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".jpg",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"@MSITStore:Z:\\dir\\images/xxx.jpg",S_OK,FALSE}, - {"@MSITStore:Z:\\dir\\images/xxx.jpg",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"mk:@MSITStore:Z:\\dir\\dir2\\..\\test.chm::/html/../../images/xxx.jpg",S_OK,FALSE}, - {"mk",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_MK,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - }, - { "mk:@MSITStore:Z:\\dir\\test.chm::/html/../../../../images/xxx.jpg", 0, S_OK, FALSE, - { - {"mk:images/xxx.jpg",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"mk:images/xxx.jpg",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {".jpg",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE}, - {"images/xxx.jpg",S_OK,FALSE}, - {"images/xxx.jpg",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"mk:@MSITStore:Z:\\dir\\test.chm::/html/../../../../images/xxx.jpg",S_OK,FALSE}, - {"mk",S_OK,FALSE}, - {"",S_FALSE,FALSE}, - {"",S_FALSE,FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK,FALSE}, - {0,S_FALSE,FALSE}, - {URL_SCHEME_MK,S_OK,FALSE}, - {URLZONE_INVALID,E_NOTIMPL,FALSE} - } - } -}; - -typedef struct _invalid_uri { - const char* uri; - DWORD flags; - BOOL todo; -} invalid_uri; - -static const invalid_uri invalid_uri_tests[] = { - /* Has to have a scheme name. */ - {"://www.winehq.org",0,FALSE}, - /* Window's doesn't like URI's which are implicitly file paths without the - * ALLOW_IMPLICIT_FILE_SCHEME flag set. - */ - {"C:/test/test.mp3",0,FALSE}, - {"\\\\Server/test/test.mp3",0,FALSE}, - {"C:/test/test.mp3",Uri_CREATE_ALLOW_IMPLICIT_WILDCARD_SCHEME,FALSE}, - {"\\\\Server/test/test.mp3",Uri_CREATE_ALLOW_RELATIVE,FALSE}, - /* Invalid schemes. */ - {"*abcd://not.valid.com",0,FALSE}, - {"*a*b*c*d://not.valid.com",0,FALSE}, - /* Not allowed to have invalid % encoded data. */ - {"ftp://google.co%XX/",0,FALSE}, - /* To many h16 components. */ - {"http://[1:2:3:4:5:6:7:8:9]",0,FALSE}, - /* Not enough room for IPv4 address. */ - {"http://[1:2:3:4:5:6:7:192.0.1.0]",0,FALSE}, - /* Not enough h16 components. */ - {"http://[1:2:3:4]",0,FALSE}, - /* Not enough components including IPv4. */ - {"http://[1:192.0.1.0]",0,FALSE}, - /* Not allowed to have partial IPv4 in IPv6. */ - {"http://[::192.0]",0,FALSE}, - /* Can't have elision of 1 h16 at beginning of address. */ - {"http://[::2:3:4:5:6:7:8]",0,FALSE}, - /* Can't have elision of 1 h16 at end of address. */ - {"http://[1:2:3:4:5:6:7::]",0,FALSE}, - /* Expects a valid IP Literal. */ - {"ftp://[not.valid.uri]/",0,FALSE}, - /* Expects valid port for a known scheme type. */ - {"ftp://www.winehq.org:123fgh",0,FALSE}, - /* Port exceeds USHORT_MAX for known scheme type. */ - {"ftp://www.winehq.org:65536",0,FALSE}, - /* Invalid port with IPv4 address. */ - {"http://www.winehq.org:1abcd",0,FALSE}, - /* Invalid port with IPv6 address. */ - {"http://[::ffff]:32xy",0,FALSE}, - /* Not allowed to have backslashes with NO_CANONICALIZE. */ - {"gopher://www.google.com\\test",Uri_CREATE_NO_CANONICALIZE,FALSE}, - /* Not allowed to have invalid % encoded data in opaque URI path. */ - {"news:test%XX",0,FALSE}, - {"mailto:wine@winehq%G8.com",0,FALSE}, - /* Known scheme types can't have invalid % encoded data in query string. */ - {"http://google.com/?query=te%xx",0,FALSE}, - /* Invalid % encoded data in fragment of know scheme type. */ - {"ftp://google.com/#Test%xx",0,FALSE}, - {" http://google.com/",Uri_CREATE_NO_PRE_PROCESS_HTML_URI,FALSE}, - {"\n\nhttp://google.com/",Uri_CREATE_NO_PRE_PROCESS_HTML_URI,FALSE}, - {"file://c:\\testtest",Uri_CREATE_FILE_USE_DOS_PATH,FALSE}, - {"file://c:\\test\"test",Uri_CREATE_FILE_USE_DOS_PATH,FALSE}, - {"file:c:\\testtest",Uri_CREATE_FILE_USE_DOS_PATH,FALSE}, - {"file:c:\\test\"test",Uri_CREATE_FILE_USE_DOS_PATH,FALSE}, - /* res URIs aren't allowed to have forbidden dos path characters in the - * hostname. - */ - {"res://c:\\test\\test/test",0,FALSE}, - {"res://c:\\te\"st\\test/test",0,FALSE}, - {"res://c:\\test/te%xxst",0,FALSE} -}; - -typedef struct _uri_equality { - const char* a; - DWORD create_flags_a; - BOOL create_todo_a; - const char* b; - DWORD create_flags_b; - BOOL create_todo_b; - BOOL equal; - BOOL todo; -} uri_equality; - -static const uri_equality equality_tests[] = { - { - "HTTP://www.winehq.org/test dir/./",0,FALSE, - "http://www.winehq.org/test dir/../test dir/",0,FALSE, - TRUE, FALSE - }, - { - /* http://www.winehq.org/test%20dir */ - "http://%77%77%77%2E%77%69%6E%65%68%71%2E%6F%72%67/%74%65%73%74%20%64%69%72",0,FALSE, - "http://www.winehq.org/test dir",0,FALSE, - TRUE, FALSE - }, - { - "c:\\test.mp3",Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME,FALSE, - "file:///c:/test.mp3",0,FALSE, - TRUE, FALSE - }, - { - "ftp://ftp.winehq.org/",0,FALSE, - "ftp://ftp.winehq.org",0,FALSE, - TRUE, FALSE - }, - { - "ftp://ftp.winehq.org/test/test2/../../testB/",0,FALSE, - "ftp://ftp.winehq.org/t%45stB/",0,FALSE, - FALSE, FALSE - }, - { - "http://google.com/TEST",0,FALSE, - "http://google.com/test",0,FALSE, - FALSE, FALSE - }, - { - "http://GOOGLE.com/",0,FALSE, - "http://google.com/",0,FALSE, - TRUE, FALSE - }, - /* Performs case insensitive compare of host names (for known scheme types). */ - { - "ftp://GOOGLE.com/",Uri_CREATE_NO_CANONICALIZE,FALSE, - "ftp://google.com/",0,FALSE, - TRUE, FALSE - }, - { - "zip://GOOGLE.com/",0,FALSE, - "zip://google.com/",0,FALSE, - FALSE, FALSE - }, - { - "file:///c:/TEST/TeST/",0,FALSE, - "file:///c:/test/test/",0,FALSE, - TRUE, FALSE - }, - { - "file:///server/TEST",0,FALSE, - "file:///SERVER/TEST",0,FALSE, - TRUE, FALSE - }, - { - "http://google.com",Uri_CREATE_NO_CANONICALIZE,FALSE, - "http://google.com/",0,FALSE, - TRUE, FALSE - }, - { - "ftp://google.com:21/",0,FALSE, - "ftp://google.com/",0,FALSE, - TRUE, FALSE - }, - { - "http://google.com:80/",Uri_CREATE_NO_CANONICALIZE,FALSE, - "http://google.com/",0,FALSE, - TRUE, FALSE - }, - { - "http://google.com:70/",0,FALSE, - "http://google.com:71/",0,FALSE, - FALSE, FALSE - } -}; - -typedef struct _uri_with_fragment { - const char* uri; - const char* fragment; - DWORD create_flags; - HRESULT create_expected; - BOOL create_todo; - - const char* expected_uri; - BOOL expected_todo; -} uri_with_fragment; - -static const uri_with_fragment uri_fragment_tests[] = { - { - "http://google.com/","#fragment",0,S_OK,FALSE, - "http://google.com/#fragment",FALSE - }, - { - "http://google.com/","fragment",0,S_OK,FALSE, - "http://google.com/#fragment",FALSE - }, - { - "zip://test.com/","?test",0,S_OK,FALSE, - "zip://test.com/#?test",FALSE - }, - /* The fragment can be empty. */ - { - "ftp://ftp.google.com/","",0,S_OK,FALSE, - "ftp://ftp.google.com/#",FALSE - } -}; - -typedef struct _uri_builder_property { - BOOL change; - const char *value; - const char *expected_value; - Uri_PROPERTY property; - HRESULT expected; - BOOL todo; -} uri_builder_property; - -typedef struct _uri_builder_port { - BOOL change; - BOOL set; - DWORD value; - HRESULT expected; - BOOL todo; -} uri_builder_port; - -typedef struct _uri_builder_str_property { - const char* expected; - HRESULT result; - BOOL todo; -} uri_builder_str_property; - -typedef struct _uri_builder_dword_property { - DWORD expected; - HRESULT result; - BOOL todo; -} uri_builder_dword_property; - -typedef struct _uri_builder_test { - const char *uri; - DWORD create_flags; - HRESULT create_builder_expected; - BOOL create_builder_todo; - - uri_builder_property properties[URI_BUILDER_STR_PROPERTY_COUNT]; - - uri_builder_port port_prop; - - DWORD uri_flags; - HRESULT uri_hres; - BOOL uri_todo; - - DWORD uri_simple_encode_flags; - HRESULT uri_simple_hres; - BOOL uri_simple_todo; - - DWORD uri_with_flags; - DWORD uri_with_builder_flags; - DWORD uri_with_encode_flags; - HRESULT uri_with_hres; - BOOL uri_with_todo; - - uri_builder_str_property expected_str_props[URI_STR_PROPERTY_COUNT]; - uri_builder_dword_property expected_dword_props[URI_DWORD_PROPERTY_COUNT]; -} uri_builder_test; - -static const uri_builder_test uri_builder_tests[] = { - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"#fragment",NULL,Uri_PROPERTY_FRAGMENT,S_OK,FALSE}, - {TRUE,"password",NULL,Uri_PROPERTY_PASSWORD,S_OK,FALSE}, - {TRUE,"?query=x",NULL,Uri_PROPERTY_QUERY,S_OK,FALSE}, - {TRUE,"username",NULL,Uri_PROPERTY_USER_NAME,S_OK,FALSE} - }, - {FALSE}, - 0,S_OK,FALSE, - 0,S_OK,FALSE, - 0,0,0,S_OK,FALSE, - { - {"http://username:password@google.com/?query=x#fragment",S_OK}, - {"username:password@google.com",S_OK}, - {"http://google.com/?query=x#fragment",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"#fragment",S_OK}, - {"google.com",S_OK}, - {"password",S_OK}, - {"/",S_OK}, - {"/?query=x",S_OK}, - {"?query=x",S_OK}, - {"http://username:password@google.com/?query=x#fragment",S_OK}, - {"http",S_OK}, - {"username:password",S_OK}, - {"username",S_OK} - }, - { - {Uri_HOST_DNS,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"test",NULL,Uri_PROPERTY_SCHEME_NAME,S_OK,FALSE} - }, - {TRUE,TRUE,120,S_OK,FALSE}, - 0,S_OK,FALSE, - 0,S_OK,FALSE, - 0,0,0,S_OK,FALSE, - { - {"test://google.com:120/",S_OK}, - {"google.com:120",S_OK}, - {"test://google.com:120/",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"/",S_OK}, - {"/",S_OK}, - {"",S_FALSE}, - {"test://google.com:120/",S_OK}, - {"test",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {120,S_OK}, - {URL_SCHEME_UNKNOWN,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "/Test/test dir",Uri_CREATE_ALLOW_RELATIVE,S_OK,FALSE, - { - {TRUE,"http",NULL,Uri_PROPERTY_SCHEME_NAME,S_OK,FALSE}, - {TRUE,"::192.2.3.4",NULL,Uri_PROPERTY_HOST,S_OK,FALSE}, - {TRUE,NULL,NULL,Uri_PROPERTY_PATH,S_OK,FALSE} - }, - {FALSE}, - 0,S_OK,FALSE, - 0,S_OK,FALSE, - 0,0,0,S_OK,FALSE, - { - {"http://[::192.2.3.4]/",S_OK}, - {"[::192.2.3.4]",S_OK}, - {"http://[::192.2.3.4]/",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"",S_FALSE}, - {"::192.2.3.4",S_OK}, - {"",S_FALSE}, - {"/",S_OK}, - {"/",S_OK}, - {"",S_FALSE}, - {"http://[::192.2.3.4]/",S_OK}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_IPV6,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"Frag","#Frag",Uri_PROPERTY_FRAGMENT,S_OK,FALSE} - }, - {FALSE}, - 0,S_OK,FALSE, - 0,S_OK,FALSE, - 0,0,0,S_OK,FALSE, - { - {"http://google.com/#Frag",S_OK}, - {"google.com",S_OK}, - {"http://google.com/#Frag",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"#Frag",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"/",S_OK}, - {"/",S_OK}, - {"",S_FALSE}, - {"http://google.com/#Frag",S_OK}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"","#",Uri_PROPERTY_FRAGMENT,S_OK,FALSE}, - }, - {FALSE}, - 0,S_OK,FALSE, - 0,S_OK,FALSE, - 0,0,0,S_OK,FALSE, - { - {"http://google.com/#",S_OK}, - {"google.com",S_OK}, - {"http://google.com/#",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"#",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"/",S_OK}, - {"/",S_OK}, - {"",S_FALSE}, - {"http://google.com/#",S_OK}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,":password",NULL,Uri_PROPERTY_PASSWORD,S_OK,FALSE} - }, - {FALSE}, - 0,S_OK,FALSE, - 0,S_OK,FALSE, - 0,0,0,S_OK,FALSE, - { - {"http://::password@google.com/",S_OK}, - {"::password@google.com",S_OK}, - {"http://google.com/",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"google.com",S_OK}, - {":password",S_OK}, - {"/",S_OK}, - {"/",S_OK}, - {"",S_FALSE}, - {"http://::password@google.com/",S_OK}, - {"http",S_OK}, - {"::password",S_OK}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "test/test",Uri_CREATE_ALLOW_RELATIVE,S_OK,FALSE, - { - {TRUE,"password",NULL,Uri_PROPERTY_PASSWORD,S_OK,FALSE} - }, - {FALSE}, - Uri_CREATE_ALLOW_RELATIVE,S_OK,FALSE, - 0,S_OK,FALSE, - Uri_CREATE_ALLOW_RELATIVE,0,0,S_OK,FALSE, - { - {":password@test/test",S_OK}, - {":password@",S_OK}, - {":password@test/test",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"",S_FALSE}, - {"",S_FALSE}, - {"password",S_OK}, - {"test/test",S_OK}, - {"test/test",S_OK}, - {"",S_FALSE}, - {":password@test/test",S_OK}, - {"",S_FALSE}, - {":password",S_OK}, - {"",S_FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK}, - {0,S_FALSE}, - {URL_SCHEME_UNKNOWN,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"test/test",NULL,Uri_PROPERTY_PATH,S_OK,FALSE}, - }, - {FALSE}, - 0,S_OK,FALSE, - 0,S_OK,FALSE, - 0,0,0,S_OK,FALSE, - { - {"http://google.com/test/test",S_OK}, - {"google.com",S_OK}, - {"http://google.com/test/test",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"/test/test",S_OK}, - {"/test/test",S_OK}, - {"",S_FALSE}, - {"http://google.com/test/test",S_OK}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "zip:testing/test",0,S_OK,FALSE, - { - {TRUE,"test",NULL,Uri_PROPERTY_PATH,S_OK,FALSE}, - }, - {FALSE}, - 0,S_OK,FALSE, - 0,S_OK,FALSE, - 0,0,0,S_OK,FALSE, - { - {"zip:test",S_OK}, - {"",S_FALSE}, - {"zip:test",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"",S_FALSE}, - {"",S_FALSE}, - {"",S_FALSE}, - {"test",S_OK}, - {"test",S_OK}, - {"",S_FALSE}, - {"zip:test",S_OK}, - {"zip",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK}, - {0,S_FALSE}, - {URL_SCHEME_UNKNOWN,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "http://google.com/",0,S_OK,FALSE, - { - {FALSE}, - }, - /* 555 will be returned from GetPort even though FALSE was passed as the hasPort parameter. */ - {TRUE,FALSE,555,S_OK,FALSE}, - 0,S_OK,FALSE, - 0,S_OK,FALSE, - 0,0,0,S_OK,FALSE, - { - {"http://google.com/",S_OK}, - {"google.com",S_OK}, - {"http://google.com/",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"/",S_OK}, - {"/",S_OK}, - {"",S_FALSE}, - {"http://google.com/",S_OK}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - /* Still returns 80, even though earlier the port was disabled. */ - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "http://google.com/",0,S_OK,FALSE, - { - {FALSE}, - }, - /* Instead of getting "TRUE" back as the "hasPort" parameter in GetPort, - * you'll get 122345 instead. - */ - {TRUE,122345,222,S_OK,FALSE}, - 0,S_OK,FALSE, - 0,S_OK,FALSE, - 0,0,0,S_OK,FALSE, - { - {"http://google.com:222/",S_OK}, - {"google.com:222",S_OK}, - {"http://google.com:222/",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"/",S_OK}, - {"/",S_OK}, - {"",S_FALSE}, - {"http://google.com:222/",S_OK}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {222,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - /* IUri's created with the IUriBuilder can have ports that exceed USHORT_MAX. */ - { "http://google.com/",0,S_OK,FALSE, - { - {FALSE}, - }, - {TRUE,TRUE,999999,S_OK,FALSE}, - 0,S_OK,FALSE, - 0,S_OK,FALSE, - 0,0,0,S_OK,FALSE, - { - {"http://google.com:999999/",S_OK}, - {"google.com:999999",S_OK}, - {"http://google.com:999999/",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"/",S_OK}, - {"/",S_OK}, - {"",S_FALSE}, - {"http://google.com:999999/",S_OK}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {999999,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"test","?test",Uri_PROPERTY_QUERY,S_OK,FALSE}, - }, - - {FALSE}, - 0,S_OK,FALSE, - 0,S_OK,FALSE, - 0,0,0,S_OK,FALSE, - { - {"http://google.com/?test",S_OK}, - {"google.com",S_OK}, - {"http://google.com/?test",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"/",S_OK}, - {"/?test",S_OK}, - {"?test",S_OK}, - {"http://google.com/?test",S_OK}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "http://:password@google.com/",0,S_OK,FALSE, - { - {FALSE}, - }, - {FALSE}, - 0,S_OK,FALSE, - 0,S_OK,FALSE, - 0,0,0,S_OK,FALSE, - { - {"http://:password@google.com/",S_OK}, - {":password@google.com",S_OK}, - {"http://google.com/",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"google.com",S_OK}, - {"password",S_OK}, - {"/",S_OK}, - {"/",S_OK}, - {"",S_FALSE}, - {"http://:password@google.com/",S_OK}, - {"http",S_OK}, - {":password",S_OK}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - /* IUriBuilder doesn't need a base IUri to build a IUri. */ - { NULL,0,S_OK,FALSE, - { - {TRUE,"http",NULL,Uri_PROPERTY_SCHEME_NAME,S_OK,FALSE}, - {TRUE,"google.com",NULL,Uri_PROPERTY_HOST,S_OK,FALSE} - }, - {FALSE}, - 0,S_OK,FALSE, - 0,S_OK,FALSE, - 0,0,0,S_OK,FALSE, - { - {"http://google.com/",S_OK}, - {"google.com",S_OK}, - {"http://google.com/",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"/",S_OK}, - {"/",S_OK}, - {"",S_FALSE}, - {"http://google.com/",S_OK}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - /* Can't set the scheme name to NULL. */ - { "zip://google.com/",0,S_OK,FALSE, - { - {TRUE,NULL,"zip",Uri_PROPERTY_SCHEME_NAME,E_INVALIDARG,FALSE} - }, - {FALSE}, - 0,S_OK,FALSE, - 0,S_OK,FALSE, - 0,0,0,S_OK,FALSE, - { - {"zip://google.com/",S_OK}, - {"google.com",S_OK}, - {"zip://google.com/",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"/",S_OK}, - {"/",S_OK}, - {"",S_FALSE}, - {"zip://google.com/",S_OK}, - {"zip",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {0,S_FALSE}, - {URL_SCHEME_UNKNOWN,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - /* Can't set the scheme name to an empty string. */ - { "zip://google.com/",0,S_OK,FALSE, - { - {TRUE,"","zip",Uri_PROPERTY_SCHEME_NAME,E_INVALIDARG,FALSE} - }, - {FALSE}, - 0,S_OK,FALSE, - 0,S_OK,FALSE, - 0,0,0,S_OK,FALSE, - { - {"zip://google.com/",S_OK}, - {"google.com",S_OK}, - {"zip://google.com/",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"/",S_OK}, - {"/",S_OK}, - {"",S_FALSE}, - {"zip://google.com/",S_OK}, - {"zip",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {0,S_FALSE}, - {URL_SCHEME_UNKNOWN,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - /* -1 to CreateUri makes it use the same flags as the base IUri was created with. - * CreateUriSimple always uses the flags the base IUri was created with (if any). - */ - { "http://google.com/../../",Uri_CREATE_NO_CANONICALIZE,S_OK,FALSE, - {{FALSE}}, - {FALSE}, - -1,S_OK,FALSE, - 0,S_OK,FALSE, - 0,UriBuilder_USE_ORIGINAL_FLAGS,0,S_OK,FALSE, - { - {"http://google.com/../../",S_OK}, - {"google.com",S_OK}, - {"http://google.com/../../",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"/../../",S_OK}, - {"/../../",S_OK}, - {"",S_FALSE}, - {"http://google.com/../../",S_OK}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"#Fr<|>g",NULL,Uri_PROPERTY_FRAGMENT,S_OK,FALSE} - }, - {FALSE}, - -1,S_OK,FALSE, - 0,S_OK,FALSE, - Uri_CREATE_NO_DECODE_EXTRA_INFO,UriBuilder_USE_ORIGINAL_FLAGS,0,S_OK,FALSE, - { - {"http://google.com/#Fr%3C%7C%3Eg",S_OK}, - {"google.com",S_OK}, - {"http://google.com/#Fr%3C%7C%3Eg",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"#Fr%3C%7C%3Eg",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"/",S_OK}, - {"/",S_OK}, - {"",S_FALSE}, - {"http://google.com/#Fr<|>g",S_OK}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"#Fr<|>g",NULL,Uri_PROPERTY_FRAGMENT,S_OK,FALSE} - }, - {FALSE}, - Uri_CREATE_CANONICALIZE|Uri_CREATE_NO_CANONICALIZE,E_INVALIDARG,FALSE, - 0,S_OK,FALSE, - Uri_CREATE_CANONICALIZE|Uri_CREATE_NO_CANONICALIZE,UriBuilder_USE_ORIGINAL_FLAGS,0,S_OK,FALSE, - { - {"http://google.com/#Fr%3C%7C%3Eg",S_OK}, - {"google.com",S_OK}, - {"http://google.com/#Fr%3C%7C%3Eg",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"#Fr%3C%7C%3Eg",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"/",S_OK}, - {"/",S_OK}, - {"",S_FALSE}, - {"http://google.com/#Fr<|>g",S_OK}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { NULL,0,S_OK,FALSE, - { - {TRUE,"/test/test/",NULL,Uri_PROPERTY_PATH,S_OK,FALSE}, - {TRUE,"#Fr<|>g",NULL,Uri_PROPERTY_FRAGMENT,S_OK,FALSE} - }, - {FALSE}, - 0,INET_E_INVALID_URL,FALSE, - 0,INET_E_INVALID_URL,FALSE, - 0,0,0,INET_E_INVALID_URL,FALSE - }, - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"ht%xxtp",NULL,Uri_PROPERTY_SCHEME_NAME,S_OK,FALSE} - }, - {FALSE}, - 0,INET_E_INVALID_URL,FALSE, - 0,INET_E_INVALID_URL,FALSE, - 0,0,0,INET_E_INVALID_URL,FALSE - }, - /* File scheme's can't have a username set. */ - { "file://google.com/",0,S_OK,FALSE, - { - {TRUE,"username",NULL,Uri_PROPERTY_USER_NAME,S_OK,FALSE} - }, - {FALSE}, - 0,INET_E_INVALID_URL,FALSE, - 0,INET_E_INVALID_URL,FALSE, - 0,0,0,INET_E_INVALID_URL,FALSE - }, - /* File schemes can't have a password set. */ - { "file://google.com/",0,S_OK,FALSE, - { - {TRUE,"password",NULL,Uri_PROPERTY_PASSWORD,S_OK,FALSE} - }, - {FALSE}, - 0,INET_E_INVALID_URL,FALSE, - 0,INET_E_INVALID_URL,FALSE, - 0,0,0,INET_E_INVALID_URL,FALSE - }, - /* UserName can't contain any character that is a delimeter for another - * component that appears after it in a normal URI. - */ - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"user:pass",NULL,Uri_PROPERTY_USER_NAME,S_OK,FALSE} - }, - {FALSE}, - 0,INET_E_INVALID_URL,FALSE, - 0,INET_E_INVALID_URL,FALSE, - 0,0,0,INET_E_INVALID_URL,FALSE - }, - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"user@google.com",NULL,Uri_PROPERTY_USER_NAME,S_OK,FALSE} - }, - {FALSE}, - 0,INET_E_INVALID_URL,FALSE, - 0,INET_E_INVALID_URL,FALSE, - 0,0,0,INET_E_INVALID_URL,FALSE - }, - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"user/path",NULL,Uri_PROPERTY_USER_NAME,S_OK,FALSE} - }, - {FALSE}, - 0,INET_E_INVALID_URL,FALSE, - 0,INET_E_INVALID_URL,FALSE, - 0,0,0,INET_E_INVALID_URL,FALSE - }, - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"user?Query",NULL,Uri_PROPERTY_USER_NAME,S_OK,FALSE} - }, - {FALSE}, - 0,INET_E_INVALID_URL,FALSE, - 0,INET_E_INVALID_URL,FALSE, - 0,0,0,INET_E_INVALID_URL,FALSE - }, - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"user#Frag",NULL,Uri_PROPERTY_USER_NAME,S_OK,FALSE} - }, - {FALSE}, - 0,INET_E_INVALID_URL,FALSE, - 0,INET_E_INVALID_URL,FALSE, - 0,0,0,INET_E_INVALID_URL,FALSE - }, - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"pass@google.com",NULL,Uri_PROPERTY_PASSWORD,S_OK,FALSE} - }, - {FALSE}, - 0,INET_E_INVALID_URL,FALSE, - 0,INET_E_INVALID_URL,FALSE, - 0,0,0,INET_E_INVALID_URL,FALSE - }, - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"pass/path",NULL,Uri_PROPERTY_PASSWORD,S_OK,FALSE} - }, - {FALSE}, - 0,INET_E_INVALID_URL,FALSE, - 0,INET_E_INVALID_URL,FALSE, - 0,0,0,INET_E_INVALID_URL,FALSE - }, - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"pass?query",NULL,Uri_PROPERTY_PASSWORD,S_OK,FALSE} - }, - {FALSE}, - 0,INET_E_INVALID_URL,FALSE, - 0,INET_E_INVALID_URL,FALSE, - 0,0,0,INET_E_INVALID_URL,FALSE - }, - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"pass#frag",NULL,Uri_PROPERTY_PASSWORD,S_OK,FALSE} - }, - {FALSE}, - 0,INET_E_INVALID_URL,FALSE, - 0,INET_E_INVALID_URL,FALSE, - 0,0,0,INET_E_INVALID_URL,FALSE - }, - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"winehq.org/test",NULL,Uri_PROPERTY_HOST,S_OK,FALSE} - }, - {FALSE}, - 0,INET_E_INVALID_URL,FALSE, - 0,INET_E_INVALID_URL,FALSE, - 0,0,0,INET_E_INVALID_URL,FALSE - }, - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"winehq.org?test",NULL,Uri_PROPERTY_HOST,S_OK,FALSE} - }, - {FALSE}, - 0,INET_E_INVALID_URL,FALSE, - 0,INET_E_INVALID_URL,FALSE, - 0,0,0,INET_E_INVALID_URL,FALSE - }, - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"winehq.org#test",NULL,Uri_PROPERTY_HOST,S_OK,FALSE} - }, - {FALSE}, - 0,INET_E_INVALID_URL,FALSE, - 0,INET_E_INVALID_URL,FALSE, - 0,0,0,INET_E_INVALID_URL,FALSE - }, - /* Hostname is allowed to contain a ':' (even for known scheme types). */ - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"winehq.org:test",NULL,Uri_PROPERTY_HOST,S_OK,FALSE}, - }, - {FALSE}, - 0,S_OK,FALSE, - 0,S_OK,FALSE, - 0,0,0,S_OK,FALSE, - { - {"http://winehq.org:test/",S_OK}, - {"winehq.org:test",S_OK}, - {"http://winehq.org:test/",S_OK}, - {"winehq.org:test",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"winehq.org:test",S_OK}, - {"",S_FALSE}, - {"/",S_OK}, - {"/",S_OK}, - {"",S_FALSE}, - {"http://winehq.org:test/",S_OK}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - /* Can't set the host name to NULL. */ - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,NULL,"google.com",Uri_PROPERTY_HOST,E_INVALIDARG,FALSE} - }, - {FALSE}, - 0,S_OK,FALSE, - 0,S_OK,FALSE, - 0,0,0,S_OK,FALSE, - { - {"http://google.com/",S_OK}, - {"google.com",S_OK}, - {"http://google.com/",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"/",S_OK}, - {"/",S_OK}, - {"",S_FALSE}, - {"http://google.com/",S_OK}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - /* Can set the host name to an empty string. */ - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"",NULL,Uri_PROPERTY_HOST,S_OK,FALSE} - }, - {FALSE}, - 0,S_OK,FALSE, - 0,S_OK,FALSE, - 0,0,0,S_OK,FALSE, - { - {"http:///",S_OK}, - {"",S_OK}, - {"http:///",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"",S_FALSE}, - {"",S_OK}, - {"",S_FALSE}, - {"/",S_OK}, - {"/",S_OK}, - {"",S_FALSE}, - {"http:///",S_OK}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"/path?query",NULL,Uri_PROPERTY_PATH,S_OK,FALSE} - }, - {FALSE}, - 0,INET_E_INVALID_URL,FALSE, - 0,INET_E_INVALID_URL,FALSE, - 0,0,0,INET_E_INVALID_URL,FALSE - }, - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"/path#test",NULL,Uri_PROPERTY_PATH,S_OK,FALSE} - }, - {FALSE}, - 0,INET_E_INVALID_URL,FALSE, - 0,INET_E_INVALID_URL,FALSE, - 0,0,0,INET_E_INVALID_URL,FALSE - }, - { "http://google.com/",0,S_OK,FALSE, - { - {TRUE,"?path#test",NULL,Uri_PROPERTY_QUERY,S_OK,FALSE} - }, - {FALSE}, - 0,INET_E_INVALID_URL,FALSE, - 0,INET_E_INVALID_URL,FALSE, - 0,0,0,INET_E_INVALID_URL,FALSE - } -}; - -typedef struct _uri_builder_remove_test { - const char *uri; - DWORD create_flags; - HRESULT create_builder_expected; - BOOL create_builder_todo; - - DWORD remove_properties; - HRESULT remove_expected; - BOOL remove_todo; - - const char *expected_uri; - DWORD expected_flags; - HRESULT expected_hres; - BOOL expected_todo; -} uri_builder_remove_test; - -static const uri_builder_remove_test uri_builder_remove_tests[] = { - { "http://google.com/test?test=y#Frag",0,S_OK,FALSE, - Uri_HAS_FRAGMENT|Uri_HAS_PATH|Uri_HAS_QUERY,S_OK,FALSE, - "http://google.com/",0,S_OK,FALSE - }, - { "http://user:pass@winehq.org/",0,S_OK,FALSE, - Uri_HAS_USER_NAME|Uri_HAS_PASSWORD,S_OK,FALSE, - "http://winehq.org/",0,S_OK,FALSE - }, - { "zip://google.com?Test=x",0,S_OK,FALSE, - Uri_HAS_HOST,S_OK,FALSE, - "zip:/?Test=x",0,S_OK,FALSE - }, - /* Doesn't remove the whole userinfo component. */ - { "http://username:pass@google.com/",0,S_OK,FALSE, - Uri_HAS_USER_INFO,S_OK,FALSE, - "http://username:pass@google.com/",0,S_OK,FALSE - }, - /* Doesn't remove the domain. */ - { "http://google.com/",0,S_OK,FALSE, - Uri_HAS_DOMAIN,S_OK,FALSE, - "http://google.com/",0,S_OK,FALSE - }, - { "http://google.com:120/",0,S_OK,FALSE, - Uri_HAS_AUTHORITY,S_OK,FALSE, - "http://google.com:120/",0,S_OK,FALSE - }, - { "http://google.com/test.com/",0,S_OK,FALSE, - Uri_HAS_EXTENSION,S_OK,FALSE, - "http://google.com/test.com/",0,S_OK,FALSE - }, - { "http://google.com/?test=x",0,S_OK,FALSE, - Uri_HAS_PATH_AND_QUERY,S_OK,FALSE, - "http://google.com/?test=x",0,S_OK,FALSE - }, - /* Can't remove the scheme name. */ - { "http://google.com/?test=x",0,S_OK,FALSE, - Uri_HAS_SCHEME_NAME|Uri_HAS_QUERY,E_INVALIDARG,FALSE, - "http://google.com/?test=x",0,S_OK,FALSE - } -}; - -typedef struct _uri_combine_str_property { - const char *value; - HRESULT expected; - BOOL todo; - const char *broken_value; - const char *value_ex; -} uri_combine_str_property; - -typedef struct _uri_combine_test { - const char *base_uri; - DWORD base_create_flags; - const char *relative_uri; - DWORD relative_create_flags; - DWORD combine_flags; - HRESULT expected; - BOOL todo; - - uri_combine_str_property str_props[URI_STR_PROPERTY_COUNT]; - uri_dword_property dword_props[URI_DWORD_PROPERTY_COUNT]; -} uri_combine_test; - -static const uri_combine_test uri_combine_tests[] = { - { "http://google.com/fun/stuff",0, - "../not/fun/stuff",Uri_CREATE_ALLOW_RELATIVE, - 0,S_OK,FALSE, - { - {"http://google.com/not/fun/stuff",S_OK}, - {"google.com",S_OK}, - {"http://google.com/not/fun/stuff",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"/not/fun/stuff",S_OK}, - {"/not/fun/stuff",S_OK}, - {"",S_FALSE}, - {"http://google.com/not/fun/stuff",S_OK}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "http://google.com/test",0, - "zip://test.com/cool",0, - 0,S_OK,FALSE, - { - {"zip://test.com/cool",S_OK}, - {"test.com",S_OK}, - {"zip://test.com/cool",S_OK}, - {"test.com",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"test.com",S_OK}, - {"",S_FALSE}, - {"/cool",S_OK}, - {"/cool",S_OK}, - {"",S_FALSE}, - {"zip://test.com/cool",S_OK}, - {"zip",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {0,S_FALSE}, - {URL_SCHEME_UNKNOWN,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "http://google.com/use/base/path",0, - "?relative",Uri_CREATE_ALLOW_RELATIVE, - 0,S_OK,FALSE, - { - {"http://google.com/use/base/path?relative",S_OK}, - {"google.com",S_OK}, - {"http://google.com/use/base/path?relative",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"/use/base/path",S_OK}, - {"/use/base/path?relative",S_OK}, - {"?relative",S_OK}, - {"http://google.com/use/base/path?relative",S_OK}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "http://google.com/path",0, - "/test/../test/.././testing",Uri_CREATE_ALLOW_RELATIVE, - 0,S_OK,FALSE, - { - {"http://google.com/testing",S_OK}, - {"google.com",S_OK}, - {"http://google.com/testing",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"/testing",S_OK}, - {"/testing",S_OK}, - {"",S_FALSE}, - {"http://google.com/testing",S_OK}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "http://google.com/path",0, - "/test/../test/.././testing",Uri_CREATE_ALLOW_RELATIVE, - URL_DONT_SIMPLIFY,S_OK,FALSE, - { - {"http://google.com:80/test/../test/.././testing",S_OK}, - {"google.com",S_OK}, - {"http://google.com:80/test/../test/.././testing",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"/test/../test/.././testing",S_OK}, - {"/test/../test/.././testing",S_OK}, - {"",S_FALSE}, - {"http://google.com:80/test/../test/.././testing",S_OK}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "http://winehq.org/test/abc",0, - "testing/abc/../test",Uri_CREATE_ALLOW_RELATIVE, - 0,S_OK,FALSE, - { - {"http://winehq.org/test/testing/test",S_OK}, - {"winehq.org",S_OK}, - {"http://winehq.org/test/testing/test",S_OK}, - {"winehq.org",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"winehq.org",S_OK}, - {"",S_FALSE}, - {"/test/testing/test",S_OK}, - {"/test/testing/test",S_OK}, - {"",S_FALSE}, - {"http://winehq.org/test/testing/test",S_OK}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "http://winehq.org/test/abc",0, - "testing/abc/../test",Uri_CREATE_ALLOW_RELATIVE, - URL_DONT_SIMPLIFY,S_OK,FALSE, - { - {"http://winehq.org:80/test/testing/abc/../test",S_OK}, - /* Default port is hidden in the authority. */ - {"winehq.org",S_OK}, - {"http://winehq.org:80/test/testing/abc/../test",S_OK}, - {"winehq.org",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"winehq.org",S_OK}, - {"",S_FALSE}, - {"/test/testing/abc/../test",S_OK}, - {"/test/testing/abc/../test",S_OK}, - {"",S_FALSE}, - {"http://winehq.org:80/test/testing/abc/../test",S_OK}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "http://winehq.org/test?query",0, - "testing",Uri_CREATE_ALLOW_RELATIVE, - 0,S_OK,FALSE, - { - {"http://winehq.org/testing",S_OK}, - {"winehq.org",S_OK}, - {"http://winehq.org/testing",S_OK}, - {"winehq.org",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"winehq.org",S_OK}, - {"",S_FALSE}, - {"/testing",S_OK}, - {"/testing",S_OK}, - {"",S_FALSE}, - {"http://winehq.org/testing",S_OK}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "http://winehq.org/test#frag",0, - "testing",Uri_CREATE_ALLOW_RELATIVE, - 0,S_OK,FALSE, - { - {"http://winehq.org/testing",S_OK}, - {"winehq.org",S_OK}, - {"http://winehq.org/testing",S_OK}, - {"winehq.org",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"winehq.org",S_OK}, - {"",S_FALSE}, - {"/testing",S_OK}, - {"/testing",S_OK}, - {"",S_FALSE}, - {"http://winehq.org/testing",S_OK}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "testing?query#frag",Uri_CREATE_ALLOW_RELATIVE, - "test",Uri_CREATE_ALLOW_RELATIVE, - 0,S_OK,FALSE, - { - {"test",S_OK}, - {"",S_FALSE}, - {"test",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"",S_FALSE}, - {"",S_FALSE}, - {"",S_FALSE}, - {"test",S_OK}, - {"test",S_OK}, - {"",S_FALSE}, - {"test",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK}, - {0,S_FALSE}, - {URL_SCHEME_UNKNOWN,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "file:///c:/test/test",0, - "/testing.mp3",Uri_CREATE_ALLOW_RELATIVE, - URL_FILE_USE_PATHURL,S_OK,FALSE, - { - {"file://c:\\testing.mp3",S_OK}, - {"",S_FALSE}, - {"file://c:\\testing.mp3",S_OK}, - {"",S_FALSE}, - {".mp3",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"",S_FALSE}, - {"c:\\testing.mp3",S_OK}, - {"c:\\testing.mp3",S_OK}, - {"",S_FALSE}, - {"file://c:\\testing.mp3",S_OK}, - {"file",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK}, - {0,S_FALSE}, - {URL_SCHEME_FILE,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "file:///c:/test/test",0, - "/testing.mp3",Uri_CREATE_ALLOW_RELATIVE, - 0,S_OK,FALSE, - { - {"file:///c:/testing.mp3",S_OK}, - {"",S_FALSE}, - {"file:///c:/testing.mp3",S_OK}, - {"",S_FALSE}, - {".mp3",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"",S_FALSE}, - {"/c:/testing.mp3",S_OK}, - {"/c:/testing.mp3",S_OK}, - {"",S_FALSE}, - {"file:///c:/testing.mp3",S_OK}, - {"file",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK}, - {0,S_FALSE}, - {URL_SCHEME_FILE,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "file://test.com/test/test",0, - "/testing.mp3",Uri_CREATE_ALLOW_RELATIVE, - URL_FILE_USE_PATHURL,S_OK,FALSE, - { - {"file://\\\\test.com\\testing.mp3",S_OK}, - {"test.com",S_OK}, - {"file://\\\\test.com\\testing.mp3",S_OK}, - {"test.com",S_OK}, - {".mp3",S_OK}, - {"",S_FALSE}, - {"test.com",S_OK}, - {"",S_FALSE}, - {"\\testing.mp3",S_OK}, - {"\\testing.mp3",S_OK}, - {"",S_FALSE}, - {"file://\\\\test.com\\testing.mp3",S_OK}, - {"file",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {0,S_FALSE}, - {URL_SCHEME_FILE,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - /* URL_DONT_SIMPLIFY has no effect. */ - { "http://google.com/test",0, - "zip://test.com/cool/../cool/test",0, - URL_DONT_SIMPLIFY,S_OK,FALSE, - { - {"zip://test.com/cool/test",S_OK,FALSE,NULL,"zip://test.com/cool/../cool/test"}, - {"test.com",S_OK}, - {"zip://test.com/cool/test",S_OK,FALSE,NULL,"zip://test.com/cool/../cool/test"}, - {"test.com",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"test.com",S_OK}, - {"",S_FALSE}, - {"/cool/test",S_OK,FALSE,NULL,"/cool/../cool/test"}, - {"/cool/test",S_OK,FALSE,NULL,"/cool/../cool/test"}, - {"",S_FALSE}, - /* The resulting IUri has the same Raw URI as the relative URI (only IE 8). - * On IE 7 it reduces the path in the Raw URI. - */ - {"zip://test.com/cool/../cool/test",S_OK,FALSE,"zip://test.com/cool/test"}, - {"zip",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {0,S_FALSE}, - {URL_SCHEME_UNKNOWN,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - /* FILE_USE_PATHURL has no effect in IE 8, in IE 7 the - * resulting URI is converted into a dos path. - */ - { "http://google.com/test",0, - "file:///c:/test/",0, - URL_FILE_USE_PATHURL,S_OK,FALSE, - { - {"file:///c:/test/",S_OK,FALSE,"file://c:\\test\\"}, - {"",S_FALSE}, - {"file:///c:/test/",S_OK,FALSE,"file://c:\\test\\"}, - {"",S_FALSE}, - {"",S_FALSE}, - {"",S_FALSE}, - {"",S_FALSE}, - {"",S_FALSE}, - {"/c:/test/",S_OK,FALSE,"c:\\test\\"}, - {"/c:/test/",S_OK,FALSE,"c:\\test\\"}, - {"",S_FALSE}, - {"file:///c:/test/",S_OK,FALSE,"file://c:\\test\\"}, - {"file",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_UNKNOWN,S_OK}, - {0,S_FALSE}, - {URL_SCHEME_FILE,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - { "http://google.com/test",0, - "http://test.com/test#%30test",0, - URL_DONT_UNESCAPE_EXTRA_INFO,S_OK,FALSE, - { - {"http://test.com/test#0test",S_OK,FALSE,NULL,"http://test.com/test#%30test"}, - {"test.com",S_OK}, - {"http://test.com/test#0test",S_OK,FALSE,NULL,"http://test.com/test#%30test"}, - {"test.com",S_OK}, - {"",S_FALSE}, - {"#0test",S_OK,FALSE,NULL,"#%30test"}, - {"test.com",S_OK}, - {"",S_FALSE}, - {"/test",S_OK}, - {"/test",S_OK}, - {"",S_FALSE}, - /* IE 7 decodes the %30 to a 0 in the Raw URI. */ - {"http://test.com/test#%30test",S_OK,FALSE,"http://test.com/test#0test"}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - /* Windows validates the path component from the relative Uri. */ - { "http://google.com/test",0, - "/Te%XXst",Uri_CREATE_ALLOW_RELATIVE, - 0,E_INVALIDARG,FALSE - }, - /* Windows doesn't validate the query from the relative Uri. */ - { "http://google.com/test",0, - "?Tes%XXt",Uri_CREATE_ALLOW_RELATIVE, - 0,S_OK,FALSE, - { - {"http://google.com/test?Tes%XXt",S_OK}, - {"google.com",S_OK}, - {"http://google.com/test?Tes%XXt",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"",S_FALSE}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"/test",S_OK}, - {"/test?Tes%XXt",S_OK}, - {"?Tes%XXt",S_OK}, - {"http://google.com/test?Tes%XXt",S_OK}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - /* Windows doesn't validate the fragment from the relative Uri. */ - { "http://google.com/test",0, - "#Tes%XXt",Uri_CREATE_ALLOW_RELATIVE, - 0,S_OK,FALSE, - { - {"http://google.com/test#Tes%XXt",S_OK}, - {"google.com",S_OK}, - {"http://google.com/test#Tes%XXt",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"#Tes%XXt",S_OK}, - {"google.com",S_OK}, - {"",S_FALSE}, - {"/test",S_OK}, - {"/test",S_OK}, - {"",S_FALSE}, - {"http://google.com/test#Tes%XXt",S_OK}, - {"http",S_OK}, - {"",S_FALSE}, - {"",S_FALSE} - }, - { - {Uri_HOST_DNS,S_OK}, - {80,S_OK}, - {URL_SCHEME_HTTP,S_OK}, - {URLZONE_INVALID,E_NOTIMPL} - } - }, - /* Creates an IUri which contains an invalid dos path char. */ - { "file:///c:/test",0, - "/test",0,PARSE_CANONICALIZE,0,"zip://google.com/test<|>",S_OK,FALSE}, - {"http://google.com/test<|>",0,PARSE_CANONICALIZE,0,"http://google.com/test%3C%7C%3E",S_OK,FALSE}, - {"http://google.com/%30%23%3F",0,PARSE_CANONICALIZE,URL_UNESCAPE,"http://google.com/0#?",S_OK,FALSE}, - {"test <|>",Uri_CREATE_ALLOW_RELATIVE,PARSE_CANONICALIZE,URL_ESCAPE_UNSAFE,"test %3C%7C%3E",S_OK,FALSE}, - {"test <|>",Uri_CREATE_ALLOW_RELATIVE,PARSE_CANONICALIZE,URL_ESCAPE_SPACES_ONLY,"test%20<|>",S_OK,FALSE}, - {"test%20<|>",Uri_CREATE_ALLOW_RELATIVE,PARSE_CANONICALIZE,URL_UNESCAPE|URL_ESCAPE_UNSAFE,"test%20%3C%7C%3E",S_OK,FALSE}, - {"http://google.com/%20",0,PARSE_CANONICALIZE,URL_ESCAPE_PERCENT,"http://google.com/%2520",S_OK,FALSE}, - {"http://google.com/test/../",Uri_CREATE_NO_CANONICALIZE,PARSE_CANONICALIZE,URL_DONT_SIMPLIFY,"http://google.com/test/../",S_OK,FALSE}, - {"http://google.com/test/../",Uri_CREATE_NO_CANONICALIZE,PARSE_CANONICALIZE,URL_NO_META,"http://google.com/test/../",S_OK,FALSE}, - {"http://google.com/test/../",Uri_CREATE_NO_CANONICALIZE,PARSE_CANONICALIZE,0,"http://google.com/",S_OK,FALSE}, - {"zip://google.com/test/../",Uri_CREATE_NO_CANONICALIZE,PARSE_CANONICALIZE,0,"zip://google.com/",S_OK,FALSE}, - {"file:///c:/test/../test",Uri_CREATE_NO_CANONICALIZE,PARSE_CANONICALIZE,URL_DONT_SIMPLIFY,"file:///c:/test/../test",S_OK,FALSE}, - - /* PARSE_FRIENDLY tests. */ - {"http://test@google.com/test#test",0,PARSE_FRIENDLY,0,"http://google.com/test#test",S_OK,FALSE}, - {"zip://test@google.com/test",0,PARSE_FRIENDLY,0,"zip://test@google.com/test",S_OK,FALSE}, - - /* PARSE_ROOTDOCUMENT tests. */ - {"http://google.com:200/test/test",0,PARSE_ROOTDOCUMENT,0,"http://google.com:200/",S_OK,FALSE}, - {"http://google.com",Uri_CREATE_NO_CANONICALIZE,PARSE_ROOTDOCUMENT,0,"http://google.com/",S_OK,FALSE}, - {"zip://google.com/",0,PARSE_ROOTDOCUMENT,0,"",S_OK,FALSE}, - {"file:///c:/testing/",0,PARSE_ROOTDOCUMENT,0,"",S_OK,FALSE}, - {"file://server/test",0,PARSE_ROOTDOCUMENT,0,"",S_OK,FALSE}, - {"zip:test/test",0,PARSE_ROOTDOCUMENT,0,"",S_OK,FALSE}, - - /* PARSE_DOCUMENT tests. */ - {"http://test@google.com/test?query#frag",0,PARSE_DOCUMENT,0,"http://test@google.com/test?query",S_OK,FALSE}, - {"http:testing#frag",0,PARSE_DOCUMENT,0,"",S_OK,FALSE}, - {"file:///c:/test#frag",0,PARSE_DOCUMENT,0,"",S_OK,FALSE}, - {"zip://google.com/#frag",0,PARSE_DOCUMENT,0,"",S_OK,FALSE}, - {"zip:test#frag",0,PARSE_DOCUMENT,0,"",S_OK,FALSE}, - {"testing#frag",Uri_CREATE_ALLOW_RELATIVE,PARSE_DOCUMENT,0,"",S_OK,FALSE}, - - /* PARSE_PATH_FROM_URL tests. */ - {"file:///c:/test.mp3",0,PARSE_PATH_FROM_URL,0,"c:\\test.mp3",S_OK,FALSE}, - {"file:///c:/t<|>est.mp3",0,PARSE_PATH_FROM_URL,0,"c:\\t<|>est.mp3",S_OK,FALSE}, - {"file:///c:/te%XX t/",0,PARSE_PATH_FROM_URL,0,"c:\\te%XX t\\",S_OK,FALSE}, - {"file://server/test",0,PARSE_PATH_FROM_URL,0,"\\\\server\\test",S_OK,FALSE}, - {"http://google.com/",0,PARSE_PATH_FROM_URL,0,"",E_INVALIDARG,FALSE}, - - /* PARSE_URL_FROM_PATH tests. */ - /* This function almost seems to useless (just returns the absolute uri). */ - {"test.com",Uri_CREATE_ALLOW_RELATIVE,PARSE_URL_FROM_PATH,0,"test.com",S_OK,FALSE}, - {"/test/test",Uri_CREATE_ALLOW_RELATIVE,PARSE_URL_FROM_PATH,0,"/test/test",S_OK,FALSE}, - {"file://c:\\test\\test",Uri_CREATE_FILE_USE_DOS_PATH,PARSE_URL_FROM_PATH,0,"file://c:\\test\\test",S_OK,FALSE}, - {"file:c:/test",0,PARSE_URL_FROM_PATH,0,"",S_OK,FALSE}, - {"http:google.com/",0,PARSE_URL_FROM_PATH,0,"",S_OK,FALSE}, - - /* PARSE_SCHEMA tests. */ - {"http://google.com/test",0,PARSE_SCHEMA,0,"http",S_OK,FALSE}, - {"test",Uri_CREATE_ALLOW_RELATIVE,PARSE_SCHEMA,0,"",S_OK,FALSE}, - - /* PARSE_SITE tests. */ - {"http://google.uk.com/",0,PARSE_SITE,0,"google.uk.com",S_OK,FALSE}, - {"http://google.com.com/",0,PARSE_SITE,0,"google.com.com",S_OK,FALSE}, - {"google.com",Uri_CREATE_ALLOW_RELATIVE,PARSE_SITE,0,"",S_OK,FALSE}, - {"file://server/test",0,PARSE_SITE,0,"server",S_OK,FALSE}, - - /* PARSE_DOMAIN tests. */ - {"http://google.com.uk/",0,PARSE_DOMAIN,0,"google.com.uk",S_OK,FALSE}, - {"http://google.com.com/",0,PARSE_DOMAIN,0,"com.com",S_OK,FALSE}, - {"test/test",Uri_CREATE_ALLOW_RELATIVE,PARSE_DOMAIN,0,"",S_OK,FALSE}, - {"file://server/test",0,PARSE_DOMAIN,0,"",S_OK,FALSE}, - - /* PARSE_LOCATION and PARSE_ANCHOR tests. */ - {"http://google.com/test#Test",0,PARSE_ANCHOR,0,"#Test",S_OK,FALSE}, - {"http://google.com/test#Test",0,PARSE_LOCATION,0,"#Test",S_OK,FALSE}, - {"test",Uri_CREATE_ALLOW_RELATIVE,PARSE_ANCHOR,0,"",S_OK,FALSE}, - {"test",Uri_CREATE_ALLOW_RELATIVE,PARSE_LOCATION,0,"",S_OK,FALSE} -}; - -static inline LPWSTR a2w(LPCSTR str) { - LPWSTR ret = NULL; - - if(str) { - DWORD len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); - ret = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)); - MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len); - } - - return ret; -} - -static inline BOOL heap_free(void* mem) { - return HeapFree(GetProcessHeap(), 0, mem); -} - -static inline DWORD strcmp_aw(LPCSTR strA, LPCWSTR strB) { - LPWSTR strAW = a2w(strA); - DWORD ret = lstrcmpW(strAW, strB); - heap_free(strAW); - return ret; -} - -static inline ULONG get_refcnt(IUri *uri) { - IUri_AddRef(uri); - return IUri_Release(uri); -} - -static void change_property(IUriBuilder *builder, const uri_builder_property *prop, - DWORD test_index) { - HRESULT hr; - LPWSTR valueW; - - valueW = a2w(prop->value); - switch(prop->property) { - case Uri_PROPERTY_FRAGMENT: - hr = IUriBuilder_SetFragment(builder, valueW); - if(prop->todo) { - todo_wine { - ok(hr == prop->expected, - "Error: IUriBuilder_SetFragment returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, prop->expected, test_index); - } - } else { - ok(hr == prop->expected, - "Error: IUriBuilder_SetFragment returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, prop->expected, test_index); - } - break; - case Uri_PROPERTY_HOST: - hr = IUriBuilder_SetHost(builder, valueW); - if(prop->todo) { - todo_wine { - ok(hr == prop->expected, - "Error: IUriBuilder_SetHost returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, prop->expected, test_index); - } - } else { - ok(hr == prop->expected, - "Error: IUriBuilder_SetHost returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, prop->expected, test_index); - } - break; - case Uri_PROPERTY_PASSWORD: - hr = IUriBuilder_SetPassword(builder, valueW); - if(prop->todo) { - todo_wine { - ok(hr == prop->expected, - "Error: IUriBuilder_SetPassword returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, prop->expected, test_index); - } - } else { - ok(hr == prop->expected, - "Error: IUriBuilder_SetPassword returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, prop->expected, test_index); - } - break; - case Uri_PROPERTY_PATH: - hr = IUriBuilder_SetPath(builder, valueW); - if(prop->todo) { - todo_wine { - ok(hr == prop->expected, - "Error: IUriBuilder_SetPath returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, prop->expected, test_index); - } - } else { - ok(hr == prop->expected, - "Error: IUriBuilder_SetPath returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, prop->expected, test_index); - } - break; - case Uri_PROPERTY_QUERY: - hr = IUriBuilder_SetQuery(builder, valueW); - if(prop->todo) { - todo_wine { - ok(hr == prop->expected, - "Error: IUriBuilder_SetQuery returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, prop->expected, test_index); - } - } else { - ok(hr == prop->expected, - "Error: IUriBuilder_SetQuery returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, prop->expected, test_index); - } - break; - case Uri_PROPERTY_SCHEME_NAME: - hr = IUriBuilder_SetSchemeName(builder, valueW); - if(prop->todo) { - todo_wine { - ok(hr == prop->expected, - "Error: IUriBuilder_SetSchemeName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, prop->expected, test_index); - } - } else { - ok(hr == prop->expected, - "Error: IUriBuilder_SetSchemeName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, prop->expected, test_index); - } - break; - case Uri_PROPERTY_USER_NAME: - hr = IUriBuilder_SetUserName(builder, valueW); - if(prop->todo) { - todo_wine { - ok(hr == prop->expected, - "Error: IUriBuilder_SetUserName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, prop->expected, test_index); - } - } else { - ok(hr == prop->expected, - "Error: IUriBuilder_SetUserName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, prop->expected, test_index); - } - break; - default: - trace("Unsupported operation for %d on uri_builder_tests[%d].\n", prop->property, test_index); - } - - heap_free(valueW); -} - -/* - * Simple tests to make sure the CreateUri function handles invalid flag combinations - * correctly. - */ -static void test_CreateUri_InvalidFlags(void) { - DWORD i; - - for(i = 0; i < sizeof(invalid_flag_tests)/sizeof(invalid_flag_tests[0]); ++i) { - HRESULT hr; - IUri *uri = (void*) 0xdeadbeef; - - hr = pCreateUri(http_urlW, invalid_flag_tests[i].flags, 0, &uri); - ok(hr == invalid_flag_tests[i].expected, "Error: CreateUri returned 0x%08x, expected 0x%08x, flags=0x%08x\n", - hr, invalid_flag_tests[i].expected, invalid_flag_tests[i].flags); - ok(uri == NULL, "Error: expected the IUri to be NULL, but it was %p instead\n", uri); - } -} - -static void test_CreateUri_InvalidArgs(void) { - HRESULT hr; - IUri *uri = (void*) 0xdeadbeef; - - const WCHAR invalidW[] = {'i','n','v','a','l','i','d',0}; - static const WCHAR emptyW[] = {0}; - - hr = pCreateUri(http_urlW, 0, 0, NULL); - ok(hr == E_INVALIDARG, "Error: CreateUri returned 0x%08x, expected 0x%08x\n", hr, E_INVALIDARG); - - hr = pCreateUri(NULL, 0, 0, &uri); - ok(hr == E_INVALIDARG, "Error: CreateUri returned 0x%08x, expected 0x%08x\n", hr, E_INVALIDARG); - ok(uri == NULL, "Error: Expected the IUri to be NULL, but it was %p instead\n", uri); - - uri = (void*) 0xdeadbeef; - hr = pCreateUri(invalidW, 0, 0, &uri); - ok(hr == E_INVALIDARG, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); - ok(uri == NULL, "Error: Expected the IUri to be NULL, but it was %p instead\n", uri); - - uri = (void*) 0xdeadbeef; - hr = pCreateUri(emptyW, 0, 0, &uri); - ok(hr == E_INVALIDARG, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); - ok(uri == NULL, "Error: Expected the IUri to be NULL, but it was %p instead\n", uri); -} - -static void test_CreateUri_InvalidUri(void) { - DWORD i; - - for(i = 0; i < sizeof(invalid_uri_tests)/sizeof(invalid_uri_tests[0]); ++i) { - invalid_uri test = invalid_uri_tests[i]; - IUri *uri = NULL; - LPWSTR uriW; - HRESULT hr; - - uriW = a2w(test.uri); - hr = pCreateUri(uriW, test.flags, 0, &uri); - if(test.todo) { - todo_wine { - ok(hr == E_INVALIDARG, "Error: CreateUri returned 0x%08x, expected 0x%08x on invalid_uri_tests[%d].\n", - hr, E_INVALIDARG, i); - } - } else { - ok(hr == E_INVALIDARG, "Error: CreateUri returned 0x%08x, expected 0x%08x on invalid_uri_tests[%d].\n", - hr, E_INVALIDARG, i); - } - if(uri) IUri_Release(uri); - - heap_free(uriW); - } -} - -static void test_IUri_GetPropertyBSTR(void) { - IUri *uri = NULL; - HRESULT hr; - DWORD i; - - /* Make sure GetPropertyBSTR handles invalid args correctly. */ - hr = pCreateUri(http_urlW, 0, 0, &uri); - ok(hr == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - if(SUCCEEDED(hr)) { - BSTR received = NULL; - - hr = IUri_GetPropertyBSTR(uri, Uri_PROPERTY_RAW_URI, NULL, 0); - ok(hr == E_POINTER, "Error: GetPropertyBSTR returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); - - /* Make sure it handles a invalid Uri_PROPERTY's correctly. */ - hr = IUri_GetPropertyBSTR(uri, Uri_PROPERTY_PORT, &received, 0); - ok(hr == S_OK, "Error: GetPropertyBSTR returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - ok(received != NULL, "Error: Expected the string not to be NULL.\n"); - ok(!SysStringLen(received), "Error: Expected the string to be of len=0 but it was %d instead.\n", SysStringLen(received)); - SysFreeString(received); - - /* Make sure it handles the ZONE property correctly. */ - received = NULL; - hr = IUri_GetPropertyBSTR(uri, Uri_PROPERTY_ZONE, &received, 0); - ok(hr == S_FALSE, "Error: GetPropertyBSTR returned 0x%08x, expected 0x%08x.\n", hr, S_FALSE); - ok(received != NULL, "Error: Expected the string not to be NULL.\n"); - ok(!SysStringLen(received), "Error: Expected the string to be of len=0 but it was %d instead.\n", SysStringLen(received)); - SysFreeString(received); - } - if(uri) IUri_Release(uri); - - for(i = 0; i < sizeof(uri_tests)/sizeof(uri_tests[0]); ++i) { - uri_properties test = uri_tests[i]; - LPWSTR uriW; - uri = NULL; - - uriW = a2w(test.uri); - hr = pCreateUri(uriW, test.create_flags, 0, &uri); - if(test.create_todo) { - todo_wine { - ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x. Failed on uri_tests[%d].\n", - hr, test.create_expected, i); - } - } else { - ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x. Failed on uri_tests[%d].\n", - hr, test.create_expected, i); - } - - if(SUCCEEDED(hr)) { - DWORD j; - - /* Checks all the string properties of the uri. */ - for(j = Uri_PROPERTY_STRING_START; j <= Uri_PROPERTY_STRING_LAST; ++j) { - BSTR received = NULL; - uri_str_property prop = test.str_props[j]; - - hr = IUri_GetPropertyBSTR(uri, j, &received, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "GetPropertyBSTR returned 0x%08x, expected 0x%08x. On uri_tests[%d].str_props[%d].\n", - hr, prop.expected, i, j); - } - todo_wine { - ok(!strcmp_aw(prop.value, received) || broken(prop.broken_value && !strcmp_aw(prop.broken_value, received)), - "Expected %s but got %s on uri_tests[%d].str_props[%d].\n", - prop.value, wine_dbgstr_w(received), i, j); - } - } else { - ok(hr == prop.expected, "GetPropertyBSTR returned 0x%08x, expected 0x%08x. On uri_tests[%d].str_props[%d].\n", - hr, prop.expected, i, j); - ok(!strcmp_aw(prop.value, received) || broken(prop.broken_value && !strcmp_aw(prop.broken_value, received)), - "Expected %s but got %s on uri_tests[%d].str_props[%d].\n", - prop.value, wine_dbgstr_w(received), i, j); - } - - SysFreeString(received); - } - } - - if(uri) IUri_Release(uri); - - heap_free(uriW); - } -} - -static void test_IUri_GetPropertyDWORD(void) { - IUri *uri = NULL; - HRESULT hr; - DWORD i; - - hr = pCreateUri(http_urlW, 0, 0, &uri); - ok(hr == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - if(SUCCEEDED(hr)) { - DWORD received = 0xdeadbeef; - - hr = IUri_GetPropertyDWORD(uri, Uri_PROPERTY_DWORD_START, NULL, 0); - ok(hr == E_INVALIDARG, "Error: GetPropertyDWORD returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); - - hr = IUri_GetPropertyDWORD(uri, Uri_PROPERTY_ABSOLUTE_URI, &received, 0); - ok(hr == E_INVALIDARG, "Error: GetPropertyDWORD returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); - ok(received == 0, "Error: Expected received=%d but instead received=%d.\n", 0, received); - } - if(uri) IUri_Release(uri); - - for(i = 0; i < sizeof(uri_tests)/sizeof(uri_tests[0]); ++i) { - uri_properties test = uri_tests[i]; - LPWSTR uriW; - uri = NULL; - - uriW = a2w(test.uri); - hr = pCreateUri(uriW, test.create_flags, 0, &uri); - if(test.create_todo) { - todo_wine { - ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x. Failed on uri_tests[%d].\n", - hr, test.create_expected, i); - } - } else { - ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x. Failed on uri_tests[%d].\n", - hr, test.create_expected, i); - } - - if(SUCCEEDED(hr)) { - DWORD j; - - /* Checks all the DWORD properties of the uri. */ - for(j = 0; j < sizeof(test.dword_props)/sizeof(test.dword_props[0]); ++j) { - DWORD received; - uri_dword_property prop = test.dword_props[j]; - - hr = IUri_GetPropertyDWORD(uri, j+Uri_PROPERTY_DWORD_START, &received, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "GetPropertyDWORD returned 0x%08x, expected 0x%08x. On uri_tests[%d].dword_props[%d].\n", - hr, prop.expected, i, j); - } - todo_wine { - ok(prop.value == received, "Expected %d but got %d on uri_tests[%d].dword_props[%d].\n", - prop.value, received, i, j); - } - } else { - ok(hr == prop.expected, "GetPropertyDWORD returned 0x%08x, expected 0x%08x. On uri_tests[%d].dword_props[%d].\n", - hr, prop.expected, i, j); - ok(prop.value == received, "Expected %d but got %d on uri_tests[%d].dword_props[%d].\n", - prop.value, received, i, j); - } - } - } - - if(uri) IUri_Release(uri); - - heap_free(uriW); - } -} - -/* Tests all the 'Get*' property functions which deal with strings. */ -static void test_IUri_GetStrProperties(void) { - IUri *uri = NULL; - HRESULT hr; - DWORD i; - - /* Make sure all the 'Get*' string property functions handle invalid args correctly. */ - hr = pCreateUri(http_urlW, 0, 0, &uri); - ok(hr == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - if(SUCCEEDED(hr)) { - hr = IUri_GetAbsoluteUri(uri, NULL); - ok(hr == E_POINTER, "Error: GetAbsoluteUri returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); - - hr = IUri_GetAuthority(uri, NULL); - ok(hr == E_POINTER, "Error: GetAuthority returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); - - hr = IUri_GetDisplayUri(uri, NULL); - ok(hr == E_POINTER, "Error: GetDisplayUri returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); - - hr = IUri_GetDomain(uri, NULL); - ok(hr == E_POINTER, "Error: GetDomain returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); - - hr = IUri_GetExtension(uri, NULL); - ok(hr == E_POINTER, "Error: GetExtension returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); - - hr = IUri_GetFragment(uri, NULL); - ok(hr == E_POINTER, "Error: GetFragment returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); - - hr = IUri_GetHost(uri, NULL); - ok(hr == E_POINTER, "Error: GetHost returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); - - hr = IUri_GetPassword(uri, NULL); - ok(hr == E_POINTER, "Error: GetPassword returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); - - hr = IUri_GetPath(uri, NULL); - ok(hr == E_POINTER, "Error: GetPath returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); - - hr = IUri_GetPathAndQuery(uri, NULL); - ok(hr == E_POINTER, "Error: GetPathAndQuery returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); - - hr = IUri_GetQuery(uri, NULL); - ok(hr == E_POINTER, "Error: GetQuery returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); - - hr = IUri_GetRawUri(uri, NULL); - ok(hr == E_POINTER, "Error: GetRawUri returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); - - hr = IUri_GetSchemeName(uri, NULL); - ok(hr == E_POINTER, "Error: GetSchemeName returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); - - hr = IUri_GetUserInfo(uri, NULL); - ok(hr == E_POINTER, "Error: GetUserInfo returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); - - hr = IUri_GetUserName(uri, NULL); - ok(hr == E_POINTER, "Error: GetUserName returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); - } - if(uri) IUri_Release(uri); - - for(i = 0; i < sizeof(uri_tests)/sizeof(uri_tests[0]); ++i) { - uri_properties test = uri_tests[i]; - LPWSTR uriW; - uri = NULL; - - uriW = a2w(test.uri); - hr = pCreateUri(uriW, test.create_flags, 0, &uri); - if(test.create_todo) { - todo_wine { - ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, test.create_expected, i); - } - } else { - ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, test.create_expected, i); - } - - if(SUCCEEDED(hr)) { - uri_str_property prop; - BSTR received = NULL; - - /* GetAbsoluteUri() tests. */ - prop = test.str_props[Uri_PROPERTY_ABSOLUTE_URI]; - hr = IUri_GetAbsoluteUri(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetAbsoluteUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received) || broken(prop.broken_value && !strcmp_aw(prop.broken_value, received)), - "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { - ok(hr == prop.expected, "Error: GetAbsoluteUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received) || broken(prop.broken_value && !strcmp_aw(prop.broken_value, received)), - "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - SysFreeString(received); - received = NULL; - - /* GetAuthority() tests. */ - prop = test.str_props[Uri_PROPERTY_AUTHORITY]; - hr = IUri_GetAuthority(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetAuthority returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { - ok(hr == prop.expected, "Error: GetAuthority returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - SysFreeString(received); - received = NULL; - - /* GetDisplayUri() tests. */ - prop = test.str_props[Uri_PROPERTY_DISPLAY_URI]; - hr = IUri_GetDisplayUri(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetDisplayUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received) || broken(prop.broken_value && !strcmp_aw(prop.broken_value, received)), - "Error: Expected %s but got %s on uri_test[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { - ok(hr == prop.expected, "Error: GetDisplayUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received) || broken(prop.broken_value && !strcmp_aw(prop.broken_value, received)), - "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - SysFreeString(received); - received = NULL; - - /* GetDomain() tests. */ - prop = test.str_props[Uri_PROPERTY_DOMAIN]; - hr = IUri_GetDomain(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetDomain returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { - ok(hr == prop.expected, "Error: GetDomain returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - SysFreeString(received); - received = NULL; - - /* GetExtension() tests. */ - prop = test.str_props[Uri_PROPERTY_EXTENSION]; - hr = IUri_GetExtension(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetExtension returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { - ok(hr == prop.expected, "Error: GetExtension returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - SysFreeString(received); - received = NULL; - - /* GetFragment() tests. */ - prop = test.str_props[Uri_PROPERTY_FRAGMENT]; - hr = IUri_GetFragment(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetFragment returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { - ok(hr == prop.expected, "Error: GetFragment returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - SysFreeString(received); - received = NULL; - - /* GetHost() tests. */ - prop = test.str_props[Uri_PROPERTY_HOST]; - hr = IUri_GetHost(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetHost returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { - ok(hr == prop.expected, "Error: GetHost returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - SysFreeString(received); - received = NULL; - - /* GetPassword() tests. */ - prop = test.str_props[Uri_PROPERTY_PASSWORD]; - hr = IUri_GetPassword(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetPassword returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { - ok(hr == prop.expected, "Error: GetPassword returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - SysFreeString(received); - received = NULL; - - /* GetPath() tests. */ - prop = test.str_props[Uri_PROPERTY_PATH]; - hr = IUri_GetPath(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetPath returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { - ok(hr == prop.expected, "Error: GetPath returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - SysFreeString(received); - received = NULL; - - /* GetPathAndQuery() tests. */ - prop = test.str_props[Uri_PROPERTY_PATH_AND_QUERY]; - hr = IUri_GetPathAndQuery(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetPathAndQuery returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { - ok(hr == prop.expected, "Error: GetPathAndQuery returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - SysFreeString(received); - received = NULL; - - /* GetQuery() tests. */ - prop = test.str_props[Uri_PROPERTY_QUERY]; - hr = IUri_GetQuery(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetQuery returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { - ok(hr == prop.expected, "Error: GetQuery returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - SysFreeString(received); - received = NULL; - - /* GetRawUri() tests. */ - prop = test.str_props[Uri_PROPERTY_RAW_URI]; - hr = IUri_GetRawUri(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetRawUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { - ok(hr == prop.expected, "Error: GetRawUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - SysFreeString(received); - received = NULL; - - /* GetSchemeName() tests. */ - prop = test.str_props[Uri_PROPERTY_SCHEME_NAME]; - hr = IUri_GetSchemeName(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetSchemeName returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { - ok(hr == prop.expected, "Error: GetSchemeName returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - SysFreeString(received); - received = NULL; - - /* GetUserInfo() tests. */ - prop = test.str_props[Uri_PROPERTY_USER_INFO]; - hr = IUri_GetUserInfo(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetUserInfo returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { - ok(hr == prop.expected, "Error: GetUserInfo returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - SysFreeString(received); - received = NULL; - - /* GetUserName() tests. */ - prop = test.str_props[Uri_PROPERTY_USER_NAME]; - hr = IUri_GetUserName(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetUserName returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - } else { - ok(hr == prop.expected, "Error: GetUserName returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - ok(!strcmp_aw(prop.value, received), "Error: Expected %s but got %s on uri_tests[%d].\n", - prop.value, wine_dbgstr_w(received), i); - } - SysFreeString(received); - } - - if(uri) IUri_Release(uri); - - heap_free(uriW); - } -} - -static void test_IUri_GetDwordProperties(void) { - IUri *uri = NULL; - HRESULT hr; - DWORD i; - - /* Make sure all the 'Get*' dword property functions handle invalid args correctly. */ - hr = pCreateUri(http_urlW, 0, 0, &uri); - ok(hr == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - if(SUCCEEDED(hr)) { - hr = IUri_GetHostType(uri, NULL); - ok(hr == E_INVALIDARG, "Error: GetHostType returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); - - hr = IUri_GetPort(uri, NULL); - ok(hr == E_INVALIDARG, "Error: GetPort returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); - - hr = IUri_GetScheme(uri, NULL); - ok(hr == E_INVALIDARG, "Error: GetScheme returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); - - hr = IUri_GetZone(uri, NULL); - ok(hr == E_INVALIDARG, "Error: GetZone returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); - } - if(uri) IUri_Release(uri); - - for(i = 0; i < sizeof(uri_tests)/sizeof(uri_tests[0]); ++i) { - uri_properties test = uri_tests[i]; - LPWSTR uriW; - uri = NULL; - - uriW = a2w(test.uri); - hr = pCreateUri(uriW, test.create_flags, 0, &uri); - if(test.create_todo) { - todo_wine { - ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, test.create_expected, i); - } - } else { - ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, test.create_expected, i); - } - - if(SUCCEEDED(hr)) { - uri_dword_property prop; - DWORD received; - - /* Assign an insane value so tests don't accidentally pass when - * they shouldn't! - */ - received = -9999999; - - /* GetHostType() tests. */ - prop = test.dword_props[Uri_PROPERTY_HOST_TYPE-Uri_PROPERTY_DWORD_START]; - hr = IUri_GetHostType(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetHostType returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(received == prop.value, "Error: Expected %d but got %d on uri_tests[%d].\n", prop.value, received, i); - } - } else { - ok(hr == prop.expected, "Error: GetHostType returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - ok(received == prop.value, "Error: Expected %d but got %d on uri_tests[%d].\n", prop.value, received, i); - } - received = -9999999; - - /* GetPort() tests. */ - prop = test.dword_props[Uri_PROPERTY_PORT-Uri_PROPERTY_DWORD_START]; - hr = IUri_GetPort(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetPort returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(received == prop.value, "Error: Expected %d but got %d on uri_tests[%d].\n", prop.value, received, i); - } - } else { - ok(hr == prop.expected, "Error: GetPort returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - ok(received == prop.value, "Error: Expected %d but got %d on uri_tests[%d].\n", prop.value, received, i); - } - received = -9999999; - - /* GetScheme() tests. */ - prop = test.dword_props[Uri_PROPERTY_SCHEME-Uri_PROPERTY_DWORD_START]; - hr = IUri_GetScheme(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetScheme returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(received == prop.value, "Error: Expected %d but got %d on uri_tests[%d].\n", prop.value, received, i); - } - } else { - ok(hr == prop.expected, "Error: GetScheme returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - ok(received == prop.value, "Error: Expected %d but got %d on uri_tests[%d].\n", prop.value, received, i); - } - received = -9999999; - - /* GetZone() tests. */ - prop = test.dword_props[Uri_PROPERTY_ZONE-Uri_PROPERTY_DWORD_START]; - hr = IUri_GetZone(uri, &received); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetZone returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - } - todo_wine { - ok(received == prop.value, "Error: Expected %d but got %d on uri_tests[%d].\n", prop.value, received, i); - } - } else { - ok(hr == prop.expected, "Error: GetZone returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, prop.expected, i); - ok(received == prop.value, "Error: Expected %d but got %d on uri_tests[%d].\n", prop.value, received, i); - } - } - - if(uri) IUri_Release(uri); - - heap_free(uriW); - } -} - -static void test_IUri_GetPropertyLength(void) { - IUri *uri = NULL; - HRESULT hr; - DWORD i; - - /* Make sure it handles invalid args correctly. */ - hr = pCreateUri(http_urlW, 0, 0, &uri); - ok(hr == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - if(SUCCEEDED(hr)) { - DWORD received = 0xdeadbeef; - - hr = IUri_GetPropertyLength(uri, Uri_PROPERTY_STRING_START, NULL, 0); - ok(hr == E_INVALIDARG, "Error: GetPropertyLength returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); - - hr = IUri_GetPropertyLength(uri, Uri_PROPERTY_DWORD_START, &received, 0); - ok(hr == E_INVALIDARG, "Error: GetPropertyLength return 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); - ok(received == 0xdeadbeef, "Error: Expected 0xdeadbeef but got 0x%08x.\n", received); - } - if(uri) IUri_Release(uri); - - for(i = 0; i < sizeof(uri_tests)/sizeof(uri_tests[0]); ++i) { - uri_properties test = uri_tests[i]; - LPWSTR uriW; - uri = NULL; - - uriW = a2w(test.uri); - hr = pCreateUri(uriW, test.create_flags, 0, &uri); - if(test.create_todo) { - todo_wine { - ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n", - hr, test.create_expected, i); - } - } else { - ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x on uri_test[%d].\n", - hr, test.create_expected, i); - } - - if(SUCCEEDED(hr)) { - DWORD j; - - for(j = Uri_PROPERTY_STRING_START; j <= Uri_PROPERTY_STRING_LAST; ++j) { - DWORD expectedLen, brokenLen, receivedLen; - uri_str_property prop = test.str_props[j]; - - expectedLen = lstrlen(prop.value); - brokenLen = lstrlen(prop.broken_value); - - /* This won't be necessary once GetPropertyLength is implemented. */ - receivedLen = -1; - - hr = IUri_GetPropertyLength(uri, j, &receivedLen, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, "Error: GetPropertyLength returned 0x%08x, expected 0x%08x on uri_tests[%d].str_props[%d].\n", - hr, prop.expected, i, j); - } - todo_wine { - ok(receivedLen == expectedLen || broken(receivedLen == brokenLen), - "Error: Expected a length of %d but got %d on uri_tests[%d].str_props[%d].\n", - expectedLen, receivedLen, i, j); - } - } else { - ok(hr == prop.expected, "Error: GetPropertyLength returned 0x%08x, expected 0x%08x on uri_tests[%d].str_props[%d].\n", - hr, prop.expected, i, j); - ok(receivedLen == expectedLen || broken(receivedLen == brokenLen), - "Error: Expected a length of %d but got %d on uri_tests[%d].str_props[%d].\n", - expectedLen, receivedLen, i, j); - } - } - } - - if(uri) IUri_Release(uri); - - heap_free(uriW); - } -} - -static DWORD compute_expected_props(uri_properties *test) -{ - DWORD ret = 0, i; - - for(i=Uri_PROPERTY_STRING_START; i <= Uri_PROPERTY_STRING_LAST; i++) { - if(test->str_props[i-Uri_PROPERTY_STRING_START].expected == S_OK) - ret |= 1<dword_props[i-Uri_PROPERTY_DWORD_START].expected == S_OK) - ret |= 1<uri_flags, 0, 0, &uri); - if(test->uri_todo) { - todo_wine { - ok(hr == test->uri_hres, - "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, test->uri_hres, test_index); - } - } else { - ok(hr == test->uri_hres, - "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, test->uri_hres, test_index); - } - - if(SUCCEEDED(hr)) { - DWORD i; - - for(i = 0; i < sizeof(test->expected_str_props)/sizeof(test->expected_str_props[0]); ++i) { - uri_builder_str_property prop = test->expected_str_props[i]; - BSTR received = NULL; - - hr = IUri_GetPropertyBSTR(uri, i, &received, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.result, - "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_str_props[%d].\n", - hr, prop.result, test_index, i); - } - } else { - ok(hr == prop.result, - "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_str_props[%d].\n", - hr, prop.result, test_index, i); - } - if(SUCCEEDED(hr)) { - if(prop.todo) { - todo_wine { - ok(!strcmp_aw(prop.expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].expected_str_props[%d].\n", - prop.expected, wine_dbgstr_w(received), test_index, i); - } - } else { - ok(!strcmp_aw(prop.expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].expected_str_props[%d].\n", - prop.expected, wine_dbgstr_w(received), test_index, i); - } - } - SysFreeString(received); - } - - for(i = 0; i < sizeof(test->expected_dword_props)/sizeof(test->expected_dword_props[0]); ++i) { - uri_builder_dword_property prop = test->expected_dword_props[i]; - DWORD received = -2; - - hr = IUri_GetPropertyDWORD(uri, i+Uri_PROPERTY_DWORD_START, &received, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.result, - "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_dword_props[%d].\n", - hr, prop.result, test_index, i); - } - } else { - ok(hr == prop.result, - "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_dword_props[%d].\n", - hr, prop.result, test_index, i); - } - if(SUCCEEDED(hr)) { - if(prop.todo) { - todo_wine { - ok(received == prop.expected, - "Error: Expected %d but got %d instead on uri_builder_tests[%d].expected_dword_props[%d].\n", - prop.expected, received, test_index, i); - } - } else { - ok(received == prop.expected, - "Error: Expected %d but got %d instead on uri_builder_tests[%d].expected_dword_props[%d].\n", - prop.expected, received, test_index, i); - } - } - } - } - if(uri) IUri_Release(uri); -} - -static void test_IUriBuilder_CreateUriSimple(IUriBuilder *builder, const uri_builder_test *test, - DWORD test_index) { - HRESULT hr; - IUri *uri = NULL; - - hr = IUriBuilder_CreateUriSimple(builder, test->uri_simple_encode_flags, 0, &uri); - if(test->uri_simple_todo) { - todo_wine { - ok(hr == test->uri_simple_hres, - "Error: IUriBuilder_CreateUriSimple returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, test->uri_simple_hres, test_index); - } - } else { - ok(hr == test->uri_simple_hres, - "Error: IUriBuilder_CreateUriSimple returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, test->uri_simple_hres, test_index); - } - - if(SUCCEEDED(hr)) { - DWORD i; - - for(i = 0; i < sizeof(test->expected_str_props)/sizeof(test->expected_str_props[0]); ++i) { - uri_builder_str_property prop = test->expected_str_props[i]; - BSTR received = NULL; - - hr = IUri_GetPropertyBSTR(uri, i, &received, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.result, - "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_str_props[%d].\n", - hr, prop.result, test_index, i); - } - } else { - ok(hr == prop.result, - "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_str_props[%d].\n", - hr, prop.result, test_index, i); - } - if(SUCCEEDED(hr)) { - if(prop.todo) { - todo_wine { - ok(!strcmp_aw(prop.expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].expected_str_props[%d].\n", - prop.expected, wine_dbgstr_w(received), test_index, i); - } - } else { - ok(!strcmp_aw(prop.expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].expected_str_props[%d].\n", - prop.expected, wine_dbgstr_w(received), test_index, i); - } - } - SysFreeString(received); - } - - for(i = 0; i < sizeof(test->expected_dword_props)/sizeof(test->expected_dword_props[0]); ++i) { - uri_builder_dword_property prop = test->expected_dword_props[i]; - DWORD received = -2; - - hr = IUri_GetPropertyDWORD(uri, i+Uri_PROPERTY_DWORD_START, &received, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.result, - "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_dword_props[%d].\n", - hr, prop.result, test_index, i); - } - } else { - ok(hr == prop.result, - "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_dword_props[%d].\n", - hr, prop.result, test_index, i); - } - if(SUCCEEDED(hr)) { - if(prop.todo) { - todo_wine { - ok(received == prop.expected, - "Error: Expected %d but got %d instead on uri_builder_tests[%d].expected_dword_props[%d].\n", - prop.expected, received, test_index, i); - } - } else { - ok(received == prop.expected, - "Error: Expected %d but got %d instead on uri_builder_tests[%d].expected_dword_props[%d].\n", - prop.expected, received, test_index, i); - } - } - } - } - if(uri) IUri_Release(uri); -} - -static void test_IUriBuilder_CreateUriWithFlags(IUriBuilder *builder, const uri_builder_test *test, - DWORD test_index) { - HRESULT hr; - IUri *uri = NULL; - - hr = IUriBuilder_CreateUriWithFlags(builder, test->uri_with_flags, test->uri_with_builder_flags, - test->uri_with_encode_flags, 0, &uri); - if(test->uri_with_todo) { - todo_wine { - ok(hr == test->uri_with_hres, - "Error: IUriBuilder_CreateUriWithFlags returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, test->uri_with_hres, test_index); - } - } else { - ok(hr == test->uri_with_hres, - "Error: IUriBuilder_CreateUriWithFlags returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, test->uri_with_hres, test_index); - } - - if(SUCCEEDED(hr)) { - DWORD i; - - for(i = 0; i < sizeof(test->expected_str_props)/sizeof(test->expected_str_props[0]); ++i) { - uri_builder_str_property prop = test->expected_str_props[i]; - BSTR received = NULL; - - hr = IUri_GetPropertyBSTR(uri, i, &received, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.result, - "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_str_props[%d].\n", - hr, prop.result, test_index, i); - } - } else { - ok(hr == prop.result, - "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_str_props[%d].\n", - hr, prop.result, test_index, i); - } - if(SUCCEEDED(hr)) { - if(prop.todo) { - todo_wine { - ok(!strcmp_aw(prop.expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].expected_str_props[%d].\n", - prop.expected, wine_dbgstr_w(received), test_index, i); - } - } else { - ok(!strcmp_aw(prop.expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].expected_str_props[%d].\n", - prop.expected, wine_dbgstr_w(received), test_index, i); - } - } - SysFreeString(received); - } - - for(i = 0; i < sizeof(test->expected_dword_props)/sizeof(test->expected_dword_props[0]); ++i) { - uri_builder_dword_property prop = test->expected_dword_props[i]; - DWORD received = -2; - - hr = IUri_GetPropertyDWORD(uri, i+Uri_PROPERTY_DWORD_START, &received, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.result, - "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_dword_props[%d].\n", - hr, prop.result, test_index, i); - } - } else { - ok(hr == prop.result, - "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].expected_dword_props[%d].\n", - hr, prop.result, test_index, i); - } - if(SUCCEEDED(hr)) { - if(prop.todo) { - todo_wine { - ok(received == prop.expected, - "Error: Expected %d but got %d instead on uri_builder_tests[%d].expected_dword_props[%d].\n", - prop.expected, received, test_index, i); - } - } else { - ok(received == prop.expected, - "Error: Expected %d but got %d instead on uri_builder_tests[%d].expected_dword_props[%d].\n", - prop.expected, received, test_index, i); - } - } - } - } - if(uri) IUri_Release(uri); -} - -static void test_IUriBuilder_CreateInvalidArgs(void) { - IUriBuilder *builder; - HRESULT hr; - - hr = pCreateIUriBuilder(NULL, 0, 0, &builder); - ok(hr == S_OK, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - if(SUCCEEDED(hr)) { - IUri *test = NULL, *uri = (void*) 0xdeadbeef; - - /* Test what happens if the IUriBuilder doesn't have a IUri set. */ - hr = IUriBuilder_CreateUri(builder, 0, 0, 0, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); - - uri = (void*) 0xdeadbeef; - hr = IUriBuilder_CreateUri(builder, 0, Uri_HAS_USER_NAME, 0, &uri); - ok(hr == E_NOTIMPL, "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x.\n", hr, E_NOTIMPL); - ok(uri == NULL, "Error: expected uri to be NULL, but was %p instead.\n", uri); - - hr = IUriBuilder_CreateUriSimple(builder, 0, 0, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_CreateUriSimple returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - - uri = (void*) 0xdeadbeef; - hr = IUriBuilder_CreateUriSimple(builder, Uri_HAS_USER_NAME, 0, &uri); - ok(hr == E_NOTIMPL, "Error: IUriBuilder_CreateUriSimple returned 0x%08x, expected 0x%08x.\n", - hr, E_NOTIMPL); - ok(!uri, "Error: Expected uri to NULL, but was %p instead.\n", uri); - - hr = IUriBuilder_CreateUriWithFlags(builder, 0, 0, 0, 0, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_CreateUriWithFlags returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - - uri = (void*) 0xdeadbeef; - hr = IUriBuilder_CreateUriWithFlags(builder, 0, 0, Uri_HAS_USER_NAME, 0, &uri); - ok(hr == E_NOTIMPL, "Error: IUriBuilder_CreateUriWithFlags returned 0x%08x, expected 0x%08x.\n", - hr, E_NOTIMPL); - ok(!uri, "Error: Expected uri to be NULL, but was %p instead.\n", uri); - - hr = pCreateUri(http_urlW, 0, 0, &test); - ok(hr == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - if(SUCCEEDED(hr)) { - hr = IUriBuilder_SetIUri(builder, test); - ok(hr == S_OK, "Error: IUriBuilder_SetIUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - - /* No longer returns E_NOTIMPL, since a IUri has been set and hasn't been modified. */ - uri = NULL; - hr = IUriBuilder_CreateUri(builder, 0, Uri_HAS_USER_NAME, 0, &uri); - ok(hr == S_OK, "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - ok(uri != NULL, "Error: The uri was NULL.\n"); - if(uri) IUri_Release(uri); - - uri = NULL; - hr = IUriBuilder_CreateUriSimple(builder, Uri_HAS_USER_NAME, 0, &uri); - ok(hr == S_OK, "Error: IUriBuilder_CreateUriSimple returned 0x%08x, expected 0x%08x.\n", - hr, S_OK); - ok(uri != NULL, "Error: uri was NULL.\n"); - if(uri) IUri_Release(uri); - - uri = NULL; - hr = IUriBuilder_CreateUriWithFlags(builder, 0, 0, 0, 0, &uri); - ok(hr == S_OK, "Error: IUriBuilder_CreateUriWithFlags returned 0x%08x, expected 0x%08x.\n", - hr, S_OK); - ok(uri != NULL, "Error: uri was NULL.\n"); - if(uri) IUri_Release(uri); - - hr = IUriBuilder_SetFragment(builder, NULL); - ok(hr == S_OK, "Error: IUriBuilder_SetFragment returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - - /* The IUriBuilder is changed, so it returns E_NOTIMPL again. */ - uri = (void*) 0xdeadbeef; - hr = IUriBuilder_CreateUri(builder, 0, Uri_HAS_USER_NAME, 0, &uri); - ok(hr == E_NOTIMPL, "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - ok(!uri, "Error: Expected uri to be NULL but was %p instead.\n", uri); - - uri = (void*) 0xdeadbeef; - hr = IUriBuilder_CreateUriSimple(builder, Uri_HAS_USER_NAME, 0, &uri); - ok(hr == E_NOTIMPL, "Error: IUriBuilder_CreateUriSimple returned 0x%08x, expected 0x%08x.\n", - hr, S_OK); - ok(!uri, "Error: Expected uri to be NULL, but was %p instead.\n", uri); - - uri = (void*) 0xdeadbeef; - hr = IUriBuilder_CreateUriWithFlags(builder, 0, 0, Uri_HAS_USER_NAME, 0, &uri); - ok(hr == E_NOTIMPL, "Error: IUriBuilder_CreateUriWithFlags returned 0x%08x, expected 0x%08x.\n", - hr, E_NOTIMPL); - ok(!uri, "Error: Expected uri to be NULL, but was %p instead.\n", uri); - } - if(test) IUri_Release(test); - } - if(builder) IUriBuilder_Release(builder); -} - -/* Tests invalid args to the "Get*" functions. */ -static void test_IUriBuilder_GetInvalidArgs(void) { - IUriBuilder *builder = NULL; - HRESULT hr; - - hr = pCreateIUriBuilder(NULL, 0, 0, &builder); - ok(hr == S_OK, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - if(SUCCEEDED(hr)) { - LPCWSTR received = (void*) 0xdeadbeef; - DWORD len = -1, port = -1; - BOOL set = -1; - - hr = IUriBuilder_GetFragment(builder, NULL, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetFragment returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - hr = IUriBuilder_GetFragment(builder, NULL, &received); - ok(hr == E_POINTER, "Error: IUriBuilder_GetFragment returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - ok(!received, "Error: Expected received to be NULL, but was %p instead.\n", received); - hr = IUriBuilder_GetFragment(builder, &len, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetFragment returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - ok(!len, "Error: Expected len to be 0, but was %d instead.\n", len); - - hr = IUriBuilder_GetHost(builder, NULL, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetHost returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - received = (void*) 0xdeadbeef; - hr = IUriBuilder_GetHost(builder, NULL, &received); - ok(hr == E_POINTER, "Error: IUriBuilder_GetHost returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - ok(!received, "Error: Expected received to be NULL, but was %p instead.\n", received); - len = -1; - hr = IUriBuilder_GetHost(builder, &len, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetHost returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - ok(!len, "Error: Expected len to be 0, but was %d instead.\n", len); - - hr = IUriBuilder_GetPassword(builder, NULL, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetPassword returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - received = (void*) 0xdeadbeef; - hr = IUriBuilder_GetPassword(builder, NULL, &received); - ok(hr == E_POINTER, "Error: IUriBuilder_GetPassword returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - ok(!received, "Error: Expected received to be NULL, but was %p instead.\n", received); - len = -1; - hr = IUriBuilder_GetPassword(builder, &len, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetPassword returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - ok(!len, "Error: Expected len to be 0, but was %d instead.\n", len); - - hr = IUriBuilder_GetPath(builder, NULL, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetPath returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - received = (void*) 0xdeadbeef; - hr = IUriBuilder_GetPath(builder, NULL, &received); - ok(hr == E_POINTER, "Error: IUriBuilder_GetPath returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - ok(!received, "Error: Expected received to be NULL, but was %p instead.\n", received); - len = -1; - hr = IUriBuilder_GetPath(builder, &len, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetPath returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - ok(!len, "Error: Expected len to be 0, but was %d instead.\n", len); - - hr = IUriBuilder_GetPort(builder, NULL, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetPort returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - hr = IUriBuilder_GetPort(builder, NULL, &port); - ok(hr == E_POINTER, "Error: IUriBuilder_GetPort returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - ok(!port, "Error: Expected port to be 0, but was %d instead.\n", port); - hr = IUriBuilder_GetPort(builder, &set, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetPort returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - ok(!set, "Error: Expected set to be FALSE, but was %d instead.\n", set); - - hr = IUriBuilder_GetQuery(builder, NULL, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetQuery returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - received = (void*) 0xdeadbeef; - hr = IUriBuilder_GetQuery(builder, NULL, &received); - ok(hr == E_POINTER, "Error: IUriBuilder_GetQuery returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - ok(!received, "Error: Expected received to be NULL, but was %p instead.\n", received); - len = -1; - hr = IUriBuilder_GetQuery(builder, &len, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetQuery returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - ok(!len, "Error: Expected len to be 0, but was %d instead.\n", len); - - hr = IUriBuilder_GetSchemeName(builder, NULL, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetSchemeName returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - received = (void*) 0xdeadbeef; - hr = IUriBuilder_GetSchemeName(builder, NULL, &received); - ok(hr == E_POINTER, "Error: IUriBuilder_GetSchemeName returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - ok(!received, "Error: Expected received to be NULL, but was %p instead.\n", received); - len = -1; - hr = IUriBuilder_GetSchemeName(builder, &len, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetSchemeName returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - ok(!len, "Error: Expected len to be 0, but was %d instead.\n", len); - - hr = IUriBuilder_GetUserName(builder, NULL, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetUserName returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - received = (void*) 0xdeadbeef; - hr = IUriBuilder_GetUserName(builder, NULL, &received); - ok(hr == E_POINTER, "Error: IUriBuilder_GetUserName returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - ok(!received, "Error: Expected received to be NULL, but was %p instead.\n", received); - len = -1; - hr = IUriBuilder_GetUserName(builder, &len, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetUserName returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - ok(!len, "Error: Expected len to be 0, but was %d instead.\n", len); - } - if(builder) IUriBuilder_Release(builder); -} - -static void test_IUriBuilder_GetFragment(IUriBuilder *builder, const uri_builder_test *test, - DWORD test_index) { - HRESULT hr; - DWORD i; - LPCWSTR received = NULL; - DWORD len = -1; - const uri_builder_property *prop = NULL; - - /* Check if the property was set earlier. */ - for(i = 0; i < sizeof(test->properties)/sizeof(test->properties[0]); ++i) { - if(test->properties[i].change && test->properties[i].property == Uri_PROPERTY_FRAGMENT) - prop = &(test->properties[i]); - } - - if(prop) { - /* Use expected_value unless it's NULL, then use value. */ - LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value; - hr = IUriBuilder_GetFragment(builder, &len, &received); - if(prop->todo) { - todo_wine { - ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetFragment returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, (expected ? S_OK : S_FALSE), test_index); - } - if(SUCCEEDED(hr)) { - todo_wine { - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - } - todo_wine { - ok(lstrlen(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); - } - } - } else { - ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetFragment returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, (expected ? S_OK : S_FALSE), test_index); - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - ok(lstrlen(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); - } - } else { - /* The property wasn't set earlier, so it should return whatever - * the base IUri contains (if anything). - */ - IUri *uri = NULL; - hr = IUriBuilder_GetIUri(builder, &uri); - ok(hr == S_OK, - "Error: IUriBuilder_GetIUri returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_OK, test_index); - if(SUCCEEDED(hr)) { - if(!uri) { - received = (void*) 0xdeadbeef; - len = -1; - - hr = IUriBuilder_GetFragment(builder, &len, &received); - ok(hr == S_FALSE, - "Error: IUriBuilder_GetFragment returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_FALSE, test_index); - if(SUCCEEDED(hr)) { - ok(!len, "Error: Expected len to be 0, but was %d instead on uri_builder_tests[%d].\n", - len, test_index); - ok(!received, "Error: Expected received to be NULL, but was %p instead on uri_builder_tests[%d].\n", - received, test_index); - } - } else { - BOOL has_prop = FALSE; - BSTR expected = NULL; - - hr = IUri_GetFragment(uri, &expected); - ok(SUCCEEDED(hr), - "Error: Expected IUri_GetFragment to succeed, but got 0x%08x instead on uri_builder_tests[%d].\n", - hr, test_index); - has_prop = hr == S_OK; - - hr = IUriBuilder_GetFragment(builder, &len, &received); - if(has_prop) { - ok(hr == S_OK, - "Error: IUriBuilder_GetFragment returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_OK, test_index); - if(SUCCEEDED(hr)) { - ok(!lstrcmpW(expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].\n", - wine_dbgstr_w(expected), wine_dbgstr_w(received), test_index); - ok(lstrlenW(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlenW(expected), len, test_index); - } - } else { - ok(hr == S_FALSE, - "Error: IUriBuilder_GetFragment returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_FALSE, test_index); - if(SUCCEEDED(hr)) { - ok(!received, "Error: Expected received to be NULL on uri_builder_tests[%d].\n", test_index); - ok(!len, "Error: Expected the length to be 0, but was %d instead on uri_builder_tests[%d].\n", - len, test_index); - } - } - SysFreeString(expected); - } - } - if(uri) IUri_Release(uri); - } -} - -static void test_IUriBuilder_GetHost(IUriBuilder *builder, const uri_builder_test *test, - DWORD test_index) { - HRESULT hr; - DWORD i; - LPCWSTR received = NULL; - DWORD len = -1; - const uri_builder_property *prop = NULL; - - /* Check if the property was set earlier. */ - for(i = 0; i < sizeof(test->properties)/sizeof(test->properties[0]); ++i) { - if(test->properties[i].change && test->properties[i].property == Uri_PROPERTY_HOST) - prop = &(test->properties[i]); - } - - if(prop) { - /* Use expected_value unless it's NULL, then use value. */ - LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value; - hr = IUriBuilder_GetHost(builder, &len, &received); - if(prop->todo) { - todo_wine { - ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetHost returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, (expected ? S_OK : S_FALSE), test_index); - } - if(SUCCEEDED(hr)) { - todo_wine { - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - } - todo_wine { - ok(lstrlen(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); - } - } - } else { - ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetHost returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, (expected ? S_OK : S_FALSE), test_index); - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - ok(lstrlen(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); - } - } else { - /* The property wasn't set earlier, so it should return whatever - * the base IUri contains (if anything). - */ - IUri *uri = NULL; - hr = IUriBuilder_GetIUri(builder, &uri); - ok(hr == S_OK, - "Error: IUriBuilder_GetIUri returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_OK, test_index); - if(SUCCEEDED(hr)) { - if(!uri) { - received = (void*) 0xdeadbeef; - len = -1; - - hr = IUriBuilder_GetHost(builder, &len, &received); - ok(hr == S_FALSE, - "Error: IUriBuilder_GetHost returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_FALSE, test_index); - if(SUCCEEDED(hr)) { - ok(!len, "Error: Expected len to be 0, but was %d instead on uri_builder_tests[%d].\n", - len, test_index); - ok(!received, "Error: Expected received to be NULL, but was %p instead on uri_builder_tests[%d].\n", - received, test_index); - } - } else { - BOOL has_prop = FALSE; - BSTR expected = NULL; - - hr = IUri_GetHost(uri, &expected); - ok(SUCCEEDED(hr), - "Error: Expected IUri_GetHost to succeed, but got 0x%08x instead on uri_builder_tests[%d].\n", - hr, test_index); - has_prop = hr == S_OK; - - hr = IUriBuilder_GetHost(builder, &len, &received); - if(has_prop) { - ok(hr == S_OK, - "Error: IUriBuilder_GetHost returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_OK, test_index); - if(SUCCEEDED(hr)) { - ok(!lstrcmpW(expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].\n", - wine_dbgstr_w(expected), wine_dbgstr_w(received), test_index); - ok(lstrlenW(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlenW(expected), len, test_index); - } - } else { - ok(hr == S_FALSE, - "Error: IUriBuilder_GetHost returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_FALSE, test_index); - if(SUCCEEDED(hr)) { - ok(!received, "Error: Expected received to be NULL on uri_builder_tests[%d].\n", test_index); - ok(!len, "Error: Expected the length to be 0, but was %d instead on uri_builder_tests[%d].\n", - len, test_index); - } - } - SysFreeString(expected); - } - } - if(uri) IUri_Release(uri); - } -} - -static void test_IUriBuilder_GetPassword(IUriBuilder *builder, const uri_builder_test *test, - DWORD test_index) { - HRESULT hr; - DWORD i; - LPCWSTR received = NULL; - DWORD len = -1; - const uri_builder_property *prop = NULL; - - /* Check if the property was set earlier. */ - for(i = 0; i < sizeof(test->properties)/sizeof(test->properties[0]); ++i) { - if(test->properties[i].change && test->properties[i].property == Uri_PROPERTY_PASSWORD) - prop = &(test->properties[i]); - } - - if(prop) { - /* Use expected_value unless it's NULL, then use value. */ - LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value; - hr = IUriBuilder_GetPassword(builder, &len, &received); - if(prop->todo) { - todo_wine { - ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetPassword returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, (expected ? S_OK : S_FALSE), test_index); - } - if(SUCCEEDED(hr)) { - todo_wine { - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - } - todo_wine { - ok(lstrlen(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); - } - } - } else { - ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetPassword returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, (expected ? S_OK : S_FALSE), test_index); - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - ok(lstrlen(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); - } - } else { - /* The property wasn't set earlier, so it should return whatever - * the base IUri contains (if anything). - */ - IUri *uri = NULL; - hr = IUriBuilder_GetIUri(builder, &uri); - ok(hr == S_OK, - "Error: IUriBuilder_GetIUri returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_OK, test_index); - if(SUCCEEDED(hr)) { - if(!uri) { - received = (void*) 0xdeadbeef; - len = -1; - - hr = IUriBuilder_GetPassword(builder, &len, &received); - ok(hr == S_FALSE, - "Error: IUriBuilder_GetPassword returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_FALSE, test_index); - if(SUCCEEDED(hr)) { - ok(!len, "Error: Expected len to be 0, but was %d instead on uri_builder_tests[%d].\n", - len, test_index); - ok(!received, "Error: Expected received to be NULL, but was %p instead on uri_builder_tests[%d].\n", - received, test_index); - } - } else { - BOOL has_prop = FALSE; - BSTR expected = NULL; - - hr = IUri_GetPassword(uri, &expected); - ok(SUCCEEDED(hr), - "Error: Expected IUri_GetPassword to succeed, but got 0x%08x instead on uri_builder_tests[%d].\n", - hr, test_index); - has_prop = hr == S_OK; - - hr = IUriBuilder_GetPassword(builder, &len, &received); - if(has_prop) { - ok(hr == S_OK, - "Error: IUriBuilder_GetPassword returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_OK, test_index); - if(SUCCEEDED(hr)) { - ok(!lstrcmpW(expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].\n", - wine_dbgstr_w(expected), wine_dbgstr_w(received), test_index); - ok(lstrlenW(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlenW(expected), len, test_index); - } - } else { - ok(hr == S_FALSE, - "Error: IUriBuilder_GetPassword returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_FALSE, test_index); - if(SUCCEEDED(hr)) { - ok(!received, "Error: Expected received to be NULL on uri_builder_tests[%d].\n", test_index); - ok(!len, "Error: Expected the length to be 0, but was %d instead on uri_builder_tests[%d].\n", - len, test_index); - } - } - SysFreeString(expected); - } - } - if(uri) IUri_Release(uri); - } -} - -static void test_IUriBuilder_GetPath(IUriBuilder *builder, const uri_builder_test *test, - DWORD test_index) { - HRESULT hr; - DWORD i; - LPCWSTR received = NULL; - DWORD len = -1; - const uri_builder_property *prop = NULL; - - /* Check if the property was set earlier. */ - for(i = 0; i < sizeof(test->properties)/sizeof(test->properties[0]); ++i) { - if(test->properties[i].change && test->properties[i].property == Uri_PROPERTY_PATH) - prop = &(test->properties[i]); - } - - if(prop) { - /* Use expected_value unless it's NULL, then use value. */ - LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value; - hr = IUriBuilder_GetPath(builder, &len, &received); - if(prop->todo) { - todo_wine { - ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetPath returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, (expected ? S_OK : S_FALSE), test_index); - } - if(SUCCEEDED(hr)) { - todo_wine { - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - } - todo_wine { - ok(lstrlen(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); - } - } - } else { - ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetPath returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, (expected ? S_OK : S_FALSE), test_index); - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - ok(lstrlen(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); - } - } else { - /* The property wasn't set earlier, so it should return whatever - * the base IUri contains (if anything). - */ - IUri *uri = NULL; - hr = IUriBuilder_GetIUri(builder, &uri); - ok(hr == S_OK, - "Error: IUriBuilder_GetIUri returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_OK, test_index); - if(SUCCEEDED(hr)) { - if(!uri) { - received = (void*) 0xdeadbeef; - len = -1; - - hr = IUriBuilder_GetPath(builder, &len, &received); - ok(hr == S_FALSE, - "Error: IUriBuilder_GetPath returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_FALSE, test_index); - if(SUCCEEDED(hr)) { - ok(!len, "Error: Expected len to be 0, but was %d instead on uri_builder_tests[%d].\n", - len, test_index); - ok(!received, "Error: Expected received to be NULL, but was %p instead on uri_builder_tests[%d].\n", - received, test_index); - } - } else { - BOOL has_prop = FALSE; - BSTR expected = NULL; - - hr = IUri_GetPath(uri, &expected); - ok(SUCCEEDED(hr), - "Error: Expected IUri_GetPath to succeed, but got 0x%08x instead on uri_builder_tests[%d].\n", - hr, test_index); - has_prop = hr == S_OK; - - hr = IUriBuilder_GetPath(builder, &len, &received); - if(has_prop) { - ok(hr == S_OK, - "Error: IUriBuilder_GetPath returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_OK, test_index); - if(SUCCEEDED(hr)) { - ok(!lstrcmpW(expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].\n", - wine_dbgstr_w(expected), wine_dbgstr_w(received), test_index); - ok(lstrlenW(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlenW(expected), len, test_index); - } - } else { - ok(hr == S_FALSE, - "Error: IUriBuilder_GetPath returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_FALSE, test_index); - if(SUCCEEDED(hr)) { - ok(!received, "Error: Expected received to be NULL on uri_builder_tests[%d].\n", test_index); - ok(!len, "Error: Expected the length to be 0, but was %d instead on uri_builder_tests[%d].\n", - len, test_index); - } - } - SysFreeString(expected); - } - } - if(uri) IUri_Release(uri); - } -} - -static void test_IUriBuilder_GetPort(IUriBuilder *builder, const uri_builder_test *test, - DWORD test_index) { - HRESULT hr; - BOOL has_port = FALSE; - DWORD received = -1; - - if(test->port_prop.change) { - DWORD expected = test->port_prop.value; - - hr = IUriBuilder_GetPort(builder, &has_port, &received); - if(test->port_prop.todo) { - todo_wine { - ok(hr == S_OK, - "Error: IUriBuilder_GetPort returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_OK, test_index); - } - if(SUCCEEDED(hr)) { - todo_wine { - ok(has_port == test->port_prop.set, - "Error: Expected has_port to be %d but was %d instead on uri_builder_tests[%d].\n", - test->port_prop.set, has_port, test_index); - } - todo_wine { - ok(received == expected, - "Error: Expected received to be %d, but was %d instead on uri_builder_tests[%d].\n", - expected, received, test_index); - } - } - } else { - ok(hr == S_OK, - "Error: IUriBuilder_GetPort returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_OK, test_index); - ok(has_port == test->port_prop.set, - "Error: Expected has_port to be %d, but was %d instead on uri_builder_tests[%d].\n", - test->port_prop.set, has_port, test_index); - ok(received == test->port_prop.value, - "Error: Expected port to be %d, but was %d instead on uri_builder_tests[%d].\n", - test->port_prop.value, received, test_index); - } - } else { - IUri *uri = NULL; - - hr = IUriBuilder_GetIUri(builder, &uri); - ok(hr == S_OK, - "Error: IUriBuilder_GetIUri returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_OK, test_index); - if(SUCCEEDED(hr)) { - if(!uri) { - hr = IUriBuilder_GetPort(builder, &has_port, &received); - ok(hr == S_OK, - "Error: IUriBuilder_GetPort returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_OK, test_index); - if(SUCCEEDED(hr)) { - ok(has_port == FALSE, - "Error: Expected has_port to be FALSE, but was %d instead on uri_builder_tests[%d].\n", - has_port, test_index); - ok(!received, "Error: Expected received to be 0, but was %d instead on uri_builder_tests[%d].\n", - received, test_index); - } - } else { - DWORD expected; - - hr = IUri_GetPort(uri, &expected); - ok(SUCCEEDED(hr), - "Error: Expected IUri_Port to succeed, but got 0x%08x instead on uri_builder_tests[%d].\n", - hr, test_index); - - hr = IUriBuilder_GetPort(builder, &has_port, &received); - ok(hr == S_OK, - "Error: IUriBuilder_GetPort returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_OK, test_index); - if(SUCCEEDED(hr)) { - ok(!has_port, - "Error: Expected has_port to be FALSE but was TRUE instead on uri_builder_tests[%d].\n", - test_index); - ok(received == expected, - "Error: Expected received to be %d, but was %d instead on uri_builder_tests[%d].\n", - expected, received, test_index); - } - } - } - if(uri) IUri_Release(uri); - } -} - -static void test_IUriBuilder_GetQuery(IUriBuilder *builder, const uri_builder_test *test, - DWORD test_index) { - HRESULT hr; - DWORD i; - LPCWSTR received = NULL; - DWORD len = -1; - const uri_builder_property *prop = NULL; - - /* Check if the property was set earlier. */ - for(i = 0; i < sizeof(test->properties)/sizeof(test->properties[0]); ++i) { - if(test->properties[i].change && test->properties[i].property == Uri_PROPERTY_QUERY) - prop = &(test->properties[i]); - } - - if(prop) { - /* Use expected_value unless it's NULL, then use value. */ - LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value; - hr = IUriBuilder_GetQuery(builder, &len, &received); - if(prop->todo) { - todo_wine { - ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetQuery returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, (expected ? S_OK : S_FALSE), test_index); - } - if(SUCCEEDED(hr)) { - todo_wine { - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - } - todo_wine { - ok(lstrlen(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); - } - } - } else { - ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetQuery returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, (expected ? S_OK : S_FALSE), test_index); - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - ok(lstrlen(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); - } - } else { - /* The property wasn't set earlier, so it should return whatever - * the base IUri contains (if anything). - */ - IUri *uri = NULL; - hr = IUriBuilder_GetIUri(builder, &uri); - ok(hr == S_OK, - "Error: IUriBuilder_GetIUri returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_OK, test_index); - if(SUCCEEDED(hr)) { - if(!uri) { - received = (void*) 0xdeadbeef; - len = -1; - - hr = IUriBuilder_GetQuery(builder, &len, &received); - ok(hr == S_FALSE, - "Error: IUriBuilder_GetQuery returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_FALSE, test_index); - if(SUCCEEDED(hr)) { - ok(!len, "Error: Expected len to be 0, but was %d instead on uri_builder_tests[%d].\n", - len, test_index); - ok(!received, "Error: Expected received to be NULL, but was %p instead on uri_builder_tests[%d].\n", - received, test_index); - } - } else { - BOOL has_prop = FALSE; - BSTR expected = NULL; - - hr = IUri_GetQuery(uri, &expected); - ok(SUCCEEDED(hr), - "Error: Expected IUri_GetQuery to succeed, but got 0x%08x instead on uri_builder_tests[%d].\n", - hr, test_index); - has_prop = hr == S_OK; - - hr = IUriBuilder_GetQuery(builder, &len, &received); - if(has_prop) { - ok(hr == S_OK, - "Error: IUriBuilder_GetQuery returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_OK, test_index); - if(SUCCEEDED(hr)) { - ok(!lstrcmpW(expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].\n", - wine_dbgstr_w(expected), wine_dbgstr_w(received), test_index); - ok(lstrlenW(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlenW(expected), len, test_index); - } - } else { - ok(hr == S_FALSE, - "Error: IUriBuilder_GetQuery returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_FALSE, test_index); - if(SUCCEEDED(hr)) { - ok(!received, "Error: Expected received to be NULL on uri_builder_tests[%d].\n", test_index); - ok(!len, "Error: Expected the length to be 0, but was %d instead on uri_builder_tests[%d].\n", - len, test_index); - } - } - SysFreeString(expected); - } - } - if(uri) IUri_Release(uri); - } -} - -static void test_IUriBuilder_GetSchemeName(IUriBuilder *builder, const uri_builder_test *test, - DWORD test_index) { - HRESULT hr; - DWORD i; - LPCWSTR received = NULL; - DWORD len = -1; - const uri_builder_property *prop = NULL; - - /* Check if the property was set earlier. */ - for(i = 0; i < sizeof(test->properties)/sizeof(test->properties[0]); ++i) { - if(test->properties[i].change && test->properties[i].property == Uri_PROPERTY_SCHEME_NAME) - prop = &(test->properties[i]); - } - - if(prop) { - /* Use expected_value unless it's NULL, then use value. */ - LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value; - hr = IUriBuilder_GetSchemeName(builder, &len, &received); - if(prop->todo) { - todo_wine { - ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetSchemeName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, (expected ? S_OK : S_FALSE), test_index); - } - if(SUCCEEDED(hr)) { - todo_wine { - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - } - todo_wine { - ok(lstrlen(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); - } - } - } else { - ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetSchemeName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, (expected ? S_OK : S_FALSE), test_index); - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - ok(lstrlen(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); - } - } else { - /* The property wasn't set earlier, so it should return whatever - * the base IUri contains (if anything). - */ - IUri *uri = NULL; - hr = IUriBuilder_GetIUri(builder, &uri); - ok(hr == S_OK, - "Error: IUriBuilder_GetIUri returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_OK, test_index); - if(SUCCEEDED(hr)) { - if(!uri) { - received = (void*) 0xdeadbeef; - len = -1; - - hr = IUriBuilder_GetSchemeName(builder, &len, &received); - ok(hr == S_FALSE, - "Error: IUriBuilder_GetSchemeName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_FALSE, test_index); - if(SUCCEEDED(hr)) { - ok(!len, "Error: Expected len to be 0, but was %d instead on uri_builder_tests[%d].\n", - len, test_index); - ok(!received, "Error: Expected received to be NULL, but was %p instead on uri_builder_tests[%d].\n", - received, test_index); - } - } else { - BOOL has_prop = FALSE; - BSTR expected = NULL; - - hr = IUri_GetSchemeName(uri, &expected); - ok(SUCCEEDED(hr), - "Error: Expected IUri_GetSchemeName to succeed, but got 0x%08x instead on uri_builder_tests[%d].\n", - hr, test_index); - has_prop = hr == S_OK; - - hr = IUriBuilder_GetSchemeName(builder, &len, &received); - if(has_prop) { - ok(hr == S_OK, - "Error: IUriBuilder_GetSchemeName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_OK, test_index); - if(SUCCEEDED(hr)) { - ok(!lstrcmpW(expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].\n", - wine_dbgstr_w(expected), wine_dbgstr_w(received), test_index); - ok(lstrlenW(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlenW(expected), len, test_index); - } - } else { - ok(hr == S_FALSE, - "Error: IUriBuilder_GetSchemeName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_FALSE, test_index); - if(SUCCEEDED(hr)) { - ok(!received, "Error: Expected received to be NULL on uri_builder_tests[%d].\n", test_index); - ok(!len, "Error: Expected the length to be 0, but was %d instead on uri_builder_tests[%d].\n", - len, test_index); - } - } - SysFreeString(expected); - } - } - if(uri) IUri_Release(uri); - } -} - -static void test_IUriBuilder_GetUserName(IUriBuilder *builder, const uri_builder_test *test, - DWORD test_index) { - HRESULT hr; - DWORD i; - LPCWSTR received = NULL; - DWORD len = -1; - const uri_builder_property *prop = NULL; - - /* Check if the property was set earlier. */ - for(i = 0; i < sizeof(test->properties)/sizeof(test->properties[0]); ++i) { - if(test->properties[i].change && test->properties[i].property == Uri_PROPERTY_USER_NAME) - prop = &(test->properties[i]); - } - - if(prop && prop->value && *prop->value) { - /* Use expected_value unless it's NULL, then use value. */ - LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value; - hr = IUriBuilder_GetUserName(builder, &len, &received); - if(prop->todo) { - todo_wine { - ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetUserName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, (expected ? S_OK : S_FALSE), test_index); - } - if(SUCCEEDED(hr)) { - todo_wine { - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - } - todo_wine { - ok(lstrlen(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); - } - } - } else { - ok(hr == (expected ? S_OK : S_FALSE), - "Error: IUriBuilder_GetUserName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, (expected ? S_OK : S_FALSE), test_index); - ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", - expected, wine_dbgstr_w(received), test_index); - ok(lstrlen(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); - } - } else { - /* The property wasn't set earlier, so it should return whatever - * the base IUri contains (if anything). - */ - IUri *uri = NULL; - hr = IUriBuilder_GetIUri(builder, &uri); - ok(hr == S_OK, - "Error: IUriBuilder_GetIUri returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_OK, test_index); - if(SUCCEEDED(hr)) { - if(!uri) { - received = (void*) 0xdeadbeef; - len = -1; - - hr = IUriBuilder_GetUserName(builder, &len, &received); - ok(hr == S_FALSE, - "Error: IUriBuilder_GetUserName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_FALSE, test_index); - if(SUCCEEDED(hr)) { - ok(!len, "Error: Expected len to be 0, but was %d instead on uri_builder_tests[%d].\n", - len, test_index); - ok(!received, "Error: Expected received to be NULL, but was %p instead on uri_builder_tests[%d].\n", - received, test_index); - } - } else { - BSTR expected = NULL; - BOOL has_prop = FALSE; - - hr = IUri_GetUserName(uri, &expected); - ok(SUCCEEDED(hr), - "Error: Expected IUri_GetUserName to succeed, but got 0x%08x instead on uri_builder_tests[%d].\n", - hr, test_index); - has_prop = hr == S_OK; - - hr = IUriBuilder_GetUserName(builder, &len, &received); - if(has_prop) { - ok(hr == S_OK, - "Error: IUriBuilder_GetUserName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_OK, test_index); - if(SUCCEEDED(hr)) { - ok(!lstrcmpW(expected, received), - "Error: Expected %s but got %s instead on uri_builder_tests[%d].\n", - wine_dbgstr_w(expected), wine_dbgstr_w(received), test_index); - ok(lstrlenW(expected) == len, - "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlenW(expected), len, test_index); - } - } else { - ok(hr == S_FALSE, - "Error: IUriBuilder_GetUserName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_FALSE, test_index); - if(SUCCEEDED(hr)) { - ok(!received, "Error: Expected received to be NULL on uri_builder_tests[%d].\n", test_index); - ok(!len, "Error: Expected the length to be 0, but was %d instead on uri_builder_tests[%d].\n", - len, test_index); - } - } - SysFreeString(expected); - } - } - if(uri) IUri_Release(uri); - } -} - -/* Tests IUriBuilder functions. */ -static void test_IUriBuilder(void) { - HRESULT hr; - IUriBuilder *builder; - DWORD i; - - for(i = 0; i < sizeof(uri_builder_tests)/sizeof(uri_builder_tests[0]); ++i) { - IUri *uri = NULL; - uri_builder_test test = uri_builder_tests[i]; - LPWSTR uriW = NULL; - - if(test.uri) { - uriW = a2w(test.uri); - hr = pCreateUri(uriW, test.create_flags, 0, &uri); - ok(hr == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_OK, i); - if(FAILED(hr)) continue; - } - hr = pCreateIUriBuilder(uri, 0, 0, &builder); - if(test.create_builder_todo) { - todo_wine { - ok(hr == test.create_builder_expected, - "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, test.create_builder_expected, i); - } - } else { - ok(hr == test.create_builder_expected, - "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, test.create_builder_expected, i); - } - if(SUCCEEDED(hr)) { - DWORD j; - BOOL modified = FALSE, received = FALSE; - - /* Perform all the string property changes. */ - for(j = 0; j < URI_BUILDER_STR_PROPERTY_COUNT; ++j) { - uri_builder_property prop = test.properties[j]; - if(prop.change) { - change_property(builder, &prop, i); - if(prop.property != Uri_PROPERTY_SCHEME_NAME && - prop.property != Uri_PROPERTY_HOST) - modified = TRUE; - else if(prop.value && *prop.value) - modified = TRUE; - else if(prop.value && !*prop.value && prop.property == Uri_PROPERTY_HOST) - /* Host name property can't be NULL, but it can be empty. */ - modified = TRUE; - } - } - - if(test.port_prop.change) { - hr = IUriBuilder_SetPort(builder, test.port_prop.set, test.port_prop.value); - modified = TRUE; - if(test.port_prop.todo) { - todo_wine { - ok(hr == test.port_prop.expected, - "Error: IUriBuilder_SetPort returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, test.port_prop.expected, i); - } - } else { - ok(hr == test.port_prop.expected, - "Error: IUriBuilder_SetPort returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, test.port_prop.expected, i); - } - } - - hr = IUriBuilder_HasBeenModified(builder, &received); - ok(hr == S_OK, - "Error IUriBuilder_HasBeenModified returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n", - hr, S_OK, i); - if(SUCCEEDED(hr)) - ok(received == modified, - "Error: Expected received to be %d but was %d instead on uri_builder_tests[%d].\n", - modified, received, i); - - /* Test the "Get*" functions. */ - test_IUriBuilder_GetFragment(builder, &test, i); - test_IUriBuilder_GetHost(builder, &test, i); - test_IUriBuilder_GetPassword(builder, &test, i); - test_IUriBuilder_GetPath(builder, &test, i); - test_IUriBuilder_GetPort(builder, &test, i); - test_IUriBuilder_GetQuery(builder, &test, i); - test_IUriBuilder_GetSchemeName(builder, &test, i); - test_IUriBuilder_GetUserName(builder, &test, i); - - test_IUriBuilder_CreateUri(builder, &test, i); - test_IUriBuilder_CreateUriSimple(builder, &test, i); - test_IUriBuilder_CreateUriWithFlags(builder, &test, i); - } - if(builder) IUriBuilder_Release(builder); - if(uri) IUri_Release(uri); - heap_free(uriW); - } -} - -static void test_IUriBuilder_HasBeenModified(void) { - HRESULT hr; - IUriBuilder *builder = NULL; - - hr = pCreateIUriBuilder(NULL, 0, 0, &builder); - ok(hr == S_OK, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - if(SUCCEEDED(hr)) { - static const WCHAR hostW[] = {'g','o','o','g','l','e','.','c','o','m',0}; - IUri *uri = NULL; - BOOL received; - - hr = IUriBuilder_HasBeenModified(builder, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_HasBeenModified returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - - hr = IUriBuilder_SetHost(builder, hostW); - ok(hr == S_OK, "Error: IUriBuilder_SetHost returned 0x%08x, expected 0x%08x.\n", - hr, S_OK); - - hr = IUriBuilder_HasBeenModified(builder, &received); - ok(hr == S_OK, "Error: IUriBuilder_HasBeenModified returned 0x%08x, expected 0x%08x.\n", - hr, S_OK); - if(SUCCEEDED(hr)) - ok(received == TRUE, "Error: Expected received to be TRUE.\n"); - - hr = pCreateUri(http_urlW, 0, 0, &uri); - ok(hr == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - if(SUCCEEDED(hr)) { - LPCWSTR prop; - DWORD len = -1; - - hr = IUriBuilder_SetIUri(builder, uri); - ok(hr == S_OK, "Error: IUriBuilder_SetIUri returned 0x%08x, expected 0x%08x.\n", - hr, S_OK); - - hr = IUriBuilder_HasBeenModified(builder, &received); - ok(hr == S_OK, "Error: IUriBuilder_HasBeenModified returned 0x%08x, expected 0x%08x.\n", - hr, S_OK); - if(SUCCEEDED(hr)) - ok(received == FALSE, "Error: Expected received to be FALSE.\n"); - - /* Test what happens with you call SetIUri with the same IUri again. */ - hr = IUriBuilder_SetHost(builder, hostW); - ok(hr == S_OK, "Error: IUriBuilder_SetHost returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - - hr = IUriBuilder_HasBeenModified(builder, &received); - ok(hr == S_OK, "Error: IUriBuilder_HasBeenModified returned 0x%08x, expected 0x%08x.\n", - hr, S_OK); - if(SUCCEEDED(hr)) - ok(received == TRUE, "Error: Expected received to be TRUE.\n"); - - hr = IUriBuilder_SetIUri(builder, uri); - ok(hr == S_OK, "Error: IUriBuilder_SetIUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - - /* IUriBuilder already had 'uri' as it's IUri property and so Windows doesn't - * reset any of the changes that were made to the IUriBuilder. - */ - hr = IUriBuilder_HasBeenModified(builder, &received); - ok(hr == S_OK, "Error: IUriBuilder_HasBeenModified returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - if(SUCCEEDED(hr)) - ok(received == TRUE, "Error: Expected received to be TRUE.\n"); - - hr = IUriBuilder_GetHost(builder, &len, &prop); - ok(hr == S_OK, "Error: IUriBuilder_GetHost returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - if(SUCCEEDED(hr)) { - ok(!lstrcmpW(prop, hostW), "Error: Expected %s but got %s instead.\n", - wine_dbgstr_w(hostW), wine_dbgstr_w(prop)); - ok(len == lstrlenW(hostW), "Error: Expected len to be %d, but was %d instead.\n", - lstrlenW(hostW), len); - } - - hr = IUriBuilder_SetIUri(builder, NULL); - ok(hr == S_OK, "Error: IUriBuilder_SetIUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - - hr = IUriBuilder_SetHost(builder, hostW); - ok(hr == S_OK, "Error: IUriBuilder_SetHost returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - hr = IUriBuilder_HasBeenModified(builder, &received); - ok(hr == S_OK, "Error: IUriBuilder_HasBeenModified returned 0x%08x, expected 0x%08x.\n", - hr, S_OK); - if(SUCCEEDED(hr)) - ok(received == TRUE, "Error: Expected received to be TRUE.\n"); - - hr = IUriBuilder_SetIUri(builder, NULL); - ok(hr == S_OK, "Error: IUriBuilder_SetIUri returned 0x%08x, expected 0x%09x.\n", hr, S_OK); - - hr = IUriBuilder_HasBeenModified(builder, &received); - ok(hr == S_OK, "Error: IUriBuilder_HasBeenModified returned 0x%08x, expected 0x%08x.\n", - hr, S_OK); - if(SUCCEEDED(hr)) - ok(received == TRUE, "Error: Expected received to be TRUE.\n"); - - hr = IUriBuilder_GetHost(builder, &len, &prop); - ok(hr == S_OK, "Error: IUriBuilder_GetHost returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - if(SUCCEEDED(hr)) { - ok(!lstrcmpW(prop, hostW), "Error: Expected %s but got %s instead.\n", - wine_dbgstr_w(hostW), wine_dbgstr_w(prop)); - ok(len == lstrlenW(hostW), "Error: Expected len to %d, but was %d instead.\n", - lstrlenW(hostW), len); - } - } - if(uri) IUri_Release(uri); - } - if(builder) IUriBuilder_Release(builder); -} - -/* Test IUriBuilder {Get,Set}IUri functions. */ -static void test_IUriBuilder_IUriProperty(void) { - IUriBuilder *builder = NULL; - HRESULT hr; - - hr = pCreateIUriBuilder(NULL, 0, 0, &builder); - ok(hr == S_OK, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - if(SUCCEEDED(hr)) { - IUri *uri = NULL; - - hr = IUriBuilder_GetIUri(builder, NULL); - ok(hr == E_POINTER, "Error: IUriBuilder_GetIUri returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - - hr = pCreateUri(http_urlW, 0, 0, &uri); - if(SUCCEEDED(hr)) { - IUri *test = NULL; - ULONG cur_count, orig_count; - - /* IUriBuilder doesn't clone the IUri, it use the same IUri. */ - orig_count = get_refcnt(uri); - hr = IUriBuilder_SetIUri(builder, uri); - cur_count = get_refcnt(uri); - if(SUCCEEDED(hr)) - ok(cur_count == orig_count+1, "Error: Expected uri ref count to be %d, but was %d instead.\n", - orig_count+1, cur_count); - - hr = IUriBuilder_SetIUri(builder, NULL); - cur_count = get_refcnt(uri); - if(SUCCEEDED(hr)) - ok(cur_count == orig_count, "Error: Expected uri ref count to be %d, but was %d instead.\n", - orig_count, cur_count); - - /* CreateUri* functions will return back the same IUri if nothing has changed. */ - hr = IUriBuilder_SetIUri(builder, uri); - ok(hr == S_OK, "Error: IUriBuilder_SetIUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - orig_count = get_refcnt(uri); - - hr = IUriBuilder_CreateUri(builder, 0, 0, 0, &test); - ok(hr == S_OK, "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - if(SUCCEEDED(hr)) { - cur_count = get_refcnt(uri); - ok(cur_count == orig_count+1, "Error: Expected uri ref count to be %d, but was %d instead.\n", - orig_count+1, cur_count); - ok(test == uri, "Error: Expected test to be %p, but was %p instead.\n", - uri, test); - } - if(test) IUri_Release(test); - - test = NULL; - hr = IUriBuilder_CreateUri(builder, -1, 0, 0, &test); - ok(hr == S_OK, "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - if(SUCCEEDED(hr)) { - cur_count = get_refcnt(uri); - ok(cur_count == orig_count+1, "Error: Expected uri ref count to be %d, but was %d instead.\n", - orig_count+1, cur_count); - ok(test == uri, "Error: Expected test to be %p, but was %p instead.\n", uri, test); - } - if(test) IUri_Release(test); - - /* Doesn't return the same IUri, if the flag combination is different then the one that created - * the base IUri. - */ - test = NULL; - hr = IUriBuilder_CreateUri(builder, Uri_CREATE_ALLOW_RELATIVE, 0, 0, &test); - ok(hr == S_OK, "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - if(SUCCEEDED(hr)) - ok(test != uri, "Error: Wasn't expecting 'test' to be 'uri'\n"); - - if(test) IUri_Release(test); - - /* Still returns the same IUri, even though the base one wasn't created with CREATE_CANONICALIZE - * explicitly set (because it's a default flags). - */ - test = NULL; - hr = IUriBuilder_CreateUri(builder, Uri_CREATE_CANONICALIZE, 0, 0, &test); - ok(hr == S_OK, "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - if(SUCCEEDED(hr)) { - cur_count = get_refcnt(uri); - ok(cur_count == orig_count+1, "Error: Expected uri ref count to be %d, but was %d instead.\n", - orig_count+1, cur_count); - ok(test == uri, "Error: Expected 'test' to be %p, but was %p instead.\n", uri, test); - } - if(test) IUri_Release(test); - - test = NULL; - hr = IUriBuilder_CreateUriSimple(builder, 0, 0, &test); - ok(hr == S_OK, "Error: IUriBuilder_CreateUriSimple returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - if(SUCCEEDED(hr)) { - cur_count = get_refcnt(uri); - ok(cur_count == orig_count+1, "Error: Expected uri ref count to be %d, but was %d instead.\n", - orig_count+1, cur_count); - ok(test == uri, "Error: Expected test to be %p, but was %p instead.\n", uri, test); - } - if(test) IUri_Release(test); - - test = NULL; - hr = IUriBuilder_CreateUriWithFlags(builder, 0, 0, 0, 0, &test); - ok(hr == S_OK, "Error: IUriBuilder_CreateUriWithFlags returned 0x%08x, expected 0x%08x.\n", - hr, S_OK); - if(SUCCEEDED(hr)) { - cur_count = get_refcnt(uri); - ok(cur_count == orig_count+1, "Error: Expected uri ref count to be %d, but was %d instead.\n", - orig_count+1, cur_count); - ok(test == uri, "Error: Expected test to be %p, but was %p instead.\n", uri, test); - } - if(test) IUri_Release(test); - - /* Doesn't return the same IUri, if the flag combination is different then the one that created - * the base IUri. - */ - test = NULL; - hr = IUriBuilder_CreateUriWithFlags(builder, Uri_CREATE_ALLOW_RELATIVE, 0, 0, 0, &test); - ok(hr == S_OK, "Error: IUriBuilder_CreateUriWithFlags returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - if(SUCCEEDED(hr)) - ok(test != uri, "Error: Wasn't expecting 'test' to be 'uri'\n"); - - if(test) IUri_Release(test); - - /* Still returns the same IUri, even though the base one wasn't created with CREATE_CANONICALIZE - * explicitly set (because it's a default flags). - */ - test = NULL; - hr = IUriBuilder_CreateUriWithFlags(builder, Uri_CREATE_CANONICALIZE, 0, 0, 0, &test); - ok(hr == S_OK, "Error: IUriBuilder_CreateUriWithFlags returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - if(SUCCEEDED(hr)) { - cur_count = get_refcnt(uri); - ok(cur_count == orig_count+1, "Error: Expected uri ref count to be %d, but was %d instead.\n", - orig_count+1, cur_count); - ok(test == uri, "Error: Expected 'test' to be %p, but was %p instead.\n", uri, test); - } - if(test) IUri_Release(test); - } - if(uri) IUri_Release(uri); - } - if(builder) IUriBuilder_Release(builder); -} - -static void test_IUriBuilder_RemoveProperties(void) { - IUriBuilder *builder = NULL; - HRESULT hr; - DWORD i; - - hr = pCreateIUriBuilder(NULL, 0, 0, &builder); - ok(hr == S_OK, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - if(SUCCEEDED(hr)) { - /* Properties that can't be removed. */ - const DWORD invalid = Uri_HAS_ABSOLUTE_URI|Uri_HAS_DISPLAY_URI|Uri_HAS_RAW_URI|Uri_HAS_HOST_TYPE| - Uri_HAS_SCHEME|Uri_HAS_ZONE; - - for(i = Uri_PROPERTY_STRING_START; i <= Uri_PROPERTY_DWORD_LAST; ++i) { - hr = IUriBuilder_RemoveProperties(builder, i << 1); - if((i << 1) & invalid) { - ok(hr == E_INVALIDARG, - "Error: IUriBuilder_RemoveProperties returned 0x%08x, expected 0x%08x with prop=%d.\n", - hr, E_INVALIDARG, i); - } else { - ok(hr == S_OK, - "Error: IUriBuilder_RemoveProperties returned 0x%08x, expected 0x%08x with prop=%d.\n", - hr, S_OK, i); - } - } - - /* Also doesn't accept anything that's outside the range of the - * Uri_HAS flags. - */ - hr = IUriBuilder_RemoveProperties(builder, (Uri_PROPERTY_DWORD_LAST+1) << 1); - ok(hr == E_INVALIDARG, "Error: IUriBuilder_RemoveProperties returned 0x%08x, expected 0x%08x.\n", - hr, E_INVALIDARG); - } - if(builder) IUriBuilder_Release(builder); - - for(i = 0; i < sizeof(uri_builder_remove_tests)/sizeof(uri_builder_remove_tests[0]); ++i) { - uri_builder_remove_test test = uri_builder_remove_tests[i]; - IUri *uri = NULL; - LPWSTR uriW; - - uriW = a2w(test.uri); - hr = pCreateUri(uriW, test.create_flags, 0, &uri); - if(SUCCEEDED(hr)) { - builder = NULL; - - hr = pCreateIUriBuilder(uri, 0, 0, &builder); - if(test.create_builder_todo) { - todo_wine { - ok(hr == test.create_builder_expected, - "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x on test %d.\n", - hr, test.create_builder_expected, i); - } - } else { - ok(hr == test.create_builder_expected, - "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x on test %d.\n", - hr, test.create_builder_expected, i); - } - if(SUCCEEDED(hr)) { - hr = IUriBuilder_RemoveProperties(builder, test.remove_properties); - if(test.remove_todo) { - todo_wine { - ok(hr == test.remove_expected, - "Error: IUriBuilder_RemoveProperties returned 0x%08x, expected 0x%08x on test %d.\n", - hr, test.remove_expected, i); - } - } else { - ok(hr == test.remove_expected, - "Error: IUriBuilder returned 0x%08x, expected 0x%08x on test %d.\n", - hr, test.remove_expected, i); - } - if(SUCCEEDED(hr)) { - IUri *result = NULL; - - hr = IUriBuilder_CreateUri(builder, test.expected_flags, 0, 0, &result); - if(test.expected_todo) { - todo_wine { - ok(hr == test.expected_hres, - "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x on test %d.\n", - hr, test.expected_hres, i); - } - } else { - ok(hr == test.expected_hres, - "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x on test %d.\n", - hr, test.expected_hres, i); - } - if(SUCCEEDED(hr)) { - BSTR received = NULL; - - hr = IUri_GetAbsoluteUri(result, &received); - ok(hr == S_OK, "Error: Expected S_OK, but got 0x%08x instead.\n", hr); - ok(!strcmp_aw(test.expected_uri, received), - "Error: Expected %s but got %s instead on test %d.\n", - test.expected_uri, wine_dbgstr_w(received), i); - SysFreeString(received); - } - if(result) IUri_Release(result); - } - } - if(builder) IUriBuilder_Release(builder); - } - if(uri) IUri_Release(uri); - heap_free(uriW); - } -} - -static void test_IUriBuilder_Misc(void) { - HRESULT hr; - IUri *uri; - - hr = pCreateUri(http_urlW, 0, 0, &uri); - if(SUCCEEDED(hr)) { - IUriBuilder *builder; - - hr = pCreateIUriBuilder(uri, 0, 0, &builder); - ok(hr == S_OK, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - if(SUCCEEDED(hr)) { - BOOL has = -1; - DWORD port = -1; - - hr = IUriBuilder_GetPort(builder, &has, &port); - ok(hr == S_OK, "Error: IUriBuilder_GetPort returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - if(SUCCEEDED(hr)) { - /* 'has' will be set to FALSE, even though uri had a port. */ - ok(has == FALSE, "Error: Expected 'has' to be FALSE, was %d instead.\n", has); - /* Still sets 'port' to 80. */ - ok(port == 80, "Error: Expected the port to be 80, but, was %d instead.\n", port); - } - } - if(builder) IUriBuilder_Release(builder); - } - if(uri) IUri_Release(uri); -} - -static void test_IUriBuilderFactory(void) { - HRESULT hr; - IUri *uri; - IUriBuilderFactory *factory; - IUriBuilder *builder; - - hr = pCreateUri(http_urlW, 0, 0, &uri); - ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x.\n", hr); - if(SUCCEEDED(hr)) { - factory = NULL; - hr = IUri_QueryInterface(uri, &IID_IUriBuilderFactory, (void**)&factory); - ok(hr == S_OK, "Error: Expected S_OK, but got 0x%08x.\n", hr); - ok(factory != NULL, "Error: Expected 'factory' to not be NULL.\n"); - - if(SUCCEEDED(hr)) { - builder = (void*) 0xdeadbeef; - hr = IUriBuilderFactory_CreateIUriBuilder(factory, 10, 0, &builder); - ok(hr == E_INVALIDARG, "Error: CreateInitializedIUriBuilder returned 0x%08x, expected 0x%08x.\n", - hr, E_INVALIDARG); - ok(!builder, "Error: Expected 'builder' to be NULL, but was %p.\n", builder); - - builder = (void*) 0xdeadbeef; - hr = IUriBuilderFactory_CreateIUriBuilder(factory, 0, 10, &builder); - ok(hr == E_INVALIDARG, "Error: CreateInitializedIUriBuilder returned 0x%08x, expected 0x%08x.\n", - hr, E_INVALIDARG); - ok(!builder, "Error: Expected 'builder' to be NULL, but was %p.\n", builder); - - hr = IUriBuilderFactory_CreateIUriBuilder(factory, 0, 0, NULL); - ok(hr == E_POINTER, "Error: CreateInitializedIUriBuilder returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - - builder = NULL; - hr = IUriBuilderFactory_CreateIUriBuilder(factory, 0, 0, &builder); - ok(hr == S_OK, "Error: CreateInitializedIUriBuilder returned 0x%08x, expected 0x%08x.\n", - hr, S_OK); - if(SUCCEEDED(hr)) { - IUri *tmp = (void*) 0xdeadbeef; - LPCWSTR result; - DWORD result_len; - - hr = IUriBuilder_GetIUri(builder, &tmp); - ok(hr == S_OK, "Error: GetIUri returned 0x%08x, expected 0x%08x.\n", - hr, S_OK); - ok(!tmp, "Error: Expected 'tmp' to be NULL, but was %p instead.\n", tmp); - - hr = IUriBuilder_GetHost(builder, &result_len, &result); - ok(hr == S_FALSE, "Error: GetHost returned 0x%08x, expected 0x%08x.\n", - hr, S_FALSE); - } - if(builder) IUriBuilder_Release(builder); - - builder = (void*) 0xdeadbeef; - hr = IUriBuilderFactory_CreateInitializedIUriBuilder(factory, 10, 0, &builder); - ok(hr == E_INVALIDARG, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", - hr, E_INVALIDARG); - ok(!builder, "Error: Expected 'builder' to be NULL, but was %p.\n", builder); - - builder = (void*) 0xdeadbeef; - hr = IUriBuilderFactory_CreateInitializedIUriBuilder(factory, 0, 10, &builder); - ok(hr == E_INVALIDARG, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", - hr, E_INVALIDARG); - ok(!builder, "Error: Expected 'builder' to be NULL, but was %p.\n", builder); - - hr = IUriBuilderFactory_CreateInitializedIUriBuilder(factory, 0, 0, NULL); - ok(hr == E_POINTER, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - - builder = NULL; - hr = IUriBuilderFactory_CreateInitializedIUriBuilder(factory, 0, 0, &builder); - ok(hr == S_OK, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", - hr, S_OK); - if(SUCCEEDED(hr)) { - IUri *tmp = NULL; - - hr = IUriBuilder_GetIUri(builder, &tmp); - ok(hr == S_OK, "Error: GetIUri return 0x%08x, expected 0x%08x.\n", - hr, S_OK); - ok(tmp == uri, "Error: Expected tmp to be %p, but was %p.\n", uri, tmp); - if(uri) IUri_Release(uri); - } - if(builder) IUriBuilder_Release(builder); - } - if(factory) IUriBuilderFactory_Release(factory); - } - if(uri) IUri_Release(uri); -} - -static void test_CoInternetCombineIUri(void) { - HRESULT hr; - IUri *base, *relative, *result; - DWORD i; - - base = NULL; - hr = pCreateUri(http_urlW, 0, 0, &base); - ok(SUCCEEDED(hr), "Error: Expected CreateUri to succeed, got 0x%08x.\n", hr); - if(SUCCEEDED(hr)) { - result = (void*) 0xdeadbeef; - hr = pCoInternetCombineIUri(base, NULL, 0, &result, 0); - ok(hr == E_INVALIDARG, "Error: CoInternetCombineIUri returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); - ok(!result, "Error: Expected 'result' to be NULL, was %p.\n", result); - } - - relative = NULL; - hr = pCreateUri(http_urlW, 0, 0, &relative); - ok(SUCCEEDED(hr), "Error: Expected CreateUri to succeed, got 0x%08x.\n", hr); - if(SUCCEEDED(hr)) { - result = (void*) 0xdeadbeef; - hr = pCoInternetCombineIUri(NULL, relative, 0, &result, 0); - ok(hr == E_INVALIDARG, "Error: CoInternetCombineIUri returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); - ok(!result, "Error: Expected 'result' to be NULL, was %p.\n", result); - } - - hr = pCoInternetCombineIUri(base, relative, 0, NULL, 0); - ok(hr == E_INVALIDARG, "Error: CoInternetCombineIUri returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); - - if(base) IUri_Release(base); - if(relative) IUri_Release(relative); - - for(i = 0; i < sizeof(uri_combine_tests)/sizeof(uri_combine_tests[0]); ++i) { - LPWSTR baseW = a2w(uri_combine_tests[i].base_uri); - - hr = pCreateUri(baseW, uri_combine_tests[i].base_create_flags, 0, &base); - ok(SUCCEEDED(hr), "Error: Expected CreateUri to succeed, got 0x%08x on uri_combine_tests[%d].\n", hr, i); - if(SUCCEEDED(hr)) { - LPWSTR relativeW = a2w(uri_combine_tests[i].relative_uri); - - hr = pCreateUri(relativeW, uri_combine_tests[i].relative_create_flags, 0, &relative); - ok(SUCCEEDED(hr), "Error: Expected CreateUri to succeed, got 0x%08x on uri_combine_tests[%d].\n", hr, i); - if(SUCCEEDED(hr)) { - result = NULL; - - hr = pCoInternetCombineIUri(base, relative, uri_combine_tests[i].combine_flags, &result, 0); - if(uri_combine_tests[i].todo) { - todo_wine { - ok(hr == uri_combine_tests[i].expected, - "Error: CoInternetCombineIUri returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].\n", - hr, uri_combine_tests[i].expected, i); - } - } else { - ok(hr == uri_combine_tests[i].expected, - "Error: CoInternetCombineIUri returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].\n", - hr, uri_combine_tests[i]. expected, i); - } - if(SUCCEEDED(hr)) { - DWORD j; - - for(j = 0; j < sizeof(uri_combine_tests[i].str_props)/sizeof(uri_combine_tests[i].str_props[0]); ++j) { - uri_combine_str_property prop = uri_combine_tests[i].str_props[j]; - BSTR received; - - hr = IUri_GetPropertyBSTR(result, j, &received, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, - "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].str_props[%d].\n", - hr, prop.expected, i, j); - } - todo_wine { - ok(!strcmp_aw(prop.value, received) || - broken(prop.broken_value && !strcmp_aw(prop.broken_value, received)), - "Error: Expected %s but got %s instead on uri_combine_tests[%d].str_props[%d].\n", - prop.value, wine_dbgstr_w(received), i, j); - } - } else { - ok(hr == prop.expected, - "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].str_props[%d].\n", - hr, prop.expected, i, j); - ok(!strcmp_aw(prop.value, received) || - broken(prop.broken_value && !strcmp_aw(prop.broken_value, received)), - "Error: Expected %s but got %s instead on uri_combine_tests[%d].str_props[%d].\n", - prop.value, wine_dbgstr_w(received), i, j); - } - SysFreeString(received); - } - - for(j = 0; j < sizeof(uri_combine_tests[i].dword_props)/sizeof(uri_combine_tests[i].dword_props[0]); ++j) { - uri_dword_property prop = uri_combine_tests[i].dword_props[j]; - DWORD received; - - hr = IUri_GetPropertyDWORD(result, j+Uri_PROPERTY_DWORD_START, &received, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, - "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].dword_props[%d].\n", - hr, prop.expected, i, j); - } - todo_wine { - ok(prop.value == received, "Error: Expected %d, but got %d instead on uri_combine_tests[%d].dword_props[%d].\n", - prop.value, received, i, j); - } - } else { - ok(hr == prop.expected, - "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].dword_props[%d].\n", - hr, prop.expected, i, j); - ok(prop.value == received, "Error: Expected %d, but got %d instead on uri_combine_tests[%d].dword_props[%d].\n", - prop.value, received, i, j); - } - } - } - if(result) IUri_Release(result); - } - if(relative) IUri_Release(relative); - heap_free(relativeW); - } - if(base) IUri_Release(base); - heap_free(baseW); - } -} - -static HRESULT WINAPI InternetProtocolInfo_QueryInterface(IInternetProtocolInfo *iface, - REFIID riid, void **ppv) -{ - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI InternetProtocolInfo_AddRef(IInternetProtocolInfo *iface) -{ - return 2; -} - -static ULONG WINAPI InternetProtocolInfo_Release(IInternetProtocolInfo *iface) -{ - return 1; -} - -static HRESULT WINAPI InternetProtocolInfo_ParseUrl(IInternetProtocolInfo *iface, LPCWSTR pwzUrl, - PARSEACTION ParseAction, DWORD dwParseFlags, LPWSTR pwzResult, DWORD cchResult, - DWORD *pcchResult, DWORD dwReserved) -{ - CHECK_EXPECT(ParseUrl); - ok(!lstrcmpW(pwzUrl, parse_urlW), "Error: Expected %s, but got %s instead.\n", - wine_dbgstr_w(parse_urlW), wine_dbgstr_w(pwzUrl)); - ok(ParseAction == parse_action, "Error: Expected %d, but got %d.\n", parse_action, ParseAction); - ok(dwParseFlags == parse_flags, "Error: Expected 0x%08x, but got 0x%08x.\n", parse_flags, dwParseFlags); - ok(cchResult == 200, "Error: Got %d.\n", cchResult); - - memcpy(pwzResult, parse_resultW, sizeof(parse_resultW)); - *pcchResult = lstrlenW(parse_resultW); - - return S_OK; -} - -static HRESULT WINAPI InternetProtocolInfo_CombineUrl(IInternetProtocolInfo *iface, - LPCWSTR pwzBaseUrl, LPCWSTR pwzRelativeUrl, DWORD dwCombineFlags, - LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved) -{ - CHECK_EXPECT(CombineUrl); - ok(!lstrcmpW(pwzBaseUrl, combine_baseW), "Error: Expected %s, but got %s instead.\n", - wine_dbgstr_w(combine_baseW), wine_dbgstr_w(pwzBaseUrl)); - ok(!lstrcmpW(pwzRelativeUrl, combine_relativeW), "Error: Expected %s, but got %s instead.\n", - wine_dbgstr_w(combine_relativeW), wine_dbgstr_w(pwzRelativeUrl)); - ok(dwCombineFlags == (URL_DONT_SIMPLIFY|URL_FILE_USE_PATHURL|URL_DONT_UNESCAPE_EXTRA_INFO), - "Error: Expected 0, but got 0x%08x.\n", dwCombineFlags); - ok(cchResult == INTERNET_MAX_URL_LENGTH+1, "Error: Got %d.\n", cchResult); - - memcpy(pwzResult, combine_resultW, sizeof(combine_resultW)); - *pcchResult = lstrlenW(combine_resultW); - - return S_OK; -} - -static HRESULT WINAPI InternetProtocolInfo_CompareUrl(IInternetProtocolInfo *iface, - LPCWSTR pwzUrl1, LPCWSTR pwzUrl2, DWORD dwCompareFlags) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI InternetProtocolInfo_QueryInfo(IInternetProtocolInfo *iface, - LPCWSTR pwzUrl, QUERYOPTION OueryOption, DWORD dwQueryFlags, LPVOID pBuffer, - DWORD cbBuffer, DWORD *pcbBuf, DWORD dwReserved) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static const IInternetProtocolInfoVtbl InternetProtocolInfoVtbl = { - InternetProtocolInfo_QueryInterface, - InternetProtocolInfo_AddRef, - InternetProtocolInfo_Release, - InternetProtocolInfo_ParseUrl, - InternetProtocolInfo_CombineUrl, - InternetProtocolInfo_CompareUrl, - InternetProtocolInfo_QueryInfo -}; - -static IInternetProtocolInfo protocol_info = { &InternetProtocolInfoVtbl }; - -static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv) -{ - if(IsEqualGUID(&IID_IInternetProtocolInfo, riid)) { - *ppv = &protocol_info; - return S_OK; - } - - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface) -{ - return 2; -} - -static ULONG WINAPI ClassFactory_Release(IClassFactory *iface) -{ - return 1; -} - -static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown *pOuter, - REFIID riid, void **ppv) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL dolock) -{ - ok(0, "unexpected call\n"); - return S_OK; -} - -static const IClassFactoryVtbl ClassFactoryVtbl = { - ClassFactory_QueryInterface, - ClassFactory_AddRef, - ClassFactory_Release, - ClassFactory_CreateInstance, - ClassFactory_LockServer -}; - -static IClassFactory protocol_cf = { &ClassFactoryVtbl }; - -static void register_protocols(void) -{ - IInternetSession *session; - HRESULT hres; - - hres = pCoInternetGetSession(0, &session, 0); - ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IInternetSession_RegisterNameSpace(session, &protocol_cf, &IID_NULL, - winetestW, 0, NULL, 0); - ok(hres == S_OK, "RegisterNameSpace failed: %08x\n", hres); - - IInternetSession_Release(session); -} - -static void unregister_protocols(void) { - IInternetSession *session; - HRESULT hr; - - hr = pCoInternetGetSession(0, &session, 0); - ok(hr == S_OK, "CoInternetGetSession failed: 0x%08x\n", hr); - if(FAILED(hr)) - return; - - hr = IInternetSession_UnregisterNameSpace(session, &protocol_cf, winetestW); - ok(hr == S_OK, "UnregisterNameSpace failed: 0x%08x\n", hr); - - IInternetSession_Release(session); -} - -static void test_CoInternetCombineIUri_Pluggable(void) { - HRESULT hr; - IUri *base = NULL; - - hr = pCreateUri(combine_baseW, 0, 0, &base); - ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x.\n", hr); - if(SUCCEEDED(hr)) { - IUri *relative = NULL; - - hr = pCreateUri(combine_relativeW, Uri_CREATE_ALLOW_RELATIVE, 0, &relative); - ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x.\n", hr); - if(SUCCEEDED(hr)) { - IUri *result = NULL; - - SET_EXPECT(CombineUrl); - - hr = pCoInternetCombineIUri(base, relative, URL_DONT_SIMPLIFY|URL_FILE_USE_PATHURL|URL_DONT_UNESCAPE_EXTRA_INFO, - &result, 0); - ok(hr == S_OK, "Error: CoInternetCombineIUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - - CHECK_CALLED(CombineUrl); - - if(SUCCEEDED(hr)) { - BSTR received = NULL; - hr = IUri_GetAbsoluteUri(result, &received); - ok(hr == S_OK, "Error: Expected S_OK, but got 0x%08x instead.\n", hr); - if(SUCCEEDED(hr)) { - ok(!lstrcmpW(combine_resultW, received), "Error: Expected %s, but got %s.\n", - wine_dbgstr_w(combine_resultW), wine_dbgstr_w(received)); - } - SysFreeString(received); - } - if(result) IUri_Release(result); - } - if(relative) IUri_Release(relative); - } - if(base) IUri_Release(base); -} - -static void test_CoInternetCombineUrlEx(void) { - HRESULT hr; - IUri *base, *result; - DWORD i; - - base = NULL; - hr = pCreateUri(http_urlW, 0, 0, &base); - ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x.\n", hr); - if(SUCCEEDED(hr)) { - result = (void*) 0xdeadbeef; - hr = pCoInternetCombineUrlEx(base, NULL, 0, &result, 0); - ok(hr == E_UNEXPECTED, "Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x.\n", - hr, E_UNEXPECTED); - ok(!result, "Error: Expected 'result' to be NULL was %p instead.\n", result); - } - - result = (void*) 0xdeadbeef; - hr = pCoInternetCombineUrlEx(NULL, http_urlW, 0, &result, 0); - ok(hr == E_INVALIDARG, "Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x.\n", - hr, E_INVALIDARG); - ok(!result, "Error: Expected 'result' to be NULL, but was %p instead.\n", result); - - result = (void*) 0xdeadbeef; - hr = pCoInternetCombineUrlEx(NULL, NULL, 0, &result, 0); - ok(hr == E_UNEXPECTED, "Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x.\n", - hr, E_UNEXPECTED); - ok(!result, "Error: Expected 'result' to be NULL, but was %p instead.\n", result); - - hr = pCoInternetCombineUrlEx(base, http_urlW, 0, NULL, 0); - ok(hr == E_POINTER, "Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - if(base) IUri_Release(base); - - for(i = 0; i < sizeof(uri_combine_tests)/sizeof(uri_combine_tests[0]); ++i) { - LPWSTR baseW = a2w(uri_combine_tests[i].base_uri); - - hr = pCreateUri(baseW, uri_combine_tests[i].base_create_flags, 0, &base); - ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x on uri_combine_tests[%d].\n", hr, i); - if(SUCCEEDED(hr)) { - LPWSTR relativeW = a2w(uri_combine_tests[i].relative_uri); - - hr = pCoInternetCombineUrlEx(base, relativeW, uri_combine_tests[i].combine_flags, - &result, 0); - if(uri_combine_tests[i].todo) { - todo_wine { - ok(hr == uri_combine_tests[i].expected, - "Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].\n", - hr, uri_combine_tests[i].expected, i); - } - } else { - ok(hr == uri_combine_tests[i].expected, - "Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].\n", - hr, uri_combine_tests[i]. expected, i); - } - if(SUCCEEDED(hr)) { - DWORD j; - - for(j = 0; j < sizeof(uri_combine_tests[i].str_props)/sizeof(uri_combine_tests[i].str_props[0]); ++j) { - uri_combine_str_property prop = uri_combine_tests[i].str_props[j]; - BSTR received; - LPCSTR value = (prop.value_ex) ? prop.value_ex : prop.value; - - hr = IUri_GetPropertyBSTR(result, j, &received, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, - "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].str_props[%d].\n", - hr, prop.expected, i, j); - } - todo_wine { - ok(!strcmp_aw(value, received) || - broken(prop.broken_value && !strcmp_aw(prop.broken_value, received)), - "Error: Expected %s but got %s instead on uri_combine_tests[%d].str_props[%d].\n", - value, wine_dbgstr_w(received), i, j); - } - } else { - ok(hr == prop.expected, - "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].str_props[%d].\n", - hr, prop.expected, i, j); - ok(!strcmp_aw(value, received) || - broken(prop.broken_value && !strcmp_aw(prop.broken_value, received)), - "Error: Expected %s but got %s instead on uri_combine_tests[%d].str_props[%d].\n", - value, wine_dbgstr_w(received), i, j); - } - SysFreeString(received); - } - - for(j = 0; j < sizeof(uri_combine_tests[i].dword_props)/sizeof(uri_combine_tests[i].dword_props[0]); ++j) { - uri_dword_property prop = uri_combine_tests[i].dword_props[j]; - DWORD received; - - hr = IUri_GetPropertyDWORD(result, j+Uri_PROPERTY_DWORD_START, &received, 0); - if(prop.todo) { - todo_wine { - ok(hr == prop.expected, - "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].dword_props[%d].\n", - hr, prop.expected, i, j); - } - todo_wine { - ok(prop.value == received, "Error: Expected %d, but got %d instead on uri_combine_tests[%d].dword_props[%d].\n", - prop.value, received, i, j); - } - } else { - ok(hr == prop.expected, - "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].dword_props[%d].\n", - hr, prop.expected, i, j); - ok(prop.value == received, "Error: Expected %d, but got %d instead on uri_combine_tests[%d].dword_props[%d].\n", - prop.value, received, i, j); - } - } - } - if(result) IUri_Release(result); - heap_free(relativeW); - } - if(base) IUri_Release(base); - heap_free(baseW); - } -} - -static void test_CoInternetCombineUrlEx_Pluggable(void) { - HRESULT hr; - IUri *base = NULL; - - hr = pCreateUri(combine_baseW, 0, 0, &base); - ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x.\n", hr); - if(SUCCEEDED(hr)) { - IUri *result = NULL; - - SET_EXPECT(CombineUrl); - - hr = pCoInternetCombineUrlEx(base, combine_relativeW, URL_DONT_SIMPLIFY|URL_FILE_USE_PATHURL|URL_DONT_UNESCAPE_EXTRA_INFO, - &result, 0); - ok(hr == S_OK, "Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - - CHECK_CALLED(CombineUrl); - - if(SUCCEEDED(hr)) { - BSTR received = NULL; - hr = IUri_GetAbsoluteUri(result, &received); - ok(hr == S_OK, "Error: Expected S_OK, but got 0x%08x instead.\n", hr); - if(SUCCEEDED(hr)) { - ok(!lstrcmpW(combine_resultW, received), "Error: Expected %s, but got %s.\n", - wine_dbgstr_w(combine_resultW), wine_dbgstr_w(received)); - } - SysFreeString(received); - } - if(result) IUri_Release(result); - } - if(base) IUri_Release(base); -} - -static void test_CoInternetParseIUri_InvalidArgs(void) { - HRESULT hr; - IUri *uri = NULL; - WCHAR tmp[3]; - DWORD result = -1; - - hr = pCoInternetParseIUri(NULL, PARSE_CANONICALIZE, 0, tmp, 3, &result, 0); - ok(hr == E_INVALIDARG, "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.\n", - hr, E_INVALIDARG); - ok(!result, "Error: Expected 'result' to be 0, but was %d.\n", result); - - hr = pCreateUri(http_urlW, 0, 0, &uri); - ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x.\n", hr); - if(SUCCEEDED(hr)) { - DWORD expected_len; - - result = -1; - hr = pCoInternetParseIUri(uri, PARSE_CANONICALIZE, 0, NULL, 0, &result, 0); - ok(hr == E_INVALIDARG, "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.\n", - hr, E_INVALIDARG); - ok(!result, "Error: Expected 'result' to be 0, but was %d.\n", result); - - hr = pCoInternetParseIUri(uri, PARSE_CANONICALIZE, 0, tmp, 3, NULL, 0); - ok(hr == E_POINTER, "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.\n", - hr, E_POINTER); - - result = -1; - hr = pCoInternetParseIUri(uri, PARSE_SECURITY_URL, 0, tmp, 3, &result, 0); - ok(hr == E_FAIL, "Error: CoInternetParseIUri returned 0x%08x expected 0x%08x.\n", - hr, E_FAIL); - ok(!result, "Error: Expected 'result' to be 0, but was %d.\n", result); - - result = -1; - hr = pCoInternetParseIUri(uri, PARSE_MIME, 0, tmp, 3, &result, 0); - ok(hr == E_FAIL, "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.\n", - hr, E_FAIL); - ok(!result, "Error: Expected 'result' to be 0, but was %d.\n", result); - - result = -1; - hr = pCoInternetParseIUri(uri, PARSE_SERVER, 0, tmp, 3, &result, 0); - ok(hr == E_FAIL, "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.\n", - hr, E_FAIL); - ok(!result, "Error: Expected 'result' to be 0, but was %d.\n", result); - - result = -1; - hr = pCoInternetParseIUri(uri, PARSE_SECURITY_DOMAIN, 0, tmp, 3, &result, 0); - ok(hr == E_FAIL, "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.\n", - hr, E_FAIL); - ok(!result, "Error: Expected 'result' to be 0, but was %d.\n", result); - - expected_len = lstrlenW(http_urlW); - result = -1; - hr = pCoInternetParseIUri(uri, PARSE_CANONICALIZE, 0, tmp, 3, &result, 0); - ok(hr == STRSAFE_E_INSUFFICIENT_BUFFER, - "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.\n", - hr, STRSAFE_E_INSUFFICIENT_BUFFER); - ok(result == expected_len, "Error: Expected 'result' to be %d, but was %d instead.\n", - expected_len, result); - } - if(uri) IUri_Release(uri); -} - -static void test_CoInternetParseIUri(void) { - DWORD i; - - for(i = 0; i < sizeof(uri_parse_tests)/sizeof(uri_parse_tests[0]); ++i) { - HRESULT hr; - IUri *uri; - LPWSTR uriW; - uri_parse_test test = uri_parse_tests[i]; - - uriW = a2w(test.uri); - hr = pCreateUri(uriW, test.uri_flags, 0, &uri); - ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x on uri_parse_tests[%d].\n", hr, i); - if(SUCCEEDED(hr)) { - WCHAR result[INTERNET_MAX_URL_LENGTH+1]; - DWORD result_len = -1; - - hr = pCoInternetParseIUri(uri, test.action, test.flags, result, INTERNET_MAX_URL_LENGTH+1, &result_len, 0); - if(test.todo) { - todo_wine { - ok(hr == test.expected, - "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x on uri_parse_tests[%d].\n", - hr, test.expected, i); - } - } else { - ok(hr == test.expected, - "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x on uri_parse_tests[%d].\n", - hr, test.expected, i); - } - if(SUCCEEDED(hr)) { - DWORD len = lstrlenA(test.property); - ok(!strcmp_aw(test.property, result), - "Error: Expected %s but got %s instead on uri_parse_tests[%d].\n", - test.property, wine_dbgstr_w(result), i); - ok(len == result_len, - "Error: Expected %d, but got %d instead on uri_parse_tests[%d].\n", - len, result_len, i); - } else { - ok(!result_len, - "Error: Expected 'result_len' to be 0, but was %d on uri_parse_tests[%d].\n", - result_len, i); - } - } - if(uri) IUri_Release(uri); - heap_free(uriW); - } -} - -static void test_CoInternetParseIUri_Pluggable(void) { - HRESULT hr; - IUri *uri = NULL; - - hr = pCreateUri(parse_urlW, 0, 0, &uri); - ok(SUCCEEDED(hr), "Error: Expected CreateUri to succeed, but got 0x%08x.\n", hr); - if(SUCCEEDED(hr)) { - WCHAR result[200]; - DWORD result_len; - - SET_EXPECT(ParseUrl); - - parse_action = PARSE_CANONICALIZE; - parse_flags = URL_UNESCAPE|URL_ESCAPE_UNSAFE; - - hr = pCoInternetParseIUri(uri, parse_action, parse_flags, result, 200, &result_len, 0); - ok(hr == S_OK, "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - - CHECK_CALLED(ParseUrl); - - if(SUCCEEDED(hr)) { - ok(result_len == lstrlenW(parse_resultW), "Error: Expected %d, but got %d.\n", - lstrlenW(parse_resultW), result_len); - ok(!lstrcmpW(result, parse_resultW), "Error: Expected %s, but got %s.\n", - wine_dbgstr_w(parse_resultW), wine_dbgstr_w(result)); - } - } - if(uri) IUri_Release(uri); -} - -START_TEST(uri) { - HMODULE hurlmon; - - hurlmon = GetModuleHandle("urlmon.dll"); - pCoInternetGetSession = (void*) GetProcAddress(hurlmon, "CoInternetGetSession"); - pCreateUri = (void*) GetProcAddress(hurlmon, "CreateUri"); - pCreateUriWithFragment = (void*) GetProcAddress(hurlmon, "CreateUriWithFragment"); - pCreateIUriBuilder = (void*) GetProcAddress(hurlmon, "CreateIUriBuilder"); - pCoInternetCombineIUri = (void*) GetProcAddress(hurlmon, "CoInternetCombineIUri"); - pCoInternetCombineUrlEx = (void*) GetProcAddress(hurlmon, "CoInternetCombineUrlEx"); - pCoInternetParseIUri = (void*) GetProcAddress(hurlmon, "CoInternetParseIUri"); - - if(!pCreateUri) { - win_skip("CreateUri is not present, skipping tests.\n"); - return; - } - - trace("test CreateUri invalid flags...\n"); - test_CreateUri_InvalidFlags(); - - trace("test CreateUri invalid args...\n"); - test_CreateUri_InvalidArgs(); - - trace("test CreateUri invalid URIs...\n"); - test_CreateUri_InvalidUri(); - - trace("test IUri_GetPropertyBSTR...\n"); - test_IUri_GetPropertyBSTR(); - - trace("test IUri_GetPropertyDWORD...\n"); - test_IUri_GetPropertyDWORD(); - - trace("test IUri_GetStrProperties...\n"); - test_IUri_GetStrProperties(); - - trace("test IUri_GetDwordProperties...\n"); - test_IUri_GetDwordProperties(); - - trace("test IUri_GetPropertyLength...\n"); - test_IUri_GetPropertyLength(); - - trace("test IUri_GetProperties...\n"); - test_IUri_GetProperties(); - - trace("test IUri_HasProperty...\n"); - test_IUri_HasProperty(); - - trace("test IUri_IsEqual...\n"); - test_IUri_IsEqual(); - - trace("test CreateUriWithFragment invalid args...\n"); - test_CreateUriWithFragment_InvalidArgs(); - - trace("test CreateUriWithFragment invalid flags...\n"); - test_CreateUriWithFragment_InvalidFlags(); - - trace("test CreateUriWithFragment...\n"); - test_CreateUriWithFragment(); - - trace("test CreateIUriBuilder...\n"); - test_CreateIUriBuilder(); - - trace("test IUriBuilder_CreateInvalidArgs...\n"); - test_IUriBuilder_CreateInvalidArgs(); - - trace("test IUriBuilder...\n"); - test_IUriBuilder(); - - trace("test IUriBuilder_GetInvalidArgs...\n"); - test_IUriBuilder_GetInvalidArgs(); - - trace("test IUriBuilder_HasBeenModified...\n"); - test_IUriBuilder_HasBeenModified(); - - trace("test IUriBuilder_IUriProperty...\n"); - test_IUriBuilder_IUriProperty(); - - trace("test IUriBuilder_RemoveProperties...\n"); - test_IUriBuilder_RemoveProperties(); - - trace("test IUriBuilder miscellaneous...\n"); - test_IUriBuilder_Misc(); - - trace("test IUriBuilderFactory...\n"); - test_IUriBuilderFactory(); - - trace("test CoInternetCombineIUri...\n"); - test_CoInternetCombineIUri(); - - trace("test CoInternetCombineUrlEx...\n"); - test_CoInternetCombineUrlEx(); - - trace("test CoInternetParseIUri Invalid Args...\n"); - test_CoInternetParseIUri_InvalidArgs(); - - trace("test CoInternetParseIUri...\n"); - test_CoInternetParseIUri(); - - register_protocols(); - - trace("test CoInternetCombineIUri pluggable...\n"); - test_CoInternetCombineIUri_Pluggable(); - - trace("test CoInternetCombineUrlEx Pluggable...\n"); - test_CoInternetCombineUrlEx_Pluggable(); - - trace("test CoInternetParseIUri pluggable...\n"); - test_CoInternetParseIUri_Pluggable(); - - unregister_protocols(); -} diff --git a/rostests/winetests/urlmon/url.c b/rostests/winetests/urlmon/url.c deleted file mode 100644 index eb4d31625a5..00000000000 --- a/rostests/winetests/urlmon/url.c +++ /dev/null @@ -1,3870 +0,0 @@ -/* - * UrlMon URL tests - * - * Copyright 2004 Kevin Koltzau - * Copyright 2004-2007 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 -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define CONST_VTABLE - -#include "windef.h" -#include "winbase.h" -#include "initguid.h" -#include "urlmon.h" -#include "wininet.h" -#include "mshtml.h" - -#include "wine/test.h" - -static HRESULT (WINAPI *pCreateAsyncBindCtxEx)(IBindCtx *, DWORD, - IBindStatusCallback *, IEnumFORMATETC *, IBindCtx **, DWORD); -static HRESULT (WINAPI *pCreateUri)(LPCWSTR, DWORD, DWORD_PTR, IUri**); - -DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); -DEFINE_GUID(CLSID_IdentityUnmarshal,0x0000001b,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 DEFINE_EXPECT(func) \ - static BOOL expect_ ## func = FALSE, called_ ## func = FALSE - -#define SET_EXPECT(func) \ - do { called_ ## func = FALSE; expect_ ## func = TRUE; } while(0) - -#define CHECK_EXPECT2(func) \ - do { \ - ok(expect_ ##func, "unexpected call " #func "\n"); \ - called_ ## func = TRUE; \ - }while(0) - -#define CHECK_EXPECT(func) \ - do { \ - CHECK_EXPECT2(func); \ - expect_ ## func = FALSE; \ - }while(0) - -#define CHECK_CALLED(func) \ - do { \ - ok(called_ ## func, "expected " #func "\n"); \ - expect_ ## func = called_ ## func = FALSE; \ - }while(0) - -#define CHECK_NOT_CALLED(func) \ - do { \ - ok(!called_ ## func, "unexpected " #func "\n"); \ - expect_ ## func = called_ ## func = FALSE; \ - }while(0) - -#define CHECK_CALLED_BROKEN(func) \ - do { \ - ok(called_ ## func || broken(!called_ ## func), "expected " #func "\n"); \ - expect_ ## func = called_ ## func = FALSE; \ - }while(0) - -#define CLEAR_CALLED(func) \ - expect_ ## func = called_ ## func = FALSE - -DEFINE_EXPECT(QueryInterface_IServiceProvider); -DEFINE_EXPECT(QueryInterface_IHttpNegotiate); -DEFINE_EXPECT(QueryInterface_IBindStatusCallback); -DEFINE_EXPECT(QueryInterface_IBindStatusCallbackEx); -DEFINE_EXPECT(QueryInterface_IBindStatusCallbackHolder); -DEFINE_EXPECT(QueryInterface_IInternetBindInfo); -DEFINE_EXPECT(QueryInterface_IAuthenticate); -DEFINE_EXPECT(QueryInterface_IInternetProtocol); -DEFINE_EXPECT(QueryInterface_IWindowForBindingUI); -DEFINE_EXPECT(QueryInterface_IHttpSecurity); -DEFINE_EXPECT(QueryService_IAuthenticate); -DEFINE_EXPECT(QueryService_IInternetProtocol); -DEFINE_EXPECT(QueryService_IInternetBindInfo); -DEFINE_EXPECT(QueryService_IWindowForBindingUI); -DEFINE_EXPECT(QueryService_IHttpSecurity); -DEFINE_EXPECT(BeginningTransaction); -DEFINE_EXPECT(OnResponse); -DEFINE_EXPECT(QueryInterface_IHttpNegotiate2); -DEFINE_EXPECT(GetRootSecurityId); -DEFINE_EXPECT(GetBindInfo); -DEFINE_EXPECT(GetBindInfoEx); -DEFINE_EXPECT(OnStartBinding); -DEFINE_EXPECT(OnProgress_FINDINGRESOURCE); -DEFINE_EXPECT(OnProgress_CONNECTING); -DEFINE_EXPECT(OnProgress_REDIRECTING); -DEFINE_EXPECT(OnProgress_SENDINGREQUEST); -DEFINE_EXPECT(OnProgress_MIMETYPEAVAILABLE); -DEFINE_EXPECT(OnProgress_BEGINDOWNLOADDATA); -DEFINE_EXPECT(OnProgress_DOWNLOADINGDATA); -DEFINE_EXPECT(OnProgress_ENDDOWNLOADDATA); -DEFINE_EXPECT(OnProgress_CACHEFILENAMEAVAILABLE); -DEFINE_EXPECT(OnStopBinding); -DEFINE_EXPECT(OnDataAvailable); -DEFINE_EXPECT(OnObjectAvailable); -DEFINE_EXPECT(Obj_OnStartBinding); -DEFINE_EXPECT(Obj_OnStopBinding); -DEFINE_EXPECT(Obj_GetBindInfo); -DEFINE_EXPECT(Obj_OnProgress_BEGINDOWNLOADDATA); -DEFINE_EXPECT(Obj_OnProgress_ENDDOWNLOADDATA); -DEFINE_EXPECT(Obj_OnProgress_SENDINGREQUEST); -DEFINE_EXPECT(Obj_OnProgress_MIMETYPEAVAILABLE); -DEFINE_EXPECT(Obj_OnProgress_CLASSIDAVAILABLE); -DEFINE_EXPECT(Obj_OnProgress_BEGINSYNCOPERATION); -DEFINE_EXPECT(Obj_OnProgress_ENDSYNCOPERATION); -DEFINE_EXPECT(Obj_OnProgress_FINDINGRESOURCE); -DEFINE_EXPECT(Obj_OnProgress_CONNECTING); -DEFINE_EXPECT(Obj_OnProgress_REDIRECTING); -DEFINE_EXPECT(Obj_OnProgress_CACHEFILENAMEAVAILABLE); -DEFINE_EXPECT(Start); -DEFINE_EXPECT(Read); -DEFINE_EXPECT(LockRequest); -DEFINE_EXPECT(Terminate); -DEFINE_EXPECT(UnlockRequest); -DEFINE_EXPECT(Continue); -DEFINE_EXPECT(Abort); -DEFINE_EXPECT(CreateInstance); -DEFINE_EXPECT(Load); -DEFINE_EXPECT(PutProperty_MIMETYPEPROP); -DEFINE_EXPECT(PutProperty_CLASSIDPROP); -DEFINE_EXPECT(SetPriority); -DEFINE_EXPECT(GetWindow_IHttpSecurity); -DEFINE_EXPECT(GetWindow_IWindowForBindingUI); -DEFINE_EXPECT(OnSecurityProblem); - -static const WCHAR winetest_data_urlW[] = - {'h','t','t','p',':','/','/','t','e','s','t','.','w','i','n','e','h','q','.','o','r','g','/', - 't','e','s','t','s','/','d','a','t','a','.','p','h','p',0}; - -static const WCHAR TEST_PART_URL_1[] = {'/','t','e','s','t','s','/','d','a','t','a','.','p','h','p','\0'}; - -static const WCHAR winetest_post_urlW[] = - {'h','t','t','p',':','/','/','t','e','s','t','.','w','i','n','e','h','q','.','o','r','g','/', - 't','e','s','t','s','/','p','o','s','t','.','p','h','p',0}; -static const WCHAR ABOUT_BLANK[] = {'a','b','o','u','t',':','b','l','a','n','k',0}; -static WCHAR INDEX_HTML[MAX_PATH]; -static const WCHAR ITS_URL[] = - {'i','t','s',':','t','e','s','t','.','c','h','m',':',':','/','b','l','a','n','k','.','h','t','m','l',0}; -static const WCHAR MK_URL[] = {'m','k',':','@','M','S','I','T','S','t','o','r','e',':', - 't','e','s','t','.','c','h','m',':',':','/','b','l','a','n','k','.','h','t','m','l',0}; -static const WCHAR https_urlW[] = - {'h','t','t','p','s',':','/','/','w','w','w','.','c','o','d','e','w','e','a','v','e','r','s','.','c','o','m', - '/','t','e','s','t','.','h','t','m','l',0}; -static const WCHAR https_invalid_cn_urlW[] = - {'h','t','t','p','s',':','/','/','2','0','9','.','4','6','.','2','5','.','1','3','2', - '/','t','e','s','t','.','h','t','m','l',0}; -static const WCHAR ftp_urlW[] = {'f','t','p',':','/','/','f','t','p','.','w','i','n','e','h','q','.','o','r','g', - '/','p','u','b','/','o','t','h','e','r','/', - 'w','i','n','e','l','o','g','o','.','x','c','f','.','t','a','r','.','b','z','2',0}; -static const WCHAR winetest_urlW[] = {'w','i','n','e','t','e','s','t',':','t','e','s','t',0}; - - -static const WCHAR wszTextHtml[] = {'t','e','x','t','/','h','t','m','l',0}; - -static WCHAR BSCBHolder[] = { '_','B','S','C','B','_','H','o','l','d','e','r','_',0 }; - -static const WCHAR wszWineHQSite[] = - {'w','w','w','.','w','i','n','e','h','q','.','o','r','g',0}; -static const WCHAR wszWineHQIP[] = - {'2','0','9','.','3','2','.','1','4','1','.','3',0}; -static const CHAR wszIndexHtmlA[] = "index.html"; -static const WCHAR wszIndexHtml[] = {'i','n','d','e','x','.','h','t','m','l',0}; -static const WCHAR cache_fileW[] = {'c',':','\\','c','a','c','h','e','.','h','t','m',0}; -static const CHAR dwl_htmlA[] = "dwl.html"; -static const WCHAR dwl_htmlW[] = {'d','w','l','.','h','t','m','l',0}; -static const CHAR test_txtA[] = "test.txt"; -static const WCHAR emptyW[] = {0}; - -static BOOL stopped_binding = FALSE, stopped_obj_binding = FALSE, emulate_protocol = FALSE, - data_available = FALSE, http_is_first = TRUE, bind_to_object = FALSE, filedwl_api; -static DWORD read = 0, bindf = 0, prot_state = 0, thread_id, tymed, security_problem; -static CHAR mime_type[512]; -static IInternetProtocolSink *protocol_sink = NULL; -static IBinding *current_binding; -static HANDLE complete_event, complete_event2; -static HRESULT binding_hres; -static HRESULT onsecurityproblem_hres; -static HRESULT abort_hres; -static BOOL have_IHttpNegotiate2, use_bscex, is_async_prot; -static BOOL test_redirect, use_cache_file, callback_read, no_callback, test_abort; -static WCHAR cache_file_name[MAX_PATH]; -static BOOL only_check_prot_args = FALSE; -static BOOL invalid_cn_accepted = FALSE; -static BOOL abort_start = FALSE; -static BOOL abort_progress = FALSE; - -static LPCWSTR urls[] = { - winetest_data_urlW, - ABOUT_BLANK, - INDEX_HTML, - ITS_URL, - MK_URL, - https_urlW, - ftp_urlW, - winetest_urlW -}; - -static WCHAR file_url[INTERNET_MAX_URL_LENGTH]; - -static enum { - HTTP_TEST, - ABOUT_TEST, - FILE_TEST, - ITS_TEST, - MK_TEST, - HTTPS_TEST, - FTP_TEST, - WINETEST_TEST -} test_protocol; - -static enum { - BEFORE_DOWNLOAD, - DOWNLOADING, - END_DOWNLOAD -} download_state; - -static const char *debugstr_guid(REFIID riid) -{ - static char buf[50]; - - sprintf(buf, "{%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]); - - return buf; -} - -static BOOL proxy_active(void) -{ - HKEY internet_settings; - DWORD proxy_enable; - DWORD size; - - if (RegOpenKeyExA(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", - 0, KEY_QUERY_VALUE, &internet_settings) != ERROR_SUCCESS) - return FALSE; - - size = sizeof(DWORD); - if (RegQueryValueExA(internet_settings, "ProxyEnable", NULL, NULL, (LPBYTE) &proxy_enable, &size) != ERROR_SUCCESS) - proxy_enable = 0; - - RegCloseKey(internet_settings); - - return proxy_enable != 0; -} - -static BOOL is_urlmon_protocol(int prot) -{ - return prot == FILE_TEST || prot == HTTP_TEST || prot == HTTPS_TEST || prot == FTP_TEST || prot == MK_TEST; -} - -static void test_CreateURLMoniker(LPCWSTR url1, LPCWSTR url2) -{ - HRESULT hr; - IMoniker *mon1 = NULL; - IMoniker *mon2 = NULL; - - hr = CreateURLMoniker(NULL, NULL, NULL); - ok(hr == E_INVALIDARG, - "Expected CreateURLMoniker to return E_INVALIDARG, got 0x%08x\n", hr); - - mon1 = (IMoniker *)0xdeadbeef; - hr = CreateURLMoniker(NULL, NULL, &mon1); - ok(hr == E_INVALIDARG, - "Expected CreateURLMoniker to return E_INVALIDARG, got 0x%08x\n", hr); - ok(mon1 == NULL, "Expected the output pointer to be NULL, got %p\n", mon1); - - hr = CreateURLMoniker(NULL, emptyW, NULL); - ok(hr == E_INVALIDARG, - "Expected CreateURLMoniker to return E_INVALIDARG, got 0x%08x\n", hr); - - hr = CreateURLMoniker(NULL, emptyW, &mon1); - ok(hr == S_OK || - broken(hr == MK_E_SYNTAX), /* IE5/IE5.01/IE6 SP2 */ - "Expected CreateURLMoniker to return S_OK, got 0x%08x\n", hr); - if(mon1) IMoniker_Release(mon1); - - hr = CreateURLMoniker(NULL, url1, &mon1); - ok(hr == S_OK, "failed to create moniker: 0x%08x\n", hr); - if(hr == S_OK) { - hr = CreateURLMoniker(mon1, url2, &mon2); - ok(hr == S_OK, "failed to create moniker: 0x%08x\n", hr); - } - if(mon1) IMoniker_Release(mon1); - if(mon2) IMoniker_Release(mon2); -} - -static void test_create(void) -{ - static const WCHAR relativeW[] = {'a','/','b','.','t','x','t',0}; - IStream *stream; - IMoniker *mon; - IBindCtx *bctx; - HRESULT hr; - - test_CreateURLMoniker(winetest_data_urlW, TEST_PART_URL_1); - - mon = (void*)0xdeadbeef; - hr = CreateURLMoniker(NULL, relativeW, &mon); - ok(hr == S_OK, "got 0x%08x\n", hr); - - hr = CreateBindCtx(0, &bctx); - - stream = (void*)0xdeadbeef; - hr = IMoniker_BindToStorage(mon, bctx, NULL, &IID_IStream, (void**)&stream); - todo_wine ok(hr == INET_E_UNKNOWN_PROTOCOL, "got 0x%08x\n", hr); - ok(stream == NULL, "got %p\n", stream); - - hr = IMoniker_BindToStorage(mon, bctx, NULL, &IID_IStream, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); - - stream = (void*)0xdeadbeef; - hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IStream, (void**)&stream); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); - ok(stream == NULL || broken(stream == (void*)0xdeadbeef) /* starting XP SP3 it's set to null */, - "got %p\n", stream); - - IMoniker_Release(mon); - - mon = (void*)0xdaedbeef; - hr = CreateURLMoniker(NULL, winetest_data_urlW, &mon); - ok(hr == S_OK, "got 0x%08x\n", hr); - - stream = (void*)0xdeadbeef; - hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IStream, (void**)&stream); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); - ok(stream == NULL || broken(stream == (void*)0xdeadbeef) /* starting XP SP3 it's set to null */, - "got %p\n", stream); - - hr = IMoniker_BindToStorage(mon, bctx, NULL, &IID_IStream, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); - - IMoniker_Release(mon); - IBindCtx_Release(bctx); -} - -static HRESULT WINAPI Priority_QueryInterface(IInternetPriority *iface, REFIID riid, void **ppv) -{ - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI Priority_AddRef(IInternetPriority *iface) -{ - return 2; -} - -static ULONG WINAPI Priority_Release(IInternetPriority *iface) -{ - return 1; -} - -static HRESULT WINAPI Priority_SetPriority(IInternetPriority *iface, LONG nPriority) -{ - CHECK_EXPECT(SetPriority); - ok(!nPriority, "nPriority = %d\n", nPriority); - return S_OK; -} - -static HRESULT WINAPI Priority_GetPriority(IInternetPriority *iface, LONG *pnPriority) -{ - ok(0, "unexpected call\n"); - return S_OK; -} - -static const IInternetPriorityVtbl InternetPriorityVtbl = { - Priority_QueryInterface, - Priority_AddRef, - Priority_Release, - Priority_SetPriority, - Priority_GetPriority -}; - -static IInternetPriority InternetPriority = { &InternetPriorityVtbl }; - -static HRESULT WINAPI Protocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv) -{ - *ppv = NULL; - - if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IInternetProtocol, riid)) { - *ppv = iface; - return S_OK; - } - - if(IsEqualGUID(&IID_IInternetPriority, riid)) { - if(!is_urlmon_protocol(test_protocol)) - return E_NOINTERFACE; - - *ppv = &InternetPriority; - return S_OK; - } - - if(IsEqualGUID(&IID_IInternetProtocolEx, riid)) - return E_NOINTERFACE; /* TODO */ - - ok(0, "unexpected call %s\n", debugstr_guid(riid)); - return E_NOINTERFACE; -} - -static ULONG WINAPI Protocol_AddRef(IInternetProtocol *iface) -{ - return 2; -} - -static ULONG WINAPI Protocol_Release(IInternetProtocol *iface) -{ - return 1; -} - -static void test_switch_fail(void) -{ - IInternetProtocolSink *binding_sink; - PROTOCOLDATA protocoldata; - HRESULT hres; - - static BOOL tested_switch_fail; - - if(tested_switch_fail) - return; - - tested_switch_fail = TRUE; - - hres = IBinding_QueryInterface(current_binding, &IID_IInternetProtocolSink, (void**)&binding_sink); - ok(hres == S_OK, "Could not get IInternetProtocolSink iface: %08x\n", hres); - if(SUCCEEDED(hres)) { - hres = IInternetProtocolSink_Switch(binding_sink, &protocoldata); - ok(hres == E_FAIL, "Switch failed: %08x, expected E_FAIL\n", hres); - IInternetProtocolSink_Release(binding_sink); - } -} - -static DWORD WINAPI thread_proc(PVOID arg) -{ - PROTOCOLDATA protocoldata; - HRESULT hres; - - if(!no_callback) { - if(bind_to_object) - SET_EXPECT(Obj_OnProgress_FINDINGRESOURCE); - else - SET_EXPECT(OnProgress_FINDINGRESOURCE); - } - hres = IInternetProtocolSink_ReportProgress(protocol_sink, - BINDSTATUS_FINDINGRESOURCE, wszWineHQSite); - ok(hres == S_OK, "ReportProgress failed: %08x\n", hres); - if(!no_callback) { - WaitForSingleObject(complete_event, INFINITE); - if(bind_to_object) - CHECK_CALLED(Obj_OnProgress_FINDINGRESOURCE); - else - CHECK_CALLED(OnProgress_FINDINGRESOURCE); - } - - if(!no_callback) { - if(bind_to_object) - SET_EXPECT(Obj_OnProgress_CONNECTING); - else - SET_EXPECT(OnProgress_CONNECTING); - } - hres = IInternetProtocolSink_ReportProgress(protocol_sink, - BINDSTATUS_CONNECTING, wszWineHQIP); - ok(hres == S_OK, "ReportProgress failed: %08x\n", hres); - if(!no_callback) { - WaitForSingleObject(complete_event, INFINITE); - if(bind_to_object) - CHECK_CALLED(Obj_OnProgress_CONNECTING); - else - CHECK_CALLED(OnProgress_CONNECTING); - } - - if(!no_callback) { - if(bind_to_object) - SET_EXPECT(Obj_OnProgress_SENDINGREQUEST); - else - SET_EXPECT(OnProgress_SENDINGREQUEST); - } - hres = IInternetProtocolSink_ReportProgress(protocol_sink, - BINDSTATUS_SENDINGREQUEST, NULL); - ok(hres == S_OK, "ReportProgress failed: %08x\n", hres); - if(!no_callback) { - WaitForSingleObject(complete_event, INFINITE); - if(bind_to_object) - CHECK_CALLED(Obj_OnProgress_SENDINGREQUEST); - else - CHECK_CALLED(OnProgress_SENDINGREQUEST); - } - - if(test_redirect) { - if(bind_to_object) - SET_EXPECT(Obj_OnProgress_REDIRECTING); - else - SET_EXPECT(OnProgress_REDIRECTING); - hres = IInternetProtocolSink_ReportProgress(protocol_sink, BINDSTATUS_REDIRECTING, winetest_data_urlW); - ok(hres == S_OK, "ReportProgress(BINDSTATUS_REFIRECTING) failed: %08x\n", hres); - WaitForSingleObject(complete_event, INFINITE); - if(bind_to_object) - CHECK_CALLED(Obj_OnProgress_REDIRECTING); - else - CHECK_CALLED(OnProgress_REDIRECTING); - } - - test_switch_fail(); - - SET_EXPECT(Continue); - prot_state = 1; - hres = IInternetProtocolSink_Switch(protocol_sink, &protocoldata); - ok(hres == S_OK, "Switch failed: %08x\n", hres); - WaitForSingleObject(complete_event, INFINITE); - - CHECK_CALLED(Continue); - CHECK_CALLED(Read); - if(bind_to_object) { - CHECK_CALLED(Obj_OnProgress_MIMETYPEAVAILABLE); - CHECK_CALLED(Obj_OnProgress_BEGINDOWNLOADDATA); - CHECK_CALLED(Obj_OnProgress_CLASSIDAVAILABLE); - CHECK_CALLED(Obj_OnProgress_BEGINSYNCOPERATION); - CHECK_CALLED(CreateInstance); - CHECK_CALLED(PutProperty_MIMETYPEPROP); - CHECK_CALLED_BROKEN(PutProperty_CLASSIDPROP); - CHECK_CALLED(Load); - CHECK_CALLED(Obj_OnProgress_ENDSYNCOPERATION); - CHECK_CALLED(OnObjectAvailable); - CHECK_CALLED(Obj_OnStopBinding); - }else if(!no_callback) { - CHECK_CALLED(OnProgress_MIMETYPEAVAILABLE); - CHECK_CALLED(OnProgress_BEGINDOWNLOADDATA); - CHECK_CALLED(OnDataAvailable); - }else { - CHECK_CALLED(LockRequest); - } - - SET_EXPECT(Continue); - prot_state = 2; - hres = IInternetProtocolSink_Switch(protocol_sink, &protocoldata); - ok(hres == S_OK, "Switch failed: %08x\n", hres); - WaitForSingleObject(complete_event, INFINITE); - CHECK_CALLED(Continue); - if(test_abort) { - CHECK_CALLED(OnProgress_DOWNLOADINGDATA); - CHECK_CALLED(OnStopBinding); - SetEvent(complete_event2); - return 0; - }else { - CHECK_CALLED(Read); - if(!no_callback) { - CHECK_CALLED(OnProgress_DOWNLOADINGDATA); - CHECK_CALLED(OnDataAvailable); - } - } - - SET_EXPECT(Continue); - prot_state = 2; - hres = IInternetProtocolSink_Switch(protocol_sink, &protocoldata); - ok(hres == S_OK, "Switch failed: %08x\n", hres); - WaitForSingleObject(complete_event, INFINITE); - CHECK_CALLED(Continue); - CHECK_CALLED(Read); - if(!no_callback) { - CHECK_CALLED(OnProgress_DOWNLOADINGDATA); - CHECK_CALLED(OnDataAvailable); - } - - SET_EXPECT(Continue); - prot_state = 3; - hres = IInternetProtocolSink_Switch(protocol_sink, &protocoldata); - ok(hres == S_OK, "Switch failed: %08x\n", hres); - WaitForSingleObject(complete_event, INFINITE); - CHECK_CALLED(Continue); - CHECK_CALLED(Read); - if(!no_callback) { - CHECK_CALLED(OnProgress_ENDDOWNLOADDATA); - CHECK_CALLED(OnDataAvailable); - CHECK_CALLED(OnStopBinding); - } - - SET_EXPECT(Read); - - SetEvent(complete_event2); - return 0; -} - -static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, - IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, - DWORD grfPI, HANDLE_PTR dwReserved) -{ - BINDINFO bindinfo; - DWORD bind_info, bscf = BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION; - HRESULT hres; - - static const STGMEDIUM stgmed_zero = {0}; - static const SECURITY_ATTRIBUTES sa_zero = {0}; - - CHECK_EXPECT(Start); - - read = 0; - - if(!filedwl_api) /* FIXME */ - ok(szUrl && !lstrcmpW(szUrl, urls[test_protocol]), "wrong url %s\n", wine_dbgstr_w(szUrl)); - ok(pOIProtSink != NULL, "pOIProtSink == NULL\n"); - ok(pOIBindInfo != NULL, "pOIBindInfo == NULL\n"); - ok(grfPI == 0, "grfPI=%d, expected 0\n", grfPI); - ok(dwReserved == 0, "dwReserved=%lx, expected 0\n", dwReserved); - - if(!filedwl_api && binding_hres != S_OK) { - SET_EXPECT(OnStopBinding); - SET_EXPECT(Terminate); - hres = IInternetProtocolSink_ReportResult(pOIProtSink, binding_hres, 0, NULL); - ok(hres == S_OK, "ReportResult failed: %08x\n", hres); - CHECK_CALLED(OnStopBinding); - CHECK_CALLED(Terminate); - - return S_OK; - } - - memset(&bindinfo, 0, sizeof(bindinfo)); - bindinfo.cbSize = sizeof(bindinfo); - hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &bind_info, &bindinfo); - ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); - - ok(bind_info & BINDF_FROMURLMON, "BINDF_FROMURLMON is not set\n"); - - if(filedwl_api || !is_urlmon_protocol(test_protocol) || tymed != TYMED_ISTREAM || - !(bindf&BINDF_ASYNCSTORAGE) || !(bindf&BINDF_PULLDATA)) - ok(bind_info & BINDF_NEEDFILE, "BINDF_NEEDFILE is not set\n"); - else - ok(!(bind_info & BINDF_NEEDFILE), "BINDF_NEEDFILE is set\n"); - - bind_info &= ~(BINDF_NEEDFILE|BINDF_FROMURLMON); - if(filedwl_api || no_callback) - ok(bind_info == BINDF_PULLDATA, "bind_info = %x, expected BINDF_PULLDATA\n", bind_info); - else - ok(bind_info == (bindf & ~(BINDF_NEEDFILE|BINDF_FROMURLMON)), "bind_info = %x, expected %x\n", - bind_info, (bindf & ~(BINDF_NEEDFILE|BINDF_FROMURLMON))); - - ok(bindinfo.cbSize == sizeof(bindinfo), "bindinfo.cbSize = %d\n", bindinfo.cbSize); - ok(!bindinfo.szExtraInfo, "bindinfo.szExtraInfo = %p\n", bindinfo.szExtraInfo); - ok(!memcmp(&bindinfo.stgmedData, &stgmed_zero, sizeof(STGMEDIUM)), "wrong stgmedData\n"); - ok(!bindinfo.grfBindInfoF, "bindinfo.grfBindInfoF = %d\n", bindinfo.grfBindInfoF); - ok(!bindinfo.dwBindVerb, "bindinfo.dwBindVerb = %d\n", bindinfo.dwBindVerb); - ok(!bindinfo.szCustomVerb, "bindinfo.szCustomVerb = %p\n", bindinfo.szCustomVerb); - ok(!bindinfo.cbstgmedData, "bindinfo.cbstgmedData = %d\n", bindinfo.cbstgmedData); - ok(bindinfo.dwOptions == (bind_to_object ? 0x100000 : 0), "bindinfo.dwOptions = %x\n", bindinfo.dwOptions); - ok(!bindinfo.dwOptionsFlags, "bindinfo.dwOptionsFlags = %d\n", bindinfo.dwOptionsFlags); - ok(!bindinfo.dwCodePage, "bindinfo.dwCodePage = %d\n", bindinfo.dwCodePage); - ok(!memcmp(&bindinfo.securityAttributes, &sa_zero, sizeof(sa_zero)), "wrong bindinfo.securityAttributes\n"); - ok(IsEqualGUID(&bindinfo.iid, &IID_NULL), "wrong bindinfo.iid\n"); - ok(!bindinfo.pUnk, "bindinfo.pUnk = %p\n", bindinfo.pUnk); - ok(!bindinfo.dwReserved, "bindinfo.dwReserved = %d\n", bindinfo.dwReserved); - - if(only_check_prot_args) - return E_FAIL; - - switch(test_protocol) { - case MK_TEST: - hres = IInternetProtocolSink_ReportProgress(pOIProtSink, - BINDSTATUS_DIRECTBIND, NULL); - ok(hres == S_OK, - "ReportProgress(BINDSTATUS_SENDINGREQUEST) failed: %08x\n", hres); - - case FILE_TEST: - case ITS_TEST: - if(bind_to_object) - SET_EXPECT(Obj_OnProgress_SENDINGREQUEST); - else - SET_EXPECT(OnProgress_SENDINGREQUEST); - hres = IInternetProtocolSink_ReportProgress(pOIProtSink, - BINDSTATUS_SENDINGREQUEST, emptyW); - ok(hres == S_OK, - "ReportProgress(BINDSTATUS_SENDINGREQUEST) failed: %08x\n", hres); - if(bind_to_object) - CHECK_CALLED(Obj_OnProgress_SENDINGREQUEST); - else - CHECK_CALLED(OnProgress_SENDINGREQUEST); - default: - break; - } - - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST) { - IServiceProvider *service_provider; - IHttpNegotiate *http_negotiate; - IHttpNegotiate2 *http_negotiate2; - IHttpSecurity *http_security; - LPWSTR ua = (LPWSTR)0xdeadbeef, accept_mimes[256]; - LPWSTR additional_headers = (LPWSTR)0xdeadbeef; - BYTE sec_id[100]; - DWORD fetched = 256, size = 100; - DWORD tid; - - static const WCHAR wszMimes[] = {'*','/','*',0}; - - SET_EXPECT(QueryInterface_IInternetBindInfo); - SET_EXPECT(QueryService_IInternetBindInfo); - hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_USER_AGENT, - &ua, 1, &fetched); - CLEAR_CALLED(QueryInterface_IInternetBindInfo); /* IE <8 */ - CLEAR_CALLED(QueryService_IInternetBindInfo); /* IE <8 */ - - ok(hres == E_NOINTERFACE, - "GetBindString(BINDSTRING_USER_AGETNT) failed: %08x\n", hres); - ok(fetched == 256, "fetched = %d, expected 254\n", fetched); - ok(ua == (LPWSTR)0xdeadbeef, "ua = %p\n", ua); - - hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_ACCEPT_MIMES, - accept_mimes, 256, &fetched); - ok(hres == S_OK, - "GetBindString(BINDSTRING_ACCEPT_MIMES) failed: %08x\n", hres); - ok(fetched == 1, "fetched = %d, expected 1\n", fetched); - ok(!lstrcmpW(wszMimes, accept_mimes[0]), "unexpected mimes\n"); - CoTaskMemFree(accept_mimes[0]); - - hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_ACCEPT_MIMES, - NULL, 256, &fetched); - ok(hres == E_INVALIDARG, - "GetBindString(BINDSTRING_ACCEPT_MIMES) failed: %08x\n", hres); - - hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_ACCEPT_MIMES, - accept_mimes, 256, NULL); - ok(hres == E_INVALIDARG, - "GetBindString(BINDSTRING_ACCEPT_MIMES) failed: %08x\n", hres); - - hres = IInternetBindInfo_QueryInterface(pOIBindInfo, &IID_IServiceProvider, - (void**)&service_provider); - ok(hres == S_OK, "QueryInterface failed: %08x\n", hres); - - SET_EXPECT(QueryInterface_IHttpNegotiate); - hres = IServiceProvider_QueryService(service_provider, &IID_IHttpNegotiate, - &IID_IHttpNegotiate, (void**)&http_negotiate); - CLEAR_CALLED(QueryInterface_IHttpNegotiate); /* IE <8 */ - ok(hres == S_OK, "QueryService failed: %08x\n", hres); - - if(!no_callback) { - SET_EXPECT(BeginningTransaction); - SET_EXPECT(QueryInterface_IHttpNegotiate); - } - hres = IHttpNegotiate_BeginningTransaction(http_negotiate, urls[test_protocol], - NULL, 0, &additional_headers); - if(!no_callback) { - CHECK_CALLED_BROKEN(QueryInterface_IHttpNegotiate); - CHECK_CALLED(BeginningTransaction); - } - IHttpNegotiate_Release(http_negotiate); - ok(hres == S_OK, "BeginningTransction failed: %08x\n", hres); - ok(additional_headers == NULL, "additional_headers=%p\n", additional_headers); - - SET_EXPECT(QueryInterface_IHttpNegotiate2); - hres = IServiceProvider_QueryService(service_provider, &IID_IHttpNegotiate2, - &IID_IHttpNegotiate2, (void**)&http_negotiate2); - CLEAR_CALLED(QueryInterface_IHttpNegotiate2); /* IE <8 */ - ok(hres == S_OK, "QueryService failed: %08x\n", hres); - - size = 512; - if(!no_callback) { - SET_EXPECT(QueryInterface_IHttpNegotiate2); - SET_EXPECT(GetRootSecurityId); - } - hres = IHttpNegotiate2_GetRootSecurityId(http_negotiate2, sec_id, &size, 0); - if(!no_callback) { - CHECK_CALLED_BROKEN(QueryInterface_IHttpNegotiate2); - CHECK_CALLED(GetRootSecurityId); - } - IHttpNegotiate2_Release(http_negotiate2); - ok(hres == E_FAIL, "GetRootSecurityId failed: %08x, expected E_FAIL\n", hres); - ok(size == no_callback ? 512 : 13, "size=%d\n", size); - - if(!no_callback) { - SET_EXPECT(QueryService_IHttpSecurity); - SET_EXPECT(QueryInterface_IHttpSecurity); - } - hres = IServiceProvider_QueryService(service_provider, &IID_IHttpSecurity, - &IID_IHttpSecurity, (void**)&http_security); - ok(hres == (no_callback ? E_NOINTERFACE : S_OK), "QueryService failed: 0x%08x\n", hres); - if(!no_callback) { - CHECK_CALLED(QueryService_IHttpSecurity); - CHECK_CALLED(QueryInterface_IHttpSecurity); - } - - IServiceProvider_Release(service_provider); - - IInternetProtocolSink_AddRef(pOIProtSink); - protocol_sink = pOIProtSink; - CreateThread(NULL, 0, thread_proc, NULL, 0, &tid); - - return S_OK; - } - - if(test_protocol == FILE_TEST) { - hres = IInternetProtocolSink_ReportProgress(pOIProtSink, - BINDSTATUS_CACHEFILENAMEAVAILABLE, file_url+8); - ok(hres == S_OK, - "ReportProgress(BINDSTATUS_CACHEFILENAMEAVAILABLE) failed: %08x\n", hres); - - if(bind_to_object) - SET_EXPECT(Obj_OnProgress_MIMETYPEAVAILABLE); - else - SET_EXPECT(OnProgress_MIMETYPEAVAILABLE); - hres = IInternetProtocolSink_ReportProgress(pOIProtSink, - BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE, wszTextHtml); - ok(hres == S_OK, - "ReportProgress(BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE) failed: %08x\n", hres); - if(bind_to_object) - CHECK_CALLED(Obj_OnProgress_MIMETYPEAVAILABLE); - else - CHECK_CALLED(OnProgress_MIMETYPEAVAILABLE); - }else { - hres = IInternetProtocolSink_ReportProgress(pOIProtSink, - BINDSTATUS_MIMETYPEAVAILABLE, wszTextHtml); - ok(hres == S_OK, - "ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08x\n", hres); - } - - if(test_protocol == ABOUT_TEST) - bscf |= BSCF_DATAFULLYAVAILABLE; - if(test_protocol == ITS_TEST) - bscf = BSCF_FIRSTDATANOTIFICATION|BSCF_DATAFULLYAVAILABLE; - - SET_EXPECT(Read); - if(bind_to_object) { - if(test_protocol != FILE_TEST && test_protocol != MK_TEST) - SET_EXPECT(Obj_OnProgress_MIMETYPEAVAILABLE); - SET_EXPECT(Obj_OnProgress_BEGINDOWNLOADDATA); - if(test_protocol == FILE_TEST) - SET_EXPECT(Obj_OnProgress_CACHEFILENAMEAVAILABLE); - SET_EXPECT(Obj_OnProgress_ENDDOWNLOADDATA); - SET_EXPECT(Obj_OnProgress_CLASSIDAVAILABLE); - SET_EXPECT(Obj_OnProgress_BEGINSYNCOPERATION); - SET_EXPECT(CreateInstance); - SET_EXPECT(PutProperty_MIMETYPEPROP); - SET_EXPECT(PutProperty_CLASSIDPROP); - SET_EXPECT(Load); - SET_EXPECT(Obj_OnProgress_ENDSYNCOPERATION); - SET_EXPECT(OnObjectAvailable); - SET_EXPECT(Obj_OnStopBinding); - }else { - if(test_protocol != FILE_TEST && test_protocol != MK_TEST) - SET_EXPECT(OnProgress_MIMETYPEAVAILABLE); - SET_EXPECT(OnProgress_BEGINDOWNLOADDATA); - if(test_protocol == FILE_TEST) - SET_EXPECT(OnProgress_CACHEFILENAMEAVAILABLE); - SET_EXPECT(OnProgress_ENDDOWNLOADDATA); - SET_EXPECT(LockRequest); - if(!filedwl_api) - SET_EXPECT(OnDataAvailable); - SET_EXPECT(OnStopBinding); - } - - hres = IInternetProtocolSink_ReportData(pOIProtSink, bscf, 13, 13); - ok(hres == S_OK, "ReportData failed: %08x\n", hres); - - CHECK_CALLED(Read); - if(bind_to_object) { - if(test_protocol != FILE_TEST && test_protocol != MK_TEST) - CHECK_CALLED(Obj_OnProgress_MIMETYPEAVAILABLE); - CHECK_CALLED(Obj_OnProgress_BEGINDOWNLOADDATA); - if(test_protocol == FILE_TEST) - CHECK_CALLED(Obj_OnProgress_CACHEFILENAMEAVAILABLE); - CHECK_CALLED(Obj_OnProgress_ENDDOWNLOADDATA); - CHECK_CALLED(Obj_OnProgress_CLASSIDAVAILABLE); - CHECK_CALLED(Obj_OnProgress_BEGINSYNCOPERATION); - CHECK_CALLED(CreateInstance); - CHECK_CALLED(PutProperty_MIMETYPEPROP); - CHECK_CALLED_BROKEN(PutProperty_CLASSIDPROP); - CHECK_CALLED(Load); - CHECK_CALLED(Obj_OnProgress_ENDSYNCOPERATION); - CHECK_CALLED(OnObjectAvailable); - CHECK_CALLED(Obj_OnStopBinding); - }else { - if(test_protocol != FILE_TEST && test_protocol != MK_TEST) - CHECK_CALLED(OnProgress_MIMETYPEAVAILABLE); - CHECK_CALLED(OnProgress_BEGINDOWNLOADDATA); - if(test_protocol == FILE_TEST) - CHECK_CALLED(OnProgress_CACHEFILENAMEAVAILABLE); - CHECK_CALLED(OnProgress_ENDDOWNLOADDATA); - CHECK_CALLED(LockRequest); - if(!filedwl_api) - CHECK_CALLED(OnDataAvailable); - CHECK_CALLED(OnStopBinding); - } - - if(test_protocol == ITS_TEST) { - SET_EXPECT(Read); - hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_BEGINDOWNLOADDATA, NULL); - ok(hres == S_OK, "ReportProgress(BINDSTATUS_BEGINDOWNLOADDATA) failed: %08x\n", hres); - CHECK_CALLED(Read); - }else if(!bind_to_object && test_protocol == ABOUT_TEST) { - SET_EXPECT(Read); - hres = IInternetProtocolSink_ReportData(pOIProtSink, bscf, 13, 13); - ok(hres == S_OK, "ReportData failed: %08x\n", hres); - CHECK_CALLED(Read); - } - - SET_EXPECT(Terminate); - hres = IInternetProtocolSink_ReportResult(pOIProtSink, S_OK, 0, NULL); - ok(hres == S_OK, "ReportResult failed: %08x\n", hres); - CHECK_CALLED(Terminate); - - return S_OK; -} - -static HRESULT WINAPI Protocol_Continue(IInternetProtocol *iface, - PROTOCOLDATA *pProtocolData) -{ - DWORD bscf = 0; - HRESULT hres; - - CHECK_EXPECT(Continue); - - ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId()); - - ok(pProtocolData != NULL, "pProtocolData == NULL\n"); - if(!pProtocolData) - return S_OK; - - switch(prot_state) { - case 1: { - IServiceProvider *service_provider; - IHttpNegotiate *http_negotiate; - static WCHAR header[] = {'?',0}; - - hres = IInternetProtocolSink_QueryInterface(protocol_sink, &IID_IServiceProvider, - (void**)&service_provider); - ok(hres == S_OK, "Could not get IServiceProvicder\n"); - - hres = IServiceProvider_QueryService(service_provider, &IID_IHttpNegotiate, - &IID_IHttpNegotiate, (void**)&http_negotiate); - ok(hres == S_OK, "Could not get IHttpNegotiate\n"); - - if(!no_callback) { - SET_EXPECT(QueryInterface_IHttpNegotiate); - SET_EXPECT(OnResponse); - } - hres = IHttpNegotiate_OnResponse(http_negotiate, 200, header, NULL, NULL); - if(!no_callback) { - CHECK_CALLED_BROKEN(QueryInterface_IHttpNegotiate); - CHECK_CALLED(OnResponse); - } - IHttpNegotiate_Release(http_negotiate); - ok(hres == S_OK, "OnResponse failed: %08x\n", hres); - - if(test_protocol == HTTPS_TEST || test_redirect) { - hres = IInternetProtocolSink_ReportProgress(protocol_sink, BINDSTATUS_ACCEPTRANGES, NULL); - ok(hres == S_OK, "ReportProgress(BINDSTATUS_ACCEPTRANGES) failed: %08x\n", hres); - } - - hres = IInternetProtocolSink_ReportProgress(protocol_sink, - BINDSTATUS_MIMETYPEAVAILABLE, wszTextHtml); - ok(hres == S_OK, - "ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08x\n", hres); - - hres = IInternetProtocolSink_ReportProgress(protocol_sink, - BINDSTATUS_CACHEFILENAMEAVAILABLE, use_cache_file ? cache_file_name : cache_fileW); - ok(hres == S_OK, "ReportProgress(BINDSTATUS_CACHEFILENAMEAVAILABLE) failed: %08x\n", hres); - - bscf |= BSCF_FIRSTDATANOTIFICATION; - break; - } - case 2: - case 3: - bscf = BSCF_INTERMEDIATEDATANOTIFICATION; - break; - } - - hres = IInternetProtocolSink_ReportData(protocol_sink, bscf, 100, 400); - ok(hres == S_OK, "ReportData failed: %08x\n", hres); - - if(prot_state != 2 || !test_abort) - SET_EXPECT(Read); - switch(prot_state) { - case 1: - if(bind_to_object) { - SET_EXPECT(Obj_OnProgress_MIMETYPEAVAILABLE); - SET_EXPECT(Obj_OnProgress_BEGINDOWNLOADDATA); - SET_EXPECT(Obj_OnProgress_CLASSIDAVAILABLE); - SET_EXPECT(Obj_OnProgress_BEGINSYNCOPERATION); - SET_EXPECT(CreateInstance); - SET_EXPECT(PutProperty_MIMETYPEPROP); - SET_EXPECT(PutProperty_CLASSIDPROP); - SET_EXPECT(Load); - SET_EXPECT(Obj_OnProgress_ENDSYNCOPERATION); - SET_EXPECT(OnObjectAvailable); - SET_EXPECT(Obj_OnStopBinding); - }else if(!no_callback) { - SET_EXPECT(OnProgress_MIMETYPEAVAILABLE); - SET_EXPECT(OnProgress_BEGINDOWNLOADDATA); - SET_EXPECT(LockRequest); - }else { - SET_EXPECT(LockRequest); - } - break; - case 2: - if(!no_callback) - SET_EXPECT(OnProgress_DOWNLOADINGDATA); - break; - case 3: - SET_EXPECT(OnProgress_DOWNLOADINGDATA); - SET_EXPECT(OnProgress_ENDDOWNLOADDATA); - } - if(!no_callback) { - if((!bind_to_object || prot_state >= 2) && (!test_abort || prot_state != 2)) - SET_EXPECT(OnDataAvailable); - if(prot_state == 3 || (test_abort && prot_state == 2)) - SET_EXPECT(OnStopBinding); - } - return S_OK; -} - -static HRESULT WINAPI Protocol_Abort(IInternetProtocol *iface, HRESULT hrReason, - DWORD dwOptions) -{ - HRESULT hres; - - CHECK_EXPECT(Abort); - - ok(hrReason == E_ABORT, "hrReason = %08x\n", hrReason); - ok(!dwOptions, "dwOptions = %x\n", dwOptions); - - hres = IInternetProtocolSink_ReportResult(protocol_sink, E_ABORT, ERROR_SUCCESS, NULL); - ok(hres == S_OK, "ReportResult failed: %08x\n", hres); - - return S_OK; -} - -static HRESULT WINAPI Protocol_Terminate(IInternetProtocol *iface, DWORD dwOptions) -{ - CHECK_EXPECT(Terminate); - - ok(dwOptions == 0, "dwOptions=%d, expected 0\n", dwOptions); - - if(protocol_sink) { - IInternetProtocolSink_Release(protocol_sink); - protocol_sink = NULL; - } - - if(no_callback) - SetEvent(complete_event); - return S_OK; -} - -static HRESULT WINAPI Protocol_Suspend(IInternetProtocol *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Protocol_Resume(IInternetProtocol *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Protocol_Read(IInternetProtocol *iface, void *pv, - ULONG cb, ULONG *pcbRead) -{ - static const char data[] = ""; - - CHECK_EXPECT2(Read); - - ok(pv != NULL, "pv == NULL\n"); - ok(cb != 0, "cb == 0\n"); - ok(pcbRead != NULL, "pcbRead == NULL\n"); - - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST) { - HRESULT hres; - - static int pending = TRUE; - - pending = !pending; - - switch(prot_state) { - case 1: - case 2: - if(pending) { - *pcbRead = 10; - memset(pv, '?', 10); - if(prot_state == 2 && no_callback) - SetEvent(complete_event); - return E_PENDING; - }else { - memset(pv, '?', cb); - *pcbRead = cb; - read++; - return S_OK; - } - case 3: - prot_state++; - - *pcbRead = 0; - - hres = IInternetProtocolSink_ReportData(protocol_sink, - BSCF_LASTDATANOTIFICATION|BSCF_INTERMEDIATEDATANOTIFICATION, 2000, 2000); - ok(hres == S_OK, "ReportData failed: %08x\n", hres); - - hres = IInternetProtocolSink_ReportResult(protocol_sink, S_OK, 0, NULL); - ok(hres == S_OK, "ReportResult failed: %08x\n", hres); - - return S_FALSE; - case 4: - *pcbRead = 0; - return S_FALSE; - } - } - - if(read) { - *pcbRead = 0; - return S_FALSE; - } - - ok(*pcbRead == 0, "*pcbRead=%d, expected 0\n", *pcbRead); - read += *pcbRead = sizeof(data)-1; - memcpy(pv, data, sizeof(data)); - return S_OK; -} - -static HRESULT WINAPI Protocol_Seek(IInternetProtocol *iface, - LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI Protocol_LockRequest(IInternetProtocol *iface, DWORD dwOptions) -{ - CHECK_EXPECT(LockRequest); - if(no_callback) - SetEvent(complete_event); - return S_OK; -} - -static HRESULT WINAPI Protocol_UnlockRequest(IInternetProtocol *iface) -{ - CHECK_EXPECT(UnlockRequest); - return S_OK; -} - -static const IInternetProtocolVtbl ProtocolVtbl = { - Protocol_QueryInterface, - Protocol_AddRef, - Protocol_Release, - Protocol_Start, - Protocol_Continue, - Protocol_Abort, - Protocol_Terminate, - Protocol_Suspend, - Protocol_Resume, - Protocol_Read, - Protocol_Seek, - Protocol_LockRequest, - Protocol_UnlockRequest -}; - -static IInternetProtocol Protocol = { &ProtocolVtbl }; - -static HRESULT WINAPI HttpNegotiate_QueryInterface(IHttpNegotiate2 *iface, REFIID riid, void **ppv) -{ - if(IsEqualGUID(&IID_IUnknown, riid) - || IsEqualGUID(&IID_IHttpNegotiate, riid) - || IsEqualGUID(&IID_IHttpNegotiate2, riid)) { - *ppv = iface; - return S_OK; - } - - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI HttpNegotiate_AddRef(IHttpNegotiate2 *iface) -{ - return 2; -} - -static ULONG WINAPI HttpNegotiate_Release(IHttpNegotiate2 *iface) -{ - return 1; -} - -static HRESULT WINAPI HttpNegotiate_BeginningTransaction(IHttpNegotiate2 *iface, LPCWSTR szURL, - LPCWSTR szHeaders, DWORD dwReserved, LPWSTR *pszAdditionalHeaders) -{ - if(onsecurityproblem_hres == S_OK) - CHECK_EXPECT2(BeginningTransaction); - else - CHECK_EXPECT(BeginningTransaction); - - ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId()); - - ok(!lstrcmpW(szURL, urls[test_protocol]), "szURL != urls[test_protocol]\n"); - ok(!dwReserved, "dwReserved=%d, expected 0\n", dwReserved); - ok(pszAdditionalHeaders != NULL, "pszAdditionalHeaders == NULL\n"); - if(pszAdditionalHeaders) - ok(*pszAdditionalHeaders == NULL, "*pszAdditionalHeaders != NULL\n"); - - return S_OK; -} - -static HRESULT WINAPI HttpNegotiate_OnResponse(IHttpNegotiate2 *iface, DWORD dwResponseCode, - LPCWSTR szResponseHeaders, LPCWSTR szRequestHeaders, LPWSTR *pszAdditionalRequestHeaders) -{ - CHECK_EXPECT(OnResponse); - - ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId()); - - ok(dwResponseCode == 200, "dwResponseCode=%d, expected 200\n", dwResponseCode); - ok(szResponseHeaders != NULL, "szResponseHeaders == NULL\n"); - ok(szRequestHeaders == NULL, "szRequestHeaders != NULL\n"); - /* Note: in protocol.c tests, OnResponse pszAdditionalRequestHeaders _is_ NULL */ - ok(pszAdditionalRequestHeaders != NULL, "pszAdditionalHeaders == NULL\n"); - if(pszAdditionalRequestHeaders) - ok(*pszAdditionalRequestHeaders == NULL, "*pszAdditionalHeaders != NULL\n"); - - return S_OK; -} - -static HRESULT WINAPI HttpNegotiate_GetRootSecurityId(IHttpNegotiate2 *iface, - BYTE *pbSecurityId, DWORD *pcbSecurityId, DWORD_PTR dwReserved) -{ - static const BYTE sec_id[] = {'h','t','t','p',':','t','e','s','t',1,0,0,0}; - - CHECK_EXPECT(GetRootSecurityId); - - ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId()); - - ok(!dwReserved, "dwReserved=%ld, expected 0\n", dwReserved); - ok(pbSecurityId != NULL, "pbSecurityId == NULL\n"); - ok(pcbSecurityId != NULL, "pcbSecurityId == NULL\n"); - - if(pbSecurityId == (void*)0xdeadbeef) - return E_NOTIMPL; - - if(pcbSecurityId) { - ok(*pcbSecurityId == 512, "*pcbSecurityId=%d, expected 512\n", *pcbSecurityId); - *pcbSecurityId = sizeof(sec_id); - } - - if(pbSecurityId) - memcpy(pbSecurityId, sec_id, sizeof(sec_id)); - - return E_FAIL; -} - -static IHttpNegotiate2Vtbl HttpNegotiateVtbl = { - HttpNegotiate_QueryInterface, - HttpNegotiate_AddRef, - HttpNegotiate_Release, - HttpNegotiate_BeginningTransaction, - HttpNegotiate_OnResponse, - HttpNegotiate_GetRootSecurityId -}; - -static IHttpNegotiate2 HttpNegotiate = { &HttpNegotiateVtbl }; - -static HRESULT WINAPI HttpSecurity_QueryInterface(IHttpSecurity *iface, REFIID riid, void **ppv) -{ - ok(0, "Unexpected call\n"); - *ppv = NULL; - if(IsEqualGUID(&IID_IHttpSecurity, riid) || - IsEqualGUID(&IID_IWindowForBindingUI, riid) || - IsEqualGUID(&IID_IUnknown, riid)) - { - *ppv = iface; - return S_OK; - } - - ok(0, "Unexpected interface requested.\n"); - - return E_NOINTERFACE; -} - -static ULONG WINAPI HttpSecurity_AddRef(IHttpSecurity *iface) -{ - return 2; -} - -static ULONG WINAPI HttpSecurity_Release(IHttpSecurity *iface) -{ - return 1; -} - -static HRESULT WINAPI HttpSecurity_GetWindow(IHttpSecurity *iface, REFGUID rguidReason, HWND *phwnd) -{ - if(IsEqualGUID(rguidReason, &IID_IHttpSecurity)) - CHECK_EXPECT(GetWindow_IHttpSecurity); - else if(IsEqualGUID(rguidReason, &IID_IWindowForBindingUI)) - CHECK_EXPECT2(GetWindow_IWindowForBindingUI); - else - ok(0, "Unexpected rguidReason: %s\n", debugstr_guid(rguidReason)); - - *phwnd = NULL; - return S_OK; -} - -static HRESULT WINAPI HttpSecurity_OnSecurityProblem(IHttpSecurity *iface, DWORD dwProblem) -{ - CHECK_EXPECT(OnSecurityProblem); - if(!security_problem) { - ok(dwProblem == ERROR_INTERNET_SEC_CERT_CN_INVALID || - broken(dwProblem == ERROR_INTERNET_SEC_CERT_ERRORS) /* Some versions of IE6 */, - "Got problem: %d\n", dwProblem); - security_problem = dwProblem; - - if(dwProblem == ERROR_INTERNET_SEC_CERT_ERRORS) - binding_hres = INET_E_SECURITY_PROBLEM; - }else - ok(dwProblem == security_problem, "Got problem: %d\n", dwProblem); - - return onsecurityproblem_hres; -} - -static const IHttpSecurityVtbl HttpSecurityVtbl = { - HttpSecurity_QueryInterface, - HttpSecurity_AddRef, - HttpSecurity_Release, - HttpSecurity_GetWindow, - HttpSecurity_OnSecurityProblem -}; - -static IHttpSecurity HttpSecurity = { &HttpSecurityVtbl }; - -static HRESULT WINAPI ServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv) -{ - ok(0, "unexpected call\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI ServiceProvider_AddRef(IServiceProvider *iface) -{ - return 2; -} - -static ULONG WINAPI ServiceProvider_Release(IServiceProvider *iface) -{ - return 1; -} - -static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, - REFGUID guidService, REFIID riid, void **ppv) -{ - if(IsEqualGUID(&IID_IAuthenticate, guidService)) { - CHECK_EXPECT(QueryService_IAuthenticate); - return E_NOTIMPL; - } - - if(IsEqualGUID(&IID_IInternetProtocol, guidService)) { - CHECK_EXPECT2(QueryService_IInternetProtocol); - return E_NOTIMPL; - } - - if(IsEqualGUID(&IID_IInternetBindInfo, guidService)) { - CHECK_EXPECT(QueryService_IInternetBindInfo); - return E_NOTIMPL; - } - - if(IsEqualGUID(&IID_IWindowForBindingUI, guidService)) { - CHECK_EXPECT2(QueryService_IWindowForBindingUI); - *ppv = &HttpSecurity; - return S_OK; - } - - if(IsEqualGUID(&IID_IHttpSecurity, guidService)) { - CHECK_EXPECT(QueryService_IHttpSecurity); - *ppv = &HttpSecurity; - return S_OK; - } - - ok(0, "unexpected service %s\n", debugstr_guid(guidService)); - return E_NOINTERFACE; -} - -static IServiceProviderVtbl ServiceProviderVtbl = { - ServiceProvider_QueryInterface, - ServiceProvider_AddRef, - ServiceProvider_Release, - ServiceProvider_QueryService -}; - -static IServiceProvider ServiceProvider = { &ServiceProviderVtbl }; - -static IBindStatusCallbackEx objbsc; - -static void test_WinInetHttpInfo(IWinInetHttpInfo *http_info, DWORD progress) -{ - DWORD status, size; - HRESULT hres, expect; - - /* QueryInfo changes it's behavior during this request */ - if(progress == BINDSTATUS_SENDINGREQUEST) - return; - - if(test_protocol==FTP_TEST && download_state==BEFORE_DOWNLOAD - && progress!=BINDSTATUS_MIMETYPEAVAILABLE) - expect = E_FAIL; - else if(test_protocol == FTP_TEST) - expect = S_FALSE; - else - expect = S_OK; - - size = sizeof(DWORD); - hres = IWinInetHttpInfo_QueryInfo(http_info, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_NUMBER, - &status, &size, NULL, NULL); - ok(hres == expect, "hres = %x, expected %x\n", hres, expect); - if(hres == S_OK) { - if(download_state==BEFORE_DOWNLOAD && progress!=BINDSTATUS_MIMETYPEAVAILABLE) - ok(status == 0, "status = %d\n", status); - else - ok(status == HTTP_STATUS_OK, "status = %d\n", status); - ok(size == sizeof(DWORD), "size = %d\n", size); - } - - size = sizeof(DWORD); - hres = IWinInetHttpInfo_QueryOption(http_info, INTERNET_OPTION_HANDLE_TYPE, &status, &size); - if(test_protocol == FTP_TEST) { - if(download_state==BEFORE_DOWNLOAD && progress!=BINDSTATUS_MIMETYPEAVAILABLE) - ok(hres == E_FAIL, "hres = %x\n", hres); - else - ok(hres == S_OK, "hres = %x\n", hres); - - if(hres == S_OK) - ok(status == INTERNET_HANDLE_TYPE_FTP_FILE, "status = %d\n", status); - } else { - ok(hres == S_OK, "hres = %x\n", hres); - ok(status == INTERNET_HANDLE_TYPE_HTTP_REQUEST, "status = %d\n", status); - } -} - -static HRESULT WINAPI statusclb_QueryInterface(IBindStatusCallbackEx *iface, REFIID riid, void **ppv) -{ - ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId()); - - if(IsEqualGUID(&IID_IInternetProtocol, riid)) { - CHECK_EXPECT2(QueryInterface_IInternetProtocol); - if(emulate_protocol) { - *ppv = &Protocol; - return S_OK; - }else { - return E_NOINTERFACE; - } - } - else if (IsEqualGUID(&IID_IServiceProvider, riid)) - { - CHECK_EXPECT2(QueryInterface_IServiceProvider); - *ppv = &ServiceProvider; - return S_OK; - } - else if (IsEqualGUID(&IID_IHttpNegotiate, riid)) - { - CHECK_EXPECT2(QueryInterface_IHttpNegotiate); - *ppv = &HttpNegotiate; - return S_OK; - } - else if (IsEqualGUID(&IID_IHttpNegotiate2, riid)) - { - CHECK_EXPECT(QueryInterface_IHttpNegotiate2); - *ppv = &HttpNegotiate; - return S_OK; - } - else if (IsEqualGUID(&IID_IAuthenticate, riid)) - { - CHECK_EXPECT(QueryInterface_IAuthenticate); - return E_NOINTERFACE; - } - else if(IsEqualGUID(&IID_IBindStatusCallback, riid)) - { - CHECK_EXPECT2(QueryInterface_IBindStatusCallback); - *ppv = iface; - return S_OK; - } - else if(IsEqualGUID(&IID_IBindStatusCallbackHolder, riid)) - { - CHECK_EXPECT2(QueryInterface_IBindStatusCallbackHolder); - return E_NOINTERFACE; - } - else if(IsEqualGUID(&IID_IBindStatusCallbackEx, riid)) - { - CHECK_EXPECT(QueryInterface_IBindStatusCallbackEx); - if(!use_bscex) - return E_NOINTERFACE; - *ppv = iface; - return S_OK; - } - else if(IsEqualGUID(&IID_IInternetBindInfo, riid)) - { - /* TODO */ - CHECK_EXPECT2(QueryInterface_IInternetBindInfo); - } - else if(IsEqualGUID(&IID_IWindowForBindingUI, riid)) - { - CHECK_EXPECT2(QueryInterface_IWindowForBindingUI); - return E_NOINTERFACE; - } - else if(IsEqualGUID(&IID_IHttpSecurity, riid)) - { - CHECK_EXPECT2(QueryInterface_IHttpSecurity); - return E_NOINTERFACE; - } - else - { - ok(0, "unexpected interface %s\n", debugstr_guid(riid)); - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI statusclb_AddRef(IBindStatusCallbackEx *iface) -{ - return 2; -} - -static ULONG WINAPI statusclb_Release(IBindStatusCallbackEx *iface) -{ - return 1; -} - -static HRESULT WINAPI statusclb_OnStartBinding(IBindStatusCallbackEx *iface, DWORD dwReserved, - IBinding *pib) -{ - IWinInetHttpInfo *http_info; - HRESULT hres; - IMoniker *mon; - - if(iface == &objbsc) - CHECK_EXPECT(Obj_OnStartBinding); - else - CHECK_EXPECT(OnStartBinding); - - ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId()); - - ok(pib != NULL, "pib should not be NULL\n"); - ok(dwReserved == 0xff, "dwReserved=%x\n", dwReserved); - - if(pib == (void*)0xdeadbeef) - return S_OK; - - current_binding = pib; - - hres = IBinding_QueryInterface(pib, &IID_IMoniker, (void**)&mon); - ok(hres == E_NOINTERFACE, "IBinding should not have IMoniker interface\n"); - if(SUCCEEDED(hres)) - IMoniker_Release(mon); - - hres = IBinding_QueryInterface(pib, &IID_IWinInetHttpInfo, (void**)&http_info); - ok(hres == E_NOINTERFACE, "Could not get IID_IWinInetHttpInfo: %08x\n", hres); - - if(abort_start) { - binding_hres = abort_hres; - return abort_hres; - } - - return S_OK; -} - -static HRESULT WINAPI statusclb_GetPriority(IBindStatusCallbackEx *iface, LONG *pnPriority) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI statusclb_OnLowResource(IBindStatusCallbackEx *iface, DWORD reserved) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI statusclb_OnProgress(IBindStatusCallbackEx *iface, ULONG ulProgress, - ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText) -{ - ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId()); - - switch(ulStatusCode) { - case BINDSTATUS_FINDINGRESOURCE: - if(iface == &objbsc) - CHECK_EXPECT(Obj_OnProgress_FINDINGRESOURCE); - else if(test_protocol == FTP_TEST) - todo_wine CHECK_EXPECT(OnProgress_FINDINGRESOURCE); - else - CHECK_EXPECT(OnProgress_FINDINGRESOURCE); - if(emulate_protocol && (test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST)) - SetEvent(complete_event); - break; - case BINDSTATUS_CONNECTING: - if(iface == &objbsc) - CHECK_EXPECT(Obj_OnProgress_CONNECTING); - else if(test_protocol == FTP_TEST) - todo_wine CHECK_EXPECT(OnProgress_CONNECTING); - else if(onsecurityproblem_hres == S_OK) - CHECK_EXPECT2(OnProgress_CONNECTING); - else - CHECK_EXPECT(OnProgress_CONNECTING); - if(emulate_protocol && (test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST)) - SetEvent(complete_event); - break; - case BINDSTATUS_REDIRECTING: - if(iface == &objbsc) - CHECK_EXPECT(Obj_OnProgress_REDIRECTING); - else - CHECK_EXPECT(OnProgress_REDIRECTING); - ok(!lstrcmpW(szStatusText, winetest_data_urlW), "unexpected status text %s\n", - wine_dbgstr_w(szStatusText)); - if(emulate_protocol && (test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST) - && (!bind_to_object || iface == &objbsc)) - SetEvent(complete_event); - break; - case BINDSTATUS_SENDINGREQUEST: - if(iface == &objbsc) - CHECK_EXPECT(Obj_OnProgress_SENDINGREQUEST); - else if(test_protocol == FTP_TEST) - CHECK_EXPECT2(OnProgress_SENDINGREQUEST); - else - CHECK_EXPECT(OnProgress_SENDINGREQUEST); - if(emulate_protocol && (test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST)) - SetEvent(complete_event); - - if(abort_progress) { - if(filedwl_api) - binding_hres = E_ABORT; - return E_ABORT; - } - - break; - case BINDSTATUS_MIMETYPEAVAILABLE: - if(iface == &objbsc) - CHECK_EXPECT(Obj_OnProgress_MIMETYPEAVAILABLE); - else - CHECK_EXPECT(OnProgress_MIMETYPEAVAILABLE); - if(!bind_to_object) - ok(download_state == BEFORE_DOWNLOAD, "Download state was %d, expected BEFORE_DOWNLOAD\n", - download_state); - WideCharToMultiByte(CP_ACP, 0, szStatusText, -1, mime_type, sizeof(mime_type)-1, NULL, NULL); - break; - case BINDSTATUS_BEGINDOWNLOADDATA: - if(iface == &objbsc) - CHECK_EXPECT(Obj_OnProgress_BEGINDOWNLOADDATA); - else - CHECK_EXPECT(OnProgress_BEGINDOWNLOADDATA); - ok(szStatusText != NULL, "szStatusText == NULL\n"); - if(szStatusText) { - if(filedwl_api) { - /* FIXME */ - }else { - ok(!lstrcmpW(szStatusText, urls[test_protocol]), "wrong szStatusText %s\n", wine_dbgstr_w(szStatusText)); - } - } - if(!bind_to_object) - ok(download_state == BEFORE_DOWNLOAD, "Download state was %d, expected BEFORE_DOWNLOAD\n", - download_state); - download_state = DOWNLOADING; - break; - case BINDSTATUS_DOWNLOADINGDATA: - CHECK_EXPECT2(OnProgress_DOWNLOADINGDATA); - ok(iface != &objbsc, "unexpected call\n"); - ok(download_state == DOWNLOADING, "Download state was %d, expected DOWNLOADING\n", - download_state); - if(test_abort) { - HRESULT hres; - - SET_EXPECT(Abort); - hres = IBinding_Abort(current_binding); - ok(hres == S_OK, "Abort failed: %08x\n", hres); - CHECK_CALLED(Abort); - - hres = IBinding_Abort(current_binding); - ok(hres == E_FAIL, "Abort failed: %08x\n", hres); - - binding_hres = E_ABORT; - } - break; - case BINDSTATUS_ENDDOWNLOADDATA: - if(iface == &objbsc) - CHECK_EXPECT(Obj_OnProgress_ENDDOWNLOADDATA); - else - CHECK_EXPECT(OnProgress_ENDDOWNLOADDATA); - ok(szStatusText != NULL, "szStatusText == NULL\n"); - if(szStatusText) { - if(filedwl_api) { - /* FIXME */ - }else { - ok(!lstrcmpW(szStatusText, urls[test_protocol]), "wrong szStatusText %s\n", wine_dbgstr_w(szStatusText)); - } - } - ok(download_state == DOWNLOADING, "Download state was %d, expected DOWNLOADING\n", - download_state); - download_state = END_DOWNLOAD; - break; - case BINDSTATUS_CACHEFILENAMEAVAILABLE: - if(test_protocol != HTTP_TEST && test_protocol != HTTPS_TEST && test_protocol != WINETEST_TEST) { - if(iface == &objbsc) - CHECK_EXPECT(Obj_OnProgress_CACHEFILENAMEAVAILABLE); - else - CHECK_EXPECT(OnProgress_CACHEFILENAMEAVAILABLE); - }else { /* FIXME */ - CLEAR_CALLED(OnProgress_CACHEFILENAMEAVAILABLE); - CLEAR_CALLED(Obj_OnProgress_CACHEFILENAMEAVAILABLE); - } - - ok(szStatusText != NULL, "szStatusText == NULL\n"); - if(szStatusText && test_protocol == FILE_TEST) - ok(!lstrcmpW(file_url+8, szStatusText), "wrong szStatusText %s\n", wine_dbgstr_w(szStatusText)); - break; - case BINDSTATUS_CLASSIDAVAILABLE: - { - CLSID clsid; - HRESULT hr; - if(iface != &objbsc) - ok(0, "unexpected call\n"); - else - CHECK_EXPECT(Obj_OnProgress_CLASSIDAVAILABLE); - hr = CLSIDFromString((LPCOLESTR)szStatusText, &clsid); - ok(hr == S_OK, "CLSIDFromString failed with error 0x%08x\n", hr); - ok(IsEqualCLSID(&clsid, &CLSID_HTMLDocument), - "Expected clsid to be CLSID_HTMLDocument instead of %s\n", debugstr_guid(&clsid)); - break; - } - case BINDSTATUS_BEGINSYNCOPERATION: - CHECK_EXPECT(Obj_OnProgress_BEGINSYNCOPERATION); - if(iface != &objbsc) - ok(0, "unexpected call\n"); - ok(szStatusText == NULL, "Expected szStatusText to be NULL\n"); - break; - case BINDSTATUS_ENDSYNCOPERATION: - CHECK_EXPECT(Obj_OnProgress_ENDSYNCOPERATION); - if(iface != &objbsc) - ok(0, "unexpected call\n"); - ok(szStatusText == NULL, "Expected szStatusText to be NULL\n"); - break; - case BINDSTATUS_PROXYDETECTING: - trace("BINDSTATUS_PROXYDETECTING\n"); - break; - case BINDSTATUS_COOKIE_SENT: - trace("BINDSTATUS_COOKIE_SENT\n"); - break; - default: - ok(0, "unexpected code %d\n", ulStatusCode); - }; - - if(current_binding) { - IWinInetHttpInfo *http_info; - HRESULT hres; - - hres = IBinding_QueryInterface(current_binding, &IID_IWinInetHttpInfo, (void**)&http_info); - if(!emulate_protocol && test_protocol != FILE_TEST && is_urlmon_protocol(test_protocol)) { - ok(hres == S_OK, "Could not get IWinInetHttpInfo iface: %08x\n", hres); - test_WinInetHttpInfo(http_info, ulStatusCode); - } else - ok(hres == E_NOINTERFACE, - "QueryInterface(IID_IWinInetHttpInfo) returned: %08x, expected E_NOINTERFACE\n", hres); - if(SUCCEEDED(hres)) - IWinInetHttpInfo_Release(http_info); - } - - return S_OK; -} - -static HRESULT WINAPI statusclb_OnStopBinding(IBindStatusCallbackEx *iface, HRESULT hresult, LPCWSTR szError) -{ - if(iface == &objbsc) { - CHECK_EXPECT(Obj_OnStopBinding); - stopped_obj_binding = TRUE; - }else { - CHECK_EXPECT(OnStopBinding); - stopped_binding = TRUE; - } - - ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId()); - - if(only_check_prot_args) { - todo_wine ok(hresult == S_OK, "Got %08x\n", hresult); - return S_OK; - } - - /* ignore DNS failure */ - if (hresult == HRESULT_FROM_WIN32(ERROR_INTERNET_NAME_NOT_RESOLVED)) - return S_OK; - - if(filedwl_api) { - if(!abort_progress && !abort_start) - ok(SUCCEEDED(hresult), "binding failed: %08x\n", hresult); - else if(abort_start && abort_hres == E_NOTIMPL) - todo_wine ok(hresult == S_FALSE, "binding failed: %08x, expected S_FALSE\n", hresult); - else - ok(hresult == E_ABORT, "binding failed: %08x, expected E_ABORT\n", hresult); - } else - ok(hresult == binding_hres, "binding failed: %08x, expected %08x\n", hresult, binding_hres); - ok(szError == NULL, "szError should be NULL\n"); - - if((test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST) && emulate_protocol) { - SetEvent(complete_event); - if(iface != &objbsc) - WaitForSingleObject(complete_event2, INFINITE); - } - - return S_OK; -} - -static HRESULT WINAPI statusclb_GetBindInfo(IBindStatusCallbackEx *iface, DWORD *grfBINDF, BINDINFO *pbindinfo) -{ - DWORD cbSize; - - if(iface == &objbsc) - CHECK_EXPECT(Obj_GetBindInfo); - else - CHECK_EXPECT(GetBindInfo); - - ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId()); - - *grfBINDF = bindf; - cbSize = pbindinfo->cbSize; - memset(pbindinfo, 0, cbSize); - pbindinfo->cbSize = cbSize; - - return S_OK; -} - -static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallbackEx *iface, DWORD grfBSCF, - DWORD dwSize, FORMATETC* pformatetc, STGMEDIUM* pstgmed) -{ - HRESULT hres; - DWORD readed; - BYTE buf[512]; - CHAR clipfmt[512]; - - if(iface == &objbsc) - ok(0, "unexpected call\n"); - - CHECK_EXPECT2(OnDataAvailable); - - ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId()); - - ok(download_state == DOWNLOADING || download_state == END_DOWNLOAD, - "Download state was %d, expected DOWNLOADING or END_DOWNLOAD\n", - download_state); - data_available = TRUE; - - if(bind_to_object && !is_async_prot) - ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION|BSCF_LASTDATANOTIFICATION), "grfBSCF = %x\n", grfBSCF); - - ok(pformatetc != NULL, "pformatetx == NULL\n"); - if(pformatetc) { - if (mime_type[0]) { - INT ret; - clipfmt[0] = 0; - ret = GetClipboardFormatName(pformatetc->cfFormat, clipfmt, sizeof(clipfmt)-1); - ok(ret, "GetClipboardFormatName failed, error %d\n", GetLastError()); - ok(!lstrcmp(clipfmt, mime_type), "clipformat %x != mime_type, \"%s\" != \"%s\"\n", - pformatetc->cfFormat, clipfmt, mime_type); - } else { - ok(pformatetc->cfFormat == 0, "clipformat=%x\n", pformatetc->cfFormat); - } - ok(pformatetc->ptd == NULL, "ptd = %p\n", pformatetc->ptd); - ok(pformatetc->dwAspect == 1, "dwAspect=%u\n", pformatetc->dwAspect); - ok(pformatetc->lindex == -1, "lindex=%d\n", pformatetc->lindex); - ok(pformatetc->tymed == tymed, "tymed=%u, expected %u\n", pformatetc->tymed, tymed); - } - - ok(pstgmed != NULL, "stgmeg == NULL\n"); - ok(pstgmed->tymed == tymed, "tymed=%u, expected %u\n", pstgmed->tymed, tymed); - ok(pstgmed->pUnkForRelease != NULL, "pUnkForRelease == NULL\n"); - - switch(pstgmed->tymed) { - case TYMED_ISTREAM: - if(grfBSCF & BSCF_FIRSTDATANOTIFICATION) { - STATSTG stat; - - hres = IStream_Write(U(*pstgmed).pstm, buf, 10, NULL); - ok(hres == STG_E_ACCESSDENIED, - "Write failed: %08x, expected STG_E_ACCESSDENIED\n", hres); - - hres = IStream_Commit(U(*pstgmed).pstm, 0); - ok(hres == E_NOTIMPL, "Commit failed: %08x, expected E_NOTIMPL\n", hres); - - hres = IStream_Revert(U(*pstgmed).pstm); - ok(hres == E_NOTIMPL, "Revert failed: %08x, expected E_NOTIMPL\n", hres); - - hres = IStream_Stat(U(*pstgmed).pstm, NULL, STATFLAG_NONAME); - ok(hres == E_FAIL, "hres = %x\n", hres); - if(use_cache_file && emulate_protocol) { - hres = IStream_Stat(U(*pstgmed).pstm, &stat, STATFLAG_DEFAULT); - ok(hres == S_OK, "hres = %x\n", hres); - ok(!lstrcmpW(stat.pwcsName, cache_file_name), - "stat.pwcsName = %s, cache_file_name = %s\n", - wine_dbgstr_w(stat.pwcsName), wine_dbgstr_w(cache_file_name)); - CoTaskMemFree(stat.pwcsName); - ok(U(stat.cbSize).LowPart == (bindf&BINDF_ASYNCHRONOUS?0:6500), - "stat.cbSize.LowPart = %u\n", U(stat.cbSize).LowPart); - } else { - hres = IStream_Stat(U(*pstgmed).pstm, &stat, STATFLAG_NONAME); - ok(hres == S_OK, "hres = %x\n", hres); - ok(!stat.pwcsName || broken(stat.pwcsName!=NULL), - "stat.pwcsName = %s\n", wine_dbgstr_w(stat.pwcsName)); - } - ok(stat.type == STGTY_STREAM, "stat.type = %x\n", stat.type); - ok(U(stat.cbSize).HighPart == 0, "stat.cbSize.HighPart != 0\n"); - ok(stat.grfMode == (U(stat.cbSize).LowPart?GENERIC_READ:0), "stat.grfMode = %x\n", stat.grfMode); - ok(stat.grfLocksSupported == 0, "stat.grfLocksSupported = %x\n", stat.grfLocksSupported); - ok(stat.grfStateBits == 0, "stat.grfStateBits = %x\n", stat.grfStateBits); - ok(stat.reserved == 0, "stat.reserved = %x\n", stat.reserved); - } - - ok(U(*pstgmed).pstm != NULL, "U(*pstgmed).pstm == NULL\n"); - if(callback_read) { - do { - hres = IStream_Read(U(*pstgmed).pstm, buf, 512, &readed); - if(test_protocol == HTTP_TEST && emulate_protocol && readed) - ok(buf[0] == (use_cache_file && !(bindf&BINDF_ASYNCHRONOUS) ? 'X' : '?'), "buf[0] = '%c'\n", buf[0]); - }while(hres == S_OK); - ok(hres == S_FALSE || hres == E_PENDING, "IStream_Read returned %08x\n", hres); - } - break; - - case TYMED_FILE: - if(test_protocol == FILE_TEST) - ok(!lstrcmpW(pstgmed->u.lpszFileName, INDEX_HTML+7), - "unexpected file name %s\n", wine_dbgstr_w(pstgmed->u.lpszFileName)); - else if(emulate_protocol) - ok(!lstrcmpW(pstgmed->u.lpszFileName, cache_fileW), - "unexpected file name %s\n", wine_dbgstr_w(pstgmed->u.lpszFileName)); - else - ok(pstgmed->u.lpszFileName != NULL, "lpszFileName == NULL\n"); - } - - if((test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST) - && emulate_protocol && prot_state < 4 && (!bind_to_object || prot_state > 1)) - SetEvent(complete_event); - - return S_OK; -} - -static HRESULT WINAPI statusclb_OnObjectAvailable(IBindStatusCallbackEx *iface, REFIID riid, IUnknown *punk) -{ - CHECK_EXPECT(OnObjectAvailable); - - if(iface != &objbsc) - ok(0, "unexpected call\n"); - - ok(IsEqualGUID(&IID_IUnknown, riid), "riid = %s\n", debugstr_guid(riid)); - ok(punk != NULL, "punk == NULL\n"); - - return S_OK; -} - -static HRESULT WINAPI statusclb_GetBindInfoEx(IBindStatusCallbackEx *iface, DWORD *grfBINDF, BINDINFO *pbindinfo, - DWORD *grfBINDF2, DWORD *pdwReserved) -{ - CHECK_EXPECT(GetBindInfoEx); - - ok(grfBINDF != NULL, "grfBINDF == NULL\n"); - ok(grfBINDF2 != NULL, "grfBINDF2 == NULL\n"); - ok(pbindinfo != NULL, "pbindinfo == NULL\n"); - ok(pdwReserved != NULL, "dwReserved == NULL\n"); - - return S_OK; -} - -static const IBindStatusCallbackExVtbl BindStatusCallbackVtbl = { - statusclb_QueryInterface, - statusclb_AddRef, - statusclb_Release, - statusclb_OnStartBinding, - statusclb_GetPriority, - statusclb_OnLowResource, - statusclb_OnProgress, - statusclb_OnStopBinding, - statusclb_GetBindInfo, - statusclb_OnDataAvailable, - statusclb_OnObjectAvailable, - statusclb_GetBindInfoEx -}; - -static IBindStatusCallbackEx bsc = { &BindStatusCallbackVtbl }; -static IBindStatusCallbackEx bsc2 = { &BindStatusCallbackVtbl }; -static IBindStatusCallbackEx objbsc = { &BindStatusCallbackVtbl }; - -static HRESULT WINAPI MonikerProp_QueryInterface(IMonikerProp *iface, REFIID riid, void **ppv) -{ - *ppv = NULL; - ok(0, "unexpected riid %s\n", debugstr_guid(riid)); - return E_NOINTERFACE; -} - -static ULONG WINAPI MonikerProp_AddRef(IMonikerProp *iface) -{ - return 2; -} - -static ULONG WINAPI MonikerProp_Release(IMonikerProp *iface) -{ - return 1; -} - -static HRESULT WINAPI MonikerProp_PutProperty(IMonikerProp *iface, MONIKERPROPERTY mkp, LPCWSTR val) -{ - switch(mkp) { - case MIMETYPEPROP: - CHECK_EXPECT(PutProperty_MIMETYPEPROP); - ok(!lstrcmpW(val, wszTextHtml), "val = %s\n", wine_dbgstr_w(val)); - break; - case CLASSIDPROP: - CHECK_EXPECT(PutProperty_CLASSIDPROP); - break; - default: - break; - } - - return S_OK; -} - -static const IMonikerPropVtbl MonikerPropVtbl = { - MonikerProp_QueryInterface, - MonikerProp_AddRef, - MonikerProp_Release, - MonikerProp_PutProperty -}; - -static IMonikerProp MonikerProp = { &MonikerPropVtbl }; - -static HRESULT WINAPI PersistMoniker_QueryInterface(IPersistMoniker *iface, REFIID riid, void **ppv) -{ - *ppv = NULL; - - if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IPersistMoniker, riid)) - *ppv = iface; - else if(IsEqualGUID(&IID_IMonikerProp, riid)) - *ppv = &MonikerProp; - - if(*ppv) - return S_OK; - - ok(0, "unexpected riid %s\n", debugstr_guid(riid)); - return E_NOINTERFACE; -} - -static ULONG WINAPI PersistMoniker_AddRef(IPersistMoniker *iface) -{ - return 2; -} - -static ULONG WINAPI PersistMoniker_Release(IPersistMoniker *iface) -{ - return 1; -} - -static HRESULT WINAPI PersistMoniker_GetClassID(IPersistMoniker *iface, CLSID *pClassID) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI PersistMoniker_IsDirty(IPersistMoniker *iface) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAvailable, - IMoniker *pimkName, LPBC pibc, DWORD grfMode) -{ - IUnknown *unk; - HRESULT hres; - - static WCHAR cbinding_contextW[] = - {'C','B','i','n','d','i','n','g',' ','C','o','n','t','e','x','t',0}; - - CHECK_EXPECT(Load); - ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId()); - - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST) - ok(!fFullyAvailable, "fFulyAvailable = %x\n", fFullyAvailable); - else - ok(fFullyAvailable, "fFulyAvailable = %x\n", fFullyAvailable); - ok(pimkName != NULL, "pimkName == NULL\n"); - ok(pibc != NULL, "pibc == NULL\n"); - ok(grfMode == 0x12, "grfMode = %x\n", grfMode); - - hres = IBindCtx_GetObjectParam(pibc, cbinding_contextW, &unk); - ok(hres == S_OK, "GetObjectParam(CBinding Context) failed: %08x\n", hres); - if(SUCCEEDED(hres)) { - IBinding *binding; - - hres = IUnknown_QueryInterface(unk, &IID_IBinding, (void**)&binding); - ok(hres == S_OK, "Could not get IBinding: %08x\n", hres); - - IBinding_Release(binding); - IUnknown_Release(unk); - } - - SET_EXPECT(QueryInterface_IServiceProvider); - hres = RegisterBindStatusCallback(pibc, (IBindStatusCallback*)&bsc, NULL, 0); - ok(hres == S_OK, "RegisterBindStatusCallback failed: %08x\n", hres); - CHECK_CALLED(QueryInterface_IServiceProvider); - - SET_EXPECT(QueryInterface_IBindStatusCallbackEx); - SET_EXPECT(GetBindInfo); - SET_EXPECT(OnStartBinding); - if(test_redirect) - SET_EXPECT(OnProgress_REDIRECTING); - SET_EXPECT(OnProgress_BEGINDOWNLOADDATA); - if(test_protocol == FILE_TEST) - SET_EXPECT(OnProgress_CACHEFILENAMEAVAILABLE); - if(test_protocol != HTTP_TEST && test_protocol != HTTPS_TEST) - SET_EXPECT(OnProgress_ENDDOWNLOADDATA); - SET_EXPECT(LockRequest); - SET_EXPECT(OnDataAvailable); - if(test_protocol != HTTP_TEST && test_protocol != HTTPS_TEST) - SET_EXPECT(OnStopBinding); - - hres = IMoniker_BindToStorage(pimkName, pibc, NULL, &IID_IStream, (void**)&unk); - ok(hres == S_OK, "Load failed: %08x\n", hres); - - CLEAR_CALLED(QueryInterface_IBindStatusCallbackEx); /* IE 8 */ - CHECK_CALLED(GetBindInfo); - CHECK_CALLED(OnStartBinding); - if(test_redirect) - CHECK_CALLED(OnProgress_REDIRECTING); - CHECK_CALLED(OnProgress_BEGINDOWNLOADDATA); - if(test_protocol == FILE_TEST) - CHECK_CALLED(OnProgress_CACHEFILENAMEAVAILABLE); - if(test_protocol != HTTP_TEST && test_protocol != HTTPS_TEST) - CHECK_CALLED(OnProgress_ENDDOWNLOADDATA); - CHECK_CALLED(LockRequest); - CHECK_CALLED(OnDataAvailable); - if(test_protocol != HTTP_TEST && test_protocol != HTTPS_TEST) - CHECK_CALLED(OnStopBinding); - - if(unk) - IUnknown_Release(unk); - - return S_OK; -} - -static HRESULT WINAPI PersistMoniker_Save(IPersistMoniker *iface, IMoniker *pimkName, LPBC pbc, BOOL fRemember) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI PersistMoniker_SaveCompleted(IPersistMoniker *iface, IMoniker *pimkName, LPBC pibc) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI PersistMoniker_GetCurMoniker(IPersistMoniker *iface, IMoniker **pimkName) -{ - ok(0, "unexpected call\n"); - return E_NOTIMPL; -} - -static const IPersistMonikerVtbl PersistMonikerVtbl = { - PersistMoniker_QueryInterface, - PersistMoniker_AddRef, - PersistMoniker_Release, - PersistMoniker_GetClassID, - PersistMoniker_IsDirty, - PersistMoniker_Load, - PersistMoniker_Save, - PersistMoniker_SaveCompleted, - PersistMoniker_GetCurMoniker -}; - -static IPersistMoniker PersistMoniker = { &PersistMonikerVtbl }; - -static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv) -{ - *ppv = NULL; - - if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IClassFactory, riid)) { - *ppv = iface; - return S_OK; - } - - if(IsEqualGUID(&IID_IMarshal, riid)) - return E_NOINTERFACE; - if(IsEqualGUID(&CLSID_IdentityUnmarshal, riid)) - return E_NOINTERFACE; - - ok(0, "unexpected riid %s\n", debugstr_guid(riid)); - return E_NOTIMPL; -} - -static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface) -{ - return 2; -} - -static ULONG WINAPI ClassFactory_Release(IClassFactory *iface) -{ - return 1; -} - -static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) -{ - CHECK_EXPECT(CreateInstance); - ok(!outer, "outer = %p\n", outer); - ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", debugstr_guid(riid)); - *ppv = &PersistMoniker; - return S_OK; -} - -static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL dolock) -{ - ok(0, "unexpected call\n"); - return S_OK; -} - -static const IClassFactoryVtbl ClassFactoryVtbl = { - ClassFactory_QueryInterface, - ClassFactory_AddRef, - ClassFactory_Release, - ClassFactory_CreateInstance, - ClassFactory_LockServer -}; - -static IClassFactory mime_cf = { &ClassFactoryVtbl }; - -static HRESULT WINAPI ProtocolCF_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv) -{ - *ppv = NULL; - - if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IClassFactory, riid)) { - *ppv = iface; - return S_OK; - } - - if(IsEqualGUID(&IID_IInternetProtocolInfo, riid)) - return E_NOINTERFACE; - - ok(0, "unexpected riid %s\n", debugstr_guid(riid)); - return E_NOTIMPL; -} - -static HRESULT WINAPI ProtocolCF_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) -{ - if(IsEqualGUID(&IID_IInternetProtocolInfo, riid)) - return E_NOINTERFACE; - - todo_wine ok(outer != NULL, "outer == NULL\n"); - todo_wine ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", debugstr_guid(riid)); - *ppv = &Protocol; - return S_OK; -} - -static const IClassFactoryVtbl ProtocolCFVtbl = { - ProtocolCF_QueryInterface, - ClassFactory_AddRef, - ClassFactory_Release, - ProtocolCF_CreateInstance, - ClassFactory_LockServer -}; - -static IClassFactory protocol_cf = { &ProtocolCFVtbl }; - -static void test_CreateAsyncBindCtx(void) -{ - IBindCtx *bctx = (IBindCtx*)0x0ff00ff0; - IUnknown *unk; - HRESULT hres; - ULONG ref; - BIND_OPTS bindopts; - - hres = CreateAsyncBindCtx(0, NULL, NULL, &bctx); - ok(hres == E_INVALIDARG, "CreateAsyncBindCtx failed. expected: E_INVALIDARG, got: %08x\n", hres); - ok(bctx == (IBindCtx*)0x0ff00ff0, "bctx should not be changed\n"); - - hres = CreateAsyncBindCtx(0, NULL, NULL, NULL); - ok(hres == E_INVALIDARG, "CreateAsyncBindCtx failed. expected: E_INVALIDARG, got: %08x\n", hres); - - SET_EXPECT(QueryInterface_IServiceProvider); - hres = CreateAsyncBindCtx(0, (IBindStatusCallback*)&bsc, NULL, &bctx); - ok(hres == S_OK, "CreateAsyncBindCtx failed: %08x\n", hres); - CHECK_CALLED(QueryInterface_IServiceProvider); - - bindopts.cbStruct = sizeof(bindopts); - hres = IBindCtx_GetBindOptions(bctx, &bindopts); - ok(hres == S_OK, "IBindCtx_GetBindOptions failed: %08x\n", hres); - ok(bindopts.grfFlags == BIND_MAYBOTHERUSER, - "bindopts.grfFlags = %08x, expected: BIND_MAYBOTHERUSER\n", bindopts.grfFlags); - ok(bindopts.grfMode == (STGM_READWRITE | STGM_SHARE_EXCLUSIVE), - "bindopts.grfMode = %08x, expected: STGM_READWRITE | STGM_SHARE_EXCLUSIVE\n", - bindopts.grfMode); - ok(bindopts.dwTickCountDeadline == 0, - "bindopts.dwTickCountDeadline = %08x, expected: 0\n", bindopts.dwTickCountDeadline); - - hres = IBindCtx_QueryInterface(bctx, &IID_IAsyncBindCtx, (void**)&unk); - ok(hres == E_NOINTERFACE, "QueryInterface(IID_IAsyncBindCtx) failed: %08x, expected E_NOINTERFACE\n", hres); - if(SUCCEEDED(hres)) - IUnknown_Release(unk); - - ref = IBindCtx_Release(bctx); - ok(ref == 0, "bctx should be destroyed here\n"); -} - -static void test_CreateAsyncBindCtxEx(void) -{ - IBindCtx *bctx = NULL, *bctx2 = NULL, *bctx_arg = NULL; - IUnknown *unk; - BIND_OPTS bindopts; - HRESULT hres; - - static WCHAR testW[] = {'t','e','s','t',0}; - - if (!pCreateAsyncBindCtxEx) { - win_skip("CreateAsyncBindCtxEx not present\n"); - return; - } - - hres = pCreateAsyncBindCtxEx(NULL, 0, NULL, NULL, NULL, 0); - ok(hres == E_INVALIDARG, "CreateAsyncBindCtx failed: %08x, expected E_INVALIDARG\n", hres); - - hres = pCreateAsyncBindCtxEx(NULL, 0, NULL, NULL, &bctx, 0); - ok(hres == S_OK, "CreateAsyncBindCtxEx failed: %08x\n", hres); - - if(SUCCEEDED(hres)) { - bindopts.cbStruct = sizeof(bindopts); - hres = IBindCtx_GetBindOptions(bctx, &bindopts); - ok(hres == S_OK, "IBindCtx_GetBindOptions failed: %08x\n", hres); - ok(bindopts.grfFlags == BIND_MAYBOTHERUSER, - "bindopts.grfFlags = %08x, expected: BIND_MAYBOTHERUSER\n", bindopts.grfFlags); - ok(bindopts.grfMode == (STGM_READWRITE | STGM_SHARE_EXCLUSIVE), - "bindopts.grfMode = %08x, expected: STGM_READWRITE | STGM_SHARE_EXCLUSIVE\n", - bindopts.grfMode); - ok(bindopts.dwTickCountDeadline == 0, - "bindopts.dwTickCountDeadline = %08x, expected: 0\n", bindopts.dwTickCountDeadline); - - IBindCtx_Release(bctx); - } - - CreateBindCtx(0, &bctx_arg); - hres = pCreateAsyncBindCtxEx(NULL, 0, NULL, NULL, &bctx, 0); - ok(hres == S_OK, "CreateAsyncBindCtxEx failed: %08x\n", hres); - - if(SUCCEEDED(hres)) { - bindopts.cbStruct = sizeof(bindopts); - hres = IBindCtx_GetBindOptions(bctx, &bindopts); - ok(hres == S_OK, "IBindCtx_GetBindOptions failed: %08x\n", hres); - ok(bindopts.grfFlags == BIND_MAYBOTHERUSER, - "bindopts.grfFlags = %08x, expected: BIND_MAYBOTHERUSER\n", bindopts.grfFlags); - ok(bindopts.grfMode == (STGM_READWRITE | STGM_SHARE_EXCLUSIVE), - "bindopts.grfMode = %08x, expected: STGM_READWRITE | STGM_SHARE_EXCLUSIVE\n", - bindopts.grfMode); - ok(bindopts.dwTickCountDeadline == 0, - "bindopts.dwTickCountDeadline = %08x, expected: 0\n", bindopts.dwTickCountDeadline); - - IBindCtx_Release(bctx); - } - - IBindCtx_Release(bctx_arg); - - SET_EXPECT(QueryInterface_IServiceProvider); - hres = pCreateAsyncBindCtxEx(NULL, 0, (IBindStatusCallback*)&bsc, NULL, &bctx, 0); - ok(hres == S_OK, "CreateAsyncBindCtxEx failed: %08x\n", hres); - CHECK_CALLED(QueryInterface_IServiceProvider); - - hres = IBindCtx_QueryInterface(bctx, &IID_IAsyncBindCtx, (void**)&unk); - ok(hres == S_OK, "QueryInterface(IID_IAsyncBindCtx) failed: %08x\n", hres); - if(SUCCEEDED(hres)) - IUnknown_Release(unk); - - IBindCtx_Release(bctx); - - hres = CreateBindCtx(0, &bctx2); - ok(hres == S_OK, "CreateBindCtx failed: %08x\n", hres); - - hres = pCreateAsyncBindCtxEx(bctx2, 0, NULL, NULL, &bctx, 0); - ok(hres == S_OK, "CreateAsyncBindCtxEx failed: %08x\n", hres); - - hres = IBindCtx_RegisterObjectParam(bctx2, testW, (IUnknown*)&Protocol); - ok(hres == S_OK, "RegisterObjectParam failed: %08x\n", hres); - - hres = IBindCtx_GetObjectParam(bctx, testW, &unk); - ok(hres == S_OK, "GetObjectParam failed: %08x\n", hres); - ok(unk == (IUnknown*)&Protocol, "unexpected unk %p\n", unk); - - IBindCtx_Release(bctx); - IBindCtx_Release(bctx2); -} - -static void test_GetBindInfoEx(IBindStatusCallback *holder) -{ - IBindStatusCallbackEx *bscex; - BINDINFO bindinfo = {sizeof(bindinfo)}; - DWORD bindf, bindf2, dw; - HRESULT hres; - - hres = IBindStatusCallback_QueryInterface(holder, &IID_IBindStatusCallbackEx, (void**)&bscex); - if(FAILED(hres)) { - win_skip("IBindStatusCallbackEx not supported\n"); - return; - } - - use_bscex = TRUE; - - bindf = 0; - SET_EXPECT(QueryInterface_IBindStatusCallbackEx); - SET_EXPECT(GetBindInfoEx); - hres = IBindStatusCallback_GetBindInfo(holder, &bindf, &bindinfo); - ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); - CHECK_CALLED(QueryInterface_IBindStatusCallbackEx); - CHECK_CALLED(GetBindInfoEx); - - bindf = bindf2 = dw = 0; - SET_EXPECT(QueryInterface_IBindStatusCallbackEx); - SET_EXPECT(GetBindInfoEx); - hres = IBindStatusCallbackEx_GetBindInfoEx(bscex, &bindf, &bindinfo, &bindf2, &dw); - ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); - CHECK_CALLED(QueryInterface_IBindStatusCallbackEx); - CHECK_CALLED(GetBindInfoEx); - - use_bscex = FALSE; - - bindf = bindf2 = dw = 0xdeadbeef; - SET_EXPECT(QueryInterface_IBindStatusCallbackEx); - SET_EXPECT(GetBindInfo); - hres = IBindStatusCallbackEx_GetBindInfoEx(bscex, &bindf, &bindinfo, &bindf2, &dw); - ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); - CHECK_CALLED(QueryInterface_IBindStatusCallbackEx); - CHECK_CALLED(GetBindInfo); - ok(bindf2 == 0xdeadbeef, "bindf2 = %x\n", bindf2); - ok(dw == 0xdeadbeef, "dw = %x\n", dw); - - IBindStatusCallbackEx_Release(bscex); -} - -static BOOL test_bscholder(IBindStatusCallback *holder) -{ - IServiceProvider *serv_prov; - IHttpNegotiate *http_negotiate, *http_negotiate_serv; - IHttpNegotiate2 *http_negotiate2, *http_negotiate2_serv; - IAuthenticate *authenticate, *authenticate_serv; - IInternetProtocol *protocol; - BINDINFO bindinfo = {sizeof(bindinfo)}; - BOOL ret = TRUE; - LPWSTR wstr; - DWORD dw; - HRESULT hres; - - hres = IBindStatusCallback_QueryInterface(holder, &IID_IServiceProvider, (void**)&serv_prov); - ok(hres == S_OK, "Could not get IServiceProvider interface: %08x\n", hres); - - dw = 0xdeadbeef; - SET_EXPECT(QueryInterface_IBindStatusCallbackEx); - SET_EXPECT(GetBindInfo); - hres = IBindStatusCallback_GetBindInfo(holder, &dw, &bindinfo); - ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres); - CLEAR_CALLED(QueryInterface_IBindStatusCallbackEx); /* IE 8 */ - CHECK_CALLED(GetBindInfo); - - test_GetBindInfoEx(holder); - - SET_EXPECT(OnStartBinding); - hres = IBindStatusCallback_OnStartBinding(holder, 0, (void*)0xdeadbeef); - ok(hres == S_OK, "OnStartBinding failed: %08x\n", hres); - CHECK_CALLED(OnStartBinding); - - hres = IBindStatusCallback_QueryInterface(holder, &IID_IHttpNegotiate, (void**)&http_negotiate); - ok(hres == S_OK, "Could not get IHttpNegotiate interface: %08x\n", hres); - - SET_EXPECT(QueryInterface_IHttpNegotiate); - hres = IServiceProvider_QueryService(serv_prov, &IID_IHttpNegotiate, &IID_IHttpNegotiate, - (void**)&http_negotiate_serv); - ok(hres == S_OK, "Could not get IHttpNegotiate service: %08x\n", hres); - CLEAR_CALLED(QueryInterface_IHttpNegotiate); /* IE <8 */ - - ok(http_negotiate == http_negotiate_serv, "http_negotiate != http_negotiate_serv\n"); - - wstr = (void*)0xdeadbeef; - SET_EXPECT(QueryInterface_IHttpNegotiate); - SET_EXPECT(BeginningTransaction); - hres = IHttpNegotiate_BeginningTransaction(http_negotiate_serv, urls[test_protocol], emptyW, 0, &wstr); - CHECK_CALLED_BROKEN(QueryInterface_IHttpNegotiate); /* IE8 */ - CHECK_CALLED(BeginningTransaction); - ok(hres == S_OK, "BeginningTransaction failed: %08x\n", hres); - ok(wstr == NULL, "wstr = %p\n", wstr); - - IHttpNegotiate_Release(http_negotiate_serv); - - hres = IServiceProvider_QueryService(serv_prov, &IID_IHttpNegotiate, &IID_IHttpNegotiate, - (void**)&http_negotiate_serv); - ok(hres == S_OK, "Could not get IHttpNegotiate service: %08x\n", hres); - ok(http_negotiate == http_negotiate_serv, "http_negotiate != http_negotiate_serv\n"); - IHttpNegotiate_Release(http_negotiate_serv); - - hres = IBindStatusCallback_QueryInterface(holder, &IID_IHttpNegotiate2, (void**)&http_negotiate2); - if(SUCCEEDED(hres)) { - have_IHttpNegotiate2 = TRUE; - - SET_EXPECT(QueryInterface_IHttpNegotiate2); - hres = IServiceProvider_QueryService(serv_prov, &IID_IHttpNegotiate2, &IID_IHttpNegotiate2, - (void**)&http_negotiate2_serv); - ok(hres == S_OK, "Could not get IHttpNegotiate2 service: %08x\n", hres); - CLEAR_CALLED(QueryInterface_IHttpNegotiate2); /* IE <8 */ - ok(http_negotiate2 == http_negotiate2_serv, "http_negotiate != http_negotiate_serv\n"); - - SET_EXPECT(QueryInterface_IHttpNegotiate2); - SET_EXPECT(GetRootSecurityId); - hres = IHttpNegotiate2_GetRootSecurityId(http_negotiate2, (void*)0xdeadbeef, (void*)0xdeadbeef, 0); - ok(hres == E_NOTIMPL, "GetRootSecurityId failed: %08x\n", hres); - CHECK_CALLED_BROKEN(QueryInterface_IHttpNegotiate2); /* IE8 */ - CHECK_CALLED(GetRootSecurityId); - - IHttpNegotiate_Release(http_negotiate2_serv); - IHttpNegotiate_Release(http_negotiate2); - }else { - skip("Could not get IHttpNegotiate2\n"); - ret = FALSE; - } - - SET_EXPECT(OnProgress_FINDINGRESOURCE); - hres = IBindStatusCallback_OnProgress(holder, 0, 0, BINDSTATUS_FINDINGRESOURCE, NULL); - ok(hres == S_OK, "OnProgress failed: %08x\n", hres); - CHECK_CALLED(OnProgress_FINDINGRESOURCE); - - SET_EXPECT(QueryInterface_IHttpNegotiate); - SET_EXPECT(OnResponse); - wstr = (void*)0xdeadbeef; - hres = IHttpNegotiate_OnResponse(http_negotiate, 200, emptyW, NULL, NULL); - ok(hres == S_OK, "OnResponse failed: %08x\n", hres); - CHECK_CALLED_BROKEN(QueryInterface_IHttpNegotiate); /* IE8 */ - CHECK_CALLED(OnResponse); - - IHttpNegotiate_Release(http_negotiate); - - hres = IBindStatusCallback_QueryInterface(holder, &IID_IAuthenticate, (void**)&authenticate); - ok(hres == S_OK, "Could not get IAuthenticate interface: %08x\n", hres); - - SET_EXPECT(QueryInterface_IAuthenticate); - SET_EXPECT(QueryService_IAuthenticate); - hres = IServiceProvider_QueryService(serv_prov, &IID_IAuthenticate, &IID_IAuthenticate, - (void**)&authenticate_serv); - ok(hres == S_OK, "Could not get IAuthenticate service: %08x\n", hres); - CLEAR_CALLED(QueryInterface_IAuthenticate); /* IE <8 */ - CLEAR_CALLED(QueryService_IAuthenticate); /* IE <8 */ - ok(authenticate == authenticate_serv, "authenticate != authenticate_serv\n"); - IAuthenticate_Release(authenticate_serv); - - hres = IServiceProvider_QueryService(serv_prov, &IID_IAuthenticate, &IID_IAuthenticate, - (void**)&authenticate_serv); - ok(hres == S_OK, "Could not get IAuthenticate service: %08x\n", hres); - ok(authenticate == authenticate_serv, "authenticate != authenticate_serv\n"); - - IAuthenticate_Release(authenticate); - IAuthenticate_Release(authenticate_serv); - - SET_EXPECT(OnStopBinding); - hres = IBindStatusCallback_OnStopBinding(holder, S_OK, NULL); - ok(hres == S_OK, "OnStopBinding failed: %08x\n", hres); - CHECK_CALLED(OnStopBinding); - - SET_EXPECT(QueryInterface_IInternetProtocol); - SET_EXPECT(QueryService_IInternetProtocol); - hres = IServiceProvider_QueryService(serv_prov, &IID_IInternetProtocol, &IID_IInternetProtocol, - (void**)&protocol); - ok(hres == E_NOINTERFACE, "QueryService(IInternetProtocol) failed: %08x\n", hres); - CHECK_CALLED(QueryInterface_IInternetProtocol); - CHECK_CALLED(QueryService_IInternetProtocol); - - IServiceProvider_Release(serv_prov); - return ret; -} - -static BOOL test_RegisterBindStatusCallback(void) -{ - IBindStatusCallback *prevbsc, *clb, *prev_clb; - IBindCtx *bindctx; - BOOL ret = TRUE; - IUnknown *unk; - HRESULT hres; - - hres = CreateBindCtx(0, &bindctx); - ok(hres == S_OK, "BindCtx failed: %08x\n", hres); - - SET_EXPECT(QueryInterface_IServiceProvider); - - hres = IBindCtx_RegisterObjectParam(bindctx, BSCBHolder, (IUnknown*)&bsc); - ok(hres == S_OK, "RegisterObjectParam failed: %08x\n", hres); - - SET_EXPECT(QueryInterface_IBindStatusCallback); - SET_EXPECT(QueryInterface_IBindStatusCallbackHolder); - prevbsc = (void*)0xdeadbeef; - hres = RegisterBindStatusCallback(bindctx, (IBindStatusCallback*)&bsc, &prevbsc, 0); - ok(hres == S_OK, "RegisterBindStatusCallback failed: %08x\n", hres); - ok(prevbsc == (IBindStatusCallback*)&bsc, "prevbsc=%p\n", prevbsc); - CHECK_CALLED(QueryInterface_IBindStatusCallback); - CHECK_CALLED(QueryInterface_IBindStatusCallbackHolder); - - CHECK_CALLED(QueryInterface_IServiceProvider); - - hres = IBindCtx_GetObjectParam(bindctx, BSCBHolder, &unk); - ok(hres == S_OK, "GetObjectParam failed: %08x\n", hres); - - hres = IUnknown_QueryInterface(unk, &IID_IBindStatusCallback, (void**)&clb); - IUnknown_Release(unk); - ok(hres == S_OK, "QueryInterface(IID_IBindStatusCallback) failed: %08x\n", hres); - ok(clb != (IBindStatusCallback*)&bsc, "bsc == clb\n"); - - if(!test_bscholder(clb)) - ret = FALSE; - - IBindStatusCallback_Release(clb); - - hres = RevokeBindStatusCallback(bindctx, (IBindStatusCallback*)&bsc); - ok(hres == S_OK, "RevokeBindStatusCallback failed: %08x\n", hres); - - unk = (void*)0xdeadbeef; - hres = IBindCtx_GetObjectParam(bindctx, BSCBHolder, &unk); - ok(hres == E_FAIL, "GetObjectParam failed: %08x\n", hres); - ok(unk == NULL, "unk != NULL\n"); - - if(unk) - IUnknown_Release(unk); - - hres = RevokeBindStatusCallback(bindctx, (void*)0xdeadbeef); - ok(hres == S_OK, "RevokeBindStatusCallback failed: %08x\n", hres); - - hres = RevokeBindStatusCallback(NULL, (void*)0xdeadbeef); - ok(hres == E_INVALIDARG, "RevokeBindStatusCallback failed: %08x\n", hres); - - hres = RevokeBindStatusCallback(bindctx, NULL); - ok(hres == E_INVALIDARG, "RevokeBindStatusCallback failed: %08x\n", hres); - - SET_EXPECT(QueryInterface_IServiceProvider); - prevbsc = (void*)0xdeadbeef; - hres = RegisterBindStatusCallback(bindctx, (IBindStatusCallback*)&bsc, &prevbsc, 0); - ok(hres == S_OK, "RegisterBindStatusCallback failed: %08x\n", hres); - ok(!prevbsc, "prevbsc=%p\n", prevbsc); - CHECK_CALLED(QueryInterface_IServiceProvider); - - hres = IBindCtx_GetObjectParam(bindctx, BSCBHolder, &unk); - ok(hres == S_OK, "GetObjectParam failed: %08x\n", hres); - - hres = IUnknown_QueryInterface(unk, &IID_IBindStatusCallback, (void**)&prev_clb); - IUnknown_Release(unk); - ok(hres == S_OK, "QueryInterface(IID_IBindStatusCallback) failed: %08x\n", hres); - ok(prev_clb != (IBindStatusCallback*)&bsc, "bsc == clb\n"); - - SET_EXPECT(QueryInterface_IServiceProvider); - prevbsc = (void*)0xdeadbeef; - hres = RegisterBindStatusCallback(bindctx, (IBindStatusCallback*)&bsc2, &prevbsc, 0); - ok(hres == S_OK, "RegisterBindStatusCallback failed: %08x\n", hres); - ok(prevbsc == (IBindStatusCallback*)&bsc, "prevbsc != bsc\n"); - CHECK_CALLED(QueryInterface_IServiceProvider); - - hres = IBindCtx_GetObjectParam(bindctx, BSCBHolder, &unk); - ok(hres == S_OK, "GetObjectParam failed: %08x\n", hres); - - hres = IUnknown_QueryInterface(unk, &IID_IBindStatusCallback, (void**)&clb); - IUnknown_Release(unk); - ok(hres == S_OK, "QueryInterface(IID_IBindStatusCallback) failed: %08x\n", hres); - ok(prev_clb == clb, "bsc != clb\n"); - - IBindStatusCallback_Release(clb); - IBindStatusCallback_Release(prev_clb); - - IBindCtx_Release(bindctx); - return ret; -} - -#define BINDTEST_EMULATE 0x0001 -#define BINDTEST_TOOBJECT 0x0002 -#define BINDTEST_FILEDWLAPI 0x0004 -#define BINDTEST_HTTPRESPONSE 0x0008 -#define BINDTEST_REDIRECT 0x0010 -#define BINDTEST_USE_CACHE 0x0020 -#define BINDTEST_NO_CALLBACK_READ 0x0040 -#define BINDTEST_NO_CALLBACK 0x0080 -#define BINDTEST_ABORT 0x0100 -#define BINDTEST_INVALID_CN 0x0200 -#define BINDTEST_ABORT_START 0x0400 -#define BINDTEST_ABORT_PROGRESS 0x0800 - -static void init_bind_test(int protocol, DWORD flags, DWORD t) -{ - test_protocol = protocol; - emulate_protocol = (flags & BINDTEST_EMULATE) != 0; - download_state = BEFORE_DOWNLOAD; - stopped_binding = FALSE; - stopped_obj_binding = FALSE; - data_available = FALSE; - mime_type[0] = 0; - binding_hres = S_OK; - bind_to_object = (flags & BINDTEST_TOOBJECT) != 0; - tymed = t; - filedwl_api = (flags & BINDTEST_FILEDWLAPI) != 0; - if(flags & BINDTEST_HTTPRESPONSE) - urls[HTTP_TEST] = winetest_post_urlW; - else - urls[HTTP_TEST] = winetest_data_urlW; - if(flags & BINDTEST_INVALID_CN) - urls[HTTPS_TEST] = https_invalid_cn_urlW; - else - urls[HTTPS_TEST] = https_urlW; - test_redirect = (flags & BINDTEST_REDIRECT) != 0; - use_cache_file = (flags & BINDTEST_USE_CACHE) != 0; - callback_read = !(flags & BINDTEST_NO_CALLBACK_READ); - no_callback = (flags & BINDTEST_NO_CALLBACK) != 0; - test_abort = (flags & BINDTEST_ABORT) != 0; - abort_start = (flags & BINDTEST_ABORT_START) != 0; - abort_progress = (flags & BINDTEST_ABORT_PROGRESS) != 0; - is_async_prot = protocol == HTTP_TEST || protocol == HTTPS_TEST || protocol == FTP_TEST || protocol == WINETEST_TEST; -} - -static void test_BindToStorage(int protocol, DWORD flags, DWORD t) -{ - IMoniker *mon; - HRESULT hres; - LPOLESTR display_name; - IBindCtx *bctx = NULL; - MSG msg; - IBindStatusCallback *previousclb; - IUnknown *unk = (IUnknown*)0x00ff00ff; - IBinding *bind; - - init_bind_test(protocol, flags, t); - - if(no_callback) { - hres = CreateBindCtx(0, &bctx); - ok(hres == S_OK, "CreateBindCtx failed: %08x\n", hres); - }else { - SET_EXPECT(QueryInterface_IServiceProvider); - hres = CreateAsyncBindCtx(0, (IBindStatusCallback*)&bsc, NULL, &bctx); - ok(hres == S_OK, "CreateAsyncBindCtx failed: %08x\n\n", hres); - CHECK_CALLED(QueryInterface_IServiceProvider); - if(FAILED(hres)) - return; - - SET_EXPECT(QueryInterface_IServiceProvider); - hres = RegisterBindStatusCallback(bctx, (IBindStatusCallback*)&bsc, &previousclb, 0); - ok(hres == S_OK, "RegisterBindStatusCallback failed: %08x\n", hres); - ok(previousclb == (IBindStatusCallback*)&bsc, "previousclb(%p) != sclb(%p)\n", previousclb, &bsc); - CHECK_CALLED(QueryInterface_IServiceProvider); - if(previousclb) - IBindStatusCallback_Release(previousclb); - } - - hres = CreateURLMoniker(NULL, test_protocol == FILE_TEST ? file_url : urls[test_protocol], &mon); - ok(hres == S_OK, "failed to create moniker: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IMoniker_QueryInterface(mon, &IID_IBinding, (void**)&bind); - ok(hres == E_NOINTERFACE, "IMoniker should not have IBinding interface\n"); - if(SUCCEEDED(hres)) - IBinding_Release(bind); - - hres = IMoniker_GetDisplayName(mon, bctx, NULL, &display_name); - ok(hres == S_OK, "GetDisplayName failed %08x\n", hres); - ok(!lstrcmpW(display_name, urls[test_protocol]), - "GetDisplayName got wrong name %s\n", wine_dbgstr_w(display_name)); - CoTaskMemFree(display_name); - - if(tymed == TYMED_FILE && (test_protocol == ABOUT_TEST || test_protocol == ITS_TEST)) - binding_hres = INET_E_DATA_NOT_AVAILABLE; - if((flags & BINDTEST_INVALID_CN) && !invalid_cn_accepted && - (onsecurityproblem_hres != S_OK || security_problem == ERROR_INTERNET_SEC_CERT_ERRORS)) { - if(security_problem == ERROR_INTERNET_SEC_CERT_ERRORS) - binding_hres = INET_E_SECURITY_PROBLEM; - else - binding_hres = INET_E_INVALID_CERTIFICATE; - } - - - if(only_check_prot_args) - SET_EXPECT(OnStopBinding); - if(!no_callback) { - SET_EXPECT(QueryInterface_IBindStatusCallbackEx); - SET_EXPECT(GetBindInfo); - SET_EXPECT(QueryInterface_IInternetProtocol); - if(!emulate_protocol) - SET_EXPECT(QueryService_IInternetProtocol); - SET_EXPECT(OnStartBinding); - } - if(emulate_protocol) { - if(is_urlmon_protocol(test_protocol)) - SET_EXPECT(SetPriority); - SET_EXPECT(Start); - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST) - SET_EXPECT(Terminate); - if(tymed != TYMED_FILE || (test_protocol != ABOUT_TEST && test_protocol != ITS_TEST)) - SET_EXPECT(UnlockRequest); - }else { - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST) { - SET_EXPECT(QueryInterface_IInternetBindInfo); - SET_EXPECT(QueryService_IInternetBindInfo); - if(!abort_start) - SET_EXPECT(QueryInterface_IHttpNegotiate); - SET_EXPECT(QueryInterface_IWindowForBindingUI); - SET_EXPECT(QueryService_IWindowForBindingUI); - SET_EXPECT(GetWindow_IWindowForBindingUI); - if(!abort_start) { - SET_EXPECT(BeginningTransaction); - SET_EXPECT(QueryInterface_IHttpNegotiate2); - SET_EXPECT(GetRootSecurityId); - if(http_is_first) - SET_EXPECT(OnProgress_FINDINGRESOURCE); - SET_EXPECT(OnProgress_CONNECTING); - } - if(flags & BINDTEST_INVALID_CN) { - SET_EXPECT(QueryInterface_IHttpSecurity); - SET_EXPECT(QueryService_IHttpSecurity); - SET_EXPECT(OnSecurityProblem); - if(SUCCEEDED(onsecurityproblem_hres)) - SET_EXPECT(GetWindow_IHttpSecurity); - } - } - if(!no_callback) { - if((test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == FTP_TEST - || test_protocol == FILE_TEST || test_protocol == WINETEST_TEST) && !abort_start) - SET_EXPECT(OnProgress_SENDINGREQUEST); - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST) { - SET_EXPECT(QueryInterface_IHttpNegotiate); - SET_EXPECT(OnResponse); - } - if(!abort_start) { - SET_EXPECT(OnProgress_MIMETYPEAVAILABLE); - SET_EXPECT(OnProgress_BEGINDOWNLOADDATA); - } - if(test_protocol == FILE_TEST) - SET_EXPECT(OnProgress_CACHEFILENAMEAVAILABLE); - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == FTP_TEST || test_protocol == WINETEST_TEST) - SET_EXPECT(OnProgress_DOWNLOADINGDATA); - if(!abort_start) - SET_EXPECT(OnProgress_ENDDOWNLOADDATA); - if((tymed != TYMED_FILE || test_protocol != ABOUT_TEST) && !abort_start) - SET_EXPECT(OnDataAvailable); - SET_EXPECT(OnStopBinding); - } - } - - hres = IMoniker_BindToStorage(mon, bctx, NULL, tymed == TYMED_ISTREAM ? &IID_IStream : &IID_IUnknown, (void**)&unk); - if ((test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST) - && hres == HRESULT_FROM_WIN32(ERROR_INTERNET_NAME_NOT_RESOLVED)) - { - skip("Network unreachable, skipping tests\n"); - return; - } - - if(only_check_prot_args) { - ok(hres == E_FAIL, "Got %08x\n", hres); - CHECK_CALLED(OnStopBinding); - } else if(abort_start) - ok(hres == abort_hres, "IMoniker_BindToStorage failed: %08x, expected %08x\n", hres, abort_hres); - else if(abort_progress) - ok(hres == MK_S_ASYNCHRONOUS, "IMoniker_BindToStorage failed: %08x\n", hres); - else if(no_callback) { - if(emulate_protocol) - WaitForSingleObject(complete_event2, INFINITE); - ok(hres == S_OK, "IMoniker_BindToStorage failed: %08x\n", hres); - ok(unk != NULL, "unk == NULL\n"); - }else if(!(bindf & BINDF_ASYNCHRONOUS) && tymed == TYMED_FILE) { - ok(hres == S_OK, "IMoniker_BindToStorage failed: %08x\n", hres); - ok(unk == NULL, "unk != NULL\n"); - }else if(((bindf & BINDF_ASYNCHRONOUS) && !data_available) - || (tymed == TYMED_FILE && test_protocol == FILE_TEST)) { - ok(hres == MK_S_ASYNCHRONOUS, "IMoniker_BindToStorage failed: %08x\n", hres); - ok(unk == NULL, "istr should be NULL\n"); - }else if(tymed == TYMED_FILE && test_protocol == ABOUT_TEST) { - ok(hres == INET_E_DATA_NOT_AVAILABLE, - "IMoniker_BindToStorage failed: %08x, expected INET_E_DATA_NOT_AVAILABLE\n", hres); - ok(unk == NULL, "istr should be NULL\n"); - }else if((flags & BINDTEST_INVALID_CN) && binding_hres != S_OK) { - ok(hres == binding_hres, "Got %08x\n", hres); - ok(unk == NULL, "Got %p\n", unk); - }else if((flags & BINDTEST_INVALID_CN) && invalid_cn_accepted) { - ok(hres == S_OK, "IMoniker_BindToStorage failed: %08x\n", hres); - ok(unk != NULL, "unk == NULL\n"); - if(unk == NULL) { - ok(0, "Expected security problem to be ignored.\n"); - invalid_cn_accepted = FALSE; - binding_hres = INET_E_INVALID_CERTIFICATE; - } - }else { - ok(hres == S_OK, "IMoniker_BindToStorage failed: %08x\n", hres); - ok(unk != NULL, "unk == NULL\n"); - } - if(unk && callback_read && !no_callback) { - IUnknown_Release(unk); - unk = NULL; - } - - if(FAILED(hres) && !(flags & BINDTEST_INVALID_CN) && !(flags & BINDTEST_ABORT_START)) - return; - - if((bindf & BINDF_ASYNCHRONOUS) && !no_callback) { - while(!stopped_binding && GetMessage(&msg,NULL,0,0)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } - - if(!no_callback) { - CLEAR_CALLED(QueryInterface_IBindStatusCallbackEx); /* IE 8 */ - CHECK_CALLED(GetBindInfo); - if(abort_start) - todo_wine CHECK_CALLED(QueryInterface_IInternetProtocol); - else - CHECK_CALLED(QueryInterface_IInternetProtocol); - if(!emulate_protocol) { - if(abort_start) - todo_wine CHECK_CALLED(QueryService_IInternetProtocol); - else - CHECK_CALLED(QueryService_IInternetProtocol); - } - CHECK_CALLED(OnStartBinding); - } - if(emulate_protocol) { - if(is_urlmon_protocol(test_protocol)) - CHECK_CALLED(SetPriority); - CHECK_CALLED(Start); - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST) { - if(tymed == TYMED_FILE) - CLEAR_CALLED(Read); - CHECK_CALLED(Terminate); - } - if(tymed != TYMED_FILE || (test_protocol != ABOUT_TEST && test_protocol != ITS_TEST)) - CHECK_CALLED(UnlockRequest); - }else { - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST) { - CLEAR_CALLED(QueryInterface_IInternetBindInfo); - CLEAR_CALLED(QueryService_IInternetBindInfo); - if(!abort_start) - CHECK_CALLED(QueryInterface_IHttpNegotiate); - CLEAR_CALLED(QueryInterface_IWindowForBindingUI); - CLEAR_CALLED(QueryService_IWindowForBindingUI); - CLEAR_CALLED(GetWindow_IWindowForBindingUI); - if(!abort_start) - CHECK_CALLED(BeginningTransaction); - if (have_IHttpNegotiate2 && !abort_start) - { - CHECK_CALLED(QueryInterface_IHttpNegotiate2); - CHECK_CALLED(GetRootSecurityId); - } - if(http_is_first) { - if (! proxy_active()) - { - CHECK_CALLED(OnProgress_FINDINGRESOURCE); - CHECK_CALLED(OnProgress_CONNECTING); - } - else - { - CLEAR_CALLED(OnProgress_FINDINGRESOURCE); - CLEAR_CALLED(OnProgress_CONNECTING); - } - }else if(!abort_start) { - /* IE7 does call this */ - CLEAR_CALLED(OnProgress_CONNECTING); - } - if((flags & BINDTEST_INVALID_CN) && !invalid_cn_accepted) { - CHECK_CALLED(QueryInterface_IHttpSecurity); - CHECK_CALLED(QueryService_IHttpSecurity); - CHECK_CALLED(OnSecurityProblem); - }else { - CHECK_NOT_CALLED(QueryInterface_IHttpSecurity); - CHECK_NOT_CALLED(QueryService_IHttpSecurity); - CHECK_NOT_CALLED(OnSecurityProblem); - } - } - if(!no_callback) { - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == FILE_TEST || test_protocol == WINETEST_TEST) { - if(flags & BINDTEST_INVALID_CN) - CLEAR_CALLED(OnProgress_SENDINGREQUEST); - else if(!abort_start) - CHECK_CALLED(OnProgress_SENDINGREQUEST); - } else if(test_protocol == FTP_TEST) - todo_wine CHECK_CALLED(OnProgress_SENDINGREQUEST); - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST) { - CLEAR_CALLED(QueryInterface_IHttpNegotiate); - if((!(flags & BINDTEST_INVALID_CN) || (binding_hres == S_OK)) && !abort_start) { - CHECK_CALLED(OnResponse); - } - } - if((!(flags & BINDTEST_INVALID_CN) || binding_hres == S_OK) && !abort_start) { - CHECK_CALLED(OnProgress_MIMETYPEAVAILABLE); - CHECK_CALLED(OnProgress_BEGINDOWNLOADDATA); - CHECK_CALLED(OnProgress_ENDDOWNLOADDATA); - } - if(test_protocol == FILE_TEST) - CHECK_CALLED(OnProgress_CACHEFILENAMEAVAILABLE); - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == FTP_TEST || test_protocol == WINETEST_TEST) - CLEAR_CALLED(OnProgress_DOWNLOADINGDATA); - if((flags & BINDTEST_INVALID_CN)) { - if(binding_hres == S_OK) - CHECK_CALLED(OnDataAvailable); - else - CHECK_NOT_CALLED(OnDataAvailable); - }else if((tymed != TYMED_FILE || test_protocol != ABOUT_TEST) && !abort_start) - CHECK_CALLED(OnDataAvailable); - CHECK_CALLED(OnStopBinding); - } - } - - ok(IMoniker_Release(mon) == 0, "mon should be destroyed here\n"); - if(bctx) - ok(IBindCtx_Release(bctx) == 0, "bctx should be destroyed here\n"); - - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST) - http_is_first = FALSE; - - if((flags & BINDTEST_INVALID_CN) && onsecurityproblem_hres == S_OK && security_problem != ERROR_INTERNET_SEC_CERT_ERRORS) - invalid_cn_accepted = TRUE; - - if(unk) { - BYTE buf[512]; - DWORD readed; - IStream *stream; - - hres = IUnknown_QueryInterface(unk, &IID_IStream, (void**)&stream); - ok(hres == S_OK, "Could not get IStream iface: %08x\n", hres); - IUnknown_Release(unk); - - do { - readed = 0xdeadbeef; - hres = IStream_Read(stream, buf, sizeof(buf), &readed); - ok(readed != 0xdeadbeef, "readed = 0xdeadbeef\n"); - if(emulate_protocol && test_protocol == HTTP_TEST && readed) - ok(buf[0] == (use_cache_file && !(bindf&BINDF_ASYNCHRONOUS) ? 'X' : '?'), "buf[0] = '%c'\n", buf[0]); - }while(hres == S_OK); - ok(hres == S_FALSE, "IStream_Read returned %08x\n", hres); - ok(!readed, "readed = %d\n", readed); - - IStream_Release(stream); - } -} - -static void test_BindToObject(int protocol, DWORD flags) -{ - IMoniker *mon; - HRESULT hres; - LPOLESTR display_name; - IBindCtx *bctx; - DWORD regid; - MSG msg; - IUnknown *unk = (IUnknown*)0x00ff00ff; - IBinding *bind; - - init_bind_test(protocol, BINDTEST_TOOBJECT|flags, TYMED_ISTREAM); - - if(emulate_protocol) - CoRegisterClassObject(&CLSID_HTMLDocument, (IUnknown *)&mime_cf, - CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, ®id); - - SET_EXPECT(QueryInterface_IServiceProvider); - hres = CreateAsyncBindCtx(0, (IBindStatusCallback*)&objbsc, NULL, &bctx); - ok(hres == S_OK, "CreateAsyncBindCtx failed: %08x\n\n", hres); - CHECK_CALLED(QueryInterface_IServiceProvider); - if(FAILED(hres)) - return; - - hres = CreateURLMoniker(NULL, test_protocol == FILE_TEST ? file_url : urls[test_protocol], &mon); - ok(hres == S_OK, "failed to create moniker: %08x\n", hres); - if(FAILED(hres)) { - IBindCtx_Release(bctx); - return; - } - - hres = IMoniker_QueryInterface(mon, &IID_IBinding, (void**)&bind); - ok(hres == E_NOINTERFACE, "IMoniker should not have IBinding interface\n"); - if(SUCCEEDED(hres)) - IBinding_Release(bind); - - hres = IMoniker_GetDisplayName(mon, bctx, NULL, &display_name); - ok(hres == S_OK, "GetDisplayName failed %08x\n", hres); - ok(!lstrcmpW(display_name, urls[test_protocol]), "GetDisplayName got wrong name\n"); - CoTaskMemFree(display_name); - - SET_EXPECT(QueryInterface_IBindStatusCallbackEx); - SET_EXPECT(Obj_GetBindInfo); - SET_EXPECT(QueryInterface_IInternetProtocol); - if(!emulate_protocol) - SET_EXPECT(QueryService_IInternetProtocol); - SET_EXPECT(Obj_OnStartBinding); - if(emulate_protocol) { - if(is_urlmon_protocol(test_protocol)) - SET_EXPECT(SetPriority); - SET_EXPECT(Start); - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST) - SET_EXPECT(Terminate); - if(test_protocol == FILE_TEST) - SET_EXPECT(OnProgress_MIMETYPEAVAILABLE); - SET_EXPECT(UnlockRequest); - }else { - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST) { - SET_EXPECT(QueryInterface_IHttpNegotiate); - SET_EXPECT(BeginningTransaction); - SET_EXPECT(QueryInterface_IHttpNegotiate2); - SET_EXPECT(GetRootSecurityId); - if(http_is_first) - SET_EXPECT(Obj_OnProgress_FINDINGRESOURCE); - SET_EXPECT(Obj_OnProgress_CONNECTING); - SET_EXPECT(QueryInterface_IWindowForBindingUI); - SET_EXPECT(QueryService_IWindowForBindingUI); - SET_EXPECT(GetWindow_IWindowForBindingUI); - } - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == FILE_TEST) - SET_EXPECT(Obj_OnProgress_SENDINGREQUEST); - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST) { - SET_EXPECT(QueryInterface_IHttpNegotiate); - SET_EXPECT(OnResponse); - } - SET_EXPECT(Obj_OnProgress_MIMETYPEAVAILABLE); - SET_EXPECT(Obj_OnProgress_BEGINDOWNLOADDATA); - if(test_protocol == FILE_TEST) - SET_EXPECT(Obj_OnProgress_CACHEFILENAMEAVAILABLE); - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST) - SET_EXPECT(OnProgress_DOWNLOADINGDATA); - SET_EXPECT(Obj_OnProgress_ENDDOWNLOADDATA); - SET_EXPECT(Obj_OnProgress_CLASSIDAVAILABLE); - SET_EXPECT(Obj_OnProgress_BEGINSYNCOPERATION); - SET_EXPECT(Obj_OnProgress_ENDSYNCOPERATION); - SET_EXPECT(OnObjectAvailable); - SET_EXPECT(Obj_OnStopBinding); - } - - hres = IMoniker_BindToObject(mon, bctx, NULL, &IID_IUnknown, (void**)&unk); - - if ((test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST) - && hres == HRESULT_FROM_WIN32(ERROR_INTERNET_NAME_NOT_RESOLVED)) - { - skip( "Network unreachable, skipping tests\n" ); - return; - } - - /* no point testing the calls if binding didn't even work */ - if (FAILED(hres)) return; - - if(bindf & BINDF_ASYNCHRONOUS) { - ok(hres == MK_S_ASYNCHRONOUS, "IMoniker_BindToObject failed: %08x\n", hres); - ok(unk == NULL, "istr should be NULL\n"); - }else { - ok(hres == S_OK, "IMoniker_BindToStorage failed: %08x\n", hres); - ok(unk != NULL, "unk == NULL\n"); - if(emulate_protocol) - ok(unk == (IUnknown*)&PersistMoniker, "unk != PersistMoniker\n"); - } - if(unk) - IUnknown_Release(unk); - - while((bindf & BINDF_ASYNCHRONOUS) && - !((!emulate_protocol || stopped_binding) && stopped_obj_binding) && GetMessage(&msg,NULL,0,0)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - CLEAR_CALLED(QueryInterface_IBindStatusCallbackEx); - CHECK_CALLED(Obj_GetBindInfo); - CHECK_CALLED(QueryInterface_IInternetProtocol); - if(!emulate_protocol) - CHECK_CALLED(QueryService_IInternetProtocol); - CHECK_CALLED(Obj_OnStartBinding); - if(emulate_protocol) { - if(is_urlmon_protocol(test_protocol)) - CHECK_CALLED(SetPriority); - CHECK_CALLED(Start); - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST) - CHECK_CALLED(Terminate); - if(test_protocol == FILE_TEST) - CLEAR_CALLED(OnProgress_MIMETYPEAVAILABLE); /* not called in IE7 */ - CHECK_CALLED(UnlockRequest); - }else { - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST) { - CHECK_CALLED(QueryInterface_IHttpNegotiate); - CHECK_CALLED(BeginningTransaction); - if (have_IHttpNegotiate2) - { - CHECK_CALLED(QueryInterface_IHttpNegotiate2); - CHECK_CALLED(GetRootSecurityId); - } - if(http_is_first) { - CHECK_CALLED(Obj_OnProgress_FINDINGRESOURCE); - CHECK_CALLED(Obj_OnProgress_CONNECTING); - }else { - /* IE7 does call this */ - CLEAR_CALLED(Obj_OnProgress_CONNECTING); - } - CLEAR_CALLED(QueryInterface_IWindowForBindingUI); - CLEAR_CALLED(QueryService_IWindowForBindingUI); - CLEAR_CALLED(GetWindow_IWindowForBindingUI); - } - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == FILE_TEST) { - if(urls[test_protocol] == winetest_post_urlW) - CLEAR_CALLED(Obj_OnProgress_SENDINGREQUEST); - else - CHECK_CALLED(Obj_OnProgress_SENDINGREQUEST); - } - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST) { - CLEAR_CALLED(QueryInterface_IHttpNegotiate); - CHECK_CALLED(OnResponse); - } - CHECK_CALLED(Obj_OnProgress_MIMETYPEAVAILABLE); - CHECK_CALLED(Obj_OnProgress_BEGINDOWNLOADDATA); - if(test_protocol == FILE_TEST) - CHECK_CALLED(Obj_OnProgress_CACHEFILENAMEAVAILABLE); - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST) - CLEAR_CALLED(OnProgress_DOWNLOADINGDATA); - CLEAR_CALLED(Obj_OnProgress_ENDDOWNLOADDATA); - CHECK_CALLED(Obj_OnProgress_CLASSIDAVAILABLE); - CHECK_CALLED(Obj_OnProgress_BEGINSYNCOPERATION); - CHECK_CALLED(Obj_OnProgress_ENDSYNCOPERATION); - CHECK_CALLED(OnObjectAvailable); - CHECK_CALLED(Obj_OnStopBinding); - } - - ok(IMoniker_Release(mon) == 0, "mon should be destroyed here\n"); - if(test_protocol != HTTP_TEST || emulate_protocol || !(bindf & BINDF_ASYNCHRONOUS)) - ok(IBindCtx_Release(bctx) == 0, "bctx should be destroyed here\n"); - else - IBindCtx_Release(bctx); - - if(emulate_protocol) - CoRevokeClassObject(regid); - - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST) - http_is_first = FALSE; -} - -static void test_URLDownloadToFile(DWORD prot, BOOL emul) -{ - BOOL res; - HRESULT hres; - - init_bind_test(prot, BINDTEST_FILEDWLAPI | (emul ? BINDTEST_EMULATE : 0), TYMED_FILE); - - SET_EXPECT(GetBindInfo); - SET_EXPECT(QueryInterface_IInternetProtocol); - if(!emulate_protocol) { - SET_EXPECT(QueryInterface_IServiceProvider); - SET_EXPECT(QueryService_IInternetProtocol); - } - SET_EXPECT(OnStartBinding); - if(emulate_protocol) { - if(is_urlmon_protocol(test_protocol)) - SET_EXPECT(SetPriority); - SET_EXPECT(Start); - SET_EXPECT(UnlockRequest); - }else { - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST) { - SET_EXPECT(QueryInterface_IHttpNegotiate); - SET_EXPECT(BeginningTransaction); - SET_EXPECT(QueryInterface_IHttpNegotiate2); - SET_EXPECT(GetRootSecurityId); - SET_EXPECT(QueryInterface_IWindowForBindingUI); - SET_EXPECT(OnProgress_CONNECTING); - } - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == FILE_TEST) - SET_EXPECT(OnProgress_SENDINGREQUEST); - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST) { - SET_EXPECT(QueryInterface_IHttpNegotiate); - SET_EXPECT(OnResponse); - } - SET_EXPECT(OnProgress_MIMETYPEAVAILABLE); - SET_EXPECT(OnProgress_BEGINDOWNLOADDATA); - if(test_protocol == FILE_TEST) - SET_EXPECT(OnProgress_CACHEFILENAMEAVAILABLE); - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST) - SET_EXPECT(OnProgress_DOWNLOADINGDATA); - SET_EXPECT(OnProgress_ENDDOWNLOADDATA); - SET_EXPECT(OnStopBinding); - } - - hres = URLDownloadToFileW(NULL, test_protocol == FILE_TEST ? file_url : urls[test_protocol], - dwl_htmlW, 0, (IBindStatusCallback*)&bsc); - ok(hres == S_OK, "URLDownloadToFile failed: %08x\n", hres); - - CHECK_CALLED(GetBindInfo); - CHECK_CALLED(QueryInterface_IInternetProtocol); - if(!emulate_protocol) { - CHECK_CALLED(QueryInterface_IServiceProvider); - CHECK_CALLED(QueryService_IInternetProtocol); - } - CHECK_CALLED(OnStartBinding); - if(emulate_protocol) { - if(is_urlmon_protocol(test_protocol)) - CHECK_CALLED(SetPriority); - CHECK_CALLED(Start); - CHECK_CALLED(UnlockRequest); - }else { - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST) { - CHECK_CALLED(QueryInterface_IHttpNegotiate); - CHECK_CALLED(BeginningTransaction); - if (have_IHttpNegotiate2) - { - CHECK_CALLED(QueryInterface_IHttpNegotiate2); - CHECK_CALLED(GetRootSecurityId); - } - CLEAR_CALLED(QueryInterface_IWindowForBindingUI); - CLEAR_CALLED(OnProgress_CONNECTING); - } - if(test_protocol == FILE_TEST) - CHECK_CALLED(OnProgress_SENDINGREQUEST); - else if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST) - CLEAR_CALLED(OnProgress_SENDINGREQUEST); /* not called by IE7 */ - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST) { - CLEAR_CALLED(QueryInterface_IHttpNegotiate); - CHECK_CALLED(OnResponse); - } - CHECK_CALLED(OnProgress_MIMETYPEAVAILABLE); - CHECK_CALLED(OnProgress_BEGINDOWNLOADDATA); - if(test_protocol == FILE_TEST) - CHECK_CALLED(OnProgress_CACHEFILENAMEAVAILABLE); - if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST) - CLEAR_CALLED(OnProgress_DOWNLOADINGDATA); - CHECK_CALLED(OnProgress_ENDDOWNLOADDATA); - CHECK_CALLED(OnStopBinding); - } - - res = DeleteFileA(dwl_htmlA); - ok(res, "DeleteFile failed: %u\n", GetLastError()); - - if(prot != FILE_TEST || emul) - return; - - hres = URLDownloadToFileW(NULL, urls[test_protocol], dwl_htmlW, 0, NULL); - ok(hres == S_OK, "URLDownloadToFile failed: %08x\n", hres); - - res = DeleteFileA(dwl_htmlA); - ok(res, "DeleteFile failed: %u\n", GetLastError()); -} - -static void test_URLDownloadToFile_abort(void) -{ - HRESULT hres; - - init_bind_test(HTTP_TEST, BINDTEST_FILEDWLAPI|BINDTEST_ABORT_PROGRESS, TYMED_FILE); - - SET_EXPECT(GetBindInfo); - SET_EXPECT(QueryInterface_IInternetProtocol); - SET_EXPECT(QueryInterface_IServiceProvider); - SET_EXPECT(QueryService_IInternetProtocol); - SET_EXPECT(OnStartBinding); - SET_EXPECT(QueryInterface_IHttpNegotiate); - SET_EXPECT(QueryInterface_IHttpNegotiate2); - SET_EXPECT(BeginningTransaction); - SET_EXPECT(GetRootSecurityId); - SET_EXPECT(QueryInterface_IWindowForBindingUI); - SET_EXPECT(OnProgress_CONNECTING); - SET_EXPECT(OnProgress_SENDINGREQUEST); - SET_EXPECT(OnStopBinding); - - hres = URLDownloadToFileW(NULL, urls[HTTP_TEST], dwl_htmlW, 0, (IBindStatusCallback*)&bsc); - ok(hres == E_ABORT, "URLDownloadToFile failed: %08x, expected E_ABORT\n", hres); - - CHECK_CALLED(GetBindInfo); - CHECK_CALLED(QueryInterface_IInternetProtocol); - CHECK_CALLED(QueryInterface_IServiceProvider); - CHECK_CALLED(QueryService_IInternetProtocol); - CHECK_CALLED(OnStartBinding); - CHECK_CALLED(QueryInterface_IHttpNegotiate); - CHECK_CALLED(QueryInterface_IHttpNegotiate2); - CHECK_CALLED(BeginningTransaction); - CHECK_CALLED(GetRootSecurityId); - CLEAR_CALLED(QueryInterface_IWindowForBindingUI); - CHECK_CALLED(OnProgress_SENDINGREQUEST); - CLEAR_CALLED(OnProgress_CONNECTING); - CHECK_CALLED(OnStopBinding); - - init_bind_test(HTTP_TEST, BINDTEST_FILEDWLAPI|BINDTEST_ABORT_START, TYMED_FILE); - - SET_EXPECT(GetBindInfo); - SET_EXPECT(QueryInterface_IInternetProtocol); - SET_EXPECT(QueryInterface_IServiceProvider); - SET_EXPECT(QueryService_IInternetProtocol); - SET_EXPECT(OnStartBinding); - SET_EXPECT(OnStopBinding); - - abort_hres = E_ABORT; - hres = URLDownloadToFileW(NULL, urls[HTTP_TEST], dwl_htmlW, 0, (IBindStatusCallback*)&bsc); - ok(hres == E_ABORT, "URLDownloadToFile failed: %08x, expected E_ABORT\n", hres); - - CHECK_CALLED(GetBindInfo); - todo_wine CHECK_CALLED(QueryInterface_IInternetProtocol); - todo_wine CHECK_CALLED(QueryInterface_IServiceProvider); - todo_wine CHECK_CALLED(QueryService_IInternetProtocol); - CHECK_CALLED(OnStartBinding); - CHECK_CALLED(OnStopBinding); - - init_bind_test(HTTP_TEST, BINDTEST_FILEDWLAPI|BINDTEST_ABORT_START, TYMED_FILE); - - SET_EXPECT(GetBindInfo); - SET_EXPECT(QueryInterface_IInternetProtocol); - SET_EXPECT(QueryInterface_IServiceProvider); - SET_EXPECT(QueryService_IInternetProtocol); - SET_EXPECT(OnStartBinding); - SET_EXPECT(QueryInterface_IHttpNegotiate); - SET_EXPECT(QueryInterface_IHttpNegotiate2); - SET_EXPECT(BeginningTransaction); - SET_EXPECT(GetRootSecurityId); - SET_EXPECT(QueryInterface_IWindowForBindingUI); - SET_EXPECT(OnResponse); - SET_EXPECT(OnProgress_CONNECTING); - SET_EXPECT(OnProgress_SENDINGREQUEST); - SET_EXPECT(OnProgress_MIMETYPEAVAILABLE); - SET_EXPECT(OnProgress_BEGINDOWNLOADDATA); - SET_EXPECT(OnProgress_DOWNLOADINGDATA); - SET_EXPECT(OnProgress_ENDDOWNLOADDATA); - SET_EXPECT(OnStopBinding); - - /* URLDownloadToFile doesn't abort if E_NOTIMPL is returned from the - * IBindStatusCallback's OnStartBinding function. - */ - abort_hres = E_NOTIMPL; - hres = URLDownloadToFileW(NULL, urls[HTTP_TEST], dwl_htmlW, 0, (IBindStatusCallback*)&bsc); - ok(hres == S_OK, "URLDownloadToFile failed: %08x\n", hres); - - CHECK_CALLED(GetBindInfo); - CHECK_CALLED(QueryInterface_IInternetProtocol); - CHECK_CALLED(QueryInterface_IServiceProvider); - CHECK_CALLED(QueryService_IInternetProtocol); - CHECK_CALLED(OnStartBinding); - CHECK_CALLED(QueryInterface_IHttpNegotiate); - CHECK_CALLED(QueryInterface_IHttpNegotiate2); - CHECK_CALLED(BeginningTransaction); - CHECK_CALLED(GetRootSecurityId); - CLEAR_CALLED(QueryInterface_IWindowForBindingUI); - CHECK_CALLED(OnResponse); - CLEAR_CALLED(OnProgress_CONNECTING); - CHECK_CALLED(OnProgress_SENDINGREQUEST); - CHECK_CALLED(OnProgress_MIMETYPEAVAILABLE); - CHECK_CALLED(OnProgress_BEGINDOWNLOADDATA); - CHECK_CALLED(OnProgress_DOWNLOADINGDATA); - CHECK_CALLED(OnProgress_ENDDOWNLOADDATA); - CHECK_CALLED(OnStopBinding); - - DeleteFileA(dwl_htmlA); -} - -static void set_file_url(char *path) -{ - CHAR file_urlA[INTERNET_MAX_URL_LENGTH]; - CHAR INDEX_HTMLA[MAX_PATH]; - - lstrcpyA(file_urlA, "file:///"); - lstrcatA(file_urlA, path); - MultiByteToWideChar(CP_ACP, 0, file_urlA, -1, file_url, INTERNET_MAX_URL_LENGTH); - - lstrcpyA(INDEX_HTMLA, "file://"); - lstrcatA(INDEX_HTMLA, path); - MultiByteToWideChar(CP_ACP, 0, INDEX_HTMLA, -1, INDEX_HTML, MAX_PATH); -} - -static void create_file(void) -{ - HANDLE file; - DWORD size; - CHAR path[MAX_PATH]; - - static const char html_doc[] = ""; - - file = CreateFileA(wszIndexHtmlA, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, NULL); - ok(file != INVALID_HANDLE_VALUE, "CreateFile failed\n"); - if(file == INVALID_HANDLE_VALUE) - return; - - WriteFile(file, html_doc, sizeof(html_doc)-1, &size, NULL); - CloseHandle(file); - - GetCurrentDirectoryA(MAX_PATH, path); - lstrcatA(path, "\\"); - lstrcatA(path, wszIndexHtmlA); - set_file_url(path); -} - -static void create_cache_file(void) -{ - char buf[6500], curdir[MAX_PATH]; - HANDLE file; - DWORD size; - - file = CreateFileA(test_txtA, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, NULL); - ok(file != INVALID_HANDLE_VALUE, "CreateFile failed\n"); - if(file == INVALID_HANDLE_VALUE) - return; - - memset(buf, 'X', sizeof(buf)); - WriteFile(file, buf, sizeof(buf), &size, NULL); - CloseHandle(file); - - memset(curdir, 0, sizeof(curdir)); - GetCurrentDirectoryA(MAX_PATH, curdir); - lstrcatA(curdir, "\\"); - lstrcatA(curdir, test_txtA); - - MultiByteToWideChar(CP_ACP, 0, curdir, -1, cache_file_name, MAX_PATH); -} - -static void test_ReportResult(HRESULT exhres) -{ - IMoniker *mon = NULL; - IBindCtx *bctx = NULL; - IUnknown *unk = (void*)0xdeadbeef; - HRESULT hres; - - init_bind_test(ABOUT_TEST, BINDTEST_EMULATE, TYMED_ISTREAM); - binding_hres = exhres; - - hres = CreateURLMoniker(NULL, ABOUT_BLANK, &mon); - ok(hres == S_OK, "CreateURLMoniker failed: %08x\n", hres); - - SET_EXPECT(QueryInterface_IServiceProvider); - hres = CreateAsyncBindCtx(0, (IBindStatusCallback*)&bsc, NULL, &bctx); - ok(hres == S_OK, "CreateAsyncBindCtx failed: %08x\n\n", hres); - CHECK_CALLED(QueryInterface_IServiceProvider); - - SET_EXPECT(QueryInterface_IBindStatusCallbackEx); - SET_EXPECT(GetBindInfo); - SET_EXPECT(QueryInterface_IInternetProtocol); - SET_EXPECT(OnStartBinding); - if(is_urlmon_protocol(test_protocol)) - SET_EXPECT(SetPriority); - SET_EXPECT(Start); - - hres = IMoniker_BindToStorage(mon, bctx, NULL, &IID_IStream, (void**)&unk); - if(SUCCEEDED(exhres)) - ok(hres == S_OK || hres == MK_S_ASYNCHRONOUS, "BindToStorage failed: %08x\n", hres); - else - ok(hres == exhres || hres == MK_S_ASYNCHRONOUS, - "BindToStorage failed: %08x, expected %08x or MK_S_ASYNCHRONOUS\n", hres, exhres); - - CLEAR_CALLED(QueryInterface_IBindStatusCallbackEx); /* IE 8 */ - CHECK_CALLED(GetBindInfo); - CHECK_CALLED(QueryInterface_IInternetProtocol); - CHECK_CALLED(OnStartBinding); - if(is_urlmon_protocol(test_protocol)) - CHECK_CALLED(SetPriority); - CHECK_CALLED(Start); - - ok(unk == NULL, "unk=%p\n", unk); - - IBindCtx_Release(bctx); - IMoniker_Release(mon); -} - -static void test_BindToStorage_fail(void) -{ - IMoniker *mon = NULL; - IBindCtx *bctx = NULL; - IUnknown *unk; - HRESULT hres; - - hres = CreateURLMoniker(NULL, ABOUT_BLANK, &mon); - ok(hres == S_OK, "CreateURLMoniker failed: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = pCreateAsyncBindCtxEx(NULL, 0, NULL, NULL, &bctx, 0); - ok(hres == S_OK, "CreateAsyncBindCtxEx failed: %08x\n", hres); - - unk = (void*)0xdeadbeef; - hres = IMoniker_BindToStorage(mon, bctx, NULL, &IID_IStream, (void**)&unk); - ok(hres == MK_E_SYNTAX || hres == INET_E_DATA_NOT_AVAILABLE, - "hres=%08x, expected MK_E_SYNTAX or INET_E_DATA_NOT_AVAILABLE\n", hres); - ok(unk == NULL, "got %p\n", unk); - - IBindCtx_Release(bctx); - - IMoniker_Release(mon); - - test_ReportResult(E_NOTIMPL); - test_ReportResult(S_FALSE); -} - -static void test_StdURLMoniker(void) -{ - IMoniker *mon, *async_mon; - LPOLESTR display_name; - HRESULT hres; - - hres = CoCreateInstance(&IID_IInternet, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, - &IID_IMoniker, (void**)&mon); - ok(hres == S_OK, "Could not create IInternet instance: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IMoniker_QueryInterface(mon, &IID_IAsyncMoniker, (void**)&async_mon); - ok(hres == S_OK, "Could not get IAsyncMoniker iface: %08x\n", hres); - ok(mon == async_mon, "mon != async_mon\n"); - IMoniker_Release(async_mon); - - hres = IMoniker_GetDisplayName(mon, NULL, NULL, &display_name); - ok(hres == E_OUTOFMEMORY, "GetDisplayName failed: %08x, expected E_OUTOFMEMORY\n", hres); - - if(pCreateUri) { - IUriContainer *uri_container; - IUri *uri; - - hres = IMoniker_QueryInterface(mon, &IID_IUriContainer, (void**)&uri_container); - ok(hres == S_OK, "Coud not get IUriMoniker iface: %08x\n", hres); - - - uri = (void*)0xdeadbeef; - hres = IUriContainer_GetIUri(uri_container, &uri); - ok(hres == S_FALSE, "GetIUri failed: %08x\n", hres); - ok(!uri, "uri = %p, expected NULL\n", uri); - - IUriContainer_Release(uri_container); - } - - IMoniker_Release(mon); -} - -static void register_protocols(void) -{ - IInternetSession *session; - HRESULT hres; - - static const WCHAR winetestW[] = {'w','i','n','e','t','e','s','t',0}; - - hres = CoInternetGetSession(0, &session, 0); - ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres); - if(FAILED(hres)) - return; - - hres = IInternetSession_RegisterNameSpace(session, &protocol_cf, &IID_NULL, - winetestW, 0, NULL, 0); - ok(hres == S_OK, "RegisterNameSpace failed: %08x\n", hres); - - IInternetSession_Release(session); -} - -START_TEST(url) -{ - HMODULE hurlmon; - - hurlmon = GetModuleHandle("urlmon.dll"); - pCreateAsyncBindCtxEx = (void*) GetProcAddress(hurlmon, "CreateAsyncBindCtxEx"); - - if(!GetProcAddress(hurlmon, "CompareSecurityIds")) { - win_skip("Too old IE\n"); - return; - } - - pCreateUri = (void*) GetProcAddress(hurlmon, "CreateUri"); - if(!pCreateUri) - win_skip("IUri not supported\n"); - - complete_event = CreateEvent(NULL, FALSE, FALSE, NULL); - complete_event2 = CreateEvent(NULL, FALSE, FALSE, NULL); - thread_id = GetCurrentThreadId(); - create_file(); - create_cache_file(); - register_protocols(); - - test_create(); - - trace("test CreateAsyncBindCtx...\n"); - test_CreateAsyncBindCtx(); - - trace("test CreateAsyncBindCtxEx...\n"); - test_CreateAsyncBindCtxEx(); - - trace("test RegisterBindStatusCallback...\n"); - if(test_RegisterBindStatusCallback()) { - trace("test BindToStorage failures...\n"); - test_BindToStorage_fail(); - - trace("synchronous http test (COM not initialised)...\n"); - test_BindToStorage(HTTP_TEST, 0, TYMED_ISTREAM); - - CoInitialize(NULL); - - trace("test StdURLMoniker...\n"); - test_StdURLMoniker(); - - trace("synchronous http test...\n"); - test_BindToStorage(HTTP_TEST, 0, TYMED_ISTREAM); - - trace("emulated synchronous http test (to file)...\n"); - test_BindToStorage(HTTP_TEST, BINDTEST_EMULATE, TYMED_FILE); - - trace("synchronous http test (to object)...\n"); - test_BindToObject(HTTP_TEST, 0); - - trace("emulated synchronous http test (with cache)...\n"); - test_BindToStorage(HTTP_TEST, BINDTEST_EMULATE|BINDTEST_USE_CACHE, TYMED_ISTREAM); - - trace("emulated synchronous http test (with cache, no read)...\n"); - test_BindToStorage(HTTP_TEST, BINDTEST_EMULATE|BINDTEST_USE_CACHE|BINDTEST_NO_CALLBACK_READ, TYMED_ISTREAM); - - trace("synchronous http test (with cache, no read)...\n"); - test_BindToStorage(HTTP_TEST, BINDTEST_USE_CACHE|BINDTEST_NO_CALLBACK_READ, TYMED_ISTREAM); - - trace("synchronous file test...\n"); - test_BindToStorage(FILE_TEST, 0, TYMED_ISTREAM); - - trace("emulated synchronous file test (to file)...\n"); - test_BindToStorage(FILE_TEST, BINDTEST_EMULATE, TYMED_FILE); - - trace("synchronous file test (to object)...\n"); - test_BindToObject(FILE_TEST, 0); - - trace("file test (no callback)...\n"); - test_BindToStorage(FILE_TEST, BINDTEST_NO_CALLBACK, TYMED_ISTREAM); - - trace("synchronous https test (invalid CN, dialog)\n"); - onsecurityproblem_hres = S_FALSE; - http_is_first = TRUE; - test_BindToStorage(HTTPS_TEST, BINDTEST_INVALID_CN, TYMED_ISTREAM); - - trace("synchronous https test (invalid CN, fail)\n"); - onsecurityproblem_hres = E_FAIL; - test_BindToStorage(HTTPS_TEST, BINDTEST_INVALID_CN, TYMED_ISTREAM); - - trace("synchronous https test (invalid CN, accept)\n"); - onsecurityproblem_hres = S_OK; - test_BindToStorage(HTTPS_TEST, BINDTEST_INVALID_CN, TYMED_ISTREAM); - - trace("asynchronous https test (invalid CN, dialog 2)\n"); - onsecurityproblem_hres = S_FALSE; - test_BindToStorage(HTTPS_TEST, BINDTEST_INVALID_CN, TYMED_ISTREAM); - invalid_cn_accepted = FALSE; - - bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA; - - trace("about test (no read)...\n"); - test_BindToStorage(ABOUT_TEST, BINDTEST_NO_CALLBACK_READ, TYMED_ISTREAM); - - trace("http test...\n"); - test_BindToStorage(HTTP_TEST, 0, TYMED_ISTREAM); - - trace("http test (to file)...\n"); - test_BindToStorage(HTTP_TEST, 0, TYMED_FILE); - - trace("http test (to object)...\n"); - test_BindToObject(HTTP_TEST, 0); - - trace("http test (short response)...\n"); - test_BindToStorage(HTTP_TEST, BINDTEST_HTTPRESPONSE, TYMED_ISTREAM); - - trace("http test (short response, to object)...\n"); - test_BindToObject(HTTP_TEST, 0); - - trace("http test (abort start binding E_NOTIMPL)...\n"); - abort_hres = E_NOTIMPL; - test_BindToStorage(HTTP_TEST, BINDTEST_ABORT_START, TYMED_FILE); - - trace("http test (abort start binding E_ABORT)...\n"); - abort_hres = E_ABORT; - test_BindToStorage(HTTP_TEST, BINDTEST_ABORT_START, TYMED_FILE); - - trace("http test (abort progress)...\n"); - test_BindToStorage(HTTP_TEST, BINDTEST_ABORT_PROGRESS, TYMED_FILE); - - trace("emulated http test...\n"); - test_BindToStorage(HTTP_TEST, BINDTEST_EMULATE, TYMED_ISTREAM); - - trace("emulated http test (to object)...\n"); - test_BindToObject(HTTP_TEST, BINDTEST_EMULATE); - - trace("emulated http test (to object, redirect)...\n"); - test_BindToObject(HTTP_TEST, BINDTEST_EMULATE|BINDTEST_REDIRECT); - - trace("emulated http test (to file)...\n"); - test_BindToStorage(HTTP_TEST, BINDTEST_EMULATE, TYMED_FILE); - - trace("emulated http test (redirect)...\n"); - test_BindToStorage(HTTP_TEST, BINDTEST_EMULATE|BINDTEST_REDIRECT, TYMED_ISTREAM); - - trace("emulated http test (with cache)...\n"); - test_BindToStorage(HTTP_TEST, BINDTEST_EMULATE|BINDTEST_USE_CACHE, TYMED_ISTREAM); - - trace("winetest test (no callback)...\n"); - test_BindToStorage(WINETEST_TEST, BINDTEST_EMULATE|BINDTEST_NO_CALLBACK|BINDTEST_USE_CACHE, TYMED_ISTREAM); - - trace("asynchronous https test...\n"); - http_is_first = TRUE; - test_BindToStorage(HTTPS_TEST, 0, TYMED_ISTREAM); - - trace("emulated https test...\n"); - test_BindToStorage(HTTPS_TEST, BINDTEST_EMULATE, TYMED_ISTREAM); - - trace("about test...\n"); - test_BindToStorage(ABOUT_TEST, 0, TYMED_ISTREAM); - - trace("about test (to file)...\n"); - test_BindToStorage(ABOUT_TEST, 0, TYMED_FILE); - - trace("about test (to object)...\n"); - test_BindToObject(ABOUT_TEST, 0); - - trace("emulated about test...\n"); - test_BindToStorage(ABOUT_TEST, BINDTEST_EMULATE, TYMED_ISTREAM); - - trace("emulated about test (to file)...\n"); - test_BindToStorage(ABOUT_TEST, BINDTEST_EMULATE, TYMED_FILE); - - trace("emulated about test (to object)...\n"); - test_BindToObject(ABOUT_TEST, BINDTEST_EMULATE); - - trace("file test...\n"); - test_BindToStorage(FILE_TEST, 0, TYMED_ISTREAM); - - trace("file test (to file)...\n"); - test_BindToStorage(FILE_TEST, 0, TYMED_FILE); - - trace("file test (to object)...\n"); - test_BindToObject(FILE_TEST, 0); - - trace("emulated file test...\n"); - test_BindToStorage(FILE_TEST, BINDTEST_EMULATE, TYMED_ISTREAM); - - trace("emulated file test (to file)...\n"); - test_BindToStorage(FILE_TEST, BINDTEST_EMULATE, TYMED_FILE); - - trace("emulated file test (to object)...\n"); - test_BindToObject(FILE_TEST, BINDTEST_EMULATE); - - trace("emulated its test...\n"); - test_BindToStorage(ITS_TEST, BINDTEST_EMULATE, TYMED_ISTREAM); - - trace("emulated its test (to file)...\n"); - test_BindToStorage(ITS_TEST, BINDTEST_EMULATE, TYMED_FILE); - - trace("emulated mk test...\n"); - test_BindToStorage(MK_TEST, BINDTEST_EMULATE, TYMED_ISTREAM); - - trace("test URLDownloadToFile for file protocol...\n"); - test_URLDownloadToFile(FILE_TEST, FALSE); - - trace("test URLDownloadToFile for emulated file protocol...\n"); - test_URLDownloadToFile(FILE_TEST, TRUE); - - trace("test URLDownloadToFile for http protocol...\n"); - test_URLDownloadToFile(HTTP_TEST, FALSE); - - trace("test URLDownloadToFile abort...\n"); - test_URLDownloadToFile_abort(); - - trace("test emulated http abort...\n"); - test_BindToStorage(HTTP_TEST, BINDTEST_EMULATE|BINDTEST_ABORT, TYMED_ISTREAM); - - bindf |= BINDF_NOWRITECACHE; - - trace("ftp test...\n"); - test_BindToStorage(FTP_TEST, 0, TYMED_ISTREAM); - - trace("test failures...\n"); - test_BindToStorage_fail(); - - bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE; - only_check_prot_args = TRUE; /* Fail after checking arguments to Protocol_Start */ - - trace("check emulated http protocol arguments...\n"); - test_BindToStorage(HTTP_TEST, BINDTEST_EMULATE, TYMED_ISTREAM); - } - - DeleteFileA(wszIndexHtmlA); - DeleteFileA(test_txtA); - CloseHandle(complete_event); - CloseHandle(complete_event2); - CoUninitialize(); -} diff --git a/rostests/winetests/urlmon/urlmon.rbuild b/rostests/winetests/urlmon/urlmon.rbuild deleted file mode 100644 index 88da9d0ab20..00000000000 --- a/rostests/winetests/urlmon/urlmon.rbuild +++ /dev/null @@ -1,24 +0,0 @@ - - - - - . - - generated.c - misc.c - protocol.c - sec_mgr.c - stream.c - uri.c - url.c - testlist.c - wine - uuid - urlmon - ole32 - oleaut32 - user32 - advapi32 - ntdll - - diff --git a/rostests/winetests/user32/CMakeLists.txt b/rostests/winetests/user32/CMakeLists.txt deleted file mode 100644 index 39879661456..00000000000 --- a/rostests/winetests/user32/CMakeLists.txt +++ /dev/null @@ -1,43 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__) - -set_rc_compiler() - -list(APPEND SOURCE - broadcast.c - class.c - clipboard.c - combo.c - cursoricon.c - dce.c - dde.c - dialog.c - edit.c - generated.c - input.c - listbox.c - menu.c - monitor.c - msg.c - resource.c - scroll.c - static.c - sysparams.c - text.c - uitools.c - win.c - winstation.c - wsprintf.c - testlist.c - resource.rc) - -add_executable(user32_winetest ${SOURCE}) -target_link_libraries(user32_winetest wine) -set_module_type(user32_winetest win32cui) -add_importlibs(user32_winetest user32 gdi32 advapi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET user32_winetest DESTINATION reactos/bin FOR all) - -if(NOT MSVC) - add_target_compile_flags(user32_winetest "-Wno-format") -endif() \ No newline at end of file diff --git a/rostests/winetests/user32/broadcast.c b/rostests/winetests/user32/broadcast.c deleted file mode 100644 index 21d38e3cc40..00000000000 --- a/rostests/winetests/user32/broadcast.c +++ /dev/null @@ -1,368 +0,0 @@ -/* - * Unit tests for BroadcastSystemMessage - * - * Copyright 2008 Maarten Lankhorst - * - * 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 _WIN32_WINNT 0x0501 - -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winnls.h" - -#include "wine/test.h" - -typedef LONG (WINAPI *PBROADCAST)( DWORD,LPDWORD,UINT,WPARAM,LPARAM ); -typedef LONG (WINAPI *PBROADCASTEX)( DWORD,LPDWORD,UINT,WPARAM,LPARAM,PBSMINFO ); -static PBROADCAST pBroadcastA; -static PBROADCAST pBroadcastW; -static PBROADCASTEX pBroadcastExA; -static PBROADCASTEX pBroadcastExW; -static HANDLE hevent; - -static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - if (msg == WM_NULL) - { - trace("main_window_procA: Sleeping for %lu ms\n", wparam); - if (wparam) - { - if (WaitForSingleObject(hevent, wparam) == WAIT_TIMEOUT) - SetEvent(hevent); - } - trace("main_window_procA: Returning WM_NULL with parameter %08lx\n", lparam); - return lparam; - } - - return DefWindowProcA(hwnd, msg, wparam, lparam); -} - -static BOOL init_procs(void) -{ - WNDCLASSA cls; - HANDLE user32 = GetModuleHandle("user32"); - pBroadcastA = (PBROADCAST)GetProcAddress(user32, "BroadcastSystemMessageA"); - if (!pBroadcastA) - pBroadcastA = (PBROADCAST)GetProcAddress(user32, "BroadcastSystemMessage"); - ok(pBroadcastA != NULL, "No BroadcastSystemMessage found\n"); - if (!pBroadcastA) - { - win_skip("BroadcastA is not available\n"); - return FALSE; - } - - pBroadcastW = (PBROADCAST)GetProcAddress(user32, "BroadcastSystemMessageW"); - pBroadcastExA = (PBROADCASTEX)GetProcAddress(user32, "BroadcastSystemMessageExA"); - pBroadcastExW = (PBROADCASTEX)GetProcAddress(user32, "BroadcastSystemMessageExW"); - - hevent = CreateEventA(NULL, TRUE, FALSE, "Asynchronous checking event"); - - cls.style = CS_DBLCLKS; - cls.lpfnWndProc = main_window_procA; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(0); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "MainWindowClass"; - - if (!RegisterClassA(&cls)) - return FALSE; - - if (!CreateWindowExA(0, "MainWindowClass", "Main window", WS_CAPTION | WS_SYSMENU | - WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP, 100, 100, 200, - 200, 0, 0, GetModuleHandle(0), NULL)) - return FALSE; - return TRUE; -} - -static void test_parameters(PBROADCAST broadcast, const char *functionname) -{ - LONG ret; - DWORD recips; - - SetLastError(0xcafebabe); - recips = BSM_APPLICATIONS; - ret = broadcast( 0x80000000, &recips, WM_NULL, 0, 0 ); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("%s is not implemented\n", functionname); - return; - } - ok(!ret || broken(ret), "Returned: %d\n", ret); - if (!ret) ok(GetLastError() == ERROR_INVALID_PARAMETER, "Last error: %08x\n", GetLastError()); - - SetLastError(0xcafebabe); - recips = BSM_APPLICATIONS; - ret = broadcast( 0x80000000, &recips, WM_NULL, 0, 0 ); - ok(!ret || broken(ret), "Returned: %d\n", ret); - if (!ret) ok(GetLastError() == ERROR_INVALID_PARAMETER, "Last error: %08x\n", GetLastError()); - -#if 0 /* TODO: Check the hang flags */ - SetLastError(0xcafebabe); - recips = BSM_APPLICATIONS; - ret = broadcast( BSF_QUERY|(BSF_NOHANG|BSF_FORCEIFHUNG), &recips, WM_NULL, 30000, 0 ); - ok(0, "Last error: %08x\n", GetLastError()); - ok(0, "Returned: %d\n", ret); - - SetLastError(0xcafebabe); - recips = BSM_APPLICATIONS; - ret = broadcast( BSF_QUERY|(BSF_NOHANG|BSF_NOTIMEOUTIFNOTHUNG), &recips, WM_NULL, 30000, 0 ); - ok(0, "Last error: %08x\n", GetLastError()); - ok(0, "Returned: %d\n", ret); - - SetLastError(0xcafebabe); - recips = BSM_APPLICATIONS; - ret = broadcast( BSF_QUERY|(BSF_NOTIMEOUTIFNOTHUNG|BSF_FORCEIFHUNG), &recips, WM_NULL, 30000, 0 ); - ok(0, "Last error: %08x\n", GetLastError()); - ok(0, "Returned: %d\n", ret); - - SetLastError(0xcafebabe); - recips = BSM_APPLICATIONS; - ret = broadcast( BSF_POSTMESSAGE|(BSF_NOTIMEOUTIFNOTHUNG|BSF_FORCEIFHUNG), &recips, WM_NULL, 30000, 0 ); - ok(0, "Last error: %08x\n", GetLastError()); - ok(0, "Returned: %d\n", ret); -#endif - - recips = BSM_APPLICATIONS; - ResetEvent(hevent); - ret = broadcast( BSF_POSTMESSAGE|BSF_QUERY, &recips, WM_NULL, 100, 0 ); - ok(ret==1, "Returned: %d\n", ret); - ok(WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT, "Asynchronous message sent instead\n"); - PulseEvent(hevent); - - SetLastError( 0xdeadbeef ); - recips = BSM_APPLICATIONS; - ret = broadcast( BSF_POSTMESSAGE|BSF_SENDNOTIFYMESSAGE, &recips, WM_NULL, 100, 0 ); - if (ret) - { - ok(ret==1, "Returned: %d\n", ret); - ok(WaitForSingleObject(hevent, 0) != WAIT_OBJECT_0, "Synchronous message sent instead\n"); - PulseEvent(hevent); - - recips = BSM_APPLICATIONS; - ret = broadcast( BSF_SENDNOTIFYMESSAGE, &recips, WM_NULL, 100, BROADCAST_QUERY_DENY ); - ok(ret==1, "Returned: %d\n", ret); - ok(WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT, "Asynchronous message sent instead\n"); - PulseEvent(hevent); - - recips = BSM_APPLICATIONS; - ret = broadcast( BSF_SENDNOTIFYMESSAGE|BSF_QUERY, &recips, WM_NULL, 100, BROADCAST_QUERY_DENY ); - ok(!ret, "Returned: %d\n", ret); - ok(WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT, "Asynchronous message sent instead\n"); - PulseEvent(hevent); - } - else /* BSF_SENDNOTIFYMESSAGE not supported on NT4 */ - ok( GetLastError() == ERROR_INVALID_PARAMETER, "failed with err %u\n", GetLastError() ); - - recips = BSM_APPLICATIONS; - ret = broadcast( 0, &recips, WM_NULL, 100, 0 ); - ok(ret==1, "Returned: %d\n", ret); - ok(WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT, "Asynchronous message sent instead\n"); - PulseEvent(hevent); -} - -/* BSF_SENDNOTIFYMESSAGE and BSF_QUERY are both synchronous within the same process - * However you should be able to distinguish them by sending the BROADCAST_QUERY_DENY flag - */ - -static void test_parametersEx(PBROADCASTEX broadcastex) -{ - LONG ret; - DWORD recips; - - SetLastError(0xcafebabe); - recips = BSM_APPLICATIONS; - ret = broadcastex( 0x80000000, &recips, WM_NULL, 0, 0, NULL ); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Last error: %08x\n", GetLastError()); - ok(!ret, "Returned: %d\n", ret); - - SetLastError(0xcafebabe); - recips = BSM_APPLICATIONS; - ret = broadcastex( 0x80000000, &recips, WM_NULL, 0, 0, NULL ); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Last error: %08x\n", GetLastError()); - ok(!ret, "Returned: %d\n", ret); - -#if 0 /* TODO: Check the hang flags */ - SetLastError(0xcafebabe); - recips = BSM_APPLICATIONS; - ret = broadcast( BSF_QUERY|(BSF_NOHANG|BSF_FORCEIFHUNG), &recips, WM_NULL, 30000, 0, NULL ); - ok(0, "Last error: %08x\n", GetLastError()); - ok(0, "Returned: %d\n", ret); - - SetLastError(0xcafebabe); - recips = BSM_APPLICATIONS; - ret = broadcast( BSF_QUERY|(BSF_NOHANG|BSF_NOTIMEOUTIFNOTHUNG), &recips, WM_NULL, 30000, 0, NULL ); - ok(0, "Last error: %08x\n", GetLastError()); - ok(0, "Returned: %d\n", ret); - - SetLastError(0xcafebabe); - recips = BSM_APPLICATIONS; - ret = broadcast( BSF_QUERY|(BSF_NOTIMEOUTIFNOTHUNG|BSF_FORCEIFHUNG), &recips, WM_NULL, 30000, 0, NULL ); - ok(0, "Last error: %08x\n", GetLastError()); - ok(0, "Returned: %d\n", ret); - - SetLastError(0xcafebabe); - recips = BSM_APPLICATIONS; - ret = broadcast( BSF_POSTMESSAGE|(BSF_NOTIMEOUTIFNOTHUNG|BSF_FORCEIFHUNG), &recips, WM_NULL, 30000, 0, NULL ); - ok(0, "Last error: %08x\n", GetLastError()); - ok(0, "Returned: %d\n", ret); -#endif - - recips = BSM_APPLICATIONS; - ResetEvent(hevent); - ret = broadcastex( BSF_POSTMESSAGE|BSF_QUERY, &recips, WM_NULL, 100, 0, NULL ); - ok(ret==1, "Returned: %d\n", ret); - ok(WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT, "Asynchronous message sent instead\n"); - PulseEvent(hevent); - - recips = BSM_APPLICATIONS; - ret = broadcastex( BSF_POSTMESSAGE|BSF_SENDNOTIFYMESSAGE, &recips, WM_NULL, 100, 0, NULL ); - ok(ret==1, "Returned: %d\n", ret); - ok(WaitForSingleObject(hevent, 0) != WAIT_OBJECT_0, "Synchronous message sent instead\n"); - PulseEvent(hevent); - - recips = BSM_APPLICATIONS; - ret = broadcastex( BSF_SENDNOTIFYMESSAGE, &recips, WM_NULL, 100, BROADCAST_QUERY_DENY, NULL ); - ok(ret==1, "Returned: %d\n", ret); - ok(WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT, "Asynchronous message sent instead\n"); - PulseEvent(hevent); - - recips = BSM_APPLICATIONS; - ret = broadcastex( BSF_SENDNOTIFYMESSAGE|BSF_QUERY, &recips, WM_NULL, 100, BROADCAST_QUERY_DENY, NULL ); - ok(!ret, "Returned: %d\n", ret); - ok(WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT, "Asynchronous message sent instead\n"); - PulseEvent(hevent); - - recips = BSM_APPLICATIONS; - ret = broadcastex( 0, &recips, WM_NULL, 100, 0, NULL ); - ok(ret==1, "Returned: %d\n", ret); - ok(WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT, "Asynchronous message sent instead\n"); - PulseEvent(hevent); -} - -static BOOL (WINAPI *pOpenProcessToken)(HANDLE, DWORD, HANDLE*); -static BOOL (WINAPI *pAdjustTokenPrivileges)(HANDLE, BOOL, PTOKEN_PRIVILEGES, DWORD, PTOKEN_PRIVILEGES, PDWORD); - -static void test_noprivileges(void) -{ - HANDLE advapi32 = GetModuleHandleA("advapi32"); - HANDLE token; - DWORD recips; - BOOL ret; - - static const DWORD BSM_ALL_RECIPS = BSM_VXDS | BSM_NETDRIVER | - BSM_INSTALLABLEDRIVERS | BSM_APPLICATIONS; - - pOpenProcessToken = (void *)GetProcAddress(advapi32, "OpenProcessToken"); - pAdjustTokenPrivileges = (void *)GetProcAddress(advapi32, "AdjustTokenPrivileges"); - if (!pOpenProcessToken || !pAdjustTokenPrivileges || !pOpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &token)) - { - skip("Can't open security token for process\n"); - return; - } - if (!pAdjustTokenPrivileges(token, TRUE, NULL, 0, NULL, NULL)) - { - skip("Can't adjust security token for process\n"); - return; - } - - trace("Trying privileged edition!\n"); - SetLastError(0xcafebabe); - recips = BSM_ALLDESKTOPS; - ResetEvent(hevent); - ret = pBroadcastExW( BSF_QUERY, &recips, WM_NULL, 100, 0, NULL ); - ok(ret==1, "Returned: %d error %u\n", ret, GetLastError()); - ok(WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT, "Asynchronous message sent instead\n"); - ok(recips == BSM_ALLDESKTOPS || - recips == BSM_ALL_RECIPS, /* win2k3 */ - "Received by: %08x\n", recips); - PulseEvent(hevent); - - SetLastError(0xcafebabe); - recips = BSM_ALLCOMPONENTS; - ResetEvent(hevent); - ret = pBroadcastExW( BSF_QUERY, &recips, WM_NULL, 100, 0, NULL ); - ok(ret==1, "Returned: %d error %u\n", ret, GetLastError()); - ok(WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT, "Asynchronous message sent instead\n"); - ok(recips == BSM_ALLCOMPONENTS || - recips == BSM_ALL_RECIPS, /* win2k3 */ - "Received by: %08x\n", recips); - PulseEvent(hevent); - - SetLastError(0xcafebabe); - recips = BSM_ALLDESKTOPS|BSM_APPLICATIONS; - ResetEvent(hevent); - ret = pBroadcastExW( BSF_QUERY, &recips, WM_NULL, 100, 0, NULL ); - ok(ret==1, "Returned: %d error %u\n", ret, GetLastError()); - ok(WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT, "Asynchronous message sent instead\n"); - ok(recips == (BSM_ALLDESKTOPS|BSM_APPLICATIONS) || - recips == BSM_APPLICATIONS, /* win2k3 */ - "Received by: %08x\n", recips); - PulseEvent(hevent); - - SetLastError(0xcafebabe); - recips = BSM_ALLDESKTOPS|BSM_APPLICATIONS; - ResetEvent(hevent); - ret = pBroadcastExW( BSF_QUERY, &recips, WM_NULL, 100, BROADCAST_QUERY_DENY, NULL ); - ok(!ret, "Returned: %d\n", ret); - ok(WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT, "Asynchronous message sent instead\n"); - ok(recips == (BSM_ALLDESKTOPS|BSM_APPLICATIONS) || - recips == BSM_APPLICATIONS, /* win2k3 */ - "Received by: %08x\n", recips); - PulseEvent(hevent); -} - -START_TEST(broadcast) -{ - if (!init_procs()) - return; - - trace("Running BroadcastSystemMessageA tests\n"); - test_parameters(pBroadcastA, "BroadcastSystemMessageA"); - if (pBroadcastW) - { - trace("Running BroadcastSystemMessageW tests\n"); - test_parameters(pBroadcastW, "BroadcastSystemMessageW"); - } - else - win_skip("No BroadcastSystemMessageW, skipping\n"); - if (pBroadcastExA) - { - trace("Running BroadcastSystemMessageExA tests\n"); - test_parametersEx(pBroadcastExA); - } - else - win_skip("No BroadcastSystemMessageExA, skipping\n"); - if (pBroadcastExW) - { - trace("Running BroadcastSystemMessageExW tests\n"); - test_parametersEx(pBroadcastExW); - trace("Attempting privileges checking tests\n"); - test_noprivileges(); - } - else - win_skip("No BroadcastSystemMessageExW, skipping\n"); -} diff --git a/rostests/winetests/user32/class.c b/rostests/winetests/user32/class.c deleted file mode 100755 index f9d1aef8325..00000000000 --- a/rostests/winetests/user32/class.c +++ /dev/null @@ -1,1002 +0,0 @@ -/* Unit test suite for window classes. - * - * Copyright 2002 Mike McCormack - * Copyright 2003 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 - */ - -/* To get CS_DROPSHADOW with the MSVC headers */ -//#define _WIN32_WINNT 0x0501 - -#include -#include -#include -#include - -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" - -/* we don't want to include commctrl.h: */ -static const CHAR WC_EDITA[] = "Edit"; -static const WCHAR WC_EDITW[] = {'E','d','i','t',0}; - -#define NUMCLASSWORDS 4 - -#define IS_WNDPROC_HANDLE(x) (((ULONG_PTR)(x) >> 16) == (~0u >> 16)) - -static LRESULT WINAPI ClassTest_WndProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - if (msg == WM_NCCREATE) return 1; - return DefWindowProcW (hWnd, msg, wParam, lParam); -} - -static LRESULT WINAPI ClassTest_WndProc2 (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - if (msg == WM_NCCREATE) return 1; - return DefWindowProcA (hWnd, msg, wParam, lParam); -} - -/*********************************************************************** - */ -static void ClassTest(HINSTANCE hInstance, BOOL global) -{ - WNDCLASSW cls, wc; - static const WCHAR className[] = {'T','e','s','t','C','l','a','s','s',0}; - static const WCHAR winName[] = {'W','i','n','C','l','a','s','s','T','e','s','t',0}; - ATOM test_atom; - HWND hTestWnd; - LONG i; - WCHAR str[20]; - ATOM classatom; - - cls.style = CS_HREDRAW | CS_VREDRAW | (global?CS_GLOBALCLASS:0); - cls.lpfnWndProc = ClassTest_WndProc; - cls.cbClsExtra = NUMCLASSWORDS*sizeof(DWORD); - cls.cbWndExtra = 12; - cls.hInstance = hInstance; - cls.hIcon = LoadIconW (0, (LPWSTR)IDI_APPLICATION); - cls.hCursor = LoadCursorW (0, (LPWSTR)IDC_ARROW); - cls.hbrBackground = GetStockObject (WHITE_BRUSH); - cls.lpszMenuName = 0; - cls.lpszClassName = className; - - classatom=RegisterClassW(&cls); - if (!classatom && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) - return; - ok(classatom, "failed to register class\n"); - - ok(!RegisterClassW (&cls), - "RegisterClass of the same class should fail for the second time\n"); - - /* Setup windows */ - hTestWnd = CreateWindowW (className, winName, - WS_OVERLAPPEDWINDOW + WS_HSCROLL + WS_VSCROLL, - CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, 0, - 0, hInstance, 0); - - ok(hTestWnd!=0, "Failed to create window\n"); - - /* test initial values of valid classwords */ - for(i=0; iname, class_info->inst, class_info->info_inst, class_info->gcl_inst); - - return 0; -} - -static void check_thread_instance( const char *name, HINSTANCE inst, HINSTANCE info_inst, HINSTANCE gcl_inst ) -{ - HANDLE hThread; - DWORD tid; - struct class_info class_info; - - class_info.name = name; - class_info.inst = inst; - class_info.info_inst = info_inst; - class_info.gcl_inst = gcl_inst; - - hThread = CreateThread(NULL, 0, thread_proc, &class_info, 0, &tid); - ok(hThread != NULL, "CreateThread failed, error %d\n", GetLastError()); - ok(WaitForSingleObject(hThread, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n"); - CloseHandle(hThread); -} - -/* test various instance parameters */ -static void test_instances(void) -{ - WNDCLASSA cls, wc; - WNDCLASSEXA wcexA; - HWND hwnd, hwnd2; - const char *name = "__test__"; - HINSTANCE kernel32 = GetModuleHandleA("kernel32"); - HINSTANCE user32 = GetModuleHandleA("user32"); - HINSTANCE main_module = GetModuleHandleA(NULL); - HINSTANCE zero_instance = 0; - DWORD r; - char buffer[0x10]; - - memset( &cls, 0, sizeof(cls) ); - cls.style = CS_HREDRAW | CS_VREDRAW; - cls.lpfnWndProc = ClassTest_WndProc; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.lpszClassName = name; - - cls.lpszMenuName = "main_module"; - cls.hInstance = main_module; - - ok( RegisterClassA( &cls ), "Failed to register local class for main module\n" ); - check_class( main_module, name, "main_module" ); - check_instance( name, main_module, main_module, main_module ); - check_thread_instance( name, main_module, main_module, main_module ); - - cls.lpszMenuName = "kernel32"; - cls.hInstance = kernel32; - ok( RegisterClassA( &cls ), "Failed to register local class for kernel32\n" ); - check_class( kernel32, name, "kernel32" ); - check_class( main_module, name, "main_module" ); - check_instance( name, kernel32, kernel32, kernel32 ); - check_thread_instance( name, kernel32, kernel32, kernel32 ); - ok( UnregisterClassA( name, kernel32 ), "Unregister failed for kernel32\n" ); - - ZeroMemory(&wcexA, sizeof(wcexA)); - wcexA.lpfnWndProc = DefWindowProcA; - wcexA.lpszClassName = "__classex_test__"; - SetLastError(0xdeadbeef); - wcexA.cbSize = sizeof(wcexA) - 1; - ok( ((RegisterClassExA( &wcexA ) == 0) && (GetLastError() == ERROR_INVALID_PARAMETER)), - "Succeeded with invalid number of cbSize bytes\n"); - SetLastError(0xdeadbeef); - wcexA.cbSize = sizeof(wcexA) + 1; - ok( ((RegisterClassExA( &wcexA ) == 0) && (GetLastError() == ERROR_INVALID_PARAMETER)), - "Succeeded with invalid number of cbSize bytes\n"); - SetLastError(0xdeadbeef); - wcexA.cbSize = sizeof(wcexA); - ok( RegisterClassExA( &wcexA ), "Failed with valid number of cbSize bytes\n"); - wcexA.cbSize = 0xdeadbeef; - ok( GetClassInfoEx(main_module, wcexA.lpszClassName, &wcexA), "GetClassInfoEx failed\n"); - ok( wcexA.cbSize == 0xdeadbeef, "GetClassInfoEx returned wrong cbSize value %d\n", wcexA.cbSize); - UnregisterClassA(wcexA.lpszClassName, main_module); - - /* Bug 2631 - Supplying an invalid number of bytes fails */ - cls.cbClsExtra = 0; - cls.cbWndExtra = -1; - SetLastError(0xdeadbeef); - ok( ((RegisterClassA( &cls ) == 0) && (GetLastError() == ERROR_INVALID_PARAMETER)), - "Failed with invalid number of WndExtra bytes\n"); - - cls.cbClsExtra = -1; - cls.cbWndExtra = 0; - SetLastError(0xdeadbeef); - ok( ((RegisterClassA( &cls ) == 0) && (GetLastError() == ERROR_INVALID_PARAMETER)), - "Failed with invalid number of ClsExtra bytes\n"); - - cls.cbClsExtra = -1; - cls.cbWndExtra = -1; - SetLastError(0xdeadbeef); - ok( ((RegisterClassA( &cls ) == 0) && (GetLastError() == ERROR_INVALID_PARAMETER)), - "Failed with invalid number of ClsExtra and cbWndExtra bytes\n"); - - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - SetLastError(0xdeadbeef); - - /* setting global flag doesn't change status of class */ - hwnd = CreateWindowExA( 0, name, "test", 0, 0, 0, 0, 0, 0, 0, main_module, 0 ); - ok( hwnd != 0, "CreateWindow failed error %u\n", GetLastError()); - SetClassLongA( hwnd, GCL_STYLE, CS_GLOBALCLASS ); - cls.lpszMenuName = "kernel32"; - cls.hInstance = kernel32; - ok( RegisterClassA( &cls ), "Failed to register local class for kernel32\n" ); - check_class( kernel32, name, "kernel32" ); - check_class( main_module, name, "main_module" ); - check_instance( name, kernel32, kernel32, kernel32 ); - check_instance( name, main_module, main_module, main_module ); - check_thread_instance( name, kernel32, kernel32, kernel32 ); - check_thread_instance( name, main_module, main_module, main_module ); - ok( UnregisterClassA( name, kernel32 ), "Unregister failed for kernel32\n" ); - - /* changing the instance doesn't make it global */ - SetClassLongPtrA( hwnd, GCLP_HMODULE, 0 ); - ok( RegisterClassA( &cls ), "Failed to register local class for kernel32\n" ); - check_class( kernel32, name, "kernel32" ); - check_instance( name, kernel32, kernel32, kernel32 ); - check_thread_instance( name, kernel32, kernel32, kernel32 ); - ok( !GetClassInfo( 0, name, &wc ), "Class found with null instance\n" ); - ok( UnregisterClassA( name, kernel32 ), "Unregister failed for kernel32\n" ); - - /* GetClassInfo with instance 0 finds user32 instance */ - SetClassLongPtrA( hwnd, GCLP_HMODULE, (LONG_PTR)user32 ); - ok( RegisterClassA( &cls ), "Failed to register local class for kernel32\n" ); - if (!GetClassInfo( 0, name, &wc )) zero_instance = user32; /* instance 0 not supported on wow64 */ - else - { - check_instance( name, 0, 0, kernel32 ); - check_thread_instance( name, 0, 0, kernel32 ); - } - check_class( kernel32, name, "kernel32" ); - check_class( user32, name, "main_module" ); - check_class( zero_instance, name, "main_module" ); - check_instance( name, kernel32, kernel32, kernel32 ); - check_instance( name, user32, zero_instance, user32 ); - check_thread_instance( name, kernel32, kernel32, kernel32 ); - check_thread_instance( name, user32, zero_instance, user32 ); - ok( UnregisterClassA( name, kernel32 ), "Unregister failed for kernel32\n" ); - - SetClassLongPtrA( hwnd, GCLP_HMODULE, 0x12345678 ); - ok( RegisterClassA( &cls ), "Failed to register local class for kernel32\n" ); - check_class( kernel32, name, "kernel32" ); - check_class( (HINSTANCE)0x12345678, name, "main_module" ); - check_instance( name, kernel32, kernel32, kernel32 ); - check_instance( name, (HINSTANCE)0x12345678, (HINSTANCE)0x12345678, (HINSTANCE)0x12345678 ); - check_thread_instance( name, kernel32, kernel32, kernel32 ); - check_thread_instance( name, (HINSTANCE)0x12345678, (HINSTANCE)0x12345678, (HINSTANCE)0x12345678 ); - ok( !GetClassInfo( 0, name, &wc ), "Class found with null instance\n" ); - - /* creating a window with instance 0 uses the first class found */ - cls.hInstance = (HINSTANCE)0xdeadbeef; - cls.lpszMenuName = "deadbeef"; - cls.style = 3; - ok( RegisterClassA( &cls ), "Failed to register local class for deadbeef\n" ); - hwnd2 = CreateWindowExA( 0, name, "test_window", 0, 0, 0, 0, 0, 0, 0, NULL, 0 ); - ok( GetClassLongPtrA( hwnd2, GCLP_HMODULE ) == 0xdeadbeef, - "Didn't get deadbeef class for null instance\n" ); - DestroyWindow( hwnd2 ); - ok( UnregisterClassA( name, (HINSTANCE)0xdeadbeef ), "Unregister failed for deadbeef\n" ); - - hwnd2 = CreateWindowExA( 0, name, "test_window", 0, 0, 0, 0, 0, 0, 0, NULL, 0 ); - ok( (HINSTANCE)GetClassLongPtrA( hwnd2, GCLP_HMODULE ) == kernel32, - "Didn't get kernel32 class for null instance\n" ); - DestroyWindow( hwnd2 ); - - r = GetClassName( hwnd, buffer, 4 ); - ok( r == 3, "expected 3, got %d\n", r ); - ok( !strcmp( buffer, "__t"), "name wrong: %s\n", buffer ); - - ok( UnregisterClassA( name, kernel32 ), "Unregister failed for kernel32\n" ); - - hwnd2 = CreateWindowExA( 0, name, "test_window", 0, 0, 0, 0, 0, 0, 0, NULL, 0 ); - ok( GetClassLongPtrA( hwnd2, GCLP_HMODULE ) == 0x12345678, - "Didn't get 12345678 class for null instance\n" ); - DestroyWindow( hwnd2 ); - - SetClassLongPtrA( hwnd, GCLP_HMODULE, (LONG_PTR)main_module ); - DestroyWindow( hwnd ); - - /* null handle means the same thing as main module */ - cls.lpszMenuName = "null"; - cls.hInstance = 0; - ok( !RegisterClassA( &cls ), "Succeeded registering local class for null instance\n" ); - ok( GetLastError() == ERROR_CLASS_ALREADY_EXISTS, "Wrong error code %d\n", GetLastError() ); - ok( UnregisterClassA( name, main_module ), "Unregister failed for main module\n" ); - - ok( RegisterClassA( &cls ), "Failed to register local class for null instance\n" ); - /* must be found with main module handle */ - check_class( main_module, name, "null" ); - check_instance( name, main_module, main_module, main_module ); - check_thread_instance( name, main_module, main_module, main_module ); - ok( !GetClassInfo( 0, name, &wc ), "Class found with null instance\n" ); - ok( GetLastError() == ERROR_CLASS_DOES_NOT_EXIST, "Wrong error code %d\n", GetLastError() ); - ok( UnregisterClassA( name, 0 ), "Unregister failed for null instance\n" ); - - /* registering for user32 always fails */ - cls.lpszMenuName = "user32"; - cls.hInstance = user32; - ok( !RegisterClassA( &cls ), "Succeeded registering local class for user32\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "Wrong error code %d\n", GetLastError() ); - cls.style |= CS_GLOBALCLASS; - ok( !RegisterClassA( &cls ), "Succeeded registering global class for user32\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "Wrong error code %d\n", GetLastError() ); - - /* unregister is OK though */ - cls.hInstance = main_module; - ok( RegisterClassA( &cls ), "Failed to register global class for main module\n" ); - ok( UnregisterClassA( name, user32 ), "Unregister failed for user32\n" ); - - /* instance doesn't matter for global class */ - cls.style |= CS_GLOBALCLASS; - cls.lpszMenuName = "main_module"; - cls.hInstance = main_module; - ok( RegisterClassA( &cls ), "Failed to register global class for main module\n" ); - cls.lpszMenuName = "kernel32"; - cls.hInstance = kernel32; - ok( !RegisterClassA( &cls ), "Succeeded registering local class for kernel32\n" ); - ok( GetLastError() == ERROR_CLASS_ALREADY_EXISTS, "Wrong error code %d\n", GetLastError() ); - /* even if global flag is cleared */ - hwnd = CreateWindowExA( 0, name, "test", 0, 0, 0, 0, 0, 0, 0, main_module, 0 ); - SetClassLongA( hwnd, GCL_STYLE, 0 ); - ok( !RegisterClassA( &cls ), "Succeeded registering local class for kernel32\n" ); - ok( GetLastError() == ERROR_CLASS_ALREADY_EXISTS, "Wrong error code %d\n", GetLastError() ); - - check_class( main_module, name, "main_module" ); - check_class( kernel32, name, "main_module" ); - check_class( 0, name, "main_module" ); - check_class( (HINSTANCE)0x12345678, name, "main_module" ); - check_instance( name, main_module, main_module, main_module ); - check_instance( name, (HINSTANCE)0xdeadbeef, (HINSTANCE)0xdeadbeef, main_module ); - check_thread_instance( name, main_module, main_module, main_module ); - check_thread_instance( name, (HINSTANCE)0xdeadbeef, (HINSTANCE)0xdeadbeef, main_module ); - - /* changing the instance for global class doesn't make much difference */ - SetClassLongPtrA( hwnd, GCLP_HMODULE, 0xdeadbeef ); - check_instance( name, main_module, main_module, (HINSTANCE)0xdeadbeef ); - check_instance( name, (HINSTANCE)0xdeadbeef, (HINSTANCE)0xdeadbeef, (HINSTANCE)0xdeadbeef ); - check_thread_instance( name, main_module, main_module, (HINSTANCE)0xdeadbeef ); - check_thread_instance( name, (HINSTANCE)0xdeadbeef, (HINSTANCE)0xdeadbeef, (HINSTANCE)0xdeadbeef ); - - DestroyWindow( hwnd ); - ok( UnregisterClassA( name, (HINSTANCE)0x87654321 ), "Unregister failed for main module global\n" ); - ok( !UnregisterClassA( name, (HINSTANCE)0x87654321 ), "Unregister succeeded the second time\n" ); - ok( GetLastError() == ERROR_CLASS_DOES_NOT_EXIST, "Wrong error code %d\n", GetLastError() ); - - cls.hInstance = (HINSTANCE)0x12345678; - ok( RegisterClassA( &cls ), "Failed to register global class for dummy instance\n" ); - check_instance( name, main_module, main_module, (HINSTANCE)0x12345678 ); - check_instance( name, (HINSTANCE)0xdeadbeef, (HINSTANCE)0xdeadbeef, (HINSTANCE)0x12345678 ); - check_thread_instance( name, main_module, main_module, (HINSTANCE)0x12345678 ); - check_thread_instance( name, (HINSTANCE)0xdeadbeef, (HINSTANCE)0xdeadbeef, (HINSTANCE)0x12345678 ); - ok( UnregisterClassA( name, (HINSTANCE)0x87654321 ), "Unregister failed for main module global\n" ); - - /* check system classes */ - - /* we cannot register a global class with the name of a system class */ - cls.style |= CS_GLOBALCLASS; - cls.lpszMenuName = "button_main_module"; - cls.lpszClassName = "BUTTON"; - cls.hInstance = main_module; - ok( !RegisterClassA( &cls ), "Succeeded registering global button class for main module\n" ); - ok( GetLastError() == ERROR_CLASS_ALREADY_EXISTS, "Wrong error code %d\n", GetLastError() ); - cls.hInstance = kernel32; - ok( !RegisterClassA( &cls ), "Succeeded registering global button class for kernel32\n" ); - ok( GetLastError() == ERROR_CLASS_ALREADY_EXISTS, "Wrong error code %d\n", GetLastError() ); - - /* local class is OK however */ - cls.style &= ~CS_GLOBALCLASS; - cls.lpszMenuName = "button_main_module"; - cls.hInstance = main_module; - ok( RegisterClassA( &cls ), "Failed to register local button class for main module\n" ); - check_class( main_module, "BUTTON", "button_main_module" ); - cls.lpszMenuName = "button_kernel32"; - cls.hInstance = kernel32; - ok( RegisterClassA( &cls ), "Failed to register local button class for kernel32\n" ); - check_class( kernel32, "BUTTON", "button_kernel32" ); - check_class( main_module, "BUTTON", "button_main_module" ); - ok( UnregisterClassA( "BUTTON", kernel32 ), "Unregister failed for kernel32 button\n" ); - ok( UnregisterClassA( "BUTTON", main_module ), "Unregister failed for main module button\n" ); - /* GetClassInfo sets instance to passed value for global classes */ - check_instance( "BUTTON", 0, 0, user32 ); - check_instance( "BUTTON", (HINSTANCE)0xdeadbeef, (HINSTANCE)0xdeadbeef, user32 ); - check_instance( "BUTTON", user32, zero_instance, user32 ); - check_thread_instance( "BUTTON", 0, 0, user32 ); - check_thread_instance( "BUTTON", (HINSTANCE)0xdeadbeef, (HINSTANCE)0xdeadbeef, user32 ); - check_thread_instance( "BUTTON", user32, zero_instance, user32 ); - - /* we can unregister system classes */ - ok( GetClassInfo( 0, "BUTTON", &wc ), "Button class not found with null instance\n" ); - ok( GetClassInfo( kernel32, "BUTTON", &wc ), "Button class not found with kernel32\n" ); - ok( UnregisterClass( "BUTTON", (HINSTANCE)0x12345678 ), "Failed to unregister button\n" ); - ok( !UnregisterClass( "BUTTON", (HINSTANCE)0x87654321 ), "Unregistered button a second time\n" ); - ok( GetLastError() == ERROR_CLASS_DOES_NOT_EXIST, "Wrong error code %d\n", GetLastError() ); - ok( !GetClassInfo( 0, "BUTTON", &wc ), "Button still exists\n" ); - /* last error not set reliably */ - - /* we can change the instance of a system class */ - check_instance( "EDIT", (HINSTANCE)0xdeadbeef, (HINSTANCE)0xdeadbeef, user32 ); - check_thread_instance( "EDIT", (HINSTANCE)0xdeadbeef, (HINSTANCE)0xdeadbeef, user32 ); - hwnd = CreateWindowExA( 0, "EDIT", "test", 0, 0, 0, 0, 0, 0, 0, main_module, 0 ); - SetClassLongPtrA( hwnd, GCLP_HMODULE, 0xdeadbeef ); - check_instance( "EDIT", (HINSTANCE)0x12345678, (HINSTANCE)0x12345678, (HINSTANCE)0xdeadbeef ); - check_thread_instance( "EDIT", (HINSTANCE)0x12345678, (HINSTANCE)0x12345678, (HINSTANCE)0xdeadbeef ); - DestroyWindow(hwnd); -} - -static void test_builtinproc(void) -{ - /* Edit behaves differently */ - static const CHAR NORMAL_CLASSES[][10] = { - "Button", - "Static", - "ComboBox", - "ComboLBox", - "ListBox", - "ScrollBar", - "#32770", /* dialog */ - }; - static const int NUM_NORMAL_CLASSES = (sizeof(NORMAL_CLASSES)/sizeof(NORMAL_CLASSES[0])); - static const char classA[] = "deftest"; - static const WCHAR classW[] = {'d','e','f','t','e','s','t',0}; - WCHAR unistring[] = {0x142, 0x40e, 0x3b4, 0}; /* a string that would be destroyed by a W->A->W conversion */ - WNDPROC pDefWindowProcA, pDefWindowProcW; - WNDPROC pNtdllDefWindowProcA, pNtdllDefWindowProcW; - WNDPROC oldproc; - WNDCLASSEXA cls; /* the memory layout of WNDCLASSEXA and WNDCLASSEXW is the same */ - WCHAR buf[128]; - ATOM atom; - HWND hwnd; - int i; - - pDefWindowProcA = (void *)GetProcAddress(GetModuleHandle("user32.dll"), "DefWindowProcA"); - pDefWindowProcW = (void *)GetProcAddress(GetModuleHandle("user32.dll"), "DefWindowProcW"); - pNtdllDefWindowProcA = (void *)GetProcAddress(GetModuleHandle("ntdll.dll"), "NtdllDefWindowProc_A"); - pNtdllDefWindowProcW = (void *)GetProcAddress(GetModuleHandle("ntdll.dll"), "NtdllDefWindowProc_W"); - - /* On Vista+, the user32.dll export DefWindowProcA/W is forwarded to */ - /* ntdll.NtdllDefWindowProc_A/W. However, the wndproc returned by */ - /* GetClassLong/GetWindowLong points to an unexported user32 function */ - if (pDefWindowProcA == pNtdllDefWindowProcA && - pDefWindowProcW == pNtdllDefWindowProcW) - skip("user32.DefWindowProcX forwarded to ntdll.NtdllDefWindowProc_X\n"); - else - { - for (i = 0; i < 4; i++) - { - ZeroMemory(&cls, sizeof(cls)); - cls.cbSize = sizeof(cls); - cls.hInstance = GetModuleHandle(NULL); - cls.hbrBackground = GetStockObject (WHITE_BRUSH); - if (i & 1) - cls.lpfnWndProc = pDefWindowProcA; - else - cls.lpfnWndProc = pDefWindowProcW; - - if (i & 2) - { - cls.lpszClassName = classA; - atom = RegisterClassExA(&cls); - } - else - { - cls.lpszClassName = (LPCSTR)classW; - atom = RegisterClassExW((WNDCLASSEXW *)&cls); - } - ok(atom != 0, "Couldn't register class, i=%d, %d\n", i, GetLastError()); - - hwnd = CreateWindowA(classA, NULL, 0, 0, 0, 100, 100, NULL, NULL, GetModuleHandle(NULL), NULL); - ok(hwnd != NULL, "Couldn't create window i=%d\n", i); - - ok(GetWindowLongPtrA(hwnd, GWLP_WNDPROC) == (LONG_PTR)pDefWindowProcA, "Wrong ANSI wndproc: %p vs %p\n", - (void *)GetWindowLongPtrA(hwnd, GWLP_WNDPROC), pDefWindowProcA); - ok(GetClassLongPtrA(hwnd, GCLP_WNDPROC) == (ULONG_PTR)pDefWindowProcA, "Wrong ANSI wndproc: %p vs %p\n", - (void *)GetClassLongPtrA(hwnd, GCLP_WNDPROC), pDefWindowProcA); - - ok(GetWindowLongPtrW(hwnd, GWLP_WNDPROC) == (LONG_PTR)pDefWindowProcW, "Wrong Unicode wndproc: %p vs %p\n", - (void *)GetWindowLongPtrW(hwnd, GWLP_WNDPROC), pDefWindowProcW); - ok(GetClassLongPtrW(hwnd, GCLP_WNDPROC) == (ULONG_PTR)pDefWindowProcW, "Wrong Unicode wndproc: %p vs %p\n", - (void *)GetClassLongPtrW(hwnd, GCLP_WNDPROC), pDefWindowProcW); - - DestroyWindow(hwnd); - UnregisterClass((LPSTR)(DWORD_PTR)atom, GetModuleHandle(NULL)); - } - } - - /* built-in winproc - window A/W type automatically detected */ - ZeroMemory(&cls, sizeof(cls)); - cls.cbSize = sizeof(cls); - cls.hInstance = GetModuleHandle(NULL); - cls.hbrBackground = GetStockObject (WHITE_BRUSH); - cls.lpszClassName = classA; - cls.lpfnWndProc = pDefWindowProcW; - atom = RegisterClassExA(&cls); - - hwnd = CreateWindowExW(0, classW, NULL, WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, 680, 260, NULL, NULL, GetModuleHandleA(NULL), 0); - ok(IsWindowUnicode(hwnd), "Windows should be Unicode\n"); - SetWindowLongPtrW(hwnd, GWLP_WNDPROC, (LONG_PTR)pDefWindowProcA); - ok(IsWindowUnicode(hwnd), "Windows should have remained Unicode\n"); - if (GetWindowLongPtrW(hwnd, GWLP_WNDPROC) == (LONG_PTR)pDefWindowProcA) - { - /* DefWindowProc isn't magic on wow64 */ - ok(IS_WNDPROC_HANDLE(GetWindowLongPtrA(hwnd, GWLP_WNDPROC)), "Ansi winproc is not a handle\n"); - } - else - { - ok(GetWindowLongPtrW(hwnd, GWLP_WNDPROC) == (LONG_PTR)pDefWindowProcW, "Invalid Unicode winproc\n"); - ok(GetWindowLongPtrA(hwnd, GWLP_WNDPROC) == (LONG_PTR)pDefWindowProcA, "Invalid Ansi winproc\n"); - } - SetWindowLongPtrA(hwnd, GWLP_WNDPROC, (LONG_PTR)ClassTest_WndProc); - ok(IsWindowUnicode(hwnd) == FALSE, "SetWindowLongPtrA should have switched window to ANSI\n"); - - DestroyWindow(hwnd); - UnregisterClass((LPSTR)(DWORD_PTR)atom, GetModuleHandle(NULL)); - - /* custom winproc - the same function can be used as both A and W*/ - ZeroMemory(&cls, sizeof(cls)); - cls.cbSize = sizeof(cls); - cls.hInstance = GetModuleHandle(NULL); - cls.hbrBackground = GetStockObject (WHITE_BRUSH); - cls.lpszClassName = classA; - cls.lpfnWndProc = ClassTest_WndProc2; - atom = RegisterClassExA(&cls); - - hwnd = CreateWindowExW(0, classW, NULL, WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, 680, 260, NULL, NULL, GetModuleHandleA(NULL), 0); - ok(IsWindowUnicode(hwnd) == FALSE, "Window should be ANSI\n"); - SetWindowLongPtrW(hwnd, GWLP_WNDPROC, (LONG_PTR)ClassTest_WndProc); - ok(IsWindowUnicode(hwnd), "SetWindowLongPtrW should have changed window to Unicode\n"); - SetWindowLongPtrA(hwnd, GWLP_WNDPROC, (LONG_PTR)ClassTest_WndProc); - ok(IsWindowUnicode(hwnd) == FALSE, "SetWindowLongPtrA should have changed window to ANSI\n"); - - DestroyWindow(hwnd); - UnregisterClass((LPSTR)(DWORD_PTR)atom, GetModuleHandle(NULL)); - - /* For most of the builtin controls both GetWindowLongPtrA and W returns a pointer that is executed directly - * by CallWindowProcA/W */ - for (i = 0; i < NUM_NORMAL_CLASSES; i++) - { - WNDPROC procA, procW; - hwnd = CreateWindowExA(0, NORMAL_CLASSES[i], classA, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 680, 260, - NULL, NULL, NULL, 0); - ok(hwnd != NULL, "Couldn't create window of class %s\n", NORMAL_CLASSES[i]); - SetWindowText(hwnd, classA); /* ComboBox needs this */ - procA = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_WNDPROC); - procW = (WNDPROC)GetWindowLongPtrW(hwnd, GWLP_WNDPROC); - ok(!IS_WNDPROC_HANDLE(procA), "procA should not be a handle for %s (%p)\n", NORMAL_CLASSES[i], procA); - ok(!IS_WNDPROC_HANDLE(procW), "procW should not be a handle for %s (%p)\n", NORMAL_CLASSES[i], procW); - CallWindowProcA(procA, hwnd, WM_GETTEXT, 120, (LPARAM)buf); - ok(memcmp(buf, classA, sizeof(classA)) == 0, "WM_GETTEXT A/A invalid return for class %s\n", NORMAL_CLASSES[i]); - CallWindowProcA(procW, hwnd, WM_GETTEXT, 120, (LPARAM)buf); - ok(memcmp(buf, classW, sizeof(classW)) == 0, "WM_GETTEXT A/W invalid return for class %s\n", NORMAL_CLASSES[i]); - CallWindowProcW(procA, hwnd, WM_GETTEXT, 120, (LPARAM)buf); - ok(memcmp(buf, classA, sizeof(classA)) == 0, "WM_GETTEXT W/A invalid return for class %s\n", NORMAL_CLASSES[i]); - CallWindowProcW(procW, hwnd, WM_GETTEXT, 120, (LPARAM)buf); - ok(memcmp(buf, classW, sizeof(classW)) == 0, "WM_GETTEXT W/W invalid return for class %s\n", NORMAL_CLASSES[i]); - - oldproc = (WNDPROC)SetWindowLongPtrW(hwnd, GWLP_WNDPROC, (LONG_PTR)ClassTest_WndProc); - ok(IS_WNDPROC_HANDLE(oldproc) == FALSE, "Class %s shouldn't return a handle\n", NORMAL_CLASSES[i]); - SetWindowLongPtrW(hwnd, GWLP_WNDPROC, (LONG_PTR)oldproc); - DestroyWindow(hwnd); - } - - /* Edit controls are special - they return a wndproc handle when GetWindowLongPtr is called with a different A/W. - * On the other hand there is no W->A->W conversion so this control is treated specially. */ - hwnd = CreateWindowW(WC_EDITW, unistring, WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, 680, 260, NULL, NULL, NULL, 0); - /* GetClassLongPtr returns that both the Unicode and ANSI wndproc */ - ok(IS_WNDPROC_HANDLE(GetClassLongPtrA(hwnd, GCLP_WNDPROC)) == FALSE, "Edit control class should have a Unicode wndproc\n"); - ok(IS_WNDPROC_HANDLE(GetClassLongPtrW(hwnd, GCLP_WNDPROC)) == FALSE, "Edit control class should have a ANSI wndproc\n"); - /* But GetWindowLongPtr returns only a handle for the ANSI one */ - ok(IS_WNDPROC_HANDLE(GetWindowLongPtrA(hwnd, GWLP_WNDPROC)), "Edit control should return a wndproc handle\n"); - ok(!IS_WNDPROC_HANDLE(GetWindowLongPtrW(hwnd, GWLP_WNDPROC)), "Edit control shouldn't return a W wndproc handle\n"); - CallWindowProcW((WNDPROC)GetWindowLongPtrW(hwnd, GWLP_WNDPROC), hwnd, WM_GETTEXT, 120, (LPARAM)buf); - ok(memcmp(buf, unistring, sizeof(unistring)) == 0, "WM_GETTEXT invalid return\n"); - CallWindowProcA((WNDPROC)GetWindowLongPtrW(hwnd, GWLP_WNDPROC), hwnd, WM_GETTEXT, 120, (LPARAM)buf); - ok(memcmp(buf, unistring, sizeof(unistring)) == 0, "WM_GETTEXT invalid return\n"); - CallWindowProcW((WNDPROC)GetWindowLongPtrA(hwnd, GWLP_WNDPROC), hwnd, WM_GETTEXT, 120, (LPARAM)buf); - ok(memcmp(buf, unistring, sizeof(unistring)) == 0, "WM_GETTEXT invalid return\n"); - - SetWindowTextW(hwnd, classW); - CallWindowProcA((WNDPROC)GetWindowLongPtrA(hwnd, GWLP_WNDPROC), hwnd, WM_GETTEXT, 120, (LPARAM)buf); - ok(memcmp(buf, classA, sizeof(classA)) == 0, "WM_GETTEXT invalid return\n"); - - oldproc = (WNDPROC)SetWindowLongPtrA(hwnd, GWLP_WNDPROC, (LONG_PTR)ClassTest_WndProc2); - /* SetWindowLongPtr returns a wndproc handle - like GetWindowLongPtr */ - ok(IS_WNDPROC_HANDLE(oldproc), "Edit control should return a wndproc handle\n"); - ok(IsWindowUnicode(hwnd) == FALSE, "SetWindowLongPtrA should have changed window to ANSI\n"); - SetWindowTextA(hwnd, classA); /* Windows resets the title to WideStringToMultiByte(unistring) */ - memset(buf, 0, sizeof(buf)); - CallWindowProcA((WNDPROC)GetWindowLongPtrA(hwnd, GWLP_WNDPROC), hwnd, WM_GETTEXT, 120, (LPARAM)buf); - ok(memcmp(buf, classA, sizeof(classA)) == 0, "WM_GETTEXT invalid return\n"); - CallWindowProcA((WNDPROC)GetWindowLongPtrW(hwnd, GWLP_WNDPROC), hwnd, WM_GETTEXT, 120, (LPARAM)buf); - ok(memcmp(buf, classA, sizeof(classA)) == 0, "WM_GETTEXT invalid return\n"); - CallWindowProcW((WNDPROC)GetWindowLongPtrA(hwnd, GWLP_WNDPROC), hwnd, WM_GETTEXT, 120, (LPARAM)buf); - ok(memcmp(buf, classA, sizeof(classA)) == 0, "WM_GETTEXT invalid return\n"); - - CallWindowProcW((WNDPROC)GetWindowLongPtrW(hwnd, GWLP_WNDPROC), hwnd, WM_GETTEXT, 120, (LPARAM)buf); - ok(memcmp(buf, classW, sizeof(classW)) == 0, "WM_GETTEXT invalid return\n"); - - SetWindowLongPtrA(hwnd, GWLP_WNDPROC, (LONG_PTR)oldproc); - - DestroyWindow(hwnd); - - hwnd = CreateWindowA(WC_EDITA, classA, WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, 680, 260, NULL, NULL, NULL, 0); - - /* GetClassLongPtr returns that both the Unicode and ANSI wndproc */ - ok(!IS_WNDPROC_HANDLE(GetClassLongPtrA(hwnd, GCLP_WNDPROC)), "Edit control class should have a Unicode wndproc\n"); - ok(!IS_WNDPROC_HANDLE(GetClassLongPtrW(hwnd, GCLP_WNDPROC)), "Edit control class should have a ANSI wndproc\n"); - /* But GetWindowLongPtr returns only a handle for the Unicode one */ - ok(!IS_WNDPROC_HANDLE(GetWindowLongPtrA(hwnd, GWLP_WNDPROC)), "Edit control shouldn't return an A wndproc handle\n"); - ok(IS_WNDPROC_HANDLE(GetWindowLongPtrW(hwnd, GWLP_WNDPROC)), "Edit control should return a wndproc handle\n"); - CallWindowProcA((WNDPROC)GetWindowLongPtrA(hwnd, GWLP_WNDPROC), hwnd, WM_GETTEXT, 120, (LPARAM)buf); - ok(memcmp(buf, classA, sizeof(classA)) == 0, "WM_GETTEXT invalid return\n"); - CallWindowProcA((WNDPROC)GetWindowLongPtrW(hwnd, GWLP_WNDPROC), hwnd, WM_GETTEXT, 120, (LPARAM)buf); - ok(memcmp(buf, classA, sizeof(classA)) == 0, "WM_GETTEXT invalid return\n"); - CallWindowProcW((WNDPROC)GetWindowLongPtrA(hwnd, GWLP_WNDPROC), hwnd, WM_GETTEXT, 120, (LPARAM)buf); - ok(memcmp(buf, classA, sizeof(classA)) == 0, "WM_GETTEXT invalid return\n"); - - CallWindowProcW((WNDPROC)GetWindowLongPtrW(hwnd, GWLP_WNDPROC), hwnd, WM_GETTEXT, 120, (LPARAM)buf); - ok(memcmp(buf, classW, sizeof(classW)) == 0, "WM_GETTEXT invalid return\n"); - - oldproc = (WNDPROC)SetWindowLongPtrW(hwnd, GWLP_WNDPROC, (LONG_PTR)ClassTest_WndProc); - SetWindowTextW(hwnd, unistring); - CallWindowProcW((WNDPROC)GetWindowLongPtrW(hwnd, GWLP_WNDPROC), hwnd, WM_GETTEXT, 120, (LPARAM)buf); - ok(memcmp(buf, unistring, sizeof(unistring)) == 0, "WM_GETTEXT invalid return\n"); - CallWindowProcA((WNDPROC)GetWindowLongPtrW(hwnd, GWLP_WNDPROC), hwnd, WM_GETTEXT, 120, (LPARAM)buf); - ok(memcmp(buf, unistring, sizeof(unistring)) == 0, "WM_GETTEXT invalid return\n"); - CallWindowProcW((WNDPROC)GetWindowLongPtrA(hwnd, GWLP_WNDPROC), hwnd, WM_GETTEXT, 120, (LPARAM)buf); - ok(memcmp(buf, unistring, sizeof(unistring)) == 0, "WM_GETTEXT invalid return\n"); - - SetWindowTextW(hwnd, classW); - CallWindowProcA((WNDPROC)GetWindowLongPtrA(hwnd, GWLP_WNDPROC), hwnd, WM_GETTEXT, 120, (LPARAM)buf); - ok(memcmp(buf, classA, sizeof(classA)) == 0, "WM_GETTEXT invalid return\n"); - - SetWindowLongPtrW(hwnd, GWLP_WNDPROC, (LONG_PTR)oldproc); - - DestroyWindow(hwnd); -} - - -static LRESULT WINAPI TestDlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - return DefWindowProc(hWnd, uMsg, wParam, lParam); -} - -static BOOL RegisterTestDialog(HINSTANCE hInstance) -{ - WNDCLASSEX wcx; - ATOM atom = 0; - - ZeroMemory(&wcx, sizeof(WNDCLASSEX)); - wcx.cbSize = sizeof(wcx); - wcx.lpfnWndProc = TestDlgProc; - wcx.cbClsExtra = 0; - wcx.cbWndExtra = DLGWINDOWEXTRA; - wcx.hInstance = hInstance; - wcx.hIcon = LoadIcon(NULL, IDI_APPLICATION); - wcx.hCursor = LoadCursor(NULL, IDC_ARROW); - wcx.hbrBackground = GetStockObject(WHITE_BRUSH); - wcx.lpszClassName = "TestDialog"; - wcx.lpszMenuName = "TestDialog"; - wcx.hIconSm = LoadImage(hInstance, MAKEINTRESOURCE(5), IMAGE_ICON, - GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), - LR_DEFAULTCOLOR); - - atom = RegisterClassEx(&wcx); - ok(atom != 0, "RegisterClassEx returned 0\n"); - - return atom; -} - -/* test registering a dialog box created by using the CLASS directive in a - resource file, then test creating the dialog using CreateDialogParam. */ -static void CreateDialogParamTest(HINSTANCE hInstance) -{ - HWND hWndMain; - - if (RegisterTestDialog(hInstance)) - { - hWndMain = CreateDialogParam(hInstance, "CLASS_TEST_DIALOG", NULL, 0, 0); - ok(hWndMain != NULL, "CreateDialogParam returned NULL\n"); - ShowWindow(hWndMain, SW_SHOW); - DestroyWindow(hWndMain); - } -} - -static const struct -{ - const char name[9]; - int value; - int badvalue; -} extra_values[] = -{ - {"#32770",30,30}, /* Dialog */ -#ifdef _WIN64 - {"Edit",8,8}, -#else - {"Edit",6,8}, /* Windows XP 64-bit returns 8 also to 32-bit applications */ -#endif -}; - -static void test_extra_values(void) -{ - int i; - for(i=0; i< sizeof(extra_values)/sizeof(extra_values[0]); i++) - { - WNDCLASSEX wcx; - BOOL ret = GetClassInfoEx(NULL,extra_values[i].name,&wcx); - - ok( ret, "GetClassInfo (0) failed for global class %s\n", extra_values[i].name); - if (!ret) continue; - ok(extra_values[i].value == wcx.cbWndExtra || broken(extra_values[i].badvalue == wcx.cbWndExtra), - "expected %d, got %d\n", extra_values[i].value, wcx.cbWndExtra); - } -} - -static void test_GetClassInfo(void) -{ - static const WCHAR staticW[] = {'s','t','a','t','i','c',0}; - WNDCLASSA wc; - WNDCLASSEXA wcx; - BOOL ret; - - SetLastError(0xdeadbeef); - ret = GetClassInfoA(0, "static", &wc); - ok(ret, "GetClassInfoA() error %d\n", GetLastError()); - -if (0) { /* crashes under XP */ - SetLastError(0xdeadbeef); - ret = GetClassInfoA(0, "static", NULL); - ok(ret, "GetClassInfoA() error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = GetClassInfoW(0, staticW, NULL); - ok(ret, "GetClassInfoW() error %d\n", GetLastError()); -} - - wcx.cbSize = sizeof(wcx); - SetLastError(0xdeadbeef); - ret = GetClassInfoExA(0, "static", &wcx); - ok(ret, "GetClassInfoExA() error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = GetClassInfoExA(0, "static", NULL); - ok(!ret, "GetClassInfoExA() should fail\n"); - ok(GetLastError() == ERROR_NOACCESS || - broken(GetLastError() == 0xdeadbeef), /* win9x */ - "expected ERROR_NOACCESS, got %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = GetClassInfoExW(0, staticW, NULL); - ok(!ret, "GetClassInfoExW() should fail\n"); - ok(GetLastError() == ERROR_NOACCESS || - broken(GetLastError() == 0xdeadbeef) /* NT4 */ || - broken(GetLastError() == ERROR_CALL_NOT_IMPLEMENTED), /* win9x */ - "expected ERROR_NOACCESS, got %d\n", GetLastError()); - - wcx.cbSize = 0; - wcx.lpfnWndProc = NULL; - SetLastError(0xdeadbeef); - ret = GetClassInfoExA(0, "static", &wcx); - ok(ret, "GetClassInfoExA() error %d\n", GetLastError()); - ok(wcx.cbSize == 0, "expected 0, got %u\n", wcx.cbSize); - ok(wcx.lpfnWndProc != NULL, "got null proc\n"); - - wcx.cbSize = sizeof(wcx) - 1; - wcx.lpfnWndProc = NULL; - SetLastError(0xdeadbeef); - ret = GetClassInfoExA(0, "static", &wcx); - ok(ret, "GetClassInfoExA() error %d\n", GetLastError()); - ok(wcx.cbSize == sizeof(wcx) - 1, "expected sizeof(wcx)-1, got %u\n", wcx.cbSize); - ok(wcx.lpfnWndProc != NULL, "got null proc\n"); - - wcx.cbSize = sizeof(wcx) + 1; - wcx.lpfnWndProc = NULL; - SetLastError(0xdeadbeef); - ret = GetClassInfoExA(0, "static", &wcx); - ok(ret, "GetClassInfoExA() error %d\n", GetLastError()); - ok(wcx.cbSize == sizeof(wcx) + 1, "expected sizeof(wcx)+1, got %u\n", wcx.cbSize); - ok(wcx.lpfnWndProc != NULL, "got null proc\n"); -} - -START_TEST(class) -{ - HANDLE hInstance = GetModuleHandleA( NULL ); - - test_GetClassInfo(); - test_extra_values(); - - if (!GetModuleHandleW(0)) - { - trace("Class test is incompatible with Win9x implementation, skipping\n"); - return; - } - - ClassTest(hInstance,FALSE); - ClassTest(hInstance,TRUE); - CreateDialogParamTest(hInstance); - test_styles(); - test_builtinproc(); - - /* this test unregisters the Button class so it should be executed at the end */ - test_instances(); -} diff --git a/rostests/winetests/user32/clipboard.c b/rostests/winetests/user32/clipboard.c deleted file mode 100755 index 266f629aa23..00000000000 --- a/rostests/winetests/user32/clipboard.c +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Unit test suite for clipboard functions. - * - * Copyright 2002 Dmitry Timoshkov - * - * 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/test.h" -#include "winbase.h" -#include "winerror.h" -#include "wingdi.h" -#include "winuser.h" - -static BOOL is_win9x = FALSE; - -#define test_last_error(expected_error) \ - do \ - { \ - if (!is_win9x) \ - ok(GetLastError() == expected_error, \ - "Last error should be set to %d, not %d\n", \ - expected_error, GetLastError()); \ - } while (0) - -static void test_ClipboardOwner(void) -{ - HWND hWnd1, hWnd2; - BOOL ret; - - SetLastError(0xdeadbeef); - ok(!GetClipboardOwner() && GetLastError() == 0xdeadbeef, - "could not perform clipboard test: clipboard already owned\n"); - - hWnd1 = CreateWindowExA(0, "static", NULL, WS_POPUP, - 0, 0, 10, 10, 0, 0, 0, NULL); - ok(hWnd1 != 0, "CreateWindowExA error %d\n", GetLastError()); - trace("hWnd1 = %p\n", hWnd1); - - hWnd2 = CreateWindowExA(0, "static", NULL, WS_POPUP, - 0, 0, 10, 10, 0, 0, 0, NULL); - ok(hWnd2 != 0, "CreateWindowExA error %d\n", GetLastError()); - trace("hWnd2 = %p\n", hWnd2); - - SetLastError(0xdeadbeef); - ok(!CloseClipboard(), "CloseClipboard should fail if clipboard wasn't open\n"); - ok(GetLastError() == ERROR_CLIPBOARD_NOT_OPEN || broken(GetLastError() == 0xdeadbeef), /* wow64 */ - "wrong error %u\n", GetLastError()); - - ok(OpenClipboard(0), "OpenClipboard failed\n"); - ok(!GetClipboardOwner(), "clipboard should still be not owned\n"); - ok(!OpenClipboard(hWnd1), "OpenClipboard should fail since clipboard already opened\n"); - ret = CloseClipboard(); - ok( ret, "CloseClipboard error %d\n", GetLastError()); - - ok(OpenClipboard(hWnd1), "OpenClipboard failed\n"); - - SetLastError(0xdeadbeef); - ret = OpenClipboard(hWnd2); - ok(!ret && (GetLastError() == 0xdeadbeef || GetLastError() == ERROR_ACCESS_DENIED), - "OpenClipboard should fail without setting last error value, or with ERROR_ACCESS_DENIED, got error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ok(!GetClipboardOwner() && GetLastError() == 0xdeadbeef, "clipboard should still be not owned\n"); - ret = EmptyClipboard(); - ok( ret, "EmptyClipboard error %d\n", GetLastError()); - ok(GetClipboardOwner() == hWnd1, "clipboard should be owned by %p, not by %p\n", hWnd1, GetClipboardOwner()); - - SetLastError(0xdeadbeef); - ret = OpenClipboard(hWnd2); - ok(!ret && (GetLastError() == 0xdeadbeef || GetLastError() == ERROR_ACCESS_DENIED), - "OpenClipboard should fail without setting last error value, or with ERROR_ACCESS_DENIED, got error %d\n", GetLastError()); - - ret = CloseClipboard(); - ok( ret, "CloseClipboard error %d\n", GetLastError()); - ok(GetClipboardOwner() == hWnd1, "clipboard should still be owned\n"); - - ret = DestroyWindow(hWnd1); - ok( ret, "DestroyWindow error %d\n", GetLastError()); - ret = DestroyWindow(hWnd2); - ok( ret, "DestroyWindow error %d\n", GetLastError()); - SetLastError(0xdeadbeef); - ok(!GetClipboardOwner() && GetLastError() == 0xdeadbeef, "clipboard should not be owned\n"); -} - -static void test_RegisterClipboardFormatA(void) -{ - ATOM atom_id; - UINT format_id, format_id2; - char buf[256]; - int len; - BOOL ret; - - format_id = RegisterClipboardFormatA("my_cool_clipboard_format"); - ok(format_id > 0xc000 && format_id < 0xffff, "invalid clipboard format id %04x\n", format_id); - - format_id2 = RegisterClipboardFormatA("MY_COOL_CLIPBOARD_FORMAT"); - ok(format_id2 == format_id, "invalid clipboard format id %04x\n", format_id2); - - len = GetClipboardFormatNameA(format_id, buf, 256); - ok(len == lstrlenA("my_cool_clipboard_format"), "wrong format name length %d\n", len); - ok(!lstrcmpA(buf, "my_cool_clipboard_format"), "wrong format name \"%s\"\n", buf); - - lstrcpyA(buf, "foo"); - SetLastError(0xdeadbeef); - len = GetAtomNameA((ATOM)format_id, buf, 256); - ok(len == 0, "GetAtomNameA should fail\n"); - test_last_error(ERROR_INVALID_HANDLE); - -todo_wine -{ - lstrcpyA(buf, "foo"); - SetLastError(0xdeadbeef); - len = GlobalGetAtomNameA((ATOM)format_id, buf, 256); - ok(len == 0, "GlobalGetAtomNameA should fail\n"); - test_last_error(ERROR_INVALID_HANDLE); -} - - SetLastError(0xdeadbeef); - atom_id = FindAtomA("my_cool_clipboard_format"); - ok(atom_id == 0, "FindAtomA should fail\n"); - test_last_error(ERROR_FILE_NOT_FOUND); - - if (0) - { - /* this relies on the clipboard and global atom table being different */ - SetLastError(0xdeadbeef); - atom_id = GlobalFindAtomA("my_cool_clipboard_format"); - ok(atom_id == 0, "GlobalFindAtomA should fail\n"); - test_last_error(ERROR_FILE_NOT_FOUND); - } - - for (format_id = 0; format_id < 0xffff; format_id++) - { - SetLastError(0xdeadbeef); - len = GetClipboardFormatNameA(format_id, buf, 256); - - if (format_id < 0xc000) - ok(!len, "GetClipboardFormatNameA should fail, but it returned %d (%s)\n", len, buf); - else - if (len) trace("%04x: %s\n", format_id, len ? buf : ""); - } - - ret = OpenClipboard(0); - ok( ret, "OpenClipboard error %d\n", GetLastError()); - - trace("# of formats available: %d\n", CountClipboardFormats()); - - format_id = 0; - while ((format_id = EnumClipboardFormats(format_id))) - { - ok(IsClipboardFormatAvailable(format_id), "format %04x was listed as available\n", format_id); - len = GetClipboardFormatNameA(format_id, buf, 256); - trace("%04x: %s\n", format_id, len ? buf : ""); - } - - ret = EmptyClipboard(); - ok( ret, "EmptyClipboard error %d\n", GetLastError()); - ret =CloseClipboard(); - ok( ret, "CloseClipboard error %d\n", GetLastError()); - - if (CountClipboardFormats()) - { - SetLastError(0xdeadbeef); - ok(!EnumClipboardFormats(0), "EnumClipboardFormats should fail if clipboard wasn't open\n"); - ok(GetLastError() == ERROR_CLIPBOARD_NOT_OPEN, - "Last error should be set to ERROR_CLIPBOARD_NOT_OPEN, not %d\n", GetLastError()); - } - - SetLastError(0xdeadbeef); - ok(!EmptyClipboard(), "EmptyClipboard should fail if clipboard wasn't open\n"); - ok(GetLastError() == ERROR_CLIPBOARD_NOT_OPEN || broken(GetLastError() == 0xdeadbeef), /* wow64 */ - "Wrong error %u\n", GetLastError()); - - format_id = RegisterClipboardFormatA("#1234"); - ok(format_id == 1234, "invalid clipboard format id %04x\n", format_id); -} - -static HGLOBAL create_text(void) -{ - HGLOBAL h = GlobalAlloc(GMEM_DDESHARE|GMEM_MOVEABLE, 5); - char *p = GlobalLock(h); - strcpy(p, "test"); - GlobalUnlock(h); - return h; -} - -static HENHMETAFILE create_emf(void) -{ - const RECT rect = {0, 0, 100, 100}; - HDC hdc = CreateEnhMetaFileA(NULL, NULL, &rect, "HENHMETAFILE Ole Clipboard Test\0Test\0\0"); - ExtTextOutA(hdc, 0, 0, ETO_OPAQUE, &rect, "Test String", strlen("Test String"), NULL); - return CloseEnhMetaFile(hdc); -} - -static void test_synthesized(void) -{ - HGLOBAL h, htext; - HENHMETAFILE emf; - BOOL r; - UINT cf; - HANDLE data; - - htext = create_text(); - emf = create_emf(); - - r = OpenClipboard(NULL); - ok(r, "gle %d\n", GetLastError()); - r = EmptyClipboard(); - ok(r, "gle %d\n", GetLastError()); - h = SetClipboardData(CF_TEXT, htext); - ok(h == htext, "got %p\n", h); - h = SetClipboardData(CF_ENHMETAFILE, emf); - ok(h == emf, "got %p\n", h); - r = CloseClipboard(); - ok(r, "gle %d\n", GetLastError()); - - r = OpenClipboard(NULL); - ok(r, "gle %d\n", GetLastError()); - cf = EnumClipboardFormats(0); - ok(cf == CF_TEXT, "cf %08x\n", cf); - data = GetClipboardData(cf); - ok(data != NULL, "couldn't get data, cf %08x\n", cf); - - cf = EnumClipboardFormats(cf); - ok(cf == CF_ENHMETAFILE, "cf %08x\n", cf); - data = GetClipboardData(cf); - ok(data != NULL, "couldn't get data, cf %08x\n", cf); - - cf = EnumClipboardFormats(cf); - todo_wine ok(cf == CF_LOCALE, "cf %08x\n", cf); - if(cf == CF_LOCALE) - cf = EnumClipboardFormats(cf); - ok(cf == CF_OEMTEXT, "cf %08x\n", cf); - data = GetClipboardData(cf); - ok(data != NULL, "couldn't get data, cf %08x\n", cf); - - cf = EnumClipboardFormats(cf); - ok(cf == CF_UNICODETEXT || - broken(cf == CF_METAFILEPICT), /* win9x and winME has no CF_UNICODETEXT */ - "cf %08x\n", cf); - - if(cf == CF_UNICODETEXT) - cf = EnumClipboardFormats(cf); - ok(cf == CF_METAFILEPICT, "cf %08x\n", cf); - data = GetClipboardData(cf); - todo_wine ok(data != NULL, "couldn't get data, cf %08x\n", cf); - - cf = EnumClipboardFormats(cf); - ok(cf == 0, "cf %08x\n", cf); - - r = EmptyClipboard(); - ok(r, "gle %d\n", GetLastError()); - - r = CloseClipboard(); - ok(r, "gle %d\n", GetLastError()); -} - -START_TEST(clipboard) -{ - SetLastError(0xdeadbeef); - FindAtomW(NULL); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) is_win9x = TRUE; - - test_RegisterClipboardFormatA(); - test_ClipboardOwner(); - test_synthesized(); -} diff --git a/rostests/winetests/user32/combo.c b/rostests/winetests/user32/combo.c deleted file mode 100644 index af23f96d1c1..00000000000 --- a/rostests/winetests/user32/combo.c +++ /dev/null @@ -1,557 +0,0 @@ -/* Unit test suite for combo boxes. - * - * Copyright 2007 Mikolaj Zalewski - * - * 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 - -#define STRICT -#define WIN32_LEAN_AND_MEAN -#include - -#include "wine/test.h" - -#define COMBO_ID 1995 - -static HWND hMainWnd; - -#define expect_eq(expr, value, type, fmt); { type val = expr; ok(val == (value), #expr " expected " #fmt " got " #fmt "\n", (value), val); } -#define expect_rect(r, _left, _top, _right, _bottom) ok(r.left == _left && r.top == _top && \ - r.bottom == _bottom && r.right == _right, "Invalid rect (%d,%d) (%d,%d) vs (%d,%d) (%d,%d)\n", \ - r.left, r.top, r.right, r.bottom, _left, _top, _right, _bottom); - -static HWND build_combo(DWORD style) -{ - return CreateWindow("ComboBox", "Combo", WS_VISIBLE|WS_CHILD|style, 5, 5, 100, 100, hMainWnd, (HMENU)COMBO_ID, NULL, 0); -} - -static int font_height(HFONT hFont) -{ - TEXTMETRIC tm; - HFONT hFontOld; - HDC hDC; - - hDC = CreateCompatibleDC(NULL); - hFontOld = SelectObject(hDC, hFont); - GetTextMetrics(hDC, &tm); - SelectObject(hDC, hFontOld); - DeleteDC(hDC); - - return tm.tmHeight; -} - -static INT CALLBACK is_font_installed_proc(const LOGFONT *elf, const TEXTMETRIC *tm, DWORD type, LPARAM lParam) -{ - return 0; -} - -static int is_font_installed(const char *name) -{ - HDC hdc = GetDC(NULL); - BOOL ret = !EnumFontFamilies(hdc, name, is_font_installed_proc, 0); - ReleaseDC(NULL, hdc); - return ret; -} - -static void test_setitemheight(DWORD style) -{ - HWND hCombo = build_combo(style); - RECT r; - int i; - - trace("Style %x\n", style); - GetClientRect(hCombo, &r); - expect_rect(r, 0, 0, 100, font_height(GetStockObject(SYSTEM_FONT)) + 8); - SendMessageA(hCombo, CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)&r); - MapWindowPoints(HWND_DESKTOP, hMainWnd, (LPPOINT)&r, 2); - todo_wine expect_rect(r, 5, 5, 105, 105); - - for (i = 1; i < 30; i++) - { - SendMessage(hCombo, CB_SETITEMHEIGHT, -1, i); - GetClientRect(hCombo, &r); - expect_eq(r.bottom - r.top, i + 6, int, "%d"); - } - - DestroyWindow(hCombo); -} - -static void test_setfont(DWORD style) -{ - HWND hCombo; - HFONT hFont1, hFont2; - RECT r; - int i; - - if (!is_font_installed("Marlett")) - { - skip("Marlett font not available\n"); - return; - } - - trace("Style %x\n", style); - - hCombo = build_combo(style); - hFont1 = CreateFont(10, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, SYMBOL_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH|FF_DONTCARE, "Marlett"); - hFont2 = CreateFont(8, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, SYMBOL_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH|FF_DONTCARE, "Marlett"); - - GetClientRect(hCombo, &r); - expect_rect(r, 0, 0, 100, font_height(GetStockObject(SYSTEM_FONT)) + 8); - SendMessageA(hCombo, CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)&r); - MapWindowPoints(HWND_DESKTOP, hMainWnd, (LPPOINT)&r, 2); - todo_wine expect_rect(r, 5, 5, 105, 105); - - /* The size of the dropped control is initially equal to the size - of the window when it was created. The size of the calculated - dropped area changes only by how much the selection area - changes, not by how much the list area changes. */ - if (font_height(hFont1) == 10 && font_height(hFont2) == 8) - { - SendMessage(hCombo, WM_SETFONT, (WPARAM)hFont1, FALSE); - GetClientRect(hCombo, &r); - expect_rect(r, 0, 0, 100, 18); - SendMessageA(hCombo, CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)&r); - MapWindowPoints(HWND_DESKTOP, hMainWnd, (LPPOINT)&r, 2); - todo_wine expect_rect(r, 5, 5, 105, 105 - (font_height(GetStockObject(SYSTEM_FONT)) - font_height(hFont1))); - - SendMessage(hCombo, WM_SETFONT, (WPARAM)hFont2, FALSE); - GetClientRect(hCombo, &r); - expect_rect(r, 0, 0, 100, 16); - SendMessageA(hCombo, CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)&r); - MapWindowPoints(HWND_DESKTOP, hMainWnd, (LPPOINT)&r, 2); - todo_wine expect_rect(r, 5, 5, 105, 105 - (font_height(GetStockObject(SYSTEM_FONT)) - font_height(hFont2))); - - SendMessage(hCombo, WM_SETFONT, (WPARAM)hFont1, FALSE); - GetClientRect(hCombo, &r); - expect_rect(r, 0, 0, 100, 18); - SendMessageA(hCombo, CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)&r); - MapWindowPoints(HWND_DESKTOP, hMainWnd, (LPPOINT)&r, 2); - todo_wine expect_rect(r, 5, 5, 105, 105 - (font_height(GetStockObject(SYSTEM_FONT)) - font_height(hFont1))); - } - else - { - ok(0, "Expected Marlett font heights 10/8, got %d/%d\n", - font_height(hFont1), font_height(hFont2)); - } - - for (i = 1; i < 30; i++) - { - HFONT hFont = CreateFont(i, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, SYMBOL_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH|FF_DONTCARE, "Marlett"); - int height = font_height(hFont); - - SendMessage(hCombo, WM_SETFONT, (WPARAM)hFont, FALSE); - GetClientRect(hCombo, &r); - expect_eq(r.bottom - r.top, height + 8, int, "%d"); - SendMessage(hCombo, WM_SETFONT, 0, FALSE); - DeleteObject(hFont); - } - - DestroyWindow(hCombo); - DeleteObject(hFont1); - DeleteObject(hFont2); -} - -static LRESULT (CALLBACK *old_parent_proc)(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam); -static LPCSTR expected_edit_text; -static LPCSTR expected_list_text; -static BOOL selchange_fired; - -static LRESULT CALLBACK parent_wnd_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - switch (msg) - { - case WM_COMMAND: - switch (wparam) - { - case MAKEWPARAM(COMBO_ID, CBN_SELCHANGE): - { - HWND hCombo = (HWND)lparam; - int idx; - char list[20], edit[20]; - - memset(list, 0, sizeof(list)); - memset(edit, 0, sizeof(edit)); - - idx = SendMessage(hCombo, CB_GETCURSEL, 0, 0); - SendMessage(hCombo, CB_GETLBTEXT, idx, (LPARAM)list); - SendMessage(hCombo, WM_GETTEXT, sizeof(edit), (LPARAM)edit); - - ok(!strcmp(edit, expected_edit_text), "edit: got %s, expected %s\n", - edit, expected_edit_text); - ok(!strcmp(list, expected_list_text), "list: got %s, expected %s\n", - list, expected_list_text); - - selchange_fired = TRUE; - } - break; - } - break; - } - - return CallWindowProc(old_parent_proc, hwnd, msg, wparam, lparam); -} - -static void test_selection(DWORD style, const char * const text[], - const int *edit, const int *list) -{ - INT idx; - HWND hCombo; - - hCombo = build_combo(style); - - SendMessage(hCombo, CB_ADDSTRING, 0, (LPARAM)text[0]); - SendMessage(hCombo, CB_ADDSTRING, 0, (LPARAM)text[1]); - SendMessage(hCombo, CB_SETCURSEL, -1, 0); - - old_parent_proc = (void *)SetWindowLongPtr(hMainWnd, GWLP_WNDPROC, (ULONG_PTR)parent_wnd_proc); - - idx = SendMessage(hCombo, CB_GETCURSEL, 0, 0); - ok(idx == -1, "expected selection -1, got %d\n", idx); - - /* keyboard navigation */ - - expected_list_text = text[list[0]]; - expected_edit_text = text[edit[0]]; - selchange_fired = FALSE; - SendMessage(hCombo, WM_KEYDOWN, VK_DOWN, 0); - ok(selchange_fired, "CBN_SELCHANGE not sent!\n"); - - expected_list_text = text[list[1]]; - expected_edit_text = text[edit[1]]; - selchange_fired = FALSE; - SendMessage(hCombo, WM_KEYDOWN, VK_DOWN, 0); - ok(selchange_fired, "CBN_SELCHANGE not sent!\n"); - - expected_list_text = text[list[2]]; - expected_edit_text = text[edit[2]]; - selchange_fired = FALSE; - SendMessage(hCombo, WM_KEYDOWN, VK_UP, 0); - ok(selchange_fired, "CBN_SELCHANGE not sent!\n"); - - /* programmatic navigation */ - - expected_list_text = text[list[3]]; - expected_edit_text = text[edit[3]]; - selchange_fired = FALSE; - SendMessage(hCombo, CB_SETCURSEL, list[3], 0); - ok(!selchange_fired, "CBN_SELCHANGE sent!\n"); - - expected_list_text = text[list[4]]; - expected_edit_text = text[edit[4]]; - selchange_fired = FALSE; - SendMessage(hCombo, CB_SETCURSEL, list[4], 0); - ok(!selchange_fired, "CBN_SELCHANGE sent!\n"); - - SetWindowLongPtr(hMainWnd, GWLP_WNDPROC, (ULONG_PTR)old_parent_proc); - DestroyWindow(hCombo); -} - -static void test_CBN_SELCHANGE(void) -{ - static const char * const text[] = { "alpha", "beta", "" }; - static const int sel_1[] = { 2, 0, 1, 0, 1 }; - static const int sel_2[] = { 0, 1, 0, 0, 1 }; - - test_selection(CBS_SIMPLE, text, sel_1, sel_2); - test_selection(CBS_DROPDOWN, text, sel_1, sel_2); - test_selection(CBS_DROPDOWNLIST, text, sel_2, sel_2); -} - -static void test_WM_LBUTTONDOWN(void) -{ - HWND hCombo, hEdit, hList; - COMBOBOXINFO cbInfo; - UINT x, y, item_height; - LRESULT result; - int i, idx; - RECT rect; - CHAR buffer[3]; - static const UINT choices[] = {8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72}; - static const CHAR stringFormat[] = "%2d"; - BOOL ret; - BOOL (WINAPI *pGetComboBoxInfo)(HWND, PCOMBOBOXINFO); - - pGetComboBoxInfo = (void*)GetProcAddress(GetModuleHandleA("user32.dll"), "GetComboBoxInfo"); - if (!pGetComboBoxInfo){ - win_skip("GetComboBoxInfo is not available\n"); - return; - } - - hCombo = CreateWindow("ComboBox", "Combo", WS_VISIBLE|WS_CHILD|CBS_DROPDOWN, - 0, 0, 200, 150, hMainWnd, (HMENU)COMBO_ID, NULL, 0); - - for (i = 0; i < sizeof(choices)/sizeof(UINT); i++){ - sprintf(buffer, stringFormat, choices[i]); - result = SendMessageA(hCombo, CB_ADDSTRING, 0, (LPARAM)buffer); - ok(result == i, - "Failed to add item %d\n", i); - } - - cbInfo.cbSize = sizeof(COMBOBOXINFO); - SetLastError(0xdeadbeef); - ret = pGetComboBoxInfo(hCombo, &cbInfo); - ok(ret, "Failed to get combobox info structure. LastError=%d\n", - GetLastError()); - hEdit = cbInfo.hwndItem; - hList = cbInfo.hwndList; - - trace("hMainWnd=%p, hCombo=%p, hList=%p, hEdit=%p\n", hMainWnd, hCombo, hList, hEdit); - ok(GetFocus() == hMainWnd, "Focus not on Main Window, instead on %p\n", GetFocus()); - - /* Click on the button to drop down the list */ - x = cbInfo.rcButton.left + (cbInfo.rcButton.right-cbInfo.rcButton.left)/2; - y = cbInfo.rcButton.top + (cbInfo.rcButton.bottom-cbInfo.rcButton.top)/2; - result = SendMessage(hCombo, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y)); - ok(result, "WM_LBUTTONDOWN was not processed. LastError=%d\n", - GetLastError()); - ok(SendMessage(hCombo, CB_GETDROPPEDSTATE, 0, 0), - "The dropdown list should have appeared after clicking the button.\n"); - - ok(GetFocus() == hEdit, - "Focus not on ComboBox's Edit Control, instead on %p\n", GetFocus()); - result = SendMessage(hCombo, WM_LBUTTONUP, 0, MAKELPARAM(x, y)); - ok(result, "WM_LBUTTONUP was not processed. LastError=%d\n", - GetLastError()); - ok(GetFocus() == hEdit, - "Focus not on ComboBox's Edit Control, instead on %p\n", GetFocus()); - - /* Click on the 5th item in the list */ - item_height = SendMessage(hCombo, CB_GETITEMHEIGHT, 0, 0); - ok(GetClientRect(hList, &rect), "Failed to get list's client rect.\n"); - x = rect.left + (rect.right-rect.left)/2; - y = item_height/2 + item_height*4; - result = SendMessage(hList, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y)); - ok(!result, "WM_LBUTTONDOWN was not processed. LastError=%d\n", - GetLastError()); - ok(GetFocus() == hEdit, - "Focus not on ComboBox's Edit Control, instead on %p\n", GetFocus()); - - result = SendMessage(hList, WM_MOUSEMOVE, 0, MAKELPARAM(x, y)); - ok(!result, "WM_MOUSEMOVE was not processed. LastError=%d\n", - GetLastError()); - ok(GetFocus() == hEdit, - "Focus not on ComboBox's Edit Control, instead on %p\n", GetFocus()); - ok(SendMessage(hCombo, CB_GETDROPPEDSTATE, 0, 0), - "The dropdown list should still be visible.\n"); - - result = SendMessage(hList, WM_LBUTTONUP, 0, MAKELPARAM(x, y)); - ok(!result, "WM_LBUTTONUP was not processed. LastError=%d\n", - GetLastError()); - ok(GetFocus() == hEdit, - "Focus not on ComboBox's Edit Control, instead on %p\n", GetFocus()); - ok(!SendMessage(hCombo, CB_GETDROPPEDSTATE, 0, 0), - "The dropdown list should have been rolled up.\n"); - idx = SendMessage(hCombo, CB_GETCURSEL, 0, 0); - ok(idx, "Current Selection: expected %d, got %d\n", 4, idx); - - DestroyWindow(hCombo); -} - -static void test_changesize( DWORD style) -{ - HWND hCombo = build_combo(style); - RECT rc; - INT ddheight, clheight, ddwidth, clwidth; - /* get initial measurements */ - GetClientRect( hCombo, &rc); - clheight = rc.bottom - rc.top; - clwidth = rc.right - rc.left; - SendMessageA(hCombo, CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)&rc); - ddheight = rc.bottom - rc.top; - ddwidth = rc.right - rc.left; - /* use MoveWindow to move & resize the combo */ - /* first make it slightly smaller */ - MoveWindow( hCombo, 10, 10, clwidth - 2, clheight - 2, TRUE); - GetClientRect( hCombo, &rc); - ok( rc.right - rc.left == clwidth - 2, "clientrect witdh is %d vs %d\n", - rc.right - rc.left, clwidth - 2); - ok( rc.bottom - rc.top == clheight, "clientrect height is %d vs %d\n", - rc.bottom - rc.top, clheight); - SendMessageA(hCombo, CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)&rc); - ok( rc.right - rc.left == clwidth - 2, "drop-down rect witdh is %d vs %d\n", - rc.right - rc.left, clwidth - 2); - ok( rc.bottom - rc.top == ddheight, "drop-down rect height is %d vs %d\n", - rc.bottom - rc.top, ddheight); - ok( rc.right - rc.left == ddwidth -2, "drop-down rect width is %d vs %d\n", - rc.right - rc.left, ddwidth - 2); - /* new cx, cy is slightly bigger than the initial values */ - MoveWindow( hCombo, 10, 10, clwidth + 2, clheight + 2, TRUE); - GetClientRect( hCombo, &rc); - ok( rc.right - rc.left == clwidth + 2, "clientrect witdh is %d vs %d\n", - rc.right - rc.left, clwidth + 2); - ok( rc.bottom - rc.top == clheight, "clientrect height is %d vs %d\n", - rc.bottom - rc.top, clheight); - SendMessageA(hCombo, CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)&rc); - ok( rc.right - rc.left == clwidth + 2, "drop-down rect witdh is %d vs %d\n", - rc.right - rc.left, clwidth + 2); - todo_wine { - ok( rc.bottom - rc.top == clheight + 2, "drop-down rect height is %d vs %d\n", - rc.bottom - rc.top, clheight + 2); - } - - ddwidth = SendMessageA(hCombo, CB_SETDROPPEDWIDTH, -1, 0); - ok( ddwidth == clwidth + 2, "drop-width is %d vs %d\n", ddwidth, clwidth + 2); - ddwidth = SendMessageA(hCombo, CB_GETDROPPEDWIDTH, 0, 0); - ok( ddwidth == clwidth + 2, "drop-width is %d vs %d\n", ddwidth, clwidth + 2); - - ddwidth = SendMessageA(hCombo, CB_SETDROPPEDWIDTH, 0, 0); - ok( ddwidth == clwidth + 2, "drop-width is %d vs %d\n", ddwidth, clwidth + 2); - ddwidth = SendMessageA(hCombo, CB_GETDROPPEDWIDTH, 0, 0); - ok( ddwidth == clwidth + 2, "drop-width is %d vs %d\n", ddwidth, clwidth + 2); - - ddwidth = SendMessageA(hCombo, CB_SETDROPPEDWIDTH, clwidth - 1, 0); - ok( ddwidth == clwidth + 2, "drop-width is %d vs %d\n", ddwidth, clwidth + 2); - ddwidth = SendMessageA(hCombo, CB_GETDROPPEDWIDTH, 0, 0); - ok( ddwidth == clwidth + 2, "drop-width is %d vs %d\n", ddwidth, clwidth + 2); - - ddwidth = SendMessageA(hCombo, CB_SETDROPPEDWIDTH, clwidth << 1, 0); - ok( ddwidth == (clwidth << 1), "drop-width is %d vs %d\n", ddwidth, clwidth << 1); - ddwidth = SendMessageA(hCombo, CB_GETDROPPEDWIDTH, 0, 0); - ok( ddwidth == (clwidth << 1), "drop-width is %d vs %d\n", ddwidth, clwidth << 1); - - ddwidth = SendMessageA(hCombo, CB_SETDROPPEDWIDTH, 0, 0); - ok( ddwidth == (clwidth << 1), "drop-width is %d vs %d\n", ddwidth, clwidth << 1); - ddwidth = SendMessageA(hCombo, CB_GETDROPPEDWIDTH, 0, 0); - ok( ddwidth == (clwidth << 1), "drop-width is %d vs %d\n", ddwidth, clwidth << 1); - - ddwidth = SendMessageA(hCombo, CB_SETDROPPEDWIDTH, 1, 0); - ok( ddwidth == clwidth + 2, "drop-width is %d vs %d\n", ddwidth, clwidth + 2); - ddwidth = SendMessageA(hCombo, CB_GETDROPPEDWIDTH, 0, 0); - ok( ddwidth == clwidth + 2, "drop-width is %d vs %d\n", ddwidth, clwidth + 2); - - DestroyWindow(hCombo); -} - -static void test_editselection(void) -{ - HWND hCombo; - INT start,end; - HWND hEdit; - COMBOBOXINFO cbInfo; - BOOL ret; - DWORD len; - BOOL (WINAPI *pGetComboBoxInfo)(HWND, PCOMBOBOXINFO); - char edit[20]; - - pGetComboBoxInfo = (void*)GetProcAddress(GetModuleHandleA("user32.dll"), "GetComboBoxInfo"); - if (!pGetComboBoxInfo){ - win_skip("GetComboBoxInfo is not available\n"); - return; - } - - /* Build a combo */ - hCombo = build_combo(CBS_SIMPLE); - cbInfo.cbSize = sizeof(COMBOBOXINFO); - SetLastError(0xdeadbeef); - ret = pGetComboBoxInfo(hCombo, &cbInfo); - ok(ret, "Failed to get combobox info structure. LastError=%d\n", - GetLastError()); - hEdit = cbInfo.hwndItem; - - /* Initially combo selection is empty*/ - len = SendMessage(hCombo, CB_GETEDITSEL, 0,0); - ok(LOWORD(len)==0, "Unexpected start position for selection %d\n", LOWORD(len)); - ok(HIWORD(len)==0, "Unexpected end position for selection %d\n", HIWORD(len)); - - /* Set some text, and press a key to replace it */ - edit[0] = 0x00; - SendMessage(hCombo, WM_SETTEXT, 0, (LPARAM)"Jason1"); - SendMessage(hCombo, WM_GETTEXT, sizeof(edit), (LPARAM)edit); - ok(strcmp(edit, "Jason1")==0, "Unexpected text retrieved %s\n", edit); - - /* Now what is the selection - still empty */ - SendMessage(hCombo, CB_GETEDITSEL, (WPARAM)&start, (WPARAM)&end); - len = SendMessage(hCombo, CB_GETEDITSEL, 0,0); - ok(LOWORD(len)==0, "Unexpected start position for selection %d\n", LOWORD(len)); - ok(HIWORD(len)==0, "Unexpected end position for selection %d\n", HIWORD(len)); - - /* Give it focus, and it gets selected */ - SendMessage(hCombo, WM_SETFOCUS, 0, (LPARAM)hEdit); - SendMessage(hCombo, CB_GETEDITSEL, (WPARAM)&start, (WPARAM)&end); - len = SendMessage(hCombo, CB_GETEDITSEL, 0,0); - ok(LOWORD(len)==0, "Unexpected start position for selection %d\n", LOWORD(len)); - ok(HIWORD(len)==6, "Unexpected end position for selection %d\n", HIWORD(len)); - - /* Now emulate a key press */ - edit[0] = 0x00; - SendMessage(hCombo, WM_CHAR, 'A', 0x1c0001); - SendMessage(hCombo, WM_GETTEXT, sizeof(edit), (LPARAM)edit); - ok(strcmp(edit, "A")==0, "Unexpected text retrieved %s\n", edit); - - len = SendMessage(hCombo, CB_GETEDITSEL, 0,0); - ok(LOWORD(len)==1, "Unexpected start position for selection %d\n", LOWORD(len)); - ok(HIWORD(len)==1, "Unexpected end position for selection %d\n", HIWORD(len)); - - /* Now what happens when it gets more focus a second time - it doesn't reselect */ - SendMessage(hCombo, WM_SETFOCUS, 0, (LPARAM)hEdit); - len = SendMessage(hCombo, CB_GETEDITSEL, 0,0); - ok(LOWORD(len)==1, "Unexpected start position for selection %d\n", LOWORD(len)); - ok(HIWORD(len)==1, "Unexpected end position for selection %d\n", HIWORD(len)); - DestroyWindow(hCombo); - - /* Start again - Build a combo */ - hCombo = build_combo(CBS_SIMPLE); - cbInfo.cbSize = sizeof(COMBOBOXINFO); - SetLastError(0xdeadbeef); - ret = pGetComboBoxInfo(hCombo, &cbInfo); - ok(ret, "Failed to get combobox info structure. LastError=%d\n", - GetLastError()); - hEdit = cbInfo.hwndItem; - - /* Set some text and give focus so it gets selected */ - edit[0] = 0x00; - SendMessage(hCombo, WM_SETTEXT, 0, (LPARAM)"Jason2"); - SendMessage(hCombo, WM_GETTEXT, sizeof(edit), (LPARAM)edit); - ok(strcmp(edit, "Jason2")==0, "Unexpected text retrieved %s\n", edit); - - SendMessage(hCombo, WM_SETFOCUS, 0, (LPARAM)hEdit); - - /* Now what is the selection */ - SendMessage(hCombo, CB_GETEDITSEL, (WPARAM)&start, (WPARAM)&end); - len = SendMessage(hCombo, CB_GETEDITSEL, 0,0); - ok(LOWORD(len)==0, "Unexpected start position for selection %d\n", LOWORD(len)); - ok(HIWORD(len)==6, "Unexpected end position for selection %d\n", HIWORD(len)); - - /* Now change the selection to the apparently invalid start -1, end -1 and - show it means no selection (ie start -1) but cursor at end */ - SendMessage(hCombo, CB_SETEDITSEL, 0, -1); - edit[0] = 0x00; - SendMessage(hCombo, WM_CHAR, 'A', 0x1c0001); - SendMessage(hCombo, WM_GETTEXT, sizeof(edit), (LPARAM)edit); - ok(strcmp(edit, "Jason2A")==0, "Unexpected text retrieved %s\n", edit); - DestroyWindow(hCombo); -} - -START_TEST(combo) -{ - hMainWnd = CreateWindow("static", "Test", WS_OVERLAPPEDWINDOW, 10, 10, 300, 300, NULL, NULL, NULL, 0); - ShowWindow(hMainWnd, SW_SHOW); - - test_setfont(CBS_DROPDOWN); - test_setfont(CBS_DROPDOWNLIST); - test_setitemheight(CBS_DROPDOWN); - test_setitemheight(CBS_DROPDOWNLIST); - test_CBN_SELCHANGE(); - test_WM_LBUTTONDOWN(); - test_changesize(CBS_DROPDOWN); - test_changesize(CBS_DROPDOWNLIST); - test_editselection(); - - DestroyWindow(hMainWnd); -} diff --git a/rostests/winetests/user32/cursoricon.c b/rostests/winetests/user32/cursoricon.c deleted file mode 100644 index cc47a25952f..00000000000 --- a/rostests/winetests/user32/cursoricon.c +++ /dev/null @@ -1,2499 +0,0 @@ -/* - * Unit test suite for cursors and icons. - * - * Copyright 2006 Michael Kaufmann - * Copyright 2007 Dmitry Timoshkov - * Copyright 2007-2008 Andrew Riedi - * - * 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/test.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" - -#include "pshpack1.h" - -typedef struct -{ - BYTE bWidth; - BYTE bHeight; - BYTE bColorCount; - BYTE bReserved; - WORD xHotspot; - WORD yHotspot; - DWORD dwDIBSize; - DWORD dwDIBOffset; -} CURSORICONFILEDIRENTRY; - -typedef struct -{ - WORD idReserved; - WORD idType; - WORD idCount; - CURSORICONFILEDIRENTRY idEntries[1]; -} CURSORICONFILEDIR; - -#define RIFF_FOURCC( c0, c1, c2, c3 ) \ - ( (DWORD)(BYTE)(c0) | ( (DWORD)(BYTE)(c1) << 8 ) | \ - ( (DWORD)(BYTE)(c2) << 16 ) | ( (DWORD)(BYTE)(c3) << 24 ) ) - -#define ANI_RIFF_ID RIFF_FOURCC('R', 'I', 'F', 'F') -#define ANI_LIST_ID RIFF_FOURCC('L', 'I', 'S', 'T') -#define ANI_ACON_ID RIFF_FOURCC('A', 'C', 'O', 'N') -#define ANI_anih_ID RIFF_FOURCC('a', 'n', 'i', 'h') -#define ANI_seq__ID RIFF_FOURCC('s', 'e', 'q', ' ') -#define ANI_fram_ID RIFF_FOURCC('f', 'r', 'a', 'm') -#define ANI_icon_ID RIFF_FOURCC('i', 'c', 'o', 'n') -#define ANI_rate_ID RIFF_FOURCC('r', 'a', 't', 'e') - -#define ANI_FLAG_ICON 0x1 -#define ANI_FLAG_SEQUENCE 0x2 - -typedef struct { - DWORD header_size; - DWORD num_frames; - DWORD num_steps; - DWORD width; - DWORD height; - DWORD bpp; - DWORD num_planes; - DWORD display_rate; - DWORD flags; -} ani_header; - -typedef struct { - BYTE data[32*32*4]; -} ani_data32x32x32; - -typedef struct { - CURSORICONFILEDIR icon_info; /* animated cursor frame information */ - BITMAPINFOHEADER bmi_header; /* animated cursor frame header */ - ani_data32x32x32 bmi_data; /* animated cursor frame DIB data */ -} ani_frame32x32x32; - -typedef struct { - DWORD chunk_id; /* ANI_anih_ID */ - DWORD chunk_size; /* actual size of data */ - ani_header header; /* animated cursor header */ -} riff_header_t; - -typedef struct { - DWORD chunk_id; /* ANI_LIST_ID */ - DWORD chunk_size; /* actual size of data */ - DWORD chunk_type; /* ANI_fram_ID */ -} riff_list_t; - -typedef struct { - DWORD chunk_id; /* ANI_icon_ID */ - DWORD chunk_size; /* actual size of data */ - ani_frame32x32x32 data; /* animated cursor frame */ -} riff_icon32x32x32_t; - -typedef struct { - DWORD chunk_id; /* ANI_RIFF_ID */ - DWORD chunk_size; /* actual size of data */ - DWORD chunk_type; /* ANI_ACON_ID */ - riff_header_t header; /* RIFF animated cursor header */ - riff_list_t frame_list; /* RIFF animated cursor frame list info */ - riff_icon32x32x32_t frames[1]; /* array of animated cursor frames */ -} riff_cursor1_t; - -typedef struct { - DWORD chunk_id; /* ANI_RIFF_ID */ - DWORD chunk_size; /* actual size of data */ - DWORD chunk_type; /* ANI_ACON_ID */ - riff_header_t header; /* RIFF animated cursor header */ - riff_list_t frame_list; /* RIFF animated cursor frame list info */ - riff_icon32x32x32_t frames[3]; /* array of three animated cursor frames */ -} riff_cursor3_t; - -typedef struct { - DWORD chunk_id; /* ANI_rate_ID */ - DWORD chunk_size; /* actual size of data */ - DWORD rate[3]; /* animated cursor rate data */ -} riff_rate3_t; - -typedef struct { - DWORD chunk_id; /* ANI_seq__ID */ - DWORD chunk_size; /* actual size of data */ - DWORD order[3]; /* animated cursor sequence data */ -} riff_seq3_t; - -typedef struct { - DWORD chunk_id; /* ANI_RIFF_ID */ - DWORD chunk_size; /* actual size of data */ - DWORD chunk_type; /* ANI_ACON_ID */ - riff_header_t header; /* RIFF animated cursor header */ - riff_seq3_t seq; /* sequence data for three cursor frames */ - riff_rate3_t rates; /* rate data for three cursor frames */ - riff_list_t frame_list; /* RIFF animated cursor frame list info */ - riff_icon32x32x32_t frames[3]; /* array of three animated cursor frames */ -} riff_cursor3_seq_t; - -#define EMPTY_ICON32 \ -{ \ - ANI_icon_ID, \ - sizeof(ani_frame32x32x32), \ - { \ - { \ - 0x0, /* reserved */ \ - 0, /* type: icon(1), cursor(2) */ \ - 1, /* count */ \ - { \ - { \ - 32, /* width */ \ - 32, /* height */ \ - 0, /* color count */ \ - 0x0, /* reserved */ \ - 16, /* x hotspot */ \ - 16, /* y hotspot */ \ - sizeof(ani_data32x32x32), /* DIB size */ \ - sizeof(CURSORICONFILEDIR) /* DIB offset */ \ - } \ - } \ - }, \ - { \ - sizeof(BITMAPINFOHEADER), /* structure for DIB-type data */ \ - 32, /* width */ \ - 32*2, /* actual height times two */ \ - 1, /* planes */ \ - 32, /* bpp */ \ - BI_RGB, /* compression */ \ - 0, /* image size */ \ - 0, /* biXPelsPerMeter */ \ - 0, /* biYPelsPerMeter */ \ - 0, /* biClrUsed */ \ - 0 /* biClrImportant */ \ - }, \ - /* DIB data: left uninitialized */ \ - } \ -} - -riff_cursor1_t empty_anicursor = { - ANI_RIFF_ID, - sizeof(empty_anicursor) - sizeof(DWORD)*2, - ANI_ACON_ID, - { - ANI_anih_ID, - sizeof(ani_header), - { - sizeof(ani_header), - 1, /* frames */ - 1, /* steps */ - 32, /* width */ - 32, /* height */ - 32, /* depth */ - 1, /* planes */ - 10, /* display rate in jiffies */ - ANI_FLAG_ICON /* flags */ - } - }, - { - ANI_LIST_ID, - sizeof(riff_icon32x32x32_t)*(1 /*frames*/) + sizeof(DWORD), - ANI_fram_ID, - }, - { - EMPTY_ICON32 - } -}; - -riff_cursor3_t empty_anicursor3 = { - ANI_RIFF_ID, - sizeof(empty_anicursor3) - sizeof(DWORD)*2, - ANI_ACON_ID, - { - ANI_anih_ID, - sizeof(ani_header), - { - sizeof(ani_header), - 3, /* frames */ - 3, /* steps */ - 32, /* width */ - 32, /* height */ - 32, /* depth */ - 1, /* planes */ - 0xbeef, /* display rate in jiffies */ - ANI_FLAG_ICON /* flags */ - } - }, - { - ANI_LIST_ID, - sizeof(riff_icon32x32x32_t)*(3 /*frames*/) + sizeof(DWORD), - ANI_fram_ID, - }, - { - EMPTY_ICON32, - EMPTY_ICON32, - EMPTY_ICON32 - } -}; - -riff_cursor3_seq_t empty_anicursor3_seq = { - ANI_RIFF_ID, - sizeof(empty_anicursor3_seq) - sizeof(DWORD)*2, - ANI_ACON_ID, - { - ANI_anih_ID, - sizeof(ani_header), - { - sizeof(ani_header), - 3, /* frames */ - 3, /* steps */ - 32, /* width */ - 32, /* height */ - 32, /* depth */ - 1, /* planes */ - 0xbeef, /* display rate in jiffies */ - ANI_FLAG_ICON|ANI_FLAG_SEQUENCE /* flags */ - } - }, - { - ANI_seq__ID, - sizeof(riff_seq3_t) - sizeof(DWORD)*2, - { 2, 0, 1} /* show frames in a uniquely identifiable order */ - }, - { - ANI_rate_ID, - sizeof(riff_rate3_t) - sizeof(DWORD)*2, - { 0xc0de, 0xcafe, 0xbabe} - }, - { - ANI_LIST_ID, - sizeof(riff_icon32x32x32_t)*(3 /*frames*/) + sizeof(DWORD), - ANI_fram_ID, - }, - { - EMPTY_ICON32, - EMPTY_ICON32, - EMPTY_ICON32 - } -}; - -#include "poppack.h" - -static char **test_argv; -static int test_argc; -static HWND child = 0; -static HWND parent = 0; -static HANDLE child_process; - -#define PROC_INIT (WM_USER+1) - -static BOOL (WINAPI *pGetCursorInfo)(CURSORINFO *); -static BOOL (WINAPI *pGetIconInfoExA)(HICON,ICONINFOEXA *); -static BOOL (WINAPI *pGetIconInfoExW)(HICON,ICONINFOEXW *); - -static const int is_win64 = (sizeof(void *) > sizeof(int)); - -static LRESULT CALLBACK callback_child(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - BOOL ret; - DWORD error; - - switch (msg) - { - /* Destroy the cursor. */ - case WM_USER+1: - SetLastError(0xdeadbeef); - ret = DestroyCursor((HCURSOR) lParam); - error = GetLastError(); - ok(!ret || broken(ret) /* win9x */, "DestroyCursor on the active cursor succeeded.\n"); - ok(error == ERROR_DESTROY_OBJECT_OF_OTHER_THREAD || - error == 0xdeadbeef, /* vista */ - "Last error: %u\n", error); - return TRUE; - case WM_DESTROY: - PostQuitMessage(0); - return 0; - } - - return DefWindowProc(hwnd, msg, wParam, lParam); -} - -static LRESULT CALLBACK callback_parent(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - if (msg == PROC_INIT) - { - child = (HWND) wParam; - return TRUE; - } - - return DefWindowProc(hwnd, msg, wParam, lParam); -} - -static void do_child(void) -{ - WNDCLASS class; - MSG msg; - BOOL ret; - - /* Register a new class. */ - class.style = CS_GLOBALCLASS; - class.lpfnWndProc = callback_child; - class.cbClsExtra = 0; - class.cbWndExtra = 0; - class.hInstance = GetModuleHandle(NULL); - class.hIcon = NULL; - class.hCursor = NULL; - class.hbrBackground = NULL; - class.lpszMenuName = NULL; - class.lpszClassName = "cursor_child"; - - SetLastError(0xdeadbeef); - ret = RegisterClass(&class); - ok(ret, "Failed to register window class. Error: %u\n", GetLastError()); - - /* Create a window. */ - child = CreateWindowA("cursor_child", "cursor_child", WS_POPUP | WS_VISIBLE, - 0, 0, 200, 200, 0, 0, 0, NULL); - ok(child != 0, "CreateWindowA failed. Error: %u\n", GetLastError()); - - /* Let the parent know our HWND. */ - PostMessage(parent, PROC_INIT, (WPARAM) child, 0); - - /* Receive messages. */ - while ((ret = GetMessage(&msg, 0, 0, 0))) - { - ok(ret != -1, "GetMessage failed. Error: %u\n", GetLastError()); - TranslateMessage(&msg); - DispatchMessage(&msg); - } -} - -static void do_parent(void) -{ - char path_name[MAX_PATH]; - PROCESS_INFORMATION info; - STARTUPINFOA startup; - WNDCLASS class; - MSG msg; - BOOL ret; - - /* Register a new class. */ - class.style = CS_GLOBALCLASS; - class.lpfnWndProc = callback_parent; - class.cbClsExtra = 0; - class.cbWndExtra = 0; - class.hInstance = GetModuleHandle(NULL); - class.hIcon = NULL; - class.hCursor = NULL; - class.hbrBackground = NULL; - class.lpszMenuName = NULL; - class.lpszClassName = "cursor_parent"; - - SetLastError(0xdeadbeef); - ret = RegisterClass(&class); - ok(ret, "Failed to register window class. Error: %u\n", GetLastError()); - - /* Create a window. */ - parent = CreateWindowA("cursor_parent", "cursor_parent", WS_POPUP | WS_VISIBLE, - 0, 0, 200, 200, 0, 0, 0, NULL); - ok(parent != 0, "CreateWindowA failed. Error: %u\n", GetLastError()); - - /* Start child process. */ - memset(&startup, 0, sizeof(startup)); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW; - startup.wShowWindow = SW_SHOWNORMAL; - - sprintf(path_name, "%s cursoricon %lx", test_argv[0], (INT_PTR)parent); - ok(CreateProcessA(NULL, path_name, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info), "CreateProcess failed.\n"); - child_process = info.hProcess; - - /* Wait for child window handle. */ - while ((child == 0) && (ret = GetMessage(&msg, parent, 0, 0))) - { - ok(ret != -1, "GetMessage failed. Error: %u\n", GetLastError()); - TranslateMessage(&msg); - DispatchMessage(&msg); - } -} - -static void finish_child_process(void) -{ - SendMessage(child, WM_CLOSE, 0, 0); - winetest_wait_child_process( child_process ); - CloseHandle(child_process); -} - -static void test_child_process(void) -{ - static const BYTE bmp_bits[4096]; - HCURSOR cursor; - ICONINFO cursorInfo; - UINT display_bpp; - HDC hdc; - - /* Create and set a dummy cursor. */ - hdc = GetDC(0); - display_bpp = GetDeviceCaps(hdc, BITSPIXEL); - ReleaseDC(0, hdc); - - cursorInfo.fIcon = FALSE; - cursorInfo.xHotspot = 0; - cursorInfo.yHotspot = 0; - cursorInfo.hbmMask = CreateBitmap(32, 32, 1, 1, bmp_bits); - cursorInfo.hbmColor = CreateBitmap(32, 32, 1, display_bpp, bmp_bits); - - cursor = CreateIconIndirect(&cursorInfo); - ok(cursor != NULL, "CreateIconIndirect returned %p.\n", cursor); - - SetCursor(cursor); - - /* Destroy the cursor. */ - SendMessage(child, WM_USER+1, 0, (LPARAM) cursor); -} - -static BOOL color_match(COLORREF a, COLORREF b) -{ - /* 5-bit accuracy is a sufficient test. This will match as long as - * colors are never truncated to less that 3x5-bit accuracy i.e. - * palettized. */ - return (a & 0x00F8F8F8) == (b & 0x00F8F8F8); -} - -static void test_CopyImage_Check(HBITMAP bitmap, UINT flags, INT copyWidth, INT copyHeight, - INT expectedWidth, INT expectedHeight, WORD expectedDepth, BOOL dibExpected) -{ - HBITMAP copy; - BITMAP origBitmap; - BITMAP copyBitmap; - BOOL orig_is_dib; - BOOL copy_is_dib; - - copy = CopyImage(bitmap, IMAGE_BITMAP, copyWidth, copyHeight, flags); - ok(copy != NULL, "CopyImage() failed\n"); - if (copy != NULL) - { - GetObject(bitmap, sizeof(origBitmap), &origBitmap); - GetObject(copy, sizeof(copyBitmap), ©Bitmap); - orig_is_dib = (origBitmap.bmBits != NULL); - copy_is_dib = (copyBitmap.bmBits != NULL); - - if (copy_is_dib && dibExpected - && copyBitmap.bmBitsPixel == 24 - && (expectedDepth == 16 || expectedDepth == 32)) - { - /* Windows 95 doesn't create DIBs with a depth of 16 or 32 bit */ - if (GetVersion() & 0x80000000) - { - expectedDepth = 24; - } - } - - if (copy_is_dib && !dibExpected && !(flags & LR_CREATEDIBSECTION)) - { - /* It's not forbidden to create a DIB section if the flag - LR_CREATEDIBSECTION is absent. - Windows 9x does this if the bitmap has a depth that doesn't - match the screen depth, Windows NT doesn't */ - dibExpected = TRUE; - expectedDepth = origBitmap.bmBitsPixel; - } - - ok((!(dibExpected ^ copy_is_dib) - && (copyBitmap.bmWidth == expectedWidth) - && (copyBitmap.bmHeight == expectedHeight) - && (copyBitmap.bmBitsPixel == expectedDepth)), - "CopyImage ((%s, %dx%d, %u bpp), %d, %d, %#x): Expected (%s, %dx%d, %u bpp), got (%s, %dx%d, %u bpp)\n", - orig_is_dib ? "DIB" : "DDB", origBitmap.bmWidth, origBitmap.bmHeight, origBitmap.bmBitsPixel, - copyWidth, copyHeight, flags, - dibExpected ? "DIB" : "DDB", expectedWidth, expectedHeight, expectedDepth, - copy_is_dib ? "DIB" : "DDB", copyBitmap.bmWidth, copyBitmap.bmHeight, copyBitmap.bmBitsPixel); - - DeleteObject(copy); - } -} - -static void test_CopyImage_Bitmap(int depth) -{ - HBITMAP ddb, dib; - HDC screenDC; - BITMAPINFO * info; - VOID * bits; - int screen_depth; - unsigned int i; - - /* Create a device-independent bitmap (DIB) */ - info = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD)); - info->bmiHeader.biSize = sizeof(info->bmiHeader); - info->bmiHeader.biWidth = 2; - info->bmiHeader.biHeight = 2; - info->bmiHeader.biPlanes = 1; - info->bmiHeader.biBitCount = depth; - info->bmiHeader.biCompression = BI_RGB; - - for (i=0; i < 256; i++) - { - info->bmiColors[i].rgbRed = i; - info->bmiColors[i].rgbGreen = i; - info->bmiColors[i].rgbBlue = 255 - i; - info->bmiColors[i].rgbReserved = 0; - } - - dib = CreateDIBSection(NULL, info, DIB_RGB_COLORS, &bits, NULL, 0); - - /* Create a device-dependent bitmap (DDB) */ - screenDC = GetDC(NULL); - screen_depth = GetDeviceCaps(screenDC, BITSPIXEL); - if (depth == 1 || depth == screen_depth) - { - ddb = CreateBitmap(2, 2, 1, depth, NULL); - } - else - { - ddb = NULL; - } - ReleaseDC(NULL, screenDC); - - if (ddb != NULL) - { - test_CopyImage_Check(ddb, 0, 0, 0, 2, 2, depth == 1 ? 1 : screen_depth, FALSE); - test_CopyImage_Check(ddb, 0, 0, 5, 2, 5, depth == 1 ? 1 : screen_depth, FALSE); - test_CopyImage_Check(ddb, 0, 5, 0, 5, 2, depth == 1 ? 1 : screen_depth, FALSE); - test_CopyImage_Check(ddb, 0, 5, 5, 5, 5, depth == 1 ? 1 : screen_depth, FALSE); - - test_CopyImage_Check(ddb, LR_MONOCHROME, 0, 0, 2, 2, 1, FALSE); - test_CopyImage_Check(ddb, LR_MONOCHROME, 5, 0, 5, 2, 1, FALSE); - test_CopyImage_Check(ddb, LR_MONOCHROME, 0, 5, 2, 5, 1, FALSE); - test_CopyImage_Check(ddb, LR_MONOCHROME, 5, 5, 5, 5, 1, FALSE); - - test_CopyImage_Check(ddb, LR_CREATEDIBSECTION, 0, 0, 2, 2, depth, TRUE); - test_CopyImage_Check(ddb, LR_CREATEDIBSECTION, 5, 0, 5, 2, depth, TRUE); - test_CopyImage_Check(ddb, LR_CREATEDIBSECTION, 0, 5, 2, 5, depth, TRUE); - test_CopyImage_Check(ddb, LR_CREATEDIBSECTION, 5, 5, 5, 5, depth, TRUE); - - /* LR_MONOCHROME is ignored if LR_CREATEDIBSECTION is present */ - test_CopyImage_Check(ddb, LR_MONOCHROME | LR_CREATEDIBSECTION, 0, 0, 2, 2, depth, TRUE); - test_CopyImage_Check(ddb, LR_MONOCHROME | LR_CREATEDIBSECTION, 5, 0, 5, 2, depth, TRUE); - test_CopyImage_Check(ddb, LR_MONOCHROME | LR_CREATEDIBSECTION, 0, 5, 2, 5, depth, TRUE); - test_CopyImage_Check(ddb, LR_MONOCHROME | LR_CREATEDIBSECTION, 5, 5, 5, 5, depth, TRUE); - - DeleteObject(ddb); - } - - if (depth != 1) - { - test_CopyImage_Check(dib, 0, 0, 0, 2, 2, screen_depth, FALSE); - test_CopyImage_Check(dib, 0, 5, 0, 5, 2, screen_depth, FALSE); - test_CopyImage_Check(dib, 0, 0, 5, 2, 5, screen_depth, FALSE); - test_CopyImage_Check(dib, 0, 5, 5, 5, 5, screen_depth, FALSE); - } - - test_CopyImage_Check(dib, LR_MONOCHROME, 0, 0, 2, 2, 1, FALSE); - test_CopyImage_Check(dib, LR_MONOCHROME, 5, 0, 5, 2, 1, FALSE); - test_CopyImage_Check(dib, LR_MONOCHROME, 0, 5, 2, 5, 1, FALSE); - test_CopyImage_Check(dib, LR_MONOCHROME, 5, 5, 5, 5, 1, FALSE); - - test_CopyImage_Check(dib, LR_CREATEDIBSECTION, 0, 0, 2, 2, depth, TRUE); - test_CopyImage_Check(dib, LR_CREATEDIBSECTION, 5, 0, 5, 2, depth, TRUE); - test_CopyImage_Check(dib, LR_CREATEDIBSECTION, 0, 5, 2, 5, depth, TRUE); - test_CopyImage_Check(dib, LR_CREATEDIBSECTION, 5, 5, 5, 5, depth, TRUE); - - /* LR_MONOCHROME is ignored if LR_CREATEDIBSECTION is present */ - test_CopyImage_Check(dib, LR_MONOCHROME | LR_CREATEDIBSECTION, 0, 0, 2, 2, depth, TRUE); - test_CopyImage_Check(dib, LR_MONOCHROME | LR_CREATEDIBSECTION, 5, 0, 5, 2, depth, TRUE); - test_CopyImage_Check(dib, LR_MONOCHROME | LR_CREATEDIBSECTION, 0, 5, 2, 5, depth, TRUE); - test_CopyImage_Check(dib, LR_MONOCHROME | LR_CREATEDIBSECTION, 5, 5, 5, 5, depth, TRUE); - - DeleteObject(dib); - - if (depth == 1) - { - /* Special case: A monochrome DIB is converted to a monochrome DDB if - the colors in the color table are black and white. - - Skip this test on Windows 95, it always creates a monochrome DDB - in this case */ - - if (!(GetVersion() & 0x80000000)) - { - info->bmiHeader.biBitCount = 1; - info->bmiColors[0].rgbRed = 0xFF; - info->bmiColors[0].rgbGreen = 0; - info->bmiColors[0].rgbBlue = 0; - info->bmiColors[1].rgbRed = 0; - info->bmiColors[1].rgbGreen = 0xFF; - info->bmiColors[1].rgbBlue = 0; - - dib = CreateDIBSection(NULL, info, DIB_RGB_COLORS, &bits, NULL, 0); - test_CopyImage_Check(dib, 0, 0, 0, 2, 2, screen_depth, FALSE); - test_CopyImage_Check(dib, 0, 5, 0, 5, 2, screen_depth, FALSE); - test_CopyImage_Check(dib, 0, 0, 5, 2, 5, screen_depth, FALSE); - test_CopyImage_Check(dib, 0, 5, 5, 5, 5, screen_depth, FALSE); - DeleteObject(dib); - - info->bmiHeader.biBitCount = 1; - info->bmiColors[0].rgbRed = 0; - info->bmiColors[0].rgbGreen = 0; - info->bmiColors[0].rgbBlue = 0; - info->bmiColors[1].rgbRed = 0xFF; - info->bmiColors[1].rgbGreen = 0xFF; - info->bmiColors[1].rgbBlue = 0xFF; - - dib = CreateDIBSection(NULL, info, DIB_RGB_COLORS, &bits, NULL, 0); - test_CopyImage_Check(dib, 0, 0, 0, 2, 2, 1, FALSE); - test_CopyImage_Check(dib, 0, 5, 0, 5, 2, 1, FALSE); - test_CopyImage_Check(dib, 0, 0, 5, 2, 5, 1, FALSE); - test_CopyImage_Check(dib, 0, 5, 5, 5, 5, 1, FALSE); - DeleteObject(dib); - - info->bmiHeader.biBitCount = 1; - info->bmiColors[0].rgbRed = 0xFF; - info->bmiColors[0].rgbGreen = 0xFF; - info->bmiColors[0].rgbBlue = 0xFF; - info->bmiColors[1].rgbRed = 0; - info->bmiColors[1].rgbGreen = 0; - info->bmiColors[1].rgbBlue = 0; - - dib = CreateDIBSection(NULL, info, DIB_RGB_COLORS, &bits, NULL, 0); - test_CopyImage_Check(dib, 0, 0, 0, 2, 2, 1, FALSE); - test_CopyImage_Check(dib, 0, 5, 0, 5, 2, 1, FALSE); - test_CopyImage_Check(dib, 0, 0, 5, 2, 5, 1, FALSE); - test_CopyImage_Check(dib, 0, 5, 5, 5, 5, 1, FALSE); - DeleteObject(dib); - } - } - - HeapFree(GetProcessHeap(), 0, info); -} - -static void test_initial_cursor(void) -{ - HCURSOR cursor, cursor2; - DWORD error; - - cursor = GetCursor(); - - /* Check what handle GetCursor() returns if a cursor is not set yet. */ - SetLastError(0xdeadbeef); - cursor2 = LoadCursor(NULL, IDC_WAIT); - todo_wine { - ok(cursor == cursor2, "cursor (%p) is not IDC_WAIT (%p).\n", cursor, cursor2); - } - error = GetLastError(); - ok(error == 0xdeadbeef, "Last error: 0x%08x\n", error); -} - -static void test_icon_info_dbg(HICON hIcon, UINT exp_cx, UINT exp_cy, UINT exp_bpp, int line) -{ - ICONINFO info; - DWORD ret; - BITMAP bmMask, bmColor; - - ret = GetIconInfo(hIcon, &info); - ok_(__FILE__, line)(ret, "GetIconInfo failed\n"); - - /* CreateIcon under XP causes info.fIcon to be 0 */ - ok_(__FILE__, line)(info.xHotspot == exp_cx/2, "info.xHotspot = %u\n", info.xHotspot); - ok_(__FILE__, line)(info.yHotspot == exp_cy/2, "info.yHotspot = %u\n", info.yHotspot); - ok_(__FILE__, line)(info.hbmMask != 0, "info.hbmMask is NULL\n"); - - ret = GetObject(info.hbmMask, sizeof(bmMask), &bmMask); - ok_(__FILE__, line)(ret == sizeof(bmMask), "GetObject(info.hbmMask) failed, ret %u\n", ret); - - if (exp_bpp == 1) - ok_(__FILE__, line)(info.hbmColor == 0, "info.hbmColor should be NULL\n"); - - if (info.hbmColor) - { - HDC hdc; - UINT display_bpp; - - hdc = GetDC(0); - display_bpp = GetDeviceCaps(hdc, BITSPIXEL); - ReleaseDC(0, hdc); - - ret = GetObject(info.hbmColor, sizeof(bmColor), &bmColor); - ok_(__FILE__, line)(ret == sizeof(bmColor), "GetObject(info.hbmColor) failed, ret %u\n", ret); - - ok_(__FILE__, line)(bmColor.bmBitsPixel == display_bpp /* XP */ || - bmColor.bmBitsPixel == exp_bpp /* Win98 */, - "bmColor.bmBitsPixel = %d\n", bmColor.bmBitsPixel); - ok_(__FILE__, line)(bmColor.bmWidth == exp_cx, "bmColor.bmWidth = %d\n", bmColor.bmWidth); - ok_(__FILE__, line)(bmColor.bmHeight == exp_cy, "bmColor.bmHeight = %d\n", bmColor.bmHeight); - - ok_(__FILE__, line)(bmMask.bmBitsPixel == 1, "bmMask.bmBitsPixel = %d\n", bmMask.bmBitsPixel); - ok_(__FILE__, line)(bmMask.bmWidth == exp_cx, "bmMask.bmWidth = %d\n", bmMask.bmWidth); - ok_(__FILE__, line)(bmMask.bmHeight == exp_cy, "bmMask.bmHeight = %d\n", bmMask.bmHeight); - } - else - { - ok_(__FILE__, line)(bmMask.bmBitsPixel == 1, "bmMask.bmBitsPixel = %d\n", bmMask.bmBitsPixel); - ok_(__FILE__, line)(bmMask.bmWidth == exp_cx, "bmMask.bmWidth = %d\n", bmMask.bmWidth); - ok_(__FILE__, line)(bmMask.bmHeight == exp_cy * 2, "bmMask.bmHeight = %d\n", bmMask.bmHeight); - } - if (pGetIconInfoExA) - { - ICONINFOEXA infoex; - - memset( &infoex, 0xcc, sizeof(infoex) ); - SetLastError( 0xdeadbeef ); - infoex.cbSize = sizeof(infoex) - 1; - ret = pGetIconInfoExA( hIcon, &infoex ); - ok_(__FILE__, line)(!ret, "GetIconInfoEx succeeded\n"); - ok_(__FILE__, line)(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %d\n", GetLastError()); - - SetLastError( 0xdeadbeef ); - infoex.cbSize = sizeof(infoex) + 1; - ret = pGetIconInfoExA( hIcon, &infoex ); - ok_(__FILE__, line)(!ret, "GetIconInfoEx succeeded\n"); - ok_(__FILE__, line)(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %d\n", GetLastError()); - - SetLastError( 0xdeadbeef ); - infoex.cbSize = sizeof(infoex); - ret = pGetIconInfoExA( (HICON)0xdeadbabe, &infoex ); - ok_(__FILE__, line)(!ret, "GetIconInfoEx succeeded\n"); - ok_(__FILE__, line)(GetLastError() == ERROR_INVALID_CURSOR_HANDLE, - "wrong error %d\n", GetLastError()); - - infoex.cbSize = sizeof(infoex); - ret = pGetIconInfoExA( hIcon, &infoex ); - ok_(__FILE__, line)(ret, "GetIconInfoEx failed err %d\n", GetLastError()); - ok_(__FILE__, line)(infoex.wResID == 0, "GetIconInfoEx wrong resid %x\n", infoex.wResID); - ok_(__FILE__, line)(infoex.szModName[0] == 0, "GetIconInfoEx wrong module %s\n", infoex.szModName); - ok_(__FILE__, line)(infoex.szResName[0] == 0, "GetIconInfoEx wrong name %s\n", infoex.szResName); - } -} - -#define test_icon_info(a,b,c,d) test_icon_info_dbg((a),(b),(c),(d),__LINE__) - -static void test_CreateIcon(void) -{ - static const BYTE bmp_bits[1024]; - HICON hIcon; - HBITMAP hbmMask, hbmColor; - BITMAPINFO *bmpinfo; - ICONINFO info; - HDC hdc; - void *bits; - UINT display_bpp; - - hdc = GetDC(0); - display_bpp = GetDeviceCaps(hdc, BITSPIXEL); - - /* these crash under XP - hIcon = CreateIcon(0, 16, 16, 1, 1, bmp_bits, NULL); - hIcon = CreateIcon(0, 16, 16, 1, 1, NULL, bmp_bits); - */ - - hIcon = CreateIcon(0, 16, 16, 1, 1, bmp_bits, bmp_bits); - ok(hIcon != 0, "CreateIcon failed\n"); - test_icon_info(hIcon, 16, 16, 1); - DestroyIcon(hIcon); - - hIcon = CreateIcon(0, 16, 16, 1, display_bpp, bmp_bits, bmp_bits); - ok(hIcon != 0, "CreateIcon failed\n"); - test_icon_info(hIcon, 16, 16, display_bpp); - DestroyIcon(hIcon); - - hbmMask = CreateBitmap(16, 16, 1, 1, bmp_bits); - ok(hbmMask != 0, "CreateBitmap failed\n"); - hbmColor = CreateBitmap(16, 16, 1, display_bpp, bmp_bits); - ok(hbmColor != 0, "CreateBitmap failed\n"); - - info.fIcon = TRUE; - info.xHotspot = 8; - info.yHotspot = 8; - info.hbmMask = 0; - info.hbmColor = 0; - SetLastError(0xdeadbeaf); - hIcon = CreateIconIndirect(&info); - ok(!hIcon, "CreateIconIndirect should fail\n"); - ok(GetLastError() == 0xdeadbeaf, "wrong error %u\n", GetLastError()); - - info.fIcon = TRUE; - info.xHotspot = 8; - info.yHotspot = 8; - info.hbmMask = 0; - info.hbmColor = hbmColor; - SetLastError(0xdeadbeaf); - hIcon = CreateIconIndirect(&info); - ok(!hIcon, "CreateIconIndirect should fail\n"); - ok(GetLastError() == 0xdeadbeaf, "wrong error %u\n", GetLastError()); - - info.fIcon = TRUE; - info.xHotspot = 8; - info.yHotspot = 8; - info.hbmMask = hbmMask; - info.hbmColor = hbmColor; - hIcon = CreateIconIndirect(&info); - ok(hIcon != 0, "CreateIconIndirect failed\n"); - test_icon_info(hIcon, 16, 16, display_bpp); - DestroyIcon(hIcon); - - DeleteObject(hbmMask); - DeleteObject(hbmColor); - - hbmMask = CreateBitmap(16, 32, 1, 1, bmp_bits); - ok(hbmMask != 0, "CreateBitmap failed\n"); - - info.fIcon = TRUE; - info.xHotspot = 8; - info.yHotspot = 8; - info.hbmMask = hbmMask; - info.hbmColor = 0; - SetLastError(0xdeadbeaf); - hIcon = CreateIconIndirect(&info); - ok(hIcon != 0, "CreateIconIndirect failed\n"); - test_icon_info(hIcon, 16, 16, 1); - DestroyIcon(hIcon); - - DeleteObject(hbmMask); - DeleteObject(hbmColor); - - /* test creating an icon from a DIB section */ - - bmpinfo = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, FIELD_OFFSET(BITMAPINFO,bmiColors[256])); - bmpinfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bmpinfo->bmiHeader.biWidth = 32; - bmpinfo->bmiHeader.biHeight = 32; - bmpinfo->bmiHeader.biPlanes = 1; - bmpinfo->bmiHeader.biBitCount = 8; - bmpinfo->bmiHeader.biCompression = BI_RGB; - hbmColor = CreateDIBSection( hdc, bmpinfo, DIB_RGB_COLORS, &bits, NULL, 0 ); - ok(hbmColor != NULL, "Expected a handle to the DIB\n"); - if (bits) - memset( bits, 0x55, 32 * 32 * bmpinfo->bmiHeader.biBitCount / 8 ); - bmpinfo->bmiHeader.biBitCount = 1; - hbmMask = CreateDIBSection( hdc, bmpinfo, DIB_RGB_COLORS, &bits, NULL, 0 ); - ok(hbmMask != NULL, "Expected a handle to the DIB\n"); - if (bits) - memset( bits, 0x55, 32 * 32 * bmpinfo->bmiHeader.biBitCount / 8 ); - - info.fIcon = TRUE; - info.xHotspot = 8; - info.yHotspot = 8; - info.hbmMask = hbmColor; - info.hbmColor = hbmMask; - SetLastError(0xdeadbeaf); - hIcon = CreateIconIndirect(&info); - ok(hIcon != 0, "CreateIconIndirect failed\n"); - test_icon_info(hIcon, 32, 32, 8); - DestroyIcon(hIcon); - DeleteObject(hbmColor); - - bmpinfo->bmiHeader.biBitCount = 16; - hbmColor = CreateDIBSection( hdc, bmpinfo, DIB_RGB_COLORS, &bits, NULL, 0 ); - ok(hbmColor != NULL, "Expected a handle to the DIB\n"); - if (bits) - memset( bits, 0x55, 32 * 32 * bmpinfo->bmiHeader.biBitCount / 8 ); - - info.fIcon = TRUE; - info.xHotspot = 8; - info.yHotspot = 8; - info.hbmMask = hbmColor; - info.hbmColor = hbmMask; - SetLastError(0xdeadbeaf); - hIcon = CreateIconIndirect(&info); - ok(hIcon != 0, "CreateIconIndirect failed\n"); - test_icon_info(hIcon, 32, 32, 8); - DestroyIcon(hIcon); - DeleteObject(hbmColor); - - bmpinfo->bmiHeader.biBitCount = 32; - hbmColor = CreateDIBSection( hdc, bmpinfo, DIB_RGB_COLORS, &bits, NULL, 0 ); - ok(hbmColor != NULL, "Expected a handle to the DIB\n"); - if (bits) - memset( bits, 0x55, 32 * 32 * bmpinfo->bmiHeader.biBitCount / 8 ); - - info.fIcon = TRUE; - info.xHotspot = 8; - info.yHotspot = 8; - info.hbmMask = hbmColor; - info.hbmColor = hbmMask; - SetLastError(0xdeadbeaf); - hIcon = CreateIconIndirect(&info); - ok(hIcon != 0, "CreateIconIndirect failed\n"); - test_icon_info(hIcon, 32, 32, 8); - DestroyIcon(hIcon); - - DeleteObject(hbmMask); - DeleteObject(hbmColor); - HeapFree( GetProcessHeap(), 0, bmpinfo ); - - ReleaseDC(0, hdc); -} - -/* Shamelessly ripped from dlls/oleaut32/tests/olepicture.c */ -/* 1x1 pixel gif */ -static unsigned char gifimage[35] = { -0x47,0x49,0x46,0x38,0x37,0x61,0x01,0x00,0x01,0x00,0x80,0x00,0x00,0xff,0xff,0xff, -0xff,0xff,0xff,0x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x02,0x02,0x44, -0x01,0x00,0x3b -}; - -/* 1x1 pixel jpg */ -static unsigned char jpgimage[285] = { -0xff,0xd8,0xff,0xe0,0x00,0x10,0x4a,0x46,0x49,0x46,0x00,0x01,0x01,0x01,0x01,0x2c, -0x01,0x2c,0x00,0x00,0xff,0xdb,0x00,0x43,0x00,0x05,0x03,0x04,0x04,0x04,0x03,0x05, -0x04,0x04,0x04,0x05,0x05,0x05,0x06,0x07,0x0c,0x08,0x07,0x07,0x07,0x07,0x0f,0x0b, -0x0b,0x09,0x0c,0x11,0x0f,0x12,0x12,0x11,0x0f,0x11,0x11,0x13,0x16,0x1c,0x17,0x13, -0x14,0x1a,0x15,0x11,0x11,0x18,0x21,0x18,0x1a,0x1d,0x1d,0x1f,0x1f,0x1f,0x13,0x17, -0x22,0x24,0x22,0x1e,0x24,0x1c,0x1e,0x1f,0x1e,0xff,0xdb,0x00,0x43,0x01,0x05,0x05, -0x05,0x07,0x06,0x07,0x0e,0x08,0x08,0x0e,0x1e,0x14,0x11,0x14,0x1e,0x1e,0x1e,0x1e, -0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e, -0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e, -0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0xff,0xc0, -0x00,0x11,0x08,0x00,0x01,0x00,0x01,0x03,0x01,0x22,0x00,0x02,0x11,0x01,0x03,0x11, -0x01,0xff,0xc4,0x00,0x15,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xff,0xc4,0x00,0x14,0x10,0x01,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xc4, -0x00,0x14,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0xff,0xc4,0x00,0x14,0x11,0x01,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xda,0x00,0x0c,0x03,0x01, -0x00,0x02,0x11,0x03,0x11,0x00,0x3f,0x00,0xb2,0xc0,0x07,0xff,0xd9 -}; - -/* 1x1 pixel png */ -static unsigned char pngimage[285] = { -0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,0x44,0x52, -0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x08,0x02,0x00,0x00,0x00,0x90,0x77,0x53, -0xde,0x00,0x00,0x00,0x09,0x70,0x48,0x59,0x73,0x00,0x00,0x0b,0x13,0x00,0x00,0x0b, -0x13,0x01,0x00,0x9a,0x9c,0x18,0x00,0x00,0x00,0x07,0x74,0x49,0x4d,0x45,0x07,0xd5, -0x06,0x03,0x0f,0x07,0x2d,0x12,0x10,0xf0,0xfd,0x00,0x00,0x00,0x0c,0x49,0x44,0x41, -0x54,0x08,0xd7,0x63,0xf8,0xff,0xff,0x3f,0x00,0x05,0xfe,0x02,0xfe,0xdc,0xcc,0x59, -0xe7,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82 -}; - -/* 1x1 pixel bmp with gap between palette and bitmap. Correct bitmap contains only - zeroes, gap is 0xFF. */ -static unsigned char bmpimage[70] = { -0x42,0x4d,0x46,0x00,0x00,0x00,0xDE,0xAD,0xBE,0xEF,0x42,0x00,0x00,0x00,0x28,0x00, -0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00, -0x00,0x00,0x04,0x00,0x00,0x00,0x12,0x0b,0x00,0x00,0x12,0x0b,0x00,0x00,0x02,0x00, -0x00,0x00,0x02,0x00,0x00,0x00,0xff,0xff,0xff,0x00,0x55,0x55,0x55,0x00,0xFF,0xFF, -0xFF,0xFF,0x00,0x00,0x00,0x00 -}; - -/* 1x1 pixel bmp using BITMAPCOREHEADER */ -static unsigned char bmpcoreimage[38] = { -0x42,0x4d,0x26,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0x0c,0x00, -0x00,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xff,0xff,0xff,0x00,0x55,0x55, -0x55,0x00,0x00,0x00,0x00,0x00 -}; - -/* 2x2 pixel gif */ -static unsigned char gif4pixel[42] = { -0x47,0x49,0x46,0x38,0x37,0x61,0x02,0x00,0x02,0x00,0xa1,0x00,0x00,0x00,0x00,0x00, -0x39,0x62,0xfc,0xff,0x1a,0xe5,0xff,0xff,0xff,0x2c,0x00,0x00,0x00,0x00,0x02,0x00, -0x02,0x00,0x00,0x02,0x03,0x14,0x16,0x05,0x00,0x3b -}; - -static const DWORD biSize_tests[] = { - 0, - sizeof(BITMAPCOREHEADER) - 1, - sizeof(BITMAPCOREHEADER) + 1, - sizeof(BITMAPINFOHEADER) - 1, - sizeof(BITMAPINFOHEADER) + 1, - sizeof(BITMAPV4HEADER) - 1, - sizeof(BITMAPV4HEADER) + 1, - sizeof(BITMAPV5HEADER) - 1, - sizeof(BITMAPV5HEADER) + 1, - (sizeof(BITMAPCOREHEADER) + sizeof(BITMAPINFOHEADER)) / 2, - (sizeof(BITMAPV4HEADER) + sizeof(BITMAPV5HEADER)) / 2, - 0xdeadbeef, - 0xffffffff -}; - -#define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0])) - -static void test_LoadImageBitmap(const char * test_desc, HBITMAP hbm) -{ - BITMAP bm; - BITMAPINFO bmi; - DWORD ret, pixel = 0; - HDC hdc = GetDC(NULL); - - ret = GetObject(hbm, sizeof(bm), &bm); - ok(ret == sizeof(bm), "GetObject returned %d\n", ret); - - memset(&bmi, 0, sizeof(bmi)); - bmi.bmiHeader.biSize = sizeof(bmi.bmiHeader); - bmi.bmiHeader.biWidth = bm.bmWidth; - bmi.bmiHeader.biHeight = bm.bmHeight; - bmi.bmiHeader.biPlanes = 1; - bmi.bmiHeader.biBitCount= 24; - bmi.bmiHeader.biCompression= BI_RGB; - ret = GetDIBits(hdc, hbm, 0, bm.bmHeight, &pixel, &bmi, DIB_RGB_COLORS); - ok(ret == bm.bmHeight, "%s: %d lines were converted, not %d\n", test_desc, ret, bm.bmHeight); - - ok(color_match(pixel, 0x00ffffff), "%s: Pixel is 0x%08x\n", test_desc, pixel); -} - -static void test_LoadImageFile(const char * test_desc, unsigned char * image_data, - unsigned int image_size, const char * ext, BOOL expect_success) -{ - HANDLE handle; - BOOL ret; - DWORD error, bytes_written; - char filename[64]; - - strcpy(filename, "test."); - strcat(filename, ext); - - /* Create the test image. */ - handle = CreateFileA(filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_NEW, - FILE_ATTRIBUTE_NORMAL, NULL); - ok(handle != INVALID_HANDLE_VALUE, "CreateFileA failed. %u\n", GetLastError()); - ret = WriteFile(handle, image_data, image_size, &bytes_written, NULL); - ok(ret && bytes_written == image_size, "test file created improperly.\n"); - CloseHandle(handle); - - /* Load as cursor. For all tested formats, this should fail */ - SetLastError(0xdeadbeef); - handle = LoadImageA(NULL, filename, IMAGE_CURSOR, 0, 0, LR_LOADFROMFILE); - ok(handle == NULL, "%s: IMAGE_CURSOR succeeded incorrectly.\n", test_desc); - error = GetLastError(); - ok(error == 0 || - broken(error == 0xdeadbeef) || /* Win9x */ - broken(error == ERROR_BAD_PATHNAME), /* Win98, WinMe */ - "Last error: %u\n", error); - if (handle != NULL) DestroyCursor(handle); - - /* Load as icon. For all tested formats, this should fail */ - SetLastError(0xdeadbeef); - handle = LoadImageA(NULL, filename, IMAGE_ICON, 0, 0, LR_LOADFROMFILE); - ok(handle == NULL, "%s: IMAGE_ICON succeeded incorrectly.\n", test_desc); - error = GetLastError(); - ok(error == 0 || - broken(error == 0xdeadbeef) || /* Win9x */ - broken(error == ERROR_BAD_PATHNAME), /* Win98, WinMe */ - "Last error: %u\n", error); - if (handle != NULL) DestroyIcon(handle); - - /* Load as bitmap. Should succeed for correct bmp, fail for everything else */ - SetLastError(0xdeadbeef); - handle = LoadImageA(NULL, filename, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); - error = GetLastError(); - ok(error == 0 || - error == 0xdeadbeef, /* Win9x, WinMe */ - "Last error: %u\n", error); - - if (expect_success) { - ok(handle != NULL, "%s: IMAGE_BITMAP failed.\n", test_desc); - if (handle != NULL) test_LoadImageBitmap(test_desc, handle); - } - else ok(handle == NULL, "%s: IMAGE_BITMAP succeeded incorrectly.\n", test_desc); - - if (handle != NULL) DeleteObject(handle); - DeleteFileA(filename); -} - -static void test_LoadImage(void) -{ - HANDLE handle; - BOOL ret; - DWORD error, bytes_written; - CURSORICONFILEDIR *icon_data; - CURSORICONFILEDIRENTRY *icon_entry; - BITMAPINFOHEADER *icon_header, *bitmap_header; - ICONINFO icon_info; - int i; - -#define ICON_WIDTH 32 -#define ICON_HEIGHT 32 -#define ICON_AND_SIZE (ICON_WIDTH*ICON_HEIGHT/8) -#define ICON_BPP 32 -#define ICON_SIZE \ - (sizeof(CURSORICONFILEDIR) + sizeof(BITMAPINFOHEADER) \ - + ICON_AND_SIZE + ICON_AND_SIZE*ICON_BPP) - - /* Set icon data. */ - icon_data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, ICON_SIZE); - icon_data->idReserved = 0; - icon_data->idType = 1; - icon_data->idCount = 1; - - icon_entry = icon_data->idEntries; - icon_entry->bWidth = ICON_WIDTH; - icon_entry->bHeight = ICON_HEIGHT; - icon_entry->bColorCount = 0; - icon_entry->bReserved = 0; - icon_entry->xHotspot = 1; - icon_entry->yHotspot = 1; - icon_entry->dwDIBSize = ICON_SIZE - sizeof(CURSORICONFILEDIR); - icon_entry->dwDIBOffset = sizeof(CURSORICONFILEDIR); - - icon_header = (BITMAPINFOHEADER *) ((BYTE *) icon_data + icon_entry->dwDIBOffset); - icon_header->biSize = sizeof(BITMAPINFOHEADER); - icon_header->biWidth = ICON_WIDTH; - icon_header->biHeight = ICON_HEIGHT*2; - icon_header->biPlanes = 1; - icon_header->biBitCount = ICON_BPP; - icon_header->biSizeImage = 0; /* Uncompressed bitmap. */ - - /* Create the icon. */ - handle = CreateFileA("icon.ico", GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_NEW, - FILE_ATTRIBUTE_NORMAL, NULL); - ok(handle != INVALID_HANDLE_VALUE, "CreateFileA failed. %u\n", GetLastError()); - ret = WriteFile(handle, icon_data, ICON_SIZE, &bytes_written, NULL); - ok(ret && bytes_written == ICON_SIZE, "icon.ico created improperly.\n"); - CloseHandle(handle); - - /* Test loading an icon as a cursor. */ - SetLastError(0xdeadbeef); - handle = LoadImageA(NULL, "icon.ico", IMAGE_CURSOR, 0, 0, LR_LOADFROMFILE); - ok(handle != NULL, "LoadImage() failed.\n"); - error = GetLastError(); - ok(error == 0 || - broken(error == 0xdeadbeef) || /* Win9x */ - broken(error == ERROR_BAD_PATHNAME), /* Win98, WinMe */ - "Last error: %u\n", error); - - /* Test the icon information. */ - SetLastError(0xdeadbeef); - ret = GetIconInfo(handle, &icon_info); - ok(ret, "GetIconInfo() failed.\n"); - error = GetLastError(); - ok(error == 0xdeadbeef, "Last error: %u\n", error); - - if (ret) - { - ok(icon_info.fIcon == FALSE, "fIcon != FALSE.\n"); - ok(icon_info.xHotspot == 1, "xHotspot is %u.\n", icon_info.xHotspot); - ok(icon_info.yHotspot == 1, "yHotspot is %u.\n", icon_info.yHotspot); - ok(icon_info.hbmColor != NULL || broken(!icon_info.hbmColor) /* no color cursor support */, - "No hbmColor!\n"); - ok(icon_info.hbmMask != NULL, "No hbmMask!\n"); - } - - if (pGetIconInfoExA) - { - ICONINFOEXA infoex; - infoex.cbSize = sizeof(infoex); - ret = pGetIconInfoExA( handle, &infoex ); - ok( ret, "GetIconInfoEx failed err %d\n", GetLastError() ); - ok( infoex.wResID == 0, "GetIconInfoEx wrong resid %x\n", infoex.wResID ); - ok( infoex.szModName[0] == 0, "GetIconInfoEx wrong module %s\n", infoex.szModName ); - ok( infoex.szResName[0] == 0, "GetIconInfoEx wrong name %s\n", infoex.szResName ); - } - else win_skip( "GetIconInfoEx not available\n" ); - - /* Clean up. */ - SetLastError(0xdeadbeef); - ret = DestroyCursor(handle); - ok(ret, "DestroyCursor() failed.\n"); - error = GetLastError(); - ok(error == 0xdeadbeef, "Last error: %u\n", error); - - HeapFree(GetProcessHeap(), 0, icon_data); - DeleteFileA("icon.ico"); - - /* Test a system icon */ - handle = LoadIcon( 0, IDI_HAND ); - ok(handle != NULL, "LoadImage() failed.\n"); - if (pGetIconInfoExA) - { - ICONINFOEXA infoexA; - ICONINFOEXW infoexW; - infoexA.cbSize = sizeof(infoexA); - ret = pGetIconInfoExA( handle, &infoexA ); - ok( ret, "GetIconInfoEx failed err %d\n", GetLastError() ); - ok( infoexA.wResID == (UINT_PTR)IDI_HAND, "GetIconInfoEx wrong resid %x\n", infoexA.wResID ); - /* the A version is broken on 64-bit, it truncates the string after the first char */ - if (is_win64 && infoexA.szModName[0] && infoexA.szModName[1] == 0) - trace( "GetIconInfoExA broken on Win64\n" ); - else - ok( GetModuleHandleA(infoexA.szModName) == GetModuleHandleA("user32.dll"), - "GetIconInfoEx wrong module %s\n", infoexA.szModName ); - ok( infoexA.szResName[0] == 0, "GetIconInfoEx wrong name %s\n", infoexA.szResName ); - infoexW.cbSize = sizeof(infoexW); - ret = pGetIconInfoExW( handle, &infoexW ); - ok( ret, "GetIconInfoEx failed err %d\n", GetLastError() ); - ok( infoexW.wResID == (UINT_PTR)IDI_HAND, "GetIconInfoEx wrong resid %x\n", infoexW.wResID ); - ok( GetModuleHandleW(infoexW.szModName) == GetModuleHandleA("user32.dll"), - "GetIconInfoEx wrong module %s\n", wine_dbgstr_w(infoexW.szModName) ); - ok( infoexW.szResName[0] == 0, "GetIconInfoEx wrong name %s\n", wine_dbgstr_w(infoexW.szResName) ); - } - SetLastError(0xdeadbeef); - DestroyIcon(handle); - - test_LoadImageFile("BMP", bmpimage, sizeof(bmpimage), "bmp", 1); - test_LoadImageFile("BMP (coreinfo)", bmpcoreimage, sizeof(bmpcoreimage), "bmp", 1); - test_LoadImageFile("GIF", gifimage, sizeof(gifimage), "gif", 0); - test_LoadImageFile("GIF (2x2 pixel)", gif4pixel, sizeof(gif4pixel), "gif", 0); - test_LoadImageFile("JPG", jpgimage, sizeof(jpgimage), "jpg", 0); - test_LoadImageFile("PNG", pngimage, sizeof(pngimage), "png", 0); - - /* Check failure for broken BMP images */ - bitmap_header = (BITMAPINFOHEADER *)(bmpimage + sizeof(BITMAPFILEHEADER)); - - bitmap_header->biHeight = 65536; - test_LoadImageFile("BMP (too high)", bmpimage, sizeof(bmpimage), "bmp", 0); - bitmap_header->biHeight = 1; - - bitmap_header->biWidth = 65536; - test_LoadImageFile("BMP (too wide)", bmpimage, sizeof(bmpimage), "bmp", 0); - bitmap_header->biWidth = 1; - - for (i = 0; i < ARRAY_SIZE(biSize_tests); i++) { - bitmap_header->biSize = biSize_tests[i]; - test_LoadImageFile("BMP (broken biSize)", bmpimage, sizeof(bmpimage), "bmp", 0); - } - bitmap_header->biSize = sizeof(BITMAPINFOHEADER); -} - -#undef ARRAY_SIZE - -static void test_CreateIconFromResource(void) -{ - HANDLE handle; - BOOL ret; - DWORD error; - BITMAPINFOHEADER *icon_header; - INT16 *hotspot; - ICONINFO icon_info; - -#define ICON_RES_WIDTH 32 -#define ICON_RES_HEIGHT 32 -#define ICON_RES_AND_SIZE (ICON_WIDTH*ICON_HEIGHT/8) -#define ICON_RES_BPP 32 -#define ICON_RES_SIZE \ - (sizeof(BITMAPINFOHEADER) + ICON_AND_SIZE + ICON_AND_SIZE*ICON_BPP) -#define CRSR_RES_SIZE (2*sizeof(INT16) + ICON_RES_SIZE) - - /* Set icon data. */ - hotspot = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, CRSR_RES_SIZE); - - /* Cursor resources have an extra hotspot, icon resources not. */ - hotspot[0] = 3; - hotspot[1] = 3; - - icon_header = (BITMAPINFOHEADER *) (hotspot + 2); - icon_header->biSize = sizeof(BITMAPINFOHEADER); - icon_header->biWidth = ICON_WIDTH; - icon_header->biHeight = ICON_HEIGHT*2; - icon_header->biPlanes = 1; - icon_header->biBitCount = ICON_BPP; - icon_header->biSizeImage = 0; /* Uncompressed bitmap. */ - - /* Test creating a cursor. */ - SetLastError(0xdeadbeef); - handle = CreateIconFromResource((PBYTE) hotspot, CRSR_RES_SIZE, FALSE, 0x00030000); - ok(handle != NULL, "Create cursor failed.\n"); - - /* Test the icon information. */ - SetLastError(0xdeadbeef); - ret = GetIconInfo(handle, &icon_info); - ok(ret, "GetIconInfo() failed.\n"); - error = GetLastError(); - ok(error == 0xdeadbeef, "Last error: %u\n", error); - - if (ret) - { - ok(icon_info.fIcon == FALSE, "fIcon != FALSE.\n"); - ok(icon_info.xHotspot == 3, "xHotspot is %u.\n", icon_info.xHotspot); - ok(icon_info.yHotspot == 3, "yHotspot is %u.\n", icon_info.yHotspot); - ok(icon_info.hbmColor != NULL || broken(!icon_info.hbmColor) /* no color cursor support */, - "No hbmColor!\n"); - ok(icon_info.hbmMask != NULL, "No hbmMask!\n"); - } - - if (pGetIconInfoExA) - { - ICONINFOEXA infoex; - infoex.cbSize = sizeof(infoex); - ret = pGetIconInfoExA( handle, &infoex ); - ok( ret, "GetIconInfoEx failed err %d\n", GetLastError() ); - ok( infoex.wResID == 0, "GetIconInfoEx wrong resid %x\n", infoex.wResID ); - ok( infoex.szModName[0] == 0, "GetIconInfoEx wrong module %s\n", infoex.szModName ); - ok( infoex.szResName[0] == 0, "GetIconInfoEx wrong name %s\n", infoex.szResName ); - } - - /* Clean up. */ - SetLastError(0xdeadbeef); - ret = DestroyCursor(handle); - ok(ret, "DestroyCursor() failed.\n"); - error = GetLastError(); - ok(error == 0xdeadbeef, "Last error: %u\n", error); - - /* Test creating an icon. */ - SetLastError(0xdeadbeef); - handle = CreateIconFromResource((PBYTE) icon_header, ICON_RES_SIZE, TRUE, - 0x00030000); - ok(handle != NULL, "Create icon failed.\n"); - - /* Test the icon information. */ - SetLastError(0xdeadbeef); - ret = GetIconInfo(handle, &icon_info); - ok(ret, "GetIconInfo() failed.\n"); - error = GetLastError(); - ok(error == 0xdeadbeef, "Last error: %u\n", error); - - if (ret) - { - ok(icon_info.fIcon == TRUE, "fIcon != TRUE.\n"); - /* Icons always have hotspot in the middle */ - ok(icon_info.xHotspot == ICON_WIDTH/2, "xHotspot is %u.\n", icon_info.xHotspot); - ok(icon_info.yHotspot == ICON_HEIGHT/2, "yHotspot is %u.\n", icon_info.yHotspot); - ok(icon_info.hbmColor != NULL, "No hbmColor!\n"); - ok(icon_info.hbmMask != NULL, "No hbmMask!\n"); - } - - /* Clean up. */ - SetLastError(0xdeadbeef); - ret = DestroyCursor(handle); - ok(ret, "DestroyCursor() failed.\n"); - error = GetLastError(); - ok(error == 0xdeadbeef, "Last error: %u\n", error); - - /* Rejection of NULL pointer crashes at least on WNT4WSSP6, W2KPROSP4, WXPPROSP3 - * - * handle = CreateIconFromResource(NULL, ICON_RES_SIZE, TRUE, 0x00030000); - * ok(handle == NULL, "Invalid pointer accepted (%p)\n", handle); - */ - HeapFree(GetProcessHeap(), 0, hotspot); - - /* Test creating an animated cursor. */ - empty_anicursor.frames[0].data.icon_info.idType = 2; /* type: cursor */ - empty_anicursor.frames[0].data.icon_info.idEntries[0].xHotspot = 3; - empty_anicursor.frames[0].data.icon_info.idEntries[0].yHotspot = 3; - handle = CreateIconFromResource((PBYTE) &empty_anicursor, sizeof(empty_anicursor), FALSE, 0x00030000); - ok(handle != NULL, "Create cursor failed.\n"); - - /* Test the animated cursor's information. */ - SetLastError(0xdeadbeef); - ret = GetIconInfo(handle, &icon_info); - ok(ret, "GetIconInfo() failed.\n"); - error = GetLastError(); - ok(error == 0xdeadbeef, "Last error: %u\n", error); - - if (ret) - { - ok(icon_info.fIcon == FALSE, "fIcon != FALSE.\n"); - ok(icon_info.xHotspot == 3, "xHotspot is %u.\n", icon_info.xHotspot); - ok(icon_info.yHotspot == 3, "yHotspot is %u.\n", icon_info.yHotspot); - ok(icon_info.hbmColor != NULL || broken(!icon_info.hbmColor) /* no color cursor support */, - "No hbmColor!\n"); - ok(icon_info.hbmMask != NULL, "No hbmMask!\n"); - } - - /* Clean up. */ - SetLastError(0xdeadbeef); - ret = DestroyCursor(handle); - ok(ret, "DestroyCursor() failed.\n"); - error = GetLastError(); - ok(error == 0xdeadbeef, "Last error: %u\n", error); -} - -static int check_cursor_data( HDC hdc, HCURSOR hCursor, void *data, int length) -{ - char *image = NULL; - BITMAPINFO *info; - ICONINFO iinfo; - DWORD ret; - int i; - - ret = GetIconInfo( hCursor, &iinfo ); - ok(ret, "GetIconInfo() failed\n"); - if (!ret) return 0; - ret = 0; - info = HeapAlloc( GetProcessHeap(), 0, FIELD_OFFSET( BITMAPINFO, bmiColors[256] )); - ok(info != NULL, "HeapAlloc() failed\n"); - if (!info) return 0; - - info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - info->bmiHeader.biWidth = 32; - info->bmiHeader.biHeight = 32; - info->bmiHeader.biPlanes = 1; - info->bmiHeader.biBitCount = 32; - info->bmiHeader.biCompression = BI_RGB; - info->bmiHeader.biSizeImage = 32 * 32 * 4; - info->bmiHeader.biXPelsPerMeter = 0; - info->bmiHeader.biYPelsPerMeter = 0; - info->bmiHeader.biClrUsed = 0; - info->bmiHeader.biClrImportant = 0; - image = HeapAlloc( GetProcessHeap(), 0, info->bmiHeader.biSizeImage ); - ok(image != NULL, "HeapAlloc() failed\n"); - if (!image) goto cleanup; - ret = GetDIBits( hdc, iinfo.hbmColor, 0, 32, image, info, DIB_RGB_COLORS ); - ok(ret, "GetDIBits() failed\n"); - for (i = 0; ret && i < length / sizeof(COLORREF); i++) - { - ret = color_match( ((COLORREF *)data)[i], ((COLORREF *)image)[i] ); - ok(ret, "%04x: Expected 0x%x, actually 0x%x\n", i, ((COLORREF *)data)[i], ((COLORREF *)image)[i] ); - } -cleanup: - HeapFree( GetProcessHeap(), 0, image ); - HeapFree( GetProcessHeap(), 0, info ); - return ret; -} - -static HCURSOR (WINAPI *pGetCursorFrameInfo)(HCURSOR hCursor, DWORD unk1, DWORD istep, DWORD *rate, DWORD *steps); -static void test_GetCursorFrameInfo(void) -{ - DWORD frame_identifier[] = { 0x10Ad, 0xc001, 0x1c05 }; - HBITMAP bmp = NULL, bmpOld = NULL; - DWORD rate, steps; - BITMAPINFOHEADER *icon_header; - BITMAPINFO bitmapInfo; - HDC hdc = NULL; - void *bits = 0; - INT16 *hotspot; - HANDLE h1, h2; - BOOL ret; - int i; - - if (!pGetCursorFrameInfo) - { - win_skip( "GetCursorFrameInfo not supported, skipping tests.\n" ); - return; - } - - hdc = CreateCompatibleDC(0); - ok(hdc != 0, "CreateCompatibleDC(0) failed to return a valid DC\n"); - if (!hdc) - return; - - memset(&bitmapInfo, 0, sizeof(bitmapInfo)); - bitmapInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bitmapInfo.bmiHeader.biWidth = 3; - bitmapInfo.bmiHeader.biHeight = 3; - bitmapInfo.bmiHeader.biBitCount = 32; - bitmapInfo.bmiHeader.biPlanes = 1; - bitmapInfo.bmiHeader.biCompression = BI_RGB; - bitmapInfo.bmiHeader.biSizeImage = sizeof(UINT32); - bmp = CreateDIBSection(hdc, &bitmapInfo, DIB_RGB_COLORS, &bits, NULL, 0); - ok (bmp && bits, "CreateDIBSection failed to return a valid bitmap and buffer\n"); - if (!bmp || !bits) - goto cleanup; - bmpOld = SelectObject(hdc, bmp); - -#define ICON_RES_WIDTH 32 -#define ICON_RES_HEIGHT 32 -#define ICON_RES_AND_SIZE (ICON_WIDTH*ICON_HEIGHT/8) -#define ICON_RES_BPP 32 -#define ICON_RES_SIZE \ - (sizeof(BITMAPINFOHEADER) + ICON_AND_SIZE + ICON_AND_SIZE*ICON_BPP) -#define CRSR_RES_SIZE (2*sizeof(INT16) + ICON_RES_SIZE) - - /* Set icon data. */ - hotspot = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, CRSR_RES_SIZE); - - /* Cursor resources have an extra hotspot, icon resources not. */ - hotspot[0] = 3; - hotspot[1] = 3; - - icon_header = (BITMAPINFOHEADER *) (hotspot + 2); - icon_header->biSize = sizeof(BITMAPINFOHEADER); - icon_header->biWidth = ICON_WIDTH; - icon_header->biHeight = ICON_HEIGHT*2; - icon_header->biPlanes = 1; - icon_header->biBitCount = ICON_BPP; - icon_header->biSizeImage = 0; /* Uncompressed bitmap. */ - - /* Creating a static cursor. */ - SetLastError(0xdeadbeef); - h1 = CreateIconFromResource((PBYTE) hotspot, CRSR_RES_SIZE, FALSE, 0x00030000); - ok(h1 != NULL, "Create cursor failed (error = %d).\n", GetLastError()); - - /* Check GetCursorFrameInfo behavior on a static cursor */ - rate = steps = 0xdead; - h2 = pGetCursorFrameInfo(h1, 0xdead, 0xdead, &rate, &steps); - ok(h1 == h2, "GetCursorFrameInfo() failed: (%p != %p).\n", h1, h2); - ok(rate == 0, "GetCursorFrameInfo() unexpected param 4 value (0x%x != 0x0).\n", rate); - ok(steps == 1, "GetCursorFrameInfo() unexpected param 5 value (%d != 1).\n", steps); - - /* Clean up static cursor. */ - SetLastError(0xdeadbeef); - ret = DestroyCursor(h1); - ok(ret, "DestroyCursor() failed (error = %d).\n", GetLastError()); - - /* Creating a single-frame animated cursor. */ - empty_anicursor.frames[0].data.icon_info.idType = 2; /* type: cursor */ - empty_anicursor.frames[0].data.icon_info.idEntries[0].xHotspot = 3; - empty_anicursor.frames[0].data.icon_info.idEntries[0].yHotspot = 3; - memcpy( &empty_anicursor.frames[0].data.bmi_data.data[0], &frame_identifier[0], sizeof(DWORD) ); - SetLastError(0xdeadbeef); - h1 = CreateIconFromResource((PBYTE) &empty_anicursor, sizeof(empty_anicursor), FALSE, 0x00030000); - ok(h1 != NULL, "Create cursor failed (error = %d).\n", GetLastError()); - - /* Check GetCursorFrameInfo behavior on a single-frame animated cursor */ - rate = steps = 0xdead; - h2 = pGetCursorFrameInfo(h1, 0xdead, 0, &rate, &steps); - ok(h1 == h2, "GetCursorFrameInfo() failed: (%p != %p).\n", h1, h2); - ret = check_cursor_data( hdc, h2, &frame_identifier[0], sizeof(DWORD) ); - ok(ret, "GetCursorFrameInfo() returned wrong cursor data for frame 0.\n"); - ok(rate == 0x0, "GetCursorFrameInfo() unexpected param 4 value (0x%x != 0x0).\n", rate); - ok(steps == empty_anicursor.header.header.num_steps, - "GetCursorFrameInfo() unexpected param 5 value (%d != 1).\n", steps); - - /* Clean up single-frame animated cursor. */ - SetLastError(0xdeadbeef); - ret = DestroyCursor(h1); - ok(ret, "DestroyCursor() failed (error = %d).\n", GetLastError()); - - /* Creating a multi-frame animated cursor. */ - for (i=0; i= 3) - { - /* Child process. */ - sscanf (test_argv[2], "%x", (unsigned int *) &parent); - - ok(parent != NULL, "Parent not found.\n"); - if (parent == NULL) - ExitProcess(1); - - do_child(); - return; - } - - test_CopyImage_Bitmap(1); - test_CopyImage_Bitmap(4); - test_CopyImage_Bitmap(8); - test_CopyImage_Bitmap(16); - test_CopyImage_Bitmap(24); - test_CopyImage_Bitmap(32); - test_initial_cursor(); - test_CreateIcon(); - test_LoadImage(); - test_CreateIconFromResource(); - test_GetCursorFrameInfo(); - test_DrawIcon(); - test_DrawIconEx(); - test_DrawState(); - test_SetCursor(); - test_ShowCursor(); - test_DestroyCursor(); - do_parent(); - test_child_process(); - finish_child_process(); -} diff --git a/rostests/winetests/user32/dce.c b/rostests/winetests/user32/dce.c deleted file mode 100755 index 4aacd64a593..00000000000 --- a/rostests/winetests/user32/dce.c +++ /dev/null @@ -1,572 +0,0 @@ -/* - * Unit tests for DCE support - * - * Copyright 2005 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 - */ - -#include -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" - -#include "wine/test.h" - -#ifndef DCX_USESTYLE -#define DCX_USESTYLE 0x00010000 -#endif - -static HWND hwnd_cache, hwnd_owndc, hwnd_classdc, hwnd_classdc2; - -/* test behavior of DC attributes with various GetDC/ReleaseDC combinations */ -static void test_dc_attributes(void) -{ - HDC hdc, old_hdc; - HDC hdcs[20]; - INT i, rop, def_rop, found_dc; - - /* test cache DC */ - - hdc = GetDC( hwnd_cache ); - def_rop = GetROP2( hdc ); - - SetROP2( hdc, R2_WHITE ); - rop = GetROP2( hdc ); - ok( rop == R2_WHITE, "wrong ROP2 %d\n", rop ); - - ReleaseDC( hwnd_cache, hdc ); - hdc = GetDC( hwnd_cache ); - rop = GetROP2( hdc ); - ok( rop == def_rop, "wrong ROP2 %d after release\n", rop ); - SetROP2( hdc, R2_WHITE ); - ReleaseDC( hwnd_cache, hdc ); - old_hdc = hdc; - - found_dc = 0; - for (i = 0; i < 20; i++) - { - hdc = hdcs[i] = GetDCEx( hwnd_cache, 0, DCX_USESTYLE | DCX_NORESETATTRS ); - if (!hdc) break; - rop = GetROP2( hdc ); - ok( rop == def_rop, "wrong ROP2 %d after release %p/%p\n", rop, old_hdc, hdc ); - if (hdc == old_hdc) - { - found_dc = 1; - SetROP2( hdc, R2_WHITE ); - } - } - if (!found_dc) - { - trace( "hdc %p not found in cache using %p\n", old_hdc, hdcs[0] ); - old_hdc = hdcs[0]; - SetROP2( old_hdc, R2_WHITE ); - } - while (i >= 0) ReleaseDC( hwnd_cache, hdcs[--i] ); - - for (i = 0; i < 20; i++) - { - hdc = hdcs[i] = GetDCEx( hwnd_cache, 0, DCX_USESTYLE | DCX_NORESETATTRS ); - if (!hdc) break; - rop = GetROP2( hdc ); - if (hdc == old_hdc) - ok( rop == R2_WHITE || broken( rop == def_rop), /* win9x doesn't support DCX_NORESETATTRS */ - "wrong ROP2 %d after release %p/%p\n", rop, old_hdc, hdc ); - else - ok( rop == def_rop, "wrong ROP2 %d after release %p/%p\n", rop, old_hdc, hdc ); - } - while (i >= 0) ReleaseDC( hwnd_cache, hdcs[--i] ); - - for (i = 0; i < 20; i++) - { - hdc = hdcs[i] = GetDCEx( hwnd_cache, 0, DCX_USESTYLE ); - if (!hdc) break; - rop = GetROP2( hdc ); - if (hdc == old_hdc) - { - ok( rop == R2_WHITE || broken( rop == def_rop), - "wrong ROP2 %d after release %p/%p\n", rop, old_hdc, hdc ); - SetROP2( old_hdc, def_rop ); - } - else - ok( rop == def_rop, "wrong ROP2 %d after release %p/%p\n", rop, old_hdc, hdc ); - } - while (i >= 0) ReleaseDC( hwnd_cache, hdcs[--i] ); - - /* test own DC */ - - hdc = GetDC( hwnd_owndc ); - SetROP2( hdc, R2_WHITE ); - rop = GetROP2( hdc ); - ok( rop == R2_WHITE, "wrong ROP2 %d\n", rop ); - - old_hdc = hdc; - ReleaseDC( hwnd_owndc, hdc ); - hdc = GetDC( hwnd_owndc ); - ok( old_hdc == hdc, "didn't get same DC %p/%p\n", old_hdc, hdc ); - rop = GetROP2( hdc ); - ok( rop == R2_WHITE, "wrong ROP2 %d after release\n", rop ); - ReleaseDC( hwnd_owndc, hdc ); - rop = GetROP2( hdc ); - ok( rop == R2_WHITE, "wrong ROP2 %d after second release\n", rop ); - - /* test class DC */ - - hdc = GetDC( hwnd_classdc ); - SetROP2( hdc, R2_WHITE ); - rop = GetROP2( hdc ); - ok( rop == R2_WHITE, "wrong ROP2 %d\n", rop ); - - old_hdc = hdc; - ReleaseDC( hwnd_classdc, hdc ); - hdc = GetDC( hwnd_classdc ); - ok( old_hdc == hdc, "didn't get same DC %p/%p\n", old_hdc, hdc ); - rop = GetROP2( hdc ); - ok( rop == R2_WHITE, "wrong ROP2 %d after release\n", rop ); - ReleaseDC( hwnd_classdc, hdc ); - rop = GetROP2( hdc ); - ok( rop == R2_WHITE, "wrong ROP2 %d after second release\n", rop ); - - /* test class DC with 2 windows */ - - old_hdc = GetDC( hwnd_classdc ); - SetROP2( old_hdc, R2_BLACK ); - hdc = GetDC( hwnd_classdc2 ); - ok( old_hdc == hdc, "didn't get same DC %p/%p\n", old_hdc, hdc ); - rop = GetROP2( hdc ); - ok( rop == R2_BLACK, "wrong ROP2 %d for other window\n", rop ); - ReleaseDC( hwnd_classdc, old_hdc ); - ReleaseDC( hwnd_classdc, hdc ); - rop = GetROP2( hdc ); - ok( rop == R2_BLACK, "wrong ROP2 %d after release\n", rop ); -} - - -/* test behavior with various invalid parameters */ -static void test_parameters(void) -{ - HDC hdc; - - hdc = GetDC( hwnd_cache ); - ok( ReleaseDC( hwnd_owndc, hdc ), "ReleaseDC with wrong window should succeed\n" ); - - hdc = GetDC( hwnd_cache ); - ok( !ReleaseDC( hwnd_cache, 0 ), "ReleaseDC with wrong HDC should fail\n" ); - ok( ReleaseDC( hwnd_cache, hdc ), "correct ReleaseDC should succeed\n" ); - ok( !ReleaseDC( hwnd_cache, hdc ), "second ReleaseDC should fail\n" ); - - hdc = GetDC( hwnd_owndc ); - ok( ReleaseDC( hwnd_cache, hdc ), "ReleaseDC with wrong window should succeed\n" ); - hdc = GetDC( hwnd_owndc ); - ok( ReleaseDC( hwnd_owndc, hdc ), "correct ReleaseDC should succeed\n" ); - ok( ReleaseDC( hwnd_owndc, hdc ), "second ReleaseDC should succeed\n" ); - - hdc = GetDC( hwnd_classdc ); - ok( ReleaseDC( hwnd_cache, hdc ), "ReleaseDC with wrong window should succeed\n" ); - hdc = GetDC( hwnd_classdc ); - ok( ReleaseDC( hwnd_classdc, hdc ), "correct ReleaseDC should succeed\n" ); - ok( ReleaseDC( hwnd_classdc, hdc ), "second ReleaseDC should succeed\n" ); -} - - -static void test_dc_visrgn(void) -{ - HDC old_hdc, hdc; - HRGN hrgn, hrgn2; - RECT rect; - - /* cache DC */ - - SetRect( &rect, 10, 10, 20, 20 ); - MapWindowPoints( hwnd_cache, 0, (POINT *)&rect, 2 ); - hrgn = CreateRectRgnIndirect( &rect ); - hdc = GetDCEx( hwnd_cache, hrgn, DCX_INTERSECTRGN | DCX_USESTYLE ); - SetRectEmpty( &rect ); - GetClipBox( hdc, &rect ); - ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20, - "invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" ); - ReleaseDC( hwnd_cache, hdc ); - ok( GetRgnBox( hrgn, &rect ) == ERROR, "region must no longer be valid\n" ); - - /* cache DC with NORESETATTRS */ - - SetRect( &rect, 10, 10, 20, 20 ); - MapWindowPoints( hwnd_cache, 0, (POINT *)&rect, 2 ); - hrgn = CreateRectRgnIndirect( &rect ); - hdc = GetDCEx( hwnd_cache, hrgn, DCX_INTERSECTRGN | DCX_USESTYLE | DCX_NORESETATTRS ); - SetRectEmpty( &rect ); - GetClipBox( hdc, &rect ); - ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20, - "invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" ); - ReleaseDC( hwnd_cache, hdc ); - ok( GetRgnBox( hrgn, &rect ) == ERROR, "region must no longer be valid\n" ); - hdc = GetDCEx( hwnd_cache, 0, DCX_USESTYLE | DCX_NORESETATTRS ); - SetRectEmpty( &rect ); - GetClipBox( hdc, &rect ); - ok( !(rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20), - "clip box should have been reset %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - ReleaseDC( hwnd_cache, hdc ); - - /* window DC */ - - SetRect( &rect, 10, 10, 20, 20 ); - MapWindowPoints( hwnd_owndc, 0, (POINT *)&rect, 2 ); - hrgn = CreateRectRgnIndirect( &rect ); - hdc = GetDCEx( hwnd_owndc, hrgn, DCX_INTERSECTRGN | DCX_USESTYLE ); - SetRectEmpty( &rect ); - GetClipBox( hdc, &rect ); - ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20, - "invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" ); - ReleaseDC( hwnd_owndc, hdc ); - ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" ); - SetRectEmpty( &rect ); - GetClipBox( hdc, &rect ); - ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20, - "invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - hdc = GetDCEx( hwnd_owndc, 0, DCX_USESTYLE ); - SetRectEmpty( &rect ); - GetClipBox( hdc, &rect ); - ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20, - "invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" ); - ReleaseDC( hwnd_owndc, hdc ); - ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" ); - - SetRect( &rect, 20, 20, 30, 30 ); - MapWindowPoints( hwnd_owndc, 0, (POINT *)&rect, 2 ); - hrgn2 = CreateRectRgnIndirect( &rect ); - hdc = GetDCEx( hwnd_owndc, hrgn2, DCX_INTERSECTRGN | DCX_USESTYLE ); - ok( GetRgnBox( hrgn, &rect ) == ERROR, "region must no longer be valid\n" ); - SetRectEmpty( &rect ); - GetClipBox( hdc, &rect ); - ok( rect.left >= 20 && rect.top >= 20 && rect.right <= 30 && rect.bottom <= 30, - "invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - ok( GetRgnBox( hrgn2, &rect ) != ERROR, "region2 must still be valid\n" ); - ReleaseDC( hwnd_owndc, hdc ); - ok( GetRgnBox( hrgn2, &rect ) != ERROR, "region2 must still be valid\n" ); - hdc = GetDCEx( hwnd_owndc, 0, DCX_EXCLUDERGN | DCX_USESTYLE ); - ok( GetRgnBox( hrgn2, &rect ) == ERROR, "region must no longer be valid\n" ); - SetRectEmpty( &rect ); - GetClipBox( hdc, &rect ); - ok( !(rect.left >= 20 && rect.top >= 20 && rect.right <= 30 && rect.bottom <= 30), - "clip box should have been reset %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - ReleaseDC( hwnd_owndc, hdc ); - - /* class DC */ - - SetRect( &rect, 10, 10, 20, 20 ); - MapWindowPoints( hwnd_classdc, 0, (POINT *)&rect, 2 ); - hrgn = CreateRectRgnIndirect( &rect ); - hdc = GetDCEx( hwnd_classdc, hrgn, DCX_INTERSECTRGN | DCX_USESTYLE ); - SetRectEmpty( &rect ); - GetClipBox( hdc, &rect ); - ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20, - "invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" ); - ReleaseDC( hwnd_classdc, hdc ); - ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" ); - SetRectEmpty( &rect ); - GetClipBox( hdc, &rect ); - ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20, - "invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - - hdc = GetDCEx( hwnd_classdc, 0, DCX_USESTYLE ); - SetRectEmpty( &rect ); - GetClipBox( hdc, &rect ); - ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20, - "invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" ); - ReleaseDC( hwnd_classdc, hdc ); - ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" ); - - SetRect( &rect, 20, 20, 30, 30 ); - MapWindowPoints( hwnd_classdc, 0, (POINT *)&rect, 2 ); - hrgn2 = CreateRectRgnIndirect( &rect ); - hdc = GetDCEx( hwnd_classdc, hrgn2, DCX_INTERSECTRGN | DCX_USESTYLE ); - ok( GetRgnBox( hrgn, &rect ) == ERROR, "region must no longer be valid\n" ); - SetRectEmpty( &rect ); - GetClipBox( hdc, &rect ); - ok( rect.left >= 20 && rect.top >= 20 && rect.right <= 30 && rect.bottom <= 30, - "invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - ok( GetRgnBox( hrgn2, &rect ) != ERROR, "region2 must still be valid\n" ); - - old_hdc = hdc; - hdc = GetDCEx( hwnd_classdc2, 0, DCX_USESTYLE ); - ok( old_hdc == hdc, "did not get the same hdc %p/%p\n", old_hdc, hdc ); - ok( GetRgnBox( hrgn2, &rect ) != ERROR, "region2 must still be valid\n" ); - SetRectEmpty( &rect ); - GetClipBox( hdc, &rect ); - ok( !(rect.left >= 20 && rect.top >= 20 && rect.right <= 30 && rect.bottom <= 30), - "clip box should have been reset %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - ReleaseDC( hwnd_classdc2, hdc ); - ok( GetRgnBox( hrgn2, &rect ) != ERROR, "region2 must still be valid\n" ); - hdc = GetDCEx( hwnd_classdc2, 0, DCX_EXCLUDERGN | DCX_USESTYLE ); - ok( GetRgnBox( hrgn2, &rect ) != ERROR, "region2 must still be valid\n" ); - ok( !(rect.left >= 20 && rect.top >= 20 && rect.right <= 30 && rect.bottom <= 30), - "clip box must have been reset %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - ReleaseDC( hwnd_classdc2, hdc ); -} - - -/* test various BeginPaint/EndPaint behaviors */ -static void test_begin_paint(void) -{ - HDC old_hdc, hdc; - RECT rect; - PAINTSTRUCT ps; - - /* cache DC */ - - /* clear update region */ - RedrawWindow( hwnd_cache, NULL, 0, RDW_VALIDATE|RDW_NOFRAME|RDW_NOERASE ); - SetRect( &rect, 10, 10, 20, 20 ); - RedrawWindow( hwnd_cache, &rect, 0, RDW_INVALIDATE ); - hdc = BeginPaint( hwnd_cache, &ps ); - SetRectEmpty( &rect ); - GetClipBox( hdc, &rect ); - ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20, - "invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - EndPaint( hwnd_cache, &ps ); - - /* window DC */ - - RedrawWindow( hwnd_owndc, NULL, 0, RDW_VALIDATE|RDW_NOFRAME|RDW_NOERASE ); - SetRect( &rect, 10, 10, 20, 20 ); - RedrawWindow( hwnd_owndc, &rect, 0, RDW_INVALIDATE ); - hdc = BeginPaint( hwnd_owndc, &ps ); - SetRectEmpty( &rect ); - GetClipBox( hdc, &rect ); - ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20, - "invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - ReleaseDC( hwnd_owndc, hdc ); - SetRectEmpty( &rect ); - GetClipBox( hdc, &rect ); - ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20, - "invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - ok( GetDC( hwnd_owndc ) == hdc, "got different hdc\n" ); - SetRectEmpty( &rect ); - GetClipBox( hdc, &rect ); - ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20, - "invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - EndPaint( hwnd_owndc, &ps ); - SetRectEmpty( &rect ); - GetClipBox( hdc, &rect ); - ok( !(rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20), - "clip box should have been reset %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - RedrawWindow( hwnd_owndc, NULL, 0, RDW_VALIDATE|RDW_NOFRAME|RDW_NOERASE ); - SetRect( &rect, 10, 10, 20, 20 ); - RedrawWindow( hwnd_owndc, &rect, 0, RDW_INVALIDATE|RDW_ERASE ); - ok( GetDC( hwnd_owndc ) == hdc, "got different hdc\n" ); - SetRectEmpty( &rect ); - GetClipBox( hdc, &rect ); - ok( !(rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20), - "clip box should be the whole window %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - RedrawWindow( hwnd_owndc, NULL, 0, RDW_ERASENOW ); - SetRectEmpty( &rect ); - GetClipBox( hdc, &rect ); - ok( !(rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20), - "clip box should still be the whole window %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - - /* class DC */ - - RedrawWindow( hwnd_classdc, NULL, 0, RDW_VALIDATE|RDW_NOFRAME|RDW_NOERASE ); - SetRect( &rect, 10, 10, 20, 20 ); - RedrawWindow( hwnd_classdc, &rect, 0, RDW_INVALIDATE ); - hdc = BeginPaint( hwnd_classdc, &ps ); - SetRectEmpty( &rect ); - GetClipBox( hdc, &rect ); - ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20, - "invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - - old_hdc = hdc; - hdc = GetDC( hwnd_classdc2 ); - ok( old_hdc == hdc, "did not get the same hdc %p/%p\n", old_hdc, hdc ); - SetRectEmpty( &rect ); - GetClipBox( hdc, &rect ); - ok( !(rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20), - "clip box should have been reset %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); -} - -static void test_invisible_create(void) -{ - HWND hwnd_owndc = CreateWindowA("owndc_class", NULL, WS_OVERLAPPED, - 0, 200, 100, 100, - 0, 0, GetModuleHandleA(0), NULL ); - HDC dc1, dc2; - - dc1 = GetDC(hwnd_owndc); - dc2 = GetDC(hwnd_owndc); - - ok(dc1 == dc2, "expected owndc dcs to match\n"); - - ReleaseDC(hwnd_owndc, dc2); - ReleaseDC(hwnd_owndc, dc1); - DestroyWindow(hwnd_owndc); -} - -static void test_dc_layout(void) -{ - DWORD (WINAPI *pSetLayout)(HDC hdc, DWORD layout); - DWORD (WINAPI *pGetLayout)(HDC hdc); - HWND hwnd_cache_rtl, hwnd_owndc_rtl, hwnd_classdc_rtl, hwnd_classdc2_rtl; - HDC hdc; - DWORD layout; - HMODULE mod = GetModuleHandleA("gdi32.dll"); - - pGetLayout = (void *)GetProcAddress( mod, "GetLayout" ); - pSetLayout = (void *)GetProcAddress( mod, "SetLayout" ); - if (!pGetLayout || !pSetLayout) - { - win_skip( "Don't have SetLayout\n" ); - return; - } - - hdc = GetDC( hwnd_cache ); - pSetLayout( hdc, LAYOUT_RTL ); - layout = pGetLayout( hdc ); - ReleaseDC( hwnd_cache, hdc ); - if (!layout) - { - win_skip( "SetLayout not supported\n" ); - return; - } - - hwnd_cache_rtl = CreateWindowExA(WS_EX_LAYOUTRTL, "cache_class", NULL, WS_OVERLAPPED | WS_VISIBLE, - 0, 0, 100, 100, 0, 0, GetModuleHandleA(0), NULL ); - hwnd_owndc_rtl = CreateWindowExA(WS_EX_LAYOUTRTL, "owndc_class", NULL, WS_OVERLAPPED | WS_VISIBLE, - 0, 200, 100, 100, 0, 0, GetModuleHandleA(0), NULL ); - hwnd_classdc_rtl = CreateWindowExA(WS_EX_LAYOUTRTL, "classdc_class", NULL, WS_OVERLAPPED | WS_VISIBLE, - 200, 0, 100, 100, 0, 0, GetModuleHandleA(0), NULL ); - hwnd_classdc2_rtl = CreateWindowExA(WS_EX_LAYOUTRTL, "classdc_class", NULL, WS_OVERLAPPED | WS_VISIBLE, - 200, 200, 100, 100, 0, 0, GetModuleHandleA(0), NULL ); - hdc = GetDC( hwnd_cache_rtl ); - layout = pGetLayout( hdc ); - - ok( layout == LAYOUT_RTL, "wrong layout %x\n", layout ); - pSetLayout( hdc, 0 ); - ReleaseDC( hwnd_cache_rtl, hdc ); - hdc = GetDC( hwnd_owndc_rtl ); - layout = pGetLayout( hdc ); - ok( layout == LAYOUT_RTL, "wrong layout %x\n", layout ); - ReleaseDC( hwnd_cache_rtl, hdc ); - - hdc = GetDC( hwnd_cache ); - layout = pGetLayout( hdc ); - ok( layout == 0, "wrong layout %x\n", layout ); - ReleaseDC( hwnd_cache, hdc ); - - hdc = GetDC( hwnd_owndc_rtl ); - layout = pGetLayout( hdc ); - ok( layout == LAYOUT_RTL, "wrong layout %x\n", layout ); - pSetLayout( hdc, 0 ); - ReleaseDC( hwnd_owndc_rtl, hdc ); - hdc = GetDC( hwnd_owndc_rtl ); - layout = pGetLayout( hdc ); - ok( layout == LAYOUT_RTL, "wrong layout %x\n", layout ); - ReleaseDC( hwnd_owndc_rtl, hdc ); - - hdc = GetDC( hwnd_classdc_rtl ); - layout = pGetLayout( hdc ); - ok( layout == LAYOUT_RTL, "wrong layout %x\n", layout ); - pSetLayout( hdc, 0 ); - ReleaseDC( hwnd_classdc_rtl, hdc ); - hdc = GetDC( hwnd_classdc2_rtl ); - layout = pGetLayout( hdc ); - ok( layout == LAYOUT_RTL, "wrong layout %x\n", layout ); - ReleaseDC( hwnd_classdc2_rtl, hdc ); - hdc = GetDC( hwnd_classdc ); - layout = pGetLayout( hdc ); - ok( layout == LAYOUT_RTL, "wrong layout %x\n", layout ); - ReleaseDC( hwnd_classdc_rtl, hdc ); - - DestroyWindow(hwnd_classdc2_rtl); - DestroyWindow(hwnd_classdc_rtl); - DestroyWindow(hwnd_owndc_rtl); - DestroyWindow(hwnd_cache_rtl); -} - -static void test_destroyed_window(void) -{ - HDC dc; - - dc = GetDCEx(hwnd_cache, 0, DCX_USESTYLE); - ok(!dc, "Got a non-NULL DC (%p) for a destroyed window.\n", dc); - - dc = GetDCEx(hwnd_owndc, 0, DCX_USESTYLE); - ok(!dc, "Got a non-NULL DC (%p) for a destroyed window.\n", dc); - - dc = GetDCEx(hwnd_classdc, 0, DCX_USESTYLE); - ok(!dc, "Got a non-NULL DC (%p) for a destroyed window.\n", dc); - - dc = GetDCEx(hwnd_classdc2, 0, DCX_USESTYLE); - ok(!dc, "Got a non-NULL DC (%p) for a destroyed window.\n", dc); -} - -START_TEST(dce) -{ - WNDCLASSA cls; - - cls.style = CS_DBLCLKS; - cls.lpfnWndProc = DefWindowProcA; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(0); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "cache_class"; - RegisterClassA(&cls); - cls.style = CS_DBLCLKS | CS_OWNDC; - cls.lpszClassName = "owndc_class"; - RegisterClassA(&cls); - cls.style = CS_DBLCLKS | CS_CLASSDC; - cls.lpszClassName = "classdc_class"; - RegisterClassA(&cls); - - hwnd_cache = CreateWindowA("cache_class", NULL, WS_OVERLAPPED | WS_VISIBLE, - 0, 0, 100, 100, - 0, 0, GetModuleHandleA(0), NULL ); - hwnd_owndc = CreateWindowA("owndc_class", NULL, WS_OVERLAPPED | WS_VISIBLE, - 0, 200, 100, 100, - 0, 0, GetModuleHandleA(0), NULL ); - hwnd_classdc = CreateWindowA("classdc_class", NULL, WS_OVERLAPPED | WS_VISIBLE, - 200, 0, 100, 100, - 0, 0, GetModuleHandleA(0), NULL ); - hwnd_classdc2 = CreateWindowA("classdc_class", NULL, WS_OVERLAPPED | WS_VISIBLE, - 200, 200, 100, 100, - 0, 0, GetModuleHandleA(0), NULL ); - test_dc_attributes(); - test_parameters(); - test_dc_visrgn(); - test_begin_paint(); - test_invisible_create(); - test_dc_layout(); - - DestroyWindow(hwnd_classdc2); - DestroyWindow(hwnd_classdc); - DestroyWindow(hwnd_owndc); - DestroyWindow(hwnd_cache); - - test_destroyed_window(); -} diff --git a/rostests/winetests/user32/dde.c b/rostests/winetests/user32/dde.c deleted file mode 100755 index e273de21379..00000000000 --- a/rostests/winetests/user32/dde.c +++ /dev/null @@ -1,2791 +0,0 @@ -/* - * Unit tests for DDE functions - * - * Copyright (c) 2004 Dmitry Timoshkov - * Copyright (c) 2007 James Hawkins - * - * 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 "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "winnls.h" -#include "dde.h" -#include "ddeml.h" -#include "winerror.h" - -#include "wine/test.h" - -static const WCHAR TEST_DDE_SERVICE[] = {'T','e','s','t','D','D','E','S','e','r','v','i','c','e',0}; - -static char exec_cmdA[] = "ANSI dde command"; -static WCHAR exec_cmdAW[] = {'A','N','S','I',' ','d','d','e',' ','c','o','m','m','a','n','d',0}; -static WCHAR exec_cmdW[] = {'u','n','i','c','o','d','e',' ','d','d','e',' ','c','o','m','m','a','n','d',0}; -static char exec_cmdWA[] = "unicode dde command"; - -static WNDPROC old_dde_client_wndproc; - -static const DWORD default_timeout = 200; - -static void flush_events(void) -{ - MSG msg; - int diff = default_timeout; - int min_timeout = 50; - DWORD time = GetTickCount() + diff; - - while (diff > 0) - { - if (MsgWaitForMultipleObjects( 0, NULL, FALSE, min_timeout, QS_ALLINPUT ) == WAIT_TIMEOUT) break; - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg ); - diff = time - GetTickCount(); - min_timeout = 10; - } -} - -static void create_dde_window(HWND *hwnd, LPCSTR name, WNDPROC wndproc) -{ - WNDCLASSA wcA; - ATOM aclass; - - memset(&wcA, 0, sizeof(wcA)); - wcA.lpfnWndProc = wndproc; - wcA.lpszClassName = name; - wcA.hInstance = GetModuleHandleA(0); - aclass = RegisterClassA(&wcA); - ok (aclass, "RegisterClass failed\n"); - - *hwnd = CreateWindowExA(0, name, NULL, WS_POPUP, - 500, 500, CW_USEDEFAULT, CW_USEDEFAULT, - GetDesktopWindow(), 0, GetModuleHandleA(0), NULL); - ok(*hwnd != NULL, "CreateWindowExA failed\n"); -} - -static void destroy_dde_window(HWND *hwnd, LPCSTR name) -{ - DestroyWindow(*hwnd); - UnregisterClass(name, GetModuleHandleA(0)); -} - -static LRESULT WINAPI dde_server_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - UINT_PTR lo, hi; - char str[MAX_PATH], *ptr; - HGLOBAL hglobal; - DDEDATA *data; - DDEPOKE *poke; - DWORD size; - - static int msg_index = 0; - static HWND client = 0; - static BOOL executed = FALSE; - - if (msg < WM_DDE_FIRST || msg > WM_DDE_LAST) - return DefWindowProcA(hwnd, msg, wparam, lparam); - - msg_index++; - - switch (msg) - { - case WM_DDE_INITIATE: - { - client = (HWND)wparam; - ok(msg_index == 1, "Expected 1, got %d\n", msg_index); - - GlobalGetAtomNameA(LOWORD(lparam), str, MAX_PATH); - ok(!lstrcmpA(str, "TestDDEService"), "Expected TestDDEService, got %s\n", str); - - GlobalGetAtomNameA(HIWORD(lparam), str, MAX_PATH); - ok(!lstrcmpA(str, "TestDDETopic"), "Expected TestDDETopic, got %s\n", str); - - SendMessageA(client, WM_DDE_ACK, (WPARAM)hwnd, lparam); - - break; - } - - case WM_DDE_REQUEST: - { - ok((msg_index >= 2 && msg_index <= 4) || - (msg_index >= 7 && msg_index <= 8), - "Expected 2, 3, 4, 7 or 8, got %d\n", msg_index); - ok(wparam == (WPARAM)client, "Expected client hwnd, got %08lx\n", wparam); - ok(LOWORD(lparam) == CF_TEXT, "Expected CF_TEXT, got %d\n", LOWORD(lparam)); - - GlobalGetAtomNameA(HIWORD(lparam), str, MAX_PATH); - if (msg_index < 8) - ok(!lstrcmpA(str, "request"), "Expected request, got %s\n", str); - else - ok(!lstrcmpA(str, "executed"), "Expected executed, got %s\n", str); - - if (msg_index == 8) - { - if (executed) - lstrcpyA(str, "command executed\r\n"); - else - lstrcpyA(str, "command not executed\r\n"); - } - else - lstrcpyA(str, "requested data\r\n"); - - size = sizeof(DDEDATA) + lstrlenA(str) + 1; - hglobal = GlobalAlloc(GMEM_MOVEABLE, size); - ok(hglobal != NULL, "Expected non-NULL hglobal\n"); - - data = GlobalLock(hglobal); - ZeroMemory(data, size); - - /* setting fResponse to FALSE at this point destroys - * the internal messaging state of native dde - */ - data->fResponse = TRUE; - - if (msg_index == 2) - data->fRelease = TRUE; - else if (msg_index == 3) - data->fAckReq = TRUE; - - data->cfFormat = CF_TEXT; - lstrcpyA((LPSTR)data->Value, str); - GlobalUnlock(hglobal); - - lparam = PackDDElParam(WM_DDE_DATA, (UINT_PTR)hglobal, HIWORD(lparam)); - PostMessageA(client, WM_DDE_DATA, (WPARAM)hwnd, lparam); - - break; - } - - case WM_DDE_POKE: - { - ok(msg_index == 5 || msg_index == 6, "Expected 5 or 6, got %d\n", msg_index); - ok(wparam == (WPARAM)client, "Expected client hwnd, got %08lx\n", wparam); - - UnpackDDElParam(WM_DDE_POKE, lparam, &lo, &hi); - - GlobalGetAtomNameA(hi, str, MAX_PATH); - ok(!lstrcmpA(str, "poker"), "Expected poker, got %s\n", str); - - poke = GlobalLock((HGLOBAL)lo); - ok(poke != NULL, "Expected non-NULL poke\n"); - ok(poke->fReserved == 0, "Expected 0, got %d\n", poke->fReserved); - ok(poke->unused == 0, "Expected 0, got %d\n", poke->unused); - ok(poke->fRelease == TRUE, "Expected TRUE, got %d\n", poke->fRelease); - ok(poke->cfFormat == CF_TEXT, "Expected CF_TEXT, got %d\n", poke->cfFormat); - - if (msg_index == 5) - { - size = GlobalSize((HGLOBAL)lo); - ok(size == 4 || broken(size == 32), /* sizes are rounded up on win9x */ "got %d\n", size); - } - else - ok(!lstrcmpA((LPSTR)poke->Value, "poke data\r\n"), - "Expected 'poke data\\r\\n', got %s\n", poke->Value); - - GlobalUnlock((HGLOBAL)lo); - - lparam = PackDDElParam(WM_DDE_ACK, DDE_FACK, hi); - PostMessageA(client, WM_DDE_ACK, (WPARAM)hwnd, lparam); - - break; - } - - case WM_DDE_EXECUTE: - { - ok(msg_index == 7, "Expected 7, got %d\n", msg_index); - ok(wparam == (WPARAM)client, "Expected client hwnd, got %08lx\n", wparam); - - ptr = GlobalLock((HGLOBAL)lparam); - ok(!lstrcmpA(ptr, "[Command(Var)]"), "Expected [Command(Var)], got %s\n", ptr); - GlobalUnlock((HGLOBAL)lparam); - - executed = TRUE; - - lparam = ReuseDDElParam(lparam, WM_DDE_EXECUTE, WM_DDE_ACK, DDE_FACK, lparam); - PostMessageA(client, WM_DDE_ACK, (WPARAM)hwnd, lparam); - - break; - } - - case WM_DDE_TERMINATE: - { - ok(msg_index == 9, "Expected 9, got %d\n", msg_index); - ok(wparam == (WPARAM)client, "Expected client hwnd, got %08lx\n", wparam); - ok(lparam == 0, "Expected 0, got %08lx\n", lparam); - - PostMessageA(client, WM_DDE_TERMINATE, (WPARAM)hwnd, 0); - - break; - } - - case WM_DDE_ACK: /* happens on win9x when fAckReq is TRUE, ignore it */ - ok(msg_index == 4, "Expected 4, got %d\n", msg_index); - msg_index--; - break; - - default: - ok(FALSE, "Unhandled msg: %08x\n", msg); - } - - return DefWindowProcA(hwnd, msg, wparam, lparam); -} - -static void test_msg_server(HANDLE hproc, HANDLE hthread) -{ - MSG msg; - HWND hwnd; - DWORD res; - - create_dde_window(&hwnd, "dde_server", dde_server_wndproc); - ResumeThread( hthread ); - - while (MsgWaitForMultipleObjects( 1, &hproc, FALSE, INFINITE, QS_ALLINPUT ) != 0) - { - while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); - } - - destroy_dde_window(&hwnd, "dde_server"); - GetExitCodeProcess( hproc, &res ); - ok( !res, "client failed with %u error(s)\n", res ); -} - -static HDDEDATA CALLBACK client_ddeml_callback(UINT uType, UINT uFmt, HCONV hconv, - HSZ hsz1, HSZ hsz2, HDDEDATA hdata, - ULONG_PTR dwData1, ULONG_PTR dwData2) -{ - ok(FALSE, "Unhandled msg: %08x\n", uType); - return 0; -} - -static void test_ddeml_client(void) -{ - UINT ret; - char buffer[32]; - LPSTR str; - DWORD size, res; - HDDEDATA hdata, op; - HSZ server, topic, item; - DWORD client_pid; - HCONV conversation; - - client_pid = 0; - ret = DdeInitializeA(&client_pid, client_ddeml_callback, APPCMD_CLIENTONLY, 0); - ok(ret == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", ret); - - /* FIXME: make these atoms global and check them in the server */ - - server = DdeCreateStringHandleA(client_pid, "TestDDEService", CP_WINANSI); - topic = DdeCreateStringHandleA(client_pid, "TestDDETopic", CP_WINANSI); - - DdeGetLastError(client_pid); - conversation = DdeConnect(client_pid, server, topic, NULL); - ok(conversation != NULL, "Expected non-NULL conversation\n"); - ret = DdeGetLastError(client_pid); - ok(ret == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", ret); - - DdeFreeStringHandle(client_pid, server); - - item = DdeCreateStringHandleA(client_pid, "request", CP_WINANSI); - - /* XTYP_REQUEST, fRelease = TRUE */ - res = 0xdeadbeef; - DdeGetLastError(client_pid); - hdata = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_REQUEST, default_timeout, &res); - ret = DdeGetLastError(client_pid); - ok(ret == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", ret); - ok(res == DDE_FNOTPROCESSED || broken(res == 0xdeadbeef), /* win9x */ - "Expected DDE_FNOTPROCESSED, got %08x\n", res); - ok( hdata != NULL, "hdata is NULL\n" ); - if (hdata) - { - str = (LPSTR)DdeAccessData(hdata, &size); - ok(!lstrcmpA(str, "requested data\r\n"), "Expected 'requested data\\r\\n', got %s\n", str); - ok(size == 19 || broken(size == 28), /* sizes are rounded up on win9x */ - "Expected 19, got %d\n", size); - - ret = DdeUnaccessData(hdata); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - } - - /* XTYP_REQUEST, fAckReq = TRUE */ - res = 0xdeadbeef; - DdeGetLastError(client_pid); - hdata = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_REQUEST, default_timeout, &res); - ret = DdeGetLastError(client_pid); - ok(res == DDE_FNOTPROCESSED || broken(res == 0xdeadbeef), /* win9x */ - "Expected DDE_FNOTPROCESSED, got %x\n", res); -todo_wine - ok(ret == DMLERR_MEMORY_ERROR || broken(ret == 0), /* win9x */ - "Expected DMLERR_MEMORY_ERROR, got %d\n", ret); - ok( hdata != NULL, "hdata is NULL\n" ); - if (hdata) - { - str = (LPSTR)DdeAccessData(hdata, &size); - ok(!lstrcmpA(str, "requested data\r\n"), "Expected 'requested data\\r\\n', got %s\n", str); - ok(size == 19 || broken(size == 28), /* sizes are rounded up on win9x */ - "Expected 19, got %d\n", size); - - ret = DdeUnaccessData(hdata); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - } - - /* XTYP_REQUEST, all params normal */ - res = 0xdeadbeef; - DdeGetLastError(client_pid); - hdata = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_REQUEST, default_timeout, &res); - ret = DdeGetLastError(client_pid); - ok(ret == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", ret); - ok(res == DDE_FNOTPROCESSED || broken(res == 0xdeadbeef), /* win9x */ - "Expected DDE_FNOTPROCESSED, got %x\n", res); - if (hdata == NULL) - ok(FALSE, "hdata is NULL\n"); - else - { - str = (LPSTR)DdeAccessData(hdata, &size); - ok(!lstrcmpA(str, "requested data\r\n"), "Expected 'requested data\\r\\n', got %s\n", str); - ok(size == 19 || broken(size == 28), /* sizes are rounded up on win9x */ - "Expected 19, got %d\n", size); - - ret = DdeUnaccessData(hdata); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - } - - /* XTYP_REQUEST, no item */ - res = 0xdeadbeef; - DdeGetLastError(client_pid); - hdata = DdeClientTransaction(NULL, 0, conversation, 0, CF_TEXT, XTYP_REQUEST, default_timeout, &res); - ret = DdeGetLastError(client_pid); - ok(hdata == NULL, "Expected NULL hdata, got %p\n", hdata); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %08x\n", res); - ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret); - - DdeFreeStringHandle(client_pid, item); - - item = DdeCreateStringHandleA(client_pid, "poker", CP_WINANSI); - - lstrcpyA(buffer, "poke data\r\n"); - hdata = DdeCreateDataHandle(client_pid, (LPBYTE)buffer, lstrlenA(buffer) + 1, - 0, item, CF_TEXT, 0); - ok(hdata != NULL, "Expected non-NULL hdata\n"); - - /* XTYP_POKE, no item */ - res = 0xdeadbeef; - DdeGetLastError(client_pid); - op = DdeClientTransaction((LPBYTE)hdata, -1, conversation, 0, CF_TEXT, XTYP_POKE, default_timeout, &res); - ret = DdeGetLastError(client_pid); - ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); - ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret); - - /* XTYP_POKE, no data */ - res = 0xdeadbeef; - DdeGetLastError(client_pid); - op = DdeClientTransaction(NULL, 0, conversation, 0, CF_TEXT, XTYP_POKE, default_timeout, &res); - ret = DdeGetLastError(client_pid); - ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); - ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret); - - /* XTYP_POKE, wrong size */ - res = 0xdeadbeef; - DdeGetLastError(client_pid); - op = DdeClientTransaction((LPBYTE)hdata, 0, conversation, item, CF_TEXT, XTYP_POKE, default_timeout, &res); - ret = DdeGetLastError(client_pid); - ok(op == (HDDEDATA)TRUE, "Expected TRUE, got %p\n", op); - ok(res == DDE_FACK || broken(res == (0xdead0000 | DDE_FACK)), /* win9x */ - "Expected DDE_FACK, got %x\n", res); - ok(ret == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", ret); - - /* XTYP_POKE, correct params */ - res = 0xdeadbeef; - DdeGetLastError(client_pid); - op = DdeClientTransaction((LPBYTE)hdata, -1, conversation, item, CF_TEXT, XTYP_POKE, default_timeout, &res); - ret = DdeGetLastError(client_pid); - ok(op == (HDDEDATA)TRUE, "Expected TRUE, got %p\n", op); - ok(res == DDE_FACK || broken(res == (0xdead0000 | DDE_FACK)), /* win9x */ - "Expected DDE_FACK, got %x\n", res); - ok(ret == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", ret); - - DdeFreeDataHandle(hdata); - - lstrcpyA(buffer, "[Command(Var)]"); - hdata = DdeCreateDataHandle(client_pid, (LPBYTE)buffer, lstrlenA(buffer) + 1, - 0, NULL, CF_TEXT, 0); - ok(hdata != NULL, "Expected non-NULL hdata\n"); - - /* XTYP_EXECUTE, correct params */ - res = 0xdeadbeef; - DdeGetLastError(client_pid); - op = DdeClientTransaction((LPBYTE)hdata, -1, conversation, NULL, 0, XTYP_EXECUTE, default_timeout, &res); - ret = DdeGetLastError(client_pid); - ok(ret == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", ret); - ok(op == (HDDEDATA)TRUE, "Expected TRUE, got %p\n", op); - ok(res == DDE_FACK || broken(res == (0xdead0000 | DDE_FACK)), /* win9x */ - "Expected DDE_FACK, got %x\n", res); - - /* XTYP_EXECUTE, no data */ - res = 0xdeadbeef; - DdeGetLastError(client_pid); - op = DdeClientTransaction(NULL, 0, conversation, NULL, 0, XTYP_EXECUTE, default_timeout, &res); - ret = DdeGetLastError(client_pid); - ok(op == NULL || broken(op == (HDDEDATA)TRUE), /* win9x */ "Expected NULL, got %p\n", op); - if (!op) - { - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); - ok(ret == DMLERR_MEMORY_ERROR, "Expected DMLERR_MEMORY_ERROR, got %d\n", ret); - } - else /* win9x */ - { - ok(res == (0xdead0000 | DDE_FACK), "Expected DDE_FACK, got %x\n", res); - ok(ret == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", ret); - } - - /* XTYP_EXECUTE, no data, -1 size */ - res = 0xdeadbeef; - DdeGetLastError(client_pid); - op = DdeClientTransaction(NULL, -1, conversation, NULL, 0, XTYP_EXECUTE, default_timeout, &res); - ret = DdeGetLastError(client_pid); - ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); - ok(ret == DMLERR_INVALIDPARAMETER || broken(ret == DMLERR_NO_ERROR), /* win9x */ - "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret); - - DdeFreeStringHandle(client_pid, topic); - DdeFreeDataHandle(hdata); - - item = DdeCreateStringHandleA(client_pid, "executed", CP_WINANSI); - - /* verify the execute */ - res = 0xdeadbeef; - DdeGetLastError(client_pid); - hdata = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_REQUEST, default_timeout, &res); - ret = DdeGetLastError(client_pid); - ok(ret == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", ret); - ok(res == DDE_FNOTPROCESSED || broken(res == (0xdead0000 | DDE_FNOTPROCESSED)), /* win9x */ - "Expected DDE_FNOTPROCESSED, got %d\n", res); - if (hdata == NULL) - ok(FALSE, "hdata is NULL\n"); - else - { - str = (LPSTR)DdeAccessData(hdata, &size); - ok(!lstrcmpA(str, "command executed\r\n"), "Expected 'command executed\\r\\n', got %s\n", str); - ok(size == 21 || broken(size == 28), /* sizes are rounded up on win9x */ - "Expected 21, got %d\n", size); - - ret = DdeUnaccessData(hdata); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - } - - /* invalid transactions */ - res = 0xdeadbeef; - DdeGetLastError(client_pid); - op = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_ADVREQ, default_timeout, &res); - ret = DdeGetLastError(client_pid); - ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); - ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret); - - res = 0xdeadbeef; - DdeGetLastError(client_pid); - op = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_CONNECT, default_timeout, &res); - ret = DdeGetLastError(client_pid); - ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); - ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret); - - res = 0xdeadbeef; - DdeGetLastError(client_pid); - op = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_CONNECT_CONFIRM, default_timeout, &res); - ret = DdeGetLastError(client_pid); - ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); - ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret); - - res = 0xdeadbeef; - DdeGetLastError(client_pid); - op = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_DISCONNECT, default_timeout, &res); - ret = DdeGetLastError(client_pid); - ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); - ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret); - - res = 0xdeadbeef; - DdeGetLastError(client_pid); - op = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_ERROR, default_timeout, &res); - ret = DdeGetLastError(client_pid); - ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); - ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret); - - res = 0xdeadbeef; - DdeGetLastError(client_pid); - op = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_MONITOR, default_timeout, &res); - ret = DdeGetLastError(client_pid); - ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); - ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret); - - res = 0xdeadbeef; - DdeGetLastError(client_pid); - op = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_REGISTER, default_timeout, &res); - ret = DdeGetLastError(client_pid); - ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); - ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret); - - res = 0xdeadbeef; - DdeGetLastError(client_pid); - op = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_UNREGISTER, default_timeout, &res); - ret = DdeGetLastError(client_pid); - ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); - ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret); - - res = 0xdeadbeef; - DdeGetLastError(client_pid); - op = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_WILDCONNECT, default_timeout, &res); - ret = DdeGetLastError(client_pid); - ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); - ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret); - - res = 0xdeadbeef; - DdeGetLastError(client_pid); - op = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_XACT_COMPLETE, default_timeout, &res); - ret = DdeGetLastError(client_pid); - ok(op == NULL, "Expected NULL, got %p\n", op); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res); - ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret); - - DdeFreeStringHandle(client_pid, item); - - ret = DdeDisconnect(conversation); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - ret = DdeUninitialize(client_pid); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); -} - -static DWORD server_pid; - -static HDDEDATA CALLBACK server_ddeml_callback(UINT uType, UINT uFmt, HCONV hconv, - HSZ hsz1, HSZ hsz2, HDDEDATA hdata, - ULONG_PTR dwData1, ULONG_PTR dwData2) -{ - char str[MAX_PATH], *ptr; - HDDEDATA ret = NULL; - DWORD size; - - static int msg_index = 0; - static HCONV conversation = 0; - - msg_index++; - - switch (uType) - { - case XTYP_REGISTER: - { - ok(msg_index == 1, "Expected 1, got %d\n", msg_index); - ok(uFmt == 0, "Expected 0, got %d\n", uFmt); - ok(hconv == 0, "Expected 0, got %p\n", hconv); - ok(hdata == 0, "Expected 0, got %p\n", hdata); - ok(dwData1 == 0, "Expected 0, got %08lx\n", dwData1); - ok(dwData2 == 0, "Expected 0, got %08lx\n", dwData2); - - size = DdeQueryStringA(server_pid, hsz1, str, MAX_PATH, CP_WINANSI); - ok(!lstrcmpA(str, "TestDDEServer"), "Expected TestDDEServer, got %s\n", str); - ok(size == 13, "Expected 13, got %d\n", size); - - size = DdeQueryStringA(server_pid, hsz2, str, MAX_PATH, CP_WINANSI); - if (!strncmp( str, "TestDDEServer:(", 15 )) /* win9x style */ - { - ok(size == 16 + 2*sizeof(WORD), "Got size %d for %s\n", size, str); - } - else - { - ok(!strncmp(str, "TestDDEServer(", 14), "Expected TestDDEServer(, got %s\n", str); - ok(size == 17 + 2*sizeof(ULONG_PTR), "Got size %d for %s\n", size, str); - } - ok(str[size - 1] == ')', "Expected ')', got %c\n", str[size - 1]); - - return (HDDEDATA)TRUE; - } - - case XTYP_CONNECT: - { - ok(msg_index == 2, "Expected 2, got %d\n", msg_index); - ok(uFmt == 0, "Expected 0, got %d\n", uFmt); - ok(hconv == 0, "Expected 0, got %p\n", hconv); - ok(hdata == 0, "Expected 0, got %p\n", hdata); - ok(dwData1 == 0, "Expected 0, got %08lx\n", dwData1); - ok(dwData2 == FALSE, "Expected FALSE, got %08lx\n", dwData2); - - size = DdeQueryStringA(server_pid, hsz1, str, MAX_PATH, CP_WINANSI); - ok(!lstrcmpA(str, "TestDDETopic"), "Expected TestDDETopic, got %s\n", str); - ok(size == 12, "Expected 12, got %d\n", size); - - size = DdeQueryStringA(server_pid, hsz2, str, MAX_PATH, CP_WINANSI); - ok(!lstrcmpA(str, "TestDDEServer"), "Expected TestDDEServer, got %s\n", str); - ok(size == 13, "Expected 13, got %d\n", size); - - return (HDDEDATA)TRUE; - } - - case XTYP_CONNECT_CONFIRM: - { - conversation = hconv; - - ok(msg_index == 3, "Expected 3, got %d\n", msg_index); - ok(uFmt == 0, "Expected 0, got %d\n", uFmt); - ok(hconv != NULL, "Expected non-NULL hconv\n"); - ok(hdata == 0, "Expected 0, got %p\n", hdata); - ok(dwData1 == 0, "Expected 0, got %08lx\n", dwData1); - ok(dwData2 == FALSE, "Expected FALSE, got %08lx\n", dwData2); - - size = DdeQueryStringA(server_pid, hsz1, str, MAX_PATH, CP_WINANSI); - ok(!lstrcmpA(str, "TestDDETopic"), "Expected TestDDETopic, got %s\n", str); - ok(size == 12, "Expected 12, got %d\n", size); - - size = DdeQueryStringA(server_pid, hsz2, str, MAX_PATH, CP_WINANSI); - ok(!lstrcmpA(str, "TestDDEServer"), "Expected TestDDEServer, got %s\n", str); - ok(size == 13, "Expected 13, got %d\n", size); - - return (HDDEDATA)TRUE; - } - - case XTYP_REQUEST: - { - ok(msg_index == 4 || msg_index == 5 || msg_index == 6, - "Expected 4, 5 or 6, got %d\n", msg_index); - ok(hconv == conversation, "Expected conversation handle, got %p\n", hconv); - ok(hdata == 0, "Expected 0, got %p\n", hdata); - ok(dwData1 == 0, "Expected 0, got %08lx\n", dwData1); - ok(dwData2 == 0, "Expected 0, got %08lx\n", dwData2); - - if (msg_index == 4) - ok(uFmt == 0xbeef, "Expected 0xbeef, got %08x\n", uFmt); - else - ok(uFmt == CF_TEXT, "Expected CF_TEXT, got %08x\n", uFmt); - - size = DdeQueryStringA(server_pid, hsz1, str, MAX_PATH, CP_WINANSI); - ok(!lstrcmpA(str, "TestDDETopic"), "Expected TestDDETopic, got %s\n", str); - ok(size == 12, "Expected 12, got %d\n", size); - - size = DdeQueryStringA(server_pid, hsz2, str, MAX_PATH, CP_WINANSI); - - if (msg_index == 5) - { - { - ok(!lstrcmpA(str, ""), "Expected empty string, got %s\n", str); - ok(size == 1, "Expected 1, got %d\n", size); - } - } - else if (msg_index == 6) - { - ok(!lstrcmpA(str, "request"), "Expected request, got %s\n", str); - ok(size == 7, "Expected 7, got %d\n", size); - } - - if (msg_index == 6) - { - lstrcpyA(str, "requested data\r\n"); - return DdeCreateDataHandle(server_pid, (LPBYTE)str, lstrlenA(str) + 1, - 0, hsz2, CF_TEXT, 0); - } - - return NULL; - } - - case XTYP_POKE: - { - ok(msg_index == 7 || msg_index == 8, "Expected 7 or 8, got %d\n", msg_index); - ok(uFmt == CF_TEXT, "Expected CF_TEXT, got %d\n", uFmt); - ok(hconv == conversation, "Expected conversation handle, got %p\n", hconv); - ok(dwData1 == 0, "Expected 0, got %08lx\n", dwData1); - ok(dwData2 == 0, "Expected 0, got %08lx\n", dwData2); - - size = DdeQueryStringA(server_pid, hsz1, str, MAX_PATH, CP_WINANSI); - ok(!lstrcmpA(str, "TestDDETopic"), "Expected TestDDETopic, got %s\n", str); - ok(size == 12, "Expected 12, got %d\n", size); - - ptr = (LPSTR)DdeAccessData(hdata, &size); - ok(!lstrcmpA(ptr, "poke data\r\n"), "Expected 'poke data\\r\\n', got %s\n", ptr); - ok(size == 12 || broken(size == 28), /* sizes are rounded up on win9x */ - "Expected 12, got %d\n", size); - DdeUnaccessData(hdata); - - size = DdeQueryStringA(server_pid, hsz2, str, MAX_PATH, CP_WINANSI); - if (msg_index == 7) - { - { - ok(!lstrcmpA(str, ""), "Expected empty string, got %s\n", str); - ok(size == 1, "Expected 1, got %d\n", size); - } - } - else - { - ok(!lstrcmpA(str, "poke"), "Expected poke, got %s\n", str); - ok(size == 4, "Expected 4, got %d\n", size); - } - - return (HDDEDATA)DDE_FACK; - } - - case XTYP_EXECUTE: - { - ok(msg_index >= 9 && msg_index <= 11, "Expected 9 or 11, got %d\n", msg_index); - ok(uFmt == 0, "Expected 0, got %d\n", uFmt); - ok(hconv == conversation, "Expected conversation handle, got %p\n", hconv); - ok(dwData1 == 0, "Expected 0, got %08lx\n", dwData1); - ok(dwData2 == 0, "Expected 0, got %08lx\n", dwData2); - ok(hsz2 == 0, "Expected 0, got %p\n", hsz2); - - size = DdeQueryStringA(server_pid, hsz1, str, MAX_PATH, CP_WINANSI); - ok(!lstrcmpA(str, "TestDDETopic"), "Expected TestDDETopic, got %s\n", str); - ok(size == 12, "Expected 12, got %d\n", size); - - if (msg_index == 9 || msg_index == 11) - { - ptr = (LPSTR)DdeAccessData(hdata, &size); - - if (msg_index == 9) - { - ok(!lstrcmpA(ptr, "[Command(Var)]"), "Expected '[Command(Var)]', got %s\n", ptr); - ok(size == 15, "Expected 15, got %d\n", size); - ret = (HDDEDATA)DDE_FACK; - } - else - { - ok(!lstrcmpA(ptr, "[BadCommand(Var)]"), "Expected '[BadCommand(Var)]', got %s\n", ptr); - ok(size == 18, "Expected 18, got %d\n", size); - ret = DDE_FNOTPROCESSED; - } - - DdeUnaccessData(hdata); - } - else if (msg_index == 10) - { - DWORD rsize = 0; - size = 0; - - size = DdeGetData(hdata, NULL, 0, 0); - ok(size == 17, "DdeGetData should have returned 17 not %d\n", size); - ptr = HeapAlloc(GetProcessHeap(), 0, size); - ok(ptr != NULL,"HeapAlloc should have returned ptr not NULL\n"); - rsize = DdeGetData(hdata, (LPBYTE)ptr, size, 0); - ok(rsize == size, "DdeGetData did not return %d bytes but %d\n", size, rsize); - - ok(!lstrcmpA(ptr, "[Command-2(Var)]"), "Expected '[Command-2(Var)]' got %s\n", ptr); - ok(size == 17, "Expected 17, got %d\n", size); - ret = (HDDEDATA)DDE_FACK; - - HeapFree(GetProcessHeap(), 0, ptr); - } - - return ret; - } - - case XTYP_DISCONNECT: - { - ok(msg_index == 12, "Expected 12, got %d\n", msg_index); - ok(uFmt == 0, "Expected 0, got %d\n", uFmt); - ok(hconv == conversation, "Expected conversation handle, got %p\n", hconv); - ok(dwData1 == 0, "Expected 0, got %08lx\n", dwData1); - ok(dwData2 == 0, "Expected 0, got %08lx\n", dwData2); - ok(hsz1 == 0, "Expected 0, got %p\n", hsz2); - ok(hsz2 == 0, "Expected 0, got %p\n", hsz2); - - return 0; - } - - default: - ok(FALSE, "Unhandled msg: %08x\n", uType); - } - - return 0; -} - -static void test_ddeml_server(HANDLE hproc) -{ - MSG msg; - UINT res; - BOOL ret; - HSZ server; - HDDEDATA hdata; - - /* set up DDE server */ - server_pid = 0; - res = DdeInitialize(&server_pid, server_ddeml_callback, APPCLASS_STANDARD, 0); - ok(res == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", res); - - server = DdeCreateStringHandle(server_pid, "TestDDEServer", CP_WINANSI); - ok(server != NULL, "Expected non-NULL string handle\n"); - - hdata = DdeNameService(server_pid, server, 0, DNS_REGISTER); - ok(hdata == (HDDEDATA)TRUE, "Expected TRUE, got %p\n", hdata); - - while (MsgWaitForMultipleObjects( 1, &hproc, FALSE, INFINITE, QS_ALLINPUT ) != 0) - { - while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); - } - ret = DdeUninitialize(server_pid); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - GetExitCodeProcess( hproc, &res ); - ok( !res, "client failed with %u error(s)\n", res ); -} - -static HWND client_hwnd, server_hwnd; -static ATOM server, topic, item; -static HGLOBAL execute_hglobal; - -static LRESULT WINAPI dde_msg_client_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - char str[MAX_PATH]; - UINT_PTR lo, hi; - DDEDATA *data; - DDEACK *ack; - DWORD size; - LPSTR ptr; - - static int msg_index = 0; - - if (msg < WM_DDE_FIRST || msg > WM_DDE_LAST) - return DefWindowProcA(hwnd, msg, wparam, lparam); - - msg_index++; - - switch (msg) - { - case WM_DDE_INITIATE: - { - ok(msg_index == 1, "Expected 1, got %d\n", msg_index); - ok(wparam == (WPARAM)client_hwnd, "Expected client hwnd, got %08lx\n", wparam); - - size = GlobalGetAtomNameA(LOWORD(lparam), str, MAX_PATH); - ok(LOWORD(lparam) == server, "Expected server atom, got %08x\n", LOWORD(lparam)); - ok(!lstrcmpA(str, "TestDDEServer"), "Expected TestDDEServer, got %s\n", str); - ok(size == 13, "Expected 13, got %d\n", size); - - size = GlobalGetAtomNameA(HIWORD(lparam), str, MAX_PATH); - ok(HIWORD(lparam) == topic, "Expected topic atom, got %08x\n", HIWORD(lparam)); - ok(!lstrcmpA(str, "TestDDETopic"), "Expected TestDDETopic, got %s\n", str); - ok(size == 12, "Expected 12, got %d\n", size); - - break; - } - - case WM_DDE_ACK: - { - ok((msg_index >= 2 && msg_index <= 4) || (msg_index >= 6 && msg_index <= 11), - "Expected 2, 3, 4, 6, 7, 8, 9, 10 or 11, got %d\n", msg_index); - - if (msg_index == 2) - { - server_hwnd = (HWND)wparam; - ok(wparam != 0, "Expected non-NULL wparam, got %08lx\n", wparam); - - size = GlobalGetAtomNameA(LOWORD(lparam), str, MAX_PATH); - ok(LOWORD(lparam) == server, "Expected server atom, got %08x\n", LOWORD(lparam)); - ok(!lstrcmpA(str, "TestDDEServer"), "Expected TestDDEServer, got %s\n", str); - ok(size == 13, "Expected 13, got %d\n", size); - - size = GlobalGetAtomNameA(HIWORD(lparam), str, MAX_PATH); - ok(HIWORD(lparam) == topic, "Expected topic atom, got %08x\n", HIWORD(lparam)); - ok(!lstrcmpA(str, "TestDDETopic"), "Expected TestDDETopic, got %s\n", str); - ok(size == 12, "Expected 12, got %d\n", size); - } - else if (msg_index >= 9 && msg_index <= 11) - { - ok(wparam == (WPARAM)server_hwnd, "Expected server hwnd, got %08lx\n", wparam); - - UnpackDDElParam(WM_DDE_ACK, lparam, &lo, &hi); - - ack = (DDEACK *)&lo; - ok(ack->bAppReturnCode == 0, "Expected 0, got %d\n", ack->bAppReturnCode); - ok(ack->reserved == 0, "Expected 0, got %d\n", ack->reserved); - ok(ack->fBusy == FALSE, "Expected FALSE, got %d\n", ack->fBusy); - - ok(hi == (UINT_PTR)execute_hglobal, "Expected execute hglobal, got %08lx\n", hi); - ptr = GlobalLock((HGLOBAL)hi); - - if (msg_index == 9) - { - ok(ack->fAck == TRUE, "Expected TRUE, got %d\n", ack->fAck); - ok(!lstrcmpA(ptr, "[Command(Var)]"), "Expected '[Command(Var)]', got %s\n", ptr); - } else if (msg_index == 10) - { - ok(ack->fAck == TRUE, "Expected TRUE, got %d\n", ack->fAck); - ok(!lstrcmpA(ptr, "[Command-2(Var)]"), "Expected '[Command-2(Var)]', got %s\n", ptr); - } - else - { - ok(ack->fAck == FALSE, "Expected FALSE, got %d\n", ack->fAck); - ok(!lstrcmpA(ptr, "[BadCommand(Var)]"), "Expected '[BadCommand(Var)]', got %s\n", ptr); - } - - GlobalUnlock((HGLOBAL)hi); - } - else - { - ok(wparam == (WPARAM)server_hwnd, "Expected server hwnd, got %08lx\n", wparam); - - UnpackDDElParam(WM_DDE_ACK, lparam, &lo, &hi); - - ack = (DDEACK *)&lo; - ok(ack->bAppReturnCode == 0, "Expected 0, got %d\n", ack->bAppReturnCode); - ok(ack->reserved == 0, "Expected 0, got %d\n", ack->reserved); - ok(ack->fBusy == FALSE, "Expected FALSE, got %d\n", ack->fBusy); - - if (msg_index >= 7) - ok(ack->fAck == TRUE, "Expected TRUE, got %d\n", ack->fAck); - else - { - if (msg_index == 6) todo_wine - ok(ack->fAck == FALSE, "Expected FALSE, got %d\n", ack->fAck); - } - - size = GlobalGetAtomNameA(hi, str, MAX_PATH); - if (msg_index == 3) - { - ok(hi == item, "Expected item atom, got %08lx\n", hi); - ok(!lstrcmpA(str, "request"), "Expected request, got %s\n", str); - ok(size == 7, "Expected 7, got %d\n", size); - } - else if (msg_index == 4 || msg_index == 7) - { - ok(hi == 0, "Expected 0, got %08lx\n", hi); - ok(size == 0, "Expected empty string, got %d\n", size); - } - else - { - ok(hi == item, "Expected item atom, got %08lx\n", hi); - if (msg_index == 6) todo_wine - { - ok(!lstrcmpA(str, "poke"), "Expected poke, got %s\n", str); - ok(size == 4, "Expected 4, got %d\n", size); - } - } - } - - break; - } - - case WM_DDE_DATA: - { - ok(msg_index == 5, "Expected 5, got %d\n", msg_index); - ok(wparam == (WPARAM)server_hwnd, "Expected server hwnd, got %08lx\n", wparam); - - UnpackDDElParam(WM_DDE_DATA, lparam, &lo, &hi); - - data = GlobalLock((HGLOBAL)lo); - ok(data->unused == 0, "Expected 0, got %d\n", data->unused); - ok(data->fResponse == TRUE, "Expected TRUE, got %d\n", data->fResponse); - todo_wine - { - ok(data->fRelease == TRUE, "Expected TRUE, got %d\n", data->fRelease); - } - ok(data->fAckReq == 0, "Expected 0, got %d\n", data->fAckReq); - ok(data->cfFormat == CF_TEXT, "Expected CF_TEXT, got %d\n", data->cfFormat); - ok(!lstrcmpA((LPSTR)data->Value, "requested data\r\n"), - "Expected 'requested data\\r\\n', got %s\n", data->Value); - GlobalUnlock((HGLOBAL)lo); - - size = GlobalGetAtomNameA(hi, str, MAX_PATH); - ok(hi == item, "Expected item atom, got %08x\n", HIWORD(lparam)); - ok(!lstrcmpA(str, "request"), "Expected request, got %s\n", str); - ok(size == 7, "Expected 7, got %d\n", size); - - GlobalFree((HGLOBAL)lo); - GlobalDeleteAtom(hi); - - break; - } - - default: - ok(FALSE, "Unhandled msg: %08x\n", msg); - } - - return DefWindowProcA(hwnd, msg, wparam, lparam); -} - -static HGLOBAL create_poke(void) -{ - HGLOBAL hglobal; - DDEPOKE *poke; - DWORD size; - - size = FIELD_OFFSET(DDEPOKE, Value[sizeof("poke data\r\n")]); - hglobal = GlobalAlloc(GMEM_DDESHARE, size); - ok(hglobal != 0, "Expected non-NULL hglobal\n"); - - poke = GlobalLock(hglobal); - poke->unused = 0; - poke->fRelease = TRUE; - poke->fReserved = TRUE; - poke->cfFormat = CF_TEXT; - lstrcpyA((LPSTR)poke->Value, "poke data\r\n"); - GlobalUnlock(hglobal); - - return hglobal; -} - -static HGLOBAL create_execute(LPCSTR command) -{ - HGLOBAL hglobal; - LPSTR ptr; - - hglobal = GlobalAlloc(GMEM_DDESHARE, lstrlenA(command) + 1); - ok(hglobal != 0, "Expected non-NULL hglobal\n"); - - ptr = GlobalLock(hglobal); - lstrcpyA(ptr, command); - GlobalUnlock(hglobal); - - return hglobal; -} - -static void test_msg_client(void) -{ - HGLOBAL hglobal; - LPARAM lparam; - - create_dde_window(&client_hwnd, "dde_client", dde_msg_client_wndproc); - - server = GlobalAddAtomA("TestDDEServer"); - ok(server != 0, "Expected non-NULL server\n"); - - topic = GlobalAddAtomA("TestDDETopic"); - ok(topic != 0, "Expected non-NULL topic\n"); - - SendMessageA(HWND_BROADCAST, WM_DDE_INITIATE, (WPARAM)client_hwnd, MAKELONG(server, topic)); - - GlobalDeleteAtom(server); - GlobalDeleteAtom(topic); - - flush_events(); - - item = GlobalAddAtom("request"); - ok(item != 0, "Expected non-NULL item\n"); - - /* WM_DDE_REQUEST, bad clipboard format */ - lparam = PackDDElParam(WM_DDE_REQUEST, 0xdeadbeef, item); - PostMessageA(server_hwnd, WM_DDE_REQUEST, (WPARAM)client_hwnd, lparam); - - flush_events(); - - /* WM_DDE_REQUEST, no item */ - lparam = PackDDElParam(WM_DDE_REQUEST, CF_TEXT, 0); - PostMessageA(server_hwnd, WM_DDE_REQUEST, (WPARAM)client_hwnd, lparam); - - flush_events(); - - /* WM_DDE_REQUEST, no client hwnd */ - lparam = PackDDElParam(WM_DDE_REQUEST, CF_TEXT, item); - PostMessageA(server_hwnd, WM_DDE_REQUEST, 0, lparam); - - flush_events(); - - /* WM_DDE_REQUEST, correct params */ - lparam = PackDDElParam(WM_DDE_REQUEST, CF_TEXT, item); - PostMessageA(server_hwnd, WM_DDE_REQUEST, (WPARAM)client_hwnd, lparam); - - flush_events(); - - GlobalDeleteAtom(item); - item = GlobalAddAtomA("poke"); - ok(item != 0, "Expected non-NULL item\n"); - - hglobal = create_poke(); - - /* WM_DDE_POKE, no ddepoke */ - lparam = PackDDElParam(WM_DDE_POKE, 0, item); - /* win9x returns 0 here and crashes in PostMessageA */ - if (lparam) { - PostMessageA(server_hwnd, WM_DDE_POKE, (WPARAM)client_hwnd, lparam); - flush_events(); - } - else - win_skip("no lparam for WM_DDE_POKE\n"); - - - /* WM_DDE_POKE, no item */ - lparam = PackDDElParam(WM_DDE_POKE, (UINT_PTR)hglobal, 0); - PostMessageA(server_hwnd, WM_DDE_POKE, (WPARAM)client_hwnd, lparam); - - flush_events(); - - hglobal = create_poke(); - - /* WM_DDE_POKE, no client hwnd */ - lparam = PackDDElParam(WM_DDE_POKE, (UINT_PTR)hglobal, item); - PostMessageA(server_hwnd, WM_DDE_POKE, 0, lparam); - - flush_events(); - - /* WM_DDE_POKE, all params correct */ - lparam = PackDDElParam(WM_DDE_POKE, (UINT_PTR)hglobal, item); - PostMessageA(server_hwnd, WM_DDE_POKE, (WPARAM)client_hwnd, lparam); - - flush_events(); - - execute_hglobal = create_execute("[Command(Var)]"); - - /* WM_DDE_EXECUTE, no lparam */ - PostMessageA(server_hwnd, WM_DDE_EXECUTE, (WPARAM)client_hwnd, 0); - - flush_events(); - - /* WM_DDE_EXECUTE, no hglobal */ - lparam = PackDDElParam(WM_DDE_EXECUTE, 0, 0); - PostMessageA(server_hwnd, WM_DDE_EXECUTE, (WPARAM)client_hwnd, lparam); - - flush_events(); - - /* WM_DDE_EXECUTE, no client hwnd */ - lparam = PackDDElParam(WM_DDE_EXECUTE, 0, (UINT_PTR)execute_hglobal); - PostMessageA(server_hwnd, WM_DDE_EXECUTE, 0, lparam); - - flush_events(); - - /* WM_DDE_EXECUTE, all params correct */ - lparam = PackDDElParam(WM_DDE_EXECUTE, 0, (UINT_PTR)execute_hglobal); - PostMessageA(server_hwnd, WM_DDE_EXECUTE, (WPARAM)client_hwnd, lparam); - - flush_events(); - - GlobalFree(execute_hglobal); - execute_hglobal = create_execute("[Command-2(Var)]"); - - /* WM_DDE_EXECUTE, all params correct */ - lparam = PackDDElParam(WM_DDE_EXECUTE, 0, (UINT_PTR)execute_hglobal); - PostMessageA(server_hwnd, WM_DDE_EXECUTE, (WPARAM)client_hwnd, lparam); - - flush_events(); - - GlobalFree(execute_hglobal); - execute_hglobal = create_execute("[BadCommand(Var)]"); - - /* WM_DDE_EXECUTE that will get rejected */ - lparam = PackDDElParam(WM_DDE_EXECUTE, 0, (UINT_PTR)execute_hglobal); - PostMessageA(server_hwnd, WM_DDE_EXECUTE, (WPARAM)client_hwnd, lparam); - - flush_events(); - - destroy_dde_window(&client_hwnd, "dde_client"); -} - -static LRESULT WINAPI hook_dde_client_wndprocA(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - UINT_PTR lo, hi; - - trace("hook_dde_client_wndprocA: %p %04x %08lx %08lx\n", hwnd, msg, wparam, lparam); - - switch (msg) - { - case WM_DDE_ACK: - UnpackDDElParam(WM_DDE_ACK, lparam, &lo, &hi); - trace("WM_DDE_ACK: status %04lx hglobal %p\n", lo, (HGLOBAL)hi); - break; - - default: - break; - } - return CallWindowProcA(old_dde_client_wndproc, hwnd, msg, wparam, lparam); -} - -static LRESULT WINAPI hook_dde_client_wndprocW(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - UINT_PTR lo, hi; - - trace("hook_dde_client_wndprocW: %p %04x %08lx %08lx\n", hwnd, msg, wparam, lparam); - - switch (msg) - { - case WM_DDE_ACK: - UnpackDDElParam(WM_DDE_ACK, lparam, &lo, &hi); - trace("WM_DDE_ACK: status %04lx hglobal %p\n", lo, (HGLOBAL)hi); - break; - - default: - break; - } - return CallWindowProcW(old_dde_client_wndproc, hwnd, msg, wparam, lparam); -} - -static LRESULT WINAPI dde_server_wndprocA(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - static BOOL client_unicode, conv_unicode; - static int step; - - switch (msg) - { - case WM_DDE_INITIATE: - { - ATOM aService = GlobalAddAtomW(TEST_DDE_SERVICE); - - trace("server A: got WM_DDE_INITIATE from %p (%s) with %08lx\n", - (HWND)wparam, client_unicode ? "Unicode" : "ANSI", lparam); - - if (LOWORD(lparam) == aService) - { - client_unicode = IsWindowUnicode((HWND)wparam); - conv_unicode = client_unicode; - if (step >= 10) client_unicode = !client_unicode; /* change the client window type */ - - if (client_unicode) - old_dde_client_wndproc = (WNDPROC)SetWindowLongPtrW((HWND)wparam, GWLP_WNDPROC, - (ULONG_PTR)hook_dde_client_wndprocW); - else - old_dde_client_wndproc = (WNDPROC)SetWindowLongPtrA((HWND)wparam, GWLP_WNDPROC, - (ULONG_PTR)hook_dde_client_wndprocA); - trace("server: sending WM_DDE_ACK to %p\n", (HWND)wparam); - SendMessageW((HWND)wparam, WM_DDE_ACK, (WPARAM)hwnd, PackDDElParam(WM_DDE_ACK, aService, 0)); - } - else - GlobalDeleteAtom(aService); - return 0; - } - - case WM_DDE_EXECUTE: - { - DDEACK ack; - WORD status; - LPCSTR cmd; - UINT_PTR lo, hi; - - trace("server A: got WM_DDE_EXECUTE from %p with %08lx\n", (HWND)wparam, lparam); - - UnpackDDElParam(WM_DDE_EXECUTE, lparam, &lo, &hi); - trace("%08lx => lo %04lx hi %04lx\n", lparam, lo, hi); - - ack.bAppReturnCode = 0; - ack.reserved = 0; - ack.fBusy = 0; - /* We have to send a negative acknowledge even if we don't - * accept the command, otherwise Windows goes mad and next time - * we send an acknowledge DDEML drops the connection. - * Not sure how to call it: a bug or a feature. - */ - ack.fAck = 0; - - if ((cmd = GlobalLock((HGLOBAL)hi))) - { - ack.fAck = !lstrcmpA(cmd, exec_cmdA) || !lstrcmpW((LPCWSTR)cmd, exec_cmdW); - - switch (step % 5) - { - case 0: /* bad command */ - trace( "server A got unhandled command\n" ); - break; - - case 1: /* ANSI command */ - if (!conv_unicode) - ok( !lstrcmpA(cmd, exec_cmdA), "server A got wrong command '%s'\n", cmd ); - else /* we get garbage as the A command was mapped W->A */ - ok( cmd[0] != exec_cmdA[0], "server A got wrong command '%s'\n", cmd ); - break; - - case 2: /* ANSI command in Unicode format */ - if (conv_unicode) - ok( !lstrcmpA(cmd, exec_cmdA), "server A got wrong command '%s'\n", cmd ); - else - ok( !lstrcmpW((LPCWSTR)cmd, exec_cmdAW), "server A got wrong command '%s'\n", cmd ); - break; - - case 3: /* Unicode command */ - if (!conv_unicode) - ok( !lstrcmpW((LPCWSTR)cmd, exec_cmdW), "server A got wrong command '%s'\n", cmd ); - else /* correctly mapped W->A */ - ok( !lstrcmpA(cmd, exec_cmdWA), "server A got wrong command '%s'\n", cmd ); - break; - - case 4: /* Unicode command in ANSI format */ - if (!conv_unicode) - ok( !lstrcmpA(cmd, exec_cmdWA), "server A got wrong command '%s'\n", cmd ); - else /* we get garbage as the A command was mapped W->A */ - ok( cmd[0] != exec_cmdWA[0], "server A got wrong command '%s'\n", cmd ); - break; - } - GlobalUnlock((HGLOBAL)hi); - } - else ok( 0, "bad command data %lx\n", hi ); - - step++; - trace("server A: posting %s WM_DDE_ACK to %p\n", ack.fAck ? "POSITIVE" : "NEGATIVE", (HWND)wparam); - - status = *((WORD *)&ack); - lparam = ReuseDDElParam(lparam, WM_DDE_EXECUTE, WM_DDE_ACK, status, hi); - - PostMessageW((HWND)wparam, WM_DDE_ACK, (WPARAM)hwnd, lparam); - return 0; - } - - case WM_DDE_TERMINATE: - { - DDEACK ack; - WORD status; - - trace("server A: got WM_DDE_TERMINATE from %p with %08lx\n", (HWND)wparam, lparam); - - ack.bAppReturnCode = 0; - ack.reserved = 0; - ack.fBusy = 0; - ack.fAck = 1; - - trace("server A: posting %s WM_DDE_ACK to %p\n", ack.fAck ? "POSITIVE" : "NEGATIVE", (HWND)wparam); - - status = *((WORD *)&ack); - lparam = PackDDElParam(WM_DDE_ACK, status, 0); - - PostMessageW((HWND)wparam, WM_DDE_ACK, (WPARAM)hwnd, lparam); - return 0; - } - - default: - break; - } - - return DefWindowProcA(hwnd, msg, wparam, lparam); -} - -static LRESULT WINAPI dde_server_wndprocW(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - static BOOL client_unicode, conv_unicode; - static int step; - - switch (msg) - { - case WM_DDE_INITIATE: - { - ATOM aService = GlobalAddAtomW(TEST_DDE_SERVICE); - - if (LOWORD(lparam) == aService) - { - client_unicode = IsWindowUnicode((HWND)wparam); - conv_unicode = client_unicode; - if (step >= 10) client_unicode = !client_unicode; /* change the client window type */ - - if (client_unicode) - old_dde_client_wndproc = (WNDPROC)SetWindowLongPtrW((HWND)wparam, GWLP_WNDPROC, - (ULONG_PTR)hook_dde_client_wndprocW); - else - old_dde_client_wndproc = (WNDPROC)SetWindowLongPtrA((HWND)wparam, GWLP_WNDPROC, - (ULONG_PTR)hook_dde_client_wndprocA); - trace("server W: sending WM_DDE_ACK to %p\n", (HWND)wparam); - SendMessageW((HWND)wparam, WM_DDE_ACK, (WPARAM)hwnd, PackDDElParam(WM_DDE_ACK, aService, 0)); - } - else - GlobalDeleteAtom(aService); - - trace("server W: got WM_DDE_INITIATE from %p with %08lx (client %s conv %s)\n", (HWND)wparam, - lparam, client_unicode ? "Unicode" : "ANSI", conv_unicode ? "Unicode" : "ANSI" ); - - return 0; - } - - case WM_DDE_EXECUTE: - { - DDEACK ack; - WORD status; - LPCSTR cmd; - UINT_PTR lo, hi; - - trace("server W: got WM_DDE_EXECUTE from %p with %08lx\n", (HWND)wparam, lparam); - - UnpackDDElParam(WM_DDE_EXECUTE, lparam, &lo, &hi); - trace("%08lx => lo %04lx hi %04lx\n", lparam, lo, hi); - - ack.bAppReturnCode = 0; - ack.reserved = 0; - ack.fBusy = 0; - /* We have to send a negative acknowledge even if we don't - * accept the command, otherwise Windows goes mad and next time - * we send an acknowledge DDEML drops the connection. - * Not sure how to call it: a bug or a feature. - */ - ack.fAck = 0; - - if ((cmd = GlobalLock((HGLOBAL)hi))) - { - ack.fAck = !lstrcmpA(cmd, exec_cmdA) || !lstrcmpW((LPCWSTR)cmd, exec_cmdW); - - switch (step % 5) - { - case 0: /* bad command */ - trace( "server W got unhandled command\n" ); - break; - - case 1: /* ANSI command */ - if (conv_unicode && !client_unicode) /* W->A mapping -> garbage */ - ok( cmd[0] != exec_cmdA[0], "server W got wrong command '%s'\n", cmd ); - else if (!conv_unicode && client_unicode) /* A->W mapping */ - ok( !lstrcmpW((LPCWSTR)cmd, exec_cmdAW), "server W got wrong command '%s'\n", cmd ); - else - ok( !lstrcmpA(cmd, exec_cmdA), "server W got wrong command '%s'\n", cmd ); - break; - - case 2: /* ANSI command in Unicode format */ - if (conv_unicode && !client_unicode) /* W->A mapping */ - ok( !lstrcmpA(cmd, exec_cmdA), "server W got wrong command '%s'\n", cmd ); - else if (!conv_unicode && client_unicode) /* A->W mapping */ - ok( *(WCHAR *)cmd == exec_cmdAW[0], "server W got wrong command '%s'\n", cmd ); - else - ok( !lstrcmpW((LPCWSTR)cmd, exec_cmdAW), "server W got wrong command '%s'\n", cmd ); - break; - - case 3: /* Unicode command */ - if (conv_unicode && !client_unicode) /* W->A mapping */ - ok( !lstrcmpA(cmd, exec_cmdWA), "server W got wrong command '%s'\n", cmd ); - else if (!conv_unicode && client_unicode) /* A->W mapping */ - ok( *(WCHAR *)cmd == exec_cmdW[0], "server W got wrong command '%s'\n", cmd ); - else - ok( !lstrcmpW((LPCWSTR)cmd, exec_cmdW), "server W got wrong command '%s'\n", cmd ); - break; - - case 4: /* Unicode command in ANSI format */ - if (conv_unicode && !client_unicode) /* W->A mapping -> garbage */ - ok( cmd[0] != exec_cmdWA[0], "server W got wrong command '%s'\n", cmd ); - else if (!conv_unicode && client_unicode) /* A->W mapping */ - ok( !lstrcmpW((LPCWSTR)cmd, exec_cmdW), "server W got wrong command '%s'\n", cmd ); - else - ok( !lstrcmpA(cmd, exec_cmdWA), "server W got wrong command '%s'\n", cmd ); - break; - } - GlobalUnlock((HGLOBAL)hi); - } - else ok( 0, "bad command data %lx\n", hi ); - - step++; - trace("server W: posting %s WM_DDE_ACK to %p\n", ack.fAck ? "POSITIVE" : "NEGATIVE", (HWND)wparam); - - status = *((WORD *)&ack); - lparam = ReuseDDElParam(lparam, WM_DDE_EXECUTE, WM_DDE_ACK, status, hi); - - PostMessageW((HWND)wparam, WM_DDE_ACK, (WPARAM)hwnd, lparam); - return 0; - } - - case WM_DDE_TERMINATE: - { - DDEACK ack; - WORD status; - - trace("server W: got WM_DDE_TERMINATE from %p with %08lx\n", (HWND)wparam, lparam); - - ack.bAppReturnCode = 0; - ack.reserved = 0; - ack.fBusy = 0; - ack.fAck = 1; - - trace("server W: posting %s WM_DDE_ACK to %p\n", ack.fAck ? "POSITIVE" : "NEGATIVE", (HWND)wparam); - - status = *((WORD *)&ack); - lparam = PackDDElParam(WM_DDE_ACK, status, 0); - - PostMessageW((HWND)wparam, WM_DDE_ACK, (WPARAM)hwnd, lparam); - return 0; - } - - default: - break; - } - - return DefWindowProcW(hwnd, msg, wparam, lparam); -} - -static HWND create_dde_server( BOOL unicode ) -{ - WNDCLASSA wcA; - WNDCLASSW wcW; - HWND server; - static const char server_class_nameA[] = "dde_server_windowA"; - static const WCHAR server_class_nameW[] = {'d','d','e','_','s','e','r','v','e','r','_','w','i','n','d','o','w','W',0}; - - if (unicode) - { - memset(&wcW, 0, sizeof(wcW)); - wcW.lpfnWndProc = dde_server_wndprocW; - wcW.lpszClassName = server_class_nameW; - wcW.hInstance = GetModuleHandleA(0); - RegisterClassW(&wcW); - - server = CreateWindowExW(0, server_class_nameW, NULL, WS_POPUP, - 100, 100, CW_USEDEFAULT, CW_USEDEFAULT, - GetDesktopWindow(), 0, GetModuleHandleA(0), NULL); - } - else - { - memset(&wcA, 0, sizeof(wcA)); - wcA.lpfnWndProc = dde_server_wndprocA; - wcA.lpszClassName = server_class_nameA; - wcA.hInstance = GetModuleHandleA(0); - RegisterClassA(&wcA); - - server = CreateWindowExA(0, server_class_nameA, NULL, WS_POPUP, - 100, 100, CW_USEDEFAULT, CW_USEDEFAULT, - GetDesktopWindow(), 0, GetModuleHandleA(0), NULL); - } - ok(!IsWindowUnicode(server) == !unicode, "wrong unicode type\n"); - return server; -} - -static HDDEDATA CALLBACK client_dde_callback(UINT uType, UINT uFmt, HCONV hconv, - HSZ hsz1, HSZ hsz2, HDDEDATA hdata, - ULONG_PTR dwData1, ULONG_PTR dwData2) -{ - static const char * const cmd_type[15] = { - "XTYP_ERROR", "XTYP_ADVDATA", "XTYP_ADVREQ", "XTYP_ADVSTART", - "XTYP_ADVSTOP", "XTYP_EXECUTE", "XTYP_CONNECT", "XTYP_CONNECT_CONFIRM", - "XTYP_XACT_COMPLETE", "XTYP_POKE", "XTYP_REGISTER", "XTYP_REQUEST", - "XTYP_DISCONNECT", "XTYP_UNREGISTER", "XTYP_WILDCONNECT" }; - UINT type; - const char *cmd_name; - - type = (uType & XTYP_MASK) >> XTYP_SHIFT; - cmd_name = (type <= 14) ? cmd_type[type] : "unknown"; - - trace("client_dde_callback: %04x (%s) %d %p %p %p %p %08lx %08lx\n", - uType, cmd_name, uFmt, hconv, hsz1, hsz2, hdata, dwData1, dwData2); - return 0; -} - -static void test_dde_aw_transaction( BOOL client_unicode, BOOL server_unicode ) -{ - HSZ hsz_server; - DWORD dde_inst, ret, err; - HCONV hconv; - HWND hwnd_server; - CONVINFO info; - HDDEDATA hdata; - BOOL conv_unicode = client_unicode; - BOOL got; - static char test_cmd[] = "test dde command"; - - if (!(hwnd_server = create_dde_server( server_unicode ))) return; - - dde_inst = 0; - if (client_unicode) - ret = DdeInitializeW(&dde_inst, client_dde_callback, APPCMD_CLIENTONLY, 0); - else - ret = DdeInitializeA(&dde_inst, client_dde_callback, APPCMD_CLIENTONLY, 0); - ok(ret == DMLERR_NO_ERROR, "DdeInitializeA failed with error %04x (%x)\n", - ret, DdeGetLastError(dde_inst)); - - hsz_server = DdeCreateStringHandleW(dde_inst, TEST_DDE_SERVICE, CP_WINUNICODE); - - hconv = DdeConnect(dde_inst, hsz_server, 0, NULL); - ok(hconv != 0, "DdeConnect error %x\n", DdeGetLastError(dde_inst)); - err = DdeGetLastError(dde_inst); - ok(err == DMLERR_NO_ERROR, "wrong dde error %x\n", err); - - info.cb = sizeof(info); - ret = DdeQueryConvInfo(hconv, QID_SYNC, &info); - ok(ret, "wrong info size %d, DdeQueryConvInfo error %x\n", ret, DdeGetLastError(dde_inst)); - ok(info.ConvCtxt.iCodePage == client_unicode ? CP_WINUNICODE : CP_WINANSI, - "wrong iCodePage %d\n", info.ConvCtxt.iCodePage); - ok(!info.hConvPartner, "unexpected info.hConvPartner: %p\n", info.hConvPartner); -todo_wine { - ok((info.wStatus & DDE_FACK), "unexpected info.wStatus: %04x\n", info.wStatus); -} - ok((info.wStatus & (ST_CONNECTED | ST_CLIENT)) == (ST_CONNECTED | ST_CLIENT), "unexpected info.wStatus: %04x\n", info.wStatus); - ok(info.wConvst == XST_CONNECTED, "unexpected info.wConvst: %04x\n", info.wConvst); - ok(info.wType == 0, "unexpected info.wType: %04x\n", info.wType); - - client_unicode = IsWindowUnicode( info.hwnd ); - trace("hwnd %p, hwndPartner %p, unicode %u\n", info.hwnd, info.hwndPartner, client_unicode); - - trace("sending test client transaction command\n"); - ret = 0xdeadbeef; - hdata = DdeClientTransaction((LPBYTE)test_cmd, strlen(test_cmd) + 1, hconv, (HSZ)0xdead, 0xbeef, XTYP_EXECUTE, 1000, &ret); - ok(!hdata, "DdeClientTransaction succeeded\n"); - ok(ret == DDE_FNOTPROCESSED || broken(ret == (0xdead0000 | DDE_FNOTPROCESSED)), /* win9x */ - "wrong status code %04x\n", ret); - err = DdeGetLastError(dde_inst); - ok(err == DMLERR_NOTPROCESSED, "wrong dde error %x\n", err); - - trace("sending ANSI client transaction command\n"); - ret = 0xdeadbeef; - hdata = DdeClientTransaction((LPBYTE)exec_cmdA, lstrlenA(exec_cmdA) + 1, hconv, 0, 0, XTYP_EXECUTE, 1000, &ret); - err = DdeGetLastError(dde_inst); - if (conv_unicode && (!client_unicode || !server_unicode)) /* W->A mapping -> garbage */ - { - ok(!hdata, "DdeClientTransaction returned %p, error %x\n", hdata, err); - ok(ret == DDE_FNOTPROCESSED, "wrong status code %04x\n", ret); - ok(err == DMLERR_NOTPROCESSED, "DdeClientTransaction returned error %x\n", err); - } - else if (!conv_unicode && client_unicode && server_unicode) /* A->W mapping -> wrong cmd */ - { - ok(!hdata, "DdeClientTransaction returned %p, error %x\n", hdata, err); - ok(ret == DDE_FNOTPROCESSED, "wrong status code %04x\n", ret); - ok(err == DMLERR_NOTPROCESSED, "DdeClientTransaction returned error %x\n", err); - } - else /* no mapping */ - { - ok(hdata != 0, "DdeClientTransaction returned %p, error %x\n", hdata, err); - ok(ret == DDE_FACK, "wrong status code %04x\n", ret); - ok(err == DMLERR_NO_ERROR, "wrong dde error %x\n", err); - } - - trace("sending ANSI-as-Unicode client transaction command\n"); - ret = 0xdeadbeef; - hdata = DdeClientTransaction((LPBYTE)exec_cmdAW, (lstrlenW(exec_cmdAW) + 1) * sizeof(WCHAR), - hconv, 0, 0, XTYP_EXECUTE, 1000, &ret); - err = DdeGetLastError(dde_inst); - if (conv_unicode && (!client_unicode || !server_unicode)) /* W->A mapping */ - { - ok(hdata != 0, "DdeClientTransaction returned %p, error %x\n", hdata, err); - ok(ret == DDE_FACK, "wrong status code %04x\n", ret); - ok(err == DMLERR_NO_ERROR, "wrong dde error %x\n", err); - } - else if (!conv_unicode && client_unicode && server_unicode) /* A->W mapping -> garbage */ - { - ok(!hdata, "DdeClientTransaction returned %p, error %x\n", hdata, err); - ok(ret == DDE_FNOTPROCESSED, "wrong status code %04x\n", ret); - ok(err == DMLERR_NOTPROCESSED, "DdeClientTransaction returned error %x\n", err); - } - else /* no mapping */ - { - ok(!hdata, "DdeClientTransaction returned %p, error %x\n", hdata, err); - ok(ret == DDE_FNOTPROCESSED || broken(ret == (0xdead0000 | DDE_FNOTPROCESSED)), /* win9x */ - "wrong status code %04x\n", ret); - ok(err == DMLERR_NOTPROCESSED, "DdeClientTransaction returned error %x\n", err); - } - - trace("sending unicode client transaction command\n"); - ret = 0xdeadbeef; - hdata = DdeClientTransaction((LPBYTE)exec_cmdW, (lstrlenW(exec_cmdW) + 1) * sizeof(WCHAR), hconv, 0, 0, XTYP_EXECUTE, 1000, &ret); - err = DdeGetLastError(dde_inst); - if (conv_unicode && (!client_unicode || !server_unicode)) /* W->A mapping -> wrong cmd */ - { - ok(!hdata, "DdeClientTransaction returned %p, error %x\n", hdata, err); - ok(ret == DDE_FNOTPROCESSED, "wrong status code %04x\n", ret); - ok(err == DMLERR_NOTPROCESSED, "DdeClientTransaction returned error %x\n", err); - } - else if (!conv_unicode && client_unicode && server_unicode) /* A->W mapping -> garbage */ - { - ok(!hdata, "DdeClientTransaction returned %p, error %x\n", hdata, err); - ok(ret == DDE_FNOTPROCESSED, "wrong status code %04x\n", ret); - ok(err == DMLERR_NOTPROCESSED, "DdeClientTransaction returned error %x\n", err); - } - else /* no mapping */ - { - ok(hdata != 0, "DdeClientTransaction returned %p, error %x\n", hdata, err); - ok(ret == DDE_FACK, "wrong status code %04x\n", ret); - ok(err == DMLERR_NO_ERROR, "wrong dde error %x\n", err); - } - - trace("sending Unicode-as-ANSI client transaction command\n"); - ret = 0xdeadbeef; - hdata = DdeClientTransaction((LPBYTE)exec_cmdWA, lstrlenA(exec_cmdWA) + 1, hconv, 0, 0, XTYP_EXECUTE, 1000, &ret); - err = DdeGetLastError(dde_inst); - if (conv_unicode && (!client_unicode || !server_unicode)) /* W->A mapping -> garbage */ - { - ok(!hdata, "DdeClientTransaction returned %p, error %x\n", hdata, err); - ok(ret == DDE_FNOTPROCESSED, "wrong status code %04x\n", ret); - ok(err == DMLERR_NOTPROCESSED, "DdeClientTransaction returned error %x\n", err); - } - else if (!conv_unicode && client_unicode && server_unicode) /* A->W mapping */ - { - ok(hdata != 0, "DdeClientTransaction returned %p, error %x\n", hdata, err); - ok(ret == DDE_FACK, "wrong status code %04x\n", ret); - ok(err == DMLERR_NO_ERROR, "wrong dde error %x\n", err); - } - else /* no mapping */ - { - ok(!hdata, "DdeClientTransaction returned %p, error %x\n", hdata, err); - ok(ret == DDE_FNOTPROCESSED, "wrong status code %04x\n", ret); - ok(err == DMLERR_NOTPROCESSED, "DdeClientTransaction returned error %x\n", err); - } - - got = DdeDisconnect(hconv); - ok(got, "DdeDisconnect error %x\n", DdeGetLastError(dde_inst)); - - info.cb = sizeof(info); - ret = DdeQueryConvInfo(hconv, QID_SYNC, &info); - ok(!ret, "DdeQueryConvInfo should fail\n"); - err = DdeGetLastError(dde_inst); -todo_wine { - ok(err == DMLERR_INVALIDPARAMETER, "wrong dde error %x\n", err); -} - - got = DdeFreeStringHandle(dde_inst, hsz_server); - ok(got, "DdeFreeStringHandle error %x\n", DdeGetLastError(dde_inst)); - - /* This call hangs on win2k SP4 and XP SP1. - DdeUninitialize(dde_inst);*/ - - DestroyWindow(hwnd_server); -} - -static void test_initialisation(void) -{ - UINT ret; - DWORD res; - HDDEDATA hdata; - HSZ server, topic, item; - DWORD client_pid; - HCONV conversation; - - /* Initialise without a valid server window. */ - client_pid = 0; - ret = DdeInitializeA(&client_pid, client_ddeml_callback, APPCMD_CLIENTONLY, 0); - ok(ret == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", ret); - - - server = DdeCreateStringHandleA(client_pid, "TestDDEService", CP_WINANSI); - topic = DdeCreateStringHandleA(client_pid, "TestDDETopic", CP_WINANSI); - - DdeGetLastError(client_pid); - - /* There is no server window so no conversation can be extracted */ - conversation = DdeConnect(client_pid, server, topic, NULL); - ok(conversation == NULL, "Expected NULL conversation, %p\n", conversation); - ret = DdeGetLastError(client_pid); - ok(ret == DMLERR_NO_CONV_ESTABLISHED, "Expected DMLERR_NO_CONV_ESTABLISHED, got %d\n", ret); - - DdeFreeStringHandle(client_pid, server); - - item = DdeCreateStringHandleA(client_pid, "request", CP_WINANSI); - - /* There is no conversation so an invalid parameter results */ - res = 0xdeadbeef; - DdeGetLastError(client_pid); - hdata = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_REQUEST, default_timeout, &res); - ok(hdata == NULL, "Expected NULL, got %p\n", hdata); - ret = DdeGetLastError(client_pid); -todo_wine - ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret); - ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %08x\n", res); - - DdeFreeStringHandle(client_pid, server); - ret = DdeDisconnect(conversation); - ok(ret == FALSE, "Expected FALSE, got %d\n", ret); - - ret = DdeUninitialize(client_pid); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); -} - -static void test_DdeCreateStringHandleW(DWORD dde_inst, int codepage) -{ - static const WCHAR dde_string[] = {'D','D','E',' ','S','t','r','i','n','g',0}; - HSZ str_handle; - WCHAR bufW[256]; - char buf[256]; - ATOM atom; - int ret; - - str_handle = DdeCreateStringHandleW(dde_inst, dde_string, codepage); - ok(str_handle != 0, "DdeCreateStringHandleW failed with error %08x\n", - DdeGetLastError(dde_inst)); - - ret = DdeQueryStringW(dde_inst, str_handle, NULL, 0, codepage); - if (codepage == CP_WINANSI) - ok(ret == 1, "DdeQueryStringW returned wrong length %d\n", ret); - else - ok(ret == lstrlenW(dde_string), "DdeQueryStringW returned wrong length %d\n", ret); - - ret = DdeQueryStringW(dde_inst, str_handle, bufW, 256, codepage); - if (codepage == CP_WINANSI) - { - ok(ret == 1, "DdeQueryStringW returned wrong length %d\n", ret); - ok(!lstrcmpA("D", (LPCSTR)bufW), "DdeQueryStringW returned wrong string\n"); - } - else - { - ok(ret == lstrlenW(dde_string), "DdeQueryStringW returned wrong length %d\n", ret); - ok(!lstrcmpW(dde_string, bufW), "DdeQueryStringW returned wrong string\n"); - } - - ret = DdeQueryStringA(dde_inst, str_handle, buf, 256, CP_WINANSI); - if (codepage == CP_WINANSI) - { - ok(ret == 1, "DdeQueryStringA returned wrong length %d\n", ret); - ok(!lstrcmpA("D", buf), "DdeQueryStringW returned wrong string\n"); - } - else - { - ok(ret == lstrlenA("DDE String"), "DdeQueryStringA returned wrong length %d\n", ret); - ok(!lstrcmpA("DDE String", buf), "DdeQueryStringA returned wrong string %s\n", buf); - } - - ret = DdeQueryStringA(dde_inst, str_handle, buf, 256, CP_WINUNICODE); - if (codepage == CP_WINANSI) - { - ok(ret == 1, "DdeQueryStringA returned wrong length %d\n", ret); - ok(!lstrcmpA("D", buf), "DdeQueryStringA returned wrong string %s\n", buf); - } - else - { - ok(ret == lstrlenA("DDE String"), "DdeQueryStringA returned wrong length %d\n", ret); - ok(!lstrcmpW(dde_string, (LPCWSTR)buf), "DdeQueryStringW returned wrong string\n"); - } - - if (codepage == CP_WINANSI) - { - atom = FindAtomA((LPSTR)dde_string); - ok(atom != 0, "Expected a valid atom\n"); - - SetLastError(0xdeadbeef); - atom = GlobalFindAtomA((LPSTR)dde_string); - ok(atom == 0, "Expected 0, got %d\n", atom); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - } - else - { - atom = FindAtomW(dde_string); - ok(atom != 0, "Expected a valid atom\n"); - - SetLastError(0xdeadbeef); - atom = GlobalFindAtomW(dde_string); - ok(atom == 0, "Expected 0, got %d\n", atom); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); - } - - ok(DdeFreeStringHandle(dde_inst, str_handle), "DdeFreeStringHandle failed\n"); -} - -static void test_DdeCreateDataHandle(void) -{ - HDDEDATA hdata; - DWORD dde_inst, dde_inst2; - DWORD size; - UINT res, err; - BOOL ret; - HSZ item; - LPBYTE ptr; - WCHAR item_str[] = {'i','t','e','m',0}; - - dde_inst = 0; - dde_inst2 = 0; - res = DdeInitializeA(&dde_inst, client_ddeml_callback, APPCMD_CLIENTONLY, 0); - ok(res == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", res); - - res = DdeInitializeA(&dde_inst2, client_ddeml_callback, APPCMD_CLIENTONLY, 0); - ok(res == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", res); - - /* 0 instance id - * This block tests an invalid instance Id. The correct behaviour is that if the instance Id - * is invalid then the lastError of all instances is set to the error. There are two instances - * created, lastError is cleared, an error is generated and then both instances are checked to - * ensure that they both have the same error set - */ - item = DdeCreateStringHandleA(0, "item", CP_WINANSI); - ok(item == NULL, "Expected NULL hsz got %p\n", item); - err = DdeGetLastError(dde_inst); - ok(err == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", err); - err = DdeGetLastError(dde_inst2); - ok(err == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", err); - item = DdeCreateStringHandleW(0, item_str, CP_WINUNICODE); - ok(item == NULL, "Expected NULL hsz got %p\n", item); - err = DdeGetLastError(dde_inst); - ok(err == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", err); - err = DdeGetLastError(dde_inst2); - ok(err == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", err); - - item = DdeCreateStringHandleA(dde_inst, "item", CP_WINANSI); - ok(item != NULL, "Expected non-NULL hsz\n"); - item = DdeCreateStringHandleA(dde_inst2, "item", CP_WINANSI); - ok(item != NULL, "Expected non-NULL hsz\n"); - - if (0) { - /* do not test with an invalid instance id: that crashes on win9x */ - hdata = DdeCreateDataHandle(0xdeadbeef, (LPBYTE)"data", MAX_PATH, 0, item, CF_TEXT, 0); - } - - /* 0 instance id - * This block tests an invalid instance Id. The correct behaviour is that if the instance Id - * is invalid then the lastError of all instances is set to the error. There are two instances - * created, lastError is cleared, an error is generated and then both instances are checked to - * ensure that they both have the same error set - */ - DdeGetLastError(dde_inst); - DdeGetLastError(dde_inst2); - hdata = DdeCreateDataHandle(0, (LPBYTE)"data", MAX_PATH, 0, item, CF_TEXT, 0); - err = DdeGetLastError(dde_inst); - ok(hdata == NULL, "Expected NULL, got %p\n", hdata); - ok(err == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", err); - err = DdeGetLastError(dde_inst2); - ok(err == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", err); - - ret = DdeUninitialize(dde_inst2); - ok(res == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", res); - - - /* NULL pSrc */ - DdeGetLastError(dde_inst); - hdata = DdeCreateDataHandle(dde_inst, NULL, MAX_PATH, 0, item, CF_TEXT, 0); - err = DdeGetLastError(dde_inst); - ok(hdata != NULL, "Expected non-NULL hdata\n"); - ok(err == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", err); - - ptr = DdeAccessData(hdata, &size); - ok(ptr != NULL, "Expected non-NULL ptr\n"); - ok(size == 260, "Expected 260, got %d\n", size); - - ret = DdeUnaccessData(hdata); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - ret = DdeFreeDataHandle(hdata); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - /* cb is zero */ - DdeGetLastError(dde_inst); - hdata = DdeCreateDataHandle(dde_inst, (LPBYTE)"data", 0, 0, item, CF_TEXT, 0); - err = DdeGetLastError(dde_inst); - ok(hdata != NULL, "Expected non-NULL hdata\n"); - ok(err == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", err); - - ptr = DdeAccessData(hdata, &size); - ok(ptr != NULL, "Expected non-NULL ptr\n"); - ok(size == 0, "Expected 0, got %d\n", size); - - ret = DdeUnaccessData(hdata); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - ret = DdeFreeDataHandle(hdata); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - /* cbOff is non-zero */ - DdeGetLastError(dde_inst); - hdata = DdeCreateDataHandle(dde_inst, (LPBYTE)"data", MAX_PATH, 2, item, CF_TEXT, 0); - err = DdeGetLastError(dde_inst); - ok(hdata != NULL, "Expected non-NULL hdata\n"); - ok(err == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", err); - - ptr = DdeAccessData(hdata, &size); - ok(ptr != NULL, "Expected non-NULL ptr\n"); - ok(size == 262, "Expected 262, got %d\n", size); - todo_wine - { - ok(lstrlenA((LPSTR)ptr) == 0, "Expected 0, got %d\n", lstrlenA((LPSTR)ptr)); - } - - ret = DdeUnaccessData(hdata); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - ret = DdeFreeDataHandle(hdata); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - /* NULL item */ - DdeGetLastError(dde_inst); - hdata = DdeCreateDataHandle(dde_inst, (LPBYTE)"data", MAX_PATH, 0, 0, CF_TEXT, 0); - err = DdeGetLastError(dde_inst); - ok(hdata != NULL, "Expected non-NULL hdata\n"); - ok(err == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", err); - - ptr = DdeAccessData(hdata, &size); - ok(ptr != NULL, "Expected non-NULL ptr\n"); - ok(!lstrcmpA((LPSTR)ptr, "data"), "Expected data, got %s\n", ptr); - ok(size == 260, "Expected 260, got %d\n", size); - - ret = DdeUnaccessData(hdata); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - ret = DdeFreeDataHandle(hdata); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - /* NULL item */ - DdeGetLastError(dde_inst); - hdata = DdeCreateDataHandle(dde_inst, (LPBYTE)"data", MAX_PATH, 0, (HSZ)0xdeadbeef, CF_TEXT, 0); - err = DdeGetLastError(dde_inst); - ok(hdata != NULL, "Expected non-NULL hdata\n"); - ok(err == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", err); - - ptr = DdeAccessData(hdata, &size); - ok(ptr != NULL, "Expected non-NULL ptr\n"); - ok(!lstrcmpA((LPSTR)ptr, "data"), "Expected data, got %s\n", ptr); - ok(size == 260, "Expected 260, got %d\n", size); - - ret = DdeUnaccessData(hdata); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - ret = DdeFreeDataHandle(hdata); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - /* invalid clipboard format */ - DdeGetLastError(dde_inst); - hdata = DdeCreateDataHandle(dde_inst, (LPBYTE)"data", MAX_PATH, 0, item, 0xdeadbeef, 0); - err = DdeGetLastError(dde_inst); - ok(hdata != NULL, "Expected non-NULL hdata\n"); - ok(err == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", err); - - ptr = DdeAccessData(hdata, &size); - ok(ptr != NULL, "Expected non-NULL ptr\n"); - ok(!lstrcmpA((LPSTR)ptr, "data"), "Expected data, got %s\n", ptr); - ok(size == 260, "Expected 260, got %d\n", size); - - ret = DdeUnaccessData(hdata); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - ret = DdeFreeDataHandle(hdata); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - ret = DdeUninitialize(dde_inst); - ok(res == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", res); -} - -static void test_DdeCreateStringHandle(void) -{ - DWORD dde_inst, ret; - - dde_inst = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = DdeInitializeW(&dde_inst, client_ddeml_callback, APPCMD_CLIENTONLY, 0); - ok(ret == DMLERR_INVALIDPARAMETER, "DdeInitializeW should fail, but got %04x instead\n", ret); - ok(DdeGetLastError(dde_inst) == DMLERR_INVALIDPARAMETER, "expected DMLERR_INVALIDPARAMETER\n"); - - dde_inst = 0; - ret = DdeInitializeW(&dde_inst, client_ddeml_callback, APPCMD_CLIENTONLY, 0); - ok(ret == DMLERR_NO_ERROR, "DdeInitializeW failed with error %04x (%08x)\n", - ret, DdeGetLastError(dde_inst)); - - test_DdeCreateStringHandleW(dde_inst, 0); - test_DdeCreateStringHandleW(dde_inst, CP_WINUNICODE); - test_DdeCreateStringHandleW(dde_inst, CP_WINANSI); - - ok(DdeUninitialize(dde_inst), "DdeUninitialize failed\n"); -} - -static void test_FreeDDElParam(void) -{ - HGLOBAL val, hglobal; - BOOL ret; - - ret = FreeDDElParam(WM_DDE_INITIATE, 0); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - hglobal = GlobalAlloc(GMEM_DDESHARE, 100); - ret = FreeDDElParam(WM_DDE_INITIATE, (LPARAM)hglobal); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - val = GlobalFree(hglobal); - ok(val == NULL, "Expected NULL, got %p\n", val); - - hglobal = GlobalAlloc(GMEM_DDESHARE, 100); - ret = FreeDDElParam(WM_DDE_ADVISE, (LPARAM)hglobal); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - hglobal = GlobalAlloc(GMEM_DDESHARE, 100); - ret = FreeDDElParam(WM_DDE_UNADVISE, (LPARAM)hglobal); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - val = GlobalFree(hglobal); - ok(val == NULL, "Expected NULL, got %p\n", val); - - hglobal = GlobalAlloc(GMEM_DDESHARE, 100); - ret = FreeDDElParam(WM_DDE_ACK, (LPARAM)hglobal); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - hglobal = GlobalAlloc(GMEM_DDESHARE, 100); - ret = FreeDDElParam(WM_DDE_DATA, (LPARAM)hglobal); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - hglobal = GlobalAlloc(GMEM_DDESHARE, 100); - ret = FreeDDElParam(WM_DDE_REQUEST, (LPARAM)hglobal); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - val = GlobalFree(hglobal); - ok(val == NULL, "Expected NULL, got %p\n", val); - - hglobal = GlobalAlloc(GMEM_DDESHARE, 100); - ret = FreeDDElParam(WM_DDE_POKE, (LPARAM)hglobal); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - hglobal = GlobalAlloc(GMEM_DDESHARE, 100); - ret = FreeDDElParam(WM_DDE_EXECUTE, (LPARAM)hglobal); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - val = GlobalFree(hglobal); - ok(val == NULL, "Expected NULL, got %p\n", val); -} - -static void test_PackDDElParam(void) -{ - UINT_PTR lo, hi, *ptr; - LPARAM lparam; - BOOL ret; - - lparam = PackDDElParam(WM_DDE_INITIATE, 0xcafe, 0xbeef); - /* value gets sign-extended despite being an LPARAM */ - ok(lparam == (int)0xbeefcafe, "Expected 0xbeefcafe, got %08lx\n", lparam); - - lo = hi = 0; - ret = UnpackDDElParam(WM_DDE_INITIATE, lparam, &lo, &hi); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xcafe, "Expected 0xcafe, got %08lx\n", lo); - ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi); - - ret = FreeDDElParam(WM_DDE_INITIATE, lparam); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - lparam = PackDDElParam(WM_DDE_TERMINATE, 0xcafe, 0xbeef); - ok(lparam == (int)0xbeefcafe, "Expected 0xbeefcafe, got %08lx\n", lparam); - - lo = hi = 0; - ret = UnpackDDElParam(WM_DDE_TERMINATE, lparam, &lo, &hi); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xcafe, "Expected 0xcafe, got %08lx\n", lo); - ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi); - - ret = FreeDDElParam(WM_DDE_TERMINATE, lparam); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - lparam = PackDDElParam(WM_DDE_ADVISE, 0xcafe, 0xbeef); - /* win9x returns 0 here */ - if (lparam) { - ptr = GlobalLock((HGLOBAL)lparam); - ok(ptr != NULL, "Expected non-NULL ptr\n"); - ok(ptr[0] == 0xcafe, "Expected 0xcafe, got %08lx\n", ptr[0]); - ok(ptr[1] == 0xbeef, "Expected 0xbeef, got %08lx\n", ptr[1]); - - ret = GlobalUnlock((HGLOBAL)lparam); - ok(ret == 1, "Expected 1, got %d\n", ret); - - lo = hi = 0; - ret = UnpackDDElParam(WM_DDE_ADVISE, lparam, &lo, &hi); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xcafe, "Expected 0xcafe, got %08lx\n", lo); - ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi); - } - else - win_skip("no lparam for WM_DDE_ADVISE\n"); - - ret = FreeDDElParam(WM_DDE_ADVISE, lparam); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - lparam = PackDDElParam(WM_DDE_UNADVISE, 0xcafe, 0xbeef); - ok(lparam == (int)0xbeefcafe, "Expected 0xbeefcafe, got %08lx\n", lparam); - - lo = hi = 0; - ret = UnpackDDElParam(WM_DDE_UNADVISE, lparam, &lo, &hi); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xcafe, "Expected 0xcafe, got %08lx\n", lo); - ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi); - - ret = FreeDDElParam(WM_DDE_UNADVISE, lparam); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - lparam = PackDDElParam(WM_DDE_ACK, 0xcafe, 0xbeef); - /* win9x returns the input (0xbeef<<16 | 0xcafe) here */ - if (lparam != (int)0xbeefcafe) { - ptr = GlobalLock((HGLOBAL)lparam); - ok(ptr != NULL, "Expected non-NULL ptr\n"); - ok(ptr[0] == 0xcafe, "Expected 0xcafe, got %08lx\n", ptr[0]); - ok(ptr[1] == 0xbeef, "Expected 0xbeef, got %08lx\n", ptr[1]); - - ret = GlobalUnlock((HGLOBAL)lparam); - ok(ret == 1, "Expected 1, got %d\n", ret); - - lo = hi = 0; - ret = UnpackDDElParam(WM_DDE_ACK, lparam, &lo, &hi); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xcafe, "Expected 0xcafe, got %08lx\n", lo); - ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi); - - ret = FreeDDElParam(WM_DDE_ACK, lparam); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - } - else - win_skip("got lparam 0x%lx for WM_DDE_ACK\n", lparam); - - lparam = PackDDElParam(WM_DDE_DATA, 0xcafe, 0xbeef); - /* win9x returns 0 here */ - if (lparam) { - ptr = GlobalLock((HGLOBAL)lparam); - ok(ptr != NULL, "Expected non-NULL ptr\n"); - ok(ptr[0] == 0xcafe, "Expected 0xcafe, got %08lx\n", ptr[0]); - ok(ptr[1] == 0xbeef, "Expected 0xbeef, got %08lx\n", ptr[1]); - - ret = GlobalUnlock((HGLOBAL)lparam); - ok(ret == 1, "Expected 1, got %d\n", ret); - - lo = hi = 0; - ret = UnpackDDElParam(WM_DDE_DATA, lparam, &lo, &hi); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xcafe, "Expected 0xcafe, got %08lx\n", lo); - ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi); - } - else - win_skip("no lparam for WM_DDE_DATA\n"); - - ret = FreeDDElParam(WM_DDE_DATA, lparam); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - lparam = PackDDElParam(WM_DDE_REQUEST, 0xcafe, 0xbeef); - ok(lparam == (int)0xbeefcafe, "Expected 0xbeefcafe, got %08lx\n", lparam); - - lo = hi = 0; - ret = UnpackDDElParam(WM_DDE_REQUEST, lparam, &lo, &hi); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xcafe, "Expected 0xcafe, got %08lx\n", lo); - ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi); - - ret = FreeDDElParam(WM_DDE_REQUEST, lparam); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - lparam = PackDDElParam(WM_DDE_POKE, 0xcafe, 0xbeef); - /* win9x returns 0 here */ - if (lparam) { - ptr = GlobalLock((HGLOBAL)lparam); - ok(ptr != NULL, "Expected non-NULL ptr\n"); - ok(ptr[0] == 0xcafe, "Expected 0xcafe, got %08lx\n", ptr[0]); - ok(ptr[1] == 0xbeef, "Expected 0xbeef, got %08lx\n", ptr[1]); - - ret = GlobalUnlock((HGLOBAL)lparam); - ok(ret == 1, "Expected 1, got %d\n", ret); - - lo = hi = 0; - ret = UnpackDDElParam(WM_DDE_POKE, lparam, &lo, &hi); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xcafe, "Expected 0xcafe, got %08lx\n", lo); - ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi); - } - else - win_skip("no lparam for WM_DDE_POKE\n"); - - ret = FreeDDElParam(WM_DDE_POKE, lparam); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - - lparam = PackDDElParam(WM_DDE_EXECUTE, 0xcafe, 0xbeef); - ok(lparam == 0xbeef, "Expected 0xbeef, got %08lx\n", lparam); - - lo = hi = 0; - ret = UnpackDDElParam(WM_DDE_EXECUTE, lparam, &lo, &hi); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0, "Expected 0, got %08lx\n", lo); - ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi); - - ret = FreeDDElParam(WM_DDE_EXECUTE, lparam); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); -} - -static void test_UnpackDDElParam(void) -{ - UINT_PTR lo, hi, *ptr; - HGLOBAL hglobal; - BOOL ret; - - /* NULL lParam */ - lo = 0xdead; - hi = 0xbeef; - ret = UnpackDDElParam(WM_DDE_INITIATE, 0, &lo, &hi); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0, "Expected 0, got %08lx\n", lo); - ok(hi == 0, "Expected 0, got %08lx\n", hi); - - /* NULL lo */ - lo = 0xdead; - hi = 0xbeef; - ret = UnpackDDElParam(WM_DDE_INITIATE, 0xcafebabe, NULL, &hi); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xdead, "Expected 0xdead, got %08lx\n", lo); - ok(hi == 0xcafe, "Expected 0xcafe, got %08lx\n", hi); - - /* NULL hi */ - lo = 0xdead; - hi = 0xbeef; - ret = UnpackDDElParam(WM_DDE_INITIATE, 0xcafebabe, &lo, NULL); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xbabe, "Expected 0xbabe, got %08lx\n", lo); - ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi); - - lo = 0xdead; - hi = 0xbeef; - ret = UnpackDDElParam(WM_DDE_INITIATE, 0xcafebabe, &lo, &hi); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xbabe, "Expected 0xbabe, got %08lx\n", lo); - ok(hi == 0xcafe, "Expected 0xcafe, got %08lx\n", hi); - - lo = 0xdead; - hi = 0xbeef; - ret = UnpackDDElParam(WM_DDE_TERMINATE, 0xcafebabe, &lo, &hi); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xbabe, "Expected 0xbabe, got %08lx\n", lo); - ok(hi == 0xcafe, "Expected 0xcafe, got %08lx\n", hi); - - lo = 0xdead; - hi = 0xbeef; - ret = UnpackDDElParam(WM_DDE_ADVISE, 0, &lo, &hi); - ok(ret == FALSE, "Expected FALSE, got %d\n", ret); - ok(lo == 0 || - broken(lo == 0xdead), /* win2k */ - "Expected 0, got %08lx\n", lo); - ok(hi == 0 || - broken(hi == 0xbeef), /* win2k */ - "Expected 0, got %08lx\n", hi); - - hglobal = GlobalAlloc(GMEM_DDESHARE, 2 * sizeof(*ptr)); - ptr = GlobalLock(hglobal); - ptr[0] = 0xcafebabe; - ptr[1] = 0xdeadbeef; - GlobalUnlock(hglobal); - - lo = 0xdead; - hi = 0xbeef; - ret = UnpackDDElParam(WM_DDE_ADVISE, (LPARAM)hglobal, &lo, &hi); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xcafebabe, "Expected 0xcafebabe, got %08lx\n", lo); - ok(hi == 0xdeadbeef, "Expected 0xdeadbeef, got %08lx\n", hi); - - lo = 0xdead; - hi = 0xbeef; - ret = UnpackDDElParam(WM_DDE_UNADVISE, 0xcafebabe, &lo, &hi); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xbabe, "Expected 0xbabe, got %08lx\n", lo); - ok(hi == 0xcafe, "Expected 0xcafe, got %08lx\n", hi); - - lo = 0xdead; - hi = 0xbeef; - ret = UnpackDDElParam(WM_DDE_ACK, (LPARAM)hglobal, &lo, &hi); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xcafebabe, "Expected 0xcafebabe, got %08lx\n", lo); - ok(hi == 0xdeadbeef, "Expected 0xdeadbeef, got %08lx\n", hi); - - lo = 0xdead; - hi = 0xbeef; - ret = UnpackDDElParam(WM_DDE_DATA, (LPARAM)hglobal, &lo, &hi); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xcafebabe, "Expected 0xcafebabe, got %08lx\n", lo); - ok(hi == 0xdeadbeef, "Expected 0xdeadbeef, got %08lx\n", hi); - - lo = 0xdead; - hi = 0xbeef; - ret = UnpackDDElParam(WM_DDE_REQUEST, 0xcafebabe, &lo, &hi); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xbabe, "Expected 0xbabe, got %08lx\n", lo); - ok(hi == 0xcafe, "Expected 0xcafe, got %08lx\n", hi); - - lo = 0xdead; - hi = 0xbeef; - ret = UnpackDDElParam(WM_DDE_POKE, (LPARAM)hglobal, &lo, &hi); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0xcafebabe, "Expected 0xcafebabe, got %08lx\n", lo); - ok(hi == 0xdeadbeef, "Expected 0xdeadbeef, got %08lx\n", hi); - - lo = 0xdead; - hi = 0xbeef; - ret = UnpackDDElParam(WM_DDE_EXECUTE, 0xcafebabe, &lo, &hi); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - ok(lo == 0, "Expected 0, got %08lx\n", lo); - ok(hi == 0xcafebabe, "Expected 0xcafebabe, got %08lx\n", hi); - - GlobalFree(hglobal); -} - -static char test_cmd_a_to_a[] = "Test dde command"; -static WCHAR test_cmd_w_to_w[][32] = { - {'t','e','s','t',' ','d','d','e',' ','c','o','m','m','a','n','d',0}, - { 0x2018, 0x2019, 0x0161, 0x0041, 0x02dc, 0 }, /* some chars that should map properly to CP1252 */ - { 0x2026, 0x2020, 0x2021, 0x0d0a, 0 }, /* false negative for IsTextUnicode */ - { 0x4efa, 0x4efc, 0x0061, 0x4efe, 0 }, /* some Chinese chars */ -}; -static const int nb_callbacks = 5 + sizeof(test_cmd_w_to_w)/sizeof(test_cmd_w_to_w[0]); - -static HDDEDATA CALLBACK server_end_to_end_callback(UINT uType, UINT uFmt, HCONV hconv, - HSZ hsz1, HSZ hsz2, HDDEDATA hdata, - ULONG_PTR dwData1, ULONG_PTR dwData2) -{ - DWORD size, rsize; - char str[MAX_PATH]; - static int msg_index = 0; - static HCONV conversation = 0; - static char test_service [] = "TestDDEService"; - static char test_topic [] = "TestDDETopic"; - - msg_index++; - - switch (uType) - { - case XTYP_REGISTER: - { - ok(msg_index % nb_callbacks == 1, "Expected 1 modulo %u, got %d\n", nb_callbacks, msg_index); - return (HDDEDATA)TRUE; - } - - case XTYP_CONNECT: - { - ok(msg_index % nb_callbacks == 2, "Expected 2 modulo %u, got %d\n", nb_callbacks, msg_index); - ok(uFmt == 0, "Expected 0, got %d, msg_index=%d\n", uFmt, msg_index); - ok(hconv == 0, "Expected 0, got %p, msg_index=%d\n", hconv, msg_index); - ok(hdata == 0, "Expected 0, got %p, msg_index=%d\n", hdata, msg_index); - ok(dwData1 != 0, "Expected not 0, got %08lx, msg_index=%d\n", dwData1, msg_index); - ok(dwData2 == FALSE, "Expected FALSE, got %08lx, msg_index=%d\n", dwData2, msg_index); - - size = DdeQueryStringA(server_pid, hsz1, str, MAX_PATH, CP_WINANSI); - ok(!lstrcmpA(str, test_topic), "Expected %s, got %s, msg_index=%d\n", - test_topic, str, msg_index); - ok(size == 12, "Expected 12, got %d, msg_index=%d\n", size, msg_index); - - size = DdeQueryStringA(server_pid, hsz2, str, MAX_PATH, CP_WINANSI); - ok(!lstrcmpA(str, test_service), "Expected %s, got %s, msg_index=%d\n", - test_service, str, msg_index); - ok(size == 14, "Expected 14, got %d, msg_index=%d\n", size, msg_index); - - return (HDDEDATA) TRUE; - } - case XTYP_CONNECT_CONFIRM: - { - ok(msg_index % nb_callbacks == 3, "Expected 3 modulo %u, got %d\n", nb_callbacks, msg_index); - conversation = hconv; - return (HDDEDATA) TRUE; - } - case XTYP_EXECUTE: - { - BYTE *buffer = NULL; - WCHAR *cmd_w; - char test_cmd_w_to_a[64]; - WCHAR test_cmd_a_to_w[64]; - DWORD size_a, size_w, size_w_to_a, size_a_to_w; - BOOL unicode_server, unicode_client, str_index; - - ok(uFmt == 0, "Expected 0, got %d\n", uFmt); - ok(hconv == conversation, "Expected conversation handle, got %p, msg_index=%d\n", - hconv, msg_index); - ok(dwData1 == 0, "Expected 0, got %08lx, msg_index=%d\n", dwData1, msg_index); - ok(dwData2 == 0, "Expected 0, got %08lx, msg_index=%d\n", dwData2, msg_index); - ok(hsz2 == 0, "Expected 0, got %p, msg_index=%d\n", hsz2, msg_index); - size = DdeQueryStringA(server_pid, hsz1, str, MAX_PATH, CP_WINANSI); - ok(!lstrcmpA(str, test_topic), "Expected %s, got %s, msg_index=%d\n", - test_topic, str, msg_index); - ok(size == 12, "Expected 12, got %d, msg_index=%d\n", size, msg_index); - ok(size == 12, "Expected 12, got %d, msg_index=%d\n", size, msg_index); - - size = DdeGetData(hdata, NULL, 0, 0); - ok((buffer = HeapAlloc(GetProcessHeap(), 0, size)) != NULL, "should not be null\n"); - rsize = DdeGetData(hdata, buffer, size, 0); - ok(rsize == size, "Incorrect size returned, expected %d got %d, msg_index=%d\n", - size, rsize, msg_index); - trace("msg %u strA \"%s\" strW %s\n", msg_index, buffer, wine_dbgstr_w((WCHAR*)buffer)); - - unicode_server = (msg_index / nb_callbacks == 1 || msg_index / nb_callbacks == 2); - unicode_client = (msg_index / nb_callbacks == 1 || msg_index / nb_callbacks == 3); - str_index = msg_index % nb_callbacks - 4; - cmd_w = test_cmd_w_to_w[str_index - 1]; - size_a = strlen(test_cmd_a_to_a) + 1; - size_w = (lstrlenW(cmd_w) + 1) * sizeof(WCHAR); - size_a_to_w = MultiByteToWideChar( CP_ACP, 0, test_cmd_a_to_a, -1, test_cmd_a_to_w, - sizeof(test_cmd_a_to_w)/sizeof(WCHAR) ) * sizeof(WCHAR); - size_w_to_a = WideCharToMultiByte( CP_ACP, 0, cmd_w, -1, - test_cmd_w_to_a, sizeof(test_cmd_w_to_a), NULL, NULL ); - switch (str_index) - { - case 0: /* ASCII string */ - if (unicode_server) - { - ok(size == size_a_to_w, "Wrong size %d/%d, msg_index=%d\n", size, size_a_to_w, msg_index); - ok(!lstrcmpW((WCHAR*)buffer, test_cmd_a_to_w), - "Expected %s, msg_index=%d\n", wine_dbgstr_w(test_cmd_a_to_w), msg_index); - } - else if (unicode_client) - { - /* ASCII string mapped W->A -> garbage */ - } - else - { - ok(size == size_a, "Wrong size %d/%d, msg_index=%d\n", size, size_a, msg_index); - ok(!lstrcmpA((CHAR*)buffer, test_cmd_a_to_a), "Expected %s, got %s, msg_index=%d\n", - test_cmd_a_to_a, buffer, msg_index); - } - break; - - case 1: /* Unicode string with only 8-bit chars */ - if (unicode_server) - { - ok(size == size_w, "Wrong size %d/%d, msg_index=%d\n", size, size_w, msg_index); - ok(!lstrcmpW((WCHAR*)buffer, cmd_w), - "Expected %s, msg_index=%d\n", wine_dbgstr_w(cmd_w), msg_index); - } - else if (unicode_client) - { - ok(size == size_w_to_a, "Wrong size %d/%d, msg_index=%d\n", size, size_w_to_a, msg_index); - ok(!lstrcmpA((CHAR*)buffer, test_cmd_w_to_a), "Expected %s, got %s, msg_index=%d\n", - test_cmd_w_to_a, buffer, msg_index); - } - else - { - ok(size == size_w_to_a, "Wrong size %d/%d, msg_index=%d\n", - size, size_w_to_a, msg_index); - ok(!lstrcmpA((CHAR*)buffer, test_cmd_w_to_a), "Expected %s, got %s, msg_index=%d\n", - test_cmd_w_to_a, buffer, msg_index); - } - break; - - case 2: /* normal Unicode string */ - case 3: /* IsTextUnicode false negative */ - case 4: /* Chinese chars */ - if (unicode_server) - { - /* double A->W mapping */ - /* NT uses the full size, XP+ only until the first null */ - DWORD nt_size = MultiByteToWideChar( CP_ACP, 0, (char *)cmd_w, size_w, test_cmd_a_to_w, - sizeof(test_cmd_a_to_w)/sizeof(WCHAR) ) * sizeof(WCHAR); - DWORD xp_size = MultiByteToWideChar( CP_ACP, 0, (char *)cmd_w, -1, NULL, 0 ) * sizeof(WCHAR); - ok(size == xp_size || broken(size == nt_size) || - broken(str_index == 4 && IsDBCSLeadByte(cmd_w[0])) /* East Asian */, - "Wrong size %d/%d, msg_index=%d\n", size, size_a_to_w, msg_index); - ok(!lstrcmpW((WCHAR*)buffer, test_cmd_a_to_w), - "Expected %s, msg_index=%d\n", wine_dbgstr_w(test_cmd_a_to_w), msg_index); - } - else if (unicode_client) - { - ok(size == size_w_to_a, "Wrong size %d/%d, msg_index=%d\n", size, size_w_to_a, msg_index); - ok(!lstrcmpA((CHAR*)buffer, test_cmd_w_to_a), "Expected %s, got %s, msg_index=%d\n", - test_cmd_w_to_a, buffer, msg_index); - } - else - { - ok(size == size_w, "Wrong size %d/%d, msg_index=%d\n", size, size_w, msg_index); - ok(!lstrcmpW((WCHAR*)buffer, cmd_w), - "Expected %s, msg_index=%d\n", wine_dbgstr_w(cmd_w), msg_index); - } - break; - - default: - ok( 0, "Invalid message %u\n", msg_index ); - break; - } - return (HDDEDATA) DDE_FACK; - } - case XTYP_DISCONNECT: - return (HDDEDATA) TRUE; - - default: - ok(FALSE, "Unhandled msg: %08x, msg_index=%d\n", uType, msg_index); - } - - return NULL; -} - -static HDDEDATA CALLBACK client_end_to_end_callback(UINT uType, UINT uFmt, HCONV hconv, - HSZ hsz1, HSZ hsz2, HDDEDATA hdata, - ULONG_PTR dwData1, ULONG_PTR dwData2) -{ - switch (uType) - { - case XTYP_DISCONNECT: - return (HDDEDATA) TRUE; - - default: - ok(FALSE, "Unhandled msg: %08x\n", uType); - } - - return NULL; -} - -static void test_end_to_end_client(BOOL type_a) -{ - DWORD i, ret, err; - DWORD client_pid = 0; - HSZ server, topic; - HCONV hconv; - HDDEDATA hdata; - static char test_service[] = "TestDDEService"; - static WCHAR test_service_w[] = {'T','e','s','t','D','D','E','S','e','r','v','i','c','e',0}; - static char test_topic[] = "TestDDETopic"; - static WCHAR test_topic_w[] = {'T','e','s','t','D','D','E','T','o','p','i','c',0}; - - trace("Start end to end client %s\n", type_a ? "ASCII" : "UNICODE"); - - if (type_a) - ret = DdeInitializeA(&client_pid, client_end_to_end_callback, APPCMD_CLIENTONLY, 0); - else - ret = DdeInitializeW(&client_pid, client_end_to_end_callback, APPCMD_CLIENTONLY, 0); - ok(ret == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %x\n", ret); - - if (type_a) - { - server = DdeCreateStringHandleA(client_pid, test_service, CP_WINANSI); - topic = DdeCreateStringHandleA(client_pid, test_topic, CP_WINANSI); - } - else { - server = DdeCreateStringHandleW(client_pid, test_service_w, CP_WINUNICODE); - topic = DdeCreateStringHandleW(client_pid, test_topic_w, CP_WINUNICODE); - } - - DdeGetLastError(client_pid); - hconv = DdeConnect(client_pid, server, topic, NULL); - ok(hconv != NULL, "Expected non-NULL conversation\n"); - ret = DdeGetLastError(client_pid); - ok(ret == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %x\n", ret); - DdeFreeStringHandle(client_pid, server); - - /* Test both A and W data being passed to DdeClientTransaction */ - hdata = DdeClientTransaction((LPBYTE)test_cmd_a_to_a, sizeof(test_cmd_a_to_a), - hconv, (HSZ)0xdead, 0xbeef, XTYP_EXECUTE, 1000, &ret); - ok(hdata != NULL, "DdeClientTransaction failed\n"); - ok(ret == DDE_FACK, "wrong status code %x\n", ret); - err = DdeGetLastError(client_pid); - ok(err == DMLERR_NO_ERROR, "wrong dde error %x\n", err); - - for (i = 0; i < sizeof(test_cmd_w_to_w)/sizeof(test_cmd_w_to_w[0]); i++) - { - hdata = DdeClientTransaction((LPBYTE)test_cmd_w_to_w[i], - (lstrlenW(test_cmd_w_to_w[i]) + 1) * sizeof(WCHAR), - hconv, (HSZ)0xdead, 0xbeef, XTYP_EXECUTE, 1000, &ret); - ok(hdata != NULL, "DdeClientTransaction failed\n"); - ok(ret == DDE_FACK, "wrong status code %x\n", ret); - err = DdeGetLastError(client_pid); - ok(err == DMLERR_NO_ERROR, "wrong dde error %x\n", err); - } - - DdeFreeStringHandle(client_pid, topic); - ret = DdeDisconnect(hconv); - ok(ret == TRUE, "Expected TRUE, got %x\n", ret); - - ret = DdeUninitialize(client_pid); - ok(ret == TRUE, "Expected TRUE, got %x\n", ret); - -} - -static void test_end_to_end_server(HANDLE hproc, HANDLE hthread, BOOL type_a) -{ - MSG msg; - HSZ server; - BOOL ret; - DWORD res; - HDDEDATA hdata; - static CHAR test_service[] = "TestDDEService"; - - trace("start end to end server %s\n", type_a ? "ASCII" : "UNICODE"); - server_pid = 0; - - if (type_a) - res = DdeInitializeA(&server_pid, server_end_to_end_callback, APPCLASS_STANDARD, 0); - else - res = DdeInitializeW(&server_pid, server_end_to_end_callback, APPCLASS_STANDARD, 0); - ok(res == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", res); - - server = DdeCreateStringHandleA(server_pid, test_service, CP_WINANSI); - ok(server != NULL, "Expected non-NULL string handle\n"); - - hdata = DdeNameService(server_pid, server, 0, DNS_REGISTER); - ok(hdata == (HDDEDATA)TRUE, "Expected TRUE, got %p\n", hdata); - ResumeThread( hthread ); - - - while (MsgWaitForMultipleObjects( 1, &hproc, FALSE, INFINITE, QS_ALLINPUT ) != 0) - { - while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); - } - - ret = DdeUninitialize(server_pid); - ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - GetExitCodeProcess( hproc, &res ); - ok( !res, "client failed with %u error(s)\n", res ); -} - -START_TEST(dde) -{ - int argc; - char **argv; - char buffer[MAX_PATH]; - STARTUPINFO startup; - PROCESS_INFORMATION proc; - DWORD dde_inst = 0xdeadbeef; - - argc = winetest_get_mainargs(&argv); - if (argc == 3) - { - if (!lstrcmpA(argv[2], "ddeml")) - test_ddeml_client(); - else if (!lstrcmpA(argv[2], "msg")) - test_msg_client(); - else if (!lstrcmpA(argv[2], "enda")) - test_end_to_end_client(TRUE); - else if (!lstrcmpA(argv[2], "endw")) - test_end_to_end_client(FALSE); - - return; - } - - test_initialisation(); - - SetLastError(0xdeadbeef); - DdeInitializeW(&dde_inst, client_ddeml_callback, APPCMD_CLIENTONLY, 0); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("Skipping tests on win9x because of brokenness\n"); - return; - } - - ZeroMemory(&startup, sizeof(STARTUPINFO)); - sprintf(buffer, "%s dde ddeml", argv[0]); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW; - startup.wShowWindow = SW_SHOWNORMAL; - - CreateProcessA(NULL, buffer, NULL, NULL, FALSE, - CREATE_SUSPENDED, NULL, NULL, &startup, &proc); - - test_msg_server(proc.hProcess, proc.hThread); - - sprintf(buffer, "%s dde msg", argv[0]); - CreateProcessA(NULL, buffer, NULL, NULL, FALSE, - 0, NULL, NULL, &startup, &proc); - - test_ddeml_server(proc.hProcess); - - /* Test the combinations of A and W interfaces with A and W data - end to end to ensure that data conversions are accurate */ - sprintf(buffer, "%s dde enda", argv[0]); - CreateProcessA(NULL, buffer, NULL, NULL, FALSE, - CREATE_SUSPENDED, NULL, NULL, &startup, &proc); - - test_end_to_end_server(proc.hProcess, proc.hThread, TRUE); - - /* Don't bother testing W interfaces on Win9x/WinMe */ - SetLastError(0xdeadbeef); - lstrcmpW(NULL, NULL); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("Skipping W-interface tests\n"); - } - else - { - sprintf(buffer, "%s dde endw", argv[0]); - CreateProcessA(NULL, buffer, NULL, NULL, FALSE, - CREATE_SUSPENDED, NULL, NULL, &startup, &proc); - - test_end_to_end_server(proc.hProcess, proc.hThread, FALSE); - - sprintf(buffer, "%s dde enda", argv[0]); - CreateProcessA(NULL, buffer, NULL, NULL, FALSE, - CREATE_SUSPENDED, NULL, NULL, &startup, &proc); - - test_end_to_end_server(proc.hProcess, proc.hThread, FALSE); - - sprintf(buffer, "%s dde endw", argv[0]); - CreateProcessA(NULL, buffer, NULL, NULL, FALSE, - CREATE_SUSPENDED, NULL, NULL, &startup, &proc); - - test_end_to_end_server(proc.hProcess, proc.hThread, TRUE); - - test_dde_aw_transaction( FALSE, TRUE ); - test_dde_aw_transaction( TRUE, FALSE ); - test_dde_aw_transaction( TRUE, TRUE ); - test_dde_aw_transaction( FALSE, FALSE ); - - test_dde_aw_transaction( FALSE, TRUE ); - test_dde_aw_transaction( TRUE, FALSE ); - test_dde_aw_transaction( TRUE, TRUE ); - } - test_dde_aw_transaction( FALSE, FALSE ); - - test_DdeCreateDataHandle(); - test_DdeCreateStringHandle(); - test_FreeDDElParam(); - test_PackDDElParam(); - test_UnpackDDElParam(); -} diff --git a/rostests/winetests/user32/dialog.c b/rostests/winetests/user32/dialog.c deleted file mode 100755 index 8e4ffb577de..00000000000 --- a/rostests/winetests/user32/dialog.c +++ /dev/null @@ -1,1332 +0,0 @@ -/* Unit test suite for the dialog functions. - * - * Copyright 2004 Bill Medland - * - * 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 - * - * - * - * This test suite currently works by building a quite complex hierarchy of - * objects in a variety of styles and then performs a limited number of tests - * for the previous and next dialog group or tab items. - * - * The test specifically does not test all possibilities at this time since - * there are several cases where the Windows behaviour is rather strange and - * significant work would be required to get the Wine code to duplicate the - * strangeness, especially since most are in situations that would not - * normally be met. - */ - -#include -#include -#include - -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" - -#define MAXHWNDS 1024 -static HWND hwnd [MAXHWNDS]; -static unsigned int numwnds=1; /* 0 is reserved for null */ - -/* Global handles */ -static HINSTANCE g_hinst; /* This application's HINSTANCE */ -static HWND g_hwndMain, g_hwndButton1, g_hwndButton2, g_hwndButtonCancel; -static HWND g_hwndTestDlg, g_hwndTestDlgBut1, g_hwndTestDlgBut2, g_hwndTestDlgEdit; -static HWND g_hwndInitialFocusT1, g_hwndInitialFocusT2, g_hwndInitialFocusGroupBox; - -static LONG g_styleInitialFocusT1, g_styleInitialFocusT2; -static BOOL g_bInitialFocusInitDlgResult, g_bReceivedCommand; - -static int g_terminated; - -typedef struct { - INT_PTR id; - int parent; - DWORD style; - DWORD exstyle; -} h_entry; - -static const h_entry hierarchy [] = { - /* 0 is reserved for the null window */ - { 1, 0, WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS, WS_EX_WINDOWEDGE}, - { 20, 1, WS_CHILD | WS_VISIBLE | WS_GROUP, 0}, - { 2, 1, WS_CHILD | WS_VISIBLE, WS_EX_CONTROLPARENT}, - { 60, 2, WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0}, - /* What happens with groups when the parent is disabled */ - { 8, 2, WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_TABSTOP, WS_EX_CONTROLPARENT}, - { 85, 8, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_GROUP, 0}, - { 9, 8, WS_CHILD, WS_EX_CONTROLPARENT}, - { 86, 9, WS_CHILD | WS_VISIBLE, 0}, - { 87, 9, WS_CHILD | WS_VISIBLE, 0}, - { 31, 8, WS_CHILD | WS_VISIBLE | WS_GROUP, 0}, - { 10, 2, WS_CHILD | WS_VISIBLE, WS_EX_CONTROLPARENT}, - { 88, 10, WS_CHILD | WS_VISIBLE | WS_GROUP, 0}, - { 11, 10, WS_CHILD, WS_EX_CONTROLPARENT}, - { 89, 11, WS_CHILD | WS_VISIBLE, 0}, - { 32, 11, WS_CHILD | WS_VISIBLE | WS_GROUP, 0}, - { 90, 11, WS_CHILD | WS_VISIBLE, 0}, - { 33, 10, WS_CHILD | WS_VISIBLE | WS_GROUP, 0}, - { 21, 2, WS_CHILD | WS_VISIBLE | WS_GROUP, 0}, - { 61, 2, WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0}, - { 3, 1, WS_CHILD | WS_VISIBLE | DS_CONTROL, 0}, - { 22, 3, WS_CHILD | WS_VISIBLE | WS_GROUP, 0}, - { 62, 3, WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0}, - { 7, 3, WS_CHILD | WS_VISIBLE, WS_EX_CONTROLPARENT}, - { 4, 7, WS_CHILD | WS_VISIBLE | DS_CONTROL, 0}, - { 83, 4, WS_CHILD | WS_VISIBLE, 0}, - { 5, 4, WS_CHILD | WS_VISIBLE | DS_CONTROL, 0}, - /* A couple of controls around the main dialog */ - { 29, 5, WS_CHILD | WS_VISIBLE | WS_GROUP, 0}, - { 81, 5, WS_CHILD | WS_VISIBLE, 0}, - /* The main dialog with lots of controls */ - { 6, 5, WS_CHILD | WS_VISIBLE, WS_EX_CONTROLPARENT}, - /* At the start of a dialog */ - /* Disabled controls are skipped */ - { 63, 6, WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_TABSTOP, 0}, - /* Invisible controls are skipped */ - { 64, 6, WS_CHILD | WS_TABSTOP, 0}, - /* Invisible disabled controls are skipped */ - { 65, 6, WS_CHILD | WS_DISABLED | WS_TABSTOP, 0}, - /* Non-tabstop controls are skipped for tabs but not for groups */ - { 66, 6, WS_CHILD | WS_VISIBLE, 0}, - /* End of first group, with no tabstops in it */ - { 23, 6, WS_CHILD | WS_VISIBLE | WS_GROUP, 0}, - /* At last a tabstop */ - { 67, 6, WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0}, - /* A group that is totally disabled or invisible */ - { 24, 6, WS_CHILD | WS_DISABLED | WS_GROUP, 0}, - { 68, 6, WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_TABSTOP, 0}, - { 69, 6, WS_CHILD | WS_TABSTOP, 0}, - /* A valid group in the middle of the dialog (not the first nor last group*/ - { 25, 6, WS_CHILD | WS_VISIBLE | WS_GROUP, 0}, - /* A non-tabstop item will be skipped for tabs */ - { 70, 6, WS_CHILD | WS_VISIBLE, 0}, - /* A disabled item will be skipped for tabs and groups */ - { 71, 6, WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_TABSTOP, 0}, - /* A valid item will be found for tabs and groups */ - { 72, 6, WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0}, - /* A disabled item to skip when looking for the next group item */ - { 73, 6, WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_TABSTOP, 0}, - /* The next group begins with an enabled visible label */ - { 26, 6, WS_CHILD | WS_VISIBLE | WS_GROUP, 0}, - { 74, 6, WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0}, - { 75, 6, WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0}, - /* That group is terminated by a disabled label */ - { 27, 6, WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_GROUP, 0}, - { 76, 6, WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0}, - { 77, 6, WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0}, - /* That group is terminated by an invisible label */ - { 28, 6, WS_CHILD | WS_GROUP, 0}, - /* The end of the dialog with item for loop and recursion testing */ - { 78, 6, WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0}, - /* No tabstop so skipped for prev tab, but found for prev group */ - { 79, 6, WS_CHILD | WS_VISIBLE, 0}, - { 80, 6, WS_CHILD | WS_VISIBLE | WS_DISABLED | WS_TABSTOP, 0}, - /* A couple of controls after the main dialog */ - { 82, 5, WS_CHILD | WS_VISIBLE, 0}, - { 30, 5, WS_CHILD | WS_VISIBLE | WS_GROUP, 0}, - /* And around them */ - { 84, 4, WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0}, - {0, 0, 0, 0} -}; - -static BOOL CreateWindows (HINSTANCE hinst) -{ - const h_entry *p = hierarchy; - - while (p->id != 0) - { - DWORD style, exstyle; - char ctrlname[9]; - - /* Basically assert that the hierarchy is valid and track the - * maximum control number - */ - if (p->id >= numwnds) - { - if (p->id >= sizeof(hwnd)/sizeof(hwnd[0])) - { - trace ("Control %ld is out of range\n", p->id); - return FALSE; - } - else - numwnds = p->id+1; - } - if (p->id <= 0) - { - trace ("Control %ld is out of range\n", p->id); - return FALSE; - } - if (hwnd[p->id] != 0) - { - trace ("Control %ld is used more than once\n", p->id); - return FALSE; - } - - /* Create the control */ - sprintf (ctrlname, "ctrl%4.4ld", p->id); - hwnd[p->id] = CreateWindowEx (p->exstyle, TEXT(p->parent ? "static" : "GetNextDlgItemWindowClass"), TEXT(ctrlname), p->style, 10, 10, 10, 10, hwnd[p->parent], p->parent ? (HMENU) (2000 + p->id) : 0, hinst, 0); - if (!hwnd[p->id]) - { - trace ("Failed to create control %ld\n", p->id); - return FALSE; - } - - /* Check that the styles are as we specified (except the main one - * which is quite frequently messed up). If this keeps breaking then - * we could mask out the bits that don't concern us. - */ - if (p->parent) - { - style = GetWindowLong (hwnd[p->id], GWL_STYLE); - exstyle = GetWindowLong (hwnd[p->id], GWL_EXSTYLE); - if (style != p->style || exstyle != p->exstyle) - { - trace ("Style mismatch at %ld: %8.8x %8.8x cf %8.8x %8.8x\n", p->id, style, exstyle, p->style, p->exstyle); - } - } - p++; - } - - return TRUE; -} - -/* Form the lParam of a WM_KEYDOWN message */ -static DWORD KeyDownData (int repeat, int scancode, int extended, int wasdown) -{ - return ((repeat & 0x0000FFFF) | ((scancode & 0x00FF) << 16) | - (extended ? 0x01000000 : 0) | (wasdown ? 0x40000000 : 0)); -} - -/* Form a WM_KEYDOWN VK_TAB message to the specified window */ -static void FormTabMsg (MSG *pMsg, HWND hwnd) -{ - pMsg->hwnd = hwnd; - pMsg->message = WM_KEYDOWN; - pMsg->wParam = VK_TAB; - pMsg->lParam = KeyDownData (1, 0x0F, 0, 0); - /* pMsg->time is not set. It shouldn't be needed */ - /* pMsg->pt is ignored */ -} - -/* Form a WM_KEYDOWN VK_RETURN message to the specified window */ -static void FormEnterMsg (MSG *pMsg, HWND hwnd) -{ - pMsg->hwnd = hwnd; - pMsg->message = WM_KEYDOWN; - pMsg->wParam = VK_RETURN; - pMsg->lParam = KeyDownData (1, 0x1C, 0, 0); - /* pMsg->time is not set. It shouldn't be needed */ - /* pMsg->pt is ignored */ -} - -/*********************************************************************** - * - * The actual tests - */ - -typedef struct -{ - int isok; /* or is it todo */ - int test; - int dlg; - int ctl; - int tab; - int prev; - int res; -} test_record; - -static int id (HWND h) -{ - unsigned int i; - for (i = 0; i < numwnds; i++) - if (hwnd[i] == h) - return i; - return -1; -} - -/* Tests - * - * Tests 1-8 test the hCtl argument of null or the dialog itself. - * - * 1. Prev Group of null is null - * 2. Prev Tab of null is null - * 3. Prev Group of hDlg in hDlg is null - * 4. Prev Tab of hDlg in hDlg is null - * 5. Next Group of null is first visible enabled child - * Check it skips invisible, disabled and both. - * 6. Next Tab of null is first visible enabled tabstop - * Check it skips invisible, disabled, nontabstop, and in combination. - * 7. Next Group of hDlg in hDlg is as of null - * 8. Next Tab of hDlg in hDlg is as of null - * - * Tests 9-14 test descent - * - * 9. DS_CONTROL does not result in descending the hierarchy for Tab Next - * 10. DS_CONTROL does not result in descending the hierarchy for Group Next - * 11. WS_EX_CONTROLPARENT results in descending the hierarchy for Tab Next - * 12. WS_EX_CONTROLPARENT results in descending the hierarchy for Group Next - * 13. WS_EX_CONTROLPARENT results in descending the hierarchy for Tab Prev - * 14. WS_EX_CONTROLPARENT results in descending the hierarchy for Group Prev - * - * Tests 15-24 are the basic Prev/Next Group tests - * - * 15. Next Group of a visible enabled non-group control is the next visible - * enabled non-group control, if there is one before the next group - * 16. Next Group of a visible enabled non-group control wraps around to the - * beginning of the group on finding a control that starts another group. - * Note that the group is in the middle of the dialog. - * 17. As 16 except note that the next group is started with a disabled - * visible control. - * 18. As 16 except note that the next group is started with an invisible - * enabled control. - * 19. Next Group wraps around the controls of the dialog - * 20. Next Group is the same even if the initial control is disabled. - * 21. Next Group is the same even if the initial control is invisible. - * 22. Next Group is the same even if the initial control has the group style - * 23. Next Group returns the initial control if there is no visible enabled - * control in the group. (Initial control disabled and not group style). - * 24. Prev version of test 16. - * Prev Group of a visible enabled non-group control wraps around to the - * beginning of the group on finding a control that starts the group. - * Note that the group is in the middle of the dialog. - * - * In tests 25 to 28 the control is sitting under dialogs which do not have - * the WS_EX_CONTROLPARENT style and so cannot be reached from the top of - * the dialog. - * - * 25. Next Group of an inaccessible control is as if it were accessible - * 26. Prev Group of an inaccessible control begins searching at the highest - * level ancestor that did not permit recursion down the hierarchy - * 27. Next Tab of an inaccessible control is as if it were accessible - * 28. Prev Tab of an inaccessible control begins searching at the highest - * level ancestor that did not permit recursion down the hierarchy. - * - * Tests 29- are the basic Tab tests - * - * 29. Next Tab of a control is the next visible enabled control with the - * Tabstop style (N.B. skips disabled, invisible and non-tabstop) - * 30. Prev Tab of a control is the previous visible enabled control with the - * Tabstop style (N.B. skips disabled, invisible and non-tabstop) - * 31. Next Tab test with at least two layers of descent and finding the - * result not at the first control. - * 32. Next Tab test with at least two layers of descent with the descent and - * control at the start of each level. - * 33. Prev Tab test with at least two layers of descent and finding the - * result not at the last control. - * 34. Prev Tab test with at least two layers of descent with the descent and - * control at the end of each level. - * - * 35. Passing NULL may result in the first child being the one returned. - * (group test) - * 36. Passing NULL may result in the first child being the one returned. - * (tab test) - */ - -static void test_GetNextDlgItem(void) -{ - static test_record test [] = - { - /* isok test dlg ctl tab prev res */ - - { 1, 1, 6, 0, 0, 1, 0}, - { 1, 2, 6, 0, 1, 1, 0}, - { 1, 3, 6, 6, 0, 1, 0}, - { 1, 4, 6, 6, 1, 1, 0}, - { 1, 5, 6, 0, 0, 0, 66}, - { 1, 6, 6, 0, 1, 0, 67}, - { 1, 7, 6, 6, 0, 0, 66}, - { 1, 8, 6, 6, 1, 0, 67}, - - { 1, 9, 4, 83, 1, 0, 84}, - { 1, 10, 4, 83, 0, 0, 5}, - { 1, 11, 5, 81, 1, 0, 67}, - { 1, 12, 5, 81, 0, 0, 66}, - { 1, 13, 5, 82, 1, 1, 78}, - - { 1, 14, 5, 82, 0, 1, 79}, - { 1, 15, 6, 70, 0, 0, 72}, - { 1, 16, 6, 72, 0, 0, 25}, - { 1, 17, 6, 75, 0, 0, 26}, - { 1, 18, 6, 77, 0, 0, 76}, - { 1, 19, 6, 79, 0, 0, 66}, - { 1, 20, 6, 71, 0, 0, 72}, - { 1, 21, 6, 64, 0, 0, 66}, - - { 1, 22, 6, 25, 0, 0, 70}, - { 1, 23, 6, 68, 0, 0, 68}, - { 1, 24, 6, 25, 0, 1, 72}, - { 1, 25, 1, 70, 0, 0, 72}, - /*{ 0, 26, 1, 70, 0, 1, 3}, Crashes Win95*/ - { 1, 27, 1, 70, 1, 0, 72}, - /*{ 0, 28, 1, 70, 1, 1, 61}, Crashes Win95*/ - - { 1, 29, 6, 67, 1, 0, 72}, - { 1, 30, 6, 72, 1, 1, 67}, - - { 1, 35, 2, 0, 0, 0, 60}, - { 1, 36, 2, 0, 1, 0, 60}, - - { 0, 0, 0, 0, 0, 0, 0} /* End of test */ - }; - const test_record *p = test; - - ok (CreateWindows (g_hinst), "Could not create test windows\n"); - - while (p->dlg) - { - HWND a; - a = (p->tab ? GetNextDlgTabItem : GetNextDlgGroupItem) (hwnd[p->dlg], hwnd[p->ctl], p->prev); - if (p->isok) - { - ok (a == hwnd[p->res], "Test %d: %s %s item of %d in %d was %d instead of %d\n", p->test, p->prev ? "Prev" : "Next", p->tab ? "Tab" : "Group", p->ctl, p->dlg, id(a), p->res); - } - else - { - todo_wine - { - ok (a == hwnd[p->res], "Test %d: %s %s item of %d in %d was actually %d matching expected %d\n", p->test, p->prev ? "Prev" : "Next", p->tab ? "Tab" : "Group", p->ctl, p->dlg, id(a), p->res); - } - } - p++; - } -} - -/* - * OnMainWindowCreate - */ -static BOOL OnMainWindowCreate (HWND hwnd, LPCREATESTRUCT lpcs) -{ - g_hwndButton1 = CreateWindow (TEXT("button"), TEXT("Button &1"), - WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_DEFPUSHBUTTON | BS_TEXT, - 10, 10, 80, 80, hwnd, (HMENU)100, g_hinst, 0); - if (!g_hwndButton1) return FALSE; - - g_hwndButton2 = CreateWindow (TEXT("button"), TEXT("Button &2"), - WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | BS_TEXT, - 110, 10, 80, 80, hwnd, (HMENU)200, g_hinst, 0); - if (!g_hwndButton2) return FALSE; - - g_hwndButtonCancel = CreateWindow (TEXT("button"), TEXT("Cancel"), - WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON | BS_TEXT, - 210, 10, 80, 80, hwnd, (HMENU)IDCANCEL, g_hinst, 0); - if (!g_hwndButtonCancel) return FALSE; - - return TRUE; -} - - -/* - * OnTestDlgCreate - */ - -static BOOL OnTestDlgCreate (HWND hwnd, LPCREATESTRUCT lpcs) -{ - g_hwndTestDlgEdit = CreateWindowEx ( WS_EX_LEFT | WS_EX_LTRREADING | - WS_EX_RIGHTSCROLLBAR | WS_EX_NOPARENTNOTIFY | WS_EX_CLIENTEDGE, - TEXT("Edit"), TEXT("Edit"), - WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | ES_LEFT | ES_AUTOHSCROLL, - 16,33,184,24, hwnd, (HMENU)101, g_hinst, 0); - if (!g_hwndTestDlgEdit) return FALSE; - - g_hwndTestDlgBut1 = CreateWindowEx ( WS_EX_LEFT | WS_EX_LTRREADING | WS_EX_RIGHTSCROLLBAR - | WS_EX_NOPARENTNOTIFY, - TEXT("button"), TEXT("Button &1"), - WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON | BS_TEXT, - 204,33,30,24, hwnd, (HMENU)201, g_hinst, 0); - if (!g_hwndTestDlgBut1) return FALSE; - - g_hwndTestDlgBut2 = CreateWindowEx ( WS_EX_LEFT | WS_EX_LTRREADING | WS_EX_RIGHTSCROLLBAR - | WS_EX_NOPARENTNOTIFY, TEXT("button"), - TEXT("Button &2"), - WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON | BS_TEXT, - 90,102,80,24, hwnd, (HMENU)IDCANCEL, g_hinst, 0); - if (!g_hwndTestDlgBut2) return FALSE; - - return TRUE; -} - -static LRESULT CALLBACK main_window_procA (HWND hwnd, UINT uiMsg, WPARAM wParam, - LPARAM lParam) -{ - switch (uiMsg) - { - /* Add blank case statements for these to ensure we don't use them - * by mistake. - */ - case DM_GETDEFID: break; - case DM_SETDEFID: break; - - case WM_CREATE: - return (OnMainWindowCreate (hwnd, - (LPCREATESTRUCTA) lParam) ? 0 : (LRESULT) -1); - case WM_COMMAND: - if (wParam == IDCANCEL) - { - g_terminated = TRUE; - return 0; - } - break; - } - - return DefWindowProcA (hwnd, uiMsg, wParam, lParam); -} - -static LRESULT CALLBACK disabled_test_proc (HWND hwnd, UINT uiMsg, - WPARAM wParam, LPARAM lParam) -{ - switch (uiMsg) - { - case WM_INITDIALOG: - { - DWORD dw; - HWND hwndOk; - - dw = SendMessage(hwnd, DM_GETDEFID, 0, 0); - assert(DC_HASDEFID == HIWORD(dw)); - hwndOk = GetDlgItem(hwnd, LOWORD(dw)); - assert(hwndOk); - EnableWindow(hwndOk, FALSE); - - PostMessage(hwnd, WM_KEYDOWN, VK_RETURN, 0); - PostMessage(hwnd, WM_COMMAND, IDCANCEL, 0); - break; - } - case WM_COMMAND: - if (wParam == IDOK) - { - g_terminated = TRUE; - EndDialog(hwnd, 0); - return 0; - } - else if (wParam == IDCANCEL) - { - EndDialog(hwnd, 0); - return 0; - } - break; - } - - return DefWindowProcA (hwnd, uiMsg, wParam, lParam); -} - -static LRESULT CALLBACK testDlgWinProc (HWND hwnd, UINT uiMsg, WPARAM wParam, - LPARAM lParam) -{ - switch (uiMsg) - { - /* Add blank case statements for these to ensure we don't use them - * by mistake. - */ - case DM_GETDEFID: break; - case DM_SETDEFID: break; - - case WM_CREATE: - return (OnTestDlgCreate (hwnd, - (LPCREATESTRUCTA) lParam) ? 0 : (LRESULT) -1); - case WM_COMMAND: - if(LOWORD(wParam) == 300) g_bReceivedCommand = TRUE; - } - - return DefDlgProcA (hwnd, uiMsg, wParam, lParam); -} - -static BOOL RegisterWindowClasses (void) -{ - WNDCLASSA cls; - - cls.style = 0; - cls.lpfnWndProc = DefWindowProcA; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = g_hinst; - cls.hIcon = NULL; - cls.hCursor = LoadCursorA (NULL, IDC_ARROW); - cls.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); - cls.lpszMenuName = NULL; - cls.lpszClassName = "GetNextDlgItemWindowClass"; - - if (!RegisterClassA (&cls)) return FALSE; - - cls.lpfnWndProc = main_window_procA; - cls.lpszClassName = "IsDialogMessageWindowClass"; - - if (!RegisterClassA (&cls)) return FALSE; - - GetClassInfoA(0, "#32770", &cls); - cls.lpfnWndProc = testDlgWinProc; - cls.lpszClassName = "WM_NEXTDLGCTLWndClass"; - if (!RegisterClassA (&cls)) return FALSE; - - return TRUE; -} - -static void test_WM_NEXTDLGCTL(void) -{ - HWND child1, child2, child3; - MSG msg; - DWORD dwVal; - - g_hwndTestDlg = CreateWindowEx( WS_EX_LEFT | WS_EX_LTRREADING | WS_EX_RIGHTSCROLLBAR - | WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE | WS_EX_CONTROLPARENT | WS_EX_APPWINDOW, - "WM_NEXTDLGCTLWndClass", - "WM_NEXTDLGCTL Message test window", - WS_POPUPWINDOW | WS_CLIPSIBLINGS | WS_DLGFRAME | WS_OVERLAPPED | - WS_MINIMIZEBOX | WS_MAXIMIZEBOX | DS_3DLOOK | DS_SETFONT | DS_MODALFRAME, - 0, 0, 235, 135, - NULL, NULL, g_hinst, 0); - - assert (g_hwndTestDlg); - assert (g_hwndTestDlgBut1); - assert (g_hwndTestDlgBut2); - assert (g_hwndTestDlgEdit); - - /* - * Test message DM_SETDEFID - */ - - DefDlgProcA( g_hwndTestDlg, DM_SETDEFID, IDCANCEL, 0 ); - DefDlgProcA( g_hwndTestDlgBut1, BM_SETSTYLE, BS_DEFPUSHBUTTON, FALSE ); - dwVal = DefDlgProcA(g_hwndTestDlg, DM_GETDEFID, 0, 0); - - ok ( IDCANCEL == (LOWORD(dwVal)), "Did not set default ID\n" ); - - /* - * Check whether message WM_NEXTDLGCTL is changing the focus to next control and if - * the destination control is a button, style of the button should be changed to - * BS_DEFPUSHBUTTON with out making it default. - */ - - /* - * Keep the focus on Edit control. - */ - - if ( SetFocus( g_hwndTestDlgEdit ) ) - { - ok ((GetFocus() == g_hwndTestDlgEdit), "Focus didn't set on Edit control\n"); - - /* - * Test message WM_NEXTDLGCTL - */ - DefDlgProcA( g_hwndTestDlg, WM_NEXTDLGCTL, 0, 0 ); - ok ((GetFocus() == g_hwndTestDlgBut1), "Focus didn't move to first button\n"); - - /* - * Check whether the default button ID got changed by sending message "WM_NEXTDLGCTL" - */ - dwVal = DefDlgProcA(g_hwndTestDlg, DM_GETDEFID, 0, 0); - ok ( IDCANCEL == (LOWORD(dwVal)), "WM_NEXTDLGCTL changed default button\n"); - - /* - * Check whether the style of the button which got the focus, changed to BS_DEFPUSHBUTTON and - * the style of default button changed to BS_PUSHBUTTON. - */ - if ( IDCANCEL == (LOWORD(dwVal)) ) - { - ok ( ((GetWindowLong( g_hwndTestDlgBut1, GWL_STYLE)) & BS_DEFPUSHBUTTON), - "Button1 style not set to BS_DEFPUSHBUTTON\n" ); - - ok ( !((GetWindowLong( g_hwndTestDlgBut2, GWL_STYLE)) & BS_DEFPUSHBUTTON), - "Button2's style not changed to BS_PUSHBUTTON\n" ); - } - - /* - * Move focus to Button2 using "WM_NEXTDLGCTL" - */ - DefDlgProcA( g_hwndTestDlg, WM_NEXTDLGCTL, 0, 0 ); - ok ((GetFocus() == g_hwndTestDlgBut2), "Focus didn't move to second button\n"); - - /* - * Check whether the default button ID got changed by sending message "WM_NEXTDLGCTL" - */ - dwVal = DefDlgProcA(g_hwndTestDlg, DM_GETDEFID, 0, 0); - ok ( IDCANCEL == (LOWORD(dwVal)), "WM_NEXTDLGCTL changed default button\n"); - - /* - * Check whether the style of the button which got the focus, changed to BS_DEFPUSHBUTTON and - * the style of button which lost the focus changed to BS_PUSHBUTTON. - */ - if ( IDCANCEL == (LOWORD(dwVal)) ) - { - ok ( ((GetWindowLong( g_hwndTestDlgBut2, GWL_STYLE)) & BS_DEFPUSHBUTTON), - "Button2 style not set to BS_DEFPUSHBUTTON\n" ); - - ok ( !((GetWindowLong( g_hwndTestDlgBut1, GWL_STYLE)) & BS_DEFPUSHBUTTON), - "Button1's style not changed to BS_PUSHBUTTON\n" ); - } - - /* - * Move focus to Edit control using "WM_NEXTDLGCTL" - */ - DefDlgProcA( g_hwndTestDlg, WM_NEXTDLGCTL, 0, 0 ); - ok ((GetFocus() == g_hwndTestDlgEdit), "Focus didn't move to Edit control\n"); - - /* - * Check whether the default button ID got changed by sending message "WM_NEXTDLGCTL" - */ - dwVal = DefDlgProcA(g_hwndTestDlg, DM_GETDEFID, 0, 0); - ok ( IDCANCEL == (LOWORD(dwVal)), "WM_NEXTDLGCTL changed default button\n"); - } - - /* test nested default buttons */ - - child1 = CreateWindowA("button", "child1", WS_VISIBLE|WS_CHILD, 0, 0, 50, 50, - g_hwndTestDlg, (HMENU)100, g_hinst, NULL); - ok(child1 != NULL, "failed to create first child\n"); - child2 = CreateWindowA("button", "child2", WS_VISIBLE|WS_CHILD, 60, 60, 30, 30, - g_hwndTestDlg, (HMENU)200, g_hinst, NULL); - ok(child2 != NULL, "failed to create second child\n"); - /* create nested child */ - child3 = CreateWindowA("button", "child3", WS_VISIBLE|WS_CHILD, 10, 10, 10, 10, - child1, (HMENU)300, g_hinst, NULL); - ok(child3 != NULL, "failed to create subchild\n"); - - DefDlgProcA( g_hwndTestDlg, DM_SETDEFID, 200, 0); - dwVal = DefDlgProcA( g_hwndTestDlg, DM_GETDEFID, 0, 0); - ok(LOWORD(dwVal) == 200, "expected 200, got %x\n", dwVal); - - DefDlgProcA( g_hwndTestDlg, DM_SETDEFID, 300, 0); - dwVal = DefDlgProcA( g_hwndTestDlg, DM_GETDEFID, 0, 0); - ok(LOWORD(dwVal) == 300, "expected 300, got %x\n", dwVal); - ok(SendMessageW( child3, WM_GETDLGCODE, 0, 0) != DLGC_DEFPUSHBUTTON, - "expected child3 not to be marked as DLGC_DEFPUSHBUTTON\n"); - - g_bReceivedCommand = FALSE; - FormEnterMsg (&msg, child3); - ok(IsDialogMessage (g_hwndTestDlg, &msg), "Did not handle the ENTER\n"); - ok(g_bReceivedCommand, "Did not trigger the default Button action\n"); - - DestroyWindow(child3); - DestroyWindow(child2); - DestroyWindow(child1); - DestroyWindow(g_hwndTestDlg); -} - -static void test_IsDialogMessage(void) -{ - MSG msg; - - g_hwndMain = CreateWindow ("IsDialogMessageWindowClass", "IsDialogMessageWindowClass", - WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - NULL, NULL, g_hinst, 0); - - assert (g_hwndMain); - assert (g_hwndButton1); - assert (g_hwndButtonCancel); - - /* The focus should initially be nowhere. The first TAB should take it - * to the first button. The second TAB should take it to the Cancel - * button. - */ - FormTabMsg (&msg, g_hwndMain); - ok (IsDialogMessage (g_hwndMain, &msg), "Did not handle first TAB\n"); - ok ((GetFocus() == g_hwndButton1), "Focus did not move to first button\n"); - FormTabMsg (&msg, g_hwndButton1); - ok (IsDialogMessage (g_hwndMain, &msg), "Did not handle second TAB\n"); - ok ((GetFocus() == g_hwndButtonCancel), - "Focus did not move to cancel button\n"); - FormEnterMsg (&msg, g_hwndButtonCancel); - ok (IsDialogMessage (g_hwndMain, &msg), "Did not handle the ENTER\n"); - ok (g_terminated, "ENTER did not terminate\n"); -} - - -static INT_PTR CALLBACK delayFocusDlgWinProc (HWND hDlg, UINT uiMsg, WPARAM wParam, - LPARAM lParam) -{ - switch (uiMsg) - { - case WM_INITDIALOG: - g_hwndMain = hDlg; - g_hwndInitialFocusGroupBox = GetDlgItem(hDlg,100); - g_hwndButton1 = GetDlgItem(hDlg,200); - g_hwndButton2 = GetDlgItem(hDlg,201); - g_hwndButtonCancel = GetDlgItem(hDlg,IDCANCEL); - g_styleInitialFocusT1 = GetWindowLong(g_hwndInitialFocusGroupBox, GWL_STYLE); - - /* Initially check the second radio button */ - SendMessage(g_hwndButton1, BM_SETCHECK, BST_UNCHECKED, 0); - SendMessage(g_hwndButton2, BM_SETCHECK, BST_CHECKED , 0); - /* Continue testing after dialog initialization */ - PostMessage(hDlg, WM_USER, 0, 0); - return g_bInitialFocusInitDlgResult; - - case WM_COMMAND: - if (LOWORD(wParam) == IDCANCEL) - { - EndDialog(hDlg, LOWORD(wParam)); - return TRUE; - } - return FALSE; - - case WM_USER: - g_styleInitialFocusT2 = GetWindowLong(hDlg, GWL_STYLE); - g_hwndInitialFocusT1 = GetFocus(); - SetFocus(hDlg); - g_hwndInitialFocusT2 = GetFocus(); - PostMessage(hDlg, WM_COMMAND, IDCANCEL, 0); - return TRUE; - } - - return FALSE; -} - -static INT_PTR CALLBACK focusDlgWinProc (HWND hDlg, UINT uiMsg, WPARAM wParam, - LPARAM lParam) -{ - switch (uiMsg) - { - case WM_INITDIALOG: - return TRUE; - - case WM_COMMAND: - if (LOWORD(wParam) == 200) - { - if (HIWORD(wParam) == EN_SETFOCUS) - g_hwndInitialFocusT1 = (HWND)lParam; - } - return FALSE; - } - - return FALSE; -} - -/* Helper for InitialFocusTest */ -static const char * GetHwndString(HWND hw) -{ - if (hw == NULL) - return "a null handle"; - if (hw == g_hwndMain) - return "the dialog handle"; - if (hw == g_hwndInitialFocusGroupBox) - return "the group box control"; - if (hw == g_hwndButton1) - return "the first button"; - if (hw == g_hwndButton2) - return "the second button"; - if (hw == g_hwndButtonCancel) - return "the cancel button"; - - return "unknown handle"; -} - -static void test_initial_focus(void) -{ - /* Test 1: - * This test intentionally returns FALSE in response to WM_INITDIALOG - * without setting focus to a control. This is not allowed according to - * MSDN, but it is exactly what MFC's CFormView does. - * - * Since the WM_INITDIALOG handler returns FALSE without setting the focus, - * the focus should initially be NULL. Later, when we manually set focus to - * the dialog, the default handler should set focus to the first control that - * is "visible, not disabled, and has the WS_TABSTOP style" (MSDN). Because the - * second radio button has been checked, it should be the first control - * that meets these criteria and should receive the focus. - */ - - g_bInitialFocusInitDlgResult = FALSE; - g_hwndInitialFocusT1 = (HWND) -1; - g_hwndInitialFocusT2 = (HWND) -1; - g_styleInitialFocusT1 = -1; - g_styleInitialFocusT2 = -1; - - DialogBoxA(g_hinst, "RADIO_TEST_DIALOG", NULL, delayFocusDlgWinProc); - - ok (((g_styleInitialFocusT1 & WS_TABSTOP) == 0), - "Error in wrc - Detected WS_TABSTOP as default style for GROUPBOX\n"); - - ok (((g_styleInitialFocusT2 & WS_VISIBLE) == 0), - "Modal dialogs should not be shown until the message queue first goes empty\n"); - - ok ((g_hwndInitialFocusT1 == NULL), - "Error in initial focus when WM_INITDIALOG returned FALSE: " - "Expected NULL focus, got %s (%p).\n", - GetHwndString(g_hwndInitialFocusT1), g_hwndInitialFocusT1); - - ok ((g_hwndInitialFocusT2 == g_hwndButton2), - "Error after first SetFocus() when WM_INITDIALOG returned FALSE: " - "Expected the second button (%p), got %s (%p).\n", - g_hwndButton2, GetHwndString(g_hwndInitialFocusT2), - g_hwndInitialFocusT2); - - /* Test 2: - * This is the same as above, except WM_INITDIALOG is made to return TRUE. - * This should cause the focus to go to the second radio button right away - * and stay there (until the user indicates otherwise). - */ - - g_bInitialFocusInitDlgResult = TRUE; - g_hwndInitialFocusT1 = (HWND) -1; - g_hwndInitialFocusT2 = (HWND) -1; - g_styleInitialFocusT1 = -1; - g_styleInitialFocusT2 = -1; - - DialogBoxA(g_hinst, "RADIO_TEST_DIALOG", NULL, delayFocusDlgWinProc); - - ok ((g_hwndInitialFocusT1 == g_hwndButton2), - "Error in initial focus when WM_INITDIALOG returned TRUE: " - "Expected the second button (%p), got %s (%p).\n", - g_hwndButton2, GetHwndString(g_hwndInitialFocusT1), - g_hwndInitialFocusT1); - - ok ((g_hwndInitialFocusT2 == g_hwndButton2), - "Error after first SetFocus() when WM_INITDIALOG returned TRUE: " - "Expected the second button (%p), got %s (%p).\n", - g_hwndButton2, GetHwndString(g_hwndInitialFocusT2), - g_hwndInitialFocusT2); - - /* Test 3: - * If the dialog has DS_CONTROL and it's not visible then we shouldn't change focus */ - { - HWND hDlg; - HRSRC hResource; - HANDLE hTemplate; - DLGTEMPLATE* pTemplate; - - hResource = FindResourceA(g_hinst,"FOCUS_TEST_DIALOG", RT_DIALOG); - hTemplate = LoadResource(g_hinst, hResource); - pTemplate = LockResource(hTemplate); - - g_hwndInitialFocusT1 = 0; - hDlg = CreateDialogIndirectParamA(g_hinst, pTemplate, NULL, focusDlgWinProc, 0); - ok (hDlg != 0, "Failed to create test dialog.\n"); - - ok ((g_hwndInitialFocusT1 == 0), - "Focus should not be set for an invisible DS_CONTROL dialog %p.\n", g_hwndInitialFocusT1); - - DestroyWindow(hDlg); - } -} - -static void test_GetDlgItemText(void) -{ - char string[64]; - BOOL ret; - - strcpy(string, "Overwrite Me"); - ret = GetDlgItemTextA(NULL, 0, string, sizeof(string)/sizeof(string[0])); - ok(!ret, "GetDlgItemText(NULL) shouldn't have succeeded\n"); - - ok(string[0] == '\0' || broken(!strcmp(string, "Overwrite Me")), - "string retrieved using GetDlgItemText should have been NULL terminated\n"); -} - -static void test_GetDlgItem(void) -{ - HWND hwnd, child1, child2, hwnd2; - BOOL ret; - - hwnd = CreateWindowA("button", "parent", WS_VISIBLE, 0, 0, 100, 100, NULL, 0, g_hinst, NULL); - ok(hwnd != NULL, "failed to created window\n"); - - /* created with the same ID */ - child1 = CreateWindowA("button", "child1", WS_VISIBLE|WS_CHILD, 0, 0, 10, 10, hwnd, 0, g_hinst, NULL); - ok(child1 != NULL, "failed to create first child\n"); - child2 = CreateWindowA("button", "child2", WS_VISIBLE|WS_CHILD, 0, 0, 10, 10, hwnd, 0, g_hinst, NULL); - ok(child2 != NULL, "failed to create second child\n"); - - hwnd2 = GetDlgItem(hwnd, 0); - ok(hwnd2 == child1, "expected first child, got %p\n", hwnd2); - - hwnd2 = GetTopWindow(hwnd); - ok(hwnd2 == child1, "expected first child to be top, got %p\n", hwnd2); - - ret = SetWindowPos(child1, child2, 0, 0, 0, 0, SWP_NOMOVE); - ok(ret, "got %d\n", ret); - hwnd2 = GetTopWindow(hwnd); - ok(hwnd2 == child2, "expected second child to be top, got %p\n", hwnd2); - - /* top window from child list is picked */ - hwnd2 = GetDlgItem(hwnd, 0); - ok(hwnd2 == child2, "expected second child, got %p\n", hwnd2); - - /* Now test how GetDlgItem searches */ - DestroyWindow(child2); - child2 = CreateWindowA("button", "child2", WS_VISIBLE|WS_CHILD, 0, 0, 10, 10, child1, 0, g_hinst, NULL); - ok(child2 != NULL, "failed to create second child\n"); - - /* give child2 an ID */ - SetWindowLong(child2, GWLP_ID, 100); - - hwnd2 = GetDlgItem(hwnd, 100); - ok(!hwnd2, "expected child to not be found, got %p\n", hwnd2); - - /* make the ID of child2 public with a WS_EX_CONTROLPARENT parent */ - SetWindowLong(child1, GWL_EXSTYLE, WS_EX_CONTROLPARENT); - - hwnd2 = GetDlgItem(hwnd, 100); - ok(!hwnd2, "expected child to not be found, got %p\n", hwnd2); - - DestroyWindow(child1); - DestroyWindow(child2); - DestroyWindow(hwnd); -} - -static INT_PTR CALLBACK DestroyDlgWinProc (HWND hDlg, UINT uiMsg, - WPARAM wParam, LPARAM lParam) -{ - if (uiMsg == WM_INITDIALOG) - { - DestroyWindow(hDlg); - return TRUE; - } - return FALSE; -} - -static INT_PTR CALLBACK DestroyOnCloseDlgWinProc (HWND hDlg, UINT uiMsg, - WPARAM wParam, LPARAM lParam) -{ - switch (uiMsg) - { - case WM_INITDIALOG: - PostMessage(hDlg, WM_CLOSE, 0, 0); - return TRUE; - case WM_CLOSE: - DestroyWindow(hDlg); - return TRUE; - case WM_DESTROY: - PostQuitMessage(0); - return TRUE; - } - return FALSE; -} - -static INT_PTR CALLBACK TestInitDialogHandleProc (HWND hDlg, UINT uiMsg, - WPARAM wParam, LPARAM lParam) -{ - if (uiMsg == WM_INITDIALOG) - { - HWND expected = GetNextDlgTabItem(hDlg, NULL, FALSE); - ok(expected == (HWND)wParam, - "Expected wParam to be the handle to the first tabstop control (%p), got %p\n", - expected, (HWND)wParam); - - EndDialog(hDlg, LOWORD(SendMessage(hDlg, DM_GETDEFID, 0, 0))); - return TRUE; - } - return FALSE; -} - -static INT_PTR CALLBACK TestDefButtonDlgProc (HWND hDlg, UINT uiMsg, - WPARAM wParam, LPARAM lParam) -{ - switch (uiMsg) - { - case WM_INITDIALOG: - EndDialog(hDlg, LOWORD(SendMessage(hDlg, DM_GETDEFID, 0, 0))); - return TRUE; - } - return FALSE; -} - -static INT_PTR CALLBACK TestReturnKeyDlgProc (HWND hDlg, UINT uiMsg, - WPARAM wParam, LPARAM lParam) -{ - static int received_idok = 0; - switch (uiMsg) - { - case WM_INITDIALOG: - { - MSG msg = {hDlg, WM_KEYDOWN, VK_RETURN, 0x011c0001}; - IsDialogMessage(hDlg, &msg); - } - ok(received_idok, "WM_COMMAND not received\n"); - EndDialog(hDlg, 0); - return TRUE; - case WM_COMMAND: - ok(wParam==IDOK, "Expected IDOK\n"); - received_idok = 1; - return TRUE; - } - return FALSE; -} - -static void test_DialogBoxParamA(void) -{ - INT_PTR ret; - HWND hwnd_invalid = (HWND)0x4444; - - SetLastError(0xdeadbeef); - ret = DialogBoxParamA(GetModuleHandle(NULL), "IDD_DIALOG" , hwnd_invalid, 0 , 0); - ok(0 == ret || broken(ret == -1), "DialogBoxParamA returned %ld, expected 0\n", ret); - ok(ERROR_INVALID_WINDOW_HANDLE == GetLastError() || - broken(GetLastError() == 0xdeadbeef), - "got %d, expected ERROR_INVALID_WINDOW_HANDLE\n",GetLastError()); - - /* Test a dialog which destroys itself on WM_INITDIALOG. */ - SetLastError(0xdeadbeef); - ret = DialogBoxParamA(GetModuleHandle(NULL), "IDD_DIALOG", 0, DestroyDlgWinProc, 0); - ok(-1 == ret, "DialogBoxParamA returned %ld, expected -1\n", ret); - ok(ERROR_INVALID_WINDOW_HANDLE == GetLastError() || - GetLastError() == ERROR_SUCCESS || - broken(GetLastError() == 0xdeadbeef), - "got %d, expected ERROR_INVALID_WINDOW_HANDLE\n",GetLastError()); - - /* Test a dialog which destroys itself on WM_CLOSE. */ - ret = DialogBoxParamA(GetModuleHandle(NULL), "IDD_DIALOG", 0, DestroyOnCloseDlgWinProc, 0); - ok(0 == ret, "DialogBoxParamA returned %ld, expected 0\n", ret); - - SetLastError(0xdeadbeef); - ret = DialogBoxParamA(GetModuleHandle(NULL), "RESOURCE_INVALID" , 0, 0, 0); - ok(-1 == ret, "DialogBoxParamA returned %ld, expected -1\n", ret); - ok(ERROR_RESOURCE_NAME_NOT_FOUND == GetLastError() || - broken(GetLastError() == 0xdeadbeef), - "got %d, expected ERROR_RESOURCE_NAME_NOT_FOUND\n",GetLastError()); - - SetLastError(0xdeadbeef); - ret = DefDlgProcA(0, WM_ERASEBKGND, 0, 0); - ok(ret == 0, "DefDlgProcA returned %ld, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE || - broken(GetLastError() == 0xdeadbeef), - "got %d, expected ERROR_INVALID_WINDOW_HANDLE\n", GetLastError()); - - ret = DialogBoxParamA(GetModuleHandle(NULL), "TEST_EMPTY_DIALOG", 0, TestInitDialogHandleProc, 0); - ok(ret == IDOK, "Expected IDOK\n"); - - ret = DialogBoxParamA(GetModuleHandle(NULL), "TEST_EMPTY_DIALOG", 0, TestDefButtonDlgProc, 0); - ok(ret == IDOK, "Expected IDOK\n"); - - DialogBoxParamA(GetModuleHandle(NULL), "TEST_EMPTY_DIALOG", 0, TestReturnKeyDlgProc, 0); -} - -static void test_DisabledDialogTest(void) -{ - g_terminated = FALSE; - DialogBoxParam(g_hinst, "IDD_DIALOG", NULL, (DLGPROC)disabled_test_proc, 0); - ok(FALSE == g_terminated, "dialog with disabled ok button has been terminated\n"); -} - -static INT_PTR CALLBACK messageBoxFontDlgWinProc (HWND hDlg, UINT uiMsg, WPARAM wParam, - LPARAM lParam) -{ - return (uiMsg == WM_INITDIALOG); -} - -static void test_MessageBoxFontTest(void) -{ - /* This dialog template defines a dialog template which got 0x7fff as its - * font size and omits the other font members. On WinNT, passing such a - * dialog template to CreateDialogIndirectParamW will result in a dialog - * being created which uses the message box font. We test that here. - */ - - static unsigned char dlgTemplate[] = - { - /* Dialog header */ - 0x01,0x00, /* Version */ - 0xff,0xff, /* Extended template marker */ - 0x00,0x00,0x00,0x00, /* Context Help ID */ - 0x00,0x00,0x00,0x00, /* Extended style */ - 0xc0,0x00,0xc8,0x80, /* Style (WS_SYSMENU|WS_CAPTION|WS_POPUP|DS_SETFONT|DS_MODALFRAME) */ - 0x01,0x00, /* Control count */ - 0x00,0x00, /* X */ - 0x00,0x00, /* Y */ - 0x80,0x00, /* Width */ - 0x80,0x00, /* Height */ - 0x00,0x00, /* Menu name */ - 0x00,0x00, /* Class name */ - 'T',0x00,'e',0x00, /* Caption (unicode) */ - 's',0x00,'t',0x00, - 0x00,0x00, - 0xff,0x7f, /* Font height (0x7fff = message box font) */ - - /* Control #1 */ - 0x00,0x00, /* Align to DWORD (header is 42 bytes) */ - 0x00,0x00,0x00,0x00, /* Context Help ID */ - 0x00,0x00,0x00,0x00, /* Extended style */ - 0x00,0x00,0x00,0x50, /* Style (WS_CHILD|WS_VISIBLE) */ - 0x00,0x00, /* X */ - 0x00,0x00, /* Y */ - 0x80,0x00, /* Width */ - 0x80,0x00, /* Height */ - 0x00,0x01,0x00,0x00, /* Control ID (256) */ - 0xff,0xff,0x82,0x00, /* Class (Static) */ - 'W',0x00,'I',0x00, /* Caption (unicode) */ - 'N',0x00,'E',0x00, - ' ',0x00,'d',0x00, - 'i',0x00,'a',0x00, - 'l',0x00,'o',0x00, - 'g',0x00,' ',0x00, - 't',0x00,'e',0x00, - 's',0x00,'t',0x00, - '.',0x00,0x00,0x00, - 0x00,0x00, /* Size of extended data */ - - 0x00,0x00 /* Align to DWORD */ - }; - - HWND hDlg; - HFONT hFont; - LOGFONTW lfStaticFont; - NONCLIENTMETRICSW ncMetrics; - - /* Check if the dialog can be created from the template. On Win9x, this should fail - * because we are calling the W function which is not implemented, but that's what - * we want, because passing such a template to CreateDialogIndirectParamA would crash - * anyway. - */ - hDlg = CreateDialogIndirectParamW(g_hinst, (LPCDLGTEMPLATE)dlgTemplate, NULL, messageBoxFontDlgWinProc, 0); - if (!hDlg) - { - win_skip("dialog wasn't created\n"); - return; - } - - hFont = (HFONT) SendDlgItemMessageW(hDlg, 256, WM_GETFONT, 0, 0); - if (!hFont) - { - skip("dialog uses system font\n"); - DestroyWindow(hDlg); - return; - } - GetObjectW(hFont, sizeof(LOGFONTW), &lfStaticFont); - - ncMetrics.cbSize = sizeof(NONCLIENTMETRICSW); - SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, 0, &ncMetrics, 0); - ok( !memcmp(&lfStaticFont, &ncMetrics.lfMessageFont, FIELD_OFFSET(LOGFONTW, lfFaceName)) && - !lstrcmpW(lfStaticFont.lfFaceName, ncMetrics.lfMessageFont.lfFaceName), - "dialog doesn't use message box font\n"); - DestroyWindow(hDlg); -} - -static void test_SaveRestoreFocus(void) -{ - HWND hDlg; - HRSRC hResource; - HANDLE hTemplate; - DLGTEMPLATE* pTemplate; - LONG_PTR foundId; - HWND foundHwnd; - - /* create the dialog */ - hResource = FindResourceA(g_hinst, "MULTI_EDIT_DIALOG", RT_DIALOG); - hTemplate = LoadResource(g_hinst, hResource); - pTemplate = LockResource(hTemplate); - - hDlg = CreateDialogIndirectParamA(g_hinst, pTemplate, NULL, messageBoxFontDlgWinProc, 0); - ok (hDlg != 0, "Failed to create test dialog.\n"); - - foundId = GetWindowLongPtr(GetFocus(), GWLP_ID); - ok (foundId == 1000, "First edit box should have gained focus on dialog creation. Expected: %d, Found: %ld\n", 1000, foundId); - - /* de- then reactivate the dialog */ - SendMessage(hDlg, WM_ACTIVATE, MAKEWPARAM(WA_INACTIVE, 0), 0); - SendMessage(hDlg, WM_ACTIVATE, MAKEWPARAM(WA_ACTIVE, 0), 0); - - foundId = GetWindowLongPtr(GetFocus(), GWLP_ID); - ok (foundId == 1000, "First edit box should have regained focus after dialog reactivation. Expected: %d, Found: %ld\n", 1000, foundId); - - /* select the next tabbable item */ - SetFocus(GetNextDlgTabItem(hDlg, GetFocus(), FALSE)); - - foundId = GetWindowLongPtr(GetFocus(), GWLP_ID); - ok (foundId == 1001, "Second edit box should have gained focus. Expected: %d, Found: %ld\n", 1001, foundId); - - /* de- then reactivate the dialog */ - SendMessage(hDlg, WM_ACTIVATE, MAKEWPARAM(WA_INACTIVE, 0), 0); - SendMessage(hDlg, WM_ACTIVATE, MAKEWPARAM(WA_ACTIVE, 0), 0); - - foundId = GetWindowLongPtr(GetFocus(), GWLP_ID); - ok (foundId == 1001, "Second edit box should have gained focus after dialog reactivation. Expected: %d, Found: %ld\n", 1001, foundId); - - /* disable the 2nd box */ - EnableWindow(GetFocus(), FALSE); - - foundHwnd = GetFocus(); - ok (foundHwnd == NULL, "Second edit box should have lost focus after being disabled. Expected: %p, Found: %p\n", NULL, foundHwnd); - - /* de- then reactivate the dialog */ - SendMessage(hDlg, WM_ACTIVATE, MAKEWPARAM(WA_INACTIVE, 0), 0); - SendMessage(hDlg, WM_ACTIVATE, MAKEWPARAM(WA_ACTIVE, 0), 0); - - foundHwnd = GetFocus(); - ok (foundHwnd == NULL, "No controls should have gained focus after dialog reactivation. Expected: %p, Found: %p\n", NULL, foundHwnd); - - /* clean up */ - DestroyWindow(hDlg); -} - -static INT_PTR CALLBACK timer_message_dlg_proc(HWND wnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - static int count; - BOOL visible; - - switch (msg) - { - case WM_INITDIALOG: - visible = GetWindowLong(wnd, GWL_STYLE) & WS_VISIBLE; - ok(!visible, "Dialog should not be visible.\n"); - SetTimer(wnd, 1, 100, NULL); - Sleep(200); - return FALSE; - - case WM_COMMAND: - if (LOWORD(wparam) != IDCANCEL) return FALSE; - EndDialog(wnd, LOWORD(wparam)); - return TRUE; - - case WM_TIMER: - if (wparam != 1) return FALSE; - visible = GetWindowLong(wnd, GWL_STYLE) & WS_VISIBLE; - if (!count++) - { - ok(!visible, "Dialog should not be visible.\n"); - PostMessage(wnd, WM_USER, 0, 0); - } - else - { - ok(visible, "Dialog should be visible.\n"); - PostMessage(wnd, WM_COMMAND, IDCANCEL, 0); - } - return TRUE; - - case WM_USER: - visible = GetWindowLong(wnd, GWL_STYLE) & WS_VISIBLE; - ok(visible, "Dialog should be visible.\n"); - return TRUE; - - default: - return FALSE; - } -} - -static void test_timer_message(void) -{ - DialogBoxA(g_hinst, "RADIO_TEST_DIALOG", NULL, timer_message_dlg_proc); -} - -START_TEST(dialog) -{ - g_hinst = GetModuleHandleA (0); - - if (!RegisterWindowClasses()) assert(0); - - test_GetNextDlgItem(); - test_IsDialogMessage(); - test_WM_NEXTDLGCTL(); - test_initial_focus(); - test_GetDlgItem(); - test_GetDlgItemText(); - test_DialogBoxParamA(); - test_DisabledDialogTest(); - test_MessageBoxFontTest(); - test_SaveRestoreFocus(); - test_timer_message(); -} diff --git a/rostests/winetests/user32/edit.c b/rostests/winetests/user32/edit.c deleted file mode 100755 index c1ca3a3ddab..00000000000 --- a/rostests/winetests/user32/edit.c +++ /dev/null @@ -1,2524 +0,0 @@ -/* Unit test suite for edit control. - * - * Copyright 2004 Vitaliy Margolen - * Copyright 2005 C. Scott Ananian - * - * 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 "wine/test.h" - -#ifndef ES_COMBO -#define ES_COMBO 0x200 -#endif - -#define ID_EDITTESTDBUTTON 0x123 -#define ID_EDITTEST2 99 -#define MAXLEN 200 - -struct edit_notify { - int en_change, en_maxtext, en_update; -}; - -static struct edit_notify notifications; - -static BOOL (WINAPI *pEndMenu) (void); - -static void init_function_pointers(void) -{ - HMODULE hdll = GetModuleHandleA("user32"); - - pEndMenu = (void*)GetProcAddress(hdll, "EndMenu"); -} - -static INT_PTR CALLBACK multi_edit_dialog_proc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) -{ - static int num_ok_commands = 0; - switch (msg) - { - case WM_INITDIALOG: - { - HWND hedit = GetDlgItem(hdlg, 1000); - SetFocus(hedit); - switch (lparam) - { - /* test cases related to bug 12319 */ - case 0: - PostMessage(hedit, WM_KEYDOWN, VK_TAB, 0xf0001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 0); - break; - case 1: - PostMessage(hedit, WM_CHAR, VK_TAB, 0xf0001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 0); - break; - case 2: - PostMessage(hedit, WM_KEYDOWN, VK_TAB, 0xf0001); - PostMessage(hedit, WM_CHAR, VK_TAB, 0xf0001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 0); - break; - - /* test cases for pressing enter */ - case 3: - num_ok_commands = 0; - PostMessage(hedit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 1); - break; - - default: - break; - } - break; - } - - case WM_COMMAND: - if (HIWORD(wparam) != BN_CLICKED) - break; - - switch (LOWORD(wparam)) - { - case IDOK: - num_ok_commands++; - break; - - default: - break; - } - break; - - case WM_USER: - { - HWND hfocus = GetFocus(); - HWND hedit = GetDlgItem(hdlg, 1000); - HWND hedit2 = GetDlgItem(hdlg, 1001); - HWND hedit3 = GetDlgItem(hdlg, 1002); - - if (wparam != 0xdeadbeef) - break; - - switch (lparam) - { - case 0: - if (hfocus == hedit) - EndDialog(hdlg, 1111); - else if (hfocus == hedit2) - EndDialog(hdlg, 2222); - else if (hfocus == hedit3) - EndDialog(hdlg, 3333); - else - EndDialog(hdlg, 4444); - break; - case 1: - if ((hfocus == hedit) && (num_ok_commands == 0)) - EndDialog(hdlg, 11); - else - EndDialog(hdlg, 22); - break; - default: - EndDialog(hdlg, 5555); - } - break; - } - - case WM_CLOSE: - EndDialog(hdlg, 333); - break; - - default: - break; - } - - return FALSE; -} - -static INT_PTR CALLBACK edit_dialog_proc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) -{ - switch (msg) - { - case WM_INITDIALOG: - { - HWND hedit = GetDlgItem(hdlg, 1000); - SetFocus(hedit); - switch (lparam) - { - /* from bug 11841 */ - case 0: - PostMessage(hedit, WM_KEYDOWN, VK_ESCAPE, 0x10001); - break; - case 1: - PostMessage(hedit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - break; - case 2: - PostMessage(hedit, WM_KEYDOWN, VK_TAB, 0xf0001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 1); - break; - - /* more test cases for WM_CHAR */ - case 3: - PostMessage(hedit, WM_CHAR, VK_ESCAPE, 0x10001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 0); - break; - case 4: - PostMessage(hedit, WM_CHAR, VK_RETURN, 0x1c0001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 0); - break; - case 5: - PostMessage(hedit, WM_CHAR, VK_TAB, 0xf0001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 0); - break; - - /* more test cases for WM_KEYDOWN + WM_CHAR */ - case 6: - PostMessage(hedit, WM_KEYDOWN, VK_ESCAPE, 0x10001); - PostMessage(hedit, WM_CHAR, VK_ESCAPE, 0x10001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 0); - break; - case 7: - PostMessage(hedit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - PostMessage(hedit, WM_CHAR, VK_RETURN, 0x1c0001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 1); - break; - case 8: - PostMessage(hedit, WM_KEYDOWN, VK_TAB, 0xf0001); - PostMessage(hedit, WM_CHAR, VK_TAB, 0xf0001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 1); - break; - - /* multiple tab tests */ - case 9: - PostMessage(hedit, WM_KEYDOWN, VK_TAB, 0xf0001); - PostMessage(hedit, WM_KEYDOWN, VK_TAB, 0xf0001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 2); - break; - case 10: - PostMessage(hedit, WM_KEYDOWN, VK_TAB, 0xf0001); - PostMessage(hedit, WM_KEYDOWN, VK_TAB, 0xf0001); - PostMessage(hedit, WM_KEYDOWN, VK_TAB, 0xf0001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 2); - break; - - default: - break; - } - break; - } - - case WM_COMMAND: - if (HIWORD(wparam) != BN_CLICKED) - break; - - switch (LOWORD(wparam)) - { - case IDOK: - EndDialog(hdlg, 111); - break; - - case IDCANCEL: - EndDialog(hdlg, 222); - break; - - default: - break; - } - break; - - case WM_USER: - { - int len; - HWND hok = GetDlgItem(hdlg, IDOK); - HWND hcancel = GetDlgItem(hdlg, IDCANCEL); - HWND hedit = GetDlgItem(hdlg, 1000); - HWND hfocus = GetFocus(); - - if (wparam != 0xdeadbeef) - break; - - switch (lparam) - { - case 0: - len = SendMessage(hedit, WM_GETTEXTLENGTH, 0, 0); - if (len == 0) - EndDialog(hdlg, 444); - else - EndDialog(hdlg, 555); - break; - - case 1: - len = SendMessage(hedit, WM_GETTEXTLENGTH, 0, 0); - if ((hfocus == hok) && len == 0) - EndDialog(hdlg, 444); - else - EndDialog(hdlg, 555); - break; - - case 2: - if (hfocus == hok) - EndDialog(hdlg, 11); - else if (hfocus == hcancel) - EndDialog(hdlg, 22); - else if (hfocus == hedit) - EndDialog(hdlg, 33); - else - EndDialog(hdlg, 44); - break; - - default: - EndDialog(hdlg, 555); - } - break; - } - - case WM_CLOSE: - EndDialog(hdlg, 333); - break; - - default: - break; - } - - return FALSE; -} - -static INT_PTR CALLBACK edit_singleline_dialog_proc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) -{ - switch (msg) - { - case WM_INITDIALOG: - { - HWND hedit = GetDlgItem(hdlg, 1000); - SetFocus(hedit); - switch (lparam) - { - /* test cases for WM_KEYDOWN */ - case 0: - PostMessage(hedit, WM_KEYDOWN, VK_ESCAPE, 0x10001); - break; - case 1: - PostMessage(hedit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - break; - case 2: - PostMessage(hedit, WM_KEYDOWN, VK_TAB, 0xf0001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 1); - break; - - /* test cases for WM_CHAR */ - case 3: - PostMessage(hedit, WM_CHAR, VK_ESCAPE, 0x10001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 0); - break; - case 4: - PostMessage(hedit, WM_CHAR, VK_RETURN, 0x1c0001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 0); - break; - case 5: - PostMessage(hedit, WM_CHAR, VK_TAB, 0xf0001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 0); - break; - - /* test cases for WM_KEYDOWN + WM_CHAR */ - case 6: - PostMessage(hedit, WM_KEYDOWN, VK_ESCAPE, 0x10001); - PostMessage(hedit, WM_CHAR, VK_ESCAPE, 0x10001); - break; - case 7: - PostMessage(hedit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - PostMessage(hedit, WM_CHAR, VK_RETURN, 0x1c0001); - break; - case 8: - PostMessage(hedit, WM_KEYDOWN, VK_TAB, 0xf0001); - PostMessage(hedit, WM_CHAR, VK_TAB, 0xf0001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 1); - break; - - default: - break; - } - break; - } - - case WM_COMMAND: - if (HIWORD(wparam) != BN_CLICKED) - break; - - switch (LOWORD(wparam)) - { - case IDOK: - EndDialog(hdlg, 111); - break; - - case IDCANCEL: - EndDialog(hdlg, 222); - break; - - default: - break; - } - break; - - case WM_USER: - { - HWND hok = GetDlgItem(hdlg, IDOK); - HWND hedit = GetDlgItem(hdlg, 1000); - HWND hfocus = GetFocus(); - int len = SendMessage(hedit, WM_GETTEXTLENGTH, 0, 0); - - if (wparam != 0xdeadbeef) - break; - - switch (lparam) - { - case 0: - if ((hfocus == hedit) && len == 0) - EndDialog(hdlg, 444); - else - EndDialog(hdlg, 555); - break; - - case 1: - if ((hfocus == hok) && len == 0) - EndDialog(hdlg, 444); - else - EndDialog(hdlg, 555); - break; - - default: - EndDialog(hdlg, 55); - } - break; - } - - case WM_CLOSE: - EndDialog(hdlg, 333); - break; - - default: - break; - } - - return FALSE; -} - -static INT_PTR CALLBACK edit_wantreturn_dialog_proc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) -{ - switch (msg) - { - case WM_INITDIALOG: - { - HWND hedit = GetDlgItem(hdlg, 1000); - SetFocus(hedit); - switch (lparam) - { - /* test cases for WM_KEYDOWN */ - case 0: - PostMessage(hedit, WM_KEYDOWN, VK_ESCAPE, 0x10001); - break; - case 1: - PostMessage(hedit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 0); - break; - case 2: - PostMessage(hedit, WM_KEYDOWN, VK_TAB, 0xf0001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 1); - break; - - /* test cases for WM_CHAR */ - case 3: - PostMessage(hedit, WM_CHAR, VK_ESCAPE, 0x10001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 0); - break; - case 4: - PostMessage(hedit, WM_CHAR, VK_RETURN, 0x1c0001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 2); - break; - case 5: - PostMessage(hedit, WM_CHAR, VK_TAB, 0xf0001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 0); - break; - - /* test cases for WM_KEYDOWN + WM_CHAR */ - case 6: - PostMessage(hedit, WM_KEYDOWN, VK_ESCAPE, 0x10001); - PostMessage(hedit, WM_CHAR, VK_ESCAPE, 0x10001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 0); - break; - case 7: - PostMessage(hedit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - PostMessage(hedit, WM_CHAR, VK_RETURN, 0x1c0001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 2); - break; - case 8: - PostMessage(hedit, WM_KEYDOWN, VK_TAB, 0xf0001); - PostMessage(hedit, WM_CHAR, VK_TAB, 0xf0001); - PostMessage(hdlg, WM_USER, 0xdeadbeef, 1); - break; - - default: - break; - } - break; - } - - case WM_COMMAND: - if (HIWORD(wparam) != BN_CLICKED) - break; - - switch (LOWORD(wparam)) - { - case IDOK: - EndDialog(hdlg, 111); - break; - - case IDCANCEL: - EndDialog(hdlg, 222); - break; - - default: - break; - } - break; - - case WM_USER: - { - HWND hok = GetDlgItem(hdlg, IDOK); - HWND hedit = GetDlgItem(hdlg, 1000); - HWND hfocus = GetFocus(); - int len = SendMessage(hedit, WM_GETTEXTLENGTH, 0, 0); - - if (wparam != 0xdeadbeef) - break; - - switch (lparam) - { - case 0: - if ((hfocus == hedit) && len == 0) - EndDialog(hdlg, 444); - else - EndDialog(hdlg, 555); - break; - - case 1: - if ((hfocus == hok) && len == 0) - EndDialog(hdlg, 444); - else - EndDialog(hdlg, 555); - break; - - case 2: - if ((hfocus == hedit) && len == 2) - EndDialog(hdlg, 444); - else - EndDialog(hdlg, 555); - break; - - default: - EndDialog(hdlg, 55); - } - break; - } - - case WM_CLOSE: - EndDialog(hdlg, 333); - break; - - default: - break; - } - - return FALSE; -} - -static HINSTANCE hinst; -static HWND hwndET2; -static const char szEditTest2Class[] = "EditTest2Class"; -static const char szEditTest3Class[] = "EditTest3Class"; -static const char szEditTest4Class[] = "EditTest4Class"; -static const char szEditTextPositionClass[] = "EditTextPositionWindowClass"; - -static HWND create_editcontrol (DWORD style, DWORD exstyle) -{ - HWND handle; - - handle = CreateWindowEx(exstyle, - "EDIT", - "Test Text", - style, - 10, 10, 300, 300, - NULL, NULL, hinst, NULL); - ok (handle != NULL, "CreateWindow EDIT Control failed\n"); - assert (handle); - if (winetest_interactive) - ShowWindow (handle, SW_SHOW); - return handle; -} - -static HWND create_child_editcontrol (DWORD style, DWORD exstyle) -{ - HWND parentWnd; - HWND editWnd; - RECT rect; - BOOL b; - - rect.left = 0; - rect.top = 0; - rect.right = 300; - rect.bottom = 300; - b = AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, FALSE); - ok(b, "AdjustWindowRect failed\n"); - - parentWnd = CreateWindowEx(0, - szEditTextPositionClass, - "Edit Test", - WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, - rect.right - rect.left, rect.bottom - rect.top, - NULL, NULL, hinst, NULL); - ok (parentWnd != NULL, "CreateWindow EDIT Test failed\n"); - assert(parentWnd); - - editWnd = CreateWindowEx(exstyle, - "EDIT", - "Test Text", - WS_CHILD | style, - 0, 0, 300, 300, - parentWnd, NULL, hinst, NULL); - ok (editWnd != NULL, "CreateWindow EDIT Test Text failed\n"); - assert(editWnd); - if (winetest_interactive) - ShowWindow (parentWnd, SW_SHOW); - return editWnd; -} - -static void destroy_child_editcontrol (HWND hwndEdit) -{ - if (GetParent(hwndEdit)) - DestroyWindow(GetParent(hwndEdit)); - else { - trace("Edit control has no parent!\n"); - DestroyWindow(hwndEdit); - } -} - -static LONG get_edit_style (HWND hwnd) -{ - return GetWindowLongA( hwnd, GWL_STYLE ) & ( - ES_LEFT | -/* FIXME: not implemented - ES_CENTER | - ES_RIGHT | - ES_OEMCONVERT | -*/ - ES_MULTILINE | - ES_UPPERCASE | - ES_LOWERCASE | - ES_PASSWORD | - ES_AUTOVSCROLL | - ES_AUTOHSCROLL | - ES_NOHIDESEL | - ES_COMBO | - ES_READONLY | - ES_WANTRETURN | - ES_NUMBER - ); -} - -static void set_client_height(HWND Wnd, unsigned Height) -{ - RECT ClientRect, WindowRect; - - GetWindowRect(Wnd, &WindowRect); - GetClientRect(Wnd, &ClientRect); - SetWindowPos(Wnd, NULL, 0, 0, - WindowRect.right - WindowRect.left, - Height + (WindowRect.bottom - WindowRect.top) - - (ClientRect.bottom - ClientRect.top), - SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER); - - /* Workaround for a bug in Windows' edit control - (multi-line mode) */ - GetWindowRect(Wnd, &WindowRect); - SetWindowPos(Wnd, NULL, 0, 0, - WindowRect.right - WindowRect.left + 1, - WindowRect.bottom - WindowRect.top + 1, - SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER); - SetWindowPos(Wnd, NULL, 0, 0, - WindowRect.right - WindowRect.left, - WindowRect.bottom - WindowRect.top, - SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER); - - GetClientRect(Wnd, &ClientRect); - ok(ClientRect.bottom - ClientRect.top == Height, - "The client height should be %d, but is %d\n", - Height, ClientRect.bottom - ClientRect.top); -} - -static void test_edit_control_1(void) -{ - HWND hwEdit; - MSG msMessage; - int i; - LONG r; - - msMessage.message = WM_KEYDOWN; - - trace("EDIT: Single line\n"); - hwEdit = create_editcontrol(ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); - r = get_edit_style(hwEdit); - ok(r == (ES_AUTOVSCROLL | ES_AUTOHSCROLL), "Wrong style expected 0xc0 got: 0x%x\n", r); - for (i=0;i<65535;i++) - { - msMessage.wParam = i; - r = SendMessage(hwEdit, WM_GETDLGCODE, 0, (LPARAM) &msMessage); - ok(r == (DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTARROWS), - "Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTARROWS got %x\n", r); - } - DestroyWindow (hwEdit); - - trace("EDIT: Single line want returns\n"); - hwEdit = create_editcontrol(ES_WANTRETURN | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); - r = get_edit_style(hwEdit); - ok(r == (ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN), "Wrong style expected 0x10c0 got: 0x%x\n", r); - for (i=0;i<65535;i++) - { - msMessage.wParam = i; - r = SendMessage(hwEdit, WM_GETDLGCODE, 0, (LPARAM) &msMessage); - ok(r == (DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTARROWS), - "Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTARROWS got %x\n", r); - } - DestroyWindow (hwEdit); - - trace("EDIT: Multiline line\n"); - hwEdit = create_editcontrol(ES_MULTILINE | WS_VSCROLL | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); - r = get_edit_style(hwEdit); - ok(r == (ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE), "Wrong style expected 0xc4 got: 0x%x\n", r); - for (i=0;i<65535;i++) - { - msMessage.wParam = i; - r = SendMessage(hwEdit, WM_GETDLGCODE, 0, (LPARAM) &msMessage); - ok(r == (DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTARROWS), - "Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTARROWS got %x\n", r); - } - DestroyWindow (hwEdit); - - trace("EDIT: Multi line want returns\n"); - hwEdit = create_editcontrol(ES_MULTILINE | WS_VSCROLL | ES_WANTRETURN | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); - r = get_edit_style(hwEdit); - ok(r == (ES_WANTRETURN | ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE), "Wrong style expected 0x10c4 got: 0x%x\n", r); - for (i=0;i<65535;i++) - { - msMessage.wParam = i; - r = SendMessage(hwEdit, WM_GETDLGCODE, 0, (LPARAM) &msMessage); - ok(r == (DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTARROWS), - "Expected DLGC_WANTCHARS | DLGC_HASSETSEL | DLGC_WANTALLKEYS | DLGC_WANTARROWS got %x\n", r); - } - DestroyWindow (hwEdit); -} - -/* WM_SETTEXT is implemented by selecting all text, and then replacing the - * selection. This test checks that the first 'select all' doesn't generate - * an UPDATE message which can escape and (via a handler) change the - * selection, which would cause WM_SETTEXT to break. This old bug - * was fixed 18-Mar-2005; we check here to ensure it doesn't regress. - */ -static void test_edit_control_2(void) -{ - HWND hwndMain, phwnd; - char szLocalString[MAXLEN]; - LONG r, w = 150, h = 50; - POINT cpos; - - /* Create main and edit windows. */ - hwndMain = CreateWindow(szEditTest2Class, "ET2", WS_OVERLAPPEDWINDOW, - 0, 0, 200, 200, NULL, NULL, hinst, NULL); - assert(hwndMain); - if (winetest_interactive) - ShowWindow (hwndMain, SW_SHOW); - - hwndET2 = CreateWindow("EDIT", NULL, - WS_CHILD|WS_BORDER|ES_LEFT|ES_AUTOHSCROLL, - 0, 0, w, h, /* important this not be 0 size. */ - hwndMain, (HMENU) ID_EDITTEST2, hinst, NULL); - assert(hwndET2); - if (winetest_interactive) - ShowWindow (hwndET2, SW_SHOW); - - trace("EDIT: SETTEXT atomicity\n"); - /* Send messages to "type" in the word 'foo'. */ - r = SendMessage(hwndET2, WM_CHAR, 'f', 1); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); - r = SendMessage(hwndET2, WM_CHAR, 'o', 1); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); - r = SendMessage(hwndET2, WM_CHAR, 'o', 1); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); - /* 'foo' should have been changed to 'bar' by the UPDATE handler. */ - GetWindowText(hwndET2, szLocalString, MAXLEN); - ok(lstrcmp(szLocalString, "bar")==0, - "Wrong contents of edit: %s\n", szLocalString); - - /* try setting the caret before it's visible */ - r = SetCaretPos(0, 0); - todo_wine ok(0 == r, "SetCaretPos succeeded unexpectedly, expected: 0, got: %d\n", r); - phwnd = SetFocus(hwndET2); - ok(phwnd != NULL, "SetFocus failed unexpectedly, expected non-zero, got NULL\n"); - r = SetCaretPos(0, 0); - ok(1 == r, "SetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); - r = GetCaretPos(&cpos); - ok(1 == r, "GetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); - ok(cpos.x == 0 && cpos.y == 0, "Wrong caret position, expected: (0,0), got: (%d,%d)\n", cpos.x, cpos.y); - r = SetCaretPos(-1, -1); - ok(1 == r, "SetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); - r = GetCaretPos(&cpos); - ok(1 == r, "GetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); - ok(cpos.x == -1 && cpos.y == -1, "Wrong caret position, expected: (-1,-1), got: (%d,%d)\n", cpos.x, cpos.y); - r = SetCaretPos(w << 1, h << 1); - ok(1 == r, "SetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); - r = GetCaretPos(&cpos); - ok(1 == r, "GetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); - ok(cpos.x == (w << 1) && cpos.y == (h << 1), "Wrong caret position, expected: (%d,%d), got: (%d,%d)\n", w << 1, h << 1, cpos.x, cpos.y); - r = SetCaretPos(w, h); - ok(1 == r, "SetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); - r = GetCaretPos(&cpos); - ok(1 == r, "GetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); - ok(cpos.x == w && cpos.y == h, "Wrong caret position, expected: (%d,%d), got: (%d,%d)\n", w, h, cpos.x, cpos.y); - r = SetCaretPos(w - 1, h - 1); - ok(1 == r, "SetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); - r = GetCaretPos(&cpos); - ok(1 == r, "GetCaretPos failed unexpectedly, expected: 1, got: %d\n", r); - ok(cpos.x == (w - 1) && cpos.y == (h - 1), "Wrong caret position, expected: (%d,%d), got: (%d,%d)\n", w - 1, h - 1, cpos.x, cpos.y); - - /* OK, done! */ - DestroyWindow (hwndET2); - DestroyWindow (hwndMain); -} - -static void ET2_check_change(void) { - char szLocalString[MAXLEN]; - /* This EN_UPDATE handler changes any 'foo' to 'bar'. */ - GetWindowText(hwndET2, szLocalString, MAXLEN); - if (lstrcmp(szLocalString, "foo")==0) { - lstrcpy(szLocalString, "bar"); - SendMessage(hwndET2, WM_SETTEXT, 0, (LPARAM) szLocalString); - } - /* always leave the cursor at the end. */ - SendMessage(hwndET2, EM_SETSEL, MAXLEN - 1, MAXLEN - 1); -} -static void ET2_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify) -{ - if (id==ID_EDITTEST2 && codeNotify == EN_UPDATE) - ET2_check_change(); -} -static LRESULT CALLBACK ET2_WndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) -{ - switch (iMsg) { - case WM_COMMAND: - ET2_OnCommand(hwnd, LOWORD(wParam), (HWND)lParam, HIWORD(wParam)); - break; - } - return DefWindowProc(hwnd, iMsg, wParam, lParam); -} - -static void zero_notify(void) -{ - notifications.en_change = 0; - notifications.en_maxtext = 0; - notifications.en_update = 0; -} - -#define test_notify(enchange, enmaxtext, enupdate) \ - ok(notifications.en_change == enchange, "expected %d EN_CHANGE notifications, " \ - "got %d\n", enchange, notifications.en_change); \ - ok(notifications.en_maxtext == enmaxtext, "expected %d EN_MAXTEXT notifications, " \ - "got %d\n", enmaxtext, notifications.en_maxtext); \ - ok(notifications.en_update == enupdate, "expected %d EN_UPDATE notifications, " \ - "got %d\n", enupdate, notifications.en_update) - - -static LRESULT CALLBACK edit3_wnd_procA(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch (msg) { - case WM_COMMAND: - switch (HIWORD(wParam)) { - case EN_MAXTEXT: - notifications.en_maxtext++; - break; - case EN_UPDATE: - notifications.en_update++; - break; - case EN_CHANGE: - notifications.en_change++; - break; - } - break; - } - return DefWindowProcA(hWnd, msg, wParam, lParam); -} - -/* Test behaviour of WM_SETTEXT, WM_REPLACESEL and notificatisons sent in response - * to these messages. - */ -static void test_edit_control_3(void) -{ - HWND hWnd; - HWND hParent; - HDC hDC; - int len, dpi; - static const char *str = "this is a long string."; - static const char *str2 = "this is a long string.\r\nthis is a long string.\r\nthis is a long string.\r\nthis is a long string."; - - hDC = GetDC(NULL); - dpi = GetDeviceCaps(hDC, LOGPIXELSY); - ReleaseDC(NULL, hDC); - - trace("EDIT: Test notifications\n"); - - hParent = CreateWindowExA(0, - szEditTest3Class, - NULL, - 0, - CW_USEDEFAULT, CW_USEDEFAULT, 10, 10, - NULL, NULL, NULL, NULL); - assert(hParent); - - trace("EDIT: Single line, no ES_AUTOHSCROLL\n"); - hWnd = CreateWindowExA(0, - "EDIT", - NULL, - 0, - 10, 10, 50, 50, - hParent, NULL, NULL, NULL); - assert(hWnd); - - zero_notify(); - SendMessageA(hWnd, EM_REPLACESEL, 0, (LPARAM)str); - len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(lstrlenA(str) > len, "text should have been truncated\n"); - test_notify(1, 1, 1); - - SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)""); - zero_notify(); - SendMessageA(hWnd, EM_REPLACESEL, 0, (LPARAM)"a"); - len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(1 == len, "wrong text length, expected 1, got %d\n", len); - test_notify(1, 0, 1); - - zero_notify(); - SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)str); - len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(lstrlenA(str) == len, "text shouldn't have been truncated\n"); - test_notify(1, 0, 1); - - len = SendMessageA(hWnd, EM_GETSEL, 0, 0); - ok(LOWORD(len)==0, "Unexpected start position for selection %d\n", LOWORD(len)); - ok(HIWORD(len)==0, "Unexpected end position for selection %d\n", HIWORD(len)); - SendMessage(hParent, WM_SETFOCUS, 0, (LPARAM)hWnd); - len = SendMessageA(hWnd, EM_GETSEL, 0, 0); - ok(LOWORD(len)==0, "Unexpected start position for selection %d\n", LOWORD(len)); - ok(HIWORD(len)==0, "Unexpected end position for selection %d\n", HIWORD(len)); - - SendMessageA(hWnd, EM_SETLIMITTEXT, 5, 0); - - SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)""); - zero_notify(); - SendMessageA(hWnd, EM_REPLACESEL, 0, (LPARAM)str); - len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(5 == len, "text should have been truncated to limit, expected 5, got %d\n", len); - test_notify(1, 1, 1); - - zero_notify(); - SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)str); - len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(lstrlenA(str) == len, "text shouldn't have been truncated\n"); - test_notify(1, 0, 1); - - DestroyWindow(hWnd); - - trace("EDIT: Single line, ES_AUTOHSCROLL\n"); - hWnd = CreateWindowExA(0, - "EDIT", - NULL, - ES_AUTOHSCROLL, - 10, 10, 50, 50, - hParent, NULL, NULL, NULL); - assert(hWnd); - - zero_notify(); - SendMessageA(hWnd, EM_REPLACESEL, 0, (LPARAM)str); - len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(lstrlenA(str) == len, "text shouldn't have been truncated\n"); - test_notify(1, 0, 1); - - zero_notify(); - SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)str); - len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(lstrlenA(str) == len, "text shouldn't have been truncated\n"); - test_notify(1, 0, 1); - - SendMessageA(hWnd, EM_SETLIMITTEXT, 5, 0); - - SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)""); - zero_notify(); - SendMessageA(hWnd, EM_REPLACESEL, 0, (LPARAM)str); - len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(5 == len, "text should have been truncated to limit, expected 5, got %d\n", len); - test_notify(1, 1, 1); - - zero_notify(); - SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)str); - len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(lstrlenA(str) == len, "text shouldn't have been truncated\n"); - test_notify(1, 0, 1); - - DestroyWindow(hWnd); - - trace("EDIT: Multline, no ES_AUTOHSCROLL, no ES_AUTOVSCROLL\n"); - hWnd = CreateWindowExA(0, - "EDIT", - NULL, - ES_MULTILINE, - 10, 10, (50 * dpi) / 96, (50 * dpi) / 96, - hParent, NULL, NULL, NULL); - assert(hWnd); - - zero_notify(); - SendMessageA(hWnd, EM_REPLACESEL, 0, (LPARAM)str); - len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(0 == len, "text should have been truncated, expected 0, got %d\n", len); - test_notify(1, 1, 1); - - SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)""); - zero_notify(); - SendMessageA(hWnd, EM_REPLACESEL, 0, (LPARAM)"a"); - len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(1 == SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0), "wrong text length, expected 1, got %d\n", len); - test_notify(1, 0, 1); - - zero_notify(); - SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)str); - len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(lstrlenA(str) == len, "text shouldn't have been truncated\n"); - test_notify(0, 0, 0); - - SendMessageA(hWnd, EM_SETLIMITTEXT, 5, 0); - - SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)""); - zero_notify(); - SendMessageA(hWnd, EM_REPLACESEL, 0, (LPARAM)str); - len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(5 == len, "text should have been truncated to limit, expected 5, got %d\n", len); - test_notify(1, 1, 1); - - zero_notify(); - SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)str); - len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(lstrlenA(str) == len, "text shouldn't have been truncated\n"); - test_notify(0, 0, 0); - - DestroyWindow(hWnd); - - trace("EDIT: Multline, ES_AUTOHSCROLL, no ES_AUTOVSCROLL\n"); - hWnd = CreateWindowExA(0, - "EDIT", - NULL, - ES_MULTILINE | ES_AUTOHSCROLL, - 10, 10, (50 * dpi) / 96, (50 * dpi) / 96, - hParent, NULL, NULL, NULL); - assert(hWnd); - - zero_notify(); - SendMessageA(hWnd, EM_REPLACESEL, 0, (LPARAM)str2); - len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(0 == len, "text should have been truncated, expected 0, got %d\n", len); - test_notify(1, 1, 1); - - SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)""); - zero_notify(); - SendMessageA(hWnd, EM_REPLACESEL, 0, (LPARAM)"a"); - len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(1 == SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0), "wrong text length, expected 1, got %d\n", len); - test_notify(1, 0, 1); - - zero_notify(); - SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)str2); - len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(lstrlenA(str2) == len, "text shouldn't have been truncated\n"); - test_notify(0, 0, 0); - - SendMessageA(hWnd, EM_SETLIMITTEXT, 5, 0); - - SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)""); - zero_notify(); - SendMessageA(hWnd, EM_REPLACESEL, 0, (LPARAM)str2); - len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(5 == len, "text should have been truncated to limit, expected 5, got %d\n", len); - test_notify(1, 1, 1); - - zero_notify(); - SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)str2); - len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(lstrlenA(str2) == len, "text shouldn't have been truncated\n"); - test_notify(0, 0, 0); - - DestroyWindow(hWnd); - - trace("EDIT: Multline, ES_AUTOHSCROLL and ES_AUTOVSCROLL\n"); - hWnd = CreateWindowExA(0, - "EDIT", - NULL, - ES_MULTILINE | ES_AUTOHSCROLL | ES_AUTOVSCROLL, - 10, 10, 50, 50, - hParent, NULL, NULL, NULL); - assert(hWnd); - - zero_notify(); - SendMessageA(hWnd, EM_REPLACESEL, 0, (LPARAM)str2); - len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(lstrlenA(str2) == len, "text shouldn't have been truncated\n"); - test_notify(1, 0, 1); - - zero_notify(); - SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)str2); - len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(lstrlenA(str2) == len, "text shouldn't have been truncated\n"); - test_notify(0, 0, 0); - - SendMessageA(hWnd, EM_SETLIMITTEXT, 5, 0); - - SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)""); - zero_notify(); - SendMessageA(hWnd, EM_REPLACESEL, 0, (LPARAM)str2); - len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(5 == len, "text should have been truncated to limit, expected 5, got %d\n", len); - test_notify(1, 1, 1); - - zero_notify(); - SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)str2); - len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(lstrlenA(str2) == len, "text shouldn't have been truncated\n"); - test_notify(0, 0, 0); - - DestroyWindow(hWnd); -} - -/* Test EM_CHARFROMPOS and EM_POSFROMCHAR - */ -static void test_edit_control_4(void) -{ - HWND hwEdit; - int lo, hi, mid; - int ret; - int i; - - trace("EDIT: Test EM_CHARFROMPOS and EM_POSFROMCHAR\n"); - hwEdit = create_editcontrol(ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); - SendMessage(hwEdit, WM_SETTEXT, 0, (LPARAM) "aa"); - lo = LOWORD(SendMessage(hwEdit, EM_POSFROMCHAR, 0, 0)); - hi = LOWORD(SendMessage(hwEdit, EM_POSFROMCHAR, 1, 0)); - mid = lo + (hi - lo) / 2; - - for (i = lo; i < mid; i++) { - ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, i)); - ok(0 == ret, "expected 0 got %d\n", ret); - } - for (i = mid; i <= hi; i++) { - ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, i)); - ok(1 == ret, "expected 1 got %d\n", ret); - } - ret = SendMessage(hwEdit, EM_POSFROMCHAR, 2, 0); - ok(-1 == ret, "expected -1 got %d\n", ret); - DestroyWindow(hwEdit); - - hwEdit = create_editcontrol(ES_RIGHT | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); - SendMessage(hwEdit, WM_SETTEXT, 0, (LPARAM) "aa"); - lo = LOWORD(SendMessage(hwEdit, EM_POSFROMCHAR, 0, 0)); - hi = LOWORD(SendMessage(hwEdit, EM_POSFROMCHAR, 1, 0)); - mid = lo + (hi - lo) / 2; - - for (i = lo; i < mid; i++) { - ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, i)); - ok(0 == ret, "expected 0 got %d\n", ret); - } - for (i = mid; i <= hi; i++) { - ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, i)); - ok(1 == ret, "expected 1 got %d\n", ret); - } - ret = SendMessage(hwEdit, EM_POSFROMCHAR, 2, 0); - ok(-1 == ret, "expected -1 got %d\n", ret); - DestroyWindow(hwEdit); - - hwEdit = create_editcontrol(ES_CENTER | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); - SendMessage(hwEdit, WM_SETTEXT, 0, (LPARAM) "aa"); - lo = LOWORD(SendMessage(hwEdit, EM_POSFROMCHAR, 0, 0)); - hi = LOWORD(SendMessage(hwEdit, EM_POSFROMCHAR, 1, 0)); - mid = lo + (hi - lo) / 2; - - for (i = lo; i < mid; i++) { - ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, i)); - ok(0 == ret, "expected 0 got %d\n", ret); - } - for (i = mid; i <= hi; i++) { - ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, i)); - ok(1 == ret, "expected 1 got %d\n", ret); - } - ret = SendMessage(hwEdit, EM_POSFROMCHAR, 2, 0); - ok(-1 == ret, "expected -1 got %d\n", ret); - DestroyWindow(hwEdit); - - hwEdit = create_editcontrol(ES_MULTILINE | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); - SendMessage(hwEdit, WM_SETTEXT, 0, (LPARAM) "aa"); - lo = LOWORD(SendMessage(hwEdit, EM_POSFROMCHAR, 0, 0)); - hi = LOWORD(SendMessage(hwEdit, EM_POSFROMCHAR, 1, 0)); - mid = lo + (hi - lo) / 2 +1; - - for (i = lo; i < mid; i++) { - ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, i)); - ok((0 == ret || 1 == ret /* Vista */), "expected 0 or 1 got %d\n", ret); - } - for (i = mid; i <= hi; i++) { - ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, i)); - ok(1 == ret, "expected 1 got %d\n", ret); - } - ret = SendMessage(hwEdit, EM_POSFROMCHAR, 2, 0); - ok(-1 == ret, "expected -1 got %d\n", ret); - DestroyWindow(hwEdit); - - hwEdit = create_editcontrol(ES_MULTILINE | ES_RIGHT | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); - SendMessage(hwEdit, WM_SETTEXT, 0, (LPARAM) "aa"); - lo = LOWORD(SendMessage(hwEdit, EM_POSFROMCHAR, 0, 0)); - hi = LOWORD(SendMessage(hwEdit, EM_POSFROMCHAR, 1, 0)); - mid = lo + (hi - lo) / 2 +1; - - for (i = lo; i < mid; i++) { - ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, i)); - ok((0 == ret || 1 == ret /* Vista */), "expected 0 or 1 got %d\n", ret); - } - for (i = mid; i <= hi; i++) { - ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, i)); - ok(1 == ret, "expected 1 got %d\n", ret); - } - ret = SendMessage(hwEdit, EM_POSFROMCHAR, 2, 0); - ok(-1 == ret, "expected -1 got %d\n", ret); - DestroyWindow(hwEdit); - - hwEdit = create_editcontrol(ES_MULTILINE | ES_CENTER | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); - SendMessage(hwEdit, WM_SETTEXT, 0, (LPARAM) "aa"); - lo = LOWORD(SendMessage(hwEdit, EM_POSFROMCHAR, 0, 0)); - hi = LOWORD(SendMessage(hwEdit, EM_POSFROMCHAR, 1, 0)); - mid = lo + (hi - lo) / 2 +1; - - for (i = lo; i < mid; i++) { - ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, i)); - ok((0 == ret || 1 == ret /* Vista */), "expected 0 or 1 got %d\n", ret); - } - for (i = mid; i <= hi; i++) { - ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, i)); - ok(1 == ret, "expected 1 got %d\n", ret); - } - ret = SendMessage(hwEdit, EM_POSFROMCHAR, 2, 0); - ok(-1 == ret, "expected -1 got %d\n", ret); - DestroyWindow(hwEdit); -} - -/* Test if creating edit control without ES_AUTOHSCROLL and ES_AUTOVSCROLL - * truncates text that doesn't fit. - */ -static void test_edit_control_5(void) -{ - static const char *str = "test\r\ntest"; - HWND parentWnd; - HWND hWnd; - int len; - RECT rc1 = { 10, 10, 11, 11}; - RECT rc; - - /* first show that a non-child won't do for this test */ - hWnd = CreateWindowEx(0, - "EDIT", - str, - 0, - 10, 10, 1, 1, - NULL, NULL, NULL, NULL); - assert(hWnd); - /* size of non-child edit control is (much) bigger than requested */ - GetWindowRect( hWnd, &rc); - ok( rc.right - rc.left > 20, "size of the window (%d) is smaller than expected\n", - rc.right - rc.left); - DestroyWindow(hWnd); - /* so create a parent, and give it edit controls children to test with */ - parentWnd = CreateWindowEx(0, - szEditTextPositionClass, - "Edit Test", WS_VISIBLE | - WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, - 250, 250, - NULL, NULL, hinst, NULL); - assert(parentWnd); - ShowWindow( parentWnd, SW_SHOW); - /* single line */ - hWnd = CreateWindowEx(0, - "EDIT", - str, WS_VISIBLE | WS_BORDER | - WS_CHILD, - rc1.left, rc1.top, rc1.right - rc1.left, rc1.bottom - rc1.top, - parentWnd, NULL, NULL, NULL); - assert(hWnd); - GetClientRect( hWnd, &rc); - ok( rc.right == rc1.right - rc1.left && rc.bottom == rc1.bottom - rc1.top, - "Client rectangle not the expected size (%d,%d,%d,%d)\n", - rc.left, rc.top, rc.right, rc.bottom); - len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(lstrlenA(str) == len, "text shouldn't have been truncated\n"); - DestroyWindow(hWnd); - /* multi line */ - hWnd = CreateWindowEx(0, - "EDIT", - str, - WS_CHILD | ES_MULTILINE, - rc1.left, rc1.top, rc1.right - rc1.left, rc1.bottom - rc1.top, - parentWnd, NULL, NULL, NULL); - assert(hWnd); - GetClientRect( hWnd, &rc); - ok( rc.right == rc1.right - rc1.left && rc.bottom == rc1.bottom - rc1.top, - "Client rectangle not the expected size (%d,%d,%d,%d)\n", - rc.left, rc.top, rc.right, rc.bottom); - len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0); - ok(lstrlenA(str) == len, "text shouldn't have been truncated\n"); - DestroyWindow(hWnd); -} - -/* Test WM_GETTEXT processing - * after destroy messages - */ -static void test_edit_control_6(void) -{ - static const char *str = "test\r\ntest"; - char buf[MAXLEN]; - LONG ret; - HWND hWnd; - - hWnd = CreateWindowEx(0, - "EDIT", - "Test", - 0, - 10, 10, 1, 1, - NULL, NULL, hinst, NULL); - assert(hWnd); - - ret = SendMessageA(hWnd, WM_SETTEXT, 0, (LPARAM)str); - ok(ret == TRUE, "Expected %d, got %d\n", TRUE, ret); - ret = SendMessageA(hWnd, WM_GETTEXT, MAXLEN, (LPARAM)buf); - ok(ret == lstrlen(str), "Expected %s, got len %d\n", str, ret); - ok(!lstrcmp(buf, str), "Expected %s, got %s\n", str, buf); - buf[0] = 0; - ret = SendMessageA(hWnd, WM_DESTROY, 0, 0); - ok(ret == 0, "Expected 0, got %d\n", ret); - ret = SendMessageA(hWnd, WM_GETTEXT, MAXLEN, (LPARAM)buf); - ok(ret == lstrlen(str), "Expected %s, got len %d\n", str, ret); - ok(!lstrcmp(buf, str), "Expected %s, got %s\n", str, buf); - buf[0] = 0; - ret = SendMessageA(hWnd, WM_NCDESTROY, 0, 0); - ok(ret == 0, "Expected 0, got %d\n", ret); - ret = SendMessageA(hWnd, WM_GETTEXT, MAXLEN, (LPARAM)buf); - ok(ret == 0, "Expected 0, got len %d\n", ret); - ok(!lstrcmp(buf, ""), "Expected empty string, got %s\n", buf); - - DestroyWindow(hWnd); -} - -static void test_edit_control_limittext(void) -{ - HWND hwEdit; - DWORD r; - - /* Test default limit for single-line control */ - trace("EDIT: buffer limit for single-line\n"); - hwEdit = create_editcontrol(ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); - r = SendMessage(hwEdit, EM_GETLIMITTEXT, 0, 0); - ok(r == 30000, "Incorrect default text limit, expected 30000 got %u\n", r); - SendMessage(hwEdit, EM_SETLIMITTEXT, 0, 0); - r = SendMessage(hwEdit, EM_GETLIMITTEXT, 0, 0); - ok( r == 2147483646, "got limit %u (expected 2147483646)\n", r); - DestroyWindow(hwEdit); - - /* Test default limit for multi-line control */ - trace("EDIT: buffer limit for multi-line\n"); - hwEdit = create_editcontrol(ES_MULTILINE | WS_VSCROLL | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); - r = SendMessage(hwEdit, EM_GETLIMITTEXT, 0, 0); - ok(r == 30000, "Incorrect default text limit, expected 30000 got %u\n", r); - SendMessage(hwEdit, EM_SETLIMITTEXT, 0, 0); - r = SendMessage(hwEdit, EM_GETLIMITTEXT, 0, 0); - ok( r == 4294967295U, "got limit %u (expected 4294967295)\n", r); - DestroyWindow(hwEdit); -} - -/* Test EM_SCROLL */ -static void test_edit_control_scroll(void) -{ - static const char *single_line_str = "a"; - static const char *multiline_str = "Test\r\nText"; - HWND hwEdit; - LONG ret; - - /* Check the return value when EM_SCROLL doesn't scroll - * anything. Should not return true unless any lines were actually - * scrolled. */ - hwEdit = CreateWindow( - "EDIT", - single_line_str, - WS_VSCROLL | ES_MULTILINE, - 1, 1, 100, 100, - NULL, NULL, hinst, NULL); - - assert(hwEdit); - - ret = SendMessage(hwEdit, EM_SCROLL, SB_PAGEDOWN, 0); - ok(!ret, "Returned %x, expected 0.\n", ret); - - ret = SendMessage(hwEdit, EM_SCROLL, SB_PAGEUP, 0); - ok(!ret, "Returned %x, expected 0.\n", ret); - - ret = SendMessage(hwEdit, EM_SCROLL, SB_LINEUP, 0); - ok(!ret, "Returned %x, expected 0.\n", ret); - - ret = SendMessage(hwEdit, EM_SCROLL, SB_LINEDOWN, 0); - ok(!ret, "Returned %x, expected 0.\n", ret); - - DestroyWindow (hwEdit); - - /* SB_PAGEDOWN while at the beginning of a buffer with few lines - should not cause EM_SCROLL to return a negative value of - scrolled lines that would put us "before" the beginning. */ - hwEdit = CreateWindow( - "EDIT", - multiline_str, - WS_VSCROLL | ES_MULTILINE, - 0, 0, 100, 100, - NULL, NULL, hinst, NULL); - assert(hwEdit); - - ret = SendMessage(hwEdit, EM_SCROLL, SB_PAGEDOWN, 0); - ok(!ret, "Returned %x, expected 0.\n", ret); - - DestroyWindow (hwEdit); -} - -static void test_margins(void) -{ - HWND hwEdit; - RECT old_rect, new_rect; - INT old_right_margin; - DWORD old_margins, new_margins; - - hwEdit = create_editcontrol(WS_BORDER | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); - - old_margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0); - old_right_margin = HIWORD(old_margins); - - /* Check if setting the margins works */ - - SendMessage(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN, MAKELONG(10, 0)); - new_margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0); - ok(LOWORD(new_margins) == 10, "Wrong left margin: %d\n", LOWORD(new_margins)); - ok(HIWORD(new_margins) == old_right_margin, "Wrong right margin: %d\n", HIWORD(new_margins)); - - SendMessage(hwEdit, EM_SETMARGINS, EC_RIGHTMARGIN, MAKELONG(0, 10)); - new_margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0); - ok(LOWORD(new_margins) == 10, "Wrong left margin: %d\n", LOWORD(new_margins)); - ok(HIWORD(new_margins) == 10, "Wrong right margin: %d\n", HIWORD(new_margins)); - - - /* The size of the rectangle must decrease if we increase the margin */ - - SendMessage(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(5, 5)); - SendMessage(hwEdit, EM_GETRECT, 0, (LPARAM)&old_rect); - SendMessage(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(15, 20)); - SendMessage(hwEdit, EM_GETRECT, 0, (LPARAM)&new_rect); - ok(new_rect.left == old_rect.left + 10, "The left border of the rectangle is wrong\n"); - ok(new_rect.right == old_rect.right - 15, "The right border of the rectangle is wrong\n"); - ok(new_rect.top == old_rect.top, "The top border of the rectangle must not change\n"); - ok(new_rect.bottom == old_rect.bottom, "The bottom border of the rectangle must not change\n"); - - - /* If we set the margin to same value as the current margin, - the rectangle must not change */ - - SendMessage(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(10, 10)); - old_rect.left = 1; - old_rect.right = 99; - old_rect.top = 1; - old_rect.bottom = 99; - SendMessage(hwEdit, EM_SETRECT, 0, (LPARAM)&old_rect); - SendMessage(hwEdit, EM_GETRECT, 0, (LPARAM)&old_rect); - SendMessage(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(10, 10)); - SendMessage(hwEdit, EM_GETRECT, 0, (LPARAM)&new_rect); - ok(new_rect.left == old_rect.left, "The left border of the rectangle has changed\n"); - ok(new_rect.right == old_rect.right, "The right border of the rectangle has changed\n"); - ok(new_rect.top == old_rect.top, "The top border of the rectangle has changed\n"); - ok(new_rect.bottom == old_rect.bottom, "The bottom border of the rectangle has changed\n"); - - DestroyWindow (hwEdit); -} - -static INT CALLBACK find_font_proc(const LOGFONT *elf, const TEXTMETRIC *ntm, DWORD type, LPARAM lParam) -{ - return 0; -} - -static void test_margins_font_change(void) -{ - HWND hwEdit; - DWORD margins, font_margins; - LOGFONT lf; - HFONT hfont, hfont2; - HDC hdc = GetDC(0); - - if(EnumFontFamiliesA(hdc, "Arial", find_font_proc, 0)) - { - trace("Arial not found - skipping font change margin tests\n"); - ReleaseDC(0, hdc); - return; - } - ReleaseDC(0, hdc); - - hwEdit = create_child_editcontrol(0, 0); - - SetWindowPos(hwEdit, NULL, 10, 10, 1000, 100, SWP_NOZORDER | SWP_NOACTIVATE); - - memset(&lf, 0, sizeof(lf)); - strcpy(lf.lfFaceName, "Arial"); - lf.lfHeight = 16; - lf.lfCharSet = DEFAULT_CHARSET; - hfont = CreateFontIndirectA(&lf); - lf.lfHeight = 30; - hfont2 = CreateFontIndirectA(&lf); - - SendMessageA(hwEdit, WM_SETFONT, (WPARAM)hfont, 0); - font_margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0); - ok(LOWORD(font_margins) != 0, "got %d\n", LOWORD(font_margins)); - ok(HIWORD(font_margins) != 0, "got %d\n", HIWORD(font_margins)); - - /* With 'small' edit controls, test that the margin doesn't get set */ - SetWindowPos(hwEdit, NULL, 10, 10, 16, 100, SWP_NOZORDER | SWP_NOACTIVATE); - SendMessageA(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(0,0)); - SendMessageA(hwEdit, WM_SETFONT, (WPARAM)hfont, 0); - margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0); - ok(LOWORD(margins) == 0 || broken(LOWORD(margins) == LOWORD(font_margins)), /* win95 */ - "got %d\n", LOWORD(margins)); - ok(HIWORD(margins) == 0 || broken(HIWORD(margins) == HIWORD(font_margins)), /* win95 */ - "got %d\n", HIWORD(margins)); - - SendMessageA(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(1,0)); - SendMessageA(hwEdit, WM_SETFONT, (WPARAM)hfont, 0); - margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0); - ok(LOWORD(margins) == 1 || broken(LOWORD(margins) == LOWORD(font_margins)), /* win95 */ - "got %d\n", LOWORD(margins)); - ok(HIWORD(margins) == 0 || broken(HIWORD(margins) == HIWORD(font_margins)), /* win95 */ - "got %d\n", HIWORD(margins)); - - SendMessageA(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(1,1)); - SendMessageA(hwEdit, WM_SETFONT, (WPARAM)hfont, 0); - margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0); - ok(LOWORD(margins) == 1 || broken(LOWORD(margins) == LOWORD(font_margins)), /* win95 */ - "got %d\n", LOWORD(margins)); - ok(HIWORD(margins) == 1 || broken(HIWORD(margins) == HIWORD(font_margins)), /* win95 */ - "got %d\n", HIWORD(margins)); - - SendMessageA(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(EC_USEFONTINFO,EC_USEFONTINFO)); - margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0); - ok(LOWORD(margins) == 1 || broken(LOWORD(margins) == LOWORD(font_margins)), /* win95 */ - "got %d\n", LOWORD(margins)); - ok(HIWORD(margins) == 1 || broken(HIWORD(margins) == HIWORD(font_margins)), /* win95 */ - "got %d\n", HIWORD(margins)); - - SendMessageA(hwEdit, WM_SETFONT, (WPARAM)hfont2, 0); - margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0); - ok(LOWORD(margins) == 1 || broken(LOWORD(margins) != 1 && LOWORD(margins) != LOWORD(font_margins)), /* win95 */ - "got %d\n", LOWORD(margins)); - ok(HIWORD(margins) == 1 || broken(HIWORD(margins) != 1 && HIWORD(margins) != HIWORD(font_margins)), /* win95 */ - "got %d\n", HIWORD(margins)); - - /* Above a certain size threshold then the margin is updated */ - SetWindowPos(hwEdit, NULL, 10, 10, 1000, 100, SWP_NOZORDER | SWP_NOACTIVATE); - SendMessageA(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(1,0)); - SendMessageA(hwEdit, WM_SETFONT, (WPARAM)hfont, 0); - margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0); - ok(LOWORD(margins) == LOWORD(font_margins), "got %d\n", LOWORD(margins)); - ok(HIWORD(margins) == HIWORD(font_margins), "got %d\n", HIWORD(margins)); - - SendMessageA(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(1,1)); - SendMessageA(hwEdit, WM_SETFONT, (WPARAM)hfont, 0); - margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0); - ok(LOWORD(margins) == LOWORD(font_margins), "got %d\n", LOWORD(margins)); - ok(HIWORD(margins) == HIWORD(font_margins), "got %d\n", HIWORD(margins)); - - SendMessageA(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(EC_USEFONTINFO,EC_USEFONTINFO)); - SendMessageA(hwEdit, WM_SETFONT, (WPARAM)hfont, 0); - margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0); - ok(LOWORD(margins) == LOWORD(font_margins), "got %d\n", LOWORD(margins)); - ok(HIWORD(margins) == HIWORD(font_margins), "got %d\n", HIWORD(margins)); - SendMessageA(hwEdit, WM_SETFONT, (WPARAM)hfont2, 0); - margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0); - ok(LOWORD(margins) != LOWORD(font_margins) || broken(LOWORD(margins) == LOWORD(font_margins)), /* win98 */ - "got %d\n", LOWORD(margins)); - ok(HIWORD(margins) != HIWORD(font_margins), "got %d\n", HIWORD(margins)); - - SendMessageA(hwEdit, WM_SETFONT, 0, 0); - - DeleteObject(hfont2); - DeleteObject(hfont); - destroy_child_editcontrol(hwEdit); - -} - -#define edit_pos_ok(exp, got, txt) \ - ok(exp == got, "wrong " #txt " expected %d got %d\n", exp, got); - -#define check_pos(hwEdit, set_height, test_top, test_height, test_left) \ -do { \ - RECT format_rect; \ - int left_margin; \ - set_client_height(hwEdit, set_height); \ - SendMessage(hwEdit, EM_GETRECT, 0, (LPARAM) &format_rect); \ - left_margin = LOWORD(SendMessage(hwEdit, EM_GETMARGINS, 0, 0)); \ - edit_pos_ok(test_top, format_rect.top, vertical position); \ - edit_pos_ok((int)test_height, format_rect.bottom - format_rect.top, height); \ - edit_pos_ok(test_left, format_rect.left - left_margin, left); \ -} while(0) - -static void test_text_position_style(DWORD style) -{ - HWND hwEdit; - HFONT font, oldFont; - HDC dc; - TEXTMETRIC metrics; - INT b, bm, b2, b3; - BOOL xb, single_line = !(style & ES_MULTILINE); - - b = GetSystemMetrics(SM_CYBORDER) + 1; - b2 = 2 * b; - b3 = 3 * b; - bm = b2 - 1; - - /* Get a stock font for which we can determine the metrics */ - font = GetStockObject(SYSTEM_FONT); - ok (font != NULL, "GetStockObjcet SYSTEM_FONT failed\n"); - dc = GetDC(NULL); - ok (dc != NULL, "GetDC() failed\n"); - oldFont = SelectObject(dc, font); - xb = GetTextMetrics(dc, &metrics); - ok (xb, "GetTextMetrics failed\n"); - SelectObject(dc, oldFont); - ReleaseDC(NULL, dc); - - /* Windows' edit control has some bugs in multi-line mode: - * - Sometimes the format rectangle doesn't get updated - * (see workaround in set_client_height()) - * - If the height of the control is smaller than the height of a text - * line, the format rectangle is still as high as a text line - * (higher than the client rectangle) and the caret is not shown - */ - - /* Edit controls that are in a parent window */ - - hwEdit = create_child_editcontrol(style | WS_VISIBLE, 0); - SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, FALSE); - if (single_line) - check_pos(hwEdit, metrics.tmHeight - 1, 0, metrics.tmHeight - 1, 0); - check_pos(hwEdit, metrics.tmHeight , 0, metrics.tmHeight , 0); - check_pos(hwEdit, metrics.tmHeight + 1, 0, metrics.tmHeight , 0); - check_pos(hwEdit, metrics.tmHeight + 2, 0, metrics.tmHeight , 0); - check_pos(hwEdit, metrics.tmHeight + 10, 0, metrics.tmHeight , 0); - destroy_child_editcontrol(hwEdit); - - hwEdit = create_child_editcontrol(style | WS_BORDER | WS_VISIBLE, 0); - SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, FALSE); - if (single_line) - check_pos(hwEdit, metrics.tmHeight - 1, 0, metrics.tmHeight - 1, b); - check_pos(hwEdit, metrics.tmHeight , 0, metrics.tmHeight , b); - check_pos(hwEdit, metrics.tmHeight + 1, 0, metrics.tmHeight , b); - check_pos(hwEdit, metrics.tmHeight + bm, 0, metrics.tmHeight , b); - check_pos(hwEdit, metrics.tmHeight + b2, b, metrics.tmHeight , b); - check_pos(hwEdit, metrics.tmHeight + b3, b, metrics.tmHeight , b); - destroy_child_editcontrol(hwEdit); - - hwEdit = create_child_editcontrol(style | WS_VISIBLE, WS_EX_CLIENTEDGE); - SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, FALSE); - if (single_line) - check_pos(hwEdit, metrics.tmHeight - 1, 0, metrics.tmHeight - 1, 1); - check_pos(hwEdit, metrics.tmHeight , 0, metrics.tmHeight , 1); - check_pos(hwEdit, metrics.tmHeight + 1, 0, metrics.tmHeight , 1); - check_pos(hwEdit, metrics.tmHeight + 2, 1, metrics.tmHeight , 1); - check_pos(hwEdit, metrics.tmHeight + 10, 1, metrics.tmHeight , 1); - destroy_child_editcontrol(hwEdit); - - hwEdit = create_child_editcontrol(style | WS_BORDER | WS_VISIBLE, WS_EX_CLIENTEDGE); - SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, FALSE); - if (single_line) - check_pos(hwEdit, metrics.tmHeight - 1, 0, metrics.tmHeight - 1, 1); - check_pos(hwEdit, metrics.tmHeight , 0, metrics.tmHeight , 1); - check_pos(hwEdit, metrics.tmHeight + 1, 0, metrics.tmHeight , 1); - check_pos(hwEdit, metrics.tmHeight + 2, 1, metrics.tmHeight , 1); - check_pos(hwEdit, metrics.tmHeight + 10, 1, metrics.tmHeight , 1); - destroy_child_editcontrol(hwEdit); - - - /* Edit controls that are popup windows */ - - hwEdit = create_editcontrol(style | WS_POPUP, 0); - SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, FALSE); - if (single_line) - check_pos(hwEdit, metrics.tmHeight - 1, 0, metrics.tmHeight - 1, 0); - check_pos(hwEdit, metrics.tmHeight , 0, metrics.tmHeight , 0); - check_pos(hwEdit, metrics.tmHeight + 1, 0, metrics.tmHeight , 0); - check_pos(hwEdit, metrics.tmHeight + 2, 0, metrics.tmHeight , 0); - check_pos(hwEdit, metrics.tmHeight + 10, 0, metrics.tmHeight , 0); - DestroyWindow(hwEdit); - - hwEdit = create_editcontrol(style | WS_POPUP | WS_BORDER, 0); - SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, FALSE); - if (single_line) - check_pos(hwEdit, metrics.tmHeight - 1, 0, metrics.tmHeight - 1, b); - check_pos(hwEdit, metrics.tmHeight , 0, metrics.tmHeight , b); - check_pos(hwEdit, metrics.tmHeight + 1, 0, metrics.tmHeight , b); - check_pos(hwEdit, metrics.tmHeight + bm, 0, metrics.tmHeight , b); - check_pos(hwEdit, metrics.tmHeight + b2, b, metrics.tmHeight , b); - check_pos(hwEdit, metrics.tmHeight + b3, b, metrics.tmHeight , b); - DestroyWindow(hwEdit); - - hwEdit = create_editcontrol(style | WS_POPUP, WS_EX_CLIENTEDGE); - SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, FALSE); - if (single_line) - check_pos(hwEdit, metrics.tmHeight - 1, 0, metrics.tmHeight - 1, 1); - check_pos(hwEdit, metrics.tmHeight , 0, metrics.tmHeight , 1); - check_pos(hwEdit, metrics.tmHeight + 1, 0, metrics.tmHeight , 1); - check_pos(hwEdit, metrics.tmHeight + 2, 1, metrics.tmHeight , 1); - check_pos(hwEdit, metrics.tmHeight + 10, 1, metrics.tmHeight , 1); - DestroyWindow(hwEdit); - - hwEdit = create_editcontrol(style | WS_POPUP | WS_BORDER, WS_EX_CLIENTEDGE); - SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, FALSE); - if (single_line) - check_pos(hwEdit, metrics.tmHeight - 1, 0, metrics.tmHeight - 1, 1); - check_pos(hwEdit, metrics.tmHeight , 0, metrics.tmHeight , 1); - check_pos(hwEdit, metrics.tmHeight + 1, 0, metrics.tmHeight , 1); - check_pos(hwEdit, metrics.tmHeight + 2, 1, metrics.tmHeight , 1); - check_pos(hwEdit, metrics.tmHeight + 10, 1, metrics.tmHeight , 1); - DestroyWindow(hwEdit); -} - -static void test_text_position(void) -{ - trace("EDIT: Text position (Single line)\n"); - test_text_position_style(ES_AUTOHSCROLL | ES_AUTOVSCROLL); - trace("EDIT: Text position (Multi line)\n"); - test_text_position_style(ES_MULTILINE | ES_AUTOHSCROLL | ES_AUTOVSCROLL); -} - -static void test_espassword(void) -{ - HWND hwEdit; - LONG r; - char buffer[1024]; - const char* password = "secret"; - - hwEdit = create_editcontrol(ES_PASSWORD, 0); - r = get_edit_style(hwEdit); - ok(r == ES_PASSWORD, "Wrong style expected 0x%x got: 0x%x\n", ES_PASSWORD, r); - /* set text */ - r = SendMessage(hwEdit , WM_SETTEXT, 0, (LPARAM) password); - ok(r == TRUE, "Expected: %d, got: %d\n", TRUE, r); - - /* select all, cut (ctrl-x) */ - SendMessage(hwEdit, EM_SETSEL, 0, -1); - r = SendMessage(hwEdit, WM_CHAR, 24, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); - - /* get text */ - r = SendMessage(hwEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok(r == strlen(password), "Expected: %s, got len %d\n", password, r); - ok(strcmp(buffer, password) == 0, "expected %s, got %s\n", password, buffer); - - r = OpenClipboard(hwEdit); - ok(r == TRUE, "expected %d, got %d\n", TRUE, r); - r = EmptyClipboard(); - ok(r == TRUE, "expected %d, got %d\n", TRUE, r); - r = CloseClipboard(); - ok(r == TRUE, "expected %d, got %d\n", TRUE, r); - - /* select all, copy (ctrl-c) and paste (ctrl-v) */ - SendMessage(hwEdit, EM_SETSEL, 0, -1); - r = SendMessage(hwEdit, WM_CHAR, 3, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); - r = SendMessage(hwEdit, WM_CHAR, 22, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); - - /* get text */ - buffer[0] = 0; - r = SendMessage(hwEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok(r == 0, "Expected: 0, got: %d\n", r); - ok(strcmp(buffer, "") == 0, "expected empty string, got %s\n", buffer); - - DestroyWindow (hwEdit); -} - -static void test_undo(void) -{ - HWND hwEdit; - LONG r; - DWORD cpMin, cpMax; - char buffer[1024]; - const char* text = "undo this"; - - hwEdit = create_editcontrol(0, 0); - r = get_edit_style(hwEdit); - ok(0 == r, "Wrong style expected 0x%x got: 0x%x\n", 0, r); - - /* set text */ - r = SendMessage(hwEdit , WM_SETTEXT, 0, (LPARAM) text); - ok(TRUE == r, "Expected: %d, got: %d\n", TRUE, r); - - /* select all, */ - cpMin = cpMax = 0xdeadbeef; - SendMessage(hwEdit, EM_SETSEL, 0, -1); - r = SendMessage(hwEdit, EM_GETSEL, (WPARAM) &cpMin, (LPARAM) &cpMax); - ok((strlen(text) << 16) == r, "Unexpected length %d\n", r); - ok(0 == cpMin, "Expected: %d, got %d\n", 0, cpMin); - ok(9 == cpMax, "Expected: %d, got %d\n", 9, cpMax); - - /* cut (ctrl-x) */ - r = SendMessage(hwEdit, WM_CHAR, 24, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); - - /* get text */ - buffer[0] = 0; - r = SendMessage(hwEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok(0 == r, "Expected: %d, got len %d\n", 0, r); - ok(0 == strcmp(buffer, ""), "expected %s, got %s\n", "", buffer); - - /* undo (ctrl-z) */ - r = SendMessage(hwEdit, WM_CHAR, 26, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); - - /* get text */ - buffer[0] = 0; - r = SendMessage(hwEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok(strlen(text) == r, "Unexpected length %d\n", r); - ok(0 == strcmp(buffer, text), "expected %s, got %s\n", text, buffer); - - /* undo again (ctrl-z) */ - r = SendMessage(hwEdit, WM_CHAR, 26, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); - - /* get text */ - buffer[0] = 0; - r = SendMessage(hwEdit, WM_GETTEXT, 1024, (LPARAM) buffer); - ok(r == 0, "Expected: %d, got len %d\n", 0, r); - ok(0 == strcmp(buffer, ""), "expected %s, got %s\n", "", buffer); - - DestroyWindow (hwEdit); -} - -static void test_enter(void) -{ - HWND hwEdit; - LONG r; - char buffer[16]; - - /* multiline */ - hwEdit = create_editcontrol(ES_MULTILINE, 0); - r = get_edit_style(hwEdit); - ok(ES_MULTILINE == r, "Wrong style expected 0x%x got: 0x%x\n", ES_MULTILINE, r); - - /* set text */ - r = SendMessage(hwEdit , WM_SETTEXT, 0, (LPARAM) ""); - ok(TRUE == r, "Expected: %d, got: %d\n", TRUE, r); - - r = SendMessage(hwEdit, WM_CHAR, VK_RETURN, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); - - /* get text */ - buffer[0] = 0; - r = SendMessage(hwEdit, WM_GETTEXT, 16, (LPARAM) buffer); - ok(2 == r, "Expected: %d, got len %d\n", 2, r); - ok(0 == strcmp(buffer, "\r\n"), "expected \"\\r\\n\", got \"%s\"\n", buffer); - - DestroyWindow (hwEdit); - - /* single line */ - hwEdit = create_editcontrol(0, 0); - r = get_edit_style(hwEdit); - ok(0 == r, "Wrong style expected 0x%x got: 0x%x\n", 0, r); - - /* set text */ - r = SendMessage(hwEdit , WM_SETTEXT, 0, (LPARAM) ""); - ok(TRUE == r, "Expected: %d, got: %d\n", TRUE, r); - - r = SendMessage(hwEdit, WM_CHAR, VK_RETURN, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); - - /* get text */ - buffer[0] = 0; - r = SendMessage(hwEdit, WM_GETTEXT, 16, (LPARAM) buffer); - ok(0 == r, "Expected: %d, got len %d\n", 0, r); - ok(0 == strcmp(buffer, ""), "expected \"\", got \"%s\"\n", buffer); - - DestroyWindow (hwEdit); - - /* single line with ES_WANTRETURN */ - hwEdit = create_editcontrol(ES_WANTRETURN, 0); - r = get_edit_style(hwEdit); - ok(ES_WANTRETURN == r, "Wrong style expected 0x%x got: 0x%x\n", ES_WANTRETURN, r); - - /* set text */ - r = SendMessage(hwEdit , WM_SETTEXT, 0, (LPARAM) ""); - ok(TRUE == r, "Expected: %d, got: %d\n", TRUE, r); - - r = SendMessage(hwEdit, WM_CHAR, VK_RETURN, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); - - /* get text */ - buffer[0] = 0; - r = SendMessage(hwEdit, WM_GETTEXT, 16, (LPARAM) buffer); - ok(0 == r, "Expected: %d, got len %d\n", 0, r); - ok(0 == strcmp(buffer, ""), "expected \"\", got \"%s\"\n", buffer); - - DestroyWindow (hwEdit); -} - -static void test_tab(void) -{ - HWND hwEdit; - LONG r; - char buffer[16]; - - /* multiline */ - hwEdit = create_editcontrol(ES_MULTILINE, 0); - r = get_edit_style(hwEdit); - ok(ES_MULTILINE == r, "Wrong style expected 0x%x got: 0x%x\n", ES_MULTILINE, r); - - /* set text */ - r = SendMessage(hwEdit , WM_SETTEXT, 0, (LPARAM) ""); - ok(TRUE == r, "Expected: %d, got: %d\n", TRUE, r); - - r = SendMessage(hwEdit, WM_CHAR, VK_TAB, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); - - /* get text */ - buffer[0] = 0; - r = SendMessage(hwEdit, WM_GETTEXT, 16, (LPARAM) buffer); - ok(1 == r, "Expected: %d, got len %d\n", 1, r); - ok(0 == strcmp(buffer, "\t"), "expected \"\\t\", got \"%s\"\n", buffer); - - DestroyWindow (hwEdit); - - /* single line */ - hwEdit = create_editcontrol(0, 0); - r = get_edit_style(hwEdit); - ok(0 == r, "Wrong style expected 0x%x got: 0x%x\n", 0, r); - - /* set text */ - r = SendMessage(hwEdit , WM_SETTEXT, 0, (LPARAM) ""); - ok(TRUE == r, "Expected: %d, got: %d\n", TRUE, r); - - r = SendMessage(hwEdit, WM_CHAR, VK_TAB, 0); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); - - /* get text */ - buffer[0] = 0; - r = SendMessage(hwEdit, WM_GETTEXT, 16, (LPARAM) buffer); - ok(0 == r, "Expected: %d, got len %d\n", 0, r); - ok(0 == strcmp(buffer, ""), "expected \"\", got \"%s\"\n", buffer); - - DestroyWindow (hwEdit); -} - -static void test_edit_dialog(void) -{ - int r; - - /* from bug 11841 */ - r = DialogBoxParam(hinst, "EDIT_READONLY_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 0); - ok(333 == r, "Expected %d, got %d\n", 333, r); - r = DialogBoxParam(hinst, "EDIT_READONLY_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 1); - ok(111 == r, "Expected %d, got %d\n", 111, r); - r = DialogBoxParam(hinst, "EDIT_READONLY_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 2); - ok(444 == r, "Expected %d, got %d\n", 444, r); - - /* more tests for WM_CHAR */ - r = DialogBoxParam(hinst, "EDIT_READONLY_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 3); - ok(444 == r, "Expected %d, got %d\n", 444, r); - r = DialogBoxParam(hinst, "EDIT_READONLY_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 4); - ok(444 == r, "Expected %d, got %d\n", 444, r); - r = DialogBoxParam(hinst, "EDIT_READONLY_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 5); - ok(444 == r, "Expected %d, got %d\n", 444, r); - - /* more tests for WM_KEYDOWN + WM_CHAR */ - r = DialogBoxParam(hinst, "EDIT_READONLY_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 6); - ok(444 == r, "Expected %d, got %d\n", 444, r); - r = DialogBoxParam(hinst, "EDIT_READONLY_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 7); - ok(444 == r, "Expected %d, got %d\n", 444, r); - r = DialogBoxParam(hinst, "EDIT_READONLY_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 8); - ok(444 == r, "Expected %d, got %d\n", 444, r); - - /* tests with an editable edit control */ - r = DialogBoxParam(hinst, "EDIT_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 0); - ok(333 == r, "Expected %d, got %d\n", 333, r); - r = DialogBoxParam(hinst, "EDIT_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 1); - ok(111 == r, "Expected %d, got %d\n", 111, r); - r = DialogBoxParam(hinst, "EDIT_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 2); - ok(444 == r, "Expected %d, got %d\n", 444, r); - - /* tests for WM_CHAR */ - r = DialogBoxParam(hinst, "EDIT_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 3); - ok(444 == r, "Expected %d, got %d\n", 444, r); - r = DialogBoxParam(hinst, "EDIT_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 4); - ok(444 == r, "Expected %d, got %d\n", 444, r); - r = DialogBoxParam(hinst, "EDIT_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 5); - ok(444 == r, "Expected %d, got %d\n", 444, r); - - /* tests for WM_KEYDOWN + WM_CHAR */ - r = DialogBoxParam(hinst, "EDIT_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 6); - ok(444 == r, "Expected %d, got %d\n", 444, r); - r = DialogBoxParam(hinst, "EDIT_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 7); - ok(444 == r, "Expected %d, got %d\n", 444, r); - r = DialogBoxParam(hinst, "EDIT_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 8); - ok(444 == r, "Expected %d, got %d\n", 444, r); - - /* multiple tab tests */ - r = DialogBoxParam(hinst, "EDIT_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 9); - ok(22 == r, "Expected %d, got %d\n", 22, r); - r = DialogBoxParam(hinst, "EDIT_DIALOG", NULL, (DLGPROC)edit_dialog_proc, 10); - ok(33 == r, "Expected %d, got %d\n", 33, r); -} - -static void test_multi_edit_dialog(void) -{ - int r; - - /* test for multiple edit dialogs (bug 12319) */ - r = DialogBoxParam(hinst, "MULTI_EDIT_DIALOG", NULL, (DLGPROC)multi_edit_dialog_proc, 0); - ok(2222 == r, "Expected %d, got %d\n", 2222, r); - r = DialogBoxParam(hinst, "MULTI_EDIT_DIALOG", NULL, (DLGPROC)multi_edit_dialog_proc, 1); - ok(1111 == r, "Expected %d, got %d\n", 1111, r); - r = DialogBoxParam(hinst, "MULTI_EDIT_DIALOG", NULL, (DLGPROC)multi_edit_dialog_proc, 2); - ok(2222 == r, "Expected %d, got %d\n", 2222, r); - r = DialogBoxParam(hinst, "MULTI_EDIT_DIALOG", NULL, (DLGPROC)multi_edit_dialog_proc, 3); - ok(11 == r, "Expected %d, got %d\n", 11, r); -} - -static void test_wantreturn_edit_dialog(void) -{ - int r; - - /* tests for WM_KEYDOWN */ - r = DialogBoxParam(hinst, "EDIT_WANTRETURN_DIALOG", NULL, (DLGPROC)edit_wantreturn_dialog_proc, 0); - ok(333 == r, "Expected %d, got %d\n", 333, r); - r = DialogBoxParam(hinst, "EDIT_WANTRETURN_DIALOG", NULL, (DLGPROC)edit_wantreturn_dialog_proc, 1); - ok(444 == r, "Expected %d, got %d\n", 444, r); - r = DialogBoxParam(hinst, "EDIT_WANTRETURN_DIALOG", NULL, (DLGPROC)edit_wantreturn_dialog_proc, 2); - ok(444 == r, "Expected %d, got %d\n", 444, r); - - /* tests for WM_CHAR */ - r = DialogBoxParam(hinst, "EDIT_WANTRETURN_DIALOG", NULL, (DLGPROC)edit_wantreturn_dialog_proc, 3); - ok(444 == r, "Expected %d, got %d\n", 444, r); - r = DialogBoxParam(hinst, "EDIT_WANTRETURN_DIALOG", NULL, (DLGPROC)edit_wantreturn_dialog_proc, 4); - ok(444 == r, "Expected %d, got %d\n", 444, r); - r = DialogBoxParam(hinst, "EDIT_WANTRETURN_DIALOG", NULL, (DLGPROC)edit_wantreturn_dialog_proc, 5); - ok(444 == r, "Expected %d, got %d\n", 444, r); - - /* tests for WM_KEYDOWN + WM_CHAR */ - r = DialogBoxParam(hinst, "EDIT_WANTRETURN_DIALOG", NULL, (DLGPROC)edit_wantreturn_dialog_proc, 6); - ok(444 == r, "Expected %d, got %d\n", 444, r); - r = DialogBoxParam(hinst, "EDIT_WANTRETURN_DIALOG", NULL, (DLGPROC)edit_wantreturn_dialog_proc, 7); - ok(444 == r, "Expected %d, got %d\n", 444, r); - r = DialogBoxParam(hinst, "EDIT_WANTRETURN_DIALOG", NULL, (DLGPROC)edit_wantreturn_dialog_proc, 8); - ok(444 == r, "Expected %d, got %d\n", 444, r); -} - -static void test_singleline_wantreturn_edit_dialog(void) -{ - int r; - - /* tests for WM_KEYDOWN */ - r = DialogBoxParam(hinst, "EDIT_SINGLELINE_DIALOG", NULL, (DLGPROC)edit_singleline_dialog_proc, 0); - ok(222 == r, "Expected %d, got %d\n", 222, r); - r = DialogBoxParam(hinst, "EDIT_SINGLELINE_DIALOG", NULL, (DLGPROC)edit_singleline_dialog_proc, 1); - ok(111 == r, "Expected %d, got %d\n", 111, r); - r = DialogBoxParam(hinst, "EDIT_SINGLELINE_DIALOG", NULL, (DLGPROC)edit_singleline_dialog_proc, 2); - ok(444 == r, "Expected %d, got %d\n", 444, r); - - /* tests for WM_CHAR */ - r = DialogBoxParam(hinst, "EDIT_SINGLELINE_DIALOG", NULL, (DLGPROC)edit_singleline_dialog_proc, 3); - ok(444 == r, "Expected %d, got %d\n", 444, r); - r = DialogBoxParam(hinst, "EDIT_SINGLELINE_DIALOG", NULL, (DLGPROC)edit_singleline_dialog_proc, 4); - ok(444 == r, "Expected %d, got %d\n", 444, r); - r = DialogBoxParam(hinst, "EDIT_SINGLELINE_DIALOG", NULL, (DLGPROC)edit_singleline_dialog_proc, 5); - ok(444 == r, "Expected %d, got %d\n", 444, r); - - /* tests for WM_KEYDOWN + WM_CHAR */ - r = DialogBoxParam(hinst, "EDIT_SINGLELINE_DIALOG", NULL, (DLGPROC)edit_singleline_dialog_proc, 6); - ok(222 == r, "Expected %d, got %d\n", 222, r); - r = DialogBoxParam(hinst, "EDIT_SINGLELINE_DIALOG", NULL, (DLGPROC)edit_singleline_dialog_proc, 7); - ok(111 == r, "Expected %d, got %d\n", 111, r); - r = DialogBoxParam(hinst, "EDIT_SINGLELINE_DIALOG", NULL, (DLGPROC)edit_singleline_dialog_proc, 8); - ok(444 == r, "Expected %d, got %d\n", 444, r); - - /* tests for WM_KEYDOWN */ - r = DialogBoxParam(hinst, "EDIT_SINGLELINE_WANTRETURN_DIALOG", NULL, (DLGPROC)edit_singleline_dialog_proc, 0); - ok(222 == r, "Expected %d, got %d\n", 222, r); - r = DialogBoxParam(hinst, "EDIT_SINGLELINE_WANTRETURN_DIALOG", NULL, (DLGPROC)edit_singleline_dialog_proc, 1); - ok(111 == r, "Expected %d, got %d\n", 111, r); - r = DialogBoxParam(hinst, "EDIT_SINGLELINE_WANTRETURN_DIALOG", NULL, (DLGPROC)edit_singleline_dialog_proc, 2); - ok(444 == r, "Expected %d, got %d\n", 444, r); - - /* tests for WM_CHAR */ - r = DialogBoxParam(hinst, "EDIT_SINGLELINE_WANTRETURN_DIALOG", NULL, (DLGPROC)edit_singleline_dialog_proc, 3); - ok(444 == r, "Expected %d, got %d\n", 444, r); - r = DialogBoxParam(hinst, "EDIT_SINGLELINE_WANTRETURN_DIALOG", NULL, (DLGPROC)edit_singleline_dialog_proc, 4); - ok(444 == r, "Expected %d, got %d\n", 444, r); - r = DialogBoxParam(hinst, "EDIT_SINGLELINE_WANTRETURN_DIALOG", NULL, (DLGPROC)edit_singleline_dialog_proc, 5); - ok(444 == r, "Expected %d, got %d\n", 444, r); - - /* tests for WM_KEYDOWN + WM_CHAR */ - r = DialogBoxParam(hinst, "EDIT_SINGLELINE_WANTRETURN_DIALOG", NULL, (DLGPROC)edit_singleline_dialog_proc, 6); - ok(222 == r, "Expected %d, got %d\n", 222, r); - r = DialogBoxParam(hinst, "EDIT_SINGLELINE_WANTRETURN_DIALOG", NULL, (DLGPROC)edit_singleline_dialog_proc, 7); - ok(111 == r, "Expected %d, got %d\n", 111, r); - r = DialogBoxParam(hinst, "EDIT_SINGLELINE_WANTRETURN_DIALOG", NULL, (DLGPROC)edit_singleline_dialog_proc, 8); - ok(444 == r, "Expected %d, got %d\n", 444, r); -} - -static int child_edit_wmkeydown_num_messages = 0; -static INT_PTR CALLBACK child_edit_wmkeydown_proc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) -{ - switch (msg) - { - case WM_DESTROY: - case WM_NCDESTROY: - break; - - default: - child_edit_wmkeydown_num_messages++; - break; - } - - return FALSE; -} - -static void test_child_edit_wmkeydown(void) -{ - HWND hwEdit, hwParent; - int r; - - hwEdit = create_child_editcontrol(0, 0); - hwParent = GetParent(hwEdit); - SetWindowLongPtr(hwParent, GWLP_WNDPROC, (LONG_PTR)child_edit_wmkeydown_proc); - r = SendMessage(hwEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - ok(1 == r, "expected 1, got %d\n", r); - ok(0 == child_edit_wmkeydown_num_messages, "expected 0, got %d\n", child_edit_wmkeydown_num_messages); - destroy_child_editcontrol(hwEdit); -} - -static int got_en_setfocus = 0; -static int got_wm_capturechanged = 0; - -static LRESULT CALLBACK edit4_wnd_procA(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch (msg) { - case WM_COMMAND: - switch (HIWORD(wParam)) { - case EN_SETFOCUS: - got_en_setfocus = 1; - break; - } - break; - case WM_CAPTURECHANGED: - if (hWnd != (HWND)lParam) - { - got_wm_capturechanged = 1; - pEndMenu(); - } - break; - } - return DefWindowProcA(hWnd, msg, wParam, lParam); -} - -static void test_contextmenu_focus(void) -{ - HWND hwndMain, hwndEdit; - - hwndMain = CreateWindow(szEditTest4Class, "ET4", WS_OVERLAPPEDWINDOW|WS_VISIBLE, - 0, 0, 200, 200, NULL, NULL, hinst, NULL); - assert(hwndMain); - - hwndEdit = CreateWindow("EDIT", NULL, - WS_CHILD|WS_BORDER|WS_VISIBLE|ES_LEFT|ES_AUTOHSCROLL, - 0, 0, 150, 50, /* important this not be 0 size. */ - hwndMain, (HMENU) ID_EDITTEST2, hinst, NULL); - assert(hwndEdit); - - SetFocus(NULL); - - SetCapture(hwndMain); - - SendMessage(hwndEdit, WM_CONTEXTMENU, (WPARAM)hwndEdit, MAKEWORD(10, 10)); - - ok(got_en_setfocus, "edit box didn't get focused\n"); - - ok(got_wm_capturechanged, "main window capture did not change\n"); - - DestroyWindow (hwndEdit); - DestroyWindow (hwndMain); -} - -static BOOL RegisterWindowClasses (void) -{ - WNDCLASSA test2; - WNDCLASSA test3; - WNDCLASSA test4; - WNDCLASSA text_position; - - test2.style = 0; - test2.lpfnWndProc = ET2_WndProc; - test2.cbClsExtra = 0; - test2.cbWndExtra = 0; - test2.hInstance = hinst; - test2.hIcon = NULL; - test2.hCursor = LoadCursorA (NULL, IDC_ARROW); - test2.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); - test2.lpszMenuName = NULL; - test2.lpszClassName = szEditTest2Class; - if (!RegisterClassA(&test2)) return FALSE; - - test3.style = 0; - test3.lpfnWndProc = edit3_wnd_procA; - test3.cbClsExtra = 0; - test3.cbWndExtra = 0; - test3.hInstance = hinst; - test3.hIcon = 0; - test3.hCursor = LoadCursorA(0, IDC_ARROW); - test3.hbrBackground = GetStockObject(WHITE_BRUSH); - test3.lpszMenuName = NULL; - test3.lpszClassName = szEditTest3Class; - if (!RegisterClassA(&test3)) return FALSE; - - test4.style = 0; - test4.lpfnWndProc = edit4_wnd_procA; - test4.cbClsExtra = 0; - test4.cbWndExtra = 0; - test4.hInstance = hinst; - test4.hIcon = NULL; - test4.hCursor = LoadCursorA (NULL, IDC_ARROW); - test4.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); - test4.lpszMenuName = NULL; - test4.lpszClassName = szEditTest4Class; - if (!RegisterClassA(&test4)) return FALSE; - - text_position.style = CS_HREDRAW | CS_VREDRAW; - text_position.cbClsExtra = 0; - text_position.cbWndExtra = 0; - text_position.hInstance = hinst; - text_position.hIcon = NULL; - text_position.hCursor = LoadCursorA(NULL, IDC_ARROW); - text_position.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); - text_position.lpszMenuName = NULL; - text_position.lpszClassName = szEditTextPositionClass; - text_position.lpfnWndProc = DefWindowProc; - if (!RegisterClassA(&text_position)) return FALSE; - - return TRUE; -} - -static void UnregisterWindowClasses (void) -{ - UnregisterClassA(szEditTest2Class, hinst); - UnregisterClassA(szEditTest3Class, hinst); - UnregisterClassA(szEditTest4Class, hinst); - UnregisterClassA(szEditTextPositionClass, hinst); -} - -static void test_fontsize(void) -{ - HWND hwEdit; - HFONT hfont; - HDC hDC; - LOGFONT lf; - LONG r; - char szLocalString[MAXLEN]; - int dpi; - - hDC = GetDC(NULL); - dpi = GetDeviceCaps(hDC, LOGPIXELSY); - ReleaseDC(NULL, hDC); - - memset(&lf,0,sizeof(LOGFONTA)); - strcpy(lf.lfFaceName,"Arial"); - lf.lfHeight = -300; /* taller than the edit box */ - lf.lfWeight = 500; - hfont = CreateFontIndirect(&lf); - - trace("EDIT: Oversized font (Multi line)\n"); - hwEdit= CreateWindow("EDIT", NULL, ES_MULTILINE|ES_AUTOHSCROLL, - 0, 0, (150 * dpi) / 96, (50 * dpi) / 96, NULL, NULL, - hinst, NULL); - - SendMessage(hwEdit,WM_SETFONT,(WPARAM)hfont,0); - - if (winetest_interactive) - ShowWindow (hwEdit, SW_SHOW); - - r = SendMessage(hwEdit, WM_CHAR, 'A', 1); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); - r = SendMessage(hwEdit, WM_CHAR, 'B', 1); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); - r = SendMessage(hwEdit, WM_CHAR, 'C', 1); - ok(1 == r, "Expected: %d, got: %d\n", 1, r); - - GetWindowText(hwEdit, szLocalString, MAXLEN); - ok(lstrcmp(szLocalString, "ABC")==0, - "Wrong contents of edit: %s\n", szLocalString); - - r = SendMessage(hwEdit, EM_POSFROMCHAR,0,0); - ok(r != -1,"EM_POSFROMCHAR failed index 0\n"); - r = SendMessage(hwEdit, EM_POSFROMCHAR,1,0); - ok(r != -1,"EM_POSFROMCHAR failed index 1\n"); - r = SendMessage(hwEdit, EM_POSFROMCHAR,2,0); - ok(r != -1,"EM_POSFROMCHAR failed index 2\n"); - r = SendMessage(hwEdit, EM_POSFROMCHAR,3,0); - ok(r == -1,"EM_POSFROMCHAR succeeded index 3\n"); - - DestroyWindow (hwEdit); - DeleteObject(hfont); -} - -struct dialog_mode_messages -{ - int wm_getdefid, wm_close, wm_command, wm_nextdlgctl; -}; - -static struct dialog_mode_messages dm_messages; - -static void zero_dm_messages(void) -{ - dm_messages.wm_command = 0; - dm_messages.wm_close = 0; - dm_messages.wm_getdefid = 0; - dm_messages.wm_nextdlgctl = 0; -} - -#define test_dm_messages(wmcommand, wmclose, wmgetdefid, wmnextdlgctl) \ - ok(dm_messages.wm_command == wmcommand, "expected %d WM_COMMAND messages, " \ - "got %d\n", wmcommand, dm_messages.wm_command); \ - ok(dm_messages.wm_close == wmclose, "expected %d WM_CLOSE messages, " \ - "got %d\n", wmclose, dm_messages.wm_close); \ - ok(dm_messages.wm_getdefid == wmgetdefid, "expected %d WM_GETDIFID messages, " \ - "got %d\n", wmgetdefid, dm_messages.wm_getdefid);\ - ok(dm_messages.wm_nextdlgctl == wmnextdlgctl, "expected %d WM_NEXTDLGCTL messages, " \ - "got %d\n", wmnextdlgctl, dm_messages.wm_nextdlgctl) - -static LRESULT CALLBACK dialog_mode_wnd_proc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) -{ - switch (iMsg) - { - case WM_COMMAND: - dm_messages.wm_command++; - break; - case DM_GETDEFID: - dm_messages.wm_getdefid++; - return MAKELONG(ID_EDITTESTDBUTTON, DC_HASDEFID); - case WM_NEXTDLGCTL: - dm_messages.wm_nextdlgctl++; - break; - case WM_CLOSE: - dm_messages.wm_close++; - break; - } - - return DefWindowProc(hwnd, iMsg, wParam, lParam); -} - -static void test_dialogmode(void) -{ - HWND hwEdit, hwParent, hwButton; - MSG msg= {0}; - int len, r; - hwEdit = create_child_editcontrol(ES_MULTILINE, 0); - - r = SendMessage(hwEdit, WM_CHAR, VK_RETURN, 0x1c0001); - ok(1 == r, "expected 1, got %d\n", r); - len = SendMessage(hwEdit, WM_GETTEXTLENGTH, 0, 0); - ok(11 == len, "expected 11, got %d\n", len); - - r = SendMessage(hwEdit, WM_GETDLGCODE, 0, 0); - ok(0x8d == r, "expected 0x8d, got 0x%x\n", r); - - r = SendMessage(hwEdit, WM_CHAR, VK_RETURN, 0x1c0001); - ok(1 == r, "expected 1, got %d\n", r); - len = SendMessage(hwEdit, WM_GETTEXTLENGTH, 0, 0); - ok(13 == len, "expected 13, got %d\n", len); - - r = SendMessage(hwEdit, WM_GETDLGCODE, 0, (LPARAM)&msg); - ok(0x8d == r, "expected 0x8d, got 0x%x\n", r); - r = SendMessage(hwEdit, WM_CHAR, VK_RETURN, 0x1c0001); - ok(1 == r, "expected 1, got %d\n", r); - len = SendMessage(hwEdit, WM_GETTEXTLENGTH, 0, 0); - ok(13 == len, "expected 13, got %d\n", len); - - r = SendMessage(hwEdit, WM_CHAR, VK_RETURN, 0x1c0001); - ok(1 == r, "expected 1, got %d\n", r); - len = SendMessage(hwEdit, WM_GETTEXTLENGTH, 0, 0); - ok(13 == len, "expected 13, got %d\n", len); - - destroy_child_editcontrol(hwEdit); - - hwEdit = create_editcontrol(ES_MULTILINE, 0); - - r = SendMessage(hwEdit, WM_CHAR, VK_RETURN, 0x1c0001); - ok(1 == r, "expected 1, got %d\n", r); - len = SendMessage(hwEdit, WM_GETTEXTLENGTH, 0, 0); - ok(11 == len, "expected 11, got %d\n", len); - - msg.hwnd = hwEdit; - msg.message = WM_KEYDOWN; - msg.wParam = VK_BACK; - msg.lParam = 0xe0001; - r = SendMessage(hwEdit, WM_GETDLGCODE, VK_BACK, (LPARAM)&msg); - ok(0x8d == r, "expected 0x8d, got 0x%x\n", r); - - r = SendMessage(hwEdit, WM_CHAR, VK_RETURN, 0x1c0001); - ok(1 == r, "expected 1, got %d\n", r); - len = SendMessage(hwEdit, WM_GETTEXTLENGTH, 0, 0); - ok(11 == len, "expected 11, got %d\n", len); - - DestroyWindow(hwEdit); - - hwEdit = create_child_editcontrol(0, 0); - hwParent = GetParent(hwEdit); - SetWindowLongPtr(hwParent, GWLP_WNDPROC, (LONG_PTR)dialog_mode_wnd_proc); - - zero_dm_messages(); - r = SendMessage(hwEdit, WM_KEYDOWN, VK_ESCAPE, 0x10001); - ok(1 == r, "expected 1, got %d\n", r); - test_dm_messages(0, 0, 0, 0); - zero_dm_messages(); - - r = SendMessage(hwEdit, WM_KEYDOWN, VK_TAB, 0xf0001); - ok(1 == r, "expected 1, got %d\n", r); - test_dm_messages(0, 0, 0, 0); - zero_dm_messages(); - - msg.hwnd = hwEdit; - msg.message = WM_KEYDOWN; - msg.wParam = VK_TAB; - msg.lParam = 0xf0001; - r = SendMessage(hwEdit, WM_GETDLGCODE, VK_TAB, (LPARAM)&msg); - ok(0x89 == r, "expected 0x89, got 0x%x\n", r); - test_dm_messages(0, 0, 0, 0); - zero_dm_messages(); - - r = SendMessage(hwEdit, WM_KEYDOWN, VK_TAB, 0xf0001); - ok(1 == r, "expected 1, got %d\n", r); - test_dm_messages(0, 0, 0, 0); - zero_dm_messages(); - - destroy_child_editcontrol(hwEdit); - - hwEdit = create_child_editcontrol(ES_MULTILINE, 0); - hwParent = GetParent(hwEdit); - SetWindowLongPtr(hwParent, GWLP_WNDPROC, (LONG_PTR)dialog_mode_wnd_proc); - - r = SendMessage(hwEdit, WM_KEYDOWN, VK_TAB, 0xf0001); - ok(1 == r, "expected 1, got %d\n", r); - test_dm_messages(0, 0, 0, 0); - zero_dm_messages(); - - msg.hwnd = hwEdit; - msg.message = WM_KEYDOWN; - msg.wParam = VK_ESCAPE; - msg.lParam = 0x10001; - r = SendMessage(hwEdit, WM_GETDLGCODE, VK_ESCAPE, (LPARAM)&msg); - ok(0x8d == r, "expected 0x8d, got 0x%x\n", r); - test_dm_messages(0, 0, 0, 0); - zero_dm_messages(); - - r = SendMessage(hwEdit, WM_KEYDOWN, VK_ESCAPE, 0x10001); - ok(1 == r, "expected 1, got %d\n", r); - test_dm_messages(0, 0, 0, 0); - zero_dm_messages(); - - r = SendMessage(hwEdit, WM_KEYDOWN, VK_TAB, 0xf0001); - ok(1 == r, "expected 1, got %d\n", r); - test_dm_messages(0, 0, 0, 1); - zero_dm_messages(); - - r = SendMessage(hwEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - ok(1 == r, "expected 1, got %d\n", r); - test_dm_messages(0, 0, 1, 0); - zero_dm_messages(); - - hwButton = CreateWindow("BUTTON", "OK", WS_VISIBLE|WS_CHILD|BS_PUSHBUTTON, - 100, 100, 50, 20, hwParent, (HMENU)ID_EDITTESTDBUTTON, hinst, NULL); - ok(hwButton!=NULL, "CreateWindow failed with error code %d\n", GetLastError()); - - r = SendMessage(hwEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); - ok(1 == r, "expected 1, got %d\n", r); - test_dm_messages(0, 0, 1, 1); - zero_dm_messages(); - - DestroyWindow(hwButton); - destroy_child_editcontrol(hwEdit); -} - -START_TEST(edit) -{ - BOOL b; - - init_function_pointers(); - - hinst = GetModuleHandleA(NULL); - b = RegisterWindowClasses(); - ok (b, "RegisterWindowClasses failed\n"); - if (!b) return; - - test_edit_control_1(); - test_edit_control_2(); - test_edit_control_3(); - test_edit_control_4(); - test_edit_control_5(); - test_edit_control_6(); - test_edit_control_limittext(); - test_edit_control_scroll(); - test_margins(); - test_margins_font_change(); - test_text_position(); - test_espassword(); - test_undo(); - test_enter(); - test_tab(); - test_edit_dialog(); - test_multi_edit_dialog(); - test_wantreturn_edit_dialog(); - test_singleline_wantreturn_edit_dialog(); - test_child_edit_wmkeydown(); - test_fontsize(); - test_dialogmode(); - if (pEndMenu) - test_contextmenu_focus(); - else - win_skip("EndMenu is not available\n"); - - UnregisterWindowClasses(); -} diff --git a/rostests/winetests/user32/generated.c b/rostests/winetests/user32/generated.c deleted file mode 100644 index c8e8b5542be..00000000000 --- a/rostests/winetests/user32/generated.c +++ /dev/null @@ -1,7329 +0,0 @@ -/* File generated automatically from tools/winapi/tests.dat; do not edit! */ -/* This file can be copied, modified and distributed without restriction. */ - -/* - * Unit tests for data structure packing - */ - -//#define WINVER 0x0501 -//#define _WIN32_IE 0x0501 -//#define _WIN32_WINNT 0x0501 - -#define WINE_NOWINSOCK - -#include "windows.h" - -#include "wine/test.h" - -/*********************************************************************** - * Compatibility macros - */ - -#define DWORD_PTR UINT_PTR -#define LONG_PTR INT_PTR -#define ULONG_PTR UINT_PTR - -/*********************************************************************** - * Windows API extension - */ - -#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus) -# define _TYPE_ALIGNMENT(type) __alignof(type) -#elif defined(__GNUC__) -# define _TYPE_ALIGNMENT(type) __alignof__(type) -#else -/* - * FIXME: May not be possible without a compiler extension - * (if type is not just a name that is, otherwise the normal - * TYPE_ALIGNMENT can be used) - */ -#endif - -#if defined(TYPE_ALIGNMENT) && defined(_MSC_VER) && _MSC_VER >= 800 && !defined(__cplusplus) -#pragma warning(disable:4116) -#endif - -#if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT) -# define TYPE_ALIGNMENT _TYPE_ALIGNMENT -#endif - -/*********************************************************************** - * Test helper macros - */ - -#define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size); - -#ifdef TYPE_ALIGNMENT -# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align); -#else -# define TEST_TYPE_ALIGN(type, align) -#endif - -#ifdef _TYPE_ALIGNMENT -# define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align); -# define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align); -#else -# define TEST_TARGET_ALIGN(type, align) -# define TEST_FIELD_ALIGN(type, field, align) -#endif - -#define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset); - -#define TEST_TARGET_SIZE(type, size) TEST_TYPE_SIZE(*(type)0, size) -#define TEST_FIELD_SIZE(type, field, size) TEST_TYPE_SIZE((((type*)0)->field), size) -#define TEST_TYPE_SIGNED(type) C_ASSERT((type) -1 < 0); -#define TEST_TYPE_UNSIGNED(type) C_ASSERT((type) -1 > 0); - - -#ifdef _WIN64 - -static void test_pack_ACCESSTIMEOUT(void) -{ - /* ACCESSTIMEOUT */ - TEST_TYPE_SIZE (ACCESSTIMEOUT, 12) - TEST_TYPE_ALIGN (ACCESSTIMEOUT, 4) - TEST_FIELD_SIZE (ACCESSTIMEOUT, cbSize, 4) - TEST_FIELD_ALIGN (ACCESSTIMEOUT, cbSize, 4) - TEST_FIELD_OFFSET(ACCESSTIMEOUT, cbSize, 0) - TEST_FIELD_SIZE (ACCESSTIMEOUT, dwFlags, 4) - TEST_FIELD_ALIGN (ACCESSTIMEOUT, dwFlags, 4) - TEST_FIELD_OFFSET(ACCESSTIMEOUT, dwFlags, 4) - TEST_FIELD_SIZE (ACCESSTIMEOUT, iTimeOutMSec, 4) - TEST_FIELD_ALIGN (ACCESSTIMEOUT, iTimeOutMSec, 4) - TEST_FIELD_OFFSET(ACCESSTIMEOUT, iTimeOutMSec, 8) -} - -static void test_pack_ANIMATIONINFO(void) -{ - /* ANIMATIONINFO */ - TEST_TYPE_SIZE (ANIMATIONINFO, 8) - TEST_TYPE_ALIGN (ANIMATIONINFO, 4) - TEST_FIELD_SIZE (ANIMATIONINFO, cbSize, 4) - TEST_FIELD_ALIGN (ANIMATIONINFO, cbSize, 4) - TEST_FIELD_OFFSET(ANIMATIONINFO, cbSize, 0) - TEST_FIELD_SIZE (ANIMATIONINFO, iMinAnimate, 4) - TEST_FIELD_ALIGN (ANIMATIONINFO, iMinAnimate, 4) - TEST_FIELD_OFFSET(ANIMATIONINFO, iMinAnimate, 4) -} - -static void test_pack_CBTACTIVATESTRUCT(void) -{ - /* CBTACTIVATESTRUCT */ - TEST_TYPE_SIZE (CBTACTIVATESTRUCT, 16) - TEST_TYPE_ALIGN (CBTACTIVATESTRUCT, 8) - TEST_FIELD_SIZE (CBTACTIVATESTRUCT, fMouse, 4) - TEST_FIELD_ALIGN (CBTACTIVATESTRUCT, fMouse, 4) - TEST_FIELD_OFFSET(CBTACTIVATESTRUCT, fMouse, 0) - TEST_FIELD_SIZE (CBTACTIVATESTRUCT, hWndActive, 8) - TEST_FIELD_ALIGN (CBTACTIVATESTRUCT, hWndActive, 8) - TEST_FIELD_OFFSET(CBTACTIVATESTRUCT, hWndActive, 8) -} - -static void test_pack_CBT_CREATEWNDA(void) -{ - /* CBT_CREATEWNDA */ - TEST_TYPE_SIZE (CBT_CREATEWNDA, 16) - TEST_TYPE_ALIGN (CBT_CREATEWNDA, 8) - TEST_FIELD_SIZE (CBT_CREATEWNDA, lpcs, 8) - TEST_FIELD_ALIGN (CBT_CREATEWNDA, lpcs, 8) - TEST_FIELD_OFFSET(CBT_CREATEWNDA, lpcs, 0) - TEST_FIELD_SIZE (CBT_CREATEWNDA, hwndInsertAfter, 8) - TEST_FIELD_ALIGN (CBT_CREATEWNDA, hwndInsertAfter, 8) - TEST_FIELD_OFFSET(CBT_CREATEWNDA, hwndInsertAfter, 8) -} - -static void test_pack_CBT_CREATEWNDW(void) -{ - /* CBT_CREATEWNDW */ - TEST_TYPE_SIZE (CBT_CREATEWNDW, 16) - TEST_TYPE_ALIGN (CBT_CREATEWNDW, 8) - TEST_FIELD_SIZE (CBT_CREATEWNDW, lpcs, 8) - TEST_FIELD_ALIGN (CBT_CREATEWNDW, lpcs, 8) - TEST_FIELD_OFFSET(CBT_CREATEWNDW, lpcs, 0) - TEST_FIELD_SIZE (CBT_CREATEWNDW, hwndInsertAfter, 8) - TEST_FIELD_ALIGN (CBT_CREATEWNDW, hwndInsertAfter, 8) - TEST_FIELD_OFFSET(CBT_CREATEWNDW, hwndInsertAfter, 8) -} - -static void test_pack_CLIENTCREATESTRUCT(void) -{ - /* CLIENTCREATESTRUCT */ - TEST_TYPE_SIZE (CLIENTCREATESTRUCT, 16) - TEST_TYPE_ALIGN (CLIENTCREATESTRUCT, 8) - TEST_FIELD_SIZE (CLIENTCREATESTRUCT, hWindowMenu, 8) - TEST_FIELD_ALIGN (CLIENTCREATESTRUCT, hWindowMenu, 8) - TEST_FIELD_OFFSET(CLIENTCREATESTRUCT, hWindowMenu, 0) - TEST_FIELD_SIZE (CLIENTCREATESTRUCT, idFirstChild, 4) - TEST_FIELD_ALIGN (CLIENTCREATESTRUCT, idFirstChild, 4) - TEST_FIELD_OFFSET(CLIENTCREATESTRUCT, idFirstChild, 8) -} - -static void test_pack_COMBOBOXINFO(void) -{ - /* COMBOBOXINFO */ - TEST_TYPE_SIZE (COMBOBOXINFO, 64) - TEST_TYPE_ALIGN (COMBOBOXINFO, 8) - TEST_FIELD_SIZE (COMBOBOXINFO, cbSize, 4) - TEST_FIELD_ALIGN (COMBOBOXINFO, cbSize, 4) - TEST_FIELD_OFFSET(COMBOBOXINFO, cbSize, 0) - TEST_FIELD_SIZE (COMBOBOXINFO, rcItem, 16) - TEST_FIELD_ALIGN (COMBOBOXINFO, rcItem, 4) - TEST_FIELD_OFFSET(COMBOBOXINFO, rcItem, 4) - TEST_FIELD_SIZE (COMBOBOXINFO, rcButton, 16) - TEST_FIELD_ALIGN (COMBOBOXINFO, rcButton, 4) - TEST_FIELD_OFFSET(COMBOBOXINFO, rcButton, 20) - TEST_FIELD_SIZE (COMBOBOXINFO, stateButton, 4) - TEST_FIELD_ALIGN (COMBOBOXINFO, stateButton, 4) - TEST_FIELD_OFFSET(COMBOBOXINFO, stateButton, 36) - TEST_FIELD_SIZE (COMBOBOXINFO, hwndCombo, 8) - TEST_FIELD_ALIGN (COMBOBOXINFO, hwndCombo, 8) - TEST_FIELD_OFFSET(COMBOBOXINFO, hwndCombo, 40) - TEST_FIELD_SIZE (COMBOBOXINFO, hwndItem, 8) - TEST_FIELD_ALIGN (COMBOBOXINFO, hwndItem, 8) - TEST_FIELD_OFFSET(COMBOBOXINFO, hwndItem, 48) - TEST_FIELD_SIZE (COMBOBOXINFO, hwndList, 8) - TEST_FIELD_ALIGN (COMBOBOXINFO, hwndList, 8) - TEST_FIELD_OFFSET(COMBOBOXINFO, hwndList, 56) -} - -static void test_pack_COMPAREITEMSTRUCT(void) -{ - /* COMPAREITEMSTRUCT */ - TEST_TYPE_SIZE (COMPAREITEMSTRUCT, 56) - TEST_TYPE_ALIGN (COMPAREITEMSTRUCT, 8) - TEST_FIELD_SIZE (COMPAREITEMSTRUCT, CtlType, 4) - TEST_FIELD_ALIGN (COMPAREITEMSTRUCT, CtlType, 4) - TEST_FIELD_OFFSET(COMPAREITEMSTRUCT, CtlType, 0) - TEST_FIELD_SIZE (COMPAREITEMSTRUCT, CtlID, 4) - TEST_FIELD_ALIGN (COMPAREITEMSTRUCT, CtlID, 4) - TEST_FIELD_OFFSET(COMPAREITEMSTRUCT, CtlID, 4) - TEST_FIELD_SIZE (COMPAREITEMSTRUCT, hwndItem, 8) - TEST_FIELD_ALIGN (COMPAREITEMSTRUCT, hwndItem, 8) - TEST_FIELD_OFFSET(COMPAREITEMSTRUCT, hwndItem, 8) - TEST_FIELD_SIZE (COMPAREITEMSTRUCT, itemID1, 4) - TEST_FIELD_ALIGN (COMPAREITEMSTRUCT, itemID1, 4) - TEST_FIELD_OFFSET(COMPAREITEMSTRUCT, itemID1, 16) - TEST_FIELD_SIZE (COMPAREITEMSTRUCT, itemData1, 8) - TEST_FIELD_ALIGN (COMPAREITEMSTRUCT, itemData1, 8) - TEST_FIELD_OFFSET(COMPAREITEMSTRUCT, itemData1, 24) - TEST_FIELD_SIZE (COMPAREITEMSTRUCT, itemID2, 4) - TEST_FIELD_ALIGN (COMPAREITEMSTRUCT, itemID2, 4) - TEST_FIELD_OFFSET(COMPAREITEMSTRUCT, itemID2, 32) - TEST_FIELD_SIZE (COMPAREITEMSTRUCT, itemData2, 8) - TEST_FIELD_ALIGN (COMPAREITEMSTRUCT, itemData2, 8) - TEST_FIELD_OFFSET(COMPAREITEMSTRUCT, itemData2, 40) - TEST_FIELD_SIZE (COMPAREITEMSTRUCT, dwLocaleId, 4) - TEST_FIELD_ALIGN (COMPAREITEMSTRUCT, dwLocaleId, 4) - TEST_FIELD_OFFSET(COMPAREITEMSTRUCT, dwLocaleId, 48) -} - -static void test_pack_COPYDATASTRUCT(void) -{ - /* COPYDATASTRUCT */ - TEST_TYPE_SIZE (COPYDATASTRUCT, 24) - TEST_TYPE_ALIGN (COPYDATASTRUCT, 8) - TEST_FIELD_SIZE (COPYDATASTRUCT, dwData, 8) - TEST_FIELD_ALIGN (COPYDATASTRUCT, dwData, 8) - TEST_FIELD_OFFSET(COPYDATASTRUCT, dwData, 0) - TEST_FIELD_SIZE (COPYDATASTRUCT, cbData, 4) - TEST_FIELD_ALIGN (COPYDATASTRUCT, cbData, 4) - TEST_FIELD_OFFSET(COPYDATASTRUCT, cbData, 8) - TEST_FIELD_SIZE (COPYDATASTRUCT, lpData, 8) - TEST_FIELD_ALIGN (COPYDATASTRUCT, lpData, 8) - TEST_FIELD_OFFSET(COPYDATASTRUCT, lpData, 16) -} - -static void test_pack_CREATESTRUCTA(void) -{ - /* CREATESTRUCTA */ - TEST_TYPE_SIZE (CREATESTRUCTA, 80) - TEST_TYPE_ALIGN (CREATESTRUCTA, 8) - TEST_FIELD_SIZE (CREATESTRUCTA, lpCreateParams, 8) - TEST_FIELD_ALIGN (CREATESTRUCTA, lpCreateParams, 8) - TEST_FIELD_OFFSET(CREATESTRUCTA, lpCreateParams, 0) - TEST_FIELD_SIZE (CREATESTRUCTA, hInstance, 8) - TEST_FIELD_ALIGN (CREATESTRUCTA, hInstance, 8) - TEST_FIELD_OFFSET(CREATESTRUCTA, hInstance, 8) - TEST_FIELD_SIZE (CREATESTRUCTA, hMenu, 8) - TEST_FIELD_ALIGN (CREATESTRUCTA, hMenu, 8) - TEST_FIELD_OFFSET(CREATESTRUCTA, hMenu, 16) - TEST_FIELD_SIZE (CREATESTRUCTA, hwndParent, 8) - TEST_FIELD_ALIGN (CREATESTRUCTA, hwndParent, 8) - TEST_FIELD_OFFSET(CREATESTRUCTA, hwndParent, 24) - TEST_FIELD_SIZE (CREATESTRUCTA, cy, 4) - TEST_FIELD_ALIGN (CREATESTRUCTA, cy, 4) - TEST_FIELD_OFFSET(CREATESTRUCTA, cy, 32) - TEST_FIELD_SIZE (CREATESTRUCTA, cx, 4) - TEST_FIELD_ALIGN (CREATESTRUCTA, cx, 4) - TEST_FIELD_OFFSET(CREATESTRUCTA, cx, 36) - TEST_FIELD_SIZE (CREATESTRUCTA, y, 4) - TEST_FIELD_ALIGN (CREATESTRUCTA, y, 4) - TEST_FIELD_OFFSET(CREATESTRUCTA, y, 40) - TEST_FIELD_SIZE (CREATESTRUCTA, x, 4) - TEST_FIELD_ALIGN (CREATESTRUCTA, x, 4) - TEST_FIELD_OFFSET(CREATESTRUCTA, x, 44) - TEST_FIELD_SIZE (CREATESTRUCTA, style, 4) - TEST_FIELD_ALIGN (CREATESTRUCTA, style, 4) - TEST_FIELD_OFFSET(CREATESTRUCTA, style, 48) - TEST_FIELD_SIZE (CREATESTRUCTA, lpszName, 8) - TEST_FIELD_ALIGN (CREATESTRUCTA, lpszName, 8) - TEST_FIELD_OFFSET(CREATESTRUCTA, lpszName, 56) - TEST_FIELD_SIZE (CREATESTRUCTA, lpszClass, 8) - TEST_FIELD_ALIGN (CREATESTRUCTA, lpszClass, 8) - TEST_FIELD_OFFSET(CREATESTRUCTA, lpszClass, 64) - TEST_FIELD_SIZE (CREATESTRUCTA, dwExStyle, 4) - TEST_FIELD_ALIGN (CREATESTRUCTA, dwExStyle, 4) - TEST_FIELD_OFFSET(CREATESTRUCTA, dwExStyle, 72) -} - -static void test_pack_CREATESTRUCTW(void) -{ - /* CREATESTRUCTW */ - TEST_TYPE_SIZE (CREATESTRUCTW, 80) - TEST_TYPE_ALIGN (CREATESTRUCTW, 8) - TEST_FIELD_SIZE (CREATESTRUCTW, lpCreateParams, 8) - TEST_FIELD_ALIGN (CREATESTRUCTW, lpCreateParams, 8) - TEST_FIELD_OFFSET(CREATESTRUCTW, lpCreateParams, 0) - TEST_FIELD_SIZE (CREATESTRUCTW, hInstance, 8) - TEST_FIELD_ALIGN (CREATESTRUCTW, hInstance, 8) - TEST_FIELD_OFFSET(CREATESTRUCTW, hInstance, 8) - TEST_FIELD_SIZE (CREATESTRUCTW, hMenu, 8) - TEST_FIELD_ALIGN (CREATESTRUCTW, hMenu, 8) - TEST_FIELD_OFFSET(CREATESTRUCTW, hMenu, 16) - TEST_FIELD_SIZE (CREATESTRUCTW, hwndParent, 8) - TEST_FIELD_ALIGN (CREATESTRUCTW, hwndParent, 8) - TEST_FIELD_OFFSET(CREATESTRUCTW, hwndParent, 24) - TEST_FIELD_SIZE (CREATESTRUCTW, cy, 4) - TEST_FIELD_ALIGN (CREATESTRUCTW, cy, 4) - TEST_FIELD_OFFSET(CREATESTRUCTW, cy, 32) - TEST_FIELD_SIZE (CREATESTRUCTW, cx, 4) - TEST_FIELD_ALIGN (CREATESTRUCTW, cx, 4) - TEST_FIELD_OFFSET(CREATESTRUCTW, cx, 36) - TEST_FIELD_SIZE (CREATESTRUCTW, y, 4) - TEST_FIELD_ALIGN (CREATESTRUCTW, y, 4) - TEST_FIELD_OFFSET(CREATESTRUCTW, y, 40) - TEST_FIELD_SIZE (CREATESTRUCTW, x, 4) - TEST_FIELD_ALIGN (CREATESTRUCTW, x, 4) - TEST_FIELD_OFFSET(CREATESTRUCTW, x, 44) - TEST_FIELD_SIZE (CREATESTRUCTW, style, 4) - TEST_FIELD_ALIGN (CREATESTRUCTW, style, 4) - TEST_FIELD_OFFSET(CREATESTRUCTW, style, 48) - TEST_FIELD_SIZE (CREATESTRUCTW, lpszName, 8) - TEST_FIELD_ALIGN (CREATESTRUCTW, lpszName, 8) - TEST_FIELD_OFFSET(CREATESTRUCTW, lpszName, 56) - TEST_FIELD_SIZE (CREATESTRUCTW, lpszClass, 8) - TEST_FIELD_ALIGN (CREATESTRUCTW, lpszClass, 8) - TEST_FIELD_OFFSET(CREATESTRUCTW, lpszClass, 64) - TEST_FIELD_SIZE (CREATESTRUCTW, dwExStyle, 4) - TEST_FIELD_ALIGN (CREATESTRUCTW, dwExStyle, 4) - TEST_FIELD_OFFSET(CREATESTRUCTW, dwExStyle, 72) -} - -static void test_pack_CURSORINFO(void) -{ - /* CURSORINFO */ - TEST_TYPE_SIZE (CURSORINFO, 24) - TEST_TYPE_ALIGN (CURSORINFO, 8) - TEST_FIELD_SIZE (CURSORINFO, cbSize, 4) - TEST_FIELD_ALIGN (CURSORINFO, cbSize, 4) - TEST_FIELD_OFFSET(CURSORINFO, cbSize, 0) - TEST_FIELD_SIZE (CURSORINFO, flags, 4) - TEST_FIELD_ALIGN (CURSORINFO, flags, 4) - TEST_FIELD_OFFSET(CURSORINFO, flags, 4) - TEST_FIELD_SIZE (CURSORINFO, hCursor, 8) - TEST_FIELD_ALIGN (CURSORINFO, hCursor, 8) - TEST_FIELD_OFFSET(CURSORINFO, hCursor, 8) - TEST_FIELD_SIZE (CURSORINFO, ptScreenPos, 8) - TEST_FIELD_ALIGN (CURSORINFO, ptScreenPos, 4) - TEST_FIELD_OFFSET(CURSORINFO, ptScreenPos, 16) -} - -static void test_pack_CWPRETSTRUCT(void) -{ - /* CWPRETSTRUCT */ - TEST_TYPE_SIZE (CWPRETSTRUCT, 40) - TEST_TYPE_ALIGN (CWPRETSTRUCT, 8) - TEST_FIELD_SIZE (CWPRETSTRUCT, lResult, 8) - TEST_FIELD_ALIGN (CWPRETSTRUCT, lResult, 8) - TEST_FIELD_OFFSET(CWPRETSTRUCT, lResult, 0) - TEST_FIELD_SIZE (CWPRETSTRUCT, lParam, 8) - TEST_FIELD_ALIGN (CWPRETSTRUCT, lParam, 8) - TEST_FIELD_OFFSET(CWPRETSTRUCT, lParam, 8) - TEST_FIELD_SIZE (CWPRETSTRUCT, wParam, 8) - TEST_FIELD_ALIGN (CWPRETSTRUCT, wParam, 8) - TEST_FIELD_OFFSET(CWPRETSTRUCT, wParam, 16) - TEST_FIELD_SIZE (CWPRETSTRUCT, message, 4) - TEST_FIELD_ALIGN (CWPRETSTRUCT, message, 4) - TEST_FIELD_OFFSET(CWPRETSTRUCT, message, 24) - TEST_FIELD_SIZE (CWPRETSTRUCT, hwnd, 8) - TEST_FIELD_ALIGN (CWPRETSTRUCT, hwnd, 8) - TEST_FIELD_OFFSET(CWPRETSTRUCT, hwnd, 32) -} - -static void test_pack_CWPSTRUCT(void) -{ - /* CWPSTRUCT */ - TEST_TYPE_SIZE (CWPSTRUCT, 32) - TEST_TYPE_ALIGN (CWPSTRUCT, 8) - TEST_FIELD_SIZE (CWPSTRUCT, lParam, 8) - TEST_FIELD_ALIGN (CWPSTRUCT, lParam, 8) - TEST_FIELD_OFFSET(CWPSTRUCT, lParam, 0) - TEST_FIELD_SIZE (CWPSTRUCT, wParam, 8) - TEST_FIELD_ALIGN (CWPSTRUCT, wParam, 8) - TEST_FIELD_OFFSET(CWPSTRUCT, wParam, 8) - TEST_FIELD_SIZE (CWPSTRUCT, message, 4) - TEST_FIELD_ALIGN (CWPSTRUCT, message, 4) - TEST_FIELD_OFFSET(CWPSTRUCT, message, 16) - TEST_FIELD_SIZE (CWPSTRUCT, hwnd, 8) - TEST_FIELD_ALIGN (CWPSTRUCT, hwnd, 8) - TEST_FIELD_OFFSET(CWPSTRUCT, hwnd, 24) -} - -static void test_pack_DEBUGHOOKINFO(void) -{ - /* DEBUGHOOKINFO */ - TEST_TYPE_SIZE (DEBUGHOOKINFO, 32) - TEST_TYPE_ALIGN (DEBUGHOOKINFO, 8) - TEST_FIELD_SIZE (DEBUGHOOKINFO, idThread, 4) - TEST_FIELD_ALIGN (DEBUGHOOKINFO, idThread, 4) - TEST_FIELD_OFFSET(DEBUGHOOKINFO, idThread, 0) - TEST_FIELD_SIZE (DEBUGHOOKINFO, idThreadInstaller, 4) - TEST_FIELD_ALIGN (DEBUGHOOKINFO, idThreadInstaller, 4) - TEST_FIELD_OFFSET(DEBUGHOOKINFO, idThreadInstaller, 4) - TEST_FIELD_SIZE (DEBUGHOOKINFO, lParam, 8) - TEST_FIELD_ALIGN (DEBUGHOOKINFO, lParam, 8) - TEST_FIELD_OFFSET(DEBUGHOOKINFO, lParam, 8) - TEST_FIELD_SIZE (DEBUGHOOKINFO, wParam, 8) - TEST_FIELD_ALIGN (DEBUGHOOKINFO, wParam, 8) - TEST_FIELD_OFFSET(DEBUGHOOKINFO, wParam, 16) - TEST_FIELD_SIZE (DEBUGHOOKINFO, code, 4) - TEST_FIELD_ALIGN (DEBUGHOOKINFO, code, 4) - TEST_FIELD_OFFSET(DEBUGHOOKINFO, code, 24) -} - -static void test_pack_DELETEITEMSTRUCT(void) -{ - /* DELETEITEMSTRUCT */ - TEST_TYPE_SIZE (DELETEITEMSTRUCT, 32) - TEST_TYPE_ALIGN (DELETEITEMSTRUCT, 8) - TEST_FIELD_SIZE (DELETEITEMSTRUCT, CtlType, 4) - TEST_FIELD_ALIGN (DELETEITEMSTRUCT, CtlType, 4) - TEST_FIELD_OFFSET(DELETEITEMSTRUCT, CtlType, 0) - TEST_FIELD_SIZE (DELETEITEMSTRUCT, CtlID, 4) - TEST_FIELD_ALIGN (DELETEITEMSTRUCT, CtlID, 4) - TEST_FIELD_OFFSET(DELETEITEMSTRUCT, CtlID, 4) - TEST_FIELD_SIZE (DELETEITEMSTRUCT, itemID, 4) - TEST_FIELD_ALIGN (DELETEITEMSTRUCT, itemID, 4) - TEST_FIELD_OFFSET(DELETEITEMSTRUCT, itemID, 8) - TEST_FIELD_SIZE (DELETEITEMSTRUCT, hwndItem, 8) - TEST_FIELD_ALIGN (DELETEITEMSTRUCT, hwndItem, 8) - TEST_FIELD_OFFSET(DELETEITEMSTRUCT, hwndItem, 16) - TEST_FIELD_SIZE (DELETEITEMSTRUCT, itemData, 8) - TEST_FIELD_ALIGN (DELETEITEMSTRUCT, itemData, 8) - TEST_FIELD_OFFSET(DELETEITEMSTRUCT, itemData, 24) -} - -static void test_pack_DESKTOPENUMPROCA(void) -{ - /* DESKTOPENUMPROCA */ - TEST_TYPE_SIZE (DESKTOPENUMPROCA, 8) - TEST_TYPE_ALIGN (DESKTOPENUMPROCA, 8) -} - -static void test_pack_DESKTOPENUMPROCW(void) -{ - /* DESKTOPENUMPROCW */ - TEST_TYPE_SIZE (DESKTOPENUMPROCW, 8) - TEST_TYPE_ALIGN (DESKTOPENUMPROCW, 8) -} - -static void test_pack_DLGITEMTEMPLATE(void) -{ - /* DLGITEMTEMPLATE (pack 2) */ - TEST_TYPE_SIZE (DLGITEMTEMPLATE, 18) - TEST_TYPE_ALIGN (DLGITEMTEMPLATE, 2) - TEST_FIELD_SIZE (DLGITEMTEMPLATE, style, 4) - TEST_FIELD_ALIGN (DLGITEMTEMPLATE, style, 2) - TEST_FIELD_OFFSET(DLGITEMTEMPLATE, style, 0) - TEST_FIELD_SIZE (DLGITEMTEMPLATE, dwExtendedStyle, 4) - TEST_FIELD_ALIGN (DLGITEMTEMPLATE, dwExtendedStyle, 2) - TEST_FIELD_OFFSET(DLGITEMTEMPLATE, dwExtendedStyle, 4) - TEST_FIELD_SIZE (DLGITEMTEMPLATE, x, 2) - TEST_FIELD_ALIGN (DLGITEMTEMPLATE, x, 2) - TEST_FIELD_OFFSET(DLGITEMTEMPLATE, x, 8) - TEST_FIELD_SIZE (DLGITEMTEMPLATE, y, 2) - TEST_FIELD_ALIGN (DLGITEMTEMPLATE, y, 2) - TEST_FIELD_OFFSET(DLGITEMTEMPLATE, y, 10) - TEST_FIELD_SIZE (DLGITEMTEMPLATE, cx, 2) - TEST_FIELD_ALIGN (DLGITEMTEMPLATE, cx, 2) - TEST_FIELD_OFFSET(DLGITEMTEMPLATE, cx, 12) - TEST_FIELD_SIZE (DLGITEMTEMPLATE, cy, 2) - TEST_FIELD_ALIGN (DLGITEMTEMPLATE, cy, 2) - TEST_FIELD_OFFSET(DLGITEMTEMPLATE, cy, 14) - TEST_FIELD_SIZE (DLGITEMTEMPLATE, id, 2) - TEST_FIELD_ALIGN (DLGITEMTEMPLATE, id, 2) - TEST_FIELD_OFFSET(DLGITEMTEMPLATE, id, 16) -} - -static void test_pack_DLGPROC(void) -{ - /* DLGPROC */ - TEST_TYPE_SIZE (DLGPROC, 8) - TEST_TYPE_ALIGN (DLGPROC, 8) -} - -static void test_pack_DLGTEMPLATE(void) -{ - /* DLGTEMPLATE (pack 2) */ - TEST_TYPE_SIZE (DLGTEMPLATE, 18) - TEST_TYPE_ALIGN (DLGTEMPLATE, 2) - TEST_FIELD_SIZE (DLGTEMPLATE, style, 4) - TEST_FIELD_ALIGN (DLGTEMPLATE, style, 2) - TEST_FIELD_OFFSET(DLGTEMPLATE, style, 0) - TEST_FIELD_SIZE (DLGTEMPLATE, dwExtendedStyle, 4) - TEST_FIELD_ALIGN (DLGTEMPLATE, dwExtendedStyle, 2) - TEST_FIELD_OFFSET(DLGTEMPLATE, dwExtendedStyle, 4) - TEST_FIELD_SIZE (DLGTEMPLATE, cdit, 2) - TEST_FIELD_ALIGN (DLGTEMPLATE, cdit, 2) - TEST_FIELD_OFFSET(DLGTEMPLATE, cdit, 8) - TEST_FIELD_SIZE (DLGTEMPLATE, x, 2) - TEST_FIELD_ALIGN (DLGTEMPLATE, x, 2) - TEST_FIELD_OFFSET(DLGTEMPLATE, x, 10) - TEST_FIELD_SIZE (DLGTEMPLATE, y, 2) - TEST_FIELD_ALIGN (DLGTEMPLATE, y, 2) - TEST_FIELD_OFFSET(DLGTEMPLATE, y, 12) - TEST_FIELD_SIZE (DLGTEMPLATE, cx, 2) - TEST_FIELD_ALIGN (DLGTEMPLATE, cx, 2) - TEST_FIELD_OFFSET(DLGTEMPLATE, cx, 14) - TEST_FIELD_SIZE (DLGTEMPLATE, cy, 2) - TEST_FIELD_ALIGN (DLGTEMPLATE, cy, 2) - TEST_FIELD_OFFSET(DLGTEMPLATE, cy, 16) -} - -static void test_pack_DRAWITEMSTRUCT(void) -{ - /* DRAWITEMSTRUCT */ - TEST_TYPE_SIZE (DRAWITEMSTRUCT, 64) - TEST_TYPE_ALIGN (DRAWITEMSTRUCT, 8) - TEST_FIELD_SIZE (DRAWITEMSTRUCT, CtlType, 4) - TEST_FIELD_ALIGN (DRAWITEMSTRUCT, CtlType, 4) - TEST_FIELD_OFFSET(DRAWITEMSTRUCT, CtlType, 0) - TEST_FIELD_SIZE (DRAWITEMSTRUCT, CtlID, 4) - TEST_FIELD_ALIGN (DRAWITEMSTRUCT, CtlID, 4) - TEST_FIELD_OFFSET(DRAWITEMSTRUCT, CtlID, 4) - TEST_FIELD_SIZE (DRAWITEMSTRUCT, itemID, 4) - TEST_FIELD_ALIGN (DRAWITEMSTRUCT, itemID, 4) - TEST_FIELD_OFFSET(DRAWITEMSTRUCT, itemID, 8) - TEST_FIELD_SIZE (DRAWITEMSTRUCT, itemAction, 4) - TEST_FIELD_ALIGN (DRAWITEMSTRUCT, itemAction, 4) - TEST_FIELD_OFFSET(DRAWITEMSTRUCT, itemAction, 12) - TEST_FIELD_SIZE (DRAWITEMSTRUCT, itemState, 4) - TEST_FIELD_ALIGN (DRAWITEMSTRUCT, itemState, 4) - TEST_FIELD_OFFSET(DRAWITEMSTRUCT, itemState, 16) - TEST_FIELD_SIZE (DRAWITEMSTRUCT, hwndItem, 8) - TEST_FIELD_ALIGN (DRAWITEMSTRUCT, hwndItem, 8) - TEST_FIELD_OFFSET(DRAWITEMSTRUCT, hwndItem, 24) - TEST_FIELD_SIZE (DRAWITEMSTRUCT, hDC, 8) - TEST_FIELD_ALIGN (DRAWITEMSTRUCT, hDC, 8) - TEST_FIELD_OFFSET(DRAWITEMSTRUCT, hDC, 32) - TEST_FIELD_SIZE (DRAWITEMSTRUCT, rcItem, 16) - TEST_FIELD_ALIGN (DRAWITEMSTRUCT, rcItem, 4) - TEST_FIELD_OFFSET(DRAWITEMSTRUCT, rcItem, 40) - TEST_FIELD_SIZE (DRAWITEMSTRUCT, itemData, 8) - TEST_FIELD_ALIGN (DRAWITEMSTRUCT, itemData, 8) - TEST_FIELD_OFFSET(DRAWITEMSTRUCT, itemData, 56) -} - -static void test_pack_DRAWSTATEPROC(void) -{ - /* DRAWSTATEPROC */ - TEST_TYPE_SIZE (DRAWSTATEPROC, 8) - TEST_TYPE_ALIGN (DRAWSTATEPROC, 8) -} - -static void test_pack_DRAWTEXTPARAMS(void) -{ - /* DRAWTEXTPARAMS */ - TEST_TYPE_SIZE (DRAWTEXTPARAMS, 20) - TEST_TYPE_ALIGN (DRAWTEXTPARAMS, 4) - TEST_FIELD_SIZE (DRAWTEXTPARAMS, cbSize, 4) - TEST_FIELD_ALIGN (DRAWTEXTPARAMS, cbSize, 4) - TEST_FIELD_OFFSET(DRAWTEXTPARAMS, cbSize, 0) - TEST_FIELD_SIZE (DRAWTEXTPARAMS, iTabLength, 4) - TEST_FIELD_ALIGN (DRAWTEXTPARAMS, iTabLength, 4) - TEST_FIELD_OFFSET(DRAWTEXTPARAMS, iTabLength, 4) - TEST_FIELD_SIZE (DRAWTEXTPARAMS, iLeftMargin, 4) - TEST_FIELD_ALIGN (DRAWTEXTPARAMS, iLeftMargin, 4) - TEST_FIELD_OFFSET(DRAWTEXTPARAMS, iLeftMargin, 8) - TEST_FIELD_SIZE (DRAWTEXTPARAMS, iRightMargin, 4) - TEST_FIELD_ALIGN (DRAWTEXTPARAMS, iRightMargin, 4) - TEST_FIELD_OFFSET(DRAWTEXTPARAMS, iRightMargin, 12) - TEST_FIELD_SIZE (DRAWTEXTPARAMS, uiLengthDrawn, 4) - TEST_FIELD_ALIGN (DRAWTEXTPARAMS, uiLengthDrawn, 4) - TEST_FIELD_OFFSET(DRAWTEXTPARAMS, uiLengthDrawn, 16) -} - -static void test_pack_EDITWORDBREAKPROCA(void) -{ - /* EDITWORDBREAKPROCA */ - TEST_TYPE_SIZE (EDITWORDBREAKPROCA, 8) - TEST_TYPE_ALIGN (EDITWORDBREAKPROCA, 8) -} - -static void test_pack_EDITWORDBREAKPROCW(void) -{ - /* EDITWORDBREAKPROCW */ - TEST_TYPE_SIZE (EDITWORDBREAKPROCW, 8) - TEST_TYPE_ALIGN (EDITWORDBREAKPROCW, 8) -} - -static void test_pack_EVENTMSG(void) -{ - /* EVENTMSG */ - TEST_TYPE_SIZE (EVENTMSG, 24) - TEST_TYPE_ALIGN (EVENTMSG, 8) - TEST_FIELD_SIZE (EVENTMSG, message, 4) - TEST_FIELD_ALIGN (EVENTMSG, message, 4) - TEST_FIELD_OFFSET(EVENTMSG, message, 0) - TEST_FIELD_SIZE (EVENTMSG, paramL, 4) - TEST_FIELD_ALIGN (EVENTMSG, paramL, 4) - TEST_FIELD_OFFSET(EVENTMSG, paramL, 4) - TEST_FIELD_SIZE (EVENTMSG, paramH, 4) - TEST_FIELD_ALIGN (EVENTMSG, paramH, 4) - TEST_FIELD_OFFSET(EVENTMSG, paramH, 8) - TEST_FIELD_SIZE (EVENTMSG, time, 4) - TEST_FIELD_ALIGN (EVENTMSG, time, 4) - TEST_FIELD_OFFSET(EVENTMSG, time, 12) - TEST_FIELD_SIZE (EVENTMSG, hwnd, 8) - TEST_FIELD_ALIGN (EVENTMSG, hwnd, 8) - TEST_FIELD_OFFSET(EVENTMSG, hwnd, 16) -} - -static void test_pack_FILTERKEYS(void) -{ - /* FILTERKEYS */ - TEST_TYPE_SIZE (FILTERKEYS, 24) - TEST_TYPE_ALIGN (FILTERKEYS, 4) - TEST_FIELD_SIZE (FILTERKEYS, cbSize, 4) - TEST_FIELD_ALIGN (FILTERKEYS, cbSize, 4) - TEST_FIELD_OFFSET(FILTERKEYS, cbSize, 0) - TEST_FIELD_SIZE (FILTERKEYS, dwFlags, 4) - TEST_FIELD_ALIGN (FILTERKEYS, dwFlags, 4) - TEST_FIELD_OFFSET(FILTERKEYS, dwFlags, 4) - TEST_FIELD_SIZE (FILTERKEYS, iWaitMSec, 4) - TEST_FIELD_ALIGN (FILTERKEYS, iWaitMSec, 4) - TEST_FIELD_OFFSET(FILTERKEYS, iWaitMSec, 8) - TEST_FIELD_SIZE (FILTERKEYS, iDelayMSec, 4) - TEST_FIELD_ALIGN (FILTERKEYS, iDelayMSec, 4) - TEST_FIELD_OFFSET(FILTERKEYS, iDelayMSec, 12) - TEST_FIELD_SIZE (FILTERKEYS, iRepeatMSec, 4) - TEST_FIELD_ALIGN (FILTERKEYS, iRepeatMSec, 4) - TEST_FIELD_OFFSET(FILTERKEYS, iRepeatMSec, 16) - TEST_FIELD_SIZE (FILTERKEYS, iBounceMSec, 4) - TEST_FIELD_ALIGN (FILTERKEYS, iBounceMSec, 4) - TEST_FIELD_OFFSET(FILTERKEYS, iBounceMSec, 20) -} - -static void test_pack_FLASHWINFO(void) -{ - /* FLASHWINFO */ - TEST_TYPE_SIZE (FLASHWINFO, 32) - TEST_TYPE_ALIGN (FLASHWINFO, 8) - TEST_FIELD_SIZE (FLASHWINFO, cbSize, 4) - TEST_FIELD_ALIGN (FLASHWINFO, cbSize, 4) - TEST_FIELD_OFFSET(FLASHWINFO, cbSize, 0) - TEST_FIELD_SIZE (FLASHWINFO, hwnd, 8) - TEST_FIELD_ALIGN (FLASHWINFO, hwnd, 8) - TEST_FIELD_OFFSET(FLASHWINFO, hwnd, 8) - TEST_FIELD_SIZE (FLASHWINFO, dwFlags, 4) - TEST_FIELD_ALIGN (FLASHWINFO, dwFlags, 4) - TEST_FIELD_OFFSET(FLASHWINFO, dwFlags, 16) - TEST_FIELD_SIZE (FLASHWINFO, uCount, 4) - TEST_FIELD_ALIGN (FLASHWINFO, uCount, 4) - TEST_FIELD_OFFSET(FLASHWINFO, uCount, 20) - TEST_FIELD_SIZE (FLASHWINFO, dwTimeout, 4) - TEST_FIELD_ALIGN (FLASHWINFO, dwTimeout, 4) - TEST_FIELD_OFFSET(FLASHWINFO, dwTimeout, 24) -} - -static void test_pack_GRAYSTRINGPROC(void) -{ - /* GRAYSTRINGPROC */ - TEST_TYPE_SIZE (GRAYSTRINGPROC, 8) - TEST_TYPE_ALIGN (GRAYSTRINGPROC, 8) -} - -static void test_pack_GUITHREADINFO(void) -{ - /* GUITHREADINFO */ - TEST_TYPE_SIZE (GUITHREADINFO, 72) - TEST_TYPE_ALIGN (GUITHREADINFO, 8) - TEST_FIELD_SIZE (GUITHREADINFO, cbSize, 4) - TEST_FIELD_ALIGN (GUITHREADINFO, cbSize, 4) - TEST_FIELD_OFFSET(GUITHREADINFO, cbSize, 0) - TEST_FIELD_SIZE (GUITHREADINFO, flags, 4) - TEST_FIELD_ALIGN (GUITHREADINFO, flags, 4) - TEST_FIELD_OFFSET(GUITHREADINFO, flags, 4) - TEST_FIELD_SIZE (GUITHREADINFO, hwndActive, 8) - TEST_FIELD_ALIGN (GUITHREADINFO, hwndActive, 8) - TEST_FIELD_OFFSET(GUITHREADINFO, hwndActive, 8) - TEST_FIELD_SIZE (GUITHREADINFO, hwndFocus, 8) - TEST_FIELD_ALIGN (GUITHREADINFO, hwndFocus, 8) - TEST_FIELD_OFFSET(GUITHREADINFO, hwndFocus, 16) - TEST_FIELD_SIZE (GUITHREADINFO, hwndCapture, 8) - TEST_FIELD_ALIGN (GUITHREADINFO, hwndCapture, 8) - TEST_FIELD_OFFSET(GUITHREADINFO, hwndCapture, 24) - TEST_FIELD_SIZE (GUITHREADINFO, hwndMenuOwner, 8) - TEST_FIELD_ALIGN (GUITHREADINFO, hwndMenuOwner, 8) - TEST_FIELD_OFFSET(GUITHREADINFO, hwndMenuOwner, 32) - TEST_FIELD_SIZE (GUITHREADINFO, hwndMoveSize, 8) - TEST_FIELD_ALIGN (GUITHREADINFO, hwndMoveSize, 8) - TEST_FIELD_OFFSET(GUITHREADINFO, hwndMoveSize, 40) - TEST_FIELD_SIZE (GUITHREADINFO, hwndCaret, 8) - TEST_FIELD_ALIGN (GUITHREADINFO, hwndCaret, 8) - TEST_FIELD_OFFSET(GUITHREADINFO, hwndCaret, 48) - TEST_FIELD_SIZE (GUITHREADINFO, rcCaret, 16) - TEST_FIELD_ALIGN (GUITHREADINFO, rcCaret, 4) - TEST_FIELD_OFFSET(GUITHREADINFO, rcCaret, 56) -} - -static void test_pack_HARDWAREHOOKSTRUCT(void) -{ - /* HARDWAREHOOKSTRUCT */ - TEST_TYPE_SIZE (HARDWAREHOOKSTRUCT, 32) - TEST_TYPE_ALIGN (HARDWAREHOOKSTRUCT, 8) - TEST_FIELD_SIZE (HARDWAREHOOKSTRUCT, hwnd, 8) - TEST_FIELD_ALIGN (HARDWAREHOOKSTRUCT, hwnd, 8) - TEST_FIELD_OFFSET(HARDWAREHOOKSTRUCT, hwnd, 0) - TEST_FIELD_SIZE (HARDWAREHOOKSTRUCT, message, 4) - TEST_FIELD_ALIGN (HARDWAREHOOKSTRUCT, message, 4) - TEST_FIELD_OFFSET(HARDWAREHOOKSTRUCT, message, 8) - TEST_FIELD_SIZE (HARDWAREHOOKSTRUCT, wParam, 8) - TEST_FIELD_ALIGN (HARDWAREHOOKSTRUCT, wParam, 8) - TEST_FIELD_OFFSET(HARDWAREHOOKSTRUCT, wParam, 16) - TEST_FIELD_SIZE (HARDWAREHOOKSTRUCT, lParam, 8) - TEST_FIELD_ALIGN (HARDWAREHOOKSTRUCT, lParam, 8) - TEST_FIELD_OFFSET(HARDWAREHOOKSTRUCT, lParam, 24) -} - -static void test_pack_HARDWAREINPUT(void) -{ - /* HARDWAREINPUT */ - TEST_TYPE_SIZE (HARDWAREINPUT, 8) - TEST_TYPE_ALIGN (HARDWAREINPUT, 4) - TEST_FIELD_SIZE (HARDWAREINPUT, uMsg, 4) - TEST_FIELD_ALIGN (HARDWAREINPUT, uMsg, 4) - TEST_FIELD_OFFSET(HARDWAREINPUT, uMsg, 0) - TEST_FIELD_SIZE (HARDWAREINPUT, wParamL, 2) - TEST_FIELD_ALIGN (HARDWAREINPUT, wParamL, 2) - TEST_FIELD_OFFSET(HARDWAREINPUT, wParamL, 4) - TEST_FIELD_SIZE (HARDWAREINPUT, wParamH, 2) - TEST_FIELD_ALIGN (HARDWAREINPUT, wParamH, 2) - TEST_FIELD_OFFSET(HARDWAREINPUT, wParamH, 6) -} - -static void test_pack_HDEVNOTIFY(void) -{ - /* HDEVNOTIFY */ - TEST_TYPE_SIZE (HDEVNOTIFY, 8) - TEST_TYPE_ALIGN (HDEVNOTIFY, 8) -} - -static void test_pack_HDWP(void) -{ - /* HDWP */ - TEST_TYPE_SIZE (HDWP, 8) - TEST_TYPE_ALIGN (HDWP, 8) -} - -static void test_pack_HELPINFO(void) -{ - /* HELPINFO */ - TEST_TYPE_SIZE (HELPINFO, 40) - TEST_TYPE_ALIGN (HELPINFO, 8) - TEST_FIELD_SIZE (HELPINFO, cbSize, 4) - TEST_FIELD_ALIGN (HELPINFO, cbSize, 4) - TEST_FIELD_OFFSET(HELPINFO, cbSize, 0) - TEST_FIELD_SIZE (HELPINFO, iContextType, 4) - TEST_FIELD_ALIGN (HELPINFO, iContextType, 4) - TEST_FIELD_OFFSET(HELPINFO, iContextType, 4) - TEST_FIELD_SIZE (HELPINFO, iCtrlId, 4) - TEST_FIELD_ALIGN (HELPINFO, iCtrlId, 4) - TEST_FIELD_OFFSET(HELPINFO, iCtrlId, 8) - TEST_FIELD_SIZE (HELPINFO, hItemHandle, 8) - TEST_FIELD_ALIGN (HELPINFO, hItemHandle, 8) - TEST_FIELD_OFFSET(HELPINFO, hItemHandle, 16) - TEST_FIELD_SIZE (HELPINFO, dwContextId, 8) - TEST_FIELD_ALIGN (HELPINFO, dwContextId, 8) - TEST_FIELD_OFFSET(HELPINFO, dwContextId, 24) - TEST_FIELD_SIZE (HELPINFO, MousePos, 8) - TEST_FIELD_ALIGN (HELPINFO, MousePos, 4) - TEST_FIELD_OFFSET(HELPINFO, MousePos, 32) -} - -static void test_pack_HELPWININFOA(void) -{ - /* HELPWININFOA */ - TEST_TYPE_SIZE (HELPWININFOA, 28) - TEST_TYPE_ALIGN (HELPWININFOA, 4) - TEST_FIELD_SIZE (HELPWININFOA, wStructSize, 4) - TEST_FIELD_ALIGN (HELPWININFOA, wStructSize, 4) - TEST_FIELD_OFFSET(HELPWININFOA, wStructSize, 0) - TEST_FIELD_SIZE (HELPWININFOA, x, 4) - TEST_FIELD_ALIGN (HELPWININFOA, x, 4) - TEST_FIELD_OFFSET(HELPWININFOA, x, 4) - TEST_FIELD_SIZE (HELPWININFOA, y, 4) - TEST_FIELD_ALIGN (HELPWININFOA, y, 4) - TEST_FIELD_OFFSET(HELPWININFOA, y, 8) - TEST_FIELD_SIZE (HELPWININFOA, dx, 4) - TEST_FIELD_ALIGN (HELPWININFOA, dx, 4) - TEST_FIELD_OFFSET(HELPWININFOA, dx, 12) - TEST_FIELD_SIZE (HELPWININFOA, dy, 4) - TEST_FIELD_ALIGN (HELPWININFOA, dy, 4) - TEST_FIELD_OFFSET(HELPWININFOA, dy, 16) - TEST_FIELD_SIZE (HELPWININFOA, wMax, 4) - TEST_FIELD_ALIGN (HELPWININFOA, wMax, 4) - TEST_FIELD_OFFSET(HELPWININFOA, wMax, 20) - TEST_FIELD_SIZE (HELPWININFOA, rgchMember, 2) - TEST_FIELD_ALIGN (HELPWININFOA, rgchMember, 1) - TEST_FIELD_OFFSET(HELPWININFOA, rgchMember, 24) -} - -static void test_pack_HELPWININFOW(void) -{ - /* HELPWININFOW */ - TEST_TYPE_SIZE (HELPWININFOW, 28) - TEST_TYPE_ALIGN (HELPWININFOW, 4) - TEST_FIELD_SIZE (HELPWININFOW, wStructSize, 4) - TEST_FIELD_ALIGN (HELPWININFOW, wStructSize, 4) - TEST_FIELD_OFFSET(HELPWININFOW, wStructSize, 0) - TEST_FIELD_SIZE (HELPWININFOW, x, 4) - TEST_FIELD_ALIGN (HELPWININFOW, x, 4) - TEST_FIELD_OFFSET(HELPWININFOW, x, 4) - TEST_FIELD_SIZE (HELPWININFOW, y, 4) - TEST_FIELD_ALIGN (HELPWININFOW, y, 4) - TEST_FIELD_OFFSET(HELPWININFOW, y, 8) - TEST_FIELD_SIZE (HELPWININFOW, dx, 4) - TEST_FIELD_ALIGN (HELPWININFOW, dx, 4) - TEST_FIELD_OFFSET(HELPWININFOW, dx, 12) - TEST_FIELD_SIZE (HELPWININFOW, dy, 4) - TEST_FIELD_ALIGN (HELPWININFOW, dy, 4) - TEST_FIELD_OFFSET(HELPWININFOW, dy, 16) - TEST_FIELD_SIZE (HELPWININFOW, wMax, 4) - TEST_FIELD_ALIGN (HELPWININFOW, wMax, 4) - TEST_FIELD_OFFSET(HELPWININFOW, wMax, 20) - TEST_FIELD_SIZE (HELPWININFOW, rgchMember, 4) - TEST_FIELD_ALIGN (HELPWININFOW, rgchMember, 2) - TEST_FIELD_OFFSET(HELPWININFOW, rgchMember, 24) -} - -static void test_pack_HIGHCONTRASTA(void) -{ - /* HIGHCONTRASTA */ - TEST_TYPE_SIZE (HIGHCONTRASTA, 16) - TEST_TYPE_ALIGN (HIGHCONTRASTA, 8) - TEST_FIELD_SIZE (HIGHCONTRASTA, cbSize, 4) - TEST_FIELD_ALIGN (HIGHCONTRASTA, cbSize, 4) - TEST_FIELD_OFFSET(HIGHCONTRASTA, cbSize, 0) - TEST_FIELD_SIZE (HIGHCONTRASTA, dwFlags, 4) - TEST_FIELD_ALIGN (HIGHCONTRASTA, dwFlags, 4) - TEST_FIELD_OFFSET(HIGHCONTRASTA, dwFlags, 4) - TEST_FIELD_SIZE (HIGHCONTRASTA, lpszDefaultScheme, 8) - TEST_FIELD_ALIGN (HIGHCONTRASTA, lpszDefaultScheme, 8) - TEST_FIELD_OFFSET(HIGHCONTRASTA, lpszDefaultScheme, 8) -} - -static void test_pack_HIGHCONTRASTW(void) -{ - /* HIGHCONTRASTW */ - TEST_TYPE_SIZE (HIGHCONTRASTW, 16) - TEST_TYPE_ALIGN (HIGHCONTRASTW, 8) - TEST_FIELD_SIZE (HIGHCONTRASTW, cbSize, 4) - TEST_FIELD_ALIGN (HIGHCONTRASTW, cbSize, 4) - TEST_FIELD_OFFSET(HIGHCONTRASTW, cbSize, 0) - TEST_FIELD_SIZE (HIGHCONTRASTW, dwFlags, 4) - TEST_FIELD_ALIGN (HIGHCONTRASTW, dwFlags, 4) - TEST_FIELD_OFFSET(HIGHCONTRASTW, dwFlags, 4) - TEST_FIELD_SIZE (HIGHCONTRASTW, lpszDefaultScheme, 8) - TEST_FIELD_ALIGN (HIGHCONTRASTW, lpszDefaultScheme, 8) - TEST_FIELD_OFFSET(HIGHCONTRASTW, lpszDefaultScheme, 8) -} - -static void test_pack_HOOKPROC(void) -{ - /* HOOKPROC */ - TEST_TYPE_SIZE (HOOKPROC, 8) - TEST_TYPE_ALIGN (HOOKPROC, 8) -} - -static void test_pack_ICONINFO(void) -{ - /* ICONINFO */ - TEST_TYPE_SIZE (ICONINFO, 32) - TEST_TYPE_ALIGN (ICONINFO, 8) - TEST_FIELD_SIZE (ICONINFO, fIcon, 4) - TEST_FIELD_ALIGN (ICONINFO, fIcon, 4) - TEST_FIELD_OFFSET(ICONINFO, fIcon, 0) - TEST_FIELD_SIZE (ICONINFO, xHotspot, 4) - TEST_FIELD_ALIGN (ICONINFO, xHotspot, 4) - TEST_FIELD_OFFSET(ICONINFO, xHotspot, 4) - TEST_FIELD_SIZE (ICONINFO, yHotspot, 4) - TEST_FIELD_ALIGN (ICONINFO, yHotspot, 4) - TEST_FIELD_OFFSET(ICONINFO, yHotspot, 8) - TEST_FIELD_SIZE (ICONINFO, hbmMask, 8) - TEST_FIELD_ALIGN (ICONINFO, hbmMask, 8) - TEST_FIELD_OFFSET(ICONINFO, hbmMask, 16) - TEST_FIELD_SIZE (ICONINFO, hbmColor, 8) - TEST_FIELD_ALIGN (ICONINFO, hbmColor, 8) - TEST_FIELD_OFFSET(ICONINFO, hbmColor, 24) -} - -static void test_pack_ICONMETRICSA(void) -{ - /* ICONMETRICSA */ - TEST_TYPE_SIZE (ICONMETRICSA, 76) - TEST_TYPE_ALIGN (ICONMETRICSA, 4) - TEST_FIELD_SIZE (ICONMETRICSA, cbSize, 4) - TEST_FIELD_ALIGN (ICONMETRICSA, cbSize, 4) - TEST_FIELD_OFFSET(ICONMETRICSA, cbSize, 0) - TEST_FIELD_SIZE (ICONMETRICSA, iHorzSpacing, 4) - TEST_FIELD_ALIGN (ICONMETRICSA, iHorzSpacing, 4) - TEST_FIELD_OFFSET(ICONMETRICSA, iHorzSpacing, 4) - TEST_FIELD_SIZE (ICONMETRICSA, iVertSpacing, 4) - TEST_FIELD_ALIGN (ICONMETRICSA, iVertSpacing, 4) - TEST_FIELD_OFFSET(ICONMETRICSA, iVertSpacing, 8) - TEST_FIELD_SIZE (ICONMETRICSA, iTitleWrap, 4) - TEST_FIELD_ALIGN (ICONMETRICSA, iTitleWrap, 4) - TEST_FIELD_OFFSET(ICONMETRICSA, iTitleWrap, 12) - TEST_FIELD_SIZE (ICONMETRICSA, lfFont, 60) - TEST_FIELD_ALIGN (ICONMETRICSA, lfFont, 4) - TEST_FIELD_OFFSET(ICONMETRICSA, lfFont, 16) -} - -static void test_pack_ICONMETRICSW(void) -{ - /* ICONMETRICSW */ - TEST_TYPE_SIZE (ICONMETRICSW, 108) - TEST_TYPE_ALIGN (ICONMETRICSW, 4) - TEST_FIELD_SIZE (ICONMETRICSW, cbSize, 4) - TEST_FIELD_ALIGN (ICONMETRICSW, cbSize, 4) - TEST_FIELD_OFFSET(ICONMETRICSW, cbSize, 0) - TEST_FIELD_SIZE (ICONMETRICSW, iHorzSpacing, 4) - TEST_FIELD_ALIGN (ICONMETRICSW, iHorzSpacing, 4) - TEST_FIELD_OFFSET(ICONMETRICSW, iHorzSpacing, 4) - TEST_FIELD_SIZE (ICONMETRICSW, iVertSpacing, 4) - TEST_FIELD_ALIGN (ICONMETRICSW, iVertSpacing, 4) - TEST_FIELD_OFFSET(ICONMETRICSW, iVertSpacing, 8) - TEST_FIELD_SIZE (ICONMETRICSW, iTitleWrap, 4) - TEST_FIELD_ALIGN (ICONMETRICSW, iTitleWrap, 4) - TEST_FIELD_OFFSET(ICONMETRICSW, iTitleWrap, 12) - TEST_FIELD_SIZE (ICONMETRICSW, lfFont, 92) - TEST_FIELD_ALIGN (ICONMETRICSW, lfFont, 4) - TEST_FIELD_OFFSET(ICONMETRICSW, lfFont, 16) -} - -static void test_pack_INPUT(void) -{ - /* INPUT */ - TEST_FIELD_SIZE (INPUT, type, 4) - TEST_FIELD_ALIGN (INPUT, type, 4) - TEST_FIELD_OFFSET(INPUT, type, 0) -} - -static void test_pack_KBDLLHOOKSTRUCT(void) -{ - /* KBDLLHOOKSTRUCT */ - TEST_TYPE_SIZE (KBDLLHOOKSTRUCT, 24) - TEST_TYPE_ALIGN (KBDLLHOOKSTRUCT, 8) - TEST_FIELD_SIZE (KBDLLHOOKSTRUCT, vkCode, 4) - TEST_FIELD_ALIGN (KBDLLHOOKSTRUCT, vkCode, 4) - TEST_FIELD_OFFSET(KBDLLHOOKSTRUCT, vkCode, 0) - TEST_FIELD_SIZE (KBDLLHOOKSTRUCT, scanCode, 4) - TEST_FIELD_ALIGN (KBDLLHOOKSTRUCT, scanCode, 4) - TEST_FIELD_OFFSET(KBDLLHOOKSTRUCT, scanCode, 4) - TEST_FIELD_SIZE (KBDLLHOOKSTRUCT, flags, 4) - TEST_FIELD_ALIGN (KBDLLHOOKSTRUCT, flags, 4) - TEST_FIELD_OFFSET(KBDLLHOOKSTRUCT, flags, 8) - TEST_FIELD_SIZE (KBDLLHOOKSTRUCT, time, 4) - TEST_FIELD_ALIGN (KBDLLHOOKSTRUCT, time, 4) - TEST_FIELD_OFFSET(KBDLLHOOKSTRUCT, time, 12) - TEST_FIELD_SIZE (KBDLLHOOKSTRUCT, dwExtraInfo, 8) - TEST_FIELD_ALIGN (KBDLLHOOKSTRUCT, dwExtraInfo, 8) - TEST_FIELD_OFFSET(KBDLLHOOKSTRUCT, dwExtraInfo, 16) -} - -static void test_pack_KEYBDINPUT(void) -{ - /* KEYBDINPUT */ - TEST_TYPE_SIZE (KEYBDINPUT, 24) - TEST_TYPE_ALIGN (KEYBDINPUT, 8) - TEST_FIELD_SIZE (KEYBDINPUT, wVk, 2) - TEST_FIELD_ALIGN (KEYBDINPUT, wVk, 2) - TEST_FIELD_OFFSET(KEYBDINPUT, wVk, 0) - TEST_FIELD_SIZE (KEYBDINPUT, wScan, 2) - TEST_FIELD_ALIGN (KEYBDINPUT, wScan, 2) - TEST_FIELD_OFFSET(KEYBDINPUT, wScan, 2) - TEST_FIELD_SIZE (KEYBDINPUT, dwFlags, 4) - TEST_FIELD_ALIGN (KEYBDINPUT, dwFlags, 4) - TEST_FIELD_OFFSET(KEYBDINPUT, dwFlags, 4) - TEST_FIELD_SIZE (KEYBDINPUT, time, 4) - TEST_FIELD_ALIGN (KEYBDINPUT, time, 4) - TEST_FIELD_OFFSET(KEYBDINPUT, time, 8) - TEST_FIELD_SIZE (KEYBDINPUT, dwExtraInfo, 8) - TEST_FIELD_ALIGN (KEYBDINPUT, dwExtraInfo, 8) - TEST_FIELD_OFFSET(KEYBDINPUT, dwExtraInfo, 16) -} - -static void test_pack_LPACCESSTIMEOUT(void) -{ - /* LPACCESSTIMEOUT */ - TEST_TYPE_SIZE (LPACCESSTIMEOUT, 8) - TEST_TYPE_ALIGN (LPACCESSTIMEOUT, 8) - TEST_TARGET_SIZE (LPACCESSTIMEOUT, 12) - TEST_TARGET_ALIGN(LPACCESSTIMEOUT, 4) -} - -static void test_pack_LPANIMATIONINFO(void) -{ - /* LPANIMATIONINFO */ - TEST_TYPE_SIZE (LPANIMATIONINFO, 8) - TEST_TYPE_ALIGN (LPANIMATIONINFO, 8) - TEST_TARGET_SIZE (LPANIMATIONINFO, 8) - TEST_TARGET_ALIGN(LPANIMATIONINFO, 4) -} - -static void test_pack_LPCBTACTIVATESTRUCT(void) -{ - /* LPCBTACTIVATESTRUCT */ - TEST_TYPE_SIZE (LPCBTACTIVATESTRUCT, 8) - TEST_TYPE_ALIGN (LPCBTACTIVATESTRUCT, 8) - TEST_TARGET_SIZE (LPCBTACTIVATESTRUCT, 16) - TEST_TARGET_ALIGN(LPCBTACTIVATESTRUCT, 8) -} - -static void test_pack_LPCBT_CREATEWNDA(void) -{ - /* LPCBT_CREATEWNDA */ - TEST_TYPE_SIZE (LPCBT_CREATEWNDA, 8) - TEST_TYPE_ALIGN (LPCBT_CREATEWNDA, 8) - TEST_TARGET_SIZE (LPCBT_CREATEWNDA, 16) - TEST_TARGET_ALIGN(LPCBT_CREATEWNDA, 8) -} - -static void test_pack_LPCBT_CREATEWNDW(void) -{ - /* LPCBT_CREATEWNDW */ - TEST_TYPE_SIZE (LPCBT_CREATEWNDW, 8) - TEST_TYPE_ALIGN (LPCBT_CREATEWNDW, 8) - TEST_TARGET_SIZE (LPCBT_CREATEWNDW, 16) - TEST_TARGET_ALIGN(LPCBT_CREATEWNDW, 8) -} - -static void test_pack_LPCDLGTEMPLATEA(void) -{ - /* LPCDLGTEMPLATEA */ - TEST_TYPE_SIZE (LPCDLGTEMPLATEA, 8) - TEST_TYPE_ALIGN (LPCDLGTEMPLATEA, 8) - TEST_TARGET_SIZE (LPCDLGTEMPLATEA, 18) - TEST_TARGET_ALIGN(LPCDLGTEMPLATEA, 2) -} - -static void test_pack_LPCDLGTEMPLATEW(void) -{ - /* LPCDLGTEMPLATEW */ - TEST_TYPE_SIZE (LPCDLGTEMPLATEW, 8) - TEST_TYPE_ALIGN (LPCDLGTEMPLATEW, 8) - TEST_TARGET_SIZE (LPCDLGTEMPLATEW, 18) - TEST_TARGET_ALIGN(LPCDLGTEMPLATEW, 2) -} - -static void test_pack_LPCLIENTCREATESTRUCT(void) -{ - /* LPCLIENTCREATESTRUCT */ - TEST_TYPE_SIZE (LPCLIENTCREATESTRUCT, 8) - TEST_TYPE_ALIGN (LPCLIENTCREATESTRUCT, 8) - TEST_TARGET_SIZE (LPCLIENTCREATESTRUCT, 16) - TEST_TARGET_ALIGN(LPCLIENTCREATESTRUCT, 8) -} - -static void test_pack_LPCMENUINFO(void) -{ - /* LPCMENUINFO */ - TEST_TYPE_SIZE (LPCMENUINFO, 8) - TEST_TYPE_ALIGN (LPCMENUINFO, 8) - TEST_TARGET_SIZE (LPCMENUINFO, 40) - TEST_TARGET_ALIGN(LPCMENUINFO, 8) -} - -static void test_pack_LPCMENUITEMINFOA(void) -{ - /* LPCMENUITEMINFOA */ - TEST_TYPE_SIZE (LPCMENUITEMINFOA, 8) - TEST_TYPE_ALIGN (LPCMENUITEMINFOA, 8) - TEST_TARGET_SIZE (LPCMENUITEMINFOA, 80) - TEST_TARGET_ALIGN(LPCMENUITEMINFOA, 8) -} - -static void test_pack_LPCMENUITEMINFOW(void) -{ - /* LPCMENUITEMINFOW */ - TEST_TYPE_SIZE (LPCMENUITEMINFOW, 8) - TEST_TYPE_ALIGN (LPCMENUITEMINFOW, 8) - TEST_TARGET_SIZE (LPCMENUITEMINFOW, 80) - TEST_TARGET_ALIGN(LPCMENUITEMINFOW, 8) -} - -static void test_pack_LPCOMBOBOXINFO(void) -{ - /* LPCOMBOBOXINFO */ - TEST_TYPE_SIZE (LPCOMBOBOXINFO, 8) - TEST_TYPE_ALIGN (LPCOMBOBOXINFO, 8) - TEST_TARGET_SIZE (LPCOMBOBOXINFO, 64) - TEST_TARGET_ALIGN(LPCOMBOBOXINFO, 8) -} - -static void test_pack_LPCOMPAREITEMSTRUCT(void) -{ - /* LPCOMPAREITEMSTRUCT */ - TEST_TYPE_SIZE (LPCOMPAREITEMSTRUCT, 8) - TEST_TYPE_ALIGN (LPCOMPAREITEMSTRUCT, 8) - TEST_TARGET_SIZE (LPCOMPAREITEMSTRUCT, 56) - TEST_TARGET_ALIGN(LPCOMPAREITEMSTRUCT, 8) -} - -static void test_pack_LPCREATESTRUCTA(void) -{ - /* LPCREATESTRUCTA */ - TEST_TYPE_SIZE (LPCREATESTRUCTA, 8) - TEST_TYPE_ALIGN (LPCREATESTRUCTA, 8) - TEST_TARGET_SIZE (LPCREATESTRUCTA, 80) - TEST_TARGET_ALIGN(LPCREATESTRUCTA, 8) -} - -static void test_pack_LPCREATESTRUCTW(void) -{ - /* LPCREATESTRUCTW */ - TEST_TYPE_SIZE (LPCREATESTRUCTW, 8) - TEST_TYPE_ALIGN (LPCREATESTRUCTW, 8) - TEST_TARGET_SIZE (LPCREATESTRUCTW, 80) - TEST_TARGET_ALIGN(LPCREATESTRUCTW, 8) -} - -static void test_pack_LPCSCROLLINFO(void) -{ - /* LPCSCROLLINFO */ - TEST_TYPE_SIZE (LPCSCROLLINFO, 8) - TEST_TYPE_ALIGN (LPCSCROLLINFO, 8) - TEST_TARGET_SIZE (LPCSCROLLINFO, 28) - TEST_TARGET_ALIGN(LPCSCROLLINFO, 4) -} - -static void test_pack_LPCURSORINFO(void) -{ - /* LPCURSORINFO */ - TEST_TYPE_SIZE (LPCURSORINFO, 8) - TEST_TYPE_ALIGN (LPCURSORINFO, 8) - TEST_TARGET_SIZE (LPCURSORINFO, 24) - TEST_TARGET_ALIGN(LPCURSORINFO, 8) -} - -static void test_pack_LPCWPRETSTRUCT(void) -{ - /* LPCWPRETSTRUCT */ - TEST_TYPE_SIZE (LPCWPRETSTRUCT, 8) - TEST_TYPE_ALIGN (LPCWPRETSTRUCT, 8) - TEST_TARGET_SIZE (LPCWPRETSTRUCT, 40) - TEST_TARGET_ALIGN(LPCWPRETSTRUCT, 8) -} - -static void test_pack_LPCWPSTRUCT(void) -{ - /* LPCWPSTRUCT */ - TEST_TYPE_SIZE (LPCWPSTRUCT, 8) - TEST_TYPE_ALIGN (LPCWPSTRUCT, 8) - TEST_TARGET_SIZE (LPCWPSTRUCT, 32) - TEST_TARGET_ALIGN(LPCWPSTRUCT, 8) -} - -static void test_pack_LPDEBUGHOOKINFO(void) -{ - /* LPDEBUGHOOKINFO */ - TEST_TYPE_SIZE (LPDEBUGHOOKINFO, 8) - TEST_TYPE_ALIGN (LPDEBUGHOOKINFO, 8) - TEST_TARGET_SIZE (LPDEBUGHOOKINFO, 32) - TEST_TARGET_ALIGN(LPDEBUGHOOKINFO, 8) -} - -static void test_pack_LPDELETEITEMSTRUCT(void) -{ - /* LPDELETEITEMSTRUCT */ - TEST_TYPE_SIZE (LPDELETEITEMSTRUCT, 8) - TEST_TYPE_ALIGN (LPDELETEITEMSTRUCT, 8) - TEST_TARGET_SIZE (LPDELETEITEMSTRUCT, 32) - TEST_TARGET_ALIGN(LPDELETEITEMSTRUCT, 8) -} - -static void test_pack_LPDLGITEMTEMPLATEA(void) -{ - /* LPDLGITEMTEMPLATEA */ - TEST_TYPE_SIZE (LPDLGITEMTEMPLATEA, 8) - TEST_TYPE_ALIGN (LPDLGITEMTEMPLATEA, 8) - TEST_TARGET_SIZE (LPDLGITEMTEMPLATEA, 18) - TEST_TARGET_ALIGN(LPDLGITEMTEMPLATEA, 2) -} - -static void test_pack_LPDLGITEMTEMPLATEW(void) -{ - /* LPDLGITEMTEMPLATEW */ - TEST_TYPE_SIZE (LPDLGITEMTEMPLATEW, 8) - TEST_TYPE_ALIGN (LPDLGITEMTEMPLATEW, 8) - TEST_TARGET_SIZE (LPDLGITEMTEMPLATEW, 18) - TEST_TARGET_ALIGN(LPDLGITEMTEMPLATEW, 2) -} - -static void test_pack_LPDLGTEMPLATEA(void) -{ - /* LPDLGTEMPLATEA */ - TEST_TYPE_SIZE (LPDLGTEMPLATEA, 8) - TEST_TYPE_ALIGN (LPDLGTEMPLATEA, 8) - TEST_TARGET_SIZE (LPDLGTEMPLATEA, 18) - TEST_TARGET_ALIGN(LPDLGTEMPLATEA, 2) -} - -static void test_pack_LPDLGTEMPLATEW(void) -{ - /* LPDLGTEMPLATEW */ - TEST_TYPE_SIZE (LPDLGTEMPLATEW, 8) - TEST_TYPE_ALIGN (LPDLGTEMPLATEW, 8) - TEST_TARGET_SIZE (LPDLGTEMPLATEW, 18) - TEST_TARGET_ALIGN(LPDLGTEMPLATEW, 2) -} - -static void test_pack_LPDRAWITEMSTRUCT(void) -{ - /* LPDRAWITEMSTRUCT */ - TEST_TYPE_SIZE (LPDRAWITEMSTRUCT, 8) - TEST_TYPE_ALIGN (LPDRAWITEMSTRUCT, 8) - TEST_TARGET_SIZE (LPDRAWITEMSTRUCT, 64) - TEST_TARGET_ALIGN(LPDRAWITEMSTRUCT, 8) -} - -static void test_pack_LPDRAWTEXTPARAMS(void) -{ - /* LPDRAWTEXTPARAMS */ - TEST_TYPE_SIZE (LPDRAWTEXTPARAMS, 8) - TEST_TYPE_ALIGN (LPDRAWTEXTPARAMS, 8) - TEST_TARGET_SIZE (LPDRAWTEXTPARAMS, 20) - TEST_TARGET_ALIGN(LPDRAWTEXTPARAMS, 4) -} - -static void test_pack_LPEVENTMSG(void) -{ - /* LPEVENTMSG */ - TEST_TYPE_SIZE (LPEVENTMSG, 8) - TEST_TYPE_ALIGN (LPEVENTMSG, 8) - TEST_TARGET_SIZE (LPEVENTMSG, 24) - TEST_TARGET_ALIGN(LPEVENTMSG, 8) -} - -static void test_pack_LPFILTERKEYS(void) -{ - /* LPFILTERKEYS */ - TEST_TYPE_SIZE (LPFILTERKEYS, 8) - TEST_TYPE_ALIGN (LPFILTERKEYS, 8) - TEST_TARGET_SIZE (LPFILTERKEYS, 24) - TEST_TARGET_ALIGN(LPFILTERKEYS, 4) -} - -static void test_pack_LPGUITHREADINFO(void) -{ - /* LPGUITHREADINFO */ - TEST_TYPE_SIZE (LPGUITHREADINFO, 8) - TEST_TYPE_ALIGN (LPGUITHREADINFO, 8) - TEST_TARGET_SIZE (LPGUITHREADINFO, 72) - TEST_TARGET_ALIGN(LPGUITHREADINFO, 8) -} - -static void test_pack_LPHARDWAREHOOKSTRUCT(void) -{ - /* LPHARDWAREHOOKSTRUCT */ - TEST_TYPE_SIZE (LPHARDWAREHOOKSTRUCT, 8) - TEST_TYPE_ALIGN (LPHARDWAREHOOKSTRUCT, 8) - TEST_TARGET_SIZE (LPHARDWAREHOOKSTRUCT, 32) - TEST_TARGET_ALIGN(LPHARDWAREHOOKSTRUCT, 8) -} - -static void test_pack_LPHARDWAREINPUT(void) -{ - /* LPHARDWAREINPUT */ - TEST_TYPE_SIZE (LPHARDWAREINPUT, 8) - TEST_TYPE_ALIGN (LPHARDWAREINPUT, 8) - TEST_TARGET_SIZE (LPHARDWAREINPUT, 8) - TEST_TARGET_ALIGN(LPHARDWAREINPUT, 4) -} - -static void test_pack_LPHELPINFO(void) -{ - /* LPHELPINFO */ - TEST_TYPE_SIZE (LPHELPINFO, 8) - TEST_TYPE_ALIGN (LPHELPINFO, 8) - TEST_TARGET_SIZE (LPHELPINFO, 40) - TEST_TARGET_ALIGN(LPHELPINFO, 8) -} - -static void test_pack_LPHELPWININFOA(void) -{ - /* LPHELPWININFOA */ - TEST_TYPE_SIZE (LPHELPWININFOA, 8) - TEST_TYPE_ALIGN (LPHELPWININFOA, 8) - TEST_TARGET_SIZE (LPHELPWININFOA, 28) - TEST_TARGET_ALIGN(LPHELPWININFOA, 4) -} - -static void test_pack_LPHELPWININFOW(void) -{ - /* LPHELPWININFOW */ - TEST_TYPE_SIZE (LPHELPWININFOW, 8) - TEST_TYPE_ALIGN (LPHELPWININFOW, 8) - TEST_TARGET_SIZE (LPHELPWININFOW, 28) - TEST_TARGET_ALIGN(LPHELPWININFOW, 4) -} - -static void test_pack_LPHIGHCONTRASTA(void) -{ - /* LPHIGHCONTRASTA */ - TEST_TYPE_SIZE (LPHIGHCONTRASTA, 8) - TEST_TYPE_ALIGN (LPHIGHCONTRASTA, 8) - TEST_TARGET_SIZE (LPHIGHCONTRASTA, 16) - TEST_TARGET_ALIGN(LPHIGHCONTRASTA, 8) -} - -static void test_pack_LPHIGHCONTRASTW(void) -{ - /* LPHIGHCONTRASTW */ - TEST_TYPE_SIZE (LPHIGHCONTRASTW, 8) - TEST_TYPE_ALIGN (LPHIGHCONTRASTW, 8) - TEST_TARGET_SIZE (LPHIGHCONTRASTW, 16) - TEST_TARGET_ALIGN(LPHIGHCONTRASTW, 8) -} - -static void test_pack_LPICONMETRICSA(void) -{ - /* LPICONMETRICSA */ - TEST_TYPE_SIZE (LPICONMETRICSA, 8) - TEST_TYPE_ALIGN (LPICONMETRICSA, 8) - TEST_TARGET_SIZE (LPICONMETRICSA, 76) - TEST_TARGET_ALIGN(LPICONMETRICSA, 4) -} - -static void test_pack_LPICONMETRICSW(void) -{ - /* LPICONMETRICSW */ - TEST_TYPE_SIZE (LPICONMETRICSW, 8) - TEST_TYPE_ALIGN (LPICONMETRICSW, 8) - TEST_TARGET_SIZE (LPICONMETRICSW, 108) - TEST_TARGET_ALIGN(LPICONMETRICSW, 4) -} - -static void test_pack_LPINPUT(void) -{ - /* LPINPUT */ - TEST_TYPE_SIZE (LPINPUT, 8) - TEST_TYPE_ALIGN (LPINPUT, 8) -} - -static void test_pack_LPKBDLLHOOKSTRUCT(void) -{ - /* LPKBDLLHOOKSTRUCT */ - TEST_TYPE_SIZE (LPKBDLLHOOKSTRUCT, 8) - TEST_TYPE_ALIGN (LPKBDLLHOOKSTRUCT, 8) - TEST_TARGET_SIZE (LPKBDLLHOOKSTRUCT, 24) - TEST_TARGET_ALIGN(LPKBDLLHOOKSTRUCT, 8) -} - -static void test_pack_LPKEYBDINPUT(void) -{ - /* LPKEYBDINPUT */ - TEST_TYPE_SIZE (LPKEYBDINPUT, 8) - TEST_TYPE_ALIGN (LPKEYBDINPUT, 8) - TEST_TARGET_SIZE (LPKEYBDINPUT, 24) - TEST_TARGET_ALIGN(LPKEYBDINPUT, 8) -} - -static void test_pack_LPMDICREATESTRUCTA(void) -{ - /* LPMDICREATESTRUCTA */ - TEST_TYPE_SIZE (LPMDICREATESTRUCTA, 8) - TEST_TYPE_ALIGN (LPMDICREATESTRUCTA, 8) - TEST_TARGET_SIZE (LPMDICREATESTRUCTA, 56) - TEST_TARGET_ALIGN(LPMDICREATESTRUCTA, 8) -} - -static void test_pack_LPMDICREATESTRUCTW(void) -{ - /* LPMDICREATESTRUCTW */ - TEST_TYPE_SIZE (LPMDICREATESTRUCTW, 8) - TEST_TYPE_ALIGN (LPMDICREATESTRUCTW, 8) - TEST_TARGET_SIZE (LPMDICREATESTRUCTW, 56) - TEST_TARGET_ALIGN(LPMDICREATESTRUCTW, 8) -} - -static void test_pack_LPMDINEXTMENU(void) -{ - /* LPMDINEXTMENU */ - TEST_TYPE_SIZE (LPMDINEXTMENU, 8) - TEST_TYPE_ALIGN (LPMDINEXTMENU, 8) - TEST_TARGET_SIZE (LPMDINEXTMENU, 24) - TEST_TARGET_ALIGN(LPMDINEXTMENU, 8) -} - -static void test_pack_LPMEASUREITEMSTRUCT(void) -{ - /* LPMEASUREITEMSTRUCT */ - TEST_TYPE_SIZE (LPMEASUREITEMSTRUCT, 8) - TEST_TYPE_ALIGN (LPMEASUREITEMSTRUCT, 8) - TEST_TARGET_SIZE (LPMEASUREITEMSTRUCT, 32) - TEST_TARGET_ALIGN(LPMEASUREITEMSTRUCT, 8) -} - -static void test_pack_LPMENUINFO(void) -{ - /* LPMENUINFO */ - TEST_TYPE_SIZE (LPMENUINFO, 8) - TEST_TYPE_ALIGN (LPMENUINFO, 8) - TEST_TARGET_SIZE (LPMENUINFO, 40) - TEST_TARGET_ALIGN(LPMENUINFO, 8) -} - -static void test_pack_LPMENUITEMINFOA(void) -{ - /* LPMENUITEMINFOA */ - TEST_TYPE_SIZE (LPMENUITEMINFOA, 8) - TEST_TYPE_ALIGN (LPMENUITEMINFOA, 8) - TEST_TARGET_SIZE (LPMENUITEMINFOA, 80) - TEST_TARGET_ALIGN(LPMENUITEMINFOA, 8) -} - -static void test_pack_LPMENUITEMINFOW(void) -{ - /* LPMENUITEMINFOW */ - TEST_TYPE_SIZE (LPMENUITEMINFOW, 8) - TEST_TYPE_ALIGN (LPMENUITEMINFOW, 8) - TEST_TARGET_SIZE (LPMENUITEMINFOW, 80) - TEST_TARGET_ALIGN(LPMENUITEMINFOW, 8) -} - -static void test_pack_LPMINIMIZEDMETRICS(void) -{ - /* LPMINIMIZEDMETRICS */ - TEST_TYPE_SIZE (LPMINIMIZEDMETRICS, 8) - TEST_TYPE_ALIGN (LPMINIMIZEDMETRICS, 8) - TEST_TARGET_SIZE (LPMINIMIZEDMETRICS, 20) - TEST_TARGET_ALIGN(LPMINIMIZEDMETRICS, 4) -} - -static void test_pack_LPMINMAXINFO(void) -{ - /* LPMINMAXINFO */ - TEST_TYPE_SIZE (LPMINMAXINFO, 8) - TEST_TYPE_ALIGN (LPMINMAXINFO, 8) - TEST_TARGET_SIZE (LPMINMAXINFO, 40) - TEST_TARGET_ALIGN(LPMINMAXINFO, 4) -} - -static void test_pack_LPMONITORINFO(void) -{ - /* LPMONITORINFO */ - TEST_TYPE_SIZE (LPMONITORINFO, 8) - TEST_TYPE_ALIGN (LPMONITORINFO, 8) - TEST_TARGET_SIZE (LPMONITORINFO, 40) - TEST_TARGET_ALIGN(LPMONITORINFO, 4) -} - -static void test_pack_LPMONITORINFOEXA(void) -{ - /* LPMONITORINFOEXA */ - TEST_TYPE_SIZE (LPMONITORINFOEXA, 8) - TEST_TYPE_ALIGN (LPMONITORINFOEXA, 8) - TEST_TARGET_SIZE (LPMONITORINFOEXA, 72) - TEST_TARGET_ALIGN(LPMONITORINFOEXA, 4) -} - -static void test_pack_LPMONITORINFOEXW(void) -{ - /* LPMONITORINFOEXW */ - TEST_TYPE_SIZE (LPMONITORINFOEXW, 8) - TEST_TYPE_ALIGN (LPMONITORINFOEXW, 8) - TEST_TARGET_SIZE (LPMONITORINFOEXW, 104) - TEST_TARGET_ALIGN(LPMONITORINFOEXW, 4) -} - -static void test_pack_LPMOUSEHOOKSTRUCT(void) -{ - /* LPMOUSEHOOKSTRUCT */ - TEST_TYPE_SIZE (LPMOUSEHOOKSTRUCT, 8) - TEST_TYPE_ALIGN (LPMOUSEHOOKSTRUCT, 8) - TEST_TARGET_SIZE (LPMOUSEHOOKSTRUCT, 32) - TEST_TARGET_ALIGN(LPMOUSEHOOKSTRUCT, 8) -} - -static void test_pack_LPMOUSEINPUT(void) -{ - /* LPMOUSEINPUT */ - TEST_TYPE_SIZE (LPMOUSEINPUT, 8) - TEST_TYPE_ALIGN (LPMOUSEINPUT, 8) - TEST_TARGET_SIZE (LPMOUSEINPUT, 32) - TEST_TARGET_ALIGN(LPMOUSEINPUT, 8) -} - -static void test_pack_LPMOUSEKEYS(void) -{ - /* LPMOUSEKEYS */ - TEST_TYPE_SIZE (LPMOUSEKEYS, 8) - TEST_TYPE_ALIGN (LPMOUSEKEYS, 8) - TEST_TARGET_SIZE (LPMOUSEKEYS, 28) - TEST_TARGET_ALIGN(LPMOUSEKEYS, 4) -} - -static void test_pack_LPMSG(void) -{ - /* LPMSG */ - TEST_TYPE_SIZE (LPMSG, 8) - TEST_TYPE_ALIGN (LPMSG, 8) - TEST_TARGET_SIZE (LPMSG, 48) - TEST_TARGET_ALIGN(LPMSG, 8) -} - -static void test_pack_LPMSGBOXPARAMSA(void) -{ - /* LPMSGBOXPARAMSA */ - TEST_TYPE_SIZE (LPMSGBOXPARAMSA, 8) - TEST_TYPE_ALIGN (LPMSGBOXPARAMSA, 8) - TEST_TARGET_SIZE (LPMSGBOXPARAMSA, 80) - TEST_TARGET_ALIGN(LPMSGBOXPARAMSA, 8) -} - -static void test_pack_LPMSGBOXPARAMSW(void) -{ - /* LPMSGBOXPARAMSW */ - TEST_TYPE_SIZE (LPMSGBOXPARAMSW, 8) - TEST_TYPE_ALIGN (LPMSGBOXPARAMSW, 8) - TEST_TARGET_SIZE (LPMSGBOXPARAMSW, 80) - TEST_TARGET_ALIGN(LPMSGBOXPARAMSW, 8) -} - -static void test_pack_LPMSLLHOOKSTRUCT(void) -{ - /* LPMSLLHOOKSTRUCT */ - TEST_TYPE_SIZE (LPMSLLHOOKSTRUCT, 8) - TEST_TYPE_ALIGN (LPMSLLHOOKSTRUCT, 8) - TEST_TARGET_SIZE (LPMSLLHOOKSTRUCT, 32) - TEST_TARGET_ALIGN(LPMSLLHOOKSTRUCT, 8) -} - -static void test_pack_LPMULTIKEYHELPA(void) -{ - /* LPMULTIKEYHELPA */ - TEST_TYPE_SIZE (LPMULTIKEYHELPA, 8) - TEST_TYPE_ALIGN (LPMULTIKEYHELPA, 8) - TEST_TARGET_SIZE (LPMULTIKEYHELPA, 8) - TEST_TARGET_ALIGN(LPMULTIKEYHELPA, 4) -} - -static void test_pack_LPMULTIKEYHELPW(void) -{ - /* LPMULTIKEYHELPW */ - TEST_TYPE_SIZE (LPMULTIKEYHELPW, 8) - TEST_TYPE_ALIGN (LPMULTIKEYHELPW, 8) - TEST_TARGET_SIZE (LPMULTIKEYHELPW, 8) - TEST_TARGET_ALIGN(LPMULTIKEYHELPW, 4) -} - -static void test_pack_LPNCCALCSIZE_PARAMS(void) -{ - /* LPNCCALCSIZE_PARAMS */ - TEST_TYPE_SIZE (LPNCCALCSIZE_PARAMS, 8) - TEST_TYPE_ALIGN (LPNCCALCSIZE_PARAMS, 8) - TEST_TARGET_SIZE (LPNCCALCSIZE_PARAMS, 56) - TEST_TARGET_ALIGN(LPNCCALCSIZE_PARAMS, 8) -} - -static void test_pack_LPNMHDR(void) -{ - /* LPNMHDR */ - TEST_TYPE_SIZE (LPNMHDR, 8) - TEST_TYPE_ALIGN (LPNMHDR, 8) - TEST_TARGET_SIZE (LPNMHDR, 24) - TEST_TARGET_ALIGN(LPNMHDR, 8) -} - -static void test_pack_LPNONCLIENTMETRICSA(void) -{ - /* LPNONCLIENTMETRICSA */ - TEST_TYPE_SIZE (LPNONCLIENTMETRICSA, 8) - TEST_TYPE_ALIGN (LPNONCLIENTMETRICSA, 8) - TEST_TARGET_SIZE (LPNONCLIENTMETRICSA, 340) - TEST_TARGET_ALIGN(LPNONCLIENTMETRICSA, 4) -} - -static void test_pack_LPNONCLIENTMETRICSW(void) -{ - /* LPNONCLIENTMETRICSW */ - TEST_TYPE_SIZE (LPNONCLIENTMETRICSW, 8) - TEST_TYPE_ALIGN (LPNONCLIENTMETRICSW, 8) - TEST_TARGET_SIZE (LPNONCLIENTMETRICSW, 500) - TEST_TARGET_ALIGN(LPNONCLIENTMETRICSW, 4) -} - -static void test_pack_LPPAINTSTRUCT(void) -{ - /* LPPAINTSTRUCT */ - TEST_TYPE_SIZE (LPPAINTSTRUCT, 8) - TEST_TYPE_ALIGN (LPPAINTSTRUCT, 8) - TEST_TARGET_SIZE (LPPAINTSTRUCT, 72) - TEST_TARGET_ALIGN(LPPAINTSTRUCT, 8) -} - -static void test_pack_LPSCROLLINFO(void) -{ - /* LPSCROLLINFO */ - TEST_TYPE_SIZE (LPSCROLLINFO, 8) - TEST_TYPE_ALIGN (LPSCROLLINFO, 8) - TEST_TARGET_SIZE (LPSCROLLINFO, 28) - TEST_TARGET_ALIGN(LPSCROLLINFO, 4) -} - -static void test_pack_LPSERIALKEYSA(void) -{ - /* LPSERIALKEYSA */ - TEST_TYPE_SIZE (LPSERIALKEYSA, 8) - TEST_TYPE_ALIGN (LPSERIALKEYSA, 8) - TEST_TARGET_SIZE (LPSERIALKEYSA, 40) - TEST_TARGET_ALIGN(LPSERIALKEYSA, 8) -} - -static void test_pack_LPSERIALKEYSW(void) -{ - /* LPSERIALKEYSW */ - TEST_TYPE_SIZE (LPSERIALKEYSW, 8) - TEST_TYPE_ALIGN (LPSERIALKEYSW, 8) - TEST_TARGET_SIZE (LPSERIALKEYSW, 40) - TEST_TARGET_ALIGN(LPSERIALKEYSW, 8) -} - -static void test_pack_LPSOUNDSENTRYA(void) -{ - /* LPSOUNDSENTRYA */ - TEST_TYPE_SIZE (LPSOUNDSENTRYA, 8) - TEST_TYPE_ALIGN (LPSOUNDSENTRYA, 8) - TEST_TARGET_SIZE (LPSOUNDSENTRYA, 56) - TEST_TARGET_ALIGN(LPSOUNDSENTRYA, 8) -} - -static void test_pack_LPSOUNDSENTRYW(void) -{ - /* LPSOUNDSENTRYW */ - TEST_TYPE_SIZE (LPSOUNDSENTRYW, 8) - TEST_TYPE_ALIGN (LPSOUNDSENTRYW, 8) - TEST_TARGET_SIZE (LPSOUNDSENTRYW, 56) - TEST_TARGET_ALIGN(LPSOUNDSENTRYW, 8) -} - -static void test_pack_LPSTICKYKEYS(void) -{ - /* LPSTICKYKEYS */ - TEST_TYPE_SIZE (LPSTICKYKEYS, 8) - TEST_TYPE_ALIGN (LPSTICKYKEYS, 8) - TEST_TARGET_SIZE (LPSTICKYKEYS, 8) - TEST_TARGET_ALIGN(LPSTICKYKEYS, 4) -} - -static void test_pack_LPSTYLESTRUCT(void) -{ - /* LPSTYLESTRUCT */ - TEST_TYPE_SIZE (LPSTYLESTRUCT, 8) - TEST_TYPE_ALIGN (LPSTYLESTRUCT, 8) - TEST_TARGET_SIZE (LPSTYLESTRUCT, 8) - TEST_TARGET_ALIGN(LPSTYLESTRUCT, 4) -} - -static void test_pack_LPTITLEBARINFO(void) -{ - /* LPTITLEBARINFO */ - TEST_TYPE_SIZE (LPTITLEBARINFO, 8) - TEST_TYPE_ALIGN (LPTITLEBARINFO, 8) - TEST_TARGET_SIZE (LPTITLEBARINFO, 44) - TEST_TARGET_ALIGN(LPTITLEBARINFO, 4) -} - -static void test_pack_LPTOGGLEKEYS(void) -{ - /* LPTOGGLEKEYS */ - TEST_TYPE_SIZE (LPTOGGLEKEYS, 8) - TEST_TYPE_ALIGN (LPTOGGLEKEYS, 8) - TEST_TARGET_SIZE (LPTOGGLEKEYS, 8) - TEST_TARGET_ALIGN(LPTOGGLEKEYS, 4) -} - -static void test_pack_LPTPMPARAMS(void) -{ - /* LPTPMPARAMS */ - TEST_TYPE_SIZE (LPTPMPARAMS, 8) - TEST_TYPE_ALIGN (LPTPMPARAMS, 8) - TEST_TARGET_SIZE (LPTPMPARAMS, 20) - TEST_TARGET_ALIGN(LPTPMPARAMS, 4) -} - -static void test_pack_LPTRACKMOUSEEVENT(void) -{ - /* LPTRACKMOUSEEVENT */ - TEST_TYPE_SIZE (LPTRACKMOUSEEVENT, 8) - TEST_TYPE_ALIGN (LPTRACKMOUSEEVENT, 8) - TEST_TARGET_SIZE (LPTRACKMOUSEEVENT, 24) - TEST_TARGET_ALIGN(LPTRACKMOUSEEVENT, 8) -} - -static void test_pack_LPWINDOWINFO(void) -{ - /* LPWINDOWINFO */ - TEST_TYPE_SIZE (LPWINDOWINFO, 8) - TEST_TYPE_ALIGN (LPWINDOWINFO, 8) - TEST_TARGET_SIZE (LPWINDOWINFO, 60) - TEST_TARGET_ALIGN(LPWINDOWINFO, 4) -} - -static void test_pack_LPWINDOWPLACEMENT(void) -{ - /* LPWINDOWPLACEMENT */ - TEST_TYPE_SIZE (LPWINDOWPLACEMENT, 8) - TEST_TYPE_ALIGN (LPWINDOWPLACEMENT, 8) - TEST_TARGET_SIZE (LPWINDOWPLACEMENT, 44) - TEST_TARGET_ALIGN(LPWINDOWPLACEMENT, 4) -} - -static void test_pack_LPWINDOWPOS(void) -{ - /* LPWINDOWPOS */ - TEST_TYPE_SIZE (LPWINDOWPOS, 8) - TEST_TYPE_ALIGN (LPWINDOWPOS, 8) - TEST_TARGET_SIZE (LPWINDOWPOS, 40) - TEST_TARGET_ALIGN(LPWINDOWPOS, 8) -} - -static void test_pack_LPWNDCLASSA(void) -{ - /* LPWNDCLASSA */ - TEST_TYPE_SIZE (LPWNDCLASSA, 8) - TEST_TYPE_ALIGN (LPWNDCLASSA, 8) - TEST_TARGET_SIZE (LPWNDCLASSA, 72) - TEST_TARGET_ALIGN(LPWNDCLASSA, 8) -} - -static void test_pack_LPWNDCLASSEXA(void) -{ - /* LPWNDCLASSEXA */ - TEST_TYPE_SIZE (LPWNDCLASSEXA, 8) - TEST_TYPE_ALIGN (LPWNDCLASSEXA, 8) - TEST_TARGET_SIZE (LPWNDCLASSEXA, 80) - TEST_TARGET_ALIGN(LPWNDCLASSEXA, 8) -} - -static void test_pack_LPWNDCLASSEXW(void) -{ - /* LPWNDCLASSEXW */ - TEST_TYPE_SIZE (LPWNDCLASSEXW, 8) - TEST_TYPE_ALIGN (LPWNDCLASSEXW, 8) - TEST_TARGET_SIZE (LPWNDCLASSEXW, 80) - TEST_TARGET_ALIGN(LPWNDCLASSEXW, 8) -} - -static void test_pack_LPWNDCLASSW(void) -{ - /* LPWNDCLASSW */ - TEST_TYPE_SIZE (LPWNDCLASSW, 8) - TEST_TYPE_ALIGN (LPWNDCLASSW, 8) - TEST_TARGET_SIZE (LPWNDCLASSW, 72) - TEST_TARGET_ALIGN(LPWNDCLASSW, 8) -} - -static void test_pack_MDICREATESTRUCTA(void) -{ - /* MDICREATESTRUCTA */ - TEST_TYPE_SIZE (MDICREATESTRUCTA, 56) - TEST_TYPE_ALIGN (MDICREATESTRUCTA, 8) - TEST_FIELD_SIZE (MDICREATESTRUCTA, szClass, 8) - TEST_FIELD_ALIGN (MDICREATESTRUCTA, szClass, 8) - TEST_FIELD_OFFSET(MDICREATESTRUCTA, szClass, 0) - TEST_FIELD_SIZE (MDICREATESTRUCTA, szTitle, 8) - TEST_FIELD_ALIGN (MDICREATESTRUCTA, szTitle, 8) - TEST_FIELD_OFFSET(MDICREATESTRUCTA, szTitle, 8) - TEST_FIELD_SIZE (MDICREATESTRUCTA, hOwner, 8) - TEST_FIELD_ALIGN (MDICREATESTRUCTA, hOwner, 8) - TEST_FIELD_OFFSET(MDICREATESTRUCTA, hOwner, 16) - TEST_FIELD_SIZE (MDICREATESTRUCTA, x, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTA, x, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTA, x, 24) - TEST_FIELD_SIZE (MDICREATESTRUCTA, y, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTA, y, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTA, y, 28) - TEST_FIELD_SIZE (MDICREATESTRUCTA, cx, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTA, cx, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTA, cx, 32) - TEST_FIELD_SIZE (MDICREATESTRUCTA, cy, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTA, cy, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTA, cy, 36) - TEST_FIELD_SIZE (MDICREATESTRUCTA, style, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTA, style, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTA, style, 40) - TEST_FIELD_SIZE (MDICREATESTRUCTA, lParam, 8) - TEST_FIELD_ALIGN (MDICREATESTRUCTA, lParam, 8) - TEST_FIELD_OFFSET(MDICREATESTRUCTA, lParam, 48) -} - -static void test_pack_MDICREATESTRUCTW(void) -{ - /* MDICREATESTRUCTW */ - TEST_TYPE_SIZE (MDICREATESTRUCTW, 56) - TEST_TYPE_ALIGN (MDICREATESTRUCTW, 8) - TEST_FIELD_SIZE (MDICREATESTRUCTW, szClass, 8) - TEST_FIELD_ALIGN (MDICREATESTRUCTW, szClass, 8) - TEST_FIELD_OFFSET(MDICREATESTRUCTW, szClass, 0) - TEST_FIELD_SIZE (MDICREATESTRUCTW, szTitle, 8) - TEST_FIELD_ALIGN (MDICREATESTRUCTW, szTitle, 8) - TEST_FIELD_OFFSET(MDICREATESTRUCTW, szTitle, 8) - TEST_FIELD_SIZE (MDICREATESTRUCTW, hOwner, 8) - TEST_FIELD_ALIGN (MDICREATESTRUCTW, hOwner, 8) - TEST_FIELD_OFFSET(MDICREATESTRUCTW, hOwner, 16) - TEST_FIELD_SIZE (MDICREATESTRUCTW, x, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTW, x, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTW, x, 24) - TEST_FIELD_SIZE (MDICREATESTRUCTW, y, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTW, y, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTW, y, 28) - TEST_FIELD_SIZE (MDICREATESTRUCTW, cx, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTW, cx, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTW, cx, 32) - TEST_FIELD_SIZE (MDICREATESTRUCTW, cy, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTW, cy, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTW, cy, 36) - TEST_FIELD_SIZE (MDICREATESTRUCTW, style, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTW, style, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTW, style, 40) - TEST_FIELD_SIZE (MDICREATESTRUCTW, lParam, 8) - TEST_FIELD_ALIGN (MDICREATESTRUCTW, lParam, 8) - TEST_FIELD_OFFSET(MDICREATESTRUCTW, lParam, 48) -} - -static void test_pack_MDINEXTMENU(void) -{ - /* MDINEXTMENU */ - TEST_TYPE_SIZE (MDINEXTMENU, 24) - TEST_TYPE_ALIGN (MDINEXTMENU, 8) - TEST_FIELD_SIZE (MDINEXTMENU, hmenuIn, 8) - TEST_FIELD_ALIGN (MDINEXTMENU, hmenuIn, 8) - TEST_FIELD_OFFSET(MDINEXTMENU, hmenuIn, 0) - TEST_FIELD_SIZE (MDINEXTMENU, hmenuNext, 8) - TEST_FIELD_ALIGN (MDINEXTMENU, hmenuNext, 8) - TEST_FIELD_OFFSET(MDINEXTMENU, hmenuNext, 8) - TEST_FIELD_SIZE (MDINEXTMENU, hwndNext, 8) - TEST_FIELD_ALIGN (MDINEXTMENU, hwndNext, 8) - TEST_FIELD_OFFSET(MDINEXTMENU, hwndNext, 16) -} - -static void test_pack_MEASUREITEMSTRUCT(void) -{ - /* MEASUREITEMSTRUCT */ - TEST_TYPE_SIZE (MEASUREITEMSTRUCT, 32) - TEST_TYPE_ALIGN (MEASUREITEMSTRUCT, 8) - TEST_FIELD_SIZE (MEASUREITEMSTRUCT, CtlType, 4) - TEST_FIELD_ALIGN (MEASUREITEMSTRUCT, CtlType, 4) - TEST_FIELD_OFFSET(MEASUREITEMSTRUCT, CtlType, 0) - TEST_FIELD_SIZE (MEASUREITEMSTRUCT, CtlID, 4) - TEST_FIELD_ALIGN (MEASUREITEMSTRUCT, CtlID, 4) - TEST_FIELD_OFFSET(MEASUREITEMSTRUCT, CtlID, 4) - TEST_FIELD_SIZE (MEASUREITEMSTRUCT, itemID, 4) - TEST_FIELD_ALIGN (MEASUREITEMSTRUCT, itemID, 4) - TEST_FIELD_OFFSET(MEASUREITEMSTRUCT, itemID, 8) - TEST_FIELD_SIZE (MEASUREITEMSTRUCT, itemWidth, 4) - TEST_FIELD_ALIGN (MEASUREITEMSTRUCT, itemWidth, 4) - TEST_FIELD_OFFSET(MEASUREITEMSTRUCT, itemWidth, 12) - TEST_FIELD_SIZE (MEASUREITEMSTRUCT, itemHeight, 4) - TEST_FIELD_ALIGN (MEASUREITEMSTRUCT, itemHeight, 4) - TEST_FIELD_OFFSET(MEASUREITEMSTRUCT, itemHeight, 16) - TEST_FIELD_SIZE (MEASUREITEMSTRUCT, itemData, 8) - TEST_FIELD_ALIGN (MEASUREITEMSTRUCT, itemData, 8) - TEST_FIELD_OFFSET(MEASUREITEMSTRUCT, itemData, 24) -} - -static void test_pack_MENUINFO(void) -{ - /* MENUINFO */ - TEST_TYPE_SIZE (MENUINFO, 40) - TEST_TYPE_ALIGN (MENUINFO, 8) - TEST_FIELD_SIZE (MENUINFO, cbSize, 4) - TEST_FIELD_ALIGN (MENUINFO, cbSize, 4) - TEST_FIELD_OFFSET(MENUINFO, cbSize, 0) - TEST_FIELD_SIZE (MENUINFO, fMask, 4) - TEST_FIELD_ALIGN (MENUINFO, fMask, 4) - TEST_FIELD_OFFSET(MENUINFO, fMask, 4) - TEST_FIELD_SIZE (MENUINFO, dwStyle, 4) - TEST_FIELD_ALIGN (MENUINFO, dwStyle, 4) - TEST_FIELD_OFFSET(MENUINFO, dwStyle, 8) - TEST_FIELD_SIZE (MENUINFO, cyMax, 4) - TEST_FIELD_ALIGN (MENUINFO, cyMax, 4) - TEST_FIELD_OFFSET(MENUINFO, cyMax, 12) - TEST_FIELD_SIZE (MENUINFO, hbrBack, 8) - TEST_FIELD_ALIGN (MENUINFO, hbrBack, 8) - TEST_FIELD_OFFSET(MENUINFO, hbrBack, 16) - TEST_FIELD_SIZE (MENUINFO, dwContextHelpID, 4) - TEST_FIELD_ALIGN (MENUINFO, dwContextHelpID, 4) - TEST_FIELD_OFFSET(MENUINFO, dwContextHelpID, 24) - TEST_FIELD_SIZE (MENUINFO, dwMenuData, 8) - TEST_FIELD_ALIGN (MENUINFO, dwMenuData, 8) - TEST_FIELD_OFFSET(MENUINFO, dwMenuData, 32) -} - -static void test_pack_MENUITEMINFOA(void) -{ - /* MENUITEMINFOA */ - TEST_TYPE_SIZE (MENUITEMINFOA, 80) - TEST_TYPE_ALIGN (MENUITEMINFOA, 8) - TEST_FIELD_SIZE (MENUITEMINFOA, cbSize, 4) - TEST_FIELD_ALIGN (MENUITEMINFOA, cbSize, 4) - TEST_FIELD_OFFSET(MENUITEMINFOA, cbSize, 0) - TEST_FIELD_SIZE (MENUITEMINFOA, fMask, 4) - TEST_FIELD_ALIGN (MENUITEMINFOA, fMask, 4) - TEST_FIELD_OFFSET(MENUITEMINFOA, fMask, 4) - TEST_FIELD_SIZE (MENUITEMINFOA, fType, 4) - TEST_FIELD_ALIGN (MENUITEMINFOA, fType, 4) - TEST_FIELD_OFFSET(MENUITEMINFOA, fType, 8) - TEST_FIELD_SIZE (MENUITEMINFOA, fState, 4) - TEST_FIELD_ALIGN (MENUITEMINFOA, fState, 4) - TEST_FIELD_OFFSET(MENUITEMINFOA, fState, 12) - TEST_FIELD_SIZE (MENUITEMINFOA, wID, 4) - TEST_FIELD_ALIGN (MENUITEMINFOA, wID, 4) - TEST_FIELD_OFFSET(MENUITEMINFOA, wID, 16) - TEST_FIELD_SIZE (MENUITEMINFOA, hSubMenu, 8) - TEST_FIELD_ALIGN (MENUITEMINFOA, hSubMenu, 8) - TEST_FIELD_OFFSET(MENUITEMINFOA, hSubMenu, 24) - TEST_FIELD_SIZE (MENUITEMINFOA, hbmpChecked, 8) - TEST_FIELD_ALIGN (MENUITEMINFOA, hbmpChecked, 8) - TEST_FIELD_OFFSET(MENUITEMINFOA, hbmpChecked, 32) - TEST_FIELD_SIZE (MENUITEMINFOA, hbmpUnchecked, 8) - TEST_FIELD_ALIGN (MENUITEMINFOA, hbmpUnchecked, 8) - TEST_FIELD_OFFSET(MENUITEMINFOA, hbmpUnchecked, 40) - TEST_FIELD_SIZE (MENUITEMINFOA, dwItemData, 8) - TEST_FIELD_ALIGN (MENUITEMINFOA, dwItemData, 8) - TEST_FIELD_OFFSET(MENUITEMINFOA, dwItemData, 48) - TEST_FIELD_SIZE (MENUITEMINFOA, dwTypeData, 8) - TEST_FIELD_ALIGN (MENUITEMINFOA, dwTypeData, 8) - TEST_FIELD_OFFSET(MENUITEMINFOA, dwTypeData, 56) - TEST_FIELD_SIZE (MENUITEMINFOA, cch, 4) - TEST_FIELD_ALIGN (MENUITEMINFOA, cch, 4) - TEST_FIELD_OFFSET(MENUITEMINFOA, cch, 64) - TEST_FIELD_SIZE (MENUITEMINFOA, hbmpItem, 8) - TEST_FIELD_ALIGN (MENUITEMINFOA, hbmpItem, 8) - TEST_FIELD_OFFSET(MENUITEMINFOA, hbmpItem, 72) -} - -static void test_pack_MENUITEMINFOW(void) -{ - /* MENUITEMINFOW */ - TEST_TYPE_SIZE (MENUITEMINFOW, 80) - TEST_TYPE_ALIGN (MENUITEMINFOW, 8) - TEST_FIELD_SIZE (MENUITEMINFOW, cbSize, 4) - TEST_FIELD_ALIGN (MENUITEMINFOW, cbSize, 4) - TEST_FIELD_OFFSET(MENUITEMINFOW, cbSize, 0) - TEST_FIELD_SIZE (MENUITEMINFOW, fMask, 4) - TEST_FIELD_ALIGN (MENUITEMINFOW, fMask, 4) - TEST_FIELD_OFFSET(MENUITEMINFOW, fMask, 4) - TEST_FIELD_SIZE (MENUITEMINFOW, fType, 4) - TEST_FIELD_ALIGN (MENUITEMINFOW, fType, 4) - TEST_FIELD_OFFSET(MENUITEMINFOW, fType, 8) - TEST_FIELD_SIZE (MENUITEMINFOW, fState, 4) - TEST_FIELD_ALIGN (MENUITEMINFOW, fState, 4) - TEST_FIELD_OFFSET(MENUITEMINFOW, fState, 12) - TEST_FIELD_SIZE (MENUITEMINFOW, wID, 4) - TEST_FIELD_ALIGN (MENUITEMINFOW, wID, 4) - TEST_FIELD_OFFSET(MENUITEMINFOW, wID, 16) - TEST_FIELD_SIZE (MENUITEMINFOW, hSubMenu, 8) - TEST_FIELD_ALIGN (MENUITEMINFOW, hSubMenu, 8) - TEST_FIELD_OFFSET(MENUITEMINFOW, hSubMenu, 24) - TEST_FIELD_SIZE (MENUITEMINFOW, hbmpChecked, 8) - TEST_FIELD_ALIGN (MENUITEMINFOW, hbmpChecked, 8) - TEST_FIELD_OFFSET(MENUITEMINFOW, hbmpChecked, 32) - TEST_FIELD_SIZE (MENUITEMINFOW, hbmpUnchecked, 8) - TEST_FIELD_ALIGN (MENUITEMINFOW, hbmpUnchecked, 8) - TEST_FIELD_OFFSET(MENUITEMINFOW, hbmpUnchecked, 40) - TEST_FIELD_SIZE (MENUITEMINFOW, dwItemData, 8) - TEST_FIELD_ALIGN (MENUITEMINFOW, dwItemData, 8) - TEST_FIELD_OFFSET(MENUITEMINFOW, dwItemData, 48) - TEST_FIELD_SIZE (MENUITEMINFOW, dwTypeData, 8) - TEST_FIELD_ALIGN (MENUITEMINFOW, dwTypeData, 8) - TEST_FIELD_OFFSET(MENUITEMINFOW, dwTypeData, 56) - TEST_FIELD_SIZE (MENUITEMINFOW, cch, 4) - TEST_FIELD_ALIGN (MENUITEMINFOW, cch, 4) - TEST_FIELD_OFFSET(MENUITEMINFOW, cch, 64) - TEST_FIELD_SIZE (MENUITEMINFOW, hbmpItem, 8) - TEST_FIELD_ALIGN (MENUITEMINFOW, hbmpItem, 8) - TEST_FIELD_OFFSET(MENUITEMINFOW, hbmpItem, 72) -} - -static void test_pack_MENUITEMTEMPLATE(void) -{ - /* MENUITEMTEMPLATE */ - TEST_TYPE_SIZE (MENUITEMTEMPLATE, 6) - TEST_TYPE_ALIGN (MENUITEMTEMPLATE, 2) - TEST_FIELD_SIZE (MENUITEMTEMPLATE, mtOption, 2) - TEST_FIELD_ALIGN (MENUITEMTEMPLATE, mtOption, 2) - TEST_FIELD_OFFSET(MENUITEMTEMPLATE, mtOption, 0) - TEST_FIELD_SIZE (MENUITEMTEMPLATE, mtID, 2) - TEST_FIELD_ALIGN (MENUITEMTEMPLATE, mtID, 2) - TEST_FIELD_OFFSET(MENUITEMTEMPLATE, mtID, 2) - TEST_FIELD_SIZE (MENUITEMTEMPLATE, mtString, 2) - TEST_FIELD_ALIGN (MENUITEMTEMPLATE, mtString, 2) - TEST_FIELD_OFFSET(MENUITEMTEMPLATE, mtString, 4) -} - -static void test_pack_MENUITEMTEMPLATEHEADER(void) -{ - /* MENUITEMTEMPLATEHEADER */ - TEST_TYPE_SIZE (MENUITEMTEMPLATEHEADER, 4) - TEST_TYPE_ALIGN (MENUITEMTEMPLATEHEADER, 2) - TEST_FIELD_SIZE (MENUITEMTEMPLATEHEADER, versionNumber, 2) - TEST_FIELD_ALIGN (MENUITEMTEMPLATEHEADER, versionNumber, 2) - TEST_FIELD_OFFSET(MENUITEMTEMPLATEHEADER, versionNumber, 0) - TEST_FIELD_SIZE (MENUITEMTEMPLATEHEADER, offset, 2) - TEST_FIELD_ALIGN (MENUITEMTEMPLATEHEADER, offset, 2) - TEST_FIELD_OFFSET(MENUITEMTEMPLATEHEADER, offset, 2) -} - -static void test_pack_MINIMIZEDMETRICS(void) -{ - /* MINIMIZEDMETRICS */ - TEST_TYPE_SIZE (MINIMIZEDMETRICS, 20) - TEST_TYPE_ALIGN (MINIMIZEDMETRICS, 4) - TEST_FIELD_SIZE (MINIMIZEDMETRICS, cbSize, 4) - TEST_FIELD_ALIGN (MINIMIZEDMETRICS, cbSize, 4) - TEST_FIELD_OFFSET(MINIMIZEDMETRICS, cbSize, 0) - TEST_FIELD_SIZE (MINIMIZEDMETRICS, iWidth, 4) - TEST_FIELD_ALIGN (MINIMIZEDMETRICS, iWidth, 4) - TEST_FIELD_OFFSET(MINIMIZEDMETRICS, iWidth, 4) - TEST_FIELD_SIZE (MINIMIZEDMETRICS, iHorzGap, 4) - TEST_FIELD_ALIGN (MINIMIZEDMETRICS, iHorzGap, 4) - TEST_FIELD_OFFSET(MINIMIZEDMETRICS, iHorzGap, 8) - TEST_FIELD_SIZE (MINIMIZEDMETRICS, iVertGap, 4) - TEST_FIELD_ALIGN (MINIMIZEDMETRICS, iVertGap, 4) - TEST_FIELD_OFFSET(MINIMIZEDMETRICS, iVertGap, 12) - TEST_FIELD_SIZE (MINIMIZEDMETRICS, iArrange, 4) - TEST_FIELD_ALIGN (MINIMIZEDMETRICS, iArrange, 4) - TEST_FIELD_OFFSET(MINIMIZEDMETRICS, iArrange, 16) -} - -static void test_pack_MINMAXINFO(void) -{ - /* MINMAXINFO */ - TEST_TYPE_SIZE (MINMAXINFO, 40) - TEST_TYPE_ALIGN (MINMAXINFO, 4) - TEST_FIELD_SIZE (MINMAXINFO, ptReserved, 8) - TEST_FIELD_ALIGN (MINMAXINFO, ptReserved, 4) - TEST_FIELD_OFFSET(MINMAXINFO, ptReserved, 0) - TEST_FIELD_SIZE (MINMAXINFO, ptMaxSize, 8) - TEST_FIELD_ALIGN (MINMAXINFO, ptMaxSize, 4) - TEST_FIELD_OFFSET(MINMAXINFO, ptMaxSize, 8) - TEST_FIELD_SIZE (MINMAXINFO, ptMaxPosition, 8) - TEST_FIELD_ALIGN (MINMAXINFO, ptMaxPosition, 4) - TEST_FIELD_OFFSET(MINMAXINFO, ptMaxPosition, 16) - TEST_FIELD_SIZE (MINMAXINFO, ptMinTrackSize, 8) - TEST_FIELD_ALIGN (MINMAXINFO, ptMinTrackSize, 4) - TEST_FIELD_OFFSET(MINMAXINFO, ptMinTrackSize, 24) - TEST_FIELD_SIZE (MINMAXINFO, ptMaxTrackSize, 8) - TEST_FIELD_ALIGN (MINMAXINFO, ptMaxTrackSize, 4) - TEST_FIELD_OFFSET(MINMAXINFO, ptMaxTrackSize, 32) -} - -static void test_pack_MONITORENUMPROC(void) -{ - /* MONITORENUMPROC */ - TEST_TYPE_SIZE (MONITORENUMPROC, 8) - TEST_TYPE_ALIGN (MONITORENUMPROC, 8) -} - -static void test_pack_MONITORINFO(void) -{ - /* MONITORINFO */ - TEST_TYPE_SIZE (MONITORINFO, 40) - TEST_TYPE_ALIGN (MONITORINFO, 4) - TEST_FIELD_SIZE (MONITORINFO, cbSize, 4) - TEST_FIELD_ALIGN (MONITORINFO, cbSize, 4) - TEST_FIELD_OFFSET(MONITORINFO, cbSize, 0) - TEST_FIELD_SIZE (MONITORINFO, rcMonitor, 16) - TEST_FIELD_ALIGN (MONITORINFO, rcMonitor, 4) - TEST_FIELD_OFFSET(MONITORINFO, rcMonitor, 4) - TEST_FIELD_SIZE (MONITORINFO, rcWork, 16) - TEST_FIELD_ALIGN (MONITORINFO, rcWork, 4) - TEST_FIELD_OFFSET(MONITORINFO, rcWork, 20) - TEST_FIELD_SIZE (MONITORINFO, dwFlags, 4) - TEST_FIELD_ALIGN (MONITORINFO, dwFlags, 4) - TEST_FIELD_OFFSET(MONITORINFO, dwFlags, 36) -} - -static void test_pack_MONITORINFOEXA(void) -{ - /* MONITORINFOEXA */ - TEST_TYPE_SIZE (MONITORINFOEXA, 72) - TEST_TYPE_ALIGN (MONITORINFOEXA, 4) - TEST_FIELD_SIZE (MONITORINFOEXA, cbSize, 4) - TEST_FIELD_ALIGN (MONITORINFOEXA, cbSize, 4) - TEST_FIELD_OFFSET(MONITORINFOEXA, cbSize, 0) - TEST_FIELD_SIZE (MONITORINFOEXA, rcMonitor, 16) - TEST_FIELD_ALIGN (MONITORINFOEXA, rcMonitor, 4) - TEST_FIELD_OFFSET(MONITORINFOEXA, rcMonitor, 4) - TEST_FIELD_SIZE (MONITORINFOEXA, rcWork, 16) - TEST_FIELD_ALIGN (MONITORINFOEXA, rcWork, 4) - TEST_FIELD_OFFSET(MONITORINFOEXA, rcWork, 20) - TEST_FIELD_SIZE (MONITORINFOEXA, dwFlags, 4) - TEST_FIELD_ALIGN (MONITORINFOEXA, dwFlags, 4) - TEST_FIELD_OFFSET(MONITORINFOEXA, dwFlags, 36) - TEST_FIELD_SIZE (MONITORINFOEXA, szDevice, 32) - TEST_FIELD_ALIGN (MONITORINFOEXA, szDevice, 1) - TEST_FIELD_OFFSET(MONITORINFOEXA, szDevice, 40) -} - -static void test_pack_MONITORINFOEXW(void) -{ - /* MONITORINFOEXW */ - TEST_TYPE_SIZE (MONITORINFOEXW, 104) - TEST_TYPE_ALIGN (MONITORINFOEXW, 4) - TEST_FIELD_SIZE (MONITORINFOEXW, cbSize, 4) - TEST_FIELD_ALIGN (MONITORINFOEXW, cbSize, 4) - TEST_FIELD_OFFSET(MONITORINFOEXW, cbSize, 0) - TEST_FIELD_SIZE (MONITORINFOEXW, rcMonitor, 16) - TEST_FIELD_ALIGN (MONITORINFOEXW, rcMonitor, 4) - TEST_FIELD_OFFSET(MONITORINFOEXW, rcMonitor, 4) - TEST_FIELD_SIZE (MONITORINFOEXW, rcWork, 16) - TEST_FIELD_ALIGN (MONITORINFOEXW, rcWork, 4) - TEST_FIELD_OFFSET(MONITORINFOEXW, rcWork, 20) - TEST_FIELD_SIZE (MONITORINFOEXW, dwFlags, 4) - TEST_FIELD_ALIGN (MONITORINFOEXW, dwFlags, 4) - TEST_FIELD_OFFSET(MONITORINFOEXW, dwFlags, 36) - TEST_FIELD_SIZE (MONITORINFOEXW, szDevice, 64) - TEST_FIELD_ALIGN (MONITORINFOEXW, szDevice, 2) - TEST_FIELD_OFFSET(MONITORINFOEXW, szDevice, 40) -} - -static void test_pack_MOUSEHOOKSTRUCT(void) -{ - /* MOUSEHOOKSTRUCT */ - TEST_TYPE_SIZE (MOUSEHOOKSTRUCT, 32) - TEST_TYPE_ALIGN (MOUSEHOOKSTRUCT, 8) - TEST_FIELD_SIZE (MOUSEHOOKSTRUCT, pt, 8) - TEST_FIELD_ALIGN (MOUSEHOOKSTRUCT, pt, 4) - TEST_FIELD_OFFSET(MOUSEHOOKSTRUCT, pt, 0) - TEST_FIELD_SIZE (MOUSEHOOKSTRUCT, hwnd, 8) - TEST_FIELD_ALIGN (MOUSEHOOKSTRUCT, hwnd, 8) - TEST_FIELD_OFFSET(MOUSEHOOKSTRUCT, hwnd, 8) - TEST_FIELD_SIZE (MOUSEHOOKSTRUCT, wHitTestCode, 4) - TEST_FIELD_ALIGN (MOUSEHOOKSTRUCT, wHitTestCode, 4) - TEST_FIELD_OFFSET(MOUSEHOOKSTRUCT, wHitTestCode, 16) - TEST_FIELD_SIZE (MOUSEHOOKSTRUCT, dwExtraInfo, 8) - TEST_FIELD_ALIGN (MOUSEHOOKSTRUCT, dwExtraInfo, 8) - TEST_FIELD_OFFSET(MOUSEHOOKSTRUCT, dwExtraInfo, 24) -} - -static void test_pack_MOUSEINPUT(void) -{ - /* MOUSEINPUT */ - TEST_TYPE_SIZE (MOUSEINPUT, 32) - TEST_TYPE_ALIGN (MOUSEINPUT, 8) - TEST_FIELD_SIZE (MOUSEINPUT, dx, 4) - TEST_FIELD_ALIGN (MOUSEINPUT, dx, 4) - TEST_FIELD_OFFSET(MOUSEINPUT, dx, 0) - TEST_FIELD_SIZE (MOUSEINPUT, dy, 4) - TEST_FIELD_ALIGN (MOUSEINPUT, dy, 4) - TEST_FIELD_OFFSET(MOUSEINPUT, dy, 4) - TEST_FIELD_SIZE (MOUSEINPUT, mouseData, 4) - TEST_FIELD_ALIGN (MOUSEINPUT, mouseData, 4) - TEST_FIELD_OFFSET(MOUSEINPUT, mouseData, 8) - TEST_FIELD_SIZE (MOUSEINPUT, dwFlags, 4) - TEST_FIELD_ALIGN (MOUSEINPUT, dwFlags, 4) - TEST_FIELD_OFFSET(MOUSEINPUT, dwFlags, 12) - TEST_FIELD_SIZE (MOUSEINPUT, time, 4) - TEST_FIELD_ALIGN (MOUSEINPUT, time, 4) - TEST_FIELD_OFFSET(MOUSEINPUT, time, 16) - TEST_FIELD_SIZE (MOUSEINPUT, dwExtraInfo, 8) - TEST_FIELD_ALIGN (MOUSEINPUT, dwExtraInfo, 8) - TEST_FIELD_OFFSET(MOUSEINPUT, dwExtraInfo, 24) -} - -static void test_pack_MOUSEKEYS(void) -{ - /* MOUSEKEYS */ - TEST_TYPE_SIZE (MOUSEKEYS, 28) - TEST_TYPE_ALIGN (MOUSEKEYS, 4) - TEST_FIELD_SIZE (MOUSEKEYS, cbSize, 4) - TEST_FIELD_ALIGN (MOUSEKEYS, cbSize, 4) - TEST_FIELD_OFFSET(MOUSEKEYS, cbSize, 0) - TEST_FIELD_SIZE (MOUSEKEYS, dwFlags, 4) - TEST_FIELD_ALIGN (MOUSEKEYS, dwFlags, 4) - TEST_FIELD_OFFSET(MOUSEKEYS, dwFlags, 4) - TEST_FIELD_SIZE (MOUSEKEYS, iMaxSpeed, 4) - TEST_FIELD_ALIGN (MOUSEKEYS, iMaxSpeed, 4) - TEST_FIELD_OFFSET(MOUSEKEYS, iMaxSpeed, 8) - TEST_FIELD_SIZE (MOUSEKEYS, iTimeToMaxSpeed, 4) - TEST_FIELD_ALIGN (MOUSEKEYS, iTimeToMaxSpeed, 4) - TEST_FIELD_OFFSET(MOUSEKEYS, iTimeToMaxSpeed, 12) - TEST_FIELD_SIZE (MOUSEKEYS, iCtrlSpeed, 4) - TEST_FIELD_ALIGN (MOUSEKEYS, iCtrlSpeed, 4) - TEST_FIELD_OFFSET(MOUSEKEYS, iCtrlSpeed, 16) - TEST_FIELD_SIZE (MOUSEKEYS, dwReserved1, 4) - TEST_FIELD_ALIGN (MOUSEKEYS, dwReserved1, 4) - TEST_FIELD_OFFSET(MOUSEKEYS, dwReserved1, 20) - TEST_FIELD_SIZE (MOUSEKEYS, dwReserved2, 4) - TEST_FIELD_ALIGN (MOUSEKEYS, dwReserved2, 4) - TEST_FIELD_OFFSET(MOUSEKEYS, dwReserved2, 24) -} - -static void test_pack_MSG(void) -{ - /* MSG */ - TEST_TYPE_SIZE (MSG, 48) - TEST_TYPE_ALIGN (MSG, 8) - TEST_FIELD_SIZE (MSG, hwnd, 8) - TEST_FIELD_ALIGN (MSG, hwnd, 8) - TEST_FIELD_OFFSET(MSG, hwnd, 0) - TEST_FIELD_SIZE (MSG, message, 4) - TEST_FIELD_ALIGN (MSG, message, 4) - TEST_FIELD_OFFSET(MSG, message, 8) - TEST_FIELD_SIZE (MSG, wParam, 8) - TEST_FIELD_ALIGN (MSG, wParam, 8) - TEST_FIELD_OFFSET(MSG, wParam, 16) - TEST_FIELD_SIZE (MSG, lParam, 8) - TEST_FIELD_ALIGN (MSG, lParam, 8) - TEST_FIELD_OFFSET(MSG, lParam, 24) - TEST_FIELD_SIZE (MSG, time, 4) - TEST_FIELD_ALIGN (MSG, time, 4) - TEST_FIELD_OFFSET(MSG, time, 32) - TEST_FIELD_SIZE (MSG, pt, 8) - TEST_FIELD_ALIGN (MSG, pt, 4) - TEST_FIELD_OFFSET(MSG, pt, 36) -} - -static void test_pack_MSGBOXCALLBACK(void) -{ - /* MSGBOXCALLBACK */ - TEST_TYPE_SIZE (MSGBOXCALLBACK, 8) - TEST_TYPE_ALIGN (MSGBOXCALLBACK, 8) -} - -static void test_pack_MSGBOXPARAMSA(void) -{ - /* MSGBOXPARAMSA */ - TEST_TYPE_SIZE (MSGBOXPARAMSA, 80) - TEST_TYPE_ALIGN (MSGBOXPARAMSA, 8) - TEST_FIELD_SIZE (MSGBOXPARAMSA, cbSize, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSA, cbSize, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSA, cbSize, 0) - TEST_FIELD_SIZE (MSGBOXPARAMSA, hwndOwner, 8) - TEST_FIELD_ALIGN (MSGBOXPARAMSA, hwndOwner, 8) - TEST_FIELD_OFFSET(MSGBOXPARAMSA, hwndOwner, 8) - TEST_FIELD_SIZE (MSGBOXPARAMSA, hInstance, 8) - TEST_FIELD_ALIGN (MSGBOXPARAMSA, hInstance, 8) - TEST_FIELD_OFFSET(MSGBOXPARAMSA, hInstance, 16) - TEST_FIELD_SIZE (MSGBOXPARAMSA, lpszText, 8) - TEST_FIELD_ALIGN (MSGBOXPARAMSA, lpszText, 8) - TEST_FIELD_OFFSET(MSGBOXPARAMSA, lpszText, 24) - TEST_FIELD_SIZE (MSGBOXPARAMSA, lpszCaption, 8) - TEST_FIELD_ALIGN (MSGBOXPARAMSA, lpszCaption, 8) - TEST_FIELD_OFFSET(MSGBOXPARAMSA, lpszCaption, 32) - TEST_FIELD_SIZE (MSGBOXPARAMSA, dwStyle, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSA, dwStyle, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSA, dwStyle, 40) - TEST_FIELD_SIZE (MSGBOXPARAMSA, lpszIcon, 8) - TEST_FIELD_ALIGN (MSGBOXPARAMSA, lpszIcon, 8) - TEST_FIELD_OFFSET(MSGBOXPARAMSA, lpszIcon, 48) - TEST_FIELD_SIZE (MSGBOXPARAMSA, dwContextHelpId, 8) - TEST_FIELD_ALIGN (MSGBOXPARAMSA, dwContextHelpId, 8) - TEST_FIELD_OFFSET(MSGBOXPARAMSA, dwContextHelpId, 56) - TEST_FIELD_SIZE (MSGBOXPARAMSA, lpfnMsgBoxCallback, 8) - TEST_FIELD_ALIGN (MSGBOXPARAMSA, lpfnMsgBoxCallback, 8) - TEST_FIELD_OFFSET(MSGBOXPARAMSA, lpfnMsgBoxCallback, 64) - TEST_FIELD_SIZE (MSGBOXPARAMSA, dwLanguageId, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSA, dwLanguageId, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSA, dwLanguageId, 72) -} - -static void test_pack_MSGBOXPARAMSW(void) -{ - /* MSGBOXPARAMSW */ - TEST_TYPE_SIZE (MSGBOXPARAMSW, 80) - TEST_TYPE_ALIGN (MSGBOXPARAMSW, 8) - TEST_FIELD_SIZE (MSGBOXPARAMSW, cbSize, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSW, cbSize, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSW, cbSize, 0) - TEST_FIELD_SIZE (MSGBOXPARAMSW, hwndOwner, 8) - TEST_FIELD_ALIGN (MSGBOXPARAMSW, hwndOwner, 8) - TEST_FIELD_OFFSET(MSGBOXPARAMSW, hwndOwner, 8) - TEST_FIELD_SIZE (MSGBOXPARAMSW, hInstance, 8) - TEST_FIELD_ALIGN (MSGBOXPARAMSW, hInstance, 8) - TEST_FIELD_OFFSET(MSGBOXPARAMSW, hInstance, 16) - TEST_FIELD_SIZE (MSGBOXPARAMSW, lpszText, 8) - TEST_FIELD_ALIGN (MSGBOXPARAMSW, lpszText, 8) - TEST_FIELD_OFFSET(MSGBOXPARAMSW, lpszText, 24) - TEST_FIELD_SIZE (MSGBOXPARAMSW, lpszCaption, 8) - TEST_FIELD_ALIGN (MSGBOXPARAMSW, lpszCaption, 8) - TEST_FIELD_OFFSET(MSGBOXPARAMSW, lpszCaption, 32) - TEST_FIELD_SIZE (MSGBOXPARAMSW, dwStyle, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSW, dwStyle, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSW, dwStyle, 40) - TEST_FIELD_SIZE (MSGBOXPARAMSW, lpszIcon, 8) - TEST_FIELD_ALIGN (MSGBOXPARAMSW, lpszIcon, 8) - TEST_FIELD_OFFSET(MSGBOXPARAMSW, lpszIcon, 48) - TEST_FIELD_SIZE (MSGBOXPARAMSW, dwContextHelpId, 8) - TEST_FIELD_ALIGN (MSGBOXPARAMSW, dwContextHelpId, 8) - TEST_FIELD_OFFSET(MSGBOXPARAMSW, dwContextHelpId, 56) - TEST_FIELD_SIZE (MSGBOXPARAMSW, lpfnMsgBoxCallback, 8) - TEST_FIELD_ALIGN (MSGBOXPARAMSW, lpfnMsgBoxCallback, 8) - TEST_FIELD_OFFSET(MSGBOXPARAMSW, lpfnMsgBoxCallback, 64) - TEST_FIELD_SIZE (MSGBOXPARAMSW, dwLanguageId, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSW, dwLanguageId, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSW, dwLanguageId, 72) -} - -static void test_pack_MSLLHOOKSTRUCT(void) -{ - /* MSLLHOOKSTRUCT */ - TEST_TYPE_SIZE (MSLLHOOKSTRUCT, 32) - TEST_TYPE_ALIGN (MSLLHOOKSTRUCT, 8) - TEST_FIELD_SIZE (MSLLHOOKSTRUCT, pt, 8) - TEST_FIELD_ALIGN (MSLLHOOKSTRUCT, pt, 4) - TEST_FIELD_OFFSET(MSLLHOOKSTRUCT, pt, 0) - TEST_FIELD_SIZE (MSLLHOOKSTRUCT, mouseData, 4) - TEST_FIELD_ALIGN (MSLLHOOKSTRUCT, mouseData, 4) - TEST_FIELD_OFFSET(MSLLHOOKSTRUCT, mouseData, 8) - TEST_FIELD_SIZE (MSLLHOOKSTRUCT, flags, 4) - TEST_FIELD_ALIGN (MSLLHOOKSTRUCT, flags, 4) - TEST_FIELD_OFFSET(MSLLHOOKSTRUCT, flags, 12) - TEST_FIELD_SIZE (MSLLHOOKSTRUCT, time, 4) - TEST_FIELD_ALIGN (MSLLHOOKSTRUCT, time, 4) - TEST_FIELD_OFFSET(MSLLHOOKSTRUCT, time, 16) - TEST_FIELD_SIZE (MSLLHOOKSTRUCT, dwExtraInfo, 8) - TEST_FIELD_ALIGN (MSLLHOOKSTRUCT, dwExtraInfo, 8) - TEST_FIELD_OFFSET(MSLLHOOKSTRUCT, dwExtraInfo, 24) -} - -static void test_pack_MULTIKEYHELPA(void) -{ - /* MULTIKEYHELPA */ - TEST_TYPE_SIZE (MULTIKEYHELPA, 8) - TEST_TYPE_ALIGN (MULTIKEYHELPA, 4) - TEST_FIELD_SIZE (MULTIKEYHELPA, mkSize, 4) - TEST_FIELD_ALIGN (MULTIKEYHELPA, mkSize, 4) - TEST_FIELD_OFFSET(MULTIKEYHELPA, mkSize, 0) - TEST_FIELD_SIZE (MULTIKEYHELPA, mkKeylist, 1) - TEST_FIELD_ALIGN (MULTIKEYHELPA, mkKeylist, 1) - TEST_FIELD_OFFSET(MULTIKEYHELPA, mkKeylist, 4) - TEST_FIELD_SIZE (MULTIKEYHELPA, szKeyphrase, 1) - TEST_FIELD_ALIGN (MULTIKEYHELPA, szKeyphrase, 1) - TEST_FIELD_OFFSET(MULTIKEYHELPA, szKeyphrase, 5) -} - -static void test_pack_MULTIKEYHELPW(void) -{ - /* MULTIKEYHELPW */ - TEST_TYPE_SIZE (MULTIKEYHELPW, 8) - TEST_TYPE_ALIGN (MULTIKEYHELPW, 4) - TEST_FIELD_SIZE (MULTIKEYHELPW, mkSize, 4) - TEST_FIELD_ALIGN (MULTIKEYHELPW, mkSize, 4) - TEST_FIELD_OFFSET(MULTIKEYHELPW, mkSize, 0) - TEST_FIELD_SIZE (MULTIKEYHELPW, mkKeylist, 2) - TEST_FIELD_ALIGN (MULTIKEYHELPW, mkKeylist, 2) - TEST_FIELD_OFFSET(MULTIKEYHELPW, mkKeylist, 4) - TEST_FIELD_SIZE (MULTIKEYHELPW, szKeyphrase, 2) - TEST_FIELD_ALIGN (MULTIKEYHELPW, szKeyphrase, 2) - TEST_FIELD_OFFSET(MULTIKEYHELPW, szKeyphrase, 6) -} - -static void test_pack_NAMEENUMPROCA(void) -{ - /* NAMEENUMPROCA */ - TEST_TYPE_SIZE (NAMEENUMPROCA, 8) - TEST_TYPE_ALIGN (NAMEENUMPROCA, 8) -} - -static void test_pack_NAMEENUMPROCW(void) -{ - /* NAMEENUMPROCW */ - TEST_TYPE_SIZE (NAMEENUMPROCW, 8) - TEST_TYPE_ALIGN (NAMEENUMPROCW, 8) -} - -static void test_pack_NCCALCSIZE_PARAMS(void) -{ - /* NCCALCSIZE_PARAMS */ - TEST_TYPE_SIZE (NCCALCSIZE_PARAMS, 56) - TEST_TYPE_ALIGN (NCCALCSIZE_PARAMS, 8) - TEST_FIELD_SIZE (NCCALCSIZE_PARAMS, rgrc, 48) - TEST_FIELD_ALIGN (NCCALCSIZE_PARAMS, rgrc, 4) - TEST_FIELD_OFFSET(NCCALCSIZE_PARAMS, rgrc, 0) - TEST_FIELD_SIZE (NCCALCSIZE_PARAMS, lppos, 8) - TEST_FIELD_ALIGN (NCCALCSIZE_PARAMS, lppos, 8) - TEST_FIELD_OFFSET(NCCALCSIZE_PARAMS, lppos, 48) -} - -static void test_pack_NMHDR(void) -{ - /* NMHDR */ - TEST_TYPE_SIZE (NMHDR, 24) - TEST_TYPE_ALIGN (NMHDR, 8) - TEST_FIELD_SIZE (NMHDR, hwndFrom, 8) - TEST_FIELD_ALIGN (NMHDR, hwndFrom, 8) - TEST_FIELD_OFFSET(NMHDR, hwndFrom, 0) - TEST_FIELD_SIZE (NMHDR, idFrom, 8) - TEST_FIELD_ALIGN (NMHDR, idFrom, 8) - TEST_FIELD_OFFSET(NMHDR, idFrom, 8) - TEST_FIELD_SIZE (NMHDR, code, 4) - TEST_FIELD_ALIGN (NMHDR, code, 4) - TEST_FIELD_OFFSET(NMHDR, code, 16) -} - -static void test_pack_NONCLIENTMETRICSA(void) -{ - /* NONCLIENTMETRICSA */ - TEST_TYPE_SIZE (NONCLIENTMETRICSA, 340) - TEST_TYPE_ALIGN (NONCLIENTMETRICSA, 4) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, cbSize, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, cbSize, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, cbSize, 0) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, iBorderWidth, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iBorderWidth, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iBorderWidth, 4) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, iScrollWidth, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iScrollWidth, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iScrollWidth, 8) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, iScrollHeight, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iScrollHeight, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iScrollHeight, 12) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, iCaptionWidth, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iCaptionWidth, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iCaptionWidth, 16) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, iCaptionHeight, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iCaptionHeight, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iCaptionHeight, 20) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, lfCaptionFont, 60) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, lfCaptionFont, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, lfCaptionFont, 24) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, iSmCaptionWidth, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iSmCaptionWidth, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iSmCaptionWidth, 84) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, iSmCaptionHeight, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iSmCaptionHeight, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iSmCaptionHeight, 88) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, lfSmCaptionFont, 60) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, lfSmCaptionFont, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, lfSmCaptionFont, 92) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, iMenuWidth, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iMenuWidth, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iMenuWidth, 152) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, iMenuHeight, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iMenuHeight, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iMenuHeight, 156) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, lfMenuFont, 60) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, lfMenuFont, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, lfMenuFont, 160) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, lfStatusFont, 60) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, lfStatusFont, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, lfStatusFont, 220) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, lfMessageFont, 60) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, lfMessageFont, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, lfMessageFont, 280) -} - -static void test_pack_NONCLIENTMETRICSW(void) -{ - /* NONCLIENTMETRICSW */ - TEST_TYPE_SIZE (NONCLIENTMETRICSW, 500) - TEST_TYPE_ALIGN (NONCLIENTMETRICSW, 4) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, cbSize, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, cbSize, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, cbSize, 0) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, iBorderWidth, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iBorderWidth, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iBorderWidth, 4) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, iScrollWidth, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iScrollWidth, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iScrollWidth, 8) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, iScrollHeight, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iScrollHeight, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iScrollHeight, 12) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, iCaptionWidth, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iCaptionWidth, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iCaptionWidth, 16) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, iCaptionHeight, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iCaptionHeight, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iCaptionHeight, 20) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, lfCaptionFont, 92) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, lfCaptionFont, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, lfCaptionFont, 24) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, iSmCaptionWidth, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iSmCaptionWidth, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iSmCaptionWidth, 116) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, iSmCaptionHeight, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iSmCaptionHeight, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iSmCaptionHeight, 120) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, lfSmCaptionFont, 92) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, lfSmCaptionFont, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, lfSmCaptionFont, 124) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, iMenuWidth, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iMenuWidth, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iMenuWidth, 216) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, iMenuHeight, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iMenuHeight, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iMenuHeight, 220) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, lfMenuFont, 92) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, lfMenuFont, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, lfMenuFont, 224) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, lfStatusFont, 92) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, lfStatusFont, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, lfStatusFont, 316) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, lfMessageFont, 92) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, lfMessageFont, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, lfMessageFont, 408) -} - -static void test_pack_PAINTSTRUCT(void) -{ - /* PAINTSTRUCT */ - TEST_TYPE_SIZE (PAINTSTRUCT, 72) - TEST_TYPE_ALIGN (PAINTSTRUCT, 8) - TEST_FIELD_SIZE (PAINTSTRUCT, hdc, 8) - TEST_FIELD_ALIGN (PAINTSTRUCT, hdc, 8) - TEST_FIELD_OFFSET(PAINTSTRUCT, hdc, 0) - TEST_FIELD_SIZE (PAINTSTRUCT, fErase, 4) - TEST_FIELD_ALIGN (PAINTSTRUCT, fErase, 4) - TEST_FIELD_OFFSET(PAINTSTRUCT, fErase, 8) - TEST_FIELD_SIZE (PAINTSTRUCT, rcPaint, 16) - TEST_FIELD_ALIGN (PAINTSTRUCT, rcPaint, 4) - TEST_FIELD_OFFSET(PAINTSTRUCT, rcPaint, 12) - TEST_FIELD_SIZE (PAINTSTRUCT, fRestore, 4) - TEST_FIELD_ALIGN (PAINTSTRUCT, fRestore, 4) - TEST_FIELD_OFFSET(PAINTSTRUCT, fRestore, 28) - TEST_FIELD_SIZE (PAINTSTRUCT, fIncUpdate, 4) - TEST_FIELD_ALIGN (PAINTSTRUCT, fIncUpdate, 4) - TEST_FIELD_OFFSET(PAINTSTRUCT, fIncUpdate, 32) - TEST_FIELD_SIZE (PAINTSTRUCT, rgbReserved, 32) - TEST_FIELD_ALIGN (PAINTSTRUCT, rgbReserved, 1) - TEST_FIELD_OFFSET(PAINTSTRUCT, rgbReserved, 36) -} - -static void test_pack_PCOMBOBOXINFO(void) -{ - /* PCOMBOBOXINFO */ - TEST_TYPE_SIZE (PCOMBOBOXINFO, 8) - TEST_TYPE_ALIGN (PCOMBOBOXINFO, 8) - TEST_TARGET_SIZE (PCOMBOBOXINFO, 64) - TEST_TARGET_ALIGN(PCOMBOBOXINFO, 8) -} - -static void test_pack_PCOMPAREITEMSTRUCT(void) -{ - /* PCOMPAREITEMSTRUCT */ - TEST_TYPE_SIZE (PCOMPAREITEMSTRUCT, 8) - TEST_TYPE_ALIGN (PCOMPAREITEMSTRUCT, 8) - TEST_TARGET_SIZE (PCOMPAREITEMSTRUCT, 56) - TEST_TARGET_ALIGN(PCOMPAREITEMSTRUCT, 8) -} - -static void test_pack_PCOPYDATASTRUCT(void) -{ - /* PCOPYDATASTRUCT */ - TEST_TYPE_SIZE (PCOPYDATASTRUCT, 8) - TEST_TYPE_ALIGN (PCOPYDATASTRUCT, 8) - TEST_TARGET_SIZE (PCOPYDATASTRUCT, 24) - TEST_TARGET_ALIGN(PCOPYDATASTRUCT, 8) -} - -static void test_pack_PCURSORINFO(void) -{ - /* PCURSORINFO */ - TEST_TYPE_SIZE (PCURSORINFO, 8) - TEST_TYPE_ALIGN (PCURSORINFO, 8) - TEST_TARGET_SIZE (PCURSORINFO, 24) - TEST_TARGET_ALIGN(PCURSORINFO, 8) -} - -static void test_pack_PCWPRETSTRUCT(void) -{ - /* PCWPRETSTRUCT */ - TEST_TYPE_SIZE (PCWPRETSTRUCT, 8) - TEST_TYPE_ALIGN (PCWPRETSTRUCT, 8) - TEST_TARGET_SIZE (PCWPRETSTRUCT, 40) - TEST_TARGET_ALIGN(PCWPRETSTRUCT, 8) -} - -static void test_pack_PCWPSTRUCT(void) -{ - /* PCWPSTRUCT */ - TEST_TYPE_SIZE (PCWPSTRUCT, 8) - TEST_TYPE_ALIGN (PCWPSTRUCT, 8) - TEST_TARGET_SIZE (PCWPSTRUCT, 32) - TEST_TARGET_ALIGN(PCWPSTRUCT, 8) -} - -static void test_pack_PDEBUGHOOKINFO(void) -{ - /* PDEBUGHOOKINFO */ - TEST_TYPE_SIZE (PDEBUGHOOKINFO, 8) - TEST_TYPE_ALIGN (PDEBUGHOOKINFO, 8) - TEST_TARGET_SIZE (PDEBUGHOOKINFO, 32) - TEST_TARGET_ALIGN(PDEBUGHOOKINFO, 8) -} - -static void test_pack_PDELETEITEMSTRUCT(void) -{ - /* PDELETEITEMSTRUCT */ - TEST_TYPE_SIZE (PDELETEITEMSTRUCT, 8) - TEST_TYPE_ALIGN (PDELETEITEMSTRUCT, 8) - TEST_TARGET_SIZE (PDELETEITEMSTRUCT, 32) - TEST_TARGET_ALIGN(PDELETEITEMSTRUCT, 8) -} - -static void test_pack_PDLGITEMTEMPLATEA(void) -{ - /* PDLGITEMTEMPLATEA */ - TEST_TYPE_SIZE (PDLGITEMTEMPLATEA, 8) - TEST_TYPE_ALIGN (PDLGITEMTEMPLATEA, 8) - TEST_TARGET_SIZE (PDLGITEMTEMPLATEA, 18) - TEST_TARGET_ALIGN(PDLGITEMTEMPLATEA, 2) -} - -static void test_pack_PDLGITEMTEMPLATEW(void) -{ - /* PDLGITEMTEMPLATEW */ - TEST_TYPE_SIZE (PDLGITEMTEMPLATEW, 8) - TEST_TYPE_ALIGN (PDLGITEMTEMPLATEW, 8) - TEST_TARGET_SIZE (PDLGITEMTEMPLATEW, 18) - TEST_TARGET_ALIGN(PDLGITEMTEMPLATEW, 2) -} - -static void test_pack_PDRAWITEMSTRUCT(void) -{ - /* PDRAWITEMSTRUCT */ - TEST_TYPE_SIZE (PDRAWITEMSTRUCT, 8) - TEST_TYPE_ALIGN (PDRAWITEMSTRUCT, 8) - TEST_TARGET_SIZE (PDRAWITEMSTRUCT, 64) - TEST_TARGET_ALIGN(PDRAWITEMSTRUCT, 8) -} - -static void test_pack_PEVENTMSG(void) -{ - /* PEVENTMSG */ - TEST_TYPE_SIZE (PEVENTMSG, 8) - TEST_TYPE_ALIGN (PEVENTMSG, 8) - TEST_TARGET_SIZE (PEVENTMSG, 24) - TEST_TARGET_ALIGN(PEVENTMSG, 8) -} - -static void test_pack_PFLASHWINFO(void) -{ - /* PFLASHWINFO */ - TEST_TYPE_SIZE (PFLASHWINFO, 8) - TEST_TYPE_ALIGN (PFLASHWINFO, 8) - TEST_TARGET_SIZE (PFLASHWINFO, 32) - TEST_TARGET_ALIGN(PFLASHWINFO, 8) -} - -static void test_pack_PGUITHREADINFO(void) -{ - /* PGUITHREADINFO */ - TEST_TYPE_SIZE (PGUITHREADINFO, 8) - TEST_TYPE_ALIGN (PGUITHREADINFO, 8) - TEST_TARGET_SIZE (PGUITHREADINFO, 72) - TEST_TARGET_ALIGN(PGUITHREADINFO, 8) -} - -static void test_pack_PHARDWAREHOOKSTRUCT(void) -{ - /* PHARDWAREHOOKSTRUCT */ - TEST_TYPE_SIZE (PHARDWAREHOOKSTRUCT, 8) - TEST_TYPE_ALIGN (PHARDWAREHOOKSTRUCT, 8) - TEST_TARGET_SIZE (PHARDWAREHOOKSTRUCT, 32) - TEST_TARGET_ALIGN(PHARDWAREHOOKSTRUCT, 8) -} - -static void test_pack_PHARDWAREINPUT(void) -{ - /* PHARDWAREINPUT */ - TEST_TYPE_SIZE (PHARDWAREINPUT, 8) - TEST_TYPE_ALIGN (PHARDWAREINPUT, 8) - TEST_TARGET_SIZE (PHARDWAREINPUT, 8) - TEST_TARGET_ALIGN(PHARDWAREINPUT, 4) -} - -static void test_pack_PHDEVNOTIFY(void) -{ - /* PHDEVNOTIFY */ - TEST_TYPE_SIZE (PHDEVNOTIFY, 8) - TEST_TYPE_ALIGN (PHDEVNOTIFY, 8) - TEST_TARGET_SIZE (PHDEVNOTIFY, 8) - TEST_TARGET_ALIGN(PHDEVNOTIFY, 8) -} - -static void test_pack_PHELPWININFOA(void) -{ - /* PHELPWININFOA */ - TEST_TYPE_SIZE (PHELPWININFOA, 8) - TEST_TYPE_ALIGN (PHELPWININFOA, 8) - TEST_TARGET_SIZE (PHELPWININFOA, 28) - TEST_TARGET_ALIGN(PHELPWININFOA, 4) -} - -static void test_pack_PHELPWININFOW(void) -{ - /* PHELPWININFOW */ - TEST_TYPE_SIZE (PHELPWININFOW, 8) - TEST_TYPE_ALIGN (PHELPWININFOW, 8) - TEST_TARGET_SIZE (PHELPWININFOW, 28) - TEST_TARGET_ALIGN(PHELPWININFOW, 4) -} - -static void test_pack_PICONINFO(void) -{ - /* PICONINFO */ - TEST_TYPE_SIZE (PICONINFO, 8) - TEST_TYPE_ALIGN (PICONINFO, 8) - TEST_TARGET_SIZE (PICONINFO, 32) - TEST_TARGET_ALIGN(PICONINFO, 8) -} - -static void test_pack_PICONMETRICSA(void) -{ - /* PICONMETRICSA */ - TEST_TYPE_SIZE (PICONMETRICSA, 8) - TEST_TYPE_ALIGN (PICONMETRICSA, 8) - TEST_TARGET_SIZE (PICONMETRICSA, 76) - TEST_TARGET_ALIGN(PICONMETRICSA, 4) -} - -static void test_pack_PICONMETRICSW(void) -{ - /* PICONMETRICSW */ - TEST_TYPE_SIZE (PICONMETRICSW, 8) - TEST_TYPE_ALIGN (PICONMETRICSW, 8) - TEST_TARGET_SIZE (PICONMETRICSW, 108) - TEST_TARGET_ALIGN(PICONMETRICSW, 4) -} - -static void test_pack_PINPUT(void) -{ - /* PINPUT */ - TEST_TYPE_SIZE (PINPUT, 8) - TEST_TYPE_ALIGN (PINPUT, 8) -} - -static void test_pack_PKBDLLHOOKSTRUCT(void) -{ - /* PKBDLLHOOKSTRUCT */ - TEST_TYPE_SIZE (PKBDLLHOOKSTRUCT, 8) - TEST_TYPE_ALIGN (PKBDLLHOOKSTRUCT, 8) - TEST_TARGET_SIZE (PKBDLLHOOKSTRUCT, 24) - TEST_TARGET_ALIGN(PKBDLLHOOKSTRUCT, 8) -} - -static void test_pack_PKEYBDINPUT(void) -{ - /* PKEYBDINPUT */ - TEST_TYPE_SIZE (PKEYBDINPUT, 8) - TEST_TYPE_ALIGN (PKEYBDINPUT, 8) - TEST_TARGET_SIZE (PKEYBDINPUT, 24) - TEST_TARGET_ALIGN(PKEYBDINPUT, 8) -} - -static void test_pack_PMDINEXTMENU(void) -{ - /* PMDINEXTMENU */ - TEST_TYPE_SIZE (PMDINEXTMENU, 8) - TEST_TYPE_ALIGN (PMDINEXTMENU, 8) - TEST_TARGET_SIZE (PMDINEXTMENU, 24) - TEST_TARGET_ALIGN(PMDINEXTMENU, 8) -} - -static void test_pack_PMEASUREITEMSTRUCT(void) -{ - /* PMEASUREITEMSTRUCT */ - TEST_TYPE_SIZE (PMEASUREITEMSTRUCT, 8) - TEST_TYPE_ALIGN (PMEASUREITEMSTRUCT, 8) - TEST_TARGET_SIZE (PMEASUREITEMSTRUCT, 32) - TEST_TARGET_ALIGN(PMEASUREITEMSTRUCT, 8) -} - -static void test_pack_PMENUITEMTEMPLATE(void) -{ - /* PMENUITEMTEMPLATE */ - TEST_TYPE_SIZE (PMENUITEMTEMPLATE, 8) - TEST_TYPE_ALIGN (PMENUITEMTEMPLATE, 8) - TEST_TARGET_SIZE (PMENUITEMTEMPLATE, 6) - TEST_TARGET_ALIGN(PMENUITEMTEMPLATE, 2) -} - -static void test_pack_PMENUITEMTEMPLATEHEADER(void) -{ - /* PMENUITEMTEMPLATEHEADER */ - TEST_TYPE_SIZE (PMENUITEMTEMPLATEHEADER, 8) - TEST_TYPE_ALIGN (PMENUITEMTEMPLATEHEADER, 8) - TEST_TARGET_SIZE (PMENUITEMTEMPLATEHEADER, 4) - TEST_TARGET_ALIGN(PMENUITEMTEMPLATEHEADER, 2) -} - -static void test_pack_PMINIMIZEDMETRICS(void) -{ - /* PMINIMIZEDMETRICS */ - TEST_TYPE_SIZE (PMINIMIZEDMETRICS, 8) - TEST_TYPE_ALIGN (PMINIMIZEDMETRICS, 8) - TEST_TARGET_SIZE (PMINIMIZEDMETRICS, 20) - TEST_TARGET_ALIGN(PMINIMIZEDMETRICS, 4) -} - -static void test_pack_PMINMAXINFO(void) -{ - /* PMINMAXINFO */ - TEST_TYPE_SIZE (PMINMAXINFO, 8) - TEST_TYPE_ALIGN (PMINMAXINFO, 8) - TEST_TARGET_SIZE (PMINMAXINFO, 40) - TEST_TARGET_ALIGN(PMINMAXINFO, 4) -} - -static void test_pack_PMOUSEHOOKSTRUCT(void) -{ - /* PMOUSEHOOKSTRUCT */ - TEST_TYPE_SIZE (PMOUSEHOOKSTRUCT, 8) - TEST_TYPE_ALIGN (PMOUSEHOOKSTRUCT, 8) - TEST_TARGET_SIZE (PMOUSEHOOKSTRUCT, 32) - TEST_TARGET_ALIGN(PMOUSEHOOKSTRUCT, 8) -} - -static void test_pack_PMOUSEINPUT(void) -{ - /* PMOUSEINPUT */ - TEST_TYPE_SIZE (PMOUSEINPUT, 8) - TEST_TYPE_ALIGN (PMOUSEINPUT, 8) - TEST_TARGET_SIZE (PMOUSEINPUT, 32) - TEST_TARGET_ALIGN(PMOUSEINPUT, 8) -} - -static void test_pack_PMSG(void) -{ - /* PMSG */ - TEST_TYPE_SIZE (PMSG, 8) - TEST_TYPE_ALIGN (PMSG, 8) - TEST_TARGET_SIZE (PMSG, 48) - TEST_TARGET_ALIGN(PMSG, 8) -} - -static void test_pack_PMSGBOXPARAMSA(void) -{ - /* PMSGBOXPARAMSA */ - TEST_TYPE_SIZE (PMSGBOXPARAMSA, 8) - TEST_TYPE_ALIGN (PMSGBOXPARAMSA, 8) - TEST_TARGET_SIZE (PMSGBOXPARAMSA, 80) - TEST_TARGET_ALIGN(PMSGBOXPARAMSA, 8) -} - -static void test_pack_PMSGBOXPARAMSW(void) -{ - /* PMSGBOXPARAMSW */ - TEST_TYPE_SIZE (PMSGBOXPARAMSW, 8) - TEST_TYPE_ALIGN (PMSGBOXPARAMSW, 8) - TEST_TARGET_SIZE (PMSGBOXPARAMSW, 80) - TEST_TARGET_ALIGN(PMSGBOXPARAMSW, 8) -} - -static void test_pack_PMSLLHOOKSTRUCT(void) -{ - /* PMSLLHOOKSTRUCT */ - TEST_TYPE_SIZE (PMSLLHOOKSTRUCT, 8) - TEST_TYPE_ALIGN (PMSLLHOOKSTRUCT, 8) - TEST_TARGET_SIZE (PMSLLHOOKSTRUCT, 32) - TEST_TARGET_ALIGN(PMSLLHOOKSTRUCT, 8) -} - -static void test_pack_PMULTIKEYHELPA(void) -{ - /* PMULTIKEYHELPA */ - TEST_TYPE_SIZE (PMULTIKEYHELPA, 8) - TEST_TYPE_ALIGN (PMULTIKEYHELPA, 8) - TEST_TARGET_SIZE (PMULTIKEYHELPA, 8) - TEST_TARGET_ALIGN(PMULTIKEYHELPA, 4) -} - -static void test_pack_PMULTIKEYHELPW(void) -{ - /* PMULTIKEYHELPW */ - TEST_TYPE_SIZE (PMULTIKEYHELPW, 8) - TEST_TYPE_ALIGN (PMULTIKEYHELPW, 8) - TEST_TARGET_SIZE (PMULTIKEYHELPW, 8) - TEST_TARGET_ALIGN(PMULTIKEYHELPW, 4) -} - -static void test_pack_PNONCLIENTMETRICSA(void) -{ - /* PNONCLIENTMETRICSA */ - TEST_TYPE_SIZE (PNONCLIENTMETRICSA, 8) - TEST_TYPE_ALIGN (PNONCLIENTMETRICSA, 8) - TEST_TARGET_SIZE (PNONCLIENTMETRICSA, 340) - TEST_TARGET_ALIGN(PNONCLIENTMETRICSA, 4) -} - -static void test_pack_PNONCLIENTMETRICSW(void) -{ - /* PNONCLIENTMETRICSW */ - TEST_TYPE_SIZE (PNONCLIENTMETRICSW, 8) - TEST_TYPE_ALIGN (PNONCLIENTMETRICSW, 8) - TEST_TARGET_SIZE (PNONCLIENTMETRICSW, 500) - TEST_TARGET_ALIGN(PNONCLIENTMETRICSW, 4) -} - -static void test_pack_PPAINTSTRUCT(void) -{ - /* PPAINTSTRUCT */ - TEST_TYPE_SIZE (PPAINTSTRUCT, 8) - TEST_TYPE_ALIGN (PPAINTSTRUCT, 8) - TEST_TARGET_SIZE (PPAINTSTRUCT, 72) - TEST_TARGET_ALIGN(PPAINTSTRUCT, 8) -} - -static void test_pack_PROPENUMPROCA(void) -{ - /* PROPENUMPROCA */ - TEST_TYPE_SIZE (PROPENUMPROCA, 8) - TEST_TYPE_ALIGN (PROPENUMPROCA, 8) -} - -static void test_pack_PROPENUMPROCEXA(void) -{ - /* PROPENUMPROCEXA */ - TEST_TYPE_SIZE (PROPENUMPROCEXA, 8) - TEST_TYPE_ALIGN (PROPENUMPROCEXA, 8) -} - -static void test_pack_PROPENUMPROCEXW(void) -{ - /* PROPENUMPROCEXW */ - TEST_TYPE_SIZE (PROPENUMPROCEXW, 8) - TEST_TYPE_ALIGN (PROPENUMPROCEXW, 8) -} - -static void test_pack_PROPENUMPROCW(void) -{ - /* PROPENUMPROCW */ - TEST_TYPE_SIZE (PROPENUMPROCW, 8) - TEST_TYPE_ALIGN (PROPENUMPROCW, 8) -} - -static void test_pack_PTITLEBARINFO(void) -{ - /* PTITLEBARINFO */ - TEST_TYPE_SIZE (PTITLEBARINFO, 8) - TEST_TYPE_ALIGN (PTITLEBARINFO, 8) - TEST_TARGET_SIZE (PTITLEBARINFO, 44) - TEST_TARGET_ALIGN(PTITLEBARINFO, 4) -} - -static void test_pack_PUSEROBJECTFLAGS(void) -{ - /* PUSEROBJECTFLAGS */ - TEST_TYPE_SIZE (PUSEROBJECTFLAGS, 8) - TEST_TYPE_ALIGN (PUSEROBJECTFLAGS, 8) - TEST_TARGET_SIZE (PUSEROBJECTFLAGS, 12) - TEST_TARGET_ALIGN(PUSEROBJECTFLAGS, 4) -} - -static void test_pack_PWINDOWINFO(void) -{ - /* PWINDOWINFO */ - TEST_TYPE_SIZE (PWINDOWINFO, 8) - TEST_TYPE_ALIGN (PWINDOWINFO, 8) - TEST_TARGET_SIZE (PWINDOWINFO, 60) - TEST_TARGET_ALIGN(PWINDOWINFO, 4) -} - -static void test_pack_PWINDOWPLACEMENT(void) -{ - /* PWINDOWPLACEMENT */ - TEST_TYPE_SIZE (PWINDOWPLACEMENT, 8) - TEST_TYPE_ALIGN (PWINDOWPLACEMENT, 8) - TEST_TARGET_SIZE (PWINDOWPLACEMENT, 44) - TEST_TARGET_ALIGN(PWINDOWPLACEMENT, 4) -} - -static void test_pack_PWINDOWPOS(void) -{ - /* PWINDOWPOS */ - TEST_TYPE_SIZE (PWINDOWPOS, 8) - TEST_TYPE_ALIGN (PWINDOWPOS, 8) - TEST_TARGET_SIZE (PWINDOWPOS, 40) - TEST_TARGET_ALIGN(PWINDOWPOS, 8) -} - -static void test_pack_PWNDCLASSA(void) -{ - /* PWNDCLASSA */ - TEST_TYPE_SIZE (PWNDCLASSA, 8) - TEST_TYPE_ALIGN (PWNDCLASSA, 8) - TEST_TARGET_SIZE (PWNDCLASSA, 72) - TEST_TARGET_ALIGN(PWNDCLASSA, 8) -} - -static void test_pack_PWNDCLASSEXA(void) -{ - /* PWNDCLASSEXA */ - TEST_TYPE_SIZE (PWNDCLASSEXA, 8) - TEST_TYPE_ALIGN (PWNDCLASSEXA, 8) - TEST_TARGET_SIZE (PWNDCLASSEXA, 80) - TEST_TARGET_ALIGN(PWNDCLASSEXA, 8) -} - -static void test_pack_PWNDCLASSEXW(void) -{ - /* PWNDCLASSEXW */ - TEST_TYPE_SIZE (PWNDCLASSEXW, 8) - TEST_TYPE_ALIGN (PWNDCLASSEXW, 8) - TEST_TARGET_SIZE (PWNDCLASSEXW, 80) - TEST_TARGET_ALIGN(PWNDCLASSEXW, 8) -} - -static void test_pack_PWNDCLASSW(void) -{ - /* PWNDCLASSW */ - TEST_TYPE_SIZE (PWNDCLASSW, 8) - TEST_TYPE_ALIGN (PWNDCLASSW, 8) - TEST_TARGET_SIZE (PWNDCLASSW, 72) - TEST_TARGET_ALIGN(PWNDCLASSW, 8) -} - -static void test_pack_SCROLLINFO(void) -{ - /* SCROLLINFO */ - TEST_TYPE_SIZE (SCROLLINFO, 28) - TEST_TYPE_ALIGN (SCROLLINFO, 4) - TEST_FIELD_SIZE (SCROLLINFO, cbSize, 4) - TEST_FIELD_ALIGN (SCROLLINFO, cbSize, 4) - TEST_FIELD_OFFSET(SCROLLINFO, cbSize, 0) - TEST_FIELD_SIZE (SCROLLINFO, fMask, 4) - TEST_FIELD_ALIGN (SCROLLINFO, fMask, 4) - TEST_FIELD_OFFSET(SCROLLINFO, fMask, 4) - TEST_FIELD_SIZE (SCROLLINFO, nMin, 4) - TEST_FIELD_ALIGN (SCROLLINFO, nMin, 4) - TEST_FIELD_OFFSET(SCROLLINFO, nMin, 8) - TEST_FIELD_SIZE (SCROLLINFO, nMax, 4) - TEST_FIELD_ALIGN (SCROLLINFO, nMax, 4) - TEST_FIELD_OFFSET(SCROLLINFO, nMax, 12) - TEST_FIELD_SIZE (SCROLLINFO, nPage, 4) - TEST_FIELD_ALIGN (SCROLLINFO, nPage, 4) - TEST_FIELD_OFFSET(SCROLLINFO, nPage, 16) - TEST_FIELD_SIZE (SCROLLINFO, nPos, 4) - TEST_FIELD_ALIGN (SCROLLINFO, nPos, 4) - TEST_FIELD_OFFSET(SCROLLINFO, nPos, 20) - TEST_FIELD_SIZE (SCROLLINFO, nTrackPos, 4) - TEST_FIELD_ALIGN (SCROLLINFO, nTrackPos, 4) - TEST_FIELD_OFFSET(SCROLLINFO, nTrackPos, 24) -} - -static void test_pack_SENDASYNCPROC(void) -{ - /* SENDASYNCPROC */ - TEST_TYPE_SIZE (SENDASYNCPROC, 8) - TEST_TYPE_ALIGN (SENDASYNCPROC, 8) -} - -static void test_pack_SERIALKEYSA(void) -{ - /* SERIALKEYSA */ - TEST_TYPE_SIZE (SERIALKEYSA, 40) - TEST_TYPE_ALIGN (SERIALKEYSA, 8) - TEST_FIELD_SIZE (SERIALKEYSA, cbSize, 4) - TEST_FIELD_ALIGN (SERIALKEYSA, cbSize, 4) - TEST_FIELD_OFFSET(SERIALKEYSA, cbSize, 0) - TEST_FIELD_SIZE (SERIALKEYSA, dwFlags, 4) - TEST_FIELD_ALIGN (SERIALKEYSA, dwFlags, 4) - TEST_FIELD_OFFSET(SERIALKEYSA, dwFlags, 4) - TEST_FIELD_SIZE (SERIALKEYSA, lpszActivePort, 8) - TEST_FIELD_ALIGN (SERIALKEYSA, lpszActivePort, 8) - TEST_FIELD_OFFSET(SERIALKEYSA, lpszActivePort, 8) - TEST_FIELD_SIZE (SERIALKEYSA, lpszPort, 8) - TEST_FIELD_ALIGN (SERIALKEYSA, lpszPort, 8) - TEST_FIELD_OFFSET(SERIALKEYSA, lpszPort, 16) - TEST_FIELD_SIZE (SERIALKEYSA, iBaudRate, 4) - TEST_FIELD_ALIGN (SERIALKEYSA, iBaudRate, 4) - TEST_FIELD_OFFSET(SERIALKEYSA, iBaudRate, 24) - TEST_FIELD_SIZE (SERIALKEYSA, iPortState, 4) - TEST_FIELD_ALIGN (SERIALKEYSA, iPortState, 4) - TEST_FIELD_OFFSET(SERIALKEYSA, iPortState, 28) - TEST_FIELD_SIZE (SERIALKEYSA, iActive, 4) - TEST_FIELD_ALIGN (SERIALKEYSA, iActive, 4) - TEST_FIELD_OFFSET(SERIALKEYSA, iActive, 32) -} - -static void test_pack_SERIALKEYSW(void) -{ - /* SERIALKEYSW */ - TEST_TYPE_SIZE (SERIALKEYSW, 40) - TEST_TYPE_ALIGN (SERIALKEYSW, 8) - TEST_FIELD_SIZE (SERIALKEYSW, cbSize, 4) - TEST_FIELD_ALIGN (SERIALKEYSW, cbSize, 4) - TEST_FIELD_OFFSET(SERIALKEYSW, cbSize, 0) - TEST_FIELD_SIZE (SERIALKEYSW, dwFlags, 4) - TEST_FIELD_ALIGN (SERIALKEYSW, dwFlags, 4) - TEST_FIELD_OFFSET(SERIALKEYSW, dwFlags, 4) - TEST_FIELD_SIZE (SERIALKEYSW, lpszActivePort, 8) - TEST_FIELD_ALIGN (SERIALKEYSW, lpszActivePort, 8) - TEST_FIELD_OFFSET(SERIALKEYSW, lpszActivePort, 8) - TEST_FIELD_SIZE (SERIALKEYSW, lpszPort, 8) - TEST_FIELD_ALIGN (SERIALKEYSW, lpszPort, 8) - TEST_FIELD_OFFSET(SERIALKEYSW, lpszPort, 16) - TEST_FIELD_SIZE (SERIALKEYSW, iBaudRate, 4) - TEST_FIELD_ALIGN (SERIALKEYSW, iBaudRate, 4) - TEST_FIELD_OFFSET(SERIALKEYSW, iBaudRate, 24) - TEST_FIELD_SIZE (SERIALKEYSW, iPortState, 4) - TEST_FIELD_ALIGN (SERIALKEYSW, iPortState, 4) - TEST_FIELD_OFFSET(SERIALKEYSW, iPortState, 28) - TEST_FIELD_SIZE (SERIALKEYSW, iActive, 4) - TEST_FIELD_ALIGN (SERIALKEYSW, iActive, 4) - TEST_FIELD_OFFSET(SERIALKEYSW, iActive, 32) -} - -static void test_pack_SOUNDSENTRYA(void) -{ - /* SOUNDSENTRYA */ - TEST_TYPE_SIZE (SOUNDSENTRYA, 56) - TEST_TYPE_ALIGN (SOUNDSENTRYA, 8) - TEST_FIELD_SIZE (SOUNDSENTRYA, cbSize, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYA, cbSize, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYA, cbSize, 0) - TEST_FIELD_SIZE (SOUNDSENTRYA, dwFlags, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYA, dwFlags, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYA, dwFlags, 4) - TEST_FIELD_SIZE (SOUNDSENTRYA, iFSTextEffect, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYA, iFSTextEffect, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYA, iFSTextEffect, 8) - TEST_FIELD_SIZE (SOUNDSENTRYA, iFSTextEffectMSec, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYA, iFSTextEffectMSec, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYA, iFSTextEffectMSec, 12) - TEST_FIELD_SIZE (SOUNDSENTRYA, iFSTextEffectColorBits, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYA, iFSTextEffectColorBits, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYA, iFSTextEffectColorBits, 16) - TEST_FIELD_SIZE (SOUNDSENTRYA, iFSGrafEffect, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYA, iFSGrafEffect, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYA, iFSGrafEffect, 20) - TEST_FIELD_SIZE (SOUNDSENTRYA, iFSGrafEffectMSec, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYA, iFSGrafEffectMSec, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYA, iFSGrafEffectMSec, 24) - TEST_FIELD_SIZE (SOUNDSENTRYA, iFSGrafEffectColor, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYA, iFSGrafEffectColor, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYA, iFSGrafEffectColor, 28) - TEST_FIELD_SIZE (SOUNDSENTRYA, iWindowsEffect, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYA, iWindowsEffect, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYA, iWindowsEffect, 32) - TEST_FIELD_SIZE (SOUNDSENTRYA, iWindowsEffectMSec, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYA, iWindowsEffectMSec, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYA, iWindowsEffectMSec, 36) - TEST_FIELD_SIZE (SOUNDSENTRYA, lpszWindowsEffectDLL, 8) - TEST_FIELD_ALIGN (SOUNDSENTRYA, lpszWindowsEffectDLL, 8) - TEST_FIELD_OFFSET(SOUNDSENTRYA, lpszWindowsEffectDLL, 40) - TEST_FIELD_SIZE (SOUNDSENTRYA, iWindowsEffectOrdinal, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYA, iWindowsEffectOrdinal, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYA, iWindowsEffectOrdinal, 48) -} - -static void test_pack_SOUNDSENTRYW(void) -{ - /* SOUNDSENTRYW */ - TEST_TYPE_SIZE (SOUNDSENTRYW, 56) - TEST_TYPE_ALIGN (SOUNDSENTRYW, 8) - TEST_FIELD_SIZE (SOUNDSENTRYW, cbSize, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYW, cbSize, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYW, cbSize, 0) - TEST_FIELD_SIZE (SOUNDSENTRYW, dwFlags, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYW, dwFlags, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYW, dwFlags, 4) - TEST_FIELD_SIZE (SOUNDSENTRYW, iFSTextEffect, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYW, iFSTextEffect, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYW, iFSTextEffect, 8) - TEST_FIELD_SIZE (SOUNDSENTRYW, iFSTextEffectMSec, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYW, iFSTextEffectMSec, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYW, iFSTextEffectMSec, 12) - TEST_FIELD_SIZE (SOUNDSENTRYW, iFSTextEffectColorBits, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYW, iFSTextEffectColorBits, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYW, iFSTextEffectColorBits, 16) - TEST_FIELD_SIZE (SOUNDSENTRYW, iFSGrafEffect, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYW, iFSGrafEffect, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYW, iFSGrafEffect, 20) - TEST_FIELD_SIZE (SOUNDSENTRYW, iFSGrafEffectMSec, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYW, iFSGrafEffectMSec, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYW, iFSGrafEffectMSec, 24) - TEST_FIELD_SIZE (SOUNDSENTRYW, iFSGrafEffectColor, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYW, iFSGrafEffectColor, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYW, iFSGrafEffectColor, 28) - TEST_FIELD_SIZE (SOUNDSENTRYW, iWindowsEffect, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYW, iWindowsEffect, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYW, iWindowsEffect, 32) - TEST_FIELD_SIZE (SOUNDSENTRYW, iWindowsEffectMSec, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYW, iWindowsEffectMSec, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYW, iWindowsEffectMSec, 36) - TEST_FIELD_SIZE (SOUNDSENTRYW, lpszWindowsEffectDLL, 8) - TEST_FIELD_ALIGN (SOUNDSENTRYW, lpszWindowsEffectDLL, 8) - TEST_FIELD_OFFSET(SOUNDSENTRYW, lpszWindowsEffectDLL, 40) - TEST_FIELD_SIZE (SOUNDSENTRYW, iWindowsEffectOrdinal, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYW, iWindowsEffectOrdinal, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYW, iWindowsEffectOrdinal, 48) -} - -static void test_pack_STICKYKEYS(void) -{ - /* STICKYKEYS */ - TEST_TYPE_SIZE (STICKYKEYS, 8) - TEST_TYPE_ALIGN (STICKYKEYS, 4) - TEST_FIELD_SIZE (STICKYKEYS, cbSize, 4) - TEST_FIELD_ALIGN (STICKYKEYS, cbSize, 4) - TEST_FIELD_OFFSET(STICKYKEYS, cbSize, 0) - TEST_FIELD_SIZE (STICKYKEYS, dwFlags, 4) - TEST_FIELD_ALIGN (STICKYKEYS, dwFlags, 4) - TEST_FIELD_OFFSET(STICKYKEYS, dwFlags, 4) -} - -static void test_pack_STYLESTRUCT(void) -{ - /* STYLESTRUCT */ - TEST_TYPE_SIZE (STYLESTRUCT, 8) - TEST_TYPE_ALIGN (STYLESTRUCT, 4) - TEST_FIELD_SIZE (STYLESTRUCT, styleOld, 4) - TEST_FIELD_ALIGN (STYLESTRUCT, styleOld, 4) - TEST_FIELD_OFFSET(STYLESTRUCT, styleOld, 0) - TEST_FIELD_SIZE (STYLESTRUCT, styleNew, 4) - TEST_FIELD_ALIGN (STYLESTRUCT, styleNew, 4) - TEST_FIELD_OFFSET(STYLESTRUCT, styleNew, 4) -} - -static void test_pack_TIMERPROC(void) -{ - /* TIMERPROC */ - TEST_TYPE_SIZE (TIMERPROC, 8) - TEST_TYPE_ALIGN (TIMERPROC, 8) -} - -static void test_pack_TITLEBARINFO(void) -{ - /* TITLEBARINFO */ - TEST_TYPE_SIZE (TITLEBARINFO, 44) - TEST_TYPE_ALIGN (TITLEBARINFO, 4) - TEST_FIELD_SIZE (TITLEBARINFO, cbSize, 4) - TEST_FIELD_ALIGN (TITLEBARINFO, cbSize, 4) - TEST_FIELD_OFFSET(TITLEBARINFO, cbSize, 0) - TEST_FIELD_SIZE (TITLEBARINFO, rcTitleBar, 16) - TEST_FIELD_ALIGN (TITLEBARINFO, rcTitleBar, 4) - TEST_FIELD_OFFSET(TITLEBARINFO, rcTitleBar, 4) - TEST_FIELD_SIZE (TITLEBARINFO, rgstate, 24) - TEST_FIELD_ALIGN (TITLEBARINFO, rgstate, 4) - TEST_FIELD_OFFSET(TITLEBARINFO, rgstate, 20) -} - -static void test_pack_TOGGLEKEYS(void) -{ - /* TOGGLEKEYS */ - TEST_TYPE_SIZE (TOGGLEKEYS, 8) - TEST_TYPE_ALIGN (TOGGLEKEYS, 4) - TEST_FIELD_SIZE (TOGGLEKEYS, cbSize, 4) - TEST_FIELD_ALIGN (TOGGLEKEYS, cbSize, 4) - TEST_FIELD_OFFSET(TOGGLEKEYS, cbSize, 0) - TEST_FIELD_SIZE (TOGGLEKEYS, dwFlags, 4) - TEST_FIELD_ALIGN (TOGGLEKEYS, dwFlags, 4) - TEST_FIELD_OFFSET(TOGGLEKEYS, dwFlags, 4) -} - -static void test_pack_TPMPARAMS(void) -{ - /* TPMPARAMS */ - TEST_TYPE_SIZE (TPMPARAMS, 20) - TEST_TYPE_ALIGN (TPMPARAMS, 4) - TEST_FIELD_SIZE (TPMPARAMS, cbSize, 4) - TEST_FIELD_ALIGN (TPMPARAMS, cbSize, 4) - TEST_FIELD_OFFSET(TPMPARAMS, cbSize, 0) - TEST_FIELD_SIZE (TPMPARAMS, rcExclude, 16) - TEST_FIELD_ALIGN (TPMPARAMS, rcExclude, 4) - TEST_FIELD_OFFSET(TPMPARAMS, rcExclude, 4) -} - -static void test_pack_TRACKMOUSEEVENT(void) -{ - /* TRACKMOUSEEVENT */ - TEST_TYPE_SIZE (TRACKMOUSEEVENT, 24) - TEST_TYPE_ALIGN (TRACKMOUSEEVENT, 8) - TEST_FIELD_SIZE (TRACKMOUSEEVENT, cbSize, 4) - TEST_FIELD_ALIGN (TRACKMOUSEEVENT, cbSize, 4) - TEST_FIELD_OFFSET(TRACKMOUSEEVENT, cbSize, 0) - TEST_FIELD_SIZE (TRACKMOUSEEVENT, dwFlags, 4) - TEST_FIELD_ALIGN (TRACKMOUSEEVENT, dwFlags, 4) - TEST_FIELD_OFFSET(TRACKMOUSEEVENT, dwFlags, 4) - TEST_FIELD_SIZE (TRACKMOUSEEVENT, hwndTrack, 8) - TEST_FIELD_ALIGN (TRACKMOUSEEVENT, hwndTrack, 8) - TEST_FIELD_OFFSET(TRACKMOUSEEVENT, hwndTrack, 8) - TEST_FIELD_SIZE (TRACKMOUSEEVENT, dwHoverTime, 4) - TEST_FIELD_ALIGN (TRACKMOUSEEVENT, dwHoverTime, 4) - TEST_FIELD_OFFSET(TRACKMOUSEEVENT, dwHoverTime, 16) -} - -static void test_pack_USEROBJECTFLAGS(void) -{ - /* USEROBJECTFLAGS */ - TEST_TYPE_SIZE (USEROBJECTFLAGS, 12) - TEST_TYPE_ALIGN (USEROBJECTFLAGS, 4) - TEST_FIELD_SIZE (USEROBJECTFLAGS, fInherit, 4) - TEST_FIELD_ALIGN (USEROBJECTFLAGS, fInherit, 4) - TEST_FIELD_OFFSET(USEROBJECTFLAGS, fInherit, 0) - TEST_FIELD_SIZE (USEROBJECTFLAGS, fReserved, 4) - TEST_FIELD_ALIGN (USEROBJECTFLAGS, fReserved, 4) - TEST_FIELD_OFFSET(USEROBJECTFLAGS, fReserved, 4) - TEST_FIELD_SIZE (USEROBJECTFLAGS, dwFlags, 4) - TEST_FIELD_ALIGN (USEROBJECTFLAGS, dwFlags, 4) - TEST_FIELD_OFFSET(USEROBJECTFLAGS, dwFlags, 8) -} - -static void test_pack_WINDOWINFO(void) -{ - /* WINDOWINFO */ - TEST_TYPE_SIZE (WINDOWINFO, 60) - TEST_TYPE_ALIGN (WINDOWINFO, 4) - TEST_FIELD_SIZE (WINDOWINFO, cbSize, 4) - TEST_FIELD_ALIGN (WINDOWINFO, cbSize, 4) - TEST_FIELD_OFFSET(WINDOWINFO, cbSize, 0) - TEST_FIELD_SIZE (WINDOWINFO, rcWindow, 16) - TEST_FIELD_ALIGN (WINDOWINFO, rcWindow, 4) - TEST_FIELD_OFFSET(WINDOWINFO, rcWindow, 4) - TEST_FIELD_SIZE (WINDOWINFO, rcClient, 16) - TEST_FIELD_ALIGN (WINDOWINFO, rcClient, 4) - TEST_FIELD_OFFSET(WINDOWINFO, rcClient, 20) - TEST_FIELD_SIZE (WINDOWINFO, dwStyle, 4) - TEST_FIELD_ALIGN (WINDOWINFO, dwStyle, 4) - TEST_FIELD_OFFSET(WINDOWINFO, dwStyle, 36) - TEST_FIELD_SIZE (WINDOWINFO, dwExStyle, 4) - TEST_FIELD_ALIGN (WINDOWINFO, dwExStyle, 4) - TEST_FIELD_OFFSET(WINDOWINFO, dwExStyle, 40) - TEST_FIELD_SIZE (WINDOWINFO, dwWindowStatus, 4) - TEST_FIELD_ALIGN (WINDOWINFO, dwWindowStatus, 4) - TEST_FIELD_OFFSET(WINDOWINFO, dwWindowStatus, 44) - TEST_FIELD_SIZE (WINDOWINFO, cxWindowBorders, 4) - TEST_FIELD_ALIGN (WINDOWINFO, cxWindowBorders, 4) - TEST_FIELD_OFFSET(WINDOWINFO, cxWindowBorders, 48) - TEST_FIELD_SIZE (WINDOWINFO, cyWindowBorders, 4) - TEST_FIELD_ALIGN (WINDOWINFO, cyWindowBorders, 4) - TEST_FIELD_OFFSET(WINDOWINFO, cyWindowBorders, 52) - TEST_FIELD_SIZE (WINDOWINFO, atomWindowType, 2) - TEST_FIELD_ALIGN (WINDOWINFO, atomWindowType, 2) - TEST_FIELD_OFFSET(WINDOWINFO, atomWindowType, 56) - TEST_FIELD_SIZE (WINDOWINFO, wCreatorVersion, 2) - TEST_FIELD_ALIGN (WINDOWINFO, wCreatorVersion, 2) - TEST_FIELD_OFFSET(WINDOWINFO, wCreatorVersion, 58) -} - -static void test_pack_WINDOWPLACEMENT(void) -{ - /* WINDOWPLACEMENT */ - TEST_TYPE_SIZE (WINDOWPLACEMENT, 44) - TEST_TYPE_ALIGN (WINDOWPLACEMENT, 4) - TEST_FIELD_SIZE (WINDOWPLACEMENT, length, 4) - TEST_FIELD_ALIGN (WINDOWPLACEMENT, length, 4) - TEST_FIELD_OFFSET(WINDOWPLACEMENT, length, 0) - TEST_FIELD_SIZE (WINDOWPLACEMENT, flags, 4) - TEST_FIELD_ALIGN (WINDOWPLACEMENT, flags, 4) - TEST_FIELD_OFFSET(WINDOWPLACEMENT, flags, 4) - TEST_FIELD_SIZE (WINDOWPLACEMENT, showCmd, 4) - TEST_FIELD_ALIGN (WINDOWPLACEMENT, showCmd, 4) - TEST_FIELD_OFFSET(WINDOWPLACEMENT, showCmd, 8) - TEST_FIELD_SIZE (WINDOWPLACEMENT, ptMinPosition, 8) - TEST_FIELD_ALIGN (WINDOWPLACEMENT, ptMinPosition, 4) - TEST_FIELD_OFFSET(WINDOWPLACEMENT, ptMinPosition, 12) - TEST_FIELD_SIZE (WINDOWPLACEMENT, ptMaxPosition, 8) - TEST_FIELD_ALIGN (WINDOWPLACEMENT, ptMaxPosition, 4) - TEST_FIELD_OFFSET(WINDOWPLACEMENT, ptMaxPosition, 20) - TEST_FIELD_SIZE (WINDOWPLACEMENT, rcNormalPosition, 16) - TEST_FIELD_ALIGN (WINDOWPLACEMENT, rcNormalPosition, 4) - TEST_FIELD_OFFSET(WINDOWPLACEMENT, rcNormalPosition, 28) -} - -static void test_pack_WINDOWPOS(void) -{ - /* WINDOWPOS */ - TEST_TYPE_SIZE (WINDOWPOS, 40) - TEST_TYPE_ALIGN (WINDOWPOS, 8) - TEST_FIELD_SIZE (WINDOWPOS, hwnd, 8) - TEST_FIELD_ALIGN (WINDOWPOS, hwnd, 8) - TEST_FIELD_OFFSET(WINDOWPOS, hwnd, 0) - TEST_FIELD_SIZE (WINDOWPOS, hwndInsertAfter, 8) - TEST_FIELD_ALIGN (WINDOWPOS, hwndInsertAfter, 8) - TEST_FIELD_OFFSET(WINDOWPOS, hwndInsertAfter, 8) - TEST_FIELD_SIZE (WINDOWPOS, x, 4) - TEST_FIELD_ALIGN (WINDOWPOS, x, 4) - TEST_FIELD_OFFSET(WINDOWPOS, x, 16) - TEST_FIELD_SIZE (WINDOWPOS, y, 4) - TEST_FIELD_ALIGN (WINDOWPOS, y, 4) - TEST_FIELD_OFFSET(WINDOWPOS, y, 20) - TEST_FIELD_SIZE (WINDOWPOS, cx, 4) - TEST_FIELD_ALIGN (WINDOWPOS, cx, 4) - TEST_FIELD_OFFSET(WINDOWPOS, cx, 24) - TEST_FIELD_SIZE (WINDOWPOS, cy, 4) - TEST_FIELD_ALIGN (WINDOWPOS, cy, 4) - TEST_FIELD_OFFSET(WINDOWPOS, cy, 28) - TEST_FIELD_SIZE (WINDOWPOS, flags, 4) - TEST_FIELD_ALIGN (WINDOWPOS, flags, 4) - TEST_FIELD_OFFSET(WINDOWPOS, flags, 32) -} - -static void test_pack_WINEVENTPROC(void) -{ - /* WINEVENTPROC */ - TEST_TYPE_SIZE (WINEVENTPROC, 8) - TEST_TYPE_ALIGN (WINEVENTPROC, 8) -} - -static void test_pack_WINSTAENUMPROCA(void) -{ - /* WINSTAENUMPROCA */ - TEST_TYPE_SIZE (WINSTAENUMPROCA, 8) - TEST_TYPE_ALIGN (WINSTAENUMPROCA, 8) -} - -static void test_pack_WINSTAENUMPROCW(void) -{ - /* WINSTAENUMPROCW */ - TEST_TYPE_SIZE (WINSTAENUMPROCW, 8) - TEST_TYPE_ALIGN (WINSTAENUMPROCW, 8) -} - -static void test_pack_WNDCLASSA(void) -{ - /* WNDCLASSA */ - TEST_TYPE_SIZE (WNDCLASSA, 72) - TEST_TYPE_ALIGN (WNDCLASSA, 8) - TEST_FIELD_SIZE (WNDCLASSA, style, 4) - TEST_FIELD_ALIGN (WNDCLASSA, style, 4) - TEST_FIELD_OFFSET(WNDCLASSA, style, 0) - TEST_FIELD_SIZE (WNDCLASSA, lpfnWndProc, 8) - TEST_FIELD_ALIGN (WNDCLASSA, lpfnWndProc, 8) - TEST_FIELD_OFFSET(WNDCLASSA, lpfnWndProc, 8) - TEST_FIELD_SIZE (WNDCLASSA, cbClsExtra, 4) - TEST_FIELD_ALIGN (WNDCLASSA, cbClsExtra, 4) - TEST_FIELD_OFFSET(WNDCLASSA, cbClsExtra, 16) - TEST_FIELD_SIZE (WNDCLASSA, cbWndExtra, 4) - TEST_FIELD_ALIGN (WNDCLASSA, cbWndExtra, 4) - TEST_FIELD_OFFSET(WNDCLASSA, cbWndExtra, 20) - TEST_FIELD_SIZE (WNDCLASSA, hInstance, 8) - TEST_FIELD_ALIGN (WNDCLASSA, hInstance, 8) - TEST_FIELD_OFFSET(WNDCLASSA, hInstance, 24) - TEST_FIELD_SIZE (WNDCLASSA, hIcon, 8) - TEST_FIELD_ALIGN (WNDCLASSA, hIcon, 8) - TEST_FIELD_OFFSET(WNDCLASSA, hIcon, 32) - TEST_FIELD_SIZE (WNDCLASSA, hCursor, 8) - TEST_FIELD_ALIGN (WNDCLASSA, hCursor, 8) - TEST_FIELD_OFFSET(WNDCLASSA, hCursor, 40) - TEST_FIELD_SIZE (WNDCLASSA, hbrBackground, 8) - TEST_FIELD_ALIGN (WNDCLASSA, hbrBackground, 8) - TEST_FIELD_OFFSET(WNDCLASSA, hbrBackground, 48) - TEST_FIELD_SIZE (WNDCLASSA, lpszMenuName, 8) - TEST_FIELD_ALIGN (WNDCLASSA, lpszMenuName, 8) - TEST_FIELD_OFFSET(WNDCLASSA, lpszMenuName, 56) - TEST_FIELD_SIZE (WNDCLASSA, lpszClassName, 8) - TEST_FIELD_ALIGN (WNDCLASSA, lpszClassName, 8) - TEST_FIELD_OFFSET(WNDCLASSA, lpszClassName, 64) -} - -static void test_pack_WNDCLASSEXA(void) -{ - /* WNDCLASSEXA */ - TEST_TYPE_SIZE (WNDCLASSEXA, 80) - TEST_TYPE_ALIGN (WNDCLASSEXA, 8) - TEST_FIELD_SIZE (WNDCLASSEXA, cbSize, 4) - TEST_FIELD_ALIGN (WNDCLASSEXA, cbSize, 4) - TEST_FIELD_OFFSET(WNDCLASSEXA, cbSize, 0) - TEST_FIELD_SIZE (WNDCLASSEXA, style, 4) - TEST_FIELD_ALIGN (WNDCLASSEXA, style, 4) - TEST_FIELD_OFFSET(WNDCLASSEXA, style, 4) - TEST_FIELD_SIZE (WNDCLASSEXA, lpfnWndProc, 8) - TEST_FIELD_ALIGN (WNDCLASSEXA, lpfnWndProc, 8) - TEST_FIELD_OFFSET(WNDCLASSEXA, lpfnWndProc, 8) - TEST_FIELD_SIZE (WNDCLASSEXA, cbClsExtra, 4) - TEST_FIELD_ALIGN (WNDCLASSEXA, cbClsExtra, 4) - TEST_FIELD_OFFSET(WNDCLASSEXA, cbClsExtra, 16) - TEST_FIELD_SIZE (WNDCLASSEXA, cbWndExtra, 4) - TEST_FIELD_ALIGN (WNDCLASSEXA, cbWndExtra, 4) - TEST_FIELD_OFFSET(WNDCLASSEXA, cbWndExtra, 20) - TEST_FIELD_SIZE (WNDCLASSEXA, hInstance, 8) - TEST_FIELD_ALIGN (WNDCLASSEXA, hInstance, 8) - TEST_FIELD_OFFSET(WNDCLASSEXA, hInstance, 24) - TEST_FIELD_SIZE (WNDCLASSEXA, hIcon, 8) - TEST_FIELD_ALIGN (WNDCLASSEXA, hIcon, 8) - TEST_FIELD_OFFSET(WNDCLASSEXA, hIcon, 32) - TEST_FIELD_SIZE (WNDCLASSEXA, hCursor, 8) - TEST_FIELD_ALIGN (WNDCLASSEXA, hCursor, 8) - TEST_FIELD_OFFSET(WNDCLASSEXA, hCursor, 40) - TEST_FIELD_SIZE (WNDCLASSEXA, hbrBackground, 8) - TEST_FIELD_ALIGN (WNDCLASSEXA, hbrBackground, 8) - TEST_FIELD_OFFSET(WNDCLASSEXA, hbrBackground, 48) - TEST_FIELD_SIZE (WNDCLASSEXA, lpszMenuName, 8) - TEST_FIELD_ALIGN (WNDCLASSEXA, lpszMenuName, 8) - TEST_FIELD_OFFSET(WNDCLASSEXA, lpszMenuName, 56) - TEST_FIELD_SIZE (WNDCLASSEXA, lpszClassName, 8) - TEST_FIELD_ALIGN (WNDCLASSEXA, lpszClassName, 8) - TEST_FIELD_OFFSET(WNDCLASSEXA, lpszClassName, 64) - TEST_FIELD_SIZE (WNDCLASSEXA, hIconSm, 8) - TEST_FIELD_ALIGN (WNDCLASSEXA, hIconSm, 8) - TEST_FIELD_OFFSET(WNDCLASSEXA, hIconSm, 72) -} - -static void test_pack_WNDCLASSEXW(void) -{ - /* WNDCLASSEXW */ - TEST_TYPE_SIZE (WNDCLASSEXW, 80) - TEST_TYPE_ALIGN (WNDCLASSEXW, 8) - TEST_FIELD_SIZE (WNDCLASSEXW, cbSize, 4) - TEST_FIELD_ALIGN (WNDCLASSEXW, cbSize, 4) - TEST_FIELD_OFFSET(WNDCLASSEXW, cbSize, 0) - TEST_FIELD_SIZE (WNDCLASSEXW, style, 4) - TEST_FIELD_ALIGN (WNDCLASSEXW, style, 4) - TEST_FIELD_OFFSET(WNDCLASSEXW, style, 4) - TEST_FIELD_SIZE (WNDCLASSEXW, lpfnWndProc, 8) - TEST_FIELD_ALIGN (WNDCLASSEXW, lpfnWndProc, 8) - TEST_FIELD_OFFSET(WNDCLASSEXW, lpfnWndProc, 8) - TEST_FIELD_SIZE (WNDCLASSEXW, cbClsExtra, 4) - TEST_FIELD_ALIGN (WNDCLASSEXW, cbClsExtra, 4) - TEST_FIELD_OFFSET(WNDCLASSEXW, cbClsExtra, 16) - TEST_FIELD_SIZE (WNDCLASSEXW, cbWndExtra, 4) - TEST_FIELD_ALIGN (WNDCLASSEXW, cbWndExtra, 4) - TEST_FIELD_OFFSET(WNDCLASSEXW, cbWndExtra, 20) - TEST_FIELD_SIZE (WNDCLASSEXW, hInstance, 8) - TEST_FIELD_ALIGN (WNDCLASSEXW, hInstance, 8) - TEST_FIELD_OFFSET(WNDCLASSEXW, hInstance, 24) - TEST_FIELD_SIZE (WNDCLASSEXW, hIcon, 8) - TEST_FIELD_ALIGN (WNDCLASSEXW, hIcon, 8) - TEST_FIELD_OFFSET(WNDCLASSEXW, hIcon, 32) - TEST_FIELD_SIZE (WNDCLASSEXW, hCursor, 8) - TEST_FIELD_ALIGN (WNDCLASSEXW, hCursor, 8) - TEST_FIELD_OFFSET(WNDCLASSEXW, hCursor, 40) - TEST_FIELD_SIZE (WNDCLASSEXW, hbrBackground, 8) - TEST_FIELD_ALIGN (WNDCLASSEXW, hbrBackground, 8) - TEST_FIELD_OFFSET(WNDCLASSEXW, hbrBackground, 48) - TEST_FIELD_SIZE (WNDCLASSEXW, lpszMenuName, 8) - TEST_FIELD_ALIGN (WNDCLASSEXW, lpszMenuName, 8) - TEST_FIELD_OFFSET(WNDCLASSEXW, lpszMenuName, 56) - TEST_FIELD_SIZE (WNDCLASSEXW, lpszClassName, 8) - TEST_FIELD_ALIGN (WNDCLASSEXW, lpszClassName, 8) - TEST_FIELD_OFFSET(WNDCLASSEXW, lpszClassName, 64) - TEST_FIELD_SIZE (WNDCLASSEXW, hIconSm, 8) - TEST_FIELD_ALIGN (WNDCLASSEXW, hIconSm, 8) - TEST_FIELD_OFFSET(WNDCLASSEXW, hIconSm, 72) -} - -static void test_pack_WNDCLASSW(void) -{ - /* WNDCLASSW */ - TEST_TYPE_SIZE (WNDCLASSW, 72) - TEST_TYPE_ALIGN (WNDCLASSW, 8) - TEST_FIELD_SIZE (WNDCLASSW, style, 4) - TEST_FIELD_ALIGN (WNDCLASSW, style, 4) - TEST_FIELD_OFFSET(WNDCLASSW, style, 0) - TEST_FIELD_SIZE (WNDCLASSW, lpfnWndProc, 8) - TEST_FIELD_ALIGN (WNDCLASSW, lpfnWndProc, 8) - TEST_FIELD_OFFSET(WNDCLASSW, lpfnWndProc, 8) - TEST_FIELD_SIZE (WNDCLASSW, cbClsExtra, 4) - TEST_FIELD_ALIGN (WNDCLASSW, cbClsExtra, 4) - TEST_FIELD_OFFSET(WNDCLASSW, cbClsExtra, 16) - TEST_FIELD_SIZE (WNDCLASSW, cbWndExtra, 4) - TEST_FIELD_ALIGN (WNDCLASSW, cbWndExtra, 4) - TEST_FIELD_OFFSET(WNDCLASSW, cbWndExtra, 20) - TEST_FIELD_SIZE (WNDCLASSW, hInstance, 8) - TEST_FIELD_ALIGN (WNDCLASSW, hInstance, 8) - TEST_FIELD_OFFSET(WNDCLASSW, hInstance, 24) - TEST_FIELD_SIZE (WNDCLASSW, hIcon, 8) - TEST_FIELD_ALIGN (WNDCLASSW, hIcon, 8) - TEST_FIELD_OFFSET(WNDCLASSW, hIcon, 32) - TEST_FIELD_SIZE (WNDCLASSW, hCursor, 8) - TEST_FIELD_ALIGN (WNDCLASSW, hCursor, 8) - TEST_FIELD_OFFSET(WNDCLASSW, hCursor, 40) - TEST_FIELD_SIZE (WNDCLASSW, hbrBackground, 8) - TEST_FIELD_ALIGN (WNDCLASSW, hbrBackground, 8) - TEST_FIELD_OFFSET(WNDCLASSW, hbrBackground, 48) - TEST_FIELD_SIZE (WNDCLASSW, lpszMenuName, 8) - TEST_FIELD_ALIGN (WNDCLASSW, lpszMenuName, 8) - TEST_FIELD_OFFSET(WNDCLASSW, lpszMenuName, 56) - TEST_FIELD_SIZE (WNDCLASSW, lpszClassName, 8) - TEST_FIELD_ALIGN (WNDCLASSW, lpszClassName, 8) - TEST_FIELD_OFFSET(WNDCLASSW, lpszClassName, 64) -} - -static void test_pack_WNDENUMPROC(void) -{ - /* WNDENUMPROC */ - TEST_TYPE_SIZE (WNDENUMPROC, 8) - TEST_TYPE_ALIGN (WNDENUMPROC, 8) -} - -static void test_pack_WNDPROC(void) -{ - /* WNDPROC */ - TEST_TYPE_SIZE (WNDPROC, 8) - TEST_TYPE_ALIGN (WNDPROC, 8) -} - -#else /* _WIN64 */ - -static void test_pack_ACCESSTIMEOUT(void) -{ - /* ACCESSTIMEOUT */ - TEST_TYPE_SIZE (ACCESSTIMEOUT, 12) - TEST_TYPE_ALIGN (ACCESSTIMEOUT, 4) - TEST_FIELD_SIZE (ACCESSTIMEOUT, cbSize, 4) - TEST_FIELD_ALIGN (ACCESSTIMEOUT, cbSize, 4) - TEST_FIELD_OFFSET(ACCESSTIMEOUT, cbSize, 0) - TEST_FIELD_SIZE (ACCESSTIMEOUT, dwFlags, 4) - TEST_FIELD_ALIGN (ACCESSTIMEOUT, dwFlags, 4) - TEST_FIELD_OFFSET(ACCESSTIMEOUT, dwFlags, 4) - TEST_FIELD_SIZE (ACCESSTIMEOUT, iTimeOutMSec, 4) - TEST_FIELD_ALIGN (ACCESSTIMEOUT, iTimeOutMSec, 4) - TEST_FIELD_OFFSET(ACCESSTIMEOUT, iTimeOutMSec, 8) -} - -static void test_pack_ANIMATIONINFO(void) -{ - /* ANIMATIONINFO */ - TEST_TYPE_SIZE (ANIMATIONINFO, 8) - TEST_TYPE_ALIGN (ANIMATIONINFO, 4) - TEST_FIELD_SIZE (ANIMATIONINFO, cbSize, 4) - TEST_FIELD_ALIGN (ANIMATIONINFO, cbSize, 4) - TEST_FIELD_OFFSET(ANIMATIONINFO, cbSize, 0) - TEST_FIELD_SIZE (ANIMATIONINFO, iMinAnimate, 4) - TEST_FIELD_ALIGN (ANIMATIONINFO, iMinAnimate, 4) - TEST_FIELD_OFFSET(ANIMATIONINFO, iMinAnimate, 4) -} - -static void test_pack_CBTACTIVATESTRUCT(void) -{ - /* CBTACTIVATESTRUCT */ - TEST_TYPE_SIZE (CBTACTIVATESTRUCT, 8) - TEST_TYPE_ALIGN (CBTACTIVATESTRUCT, 4) - TEST_FIELD_SIZE (CBTACTIVATESTRUCT, fMouse, 4) - TEST_FIELD_ALIGN (CBTACTIVATESTRUCT, fMouse, 4) - TEST_FIELD_OFFSET(CBTACTIVATESTRUCT, fMouse, 0) - TEST_FIELD_SIZE (CBTACTIVATESTRUCT, hWndActive, 4) - TEST_FIELD_ALIGN (CBTACTIVATESTRUCT, hWndActive, 4) - TEST_FIELD_OFFSET(CBTACTIVATESTRUCT, hWndActive, 4) -} - -static void test_pack_CBT_CREATEWNDA(void) -{ - /* CBT_CREATEWNDA */ - TEST_TYPE_SIZE (CBT_CREATEWNDA, 8) - TEST_TYPE_ALIGN (CBT_CREATEWNDA, 4) - TEST_FIELD_SIZE (CBT_CREATEWNDA, lpcs, 4) - TEST_FIELD_ALIGN (CBT_CREATEWNDA, lpcs, 4) - TEST_FIELD_OFFSET(CBT_CREATEWNDA, lpcs, 0) - TEST_FIELD_SIZE (CBT_CREATEWNDA, hwndInsertAfter, 4) - TEST_FIELD_ALIGN (CBT_CREATEWNDA, hwndInsertAfter, 4) - TEST_FIELD_OFFSET(CBT_CREATEWNDA, hwndInsertAfter, 4) -} - -static void test_pack_CBT_CREATEWNDW(void) -{ - /* CBT_CREATEWNDW */ - TEST_TYPE_SIZE (CBT_CREATEWNDW, 8) - TEST_TYPE_ALIGN (CBT_CREATEWNDW, 4) - TEST_FIELD_SIZE (CBT_CREATEWNDW, lpcs, 4) - TEST_FIELD_ALIGN (CBT_CREATEWNDW, lpcs, 4) - TEST_FIELD_OFFSET(CBT_CREATEWNDW, lpcs, 0) - TEST_FIELD_SIZE (CBT_CREATEWNDW, hwndInsertAfter, 4) - TEST_FIELD_ALIGN (CBT_CREATEWNDW, hwndInsertAfter, 4) - TEST_FIELD_OFFSET(CBT_CREATEWNDW, hwndInsertAfter, 4) -} - -static void test_pack_CLIENTCREATESTRUCT(void) -{ - /* CLIENTCREATESTRUCT */ - TEST_TYPE_SIZE (CLIENTCREATESTRUCT, 8) - TEST_TYPE_ALIGN (CLIENTCREATESTRUCT, 4) - TEST_FIELD_SIZE (CLIENTCREATESTRUCT, hWindowMenu, 4) - TEST_FIELD_ALIGN (CLIENTCREATESTRUCT, hWindowMenu, 4) - TEST_FIELD_OFFSET(CLIENTCREATESTRUCT, hWindowMenu, 0) - TEST_FIELD_SIZE (CLIENTCREATESTRUCT, idFirstChild, 4) - TEST_FIELD_ALIGN (CLIENTCREATESTRUCT, idFirstChild, 4) - TEST_FIELD_OFFSET(CLIENTCREATESTRUCT, idFirstChild, 4) -} - -static void test_pack_COMBOBOXINFO(void) -{ - /* COMBOBOXINFO */ - TEST_TYPE_SIZE (COMBOBOXINFO, 52) - TEST_TYPE_ALIGN (COMBOBOXINFO, 4) - TEST_FIELD_SIZE (COMBOBOXINFO, cbSize, 4) - TEST_FIELD_ALIGN (COMBOBOXINFO, cbSize, 4) - TEST_FIELD_OFFSET(COMBOBOXINFO, cbSize, 0) - TEST_FIELD_SIZE (COMBOBOXINFO, rcItem, 16) - TEST_FIELD_ALIGN (COMBOBOXINFO, rcItem, 4) - TEST_FIELD_OFFSET(COMBOBOXINFO, rcItem, 4) - TEST_FIELD_SIZE (COMBOBOXINFO, rcButton, 16) - TEST_FIELD_ALIGN (COMBOBOXINFO, rcButton, 4) - TEST_FIELD_OFFSET(COMBOBOXINFO, rcButton, 20) - TEST_FIELD_SIZE (COMBOBOXINFO, stateButton, 4) - TEST_FIELD_ALIGN (COMBOBOXINFO, stateButton, 4) - TEST_FIELD_OFFSET(COMBOBOXINFO, stateButton, 36) - TEST_FIELD_SIZE (COMBOBOXINFO, hwndCombo, 4) - TEST_FIELD_ALIGN (COMBOBOXINFO, hwndCombo, 4) - TEST_FIELD_OFFSET(COMBOBOXINFO, hwndCombo, 40) - TEST_FIELD_SIZE (COMBOBOXINFO, hwndItem, 4) - TEST_FIELD_ALIGN (COMBOBOXINFO, hwndItem, 4) - TEST_FIELD_OFFSET(COMBOBOXINFO, hwndItem, 44) - TEST_FIELD_SIZE (COMBOBOXINFO, hwndList, 4) - TEST_FIELD_ALIGN (COMBOBOXINFO, hwndList, 4) - TEST_FIELD_OFFSET(COMBOBOXINFO, hwndList, 48) -} - -static void test_pack_COMPAREITEMSTRUCT(void) -{ - /* COMPAREITEMSTRUCT */ - TEST_TYPE_SIZE (COMPAREITEMSTRUCT, 32) - TEST_TYPE_ALIGN (COMPAREITEMSTRUCT, 4) - TEST_FIELD_SIZE (COMPAREITEMSTRUCT, CtlType, 4) - TEST_FIELD_ALIGN (COMPAREITEMSTRUCT, CtlType, 4) - TEST_FIELD_OFFSET(COMPAREITEMSTRUCT, CtlType, 0) - TEST_FIELD_SIZE (COMPAREITEMSTRUCT, CtlID, 4) - TEST_FIELD_ALIGN (COMPAREITEMSTRUCT, CtlID, 4) - TEST_FIELD_OFFSET(COMPAREITEMSTRUCT, CtlID, 4) - TEST_FIELD_SIZE (COMPAREITEMSTRUCT, hwndItem, 4) - TEST_FIELD_ALIGN (COMPAREITEMSTRUCT, hwndItem, 4) - TEST_FIELD_OFFSET(COMPAREITEMSTRUCT, hwndItem, 8) - TEST_FIELD_SIZE (COMPAREITEMSTRUCT, itemID1, 4) - TEST_FIELD_ALIGN (COMPAREITEMSTRUCT, itemID1, 4) - TEST_FIELD_OFFSET(COMPAREITEMSTRUCT, itemID1, 12) - TEST_FIELD_SIZE (COMPAREITEMSTRUCT, itemData1, 4) - TEST_FIELD_ALIGN (COMPAREITEMSTRUCT, itemData1, 4) - TEST_FIELD_OFFSET(COMPAREITEMSTRUCT, itemData1, 16) - TEST_FIELD_SIZE (COMPAREITEMSTRUCT, itemID2, 4) - TEST_FIELD_ALIGN (COMPAREITEMSTRUCT, itemID2, 4) - TEST_FIELD_OFFSET(COMPAREITEMSTRUCT, itemID2, 20) - TEST_FIELD_SIZE (COMPAREITEMSTRUCT, itemData2, 4) - TEST_FIELD_ALIGN (COMPAREITEMSTRUCT, itemData2, 4) - TEST_FIELD_OFFSET(COMPAREITEMSTRUCT, itemData2, 24) - TEST_FIELD_SIZE (COMPAREITEMSTRUCT, dwLocaleId, 4) - TEST_FIELD_ALIGN (COMPAREITEMSTRUCT, dwLocaleId, 4) - TEST_FIELD_OFFSET(COMPAREITEMSTRUCT, dwLocaleId, 28) -} - -static void test_pack_COPYDATASTRUCT(void) -{ - /* COPYDATASTRUCT */ - TEST_TYPE_SIZE (COPYDATASTRUCT, 12) - TEST_TYPE_ALIGN (COPYDATASTRUCT, 4) - TEST_FIELD_SIZE (COPYDATASTRUCT, dwData, 4) - TEST_FIELD_ALIGN (COPYDATASTRUCT, dwData, 4) - TEST_FIELD_OFFSET(COPYDATASTRUCT, dwData, 0) - TEST_FIELD_SIZE (COPYDATASTRUCT, cbData, 4) - TEST_FIELD_ALIGN (COPYDATASTRUCT, cbData, 4) - TEST_FIELD_OFFSET(COPYDATASTRUCT, cbData, 4) - TEST_FIELD_SIZE (COPYDATASTRUCT, lpData, 4) - TEST_FIELD_ALIGN (COPYDATASTRUCT, lpData, 4) - TEST_FIELD_OFFSET(COPYDATASTRUCT, lpData, 8) -} - -static void test_pack_CREATESTRUCTA(void) -{ - /* CREATESTRUCTA */ - TEST_TYPE_SIZE (CREATESTRUCTA, 48) - TEST_TYPE_ALIGN (CREATESTRUCTA, 4) - TEST_FIELD_SIZE (CREATESTRUCTA, lpCreateParams, 4) - TEST_FIELD_ALIGN (CREATESTRUCTA, lpCreateParams, 4) - TEST_FIELD_OFFSET(CREATESTRUCTA, lpCreateParams, 0) - TEST_FIELD_SIZE (CREATESTRUCTA, hInstance, 4) - TEST_FIELD_ALIGN (CREATESTRUCTA, hInstance, 4) - TEST_FIELD_OFFSET(CREATESTRUCTA, hInstance, 4) - TEST_FIELD_SIZE (CREATESTRUCTA, hMenu, 4) - TEST_FIELD_ALIGN (CREATESTRUCTA, hMenu, 4) - TEST_FIELD_OFFSET(CREATESTRUCTA, hMenu, 8) - TEST_FIELD_SIZE (CREATESTRUCTA, hwndParent, 4) - TEST_FIELD_ALIGN (CREATESTRUCTA, hwndParent, 4) - TEST_FIELD_OFFSET(CREATESTRUCTA, hwndParent, 12) - TEST_FIELD_SIZE (CREATESTRUCTA, cy, 4) - TEST_FIELD_ALIGN (CREATESTRUCTA, cy, 4) - TEST_FIELD_OFFSET(CREATESTRUCTA, cy, 16) - TEST_FIELD_SIZE (CREATESTRUCTA, cx, 4) - TEST_FIELD_ALIGN (CREATESTRUCTA, cx, 4) - TEST_FIELD_OFFSET(CREATESTRUCTA, cx, 20) - TEST_FIELD_SIZE (CREATESTRUCTA, y, 4) - TEST_FIELD_ALIGN (CREATESTRUCTA, y, 4) - TEST_FIELD_OFFSET(CREATESTRUCTA, y, 24) - TEST_FIELD_SIZE (CREATESTRUCTA, x, 4) - TEST_FIELD_ALIGN (CREATESTRUCTA, x, 4) - TEST_FIELD_OFFSET(CREATESTRUCTA, x, 28) - TEST_FIELD_SIZE (CREATESTRUCTA, style, 4) - TEST_FIELD_ALIGN (CREATESTRUCTA, style, 4) - TEST_FIELD_OFFSET(CREATESTRUCTA, style, 32) - TEST_FIELD_SIZE (CREATESTRUCTA, lpszName, 4) - TEST_FIELD_ALIGN (CREATESTRUCTA, lpszName, 4) - TEST_FIELD_OFFSET(CREATESTRUCTA, lpszName, 36) - TEST_FIELD_SIZE (CREATESTRUCTA, lpszClass, 4) - TEST_FIELD_ALIGN (CREATESTRUCTA, lpszClass, 4) - TEST_FIELD_OFFSET(CREATESTRUCTA, lpszClass, 40) - TEST_FIELD_SIZE (CREATESTRUCTA, dwExStyle, 4) - TEST_FIELD_ALIGN (CREATESTRUCTA, dwExStyle, 4) - TEST_FIELD_OFFSET(CREATESTRUCTA, dwExStyle, 44) -} - -static void test_pack_CREATESTRUCTW(void) -{ - /* CREATESTRUCTW */ - TEST_TYPE_SIZE (CREATESTRUCTW, 48) - TEST_TYPE_ALIGN (CREATESTRUCTW, 4) - TEST_FIELD_SIZE (CREATESTRUCTW, lpCreateParams, 4) - TEST_FIELD_ALIGN (CREATESTRUCTW, lpCreateParams, 4) - TEST_FIELD_OFFSET(CREATESTRUCTW, lpCreateParams, 0) - TEST_FIELD_SIZE (CREATESTRUCTW, hInstance, 4) - TEST_FIELD_ALIGN (CREATESTRUCTW, hInstance, 4) - TEST_FIELD_OFFSET(CREATESTRUCTW, hInstance, 4) - TEST_FIELD_SIZE (CREATESTRUCTW, hMenu, 4) - TEST_FIELD_ALIGN (CREATESTRUCTW, hMenu, 4) - TEST_FIELD_OFFSET(CREATESTRUCTW, hMenu, 8) - TEST_FIELD_SIZE (CREATESTRUCTW, hwndParent, 4) - TEST_FIELD_ALIGN (CREATESTRUCTW, hwndParent, 4) - TEST_FIELD_OFFSET(CREATESTRUCTW, hwndParent, 12) - TEST_FIELD_SIZE (CREATESTRUCTW, cy, 4) - TEST_FIELD_ALIGN (CREATESTRUCTW, cy, 4) - TEST_FIELD_OFFSET(CREATESTRUCTW, cy, 16) - TEST_FIELD_SIZE (CREATESTRUCTW, cx, 4) - TEST_FIELD_ALIGN (CREATESTRUCTW, cx, 4) - TEST_FIELD_OFFSET(CREATESTRUCTW, cx, 20) - TEST_FIELD_SIZE (CREATESTRUCTW, y, 4) - TEST_FIELD_ALIGN (CREATESTRUCTW, y, 4) - TEST_FIELD_OFFSET(CREATESTRUCTW, y, 24) - TEST_FIELD_SIZE (CREATESTRUCTW, x, 4) - TEST_FIELD_ALIGN (CREATESTRUCTW, x, 4) - TEST_FIELD_OFFSET(CREATESTRUCTW, x, 28) - TEST_FIELD_SIZE (CREATESTRUCTW, style, 4) - TEST_FIELD_ALIGN (CREATESTRUCTW, style, 4) - TEST_FIELD_OFFSET(CREATESTRUCTW, style, 32) - TEST_FIELD_SIZE (CREATESTRUCTW, lpszName, 4) - TEST_FIELD_ALIGN (CREATESTRUCTW, lpszName, 4) - TEST_FIELD_OFFSET(CREATESTRUCTW, lpszName, 36) - TEST_FIELD_SIZE (CREATESTRUCTW, lpszClass, 4) - TEST_FIELD_ALIGN (CREATESTRUCTW, lpszClass, 4) - TEST_FIELD_OFFSET(CREATESTRUCTW, lpszClass, 40) - TEST_FIELD_SIZE (CREATESTRUCTW, dwExStyle, 4) - TEST_FIELD_ALIGN (CREATESTRUCTW, dwExStyle, 4) - TEST_FIELD_OFFSET(CREATESTRUCTW, dwExStyle, 44) -} - -static void test_pack_CURSORINFO(void) -{ - /* CURSORINFO */ - TEST_TYPE_SIZE (CURSORINFO, 20) - TEST_TYPE_ALIGN (CURSORINFO, 4) - TEST_FIELD_SIZE (CURSORINFO, cbSize, 4) - TEST_FIELD_ALIGN (CURSORINFO, cbSize, 4) - TEST_FIELD_OFFSET(CURSORINFO, cbSize, 0) - TEST_FIELD_SIZE (CURSORINFO, flags, 4) - TEST_FIELD_ALIGN (CURSORINFO, flags, 4) - TEST_FIELD_OFFSET(CURSORINFO, flags, 4) - TEST_FIELD_SIZE (CURSORINFO, hCursor, 4) - TEST_FIELD_ALIGN (CURSORINFO, hCursor, 4) - TEST_FIELD_OFFSET(CURSORINFO, hCursor, 8) - TEST_FIELD_SIZE (CURSORINFO, ptScreenPos, 8) - TEST_FIELD_ALIGN (CURSORINFO, ptScreenPos, 4) - TEST_FIELD_OFFSET(CURSORINFO, ptScreenPos, 12) -} - -static void test_pack_CWPRETSTRUCT(void) -{ - /* CWPRETSTRUCT */ - TEST_TYPE_SIZE (CWPRETSTRUCT, 20) - TEST_TYPE_ALIGN (CWPRETSTRUCT, 4) - TEST_FIELD_SIZE (CWPRETSTRUCT, lResult, 4) - TEST_FIELD_ALIGN (CWPRETSTRUCT, lResult, 4) - TEST_FIELD_OFFSET(CWPRETSTRUCT, lResult, 0) - TEST_FIELD_SIZE (CWPRETSTRUCT, lParam, 4) - TEST_FIELD_ALIGN (CWPRETSTRUCT, lParam, 4) - TEST_FIELD_OFFSET(CWPRETSTRUCT, lParam, 4) - TEST_FIELD_SIZE (CWPRETSTRUCT, wParam, 4) - TEST_FIELD_ALIGN (CWPRETSTRUCT, wParam, 4) - TEST_FIELD_OFFSET(CWPRETSTRUCT, wParam, 8) - TEST_FIELD_SIZE (CWPRETSTRUCT, message, 4) - TEST_FIELD_ALIGN (CWPRETSTRUCT, message, 4) - TEST_FIELD_OFFSET(CWPRETSTRUCT, message, 12) - TEST_FIELD_SIZE (CWPRETSTRUCT, hwnd, 4) - TEST_FIELD_ALIGN (CWPRETSTRUCT, hwnd, 4) - TEST_FIELD_OFFSET(CWPRETSTRUCT, hwnd, 16) -} - -static void test_pack_CWPSTRUCT(void) -{ - /* CWPSTRUCT */ - TEST_TYPE_SIZE (CWPSTRUCT, 16) - TEST_TYPE_ALIGN (CWPSTRUCT, 4) - TEST_FIELD_SIZE (CWPSTRUCT, lParam, 4) - TEST_FIELD_ALIGN (CWPSTRUCT, lParam, 4) - TEST_FIELD_OFFSET(CWPSTRUCT, lParam, 0) - TEST_FIELD_SIZE (CWPSTRUCT, wParam, 4) - TEST_FIELD_ALIGN (CWPSTRUCT, wParam, 4) - TEST_FIELD_OFFSET(CWPSTRUCT, wParam, 4) - TEST_FIELD_SIZE (CWPSTRUCT, message, 4) - TEST_FIELD_ALIGN (CWPSTRUCT, message, 4) - TEST_FIELD_OFFSET(CWPSTRUCT, message, 8) - TEST_FIELD_SIZE (CWPSTRUCT, hwnd, 4) - TEST_FIELD_ALIGN (CWPSTRUCT, hwnd, 4) - TEST_FIELD_OFFSET(CWPSTRUCT, hwnd, 12) -} - -static void test_pack_DEBUGHOOKINFO(void) -{ - /* DEBUGHOOKINFO */ - TEST_TYPE_SIZE (DEBUGHOOKINFO, 20) - TEST_TYPE_ALIGN (DEBUGHOOKINFO, 4) - TEST_FIELD_SIZE (DEBUGHOOKINFO, idThread, 4) - TEST_FIELD_ALIGN (DEBUGHOOKINFO, idThread, 4) - TEST_FIELD_OFFSET(DEBUGHOOKINFO, idThread, 0) - TEST_FIELD_SIZE (DEBUGHOOKINFO, idThreadInstaller, 4) - TEST_FIELD_ALIGN (DEBUGHOOKINFO, idThreadInstaller, 4) - TEST_FIELD_OFFSET(DEBUGHOOKINFO, idThreadInstaller, 4) - TEST_FIELD_SIZE (DEBUGHOOKINFO, lParam, 4) - TEST_FIELD_ALIGN (DEBUGHOOKINFO, lParam, 4) - TEST_FIELD_OFFSET(DEBUGHOOKINFO, lParam, 8) - TEST_FIELD_SIZE (DEBUGHOOKINFO, wParam, 4) - TEST_FIELD_ALIGN (DEBUGHOOKINFO, wParam, 4) - TEST_FIELD_OFFSET(DEBUGHOOKINFO, wParam, 12) - TEST_FIELD_SIZE (DEBUGHOOKINFO, code, 4) - TEST_FIELD_ALIGN (DEBUGHOOKINFO, code, 4) - TEST_FIELD_OFFSET(DEBUGHOOKINFO, code, 16) -} - -static void test_pack_DELETEITEMSTRUCT(void) -{ - /* DELETEITEMSTRUCT */ - TEST_TYPE_SIZE (DELETEITEMSTRUCT, 20) - TEST_TYPE_ALIGN (DELETEITEMSTRUCT, 4) - TEST_FIELD_SIZE (DELETEITEMSTRUCT, CtlType, 4) - TEST_FIELD_ALIGN (DELETEITEMSTRUCT, CtlType, 4) - TEST_FIELD_OFFSET(DELETEITEMSTRUCT, CtlType, 0) - TEST_FIELD_SIZE (DELETEITEMSTRUCT, CtlID, 4) - TEST_FIELD_ALIGN (DELETEITEMSTRUCT, CtlID, 4) - TEST_FIELD_OFFSET(DELETEITEMSTRUCT, CtlID, 4) - TEST_FIELD_SIZE (DELETEITEMSTRUCT, itemID, 4) - TEST_FIELD_ALIGN (DELETEITEMSTRUCT, itemID, 4) - TEST_FIELD_OFFSET(DELETEITEMSTRUCT, itemID, 8) - TEST_FIELD_SIZE (DELETEITEMSTRUCT, hwndItem, 4) - TEST_FIELD_ALIGN (DELETEITEMSTRUCT, hwndItem, 4) - TEST_FIELD_OFFSET(DELETEITEMSTRUCT, hwndItem, 12) - TEST_FIELD_SIZE (DELETEITEMSTRUCT, itemData, 4) - TEST_FIELD_ALIGN (DELETEITEMSTRUCT, itemData, 4) - TEST_FIELD_OFFSET(DELETEITEMSTRUCT, itemData, 16) -} - -static void test_pack_DESKTOPENUMPROCA(void) -{ - /* DESKTOPENUMPROCA */ - TEST_TYPE_SIZE (DESKTOPENUMPROCA, 4) - TEST_TYPE_ALIGN (DESKTOPENUMPROCA, 4) -} - -static void test_pack_DESKTOPENUMPROCW(void) -{ - /* DESKTOPENUMPROCW */ - TEST_TYPE_SIZE (DESKTOPENUMPROCW, 4) - TEST_TYPE_ALIGN (DESKTOPENUMPROCW, 4) -} - -static void test_pack_DLGITEMTEMPLATE(void) -{ - /* DLGITEMTEMPLATE (pack 2) */ - TEST_TYPE_SIZE (DLGITEMTEMPLATE, 18) - TEST_TYPE_ALIGN (DLGITEMTEMPLATE, 2) - TEST_FIELD_SIZE (DLGITEMTEMPLATE, style, 4) - TEST_FIELD_ALIGN (DLGITEMTEMPLATE, style, 2) - TEST_FIELD_OFFSET(DLGITEMTEMPLATE, style, 0) - TEST_FIELD_SIZE (DLGITEMTEMPLATE, dwExtendedStyle, 4) - TEST_FIELD_ALIGN (DLGITEMTEMPLATE, dwExtendedStyle, 2) - TEST_FIELD_OFFSET(DLGITEMTEMPLATE, dwExtendedStyle, 4) - TEST_FIELD_SIZE (DLGITEMTEMPLATE, x, 2) - TEST_FIELD_ALIGN (DLGITEMTEMPLATE, x, 2) - TEST_FIELD_OFFSET(DLGITEMTEMPLATE, x, 8) - TEST_FIELD_SIZE (DLGITEMTEMPLATE, y, 2) - TEST_FIELD_ALIGN (DLGITEMTEMPLATE, y, 2) - TEST_FIELD_OFFSET(DLGITEMTEMPLATE, y, 10) - TEST_FIELD_SIZE (DLGITEMTEMPLATE, cx, 2) - TEST_FIELD_ALIGN (DLGITEMTEMPLATE, cx, 2) - TEST_FIELD_OFFSET(DLGITEMTEMPLATE, cx, 12) - TEST_FIELD_SIZE (DLGITEMTEMPLATE, cy, 2) - TEST_FIELD_ALIGN (DLGITEMTEMPLATE, cy, 2) - TEST_FIELD_OFFSET(DLGITEMTEMPLATE, cy, 14) - TEST_FIELD_SIZE (DLGITEMTEMPLATE, id, 2) - TEST_FIELD_ALIGN (DLGITEMTEMPLATE, id, 2) - TEST_FIELD_OFFSET(DLGITEMTEMPLATE, id, 16) -} - -static void test_pack_DLGPROC(void) -{ - /* DLGPROC */ - TEST_TYPE_SIZE (DLGPROC, 4) - TEST_TYPE_ALIGN (DLGPROC, 4) -} - -static void test_pack_DLGTEMPLATE(void) -{ - /* DLGTEMPLATE (pack 2) */ - TEST_TYPE_SIZE (DLGTEMPLATE, 18) - TEST_TYPE_ALIGN (DLGTEMPLATE, 2) - TEST_FIELD_SIZE (DLGTEMPLATE, style, 4) - TEST_FIELD_ALIGN (DLGTEMPLATE, style, 2) - TEST_FIELD_OFFSET(DLGTEMPLATE, style, 0) - TEST_FIELD_SIZE (DLGTEMPLATE, dwExtendedStyle, 4) - TEST_FIELD_ALIGN (DLGTEMPLATE, dwExtendedStyle, 2) - TEST_FIELD_OFFSET(DLGTEMPLATE, dwExtendedStyle, 4) - TEST_FIELD_SIZE (DLGTEMPLATE, cdit, 2) - TEST_FIELD_ALIGN (DLGTEMPLATE, cdit, 2) - TEST_FIELD_OFFSET(DLGTEMPLATE, cdit, 8) - TEST_FIELD_SIZE (DLGTEMPLATE, x, 2) - TEST_FIELD_ALIGN (DLGTEMPLATE, x, 2) - TEST_FIELD_OFFSET(DLGTEMPLATE, x, 10) - TEST_FIELD_SIZE (DLGTEMPLATE, y, 2) - TEST_FIELD_ALIGN (DLGTEMPLATE, y, 2) - TEST_FIELD_OFFSET(DLGTEMPLATE, y, 12) - TEST_FIELD_SIZE (DLGTEMPLATE, cx, 2) - TEST_FIELD_ALIGN (DLGTEMPLATE, cx, 2) - TEST_FIELD_OFFSET(DLGTEMPLATE, cx, 14) - TEST_FIELD_SIZE (DLGTEMPLATE, cy, 2) - TEST_FIELD_ALIGN (DLGTEMPLATE, cy, 2) - TEST_FIELD_OFFSET(DLGTEMPLATE, cy, 16) -} - -static void test_pack_DRAWITEMSTRUCT(void) -{ - /* DRAWITEMSTRUCT */ - TEST_TYPE_SIZE (DRAWITEMSTRUCT, 48) - TEST_TYPE_ALIGN (DRAWITEMSTRUCT, 4) - TEST_FIELD_SIZE (DRAWITEMSTRUCT, CtlType, 4) - TEST_FIELD_ALIGN (DRAWITEMSTRUCT, CtlType, 4) - TEST_FIELD_OFFSET(DRAWITEMSTRUCT, CtlType, 0) - TEST_FIELD_SIZE (DRAWITEMSTRUCT, CtlID, 4) - TEST_FIELD_ALIGN (DRAWITEMSTRUCT, CtlID, 4) - TEST_FIELD_OFFSET(DRAWITEMSTRUCT, CtlID, 4) - TEST_FIELD_SIZE (DRAWITEMSTRUCT, itemID, 4) - TEST_FIELD_ALIGN (DRAWITEMSTRUCT, itemID, 4) - TEST_FIELD_OFFSET(DRAWITEMSTRUCT, itemID, 8) - TEST_FIELD_SIZE (DRAWITEMSTRUCT, itemAction, 4) - TEST_FIELD_ALIGN (DRAWITEMSTRUCT, itemAction, 4) - TEST_FIELD_OFFSET(DRAWITEMSTRUCT, itemAction, 12) - TEST_FIELD_SIZE (DRAWITEMSTRUCT, itemState, 4) - TEST_FIELD_ALIGN (DRAWITEMSTRUCT, itemState, 4) - TEST_FIELD_OFFSET(DRAWITEMSTRUCT, itemState, 16) - TEST_FIELD_SIZE (DRAWITEMSTRUCT, hwndItem, 4) - TEST_FIELD_ALIGN (DRAWITEMSTRUCT, hwndItem, 4) - TEST_FIELD_OFFSET(DRAWITEMSTRUCT, hwndItem, 20) - TEST_FIELD_SIZE (DRAWITEMSTRUCT, hDC, 4) - TEST_FIELD_ALIGN (DRAWITEMSTRUCT, hDC, 4) - TEST_FIELD_OFFSET(DRAWITEMSTRUCT, hDC, 24) - TEST_FIELD_SIZE (DRAWITEMSTRUCT, rcItem, 16) - TEST_FIELD_ALIGN (DRAWITEMSTRUCT, rcItem, 4) - TEST_FIELD_OFFSET(DRAWITEMSTRUCT, rcItem, 28) - TEST_FIELD_SIZE (DRAWITEMSTRUCT, itemData, 4) - TEST_FIELD_ALIGN (DRAWITEMSTRUCT, itemData, 4) - TEST_FIELD_OFFSET(DRAWITEMSTRUCT, itemData, 44) -} - -static void test_pack_DRAWSTATEPROC(void) -{ - /* DRAWSTATEPROC */ - TEST_TYPE_SIZE (DRAWSTATEPROC, 4) - TEST_TYPE_ALIGN (DRAWSTATEPROC, 4) -} - -static void test_pack_DRAWTEXTPARAMS(void) -{ - /* DRAWTEXTPARAMS */ - TEST_TYPE_SIZE (DRAWTEXTPARAMS, 20) - TEST_TYPE_ALIGN (DRAWTEXTPARAMS, 4) - TEST_FIELD_SIZE (DRAWTEXTPARAMS, cbSize, 4) - TEST_FIELD_ALIGN (DRAWTEXTPARAMS, cbSize, 4) - TEST_FIELD_OFFSET(DRAWTEXTPARAMS, cbSize, 0) - TEST_FIELD_SIZE (DRAWTEXTPARAMS, iTabLength, 4) - TEST_FIELD_ALIGN (DRAWTEXTPARAMS, iTabLength, 4) - TEST_FIELD_OFFSET(DRAWTEXTPARAMS, iTabLength, 4) - TEST_FIELD_SIZE (DRAWTEXTPARAMS, iLeftMargin, 4) - TEST_FIELD_ALIGN (DRAWTEXTPARAMS, iLeftMargin, 4) - TEST_FIELD_OFFSET(DRAWTEXTPARAMS, iLeftMargin, 8) - TEST_FIELD_SIZE (DRAWTEXTPARAMS, iRightMargin, 4) - TEST_FIELD_ALIGN (DRAWTEXTPARAMS, iRightMargin, 4) - TEST_FIELD_OFFSET(DRAWTEXTPARAMS, iRightMargin, 12) - TEST_FIELD_SIZE (DRAWTEXTPARAMS, uiLengthDrawn, 4) - TEST_FIELD_ALIGN (DRAWTEXTPARAMS, uiLengthDrawn, 4) - TEST_FIELD_OFFSET(DRAWTEXTPARAMS, uiLengthDrawn, 16) -} - -static void test_pack_EDITWORDBREAKPROCA(void) -{ - /* EDITWORDBREAKPROCA */ - TEST_TYPE_SIZE (EDITWORDBREAKPROCA, 4) - TEST_TYPE_ALIGN (EDITWORDBREAKPROCA, 4) -} - -static void test_pack_EDITWORDBREAKPROCW(void) -{ - /* EDITWORDBREAKPROCW */ - TEST_TYPE_SIZE (EDITWORDBREAKPROCW, 4) - TEST_TYPE_ALIGN (EDITWORDBREAKPROCW, 4) -} - -static void test_pack_EVENTMSG(void) -{ - /* EVENTMSG */ - TEST_TYPE_SIZE (EVENTMSG, 20) - TEST_TYPE_ALIGN (EVENTMSG, 4) - TEST_FIELD_SIZE (EVENTMSG, message, 4) - TEST_FIELD_ALIGN (EVENTMSG, message, 4) - TEST_FIELD_OFFSET(EVENTMSG, message, 0) - TEST_FIELD_SIZE (EVENTMSG, paramL, 4) - TEST_FIELD_ALIGN (EVENTMSG, paramL, 4) - TEST_FIELD_OFFSET(EVENTMSG, paramL, 4) - TEST_FIELD_SIZE (EVENTMSG, paramH, 4) - TEST_FIELD_ALIGN (EVENTMSG, paramH, 4) - TEST_FIELD_OFFSET(EVENTMSG, paramH, 8) - TEST_FIELD_SIZE (EVENTMSG, time, 4) - TEST_FIELD_ALIGN (EVENTMSG, time, 4) - TEST_FIELD_OFFSET(EVENTMSG, time, 12) - TEST_FIELD_SIZE (EVENTMSG, hwnd, 4) - TEST_FIELD_ALIGN (EVENTMSG, hwnd, 4) - TEST_FIELD_OFFSET(EVENTMSG, hwnd, 16) -} - -static void test_pack_FILTERKEYS(void) -{ - /* FILTERKEYS */ - TEST_TYPE_SIZE (FILTERKEYS, 24) - TEST_TYPE_ALIGN (FILTERKEYS, 4) - TEST_FIELD_SIZE (FILTERKEYS, cbSize, 4) - TEST_FIELD_ALIGN (FILTERKEYS, cbSize, 4) - TEST_FIELD_OFFSET(FILTERKEYS, cbSize, 0) - TEST_FIELD_SIZE (FILTERKEYS, dwFlags, 4) - TEST_FIELD_ALIGN (FILTERKEYS, dwFlags, 4) - TEST_FIELD_OFFSET(FILTERKEYS, dwFlags, 4) - TEST_FIELD_SIZE (FILTERKEYS, iWaitMSec, 4) - TEST_FIELD_ALIGN (FILTERKEYS, iWaitMSec, 4) - TEST_FIELD_OFFSET(FILTERKEYS, iWaitMSec, 8) - TEST_FIELD_SIZE (FILTERKEYS, iDelayMSec, 4) - TEST_FIELD_ALIGN (FILTERKEYS, iDelayMSec, 4) - TEST_FIELD_OFFSET(FILTERKEYS, iDelayMSec, 12) - TEST_FIELD_SIZE (FILTERKEYS, iRepeatMSec, 4) - TEST_FIELD_ALIGN (FILTERKEYS, iRepeatMSec, 4) - TEST_FIELD_OFFSET(FILTERKEYS, iRepeatMSec, 16) - TEST_FIELD_SIZE (FILTERKEYS, iBounceMSec, 4) - TEST_FIELD_ALIGN (FILTERKEYS, iBounceMSec, 4) - TEST_FIELD_OFFSET(FILTERKEYS, iBounceMSec, 20) -} - -static void test_pack_FLASHWINFO(void) -{ - /* FLASHWINFO */ - TEST_TYPE_SIZE (FLASHWINFO, 20) - TEST_TYPE_ALIGN (FLASHWINFO, 4) - TEST_FIELD_SIZE (FLASHWINFO, cbSize, 4) - TEST_FIELD_ALIGN (FLASHWINFO, cbSize, 4) - TEST_FIELD_OFFSET(FLASHWINFO, cbSize, 0) - TEST_FIELD_SIZE (FLASHWINFO, hwnd, 4) - TEST_FIELD_ALIGN (FLASHWINFO, hwnd, 4) - TEST_FIELD_OFFSET(FLASHWINFO, hwnd, 4) - TEST_FIELD_SIZE (FLASHWINFO, dwFlags, 4) - TEST_FIELD_ALIGN (FLASHWINFO, dwFlags, 4) - TEST_FIELD_OFFSET(FLASHWINFO, dwFlags, 8) - TEST_FIELD_SIZE (FLASHWINFO, uCount, 4) - TEST_FIELD_ALIGN (FLASHWINFO, uCount, 4) - TEST_FIELD_OFFSET(FLASHWINFO, uCount, 12) - TEST_FIELD_SIZE (FLASHWINFO, dwTimeout, 4) - TEST_FIELD_ALIGN (FLASHWINFO, dwTimeout, 4) - TEST_FIELD_OFFSET(FLASHWINFO, dwTimeout, 16) -} - -static void test_pack_GRAYSTRINGPROC(void) -{ - /* GRAYSTRINGPROC */ - TEST_TYPE_SIZE (GRAYSTRINGPROC, 4) - TEST_TYPE_ALIGN (GRAYSTRINGPROC, 4) -} - -static void test_pack_GUITHREADINFO(void) -{ - /* GUITHREADINFO */ - TEST_TYPE_SIZE (GUITHREADINFO, 48) - TEST_TYPE_ALIGN (GUITHREADINFO, 4) - TEST_FIELD_SIZE (GUITHREADINFO, cbSize, 4) - TEST_FIELD_ALIGN (GUITHREADINFO, cbSize, 4) - TEST_FIELD_OFFSET(GUITHREADINFO, cbSize, 0) - TEST_FIELD_SIZE (GUITHREADINFO, flags, 4) - TEST_FIELD_ALIGN (GUITHREADINFO, flags, 4) - TEST_FIELD_OFFSET(GUITHREADINFO, flags, 4) - TEST_FIELD_SIZE (GUITHREADINFO, hwndActive, 4) - TEST_FIELD_ALIGN (GUITHREADINFO, hwndActive, 4) - TEST_FIELD_OFFSET(GUITHREADINFO, hwndActive, 8) - TEST_FIELD_SIZE (GUITHREADINFO, hwndFocus, 4) - TEST_FIELD_ALIGN (GUITHREADINFO, hwndFocus, 4) - TEST_FIELD_OFFSET(GUITHREADINFO, hwndFocus, 12) - TEST_FIELD_SIZE (GUITHREADINFO, hwndCapture, 4) - TEST_FIELD_ALIGN (GUITHREADINFO, hwndCapture, 4) - TEST_FIELD_OFFSET(GUITHREADINFO, hwndCapture, 16) - TEST_FIELD_SIZE (GUITHREADINFO, hwndMenuOwner, 4) - TEST_FIELD_ALIGN (GUITHREADINFO, hwndMenuOwner, 4) - TEST_FIELD_OFFSET(GUITHREADINFO, hwndMenuOwner, 20) - TEST_FIELD_SIZE (GUITHREADINFO, hwndMoveSize, 4) - TEST_FIELD_ALIGN (GUITHREADINFO, hwndMoveSize, 4) - TEST_FIELD_OFFSET(GUITHREADINFO, hwndMoveSize, 24) - TEST_FIELD_SIZE (GUITHREADINFO, hwndCaret, 4) - TEST_FIELD_ALIGN (GUITHREADINFO, hwndCaret, 4) - TEST_FIELD_OFFSET(GUITHREADINFO, hwndCaret, 28) - TEST_FIELD_SIZE (GUITHREADINFO, rcCaret, 16) - TEST_FIELD_ALIGN (GUITHREADINFO, rcCaret, 4) - TEST_FIELD_OFFSET(GUITHREADINFO, rcCaret, 32) -} - -static void test_pack_HARDWAREHOOKSTRUCT(void) -{ - /* HARDWAREHOOKSTRUCT */ - TEST_TYPE_SIZE (HARDWAREHOOKSTRUCT, 16) - TEST_TYPE_ALIGN (HARDWAREHOOKSTRUCT, 4) - TEST_FIELD_SIZE (HARDWAREHOOKSTRUCT, hwnd, 4) - TEST_FIELD_ALIGN (HARDWAREHOOKSTRUCT, hwnd, 4) - TEST_FIELD_OFFSET(HARDWAREHOOKSTRUCT, hwnd, 0) - TEST_FIELD_SIZE (HARDWAREHOOKSTRUCT, message, 4) - TEST_FIELD_ALIGN (HARDWAREHOOKSTRUCT, message, 4) - TEST_FIELD_OFFSET(HARDWAREHOOKSTRUCT, message, 4) - TEST_FIELD_SIZE (HARDWAREHOOKSTRUCT, wParam, 4) - TEST_FIELD_ALIGN (HARDWAREHOOKSTRUCT, wParam, 4) - TEST_FIELD_OFFSET(HARDWAREHOOKSTRUCT, wParam, 8) - TEST_FIELD_SIZE (HARDWAREHOOKSTRUCT, lParam, 4) - TEST_FIELD_ALIGN (HARDWAREHOOKSTRUCT, lParam, 4) - TEST_FIELD_OFFSET(HARDWAREHOOKSTRUCT, lParam, 12) -} - -static void test_pack_HARDWAREINPUT(void) -{ - /* HARDWAREINPUT */ - TEST_TYPE_SIZE (HARDWAREINPUT, 8) - TEST_TYPE_ALIGN (HARDWAREINPUT, 4) - TEST_FIELD_SIZE (HARDWAREINPUT, uMsg, 4) - TEST_FIELD_ALIGN (HARDWAREINPUT, uMsg, 4) - TEST_FIELD_OFFSET(HARDWAREINPUT, uMsg, 0) - TEST_FIELD_SIZE (HARDWAREINPUT, wParamL, 2) - TEST_FIELD_ALIGN (HARDWAREINPUT, wParamL, 2) - TEST_FIELD_OFFSET(HARDWAREINPUT, wParamL, 4) - TEST_FIELD_SIZE (HARDWAREINPUT, wParamH, 2) - TEST_FIELD_ALIGN (HARDWAREINPUT, wParamH, 2) - TEST_FIELD_OFFSET(HARDWAREINPUT, wParamH, 6) -} - -static void test_pack_HDEVNOTIFY(void) -{ - /* HDEVNOTIFY */ - TEST_TYPE_SIZE (HDEVNOTIFY, 4) - TEST_TYPE_ALIGN (HDEVNOTIFY, 4) -} - -static void test_pack_HDWP(void) -{ - /* HDWP */ - TEST_TYPE_SIZE (HDWP, 4) - TEST_TYPE_ALIGN (HDWP, 4) -} - -static void test_pack_HELPINFO(void) -{ - /* HELPINFO */ - TEST_TYPE_SIZE (HELPINFO, 28) - TEST_TYPE_ALIGN (HELPINFO, 4) - TEST_FIELD_SIZE (HELPINFO, cbSize, 4) - TEST_FIELD_ALIGN (HELPINFO, cbSize, 4) - TEST_FIELD_OFFSET(HELPINFO, cbSize, 0) - TEST_FIELD_SIZE (HELPINFO, iContextType, 4) - TEST_FIELD_ALIGN (HELPINFO, iContextType, 4) - TEST_FIELD_OFFSET(HELPINFO, iContextType, 4) - TEST_FIELD_SIZE (HELPINFO, iCtrlId, 4) - TEST_FIELD_ALIGN (HELPINFO, iCtrlId, 4) - TEST_FIELD_OFFSET(HELPINFO, iCtrlId, 8) - TEST_FIELD_SIZE (HELPINFO, hItemHandle, 4) - TEST_FIELD_ALIGN (HELPINFO, hItemHandle, 4) - TEST_FIELD_OFFSET(HELPINFO, hItemHandle, 12) - TEST_FIELD_SIZE (HELPINFO, dwContextId, 4) - TEST_FIELD_ALIGN (HELPINFO, dwContextId, 4) - TEST_FIELD_OFFSET(HELPINFO, dwContextId, 16) - TEST_FIELD_SIZE (HELPINFO, MousePos, 8) - TEST_FIELD_ALIGN (HELPINFO, MousePos, 4) - TEST_FIELD_OFFSET(HELPINFO, MousePos, 20) -} - -static void test_pack_HELPWININFOA(void) -{ - /* HELPWININFOA */ - TEST_TYPE_SIZE (HELPWININFOA, 28) - TEST_TYPE_ALIGN (HELPWININFOA, 4) - TEST_FIELD_SIZE (HELPWININFOA, wStructSize, 4) - TEST_FIELD_ALIGN (HELPWININFOA, wStructSize, 4) - TEST_FIELD_OFFSET(HELPWININFOA, wStructSize, 0) - TEST_FIELD_SIZE (HELPWININFOA, x, 4) - TEST_FIELD_ALIGN (HELPWININFOA, x, 4) - TEST_FIELD_OFFSET(HELPWININFOA, x, 4) - TEST_FIELD_SIZE (HELPWININFOA, y, 4) - TEST_FIELD_ALIGN (HELPWININFOA, y, 4) - TEST_FIELD_OFFSET(HELPWININFOA, y, 8) - TEST_FIELD_SIZE (HELPWININFOA, dx, 4) - TEST_FIELD_ALIGN (HELPWININFOA, dx, 4) - TEST_FIELD_OFFSET(HELPWININFOA, dx, 12) - TEST_FIELD_SIZE (HELPWININFOA, dy, 4) - TEST_FIELD_ALIGN (HELPWININFOA, dy, 4) - TEST_FIELD_OFFSET(HELPWININFOA, dy, 16) - TEST_FIELD_SIZE (HELPWININFOA, wMax, 4) - TEST_FIELD_ALIGN (HELPWININFOA, wMax, 4) - TEST_FIELD_OFFSET(HELPWININFOA, wMax, 20) - TEST_FIELD_SIZE (HELPWININFOA, rgchMember, 2) - TEST_FIELD_ALIGN (HELPWININFOA, rgchMember, 1) - TEST_FIELD_OFFSET(HELPWININFOA, rgchMember, 24) -} - -static void test_pack_HELPWININFOW(void) -{ - /* HELPWININFOW */ - TEST_TYPE_SIZE (HELPWININFOW, 28) - TEST_TYPE_ALIGN (HELPWININFOW, 4) - TEST_FIELD_SIZE (HELPWININFOW, wStructSize, 4) - TEST_FIELD_ALIGN (HELPWININFOW, wStructSize, 4) - TEST_FIELD_OFFSET(HELPWININFOW, wStructSize, 0) - TEST_FIELD_SIZE (HELPWININFOW, x, 4) - TEST_FIELD_ALIGN (HELPWININFOW, x, 4) - TEST_FIELD_OFFSET(HELPWININFOW, x, 4) - TEST_FIELD_SIZE (HELPWININFOW, y, 4) - TEST_FIELD_ALIGN (HELPWININFOW, y, 4) - TEST_FIELD_OFFSET(HELPWININFOW, y, 8) - TEST_FIELD_SIZE (HELPWININFOW, dx, 4) - TEST_FIELD_ALIGN (HELPWININFOW, dx, 4) - TEST_FIELD_OFFSET(HELPWININFOW, dx, 12) - TEST_FIELD_SIZE (HELPWININFOW, dy, 4) - TEST_FIELD_ALIGN (HELPWININFOW, dy, 4) - TEST_FIELD_OFFSET(HELPWININFOW, dy, 16) - TEST_FIELD_SIZE (HELPWININFOW, wMax, 4) - TEST_FIELD_ALIGN (HELPWININFOW, wMax, 4) - TEST_FIELD_OFFSET(HELPWININFOW, wMax, 20) - TEST_FIELD_SIZE (HELPWININFOW, rgchMember, 4) - TEST_FIELD_ALIGN (HELPWININFOW, rgchMember, 2) - TEST_FIELD_OFFSET(HELPWININFOW, rgchMember, 24) -} - -static void test_pack_HIGHCONTRASTA(void) -{ - /* HIGHCONTRASTA */ - TEST_TYPE_SIZE (HIGHCONTRASTA, 12) - TEST_TYPE_ALIGN (HIGHCONTRASTA, 4) - TEST_FIELD_SIZE (HIGHCONTRASTA, cbSize, 4) - TEST_FIELD_ALIGN (HIGHCONTRASTA, cbSize, 4) - TEST_FIELD_OFFSET(HIGHCONTRASTA, cbSize, 0) - TEST_FIELD_SIZE (HIGHCONTRASTA, dwFlags, 4) - TEST_FIELD_ALIGN (HIGHCONTRASTA, dwFlags, 4) - TEST_FIELD_OFFSET(HIGHCONTRASTA, dwFlags, 4) - TEST_FIELD_SIZE (HIGHCONTRASTA, lpszDefaultScheme, 4) - TEST_FIELD_ALIGN (HIGHCONTRASTA, lpszDefaultScheme, 4) - TEST_FIELD_OFFSET(HIGHCONTRASTA, lpszDefaultScheme, 8) -} - -static void test_pack_HIGHCONTRASTW(void) -{ - /* HIGHCONTRASTW */ - TEST_TYPE_SIZE (HIGHCONTRASTW, 12) - TEST_TYPE_ALIGN (HIGHCONTRASTW, 4) - TEST_FIELD_SIZE (HIGHCONTRASTW, cbSize, 4) - TEST_FIELD_ALIGN (HIGHCONTRASTW, cbSize, 4) - TEST_FIELD_OFFSET(HIGHCONTRASTW, cbSize, 0) - TEST_FIELD_SIZE (HIGHCONTRASTW, dwFlags, 4) - TEST_FIELD_ALIGN (HIGHCONTRASTW, dwFlags, 4) - TEST_FIELD_OFFSET(HIGHCONTRASTW, dwFlags, 4) - TEST_FIELD_SIZE (HIGHCONTRASTW, lpszDefaultScheme, 4) - TEST_FIELD_ALIGN (HIGHCONTRASTW, lpszDefaultScheme, 4) - TEST_FIELD_OFFSET(HIGHCONTRASTW, lpszDefaultScheme, 8) -} - -static void test_pack_HOOKPROC(void) -{ - /* HOOKPROC */ - TEST_TYPE_SIZE (HOOKPROC, 4) - TEST_TYPE_ALIGN (HOOKPROC, 4) -} - -static void test_pack_ICONINFO(void) -{ - /* ICONINFO */ - TEST_TYPE_SIZE (ICONINFO, 20) - TEST_TYPE_ALIGN (ICONINFO, 4) - TEST_FIELD_SIZE (ICONINFO, fIcon, 4) - TEST_FIELD_ALIGN (ICONINFO, fIcon, 4) - TEST_FIELD_OFFSET(ICONINFO, fIcon, 0) - TEST_FIELD_SIZE (ICONINFO, xHotspot, 4) - TEST_FIELD_ALIGN (ICONINFO, xHotspot, 4) - TEST_FIELD_OFFSET(ICONINFO, xHotspot, 4) - TEST_FIELD_SIZE (ICONINFO, yHotspot, 4) - TEST_FIELD_ALIGN (ICONINFO, yHotspot, 4) - TEST_FIELD_OFFSET(ICONINFO, yHotspot, 8) - TEST_FIELD_SIZE (ICONINFO, hbmMask, 4) - TEST_FIELD_ALIGN (ICONINFO, hbmMask, 4) - TEST_FIELD_OFFSET(ICONINFO, hbmMask, 12) - TEST_FIELD_SIZE (ICONINFO, hbmColor, 4) - TEST_FIELD_ALIGN (ICONINFO, hbmColor, 4) - TEST_FIELD_OFFSET(ICONINFO, hbmColor, 16) -} - -static void test_pack_ICONMETRICSA(void) -{ - /* ICONMETRICSA */ - TEST_TYPE_SIZE (ICONMETRICSA, 76) - TEST_TYPE_ALIGN (ICONMETRICSA, 4) - TEST_FIELD_SIZE (ICONMETRICSA, cbSize, 4) - TEST_FIELD_ALIGN (ICONMETRICSA, cbSize, 4) - TEST_FIELD_OFFSET(ICONMETRICSA, cbSize, 0) - TEST_FIELD_SIZE (ICONMETRICSA, iHorzSpacing, 4) - TEST_FIELD_ALIGN (ICONMETRICSA, iHorzSpacing, 4) - TEST_FIELD_OFFSET(ICONMETRICSA, iHorzSpacing, 4) - TEST_FIELD_SIZE (ICONMETRICSA, iVertSpacing, 4) - TEST_FIELD_ALIGN (ICONMETRICSA, iVertSpacing, 4) - TEST_FIELD_OFFSET(ICONMETRICSA, iVertSpacing, 8) - TEST_FIELD_SIZE (ICONMETRICSA, iTitleWrap, 4) - TEST_FIELD_ALIGN (ICONMETRICSA, iTitleWrap, 4) - TEST_FIELD_OFFSET(ICONMETRICSA, iTitleWrap, 12) - TEST_FIELD_SIZE (ICONMETRICSA, lfFont, 60) - TEST_FIELD_ALIGN (ICONMETRICSA, lfFont, 4) - TEST_FIELD_OFFSET(ICONMETRICSA, lfFont, 16) -} - -static void test_pack_ICONMETRICSW(void) -{ - /* ICONMETRICSW */ - TEST_TYPE_SIZE (ICONMETRICSW, 108) - TEST_TYPE_ALIGN (ICONMETRICSW, 4) - TEST_FIELD_SIZE (ICONMETRICSW, cbSize, 4) - TEST_FIELD_ALIGN (ICONMETRICSW, cbSize, 4) - TEST_FIELD_OFFSET(ICONMETRICSW, cbSize, 0) - TEST_FIELD_SIZE (ICONMETRICSW, iHorzSpacing, 4) - TEST_FIELD_ALIGN (ICONMETRICSW, iHorzSpacing, 4) - TEST_FIELD_OFFSET(ICONMETRICSW, iHorzSpacing, 4) - TEST_FIELD_SIZE (ICONMETRICSW, iVertSpacing, 4) - TEST_FIELD_ALIGN (ICONMETRICSW, iVertSpacing, 4) - TEST_FIELD_OFFSET(ICONMETRICSW, iVertSpacing, 8) - TEST_FIELD_SIZE (ICONMETRICSW, iTitleWrap, 4) - TEST_FIELD_ALIGN (ICONMETRICSW, iTitleWrap, 4) - TEST_FIELD_OFFSET(ICONMETRICSW, iTitleWrap, 12) - TEST_FIELD_SIZE (ICONMETRICSW, lfFont, 92) - TEST_FIELD_ALIGN (ICONMETRICSW, lfFont, 4) - TEST_FIELD_OFFSET(ICONMETRICSW, lfFont, 16) -} - -static void test_pack_INPUT(void) -{ - /* INPUT */ - TEST_FIELD_SIZE (INPUT, type, 4) - TEST_FIELD_ALIGN (INPUT, type, 4) - TEST_FIELD_OFFSET(INPUT, type, 0) -} - -static void test_pack_KBDLLHOOKSTRUCT(void) -{ - /* KBDLLHOOKSTRUCT */ - TEST_TYPE_SIZE (KBDLLHOOKSTRUCT, 20) - TEST_TYPE_ALIGN (KBDLLHOOKSTRUCT, 4) - TEST_FIELD_SIZE (KBDLLHOOKSTRUCT, vkCode, 4) - TEST_FIELD_ALIGN (KBDLLHOOKSTRUCT, vkCode, 4) - TEST_FIELD_OFFSET(KBDLLHOOKSTRUCT, vkCode, 0) - TEST_FIELD_SIZE (KBDLLHOOKSTRUCT, scanCode, 4) - TEST_FIELD_ALIGN (KBDLLHOOKSTRUCT, scanCode, 4) - TEST_FIELD_OFFSET(KBDLLHOOKSTRUCT, scanCode, 4) - TEST_FIELD_SIZE (KBDLLHOOKSTRUCT, flags, 4) - TEST_FIELD_ALIGN (KBDLLHOOKSTRUCT, flags, 4) - TEST_FIELD_OFFSET(KBDLLHOOKSTRUCT, flags, 8) - TEST_FIELD_SIZE (KBDLLHOOKSTRUCT, time, 4) - TEST_FIELD_ALIGN (KBDLLHOOKSTRUCT, time, 4) - TEST_FIELD_OFFSET(KBDLLHOOKSTRUCT, time, 12) - TEST_FIELD_SIZE (KBDLLHOOKSTRUCT, dwExtraInfo, 4) - TEST_FIELD_ALIGN (KBDLLHOOKSTRUCT, dwExtraInfo, 4) - TEST_FIELD_OFFSET(KBDLLHOOKSTRUCT, dwExtraInfo, 16) -} - -static void test_pack_KEYBDINPUT(void) -{ - /* KEYBDINPUT */ - TEST_TYPE_SIZE (KEYBDINPUT, 16) - TEST_TYPE_ALIGN (KEYBDINPUT, 4) - TEST_FIELD_SIZE (KEYBDINPUT, wVk, 2) - TEST_FIELD_ALIGN (KEYBDINPUT, wVk, 2) - TEST_FIELD_OFFSET(KEYBDINPUT, wVk, 0) - TEST_FIELD_SIZE (KEYBDINPUT, wScan, 2) - TEST_FIELD_ALIGN (KEYBDINPUT, wScan, 2) - TEST_FIELD_OFFSET(KEYBDINPUT, wScan, 2) - TEST_FIELD_SIZE (KEYBDINPUT, dwFlags, 4) - TEST_FIELD_ALIGN (KEYBDINPUT, dwFlags, 4) - TEST_FIELD_OFFSET(KEYBDINPUT, dwFlags, 4) - TEST_FIELD_SIZE (KEYBDINPUT, time, 4) - TEST_FIELD_ALIGN (KEYBDINPUT, time, 4) - TEST_FIELD_OFFSET(KEYBDINPUT, time, 8) - TEST_FIELD_SIZE (KEYBDINPUT, dwExtraInfo, 4) - TEST_FIELD_ALIGN (KEYBDINPUT, dwExtraInfo, 4) - TEST_FIELD_OFFSET(KEYBDINPUT, dwExtraInfo, 12) -} - -static void test_pack_LPACCESSTIMEOUT(void) -{ - /* LPACCESSTIMEOUT */ - TEST_TYPE_SIZE (LPACCESSTIMEOUT, 4) - TEST_TYPE_ALIGN (LPACCESSTIMEOUT, 4) - TEST_TARGET_SIZE (LPACCESSTIMEOUT, 12) - TEST_TARGET_ALIGN(LPACCESSTIMEOUT, 4) -} - -static void test_pack_LPANIMATIONINFO(void) -{ - /* LPANIMATIONINFO */ - TEST_TYPE_SIZE (LPANIMATIONINFO, 4) - TEST_TYPE_ALIGN (LPANIMATIONINFO, 4) - TEST_TARGET_SIZE (LPANIMATIONINFO, 8) - TEST_TARGET_ALIGN(LPANIMATIONINFO, 4) -} - -static void test_pack_LPCBTACTIVATESTRUCT(void) -{ - /* LPCBTACTIVATESTRUCT */ - TEST_TYPE_SIZE (LPCBTACTIVATESTRUCT, 4) - TEST_TYPE_ALIGN (LPCBTACTIVATESTRUCT, 4) - TEST_TARGET_SIZE (LPCBTACTIVATESTRUCT, 8) - TEST_TARGET_ALIGN(LPCBTACTIVATESTRUCT, 4) -} - -static void test_pack_LPCBT_CREATEWNDA(void) -{ - /* LPCBT_CREATEWNDA */ - TEST_TYPE_SIZE (LPCBT_CREATEWNDA, 4) - TEST_TYPE_ALIGN (LPCBT_CREATEWNDA, 4) - TEST_TARGET_SIZE (LPCBT_CREATEWNDA, 8) - TEST_TARGET_ALIGN(LPCBT_CREATEWNDA, 4) -} - -static void test_pack_LPCBT_CREATEWNDW(void) -{ - /* LPCBT_CREATEWNDW */ - TEST_TYPE_SIZE (LPCBT_CREATEWNDW, 4) - TEST_TYPE_ALIGN (LPCBT_CREATEWNDW, 4) - TEST_TARGET_SIZE (LPCBT_CREATEWNDW, 8) - TEST_TARGET_ALIGN(LPCBT_CREATEWNDW, 4) -} - -static void test_pack_LPCDLGTEMPLATEA(void) -{ - /* LPCDLGTEMPLATEA */ - TEST_TYPE_SIZE (LPCDLGTEMPLATEA, 4) - TEST_TYPE_ALIGN (LPCDLGTEMPLATEA, 4) - TEST_TARGET_SIZE (LPCDLGTEMPLATEA, 18) - TEST_TARGET_ALIGN(LPCDLGTEMPLATEA, 2) -} - -static void test_pack_LPCDLGTEMPLATEW(void) -{ - /* LPCDLGTEMPLATEW */ - TEST_TYPE_SIZE (LPCDLGTEMPLATEW, 4) - TEST_TYPE_ALIGN (LPCDLGTEMPLATEW, 4) - TEST_TARGET_SIZE (LPCDLGTEMPLATEW, 18) - TEST_TARGET_ALIGN(LPCDLGTEMPLATEW, 2) -} - -static void test_pack_LPCLIENTCREATESTRUCT(void) -{ - /* LPCLIENTCREATESTRUCT */ - TEST_TYPE_SIZE (LPCLIENTCREATESTRUCT, 4) - TEST_TYPE_ALIGN (LPCLIENTCREATESTRUCT, 4) - TEST_TARGET_SIZE (LPCLIENTCREATESTRUCT, 8) - TEST_TARGET_ALIGN(LPCLIENTCREATESTRUCT, 4) -} - -static void test_pack_LPCMENUINFO(void) -{ - /* LPCMENUINFO */ - TEST_TYPE_SIZE (LPCMENUINFO, 4) - TEST_TYPE_ALIGN (LPCMENUINFO, 4) - TEST_TARGET_SIZE (LPCMENUINFO, 28) - TEST_TARGET_ALIGN(LPCMENUINFO, 4) -} - -static void test_pack_LPCMENUITEMINFOA(void) -{ - /* LPCMENUITEMINFOA */ - TEST_TYPE_SIZE (LPCMENUITEMINFOA, 4) - TEST_TYPE_ALIGN (LPCMENUITEMINFOA, 4) - TEST_TARGET_SIZE (LPCMENUITEMINFOA, 48) - TEST_TARGET_ALIGN(LPCMENUITEMINFOA, 4) -} - -static void test_pack_LPCMENUITEMINFOW(void) -{ - /* LPCMENUITEMINFOW */ - TEST_TYPE_SIZE (LPCMENUITEMINFOW, 4) - TEST_TYPE_ALIGN (LPCMENUITEMINFOW, 4) - TEST_TARGET_SIZE (LPCMENUITEMINFOW, 48) - TEST_TARGET_ALIGN(LPCMENUITEMINFOW, 4) -} - -static void test_pack_LPCOMBOBOXINFO(void) -{ - /* LPCOMBOBOXINFO */ - TEST_TYPE_SIZE (LPCOMBOBOXINFO, 4) - TEST_TYPE_ALIGN (LPCOMBOBOXINFO, 4) - TEST_TARGET_SIZE (LPCOMBOBOXINFO, 52) - TEST_TARGET_ALIGN(LPCOMBOBOXINFO, 4) -} - -static void test_pack_LPCOMPAREITEMSTRUCT(void) -{ - /* LPCOMPAREITEMSTRUCT */ - TEST_TYPE_SIZE (LPCOMPAREITEMSTRUCT, 4) - TEST_TYPE_ALIGN (LPCOMPAREITEMSTRUCT, 4) - TEST_TARGET_SIZE (LPCOMPAREITEMSTRUCT, 32) - TEST_TARGET_ALIGN(LPCOMPAREITEMSTRUCT, 4) -} - -static void test_pack_LPCREATESTRUCTA(void) -{ - /* LPCREATESTRUCTA */ - TEST_TYPE_SIZE (LPCREATESTRUCTA, 4) - TEST_TYPE_ALIGN (LPCREATESTRUCTA, 4) - TEST_TARGET_SIZE (LPCREATESTRUCTA, 48) - TEST_TARGET_ALIGN(LPCREATESTRUCTA, 4) -} - -static void test_pack_LPCREATESTRUCTW(void) -{ - /* LPCREATESTRUCTW */ - TEST_TYPE_SIZE (LPCREATESTRUCTW, 4) - TEST_TYPE_ALIGN (LPCREATESTRUCTW, 4) - TEST_TARGET_SIZE (LPCREATESTRUCTW, 48) - TEST_TARGET_ALIGN(LPCREATESTRUCTW, 4) -} - -static void test_pack_LPCSCROLLINFO(void) -{ - /* LPCSCROLLINFO */ - TEST_TYPE_SIZE (LPCSCROLLINFO, 4) - TEST_TYPE_ALIGN (LPCSCROLLINFO, 4) - TEST_TARGET_SIZE (LPCSCROLLINFO, 28) - TEST_TARGET_ALIGN(LPCSCROLLINFO, 4) -} - -static void test_pack_LPCURSORINFO(void) -{ - /* LPCURSORINFO */ - TEST_TYPE_SIZE (LPCURSORINFO, 4) - TEST_TYPE_ALIGN (LPCURSORINFO, 4) - TEST_TARGET_SIZE (LPCURSORINFO, 20) - TEST_TARGET_ALIGN(LPCURSORINFO, 4) -} - -static void test_pack_LPCWPRETSTRUCT(void) -{ - /* LPCWPRETSTRUCT */ - TEST_TYPE_SIZE (LPCWPRETSTRUCT, 4) - TEST_TYPE_ALIGN (LPCWPRETSTRUCT, 4) - TEST_TARGET_SIZE (LPCWPRETSTRUCT, 20) - TEST_TARGET_ALIGN(LPCWPRETSTRUCT, 4) -} - -static void test_pack_LPCWPSTRUCT(void) -{ - /* LPCWPSTRUCT */ - TEST_TYPE_SIZE (LPCWPSTRUCT, 4) - TEST_TYPE_ALIGN (LPCWPSTRUCT, 4) - TEST_TARGET_SIZE (LPCWPSTRUCT, 16) - TEST_TARGET_ALIGN(LPCWPSTRUCT, 4) -} - -static void test_pack_LPDEBUGHOOKINFO(void) -{ - /* LPDEBUGHOOKINFO */ - TEST_TYPE_SIZE (LPDEBUGHOOKINFO, 4) - TEST_TYPE_ALIGN (LPDEBUGHOOKINFO, 4) - TEST_TARGET_SIZE (LPDEBUGHOOKINFO, 20) - TEST_TARGET_ALIGN(LPDEBUGHOOKINFO, 4) -} - -static void test_pack_LPDELETEITEMSTRUCT(void) -{ - /* LPDELETEITEMSTRUCT */ - TEST_TYPE_SIZE (LPDELETEITEMSTRUCT, 4) - TEST_TYPE_ALIGN (LPDELETEITEMSTRUCT, 4) - TEST_TARGET_SIZE (LPDELETEITEMSTRUCT, 20) - TEST_TARGET_ALIGN(LPDELETEITEMSTRUCT, 4) -} - -static void test_pack_LPDLGITEMTEMPLATEA(void) -{ - /* LPDLGITEMTEMPLATEA */ - TEST_TYPE_SIZE (LPDLGITEMTEMPLATEA, 4) - TEST_TYPE_ALIGN (LPDLGITEMTEMPLATEA, 4) - TEST_TARGET_SIZE (LPDLGITEMTEMPLATEA, 18) - TEST_TARGET_ALIGN(LPDLGITEMTEMPLATEA, 2) -} - -static void test_pack_LPDLGITEMTEMPLATEW(void) -{ - /* LPDLGITEMTEMPLATEW */ - TEST_TYPE_SIZE (LPDLGITEMTEMPLATEW, 4) - TEST_TYPE_ALIGN (LPDLGITEMTEMPLATEW, 4) - TEST_TARGET_SIZE (LPDLGITEMTEMPLATEW, 18) - TEST_TARGET_ALIGN(LPDLGITEMTEMPLATEW, 2) -} - -static void test_pack_LPDLGTEMPLATEA(void) -{ - /* LPDLGTEMPLATEA */ - TEST_TYPE_SIZE (LPDLGTEMPLATEA, 4) - TEST_TYPE_ALIGN (LPDLGTEMPLATEA, 4) - TEST_TARGET_SIZE (LPDLGTEMPLATEA, 18) - TEST_TARGET_ALIGN(LPDLGTEMPLATEA, 2) -} - -static void test_pack_LPDLGTEMPLATEW(void) -{ - /* LPDLGTEMPLATEW */ - TEST_TYPE_SIZE (LPDLGTEMPLATEW, 4) - TEST_TYPE_ALIGN (LPDLGTEMPLATEW, 4) - TEST_TARGET_SIZE (LPDLGTEMPLATEW, 18) - TEST_TARGET_ALIGN(LPDLGTEMPLATEW, 2) -} - -static void test_pack_LPDRAWITEMSTRUCT(void) -{ - /* LPDRAWITEMSTRUCT */ - TEST_TYPE_SIZE (LPDRAWITEMSTRUCT, 4) - TEST_TYPE_ALIGN (LPDRAWITEMSTRUCT, 4) - TEST_TARGET_SIZE (LPDRAWITEMSTRUCT, 48) - TEST_TARGET_ALIGN(LPDRAWITEMSTRUCT, 4) -} - -static void test_pack_LPDRAWTEXTPARAMS(void) -{ - /* LPDRAWTEXTPARAMS */ - TEST_TYPE_SIZE (LPDRAWTEXTPARAMS, 4) - TEST_TYPE_ALIGN (LPDRAWTEXTPARAMS, 4) - TEST_TARGET_SIZE (LPDRAWTEXTPARAMS, 20) - TEST_TARGET_ALIGN(LPDRAWTEXTPARAMS, 4) -} - -static void test_pack_LPEVENTMSG(void) -{ - /* LPEVENTMSG */ - TEST_TYPE_SIZE (LPEVENTMSG, 4) - TEST_TYPE_ALIGN (LPEVENTMSG, 4) - TEST_TARGET_SIZE (LPEVENTMSG, 20) - TEST_TARGET_ALIGN(LPEVENTMSG, 4) -} - -static void test_pack_LPFILTERKEYS(void) -{ - /* LPFILTERKEYS */ - TEST_TYPE_SIZE (LPFILTERKEYS, 4) - TEST_TYPE_ALIGN (LPFILTERKEYS, 4) - TEST_TARGET_SIZE (LPFILTERKEYS, 24) - TEST_TARGET_ALIGN(LPFILTERKEYS, 4) -} - -static void test_pack_LPGUITHREADINFO(void) -{ - /* LPGUITHREADINFO */ - TEST_TYPE_SIZE (LPGUITHREADINFO, 4) - TEST_TYPE_ALIGN (LPGUITHREADINFO, 4) - TEST_TARGET_SIZE (LPGUITHREADINFO, 48) - TEST_TARGET_ALIGN(LPGUITHREADINFO, 4) -} - -static void test_pack_LPHARDWAREHOOKSTRUCT(void) -{ - /* LPHARDWAREHOOKSTRUCT */ - TEST_TYPE_SIZE (LPHARDWAREHOOKSTRUCT, 4) - TEST_TYPE_ALIGN (LPHARDWAREHOOKSTRUCT, 4) - TEST_TARGET_SIZE (LPHARDWAREHOOKSTRUCT, 16) - TEST_TARGET_ALIGN(LPHARDWAREHOOKSTRUCT, 4) -} - -static void test_pack_LPHARDWAREINPUT(void) -{ - /* LPHARDWAREINPUT */ - TEST_TYPE_SIZE (LPHARDWAREINPUT, 4) - TEST_TYPE_ALIGN (LPHARDWAREINPUT, 4) - TEST_TARGET_SIZE (LPHARDWAREINPUT, 8) - TEST_TARGET_ALIGN(LPHARDWAREINPUT, 4) -} - -static void test_pack_LPHELPINFO(void) -{ - /* LPHELPINFO */ - TEST_TYPE_SIZE (LPHELPINFO, 4) - TEST_TYPE_ALIGN (LPHELPINFO, 4) - TEST_TARGET_SIZE (LPHELPINFO, 28) - TEST_TARGET_ALIGN(LPHELPINFO, 4) -} - -static void test_pack_LPHELPWININFOA(void) -{ - /* LPHELPWININFOA */ - TEST_TYPE_SIZE (LPHELPWININFOA, 4) - TEST_TYPE_ALIGN (LPHELPWININFOA, 4) - TEST_TARGET_SIZE (LPHELPWININFOA, 28) - TEST_TARGET_ALIGN(LPHELPWININFOA, 4) -} - -static void test_pack_LPHELPWININFOW(void) -{ - /* LPHELPWININFOW */ - TEST_TYPE_SIZE (LPHELPWININFOW, 4) - TEST_TYPE_ALIGN (LPHELPWININFOW, 4) - TEST_TARGET_SIZE (LPHELPWININFOW, 28) - TEST_TARGET_ALIGN(LPHELPWININFOW, 4) -} - -static void test_pack_LPHIGHCONTRASTA(void) -{ - /* LPHIGHCONTRASTA */ - TEST_TYPE_SIZE (LPHIGHCONTRASTA, 4) - TEST_TYPE_ALIGN (LPHIGHCONTRASTA, 4) - TEST_TARGET_SIZE (LPHIGHCONTRASTA, 12) - TEST_TARGET_ALIGN(LPHIGHCONTRASTA, 4) -} - -static void test_pack_LPHIGHCONTRASTW(void) -{ - /* LPHIGHCONTRASTW */ - TEST_TYPE_SIZE (LPHIGHCONTRASTW, 4) - TEST_TYPE_ALIGN (LPHIGHCONTRASTW, 4) - TEST_TARGET_SIZE (LPHIGHCONTRASTW, 12) - TEST_TARGET_ALIGN(LPHIGHCONTRASTW, 4) -} - -static void test_pack_LPICONMETRICSA(void) -{ - /* LPICONMETRICSA */ - TEST_TYPE_SIZE (LPICONMETRICSA, 4) - TEST_TYPE_ALIGN (LPICONMETRICSA, 4) - TEST_TARGET_SIZE (LPICONMETRICSA, 76) - TEST_TARGET_ALIGN(LPICONMETRICSA, 4) -} - -static void test_pack_LPICONMETRICSW(void) -{ - /* LPICONMETRICSW */ - TEST_TYPE_SIZE (LPICONMETRICSW, 4) - TEST_TYPE_ALIGN (LPICONMETRICSW, 4) - TEST_TARGET_SIZE (LPICONMETRICSW, 108) - TEST_TARGET_ALIGN(LPICONMETRICSW, 4) -} - -static void test_pack_LPINPUT(void) -{ - /* LPINPUT */ - TEST_TYPE_SIZE (LPINPUT, 4) - TEST_TYPE_ALIGN (LPINPUT, 4) -} - -static void test_pack_LPKBDLLHOOKSTRUCT(void) -{ - /* LPKBDLLHOOKSTRUCT */ - TEST_TYPE_SIZE (LPKBDLLHOOKSTRUCT, 4) - TEST_TYPE_ALIGN (LPKBDLLHOOKSTRUCT, 4) - TEST_TARGET_SIZE (LPKBDLLHOOKSTRUCT, 20) - TEST_TARGET_ALIGN(LPKBDLLHOOKSTRUCT, 4) -} - -static void test_pack_LPKEYBDINPUT(void) -{ - /* LPKEYBDINPUT */ - TEST_TYPE_SIZE (LPKEYBDINPUT, 4) - TEST_TYPE_ALIGN (LPKEYBDINPUT, 4) - TEST_TARGET_SIZE (LPKEYBDINPUT, 16) - TEST_TARGET_ALIGN(LPKEYBDINPUT, 4) -} - -static void test_pack_LPMDICREATESTRUCTA(void) -{ - /* LPMDICREATESTRUCTA */ - TEST_TYPE_SIZE (LPMDICREATESTRUCTA, 4) - TEST_TYPE_ALIGN (LPMDICREATESTRUCTA, 4) - TEST_TARGET_SIZE (LPMDICREATESTRUCTA, 36) - TEST_TARGET_ALIGN(LPMDICREATESTRUCTA, 4) -} - -static void test_pack_LPMDICREATESTRUCTW(void) -{ - /* LPMDICREATESTRUCTW */ - TEST_TYPE_SIZE (LPMDICREATESTRUCTW, 4) - TEST_TYPE_ALIGN (LPMDICREATESTRUCTW, 4) - TEST_TARGET_SIZE (LPMDICREATESTRUCTW, 36) - TEST_TARGET_ALIGN(LPMDICREATESTRUCTW, 4) -} - -static void test_pack_LPMDINEXTMENU(void) -{ - /* LPMDINEXTMENU */ - TEST_TYPE_SIZE (LPMDINEXTMENU, 4) - TEST_TYPE_ALIGN (LPMDINEXTMENU, 4) - TEST_TARGET_SIZE (LPMDINEXTMENU, 12) - TEST_TARGET_ALIGN(LPMDINEXTMENU, 4) -} - -static void test_pack_LPMEASUREITEMSTRUCT(void) -{ - /* LPMEASUREITEMSTRUCT */ - TEST_TYPE_SIZE (LPMEASUREITEMSTRUCT, 4) - TEST_TYPE_ALIGN (LPMEASUREITEMSTRUCT, 4) - TEST_TARGET_SIZE (LPMEASUREITEMSTRUCT, 24) - TEST_TARGET_ALIGN(LPMEASUREITEMSTRUCT, 4) -} - -static void test_pack_LPMENUINFO(void) -{ - /* LPMENUINFO */ - TEST_TYPE_SIZE (LPMENUINFO, 4) - TEST_TYPE_ALIGN (LPMENUINFO, 4) - TEST_TARGET_SIZE (LPMENUINFO, 28) - TEST_TARGET_ALIGN(LPMENUINFO, 4) -} - -static void test_pack_LPMENUITEMINFOA(void) -{ - /* LPMENUITEMINFOA */ - TEST_TYPE_SIZE (LPMENUITEMINFOA, 4) - TEST_TYPE_ALIGN (LPMENUITEMINFOA, 4) - TEST_TARGET_SIZE (LPMENUITEMINFOA, 48) - TEST_TARGET_ALIGN(LPMENUITEMINFOA, 4) -} - -static void test_pack_LPMENUITEMINFOW(void) -{ - /* LPMENUITEMINFOW */ - TEST_TYPE_SIZE (LPMENUITEMINFOW, 4) - TEST_TYPE_ALIGN (LPMENUITEMINFOW, 4) - TEST_TARGET_SIZE (LPMENUITEMINFOW, 48) - TEST_TARGET_ALIGN(LPMENUITEMINFOW, 4) -} - -static void test_pack_LPMINIMIZEDMETRICS(void) -{ - /* LPMINIMIZEDMETRICS */ - TEST_TYPE_SIZE (LPMINIMIZEDMETRICS, 4) - TEST_TYPE_ALIGN (LPMINIMIZEDMETRICS, 4) - TEST_TARGET_SIZE (LPMINIMIZEDMETRICS, 20) - TEST_TARGET_ALIGN(LPMINIMIZEDMETRICS, 4) -} - -static void test_pack_LPMINMAXINFO(void) -{ - /* LPMINMAXINFO */ - TEST_TYPE_SIZE (LPMINMAXINFO, 4) - TEST_TYPE_ALIGN (LPMINMAXINFO, 4) - TEST_TARGET_SIZE (LPMINMAXINFO, 40) - TEST_TARGET_ALIGN(LPMINMAXINFO, 4) -} - -static void test_pack_LPMONITORINFO(void) -{ - /* LPMONITORINFO */ - TEST_TYPE_SIZE (LPMONITORINFO, 4) - TEST_TYPE_ALIGN (LPMONITORINFO, 4) - TEST_TARGET_SIZE (LPMONITORINFO, 40) - TEST_TARGET_ALIGN(LPMONITORINFO, 4) -} - -static void test_pack_LPMONITORINFOEXA(void) -{ - /* LPMONITORINFOEXA */ - TEST_TYPE_SIZE (LPMONITORINFOEXA, 4) - TEST_TYPE_ALIGN (LPMONITORINFOEXA, 4) - TEST_TARGET_SIZE (LPMONITORINFOEXA, 72) - TEST_TARGET_ALIGN(LPMONITORINFOEXA, 4) -} - -static void test_pack_LPMONITORINFOEXW(void) -{ - /* LPMONITORINFOEXW */ - TEST_TYPE_SIZE (LPMONITORINFOEXW, 4) - TEST_TYPE_ALIGN (LPMONITORINFOEXW, 4) - TEST_TARGET_SIZE (LPMONITORINFOEXW, 104) - TEST_TARGET_ALIGN(LPMONITORINFOEXW, 4) -} - -static void test_pack_LPMOUSEHOOKSTRUCT(void) -{ - /* LPMOUSEHOOKSTRUCT */ - TEST_TYPE_SIZE (LPMOUSEHOOKSTRUCT, 4) - TEST_TYPE_ALIGN (LPMOUSEHOOKSTRUCT, 4) - TEST_TARGET_SIZE (LPMOUSEHOOKSTRUCT, 20) - TEST_TARGET_ALIGN(LPMOUSEHOOKSTRUCT, 4) -} - -static void test_pack_LPMOUSEINPUT(void) -{ - /* LPMOUSEINPUT */ - TEST_TYPE_SIZE (LPMOUSEINPUT, 4) - TEST_TYPE_ALIGN (LPMOUSEINPUT, 4) - TEST_TARGET_SIZE (LPMOUSEINPUT, 24) - TEST_TARGET_ALIGN(LPMOUSEINPUT, 4) -} - -static void test_pack_LPMOUSEKEYS(void) -{ - /* LPMOUSEKEYS */ - TEST_TYPE_SIZE (LPMOUSEKEYS, 4) - TEST_TYPE_ALIGN (LPMOUSEKEYS, 4) - TEST_TARGET_SIZE (LPMOUSEKEYS, 28) - TEST_TARGET_ALIGN(LPMOUSEKEYS, 4) -} - -static void test_pack_LPMSG(void) -{ - /* LPMSG */ - TEST_TYPE_SIZE (LPMSG, 4) - TEST_TYPE_ALIGN (LPMSG, 4) - TEST_TARGET_SIZE (LPMSG, 28) - TEST_TARGET_ALIGN(LPMSG, 4) -} - -static void test_pack_LPMSGBOXPARAMSA(void) -{ - /* LPMSGBOXPARAMSA */ - TEST_TYPE_SIZE (LPMSGBOXPARAMSA, 4) - TEST_TYPE_ALIGN (LPMSGBOXPARAMSA, 4) - TEST_TARGET_SIZE (LPMSGBOXPARAMSA, 40) - TEST_TARGET_ALIGN(LPMSGBOXPARAMSA, 4) -} - -static void test_pack_LPMSGBOXPARAMSW(void) -{ - /* LPMSGBOXPARAMSW */ - TEST_TYPE_SIZE (LPMSGBOXPARAMSW, 4) - TEST_TYPE_ALIGN (LPMSGBOXPARAMSW, 4) - TEST_TARGET_SIZE (LPMSGBOXPARAMSW, 40) - TEST_TARGET_ALIGN(LPMSGBOXPARAMSW, 4) -} - -static void test_pack_LPMSLLHOOKSTRUCT(void) -{ - /* LPMSLLHOOKSTRUCT */ - TEST_TYPE_SIZE (LPMSLLHOOKSTRUCT, 4) - TEST_TYPE_ALIGN (LPMSLLHOOKSTRUCT, 4) - TEST_TARGET_SIZE (LPMSLLHOOKSTRUCT, 24) - TEST_TARGET_ALIGN(LPMSLLHOOKSTRUCT, 4) -} - -static void test_pack_LPMULTIKEYHELPA(void) -{ - /* LPMULTIKEYHELPA */ - TEST_TYPE_SIZE (LPMULTIKEYHELPA, 4) - TEST_TYPE_ALIGN (LPMULTIKEYHELPA, 4) - TEST_TARGET_SIZE (LPMULTIKEYHELPA, 8) - TEST_TARGET_ALIGN(LPMULTIKEYHELPA, 4) -} - -static void test_pack_LPMULTIKEYHELPW(void) -{ - /* LPMULTIKEYHELPW */ - TEST_TYPE_SIZE (LPMULTIKEYHELPW, 4) - TEST_TYPE_ALIGN (LPMULTIKEYHELPW, 4) - TEST_TARGET_SIZE (LPMULTIKEYHELPW, 8) - TEST_TARGET_ALIGN(LPMULTIKEYHELPW, 4) -} - -static void test_pack_LPNCCALCSIZE_PARAMS(void) -{ - /* LPNCCALCSIZE_PARAMS */ - TEST_TYPE_SIZE (LPNCCALCSIZE_PARAMS, 4) - TEST_TYPE_ALIGN (LPNCCALCSIZE_PARAMS, 4) - TEST_TARGET_SIZE (LPNCCALCSIZE_PARAMS, 52) - TEST_TARGET_ALIGN(LPNCCALCSIZE_PARAMS, 4) -} - -static void test_pack_LPNMHDR(void) -{ - /* LPNMHDR */ - TEST_TYPE_SIZE (LPNMHDR, 4) - TEST_TYPE_ALIGN (LPNMHDR, 4) - TEST_TARGET_SIZE (LPNMHDR, 12) - TEST_TARGET_ALIGN(LPNMHDR, 4) -} - -static void test_pack_LPNONCLIENTMETRICSA(void) -{ - /* LPNONCLIENTMETRICSA */ - TEST_TYPE_SIZE (LPNONCLIENTMETRICSA, 4) - TEST_TYPE_ALIGN (LPNONCLIENTMETRICSA, 4) - TEST_TARGET_SIZE (LPNONCLIENTMETRICSA, 340) - TEST_TARGET_ALIGN(LPNONCLIENTMETRICSA, 4) -} - -static void test_pack_LPNONCLIENTMETRICSW(void) -{ - /* LPNONCLIENTMETRICSW */ - TEST_TYPE_SIZE (LPNONCLIENTMETRICSW, 4) - TEST_TYPE_ALIGN (LPNONCLIENTMETRICSW, 4) - TEST_TARGET_SIZE (LPNONCLIENTMETRICSW, 500) - TEST_TARGET_ALIGN(LPNONCLIENTMETRICSW, 4) -} - -static void test_pack_LPPAINTSTRUCT(void) -{ - /* LPPAINTSTRUCT */ - TEST_TYPE_SIZE (LPPAINTSTRUCT, 4) - TEST_TYPE_ALIGN (LPPAINTSTRUCT, 4) - TEST_TARGET_SIZE (LPPAINTSTRUCT, 64) - TEST_TARGET_ALIGN(LPPAINTSTRUCT, 4) -} - -static void test_pack_LPSCROLLINFO(void) -{ - /* LPSCROLLINFO */ - TEST_TYPE_SIZE (LPSCROLLINFO, 4) - TEST_TYPE_ALIGN (LPSCROLLINFO, 4) - TEST_TARGET_SIZE (LPSCROLLINFO, 28) - TEST_TARGET_ALIGN(LPSCROLLINFO, 4) -} - -static void test_pack_LPSERIALKEYSA(void) -{ - /* LPSERIALKEYSA */ - TEST_TYPE_SIZE (LPSERIALKEYSA, 4) - TEST_TYPE_ALIGN (LPSERIALKEYSA, 4) - TEST_TARGET_SIZE (LPSERIALKEYSA, 28) - TEST_TARGET_ALIGN(LPSERIALKEYSA, 4) -} - -static void test_pack_LPSERIALKEYSW(void) -{ - /* LPSERIALKEYSW */ - TEST_TYPE_SIZE (LPSERIALKEYSW, 4) - TEST_TYPE_ALIGN (LPSERIALKEYSW, 4) - TEST_TARGET_SIZE (LPSERIALKEYSW, 28) - TEST_TARGET_ALIGN(LPSERIALKEYSW, 4) -} - -static void test_pack_LPSOUNDSENTRYA(void) -{ - /* LPSOUNDSENTRYA */ - TEST_TYPE_SIZE (LPSOUNDSENTRYA, 4) - TEST_TYPE_ALIGN (LPSOUNDSENTRYA, 4) - TEST_TARGET_SIZE (LPSOUNDSENTRYA, 48) - TEST_TARGET_ALIGN(LPSOUNDSENTRYA, 4) -} - -static void test_pack_LPSOUNDSENTRYW(void) -{ - /* LPSOUNDSENTRYW */ - TEST_TYPE_SIZE (LPSOUNDSENTRYW, 4) - TEST_TYPE_ALIGN (LPSOUNDSENTRYW, 4) - TEST_TARGET_SIZE (LPSOUNDSENTRYW, 48) - TEST_TARGET_ALIGN(LPSOUNDSENTRYW, 4) -} - -static void test_pack_LPSTICKYKEYS(void) -{ - /* LPSTICKYKEYS */ - TEST_TYPE_SIZE (LPSTICKYKEYS, 4) - TEST_TYPE_ALIGN (LPSTICKYKEYS, 4) - TEST_TARGET_SIZE (LPSTICKYKEYS, 8) - TEST_TARGET_ALIGN(LPSTICKYKEYS, 4) -} - -static void test_pack_LPSTYLESTRUCT(void) -{ - /* LPSTYLESTRUCT */ - TEST_TYPE_SIZE (LPSTYLESTRUCT, 4) - TEST_TYPE_ALIGN (LPSTYLESTRUCT, 4) - TEST_TARGET_SIZE (LPSTYLESTRUCT, 8) - TEST_TARGET_ALIGN(LPSTYLESTRUCT, 4) -} - -static void test_pack_LPTITLEBARINFO(void) -{ - /* LPTITLEBARINFO */ - TEST_TYPE_SIZE (LPTITLEBARINFO, 4) - TEST_TYPE_ALIGN (LPTITLEBARINFO, 4) - TEST_TARGET_SIZE (LPTITLEBARINFO, 44) - TEST_TARGET_ALIGN(LPTITLEBARINFO, 4) -} - -static void test_pack_LPTOGGLEKEYS(void) -{ - /* LPTOGGLEKEYS */ - TEST_TYPE_SIZE (LPTOGGLEKEYS, 4) - TEST_TYPE_ALIGN (LPTOGGLEKEYS, 4) - TEST_TARGET_SIZE (LPTOGGLEKEYS, 8) - TEST_TARGET_ALIGN(LPTOGGLEKEYS, 4) -} - -static void test_pack_LPTPMPARAMS(void) -{ - /* LPTPMPARAMS */ - TEST_TYPE_SIZE (LPTPMPARAMS, 4) - TEST_TYPE_ALIGN (LPTPMPARAMS, 4) - TEST_TARGET_SIZE (LPTPMPARAMS, 20) - TEST_TARGET_ALIGN(LPTPMPARAMS, 4) -} - -static void test_pack_LPTRACKMOUSEEVENT(void) -{ - /* LPTRACKMOUSEEVENT */ - TEST_TYPE_SIZE (LPTRACKMOUSEEVENT, 4) - TEST_TYPE_ALIGN (LPTRACKMOUSEEVENT, 4) - TEST_TARGET_SIZE (LPTRACKMOUSEEVENT, 16) - TEST_TARGET_ALIGN(LPTRACKMOUSEEVENT, 4) -} - -static void test_pack_LPWINDOWINFO(void) -{ - /* LPWINDOWINFO */ - TEST_TYPE_SIZE (LPWINDOWINFO, 4) - TEST_TYPE_ALIGN (LPWINDOWINFO, 4) - TEST_TARGET_SIZE (LPWINDOWINFO, 60) - TEST_TARGET_ALIGN(LPWINDOWINFO, 4) -} - -static void test_pack_LPWINDOWPLACEMENT(void) -{ - /* LPWINDOWPLACEMENT */ - TEST_TYPE_SIZE (LPWINDOWPLACEMENT, 4) - TEST_TYPE_ALIGN (LPWINDOWPLACEMENT, 4) - TEST_TARGET_SIZE (LPWINDOWPLACEMENT, 44) - TEST_TARGET_ALIGN(LPWINDOWPLACEMENT, 4) -} - -static void test_pack_LPWINDOWPOS(void) -{ - /* LPWINDOWPOS */ - TEST_TYPE_SIZE (LPWINDOWPOS, 4) - TEST_TYPE_ALIGN (LPWINDOWPOS, 4) - TEST_TARGET_SIZE (LPWINDOWPOS, 28) - TEST_TARGET_ALIGN(LPWINDOWPOS, 4) -} - -static void test_pack_LPWNDCLASSA(void) -{ - /* LPWNDCLASSA */ - TEST_TYPE_SIZE (LPWNDCLASSA, 4) - TEST_TYPE_ALIGN (LPWNDCLASSA, 4) - TEST_TARGET_SIZE (LPWNDCLASSA, 40) - TEST_TARGET_ALIGN(LPWNDCLASSA, 4) -} - -static void test_pack_LPWNDCLASSEXA(void) -{ - /* LPWNDCLASSEXA */ - TEST_TYPE_SIZE (LPWNDCLASSEXA, 4) - TEST_TYPE_ALIGN (LPWNDCLASSEXA, 4) - TEST_TARGET_SIZE (LPWNDCLASSEXA, 48) - TEST_TARGET_ALIGN(LPWNDCLASSEXA, 4) -} - -static void test_pack_LPWNDCLASSEXW(void) -{ - /* LPWNDCLASSEXW */ - TEST_TYPE_SIZE (LPWNDCLASSEXW, 4) - TEST_TYPE_ALIGN (LPWNDCLASSEXW, 4) - TEST_TARGET_SIZE (LPWNDCLASSEXW, 48) - TEST_TARGET_ALIGN(LPWNDCLASSEXW, 4) -} - -static void test_pack_LPWNDCLASSW(void) -{ - /* LPWNDCLASSW */ - TEST_TYPE_SIZE (LPWNDCLASSW, 4) - TEST_TYPE_ALIGN (LPWNDCLASSW, 4) - TEST_TARGET_SIZE (LPWNDCLASSW, 40) - TEST_TARGET_ALIGN(LPWNDCLASSW, 4) -} - -static void test_pack_MDICREATESTRUCTA(void) -{ - /* MDICREATESTRUCTA */ - TEST_TYPE_SIZE (MDICREATESTRUCTA, 36) - TEST_TYPE_ALIGN (MDICREATESTRUCTA, 4) - TEST_FIELD_SIZE (MDICREATESTRUCTA, szClass, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTA, szClass, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTA, szClass, 0) - TEST_FIELD_SIZE (MDICREATESTRUCTA, szTitle, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTA, szTitle, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTA, szTitle, 4) - TEST_FIELD_SIZE (MDICREATESTRUCTA, hOwner, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTA, hOwner, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTA, hOwner, 8) - TEST_FIELD_SIZE (MDICREATESTRUCTA, x, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTA, x, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTA, x, 12) - TEST_FIELD_SIZE (MDICREATESTRUCTA, y, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTA, y, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTA, y, 16) - TEST_FIELD_SIZE (MDICREATESTRUCTA, cx, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTA, cx, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTA, cx, 20) - TEST_FIELD_SIZE (MDICREATESTRUCTA, cy, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTA, cy, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTA, cy, 24) - TEST_FIELD_SIZE (MDICREATESTRUCTA, style, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTA, style, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTA, style, 28) - TEST_FIELD_SIZE (MDICREATESTRUCTA, lParam, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTA, lParam, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTA, lParam, 32) -} - -static void test_pack_MDICREATESTRUCTW(void) -{ - /* MDICREATESTRUCTW */ - TEST_TYPE_SIZE (MDICREATESTRUCTW, 36) - TEST_TYPE_ALIGN (MDICREATESTRUCTW, 4) - TEST_FIELD_SIZE (MDICREATESTRUCTW, szClass, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTW, szClass, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTW, szClass, 0) - TEST_FIELD_SIZE (MDICREATESTRUCTW, szTitle, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTW, szTitle, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTW, szTitle, 4) - TEST_FIELD_SIZE (MDICREATESTRUCTW, hOwner, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTW, hOwner, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTW, hOwner, 8) - TEST_FIELD_SIZE (MDICREATESTRUCTW, x, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTW, x, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTW, x, 12) - TEST_FIELD_SIZE (MDICREATESTRUCTW, y, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTW, y, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTW, y, 16) - TEST_FIELD_SIZE (MDICREATESTRUCTW, cx, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTW, cx, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTW, cx, 20) - TEST_FIELD_SIZE (MDICREATESTRUCTW, cy, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTW, cy, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTW, cy, 24) - TEST_FIELD_SIZE (MDICREATESTRUCTW, style, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTW, style, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTW, style, 28) - TEST_FIELD_SIZE (MDICREATESTRUCTW, lParam, 4) - TEST_FIELD_ALIGN (MDICREATESTRUCTW, lParam, 4) - TEST_FIELD_OFFSET(MDICREATESTRUCTW, lParam, 32) -} - -static void test_pack_MDINEXTMENU(void) -{ - /* MDINEXTMENU */ - TEST_TYPE_SIZE (MDINEXTMENU, 12) - TEST_TYPE_ALIGN (MDINEXTMENU, 4) - TEST_FIELD_SIZE (MDINEXTMENU, hmenuIn, 4) - TEST_FIELD_ALIGN (MDINEXTMENU, hmenuIn, 4) - TEST_FIELD_OFFSET(MDINEXTMENU, hmenuIn, 0) - TEST_FIELD_SIZE (MDINEXTMENU, hmenuNext, 4) - TEST_FIELD_ALIGN (MDINEXTMENU, hmenuNext, 4) - TEST_FIELD_OFFSET(MDINEXTMENU, hmenuNext, 4) - TEST_FIELD_SIZE (MDINEXTMENU, hwndNext, 4) - TEST_FIELD_ALIGN (MDINEXTMENU, hwndNext, 4) - TEST_FIELD_OFFSET(MDINEXTMENU, hwndNext, 8) -} - -static void test_pack_MEASUREITEMSTRUCT(void) -{ - /* MEASUREITEMSTRUCT */ - TEST_TYPE_SIZE (MEASUREITEMSTRUCT, 24) - TEST_TYPE_ALIGN (MEASUREITEMSTRUCT, 4) - TEST_FIELD_SIZE (MEASUREITEMSTRUCT, CtlType, 4) - TEST_FIELD_ALIGN (MEASUREITEMSTRUCT, CtlType, 4) - TEST_FIELD_OFFSET(MEASUREITEMSTRUCT, CtlType, 0) - TEST_FIELD_SIZE (MEASUREITEMSTRUCT, CtlID, 4) - TEST_FIELD_ALIGN (MEASUREITEMSTRUCT, CtlID, 4) - TEST_FIELD_OFFSET(MEASUREITEMSTRUCT, CtlID, 4) - TEST_FIELD_SIZE (MEASUREITEMSTRUCT, itemID, 4) - TEST_FIELD_ALIGN (MEASUREITEMSTRUCT, itemID, 4) - TEST_FIELD_OFFSET(MEASUREITEMSTRUCT, itemID, 8) - TEST_FIELD_SIZE (MEASUREITEMSTRUCT, itemWidth, 4) - TEST_FIELD_ALIGN (MEASUREITEMSTRUCT, itemWidth, 4) - TEST_FIELD_OFFSET(MEASUREITEMSTRUCT, itemWidth, 12) - TEST_FIELD_SIZE (MEASUREITEMSTRUCT, itemHeight, 4) - TEST_FIELD_ALIGN (MEASUREITEMSTRUCT, itemHeight, 4) - TEST_FIELD_OFFSET(MEASUREITEMSTRUCT, itemHeight, 16) - TEST_FIELD_SIZE (MEASUREITEMSTRUCT, itemData, 4) - TEST_FIELD_ALIGN (MEASUREITEMSTRUCT, itemData, 4) - TEST_FIELD_OFFSET(MEASUREITEMSTRUCT, itemData, 20) -} - -static void test_pack_MENUINFO(void) -{ - /* MENUINFO */ - TEST_TYPE_SIZE (MENUINFO, 28) - TEST_TYPE_ALIGN (MENUINFO, 4) - TEST_FIELD_SIZE (MENUINFO, cbSize, 4) - TEST_FIELD_ALIGN (MENUINFO, cbSize, 4) - TEST_FIELD_OFFSET(MENUINFO, cbSize, 0) - TEST_FIELD_SIZE (MENUINFO, fMask, 4) - TEST_FIELD_ALIGN (MENUINFO, fMask, 4) - TEST_FIELD_OFFSET(MENUINFO, fMask, 4) - TEST_FIELD_SIZE (MENUINFO, dwStyle, 4) - TEST_FIELD_ALIGN (MENUINFO, dwStyle, 4) - TEST_FIELD_OFFSET(MENUINFO, dwStyle, 8) - TEST_FIELD_SIZE (MENUINFO, cyMax, 4) - TEST_FIELD_ALIGN (MENUINFO, cyMax, 4) - TEST_FIELD_OFFSET(MENUINFO, cyMax, 12) - TEST_FIELD_SIZE (MENUINFO, hbrBack, 4) - TEST_FIELD_ALIGN (MENUINFO, hbrBack, 4) - TEST_FIELD_OFFSET(MENUINFO, hbrBack, 16) - TEST_FIELD_SIZE (MENUINFO, dwContextHelpID, 4) - TEST_FIELD_ALIGN (MENUINFO, dwContextHelpID, 4) - TEST_FIELD_OFFSET(MENUINFO, dwContextHelpID, 20) - TEST_FIELD_SIZE (MENUINFO, dwMenuData, 4) - TEST_FIELD_ALIGN (MENUINFO, dwMenuData, 4) - TEST_FIELD_OFFSET(MENUINFO, dwMenuData, 24) -} - -static void test_pack_MENUITEMINFOA(void) -{ - /* MENUITEMINFOA */ - TEST_TYPE_SIZE (MENUITEMINFOA, 48) - TEST_TYPE_ALIGN (MENUITEMINFOA, 4) - TEST_FIELD_SIZE (MENUITEMINFOA, cbSize, 4) - TEST_FIELD_ALIGN (MENUITEMINFOA, cbSize, 4) - TEST_FIELD_OFFSET(MENUITEMINFOA, cbSize, 0) - TEST_FIELD_SIZE (MENUITEMINFOA, fMask, 4) - TEST_FIELD_ALIGN (MENUITEMINFOA, fMask, 4) - TEST_FIELD_OFFSET(MENUITEMINFOA, fMask, 4) - TEST_FIELD_SIZE (MENUITEMINFOA, fType, 4) - TEST_FIELD_ALIGN (MENUITEMINFOA, fType, 4) - TEST_FIELD_OFFSET(MENUITEMINFOA, fType, 8) - TEST_FIELD_SIZE (MENUITEMINFOA, fState, 4) - TEST_FIELD_ALIGN (MENUITEMINFOA, fState, 4) - TEST_FIELD_OFFSET(MENUITEMINFOA, fState, 12) - TEST_FIELD_SIZE (MENUITEMINFOA, wID, 4) - TEST_FIELD_ALIGN (MENUITEMINFOA, wID, 4) - TEST_FIELD_OFFSET(MENUITEMINFOA, wID, 16) - TEST_FIELD_SIZE (MENUITEMINFOA, hSubMenu, 4) - TEST_FIELD_ALIGN (MENUITEMINFOA, hSubMenu, 4) - TEST_FIELD_OFFSET(MENUITEMINFOA, hSubMenu, 20) - TEST_FIELD_SIZE (MENUITEMINFOA, hbmpChecked, 4) - TEST_FIELD_ALIGN (MENUITEMINFOA, hbmpChecked, 4) - TEST_FIELD_OFFSET(MENUITEMINFOA, hbmpChecked, 24) - TEST_FIELD_SIZE (MENUITEMINFOA, hbmpUnchecked, 4) - TEST_FIELD_ALIGN (MENUITEMINFOA, hbmpUnchecked, 4) - TEST_FIELD_OFFSET(MENUITEMINFOA, hbmpUnchecked, 28) - TEST_FIELD_SIZE (MENUITEMINFOA, dwItemData, 4) - TEST_FIELD_ALIGN (MENUITEMINFOA, dwItemData, 4) - TEST_FIELD_OFFSET(MENUITEMINFOA, dwItemData, 32) - TEST_FIELD_SIZE (MENUITEMINFOA, dwTypeData, 4) - TEST_FIELD_ALIGN (MENUITEMINFOA, dwTypeData, 4) - TEST_FIELD_OFFSET(MENUITEMINFOA, dwTypeData, 36) - TEST_FIELD_SIZE (MENUITEMINFOA, cch, 4) - TEST_FIELD_ALIGN (MENUITEMINFOA, cch, 4) - TEST_FIELD_OFFSET(MENUITEMINFOA, cch, 40) - TEST_FIELD_SIZE (MENUITEMINFOA, hbmpItem, 4) - TEST_FIELD_ALIGN (MENUITEMINFOA, hbmpItem, 4) - TEST_FIELD_OFFSET(MENUITEMINFOA, hbmpItem, 44) -} - -static void test_pack_MENUITEMINFOW(void) -{ - /* MENUITEMINFOW */ - TEST_TYPE_SIZE (MENUITEMINFOW, 48) - TEST_TYPE_ALIGN (MENUITEMINFOW, 4) - TEST_FIELD_SIZE (MENUITEMINFOW, cbSize, 4) - TEST_FIELD_ALIGN (MENUITEMINFOW, cbSize, 4) - TEST_FIELD_OFFSET(MENUITEMINFOW, cbSize, 0) - TEST_FIELD_SIZE (MENUITEMINFOW, fMask, 4) - TEST_FIELD_ALIGN (MENUITEMINFOW, fMask, 4) - TEST_FIELD_OFFSET(MENUITEMINFOW, fMask, 4) - TEST_FIELD_SIZE (MENUITEMINFOW, fType, 4) - TEST_FIELD_ALIGN (MENUITEMINFOW, fType, 4) - TEST_FIELD_OFFSET(MENUITEMINFOW, fType, 8) - TEST_FIELD_SIZE (MENUITEMINFOW, fState, 4) - TEST_FIELD_ALIGN (MENUITEMINFOW, fState, 4) - TEST_FIELD_OFFSET(MENUITEMINFOW, fState, 12) - TEST_FIELD_SIZE (MENUITEMINFOW, wID, 4) - TEST_FIELD_ALIGN (MENUITEMINFOW, wID, 4) - TEST_FIELD_OFFSET(MENUITEMINFOW, wID, 16) - TEST_FIELD_SIZE (MENUITEMINFOW, hSubMenu, 4) - TEST_FIELD_ALIGN (MENUITEMINFOW, hSubMenu, 4) - TEST_FIELD_OFFSET(MENUITEMINFOW, hSubMenu, 20) - TEST_FIELD_SIZE (MENUITEMINFOW, hbmpChecked, 4) - TEST_FIELD_ALIGN (MENUITEMINFOW, hbmpChecked, 4) - TEST_FIELD_OFFSET(MENUITEMINFOW, hbmpChecked, 24) - TEST_FIELD_SIZE (MENUITEMINFOW, hbmpUnchecked, 4) - TEST_FIELD_ALIGN (MENUITEMINFOW, hbmpUnchecked, 4) - TEST_FIELD_OFFSET(MENUITEMINFOW, hbmpUnchecked, 28) - TEST_FIELD_SIZE (MENUITEMINFOW, dwItemData, 4) - TEST_FIELD_ALIGN (MENUITEMINFOW, dwItemData, 4) - TEST_FIELD_OFFSET(MENUITEMINFOW, dwItemData, 32) - TEST_FIELD_SIZE (MENUITEMINFOW, dwTypeData, 4) - TEST_FIELD_ALIGN (MENUITEMINFOW, dwTypeData, 4) - TEST_FIELD_OFFSET(MENUITEMINFOW, dwTypeData, 36) - TEST_FIELD_SIZE (MENUITEMINFOW, cch, 4) - TEST_FIELD_ALIGN (MENUITEMINFOW, cch, 4) - TEST_FIELD_OFFSET(MENUITEMINFOW, cch, 40) - TEST_FIELD_SIZE (MENUITEMINFOW, hbmpItem, 4) - TEST_FIELD_ALIGN (MENUITEMINFOW, hbmpItem, 4) - TEST_FIELD_OFFSET(MENUITEMINFOW, hbmpItem, 44) -} - -static void test_pack_MENUITEMTEMPLATE(void) -{ - /* MENUITEMTEMPLATE */ - TEST_TYPE_SIZE (MENUITEMTEMPLATE, 6) - TEST_TYPE_ALIGN (MENUITEMTEMPLATE, 2) - TEST_FIELD_SIZE (MENUITEMTEMPLATE, mtOption, 2) - TEST_FIELD_ALIGN (MENUITEMTEMPLATE, mtOption, 2) - TEST_FIELD_OFFSET(MENUITEMTEMPLATE, mtOption, 0) - TEST_FIELD_SIZE (MENUITEMTEMPLATE, mtID, 2) - TEST_FIELD_ALIGN (MENUITEMTEMPLATE, mtID, 2) - TEST_FIELD_OFFSET(MENUITEMTEMPLATE, mtID, 2) - TEST_FIELD_SIZE (MENUITEMTEMPLATE, mtString, 2) - TEST_FIELD_ALIGN (MENUITEMTEMPLATE, mtString, 2) - TEST_FIELD_OFFSET(MENUITEMTEMPLATE, mtString, 4) -} - -static void test_pack_MENUITEMTEMPLATEHEADER(void) -{ - /* MENUITEMTEMPLATEHEADER */ - TEST_TYPE_SIZE (MENUITEMTEMPLATEHEADER, 4) - TEST_TYPE_ALIGN (MENUITEMTEMPLATEHEADER, 2) - TEST_FIELD_SIZE (MENUITEMTEMPLATEHEADER, versionNumber, 2) - TEST_FIELD_ALIGN (MENUITEMTEMPLATEHEADER, versionNumber, 2) - TEST_FIELD_OFFSET(MENUITEMTEMPLATEHEADER, versionNumber, 0) - TEST_FIELD_SIZE (MENUITEMTEMPLATEHEADER, offset, 2) - TEST_FIELD_ALIGN (MENUITEMTEMPLATEHEADER, offset, 2) - TEST_FIELD_OFFSET(MENUITEMTEMPLATEHEADER, offset, 2) -} - -static void test_pack_MINIMIZEDMETRICS(void) -{ - /* MINIMIZEDMETRICS */ - TEST_TYPE_SIZE (MINIMIZEDMETRICS, 20) - TEST_TYPE_ALIGN (MINIMIZEDMETRICS, 4) - TEST_FIELD_SIZE (MINIMIZEDMETRICS, cbSize, 4) - TEST_FIELD_ALIGN (MINIMIZEDMETRICS, cbSize, 4) - TEST_FIELD_OFFSET(MINIMIZEDMETRICS, cbSize, 0) - TEST_FIELD_SIZE (MINIMIZEDMETRICS, iWidth, 4) - TEST_FIELD_ALIGN (MINIMIZEDMETRICS, iWidth, 4) - TEST_FIELD_OFFSET(MINIMIZEDMETRICS, iWidth, 4) - TEST_FIELD_SIZE (MINIMIZEDMETRICS, iHorzGap, 4) - TEST_FIELD_ALIGN (MINIMIZEDMETRICS, iHorzGap, 4) - TEST_FIELD_OFFSET(MINIMIZEDMETRICS, iHorzGap, 8) - TEST_FIELD_SIZE (MINIMIZEDMETRICS, iVertGap, 4) - TEST_FIELD_ALIGN (MINIMIZEDMETRICS, iVertGap, 4) - TEST_FIELD_OFFSET(MINIMIZEDMETRICS, iVertGap, 12) - TEST_FIELD_SIZE (MINIMIZEDMETRICS, iArrange, 4) - TEST_FIELD_ALIGN (MINIMIZEDMETRICS, iArrange, 4) - TEST_FIELD_OFFSET(MINIMIZEDMETRICS, iArrange, 16) -} - -static void test_pack_MINMAXINFO(void) -{ - /* MINMAXINFO */ - TEST_TYPE_SIZE (MINMAXINFO, 40) - TEST_TYPE_ALIGN (MINMAXINFO, 4) - TEST_FIELD_SIZE (MINMAXINFO, ptReserved, 8) - TEST_FIELD_ALIGN (MINMAXINFO, ptReserved, 4) - TEST_FIELD_OFFSET(MINMAXINFO, ptReserved, 0) - TEST_FIELD_SIZE (MINMAXINFO, ptMaxSize, 8) - TEST_FIELD_ALIGN (MINMAXINFO, ptMaxSize, 4) - TEST_FIELD_OFFSET(MINMAXINFO, ptMaxSize, 8) - TEST_FIELD_SIZE (MINMAXINFO, ptMaxPosition, 8) - TEST_FIELD_ALIGN (MINMAXINFO, ptMaxPosition, 4) - TEST_FIELD_OFFSET(MINMAXINFO, ptMaxPosition, 16) - TEST_FIELD_SIZE (MINMAXINFO, ptMinTrackSize, 8) - TEST_FIELD_ALIGN (MINMAXINFO, ptMinTrackSize, 4) - TEST_FIELD_OFFSET(MINMAXINFO, ptMinTrackSize, 24) - TEST_FIELD_SIZE (MINMAXINFO, ptMaxTrackSize, 8) - TEST_FIELD_ALIGN (MINMAXINFO, ptMaxTrackSize, 4) - TEST_FIELD_OFFSET(MINMAXINFO, ptMaxTrackSize, 32) -} - -static void test_pack_MONITORENUMPROC(void) -{ - /* MONITORENUMPROC */ - TEST_TYPE_SIZE (MONITORENUMPROC, 4) - TEST_TYPE_ALIGN (MONITORENUMPROC, 4) -} - -static void test_pack_MONITORINFO(void) -{ - /* MONITORINFO */ - TEST_TYPE_SIZE (MONITORINFO, 40) - TEST_TYPE_ALIGN (MONITORINFO, 4) - TEST_FIELD_SIZE (MONITORINFO, cbSize, 4) - TEST_FIELD_ALIGN (MONITORINFO, cbSize, 4) - TEST_FIELD_OFFSET(MONITORINFO, cbSize, 0) - TEST_FIELD_SIZE (MONITORINFO, rcMonitor, 16) - TEST_FIELD_ALIGN (MONITORINFO, rcMonitor, 4) - TEST_FIELD_OFFSET(MONITORINFO, rcMonitor, 4) - TEST_FIELD_SIZE (MONITORINFO, rcWork, 16) - TEST_FIELD_ALIGN (MONITORINFO, rcWork, 4) - TEST_FIELD_OFFSET(MONITORINFO, rcWork, 20) - TEST_FIELD_SIZE (MONITORINFO, dwFlags, 4) - TEST_FIELD_ALIGN (MONITORINFO, dwFlags, 4) - TEST_FIELD_OFFSET(MONITORINFO, dwFlags, 36) -} - -static void test_pack_MONITORINFOEXA(void) -{ - /* MONITORINFOEXA */ - TEST_TYPE_SIZE (MONITORINFOEXA, 72) - TEST_TYPE_ALIGN (MONITORINFOEXA, 4) - TEST_FIELD_SIZE (MONITORINFOEXA, cbSize, 4) - TEST_FIELD_ALIGN (MONITORINFOEXA, cbSize, 4) - TEST_FIELD_OFFSET(MONITORINFOEXA, cbSize, 0) - TEST_FIELD_SIZE (MONITORINFOEXA, rcMonitor, 16) - TEST_FIELD_ALIGN (MONITORINFOEXA, rcMonitor, 4) - TEST_FIELD_OFFSET(MONITORINFOEXA, rcMonitor, 4) - TEST_FIELD_SIZE (MONITORINFOEXA, rcWork, 16) - TEST_FIELD_ALIGN (MONITORINFOEXA, rcWork, 4) - TEST_FIELD_OFFSET(MONITORINFOEXA, rcWork, 20) - TEST_FIELD_SIZE (MONITORINFOEXA, dwFlags, 4) - TEST_FIELD_ALIGN (MONITORINFOEXA, dwFlags, 4) - TEST_FIELD_OFFSET(MONITORINFOEXA, dwFlags, 36) - TEST_FIELD_SIZE (MONITORINFOEXA, szDevice, 32) - TEST_FIELD_ALIGN (MONITORINFOEXA, szDevice, 1) - TEST_FIELD_OFFSET(MONITORINFOEXA, szDevice, 40) -} - -static void test_pack_MONITORINFOEXW(void) -{ - /* MONITORINFOEXW */ - TEST_TYPE_SIZE (MONITORINFOEXW, 104) - TEST_TYPE_ALIGN (MONITORINFOEXW, 4) - TEST_FIELD_SIZE (MONITORINFOEXW, cbSize, 4) - TEST_FIELD_ALIGN (MONITORINFOEXW, cbSize, 4) - TEST_FIELD_OFFSET(MONITORINFOEXW, cbSize, 0) - TEST_FIELD_SIZE (MONITORINFOEXW, rcMonitor, 16) - TEST_FIELD_ALIGN (MONITORINFOEXW, rcMonitor, 4) - TEST_FIELD_OFFSET(MONITORINFOEXW, rcMonitor, 4) - TEST_FIELD_SIZE (MONITORINFOEXW, rcWork, 16) - TEST_FIELD_ALIGN (MONITORINFOEXW, rcWork, 4) - TEST_FIELD_OFFSET(MONITORINFOEXW, rcWork, 20) - TEST_FIELD_SIZE (MONITORINFOEXW, dwFlags, 4) - TEST_FIELD_ALIGN (MONITORINFOEXW, dwFlags, 4) - TEST_FIELD_OFFSET(MONITORINFOEXW, dwFlags, 36) - TEST_FIELD_SIZE (MONITORINFOEXW, szDevice, 64) - TEST_FIELD_ALIGN (MONITORINFOEXW, szDevice, 2) - TEST_FIELD_OFFSET(MONITORINFOEXW, szDevice, 40) -} - -static void test_pack_MOUSEHOOKSTRUCT(void) -{ - /* MOUSEHOOKSTRUCT */ - TEST_TYPE_SIZE (MOUSEHOOKSTRUCT, 20) - TEST_TYPE_ALIGN (MOUSEHOOKSTRUCT, 4) - TEST_FIELD_SIZE (MOUSEHOOKSTRUCT, pt, 8) - TEST_FIELD_ALIGN (MOUSEHOOKSTRUCT, pt, 4) - TEST_FIELD_OFFSET(MOUSEHOOKSTRUCT, pt, 0) - TEST_FIELD_SIZE (MOUSEHOOKSTRUCT, hwnd, 4) - TEST_FIELD_ALIGN (MOUSEHOOKSTRUCT, hwnd, 4) - TEST_FIELD_OFFSET(MOUSEHOOKSTRUCT, hwnd, 8) - TEST_FIELD_SIZE (MOUSEHOOKSTRUCT, wHitTestCode, 4) - TEST_FIELD_ALIGN (MOUSEHOOKSTRUCT, wHitTestCode, 4) - TEST_FIELD_OFFSET(MOUSEHOOKSTRUCT, wHitTestCode, 12) - TEST_FIELD_SIZE (MOUSEHOOKSTRUCT, dwExtraInfo, 4) - TEST_FIELD_ALIGN (MOUSEHOOKSTRUCT, dwExtraInfo, 4) - TEST_FIELD_OFFSET(MOUSEHOOKSTRUCT, dwExtraInfo, 16) -} - -static void test_pack_MOUSEINPUT(void) -{ - /* MOUSEINPUT */ - TEST_TYPE_SIZE (MOUSEINPUT, 24) - TEST_TYPE_ALIGN (MOUSEINPUT, 4) - TEST_FIELD_SIZE (MOUSEINPUT, dx, 4) - TEST_FIELD_ALIGN (MOUSEINPUT, dx, 4) - TEST_FIELD_OFFSET(MOUSEINPUT, dx, 0) - TEST_FIELD_SIZE (MOUSEINPUT, dy, 4) - TEST_FIELD_ALIGN (MOUSEINPUT, dy, 4) - TEST_FIELD_OFFSET(MOUSEINPUT, dy, 4) - TEST_FIELD_SIZE (MOUSEINPUT, mouseData, 4) - TEST_FIELD_ALIGN (MOUSEINPUT, mouseData, 4) - TEST_FIELD_OFFSET(MOUSEINPUT, mouseData, 8) - TEST_FIELD_SIZE (MOUSEINPUT, dwFlags, 4) - TEST_FIELD_ALIGN (MOUSEINPUT, dwFlags, 4) - TEST_FIELD_OFFSET(MOUSEINPUT, dwFlags, 12) - TEST_FIELD_SIZE (MOUSEINPUT, time, 4) - TEST_FIELD_ALIGN (MOUSEINPUT, time, 4) - TEST_FIELD_OFFSET(MOUSEINPUT, time, 16) - TEST_FIELD_SIZE (MOUSEINPUT, dwExtraInfo, 4) - TEST_FIELD_ALIGN (MOUSEINPUT, dwExtraInfo, 4) - TEST_FIELD_OFFSET(MOUSEINPUT, dwExtraInfo, 20) -} - -static void test_pack_MOUSEKEYS(void) -{ - /* MOUSEKEYS */ - TEST_TYPE_SIZE (MOUSEKEYS, 28) - TEST_TYPE_ALIGN (MOUSEKEYS, 4) - TEST_FIELD_SIZE (MOUSEKEYS, cbSize, 4) - TEST_FIELD_ALIGN (MOUSEKEYS, cbSize, 4) - TEST_FIELD_OFFSET(MOUSEKEYS, cbSize, 0) - TEST_FIELD_SIZE (MOUSEKEYS, dwFlags, 4) - TEST_FIELD_ALIGN (MOUSEKEYS, dwFlags, 4) - TEST_FIELD_OFFSET(MOUSEKEYS, dwFlags, 4) - TEST_FIELD_SIZE (MOUSEKEYS, iMaxSpeed, 4) - TEST_FIELD_ALIGN (MOUSEKEYS, iMaxSpeed, 4) - TEST_FIELD_OFFSET(MOUSEKEYS, iMaxSpeed, 8) - TEST_FIELD_SIZE (MOUSEKEYS, iTimeToMaxSpeed, 4) - TEST_FIELD_ALIGN (MOUSEKEYS, iTimeToMaxSpeed, 4) - TEST_FIELD_OFFSET(MOUSEKEYS, iTimeToMaxSpeed, 12) - TEST_FIELD_SIZE (MOUSEKEYS, iCtrlSpeed, 4) - TEST_FIELD_ALIGN (MOUSEKEYS, iCtrlSpeed, 4) - TEST_FIELD_OFFSET(MOUSEKEYS, iCtrlSpeed, 16) - TEST_FIELD_SIZE (MOUSEKEYS, dwReserved1, 4) - TEST_FIELD_ALIGN (MOUSEKEYS, dwReserved1, 4) - TEST_FIELD_OFFSET(MOUSEKEYS, dwReserved1, 20) - TEST_FIELD_SIZE (MOUSEKEYS, dwReserved2, 4) - TEST_FIELD_ALIGN (MOUSEKEYS, dwReserved2, 4) - TEST_FIELD_OFFSET(MOUSEKEYS, dwReserved2, 24) -} - -static void test_pack_MSG(void) -{ - /* MSG */ - TEST_TYPE_SIZE (MSG, 28) - TEST_TYPE_ALIGN (MSG, 4) - TEST_FIELD_SIZE (MSG, hwnd, 4) - TEST_FIELD_ALIGN (MSG, hwnd, 4) - TEST_FIELD_OFFSET(MSG, hwnd, 0) - TEST_FIELD_SIZE (MSG, message, 4) - TEST_FIELD_ALIGN (MSG, message, 4) - TEST_FIELD_OFFSET(MSG, message, 4) - TEST_FIELD_SIZE (MSG, wParam, 4) - TEST_FIELD_ALIGN (MSG, wParam, 4) - TEST_FIELD_OFFSET(MSG, wParam, 8) - TEST_FIELD_SIZE (MSG, lParam, 4) - TEST_FIELD_ALIGN (MSG, lParam, 4) - TEST_FIELD_OFFSET(MSG, lParam, 12) - TEST_FIELD_SIZE (MSG, time, 4) - TEST_FIELD_ALIGN (MSG, time, 4) - TEST_FIELD_OFFSET(MSG, time, 16) - TEST_FIELD_SIZE (MSG, pt, 8) - TEST_FIELD_ALIGN (MSG, pt, 4) - TEST_FIELD_OFFSET(MSG, pt, 20) -} - -static void test_pack_MSGBOXCALLBACK(void) -{ - /* MSGBOXCALLBACK */ - TEST_TYPE_SIZE (MSGBOXCALLBACK, 4) - TEST_TYPE_ALIGN (MSGBOXCALLBACK, 4) -} - -static void test_pack_MSGBOXPARAMSA(void) -{ - /* MSGBOXPARAMSA */ - TEST_TYPE_SIZE (MSGBOXPARAMSA, 40) - TEST_TYPE_ALIGN (MSGBOXPARAMSA, 4) - TEST_FIELD_SIZE (MSGBOXPARAMSA, cbSize, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSA, cbSize, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSA, cbSize, 0) - TEST_FIELD_SIZE (MSGBOXPARAMSA, hwndOwner, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSA, hwndOwner, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSA, hwndOwner, 4) - TEST_FIELD_SIZE (MSGBOXPARAMSA, hInstance, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSA, hInstance, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSA, hInstance, 8) - TEST_FIELD_SIZE (MSGBOXPARAMSA, lpszText, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSA, lpszText, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSA, lpszText, 12) - TEST_FIELD_SIZE (MSGBOXPARAMSA, lpszCaption, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSA, lpszCaption, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSA, lpszCaption, 16) - TEST_FIELD_SIZE (MSGBOXPARAMSA, dwStyle, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSA, dwStyle, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSA, dwStyle, 20) - TEST_FIELD_SIZE (MSGBOXPARAMSA, lpszIcon, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSA, lpszIcon, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSA, lpszIcon, 24) - TEST_FIELD_SIZE (MSGBOXPARAMSA, dwContextHelpId, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSA, dwContextHelpId, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSA, dwContextHelpId, 28) - TEST_FIELD_SIZE (MSGBOXPARAMSA, lpfnMsgBoxCallback, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSA, lpfnMsgBoxCallback, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSA, lpfnMsgBoxCallback, 32) - TEST_FIELD_SIZE (MSGBOXPARAMSA, dwLanguageId, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSA, dwLanguageId, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSA, dwLanguageId, 36) -} - -static void test_pack_MSGBOXPARAMSW(void) -{ - /* MSGBOXPARAMSW */ - TEST_TYPE_SIZE (MSGBOXPARAMSW, 40) - TEST_TYPE_ALIGN (MSGBOXPARAMSW, 4) - TEST_FIELD_SIZE (MSGBOXPARAMSW, cbSize, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSW, cbSize, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSW, cbSize, 0) - TEST_FIELD_SIZE (MSGBOXPARAMSW, hwndOwner, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSW, hwndOwner, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSW, hwndOwner, 4) - TEST_FIELD_SIZE (MSGBOXPARAMSW, hInstance, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSW, hInstance, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSW, hInstance, 8) - TEST_FIELD_SIZE (MSGBOXPARAMSW, lpszText, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSW, lpszText, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSW, lpszText, 12) - TEST_FIELD_SIZE (MSGBOXPARAMSW, lpszCaption, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSW, lpszCaption, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSW, lpszCaption, 16) - TEST_FIELD_SIZE (MSGBOXPARAMSW, dwStyle, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSW, dwStyle, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSW, dwStyle, 20) - TEST_FIELD_SIZE (MSGBOXPARAMSW, lpszIcon, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSW, lpszIcon, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSW, lpszIcon, 24) - TEST_FIELD_SIZE (MSGBOXPARAMSW, dwContextHelpId, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSW, dwContextHelpId, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSW, dwContextHelpId, 28) - TEST_FIELD_SIZE (MSGBOXPARAMSW, lpfnMsgBoxCallback, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSW, lpfnMsgBoxCallback, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSW, lpfnMsgBoxCallback, 32) - TEST_FIELD_SIZE (MSGBOXPARAMSW, dwLanguageId, 4) - TEST_FIELD_ALIGN (MSGBOXPARAMSW, dwLanguageId, 4) - TEST_FIELD_OFFSET(MSGBOXPARAMSW, dwLanguageId, 36) -} - -static void test_pack_MSLLHOOKSTRUCT(void) -{ - /* MSLLHOOKSTRUCT */ - TEST_TYPE_SIZE (MSLLHOOKSTRUCT, 24) - TEST_TYPE_ALIGN (MSLLHOOKSTRUCT, 4) - TEST_FIELD_SIZE (MSLLHOOKSTRUCT, pt, 8) - TEST_FIELD_ALIGN (MSLLHOOKSTRUCT, pt, 4) - TEST_FIELD_OFFSET(MSLLHOOKSTRUCT, pt, 0) - TEST_FIELD_SIZE (MSLLHOOKSTRUCT, mouseData, 4) - TEST_FIELD_ALIGN (MSLLHOOKSTRUCT, mouseData, 4) - TEST_FIELD_OFFSET(MSLLHOOKSTRUCT, mouseData, 8) - TEST_FIELD_SIZE (MSLLHOOKSTRUCT, flags, 4) - TEST_FIELD_ALIGN (MSLLHOOKSTRUCT, flags, 4) - TEST_FIELD_OFFSET(MSLLHOOKSTRUCT, flags, 12) - TEST_FIELD_SIZE (MSLLHOOKSTRUCT, time, 4) - TEST_FIELD_ALIGN (MSLLHOOKSTRUCT, time, 4) - TEST_FIELD_OFFSET(MSLLHOOKSTRUCT, time, 16) - TEST_FIELD_SIZE (MSLLHOOKSTRUCT, dwExtraInfo, 4) - TEST_FIELD_ALIGN (MSLLHOOKSTRUCT, dwExtraInfo, 4) - TEST_FIELD_OFFSET(MSLLHOOKSTRUCT, dwExtraInfo, 20) -} - -static void test_pack_MULTIKEYHELPA(void) -{ - /* MULTIKEYHELPA */ - TEST_TYPE_SIZE (MULTIKEYHELPA, 8) - TEST_TYPE_ALIGN (MULTIKEYHELPA, 4) - TEST_FIELD_SIZE (MULTIKEYHELPA, mkSize, 4) - TEST_FIELD_ALIGN (MULTIKEYHELPA, mkSize, 4) - TEST_FIELD_OFFSET(MULTIKEYHELPA, mkSize, 0) - TEST_FIELD_SIZE (MULTIKEYHELPA, mkKeylist, 1) - TEST_FIELD_ALIGN (MULTIKEYHELPA, mkKeylist, 1) - TEST_FIELD_OFFSET(MULTIKEYHELPA, mkKeylist, 4) - TEST_FIELD_SIZE (MULTIKEYHELPA, szKeyphrase, 1) - TEST_FIELD_ALIGN (MULTIKEYHELPA, szKeyphrase, 1) - TEST_FIELD_OFFSET(MULTIKEYHELPA, szKeyphrase, 5) -} - -static void test_pack_MULTIKEYHELPW(void) -{ - /* MULTIKEYHELPW */ - TEST_TYPE_SIZE (MULTIKEYHELPW, 8) - TEST_TYPE_ALIGN (MULTIKEYHELPW, 4) - TEST_FIELD_SIZE (MULTIKEYHELPW, mkSize, 4) - TEST_FIELD_ALIGN (MULTIKEYHELPW, mkSize, 4) - TEST_FIELD_OFFSET(MULTIKEYHELPW, mkSize, 0) - TEST_FIELD_SIZE (MULTIKEYHELPW, mkKeylist, 2) - TEST_FIELD_ALIGN (MULTIKEYHELPW, mkKeylist, 2) - TEST_FIELD_OFFSET(MULTIKEYHELPW, mkKeylist, 4) - TEST_FIELD_SIZE (MULTIKEYHELPW, szKeyphrase, 2) - TEST_FIELD_ALIGN (MULTIKEYHELPW, szKeyphrase, 2) - TEST_FIELD_OFFSET(MULTIKEYHELPW, szKeyphrase, 6) -} - -static void test_pack_NAMEENUMPROCA(void) -{ - /* NAMEENUMPROCA */ - TEST_TYPE_SIZE (NAMEENUMPROCA, 4) - TEST_TYPE_ALIGN (NAMEENUMPROCA, 4) -} - -static void test_pack_NAMEENUMPROCW(void) -{ - /* NAMEENUMPROCW */ - TEST_TYPE_SIZE (NAMEENUMPROCW, 4) - TEST_TYPE_ALIGN (NAMEENUMPROCW, 4) -} - -static void test_pack_NCCALCSIZE_PARAMS(void) -{ - /* NCCALCSIZE_PARAMS */ - TEST_TYPE_SIZE (NCCALCSIZE_PARAMS, 52) - TEST_TYPE_ALIGN (NCCALCSIZE_PARAMS, 4) - TEST_FIELD_SIZE (NCCALCSIZE_PARAMS, rgrc, 48) - TEST_FIELD_ALIGN (NCCALCSIZE_PARAMS, rgrc, 4) - TEST_FIELD_OFFSET(NCCALCSIZE_PARAMS, rgrc, 0) - TEST_FIELD_SIZE (NCCALCSIZE_PARAMS, lppos, 4) - TEST_FIELD_ALIGN (NCCALCSIZE_PARAMS, lppos, 4) - TEST_FIELD_OFFSET(NCCALCSIZE_PARAMS, lppos, 48) -} - -static void test_pack_NMHDR(void) -{ - /* NMHDR */ - TEST_TYPE_SIZE (NMHDR, 12) - TEST_TYPE_ALIGN (NMHDR, 4) - TEST_FIELD_SIZE (NMHDR, hwndFrom, 4) - TEST_FIELD_ALIGN (NMHDR, hwndFrom, 4) - TEST_FIELD_OFFSET(NMHDR, hwndFrom, 0) - TEST_FIELD_SIZE (NMHDR, idFrom, 4) - TEST_FIELD_ALIGN (NMHDR, idFrom, 4) - TEST_FIELD_OFFSET(NMHDR, idFrom, 4) - TEST_FIELD_SIZE (NMHDR, code, 4) - TEST_FIELD_ALIGN (NMHDR, code, 4) - TEST_FIELD_OFFSET(NMHDR, code, 8) -} - -static void test_pack_NONCLIENTMETRICSA(void) -{ - /* NONCLIENTMETRICSA */ - TEST_TYPE_SIZE (NONCLIENTMETRICSA, 340) - TEST_TYPE_ALIGN (NONCLIENTMETRICSA, 4) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, cbSize, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, cbSize, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, cbSize, 0) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, iBorderWidth, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iBorderWidth, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iBorderWidth, 4) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, iScrollWidth, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iScrollWidth, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iScrollWidth, 8) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, iScrollHeight, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iScrollHeight, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iScrollHeight, 12) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, iCaptionWidth, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iCaptionWidth, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iCaptionWidth, 16) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, iCaptionHeight, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iCaptionHeight, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iCaptionHeight, 20) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, lfCaptionFont, 60) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, lfCaptionFont, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, lfCaptionFont, 24) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, iSmCaptionWidth, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iSmCaptionWidth, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iSmCaptionWidth, 84) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, iSmCaptionHeight, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iSmCaptionHeight, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iSmCaptionHeight, 88) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, lfSmCaptionFont, 60) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, lfSmCaptionFont, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, lfSmCaptionFont, 92) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, iMenuWidth, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iMenuWidth, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iMenuWidth, 152) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, iMenuHeight, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, iMenuHeight, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, iMenuHeight, 156) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, lfMenuFont, 60) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, lfMenuFont, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, lfMenuFont, 160) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, lfStatusFont, 60) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, lfStatusFont, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, lfStatusFont, 220) - TEST_FIELD_SIZE (NONCLIENTMETRICSA, lfMessageFont, 60) - TEST_FIELD_ALIGN (NONCLIENTMETRICSA, lfMessageFont, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSA, lfMessageFont, 280) -} - -static void test_pack_NONCLIENTMETRICSW(void) -{ - /* NONCLIENTMETRICSW */ - TEST_TYPE_SIZE (NONCLIENTMETRICSW, 500) - TEST_TYPE_ALIGN (NONCLIENTMETRICSW, 4) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, cbSize, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, cbSize, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, cbSize, 0) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, iBorderWidth, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iBorderWidth, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iBorderWidth, 4) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, iScrollWidth, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iScrollWidth, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iScrollWidth, 8) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, iScrollHeight, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iScrollHeight, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iScrollHeight, 12) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, iCaptionWidth, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iCaptionWidth, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iCaptionWidth, 16) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, iCaptionHeight, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iCaptionHeight, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iCaptionHeight, 20) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, lfCaptionFont, 92) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, lfCaptionFont, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, lfCaptionFont, 24) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, iSmCaptionWidth, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iSmCaptionWidth, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iSmCaptionWidth, 116) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, iSmCaptionHeight, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iSmCaptionHeight, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iSmCaptionHeight, 120) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, lfSmCaptionFont, 92) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, lfSmCaptionFont, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, lfSmCaptionFont, 124) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, iMenuWidth, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iMenuWidth, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iMenuWidth, 216) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, iMenuHeight, 4) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, iMenuHeight, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, iMenuHeight, 220) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, lfMenuFont, 92) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, lfMenuFont, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, lfMenuFont, 224) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, lfStatusFont, 92) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, lfStatusFont, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, lfStatusFont, 316) - TEST_FIELD_SIZE (NONCLIENTMETRICSW, lfMessageFont, 92) - TEST_FIELD_ALIGN (NONCLIENTMETRICSW, lfMessageFont, 4) - TEST_FIELD_OFFSET(NONCLIENTMETRICSW, lfMessageFont, 408) -} - -static void test_pack_PAINTSTRUCT(void) -{ - /* PAINTSTRUCT */ - TEST_TYPE_SIZE (PAINTSTRUCT, 64) - TEST_TYPE_ALIGN (PAINTSTRUCT, 4) - TEST_FIELD_SIZE (PAINTSTRUCT, hdc, 4) - TEST_FIELD_ALIGN (PAINTSTRUCT, hdc, 4) - TEST_FIELD_OFFSET(PAINTSTRUCT, hdc, 0) - TEST_FIELD_SIZE (PAINTSTRUCT, fErase, 4) - TEST_FIELD_ALIGN (PAINTSTRUCT, fErase, 4) - TEST_FIELD_OFFSET(PAINTSTRUCT, fErase, 4) - TEST_FIELD_SIZE (PAINTSTRUCT, rcPaint, 16) - TEST_FIELD_ALIGN (PAINTSTRUCT, rcPaint, 4) - TEST_FIELD_OFFSET(PAINTSTRUCT, rcPaint, 8) - TEST_FIELD_SIZE (PAINTSTRUCT, fRestore, 4) - TEST_FIELD_ALIGN (PAINTSTRUCT, fRestore, 4) - TEST_FIELD_OFFSET(PAINTSTRUCT, fRestore, 24) - TEST_FIELD_SIZE (PAINTSTRUCT, fIncUpdate, 4) - TEST_FIELD_ALIGN (PAINTSTRUCT, fIncUpdate, 4) - TEST_FIELD_OFFSET(PAINTSTRUCT, fIncUpdate, 28) - TEST_FIELD_SIZE (PAINTSTRUCT, rgbReserved, 32) - TEST_FIELD_ALIGN (PAINTSTRUCT, rgbReserved, 1) - TEST_FIELD_OFFSET(PAINTSTRUCT, rgbReserved, 32) -} - -static void test_pack_PCOMBOBOXINFO(void) -{ - /* PCOMBOBOXINFO */ - TEST_TYPE_SIZE (PCOMBOBOXINFO, 4) - TEST_TYPE_ALIGN (PCOMBOBOXINFO, 4) - TEST_TARGET_SIZE (PCOMBOBOXINFO, 52) - TEST_TARGET_ALIGN(PCOMBOBOXINFO, 4) -} - -static void test_pack_PCOMPAREITEMSTRUCT(void) -{ - /* PCOMPAREITEMSTRUCT */ - TEST_TYPE_SIZE (PCOMPAREITEMSTRUCT, 4) - TEST_TYPE_ALIGN (PCOMPAREITEMSTRUCT, 4) - TEST_TARGET_SIZE (PCOMPAREITEMSTRUCT, 32) - TEST_TARGET_ALIGN(PCOMPAREITEMSTRUCT, 4) -} - -static void test_pack_PCOPYDATASTRUCT(void) -{ - /* PCOPYDATASTRUCT */ - TEST_TYPE_SIZE (PCOPYDATASTRUCT, 4) - TEST_TYPE_ALIGN (PCOPYDATASTRUCT, 4) - TEST_TARGET_SIZE (PCOPYDATASTRUCT, 12) - TEST_TARGET_ALIGN(PCOPYDATASTRUCT, 4) -} - -static void test_pack_PCURSORINFO(void) -{ - /* PCURSORINFO */ - TEST_TYPE_SIZE (PCURSORINFO, 4) - TEST_TYPE_ALIGN (PCURSORINFO, 4) - TEST_TARGET_SIZE (PCURSORINFO, 20) - TEST_TARGET_ALIGN(PCURSORINFO, 4) -} - -static void test_pack_PCWPRETSTRUCT(void) -{ - /* PCWPRETSTRUCT */ - TEST_TYPE_SIZE (PCWPRETSTRUCT, 4) - TEST_TYPE_ALIGN (PCWPRETSTRUCT, 4) - TEST_TARGET_SIZE (PCWPRETSTRUCT, 20) - TEST_TARGET_ALIGN(PCWPRETSTRUCT, 4) -} - -static void test_pack_PCWPSTRUCT(void) -{ - /* PCWPSTRUCT */ - TEST_TYPE_SIZE (PCWPSTRUCT, 4) - TEST_TYPE_ALIGN (PCWPSTRUCT, 4) - TEST_TARGET_SIZE (PCWPSTRUCT, 16) - TEST_TARGET_ALIGN(PCWPSTRUCT, 4) -} - -static void test_pack_PDEBUGHOOKINFO(void) -{ - /* PDEBUGHOOKINFO */ - TEST_TYPE_SIZE (PDEBUGHOOKINFO, 4) - TEST_TYPE_ALIGN (PDEBUGHOOKINFO, 4) - TEST_TARGET_SIZE (PDEBUGHOOKINFO, 20) - TEST_TARGET_ALIGN(PDEBUGHOOKINFO, 4) -} - -static void test_pack_PDELETEITEMSTRUCT(void) -{ - /* PDELETEITEMSTRUCT */ - TEST_TYPE_SIZE (PDELETEITEMSTRUCT, 4) - TEST_TYPE_ALIGN (PDELETEITEMSTRUCT, 4) - TEST_TARGET_SIZE (PDELETEITEMSTRUCT, 20) - TEST_TARGET_ALIGN(PDELETEITEMSTRUCT, 4) -} - -static void test_pack_PDLGITEMTEMPLATEA(void) -{ - /* PDLGITEMTEMPLATEA */ - TEST_TYPE_SIZE (PDLGITEMTEMPLATEA, 4) - TEST_TYPE_ALIGN (PDLGITEMTEMPLATEA, 4) - TEST_TARGET_SIZE (PDLGITEMTEMPLATEA, 18) - TEST_TARGET_ALIGN(PDLGITEMTEMPLATEA, 2) -} - -static void test_pack_PDLGITEMTEMPLATEW(void) -{ - /* PDLGITEMTEMPLATEW */ - TEST_TYPE_SIZE (PDLGITEMTEMPLATEW, 4) - TEST_TYPE_ALIGN (PDLGITEMTEMPLATEW, 4) - TEST_TARGET_SIZE (PDLGITEMTEMPLATEW, 18) - TEST_TARGET_ALIGN(PDLGITEMTEMPLATEW, 2) -} - -static void test_pack_PDRAWITEMSTRUCT(void) -{ - /* PDRAWITEMSTRUCT */ - TEST_TYPE_SIZE (PDRAWITEMSTRUCT, 4) - TEST_TYPE_ALIGN (PDRAWITEMSTRUCT, 4) - TEST_TARGET_SIZE (PDRAWITEMSTRUCT, 48) - TEST_TARGET_ALIGN(PDRAWITEMSTRUCT, 4) -} - -static void test_pack_PEVENTMSG(void) -{ - /* PEVENTMSG */ - TEST_TYPE_SIZE (PEVENTMSG, 4) - TEST_TYPE_ALIGN (PEVENTMSG, 4) - TEST_TARGET_SIZE (PEVENTMSG, 20) - TEST_TARGET_ALIGN(PEVENTMSG, 4) -} - -static void test_pack_PFLASHWINFO(void) -{ - /* PFLASHWINFO */ - TEST_TYPE_SIZE (PFLASHWINFO, 4) - TEST_TYPE_ALIGN (PFLASHWINFO, 4) - TEST_TARGET_SIZE (PFLASHWINFO, 20) - TEST_TARGET_ALIGN(PFLASHWINFO, 4) -} - -static void test_pack_PGUITHREADINFO(void) -{ - /* PGUITHREADINFO */ - TEST_TYPE_SIZE (PGUITHREADINFO, 4) - TEST_TYPE_ALIGN (PGUITHREADINFO, 4) - TEST_TARGET_SIZE (PGUITHREADINFO, 48) - TEST_TARGET_ALIGN(PGUITHREADINFO, 4) -} - -static void test_pack_PHARDWAREHOOKSTRUCT(void) -{ - /* PHARDWAREHOOKSTRUCT */ - TEST_TYPE_SIZE (PHARDWAREHOOKSTRUCT, 4) - TEST_TYPE_ALIGN (PHARDWAREHOOKSTRUCT, 4) - TEST_TARGET_SIZE (PHARDWAREHOOKSTRUCT, 16) - TEST_TARGET_ALIGN(PHARDWAREHOOKSTRUCT, 4) -} - -static void test_pack_PHARDWAREINPUT(void) -{ - /* PHARDWAREINPUT */ - TEST_TYPE_SIZE (PHARDWAREINPUT, 4) - TEST_TYPE_ALIGN (PHARDWAREINPUT, 4) - TEST_TARGET_SIZE (PHARDWAREINPUT, 8) - TEST_TARGET_ALIGN(PHARDWAREINPUT, 4) -} - -static void test_pack_PHDEVNOTIFY(void) -{ - /* PHDEVNOTIFY */ - TEST_TYPE_SIZE (PHDEVNOTIFY, 4) - TEST_TYPE_ALIGN (PHDEVNOTIFY, 4) - TEST_TARGET_SIZE (PHDEVNOTIFY, 4) - TEST_TARGET_ALIGN(PHDEVNOTIFY, 4) -} - -static void test_pack_PHELPWININFOA(void) -{ - /* PHELPWININFOA */ - TEST_TYPE_SIZE (PHELPWININFOA, 4) - TEST_TYPE_ALIGN (PHELPWININFOA, 4) - TEST_TARGET_SIZE (PHELPWININFOA, 28) - TEST_TARGET_ALIGN(PHELPWININFOA, 4) -} - -static void test_pack_PHELPWININFOW(void) -{ - /* PHELPWININFOW */ - TEST_TYPE_SIZE (PHELPWININFOW, 4) - TEST_TYPE_ALIGN (PHELPWININFOW, 4) - TEST_TARGET_SIZE (PHELPWININFOW, 28) - TEST_TARGET_ALIGN(PHELPWININFOW, 4) -} - -static void test_pack_PICONINFO(void) -{ - /* PICONINFO */ - TEST_TYPE_SIZE (PICONINFO, 4) - TEST_TYPE_ALIGN (PICONINFO, 4) - TEST_TARGET_SIZE (PICONINFO, 20) - TEST_TARGET_ALIGN(PICONINFO, 4) -} - -static void test_pack_PICONMETRICSA(void) -{ - /* PICONMETRICSA */ - TEST_TYPE_SIZE (PICONMETRICSA, 4) - TEST_TYPE_ALIGN (PICONMETRICSA, 4) - TEST_TARGET_SIZE (PICONMETRICSA, 76) - TEST_TARGET_ALIGN(PICONMETRICSA, 4) -} - -static void test_pack_PICONMETRICSW(void) -{ - /* PICONMETRICSW */ - TEST_TYPE_SIZE (PICONMETRICSW, 4) - TEST_TYPE_ALIGN (PICONMETRICSW, 4) - TEST_TARGET_SIZE (PICONMETRICSW, 108) - TEST_TARGET_ALIGN(PICONMETRICSW, 4) -} - -static void test_pack_PINPUT(void) -{ - /* PINPUT */ - TEST_TYPE_SIZE (PINPUT, 4) - TEST_TYPE_ALIGN (PINPUT, 4) -} - -static void test_pack_PKBDLLHOOKSTRUCT(void) -{ - /* PKBDLLHOOKSTRUCT */ - TEST_TYPE_SIZE (PKBDLLHOOKSTRUCT, 4) - TEST_TYPE_ALIGN (PKBDLLHOOKSTRUCT, 4) - TEST_TARGET_SIZE (PKBDLLHOOKSTRUCT, 20) - TEST_TARGET_ALIGN(PKBDLLHOOKSTRUCT, 4) -} - -static void test_pack_PKEYBDINPUT(void) -{ - /* PKEYBDINPUT */ - TEST_TYPE_SIZE (PKEYBDINPUT, 4) - TEST_TYPE_ALIGN (PKEYBDINPUT, 4) - TEST_TARGET_SIZE (PKEYBDINPUT, 16) - TEST_TARGET_ALIGN(PKEYBDINPUT, 4) -} - -static void test_pack_PMDINEXTMENU(void) -{ - /* PMDINEXTMENU */ - TEST_TYPE_SIZE (PMDINEXTMENU, 4) - TEST_TYPE_ALIGN (PMDINEXTMENU, 4) - TEST_TARGET_SIZE (PMDINEXTMENU, 12) - TEST_TARGET_ALIGN(PMDINEXTMENU, 4) -} - -static void test_pack_PMEASUREITEMSTRUCT(void) -{ - /* PMEASUREITEMSTRUCT */ - TEST_TYPE_SIZE (PMEASUREITEMSTRUCT, 4) - TEST_TYPE_ALIGN (PMEASUREITEMSTRUCT, 4) - TEST_TARGET_SIZE (PMEASUREITEMSTRUCT, 24) - TEST_TARGET_ALIGN(PMEASUREITEMSTRUCT, 4) -} - -static void test_pack_PMENUITEMTEMPLATE(void) -{ - /* PMENUITEMTEMPLATE */ - TEST_TYPE_SIZE (PMENUITEMTEMPLATE, 4) - TEST_TYPE_ALIGN (PMENUITEMTEMPLATE, 4) - TEST_TARGET_SIZE (PMENUITEMTEMPLATE, 6) - TEST_TARGET_ALIGN(PMENUITEMTEMPLATE, 2) -} - -static void test_pack_PMENUITEMTEMPLATEHEADER(void) -{ - /* PMENUITEMTEMPLATEHEADER */ - TEST_TYPE_SIZE (PMENUITEMTEMPLATEHEADER, 4) - TEST_TYPE_ALIGN (PMENUITEMTEMPLATEHEADER, 4) - TEST_TARGET_SIZE (PMENUITEMTEMPLATEHEADER, 4) - TEST_TARGET_ALIGN(PMENUITEMTEMPLATEHEADER, 2) -} - -static void test_pack_PMINIMIZEDMETRICS(void) -{ - /* PMINIMIZEDMETRICS */ - TEST_TYPE_SIZE (PMINIMIZEDMETRICS, 4) - TEST_TYPE_ALIGN (PMINIMIZEDMETRICS, 4) - TEST_TARGET_SIZE (PMINIMIZEDMETRICS, 20) - TEST_TARGET_ALIGN(PMINIMIZEDMETRICS, 4) -} - -static void test_pack_PMINMAXINFO(void) -{ - /* PMINMAXINFO */ - TEST_TYPE_SIZE (PMINMAXINFO, 4) - TEST_TYPE_ALIGN (PMINMAXINFO, 4) - TEST_TARGET_SIZE (PMINMAXINFO, 40) - TEST_TARGET_ALIGN(PMINMAXINFO, 4) -} - -static void test_pack_PMOUSEHOOKSTRUCT(void) -{ - /* PMOUSEHOOKSTRUCT */ - TEST_TYPE_SIZE (PMOUSEHOOKSTRUCT, 4) - TEST_TYPE_ALIGN (PMOUSEHOOKSTRUCT, 4) - TEST_TARGET_SIZE (PMOUSEHOOKSTRUCT, 20) - TEST_TARGET_ALIGN(PMOUSEHOOKSTRUCT, 4) -} - -static void test_pack_PMOUSEINPUT(void) -{ - /* PMOUSEINPUT */ - TEST_TYPE_SIZE (PMOUSEINPUT, 4) - TEST_TYPE_ALIGN (PMOUSEINPUT, 4) - TEST_TARGET_SIZE (PMOUSEINPUT, 24) - TEST_TARGET_ALIGN(PMOUSEINPUT, 4) -} - -static void test_pack_PMSG(void) -{ - /* PMSG */ - TEST_TYPE_SIZE (PMSG, 4) - TEST_TYPE_ALIGN (PMSG, 4) - TEST_TARGET_SIZE (PMSG, 28) - TEST_TARGET_ALIGN(PMSG, 4) -} - -static void test_pack_PMSGBOXPARAMSA(void) -{ - /* PMSGBOXPARAMSA */ - TEST_TYPE_SIZE (PMSGBOXPARAMSA, 4) - TEST_TYPE_ALIGN (PMSGBOXPARAMSA, 4) - TEST_TARGET_SIZE (PMSGBOXPARAMSA, 40) - TEST_TARGET_ALIGN(PMSGBOXPARAMSA, 4) -} - -static void test_pack_PMSGBOXPARAMSW(void) -{ - /* PMSGBOXPARAMSW */ - TEST_TYPE_SIZE (PMSGBOXPARAMSW, 4) - TEST_TYPE_ALIGN (PMSGBOXPARAMSW, 4) - TEST_TARGET_SIZE (PMSGBOXPARAMSW, 40) - TEST_TARGET_ALIGN(PMSGBOXPARAMSW, 4) -} - -static void test_pack_PMSLLHOOKSTRUCT(void) -{ - /* PMSLLHOOKSTRUCT */ - TEST_TYPE_SIZE (PMSLLHOOKSTRUCT, 4) - TEST_TYPE_ALIGN (PMSLLHOOKSTRUCT, 4) - TEST_TARGET_SIZE (PMSLLHOOKSTRUCT, 24) - TEST_TARGET_ALIGN(PMSLLHOOKSTRUCT, 4) -} - -static void test_pack_PMULTIKEYHELPA(void) -{ - /* PMULTIKEYHELPA */ - TEST_TYPE_SIZE (PMULTIKEYHELPA, 4) - TEST_TYPE_ALIGN (PMULTIKEYHELPA, 4) - TEST_TARGET_SIZE (PMULTIKEYHELPA, 8) - TEST_TARGET_ALIGN(PMULTIKEYHELPA, 4) -} - -static void test_pack_PMULTIKEYHELPW(void) -{ - /* PMULTIKEYHELPW */ - TEST_TYPE_SIZE (PMULTIKEYHELPW, 4) - TEST_TYPE_ALIGN (PMULTIKEYHELPW, 4) - TEST_TARGET_SIZE (PMULTIKEYHELPW, 8) - TEST_TARGET_ALIGN(PMULTIKEYHELPW, 4) -} - -static void test_pack_PNONCLIENTMETRICSA(void) -{ - /* PNONCLIENTMETRICSA */ - TEST_TYPE_SIZE (PNONCLIENTMETRICSA, 4) - TEST_TYPE_ALIGN (PNONCLIENTMETRICSA, 4) - TEST_TARGET_SIZE (PNONCLIENTMETRICSA, 340) - TEST_TARGET_ALIGN(PNONCLIENTMETRICSA, 4) -} - -static void test_pack_PNONCLIENTMETRICSW(void) -{ - /* PNONCLIENTMETRICSW */ - TEST_TYPE_SIZE (PNONCLIENTMETRICSW, 4) - TEST_TYPE_ALIGN (PNONCLIENTMETRICSW, 4) - TEST_TARGET_SIZE (PNONCLIENTMETRICSW, 500) - TEST_TARGET_ALIGN(PNONCLIENTMETRICSW, 4) -} - -static void test_pack_PPAINTSTRUCT(void) -{ - /* PPAINTSTRUCT */ - TEST_TYPE_SIZE (PPAINTSTRUCT, 4) - TEST_TYPE_ALIGN (PPAINTSTRUCT, 4) - TEST_TARGET_SIZE (PPAINTSTRUCT, 64) - TEST_TARGET_ALIGN(PPAINTSTRUCT, 4) -} - -static void test_pack_PROPENUMPROCA(void) -{ - /* PROPENUMPROCA */ - TEST_TYPE_SIZE (PROPENUMPROCA, 4) - TEST_TYPE_ALIGN (PROPENUMPROCA, 4) -} - -static void test_pack_PROPENUMPROCEXA(void) -{ - /* PROPENUMPROCEXA */ - TEST_TYPE_SIZE (PROPENUMPROCEXA, 4) - TEST_TYPE_ALIGN (PROPENUMPROCEXA, 4) -} - -static void test_pack_PROPENUMPROCEXW(void) -{ - /* PROPENUMPROCEXW */ - TEST_TYPE_SIZE (PROPENUMPROCEXW, 4) - TEST_TYPE_ALIGN (PROPENUMPROCEXW, 4) -} - -static void test_pack_PROPENUMPROCW(void) -{ - /* PROPENUMPROCW */ - TEST_TYPE_SIZE (PROPENUMPROCW, 4) - TEST_TYPE_ALIGN (PROPENUMPROCW, 4) -} - -static void test_pack_PTITLEBARINFO(void) -{ - /* PTITLEBARINFO */ - TEST_TYPE_SIZE (PTITLEBARINFO, 4) - TEST_TYPE_ALIGN (PTITLEBARINFO, 4) - TEST_TARGET_SIZE (PTITLEBARINFO, 44) - TEST_TARGET_ALIGN(PTITLEBARINFO, 4) -} - -static void test_pack_PUSEROBJECTFLAGS(void) -{ - /* PUSEROBJECTFLAGS */ - TEST_TYPE_SIZE (PUSEROBJECTFLAGS, 4) - TEST_TYPE_ALIGN (PUSEROBJECTFLAGS, 4) - TEST_TARGET_SIZE (PUSEROBJECTFLAGS, 12) - TEST_TARGET_ALIGN(PUSEROBJECTFLAGS, 4) -} - -static void test_pack_PWINDOWINFO(void) -{ - /* PWINDOWINFO */ - TEST_TYPE_SIZE (PWINDOWINFO, 4) - TEST_TYPE_ALIGN (PWINDOWINFO, 4) - TEST_TARGET_SIZE (PWINDOWINFO, 60) - TEST_TARGET_ALIGN(PWINDOWINFO, 4) -} - -static void test_pack_PWINDOWPLACEMENT(void) -{ - /* PWINDOWPLACEMENT */ - TEST_TYPE_SIZE (PWINDOWPLACEMENT, 4) - TEST_TYPE_ALIGN (PWINDOWPLACEMENT, 4) - TEST_TARGET_SIZE (PWINDOWPLACEMENT, 44) - TEST_TARGET_ALIGN(PWINDOWPLACEMENT, 4) -} - -static void test_pack_PWINDOWPOS(void) -{ - /* PWINDOWPOS */ - TEST_TYPE_SIZE (PWINDOWPOS, 4) - TEST_TYPE_ALIGN (PWINDOWPOS, 4) - TEST_TARGET_SIZE (PWINDOWPOS, 28) - TEST_TARGET_ALIGN(PWINDOWPOS, 4) -} - -static void test_pack_PWNDCLASSA(void) -{ - /* PWNDCLASSA */ - TEST_TYPE_SIZE (PWNDCLASSA, 4) - TEST_TYPE_ALIGN (PWNDCLASSA, 4) - TEST_TARGET_SIZE (PWNDCLASSA, 40) - TEST_TARGET_ALIGN(PWNDCLASSA, 4) -} - -static void test_pack_PWNDCLASSEXA(void) -{ - /* PWNDCLASSEXA */ - TEST_TYPE_SIZE (PWNDCLASSEXA, 4) - TEST_TYPE_ALIGN (PWNDCLASSEXA, 4) - TEST_TARGET_SIZE (PWNDCLASSEXA, 48) - TEST_TARGET_ALIGN(PWNDCLASSEXA, 4) -} - -static void test_pack_PWNDCLASSEXW(void) -{ - /* PWNDCLASSEXW */ - TEST_TYPE_SIZE (PWNDCLASSEXW, 4) - TEST_TYPE_ALIGN (PWNDCLASSEXW, 4) - TEST_TARGET_SIZE (PWNDCLASSEXW, 48) - TEST_TARGET_ALIGN(PWNDCLASSEXW, 4) -} - -static void test_pack_PWNDCLASSW(void) -{ - /* PWNDCLASSW */ - TEST_TYPE_SIZE (PWNDCLASSW, 4) - TEST_TYPE_ALIGN (PWNDCLASSW, 4) - TEST_TARGET_SIZE (PWNDCLASSW, 40) - TEST_TARGET_ALIGN(PWNDCLASSW, 4) -} - -static void test_pack_SCROLLINFO(void) -{ - /* SCROLLINFO */ - TEST_TYPE_SIZE (SCROLLINFO, 28) - TEST_TYPE_ALIGN (SCROLLINFO, 4) - TEST_FIELD_SIZE (SCROLLINFO, cbSize, 4) - TEST_FIELD_ALIGN (SCROLLINFO, cbSize, 4) - TEST_FIELD_OFFSET(SCROLLINFO, cbSize, 0) - TEST_FIELD_SIZE (SCROLLINFO, fMask, 4) - TEST_FIELD_ALIGN (SCROLLINFO, fMask, 4) - TEST_FIELD_OFFSET(SCROLLINFO, fMask, 4) - TEST_FIELD_SIZE (SCROLLINFO, nMin, 4) - TEST_FIELD_ALIGN (SCROLLINFO, nMin, 4) - TEST_FIELD_OFFSET(SCROLLINFO, nMin, 8) - TEST_FIELD_SIZE (SCROLLINFO, nMax, 4) - TEST_FIELD_ALIGN (SCROLLINFO, nMax, 4) - TEST_FIELD_OFFSET(SCROLLINFO, nMax, 12) - TEST_FIELD_SIZE (SCROLLINFO, nPage, 4) - TEST_FIELD_ALIGN (SCROLLINFO, nPage, 4) - TEST_FIELD_OFFSET(SCROLLINFO, nPage, 16) - TEST_FIELD_SIZE (SCROLLINFO, nPos, 4) - TEST_FIELD_ALIGN (SCROLLINFO, nPos, 4) - TEST_FIELD_OFFSET(SCROLLINFO, nPos, 20) - TEST_FIELD_SIZE (SCROLLINFO, nTrackPos, 4) - TEST_FIELD_ALIGN (SCROLLINFO, nTrackPos, 4) - TEST_FIELD_OFFSET(SCROLLINFO, nTrackPos, 24) -} - -static void test_pack_SENDASYNCPROC(void) -{ - /* SENDASYNCPROC */ - TEST_TYPE_SIZE (SENDASYNCPROC, 4) - TEST_TYPE_ALIGN (SENDASYNCPROC, 4) -} - -static void test_pack_SERIALKEYSA(void) -{ - /* SERIALKEYSA */ - TEST_TYPE_SIZE (SERIALKEYSA, 28) - TEST_TYPE_ALIGN (SERIALKEYSA, 4) - TEST_FIELD_SIZE (SERIALKEYSA, cbSize, 4) - TEST_FIELD_ALIGN (SERIALKEYSA, cbSize, 4) - TEST_FIELD_OFFSET(SERIALKEYSA, cbSize, 0) - TEST_FIELD_SIZE (SERIALKEYSA, dwFlags, 4) - TEST_FIELD_ALIGN (SERIALKEYSA, dwFlags, 4) - TEST_FIELD_OFFSET(SERIALKEYSA, dwFlags, 4) - TEST_FIELD_SIZE (SERIALKEYSA, lpszActivePort, 4) - TEST_FIELD_ALIGN (SERIALKEYSA, lpszActivePort, 4) - TEST_FIELD_OFFSET(SERIALKEYSA, lpszActivePort, 8) - TEST_FIELD_SIZE (SERIALKEYSA, lpszPort, 4) - TEST_FIELD_ALIGN (SERIALKEYSA, lpszPort, 4) - TEST_FIELD_OFFSET(SERIALKEYSA, lpszPort, 12) - TEST_FIELD_SIZE (SERIALKEYSA, iBaudRate, 4) - TEST_FIELD_ALIGN (SERIALKEYSA, iBaudRate, 4) - TEST_FIELD_OFFSET(SERIALKEYSA, iBaudRate, 16) - TEST_FIELD_SIZE (SERIALKEYSA, iPortState, 4) - TEST_FIELD_ALIGN (SERIALKEYSA, iPortState, 4) - TEST_FIELD_OFFSET(SERIALKEYSA, iPortState, 20) - TEST_FIELD_SIZE (SERIALKEYSA, iActive, 4) - TEST_FIELD_ALIGN (SERIALKEYSA, iActive, 4) - TEST_FIELD_OFFSET(SERIALKEYSA, iActive, 24) -} - -static void test_pack_SERIALKEYSW(void) -{ - /* SERIALKEYSW */ - TEST_TYPE_SIZE (SERIALKEYSW, 28) - TEST_TYPE_ALIGN (SERIALKEYSW, 4) - TEST_FIELD_SIZE (SERIALKEYSW, cbSize, 4) - TEST_FIELD_ALIGN (SERIALKEYSW, cbSize, 4) - TEST_FIELD_OFFSET(SERIALKEYSW, cbSize, 0) - TEST_FIELD_SIZE (SERIALKEYSW, dwFlags, 4) - TEST_FIELD_ALIGN (SERIALKEYSW, dwFlags, 4) - TEST_FIELD_OFFSET(SERIALKEYSW, dwFlags, 4) - TEST_FIELD_SIZE (SERIALKEYSW, lpszActivePort, 4) - TEST_FIELD_ALIGN (SERIALKEYSW, lpszActivePort, 4) - TEST_FIELD_OFFSET(SERIALKEYSW, lpszActivePort, 8) - TEST_FIELD_SIZE (SERIALKEYSW, lpszPort, 4) - TEST_FIELD_ALIGN (SERIALKEYSW, lpszPort, 4) - TEST_FIELD_OFFSET(SERIALKEYSW, lpszPort, 12) - TEST_FIELD_SIZE (SERIALKEYSW, iBaudRate, 4) - TEST_FIELD_ALIGN (SERIALKEYSW, iBaudRate, 4) - TEST_FIELD_OFFSET(SERIALKEYSW, iBaudRate, 16) - TEST_FIELD_SIZE (SERIALKEYSW, iPortState, 4) - TEST_FIELD_ALIGN (SERIALKEYSW, iPortState, 4) - TEST_FIELD_OFFSET(SERIALKEYSW, iPortState, 20) - TEST_FIELD_SIZE (SERIALKEYSW, iActive, 4) - TEST_FIELD_ALIGN (SERIALKEYSW, iActive, 4) - TEST_FIELD_OFFSET(SERIALKEYSW, iActive, 24) -} - -static void test_pack_SOUNDSENTRYA(void) -{ - /* SOUNDSENTRYA */ - TEST_TYPE_SIZE (SOUNDSENTRYA, 48) - TEST_TYPE_ALIGN (SOUNDSENTRYA, 4) - TEST_FIELD_SIZE (SOUNDSENTRYA, cbSize, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYA, cbSize, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYA, cbSize, 0) - TEST_FIELD_SIZE (SOUNDSENTRYA, dwFlags, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYA, dwFlags, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYA, dwFlags, 4) - TEST_FIELD_SIZE (SOUNDSENTRYA, iFSTextEffect, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYA, iFSTextEffect, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYA, iFSTextEffect, 8) - TEST_FIELD_SIZE (SOUNDSENTRYA, iFSTextEffectMSec, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYA, iFSTextEffectMSec, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYA, iFSTextEffectMSec, 12) - TEST_FIELD_SIZE (SOUNDSENTRYA, iFSTextEffectColorBits, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYA, iFSTextEffectColorBits, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYA, iFSTextEffectColorBits, 16) - TEST_FIELD_SIZE (SOUNDSENTRYA, iFSGrafEffect, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYA, iFSGrafEffect, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYA, iFSGrafEffect, 20) - TEST_FIELD_SIZE (SOUNDSENTRYA, iFSGrafEffectMSec, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYA, iFSGrafEffectMSec, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYA, iFSGrafEffectMSec, 24) - TEST_FIELD_SIZE (SOUNDSENTRYA, iFSGrafEffectColor, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYA, iFSGrafEffectColor, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYA, iFSGrafEffectColor, 28) - TEST_FIELD_SIZE (SOUNDSENTRYA, iWindowsEffect, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYA, iWindowsEffect, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYA, iWindowsEffect, 32) - TEST_FIELD_SIZE (SOUNDSENTRYA, iWindowsEffectMSec, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYA, iWindowsEffectMSec, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYA, iWindowsEffectMSec, 36) - TEST_FIELD_SIZE (SOUNDSENTRYA, lpszWindowsEffectDLL, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYA, lpszWindowsEffectDLL, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYA, lpszWindowsEffectDLL, 40) - TEST_FIELD_SIZE (SOUNDSENTRYA, iWindowsEffectOrdinal, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYA, iWindowsEffectOrdinal, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYA, iWindowsEffectOrdinal, 44) -} - -static void test_pack_SOUNDSENTRYW(void) -{ - /* SOUNDSENTRYW */ - TEST_TYPE_SIZE (SOUNDSENTRYW, 48) - TEST_TYPE_ALIGN (SOUNDSENTRYW, 4) - TEST_FIELD_SIZE (SOUNDSENTRYW, cbSize, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYW, cbSize, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYW, cbSize, 0) - TEST_FIELD_SIZE (SOUNDSENTRYW, dwFlags, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYW, dwFlags, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYW, dwFlags, 4) - TEST_FIELD_SIZE (SOUNDSENTRYW, iFSTextEffect, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYW, iFSTextEffect, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYW, iFSTextEffect, 8) - TEST_FIELD_SIZE (SOUNDSENTRYW, iFSTextEffectMSec, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYW, iFSTextEffectMSec, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYW, iFSTextEffectMSec, 12) - TEST_FIELD_SIZE (SOUNDSENTRYW, iFSTextEffectColorBits, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYW, iFSTextEffectColorBits, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYW, iFSTextEffectColorBits, 16) - TEST_FIELD_SIZE (SOUNDSENTRYW, iFSGrafEffect, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYW, iFSGrafEffect, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYW, iFSGrafEffect, 20) - TEST_FIELD_SIZE (SOUNDSENTRYW, iFSGrafEffectMSec, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYW, iFSGrafEffectMSec, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYW, iFSGrafEffectMSec, 24) - TEST_FIELD_SIZE (SOUNDSENTRYW, iFSGrafEffectColor, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYW, iFSGrafEffectColor, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYW, iFSGrafEffectColor, 28) - TEST_FIELD_SIZE (SOUNDSENTRYW, iWindowsEffect, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYW, iWindowsEffect, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYW, iWindowsEffect, 32) - TEST_FIELD_SIZE (SOUNDSENTRYW, iWindowsEffectMSec, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYW, iWindowsEffectMSec, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYW, iWindowsEffectMSec, 36) - TEST_FIELD_SIZE (SOUNDSENTRYW, lpszWindowsEffectDLL, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYW, lpszWindowsEffectDLL, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYW, lpszWindowsEffectDLL, 40) - TEST_FIELD_SIZE (SOUNDSENTRYW, iWindowsEffectOrdinal, 4) - TEST_FIELD_ALIGN (SOUNDSENTRYW, iWindowsEffectOrdinal, 4) - TEST_FIELD_OFFSET(SOUNDSENTRYW, iWindowsEffectOrdinal, 44) -} - -static void test_pack_STICKYKEYS(void) -{ - /* STICKYKEYS */ - TEST_TYPE_SIZE (STICKYKEYS, 8) - TEST_TYPE_ALIGN (STICKYKEYS, 4) - TEST_FIELD_SIZE (STICKYKEYS, cbSize, 4) - TEST_FIELD_ALIGN (STICKYKEYS, cbSize, 4) - TEST_FIELD_OFFSET(STICKYKEYS, cbSize, 0) - TEST_FIELD_SIZE (STICKYKEYS, dwFlags, 4) - TEST_FIELD_ALIGN (STICKYKEYS, dwFlags, 4) - TEST_FIELD_OFFSET(STICKYKEYS, dwFlags, 4) -} - -static void test_pack_STYLESTRUCT(void) -{ - /* STYLESTRUCT */ - TEST_TYPE_SIZE (STYLESTRUCT, 8) - TEST_TYPE_ALIGN (STYLESTRUCT, 4) - TEST_FIELD_SIZE (STYLESTRUCT, styleOld, 4) - TEST_FIELD_ALIGN (STYLESTRUCT, styleOld, 4) - TEST_FIELD_OFFSET(STYLESTRUCT, styleOld, 0) - TEST_FIELD_SIZE (STYLESTRUCT, styleNew, 4) - TEST_FIELD_ALIGN (STYLESTRUCT, styleNew, 4) - TEST_FIELD_OFFSET(STYLESTRUCT, styleNew, 4) -} - -static void test_pack_TIMERPROC(void) -{ - /* TIMERPROC */ - TEST_TYPE_SIZE (TIMERPROC, 4) - TEST_TYPE_ALIGN (TIMERPROC, 4) -} - -static void test_pack_TITLEBARINFO(void) -{ - /* TITLEBARINFO */ - TEST_TYPE_SIZE (TITLEBARINFO, 44) - TEST_TYPE_ALIGN (TITLEBARINFO, 4) - TEST_FIELD_SIZE (TITLEBARINFO, cbSize, 4) - TEST_FIELD_ALIGN (TITLEBARINFO, cbSize, 4) - TEST_FIELD_OFFSET(TITLEBARINFO, cbSize, 0) - TEST_FIELD_SIZE (TITLEBARINFO, rcTitleBar, 16) - TEST_FIELD_ALIGN (TITLEBARINFO, rcTitleBar, 4) - TEST_FIELD_OFFSET(TITLEBARINFO, rcTitleBar, 4) - TEST_FIELD_SIZE (TITLEBARINFO, rgstate, 24) - TEST_FIELD_ALIGN (TITLEBARINFO, rgstate, 4) - TEST_FIELD_OFFSET(TITLEBARINFO, rgstate, 20) -} - -static void test_pack_TOGGLEKEYS(void) -{ - /* TOGGLEKEYS */ - TEST_TYPE_SIZE (TOGGLEKEYS, 8) - TEST_TYPE_ALIGN (TOGGLEKEYS, 4) - TEST_FIELD_SIZE (TOGGLEKEYS, cbSize, 4) - TEST_FIELD_ALIGN (TOGGLEKEYS, cbSize, 4) - TEST_FIELD_OFFSET(TOGGLEKEYS, cbSize, 0) - TEST_FIELD_SIZE (TOGGLEKEYS, dwFlags, 4) - TEST_FIELD_ALIGN (TOGGLEKEYS, dwFlags, 4) - TEST_FIELD_OFFSET(TOGGLEKEYS, dwFlags, 4) -} - -static void test_pack_TPMPARAMS(void) -{ - /* TPMPARAMS */ - TEST_TYPE_SIZE (TPMPARAMS, 20) - TEST_TYPE_ALIGN (TPMPARAMS, 4) - TEST_FIELD_SIZE (TPMPARAMS, cbSize, 4) - TEST_FIELD_ALIGN (TPMPARAMS, cbSize, 4) - TEST_FIELD_OFFSET(TPMPARAMS, cbSize, 0) - TEST_FIELD_SIZE (TPMPARAMS, rcExclude, 16) - TEST_FIELD_ALIGN (TPMPARAMS, rcExclude, 4) - TEST_FIELD_OFFSET(TPMPARAMS, rcExclude, 4) -} - -static void test_pack_TRACKMOUSEEVENT(void) -{ - /* TRACKMOUSEEVENT */ - TEST_TYPE_SIZE (TRACKMOUSEEVENT, 16) - TEST_TYPE_ALIGN (TRACKMOUSEEVENT, 4) - TEST_FIELD_SIZE (TRACKMOUSEEVENT, cbSize, 4) - TEST_FIELD_ALIGN (TRACKMOUSEEVENT, cbSize, 4) - TEST_FIELD_OFFSET(TRACKMOUSEEVENT, cbSize, 0) - TEST_FIELD_SIZE (TRACKMOUSEEVENT, dwFlags, 4) - TEST_FIELD_ALIGN (TRACKMOUSEEVENT, dwFlags, 4) - TEST_FIELD_OFFSET(TRACKMOUSEEVENT, dwFlags, 4) - TEST_FIELD_SIZE (TRACKMOUSEEVENT, hwndTrack, 4) - TEST_FIELD_ALIGN (TRACKMOUSEEVENT, hwndTrack, 4) - TEST_FIELD_OFFSET(TRACKMOUSEEVENT, hwndTrack, 8) - TEST_FIELD_SIZE (TRACKMOUSEEVENT, dwHoverTime, 4) - TEST_FIELD_ALIGN (TRACKMOUSEEVENT, dwHoverTime, 4) - TEST_FIELD_OFFSET(TRACKMOUSEEVENT, dwHoverTime, 12) -} - -static void test_pack_USEROBJECTFLAGS(void) -{ - /* USEROBJECTFLAGS */ - TEST_TYPE_SIZE (USEROBJECTFLAGS, 12) - TEST_TYPE_ALIGN (USEROBJECTFLAGS, 4) - TEST_FIELD_SIZE (USEROBJECTFLAGS, fInherit, 4) - TEST_FIELD_ALIGN (USEROBJECTFLAGS, fInherit, 4) - TEST_FIELD_OFFSET(USEROBJECTFLAGS, fInherit, 0) - TEST_FIELD_SIZE (USEROBJECTFLAGS, fReserved, 4) - TEST_FIELD_ALIGN (USEROBJECTFLAGS, fReserved, 4) - TEST_FIELD_OFFSET(USEROBJECTFLAGS, fReserved, 4) - TEST_FIELD_SIZE (USEROBJECTFLAGS, dwFlags, 4) - TEST_FIELD_ALIGN (USEROBJECTFLAGS, dwFlags, 4) - TEST_FIELD_OFFSET(USEROBJECTFLAGS, dwFlags, 8) -} - -static void test_pack_WINDOWINFO(void) -{ - /* WINDOWINFO */ - TEST_TYPE_SIZE (WINDOWINFO, 60) - TEST_TYPE_ALIGN (WINDOWINFO, 4) - TEST_FIELD_SIZE (WINDOWINFO, cbSize, 4) - TEST_FIELD_ALIGN (WINDOWINFO, cbSize, 4) - TEST_FIELD_OFFSET(WINDOWINFO, cbSize, 0) - TEST_FIELD_SIZE (WINDOWINFO, rcWindow, 16) - TEST_FIELD_ALIGN (WINDOWINFO, rcWindow, 4) - TEST_FIELD_OFFSET(WINDOWINFO, rcWindow, 4) - TEST_FIELD_SIZE (WINDOWINFO, rcClient, 16) - TEST_FIELD_ALIGN (WINDOWINFO, rcClient, 4) - TEST_FIELD_OFFSET(WINDOWINFO, rcClient, 20) - TEST_FIELD_SIZE (WINDOWINFO, dwStyle, 4) - TEST_FIELD_ALIGN (WINDOWINFO, dwStyle, 4) - TEST_FIELD_OFFSET(WINDOWINFO, dwStyle, 36) - TEST_FIELD_SIZE (WINDOWINFO, dwExStyle, 4) - TEST_FIELD_ALIGN (WINDOWINFO, dwExStyle, 4) - TEST_FIELD_OFFSET(WINDOWINFO, dwExStyle, 40) - TEST_FIELD_SIZE (WINDOWINFO, dwWindowStatus, 4) - TEST_FIELD_ALIGN (WINDOWINFO, dwWindowStatus, 4) - TEST_FIELD_OFFSET(WINDOWINFO, dwWindowStatus, 44) - TEST_FIELD_SIZE (WINDOWINFO, cxWindowBorders, 4) - TEST_FIELD_ALIGN (WINDOWINFO, cxWindowBorders, 4) - TEST_FIELD_OFFSET(WINDOWINFO, cxWindowBorders, 48) - TEST_FIELD_SIZE (WINDOWINFO, cyWindowBorders, 4) - TEST_FIELD_ALIGN (WINDOWINFO, cyWindowBorders, 4) - TEST_FIELD_OFFSET(WINDOWINFO, cyWindowBorders, 52) - TEST_FIELD_SIZE (WINDOWINFO, atomWindowType, 2) - TEST_FIELD_ALIGN (WINDOWINFO, atomWindowType, 2) - TEST_FIELD_OFFSET(WINDOWINFO, atomWindowType, 56) - TEST_FIELD_SIZE (WINDOWINFO, wCreatorVersion, 2) - TEST_FIELD_ALIGN (WINDOWINFO, wCreatorVersion, 2) - TEST_FIELD_OFFSET(WINDOWINFO, wCreatorVersion, 58) -} - -static void test_pack_WINDOWPLACEMENT(void) -{ - /* WINDOWPLACEMENT */ - TEST_TYPE_SIZE (WINDOWPLACEMENT, 44) - TEST_TYPE_ALIGN (WINDOWPLACEMENT, 4) - TEST_FIELD_SIZE (WINDOWPLACEMENT, length, 4) - TEST_FIELD_ALIGN (WINDOWPLACEMENT, length, 4) - TEST_FIELD_OFFSET(WINDOWPLACEMENT, length, 0) - TEST_FIELD_SIZE (WINDOWPLACEMENT, flags, 4) - TEST_FIELD_ALIGN (WINDOWPLACEMENT, flags, 4) - TEST_FIELD_OFFSET(WINDOWPLACEMENT, flags, 4) - TEST_FIELD_SIZE (WINDOWPLACEMENT, showCmd, 4) - TEST_FIELD_ALIGN (WINDOWPLACEMENT, showCmd, 4) - TEST_FIELD_OFFSET(WINDOWPLACEMENT, showCmd, 8) - TEST_FIELD_SIZE (WINDOWPLACEMENT, ptMinPosition, 8) - TEST_FIELD_ALIGN (WINDOWPLACEMENT, ptMinPosition, 4) - TEST_FIELD_OFFSET(WINDOWPLACEMENT, ptMinPosition, 12) - TEST_FIELD_SIZE (WINDOWPLACEMENT, ptMaxPosition, 8) - TEST_FIELD_ALIGN (WINDOWPLACEMENT, ptMaxPosition, 4) - TEST_FIELD_OFFSET(WINDOWPLACEMENT, ptMaxPosition, 20) - TEST_FIELD_SIZE (WINDOWPLACEMENT, rcNormalPosition, 16) - TEST_FIELD_ALIGN (WINDOWPLACEMENT, rcNormalPosition, 4) - TEST_FIELD_OFFSET(WINDOWPLACEMENT, rcNormalPosition, 28) -} - -static void test_pack_WINDOWPOS(void) -{ - /* WINDOWPOS */ - TEST_TYPE_SIZE (WINDOWPOS, 28) - TEST_TYPE_ALIGN (WINDOWPOS, 4) - TEST_FIELD_SIZE (WINDOWPOS, hwnd, 4) - TEST_FIELD_ALIGN (WINDOWPOS, hwnd, 4) - TEST_FIELD_OFFSET(WINDOWPOS, hwnd, 0) - TEST_FIELD_SIZE (WINDOWPOS, hwndInsertAfter, 4) - TEST_FIELD_ALIGN (WINDOWPOS, hwndInsertAfter, 4) - TEST_FIELD_OFFSET(WINDOWPOS, hwndInsertAfter, 4) - TEST_FIELD_SIZE (WINDOWPOS, x, 4) - TEST_FIELD_ALIGN (WINDOWPOS, x, 4) - TEST_FIELD_OFFSET(WINDOWPOS, x, 8) - TEST_FIELD_SIZE (WINDOWPOS, y, 4) - TEST_FIELD_ALIGN (WINDOWPOS, y, 4) - TEST_FIELD_OFFSET(WINDOWPOS, y, 12) - TEST_FIELD_SIZE (WINDOWPOS, cx, 4) - TEST_FIELD_ALIGN (WINDOWPOS, cx, 4) - TEST_FIELD_OFFSET(WINDOWPOS, cx, 16) - TEST_FIELD_SIZE (WINDOWPOS, cy, 4) - TEST_FIELD_ALIGN (WINDOWPOS, cy, 4) - TEST_FIELD_OFFSET(WINDOWPOS, cy, 20) - TEST_FIELD_SIZE (WINDOWPOS, flags, 4) - TEST_FIELD_ALIGN (WINDOWPOS, flags, 4) - TEST_FIELD_OFFSET(WINDOWPOS, flags, 24) -} - -static void test_pack_WINEVENTPROC(void) -{ - /* WINEVENTPROC */ - TEST_TYPE_SIZE (WINEVENTPROC, 4) - TEST_TYPE_ALIGN (WINEVENTPROC, 4) -} - -static void test_pack_WINSTAENUMPROCA(void) -{ - /* WINSTAENUMPROCA */ - TEST_TYPE_SIZE (WINSTAENUMPROCA, 4) - TEST_TYPE_ALIGN (WINSTAENUMPROCA, 4) -} - -static void test_pack_WINSTAENUMPROCW(void) -{ - /* WINSTAENUMPROCW */ - TEST_TYPE_SIZE (WINSTAENUMPROCW, 4) - TEST_TYPE_ALIGN (WINSTAENUMPROCW, 4) -} - -static void test_pack_WNDCLASSA(void) -{ - /* WNDCLASSA */ - TEST_TYPE_SIZE (WNDCLASSA, 40) - TEST_TYPE_ALIGN (WNDCLASSA, 4) - TEST_FIELD_SIZE (WNDCLASSA, style, 4) - TEST_FIELD_ALIGN (WNDCLASSA, style, 4) - TEST_FIELD_OFFSET(WNDCLASSA, style, 0) - TEST_FIELD_SIZE (WNDCLASSA, lpfnWndProc, 4) - TEST_FIELD_ALIGN (WNDCLASSA, lpfnWndProc, 4) - TEST_FIELD_OFFSET(WNDCLASSA, lpfnWndProc, 4) - TEST_FIELD_SIZE (WNDCLASSA, cbClsExtra, 4) - TEST_FIELD_ALIGN (WNDCLASSA, cbClsExtra, 4) - TEST_FIELD_OFFSET(WNDCLASSA, cbClsExtra, 8) - TEST_FIELD_SIZE (WNDCLASSA, cbWndExtra, 4) - TEST_FIELD_ALIGN (WNDCLASSA, cbWndExtra, 4) - TEST_FIELD_OFFSET(WNDCLASSA, cbWndExtra, 12) - TEST_FIELD_SIZE (WNDCLASSA, hInstance, 4) - TEST_FIELD_ALIGN (WNDCLASSA, hInstance, 4) - TEST_FIELD_OFFSET(WNDCLASSA, hInstance, 16) - TEST_FIELD_SIZE (WNDCLASSA, hIcon, 4) - TEST_FIELD_ALIGN (WNDCLASSA, hIcon, 4) - TEST_FIELD_OFFSET(WNDCLASSA, hIcon, 20) - TEST_FIELD_SIZE (WNDCLASSA, hCursor, 4) - TEST_FIELD_ALIGN (WNDCLASSA, hCursor, 4) - TEST_FIELD_OFFSET(WNDCLASSA, hCursor, 24) - TEST_FIELD_SIZE (WNDCLASSA, hbrBackground, 4) - TEST_FIELD_ALIGN (WNDCLASSA, hbrBackground, 4) - TEST_FIELD_OFFSET(WNDCLASSA, hbrBackground, 28) - TEST_FIELD_SIZE (WNDCLASSA, lpszMenuName, 4) - TEST_FIELD_ALIGN (WNDCLASSA, lpszMenuName, 4) - TEST_FIELD_OFFSET(WNDCLASSA, lpszMenuName, 32) - TEST_FIELD_SIZE (WNDCLASSA, lpszClassName, 4) - TEST_FIELD_ALIGN (WNDCLASSA, lpszClassName, 4) - TEST_FIELD_OFFSET(WNDCLASSA, lpszClassName, 36) -} - -static void test_pack_WNDCLASSEXA(void) -{ - /* WNDCLASSEXA */ - TEST_TYPE_SIZE (WNDCLASSEXA, 48) - TEST_TYPE_ALIGN (WNDCLASSEXA, 4) - TEST_FIELD_SIZE (WNDCLASSEXA, cbSize, 4) - TEST_FIELD_ALIGN (WNDCLASSEXA, cbSize, 4) - TEST_FIELD_OFFSET(WNDCLASSEXA, cbSize, 0) - TEST_FIELD_SIZE (WNDCLASSEXA, style, 4) - TEST_FIELD_ALIGN (WNDCLASSEXA, style, 4) - TEST_FIELD_OFFSET(WNDCLASSEXA, style, 4) - TEST_FIELD_SIZE (WNDCLASSEXA, lpfnWndProc, 4) - TEST_FIELD_ALIGN (WNDCLASSEXA, lpfnWndProc, 4) - TEST_FIELD_OFFSET(WNDCLASSEXA, lpfnWndProc, 8) - TEST_FIELD_SIZE (WNDCLASSEXA, cbClsExtra, 4) - TEST_FIELD_ALIGN (WNDCLASSEXA, cbClsExtra, 4) - TEST_FIELD_OFFSET(WNDCLASSEXA, cbClsExtra, 12) - TEST_FIELD_SIZE (WNDCLASSEXA, cbWndExtra, 4) - TEST_FIELD_ALIGN (WNDCLASSEXA, cbWndExtra, 4) - TEST_FIELD_OFFSET(WNDCLASSEXA, cbWndExtra, 16) - TEST_FIELD_SIZE (WNDCLASSEXA, hInstance, 4) - TEST_FIELD_ALIGN (WNDCLASSEXA, hInstance, 4) - TEST_FIELD_OFFSET(WNDCLASSEXA, hInstance, 20) - TEST_FIELD_SIZE (WNDCLASSEXA, hIcon, 4) - TEST_FIELD_ALIGN (WNDCLASSEXA, hIcon, 4) - TEST_FIELD_OFFSET(WNDCLASSEXA, hIcon, 24) - TEST_FIELD_SIZE (WNDCLASSEXA, hCursor, 4) - TEST_FIELD_ALIGN (WNDCLASSEXA, hCursor, 4) - TEST_FIELD_OFFSET(WNDCLASSEXA, hCursor, 28) - TEST_FIELD_SIZE (WNDCLASSEXA, hbrBackground, 4) - TEST_FIELD_ALIGN (WNDCLASSEXA, hbrBackground, 4) - TEST_FIELD_OFFSET(WNDCLASSEXA, hbrBackground, 32) - TEST_FIELD_SIZE (WNDCLASSEXA, lpszMenuName, 4) - TEST_FIELD_ALIGN (WNDCLASSEXA, lpszMenuName, 4) - TEST_FIELD_OFFSET(WNDCLASSEXA, lpszMenuName, 36) - TEST_FIELD_SIZE (WNDCLASSEXA, lpszClassName, 4) - TEST_FIELD_ALIGN (WNDCLASSEXA, lpszClassName, 4) - TEST_FIELD_OFFSET(WNDCLASSEXA, lpszClassName, 40) - TEST_FIELD_SIZE (WNDCLASSEXA, hIconSm, 4) - TEST_FIELD_ALIGN (WNDCLASSEXA, hIconSm, 4) - TEST_FIELD_OFFSET(WNDCLASSEXA, hIconSm, 44) -} - -static void test_pack_WNDCLASSEXW(void) -{ - /* WNDCLASSEXW */ - TEST_TYPE_SIZE (WNDCLASSEXW, 48) - TEST_TYPE_ALIGN (WNDCLASSEXW, 4) - TEST_FIELD_SIZE (WNDCLASSEXW, cbSize, 4) - TEST_FIELD_ALIGN (WNDCLASSEXW, cbSize, 4) - TEST_FIELD_OFFSET(WNDCLASSEXW, cbSize, 0) - TEST_FIELD_SIZE (WNDCLASSEXW, style, 4) - TEST_FIELD_ALIGN (WNDCLASSEXW, style, 4) - TEST_FIELD_OFFSET(WNDCLASSEXW, style, 4) - TEST_FIELD_SIZE (WNDCLASSEXW, lpfnWndProc, 4) - TEST_FIELD_ALIGN (WNDCLASSEXW, lpfnWndProc, 4) - TEST_FIELD_OFFSET(WNDCLASSEXW, lpfnWndProc, 8) - TEST_FIELD_SIZE (WNDCLASSEXW, cbClsExtra, 4) - TEST_FIELD_ALIGN (WNDCLASSEXW, cbClsExtra, 4) - TEST_FIELD_OFFSET(WNDCLASSEXW, cbClsExtra, 12) - TEST_FIELD_SIZE (WNDCLASSEXW, cbWndExtra, 4) - TEST_FIELD_ALIGN (WNDCLASSEXW, cbWndExtra, 4) - TEST_FIELD_OFFSET(WNDCLASSEXW, cbWndExtra, 16) - TEST_FIELD_SIZE (WNDCLASSEXW, hInstance, 4) - TEST_FIELD_ALIGN (WNDCLASSEXW, hInstance, 4) - TEST_FIELD_OFFSET(WNDCLASSEXW, hInstance, 20) - TEST_FIELD_SIZE (WNDCLASSEXW, hIcon, 4) - TEST_FIELD_ALIGN (WNDCLASSEXW, hIcon, 4) - TEST_FIELD_OFFSET(WNDCLASSEXW, hIcon, 24) - TEST_FIELD_SIZE (WNDCLASSEXW, hCursor, 4) - TEST_FIELD_ALIGN (WNDCLASSEXW, hCursor, 4) - TEST_FIELD_OFFSET(WNDCLASSEXW, hCursor, 28) - TEST_FIELD_SIZE (WNDCLASSEXW, hbrBackground, 4) - TEST_FIELD_ALIGN (WNDCLASSEXW, hbrBackground, 4) - TEST_FIELD_OFFSET(WNDCLASSEXW, hbrBackground, 32) - TEST_FIELD_SIZE (WNDCLASSEXW, lpszMenuName, 4) - TEST_FIELD_ALIGN (WNDCLASSEXW, lpszMenuName, 4) - TEST_FIELD_OFFSET(WNDCLASSEXW, lpszMenuName, 36) - TEST_FIELD_SIZE (WNDCLASSEXW, lpszClassName, 4) - TEST_FIELD_ALIGN (WNDCLASSEXW, lpszClassName, 4) - TEST_FIELD_OFFSET(WNDCLASSEXW, lpszClassName, 40) - TEST_FIELD_SIZE (WNDCLASSEXW, hIconSm, 4) - TEST_FIELD_ALIGN (WNDCLASSEXW, hIconSm, 4) - TEST_FIELD_OFFSET(WNDCLASSEXW, hIconSm, 44) -} - -static void test_pack_WNDCLASSW(void) -{ - /* WNDCLASSW */ - TEST_TYPE_SIZE (WNDCLASSW, 40) - TEST_TYPE_ALIGN (WNDCLASSW, 4) - TEST_FIELD_SIZE (WNDCLASSW, style, 4) - TEST_FIELD_ALIGN (WNDCLASSW, style, 4) - TEST_FIELD_OFFSET(WNDCLASSW, style, 0) - TEST_FIELD_SIZE (WNDCLASSW, lpfnWndProc, 4) - TEST_FIELD_ALIGN (WNDCLASSW, lpfnWndProc, 4) - TEST_FIELD_OFFSET(WNDCLASSW, lpfnWndProc, 4) - TEST_FIELD_SIZE (WNDCLASSW, cbClsExtra, 4) - TEST_FIELD_ALIGN (WNDCLASSW, cbClsExtra, 4) - TEST_FIELD_OFFSET(WNDCLASSW, cbClsExtra, 8) - TEST_FIELD_SIZE (WNDCLASSW, cbWndExtra, 4) - TEST_FIELD_ALIGN (WNDCLASSW, cbWndExtra, 4) - TEST_FIELD_OFFSET(WNDCLASSW, cbWndExtra, 12) - TEST_FIELD_SIZE (WNDCLASSW, hInstance, 4) - TEST_FIELD_ALIGN (WNDCLASSW, hInstance, 4) - TEST_FIELD_OFFSET(WNDCLASSW, hInstance, 16) - TEST_FIELD_SIZE (WNDCLASSW, hIcon, 4) - TEST_FIELD_ALIGN (WNDCLASSW, hIcon, 4) - TEST_FIELD_OFFSET(WNDCLASSW, hIcon, 20) - TEST_FIELD_SIZE (WNDCLASSW, hCursor, 4) - TEST_FIELD_ALIGN (WNDCLASSW, hCursor, 4) - TEST_FIELD_OFFSET(WNDCLASSW, hCursor, 24) - TEST_FIELD_SIZE (WNDCLASSW, hbrBackground, 4) - TEST_FIELD_ALIGN (WNDCLASSW, hbrBackground, 4) - TEST_FIELD_OFFSET(WNDCLASSW, hbrBackground, 28) - TEST_FIELD_SIZE (WNDCLASSW, lpszMenuName, 4) - TEST_FIELD_ALIGN (WNDCLASSW, lpszMenuName, 4) - TEST_FIELD_OFFSET(WNDCLASSW, lpszMenuName, 32) - TEST_FIELD_SIZE (WNDCLASSW, lpszClassName, 4) - TEST_FIELD_ALIGN (WNDCLASSW, lpszClassName, 4) - TEST_FIELD_OFFSET(WNDCLASSW, lpszClassName, 36) -} - -static void test_pack_WNDENUMPROC(void) -{ - /* WNDENUMPROC */ - TEST_TYPE_SIZE (WNDENUMPROC, 4) - TEST_TYPE_ALIGN (WNDENUMPROC, 4) -} - -static void test_pack_WNDPROC(void) -{ - /* WNDPROC */ - TEST_TYPE_SIZE (WNDPROC, 4) - TEST_TYPE_ALIGN (WNDPROC, 4) -} - -#endif /* _WIN64 */ - -static void test_pack(void) -{ - test_pack_ACCESSTIMEOUT(); - test_pack_ANIMATIONINFO(); - test_pack_CBTACTIVATESTRUCT(); - test_pack_CBT_CREATEWNDA(); - test_pack_CBT_CREATEWNDW(); - test_pack_CLIENTCREATESTRUCT(); - test_pack_COMBOBOXINFO(); - test_pack_COMPAREITEMSTRUCT(); - test_pack_COPYDATASTRUCT(); - test_pack_CREATESTRUCTA(); - test_pack_CREATESTRUCTW(); - test_pack_CURSORINFO(); - test_pack_CWPRETSTRUCT(); - test_pack_CWPSTRUCT(); - test_pack_DEBUGHOOKINFO(); - test_pack_DELETEITEMSTRUCT(); - test_pack_DESKTOPENUMPROCA(); - test_pack_DESKTOPENUMPROCW(); - test_pack_DLGITEMTEMPLATE(); - test_pack_DLGPROC(); - test_pack_DLGTEMPLATE(); - test_pack_DRAWITEMSTRUCT(); - test_pack_DRAWSTATEPROC(); - test_pack_DRAWTEXTPARAMS(); - test_pack_EDITWORDBREAKPROCA(); - test_pack_EDITWORDBREAKPROCW(); - test_pack_EVENTMSG(); - test_pack_FILTERKEYS(); - test_pack_FLASHWINFO(); - test_pack_GRAYSTRINGPROC(); - test_pack_GUITHREADINFO(); - test_pack_HARDWAREHOOKSTRUCT(); - test_pack_HARDWAREINPUT(); - test_pack_HDEVNOTIFY(); - test_pack_HDWP(); - test_pack_HELPINFO(); - test_pack_HELPWININFOA(); - test_pack_HELPWININFOW(); - test_pack_HIGHCONTRASTA(); - test_pack_HIGHCONTRASTW(); - test_pack_HOOKPROC(); - test_pack_ICONINFO(); - test_pack_ICONMETRICSA(); - test_pack_ICONMETRICSW(); - test_pack_INPUT(); - test_pack_KBDLLHOOKSTRUCT(); - test_pack_KEYBDINPUT(); - test_pack_LPACCESSTIMEOUT(); - test_pack_LPANIMATIONINFO(); - test_pack_LPCBTACTIVATESTRUCT(); - test_pack_LPCBT_CREATEWNDA(); - test_pack_LPCBT_CREATEWNDW(); - test_pack_LPCDLGTEMPLATEA(); - test_pack_LPCDLGTEMPLATEW(); - test_pack_LPCLIENTCREATESTRUCT(); - test_pack_LPCMENUINFO(); - test_pack_LPCMENUITEMINFOA(); - test_pack_LPCMENUITEMINFOW(); - test_pack_LPCOMBOBOXINFO(); - test_pack_LPCOMPAREITEMSTRUCT(); - test_pack_LPCREATESTRUCTA(); - test_pack_LPCREATESTRUCTW(); - test_pack_LPCSCROLLINFO(); - test_pack_LPCURSORINFO(); - test_pack_LPCWPRETSTRUCT(); - test_pack_LPCWPSTRUCT(); - test_pack_LPDEBUGHOOKINFO(); - test_pack_LPDELETEITEMSTRUCT(); - test_pack_LPDLGITEMTEMPLATEA(); - test_pack_LPDLGITEMTEMPLATEW(); - test_pack_LPDLGTEMPLATEA(); - test_pack_LPDLGTEMPLATEW(); - test_pack_LPDRAWITEMSTRUCT(); - test_pack_LPDRAWTEXTPARAMS(); - test_pack_LPEVENTMSG(); - test_pack_LPFILTERKEYS(); - test_pack_LPGUITHREADINFO(); - test_pack_LPHARDWAREHOOKSTRUCT(); - test_pack_LPHARDWAREINPUT(); - test_pack_LPHELPINFO(); - test_pack_LPHELPWININFOA(); - test_pack_LPHELPWININFOW(); - test_pack_LPHIGHCONTRASTA(); - test_pack_LPHIGHCONTRASTW(); - test_pack_LPICONMETRICSA(); - test_pack_LPICONMETRICSW(); - test_pack_LPINPUT(); - test_pack_LPKBDLLHOOKSTRUCT(); - test_pack_LPKEYBDINPUT(); - test_pack_LPMDICREATESTRUCTA(); - test_pack_LPMDICREATESTRUCTW(); - test_pack_LPMDINEXTMENU(); - test_pack_LPMEASUREITEMSTRUCT(); - test_pack_LPMENUINFO(); - test_pack_LPMENUITEMINFOA(); - test_pack_LPMENUITEMINFOW(); - test_pack_LPMINIMIZEDMETRICS(); - test_pack_LPMINMAXINFO(); - test_pack_LPMONITORINFO(); - test_pack_LPMONITORINFOEXA(); - test_pack_LPMONITORINFOEXW(); - test_pack_LPMOUSEHOOKSTRUCT(); - test_pack_LPMOUSEINPUT(); - test_pack_LPMOUSEKEYS(); - test_pack_LPMSG(); - test_pack_LPMSGBOXPARAMSA(); - test_pack_LPMSGBOXPARAMSW(); - test_pack_LPMSLLHOOKSTRUCT(); - test_pack_LPMULTIKEYHELPA(); - test_pack_LPMULTIKEYHELPW(); - test_pack_LPNCCALCSIZE_PARAMS(); - test_pack_LPNMHDR(); - test_pack_LPNONCLIENTMETRICSA(); - test_pack_LPNONCLIENTMETRICSW(); - test_pack_LPPAINTSTRUCT(); - test_pack_LPSCROLLINFO(); - test_pack_LPSERIALKEYSA(); - test_pack_LPSERIALKEYSW(); - test_pack_LPSOUNDSENTRYA(); - test_pack_LPSOUNDSENTRYW(); - test_pack_LPSTICKYKEYS(); - test_pack_LPSTYLESTRUCT(); - test_pack_LPTITLEBARINFO(); - test_pack_LPTOGGLEKEYS(); - test_pack_LPTPMPARAMS(); - test_pack_LPTRACKMOUSEEVENT(); - test_pack_LPWINDOWINFO(); - test_pack_LPWINDOWPLACEMENT(); - test_pack_LPWINDOWPOS(); - test_pack_LPWNDCLASSA(); - test_pack_LPWNDCLASSEXA(); - test_pack_LPWNDCLASSEXW(); - test_pack_LPWNDCLASSW(); - test_pack_MDICREATESTRUCTA(); - test_pack_MDICREATESTRUCTW(); - test_pack_MDINEXTMENU(); - test_pack_MEASUREITEMSTRUCT(); - test_pack_MENUINFO(); - test_pack_MENUITEMINFOA(); - test_pack_MENUITEMINFOW(); - test_pack_MENUITEMTEMPLATE(); - test_pack_MENUITEMTEMPLATEHEADER(); - test_pack_MINIMIZEDMETRICS(); - test_pack_MINMAXINFO(); - test_pack_MONITORENUMPROC(); - test_pack_MONITORINFO(); - test_pack_MONITORINFOEXA(); - test_pack_MONITORINFOEXW(); - test_pack_MOUSEHOOKSTRUCT(); - test_pack_MOUSEINPUT(); - test_pack_MOUSEKEYS(); - test_pack_MSG(); - test_pack_MSGBOXCALLBACK(); - test_pack_MSGBOXPARAMSA(); - test_pack_MSGBOXPARAMSW(); - test_pack_MSLLHOOKSTRUCT(); - test_pack_MULTIKEYHELPA(); - test_pack_MULTIKEYHELPW(); - test_pack_NAMEENUMPROCA(); - test_pack_NAMEENUMPROCW(); - test_pack_NCCALCSIZE_PARAMS(); - test_pack_NMHDR(); - test_pack_NONCLIENTMETRICSA(); - test_pack_NONCLIENTMETRICSW(); - test_pack_PAINTSTRUCT(); - test_pack_PCOMBOBOXINFO(); - test_pack_PCOMPAREITEMSTRUCT(); - test_pack_PCOPYDATASTRUCT(); - test_pack_PCURSORINFO(); - test_pack_PCWPRETSTRUCT(); - test_pack_PCWPSTRUCT(); - test_pack_PDEBUGHOOKINFO(); - test_pack_PDELETEITEMSTRUCT(); - test_pack_PDLGITEMTEMPLATEA(); - test_pack_PDLGITEMTEMPLATEW(); - test_pack_PDRAWITEMSTRUCT(); - test_pack_PEVENTMSG(); - test_pack_PFLASHWINFO(); - test_pack_PGUITHREADINFO(); - test_pack_PHARDWAREHOOKSTRUCT(); - test_pack_PHARDWAREINPUT(); - test_pack_PHDEVNOTIFY(); - test_pack_PHELPWININFOA(); - test_pack_PHELPWININFOW(); - test_pack_PICONINFO(); - test_pack_PICONMETRICSA(); - test_pack_PICONMETRICSW(); - test_pack_PINPUT(); - test_pack_PKBDLLHOOKSTRUCT(); - test_pack_PKEYBDINPUT(); - test_pack_PMDINEXTMENU(); - test_pack_PMEASUREITEMSTRUCT(); - test_pack_PMENUITEMTEMPLATE(); - test_pack_PMENUITEMTEMPLATEHEADER(); - test_pack_PMINIMIZEDMETRICS(); - test_pack_PMINMAXINFO(); - test_pack_PMOUSEHOOKSTRUCT(); - test_pack_PMOUSEINPUT(); - test_pack_PMSG(); - test_pack_PMSGBOXPARAMSA(); - test_pack_PMSGBOXPARAMSW(); - test_pack_PMSLLHOOKSTRUCT(); - test_pack_PMULTIKEYHELPA(); - test_pack_PMULTIKEYHELPW(); - test_pack_PNONCLIENTMETRICSA(); - test_pack_PNONCLIENTMETRICSW(); - test_pack_PPAINTSTRUCT(); - test_pack_PROPENUMPROCA(); - test_pack_PROPENUMPROCEXA(); - test_pack_PROPENUMPROCEXW(); - test_pack_PROPENUMPROCW(); - test_pack_PTITLEBARINFO(); - test_pack_PUSEROBJECTFLAGS(); - test_pack_PWINDOWINFO(); - test_pack_PWINDOWPLACEMENT(); - test_pack_PWINDOWPOS(); - test_pack_PWNDCLASSA(); - test_pack_PWNDCLASSEXA(); - test_pack_PWNDCLASSEXW(); - test_pack_PWNDCLASSW(); - test_pack_SCROLLINFO(); - test_pack_SENDASYNCPROC(); - test_pack_SERIALKEYSA(); - test_pack_SERIALKEYSW(); - test_pack_SOUNDSENTRYA(); - test_pack_SOUNDSENTRYW(); - test_pack_STICKYKEYS(); - test_pack_STYLESTRUCT(); - test_pack_TIMERPROC(); - test_pack_TITLEBARINFO(); - test_pack_TOGGLEKEYS(); - test_pack_TPMPARAMS(); - test_pack_TRACKMOUSEEVENT(); - test_pack_USEROBJECTFLAGS(); - test_pack_WINDOWINFO(); - test_pack_WINDOWPLACEMENT(); - test_pack_WINDOWPOS(); - test_pack_WINEVENTPROC(); - test_pack_WINSTAENUMPROCA(); - test_pack_WINSTAENUMPROCW(); - test_pack_WNDCLASSA(); - test_pack_WNDCLASSEXA(); - test_pack_WNDCLASSEXW(); - test_pack_WNDCLASSW(); - test_pack_WNDENUMPROC(); - test_pack_WNDPROC(); -} - -START_TEST(generated) -{ - test_pack(); -} diff --git a/rostests/winetests/user32/input.c b/rostests/winetests/user32/input.c deleted file mode 100755 index 60904afa24d..00000000000 --- a/rostests/winetests/user32/input.c +++ /dev/null @@ -1,1624 +0,0 @@ -/* Test Key event to Key message translation - * - * Copyright 2003 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 - */ - -/* test whether the right type of messages: - * WM_KEYUP/DOWN vs WM_SYSKEYUP/DOWN are sent in case of combined - * keystrokes. - * - * For instance -X can be accomplished by - * the sequence ALT-KEY-DOWN, X-KEY-DOWN, ALT-KEY-UP, X-KEY-UP - * but also X-KEY-DOWN, ALT-KEY-DOWN, X-KEY-UP, ALT-KEY-UP - * Whether a KEY or a SYSKEY message is sent is not always clear, it is - * also not the same in WINNT as in WIN9X */ - -/* NOTE that there will be test failures under WIN9X - * No applications are known to me that rely on this - * so I don't fix it */ - -/* TODO: - * 1. extend it to the wm_command and wm_syscommand notifications - * 2. add some more tests with special cases like dead keys or right (alt) key - * 3. there is some adapted code from input.c in here. Should really - * make that code exactly the same. - * 4. resolve the win9x case when there is a need or the testing frame work - * offers a nice way. - * 5. The test app creates a window, the user should not take the focus - * away during its short existence. I could do something to prevent that - * if it is a problem. - * - */ - -//#define _WIN32_WINNT 0x401 -//#define _WIN32_IE 0x0500 - -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "winuser.h" - -#include "wine/test.h" - -/* globals */ -static HWND hWndTest; -static LONG timetag = 0x10000000; - -static struct { - LONG last_key_down; - LONG last_key_up; - LONG last_syskey_down; - LONG last_syskey_up; - LONG last_char; - LONG last_syschar; - LONG last_hook_down; - LONG last_hook_up; - LONG last_hook_syskey_down; - LONG last_hook_syskey_up; - BOOL expect_alt; - BOOL sendinput_broken; -} key_status; - -static UINT (WINAPI *pSendInput) (UINT, INPUT*, size_t); -static int (WINAPI *pGetMouseMovePointsEx) (UINT, LPMOUSEMOVEPOINT, LPMOUSEMOVEPOINT, int, DWORD); - -#define MAXKEYEVENTS 12 -#define MAXKEYMESSAGES MAXKEYEVENTS /* assuming a key event generates one - and only one message */ - -/* keyboard message names, sorted as their value */ -static const char *MSGNAME[]={"WM_KEYDOWN", "WM_KEYUP", "WM_CHAR","WM_DEADCHAR", - "WM_SYSKEYDOWN", "WM_SYSKEYUP", "WM_SYSCHAR", "WM_SYSDEADCHAR" ,"WM_KEYLAST"}; - -/* keyevents, add more as needed */ -typedef enum KEVtag -{ ALTDOWN = 1, ALTUP, XDOWN, XUP, SHIFTDOWN, SHIFTUP, CTRLDOWN, CTRLUP } KEV; -/* matching VK's */ -static const int GETVKEY[]={0, VK_MENU, VK_MENU, 'X', 'X', VK_SHIFT, VK_SHIFT, VK_CONTROL, VK_CONTROL}; -/* matching scan codes */ -static const int GETSCAN[]={0, 0x38, 0x38, 0x2D, 0x2D, 0x2A, 0x2A, 0x1D, 0x1D }; -/* matching updown events */ -static const int GETFLAGS[]={0, 0, KEYEVENTF_KEYUP, 0, KEYEVENTF_KEYUP, 0, KEYEVENTF_KEYUP, 0, KEYEVENTF_KEYUP}; -/* matching descriptions */ -static const char *getdesc[]={"", "+alt","-alt","+X","-X","+shift","-shift","+ctrl","-ctrl"}; - -/* The MSVC headers ignore our NONAMELESSUNION requests so we have to define our own type */ -typedef struct -{ - DWORD type; - union - { - MOUSEINPUT mi; - KEYBDINPUT ki; - HARDWAREINPUT hi; - } u; -} TEST_INPUT; - -#define ADDTOINPUTS(kev) \ -inputs[evtctr].type = INPUT_KEYBOARD; \ - ((TEST_INPUT*)inputs)[evtctr].u.ki.wVk = GETVKEY[ kev]; \ - ((TEST_INPUT*)inputs)[evtctr].u.ki.wScan = GETSCAN[ kev]; \ - ((TEST_INPUT*)inputs)[evtctr].u.ki.dwFlags = GETFLAGS[ kev]; \ - ((TEST_INPUT*)inputs)[evtctr].u.ki.dwExtraInfo = 0; \ - ((TEST_INPUT*)inputs)[evtctr].u.ki.time = ++timetag; \ - if( kev) evtctr++; - -typedef struct { - UINT message; - WPARAM wParam; - LPARAM lParam; -} KMSG; - -/******************************************* - * add new test sets here - * the software will make all combinations of the - * keyevent defined here - */ -static const struct { - int nrkev; - KEV keydwn[MAXKEYEVENTS]; - KEV keyup[MAXKEYEVENTS]; -} testkeyset[]= { - { 2, { ALTDOWN, XDOWN }, { ALTUP, XUP}}, - { 3, { ALTDOWN, XDOWN , SHIFTDOWN}, { ALTUP, XUP, SHIFTUP}}, - { 3, { ALTDOWN, XDOWN , CTRLDOWN}, { ALTUP, XUP, CTRLUP}}, - { 3, { SHIFTDOWN, XDOWN , CTRLDOWN}, { SHIFTUP, XUP, CTRLUP}}, - { 0 } /* mark the end */ -}; - -/**********************adapted from input.c **********************************/ - -static BYTE InputKeyStateTable[256]; -static BYTE AsyncKeyStateTable[256]; -static BYTE TrackSysKey = 0; /* determine whether ALT key up will cause a WM_SYSKEYUP - or a WM_KEYUP message */ - -static void init_function_pointers(void) -{ - HMODULE hdll = GetModuleHandleA("user32"); - -#define GET_PROC(func) \ - p ## func = (void*)GetProcAddress(hdll, #func); \ - if(!p ## func) \ - trace("GetProcAddress(%s) failed\n", #func); - - GET_PROC(SendInput) - GET_PROC(GetMouseMovePointsEx) - -#undef GET_PROC -} - -static int KbdMessage( KEV kev, WPARAM *pwParam, LPARAM *plParam ) -{ - UINT message; - int VKey = GETVKEY[kev]; - WORD flags; - - flags = LOBYTE(GETSCAN[kev]); - if (GETFLAGS[kev] & KEYEVENTF_EXTENDEDKEY) flags |= KF_EXTENDED; - - if (GETFLAGS[kev] & KEYEVENTF_KEYUP ) - { - message = WM_KEYUP; - if( (InputKeyStateTable[VK_MENU] & 0x80) && ( - (VKey == VK_MENU) || (VKey == VK_CONTROL) || - !(InputKeyStateTable[VK_CONTROL] & 0x80))) { - if( TrackSysKey == VK_MENU || /* -down/-up sequence */ - (VKey != VK_MENU)) /* -down...-up */ - message = WM_SYSKEYUP; - TrackSysKey = 0; - } - InputKeyStateTable[VKey] &= ~0x80; - flags |= KF_REPEAT | KF_UP; - } - else - { - if (InputKeyStateTable[VKey] & 0x80) flags |= KF_REPEAT; - if (!(InputKeyStateTable[VKey] & 0x80)) InputKeyStateTable[VKey] ^= 0x01; - InputKeyStateTable[VKey] |= 0x80; - AsyncKeyStateTable[VKey] |= 0x80; - - message = WM_KEYDOWN; - if( (InputKeyStateTable[VK_MENU] & 0x80) && - !(InputKeyStateTable[VK_CONTROL] & 0x80)) { - message = WM_SYSKEYDOWN; - TrackSysKey = VKey; - } - } - - if (InputKeyStateTable[VK_MENU] & 0x80) flags |= KF_ALTDOWN; - - if( plParam) *plParam = MAKELPARAM( 1, flags ); - if( pwParam) *pwParam = VKey; - return message; -} - -/****************************** end copy input.c ****************************/ - -/* - * . prepare the keyevents for SendInputs - * . calculate the "expected" messages - * . Send the events to our window - * . retrieve the messages from the input queue - * . verify - */ -static BOOL do_test( HWND hwnd, int seqnr, const KEV td[] ) -{ - INPUT inputs[MAXKEYEVENTS]; - KMSG expmsg[MAXKEYEVENTS]; - MSG msg; - char buf[100]; - UINT evtctr=0; - int kmctr, i; - - buf[0]='\0'; - TrackSysKey=0; /* see input.c */ - for( i = 0; i < MAXKEYEVENTS; i++) { - ADDTOINPUTS(td[i]) - strcat(buf, getdesc[td[i]]); - if(td[i]) - expmsg[i].message = KbdMessage(td[i], &(expmsg[i].wParam), &(expmsg[i].lParam)); - else - expmsg[i].message = 0; - } - for( kmctr = 0; kmctr < MAXKEYEVENTS && expmsg[kmctr].message; kmctr++) - ; - ok( evtctr <= MAXKEYEVENTS, "evtctr is above MAXKEYEVENTS\n" ); - if( evtctr != pSendInput(evtctr, &inputs[0], sizeof(INPUT))) - ok (FALSE, "SendInput failed to send some events\n"); - i = 0; - if (winetest_debug > 1) - trace("======== key stroke sequence #%d: %s =============\n", - seqnr + 1, buf); - while( PeekMessage(&msg,hwnd,WM_KEYFIRST,WM_KEYLAST,PM_REMOVE) ) { - if (winetest_debug > 1) - trace("message[%d] %-15s wParam %04lx lParam %08lx time %x\n", i, - MSGNAME[msg.message - WM_KEYFIRST], msg.wParam, msg.lParam, msg.time); - if( i < kmctr ) { - ok( msg.message == expmsg[i].message && - msg.wParam == expmsg[i].wParam && - msg.lParam == expmsg[i].lParam, - "%u/%u: wrong message %x/%08lx/%08lx expected %s/%08lx/%08lx\n", - seqnr, i, msg.message, msg.wParam, msg.lParam, - MSGNAME[(expmsg[i]).message - WM_KEYFIRST], expmsg[i].wParam, expmsg[i].lParam ); - } - i++; - } - if (winetest_debug > 1) - trace("%d messages retrieved\n", i); - if (!i && kmctr) - { - skip( "simulated keyboard input doesn't work\n" ); - return FALSE; - } - ok( i == kmctr, "message count is wrong: got %d expected: %d\n", i, kmctr); - return TRUE; -} - -/* test all combinations of the specified key events */ -static BOOL TestASet( HWND hWnd, int nrkev, const KEV kevdwn[], const KEV kevup[] ) -{ - int i,j,k,l,m,n; - static int count=0; - KEV kbuf[MAXKEYEVENTS]; - assert( nrkev==2 || nrkev==3); - for(i=0;i= WM_KEYFIRST && message <= WM_KEYLAST); -} - -static inline BOOL is_mouse_message( UINT message ) -{ - return (message >= WM_MOUSEFIRST && message <= WM_MOUSELAST); -} - -/* try to make sure pending X events have been processed before continuing */ -static void empty_message_queue(void) -{ - MSG msg; - int diff = 200; - int min_timeout = 50; - DWORD time = GetTickCount() + diff; - - while (diff > 0) - { - if (MsgWaitForMultipleObjects(0, NULL, FALSE, min_timeout, QS_ALLINPUT) == WAIT_TIMEOUT) break; - while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) - { - if (is_keyboard_message(msg.message) || is_mouse_message(msg.message)) - ok(msg.time != 0, "message %#x has time set to 0\n", msg.message); - - TranslateMessage(&msg); - DispatchMessage(&msg); - } - diff = time - GetTickCount(); - } -} - -struct transition_s { - WORD wVk; - BYTE before_state; - BYTE optional; -}; - -typedef enum { - sent=0x1, - posted=0x2, - parent=0x4, - wparam=0x8, - lparam=0x10, - defwinproc=0x20, - beginpaint=0x40, - optional=0x80, - hook=0x100, - winevent_hook=0x200 -} msg_flags_t; - -struct message { - UINT message; /* the WM_* code */ - msg_flags_t flags; /* message props */ - WPARAM wParam; /* expected value of wParam */ - LPARAM lParam; /* expected value of lParam */ -}; - -static const struct sendinput_test_s { - WORD wVk; - DWORD dwFlags; - BOOL _todo_wine; - struct transition_s expected_transitions[MAXKEYEVENTS+1]; - struct message expected_messages[MAXKEYMESSAGES+1]; -} sendinput_test[] = { - /* test ALT+F */ - /* 0 */ - {VK_LMENU, 0, 0, {{VK_MENU, 0x00}, {VK_LMENU, 0x00}, {0}}, - {{WM_SYSKEYDOWN, hook|wparam, VK_LMENU}, {WM_SYSKEYDOWN}, {0}}}, - {'F', 0, 0, {{'F', 0x00}, {0}}, - {{WM_SYSKEYDOWN, hook}, {WM_SYSKEYDOWN}, - {WM_SYSCHAR}, - {WM_SYSCOMMAND}, {0}}}, - {'F', KEYEVENTF_KEYUP, 0, {{'F', 0x80}, {0}}, - {{WM_SYSKEYUP, hook}, {WM_SYSKEYUP}, {0}}}, - {VK_LMENU, KEYEVENTF_KEYUP, 0, {{VK_MENU, 0x80}, {VK_LMENU, 0x80}, {0}}, - {{WM_KEYUP, hook}, {WM_KEYUP}, {0}}}, - - /* test CTRL+O */ - /* 4 */ - {VK_LCONTROL, 0, 0, {{VK_CONTROL, 0x00}, {VK_LCONTROL, 0x00}, {0}}, - {{WM_KEYDOWN, hook}, {WM_KEYDOWN}, {0}}}, - {'O', 0, 0, {{'O', 0x00}, {0}}, - {{WM_KEYDOWN, hook}, {WM_KEYDOWN}, {WM_CHAR}, {0}}}, - {'O', KEYEVENTF_KEYUP, 0, {{'O', 0x80}, {0}}, - {{WM_KEYUP, hook}, {WM_KEYUP}, {0}}}, - {VK_LCONTROL, KEYEVENTF_KEYUP, 0, {{VK_CONTROL, 0x80}, {VK_LCONTROL, 0x80}, {0}}, - {{WM_KEYUP, hook}, {WM_KEYUP}, {0}}}, - - /* test ALT+CTRL+X */ - /* 8 */ - {VK_LMENU, 0, 0, {{VK_MENU, 0x00}, {VK_LMENU, 0x00}, {0}}, - {{WM_SYSKEYDOWN, hook}, {WM_SYSKEYDOWN}, {0}}}, - {VK_LCONTROL, 0, 0, {{VK_CONTROL, 0x00}, {VK_LCONTROL, 0x00}, {0}}, - {{WM_KEYDOWN, hook}, {WM_KEYDOWN}, {0}}}, - {'X', 0, 0, {{'X', 0x00}, {0}}, - {{WM_KEYDOWN, hook}, {WM_KEYDOWN}, {0}}}, - {'X', KEYEVENTF_KEYUP, 0, {{'X', 0x80}, {0}}, - {{WM_KEYUP, hook}, {WM_KEYUP}, {0}}}, - {VK_LCONTROL, KEYEVENTF_KEYUP, 0, {{VK_CONTROL, 0x80}, {VK_LCONTROL, 0x80}, {0}}, - {{WM_SYSKEYUP, hook}, {WM_SYSKEYUP}, {0}}}, - {VK_LMENU, KEYEVENTF_KEYUP, 0, {{VK_MENU, 0x80}, {VK_LMENU, 0x80}, {0}}, - {{WM_KEYUP, hook}, {WM_KEYUP}, {0}}}, - - /* test SHIFT+A */ - /* 14 */ - {VK_LSHIFT, 0, 0, {{VK_SHIFT, 0x00}, {VK_LSHIFT, 0x00}, {0}}, - {{WM_KEYDOWN, hook}, {WM_KEYDOWN}, {0}}}, - {'A', 0, 0, {{'A', 0x00}, {0}}, - {{WM_KEYDOWN, hook}, {WM_KEYDOWN}, {WM_CHAR}, {0}}}, - {'A', KEYEVENTF_KEYUP, 0, {{'A', 0x80}, {0}}, - {{WM_KEYUP, hook}, {WM_KEYUP}, {0}}}, - {VK_LSHIFT, KEYEVENTF_KEYUP, 0, {{VK_SHIFT, 0x80}, {VK_LSHIFT, 0x80}, {0}}, - {{WM_KEYUP, hook}, {WM_KEYUP}, {0}}}, - /* test L-SHIFT & R-SHIFT: */ - /* RSHIFT == LSHIFT */ - /* 18 */ - {VK_RSHIFT, 0, 0, - /* recent windows versions (>= w2k3) correctly report an RSHIFT transition */ - {{VK_SHIFT, 0x00}, {VK_LSHIFT, 0x00, TRUE}, {VK_RSHIFT, 0x00, TRUE}, {0}}, - {{WM_KEYDOWN, hook|wparam, VK_RSHIFT}, - {WM_KEYDOWN}, {0}}}, - {VK_RSHIFT, KEYEVENTF_KEYUP, 0, - {{VK_SHIFT, 0x80}, {VK_LSHIFT, 0x80, TRUE}, {VK_RSHIFT, 0x80, TRUE}, {0}}, - {{WM_KEYUP, hook, hook|wparam, VK_RSHIFT}, - {WM_KEYUP}, {0}}}, - - /* LSHIFT | KEYEVENTF_EXTENDEDKEY == RSHIFT */ - /* 20 */ - {VK_LSHIFT, KEYEVENTF_EXTENDEDKEY, 0, - {{VK_SHIFT, 0x00}, {VK_RSHIFT, 0x00}, {0}}, - {{WM_KEYDOWN, hook|wparam|lparam, VK_LSHIFT, LLKHF_EXTENDED}, - {WM_KEYDOWN, wparam|lparam, VK_SHIFT, 0}, {0}}}, - {VK_LSHIFT, KEYEVENTF_KEYUP | KEYEVENTF_EXTENDEDKEY, 0, - {{VK_SHIFT, 0x80}, {VK_RSHIFT, 0x80}, {0}}, - {{WM_KEYUP, hook|wparam|lparam, VK_LSHIFT, LLKHF_UP|LLKHF_EXTENDED}, - {WM_KEYUP, wparam|lparam, VK_SHIFT, KF_UP}, {0}}}, - /* RSHIFT | KEYEVENTF_EXTENDEDKEY == RSHIFT */ - /* 22 */ - {VK_RSHIFT, KEYEVENTF_EXTENDEDKEY, 0, - {{VK_SHIFT, 0x00}, {VK_RSHIFT, 0x00}, {0}}, - {{WM_KEYDOWN, hook|wparam|lparam, VK_RSHIFT, LLKHF_EXTENDED}, - {WM_KEYDOWN, wparam|lparam, VK_SHIFT, 0}, {0}}}, - {VK_RSHIFT, KEYEVENTF_KEYUP | KEYEVENTF_EXTENDEDKEY, 0, - {{VK_SHIFT, 0x80}, {VK_RSHIFT, 0x80}, {0}}, - {{WM_KEYUP, hook|wparam|lparam, VK_RSHIFT, LLKHF_UP|LLKHF_EXTENDED}, - {WM_KEYUP, wparam|lparam, VK_SHIFT, KF_UP}, {0}}}, - - /* Note about wparam for hook with generic key (VK_SHIFT, VK_CONTROL, VK_MENU): - win2k - sends to hook whatever we generated here - winXP+ - Attempts to convert key to L/R key but not always correct - */ - /* SHIFT == LSHIFT */ - /* 24 */ - {VK_SHIFT, 0, 0, - {{VK_SHIFT, 0x00}, {VK_LSHIFT, 0x00}, {0}}, - {{WM_KEYDOWN, hook/* |wparam */|lparam, VK_SHIFT, 0}, - {WM_KEYDOWN, wparam|lparam, VK_SHIFT, 0}, {0}}}, - {VK_SHIFT, KEYEVENTF_KEYUP, 0, - {{VK_SHIFT, 0x80}, {VK_LSHIFT, 0x80}, {0}}, - {{WM_KEYUP, hook/*|wparam*/|lparam, VK_SHIFT, LLKHF_UP}, - {WM_KEYUP, wparam|lparam, VK_SHIFT, KF_UP}, {0}}}, - /* SHIFT | KEYEVENTF_EXTENDEDKEY == RSHIFT */ - /* 26 */ - {VK_SHIFT, KEYEVENTF_EXTENDEDKEY, 0, - {{VK_SHIFT, 0x00}, {VK_RSHIFT, 0x00}, {0}}, - {{WM_KEYDOWN, hook/*|wparam*/|lparam, VK_SHIFT, LLKHF_EXTENDED}, - {WM_KEYDOWN, wparam|lparam, VK_SHIFT, 0}, {0}}}, - {VK_SHIFT, KEYEVENTF_KEYUP | KEYEVENTF_EXTENDEDKEY, 0, - {{VK_SHIFT, 0x80}, {VK_RSHIFT, 0x80}, {0}}, - {{WM_KEYUP, hook/*|wparam*/|lparam, VK_SHIFT, LLKHF_UP|LLKHF_EXTENDED}, - {WM_KEYUP, wparam|lparam, VK_SHIFT, KF_UP}, {0}}}, - - /* test L-CONTROL & R-CONTROL: */ - /* RCONTROL == LCONTROL */ - /* 28 */ - {VK_RCONTROL, 0, 0, - {{VK_CONTROL, 0x00}, {VK_LCONTROL, 0x00}, {0}}, - {{WM_KEYDOWN, hook|wparam, VK_RCONTROL}, - {WM_KEYDOWN, wparam|lparam, VK_CONTROL, 0}, {0}}}, - {VK_RCONTROL, KEYEVENTF_KEYUP, 0, - {{VK_CONTROL, 0x80}, {VK_LCONTROL, 0x80}, {0}}, - {{WM_KEYUP, hook|wparam, VK_RCONTROL}, - {WM_KEYUP, wparam|lparam, VK_CONTROL, KF_UP}, {0}}}, - /* LCONTROL | KEYEVENTF_EXTENDEDKEY == RCONTROL */ - /* 30 */ - {VK_LCONTROL, KEYEVENTF_EXTENDEDKEY, 0, - {{VK_CONTROL, 0x00}, {VK_RCONTROL, 0x00}, {0}}, - {{WM_KEYDOWN, hook|wparam|lparam, VK_LCONTROL, LLKHF_EXTENDED}, - {WM_KEYDOWN, wparam|lparam, VK_CONTROL, KF_EXTENDED}, {0}}}, - {VK_LCONTROL, KEYEVENTF_KEYUP | KEYEVENTF_EXTENDEDKEY, 0, - {{VK_CONTROL, 0x80}, {VK_RCONTROL, 0x80}, {0}}, - {{WM_KEYUP, hook|wparam|lparam, VK_LCONTROL, LLKHF_UP|LLKHF_EXTENDED}, - {WM_KEYUP, wparam|lparam, VK_CONTROL, KF_UP|KF_EXTENDED}, {0}}}, - /* RCONTROL | KEYEVENTF_EXTENDEDKEY == RCONTROL */ - /* 32 */ - {VK_RCONTROL, KEYEVENTF_EXTENDEDKEY, 0, - {{VK_CONTROL, 0x00}, {VK_RCONTROL, 0x00}, {0}}, - {{WM_KEYDOWN, hook|wparam|lparam, VK_RCONTROL, LLKHF_EXTENDED}, - {WM_KEYDOWN, wparam|lparam, VK_CONTROL, KF_EXTENDED}, {0}}}, - {VK_RCONTROL, KEYEVENTF_KEYUP | KEYEVENTF_EXTENDEDKEY, 0, - {{VK_CONTROL, 0x80}, {VK_RCONTROL, 0x80}, {0}}, - {{WM_KEYUP, hook|wparam|lparam, VK_RCONTROL, LLKHF_UP|LLKHF_EXTENDED}, - {WM_KEYUP, wparam|lparam, VK_CONTROL, KF_UP|KF_EXTENDED}, {0}}}, - /* CONTROL == LCONTROL */ - /* 34 */ - {VK_CONTROL, 0, 0, - {{VK_CONTROL, 0x00}, {VK_LCONTROL, 0x00}, {0}}, - {{WM_KEYDOWN, hook/*|wparam, VK_CONTROL*/}, - {WM_KEYDOWN, wparam|lparam, VK_CONTROL, 0}, {0}}}, - {VK_CONTROL, KEYEVENTF_KEYUP, 0, - {{VK_CONTROL, 0x80}, {VK_LCONTROL, 0x80}, {0}}, - {{WM_KEYUP, hook/*|wparam, VK_CONTROL*/}, - {WM_KEYUP, wparam|lparam, VK_CONTROL, KF_UP}, {0}}}, - /* CONTROL | KEYEVENTF_EXTENDEDKEY == RCONTROL */ - /* 36 */ - {VK_CONTROL, KEYEVENTF_EXTENDEDKEY, 0, - {{VK_CONTROL, 0x00}, {VK_RCONTROL, 0x00}, {0}}, - {{WM_KEYDOWN, hook/*|wparam*/|lparam, VK_CONTROL, LLKHF_EXTENDED}, - {WM_KEYDOWN, wparam|lparam, VK_CONTROL, KF_EXTENDED}, {0}}}, - {VK_CONTROL, KEYEVENTF_KEYUP | KEYEVENTF_EXTENDEDKEY, 0, - {{VK_CONTROL, 0x80}, {VK_RCONTROL, 0x80}, {0}}, - {{WM_KEYUP, hook/*|wparam*/|lparam, VK_CONTROL, LLKHF_UP|LLKHF_EXTENDED}, - {WM_KEYUP, wparam|lparam, VK_CONTROL, KF_UP|KF_EXTENDED}, {0}}}, - - /* test L-MENU & R-MENU: */ - /* RMENU == LMENU */ - /* 38 */ - {VK_RMENU, 0, 0, - {{VK_MENU, 0x00}, {VK_LMENU, 0x00}, {VK_CONTROL, 0x00, 1}, {VK_LCONTROL, 0x01, 1}, {0}}, - {{WM_SYSKEYDOWN, hook|wparam|optional, VK_LCONTROL}, - {WM_SYSKEYDOWN, hook|wparam, VK_RMENU}, - {WM_KEYDOWN, wparam|lparam|optional, VK_CONTROL, 0}, - {WM_SYSKEYDOWN, wparam|lparam, VK_MENU, 0}, {0}}}, - {VK_RMENU, KEYEVENTF_KEYUP, 1, - {{VK_MENU, 0x80}, {VK_LMENU, 0x80}, {VK_CONTROL, 0x81, 1}, {VK_LCONTROL, 0x80, 1}, {0}}, - {{WM_KEYUP, hook|wparam|optional, VK_LCONTROL}, - {WM_KEYUP, hook|wparam, VK_RMENU}, - {WM_SYSKEYUP, wparam|lparam|optional, VK_CONTROL, KF_UP}, - {WM_SYSKEYUP, wparam|lparam, VK_MENU, KF_UP}, - {WM_SYSCOMMAND, optional}, {0}}}, - /* LMENU | KEYEVENTF_EXTENDEDKEY == RMENU */ - /* 40 */ - {VK_LMENU, KEYEVENTF_EXTENDEDKEY, 0, - {{VK_MENU, 0x00}, {VK_RMENU, 0x00}, {0}}, - {{WM_SYSKEYDOWN, hook|wparam|lparam, VK_LMENU, LLKHF_EXTENDED}, - {WM_SYSKEYDOWN, wparam|lparam, VK_MENU, KF_EXTENDED}, {0}}}, - {VK_LMENU, KEYEVENTF_KEYUP | KEYEVENTF_EXTENDEDKEY, 1, - {{VK_MENU, 0x80}, {VK_RMENU, 0x80}, {0}}, - {{WM_KEYUP, hook|wparam|lparam, VK_LMENU, LLKHF_UP|LLKHF_EXTENDED}, - {WM_SYSKEYUP, wparam|lparam, VK_MENU, KF_UP|KF_EXTENDED}, - {WM_SYSCOMMAND}, {0}}}, - /* RMENU | KEYEVENTF_EXTENDEDKEY == RMENU */ - /* 42 */ - {VK_RMENU, KEYEVENTF_EXTENDEDKEY, 0, - {{VK_MENU, 0x00}, {VK_RMENU, 0x00}, {VK_CONTROL, 0x00, 1}, {VK_LCONTROL, 0x01, 1}, {0}}, - {{WM_SYSKEYDOWN, hook|wparam|lparam|optional, VK_LCONTROL, 0}, - {WM_SYSKEYDOWN, hook|wparam|lparam, VK_RMENU, LLKHF_EXTENDED}, - {WM_KEYDOWN, wparam|lparam|optional, VK_CONTROL, 0}, - {WM_SYSKEYDOWN, wparam|lparam, VK_MENU, KF_EXTENDED}, {0}}}, - {VK_RMENU, KEYEVENTF_KEYUP | KEYEVENTF_EXTENDEDKEY, 1, - {{VK_MENU, 0x80}, {VK_RMENU, 0x80}, {VK_CONTROL, 0x81, 1}, {VK_LCONTROL, 0x80, 1}, {0}}, - {{WM_KEYUP, hook|wparam|lparam|optional, VK_LCONTROL, LLKHF_UP}, - {WM_KEYUP, hook|wparam|lparam, VK_RMENU, LLKHF_UP|LLKHF_EXTENDED}, - {WM_SYSKEYUP, wparam|lparam|optional, VK_CONTROL, KF_UP}, - {WM_SYSKEYUP, wparam|lparam, VK_MENU, KF_UP|KF_EXTENDED}, - {WM_SYSCOMMAND, optional}, {0}}}, - /* MENU == LMENU */ - /* 44 */ - {VK_MENU, 0, 0, - {{VK_MENU, 0x00}, {VK_LMENU, 0x00}, {0}}, - {{WM_SYSKEYDOWN, hook/*|wparam, VK_MENU*/}, - {WM_SYSKEYDOWN, wparam|lparam, VK_MENU, 0}, {0}}}, - {VK_MENU, KEYEVENTF_KEYUP, 1, - {{VK_MENU, 0x80}, {VK_LMENU, 0x80}, {0}}, - {{WM_KEYUP, hook/*|wparam, VK_MENU*/}, - {WM_SYSKEYUP, wparam|lparam, VK_MENU, KF_UP}, - {WM_SYSCOMMAND}, {0}}}, - /* MENU | KEYEVENTF_EXTENDEDKEY == RMENU */ - /* 46 */ - {VK_MENU, KEYEVENTF_EXTENDEDKEY, 0, - {{VK_MENU, 0x00}, {VK_RMENU, 0x00}, {VK_CONTROL, 0x00, 1}, {VK_LCONTROL, 0x01, 1}, {0}}, - {{WM_SYSKEYDOWN, hook|wparam|lparam|optional, VK_CONTROL, 0}, - {WM_SYSKEYDOWN, hook/*|wparam*/|lparam, VK_MENU, LLKHF_EXTENDED}, - {WM_SYSKEYDOWN, wparam|lparam, VK_MENU, KF_EXTENDED}, {0}}}, - {VK_MENU, KEYEVENTF_KEYUP | KEYEVENTF_EXTENDEDKEY, 1, - {{VK_MENU, 0x80}, {VK_RMENU, 0x80}, {VK_CONTROL, 0x81, 1}, {VK_LCONTROL, 0x80, 1}, {0}}, - {{WM_KEYUP, hook|wparam|lparam|optional, VK_CONTROL, LLKHF_UP}, - {WM_KEYUP, hook/*|wparam*/|lparam, VK_MENU, LLKHF_UP|LLKHF_EXTENDED}, - {WM_SYSKEYUP, wparam|lparam, VK_MENU, KF_UP|KF_EXTENDED}, - {WM_SYSCOMMAND}, {0}}}, - - /* test LSHIFT & RSHIFT */ - /* 48 */ - {VK_LSHIFT, 0, 0, - {{VK_SHIFT, 0x00}, {VK_LSHIFT, 0x00}, {0}}, - {{WM_KEYDOWN, hook|wparam|lparam, VK_LSHIFT, 0}, - {WM_KEYDOWN, wparam|lparam, VK_SHIFT, 0}, {0}}}, - {VK_RSHIFT, KEYEVENTF_EXTENDEDKEY, 0, - {{VK_RSHIFT, 0x00}, {0}}, - {{WM_KEYDOWN, hook|wparam|lparam, VK_RSHIFT, LLKHF_EXTENDED}, - {WM_KEYDOWN, wparam|lparam, VK_SHIFT, 0}, {0}}}, - {VK_RSHIFT, KEYEVENTF_KEYUP | KEYEVENTF_EXTENDEDKEY, 0, - {{VK_RSHIFT, 0x80}, {0}}, - {{WM_KEYUP, hook|wparam|lparam, VK_RSHIFT, LLKHF_UP|LLKHF_EXTENDED}, - {WM_KEYUP, optional}, {0}}}, - {VK_LSHIFT, KEYEVENTF_KEYUP, 0, - {{VK_SHIFT, 0x80}, {VK_LSHIFT, 0x80}, {0}}, - {{WM_KEYUP, hook|wparam, VK_LSHIFT}, - {WM_KEYUP, wparam|lparam, VK_SHIFT, KF_UP}, {0}}}, - - {0, 0, 0, {{0}}, {{0}}} /* end */ -}; - -static struct message sent_messages[MAXKEYMESSAGES]; -static UINT sent_messages_cnt; - -/* Verify that only specified key state transitions occur */ -static void compare_and_check(int id, BYTE *ks1, BYTE *ks2, const struct sendinput_test_s *test) -{ - int i, failcount = 0; - const struct transition_s *t = test->expected_transitions; - UINT actual_cnt = 0; - const struct message *expected = test->expected_messages; - - while (t->wVk) { - int matched = ((ks1[t->wVk]&0x80) == (t->before_state&0x80) - && (ks2[t->wVk]&0x80) == (~t->before_state&0x80)); - - if (!matched && !t->optional && test->_todo_wine) - { - failcount++; - todo_wine { - ok(matched, "%2d (%x/%x): %02x from %02x -> %02x " - "instead of %02x -> %02x\n", id, test->wVk, test->dwFlags, - t->wVk, ks1[t->wVk]&0x80, ks2[t->wVk]&0x80, t->before_state, - ~t->before_state&0x80); - } - } else { - ok(matched || t->optional, "%2d (%x/%x): %02x from %02x -> %02x " - "instead of %02x -> %02x\n", id, test->wVk, test->dwFlags, - t->wVk, ks1[t->wVk]&0x80, ks2[t->wVk]&0x80, t->before_state, - ~t->before_state&0x80); - } - ks2[t->wVk] = ks1[t->wVk]; /* clear the match */ - t++; - } - for (i = 0; i < 256; i++) - if (ks2[i] != ks1[i] && test->_todo_wine) - { - failcount++; - todo_wine - ok(FALSE, "%2d (%x/%x): %02x from %02x -> %02x unexpected\n", - id, test->wVk, test->dwFlags, i, ks1[i], ks2[i]); - } - else - ok(ks2[i] == ks1[i], "%2d (%x/%x): %02x from %02x -> %02x unexpected\n", - id, test->wVk, test->dwFlags, i, ks1[i], ks2[i]); - - while (expected->message && actual_cnt < sent_messages_cnt) - { - const struct message *actual = &sent_messages[actual_cnt]; - - if (expected->message == actual->message) - { - if (expected->flags & wparam) - { - if ((expected->flags & optional) && (expected->wParam != actual->wParam)) - { - expected++; - continue; - } - if (expected->wParam != actual->wParam && test->_todo_wine) - { - failcount++; - todo_wine - ok(FALSE, "%2d (%x/%x): in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n", - id, test->wVk, test->dwFlags, expected->message, expected->wParam, actual->wParam); - } - else - ok(expected->wParam == actual->wParam, - "%2d (%x/%x): in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n", - id, test->wVk, test->dwFlags, expected->message, expected->wParam, actual->wParam); - } - if (expected->flags & lparam) - { - if (expected->lParam != actual->lParam && test->_todo_wine) - { - failcount++; - todo_wine - ok(FALSE, "%2d (%x/%x): in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n", - id, test->wVk, test->dwFlags, expected->message, expected->lParam, actual->lParam); - } - else - ok(expected->lParam == actual->lParam, - "%2d (%x/%x): in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n", - id, test->wVk, test->dwFlags, expected->message, expected->lParam, actual->lParam); - } - ok((expected->flags & hook) == (actual->flags & hook), - "%2d (%x/%x): the msg 0x%04x should have been sent by a hook\n", - id, test->wVk, test->dwFlags, expected->message); - - } - else if (expected->flags & optional) - { - expected++; - continue; - } - /* NT4 doesn't send SYSKEYDOWN/UP to hooks, only KEYDOWN/UP */ - else if ((expected->flags & hook) && - (expected->message == WM_SYSKEYDOWN || expected->message == WM_SYSKEYUP) && - (actual->message == expected->message - 4)) - { - ok((expected->flags & hook) == (actual->flags & hook), - "%2d (%x/%x): the msg 0x%04x should have been sent by a hook\n", - id, test->wVk, test->dwFlags, expected->message); - } - /* For VK_RMENU, at least localized Win2k/XP sends KEYDOWN/UP - * instead of SYSKEYDOWN/UP to the WNDPROC */ - else if (test->wVk == VK_RMENU && !(expected->flags & hook) && - (expected->message == WM_SYSKEYDOWN || expected->message == WM_SYSKEYUP) && - (actual->message == expected->message - 4)) - { - ok(expected->wParam == actual->wParam && expected->lParam == actual->lParam, - "%2d (%x/%x): the msg 0x%04x was expected, but got msg 0x%04x instead\n", - id, test->wVk, test->dwFlags, expected->message, actual->message); - } - else if (test->_todo_wine) - { - failcount++; - todo_wine - ok(FALSE, - "%2d (%x/%x): the msg 0x%04x was expected, but got msg 0x%04x instead\n", - id, test->wVk, test->dwFlags, expected->message, actual->message); - } - else - ok(FALSE, - "%2d (%x/%x): the msg 0x%04x was expected, but got msg 0x%04x instead\n", - id, test->wVk, test->dwFlags, expected->message, actual->message); - - actual_cnt++; - expected++; - } - /* skip all optional trailing messages */ - while (expected->message && (expected->flags & optional)) - expected++; - - - if (expected->message || actual_cnt < sent_messages_cnt) - { - if (test->_todo_wine) - { - failcount++; - todo_wine - ok(FALSE, "%2d (%x/%x): the msg sequence is not complete: expected %04x - actual %04x\n", - id, test->wVk, test->dwFlags, expected->message, sent_messages[actual_cnt].message); - } - else - ok(FALSE, "%2d (%x/%x): the msg sequence is not complete: expected %04x - actual %04x\n", - id, test->wVk, test->dwFlags, expected->message, sent_messages[actual_cnt].message); - } - - if( test->_todo_wine && !failcount) /* succeeded yet marked todo */ - todo_wine - ok(TRUE, "%2d (%x/%x): marked \"todo_wine\" but succeeds\n", id, test->wVk, test->dwFlags); - - sent_messages_cnt = 0; -} - -/* WndProc2 checks that we get at least the messages specified */ -static LRESULT CALLBACK WndProc2(HWND hWnd, UINT Msg, WPARAM wParam, - LPARAM lParam) -{ - if (winetest_debug > 1) trace("MSG: %8x W:%8lx L:%8lx\n", Msg, wParam, lParam); - - if (Msg != WM_PAINT && - Msg != WM_NCPAINT && - Msg != WM_SYNCPAINT && - Msg != WM_ERASEBKGND && - Msg != WM_NCHITTEST && - Msg != WM_GETTEXT && - Msg != WM_GETICON && - Msg != WM_IME_SELECT && - Msg != WM_DEVICECHANGE && - Msg != WM_TIMECHANGE) - { - ok(sent_messages_cnt < MAXKEYMESSAGES, "Too many messages\n"); - if (sent_messages_cnt < MAXKEYMESSAGES) - { - sent_messages[sent_messages_cnt].message = Msg; - sent_messages[sent_messages_cnt].flags = 0; - sent_messages[sent_messages_cnt].wParam = wParam; - sent_messages[sent_messages_cnt++].lParam = HIWORD(lParam) & (KF_UP|KF_EXTENDED); - } - } - return DefWindowProc(hWnd, Msg, wParam, lParam); -} - -static LRESULT CALLBACK hook_proc(int code, WPARAM wparam, LPARAM lparam) -{ - KBDLLHOOKSTRUCT *hook_info = (KBDLLHOOKSTRUCT *)lparam; - - if (code == HC_ACTION) - { - ok(sent_messages_cnt < MAXKEYMESSAGES, "Too many messages\n"); - if (sent_messages_cnt < MAXKEYMESSAGES) - { - sent_messages[sent_messages_cnt].message = wparam; - sent_messages[sent_messages_cnt].flags = hook; - sent_messages[sent_messages_cnt].wParam = hook_info->vkCode; - sent_messages[sent_messages_cnt++].lParam = hook_info->flags & (LLKHF_UP|LLKHF_EXTENDED); - } - -if(0) /* For some reason not stable on Wine */ -{ - if (wparam == WM_KEYDOWN || wparam == WM_SYSKEYDOWN) - ok(!(GetAsyncKeyState(hook_info->vkCode) & 0x8000), "key %x should be up\n", hook_info->vkCode); - else if (wparam == WM_KEYUP || wparam == WM_SYSKEYUP) - ok(GetAsyncKeyState(hook_info->vkCode) & 0x8000, "key %x should be down\n", hook_info->vkCode); -} - - if (winetest_debug > 1) - trace("Hook: w=%lx vk:%8x sc:%8x fl:%8x %lx\n", wparam, - hook_info->vkCode, hook_info->scanCode, hook_info->flags, hook_info->dwExtraInfo); - } - return CallNextHookEx( 0, code, wparam, lparam ); -} -static void test_Input_blackbox(void) -{ - TEST_INPUT i; - int ii; - BYTE ks1[256], ks2[256]; - LONG_PTR prevWndProc; - HWND window; - HHOOK hook; - - if (GetKeyboardLayout(0) != (HKL)(ULONG_PTR)0x04090409) - { - skip("Skipping Input_blackbox test on non-US keyboard\n"); - return; - } - window = CreateWindow("Static", NULL, WS_POPUP|WS_HSCROLL|WS_VSCROLL - |WS_VISIBLE, 0, 0, 200, 60, NULL, NULL, - NULL, NULL); - ok(window != NULL, "error: %d\n", (int) GetLastError()); - SetWindowPos( window, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE ); - SetForegroundWindow( window ); - - if (!(hook = SetWindowsHookExA(WH_KEYBOARD_LL, hook_proc, GetModuleHandleA( NULL ), 0))) - { - DestroyWindow(window); - win_skip("WH_KEYBOARD_LL is not supported\n"); - return; - } - - /* must process all initial messages, otherwise X11DRV_KeymapNotify unsets - * key state set by SendInput(). */ - empty_message_queue(); - - prevWndProc = SetWindowLongPtr(window, GWLP_WNDPROC, (LONG_PTR) WndProc2); - ok(prevWndProc != 0 || (prevWndProc == 0 && GetLastError() == 0), - "error: %d\n", (int) GetLastError()); - - i.type = INPUT_KEYBOARD; - i.u.ki.time = 0; - i.u.ki.dwExtraInfo = 0; - - for (ii = 0; ii < sizeof(sendinput_test)/sizeof(struct sendinput_test_s)-1; - ii++) { - GetKeyboardState(ks1); - i.u.ki.wScan = ii+1 /* useful for debugging */; - i.u.ki.dwFlags = sendinput_test[ii].dwFlags; - i.u.ki.wVk = sendinput_test[ii].wVk; - pSendInput(1, (INPUT*)&i, sizeof(TEST_INPUT)); - empty_message_queue(); - GetKeyboardState(ks2); - if (!ii && sent_messages_cnt <= 1 && !memcmp( ks1, ks2, sizeof(ks1) )) - { - win_skip( "window doesn't receive the queued input\n" ); - /* release the key */ - i.u.ki.dwFlags |= KEYEVENTF_KEYUP; - pSendInput(1, (INPUT*)&i, sizeof(TEST_INPUT)); - break; - } - compare_and_check(ii, ks1, ks2, &sendinput_test[ii]); - } - - empty_message_queue(); - DestroyWindow(window); - UnhookWindowsHookEx(hook); -} - -static void reset_key_status(void) -{ - key_status.last_key_down = -1; - key_status.last_key_up = -1; - key_status.last_syskey_down = -1; - key_status.last_syskey_up = -1; - key_status.last_char = -1; - key_status.last_syschar = -1; - key_status.last_hook_down = -1; - key_status.last_hook_up = -1; - key_status.last_hook_syskey_down = -1; - key_status.last_hook_syskey_up = -1; - key_status.expect_alt = FALSE; - key_status.sendinput_broken = FALSE; -} - -static void test_unicode_keys(HWND hwnd, HHOOK hook) -{ - TEST_INPUT inputs[2]; - MSG msg; - - /* init input data that never changes */ - inputs[1].type = inputs[0].type = INPUT_KEYBOARD; - inputs[1].u.ki.dwExtraInfo = inputs[0].u.ki.dwExtraInfo = 0; - inputs[1].u.ki.time = inputs[0].u.ki.time = 0; - - /* pressing & releasing a single unicode character */ - inputs[0].u.ki.wVk = 0; - inputs[0].u.ki.wScan = 0x3c0; - inputs[0].u.ki.dwFlags = KEYEVENTF_UNICODE; - - reset_key_status(); - pSendInput(1, (INPUT*)inputs, sizeof(INPUT)); - while(PeekMessageW(&msg, hwnd, 0, 0, PM_REMOVE)){ - if(msg.message == WM_KEYDOWN && msg.wParam == VK_PACKET){ - TranslateMessage(&msg); - } - DispatchMessageW(&msg); - } - if(!key_status.sendinput_broken){ - ok(key_status.last_key_down == VK_PACKET, - "Last keydown msg should have been VK_PACKET[0x%04x] (was: 0x%x)\n", VK_PACKET, key_status.last_key_down); - ok(key_status.last_char == 0x3c0, - "Last char msg wparam should have been 0x3c0 (was: 0x%x)\n", key_status.last_char); - if(hook) - ok(key_status.last_hook_down == 0x3c0, - "Last hookdown msg should have been 0x3c0, was: 0x%x\n", key_status.last_hook_down); - } - - inputs[1].u.ki.wVk = 0; - inputs[1].u.ki.wScan = 0x3c0; - inputs[1].u.ki.dwFlags = KEYEVENTF_UNICODE | KEYEVENTF_KEYUP; - - reset_key_status(); - pSendInput(1, (INPUT*)(inputs+1), sizeof(INPUT)); - while(PeekMessageW(&msg, hwnd, 0, 0, PM_REMOVE)){ - if(msg.message == WM_KEYDOWN && msg.wParam == VK_PACKET){ - TranslateMessage(&msg); - } - DispatchMessageW(&msg); - } - if(!key_status.sendinput_broken){ - ok(key_status.last_key_up == VK_PACKET, - "Last keyup msg should have been VK_PACKET[0x%04x] (was: 0x%x)\n", VK_PACKET, key_status.last_key_up); - if(hook) - ok(key_status.last_hook_up == 0x3c0, - "Last hookup msg should have been 0x3c0, was: 0x%x\n", key_status.last_hook_up); - } - - /* holding alt, pressing & releasing a unicode character, releasing alt */ - inputs[0].u.ki.wVk = VK_LMENU; - inputs[0].u.ki.wScan = 0; - inputs[0].u.ki.dwFlags = 0; - - inputs[1].u.ki.wVk = 0; - inputs[1].u.ki.wScan = 0x3041; - inputs[1].u.ki.dwFlags = KEYEVENTF_UNICODE; - - reset_key_status(); - key_status.expect_alt = TRUE; - pSendInput(2, (INPUT*)inputs, sizeof(INPUT)); - while(PeekMessageW(&msg, hwnd, 0, 0, PM_REMOVE)){ - if(msg.message == WM_SYSKEYDOWN && msg.wParam == VK_PACKET){ - TranslateMessage(&msg); - } - DispatchMessageW(&msg); - } - if(!key_status.sendinput_broken){ - ok(key_status.last_syskey_down == VK_PACKET, - "Last syskeydown msg should have been VK_PACKET[0x%04x] (was: 0x%x)\n", VK_PACKET, key_status.last_syskey_down); - ok(key_status.last_syschar == 0x3041, - "Last syschar msg should have been 0x3041 (was: 0x%x)\n", key_status.last_syschar); - if(hook) - ok(key_status.last_hook_syskey_down == 0x3041, - "Last hooksysdown msg should have been 0x3041, was: 0x%x\n", key_status.last_hook_syskey_down); - } - - inputs[1].u.ki.wVk = 0; - inputs[1].u.ki.wScan = 0x3041; - inputs[1].u.ki.dwFlags = KEYEVENTF_UNICODE | KEYEVENTF_KEYUP; - - inputs[0].u.ki.wVk = VK_LMENU; - inputs[0].u.ki.wScan = 0; - inputs[0].u.ki.dwFlags = KEYEVENTF_KEYUP; - - reset_key_status(); - key_status.expect_alt = TRUE; - pSendInput(2, (INPUT*)inputs, sizeof(INPUT)); - while(PeekMessageW(&msg, hwnd, 0, 0, PM_REMOVE)){ - if(msg.message == WM_SYSKEYDOWN && msg.wParam == VK_PACKET){ - TranslateMessage(&msg); - } - DispatchMessageW(&msg); - } - if(!key_status.sendinput_broken){ - ok(key_status.last_key_up == VK_PACKET, - "Last keyup msg should have been VK_PACKET[0x%04x] (was: 0x%x)\n", VK_PACKET, key_status.last_key_up); - if(hook) - ok(key_status.last_hook_up == 0x3041, - "Last hook up msg should have been 0x3041, was: 0x%x\n", key_status.last_hook_up); - } -} - -static LRESULT CALLBACK unicode_wnd_proc( HWND hWnd, UINT msg, WPARAM wParam, - LPARAM lParam ) -{ - switch(msg){ - case WM_KEYDOWN: - key_status.last_key_down = wParam; - break; - case WM_SYSKEYDOWN: - key_status.last_syskey_down = wParam; - break; - case WM_KEYUP: - key_status.last_key_up = wParam; - break; - case WM_SYSKEYUP: - key_status.last_syskey_up = wParam; - break; - case WM_CHAR: - key_status.last_char = wParam; - break; - case WM_SYSCHAR: - key_status.last_syschar = wParam; - break; - } - return DefWindowProcW(hWnd, msg, wParam, lParam); -} - -static LRESULT CALLBACK llkbd_unicode_hook(int nCode, WPARAM wParam, LPARAM lParam) -{ - if(nCode == HC_ACTION){ - LPKBDLLHOOKSTRUCT info = (LPKBDLLHOOKSTRUCT)lParam; - if(!info->vkCode){ - key_status.sendinput_broken = TRUE; - win_skip("SendInput doesn't support unicode on this platform\n"); - }else{ - if(key_status.expect_alt){ - ok(info->vkCode == VK_LMENU, "vkCode should have been VK_LMENU[0x%04x], was: 0x%x\n", VK_LMENU, info->vkCode); - key_status.expect_alt = FALSE; - }else - ok(info->vkCode == VK_PACKET, "vkCode should have been VK_PACKET[0x%04x], was: 0x%x\n", VK_PACKET, info->vkCode); - } - switch(wParam){ - case WM_KEYDOWN: - key_status.last_hook_down = info->scanCode; - break; - case WM_KEYUP: - key_status.last_hook_up = info->scanCode; - break; - case WM_SYSKEYDOWN: - key_status.last_hook_syskey_down = info->scanCode; - break; - case WM_SYSKEYUP: - key_status.last_hook_syskey_up = info->scanCode; - break; - } - } - return CallNextHookEx(NULL, nCode, wParam, lParam); -} - -static void test_Input_unicode(void) -{ - WCHAR classNameW[] = {'I','n','p','u','t','U','n','i','c','o','d','e', - 'K','e','y','T','e','s','t','C','l','a','s','s',0}; - WCHAR windowNameW[] = {'I','n','p','u','t','U','n','i','c','o','d','e', - 'K','e','y','T','e','s','t',0}; - MSG msg; - WNDCLASSW wclass; - HANDLE hInstance = GetModuleHandleW(NULL); - HHOOK hook; - HMODULE hModuleImm32; - BOOL (WINAPI *pImmDisableIME)(DWORD); - - wclass.lpszClassName = classNameW; - wclass.style = CS_HREDRAW | CS_VREDRAW; - wclass.lpfnWndProc = unicode_wnd_proc; - wclass.hInstance = hInstance; - wclass.hIcon = LoadIcon(0, IDI_APPLICATION); - wclass.hCursor = LoadCursor( NULL, IDC_ARROW); - wclass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); - wclass.lpszMenuName = 0; - wclass.cbClsExtra = 0; - wclass.cbWndExtra = 0; - if(!RegisterClassW(&wclass)){ - win_skip("Unicode functions not supported\n"); - return; - } - - hModuleImm32 = LoadLibrary("imm32.dll"); - if (hModuleImm32) { - pImmDisableIME = (void *)GetProcAddress(hModuleImm32, "ImmDisableIME"); - if (pImmDisableIME) - pImmDisableIME(0); - } - pImmDisableIME = NULL; - FreeLibrary(hModuleImm32); - - /* create the test window that will receive the keystrokes */ - hWndTest = CreateWindowW(wclass.lpszClassName, windowNameW, - WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, 100, 100, - NULL, NULL, hInstance, NULL); - - assert(hWndTest); - assert(IsWindowUnicode(hWndTest)); - - hook = SetWindowsHookExW(WH_KEYBOARD_LL, llkbd_unicode_hook, GetModuleHandleW(NULL), 0); - if(!hook) - win_skip("unable to set WH_KEYBOARD_LL hook\n"); - - ShowWindow(hWndTest, SW_SHOW); - SetWindowPos(hWndTest, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE); - SetForegroundWindow(hWndTest); - UpdateWindow(hWndTest); - - /* flush pending messages */ - while (PeekMessageW(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageW(&msg); - - SetFocus(hWndTest); - - test_unicode_keys(hWndTest, hook); - - if(hook) - UnhookWindowsHookEx(hook); - DestroyWindow(hWndTest); -} - -static void test_keynames(void) -{ - int i, len; - char buff[256]; - - for (i = 0; i < 512; i++) - { - strcpy(buff, "----"); - len = GetKeyNameTextA(i << 16, buff, sizeof(buff)); - ok(len || !buff[0], "%d: Buffer is not zeroed\n", i); - } -} - -static POINT pt_old, pt_new; -static BOOL clipped; -#define STEP 3 - -static LRESULT CALLBACK hook_proc1( int code, WPARAM wparam, LPARAM lparam ) -{ - MSLLHOOKSTRUCT *hook = (MSLLHOOKSTRUCT *)lparam; - POINT pt, pt1; - - if (code == HC_ACTION) - { - /* This is our new cursor position */ - pt_new = hook->pt; - /* Should return previous position */ - GetCursorPos(&pt); - ok(pt.x == pt_old.x && pt.y == pt_old.y, "GetCursorPos: (%d,%d)\n", pt.x, pt.y); - - /* Should set new position until hook chain is finished. */ - pt.x = pt_old.x + STEP; - pt.y = pt_old.y + STEP; - SetCursorPos(pt.x, pt.y); - GetCursorPos(&pt1); - if (clipped) - ok(pt1.x == pt_old.x && pt1.y == pt_old.y, "Wrong set pos: (%d,%d)\n", pt1.x, pt1.y); - else - ok(pt1.x == pt.x && pt1.y == pt.y, "Wrong set pos: (%d,%d)\n", pt1.x, pt1.y); - } - return CallNextHookEx( 0, code, wparam, lparam ); -} - -static LRESULT CALLBACK hook_proc2( int code, WPARAM wparam, LPARAM lparam ) -{ - MSLLHOOKSTRUCT *hook = (MSLLHOOKSTRUCT *)lparam; - POINT pt; - - if (code == HC_ACTION) - { - ok(hook->pt.x == pt_new.x && hook->pt.y == pt_new.y, - "Wrong hook coords: (%d %d) != (%d,%d)\n", hook->pt.x, hook->pt.y, pt_new.x, pt_new.y); - - /* Should match position set above */ - GetCursorPos(&pt); - if (clipped) - ok(pt.x == pt_old.x && pt.y == pt_old.y, "GetCursorPos: (%d,%d)\n", pt.x, pt.y); - else - ok(pt.x == pt_old.x +STEP && pt.y == pt_old.y +STEP, "GetCursorPos: (%d,%d)\n", pt.x, pt.y); - } - return CallNextHookEx( 0, code, wparam, lparam ); -} - -static void test_mouse_ll_hook(void) -{ - HWND hwnd; - HHOOK hook1, hook2; - POINT pt_org, pt; - RECT rc; - - GetCursorPos(&pt_org); - hwnd = CreateWindow("static", "Title", WS_OVERLAPPEDWINDOW | WS_VISIBLE, - 10, 10, 200, 200, NULL, NULL, NULL, NULL); - SetCursorPos(100, 100); - - if (!(hook2 = SetWindowsHookExA(WH_MOUSE_LL, hook_proc2, GetModuleHandleA(0), 0))) - { - win_skip( "cannot set MOUSE_LL hook\n" ); - goto done; - } - hook1 = SetWindowsHookExA(WH_MOUSE_LL, hook_proc1, GetModuleHandleA(0), 0); - - GetCursorPos(&pt_old); - mouse_event(MOUSEEVENTF_MOVE, -STEP, 0, 0, 0); - GetCursorPos(&pt_old); - ok(pt_old.x == pt_new.x && pt_old.y == pt_new.y, "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); - mouse_event(MOUSEEVENTF_MOVE, +STEP, 0, 0, 0); - GetCursorPos(&pt_old); - ok(pt_old.x == pt_new.x && pt_old.y == pt_new.y, "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); - mouse_event(MOUSEEVENTF_MOVE, 0, -STEP, 0, 0); - GetCursorPos(&pt_old); - ok(pt_old.x == pt_new.x && pt_old.y == pt_new.y, "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); - mouse_event(MOUSEEVENTF_MOVE, 0, +STEP, 0, 0); - GetCursorPos(&pt_old); - ok(pt_old.x == pt_new.x && pt_old.y == pt_new.y, "Wrong new pos: (%d,%d)\n", pt_old.x, pt_old.y); - - SetRect(&rc, 50, 50, 151, 151); - ClipCursor(&rc); - clipped = TRUE; - - SetCursorPos(40, 40); - GetCursorPos(&pt_old); - ok(pt_old.x == 50 && pt_old.y == 50, "Wrong new pos: (%d,%d)\n", pt_new.x, pt_new.y); - SetCursorPos(160, 160); - GetCursorPos(&pt_old); - ok(pt_old.x == 150 && pt_old.y == 150, "Wrong new pos: (%d,%d)\n", pt_new.x, pt_new.y); - mouse_event(MOUSEEVENTF_MOVE, +STEP, +STEP, 0, 0); - GetCursorPos(&pt_old); - ok(pt_old.x == 150 && pt_old.y == 150, "Wrong new pos: (%d,%d)\n", pt_new.x, pt_new.y); - - clipped = FALSE; - pt_new.x = pt_new.y = 150; - ClipCursor(NULL); - UnhookWindowsHookEx(hook1); - - /* Now check that mouse buttons do not change mouse position - if we don't have MOUSEEVENTF_MOVE flag specified. */ - - /* We reusing the same hook callback, so make it happy */ - pt_old.x = pt_new.x - STEP; - pt_old.y = pt_new.y - STEP; - mouse_event(MOUSEEVENTF_LEFTUP, 123, 456, 0, 0); - GetCursorPos(&pt); - ok(pt.x == pt_new.x && pt.y == pt_new.y, "Position changed: (%d,%d)\n", pt.x, pt.y); - mouse_event(MOUSEEVENTF_RIGHTUP, 456, 123, 0, 0); - GetCursorPos(&pt); - ok(pt.x == pt_new.x && pt.y == pt_new.y, "Position changed: (%d,%d)\n", pt.x, pt.y); - - mouse_event(MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE, 123, 456, 0, 0); - GetCursorPos(&pt); - ok(pt.x == pt_new.x && pt.y == pt_new.y, "Position changed: (%d,%d)\n", pt.x, pt.y); - mouse_event(MOUSEEVENTF_RIGHTUP | MOUSEEVENTF_ABSOLUTE, 456, 123, 0, 0); - GetCursorPos(&pt); - ok(pt.x == pt_new.x && pt.y == pt_new.y, "Position changed: (%d,%d)\n", pt.x, pt.y); - - UnhookWindowsHookEx(hook2); -done: - DestroyWindow(hwnd); - SetCursorPos(pt_org.x, pt_org.y); -} - -static void test_GetMouseMovePointsEx(void) -{ -#define BUFLIM 64 -#define MYERROR 0xdeadbeef - int count, retval; - MOUSEMOVEPOINT in; - MOUSEMOVEPOINT out[200]; - POINT point; - - /* Get a valid content for the input struct */ - if(!GetCursorPos(&point)) { - skip("GetCursorPos() failed with error %u\n", GetLastError()); - return; - } - memset(&in, 0, sizeof(MOUSEMOVEPOINT)); - in.x = point.x; - in.y = point.y; - - /* test first parameter - * everything different than sizeof(MOUSEMOVEPOINT) - * is expected to fail with ERROR_INVALID_PARAMETER - */ - SetLastError(MYERROR); - retval = pGetMouseMovePointsEx(0, &in, out, BUFLIM, GMMP_USE_DISPLAY_POINTS); - if (retval == ERROR_INVALID_PARAMETER) - { - win_skip( "GetMouseMovePointsEx broken on WinME\n" ); - return; - } - ok(retval == -1, "expected GetMouseMovePointsEx to fail, got %d\n", retval); - ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == MYERROR, - "expected error ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); - - SetLastError(MYERROR); - retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT)-1, &in, out, BUFLIM, GMMP_USE_DISPLAY_POINTS); - ok(retval == -1, "expected GetMouseMovePointsEx to fail, got %d\n", retval); - ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == MYERROR, - "expected error ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); - - SetLastError(MYERROR); - retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT)+1, &in, out, BUFLIM, GMMP_USE_DISPLAY_POINTS); - ok(retval == -1, "expected GetMouseMovePointsEx to fail, got %d\n", retval); - ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == MYERROR, - "expected error ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); - - /* test second and third parameter - */ - SetLastError(MYERROR); - retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), NULL, out, BUFLIM, GMMP_USE_DISPLAY_POINTS); - ok(retval == -1, "expected GetMouseMovePointsEx to fail, got %d\n", retval); - ok(GetLastError() == ERROR_NOACCESS || GetLastError() == MYERROR, - "expected error ERROR_NOACCESS, got %u\n", GetLastError()); - - SetLastError(MYERROR); - retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &in, NULL, BUFLIM, GMMP_USE_DISPLAY_POINTS); - ok(retval == -1, "expected GetMouseMovePointsEx to fail, got %d\n", retval); - ok(ERROR_NOACCESS == GetLastError(), - "expected error ERROR_NOACCESS, got %u\n", GetLastError()); - - SetLastError(MYERROR); - retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), NULL, NULL, BUFLIM, GMMP_USE_DISPLAY_POINTS); - ok(retval == -1, "expected GetMouseMovePointsEx to fail, got %d\n", retval); - ok(ERROR_NOACCESS == GetLastError(), - "expected error ERROR_NOACCESS, got %u\n", GetLastError()); - - SetLastError(MYERROR); - count = 0; - retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &in, NULL, count, GMMP_USE_DISPLAY_POINTS); - if (retval == -1) - ok(GetLastError() == ERROR_POINT_NOT_FOUND, "unexpected error %u\n", GetLastError()); - else - ok(retval == count, "expected GetMouseMovePointsEx to succeed, got %d\n", retval); - - /* test fourth parameter - * a value higher than 64 is expected to fail with ERROR_INVALID_PARAMETER - */ - SetLastError(MYERROR); - count = -1; - retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &in, out, count, GMMP_USE_DISPLAY_POINTS); - ok(retval == count, "expected GetMouseMovePointsEx to fail, got %d\n", retval); - ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == MYERROR, - "expected error ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); - - SetLastError(MYERROR); - count = 0; - retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &in, out, count, GMMP_USE_DISPLAY_POINTS); - if (retval == -1) - ok(GetLastError() == ERROR_POINT_NOT_FOUND, "unexpected error %u\n", GetLastError()); - else - ok(retval == count, "expected GetMouseMovePointsEx to succeed, got %d\n", retval); - - SetLastError(MYERROR); - count = BUFLIM; - retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &in, out, count, GMMP_USE_DISPLAY_POINTS); - if (retval == -1) - ok(GetLastError() == ERROR_POINT_NOT_FOUND, "unexpected error %u\n", GetLastError()); - else - ok((0 <= retval) && (retval <= count), "expected GetMouseMovePointsEx to succeed, got %d\n", retval); - - SetLastError(MYERROR); - retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &in, out, BUFLIM+1, GMMP_USE_DISPLAY_POINTS); - ok(retval == -1, "expected GetMouseMovePointsEx to fail, got %d\n", retval); - ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == MYERROR, - "expected error ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); - - /* it was not possible to force an error with the fifth parameter on win2k */ - - /* test combinations of wrong parameters to see which error wins */ - SetLastError(MYERROR); - retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT)-1, NULL, out, BUFLIM, GMMP_USE_DISPLAY_POINTS); - ok(retval == -1, "expected GetMouseMovePointsEx to fail, got %d\n", retval); - ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == MYERROR, - "expected error ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); - - SetLastError(MYERROR); - retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT)-1, &in, NULL, BUFLIM, GMMP_USE_DISPLAY_POINTS); - ok(retval == -1, "expected GetMouseMovePointsEx to fail, got %d\n", retval); - ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == MYERROR, - "expected error ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); - - SetLastError(MYERROR); - retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), NULL, out, BUFLIM+1, GMMP_USE_DISPLAY_POINTS); - ok(retval == -1, "expected GetMouseMovePointsEx to fail, got %d\n", retval); - ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == MYERROR, - "expected error ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); - - SetLastError(MYERROR); - retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &in, NULL, BUFLIM+1, GMMP_USE_DISPLAY_POINTS); - ok(retval == -1, "expected GetMouseMovePointsEx to fail, got %d\n", retval); - ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == MYERROR, - "expected error ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); - -#undef BUFLIM -#undef MYERROR -} - -static void test_key_map(void) -{ - HKL kl = GetKeyboardLayout(0); - UINT kL, kR, s, sL; - int i; - static const UINT numpad_collisions[][2] = { - { VK_NUMPAD0, VK_INSERT }, - { VK_NUMPAD1, VK_END }, - { VK_NUMPAD2, VK_DOWN }, - { VK_NUMPAD3, VK_NEXT }, - { VK_NUMPAD4, VK_LEFT }, - { VK_NUMPAD6, VK_RIGHT }, - { VK_NUMPAD7, VK_HOME }, - { VK_NUMPAD8, VK_UP }, - { VK_NUMPAD9, VK_PRIOR }, - }; - - s = MapVirtualKeyEx(VK_SHIFT, MAPVK_VK_TO_VSC, kl); - ok(s != 0, "MapVirtualKeyEx(VK_SHIFT) should return non-zero\n"); - sL = MapVirtualKeyEx(VK_LSHIFT, MAPVK_VK_TO_VSC, kl); - ok(s == sL || broken(sL == 0), /* win9x */ - "%x != %x\n", s, sL); - - kL = MapVirtualKeyEx(0x2a, MAPVK_VSC_TO_VK, kl); - ok(kL == VK_SHIFT, "Scan code -> vKey = %x (not VK_SHIFT)\n", kL); - kR = MapVirtualKeyEx(0x36, MAPVK_VSC_TO_VK, kl); - ok(kR == VK_SHIFT, "Scan code -> vKey = %x (not VK_SHIFT)\n", kR); - - kL = MapVirtualKeyEx(0x2a, MAPVK_VSC_TO_VK_EX, kl); - ok(kL == VK_LSHIFT || broken(kL == 0), /* win9x */ - "Scan code -> vKey = %x (not VK_LSHIFT)\n", kL); - kR = MapVirtualKeyEx(0x36, MAPVK_VSC_TO_VK_EX, kl); - ok(kR == VK_RSHIFT || broken(kR == 0), /* win9x */ - "Scan code -> vKey = %x (not VK_RSHIFT)\n", kR); - - /* test that MAPVK_VSC_TO_VK prefers the non-numpad vkey if there's ambiguity */ - for (i = 0; i < sizeof(numpad_collisions)/sizeof(numpad_collisions[0]); i++) - { - UINT numpad_scan = MapVirtualKeyEx(numpad_collisions[i][0], MAPVK_VK_TO_VSC, kl); - UINT other_scan = MapVirtualKeyEx(numpad_collisions[i][1], MAPVK_VK_TO_VSC, kl); - - /* do they really collide for this layout? */ - if (numpad_scan && other_scan == numpad_scan) - { - UINT vkey = MapVirtualKeyEx(numpad_scan, MAPVK_VSC_TO_VK, kl); - ok(vkey != numpad_collisions[i][0], - "Got numpad vKey %x for scan code %x when there was another choice\n", - vkey, numpad_scan); - } - } -} - -static void test_ToUnicode(void) -{ - WCHAR wStr[2]; - BYTE state[256]; - const BYTE SC_RETURN = 0x1c, SC_TAB = 0x0f; - const BYTE HIGHEST_BIT = 0x80; - int i, ret; - for(i=0; i<256; i++) - state[i]=0; - - SetLastError(0xdeadbeef); - ret = ToUnicode(VK_RETURN, SC_RETURN, state, wStr, 2, 0); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("ToUnicode is not implemented\n"); - return; - } - - ok(ret == 1, "ToUnicode for Return key didn't return 1 (was %i)\n", ret); - if(ret == 1) - ok(wStr[0]=='\r', "ToUnicode for CTRL + Return was %i (expected 13)\n", wStr[0]); - state[VK_CONTROL] |= HIGHEST_BIT; - state[VK_LCONTROL] |= HIGHEST_BIT; - - ret = ToUnicode(VK_TAB, SC_TAB, state, wStr, 2, 0); - ok(ret == 0, "ToUnicode for CTRL + Tab didn't return 0 (was %i)\n", ret); - - ret = ToUnicode(VK_RETURN, SC_RETURN, state, wStr, 2, 0); - ok(ret == 1, "ToUnicode for CTRL + Return didn't return 1 (was %i)\n", ret); - if(ret == 1) - ok(wStr[0]=='\n', "ToUnicode for CTRL + Return was %i (expected 10)\n", wStr[0]); - - state[VK_SHIFT] |= HIGHEST_BIT; - state[VK_LSHIFT] |= HIGHEST_BIT; - ret = ToUnicode(VK_TAB, SC_TAB, state, wStr, 2, 0); - ok(ret == 0, "ToUnicode for CTRL + SHIFT + Tab didn't return 0 (was %i)\n", ret); - ret = ToUnicode(VK_RETURN, SC_RETURN, state, wStr, 2, 0); - todo_wine ok(ret == 0, "ToUnicode for CTRL + SHIFT + Return didn't return 0 (was %i)\n", ret); -} - -static void test_get_async_key_state(void) -{ - /* input value sanity checks */ - ok(0 == GetAsyncKeyState(1000000), "GetAsyncKeyState did not return 0\n"); - ok(0 == GetAsyncKeyState(-1000000), "GetAsyncKeyState did not return 0\n"); -} - -static void test_keyboard_layout_name(void) -{ - BOOL ret; - char klid[KL_NAMELENGTH]; - - if (GetKeyboardLayout(0) != (HKL)(ULONG_PTR)0x04090409) return; - - klid[0] = 0; - ret = GetKeyboardLayoutNameA(klid); - ok(ret, "GetKeyboardLayoutNameA failed %u\n", GetLastError()); - ok(!strcmp(klid, "00000409"), "expected 00000409, got %s\n", klid); -} - -START_TEST(input) -{ - init_function_pointers(); - - if (pSendInput) - { - test_Input_blackbox(); - test_Input_whitebox(); - test_Input_unicode(); - } - else win_skip("SendInput is not available\n"); - - test_keynames(); - test_mouse_ll_hook(); - test_key_map(); - test_ToUnicode(); - test_get_async_key_state(); - test_keyboard_layout_name(); - - if(pGetMouseMovePointsEx) - test_GetMouseMovePointsEx(); - else - win_skip("GetMouseMovePointsEx is not available\n"); -} diff --git a/rostests/winetests/user32/listbox.c b/rostests/winetests/user32/listbox.c deleted file mode 100644 index 1d6e8a34ed8..00000000000 --- a/rostests/winetests/user32/listbox.c +++ /dev/null @@ -1,1558 +0,0 @@ -/* Unit test suite for list boxes. - * - * Copyright 2003 Ferenc Wagner - * - * 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 "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winnls.h" - -#include "wine/test.h" - -#ifdef VISIBLE -#define WAIT Sleep (1000) -#define REDRAW RedrawWindow (handle, NULL, 0, RDW_UPDATENOW) -#else -#define WAIT -#define REDRAW -#endif - -static const char * const strings[4] = { - "First added", - "Second added", - "Third added", - "Fourth added which is very long because at some time we only had a 256 byte character buffer and that was overflowing in one of those applications that had a common dialog file open box and tried to add a 300 characters long custom filter string which of course the code did not like and crashed. Just make sure this string is longer than 256 characters." -}; - -static const char BAD_EXTENSION[] = "*.badtxt"; - -static HWND -create_listbox (DWORD add_style, HWND parent) -{ - HWND handle; - INT_PTR ctl_id=0; - if (parent) - ctl_id=1; - handle=CreateWindow ("LISTBOX", "TestList", - (LBS_STANDARD & ~LBS_SORT) | add_style, - 0, 0, 100, 100, - parent, (HMENU)ctl_id, NULL, 0); - - assert (handle); - SendMessage (handle, LB_ADDSTRING, 0, (LPARAM) strings[0]); - SendMessage (handle, LB_ADDSTRING, 0, (LPARAM) strings[1]); - SendMessage (handle, LB_ADDSTRING, 0, (LPARAM) strings[2]); - SendMessage (handle, LB_ADDSTRING, 0, (LPARAM) strings[3]); - -#ifdef VISIBLE - ShowWindow (handle, SW_SHOW); -#endif - REDRAW; - - return handle; -} - -struct listbox_prop { - DWORD add_style; -}; - -struct listbox_stat { - int selected, anchor, caret, selcount; -}; - -struct listbox_test { - struct listbox_prop prop; - struct listbox_stat init, init_todo; - struct listbox_stat click, click_todo; - struct listbox_stat step, step_todo; - struct listbox_stat sel, sel_todo; -}; - -static void -listbox_query (HWND handle, struct listbox_stat *results) -{ - results->selected = SendMessage (handle, LB_GETCURSEL, 0, 0); - results->anchor = SendMessage (handle, LB_GETANCHORINDEX, 0, 0); - results->caret = SendMessage (handle, LB_GETCARETINDEX, 0, 0); - results->selcount = SendMessage (handle, LB_GETSELCOUNT, 0, 0); -} - -static void -buttonpress (HWND handle, WORD x, WORD y) -{ - LPARAM lp=x+(y<<16); - - WAIT; - SendMessage (handle, WM_LBUTTONDOWN, MK_LBUTTON, lp); - SendMessage (handle, WM_LBUTTONUP, 0, lp); - REDRAW; -} - -static void -keypress (HWND handle, WPARAM keycode, BYTE scancode, BOOL extended) -{ - LPARAM lp=1+(scancode<<16)+(extended?KEYEVENTF_EXTENDEDKEY:0); - - WAIT; - SendMessage (handle, WM_KEYDOWN, keycode, lp); - SendMessage (handle, WM_KEYUP , keycode, lp | 0xc000000); - REDRAW; -} - -#define listbox_field_ok(t, s, f, got) \ - ok (t.s.f==got.f, "style %#x, step " #s ", field " #f \ - ": expected %d, got %d\n", (unsigned int)t.prop.add_style, \ - t.s.f, got.f) - -#define listbox_todo_field_ok(t, s, f, got) \ - if (t.s##_todo.f) todo_wine { listbox_field_ok(t, s, f, got); } \ - else listbox_field_ok(t, s, f, got) - -#define listbox_ok(t, s, got) \ - listbox_todo_field_ok(t, s, selected, got); \ - listbox_todo_field_ok(t, s, anchor, got); \ - listbox_todo_field_ok(t, s, caret, got); \ - listbox_todo_field_ok(t, s, selcount, got) - -static void -check (const struct listbox_test test) -{ - struct listbox_stat answer; - HWND hLB=create_listbox (test.prop.add_style, 0); - RECT second_item; - int i; - int res; - - listbox_query (hLB, &answer); - listbox_ok (test, init, answer); - - SendMessage (hLB, LB_GETITEMRECT, 1, (LPARAM) &second_item); - buttonpress(hLB, (WORD)second_item.left, (WORD)second_item.top); - - listbox_query (hLB, &answer); - listbox_ok (test, click, answer); - - keypress (hLB, VK_DOWN, 0x50, TRUE); - - listbox_query (hLB, &answer); - listbox_ok (test, step, answer); - - DestroyWindow (hLB); - hLB=create_listbox (test.prop.add_style, 0); - - SendMessage (hLB, LB_SELITEMRANGE, TRUE, MAKELPARAM(1, 2)); - listbox_query (hLB, &answer); - listbox_ok (test, sel, answer); - - for (i=0;i<4;i++) { - DWORD size = SendMessage (hLB, LB_GETTEXTLEN, i, 0); - CHAR *txt; - WCHAR *txtw; - int resA, resW; - - txt = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, size+1); - resA=SendMessageA(hLB, LB_GETTEXT, i, (LPARAM)txt); - ok(!strcmp (txt, strings[i]), "returned string for item %d does not match %s vs %s\n", i, txt, strings[i]); - - txtw = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, 2*size+2); - resW=SendMessageW(hLB, LB_GETTEXT, i, (LPARAM)txtw); - if (resA != resW) { - trace("SendMessageW(LB_GETTEXT) not supported on this platform (resA=%d resW=%d), skipping...\n", - resA, resW); - } else { - WideCharToMultiByte( CP_ACP, 0, txtw, -1, txt, size, NULL, NULL ); - ok(!strcmp (txt, strings[i]), "returned string for item %d does not match %s vs %s\n", i, txt, strings[i]); - } - - HeapFree (GetProcessHeap(), 0, txtw); - HeapFree (GetProcessHeap(), 0, txt); - } - - /* Confirm the count of items, and that an invalid delete does not remove anything */ - res = SendMessage (hLB, LB_GETCOUNT, 0, 0); - ok((res==4), "Expected 4 items, got %d\n", res); - res = SendMessage (hLB, LB_DELETESTRING, -1, 0); - ok((res==LB_ERR), "Expected LB_ERR items, got %d\n", res); - res = SendMessage (hLB, LB_DELETESTRING, 4, 0); - ok((res==LB_ERR), "Expected LB_ERR items, got %d\n", res); - res = SendMessage (hLB, LB_GETCOUNT, 0, 0); - ok((res==4), "Expected 4 items, got %d\n", res); - - WAIT; - DestroyWindow (hLB); -} - -static void check_item_height(void) -{ - HWND hLB; - HDC hdc; - HFONT font; - TEXTMETRIC tm; - INT itemHeight; - - hLB = create_listbox (0, 0); - ok ((hdc = GetDCEx( hLB, 0, DCX_CACHE )) != 0, "Can't get hdc\n"); - ok ((font = GetCurrentObject(hdc, OBJ_FONT)) != 0, "Can't get the current font\n"); - ok (GetTextMetrics( hdc, &tm ), "Can't read font metrics\n"); - ReleaseDC( hLB, hdc); - - ok (SendMessage(hLB, WM_SETFONT, (WPARAM)font, 0) == 0, "Can't set font\n"); - - itemHeight = SendMessage(hLB, LB_GETITEMHEIGHT, 0, 0); - ok (itemHeight == tm.tmHeight, "Item height wrong, got %d, expecting %d\n", itemHeight, tm.tmHeight); - - DestroyWindow (hLB); - - hLB = CreateWindow ("LISTBOX", "TestList", LBS_OWNERDRAWVARIABLE, - 0, 0, 100, 100, NULL, NULL, NULL, 0); - itemHeight = SendMessage(hLB, LB_GETITEMHEIGHT, 0, 0); - ok(itemHeight == tm.tmHeight, "itemHeight %d\n", itemHeight); - itemHeight = SendMessage(hLB, LB_GETITEMHEIGHT, 5, 0); - ok(itemHeight == tm.tmHeight, "itemHeight %d\n", itemHeight); - itemHeight = SendMessage(hLB, LB_GETITEMHEIGHT, -5, 0); - ok(itemHeight == tm.tmHeight, "itemHeight %d\n", itemHeight); - DestroyWindow (hLB); -} - -static LRESULT WINAPI main_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - switch (msg) - { - case WM_DRAWITEM: - { - RECT rc_item, rc_client, rc_clip; - DRAWITEMSTRUCT *dis = (DRAWITEMSTRUCT *)lparam; - - trace("%p WM_DRAWITEM %08lx %08lx\n", hwnd, wparam, lparam); - - ok(wparam == dis->CtlID, "got wParam=%08lx instead of %08x\n", - wparam, dis->CtlID); - ok(dis->CtlType == ODT_LISTBOX, "wrong CtlType %04x\n", dis->CtlType); - - GetClientRect(dis->hwndItem, &rc_client); - trace("hwndItem %p client rect (%d,%d-%d,%d)\n", dis->hwndItem, - rc_client.left, rc_client.top, rc_client.right, rc_client.bottom); - GetClipBox(dis->hDC, &rc_clip); - trace("clip rect (%d,%d-%d,%d)\n", rc_clip.left, rc_clip.top, rc_clip.right, rc_clip.bottom); - ok(EqualRect(&rc_client, &rc_clip) || IsRectEmpty(&rc_clip), - "client rect of the listbox should be equal to the clip box," - "or the clip box should be empty\n"); - - trace("rcItem (%d,%d-%d,%d)\n", dis->rcItem.left, dis->rcItem.top, - dis->rcItem.right, dis->rcItem.bottom); - SendMessage(dis->hwndItem, LB_GETITEMRECT, dis->itemID, (LPARAM)&rc_item); - trace("item rect (%d,%d-%d,%d)\n", rc_item.left, rc_item.top, rc_item.right, rc_item.bottom); - ok(EqualRect(&dis->rcItem, &rc_item), "item rects are not equal\n"); - - break; - } - - default: - break; - } - - return DefWindowProc(hwnd, msg, wparam, lparam); -} - -static void test_ownerdraw(void) -{ - WNDCLASS cls; - HWND parent, hLB; - INT ret; - RECT rc; - - cls.style = 0; - cls.lpfnWndProc = main_window_proc; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandle(0); - cls.hIcon = 0; - cls.hCursor = LoadCursor(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "main_window_class"; - ok (RegisterClass(&cls), "RegisterClass failed\n"); - - parent = CreateWindowEx(0, "main_window_class", NULL, - WS_POPUP | WS_VISIBLE, - 100, 100, 400, 400, - GetDesktopWindow(), 0, - GetModuleHandle(0), NULL); - assert(parent); - - hLB = create_listbox(LBS_OWNERDRAWFIXED | WS_CHILD | WS_VISIBLE, parent); - assert(hLB); - - SetForegroundWindow(hLB); - UpdateWindow(hLB); - - /* make height short enough */ - SendMessage(hLB, LB_GETITEMRECT, 0, (LPARAM)&rc); - SetWindowPos(hLB, 0, 0, 0, 100, rc.bottom - rc.top + 1, - SWP_NOZORDER | SWP_NOMOVE); - - /* make 0 item invisible */ - SendMessage(hLB, LB_SETTOPINDEX, 1, 0); - ret = SendMessage(hLB, LB_GETTOPINDEX, 0, 0); - ok(ret == 1, "wrong top index %d\n", ret); - - SendMessage(hLB, LB_GETITEMRECT, 0, (LPARAM)&rc); - trace("item 0 rect (%d,%d-%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom); - ok(!IsRectEmpty(&rc), "empty item rect\n"); - ok(rc.top < 0, "rc.top is not negative (%d)\n", rc.top); - - DestroyWindow(hLB); - DestroyWindow(parent); -} - -#define listbox_test_query(exp, got) \ - ok(exp.selected == got.selected, "expected selected %d, got %d\n", exp.selected, got.selected); \ - ok(exp.anchor == got.anchor, "expected anchor %d, got %d\n", exp.anchor, got.anchor); \ - ok(exp.caret == got.caret, "expected caret %d, got %d\n", exp.caret, got.caret); \ - ok(exp.selcount == got.selcount, "expected selcount %d, got %d\n", exp.selcount, got.selcount); - -static void test_selection(void) -{ - static const struct listbox_stat test_nosel = { 0, LB_ERR, 0, 0 }; - static const struct listbox_stat test_1 = { 0, LB_ERR, 0, 2 }; - static const struct listbox_stat test_2 = { 0, LB_ERR, 0, 3 }; - static const struct listbox_stat test_3 = { 0, LB_ERR, 0, 4 }; - HWND hLB; - struct listbox_stat answer; - INT ret; - - trace("testing LB_SELITEMRANGE\n"); - - hLB = create_listbox(LBS_EXTENDEDSEL, 0); - assert(hLB); - - listbox_query(hLB, &answer); - listbox_test_query(test_nosel, answer); - - ret = SendMessage(hLB, LB_SELITEMRANGE, TRUE, MAKELPARAM(1, 2)); - ok(ret == LB_OKAY, "LB_SELITEMRANGE returned %d instead of LB_OKAY\n", ret); - listbox_query(hLB, &answer); - listbox_test_query(test_1, answer); - - SendMessage(hLB, LB_SETSEL, FALSE, -1); - listbox_query(hLB, &answer); - listbox_test_query(test_nosel, answer); - - ret = SendMessage(hLB, LB_SELITEMRANGE, TRUE, MAKELPARAM(0, 4)); - ok(ret == LB_OKAY, "LB_SELITEMRANGE returned %d instead of LB_OKAY\n", ret); - listbox_query(hLB, &answer); - listbox_test_query(test_3, answer); - - SendMessage(hLB, LB_SETSEL, FALSE, -1); - listbox_query(hLB, &answer); - listbox_test_query(test_nosel, answer); - - ret = SendMessage(hLB, LB_SELITEMRANGE, TRUE, MAKELPARAM(-5, 5)); - ok(ret == LB_OKAY, "LB_SELITEMRANGE returned %d instead of LB_OKAY\n", ret); - listbox_query(hLB, &answer); - listbox_test_query(test_nosel, answer); - - SendMessage(hLB, LB_SETSEL, FALSE, -1); - listbox_query(hLB, &answer); - listbox_test_query(test_nosel, answer); - - ret = SendMessage(hLB, LB_SELITEMRANGE, TRUE, MAKELPARAM(2, 10)); - ok(ret == LB_OKAY, "LB_SELITEMRANGE returned %d instead of LB_OKAY\n", ret); - listbox_query(hLB, &answer); - listbox_test_query(test_1, answer); - - SendMessage(hLB, LB_SETSEL, FALSE, -1); - listbox_query(hLB, &answer); - listbox_test_query(test_nosel, answer); - - ret = SendMessage(hLB, LB_SELITEMRANGE, TRUE, MAKELPARAM(4, 10)); - ok(ret == LB_OKAY, "LB_SELITEMRANGE returned %d instead of LB_OKAY\n", ret); - listbox_query(hLB, &answer); - listbox_test_query(test_nosel, answer); - - SendMessage(hLB, LB_SETSEL, FALSE, -1); - listbox_query(hLB, &answer); - listbox_test_query(test_nosel, answer); - - ret = SendMessage(hLB, LB_SELITEMRANGE, TRUE, MAKELPARAM(10, 1)); - ok(ret == LB_OKAY, "LB_SELITEMRANGE returned %d instead of LB_OKAY\n", ret); - listbox_query(hLB, &answer); - listbox_test_query(test_2, answer); - - SendMessage(hLB, LB_SETSEL, FALSE, -1); - listbox_query(hLB, &answer); - listbox_test_query(test_nosel, answer); - - ret = SendMessage(hLB, LB_SELITEMRANGE, TRUE, MAKELPARAM(1, -1)); - ok(ret == LB_OKAY, "LB_SELITEMRANGE returned %d instead of LB_OKAY\n", ret); - listbox_query(hLB, &answer); - listbox_test_query(test_2, answer); - - DestroyWindow(hLB); -} - -static void test_listbox_height(void) -{ - HWND hList; - int r, id; - - hList = CreateWindow( "ListBox", "list test", 0, - 1, 1, 600, 100, NULL, NULL, NULL, NULL ); - ok( hList != NULL, "failed to create listbox\n"); - - id = SendMessage( hList, LB_ADDSTRING, 0, (LPARAM) "hi"); - ok( id == 0, "item id wrong\n"); - - r = SendMessage( hList, LB_SETITEMHEIGHT, 0, MAKELPARAM( 20, 0 )); - ok( r == 0, "send message failed\n"); - - r = SendMessage(hList, LB_GETITEMHEIGHT, 0, 0 ); - ok( r == 20, "height wrong\n"); - - r = SendMessage( hList, LB_SETITEMHEIGHT, 0, MAKELPARAM( 0, 30 )); - ok( r == -1, "send message failed\n"); - - r = SendMessage(hList, LB_GETITEMHEIGHT, 0, 0 ); - ok( r == 20, "height wrong\n"); - - r = SendMessage( hList, LB_SETITEMHEIGHT, 0, MAKELPARAM( 0x100, 0 )); - ok( r == -1, "send message failed\n"); - - r = SendMessage(hList, LB_GETITEMHEIGHT, 0, 0 ); - ok( r == 20, "height wrong\n"); - - r = SendMessage( hList, LB_SETITEMHEIGHT, 0, MAKELPARAM( 0xff, 0 )); - ok( r == 0, "send message failed\n"); - - r = SendMessage(hList, LB_GETITEMHEIGHT, 0, 0 ); - ok( r == 0xff, "height wrong\n"); - - DestroyWindow( hList ); -} - -static void test_itemfrompoint(void) -{ - /* WS_POPUP is required in order to have a more accurate size calculation ( - without caption). LBS_NOINTEGRALHEIGHT is required in order to test - behavior of partially-displayed item. - */ - HWND hList = CreateWindow( "ListBox", "list test", - WS_VISIBLE|WS_POPUP|LBS_NOINTEGRALHEIGHT, - 1, 1, 600, 100, NULL, NULL, NULL, NULL ); - ULONG r, id; - RECT rc; - - /* For an empty listbox win2k returns 0x1ffff, win98 returns 0x10000, nt4 returns 0xffffffff */ - r = SendMessage(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( /* x */ 30, /* y */ 30 )); - ok( r == 0x1ffff || r == 0x10000 || r == 0xffffffff, "ret %x\n", r ); - - r = SendMessage(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( 700, 30 )); - ok( r == 0x1ffff || r == 0x10000 || r == 0xffffffff, "ret %x\n", r ); - - r = SendMessage(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( 30, 300 )); - ok( r == 0x1ffff || r == 0x10000 || r == 0xffffffff, "ret %x\n", r ); - - id = SendMessage( hList, LB_ADDSTRING, 0, (LPARAM) "hi"); - ok( id == 0, "item id wrong\n"); - id = SendMessage( hList, LB_ADDSTRING, 0, (LPARAM) "hi1"); - ok( id == 1, "item id wrong\n"); - - r = SendMessage(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( /* x */ 30, /* y */ 30 )); - ok( r == 0x1, "ret %x\n", r ); - - r = SendMessage(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( /* x */ 30, /* y */ 601 )); - ok( r == 0x10001 || broken(r == 1), /* nt4 */ - "ret %x\n", r ); - - /* Resize control so that below assertions about sizes are valid */ - r = SendMessage( hList, LB_GETITEMRECT, 0, (LPARAM)&rc); - ok( r == 1, "ret %x\n", r); - r = MoveWindow(hList, 1, 1, 600, (rc.bottom - rc.top + 1) * 9 / 2, TRUE); - ok( r != 0, "ret %x\n", r); - - id = SendMessage( hList, LB_ADDSTRING, 0, (LPARAM) "hi2"); - ok( id == 2, "item id wrong\n"); - id = SendMessage( hList, LB_ADDSTRING, 0, (LPARAM) "hi3"); - ok( id == 3, "item id wrong\n"); - id = SendMessage( hList, LB_ADDSTRING, 0, (LPARAM) "hi4"); - ok( id == 4, "item id wrong\n"); - id = SendMessage( hList, LB_ADDSTRING, 0, (LPARAM) "hi5"); - ok( id == 5, "item id wrong\n"); - id = SendMessage( hList, LB_ADDSTRING, 0, (LPARAM) "hi6"); - ok( id == 6, "item id wrong\n"); - id = SendMessage( hList, LB_ADDSTRING, 0, (LPARAM) "hi7"); - ok( id == 7, "item id wrong\n"); - - /* Set the listbox up so that id 1 is at the top, this leaves 5 - partially visible at the bottom and 6, 7 are invisible */ - - SendMessage( hList, LB_SETTOPINDEX, 1, 0); - r = SendMessage( hList, LB_GETTOPINDEX, 0, 0); - ok( r == 1, "top %d\n", r); - - r = SendMessage( hList, LB_GETITEMRECT, 5, (LPARAM)&rc); - ok( r == 1, "ret %x\n", r); - r = SendMessage( hList, LB_GETITEMRECT, 6, (LPARAM)&rc); - ok( r == 0, "ret %x\n", r); - - r = SendMessage( hList, LB_ITEMFROMPOINT, 0, MAKELPARAM(/* x */ 10, /* y */ 10) ); - ok( r == 1, "ret %x\n", r); - - r = SendMessage( hList, LB_ITEMFROMPOINT, 0, MAKELPARAM(1000, 10) ); - ok( r == 0x10001 || broken(r == 1), /* nt4 */ - "ret %x\n", r ); - - r = SendMessage( hList, LB_ITEMFROMPOINT, 0, MAKELPARAM(10, -10) ); - ok( r == 0x10001 || broken(r == 1), /* nt4 */ - "ret %x\n", r ); - - r = SendMessage( hList, LB_ITEMFROMPOINT, 0, MAKELPARAM(10, 100) ); - ok( r == 0x10005 || broken(r == 5), /* nt4 */ - "item %x\n", r ); - - r = SendMessage( hList, LB_ITEMFROMPOINT, 0, MAKELPARAM(10, 200) ); - ok( r == 0x10005 || broken(r == 5), /* nt4 */ - "item %x\n", r ); - - DestroyWindow( hList ); -} - -static void test_listbox_item_data(void) -{ - HWND hList; - int r, id; - - hList = CreateWindow( "ListBox", "list test", 0, - 1, 1, 600, 100, NULL, NULL, NULL, NULL ); - ok( hList != NULL, "failed to create listbox\n"); - - id = SendMessage( hList, LB_ADDSTRING, 0, (LPARAM) "hi"); - ok( id == 0, "item id wrong\n"); - - r = SendMessage( hList, LB_SETITEMDATA, 0, MAKELPARAM( 20, 0 )); - ok(r == TRUE, "LB_SETITEMDATA returned %d instead of TRUE\n", r); - - r = SendMessage( hList, LB_GETITEMDATA, 0, 0); - ok( r == 20, "get item data failed\n"); - - DestroyWindow( hList ); -} - -static void test_listbox_LB_DIR(void) -{ - HWND hList; - int res, itemCount; - int itemCount_justFiles; - int itemCount_justDrives; - int itemCount_allFiles; - int itemCount_allDirs; - int i; - char pathBuffer[MAX_PATH]; - char * p; - char driveletter; - const char *wildcard = "*"; - HANDLE file; - - file = CreateFileA( "wtest1.tmp.c", GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL ); - ok(file != INVALID_HANDLE_VALUE, "Error creating the test file: %d\n", GetLastError()); - CloseHandle( file ); - - /* NOTE: for this test to succeed, there must be no subdirectories - under the current directory. In addition, there must be at least - one file that fits the wildcard w*.c . Normally, the test - directory itself satisfies both conditions. - */ - hList = CreateWindow( "ListBox", "list test", WS_VISIBLE|WS_POPUP, - 1, 1, 600, 100, NULL, NULL, NULL, NULL ); - assert(hList); - - /* Test for standard usage */ - - /* This should list all the files in the test directory. */ - strcpy(pathBuffer, wildcard); - SendMessage(hList, LB_RESETCONTENT, 0, 0); - res = SendMessage(hList, LB_DIR, 0, (LPARAM)pathBuffer); - if (res == -1) /* "*" wildcard doesn't work on win9x */ - { - wildcard = "*.*"; - strcpy(pathBuffer, wildcard); - res = SendMessage(hList, LB_DIR, 0, (LPARAM)pathBuffer); - } - ok (res >= 0, "SendMessage(LB_DIR, 0, *) failed - 0x%08x\n", GetLastError()); - - /* There should be some content in the listbox */ - itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0); - ok (itemCount > 0, "SendMessage(LB_DIR) did NOT fill the listbox!\n"); - itemCount_allFiles = itemCount; - ok(res + 1 == itemCount, - "SendMessage(LB_DIR, 0, *) returned incorrect index (expected %d got %d)!\n", - itemCount - 1, res); - - /* This tests behavior when no files match the wildcard */ - strcpy(pathBuffer, BAD_EXTENSION); - SendMessage(hList, LB_RESETCONTENT, 0, 0); - res = SendMessage(hList, LB_DIR, 0, (LPARAM)pathBuffer); - ok (res == -1, "SendMessage(LB_DIR, 0, %s) returned %d, expected -1\n", BAD_EXTENSION, res); - - /* There should be NO content in the listbox */ - itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0); - ok (itemCount == 0, "SendMessage(LB_DIR) DID fill the listbox!\n"); - - - /* This should list all the w*.c files in the test directory - * As of this writing, this includes win.c, winstation.c, wsprintf.c - */ - strcpy(pathBuffer, "w*.c"); - SendMessage(hList, LB_RESETCONTENT, 0, 0); - res = SendMessage(hList, LB_DIR, 0, (LPARAM)pathBuffer); - ok (res >= 0, "SendMessage(LB_DIR, 0, w*.c) failed - 0x%08x\n", GetLastError()); - - /* Path specification does NOT converted to uppercase */ - ok (!strcmp(pathBuffer, "w*.c"), - "expected no change to pathBuffer, got %s\n", pathBuffer); - - /* There should be some content in the listbox */ - itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0); - ok (itemCount > 0, "SendMessage(LB_DIR) did NOT fill the listbox!\n"); - itemCount_justFiles = itemCount; - ok(res + 1 == itemCount, - "SendMessage(LB_DIR, 0, w*.c) returned incorrect index (expected %d got %d)!\n", - itemCount - 1, res); - - /* Every single item in the control should start with a w and end in .c */ - for (i = 0; i < itemCount; i++) { - memset(pathBuffer, 0, MAX_PATH); - SendMessage(hList, LB_GETTEXT, i, (LPARAM)pathBuffer); - p = pathBuffer + strlen(pathBuffer); - ok(((pathBuffer[0] == 'w' || pathBuffer[0] == 'W') && - (*(p-1) == 'c' || *(p-1) == 'C') && - (*(p-2) == '.')), "Element %d (%s) does not fit requested w*.c\n", i, pathBuffer); - } - - /* Test DDL_DIRECTORY */ - strcpy(pathBuffer, wildcard); - SendMessage(hList, LB_RESETCONTENT, 0, 0); - res = SendMessage(hList, LB_DIR, DDL_DIRECTORY, (LPARAM)pathBuffer); - ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY, *) failed - 0x%08x\n", GetLastError()); - - /* There should be some content in the listbox. - * All files plus "[..]" - */ - itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0); - itemCount_allDirs = itemCount - itemCount_allFiles; - ok (itemCount > itemCount_allFiles, - "SendMessage(LB_DIR, DDL_DIRECTORY, *) filled with %d entries, expected > %d\n", - itemCount, itemCount_allFiles); - ok(res + 1 == itemCount, - "SendMessage(LB_DIR, DDL_DIRECTORY, *) returned incorrect index (expected %d got %d)!\n", - itemCount - 1, res); - - /* This tests behavior when no files match the wildcard */ - strcpy(pathBuffer, BAD_EXTENSION); - SendMessage(hList, LB_RESETCONTENT, 0, 0); - res = SendMessage(hList, LB_DIR, DDL_DIRECTORY, (LPARAM)pathBuffer); - ok (res == -1, "SendMessage(LB_DIR, DDL_DIRECTORY, %s) returned %d, expected -1\n", BAD_EXTENSION, res); - - /* There should be NO content in the listbox */ - itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0); - ok (itemCount == 0, "SendMessage(LB_DIR) DID fill the listbox!\n"); - - - /* Test DDL_DIRECTORY */ - strcpy(pathBuffer, "w*.c"); - SendMessage(hList, LB_RESETCONTENT, 0, 0); - res = SendMessage(hList, LB_DIR, DDL_DIRECTORY, (LPARAM)pathBuffer); - ok (res >= 0, "SendMessage(LB_DIR, DDL_DIRECTORY, w*.c) failed - 0x%08x\n", GetLastError()); - - /* There should be some content in the listbox. Since the parent directory does not - * fit w*.c, there should be exactly the same number of items as without DDL_DIRECTORY - */ - itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0); - ok (itemCount == itemCount_justFiles, - "SendMessage(LB_DIR, DDL_DIRECTORY, w*.c) filled with %d entries, expected %d\n", - itemCount, itemCount_justFiles); - ok(res + 1 == itemCount, - "SendMessage(LB_DIR, DDL_DIRECTORY, w*.c) returned incorrect index (expected %d got %d)!\n", - itemCount - 1, res); - - /* Every single item in the control should start with a w and end in .c. */ - for (i = 0; i < itemCount; i++) { - memset(pathBuffer, 0, MAX_PATH); - SendMessage(hList, LB_GETTEXT, i, (LPARAM)pathBuffer); - p = pathBuffer + strlen(pathBuffer); - ok( - ((pathBuffer[0] == 'w' || pathBuffer[0] == 'W') && - (*(p-1) == 'c' || *(p-1) == 'C') && - (*(p-2) == '.')), "Element %d (%s) does not fit requested w*.c\n", i, pathBuffer); - } - - - /* Test DDL_DRIVES|DDL_EXCLUSIVE */ - strcpy(pathBuffer, wildcard); - SendMessage(hList, LB_RESETCONTENT, 0, 0); - res = SendMessage(hList, LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, (LPARAM)pathBuffer); - ok (res >= 0, "SendMessage(LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, *) failed - 0x%08x\n", GetLastError()); - - /* There should be some content in the listbox. In particular, there should - * be at least one element before, since the string "[-c-]" should - * have been added. Depending on the user setting, more drives might have - * been added. - */ - itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0); - ok (itemCount >= 1, - "SendMessage(LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, *) filled with %d entries, expected at least %d\n", - itemCount, 1); - itemCount_justDrives = itemCount; - ok(res + 1 == itemCount, "SendMessage(LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, *) returned incorrect index!\n"); - - /* Every single item in the control should fit the format [-c-] */ - for (i = 0; i < itemCount; i++) { - memset(pathBuffer, 0, MAX_PATH); - driveletter = '\0'; - SendMessage(hList, LB_GETTEXT, i, (LPARAM)pathBuffer); - ok( strlen(pathBuffer) == 5, "Length of drive string is not 5\n" ); - ok( sscanf(pathBuffer, "[-%c-]", &driveletter) == 1, "Element %d (%s) does not fit [-X-]\n", i, pathBuffer); - ok( driveletter >= 'a' && driveletter <= 'z', "Drive letter not in range a..z, got ascii %d\n", driveletter); - if (!(driveletter >= 'a' && driveletter <= 'z')) { - /* Correct after invalid entry is found */ - trace("removing count of invalid entry %s\n", pathBuffer); - itemCount_justDrives--; - } - } - - /* This tests behavior when no files match the wildcard */ - strcpy(pathBuffer, BAD_EXTENSION); - SendMessage(hList, LB_RESETCONTENT, 0, 0); - res = SendMessage(hList, LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, (LPARAM)pathBuffer); - ok (res == itemCount_justDrives -1, "SendMessage(LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, %s) returned %d, expected %d\n", - BAD_EXTENSION, res, itemCount_justDrives -1); - - itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0); - ok (itemCount == itemCount_justDrives, "SendMessage(LB_DIR) returned %d expected %d\n", - itemCount, itemCount_justDrives); - - trace("Files with w*.c: %d Mapped drives: %d Directories: 1\n", - itemCount_justFiles, itemCount_justDrives); - - /* Test DDL_DRIVES. */ - strcpy(pathBuffer, wildcard); - SendMessage(hList, LB_RESETCONTENT, 0, 0); - res = SendMessage(hList, LB_DIR, DDL_DRIVES, (LPARAM)pathBuffer); - ok (res > 0, "SendMessage(LB_DIR, DDL_DRIVES, *) failed - 0x%08x\n", GetLastError()); - - /* There should be some content in the listbox. In particular, there should - * be at least one element before, since the string "[-c-]" should - * have been added. Depending on the user setting, more drives might have - * been added. - */ - itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0); - ok (itemCount == itemCount_justDrives + itemCount_allFiles, - "SendMessage(LB_DIR, DDL_DRIVES, *) filled with %d entries, expected %d\n", - itemCount, itemCount_justDrives + itemCount_allFiles); - ok(res + 1 == itemCount, "SendMessage(LB_DIR, DDL_DRIVES, *) returned incorrect index!\n"); - - /* This tests behavior when no files match the wildcard */ - strcpy(pathBuffer, BAD_EXTENSION); - SendMessage(hList, LB_RESETCONTENT, 0, 0); - res = SendMessage(hList, LB_DIR, DDL_DRIVES, (LPARAM)pathBuffer); - ok (res == itemCount_justDrives -1, "SendMessage(LB_DIR, DDL_DRIVES, %s) returned %d, expected %d\n", - BAD_EXTENSION, res, itemCount_justDrives -1); - - itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0); - ok (itemCount == res + 1, "SendMessage(LB_DIR) returned %d expected %d\n", itemCount, res + 1); - - - /* Test DDL_DRIVES. */ - strcpy(pathBuffer, "w*.c"); - SendMessage(hList, LB_RESETCONTENT, 0, 0); - res = SendMessage(hList, LB_DIR, DDL_DRIVES, (LPARAM)pathBuffer); - ok (res > 0, "SendMessage(LB_DIR, DDL_DRIVES, w*.c) failed - 0x%08x\n", GetLastError()); - - /* There should be some content in the listbox. In particular, there should - * be at least one element before, since the string "[-c-]" should - * have been added. Depending on the user setting, more drives might have - * been added. - */ - itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0); - ok (itemCount == itemCount_justDrives + itemCount_justFiles, - "SendMessage(LB_DIR, DDL_DRIVES, w*.c) filled with %d entries, expected %d\n", - itemCount, itemCount_justDrives + itemCount_justFiles); - ok(res + 1 == itemCount, "SendMessage(LB_DIR, DDL_DRIVES, w*.c) returned incorrect index!\n"); - - /* Every single item in the control should fit the format [-c-], or w*.c */ - for (i = 0; i < itemCount; i++) { - memset(pathBuffer, 0, MAX_PATH); - driveletter = '\0'; - SendMessage(hList, LB_GETTEXT, i, (LPARAM)pathBuffer); - p = pathBuffer + strlen(pathBuffer); - if (sscanf(pathBuffer, "[-%c-]", &driveletter) == 1) { - ok( strlen(pathBuffer) == 5, "Length of drive string is not 5\n" ); - ok( driveletter >= 'a' && driveletter <= 'z', "Drive letter not in range a..z, got ascii %d\n", driveletter); - } else { - ok( - ((pathBuffer[0] == 'w' || pathBuffer[0] == 'W') && - (*(p-1) == 'c' || *(p-1) == 'C') && - (*(p-2) == '.')), "Element %d (%s) does not fit requested w*.c\n", i, pathBuffer); - } - } - - - /* Test DDL_DIRECTORY|DDL_DRIVES. This does *not* imply DDL_EXCLUSIVE */ - strcpy(pathBuffer, wildcard); - SendMessage(hList, LB_RESETCONTENT, 0, 0); - res = SendMessage(hList, LB_DIR, DDL_DIRECTORY|DDL_DRIVES, (LPARAM)pathBuffer); - ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, *) failed - 0x%08x\n", GetLastError()); - - /* There should be some content in the listbox. In particular, there should - * be exactly the number of plain files, plus the number of mapped drives. - */ - itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0); - ok (itemCount == itemCount_allFiles + itemCount_justDrives + itemCount_allDirs, - "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES) filled with %d entries, expected %d\n", - itemCount, itemCount_allFiles + itemCount_justDrives + itemCount_allDirs); - ok(res + 1 == itemCount, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, w*.c) returned incorrect index!\n"); - - /* Every single item in the control should start with a w and end in .c, - * except for the "[..]" string, which should appear exactly as it is, - * and the mapped drives in the format "[-X-]". - */ - for (i = 0; i < itemCount; i++) { - memset(pathBuffer, 0, MAX_PATH); - driveletter = '\0'; - SendMessage(hList, LB_GETTEXT, i, (LPARAM)pathBuffer); - if (sscanf(pathBuffer, "[-%c-]", &driveletter) == 1) { - ok( driveletter >= 'a' && driveletter <= 'z', "Drive letter not in range a..z, got ascii %d\n", driveletter); - } - } - - /* This tests behavior when no files match the wildcard */ - strcpy(pathBuffer, BAD_EXTENSION); - SendMessage(hList, LB_RESETCONTENT, 0, 0); - res = SendMessage(hList, LB_DIR, DDL_DIRECTORY|DDL_DRIVES, (LPARAM)pathBuffer); - ok (res == itemCount_justDrives -1, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, %s) returned %d, expected %d\n", - BAD_EXTENSION, res, itemCount_justDrives -1); - - itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0); - ok (itemCount == res + 1, "SendMessage(LB_DIR) returned %d expected %d\n", itemCount, res + 1); - - - - /* Test DDL_DIRECTORY|DDL_DRIVES. */ - strcpy(pathBuffer, "w*.c"); - SendMessage(hList, LB_RESETCONTENT, 0, 0); - res = SendMessage(hList, LB_DIR, DDL_DIRECTORY|DDL_DRIVES, (LPARAM)pathBuffer); - ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, w*.c) failed - 0x%08x\n", GetLastError()); - - /* There should be some content in the listbox. In particular, there should - * be exactly the number of plain files, plus the number of mapped drives. - */ - itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0); - ok (itemCount == itemCount_justFiles + itemCount_justDrives, - "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES) filled with %d entries, expected %d\n", - itemCount, itemCount_justFiles + itemCount_justDrives); - ok(res + 1 == itemCount, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, w*.c) returned incorrect index!\n"); - - /* Every single item in the control should start with a w and end in .c, - * except the mapped drives in the format "[-X-]". The "[..]" directory - * should not appear. - */ - for (i = 0; i < itemCount; i++) { - memset(pathBuffer, 0, MAX_PATH); - driveletter = '\0'; - SendMessage(hList, LB_GETTEXT, i, (LPARAM)pathBuffer); - p = pathBuffer + strlen(pathBuffer); - if (sscanf(pathBuffer, "[-%c-]", &driveletter) == 1) { - ok( driveletter >= 'a' && driveletter <= 'z', "Drive letter not in range a..z, got ascii %d\n", driveletter); - } else { - ok( - ((pathBuffer[0] == 'w' || pathBuffer[0] == 'W') && - (*(p-1) == 'c' || *(p-1) == 'C') && - (*(p-2) == '.')), "Element %d (%s) does not fit requested w*.c\n", i, pathBuffer); - } - } - - /* Test DDL_DIRECTORY|DDL_EXCLUSIVE. */ - strcpy(pathBuffer, wildcard); - SendMessage(hList, LB_RESETCONTENT, 0, 0); - res = SendMessage(hList, LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, (LPARAM)pathBuffer); - ok (res != -1, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err %u\n", GetLastError()); - - itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0); - ok (itemCount == itemCount_allDirs, - "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE) filled with %d entries, expected %d\n", - itemCount, itemCount_allDirs); - ok(res + 1 == itemCount, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) returned incorrect index!\n"); - - if (itemCount && GetCurrentDirectoryA( MAX_PATH, pathBuffer ) > 3) /* there's no [..] in drive root */ - { - memset(pathBuffer, 0, MAX_PATH); - SendMessage(hList, LB_GETTEXT, 0, (LPARAM)pathBuffer); - ok( !strcmp(pathBuffer, "[..]"), "First element is not [..]\n"); - } - - /* This tests behavior when no files match the wildcard */ - strcpy(pathBuffer, BAD_EXTENSION); - SendMessage(hList, LB_RESETCONTENT, 0, 0); - res = SendMessage(hList, LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, (LPARAM)pathBuffer); - ok (res == -1, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, %s) returned %d, expected %d\n", - BAD_EXTENSION, res, -1); - - itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0); - ok (itemCount == res + 1, "SendMessage(LB_DIR) returned %d expected %d\n", itemCount, res + 1); - - - /* Test DDL_DIRECTORY|DDL_EXCLUSIVE. */ - strcpy(pathBuffer, "w*.c"); - SendMessage(hList, LB_RESETCONTENT, 0, 0); - res = SendMessage(hList, LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, (LPARAM)pathBuffer); - ok (res == LB_ERR, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, w*.c) returned %d expected %d\n", res, LB_ERR); - - /* There should be no elements, since "[..]" does not fit w*.c */ - itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0); - ok (itemCount == 0, - "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE) filled with %d entries, expected %d\n", - itemCount, 0); - - /* Test DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE. */ - strcpy(pathBuffer, wildcard); - SendMessage(hList, LB_RESETCONTENT, 0, 0); - res = SendMessage(hList, LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, (LPARAM)pathBuffer); - ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c,) failed - 0x%08x\n", GetLastError()); - - /* There should be no plain files on the listbox */ - itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0); - ok (itemCount == itemCount_justDrives + itemCount_allDirs, - "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE) filled with %d entries, expected %d\n", - itemCount, itemCount_justDrives + itemCount_allDirs); - ok(res + 1 == itemCount, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c) returned incorrect index!\n"); - - for (i = 0; i < itemCount; i++) { - memset(pathBuffer, 0, MAX_PATH); - driveletter = '\0'; - SendMessage(hList, LB_GETTEXT, i, (LPARAM)pathBuffer); - if (sscanf(pathBuffer, "[-%c-]", &driveletter) == 1) { - ok( driveletter >= 'a' && driveletter <= 'z', "Drive letter not in range a..z, got ascii %d\n", driveletter); - } else { - ok( pathBuffer[0] == '[' && pathBuffer[strlen(pathBuffer)-1] == ']', - "Element %d (%s) does not fit expected [...]\n", i, pathBuffer); - } - } - - /* This tests behavior when no files match the wildcard */ - strcpy(pathBuffer, BAD_EXTENSION); - SendMessage(hList, LB_RESETCONTENT, 0, 0); - res = SendMessage(hList, LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, (LPARAM)pathBuffer); - ok (res == itemCount_justDrives -1, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, %s) returned %d, expected %d\n", - BAD_EXTENSION, res, itemCount_justDrives -1); - - itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0); - ok (itemCount == res + 1, "SendMessage(LB_DIR) returned %d expected %d\n", itemCount, res + 1); - - /* Test DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE. */ - strcpy(pathBuffer, "w*.c"); - SendMessage(hList, LB_RESETCONTENT, 0, 0); - res = SendMessage(hList, LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, (LPARAM)pathBuffer); - ok (res >= 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c,) failed - 0x%08x\n", GetLastError()); - - /* There should be no plain files on the listbox, and no [..], since it does not fit w*.c */ - itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0); - ok (itemCount == itemCount_justDrives, - "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE) filled with %d entries, expected %d\n", - itemCount, itemCount_justDrives); - ok(res + 1 == itemCount, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c) returned incorrect index!\n"); - - for (i = 0; i < itemCount; i++) { - memset(pathBuffer, 0, MAX_PATH); - driveletter = '\0'; - SendMessage(hList, LB_GETTEXT, i, (LPARAM)pathBuffer); - ok (sscanf(pathBuffer, "[-%c-]", &driveletter) == 1, "Element %d (%s) does not fit [-X-]\n", i, pathBuffer); - ok( driveletter >= 'a' && driveletter <= 'z', "Drive letter not in range a..z, got ascii %d\n", driveletter); - } - DestroyWindow(hList); - - DeleteFileA( "wtest1.tmp.c" ); -} - -static HWND g_listBox; -static HWND g_label; - -#define ID_TEST_LABEL 1001 -#define ID_TEST_LISTBOX 1002 - -static BOOL on_listbox_container_create (HWND hwnd, LPCREATESTRUCT lpcs) -{ - g_label = CreateWindow( - "Static", - "Contents of static control before DlgDirList.", - WS_CHILD | WS_VISIBLE, - 10, 10, 512, 32, - hwnd, (HMENU)ID_TEST_LABEL, NULL, 0); - if (!g_label) return FALSE; - g_listBox = CreateWindow( - "ListBox", - "DlgDirList test", - WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER | WS_VSCROLL, - 10, 60, 256, 256, - hwnd, (HMENU)ID_TEST_LISTBOX, NULL, 0); - if (!g_listBox) return FALSE; - - return TRUE; -} - -static LRESULT CALLBACK listbox_container_window_procA ( - HWND hwnd, UINT uiMsg, WPARAM wParam, LPARAM lParam) -{ - LRESULT result = 0; - - switch (uiMsg) { - case WM_DESTROY: - PostQuitMessage(0); - break; - case WM_CREATE: - result = on_listbox_container_create(hwnd, (LPCREATESTRUCTA) lParam) - ? 0 : (LRESULT)-1; - break; - default: - result = DefWindowProcA (hwnd, uiMsg, wParam, lParam); - break; - } - return result; -} - -static BOOL RegisterListboxWindowClass(HINSTANCE hInst) -{ - WNDCLASSA cls; - - cls.style = 0; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = hInst; - cls.hIcon = NULL; - cls.hCursor = LoadCursorA (NULL, IDC_ARROW); - cls.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); - cls.lpszMenuName = NULL; - cls.lpfnWndProc = listbox_container_window_procA; - cls.lpszClassName = "ListboxContainerClass"; - if (!RegisterClassA (&cls)) return FALSE; - - return TRUE; -} - -static void test_listbox_dlgdir(void) -{ - HINSTANCE hInst; - HWND hWnd; - int res, itemCount; - int itemCount_allDirs; - int itemCount_justFiles; - int itemCount_justDrives; - int i; - char pathBuffer[MAX_PATH]; - char itemBuffer[MAX_PATH]; - char tempBuffer[MAX_PATH]; - char * p; - char driveletter; - HANDLE file; - - file = CreateFileA( "wtest1.tmp.c", GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL ); - ok(file != INVALID_HANDLE_VALUE, "Error creating the test file: %d\n", GetLastError()); - CloseHandle( file ); - - /* NOTE: for this test to succeed, there must be no subdirectories - under the current directory. In addition, there must be at least - one file that fits the wildcard w*.c . Normally, the test - directory itself satisfies both conditions. - */ - - hInst = GetModuleHandleA(0); - if (!RegisterListboxWindowClass(hInst)) assert(0); - hWnd = CreateWindow("ListboxContainerClass", "ListboxContainerClass", - WS_OVERLAPPEDWINDOW | WS_VISIBLE, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - NULL, NULL, hInst, 0); - assert(hWnd); - - /* Test for standard usage */ - - /* The following should be overwritten by the directory path */ - SendMessage(g_label, WM_SETTEXT, 0, (LPARAM)"default contents"); - - /* This should list all the w*.c files in the test directory - * As of this writing, this includes win.c, winstation.c, wsprintf.c - */ - strcpy(pathBuffer, "w*.c"); - res = DlgDirList(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, 0); - ok (res == 1, "DlgDirList(*.c, 0) returned %d - expected 1 - 0x%08x\n", res, GetLastError()); - - /* Path specification gets converted to uppercase */ - ok (!strcmp(pathBuffer, "W*.C"), - "expected conversion to uppercase, got %s\n", pathBuffer); - - /* Loaded path should have overwritten the label text */ - SendMessage(g_label, WM_GETTEXT, MAX_PATH, (LPARAM)pathBuffer); - trace("Static control after DlgDirList: %s\n", pathBuffer); - ok (strcmp("default contents", pathBuffer), "DlgDirList() did not modify static control!\n"); - - /* There should be some content in the listbox */ - itemCount = SendMessage(g_listBox, LB_GETCOUNT, 0, 0); - ok (itemCount > 0, "DlgDirList() did NOT fill the listbox!\n"); - itemCount_justFiles = itemCount; - - /* Every single item in the control should start with a w and end in .c */ - for (i = 0; i < itemCount; i++) { - memset(pathBuffer, 0, MAX_PATH); - SendMessage(g_listBox, LB_GETTEXT, i, (LPARAM)pathBuffer); - p = pathBuffer + strlen(pathBuffer); - ok(((pathBuffer[0] == 'w' || pathBuffer[0] == 'W') && - (*(p-1) == 'c' || *(p-1) == 'C') && - (*(p-2) == '.')), "Element %d (%s) does not fit requested w*.c\n", i, pathBuffer); - } - - /* Test behavior when no files match the wildcard */ - strcpy(pathBuffer, BAD_EXTENSION); - res = DlgDirList(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, 0); - ok (res == 1, "DlgDirList(%s, 0) returned %d expected 1\n", BAD_EXTENSION, res); - - itemCount = SendMessage(g_listBox, LB_GETCOUNT, 0, 0); - ok (itemCount == 0, "DlgDirList() DID fill the listbox!\n"); - - /* Test DDL_DIRECTORY */ - strcpy(pathBuffer, "w*.c"); - res = DlgDirList(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, - DDL_DIRECTORY); - ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY) failed - 0x%08x\n", GetLastError()); - - /* There should be some content in the listbox. In particular, there should - * be exactly more elements than before, since the directories should - * have been added. - */ - itemCount = SendMessage(g_listBox, LB_GETCOUNT, 0, 0); - itemCount_allDirs = itemCount - itemCount_justFiles; - ok (itemCount >= itemCount_justFiles, - "DlgDirList(DDL_DIRECTORY) filled with %d entries, expected > %d\n", - itemCount, itemCount_justFiles); - - /* Every single item in the control should start with a w and end in .c, - * except for the "[..]" string, which should appear exactly as it is. - */ - for (i = 0; i < itemCount; i++) { - memset(pathBuffer, 0, MAX_PATH); - SendMessage(g_listBox, LB_GETTEXT, i, (LPARAM)pathBuffer); - p = pathBuffer + strlen(pathBuffer); - ok( (pathBuffer[0] == '[' && pathBuffer[strlen(pathBuffer)-1] == ']') || - ((pathBuffer[0] == 'w' || pathBuffer[0] == 'W') && - (*(p-1) == 'c' || *(p-1) == 'C') && - (*(p-2) == '.')), "Element %d (%s) does not fit requested w*.c\n", i, pathBuffer); - } - - /* Test behavior when no files match the wildcard */ - strcpy(pathBuffer, BAD_EXTENSION); - res = DlgDirList(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, - DDL_DIRECTORY); - ok (res == 1, "DlgDirList(%s, DDL_DIRECTORY) returned %d expected 1\n", BAD_EXTENSION, res); - - itemCount = SendMessage(g_listBox, LB_GETCOUNT, 0, 0); - ok (itemCount == itemCount_allDirs, - "DlgDirList() incorrectly filled the listbox! (expected %d got %d)\n", - itemCount_allDirs, itemCount); - for (i = 0; i < itemCount; i++) { - memset(pathBuffer, 0, MAX_PATH); - SendMessage(g_listBox, LB_GETTEXT, i, (LPARAM)pathBuffer); - ok( pathBuffer[0] == '[' && pathBuffer[strlen(pathBuffer)-1] == ']', - "Element %d (%s) does not fit requested [...]\n", i, pathBuffer); - } - - - /* Test DDL_DRIVES. At least on WinXP-SP2, this implies DDL_EXCLUSIVE */ - strcpy(pathBuffer, "w*.c"); - res = DlgDirList(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, - DDL_DRIVES); - ok (res == 1, "DlgDirList(*.c, DDL_DRIVES) failed - 0x%08x\n", GetLastError()); - - /* There should be some content in the listbox. In particular, there should - * be at least one element before, since the string "[-c-]" should - * have been added. Depending on the user setting, more drives might have - * been added. - */ - itemCount = SendMessage(g_listBox, LB_GETCOUNT, 0, 0); - ok (itemCount >= 1, - "DlgDirList(DDL_DRIVES) filled with %d entries, expected at least %d\n", - itemCount, 1); - itemCount_justDrives = itemCount; - - /* Every single item in the control should fit the format [-c-] */ - for (i = 0; i < itemCount; i++) { - memset(pathBuffer, 0, MAX_PATH); - driveletter = '\0'; - SendMessage(g_listBox, LB_GETTEXT, i, (LPARAM)pathBuffer); - ok( strlen(pathBuffer) == 5, "Length of drive string is not 5\n" ); - ok( sscanf(pathBuffer, "[-%c-]", &driveletter) == 1, "Element %d (%s) does not fit [-X-]\n", i, pathBuffer); - ok( driveletter >= 'a' && driveletter <= 'z', "Drive letter not in range a..z, got ascii %d\n", driveletter); - if (!(driveletter >= 'a' && driveletter <= 'z')) { - /* Correct after invalid entry is found */ - trace("removing count of invalid entry %s\n", pathBuffer); - itemCount_justDrives--; - } - } - - /* Test behavior when no files match the wildcard */ - strcpy(pathBuffer, BAD_EXTENSION); - res = DlgDirList(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, - DDL_DRIVES); - ok (res == 1, "DlgDirList(%s, DDL_DRIVES) returned %d expected 1\n", BAD_EXTENSION, res); - - itemCount = SendMessage(g_listBox, LB_GETCOUNT, 0, 0); - ok (itemCount == itemCount_justDrives, "DlgDirList() incorrectly filled the listbox!\n"); - - - /* Test DDL_DIRECTORY|DDL_DRIVES. This does *not* imply DDL_EXCLUSIVE */ - strcpy(pathBuffer, "w*.c"); - res = DlgDirList(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, - DDL_DIRECTORY|DDL_DRIVES); - ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY|DDL_DRIVES) failed - 0x%08x\n", GetLastError()); - - /* There should be some content in the listbox. In particular, there should - * be exactly the number of plain files, plus the number of mapped drives, - * plus one "[..]" - */ - itemCount = SendMessage(g_listBox, LB_GETCOUNT, 0, 0); - ok (itemCount == itemCount_justFiles + itemCount_justDrives + itemCount_allDirs, - "DlgDirList(DDL_DIRECTORY|DDL_DRIVES) filled with %d entries, expected %d\n", - itemCount, itemCount_justFiles + itemCount_justDrives + itemCount_allDirs); - - /* Every single item in the control should start with a w and end in .c, - * except for the "[..]" string, which should appear exactly as it is, - * and the mapped drives in the format "[-X-]". - */ - for (i = 0; i < itemCount; i++) { - memset(pathBuffer, 0, MAX_PATH); - driveletter = '\0'; - SendMessage(g_listBox, LB_GETTEXT, i, (LPARAM)pathBuffer); - p = pathBuffer + strlen(pathBuffer); - if (sscanf(pathBuffer, "[-%c-]", &driveletter) == 1) { - ok( driveletter >= 'a' && driveletter <= 'z', "Drive letter not in range a..z, got ascii %d\n", driveletter); - } else { - ok( (pathBuffer[0] == '[' && pathBuffer[strlen(pathBuffer)-1] == ']') || - ((pathBuffer[0] == 'w' || pathBuffer[0] == 'W') && - (*(p-1) == 'c' || *(p-1) == 'C') && - (*(p-2) == '.')), "Element %d (%s) does not fit requested w*.c\n", i, pathBuffer); - } - } - - /* Test behavior when no files match the wildcard */ - strcpy(pathBuffer, BAD_EXTENSION); - res = DlgDirList(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, - DDL_DIRECTORY|DDL_DRIVES); - ok (res == 1, "DlgDirList(%s, DDL_DIRECTORY|DDL_DRIVES) returned %d expected 1\n", BAD_EXTENSION, res); - - itemCount = SendMessage(g_listBox, LB_GETCOUNT, 0, 0); - ok (itemCount == itemCount_justDrives + itemCount_allDirs, - "DlgDirList() incorrectly filled the listbox! (expected %d got %d)\n", - itemCount_justDrives + itemCount_allDirs, itemCount); - - - - /* Test DDL_DIRECTORY|DDL_EXCLUSIVE. */ - strcpy(pathBuffer, "w*.c"); - res = DlgDirList(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, - DDL_DIRECTORY|DDL_EXCLUSIVE); - ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY|DDL_EXCLUSIVE) failed - 0x%08x\n", GetLastError()); - - /* There should be exactly one element: "[..]" */ - itemCount = SendMessage(g_listBox, LB_GETCOUNT, 0, 0); - ok (itemCount == itemCount_allDirs, - "DlgDirList(DDL_DIRECTORY|DDL_EXCLUSIVE) filled with %d entries, expected %d\n", - itemCount, itemCount_allDirs); - - if (itemCount && GetCurrentDirectoryA( MAX_PATH, pathBuffer ) > 3) /* there's no [..] in drive root */ - { - memset(pathBuffer, 0, MAX_PATH); - SendMessage(g_listBox, LB_GETTEXT, 0, (LPARAM)pathBuffer); - ok( !strcmp(pathBuffer, "[..]"), "First (and only) element is not [..]\n"); - } - - /* Test behavior when no files match the wildcard */ - strcpy(pathBuffer, BAD_EXTENSION); - res = DlgDirList(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, - DDL_DIRECTORY|DDL_EXCLUSIVE); - ok (res == 1, "DlgDirList(%s, DDL_DIRECTORY|DDL_EXCLUSIVE) returned %d expected 1\n", BAD_EXTENSION, res); - - itemCount = SendMessage(g_listBox, LB_GETCOUNT, 0, 0); - ok (itemCount == itemCount_allDirs, "DlgDirList() incorrectly filled the listbox!\n"); - - - /* Test DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE. */ - strcpy(pathBuffer, "w*.c"); - res = DlgDirList(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, - DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE); - ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE) failed - 0x%08x\n", GetLastError()); - - /* There should be no plain files on the listbox */ - itemCount = SendMessage(g_listBox, LB_GETCOUNT, 0, 0); - ok (itemCount == itemCount_justDrives + itemCount_allDirs, - "DlgDirList(DDL_DIRECTORY|DDL_EXCLUSIVE) filled with %d entries, expected %d\n", - itemCount, itemCount_justDrives + itemCount_allDirs); - - for (i = 0; i < itemCount; i++) { - memset(pathBuffer, 0, MAX_PATH); - driveletter = '\0'; - SendMessage(g_listBox, LB_GETTEXT, i, (LPARAM)pathBuffer); - if (sscanf(pathBuffer, "[-%c-]", &driveletter) == 1) { - ok( driveletter >= 'a' && driveletter <= 'z', "Drive letter not in range a..z, got ascii %d\n", driveletter); - } else { - ok( pathBuffer[0] == '[' && pathBuffer[strlen(pathBuffer)-1] == ']', - "Element %d (%s) does not fit expected [...]\n", i, pathBuffer); - } - } - - /* Test behavior when no files match the wildcard */ - strcpy(pathBuffer, BAD_EXTENSION); - res = DlgDirList(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, - DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE); - ok (res == 1, "DlgDirList(%s, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE) returned %d expected 1\n", BAD_EXTENSION, res); - - itemCount = SendMessage(g_listBox, LB_GETCOUNT, 0, 0); - ok (itemCount == itemCount_justDrives + itemCount_allDirs, - "DlgDirList() incorrectly filled the listbox!\n"); - - - /* Now test DlgDirSelectEx() in normal operation */ - /* Fill with everything - drives, directory and all plain files. */ - strcpy(pathBuffer, "*"); - res = DlgDirList(hWnd, pathBuffer, ID_TEST_LISTBOX, ID_TEST_LABEL, - DDL_DIRECTORY|DDL_DRIVES); - ok (res != 0, "DlgDirList(*, DDL_DIRECTORY|DDL_DRIVES) failed - 0x%08x\n", GetLastError()); - - SendMessage(g_listBox, LB_SETCURSEL, -1, 0); /* Unselect any current selection */ - memset(pathBuffer, 0, MAX_PATH); - SetLastError(0xdeadbeef); - res = DlgDirSelectEx(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); - ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with no selection modified last error code from 0xdeadbeef to 0x%08x\n", - GetLastError()); - ok (res == 0, "DlgDirSelectEx() with no selection returned %d, expected 0\n", res); - /* WinXP-SP2 leaves pathBuffer untouched, but Win98 fills it with garbage. */ - /* - ok (strlen(pathBuffer) == 0, "DlgDirSelectEx() with no selection filled buffer with %s\n", pathBuffer); - */ - /* Test proper drive/dir/file recognition */ - itemCount = SendMessage(g_listBox, LB_GETCOUNT, 0, 0); - for (i = 0; i < itemCount; i++) { - memset(itemBuffer, 0, MAX_PATH); - memset(pathBuffer, 0, MAX_PATH); - memset(tempBuffer, 0, MAX_PATH); - driveletter = '\0'; - SendMessage(g_listBox, LB_GETTEXT, i, (LPARAM)itemBuffer); - res = SendMessage(g_listBox, LB_SETCURSEL, i, 0); - ok (res == i, "SendMessage(LB_SETCURSEL, %d) failed\n", i); - if (sscanf(itemBuffer, "[-%c-]", &driveletter) == 1) { - /* Current item is a drive letter */ - SetLastError(0xdeadbeef); - res = DlgDirSelectEx(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); - ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08x\n", - i, GetLastError()); - ok(res == 1, "DlgDirSelectEx() thinks %s (%s) is not a drive/directory!\n", itemBuffer, pathBuffer); - - /* For drive letters, DlgDirSelectEx tacks on a colon */ - ok (pathBuffer[0] == driveletter && pathBuffer[1] == ':' && pathBuffer[2] == '\0', - "%d: got \"%s\" expected \"%c:\"\n", i, pathBuffer, driveletter); - } else if (itemBuffer[0] == '[') { - /* Current item is the parent directory */ - SetLastError(0xdeadbeef); - res = DlgDirSelectEx(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); - ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08x\n", - i, GetLastError()); - ok(res == 1, "DlgDirSelectEx() thinks %s (%s) is not a drive/directory!\n", itemBuffer, pathBuffer); - - /* For directories, DlgDirSelectEx tacks on a backslash */ - p = pathBuffer + strlen(pathBuffer); - ok (*(p-1) == '\\', "DlgDirSelectEx did NOT tack on a backslash to dir, got %s\n", pathBuffer); - - tempBuffer[0] = '['; - strncpy(tempBuffer + 1, pathBuffer, strlen(pathBuffer) - 1); - strcat(tempBuffer, "]"); - ok (!strcmp(tempBuffer, itemBuffer), "Formatted directory should be %s, got %s\n", tempBuffer, itemBuffer); - } else { - /* Current item is a plain file */ - SetLastError(0xdeadbeef); - res = DlgDirSelectEx(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); - ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08x\n", - i, GetLastError()); - ok(res == 0, "DlgDirSelectEx() thinks %s (%s) is a drive/directory!\n", itemBuffer, pathBuffer); - - /* NOTE: WinXP tacks a period on all files that lack an extension. This affects - * for example, "Makefile", which gets reported as "Makefile." - */ - strcpy(tempBuffer, itemBuffer); - if (strchr(tempBuffer, '.') == NULL) strcat(tempBuffer, "."); - ok (!strcmp(pathBuffer, tempBuffer), "Formatted file should be %s, got %s\n", tempBuffer, pathBuffer); - } - } - - /* Now test DlgDirSelectEx() in abnormal operation */ - /* Fill list with bogus entries, that look somewhat valid */ - SendMessage(g_listBox, LB_RESETCONTENT, 0, 0); - SendMessage(g_listBox, LB_ADDSTRING, 0, (LPARAM)"[notexist.dir]"); - SendMessage(g_listBox, LB_ADDSTRING, 0, (LPARAM)"notexist.fil"); - itemCount = SendMessage(g_listBox, LB_GETCOUNT, 0, 0); - for (i = 0; i < itemCount; i++) { - memset(itemBuffer, 0, MAX_PATH); - memset(pathBuffer, 0, MAX_PATH); - memset(tempBuffer, 0, MAX_PATH); - driveletter = '\0'; - SendMessage(g_listBox, LB_GETTEXT, i, (LPARAM)itemBuffer); - res = SendMessage(g_listBox, LB_SETCURSEL, i, 0); - ok (res == i, "SendMessage(LB_SETCURSEL, %d) failed\n", i); - if (sscanf(itemBuffer, "[-%c-]", &driveletter) == 1) { - /* Current item is a drive letter */ - SetLastError(0xdeadbeef); - res = DlgDirSelectEx(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); - ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08x\n", - i, GetLastError()); - ok(res == 1, "DlgDirSelectEx() thinks %s (%s) is not a drive/directory!\n", itemBuffer, pathBuffer); - - /* For drive letters, DlgDirSelectEx tacks on a colon */ - ok (pathBuffer[0] == driveletter && pathBuffer[1] == ':' && pathBuffer[2] == '\0', - "%d: got \"%s\" expected \"%c:\"\n", i, pathBuffer, driveletter); - } else if (itemBuffer[0] == '[') { - /* Current item is the parent directory */ - SetLastError(0xdeadbeef); - res = DlgDirSelectEx(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); - ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08x\n", - i, GetLastError()); - ok(res == 1, "DlgDirSelectEx() thinks %s (%s) is not a drive/directory!\n", itemBuffer, pathBuffer); - - /* For directories, DlgDirSelectEx tacks on a backslash */ - p = pathBuffer + strlen(pathBuffer); - ok (*(p-1) == '\\', "DlgDirSelectEx did NOT tack on a backslash to dir, got %s\n", pathBuffer); - - tempBuffer[0] = '['; - strncpy(tempBuffer + 1, pathBuffer, strlen(pathBuffer) - 1); - strcat(tempBuffer, "]"); - ok (!strcmp(tempBuffer, itemBuffer), "Formatted directory should be %s, got %s\n", tempBuffer, itemBuffer); - } else { - /* Current item is a plain file */ - SetLastError(0xdeadbeef); - res = DlgDirSelectEx(hWnd, pathBuffer, MAX_PATH, ID_TEST_LISTBOX); - ok (GetLastError() == 0xdeadbeef, - "DlgDirSelectEx() with selection at %d modified last error code from 0xdeadbeef to 0x%08x\n", - i, GetLastError()); - ok(res == 0, "DlgDirSelectEx() thinks %s (%s) is a drive/directory!\n", itemBuffer, pathBuffer); - - /* NOTE: WinXP and Win98 tack a period on all files that lack an extension. - * This affects for example, "Makefile", which gets reported as "Makefile." - */ - strcpy(tempBuffer, itemBuffer); - if (strchr(tempBuffer, '.') == NULL) strcat(tempBuffer, "."); - ok (!strcmp(pathBuffer, tempBuffer), "Formatted file should be %s, got %s\n", tempBuffer, pathBuffer); - } - } - DestroyWindow(hWnd); - - DeleteFileA( "wtest1.tmp.c" ); -} - -START_TEST(listbox) -{ - const struct listbox_test SS = -/* {add_style} */ - {{0}, - {LB_ERR, LB_ERR, 0, LB_ERR}, {0,0,0,0}, - { 1, 1, 1, LB_ERR}, {0,0,0,0}, - { 2, 2, 2, LB_ERR}, {0,0,0,0}, - {LB_ERR, LB_ERR, 0, LB_ERR}, {0,0,0,0}}; -/* {selected, anchor, caret, selcount}{TODO fields} */ - const struct listbox_test SS_NS = - {{LBS_NOSEL}, - {LB_ERR, LB_ERR, 0, LB_ERR}, {0,0,0,0}, - { 1, 1, 1, LB_ERR}, {0,0,0,0}, - { 2, 2, 2, LB_ERR}, {0,0,0,0}, - {LB_ERR, LB_ERR, 0, LB_ERR}, {0,0,0,0}}; - const struct listbox_test MS = - {{LBS_MULTIPLESEL}, - { 0, LB_ERR, 0, 0}, {0,0,0,0}, - { 1, 1, 1, 1}, {0,0,0,0}, - { 2, 1, 2, 1}, {0,0,0,0}, - { 0, LB_ERR, 0, 2}, {0,0,0,0}}; - const struct listbox_test MS_NS = - {{LBS_MULTIPLESEL | LBS_NOSEL}, - {LB_ERR, LB_ERR, 0, LB_ERR}, {0,0,0,0}, - { 1, 1, 1, LB_ERR}, {0,0,0,0}, - { 2, 2, 2, LB_ERR}, {0,0,0,0}, - {LB_ERR, LB_ERR, 0, LB_ERR}, {0,0,0,0}}; - const struct listbox_test ES = - {{LBS_EXTENDEDSEL}, - { 0, LB_ERR, 0, 0}, {0,0,0,0}, - { 1, 1, 1, 1}, {0,0,0,0}, - { 2, 2, 2, 1}, {0,0,0,0}, - { 0, LB_ERR, 0, 2}, {0,0,0,0}}; - const struct listbox_test ES_NS = - {{LBS_EXTENDEDSEL | LBS_NOSEL}, - {LB_ERR, LB_ERR, 0, LB_ERR}, {0,0,0,0}, - { 1, 1, 1, LB_ERR}, {0,0,0,0}, - { 2, 2, 2, LB_ERR}, {0,0,0,0}, - {LB_ERR, LB_ERR, 0, LB_ERR}, {0,0,0,0}}; - const struct listbox_test EMS = - {{LBS_EXTENDEDSEL | LBS_MULTIPLESEL}, - { 0, LB_ERR, 0, 0}, {0,0,0,0}, - { 1, 1, 1, 1}, {0,0,0,0}, - { 2, 2, 2, 1}, {0,0,0,0}, - { 0, LB_ERR, 0, 2}, {0,0,0,0}}; - const struct listbox_test EMS_NS = - {{LBS_EXTENDEDSEL | LBS_MULTIPLESEL | LBS_NOSEL}, - {LB_ERR, LB_ERR, 0, LB_ERR}, {0,0,0,0}, - { 1, 1, 1, LB_ERR}, {0,0,0,0}, - { 2, 2, 2, LB_ERR}, {0,0,0,0}, - {LB_ERR, LB_ERR, 0, LB_ERR}, {0,0,0,0}}; - - trace (" Testing single selection...\n"); - check (SS); - trace (" ... with NOSEL\n"); - check (SS_NS); - trace (" Testing multiple selection...\n"); - check (MS); - trace (" ... with NOSEL\n"); - check (MS_NS); - trace (" Testing extended selection...\n"); - check (ES); - trace (" ... with NOSEL\n"); - check (ES_NS); - trace (" Testing extended and multiple selection...\n"); - check (EMS); - trace (" ... with NOSEL\n"); - check (EMS_NS); - - check_item_height(); - test_ownerdraw(); - test_selection(); - test_listbox_height(); - test_itemfrompoint(); - test_listbox_item_data(); - test_listbox_LB_DIR(); - test_listbox_dlgdir(); -} diff --git a/rostests/winetests/user32/menu.c b/rostests/winetests/user32/menu.c deleted file mode 100755 index 2d308c48178..00000000000 --- a/rostests/winetests/user32/menu.c +++ /dev/null @@ -1,3332 +0,0 @@ -/* - * Unit tests for menus - * - * Copyright 2005 Robert Shearman - * Copyright 2007 Dmitry Timoshkov - * - * 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 _WIN32_WINNT 0x0501 - -#include -#include -#include -#include - -#define OEMRESOURCE /* For OBM_MNARROW */ - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" - -#include "wine/test.h" - -static ATOM atomMenuCheckClass; - -static BOOL (WINAPI *pGetMenuInfo)(HMENU,LPCMENUINFO); -static UINT (WINAPI *pSendInput)(UINT, INPUT*, size_t); -static BOOL (WINAPI *pSetMenuInfo)(HMENU,LPCMENUINFO); -static BOOL (WINAPI *pEndMenu) (void); - -static void init_function_pointers(void) -{ - HMODULE hdll = GetModuleHandleA("user32"); - -#define GET_PROC(func) \ - p ## func = (void*)GetProcAddress(hdll, #func); \ - if(!p ## func) \ - trace("GetProcAddress(%s) failed\n", #func); - - GET_PROC(GetMenuInfo) - GET_PROC(SendInput) - GET_PROC(SetMenuInfo) - GET_PROC(EndMenu) - -#undef GET_PROC -} - -static BOOL correct_behavior(void) -{ - HMENU hmenu; - MENUITEMINFO info; - BOOL rc; - - hmenu = CreateMenu(); - - memset(&info, 0, sizeof(MENUITEMINFO)); - info.cbSize= sizeof(MENUITEMINFO); - SetLastError(0xdeadbeef); - rc = GetMenuItemInfo(hmenu, 0, TRUE, &info); - /* Win9x : 0xdeadbeef - * NT4 : ERROR_INVALID_PARAMETER - * >= W2K : ERROR_MENU_ITEM_NOT_FOUND - */ - if (!rc && GetLastError() != ERROR_MENU_ITEM_NOT_FOUND) - { - win_skip("NT4 and below can't handle a bigger MENUITEMINFO struct\n"); - DestroyMenu(hmenu); - return FALSE; - } - - DestroyMenu(hmenu); - return TRUE; -} - -static LRESULT WINAPI menu_check_wnd_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - switch (msg) - { - case WM_ENTERMENULOOP: - /* mark window as having entered menu loop */ - SetWindowLongPtr(hwnd, GWLP_USERDATA, TRUE); - /* exit menu modal loop - * ( A SendMessage does not work on NT3.51 here ) */ - return PostMessage(hwnd, WM_CANCELMODE, 0, 0); - } - return DefWindowProc(hwnd, msg, wparam, lparam); -} - -/* The MSVC headers ignore our NONAMELESSUNION requests so we have to define - * our own type */ -typedef struct -{ - DWORD type; - union - { - MOUSEINPUT mi; - KEYBDINPUT ki; - HARDWAREINPUT hi; - } u; -} TEST_INPUT; - -/* globals to communicate between test and wndproc */ - -static BOOL bMenuVisible; -static BOOL got_input; -static HMENU hMenus[4]; - -#define MOD_SIZE 10 -#define MOD_NRMENUS 8 - - /* menu texts with their sizes */ -static struct { - LPCSTR text; - SIZE size; /* size of text up to any \t */ - SIZE sc_size; /* size of the short-cut */ -} MOD_txtsizes[] = { - { "Pinot &Noir" }, - { "&Merlot\bF4" }, - { "Shira&z\tAlt+S" }, - { "" }, - { NULL } -}; - -static unsigned int MOD_maxid; -static RECT MOD_rc[MOD_NRMENUS]; -static int MOD_avec, MOD_hic; -static int MOD_odheight; -static SIZE MODsizes[MOD_NRMENUS]= { {MOD_SIZE, MOD_SIZE},{MOD_SIZE, MOD_SIZE}, - {MOD_SIZE, MOD_SIZE},{MOD_SIZE, MOD_SIZE}}; -static int MOD_GotDrawItemMsg = FALSE; -static int gflag_initmenupopup, - gflag_entermenuloop, - gflag_initmenu; - -/* wndproc used by test_menu_ownerdraw() */ -static LRESULT WINAPI menu_ownerdraw_wnd_proc(HWND hwnd, UINT msg, - WPARAM wparam, LPARAM lparam) -{ - static HMENU hmenupopup; - switch (msg) - { - case WM_INITMENUPOPUP: - gflag_initmenupopup++; - hmenupopup = (HMENU) wparam; - break; - case WM_ENTERMENULOOP: - gflag_entermenuloop++; - break; - case WM_INITMENU: - gflag_initmenu++; - break; - case WM_MEASUREITEM: - { - MEASUREITEMSTRUCT* pmis = (MEASUREITEMSTRUCT*)lparam; - if( winetest_debug) - trace("WM_MEASUREITEM received data %lx size %dx%d\n", - pmis->itemData, pmis->itemWidth, pmis->itemHeight); - ok( !wparam, "wrong wparam %lx\n", wparam ); - ok( pmis->CtlType == ODT_MENU, "wrong type %x\n", pmis->CtlType ); - MOD_odheight = pmis->itemHeight; - pmis->itemWidth = MODsizes[pmis->itemData].cx; - pmis->itemHeight = MODsizes[pmis->itemData].cy; - return TRUE; - } - case WM_DRAWITEM: - { - DRAWITEMSTRUCT * pdis; - TEXTMETRIC tm; - HPEN oldpen; - char chrs[]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; - SIZE sz; - int i; - pdis = (DRAWITEMSTRUCT *) lparam; - if( winetest_debug) { - RECT rc; - GetMenuItemRect( hwnd, (HMENU)pdis->hwndItem, pdis->itemData ,&rc); - trace("WM_DRAWITEM received hwnd %p hmenu %p itemdata %ld item %d rc %d,%d-%d,%d itemrc: %d,%d-%d,%d\n", - hwnd, pdis->hwndItem, pdis->itemData, pdis->itemID, - pdis->rcItem.left, pdis->rcItem.top, - pdis->rcItem.right,pdis->rcItem.bottom, - rc.left,rc.top,rc.right,rc.bottom); - oldpen=SelectObject( pdis->hDC, GetStockObject( - pdis->itemState & ODS_SELECTED ? WHITE_PEN :BLACK_PEN)); - Rectangle( pdis->hDC, pdis->rcItem.left,pdis->rcItem.top, - pdis->rcItem.right,pdis->rcItem.bottom ); - SelectObject( pdis->hDC, oldpen); - } - ok( !wparam, "wrong wparam %lx\n", wparam ); - ok( pdis->CtlType == ODT_MENU, "wrong type %x\n", pdis->CtlType ); - /* calculate widths of some menu texts */ - if( ! MOD_txtsizes[0].size.cx) - for(i = 0; MOD_txtsizes[i].text; i++) { - char buf[100], *p; - RECT rc={0,0,0,0}; - strcpy( buf, MOD_txtsizes[i].text); - if( ( p = strchr( buf, '\t'))) { - *p = '\0'; - DrawText( pdis->hDC, p + 1, -1, &rc, - DT_SINGLELINE|DT_CALCRECT); - MOD_txtsizes[i].sc_size.cx= rc.right - rc.left; - MOD_txtsizes[i].sc_size.cy= rc.bottom - rc.top; - } - DrawText( pdis->hDC, buf, -1, &rc, - DT_SINGLELINE|DT_CALCRECT); - MOD_txtsizes[i].size.cx= rc.right - rc.left; - MOD_txtsizes[i].size.cy= rc.bottom - rc.top; - } - - if( pdis->itemData > MOD_maxid) return TRUE; - /* store the rectangle */ - MOD_rc[pdis->itemData] = pdis->rcItem; - /* calculate average character width */ - GetTextExtentPoint( pdis->hDC, chrs, 52, &sz ); - MOD_avec = (sz.cx + 26)/52; - GetTextMetrics( pdis->hDC, &tm); - MOD_hic = tm.tmHeight; - MOD_GotDrawItemMsg = TRUE; - return TRUE; - } - case WM_ENTERIDLE: - { - ok( lparam || broken(!lparam), /* win9x, nt4 */ - "Menu window handle is NULL!\n"); - if( lparam) { - HMENU hmenu = (HMENU)SendMessageA( (HWND)lparam, MN_GETHMENU, 0, 0); - ok( hmenupopup == hmenu, "MN_GETHMENU returns %p expected %p\n", - hmenu, hmenupopup); - } - PostMessage(hwnd, WM_CANCELMODE, 0, 0); - return TRUE; - } - - } - return DefWindowProc(hwnd, msg, wparam, lparam); -} - -static void register_menu_check_class(void) -{ - WNDCLASS wc = - { - 0, - menu_check_wnd_proc, - 0, - 0, - GetModuleHandle(NULL), - NULL, - LoadCursor(NULL, IDC_ARROW), - (HBRUSH)(COLOR_BTNFACE+1), - NULL, - TEXT("WineMenuCheck"), - }; - - atomMenuCheckClass = RegisterClass(&wc); -} - -/* demonstrates that windows locks the menu object so that it is still valid - * even after a client calls DestroyMenu on it */ -static void test_menu_locked_by_window(void) -{ - BOOL ret; - HMENU hmenu; - HWND hwnd = CreateWindowEx(0, MAKEINTATOM(atomMenuCheckClass), NULL, - WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 200, 200, - NULL, NULL, NULL, NULL); - ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError()); - hmenu = CreateMenu(); - ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError()); - ret = InsertMenu(hmenu, 0, MF_STRING, 0, TEXT("&Test")); - ok(ret, "InsertMenu failed with error %d\n", GetLastError()); - ret = SetMenu(hwnd, hmenu); - ok(ret, "SetMenu failed with error %d\n", GetLastError()); - ret = DestroyMenu(hmenu); - ok(ret, "DestroyMenu failed with error %d\n", GetLastError()); - - ret = DrawMenuBar(hwnd); - todo_wine { - ok(ret, "DrawMenuBar failed with error %d\n", GetLastError()); - } - ret = IsMenu(GetMenu(hwnd)); - ok(!ret || broken(ret) /* nt4 */, "Menu handle should have been destroyed\n"); - - SendMessage(hwnd, WM_SYSCOMMAND, SC_KEYMENU, 0); - /* did we process the WM_INITMENU message? */ - ret = GetWindowLongPtr(hwnd, GWLP_USERDATA); - todo_wine { - ok(ret, "WM_INITMENU should have been sent\n"); - } - - DestroyWindow(hwnd); -} - -/* demonstrates that subpopup's are locked - * even after a client calls DestroyMenu on it */ -static LRESULT WINAPI subpopuplocked_wnd_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - HWND hwndmenu; - switch (msg) - { - case WM_ENTERIDLE: - hwndmenu = GetCapture(); - if( hwndmenu) { - PostMessage( hwndmenu, WM_KEYDOWN, VK_DOWN, 0); - PostMessage( hwndmenu, WM_KEYDOWN, VK_RIGHT, 0); - PostMessage( hwndmenu, WM_KEYDOWN, VK_RETURN, 0); - } - } - return DefWindowProc(hwnd, msg, wparam, lparam); -} - -static void test_subpopup_locked_by_menu(void) -{ - DWORD gle; - BOOL ret; - HMENU hmenu, hsubmenu; - MENUINFO mi = { sizeof( MENUINFO)}; - MENUITEMINFO mii = { sizeof( MENUITEMINFO)}; - HWND hwnd; - const int itemid = 0x1234567; - if( !pGetMenuInfo) - { - win_skip("GetMenuInfo is not available\n"); - return; - } - /* create window, popupmenu with one subpopup */ - hwnd = CreateWindowEx(0, MAKEINTATOM(atomMenuCheckClass), NULL, - WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 200, 200, - NULL, NULL, NULL, NULL); - ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError()); - SetWindowLongPtr( hwnd, GWLP_WNDPROC, (LONG_PTR) subpopuplocked_wnd_proc); - hmenu = CreatePopupMenu(); - ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError()); - hsubmenu = CreatePopupMenu(); - ok(hsubmenu != NULL, "CreateMenu failed with error %d\n", GetLastError()); - ret = InsertMenu(hmenu, 0, MF_BYPOSITION | MF_POPUP | MF_STRING, (UINT_PTR)hsubmenu, - TEXT("PopUpLockTest")); - ok(ret, "InsertMenu failed with error %d\n", GetLastError()); - ret = InsertMenu(hsubmenu, 0, MF_BYPOSITION | MF_STRING, itemid, TEXT("PopUpMenu")); - ok(ret, "InsertMenu failed with error %d\n", GetLastError()); - /* first some tests that all this functions properly */ - mii.fMask = MIIM_SUBMENU; - ret = GetMenuItemInfo( hmenu, 0, TRUE, &mii); - ok( ret, "GetMenuItemInfo failed error %d\n", GetLastError()); - ok( mii.hSubMenu == hsubmenu, "submenu is %p\n", mii.hSubMenu); - mi.fMask |= MIM_STYLE; - ret = pGetMenuInfo( hsubmenu, &mi); - ok( ret , "GetMenuInfo returned 0 with error %d\n", GetLastError()); - ret = IsMenu( hsubmenu); - ok( ret , "Menu handle is not valid\n"); - SetLastError( 0xdeadbeef); - ret = TrackPopupMenu( hmenu, TPM_RETURNCMD, 100,100, 0, hwnd, NULL); - if( ret == (itemid & 0xffff)) { - win_skip("not on 16 bit menu subsystem\n"); - DestroyMenu( hsubmenu); - } else { - gle = GetLastError(); - ok( ret == itemid , "TrackPopupMenu returned %d error is %d\n", ret, gle); - ok( gle == 0 || - broken( gle == 0xdeadbeef), /* win2k0 */ - "Last error is %d\n", gle); - /* then destroy the sub-popup */ - ret = DestroyMenu( hsubmenu); - ok(ret, "DestroyMenu failed with error %d\n", GetLastError()); - /* and repeat the tests */ - mii.fMask = MIIM_SUBMENU; - ret = GetMenuItemInfo( hmenu, 0, TRUE, &mii); - ok( ret, "GetMenuItemInfo failed error %d\n", GetLastError()); - /* GetMenuInfo fails now */ - ok( mii.hSubMenu == hsubmenu, "submenu is %p\n", mii.hSubMenu); - mi.fMask |= MIM_STYLE; - ret = pGetMenuInfo( hsubmenu, &mi); - ok( !ret , "GetMenuInfo should have failed\n"); - /* IsMenu says it is not */ - ret = IsMenu( hsubmenu); - ok( !ret , "Menu handle should be invalid\n"); - /* but TrackPopupMenu still works! */ - SetLastError( 0xdeadbeef); - ret = TrackPopupMenu( hmenu, TPM_RETURNCMD, 100,100, 0, hwnd, NULL); - gle = GetLastError(); - todo_wine { - ok( ret == itemid , "TrackPopupMenu returned %d error is %d\n", ret, gle); - } - ok( gle == 0 || - broken(gle == 0xdeadbeef) || /* wow64 */ - broken(gle == ERROR_INVALID_PARAMETER), /* win2k0 */ - "Last error is %d\n", gle); - } - /* clean up */ - DestroyMenu( hmenu); - DestroyWindow(hwnd); -} - -static void test_menu_ownerdraw(void) -{ - int i,j,k; - BOOL ret; - HMENU hmenu; - MENUITEMINFO mii; - LONG leftcol; - HWND hwnd = CreateWindowEx(0, MAKEINTATOM(atomMenuCheckClass), NULL, - WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 200, 200, - NULL, NULL, NULL, NULL); - ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError()); - if( !hwnd) return; - SetWindowLongPtr( hwnd, GWLP_WNDPROC, (LONG_PTR)menu_ownerdraw_wnd_proc); - hmenu = CreatePopupMenu(); - ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError()); - if( !hmenu) { DestroyWindow(hwnd);return;} - k=0; - for( j=0;j<2;j++) /* create columns */ - for(i=0;i<2;i++) { /* create rows */ - ret = AppendMenu( hmenu, MF_OWNERDRAW | - (i==0 ? MF_MENUBREAK : 0), k, MAKEINTRESOURCE(k)); - k++; - ok( ret, "AppendMenu failed for %d\n", k-1); - } - MOD_maxid = k-1; - assert( k <= sizeof(MOD_rc)/sizeof(RECT)); - /* display the menu */ - TrackPopupMenu( hmenu, TPM_RETURNCMD, 100,100, 0, hwnd, NULL); - - /* columns have a 4 pixel gap between them */ - ok( MOD_rc[0].right + 4 == MOD_rc[2].left, - "item rectangles are not separated by 4 pixels space\n"); - /* height should be what the MEASUREITEM message has returned */ - ok( MOD_rc[0].bottom - MOD_rc[0].top == MOD_SIZE, - "menu item has wrong height: %d should be %d\n", - MOD_rc[0].bottom - MOD_rc[0].top, MOD_SIZE); - /* no gaps between the rows */ - ok( MOD_rc[0].bottom - MOD_rc[1].top == 0, - "There should not be a space between the rows, gap is %d\n", - MOD_rc[0].bottom - MOD_rc[1].top); - /* test the correct value of the item height that was sent - * by the WM_MEASUREITEM message */ - ok( MOD_odheight == HIWORD( GetDialogBaseUnits()) || /* WinNT,2k,XP */ - MOD_odheight == MOD_hic, /* Win95,98,ME */ - "Wrong height field in MEASUREITEMSTRUCT, expected %d or %d actual %d\n", - HIWORD( GetDialogBaseUnits()), MOD_hic, MOD_odheight); - /* test what MF_MENUBREAK did at the first position. Also show - * that an MF_SEPARATOR is ignored in the height calculation. */ - leftcol= MOD_rc[0].left; - ModifyMenu( hmenu, 0, MF_BYCOMMAND| MF_OWNERDRAW| MF_SEPARATOR, 0, 0); - /* display the menu */ - TrackPopupMenu( hmenu, TPM_RETURNCMD, 100,100, 0, hwnd, NULL); - /* left should be 4 pixels less now */ - ok( leftcol == MOD_rc[0].left + 4, - "columns should be 4 pixels to the left (actual %d).\n", - leftcol - MOD_rc[0].left); - /* test width */ - ok( MOD_rc[0].right - MOD_rc[0].left == 2 * MOD_avec + MOD_SIZE, - "width of owner drawn menu item is wrong. Got %d expected %d\n", - MOD_rc[0].right - MOD_rc[0].left , 2*MOD_avec + MOD_SIZE); - /* and height */ - ok( MOD_rc[0].bottom - MOD_rc[0].top == MOD_SIZE, - "Height is incorrect. Got %d expected %d\n", - MOD_rc[0].bottom - MOD_rc[0].top, MOD_SIZE); - - /* test owner-drawn callback bitmap */ - ModifyMenu( hmenu, 1, MF_BYPOSITION | MFT_BITMAP, 1, (LPCSTR)HBMMENU_CALLBACK ); - mii.cbSize = sizeof(mii); - mii.fMask = MIIM_BITMAP | MIIM_FTYPE | MIIM_ID; - if (GetMenuItemInfoA( hmenu, 1, TRUE, &mii )) - { - ok( mii.fType == MFT_BITMAP, "wrong type %x\n", mii.fType ); - ok( mii.wID == 1, "wrong id %x\n", mii.wID ); - ok( mii.hbmpItem == HBMMENU_CALLBACK, "wrong data %p\n", mii.hbmpItem ); - } - TrackPopupMenu( hmenu, TPM_RETURNCMD, 100,100, 0, hwnd, NULL); - - /* test width/height of an ownerdraw menu bar as well */ - ret = DestroyMenu(hmenu); - ok(ret, "DestroyMenu failed with error %d\n", GetLastError()); - hmenu = CreateMenu(); - ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError()); - if( !hmenu) { DestroyWindow(hwnd);return;} - MOD_maxid=1; - for(i=0;i<2;i++) { - ret = AppendMenu( hmenu, MF_OWNERDRAW , i, 0); - ok( ret, "AppendMenu failed for %d\n", i); - } - ret = SetMenu( hwnd, hmenu); - UpdateWindow( hwnd); /* hack for wine to draw the window + menu */ - ok(ret, "SetMenu failed with error %d\n", GetLastError()); - /* test width */ - ok( MOD_rc[0].right - MOD_rc[0].left == 2 * MOD_avec + MOD_SIZE, - "width of owner drawn menu item is wrong. Got %d expected %d\n", - MOD_rc[0].right - MOD_rc[0].left , 2*MOD_avec + MOD_SIZE); - /* test hight */ - ok( MOD_rc[0].bottom - MOD_rc[0].top == GetSystemMetrics( SM_CYMENU) - 1, - "Height of owner drawn menu item is wrong. Got %d expected %d\n", - MOD_rc[0].bottom - MOD_rc[0].top, GetSystemMetrics( SM_CYMENU) - 1); - - /* clean up */ - ret = DestroyMenu(hmenu); - ok(ret, "DestroyMenu failed with error %d\n", GetLastError()); - DestroyWindow(hwnd); -} - -/* helper for test_menu_bmp_and_string() */ -static void test_mbs_help( int ispop, int hassub, int mnuopt, - HWND hwnd, int arrowwidth, int count, HBITMAP hbmp, - SIZE bmpsize, LPCSTR text, SIZE size, SIZE sc_size) -{ - BOOL ret; - HMENU hmenu, submenu; - MENUITEMINFO mii={ sizeof( MENUITEMINFO )}; - MENUINFO mi; - RECT rc; - CHAR text_copy[16]; - int hastab, expect; - int failed = 0; - - MOD_GotDrawItemMsg = FALSE; - mii.fMask = MIIM_FTYPE | MIIM_DATA | MIIM_STATE; - mii.fType = 0; - /* check the menu item unless MNS_CHECKORBMP is set */ - mii.fState = (mnuopt != 2 ? MFS_CHECKED : MFS_UNCHECKED); - mii.dwItemData =0; - MODsizes[0] = bmpsize; - hastab = 0; - if( text ) { - char *p; - mii.fMask |= MIIM_STRING; - strcpy(text_copy, text); - mii.dwTypeData = text_copy; /* structure member declared non-const */ - if( ( p = strchr( text, '\t'))) { - hastab = *(p + 1) ? 2 : 1; - } - } - /* tabs don't make sense in menubars */ - if(hastab && !ispop) return; - if( hbmp) { - mii.fMask |= MIIM_BITMAP; - mii.hbmpItem = hbmp; - } - submenu = CreateMenu(); - ok( submenu != 0, "CreateMenu failed with error %d\n", GetLastError()); - if( ispop) - hmenu = CreatePopupMenu(); - else - hmenu = CreateMenu(); - ok( hmenu != 0, "Create{Popup}Menu failed with error %d\n", GetLastError()); - if( hassub) { - mii.fMask |= MIIM_SUBMENU; - mii.hSubMenu = submenu; - } - if( mnuopt) { - mi.cbSize = sizeof(mi); - mi.fMask = MIM_STYLE; - pGetMenuInfo( hmenu, &mi); - if( mnuopt) mi.dwStyle |= mnuopt == 1 ? MNS_NOCHECK : MNS_CHECKORBMP; - ret = pSetMenuInfo( hmenu, &mi); - ok( ret, "SetMenuInfo failed with error %d\n", GetLastError()); - } - ret = InsertMenuItem( hmenu, 0, FALSE, &mii); - ok( ret, "InsertMenuItem failed with error %d\n", GetLastError()); - failed = !ret; - if( winetest_debug) { - HDC hdc=GetDC(hwnd); - RECT rc = {100, 50, 400, 70}; - char buf[100]; - - sprintf( buf,"%d text \"%s\" mnuopt %d", count, text ? text: "(nil)", mnuopt); - FillRect( hdc, &rc, (HBRUSH) COLOR_WINDOW); - TextOut( hdc, 10, 50, buf, strlen( buf)); - ReleaseDC( hwnd, hdc); - } - if(ispop) - TrackPopupMenu( hmenu, TPM_RETURNCMD, 100,100, 0, hwnd, NULL); - else { - ret = SetMenu( hwnd, hmenu); - ok(ret, "SetMenu failed with error %d\n", GetLastError()); - DrawMenuBar( hwnd); - } - ret = GetMenuItemRect( hwnd, hmenu, 0, &rc); - ok(ret, "GetMenuItemRect failed with error %d\n", GetLastError()); - - if (0) /* comment out menu size checks, behavior is different in almost every Windows version */ - /* the tests should however succeed on win2000, XP and Wine (at least up to 1.1.15) */ - /* with a variety of dpis and desktop font sizes */ - { - /* check menu width */ - if( ispop) - expect = ( text || hbmp ? - 4 + (mnuopt != 1 ? GetSystemMetrics(SM_CXMENUCHECK) : 0) - : 0) + - arrowwidth + MOD_avec + (hbmp ? - ((INT_PTR)hbmp<0||(INT_PTR)hbmp>12 ? bmpsize.cx + 2 : GetSystemMetrics( SM_CXMENUSIZE) + 2) - : 0) + - (text && hastab ? /* TAB space */ - MOD_avec + ( hastab==2 ? sc_size.cx : 0) : 0) + - (text ? 2 + (text[0] ? size.cx :0): 0) ; - else - expect = !(text || hbmp) ? 0 : - ( hbmp ? (text ? 2:0) + bmpsize.cx : 0 ) + - (text ? 2 * MOD_avec + (text[0] ? size.cx :0): 0) ; - ok( rc.right - rc.left == expect, - "menu width wrong, got %d expected %d\n", rc.right - rc.left, expect); - failed = failed || !(rc.right - rc.left == expect); - /* check menu height */ - if( ispop) - expect = max( ( !(text || hbmp) ? GetSystemMetrics( SM_CYMENUSIZE)/2 : 0), - max( (text ? max( 2 + size.cy, MOD_hic + 4) : 0), - (hbmp ? - ((INT_PTR)hbmp<0||(INT_PTR)hbmp>12 ? - bmpsize.cy + 2 - : GetSystemMetrics( SM_CYMENUSIZE) + 2) - : 0))); - else - expect = ( !(text || hbmp) ? GetSystemMetrics( SM_CYMENUSIZE)/2 : - max( GetSystemMetrics( SM_CYMENU) - 1, (hbmp ? bmpsize.cy : 0))); - ok( rc.bottom - rc.top == expect, - "menu height wrong, got %d expected %d (%d)\n", - rc.bottom - rc.top, expect, GetSystemMetrics( SM_CYMENU)); - failed = failed || !(rc.bottom - rc.top == expect); - if( hbmp == HBMMENU_CALLBACK && MOD_GotDrawItemMsg) { - /* check the position of the bitmap */ - /* horizontal */ - if (!ispop) - expect = 3; - else if (mnuopt == 0) - expect = 4 + GetSystemMetrics(SM_CXMENUCHECK); - else if (mnuopt == 1) - expect = 4; - else /* mnuopt == 2 */ - expect = 2; - ok( expect == MOD_rc[0].left, - "bitmap left is %d expected %d\n", MOD_rc[0].left, expect); - failed = failed || !(expect == MOD_rc[0].left); - /* vertical */ - expect = (rc.bottom - rc.top - MOD_rc[0].bottom + MOD_rc[0].top) / 2; - ok( expect == MOD_rc[0].top, - "bitmap top is %d expected %d\n", MOD_rc[0].top, expect); - failed = failed || !(expect == MOD_rc[0].top); - } - } - /* if there was a failure, report details */ - if( failed) { - trace("*** count %d %s text \"%s\" bitmap %p bmsize %d,%d textsize %d+%d,%d mnuopt %d hastab %d\n", - count, (ispop? "POPUP": "MENUBAR"),text ? text: "(nil)", hbmp, bmpsize.cx, bmpsize.cy, - size.cx, size.cy, sc_size.cx, mnuopt, hastab); - trace(" check %d,%d arrow %d avechar %d\n", - GetSystemMetrics(SM_CXMENUCHECK ), - GetSystemMetrics(SM_CYMENUCHECK ),arrowwidth, MOD_avec); - if( hbmp == HBMMENU_CALLBACK) - trace( " rc %d,%d-%d,%d bmp.rc %d,%d-%d,%d\n", - rc.left, rc.top, rc.top, rc.bottom, MOD_rc[0].left, - MOD_rc[0].top,MOD_rc[0].right, MOD_rc[0].bottom); - } - /* clean up */ - ret = DestroyMenu(submenu); - ok(ret, "DestroyMenu failed with error %d\n", GetLastError()); - ret = DestroyMenu(hmenu); - ok(ret, "DestroyMenu failed with error %d\n", GetLastError()); -} - - -static void test_menu_bmp_and_string(void) -{ - BYTE bmfill[300]; - HBITMAP hbm_arrow; - BITMAP bm; - INT arrowwidth; - HWND hwnd; - HMENU hsysmenu; - MENUINFO mi= {sizeof(MENUINFO)}; - MENUITEMINFOA mii= {sizeof(MENUITEMINFOA)}; - int count, szidx, txtidx, bmpidx, hassub, mnuopt, ispop; - BOOL got; - - if( !pGetMenuInfo) - { - win_skip("GetMenuInfo is not available\n"); - return; - } - - memset( bmfill, 0xcc, sizeof( bmfill)); - hwnd = CreateWindowEx(0, MAKEINTATOM(atomMenuCheckClass), NULL, WS_SYSMENU | - WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 200, 200, - NULL, NULL, NULL, NULL); - hbm_arrow=LoadBitmap( 0, (CHAR*)OBM_MNARROW); - GetObject( hbm_arrow, sizeof(bm), &bm); - arrowwidth = bm.bmWidth; - ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError()); - if( !hwnd) return; - /* test system menu */ - hsysmenu = GetSystemMenu( hwnd, FALSE); - ok( hsysmenu != NULL, "GetSystemMenu failed with error %d\n", GetLastError()); - mi.fMask = MIM_STYLE; - mi.dwStyle = 0; - got = pGetMenuInfo( hsysmenu, &mi); - ok( got, "GetMenuInfo failed gle=%d\n", GetLastError()); - ok( MNS_CHECKORBMP == mi.dwStyle, "System Menu Style is %08x, without the bit %08x\n", - mi.dwStyle, MNS_CHECKORBMP); - mii.fMask = MIIM_BITMAP; - mii.hbmpItem = NULL; - got = GetMenuItemInfoA( hsysmenu, SC_CLOSE, FALSE, &mii); - ok( got, "GetMenuItemInfoA failed gle=%d\n", GetLastError()); - ok( HBMMENU_POPUP_CLOSE == mii.hbmpItem, "Item info did not get the right hbitmap: got %p expected %p\n", - mii.hbmpItem, HBMMENU_POPUP_CLOSE); - - SetWindowLongPtr( hwnd, GWLP_WNDPROC, (LONG_PTR)menu_ownerdraw_wnd_proc); - - if( winetest_debug) - trace(" check %d,%d arrow %d avechar %d\n", - GetSystemMetrics(SM_CXMENUCHECK ), - GetSystemMetrics(SM_CYMENUCHECK ),arrowwidth, MOD_avec); - count = 0; - MOD_maxid = 0; - for( ispop=1; ispop >= 0; ispop--){ - static SIZE bmsizes[]= { - {10,10},{38,38},{1,30},{55,5}}; - for( szidx=0; szidx < sizeof( bmsizes) / sizeof( SIZE); szidx++) { - HBITMAP hbm = CreateBitmap( bmsizes[szidx].cx, bmsizes[szidx].cy,1,1,bmfill); - HBITMAP bitmaps[] = { HBMMENU_CALLBACK, hbm, HBMMENU_POPUP_CLOSE, NULL }; - ok( hbm != 0, "CreateBitmap failed err %d\n", GetLastError()); - for( txtidx = 0; txtidx < sizeof(MOD_txtsizes)/sizeof(MOD_txtsizes[0]); txtidx++) { - for( hassub = 0; hassub < 2 ; hassub++) { /* add submenu item */ - for( mnuopt = 0; mnuopt < 3 ; mnuopt++){ /* test MNS_NOCHECK/MNS_CHECKORBMP */ - for( bmpidx = 0; bmpidx 0) continue; - /* the HBMMENU_POPUP not to test for menu bars */ - if( !ispop && - bitmaps[bmpidx] >= HBMMENU_POPUP_CLOSE && - bitmaps[bmpidx] <= HBMMENU_POPUP_MINIMIZE) continue; - if( !ispop && hassub) continue; - test_mbs_help( ispop, hassub, mnuopt, - hwnd, arrowwidth, ++count, - bitmaps[bmpidx], - bmsizes[szidx], - MOD_txtsizes[txtidx].text, - MOD_txtsizes[txtidx].size, - MOD_txtsizes[txtidx].sc_size); - } - } - } - } - DeleteObject( hbm); - } - } - /* clean up */ - DestroyWindow(hwnd); -} - -static void test_menu_add_string( void ) -{ - HMENU hmenu; - MENUITEMINFO info; - BOOL rc; - int ret; - - char string[0x80]; - char string2[0x80]; - - char strback[0x80]; - WCHAR strbackW[0x80]; - static CHAR blah[] = "blah"; - static const WCHAR expectedString[] = {'D','u','m','m','y',' ','s','t','r','i','n','g', 0}; - - hmenu = CreateMenu(); - - memset( &info, 0, sizeof info ); - info.cbSize = sizeof info; - info.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_STATE | MIIM_ID; - info.dwTypeData = blah; - info.cch = 6; - info.dwItemData = 0; - info.wID = 1; - info.fState = 0; - InsertMenuItem(hmenu, 0, TRUE, &info ); - - 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; - GetMenuItemInfo( hmenu, 0, TRUE, &info ); - - ok( !strcmp( string, "blah" ), "menu item name differed\n"); - - /* Test combination of ownerdraw and strings with GetMenuItemString(A/W) */ - strcpy(string, "Dummy string"); - memset(&info, 0x00, sizeof(info)); - info.cbSize= sizeof(MENUITEMINFO); - info.fMask= MIIM_FTYPE | MIIM_STRING; /* Set OwnerDraw + typeData */ - info.fType= MFT_OWNERDRAW; - info.dwTypeData= string; - rc = InsertMenuItem( hmenu, 0, TRUE, &info ); - ok (rc, "InsertMenuItem failed\n"); - - strcpy(string,"Garbage"); - ok (GetMenuString( hmenu, 0, strback, 99, MF_BYPOSITION), "GetMenuString on ownerdraw entry failed\n"); - ok (!strcmp( strback, "Dummy string" ), "Menu text from Ansi version incorrect\n"); - - SetLastError(0xdeadbeef); - ret = GetMenuStringW( hmenu, 0, strbackW, 99, MF_BYPOSITION ); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - win_skip("GetMenuStringW is not implemented\n"); - else - { - ok (ret, "GetMenuStringW on ownerdraw entry failed\n"); - ok (!lstrcmpW( strbackW, expectedString ), "Menu text from Unicode version incorrect\n"); - } - - /* Just change ftype to string and see what text is stored */ - memset(&info, 0x00, sizeof(info)); - info.cbSize= sizeof(MENUITEMINFO); - info.fMask= MIIM_FTYPE; /* Set string type */ - info.fType= MFT_STRING; - info.dwTypeData= (char *)0xdeadbeef; - rc = SetMenuItemInfo( hmenu, 0, TRUE, &info ); - ok (rc, "SetMenuItemInfo failed\n"); - - /* Did we keep the old dwTypeData? */ - ok (GetMenuString( hmenu, 0, strback, 99, MF_BYPOSITION), "GetMenuString on ownerdraw entry failed\n"); - ok (!strcmp( strback, "Dummy string" ), "Menu text from Ansi version incorrect\n"); - - /* Ensure change to bitmap type fails */ - memset(&info, 0x00, sizeof(info)); - info.cbSize= sizeof(MENUITEMINFO); - info.fMask= MIIM_FTYPE; /* Set as bitmap type */ - info.fType= MFT_BITMAP; - info.dwTypeData= (char *)0xdeadbee2; - rc = SetMenuItemInfo( hmenu, 0, TRUE, &info ); - ok (!rc, "SetMenuItemInfo unexpectedly worked\n"); - - /* Just change ftype back and ensure data hasn't been freed */ - info.fType= MFT_OWNERDRAW; /* Set as ownerdraw type */ - info.dwTypeData= (char *)0xdeadbee3; - rc = SetMenuItemInfo( hmenu, 0, TRUE, &info ); - ok (rc, "SetMenuItemInfo failed\n"); - - /* Did we keep the old dwTypeData? */ - ok (GetMenuString( hmenu, 0, strback, 99, MF_BYPOSITION), "GetMenuString on ownerdraw entry failed\n"); - ok (!strcmp( strback, "Dummy string" ), "Menu text from Ansi version incorrect\n"); - - /* Just change string value (not type) */ - memset(&info, 0x00, sizeof(info)); - info.cbSize= sizeof(MENUITEMINFO); - info.fMask= MIIM_STRING; /* Set typeData */ - strcpy(string2, "string2"); - info.dwTypeData= string2; - rc = SetMenuItemInfo( hmenu, 0, TRUE, &info ); - ok (rc, "SetMenuItemInfo failed\n"); - - ok (GetMenuString( hmenu, 0, strback, 99, MF_BYPOSITION), "GetMenuString on ownerdraw entry failed\n"); - ok (!strcmp( strback, "string2" ), "Menu text from Ansi version incorrect\n"); - - /* crashes with wine 0.9.5 */ - memset(&info, 0x00, sizeof(info)); - info.cbSize= sizeof(MENUITEMINFO); - info.fMask= MIIM_FTYPE | MIIM_STRING; /* Set OwnerDraw + typeData */ - info.fType= MFT_OWNERDRAW; - rc = InsertMenuItem( hmenu, 0, TRUE, &info ); - ok (rc, "InsertMenuItem failed\n"); - ok (!GetMenuString( hmenu, 0, NULL, 0, MF_BYPOSITION), - "GetMenuString on ownerdraw entry succeeded.\n"); - SetLastError(0xdeadbeef); - ret = GetMenuStringW( hmenu, 0, NULL, 0, MF_BYPOSITION); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - win_skip("GetMenuStringW is not implemented\n"); - else - ok (!ret, "GetMenuStringW on ownerdraw entry succeeded.\n"); - - DestroyMenu( hmenu ); -} - -/* define building blocks for the menu item info tests */ -static 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; -} - -static WCHAR *strcpyW( WCHAR *dst, const WCHAR *src ) -{ - WCHAR *p = dst; - while ((*p++ = *src++)); - return dst; -} - -static void insert_menu_item( int line, HMENU hmenu, BOOL ansi, UINT mask, UINT type, UINT state, UINT id, - HMENU submenu, HBITMAP checked, HBITMAP unchecked, ULONG_PTR data, - void *type_data, UINT len, HBITMAP item, BOOL expect ) -{ - MENUITEMINFOA info; - BOOL ret; - - /* magic bitmap handle to test smaller cbSize */ - if (item == (HBITMAP)(ULONG_PTR)0xdeadbeef) - info.cbSize = FIELD_OFFSET(MENUITEMINFOA,hbmpItem); - else - info.cbSize = sizeof(info); - info.fMask = mask; - info.fType = type; - info.fState = state; - info.wID = id; - info.hSubMenu = submenu; - info.hbmpChecked = checked; - info.hbmpUnchecked = unchecked; - info.dwItemData = data; - info.dwTypeData = type_data; - info.cch = len; - info.hbmpItem = item; - SetLastError( 0xdeadbeef ); - if (ansi) ret = InsertMenuItemA( hmenu, 0, TRUE, &info ); - else ret = InsertMenuItemW( hmenu, 0, TRUE, (MENUITEMINFOW*)&info ); - if (!expect) ok_(__FILE__, line)( !ret, "InsertMenuItem should have failed.\n" ); - else ok_(__FILE__, line)( ret, "InsertMenuItem failed, err %u\n", GetLastError()); -} - -static void check_menu_item_info( int line, HMENU hmenu, BOOL ansi, UINT mask, UINT type, UINT state, - UINT id, HMENU submenu, HBITMAP checked, HBITMAP unchecked, - ULONG_PTR data, void *type_data, UINT in_len, UINT out_len, - HBITMAP item, LPCSTR expname, BOOL expect, BOOL expstring ) -{ - MENUITEMINFOA info; - BOOL ret; - WCHAR buffer[80]; - - SetLastError( 0xdeadbeef ); - memset( &info, 0xcc, sizeof(info) ); - info.cbSize = sizeof(info); - info.fMask = mask; - info.dwTypeData = type_data; - info.cch = in_len; - - ret = ansi ? GetMenuItemInfoA( hmenu, 0, TRUE, &info ) : - GetMenuItemInfoW( hmenu, 0, TRUE, (MENUITEMINFOW *)&info ); - if (!expect) - { - ok_(__FILE__, line)( !ret, "GetMenuItemInfo should have failed.\n" ); - return; - } - ok_(__FILE__, line)( ret, "GetMenuItemInfo failed, err %u\n", GetLastError()); - if (mask & MIIM_TYPE) - ok_(__FILE__, line)( info.fType == type || info.fType == LOWORD(type), - "wrong type %x/%x\n", info.fType, type ); - if (mask & MIIM_STATE) - ok_(__FILE__, line)( info.fState == state || info.fState == LOWORD(state), - "wrong state %x/%x\n", info.fState, state ); - if (mask & MIIM_ID) - ok_(__FILE__, line)( info.wID == id || info.wID == LOWORD(id), - "wrong id %x/%x\n", info.wID, id ); - if (mask & MIIM_SUBMENU) - ok_(__FILE__, line)( info.hSubMenu == submenu || (ULONG_PTR)info.hSubMenu == LOWORD(submenu), - "wrong submenu %p/%p\n", info.hSubMenu, submenu ); - if (mask & MIIM_CHECKMARKS) - { - ok_(__FILE__, line)( info.hbmpChecked == checked || (ULONG_PTR)info.hbmpChecked == LOWORD(checked), - "wrong bmpchecked %p/%p\n", info.hbmpChecked, checked ); - ok_(__FILE__, line)( info.hbmpUnchecked == unchecked || (ULONG_PTR)info.hbmpUnchecked == LOWORD(unchecked), - "wrong bmpunchecked %p/%p\n", info.hbmpUnchecked, unchecked ); - } - if (mask & MIIM_DATA) - ok_(__FILE__, line)( info.dwItemData == data || info.dwItemData == LOWORD(data), - "wrong item data %lx/%lx\n", info.dwItemData, data ); - if (mask & MIIM_BITMAP) - ok_(__FILE__, line)( info.hbmpItem == item || (ULONG_PTR)info.hbmpItem == LOWORD(item), - "wrong bmpitem %p/%p\n", info.hbmpItem, item ); - ok_(__FILE__, line)( info.dwTypeData == type_data || (ULONG_PTR)info.dwTypeData == LOWORD(type_data), - "wrong type data %p/%p\n", info.dwTypeData, type_data ); - ok_(__FILE__, line)( info.cch == out_len || - broken(! ansi && info.cch == 2 * out_len) /* East-Asian */, - "wrong len %x/%x\n", info.cch, out_len ); - if (expname) - { - if(ansi) - ok_(__FILE__, line)( !strncmp( expname, info.dwTypeData, out_len ), - "menu item name differed from '%s' '%s'\n", expname, info.dwTypeData ); - else - ok_(__FILE__, line)( !strncmpW( (WCHAR *)expname, (WCHAR *)info.dwTypeData, out_len ), - "menu item name wrong\n" ); - - SetLastError( 0xdeadbeef ); - ret = ansi ? GetMenuStringA( hmenu, 0, (char *)buffer, 80, MF_BYPOSITION ) : - GetMenuStringW( hmenu, 0, buffer, 80, MF_BYPOSITION ); - if (expstring) - ok_(__FILE__, line)( ret, "GetMenuString failed, err %u\n", GetLastError()); - else - ok_(__FILE__, line)( !ret, "GetMenuString should have failed\n" ); - } -} - -static void modify_menu( int line, HMENU hmenu, BOOL ansi, UINT flags, UINT_PTR id, void *data ) -{ - BOOL ret; - - SetLastError( 0xdeadbeef ); - if (ansi) ret = ModifyMenuA( hmenu, 0, flags, id, data ); - else ret = ModifyMenuW( hmenu, 0, flags, id, data ); - ok_(__FILE__,line)( ret, "ModifyMenuA failed, err %u\n", GetLastError()); -} - -static void set_menu_item_info( int line, HMENU hmenu, BOOL ansi, UINT mask, UINT type, UINT state, - UINT id, HMENU submenu, HBITMAP checked, HBITMAP unchecked, ULONG_PTR data, - void *type_data, UINT len, HBITMAP item ) - -{ - MENUITEMINFOA info; - BOOL ret; - - /* magic bitmap handle to test smaller cbSize */ - if (item == (HBITMAP)(ULONG_PTR)0xdeadbeef) - info.cbSize = FIELD_OFFSET(MENUITEMINFOA,hbmpItem); - else - info.cbSize = sizeof(info); - info.fMask = mask; - info.fType = type; - info.fState = state; - info.wID = id; - info.hSubMenu = submenu; - info.hbmpChecked = checked; - info.hbmpUnchecked = unchecked; - info.dwItemData = data; - info.dwTypeData = type_data; - info.cch = len; - info.hbmpItem = item; - SetLastError( 0xdeadbeef ); - if (ansi) ret = SetMenuItemInfoA( hmenu, 0, TRUE, &info ); - else ret = SetMenuItemInfoW( hmenu, 0, TRUE, (MENUITEMINFOW*)&info ); - ok_(__FILE__, line)( ret, "SetMenuItemInfo failed, err %u\n", GetLastError()); -} - -#define TMII_INSMI( c1,d1,e1,f1,g1,h1,i1,j1,k1,l1,m1,eret1 )\ - hmenu = CreateMenu();\ - submenu = CreateMenu();\ - if(ansi)strcpy( string, init );\ - else strcpyW( string, init );\ - insert_menu_item( __LINE__, hmenu, ansi, c1, d1, e1, f1, g1, h1, i1, j1, k1, l1, m1, eret1 ) - -/* GetMenuItemInfo + GetMenuString */ -#define TMII_GMII( c2,l2,\ - d3,e3,f3,g3,h3,i3,j3,k3,l3,m3,\ - expname, eret2, eret3)\ - check_menu_item_info( __LINE__, hmenu, ansi, c2, d3, e3, f3, g3, h3, i3, j3, k3, l2, l3, m3, \ - expname, eret2, eret3 ) - -#define TMII_DONE \ - RemoveMenu(hmenu, 0, TRUE );\ - DestroyMenu( hmenu );\ - DestroyMenu( submenu ); - -/* modify menu */ -#define TMII_MODM( flags, id, data ) \ - modify_menu( __LINE__, hmenu, ansi, flags, id, data ) - -/* SetMenuItemInfo */ -#define TMII_SMII( c1,d1,e1,f1,g1,h1,i1,j1,k1,l1,m1 ) \ - set_menu_item_info( __LINE__, hmenu, ansi, c1, d1, e1, f1, g1, h1, i1, j1, k1, l1, m1 ) - - -#define OK 1 -#define ER 0 - - -static void test_menu_iteminfo( void ) -{ - int ansi = TRUE; - char txtA[]="wine"; - char initA[]="XYZ"; - char emptyA[]=""; - WCHAR txtW[]={'W','i','n','e',0}; - WCHAR initW[]={'X','Y','Z',0}; - WCHAR emptyW[]={0}; - void *txt, *init, *empty, *string; - HBITMAP hbm = CreateBitmap(1,1,1,1,NULL); - char stringA[0x80]; - HMENU hmenu, submenu; - HBITMAP dummy_hbm = (HBITMAP)(ULONG_PTR)0xdeadbeef; - - do { - if( ansi) {txt=txtA;init=initA;empty=emptyA;string=stringA;} - else {txt=txtW;init=initW;empty=emptyW;string=stringA;} - trace( "%s string %p hbm %p txt %p\n", ansi ? "ANSI tests: " : "Unicode tests:", string, hbm, txt); - /* test all combinations of MFT_STRING, MFT_OWNERDRAW and MFT_BITMAP */ - /* (since MFT_STRING is zero, there are four of them) */ - TMII_INSMI( MIIM_TYPE, MFT_STRING, 0, 0, 0, 0, 0, 0, txt, 0, 0, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_STRING, 0, 0, 0, 0, 0, 0, string, 4, 0, - txt, OK, OK ); - TMII_DONE - TMII_INSMI( MIIM_TYPE, MFT_STRING|MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, txt, 0, 0, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_STRING|MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, 0, 0, 0, - NULL, OK, ER ); - TMII_DONE - TMII_INSMI( MIIM_TYPE, MFT_BITMAP, -1, -1, 0, 0, 0, -1, hbm, 6, 0, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_BITMAP, 0, 0, 0, 0, 0, 0, hbm, 0, hbm, - NULL, OK, ER ); - TMII_DONE - TMII_INSMI( MIIM_TYPE, MFT_BITMAP|MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, hbm, 6, 0, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_BITMAP|MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, hbm, 0, hbm, - NULL, OK, ER ); - TMII_DONE - /* not enough space for name*/ - TMII_INSMI( MIIM_TYPE, MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 6, 0, OK ); - TMII_GMII ( MIIM_TYPE, 0, - MFT_STRING, 0, 0, 0, 0, 0, 0, NULL, 4, 0, - NULL, OK, OK ); - TMII_DONE - TMII_INSMI( MIIM_TYPE, MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 6, 0, OK ); - TMII_GMII ( MIIM_TYPE, 5, - MFT_STRING, 0, 0, 0, 0, 0, 0, string, 4, 0, - txt, OK, OK ); - TMII_DONE - TMII_INSMI( MIIM_TYPE, MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 6, 0, OK ); - TMII_GMII ( MIIM_TYPE, 4, - MFT_STRING, 0, 0, 0, 0, 0, 0, string, 3, 0, - txt, OK, OK ); - TMII_DONE - TMII_INSMI( MIIM_FTYPE|MIIM_STRING, MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, NULL, 0, 0, OK ); - TMII_GMII ( MIIM_TYPE, 0, - MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, NULL, 0, 0, - NULL, OK, ER ); - TMII_DONE - /* cannot combine MIIM_TYPE with some other flags */ - TMII_INSMI( MIIM_TYPE|MIIM_STRING, MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 6, 0, ER ); - TMII_DONE - TMII_INSMI( MIIM_TYPE, MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 6, 0, OK ); - TMII_GMII ( MIIM_TYPE|MIIM_STRING, 80, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - NULL, ER, OK ); - TMII_DONE - TMII_INSMI( MIIM_TYPE|MIIM_FTYPE, MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 6, 0, ER ); - TMII_DONE - TMII_INSMI( MIIM_TYPE, MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 6, 0, OK ); - TMII_GMII ( MIIM_TYPE|MIIM_FTYPE, 80, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - NULL, ER, OK ); - TMII_DONE - TMII_INSMI( MIIM_TYPE|MIIM_BITMAP, MFT_BITMAP, -1, -1, 0, 0, 0, -1, hbm, 6, hbm, ER ); - TMII_DONE - /* but succeeds with some others */ - TMII_INSMI( MIIM_TYPE, MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 6, 0, OK ); - TMII_GMII ( MIIM_TYPE|MIIM_SUBMENU, 80, - MFT_STRING, 0, 0, 0, 0, 0, 0, string, 4, 0, - txt, OK, OK ); - TMII_DONE - TMII_INSMI( MIIM_TYPE, MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 6, 0, OK ); - TMII_GMII ( MIIM_TYPE|MIIM_STATE, 80, - MFT_STRING, 0, 0, 0, 0, 0, 0, string, 4, 0, - txt, OK, OK ); - TMII_DONE - TMII_INSMI( MIIM_TYPE|MIIM_ID, MFT_STRING, -1, 888, 0, 0, 0, -1, txt, 6, 0, OK ); - TMII_GMII ( MIIM_TYPE|MIIM_ID, 80, - MFT_STRING, 0, 888, 0, 0, 0, 0, string, 4, 0, - txt, OK, OK ); - TMII_DONE - TMII_INSMI( MIIM_TYPE|MIIM_DATA, MFT_STRING, -1, -1, 0, 0, 0, 999, txt, 6, 0, OK ); - TMII_GMII ( MIIM_TYPE|MIIM_DATA, 80, - MFT_STRING, 0, 0, 0, 0, 0, 999, string, 4, 0, - txt, OK, OK ); - TMII_DONE - /* to be continued */ - /* set text with MIIM_TYPE and retrieve with MIIM_STRING */ - TMII_INSMI( MIIM_TYPE, MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 6, 0, OK ); - TMII_GMII ( MIIM_STRING|MIIM_FTYPE, 80, - MFT_STRING, 0, 0, 0, 0, 0, 0, string, 4, 0, - txt, OK, OK ); - TMII_DONE - /* set text with MIIM_TYPE and retrieve with MIIM_STRING; MFT_OWNERDRAW causes an empty string */ - TMII_INSMI( MIIM_TYPE, MFT_STRING|MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, txt, 6, 0, OK ); - TMII_GMII ( MIIM_STRING|MIIM_FTYPE, 80, - MFT_STRING|MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, string, 0, 0, - empty, OK, ER ); - TMII_DONE - TMII_INSMI( MIIM_TYPE, MFT_STRING|MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, NULL, 0, 0, OK ); - TMII_GMII ( MIIM_STRING|MIIM_FTYPE, 80, - MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, string, 0, 0, - empty, OK, ER ); - TMII_DONE - TMII_INSMI( MIIM_TYPE, MFT_STRING|MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, NULL, 0, 0, OK ); - TMII_GMII ( MIIM_FTYPE, 80, - MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, string, 80, 0, - init, OK, ER ); - TMII_DONE - TMII_INSMI( MIIM_TYPE, MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 0, 0, OK ); - TMII_GMII ( 0, 80, - 0, 0, 0, 0, 0, 0, 0, string, 80, 0, - init, OK, OK ); - TMII_DONE - /* contrary to MIIM_TYPE,you can set the text for an owner draw menu */ - TMII_INSMI( MIIM_STRING|MIIM_FTYPE, MFT_STRING|MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, txt, 0, 0, OK ); - TMII_GMII ( MIIM_STRING|MIIM_FTYPE, 80, - MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, string, 4, 0, - txt, OK, OK ); - TMII_DONE - /* same but retrieve with MIIM_TYPE */ - TMII_INSMI( MIIM_STRING|MIIM_FTYPE, MFT_STRING|MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, txt, 0, 0, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, NULL, 4, NULL, - NULL, OK, OK ); - TMII_DONE - TMII_INSMI( MIIM_STRING|MIIM_FTYPE, MFT_STRING|MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, NULL, 0, 0, OK ); - TMII_GMII ( MIIM_STRING|MIIM_FTYPE, 80, - MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, string, 0, 0, - empty, OK, ER ); - TMII_DONE - TMII_INSMI( MIIM_STRING|MIIM_FTYPE, MFT_STRING, -1, -1, 0, 0, 0, -1, NULL, 0, 0, OK ); - TMII_GMII ( MIIM_STRING|MIIM_FTYPE, 80, - MFT_SEPARATOR, 0, 0, 0, 0, 0, 0, string, 0, 0, - empty, OK, ER ); - TMII_DONE - - /* How is that with bitmaps? */ - TMII_INSMI( MIIM_BITMAP, -1, -1, -1, 0, 0, 0, -1, 0, -1, hbm, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_BITMAP, 0, 0, 0, 0, 0, 0, hbm, 0, hbm, - NULL, OK, ER ); - TMII_DONE - TMII_INSMI( MIIM_BITMAP, -1, -1, -1, 0, 0, 0, -1, 0, -1, hbm, OK ); - TMII_GMII ( MIIM_BITMAP|MIIM_FTYPE, 80, - 0, 0, 0, 0, 0, 0, 0, string, 80, hbm, - init, OK, ER ); - TMII_DONE - /* MIIM_BITMAP does not like MFT_BITMAP */ - TMII_INSMI( MIIM_BITMAP|MIIM_FTYPE, MFT_BITMAP, -1, -1, 0, 0, 0, -1, 0, -1, hbm, ER ); - TMII_DONE - /* no problem with OWNERDRAWN */ - TMII_INSMI( MIIM_BITMAP|MIIM_FTYPE, MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, 0, -1, hbm, OK ); - TMII_GMII ( MIIM_BITMAP|MIIM_FTYPE, 80, - MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, string, 80, hbm, - init, OK, ER ); - TMII_DONE - /* setting MFT_BITMAP with MFT_FTYPE fails anyway */ - TMII_INSMI( MIIM_FTYPE, MFT_BITMAP, -1, -1, 0, 0, 0, -1, 0, -1, 0, ER ); - TMII_DONE - - /* menu with submenu */ - TMII_INSMI( MIIM_SUBMENU|MIIM_FTYPE, MFT_STRING, -1, -1, submenu, 0, 0, -1, txt, 0, 0, OK ); - TMII_GMII ( MIIM_SUBMENU, 80, - 0, 0, 0, submenu, 0, 0, 0, string, 80, 0, - init, OK, ER ); - TMII_DONE - TMII_INSMI( MIIM_SUBMENU|MIIM_FTYPE, MFT_STRING, -1, -1, submenu, 0, 0, -1, empty, 0, 0, OK ); - TMII_GMII ( MIIM_SUBMENU, 80, - 0, 0, 0, submenu, 0, 0, 0, string, 80, 0, - init, OK, ER ); - TMII_DONE - /* menu with submenu, without MIIM_SUBMENU the submenufield is cleared */ - TMII_INSMI( MIIM_SUBMENU|MIIM_FTYPE, MFT_STRING, -1, -1, submenu, 0, 0, -1, txt, 0, 0, OK ); - TMII_GMII ( MIIM_STRING|MIIM_FTYPE, 80, - MFT_STRING|MFT_SEPARATOR, 0, 0, 0, 0, 0, 0, string, 0, 0, - empty, OK, ER ); - TMII_GMII ( MIIM_SUBMENU|MIIM_FTYPE, 80, - MFT_SEPARATOR, 0, 0, submenu, 0, 0, 0, string, 80, 0, - empty, OK, ER ); - TMII_DONE - /* menu with invalid submenu */ - TMII_INSMI( MIIM_SUBMENU|MIIM_FTYPE, MFT_STRING, -1, -1, (HMENU)999, 0, 0, -1, txt, 0, 0, ER ); - TMII_DONE - /* Separator */ - TMII_INSMI( MIIM_TYPE, MFT_SEPARATOR, 0, 0, 0, 0, 0, 0, txt, 0, 0, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_SEPARATOR, 0, 0, 0, 0, 0, 0, 0, 0, 0, - NULL, OK, ER ); - TMII_DONE - TMII_INSMI( MIIM_TYPE, MFT_BITMAP|MFT_SEPARATOR, -1, -1, 0, 0, 0, -1, hbm, 6, 0, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_BITMAP|MFT_SEPARATOR, 0, 0, 0, 0, 0, 0, hbm, 0, hbm, - NULL, OK, ER ); - TMII_DONE - /* SEPARATOR and STRING go well together */ - /* BITMAP and STRING go well together */ - TMII_INSMI( MIIM_STRING|MIIM_BITMAP, -1, -1, -1, 0, 0, 0, -1, txt, 6, hbm, OK ); - TMII_GMII ( MIIM_FTYPE|MIIM_STRING|MIIM_BITMAP, 80, - MFT_STRING, 0, 0, 0, 0, 0, 0, string, 4, hbm, - txt, OK, OK ); - TMII_DONE - /* BITMAP, SEPARATOR and STRING go well together */ - TMII_INSMI( MIIM_FTYPE|MIIM_STRING|MIIM_BITMAP, MFT_SEPARATOR, -1, -1, 0, 0, 0, -1, txt, 6, hbm, OK ); - TMII_GMII ( MIIM_FTYPE|MIIM_STRING|MIIM_BITMAP, 80, - MFT_SEPARATOR, 0, 0, 0, 0, 0, 0, string, 4, hbm, - txt, OK, OK ); - TMII_DONE - /* last two tests, but use MIIM_TYPE to retrieve info */ - TMII_INSMI( MIIM_FTYPE|MIIM_STRING, MFT_SEPARATOR, -1, -1, 0, 0, 0, -1, txt, 6, 0, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_SEPARATOR, 0, 0, 0, 0, 0, 0, NULL, 4, NULL, - NULL, OK, OK ); - TMII_DONE - TMII_INSMI( MIIM_STRING|MIIM_BITMAP, -1, -1, -1, 0, 0, 0, -1, txt, 6, hbm, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_BITMAP, 0, 0, 0, 0, 0, 0, hbm, 4, hbm, - NULL, OK, OK ); - TMII_DONE - TMII_INSMI( MIIM_FTYPE|MIIM_STRING|MIIM_BITMAP, MFT_SEPARATOR, -1, -1, 0, 0, 0, -1, txt, 6, hbm, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_SEPARATOR|MFT_BITMAP, 0, 0, 0, 0, 0, 0, hbm, 4, hbm, - NULL, OK, OK ); - TMII_DONE - /* same three with MFT_OWNERDRAW */ - TMII_INSMI( MIIM_FTYPE|MIIM_STRING, MFT_SEPARATOR|MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, txt, 6, 0, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_SEPARATOR|MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, NULL, 4, NULL, - NULL, OK, OK ); - TMII_DONE - TMII_INSMI( MIIM_FTYPE|MIIM_STRING|MIIM_BITMAP, MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, txt, 6, hbm, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_BITMAP|MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, hbm, 4, hbm, - NULL, OK, OK ); - TMII_DONE - TMII_INSMI( MIIM_FTYPE|MIIM_STRING|MIIM_BITMAP, MFT_SEPARATOR|MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, txt, 6, hbm, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_SEPARATOR|MFT_BITMAP|MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, hbm, 4, hbm, - NULL, OK, OK ); - TMII_DONE - - TMII_INSMI( MIIM_STRING|MIIM_FTYPE|MIIM_ID, MFT_STRING|MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, txt, 0, 0, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, NULL, 4, NULL, - NULL, OK, OK ); - TMII_DONE - /* test with modifymenu: string is preserved after setting OWNERDRAW */ - TMII_INSMI( MIIM_STRING, MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 0, 0, OK ); - TMII_MODM( MFT_OWNERDRAW, -1, (void*)787 ); - TMII_GMII ( MIIM_FTYPE|MIIM_STRING|MIIM_DATA, 80, - MFT_OWNERDRAW, 0, 0, 0, 0, 0, 787, string, 4, 0, - txt, OK, OK ); - TMII_DONE - /* same with bitmap: now the text is cleared */ - TMII_INSMI( MIIM_STRING, MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 0, 0, OK ); - TMII_MODM( MFT_BITMAP, 545, hbm ); - TMII_GMII ( MIIM_FTYPE|MIIM_STRING|MIIM_BITMAP|MIIM_ID, 80, - MFT_BITMAP, 0, 545, 0, 0, 0, 0, string, 0, hbm, - empty, OK, ER ); - TMII_DONE - /* start with bitmap: now setting text clears it (though he flag is raised) */ - TMII_INSMI( MIIM_BITMAP, MFT_STRING, -1, -1, 0, 0, 0, -1, 0, -1, hbm, OK ); - TMII_GMII ( MIIM_FTYPE|MIIM_STRING|MIIM_BITMAP|MIIM_ID, 80, - MFT_STRING, 0, 0, 0, 0, 0, 0, string, 0, hbm, - empty, OK, ER ); - TMII_MODM( MFT_STRING, 545, txt ); - TMII_GMII ( MIIM_FTYPE|MIIM_STRING|MIIM_BITMAP|MIIM_ID, 80, - MFT_STRING, 0, 545, 0, 0, 0, 0, string, 4, 0, - txt, OK, OK ); - TMII_DONE - /*repeat with text NULL */ - TMII_INSMI( MIIM_BITMAP, MFT_STRING, -1, -1, 0, 0, 0, -1, 0, -1, hbm, OK ); - TMII_MODM( MFT_STRING, 545, NULL ); - TMII_GMII ( MIIM_FTYPE|MIIM_STRING|MIIM_BITMAP|MIIM_ID, 80, - MFT_SEPARATOR, 0, 545, 0, 0, 0, 0, string, 0, 0, - empty, OK, ER ); - TMII_DONE - /* repeat with text "" */ - TMII_INSMI( MIIM_BITMAP, -1 , -1, -1, 0, 0, 0, -1, 0, -1, hbm, OK ); - TMII_MODM( MFT_STRING, 545, empty ); - TMII_GMII ( MIIM_FTYPE|MIIM_STRING|MIIM_BITMAP|MIIM_ID, 80, - MFT_STRING, 0, 545, 0, 0, 0, 0, string, 0, 0, - empty, OK, ER ); - TMII_DONE - /* start with bitmap: set ownerdraw */ - TMII_INSMI( MIIM_BITMAP, -1, -1, -1, 0, 0, 0, -1, 0, -1, hbm, OK ); - TMII_MODM( MFT_OWNERDRAW, -1, (void *)232 ); - TMII_GMII ( MIIM_FTYPE|MIIM_STRING|MIIM_BITMAP|MIIM_DATA, 80, - MFT_OWNERDRAW, 0, 0, 0, 0, 0, 232, string, 0, hbm, - empty, OK, ER ); - TMII_DONE - /* ask nothing */ - TMII_INSMI( MIIM_FTYPE|MIIM_STRING|MIIM_BITMAP, MFT_SEPARATOR, -1, -1, 0, 0, 0, -1, txt, 6, hbm, OK ); - TMII_GMII ( 0, 80, - 0, 0, 0, 0, 0, 0, 0, string, 80, 0, - init, OK, OK ); - TMII_DONE - /* some tests with small cbSize: the hbmpItem is to be ignored */ - TMII_INSMI( MIIM_BITMAP, -1, -1, -1, 0, 0, 0, -1, 0, -1, dummy_hbm, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_SEPARATOR, 0, 0, 0, 0, 0, 0, NULL, 0, NULL, - NULL, OK, ER ); - TMII_DONE - TMII_INSMI( MIIM_BITMAP, -1, -1, -1, 0, 0, 0, -1, 0, -1, dummy_hbm, OK ); - TMII_GMII ( MIIM_BITMAP|MIIM_FTYPE, 80, - MFT_SEPARATOR, 0, 0, 0, 0, 0, 0, string, 80, NULL, - init, OK, ER ); - TMII_DONE - TMII_INSMI( MIIM_STRING|MIIM_BITMAP, -1, -1, -1, 0, 0, 0, -1, txt, 6, dummy_hbm, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_STRING, 0, 0, 0, 0, 0, 0, string, 4, NULL, - txt, OK, OK ); - TMII_DONE - TMII_INSMI( MIIM_FTYPE|MIIM_STRING|MIIM_BITMAP, MFT_SEPARATOR, -1, -1, 0, 0, 0, -1, txt, 6, dummy_hbm, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_SEPARATOR, 0, 0, 0, 0, 0, 0, NULL, 4, NULL, - NULL, OK, OK ); - TMII_DONE - TMII_INSMI( MIIM_FTYPE|MIIM_STRING|MIIM_BITMAP, MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, txt, 6, dummy_hbm, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, NULL, 4, NULL, - NULL, OK, OK ); - TMII_DONE - TMII_INSMI( MIIM_FTYPE|MIIM_STRING|MIIM_BITMAP, MFT_SEPARATOR|MFT_OWNERDRAW, -1, -1, 0, 0, 0, -1, txt, 6, dummy_hbm, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_SEPARATOR|MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, NULL, 4, NULL, - NULL, OK, OK ); - TMII_DONE - /* MIIM_TYPE by itself does not get/set the dwItemData for OwnerDrawn menus */ - TMII_INSMI( MIIM_TYPE|MIIM_DATA, MFT_STRING|MFT_OWNERDRAW, -1, -1, 0, 0, 0, 343, txt, 0, 0, OK ); - TMII_GMII ( MIIM_TYPE|MIIM_DATA, 80, - MFT_STRING|MFT_OWNERDRAW, 0, 0, 0, 0, 0, 343, 0, 0, 0, - NULL, OK, ER ); - TMII_DONE - TMII_INSMI( MIIM_TYPE|MIIM_DATA, MFT_STRING|MFT_OWNERDRAW, -1, -1, 0, 0, 0, 343, txt, 0, 0, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_STRING|MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, 0, 0, 0, - NULL, OK, ER ); - TMII_DONE - TMII_INSMI( MIIM_TYPE, MFT_STRING|MFT_OWNERDRAW, -1, -1, 0, 0, 0, 343, txt, 0, 0, OK ); - TMII_GMII ( MIIM_TYPE|MIIM_DATA, 80, - MFT_STRING|MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, 0, 0, 0, - NULL, OK, ER ); - TMII_DONE - /* set a string menu to ownerdraw with MIIM_TYPE */ - TMII_INSMI( MIIM_TYPE, MFT_STRING, -2, -2, 0, 0, 0, -2, txt, -2, 0, OK ); - TMII_SMII ( MIIM_TYPE, MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, 0, 0, 0 ); - TMII_GMII ( MIIM_STRING|MIIM_FTYPE, 80, - MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, string, 4, 0, - txt, OK, OK ); - TMII_DONE - /* test with modifymenu add submenu */ - TMII_INSMI( MIIM_STRING, MFT_STRING, -1, -1, 0, 0, 0, -1, txt, 0, 0, OK ); - TMII_MODM( MF_POPUP, (UINT_PTR)submenu, txt ); - TMII_GMII ( MIIM_FTYPE|MIIM_STRING|MIIM_SUBMENU, 80, - MFT_STRING, 0, 0, submenu, 0, 0, 0, string, 4, 0, - txt, OK, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_STRING, 0, 0, 0, 0, 0, 0, string, 4, 0, - txt, OK, OK ); - TMII_DONE - /* MFT_SEPARATOR bit is kept when the text is added */ - TMII_INSMI( MIIM_STRING|MIIM_FTYPE, MFT_STRING, -1, -1, 0, 0, 0, -1, NULL, 0, 0, OK ); - TMII_SMII( MIIM_STRING, 0, 0, 0, 0, 0, 0, 0, txt, 0, 0 ); - TMII_GMII ( MIIM_STRING|MIIM_FTYPE, 80, - MFT_SEPARATOR, 0, 0, 0, 0, 0, 0, string, 4, 0, - txt, OK, OK ); - TMII_DONE - /* MFT_SEPARATOR bit is kept when bitmap is added */ - TMII_INSMI( MIIM_STRING|MIIM_FTYPE, MFT_STRING, -1, -1, 0, 0, 0, -1, NULL, 0, 0, OK ); - TMII_SMII( MIIM_BITMAP, 0, 0, 0, 0, 0, 0, 0, 0, 0, hbm ); - TMII_GMII ( MIIM_BITMAP|MIIM_FTYPE, 80, - MFT_SEPARATOR, 0, 0, 0, 0, 0, 0, string, 80, hbm, - init, OK, ER ); - TMII_DONE - /* Bitmaps inserted with MIIM_TYPE and MFT_BITMAP: - Only the low word of the dwTypeData is used. - Use a magic bitmap here (Word 95 uses this to create its MDI menu buttons) */ - TMII_INSMI( MIIM_TYPE, MFT_BITMAP | MFT_RIGHTJUSTIFY, -1, -1, 0, 0, 0, -1, - (HMENU)MAKELONG(HBMMENU_MBAR_CLOSE, 0x1234), -1, 0, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_BITMAP | MFT_RIGHTJUSTIFY, 0, 0, 0, 0, 0, 0, HBMMENU_MBAR_CLOSE, 0, HBMMENU_MBAR_CLOSE, - NULL, OK, OK ); - TMII_DONE - /* Type flags */ - TMII_INSMI( MIIM_TYPE, MFT_BITMAP | MFT_MENUBARBREAK | MFT_RADIOCHECK | MFT_RIGHTJUSTIFY | MFT_RIGHTORDER, -1, -1, 0, 0, 0, -1, hbm, -1, 0, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_BITMAP | MFT_MENUBARBREAK | MFT_RADIOCHECK | MFT_RIGHTJUSTIFY | MFT_RIGHTORDER, 0, 0, 0, 0, 0, 0, hbm, 0, hbm, - NULL, OK, OK ); - TMII_DONE - /* State flags */ - TMII_INSMI( MIIM_TYPE, MFT_BITMAP, -1, -1, 0, 0, 0, -1, hbm, -1, 0, OK ); - TMII_SMII( MIIM_STATE, -1, MFS_CHECKED | MFS_DEFAULT | MFS_GRAYED | MFS_HILITE, 0, 0, 0, 0, 0, 0, 0, 0 ); - TMII_GMII ( MIIM_STATE, 80, - 0, MFS_CHECKED | MFS_DEFAULT | MFS_GRAYED | MFS_HILITE, 0, 0, 0, 0, 0, 0, 80, 0, - NULL, OK, OK ); - TMII_DONE - /* The style MFT_RADIOCHECK cannot be set with MIIM_CHECKMARKS only */ - TMII_INSMI( MIIM_TYPE, MFT_BITMAP, -1, -1, 0, 0, 0, -1, hbm, -1, 0, OK ); - TMII_SMII( MIIM_CHECKMARKS, MFT_RADIOCHECK, 0, 0, 0, hbm, hbm, 0, 0, 0, 0 ); - TMII_GMII ( MIIM_CHECKMARKS | MIIM_TYPE, 80, - MFT_BITMAP, 0, 0, 0, hbm, hbm, 0, hbm, 0, hbm, - NULL, OK, OK ); - TMII_DONE - /* MFT_BITMAP is added automatically by GetMenuItemInfo() for MIIM_TYPE */ - TMII_INSMI( MIIM_TYPE, MFT_BITMAP, -1, -1, 0, 0, 0, -1, hbm, -1, 0, OK ); - TMII_SMII( MIIM_FTYPE, MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, (HBITMAP)0x1234, 0, 0 ); - TMII_GMII ( MIIM_FTYPE, 80, - MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, 0, 80, 0, - NULL, OK, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_BITMAP | MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, hbm, 0, hbm, - NULL, OK, OK ); - TMII_GMII ( MIIM_FTYPE, 80, - MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, 0, 80, 0, - NULL, OK, OK ); - TMII_SMII( MIIM_BITMAP, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, NULL, 0, NULL, - NULL, OK, OK ); - TMII_DONE - /* Bitmaps inserted with MIIM_TYPE and MFT_BITMAP: - Only the low word of the dwTypeData is used. - Use a magic bitmap here (Word 95 uses this to create its MDI menu buttons) */ - TMII_INSMI( MIIM_TYPE, MFT_BITMAP | MFT_RIGHTJUSTIFY, -1, -1, 0, 0, 0, -1, - (HMENU)MAKELONG(HBMMENU_MBAR_CLOSE, 0x1234), -1, 0, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_BITMAP | MFT_RIGHTJUSTIFY, 0, 0, 0, 0, 0, 0, HBMMENU_MBAR_CLOSE, 0, HBMMENU_MBAR_CLOSE, - NULL, OK, OK ); - TMII_DONE - /* Type flags */ - TMII_INSMI( MIIM_TYPE, MFT_BITMAP | MFT_MENUBARBREAK | MFT_RADIOCHECK | MFT_RIGHTJUSTIFY | MFT_RIGHTORDER, -1, -1, 0, 0, 0, -1, hbm, -1, 0, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_BITMAP | MFT_MENUBARBREAK | MFT_RADIOCHECK | MFT_RIGHTJUSTIFY | MFT_RIGHTORDER, 0, 0, 0, 0, 0, 0, hbm, 0, hbm, - NULL, OK, OK ); - TMII_DONE - /* State flags */ - TMII_INSMI( MIIM_TYPE, MFT_BITMAP, -1, -1, 0, 0, 0, -1, hbm, -1, 0, OK ); - TMII_SMII( MIIM_STATE, -1, MFS_CHECKED | MFS_DEFAULT | MFS_GRAYED | MFS_HILITE, 0, 0, 0, 0, 0, 0, 0, 0 ); - TMII_GMII ( MIIM_STATE, 80, - 0, MFS_CHECKED | MFS_DEFAULT | MFS_GRAYED | MFS_HILITE, 0, 0, 0, 0, 0, 0, 80, 0, - NULL, OK, OK ); - TMII_DONE - /* The style MFT_RADIOCHECK cannot be set with MIIM_CHECKMARKS only */ - TMII_INSMI( MIIM_TYPE, MFT_BITMAP, -1, -1, 0, 0, 0, -1, hbm, -1, 0, OK ); - TMII_SMII( MIIM_CHECKMARKS, MFT_RADIOCHECK, 0, 0, 0, hbm, hbm, 0, 0, 0, 0 ); - TMII_GMII ( MIIM_CHECKMARKS | MIIM_TYPE, 80, - MFT_BITMAP, 0, 0, 0, hbm, hbm, 0, hbm, 0, hbm, - NULL, OK, OK ); - TMII_DONE - /* MFT_BITMAP is added automatically by GetMenuItemInfo() for MIIM_TYPE */ - TMII_INSMI( MIIM_TYPE, MFT_BITMAP, -1, -1, 0, 0, 0, -1, hbm, -1, 0, OK ); - TMII_SMII( MIIM_FTYPE, MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, (HBITMAP)0x1234, 0, 0 ); - TMII_GMII ( MIIM_FTYPE, 80, - MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, 0, 80, 0, - NULL, OK, OK ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_BITMAP | MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, hbm, 0, hbm, - NULL, OK, OK ); - TMII_GMII ( MIIM_FTYPE, 80, - MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, 0, 80, 0, - NULL, OK, OK ); - TMII_SMII( MIIM_BITMAP, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL ); - TMII_GMII ( MIIM_TYPE, 80, - MFT_OWNERDRAW, 0, 0, 0, 0, 0, 0, NULL, 0, NULL, - NULL, OK, OK ); - TMII_DONE - } while( !(ansi = !ansi) ); - DeleteObject( hbm); -} - -/* - The following tests try to confirm the algorithm used to return the menu items - when there is a collision between a menu item and a popup menu - */ -static void test_menu_search_bycommand( void ) -{ - HMENU hmenu, hmenuSub, hmenuSub2; - MENUITEMINFO info; - BOOL rc; - UINT id; - char strback[0x80]; - char strIn[0x80]; - static CHAR menuitem[] = "MenuItem", - menuitem2[] = "MenuItem 2"; - - /* Case 1: Menu containing a menu item */ - hmenu = CreateMenu(); - - memset( &info, 0, sizeof info ); - info.cbSize = sizeof info; - info.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_ID; - info.fType = MFT_STRING; - strcpy(strIn, "Case 1 MenuItem"); - info.dwTypeData = strIn; - info.wID = (UINT) 0x1234; - - rc = InsertMenuItem(hmenu, 0, TRUE, &info ); - ok (rc, "Inserting the menuitem failed\n"); - - id = GetMenuItemID(hmenu, 0); - ok (id == 0x1234, "Getting the menuitem id failed(gave %x)\n", id); - - /* Confirm the menuitem was given the id supplied (getting by position) */ - memset( &info, 0, sizeof info ); - strback[0] = 0x00; - info.cbSize = sizeof(MENUITEMINFO); - info.fMask = MIIM_FTYPE | MIIM_ID | MIIM_STRING; - info.dwTypeData = strback; - info.cch = sizeof(strback); - - rc = GetMenuItemInfo(hmenu, 0, TRUE, &info); /* Get by position */ - ok (rc, "Getting the menu items info failed\n"); - ok (info.wID == 0x1234, "IDs differ for the menuitem\n"); - ok (!strcmp(info.dwTypeData, "Case 1 MenuItem"), "Returned item has wrong label\n"); - - /* Search by id - Should return the item */ - memset( &info, 0, sizeof info ); - strback[0] = 0x00; - info.cbSize = sizeof(MENUITEMINFO); - info.fMask = MIIM_FTYPE | MIIM_ID | MIIM_STRING; - info.dwTypeData = strback; - info.cch = sizeof(strback); - rc = GetMenuItemInfo(hmenu, 0x1234, FALSE, &info); /* Get by ID */ - - ok (rc, "Getting the menu items info failed\n"); - ok (info.wID == 0x1234, "IDs differ for the menuitem\n"); - ok (!strcmp(info.dwTypeData, "Case 1 MenuItem"), "Returned item has wrong label\n"); - - DestroyMenu( hmenu ); - - /* Case 2: Menu containing a popup menu */ - hmenu = CreateMenu(); - hmenuSub = CreateMenu(); - - strcpy(strIn, "Case 2 SubMenu"); - rc = InsertMenu(hmenu, 0, MF_BYPOSITION | MF_POPUP | MF_STRING, (UINT_PTR)hmenuSub, strIn); - ok (rc, "Inserting the popup menu into the main menu failed\n"); - - id = GetMenuItemID(hmenu, 0); - ok (id == -1, "Getting the menuitem id unexpectedly worked (gave %x)\n", id); - - /* Confirm the menuitem itself was given an id the same as the HMENU, (getting by position) */ - memset( &info, 0, sizeof info ); - strback[0] = 0x00; - info.cbSize = sizeof(MENUITEMINFO); - info.fMask = MIIM_FTYPE | MIIM_ID | MIIM_STRING; - info.dwTypeData = strback; - info.cch = sizeof(strback); - info.wID = 0xdeadbeef; - - rc = GetMenuItemInfo(hmenu, 0, TRUE, &info); /* Get by position */ - ok (rc, "Getting the menu items info failed\n"); - ok (info.wID == (UINT_PTR)hmenuSub, "IDs differ for the menuitem\n"); - ok (!strcmp(info.dwTypeData, "Case 2 SubMenu"), "Returned item has wrong label\n"); - - /* Search by id - returns the popup menu itself */ - memset( &info, 0, sizeof info ); - strback[0] = 0x00; - info.cbSize = sizeof(MENUITEMINFO); - info.fMask = MIIM_FTYPE | MIIM_ID | MIIM_STRING; - info.dwTypeData = strback; - info.cch = sizeof(strback); - rc = GetMenuItemInfo(hmenu, (UINT_PTR)hmenuSub, FALSE, &info); /* Get by ID */ - - ok (rc, "Getting the menu items info failed\n"); - ok (info.wID == (UINT_PTR)hmenuSub, "IDs differ for the popup menu\n"); - ok (!strcmp(info.dwTypeData, "Case 2 SubMenu"), "Returned item has wrong label\n"); - - /* - Now add an item after it with the same id - */ - memset( &info, 0, sizeof info ); - info.cbSize = sizeof info; - info.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_ID; - info.fType = MFT_STRING; - strcpy(strIn, "Case 2 MenuItem 1"); - info.dwTypeData = strIn; - info.wID = (UINT_PTR) hmenuSub; - rc = InsertMenuItem(hmenu, -1, TRUE, &info ); - ok (rc, "Inserting the menuitem failed\n"); - - /* Search by id - returns the item which follows the popup menu */ - memset( &info, 0, sizeof info ); - strback[0] = 0x00; - info.cbSize = sizeof(MENUITEMINFO); - info.fMask = MIIM_FTYPE | MIIM_ID | MIIM_STRING; - info.dwTypeData = strback; - info.cch = sizeof(strback); - rc = GetMenuItemInfo(hmenu, (UINT_PTR)hmenuSub, FALSE, &info); /* Get by ID */ - - ok (rc, "Getting the menu items info failed\n"); - ok (info.wID == (UINT_PTR)hmenuSub, "IDs differ for the popup menu\n"); - ok (!strcmp(info.dwTypeData, "Case 2 MenuItem 1"), "Returned item has wrong label (%s)\n", info.dwTypeData); - - /* - Now add an item before the popup (with the same id) - */ - memset( &info, 0, sizeof info ); - info.cbSize = sizeof info; - info.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_ID; - info.fType = MFT_STRING; - strcpy(strIn, "Case 2 MenuItem 2"); - info.dwTypeData = strIn; - info.wID = (UINT_PTR) hmenuSub; - rc = InsertMenuItem(hmenu, 0, TRUE, &info ); - ok (rc, "Inserting the menuitem failed\n"); - - /* Search by id - returns the item which precedes the popup menu */ - memset( &info, 0, sizeof info ); - strback[0] = 0x00; - info.cbSize = sizeof(MENUITEMINFO); - info.fMask = MIIM_FTYPE | MIIM_ID | MIIM_STRING; - info.dwTypeData = strback; - info.cch = sizeof(strback); - rc = GetMenuItemInfo(hmenu, (UINT_PTR)hmenuSub, FALSE, &info); /* Get by ID */ - - ok (rc, "Getting the menu items info failed\n"); - ok (info.wID == (UINT_PTR)hmenuSub, "IDs differ for the popup menu\n"); - ok (!strcmp(info.dwTypeData, "Case 2 MenuItem 2"), "Returned item has wrong label (%s)\n", info.dwTypeData); - - DestroyMenu( hmenu ); - DestroyMenu( hmenuSub ); - - /* - Case 3: Menu containing a popup menu which in turn - contains 2 items with the same id as the popup itself - */ - - hmenu = CreateMenu(); - hmenuSub = CreateMenu(); - - memset( &info, 0, sizeof info ); - info.cbSize = sizeof info; - info.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_ID; - info.fType = MFT_STRING; - info.dwTypeData = menuitem; - info.wID = (UINT_PTR) hmenuSub; /* Enforce id collisions with the hmenu of the popup submenu*/ - - rc = InsertMenu(hmenu, 0, MF_BYPOSITION | MF_POPUP | MF_STRING, (UINT_PTR)hmenuSub, "Submenu"); - ok (rc, "Inserting the popup menu into the main menu failed\n"); - - rc = InsertMenuItem(hmenuSub, 0, TRUE, &info ); - ok (rc, "Inserting the sub menu menuitem failed\n"); - - memset( &info, 0, sizeof info ); - info.cbSize = sizeof info; - info.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_ID; - info.fType = MFT_STRING; - info.dwTypeData = menuitem2; - info.wID = (UINT_PTR) hmenuSub; /* Enforce id collisions with the hmenu of the popup submenu*/ - - rc = InsertMenuItem(hmenuSub, 1, TRUE, &info ); - ok (rc, "Inserting the sub menu menuitem 2 failed\n"); - - /* Prove that you can't query the id of a popup directly (By position) */ - id = GetMenuItemID(hmenu, 0); - ok (id == -1, "Getting the sub menu id should have failed because its a popup (gave %x)\n", id); - - /* Prove getting the item info via ID returns the first item (not the popup or 2nd item)*/ - memset( &info, 0, sizeof info ); - strback[0] = 0x00; - info.cbSize = sizeof(MENUITEMINFO); - info.fMask = MIIM_STRING | MIIM_ID; - info.dwTypeData = strback; - info.cch = sizeof(strback); - - rc = GetMenuItemInfo(hmenu, (UINT_PTR)hmenuSub, FALSE, &info); - ok (rc, "Getting the menus info failed\n"); - ok (info.wID == (UINT_PTR)hmenuSub, "IDs differ for popup menu\n"); - ok (!strcmp(info.dwTypeData, "MenuItem"), "Returned item has wrong label (%s)\n", info.dwTypeData); - DestroyMenu( hmenu ); - DestroyMenu( hmenuSub ); - - /* - Case 4: Menu containing 2 popup menus, the second - contains 2 items with the same id as the first popup menu - */ - hmenu = CreateMenu(); - hmenuSub = CreateMenu(); - hmenuSub2 = CreateMenu(); - - rc = InsertMenu(hmenu, 0, MF_BYPOSITION | MF_POPUP | MF_STRING, (UINT_PTR)hmenuSub, "Submenu"); - ok (rc, "Inserting the popup menu into the main menu failed\n"); - - rc = InsertMenu(hmenu, 1, MF_BYPOSITION | MF_POPUP | MF_STRING, (UINT_PTR)hmenuSub2, "Submenu2"); - ok (rc, "Inserting the popup menu into the main menu failed\n"); - - memset( &info, 0, sizeof info ); - info.cbSize = sizeof info; - info.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_ID; - info.fType = MFT_STRING; - info.dwTypeData = menuitem; - info.wID = (UINT_PTR) hmenuSub; /* Enforce id collisions with the hmenu of the popup submenu*/ - - rc = InsertMenuItem(hmenuSub2, 0, TRUE, &info ); - ok (rc, "Inserting the sub menu menuitem failed\n"); - - memset( &info, 0, sizeof info ); - info.cbSize = sizeof info; - info.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_ID; - info.fType = MFT_STRING; - info.dwTypeData = menuitem2; - info.wID = (UINT_PTR) hmenuSub; /* Enforce id collisions with the hmenu of the popup submenu*/ - - rc = InsertMenuItem(hmenuSub2, 1, TRUE, &info ); - ok (rc, "Inserting the sub menu menuitem 2 failed\n"); - - /* Prove getting the item info via ID returns the first item (not the popup or 2nd item)*/ - memset( &info, 0, sizeof info ); - strback[0] = 0x00; - info.cbSize = sizeof(MENUITEMINFO); - info.fMask = MIIM_STRING | MIIM_ID; - info.dwTypeData = strback; - info.cch = sizeof(strback); - - rc = GetMenuItemInfo(hmenu, (UINT_PTR)hmenuSub, FALSE, &info); - ok (rc, "Getting the menus info failed\n"); - ok (info.wID == (UINT_PTR)hmenuSub, "IDs differ for popup menu\n"); - ok (!strcmp(info.dwTypeData, "MenuItem"), "Returned item has wrong label (%s)\n", info.dwTypeData); - - memset( &info, 0, sizeof info ); - strback[0] = 0x00; - info.cbSize = sizeof(MENUITEMINFO); - info.fMask = MIIM_STRING | MIIM_ID; - info.dwTypeData = strback; - info.cch = sizeof(strback); - - rc = GetMenuItemInfo(hmenu, (UINT_PTR)hmenuSub2, FALSE, &info); - ok (rc, "Getting the menus info failed\n"); - ok (info.wID == (UINT_PTR)hmenuSub2, "IDs differ for popup menu\n"); - ok (!strcmp(info.dwTypeData, "Submenu2"), "Returned item has wrong label (%s)\n", info.dwTypeData); - - DestroyMenu( hmenu ); - DestroyMenu( hmenuSub ); - DestroyMenu( hmenuSub2 ); - - - /* - Case 5: Menu containing a popup menu which in turn - contains an item with a different id than the popup menu. - This tests the fallback to a popup menu ID. - */ - - hmenu = CreateMenu(); - hmenuSub = CreateMenu(); - - rc = AppendMenu(hmenu, MF_POPUP | MF_STRING, (UINT_PTR)hmenuSub, "Submenu"); - ok (rc, "Appending the popup menu to the main menu failed\n"); - - rc = AppendMenu(hmenuSub, MF_STRING, 102, "Item"); - ok (rc, "Appending the item to the popup menu failed\n"); - - /* Set the ID for hmenuSub */ - info.cbSize = sizeof(info); - info.fMask = MIIM_ID; - info.wID = 101; - - rc = SetMenuItemInfo(hmenu, 0, TRUE, &info); - ok(rc, "Setting the ID for the popup menu failed\n"); - - /* Check if the ID has been set */ - info.wID = 0; - rc = GetMenuItemInfo(hmenu, 0, TRUE, &info); - ok(rc, "Getting the ID for the popup menu failed\n"); - ok(info.wID == 101, "The ID for the popup menu has not been set\n"); - - /* Prove getting the item info via ID returns the popup menu */ - memset( &info, 0, sizeof(info)); - strback[0] = 0x00; - info.cbSize = sizeof(MENUITEMINFO); - info.fMask = MIIM_STRING | MIIM_ID; - info.dwTypeData = strback; - info.cch = sizeof(strback); - - rc = GetMenuItemInfo(hmenu, 101, FALSE, &info); - ok (rc, "Getting the menu info failed\n"); - ok (info.wID == 101, "IDs differ\n"); - ok (!strcmp(info.dwTypeData, "Submenu"), "Returned item has wrong label (%s)\n", info.dwTypeData); - - /* Also look for the menu item */ - memset( &info, 0, sizeof(info)); - strback[0] = 0x00; - info.cbSize = sizeof(MENUITEMINFO); - info.fMask = MIIM_STRING | MIIM_ID; - info.dwTypeData = strback; - info.cch = sizeof(strback); - - rc = GetMenuItemInfo(hmenu, 102, FALSE, &info); - ok (rc, "Getting the menu info failed\n"); - ok (info.wID == 102, "IDs differ\n"); - ok (!strcmp(info.dwTypeData, "Item"), "Returned item has wrong label (%s)\n", info.dwTypeData); - - DestroyMenu(hmenu); - DestroyMenu(hmenuSub); -} - -struct menu_item_pair_s { - UINT uMenu; /* 1 - top level menu, [0-Menu 1-Enabled 2-Disabled] - * 2 - 2nd level menu, [0-Popup 1-Enabled 2-Disabled] - * 3 - 3rd level menu, [0-Enabled 1-Disabled] */ - UINT uItem; -}; - -static struct menu_mouse_tests_s { - DWORD type; - struct menu_item_pair_s menu_item_pairs[5]; /* for mousing */ - WORD wVk[5]; /* keys */ - BOOL bMenuVisible; - BOOL _todo_wine; -} menu_tests[] = { - /* for each test, send keys or clicks and check for menu visibility */ - { INPUT_KEYBOARD, {{0}}, {VK_MENU, 0}, TRUE, FALSE }, /* test 0 */ - { INPUT_KEYBOARD, {{0}}, {VK_ESCAPE, 0}, FALSE, FALSE }, - { INPUT_KEYBOARD, {{0}}, {VK_MENU, 0}, TRUE, FALSE }, - { INPUT_KEYBOARD, {{0}}, {'D', 0}, FALSE, FALSE }, - { INPUT_KEYBOARD, {{0}}, {VK_MENU, 0}, TRUE, FALSE }, - { INPUT_KEYBOARD, {{0}}, {'E', 0}, FALSE, FALSE }, - { INPUT_KEYBOARD, {{0}}, {VK_MENU, 'M', 0}, TRUE, FALSE }, - { INPUT_KEYBOARD, {{0}}, {VK_ESCAPE, VK_ESCAPE, 0}, FALSE, FALSE }, - { INPUT_KEYBOARD, {{0}}, {VK_MENU, 'M', VK_ESCAPE, 0}, TRUE, FALSE }, - { INPUT_KEYBOARD, {{0}}, {VK_ESCAPE, 0}, FALSE, FALSE }, - { INPUT_KEYBOARD, {{0}}, {VK_MENU, 'M', 0}, TRUE, FALSE }, - { INPUT_KEYBOARD, {{0}}, {'D', 0}, FALSE, FALSE }, - { INPUT_KEYBOARD, {{0}}, {VK_MENU, 'M', 0}, TRUE, FALSE }, - { INPUT_KEYBOARD, {{0}}, {'E', 0}, FALSE, FALSE }, - { INPUT_KEYBOARD, {{0}}, {VK_MENU, 'M', 'P', 0}, TRUE, FALSE }, - { INPUT_KEYBOARD, {{0}}, {'D', 0}, FALSE, FALSE }, - { INPUT_KEYBOARD, {{0}}, {VK_MENU, 'M', 'P', 0}, TRUE, FALSE }, - { INPUT_KEYBOARD, {{0}}, {'E', 0}, FALSE, FALSE }, - { INPUT_KEYBOARD, {{0}}, {VK_F10, 0}, TRUE, FALSE }, - { INPUT_KEYBOARD, {{0}}, {VK_F10, 0}, FALSE, FALSE }, - - { INPUT_MOUSE, {{1, 2}, {0}}, {0}, TRUE, TRUE }, /* test 20 */ - { INPUT_MOUSE, {{1, 1}, {0}}, {0}, FALSE, FALSE }, - { INPUT_MOUSE, {{1, 0}, {0}}, {0}, TRUE, TRUE }, - { INPUT_MOUSE, {{1, 1}, {0}}, {0}, FALSE, FALSE }, - { INPUT_MOUSE, {{1, 0}, {2, 2}, {0}}, {0}, TRUE, TRUE }, - { INPUT_MOUSE, {{2, 1}, {0}}, {0}, FALSE, FALSE }, - { INPUT_MOUSE, {{1, 0}, {2, 0}, {0}}, {0}, TRUE, TRUE }, - { INPUT_MOUSE, {{3, 0}, {0}}, {0}, FALSE, FALSE }, - { INPUT_MOUSE, {{1, 0}, {2, 0}, {0}}, {0}, TRUE, TRUE }, - { INPUT_MOUSE, {{3, 1}, {0}}, {0}, TRUE, TRUE }, - { INPUT_MOUSE, {{1, 1}, {0}}, {0}, FALSE, FALSE }, - { -1 } -}; - -static void send_key(WORD wVk) -{ - TEST_INPUT i[2]; - memset(i, 0, sizeof(i)); - i[0].type = i[1].type = INPUT_KEYBOARD; - i[0].u.ki.wVk = i[1].u.ki.wVk = wVk; - i[1].u.ki.dwFlags = KEYEVENTF_KEYUP; - pSendInput(2, (INPUT *) i, sizeof(INPUT)); -} - -static BOOL click_menu(HANDLE hWnd, struct menu_item_pair_s *mi) -{ - HMENU hMenu = hMenus[mi->uMenu]; - TEST_INPUT i[3]; - MSG msg; - RECT r; - int screen_w = GetSystemMetrics(SM_CXSCREEN); - int screen_h = GetSystemMetrics(SM_CYSCREEN); - BOOL ret = GetMenuItemRect(mi->uMenu > 2 ? NULL : hWnd, hMenu, mi->uItem, &r); - if(!ret) return FALSE; - - memset(i, 0, sizeof(i)); - i[0].type = i[1].type = i[2].type = INPUT_MOUSE; - i[0].u.mi.dx = i[1].u.mi.dx = i[2].u.mi.dx - = ((r.left + 5) * 65535) / screen_w; - i[0].u.mi.dy = i[1].u.mi.dy = i[2].u.mi.dy - = ((r.top + 5) * 65535) / screen_h; - i[0].u.mi.dwFlags = i[1].u.mi.dwFlags = i[2].u.mi.dwFlags - = MOUSEEVENTF_ABSOLUTE; - i[0].u.mi.dwFlags |= MOUSEEVENTF_MOVE; - i[1].u.mi.dwFlags |= MOUSEEVENTF_LEFTDOWN; - i[2].u.mi.dwFlags |= MOUSEEVENTF_LEFTUP; - ret = pSendInput(3, (INPUT *) i, sizeof(INPUT)); - - /* hack to prevent mouse message buildup in Wine */ - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg ); - return ret; -} - -static DWORD WINAPI test_menu_input_thread(LPVOID lpParameter) -{ - int i, j; - HANDLE hWnd = lpParameter; - - Sleep(500); - /* mixed keyboard/mouse test */ - for (i = 0; menu_tests[i].type != -1; i++) - { - int ret = TRUE, elapsed = 0; - - got_input = i && menu_tests[i-1].bMenuVisible; - - if (menu_tests[i].type == INPUT_KEYBOARD) - for (j = 0; menu_tests[i].wVk[j] != 0; j++) - send_key(menu_tests[i].wVk[j]); - else - for (j = 0; menu_tests[i].menu_item_pairs[j].uMenu != 0; j++) - if (!(ret = click_menu(hWnd, &menu_tests[i].menu_item_pairs[j]))) break; - - if (!ret) - { - skip( "test %u: failed to send input\n", i ); - PostMessage( hWnd, WM_CANCELMODE, 0, 0 ); - return 0; - } - while (menu_tests[i].bMenuVisible != bMenuVisible) - { - if (elapsed > 200) - break; - elapsed += 20; - Sleep(20); - } - - if (!got_input) - { - skip( "test %u: didn't receive input\n", i ); - PostMessage( hWnd, WM_CANCELMODE, 0, 0 ); - return 0; - } - - if (menu_tests[i]._todo_wine) - { - todo_wine { - ok(menu_tests[i].bMenuVisible == bMenuVisible, "test %d\n", i); - } - } - else - ok(menu_tests[i].bMenuVisible == bMenuVisible, "test %d\n", i); - } - return 0; -} - -static LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, - LPARAM lParam) -{ - switch (msg) { - case WM_ENTERMENULOOP: - bMenuVisible = TRUE; - break; - case WM_EXITMENULOOP: - bMenuVisible = FALSE; - break; - case WM_KEYDOWN: - case WM_SYSKEYDOWN: - case WM_MOUSEMOVE: - case WM_LBUTTONDOWN: - case WM_LBUTTONUP: - case WM_NCMOUSEMOVE: - case WM_NCLBUTTONDOWN: - case WM_NCLBUTTONUP: - got_input = TRUE; - /* fall through */ - default: - return( DefWindowProcA( hWnd, msg, wParam, lParam ) ); - } - return 0; -} - -static void test_menu_input(void) { - MSG msg; - WNDCLASSA wclass; - HINSTANCE hInstance = GetModuleHandleA( NULL ); - HANDLE hThread, hWnd; - DWORD tid; - ATOM aclass; - - if (!pSendInput) - { - win_skip("SendInput is not available\n"); - return; - } - - wclass.lpszClassName = "MenuTestClass"; - wclass.style = CS_HREDRAW | CS_VREDRAW; - wclass.lpfnWndProc = WndProc; - wclass.hInstance = hInstance; - wclass.hIcon = LoadIconA( 0, IDI_APPLICATION ); - wclass.hCursor = LoadCursorA( NULL, IDC_ARROW ); - wclass.hbrBackground = (HBRUSH)( COLOR_WINDOW + 1 ); - wclass.lpszMenuName = 0; - wclass.cbClsExtra = 0; - wclass.cbWndExtra = 0; - aclass = RegisterClassA( &wclass ); - ok (aclass, "MenuTest class not created\n"); - if (!aclass) return; - hWnd = CreateWindowA( wclass.lpszClassName, "MenuTest", - WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, - 400, 200, NULL, NULL, hInstance, NULL); - ok (hWnd != NULL, "MenuTest window not created\n"); - if (!hWnd) return; - /* fixed menus */ - hMenus[3] = CreatePopupMenu(); - AppendMenu(hMenus[3], MF_STRING, 0, "&Enabled"); - AppendMenu(hMenus[3], MF_STRING|MF_DISABLED, 0, "&Disabled"); - - hMenus[2] = CreatePopupMenu(); - AppendMenu(hMenus[2], MF_STRING|MF_POPUP, (UINT_PTR) hMenus[3], "&Popup"); - AppendMenu(hMenus[2], MF_STRING, 0, "&Enabled"); - AppendMenu(hMenus[2], MF_STRING|MF_DISABLED, 0, "&Disabled"); - - hMenus[1] = CreateMenu(); - AppendMenu(hMenus[1], MF_STRING|MF_POPUP, (UINT_PTR) hMenus[2], "&Menu"); - AppendMenu(hMenus[1], MF_STRING, 0, "&Enabled"); - AppendMenu(hMenus[1], MF_STRING|MF_DISABLED, 0, "&Disabled"); - - SetMenu(hWnd, hMenus[1]); - ShowWindow(hWnd, SW_SHOW); - UpdateWindow(hWnd); - - hThread = CreateThread(NULL, 0, test_menu_input_thread, hWnd, 0, &tid); - while(1) - { - if (WAIT_TIMEOUT != WaitForSingleObject(hThread, 50)) - break; - while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); - } - DestroyWindow(hWnd); -} - -static void test_menu_flags( void ) -{ - HMENU hMenu, hPopupMenu; - - hMenu = CreateMenu(); - hPopupMenu = CreatePopupMenu(); - - AppendMenu(hMenu, MF_POPUP | MF_STRING, (UINT_PTR)hPopupMenu, "Popup"); - - AppendMenu(hPopupMenu, MF_STRING | MF_HILITE | MF_DEFAULT, 101, "Item 1"); - InsertMenu(hPopupMenu, 1, MF_BYPOSITION | MF_STRING | MF_HILITE | MF_DEFAULT, 102, "Item 2"); - AppendMenu(hPopupMenu, MF_STRING, 103, "Item 3"); - ModifyMenu(hPopupMenu, 2, MF_BYPOSITION | MF_STRING | MF_HILITE | MF_DEFAULT, 103, "Item 3"); - - ok(GetMenuState(hPopupMenu, 0, MF_BYPOSITION) & MF_HILITE, - "AppendMenu should accept MF_HILITE\n"); - ok(GetMenuState(hPopupMenu, 1, MF_BYPOSITION) & MF_HILITE, - "InsertMenu should accept MF_HILITE\n"); - ok(GetMenuState(hPopupMenu, 2, MF_BYPOSITION) & MF_HILITE, - "ModifyMenu should accept MF_HILITE\n"); - - ok(!(GetMenuState(hPopupMenu, 0, MF_BYPOSITION) & MF_DEFAULT), - "AppendMenu must not accept MF_DEFAULT\n"); - ok(!(GetMenuState(hPopupMenu, 1, MF_BYPOSITION) & MF_DEFAULT), - "InsertMenu must not accept MF_DEFAULT\n"); - ok(!(GetMenuState(hPopupMenu, 2, MF_BYPOSITION) & MF_DEFAULT), - "ModifyMenu must not accept MF_DEFAULT\n"); - - DestroyMenu(hMenu); -} - -static void test_menu_hilitemenuitem( void ) -{ - HMENU hMenu, hPopupMenu; - WNDCLASSA wclass; - HWND hWnd; - ATOM aclass; - - wclass.lpszClassName = "HiliteMenuTestClass"; - wclass.style = CS_HREDRAW | CS_VREDRAW; - wclass.lpfnWndProc = WndProc; - wclass.hInstance = GetModuleHandleA( NULL ); - wclass.hIcon = LoadIconA( 0, IDI_APPLICATION ); - wclass.hCursor = LoadCursorA( NULL, IDC_ARROW ); - wclass.hbrBackground = (HBRUSH)( COLOR_WINDOW + 1 ); - wclass.lpszMenuName = 0; - wclass.cbClsExtra = 0; - wclass.cbWndExtra = 0; - aclass = RegisterClassA( &wclass ); - ok (aclass, "HiliteMenuTest class could not be created\n"); - if (!aclass) return; - hWnd = CreateWindowA( wclass.lpszClassName, "HiliteMenuTest", - WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, - 400, 200, NULL, NULL, wclass.hInstance, NULL); - ok (hWnd != NULL, "HiliteMenuTest window could not be created\n"); - if (!hWnd) return; - - hMenu = CreateMenu(); - hPopupMenu = CreatePopupMenu(); - - AppendMenu(hMenu, MF_POPUP | MF_STRING, (UINT_PTR)hPopupMenu, "Popup"); - - AppendMenu(hPopupMenu, MF_STRING, 101, "Item 1"); - AppendMenu(hPopupMenu, MF_STRING, 102, "Item 2"); - AppendMenu(hPopupMenu, MF_STRING, 103, "Item 3"); - - SetMenu(hWnd, hMenu); - - /* test invalid arguments */ - - ok(!(GetMenuState(hPopupMenu, 1, MF_BYPOSITION) & MF_HILITE), - "HiliteMenuItem: Item 2 is hilited\n"); - - SetLastError(0xdeadbeef); - todo_wine - { - ok(!HiliteMenuItem(NULL, hPopupMenu, 1, MF_HILITE | MF_BYPOSITION), - "HiliteMenuItem: call should have failed.\n"); - } - ok(GetLastError() == 0xdeadbeef || /* 9x */ - GetLastError() == ERROR_INVALID_WINDOW_HANDLE /* NT */, - "HiliteMenuItem: expected error ERROR_INVALID_WINDOW_HANDLE, got: %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ok(!HiliteMenuItem(hWnd, NULL, 1, MF_HILITE | MF_BYPOSITION), - "HiliteMenuItem: call should have failed.\n"); - ok(GetLastError() == 0xdeadbeef || /* 9x */ - GetLastError() == ERROR_INVALID_MENU_HANDLE /* NT */, - "HiliteMenuItem: expected error ERROR_INVALID_MENU_HANDLE, got: %d\n", GetLastError()); - - ok(!(GetMenuState(hPopupMenu, 1, MF_BYPOSITION) & MF_HILITE), - "HiliteMenuItem: Item 2 is hilited\n"); - - /* either MF_HILITE or MF_UNHILITE *and* MF_BYCOMMAND or MF_BYPOSITION need to be set */ - - SetLastError(0xdeadbeef); - ok(HiliteMenuItem(hWnd, hPopupMenu, 1, MF_BYPOSITION), - "HiliteMenuItem: call should have succeeded.\n"); - ok(GetLastError() == 0xdeadbeef, - "HiliteMenuItem: expected error 0xdeadbeef, got: %d\n", GetLastError()); - - ok(!(GetMenuState(hPopupMenu, 1, MF_BYPOSITION) & MF_HILITE), - "HiliteMenuItem: Item 2 is hilited\n"); - - SetLastError(0xdeadbeef); - todo_wine - { - ok(HiliteMenuItem(hWnd, hPopupMenu, 1, MF_HILITE), - "HiliteMenuItem: call should have succeeded.\n"); - } - ok(GetLastError() == 0xdeadbeef, - "HiliteMenuItem: expected error 0xdeadbeef, got: %d\n", GetLastError()); - - ok(!(GetMenuState(hPopupMenu, 1, MF_BYPOSITION) & MF_HILITE), - "HiliteMenuItem: Item 2 is hilited\n"); - - /* hilite a menu item (by position) */ - - SetLastError(0xdeadbeef); - ok(HiliteMenuItem(hWnd, hPopupMenu, 1, MF_HILITE | MF_BYPOSITION), - "HiliteMenuItem: call should not have failed.\n"); - ok(GetLastError() == 0xdeadbeef, - "HiliteMenuItem: expected error 0xdeadbeef, got: %d\n", GetLastError()); - - todo_wine - { - ok(GetMenuState(hPopupMenu, 1, MF_BYPOSITION) & MF_HILITE, - "HiliteMenuItem: Item 2 is not hilited\n"); - } - - /* unhilite a menu item (by position) */ - - SetLastError(0xdeadbeef); - ok(HiliteMenuItem(hWnd, hPopupMenu, 1, MF_UNHILITE | MF_BYPOSITION), - "HiliteMenuItem: call should not have failed.\n"); - ok(GetLastError() == 0xdeadbeef, - "HiliteMenuItem: expected error 0xdeadbeef, got: %d\n", GetLastError()); - - ok(!(GetMenuState(hPopupMenu, 1, MF_BYPOSITION) & MF_HILITE), - "HiliteMenuItem: Item 2 is hilited\n"); - - /* hilite a menu item (by command) */ - - SetLastError(0xdeadbeef); - ok(HiliteMenuItem(hWnd, hPopupMenu, 103, MF_HILITE | MF_BYCOMMAND), - "HiliteMenuItem: call should not have failed.\n"); - ok(GetLastError() == 0xdeadbeef, - "HiliteMenuItem: expected error 0xdeadbeef, got: %d\n", GetLastError()); - - todo_wine - { - ok(GetMenuState(hPopupMenu, 2, MF_BYPOSITION) & MF_HILITE, - "HiliteMenuItem: Item 3 is not hilited\n"); - } - - /* unhilite a menu item (by command) */ - - SetLastError(0xdeadbeef); - ok(HiliteMenuItem(hWnd, hPopupMenu, 103, MF_UNHILITE | MF_BYCOMMAND), - "HiliteMenuItem: call should not have failed.\n"); - ok(GetLastError() == 0xdeadbeef, - "HiliteMenuItem: expected error 0xdeadbeef, got: %d\n", GetLastError()); - - ok(!(GetMenuState(hPopupMenu, 2, MF_BYPOSITION) & MF_HILITE), - "HiliteMenuItem: Item 3 is hilited\n"); - - DestroyWindow(hWnd); -} - -static void check_menu_items(HMENU hmenu, UINT checked_cmd, UINT checked_type, - UINT checked_state) -{ - INT i, count; - - count = GetMenuItemCount(hmenu); - ok (count != -1, "GetMenuItemCount returned -1\n"); - - for (i = 0; i < count; i++) - { - BOOL ret; - MENUITEMINFO mii; - - memset(&mii, 0, sizeof(mii)); - mii.cbSize = sizeof(mii); - mii.fMask = MIIM_FTYPE | MIIM_STATE | MIIM_ID | MIIM_SUBMENU; - ret = GetMenuItemInfo(hmenu, i, TRUE, &mii); - ok(ret, "GetMenuItemInfo(%u) failed\n", i); -#if 0 - trace("item #%u: fType %04x, fState %04x, wID %u, hSubMenu %p\n", - i, mii.fType, mii.fState, mii.wID, mii.hSubMenu); -#endif - if (mii.hSubMenu) - { - ok(mii.wID == (UINT_PTR)mii.hSubMenu, "id %u: wID should be equal to hSubMenu\n", checked_cmd); - check_menu_items(mii.hSubMenu, checked_cmd, checked_type, checked_state); - } - else - { - if (mii.wID == checked_cmd) - { - ok(mii.fType == checked_type, "id %u: expected fType %04x, got %04x\n", checked_cmd, checked_type, mii.fType); - ok(mii.fState == checked_state, "id %u: expected fState %04x, got %04x\n", checked_cmd, checked_state, mii.fState); - ok(mii.wID != 0, "id %u: not expected wID 0\n", checked_cmd); - } - else - { - ok(mii.fType != MFT_RADIOCHECK, "id %u: not expected fType MFT_RADIOCHECK on cmd %u\n", checked_cmd, mii.wID); - - if (mii.fType == MFT_SEPARATOR) - { - ok(mii.fState == MFS_GRAYED, "id %u: expected fState MFS_GRAYED, got %04x\n", checked_cmd, mii.fState); - ok(mii.wID == 0, "id %u: expected wID 0, got %u\n", checked_cmd, mii.wID); - } - else - { - ok(mii.fState == 0, "id %u: expected fState 0, got %04x\n", checked_cmd, mii.fState); - ok(mii.wID != 0, "id %u: not expected wID 0\n", checked_cmd); - } - } - } - } -} - -static void clear_ftype_and_state(HMENU hmenu, UINT id, UINT flags) -{ - BOOL ret; - MENUITEMINFO mii; - - memset(&mii, 0, sizeof(mii)); - mii.cbSize = sizeof(mii); - mii.fMask = MIIM_FTYPE | MIIM_STATE; - ret = SetMenuItemInfo(hmenu, id, (flags & MF_BYPOSITION) != 0, &mii); - ok(ret, "SetMenuItemInfo(%u) failed\n", id); -} - -static void test_CheckMenuRadioItem(void) -{ - BOOL ret; - HMENU hmenu; - - hmenu = LoadMenu(GetModuleHandle(0), MAKEINTRESOURCE(1)); - assert(hmenu != 0); - - check_menu_items(hmenu, -1, 0, 0); - - ret = CheckMenuRadioItem(hmenu, 100, 100, 100, MF_BYCOMMAND); - ok(ret, "CheckMenuRadioItem failed\n"); - check_menu_items(hmenu, 100, MFT_RADIOCHECK, MFS_CHECKED); - - /* MSDN is wrong, Windows does not remove MFT_RADIOCHECK */ - ret = CheckMenuRadioItem(hmenu, 100, 100, -1, MF_BYCOMMAND); - ok(!ret, "CheckMenuRadioItem should return FALSE\n"); - check_menu_items(hmenu, 100, MFT_RADIOCHECK, 0); - - /* clear check */ - clear_ftype_and_state(hmenu, 100, MF_BYCOMMAND); - check_menu_items(hmenu, -1, 0, 0); - - /* first and checked items are on different menus */ - ret = CheckMenuRadioItem(hmenu, 0, 300, 202, MF_BYCOMMAND); - ok(!ret, "CheckMenuRadioItem should return FALSE\n"); - check_menu_items(hmenu, -1, 0, 0); - - ret = CheckMenuRadioItem(hmenu, 200, 300, 202, MF_BYCOMMAND); - ok(ret, "CheckMenuRadioItem failed\n"); - check_menu_items(hmenu, 202, MFT_RADIOCHECK, MFS_CHECKED); - - /* MSDN is wrong, Windows does not remove MFT_RADIOCHECK */ - ret = CheckMenuRadioItem(hmenu, 202, 202, -1, MF_BYCOMMAND); - ok(!ret, "CheckMenuRadioItem should return FALSE\n"); - check_menu_items(hmenu, 202, MFT_RADIOCHECK, 0); - - /* clear check */ - clear_ftype_and_state(hmenu, 202, MF_BYCOMMAND); - check_menu_items(hmenu, -1, 0, 0); - - /* just for fun, try to check separator */ - ret = CheckMenuRadioItem(hmenu, 0, 300, 0, MF_BYCOMMAND); - ok(!ret, "CheckMenuRadioItem should return FALSE\n"); - check_menu_items(hmenu, -1, 0, 0); -} - -static void test_menu_resource_layout(void) -{ - static const struct - { - MENUITEMTEMPLATEHEADER mith; - WORD data[14]; - } menu_template = - { - { 0, 0 }, /* versionNumber, offset */ - { - /* mtOption, mtID, mtString[] '\0' terminated */ - MF_STRING, 1, 'F', 0, - MF_STRING, 2, 0, - MF_SEPARATOR, 3, 0, - /* MF_SEPARATOR, 4, 'S', 0, FIXME: Wine ignores 'S' */ - MF_STRING|MF_GRAYED|MF_END, 5, 'E', 0 - } - }; - static const struct - { - UINT type, state, id; - const char *str; - } menu_data[] = - { - { MF_STRING, MF_ENABLED, 1, "F" }, - { MF_SEPARATOR, MF_GRAYED|MF_DISABLED, 2, "" }, - { MF_SEPARATOR, MF_GRAYED|MF_DISABLED, 3, "" }, - /*{ MF_SEPARATOR, MF_GRAYED|MF_DISABLED, 4, "S" }, FIXME: Wine ignores 'S'*/ - { MF_STRING, MF_GRAYED, 5, "E" }, - { MF_SEPARATOR, MF_GRAYED|MF_DISABLED, 6, "" }, - { MF_STRING, MF_ENABLED, 7, "" }, - { MF_SEPARATOR, MF_GRAYED|MF_DISABLED, 8, "" } - }; - HMENU hmenu; - INT count, i; - BOOL ret; - - hmenu = LoadMenuIndirect(&menu_template); - ok(hmenu != 0, "LoadMenuIndirect error %u\n", GetLastError()); - - ret = AppendMenu(hmenu, MF_STRING, 6, NULL); - ok(ret, "AppendMenu failed\n"); - ret = AppendMenu(hmenu, MF_STRING, 7, "\0"); - ok(ret, "AppendMenu failed\n"); - ret = AppendMenu(hmenu, MF_SEPARATOR, 8, "separator"); - ok(ret, "AppendMenu failed\n"); - - count = GetMenuItemCount(hmenu); - ok(count == sizeof(menu_data)/sizeof(menu_data[0]), - "expected %u menu items, got %u\n", - (UINT)(sizeof(menu_data)/sizeof(menu_data[0])), count); - - for (i = 0; i < count; i++) - { - char buf[20]; - MENUITEMINFO mii; - - memset(&mii, 0, sizeof(mii)); - mii.cbSize = sizeof(mii); - mii.dwTypeData = buf; - mii.cch = sizeof(buf); - mii.fMask = MIIM_FTYPE | MIIM_STATE | MIIM_ID | MIIM_STRING; - ret = GetMenuItemInfo(hmenu, i, TRUE, &mii); - ok(ret, "GetMenuItemInfo(%u) failed\n", i); -#if 0 - trace("item #%u: fType %04x, fState %04x, wID %u, dwTypeData %s\n", - i, mii.fType, mii.fState, mii.wID, (LPCSTR)mii.dwTypeData); -#endif - ok(mii.fType == menu_data[i].type, - "%u: expected fType %04x, got %04x\n", i, menu_data[i].type, mii.fType); - ok(mii.fState == menu_data[i].state, - "%u: expected fState %04x, got %04x\n", i, menu_data[i].state, mii.fState); - ok(mii.wID == menu_data[i].id, - "%u: expected wID %04x, got %04x\n", i, menu_data[i].id, mii.wID); - ok(mii.cch == strlen(menu_data[i].str), - "%u: expected cch %u, got %u\n", i, (UINT)strlen(menu_data[i].str), mii.cch); - ok(!strcmp(mii.dwTypeData, menu_data[i].str), - "%u: expected dwTypeData %s, got %s\n", i, menu_data[i].str, (LPCSTR)mii.dwTypeData); - } - - DestroyMenu(hmenu); -} - -struct menu_data -{ - UINT type, id; - const char *str; -}; - -static HMENU create_menu_from_data(const struct menu_data *item, INT item_count) -{ - HMENU hmenu; - INT i; - BOOL ret; - - hmenu = CreateMenu(); - assert(hmenu != 0); - - for (i = 0; i < item_count; i++) - { - SetLastError(0xdeadbeef); - ret = AppendMenu(hmenu, item[i].type, item[i].id, item[i].str); - ok(ret, "%d: AppendMenu(%04x, %04x, %p) error %u\n", - i, item[i].type, item[i].id, item[i].str, GetLastError()); - } - return hmenu; -} - -/* use InsertMenuItem: does not set the MFT_BITMAP flag, - * and does not accept non-magic bitmaps with invalid - * bitmap handles */ -static HMENU create_menuitem_from_data(const struct menu_data *item, INT item_count) -{ - HMENU hmenu; - INT i; - BOOL ret; - MENUITEMINFO mii = { sizeof( MENUITEMINFO)}; - - hmenu = CreateMenu(); - assert(hmenu != 0); - - for (i = 0; i < item_count; i++) - { - SetLastError(0xdeadbeef); - - mii.fMask = MIIM_FTYPE | MIIM_ID | MIIM_STATE; - mii.fType = 0; - if( item[i].type & MFT_BITMAP) - { - mii.fMask |= MIIM_BITMAP; - mii.hbmpItem = (HBITMAP)item[i].str; - } - else if( item[i].type & MFT_SEPARATOR) - mii.fType = MFT_SEPARATOR; - else - { - mii.fMask |= MIIM_STRING; - mii.dwTypeData = (LPSTR)item[i].str; - mii.cch = strlen( item[i].str); - } - mii.fState = 0; - if( item[i].type & MF_HELP) mii.fType |= MF_HELP; - mii.wID = item[i].id; - ret = InsertMenuItem( hmenu, -1, TRUE, &mii); - ok(ret, "%d: InsertMenuItem(%04x, %04x, %p) error %u\n", - i, item[i].type, item[i].id, item[i].str, GetLastError()); - } - return hmenu; -} - -static void compare_menu_data(HMENU hmenu, const struct menu_data *item, INT item_count) -{ - INT count, i; - BOOL ret; - - count = GetMenuItemCount(hmenu); - ok(count == item_count, "expected %d, got %d menu items\n", count, item_count); - - for (i = 0; i < count; i++) - { - char buf[20]; - MENUITEMINFO mii; - - memset(&mii, 0, sizeof(mii)); - mii.cbSize = sizeof(mii); - mii.dwTypeData = buf; - mii.cch = sizeof(buf); - mii.fMask = MIIM_FTYPE | MIIM_ID | MIIM_STRING | MIIM_BITMAP; - ret = GetMenuItemInfo(hmenu, i, TRUE, &mii); - ok(ret, "GetMenuItemInfo(%u) failed\n", i); -#if 0 - trace("item #%u: fType %04x, fState %04x, wID %04x, hbmp %p\n", - i, mii.fType, mii.fState, mii.wID, mii.hbmpItem); -#endif - ok(mii.fType == item[i].type, - "%u: expected fType %04x, got %04x\n", i, item[i].type, mii.fType); - ok(mii.wID == item[i].id, - "%u: expected wID %04x, got %04x\n", i, item[i].id, mii.wID); - if (mii.hbmpItem || !item[i].str) - /* For some reason Windows sets high word to not 0 for - * not "magic" ids. - */ - ok(LOWORD(mii.hbmpItem) == LOWORD(item[i].str), - "%u: expected hbmpItem %p, got %p\n", i, item[i].str, mii.hbmpItem); - else - { - ok(mii.cch == strlen(item[i].str), - "%u: expected cch %u, got %u\n", i, (UINT)strlen(item[i].str), mii.cch); - ok(!strcmp(mii.dwTypeData, item[i].str), - "%u: expected dwTypeData %s, got %s\n", i, item[i].str, (LPCSTR)mii.dwTypeData); - } - } -} - -static void test_InsertMenu(void) -{ - HBITMAP hbm = CreateBitmap(1,1,1,1,NULL); - /* Note: XP treats only bitmap handles 1 - 6 as "magic" ones - * regardless of their id. - */ - static const struct menu_data in1[] = - { - { MF_STRING, 1, "File" }, - { MF_BITMAP|MF_HELP, SC_CLOSE, MAKEINTRESOURCE(1) }, - { MF_STRING|MF_HELP, 2, "Help" } - }; - static const struct menu_data out1[] = - { - { MF_STRING, 1, "File" }, - { MF_STRING|MF_HELP, 2, "Help" }, - { MF_BITMAP|MF_HELP, SC_CLOSE, MAKEINTRESOURCE(1) } - }; - static const struct menu_data out1a[] = - { - { MF_STRING, 1, "File" }, - { MF_STRING|MF_HELP, 2, "Help" }, - { MF_HELP, SC_CLOSE, MAKEINTRESOURCE(1) } - }; - const struct menu_data in2[] = - { - { MF_STRING, 1, "File" }, - { MF_BITMAP|MF_HELP, SC_CLOSE, (char*)hbm }, - { MF_STRING|MF_HELP, 2, "Help" } - }; - const struct menu_data out2[] = - { - { MF_STRING, 1, "File" }, - { MF_BITMAP|MF_HELP, SC_CLOSE, (char*)hbm }, - { MF_STRING|MF_HELP, 2, "Help" } - }; - const struct menu_data out2a[] = - { - { MF_STRING, 1, "File" }, - { MF_HELP, SC_CLOSE, (char*)hbm }, - { MF_STRING|MF_HELP, 2, "Help" } - }; - static const struct menu_data in3[] = - { - { MF_STRING, 1, "File" }, - { MF_SEPARATOR|MF_HELP, SC_CLOSE, MAKEINTRESOURCE(1) }, - { MF_STRING|MF_HELP, 2, "Help" } - }; - static const struct menu_data out3[] = - { - { MF_STRING, 1, "File" }, - { MF_SEPARATOR|MF_HELP, SC_CLOSE, MAKEINTRESOURCE(0) }, - { MF_STRING|MF_HELP, 2, "Help" }, - }; - static const struct menu_data in4[] = - { - { MF_STRING, 1, "File" }, - { MF_BITMAP|MF_HELP, 1, MAKEINTRESOURCE(1) }, - { MF_STRING|MF_HELP, 2, "Help" } - }; - static const struct menu_data out4[] = - { - { MF_STRING, 1, "File" }, - { MF_STRING|MF_HELP, 2, "Help" }, - { MF_BITMAP|MF_HELP, 1, MAKEINTRESOURCE(1) } - }; - static const struct menu_data out4a[] = - { - { MF_STRING, 1, "File" }, - { MF_STRING|MF_HELP, 2, "Help" }, - { MF_HELP, 1, MAKEINTRESOURCE(1) } - }; - HMENU hmenu; - -#define create_menu(a) create_menu_from_data((a), sizeof(a)/sizeof((a)[0])) -#define create_menuitem(a) create_menuitem_from_data((a), sizeof(a)/sizeof((a)[0])) -#define compare_menu(h, a) compare_menu_data((h), (a), sizeof(a)/sizeof((a)[0])) - - hmenu = create_menu(in1); - compare_menu(hmenu, out1); - DestroyMenu(hmenu); - - hmenu = create_menu(in2); - compare_menu(hmenu, out2); - DestroyMenu(hmenu); - - hmenu = create_menu(in3); - compare_menu(hmenu, out3); - DestroyMenu(hmenu); - - hmenu = create_menu(in4); - compare_menu(hmenu, out4); - DestroyMenu(hmenu); - - /* now using InsertMenuItemInfo */ - hmenu = create_menuitem(in1); - compare_menu(hmenu, out1a); - DestroyMenu(hmenu); - - hmenu = create_menuitem(in2); - compare_menu(hmenu, out2a); - DestroyMenu(hmenu); - - hmenu = create_menuitem(in3); - compare_menu(hmenu, out3); - DestroyMenu(hmenu); - - hmenu = create_menuitem(in4); - compare_menu(hmenu, out4a); - DestroyMenu(hmenu); - -#undef create_menu -#undef create_menuitem -#undef compare_menu -} - -static void test_menu_getmenuinfo(void) -{ - HMENU hmenu; - MENUINFO mi = {0}; - BOOL ret; - DWORD gle; - - if (!pGetMenuInfo) - { - win_skip("GetMenuInfo is not available\n"); - return; - } - - /* create a menu */ - hmenu = CreateMenu(); - assert( hmenu); - /* test some parameter errors */ - SetLastError(0xdeadbeef); - ret = pGetMenuInfo( hmenu, NULL); - gle= GetLastError(); - ok( !ret, "GetMenuInfo() should have failed\n"); - ok( gle == ERROR_INVALID_PARAMETER || - broken(gle == 0xdeadbeef), /* Win98, WinME */ - "GetMenuInfo() error got %u expected %u\n", gle, ERROR_INVALID_PARAMETER); - SetLastError(0xdeadbeef); - mi.cbSize = 0; - ret = pGetMenuInfo( hmenu, &mi); - gle= GetLastError(); - ok( !ret, "GetMenuInfo() should have failed\n"); - ok( gle == ERROR_INVALID_PARAMETER || - broken(gle == 0xdeadbeef), /* Win98, WinME */ - "GetMenuInfo() error got %u expected %u\n", gle, ERROR_INVALID_PARAMETER); - SetLastError(0xdeadbeef); - mi.cbSize = sizeof( MENUINFO); - ret = pGetMenuInfo( hmenu, &mi); - gle= GetLastError(); - ok( ret, "GetMenuInfo() should have succeeded\n"); - ok( gle == 0xdeadbeef, "GetMenuInfo() error got %u\n", gle); - SetLastError(0xdeadbeef); - mi.cbSize = 0; - ret = pGetMenuInfo( NULL, &mi); - gle= GetLastError(); - ok( !ret, "GetMenuInfo() should have failed\n"); - ok( gle == ERROR_INVALID_PARAMETER || - broken(gle == 0xdeadbeef), /* Win98, WinME */ - "GetMenuInfo() error got %u expected %u\n", gle, ERROR_INVALID_PARAMETER); - /* clean up */ - DestroyMenu( hmenu); - return; -} - -static void test_menu_setmenuinfo(void) -{ - HMENU hmenu, hsubmenu; - MENUINFO mi = {0}; - MENUITEMINFOA mii = {sizeof( MENUITEMINFOA)}; - BOOL ret; - DWORD gle; - - if (!pGetMenuInfo || !pSetMenuInfo) - { - win_skip("Get/SetMenuInfo are not available\n"); - return; - } - - /* create a menu with a submenu */ - hmenu = CreateMenu(); - hsubmenu = CreateMenu(); - assert( hmenu && hsubmenu); - mii.fMask = MIIM_SUBMENU; - mii.hSubMenu = hsubmenu; - ret = InsertMenuItem( hmenu, 0, FALSE, &mii); - ok( ret, "InsertMenuItem failed with error %d\n", GetLastError()); - /* test some parameter errors */ - SetLastError(0xdeadbeef); - ret = pSetMenuInfo( hmenu, NULL); - gle= GetLastError(); - ok( !ret, "SetMenuInfo() should have failed\n"); - ok( gle == ERROR_INVALID_PARAMETER || - broken(gle == 0xdeadbeef), /* Win98, WinME */ - "SetMenuInfo() error got %u expected %u\n", gle, ERROR_INVALID_PARAMETER); - SetLastError(0xdeadbeef); - mi.cbSize = 0; - ret = pSetMenuInfo( hmenu, &mi); - gle= GetLastError(); - ok( !ret, "SetMenuInfo() should have failed\n"); - ok( gle == ERROR_INVALID_PARAMETER || - broken(gle == 0xdeadbeef), /* Win98, WinME */ - "SetMenuInfo() error got %u expected %u\n", gle, ERROR_INVALID_PARAMETER); - SetLastError(0xdeadbeef); - mi.cbSize = sizeof( MENUINFO); - ret = pSetMenuInfo( hmenu, &mi); - gle= GetLastError(); - ok( ret, "SetMenuInfo() should have succeeded\n"); - ok( gle == 0xdeadbeef, "SetMenuInfo() error got %u\n", gle); - SetLastError(0xdeadbeef); - mi.cbSize = 0; - ret = pSetMenuInfo( NULL, &mi); - gle= GetLastError(); - ok( !ret, "SetMenuInfo() should have failed\n"); - ok( gle == ERROR_INVALID_PARAMETER || - broken(gle == 0xdeadbeef), /* Win98, WinME */ - "SetMenuInfo() error got %u expected %u\n", gle, ERROR_INVALID_PARAMETER); - /* functional tests */ - /* menu and submenu should have the CHECKORBMP style bit cleared */ - SetLastError(0xdeadbeef); - mi.cbSize = sizeof( MENUINFO); - mi.fMask = MIM_STYLE; - ret = pGetMenuInfo( hmenu, &mi); - gle= GetLastError(); - ok( ret, "GetMenuInfo() should have succeeded\n"); - ok( gle == 0xdeadbeef, "GetMenuInfo() error got %u\n", gle); - ok( !(mi.dwStyle & MNS_CHECKORBMP), "menustyle was not expected to have the MNS_CHECKORBMP flag\n"); - SetLastError(0xdeadbeef); - mi.cbSize = sizeof( MENUINFO); - mi.fMask = MIM_STYLE; - ret = pGetMenuInfo( hsubmenu, &mi); - gle= GetLastError(); - ok( ret, "GetMenuInfo() should have succeeded\n"); - ok( gle == 0xdeadbeef, "GetMenuInfo() error got %u\n", gle); - ok( !(mi.dwStyle & MNS_CHECKORBMP), "menustyle was not expected to have the MNS_CHECKORBMP flag\n"); - /* SetMenuInfo() */ - SetLastError(0xdeadbeef); - mi.cbSize = sizeof( MENUINFO); - mi.fMask = MIM_STYLE | MIM_APPLYTOSUBMENUS; - mi.dwStyle = MNS_CHECKORBMP; - ret = pSetMenuInfo( hmenu, &mi); - gle= GetLastError(); - ok( ret, "SetMenuInfo() should have succeeded\n"); - ok( gle == 0xdeadbeef, "SetMenuInfo() error got %u\n", gle); - /* Now both menus should have the MNS_CHECKORBMP style bit set */ - SetLastError(0xdeadbeef); - mi.cbSize = sizeof( MENUINFO); - mi.fMask = MIM_STYLE; - ret = pGetMenuInfo( hmenu, &mi); - gle= GetLastError(); - ok( ret, "GetMenuInfo() should have succeeded\n"); - ok( gle == 0xdeadbeef, "GetMenuInfo() error got %u\n", gle); - ok( mi.dwStyle & MNS_CHECKORBMP, "menustyle was expected to have the MNS_CHECKORBMP flag\n"); - SetLastError(0xdeadbeef); - mi.cbSize = sizeof( MENUINFO); - mi.fMask = MIM_STYLE; - ret = pGetMenuInfo( hsubmenu, &mi); - gle= GetLastError(); - ok( ret, "GetMenuInfo() should have succeeded\n"); - ok( gle == 0xdeadbeef, "GetMenuInfo() error got %u\n", gle); - ok( mi.dwStyle & MNS_CHECKORBMP, "menustyle was expected to have the MNS_CHECKORBMP flag\n"); - /* now repeat that without the APPLYTOSUBMENUS flag and another style bit */ - SetLastError(0xdeadbeef); - mi.cbSize = sizeof( MENUINFO); - mi.fMask = MIM_STYLE ; - mi.dwStyle = MNS_NOCHECK; - ret = pSetMenuInfo( hmenu, &mi); - gle= GetLastError(); - ok( ret, "SetMenuInfo() should have succeeded\n"); - ok( gle == 0xdeadbeef, "SetMenuInfo() error got %u\n", gle); - /* Now only the top menu should have the MNS_NOCHECK style bit set */ - SetLastError(0xdeadbeef); - mi.cbSize = sizeof( MENUINFO); - mi.fMask = MIM_STYLE; - ret = pGetMenuInfo( hmenu, &mi); - gle= GetLastError(); - ok( ret, "GetMenuInfo() should have succeeded\n"); - ok( gle == 0xdeadbeef, "GetMenuInfo() error got %u\n", gle); - ok( mi.dwStyle & MNS_NOCHECK, "menustyle was expected to have the MNS_NOCHECK flag\n"); - SetLastError(0xdeadbeef); - mi.cbSize = sizeof( MENUINFO); - mi.fMask = MIM_STYLE; - ret = pGetMenuInfo( hsubmenu, &mi); - gle= GetLastError(); - ok( ret, "GetMenuInfo() should have succeeded\n"); - ok( gle == 0xdeadbeef, "GetMenuInfo() error got %u\n", gle); - ok( !(mi.dwStyle & MNS_NOCHECK), "menustyle was not expected to have the MNS_NOCHECK flag\n"); - /* clean up */ - DestroyMenu( hsubmenu); - DestroyMenu( hmenu); - return; -} - -/* little func to easy switch either TrackPopupMenu() or TrackPopupMenuEx() */ -static DWORD MyTrackPopupMenu( int ex, HMENU hmenu, UINT flags, INT x, INT y, HWND hwnd, LPTPMPARAMS ptpm) -{ - return ex - ? TrackPopupMenuEx( hmenu, flags, x, y, hwnd, ptpm) - : TrackPopupMenu( hmenu, flags, x, y, 0, hwnd, NULL); -} - -/* some TrackPopupMenu and TrackPopupMenuEx tests */ -/* the LastError values differ between NO_ERROR and invalid handle */ -/* between all windows versions tested. The first value is that valid on XP */ -/* Vista was the only that made returned different error values */ -/* between the TrackPopupMenu and TrackPopupMenuEx functions */ -static void test_menu_trackpopupmenu(void) -{ - BOOL ret; - HMENU hmenu; - DWORD gle; - int Ex; - HWND hwnd = CreateWindowEx(0, MAKEINTATOM(atomMenuCheckClass), NULL, - WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 200, 200, - NULL, NULL, NULL, NULL); - ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError()); - if (!hwnd) return; - SetWindowLongPtr( hwnd, GWLP_WNDPROC, (LONG_PTR)menu_ownerdraw_wnd_proc); - for( Ex = 0; Ex < 2; Ex++) - { - hmenu = CreatePopupMenu(); - ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError()); - if (!hmenu) - { - DestroyWindow(hwnd); - return; - } - /* display the menu */ - /* start with an invalid menu handle */ - SetLastError(0xdeadbeef); - - gflag_initmenupopup = gflag_entermenuloop = gflag_initmenu = 0; - ret = MyTrackPopupMenu( Ex, NULL, TPM_RETURNCMD, 100,100, hwnd, NULL); - gle = GetLastError(); - ok( !ret, "TrackPopupMenu%s should have failed\n", Ex ? "Ex" : ""); - ok( gle == ERROR_INVALID_MENU_HANDLE - || broken (gle == 0xdeadbeef) /* win95 */ - || broken (gle == NO_ERROR) /* win98/ME */ - ,"TrackPopupMenu%s error got %u expected %u\n", - Ex ? "Ex" : "", gle, ERROR_INVALID_MENU_HANDLE); - ok( !(gflag_initmenupopup || gflag_entermenuloop || gflag_initmenu), - "got unexpected message(s)%s%s%s\n", - gflag_initmenupopup ? " WM_INITMENUPOPUP ": " ", - gflag_entermenuloop ? "WM_INITMENULOOP ": "", - gflag_initmenu ? "WM_INITMENU": ""); - /* another one but not NULL */ - SetLastError(0xdeadbeef); - gflag_initmenupopup = gflag_entermenuloop = gflag_initmenu = 0; - ret = MyTrackPopupMenu( Ex, (HMENU)hwnd, TPM_RETURNCMD, 100,100, hwnd, NULL); - gle = GetLastError(); - ok( !ret, "TrackPopupMenu%s should have failed\n", Ex ? "Ex" : ""); - ok( gle == ERROR_INVALID_MENU_HANDLE - || broken (gle == 0xdeadbeef) /* win95 */ - || broken (gle == NO_ERROR) /* win98/ME */ - ,"TrackPopupMenu%s error got %u expected %u\n", - Ex ? "Ex" : "", gle, ERROR_INVALID_MENU_HANDLE); - ok( !(gflag_initmenupopup || gflag_entermenuloop || gflag_initmenu), - "got unexpected message(s)%s%s%s\n", - gflag_initmenupopup ? " WM_INITMENUPOPUP ": " ", - gflag_entermenuloop ? "WM_INITMENULOOP ": "", - gflag_initmenu ? "WM_INITMENU": ""); - - /* invalid window */ - SetLastError(0xdeadbeef); - gflag_initmenupopup = gflag_entermenuloop = gflag_initmenu = 0; - ret = MyTrackPopupMenu( Ex, hmenu, TPM_RETURNCMD, 100,100, 0, NULL); - gle = GetLastError(); - ok( !ret, "TrackPopupMenu%s should have failed\n", Ex ? "Ex" : ""); - ok( gle == ERROR_INVALID_WINDOW_HANDLE, "TrackPopupMenu%s error got %u\n", Ex ? "Ex" : "", gle ); - ok( !(gflag_initmenupopup || gflag_entermenuloop || gflag_initmenu), - "got unexpected message(s)%s%s%s\n", - gflag_initmenupopup ? " WM_INITMENUPOPUP ": " ", - gflag_entermenuloop ? "WM_INITMENULOOP ": "", - gflag_initmenu ? "WM_INITMENU": ""); - - /* now a somewhat successful call */ - SetLastError(0xdeadbeef); - gflag_initmenupopup = gflag_entermenuloop = gflag_initmenu = 0; - ret = MyTrackPopupMenu( Ex, hmenu, TPM_RETURNCMD, 100,100, hwnd, NULL); - gle = GetLastError(); - ok( ret == 0, "TrackPopupMenu%s returned %d expected zero\n", Ex ? "Ex" : "", ret); - ok( gle == NO_ERROR - || gle == ERROR_INVALID_MENU_HANDLE /* NT4, win2k */ - || broken (gle == 0xdeadbeef) /* win95 */ - ,"TrackPopupMenu%s error got %u expected %u or %u\n", - Ex ? "Ex" : "", gle, NO_ERROR, ERROR_INVALID_MENU_HANDLE); - ok( gflag_initmenupopup && gflag_entermenuloop && gflag_initmenu, - "missed expected message(s)%s%s%s\n", - !gflag_initmenupopup ? " WM_INITMENUPOPUP ": " ", - !gflag_entermenuloop ? "WM_INITMENULOOP ": "", - !gflag_initmenu ? "WM_INITMENU": ""); - /* and another */ - ret = AppendMenuA( hmenu, MF_STRING, 1, "winetest"); - ok( ret, "AppendMenA has failed!\n"); - SetLastError(0xdeadbeef); - gflag_initmenupopup = gflag_entermenuloop = gflag_initmenu = 0; - ret = MyTrackPopupMenu( Ex, hmenu, TPM_RETURNCMD, 100,100, hwnd, NULL); - gle = GetLastError(); - ok( ret == 0, "TrackPopupMenu%s returned %d expected zero\n", Ex ? "Ex" : "", ret); - ok( gle == NO_ERROR - || gle == ERROR_INVALID_MENU_HANDLE /* NT4, win2k and Vista in the TrackPopupMenuEx case */ - || broken (gle == 0xdeadbeef) /* win95 */ - ,"TrackPopupMenu%s error got %u expected %u or %u\n", - Ex ? "Ex" : "", gle, NO_ERROR, ERROR_INVALID_MENU_HANDLE); - ok( gflag_initmenupopup && gflag_entermenuloop && gflag_initmenu, - "missed expected message(s)%s%s%s\n", - !gflag_initmenupopup ? " WM_INITMENUPOPUP ": " ", - !gflag_entermenuloop ? "WM_INITMENULOOP ": "", - !gflag_initmenu ? "WM_INITMENU": ""); - DestroyMenu(hmenu); - } - /* clean up */ - DestroyWindow(hwnd); -} - -static HMENU g_hmenu; - -static LRESULT WINAPI menu_track_again_wnd_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - switch (msg) - { - case WM_ENTERMENULOOP: - { - BOOL ret; - - /* try a recursive call */ - SetLastError(0xdeadbeef); - ret = TrackPopupMenu(g_hmenu, 0, 100, 100, 0, hwnd, NULL); - ok(ret == FALSE, "got %d\n", ret); - ok(GetLastError() == ERROR_POPUP_ALREADY_ACTIVE || - broken(GetLastError() == 0xdeadbeef) /* W9x */, "got %d\n", GetLastError()); - - /* exit menu modal loop - * ( A SendMessage does not work on NT3.51 here ) */ - return PostMessage(hwnd, WM_CANCELMODE, 0, 0); - } - } - return DefWindowProc(hwnd, msg, wparam, lparam); -} - -static void test_menu_trackagain(void) -{ - HWND hwnd; - BOOL ret; - - hwnd = CreateWindowEx(0, MAKEINTATOM(atomMenuCheckClass), NULL, - WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 200, 200, - NULL, NULL, NULL, NULL); - ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError()); - if (!hwnd) return; - SetWindowLongPtr( hwnd, GWLP_WNDPROC, (LONG_PTR)menu_track_again_wnd_proc); - - g_hmenu = CreatePopupMenu(); - ok(g_hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError()); - - ret = TrackPopupMenu( g_hmenu, 0, 100, 100, 0, hwnd, NULL); - todo_wine ok(ret == FALSE, "got %d\n", ret); - - DestroyMenu(g_hmenu); - DestroyWindow(hwnd); -} - -/* test handling of WM_CANCELMODE messages */ -static int g_got_enteridle; -static HWND g_hwndtosend; -static LRESULT WINAPI menu_cancelmode_wnd_proc(HWND hwnd, UINT msg, - WPARAM wparam, LPARAM lparam) -{ - switch (msg) - { - case WM_ENTERMENULOOP: - g_got_enteridle = 0; - return SendMessage( g_hwndtosend, WM_CANCELMODE, 0, 0); - case WM_ENTERIDLE: - { - if( g_got_enteridle++ == 0) { - /* little hack to get another WM_ENTERIDLE message */ - PostMessage( hwnd, WM_MOUSEMOVE, 0, 0); - return SendMessage( g_hwndtosend, WM_CANCELMODE, 0, 0); - } - pEndMenu(); - return TRUE; - } - } - return DefWindowProc( hwnd, msg, wparam, lparam); -} - -static void test_menu_cancelmode(void) -{ - DWORD ret; - HWND hwnd, hwndchild; - HMENU menu; - if( !pEndMenu) { /* win95 */ - win_skip( "EndMenu is not available\n"); - return; - } - hwnd = CreateWindowEx( 0, MAKEINTATOM(atomMenuCheckClass), NULL, - WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 200, 200, - NULL, NULL, NULL, NULL); - hwndchild = CreateWindowEx( 0, MAKEINTATOM(atomMenuCheckClass), NULL, - WS_VISIBLE | WS_CHILD, 10, 10, 20, 20, - hwnd, NULL, NULL, NULL); - ok( hwnd != NULL && hwndchild != NULL, - "CreateWindowEx failed with error %d\n", GetLastError()); - g_hwndtosend = hwnd; - SetWindowLongPtr( hwnd, GWLP_WNDPROC, (LONG_PTR)menu_cancelmode_wnd_proc); - SetWindowLongPtr( hwndchild, GWLP_WNDPROC, (LONG_PTR)menu_cancelmode_wnd_proc); - menu = CreatePopupMenu(); - ok( menu != NULL, "CreatePopupMenu failed with error %d\n", GetLastError()); - ret = AppendMenuA( menu, MF_STRING, 1, "winetest"); - ok( ret, "Functie failed lasterror is %u\n", GetLastError()); - /* seems to be needed only on wine :( */ - {MSG msg; while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessage(&msg);} - /* test the effect of sending a WM_CANCELMODE message in the WM_INITMENULOOP - * handler of the menu owner */ - /* test results is extracted from variable g_got_enteridle. Possible values: - * 0 : complete conformance. Sending WM_CANCELMODE cancels a menu initializing tracking - * 1 : Sending WM_CANCELMODE cancels a menu that is in tracking state - * 2 : Sending WM_CANCELMODE does not work - */ - /* menu owner is top level window */ - g_hwndtosend = hwnd; - TrackPopupMenu( menu, TPM_RETURNCMD, 100,100, 0, hwnd, NULL); - todo_wine { - ok( g_got_enteridle == 0, "received %d WM_ENTERIDLE messages, none expected\n", g_got_enteridle); - } - ok( g_got_enteridle < 2, "received %d WM_ENTERIDLE messages, should be less than 2\n", g_got_enteridle); - /* menu owner is child window */ - g_hwndtosend = hwndchild; - TrackPopupMenu( menu, TPM_RETURNCMD, 100,100, 0, hwndchild, NULL); - todo_wine { - ok(g_got_enteridle == 0, "received %d WM_ENTERIDLE messages, none expected\n", g_got_enteridle); - } - ok(g_got_enteridle < 2, "received %d WM_ENTERIDLE messages, should be less than 2\n", g_got_enteridle); - /* now send the WM_CANCELMODE messages to the WRONG window */ - /* those should fail ( to have any effect) */ - g_hwndtosend = hwnd; - TrackPopupMenu( menu, TPM_RETURNCMD, 100,100, 0, hwndchild, NULL); - ok( g_got_enteridle == 2, "received %d WM_ENTERIDLE messages, should be 2\n", g_got_enteridle); - /* cleanup */ - DestroyMenu( menu); - DestroyWindow( hwndchild); - DestroyWindow( hwnd); -} - -/* show menu trees have a maximum depth */ -static void test_menu_maxdepth(void) -{ -#define NR_MENUS 100 - HMENU hmenus[ NR_MENUS]; - int i; - DWORD ret; - - SetLastError(12345678); - for( i = 0; i < NR_MENUS; i++) { - hmenus[i] = CreatePopupMenu(); - if( !hmenus[i]) break; - } - ok( i == NR_MENUS, "could not create more than %d menu's\n", i); - for( i = 1; i < NR_MENUS; i++) { - ret = AppendMenuA( hmenus[i], MF_POPUP, (UINT_PTR)hmenus[i-1],"test"); - if( !ret) break; - } - trace("Maximum depth is %d\n", i); - ok( GetLastError() == 12345678, "unexpected error %d\n", GetLastError()); - ok( i < NR_MENUS || - broken( i == NR_MENUS), /* win98, NT */ - "no ( or very large) limit on menu depth!\n"); - - for( i = 0; i < NR_MENUS; i++) - DestroyMenu( hmenus[i]); -} - -/* bug #12171 */ -static void test_menu_circref(void) -{ - HMENU menu1, menu2; - DWORD ret; - - menu1 = CreatePopupMenu(); - menu2 = CreatePopupMenu(); - ok( menu1 && menu2, "error creating menus.\n"); - ret = AppendMenuA( menu1, MF_POPUP, (UINT_PTR)menu2, "winetest"); - ok( ret, "AppendMenu failed, error is %d\n", GetLastError()); - ret = AppendMenuA( menu1, MF_STRING | MF_HILITE, 123, "winetest"); - ok( ret, "AppendMenu failed, error is %d\n", GetLastError()); - /* app chooses an id that happens to clash with its own hmenu */ - ret = AppendMenuA( menu2, MF_STRING, (UINT_PTR)menu2, "winetest"); - ok( ret, "AppendMenu failed, error is %d\n", GetLastError()); - /* now attempt to change the string of the first item of menu1 */ - ret = ModifyMenuA( menu1, (UINT_PTR)menu2, MF_POPUP, (UINT_PTR)menu2, "menu 2"); - ok( !ret || - broken( ret), /* win98, NT */ - "ModifyMenu should have failed.\n"); - if( !ret) { /* will probably stack fault if the ModifyMenu succeeded */ - ret = GetMenuState( menu1, 123, 0); - ok( ret == MF_HILITE, "GetMenuState returned %x\n",ret); - } - DestroyMenu( menu2); - DestroyMenu( menu1); -} - -/* test how the menu texts are aligned when the menu items have - * different combinations of text and bitmaps (bug #13350) */ -static void test_menualign(void) -{ - BYTE bmfill[300]; - HMENU menu; - HBITMAP hbm1, hbm2, hbm3; - MENUITEMINFO mii = { sizeof(MENUITEMINFO)}; - DWORD ret; - HWND hwnd; - MENUINFO mi = { sizeof( MENUINFO)}; - - if( !winetest_interactive) { - skip( "interactive alignment tests.\n"); - return; - } - hwnd = CreateWindowEx(0, - "STATIC", - "Menu text alignment Test\nPlease make a selection.", - WS_OVERLAPPEDWINDOW, - 100, 100, - 300, 300, - NULL, NULL, 0, NULL); - ShowWindow( hwnd, SW_SHOW); - /* create bitmaps */ - memset( bmfill, 0xcc, sizeof( bmfill)); - hbm1 = CreateBitmap( 10,10,1,1,bmfill); - hbm2 = CreateBitmap( 20,20,1,1,bmfill); - hbm3 = CreateBitmap( 50,6,1,1,bmfill); - ok( hbm1 && hbm2 && hbm3, "Creating bitmaps failed\n"); - menu = CreatePopupMenu(); - ok( menu != NULL, "CreatePopupMenu() failed\n"); - if( pGetMenuInfo) { - mi.fMask = MIM_STYLE; - ret = pGetMenuInfo( menu, &mi); - ok( ret, "GetMenuInfo failed: %d\n", GetLastError()); - ok( menu != NULL, "GetMenuInfo() failed\n"); - ok( 0 == mi.dwStyle, "menuinfo style is %x\n", mi.dwStyle); - } - /* test 1 */ - mii.fMask = MIIM_BITMAP | MIIM_STRING | MIIM_ID; - mii.wID = 1; - mii.hbmpItem = hbm1; - mii.dwTypeData = (LPSTR) " OK: menu texts are correctly left-aligned."; - ret = InsertMenuItem( menu, -1, TRUE, &mii); - ok( ret, "InsertMenuItem() failed\n"); - mii.fMask = MIIM_BITMAP | MIIM_STRING | MIIM_ID ; - mii.wID = 2; - mii.hbmpItem = hbm2; - mii.dwTypeData = (LPSTR) " FAIL: menu texts are NOT left-aligned."; - ret = InsertMenuItem( menu, -1, TRUE, &mii); - ok( ret, "InsertMenuItem() failed\n"); - ret = TrackPopupMenu( menu, TPM_RETURNCMD, 110, 200, 0, hwnd, NULL); - ok( ret != 2, "User indicated that menu text alignment test 1 failed %d\n", ret); - /* test 2*/ - mii.fMask = MIIM_BITMAP | MIIM_STRING | MIIM_ID; - mii.wID = 3; - mii.hbmpItem = hbm3; - mii.dwTypeData = NULL; - ret = InsertMenuItem( menu, 0, TRUE, &mii); - ok( ret, "InsertMenuItem() failed\n"); - mii.fMask = MIIM_BITMAP | MIIM_STRING | MIIM_ID; - mii.wID = 1; - mii.hbmpItem = hbm1; - /* make the text a bit longer, to keep it readable */ - /* this bug is on winXP and reproduced on wine */ - mii.dwTypeData = (LPSTR) " OK: menu texts are to the right of the bitmaps........"; - ret = SetMenuItemInfo( menu, 1, TRUE, &mii); - ok( ret, "SetMenuItemInfo() failed\n"); - mii.wID = 2; - mii.hbmpItem = hbm2; - mii.dwTypeData = (LPSTR) " FAIL: menu texts are below the first bitmap. "; - ret = SetMenuItemInfo( menu, 2, TRUE, &mii); - ok( ret, "SetMenuItemInfo() failed\n"); - ret = TrackPopupMenu( menu, TPM_RETURNCMD, 110, 200, 0, hwnd, NULL); - ok( ret != 2, "User indicated that menu text alignment test 2 failed %d\n", ret); - /* test 3 */ - mii.fMask = MIIM_TYPE | MIIM_ID; - mii.wID = 3; - mii.fType = MFT_BITMAP; - mii.dwTypeData = (LPSTR) hbm3; - ret = SetMenuItemInfo( menu, 0, TRUE, &mii); - ok( ret, "SetMenuItemInfo() failed\n"); - mii.fMask = MIIM_BITMAP | MIIM_STRING | MIIM_ID; - mii.wID = 1; - mii.hbmpItem = NULL; - mii.dwTypeData = (LPSTR) " OK: menu texts are below the bitmap."; - ret = SetMenuItemInfo( menu, 1, TRUE, &mii); - ok( ret, "SetMenuItemInfo() failed\n"); - mii.wID = 2; - mii.hbmpItem = NULL; - mii.dwTypeData = (LPSTR) " FAIL: menu texts are NOT below the bitmap."; - ret = SetMenuItemInfo( menu, 2, TRUE, &mii); - ok( ret, "SetMenuItemInfo() failed\n"); - ret = TrackPopupMenu( menu, TPM_RETURNCMD, 110, 200, 0, hwnd, NULL); - ok( ret != 2, "User indicated that menu text alignment test 3 failed %d\n", ret); - /* cleanup */ - DeleteObject( hbm1); - DeleteObject( hbm2); - DeleteObject( hbm3); - DestroyMenu( menu); - DestroyWindow( hwnd); -} - -START_TEST(menu) -{ - init_function_pointers(); - - /* Wine defines MENUITEMINFO for W2K and above. NT4 and below can't - * handle that. - */ - if (correct_behavior()) - { - test_menu_add_string(); - test_menu_iteminfo(); - test_menu_search_bycommand(); - test_CheckMenuRadioItem(); - test_menu_resource_layout(); - test_InsertMenu(); - test_menualign(); - } - - register_menu_check_class(); - - test_menu_locked_by_window(); - test_subpopup_locked_by_menu(); - test_menu_ownerdraw(); - test_menu_bmp_and_string(); - test_menu_getmenuinfo(); - test_menu_setmenuinfo(); - test_menu_input(); - test_menu_flags(); - - test_menu_hilitemenuitem(); - test_menu_trackpopupmenu(); - test_menu_trackagain(); - test_menu_cancelmode(); - test_menu_maxdepth(); - test_menu_circref(); -} diff --git a/rostests/winetests/user32/monitor.c b/rostests/winetests/user32/monitor.c deleted file mode 100644 index e31019f6708..00000000000 --- a/rostests/winetests/user32/monitor.c +++ /dev/null @@ -1,408 +0,0 @@ -/* - * Unit tests for monitor APIs - * - * Copyright 2005 Huw Davies - * Copyright 2008 Dmitry Timoshkov - * - * 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/test.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" - -static HMODULE hdll; -static LONG (WINAPI *pChangeDisplaySettingsExA)(LPCSTR, LPDEVMODEA, HWND, DWORD, LPVOID); -static LONG (WINAPI *pChangeDisplaySettingsExW)(LPCWSTR, LPDEVMODEW, HWND, DWORD, LPVOID); -static BOOL (WINAPI *pEnumDisplayDevicesA)(LPCSTR,DWORD,LPDISPLAY_DEVICEA,DWORD); -static BOOL (WINAPI *pEnumDisplayMonitors)(HDC,LPRECT,MONITORENUMPROC,LPARAM); -static BOOL (WINAPI *pGetMonitorInfoA)(HMONITOR,LPMONITORINFO); -static HMONITOR (WINAPI *pMonitorFromPoint)(POINT,DWORD); -static HMONITOR (WINAPI *pMonitorFromWindow)(HWND,DWORD); - -static void init_function_pointers(void) -{ - hdll = GetModuleHandleA("user32.dll"); - -#define GET_PROC(func) \ - p ## func = (void*)GetProcAddress(hdll, #func); \ - if(!p ## func) \ - trace("GetProcAddress(%s) failed\n", #func); - - GET_PROC(ChangeDisplaySettingsExA) - GET_PROC(ChangeDisplaySettingsExW) - GET_PROC(EnumDisplayDevicesA) - GET_PROC(EnumDisplayMonitors) - GET_PROC(GetMonitorInfoA) - GET_PROC(MonitorFromPoint) - GET_PROC(MonitorFromWindow) - -#undef GET_PROC -} - -static BOOL CALLBACK monitor_enum_proc(HMONITOR hmon, HDC hdc, LPRECT lprc, - LPARAM lparam) -{ - MONITORINFOEXA mi; - char *primary = (char *)lparam; - - mi.cbSize = sizeof(mi); - - ok(pGetMonitorInfoA(hmon, (MONITORINFO*)&mi), "GetMonitorInfo failed\n"); - if (mi.dwFlags & MONITORINFOF_PRIMARY) - strcpy(primary, mi.szDevice); - - return TRUE; -} - -static void test_enumdisplaydevices(void) -{ - DISPLAY_DEVICEA dd; - char primary_device_name[32]; - char primary_monitor_device_name[32]; - DWORD primary_num = -1, num = 0; - BOOL ret; - - if (!pEnumDisplayDevicesA) - { - win_skip("EnumDisplayDevicesA is not available\n"); - return; - } - - dd.cb = sizeof(dd); - while(1) - { - BOOL ret; - HDC dc; - ret = pEnumDisplayDevicesA(NULL, num, &dd, 0); - if(!ret) break; - if(dd.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE) - { - strcpy(primary_device_name, dd.DeviceName); - primary_num = num; - } - if(dd.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP) - { - /* test creating DC */ - dc = CreateDCA(dd.DeviceName, NULL, NULL, NULL); - ok(dc != NULL, "Failed to CreateDC(\"%s\") err=%d\n", dd.DeviceName, GetLastError()); - DeleteDC(dc); - } - num++; - } - - if (primary_num == -1 || !pEnumDisplayMonitors || !pGetMonitorInfoA) - { - win_skip("EnumDisplayMonitors or GetMonitorInfoA are not available\n"); - return; - } - - primary_monitor_device_name[0] = 0; - ret = pEnumDisplayMonitors(NULL, NULL, monitor_enum_proc, (LPARAM)primary_monitor_device_name); - ok(ret, "EnumDisplayMonitors failed\n"); - ok(!strcmp(primary_monitor_device_name, primary_device_name), - "monitor device name %s, device name %s\n", primary_monitor_device_name, - primary_device_name); -} - -struct vid_mode -{ - DWORD w, h, bpp, freq, fields; - BOOL must_succeed; -}; - -static const struct vid_mode vid_modes_test[] = { - {640, 480, 0, 0, DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL | DM_DISPLAYFREQUENCY, 1}, - {640, 480, 0, 0, DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY, 1}, - {640, 480, 0, 0, DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL , 1}, - {640, 480, 0, 0, DM_PELSWIDTH | DM_PELSHEIGHT , 1}, - {640, 480, 0, 0, DM_BITSPERPEL , 0}, - {640, 480, 0, 0, DM_DISPLAYFREQUENCY, 0}, - - {0, 0, 0, 0, DM_PELSWIDTH, 0}, - {0, 0, 0, 0, DM_PELSHEIGHT, 0}, - - {640, 480, 0, 0, DM_PELSWIDTH, 0}, - {640, 480, 0, 0, DM_PELSHEIGHT, 0}, - { 0, 480, 0, 0, DM_PELSWIDTH | DM_PELSHEIGHT, 0}, - {640, 0, 0, 0, DM_PELSWIDTH | DM_PELSHEIGHT, 0}, - - /* the following test succeeds under XP SP3 - {0, 0, 0, 0, DM_DISPLAYFREQUENCY, 0} - */ -}; -#define vid_modes_cnt (sizeof(vid_modes_test) / sizeof(vid_modes_test[0])) - -static void test_ChangeDisplaySettingsEx(void) -{ - DEVMODEA dm; - DEVMODEW dmW; - DWORD width; - LONG res; - int i; - - if (!pChangeDisplaySettingsExA) - { - win_skip("ChangeDisplaySettingsExA is not available\n"); - return; - } - - SetLastError(0xdeadbeef); - res = EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dm); - ok(res, "EnumDisplaySettings error %u\n", GetLastError()); - - width = dm.dmPelsWidth; - - dm.dmDriverExtra = 1; - res = ChangeDisplaySettingsA(&dm, CDS_TEST); - ok(res == DISP_CHANGE_SUCCESSFUL, - "ChangeDisplaySettingsA returned %d, expected DISP_CHANGE_SUCCESSFUL\n", res); - ok(dm.dmDriverExtra == 0 || broken(dm.dmDriverExtra == 1) /* win9x */, - "ChangeDisplaySettingsA didn't reset dmDriverExtra to 0\n"); - - /* crashes under XP SP3 for large dmDriverExtra values */ - dm.dmDriverExtra = 1; - res = pChangeDisplaySettingsExA(NULL, &dm, NULL, CDS_TEST, NULL); - ok(res == DISP_CHANGE_SUCCESSFUL, - "ChangeDisplaySettingsExW returned %d, expected DISP_CHANGE_BADMODE\n", res); - ok(dm.dmDriverExtra == 1, "ChangeDisplaySettingsExA shouldn't reset dmDriverExtra to 0\n"); - - memset(&dmW, 0, sizeof(dmW)); - dmW.dmSize = sizeof(dmW); - dmW.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT; - dmW.dmPelsWidth = dm.dmPelsWidth; - dmW.dmPelsHeight = dm.dmPelsHeight; - dmW.dmDriverExtra = 1; - SetLastError(0xdeadbeef); - res = ChangeDisplaySettingsW(&dmW, CDS_TEST); - if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) - { - ok(res == DISP_CHANGE_SUCCESSFUL, - "ChangeDisplaySettingsW returned %d, expected DISP_CHANGE_SUCCESSFUL\n", res); - ok(dmW.dmDriverExtra == 0, "ChangeDisplaySettingsW didn't reset dmDriverExtra to 0\n"); - } - - /* Apparently XP treats dmDriverExtra being != 0 as an error */ - dmW.dmDriverExtra = 1; - res = pChangeDisplaySettingsExW(NULL, &dmW, NULL, CDS_TEST, NULL); - if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) - { - ok(res == DISP_CHANGE_SUCCESSFUL, - "ChangeDisplaySettingsExW returned %d, expected DISP_CHANGE_BADMODE\n", res); - ok(dmW.dmDriverExtra == 1, "ChangeDisplaySettingsExW shouldn't reset dmDriverExtra to 0\n"); - } - - /* the following 2 tests show that dm.dmSize being 0 is invalid, but - * ChangeDisplaySettingsExA still reports success. - */ - memset(&dm, 0, sizeof(dm)); - dm.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT; - dm.dmPelsWidth = width; - res = pChangeDisplaySettingsExA(NULL, &dm, NULL, CDS_TEST, NULL); - ok(res == DISP_CHANGE_SUCCESSFUL || - res == DISP_CHANGE_BADMODE || /* Win98, WinMe */ - res == DISP_CHANGE_FAILED, /* NT4 */ - "ChangeDisplaySettingsExA returned unexpected %d\n", res); - - memset(&dmW, 0, sizeof(dmW)); - dmW.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT; - dmW.dmPelsWidth = width; - SetLastError(0xdeadbeef); - res = pChangeDisplaySettingsExW(NULL, &dmW, NULL, CDS_TEST, NULL); - if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) - ok(res == DISP_CHANGE_FAILED || - res == DISP_CHANGE_BADPARAM || /* NT4 */ - res == DISP_CHANGE_BADMODE /* XP SP3 */, - "ChangeDisplaySettingsExW returned %d\n", res); - - memset(&dm, 0, sizeof(dm)); - dm.dmSize = sizeof(dm); - - for (i = 0; i < vid_modes_cnt; i++) - { - dm.dmPelsWidth = vid_modes_test[i].w; - dm.dmPelsHeight = vid_modes_test[i].h; - dm.dmBitsPerPel = vid_modes_test[i].bpp; - dm.dmDisplayFrequency = vid_modes_test[i].freq; - dm.dmFields = vid_modes_test[i].fields; - res = pChangeDisplaySettingsExA(NULL, &dm, NULL, CDS_TEST, NULL); - ok(vid_modes_test[i].must_succeed ? - (res == DISP_CHANGE_SUCCESSFUL || res == DISP_CHANGE_RESTART) : - (res == DISP_CHANGE_SUCCESSFUL || res == DISP_CHANGE_RESTART || - res == DISP_CHANGE_BADMODE || res == DISP_CHANGE_BADPARAM), - "Unexpected ChangeDisplaySettingsEx() return code for resolution[%d]: %d\n", i, res); - - if (res == DISP_CHANGE_SUCCESSFUL) - { - RECT r, r1, virt; - - SetRect(&virt, 0, 0, GetSystemMetrics(SM_CXVIRTUALSCREEN), GetSystemMetrics(SM_CYVIRTUALSCREEN)); - if (IsRectEmpty(&virt)) /* NT4 doesn't have SM_CX/YVIRTUALSCREEN */ - SetRect(&virt, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)); - OffsetRect(&virt, GetSystemMetrics(SM_XVIRTUALSCREEN), GetSystemMetrics(SM_YVIRTUALSCREEN)); - - /* Resolution change resets clip rect */ - ok(GetClipCursor(&r), "GetClipCursor() failed\n"); - ok(EqualRect(&r, &virt), "Invalid clip rect: (%d %d) x (%d %d)\n", r.left, r.top, r.right, r.bottom); - - if (!ClipCursor(NULL)) continue; - ok(GetClipCursor(&r), "GetClipCursor() failed\n"); - ok(EqualRect(&r, &virt), "Invalid clip rect: (%d %d) x (%d %d)\n", r.left, r.top, r.right, r.bottom); - - /* This should always work. Primary monitor is at (0,0) */ - SetRect(&r1, 10, 10, 20, 20); - ok(ClipCursor(&r1), "ClipCursor() failed\n"); - ok(GetClipCursor(&r), "GetClipCursor() failed\n"); - ok(EqualRect(&r, &r1), "Invalid clip rect: (%d %d) x (%d %d)\n", r.left, r.top, r.right, r.bottom); - SetRect(&r1, 10, 10, 10, 10); - ok(ClipCursor(&r1), "ClipCursor() failed\n"); - ok(GetClipCursor(&r), "GetClipCursor() failed\n"); - ok(EqualRect(&r, &r1), "Invalid clip rect: (%d %d) x (%d %d)\n", r.left, r.top, r.right, r.bottom); - SetRect(&r1, 10, 10, 10, 9); - ok(!ClipCursor(&r1), "ClipCursor() succeeded\n"); - /* Windows bug: further clipping fails once an empty rect is set, so we have to reset it */ - ClipCursor(NULL); - - SetRect(&r1, virt.left - 10, virt.top - 10, virt.right + 20, virt.bottom + 20); - ok(ClipCursor(&r1), "ClipCursor() failed\n"); - ok(GetClipCursor(&r), "GetClipCursor() failed\n"); - ok(EqualRect(&r, &virt) || - broken(EqualRect(&r, &r1)) /* win9x */, - "Invalid clip rect: (%d %d) x (%d %d)\n", r.left, r.top, r.right, r.bottom); - ClipCursor(&virt); - } - } - res = pChangeDisplaySettingsExA(NULL, NULL, NULL, CDS_RESET, NULL); - ok(res == DISP_CHANGE_SUCCESSFUL, "Failed to reset default resolution: %d\n", res); -} - -static void test_monitors(void) -{ - HMONITOR monitor, primary; - POINT pt; - - if (!pMonitorFromPoint || !pMonitorFromWindow) - { - win_skip("MonitorFromPoint or MonitorFromWindow are not available\n"); - return; - } - - pt.x = pt.y = 0; - primary = pMonitorFromPoint( pt, MONITOR_DEFAULTTOPRIMARY ); - ok( primary != 0, "couldn't get primary monitor\n" ); - - monitor = pMonitorFromWindow( 0, MONITOR_DEFAULTTONULL ); - ok( !monitor, "got %p, should not get a monitor for an invalid window\n", monitor ); - monitor = pMonitorFromWindow( 0, MONITOR_DEFAULTTOPRIMARY ); - ok( monitor == primary, "got %p, should get primary %p for MONITOR_DEFAULTTOPRIMARY\n", monitor, primary ); - monitor = pMonitorFromWindow( 0, MONITOR_DEFAULTTONEAREST ); - ok( monitor == primary, "got %p, should get primary %p for MONITOR_DEFAULTTONEAREST\n", monitor, primary ); -} - -static BOOL CALLBACK find_primary_mon(HMONITOR hmon, HDC hdc, LPRECT rc, LPARAM lp) -{ - MONITORINFO mi; - BOOL ret; - - mi.cbSize = sizeof(mi); - ret = pGetMonitorInfoA(hmon, &mi); - ok(ret, "GetMonitorInfo failed\n"); - if (mi.dwFlags & MONITORINFOF_PRIMARY) - { - *(HMONITOR *)lp = hmon; - return FALSE; - } - return TRUE; -} - -static void test_work_area(void) -{ - HMONITOR hmon; - MONITORINFO mi; - RECT rc_work, rc_normal; - HWND hwnd; - WINDOWPLACEMENT wp; - BOOL ret; - - if (!pEnumDisplayMonitors || !pGetMonitorInfoA) - { - win_skip("EnumDisplayMonitors or GetMonitorInfoA are not available\n"); - return; - } - - hmon = 0; - ret = pEnumDisplayMonitors(NULL, NULL, find_primary_mon, (LPARAM)&hmon); - ok(!ret && hmon != 0, "Failed to find primary monitor\n"); - - mi.cbSize = sizeof(mi); - SetLastError(0xdeadbeef); - ret = pGetMonitorInfoA(hmon, &mi); - ok(ret, "GetMonitorInfo error %u\n", GetLastError()); - ok(mi.dwFlags & MONITORINFOF_PRIMARY, "not a primary monitor\n"); - trace("primary monitor (%d,%d-%d,%d)\n", - mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom); - - SetLastError(0xdeadbeef); - ret = SystemParametersInfo(SPI_GETWORKAREA, 0, &rc_work, 0); - ok(ret, "SystemParametersInfo error %u\n", GetLastError()); - trace("work area (%d,%d-%d,%d)\n", rc_work.left, rc_work.top, rc_work.right, rc_work.bottom); - ok(EqualRect(&rc_work, &mi.rcWork), "work area is different\n"); - - hwnd = CreateWindowEx(0, "static", NULL, WS_OVERLAPPEDWINDOW|WS_VISIBLE,100,100,10,10,0,0,0,NULL); - ok(hwnd != 0, "CreateWindowEx failed\n"); - - ret = GetWindowRect(hwnd, &rc_normal); - ok(ret, "GetWindowRect failed\n"); - trace("normal (%d,%d-%d,%d)\n", rc_normal.left, rc_normal.top, rc_normal.right, rc_normal.bottom); - - wp.length = sizeof(wp); - ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "GetWindowPlacement failed\n"); - trace("min: %d,%d max %d,%d normal %d,%d-%d,%d\n", - wp.ptMinPosition.x, wp.ptMinPosition.y, - wp.ptMaxPosition.x, wp.ptMaxPosition.y, - wp.rcNormalPosition.left, wp.rcNormalPosition.top, - wp.rcNormalPosition.right, wp.rcNormalPosition.bottom); - OffsetRect(&wp.rcNormalPosition, rc_work.left, rc_work.top); - if (mi.rcMonitor.left != mi.rcWork.left || - mi.rcMonitor.top != mi.rcWork.top) /* FIXME: remove once Wine is fixed */ - todo_wine ok(EqualRect(&rc_normal, &wp.rcNormalPosition), "normal pos is different\n"); - else - ok(EqualRect(&rc_normal, &wp.rcNormalPosition), "normal pos is different\n"); - - SetWindowLong(hwnd, GWL_EXSTYLE, WS_EX_TOOLWINDOW); - - wp.length = sizeof(wp); - ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "GetWindowPlacement failed\n"); - trace("min: %d,%d max %d,%d normal %d,%d-%d,%d\n", - wp.ptMinPosition.x, wp.ptMinPosition.y, - wp.ptMaxPosition.x, wp.ptMaxPosition.y, - wp.rcNormalPosition.left, wp.rcNormalPosition.top, - wp.rcNormalPosition.right, wp.rcNormalPosition.bottom); - ok(EqualRect(&rc_normal, &wp.rcNormalPosition), "normal pos is different\n"); - - DestroyWindow(hwnd); -} - -START_TEST(monitor) -{ - init_function_pointers(); - test_enumdisplaydevices(); - test_ChangeDisplaySettingsEx(); - test_monitors(); - test_work_area(); -} diff --git a/rostests/winetests/user32/msg.c b/rostests/winetests/user32/msg.c deleted file mode 100755 index 2e11d8e7fa2..00000000000 --- a/rostests/winetests/user32/msg.c +++ /dev/null @@ -1,13599 +0,0 @@ -/* - * Unit tests for window message handling - * - * Copyright 1999 Ove Kaaven - * Copyright 2003 Dimitrie O. Paun - * Copyright 2004, 2005 Dmitry Timoshkov - * - * 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 _WIN32_WINNT 0x0600 /* For WM_CHANGEUISTATE,QS_RAWINPUT,WM_DWMxxxx */ -//#define WINVER 0x0600 /* for WM_GETTITLEBARINFOEX */ - -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winnls.h" - -#include "wine/test.h" - -#define MDI_FIRST_CHILD_ID 2004 - -/* undocumented SWP flags - from SDK 3.1 */ -#define SWP_NOCLIENTSIZE 0x0800 -#define SWP_NOCLIENTMOVE 0x1000 -#define SWP_STATECHANGED 0x8000 - -#define SW_NORMALNA 0xCC /* undoc. flag in MinMaximize */ - -#ifndef WM_KEYF1 -#define WM_KEYF1 0x004d -#endif - -#ifndef WM_SYSTIMER -#define WM_SYSTIMER 0x0118 -#endif - -#define WND_PARENT_ID 1 -#define WND_POPUP_ID 2 -#define WND_CHILD_ID 3 - -#ifndef WM_LBTRACKPOINT -#define WM_LBTRACKPOINT 0x0131 -#endif - -/* encoded DRAWITEMSTRUCT into an LPARAM */ -typedef struct -{ - union - { - struct - { - UINT type : 4; /* ODT_* flags */ - UINT ctl_id : 4; /* Control ID */ - UINT item_id : 4; /* Menu item ID */ - UINT action : 4; /* ODA_* flags */ - UINT state : 16; /* ODS_* flags */ - } item; - LPARAM lp; - } u; -} DRAW_ITEM_STRUCT; - -static BOOL test_DestroyWindow_flag; -static HWINEVENTHOOK hEvent_hook; -static HHOOK hKBD_hook; -static HHOOK hCBT_hook; -static DWORD cbt_hook_thread_id; - -static const WCHAR testWindowClassW[] = -{ 'T','e','s','t','W','i','n','d','o','w','C','l','a','s','s','W',0 }; - -/* -FIXME: add tests for these -Window Edge Styles (Win31/Win95/98 look), in order of precedence: - WS_EX_DLGMODALFRAME: double border, WS_CAPTION allowed - WS_THICKFRAME: thick border - WS_DLGFRAME: double border, WS_CAPTION not allowed (but possibly shown anyway) - WS_BORDER (default for overlapped windows): single black border - none (default for child (and popup?) windows): no border -*/ - -typedef enum { - sent=0x1, - posted=0x2, - parent=0x4, - wparam=0x8, - lparam=0x10, - defwinproc=0x20, - beginpaint=0x40, - optional=0x80, - hook=0x100, - winevent_hook=0x200, - kbd_hook=0x400 -} msg_flags_t; - -struct message { - UINT message; /* the WM_* code */ - msg_flags_t flags; /* message props */ - WPARAM wParam; /* expected value of wParam */ - LPARAM lParam; /* expected value of lParam */ - WPARAM wp_mask; /* mask for wParam checks */ - LPARAM lp_mask; /* mask for lParam checks */ -}; - -struct recvd_message { - UINT message; /* the WM_* code */ - msg_flags_t flags; /* message props */ - HWND hwnd; /* window that received the message */ - WPARAM wParam; /* expected value of wParam */ - LPARAM lParam; /* expected value of lParam */ - int line; /* source line where logged */ - const char *descr; /* description for trace output */ - char output[512]; /* trace output */ -}; - -/* Empty message sequence */ -static const struct message WmEmptySeq[] = -{ - { 0 } -}; -/* CreateWindow (for overlapped window, not initially visible) (16/32) */ -static const struct message WmCreateOverlappedSeq[] = { - { HCBT_CREATEWND, hook }, - { WM_GETMINMAXINFO, sent }, - { WM_NCCREATE, sent }, - { WM_NCCALCSIZE, sent|wparam, 0 }, - { 0x0093, sent|defwinproc|optional }, - { 0x0094, sent|defwinproc|optional }, - { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, 0, 0 }, - { WM_CREATE, sent }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 }, - { 0 } -}; -/* SetWindowPos(SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE) - * for a not visible overlapped window. - */ -static const struct message WmSWP_ShowOverlappedSeq[] = { - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_NCPAINT, sent|wparam|optional, 1 }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - { HCBT_ACTIVATE, hook }, - { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 }, - { WM_NOTIFYFORMAT, sent|optional }, - { WM_QUERYUISTATE, sent|optional }, - { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* Win9x: SWP_NOSENDCHANGING */ - { WM_ACTIVATEAPP, sent|wparam, 1 }, - { WM_NCACTIVATE, sent }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ACTIVATE, sent|wparam, 1 }, - { HCBT_SETFOCUS, hook }, - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, - { WM_GETTEXT, sent|optional }, - { WM_NCPAINT, sent|wparam|optional, 1 }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - /* Win9x adds SWP_NOZORDER below */ - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_GETTEXT, sent|optional }, - { WM_NCCALCSIZE, sent|wparam|optional, 1 }, - { WM_NCPAINT, sent|wparam|optional, 1 }, - { WM_ERASEBKGND, sent|optional }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SYNCPAINT, sent|optional }, - { WM_GETTITLEBARINFOEX, sent|optional }, - { WM_PAINT, sent|optional }, - { WM_NCPAINT, sent|beginpaint|optional }, - { WM_GETTEXT, sent|beginpaint|defwinproc|optional }, - { WM_ERASEBKGND, sent|beginpaint|optional }, - { 0 } -}; -/* SetWindowPos(SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE) - * for a visible overlapped window. - */ -static const struct message WmSWP_HideOverlappedSeq[] = { - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 }, - { HCBT_ACTIVATE, hook|optional }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, - { WM_ACTIVATEAPP, sent|wparam|optional, 1 }, - { WM_NCACTIVATE, sent|optional }, - { WM_ACTIVATE, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { 0 } -}; - -/* SetWindowPos(SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOMOVE) - * for a visible overlapped window. - */ -static const struct message WmSWP_ResizeSeq[] = { - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOACTIVATE|SWP_NOMOVE }, - { WM_GETMINMAXINFO, sent|defwinproc }, - { WM_NCCALCSIZE, sent|wparam|optional, TRUE }, - { WM_NCPAINT, sent|optional }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOCLIENTMOVE }, - { WM_SIZE, sent|defwinproc|optional }, - { WM_NCCALCSIZE, sent|wparam|optional, TRUE }, - { WM_NCPAINT, sent|optional }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* XP sends a duplicate */ - { 0 } -}; - -/* SetWindowPos(SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOMOVE) - * for a visible popup window. - */ -static const struct message WmSWP_ResizePopupSeq[] = { - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOACTIVATE|SWP_NOMOVE }, - { WM_GETMINMAXINFO, sent|defwinproc|optional }, /* Win9x */ - { WM_NCCALCSIZE, sent|wparam|optional, TRUE }, - { WM_NCPAINT, sent|optional }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOCLIENTMOVE }, - { WM_SIZE, sent|defwinproc|wparam|optional, SIZE_RESTORED }, - { WM_NCCALCSIZE, sent|wparam|optional, TRUE }, - { WM_NCPAINT, sent|optional }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { 0 } -}; - -/* SetWindowPos(SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOSIZE) - * for a visible overlapped window. - */ -static const struct message WmSWP_MoveSeq[] = { - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOACTIVATE|SWP_NOSIZE }, - { WM_NCPAINT, sent|optional }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOCLIENTSIZE }, - { WM_MOVE, sent|defwinproc|wparam, 0 }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { 0 } -}; -/* Resize with SetWindowPos(SWP_NOZORDER) - * for a visible overlapped window - * SWP_NOZORDER is stripped by the logging code - */ -static const struct message WmSWP_ResizeNoZOrder[] = { - { WM_WINDOWPOSCHANGING, sent|wparam, /*SWP_NOZORDER|*/SWP_NOACTIVATE }, - { WM_GETMINMAXINFO, sent|defwinproc }, - { WM_NCCALCSIZE, sent|wparam|optional, 1 }, - { WM_NCPAINT, sent|optional }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, /*SWP_NOZORDER|*/SWP_NOACTIVATE, 0, - SWP_NOMOVE|SWP_NOCLIENTMOVE|SWP_NOSIZE|SWP_NOCLIENTSIZE }, - { WM_MOVE, sent|defwinproc|optional }, - { WM_SIZE, sent|defwinproc|optional }, - { WM_NCCALCSIZE, sent|wparam|optional, 1 }, /* Win9x doesn't send it */ - { WM_NCPAINT, sent|optional }, /* Win9x doesn't send it */ - { WM_GETTEXT, sent|defwinproc|optional }, /* Win9x doesn't send it */ - { WM_ERASEBKGND, sent|optional }, /* Win9x doesn't send it */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { 0 } -}; - -/* Switch visible mdi children */ -static const struct message WmSwitchChild[] = { - /* Switch MDI child */ - { WM_MDIACTIVATE, sent },/* in the MDI client */ - { WM_WINDOWPOSCHANGING, sent|wparam,SWP_NOSIZE|SWP_NOMOVE },/* in the 1st MDI child */ - { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_CHILDACTIVATE, sent },/* in the 1st MDI child */ - /* Deactivate 2nd MDI child */ - { WM_NCACTIVATE, sent|wparam|defwinproc, 0 }, /* in the 2nd MDI child */ - { WM_MDIACTIVATE, sent|defwinproc }, /* in the 2nd MDI child */ - { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, - /* Preparing for maximize and maximize the 1st MDI child */ - { WM_GETMINMAXINFO, sent|defwinproc }, /* in the 1st MDI child */ - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_STATECHANGED }, /* in the 1st MDI child */ - { WM_NCCALCSIZE, sent|wparam|defwinproc, 1 }, /* in the 1st MDI child */ - { WM_CHILDACTIVATE, sent|defwinproc }, /* in the 1st MDI child */ - { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, /* in the 1st MDI child */ - { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, /* in the 1st MDI child */ - /* Lock redraw 2nd MDI child */ - { WM_SETREDRAW, sent|wparam|defwinproc, 0 }, /* in the 2nd MDI child */ - { HCBT_MINMAX, hook|lparam, 0, SW_NORMALNA }, - /* Restore 2nd MDI child */ - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_STATECHANGED },/* in the 2nd MDI child */ - { WM_NCCALCSIZE, sent|wparam|defwinproc, 1 },/* in the 2nd MDI child */ - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, /* in the 2nd MDI child */ - { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, /* in the 2nd MDI child */ - { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, /* in the 2nd MDI child */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* in the 2nd MDI child */ - /* Redraw 2nd MDI child */ - { WM_SETREDRAW, sent|wparam|defwinproc, 1 },/* in the 2nd MDI child */ - /* Redraw MDI frame */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE },/* in MDI frame */ - { WM_NCCALCSIZE, sent|wparam, 1 },/* in MDI frame */ - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE}, /* in MDI frame */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* in MDI frame */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* in the 1st MDI child */ - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, /* in the 1st MDI child */ - { WM_NCACTIVATE, sent|wparam|defwinproc, 1 }, /* in the 1st MDI child */ - { HCBT_SETFOCUS, hook }, - { WM_KILLFOCUS, sent|defwinproc }, /* in the 2nd MDI child */ - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 0 },/* in the 1st MDI child */ - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent },/* in the MDI client */ - { HCBT_SETFOCUS, hook }, - { WM_KILLFOCUS, sent },/* in the MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, /* in the 1st MDI child */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|defwinproc }, /* in the 1st MDI child */ - { WM_MDIACTIVATE, sent|defwinproc },/* in the 1st MDI child */ - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, /* in the 1st MDI child */ - { 0 } -}; - -/* Switch visible not maximized mdi children */ -static const struct message WmSwitchNotMaximizedChild[] = { - /* Switch not maximized MDI child */ - { WM_MDIACTIVATE, sent },/* in the MDI client */ - { WM_WINDOWPOSCHANGING, sent|wparam,SWP_NOSIZE|SWP_NOMOVE },/* in the 2nd MDI child */ - { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_CHILDACTIVATE, sent },/* in the 2nd MDI child */ - /* Deactivate 1st MDI child */ - { WM_NCACTIVATE, sent|wparam|defwinproc, 0 }, /* in the 1st MDI child */ - { WM_MDIACTIVATE, sent|defwinproc }, /* in the 1st MDI child */ - /* Activate 2nd MDI child */ - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE}, /* in the 2nd MDI child */ - { WM_NCACTIVATE, sent|wparam|defwinproc, 1 }, /* in the 2nd MDI child */ - { HCBT_SETFOCUS, hook }, /* in the 1st MDI child */ - { WM_KILLFOCUS, sent|defwinproc }, /* in the 1st MDI child */ - { WM_IME_SETCONTEXT, sent|defwinproc|optional }, /* in the 1st MDI child */ - { WM_IME_SETCONTEXT, sent|optional }, /* in the MDI client */ - { WM_SETFOCUS, sent, 0 }, /* in the MDI client */ - { HCBT_SETFOCUS, hook }, - { WM_KILLFOCUS, sent }, /* in the MDI client */ - { WM_IME_SETCONTEXT, sent|optional }, /* in the MDI client */ - { WM_IME_SETCONTEXT, sent|defwinproc|optional }, /* in the 1st MDI child */ - { WM_SETFOCUS, sent|defwinproc }, /* in the 2nd MDI child */ - { WM_MDIACTIVATE, sent|defwinproc }, /* in the 2nd MDI child */ - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE}, /* in the 2nd MDI child */ - { 0 } -}; - - -/* SetWindowPos(SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE| - SWP_NOZORDER|SWP_FRAMECHANGED) - * for a visible overlapped window with WS_CLIPCHILDREN style set. - */ -static const struct message WmSWP_FrameChanged_clip[] = { - { WM_WINDOWPOSCHANGING, sent|wparam|parent, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_FRAMECHANGED }, - { WM_NCCALCSIZE, sent|wparam|parent, 1 }, - { WM_NCPAINT, sent|parent|optional }, /* wparam != 1 */ - { WM_GETTEXT, sent|parent|defwinproc|optional }, - { WM_ERASEBKGND, sent|parent|optional }, /* FIXME: remove optional once Wine is fixed */ - { WM_NCPAINT, sent }, /* wparam != 1 */ - { WM_ERASEBKGND, sent }, - { WM_WINDOWPOSCHANGED, sent|wparam|parent, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_PAINT, sent }, - { 0 } -}; -/* SetWindowPos(SWP_NOSIZE|SWP_NOMOVE|SWP_DEFERERASE|SWP_NOACTIVATE| - SWP_NOZORDER|SWP_FRAMECHANGED) - * for a visible overlapped window. - */ -static const struct message WmSWP_FrameChangedDeferErase[] = { - { WM_WINDOWPOSCHANGING, sent|wparam|parent, SWP_NOSIZE|SWP_NOMOVE|SWP_DEFERERASE|SWP_NOACTIVATE|SWP_FRAMECHANGED }, - { WM_NCCALCSIZE, sent|wparam|parent, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam|parent, SWP_NOSIZE|SWP_NOMOVE|SWP_DEFERERASE|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_PAINT, sent|parent|optional }, - { WM_NCPAINT, sent|beginpaint|parent|optional }, /* wparam != 1 */ - { WM_GETTEXT, sent|beginpaint|parent|defwinproc|optional }, - { WM_PAINT, sent }, - { WM_NCPAINT, sent|beginpaint }, /* wparam != 1 */ - { WM_ERASEBKGND, sent|beginpaint|optional }, - { 0 } -}; - -/* SetWindowPos(SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE| - SWP_NOZORDER|SWP_FRAMECHANGED) - * for a visible overlapped window without WS_CLIPCHILDREN style set. - */ -static const struct message WmSWP_FrameChanged_noclip[] = { - { WM_WINDOWPOSCHANGING, sent|wparam|parent, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_FRAMECHANGED }, - { WM_NCCALCSIZE, sent|wparam|parent, 1 }, - { WM_NCPAINT, sent|parent|optional }, /* wparam != 1 */ - { WM_GETTEXT, sent|parent|defwinproc|optional }, - { WM_ERASEBKGND, sent|parent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam|parent, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_PAINT, sent }, - { WM_NCPAINT, sent|beginpaint }, /* wparam != 1 */ - { WM_ERASEBKGND, sent|beginpaint|optional }, - { 0 } -}; - -/* ShowWindow(SW_SHOW) for a not visible overlapped window */ -static const struct message WmShowOverlappedSeq[] = { - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_NCPAINT, sent|wparam|optional, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_NCPAINT, sent|wparam|optional, 1 }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - { HCBT_ACTIVATE, hook }, - { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 }, - { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCPAINT, sent|wparam|optional, 1 }, - { WM_ACTIVATEAPP, sent|wparam, 1 }, - { WM_NCACTIVATE, sent|wparam, 1 }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ACTIVATE, sent|wparam, 1 }, - { HCBT_SETFOCUS, hook }, - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, - { WM_GETTEXT, sent|optional }, - { WM_NCPAINT, sent|wparam|optional, 1 }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - /* Win9x adds SWP_NOZORDER below */ - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_NCCALCSIZE, sent|optional }, - { WM_GETTEXT, sent|optional }, - { WM_NCPAINT, sent|optional }, - { WM_ERASEBKGND, sent|optional }, - { WM_SYNCPAINT, sent|optional }, -#if 0 /* CreateWindow/ShowWindow(SW_SHOW) also generates WM_SIZE/WM_MOVE - * messages. Does that mean that CreateWindow doesn't set initial - * window dimensions for overlapped windows? - */ - { WM_SIZE, sent }, - { WM_MOVE, sent }, -#endif - { WM_PAINT, sent|optional }, - { WM_NCPAINT, sent|beginpaint|optional }, - { 0 } -}; -/* ShowWindow(SW_SHOWMAXIMIZED) for a not visible overlapped window */ -static const struct message WmShowMaxOverlappedSeq[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, - { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_STATECHANGED }, - { WM_GETMINMAXINFO, sent|defwinproc }, - { WM_NCCALCSIZE, sent|wparam, TRUE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { HCBT_ACTIVATE, hook }, - { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 }, - { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, - { WM_ACTIVATEAPP, sent|wparam, 1 }, - { WM_NCACTIVATE, sent|wparam, 1 }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ACTIVATE, sent|wparam, 1 }, - { HCBT_SETFOCUS, hook }, - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, - { WM_GETTEXT, sent|optional }, - { WM_NCPAINT, sent|wparam|optional, 1 }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - /* Win9x adds SWP_NOZORDER below */ - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_STATECHANGED }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, - { WM_GETTEXT, sent|optional }, - { WM_NCCALCSIZE, sent|optional }, - { WM_NCPAINT, sent|optional }, - { WM_ERASEBKGND, sent|optional }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SYNCPAINT, sent|optional }, - { WM_GETTITLEBARINFOEX, sent|optional }, - { WM_PAINT, sent|optional }, - { WM_NCPAINT, sent|beginpaint|optional }, - { WM_ERASEBKGND, sent|beginpaint|optional }, - { 0 } -}; -/* ShowWindow(SW_RESTORE) for a not visible maximized overlapped window */ -static const struct message WmShowRestoreMaxOverlappedSeq[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_RESTORE }, - { WM_GETTEXT, sent|optional }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED }, - { WM_GETMINMAXINFO, sent|defwinproc }, - { WM_NCCALCSIZE, sent|wparam, TRUE }, - { WM_NCPAINT, sent|optional }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED, 0, SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_MOVE, sent|defwinproc|optional }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, - { WM_NCCALCSIZE, sent|wparam|optional, TRUE }, - { WM_NCPAINT, sent|optional }, - { WM_ERASEBKGND, sent|optional }, - { WM_PAINT, sent|optional }, - { WM_GETTITLEBARINFOEX, sent|optional }, - { WM_NCPAINT, sent|beginpaint|optional }, - { WM_ERASEBKGND, sent|beginpaint|optional }, - { 0 } -}; -/* ShowWindow(SW_RESTORE) for a not visible minimized overlapped window */ -static const struct message WmShowRestoreMinOverlappedSeq[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_RESTORE }, - { WM_QUERYOPEN, sent|optional }, - { WM_GETTEXT, sent|optional }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED|SWP_NOCOPYBITS }, - { WM_GETMINMAXINFO, sent|defwinproc }, - { WM_NCCALCSIZE, sent|wparam, TRUE }, - { HCBT_ACTIVATE, hook }, - { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, - { WM_ACTIVATEAPP, sent|wparam, 1 }, - { WM_NCACTIVATE, sent|wparam, 1 }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ACTIVATE, sent|wparam, 1 }, - { HCBT_SETFOCUS, hook }, - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, - { WM_GETTEXT, sent|optional }, - { WM_NCPAINT, sent|wparam|optional, 1 }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_STATECHANGED|SWP_FRAMECHANGED|SWP_NOCOPYBITS }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, - { WM_NCCALCSIZE, sent|wparam|optional, TRUE }, - { WM_NCPAINT, sent|wparam|optional, 1 }, - { WM_ERASEBKGND, sent|optional }, - { WM_ACTIVATE, sent|wparam, 1 }, - { WM_GETTEXT, sent|optional }, - { WM_PAINT, sent|optional }, - { WM_GETTITLEBARINFOEX, sent|optional }, - { WM_NCPAINT, sent|beginpaint|optional }, - { WM_ERASEBKGND, sent|beginpaint|optional }, - { 0 } -}; -/* ShowWindow(SW_SHOWMINIMIZED) for a not visible overlapped window */ -static const struct message WmShowMinOverlappedSeq[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_MINIMIZE }, - { HCBT_SETFOCUS, hook }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_KILLFOCUS, sent }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, - { WM_IME_NOTIFY, sent|wparam|optional|defwinproc, 1 }, - { WM_GETTEXT, sent|optional }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOCOPYBITS|SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_STATECHANGED }, - { WM_GETMINMAXINFO, sent|defwinproc }, - { WM_NCCALCSIZE, sent|wparam, TRUE }, - { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, 0, 0 }, - { WM_NCPAINT, sent|optional }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_WINDOWPOSCHANGED, sent }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|defwinproc|wparam|lparam, SIZE_MINIMIZED, 0 }, - { WM_NCCALCSIZE, sent|optional }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { EVENT_SYSTEM_MINIMIZESTART, winevent_hook|wparam|lparam, 0, 0 }, - { WM_NCACTIVATE, sent|wparam, 0 }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ACTIVATE, sent }, - { WM_ACTIVATEAPP, sent|wparam, 0 }, - - /* Vista sometimes restores the window right away... */ - { WM_SYSCOMMAND, sent|optional|wparam, SC_RESTORE }, - { HCBT_SYSCOMMAND, hook|optional|wparam, SC_RESTORE }, - { HCBT_MINMAX, hook|optional|lparam, 0, SW_RESTORE }, - { WM_QUERYOPEN, sent|optional }, - { WM_WINDOWPOSCHANGING, sent|optional|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED }, - { WM_GETMINMAXINFO, sent|optional|defwinproc }, - { WM_NCCALCSIZE, sent|optional|wparam, TRUE }, - { HCBT_ACTIVATE, hook|optional }, - { WM_ACTIVATEAPP, sent|optional|wparam, 1 }, - { WM_NCACTIVATE, sent|optional }, - { WM_GETTEXT, sent|optional }, - { WM_ACTIVATE, sent|optional|wparam, 1 }, - { HCBT_SETFOCUS, hook|optional }, - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { WM_SETFOCUS, sent|optional }, - { WM_NCPAINT, sent|optional }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|optional|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED }, - { WM_MOVE, sent|defwinproc|optional }, - { WM_SIZE, sent|defwinproc|optional|wparam, SIZE_RESTORED }, - { WM_ACTIVATE, sent|optional|wparam, 1 }, - { WM_SYSCOMMAND, sent|optional|wparam, SC_RESTORE }, - { HCBT_SYSCOMMAND, hook|optional|wparam, SC_RESTORE }, - - { WM_PAINT, sent|optional }, - { WM_NCPAINT, sent|beginpaint|optional }, - { WM_ERASEBKGND, sent|beginpaint|optional }, - { 0 } -}; -/* ShowWindow(SW_HIDE) for a visible overlapped window */ -static const struct message WmHideOverlappedSeq[] = { - { WM_SHOWWINDOW, sent|wparam, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_SIZE, sent|optional }, /* XP doesn't send it */ - { WM_MOVE, sent|optional }, /* XP doesn't send it */ - { WM_NCACTIVATE, sent|wparam|optional, 0 }, - { WM_ACTIVATE, sent|wparam|optional, 0 }, - { WM_ACTIVATEAPP, sent|wparam|optional, 0 }, - { HCBT_SETFOCUS, hook|optional }, - { WM_KILLFOCUS, sent|wparam, 0 }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, - { WM_IME_NOTIFY, sent|wparam|optional|defwinproc, 1 }, - { 0 } -}; -/* DestroyWindow for a visible overlapped window */ -static const struct message WmDestroyOverlappedSeq[] = { - { HCBT_DESTROYWND, hook }, - { 0x0090, sent|optional }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 }, - { 0x0090, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_NCACTIVATE, sent|optional|wparam, 0 }, - { WM_ACTIVATE, sent|optional }, - { WM_ACTIVATEAPP, sent|optional|wparam, 0 }, - { WM_KILLFOCUS, sent|optional|wparam, 0 }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, - { WM_IME_NOTIFY, sent|wparam|optional|defwinproc, 1 }, - { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, 0, 0 }, - { WM_DESTROY, sent }, - { WM_NCDESTROY, sent }, - { 0 } -}; -/* CreateWindow(WS_MAXIMIZE|WS_VISIBLE) for popup window */ -static const struct message WmCreateMaxPopupSeq[] = { - { HCBT_CREATEWND, hook }, - { WM_NCCREATE, sent }, - { WM_NCCALCSIZE, sent|wparam, 0 }, - { WM_CREATE, sent }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - { WM_MOVE, sent }, - { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, - { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_STATECHANGED }, - { WM_NCCALCSIZE, sent|wparam, TRUE }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOREDRAW|SWP_STATECHANGED }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { HCBT_ACTIVATE, hook }, - { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 }, - { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCPAINT, sent|wparam|optional, 1 }, - { WM_ERASEBKGND, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOCLIENTMOVE|SWP_NOCLIENTSIZE|SWP_NOMOVE|SWP_NOSIZE }, - { WM_ACTIVATEAPP, sent|wparam, 1 }, - { WM_NCACTIVATE, sent }, - { WM_ACTIVATE, sent|wparam, 1 }, - { HCBT_SETFOCUS, hook }, - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, - { WM_GETTEXT, sent|optional }, - { WM_SYNCPAINT, sent|wparam|optional, 4 }, - { WM_NCPAINT, sent|wparam|optional, 1 }, - { WM_ERASEBKGND, sent|optional }, - { WM_NCPAINT, sent|wparam|defwinproc|optional, 1 }, - { WM_ERASEBKGND, sent|defwinproc|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOCLIENTMOVE|SWP_NOCLIENTSIZE|SWP_SHOWWINDOW|SWP_NOMOVE|SWP_NOSIZE }, - { 0 } -}; -/* CreateWindow(WS_MAXIMIZE) for popup window, not initially visible */ -static const struct message WmCreateInvisibleMaxPopupSeq[] = { - { HCBT_CREATEWND, hook }, - { WM_NCCREATE, sent }, - { WM_NCCALCSIZE, sent|wparam, 0 }, - { WM_CREATE, sent }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - { WM_MOVE, sent }, - { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, - { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_STATECHANGED }, - { WM_NCCALCSIZE, sent|wparam, TRUE }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOREDRAW|SWP_STATECHANGED }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { 0 } -}; -/* ShowWindow(SW_SHOWMAXIMIZED) for a resized not visible popup window */ -static const struct message WmShowMaxPopupResizedSeq[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, - { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED }, - { WM_NCCALCSIZE, sent|wparam, TRUE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { HCBT_ACTIVATE, hook }, - { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 }, - { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCPAINT, sent|wparam|optional, 1 }, - { WM_ERASEBKGND, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_ACTIVATEAPP, sent|wparam, 1 }, - { WM_NCACTIVATE, sent }, - { WM_ACTIVATE, sent|wparam, 1 }, - { HCBT_SETFOCUS, hook }, - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, - { WM_GETTEXT, sent|optional }, - { WM_NCPAINT, sent|wparam|optional, 1 }, - { WM_ERASEBKGND, sent|optional }, - { WM_WINDOWPOSCHANGED, sent }, - /* WinNT4.0 sends WM_MOVE */ - { WM_MOVE, sent|defwinproc|optional }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { 0 } -}; -/* ShowWindow(SW_SHOWMAXIMIZED) for a not visible popup window */ -static const struct message WmShowMaxPopupSeq[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, - { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED }, - { WM_NCCALCSIZE, sent|wparam, TRUE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { HCBT_ACTIVATE, hook }, - { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 }, - { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, - { WM_ACTIVATEAPP, sent|wparam, 1 }, - { WM_NCACTIVATE, sent }, - { WM_ACTIVATE, sent|wparam, 1 }, - { HCBT_SETFOCUS, hook }, - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, - { WM_GETTEXT, sent|optional }, - { WM_SYNCPAINT, sent|wparam|optional, 4 }, - { WM_NCPAINT, sent|wparam|optional, 1 }, - { WM_ERASEBKGND, sent|optional }, - { WM_NCPAINT, sent|wparam|defwinproc|optional, 1 }, - { WM_ERASEBKGND, sent|defwinproc|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOSIZE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { 0 } -}; -/* CreateWindow(WS_VISIBLE) for popup window */ -static const struct message WmCreatePopupSeq[] = { - { HCBT_CREATEWND, hook }, - { WM_NCCREATE, sent }, - { WM_NCCALCSIZE, sent|wparam, 0 }, - { WM_CREATE, sent }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - { WM_MOVE, sent }, - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { HCBT_ACTIVATE, hook }, - { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 }, - { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCPAINT, sent|wparam|optional, 1 }, - { WM_ERASEBKGND, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_ACTIVATEAPP, sent|wparam, 1 }, - { WM_NCACTIVATE, sent }, - { WM_ACTIVATE, sent|wparam, 1 }, - { HCBT_SETFOCUS, hook }, - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, - { WM_GETTEXT, sent|optional }, - { WM_SYNCPAINT, sent|wparam|optional, 4 }, - { WM_NCPAINT, sent|wparam|optional, 1 }, - { WM_ERASEBKGND, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOCLIENTMOVE|SWP_NOCLIENTSIZE|SWP_SHOWWINDOW|SWP_NOMOVE|SWP_NOSIZE }, - { 0 } -}; -/* ShowWindow(SW_SHOWMAXIMIZED) for a visible popup window */ -static const struct message WmShowVisMaxPopupSeq[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, - { WM_GETMINMAXINFO, sent }, - { WM_GETTEXT, sent|optional }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED }, - { WM_GETTEXT, sent|optional }, - { WM_NCCALCSIZE, sent|wparam, TRUE }, - { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, - { WM_NCPAINT, sent|wparam|optional, 1 }, - { WM_ERASEBKGND, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { 0 } -}; -/* CreateWindow (for a child popup window, not initially visible) */ -static const struct message WmCreateChildPopupSeq[] = { - { HCBT_CREATEWND, hook }, - { WM_NCCREATE, sent }, - { WM_NCCALCSIZE, sent|wparam, 0 }, - { WM_CREATE, sent }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - { WM_MOVE, sent }, - { 0 } -}; -/* CreateWindow (for a popup window, not initially visible, - * which sets WS_VISIBLE in WM_CREATE handler) - */ -static const struct message WmCreateInvisiblePopupSeq[] = { - { HCBT_CREATEWND, hook }, - { WM_NCCREATE, sent }, - { WM_NCCALCSIZE, sent|wparam, 0 }, - { WM_CREATE, sent }, - { WM_STYLECHANGING, sent }, - { WM_STYLECHANGED, sent }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - { WM_MOVE, sent }, - { 0 } -}; -/* SetWindowPos(SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER) - * for a popup window with WS_VISIBLE style set - */ -static const struct message WmShowVisiblePopupSeq_2[] = { - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { 0 } -}; -/* SetWindowPos(SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE) - * for a popup window with WS_VISIBLE style set - */ -static const struct message WmShowVisiblePopupSeq_3[] = { - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, - { HCBT_ACTIVATE, hook }, - { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 }, - { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCACTIVATE, sent }, - { WM_ACTIVATE, sent|wparam, 1 }, - { HCBT_SETFOCUS, hook }, - { WM_KILLFOCUS, sent|parent }, - { WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 }, - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|defwinproc }, - { WM_GETTEXT, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE, 0, SWP_SHOWWINDOW }, - { 0 } -}; -/* CreateWindow (for child window, not initially visible) */ -static const struct message WmCreateChildSeq[] = { - { HCBT_CREATEWND, hook }, - { WM_NCCREATE, sent }, - /* child is inserted into parent's child list after WM_NCCREATE returns */ - { WM_NCCALCSIZE, sent|wparam, 0 }, - { WM_CREATE, sent }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - { WM_MOVE, sent }, - { WM_PARENTNOTIFY, sent|parent|wparam, WM_CREATE }, - { 0 } -}; -/* CreateWindow (for maximized child window, not initially visible) */ -static const struct message WmCreateMaximizedChildSeq[] = { - { HCBT_CREATEWND, hook }, - { WM_NCCREATE, sent }, - { WM_NCCALCSIZE, sent|wparam, 0 }, - { WM_CREATE, sent }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - { WM_MOVE, sent }, - { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, - { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_STATECHANGED }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_PARENTNOTIFY, sent|parent|wparam, WM_CREATE }, - { 0 } -}; -/* CreateWindow (for a child window, initially visible) */ -static const struct message WmCreateVisibleChildSeq[] = { - { HCBT_CREATEWND, hook }, - { WM_NCCREATE, sent }, - /* child is inserted into parent's child list after WM_NCCREATE returns */ - { WM_NCCALCSIZE, sent|wparam, 0 }, - { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, 0, 0 }, - { WM_CREATE, sent }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - { WM_MOVE, sent }, - { WM_PARENTNOTIFY, sent|parent|wparam, WM_CREATE }, - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_ERASEBKGND, sent|parent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_NCCALCSIZE, sent|wparam|optional, 1 }, /* WinXP */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { 0 } -}; -/* ShowWindow(SW_SHOW) for a not visible child window */ -static const struct message WmShowChildSeq[] = { - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_ERASEBKGND, sent|parent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { 0 } -}; -/* ShowWindow(SW_HIDE) for a visible child window */ -static const struct message WmHideChildSeq[] = { - { WM_SHOWWINDOW, sent|wparam, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_ERASEBKGND, sent|parent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { 0 } -}; -/* ShowWindow(SW_HIDE) for a visible child window checking all parent events*/ -static const struct message WmHideChildSeq2[] = { - { WM_SHOWWINDOW, sent|wparam, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_ERASEBKGND, sent|parent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { 0 } -}; -/* SetWindowPos(SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE) - * for a not visible child window - */ -static const struct message WmShowChildSeq_2[] = { - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_CHILDACTIVATE, sent }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { 0 } -}; -/* SetWindowPos(SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE) - * for a not visible child window - */ -static const struct message WmShowChildSeq_3[] = { - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { 0 } -}; -/* SetWindowPos(SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE) - * for a visible child window with a caption - */ -static const struct message WmShowChildSeq_4[] = { - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, - { WM_CHILDACTIVATE, sent }, - { 0 } -}; -/* ShowWindow(SW_MINIMIZE) for child with invisible parent */ -static const struct message WmShowChildInvisibleParentSeq_1[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_MINIMIZE }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED, 0, SWP_NOACTIVATE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_CHILDACTIVATE, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOREDRAW|SWP_NOCOPYBITS|SWP_STATECHANGED, 0, SWP_NOACTIVATE }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|defwinproc|wparam|lparam, SIZE_MINIMIZED, 0 }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { EVENT_SYSTEM_MINIMIZESTART, winevent_hook|wparam|lparam, 0, 0 }, - /* FIXME: Wine creates an icon/title window while Windows doesn't */ - { WM_PARENTNOTIFY, sent|parent|wparam|optional, WM_CREATE }, - { WM_GETTEXT, sent|optional }, - { 0 } -}; -/* repeated ShowWindow(SW_MINIMIZE) for child with invisible parent */ -static const struct message WmShowChildInvisibleParentSeq_1r[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_MINIMIZE }, - { 0 } -}; -/* ShowWindow(SW_MAXIMIZE) for child with invisible parent */ -static const struct message WmShowChildInvisibleParentSeq_2[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, - { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_STATECHANGED }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_CHILDACTIVATE, sent }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { 0 } -}; -/* repeated ShowWindow(SW_MAXIMIZE) for child with invisible parent */ -static const struct message WmShowChildInvisibleParentSeq_2r[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, - { 0 } -}; -/* ShowWindow(SW_SHOWMINIMIZED) for child with invisible parent */ -static const struct message WmShowChildInvisibleParentSeq_3[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_SHOWMINIMIZED }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_CHILDACTIVATE, sent }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOREDRAW|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|defwinproc|wparam|lparam, SIZE_MINIMIZED, 0 }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { EVENT_SYSTEM_MINIMIZESTART, winevent_hook|wparam|lparam, 0, 0 }, - /* FIXME: Wine creates an icon/title window while Windows doesn't */ - { WM_PARENTNOTIFY, sent|parent|wparam|optional, WM_CREATE }, - { WM_GETTEXT, sent|optional }, - { 0 } -}; -/* repeated ShowWindow(SW_SHOWMINIMIZED) for child with invisible parent */ -static const struct message WmShowChildInvisibleParentSeq_3r[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_SHOWMINIMIZED }, - { 0 } -}; -/* ShowWindow(SW_SHOWMINNOACTIVE) for child with invisible parent */ -static const struct message WmShowChildInvisibleParentSeq_4[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_SHOWMINNOACTIVE }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOREDRAW|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|defwinproc|wparam|lparam, SIZE_MINIMIZED, 0 }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { EVENT_SYSTEM_MINIMIZESTART, winevent_hook|wparam|lparam, 0, 0 }, - /* FIXME: Wine creates an icon/title window while Windows doesn't */ - { WM_PARENTNOTIFY, sent|parent|wparam|optional, WM_CREATE }, - { WM_GETTEXT, sent|optional }, - { 0 } -}; -/* repeated ShowWindow(SW_SHOWMINNOACTIVE) for child with invisible parent */ -static const struct message WmShowChildInvisibleParentSeq_4r[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_SHOWMINNOACTIVE }, - { 0 } -}; -/* ShowWindow(SW_SHOW) for child with invisible parent */ -static const struct message WmShowChildInvisibleParentSeq_5[] = { - { WM_SHOWWINDOW, sent|wparam, 1 }, - { 0 } -}; -/* ShowWindow(SW_HIDE) for child with invisible parent */ -static const struct message WmHideChildInvisibleParentSeq[] = { - { WM_SHOWWINDOW, sent|wparam, 0 }, - { 0 } -}; -/* SetWindowPos(SWP_SHOWWINDOW) for child with invisible parent */ -static const struct message WmShowChildInvisibleParentSeq_6[] = { - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { 0 } -}; -/* SetWindowPos(SWP_HIDEWINDOW) for child with invisible parent */ -static const struct message WmHideChildInvisibleParentSeq_2[] = { - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { 0 } -}; -/* DestroyWindow for a visible child window */ -static const struct message WmDestroyChildSeq[] = { - { HCBT_DESTROYWND, hook }, - { 0x0090, sent|optional }, - { WM_PARENTNOTIFY, sent|parent|wparam, WM_DESTROY }, - { WM_SHOWWINDOW, sent|wparam, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_ERASEBKGND, sent|parent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { HCBT_SETFOCUS, hook }, /* set focus to a parent */ - { WM_KILLFOCUS, sent }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, - { WM_IME_SETCONTEXT, sent|wparam|parent|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|parent }, - { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, 0, 0 }, - { WM_DESTROY, sent }, - { WM_DESTROY, sent|optional }, /* some other (IME?) window */ - { WM_NCDESTROY, sent|optional }, /* some other (IME?) window */ - { WM_NCDESTROY, sent }, - { 0 } -}; -/* visible child window destroyed by thread exit */ -static const struct message WmExitThreadSeq[] = { - { WM_NCDESTROY, sent }, /* actually in grandchild */ - { WM_PAINT, sent|parent }, - { WM_ERASEBKGND, sent|parent|beginpaint }, - { 0 } -}; -/* DestroyWindow for a visible child window with invisible parent */ -static const struct message WmDestroyInvisibleChildSeq[] = { - { HCBT_DESTROYWND, hook }, - { 0x0090, sent|optional }, - { WM_PARENTNOTIFY, sent|parent|wparam, WM_DESTROY }, - { WM_SHOWWINDOW, sent|wparam, 0 }, - { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, 0, 0 }, - { WM_DESTROY, sent }, - { WM_NCDESTROY, sent }, - { 0 } -}; -/* Moving the mouse in nonclient area */ -static const struct message WmMouseMoveInNonClientAreaSeq[] = { /* FIXME: add */ - { WM_NCHITTEST, sent }, - { WM_SETCURSOR, sent }, - { WM_NCMOUSEMOVE, posted }, - { 0 } -}; -/* Moving the mouse in client area */ -static const struct message WmMouseMoveInClientAreaSeq[] = { /* FIXME: add */ - { WM_NCHITTEST, sent }, - { WM_SETCURSOR, sent }, - { WM_MOUSEMOVE, posted }, - { 0 } -}; -/* Moving by dragging the title bar (after WM_NCHITTEST and WM_SETCURSOR) (outline move) */ -static const struct message WmDragTitleBarSeq[] = { /* FIXME: add */ - { WM_NCLBUTTONDOWN, sent|wparam, HTCAPTION }, - { WM_SYSCOMMAND, sent|defwinproc|wparam, SC_MOVE+2 }, - { WM_GETMINMAXINFO, sent|defwinproc }, - { WM_ENTERSIZEMOVE, sent|defwinproc }, - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, 0 }, - { WM_MOVE, sent|defwinproc }, - { WM_EXITSIZEMOVE, sent|defwinproc }, - { 0 } -}; -/* Sizing by dragging the thick borders (after WM_NCHITTEST and WM_SETCURSOR) (outline move) */ -static const struct message WmDragThickBordersBarSeq[] = { /* FIXME: add */ - { WM_NCLBUTTONDOWN, sent|wparam, 0xd }, - { WM_SYSCOMMAND, sent|defwinproc|wparam, 0xf004 }, - { WM_GETMINMAXINFO, sent|defwinproc }, - { WM_ENTERSIZEMOVE, sent|defwinproc }, - { WM_SIZING, sent|defwinproc|wparam, 4}, /* one for each mouse movement */ - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, 0 }, - { WM_GETMINMAXINFO, sent|defwinproc }, - { WM_NCCALCSIZE, sent|defwinproc|wparam, 1 }, - { WM_NCPAINT, sent|defwinproc|wparam, 1 }, - { WM_GETTEXT, sent|defwinproc }, - { WM_ERASEBKGND, sent|defwinproc }, - { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, 0 }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, - { WM_EXITSIZEMOVE, sent|defwinproc }, - { 0 } -}; -/* Resizing child window with MoveWindow (32) */ -static const struct message WmResizingChildWithMoveWindowSeq[] = { - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOACTIVATE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_ERASEBKGND, sent|parent|optional }, - { WM_ERASEBKGND, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { 0 } -}; -/* Clicking on inactive button */ -static const struct message WmClickInactiveButtonSeq[] = { /* FIXME: add */ - { WM_NCHITTEST, sent }, - { WM_PARENTNOTIFY, sent|parent|wparam, WM_LBUTTONDOWN }, - { WM_MOUSEACTIVATE, sent }, - { WM_MOUSEACTIVATE, sent|parent|defwinproc }, - { WM_SETCURSOR, sent }, - { WM_SETCURSOR, sent|parent|defwinproc }, - { WM_LBUTTONDOWN, posted }, - { WM_KILLFOCUS, posted|parent }, - { WM_SETFOCUS, posted }, - { WM_CTLCOLORBTN, posted|parent }, - { BM_SETSTATE, posted }, - { WM_CTLCOLORBTN, posted|parent }, - { WM_LBUTTONUP, posted }, - { BM_SETSTATE, posted }, - { WM_CTLCOLORBTN, posted|parent }, - { WM_COMMAND, posted|parent }, - { 0 } -}; -/* Reparenting a button (16/32) */ -/* The last child (button) reparented gets topmost for its new parent. */ -static const struct message WmReparentButtonSeq[] = { /* FIXME: add */ - { WM_SHOWWINDOW, sent|wparam, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE }, - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_ERASEBKGND, sent|parent }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE }, - { WM_CHILDACTIVATE, sent }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOSIZE|SWP_NOREDRAW }, - { WM_MOVE, sent|defwinproc }, - { WM_SHOWWINDOW, sent|wparam, 1 }, - { 0 } -}; -/* Creation of a custom dialog (32) */ -static const struct message WmCreateCustomDialogSeq[] = { - { HCBT_CREATEWND, hook }, - { WM_GETMINMAXINFO, sent }, - { WM_NCCREATE, sent }, - { WM_NCCALCSIZE, sent|wparam, 0 }, - { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, 0, 0 }, - { WM_CREATE, sent }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_NOTIFYFORMAT, sent|optional }, - { WM_QUERYUISTATE, sent|optional }, - { WM_WINDOWPOSCHANGING, sent|optional }, - { WM_GETMINMAXINFO, sent|optional }, - { WM_NCCALCSIZE, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|optional }, - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { HCBT_ACTIVATE, hook }, - { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 }, - - - { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, - - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, - - { WM_NCACTIVATE, sent }, - { WM_GETTEXT, sent|optional|defwinproc }, - { WM_GETTEXT, sent|optional|defwinproc }, - { WM_GETTEXT, sent|optional|defwinproc }, - { EVENT_OBJECT_DEFACTIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, - { WM_ACTIVATE, sent|wparam, 1 }, - { WM_GETTEXT, sent|optional }, - { WM_KILLFOCUS, sent|parent }, - { WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent }, - { WM_GETDLGCODE, sent|defwinproc|wparam, 0 }, - { WM_NCPAINT, sent|wparam, 1 }, - { WM_GETTEXT, sent|optional|defwinproc }, - { WM_GETTEXT, sent|optional|defwinproc }, - { WM_ERASEBKGND, sent }, - { WM_CTLCOLORDLG, sent|optional|defwinproc }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_GETTEXT, sent|optional }, - { WM_GETTEXT, sent|optional }, - { WM_NCCALCSIZE, sent|optional }, - { WM_NCPAINT, sent|optional }, - { WM_GETTEXT, sent|optional|defwinproc }, - { WM_GETTEXT, sent|optional|defwinproc }, - { WM_ERASEBKGND, sent|optional }, - { WM_CTLCOLORDLG, sent|optional|defwinproc }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - { WM_MOVE, sent }, - { 0 } -}; -/* Calling EndDialog for a custom dialog (32) */ -static const struct message WmEndCustomDialogSeq[] = { - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_GETTEXT, sent|optional }, - { HCBT_ACTIVATE, hook }, - { WM_NCACTIVATE, sent|wparam, 0 }, - { WM_GETTEXT, sent|optional|defwinproc }, - { WM_GETTEXT, sent|optional|defwinproc }, - { WM_ACTIVATE, sent|wparam, 0 }, - { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOACTIVATE|SWP_NOREDRAW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_GETTEXT, sent|optional|defwinproc }, - { WM_GETTEXT, sent|optional|defwinproc }, - { HCBT_SETFOCUS, hook }, - { WM_KILLFOCUS, sent }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, - { WM_IME_SETCONTEXT, sent|parent|wparam|defwinproc|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|parent|defwinproc }, - { 0 } -}; -/* ShowWindow(SW_SHOW) for a custom dialog (initially invisible) */ -static const struct message WmShowCustomDialogSeq[] = { - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { HCBT_ACTIVATE, hook }, - { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 }, - - { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, - - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, - { WM_ACTIVATEAPP, sent|wparam|optional, 1 }, - { WM_NCACTIVATE, sent }, - { WM_ACTIVATE, sent|wparam, 1 }, - { WM_GETTEXT, sent|optional }, - - { WM_KILLFOCUS, sent|parent }, - { WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent }, - { WM_GETDLGCODE, sent|defwinproc|wparam, 0 }, - { WM_NCPAINT, sent|wparam, 1 }, - { WM_ERASEBKGND, sent }, - { WM_CTLCOLORDLG, sent|defwinproc }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { 0 } -}; -/* Creation and destruction of a modal dialog (32) */ -static const struct message WmModalDialogSeq[] = { - { WM_CANCELMODE, sent|parent }, - { HCBT_SETFOCUS, hook }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_KILLFOCUS, sent|parent }, - { WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 }, - { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_ENABLE, sent|parent|wparam, 0 }, - { HCBT_CREATEWND, hook }, - { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, 0, 0 }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SETFONT, sent }, - { WM_INITDIALOG, sent }, - { WM_CHANGEUISTATE, sent|optional }, - { WM_UPDATEUISTATE, sent|optional }, - { WM_SHOWWINDOW, sent }, - { HCBT_ACTIVATE, hook }, - { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 }, - { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCACTIVATE, sent }, - { WM_GETTEXT, sent|optional }, - { WM_ACTIVATE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_NCPAINT, sent|optional }, - { WM_GETTEXT, sent|optional }, - { WM_ERASEBKGND, sent|optional }, - { WM_CTLCOLORDLG, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_GETTEXT, sent|optional }, - { WM_NCCALCSIZE, sent|optional }, - { WM_NCPAINT, sent|optional }, - { WM_GETTEXT, sent|optional }, - { WM_ERASEBKGND, sent|optional }, - { WM_CTLCOLORDLG, sent|optional }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_PAINT, sent|optional }, - { WM_CTLCOLORBTN, sent|optional }, - { WM_GETTITLEBARINFOEX, sent|optional }, - { WM_ENTERIDLE, sent|parent|optional }, - { WM_ENTERIDLE, sent|parent|optional }, - { WM_ENTERIDLE, sent|parent|optional }, - { WM_ENTERIDLE, sent|parent|optional }, - { WM_ENTERIDLE, sent|parent|optional }, - { WM_ENTERIDLE, sent|parent|optional }, - { WM_ENTERIDLE, sent|parent|optional }, - { WM_ENTERIDLE, sent|parent|optional }, - { WM_ENTERIDLE, sent|parent|optional }, - { WM_ENTERIDLE, sent|parent|optional }, - { WM_ENTERIDLE, sent|parent|optional }, - { WM_ENTERIDLE, sent|parent|optional }, - { WM_ENTERIDLE, sent|parent|optional }, - { WM_ENTERIDLE, sent|parent|optional }, - { WM_ENTERIDLE, sent|parent|optional }, - { WM_ENTERIDLE, sent|parent|optional }, - { WM_ENTERIDLE, sent|parent|optional }, - { WM_ENTERIDLE, sent|parent|optional }, - { WM_ENTERIDLE, sent|parent|optional }, - { WM_ENTERIDLE, sent|parent|optional }, - { WM_TIMER, sent }, - { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_ENABLE, sent|parent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE }, - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_GETTEXT, sent|optional }, - { HCBT_ACTIVATE, hook }, - { WM_NCACTIVATE, sent|wparam, 0 }, - { WM_GETTEXT, sent|optional }, - { WM_ACTIVATE, sent|wparam, 0 }, - { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|optional }, - { HCBT_SETFOCUS, hook }, - { WM_IME_SETCONTEXT, sent|parent|wparam|defwinproc|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|parent|defwinproc }, - { EVENT_SYSTEM_DIALOGEND, winevent_hook|wparam|lparam, 0, 0 }, - { HCBT_DESTROYWND, hook }, - { 0x0090, sent|optional }, - { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, 0, 0 }, - { WM_DESTROY, sent }, - { WM_NCDESTROY, sent }, - { 0 } -}; -/* Creation of a modal dialog that is resized inside WM_INITDIALOG (32) */ -static const struct message WmCreateModalDialogResizeSeq[] = { /* FIXME: add */ - /* (inside dialog proc, handling WM_INITDIALOG) */ - { WM_WINDOWPOSCHANGING, sent|wparam, 0 }, - { WM_NCCALCSIZE, sent }, - { WM_NCACTIVATE, sent|parent|wparam, 0 }, - { WM_GETTEXT, sent|defwinproc }, - { WM_ACTIVATE, sent|parent|wparam, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam, 0 }, - { WM_WINDOWPOSCHANGING, sent|parent }, - { WM_NCACTIVATE, sent|wparam, 1 }, - { WM_ACTIVATE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, 0 }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, - /* (setting focus) */ - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, 0 }, - { WM_NCPAINT, sent }, - { WM_GETTEXT, sent|defwinproc }, - { WM_ERASEBKGND, sent }, - { WM_CTLCOLORDLG, sent|defwinproc }, - { WM_WINDOWPOSCHANGED, sent|wparam, 0 }, - { WM_PAINT, sent }, - /* (bunch of WM_CTLCOLOR* for each control) */ - { WM_PAINT, sent|parent }, - { WM_ENTERIDLE, sent|parent|wparam, 0 }, - { WM_SETCURSOR, sent|parent }, - { 0 } -}; -/* SetMenu for NonVisible windows with size change*/ -static const struct message WmSetMenuNonVisibleSizeChangeSeq[] = { - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, - { WM_NCCALCSIZE,sent|wparam|optional, 1 }, /* XP */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* XP sends a duplicate */ - { WM_GETTEXT, sent|optional }, - { WM_NCCALCSIZE, sent|wparam|optional, 1 }, - { 0 } -}; -/* SetMenu for NonVisible windows with no size change */ -static const struct message WmSetMenuNonVisibleNoSizeChangeSeq[] = { - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { 0 } -}; -/* SetMenu for Visible windows with size change */ -static const struct message WmSetMenuVisibleSizeChangeSeq[] = { - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { 0x0093, sent|defwinproc|optional }, - { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, 0, 0 }, - { WM_NCPAINT, sent|optional }, /* wparam != 1 */ - { 0x0093, sent|defwinproc|optional }, - { 0x0093, sent|defwinproc|optional }, - { 0x0091, sent|defwinproc|optional }, - { 0x0092, sent|defwinproc|optional }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - { WM_ACTIVATE, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, - { 0x0093, sent|optional }, - { WM_NCCALCSIZE, sent|wparam|optional, 1 }, - { 0x0093, sent|defwinproc|optional }, - { WM_NCPAINT, sent|optional }, /* wparam != 1 */ - { 0x0093, sent|defwinproc|optional }, - { 0x0093, sent|defwinproc|optional }, - { 0x0091, sent|defwinproc|optional }, - { 0x0092, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* XP sends a duplicate */ - { 0 } -}; -/* SetMenu for Visible windows with no size change */ -static const struct message WmSetMenuVisibleNoSizeChangeSeq[] = { - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_NCPAINT, sent|optional }, /* wparam != 1 */ - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - { WM_ACTIVATE, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { 0 } -}; -/* DrawMenuBar for a visible window */ -static const struct message WmDrawMenuBarSeq[] = -{ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { 0x0093, sent|defwinproc|optional }, - { WM_NCPAINT, sent|optional }, /* wparam != 1 */ - { 0x0093, sent|defwinproc|optional }, - { 0x0093, sent|defwinproc|optional }, - { 0x0091, sent|defwinproc|optional }, - { 0x0092, sent|defwinproc|optional }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { 0x0093, sent|optional }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { 0 } -}; - -static const struct message WmSetRedrawFalseSeq[] = -{ - { WM_SETREDRAW, sent|wparam, 0 }, - { 0 } -}; - -static const struct message WmSetRedrawTrueSeq[] = -{ - { WM_SETREDRAW, sent|wparam, 1 }, - { 0 } -}; - -static const struct message WmEnableWindowSeq_1[] = -{ - { WM_CANCELMODE, sent|wparam|lparam, 0, 0 }, - { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { HCBT_SETFOCUS, hook|optional }, - { WM_KILLFOCUS, sent|optional }, - { WM_ENABLE, sent|wparam|lparam, FALSE, 0 }, - { 0 } -}; - -static const struct message WmEnableWindowSeq_2[] = -{ - { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_ENABLE, sent|wparam|lparam, TRUE, 0 }, - { 0 } -}; - -static const struct message WmGetScrollRangeSeq[] = -{ - { SBM_GETRANGE, sent }, - { 0 } -}; -static const struct message WmGetScrollInfoSeq[] = -{ - { SBM_GETSCROLLINFO, sent }, - { 0 } -}; -static const struct message WmSetScrollRangeSeq[] = -{ - /* MSDN claims that Windows sends SBM_SETRANGE message, but win2k SP4 - sends SBM_SETSCROLLINFO. - */ - { SBM_SETSCROLLINFO, sent }, - { 0 } -}; -/* SetScrollRange for a window without a non-client area */ -static const struct message WmSetScrollRangeHSeq_empty[] = -{ - { EVENT_OBJECT_VALUECHANGE, winevent_hook|wparam|lparam, OBJID_HSCROLL, 0 }, - { 0 } -}; -static const struct message WmSetScrollRangeVSeq_empty[] = -{ - { EVENT_OBJECT_VALUECHANGE, winevent_hook|wparam|lparam, OBJID_VSCROLL, 0 }, - { 0 } -}; -static const struct message WmSetScrollRangeHVSeq[] = -{ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { EVENT_OBJECT_VALUECHANGE, winevent_hook|lparam|optional, 0/*OBJID_HSCROLL or OBJID_VSCROLL*/, 0 }, - { 0 } -}; -/* SetScrollRange for a window with a non-client area */ -static const struct message WmSetScrollRangeHV_NC_Seq[] = -{ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, 0, 0 }, - { WM_NCPAINT, sent|optional }, - { WM_STYLECHANGING, sent|defwinproc|optional }, - { WM_STYLECHANGED, sent|defwinproc|optional }, - { WM_STYLECHANGING, sent|defwinproc|optional }, - { WM_STYLECHANGED, sent|defwinproc|optional }, - { WM_STYLECHANGING, sent|defwinproc|optional }, - { WM_STYLECHANGED, sent|defwinproc|optional }, - { WM_STYLECHANGING, sent|defwinproc|optional }, - { WM_STYLECHANGED, sent|defwinproc|optional }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - { WM_CTLCOLORDLG, sent|defwinproc|optional }, /* sent to a parent of the dialog */ - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE|SWP_NOCLIENTMOVE, 0, SWP_NOCLIENTSIZE }, - { WM_SIZE, sent|defwinproc|optional }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { EVENT_OBJECT_VALUECHANGE, winevent_hook|lparam|optional, 0/*OBJID_HSCROLL or OBJID_VSCROLL*/, 0 }, - { WM_GETTEXT, sent|optional }, - { WM_GETTEXT, sent|optional }, - { WM_GETTEXT, sent|optional }, - { WM_GETTEXT, sent|optional }, - { 0 } -}; -/* test if we receive the right sequence of messages */ -/* after calling ShowWindow( SW_SHOWNA) */ -static const struct message WmSHOWNAChildInvisParInvis[] = { - { WM_SHOWWINDOW, sent|wparam, 1 }, - { 0 } -}; -static const struct message WmSHOWNAChildVisParInvis[] = { - { WM_SHOWWINDOW, sent|wparam, 1 }, - { 0 } -}; -static const struct message WmSHOWNAChildVisParVis[] = { - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE }, - { 0 } -}; -static const struct message WmSHOWNAChildInvisParVis[] = { - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_ERASEBKGND, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOACTIVATE|SWP_NOCLIENTMOVE }, - { 0 } -}; -static const struct message WmSHOWNATopVisible[] = { - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE }, - { WM_NCPAINT, sent|wparam|optional, 1 }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|optional }, - { 0 } -}; -static const struct message WmSHOWNATopInvisible[] = { - { WM_NOTIFYFORMAT, sent|optional }, - { WM_QUERYUISTATE, sent|optional }, - { WM_WINDOWPOSCHANGING, sent|optional }, - { WM_GETMINMAXINFO, sent|optional }, - { WM_NCCALCSIZE, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|optional }, - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_NCPAINT, sent|wparam|optional, 1 }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_NCCALCSIZE, sent|wparam|optional, 1 }, - { WM_NCPAINT, sent|wparam|optional, 1 }, - { WM_ERASEBKGND, sent|optional }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - { WM_MOVE, sent }, - { 0 } -}; - -static int after_end_dialog, test_def_id; -static int sequence_cnt, sequence_size; -static struct recvd_message* sequence; -static int log_all_parent_messages; -static int paint_loop_done; - -/* user32 functions */ -static HWND (WINAPI *pGetAncestor)(HWND,UINT); -static BOOL (WINAPI *pGetMenuInfo)(HMENU,LPCMENUINFO); -static void (WINAPI *pNotifyWinEvent)(DWORD, HWND, LONG, LONG); -static BOOL (WINAPI *pSetMenuInfo)(HMENU,LPCMENUINFO); -static HWINEVENTHOOK (WINAPI *pSetWinEventHook)(DWORD, DWORD, HMODULE, WINEVENTPROC, DWORD, DWORD, DWORD); -static BOOL (WINAPI *pTrackMouseEvent)(TRACKMOUSEEVENT*); -static BOOL (WINAPI *pUnhookWinEvent)(HWINEVENTHOOK); -static BOOL (WINAPI *pGetMonitorInfoA)(HMONITOR,LPMONITORINFO); -static HMONITOR (WINAPI *pMonitorFromPoint)(POINT,DWORD); -/* kernel32 functions */ -static BOOL (WINAPI *pGetCPInfoExA)(UINT, DWORD, LPCPINFOEXA); - -static void init_procs(void) -{ - HMODULE user32 = GetModuleHandleA("user32.dll"); - HMODULE kernel32 = GetModuleHandleA("kernel32.dll"); - -#define GET_PROC(dll, func) \ - p ## func = (void*)GetProcAddress(dll, #func); \ - if(!p ## func) { \ - trace("GetProcAddress(%s) failed\n", #func); \ - } - - GET_PROC(user32, GetAncestor) - GET_PROC(user32, GetMenuInfo) - GET_PROC(user32, NotifyWinEvent) - GET_PROC(user32, SetMenuInfo) - GET_PROC(user32, SetWinEventHook) - GET_PROC(user32, TrackMouseEvent) - GET_PROC(user32, UnhookWinEvent) - GET_PROC(user32, GetMonitorInfoA) - GET_PROC(user32, MonitorFromPoint) - - GET_PROC(kernel32, GetCPInfoExA) - -#undef GET_PROC -} - -static const char *get_winpos_flags(UINT flags) -{ - static char buffer[300]; - - buffer[0] = 0; -#define DUMP(flag) do { if (flags & flag) { strcat( buffer, "|" #flag ); flags &= ~flag; } } while(0) - DUMP( SWP_SHOWWINDOW ); - DUMP( SWP_HIDEWINDOW ); - DUMP( SWP_NOACTIVATE ); - DUMP( SWP_FRAMECHANGED ); - DUMP( SWP_NOCOPYBITS ); - DUMP( SWP_NOOWNERZORDER ); - DUMP( SWP_NOSENDCHANGING ); - DUMP( SWP_DEFERERASE ); - DUMP( SWP_ASYNCWINDOWPOS ); - DUMP( SWP_NOZORDER ); - DUMP( SWP_NOREDRAW ); - DUMP( SWP_NOSIZE ); - DUMP( SWP_NOMOVE ); - DUMP( SWP_NOCLIENTSIZE ); - DUMP( SWP_NOCLIENTMOVE ); - if (flags) sprintf(buffer + strlen(buffer),"|0x%04x", flags); - return buffer + 1; -#undef DUMP -} - -static BOOL ignore_message( UINT message ) -{ - /* these are always ignored */ - return (message >= 0xc000 || - message == WM_GETICON || - message == WM_GETOBJECT || - message == WM_TIMECHANGE || - message == WM_DISPLAYCHANGE || - message == WM_DEVICECHANGE || - message == WM_DWMNCRENDERINGCHANGED); -} - - -#define add_message(msg) add_message_(__LINE__,msg); -static void add_message_(int line, const struct recvd_message *msg) -{ - struct recvd_message *seq; - - if (!sequence) - { - sequence_size = 10; - sequence = HeapAlloc( GetProcessHeap(), 0, sequence_size * sizeof(*sequence) ); - } - if (sequence_cnt == sequence_size) - { - sequence_size *= 2; - sequence = HeapReAlloc( GetProcessHeap(), 0, sequence, sequence_size * sizeof(*sequence) ); - } - assert(sequence); - - seq = &sequence[sequence_cnt]; - seq->hwnd = msg->hwnd; - seq->message = msg->message; - seq->flags = msg->flags; - seq->wParam = msg->wParam; - seq->lParam = msg->lParam; - seq->line = line; - seq->descr = msg->descr; - seq->output[0] = 0; - - if (msg->descr) - { - if (msg->flags & hook) - { - static const char * const CBT_code_name[10] = - { - "HCBT_MOVESIZE", - "HCBT_MINMAX", - "HCBT_QS", - "HCBT_CREATEWND", - "HCBT_DESTROYWND", - "HCBT_ACTIVATE", - "HCBT_CLICKSKIPPED", - "HCBT_KEYSKIPPED", - "HCBT_SYSCOMMAND", - "HCBT_SETFOCUS" - }; - const char *code_name = (msg->message <= HCBT_SETFOCUS) ? CBT_code_name[msg->message] : "Unknown"; - - sprintf( seq->output, "%s: hook %d (%s) wp %08lx lp %08lx", - msg->descr, msg->message, code_name, msg->wParam, msg->lParam ); - } - else if (msg->flags & winevent_hook) - { - sprintf( seq->output, "%s: winevent %p %08x %08lx %08lx", - msg->descr, msg->hwnd, msg->message, msg->wParam, msg->lParam ); - } - else - { - switch (msg->message) - { - case WM_WINDOWPOSCHANGING: - case WM_WINDOWPOSCHANGED: - { - WINDOWPOS *winpos = (WINDOWPOS *)msg->lParam; - - sprintf( seq->output, "%s: %p WM_WINDOWPOS%s wp %08lx lp %08lx after %p x %d y %d cx %d cy %d flags %s", - msg->descr, msg->hwnd, - (msg->message == WM_WINDOWPOSCHANGING) ? "CHANGING" : "CHANGED", - msg->wParam, msg->lParam, winpos->hwndInsertAfter, - winpos->x, winpos->y, winpos->cx, winpos->cy, - get_winpos_flags(winpos->flags) ); - - /* Log only documented flags, win2k uses 0x1000 and 0x2000 - * in the high word for internal purposes - */ - seq->wParam = winpos->flags & 0xffff; - /* We are not interested in the flags that don't match under XP and Win9x */ - seq->wParam &= ~SWP_NOZORDER; - break; - } - - case WM_DRAWITEM: - { - DRAW_ITEM_STRUCT di; - DRAWITEMSTRUCT *dis = (DRAWITEMSTRUCT *)msg->lParam; - - sprintf( seq->output, "%s: %p WM_DRAWITEM: type %x, ctl_id %x, item_id %x, action %x, state %x", - msg->descr, msg->hwnd, dis->CtlType, dis->CtlID, - dis->itemID, dis->itemAction, dis->itemState); - - di.u.lp = 0; - di.u.item.type = dis->CtlType; - di.u.item.ctl_id = dis->CtlID; - if (dis->CtlType == ODT_LISTBOX || - dis->CtlType == ODT_COMBOBOX || - dis->CtlType == ODT_MENU) - di.u.item.item_id = dis->itemID; - di.u.item.action = dis->itemAction; - di.u.item.state = dis->itemState; - - seq->lParam = di.u.lp; - break; - } - default: - if (msg->message >= 0xc000) return; /* ignore registered messages */ - sprintf( seq->output, "%s: %p %04x wp %08lx lp %08lx", - msg->descr, msg->hwnd, msg->message, msg->wParam, msg->lParam ); - } - if (msg->flags & (sent|posted|parent|defwinproc|beginpaint)) - sprintf( seq->output + strlen(seq->output), " (flags %x)", msg->flags ); - } - } - - sequence_cnt++; -} - -/* try to make sure pending X events have been processed before continuing */ -static void flush_events(void) -{ - MSG msg; - int diff = 200; - int min_timeout = 100; - DWORD time = GetTickCount() + diff; - - while (diff > 0) - { - if (MsgWaitForMultipleObjects( 0, NULL, FALSE, min_timeout, QS_ALLINPUT ) == WAIT_TIMEOUT) break; - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg ); - diff = time - GetTickCount(); - } -} - -static void flush_sequence(void) -{ - HeapFree(GetProcessHeap(), 0, sequence); - sequence = 0; - sequence_cnt = sequence_size = 0; -} - -static void dump_sequence(const struct message *expected, const char *context, const char *file, int line) -{ - const struct recvd_message *actual = sequence; - unsigned int count = 0; - - trace_(file, line)("Failed sequence %s:\n", context ); - while (expected->message && actual->message) - { - if (actual->output[0]) - { - if (expected->flags & hook) - { - trace_(file, line)( " %u: expected: hook %04x - actual: %s\n", - count, expected->message, actual->output ); - } - else if (expected->flags & winevent_hook) - { - trace_(file, line)( " %u: expected: winevent %04x - actual: %s\n", - count, expected->message, actual->output ); - } - else if (expected->flags & kbd_hook) - { - trace_(file, line)( " %u: expected: kbd %04x - actual: %s\n", - count, expected->message, actual->output ); - } - else - { - trace_(file, line)( " %u: expected: msg %04x - actual: %s\n", - count, expected->message, actual->output ); - } - } - - if (expected->message == actual->message) - { - if ((expected->flags & defwinproc) != (actual->flags & defwinproc) && - (expected->flags & optional)) - { - /* don't match messages if their defwinproc status differs */ - expected++; - } - else - { - expected++; - actual++; - } - } - /* silently drop winevent messages if there is no support for them */ - else if ((expected->flags & optional) || ((expected->flags & winevent_hook) && !hEvent_hook)) - expected++; - else - { - expected++; - actual++; - } - count++; - } - - /* optional trailing messages */ - while (expected->message && ((expected->flags & optional) || - ((expected->flags & winevent_hook) && !hEvent_hook))) - { - trace_(file, line)( " %u: expected: msg %04x - actual: nothing\n", count, expected->message ); - expected++; - count++; - } - - if (expected->message) - { - trace_(file, line)( " %u: expected: msg %04x - actual: nothing\n", count, expected->message ); - return; - } - - while (actual->message && actual->output[0]) - { - trace_(file, line)( " %u: expected: nothing - actual: %s\n", count, actual->output ); - actual++; - count++; - } -} - -#define ok_sequence( exp, contx, todo) \ - ok_sequence_( (exp), (contx), (todo), __FILE__, __LINE__) - - -static void ok_sequence_(const struct message *expected_list, const char *context, int todo, - const char *file, int line) -{ - static const struct recvd_message end_of_sequence; - const struct message *expected = expected_list; - const struct recvd_message *actual; - int failcount = 0, dump = 0; - unsigned int count = 0; - - add_message(&end_of_sequence); - - actual = sequence; - - while (expected->message && actual->message) - { - if (expected->message == actual->message && - !((expected->flags ^ actual->flags) & (hook|winevent_hook|kbd_hook))) - { - if (expected->flags & wparam) - { - if (((expected->wParam ^ actual->wParam) & ~expected->wp_mask) && todo) - { - todo_wine { - failcount ++; - if (strcmp(winetest_platform, "wine")) dump++; - ok_( file, line) (FALSE, - "%s: %u: in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n", - context, count, expected->message, expected->wParam, actual->wParam); - } - } - else - { - ok_( file, line)( ((expected->wParam ^ actual->wParam) & ~expected->wp_mask) == 0, - "%s: %u: in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n", - context, count, expected->message, expected->wParam, actual->wParam); - if ((expected->wParam ^ actual->wParam) & ~expected->wp_mask) dump++; - } - - } - if (expected->flags & lparam) - { - if (((expected->lParam ^ actual->lParam) & ~expected->lp_mask) && todo) - { - todo_wine { - failcount ++; - if (strcmp(winetest_platform, "wine")) dump++; - ok_( file, line) (FALSE, - "%s: %u: in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n", - context, count, expected->message, expected->lParam, actual->lParam); - } - } - else - { - ok_( file, line)(((expected->lParam ^ actual->lParam) & ~expected->lp_mask) == 0, - "%s: %u: in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n", - context, count, expected->message, expected->lParam, actual->lParam); - if ((expected->lParam ^ actual->lParam) & ~expected->lp_mask) dump++; - } - } - if ((expected->flags & optional) && - ((expected->flags ^ actual->flags) & (defwinproc|parent))) - { - /* don't match optional messages if their defwinproc or parent status differs */ - expected++; - count++; - continue; - } - if ((expected->flags & defwinproc) != (actual->flags & defwinproc) && todo) - { - todo_wine { - failcount ++; - if (strcmp(winetest_platform, "wine")) dump++; - ok_( file, line) (FALSE, - "%s: %u: the msg 0x%04x should %shave been sent by DefWindowProc\n", - context, count, expected->message, (expected->flags & defwinproc) ? "" : "NOT "); - } - } - else - { - ok_( file, line) ((expected->flags & defwinproc) == (actual->flags & defwinproc), - "%s: %u: the msg 0x%04x should %shave been sent by DefWindowProc\n", - context, count, expected->message, (expected->flags & defwinproc) ? "" : "NOT "); - if ((expected->flags & defwinproc) != (actual->flags & defwinproc)) dump++; - } - - ok_( file, line) ((expected->flags & beginpaint) == (actual->flags & beginpaint), - "%s: %u: the msg 0x%04x should %shave been sent by BeginPaint\n", - context, count, expected->message, (expected->flags & beginpaint) ? "" : "NOT "); - if ((expected->flags & beginpaint) != (actual->flags & beginpaint)) dump++; - - ok_( file, line) ((expected->flags & (sent|posted)) == (actual->flags & (sent|posted)), - "%s: %u: the msg 0x%04x should have been %s\n", - context, count, expected->message, (expected->flags & posted) ? "posted" : "sent"); - if ((expected->flags & (sent|posted)) != (actual->flags & (sent|posted))) dump++; - - ok_( file, line) ((expected->flags & parent) == (actual->flags & parent), - "%s: %u: the msg 0x%04x was expected in %s\n", - context, count, expected->message, (expected->flags & parent) ? "parent" : "child"); - if ((expected->flags & parent) != (actual->flags & parent)) dump++; - - ok_( file, line) ((expected->flags & hook) == (actual->flags & hook), - "%s: %u: the msg 0x%04x should have been sent by a hook\n", - context, count, expected->message); - if ((expected->flags & hook) != (actual->flags & hook)) dump++; - - ok_( file, line) ((expected->flags & winevent_hook) == (actual->flags & winevent_hook), - "%s: %u: the msg 0x%04x should have been sent by a winevent hook\n", - context, count, expected->message); - if ((expected->flags & winevent_hook) != (actual->flags & winevent_hook)) dump++; - - ok_( file, line) ((expected->flags & kbd_hook) == (actual->flags & kbd_hook), - "%s: %u: the msg 0x%04x should have been sent by a keyboard hook\n", - context, count, expected->message); - if ((expected->flags & kbd_hook) != (actual->flags & kbd_hook)) dump++; - - expected++; - actual++; - } - /* silently drop hook messages if there is no support for them */ - else if ((expected->flags & optional) || - ((expected->flags & hook) && !hCBT_hook) || - ((expected->flags & winevent_hook) && !hEvent_hook) || - ((expected->flags & kbd_hook) && !hKBD_hook)) - expected++; - else if (todo) - { - failcount++; - todo_wine { - if (strcmp(winetest_platform, "wine")) dump++; - ok_( file, line) (FALSE, "%s: %u: the msg 0x%04x was expected, but got msg 0x%04x instead\n", - context, count, expected->message, actual->message); - } - goto done; - } - else - { - ok_( file, line) (FALSE, "%s: %u: the msg 0x%04x was expected, but got msg 0x%04x instead\n", - context, count, expected->message, actual->message); - dump++; - expected++; - actual++; - } - count++; - } - - /* skip all optional trailing messages */ - while (expected->message && ((expected->flags & optional) || - ((expected->flags & hook) && !hCBT_hook) || - ((expected->flags & winevent_hook) && !hEvent_hook))) - expected++; - - if (todo) - { - todo_wine { - if (expected->message || actual->message) { - failcount++; - if (strcmp(winetest_platform, "wine")) dump++; - ok_( file, line) (FALSE, "%s: %u: the msg sequence is not complete: expected %04x - actual %04x\n", - context, count, expected->message, actual->message); - } - } - } - else - { - if (expected->message || actual->message) - { - dump++; - ok_( file, line) (FALSE, "%s: %u: the msg sequence is not complete: expected %04x - actual %04x\n", - context, count, expected->message, actual->message); - } - } - if( todo && !failcount) /* succeeded yet marked todo */ - todo_wine { - if (!strcmp(winetest_platform, "wine")) dump++; - ok_( file, line)( TRUE, "%s: marked \"todo_wine\" but succeeds\n", context); - } - -done: - if (dump) dump_sequence(expected_list, context, file, line); - flush_sequence(); -} - -#define expect(EXPECTED,GOT) ok((GOT)==(EXPECTED), "Expected %d, got %d\n", (EXPECTED), (GOT)) - -/******************************** MDI test **********************************/ - -/* CreateWindow for MDI frame window, initially visible */ -static const struct message WmCreateMDIframeSeq[] = { - { HCBT_CREATEWND, hook }, - { WM_GETMINMAXINFO, sent }, - { WM_NCCREATE, sent }, - { WM_NCCALCSIZE, sent|wparam, 0 }, - { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, 0, 0 }, - { WM_CREATE, sent }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_NOTIFYFORMAT, sent|optional }, - { WM_QUERYUISTATE, sent|optional }, - { WM_WINDOWPOSCHANGING, sent|optional }, - { WM_GETMINMAXINFO, sent|optional }, - { WM_NCCALCSIZE, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|optional }, - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { HCBT_ACTIVATE, hook }, - { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 }, - { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* XP */ - { WM_ACTIVATEAPP, sent|wparam|optional, 1 }, /* Win9x doesn't send it */ - { WM_NCACTIVATE, sent }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ACTIVATE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* Win9x */ - { HCBT_SETFOCUS, hook }, - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, - /* Win9x adds SWP_NOZORDER below */ - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_NCCALCSIZE, sent|wparam|optional, 1 }, /* XP */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - { WM_MOVE, sent }, - { 0 } -}; -/* DestroyWindow for MDI frame window, initially visible */ -static const struct message WmDestroyMDIframeSeq[] = { - { HCBT_DESTROYWND, hook }, - { 0x0090, sent|optional }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_NCACTIVATE, sent|wparam|optional, 0 }, /* Win9x */ - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_NCACTIVATE, sent|wparam|optional, 0 }, /* XP */ - { WM_ACTIVATE, sent|wparam|optional, 0 }, /* Win9x */ - { WM_ACTIVATEAPP, sent|wparam|optional, 0 }, /* Win9x */ - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, 0, 0 }, - { WM_DESTROY, sent }, - { WM_NCDESTROY, sent }, - { 0 } -}; -/* CreateWindow for MDI client window, initially visible */ -static const struct message WmCreateMDIclientSeq[] = { - { HCBT_CREATEWND, hook }, - { WM_NCCREATE, sent }, - { WM_NCCALCSIZE, sent|wparam, 0 }, - { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam|optional, 0, 0 }, - { WM_CREATE, sent }, - { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam|optional, 0, 0 }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - { WM_MOVE, sent }, - { WM_PARENTNOTIFY, sent|wparam, WM_CREATE }, /* in MDI frame */ - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { 0 } -}; -/* ShowWindow(SW_SHOW) for MDI client window */ -static const struct message WmShowMDIclientSeq[] = { - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { 0 } -}; -/* ShowWindow(SW_HIDE) for MDI client window */ -static const struct message WmHideMDIclientSeq[] = { - { WM_SHOWWINDOW, sent|wparam, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|optional, 0, 0 }, /* win2000 */ - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* XP */ - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { 0 } -}; -/* DestroyWindow for MDI client window, initially visible */ -static const struct message WmDestroyMDIclientSeq[] = { - { HCBT_DESTROYWND, hook }, - { 0x0090, sent|optional }, - { WM_PARENTNOTIFY, sent|wparam, WM_DESTROY }, /* in MDI frame */ - { WM_SHOWWINDOW, sent|wparam, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, 0, 0 }, - { WM_DESTROY, sent }, - { WM_NCDESTROY, sent }, - { 0 } -}; -/* CreateWindow for MDI child window, initially visible */ -static const struct message WmCreateMDIchildVisibleSeq[] = { - { HCBT_CREATEWND, hook }, - { WM_NCCREATE, sent }, - { WM_NCCALCSIZE, sent|wparam, 0 }, - { WM_CREATE, sent }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - { WM_MOVE, sent }, - /* Win2k sends wparam set to - * MAKEWPARAM(WM_CREATE, MDI_FIRST_CHILD_ID + nTotalCreated), - * while Win9x doesn't bother to set child window id according to - * CLIENTCREATESTRUCT.idFirstChild - */ - { WM_PARENTNOTIFY, sent /*|wparam, WM_CREATE*/ }, /* in MDI client */ - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_MDIREFRESHMENU, sent/*|wparam|lparam, 0, 0*/ }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, - { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - - /* Win9x: message sequence terminates here. */ - - { WM_NCACTIVATE, sent|wparam|defwinproc, 1 }, - { HCBT_SETFOCUS, hook }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ - { WM_IME_NOTIFY, sent|wparam|optional, 2 }, /* in MDI client */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent }, /* in MDI client */ - { HCBT_SETFOCUS, hook }, - { WM_KILLFOCUS, sent }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|defwinproc }, - { WM_MDIACTIVATE, sent|defwinproc }, - { 0 } -}; -/* CreateWindow for MDI child window with invisible parent */ -static const struct message WmCreateMDIchildInvisibleParentSeq[] = { - { HCBT_CREATEWND, hook }, - { WM_GETMINMAXINFO, sent }, - { WM_NCCREATE, sent }, - { WM_NCCALCSIZE, sent|wparam, 0 }, - { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam|optional, 0, 0 }, - { WM_CREATE, sent }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - { WM_MOVE, sent }, - { WM_PARENTNOTIFY, sent /*|wparam, WM_CREATE*/ }, /* in MDI client */ - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_MDIREFRESHMENU, sent }, /* in MDI client */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, - { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - - /* Win9x: message sequence terminates here. */ - - { WM_NCACTIVATE, sent|wparam|defwinproc, 1 }, - { HCBT_SETFOCUS, hook }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ - { WM_IME_NOTIFY, sent|wparam|optional, 2 }, /* in MDI client */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent }, /* in MDI client */ - { HCBT_SETFOCUS, hook }, - { WM_KILLFOCUS, sent }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|defwinproc }, - { WM_MDIACTIVATE, sent|defwinproc }, - { 0 } -}; -/* DestroyWindow for MDI child window, initially visible */ -static const struct message WmDestroyMDIchildVisibleSeq[] = { - { HCBT_DESTROYWND, hook }, - /* Win2k sends wparam set to - * MAKEWPARAM(WM_DESTROY, MDI_FIRST_CHILD_ID + nTotalCreated), - * while Win9x doesn't bother to set child window id according to - * CLIENTCREATESTRUCT.idFirstChild - */ - { 0x0090, sent|optional }, - { WM_PARENTNOTIFY, sent /*|wparam, WM_DESTROY*/ }, /* in MDI client */ - { WM_SHOWWINDOW, sent|wparam, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_ERASEBKGND, sent|parent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - - /* { WM_DESTROY, sent } - * Win9x: message sequence terminates here. - */ - - { HCBT_SETFOCUS, hook }, /* set focus to MDI client */ - { WM_KILLFOCUS, sent }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent }, /* in MDI client */ - - { HCBT_SETFOCUS, hook }, /* MDI client sets focus back to MDI child */ - { WM_KILLFOCUS, sent }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent }, /* in MDI client */ - - { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, 0, 0 }, - - { HCBT_SETFOCUS, hook }, /* set focus to MDI client */ - { WM_KILLFOCUS, sent }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent }, /* in MDI client */ - - { HCBT_SETFOCUS, hook }, /* MDI client sets focus back to MDI child */ - { WM_KILLFOCUS, sent }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent }, /* in MDI client */ - - { WM_DESTROY, sent }, - - { HCBT_SETFOCUS, hook }, /* set focus to MDI client */ - { WM_KILLFOCUS, sent }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent }, /* in MDI client */ - - { HCBT_SETFOCUS, hook }, /* MDI client sets focus back to MDI child */ - { WM_KILLFOCUS, sent }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent }, /* in MDI client */ - - { WM_NCDESTROY, sent }, - { 0 } -}; -/* CreateWindow for MDI child window, initially invisible */ -static const struct message WmCreateMDIchildInvisibleSeq[] = { - { HCBT_CREATEWND, hook }, - { WM_NCCREATE, sent }, - { WM_NCCALCSIZE, sent|wparam, 0 }, - { WM_CREATE, sent }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - { WM_MOVE, sent }, - /* Win2k sends wparam set to - * MAKEWPARAM(WM_CREATE, MDI_FIRST_CHILD_ID + nTotalCreated), - * while Win9x doesn't bother to set child window id according to - * CLIENTCREATESTRUCT.idFirstChild - */ - { WM_PARENTNOTIFY, sent /*|wparam, WM_CREATE*/ }, /* in MDI client */ - { 0 } -}; -/* DestroyWindow for MDI child window, initially invisible */ -static const struct message WmDestroyMDIchildInvisibleSeq[] = { - { HCBT_DESTROYWND, hook }, - /* Win2k sends wparam set to - * MAKEWPARAM(WM_DESTROY, MDI_FIRST_CHILD_ID + nTotalCreated), - * while Win9x doesn't bother to set child window id according to - * CLIENTCREATESTRUCT.idFirstChild - */ - { 0x0090, sent|optional }, - { WM_PARENTNOTIFY, sent /*|wparam, WM_DESTROY*/ }, /* in MDI client */ - { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, 0, 0 }, - { WM_DESTROY, sent }, - { WM_NCDESTROY, sent }, - /* FIXME: Wine destroys an icon/title window while Windows doesn't */ - { WM_PARENTNOTIFY, sent|wparam|optional, WM_DESTROY }, /* MDI client */ - { 0 } -}; -/* CreateWindow for the 1st MDI child window, initially visible and maximized */ -static const struct message WmCreateMDIchildVisibleMaxSeq1[] = { - { HCBT_CREATEWND, hook }, - { WM_NCCREATE, sent }, - { WM_NCCALCSIZE, sent|wparam, 0 }, - { WM_CREATE, sent }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - { WM_MOVE, sent }, - { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, - { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_STATECHANGED }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, - /* in MDI frame */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ - /* Win2k sends wparam set to - * MAKEWPARAM(WM_CREATE, MDI_FIRST_CHILD_ID + nTotalCreated), - * while Win9x doesn't bother to set child window id according to - * CLIENTCREATESTRUCT.idFirstChild - */ - { WM_PARENTNOTIFY, sent /*|wparam, WM_CREATE*/ }, /* in MDI client */ - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_MDIREFRESHMENU, sent/*|wparam|lparam, 0, 0*/ }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, - { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc|optional, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE, 0, SWP_FRAMECHANGED }, - - /* Win9x: message sequence terminates here. */ - - { WM_NCACTIVATE, sent|wparam|defwinproc|optional, 1 }, - { HCBT_SETFOCUS, hook|optional }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ - { WM_IME_NOTIFY, sent|wparam|optional, 2 }, /* in MDI client */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|optional }, /* in MDI client */ - { HCBT_SETFOCUS, hook|optional }, - { WM_KILLFOCUS, sent|optional }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|defwinproc|optional }, - { WM_MDIACTIVATE, sent|defwinproc|optional }, - /* in MDI frame */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */ - { 0 } -}; -/* CreateWindow for the 2nd MDI child window, initially visible and maximized */ -static const struct message WmCreateMDIchildVisibleMaxSeq2[] = { - /* restore the 1st MDI child */ - { WM_SETREDRAW, sent|wparam, 0 }, - { HCBT_MINMAX, hook|lparam, 0, SW_SHOWNORMAL }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, - /* in MDI frame */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ - { WM_SETREDRAW, sent|wparam, 1 }, /* in the 1st MDI child */ - /* create the 2nd MDI child */ - { HCBT_CREATEWND, hook }, - { WM_NCCREATE, sent }, - { WM_NCCALCSIZE, sent|wparam, 0 }, - { WM_CREATE, sent }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - { WM_MOVE, sent }, - { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, - { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_STATECHANGED }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, - /* in MDI frame */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ - /* Win2k sends wparam set to - * MAKEWPARAM(WM_CREATE, MDI_FIRST_CHILD_ID + nTotalCreated), - * while Win9x doesn't bother to set child window id according to - * CLIENTCREATESTRUCT.idFirstChild - */ - { WM_PARENTNOTIFY, sent /*|wparam, WM_CREATE*/ }, /* in MDI client */ - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_MDIREFRESHMENU, sent/*|wparam|lparam, 0, 0*/ }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, - { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, - - { WM_NCACTIVATE, sent|wparam|defwinproc, 0 }, /* in the 1st MDI child */ - { WM_MDIACTIVATE, sent|defwinproc }, /* in the 1st MDI child */ - - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - - /* Win9x: message sequence terminates here. */ - - { WM_NCACTIVATE, sent|wparam|defwinproc, 1 }, - { HCBT_SETFOCUS, hook }, - { WM_KILLFOCUS, sent|defwinproc|optional }, /* in the 1st MDI child */ - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 0 }, /* in the 1st MDI child */ - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent }, /* in MDI client */ - { HCBT_SETFOCUS, hook }, - { WM_KILLFOCUS, sent }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|defwinproc }, - - { WM_MDIACTIVATE, sent|defwinproc }, - /* in MDI frame */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */ - { 0 } -}; -/* WM_MDICREATE MDI child window, initially visible and maximized */ -static const struct message WmCreateMDIchildVisibleMaxSeq3[] = { - { WM_MDICREATE, sent }, - { HCBT_CREATEWND, hook }, - { WM_NCCREATE, sent }, - { WM_NCCALCSIZE, sent|wparam, 0 }, - { WM_CREATE, sent }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - { WM_MOVE, sent }, - { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, - { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_STATECHANGED }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, - - /* in MDI frame */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ - - /* Win2k sends wparam set to - * MAKEWPARAM(WM_CREATE, MDI_FIRST_CHILD_ID + nTotalCreated), - * while Win9x doesn't bother to set child window id according to - * CLIENTCREATESTRUCT.idFirstChild - */ - { WM_PARENTNOTIFY, sent /*|wparam, WM_CREATE*/ }, /* in MDI client */ - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_MDIREFRESHMENU, sent/*|wparam|lparam, 0, 0*/ }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, - - { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - - /* Win9x: message sequence terminates here. */ - - { WM_NCACTIVATE, sent|wparam|defwinproc, 1 }, - { WM_SETFOCUS, sent|optional }, /* in MDI client */ - { HCBT_SETFOCUS, hook }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ - { WM_IME_NOTIFY, sent|wparam|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|optional }, /* in MDI client */ - { HCBT_SETFOCUS, hook|optional }, - { WM_KILLFOCUS, sent }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|defwinproc }, - - { WM_MDIACTIVATE, sent|defwinproc }, - - /* in MDI child */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - - /* in MDI frame */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { 0x0093, sent|defwinproc|optional }, - { 0x0093, sent|defwinproc|optional }, - { 0x0093, sent|defwinproc|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, - - /* in MDI client */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOACTIVATE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOCLIENTMOVE }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - - /* in MDI child */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOACTIVATE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { 0x0093, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOCLIENTMOVE }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, - - { 0x0093, sent|optional }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI client */ - { WM_NCCALCSIZE, sent|wparam|optional, 1 }, /* XP sends it to MDI frame */ - { 0x0093, sent|defwinproc|optional }, - { 0x0093, sent|defwinproc|optional }, - { 0x0093, sent|defwinproc|optional }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* XP sends a duplicate */ - - { 0 } -}; -/* CreateWindow for the 1st MDI child window, initially invisible and maximized */ -static const struct message WmCreateMDIchildInvisibleMaxSeq4[] = { - { HCBT_CREATEWND, hook }, - { WM_GETMINMAXINFO, sent }, - { WM_NCCREATE, sent }, - { WM_NCCALCSIZE, sent|wparam, 0 }, - { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, 0, 0 }, - { WM_CREATE, sent }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE, 0, SWP_NOZORDER }, /* MDI frame */ - { WM_NCCALCSIZE, sent|wparam|optional, 1 }, /* MDI frame */ - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE, 0, SWP_NOZORDER }, /* MDI frame */ - { WM_MOVE, sent }, - { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, - { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_STATECHANGED }, - { WM_GETMINMAXINFO, sent|defwinproc }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOREDRAW|SWP_STATECHANGED }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, - /* in MDI frame */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */ - { WM_NCCALCSIZE, sent|wparam|optional, 1 }, /* MDI child */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ - /* Win2k sends wparam set to - * MAKEWPARAM(WM_CREATE, MDI_FIRST_CHILD_ID + nTotalCreated), - * while Win9x doesn't bother to set child window id according to - * CLIENTCREATESTRUCT.idFirstChild - */ - { WM_PARENTNOTIFY, sent /*|wparam, WM_CREATE*/ }, /* in MDI client */ - { 0 } -}; -/* WM_SYSCOMMAND/SC_CLOSE for the 2nd MDI child window, initially visible and maximized */ -static const struct message WmDestroyMDIchildVisibleMaxSeq2[] = { - { WM_SYSCOMMAND, sent|wparam, SC_CLOSE }, - { HCBT_SYSCOMMAND, hook }, - { WM_CLOSE, sent|defwinproc }, - { WM_MDIDESTROY, sent }, /* in MDI client */ - - /* bring the 1st MDI child to top */ - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOSIZE|SWP_NOMOVE }, /* in the 1st MDI child */ - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, /* in the 2nd MDI child */ - - { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - - { WM_CHILDACTIVATE, sent|defwinproc|wparam|lparam, 0, 0 }, /* in the 1st MDI child */ - { WM_NCACTIVATE, sent|wparam|defwinproc, 0 }, /* in the 1st MDI child */ - { WM_MDIACTIVATE, sent|defwinproc }, /* in the 1st MDI child */ - - /* maximize the 1st MDI child */ - { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, - { WM_GETMINMAXINFO, sent|defwinproc }, - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_STATECHANGED }, - { WM_NCCALCSIZE, sent|defwinproc|wparam, 1 }, - { WM_CHILDACTIVATE, sent|defwinproc|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, - - /* restore the 2nd MDI child */ - { WM_SETREDRAW, sent|defwinproc|wparam, 0 }, - { HCBT_MINMAX, hook|lparam, 0, SW_NORMALNA }, - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_SHOWWINDOW|SWP_STATECHANGED }, - { WM_NCCALCSIZE, sent|defwinproc|wparam, 1 }, - - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - - { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_SHOWWINDOW|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, - - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */ - - { WM_SETREDRAW, sent|defwinproc|wparam, 1 }, - /* in MDI frame */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ - - /* bring the 1st MDI child to top */ - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCACTIVATE, sent|wparam|defwinproc, 1 }, - { HCBT_SETFOCUS, hook }, - { WM_KILLFOCUS, sent|defwinproc }, - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 0 }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent }, /* in MDI client */ - { HCBT_SETFOCUS, hook }, - { WM_KILLFOCUS, sent }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|defwinproc }, - { WM_MDIACTIVATE, sent|defwinproc }, - { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - - /* apparently ShowWindow(SW_SHOW) on an MDI client */ - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_MDIREFRESHMENU, sent }, - - { HCBT_DESTROYWND, hook }, - /* Win2k sends wparam set to - * MAKEWPARAM(WM_DESTROY, MDI_FIRST_CHILD_ID + nTotalCreated), - * while Win9x doesn't bother to set child window id according to - * CLIENTCREATESTRUCT.idFirstChild - */ - { 0x0090, sent|defwinproc|optional }, - { WM_PARENTNOTIFY, sent /*|wparam, WM_DESTROY*/ }, /* in MDI client */ - { WM_SHOWWINDOW, sent|defwinproc|wparam, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_ERASEBKGND, sent|parent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - - { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, 0, 0 }, - { WM_DESTROY, sent|defwinproc }, - { WM_NCDESTROY, sent|defwinproc }, - { 0 } -}; -/* WM_MDIDESTROY for the single MDI child window, initially visible and maximized */ -static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = { - { WM_MDIDESTROY, sent }, /* in MDI client */ - { WM_SHOWWINDOW, sent|wparam, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_ERASEBKGND, sent|parent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - - { HCBT_SETFOCUS, hook }, - { WM_KILLFOCUS, sent }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent }, /* in MDI client */ - { HCBT_SETFOCUS, hook }, - { WM_KILLFOCUS, sent }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent }, - - /* in MDI child */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ - - /* in MDI frame */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { 0x0093, sent|defwinproc|optional }, - { 0x0093, sent|defwinproc|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, - - /* in MDI client */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOACTIVATE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOCLIENTMOVE }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - - /* in MDI child */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOACTIVATE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTMOVE }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, - - /* in MDI child */ - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam|defwinproc, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ - - /* in MDI frame */ - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam|defwinproc, 1 }, - { 0x0093, sent|defwinproc|optional }, - { 0x0093, sent|defwinproc|optional }, - { 0x0093, sent|defwinproc|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, - - /* in MDI client */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOACTIVATE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOCLIENTMOVE }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - - /* in MDI child */ - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOACTIVATE }, - { WM_NCCALCSIZE, sent|wparam|defwinproc, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTMOVE }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI client */ - - { 0x0093, sent|defwinproc|optional }, - { WM_NCCALCSIZE, sent|wparam|defwinproc|optional, 1 }, /* XP sends it to MDI frame */ - { 0x0093, sent|defwinproc|optional }, - { 0x0093, sent|defwinproc|optional }, - { 0x0093, sent|defwinproc|optional }, - { 0x0093, sent|optional }, - - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI client */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* XP sends a duplicate */ - - /* in MDI frame */ - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam|optional, 1 }, - { 0x0093, sent|defwinproc|optional }, - { 0x0093, sent|defwinproc|optional }, - { 0x0093, sent|defwinproc|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */ - { 0x0093, sent|optional }, - - { WM_NCACTIVATE, sent|wparam, 0 }, - { WM_MDIACTIVATE, sent }, - - { HCBT_MINMAX, hook|lparam, 0, SW_SHOWNORMAL }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_SHOWWINDOW|SWP_STATECHANGED }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - - { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_SHOWWINDOW|SWP_NOMOVE|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, - - /* in MDI child */ - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam|defwinproc, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ - - /* in MDI frame */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, - - /* in MDI client */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOACTIVATE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOCLIENTMOVE }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ - { WM_NCCALCSIZE, sent|wparam|optional, 1 }, /* XP */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI client */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* XP sends a duplicate */ - - { HCBT_SETFOCUS, hook }, - { WM_KILLFOCUS, sent }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent }, /* in MDI client */ - - { WM_MDIREFRESHMENU, sent }, /* in MDI client */ - - { HCBT_DESTROYWND, hook }, - /* Win2k sends wparam set to - * MAKEWPARAM(WM_DESTROY, MDI_FIRST_CHILD_ID + nTotalCreated), - * while Win9x doesn't bother to set child window id according to - * CLIENTCREATESTRUCT.idFirstChild - */ - { 0x0090, sent|optional }, - { WM_PARENTNOTIFY, sent /*|wparam, WM_DESTROY*/ }, /* in MDI client */ - - { WM_SHOWWINDOW, sent|wparam, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_ERASEBKGND, sent|parent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - - { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, 0, 0 }, - { WM_DESTROY, sent }, - { WM_NCDESTROY, sent }, - { 0 } -}; -/* ShowWindow(SW_MAXIMIZE) for a not visible MDI child window */ -static const struct message WmMaximizeMDIchildInvisibleSeq[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, - { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_STATECHANGED }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, - - { WM_WINDOWPOSCHANGING, sent|wparam|optional|defwinproc, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCACTIVATE, sent|wparam|optional|defwinproc, 1 }, - { HCBT_SETFOCUS, hook|optional }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|optional }, /* in MDI client */ - { HCBT_SETFOCUS, hook|optional }, - { WM_KILLFOCUS, sent|optional }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|optional|defwinproc }, - { WM_MDIACTIVATE, sent|optional|defwinproc }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, - /* in MDI frame */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ - { 0 } -}; -/* ShowWindow(SW_MAXIMIZE) for a not visible maximized MDI child window */ -static const struct message WmMaximizeMDIchildInvisibleSeq2[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, - { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED }, - { WM_GETMINMAXINFO, sent|defwinproc }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, - - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc|optional, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCACTIVATE, sent|wparam|defwinproc|optional, 1 }, - { HCBT_SETFOCUS, hook|optional }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|optional }, /* in MDI client */ - { HCBT_SETFOCUS, hook|optional }, - { WM_KILLFOCUS, sent|optional }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|defwinproc|optional }, - { WM_MDIACTIVATE, sent|defwinproc|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ - { 0 } -}; -/* WM_MDIMAXIMIZE for an MDI child window with invisible parent */ -static const struct message WmMaximizeMDIchildInvisibleParentSeq[] = { - { WM_MDIMAXIMIZE, sent }, /* in MDI client */ - { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, - { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED }, - { WM_GETMINMAXINFO, sent|defwinproc }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|optional, 0, 0 }, /* XP doesn't send it */ - { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOREDRAW|SWP_STATECHANGED }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, - - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam|defwinproc, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_NCCALCSIZE, sent|wparam|defwinproc|optional, 1 }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* MDI child XP */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* MDI client XP */ - /* in MDI frame */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { 0x0093, sent|defwinproc|optional }, - { 0x0094, sent|defwinproc|optional }, - { 0x0094, sent|defwinproc|optional }, - { 0x0094, sent|defwinproc|optional }, - { 0x0094, sent|defwinproc|optional }, - { 0x0093, sent|defwinproc|optional }, - { 0x0093, sent|defwinproc|optional }, - { 0x0091, sent|defwinproc|optional }, - { 0x0092, sent|defwinproc|optional }, - { 0x0092, sent|defwinproc|optional }, - { 0x0092, sent|defwinproc|optional }, - { 0x0092, sent|defwinproc|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* MDI frame win2000 */ - /* in MDI client */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOACTIVATE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTMOVE }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - /* in MDI child */ - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOACTIVATE }, - { WM_GETMINMAXINFO, sent|defwinproc }, - { WM_NCCALCSIZE, sent|wparam|defwinproc, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTMOVE }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* MDI child win2000 */ - { WM_NCCALCSIZE, sent|wparam|defwinproc|optional, 1 }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* MDI child XP */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* MDI child XP */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* MDI client XP */ - /* in MDI frame */ - { 0x0093, sent|optional }, - { WM_NCCALCSIZE, sent|wparam|optional, 1 }, - { 0x0093, sent|defwinproc|optional }, - { 0x0093, sent|defwinproc|optional }, - { 0x0093, sent|defwinproc|optional }, - { 0x0091, sent|defwinproc|optional }, - { 0x0092, sent|defwinproc|optional }, - { 0x0092, sent|defwinproc|optional }, - { 0x0092, sent|defwinproc|optional }, - { 0x0092, sent|defwinproc|optional }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* MDI frame XP */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* MDI frame XP */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* MDI child XP */ - { 0 } -}; -/* ShowWindow(SW_MAXIMIZE) for a visible MDI child window */ -static const struct message WmMaximizeMDIchildVisibleSeq[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, - { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, - /* in MDI frame */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ - { 0 } -}; -/* ShowWindow(SW_RESTORE) for a visible maximized MDI child window */ -static const struct message WmRestoreMDIchildVisibleSeq[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_RESTORE }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, - /* in MDI frame */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ - { 0 } -}; -/* ShowWindow(SW_RESTORE) for a visible minimized MDI child window */ -static const struct message WmRestoreMDIchildVisibleSeq_2[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_RESTORE }, - { WM_QUERYOPEN, sent|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ - { EVENT_SYSTEM_MINIMIZEEND, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ - { HCBT_SETFOCUS, hook }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent }, - { 0 } -}; -/* ShowWindow(SW_MINIMIZE) for a visible restored MDI child window */ -static const struct message WmMinimizeMDIchildVisibleSeq[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_MINIMIZE }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|defwinproc|wparam|lparam, SIZE_MINIMIZED, 0 }, - { WM_CHILDACTIVATE, sent|wparam|lparam|defwinproc, 0, 0 }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ - { EVENT_SYSTEM_MINIMIZESTART, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ - /* FIXME: Wine creates an icon/title window while Windows doesn't */ - { WM_PARENTNOTIFY, sent|parent|wparam|optional, WM_CREATE }, /* MDI client */ - { 0 } -}; -/* ShowWindow(SW_RESTORE) for a not visible MDI child window */ -static const struct message WmRestoreMDIchildInisibleSeq[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_RESTORE }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_STATECHANGED }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, - { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, - /* in MDI frame */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ - { 0 } -}; - -static HWND mdi_client; -static WNDPROC old_mdi_client_proc; - -static LRESULT WINAPI mdi_client_hook_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - struct recvd_message msg; - - /* do not log painting messages */ - if (message != WM_PAINT && - message != WM_NCPAINT && - message != WM_SYNCPAINT && - message != WM_ERASEBKGND && - message != WM_NCHITTEST && - message != WM_GETTEXT && - message != WM_MDIGETACTIVE && - !ignore_message( message )) - { - msg.hwnd = hwnd; - msg.message = message; - msg.flags = sent|wparam|lparam; - msg.wParam = wParam; - msg.lParam = lParam; - msg.descr = "mdi client"; - add_message(&msg); - } - - return CallWindowProcA(old_mdi_client_proc, hwnd, message, wParam, lParam); -} - -static LRESULT WINAPI mdi_child_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - static LONG defwndproc_counter = 0; - LRESULT ret; - struct recvd_message msg; - - /* do not log painting messages */ - if (message != WM_PAINT && - message != WM_NCPAINT && - message != WM_SYNCPAINT && - message != WM_ERASEBKGND && - message != WM_NCHITTEST && - message != WM_GETTEXT && - !ignore_message( message )) - { - switch (message) - { - case WM_MDIACTIVATE: - { - HWND active, client = GetParent(hwnd); - - active = (HWND)SendMessageA(client, WM_MDIGETACTIVE, 0, 0); - - if (hwnd == (HWND)lParam) /* if we are being activated */ - ok (active == (HWND)lParam, "new active %p != active %p\n", (HWND)lParam, active); - else - ok (active == (HWND)wParam, "old active %p != active %p\n", (HWND)wParam, active); - break; - } - } - - msg.hwnd = hwnd; - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - msg.descr = "mdi child"; - add_message(&msg); - } - - defwndproc_counter++; - ret = DefMDIChildProcA(hwnd, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static LRESULT WINAPI mdi_frame_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - static LONG defwndproc_counter = 0; - LRESULT ret; - struct recvd_message msg; - - /* do not log painting messages */ - if (message != WM_PAINT && - message != WM_NCPAINT && - message != WM_SYNCPAINT && - message != WM_ERASEBKGND && - message != WM_NCHITTEST && - message != WM_GETTEXT && - !ignore_message( message )) - { - msg.hwnd = hwnd; - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - msg.descr = "mdi frame"; - add_message(&msg); - } - - defwndproc_counter++; - ret = DefFrameProcA(hwnd, mdi_client, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static BOOL mdi_RegisterWindowClasses(void) -{ - WNDCLASSA cls; - - cls.style = 0; - cls.lpfnWndProc = mdi_frame_wnd_proc; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(0); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "MDI_frame_class"; - if (!RegisterClassA(&cls)) return FALSE; - - cls.lpfnWndProc = mdi_child_wnd_proc; - cls.lpszClassName = "MDI_child_class"; - if (!RegisterClassA(&cls)) return FALSE; - - if (!GetClassInfoA(0, "MDIClient", &cls)) assert(0); - old_mdi_client_proc = cls.lpfnWndProc; - cls.hInstance = GetModuleHandleA(0); - cls.lpfnWndProc = mdi_client_hook_proc; - cls.lpszClassName = "MDI_client_class"; - if (!RegisterClassA(&cls)) assert(0); - - return TRUE; -} - -static void test_mdi_messages(void) -{ - MDICREATESTRUCTA mdi_cs; - CLIENTCREATESTRUCT client_cs; - HWND mdi_frame, mdi_child, mdi_child2, active_child; - BOOL zoomed; - RECT rc; - HMENU hMenu = CreateMenu(); - - if (!mdi_RegisterWindowClasses()) assert(0); - - flush_sequence(); - - trace("creating MDI frame window\n"); - mdi_frame = CreateWindowExA(0, "MDI_frame_class", "MDI frame window", - WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | - WS_MAXIMIZEBOX | WS_VISIBLE, - 100, 100, CW_USEDEFAULT, CW_USEDEFAULT, - GetDesktopWindow(), hMenu, - GetModuleHandleA(0), NULL); - assert(mdi_frame); - ok_sequence(WmCreateMDIframeSeq, "Create MDI frame window", FALSE); - - ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n", GetActiveWindow()); - ok(GetFocus() == mdi_frame, "wrong focus window %p\n", GetFocus()); - - trace("creating MDI client window\n"); - GetClientRect(mdi_frame, &rc); - client_cs.hWindowMenu = 0; - client_cs.idFirstChild = MDI_FIRST_CHILD_ID; - mdi_client = CreateWindowExA(0, "MDI_client_class", - NULL, - WS_CHILD | WS_VISIBLE | MDIS_ALLCHILDSTYLES, - rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, - mdi_frame, 0, GetModuleHandleA(0), &client_cs); - assert(mdi_client); - ok_sequence(WmCreateMDIclientSeq, "Create visible MDI client window", FALSE); - - ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n", GetActiveWindow()); - ok(GetFocus() == mdi_frame, "input focus should be on MDI frame not on %p\n", GetFocus()); - - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); - ok(!active_child, "wrong active MDI child %p\n", active_child); - ok(!zoomed, "wrong zoomed state %d\n", zoomed); - - SetFocus(0); - flush_sequence(); - - trace("creating invisible MDI child window\n"); - mdi_child = CreateWindowExA(WS_EX_MDICHILD, "MDI_child_class", "MDI child", - WS_CHILD, - 0, 0, CW_USEDEFAULT, CW_USEDEFAULT, - mdi_client, 0, GetModuleHandleA(0), NULL); - assert(mdi_child); - - flush_sequence(); - ShowWindow(mdi_child, SW_SHOWNORMAL); - ok_sequence(WmShowChildSeq, "ShowWindow(SW_SHOWNORMAL) MDI child window", FALSE); - - ok(GetWindowLongA(mdi_child, GWL_STYLE) & WS_VISIBLE, "MDI child should be visible\n"); - ok(IsWindowVisible(mdi_child), "MDI child should be visible\n"); - - ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n", GetActiveWindow()); - ok(GetFocus() == 0, "wrong focus window %p\n", GetFocus()); - - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); - ok(!active_child, "wrong active MDI child %p\n", active_child); - ok(!zoomed, "wrong zoomed state %d\n", zoomed); - - ShowWindow(mdi_child, SW_HIDE); - ok_sequence(WmHideChildSeq, "ShowWindow(SW_HIDE) MDI child window", FALSE); - flush_sequence(); - - ShowWindow(mdi_child, SW_SHOW); - ok_sequence(WmShowChildSeq, "ShowWindow(SW_SHOW) MDI child window", FALSE); - - ok(GetWindowLongA(mdi_child, GWL_STYLE) & WS_VISIBLE, "MDI child should be visible\n"); - ok(IsWindowVisible(mdi_child), "MDI child should be visible\n"); - - ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n", GetActiveWindow()); - ok(GetFocus() == 0, "wrong focus window %p\n", GetFocus()); - - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); - ok(!active_child, "wrong active MDI child %p\n", active_child); - ok(!zoomed, "wrong zoomed state %d\n", zoomed); - - DestroyWindow(mdi_child); - flush_sequence(); - - trace("creating visible MDI child window\n"); - mdi_child = CreateWindowExA(WS_EX_MDICHILD, "MDI_child_class", "MDI child", - WS_CHILD | WS_VISIBLE, - 0, 0, CW_USEDEFAULT, CW_USEDEFAULT, - mdi_client, 0, GetModuleHandleA(0), NULL); - assert(mdi_child); - ok_sequence(WmCreateMDIchildVisibleSeq, "Create visible MDI child window", FALSE); - - ok(GetWindowLongA(mdi_child, GWL_STYLE) & WS_VISIBLE, "MDI child should be visible\n"); - ok(IsWindowVisible(mdi_child), "MDI child should be visible\n"); - - ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n", GetActiveWindow()); - ok(GetFocus() == mdi_child, "wrong focus window %p\n", GetFocus()); - - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); - ok(active_child == mdi_child, "wrong active MDI child %p\n", active_child); - ok(!zoomed, "wrong zoomed state %d\n", zoomed); - flush_sequence(); - - DestroyWindow(mdi_child); - ok_sequence(WmDestroyMDIchildVisibleSeq, "Destroy visible MDI child window", TRUE); - - ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n", GetActiveWindow()); - ok(GetFocus() == 0, "wrong focus window %p\n", GetFocus()); - - /* Win2k: MDI client still returns a just destroyed child as active - * Win9x: MDI client returns 0 - */ - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); - ok(active_child == mdi_child || /* win2k */ - !active_child, /* win9x */ - "wrong active MDI child %p\n", active_child); - ok(!zoomed, "wrong zoomed state %d\n", zoomed); - - flush_sequence(); - - trace("creating invisible MDI child window\n"); - mdi_child2 = CreateWindowExA(WS_EX_MDICHILD, "MDI_child_class", "MDI child", - WS_CHILD, - 0, 0, CW_USEDEFAULT, CW_USEDEFAULT, - mdi_client, 0, GetModuleHandleA(0), NULL); - assert(mdi_child2); - ok_sequence(WmCreateMDIchildInvisibleSeq, "Create invisible MDI child window", FALSE); - - ok(!(GetWindowLongA(mdi_child2, GWL_STYLE) & WS_VISIBLE), "MDI child should not be visible\n"); - ok(!IsWindowVisible(mdi_child2), "MDI child should not be visible\n"); - - ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n", GetActiveWindow()); - ok(GetFocus() == 0, "wrong focus window %p\n", GetFocus()); - - /* Win2k: MDI client still returns a just destroyed child as active - * Win9x: MDI client returns mdi_child2 - */ - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); - ok(active_child == mdi_child || /* win2k */ - active_child == mdi_child2, /* win9x */ - "wrong active MDI child %p\n", active_child); - ok(!zoomed, "wrong zoomed state %d\n", zoomed); - flush_sequence(); - - ShowWindow(mdi_child2, SW_MAXIMIZE); - ok_sequence(WmMaximizeMDIchildInvisibleSeq, "ShowWindow(SW_MAXIMIZE):invisible MDI child", FALSE); - - ok(GetWindowLongA(mdi_child2, GWL_STYLE) & WS_VISIBLE, "MDI child should be visible\n"); - ok(IsWindowVisible(mdi_child2), "MDI child should be visible\n"); - - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); - ok(active_child == mdi_child2, "wrong active MDI child %p\n", active_child); - ok(zoomed, "wrong zoomed state %d\n", zoomed); - flush_sequence(); - - ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n", GetActiveWindow()); - ok(GetFocus() == mdi_child2 || /* win2k */ - GetFocus() == 0, /* win9x */ - "wrong focus window %p\n", GetFocus()); - - SetFocus(0); - flush_sequence(); - - ShowWindow(mdi_child2, SW_HIDE); - ok_sequence(WmHideChildSeq, "ShowWindow(SW_HIDE):MDI child", FALSE); - - ShowWindow(mdi_child2, SW_RESTORE); - ok_sequence(WmRestoreMDIchildInisibleSeq, "ShowWindow(SW_RESTORE):invisible MDI child", FALSE); - flush_sequence(); - - ok(GetWindowLongA(mdi_child2, GWL_STYLE) & WS_VISIBLE, "MDI child should be visible\n"); - ok(IsWindowVisible(mdi_child2), "MDI child should be visible\n"); - - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); - ok(active_child == mdi_child2, "wrong active MDI child %p\n", active_child); - ok(!zoomed, "wrong zoomed state %d\n", zoomed); - flush_sequence(); - - SetFocus(0); - flush_sequence(); - - ShowWindow(mdi_child2, SW_HIDE); - ok_sequence(WmHideChildSeq, "ShowWindow(SW_HIDE):MDI child", FALSE); - - ShowWindow(mdi_child2, SW_SHOW); - ok_sequence(WmShowChildSeq, "ShowWindow(SW_SHOW):MDI child", FALSE); - - ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n", GetActiveWindow()); - ok(GetFocus() == 0, "wrong focus window %p\n", GetFocus()); - - ShowWindow(mdi_child2, SW_MAXIMIZE); - ok_sequence(WmMaximizeMDIchildVisibleSeq, "ShowWindow(SW_MAXIMIZE):MDI child", FALSE); - - ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n", GetActiveWindow()); - ok(GetFocus() == 0, "wrong focus window %p\n", GetFocus()); - - ShowWindow(mdi_child2, SW_RESTORE); - ok_sequence(WmRestoreMDIchildVisibleSeq, "ShowWindow(SW_RESTORE):maximized MDI child", FALSE); - - ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n", GetActiveWindow()); - ok(GetFocus() == 0, "wrong focus window %p\n", GetFocus()); - - ShowWindow(mdi_child2, SW_MINIMIZE); - ok_sequence(WmMinimizeMDIchildVisibleSeq, "ShowWindow(SW_MINIMIZE):MDI child", TRUE); - - ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n", GetActiveWindow()); - ok(GetFocus() == 0, "wrong focus window %p\n", GetFocus()); - - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); - ok(active_child == mdi_child2, "wrong active MDI child %p\n", active_child); - ok(!zoomed, "wrong zoomed state %d\n", zoomed); - flush_sequence(); - - ShowWindow(mdi_child2, SW_RESTORE); - ok_sequence(WmRestoreMDIchildVisibleSeq_2, "ShowWindow(SW_RESTORE):minimized MDI child", FALSE); - - ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n", GetActiveWindow()); - ok(GetFocus() == mdi_child2, "wrong focus window %p\n", GetFocus()); - - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); - ok(active_child == mdi_child2, "wrong active MDI child %p\n", active_child); - ok(!zoomed, "wrong zoomed state %d\n", zoomed); - flush_sequence(); - - SetFocus(0); - flush_sequence(); - - ShowWindow(mdi_child2, SW_HIDE); - ok_sequence(WmHideChildSeq, "ShowWindow(SW_HIDE):MDI child", FALSE); - - ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n", GetActiveWindow()); - ok(GetFocus() == 0, "wrong focus window %p\n", GetFocus()); - - DestroyWindow(mdi_child2); - ok_sequence(WmDestroyMDIchildInvisibleSeq, "Destroy invisible MDI child window", FALSE); - - ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n", GetActiveWindow()); - ok(GetFocus() == 0, "wrong focus window %p\n", GetFocus()); - - /* test for maximized MDI children */ - trace("creating maximized visible MDI child window 1\n"); - mdi_child = CreateWindowExA(WS_EX_MDICHILD, "MDI_child_class", "MDI child", - WS_CHILD | WS_VISIBLE | WS_MAXIMIZEBOX | WS_MAXIMIZE, - 0, 0, CW_USEDEFAULT, CW_USEDEFAULT, - mdi_client, 0, GetModuleHandleA(0), NULL); - assert(mdi_child); - ok_sequence(WmCreateMDIchildVisibleMaxSeq1, "Create maximized visible 1st MDI child window", TRUE); - ok(IsZoomed(mdi_child), "1st MDI child should be maximized\n"); - - ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n", GetActiveWindow()); - ok(GetFocus() == mdi_child || /* win2k */ - GetFocus() == 0, /* win9x */ - "wrong focus window %p\n", GetFocus()); - - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); - ok(active_child == mdi_child, "wrong active MDI child %p\n", active_child); - ok(zoomed, "wrong zoomed state %d\n", zoomed); - flush_sequence(); - - trace("creating maximized visible MDI child window 2\n"); - mdi_child2 = CreateWindowExA(WS_EX_MDICHILD, "MDI_child_class", "MDI child", - WS_CHILD | WS_VISIBLE | WS_MAXIMIZEBOX | WS_MAXIMIZE, - 0, 0, CW_USEDEFAULT, CW_USEDEFAULT, - mdi_client, 0, GetModuleHandleA(0), NULL); - assert(mdi_child2); - ok_sequence(WmCreateMDIchildVisibleMaxSeq2, "Create maximized visible 2nd MDI child 2 window", TRUE); - ok(IsZoomed(mdi_child2), "2nd MDI child should be maximized\n"); - ok(!IsZoomed(mdi_child), "1st MDI child should NOT be maximized\n"); - - ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n", GetActiveWindow()); - ok(GetFocus() == mdi_child2, "wrong focus window %p\n", GetFocus()); - - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); - ok(active_child == mdi_child2, "wrong active MDI child %p\n", active_child); - ok(zoomed, "wrong zoomed state %d\n", zoomed); - flush_sequence(); - - trace("destroying maximized visible MDI child window 2\n"); - DestroyWindow(mdi_child2); - ok_sequence(WmDestroyMDIchildVisibleSeq, "Destroy visible MDI child window", TRUE); - - ok(!IsZoomed(mdi_child), "1st MDI child should NOT be maximized\n"); - - ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n", GetActiveWindow()); - ok(GetFocus() == 0, "wrong focus window %p\n", GetFocus()); - - /* Win2k: MDI client still returns a just destroyed child as active - * Win9x: MDI client returns 0 - */ - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); - ok(active_child == mdi_child2 || /* win2k */ - !active_child, /* win9x */ - "wrong active MDI child %p\n", active_child); - flush_sequence(); - - ShowWindow(mdi_child, SW_MAXIMIZE); - ok(IsZoomed(mdi_child), "1st MDI child should be maximized\n"); - flush_sequence(); - - ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n", GetActiveWindow()); - ok(GetFocus() == mdi_child, "wrong focus window %p\n", GetFocus()); - - trace("re-creating maximized visible MDI child window 2\n"); - mdi_child2 = CreateWindowExA(WS_EX_MDICHILD, "MDI_child_class", "MDI child", - WS_CHILD | WS_VISIBLE | WS_MAXIMIZEBOX | WS_MAXIMIZE, - 0, 0, CW_USEDEFAULT, CW_USEDEFAULT, - mdi_client, 0, GetModuleHandleA(0), NULL); - assert(mdi_child2); - ok_sequence(WmCreateMDIchildVisibleMaxSeq2, "Create maximized visible 2nd MDI child 2 window", TRUE); - ok(IsZoomed(mdi_child2), "2nd MDI child should be maximized\n"); - ok(!IsZoomed(mdi_child), "1st MDI child should NOT be maximized\n"); - - ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n", GetActiveWindow()); - ok(GetFocus() == mdi_child2, "wrong focus window %p\n", GetFocus()); - - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); - ok(active_child == mdi_child2, "wrong active MDI child %p\n", active_child); - ok(zoomed, "wrong zoomed state %d\n", zoomed); - flush_sequence(); - - SendMessageA(mdi_child2, WM_SYSCOMMAND, SC_CLOSE, 0); - ok_sequence(WmDestroyMDIchildVisibleMaxSeq2, "WM_SYSCOMMAND/SC_CLOSE on a visible maximized MDI child window", TRUE); - ok(!IsWindow(mdi_child2), "MDI child 2 should be destroyed\n"); - - ok(IsZoomed(mdi_child), "1st MDI child should be maximized\n"); - ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n", GetActiveWindow()); - ok(GetFocus() == mdi_child, "wrong focus window %p\n", GetFocus()); - - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); - ok(active_child == mdi_child, "wrong active MDI child %p\n", active_child); - ok(zoomed, "wrong zoomed state %d\n", zoomed); - flush_sequence(); - - DestroyWindow(mdi_child); - ok_sequence(WmDestroyMDIchildVisibleSeq, "Destroy visible MDI child window", TRUE); - - ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n", GetActiveWindow()); - ok(GetFocus() == 0, "wrong focus window %p\n", GetFocus()); - - /* Win2k: MDI client still returns a just destroyed child as active - * Win9x: MDI client returns 0 - */ - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); - ok(active_child == mdi_child || /* win2k */ - !active_child, /* win9x */ - "wrong active MDI child %p\n", active_child); - flush_sequence(); - - trace("creating maximized invisible MDI child window\n"); - mdi_child2 = CreateWindowExA(WS_EX_MDICHILD, "MDI_child_class", "MDI child", - WS_CHILD | WS_MAXIMIZE | WS_CAPTION | WS_THICKFRAME, - 0, 0, CW_USEDEFAULT, CW_USEDEFAULT, - mdi_client, 0, GetModuleHandleA(0), NULL); - assert(mdi_child2); - ok_sequence(WmCreateMDIchildInvisibleMaxSeq4, "Create maximized invisible MDI child window", FALSE); - ok(IsZoomed(mdi_child2), "MDI child should be maximized\n"); - ok(!(GetWindowLongA(mdi_child2, GWL_STYLE) & WS_VISIBLE), "MDI child should be not visible\n"); - ok(!IsWindowVisible(mdi_child2), "MDI child should be not visible\n"); - - /* Win2k: MDI client still returns a just destroyed child as active - * Win9x: MDI client returns 0 - */ - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); - ok(active_child == mdi_child || /* win2k */ - !active_child || active_child == mdi_child2, /* win9x */ - "wrong active MDI child %p\n", active_child); - flush_sequence(); - - trace("call ShowWindow(mdi_child, SW_MAXIMIZE)\n"); - ShowWindow(mdi_child2, SW_MAXIMIZE); - ok_sequence(WmMaximizeMDIchildInvisibleSeq2, "ShowWindow(SW_MAXIMIZE):invisible maximized MDI child", FALSE); - ok(IsZoomed(mdi_child2), "MDI child should be maximized\n"); - ok(GetWindowLongA(mdi_child2, GWL_STYLE) & WS_VISIBLE, "MDI child should be visible\n"); - ok(IsWindowVisible(mdi_child2), "MDI child should be visible\n"); - - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); - ok(active_child == mdi_child2, "wrong active MDI child %p\n", active_child); - ok(zoomed, "wrong zoomed state %d\n", zoomed); - flush_sequence(); - - SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child2, 0); - flush_sequence(); - - /* end of test for maximized MDI children */ - SetFocus(0); - flush_sequence(); - trace("creating maximized visible MDI child window 1(Switch test)\n"); - mdi_child = CreateWindowExA(WS_EX_MDICHILD, "MDI_child_class", "MDI child", - WS_CHILD | WS_VISIBLE | WS_MAXIMIZEBOX | WS_MAXIMIZE, - 0, 0, CW_USEDEFAULT, CW_USEDEFAULT, - mdi_client, 0, GetModuleHandleA(0), NULL); - assert(mdi_child); - ok_sequence(WmCreateMDIchildVisibleMaxSeq1, "Create maximized visible 1st MDI child window(Switch test)", TRUE); - ok(IsZoomed(mdi_child), "1st MDI child should be maximized(Switch test)\n"); - - ok(GetActiveWindow() == mdi_frame, "wrong active window %p(Switch test)\n", GetActiveWindow()); - ok(GetFocus() == mdi_child || /* win2k */ - GetFocus() == 0, /* win9x */ - "wrong focus window %p(Switch test)\n", GetFocus()); - - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); - ok(active_child == mdi_child, "wrong active MDI child %p(Switch test)\n", active_child); - ok(zoomed, "wrong zoomed state %d(Switch test)\n", zoomed); - flush_sequence(); - - trace("creating maximized visible MDI child window 2(Switch test)\n"); - mdi_child2 = CreateWindowExA(WS_EX_MDICHILD, "MDI_child_class", "MDI child", - WS_CHILD | WS_VISIBLE | WS_MAXIMIZEBOX | WS_MAXIMIZE, - 0, 0, CW_USEDEFAULT, CW_USEDEFAULT, - mdi_client, 0, GetModuleHandleA(0), NULL); - assert(mdi_child2); - ok_sequence(WmCreateMDIchildVisibleMaxSeq2, "Create maximized visible 2nd MDI child window (Switch test)", TRUE); - - ok(IsZoomed(mdi_child2), "2nd MDI child should be maximized(Switch test)\n"); - ok(!IsZoomed(mdi_child), "1st MDI child should NOT be maximized(Switch test)\n"); - - ok(GetActiveWindow() == mdi_frame, "wrong active window %p(Switch test)\n", GetActiveWindow()); - ok(GetFocus() == mdi_child2, "wrong focus window %p(Switch test)\n", GetFocus()); - - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); - ok(active_child == mdi_child2, "wrong active MDI child %p(Switch test)\n", active_child); - ok(zoomed, "wrong zoomed state %d(Switch test)\n", zoomed); - flush_sequence(); - - trace("Switch child window.\n"); - SendMessageA(mdi_client, WM_MDIACTIVATE, (WPARAM)mdi_child, 0); - ok_sequence(WmSwitchChild, "Child did not switch correctly", TRUE); - trace("end of test for switch maximized MDI children\n"); - flush_sequence(); - - /* Prepare for switching test of not maximized MDI children */ - ShowWindow( mdi_child, SW_NORMAL ); - ok(!IsZoomed(mdi_child), "wrong zoomed state for %p(Switch test)\n", mdi_child); - ok(!IsZoomed(mdi_child2), "wrong zoomed state for %p(Switch test)\n", mdi_child2); - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0); - ok(active_child == mdi_child, "wrong active MDI child %p(Switch test)\n", active_child); - flush_sequence(); - - SendMessageA(mdi_client, WM_MDIACTIVATE, (WPARAM)mdi_child2, 0); - ok_sequence(WmSwitchNotMaximizedChild, "Not maximized child did not switch correctly", FALSE); - trace("end of test for switch not maximized MDI children\n"); - flush_sequence(); - - SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); - flush_sequence(); - - SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child2, 0); - flush_sequence(); - - SetFocus(0); - flush_sequence(); - /* end of tests for switch maximized/not maximized MDI children */ - - mdi_cs.szClass = "MDI_child_Class"; - mdi_cs.szTitle = "MDI child"; - mdi_cs.hOwner = GetModuleHandleA(0); - mdi_cs.x = 0; - mdi_cs.y = 0; - mdi_cs.cx = CW_USEDEFAULT; - mdi_cs.cy = CW_USEDEFAULT; - mdi_cs.style = WS_CHILD | WS_SYSMENU | WS_VISIBLE | WS_MAXIMIZEBOX | WS_MAXIMIZE; - mdi_cs.lParam = 0; - mdi_child = (HWND)SendMessageA(mdi_client, WM_MDICREATE, 0, (LPARAM)&mdi_cs); - ok(mdi_child != 0, "MDI child creation failed\n"); - ok_sequence(WmCreateMDIchildVisibleMaxSeq3, "WM_MDICREATE for maximized visible MDI child window", TRUE); - - ok(GetMenuItemID(hMenu, GetMenuItemCount(hMenu) - 1) == SC_CLOSE, "SC_CLOSE menu item not found\n"); - - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); - ok(active_child == mdi_child, "wrong active MDI child %p\n", active_child); - - ok(IsZoomed(mdi_child), "MDI child should be maximized\n"); - ok(GetActiveWindow() == mdi_frame, "wrong active window %p\n", GetActiveWindow()); - ok(GetFocus() == mdi_child, "wrong focus window %p\n", GetFocus()); - - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); - ok(active_child == mdi_child, "wrong active MDI child %p\n", active_child); - ok(zoomed, "wrong zoomed state %d\n", zoomed); - flush_sequence(); - - SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); - ok_sequence(WmDestroyMDIchildVisibleMaxSeq1, "Destroy visible maximized MDI child window", TRUE); - - ok(!IsWindow(mdi_child), "MDI child should be destroyed\n"); - active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, (LPARAM)&zoomed); - ok(!active_child, "wrong active MDI child %p\n", active_child); - - SetFocus(0); - flush_sequence(); - - DestroyWindow(mdi_client); - ok_sequence(WmDestroyMDIclientSeq, "Destroy MDI client window", FALSE); - - /* test maximization of MDI child with invisible parent */ - client_cs.hWindowMenu = 0; - mdi_client = CreateWindow("MDI_client_class", - NULL, - WS_CHILD | WS_CLIPCHILDREN | WS_VSCROLL | WS_HSCROLL | WS_VISIBLE, - 0, 0, 660, 430, - mdi_frame, 0, GetModuleHandleA(0), &client_cs); - ok_sequence(WmCreateMDIclientSeq, "Create MDI client window", FALSE); - - ShowWindow(mdi_client, SW_HIDE); - ok_sequence(WmHideMDIclientSeq, "Hide MDI client window", FALSE); - - mdi_child = CreateWindowExA(WS_EX_MDICHILD, "MDI_child_class", "MDI child", - WS_CHILD | WS_CLIPCHILDREN | WS_VSCROLL | WS_HSCROLL, - 0, 0, 650, 440, - mdi_client, 0, GetModuleHandleA(0), NULL); - ok_sequence(WmCreateMDIchildInvisibleParentSeq, "Create MDI child window with invisible parent", FALSE); - - SendMessage(mdi_client, WM_MDIMAXIMIZE, (WPARAM) mdi_child, 0); - ok_sequence(WmMaximizeMDIchildInvisibleParentSeq, "Maximize MDI child window with invisible parent", TRUE); - zoomed = IsZoomed(mdi_child); - ok(zoomed, "wrong zoomed state %d\n", zoomed); - - ShowWindow(mdi_client, SW_SHOW); - ok_sequence(WmShowMDIclientSeq, "Show MDI client window", FALSE); - - DestroyWindow(mdi_child); - ok_sequence(WmDestroyMDIchildVisibleSeq, "Destroy visible maximized MDI child window", TRUE); - - /* end of test for maximization of MDI child with invisible parent */ - - DestroyWindow(mdi_client); - ok_sequence(WmDestroyMDIclientSeq, "Destroy MDI client window", FALSE); - - DestroyWindow(mdi_frame); - ok_sequence(WmDestroyMDIframeSeq, "Destroy MDI frame window", FALSE); -} -/************************* End of MDI test **********************************/ - -static void test_WM_SETREDRAW(HWND hwnd) -{ - DWORD style = GetWindowLongA(hwnd, GWL_STYLE); - - flush_events(); - flush_sequence(); - - SendMessageA(hwnd, WM_SETREDRAW, FALSE, 0); - ok_sequence(WmSetRedrawFalseSeq, "SetRedraw:FALSE", FALSE); - - ok(!(GetWindowLongA(hwnd, GWL_STYLE) & WS_VISIBLE), "WS_VISIBLE should NOT be set\n"); - ok(!IsWindowVisible(hwnd), "IsWindowVisible() should return FALSE\n"); - - flush_sequence(); - SendMessageA(hwnd, WM_SETREDRAW, TRUE, 0); - ok_sequence(WmSetRedrawTrueSeq, "SetRedraw:TRUE", FALSE); - - ok(GetWindowLongA(hwnd, GWL_STYLE) & WS_VISIBLE, "WS_VISIBLE should be set\n"); - ok(IsWindowVisible(hwnd), "IsWindowVisible() should return TRUE\n"); - - /* restore original WS_VISIBLE state */ - SetWindowLongA(hwnd, GWL_STYLE, style); - - flush_events(); - flush_sequence(); -} - -static INT_PTR CALLBACK TestModalDlgProcA(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - struct recvd_message msg; - - if (ignore_message( message )) return 0; - - switch (message) - { - /* ignore */ - case WM_MOUSEMOVE: - case WM_NCMOUSEMOVE: - case WM_NCMOUSELEAVE: - case WM_SETCURSOR: - return 0; - case WM_NCHITTEST: - return HTCLIENT; - } - - msg.hwnd = hwnd; - msg.message = message; - msg.flags = sent|wparam|lparam; - msg.wParam = wParam; - msg.lParam = lParam; - msg.descr = "dialog"; - add_message(&msg); - - if (message == WM_INITDIALOG) SetTimer( hwnd, 1, 100, NULL ); - if (message == WM_TIMER) EndDialog( hwnd, 0 ); - return 0; -} - -static void test_hv_scroll_1(HWND hwnd, INT ctl, DWORD clear, DWORD set, INT min, INT max) -{ - DWORD style, exstyle; - INT xmin, xmax; - BOOL ret; - - exstyle = GetWindowLongA(hwnd, GWL_EXSTYLE); - style = GetWindowLongA(hwnd, GWL_STYLE); - /* do not be confused by WS_DLGFRAME set */ - if ((style & WS_CAPTION) == WS_CAPTION) style &= ~WS_CAPTION; - - if (clear) ok(style & clear, "style %08x should be set\n", clear); - if (set) ok(!(style & set), "style %08x should not be set\n", set); - - ret = SetScrollRange(hwnd, ctl, min, max, FALSE); - ok( ret, "SetScrollRange(%d) error %d\n", ctl, GetLastError()); - if ((style & (WS_DLGFRAME | WS_BORDER | WS_THICKFRAME)) || (exstyle & WS_EX_DLGMODALFRAME)) - ok_sequence(WmSetScrollRangeHV_NC_Seq, "SetScrollRange(SB_HORZ/SB_VERT) NC", FALSE); - else - ok_sequence(WmSetScrollRangeHVSeq, "SetScrollRange(SB_HORZ/SB_VERT)", FALSE); - - style = GetWindowLongA(hwnd, GWL_STYLE); - if (set) ok(style & set, "style %08x should be set\n", set); - if (clear) ok(!(style & clear), "style %08x should not be set\n", clear); - - /* a subsequent call should do nothing */ - ret = SetScrollRange(hwnd, ctl, min, max, FALSE); - ok( ret, "SetScrollRange(%d) error %d\n", ctl, GetLastError()); - ok_sequence(WmEmptySeq, "SetScrollRange(SB_HORZ/SB_VERT) empty sequence", FALSE); - - xmin = 0xdeadbeef; - xmax = 0xdeadbeef; - ret = GetScrollRange(hwnd, ctl, &xmin, &xmax); - ok( ret, "GetScrollRange(%d) error %d\n", ctl, GetLastError()); - ok_sequence(WmEmptySeq, "GetScrollRange(SB_HORZ/SB_VERT) empty sequence", FALSE); - ok(xmin == min, "unexpected min scroll value %d\n", xmin); - ok(xmax == max, "unexpected max scroll value %d\n", xmax); -} - -static void test_hv_scroll_2(HWND hwnd, INT ctl, DWORD clear, DWORD set, INT min, INT max) -{ - DWORD style, exstyle; - SCROLLINFO si; - BOOL ret; - - exstyle = GetWindowLongA(hwnd, GWL_EXSTYLE); - style = GetWindowLongA(hwnd, GWL_STYLE); - /* do not be confused by WS_DLGFRAME set */ - if ((style & WS_CAPTION) == WS_CAPTION) style &= ~WS_CAPTION; - - if (clear) ok(style & clear, "style %08x should be set\n", clear); - if (set) ok(!(style & set), "style %08x should not be set\n", set); - - si.cbSize = sizeof(si); - si.fMask = SIF_RANGE; - si.nMin = min; - si.nMax = max; - SetScrollInfo(hwnd, ctl, &si, TRUE); - if ((style & (WS_DLGFRAME | WS_BORDER | WS_THICKFRAME)) || (exstyle & WS_EX_DLGMODALFRAME)) - ok_sequence(WmSetScrollRangeHV_NC_Seq, "SetScrollInfo(SB_HORZ/SB_VERT) NC", FALSE); - else - ok_sequence(WmSetScrollRangeHVSeq, "SetScrollInfo(SB_HORZ/SB_VERT)", FALSE); - - style = GetWindowLongA(hwnd, GWL_STYLE); - if (set) ok(style & set, "style %08x should be set\n", set); - if (clear) ok(!(style & clear), "style %08x should not be set\n", clear); - - /* a subsequent call should do nothing */ - SetScrollInfo(hwnd, ctl, &si, TRUE); - if (style & WS_HSCROLL) - ok_sequence(WmSetScrollRangeHSeq_empty, "SetScrollInfo(SB_HORZ/SB_VERT) empty sequence", FALSE); - else if (style & WS_VSCROLL) - ok_sequence(WmSetScrollRangeVSeq_empty, "SetScrollInfo(SB_HORZ/SB_VERT) empty sequence", FALSE); - else - ok_sequence(WmEmptySeq, "SetScrollInfo(SB_HORZ/SB_VERT) empty sequence", FALSE); - - si.fMask = SIF_PAGE; - si.nPage = 5; - SetScrollInfo(hwnd, ctl, &si, FALSE); - ok_sequence(WmEmptySeq, "SetScrollInfo(SB_HORZ/SB_VERT) empty sequence", FALSE); - - si.fMask = SIF_POS; - si.nPos = max - 1; - SetScrollInfo(hwnd, ctl, &si, FALSE); - ok_sequence(WmEmptySeq, "SetScrollInfo(SB_HORZ/SB_VERT) empty sequence", FALSE); - - si.fMask = SIF_RANGE; - si.nMin = 0xdeadbeef; - si.nMax = 0xdeadbeef; - ret = GetScrollInfo(hwnd, ctl, &si); - ok( ret, "GetScrollInfo error %d\n", GetLastError()); - ok_sequence(WmEmptySeq, "GetScrollRange(SB_HORZ/SB_VERT) empty sequence", FALSE); - ok(si.nMin == min, "unexpected min scroll value %d\n", si.nMin); - ok(si.nMax == max, "unexpected max scroll value %d\n", si.nMax); -} - -/* Win9x sends WM_USER+xxx while and NT versions send SBM_xxx messages */ -static void test_scroll_messages(HWND hwnd) -{ - SCROLLINFO si; - INT min, max; - BOOL ret; - - flush_events(); - flush_sequence(); - - min = 0xdeadbeef; - max = 0xdeadbeef; - ret = GetScrollRange(hwnd, SB_CTL, &min, &max); - ok( ret, "GetScrollRange error %d\n", GetLastError()); - if (sequence->message != WmGetScrollRangeSeq[0].message) - trace("GetScrollRange(SB_CTL) generated unknown message %04x\n", sequence->message); - /* values of min and max are undefined */ - flush_sequence(); - - ret = SetScrollRange(hwnd, SB_CTL, 10, 150, FALSE); - ok( ret, "SetScrollRange error %d\n", GetLastError()); - if (sequence->message != WmSetScrollRangeSeq[0].message) - trace("SetScrollRange(SB_CTL) generated unknown message %04x\n", sequence->message); - flush_sequence(); - - min = 0xdeadbeef; - max = 0xdeadbeef; - ret = GetScrollRange(hwnd, SB_CTL, &min, &max); - ok( ret, "GetScrollRange error %d\n", GetLastError()); - if (sequence->message != WmGetScrollRangeSeq[0].message) - trace("GetScrollRange(SB_CTL) generated unknown message %04x\n", sequence->message); - /* values of min and max are undefined */ - flush_sequence(); - - si.cbSize = sizeof(si); - si.fMask = SIF_RANGE; - si.nMin = 20; - si.nMax = 160; - SetScrollInfo(hwnd, SB_CTL, &si, FALSE); - if (sequence->message != WmSetScrollRangeSeq[0].message) - trace("SetScrollInfo(SB_CTL) generated unknown message %04x\n", sequence->message); - flush_sequence(); - - si.fMask = SIF_PAGE; - si.nPage = 10; - SetScrollInfo(hwnd, SB_CTL, &si, FALSE); - if (sequence->message != WmSetScrollRangeSeq[0].message) - trace("SetScrollInfo(SB_CTL) generated unknown message %04x\n", sequence->message); - flush_sequence(); - - si.fMask = SIF_POS; - si.nPos = 20; - SetScrollInfo(hwnd, SB_CTL, &si, FALSE); - if (sequence->message != WmSetScrollRangeSeq[0].message) - trace("SetScrollInfo(SB_CTL) generated unknown message %04x\n", sequence->message); - flush_sequence(); - - si.fMask = SIF_RANGE; - si.nMin = 0xdeadbeef; - si.nMax = 0xdeadbeef; - ret = GetScrollInfo(hwnd, SB_CTL, &si); - ok( ret, "GetScrollInfo error %d\n", GetLastError()); - if (sequence->message != WmGetScrollInfoSeq[0].message) - trace("GetScrollInfo(SB_CTL) generated unknown message %04x\n", sequence->message); - /* values of min and max are undefined */ - flush_sequence(); - - /* set WS_HSCROLL */ - test_hv_scroll_1(hwnd, SB_HORZ, 0, WS_HSCROLL, 10, 150); - /* clear WS_HSCROLL */ - test_hv_scroll_1(hwnd, SB_HORZ, WS_HSCROLL, 0, 0, 0); - - /* set WS_HSCROLL */ - test_hv_scroll_2(hwnd, SB_HORZ, 0, WS_HSCROLL, 10, 150); - /* clear WS_HSCROLL */ - test_hv_scroll_2(hwnd, SB_HORZ, WS_HSCROLL, 0, 0, 0); - - /* set WS_VSCROLL */ - test_hv_scroll_1(hwnd, SB_VERT, 0, WS_VSCROLL, 10, 150); - /* clear WS_VSCROLL */ - test_hv_scroll_1(hwnd, SB_VERT, WS_VSCROLL, 0, 0, 0); - - /* set WS_VSCROLL */ - test_hv_scroll_2(hwnd, SB_VERT, 0, WS_VSCROLL, 10, 150); - /* clear WS_VSCROLL */ - test_hv_scroll_2(hwnd, SB_VERT, WS_VSCROLL, 0, 0, 0); -} - -static void test_showwindow(void) -{ - HWND hwnd, hchild; - RECT rc; - - hwnd = CreateWindowExA(0, "TestWindowClass", "Test overlapped", WS_OVERLAPPEDWINDOW, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok (hwnd != 0, "Failed to create overlapped window\n"); - hchild = CreateWindowExA(0, "TestWindowClass", "Test child", WS_CHILD, - 0, 0, 10, 10, hwnd, 0, 0, NULL); - ok (hchild != 0, "Failed to create child\n"); - flush_sequence(); - - /* ShowWindow( SW_SHOWNA) for invisible top level window */ - trace("calling ShowWindow( SW_SHOWNA) for invisible top level window\n"); - ok( ShowWindow(hwnd, SW_SHOWNA) == FALSE, "ShowWindow: window was visible\n" ); - ok_sequence(WmSHOWNATopInvisible, "ShowWindow(SW_SHOWNA) on invisible top level window", FALSE); - - /* ShowWindow( SW_SHOWNA) for now visible top level window */ - trace("calling ShowWindow( SW_SHOWNA) for now visible top level window\n"); - ok( ShowWindow(hwnd, SW_SHOWNA) != FALSE, "ShowWindow: window was invisible\n" ); - ok_sequence(WmSHOWNATopVisible, "ShowWindow(SW_SHOWNA) on visible top level window", FALSE); - /* back to invisible */ - ShowWindow(hchild, SW_HIDE); - ShowWindow(hwnd, SW_HIDE); - flush_sequence(); - /* ShowWindow(SW_SHOWNA) with child and parent invisible */ - trace("calling ShowWindow( SW_SHOWNA) for invisible child with invisible parent\n"); - ok( ShowWindow(hchild, SW_SHOWNA) == FALSE, "ShowWindow: window was visible\n" ); - ok_sequence(WmSHOWNAChildInvisParInvis, "ShowWindow(SW_SHOWNA) invisible child and parent", FALSE); - /* ShowWindow(SW_SHOWNA) with child visible and parent invisible */ - ok( ShowWindow(hchild, SW_SHOW) != FALSE, "ShowWindow: window was invisible\n" ); - flush_sequence(); - trace("calling ShowWindow( SW_SHOWNA) for the visible child and invisible parent\n"); - ok( ShowWindow(hchild, SW_SHOWNA) != FALSE, "ShowWindow: window was invisible\n" ); - ok_sequence(WmSHOWNAChildVisParInvis, "ShowWindow(SW_SHOWNA) visible child and invisible parent", FALSE); - /* ShowWindow(SW_SHOWNA) with child visible and parent visible */ - ShowWindow( hwnd, SW_SHOW); - flush_sequence(); - trace("calling ShowWindow( SW_SHOWNA) for the visible child and parent\n"); - ok( ShowWindow(hchild, SW_SHOWNA) != FALSE, "ShowWindow: window was invisible\n" ); - ok_sequence(WmSHOWNAChildVisParVis, "ShowWindow(SW_SHOWNA) for the visible child and parent", FALSE); - - /* ShowWindow(SW_SHOWNA) with child invisible and parent visible */ - ShowWindow( hchild, SW_HIDE); - flush_sequence(); - trace("calling ShowWindow( SW_SHOWNA) for the invisible child and visible parent\n"); - ok( ShowWindow(hchild, SW_SHOWNA) == FALSE, "ShowWindow: window was visible\n" ); - ok_sequence(WmSHOWNAChildInvisParVis, "ShowWindow(SW_SHOWNA) for the invisible child and visible parent", FALSE); - - SetCapture(hchild); - ok(GetCapture() == hchild, "wrong capture window %p\n", GetCapture()); - DestroyWindow(hchild); - ok(!GetCapture(), "wrong capture window %p\n", GetCapture()); - - DestroyWindow(hwnd); - flush_sequence(); - - /* Popup windows */ - /* Test 1: - * 1. Create invisible maximized popup window. - * 2. Move and resize it. - * 3. Show it maximized. - */ - trace("calling CreateWindowExA( WS_MAXIMIZE ) for invisible maximized popup window\n"); - hwnd = CreateWindowExA(0, "TestWindowClass", "Test popup", WS_POPUP | WS_MAXIMIZE, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok (hwnd != 0, "Failed to create popup window\n"); - ok(IsZoomed(hwnd), "window should be maximized\n"); - ok_sequence(WmCreateInvisibleMaxPopupSeq, "CreateWindow(WS_MAXIMIZED):popup", FALSE); - - GetWindowRect(hwnd, &rc); - ok( rc.right-rc.left == GetSystemMetrics(SM_CXSCREEN) && - rc.bottom-rc.top == GetSystemMetrics(SM_CYSCREEN), - "Invalid maximized size before ShowWindow (%d,%d)-(%d,%d)\n", - rc.left, rc.top, rc.right, rc.bottom); - /* Reset window's size & position */ - SetWindowPos(hwnd, 0, 10, 10, 200, 200, SWP_NOZORDER | SWP_NOACTIVATE); - ok(IsZoomed(hwnd), "window should be maximized\n"); - flush_sequence(); - - trace("calling ShowWindow( SW_SHOWMAXIMIZE ) for invisible maximized popup window\n"); - ShowWindow(hwnd, SW_SHOWMAXIMIZED); - ok(IsZoomed(hwnd), "window should be maximized\n"); - ok_sequence(WmShowMaxPopupResizedSeq, "ShowWindow(SW_SHOWMAXIMIZED):invisible maximized and resized popup", FALSE); - - GetWindowRect(hwnd, &rc); - ok( rc.right-rc.left == GetSystemMetrics(SM_CXSCREEN) && - rc.bottom-rc.top == GetSystemMetrics(SM_CYSCREEN), - "Invalid maximized size after ShowWindow (%d,%d)-(%d,%d)\n", - rc.left, rc.top, rc.right, rc.bottom); - DestroyWindow(hwnd); - flush_sequence(); - - /* Test 2: - * 1. Create invisible maximized popup window. - * 2. Show it maximized. - */ - trace("calling CreateWindowExA( WS_MAXIMIZE ) for invisible maximized popup window\n"); - hwnd = CreateWindowExA(0, "TestWindowClass", "Test popup", WS_POPUP | WS_MAXIMIZE, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok (hwnd != 0, "Failed to create popup window\n"); - ok(IsZoomed(hwnd), "window should be maximized\n"); - ok_sequence(WmCreateInvisibleMaxPopupSeq, "CreateWindow(WS_MAXIMIZED):popup", FALSE); - - trace("calling ShowWindow( SW_SHOWMAXIMIZE ) for invisible maximized popup window\n"); - ShowWindow(hwnd, SW_SHOWMAXIMIZED); - ok(IsZoomed(hwnd), "window should be maximized\n"); - ok_sequence(WmShowMaxPopupSeq, "ShowWindow(SW_SHOWMAXIMIZED):invisible maximized popup", FALSE); - DestroyWindow(hwnd); - flush_sequence(); - - /* Test 3: - * 1. Create visible maximized popup window. - */ - trace("calling CreateWindowExA( WS_MAXIMIZE ) for maximized popup window\n"); - hwnd = CreateWindowExA(0, "TestWindowClass", "Test popup", WS_POPUP | WS_MAXIMIZE | WS_VISIBLE, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok (hwnd != 0, "Failed to create popup window\n"); - ok(IsZoomed(hwnd), "window should be maximized\n"); - ok_sequence(WmCreateMaxPopupSeq, "CreateWindow(WS_MAXIMIZED):popup", FALSE); - DestroyWindow(hwnd); - flush_sequence(); - - /* Test 4: - * 1. Create visible popup window. - * 2. Maximize it. - */ - trace("calling CreateWindowExA( WS_VISIBLE ) for popup window\n"); - hwnd = CreateWindowExA(0, "TestWindowClass", "Test popup", WS_POPUP | WS_VISIBLE, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok (hwnd != 0, "Failed to create popup window\n"); - ok(!IsZoomed(hwnd), "window should NOT be maximized\n"); - ok_sequence(WmCreatePopupSeq, "CreateWindow(WS_VISIBLE):popup", FALSE); - - trace("calling ShowWindow( SW_SHOWMAXIMIZE ) for visible popup window\n"); - ShowWindow(hwnd, SW_SHOWMAXIMIZED); - ok(IsZoomed(hwnd), "window should be maximized\n"); - ok_sequence(WmShowVisMaxPopupSeq, "ShowWindow(SW_SHOWMAXIMIZED):popup", FALSE); - DestroyWindow(hwnd); - flush_sequence(); -} - -static void test_sys_menu(void) -{ - HWND hwnd; - HMENU hmenu; - UINT state; - - hwnd = CreateWindowExA(0, "TestWindowClass", NULL, WS_OVERLAPPEDWINDOW, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok (hwnd != 0, "Failed to create overlapped window\n"); - - flush_sequence(); - - /* test existing window without CS_NOCLOSE style */ - hmenu = GetSystemMenu(hwnd, FALSE); - ok(hmenu != 0, "GetSystemMenu error %d\n", GetLastError()); - - state = GetMenuState(hmenu, SC_CLOSE, MF_BYCOMMAND); - ok(state != 0xffffffff, "wrong SC_CLOSE state %x\n", state); - ok(!(state & (MF_DISABLED | MF_GRAYED)), "wrong SC_CLOSE state %x\n", state); - - EnableMenuItem(hmenu, SC_CLOSE, MF_BYCOMMAND | MF_GRAYED); - ok_sequence(WmEmptySeq, "WmEnableMenuItem", FALSE); - - state = GetMenuState(hmenu, SC_CLOSE, MF_BYCOMMAND); - ok(state != 0xffffffff, "wrong SC_CLOSE state %x\n", state); - ok((state & (MF_DISABLED | MF_GRAYED)) == MF_GRAYED, "wrong SC_CLOSE state %x\n", state); - - EnableMenuItem(hmenu, SC_CLOSE, 0); - ok_sequence(WmEmptySeq, "WmEnableMenuItem", FALSE); - - state = GetMenuState(hmenu, SC_CLOSE, MF_BYCOMMAND); - ok(state != 0xffffffff, "wrong SC_CLOSE state %x\n", state); - ok(!(state & (MF_DISABLED | MF_GRAYED)), "wrong SC_CLOSE state %x\n", state); - - /* test whether removing WS_SYSMENU destroys a system menu */ - SetWindowLongW(hwnd, GWL_STYLE, WS_POPUP); - SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_FRAMECHANGED); - flush_sequence(); - hmenu = GetSystemMenu(hwnd, FALSE); - ok(hmenu != 0, "GetSystemMenu error %d\n", GetLastError()); - - DestroyWindow(hwnd); - - /* test new window with CS_NOCLOSE style */ - hwnd = CreateWindowExA(0, "NoCloseWindowClass", NULL, WS_OVERLAPPEDWINDOW, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok (hwnd != 0, "Failed to create overlapped window\n"); - - hmenu = GetSystemMenu(hwnd, FALSE); - ok(hmenu != 0, "GetSystemMenu error %d\n", GetLastError()); - - state = GetMenuState(hmenu, SC_CLOSE, MF_BYCOMMAND); - ok(state == 0xffffffff, "wrong SC_CLOSE state %x\n", state); - - DestroyWindow(hwnd); - - /* test new window without WS_SYSMENU style */ - hwnd = CreateWindowExA(0, "NoCloseWindowClass", NULL, WS_OVERLAPPEDWINDOW & ~WS_SYSMENU, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok(hwnd != 0, "Failed to create overlapped window\n"); - - hmenu = GetSystemMenu(hwnd, FALSE); - ok(!hmenu, "GetSystemMenu error %d\n", GetLastError()); - - DestroyWindow(hwnd); -} - -/* For shown WS_OVERLAPPEDWINDOW */ -static const struct message WmSetIcon_1[] = { - { WM_SETICON, sent }, - { 0x00AE, sent|defwinproc|optional }, /* XP */ - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_GETTEXT, sent|defwinproc|optional }, /* XP sends a duplicate */ - { 0 } -}; - -/* For WS_POPUP and hidden WS_OVERLAPPEDWINDOW */ -static const struct message WmSetIcon_2[] = { - { WM_SETICON, sent }, - { 0 } -}; - -/* Sending undocumented 0x3B message with wparam = 0x8000000b */ -static const struct message WmInitEndSession[] = { - { 0x003B, sent }, - { WM_QUERYENDSESSION, sent|defwinproc|wparam|lparam, 0, ENDSESSION_LOGOFF }, - { 0 } -}; - -/* Sending undocumented 0x3B message with wparam = 0x0000000b */ -static const struct message WmInitEndSession_2[] = { - { 0x003B, sent }, - { WM_QUERYENDSESSION, sent|defwinproc|wparam|lparam, 0, 0 }, - { 0 } -}; - -/* Sending undocumented 0x3B message with wparam = 0x80000008 */ -static const struct message WmInitEndSession_3[] = { - { 0x003B, sent }, - { WM_ENDSESSION, sent|defwinproc|wparam|lparam, 0, ENDSESSION_LOGOFF }, - { 0 } -}; - -/* Sending undocumented 0x3B message with wparam = 0x00000008 */ -static const struct message WmInitEndSession_4[] = { - { 0x003B, sent }, - { WM_ENDSESSION, sent|defwinproc|wparam|lparam, 0, 0 }, - { 0 } -}; - -/* Sending undocumented 0x3B message with wparam = 0x80000001 */ -static const struct message WmInitEndSession_5[] = { - { 0x003B, sent }, - { WM_ENDSESSION, sent|defwinproc/*|wparam*/|lparam, 1, ENDSESSION_LOGOFF }, - { 0 } -}; - -static const struct message WmOptionalPaint[] = { - { WM_PAINT, sent|optional }, - { WM_NCPAINT, sent|beginpaint|optional }, - { WM_GETTEXT, sent|beginpaint|defwinproc|optional }, - { WM_ERASEBKGND, sent|beginpaint|optional }, - { 0 } -}; - -static const struct message WmZOrder[] = { - { WM_WINDOWPOSCHANGING, sent|wparam, 0, 0 }, - { WM_GETMINMAXINFO, sent|defwinproc|wparam, 0, 0 }, - { HCBT_ACTIVATE, hook }, - { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam, 3, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOREDRAW|SWP_NOMOVE|SWP_NOSIZE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE, 0 }, - { WM_GETTEXT, sent|optional }, - { WM_NCCALCSIZE, sent|wparam|optional, 1 }, - { WM_ACTIVATEAPP, sent|wparam, 1, 0 }, - { WM_NCACTIVATE, sent|lparam, 1, 0 }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ACTIVATE, sent|wparam|lparam, 1, 0 }, - { HCBT_SETFOCUS, hook }, - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_GETTEXT, sent|optional }, - { WM_NCCALCSIZE, sent|optional }, - { 0 } -}; - -static void test_MsgWaitForMultipleObjects(HWND hwnd) -{ - DWORD ret; - MSG msg; - - ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE); - ok(ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjects returned %x\n", ret); - - PostMessageA(hwnd, WM_USER, 0, 0); - - ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE); - ok(ret == WAIT_OBJECT_0, "MsgWaitForMultipleObjects returned %x\n", ret); - - ok(PeekMessageA( &msg, 0, 0, 0, PM_REMOVE ), "PeekMessage should succeed\n"); - ok(msg.message == WM_USER, "got %04x instead of WM_USER\n", msg.message); - - ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE); - ok(ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjects returned %x\n", ret); - - PostMessageA(hwnd, WM_USER, 0, 0); - - ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE); - ok(ret == WAIT_OBJECT_0, "MsgWaitForMultipleObjects returned %x\n", ret); - - ok(PeekMessageA( &msg, 0, 0, 0, PM_NOREMOVE ), "PeekMessage should succeed\n"); - ok(msg.message == WM_USER, "got %04x instead of WM_USER\n", msg.message); - - /* shows QS_POSTMESSAGE flag is cleared in the PeekMessage call */ - ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE); - ok(ret == WAIT_TIMEOUT, "MsgWaitForMultipleObjects returned %x\n", ret); - - PostMessageA(hwnd, WM_USER, 0, 0); - - /* new incoming message causes it to become signaled again */ - ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE); - ok(ret == WAIT_OBJECT_0, "MsgWaitForMultipleObjects returned %x\n", ret); - - ok(PeekMessageA( &msg, 0, 0, 0, PM_REMOVE ), "PeekMessage should succeed\n"); - ok(msg.message == WM_USER, "got %04x instead of WM_USER\n", msg.message); - ok(PeekMessageA( &msg, 0, 0, 0, PM_REMOVE ), "PeekMessage should succeed\n"); - ok(msg.message == WM_USER, "got %04x instead of WM_USER\n", msg.message); -} - -/* test if we receive the right sequence of messages */ -static void test_messages(void) -{ - HWND hwnd, hparent, hchild; - HWND hchild2, hbutton; - HMENU hmenu; - MSG msg; - LRESULT res; - - flush_sequence(); - - hwnd = CreateWindowExA(0, "TestWindowClass", "Test overlapped", WS_OVERLAPPEDWINDOW, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok (hwnd != 0, "Failed to create overlapped window\n"); - ok_sequence(WmCreateOverlappedSeq, "CreateWindow:overlapped", FALSE); - - /* test ShowWindow(SW_HIDE) on a newly created invisible window */ - ok( ShowWindow(hwnd, SW_HIDE) == FALSE, "ShowWindow: window was visible\n" ); - ok_sequence(WmEmptySeq, "ShowWindow(SW_HIDE):overlapped, invisible", FALSE); - - /* test WM_SETREDRAW on a not visible top level window */ - test_WM_SETREDRAW(hwnd); - - SetWindowPos(hwnd, 0,0,0,0,0, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE); - flush_events(); - ok_sequence(WmSWP_ShowOverlappedSeq, "SetWindowPos:SWP_SHOWWINDOW:overlapped", FALSE); - ok(IsWindowVisible(hwnd), "window should be visible at this point\n"); - - ok(GetActiveWindow() == hwnd, "window should be active\n"); - ok(GetFocus() == hwnd, "window should have input focus\n"); - ShowWindow(hwnd, SW_HIDE); - flush_events(); - ok_sequence(WmHideOverlappedSeq, "ShowWindow(SW_HIDE):overlapped", FALSE); - - ShowWindow(hwnd, SW_SHOW); - flush_events(); - ok_sequence(WmShowOverlappedSeq, "ShowWindow(SW_SHOW):overlapped", TRUE); - - ShowWindow(hwnd, SW_HIDE); - flush_events(); - ok_sequence(WmHideOverlappedSeq, "ShowWindow(SW_HIDE):overlapped", FALSE); - - ShowWindow(hwnd, SW_SHOWMAXIMIZED); - flush_events(); - ok_sequence(WmShowMaxOverlappedSeq, "ShowWindow(SW_SHOWMAXIMIZED):overlapped", TRUE); - flush_sequence(); - - if (GetWindowLongW( hwnd, GWL_STYLE ) & WS_MAXIMIZE) - { - ShowWindow(hwnd, SW_RESTORE); - flush_events(); - ok_sequence(WmShowRestoreMaxOverlappedSeq, "ShowWindow(SW_RESTORE):overlapped", TRUE); - flush_sequence(); - } - - ShowWindow(hwnd, SW_MINIMIZE); - flush_events(); - ok_sequence(WmShowMinOverlappedSeq, "ShowWindow(SW_SHOWMINIMIZED):overlapped", TRUE); - flush_sequence(); - - if (GetWindowLongW( hwnd, GWL_STYLE ) & WS_MINIMIZE) - { - ShowWindow(hwnd, SW_RESTORE); - flush_events(); - ok_sequence(WmShowRestoreMinOverlappedSeq, "ShowWindow(SW_RESTORE):overlapped", TRUE); - flush_sequence(); - } - - ShowWindow(hwnd, SW_SHOW); - flush_events(); - ok_sequence(WmOptionalPaint, "ShowWindow(SW_SHOW):overlapped already visible", FALSE); - - SetWindowPos(hwnd, 0,0,0,0,0, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE); - ok_sequence(WmSWP_HideOverlappedSeq, "SetWindowPos:SWP_HIDEWINDOW:overlapped", FALSE); - ok(!IsWindowVisible(hwnd), "window should not be visible at this point\n"); - ok(GetActiveWindow() == hwnd, "window should still be active\n"); - - /* test WM_SETREDRAW on a visible top level window */ - ShowWindow(hwnd, SW_SHOW); - flush_events(); - test_WM_SETREDRAW(hwnd); - - trace("testing scroll APIs on a visible top level window %p\n", hwnd); - test_scroll_messages(hwnd); - - /* test resizing and moving */ - SetWindowPos( hwnd, 0, 0, 0, 300, 300, SWP_NOMOVE|SWP_NOACTIVATE ); - ok_sequence(WmSWP_ResizeSeq, "SetWindowPos:Resize", FALSE ); - flush_events(); - flush_sequence(); - SetWindowPos( hwnd, 0, 200, 200, 0, 0, SWP_NOSIZE|SWP_NOACTIVATE ); - ok_sequence(WmSWP_MoveSeq, "SetWindowPos:Move", FALSE ); - flush_events(); - flush_sequence(); - SetWindowPos( hwnd, 0, 200, 200, 250, 250, SWP_NOZORDER|SWP_NOACTIVATE ); - ok_sequence(WmSWP_ResizeNoZOrder, "SetWindowPos:WmSWP_ResizeNoZOrder", FALSE ); - flush_events(); - flush_sequence(); - - /* popups don't get WM_GETMINMAXINFO */ - SetWindowLongW( hwnd, GWL_STYLE, WS_VISIBLE|WS_POPUP ); - SetWindowPos( hwnd, 0, 0, 0, 0, 0, SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_FRAMECHANGED); - flush_sequence(); - SetWindowPos( hwnd, 0, 0, 0, 200, 200, SWP_NOMOVE|SWP_NOACTIVATE ); - ok_sequence(WmSWP_ResizePopupSeq, "SetWindowPos:ResizePopup", FALSE ); - - DestroyWindow(hwnd); - ok_sequence(WmDestroyOverlappedSeq, "DestroyWindow:overlapped", FALSE); - - hparent = CreateWindowExA(0, "TestParentClass", "Test parent", WS_OVERLAPPEDWINDOW | WS_VISIBLE, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok (hparent != 0, "Failed to create parent window\n"); - flush_sequence(); - - hchild = CreateWindowExA(0, "TestWindowClass", "Test child", WS_CHILD | WS_MAXIMIZE, - 0, 0, 10, 10, hparent, 0, 0, NULL); - ok (hchild != 0, "Failed to create child window\n"); - ok_sequence(WmCreateMaximizedChildSeq, "CreateWindow:maximized child", FALSE); - DestroyWindow(hchild); - flush_sequence(); - - /* visible child window with a caption */ - hchild = CreateWindowExA(0, "TestWindowClass", "Test child", - WS_CHILD | WS_VISIBLE | WS_CAPTION, - 0, 0, 10, 10, hparent, 0, 0, NULL); - ok (hchild != 0, "Failed to create child window\n"); - ok_sequence(WmCreateVisibleChildSeq, "CreateWindow:visible child", FALSE); - - trace("testing scroll APIs on a visible child window %p\n", hchild); - test_scroll_messages(hchild); - - SetWindowPos(hchild, 0,0,0,0,0, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE); - ok_sequence(WmShowChildSeq_4, "SetWindowPos(SWP_SHOWWINDOW):child with a caption", FALSE); - - DestroyWindow(hchild); - flush_sequence(); - - hchild = CreateWindowExA(0, "TestWindowClass", "Test child", WS_CHILD, - 0, 0, 10, 10, hparent, 0, 0, NULL); - ok (hchild != 0, "Failed to create child window\n"); - ok_sequence(WmCreateChildSeq, "CreateWindow:child", FALSE); - - hchild2 = CreateWindowExA(0, "SimpleWindowClass", "Test child2", WS_CHILD, - 100, 100, 50, 50, hparent, 0, 0, NULL); - ok (hchild2 != 0, "Failed to create child2 window\n"); - flush_sequence(); - - hbutton = CreateWindowExA(0, "TestWindowClass", "Test button", WS_CHILD, - 0, 100, 50, 50, hchild, 0, 0, NULL); - ok (hbutton != 0, "Failed to create button window\n"); - - /* test WM_SETREDRAW on a not visible child window */ - test_WM_SETREDRAW(hchild); - - ShowWindow(hchild, SW_SHOW); - ok_sequence(WmShowChildSeq, "ShowWindow(SW_SHOW):child", FALSE); - - /* check parent messages too */ - log_all_parent_messages++; - ShowWindow(hchild, SW_HIDE); - ok_sequence(WmHideChildSeq2, "ShowWindow(SW_HIDE):child", FALSE); - log_all_parent_messages--; - - ShowWindow(hchild, SW_SHOW); - ok_sequence(WmShowChildSeq, "ShowWindow(SW_SHOW):child", FALSE); - - ShowWindow(hchild, SW_HIDE); - ok_sequence(WmHideChildSeq, "ShowWindow(SW_HIDE):child", FALSE); - - ShowWindow(hchild, SW_SHOW); - ok_sequence(WmShowChildSeq, "ShowWindow(SW_SHOW):child", FALSE); - - /* test WM_SETREDRAW on a visible child window */ - test_WM_SETREDRAW(hchild); - - log_all_parent_messages++; - MoveWindow(hchild, 10, 10, 20, 20, TRUE); - ok_sequence(WmResizingChildWithMoveWindowSeq, "MoveWindow:child", FALSE); - log_all_parent_messages--; - - ShowWindow(hchild, SW_HIDE); - flush_sequence(); - SetWindowPos(hchild, 0,0,0,0,0, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE); - ok_sequence(WmShowChildSeq_2, "SetWindowPos:show_child_2", FALSE); - - ShowWindow(hchild, SW_HIDE); - flush_sequence(); - SetWindowPos(hchild, 0,0,0,0,0, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE); - ok_sequence(WmShowChildSeq_3, "SetWindowPos:show_child_3", FALSE); - - /* DestroyWindow sequence below expects that a child has focus */ - SetFocus(hchild); - flush_sequence(); - - DestroyWindow(hchild); - ok_sequence(WmDestroyChildSeq, "DestroyWindow:child", FALSE); - DestroyWindow(hchild2); - DestroyWindow(hbutton); - - flush_sequence(); - hchild = CreateWindowExA(0, "TestWindowClass", "Test Child Popup", WS_CHILD | WS_POPUP, - 0, 0, 100, 100, hparent, 0, 0, NULL); - ok (hchild != 0, "Failed to create child popup window\n"); - ok_sequence(WmCreateChildPopupSeq, "CreateWindow:child_popup", FALSE); - DestroyWindow(hchild); - - /* test what happens to a window which sets WS_VISIBLE in WM_CREATE */ - flush_sequence(); - hchild = CreateWindowExA(0, "TestPopupClass", "Test Popup", WS_POPUP, - 0, 0, 100, 100, hparent, 0, 0, NULL); - ok (hchild != 0, "Failed to create popup window\n"); - ok_sequence(WmCreateInvisiblePopupSeq, "CreateWindow:invisible_popup", FALSE); - ok(GetWindowLongA(hchild, GWL_STYLE) & WS_VISIBLE, "WS_VISIBLE should be set\n"); - ok(IsWindowVisible(hchild), "IsWindowVisible() should return TRUE\n"); - flush_sequence(); - ShowWindow(hchild, SW_SHOW); - ok_sequence(WmEmptySeq, "ShowWindow:show_visible_popup", FALSE); - flush_sequence(); - SetWindowPos(hchild, 0,0,0,0,0, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER); - ok_sequence(WmShowVisiblePopupSeq_2, "SetWindowPos:show_visible_popup_2", FALSE); - flush_sequence(); - SetWindowPos(hchild, 0,0,0,0,0, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE); - ok_sequence(WmShowVisiblePopupSeq_3, "SetWindowPos:show_visible_popup_3", FALSE); - DestroyWindow(hchild); - - /* this time add WS_VISIBLE for CreateWindowEx, but this fact actually - * changes nothing in message sequences. - */ - flush_sequence(); - hchild = CreateWindowExA(0, "TestPopupClass", "Test Popup", WS_POPUP | WS_VISIBLE, - 0, 0, 100, 100, hparent, 0, 0, NULL); - ok (hchild != 0, "Failed to create popup window\n"); - ok_sequence(WmCreateInvisiblePopupSeq, "CreateWindow:invisible_popup", FALSE); - ok(GetWindowLongA(hchild, GWL_STYLE) & WS_VISIBLE, "WS_VISIBLE should be set\n"); - ok(IsWindowVisible(hchild), "IsWindowVisible() should return TRUE\n"); - flush_sequence(); - ShowWindow(hchild, SW_SHOW); - ok_sequence(WmEmptySeq, "ShowWindow:show_visible_popup", FALSE); - flush_sequence(); - SetWindowPos(hchild, 0,0,0,0,0, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER); - ok_sequence(WmShowVisiblePopupSeq_2, "SetWindowPos:show_visible_popup_2", FALSE); - DestroyWindow(hchild); - - flush_sequence(); - hwnd = CreateWindowExA(WS_EX_DLGMODALFRAME, "TestDialogClass", NULL, WS_VISIBLE|WS_CAPTION|WS_SYSMENU|WS_DLGFRAME, - 0, 0, 100, 100, hparent, 0, 0, NULL); - ok(hwnd != 0, "Failed to create custom dialog window\n"); - ok_sequence(WmCreateCustomDialogSeq, "CreateCustomDialog", TRUE); - - if(0) { - trace("testing scroll APIs on a visible dialog %p\n", hwnd); - test_scroll_messages(hwnd); - } - - flush_sequence(); - - test_def_id = 1; - SendMessage(hwnd, WM_NULL, 0, 0); - - flush_sequence(); - after_end_dialog = 1; - EndDialog( hwnd, 0 ); - ok_sequence(WmEndCustomDialogSeq, "EndCustomDialog", FALSE); - - DestroyWindow(hwnd); - after_end_dialog = 0; - test_def_id = 0; - - hwnd = CreateWindowExA(0, "TestDialogClass", NULL, WS_POPUP, - 0, 0, 100, 100, 0, 0, GetModuleHandleA(0), NULL); - ok(hwnd != 0, "Failed to create custom dialog window\n"); - flush_sequence(); - trace("call ShowWindow(%p, SW_SHOW)\n", hwnd); - ShowWindow(hwnd, SW_SHOW); - ok_sequence(WmShowCustomDialogSeq, "ShowCustomDialog", TRUE); - DestroyWindow(hwnd); - - flush_sequence(); - DialogBoxA( 0, "TEST_DIALOG", hparent, TestModalDlgProcA ); - ok_sequence(WmModalDialogSeq, "ModalDialog", TRUE); - - DestroyWindow(hparent); - flush_sequence(); - - /* Message sequence for SetMenu */ - ok(!DrawMenuBar(hwnd), "DrawMenuBar should return FALSE for a window without a menu\n"); - ok_sequence(WmEmptySeq, "DrawMenuBar for a window without a menu", FALSE); - - hmenu = CreateMenu(); - ok (hmenu != 0, "Failed to create menu\n"); - ok (InsertMenuA(hmenu, -1, MF_BYPOSITION, 0x1000, "foo"), "InsertMenu failed\n"); - hwnd = CreateWindowExA(0, "TestWindowClass", "Test overlapped", WS_OVERLAPPEDWINDOW, - 100, 100, 200, 200, 0, hmenu, 0, NULL); - ok_sequence(WmCreateOverlappedSeq, "CreateWindow:overlapped", FALSE); - ok (SetMenu(hwnd, 0), "SetMenu\n"); - ok_sequence(WmSetMenuNonVisibleSizeChangeSeq, "SetMenu:NonVisibleSizeChange", FALSE); - ok (SetMenu(hwnd, 0), "SetMenu\n"); - ok_sequence(WmSetMenuNonVisibleNoSizeChangeSeq, "SetMenu:NonVisibleNoSizeChange", FALSE); - ShowWindow(hwnd, SW_SHOW); - UpdateWindow( hwnd ); - flush_events(); - flush_sequence(); - ok (SetMenu(hwnd, 0), "SetMenu\n"); - ok_sequence(WmSetMenuVisibleNoSizeChangeSeq, "SetMenu:VisibleNoSizeChange", FALSE); - ok (SetMenu(hwnd, hmenu), "SetMenu\n"); - ok_sequence(WmSetMenuVisibleSizeChangeSeq, "SetMenu:VisibleSizeChange", FALSE); - - UpdateWindow( hwnd ); - flush_events(); - flush_sequence(); - ok(DrawMenuBar(hwnd), "DrawMenuBar\n"); - flush_events(); - ok_sequence(WmDrawMenuBarSeq, "DrawMenuBar", FALSE); - - DestroyWindow(hwnd); - flush_sequence(); - - /* Message sequence for EnableWindow */ - hparent = CreateWindowExA(0, "TestWindowClass", "Test parent", WS_OVERLAPPEDWINDOW | WS_VISIBLE, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok (hparent != 0, "Failed to create parent window\n"); - hchild = CreateWindowExA(0, "TestWindowClass", "Test child", WS_CHILD | WS_VISIBLE, - 0, 0, 10, 10, hparent, 0, 0, NULL); - ok (hchild != 0, "Failed to create child window\n"); - - SetFocus(hchild); - flush_events(); - flush_sequence(); - - EnableWindow(hparent, FALSE); - ok_sequence(WmEnableWindowSeq_1, "EnableWindow(FALSE)", FALSE); - - EnableWindow(hparent, TRUE); - ok_sequence(WmEnableWindowSeq_2, "EnableWindow(TRUE)", FALSE); - - flush_events(); - flush_sequence(); - - test_MsgWaitForMultipleObjects(hparent); - - /* the following test causes an exception in user.exe under win9x */ - if (!PostMessageW( hparent, WM_USER, 0, 0 )) - { - DestroyWindow(hparent); - flush_sequence(); - return; - } - PostMessageW( hparent, WM_USER+1, 0, 0 ); - /* PeekMessage(NULL) fails, but still removes the message */ - SetLastError(0xdeadbeef); - ok( !PeekMessageW( NULL, 0, 0, 0, PM_REMOVE ), "PeekMessage(NULL) should fail\n" ); - ok( GetLastError() == ERROR_NOACCESS || /* Win2k */ - GetLastError() == 0xdeadbeef, /* NT4 */ - "last error is %d\n", GetLastError() ); - ok( PeekMessageW( &msg, 0, 0, 0, PM_REMOVE ), "PeekMessage should succeed\n" ); - ok( msg.message == WM_USER+1, "got %x instead of WM_USER+1\n", msg.message ); - - DestroyWindow(hchild); - DestroyWindow(hparent); - flush_sequence(); - - /* Message sequences for WM_SETICON */ - trace("testing WM_SETICON\n"); - hwnd = CreateWindowExA(0, "TestWindowClass", NULL, WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, 300, 300, 0, - NULL, NULL, 0); - ShowWindow(hwnd, SW_SHOW); - UpdateWindow(hwnd); - flush_events(); - flush_sequence(); - SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon(0, IDI_APPLICATION)); - ok_sequence(WmSetIcon_1, "WM_SETICON for shown window with caption", FALSE); - - ShowWindow(hwnd, SW_HIDE); - flush_events(); - flush_sequence(); - SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon(0, IDI_APPLICATION)); - ok_sequence(WmSetIcon_2, "WM_SETICON for hidden window with caption", FALSE); - DestroyWindow(hwnd); - flush_sequence(); - - hwnd = CreateWindowExA(0, "TestPopupClass", NULL, WS_POPUP, - CW_USEDEFAULT, CW_USEDEFAULT, 300, 300, 0, - NULL, NULL, 0); - ShowWindow(hwnd, SW_SHOW); - UpdateWindow(hwnd); - flush_events(); - flush_sequence(); - SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon(0, IDI_APPLICATION)); - ok_sequence(WmSetIcon_2, "WM_SETICON for shown window without caption", FALSE); - - ShowWindow(hwnd, SW_HIDE); - flush_events(); - flush_sequence(); - SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon(0, IDI_APPLICATION)); - ok_sequence(WmSetIcon_2, "WM_SETICON for hidden window without caption", FALSE); - - flush_sequence(); - res = SendMessage(hwnd, 0x3B, 0x8000000b, 0); - if (!res) - { - todo_wine win_skip( "Message 0x3b not supported\n" ); - goto done; - } - ok_sequence(WmInitEndSession, "Handling of undocumented 0x3B message by DefWindowProc wparam=0x8000000b", TRUE); - ok(res == 1, "SendMessage(hwnd, 0x3B, 0x8000000b, 0) should have returned 1 instead of %ld\n", res); - res = SendMessage(hwnd, 0x3B, 0x0000000b, 0); - ok_sequence(WmInitEndSession_2, "Handling of undocumented 0x3B message by DefWindowProc wparam=0x0000000b", TRUE); - ok(res == 1, "SendMessage(hwnd, 0x3B, 0x0000000b, 0) should have returned 1 instead of %ld\n", res); - res = SendMessage(hwnd, 0x3B, 0x0000000f, 0); - ok_sequence(WmInitEndSession_2, "Handling of undocumented 0x3B message by DefWindowProc wparam=0x0000000f", TRUE); - ok(res == 1, "SendMessage(hwnd, 0x3B, 0x0000000f, 0) should have returned 1 instead of %ld\n", res); - - flush_sequence(); - res = SendMessage(hwnd, 0x3B, 0x80000008, 0); - ok_sequence(WmInitEndSession_3, "Handling of undocumented 0x3B message by DefWindowProc wparam=0x80000008", TRUE); - ok(res == 2, "SendMessage(hwnd, 0x3B, 0x80000008, 0) should have returned 2 instead of %ld\n", res); - res = SendMessage(hwnd, 0x3B, 0x00000008, 0); - ok_sequence(WmInitEndSession_4, "Handling of undocumented 0x3B message by DefWindowProc wparam=0x00000008", TRUE); - ok(res == 2, "SendMessage(hwnd, 0x3B, 0x00000008, 0) should have returned 2 instead of %ld\n", res); - - res = SendMessage(hwnd, 0x3B, 0x80000004, 0); - ok_sequence(WmInitEndSession_3, "Handling of undocumented 0x3B message by DefWindowProc wparam=0x80000004", TRUE); - ok(res == 2, "SendMessage(hwnd, 0x3B, 0x80000004, 0) should have returned 2 instead of %ld\n", res); - - res = SendMessage(hwnd, 0x3B, 0x80000001, 0); - ok_sequence(WmInitEndSession_5, "Handling of undocumented 0x3B message by DefWindowProc wparam=0x80000001", TRUE); - ok(res == 2, "SendMessage(hwnd, 0x3B, 0x80000001, 0) should have returned 2 instead of %ld\n", res); - -done: - DestroyWindow(hwnd); - flush_sequence(); -} - -static void test_setwindowpos(void) -{ - HWND hwnd; - RECT rc; - LRESULT res; - const INT winX = 100; - const INT winY = 100; - const INT sysX = GetSystemMetrics(SM_CXMINTRACK); - - hwnd = CreateWindowExA(0, "TestWindowClass", NULL, 0, - 0, 0, winX, winY, 0, - NULL, NULL, 0); - - GetWindowRect(hwnd, &rc); - expect(sysX, rc.right); - expect(winY, rc.bottom); - - flush_events(); - flush_sequence(); - res = SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, winX, winY, 0); - ok_sequence(WmZOrder, "Z-Order", TRUE); - ok(res == TRUE, "SetWindowPos expected TRUE, got %ld\n", res); - - GetWindowRect(hwnd, &rc); - expect(sysX, rc.right); - expect(winY, rc.bottom); - DestroyWindow(hwnd); -} - -static void invisible_parent_tests(void) -{ - HWND hparent, hchild; - - hparent = CreateWindowExA(0, "TestParentClass", "Test parent", WS_OVERLAPPEDWINDOW, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok (hparent != 0, "Failed to create parent window\n"); - flush_sequence(); - - /* test showing child with hidden parent */ - - hchild = CreateWindowExA(0, "TestWindowClass", "Test child", WS_CHILD, - 0, 0, 10, 10, hparent, 0, 0, NULL); - ok (hchild != 0, "Failed to create child window\n"); - ok_sequence(WmCreateChildSeq, "CreateWindow:child", FALSE); - - ShowWindow( hchild, SW_MINIMIZE ); - ok_sequence(WmShowChildInvisibleParentSeq_1, "ShowWindow(SW_MINIMIZE) child with invisible parent", FALSE); - ok(GetWindowLongA(hchild, GWL_STYLE) & WS_VISIBLE, "WS_VISIBLE should be set\n"); - ok(!IsWindowVisible(hchild), "IsWindowVisible() should return FALSE\n"); - - /* repeat */ - flush_events(); - flush_sequence(); - ShowWindow( hchild, SW_MINIMIZE ); - ok_sequence(WmShowChildInvisibleParentSeq_1r, "ShowWindow(SW_MINIMIZE) child with invisible parent", FALSE); - - DestroyWindow(hchild); - hchild = CreateWindowExA(0, "TestWindowClass", "Test child", WS_CHILD, - 0, 0, 10, 10, hparent, 0, 0, NULL); - flush_sequence(); - - ShowWindow( hchild, SW_MAXIMIZE ); - ok_sequence(WmShowChildInvisibleParentSeq_2, "ShowWindow(SW_MAXIMIZE) child with invisible parent", FALSE); - ok(GetWindowLongA(hchild, GWL_STYLE) & WS_VISIBLE, "WS_VISIBLE should be set\n"); - ok(!IsWindowVisible(hchild), "IsWindowVisible() should return FALSE\n"); - - /* repeat */ - flush_events(); - flush_sequence(); - ShowWindow( hchild, SW_MAXIMIZE ); - ok_sequence(WmShowChildInvisibleParentSeq_2r, "ShowWindow(SW_MAXIMIZE) child with invisible parent", FALSE); - - DestroyWindow(hchild); - hchild = CreateWindowExA(0, "TestWindowClass", "Test child", WS_CHILD, - 0, 0, 10, 10, hparent, 0, 0, NULL); - flush_sequence(); - - ShowWindow( hchild, SW_RESTORE ); - ok_sequence(WmShowChildInvisibleParentSeq_5, "ShowWindow(SW_RESTORE) child with invisible parent", FALSE); - ok(GetWindowLongA(hchild, GWL_STYLE) & WS_VISIBLE, "WS_VISIBLE should be set\n"); - ok(!IsWindowVisible(hchild), "IsWindowVisible() should return FALSE\n"); - - DestroyWindow(hchild); - hchild = CreateWindowExA(0, "TestWindowClass", "Test child", WS_CHILD, - 0, 0, 10, 10, hparent, 0, 0, NULL); - flush_sequence(); - - ShowWindow( hchild, SW_SHOWMINIMIZED ); - ok_sequence(WmShowChildInvisibleParentSeq_3, "ShowWindow(SW_SHOWMINIMIZED) child with invisible parent", FALSE); - ok(GetWindowLongA(hchild, GWL_STYLE) & WS_VISIBLE, "WS_VISIBLE should be set\n"); - ok(!IsWindowVisible(hchild), "IsWindowVisible() should return FALSE\n"); - - /* repeat */ - flush_events(); - flush_sequence(); - ShowWindow( hchild, SW_SHOWMINIMIZED ); - ok_sequence(WmShowChildInvisibleParentSeq_3r, "ShowWindow(SW_SHOWMINIMIZED) child with invisible parent", FALSE); - - DestroyWindow(hchild); - hchild = CreateWindowExA(0, "TestWindowClass", "Test child", WS_CHILD, - 0, 0, 10, 10, hparent, 0, 0, NULL); - flush_sequence(); - - /* same as ShowWindow( hchild, SW_MAXIMIZE ); */ - ShowWindow( hchild, SW_SHOWMAXIMIZED ); - ok_sequence(WmShowChildInvisibleParentSeq_2, "ShowWindow(SW_SHOWMAXIMIZED) child with invisible parent", FALSE); - ok(GetWindowLongA(hchild, GWL_STYLE) & WS_VISIBLE, "WS_VISIBLE should be set\n"); - ok(!IsWindowVisible(hchild), "IsWindowVisible() should return FALSE\n"); - - DestroyWindow(hchild); - hchild = CreateWindowExA(0, "TestWindowClass", "Test child", WS_CHILD, - 0, 0, 10, 10, hparent, 0, 0, NULL); - flush_sequence(); - - ShowWindow( hchild, SW_SHOWMINNOACTIVE ); - ok_sequence(WmShowChildInvisibleParentSeq_4, "ShowWindow(SW_SHOWMINNOACTIVE) child with invisible parent", FALSE); - ok(GetWindowLongA(hchild, GWL_STYLE) & WS_VISIBLE, "WS_VISIBLE should be set\n"); - ok(!IsWindowVisible(hchild), "IsWindowVisible() should return FALSE\n"); - - /* repeat */ - flush_events(); - flush_sequence(); - ShowWindow( hchild, SW_SHOWMINNOACTIVE ); - ok_sequence(WmShowChildInvisibleParentSeq_4r, "ShowWindow(SW_SHOWMINNOACTIVE) child with invisible parent", FALSE); - - DestroyWindow(hchild); - hchild = CreateWindowExA(0, "TestWindowClass", "Test child", WS_CHILD, - 0, 0, 10, 10, hparent, 0, 0, NULL); - flush_sequence(); - - /* FIXME: looks like XP SP2 doesn't know about SW_FORCEMINIMIZE at all */ - ShowWindow( hchild, SW_FORCEMINIMIZE ); - ok_sequence(WmEmptySeq, "ShowWindow(SW_FORCEMINIMIZE) child with invisible parent", TRUE); -todo_wine { - ok(!(GetWindowLongA(hchild, GWL_STYLE) & WS_VISIBLE), "WS_VISIBLE should be not set\n"); -} - ok(!IsWindowVisible(hchild), "IsWindowVisible() should return FALSE\n"); - - DestroyWindow(hchild); - hchild = CreateWindowExA(0, "TestWindowClass", "Test child", WS_CHILD, - 0, 0, 10, 10, hparent, 0, 0, NULL); - flush_sequence(); - - ShowWindow( hchild, SW_SHOWNA ); - ok_sequence(WmShowChildInvisibleParentSeq_5, "ShowWindow(SW_SHOWNA) child with invisible parent", FALSE); - ok(GetWindowLongA(hchild, GWL_STYLE) & WS_VISIBLE, "WS_VISIBLE should be set\n"); - ok(!IsWindowVisible(hchild), "IsWindowVisible() should return FALSE\n"); - - /* repeat */ - flush_events(); - flush_sequence(); - ShowWindow( hchild, SW_SHOWNA ); - ok_sequence(WmShowChildInvisibleParentSeq_5, "ShowWindow(SW_SHOWNA) child with invisible parent", FALSE); - - DestroyWindow(hchild); - hchild = CreateWindowExA(0, "TestWindowClass", "Test child", WS_CHILD, - 0, 0, 10, 10, hparent, 0, 0, NULL); - flush_sequence(); - - ShowWindow( hchild, SW_SHOW ); - ok_sequence(WmShowChildInvisibleParentSeq_5, "ShowWindow(SW_SHOW) child with invisible parent", FALSE); - ok(GetWindowLongA(hchild, GWL_STYLE) & WS_VISIBLE, "WS_VISIBLE should be set\n"); - ok(!IsWindowVisible(hchild), "IsWindowVisible() should return FALSE\n"); - - /* repeat */ - flush_events(); - flush_sequence(); - ShowWindow( hchild, SW_SHOW ); - ok_sequence(WmEmptySeq, "ShowWindow(SW_SHOW) child with invisible parent", FALSE); - - ShowWindow( hchild, SW_HIDE ); - ok_sequence(WmHideChildInvisibleParentSeq, "ShowWindow:hide child with invisible parent", FALSE); - ok(!(GetWindowLongA(hchild, GWL_STYLE) & WS_VISIBLE), "WS_VISIBLE should be not set\n"); - ok(!IsWindowVisible(hchild), "IsWindowVisible() should return FALSE\n"); - - SetWindowPos(hchild, 0,0,0,0,0, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER); - ok_sequence(WmShowChildInvisibleParentSeq_6, "SetWindowPos:show child with invisible parent", FALSE); - ok(GetWindowLongA(hchild, GWL_STYLE) & WS_VISIBLE, "WS_VISIBLE should be set\n"); - ok(!IsWindowVisible(hchild), "IsWindowVisible() should return FALSE\n"); - - SetWindowPos(hchild, 0,0,0,0,0, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER); - ok_sequence(WmHideChildInvisibleParentSeq_2, "SetWindowPos:hide child with invisible parent", FALSE); - ok(!(GetWindowLongA(hchild, GWL_STYLE) & WS_VISIBLE), "WS_VISIBLE should not be set\n"); - ok(!IsWindowVisible(hchild), "IsWindowVisible() should return FALSE\n"); - - SetWindowPos(hchild, 0,0,0,0,0, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER); - flush_sequence(); - DestroyWindow(hchild); - ok_sequence(WmDestroyInvisibleChildSeq, "DestroyInvisibleChildSeq", FALSE); - - DestroyWindow(hparent); - flush_sequence(); -} - -/****************** button message test *************************/ -#define ID_BUTTON 0x000e - -static const struct message WmSetFocusButtonSeq[] = -{ - { HCBT_SETFOCUS, hook }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|wparam, 0 }, - { WM_CTLCOLORBTN, sent|parent }, - { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_BUTTON, BN_SETFOCUS) }, - { WM_APP, sent|wparam|lparam, 0, 0 }, - { 0 } -}; -static const struct message WmKillFocusButtonSeq[] = -{ - { HCBT_SETFOCUS, hook }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_KILLFOCUS, sent|wparam, 0 }, - { WM_CTLCOLORBTN, sent|parent }, - { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_BUTTON, BN_KILLFOCUS) }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 1 }, - { WM_APP, sent|wparam|lparam, 0, 0 }, - { WM_PAINT, sent }, - { WM_CTLCOLORBTN, sent|parent }, - { 0 } -}; -static const struct message WmSetFocusStaticSeq[] = -{ - { HCBT_SETFOCUS, hook }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|wparam, 0 }, - { WM_CTLCOLORSTATIC, sent|parent }, - { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_BUTTON, BN_SETFOCUS) }, - { WM_COMMAND, sent|wparam|parent|optional, MAKEWPARAM(ID_BUTTON, BN_CLICKED) }, /* radio button */ - { WM_APP, sent|wparam|lparam, 0, 0 }, - { 0 } -}; -static const struct message WmKillFocusStaticSeq[] = -{ - { HCBT_SETFOCUS, hook }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_KILLFOCUS, sent|wparam, 0 }, - { WM_CTLCOLORSTATIC, sent|parent }, - { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_BUTTON, BN_KILLFOCUS) }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 1 }, - { WM_APP, sent|wparam|lparam, 0, 0 }, - { WM_PAINT, sent }, - { WM_CTLCOLORSTATIC, sent|parent }, - { 0 } -}; -static const struct message WmSetFocusOwnerdrawSeq[] = -{ - { HCBT_SETFOCUS, hook }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|wparam, 0 }, - { WM_CTLCOLORBTN, sent|parent }, - { WM_DRAWITEM, sent|wparam|lparam|parent, ID_BUTTON, 0x001040e4 }, - { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_BUTTON, BN_SETFOCUS) }, - { WM_APP, sent|wparam|lparam, 0, 0 }, - { 0 } -}; -static const struct message WmKillFocusOwnerdrawSeq[] = -{ - { HCBT_SETFOCUS, hook }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_KILLFOCUS, sent|wparam, 0 }, - { WM_CTLCOLORBTN, sent|parent }, - { WM_DRAWITEM, sent|wparam|lparam|parent, ID_BUTTON, 0x000040e4 }, - { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_BUTTON, BN_KILLFOCUS) }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 1 }, - { WM_APP, sent|wparam|lparam, 0, 0 }, - { WM_PAINT, sent }, - { WM_CTLCOLORBTN, sent|parent }, - { WM_DRAWITEM, sent|wparam|lparam|parent, ID_BUTTON, 0x000010e4 }, - { 0 } -}; -static const struct message WmLButtonDownSeq[] = -{ - { WM_LBUTTONDOWN, sent|wparam|lparam, 0, 0 }, - { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, 0, 0 }, - { HCBT_SETFOCUS, hook }, - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, - { WM_CTLCOLORBTN, sent|defwinproc }, - { BM_SETSTATE, sent|wparam|defwinproc, TRUE }, - { WM_CTLCOLORBTN, sent|defwinproc }, - { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { 0 } -}; -static const struct message WmLButtonUpSeq[] = -{ - { WM_LBUTTONUP, sent|wparam|lparam, 0, 0 }, - { BM_SETSTATE, sent|wparam|defwinproc, FALSE }, - { WM_CTLCOLORBTN, sent|defwinproc }, - { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0 }, - { WM_CAPTURECHANGED, sent|wparam|defwinproc, 0 }, - { 0 } -}; -static const struct message WmSetFontButtonSeq[] = -{ - { WM_SETFONT, sent }, - { WM_PAINT, sent }, - { WM_ERASEBKGND, sent|defwinproc|optional }, - { WM_CTLCOLORBTN, sent|defwinproc }, - { 0 } -}; -static const struct message WmSetStyleButtonSeq[] = -{ - { BM_SETSTYLE, sent }, - { WM_APP, sent|wparam|lparam, 0, 0 }, - { WM_PAINT, sent }, - { WM_NCPAINT, sent|defwinproc|optional }, /* FIXME: Wine sends it */ - { WM_ERASEBKGND, sent|defwinproc|optional }, /* Win9x doesn't send it */ - { WM_CTLCOLORBTN, sent|parent }, - { 0 } -}; -static const struct message WmSetStyleStaticSeq[] = -{ - { BM_SETSTYLE, sent }, - { WM_APP, sent|wparam|lparam, 0, 0 }, - { WM_PAINT, sent }, - { WM_NCPAINT, sent|defwinproc|optional }, /* FIXME: Wine sends it */ - { WM_ERASEBKGND, sent|defwinproc|optional }, /* Win9x doesn't send it */ - { WM_CTLCOLORSTATIC, sent|parent }, - { 0 } -}; -static const struct message WmSetStyleUserSeq[] = -{ - { BM_SETSTYLE, sent }, - { WM_APP, sent|wparam|lparam, 0, 0 }, - { WM_PAINT, sent }, - { WM_NCPAINT, sent|defwinproc|optional }, /* FIXME: Wine sends it */ - { WM_ERASEBKGND, sent|defwinproc|optional }, /* Win9x doesn't send it */ - { WM_CTLCOLORBTN, sent|parent }, - { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_BUTTON, BN_PAINT) }, - { 0 } -}; -static const struct message WmSetStyleOwnerdrawSeq[] = -{ - { BM_SETSTYLE, sent }, - { WM_APP, sent|wparam|lparam, 0, 0 }, - { WM_PAINT, sent }, - { WM_NCPAINT, sent|optional }, /* FIXME: Wine sends it */ - { WM_ERASEBKGND, sent|defwinproc|optional }, /* Win9x doesn't send it */ - { WM_CTLCOLORBTN, sent|parent }, - { WM_CTLCOLORBTN, sent|parent|optional }, /* Win9x doesn't send it */ - { WM_DRAWITEM, sent|wparam|lparam|parent, ID_BUTTON, 0x000010e4 }, - { 0 } -}; -static const struct message WmSetStateButtonSeq[] = -{ - { BM_SETSTATE, sent }, - { WM_CTLCOLORBTN, sent|parent }, - { WM_APP, sent|wparam|lparam, 0, 0 }, - { 0 } -}; -static const struct message WmSetStateStaticSeq[] = -{ - { BM_SETSTATE, sent }, - { WM_CTLCOLORSTATIC, sent|parent }, - { WM_APP, sent|wparam|lparam, 0, 0 }, - { 0 } -}; -static const struct message WmSetStateUserSeq[] = -{ - { BM_SETSTATE, sent }, - { WM_CTLCOLORBTN, sent|parent }, - { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_BUTTON, BN_HILITE) }, - { WM_APP, sent|wparam|lparam, 0, 0 }, - { 0 } -}; -static const struct message WmSetStateOwnerdrawSeq[] = -{ - { BM_SETSTATE, sent }, - { WM_CTLCOLORBTN, sent|parent }, - { WM_DRAWITEM, sent|wparam|lparam|parent, ID_BUTTON, 0x000120e4 }, - { WM_APP, sent|wparam|lparam, 0, 0 }, - { 0 } -}; -static const struct message WmClearStateButtonSeq[] = -{ - { BM_SETSTATE, sent }, - { WM_CTLCOLORBTN, sent|parent }, - { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_BUTTON, BN_UNHILITE) }, - { WM_APP, sent|wparam|lparam, 0, 0 }, - { 0 } -}; -static const struct message WmClearStateOwnerdrawSeq[] = -{ - { BM_SETSTATE, sent }, - { WM_CTLCOLORBTN, sent|parent }, - { WM_DRAWITEM, sent|wparam|lparam|parent, ID_BUTTON, 0x000020e4 }, - { WM_APP, sent|wparam|lparam, 0, 0 }, - { 0 } -}; -static const struct message WmSetCheckIgnoredSeq[] = -{ - { BM_SETCHECK, sent }, - { WM_APP, sent|wparam|lparam, 0, 0 }, - { 0 } -}; -static const struct message WmSetCheckStaticSeq[] = -{ - { BM_SETCHECK, sent }, - { WM_CTLCOLORSTATIC, sent|parent }, - { WM_APP, sent|wparam|lparam, 0, 0 }, - { 0 } -}; - -static WNDPROC old_button_proc; - -static LRESULT CALLBACK button_hook_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - static LONG defwndproc_counter = 0; - LRESULT ret; - struct recvd_message msg; - - if (ignore_message( message )) return 0; - - switch (message) - { - case WM_SYNCPAINT: - break; - case BM_SETSTATE: - if (GetCapture()) - ok(GetCapture() == hwnd, "GetCapture() = %p\n", GetCapture()); - /* fall through */ - default: - msg.hwnd = hwnd; - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - msg.descr = "button"; - add_message(&msg); - } - - defwndproc_counter++; - ret = CallWindowProcA(old_button_proc, hwnd, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static void subclass_button(void) -{ - WNDCLASSA cls; - - if (!GetClassInfoA(0, "button", &cls)) assert(0); - - old_button_proc = cls.lpfnWndProc; - - cls.hInstance = GetModuleHandle(0); - cls.lpfnWndProc = button_hook_proc; - cls.lpszClassName = "my_button_class"; - UnregisterClass(cls.lpszClassName, cls.hInstance); - if (!RegisterClassA(&cls)) assert(0); -} - -static void test_button_messages(void) -{ - static const struct - { - DWORD style; - DWORD dlg_code; - const struct message *setfocus; - const struct message *killfocus; - const struct message *setstyle; - const struct message *setstate; - const struct message *clearstate; - const struct message *setcheck; - } button[] = { - { BS_PUSHBUTTON, DLGC_BUTTON | DLGC_UNDEFPUSHBUTTON, - WmSetFocusButtonSeq, WmKillFocusButtonSeq, WmSetStyleButtonSeq, - WmSetStateButtonSeq, WmSetStateButtonSeq, WmSetCheckIgnoredSeq }, - { BS_DEFPUSHBUTTON, DLGC_BUTTON | DLGC_DEFPUSHBUTTON, - WmSetFocusButtonSeq, WmKillFocusButtonSeq, WmSetStyleButtonSeq, - WmSetStateButtonSeq, WmSetStateButtonSeq, WmSetCheckIgnoredSeq }, - { BS_CHECKBOX, DLGC_BUTTON, - WmSetFocusStaticSeq, WmKillFocusStaticSeq, WmSetStyleStaticSeq, - WmSetStateStaticSeq, WmSetStateStaticSeq, WmSetCheckStaticSeq }, - { BS_AUTOCHECKBOX, DLGC_BUTTON, - WmSetFocusStaticSeq, WmKillFocusStaticSeq, WmSetStyleStaticSeq, - WmSetStateStaticSeq, WmSetStateStaticSeq, WmSetCheckStaticSeq }, - { BS_RADIOBUTTON, DLGC_BUTTON | DLGC_RADIOBUTTON, - WmSetFocusStaticSeq, WmKillFocusStaticSeq, WmSetStyleStaticSeq, - WmSetStateStaticSeq, WmSetStateStaticSeq, WmSetCheckStaticSeq }, - { BS_3STATE, DLGC_BUTTON, - WmSetFocusStaticSeq, WmKillFocusStaticSeq, WmSetStyleStaticSeq, - WmSetStateStaticSeq, WmSetStateStaticSeq, WmSetCheckStaticSeq }, - { BS_AUTO3STATE, DLGC_BUTTON, - WmSetFocusStaticSeq, WmKillFocusStaticSeq, WmSetStyleStaticSeq, - WmSetStateStaticSeq, WmSetStateStaticSeq, WmSetCheckStaticSeq }, - { BS_GROUPBOX, DLGC_STATIC, - WmSetFocusStaticSeq, WmKillFocusStaticSeq, WmSetStyleStaticSeq, - WmSetStateStaticSeq, WmSetStateStaticSeq, WmSetCheckIgnoredSeq }, - { BS_USERBUTTON, DLGC_BUTTON | DLGC_UNDEFPUSHBUTTON, - WmSetFocusButtonSeq, WmKillFocusButtonSeq, WmSetStyleUserSeq, - WmSetStateUserSeq, WmClearStateButtonSeq, WmSetCheckIgnoredSeq }, - { BS_AUTORADIOBUTTON, DLGC_BUTTON | DLGC_RADIOBUTTON, - WmSetFocusStaticSeq, WmKillFocusStaticSeq, WmSetStyleStaticSeq, - WmSetStateStaticSeq, WmSetStateStaticSeq, WmSetCheckStaticSeq }, - { BS_OWNERDRAW, DLGC_BUTTON, - WmSetFocusOwnerdrawSeq, WmKillFocusOwnerdrawSeq, WmSetStyleOwnerdrawSeq, - WmSetStateOwnerdrawSeq, WmClearStateOwnerdrawSeq, WmSetCheckIgnoredSeq }, - }; - unsigned int i; - HWND hwnd, parent; - DWORD dlg_code; - HFONT zfont; - - /* selection with VK_SPACE should capture button window */ - hwnd = CreateWindowExA(0, "button", "test", BS_CHECKBOX | WS_VISIBLE | WS_POPUP, - 0, 0, 50, 14, 0, 0, 0, NULL); - ok(hwnd != 0, "Failed to create button window\n"); - ReleaseCapture(); - SetFocus(hwnd); - SendMessageA(hwnd, WM_KEYDOWN, VK_SPACE, 0); - ok(GetCapture() == hwnd, "Should be captured on VK_SPACE WM_KEYDOWN\n"); - SendMessageA(hwnd, WM_KEYUP, VK_SPACE, 0); - DestroyWindow(hwnd); - - subclass_button(); - - parent = CreateWindowExA(0, "TestParentClass", "Test parent", WS_OVERLAPPEDWINDOW | WS_VISIBLE, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok(parent != 0, "Failed to create parent window\n"); - - for (i = 0; i < sizeof(button)/sizeof(button[0]); i++) - { - MSG msg; - DWORD style, state; - - trace("button style %08x\n", button[i].style); - - hwnd = CreateWindowExA(0, "my_button_class", "test", button[i].style | WS_CHILD | BS_NOTIFY, - 0, 0, 50, 14, parent, (HMENU)ID_BUTTON, 0, NULL); - ok(hwnd != 0, "Failed to create button window\n"); - - style = GetWindowLongA(hwnd, GWL_STYLE); - style &= ~(WS_CHILD | BS_NOTIFY); - /* XP turns a BS_USERBUTTON into BS_PUSHBUTTON */ - if (button[i].style == BS_USERBUTTON) - ok(style == BS_PUSHBUTTON, "expected style BS_PUSHBUTTON got %x\n", style); - else - ok(style == button[i].style, "expected style %x got %x\n", button[i].style, style); - - dlg_code = SendMessageA(hwnd, WM_GETDLGCODE, 0, 0); - ok(dlg_code == button[i].dlg_code, "%u: wrong dlg_code %08x\n", i, dlg_code); - - ShowWindow(hwnd, SW_SHOW); - UpdateWindow(hwnd); - SetFocus(0); - flush_events(); - SetFocus(0); - flush_sequence(); - - log_all_parent_messages++; - - ok(GetFocus() == 0, "expected focus 0, got %p\n", GetFocus()); - SetFocus(hwnd); - SendMessage(hwnd, WM_APP, 0, 0); /* place a separator mark here */ - while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessage(&msg); - ok_sequence(button[i].setfocus, "SetFocus(hwnd) on a button", FALSE); - - SetFocus(0); - SendMessage(hwnd, WM_APP, 0, 0); /* place a separator mark here */ - while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessage(&msg); - ok_sequence(button[i].killfocus, "SetFocus(0) on a button", FALSE); - - ok(GetFocus() == 0, "expected focus 0, got %p\n", GetFocus()); - - SendMessage(hwnd, BM_SETSTYLE, button[i].style | BS_BOTTOM, TRUE); - SendMessage(hwnd, WM_APP, 0, 0); /* place a separator mark here */ - while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessage(&msg); - ok_sequence(button[i].setstyle, "BM_SETSTYLE on a button", FALSE); - - style = GetWindowLongA(hwnd, GWL_STYLE); - style &= ~(WS_VISIBLE | WS_CHILD | BS_NOTIFY); - /* XP doesn't turn a BS_USERBUTTON into BS_PUSHBUTTON here! */ - ok(style == button[i].style, "expected style %04x got %04x\n", button[i].style, style); - - state = SendMessage(hwnd, BM_GETSTATE, 0, 0); - ok(state == 0, "expected state 0, got %04x\n", state); - - flush_sequence(); - - SendMessage(hwnd, BM_SETSTATE, TRUE, 0); - SendMessage(hwnd, WM_APP, 0, 0); /* place a separator mark here */ - while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessage(&msg); - ok_sequence(button[i].setstate, "BM_SETSTATE/TRUE on a button", FALSE); - - state = SendMessage(hwnd, BM_GETSTATE, 0, 0); - ok(state == 0x0004, "expected state 0x0004, got %04x\n", state); - - style = GetWindowLongA(hwnd, GWL_STYLE); - style &= ~(WS_CHILD | BS_NOTIFY | WS_VISIBLE); - ok(style == button[i].style, "expected style %04x got %04x\n", button[i].style, style); - - flush_sequence(); - - SendMessage(hwnd, BM_SETSTATE, FALSE, 0); - SendMessage(hwnd, WM_APP, 0, 0); /* place a separator mark here */ - while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessage(&msg); - ok_sequence(button[i].clearstate, "BM_SETSTATE/FALSE on a button", FALSE); - - state = SendMessage(hwnd, BM_GETSTATE, 0, 0); - ok(state == 0, "expected state 0, got %04x\n", state); - - style = GetWindowLongA(hwnd, GWL_STYLE); - style &= ~(WS_CHILD | BS_NOTIFY | WS_VISIBLE); - ok(style == button[i].style, "expected style %04x got %04x\n", button[i].style, style); - - state = SendMessage(hwnd, BM_GETCHECK, 0, 0); - ok(state == BST_UNCHECKED, "expected BST_UNCHECKED, got %04x\n", state); - - flush_sequence(); - - SendMessage(hwnd, BM_SETCHECK, BST_UNCHECKED, 0); - SendMessage(hwnd, WM_APP, 0, 0); /* place a separator mark here */ - while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessage(&msg); - ok_sequence(WmSetCheckIgnoredSeq, "BM_SETCHECK on a button", FALSE); - - state = SendMessage(hwnd, BM_GETCHECK, 0, 0); - ok(state == BST_UNCHECKED, "expected BST_UNCHECKED, got %04x\n", state); - - style = GetWindowLongA(hwnd, GWL_STYLE); - style &= ~(WS_CHILD | BS_NOTIFY | WS_VISIBLE); - ok(style == button[i].style, "expected style %04x got %04x\n", button[i].style, style); - - flush_sequence(); - - SendMessage(hwnd, BM_SETCHECK, BST_CHECKED, 0); - SendMessage(hwnd, WM_APP, 0, 0); /* place a separator mark here */ - while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessage(&msg); - ok_sequence(button[i].setcheck, "BM_SETCHECK on a button", FALSE); - - state = SendMessage(hwnd, BM_GETCHECK, 0, 0); - if (button[i].style == BS_PUSHBUTTON || - button[i].style == BS_DEFPUSHBUTTON || - button[i].style == BS_GROUPBOX || - button[i].style == BS_USERBUTTON || - button[i].style == BS_OWNERDRAW) - ok(state == BST_UNCHECKED, "expected check 0, got %04x\n", state); - else - ok(state == BST_CHECKED, "expected check 1, got %04x\n", state); - - style = GetWindowLongA(hwnd, GWL_STYLE); - style &= ~(WS_CHILD | BS_NOTIFY | WS_VISIBLE); - if (button[i].style == BS_RADIOBUTTON || - button[i].style == BS_AUTORADIOBUTTON) - ok(style == (button[i].style | WS_TABSTOP), "expected style %04x | WS_TABSTOP got %04x\n", button[i].style, style); - else - ok(style == button[i].style, "expected style %04x got %04x\n", button[i].style, style); - - log_all_parent_messages--; - - DestroyWindow(hwnd); - } - - DestroyWindow(parent); - - hwnd = CreateWindowExA(0, "my_button_class", "test", BS_PUSHBUTTON | WS_POPUP | WS_VISIBLE, - 0, 0, 50, 14, 0, 0, 0, NULL); - ok(hwnd != 0, "Failed to create button window\n"); - - SetForegroundWindow(hwnd); - flush_events(); - - SetActiveWindow(hwnd); - SetFocus(0); - flush_sequence(); - - SendMessageA(hwnd, WM_LBUTTONDOWN, 0, 0); - ok_sequence(WmLButtonDownSeq, "WM_LBUTTONDOWN on a button", FALSE); - - SendMessageA(hwnd, WM_LBUTTONUP, 0, 0); - ok_sequence(WmLButtonUpSeq, "WM_LBUTTONUP on a button", FALSE); - - flush_sequence(); - zfont = GetStockObject(SYSTEM_FONT); - SendMessageA(hwnd, WM_SETFONT, (WPARAM)zfont, TRUE); - UpdateWindow(hwnd); - ok_sequence(WmSetFontButtonSeq, "WM_SETFONT on a button", FALSE); - - DestroyWindow(hwnd); -} - -/****************** static message test *************************/ -static const struct message WmSetFontStaticSeq[] = -{ - { WM_SETFONT, sent }, - { WM_PAINT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|defwinproc|optional }, - { WM_CTLCOLORSTATIC, sent|defwinproc|optional }, - { 0 } -}; - -static WNDPROC old_static_proc; - -static LRESULT CALLBACK static_hook_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - static LONG defwndproc_counter = 0; - LRESULT ret; - struct recvd_message msg; - - if (ignore_message( message )) return 0; - - msg.hwnd = hwnd; - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - msg.descr = "static"; - add_message(&msg); - - defwndproc_counter++; - ret = CallWindowProcA(old_static_proc, hwnd, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static void subclass_static(void) -{ - WNDCLASSA cls; - - if (!GetClassInfoA(0, "static", &cls)) assert(0); - - old_static_proc = cls.lpfnWndProc; - - cls.hInstance = GetModuleHandle(0); - cls.lpfnWndProc = static_hook_proc; - cls.lpszClassName = "my_static_class"; - UnregisterClass(cls.lpszClassName, cls.hInstance); - if (!RegisterClassA(&cls)) assert(0); -} - -static void test_static_messages(void) -{ - /* FIXME: make as comprehensive as the button message test */ - static const struct - { - DWORD style; - DWORD dlg_code; - const struct message *setfont; - } static_ctrl[] = { - { SS_LEFT, DLGC_STATIC, - WmSetFontStaticSeq } - }; - unsigned int i; - HWND hwnd; - DWORD dlg_code; - - subclass_static(); - - for (i = 0; i < sizeof(static_ctrl)/sizeof(static_ctrl[0]); i++) - { - hwnd = CreateWindowExA(0, "my_static_class", "test", static_ctrl[i].style | WS_POPUP, - 0, 0, 50, 14, 0, 0, 0, NULL); - ok(hwnd != 0, "Failed to create static window\n"); - - dlg_code = SendMessageA(hwnd, WM_GETDLGCODE, 0, 0); - ok(dlg_code == static_ctrl[i].dlg_code, "%u: wrong dlg_code %08x\n", i, dlg_code); - - ShowWindow(hwnd, SW_SHOW); - UpdateWindow(hwnd); - SetFocus(0); - flush_sequence(); - - trace("static style %08x\n", static_ctrl[i].style); - SendMessage(hwnd, WM_SETFONT, (WPARAM)GetStockObject(DEFAULT_GUI_FONT), TRUE); - ok_sequence(static_ctrl[i].setfont, "WM_SETFONT on a static", FALSE); - - DestroyWindow(hwnd); - } -} - -/****************** ComboBox message test *************************/ -#define ID_COMBOBOX 0x000f - -static const struct message WmKeyDownComboSeq[] = -{ - { WM_KEYDOWN, sent|wparam|lparam, VK_DOWN, 0 }, - { WM_COMMAND, sent|wparam|defwinproc, MAKEWPARAM(1000, LBN_SELCHANGE) }, - { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_COMBOBOX, CBN_SELENDOK) }, - { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_COMBOBOX, CBN_SELCHANGE) }, - { WM_CTLCOLOREDIT, sent|parent }, - { WM_KEYUP, sent|wparam|lparam, VK_DOWN, 0 }, - { 0 } -}; - -static WNDPROC old_combobox_proc; - -static LRESULT CALLBACK combobox_hook_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - static LONG defwndproc_counter = 0; - LRESULT ret; - struct recvd_message msg; - - /* do not log painting messages */ - if (message != WM_PAINT && - message != WM_NCPAINT && - message != WM_SYNCPAINT && - message != WM_ERASEBKGND && - message != WM_NCHITTEST && - message != WM_GETTEXT && - !ignore_message( message )) - { - msg.hwnd = hwnd; - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - msg.descr = "combo"; - add_message(&msg); - } - - defwndproc_counter++; - ret = CallWindowProcA(old_combobox_proc, hwnd, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static void subclass_combobox(void) -{ - WNDCLASSA cls; - - if (!GetClassInfoA(0, "ComboBox", &cls)) assert(0); - - old_combobox_proc = cls.lpfnWndProc; - - cls.hInstance = GetModuleHandle(0); - cls.lpfnWndProc = combobox_hook_proc; - cls.lpszClassName = "my_combobox_class"; - UnregisterClass(cls.lpszClassName, cls.hInstance); - if (!RegisterClassA(&cls)) assert(0); -} - -static void test_combobox_messages(void) -{ - HWND parent, combo; - LRESULT ret; - - subclass_combobox(); - - parent = CreateWindowExA(0, "TestParentClass", "Test parent", WS_OVERLAPPEDWINDOW | WS_VISIBLE, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok(parent != 0, "Failed to create parent window\n"); - flush_sequence(); - - combo = CreateWindowEx(0, "my_combobox_class", "test", WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS, - 0, 0, 100, 150, parent, (HMENU)ID_COMBOBOX, 0, NULL); - ok(combo != 0, "Failed to create combobox window\n"); - - UpdateWindow(combo); - - ret = SendMessage(combo, WM_GETDLGCODE, 0, 0); - ok(ret == (DLGC_WANTCHARS | DLGC_WANTARROWS), "wrong dlg_code %08lx\n", ret); - - ret = SendMessage(combo, CB_ADDSTRING, 0, (LPARAM)"item 0"); - ok(ret == 0, "expected 0, got %ld\n", ret); - ret = SendMessage(combo, CB_ADDSTRING, 0, (LPARAM)"item 1"); - ok(ret == 1, "expected 1, got %ld\n", ret); - ret = SendMessage(combo, CB_ADDSTRING, 0, (LPARAM)"item 2"); - ok(ret == 2, "expected 2, got %ld\n", ret); - - SendMessage(combo, CB_SETCURSEL, 0, 0); - SetFocus(combo); - flush_sequence(); - - log_all_parent_messages++; - SendMessage(combo, WM_KEYDOWN, VK_DOWN, 0); - SendMessage(combo, WM_KEYUP, VK_DOWN, 0); - log_all_parent_messages--; - ok_sequence(WmKeyDownComboSeq, "WM_KEYDOWN/VK_DOWN on a ComboBox", FALSE); - - DestroyWindow(combo); - DestroyWindow(parent); -} - -/****************** WM_IME_KEYDOWN message test *******************/ - -static const struct message WmImeKeydownMsgSeq_0[] = -{ - { WM_IME_KEYDOWN, wparam, VK_RETURN }, - { WM_CHAR, wparam, 'A' }, - { 0 } -}; - -static const struct message WmImeKeydownMsgSeq_1[] = -{ - { WM_KEYDOWN, optional|wparam, VK_RETURN }, - { WM_CHAR, optional|wparam, VK_RETURN }, - { 0 } -}; - -static LRESULT WINAPI wmime_keydown_procA(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - struct recvd_message msg; - - msg.hwnd = hwnd; - msg.message = message; - msg.flags = wparam|lparam; - msg.wParam = wParam; - msg.lParam = lParam; - msg.descr = "wmime_keydown"; - add_message(&msg); - - return DefWindowProcA(hwnd, message, wParam, lParam); -} - -static void register_wmime_keydown_class(void) -{ - WNDCLASSA cls; - - ZeroMemory(&cls, sizeof(WNDCLASSA)); - cls.lpfnWndProc = wmime_keydown_procA; - cls.hInstance = GetModuleHandleA(0); - cls.lpszClassName = "wmime_keydown_class"; - if (!RegisterClassA(&cls)) assert(0); -} - -static void test_wmime_keydown_message(void) -{ - HWND hwnd; - MSG msg; - - trace("Message sequences by WM_IME_KEYDOWN\n"); - - register_wmime_keydown_class(); - hwnd = CreateWindowExA(0, "wmime_keydown_class", NULL, WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, 300, 300, 0, - NULL, NULL, 0); - flush_events(); - flush_sequence(); - - SendMessage(hwnd, WM_IME_KEYDOWN, VK_RETURN, 0x1c0001); - SendMessage(hwnd, WM_CHAR, 'A', 1); - ok_sequence(WmImeKeydownMsgSeq_0, "WM_IME_KEYDOWN 0", FALSE); - - while ( PeekMessage(&msg, 0, 0, 0, PM_REMOVE) ) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - ok_sequence(WmImeKeydownMsgSeq_1, "WM_IME_KEYDOWN 1", FALSE); - - DestroyWindow(hwnd); -} - -/************* painting message test ********************/ - -void dump_region(HRGN hrgn) -{ - DWORD i, size; - RGNDATA *data = NULL; - RECT *rect; - - if (!hrgn) - { - printf( "null region\n" ); - return; - } - if (!(size = GetRegionData( hrgn, 0, NULL ))) return; - if (!(data = HeapAlloc( GetProcessHeap(), 0, size ))) return; - GetRegionData( hrgn, size, data ); - printf("%d rects:", data->rdh.nCount ); - for (i = 0, rect = (RECT *)data->Buffer; i < data->rdh.nCount; i++, rect++) - printf( " (%d,%d)-(%d,%d)", rect->left, rect->top, rect->right, rect->bottom ); - printf("\n"); - HeapFree( GetProcessHeap(), 0, data ); -} - -static void check_update_rgn( HWND hwnd, HRGN hrgn ) -{ - INT ret; - RECT r1, r2; - HRGN tmp = CreateRectRgn( 0, 0, 0, 0 ); - HRGN update = CreateRectRgn( 0, 0, 0, 0 ); - - ret = GetUpdateRgn( hwnd, update, FALSE ); - ok( ret != ERROR, "GetUpdateRgn failed\n" ); - if (ret == NULLREGION) - { - ok( !hrgn, "Update region shouldn't be empty\n" ); - } - else - { - if (CombineRgn( tmp, hrgn, update, RGN_XOR ) != NULLREGION) - { - ok( 0, "Regions are different\n" ); - if (winetest_debug > 0) - { - printf( "Update region: " ); - dump_region( update ); - printf( "Wanted region: " ); - dump_region( hrgn ); - } - } - } - GetRgnBox( update, &r1 ); - GetUpdateRect( hwnd, &r2, FALSE ); - ok( r1.left == r2.left && r1.top == r2.top && r1.right == r2.right && r1.bottom == r2.bottom, - "Rectangles are different: %d,%d-%d,%d / %d,%d-%d,%d\n", - r1.left, r1.top, r1.right, r1.bottom, r2.left, r2.top, r2.right, r2.bottom ); - - DeleteObject( tmp ); - DeleteObject( update ); -} - -static const struct message WmInvalidateRgn[] = { - { WM_NCPAINT, sent }, - { WM_GETTEXT, sent|defwinproc|optional }, - { 0 } -}; - -static const struct message WmGetUpdateRect[] = { - { WM_NCPAINT, sent }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_PAINT, sent }, - { 0 } -}; - -static const struct message WmInvalidateFull[] = { - { WM_NCPAINT, sent|wparam, 1 }, - { WM_GETTEXT, sent|defwinproc|optional }, - { 0 } -}; - -static const struct message WmInvalidateErase[] = { - { WM_NCPAINT, sent|wparam, 1 }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent }, - { 0 } -}; - -static const struct message WmInvalidatePaint[] = { - { WM_PAINT, sent }, - { WM_NCPAINT, sent|wparam|beginpaint, 1 }, - { WM_GETTEXT, sent|beginpaint|defwinproc|optional }, - { 0 } -}; - -static const struct message WmInvalidateErasePaint[] = { - { WM_PAINT, sent }, - { WM_NCPAINT, sent|wparam|beginpaint, 1 }, - { WM_GETTEXT, sent|beginpaint|defwinproc|optional }, - { WM_ERASEBKGND, sent|beginpaint|optional }, - { 0 } -}; - -static const struct message WmInvalidateErasePaint2[] = { - { WM_PAINT, sent }, - { WM_NCPAINT, sent|beginpaint }, - { WM_GETTEXT, sent|beginpaint|defwinproc|optional }, - { WM_ERASEBKGND, sent|beginpaint|optional }, - { 0 } -}; - -static const struct message WmErase[] = { - { WM_ERASEBKGND, sent }, - { 0 } -}; - -static const struct message WmPaint[] = { - { WM_PAINT, sent }, - { 0 } -}; - -static const struct message WmParentOnlyPaint[] = { - { WM_PAINT, sent|parent }, - { 0 } -}; - -static const struct message WmInvalidateParent[] = { - { WM_NCPAINT, sent|parent }, - { WM_GETTEXT, sent|defwinproc|parent|optional }, - { WM_ERASEBKGND, sent|parent }, - { 0 } -}; - -static const struct message WmInvalidateParentChild[] = { - { WM_NCPAINT, sent|parent }, - { WM_GETTEXT, sent|defwinproc|parent|optional }, - { WM_ERASEBKGND, sent|parent }, - { WM_NCPAINT, sent }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent }, - { 0 } -}; - -static const struct message WmInvalidateParentChild2[] = { - { WM_ERASEBKGND, sent|parent }, - { WM_NCPAINT, sent }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent }, - { 0 } -}; - -static const struct message WmParentPaint[] = { - { WM_PAINT, sent|parent }, - { WM_PAINT, sent }, - { 0 } -}; - -static const struct message WmParentPaintNc[] = { - { WM_PAINT, sent|parent }, - { WM_PAINT, sent }, - { WM_NCPAINT, sent|beginpaint }, - { WM_GETTEXT, sent|beginpaint|defwinproc|optional }, - { WM_ERASEBKGND, sent|beginpaint|optional }, - { 0 } -}; - -static const struct message WmChildPaintNc[] = { - { WM_PAINT, sent }, - { WM_NCPAINT, sent|beginpaint }, - { WM_GETTEXT, sent|beginpaint|defwinproc|optional }, - { WM_ERASEBKGND, sent|beginpaint|optional }, - { 0 } -}; - -static const struct message WmParentErasePaint[] = { - { WM_PAINT, sent|parent }, - { WM_NCPAINT, sent|parent|beginpaint }, - { WM_GETTEXT, sent|parent|beginpaint|defwinproc|optional }, - { WM_ERASEBKGND, sent|parent|beginpaint|optional }, - { WM_PAINT, sent }, - { WM_NCPAINT, sent|beginpaint }, - { WM_GETTEXT, sent|beginpaint|defwinproc|optional }, - { WM_ERASEBKGND, sent|beginpaint|optional }, - { 0 } -}; - -static const struct message WmParentOnlyNcPaint[] = { - { WM_PAINT, sent|parent }, - { WM_NCPAINT, sent|parent|beginpaint }, - { WM_GETTEXT, sent|parent|beginpaint|defwinproc|optional }, - { 0 } -}; - -static const struct message WmSetParentStyle[] = { - { WM_STYLECHANGING, sent|parent }, - { WM_STYLECHANGED, sent|parent }, - { 0 } -}; - -static void test_paint_messages(void) -{ - BOOL ret; - RECT rect; - POINT pt; - MSG msg; - HWND hparent, hchild; - HRGN hrgn = CreateRectRgn( 0, 0, 0, 0 ); - HRGN hrgn2 = CreateRectRgn( 0, 0, 0, 0 ); - HWND hwnd = CreateWindowExA(0, "TestWindowClass", "Test overlapped", WS_OVERLAPPEDWINDOW, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok (hwnd != 0, "Failed to create overlapped window\n"); - - ShowWindow( hwnd, SW_SHOW ); - UpdateWindow( hwnd ); - flush_events(); - flush_sequence(); - - check_update_rgn( hwnd, 0 ); - SetRectRgn( hrgn, 10, 10, 20, 20 ); - ret = RedrawWindow( hwnd, NULL, hrgn, RDW_INVALIDATE ); - ok(ret, "RedrawWindow returned %d instead of TRUE\n", ret); - check_update_rgn( hwnd, hrgn ); - SetRectRgn( hrgn2, 20, 20, 30, 30 ); - ret = RedrawWindow( hwnd, NULL, hrgn2, RDW_INVALIDATE ); - ok(ret, "RedrawWindow returned %d instead of TRUE\n", ret); - CombineRgn( hrgn, hrgn, hrgn2, RGN_OR ); - check_update_rgn( hwnd, hrgn ); - /* validate everything */ - ret = RedrawWindow( hwnd, NULL, NULL, RDW_VALIDATE ); - ok(ret, "RedrawWindow returned %d instead of TRUE\n", ret); - check_update_rgn( hwnd, 0 ); - - /* test empty region */ - SetRectRgn( hrgn, 10, 10, 10, 15 ); - ret = RedrawWindow( hwnd, NULL, hrgn, RDW_INVALIDATE ); - ok(ret, "RedrawWindow returned %d instead of TRUE\n", ret); - check_update_rgn( hwnd, 0 ); - /* test empty rect */ - SetRect( &rect, 10, 10, 10, 15 ); - ret = RedrawWindow( hwnd, &rect, NULL, RDW_INVALIDATE ); - ok(ret, "RedrawWindow returned %d instead of TRUE\n", ret); - check_update_rgn( hwnd, 0 ); - - /* flush pending messages */ - flush_events(); - flush_sequence(); - - GetClientRect( hwnd, &rect ); - SetRectRgn( hrgn, 0, 0, rect.right - rect.left, rect.bottom - rect.top ); - /* MSDN: if hwnd parameter is NULL, InvalidateRect invalidates and redraws - * all windows and sends WM_ERASEBKGND and WM_NCPAINT. - */ - trace("testing InvalidateRect(0, NULL, FALSE)\n"); - SetRectEmpty( &rect ); - ok(InvalidateRect(0, &rect, FALSE), "InvalidateRect(0, &rc, FALSE) should fail\n"); - check_update_rgn( hwnd, hrgn ); - ok_sequence( WmInvalidateErase, "InvalidateErase", FALSE ); - flush_events(); - ok_sequence( WmPaint, "Paint", FALSE ); - RedrawWindow( hwnd, NULL, NULL, RDW_VALIDATE ); - check_update_rgn( hwnd, 0 ); - - /* MSDN: if hwnd parameter is NULL, ValidateRect invalidates and redraws - * all windows and sends WM_ERASEBKGND and WM_NCPAINT. - */ - trace("testing ValidateRect(0, NULL)\n"); - SetRectEmpty( &rect ); - if (ValidateRect(0, &rect)) /* not supported on Win9x */ - { - check_update_rgn( hwnd, hrgn ); - ok_sequence( WmInvalidateErase, "InvalidateErase", FALSE ); - flush_events(); - ok_sequence( WmPaint, "Paint", FALSE ); - RedrawWindow( hwnd, NULL, NULL, RDW_VALIDATE ); - check_update_rgn( hwnd, 0 ); - } - - trace("testing InvalidateRgn(0, NULL, FALSE)\n"); - SetLastError(0xdeadbeef); - ok(!InvalidateRgn(0, NULL, FALSE), "InvalidateRgn(0, NULL, FALSE) should fail\n"); - ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE || GetLastError() == 0xdeadbeef, - "wrong error code %d\n", GetLastError()); - check_update_rgn( hwnd, 0 ); - flush_events(); - ok_sequence( WmEmptySeq, "WmEmptySeq", FALSE ); - - trace("testing ValidateRgn(0, NULL)\n"); - SetLastError(0xdeadbeef); - ok(!ValidateRgn(0, NULL), "ValidateRgn(0, NULL) should fail\n"); - ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE || - broken( GetLastError() == 0xdeadbeef ) /* win9x */, - "wrong error code %d\n", GetLastError()); - check_update_rgn( hwnd, 0 ); - flush_events(); - ok_sequence( WmEmptySeq, "WmEmptySeq", FALSE ); - - trace("testing UpdateWindow(NULL)\n"); - SetLastError(0xdeadbeef); - ok(!UpdateWindow(NULL), "UpdateWindow(NULL) should fail\n"); - ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE || - broken( GetLastError() == 0xdeadbeef ) /* win9x */, - "wrong error code %d\n", GetLastError()); - check_update_rgn( hwnd, 0 ); - flush_events(); - ok_sequence( WmEmptySeq, "WmEmptySeq", FALSE ); - - /* now with frame */ - SetRectRgn( hrgn, -5, -5, 20, 20 ); - - /* flush pending messages */ - flush_events(); - flush_sequence(); - RedrawWindow( hwnd, NULL, hrgn, RDW_INVALIDATE | RDW_FRAME ); - ok_sequence( WmEmptySeq, "EmptySeq", FALSE ); - - SetRectRgn( hrgn, 0, 0, 20, 20 ); /* GetUpdateRgn clips to client area */ - check_update_rgn( hwnd, hrgn ); - - flush_sequence(); - RedrawWindow( hwnd, NULL, hrgn, RDW_INVALIDATE | RDW_FRAME | RDW_ERASENOW ); - ok_sequence( WmInvalidateRgn, "InvalidateRgn", FALSE ); - - flush_sequence(); - RedrawWindow( hwnd, NULL, NULL, RDW_INVALIDATE | RDW_FRAME | RDW_ERASENOW ); - ok_sequence( WmInvalidateFull, "InvalidateFull", FALSE ); - - GetClientRect( hwnd, &rect ); - SetRectRgn( hrgn, rect.left, rect.top, rect.right, rect.bottom ); - check_update_rgn( hwnd, hrgn ); - - flush_sequence(); - RedrawWindow( hwnd, NULL, NULL, RDW_INVALIDATE | RDW_FRAME | RDW_ERASE | RDW_ERASENOW ); - ok_sequence( WmInvalidateErase, "InvalidateErase", FALSE ); - - flush_sequence(); - RedrawWindow( hwnd, NULL, NULL, RDW_INVALIDATE | RDW_FRAME | RDW_ERASENOW | RDW_UPDATENOW ); - ok_sequence( WmInvalidatePaint, "InvalidatePaint", FALSE ); - check_update_rgn( hwnd, 0 ); - - flush_sequence(); - RedrawWindow( hwnd, NULL, NULL, RDW_INVALIDATE | RDW_FRAME | RDW_ERASE | RDW_UPDATENOW ); - ok_sequence( WmInvalidateErasePaint, "InvalidateErasePaint", FALSE ); - check_update_rgn( hwnd, 0 ); - - flush_sequence(); - SetRectRgn( hrgn, 0, 0, 100, 100 ); - RedrawWindow( hwnd, NULL, hrgn, RDW_INVALIDATE ); - SetRectRgn( hrgn, 0, 0, 50, 100 ); - RedrawWindow( hwnd, NULL, hrgn, RDW_VALIDATE ); - SetRectRgn( hrgn, 50, 0, 100, 100 ); - check_update_rgn( hwnd, hrgn ); - RedrawWindow( hwnd, NULL, hrgn, RDW_VALIDATE | RDW_ERASENOW ); - ok_sequence( WmEmptySeq, "EmptySeq", FALSE ); /* must not generate messages, everything is valid */ - check_update_rgn( hwnd, 0 ); - - flush_sequence(); - SetRectRgn( hrgn, 0, 0, 100, 100 ); - RedrawWindow( hwnd, NULL, hrgn, RDW_INVALIDATE | RDW_ERASE ); - SetRectRgn( hrgn, 0, 0, 100, 50 ); - RedrawWindow( hwnd, NULL, hrgn, RDW_VALIDATE | RDW_ERASENOW ); - ok_sequence( WmErase, "Erase", FALSE ); - SetRectRgn( hrgn, 0, 50, 100, 100 ); - check_update_rgn( hwnd, hrgn ); - - flush_sequence(); - SetRectRgn( hrgn, 0, 0, 100, 100 ); - RedrawWindow( hwnd, NULL, hrgn, RDW_INVALIDATE | RDW_ERASE ); - SetRectRgn( hrgn, 0, 0, 50, 50 ); - RedrawWindow( hwnd, NULL, hrgn, RDW_VALIDATE | RDW_NOERASE | RDW_UPDATENOW ); - ok_sequence( WmPaint, "Paint", FALSE ); - - flush_sequence(); - SetRectRgn( hrgn, -4, -4, -2, -2 ); - RedrawWindow( hwnd, NULL, hrgn, RDW_INVALIDATE | RDW_FRAME ); - SetRectRgn( hrgn, -200, -200, -198, -198 ); - RedrawWindow( hwnd, NULL, hrgn, RDW_VALIDATE | RDW_NOFRAME | RDW_ERASENOW ); - ok_sequence( WmEmptySeq, "EmptySeq", FALSE ); - - flush_sequence(); - SetRectRgn( hrgn, -4, -4, -2, -2 ); - RedrawWindow( hwnd, NULL, hrgn, RDW_INVALIDATE | RDW_FRAME ); - SetRectRgn( hrgn, -4, -4, -3, -3 ); - RedrawWindow( hwnd, NULL, hrgn, RDW_VALIDATE | RDW_NOFRAME ); - SetRectRgn( hrgn, 0, 0, 1, 1 ); - RedrawWindow( hwnd, NULL, hrgn, RDW_INVALIDATE | RDW_UPDATENOW ); - ok_sequence( WmPaint, "Paint", FALSE ); - - flush_sequence(); - SetRectRgn( hrgn, -4, -4, -1, -1 ); - RedrawWindow( hwnd, NULL, hrgn, RDW_INVALIDATE | RDW_FRAME ); - RedrawWindow( hwnd, NULL, 0, RDW_ERASENOW ); - /* make sure no WM_PAINT was generated */ - flush_events(); - ok_sequence( WmInvalidateRgn, "InvalidateRgn", FALSE ); - - flush_sequence(); - SetRectRgn( hrgn, -4, -4, -1, -1 ); - RedrawWindow( hwnd, NULL, hrgn, RDW_INVALIDATE | RDW_FRAME ); - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) - { - if (msg.hwnd == hwnd && msg.message == WM_PAINT) - { - /* GetUpdateRgn must return empty region since only nonclient area is invalidated */ - INT ret = GetUpdateRgn( hwnd, hrgn, FALSE ); - ok( ret == NULLREGION, "Invalid GetUpdateRgn result %d\n", ret ); - ret = GetUpdateRect( hwnd, &rect, FALSE ); - ok( ret, "Invalid GetUpdateRect result %d\n", ret ); - /* this will send WM_NCPAINT and validate the non client area */ - ret = GetUpdateRect( hwnd, &rect, TRUE ); - ok( !ret, "Invalid GetUpdateRect result %d\n", ret ); - } - DispatchMessage( &msg ); - } - ok_sequence( WmGetUpdateRect, "GetUpdateRect", FALSE ); - - DestroyWindow( hwnd ); - - /* now test with a child window */ - - hparent = CreateWindowExA(0, "TestParentClass", "Test parent", WS_OVERLAPPEDWINDOW, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok (hparent != 0, "Failed to create parent window\n"); - - hchild = CreateWindowExA(0, "TestWindowClass", "Test child", WS_CHILD | WS_VISIBLE | WS_BORDER, - 10, 10, 100, 100, hparent, 0, 0, NULL); - ok (hchild != 0, "Failed to create child window\n"); - - ShowWindow( hparent, SW_SHOW ); - UpdateWindow( hparent ); - UpdateWindow( hchild ); - flush_events(); - flush_sequence(); - log_all_parent_messages++; - - SetRect( &rect, 0, 0, 50, 50 ); - RedrawWindow( hparent, &rect, 0, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME ); - RedrawWindow( hparent, NULL, 0, RDW_ERASENOW | RDW_ALLCHILDREN ); - ok_sequence( WmInvalidateParentChild, "InvalidateParentChild", FALSE ); - - RedrawWindow( hparent, &rect, 0, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME ); - pt.x = pt.y = 0; - MapWindowPoints( hchild, hparent, &pt, 1 ); - SetRectRgn( hrgn, 0, 0, 50 - pt.x, 50 - pt.y ); - check_update_rgn( hchild, hrgn ); - SetRectRgn( hrgn, 0, 0, 50, 50 ); - check_update_rgn( hparent, hrgn ); - RedrawWindow( hparent, NULL, 0, RDW_ERASENOW ); - ok_sequence( WmInvalidateParent, "InvalidateParent", FALSE ); - RedrawWindow( hchild, NULL, 0, RDW_ERASENOW ); - ok_sequence( WmEmptySeq, "EraseNow child", FALSE ); - - flush_events(); - ok_sequence( WmParentPaintNc, "WmParentPaintNc", FALSE ); - - RedrawWindow( hparent, &rect, 0, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME | RDW_ALLCHILDREN ); - RedrawWindow( hparent, NULL, 0, RDW_ERASENOW ); - ok_sequence( WmInvalidateParent, "InvalidateParent2", FALSE ); - RedrawWindow( hchild, NULL, 0, RDW_ERASENOW ); - ok_sequence( WmEmptySeq, "EraseNow child", FALSE ); - - RedrawWindow( hparent, &rect, 0, RDW_INVALIDATE | RDW_ERASE ); - RedrawWindow( hparent, NULL, 0, RDW_ERASENOW | RDW_ALLCHILDREN ); - ok_sequence( WmInvalidateParentChild2, "InvalidateParentChild2", FALSE ); - - SetWindowLong( hparent, GWL_STYLE, GetWindowLong(hparent,GWL_STYLE) | WS_CLIPCHILDREN ); - flush_sequence(); - RedrawWindow( hparent, &rect, 0, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME | RDW_ALLCHILDREN ); - RedrawWindow( hparent, NULL, 0, RDW_ERASENOW ); - ok_sequence( WmInvalidateParentChild, "InvalidateParentChild3", FALSE ); - - /* flush all paint messages */ - flush_events(); - flush_sequence(); - - /* RDW_UPDATENOW on child with WS_CLIPCHILDREN doesn't change corresponding parent area */ - RedrawWindow( hparent, &rect, 0, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME | RDW_ALLCHILDREN ); - SetRectRgn( hrgn, 0, 0, 50, 50 ); - check_update_rgn( hparent, hrgn ); - RedrawWindow( hchild, NULL, 0, RDW_UPDATENOW ); - ok_sequence( WmInvalidateErasePaint2, "WmInvalidateErasePaint2", FALSE ); - SetRectRgn( hrgn, 0, 0, 50, 50 ); - check_update_rgn( hparent, hrgn ); - - /* flush all paint messages */ - flush_events(); - SetWindowLong( hparent, GWL_STYLE, GetWindowLong(hparent,GWL_STYLE) & ~WS_CLIPCHILDREN ); - flush_sequence(); - - /* RDW_UPDATENOW on child without WS_CLIPCHILDREN will validate corresponding parent area */ - RedrawWindow( hparent, &rect, 0, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME ); - SetRectRgn( hrgn, 0, 0, 50, 50 ); - check_update_rgn( hparent, hrgn ); - RedrawWindow( hchild, NULL, 0, RDW_UPDATENOW ); - ok_sequence( WmInvalidateErasePaint2, "WmInvalidateErasePaint2", FALSE ); - SetRectRgn( hrgn2, 10, 10, 50, 50 ); - CombineRgn( hrgn, hrgn, hrgn2, RGN_DIFF ); - check_update_rgn( hparent, hrgn ); - /* flush all paint messages */ - flush_events(); - flush_sequence(); - - /* same as above but parent gets completely validated */ - SetRect( &rect, 20, 20, 30, 30 ); - RedrawWindow( hparent, &rect, 0, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME ); - SetRectRgn( hrgn, 20, 20, 30, 30 ); - check_update_rgn( hparent, hrgn ); - RedrawWindow( hchild, NULL, 0, RDW_UPDATENOW ); - ok_sequence( WmInvalidateErasePaint2, "WmInvalidateErasePaint2", FALSE ); - check_update_rgn( hparent, 0 ); /* no update region */ - flush_events(); - ok_sequence( WmEmptySeq, "WmEmpty", FALSE ); /* and no paint messages */ - - /* make sure RDW_VALIDATE on child doesn't have the same effect */ - flush_sequence(); - RedrawWindow( hparent, &rect, 0, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME ); - SetRectRgn( hrgn, 20, 20, 30, 30 ); - check_update_rgn( hparent, hrgn ); - RedrawWindow( hchild, NULL, 0, RDW_VALIDATE | RDW_NOERASE ); - SetRectRgn( hrgn, 20, 20, 30, 30 ); - check_update_rgn( hparent, hrgn ); - - /* same as above but normal WM_PAINT doesn't validate parent */ - flush_sequence(); - SetRect( &rect, 20, 20, 30, 30 ); - RedrawWindow( hparent, &rect, 0, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME ); - SetRectRgn( hrgn, 20, 20, 30, 30 ); - check_update_rgn( hparent, hrgn ); - /* no WM_PAINT in child while parent still pending */ - while (PeekMessage( &msg, hchild, 0, 0, PM_REMOVE )) DispatchMessage( &msg ); - ok_sequence( WmEmptySeq, "No WM_PAINT", FALSE ); - while (PeekMessage( &msg, hparent, 0, 0, PM_REMOVE )) DispatchMessage( &msg ); - ok_sequence( WmParentErasePaint, "WmParentErasePaint", FALSE ); - - flush_sequence(); - RedrawWindow( hparent, &rect, 0, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME ); - /* no WM_PAINT in child while parent still pending */ - while (PeekMessage( &msg, hchild, 0, 0, PM_REMOVE )) DispatchMessage( &msg ); - ok_sequence( WmEmptySeq, "No WM_PAINT", FALSE ); - RedrawWindow( hparent, &rect, 0, RDW_VALIDATE | RDW_NOERASE | RDW_NOCHILDREN ); - /* now that parent is valid child should get WM_PAINT */ - while (PeekMessage( &msg, hchild, 0, 0, PM_REMOVE )) DispatchMessage( &msg ); - ok_sequence( WmInvalidateErasePaint2, "WmInvalidateErasePaint2", FALSE ); - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg ); - ok_sequence( WmEmptySeq, "No other message", FALSE ); - - /* same thing with WS_CLIPCHILDREN in parent */ - flush_sequence(); - SetWindowLong( hparent, GWL_STYLE, GetWindowLong(hparent,GWL_STYLE) | WS_CLIPCHILDREN ); - ok_sequence( WmSetParentStyle, "WmSetParentStyle", FALSE ); - /* changing style invalidates non client area, but we need to invalidate something else to see it */ - RedrawWindow( hparent, &rect, 0, RDW_UPDATENOW ); - ok_sequence( WmEmptySeq, "No message", FALSE ); - RedrawWindow( hparent, &rect, 0, RDW_INVALIDATE | RDW_UPDATENOW ); - ok_sequence( WmParentOnlyNcPaint, "WmParentOnlyNcPaint", FALSE ); - - flush_sequence(); - RedrawWindow( hparent, &rect, 0, RDW_INVALIDATE | RDW_ERASE | RDW_ALLCHILDREN ); - SetRectRgn( hrgn, 20, 20, 30, 30 ); - check_update_rgn( hparent, hrgn ); - /* no WM_PAINT in child while parent still pending */ - while (PeekMessage( &msg, hchild, 0, 0, PM_REMOVE )) DispatchMessage( &msg ); - ok_sequence( WmEmptySeq, "No WM_PAINT", FALSE ); - /* WM_PAINT in parent first */ - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg ); - ok_sequence( WmParentPaintNc, "WmParentPaintNc2", FALSE ); - - /* no RDW_ERASE in parent still causes RDW_ERASE and RDW_FRAME in child */ - flush_sequence(); - SetRect( &rect, 0, 0, 30, 30 ); - RedrawWindow( hparent, &rect, 0, RDW_INVALIDATE | RDW_ALLCHILDREN ); - SetRectRgn( hrgn, 0, 0, 30, 30 ); - check_update_rgn( hparent, hrgn ); - flush_events(); - ok_sequence( WmParentPaintNc, "WmParentPaintNc3", FALSE ); - - /* validate doesn't cause RDW_NOERASE or RDW_NOFRAME in child */ - flush_sequence(); - SetRect( &rect, -10, 0, 30, 30 ); - RedrawWindow( hchild, &rect, 0, RDW_INVALIDATE | RDW_FRAME | RDW_ERASE ); - SetRect( &rect, 0, 0, 20, 20 ); - RedrawWindow( hparent, &rect, 0, RDW_VALIDATE | RDW_ALLCHILDREN ); - RedrawWindow( hparent, NULL, 0, RDW_UPDATENOW ); - ok_sequence( WmChildPaintNc, "WmChildPaintNc", FALSE ); - - /* validate doesn't cause RDW_NOERASE or RDW_NOFRAME in child */ - flush_sequence(); - SetRect( &rect, -10, 0, 30, 30 ); - RedrawWindow( hchild, &rect, 0, RDW_INVALIDATE | RDW_FRAME | RDW_ERASE ); - SetRect( &rect, 0, 0, 100, 100 ); - RedrawWindow( hparent, &rect, 0, RDW_VALIDATE | RDW_ALLCHILDREN ); - RedrawWindow( hparent, NULL, 0, RDW_UPDATENOW ); - ok_sequence( WmEmptySeq, "WmChildPaintNc2", FALSE ); - RedrawWindow( hparent, NULL, 0, RDW_ERASENOW ); - ok_sequence( WmEmptySeq, "WmChildPaintNc3", FALSE ); - - /* test RDW_INTERNALPAINT behavior */ - - flush_sequence(); - RedrawWindow( hparent, NULL, 0, RDW_INTERNALPAINT | RDW_NOCHILDREN ); - flush_events(); - ok_sequence( WmParentOnlyPaint, "WmParentOnlyPaint", FALSE ); - - RedrawWindow( hparent, NULL, 0, RDW_INTERNALPAINT | RDW_ALLCHILDREN ); - flush_events(); - ok_sequence( WmParentPaint, "WmParentPaint", FALSE ); - - RedrawWindow( hparent, NULL, 0, RDW_INTERNALPAINT ); - flush_events(); - ok_sequence( WmParentOnlyPaint, "WmParentOnlyPaint", FALSE ); - - assert( GetWindowLong(hparent, GWL_STYLE) & WS_CLIPCHILDREN ); - UpdateWindow( hparent ); - flush_events(); - flush_sequence(); - trace("testing SWP_FRAMECHANGED on parent with WS_CLIPCHILDREN\n"); - RedrawWindow( hchild, NULL, 0, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME ); - SetWindowPos( hparent, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | - SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED ); - flush_events(); - ok_sequence(WmSWP_FrameChanged_clip, "SetWindowPos:FrameChanged_clip", FALSE ); - - UpdateWindow( hparent ); - flush_events(); - flush_sequence(); - trace("testing SWP_FRAMECHANGED|SWP_DEFERERASE on parent with WS_CLIPCHILDREN\n"); - RedrawWindow( hchild, NULL, 0, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME ); - SetWindowPos( hparent, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_DEFERERASE | - SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED ); - flush_events(); - ok_sequence(WmSWP_FrameChangedDeferErase, "SetWindowPos:FrameChangedDeferErase", FALSE ); - - SetWindowLong( hparent, GWL_STYLE, GetWindowLong(hparent,GWL_STYLE) & ~WS_CLIPCHILDREN ); - ok_sequence( WmSetParentStyle, "WmSetParentStyle", FALSE ); - RedrawWindow( hparent, NULL, 0, RDW_INTERNALPAINT ); - flush_events(); - ok_sequence( WmParentPaint, "WmParentPaint", FALSE ); - - assert( !(GetWindowLong(hparent, GWL_STYLE) & WS_CLIPCHILDREN) ); - UpdateWindow( hparent ); - flush_events(); - flush_sequence(); - trace("testing SWP_FRAMECHANGED on parent without WS_CLIPCHILDREN\n"); - RedrawWindow( hchild, NULL, 0, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME ); - SetWindowPos( hparent, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | - SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED ); - flush_events(); - ok_sequence(WmSWP_FrameChanged_noclip, "SetWindowPos:FrameChanged_noclip", FALSE ); - - UpdateWindow( hparent ); - flush_events(); - flush_sequence(); - trace("testing SWP_FRAMECHANGED|SWP_DEFERERASE on parent without WS_CLIPCHILDREN\n"); - RedrawWindow( hchild, NULL, 0, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME ); - SetWindowPos( hparent, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_DEFERERASE | - SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED ); - flush_events(); - ok_sequence(WmSWP_FrameChangedDeferErase, "SetWindowPos:FrameChangedDeferErase", FALSE ); - - ok(GetWindowLong( hparent, GWL_STYLE ) & WS_VISIBLE, "parent should be visible\n"); - ok(GetWindowLong( hchild, GWL_STYLE ) & WS_VISIBLE, "child should be visible\n"); - - UpdateWindow( hparent ); - flush_events(); - flush_sequence(); - trace("testing SetWindowPos(-10000, -10000) on child\n"); - SetWindowPos( hchild, 0, -10000, -10000, 0, 0, SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER ); - check_update_rgn( hchild, 0 ); - flush_events(); - -#if 0 /* this one doesn't pass under Wine yet */ - UpdateWindow( hparent ); - flush_events(); - flush_sequence(); - trace("testing ShowWindow(SW_MINIMIZE) on child\n"); - ShowWindow( hchild, SW_MINIMIZE ); - check_update_rgn( hchild, 0 ); - flush_events(); -#endif - - UpdateWindow( hparent ); - flush_events(); - flush_sequence(); - trace("testing SetWindowPos(-10000, -10000) on parent\n"); - SetWindowPos( hparent, 0, -10000, -10000, 0, 0, SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER ); - check_update_rgn( hparent, 0 ); - flush_events(); - - log_all_parent_messages--; - DestroyWindow( hparent ); - ok(!IsWindow(hchild), "child must be destroyed with its parent\n"); - - /* tests for moving windows off-screen (needs simple WS_POPUP windows) */ - - hparent = CreateWindowExA(0, "TestParentClass", "Test parent", WS_POPUP | WS_VISIBLE, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok (hparent != 0, "Failed to create parent window\n"); - - hchild = CreateWindowExA(0, "TestWindowClass", "Test child", WS_CHILD | WS_VISIBLE, - 10, 10, 100, 100, hparent, 0, 0, NULL); - ok (hchild != 0, "Failed to create child window\n"); - - ShowWindow( hparent, SW_SHOW ); - UpdateWindow( hparent ); - UpdateWindow( hchild ); - flush_events(); - flush_sequence(); - - /* moving child outside of parent boundaries changes update region */ - SetRect( &rect, 0, 0, 40, 40 ); - RedrawWindow( hchild, &rect, 0, RDW_INVALIDATE | RDW_ERASE ); - SetRectRgn( hrgn, 0, 0, 40, 40 ); - check_update_rgn( hchild, hrgn ); - MoveWindow( hchild, -10, 10, 100, 100, FALSE ); - SetRectRgn( hrgn, 10, 0, 40, 40 ); - check_update_rgn( hchild, hrgn ); - MoveWindow( hchild, -10, -10, 100, 100, FALSE ); - SetRectRgn( hrgn, 10, 10, 40, 40 ); - check_update_rgn( hchild, hrgn ); - - /* moving parent off-screen does too */ - SetRect( &rect, 0, 0, 100, 100 ); - RedrawWindow( hparent, &rect, 0, RDW_INVALIDATE | RDW_ERASE | RDW_NOCHILDREN ); - SetRectRgn( hrgn, 0, 0, 100, 100 ); - check_update_rgn( hparent, hrgn ); - SetRectRgn( hrgn, 10, 10, 40, 40 ); - check_update_rgn( hchild, hrgn ); - MoveWindow( hparent, -20, -20, 200, 200, FALSE ); - SetRectRgn( hrgn, 20, 20, 100, 100 ); - check_update_rgn( hparent, hrgn ); - SetRectRgn( hrgn, 30, 30, 40, 40 ); - check_update_rgn( hchild, hrgn ); - - /* invalidated region is cropped by the parent rects */ - SetRect( &rect, 0, 0, 50, 50 ); - RedrawWindow( hchild, &rect, 0, RDW_INVALIDATE | RDW_ERASE ); - SetRectRgn( hrgn, 30, 30, 50, 50 ); - check_update_rgn( hchild, hrgn ); - - DestroyWindow( hparent ); - ok(!IsWindow(hchild), "child must be destroyed with its parent\n"); - flush_sequence(); - - DeleteObject( hrgn ); - DeleteObject( hrgn2 ); -} - -struct wnd_event -{ - HWND hwnd; - HANDLE grand_child; - HANDLE start_event; - HANDLE stop_event; -}; - -static DWORD WINAPI thread_proc(void *param) -{ - MSG msg; - struct wnd_event *wnd_event = param; - - wnd_event->hwnd = CreateWindowExA(0, "TestWindowClass", "window caption text", WS_OVERLAPPEDWINDOW, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok(wnd_event->hwnd != 0, "Failed to create overlapped window\n"); - - SetEvent(wnd_event->start_event); - - while (GetMessage(&msg, 0, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - ok(IsWindow(wnd_event->hwnd), "window should still exist\n"); - - return 0; -} - -static DWORD CALLBACK create_grand_child_thread( void *param ) -{ - struct wnd_event *wnd_event = param; - HWND hchild; - MSG msg; - - hchild = CreateWindowExA(0, "TestWindowClass", "Test child", - WS_CHILD | WS_VISIBLE, 0, 0, 10, 10, wnd_event->hwnd, 0, 0, NULL); - ok (hchild != 0, "Failed to create child window\n"); - flush_events(); - flush_sequence(); - SetEvent( wnd_event->start_event ); - - for (;;) - { - MsgWaitForMultipleObjects(0, NULL, FALSE, 1000, QS_ALLINPUT); - if (!IsWindow( hchild )) break; /* will be destroyed when parent thread exits */ - while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessage(&msg); - } - return 0; -} - -static DWORD CALLBACK create_child_thread( void *param ) -{ - struct wnd_event *wnd_event = param; - struct wnd_event child_event; - DWORD ret, tid; - MSG msg; - - child_event.hwnd = CreateWindowExA(0, "TestWindowClass", "Test child", - WS_CHILD | WS_VISIBLE, 0, 0, 10, 10, wnd_event->hwnd, 0, 0, NULL); - ok (child_event.hwnd != 0, "Failed to create child window\n"); - SetFocus( child_event.hwnd ); - flush_events(); - flush_sequence(); - child_event.start_event = wnd_event->start_event; - wnd_event->grand_child = CreateThread(NULL, 0, create_grand_child_thread, &child_event, 0, &tid); - for (;;) - { - DWORD ret = MsgWaitForMultipleObjects(1, &child_event.start_event, FALSE, 1000, QS_SENDMESSAGE); - if (ret != 1) break; - while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessage(&msg); - } - ret = WaitForSingleObject( wnd_event->stop_event, 5000 ); - ok( !ret, "WaitForSingleObject failed %x\n", ret ); - return 0; -} - -static void test_interthread_messages(void) -{ - HANDLE hThread; - DWORD tid; - WNDPROC proc; - MSG msg; - char buf[256]; - int len, expected_len; - struct wnd_event wnd_event; - BOOL ret; - - wnd_event.start_event = CreateEventW(NULL, 0, 0, NULL); - if (!wnd_event.start_event) - { - win_skip("skipping interthread message test under win9x\n"); - return; - } - - hThread = CreateThread(NULL, 0, thread_proc, &wnd_event, 0, &tid); - ok(hThread != NULL, "CreateThread failed, error %d\n", GetLastError()); - - ok(WaitForSingleObject(wnd_event.start_event, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n"); - - CloseHandle(wnd_event.start_event); - - SetLastError(0xdeadbeef); - ok(!DestroyWindow(wnd_event.hwnd), "DestroyWindow succeeded\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED || GetLastError() == 0xdeadbeef, - "wrong error code %d\n", GetLastError()); - - proc = (WNDPROC)GetWindowLongPtrA(wnd_event.hwnd, GWLP_WNDPROC); - ok(proc != NULL, "GetWindowLongPtrA(GWLP_WNDPROC) error %d\n", GetLastError()); - - expected_len = lstrlenA("window caption text"); - memset(buf, 0, sizeof(buf)); - SetLastError(0xdeadbeef); - len = CallWindowProcA(proc, wnd_event.hwnd, WM_GETTEXT, sizeof(buf), (LPARAM)buf); - ok(len == expected_len, "CallWindowProcA(WM_GETTEXT) error %d, len %d, expected len %d\n", GetLastError(), len, expected_len); - ok(!lstrcmpA(buf, "window caption text"), "window text mismatch\n"); - - msg.hwnd = wnd_event.hwnd; - msg.message = WM_GETTEXT; - msg.wParam = sizeof(buf); - msg.lParam = (LPARAM)buf; - memset(buf, 0, sizeof(buf)); - SetLastError(0xdeadbeef); - len = DispatchMessageA(&msg); - ok((!len && GetLastError() == ERROR_MESSAGE_SYNC_ONLY) || broken(len), /* nt4 */ - "DispatchMessageA(WM_GETTEXT) succeeded on another thread window: ret %d, error %d\n", len, GetLastError()); - - /* the following test causes an exception in user.exe under win9x */ - msg.hwnd = wnd_event.hwnd; - msg.message = WM_TIMER; - msg.wParam = 0; - msg.lParam = GetWindowLongPtrA(wnd_event.hwnd, GWLP_WNDPROC); - SetLastError(0xdeadbeef); - len = DispatchMessageA(&msg); - ok(!len && GetLastError() == 0xdeadbeef, - "DispatchMessageA(WM_TIMER) failed on another thread window: ret %d, error %d\n", len, GetLastError()); - - ret = PostMessageA(wnd_event.hwnd, WM_QUIT, 0, 0); - ok( ret, "PostMessageA(WM_QUIT) error %d\n", GetLastError()); - - ok(WaitForSingleObject(hThread, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n"); - CloseHandle(hThread); - - ok(!IsWindow(wnd_event.hwnd), "window should be destroyed on thread exit\n"); - - wnd_event.hwnd = CreateWindowExA(0, "TestParentClass", "Test parent", WS_OVERLAPPEDWINDOW | WS_VISIBLE, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok (wnd_event.hwnd != 0, "Failed to create parent window\n"); - flush_sequence(); - log_all_parent_messages++; - wnd_event.start_event = CreateEventA( NULL, TRUE, FALSE, NULL ); - wnd_event.stop_event = CreateEventA( NULL, TRUE, FALSE, NULL ); - hThread = CreateThread( NULL, 0, create_child_thread, &wnd_event, 0, &tid ); - for (;;) - { - ret = MsgWaitForMultipleObjects(1, &wnd_event.start_event, FALSE, 1000, QS_SENDMESSAGE); - if (ret != 1) break; - while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessage(&msg); - } - ok( !ret, "MsgWaitForMultipleObjects failed %x\n", ret ); - /* now wait for the thread without processing messages; this shouldn't deadlock */ - SetEvent( wnd_event.stop_event ); - ret = WaitForSingleObject( hThread, 5000 ); - ok( !ret, "WaitForSingleObject failed %x\n", ret ); - CloseHandle( hThread ); - - ret = WaitForSingleObject( wnd_event.grand_child, 5000 ); - ok( !ret, "WaitForSingleObject failed %x\n", ret ); - CloseHandle( wnd_event.grand_child ); - - CloseHandle( wnd_event.start_event ); - CloseHandle( wnd_event.stop_event ); - flush_events(); - ok_sequence(WmExitThreadSeq, "destroy child on thread exit", FALSE); - log_all_parent_messages--; - DestroyWindow( wnd_event.hwnd ); -} - - -static const struct message WmVkN[] = { - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'N', 1 }, /* XP */ - { WM_KEYDOWN, wparam|lparam, 'N', 1 }, - { WM_KEYDOWN, sent|wparam|lparam, 'N', 1 }, - { WM_CHAR, wparam|lparam, 'n', 1 }, - { WM_COMMAND, sent|wparam|lparam, MAKEWPARAM(1002,1), 0 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'N', 0xc0000001 }, /* XP */ - { WM_KEYUP, wparam|lparam, 'N', 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, 'N', 0xc0000001 }, - { 0 } -}; -static const struct message WmShiftVkN[] = { - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_SHIFT, 1 }, /* XP */ - { WM_KEYDOWN, wparam|lparam, VK_SHIFT, 1 }, - { WM_KEYDOWN, sent|wparam|lparam, VK_SHIFT, 1 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'N', 1 }, /* XP */ - { WM_KEYDOWN, wparam|lparam, 'N', 1 }, - { WM_KEYDOWN, sent|wparam|lparam, 'N', 1 }, - { WM_CHAR, wparam|lparam, 'N', 1 }, - { WM_COMMAND, sent|wparam|lparam, MAKEWPARAM(1001,1), 0 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'N', 0xc0000001 }, /* XP */ - { WM_KEYUP, wparam|lparam, 'N', 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, 'N', 0xc0000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_SHIFT, 0xc0000001 }, /* XP */ - { WM_KEYUP, wparam|lparam, VK_SHIFT, 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, VK_SHIFT, 0xc0000001 }, - { 0 } -}; -static const struct message WmCtrlVkN[] = { - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_CONTROL, 1 }, /* XP */ - { WM_KEYDOWN, wparam|lparam, VK_CONTROL, 1 }, - { WM_KEYDOWN, sent|wparam|lparam, VK_CONTROL, 1 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'N', 1 }, /* XP */ - { WM_KEYDOWN, wparam|lparam, 'N', 1 }, - { WM_KEYDOWN, sent|wparam|lparam, 'N', 1 }, - { WM_CHAR, wparam|lparam, 0x000e, 1 }, - { WM_COMMAND, sent|wparam|lparam, MAKEWPARAM(1000,1), 0 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'N', 0xc0000001 }, /* XP */ - { WM_KEYUP, wparam|lparam, 'N', 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, 'N', 0xc0000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_CONTROL, 0xc0000001 }, /* XP */ - { WM_KEYUP, wparam|lparam, VK_CONTROL, 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, VK_CONTROL, 0xc0000001 }, - { 0 } -}; -static const struct message WmCtrlVkN_2[] = { - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_CONTROL, 1 }, /* XP */ - { WM_KEYDOWN, wparam|lparam, VK_CONTROL, 1 }, - { WM_KEYDOWN, sent|wparam|lparam, VK_CONTROL, 1 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'N', 1 }, /* XP */ - { WM_KEYDOWN, wparam|lparam, 'N', 1 }, - { WM_COMMAND, sent|wparam|lparam, MAKEWPARAM(1000,1), 0 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'N', 0xc0000001 }, /* XP */ - { WM_KEYUP, wparam|lparam, 'N', 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, 'N', 0xc0000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_CONTROL, 0xc0000001 }, /* XP */ - { WM_KEYUP, wparam|lparam, VK_CONTROL, 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, VK_CONTROL, 0xc0000001 }, - { 0 } -}; -static const struct message WmAltVkN[] = { - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_MENU, 0x20000001 }, /* XP */ - { WM_SYSKEYDOWN, wparam|lparam, VK_MENU, 0x20000001 }, - { WM_SYSKEYDOWN, sent|wparam|lparam, VK_MENU, 0x20000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'N', 0x20000001 }, /* XP */ - { WM_SYSKEYDOWN, wparam|lparam, 'N', 0x20000001 }, - { WM_SYSKEYDOWN, sent|wparam|lparam, 'N', 0x20000001 }, - { WM_SYSCHAR, wparam|lparam, 'n', 0x20000001 }, - { WM_SYSCHAR, sent|wparam|lparam, 'n', 0x20000001 }, - { WM_SYSCOMMAND, sent|defwinproc|wparam|lparam, SC_KEYMENU, 'n' }, - { HCBT_SYSCOMMAND, hook }, - { WM_ENTERMENULOOP, sent|defwinproc|wparam|lparam, 0, 0 }, - { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, 0, 0 }, - { 0x00AE, sent|defwinproc|optional }, /* XP */ - { WM_GETTEXT, sent|defwinproc|optional }, /* XP */ - { WM_INITMENU, sent|defwinproc }, - { EVENT_SYSTEM_MENUSTART, winevent_hook|wparam|lparam, OBJID_SYSMENU, 0 }, - { WM_MENUCHAR, sent|defwinproc|wparam, MAKEWPARAM('n',MF_SYSMENU) }, - { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0 }, - { WM_CAPTURECHANGED, sent|defwinproc }, - { WM_MENUSELECT, sent|defwinproc|wparam, MAKEWPARAM(0,0xffff) }, - { EVENT_SYSTEM_MENUEND, winevent_hook|wparam|lparam, OBJID_SYSMENU, 0 }, - { WM_EXITMENULOOP, sent|defwinproc }, - { WM_MENUSELECT, sent|defwinproc|wparam|optional, MAKEWPARAM(0,0xffff) }, /* Win95 bug */ - { WM_EXITMENULOOP, sent|defwinproc|optional }, /* Win95 bug */ - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'N', 0xe0000001 }, /* XP */ - { WM_SYSKEYUP, wparam|lparam, 'N', 0xe0000001 }, - { WM_SYSKEYUP, sent|wparam|lparam, 'N', 0xe0000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_MENU, 0xc0000001 }, /* XP */ - { WM_KEYUP, wparam|lparam, VK_MENU, 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, VK_MENU, 0xc0000001 }, - { 0 } -}; -static const struct message WmAltVkN_2[] = { - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_MENU, 0x20000001 }, /* XP */ - { WM_SYSKEYDOWN, wparam|lparam, VK_MENU, 0x20000001 }, - { WM_SYSKEYDOWN, sent|wparam|lparam, VK_MENU, 0x20000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'N', 0x20000001 }, /* XP */ - { WM_SYSKEYDOWN, wparam|lparam, 'N', 0x20000001 }, - { WM_COMMAND, sent|wparam|lparam, MAKEWPARAM(1003,1), 0 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'N', 0xe0000001 }, /* XP */ - { WM_SYSKEYUP, wparam|lparam, 'N', 0xe0000001 }, - { WM_SYSKEYUP, sent|wparam|lparam, 'N', 0xe0000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_MENU, 0xc0000001 }, /* XP */ - { WM_KEYUP, wparam|lparam, VK_MENU, 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, VK_MENU, 0xc0000001 }, - { 0 } -}; -static const struct message WmCtrlAltVkN[] = { - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_CONTROL, 1 }, /* XP */ - { WM_KEYDOWN, wparam|lparam, VK_CONTROL, 1 }, - { WM_KEYDOWN, sent|wparam|lparam, VK_CONTROL, 1 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_MENU, 0x20000001 }, /* XP */ - { WM_KEYDOWN, wparam|lparam, VK_MENU, 0x20000001 }, - { WM_KEYDOWN, sent|wparam|lparam, VK_MENU, 0x20000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'N', 0x20000001 }, /* XP */ - { WM_KEYDOWN, wparam|lparam, 'N', 0x20000001 }, - { WM_KEYDOWN, sent|wparam|lparam, 'N', 0x20000001 }, - { WM_CHAR, optional }, - { WM_CHAR, sent|optional }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'N', 0xe0000001 }, /* XP */ - { WM_KEYUP, wparam|lparam, 'N', 0xe0000001 }, - { WM_KEYUP, sent|wparam|lparam, 'N', 0xe0000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_MENU, 0xc0000001 }, /* XP */ - { WM_KEYUP, wparam|lparam, VK_MENU, 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, VK_MENU, 0xc0000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_CONTROL, 0xc0000001 }, /* XP */ - { WM_KEYUP, wparam|lparam, VK_CONTROL, 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, VK_CONTROL, 0xc0000001 }, - { 0 } -}; -static const struct message WmCtrlShiftVkN[] = { - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_CONTROL, 1 }, /* XP */ - { WM_KEYDOWN, wparam|lparam, VK_CONTROL, 1 }, - { WM_KEYDOWN, sent|wparam|lparam, VK_CONTROL, 1 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_SHIFT, 1 }, /* XP */ - { WM_KEYDOWN, wparam|lparam, VK_SHIFT, 1 }, - { WM_KEYDOWN, sent|wparam|lparam, VK_SHIFT, 1 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'N', 1 }, /* XP */ - { WM_KEYDOWN, wparam|lparam, 'N', 1 }, - { WM_COMMAND, sent|wparam|lparam, MAKEWPARAM(1004,1), 0 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'N', 0xc0000001 }, /* XP */ - { WM_KEYUP, wparam|lparam, 'N', 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, 'N', 0xc0000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_SHIFT, 0xc0000001 }, /* XP */ - { WM_KEYUP, wparam|lparam, VK_SHIFT, 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, VK_SHIFT, 0xc0000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_CONTROL, 0xc0000001 }, /* XP */ - { WM_KEYUP, wparam|lparam, VK_CONTROL, 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, VK_CONTROL, 0xc0000001 }, - { 0 } -}; -static const struct message WmCtrlAltShiftVkN[] = { - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_CONTROL, 1 }, /* XP */ - { WM_KEYDOWN, wparam|lparam, VK_CONTROL, 1 }, - { WM_KEYDOWN, sent|wparam|lparam, VK_CONTROL, 1 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_MENU, 0x20000001 }, /* XP */ - { WM_KEYDOWN, wparam|lparam, VK_MENU, 0x20000001 }, - { WM_KEYDOWN, sent|wparam|lparam, VK_MENU, 0x20000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_SHIFT, 0x20000001 }, /* XP */ - { WM_KEYDOWN, wparam|lparam, VK_SHIFT, 0x20000001 }, - { WM_KEYDOWN, sent|wparam|lparam, VK_SHIFT, 0x20000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'N', 0x20000001 }, /* XP */ - { WM_KEYDOWN, wparam|lparam, 'N', 0x20000001 }, - { WM_COMMAND, sent|wparam|lparam, MAKEWPARAM(1005,1), 0 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'N', 0xe0000001 }, /* XP */ - { WM_KEYUP, wparam|lparam, 'N', 0xe0000001 }, - { WM_KEYUP, sent|wparam|lparam, 'N', 0xe0000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_SHIFT, 0xe0000001 }, /* XP */ - { WM_KEYUP, wparam|lparam, VK_SHIFT, 0xe0000001 }, - { WM_KEYUP, sent|wparam|lparam, VK_SHIFT, 0xe0000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_MENU, 0xc0000001 }, /* XP */ - { WM_KEYUP, wparam|lparam, VK_MENU, 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, VK_MENU, 0xc0000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_CONTROL, 0xc0000001 }, /* XP */ - { WM_KEYUP, wparam|lparam, VK_CONTROL, 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, VK_CONTROL, 0xc0000001 }, - { 0 } -}; -static const struct message WmAltPressRelease[] = { - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_MENU, 0x20000001 }, /* XP */ - { WM_SYSKEYDOWN, wparam|lparam, VK_MENU, 0x20000001 }, - { WM_SYSKEYDOWN, sent|wparam|lparam, VK_MENU, 0x20000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_MENU, 0xc0000001 }, /* XP */ - { WM_SYSKEYUP, wparam|lparam, VK_MENU, 0xc0000001 }, - { WM_SYSKEYUP, sent|wparam|lparam, VK_MENU, 0xc0000001 }, - { WM_SYSCOMMAND, sent|defwinproc|wparam|lparam, SC_KEYMENU, 0 }, - { HCBT_SYSCOMMAND, hook }, - { WM_ENTERMENULOOP, sent|defwinproc|wparam|lparam, 0, 0 }, - { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, 0, 0 }, - { WM_INITMENU, sent|defwinproc }, - { EVENT_SYSTEM_MENUSTART, winevent_hook|wparam|lparam, OBJID_SYSMENU, 0 }, - { WM_MENUSELECT, sent|defwinproc|wparam, MAKEWPARAM(0,MF_SYSMENU|MF_POPUP|MF_HILITE) }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_SYSMENU, 1 }, - - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_MENU, 0x30000001 }, /* XP */ - - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_SYSMENU, 0 }, - { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0, }, - { WM_CAPTURECHANGED, sent|defwinproc }, - { WM_MENUSELECT, sent|defwinproc|wparam|optional, MAKEWPARAM(0,0xffff) }, - { EVENT_SYSTEM_MENUEND, winevent_hook|wparam|lparam, OBJID_SYSMENU, 0 }, - { WM_EXITMENULOOP, sent|defwinproc }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_MENU, 0xc0000001 }, /* XP */ - { WM_SYSKEYUP, wparam|lparam, VK_MENU, 0xc0000001 }, - { WM_SYSKEYUP, sent|wparam|lparam, VK_MENU, 0xc0000001 }, - { 0 } -}; -static const struct message WmShiftMouseButton[] = { - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_SHIFT, 1 }, /* XP */ - { WM_KEYDOWN, wparam|lparam, VK_SHIFT, 1 }, - { WM_KEYDOWN, sent|wparam|lparam, VK_SHIFT, 1 }, - { WM_MOUSEMOVE, wparam|optional, 0, 0 }, - { WM_MOUSEMOVE, sent|wparam|optional, 0, 0 }, - { WM_LBUTTONDOWN, wparam, MK_LBUTTON|MK_SHIFT, 0 }, - { WM_LBUTTONDOWN, sent|wparam, MK_LBUTTON|MK_SHIFT, 0 }, - { WM_LBUTTONUP, wparam, MK_SHIFT, 0 }, - { WM_LBUTTONUP, sent|wparam, MK_SHIFT, 0 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_SHIFT, 0xc0000001 }, /* XP */ - { WM_KEYUP, wparam|lparam, VK_SHIFT, 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, VK_SHIFT, 0xc0000001 }, - { 0 } -}; -static const struct message WmF1Seq[] = { - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_F1, 1 }, /* XP */ - { WM_KEYDOWN, wparam|lparam, VK_F1, 1 }, - { WM_KEYDOWN, sent|wparam|lparam, VK_F1, 0x00000001 }, - { WM_KEYF1, wparam|lparam, 0, 0 }, - { WM_KEYF1, sent|wparam|lparam, 0, 0 }, - { WM_HELP, sent|defwinproc }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_F1, 0xc0000001 }, /* XP */ - { WM_KEYUP, wparam|lparam, VK_F1, 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, VK_F1, 0xc0000001 }, - { 0 } -}; -static const struct message WmVkAppsSeq[] = { - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_APPS, 1 }, /* XP */ - { WM_KEYDOWN, wparam|lparam, VK_APPS, 1 }, - { WM_KEYDOWN, sent|wparam|lparam, VK_APPS, 0x00000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_APPS, 0xc0000001 }, /* XP */ - { WM_KEYUP, wparam|lparam, VK_APPS, 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, VK_APPS, 0xc0000001 }, - { WM_CONTEXTMENU, lparam, /*hwnd*/0, -1 }, - { WM_CONTEXTMENU, sent|lparam, /*hwnd*/0, -1 }, - { 0 } -}; -static const struct message WmVkF10Seq[] = { - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_F10, 1 }, /* XP */ - { WM_SYSKEYDOWN, wparam|lparam, VK_F10, 1 }, - { WM_SYSKEYDOWN, sent|wparam|lparam, VK_F10, 0x00000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_F10, 0xc0000001 }, /* XP */ - { WM_SYSKEYUP, wparam|lparam, VK_F10, 0xc0000001 }, - { WM_SYSKEYUP, sent|wparam|lparam, VK_F10, 0xc0000001 }, - { WM_SYSCOMMAND, sent|defwinproc|wparam, SC_KEYMENU }, - { HCBT_SYSCOMMAND, hook }, - { WM_ENTERMENULOOP, sent|defwinproc|wparam|lparam, 0, 0 }, - { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, 0, 0 }, - { WM_INITMENU, sent|defwinproc }, - { EVENT_SYSTEM_MENUSTART, winevent_hook|wparam|lparam, OBJID_SYSMENU, 0 }, - { WM_MENUSELECT, sent|defwinproc|wparam, MAKEWPARAM(0,MF_SYSMENU|MF_POPUP|MF_HILITE) }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_SYSMENU, 1 }, - - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_F10, 0x10000001 }, /* XP */ - - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_F10, 1 }, /* XP */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_SYSMENU, 0 }, - { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0, }, - { WM_CAPTURECHANGED, sent|defwinproc }, - { WM_MENUSELECT, sent|defwinproc|wparam|optional, MAKEWPARAM(0,0xffff) }, - { EVENT_SYSTEM_MENUEND, winevent_hook|wparam|lparam, OBJID_SYSMENU, 0 }, - { WM_EXITMENULOOP, sent|defwinproc }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_F10, 0xc0000001 }, /* XP */ - { WM_SYSKEYUP, wparam|lparam, VK_F10, 0xc0000001 }, - { WM_SYSKEYUP, sent|wparam|lparam, VK_F10, 0xc0000001 }, - { 0 } -}; -static const struct message WmShiftF10Seq[] = { - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_SHIFT, 1 }, /* XP */ - { WM_KEYDOWN, wparam|lparam, VK_SHIFT, 1 }, - { WM_KEYDOWN, sent|wparam|lparam, VK_SHIFT, 0x00000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_F10, 1 }, /* XP */ - { WM_SYSKEYDOWN, wparam|lparam, VK_F10, 1 }, - { WM_SYSKEYDOWN, sent|wparam|lparam, VK_F10, 0x00000001 }, - { WM_CONTEXTMENU, sent|defwinproc|lparam, /*hwnd*/0, -1 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_F10, 0xc0000001 }, /* XP */ - { WM_SYSKEYUP, wparam|lparam, VK_F10, 0xc0000001 }, - { WM_SYSKEYUP, sent|wparam|lparam, VK_F10, 0xc0000001 }, - { WM_SYSCOMMAND, sent|defwinproc|wparam, SC_KEYMENU }, - { HCBT_SYSCOMMAND, hook }, - { WM_ENTERMENULOOP, sent|defwinproc|wparam|lparam, 0, 0 }, - { WM_INITMENU, sent|defwinproc }, - { WM_MENUSELECT, sent|defwinproc|wparam, MAKEWPARAM(0,MF_SYSMENU|MF_POPUP|MF_HILITE) }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_SHIFT, 0xd0000001 }, /* XP */ - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_ESCAPE, 0x10000001 }, /* XP */ - { WM_CAPTURECHANGED, sent|defwinproc|wparam|lparam, 0, 0 }, - { WM_MENUSELECT, sent|defwinproc|wparam|lparam, 0xffff0000, 0 }, - { WM_EXITMENULOOP, sent|defwinproc|wparam|lparam, 0, 0 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_ESCAPE, 0xc0000001 }, /* XP */ - { WM_KEYUP, wparam|lparam, VK_ESCAPE, 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, VK_ESCAPE, 0xc0000001 }, - { 0 } -}; - -static void pump_msg_loop(HWND hwnd, HACCEL hAccel) -{ - MSG msg; - - while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) - { - struct recvd_message log_msg; - - /* ignore some unwanted messages */ - if (msg.message == WM_MOUSEMOVE || - msg.message == WM_TIMER || - ignore_message( msg.message )) - continue; - - log_msg.hwnd = msg.hwnd; - log_msg.message = msg.message; - log_msg.flags = wparam|lparam; - log_msg.wParam = msg.wParam; - log_msg.lParam = msg.lParam; - log_msg.descr = "accel"; - add_message(&log_msg); - - if (!hAccel || !TranslateAccelerator(hwnd, hAccel, &msg)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } -} - -static void test_accelerators(void) -{ - RECT rc; - POINT pt; - SHORT state; - HACCEL hAccel; - HWND hwnd = CreateWindowExA(0, "TestWindowClass", NULL, WS_OVERLAPPEDWINDOW | WS_VISIBLE, - 100, 100, 200, 200, 0, 0, 0, NULL); - BOOL ret; - - assert(hwnd != 0); - UpdateWindow(hwnd); - flush_events(); - flush_sequence(); - - SetFocus(hwnd); - ok(GetFocus() == hwnd, "wrong focus window %p\n", GetFocus()); - - state = GetKeyState(VK_SHIFT); - ok(!(state & 0x8000), "wrong Shift state %04x\n", state); - state = GetKeyState(VK_CAPITAL); - ok(state == 0, "wrong CapsLock state %04x\n", state); - - hAccel = LoadAccelerators(GetModuleHandleA(0), MAKEINTRESOURCE(1)); - assert(hAccel != 0); - - flush_events(); - pump_msg_loop(hwnd, 0); - flush_sequence(); - - trace("testing VK_N press/release\n"); - flush_sequence(); - keybd_event('N', 0, 0, 0); - keybd_event('N', 0, KEYEVENTF_KEYUP, 0); - pump_msg_loop(hwnd, hAccel); - if (!sequence_cnt) /* we didn't get any message */ - { - skip( "queuing key events not supported\n" ); - goto done; - } - ok_sequence(WmVkN, "VK_N press/release", FALSE); - - trace("testing Shift+VK_N press/release\n"); - flush_sequence(); - keybd_event(VK_SHIFT, 0, 0, 0); - keybd_event('N', 0, 0, 0); - keybd_event('N', 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_SHIFT, 0, KEYEVENTF_KEYUP, 0); - pump_msg_loop(hwnd, hAccel); - ok_sequence(WmShiftVkN, "Shift+VK_N press/release", FALSE); - - trace("testing Ctrl+VK_N press/release\n"); - flush_sequence(); - keybd_event(VK_CONTROL, 0, 0, 0); - keybd_event('N', 0, 0, 0); - keybd_event('N', 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0); - pump_msg_loop(hwnd, hAccel); - ok_sequence(WmCtrlVkN, "Ctrl+VK_N press/release", FALSE); - - trace("testing Alt+VK_N press/release\n"); - flush_sequence(); - keybd_event(VK_MENU, 0, 0, 0); - keybd_event('N', 0, 0, 0); - keybd_event('N', 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0); - pump_msg_loop(hwnd, hAccel); - ok_sequence(WmAltVkN, "Alt+VK_N press/release", FALSE); - - trace("testing Ctrl+Alt+VK_N press/release 1\n"); - flush_sequence(); - keybd_event(VK_CONTROL, 0, 0, 0); - keybd_event(VK_MENU, 0, 0, 0); - keybd_event('N', 0, 0, 0); - keybd_event('N', 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0); - pump_msg_loop(hwnd, hAccel); - ok_sequence(WmCtrlAltVkN, "Ctrl+Alt+VK_N press/release 1", FALSE); - - ret = DestroyAcceleratorTable(hAccel); - ok( ret, "DestroyAcceleratorTable error %d\n", GetLastError()); - - hAccel = LoadAccelerators(GetModuleHandleA(0), MAKEINTRESOURCE(2)); - assert(hAccel != 0); - - trace("testing VK_N press/release\n"); - flush_sequence(); - keybd_event('N', 0, 0, 0); - keybd_event('N', 0, KEYEVENTF_KEYUP, 0); - pump_msg_loop(hwnd, hAccel); - ok_sequence(WmVkN, "VK_N press/release", FALSE); - - trace("testing Shift+VK_N press/release\n"); - flush_sequence(); - keybd_event(VK_SHIFT, 0, 0, 0); - keybd_event('N', 0, 0, 0); - keybd_event('N', 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_SHIFT, 0, KEYEVENTF_KEYUP, 0); - pump_msg_loop(hwnd, hAccel); - ok_sequence(WmShiftVkN, "Shift+VK_N press/release", FALSE); - - trace("testing Ctrl+VK_N press/release 2\n"); - flush_sequence(); - keybd_event(VK_CONTROL, 0, 0, 0); - keybd_event('N', 0, 0, 0); - keybd_event('N', 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0); - pump_msg_loop(hwnd, hAccel); - ok_sequence(WmCtrlVkN_2, "Ctrl+VK_N press/release 2", FALSE); - - trace("testing Alt+VK_N press/release 2\n"); - flush_sequence(); - keybd_event(VK_MENU, 0, 0, 0); - keybd_event('N', 0, 0, 0); - keybd_event('N', 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0); - pump_msg_loop(hwnd, hAccel); - ok_sequence(WmAltVkN_2, "Alt+VK_N press/release 2", FALSE); - - trace("testing Ctrl+Alt+VK_N press/release 2\n"); - flush_sequence(); - keybd_event(VK_CONTROL, 0, 0, 0); - keybd_event(VK_MENU, 0, 0, 0); - keybd_event('N', 0, 0, 0); - keybd_event('N', 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0); - pump_msg_loop(hwnd, hAccel); - ok_sequence(WmCtrlAltVkN, "Ctrl+Alt+VK_N press/release 2", FALSE); - - trace("testing Ctrl+Shift+VK_N press/release\n"); - flush_sequence(); - keybd_event(VK_CONTROL, 0, 0, 0); - keybd_event(VK_SHIFT, 0, 0, 0); - keybd_event('N', 0, 0, 0); - keybd_event('N', 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_SHIFT, 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0); - pump_msg_loop(hwnd, hAccel); - ok_sequence(WmCtrlShiftVkN, "Ctrl+Shift+VK_N press/release", FALSE); - - trace("testing Ctrl+Alt+Shift+VK_N press/release\n"); - flush_sequence(); - keybd_event(VK_CONTROL, 0, 0, 0); - keybd_event(VK_MENU, 0, 0, 0); - keybd_event(VK_SHIFT, 0, 0, 0); - keybd_event('N', 0, 0, 0); - keybd_event('N', 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_SHIFT, 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0); - pump_msg_loop(hwnd, hAccel); - ok_sequence(WmCtrlAltShiftVkN, "Ctrl+Alt+Shift+VK_N press/release", FALSE); - - ret = DestroyAcceleratorTable(hAccel); - ok( ret, "DestroyAcceleratorTable error %d\n", GetLastError()); - hAccel = 0; - - trace("testing Alt press/release\n"); - flush_sequence(); - keybd_event(VK_MENU, 0, 0, 0); - keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_MENU, 0, 0, 0); - keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0); - pump_msg_loop(hwnd, 0); - /* this test doesn't pass in Wine for managed windows */ - ok_sequence(WmAltPressRelease, "Alt press/release", TRUE); - - trace("testing VK_F1 press/release\n"); - keybd_event(VK_F1, 0, 0, 0); - keybd_event(VK_F1, 0, KEYEVENTF_KEYUP, 0); - pump_msg_loop(hwnd, 0); - ok_sequence(WmF1Seq, "F1 press/release", FALSE); - - trace("testing VK_APPS press/release\n"); - keybd_event(VK_APPS, 0, 0, 0); - keybd_event(VK_APPS, 0, KEYEVENTF_KEYUP, 0); - pump_msg_loop(hwnd, 0); - ok_sequence(WmVkAppsSeq, "VK_APPS press/release", FALSE); - - trace("testing VK_F10 press/release\n"); - keybd_event(VK_F10, 0, 0, 0); - keybd_event(VK_F10, 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_F10, 0, 0, 0); - keybd_event(VK_F10, 0, KEYEVENTF_KEYUP, 0); - pump_msg_loop(hwnd, 0); - ok_sequence(WmVkF10Seq, "VK_F10 press/release", TRUE); - - trace("testing SHIFT+F10 press/release\n"); - keybd_event(VK_SHIFT, 0, 0, 0); - keybd_event(VK_F10, 0, 0, 0); - keybd_event(VK_F10, 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_SHIFT, 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_ESCAPE, 0, 0, 0); - keybd_event(VK_ESCAPE, 0, KEYEVENTF_KEYUP, 0); - pump_msg_loop(hwnd, 0); - ok_sequence(WmShiftF10Seq, "SHIFT+F10 press/release", TRUE); - - trace("testing Shift+MouseButton press/release\n"); - /* first, move mouse pointer inside of the window client area */ - GetClientRect(hwnd, &rc); - MapWindowPoints(hwnd, 0, (LPPOINT)&rc, 2); - rc.left += (rc.right - rc.left)/2; - rc.top += (rc.bottom - rc.top)/2; - SetCursorPos(rc.left, rc.top); - SetActiveWindow(hwnd); - - flush_events(); - flush_sequence(); - GetCursorPos(&pt); - if (pt.x == rc.left && pt.y == rc.top) - { - int i; - keybd_event(VK_SHIFT, 0, 0, 0); - mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); - mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); - keybd_event(VK_SHIFT, 0, KEYEVENTF_KEYUP, 0); - pump_msg_loop(hwnd, 0); - for (i = 0; i < sequence_cnt; i++) if (sequence[i].message == WM_LBUTTONDOWN) break; - if (i < sequence_cnt) - ok_sequence(WmShiftMouseButton, "Shift+MouseButton press/release", FALSE); - else - skip( "Shift+MouseButton event didn't get to the window\n" ); - } - -done: - if (hAccel) DestroyAcceleratorTable(hAccel); - DestroyWindow(hwnd); -} - -/************* window procedures ********************/ - -static LRESULT MsgCheckProc (BOOL unicode, HWND hwnd, UINT message, - WPARAM wParam, LPARAM lParam) -{ - static LONG defwndproc_counter = 0; - static LONG beginpaint_counter = 0; - LRESULT ret; - struct recvd_message msg; - - if (ignore_message( message )) return 0; - - switch (message) - { - case WM_ENABLE: - { - LONG style = GetWindowLongA(hwnd, GWL_STYLE); - ok((BOOL)wParam == !(style & WS_DISABLED), - "wrong WS_DISABLED state: %ld != %d\n", wParam, !(style & WS_DISABLED)); - break; - } - - case WM_CAPTURECHANGED: - if (test_DestroyWindow_flag) - { - DWORD style = GetWindowLongA(hwnd, GWL_STYLE); - if (style & WS_CHILD) - lParam = GetWindowLongPtrA(hwnd, GWLP_ID); - else if (style & WS_POPUP) - lParam = WND_POPUP_ID; - else - lParam = WND_PARENT_ID; - } - break; - - case WM_NCDESTROY: - { - HWND capture; - - ok(!GetWindow(hwnd, GW_CHILD), "children should be unlinked at this point\n"); - capture = GetCapture(); - if (capture) - { - ok(capture == hwnd, "capture should NOT be released at this point (capture %p)\n", capture); - trace("current capture %p, releasing...\n", capture); - ReleaseCapture(); - } - } - /* fall through */ - case WM_DESTROY: - if (pGetAncestor) - ok(pGetAncestor(hwnd, GA_PARENT) != 0, "parent should NOT be unlinked at this point\n"); - if (test_DestroyWindow_flag) - { - DWORD style = GetWindowLongA(hwnd, GWL_STYLE); - if (style & WS_CHILD) - lParam = GetWindowLongPtrA(hwnd, GWLP_ID); - else if (style & WS_POPUP) - lParam = WND_POPUP_ID; - else - lParam = WND_PARENT_ID; - } - break; - - /* test_accelerators() depends on this */ - case WM_NCHITTEST: - return HTCLIENT; - - /* ignore */ - case WM_MOUSEMOVE: - case WM_MOUSEACTIVATE: - case WM_NCMOUSEMOVE: - case WM_SETCURSOR: - case WM_IME_SELECT: - return 0; - } - - msg.hwnd = hwnd; - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - if (beginpaint_counter) msg.flags |= beginpaint; - msg.wParam = wParam; - msg.lParam = lParam; - msg.descr = "MsgCheckProc"; - add_message(&msg); - - if (message == WM_GETMINMAXINFO && (GetWindowLongA(hwnd, GWL_STYLE) & WS_CHILD)) - { - HWND parent = GetParent(hwnd); - RECT rc; - MINMAXINFO *minmax = (MINMAXINFO *)lParam; - - GetClientRect(parent, &rc); - trace("parent %p client size = (%d x %d)\n", parent, rc.right, rc.bottom); - trace("Reserved=%d,%d MaxSize=%d,%d MaxPos=%d,%d MinTrack=%d,%d MaxTrack=%d,%d\n", - minmax->ptReserved.x, minmax->ptReserved.y, - minmax->ptMaxSize.x, minmax->ptMaxSize.y, - minmax->ptMaxPosition.x, minmax->ptMaxPosition.y, - minmax->ptMinTrackSize.x, minmax->ptMinTrackSize.y, - minmax->ptMaxTrackSize.x, minmax->ptMaxTrackSize.y); - - ok(minmax->ptMaxSize.x == rc.right, "default width of maximized child %d != %d\n", - minmax->ptMaxSize.x, rc.right); - ok(minmax->ptMaxSize.y == rc.bottom, "default height of maximized child %d != %d\n", - minmax->ptMaxSize.y, rc.bottom); - } - - if (message == WM_PAINT) - { - PAINTSTRUCT ps; - beginpaint_counter++; - BeginPaint( hwnd, &ps ); - beginpaint_counter--; - EndPaint( hwnd, &ps ); - return 0; - } - - defwndproc_counter++; - ret = unicode ? DefWindowProcW(hwnd, message, wParam, lParam) - : DefWindowProcA(hwnd, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static LRESULT WINAPI MsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - return MsgCheckProc (FALSE, hwnd, message, wParam, lParam); -} - -static LRESULT WINAPI MsgCheckProcW(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - return MsgCheckProc (TRUE, hwnd, message, wParam, lParam); -} - -static LRESULT WINAPI PopupMsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - static LONG defwndproc_counter = 0; - LRESULT ret; - struct recvd_message msg; - - if (ignore_message( message )) return 0; - - switch (message) - { - case WM_QUERYENDSESSION: - case WM_ENDSESSION: - lParam &= ~0x01; /* Vista adds a 0x01 flag */ - break; - } - - msg.hwnd = hwnd; - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - msg.descr = "popup"; - add_message(&msg); - - if (message == WM_CREATE) - { - DWORD style = GetWindowLongA(hwnd, GWL_STYLE) | WS_VISIBLE; - SetWindowLongA(hwnd, GWL_STYLE, style); - } - - defwndproc_counter++; - ret = DefWindowProcA(hwnd, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static LRESULT WINAPI ParentMsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - static LONG defwndproc_counter = 0; - static LONG beginpaint_counter = 0; - LRESULT ret; - struct recvd_message msg; - - if (ignore_message( message )) return 0; - - if (log_all_parent_messages || - message == WM_PARENTNOTIFY || message == WM_CANCELMODE || - message == WM_SETFOCUS || message == WM_KILLFOCUS || - message == WM_ENABLE || message == WM_ENTERIDLE || - message == WM_DRAWITEM || message == WM_COMMAND || - message == WM_IME_SETCONTEXT) - { - switch (message) - { - /* ignore */ - case WM_NCHITTEST: - return HTCLIENT; - case WM_SETCURSOR: - case WM_MOUSEMOVE: - case WM_NCMOUSEMOVE: - return 0; - - case WM_ERASEBKGND: - { - RECT rc; - INT ret = GetClipBox((HDC)wParam, &rc); - - trace("WM_ERASEBKGND: GetClipBox()=%d, (%d,%d-%d,%d)\n", - ret, rc.left, rc.top, rc.right, rc.bottom); - break; - } - } - - msg.hwnd = hwnd; - msg.message = message; - msg.flags = sent|parent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - if (beginpaint_counter) msg.flags |= beginpaint; - msg.wParam = wParam; - msg.lParam = lParam; - msg.descr = "parent"; - add_message(&msg); - } - - if (message == WM_PAINT) - { - PAINTSTRUCT ps; - beginpaint_counter++; - BeginPaint( hwnd, &ps ); - beginpaint_counter--; - EndPaint( hwnd, &ps ); - return 0; - } - - defwndproc_counter++; - ret = DefWindowProcA(hwnd, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static INT_PTR CALLBACK StopQuitMsgCheckProcA(HWND hwnd, UINT message, WPARAM wp, LPARAM lp) -{ - if (message == WM_CREATE) - PostMessage(hwnd, WM_CLOSE, 0, 0); - else if (message == WM_CLOSE) - { - /* Only the first WM_QUIT will survive the window destruction */ - PostMessage(hwnd, WM_USER, 0x1234, 0x5678); - PostMessage(hwnd, WM_QUIT, 0x1234, 0x5678); - PostMessage(hwnd, WM_QUIT, 0x4321, 0x8765); - } - - return DefWindowProcA(hwnd, message, wp, lp); -} - -static LRESULT WINAPI TestDlgProcA(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - static LONG defwndproc_counter = 0; - LRESULT ret; - struct recvd_message msg; - - if (ignore_message( message )) return 0; - - if (test_def_id) - { - DefDlgProcA(hwnd, DM_SETDEFID, 1, 0); - ret = DefDlgProcA(hwnd, DM_GETDEFID, 0, 0); - if (after_end_dialog) - ok( ret == 0, "DM_GETDEFID should return 0 after EndDialog, got %lx\n", ret ); - else - ok(HIWORD(ret) == DC_HASDEFID, "DM_GETDEFID should return DC_HASDEFID, got %lx\n", ret); - } - - msg.hwnd = hwnd; - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - msg.descr = "dialog"; - add_message(&msg); - - defwndproc_counter++; - ret = DefDlgProcA(hwnd, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static LRESULT WINAPI ShowWindowProcA(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - static LONG defwndproc_counter = 0; - LRESULT ret; - struct recvd_message msg; - - /* log only specific messages we are interested in */ - switch (message) - { -#if 0 /* probably log these as well */ - case WM_ACTIVATE: - case WM_SETFOCUS: - case WM_KILLFOCUS: -#endif - case WM_SHOWWINDOW: - case WM_SIZE: - case WM_MOVE: - case WM_GETMINMAXINFO: - case WM_WINDOWPOSCHANGING: - case WM_WINDOWPOSCHANGED: - break; - - default: /* ignore */ - /*trace("showwindow: %p, %04x, %08x, %08lx\n", hwnd, message, wParam, lParam);*/ - return DefWindowProcA(hwnd, message, wParam, lParam); - } - - msg.hwnd = hwnd; - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - msg.descr = "show"; - add_message(&msg); - - defwndproc_counter++; - ret = DefWindowProcA(hwnd, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static LRESULT WINAPI PaintLoopProcA(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch (msg) - { - case WM_CREATE: return 0; - case WM_PAINT: - { - MSG msg2; - static int i = 0; - - if (i < 256) - { - i++; - if (PeekMessageA(&msg2, 0, 0, 0, 1)) - { - TranslateMessage(&msg2); - DispatchMessage(&msg2); - } - i--; - } - else ok(broken(1), "infinite loop\n"); - if ( i == 0) - paint_loop_done = 1; - return DefWindowProcA(hWnd,msg,wParam,lParam); - } - } - return DefWindowProcA(hWnd,msg,wParam,lParam); -} - -static LRESULT WINAPI HotkeyMsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - static LONG defwndproc_counter = 0; - LRESULT ret; - struct recvd_message msg; - DWORD queue_status; - - if (ignore_message( message )) return 0; - - if ((message >= WM_KEYFIRST && message <= WM_KEYLAST) || - message == WM_HOTKEY || message >= WM_APP) - { - msg.hwnd = hwnd; - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - msg.descr = "HotkeyMsgCheckProcA"; - add_message(&msg); - } - - defwndproc_counter++; - ret = DefWindowProcA(hwnd, message, wParam, lParam); - defwndproc_counter--; - - if (message == WM_APP) - { - queue_status = GetQueueStatus(QS_HOTKEY); - ok((queue_status & (QS_HOTKEY << 16)) == QS_HOTKEY << 16, "expected QS_HOTKEY << 16 set, got %x\n", queue_status); - queue_status = GetQueueStatus(QS_POSTMESSAGE); - ok((queue_status & (QS_POSTMESSAGE << 16)) == QS_POSTMESSAGE << 16, "expected QS_POSTMESSAGE << 16 set, got %x\n", queue_status); - PostMessageA(hwnd, WM_APP+1, 0, 0); - } - else if (message == WM_APP+1) - { - queue_status = GetQueueStatus(QS_HOTKEY); - ok((queue_status & (QS_HOTKEY << 16)) == 0, "expected QS_HOTKEY << 16 cleared, got %x\n", queue_status); - } - - return ret; -} - -static BOOL RegisterWindowClasses(void) -{ - WNDCLASSA cls; - WNDCLASSW clsW; - - cls.style = 0; - cls.lpfnWndProc = MsgCheckProcA; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(0); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "TestWindowClass"; - if(!RegisterClassA(&cls)) return FALSE; - - cls.lpfnWndProc = HotkeyMsgCheckProcA; - cls.lpszClassName = "HotkeyWindowClass"; - if(!RegisterClassA(&cls)) return FALSE; - - cls.lpfnWndProc = ShowWindowProcA; - cls.lpszClassName = "ShowWindowClass"; - if(!RegisterClassA(&cls)) return FALSE; - - cls.lpfnWndProc = PopupMsgCheckProcA; - cls.lpszClassName = "TestPopupClass"; - if(!RegisterClassA(&cls)) return FALSE; - - cls.lpfnWndProc = ParentMsgCheckProcA; - cls.lpszClassName = "TestParentClass"; - if(!RegisterClassA(&cls)) return FALSE; - - cls.lpfnWndProc = StopQuitMsgCheckProcA; - cls.lpszClassName = "StopQuitClass"; - if(!RegisterClassA(&cls)) return FALSE; - - cls.lpfnWndProc = DefWindowProcA; - cls.lpszClassName = "SimpleWindowClass"; - if(!RegisterClassA(&cls)) return FALSE; - - cls.lpfnWndProc = PaintLoopProcA; - cls.lpszClassName = "PaintLoopWindowClass"; - if(!RegisterClassA(&cls)) return FALSE; - - cls.style = CS_NOCLOSE; - cls.lpszClassName = "NoCloseWindowClass"; - if(!RegisterClassA(&cls)) return FALSE; - - ok(GetClassInfoA(0, "#32770", &cls), "GetClassInfo failed\n"); - cls.style = 0; - cls.hInstance = GetModuleHandleA(0); - cls.hbrBackground = 0; - cls.lpfnWndProc = TestDlgProcA; - cls.lpszClassName = "TestDialogClass"; - if(!RegisterClassA(&cls)) return FALSE; - - clsW.style = 0; - clsW.lpfnWndProc = MsgCheckProcW; - clsW.cbClsExtra = 0; - clsW.cbWndExtra = 0; - clsW.hInstance = GetModuleHandleW(0); - clsW.hIcon = 0; - clsW.hCursor = LoadCursorW(0, (LPWSTR)IDC_ARROW); - clsW.hbrBackground = GetStockObject(WHITE_BRUSH); - clsW.lpszMenuName = NULL; - clsW.lpszClassName = testWindowClassW; - RegisterClassW(&clsW); /* ignore error, this fails on Win9x */ - - return TRUE; -} - -static BOOL is_our_logged_class(HWND hwnd) -{ - char buf[256]; - - if (GetClassNameA(hwnd, buf, sizeof(buf))) - { - if (!lstrcmpiA(buf, "TestWindowClass") || - !lstrcmpiA(buf, "ShowWindowClass") || - !lstrcmpiA(buf, "TestParentClass") || - !lstrcmpiA(buf, "TestPopupClass") || - !lstrcmpiA(buf, "SimpleWindowClass") || - !lstrcmpiA(buf, "TestDialogClass") || - !lstrcmpiA(buf, "MDI_frame_class") || - !lstrcmpiA(buf, "MDI_client_class") || - !lstrcmpiA(buf, "MDI_child_class") || - !lstrcmpiA(buf, "my_button_class") || - !lstrcmpiA(buf, "my_edit_class") || - !lstrcmpiA(buf, "static") || - !lstrcmpiA(buf, "ListBox") || - !lstrcmpiA(buf, "ComboBox") || - !lstrcmpiA(buf, "MyDialogClass") || - !lstrcmpiA(buf, "#32770") || - !lstrcmpiA(buf, "#32768")) - return TRUE; - } - return FALSE; -} - -static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam) -{ - HWND hwnd; - - ok(cbt_hook_thread_id == GetCurrentThreadId(), "we didn't ask for events from other threads\n"); - - if (nCode == HCBT_CLICKSKIPPED) - { - /* ignore this event, XP sends it a lot when switching focus between windows */ - return CallNextHookEx(hCBT_hook, nCode, wParam, lParam); - } - - if (nCode == HCBT_SYSCOMMAND || nCode == HCBT_KEYSKIPPED) - { - struct recvd_message msg; - - msg.hwnd = 0; - msg.message = nCode; - msg.flags = hook|wparam|lparam; - msg.wParam = wParam; - msg.lParam = lParam; - msg.descr = "CBT"; - add_message(&msg); - - return CallNextHookEx(hCBT_hook, nCode, wParam, lParam); - } - - if (nCode == HCBT_DESTROYWND) - { - if (test_DestroyWindow_flag) - { - DWORD style = GetWindowLongA((HWND)wParam, GWL_STYLE); - if (style & WS_CHILD) - lParam = GetWindowLongPtrA((HWND)wParam, GWLP_ID); - else if (style & WS_POPUP) - lParam = WND_POPUP_ID; - else - lParam = WND_PARENT_ID; - } - } - - /* Log also SetFocus(0) calls */ - hwnd = wParam ? (HWND)wParam : (HWND)lParam; - - if (is_our_logged_class(hwnd)) - { - struct recvd_message msg; - - msg.hwnd = hwnd; - msg.message = nCode; - msg.flags = hook|wparam|lparam; - msg.wParam = wParam; - msg.lParam = lParam; - msg.descr = "CBT"; - add_message(&msg); - } - return CallNextHookEx(hCBT_hook, nCode, wParam, lParam); -} - -static void CALLBACK win_event_proc(HWINEVENTHOOK hevent, - DWORD event, - HWND hwnd, - LONG object_id, - LONG child_id, - DWORD thread_id, - DWORD event_time) -{ - ok(thread_id == GetCurrentThreadId(), "we didn't ask for events from other threads\n"); - - /* ignore mouse cursor events */ - if (object_id == OBJID_CURSOR) return; - - if (!hwnd || is_our_logged_class(hwnd)) - { - struct recvd_message msg; - - msg.hwnd = hwnd; - msg.message = event; - msg.flags = winevent_hook|wparam|lparam; - msg.wParam = object_id; - msg.lParam = child_id; - msg.descr = "WEH"; - add_message(&msg); - } -} - -static const WCHAR wszUnicode[] = {'U','n','i','c','o','d','e',0}; -static const WCHAR wszAnsi[] = {'U',0}; - -static LRESULT CALLBACK MsgConversionProcW(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - switch (uMsg) - { - case CB_FINDSTRINGEXACT: - trace("String: %p\n", (LPCWSTR)lParam); - if (!lstrcmpW((LPCWSTR)lParam, wszUnicode)) - return 1; - if (!lstrcmpW((LPCWSTR)lParam, wszAnsi)) - return 0; - return -1; - } - return DefWindowProcW(hwnd, uMsg, wParam, lParam); -} - -static const struct message WmGetTextLengthAfromW[] = { - { WM_GETTEXTLENGTH, sent }, - { WM_GETTEXT, sent|optional }, - { 0 } -}; - -static const WCHAR dummy_window_text[] = {'d','u','m','m','y',' ','t','e','x','t',0}; - -/* dummy window proc for WM_GETTEXTLENGTH test */ -static LRESULT CALLBACK get_text_len_proc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) -{ - switch(msg) - { - case WM_GETTEXTLENGTH: - return lstrlenW(dummy_window_text) + 37; /* some random length */ - case WM_GETTEXT: - lstrcpynW( (LPWSTR)lp, dummy_window_text, wp ); - return lstrlenW( (LPWSTR)lp ); - default: - return DefWindowProcW( hwnd, msg, wp, lp ); - } -} - -static void test_message_conversion(void) -{ - static const WCHAR wszMsgConversionClass[] = - {'M','s','g','C','o','n','v','e','r','s','i','o','n','C','l','a','s','s',0}; - WNDCLASSW cls; - LRESULT lRes; - HWND hwnd; - WNDPROC wndproc, newproc; - BOOL ret; - - cls.style = 0; - cls.lpfnWndProc = MsgConversionProcW; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleW(NULL); - cls.hIcon = NULL; - cls.hCursor = LoadCursorW(NULL, (LPWSTR)IDC_ARROW); - cls.hbrBackground = (HBRUSH)(COLOR_BTNFACE+1); - cls.lpszMenuName = NULL; - cls.lpszClassName = wszMsgConversionClass; - /* this call will fail on Win9x, but that doesn't matter as this test is - * meaningless on those platforms */ - if(!RegisterClassW(&cls)) return; - - hwnd = CreateWindowExW(0, wszMsgConversionClass, NULL, WS_OVERLAPPED, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok(hwnd != NULL, "Window creation failed\n"); - - /* {W, A} -> A */ - - wndproc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_WNDPROC); - lRes = CallWindowProcA(wndproc, hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode); - ok(lRes == 0, "String should have been converted\n"); - lRes = CallWindowProcW(wndproc, hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode); - ok(lRes == 1, "String shouldn't have been converted\n"); - - /* {W, A} -> W */ - - wndproc = (WNDPROC)GetWindowLongPtrW(hwnd, GWLP_WNDPROC); - lRes = CallWindowProcA(wndproc, hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode); - ok(lRes == 1, "String shouldn't have been converted\n"); - lRes = CallWindowProcW(wndproc, hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode); - ok(lRes == 1, "String shouldn't have been converted\n"); - - /* Synchronous messages */ - - lRes = SendMessageA(hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode); - ok(lRes == 0, "String should have been converted\n"); - lRes = SendMessageW(hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode); - ok(lRes == 1, "String shouldn't have been converted\n"); - - /* Asynchronous messages */ - - SetLastError(0); - lRes = PostMessageA(hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode); - ok(lRes == 0 && (GetLastError() == ERROR_MESSAGE_SYNC_ONLY || GetLastError() == ERROR_INVALID_PARAMETER), - "PostMessage on sync only message returned %ld, last error %d\n", lRes, GetLastError()); - SetLastError(0); - lRes = PostMessageW(hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode); - ok(lRes == 0 && (GetLastError() == ERROR_MESSAGE_SYNC_ONLY || GetLastError() == ERROR_INVALID_PARAMETER), - "PostMessage on sync only message returned %ld, last error %d\n", lRes, GetLastError()); - SetLastError(0); - lRes = PostThreadMessageA(GetCurrentThreadId(), CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode); - ok(lRes == 0 && (GetLastError() == ERROR_MESSAGE_SYNC_ONLY || GetLastError() == ERROR_INVALID_PARAMETER), - "PosThreadtMessage on sync only message returned %ld, last error %d\n", lRes, GetLastError()); - SetLastError(0); - lRes = PostThreadMessageW(GetCurrentThreadId(), CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode); - ok(lRes == 0 && (GetLastError() == ERROR_MESSAGE_SYNC_ONLY || GetLastError() == ERROR_INVALID_PARAMETER), - "PosThreadtMessage on sync only message returned %ld, last error %d\n", lRes, GetLastError()); - SetLastError(0); - lRes = SendNotifyMessageA(hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode); - ok(lRes == 0 && (GetLastError() == ERROR_MESSAGE_SYNC_ONLY || GetLastError() == ERROR_INVALID_PARAMETER), - "SendNotifyMessage on sync only message returned %ld, last error %d\n", lRes, GetLastError()); - SetLastError(0); - lRes = SendNotifyMessageW(hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode); - ok(lRes == 0 && (GetLastError() == ERROR_MESSAGE_SYNC_ONLY || GetLastError() == ERROR_INVALID_PARAMETER), - "SendNotifyMessage on sync only message returned %ld, last error %d\n", lRes, GetLastError()); - SetLastError(0); - lRes = SendMessageCallbackA(hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode, NULL, 0); - ok(lRes == 0 && (GetLastError() == ERROR_MESSAGE_SYNC_ONLY || GetLastError() == ERROR_INVALID_PARAMETER), - "SendMessageCallback on sync only message returned %ld, last error %d\n", lRes, GetLastError()); - SetLastError(0); - lRes = SendMessageCallbackW(hwnd, CB_FINDSTRINGEXACT, 0, (LPARAM)wszUnicode, NULL, 0); - ok(lRes == 0 && (GetLastError() == ERROR_MESSAGE_SYNC_ONLY || GetLastError() == ERROR_INVALID_PARAMETER), - "SendMessageCallback on sync only message returned %ld, last error %d\n", lRes, GetLastError()); - - /* Check WM_GETTEXTLENGTH A->W behaviour, whether WM_GETTEXT is also sent or not */ - - hwnd = CreateWindowW (testWindowClassW, wszUnicode, - WS_OVERLAPPEDWINDOW, - 100, 100, 200, 200, 0, 0, 0, NULL); - assert(hwnd); - flush_sequence(); - lRes = SendMessageA (hwnd, WM_GETTEXTLENGTH, 0, 0); - ok_sequence(WmGetTextLengthAfromW, "ANSI WM_GETTEXTLENGTH to Unicode window", FALSE); - ok( lRes == WideCharToMultiByte( CP_ACP, 0, wszUnicode, lstrlenW(wszUnicode), NULL, 0, NULL, NULL ), - "got bad length %ld\n", lRes ); - - flush_sequence(); - lRes = CallWindowProcA( (WNDPROC)GetWindowLongPtrA( hwnd, GWLP_WNDPROC ), - hwnd, WM_GETTEXTLENGTH, 0, 0); - ok_sequence(WmGetTextLengthAfromW, "ANSI WM_GETTEXTLENGTH to Unicode window", FALSE); - ok( lRes == WideCharToMultiByte( CP_ACP, 0, wszUnicode, lstrlenW(wszUnicode), NULL, 0, NULL, NULL ), - "got bad length %ld\n", lRes ); - - wndproc = (WNDPROC)SetWindowLongPtrW( hwnd, GWLP_WNDPROC, (LONG_PTR)get_text_len_proc ); - newproc = (WNDPROC)GetWindowLongPtrA( hwnd, GWLP_WNDPROC ); - lRes = CallWindowProcA( newproc, hwnd, WM_GETTEXTLENGTH, 0, 0 ); - ok( lRes == WideCharToMultiByte( CP_ACP, 0, dummy_window_text, lstrlenW(dummy_window_text), - NULL, 0, NULL, NULL ) || - broken(lRes == lstrlenW(dummy_window_text) + 37), - "got bad length %ld\n", lRes ); - - SetWindowLongPtrW( hwnd, GWLP_WNDPROC, (LONG_PTR)wndproc ); /* restore old wnd proc */ - lRes = CallWindowProcA( newproc, hwnd, WM_GETTEXTLENGTH, 0, 0 ); - ok( lRes == WideCharToMultiByte( CP_ACP, 0, dummy_window_text, lstrlenW(dummy_window_text), - NULL, 0, NULL, NULL ) || - broken(lRes == lstrlenW(dummy_window_text) + 37), - "got bad length %ld\n", lRes ); - - ret = DestroyWindow(hwnd); - ok( ret, "DestroyWindow() error %d\n", GetLastError()); -} - -struct timer_info -{ - HWND hWnd; - HANDLE handles[2]; - DWORD id; -}; - -static VOID CALLBACK tfunc(HWND hwnd, UINT uMsg, UINT_PTR id, DWORD dwTime) -{ -} - -static VOID CALLBACK tfunc_crash(HWND hwnd, UINT uMsg, UINT_PTR id, DWORD dwTime) -{ - /* Crash on purpose */ - *(volatile int *)0 = 2; -} - -#define TIMER_ID 0x19 - -static DWORD WINAPI timer_thread_proc(LPVOID x) -{ - struct timer_info *info = x; - DWORD r; - - r = KillTimer(info->hWnd, 0x19); - ok(r,"KillTimer failed in thread\n"); - r = SetTimer(info->hWnd,TIMER_ID,10000,tfunc); - ok(r,"SetTimer failed in thread\n"); - ok(r==TIMER_ID,"SetTimer id different\n"); - r = SetEvent(info->handles[0]); - ok(r,"SetEvent failed in thread\n"); - return 0; -} - -static void test_timers(void) -{ - struct timer_info info; - DWORD id; - MSG msg; - - info.hWnd = CreateWindow ("TestWindowClass", NULL, - WS_OVERLAPPEDWINDOW , - CW_USEDEFAULT, CW_USEDEFAULT, 300, 300, 0, - NULL, NULL, 0); - - info.id = SetTimer(info.hWnd,TIMER_ID,10000,tfunc); - ok(info.id, "SetTimer failed\n"); - ok(info.id==TIMER_ID, "SetTimer timer ID different\n"); - info.handles[0] = CreateEvent(NULL,0,0,NULL); - info.handles[1] = CreateThread(NULL,0,timer_thread_proc,&info,0,&id); - - WaitForMultipleObjects(2, info.handles, FALSE, INFINITE); - - WaitForSingleObject(info.handles[1], INFINITE); - - CloseHandle(info.handles[0]); - CloseHandle(info.handles[1]); - - ok( KillTimer(info.hWnd, TIMER_ID), "KillTimer failed\n"); - - ok(DestroyWindow(info.hWnd), "failed to destroy window\n"); - - /* Test timer callback with crash */ - SetLastError(0xdeadbeef); - info.hWnd = CreateWindowW(testWindowClassW, NULL, - WS_OVERLAPPEDWINDOW , - CW_USEDEFAULT, CW_USEDEFAULT, 300, 300, 0, - NULL, NULL, 0); - if ((!info.hWnd && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) || /* Win9x/Me */ - (!pGetMenuInfo)) /* Win95/NT4 */ - { - win_skip("Test would crash on Win9x/WinMe/NT4\n"); - DestroyWindow(info.hWnd); - return; - } - info.id = SetTimer(info.hWnd, TIMER_ID, 0, tfunc_crash); - ok(info.id, "SetTimer failed\n"); - Sleep(150); - while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) DispatchMessage(&msg); - - ok(DestroyWindow(info.hWnd), "failed to destroy window\n"); -} - -static int count = 0; -static VOID CALLBACK callback_count( - HWND hwnd, - UINT uMsg, - UINT_PTR idEvent, - DWORD dwTime -) -{ - count++; -} - -static void test_timers_no_wnd(void) -{ - UINT_PTR id, id2; - MSG msg; - - count = 0; - id = SetTimer(NULL, 0, 100, callback_count); - ok(id != 0, "did not get id from SetTimer.\n"); - id2 = SetTimer(NULL, id, 200, callback_count); - ok(id2 == id, "did not get same id from SetTimer when replacing (%li expected %li).\n", id2, id); - Sleep(150); - while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) DispatchMessage(&msg); - ok(count == 0, "did not get zero count as expected (%i).\n", count); - Sleep(150); - while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) DispatchMessage(&msg); - ok(count == 1, "did not get one count as expected (%i).\n", count); - KillTimer(NULL, id); - Sleep(250); - while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) DispatchMessage(&msg); - ok(count == 1, "killing replaced timer did not work (%i).\n", count); -} - -/* Various win events with arbitrary parameters */ -static const struct message WmWinEventsSeq[] = { - { EVENT_SYSTEM_SOUND, winevent_hook|wparam|lparam, OBJID_WINDOW, 0 }, - { EVENT_SYSTEM_ALERT, winevent_hook|wparam|lparam, OBJID_SYSMENU, 1 }, - { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, OBJID_TITLEBAR, 2 }, - { EVENT_SYSTEM_MENUSTART, winevent_hook|wparam|lparam, OBJID_MENU, 3 }, - { EVENT_SYSTEM_MENUEND, winevent_hook|wparam|lparam, OBJID_CLIENT, 4 }, - { EVENT_SYSTEM_MENUPOPUPSTART, winevent_hook|wparam|lparam, OBJID_VSCROLL, 5 }, - { EVENT_SYSTEM_MENUPOPUPEND, winevent_hook|wparam|lparam, OBJID_HSCROLL, 6 }, - { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, OBJID_SIZEGRIP, 7 }, - { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, OBJID_CARET, 8 }, - /* our win event hook ignores OBJID_CURSOR events */ - /*{ EVENT_SYSTEM_MOVESIZESTART, winevent_hook|wparam|lparam, OBJID_CURSOR, 9 },*/ - { EVENT_SYSTEM_MOVESIZEEND, winevent_hook|wparam|lparam, OBJID_ALERT, 10 }, - { EVENT_SYSTEM_CONTEXTHELPSTART, winevent_hook|wparam|lparam, OBJID_SOUND, 11 }, - { EVENT_SYSTEM_CONTEXTHELPEND, winevent_hook|wparam|lparam, OBJID_QUERYCLASSNAMEIDX, 12 }, - { EVENT_SYSTEM_DRAGDROPSTART, winevent_hook|wparam|lparam, OBJID_NATIVEOM, 13 }, - { EVENT_SYSTEM_DRAGDROPEND, winevent_hook|wparam|lparam, OBJID_WINDOW, 0 }, - { EVENT_SYSTEM_DIALOGSTART, winevent_hook|wparam|lparam, OBJID_SYSMENU, 1 }, - { EVENT_SYSTEM_DIALOGEND, winevent_hook|wparam|lparam, OBJID_TITLEBAR, 2 }, - { EVENT_SYSTEM_SCROLLINGSTART, winevent_hook|wparam|lparam, OBJID_MENU, 3 }, - { EVENT_SYSTEM_SCROLLINGEND, winevent_hook|wparam|lparam, OBJID_CLIENT, 4 }, - { EVENT_SYSTEM_SWITCHSTART, winevent_hook|wparam|lparam, OBJID_VSCROLL, 5 }, - { EVENT_SYSTEM_SWITCHEND, winevent_hook|wparam|lparam, OBJID_HSCROLL, 6 }, - { EVENT_SYSTEM_MINIMIZESTART, winevent_hook|wparam|lparam, OBJID_SIZEGRIP, 7 }, - { EVENT_SYSTEM_MINIMIZEEND, winevent_hook|wparam|lparam, OBJID_CARET, 8 }, - { 0 } -}; -static const struct message WmWinEventCaretSeq[] = { - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, /* hook 1 */ - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, /* hook 1 */ - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, /* hook 2 */ - { EVENT_OBJECT_NAMECHANGE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, /* hook 1 */ - { 0 } -}; -static const struct message WmWinEventCaretSeq_2[] = { - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, /* hook 1/2 */ - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, /* hook 1/2 */ - { EVENT_OBJECT_NAMECHANGE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, /* hook 1/2 */ - { 0 } -}; -static const struct message WmWinEventAlertSeq[] = { - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, OBJID_ALERT, 0 }, - { 0 } -}; -static const struct message WmWinEventAlertSeq_2[] = { - /* create window in the thread proc */ - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, OBJID_WINDOW, 2 }, - /* our test event */ - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, OBJID_ALERT, 2 }, - { 0 } -}; -static const struct message WmGlobalHookSeq_1[] = { - /* create window in the thread proc */ - { HCBT_CREATEWND, hook|lparam, 0, 2 }, - /* our test events */ - { HCBT_SYSCOMMAND, hook|wparam|lparam, SC_PREVWINDOW, 2 }, - { HCBT_SYSCOMMAND, hook|wparam|lparam, SC_NEXTWINDOW, 2 }, - { 0 } -}; -static const struct message WmGlobalHookSeq_2[] = { - { HCBT_SYSCOMMAND, hook|wparam|lparam, SC_NEXTWINDOW, 0 }, /* old local hook */ - { HCBT_SYSCOMMAND, hook|wparam|lparam, SC_NEXTWINDOW, 2 }, /* new global hook */ - { HCBT_SYSCOMMAND, hook|wparam|lparam, SC_PREVWINDOW, 0 }, /* old local hook */ - { HCBT_SYSCOMMAND, hook|wparam|lparam, SC_PREVWINDOW, 2 }, /* new global hook */ - { 0 } -}; - -static const struct message WmMouseLLHookSeq[] = { - { WM_MOUSEMOVE, hook }, - { WM_LBUTTONUP, hook }, - { WM_MOUSEMOVE, hook }, - { 0 } -}; - -static void CALLBACK win_event_global_hook_proc(HWINEVENTHOOK hevent, - DWORD event, - HWND hwnd, - LONG object_id, - LONG child_id, - DWORD thread_id, - DWORD event_time) -{ - char buf[256]; - - if (GetClassNameA(hwnd, buf, sizeof(buf))) - { - if (!lstrcmpiA(buf, "TestWindowClass") || - !lstrcmpiA(buf, "static")) - { - struct recvd_message msg; - - msg.hwnd = hwnd; - msg.message = event; - msg.flags = winevent_hook|wparam|lparam; - msg.wParam = object_id; - msg.lParam = (thread_id == GetCurrentThreadId()) ? child_id : (child_id + 2); - msg.descr = "WEH_2"; - add_message(&msg); - } - } -} - -static HHOOK hCBT_global_hook; -static DWORD cbt_global_hook_thread_id; - -static LRESULT CALLBACK cbt_global_hook_proc(int nCode, WPARAM wParam, LPARAM lParam) -{ - HWND hwnd; - char buf[256]; - - if (nCode == HCBT_SYSCOMMAND) - { - struct recvd_message msg; - - msg.hwnd = 0; - msg.message = nCode; - msg.flags = hook|wparam|lparam; - msg.wParam = wParam; - msg.lParam = (cbt_global_hook_thread_id == GetCurrentThreadId()) ? 1 : 2; - msg.descr = "CBT_2"; - add_message(&msg); - - return CallNextHookEx(hCBT_global_hook, nCode, wParam, lParam); - } - /* WH_MOUSE_LL hook */ - if (nCode == HC_ACTION) - { - MSLLHOOKSTRUCT *mhll = (MSLLHOOKSTRUCT *)lParam; - - /* we can't test for real mouse events */ - if (mhll->flags & LLMHF_INJECTED) - { - struct recvd_message msg; - - memset (&msg, 0, sizeof (msg)); - msg.message = wParam; - msg.flags = hook; - msg.descr = "CBT_2"; - add_message(&msg); - } - return CallNextHookEx(hCBT_global_hook, nCode, wParam, lParam); - } - - /* Log also SetFocus(0) calls */ - hwnd = wParam ? (HWND)wParam : (HWND)lParam; - - if (GetClassNameA(hwnd, buf, sizeof(buf))) - { - if (!lstrcmpiA(buf, "TestWindowClass") || - !lstrcmpiA(buf, "static")) - { - struct recvd_message msg; - - msg.hwnd = hwnd; - msg.message = nCode; - msg.flags = hook|wparam|lparam; - msg.wParam = wParam; - msg.lParam = (cbt_global_hook_thread_id == GetCurrentThreadId()) ? 1 : 2; - msg.descr = "CBT_2"; - add_message(&msg); - } - } - return CallNextHookEx(hCBT_global_hook, nCode, wParam, lParam); -} - -static DWORD WINAPI win_event_global_thread_proc(void *param) -{ - HWND hwnd; - MSG msg; - HANDLE hevent = *(HANDLE *)param; - - assert(pNotifyWinEvent); - - hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP, 0,0,0,0,0,0,0, NULL); - assert(hwnd); - trace("created thread window %p\n", hwnd); - - *(HWND *)param = hwnd; - - flush_sequence(); - /* this event should be received only by our new hook proc, - * an old one does not expect an event from another thread. - */ - pNotifyWinEvent(EVENT_OBJECT_LOCATIONCHANGE, hwnd, OBJID_ALERT, 0); - SetEvent(hevent); - - while (GetMessage(&msg, 0, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - return 0; -} - -static DWORD WINAPI cbt_global_hook_thread_proc(void *param) -{ - HWND hwnd; - MSG msg; - HANDLE hevent = *(HANDLE *)param; - - flush_sequence(); - /* these events should be received only by our new hook proc, - * an old one does not expect an event from another thread. - */ - - hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP, 0,0,0,0,0,0,0, NULL); - assert(hwnd); - trace("created thread window %p\n", hwnd); - - *(HWND *)param = hwnd; - - /* Windows doesn't like when a thread plays games with the focus, - that leads to all kinds of misbehaviours and failures to activate - a window. So, better keep next lines commented out. - SetFocus(0); - SetFocus(hwnd);*/ - - DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_PREVWINDOW, 0); - DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_NEXTWINDOW, 0); - - SetEvent(hevent); - - while (GetMessage(&msg, 0, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - return 0; -} - -static DWORD WINAPI mouse_ll_global_thread_proc(void *param) -{ - HWND hwnd; - MSG msg; - HANDLE hevent = *(HANDLE *)param; - - hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP, 0,0,0,0,0,0,0, NULL); - assert(hwnd); - trace("created thread window %p\n", hwnd); - - *(HWND *)param = hwnd; - - flush_sequence(); - - /* Windows doesn't like when a thread plays games with the focus, - * that leads to all kinds of misbehaviours and failures to activate - * a window. So, better don't generate a mouse click message below. - */ - mouse_event(MOUSEEVENTF_MOVE, -1, 0, 0, 0); - mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); - mouse_event(MOUSEEVENTF_MOVE, 1, 0, 0, 0); - - SetEvent(hevent); - while (GetMessage(&msg, 0, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - return 0; -} - -static void test_winevents(void) -{ - BOOL ret; - MSG msg; - HWND hwnd, hwnd2; - UINT i; - HANDLE hthread, hevent; - DWORD tid; - HWINEVENTHOOK hhook; - const struct message *events = WmWinEventsSeq; - - hwnd = CreateWindowExA(0, "TestWindowClass", NULL, - WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, 300, 300, 0, - NULL, NULL, 0); - assert(hwnd); - - /****** start of global hook test *************/ - hCBT_global_hook = SetWindowsHookExA(WH_CBT, cbt_global_hook_proc, GetModuleHandleA(0), 0); - if (!hCBT_global_hook) - { - ok(DestroyWindow(hwnd), "failed to destroy window\n"); - skip( "cannot set global hook\n" ); - return; - } - - hevent = CreateEventA(NULL, 0, 0, NULL); - assert(hevent); - hwnd2 = hevent; - - hthread = CreateThread(NULL, 0, cbt_global_hook_thread_proc, &hwnd2, 0, &tid); - ok(hthread != NULL, "CreateThread failed, error %d\n", GetLastError()); - - ok(WaitForSingleObject(hevent, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n"); - - ok_sequence(WmGlobalHookSeq_1, "global hook 1", FALSE); - - flush_sequence(); - /* this one should be received only by old hook proc */ - DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_NEXTWINDOW, 0); - /* this one should be received only by old hook proc */ - DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_PREVWINDOW, 0); - - ok_sequence(WmGlobalHookSeq_2, "global hook 2", FALSE); - - ret = UnhookWindowsHookEx(hCBT_global_hook); - ok( ret, "UnhookWindowsHookEx error %d\n", GetLastError()); - - PostThreadMessageA(tid, WM_QUIT, 0, 0); - ok(WaitForSingleObject(hthread, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n"); - CloseHandle(hthread); - CloseHandle(hevent); - ok(!IsWindow(hwnd2), "window should be destroyed on thread exit\n"); - /****** end of global hook test *************/ - - if (!pSetWinEventHook || !pNotifyWinEvent || !pUnhookWinEvent) - { - ok(DestroyWindow(hwnd), "failed to destroy window\n"); - return; - } - - flush_sequence(); - - if (0) - { - /* this test doesn't pass under Win9x */ - /* win2k ignores events with hwnd == 0 */ - SetLastError(0xdeadbeef); - pNotifyWinEvent(events[0].message, 0, events[0].wParam, events[0].lParam); - ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE || /* Win2k */ - GetLastError() == 0xdeadbeef, /* Win9x */ - "unexpected error %d\n", GetLastError()); - ok_sequence(WmEmptySeq, "empty notify winevents", FALSE); - } - - for (i = 0; i < sizeof(WmWinEventsSeq)/sizeof(WmWinEventsSeq[0]); i++) - pNotifyWinEvent(events[i].message, hwnd, events[i].wParam, events[i].lParam); - - ok_sequence(WmWinEventsSeq, "notify winevents", FALSE); - - /****** start of event filtering test *************/ - hhook = pSetWinEventHook( - EVENT_OBJECT_SHOW, /* 0x8002 */ - EVENT_OBJECT_LOCATIONCHANGE, /* 0x800B */ - GetModuleHandleA(0), win_event_global_hook_proc, - GetCurrentProcessId(), 0, - WINEVENT_INCONTEXT); - ok(hhook != 0, "SetWinEventHook error %d\n", GetLastError()); - - hevent = CreateEventA(NULL, 0, 0, NULL); - assert(hevent); - hwnd2 = hevent; - - hthread = CreateThread(NULL, 0, win_event_global_thread_proc, &hwnd2, 0, &tid); - ok(hthread != NULL, "CreateThread failed, error %d\n", GetLastError()); - - ok(WaitForSingleObject(hevent, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n"); - - ok_sequence(WmWinEventAlertSeq, "alert winevent", FALSE); - - flush_sequence(); - /* this one should be received only by old hook proc */ - pNotifyWinEvent(EVENT_OBJECT_CREATE, hwnd, OBJID_CARET, 0); /* 0x8000 */ - pNotifyWinEvent(EVENT_OBJECT_SHOW, hwnd, OBJID_CARET, 0); /* 0x8002 */ - /* this one should be received only by old hook proc */ - pNotifyWinEvent(EVENT_OBJECT_NAMECHANGE, hwnd, OBJID_CARET, 0); /* 0x800C */ - - ok_sequence(WmWinEventCaretSeq, "caret winevent", FALSE); - - ret = pUnhookWinEvent(hhook); - ok( ret, "UnhookWinEvent error %d\n", GetLastError()); - - PostThreadMessageA(tid, WM_QUIT, 0, 0); - ok(WaitForSingleObject(hthread, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n"); - CloseHandle(hthread); - CloseHandle(hevent); - ok(!IsWindow(hwnd2), "window should be destroyed on thread exit\n"); - /****** end of event filtering test *************/ - - /****** start of out of context event test *************/ - hhook = pSetWinEventHook(EVENT_MIN, EVENT_MAX, 0, - win_event_global_hook_proc, GetCurrentProcessId(), 0, - WINEVENT_OUTOFCONTEXT); - ok(hhook != 0, "SetWinEventHook error %d\n", GetLastError()); - - hevent = CreateEventA(NULL, 0, 0, NULL); - assert(hevent); - hwnd2 = hevent; - - flush_sequence(); - - hthread = CreateThread(NULL, 0, win_event_global_thread_proc, &hwnd2, 0, &tid); - ok(hthread != NULL, "CreateThread failed, error %d\n", GetLastError()); - - ok(WaitForSingleObject(hevent, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n"); - - ok_sequence(WmEmptySeq, "empty notify winevents", FALSE); - /* process pending winevent messages */ - ok(!PeekMessageA(&msg, 0, 0, 0, PM_NOREMOVE), "msg queue should be empty\n"); - ok_sequence(WmWinEventAlertSeq_2, "alert winevent for out of context proc", FALSE); - - flush_sequence(); - /* this one should be received only by old hook proc */ - pNotifyWinEvent(EVENT_OBJECT_CREATE, hwnd, OBJID_CARET, 0); /* 0x8000 */ - pNotifyWinEvent(EVENT_OBJECT_SHOW, hwnd, OBJID_CARET, 0); /* 0x8002 */ - /* this one should be received only by old hook proc */ - pNotifyWinEvent(EVENT_OBJECT_NAMECHANGE, hwnd, OBJID_CARET, 0); /* 0x800C */ - - ok_sequence(WmWinEventCaretSeq_2, "caret winevent for incontext proc", FALSE); - /* process pending winevent messages */ - ok(!PeekMessageA(&msg, 0, 0, 0, PM_NOREMOVE), "msg queue should be empty\n"); - ok_sequence(WmWinEventCaretSeq_2, "caret winevent for out of context proc", FALSE); - - ret = pUnhookWinEvent(hhook); - ok( ret, "UnhookWinEvent error %d\n", GetLastError()); - - PostThreadMessageA(tid, WM_QUIT, 0, 0); - ok(WaitForSingleObject(hthread, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n"); - CloseHandle(hthread); - CloseHandle(hevent); - ok(!IsWindow(hwnd2), "window should be destroyed on thread exit\n"); - /****** end of out of context event test *************/ - - /****** start of MOUSE_LL hook test *************/ - hCBT_global_hook = SetWindowsHookExA(WH_MOUSE_LL, cbt_global_hook_proc, GetModuleHandleA(0), 0); - /* WH_MOUSE_LL is not supported on Win9x platforms */ - if (!hCBT_global_hook) - { - win_skip("Skipping WH_MOUSE_LL test on this platform\n"); - goto skip_mouse_ll_hook_test; - } - - hevent = CreateEventA(NULL, 0, 0, NULL); - assert(hevent); - hwnd2 = hevent; - - hthread = CreateThread(NULL, 0, mouse_ll_global_thread_proc, &hwnd2, 0, &tid); - ok(hthread != NULL, "CreateThread failed, error %d\n", GetLastError()); - - while (WaitForSingleObject(hevent, 100) == WAIT_TIMEOUT) - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg ); - - ok_sequence(WmMouseLLHookSeq, "MOUSE_LL hook other thread", FALSE); - flush_sequence(); - - mouse_event(MOUSEEVENTF_MOVE, -1, 0, 0, 0); - mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); - mouse_event(MOUSEEVENTF_MOVE, 1, 0, 0, 0); - - ok_sequence(WmMouseLLHookSeq, "MOUSE_LL hook same thread", FALSE); - - ret = UnhookWindowsHookEx(hCBT_global_hook); - ok( ret, "UnhookWindowsHookEx error %d\n", GetLastError()); - - PostThreadMessageA(tid, WM_QUIT, 0, 0); - ok(WaitForSingleObject(hthread, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n"); - CloseHandle(hthread); - CloseHandle(hevent); - ok(!IsWindow(hwnd2), "window should be destroyed on thread exit\n"); - /****** end of MOUSE_LL hook test *************/ -skip_mouse_ll_hook_test: - - ok(DestroyWindow(hwnd), "failed to destroy window\n"); -} - -static void test_set_hook(void) -{ - BOOL ret; - HHOOK hhook; - HWINEVENTHOOK hwinevent_hook; - - hhook = SetWindowsHookExA(WH_CBT, cbt_hook_proc, GetModuleHandleA(0), GetCurrentThreadId()); - ok(hhook != 0, "local hook does not require hModule set to 0\n"); - UnhookWindowsHookEx(hhook); - - if (0) - { - /* this test doesn't pass under Win9x: BUG! */ - SetLastError(0xdeadbeef); - hhook = SetWindowsHookExA(WH_CBT, cbt_hook_proc, 0, 0); - ok(!hhook, "global hook requires hModule != 0\n"); - ok(GetLastError() == ERROR_HOOK_NEEDS_HMOD, "unexpected error %d\n", GetLastError()); - } - - SetLastError(0xdeadbeef); - hhook = SetWindowsHookExA(WH_CBT, 0, GetModuleHandleA(0), GetCurrentThreadId()); - ok(!hhook, "SetWinEventHook with invalid proc should fail\n"); - ok(GetLastError() == ERROR_INVALID_FILTER_PROC || /* Win2k */ - GetLastError() == 0xdeadbeef, /* Win9x */ - "unexpected error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ok(!UnhookWindowsHookEx((HHOOK)0xdeadbeef), "UnhookWindowsHookEx succeeded\n"); - ok(GetLastError() == ERROR_INVALID_HOOK_HANDLE || /* Win2k */ - GetLastError() == 0xdeadbeef, /* Win9x */ - "unexpected error %d\n", GetLastError()); - - if (!pSetWinEventHook || !pUnhookWinEvent) return; - - /* even process local incontext hooks require hmodule */ - SetLastError(0xdeadbeef); - hwinevent_hook = pSetWinEventHook(EVENT_MIN, EVENT_MAX, 0, win_event_proc, - GetCurrentProcessId(), 0, WINEVENT_INCONTEXT); - ok(!hwinevent_hook, "WINEVENT_INCONTEXT requires hModule != 0\n"); - ok(GetLastError() == ERROR_HOOK_NEEDS_HMOD || /* Win2k */ - GetLastError() == 0xdeadbeef, /* Win9x */ - "unexpected error %d\n", GetLastError()); - - /* even thread local incontext hooks require hmodule */ - SetLastError(0xdeadbeef); - hwinevent_hook = pSetWinEventHook(EVENT_MIN, EVENT_MAX, 0, win_event_proc, - GetCurrentProcessId(), GetCurrentThreadId(), WINEVENT_INCONTEXT); - ok(!hwinevent_hook, "WINEVENT_INCONTEXT requires hModule != 0\n"); - ok(GetLastError() == ERROR_HOOK_NEEDS_HMOD || /* Win2k */ - GetLastError() == 0xdeadbeef, /* Win9x */ - "unexpected error %d\n", GetLastError()); - - if (0) - { - /* these 3 tests don't pass under Win9x */ - SetLastError(0xdeadbeef); - hwinevent_hook = pSetWinEventHook(1, 0, 0, win_event_proc, - GetCurrentProcessId(), 0, WINEVENT_OUTOFCONTEXT); - ok(!hwinevent_hook, "SetWinEventHook with invalid event range should fail\n"); - ok(GetLastError() == ERROR_INVALID_HOOK_FILTER, "unexpected error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - hwinevent_hook = pSetWinEventHook(-1, 1, 0, win_event_proc, - GetCurrentProcessId(), 0, WINEVENT_OUTOFCONTEXT); - ok(!hwinevent_hook, "SetWinEventHook with invalid event range should fail\n"); - ok(GetLastError() == ERROR_INVALID_HOOK_FILTER, "unexpected error %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - hwinevent_hook = pSetWinEventHook(EVENT_MIN, EVENT_MAX, 0, win_event_proc, - 0, 0xdeadbeef, WINEVENT_OUTOFCONTEXT); - ok(!hwinevent_hook, "SetWinEventHook with invalid tid should fail\n"); - ok(GetLastError() == ERROR_INVALID_THREAD_ID, "unexpected error %d\n", GetLastError()); - } - - SetLastError(0xdeadbeef); - hwinevent_hook = pSetWinEventHook(0, 0, 0, win_event_proc, - GetCurrentProcessId(), 0, WINEVENT_OUTOFCONTEXT); - ok(hwinevent_hook != 0, "SetWinEventHook error %d\n", GetLastError()); - ok(GetLastError() == 0xdeadbeef, "unexpected error %d\n", GetLastError()); - ret = pUnhookWinEvent(hwinevent_hook); - ok( ret, "UnhookWinEvent error %d\n", GetLastError()); - -todo_wine { - /* This call succeeds under win2k SP4, but fails under Wine. - Does win2k test/use passed process id? */ - SetLastError(0xdeadbeef); - hwinevent_hook = pSetWinEventHook(EVENT_MIN, EVENT_MAX, 0, win_event_proc, - 0xdeadbeef, 0, WINEVENT_OUTOFCONTEXT); - ok(hwinevent_hook != 0, "SetWinEventHook error %d\n", GetLastError()); - ok(GetLastError() == 0xdeadbeef, "unexpected error %d\n", GetLastError()); - ret = pUnhookWinEvent(hwinevent_hook); - ok( ret, "UnhookWinEvent error %d\n", GetLastError()); -} - - SetLastError(0xdeadbeef); - ok(!pUnhookWinEvent((HWINEVENTHOOK)0xdeadbeef), "UnhookWinEvent succeeded\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE || /* Win2k */ - GetLastError() == 0xdeadbeef, /* Win9x */ - "unexpected error %d\n", GetLastError()); -} - -static const struct message ScrollWindowPaint1[] = { - { WM_PAINT, sent }, - { WM_ERASEBKGND, sent|beginpaint }, - { WM_GETTEXTLENGTH, sent|optional }, - { WM_PAINT, sent|optional }, - { WM_NCPAINT, sent|beginpaint|optional }, - { WM_GETTEXT, sent|beginpaint|optional }, - { WM_GETTEXT, sent|beginpaint|optional }, - { WM_GETTEXT, sent|beginpaint|optional }, - { WM_GETTEXT, sent|beginpaint|defwinproc|optional }, - { WM_ERASEBKGND, sent|beginpaint|optional }, - { 0 } -}; - -static const struct message ScrollWindowPaint2[] = { - { WM_PAINT, sent }, - { 0 } -}; - -static void test_scrollwindowex(void) -{ - HWND hwnd, hchild; - RECT rect={0,0,130,130}; - - hwnd = CreateWindowExA(0, "TestWindowClass", "Test Scroll", - WS_VISIBLE|WS_OVERLAPPEDWINDOW, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok (hwnd != 0, "Failed to create overlapped window\n"); - hchild = CreateWindowExA(0, "TestWindowClass", "Test child", - WS_VISIBLE|WS_CAPTION|WS_CHILD, - 10, 10, 150, 150, hwnd, 0, 0, NULL); - ok (hchild != 0, "Failed to create child\n"); - UpdateWindow(hwnd); - flush_events(); - flush_sequence(); - - /* scroll without the child window */ - trace("start scroll\n"); - ScrollWindowEx( hwnd, 10, 10, &rect, NULL, NULL, NULL, - SW_ERASE|SW_INVALIDATE); - ok_sequence(WmEmptySeq, "ScrollWindowEx", 0); - trace("end scroll\n"); - flush_sequence(); - flush_events(); - ok_sequence(ScrollWindowPaint1, "ScrollWindowEx", 0); - flush_events(); - flush_sequence(); - - /* Now without the SW_ERASE flag */ - trace("start scroll\n"); - ScrollWindowEx( hwnd, 10, 10, &rect, NULL, NULL, NULL, SW_INVALIDATE); - ok_sequence(WmEmptySeq, "ScrollWindowEx", 0); - trace("end scroll\n"); - flush_sequence(); - flush_events(); - ok_sequence(ScrollWindowPaint2, "ScrollWindowEx", 0); - flush_events(); - flush_sequence(); - - /* now scroll the child window as well */ - trace("start scroll\n"); - ScrollWindowEx( hwnd, 10, 10, &rect, NULL, NULL, NULL, - SW_SCROLLCHILDREN|SW_ERASE|SW_INVALIDATE); - /* wine sends WM_POSCHANGING, WM_POSCHANGED messages */ - /* windows sometimes a WM_MOVE */ - ok_sequence(WmEmptySeq, "ScrollWindowEx", TRUE); - trace("end scroll\n"); - flush_sequence(); - flush_events(); - ok_sequence(ScrollWindowPaint1, "ScrollWindowEx", 0); - flush_events(); - flush_sequence(); - - /* now scroll with ScrollWindow() */ - trace("start scroll with ScrollWindow\n"); - ScrollWindow( hwnd, 5, 5, NULL, NULL); - trace("end scroll\n"); - flush_sequence(); - flush_events(); - ok_sequence(ScrollWindowPaint1, "ScrollWindow", 0); - - ok(DestroyWindow(hchild), "failed to destroy window\n"); - ok(DestroyWindow(hwnd), "failed to destroy window\n"); - flush_sequence(); -} - -static const struct message destroy_window_with_children[] = { - { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, 0, 0 }, /* popup */ - { HCBT_DESTROYWND, hook|lparam, 0, WND_PARENT_ID }, /* parent */ - { 0x0090, sent|optional }, - { HCBT_DESTROYWND, hook|lparam, 0, WND_POPUP_ID }, /* popup */ - { 0x0090, sent|optional }, - { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, 0, 0 }, /* popup */ - { WM_DESTROY, sent|wparam|lparam, 0, WND_POPUP_ID }, /* popup */ - { WM_CAPTURECHANGED, sent|wparam|lparam, 0, WND_POPUP_ID }, /* popup */ - { WM_NCDESTROY, sent|wparam|lparam, 0, WND_POPUP_ID }, /* popup */ - { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, 0, 0 }, /* parent */ - { WM_DESTROY, sent|wparam|lparam, 0, WND_PARENT_ID }, /* parent */ - { WM_DESTROY, sent|wparam|lparam, 0, WND_CHILD_ID + 2 }, /* child2 */ - { WM_DESTROY, sent|wparam|lparam, 0, WND_CHILD_ID + 1 }, /* child1 */ - { WM_DESTROY, sent|wparam|lparam, 0, WND_CHILD_ID + 3 }, /* child3 */ - { WM_NCDESTROY, sent|wparam|lparam, 0, WND_CHILD_ID + 2 }, /* child2 */ - { WM_NCDESTROY, sent|wparam|lparam, 0, WND_CHILD_ID + 3 }, /* child3 */ - { WM_NCDESTROY, sent|wparam|lparam, 0, WND_CHILD_ID + 1 }, /* child1 */ - { WM_NCDESTROY, sent|wparam|lparam, 0, WND_PARENT_ID }, /* parent */ - { 0 } -}; - -static void test_DestroyWindow(void) -{ - BOOL ret; - HWND parent, child1, child2, child3, child4, test; - UINT_PTR child_id = WND_CHILD_ID + 1; - - parent = CreateWindowExA(0, "TestWindowClass", NULL, WS_OVERLAPPEDWINDOW, - 100, 100, 200, 200, 0, 0, 0, NULL); - assert(parent != 0); - child1 = CreateWindowExA(0, "TestWindowClass", NULL, WS_CHILD, - 0, 0, 50, 50, parent, (HMENU)child_id++, 0, NULL); - assert(child1 != 0); - child2 = CreateWindowExA(0, "TestWindowClass", NULL, WS_CHILD, - 0, 0, 50, 50, GetDesktopWindow(), (HMENU)child_id++, 0, NULL); - assert(child2 != 0); - child3 = CreateWindowExA(0, "TestWindowClass", NULL, WS_CHILD, - 0, 0, 50, 50, child1, (HMENU)child_id++, 0, NULL); - assert(child3 != 0); - child4 = CreateWindowExA(0, "TestWindowClass", NULL, WS_POPUP, - 0, 0, 50, 50, parent, 0, 0, NULL); - assert(child4 != 0); - - /* test owner/parent of child2 */ - test = GetParent(child2); - ok(test == GetDesktopWindow(), "wrong parent %p\n", test); - ok(!IsChild(parent, child2), "wrong parent/child %p/%p\n", parent, child2); - if(pGetAncestor) { - test = pGetAncestor(child2, GA_PARENT); - ok(test == GetDesktopWindow(), "wrong parent %p\n", test); - } - test = GetWindow(child2, GW_OWNER); - ok(!test, "wrong owner %p\n", test); - - test = SetParent(child2, parent); - ok(test == GetDesktopWindow(), "wrong old parent %p\n", test); - - /* test owner/parent of the parent */ - test = GetParent(parent); - ok(!test, "wrong parent %p\n", test); - ok(!IsChild(GetDesktopWindow(), parent), "wrong parent/child %p/%p\n", GetDesktopWindow(), parent); - if(pGetAncestor) { - test = pGetAncestor(parent, GA_PARENT); - ok(test == GetDesktopWindow(), "wrong parent %p\n", test); - } - test = GetWindow(parent, GW_OWNER); - ok(!test, "wrong owner %p\n", test); - - /* test owner/parent of child1 */ - test = GetParent(child1); - ok(test == parent, "wrong parent %p\n", test); - ok(IsChild(parent, child1), "wrong parent/child %p/%p\n", parent, child1); - if(pGetAncestor) { - test = pGetAncestor(child1, GA_PARENT); - ok(test == parent, "wrong parent %p\n", test); - } - test = GetWindow(child1, GW_OWNER); - ok(!test, "wrong owner %p\n", test); - - /* test owner/parent of child2 */ - test = GetParent(child2); - ok(test == parent, "wrong parent %p\n", test); - ok(IsChild(parent, child2), "wrong parent/child %p/%p\n", parent, child2); - if(pGetAncestor) { - test = pGetAncestor(child2, GA_PARENT); - ok(test == parent, "wrong parent %p\n", test); - } - test = GetWindow(child2, GW_OWNER); - ok(!test, "wrong owner %p\n", test); - - /* test owner/parent of child3 */ - test = GetParent(child3); - ok(test == child1, "wrong parent %p\n", test); - ok(IsChild(parent, child3), "wrong parent/child %p/%p\n", parent, child3); - if(pGetAncestor) { - test = pGetAncestor(child3, GA_PARENT); - ok(test == child1, "wrong parent %p\n", test); - } - test = GetWindow(child3, GW_OWNER); - ok(!test, "wrong owner %p\n", test); - - /* test owner/parent of child4 */ - test = GetParent(child4); - ok(test == parent, "wrong parent %p\n", test); - ok(!IsChild(parent, child4), "wrong parent/child %p/%p\n", parent, child4); - if(pGetAncestor) { - test = pGetAncestor(child4, GA_PARENT); - ok(test == GetDesktopWindow(), "wrong parent %p\n", test); - } - test = GetWindow(child4, GW_OWNER); - ok(test == parent, "wrong owner %p\n", test); - - flush_sequence(); - - trace("parent %p, child1 %p, child2 %p, child3 %p, child4 %p\n", - parent, child1, child2, child3, child4); - - SetCapture(child4); - test = GetCapture(); - ok(test == child4, "wrong capture window %p\n", test); - - test_DestroyWindow_flag = TRUE; - ret = DestroyWindow(parent); - ok( ret, "DestroyWindow() error %d\n", GetLastError()); - test_DestroyWindow_flag = FALSE; - ok_sequence(destroy_window_with_children, "destroy window with children", 0); - - ok(!IsWindow(parent), "parent still exists\n"); - ok(!IsWindow(child1), "child1 still exists\n"); - ok(!IsWindow(child2), "child2 still exists\n"); - ok(!IsWindow(child3), "child3 still exists\n"); - ok(!IsWindow(child4), "child4 still exists\n"); - - test = GetCapture(); - ok(!test, "wrong capture window %p\n", test); -} - - -static const struct message WmDispatchPaint[] = { - { WM_NCPAINT, sent }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent }, - { 0 } -}; - -static LRESULT WINAPI DispatchMessageCheckProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - if (message == WM_PAINT) return 0; - return MsgCheckProcA( hwnd, message, wParam, lParam ); -} - -static void test_DispatchMessage(void) -{ - RECT rect; - MSG msg; - int count; - HWND hwnd = CreateWindowA( "TestWindowClass", NULL, WS_OVERLAPPEDWINDOW, - 100, 100, 200, 200, 0, 0, 0, NULL); - ShowWindow( hwnd, SW_SHOW ); - UpdateWindow( hwnd ); - flush_events(); - flush_sequence(); - SetWindowLongPtrA( hwnd, GWLP_WNDPROC, (LONG_PTR)DispatchMessageCheckProc ); - - SetRect( &rect, -5, -5, 5, 5 ); - RedrawWindow( hwnd, &rect, 0, RDW_INVALIDATE|RDW_ERASE|RDW_FRAME ); - count = 0; - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) - { - if (msg.message != WM_PAINT) DispatchMessage( &msg ); - else - { - flush_sequence(); - DispatchMessage( &msg ); - /* DispatchMessage will send WM_NCPAINT if non client area is still invalid after WM_PAINT */ - if (!count) ok_sequence( WmDispatchPaint, "WmDispatchPaint", FALSE ); - else ok_sequence( WmEmptySeq, "WmEmpty", FALSE ); - if (++count > 10) break; - } - } - ok( msg.message == WM_PAINT && count > 10, "WM_PAINT messages stopped\n" ); - - trace("now without DispatchMessage\n"); - flush_sequence(); - RedrawWindow( hwnd, &rect, 0, RDW_INVALIDATE|RDW_ERASE|RDW_FRAME ); - count = 0; - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) - { - if (msg.message != WM_PAINT) DispatchMessage( &msg ); - else - { - HRGN hrgn = CreateRectRgn( 0, 0, 0, 0 ); - flush_sequence(); - /* this will send WM_NCCPAINT just like DispatchMessage does */ - GetUpdateRgn( hwnd, hrgn, TRUE ); - ok_sequence( WmDispatchPaint, "WmDispatchPaint", FALSE ); - DeleteObject( hrgn ); - GetClientRect( hwnd, &rect ); - ValidateRect( hwnd, &rect ); /* this will stop WM_PAINTs */ - ok( !count, "Got multiple WM_PAINTs\n" ); - if (++count > 10) break; - } - } - DestroyWindow(hwnd); -} - - -static const struct message WmUser[] = { - { WM_USER, sent }, - { 0 } -}; - -struct sendmsg_info -{ - HWND hwnd; - DWORD timeout; - DWORD ret; -}; - -static DWORD CALLBACK send_msg_thread( LPVOID arg ) -{ - struct sendmsg_info *info = arg; - SetLastError( 0xdeadbeef ); - info->ret = SendMessageTimeoutA( info->hwnd, WM_USER, 0, 0, 0, info->timeout, NULL ); - if (!info->ret) ok( GetLastError() == ERROR_TIMEOUT || - broken(GetLastError() == 0), /* win9x */ - "unexpected error %d\n", GetLastError()); - return 0; -} - -static void wait_for_thread( HANDLE thread ) -{ - while (MsgWaitForMultipleObjects(1, &thread, FALSE, INFINITE, QS_SENDMESSAGE) != WAIT_OBJECT_0) - { - MSG msg; - while (PeekMessageA( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage(&msg); - } -} - -static LRESULT WINAPI send_msg_delay_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - if (message == WM_USER) Sleep(200); - return MsgCheckProcA( hwnd, message, wParam, lParam ); -} - -static void test_SendMessageTimeout(void) -{ - HANDLE thread; - struct sendmsg_info info; - DWORD tid; - BOOL is_win9x; - - info.hwnd = CreateWindowA( "TestWindowClass", NULL, WS_OVERLAPPEDWINDOW, - 100, 100, 200, 200, 0, 0, 0, NULL); - flush_events(); - flush_sequence(); - - info.timeout = 1000; - info.ret = 0xdeadbeef; - thread = CreateThread( NULL, 0, send_msg_thread, &info, 0, &tid ); - wait_for_thread( thread ); - CloseHandle( thread ); - ok( info.ret == 1, "SendMessageTimeout failed\n" ); - ok_sequence( WmUser, "WmUser", FALSE ); - - info.timeout = 1; - info.ret = 0xdeadbeef; - thread = CreateThread( NULL, 0, send_msg_thread, &info, 0, &tid ); - Sleep(100); /* SendMessageTimeout should time out here */ - wait_for_thread( thread ); - CloseHandle( thread ); - ok( info.ret == 0, "SendMessageTimeout succeeded\n" ); - ok_sequence( WmEmptySeq, "WmEmptySeq", FALSE ); - - /* 0 means infinite timeout (but not on win9x) */ - info.timeout = 0; - info.ret = 0xdeadbeef; - thread = CreateThread( NULL, 0, send_msg_thread, &info, 0, &tid ); - Sleep(100); - wait_for_thread( thread ); - CloseHandle( thread ); - is_win9x = !info.ret; - if (is_win9x) ok_sequence( WmEmptySeq, "WmEmptySeq", FALSE ); - else ok_sequence( WmUser, "WmUser", FALSE ); - - /* timeout is treated as signed despite the prototype (but not on win9x) */ - info.timeout = 0x7fffffff; - info.ret = 0xdeadbeef; - thread = CreateThread( NULL, 0, send_msg_thread, &info, 0, &tid ); - Sleep(100); - wait_for_thread( thread ); - CloseHandle( thread ); - ok( info.ret == 1, "SendMessageTimeout failed\n" ); - ok_sequence( WmUser, "WmUser", FALSE ); - - info.timeout = 0x80000000; - info.ret = 0xdeadbeef; - thread = CreateThread( NULL, 0, send_msg_thread, &info, 0, &tid ); - Sleep(100); - wait_for_thread( thread ); - CloseHandle( thread ); - if (is_win9x) - { - ok( info.ret == 1, "SendMessageTimeout failed\n" ); - ok_sequence( WmUser, "WmUser", FALSE ); - } - else - { - ok( info.ret == 0, "SendMessageTimeout succeeded\n" ); - ok_sequence( WmEmptySeq, "WmEmptySeq", FALSE ); - } - - /* now check for timeout during message processing */ - SetWindowLongPtrA( info.hwnd, GWLP_WNDPROC, (LONG_PTR)send_msg_delay_proc ); - info.timeout = 100; - info.ret = 0xdeadbeef; - thread = CreateThread( NULL, 0, send_msg_thread, &info, 0, &tid ); - wait_for_thread( thread ); - CloseHandle( thread ); - /* we should time out but still get the message */ - ok( info.ret == 0, "SendMessageTimeout failed\n" ); - ok_sequence( WmUser, "WmUser", FALSE ); - - DestroyWindow( info.hwnd ); -} - - -/****************** edit message test *************************/ -#define ID_EDIT 0x1234 -static const struct message sl_edit_setfocus[] = -{ - { HCBT_SETFOCUS, hook }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|wparam, 0 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 10 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 15 }, - { WM_CTLCOLOREDIT, sent|parent }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 11 }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { WM_COMMAND, sent|parent|wparam, MAKEWPARAM(ID_EDIT, EN_SETFOCUS) }, - { 0 } -}; -static const struct message ml_edit_setfocus[] = -{ - { HCBT_SETFOCUS, hook }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|wparam, 0 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 10 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 11 }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { WM_COMMAND, sent|parent|wparam, MAKEWPARAM(ID_EDIT, EN_SETFOCUS) }, - { 0 } -}; -static const struct message sl_edit_killfocus[] = -{ - { HCBT_SETFOCUS, hook }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_KILLFOCUS, sent|wparam, 0 }, - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { WM_COMMAND, sent|parent|wparam, MAKEWPARAM(ID_EDIT, EN_KILLFOCUS) }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 1 }, - { 0 } -}; -static const struct message sl_edit_lbutton_dblclk[] = -{ - { WM_LBUTTONDBLCLK, sent }, - { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, 0, 0 }, - { 0 } -}; -static const struct message sl_edit_lbutton_down[] = -{ - { WM_LBUTTONDOWN, sent|wparam|lparam, 0, 0 }, - { HCBT_SETFOCUS, hook }, - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 10 }, - { WM_CTLCOLOREDIT, sent|parent }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 11 }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { WM_COMMAND, sent|parent|wparam, MAKEWPARAM(ID_EDIT, EN_SETFOCUS) }, - { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, 0, 0 }, - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { WM_CTLCOLOREDIT, sent|parent|optional }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 11 }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { 0 } -}; -static const struct message ml_edit_lbutton_down[] = -{ - { WM_LBUTTONDOWN, sent|wparam|lparam, 0, 0 }, - { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, 0, 0 }, - { HCBT_SETFOCUS, hook }, - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 10 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 11 }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { WM_COMMAND, sent|parent|wparam, MAKEWPARAM(ID_EDIT, EN_SETFOCUS) }, - { 0 } -}; -static const struct message sl_edit_lbutton_up[] = -{ - { WM_LBUTTONUP, sent|wparam|lparam, 0, 0 }, - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0 }, - { WM_CAPTURECHANGED, sent|defwinproc }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { 0 } -}; -static const struct message ml_edit_lbutton_up[] = -{ - { WM_LBUTTONUP, sent|wparam|lparam, 0, 0 }, - { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0 }, - { WM_CAPTURECHANGED, sent|defwinproc }, - { 0 } -}; - -static WNDPROC old_edit_proc; - -static LRESULT CALLBACK edit_hook_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - static LONG defwndproc_counter = 0; - LRESULT ret; - struct recvd_message msg; - - if (ignore_message( message )) return 0; - - msg.hwnd = hwnd; - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wParam; - msg.lParam = lParam; - msg.descr = "edit"; - add_message(&msg); - - defwndproc_counter++; - ret = CallWindowProcA(old_edit_proc, hwnd, message, wParam, lParam); - defwndproc_counter--; - - return ret; -} - -static void subclass_edit(void) -{ - WNDCLASSA cls; - - if (!GetClassInfoA(0, "edit", &cls)) assert(0); - - old_edit_proc = cls.lpfnWndProc; - - cls.hInstance = GetModuleHandle(0); - cls.lpfnWndProc = edit_hook_proc; - cls.lpszClassName = "my_edit_class"; - UnregisterClass(cls.lpszClassName, cls.hInstance); - if (!RegisterClassA(&cls)) assert(0); -} - -static void test_edit_messages(void) -{ - HWND hwnd, parent; - DWORD dlg_code; - - subclass_edit(); - log_all_parent_messages++; - - parent = CreateWindowExA(0, "TestParentClass", "Test parent", WS_OVERLAPPEDWINDOW | WS_VISIBLE, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok (parent != 0, "Failed to create parent window\n"); - - /* test single line edit */ - hwnd = CreateWindowExA(0, "my_edit_class", "test", WS_CHILD, - 0, 0, 80, 20, parent, (HMENU)ID_EDIT, 0, NULL); - ok(hwnd != 0, "Failed to create edit window\n"); - - dlg_code = SendMessageA(hwnd, WM_GETDLGCODE, 0, 0); - ok(dlg_code == (DLGC_WANTCHARS|DLGC_HASSETSEL|DLGC_WANTARROWS), "wrong dlg_code %08x\n", dlg_code); - - ShowWindow(hwnd, SW_SHOW); - UpdateWindow(hwnd); - SetFocus(0); - flush_sequence(); - - SetFocus(hwnd); - ok_sequence(sl_edit_setfocus, "SetFocus(hwnd) on an edit", FALSE); - - SetFocus(0); - ok_sequence(sl_edit_killfocus, "SetFocus(0) on an edit", FALSE); - - SetFocus(0); - ReleaseCapture(); - flush_sequence(); - - SendMessageA(hwnd, WM_LBUTTONDBLCLK, 0, 0); - ok_sequence(sl_edit_lbutton_dblclk, "WM_LBUTTONDBLCLK on an edit", FALSE); - - SetFocus(0); - ReleaseCapture(); - flush_sequence(); - - SendMessageA(hwnd, WM_LBUTTONDOWN, 0, 0); - ok_sequence(sl_edit_lbutton_down, "WM_LBUTTONDOWN on an edit", FALSE); - - SendMessageA(hwnd, WM_LBUTTONUP, 0, 0); - ok_sequence(sl_edit_lbutton_up, "WM_LBUTTONUP on an edit", FALSE); - - DestroyWindow(hwnd); - - /* test multiline edit */ - hwnd = CreateWindowExA(0, "my_edit_class", "test", WS_CHILD | ES_MULTILINE, - 0, 0, 80, 20, parent, (HMENU)ID_EDIT, 0, NULL); - ok(hwnd != 0, "Failed to create edit window\n"); - - dlg_code = SendMessageA(hwnd, WM_GETDLGCODE, 0, 0); - ok(dlg_code == (DLGC_WANTCHARS|DLGC_HASSETSEL|DLGC_WANTARROWS|DLGC_WANTALLKEYS), - "wrong dlg_code %08x\n", dlg_code); - - ShowWindow(hwnd, SW_SHOW); - UpdateWindow(hwnd); - SetFocus(0); - flush_sequence(); - - SetFocus(hwnd); - ok_sequence(ml_edit_setfocus, "SetFocus(hwnd) on multiline edit", FALSE); - - SetFocus(0); - ok_sequence(sl_edit_killfocus, "SetFocus(0) on multiline edit", FALSE); - - SetFocus(0); - ReleaseCapture(); - flush_sequence(); - - SendMessageA(hwnd, WM_LBUTTONDBLCLK, 0, 0); - ok_sequence(sl_edit_lbutton_dblclk, "WM_LBUTTONDBLCLK on multiline edit", FALSE); - - SetFocus(0); - ReleaseCapture(); - flush_sequence(); - - SendMessageA(hwnd, WM_LBUTTONDOWN, 0, 0); - ok_sequence(ml_edit_lbutton_down, "WM_LBUTTONDOWN on multiline edit", FALSE); - - SendMessageA(hwnd, WM_LBUTTONUP, 0, 0); - ok_sequence(ml_edit_lbutton_up, "WM_LBUTTONUP on multiline edit", FALSE); - - DestroyWindow(hwnd); - DestroyWindow(parent); - - log_all_parent_messages--; -} - -/**************************** End of Edit test ******************************/ - -static const struct message WmKeyDownSkippedSeq[] = -{ - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'N', 1 }, /* XP */ - { 0 } -}; -static const struct message WmKeyDownWasDownSkippedSeq[] = -{ - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'N', 0x40000001 }, /* XP */ - { 0 } -}; -static const struct message WmKeyUpSkippedSeq[] = -{ - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'N', 0xc0000001 }, /* XP */ - { 0 } -}; -static const struct message WmUserKeyUpSkippedSeq[] = -{ - { WM_USER, sent }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'N', 0xc0000001 }, /* XP */ - { 0 } -}; - -#define EV_STOP 0 -#define EV_SENDMSG 1 -#define EV_ACK 2 - -struct peekmsg_info -{ - HWND hwnd; - HANDLE hevent[3]; /* 0 - start/stop, 1 - SendMessage, 2 - ack */ -}; - -static DWORD CALLBACK send_msg_thread_2(void *param) -{ - DWORD ret; - struct peekmsg_info *info = param; - - trace("thread: looping\n"); - SetEvent(info->hevent[EV_ACK]); - - while (1) - { - ret = WaitForMultipleObjects(2, info->hevent, FALSE, INFINITE); - - switch (ret) - { - case WAIT_OBJECT_0 + EV_STOP: - trace("thread: exiting\n"); - return 0; - - case WAIT_OBJECT_0 + EV_SENDMSG: - trace("thread: sending message\n"); - ok( SendNotifyMessageA(info->hwnd, WM_USER, 0, 0), - "SendNotifyMessageA failed error %u\n", GetLastError()); - SetEvent(info->hevent[EV_ACK]); - break; - - default: - trace("unexpected return: %04x\n", ret); - assert(0); - break; - } - } - return 0; -} - -static void test_PeekMessage(void) -{ - MSG msg; - HANDLE hthread; - DWORD tid, qstatus; - UINT qs_all_input = QS_ALLINPUT; - UINT qs_input = QS_INPUT; - BOOL ret; - struct peekmsg_info info; - - info.hwnd = CreateWindowA("TestWindowClass", NULL, WS_OVERLAPPEDWINDOW, - 100, 100, 200, 200, 0, 0, 0, NULL); - assert(info.hwnd); - ShowWindow(info.hwnd, SW_SHOW); - UpdateWindow(info.hwnd); - SetFocus(info.hwnd); - - info.hevent[EV_STOP] = CreateEventA(NULL, 0, 0, NULL); - info.hevent[EV_SENDMSG] = CreateEventA(NULL, 0, 0, NULL); - info.hevent[EV_ACK] = CreateEventA(NULL, 0, 0, NULL); - - hthread = CreateThread(NULL, 0, send_msg_thread_2, &info, 0, &tid); - WaitForSingleObject(info.hevent[EV_ACK], 10000); - - flush_events(); - flush_sequence(); - - SetLastError(0xdeadbeef); - qstatus = GetQueueStatus(qs_all_input); - if (GetLastError() == ERROR_INVALID_FLAGS) - { - trace("QS_RAWINPUT not supported on this platform\n"); - qs_all_input &= ~QS_RAWINPUT; - qs_input &= ~QS_RAWINPUT; - } - if (qstatus & QS_POSTMESSAGE) - { - while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) /* nothing */ ; - qstatus = GetQueueStatus(qs_all_input); - } - ok(qstatus == 0, "wrong qstatus %08x\n", qstatus); - - trace("signalling to send message\n"); - SetEvent(info.hevent[EV_SENDMSG]); - WaitForSingleObject(info.hevent[EV_ACK], INFINITE); - - /* pass invalid QS_xxxx flags */ - SetLastError(0xdeadbeef); - qstatus = GetQueueStatus(0xffffffff); - ok(qstatus == 0 || broken(qstatus) /* win9x */, "GetQueueStatus should fail: %08x\n", qstatus); - if (!qstatus) - { - ok(GetLastError() == ERROR_INVALID_FLAGS, "wrong error %d\n", GetLastError()); - qstatus = GetQueueStatus(qs_all_input); - } - qstatus &= ~MAKELONG( 0x4000, 0x4000 ); /* sometimes set on Win95 */ - ok(qstatus == MAKELONG(QS_SENDMESSAGE, QS_SENDMESSAGE), - "wrong qstatus %08x\n", qstatus); - - msg.message = 0; - ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE); - ok(!ret, - "PeekMessageA should have returned FALSE instead of msg %04x\n", - msg.message); - ok_sequence(WmUser, "WmUser", FALSE); - - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == 0, "wrong qstatus %08x\n", qstatus); - - keybd_event('N', 0, 0, 0); - keybd_event('N', 0, KEYEVENTF_KEYUP, 0); - qstatus = GetQueueStatus(qs_all_input); - if (!(qstatus & MAKELONG(QS_KEY, QS_KEY))) - { - skip( "queuing key events not supported\n" ); - goto done; - } - ok(qstatus == MAKELONG(QS_KEY, QS_KEY) || - /* keybd_event seems to trigger a sent message on NT4 */ - qstatus == MAKELONG(QS_KEY|QS_SENDMESSAGE, QS_KEY|QS_SENDMESSAGE), - "wrong qstatus %08x\n", qstatus); - - PostMessageA(info.hwnd, WM_CHAR, 'z', 0); - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE|QS_KEY) || - qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE|QS_KEY|QS_SENDMESSAGE), - "wrong qstatus %08x\n", qstatus); - - InvalidateRect(info.hwnd, NULL, FALSE); - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(QS_PAINT, QS_PAINT|QS_POSTMESSAGE|QS_KEY) || - qstatus == MAKELONG(QS_PAINT, QS_PAINT|QS_POSTMESSAGE|QS_KEY|QS_SENDMESSAGE), - "wrong qstatus %08x\n", qstatus); - - trace("signalling to send message\n"); - SetEvent(info.hevent[EV_SENDMSG]); - WaitForSingleObject(info.hevent[EV_ACK], INFINITE); - - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(QS_SENDMESSAGE, QS_SENDMESSAGE|QS_PAINT|QS_POSTMESSAGE|QS_KEY), - "wrong qstatus %08x\n", qstatus); - - msg.message = 0; - ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | (qs_input << 16)); - if (ret && msg.message == WM_CHAR) - { - win_skip( "PM_QS_* flags not supported in PeekMessage\n" ); - goto done; - } - ok(!ret, - "PeekMessageA should have returned FALSE instead of msg %04x\n", - msg.message); - if (!sequence_cnt) /* nt4 doesn't fetch anything with PM_QS_* flags */ - { - win_skip( "PM_QS_* flags not supported in PeekMessage\n" ); - goto done; - } - ok_sequence(WmUser, "WmUser", FALSE); - - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(0, QS_PAINT|QS_POSTMESSAGE|QS_KEY), - "wrong qstatus %08x\n", qstatus); - - trace("signalling to send message\n"); - SetEvent(info.hevent[EV_SENDMSG]); - WaitForSingleObject(info.hevent[EV_ACK], INFINITE); - - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(QS_SENDMESSAGE, QS_SENDMESSAGE|QS_PAINT|QS_POSTMESSAGE|QS_KEY), - "wrong qstatus %08x\n", qstatus); - - msg.message = 0; - ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | PM_QS_POSTMESSAGE ); - ok(!ret, - "PeekMessageA should have returned FALSE instead of msg %04x\n", - msg.message); - ok_sequence(WmUser, "WmUser", FALSE); - - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(0, QS_PAINT|QS_POSTMESSAGE|QS_KEY), - "wrong qstatus %08x\n", qstatus); - - msg.message = 0; - ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | PM_QS_POSTMESSAGE); - ok(ret && msg.message == WM_CHAR && msg.wParam == 'z', - "got %d and %04x wParam %08lx instead of TRUE and WM_CHAR wParam 'z'\n", - ret, msg.message, msg.wParam); - ok_sequence(WmEmptySeq, "WmEmptySeq", FALSE); - - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(0, QS_PAINT|QS_KEY), - "wrong qstatus %08x\n", qstatus); - - msg.message = 0; - ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | PM_QS_POSTMESSAGE); - ok(!ret, - "PeekMessageA should have returned FALSE instead of msg %04x\n", - msg.message); - ok_sequence(WmEmptySeq, "WmEmptySeq", FALSE); - - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(0, QS_PAINT|QS_KEY), - "wrong qstatus %08x\n", qstatus); - - msg.message = 0; - ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | PM_QS_PAINT); - ok(ret && msg.message == WM_PAINT, - "got %d and %04x instead of TRUE and WM_PAINT\n", ret, msg.message); - DispatchMessageA(&msg); - ok_sequence(WmPaint, "WmPaint", FALSE); - - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(0, QS_KEY), - "wrong qstatus %08x\n", qstatus); - - msg.message = 0; - ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | PM_QS_PAINT); - ok(!ret, - "PeekMessageA should have returned FALSE instead of msg %04x\n", - msg.message); - ok_sequence(WmEmptySeq, "WmEmptySeq", FALSE); - - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(0, QS_KEY), - "wrong qstatus %08x\n", qstatus); - - trace("signalling to send message\n"); - SetEvent(info.hevent[EV_SENDMSG]); - WaitForSingleObject(info.hevent[EV_ACK], INFINITE); - - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(QS_SENDMESSAGE, QS_SENDMESSAGE|QS_KEY), - "wrong qstatus %08x\n", qstatus); - - PostMessageA(info.hwnd, WM_CHAR, 'z', 0); - - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(QS_POSTMESSAGE, QS_SENDMESSAGE|QS_POSTMESSAGE|QS_KEY), - "wrong qstatus %08x\n", qstatus); - - msg.message = 0; - ret = PeekMessageA(&msg, 0, WM_CHAR, WM_CHAR, PM_REMOVE); - ok(ret && msg.message == WM_CHAR && msg.wParam == 'z', - "got %d and %04x wParam %08lx instead of TRUE and WM_CHAR wParam 'z'\n", - ret, msg.message, msg.wParam); - ok_sequence(WmUser, "WmUser", FALSE); - - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(0, QS_KEY), - "wrong qstatus %08x\n", qstatus); - - msg.message = 0; - ret = PeekMessageA(&msg, 0, WM_CHAR, WM_CHAR, PM_REMOVE); - ok(!ret, - "PeekMessageA should have returned FALSE instead of msg %04x\n", - msg.message); - ok_sequence(WmEmptySeq, "WmEmptySeq", FALSE); - - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(0, QS_KEY), - "wrong qstatus %08x\n", qstatus); - - PostMessageA(info.hwnd, WM_CHAR, 'z', 0); - - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE|QS_KEY), - "wrong qstatus %08x\n", qstatus); - - trace("signalling to send message\n"); - SetEvent(info.hevent[EV_SENDMSG]); - WaitForSingleObject(info.hevent[EV_ACK], INFINITE); - - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(QS_SENDMESSAGE, QS_SENDMESSAGE|QS_POSTMESSAGE|QS_KEY), - "wrong qstatus %08x\n", qstatus); - - msg.message = 0; - ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | (QS_KEY << 16)); - ok(!ret, - "PeekMessageA should have returned FALSE instead of msg %04x\n", - msg.message); - ok_sequence(WmUser, "WmUser", FALSE); - - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(0, QS_POSTMESSAGE|QS_KEY), - "wrong qstatus %08x\n", qstatus); - - msg.message = 0; - if (qs_all_input & QS_RAWINPUT) /* use QS_RAWINPUT only if supported */ - ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | (QS_RAWINPUT << 16)); - else /* workaround for a missing QS_RAWINPUT support */ - ret = PeekMessageA(&msg, 0, WM_KEYDOWN, WM_KEYDOWN, PM_REMOVE); - ok(ret && msg.message == WM_KEYDOWN && msg.wParam == 'N', - "got %d and %04x wParam %08lx instead of TRUE and WM_KEYDOWN wParam 'N'\n", - ret, msg.message, msg.wParam); - ok_sequence(WmKeyDownSkippedSeq, "WmKeyDownSkippedSeq", FALSE); - - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(0, QS_POSTMESSAGE|QS_KEY), - "wrong qstatus %08x\n", qstatus); - - msg.message = 0; - if (qs_all_input & QS_RAWINPUT) /* use QS_RAWINPUT only if supported */ - ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | (QS_RAWINPUT << 16)); - else /* workaround for a missing QS_RAWINPUT support */ - ret = PeekMessageA(&msg, 0, WM_KEYUP, WM_KEYUP, PM_REMOVE); - ok(ret && msg.message == WM_KEYUP && msg.wParam == 'N', - "got %d and %04x wParam %08lx instead of TRUE and WM_KEYUP wParam 'N'\n", - ret, msg.message, msg.wParam); - ok_sequence(WmKeyUpSkippedSeq, "WmKeyUpSkippedSeq", FALSE); - - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(0, QS_POSTMESSAGE), - "wrong qstatus %08x\n", qstatus); - - msg.message = 0; - ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | PM_QS_SENDMESSAGE); - ok(!ret, - "PeekMessageA should have returned FALSE instead of msg %04x\n", - msg.message); - ok_sequence(WmEmptySeq, "WmEmptySeq", FALSE); - - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(0, QS_POSTMESSAGE), - "wrong qstatus %08x\n", qstatus); - - msg.message = 0; - ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE); - ok(ret && msg.message == WM_CHAR && msg.wParam == 'z', - "got %d and %04x wParam %08lx instead of TRUE and WM_CHAR wParam 'z'\n", - ret, msg.message, msg.wParam); - ok_sequence(WmEmptySeq, "WmEmptySeq", FALSE); - - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == 0, - "wrong qstatus %08x\n", qstatus); - - msg.message = 0; - ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE); - ok(!ret, - "PeekMessageA should have returned FALSE instead of msg %04x\n", - msg.message); - ok_sequence(WmEmptySeq, "WmEmptySeq", FALSE); - - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == 0, - "wrong qstatus %08x\n", qstatus); - - /* test whether presence of the quit flag in the queue affects - * the queue state - */ - PostQuitMessage(0x1234abcd); - - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE), - "wrong qstatus %08x\n", qstatus); - - PostMessageA(info.hwnd, WM_USER, 0, 0); - - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE), - "wrong qstatus %08x\n", qstatus); - - msg.message = 0; - ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE); - ok(ret && msg.message == WM_USER, - "got %d and %04x instead of TRUE and WM_USER\n", ret, msg.message); - ok_sequence(WmEmptySeq, "WmEmptySeq", FALSE); - - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(0, QS_POSTMESSAGE), - "wrong qstatus %08x\n", qstatus); - - msg.message = 0; - ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE); - ok(ret && msg.message == WM_QUIT, - "got %d and %04x instead of TRUE and WM_QUIT\n", ret, msg.message); - ok(msg.wParam == 0x1234abcd, "got wParam %08lx instead of 0x1234abcd\n", msg.wParam); - ok(msg.lParam == 0, "got lParam %08lx instead of 0\n", msg.lParam); - ok_sequence(WmEmptySeq, "WmEmptySeq", FALSE); - - qstatus = GetQueueStatus(qs_all_input); -todo_wine { - ok(qstatus == MAKELONG(0, QS_POSTMESSAGE), - "wrong qstatus %08x\n", qstatus); -} - - msg.message = 0; - ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE); - ok(!ret, - "PeekMessageA should have returned FALSE instead of msg %04x\n", - msg.message); - ok_sequence(WmEmptySeq, "WmEmptySeq", FALSE); - - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == 0, - "wrong qstatus %08x\n", qstatus); - - /* some GetMessage tests */ - - keybd_event('N', 0, 0, 0); - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(QS_KEY, QS_KEY), "wrong qstatus %08x\n", qstatus); - - PostMessageA(info.hwnd, WM_CHAR, 'z', 0); - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE|QS_KEY), "wrong qstatus %08x\n", qstatus); - - if (qstatus) - { - ret = GetMessageA( &msg, 0, 0, 0 ); - ok(ret && msg.message == WM_CHAR && msg.wParam == 'z', - "got %d and %04x wParam %08lx instead of TRUE and WM_CHAR wParam 'z'\n", - ret, msg.message, msg.wParam); - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(0, QS_KEY), "wrong qstatus %08x\n", qstatus); - } - - if (qstatus) - { - ret = GetMessageA( &msg, 0, 0, 0 ); - ok(ret && msg.message == WM_KEYDOWN && msg.wParam == 'N', - "got %d and %04x wParam %08lx instead of TRUE and WM_KEYDOWN wParam 'N'\n", - ret, msg.message, msg.wParam); - ok_sequence(WmKeyDownSkippedSeq, "WmKeyDownSkippedSeq", FALSE); - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == 0, "wrong qstatus %08x\n", qstatus); - } - - keybd_event('N', 0, 0, 0); - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(QS_KEY, QS_KEY), "wrong qstatus %08x\n", qstatus); - - PostMessageA(info.hwnd, WM_CHAR, 'z', 0); - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE|QS_KEY), "wrong qstatus %08x\n", qstatus); - - if (qstatus & (QS_KEY << 16)) - { - ret = GetMessageA( &msg, 0, WM_KEYDOWN, WM_KEYUP ); - ok(ret && msg.message == WM_KEYDOWN && msg.wParam == 'N', - "got %d and %04x wParam %08lx instead of TRUE and WM_KEYDOWN wParam 'N'\n", - ret, msg.message, msg.wParam); - ok_sequence(WmKeyDownWasDownSkippedSeq, "WmKeyDownWasDownSkippedSeq", FALSE); - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(0, QS_POSTMESSAGE), "wrong qstatus %08x\n", qstatus); - } - - if (qstatus) - { - ret = GetMessageA( &msg, 0, WM_CHAR, WM_CHAR ); - ok(ret && msg.message == WM_CHAR && msg.wParam == 'z', - "got %d and %04x wParam %08lx instead of TRUE and WM_CHAR wParam 'z'\n", - ret, msg.message, msg.wParam); - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == 0, "wrong qstatus %08x\n", qstatus); - } - - keybd_event('N', 0, KEYEVENTF_KEYUP, 0); - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(QS_KEY, QS_KEY), "wrong qstatus %08x\n", qstatus); - - PostMessageA(info.hwnd, WM_CHAR, 'z', 0); - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(QS_POSTMESSAGE, QS_POSTMESSAGE|QS_KEY), "wrong qstatus %08x\n", qstatus); - - trace("signalling to send message\n"); - SetEvent(info.hevent[EV_SENDMSG]); - WaitForSingleObject(info.hevent[EV_ACK], INFINITE); - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(QS_SENDMESSAGE, QS_SENDMESSAGE|QS_POSTMESSAGE|QS_KEY), - "wrong qstatus %08x\n", qstatus); - - if (qstatus & (QS_KEY << 16)) - { - ret = GetMessageA( &msg, 0, WM_KEYDOWN, WM_KEYUP ); - ok(ret && msg.message == WM_KEYUP && msg.wParam == 'N', - "got %d and %04x wParam %08lx instead of TRUE and WM_KEYDOWN wParam 'N'\n", - ret, msg.message, msg.wParam); - ok_sequence(WmUserKeyUpSkippedSeq, "WmUserKeyUpSkippedSeq", FALSE); - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == MAKELONG(0, QS_POSTMESSAGE), "wrong qstatus %08x\n", qstatus); - } - - if (qstatus) - { - ret = GetMessageA( &msg, 0, WM_CHAR, WM_CHAR ); - ok(ret && msg.message == WM_CHAR && msg.wParam == 'z', - "got %d and %04x wParam %08lx instead of TRUE and WM_CHAR wParam 'z'\n", - ret, msg.message, msg.wParam); - qstatus = GetQueueStatus(qs_all_input); - ok(qstatus == 0, "wrong qstatus %08x\n", qstatus); - } -done: - trace("signalling to exit\n"); - SetEvent(info.hevent[EV_STOP]); - - WaitForSingleObject(hthread, INFINITE); - - CloseHandle(hthread); - CloseHandle(info.hevent[0]); - CloseHandle(info.hevent[1]); - CloseHandle(info.hevent[2]); - - DestroyWindow(info.hwnd); -} - -static void wait_move_event(HWND hwnd, int x, int y) -{ - MSG msg; - DWORD time; - BOOL ret; - int go = 0; - - time = GetTickCount(); - while (GetTickCount() - time < 200 && !go) { - ret = PeekMessageA(&msg, hwnd, WM_MOUSEMOVE, WM_MOUSEMOVE, PM_NOREMOVE); - go = ret && msg.pt.x > x && msg.pt.y > y; - if (!ret) MsgWaitForMultipleObjects( 0, NULL, FALSE, GetTickCount() - time, QS_ALLINPUT ); - } -} - -#define STEP 5 -static void test_PeekMessage2(void) -{ - HWND hwnd; - BOOL ret; - MSG msg; - UINT message; - DWORD time1, time2, time3; - int x1, y1, x2, y2, x3, y3; - POINT pos; - - time1 = time2 = time3 = 0; - x1 = y1 = x2 = y2 = x3 = y3 = 0; - - /* Initialise window and make sure it is ready for events */ - hwnd = CreateWindow("TestWindowClass", "PeekMessage2", WS_OVERLAPPEDWINDOW, - 10, 10, 800, 800, NULL, NULL, NULL, NULL); - assert(hwnd); - trace("Window for test_PeekMessage2 %p\n", hwnd); - ShowWindow(hwnd, SW_SHOW); - UpdateWindow(hwnd); - SetFocus(hwnd); - GetCursorPos(&pos); - SetCursorPos(100, 100); - mouse_event(MOUSEEVENTF_MOVE, -STEP, -STEP, 0, 0); - flush_events(); - - /* Do initial mousemove, wait until we can see it - and then do our test peek with PM_NOREMOVE. */ - mouse_event(MOUSEEVENTF_MOVE, STEP, STEP, 0, 0); - wait_move_event(hwnd, 100-STEP, 100-STEP); - - ret = PeekMessageA(&msg, hwnd, WM_MOUSEMOVE, WM_MOUSEMOVE, PM_NOREMOVE); - if (!ret) - { - skip( "queuing mouse events not supported\n" ); - goto done; - } - else - { - trace("1st move event: %04x %x %d %d\n", msg.message, msg.time, msg.pt.x, msg.pt.y); - message = msg.message; - time1 = msg.time; - x1 = msg.pt.x; - y1 = msg.pt.y; - ok(message == WM_MOUSEMOVE, "message not WM_MOUSEMOVE, %04x instead\n", message); - } - - /* Allow time to advance a bit, and then simulate the user moving their - * mouse around. After that we peek again with PM_NOREMOVE. - * Although the previous mousemove message was never removed, the - * mousemove we now peek should reflect the recent mouse movements - * because the input queue will merge the move events. */ - Sleep(100); - mouse_event(MOUSEEVENTF_MOVE, STEP, STEP, 0, 0); - wait_move_event(hwnd, x1, y1); - - ret = PeekMessageA(&msg, hwnd, WM_MOUSEMOVE, WM_MOUSEMOVE, PM_NOREMOVE); - ok(ret, "no message available\n"); - if (ret) { - trace("2nd move event: %04x %x %d %d\n", msg.message, msg.time, msg.pt.x, msg.pt.y); - message = msg.message; - time2 = msg.time; - x2 = msg.pt.x; - y2 = msg.pt.y; - ok(message == WM_MOUSEMOVE, "message not WM_MOUSEMOVE, %04x instead\n", message); - ok(time2 > time1, "message time not advanced: %x %x\n", time1, time2); - ok(x2 != x1 && y2 != y1, "coords not changed: (%d %d) (%d %d)\n", x1, y1, x2, y2); - } - - /* Have another go, to drive the point home */ - Sleep(100); - mouse_event(MOUSEEVENTF_MOVE, STEP, STEP, 0, 0); - wait_move_event(hwnd, x2, y2); - - ret = PeekMessageA(&msg, hwnd, WM_MOUSEMOVE, WM_MOUSEMOVE, PM_NOREMOVE); - ok(ret, "no message available\n"); - if (ret) { - trace("3rd move event: %04x %x %d %d\n", msg.message, msg.time, msg.pt.x, msg.pt.y); - message = msg.message; - time3 = msg.time; - x3 = msg.pt.x; - y3 = msg.pt.y; - ok(message == WM_MOUSEMOVE, "message not WM_MOUSEMOVE, %04x instead\n", message); - ok(time3 > time2, "message time not advanced: %x %x\n", time2, time3); - ok(x3 != x2 && y3 != y2, "coords not changed: (%d %d) (%d %d)\n", x2, y2, x3, y3); - } - -done: - DestroyWindow(hwnd); - SetCursorPos(pos.x, pos.y); - flush_events(); -} - -static INT_PTR CALLBACK wm_quit_dlg_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp) -{ - struct recvd_message msg; - - if (ignore_message( message )) return 0; - - msg.hwnd = hwnd; - msg.message = message; - msg.flags = sent|wparam|lparam; - msg.wParam = wp; - msg.lParam = lp; - msg.descr = "dialog"; - add_message(&msg); - - switch (message) - { - case WM_INITDIALOG: - PostMessage(hwnd, WM_QUIT, 0x1234, 0x5678); - PostMessage(hwnd, WM_USER, 0xdead, 0xbeef); - return 0; - - case WM_GETDLGCODE: - return 0; - - case WM_USER: - EndDialog(hwnd, 0); - break; - } - - return 1; -} - -static const struct message WmQuitDialogSeq[] = { - { HCBT_CREATEWND, hook }, - { WM_SETFONT, sent }, - { WM_INITDIALOG, sent }, - { WM_CHANGEUISTATE, sent|optional }, - { HCBT_DESTROYWND, hook }, - { 0x0090, sent|optional }, /* Vista */ - { WM_DESTROY, sent }, - { WM_NCDESTROY, sent }, - { 0 } -}; - -static const struct message WmStopQuitSeq[] = { - { WM_DWMNCRENDERINGCHANGED, posted|optional }, - { WM_CLOSE, posted }, - { WM_QUIT, posted|wparam|lparam, 0x1234, 0 }, - { 0 } -}; - -static void test_quit_message(void) -{ - MSG msg; - BOOL ret; - - /* test using PostQuitMessage */ - flush_events(); - PostQuitMessage(0xbeef); - - ret = PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE); - ok(ret, "PeekMessage failed with error %d\n", GetLastError()); - ok(msg.message == WM_QUIT, "Received message 0x%04x instead of WM_QUIT\n", msg.message); - ok(msg.wParam == 0xbeef, "wParam was 0x%lx instead of 0xbeef\n", msg.wParam); - - ret = PostThreadMessage(GetCurrentThreadId(), WM_USER, 0, 0); - ok(ret, "PostMessage failed with error %d\n", GetLastError()); - - ret = GetMessage(&msg, NULL, 0, 0); - ok(ret > 0, "GetMessage failed with error %d\n", GetLastError()); - ok(msg.message == WM_USER, "Received message 0x%04x instead of WM_USER\n", msg.message); - - /* note: WM_QUIT message received after WM_USER message */ - ret = GetMessage(&msg, NULL, 0, 0); - ok(!ret, "GetMessage return %d with error %d instead of FALSE\n", ret, GetLastError()); - ok(msg.message == WM_QUIT, "Received message 0x%04x instead of WM_QUIT\n", msg.message); - ok(msg.wParam == 0xbeef, "wParam was 0x%lx instead of 0xbeef\n", msg.wParam); - - ret = PeekMessage(&msg, NULL, 0, 0, PM_REMOVE); - ok( !ret || msg.message != WM_QUIT, "Received WM_QUIT again\n" ); - - /* now test with PostThreadMessage - different behaviour! */ - PostThreadMessage(GetCurrentThreadId(), WM_QUIT, 0xdead, 0); - - ret = PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE); - ok(ret, "PeekMessage failed with error %d\n", GetLastError()); - ok(msg.message == WM_QUIT, "Received message 0x%04x instead of WM_QUIT\n", msg.message); - ok(msg.wParam == 0xdead, "wParam was 0x%lx instead of 0xdead\n", msg.wParam); - - ret = PostThreadMessage(GetCurrentThreadId(), WM_USER, 0, 0); - ok(ret, "PostMessage failed with error %d\n", GetLastError()); - - /* note: we receive the WM_QUIT message first this time */ - ret = GetMessage(&msg, NULL, 0, 0); - ok(!ret, "GetMessage return %d with error %d instead of FALSE\n", ret, GetLastError()); - ok(msg.message == WM_QUIT, "Received message 0x%04x instead of WM_QUIT\n", msg.message); - ok(msg.wParam == 0xdead, "wParam was 0x%lx instead of 0xdead\n", msg.wParam); - - ret = GetMessage(&msg, NULL, 0, 0); - ok(ret > 0, "GetMessage failed with error %d\n", GetLastError()); - ok(msg.message == WM_USER, "Received message 0x%04x instead of WM_USER\n", msg.message); - - flush_events(); - flush_sequence(); - ret = DialogBoxParam(GetModuleHandle(0), "TEST_EMPTY_DIALOG", 0, wm_quit_dlg_proc, 0); - ok(ret == 1, "expected 1, got %d\n", ret); - ok_sequence(WmQuitDialogSeq, "WmQuitDialogSeq", FALSE); - memset(&msg, 0xab, sizeof(msg)); - ret = PeekMessage(&msg, NULL, 0, 0, PM_REMOVE); - ok(ret, "PeekMessage failed\n"); - ok(msg.message == WM_QUIT, "Received message 0x%04x instead of WM_QUIT\n", msg.message); - ok(msg.wParam == 0x1234, "wParam was 0x%lx instead of 0x1234\n", msg.wParam); - ok(msg.lParam == 0, "lParam was 0x%lx instead of 0\n", msg.lParam); - - /* Check what happens to a WM_QUIT message posted to a window that gets - * destroyed. - */ - CreateWindowExA(0, "StopQuitClass", "Stop Quit Test", WS_OVERLAPPEDWINDOW, - 0, 0, 100, 100, NULL, NULL, NULL, NULL); - flush_sequence(); - while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) - { - struct recvd_message rmsg; - rmsg.hwnd = msg.hwnd; - rmsg.message = msg.message; - rmsg.flags = posted|wparam|lparam; - rmsg.wParam = msg.wParam; - rmsg.lParam = msg.lParam; - rmsg.descr = "stop/quit"; - if (msg.message == WM_QUIT) - /* The hwnd can only be checked here */ - ok(!msg.hwnd, "The WM_QUIT hwnd was %p instead of NULL\n", msg.hwnd); - add_message(&rmsg); - DispatchMessage(&msg); - } - ok_sequence(WmStopQuitSeq, "WmStopQuitSeq", FALSE); -} - -static const struct message WmMouseHoverSeq[] = { - { WM_MOUSEACTIVATE, sent|optional }, /* we can get those when moving the mouse in focus-follow-mouse mode under X11 */ - { WM_MOUSEACTIVATE, sent|optional }, - { WM_TIMER, sent|optional }, /* XP sends it */ - { WM_SYSTIMER, sent }, - { WM_MOUSEHOVER, sent|wparam, 0 }, - { 0 } -}; - -static void pump_msg_loop_timeout(DWORD timeout, BOOL inject_mouse_move) -{ - MSG msg; - DWORD start_ticks, end_ticks; - - start_ticks = GetTickCount(); - /* add some deviation (50%) to cover not expected delays */ - start_ticks += timeout / 2; - - do - { - while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) - { - /* Timer proc messages are not dispatched to the window proc, - * and therefore not logged. - */ - if ((msg.message == WM_TIMER || msg.message == WM_SYSTIMER) && msg.hwnd) - { - struct recvd_message s_msg; - - s_msg.hwnd = msg.hwnd; - s_msg.message = msg.message; - s_msg.flags = sent|wparam|lparam; - s_msg.wParam = msg.wParam; - s_msg.lParam = msg.lParam; - s_msg.descr = "msg_loop"; - add_message(&s_msg); - } - DispatchMessage(&msg); - } - - end_ticks = GetTickCount(); - - /* inject WM_MOUSEMOVE to see how it changes tracking */ - if (inject_mouse_move && start_ticks + timeout / 2 >= end_ticks) - { - mouse_event(MOUSEEVENTF_MOVE, -1, 0, 0, 0); - mouse_event(MOUSEEVENTF_MOVE, 1, 0, 0, 0); - - inject_mouse_move = FALSE; - } - } while (start_ticks + timeout >= end_ticks); -} - -static void test_TrackMouseEvent(void) -{ - TRACKMOUSEEVENT tme; - BOOL ret; - HWND hwnd, hchild; - RECT rc_parent, rc_child; - UINT default_hover_time, hover_width = 0, hover_height = 0; - -#define track_hover(track_hwnd, track_hover_time) \ - tme.cbSize = sizeof(tme); \ - tme.dwFlags = TME_HOVER; \ - tme.hwndTrack = track_hwnd; \ - tme.dwHoverTime = track_hover_time; \ - SetLastError(0xdeadbeef); \ - ret = pTrackMouseEvent(&tme); \ - ok(ret, "TrackMouseEvent(TME_HOVER) error %d\n", GetLastError()) - -#define track_query(expected_track_flags, expected_track_hwnd, expected_hover_time) \ - tme.cbSize = sizeof(tme); \ - tme.dwFlags = TME_QUERY; \ - tme.hwndTrack = (HWND)0xdeadbeef; \ - tme.dwHoverTime = 0xdeadbeef; \ - SetLastError(0xdeadbeef); \ - ret = pTrackMouseEvent(&tme); \ - ok(ret, "TrackMouseEvent(TME_QUERY) error %d\n", GetLastError());\ - ok(tme.cbSize == sizeof(tme), "wrong tme.cbSize %u\n", tme.cbSize); \ - ok(tme.dwFlags == (expected_track_flags), \ - "wrong tme.dwFlags %08x, expected %08x\n", tme.dwFlags, (expected_track_flags)); \ - ok(tme.hwndTrack == (expected_track_hwnd), \ - "wrong tme.hwndTrack %p, expected %p\n", tme.hwndTrack, (expected_track_hwnd)); \ - ok(tme.dwHoverTime == (expected_hover_time), \ - "wrong tme.dwHoverTime %u, expected %u\n", tme.dwHoverTime, (expected_hover_time)) - -#define track_hover_cancel(track_hwnd) \ - tme.cbSize = sizeof(tme); \ - tme.dwFlags = TME_HOVER | TME_CANCEL; \ - tme.hwndTrack = track_hwnd; \ - tme.dwHoverTime = 0xdeadbeef; \ - SetLastError(0xdeadbeef); \ - ret = pTrackMouseEvent(&tme); \ - ok(ret, "TrackMouseEvent(TME_HOVER | TME_CANCEL) error %d\n", GetLastError()) - - default_hover_time = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = SystemParametersInfo(SPI_GETMOUSEHOVERTIME, 0, &default_hover_time, 0); - ok(ret || broken(GetLastError() == 0xdeadbeef), /* win9x */ - "SystemParametersInfo(SPI_GETMOUSEHOVERTIME) error %u\n", GetLastError()); - if (!ret) default_hover_time = 400; - trace("SPI_GETMOUSEHOVERTIME returned %u ms\n", default_hover_time); - - SetLastError(0xdeadbeef); - ret = SystemParametersInfo(SPI_GETMOUSEHOVERWIDTH, 0, &hover_width, 0); - ok(ret || broken(GetLastError() == 0xdeadbeef), /* win9x */ - "SystemParametersInfo(SPI_GETMOUSEHOVERWIDTH) error %u\n", GetLastError()); - if (!ret) hover_width = 4; - SetLastError(0xdeadbeef); - ret = SystemParametersInfo(SPI_GETMOUSEHOVERHEIGHT, 0, &hover_height, 0); - ok(ret || broken(GetLastError() == 0xdeadbeef), /* win9x */ - "SystemParametersInfo(SPI_GETMOUSEHOVERHEIGHT) error %u\n", GetLastError()); - if (!ret) hover_height = 4; - trace("hover rect is %u x %d\n", hover_width, hover_height); - - hwnd = CreateWindowEx(0, "TestWindowClass", NULL, - WS_OVERLAPPEDWINDOW | WS_VISIBLE, - CW_USEDEFAULT, CW_USEDEFAULT, 300, 300, 0, - NULL, NULL, 0); - assert(hwnd); - - hchild = CreateWindowEx(0, "TestWindowClass", NULL, - WS_CHILD | WS_BORDER | WS_VISIBLE, - 50, 50, 200, 200, hwnd, - NULL, NULL, 0); - assert(hchild); - - SetWindowPos( hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE ); - flush_events(); - flush_sequence(); - - tme.cbSize = 0; - tme.dwFlags = TME_QUERY; - tme.hwndTrack = (HWND)0xdeadbeef; - tme.dwHoverTime = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = pTrackMouseEvent(&tme); - ok(!ret, "TrackMouseEvent should fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER || broken(GetLastError() == 0xdeadbeef), - "not expected error %u\n", GetLastError()); - - tme.cbSize = sizeof(tme); - tme.dwFlags = TME_HOVER; - tme.hwndTrack = (HWND)0xdeadbeef; - tme.dwHoverTime = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = pTrackMouseEvent(&tme); - ok(!ret, "TrackMouseEvent should fail\n"); - ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE || broken(GetLastError() == 0xdeadbeef), - "not expected error %u\n", GetLastError()); - - tme.cbSize = sizeof(tme); - tme.dwFlags = TME_HOVER | TME_CANCEL; - tme.hwndTrack = (HWND)0xdeadbeef; - tme.dwHoverTime = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = pTrackMouseEvent(&tme); - ok(!ret, "TrackMouseEvent should fail\n"); - ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE || broken(GetLastError() == 0xdeadbeef), - "not expected error %u\n", GetLastError()); - - GetWindowRect(hwnd, &rc_parent); - GetWindowRect(hchild, &rc_child); - SetCursorPos(rc_child.left - 10, rc_child.top - 10); - - /* Process messages so that the system updates its internal current - * window and hittest, otherwise TrackMouseEvent calls don't have any - * effect. - */ - flush_events(); - flush_sequence(); - - track_query(0, NULL, 0); - track_hover(hchild, 0); - track_query(0, NULL, 0); - - flush_events(); - flush_sequence(); - - track_hover(hwnd, 0); - tme.cbSize = sizeof(tme); - tme.dwFlags = TME_QUERY; - tme.hwndTrack = (HWND)0xdeadbeef; - tme.dwHoverTime = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = pTrackMouseEvent(&tme); - ok(ret, "TrackMouseEvent(TME_QUERY) error %d\n", GetLastError()); - ok(tme.cbSize == sizeof(tme), "wrong tme.cbSize %u\n", tme.cbSize); - if (!tme.dwFlags) - { - skip( "Cursor not inside window, skipping TrackMouseEvent tests\n" ); - DestroyWindow( hwnd ); - return; - } - ok(tme.dwFlags == TME_HOVER, "wrong tme.dwFlags %08x, expected TME_HOVER\n", tme.dwFlags); - ok(tme.hwndTrack == hwnd, "wrong tme.hwndTrack %p, expected %p\n", tme.hwndTrack, hwnd); - ok(tme.dwHoverTime == default_hover_time, "wrong tme.dwHoverTime %u, expected %u\n", - tme.dwHoverTime, default_hover_time); - - pump_msg_loop_timeout(default_hover_time, FALSE); - ok_sequence(WmMouseHoverSeq, "WmMouseHoverSeq", FALSE); - - track_query(0, NULL, 0); - - track_hover(hwnd, HOVER_DEFAULT); - track_query(TME_HOVER, hwnd, default_hover_time); - - Sleep(default_hover_time / 2); - mouse_event(MOUSEEVENTF_MOVE, -1, 0, 0, 0); - mouse_event(MOUSEEVENTF_MOVE, 1, 0, 0, 0); - - track_query(TME_HOVER, hwnd, default_hover_time); - - pump_msg_loop_timeout(default_hover_time, FALSE); - ok_sequence(WmMouseHoverSeq, "WmMouseHoverSeq", FALSE); - - track_query(0, NULL, 0); - - track_hover(hwnd, HOVER_DEFAULT); - track_query(TME_HOVER, hwnd, default_hover_time); - - pump_msg_loop_timeout(default_hover_time, TRUE); - ok_sequence(WmMouseHoverSeq, "WmMouseHoverSeq", FALSE); - - track_query(0, NULL, 0); - - track_hover(hwnd, HOVER_DEFAULT); - track_query(TME_HOVER, hwnd, default_hover_time); - track_hover_cancel(hwnd); - - DestroyWindow(hwnd); - -#undef track_hover -#undef track_query -#undef track_hover_cancel -} - - -static const struct message WmSetWindowRgn[] = { - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_NCPAINT, sent|optional }, /* wparam != 1 */ - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { 0 } -}; - -static const struct message WmSetWindowRgn_no_redraw[] = { - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { 0 } -}; - -static const struct message WmSetWindowRgn_clear[] = { - { WM_WINDOWPOSCHANGING, sent/*|wparam*/, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE/*|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE only on some Windows versions */ }, - { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_NCPAINT, sent|optional }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, /* FIXME: remove optional once Wine is fixed */ - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|wparam|optional, 1 }, - { WM_NCPAINT, sent|optional }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - { WM_WINDOWPOSCHANGING, sent|optional }, - { WM_NCCALCSIZE, sent|optional|wparam, 1 }, - { WM_NCPAINT, sent|optional }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|optional|wparam, SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCCALCSIZE, sent|optional|wparam, 1 }, - { WM_NCPAINT, sent|optional }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { 0 } -}; - -static void test_SetWindowRgn(void) -{ - HRGN hrgn; - HWND hwnd = CreateWindowExA(0, "TestWindowClass", "Test overlapped", WS_OVERLAPPEDWINDOW, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok( hwnd != 0, "Failed to create overlapped window\n" ); - - ShowWindow( hwnd, SW_SHOW ); - UpdateWindow( hwnd ); - flush_events(); - flush_sequence(); - - trace("testing SetWindowRgn\n"); - hrgn = CreateRectRgn( 0, 0, 150, 150 ); - SetWindowRgn( hwnd, hrgn, TRUE ); - ok_sequence( WmSetWindowRgn, "WmSetWindowRgn", FALSE ); - - hrgn = CreateRectRgn( 30, 30, 160, 160 ); - SetWindowRgn( hwnd, hrgn, FALSE ); - ok_sequence( WmSetWindowRgn_no_redraw, "WmSetWindowRgn_no_redraw", FALSE ); - - hrgn = CreateRectRgn( 0, 0, 180, 180 ); - SetWindowRgn( hwnd, hrgn, TRUE ); - ok_sequence( WmSetWindowRgn, "WmSetWindowRgn2", FALSE ); - - SetWindowRgn( hwnd, 0, TRUE ); - ok_sequence( WmSetWindowRgn_clear, "WmSetWindowRgn_clear", FALSE ); - - DestroyWindow( hwnd ); -} - -/*************************** ShowWindow() test ******************************/ -static const struct message WmShowNormal[] = { - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, - { HCBT_ACTIVATE, hook }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2003 doesn't send it */ - { HCBT_SETFOCUS, hook }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { 0 } -}; -static const struct message WmShow[] = { - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, - { HCBT_ACTIVATE, hook|optional }, /* win2000 doesn't send it */ - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2000 doesn't send it */ - { HCBT_SETFOCUS, hook|optional }, /* win2000 doesn't send it */ - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { 0 } -}; -static const struct message WmShowNoActivate_1[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_SHOWNOACTIVATE }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_STATECHANGED, 0, SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_STATECHANGED, 0, SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_MOVE, sent|defwinproc|optional }, - { WM_SIZE, sent|wparam|defwinproc, SIZE_RESTORED }, - { 0 } -}; -static const struct message WmShowNoActivate_2[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_SHOWNOACTIVATE }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|wparam|defwinproc, SIZE_RESTORED }, - { HCBT_SETFOCUS, hook|optional }, - { HCBT_ACTIVATE, hook|optional }, /* win2003 doesn't send it */ - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2003 doesn't send it */ - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { HCBT_SETFOCUS, hook|optional }, /* win2003 doesn't send it */ - { 0 } -}; -static const struct message WmShowNA_1[] = { - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { 0 } -}; -static const struct message WmShowNA_2[] = { - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { 0 } -}; -static const struct message WmRestore_1[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_RESTORE }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { HCBT_ACTIVATE, hook|optional }, /* win2000 doesn't send it */ - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2000 doesn't send it */ - { HCBT_SETFOCUS, hook|optional }, /* win2000 doesn't send it */ - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|wparam|defwinproc, SIZE_RESTORED }, - { HCBT_SETFOCUS, hook|optional }, /* win2000 sends it */ - { 0 } -}; -static const struct message WmRestore_2[] = { - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, - { HCBT_ACTIVATE, hook|optional }, /* win2000 doesn't send it */ - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2000 doesn't send it */ - { HCBT_SETFOCUS, hook|optional }, /* win2000 doesn't send it */ - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { 0 } -}; -static const struct message WmRestore_3[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_RESTORE }, - { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { HCBT_ACTIVATE, hook|optional }, /* win2003 doesn't send it */ - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2003 doesn't send it */ - { HCBT_SETFOCUS, hook|optional }, /* win2003 doesn't send it */ - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|wparam|defwinproc, SIZE_MAXIMIZED }, - { HCBT_SETFOCUS, hook|optional }, /* win2003 sends it */ - { 0 } -}; -static const struct message WmRestore_4[] = { - { HCBT_MINMAX, hook|lparam|optional, 0, SW_RESTORE }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_FRAMECHANGED|SWP_STATECHANGED, 0, SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_FRAMECHANGED|SWP_STATECHANGED, 0, SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_MOVE, sent|defwinproc|optional }, - { WM_SIZE, sent|wparam|defwinproc|optional, SIZE_RESTORED }, - { 0 } -}; -static const struct message WmRestore_5[] = { - { HCBT_MINMAX, hook|lparam|optional, 0, SW_SHOWNORMAL }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_FRAMECHANGED|SWP_STATECHANGED, 0, SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_NOSIZE|SWP_NOMOVE }, - { HCBT_ACTIVATE, hook|optional }, - { HCBT_SETFOCUS, hook|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_FRAMECHANGED|SWP_STATECHANGED, 0, SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_MOVE, sent|defwinproc|optional }, - { WM_SIZE, sent|wparam|defwinproc|optional, SIZE_RESTORED }, - { 0 } -}; -static const struct message WmHide_1[] = { - { WM_SHOWWINDOW, sent|wparam, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE, 0, SWP_NOACTIVATE }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE, 0, SWP_NOACTIVATE }, - { HCBT_ACTIVATE, hook|optional }, - { HCBT_SETFOCUS, hook|optional }, /* win2000 sends it */ - { 0 } -}; -static const struct message WmHide_2[] = { - { WM_SHOWWINDOW, sent|wparam, 0 }, - { WM_WINDOWPOSCHANGING, sent /*|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE*/ }, /* win2000 doesn't add SWP_NOACTIVATE */ - { WM_WINDOWPOSCHANGED, sent /*|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE*/ }, /* win2000 doesn't add SWP_NOACTIVATE */ - { HCBT_ACTIVATE, hook|optional }, - { 0 } -}; -static const struct message WmHide_3[] = { - { WM_SHOWWINDOW, sent|wparam, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { HCBT_SETFOCUS, hook|optional }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { 0 } -}; -static const struct message WmShowMinimized_1[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_SHOWMINIMIZED }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { HCBT_ACTIVATE, hook|optional }, /* win2000 doesn't send it */ - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2000 doesn't send it */ - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|wparam|lparam|defwinproc, SIZE_MINIMIZED, 0 }, - { 0 } -}; -static const struct message WmMinimize_1[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_MINIMIZE }, - { HCBT_SETFOCUS, hook|optional }, /* win2000 doesn't send it */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|wparam|lparam|defwinproc, SIZE_MINIMIZED, 0 }, - { 0 } -}; -static const struct message WmMinimize_2[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_MINIMIZE }, - { HCBT_SETFOCUS, hook|optional }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|wparam|lparam|defwinproc, SIZE_MINIMIZED, 0 }, - { 0 } -}; -static const struct message WmMinimize_3[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_MINIMIZE }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|wparam|lparam|defwinproc, SIZE_MINIMIZED, 0 }, - { 0 } -}; -static const struct message WmShowMinNoActivate[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_SHOWMINNOACTIVE }, - { WM_WINDOWPOSCHANGING, sent }, - { WM_WINDOWPOSCHANGED, sent }, - { WM_MOVE, sent|defwinproc|optional }, - { WM_SIZE, sent|wparam|lparam|defwinproc|optional, SIZE_MINIMIZED, 0 }, - { 0 } -}; -static const struct message WmMinMax_1[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_SHOWMINIMIZED }, - { 0 } -}; -static const struct message WmMinMax_2[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_SHOWMAXIMIZED }, - { WM_GETMINMAXINFO, sent|optional }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_FRAMECHANGED|SWP_STATECHANGED }, - { HCBT_ACTIVATE, hook|optional }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, - { HCBT_SETFOCUS, hook|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_FRAMECHANGED|SWP_STATECHANGED, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_MOVE, sent|defwinproc|optional }, - { WM_SIZE, sent|wparam|defwinproc|optional, SIZE_MAXIMIZED }, - { HCBT_SETFOCUS, hook|optional }, - { 0 } -}; -static const struct message WmMinMax_3[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_MINIMIZE }, - { HCBT_SETFOCUS, hook|optional }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { WM_MOVE, sent|defwinproc|optional }, - { WM_SIZE, sent|wparam|lparam|defwinproc|optional, SIZE_MINIMIZED, 0 }, - { 0 } -}; -static const struct message WmMinMax_4[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_SHOWMINNOACTIVE }, - { 0 } -}; -static const struct message WmShowMaximized_1[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_SHOWMAXIMIZED }, - { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { HCBT_ACTIVATE, hook|optional }, /* win2000 doesn't send it */ - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2000 doesn't send it */ - { HCBT_SETFOCUS, hook|optional }, /* win2000 doesn't send it */ - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|wparam|defwinproc, SIZE_MAXIMIZED }, - { HCBT_SETFOCUS, hook|optional }, /* win2003 sends it */ - { 0 } -}; -static const struct message WmShowMaximized_2[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_SHOWMAXIMIZED }, - { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|optional }, - { HCBT_ACTIVATE, hook|optional }, - { WM_WINDOWPOSCHANGED, sent|optional }, - { WM_MOVE, sent|optional }, /* Win9x doesn't send it */ - { WM_SIZE, sent|wparam|optional, SIZE_MAXIMIZED }, /* Win9x doesn't send it */ - { WM_WINDOWPOSCHANGING, sent|optional }, - { HCBT_SETFOCUS, hook|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, - { WM_MOVE, sent|defwinproc }, - { WM_SIZE, sent|wparam|defwinproc, SIZE_MAXIMIZED }, - { HCBT_SETFOCUS, hook|optional }, - { 0 } -}; -static const struct message WmShowMaximized_3[] = { - { HCBT_MINMAX, hook|lparam, 0, SW_SHOWMAXIMIZED }, - { WM_GETMINMAXINFO, sent|optional }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED, 0, SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_NOSIZE|SWP_NOMOVE }, - { HCBT_ACTIVATE, hook|optional }, /* win2000 doesn't send it */ - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2000 doesn't send it */ - { HCBT_SETFOCUS, hook|optional }, /* win2000 doesn't send it */ - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED, 0, SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_NOSIZE|SWP_NOMOVE }, - { WM_MOVE, sent|defwinproc|optional }, - { WM_SIZE, sent|wparam|defwinproc, SIZE_MAXIMIZED }, - { 0 } -}; - -static void test_ShowWindow(void) -{ - /* ShowWindow commands in random order */ - static const struct - { - INT cmd; /* ShowWindow command */ - LPARAM ret; /* ShowWindow return value */ - DWORD style; /* window style after the command */ - const struct message *msg; /* message sequence the command produces */ - INT wp_cmd, wp_flags; /* window placement after the command */ - POINT wp_min, wp_max; /* window placement after the command */ - BOOL todo_msg; /* message sequence doesn't match what Wine does */ - } sw[] = - { -/* 1 */ { SW_SHOWNORMAL, FALSE, WS_VISIBLE, WmShowNormal, - SW_SHOWNORMAL, 0, {-1,-1}, {-1,-1}, FALSE }, -/* 2 */ { SW_SHOWNORMAL, TRUE, WS_VISIBLE, WmEmptySeq, - SW_SHOWNORMAL, 0, {-1,-1}, {-1,-1}, FALSE }, -/* 3 */ { SW_HIDE, TRUE, 0, WmHide_1, - SW_SHOWNORMAL, 0, {-1,-1}, {-1,-1}, FALSE }, -/* 4 */ { SW_HIDE, FALSE, 0, WmEmptySeq, - SW_SHOWNORMAL, 0, {-1,-1}, {-1,-1}, FALSE }, -/* 5 */ { SW_SHOWMINIMIZED, FALSE, WS_VISIBLE|WS_MINIMIZE, WmShowMinimized_1, - SW_SHOWMINIMIZED, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 6 */ { SW_SHOWMINIMIZED, TRUE, WS_VISIBLE|WS_MINIMIZE, WmMinMax_1, - SW_SHOWMINIMIZED, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 7 */ { SW_HIDE, TRUE, WS_MINIMIZE, WmHide_1, - SW_SHOWMINIMIZED, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 8 */ { SW_HIDE, FALSE, WS_MINIMIZE, WmEmptySeq, - SW_SHOWMINIMIZED, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 9 */ { SW_SHOWMAXIMIZED, FALSE, WS_VISIBLE|WS_MAXIMIZE, WmShowMaximized_1, - SW_SHOWMAXIMIZED, WPF_RESTORETOMAXIMIZED, {-32000,-32000}, {-1,-1}, FALSE }, -/* 10 */ { SW_SHOWMAXIMIZED, TRUE, WS_VISIBLE|WS_MAXIMIZE, WmMinMax_2, - SW_SHOWMAXIMIZED, WPF_RESTORETOMAXIMIZED, {-32000,-32000}, {-1,-1}, FALSE }, -/* 11 */ { SW_HIDE, TRUE, WS_MAXIMIZE, WmHide_1, - SW_SHOWMAXIMIZED, WPF_RESTORETOMAXIMIZED, {-32000,-32000}, {-1,-1}, FALSE }, -/* 12 */ { SW_HIDE, FALSE, WS_MAXIMIZE, WmEmptySeq, - SW_SHOWMAXIMIZED, WPF_RESTORETOMAXIMIZED, {-32000,-32000}, {-1,-1}, FALSE }, -/* 13 */ { SW_SHOWNOACTIVATE, FALSE, WS_VISIBLE, WmShowNoActivate_1, - SW_SHOWNORMAL, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 14 */ { SW_SHOWNOACTIVATE, TRUE, WS_VISIBLE, WmEmptySeq, - SW_SHOWNORMAL, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 15 */ { SW_HIDE, TRUE, 0, WmHide_2, - SW_SHOWNORMAL, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 16 */ { SW_HIDE, FALSE, 0, WmEmptySeq, - SW_SHOWNORMAL, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 17 */ { SW_SHOW, FALSE, WS_VISIBLE, WmShow, - SW_SHOWNORMAL, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 18 */ { SW_SHOW, TRUE, WS_VISIBLE, WmEmptySeq, - SW_SHOWNORMAL, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 19 */ { SW_MINIMIZE, TRUE, WS_VISIBLE|WS_MINIMIZE, WmMinimize_1, - SW_SHOWMINIMIZED, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 20 */ { SW_MINIMIZE, TRUE, WS_VISIBLE|WS_MINIMIZE, WmMinMax_3, - SW_SHOWMINIMIZED, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 21 */ { SW_HIDE, TRUE, WS_MINIMIZE, WmHide_2, - SW_SHOWMINIMIZED, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 22 */ { SW_SHOWMINNOACTIVE, FALSE, WS_VISIBLE|WS_MINIMIZE, WmShowMinNoActivate, - SW_SHOWMINIMIZED, 0, {-32000,-32000}, {-1,-1}, TRUE }, -/* 23 */ { SW_SHOWMINNOACTIVE, TRUE, WS_VISIBLE|WS_MINIMIZE, WmMinMax_4, - SW_SHOWMINIMIZED, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 24 */ { SW_HIDE, TRUE, WS_MINIMIZE, WmHide_2, - SW_SHOWMINIMIZED, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 25 */ { SW_HIDE, FALSE, WS_MINIMIZE, WmEmptySeq, - SW_SHOWMINIMIZED, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 26 */ { SW_SHOWNA, FALSE, WS_VISIBLE|WS_MINIMIZE, WmShowNA_1, - SW_SHOWMINIMIZED, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 27 */ { SW_SHOWNA, TRUE, WS_VISIBLE|WS_MINIMIZE, WmShowNA_2, - SW_SHOWMINIMIZED, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 28 */ { SW_HIDE, TRUE, WS_MINIMIZE, WmHide_2, - SW_SHOWMINIMIZED, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 29 */ { SW_HIDE, FALSE, WS_MINIMIZE, WmEmptySeq, - SW_SHOWMINIMIZED, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 30 */ { SW_RESTORE, FALSE, WS_VISIBLE, WmRestore_1, - SW_SHOWNORMAL, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 31 */ { SW_RESTORE, TRUE, WS_VISIBLE, WmEmptySeq, - SW_SHOWNORMAL, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 32 */ { SW_HIDE, TRUE, 0, WmHide_3, - SW_SHOWNORMAL, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 33 */ { SW_HIDE, FALSE, 0, WmEmptySeq, - SW_SHOWNORMAL, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 34 */ { SW_NORMALNA, FALSE, 0, WmEmptySeq, /* what does this mean?! */ - SW_SHOWNORMAL, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 35 */ { SW_NORMALNA, FALSE, 0, WmEmptySeq, - SW_SHOWNORMAL, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 36 */ { SW_HIDE, FALSE, 0, WmEmptySeq, - SW_SHOWNORMAL, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 37 */ { SW_RESTORE, FALSE, WS_VISIBLE, WmRestore_2, - SW_SHOWNORMAL, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 38 */ { SW_RESTORE, TRUE, WS_VISIBLE, WmEmptySeq, - SW_SHOWNORMAL, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 39 */ { SW_SHOWNOACTIVATE, TRUE, WS_VISIBLE, WmEmptySeq, - SW_SHOWNORMAL, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 40 */ { SW_MINIMIZE, TRUE, WS_VISIBLE|WS_MINIMIZE, WmMinimize_2, - SW_SHOWMINIMIZED, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 41 */ { SW_MINIMIZE, TRUE, WS_VISIBLE|WS_MINIMIZE, WmMinMax_3, - SW_SHOWMINIMIZED, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 42 */ { SW_SHOWMAXIMIZED, TRUE, WS_VISIBLE|WS_MAXIMIZE, WmShowMaximized_2, - SW_SHOWMAXIMIZED, WPF_RESTORETOMAXIMIZED, {-32000,-32000}, {-1,-1}, FALSE }, -/* 43 */ { SW_SHOWMAXIMIZED, TRUE, WS_VISIBLE|WS_MAXIMIZE, WmMinMax_2, - SW_SHOWMAXIMIZED, WPF_RESTORETOMAXIMIZED, {-32000,-32000}, {-1,-1}, FALSE }, -/* 44 */ { SW_MINIMIZE, TRUE, WS_VISIBLE|WS_MINIMIZE, WmMinimize_1, - SW_SHOWMINIMIZED, WPF_RESTORETOMAXIMIZED, {-32000,-32000}, {-1,-1}, FALSE }, -/* 45 */ { SW_MINIMIZE, TRUE, WS_VISIBLE|WS_MINIMIZE, WmMinMax_3, - SW_SHOWMINIMIZED, WPF_RESTORETOMAXIMIZED, {-32000,-32000}, {-1,-1}, FALSE }, -/* 46 */ { SW_RESTORE, TRUE, WS_VISIBLE|WS_MAXIMIZE, WmRestore_3, - SW_SHOWMAXIMIZED, WPF_RESTORETOMAXIMIZED, {-32000,-32000}, {-1,-1}, FALSE }, -/* 47 */ { SW_RESTORE, TRUE, WS_VISIBLE, WmRestore_4, - SW_SHOWNORMAL, WPF_RESTORETOMAXIMIZED, {-32000,-32000}, {-1,-1}, FALSE }, -/* 48 */ { SW_SHOWMAXIMIZED, TRUE, WS_VISIBLE|WS_MAXIMIZE, WmShowMaximized_3, - SW_SHOWMAXIMIZED, WPF_RESTORETOMAXIMIZED, {-32000,-32000}, {-1,-1}, FALSE }, -/* 49 */ { SW_SHOW, TRUE, WS_VISIBLE|WS_MAXIMIZE, WmEmptySeq, - SW_SHOWMAXIMIZED, WPF_RESTORETOMAXIMIZED, {-32000,-32000}, {-1,-1}, FALSE }, -/* 50 */ { SW_SHOWNORMAL, TRUE, WS_VISIBLE, WmRestore_5, - SW_SHOWNORMAL, WPF_RESTORETOMAXIMIZED, {-32000,-32000}, {-1,-1}, FALSE }, -/* 51 */ { SW_SHOWNORMAL, TRUE, WS_VISIBLE, WmRestore_5, - SW_SHOWNORMAL, WPF_RESTORETOMAXIMIZED, {-32000,-32000}, {-1,-1}, FALSE }, -/* 52 */ { SW_HIDE, TRUE, 0, WmHide_1, - SW_SHOWNORMAL, WPF_RESTORETOMAXIMIZED, {-32000,-32000}, {-1,-1}, FALSE }, -/* 53 */ { SW_HIDE, FALSE, 0, WmEmptySeq, - SW_SHOWNORMAL, WPF_RESTORETOMAXIMIZED, {-32000,-32000}, {-1,-1}, FALSE }, -/* 54 */ { SW_MINIMIZE, FALSE, WS_VISIBLE|WS_MINIMIZE, WmMinimize_3, - SW_SHOWMINIMIZED, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 55 */ { SW_HIDE, TRUE, WS_MINIMIZE, WmHide_2, - SW_SHOWMINIMIZED, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 56 */ { SW_SHOWNOACTIVATE, FALSE, WS_VISIBLE, WmShowNoActivate_2, - SW_SHOWNORMAL, 0, {-32000,-32000}, {-1,-1}, FALSE }, -/* 57 */ { SW_SHOW, TRUE, WS_VISIBLE, WmEmptySeq, - SW_SHOWNORMAL, 0, {-32000,-32000}, {-1,-1}, FALSE } - }; - HWND hwnd; - DWORD style; - LPARAM ret; - INT i; - WINDOWPLACEMENT wp; - RECT win_rc, work_rc = {0, 0, 0, 0}; - -#define WS_BASE (WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_POPUP|WS_CLIPSIBLINGS) - hwnd = CreateWindowEx(0, "ShowWindowClass", NULL, WS_BASE, - 120, 120, 90, 90, - 0, 0, 0, NULL); - assert(hwnd); - - style = GetWindowLong(hwnd, GWL_STYLE) & ~WS_BASE; - ok(style == 0, "expected style 0, got %08x\n", style); - - flush_events(); - flush_sequence(); - - if (pGetMonitorInfoA && pMonitorFromPoint) - { - HMONITOR hmon; - MONITORINFO mi; - POINT pt = {0, 0}; - - SetLastError(0xdeadbeef); - hmon = pMonitorFromPoint(pt, MONITOR_DEFAULTTOPRIMARY); - ok(hmon != 0, "MonitorFromPoint error %u\n", GetLastError()); - - mi.cbSize = sizeof(mi); - SetLastError(0xdeadbeef); - ret = pGetMonitorInfoA(hmon, &mi); - ok(ret, "GetMonitorInfo error %u\n", GetLastError()); - trace("monitor (%d,%d-%d,%d), work (%d,%d-%d,%d)\n", - mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom, - mi.rcWork.left, mi.rcWork.top, mi.rcWork.right, mi.rcWork.bottom); - work_rc = mi.rcWork; - } - - GetWindowRect(hwnd, &win_rc); - OffsetRect(&win_rc, -work_rc.left, -work_rc.top); - - wp.length = sizeof(wp); - SetLastError(0xdeadbeaf); - ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "GetWindowPlacement error %u\n", GetLastError()); - ok(wp.flags == 0, "expected 0, got %#x\n", wp.flags); - ok(wp.showCmd == SW_SHOWNORMAL, "expected SW_SHOWNORMAL, got %d\n", wp.showCmd); - ok(wp.ptMinPosition.x == -1 && wp.ptMinPosition.y == -1, - "expected -1,-1 got %d,%d\n", wp.ptMinPosition.x, wp.ptMinPosition.y); - ok(wp.ptMaxPosition.x == -1 && wp.ptMaxPosition.y == -1, - "expected -1,-1 got %d,%d\n", wp.ptMaxPosition.x, wp.ptMaxPosition.y); - if (work_rc.left || work_rc.top) todo_wine /* FIXME: remove once Wine is fixed */ - ok(EqualRect(&win_rc, &wp.rcNormalPosition), - "expected %d,%d-%d,%d got %d,%d-%d,%d\n", - win_rc.left, win_rc.top, win_rc.right, win_rc.bottom, - wp.rcNormalPosition.left, wp.rcNormalPosition.top, - wp.rcNormalPosition.right, wp.rcNormalPosition.bottom); - else - ok(EqualRect(&win_rc, &wp.rcNormalPosition), - "expected %d,%d-%d,%d got %d,%d-%d,%d\n", - win_rc.left, win_rc.top, win_rc.right, win_rc.bottom, - wp.rcNormalPosition.left, wp.rcNormalPosition.top, - wp.rcNormalPosition.right, wp.rcNormalPosition.bottom); - - for (i = 0; i < sizeof(sw)/sizeof(sw[0]); i++) - { - static const char * const sw_cmd_name[13] = - { - "SW_HIDE", "SW_SHOWNORMAL", "SW_SHOWMINIMIZED", "SW_SHOWMAXIMIZED", - "SW_SHOWNOACTIVATE", "SW_SHOW", "SW_MINIMIZE", "SW_SHOWMINNOACTIVE", - "SW_SHOWNA", "SW_RESTORE", "SW_SHOWDEFAULT", "SW_FORCEMINIMIZE", - "SW_NORMALNA" /* 0xCC */ - }; - char comment[64]; - INT idx; /* index into the above array of names */ - - idx = (sw[i].cmd == SW_NORMALNA) ? 12 : sw[i].cmd; - - style = GetWindowLong(hwnd, GWL_STYLE); - trace("%d: sending %s, current window style %08x\n", i+1, sw_cmd_name[idx], style); - ret = ShowWindow(hwnd, sw[i].cmd); - ok(!ret == !sw[i].ret, "%d: cmd %s: expected ret %lu, got %lu\n", i+1, sw_cmd_name[idx], sw[i].ret, ret); - style = GetWindowLong(hwnd, GWL_STYLE) & ~WS_BASE; - ok(style == sw[i].style, "%d: expected style %08x, got %08x\n", i+1, sw[i].style, style); - - sprintf(comment, "%d: ShowWindow(%s)", i+1, sw_cmd_name[idx]); - ok_sequence(sw[i].msg, comment, sw[i].todo_msg); - - wp.length = sizeof(wp); - SetLastError(0xdeadbeaf); - ret = GetWindowPlacement(hwnd, &wp); - ok(ret, "GetWindowPlacement error %u\n", GetLastError()); - ok(wp.flags == sw[i].wp_flags, "expected %#x, got %#x\n", sw[i].wp_flags, wp.flags); - ok(wp.showCmd == sw[i].wp_cmd, "expected %d, got %d\n", sw[i].wp_cmd, wp.showCmd); - - /* NT moves the minimized window to -32000,-32000, win9x to 3000,3000 */ - if ((wp.ptMinPosition.x + work_rc.left == -32000 && wp.ptMinPosition.y + work_rc.top == -32000) || - (wp.ptMinPosition.x + work_rc.left == 3000 && wp.ptMinPosition.y + work_rc.top == 3000)) - { - ok((wp.ptMinPosition.x + work_rc.left == sw[i].wp_min.x && wp.ptMinPosition.y + work_rc.top == sw[i].wp_min.y) || - (wp.ptMinPosition.x + work_rc.left == 3000 && wp.ptMinPosition.y + work_rc.top == 3000), - "expected %d,%d got %d,%d\n", sw[i].wp_min.x, sw[i].wp_min.y, wp.ptMinPosition.x, wp.ptMinPosition.y); - } - else - { - if (wp.ptMinPosition.x != sw[i].wp_min.x || wp.ptMinPosition.y != sw[i].wp_min.y) - todo_wine - ok(wp.ptMinPosition.x == sw[i].wp_min.x && wp.ptMinPosition.y == sw[i].wp_min.y, - "expected %d,%d got %d,%d\n", sw[i].wp_min.x, sw[i].wp_min.y, wp.ptMinPosition.x, wp.ptMinPosition.y); - else - ok(wp.ptMinPosition.x == sw[i].wp_min.x && wp.ptMinPosition.y == sw[i].wp_min.y, - "expected %d,%d got %d,%d\n", sw[i].wp_min.x, sw[i].wp_min.y, wp.ptMinPosition.x, wp.ptMinPosition.y); - } - - if (wp.ptMaxPosition.x != sw[i].wp_max.x || wp.ptMaxPosition.y != sw[i].wp_max.y) - todo_wine - ok(wp.ptMaxPosition.x == sw[i].wp_max.x && wp.ptMaxPosition.y == sw[i].wp_max.y, - "expected %d,%d got %d,%d\n", sw[i].wp_max.x, sw[i].wp_max.y, wp.ptMaxPosition.x, wp.ptMaxPosition.y); - else - ok(wp.ptMaxPosition.x == sw[i].wp_max.x && wp.ptMaxPosition.y == sw[i].wp_max.y, - "expected %d,%d got %d,%d\n", sw[i].wp_max.x, sw[i].wp_max.y, wp.ptMaxPosition.x, wp.ptMaxPosition.y); - -if (0) /* FIXME: Wine behaves completely different here */ - ok(EqualRect(&win_rc, &wp.rcNormalPosition), - "expected %d,%d-%d,%d got %d,%d-%d,%d\n", - win_rc.left, win_rc.top, win_rc.right, win_rc.bottom, - wp.rcNormalPosition.left, wp.rcNormalPosition.top, - wp.rcNormalPosition.right, wp.rcNormalPosition.bottom); - - flush_events(); - flush_sequence(); - } - - DestroyWindow(hwnd); -} - -static INT_PTR WINAPI test_dlg_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - struct recvd_message msg; - - if (ignore_message( message )) return 0; - - msg.hwnd = hwnd; - msg.message = message; - msg.flags = sent|wparam|lparam; - msg.wParam = wParam; - msg.lParam = lParam; - msg.descr = "dialog"; - add_message(&msg); - - /* calling DefDlgProc leads to a recursion under XP */ - - switch (message) - { - case WM_INITDIALOG: - case WM_GETDLGCODE: - return 0; - } - return 1; -} - -static const struct message WmDefDlgSetFocus_1[] = { - { WM_GETDLGCODE, sent|wparam|lparam, 0, 0 }, - { WM_GETTEXTLENGTH, sent|wparam|lparam|optional, 0, 0 }, /* XP */ - { WM_GETTEXT, sent|wparam|optional, 6 }, /* XP */ - { WM_GETTEXT, sent|wparam|optional, 12 }, /* XP */ - { EM_SETSEL, sent|wparam, 0 }, /* XP sets lparam to text length, Win9x to -2 */ - { HCBT_SETFOCUS, hook }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|wparam, 0 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 10 }, - { WM_CTLCOLOREDIT, sent }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 11 }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { WM_COMMAND, sent|wparam, MAKEWPARAM(1, EN_SETFOCUS) }, - { 0 } -}; -static const struct message WmDefDlgSetFocus_2[] = { - { WM_GETDLGCODE, sent|wparam|lparam, 0, 0 }, - { WM_GETTEXTLENGTH, sent|wparam|lparam|optional, 0, 0 }, /* XP */ - { WM_GETTEXT, sent|wparam|optional, 6 }, /* XP */ - { WM_GETTEXT, sent|wparam|optional, 12 }, /* XP */ - { EM_SETSEL, sent|wparam, 0 }, /* XP sets lparam to text length, Win9x to -2 */ - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { WM_CTLCOLOREDIT, sent|optional }, /* XP */ - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { 0 } -}; -/* Creation of a dialog */ -static const struct message WmCreateDialogParamSeq_1[] = { - { HCBT_CREATEWND, hook }, - { WM_NCCREATE, sent }, - { WM_NCCALCSIZE, sent|wparam, 0 }, - { WM_CREATE, sent }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - { WM_MOVE, sent }, - { WM_SETFONT, sent }, - { WM_INITDIALOG, sent }, - { WM_CHANGEUISTATE, sent|optional }, - { 0 } -}; -/* Creation of a dialog */ -static const struct message WmCreateDialogParamSeq_2[] = { - { HCBT_CREATEWND, hook }, - { WM_NCCREATE, sent }, - { WM_NCCALCSIZE, sent|wparam, 0 }, - { WM_CREATE, sent }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SIZE, sent|wparam, SIZE_RESTORED }, - { WM_MOVE, sent }, - { WM_CHANGEUISTATE, sent|optional }, - { 0 } -}; - -static void test_dialog_messages(void) -{ - WNDCLASS cls; - HWND hdlg, hedit1, hedit2, hfocus; - LRESULT ret; - -#define set_selection(hctl, start, end) \ - ret = SendMessage(hctl, EM_SETSEL, start, end); \ - ok(ret == 1, "EM_SETSEL returned %ld\n", ret); - -#define check_selection(hctl, start, end) \ - ret = SendMessage(hctl, EM_GETSEL, 0, 0); \ - ok(ret == MAKELRESULT(start, end), "wrong selection (%d - %d)\n", LOWORD(ret), HIWORD(ret)); - - subclass_edit(); - - hdlg = CreateWindowEx(WS_EX_DLGMODALFRAME, "TestDialogClass", NULL, - WS_VISIBLE|WS_CAPTION|WS_SYSMENU|WS_DLGFRAME, - 0, 0, 100, 100, 0, 0, 0, NULL); - ok(hdlg != 0, "Failed to create custom dialog window\n"); - - hedit1 = CreateWindowEx(0, "my_edit_class", NULL, - WS_CHILD|WS_BORDER|WS_VISIBLE|WS_TABSTOP, - 0, 0, 80, 20, hdlg, (HMENU)1, 0, NULL); - ok(hedit1 != 0, "Failed to create edit control\n"); - hedit2 = CreateWindowEx(0, "my_edit_class", NULL, - WS_CHILD|WS_BORDER|WS_VISIBLE|WS_TABSTOP, - 0, 40, 80, 20, hdlg, (HMENU)2, 0, NULL); - ok(hedit2 != 0, "Failed to create edit control\n"); - - SendMessage(hedit1, WM_SETTEXT, 0, (LPARAM)"hello"); - SendMessage(hedit2, WM_SETTEXT, 0, (LPARAM)"bye"); - - hfocus = GetFocus(); - ok(hfocus == hdlg, "wrong focus %p\n", hfocus); - - SetFocus(hedit2); - hfocus = GetFocus(); - ok(hfocus == hedit2, "wrong focus %p\n", hfocus); - - check_selection(hedit1, 0, 0); - check_selection(hedit2, 0, 0); - - set_selection(hedit2, 0, -1); - check_selection(hedit2, 0, 3); - - SetFocus(0); - hfocus = GetFocus(); - ok(hfocus == 0, "wrong focus %p\n", hfocus); - - flush_sequence(); - ret = DefDlgProc(hdlg, WM_SETFOCUS, 0, 0); - ok(ret == 0, "WM_SETFOCUS returned %ld\n", ret); - ok_sequence(WmDefDlgSetFocus_1, "DefDlgProc(WM_SETFOCUS) 1", FALSE); - - hfocus = GetFocus(); - ok(hfocus == hedit1, "wrong focus %p\n", hfocus); - - check_selection(hedit1, 0, 5); - check_selection(hedit2, 0, 3); - - flush_sequence(); - ret = DefDlgProc(hdlg, WM_SETFOCUS, 0, 0); - ok(ret == 0, "WM_SETFOCUS returned %ld\n", ret); - ok_sequence(WmDefDlgSetFocus_2, "DefDlgProc(WM_SETFOCUS) 2", FALSE); - - hfocus = GetFocus(); - ok(hfocus == hedit1, "wrong focus %p\n", hfocus); - - check_selection(hedit1, 0, 5); - check_selection(hedit2, 0, 3); - - EndDialog(hdlg, 0); - DestroyWindow(hedit1); - DestroyWindow(hedit2); - DestroyWindow(hdlg); - flush_sequence(); - -#undef set_selection -#undef check_selection - - ok(GetClassInfo(0, "#32770", &cls), "GetClassInfo failed\n"); - cls.lpszClassName = "MyDialogClass"; - cls.hInstance = GetModuleHandle(0); - /* need a cast since a dlgproc is used as a wndproc */ - cls.lpfnWndProc = (WNDPROC)test_dlg_proc; - if (!RegisterClass(&cls)) assert(0); - - hdlg = CreateDialogParam(0, "CLASS_TEST_DIALOG_2", 0, test_dlg_proc, 0); - ok(IsWindow(hdlg), "CreateDialogParam failed\n"); - ok_sequence(WmCreateDialogParamSeq_1, "CreateDialogParam_1", FALSE); - EndDialog(hdlg, 0); - DestroyWindow(hdlg); - flush_sequence(); - - hdlg = CreateDialogParam(0, "CLASS_TEST_DIALOG_2", 0, NULL, 0); - ok(IsWindow(hdlg), "CreateDialogParam failed\n"); - ok_sequence(WmCreateDialogParamSeq_2, "CreateDialogParam_2", FALSE); - EndDialog(hdlg, 0); - DestroyWindow(hdlg); - flush_sequence(); - - UnregisterClass(cls.lpszClassName, cls.hInstance); -} - -static void test_nullCallback(void) -{ - HWND hwnd; - - hwnd = CreateWindowExA(0, "TestWindowClass", "Test overlapped", WS_OVERLAPPEDWINDOW, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok (hwnd != 0, "Failed to create overlapped window\n"); - - SendMessageCallbackA(hwnd,WM_NULL,0,0,NULL,0); - flush_events(); - DestroyWindow(hwnd); -} - -/* SetActiveWindow( 0 ) hwnd visible */ -static const struct message SetActiveWindowSeq0[] = -{ - { HCBT_ACTIVATE, hook|optional }, - { WM_NCACTIVATE, sent|wparam, 0 }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ACTIVATE, sent|wparam, 0 }, - { WM_ACTIVATEAPP, sent|wparam|optional, 0 }, - { WM_ACTIVATEAPP, sent|wparam|optional, 0 }, - { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, - { WM_KILLFOCUS, sent|optional }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCACTIVATE, sent|wparam|optional, 1 }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ACTIVATE, sent|wparam|optional, 1 }, - { HCBT_SETFOCUS, hook|optional }, - { WM_KILLFOCUS, sent|defwinproc|optional }, - { WM_IME_SETCONTEXT, sent|defwinproc|optional }, - { WM_IME_SETCONTEXT, sent|defwinproc|optional }, - { WM_IME_SETCONTEXT, sent|optional }, - { WM_IME_SETCONTEXT, sent|optional }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { WM_SETFOCUS, sent|defwinproc|optional }, - { WM_GETTEXT, sent|optional }, - { 0 } -}; -/* SetActiveWindow( hwnd ) hwnd visible */ -static const struct message SetActiveWindowSeq1[] = -{ - { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, - { 0 } -}; -/* SetActiveWindow( popup ) hwnd visible, popup visible */ -static const struct message SetActiveWindowSeq2[] = -{ - { HCBT_ACTIVATE, hook }, - { WM_NCACTIVATE, sent|wparam, 0 }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ACTIVATE, sent|wparam, 0 }, - { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE }, - { WM_NCPAINT, sent|optional }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ERASEBKGND, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_NCACTIVATE, sent|wparam, 1 }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ACTIVATE, sent|wparam, 1 }, - { HCBT_SETFOCUS, hook }, - { WM_KILLFOCUS, sent|defwinproc }, - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 0 }, - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { WM_SETFOCUS, sent|defwinproc }, - { WM_GETTEXT, sent|optional }, - { 0 } -}; - -/* SetActiveWindow( hwnd ) hwnd not visible */ -static const struct message SetActiveWindowSeq3[] = -{ - { HCBT_ACTIVATE, hook }, - { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE|SWP_NOMOVE }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOACTIVATE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_ACTIVATEAPP, sent|wparam, 1 }, - { WM_ACTIVATEAPP, sent|wparam, 1 }, - { WM_NCACTIVATE, sent|wparam, 1 }, - { WM_ACTIVATE, sent|wparam, 1 }, - { HCBT_SETFOCUS, hook }, - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { WM_SETFOCUS, sent|defwinproc }, - { 0 } -}; -/* SetActiveWindow( popup ) hwnd not visible, popup not visible */ -static const struct message SetActiveWindowSeq4[] = -{ - { HCBT_ACTIVATE, hook }, - { WM_NCACTIVATE, sent|wparam, 0 }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ACTIVATE, sent|wparam, 0 }, - { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE|SWP_NOMOVE }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { WM_NCACTIVATE, sent|wparam, 1 }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ACTIVATE, sent|wparam, 1 }, - { HCBT_SETFOCUS, hook }, - { WM_KILLFOCUS, sent|defwinproc }, - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 0 }, - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 1 }, - { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { WM_SETFOCUS, sent|defwinproc }, - { 0 } -}; - - -static void test_SetActiveWindow(void) -{ - HWND hwnd, popup, ret; - - hwnd = CreateWindowExA(0, "TestWindowClass", "Test SetActiveWindow", - WS_OVERLAPPEDWINDOW | WS_VISIBLE, - 100, 100, 200, 200, 0, 0, 0, NULL); - - popup = CreateWindowExA(0, "TestWindowClass", "Test SetActiveWindow", - WS_OVERLAPPEDWINDOW | WS_VISIBLE | WS_POPUP, - 100, 100, 200, 200, hwnd, 0, 0, NULL); - - ok(hwnd != 0, "Failed to create overlapped window\n"); - ok(popup != 0, "Failed to create popup window\n"); - SetForegroundWindow( popup ); - flush_sequence(); - - trace("SetActiveWindow(0)\n"); - ret = SetActiveWindow(0); - ok( ret == popup, "Failed to SetActiveWindow(0)\n"); - ok_sequence(SetActiveWindowSeq0, "SetActiveWindow(0)", FALSE); - flush_sequence(); - - trace("SetActiveWindow(hwnd), hwnd visible\n"); - ret = SetActiveWindow(hwnd); - if (ret == hwnd) ok_sequence(SetActiveWindowSeq1, "SetActiveWindow(hwnd), hwnd visible", TRUE); - flush_sequence(); - - trace("SetActiveWindow(popup), hwnd visible, popup visible\n"); - ret = SetActiveWindow(popup); - ok( ret == hwnd, "Failed to SetActiveWindow(popup), popup visible\n"); - ok_sequence(SetActiveWindowSeq2, "SetActiveWindow(popup), hwnd visible, popup visible", FALSE); - flush_sequence(); - - ShowWindow(hwnd, SW_HIDE); - ShowWindow(popup, SW_HIDE); - flush_sequence(); - - trace("SetActiveWindow(hwnd), hwnd not visible\n"); - ret = SetActiveWindow(hwnd); - ok( ret == NULL, "SetActiveWindow(hwnd), hwnd not visible, previous is %p\n", ret ); - ok_sequence(SetActiveWindowSeq3, "SetActiveWindow(hwnd), hwnd not visible", TRUE); - flush_sequence(); - - trace("SetActiveWindow(popup), hwnd not visible, popup not visible\n"); - ret = SetActiveWindow(popup); - ok( ret == hwnd, "Failed to SetActiveWindow(popup)\n"); - ok_sequence(SetActiveWindowSeq4, "SetActiveWindow(popup), hwnd not visible, popup not visible", TRUE); - flush_sequence(); - - trace("done\n"); - - DestroyWindow(hwnd); -} - -static const struct message SetForegroundWindowSeq[] = -{ - { WM_NCACTIVATE, sent|wparam, 0 }, - { WM_GETTEXT, sent|defwinproc|optional }, - { WM_ACTIVATE, sent|wparam, 0 }, - { WM_ACTIVATEAPP, sent|wparam, 0 }, - { WM_KILLFOCUS, sent }, - { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, - { WM_IME_NOTIFY, sent|wparam|optional|defwinproc, 1 }, - { 0 } -}; - -static void test_SetForegroundWindow(void) -{ - HWND hwnd; - - hwnd = CreateWindowExA(0, "TestWindowClass", "Test SetForegroundWindow", - WS_OVERLAPPEDWINDOW | WS_VISIBLE, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok (hwnd != 0, "Failed to create overlapped window\n"); - SetForegroundWindow( hwnd ); - flush_sequence(); - - trace("SetForegroundWindow( 0 )\n"); - SetForegroundWindow( 0 ); - ok_sequence(WmEmptySeq, "SetForegroundWindow( 0 ) away from foreground top level window", FALSE); - trace("SetForegroundWindow( GetDesktopWindow() )\n"); - SetForegroundWindow( GetDesktopWindow() ); - ok_sequence(SetForegroundWindowSeq, "SetForegroundWindow( desktop ) away from " - "foreground top level window", FALSE); - trace("done\n"); - - DestroyWindow(hwnd); -} - -static void test_dbcs_wm_char(void) -{ - BYTE dbch[2]; - WCHAR wch, bad_wch; - HWND hwnd, hwnd2; - MSG msg; - DWORD time; - POINT pt; - DWORD_PTR res; - CPINFOEXA cpinfo; - UINT i, j, k; - struct message wmCharSeq[2]; - - if (!pGetCPInfoExA) - { - win_skip("GetCPInfoExA is not available\n"); - return; - } - - pGetCPInfoExA( CP_ACP, 0, &cpinfo ); - if (cpinfo.MaxCharSize != 2) - { - skip( "Skipping DBCS WM_CHAR test in SBCS codepage '%s'\n", cpinfo.CodePageName ); - return; - } - - dbch[0] = dbch[1] = 0; - wch = 0; - bad_wch = cpinfo.UnicodeDefaultChar; - for (i = 0; !wch && i < MAX_LEADBYTES && cpinfo.LeadByte[i]; i += 2) - for (j = cpinfo.LeadByte[i]; !wch && j <= cpinfo.LeadByte[i+1]; j++) - for (k = 128; k <= 255; k++) - { - char str[2]; - WCHAR wstr[2]; - str[0] = j; - str[1] = k; - if (MultiByteToWideChar( CP_ACP, 0, str, 2, wstr, 2 ) == 1 && - WideCharToMultiByte( CP_ACP, 0, wstr, 1, str, 2, NULL, NULL ) == 2 && - (BYTE)str[0] == j && (BYTE)str[1] == k && - HIBYTE(wstr[0]) && HIBYTE(wstr[0]) != 0xff) - { - dbch[0] = j; - dbch[1] = k; - wch = wstr[0]; - break; - } - } - - if (!wch) - { - skip( "Skipping DBCS WM_CHAR test, no appropriate char found\n" ); - return; - } - trace( "using dbcs char %02x,%02x wchar %04x bad wchar %04x codepage '%s'\n", - dbch[0], dbch[1], wch, bad_wch, cpinfo.CodePageName ); - - hwnd = CreateWindowExW(0, testWindowClassW, NULL, - WS_OVERLAPPEDWINDOW, 100, 100, 200, 200, 0, 0, 0, NULL); - hwnd2 = CreateWindowExW(0, testWindowClassW, NULL, - WS_OVERLAPPEDWINDOW, 100, 100, 200, 200, 0, 0, 0, NULL); - ok (hwnd != 0, "Failed to create overlapped window\n"); - ok (hwnd2 != 0, "Failed to create overlapped window\n"); - flush_sequence(); - - memset( wmCharSeq, 0, sizeof(wmCharSeq) ); - wmCharSeq[0].message = WM_CHAR; - wmCharSeq[0].flags = sent|wparam; - wmCharSeq[0].wParam = wch; - - /* posted message */ - PostMessageA( hwnd, WM_CHAR, dbch[0], 0 ); - ok( !PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "got message %x\n", msg.message ); - PostMessageA( hwnd, WM_CHAR, dbch[1], 0 ); - ok( PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "no message\n" ); - ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message ); - ok( msg.wParam == wch, "bad wparam %lx/%x\n", msg.wParam, wch ); - ok( !PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "got message %x\n", msg.message ); - - /* posted thread message */ - PostThreadMessageA( GetCurrentThreadId(), WM_CHAR, dbch[0], 0 ); - ok( !PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "got message %x\n", msg.message ); - PostMessageA( hwnd, WM_CHAR, dbch[1], 0 ); - ok( PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "no message\n" ); - ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message ); - ok( msg.wParam == wch, "bad wparam %lx/%x\n", msg.wParam, wch ); - ok( !PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "got message %x\n", msg.message ); - - /* sent message */ - flush_sequence(); - SendMessageA( hwnd, WM_CHAR, dbch[0], 0 ); - ok_sequence( WmEmptySeq, "no messages", FALSE ); - SendMessageA( hwnd, WM_CHAR, dbch[1], 0 ); - ok_sequence( wmCharSeq, "Unicode WM_CHAR", FALSE ); - ok( !PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "got message %x\n", msg.message ); - - /* sent message with timeout */ - flush_sequence(); - SendMessageTimeoutA( hwnd, WM_CHAR, dbch[0], 0, SMTO_NORMAL, 0, &res ); - ok_sequence( WmEmptySeq, "no messages", FALSE ); - SendMessageTimeoutA( hwnd, WM_CHAR, dbch[1], 0, SMTO_NORMAL, 0, &res ); - ok_sequence( wmCharSeq, "Unicode WM_CHAR", FALSE ); - ok( !PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "got message %x\n", msg.message ); - - /* sent message with timeout and callback */ - flush_sequence(); - SendMessageTimeoutA( hwnd, WM_CHAR, dbch[0], 0, SMTO_NORMAL, 0, &res ); - ok_sequence( WmEmptySeq, "no messages", FALSE ); - SendMessageCallbackA( hwnd, WM_CHAR, dbch[1], 0, NULL, 0 ); - ok_sequence( wmCharSeq, "Unicode WM_CHAR", FALSE ); - ok( !PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "got message %x\n", msg.message ); - - /* sent message with callback */ - flush_sequence(); - SendNotifyMessageA( hwnd, WM_CHAR, dbch[0], 0 ); - ok_sequence( WmEmptySeq, "no messages", FALSE ); - SendMessageCallbackA( hwnd, WM_CHAR, dbch[1], 0, NULL, 0 ); - ok_sequence( wmCharSeq, "Unicode WM_CHAR", FALSE ); - ok( !PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "got message %x\n", msg.message ); - - /* direct window proc call */ - flush_sequence(); - CallWindowProcA( (WNDPROC)GetWindowLongPtrA( hwnd, GWLP_WNDPROC ), hwnd, WM_CHAR, dbch[0], 0 ); - ok_sequence( WmEmptySeq, "no messages", FALSE ); - CallWindowProcA( (WNDPROC)GetWindowLongPtrA( hwnd, GWLP_WNDPROC ), hwnd, WM_CHAR, dbch[1], 0 ); - ok_sequence( wmCharSeq, "Unicode WM_CHAR", FALSE ); - - /* dispatch message */ - msg.hwnd = hwnd; - msg.message = WM_CHAR; - msg.wParam = dbch[0]; - msg.lParam = 0; - DispatchMessageA( &msg ); - ok_sequence( WmEmptySeq, "no messages", FALSE ); - msg.wParam = dbch[1]; - DispatchMessageA( &msg ); - ok_sequence( wmCharSeq, "Unicode WM_CHAR", FALSE ); - - /* window handle is irrelevant */ - flush_sequence(); - SendMessageA( hwnd2, WM_CHAR, dbch[0], 0 ); - ok_sequence( WmEmptySeq, "no messages", FALSE ); - SendMessageA( hwnd, WM_CHAR, dbch[1], 0 ); - ok_sequence( wmCharSeq, "Unicode WM_CHAR", FALSE ); - ok( !PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "got message %x\n", msg.message ); - - /* interleaved post and send */ - flush_sequence(); - PostMessageA( hwnd2, WM_CHAR, dbch[0], 0 ); - SendMessageA( hwnd2, WM_CHAR, dbch[0], 0 ); - ok_sequence( WmEmptySeq, "no messages", FALSE ); - ok( !PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "got message %x\n", msg.message ); - PostMessageA( hwnd, WM_CHAR, dbch[1], 0 ); - ok_sequence( WmEmptySeq, "no messages", FALSE ); - ok( PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "no message\n" ); - ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message ); - ok( msg.wParam == wch, "bad wparam %lx/%x\n", msg.wParam, wch ); - ok( !PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "got message %x\n", msg.message ); - SendMessageA( hwnd, WM_CHAR, dbch[1], 0 ); - ok_sequence( wmCharSeq, "Unicode WM_CHAR", FALSE ); - ok( !PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "got message %x\n", msg.message ); - - /* interleaved sent message and winproc */ - flush_sequence(); - SendMessageA( hwnd, WM_CHAR, dbch[0], 0 ); - CallWindowProcA( (WNDPROC)GetWindowLongPtrA( hwnd, GWLP_WNDPROC ), hwnd, WM_CHAR, dbch[0], 0 ); - ok_sequence( WmEmptySeq, "no messages", FALSE ); - SendMessageA( hwnd, WM_CHAR, dbch[1], 0 ); - ok_sequence( wmCharSeq, "Unicode WM_CHAR", FALSE ); - CallWindowProcA( (WNDPROC)GetWindowLongPtrA( hwnd, GWLP_WNDPROC ), hwnd, WM_CHAR, dbch[1], 0 ); - ok_sequence( wmCharSeq, "Unicode WM_CHAR", FALSE ); - - /* interleaved winproc and dispatch */ - msg.hwnd = hwnd; - msg.message = WM_CHAR; - msg.wParam = dbch[0]; - msg.lParam = 0; - CallWindowProcA( (WNDPROC)GetWindowLongPtrA( hwnd, GWLP_WNDPROC ), hwnd, WM_CHAR, dbch[0], 0 ); - DispatchMessageA( &msg ); - ok_sequence( WmEmptySeq, "no messages", FALSE ); - msg.wParam = dbch[1]; - DispatchMessageA( &msg ); - ok_sequence( wmCharSeq, "Unicode WM_CHAR", FALSE ); - CallWindowProcA( (WNDPROC)GetWindowLongPtrA( hwnd, GWLP_WNDPROC ), hwnd, WM_CHAR, dbch[1], 0 ); - ok_sequence( wmCharSeq, "Unicode WM_CHAR", FALSE ); - - /* interleaved sends */ - flush_sequence(); - SendMessageA( hwnd, WM_CHAR, dbch[0], 0 ); - SendMessageCallbackA( hwnd, WM_CHAR, dbch[0], 0, NULL, 0 ); - ok_sequence( WmEmptySeq, "no messages", FALSE ); - SendMessageTimeoutA( hwnd, WM_CHAR, dbch[1], 0, SMTO_NORMAL, 0, &res ); - ok_sequence( wmCharSeq, "Unicode WM_CHAR", FALSE ); - SendMessageA( hwnd, WM_CHAR, dbch[1], 0 ); - ok_sequence( wmCharSeq, "Unicode WM_CHAR", FALSE ); - - /* dbcs WM_CHAR */ - flush_sequence(); - SendMessageA( hwnd2, WM_CHAR, (dbch[1] << 8) | dbch[0], 0 ); - ok_sequence( wmCharSeq, "Unicode WM_CHAR", FALSE ); - ok( !PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "got message %x\n", msg.message ); - - /* other char messages are not magic */ - PostMessageA( hwnd, WM_SYSCHAR, dbch[0], 0 ); - ok( PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "no message\n" ); - ok( msg.message == WM_SYSCHAR, "unexpected message %x\n", msg.message ); - ok( msg.wParam == bad_wch, "bad wparam %lx/%x\n", msg.wParam, bad_wch ); - ok( !PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "got message %x\n", msg.message ); - PostMessageA( hwnd, WM_DEADCHAR, dbch[0], 0 ); - ok( PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "no message\n" ); - ok( msg.message == WM_DEADCHAR, "unexpected message %x\n", msg.message ); - ok( msg.wParam == bad_wch, "bad wparam %lx/%x\n", msg.wParam, bad_wch ); - ok( !PeekMessageW( &msg, hwnd, 0, 0, PM_REMOVE ), "got message %x\n", msg.message ); - - /* test retrieving messages */ - - PostMessageW( hwnd, WM_CHAR, wch, 0 ); - ok( PeekMessageA( &msg, hwnd, 0, 0, PM_REMOVE ), "no message\n" ); - ok( msg.hwnd == hwnd, "unexpected hwnd %p\n", msg.hwnd ); - ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message ); - ok( msg.wParam == dbch[0], "bad wparam %lx/%x\n", msg.wParam, dbch[0] ); - ok( PeekMessageA( &msg, hwnd, 0, 0, PM_REMOVE ), "no message\n" ); - ok( msg.hwnd == hwnd, "unexpected hwnd %p\n", msg.hwnd ); - ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message ); - ok( msg.wParam == dbch[1], "bad wparam %lx/%x\n", msg.wParam, dbch[0] ); - ok( !PeekMessageA( &msg, hwnd, 0, 0, PM_REMOVE ), "got message %x\n", msg.message ); - - /* message filters */ - PostMessageW( hwnd, WM_CHAR, wch, 0 ); - ok( PeekMessageA( &msg, hwnd, 0, 0, PM_REMOVE ), "no message\n" ); - ok( msg.hwnd == hwnd, "unexpected hwnd %p\n", msg.hwnd ); - ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message ); - ok( msg.wParam == dbch[0], "bad wparam %lx/%x\n", msg.wParam, dbch[0] ); - /* message id is filtered, hwnd is not */ - ok( !PeekMessageA( &msg, hwnd, WM_MOUSEFIRST, WM_MOUSELAST, PM_REMOVE ), "no message\n" ); - ok( PeekMessageA( &msg, hwnd2, 0, 0, PM_REMOVE ), "no message\n" ); - ok( msg.hwnd == hwnd, "unexpected hwnd %p\n", msg.hwnd ); - ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message ); - ok( msg.wParam == dbch[1], "bad wparam %lx/%x\n", msg.wParam, dbch[0] ); - ok( !PeekMessageA( &msg, hwnd, 0, 0, PM_REMOVE ), "got message %x\n", msg.message ); - - /* mixing GetMessage and PostMessage */ - PostMessageW( hwnd, WM_CHAR, wch, 0xbeef ); - ok( GetMessageA( &msg, hwnd, 0, 0 ), "no message\n" ); - ok( msg.hwnd == hwnd, "unexpected hwnd %p\n", msg.hwnd ); - ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message ); - ok( msg.wParam == dbch[0], "bad wparam %lx/%x\n", msg.wParam, dbch[0] ); - ok( msg.lParam == 0xbeef, "bad lparam %lx\n", msg.lParam ); - time = msg.time; - pt = msg.pt; - ok( time - GetTickCount() <= 100, "bad time %x\n", msg.time ); - ok( PeekMessageA( &msg, 0, 0, 0, PM_REMOVE ), "no message\n" ); - ok( msg.hwnd == hwnd, "unexpected hwnd %p\n", msg.hwnd ); - ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message ); - ok( msg.wParam == dbch[1], "bad wparam %lx/%x\n", msg.wParam, dbch[0] ); - ok( msg.lParam == 0xbeef, "bad lparam %lx\n", msg.lParam ); - ok( msg.time == time, "bad time %x/%x\n", msg.time, time ); - ok( msg.pt.x == pt.x && msg.pt.y == pt.y, "bad point %u,%u/%u,%u\n", msg.pt.x, msg.pt.y, pt.x, pt.y ); - ok( !PeekMessageA( &msg, hwnd, 0, 0, PM_REMOVE ), "got message %x\n", msg.message ); - - /* without PM_REMOVE */ - PostMessageW( hwnd, WM_CHAR, wch, 0 ); - ok( PeekMessageA( &msg, 0, 0, 0, PM_NOREMOVE ), "no message\n" ); - ok( msg.hwnd == hwnd, "unexpected hwnd %p\n", msg.hwnd ); - ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message ); - ok( msg.wParam == dbch[0], "bad wparam %lx/%x\n", msg.wParam, dbch[0] ); - ok( PeekMessageA( &msg, 0, 0, 0, PM_REMOVE ), "no message\n" ); - ok( msg.hwnd == hwnd, "unexpected hwnd %p\n", msg.hwnd ); - ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message ); - ok( msg.wParam == dbch[0], "bad wparam %lx/%x\n", msg.wParam, dbch[0] ); - ok( PeekMessageA( &msg, 0, 0, 0, PM_NOREMOVE ), "no message\n" ); - ok( msg.hwnd == hwnd, "unexpected hwnd %p\n", msg.hwnd ); - ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message ); - ok( msg.wParam == dbch[1], "bad wparam %lx/%x\n", msg.wParam, dbch[0] ); - ok( PeekMessageA( &msg, 0, 0, 0, PM_REMOVE ), "no message\n" ); - ok( msg.hwnd == hwnd, "unexpected hwnd %p\n", msg.hwnd ); - ok( msg.message == WM_CHAR, "unexpected message %x\n", msg.message ); - ok( msg.wParam == dbch[1], "bad wparam %lx/%x\n", msg.wParam, dbch[0] ); - ok( !PeekMessageA( &msg, hwnd, 0, 0, PM_REMOVE ), "got message %x\n", msg.message ); - - DestroyWindow(hwnd); - DestroyWindow(hwnd2); -} - -#define ID_LISTBOX 0x000f - -static const struct message wm_lb_setcursel_0[] = -{ - { LB_SETCURSEL, sent|wparam|lparam, 0, 0 }, - { WM_CTLCOLORLISTBOX, sent|parent }, - { WM_DRAWITEM, sent|wparam|lparam|parent, ID_LISTBOX, 0x000120f2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 1 }, - { EVENT_OBJECT_SELECTION, winevent_hook|wparam|lparam, OBJID_CLIENT, 1 }, - { 0 } -}; -static const struct message wm_lb_setcursel_1[] = -{ - { LB_SETCURSEL, sent|wparam|lparam, 1, 0 }, - { WM_CTLCOLORLISTBOX, sent|parent }, - { WM_DRAWITEM, sent|wparam|lparam|parent, ID_LISTBOX, 0x000020f2 }, - { WM_CTLCOLORLISTBOX, sent|parent }, - { WM_DRAWITEM, sent|wparam|lparam|parent, ID_LISTBOX, 0x000121f2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 2 }, - { EVENT_OBJECT_SELECTION, winevent_hook|wparam|lparam, OBJID_CLIENT, 2 }, - { 0 } -}; -static const struct message wm_lb_setcursel_2[] = -{ - { LB_SETCURSEL, sent|wparam|lparam, 2, 0 }, - { WM_CTLCOLORLISTBOX, sent|parent }, - { WM_DRAWITEM, sent|wparam|lparam|parent, ID_LISTBOX, 0x000021f2 }, - { WM_CTLCOLORLISTBOX, sent|parent }, - { WM_DRAWITEM, sent|wparam|lparam|parent, ID_LISTBOX, 0x000122f2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 3 }, - { EVENT_OBJECT_SELECTION, winevent_hook|wparam|lparam, OBJID_CLIENT, 3 }, - { 0 } -}; -static const struct message wm_lb_click_0[] = -{ - { WM_LBUTTONDOWN, sent|wparam|lparam, 0, MAKELPARAM(1,1) }, - { HCBT_SETFOCUS, hook }, - { WM_KILLFOCUS, sent|parent }, - { WM_IME_SETCONTEXT, sent|wparam|optional|parent, 0 }, - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|defwinproc }, - - { WM_DRAWITEM, sent|wparam|lparam|parent, ID_LISTBOX, 0x001142f2 }, - { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_LISTBOX, LBN_SETFOCUS) }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 3 }, - { WM_LBTRACKPOINT, sent|wparam|lparam|parent, 0, MAKELPARAM(1,1) }, - { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, 0, 0 }, - - { WM_DRAWITEM, sent|wparam|lparam|parent, ID_LISTBOX, 0x000142f2 }, - { WM_CTLCOLORLISTBOX, sent|parent }, - { WM_DRAWITEM, sent|wparam|lparam|parent, ID_LISTBOX, 0x000022f2 }, - { WM_CTLCOLORLISTBOX, sent|parent }, - { WM_DRAWITEM, sent|wparam|lparam|parent, ID_LISTBOX, 0x000120f2 }, - { WM_DRAWITEM, sent|wparam|lparam|parent, ID_LISTBOX, 0x001140f2 }, - - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 1 }, - { EVENT_OBJECT_SELECTION, winevent_hook|wparam|lparam, OBJID_CLIENT, 1 }, - - { WM_LBUTTONUP, sent|wparam|lparam, 0, 0 }, - { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0 }, - { WM_CAPTURECHANGED, sent|wparam|lparam|defwinproc, 0, 0 }, - { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_LISTBOX, LBN_SELCHANGE) }, - { 0 } -}; -static const struct message wm_lb_deletestring[] = -{ - { LB_DELETESTRING, sent|wparam|lparam, 0, 0 }, - { WM_DELETEITEM, sent|wparam|parent|optional, ID_LISTBOX, 0 }, - { WM_DRAWITEM, sent|wparam|parent|optional, ID_LISTBOX }, - { WM_DRAWITEM, sent|wparam|parent|optional, ID_LISTBOX }, - { 0 } -}; -static const struct message wm_lb_deletestring_reset[] = -{ - { LB_DELETESTRING, sent|wparam|lparam, 0, 0 }, - { LB_RESETCONTENT, sent|wparam|lparam|defwinproc|optional, 0, 0 }, - { WM_DELETEITEM, sent|wparam|parent|optional, ID_LISTBOX, 0 }, - { WM_DRAWITEM, sent|wparam|parent|optional, ID_LISTBOX }, - { WM_DRAWITEM, sent|wparam|parent|optional, ID_LISTBOX }, - { 0 } -}; - -#define check_lb_state(a1, a2, a3, a4, a5) check_lb_state_dbg(a1, a2, a3, a4, a5, __LINE__) - -static LRESULT (WINAPI *listbox_orig_proc)(HWND, UINT, WPARAM, LPARAM); - -static LRESULT WINAPI listbox_hook_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp) -{ - static LONG defwndproc_counter = 0; - LRESULT ret; - struct recvd_message msg; - - /* do not log painting messages */ - if (message != WM_PAINT && - message != WM_NCPAINT && - message != WM_SYNCPAINT && - message != WM_ERASEBKGND && - message != WM_NCHITTEST && - message != WM_GETTEXT && - !ignore_message( message )) - { - msg.hwnd = hwnd; - msg.message = message; - msg.flags = sent|wparam|lparam; - if (defwndproc_counter) msg.flags |= defwinproc; - msg.wParam = wp; - msg.lParam = lp; - msg.descr = "listbox"; - add_message(&msg); - } - - defwndproc_counter++; - ret = CallWindowProcA(listbox_orig_proc, hwnd, message, wp, lp); - defwndproc_counter--; - - return ret; -} - -static void check_lb_state_dbg(HWND listbox, int count, int cur_sel, - int caret_index, int top_index, int line) -{ - LRESULT ret; - - /* calling an orig proc helps to avoid unnecessary message logging */ - ret = CallWindowProcA(listbox_orig_proc, listbox, LB_GETCOUNT, 0, 0); - ok_(__FILE__, line)(ret == count, "expected count %d, got %ld\n", count, ret); - ret = CallWindowProcA(listbox_orig_proc, listbox, LB_GETCURSEL, 0, 0); - ok_(__FILE__, line)(ret == cur_sel, "expected cur sel %d, got %ld\n", cur_sel, ret); - ret = CallWindowProcA(listbox_orig_proc, listbox, LB_GETCARETINDEX, 0, 0); - ok_(__FILE__, line)(ret == caret_index || - broken(cur_sel == -1 && caret_index == 0 && ret == -1), /* nt4 */ - "expected caret index %d, got %ld\n", caret_index, ret); - ret = CallWindowProcA(listbox_orig_proc, listbox, LB_GETTOPINDEX, 0, 0); - ok_(__FILE__, line)(ret == top_index, "expected top index %d, got %ld\n", top_index, ret); -} - -static void test_listbox_messages(void) -{ - HWND parent, listbox; - LRESULT ret; - - parent = CreateWindowExA(0, "TestParentClass", NULL, WS_OVERLAPPEDWINDOW | WS_VISIBLE, - 100, 100, 200, 200, 0, 0, 0, NULL); - listbox = CreateWindowExA(WS_EX_NOPARENTNOTIFY, "ListBox", NULL, - WS_CHILD | LBS_NOTIFY | LBS_OWNERDRAWVARIABLE | LBS_HASSTRINGS | WS_VISIBLE, - 10, 10, 80, 80, parent, (HMENU)ID_LISTBOX, 0, NULL); - listbox_orig_proc = (WNDPROC)SetWindowLongPtrA(listbox, GWLP_WNDPROC, (ULONG_PTR)listbox_hook_proc); - - check_lb_state(listbox, 0, LB_ERR, 0, 0); - - ret = SendMessage(listbox, LB_ADDSTRING, 0, (LPARAM)"item 0"); - ok(ret == 0, "expected 0, got %ld\n", ret); - ret = SendMessage(listbox, LB_ADDSTRING, 0, (LPARAM)"item 1"); - ok(ret == 1, "expected 1, got %ld\n", ret); - ret = SendMessage(listbox, LB_ADDSTRING, 0, (LPARAM)"item 2"); - ok(ret == 2, "expected 2, got %ld\n", ret); - - check_lb_state(listbox, 3, LB_ERR, 0, 0); - - flush_sequence(); - - log_all_parent_messages++; - - trace("selecting item 0\n"); - ret = SendMessage(listbox, LB_SETCURSEL, 0, 0); - ok(ret == 0, "expected 0, got %ld\n", ret); - ok_sequence(wm_lb_setcursel_0, "LB_SETCURSEL 0", FALSE ); - check_lb_state(listbox, 3, 0, 0, 0); - flush_sequence(); - - trace("selecting item 1\n"); - ret = SendMessage(listbox, LB_SETCURSEL, 1, 0); - ok(ret == 1, "expected 1, got %ld\n", ret); - ok_sequence(wm_lb_setcursel_1, "LB_SETCURSEL 1", FALSE ); - check_lb_state(listbox, 3, 1, 1, 0); - - trace("selecting item 2\n"); - ret = SendMessage(listbox, LB_SETCURSEL, 2, 0); - ok(ret == 2, "expected 2, got %ld\n", ret); - ok_sequence(wm_lb_setcursel_2, "LB_SETCURSEL 2", FALSE ); - check_lb_state(listbox, 3, 2, 2, 0); - - trace("clicking on item 0\n"); - ret = SendMessage(listbox, WM_LBUTTONDOWN, 0, MAKELPARAM(1, 1)); - ok(ret == LB_OKAY, "expected LB_OKAY, got %ld\n", ret); - ret = SendMessage(listbox, WM_LBUTTONUP, 0, 0); - ok(ret == LB_OKAY, "expected LB_OKAY, got %ld\n", ret); - ok_sequence(wm_lb_click_0, "WM_LBUTTONDOWN 0", FALSE ); - check_lb_state(listbox, 3, 0, 0, 0); - flush_sequence(); - - trace("deleting item 0\n"); - ret = SendMessage(listbox, LB_DELETESTRING, 0, 0); - ok(ret == 2, "expected 2, got %ld\n", ret); - ok_sequence(wm_lb_deletestring, "LB_DELETESTRING 0", FALSE ); - check_lb_state(listbox, 2, -1, 0, 0); - flush_sequence(); - - trace("deleting item 0\n"); - ret = SendMessage(listbox, LB_DELETESTRING, 0, 0); - ok(ret == 1, "expected 1, got %ld\n", ret); - ok_sequence(wm_lb_deletestring, "LB_DELETESTRING 0", FALSE ); - check_lb_state(listbox, 1, -1, 0, 0); - flush_sequence(); - - trace("deleting item 0\n"); - ret = SendMessage(listbox, LB_DELETESTRING, 0, 0); - ok(ret == 0, "expected 0, got %ld\n", ret); - ok_sequence(wm_lb_deletestring_reset, "LB_DELETESTRING 0", FALSE ); - check_lb_state(listbox, 0, -1, 0, 0); - flush_sequence(); - - trace("deleting item 0\n"); - ret = SendMessage(listbox, LB_DELETESTRING, 0, 0); - ok(ret == LB_ERR, "expected LB_ERR, got %ld\n", ret); - check_lb_state(listbox, 0, -1, 0, 0); - flush_sequence(); - - log_all_parent_messages--; - - DestroyWindow(listbox); - DestroyWindow(parent); -} - -/*************************** Menu test ******************************/ -static const struct message wm_popup_menu_1[] = -{ - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_MENU, 0x20000001 }, - { WM_SYSKEYDOWN, sent|wparam|lparam, VK_MENU, 0x20000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'E', 0x20000001 }, - { WM_SYSKEYDOWN, sent|wparam|lparam, 'E', 0x20000001 }, - { WM_SYSCHAR, sent|wparam|lparam, 'e', 0x20000001 }, - { HCBT_SYSCOMMAND, hook|wparam|lparam, SC_KEYMENU, 'e' }, - { WM_ENTERMENULOOP, sent|wparam|lparam, 0, 0 }, - { WM_INITMENU, sent|lparam, 0, 0 }, - { WM_MENUSELECT, sent|wparam, MAKEWPARAM(1,MF_HILITE|MF_POPUP) }, - { WM_INITMENUPOPUP, sent|lparam, 0, 1 }, - { HCBT_CREATEWND, hook|optional }, /* Win9x doesn't create a window */ - { WM_MENUSELECT, sent|wparam, MAKEWPARAM(200,MF_HILITE) }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'E', 0xf0000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_MENU, 0xd0000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_RETURN, 0x10000001, 0, 0x40000000 }, - { HCBT_DESTROYWND, hook|optional }, /* Win9x doesn't create a window */ - { WM_UNINITMENUPOPUP, sent|lparam, 0, 0 }, - { WM_MENUSELECT, sent|wparam|lparam, MAKEWPARAM(0,0xffff), 0 }, - { WM_EXITMENULOOP, sent|wparam|lparam, 0, 0 }, - { WM_MENUCOMMAND, sent }, /* |wparam, 200 - Win9x */ - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_RETURN, 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, VK_RETURN, 0xc0000001 }, - { 0 } -}; -static const struct message wm_popup_menu_2[] = -{ - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_MENU, 0x20000001 }, - { WM_SYSKEYDOWN, sent|wparam|lparam, VK_MENU, 0x20000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'F', 0x20000001 }, - { WM_SYSKEYDOWN, sent|wparam|lparam, 'F', 0x20000001 }, - { WM_SYSCHAR, sent|wparam|lparam, 'f', 0x20000001 }, - { HCBT_SYSCOMMAND, hook|wparam|lparam, SC_KEYMENU, 'f' }, - { WM_ENTERMENULOOP, sent|wparam|lparam, 0, 0 }, - { WM_INITMENU, sent|lparam, 0, 0 }, - { WM_MENUSELECT, sent|wparam, MAKEWPARAM(0,MF_HILITE|MF_POPUP) }, - { WM_INITMENUPOPUP, sent|lparam, 0, 0 }, - { WM_MENUSELECT, sent|wparam|optional, MAKEWPARAM(0,MF_HILITE|MF_POPUP) }, /* Win9x */ - { WM_INITMENUPOPUP, sent|lparam|optional, 0, 0 }, /* Win9x */ - { HCBT_CREATEWND, hook }, - { WM_MENUSELECT, sent }, /*|wparam, MAKEWPARAM(0,MF_HILITE|MF_POPUP) - XP - |wparam, MAKEWPARAM(100,MF_HILITE) - Win9x */ - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'F', 0xf0000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_MENU, 0xd0000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_RIGHT, 0x10000001 }, - { WM_INITMENUPOPUP, sent|lparam|optional, 0, 0 }, /* Win9x doesn't send it */ - { HCBT_CREATEWND, hook|optional }, /* Win9x doesn't send it */ - { WM_MENUSELECT, sent|wparam|optional, MAKEWPARAM(100,MF_HILITE) }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_RIGHT, 0xd0000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_RETURN, 0x10000001 }, - { HCBT_DESTROYWND, hook }, - { WM_UNINITMENUPOPUP, sent|lparam, 0, 0 }, - { HCBT_DESTROYWND, hook|optional }, /* Win9x doesn't send it */ - { WM_UNINITMENUPOPUP, sent|lparam, 0, 0 }, - { WM_MENUSELECT, sent|wparam|lparam, MAKEWPARAM(0,0xffff), 0 }, - { WM_EXITMENULOOP, sent|wparam|lparam, 0, 0 }, - { WM_MENUCOMMAND, sent }, /* |wparam, 100 - Win9x */ - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_RETURN, 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, VK_RETURN, 0xc0000001 }, - { 0 } -}; -static const struct message wm_popup_menu_3[] = -{ - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_MENU, 0x20000001 }, - { WM_SYSKEYDOWN, sent|wparam|lparam, VK_MENU, 0x20000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'F', 0x20000001 }, - { WM_SYSKEYDOWN, sent|wparam|lparam, 'F', 0x20000001 }, - { WM_SYSCHAR, sent|wparam|lparam, 'f', 0x20000001 }, - { HCBT_SYSCOMMAND, hook|wparam|lparam, SC_KEYMENU, 'f' }, - { WM_ENTERMENULOOP, sent|wparam|lparam, 0, 0 }, - { WM_INITMENU, sent|lparam, 0, 0 }, - { WM_MENUSELECT, sent|wparam, MAKEWPARAM(0,MF_HILITE|MF_POPUP) }, - { WM_INITMENUPOPUP, sent|lparam, 0, 0 }, - { WM_MENUSELECT, sent|wparam|optional, MAKEWPARAM(0,MF_HILITE|MF_POPUP) }, /* Win9x */ - { WM_INITMENUPOPUP, sent|lparam|optional, 0, 0 }, /* Win9x */ - { HCBT_CREATEWND, hook }, - { WM_MENUSELECT, sent }, /*|wparam, MAKEWPARAM(0,MF_HILITE|MF_POPUP) - XP - |wparam, MAKEWPARAM(100,MF_HILITE) - Win9x */ - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'F', 0xf0000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_MENU, 0xd0000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_RIGHT, 0x10000001 }, - { WM_INITMENUPOPUP, sent|lparam|optional, 0, 0 }, /* Win9x doesn't send it */ - { HCBT_CREATEWND, hook|optional }, /* Win9x doesn't send it */ - { WM_MENUSELECT, sent|wparam|optional, MAKEWPARAM(100,MF_HILITE) }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_RIGHT, 0xd0000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_RETURN, 0x10000001 }, - { HCBT_DESTROYWND, hook }, - { WM_UNINITMENUPOPUP, sent|lparam, 0, 0 }, - { HCBT_DESTROYWND, hook|optional }, /* Win9x doesn't send it */ - { WM_UNINITMENUPOPUP, sent|lparam, 0, 0 }, - { WM_MENUSELECT, sent|wparam|lparam, MAKEWPARAM(0,0xffff), 0 }, - { WM_EXITMENULOOP, sent|wparam|lparam, 0, 0 }, - { WM_COMMAND, sent|wparam|lparam, 100, 0 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_RETURN, 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, VK_RETURN, 0xc0000001 }, - { 0 } -}; - -static const struct message wm_single_menu_item[] = -{ - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_MENU, 0x20000001 }, - { WM_SYSKEYDOWN, sent|wparam|lparam, VK_MENU, 0x20000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'Q', 0x20000001 }, - { WM_SYSKEYDOWN, sent|wparam|lparam, 'Q', 0x20000001 }, - { WM_SYSCHAR, sent|wparam|lparam, 'q', 0x20000001 }, - { HCBT_SYSCOMMAND, hook|wparam|lparam, SC_KEYMENU, 'q' }, - { WM_ENTERMENULOOP, sent|wparam|lparam, 0, 0 }, - { WM_INITMENU, sent|lparam, 0, 0 }, - { WM_MENUSELECT, sent|wparam|optional, MAKEWPARAM(300,MF_HILITE) }, - { WM_MENUSELECT, sent|wparam|lparam, MAKEWPARAM(0,0xffff), 0 }, - { WM_EXITMENULOOP, sent|wparam|lparam, 0, 0 }, - { WM_MENUCOMMAND, sent }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'Q', 0xe0000001 }, - { WM_SYSKEYUP, sent|wparam|lparam, 'Q', 0xe0000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_MENU, 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, VK_MENU, 0xc0000001 }, - - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_ESCAPE, 1 }, - { WM_KEYDOWN, sent|wparam|lparam, VK_ESCAPE, 1 }, - { WM_CHAR, sent|wparam|lparam, VK_ESCAPE, 0x00000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_ESCAPE, 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, VK_ESCAPE, 0xc0000001 }, - { 0 } -}; - -static LRESULT WINAPI parent_menu_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp) -{ - if (message == WM_ENTERIDLE || - message == WM_INITMENU || - message == WM_INITMENUPOPUP || - message == WM_MENUSELECT || - message == WM_PARENTNOTIFY || - message == WM_ENTERMENULOOP || - message == WM_EXITMENULOOP || - message == WM_UNINITMENUPOPUP || - message == WM_KEYDOWN || - message == WM_KEYUP || - message == WM_CHAR || - message == WM_SYSKEYDOWN || - message == WM_SYSKEYUP || - message == WM_SYSCHAR || - message == WM_COMMAND || - message == WM_MENUCOMMAND) - { - struct recvd_message msg; - - msg.hwnd = hwnd; - msg.message = message; - msg.flags = sent|wparam|lparam; - msg.wParam = wp; - msg.lParam = lp; - msg.descr = "parent_menu_proc"; - add_message(&msg); - } - - return DefWindowProcA(hwnd, message, wp, lp); -} - -static void set_menu_style(HMENU hmenu, DWORD style) -{ - MENUINFO mi; - BOOL ret; - - mi.cbSize = sizeof(mi); - mi.fMask = MIM_STYLE; - mi.dwStyle = style; - SetLastError(0xdeadbeef); - ret = pSetMenuInfo(hmenu, &mi); - ok(ret, "SetMenuInfo error %u\n", GetLastError()); -} - -static DWORD get_menu_style(HMENU hmenu) -{ - MENUINFO mi; - BOOL ret; - - mi.cbSize = sizeof(mi); - mi.fMask = MIM_STYLE; - mi.dwStyle = 0; - SetLastError(0xdeadbeef); - ret = pGetMenuInfo(hmenu, &mi); - ok(ret, "GetMenuInfo error %u\n", GetLastError()); - - return mi.dwStyle; -} - -static void test_menu_messages(void) -{ - MSG msg; - WNDCLASSA cls; - HMENU hmenu, hmenu_popup; - HWND hwnd; - DWORD style; - - if (!pGetMenuInfo || !pSetMenuInfo) - { - win_skip("GetMenuInfo and/or SetMenuInfo are not available\n"); - return; - } - cls.style = 0; - cls.lpfnWndProc = parent_menu_proc; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(0); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "TestMenuClass"; - UnregisterClass(cls.lpszClassName, cls.hInstance); - if (!RegisterClassA(&cls)) assert(0); - - SetLastError(0xdeadbeef); - hwnd = CreateWindowExA(0, "TestMenuClass", NULL, WS_OVERLAPPEDWINDOW | WS_VISIBLE, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok(hwnd != 0, "LoadMenuA error %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - hmenu = LoadMenuA(GetModuleHandle(0), MAKEINTRESOURCE(1)); - ok(hmenu != 0, "LoadMenuA error %u\n", GetLastError()); - - SetMenu(hwnd, hmenu); - SetForegroundWindow( hwnd ); - - set_menu_style(hmenu, MNS_NOTIFYBYPOS); - style = get_menu_style(hmenu); - ok(style == MNS_NOTIFYBYPOS, "expected MNS_NOTIFYBYPOS, got %u\n", style); - - hmenu_popup = GetSubMenu(hmenu, 0); - ok(hmenu_popup != 0, "GetSubMenu returned 0 for submenu 0\n"); - style = get_menu_style(hmenu_popup); - ok(style == 0, "expected 0, got %u\n", style); - - hmenu_popup = GetSubMenu(hmenu_popup, 0); - ok(hmenu_popup != 0, "GetSubMenu returned 0 for submenu 0\n"); - style = get_menu_style(hmenu_popup); - ok(style == 0, "expected 0, got %u\n", style); - - /* Alt+E, Enter */ - trace("testing a popup menu command\n"); - flush_sequence(); - keybd_event(VK_MENU, 0, 0, 0); - keybd_event('E', 0, 0, 0); - keybd_event('E', 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_RETURN, 0, 0, 0); - keybd_event(VK_RETURN, 0, KEYEVENTF_KEYUP, 0); - while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - if (!sequence_cnt) /* we didn't get any message */ - { - skip( "queuing key events not supported\n" ); - goto done; - } - /* win98 queues only a WM_KEYUP and doesn't start menu tracking */ - if (sequence[0].message == WM_KEYUP && sequence[0].wParam == VK_MENU) - { - win_skip( "menu tracking through VK_MENU not supported\n" ); - goto done; - } - ok_sequence(wm_popup_menu_1, "popup menu command", FALSE); - - /* Alt+F, Right, Enter */ - trace("testing submenu of a popup menu command\n"); - flush_sequence(); - keybd_event(VK_MENU, 0, 0, 0); - keybd_event('F', 0, 0, 0); - keybd_event('F', 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_RIGHT, 0, 0, 0); - keybd_event(VK_RIGHT, 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_RETURN, 0, 0, 0); - keybd_event(VK_RETURN, 0, KEYEVENTF_KEYUP, 0); - while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - ok_sequence(wm_popup_menu_2, "submenu of a popup menu command", FALSE); - - trace("testing single menu item command\n"); - flush_sequence(); - keybd_event(VK_MENU, 0, 0, 0); - keybd_event('Q', 0, 0, 0); - keybd_event('Q', 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_ESCAPE, 0, 0, 0); - keybd_event(VK_ESCAPE, 0, KEYEVENTF_KEYUP, 0); - while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - ok_sequence(wm_single_menu_item, "single menu item command", FALSE); - - set_menu_style(hmenu, 0); - style = get_menu_style(hmenu); - ok(style == 0, "expected 0, got %u\n", style); - - hmenu_popup = GetSubMenu(hmenu, 0); - ok(hmenu_popup != 0, "GetSubMenu returned 0 for submenu 0\n"); - set_menu_style(hmenu_popup, MNS_NOTIFYBYPOS); - style = get_menu_style(hmenu_popup); - ok(style == MNS_NOTIFYBYPOS, "expected MNS_NOTIFYBYPOS, got %u\n", style); - - hmenu_popup = GetSubMenu(hmenu_popup, 0); - ok(hmenu_popup != 0, "GetSubMenu returned 0 for submenu 0\n"); - style = get_menu_style(hmenu_popup); - ok(style == 0, "expected 0, got %u\n", style); - - /* Alt+F, Right, Enter */ - trace("testing submenu of a popup menu command\n"); - flush_sequence(); - keybd_event(VK_MENU, 0, 0, 0); - keybd_event('F', 0, 0, 0); - keybd_event('F', 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_RIGHT, 0, 0, 0); - keybd_event(VK_RIGHT, 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_RETURN, 0, 0, 0); - keybd_event(VK_RETURN, 0, KEYEVENTF_KEYUP, 0); - while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - ok_sequence(wm_popup_menu_3, "submenu of a popup menu command", FALSE); - -done: - DestroyWindow(hwnd); - DestroyMenu(hmenu); -} - - -static void test_paintingloop(void) -{ - HWND hwnd; - - paint_loop_done = 0; - hwnd = CreateWindowExA(0x0,"PaintLoopWindowClass", - "PaintLoopWindowClass",WS_OVERLAPPEDWINDOW, - 100, 100, 100, 100, 0, 0, 0, NULL ); - ok(hwnd != 0, "PaintLoop window error %u\n", GetLastError()); - ShowWindow(hwnd,SW_NORMAL); - SetFocus(hwnd); - - while (!paint_loop_done) - { - MSG msg; - if (PeekMessageA(&msg, 0, 0, 0, 1)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } - DestroyWindow(hwnd); -} - -static void test_defwinproc(void) -{ - HWND hwnd; - MSG msg; - int gotwmquit = FALSE; - hwnd = CreateWindowExA(0, "static", "test_defwndproc", WS_POPUP, 0,0,0,0,0,0,0, NULL); - assert(hwnd); - DefWindowProcA( hwnd, WM_ENDSESSION, 1, 0); - while (PeekMessageA( &msg, 0, 0, 0, PM_REMOVE )) { - if( msg.message == WM_QUIT) gotwmquit = TRUE; - DispatchMessageA( &msg ); - } - ok( gotwmquit == FALSE, "Unexpected WM_QUIT message!\n"); - DestroyWindow( hwnd); -} - -#define clear_clipboard(hwnd) clear_clipboard_(__LINE__, (hwnd)) -static void clear_clipboard_(int line, HWND hWnd) -{ - BOOL succ; - succ = OpenClipboard(hWnd); - ok_(__FILE__, line)(succ, "OpenClipboard failed, err=%u\n", GetLastError()); - succ = EmptyClipboard(); - ok_(__FILE__, line)(succ, "EmptyClipboard failed, err=%u\n", GetLastError()); - succ = CloseClipboard(); - ok_(__FILE__, line)(succ, "CloseClipboard failed, err=%u\n", GetLastError()); -} - -#define expect_HWND(expected, got) expect_HWND_(__LINE__, (expected), (got)) -static void expect_HWND_(int line, HWND expected, HWND got) -{ - ok_(__FILE__, line)(got==expected, "Expected %p, got %p\n", expected, got); -} - -static WNDPROC pOldViewerProc; - -static LRESULT CALLBACK recursive_viewer_proc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - static BOOL recursion_guard; - - if (message == WM_DRAWCLIPBOARD && !recursion_guard) - { - recursion_guard = TRUE; - clear_clipboard(hWnd); - recursion_guard = FALSE; - } - return CallWindowProcA(pOldViewerProc, hWnd, message, wParam, lParam); -} - -static void test_clipboard_viewers(void) -{ - static struct message wm_change_cb_chain[] = - { - { WM_CHANGECBCHAIN, sent|wparam|lparam, 0, 0 }, - { 0 } - }; - static const struct message wm_clipboard_destroyed[] = - { - { WM_DESTROYCLIPBOARD, sent|wparam|lparam, 0, 0 }, - { 0 } - }; - static struct message wm_clipboard_changed[] = - { - { WM_DRAWCLIPBOARD, sent|wparam|lparam, 0, 0 }, - { 0 } - }; - static struct message wm_clipboard_changed_and_owned[] = - { - { WM_DESTROYCLIPBOARD, sent|wparam|lparam, 0, 0 }, - { WM_DRAWCLIPBOARD, sent|wparam|lparam, 0, 0 }, - { 0 } - }; - - HINSTANCE hInst = GetModuleHandleA(NULL); - HWND hWnd1, hWnd2, hWnd3; - HWND hOrigViewer; - HWND hRet; - - hWnd1 = CreateWindowExA(0, "TestWindowClass", "Clipboard viewer test wnd 1", - WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - GetDesktopWindow(), NULL, hInst, NULL); - hWnd2 = CreateWindowExA(0, "SimpleWindowClass", "Clipboard viewer test wnd 2", - WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - GetDesktopWindow(), NULL, hInst, NULL); - hWnd3 = CreateWindowExA(0, "SimpleWindowClass", "Clipboard viewer test wnd 3", - WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - GetDesktopWindow(), NULL, hInst, NULL); - trace("clipbd viewers: hWnd1=%p, hWnd2=%p, hWnd3=%p\n", hWnd1, hWnd2, hWnd3); - assert(hWnd1 && hWnd2 && hWnd3); - - flush_sequence(); - - /* Test getting the clipboard viewer and setting the viewer to NULL. */ - hOrigViewer = GetClipboardViewer(); - hRet = SetClipboardViewer(NULL); - ok_sequence(WmEmptySeq, "set viewer to NULL", FALSE); - expect_HWND(hOrigViewer, hRet); - expect_HWND(NULL, GetClipboardViewer()); - - /* Test registering hWnd1 as a viewer. */ - hRet = SetClipboardViewer(hWnd1); - wm_clipboard_changed[0].wParam = (WPARAM) GetClipboardOwner(); - ok_sequence(wm_clipboard_changed, "set viewer NULL->1", FALSE); - expect_HWND(NULL, hRet); - expect_HWND(hWnd1, GetClipboardViewer()); - - /* Test that changing the clipboard actually refreshes the registered viewer. */ - clear_clipboard(hWnd1); - wm_clipboard_changed[0].wParam = (WPARAM) GetClipboardOwner(); - ok_sequence(wm_clipboard_changed, "clear clipbd (viewer=owner=1)", FALSE); - - /* Again, but with different owner. */ - clear_clipboard(hWnd2); - wm_clipboard_changed_and_owned[1].wParam = (WPARAM) GetClipboardOwner(); - ok_sequence(wm_clipboard_changed_and_owned, "clear clipbd (viewer=1, owner=2)", FALSE); - - /* Test re-registering same window. */ - hRet = SetClipboardViewer(hWnd1); - wm_clipboard_changed[0].wParam = (WPARAM) GetClipboardOwner(); - ok_sequence(wm_clipboard_changed, "set viewer 1->1", FALSE); - expect_HWND(hWnd1, hRet); - expect_HWND(hWnd1, GetClipboardViewer()); - - /* Test ChangeClipboardChain. */ - ChangeClipboardChain(hWnd2, hWnd3); - wm_change_cb_chain[0].wParam = (WPARAM) hWnd2; - wm_change_cb_chain[0].lParam = (LPARAM) hWnd3; - ok_sequence(wm_change_cb_chain, "change chain (viewer=1, remove=2, next=3)", FALSE); - expect_HWND(hWnd1, GetClipboardViewer()); - - ChangeClipboardChain(hWnd2, NULL); - wm_change_cb_chain[0].wParam = (WPARAM) hWnd2; - wm_change_cb_chain[0].lParam = 0; - ok_sequence(wm_change_cb_chain, "change chain (viewer=1, remove=2, next=NULL)", FALSE); - expect_HWND(hWnd1, GetClipboardViewer()); - - ChangeClipboardChain(NULL, hWnd2); - ok_sequence(WmEmptySeq, "change chain (viewer=1, remove=NULL, next=2)", TRUE); - expect_HWND(hWnd1, GetClipboardViewer()); - - /* Actually change clipboard viewer with ChangeClipboardChain. */ - ChangeClipboardChain(hWnd1, hWnd2); - ok_sequence(WmEmptySeq, "change chain (viewer=remove=1, next=2)", FALSE); - expect_HWND(hWnd2, GetClipboardViewer()); - - /* Test that no refresh messages are sent when viewer has unregistered. */ - clear_clipboard(hWnd2); - ok_sequence(WmEmptySeq, "clear clipd (viewer=2, owner=1)", FALSE); - - /* Register hWnd1 again. */ - ChangeClipboardChain(hWnd2, hWnd1); - ok_sequence(WmEmptySeq, "change chain (viewer=remove=2, next=1)", FALSE); - expect_HWND(hWnd1, GetClipboardViewer()); - - /* Subclass hWnd1 so that when it receives a WM_DRAWCLIPBOARD message, it - * changes the clipboard. When this happens, the system shouldn't send - * another WM_DRAWCLIPBOARD (as this could cause an infinite loop). - */ - pOldViewerProc = (WNDPROC) SetWindowLongPtrA(hWnd1, GWLP_WNDPROC, (LONG_PTR) recursive_viewer_proc); - clear_clipboard(hWnd2); - /* The clipboard owner is changed in recursive_viewer_proc: */ - wm_clipboard_changed[0].wParam = (WPARAM) hWnd2; - ok_sequence(wm_clipboard_changed, "recursive clear clipbd (viewer=1, owner=2)", TRUE); - - /* Test unregistering. */ - ChangeClipboardChain(hWnd1, NULL); - ok_sequence(WmEmptySeq, "change chain (viewer=remove=1, next=NULL)", FALSE); - expect_HWND(NULL, GetClipboardViewer()); - - clear_clipboard(hWnd1); - ok_sequence(wm_clipboard_destroyed, "clear clipbd (no viewer, owner=1)", FALSE); - - DestroyWindow(hWnd1); - DestroyWindow(hWnd2); - DestroyWindow(hWnd3); - SetClipboardViewer(hOrigViewer); -} - -static void test_PostMessage(void) -{ - static const struct - { - HWND hwnd; - BOOL ret; - } data[] = - { - { HWND_TOP /* 0 */, TRUE }, - { HWND_BROADCAST, TRUE }, - { HWND_BOTTOM, TRUE }, - { HWND_TOPMOST, TRUE }, - { HWND_NOTOPMOST, FALSE }, - { HWND_MESSAGE, FALSE }, - { (HWND)0xdeadbeef, FALSE } - }; - int i; - HWND hwnd; - BOOL ret; - MSG msg; - static const WCHAR staticW[] = {'s','t','a','t','i','c',0}; - - SetLastError(0xdeadbeef); - hwnd = CreateWindowExW(0, staticW, NULL, WS_POPUP, 0,0,0,0,0,0,0, NULL); - if (!hwnd && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("Skipping some PostMessage tests on Win9x/WinMe\n"); - return; - } - assert(hwnd); - - flush_events(); - - PostMessage(hwnd, WM_USER+1, 0x1234, 0x5678); - PostMessage(0, WM_USER+2, 0x5678, 0x1234); - - for (i = 0; i < sizeof(data)/sizeof(data[0]); i++) - { - memset(&msg, 0xab, sizeof(msg)); - ret = PeekMessageA(&msg, data[i].hwnd, 0, 0, PM_NOREMOVE); - ok(ret == data[i].ret, "%d: hwnd %p expected %d, got %d\n", i, data[i].hwnd, data[i].ret, ret); - if (data[i].ret) - { - if (data[i].hwnd) - ok(ret && msg.hwnd == 0 && msg.message == WM_USER+2 && - msg.wParam == 0x5678 && msg.lParam == 0x1234, - "%d: got ret %d hwnd %p msg %04x wParam %08lx lParam %08lx instead of TRUE/0/WM_USER+2/0x5678/0x1234\n", - i, ret, msg.hwnd, msg.message, msg.wParam, msg.lParam); - else - ok(ret && msg.hwnd == hwnd && msg.message == WM_USER+1 && - msg.wParam == 0x1234 && msg.lParam == 0x5678, - "%d: got ret %d hwnd %p msg %04x wParam %08lx lParam %08lx instead of TRUE/%p/WM_USER+1/0x1234/0x5678\n", - i, ret, msg.hwnd, msg.message, msg.wParam, msg.lParam, msg.hwnd); - } - } - - DestroyWindow(hwnd); - flush_events(); -} - -static const struct -{ - DWORD exp, broken; - BOOL todo; -} wait_idle_expect[] = -{ -/* 0 */ { WAIT_TIMEOUT, WAIT_TIMEOUT, FALSE }, - { WAIT_TIMEOUT, 0, FALSE }, - { WAIT_TIMEOUT, 0, FALSE }, - { WAIT_TIMEOUT, WAIT_TIMEOUT, FALSE }, - { WAIT_TIMEOUT, WAIT_TIMEOUT, FALSE }, -/* 5 */ { WAIT_TIMEOUT, 0, FALSE }, - { WAIT_TIMEOUT, 0, FALSE }, - { WAIT_TIMEOUT, WAIT_TIMEOUT, FALSE }, - { 0, 0, FALSE }, - { 0, 0, FALSE }, -/* 10 */ { 0, 0, FALSE }, - { 0, 0, FALSE }, - { 0, WAIT_TIMEOUT, FALSE }, - { 0, 0, FALSE }, - { 0, 0, FALSE }, -/* 15 */ { 0, 0, FALSE }, - { WAIT_TIMEOUT, 0, FALSE }, - { WAIT_TIMEOUT, 0, FALSE }, - { WAIT_TIMEOUT, 0, FALSE }, - { WAIT_TIMEOUT, 0, FALSE }, -/* 20 */ { WAIT_TIMEOUT, 0, FALSE }, -}; - -static DWORD CALLBACK do_wait_idle_child_thread( void *arg ) -{ - MSG msg; - - PeekMessage( &msg, 0, 0, 0, PM_NOREMOVE ); - Sleep( 200 ); - MsgWaitForMultipleObjects( 0, NULL, FALSE, 100, QS_ALLINPUT ); - return 0; -} - -static void do_wait_idle_child( int arg ) -{ - WNDCLASS cls; - MSG msg; - HWND hwnd = 0; - HANDLE thread; - DWORD id; - HANDLE start_event = OpenEventA( EVENT_ALL_ACCESS, FALSE, "test_WaitForInputIdle_start" ); - HANDLE end_event = OpenEventA( EVENT_ALL_ACCESS, FALSE, "test_WaitForInputIdle_end" ); - - memset( &cls, 0, sizeof(cls) ); - cls.lpfnWndProc = DefWindowProc; - cls.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); - cls.hCursor = LoadCursor(0, IDC_ARROW); - cls.lpszClassName = "TestClass"; - RegisterClass( &cls ); - - PeekMessage( &msg, 0, 0, 0, PM_NOREMOVE ); /* create the msg queue */ - - ok( start_event != 0, "failed to create start event, error %u\n", GetLastError() ); - ok( end_event != 0, "failed to create end event, error %u\n", GetLastError() ); - - switch (arg) - { - case 0: - SetEvent( start_event ); - break; - case 1: - SetEvent( start_event ); - Sleep( 200 ); - PeekMessage( &msg, 0, 0, 0, PM_REMOVE ); - break; - case 2: - SetEvent( start_event ); - Sleep( 200 ); - PeekMessage( &msg, 0, 0, 0, PM_NOREMOVE ); - PostThreadMessage( GetCurrentThreadId(), WM_COMMAND, 0x1234, 0xabcd ); - PeekMessage( &msg, 0, 0, 0, PM_REMOVE ); - break; - case 3: - SetEvent( start_event ); - Sleep( 200 ); - SendMessage( HWND_BROADCAST, WM_WININICHANGE, 0, 0 ); - break; - case 4: - SetEvent( start_event ); - Sleep( 200 ); - hwnd = CreateWindowExA(0, "TestClass", NULL, WS_POPUP|WS_VISIBLE, 0, 0, 10, 10, 0, 0, 0, NULL); - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE|PM_NOYIELD )) DispatchMessage( &msg ); - break; - case 5: - SetEvent( start_event ); - Sleep( 200 ); - hwnd = CreateWindowExA(0, "TestClass", NULL, WS_POPUP|WS_VISIBLE, 0, 0, 10, 10, 0, 0, 0, NULL); - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg ); - break; - case 6: - SetEvent( start_event ); - Sleep( 200 ); - hwnd = CreateWindowExA(0, "TestClass", NULL, WS_POPUP|WS_VISIBLE, 0, 0, 10, 10, 0, 0, 0, NULL); - while (PeekMessage( &msg, 0, 0, 0, PM_NOREMOVE )) - { - GetMessage( &msg, 0, 0, 0 ); - DispatchMessage( &msg ); - } - break; - case 7: - SetEvent( start_event ); - Sleep( 200 ); - hwnd = CreateWindowExA(0, "TestClass", NULL, WS_POPUP|WS_VISIBLE, 0, 0, 10, 10, 0, 0, 0, NULL); - SetTimer( hwnd, 3, 1, NULL ); - Sleep( 200 ); - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE|PM_NOYIELD )) DispatchMessage( &msg ); - break; - case 8: - SetEvent( start_event ); - Sleep( 200 ); - PeekMessage( &msg, 0, 0, 0, PM_NOREMOVE ); - MsgWaitForMultipleObjects( 0, NULL, FALSE, 100, QS_ALLINPUT ); - break; - case 9: - SetEvent( start_event ); - Sleep( 200 ); - hwnd = CreateWindowExA(0, "TestClass", NULL, WS_POPUP|WS_VISIBLE, 0, 0, 10, 10, 0, 0, 0, NULL); - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg ); - for (;;) GetMessage( &msg, 0, 0, 0 ); - break; - case 10: - SetEvent( start_event ); - Sleep( 200 ); - hwnd = CreateWindowExA(0, "TestClass", NULL, WS_POPUP|WS_VISIBLE, 0, 0, 10, 10, 0, 0, 0, NULL); - SetTimer( hwnd, 3, 1, NULL ); - Sleep( 200 ); - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg ); - break; - case 11: - SetEvent( start_event ); - Sleep( 200 ); - return; /* exiting the process makes WaitForInputIdle return success too */ - case 12: - PeekMessage( &msg, 0, 0, 0, PM_NOREMOVE ); - Sleep( 200 ); - MsgWaitForMultipleObjects( 0, NULL, FALSE, 100, QS_ALLINPUT ); - SetEvent( start_event ); - break; - case 13: - SetEvent( start_event ); - PeekMessage( &msg, 0, 0, 0, PM_NOREMOVE ); - Sleep( 200 ); - thread = CreateThread( NULL, 0, do_wait_idle_child_thread, NULL, 0, &id ); - WaitForSingleObject( thread, 10000 ); - CloseHandle( thread ); - break; - case 14: - SetEvent( start_event ); - Sleep( 200 ); - PeekMessage( &msg, HWND_TOPMOST, 0, 0, PM_NOREMOVE ); - break; - case 15: - SetEvent( start_event ); - Sleep( 200 ); - PeekMessage( &msg, HWND_BROADCAST, 0, 0, PM_NOREMOVE ); - break; - case 16: - SetEvent( start_event ); - Sleep( 200 ); - PeekMessage( &msg, HWND_BOTTOM, 0, 0, PM_NOREMOVE ); - break; - case 17: - SetEvent( start_event ); - Sleep( 200 ); - PeekMessage( &msg, (HWND)0xdeadbeef, 0, 0, PM_NOREMOVE ); - break; - case 18: - SetEvent( start_event ); - Sleep( 200 ); - PeekMessage( &msg, HWND_NOTOPMOST, 0, 0, PM_NOREMOVE ); - break; - case 19: - SetEvent( start_event ); - Sleep( 200 ); - PeekMessage( &msg, HWND_MESSAGE, 0, 0, PM_NOREMOVE ); - break; - case 20: - SetEvent( start_event ); - Sleep( 200 ); - PeekMessage( &msg, GetDesktopWindow(), 0, 0, PM_NOREMOVE ); - break; - } - WaitForSingleObject( end_event, 2000 ); - CloseHandle( start_event ); - CloseHandle( end_event ); - if (hwnd) DestroyWindow( hwnd ); -} - -static LRESULT CALLBACK wait_idle_proc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) -{ - if (msg == WM_WININICHANGE) Sleep( 200 ); /* make sure the child waits */ - return DefWindowProcA( hwnd, msg, wp, lp ); -} - -static DWORD CALLBACK wait_idle_thread( void *arg ) -{ - WNDCLASS cls; - MSG msg; - HWND hwnd; - - memset( &cls, 0, sizeof(cls) ); - cls.lpfnWndProc = wait_idle_proc; - cls.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); - cls.hCursor = LoadCursor(0, IDC_ARROW); - cls.lpszClassName = "TestClass"; - RegisterClass( &cls ); - - hwnd = CreateWindowExA(0, "TestClass", NULL, WS_POPUP, 0, 0, 10, 10, 0, 0, 0, NULL); - while (GetMessage( &msg, 0, 0, 0 )) DispatchMessage( &msg ); - DestroyWindow(hwnd); - return 0; -} - -static void test_WaitForInputIdle( char *argv0 ) -{ - char path[MAX_PATH]; - PROCESS_INFORMATION pi; - STARTUPINFOA startup; - BOOL ret; - HANDLE start_event, end_event, thread; - unsigned int i; - DWORD id; - const IMAGE_DOS_HEADER *dos = (const IMAGE_DOS_HEADER *)GetModuleHandleA(0); - const IMAGE_NT_HEADERS *nt = (const IMAGE_NT_HEADERS *)((const char *)dos + dos->e_lfanew); - BOOL console_app = (nt->OptionalHeader.Subsystem != IMAGE_SUBSYSTEM_WINDOWS_GUI); - - if (console_app) /* build the test with -mwindows for better coverage */ - trace( "not built as a GUI app, WaitForInputIdle may not be fully tested\n" ); - - start_event = CreateEventA(NULL, 0, 0, "test_WaitForInputIdle_start"); - end_event = CreateEventA(NULL, 0, 0, "test_WaitForInputIdle_end"); - ok(start_event != 0, "failed to create start event, error %u\n", GetLastError()); - ok(end_event != 0, "failed to create end event, error %u\n", GetLastError()); - - memset( &startup, 0, sizeof(startup) ); - startup.cb = sizeof(startup); - startup.dwFlags = STARTF_USESHOWWINDOW; - startup.wShowWindow = SW_SHOWNORMAL; - - thread = CreateThread( NULL, 0, wait_idle_thread, NULL, 0, &id ); - - for (i = 0; i < sizeof(wait_idle_expect)/sizeof(wait_idle_expect[0]); i++) - { - ResetEvent( start_event ); - ResetEvent( end_event ); - sprintf( path, "%s msg %u", argv0, i ); - ret = CreateProcessA( NULL, path, NULL, NULL, TRUE, 0, NULL, NULL, &startup, &pi ); - ok( ret, "CreateProcess '%s' failed err %u.\n", path, GetLastError() ); - if (ret) - { - ret = WaitForSingleObject( start_event, 5000 ); - ok( ret == WAIT_OBJECT_0, "%u: WaitForSingleObject failed\n", i ); - if (ret == WAIT_OBJECT_0) - { - ret = WaitForInputIdle( pi.hProcess, 1000 ); - if (ret == WAIT_FAILED) - ok( console_app || - ret == wait_idle_expect[i].exp || - broken(ret == wait_idle_expect[i].broken), - "%u: WaitForInputIdle error %08x expected %08x\n", - i, ret, wait_idle_expect[i].exp ); - else if (wait_idle_expect[i].todo) - todo_wine - ok( ret == wait_idle_expect[i].exp || broken(ret == wait_idle_expect[i].broken), - "%u: WaitForInputIdle error %08x expected %08x\n", - i, ret, wait_idle_expect[i].exp ); - else - ok( ret == wait_idle_expect[i].exp || broken(ret == wait_idle_expect[i].broken), - "%u: WaitForInputIdle error %08x expected %08x\n", - i, ret, wait_idle_expect[i].exp ); - SetEvent( end_event ); - WaitForSingleObject( pi.hProcess, 1000 ); /* give it a chance to exit on its own */ - } - TerminateProcess( pi.hProcess, 0 ); /* just in case */ - winetest_wait_child_process( pi.hProcess ); - ret = WaitForInputIdle( pi.hProcess, 100 ); - ok( ret == WAIT_FAILED, "%u: WaitForInputIdle after exit error %08x\n", i, ret ); - CloseHandle( pi.hProcess ); - CloseHandle( pi.hThread ); - } - } - CloseHandle( start_event ); - PostThreadMessage( id, WM_QUIT, 0, 0 ); - WaitForSingleObject( thread, 10000 ); - CloseHandle( thread ); -} - -static const struct message WmSetParentSeq_1[] = { - { WM_SHOWWINDOW, sent|wparam, 0 }, - { EVENT_OBJECT_PARENTCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE }, - { WM_CHILDACTIVATE, sent }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOSIZE|SWP_NOREDRAW|SWP_NOCLIENTSIZE }, - { WM_MOVE, sent|defwinproc|wparam, 0 }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SHOWWINDOW, sent|wparam, 1 }, - { 0 } -}; - -static const struct message WmSetParentSeq_2[] = { - { WM_SHOWWINDOW, sent|wparam, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { HCBT_SETFOCUS, hook|optional }, - { WM_NCACTIVATE, sent|wparam|optional, 0 }, - { WM_ACTIVATE, sent|wparam|optional, 0 }, - { WM_ACTIVATEAPP, sent|wparam|optional, 0 }, - { WM_KILLFOCUS, sent|wparam, 0 }, - { EVENT_OBJECT_PARENTCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE }, - { HCBT_ACTIVATE, hook|optional }, - { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCACTIVATE, sent|wparam|optional, 1 }, - { WM_ACTIVATE, sent|wparam|optional, 1 }, - { HCBT_SETFOCUS, hook|optional }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|optional|defwinproc }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOREDRAW|SWP_NOSIZE|SWP_NOCLIENTSIZE }, - { WM_MOVE, sent|defwinproc|wparam, 0 }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, - { 0 } -}; - - -static void test_SetParent(void) -{ - HWND parent1, parent2, child, popup; - RECT rc, rc_old; - - parent1 = CreateWindowEx(0, "TestParentClass", NULL, WS_OVERLAPPEDWINDOW, - 100, 100, 200, 200, 0, 0, 0, NULL); - ok(parent1 != 0, "Failed to create parent1 window\n"); - - parent2 = CreateWindowEx(0, "TestParentClass", NULL, WS_OVERLAPPEDWINDOW, - 400, 100, 200, 200, 0, 0, 0, NULL); - ok(parent2 != 0, "Failed to create parent2 window\n"); - - /* WS_CHILD window */ - child = CreateWindowEx(0, "TestWindowClass", NULL, WS_CHILD | WS_VISIBLE, - 10, 10, 150, 150, parent1, 0, 0, NULL); - ok(child != 0, "Failed to create child window\n"); - - GetWindowRect(parent1, &rc); - trace("parent1 (%d,%d)-(%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom); - GetWindowRect(child, &rc_old); - MapWindowPoints(0, parent1, (POINT *)&rc_old, 2); - trace("child (%d,%d)-(%d,%d)\n", rc_old.left, rc_old.top, rc_old.right, rc_old.bottom); - - flush_sequence(); - - SetParent(child, parent2); - flush_events(); - ok_sequence(WmSetParentSeq_1, "SetParent() visible WS_CHILD", TRUE); - - ok(GetWindowLongA(child, GWL_STYLE) & WS_VISIBLE, "WS_VISIBLE should be set\n"); - ok(!IsWindowVisible(child), "IsWindowVisible() should return FALSE\n"); - - GetWindowRect(parent2, &rc); - trace("parent2 (%d,%d)-(%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom); - GetWindowRect(child, &rc); - MapWindowPoints(0, parent2, (POINT *)&rc, 2); - trace("child (%d,%d)-(%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom); - - ok(EqualRect(&rc_old, &rc), "rects do not match (%d,%d-%d,%d) / (%d,%d-%d,%d)\n", - rc_old.left, rc_old.top, rc_old.right, rc_old.bottom, - rc.left, rc.top, rc.right, rc.bottom ); - - /* WS_POPUP window */ - popup = CreateWindowEx(0, "TestWindowClass", NULL, WS_POPUP | WS_VISIBLE, - 20, 20, 100, 100, 0, 0, 0, NULL); - ok(popup != 0, "Failed to create popup window\n"); - - GetWindowRect(popup, &rc_old); - trace("popup (%d,%d)-(%d,%d)\n", rc_old.left, rc_old.top, rc_old.right, rc_old.bottom); - - flush_sequence(); - - SetParent(popup, child); - flush_events(); - ok_sequence(WmSetParentSeq_2, "SetParent() visible WS_POPUP", TRUE); - - ok(GetWindowLongA(popup, GWL_STYLE) & WS_VISIBLE, "WS_VISIBLE should be set\n"); - ok(!IsWindowVisible(popup), "IsWindowVisible() should return FALSE\n"); - - GetWindowRect(child, &rc); - trace("parent2 (%d,%d)-(%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom); - GetWindowRect(popup, &rc); - MapWindowPoints(0, child, (POINT *)&rc, 2); - trace("popup (%d,%d)-(%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom); - - ok(EqualRect(&rc_old, &rc), "rects do not match (%d,%d-%d,%d) / (%d,%d-%d,%d)\n", - rc_old.left, rc_old.top, rc_old.right, rc_old.bottom, - rc.left, rc.top, rc.right, rc.bottom ); - - DestroyWindow(popup); - DestroyWindow(child); - DestroyWindow(parent1); - DestroyWindow(parent2); - - flush_sequence(); -} - -static const struct message WmKeyReleaseOnly[] = { - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 0x41, 0x80000001 }, - { WM_KEYUP, sent|wparam|lparam, 0x41, 0x80000001 }, - { 0 } -}; -static const struct message WmKeyPressNormal[] = { - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 0x41, 0x1 }, - { WM_KEYDOWN, sent|wparam|lparam, 0x41, 0x1 }, - { 0 } -}; -static const struct message WmKeyPressRepeat[] = { - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 0x41, 0x40000001 }, - { WM_KEYDOWN, sent|wparam|lparam, 0x41, 0x40000001 }, - { 0 } -}; -static const struct message WmKeyReleaseNormal[] = { - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 0x41, 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, 0x41, 0xc0000001 }, - { 0 } -}; - -static void test_keyflags(void) -{ - HWND test_window; - SHORT key_state; - BYTE keyboard_state[256]; - MSG msg; - - test_window = CreateWindowEx(0, "TestWindowClass", NULL, WS_OVERLAPPEDWINDOW | WS_VISIBLE, - 100, 100, 200, 200, 0, 0, 0, NULL); - - flush_sequence(); - - /* keyup without a keydown */ - keybd_event(0x41, 0, KEYEVENTF_KEYUP, 0); - while (PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE)) - DispatchMessage(&msg); - ok_sequence(WmKeyReleaseOnly, "key release only", TRUE); - - key_state = GetAsyncKeyState(0x41); - ok((key_state & 0x8000) == 0, "unexpected key state %x\n", key_state); - - key_state = GetKeyState(0x41); - ok((key_state & 0x8000) == 0, "unexpected key state %x\n", key_state); - - /* keydown */ - keybd_event(0x41, 0, 0, 0); - while (PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE)) - DispatchMessage(&msg); - ok_sequence(WmKeyPressNormal, "key press only", FALSE); - - key_state = GetAsyncKeyState(0x41); - ok((key_state & 0x8000) == 0x8000, "unexpected key state %x\n", key_state); - - key_state = GetKeyState(0x41); - ok((key_state & 0x8000) == 0x8000, "unexpected key state %x\n", key_state); - - /* keydown repeat */ - keybd_event(0x41, 0, 0, 0); - while (PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE)) - DispatchMessage(&msg); - ok_sequence(WmKeyPressRepeat, "key press repeat", FALSE); - - key_state = GetAsyncKeyState(0x41); - ok((key_state & 0x8000) == 0x8000, "unexpected key state %x\n", key_state); - - key_state = GetKeyState(0x41); - ok((key_state & 0x8000) == 0x8000, "unexpected key state %x\n", key_state); - - /* keyup */ - keybd_event(0x41, 0, KEYEVENTF_KEYUP, 0); - while (PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE)) - DispatchMessage(&msg); - ok_sequence(WmKeyReleaseNormal, "key release repeat", FALSE); - - key_state = GetAsyncKeyState(0x41); - ok((key_state & 0x8000) == 0, "unexpected key state %x\n", key_state); - - key_state = GetKeyState(0x41); - ok((key_state & 0x8000) == 0, "unexpected key state %x\n", key_state); - - /* set the key state in this thread */ - GetKeyboardState(keyboard_state); - keyboard_state[0x41] = 0x80; - SetKeyboardState(keyboard_state); - - key_state = GetAsyncKeyState(0x41); - ok((key_state & 0x8000) == 0, "unexpected key state %x\n", key_state); - - /* keydown */ - keybd_event(0x41, 0, 0, 0); - while (PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE)) - DispatchMessage(&msg); - ok_sequence(WmKeyPressRepeat, "key press after setkeyboardstate", TRUE); - - key_state = GetAsyncKeyState(0x41); - ok((key_state & 0x8000) == 0x8000, "unexpected key state %x\n", key_state); - - key_state = GetKeyState(0x41); - ok((key_state & 0x8000) == 0x8000, "unexpected key state %x\n", key_state); - - /* clear the key state in this thread */ - GetKeyboardState(keyboard_state); - keyboard_state[0x41] = 0; - SetKeyboardState(keyboard_state); - - key_state = GetAsyncKeyState(0x41); - ok((key_state & 0x8000) == 0x8000, "unexpected key state %x\n", key_state); - - /* keyup */ - keybd_event(0x41, 0, KEYEVENTF_KEYUP, 0); - while (PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE)) - DispatchMessage(&msg); - ok_sequence(WmKeyReleaseOnly, "key release after setkeyboardstate", TRUE); - - key_state = GetAsyncKeyState(0x41); - ok((key_state & 0x8000) == 0, "unexpected key state %x\n", key_state); - - key_state = GetKeyState(0x41); - ok((key_state & 0x8000) == 0, "unexpected key state %x\n", key_state); - - DestroyWindow(test_window); - flush_sequence(); -} - -static const struct message WmHotkeyPressLWIN[] = { - { WM_KEYDOWN, kbd_hook|wparam|lparam, VK_LWIN, LLKHF_INJECTED }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_LWIN, 1 }, - { WM_KEYDOWN, sent|wparam|lparam, VK_LWIN, 1 }, - { 0 } -}; -static const struct message WmHotkeyPress[] = { - { WM_KEYDOWN, kbd_hook|lparam, 0, LLKHF_INJECTED }, - { WM_HOTKEY, sent|wparam, 5 }, - { 0 } -}; -static const struct message WmHotkeyRelease[] = { - { WM_KEYUP, kbd_hook|lparam, 0, LLKHF_INJECTED|LLKHF_UP }, - { HCBT_KEYSKIPPED, hook|lparam|optional, 0, 0x80000001 }, - { WM_KEYUP, sent|lparam, 0, 0x80000001 }, - { 0 } -}; -static const struct message WmHotkeyReleaseLWIN[] = { - { WM_KEYUP, kbd_hook|wparam|lparam, VK_LWIN, LLKHF_INJECTED|LLKHF_UP }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_LWIN, 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, VK_LWIN, 0xc0000001 }, - { 0 } -}; -static const struct message WmHotkeyCombined[] = { - { WM_KEYDOWN, kbd_hook|wparam|lparam, VK_LWIN, LLKHF_INJECTED }, - { WM_KEYDOWN, kbd_hook|lparam, 0, LLKHF_INJECTED }, - { WM_KEYUP, kbd_hook|lparam, 0, LLKHF_INJECTED|LLKHF_UP }, - { WM_KEYUP, kbd_hook|wparam|lparam, VK_LWIN, LLKHF_INJECTED|LLKHF_UP }, - { WM_APP, sent, 0, 0 }, - { WM_HOTKEY, sent|wparam, 5 }, - { WM_APP+1, sent, 0, 0 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_LWIN, 1 }, - { WM_KEYDOWN, sent|wparam|lparam, VK_LWIN, 1 }, - { HCBT_KEYSKIPPED, hook|optional, 0, 0x80000001 }, - { WM_KEYUP, sent, 0, 0x80000001 }, /* lparam not checked so the sequence isn't a todo */ - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_LWIN, 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, VK_LWIN, 0xc0000001 }, - { 0 } -}; -static const struct message WmHotkeyPrevious[] = { - { WM_KEYDOWN, kbd_hook|wparam|lparam, VK_LWIN, LLKHF_INJECTED }, - { WM_KEYDOWN, kbd_hook|lparam, 0, LLKHF_INJECTED }, - { WM_KEYUP, kbd_hook|lparam, 0, LLKHF_INJECTED|LLKHF_UP }, - { WM_KEYUP, kbd_hook|wparam|lparam, VK_LWIN, LLKHF_INJECTED|LLKHF_UP }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_LWIN, 1 }, - { WM_KEYDOWN, sent|wparam|lparam, VK_LWIN, 1 }, - { HCBT_KEYSKIPPED, hook|lparam|optional, 0, 1 }, - { WM_KEYDOWN, sent|lparam, 0, 1 }, - { HCBT_KEYSKIPPED, hook|optional|lparam, 0, 0xc0000001 }, - { WM_KEYUP, sent|lparam, 0, 0xc0000001 }, - { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_LWIN, 0xc0000001 }, - { WM_KEYUP, sent|wparam|lparam, VK_LWIN, 0xc0000001 }, - { 0 } -}; -static const struct message WmHotkeyNew[] = { - { WM_KEYDOWN, kbd_hook|lparam, 0, LLKHF_INJECTED }, - { WM_KEYUP, kbd_hook|lparam, 0, LLKHF_INJECTED|LLKHF_UP }, - { WM_HOTKEY, sent|wparam, 5 }, - { HCBT_KEYSKIPPED, hook|optional, 0, 0x80000001 }, - { WM_KEYUP, sent, 0, 0x80000001 }, /* lparam not checked so the sequence isn't a todo */ - { 0 } -}; - -static int hotkey_letter; - -static LRESULT CALLBACK KeyboardHookProc(int nCode, WPARAM wParam, LPARAM lParam) -{ - struct recvd_message msg; - - if (nCode == HC_ACTION) - { - KBDLLHOOKSTRUCT *kdbhookstruct = (KBDLLHOOKSTRUCT*)lParam; - - msg.hwnd = 0; - msg.message = wParam; - msg.flags = kbd_hook|wparam|lparam; - msg.wParam = kdbhookstruct->vkCode; - msg.lParam = kdbhookstruct->flags; - msg.descr = "KeyboardHookProc"; - add_message(&msg); - - if (wParam == WM_KEYUP || wParam == WM_KEYDOWN) - { - ok(kdbhookstruct->vkCode == VK_LWIN || kdbhookstruct->vkCode == hotkey_letter, - "unexpected keycode %x\n", kdbhookstruct->vkCode); - } - } - - return CallNextHookEx(hKBD_hook, nCode, wParam, lParam); -} - -static void test_hotkey(void) -{ - HWND test_window, taskbar_window; - BOOL ret; - MSG msg; - DWORD queue_status; - SHORT key_state; - - SetLastError(0xdeadbeef); - ret = UnregisterHotKey(NULL, 0); - ok(ret == FALSE, "expected FALSE, got %i\n", ret); - ok(GetLastError() == ERROR_HOTKEY_NOT_REGISTERED || broken(GetLastError() == 0xdeadbeef), - "unexpected error %d\n", GetLastError()); - - if (ret == TRUE) - { - skip("hotkeys not supported\n"); - return; - } - - test_window = CreateWindowEx(0, "HotkeyWindowClass", NULL, WS_OVERLAPPEDWINDOW | WS_VISIBLE, - 100, 100, 200, 200, 0, 0, 0, NULL); - - flush_sequence(); - - SetLastError(0xdeadbeef); - ret = UnregisterHotKey(test_window, 0); - ok(ret == FALSE, "expected FALSE, got %i\n", ret); - ok(GetLastError() == ERROR_HOTKEY_NOT_REGISTERED || broken(GetLastError() == 0xdeadbeef), - "unexpected error %d\n", GetLastError()); - - /* Search for a Windows Key + letter combination that hasn't been registered */ - for (hotkey_letter = 0x41; hotkey_letter <= 0x51; hotkey_letter ++) - { - SetLastError(0xdeadbeef); - ret = RegisterHotKey(test_window, 5, MOD_WIN, hotkey_letter); - - if (ret == TRUE) - { - break; - } - else - { - ok(GetLastError() == ERROR_HOTKEY_ALREADY_REGISTERED || broken(GetLastError() == 0xdeadbeef), - "unexpected error %d\n", GetLastError()); - } - } - - if (hotkey_letter == 0x52) - { - ok(0, "Couldn't find any free Windows Key + letter combination\n"); - goto end; - } - - hKBD_hook = SetWindowsHookEx(WH_KEYBOARD_LL, KeyboardHookProc, GetModuleHandle(NULL), 0); - if (!hKBD_hook) win_skip("WH_KEYBOARD_LL is not supported\n"); - - /* Same key combination, different id */ - SetLastError(0xdeadbeef); - ret = RegisterHotKey(test_window, 4, MOD_WIN, hotkey_letter); - ok(ret == FALSE, "expected FALSE, got %i\n", ret); - ok(GetLastError() == ERROR_HOTKEY_ALREADY_REGISTERED || broken(GetLastError() == 0xdeadbeef), - "unexpected error %d\n", GetLastError()); - - /* Same key combination, different window */ - SetLastError(0xdeadbeef); - ret = RegisterHotKey(NULL, 5, MOD_WIN, hotkey_letter); - ok(ret == FALSE, "expected FALSE, got %i\n", ret); - ok(GetLastError() == ERROR_HOTKEY_ALREADY_REGISTERED || broken(GetLastError() == 0xdeadbeef), - "unexpected error %d\n", GetLastError()); - - /* Register the same hotkey twice */ - SetLastError(0xdeadbeef); - ret = RegisterHotKey(test_window, 5, MOD_WIN, hotkey_letter); - ok(ret == FALSE, "expected FALSE, got %i\n", ret); - ok(GetLastError() == ERROR_HOTKEY_ALREADY_REGISTERED || broken(GetLastError() == 0xdeadbeef), - "unexpected error %d\n", GetLastError()); - - /* Window on another thread */ - taskbar_window = FindWindowA("Shell_TrayWnd", NULL); - if (!taskbar_window) - { - skip("no taskbar?\n"); - } - else - { - SetLastError(0xdeadbeef); - ret = RegisterHotKey(taskbar_window, 5, 0, hotkey_letter); - ok(ret == FALSE, "expected FALSE, got %i\n", ret); - ok(GetLastError() == ERROR_WINDOW_OF_OTHER_THREAD || broken(GetLastError() == 0xdeadbeef), - "unexpected error %d\n", GetLastError()); - } - - /* Inject the appropriate key sequence */ - keybd_event(VK_LWIN, 0, 0, 0); - while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) - DispatchMessage(&msg); - ok_sequence(WmHotkeyPressLWIN, "window hotkey press LWIN", FALSE); - - keybd_event(hotkey_letter, 0, 0, 0); - queue_status = GetQueueStatus(QS_HOTKEY); - ok((queue_status & (QS_HOTKEY << 16)) == QS_HOTKEY << 16, "expected QS_HOTKEY << 16 set, got %x\n", queue_status); - while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) - { - if (msg.message == WM_HOTKEY) - { - ok(msg.hwnd == test_window, "unexpected hwnd %p\n", msg.hwnd); - ok(msg.lParam == MAKELPARAM(MOD_WIN, hotkey_letter), "unexpected WM_HOTKEY lparam %lx\n", msg.lParam); - } - DispatchMessage(&msg); - } - ok_sequence(WmHotkeyPress, "window hotkey press", FALSE); - - queue_status = GetQueueStatus(QS_HOTKEY); - ok((queue_status & (QS_HOTKEY << 16)) == 0, "expected QS_HOTKEY << 16 cleared, got %x\n", queue_status); - - key_state = GetAsyncKeyState(hotkey_letter); - ok((key_state & 0x8000) == 0x8000, "unexpected key state %x\n", key_state); - - keybd_event(hotkey_letter, 0, KEYEVENTF_KEYUP, 0); - while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) - DispatchMessage(&msg); - ok_sequence(WmHotkeyRelease, "window hotkey release", TRUE); - - keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0); - while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) - DispatchMessage(&msg); - ok_sequence(WmHotkeyReleaseLWIN, "window hotkey release LWIN", FALSE); - - /* normal posted WM_HOTKEY messages set QS_HOTKEY */ - PostMessage(test_window, WM_HOTKEY, 0, 0); - queue_status = GetQueueStatus(QS_HOTKEY); - ok((queue_status & (QS_HOTKEY << 16)) == QS_HOTKEY << 16, "expected QS_HOTKEY << 16 set, got %x\n", queue_status); - queue_status = GetQueueStatus(QS_POSTMESSAGE); - ok((queue_status & (QS_POSTMESSAGE << 16)) == QS_POSTMESSAGE << 16, "expected QS_POSTMESSAGE << 16 set, got %x\n", queue_status); - while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) - DispatchMessage(&msg); - flush_sequence(); - - /* Send and process all messages at once */ - PostMessage(test_window, WM_APP, 0, 0); - keybd_event(VK_LWIN, 0, 0, 0); - keybd_event(hotkey_letter, 0, 0, 0); - keybd_event(hotkey_letter, 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0); - - while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) - { - if (msg.message == WM_HOTKEY) - { - ok(msg.hwnd == test_window, "unexpected hwnd %p\n", msg.hwnd); - ok(msg.lParam == MAKELPARAM(MOD_WIN, hotkey_letter), "unexpected WM_HOTKEY lparam %lx\n", msg.lParam); - } - DispatchMessage(&msg); - } - ok_sequence(WmHotkeyCombined, "window hotkey combined", FALSE); - - /* Register same hwnd/id with different key combination */ - ret = RegisterHotKey(test_window, 5, 0, hotkey_letter); - ok(ret == TRUE, "expected TRUE, got %i, err=%d\n", ret, GetLastError()); - - /* Previous key combination does not work */ - keybd_event(VK_LWIN, 0, 0, 0); - keybd_event(hotkey_letter, 0, 0, 0); - keybd_event(hotkey_letter, 0, KEYEVENTF_KEYUP, 0); - keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0); - - while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) - DispatchMessage(&msg); - ok_sequence(WmHotkeyPrevious, "window hotkey previous", FALSE); - - /* New key combination works */ - keybd_event(hotkey_letter, 0, 0, 0); - keybd_event(hotkey_letter, 0, KEYEVENTF_KEYUP, 0); - - while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) - { - if (msg.message == WM_HOTKEY) - { - ok(msg.hwnd == test_window, "unexpected hwnd %p\n", msg.hwnd); - ok(msg.lParam == MAKELPARAM(0, hotkey_letter), "unexpected WM_HOTKEY lparam %lx\n", msg.lParam); - } - DispatchMessage(&msg); - } - ok_sequence(WmHotkeyNew, "window hotkey new", FALSE); - - /* Unregister hotkey properly */ - ret = UnregisterHotKey(test_window, 5); - ok(ret == TRUE, "expected TRUE, got %i, err=%d\n", ret, GetLastError()); - - /* Unregister hotkey again */ - SetLastError(0xdeadbeef); - ret = UnregisterHotKey(test_window, 5); - ok(ret == FALSE, "expected FALSE, got %i\n", ret); - ok(GetLastError() == ERROR_HOTKEY_NOT_REGISTERED || broken(GetLastError() == 0xdeadbeef), - "unexpected error %d\n", GetLastError()); - - /* Register thread hotkey */ - ret = RegisterHotKey(NULL, 5, MOD_WIN, hotkey_letter); - ok(ret == TRUE, "expected TRUE, got %i, err=%d\n", ret, GetLastError()); - - /* Inject the appropriate key sequence */ - keybd_event(VK_LWIN, 0, 0, 0); - while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) - { - ok(msg.hwnd != NULL, "unexpected thread message %x\n", msg.message); - DispatchMessage(&msg); - } - ok_sequence(WmHotkeyPressLWIN, "thread hotkey press LWIN", FALSE); - - keybd_event(hotkey_letter, 0, 0, 0); - while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) - { - if (msg.message == WM_HOTKEY) - { - struct recvd_message message; - ok(msg.hwnd == NULL, "unexpected hwnd %p\n", msg.hwnd); - ok(msg.lParam == MAKELPARAM(MOD_WIN, hotkey_letter), "unexpected WM_HOTKEY lparam %lx\n", msg.lParam); - message.message = msg.message; - message.flags = sent|wparam|lparam; - message.wParam = msg.wParam; - message.lParam = msg.lParam; - message.descr = "test_hotkey thread message"; - add_message(&message); - } - else - ok(msg.hwnd != NULL, "unexpected thread message %x\n", msg.message); - DispatchMessage(&msg); - } - ok_sequence(WmHotkeyPress, "thread hotkey press", FALSE); - - keybd_event(hotkey_letter, 0, KEYEVENTF_KEYUP, 0); - while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) - { - ok(msg.hwnd != NULL, "unexpected thread message %x\n", msg.message); - DispatchMessage(&msg); - } - ok_sequence(WmHotkeyRelease, "thread hotkey release", TRUE); - - keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0); - while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) - { - ok(msg.hwnd != NULL, "unexpected thread message %x\n", msg.message); - DispatchMessage(&msg); - } - ok_sequence(WmHotkeyReleaseLWIN, "thread hotkey release LWIN", FALSE); - - /* Unregister thread hotkey */ - ret = UnregisterHotKey(NULL, 5); - ok(ret == TRUE, "expected TRUE, got %i, err=%d\n", ret, GetLastError()); - - if (hKBD_hook) UnhookWindowsHookEx(hKBD_hook); - hKBD_hook = NULL; - -end: - UnregisterHotKey(NULL, 5); - UnregisterHotKey(test_window, 5); - DestroyWindow(test_window); - flush_sequence(); -} - -START_TEST(msg) -{ - char **test_argv; - BOOL ret; - BOOL (WINAPI *pIsWinEventHookInstalled)(DWORD)= 0;/*GetProcAddress(user32, "IsWinEventHookInstalled");*/ - HMODULE hModuleImm32; - BOOL (WINAPI *pImmDisableIME)(DWORD); - - int argc = winetest_get_mainargs( &test_argv ); - if (argc >= 3) - { - unsigned int arg; - /* Child process. */ - sscanf (test_argv[2], "%d", (unsigned int *) &arg); - do_wait_idle_child( arg ); - return; - } - - init_procs(); - - hModuleImm32 = LoadLibrary("imm32.dll"); - if (hModuleImm32) { - pImmDisableIME = (void *)GetProcAddress(hModuleImm32, "ImmDisableIME"); - if (pImmDisableIME) - pImmDisableIME(0); - } - pImmDisableIME = NULL; - FreeLibrary(hModuleImm32); - - if (!RegisterWindowClasses()) assert(0); - - if (pSetWinEventHook) - { - hEvent_hook = pSetWinEventHook(EVENT_MIN, EVENT_MAX, - GetModuleHandleA(0), win_event_proc, - 0, GetCurrentThreadId(), - WINEVENT_INCONTEXT); - if (pIsWinEventHookInstalled && hEvent_hook) - { - UINT event; - for (event = EVENT_MIN; event <= EVENT_MAX; event++) - ok(pIsWinEventHookInstalled(event), "IsWinEventHookInstalled(%u) failed\n", event); - } - } - if (!hEvent_hook) win_skip( "no win event hook support\n" ); - - cbt_hook_thread_id = GetCurrentThreadId(); - hCBT_hook = SetWindowsHookExA(WH_CBT, cbt_hook_proc, 0, GetCurrentThreadId()); - if (!hCBT_hook) win_skip( "cannot set global hook, will skip hook tests\n" ); - - test_winevents(); - - /* Fix message sequences before removing 4 lines below */ -#if 1 - if (pUnhookWinEvent && hEvent_hook) - { - ret = pUnhookWinEvent(hEvent_hook); - ok( ret, "UnhookWinEvent error %d\n", GetLastError()); - pUnhookWinEvent = 0; - } - hEvent_hook = 0; -#endif - - test_SetParent(); - test_PostMessage(); - test_ShowWindow(); - test_PeekMessage(); - test_PeekMessage2(); - test_WaitForInputIdle( test_argv[0] ); - test_scrollwindowex(); - test_messages(); - test_setwindowpos(); - test_showwindow(); - invisible_parent_tests(); - test_mdi_messages(); - test_button_messages(); - test_static_messages(); - test_listbox_messages(); - test_combobox_messages(); - test_wmime_keydown_message(); - test_paint_messages(); - test_interthread_messages(); - test_message_conversion(); - test_accelerators(); - test_timers(); - test_timers_no_wnd(); - if (hCBT_hook) test_set_hook(); - test_DestroyWindow(); - test_DispatchMessage(); - test_SendMessageTimeout(); - test_edit_messages(); - test_quit_message(); - test_SetActiveWindow(); - - if (!pTrackMouseEvent) - win_skip("TrackMouseEvent is not available\n"); - else - test_TrackMouseEvent(); - - test_SetWindowRgn(); - test_sys_menu(); - test_dialog_messages(); - test_nullCallback(); - test_dbcs_wm_char(); - test_menu_messages(); - test_paintingloop(); - test_defwinproc(); - test_clipboard_viewers(); - test_keyflags(); - test_hotkey(); - /* keep it the last test, under Windows it tends to break the tests - * which rely on active/foreground windows being correct. - */ - test_SetForegroundWindow(); - - UnhookWindowsHookEx(hCBT_hook); - if (pUnhookWinEvent && hEvent_hook) - { - ret = pUnhookWinEvent(hEvent_hook); - ok( ret, "UnhookWinEvent error %d\n", GetLastError()); - SetLastError(0xdeadbeef); - ok(!pUnhookWinEvent(hEvent_hook), "UnhookWinEvent succeeded\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE || /* Win2k */ - GetLastError() == 0xdeadbeef, /* Win9x */ - "unexpected error %d\n", GetLastError()); - } -} diff --git a/rostests/winetests/user32/resource.c b/rostests/winetests/user32/resource.c deleted file mode 100755 index 5bc2d7a34d0..00000000000 --- a/rostests/winetests/user32/resource.c +++ /dev/null @@ -1,389 +0,0 @@ -/* Unit test suite for resources. - * - * Copyright 2004 Ferenc Wagner - * Copyright 2003, 2004 Mike McCormack - * - * 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 "wine/test.h" - -static UINT (WINAPI *pPrivateExtractIconsA)(LPCTSTR, int, int, int, HICON *, UINT *, UINT, UINT) = NULL; - -static void init_function_pointers(void) -{ - HMODULE hmod = GetModuleHandleA("user32.dll"); - pPrivateExtractIconsA = (void*)GetProcAddress(hmod, "PrivateExtractIconsA"); -} - -static void test_LoadStringW(void) -{ - HINSTANCE hInst = GetModuleHandle(NULL); - WCHAR copiedstringw[128], returnedstringw[128], *resourcepointer = NULL; - char copiedstring[128], returnedstring[128]; - int length1, length2, retvalue; - - /* Check that the string which is returned by LoadStringW matches - the string at the pointer returned by LoadStringW when called with buflen = 0 */ - SetLastError(0xdeadbeef); - length1 = LoadStringW(hInst, 2, (WCHAR *) &resourcepointer, 0); /* get pointer to resource. */ - if (!length1) - { - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - win_skip( "LoadStringW not implemented\n" ); - else - win_skip( "LoadStringW does not return a pointer to the resource\n" ); - return; - } - length2 = LoadStringW(hInst, 2, returnedstringw, sizeof(returnedstringw) /sizeof(WCHAR)); /* get resource string */ - ok(length2 > 0, "LoadStringW failed to load resource 2, ret %d, err %d\n", length2, GetLastError()); - ok(length1 == length2, "LoadStringW returned different values dependent on buflen. ret1 %d, ret2 %d\n", - length1, length2); - ok(length1 > 0 && resourcepointer != NULL, "LoadStringW failed to get pointer to resource 2, ret %d, err %d\n", - length1, GetLastError()); - - /* Copy the resource since it is not '\0' terminated, and add '\0' to the end */ - if(resourcepointer != NULL) /* Check that the resource pointer was loaded to avoid access violation */ - { - memcpy(copiedstringw, resourcepointer, length1 * sizeof(WCHAR)); - copiedstringw[length1] = '\0'; - /* check that strings match */ - WideCharToMultiByte( CP_ACP, 0, returnedstringw, -1, returnedstring, 128, NULL, NULL ); - WideCharToMultiByte( CP_ACP, 0, copiedstringw, -1, copiedstring, 128, NULL, NULL ); - ok(!memcmp(copiedstringw, returnedstringw, (length2 + 1)*sizeof(WCHAR)), - "strings don't match: returnedstring = %s, copiedstring = %s\n", returnedstring, copiedstring); - } - - /* check that calling LoadStringW with buffer = NULL returns zero */ - retvalue = LoadStringW(hInst, 2, NULL, 0); - ok(!retvalue, "LoadStringW returned a non-zero value when called with buffer = NULL, retvalue = %d\n", retvalue); - /* check again, with a different buflen value, that calling LoadStringW with buffer = NULL returns zero */ - retvalue = LoadStringW(hInst, 2, NULL, 128); - ok(!retvalue, "LoadStringW returned a non-zero value when called with buffer = NULL, retvalue = %d\n", retvalue); -} - -static void test_LoadStringA (void) -{ - HINSTANCE hInst = GetModuleHandle (NULL); - static const char str[] = "String resource"; /* same in resource.rc */ - char buf[128]; - struct string_test { - unsigned int bufsiz; - unsigned int expected; - }; - struct string_test tests[] = {{sizeof buf, sizeof str - 1}, - {sizeof str, sizeof str - 1}, - {sizeof str - 1, sizeof str - 2}}; - unsigned int i; - int ret; - - assert (sizeof str < sizeof buf); - for (i = 0; i < sizeof tests / sizeof tests[0]; i++) { - const unsigned int bufsiz = tests[i].bufsiz; - const unsigned int expected = tests[i].expected; - const int len = LoadStringA (hInst, 0, buf, bufsiz); - - ok (len == expected, "bufsiz=%d: got %d, expected %d\n", - bufsiz, len, expected); - if (len != expected) continue; - ok (!memcmp (buf, str, len), - "bufsiz=%d: got '%s', expected '%.*s'\n", - bufsiz, buf, len, str); - ok (buf[len] == 0, "bufsiz=%d: NUL termination missing\n", - bufsiz); - } - - ret = LoadStringA(hInst, 1, buf, sizeof(buf) ); - ok( ret > 0, "LoadString failed: ret %d err %d\n", ret, GetLastError()); - ok( LoadStringA( hInst, MAKELONG( 1, 0x8000 ), buf, sizeof(buf)) == ret, - "LoadString failed: ret %d err %d\n", ret, GetLastError()); - ok( LoadStringA( hInst, MAKELONG( 1, 0xffff ), buf, sizeof(buf)) == ret, - "LoadString failed: ret %d err %d\n", ret, GetLastError()); - - ret = LoadStringA(hInst, 65534, buf, sizeof(buf) ); - ok( ret > 0, "LoadString failed: ret %d err %d\n", ret, GetLastError()); - ok( LoadStringA( hInst, MAKELONG( 65534, 0x8000 ), buf, sizeof(buf)) == ret, - "LoadString failed: ret %d err %d\n", ret, GetLastError()); - ok( LoadStringA( hInst, MAKELONG( 65534, 0xffff ), buf, sizeof(buf)) == ret, - "LoadString failed: ret %d err %d\n", ret, GetLastError()); - - ret = LoadStringA(hInst, 0, buf, 0); - ok( ret == -1 || broken(ret == 0), - "LoadStringA did not return -1 when called with buflen = 0, got %d, err %d\n", - ret, GetLastError()); -} - -static void test_accel1(void) -{ - UINT r, n; - HACCEL hAccel; - ACCEL ac[10]; - - /* now create our own valid accelerator table */ - n = 0; - ac[n].cmd = 1000; - ac[n].key = 'A'; - ac[n++].fVirt = FVIRTKEY | FNOINVERT; - - ac[n].cmd = 1001; - ac[n].key = 'B'; - ac[n++].fVirt = FNOINVERT; - - ac[n].cmd = 0; - ac[n].key = 0; - ac[n++].fVirt = 0; - - hAccel = CreateAcceleratorTable( &ac[0], n ); - ok( hAccel != NULL, "create accelerator table\n"); - - r = DestroyAcceleratorTable( hAccel ); - ok( r, "destroy accelerator table\n"); - - /* now try create an invalid one */ - n = 0; - ac[n].cmd = 1000; - ac[n].key = 'A'; - ac[n++].fVirt = FVIRTKEY | FNOINVERT; - - ac[n].cmd = 0xffff; - ac[n].key = 0xffff; - ac[n++].fVirt = (SHORT) 0xffff; - - ac[n].cmd = 0xfff0; - ac[n].key = 0xffff; - ac[n++].fVirt = (SHORT) 0xfff0; - - ac[n].cmd = 0xfff0; - ac[n].key = 0xffff; - ac[n++].fVirt = (SHORT) 0x0000; - - ac[n].cmd = 0xfff0; - ac[n].key = 0xffff; - ac[n++].fVirt = (SHORT) 0x0001; - - hAccel = CreateAcceleratorTable( &ac[0], n ); - ok( hAccel != NULL, "create accelerator table\n"); - - r = CopyAcceleratorTable( hAccel, NULL, 0 ); - ok( r == n, "two entries in table %u/%u\n", r, n); - - r = CopyAcceleratorTable( hAccel, &ac[0], n ); - ok( r == n, "still should be two entries in table %u/%u\n", r, n); - - n=0; - ok( ac[n].cmd == 1000, "cmd 0 not preserved got %x\n", ac[n].cmd); - ok( ac[n].key == 'A', "key 0 not preserved got %x\n", ac[n].key); - ok( ac[n].fVirt == (FVIRTKEY | FNOINVERT), "fVirt 0 not preserved got %x\n", ac[n].fVirt); - - if (++n == r) goto done; - ok( ac[n].cmd == 0xffff, "cmd 1 not preserved got %x\n", ac[n].cmd); - ok( ac[n].key == 0xffff, "key 1 not preserved got %x\n", ac[n].key); - ok( ac[n].fVirt == 0x007f, "fVirt 1 wrong got %x\n", ac[n].fVirt); - - if (++n == r) goto done; - ok( ac[n].cmd == 0xfff0, "cmd 2 not preserved got %x\n", ac[n].cmd); - ok( (ac[n].key & 0xff) == 0xff, "key 2 not preserved got %x\n", ac[n].key); - ok( ac[n].fVirt == 0x0070, "fVirt 2 wrong got %x\n", ac[n].fVirt); - - if (++n == r) goto done; - ok( ac[n].cmd == 0xfff0, "cmd 3 not preserved got %x\n", ac[n].cmd); - ok( (ac[n].key & 0xff) == 0xff, "key 3 not preserved got %x\n", ac[n].key); - ok( ac[n].fVirt == 0x0000, "fVirt 3 wrong got %x\n", ac[n].fVirt); - - if (++n == r) goto done; - ok( ac[n].cmd == 0xfff0, "cmd 4 not preserved got %x\n", ac[n].cmd); - ok( ac[n].key == 0xffff, "key 4 not preserved got %x\n", ac[n].key); - ok( ac[n].fVirt == 0x0001, "fVirt 4 wrong got %x\n", ac[n].fVirt); -done: - r = DestroyAcceleratorTable( hAccel ); - ok( r, "destroy accelerator table\n"); - - hAccel = CreateAcceleratorTable( &ac[0], 0 ); - ok( !hAccel || broken(hAccel != NULL), /* nt4 */ "zero elements should fail\n"); - - /* these will on crash win2k - hAccel = CreateAcceleratorTable( NULL, 1 ); - hAccel = CreateAcceleratorTable( &ac[0], -1 ); - */ -} - -/* - * memcmp on the tables works in Windows, but does not work in wine, as - * there is an extra undefined and unused byte between fVirt and the key - */ -static void test_accel2(void) -{ - ACCEL ac[2], out[2]; - HACCEL hac; - int res; - - ac[0].cmd = 0; - ac[0].fVirt = 0; - ac[0].key = 0; - - ac[1].cmd = 0; - ac[1].fVirt = 0; - ac[1].key = 0; - - /* - * crashes on win2k - * hac = CreateAcceleratorTable( NULL, 1 ); - */ - - /* try a zero count */ - hac = CreateAcceleratorTable( &ac[0], 0 ); - ok( !hac || broken(hac != NULL), /* nt4 */ "fail\n"); - if (!hac) ok( !DestroyAcceleratorTable( hac ), "destroy failed\n"); - - /* creating one accelerator should work */ - hac = CreateAcceleratorTable( &ac[0], 1 ); - ok( hac != NULL , "fail\n"); - ok( 1 == CopyAcceleratorTable( hac, out, 1 ), "copy failed\n"); - ok( DestroyAcceleratorTable( hac ), "destroy failed\n"); - - /* how about two of the same type? */ - hac = CreateAcceleratorTable( &ac[0], 2); - ok( hac != NULL , "fail\n"); - res = CopyAcceleratorTable( hac, NULL, 100 ); - ok( res == 2, "copy null failed %d\n", res); - res = CopyAcceleratorTable( hac, NULL, 0 ); - ok( res == 2, "copy null failed %d\n", res); - res = CopyAcceleratorTable( hac, NULL, 1 ); - ok( res == 2, "copy null failed %d\n", res); - ok( 1 == CopyAcceleratorTable( hac, out, 1 ), "copy 1 failed\n"); - ok( 2 == CopyAcceleratorTable( hac, out, 2 ), "copy 2 failed\n"); - ok( DestroyAcceleratorTable( hac ), "destroy failed\n"); - /* ok( !memcmp( ac, out, sizeof ac ), "tables different\n"); */ - - /* how about two of the same type with a non-zero key? */ - ac[0].key = 0x20; - ac[1].key = 0x20; - hac = CreateAcceleratorTable( &ac[0], 2); - ok( hac != NULL , "fail\n"); - ok( 2 == CopyAcceleratorTable( hac, out, 2 ), "copy 2 failed\n"); - ok( DestroyAcceleratorTable( hac ), "destroy failed\n"); - /* ok( !memcmp( ac, out, sizeof ac ), "tables different\n"); */ - - /* how about two of the same type with a non-zero virtual key? */ - ac[0].fVirt = FVIRTKEY; - ac[0].key = 0x40; - ac[1].fVirt = FVIRTKEY; - ac[1].key = 0x40; - hac = CreateAcceleratorTable( &ac[0], 2); - ok( hac != NULL , "fail\n"); - ok( 2 == CopyAcceleratorTable( hac, out, 2 ), "copy 2 failed\n"); - /* ok( !memcmp( ac, out, sizeof ac ), "tables different\n"); */ - ok( DestroyAcceleratorTable( hac ), "destroy failed\n"); - - /* how virtual key codes */ - ac[0].fVirt = FVIRTKEY; - hac = CreateAcceleratorTable( &ac[0], 1); - ok( hac != NULL , "fail\n"); - ok( 1 == CopyAcceleratorTable( hac, out, 2 ), "copy 2 failed\n"); - /* ok( !memcmp( ac, out, sizeof ac/2 ), "tables different\n"); */ - ok( DestroyAcceleratorTable( hac ), "destroy failed\n"); - - /* how turning on all bits? */ - ac[0].cmd = 0xffff; - ac[0].fVirt = 0xff; - ac[0].key = 0xffff; - hac = CreateAcceleratorTable( &ac[0], 1); - ok( hac != NULL , "fail\n"); - ok( 1 == CopyAcceleratorTable( hac, out, 1 ), "copy 1 failed\n"); - /* ok( memcmp( ac, out, sizeof ac/2 ), "tables not different\n"); */ - ok( out[0].cmd == ac[0].cmd, "cmd modified\n"); - ok( out[0].fVirt == (ac[0].fVirt&0x7f), "fVirt not modified\n"); - ok( out[0].key == ac[0].key, "key modified\n"); - ok( DestroyAcceleratorTable( hac ), "destroy failed\n"); - - /* how turning on all bits? */ - memset( ac, 0xff, sizeof ac ); - hac = CreateAcceleratorTable( &ac[0], 2); - ok( hac != NULL , "fail\n"); - res = CopyAcceleratorTable( hac, out, 2 ); - ok( res == 2, "copy 2 failed %d\n", res); - /* ok( memcmp( ac, out, sizeof ac ), "tables not different\n"); */ - ok( out[0].cmd == ac[0].cmd, "cmd modified\n"); - ok( out[0].fVirt == (ac[0].fVirt&0x7f), "fVirt not modified\n"); - ok( out[0].key == ac[0].key, "key modified\n"); - if (res == 2) - { - ok( out[1].cmd == ac[1].cmd, "cmd modified\n"); - ok( out[1].fVirt == (ac[1].fVirt&0x7f), "fVirt not modified\n"); - ok( out[1].key == ac[1].key, "key modified\n"); - } - ok( DestroyAcceleratorTable( hac ), "destroy failed\n"); -} - -static void test_PrivateExtractIcons(void) { - CONST CHAR szShell32Dll[] = "shell32.dll"; - HICON ahIcon[256]; - UINT aIconId[256]; - UINT cIcons, cIcons2; - - if (!pPrivateExtractIconsA) return; - - cIcons = pPrivateExtractIconsA(szShell32Dll, 0, 16, 16, NULL, NULL, 0, 0); - cIcons2 = pPrivateExtractIconsA(szShell32Dll, 4, MAKELONG(32,16), MAKELONG(32,16), - NULL, NULL, 256, 0); - ok((cIcons == cIcons2) && (cIcons > 0), - "Icon count should be independent of requested icon sizes and base icon index! " - "(cIcons=%d, cIcons2=%d)\n", cIcons, cIcons2); - - cIcons = pPrivateExtractIconsA(szShell32Dll, 0, 16, 16, ahIcon, aIconId, 0, 0); - ok(cIcons == 0, "Zero icons requested, got cIcons=%d\n", cIcons); - - cIcons = pPrivateExtractIconsA(szShell32Dll, 0, 16, 16, ahIcon, aIconId, 3, 0); - ok(cIcons == 3, "Three icons requested got cIcons=%d\n", cIcons); - - /* count must be a multiple of two when getting two sizes */ - cIcons = pPrivateExtractIconsA(szShell32Dll, 0, MAKELONG(16,32), MAKELONG(16,32), - ahIcon, aIconId, 3, 0); - ok(cIcons == 0 /* vista */ || cIcons == 4, "Three icons requested got cIcons=%d\n", cIcons); - cIcons = pPrivateExtractIconsA(szShell32Dll, 0, MAKELONG(16,32), MAKELONG(16,32), - ahIcon, aIconId, 4, 0); - ok(cIcons == 4, "Four icons requested got cIcons=%d\n", cIcons); -} - -static void test_LoadImage(void) -{ - HBITMAP bmp; - HRSRC hres; - - bmp = LoadBitmapA(GetModuleHandle(NULL), MAKEINTRESOURCE(100)); - ok(bmp != NULL, "Could not load a bitmap resource\n"); - if (bmp) DeleteObject(bmp); - - hres = FindResource(GetModuleHandle(NULL), "#100", RT_BITMAP); - ok(hres != NULL, "Could not find a bitmap resource with a numeric string\n"); - - bmp = LoadBitmapA(GetModuleHandle(NULL), "#100"); - ok(bmp != NULL, "Could not load a bitmap resource with a numeric string\n"); - if (bmp) DeleteObject(bmp); -} - -START_TEST(resource) -{ - init_function_pointers(); - test_LoadStringA(); - test_LoadStringW(); - test_accel1(); - test_accel2(); - test_PrivateExtractIcons(); - test_LoadImage(); -} diff --git a/rostests/winetests/user32/resource.rc b/rostests/winetests/user32/resource.rc deleted file mode 100755 index 43417100f08..00000000000 --- a/rostests/winetests/user32/resource.rc +++ /dev/null @@ -1,194 +0,0 @@ -/* Unit test suite for resources. - * - * Copyright 2004 Ferenc Wagner - * - * 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 "windef.h" -#include "winuser.h" - -1 ACCELERATORS -{ - "^N", 1000 /* Ctrl+'N' */ - "N", 1001 /* Shift+'n' */ - "n", 1002 /* 'n' */ -} - -2 ACCELERATORS -{ - 78, 1000, VIRTKEY, CONTROL /* Ctrl+'N' */ - 78, 1001, ASCII /* 'N' */ - 110, 1002, ASCII /* 'n' */ - 78, 1003, VIRTKEY, ALT /* Alt+'N' */ - 78, 1004, VIRTKEY, CONTROL, SHIFT /* Ctrl+Shift+'N' */ - 78, 1005, VIRTKEY, CONTROL, ALT, SHIFT /* Ctrl+Alt+Shift+'N' */ -} - -STRINGTABLE -{ - 0 "String resource" - 1 "Another string resource" - 2 L"This is a wide string resource" - 65534 "Test high id" -} - -TEST_DIALOG DIALOG 0, 0, 60, 30 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE -CAPTION "Test dialog" -FONT 8, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", IDOK,4,4,50,14, WS_TABSTOP | WS_GROUP -} - -RADIO_TEST_DIALOG DIALOGEX 0, 0, 160, 80 -STYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU -CAPTION "Radio Button Test Dialog" -FONT 8, "MS Shell Dlg" -{ - GROUPBOX "Static", 100,6,5,92,70 - CONTROL "Radio1", 200,"Button",BS_AUTORADIOBUTTON | - WS_GROUP | WS_TABSTOP,17,27,39,10 - CONTROL "Radio2", 201,"Button",BS_AUTORADIOBUTTON,17,40,39,10 - PUSHBUTTON "Cancel", IDCANCEL,109,20,50,14, WS_TABSTOP | WS_GROUP -} - -CLASS_TEST_DIALOG DIALOG 0, 0, 91, 28 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "CreateDialogParams Test" -CLASS "TestDialog" -FONT 8, "MS Shell Dlg" -{ -} - -CLASS_TEST_DIALOG_2 DIALOG 0, 0, 100, 100 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "CreateDialogParams Test" -CLASS "MyDialogClass" -FONT 8, "MS Shell Dlg" -{ -} - -FOCUS_TEST_DIALOG DIALOG 0, 0, 60, 30 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_CONTROL -CAPTION "Test dialog" -FONT 8, "MS Shell Dlg" -{ - EDITTEXT 200,4,4,50,14 -} - -IDD_DIALOG DIALOG 0, 0, 186, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Dialog" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,129,7,50,14 - PUSHBUTTON "Cancel",IDCANCEL,129,24,50,14 -END - -TEST_EMPTY_DIALOG DIALOG 0, 0, 186, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Dialog" -FONT 8, "MS Sans Serif" -BEGIN -END - -MULTI_EDIT_DIALOG DIALOG 0, 0, 160, 75 -STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER -CAPTION "Multiple Edit Test" -FONT 8, "MS Shell Dlg" -{ - EDITTEXT 1000, 5, 5, 150, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_MULTILINE | ES_WANTRETURN - EDITTEXT 1001, 5, 25, 150, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - EDITTEXT 1002, 5, 45, 150, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP -} - -EDIT_DIALOG DIALOG 0, 0, 160, 80 -STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER -CAPTION "Edit Test" -FONT 8, "MS Shell Dlg" -{ - PUSHBUTTON "OK", IDOK, 20, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "Cancel", IDCANCEL, 100, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - EDITTEXT 1000, 5, 5, 150, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_MULTILINE | WS_VSCROLL | ES_AUTOVSCROLL -} - -EDIT_SINGLELINE_DIALOG DIALOG 0, 0, 160, 80 -STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER -CAPTION "Edit Test" -FONT 8, "MS Shell Dlg" -{ - PUSHBUTTON "OK", IDOK, 20, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "Cancel", IDCANCEL, 100, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - EDITTEXT 1000, 5, 5, 150, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | ES_AUTOVSCROLL -} - -EDIT_SINGLELINE_WANTRETURN_DIALOG DIALOG 0, 0, 160, 80 -STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER -CAPTION "Edit Test" -FONT 8, "MS Shell Dlg" -{ - PUSHBUTTON "OK", IDOK, 20, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "Cancel", IDCANCEL, 100, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - EDITTEXT 1000, 5, 5, 150, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | ES_AUTOVSCROLL | ES_WANTRETURN -} - -EDIT_WANTRETURN_DIALOG DIALOG 0, 0, 160, 80 -STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER -CAPTION "Edit Test" -FONT 8, "MS Shell Dlg" -{ - PUSHBUTTON "OK", IDOK, 20, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "Cancel", IDCANCEL, 100, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - EDITTEXT 1000, 5, 5, 150, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_MULTILINE | WS_VSCROLL | ES_AUTOVSCROLL | ES_WANTRETURN -} - -EDIT_READONLY_DIALOG DIALOG 0, 0, 160, 80 -STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER -CAPTION "Edit Readonly Test" -FONT 8, "MS Shell Dlg" -{ - PUSHBUTTON "OK", IDOK, 20, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "Cancel", IDCANCEL, 100, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - EDITTEXT 1000, 5, 5, 150, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_MULTILINE | WS_VSCROLL | ES_AUTOVSCROLL | ES_READONLY -} - -/* @makedep: test_mono.bmp */ -100 BITMAP test_mono.bmp - -1 MENU -{ - POPUP "&File" - { - POPUP "&New..." - { - MENUITEM "&New file", 100 - } - MENUITEM "&Open", 101 - MENUITEM "&Save", 102 - MENUITEM SEPARATOR - MENUITEM "E&xit", 103 - } - POPUP "&Edit" - { - MENUITEM "&Undo", 200 - MENUITEM SEPARATOR - MENUITEM "Cu&t", 201 - MENUITEM "&Copy", 202 - MENUITEM "&Paste", 203 - MENUITEM "&Delete", 204 - } - MENUITEM "&Quit", 300 -} diff --git a/rostests/winetests/user32/scroll.c b/rostests/winetests/user32/scroll.c deleted file mode 100644 index e4bfdb15de5..00000000000 --- a/rostests/winetests/user32/scroll.c +++ /dev/null @@ -1,455 +0,0 @@ -/* - * Unit tests for scrollbar - * - * Copyright 2008 Lyutin Anatoly (Etersoft) - * - * 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/test.h" - -static HWND hScroll, hMainWnd; -static BOOL bThemeActive = FALSE; - -static LRESULT CALLBACK MyWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ) -{ - switch(msg) - { - - case WM_CREATE: - { - hScroll = CreateWindowA( "SCROLLBAR", "", WS_CHILD | WS_VISIBLE, 0, 0, 120, 100, hWnd, (HMENU)100, GetModuleHandleA(0), 0 ); - - return 0; - } - case WM_DESTROY: - PostQuitMessage(0); - break; - case WM_HSCROLL: - case WM_VSCROLL: - /* stop tracking */ - ReleaseCapture(); - return 0; - default: - return DefWindowProcA(hWnd, msg, wParam, lParam); - } - return 0; -} -static void scrollbar_test_track(void) -{ - /* test that scrollbar tracking is terminated when - * the control looses mouse capture */ - SendMessage( hScroll, WM_LBUTTONDOWN, 0, MAKELPARAM( 1, 1)); - /* a normal return from the sendmessage */ - /* not normal for instance by closing the windws */ - ok( IsWindow( hScroll), "Scrollbar has gone!\n"); -} - -static void scrollbar_test1(void) -{ - BOOL ret; - - ret = EnableScrollBar( hScroll, SB_CTL, ESB_DISABLE_BOTH ); - ok( ret, "The scrollbar should be disabled.\n" ); - ok( !IsWindowEnabled( hScroll ), "The scrollbar window should be disabled.\n" ); - - ret = EnableScrollBar( hScroll, SB_CTL, ESB_ENABLE_BOTH ); - ok( ret, "The scrollbar should be enabled.\n" ); - ok( IsWindowEnabled( hScroll ), "The scrollbar window should be enabled.\n" ); - - /* test buttons separately */ - ret = EnableScrollBar( hScroll, SB_CTL, ESB_DISABLE_LTUP ); - ok( ret, "The scrollbar LTUP button should be disabled.\n" ); - ok( IsWindowEnabled( hScroll ), "The scrollbar window should be enabled.\n" ); - ret = EnableScrollBar( hScroll, SB_CTL, ESB_ENABLE_BOTH ); - ok( ret, "The scrollbar should be enabled.\n" ); - ok( IsWindowEnabled( hScroll ), "The scrollbar window should be enabled.\n" ); - - ret = EnableScrollBar( hScroll, SB_CTL, ESB_DISABLE_RTDN ); - ok( ret, "The scrollbar RTDN button should be disabled.\n" ); - ok( IsWindowEnabled( hScroll ), "The scrollbar window should be enabled.\n" ); - ret = EnableScrollBar( hScroll, SB_CTL, ESB_ENABLE_BOTH ); - ok( ret, "The scrollbar should be enabled.\n" ); - ok( IsWindowEnabled( hScroll ), "The scrollbar window should be enabled.\n" ); -} - -static void scrollbar_test2(void) -{ - int ret; - - trace("The scrollbar is disabled.\n"); - - EnableWindow( hScroll, FALSE ); - ok( !IsWindowEnabled( hScroll ), "The scroll should be disabled.\n" ); - - ret = SetScrollPos( hScroll, SB_CTL, 30, TRUE); - ok( !ret, "The position should not be set.\n" ); - - ret = GetScrollPos( hScroll, SB_CTL); - ok( !ret, "The position should be equal to zero\n"); - - ret = SetScrollRange( hScroll, SB_CTL, 0, 100, TRUE ); - ok( ret, "The range should be set.\n" ); - - ret = SetScrollPos( hScroll, SB_CTL, 30, TRUE); - ok( !ret , "The position should not be set.\n" ); - - ret = GetScrollPos( hScroll, SB_CTL); - ok( ret == 30, "The position should be set!!!\n"); - - trace("The scrollbar is enabled.\n"); - - EnableWindow( hScroll, TRUE ); - ok( IsWindowEnabled( hScroll ), "The scroll should be enabled.\n" ); - - ret = SetScrollPos( hScroll, SB_CTL, 30, TRUE); - ok( ret == 30, "The position should be set.\n" ); - - ret = GetScrollPos( hScroll, SB_CTL); - ok( ret == 30, "The position should not be equal to zero\n"); - - ret = SetScrollRange( hScroll, SB_CTL, 0, 100, TRUE ); - ok( ret, "The range should be set.\n" ); - - ret = SetScrollPos( hScroll, SB_CTL, 30, TRUE); - ok( ret == 30, "The position should be set.\n" ); - - ret = GetScrollPos( hScroll, SB_CTL); - ok( ret == 30, "The position should not be equal to zero\n"); -} - -static void scrollbar_test3(void) -{ - BOOL ret; - - ret = ShowScrollBar( hScroll, SB_CTL, FALSE ); - ok( ret, "The ShowScrollBar() should not failed.\n" ); - ok( !IsWindowVisible( hScroll ), "The scrollbar window should not be visible\n" ); - - ret = ShowScrollBar( hScroll, SB_CTL, TRUE ); - ok( ret, "The ShowScrollBar() should not failed.\n" ); - ok( !IsWindowVisible( hScroll ), "The scrollbar window should be visible\n" ); - - ret = ShowScrollBar( NULL, SB_CTL, TRUE ); - ok( !ret, "The ShowScrollBar() should failed.\n" ); - -} - -static void scrollbar_test4(void) -{ - BOOL ret; - SCROLLBARINFO sbi; - RECT rect; - BOOL (WINAPI *pGetScrollBarInfo)(HWND, LONG, LPSCROLLBARINFO); - - pGetScrollBarInfo = (void*)GetProcAddress(GetModuleHandleA("user32.dll"), "GetScrollBarInfo"); - if (!pGetScrollBarInfo) - { - win_skip("GetScrollBarInfo is not available\n"); - return; - } - - /* Test GetScrollBarInfo to make sure it returns rcScrollBar in screen - * coordinates. */ - sbi.cbSize = sizeof(sbi); - ret = pGetScrollBarInfo( hScroll, OBJID_CLIENT, &sbi); - ok( ret, "The GetScrollBarInfo() call should not fail.\n" ); - GetWindowRect( hScroll, &rect ); - ok( ret, "The GetWindowRect() call should not fail.\n" ); - ok( !(sbi.rgstate[0] & (STATE_SYSTEM_INVISIBLE|STATE_SYSTEM_OFFSCREEN)), - "unexpected rgstate(0x%x)\n", sbi.rgstate[0]); - ok( EqualRect(&rect, &sbi.rcScrollBar), - "WindowRect(%d, %d, %d, %d) != rcScrollBar(%d, %d, %d, %d)\n", - rect.top, rect.left, rect.bottom, rect.right, - sbi.rcScrollBar.top, sbi.rcScrollBar.left, - sbi.rcScrollBar.bottom, sbi.rcScrollBar.right ); - - /* Test windows horizontal and vertical scrollbar to make sure rcScrollBar - * is still returned in screen coordinates by moving the window, and - * making sure that it shifts the rcScrollBar value. */ - ShowWindow( hMainWnd, SW_SHOW ); - sbi.cbSize = sizeof(sbi); - ret = pGetScrollBarInfo( hMainWnd, OBJID_HSCROLL, &sbi); - ok( ret, "The GetScrollBarInfo() call should not fail.\n" ); - GetWindowRect( hMainWnd, &rect ); - ok( ret, "The GetWindowRect() call should not fail.\n" ); - MoveWindow( hMainWnd, rect.left+5, rect.top+5, - rect.right-rect.left, rect.bottom-rect.top, TRUE ); - rect = sbi.rcScrollBar; - OffsetRect(&rect, 5, 5); - ret = pGetScrollBarInfo( hMainWnd, OBJID_HSCROLL, &sbi); - ok( ret, "The GetScrollBarInfo() call should not fail.\n" ); - ok( EqualRect(&rect, &sbi.rcScrollBar), - "PreviousRect(%d, %d, %d, %d) != CurrentRect(%d, %d, %d, %d)\n", - rect.top, rect.left, rect.bottom, rect.right, - sbi.rcScrollBar.top, sbi.rcScrollBar.left, - sbi.rcScrollBar.bottom, sbi.rcScrollBar.right ); - - sbi.cbSize = sizeof(sbi); - ret = pGetScrollBarInfo( hMainWnd, OBJID_VSCROLL, &sbi); - ok( ret, "The GetScrollBarInfo() call should not fail.\n" ); - GetWindowRect( hMainWnd, &rect ); - ok( ret, "The GetWindowRect() call should not fail.\n" ); - MoveWindow( hMainWnd, rect.left+5, rect.top+5, - rect.right-rect.left, rect.bottom-rect.top, TRUE ); - rect = sbi.rcScrollBar; - OffsetRect(&rect, 5, 5); - ret = pGetScrollBarInfo( hMainWnd, OBJID_VSCROLL, &sbi); - ok( ret, "The GetScrollBarInfo() call should not fail.\n" ); - ok( EqualRect(&rect, &sbi.rcScrollBar), - "PreviousRect(%d, %d, %d, %d) != CurrentRect(%d, %d, %d, %d)\n", - rect.top, rect.left, rect.bottom, rect.right, - sbi.rcScrollBar.top, sbi.rcScrollBar.left, - sbi.rcScrollBar.bottom, sbi.rcScrollBar.right ); -} - -/* some tests designed to show that Horizontal and Vertical - * window scroll bar info are not created independently */ -static void scrollbar_test_default( DWORD style) -{ - INT min, max, ret; - DWORD winstyle; - HWND hwnd; - SCROLLINFO si = { sizeof( SCROLLINFO), SIF_TRACKPOS }; - - hwnd = CreateWindowExA( 0, "static", "", WS_POPUP | style, - 0, 0, 10, 10, 0, 0, 0, NULL); - assert( hwnd != 0); - - ret = GetScrollRange( hwnd, SB_VERT, &min, &max); - ok( ret || - broken( !ret) /* Win 9x/ME */ , "GetScrollRange failed.\n"); - /* range is 0,0 if there are no H or V scroll bars. 0,100 otherwise */ - if( !( style & ( WS_VSCROLL | WS_HSCROLL))) - ok( min == 0 && max == 0, - "Scroll bar range is %d,%d. Expected 0,0. Style %08x\n", min, max, style); - else -todo_wine - ok(( min == 0 && max == 100) || - broken( min == 0 && max == 0), /* Win 9x/ME */ - "Scroll bar range is %d,%d. Expected 0,100. Style %08x\n", min, max, style); - ret = GetScrollRange( hwnd, SB_HORZ, &min, &max); - ok( ret || - broken( !ret) /* Win 9x/ME */ , "GetScrollRange failed.\n"); - /* range is 0,0 if there are no H or V scroll bars. 0,100 otherwise */ - if( !( style & ( WS_VSCROLL | WS_HSCROLL))) - ok( min == 0 && max == 0, - "Scroll bar range is %d,%d. Expected 0,0. Style %08x\n", min, max, style); - else -todo_wine - ok(( min == 0 && max == 100) || - broken( min == 0 && max == 0), /* Win 9x/ME */ - "Scroll bar range is %d,%d. Expected 0,100. Style %08x\n", min, max, style); - /* test GetScrollInfo, vist for vertical SB */ - ret = GetScrollInfo( hwnd, SB_VERT, &si); - /* should fail if no H or V scroll bar styles are present. Succeed otherwise */ - if( !( style & ( WS_VSCROLL | WS_HSCROLL))) - ok( !ret, "GetScrollInfo succeeded unexpectedly. Style is %08x\n", style); - else -todo_wine - ok( ret || - broken( !ret), /* Win 9x/ME */ - "GetScrollInfo failed unexpectedly. Style is %08x\n", style); - /* Same for Horizontal SB */ - ret = GetScrollInfo( hwnd, SB_HORZ, &si); - /* should fail if no H or V scroll bar styles are present. Succeed otherwise */ - if( !( style & ( WS_VSCROLL | WS_HSCROLL))) - ok( !ret, "GetScrollInfo succeeded unexpectedly. Style is %08x\n", style); - else -todo_wine - ok( ret || - broken( !ret), /* Win 9x/ME */ - "GetScrollInfo failed unexpectedly. Style is %08x\n", style); - /* now set the Vertical Scroll range to something that could be the default value it - * already has */; - ret = SetScrollRange( hwnd, SB_VERT, 0, 100, FALSE); - ok( ret, "SetScrollRange failed.\n"); - /* and request the Horizontal range */ - ret = GetScrollRange( hwnd, SB_HORZ, &min, &max); - ok( ret, "GetScrollRange failed.\n"); - /* now the range should be 0,100 in ALL cases */ - ok( min == 0 && max == 100, - "Scroll bar range is %d,%d. Expected 0,100. Style %08x\n", min, max, style); - /* See what is different now for GetScrollRange */ - ret = GetScrollInfo( hwnd, SB_HORZ, &si); - /* should succeed in ALL cases */ - ok( ret, "GetScrollInfo failed unexpectedly. Style is %08x\n", style); - ret = GetScrollInfo( hwnd, SB_VERT, &si); - /* should succeed in ALL cases */ - ok( ret, "GetScrollInfo failed unexpectedly. Style is %08x\n", style); - /* report the windows style */ - winstyle = GetWindowLongA( hwnd, GWL_STYLE ); - /* WS_VSCROLL added to the window style */ - if( !(style & WS_VSCROLL)) - { - if (bThemeActive || style != WS_HSCROLL) -todo_wine - ok( (winstyle & (WS_HSCROLL|WS_VSCROLL)) == ( style | WS_VSCROLL), - "unexpected style change %8lx expected %8lx\n", - (winstyle & (WS_HSCROLL|WS_VSCROLL)), style | WS_VSCROLL); - else - ok( (winstyle & (WS_HSCROLL|WS_VSCROLL)) == style || - broken((winstyle & (WS_HSCROLL|WS_VSCROLL)) == (WS_HSCROLL|WS_VSCROLL)), /* Win 9x/ME */ - "unexpected style change %8lx expected %8x\n", - (winstyle & (WS_HSCROLL|WS_VSCROLL)), style); - } - /* do the test again with H and V reversed. - * Start with a clean window */ - DestroyWindow( hwnd); - hwnd = CreateWindowExA( 0, "static", "", WS_POPUP | style, - 0, 0, 10, 10, 0, 0, 0, NULL); - assert( hwnd != 0); - /* Set Horizontal Scroll range to something that could be the default value it - * already has */; - ret = SetScrollRange( hwnd, SB_HORZ, 0, 100, FALSE); - ok( ret, "SetScrollRange failed.\n"); - /* and request the Vertical range */ - ret = GetScrollRange( hwnd, SB_VERT, &min, &max); - ok( ret, "GetScrollRange failed.\n"); - /* now the range should be 0,100 in ALL cases */ - ok( min == 0 && max == 100, - "Scroll bar range is %d,%d. Expected 0,100. Style %08x\n", min, max, style); - /* See what is different now for GetScrollRange */ - ret = GetScrollInfo( hwnd, SB_HORZ, &si); - /* should succeed in ALL cases */ - ok( ret, "GetScrollInfo failed unexpectedly. Style is %08x\n", style); - ret = GetScrollInfo( hwnd, SB_VERT, &si); - /* should succeed in ALL cases */ - ok( ret, "GetScrollInfo failed unexpectedly. Style is %08x\n", style); - /* report the windows style */ - winstyle = GetWindowLongA( hwnd, GWL_STYLE ); - /* WS_HSCROLL added to the window style */ - if( !(style & WS_HSCROLL)) - { - if (bThemeActive || style != WS_VSCROLL) -todo_wine - ok( (winstyle & (WS_HSCROLL|WS_VSCROLL)) == ( style | WS_HSCROLL), - "unexpected style change %8lx expected %8lx\n", - (winstyle & (WS_HSCROLL|WS_VSCROLL)), style | WS_HSCROLL); - else - ok( (winstyle & (WS_HSCROLL|WS_VSCROLL)) == style || - broken((winstyle & (WS_HSCROLL|WS_VSCROLL)) == (WS_HSCROLL|WS_VSCROLL)), /* Win 9x/ME */ - "unexpected style change %8lx expected %8x\n", - (winstyle & (WS_HSCROLL|WS_VSCROLL)), style); - } - /* Slightly change the test to use SetScrollInfo - * Start with a clean window */ - DestroyWindow( hwnd); - hwnd = CreateWindowExA( 0, "static", "", WS_POPUP | style, - 0, 0, 10, 10, 0, 0, 0, NULL); - assert( hwnd != 0); - /* set Horizontal position with SetScrollInfo */ - si.nPos = 0; - si.nMin = 11; - si.nMax = 22; - si.fMask |= SIF_RANGE; - ret = SetScrollInfo( hwnd, SB_HORZ, &si, FALSE); - ok( ret, "SetScrollInfo failed. Style is %08x\n", style); - /* and request the Vertical range */ - ret = GetScrollRange( hwnd, SB_VERT, &min, &max); - ok( ret, "GetScrollRange failed.\n"); - /* now the range should be 0,100 in ALL cases */ - ok( min == 0 && max == 100, - "Scroll bar range is %d,%d. Expected 0,100. Style %08x\n", min, max, style); - /* See what is different now for GetScrollRange */ - ret = GetScrollInfo( hwnd, SB_HORZ, &si); - /* should succeed in ALL cases */ - ok( ret, "GetScrollInfo failed unexpectedly. Style is %08x\n", style); - ret = GetScrollInfo( hwnd, SB_VERT, &si); - /* should succeed in ALL cases */ - ok( ret, "GetScrollInfo failed unexpectedly. Style is %08x\n", style); - /* also test if the window scroll bars are enabled */ - ret = EnableScrollBar( hwnd, SB_VERT, ESB_ENABLE_BOTH); - ok( !ret, "Vertical window scroll bar was not enabled\n"); - ret = EnableScrollBar( hwnd, SB_HORZ, ESB_ENABLE_BOTH); - ok( !ret, "Horizontal window scroll bar was not enabled\n"); - DestroyWindow( hwnd); - /* finally, check if adding a WS_[HV]SColl style of a window makes the scroll info - * available */ - if( style & (WS_HSCROLL | WS_VSCROLL)) return;/* only test if not yet set */ - /* Start with a clean window */ - DestroyWindow( hwnd); - hwnd = CreateWindowExA( 0, "static", "", WS_POPUP , - 0, 0, 10, 10, 0, 0, 0, NULL); - assert( hwnd != 0); - ret = GetScrollInfo( hwnd, SB_VERT, &si); - /* should fail */ - ok( !ret, "GetScrollInfo succeeded unexpectedly. Style is %08x\n", style); - /* add scroll styles */ - winstyle = GetWindowLongA( hwnd, GWL_STYLE ); - SetWindowLongW( hwnd, GWL_STYLE, winstyle | WS_VSCROLL | WS_HSCROLL); - ret = GetScrollInfo( hwnd, SB_VERT, &si); - /* should still fail */ - ok( !ret, "GetScrollInfo succeeded unexpectedly. Style is %08x\n", style); - /* clean up */ - DestroyWindow( hwnd); -} - -START_TEST ( scroll ) -{ - WNDCLASSA wc; - HMODULE hUxtheme; - BOOL (WINAPI * pIsThemeActive)(VOID); - - wc.style = CS_HREDRAW | CS_VREDRAW; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = GetModuleHandleA(NULL); - wc.hIcon = NULL; - wc.hCursor = LoadCursorA(NULL, IDC_IBEAM); - wc.hbrBackground = GetSysColorBrush(COLOR_WINDOW); - wc.lpszMenuName = NULL; - wc.lpszClassName = "MyTestWnd"; - wc.lpfnWndProc = MyWndProc; - RegisterClassA(&wc); - - hMainWnd = CreateWindowExA( 0, "MyTestWnd", "Scroll", - WS_OVERLAPPEDWINDOW|WS_VSCROLL|WS_HSCROLL, - CW_USEDEFAULT, CW_USEDEFAULT, 100, 100, NULL, NULL, GetModuleHandleA(NULL), 0 ); - - ok(hMainWnd != NULL, "Failed to create parent window. Tests aborted.\n"); - if (!hMainWnd) return; - - assert( hScroll ); - - scrollbar_test1(); - scrollbar_test2(); - scrollbar_test3(); - scrollbar_test4(); - scrollbar_test_track(); - - /* Some test results vary depending of theming being active or not */ - hUxtheme = LoadLibraryA("uxtheme.dll"); - if (hUxtheme) - { - pIsThemeActive = (void*)GetProcAddress(hUxtheme, "IsThemeActive"); - if (pIsThemeActive) - bThemeActive = pIsThemeActive(); - FreeLibrary(hUxtheme); - } - - scrollbar_test_default( 0); - scrollbar_test_default( WS_HSCROLL); - scrollbar_test_default( WS_VSCROLL); - scrollbar_test_default( WS_HSCROLL | WS_VSCROLL); - - DestroyWindow(hScroll); - DestroyWindow(hMainWnd); -} diff --git a/rostests/winetests/user32/static.c b/rostests/winetests/user32/static.c deleted file mode 100644 index 62089bd46c2..00000000000 --- a/rostests/winetests/user32/static.c +++ /dev/null @@ -1,154 +0,0 @@ -/* Unit test suite for static controls. - * - * Copyright 2007 Google (Mikolaj Zalewski) - * - * 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 - -#define STRICT -#define WIN32_LEAN_AND_MEAN -#include - -#include "wine/test.h" - -#define TODO_COUNT 1 - -#define CTRL_ID 1995 - -static HWND hMainWnd; - -#define expect_eq(expr, value, type, fmt) { type val = expr; ok(val == (value), #expr " expected " fmt " got " fmt "\n", (value), val); } -#define expect_rect(r, _left, _top, _right, _bottom) ok(r.left == _left && r.top == _top && \ - r.bottom == _bottom && r.right == _right, "Invalid rect (%d,%d) (%d,%d) vs (%d,%d) (%d,%d)\n", \ - r.left, r.top, r.right, r.bottom, _left, _top, _right, _bottom); - -static int g_nReceivedColorStatic = 0; - -/* try to make sure pending X events have been processed before continuing */ -static void flush_events(void) -{ - MSG msg; - int diff = 200; - int min_timeout = 100; - DWORD time = GetTickCount() + diff; - - while (diff > 0) - { - if (MsgWaitForMultipleObjects( 0, NULL, FALSE, min_timeout, QS_ALLINPUT ) == WAIT_TIMEOUT) break; - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg ); - diff = time - GetTickCount(); - } -} - -static HWND build_static(DWORD style) -{ - return CreateWindow("static", "Test", WS_VISIBLE|WS_CHILD|style, 5, 5, 100, 100, hMainWnd, (HMENU)CTRL_ID, NULL, 0); -} - -static LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - switch (msg) - { - case WM_CTLCOLORSTATIC: - { - HDC hdc = (HDC)wparam; - HRGN hrgn = CreateRectRgn(0, 0, 1, 1); - ok(GetClipRgn(hdc, hrgn) == 1, "Static controls during a WM_CTLCOLORSTATIC must have a clipping region\n"); - DeleteObject(hrgn); - g_nReceivedColorStatic++; - return (LRESULT) GetStockObject(BLACK_BRUSH); - } - break; - } - - return DefWindowProc(hwnd, msg, wparam, lparam); -} - -static void test_updates(int style, int flags) -{ - RECT r1 = {20, 20, 30, 30}; - HWND hStatic = build_static(style); - int exp; - - flush_events(); - trace("Testing style 0x%x\n", style); - g_nReceivedColorStatic = 0; - /* during each update parent WndProc will test the WM_CTLCOLORSTATIC message */ - InvalidateRect(hMainWnd, NULL, FALSE); - UpdateWindow(hMainWnd); - InvalidateRect(hMainWnd, &r1, FALSE); - UpdateWindow(hMainWnd); - InvalidateRect(hStatic, &r1, FALSE); - UpdateWindow(hStatic); - InvalidateRect(hStatic, NULL, FALSE); - UpdateWindow(hStatic); - - if( (style & SS_TYPEMASK) == SS_BITMAP) { - HDC hdc = GetDC( hStatic); - COLORREF colour = GetPixel( hdc, 10, 10); - ok ( colour != 0, "pixel should NOT be painted black!\n"); - } - if (style != SS_ETCHEDHORZ && style != SS_ETCHEDVERT) - exp = 4; - else - exp = 1; /* SS_ETCHED* seems to send WM_CTLCOLORSTATIC only sometimes */ - - if (flags & TODO_COUNT) - todo_wine { expect_eq(g_nReceivedColorStatic, exp, int, "%d"); } - else if ((style & SS_TYPEMASK) == SS_ICON || (style & SS_TYPEMASK) == SS_BITMAP) - ok( g_nReceivedColorStatic == exp, "expected %u got %u\n", exp, g_nReceivedColorStatic ); - else - expect_eq(g_nReceivedColorStatic, exp, int, "%d"); - DestroyWindow(hStatic); -} - -START_TEST(static) -{ - static char szClassName[] = "testclass"; - WNDCLASSEX wndclass; - - wndclass.cbSize = sizeof(wndclass); - wndclass.style = CS_HREDRAW | CS_VREDRAW; - wndclass.lpfnWndProc = WndProc; - wndclass.cbClsExtra = 0; - wndclass.cbWndExtra = 0; - wndclass.hInstance = GetModuleHandle(NULL); - wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION); - wndclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION); - wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); - wndclass.hbrBackground = GetStockObject(WHITE_BRUSH); - wndclass.lpszClassName = szClassName; - wndclass.lpszMenuName = NULL; - RegisterClassEx(&wndclass); - - hMainWnd = CreateWindow(szClassName, "Test", WS_OVERLAPPEDWINDOW, 0, 0, 500, 500, NULL, NULL, GetModuleHandle(NULL), NULL); - ShowWindow(hMainWnd, SW_SHOW); - - test_updates(0, 0); - test_updates(SS_SIMPLE, 0); - test_updates(SS_ICON, 0); - test_updates(SS_BITMAP, 0); - test_updates(SS_BITMAP | SS_CENTERIMAGE, 0); - test_updates(SS_BLACKRECT, TODO_COUNT); - test_updates(SS_WHITERECT, TODO_COUNT); - test_updates(SS_ETCHEDHORZ, TODO_COUNT); - test_updates(SS_ETCHEDVERT, TODO_COUNT); - - DestroyWindow(hMainWnd); -} diff --git a/rostests/winetests/user32/sysparams.c b/rostests/winetests/user32/sysparams.c deleted file mode 100755 index 1de3da0300f..00000000000 --- a/rostests/winetests/user32/sysparams.c +++ /dev/null @@ -1,2848 +0,0 @@ -/* Unit test suite for functions SystemParametersInfo and GetSystemMetrics. - * - * Copyright 2002 Andriy Palamarchuk - * - * 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 - -#undef _WIN32_WINNT -#define _WIN32_WINNT 0x0600 /* For SPI_GETMOUSEHOVERWIDTH and more */ -//#define _WIN32_IE 0x0700 - -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winreg.h" -#include "winuser.h" -#include "winnls.h" - -#ifndef SPI_GETDESKWALLPAPER -# define SPI_GETDESKWALLPAPER 0x0073 -#endif - -static LONG (WINAPI *pChangeDisplaySettingsExA)(LPCSTR, LPDEVMODEA, HWND, DWORD, LPVOID); - -static int strict; -static int dpi; -static int iswin9x; -static HDC hdc; - -#define eq(received, expected, label, type) \ - ok((received) == (expected), "%s: got " type " instead of " type "\n", (label),(received),(expected)) - - -#define SPI_SETBEEP_REGKEY "Control Panel\\Sound" -#define SPI_SETBEEP_VALNAME "Beep" -#define SPI_SETMOUSE_REGKEY "Control Panel\\Mouse" -#define SPI_SETMOUSE_VALNAME1 "MouseThreshold1" -#define SPI_SETMOUSE_VALNAME2 "MouseThreshold2" -#define SPI_SETMOUSE_VALNAME3 "MouseSpeed" -#define SPI_SETBORDER_REGKEY "Control Panel\\Desktop\\WindowMetrics" -#define SPI_SETBORDER_REGKEY2 "Control Panel\\Desktop" -#define SPI_SETBORDER_VALNAME "BorderWidth" -#define SPI_METRIC_REGKEY "Control Panel\\Desktop\\WindowMetrics" -#define SPI_SCROLLWIDTH_VALNAME "ScrollWidth" -#define SPI_SCROLLHEIGHT_VALNAME "ScrollHeight" -#define SPI_CAPTIONWIDTH_VALNAME "CaptionWidth" -#define SPI_CAPTIONHEIGHT_VALNAME "CaptionHeight" -#define SPI_CAPTIONFONT_VALNAME "CaptionFont" -#define SPI_SMCAPTIONWIDTH_VALNAME "SmCaptionWidth" -#define SPI_SMCAPTIONHEIGHT_VALNAME "SmCaptionHeight" -#define SPI_SMCAPTIONFONT_VALNAME "SmCaptionFont" -#define SPI_MENUWIDTH_VALNAME "MenuWidth" -#define SPI_MENUHEIGHT_VALNAME "MenuHeight" -#define SPI_MENUFONT_VALNAME "MenuFont" -#define SPI_STATUSFONT_VALNAME "StatusFont" -#define SPI_MESSAGEFONT_VALNAME "MessageFont" - -#define SPI_SETKEYBOARDSPEED_REGKEY "Control Panel\\Keyboard" -#define SPI_SETKEYBOARDSPEED_VALNAME "KeyboardSpeed" -#define SPI_ICONHORIZONTALSPACING_REGKEY "Control Panel\\Desktop\\WindowMetrics" -#define SPI_ICONHORIZONTALSPACING_REGKEY2 "Control Panel\\Desktop" -#define SPI_ICONHORIZONTALSPACING_VALNAME "IconSpacing" -#define SPI_ICONVERTICALSPACING_REGKEY "Control Panel\\Desktop\\WindowMetrics" -#define SPI_ICONVERTICALSPACING_REGKEY2 "Control Panel\\Desktop" -#define SPI_ICONVERTICALSPACING_VALNAME "IconVerticalSpacing" -#define SPI_MINIMIZEDMETRICS_REGKEY "Control Panel\\Desktop\\WindowMetrics" -#define SPI_MINWIDTH_VALNAME "MinWidth" -#define SPI_MINHORZGAP_VALNAME "MinHorzGap" -#define SPI_MINVERTGAP_VALNAME "MinVertGap" -#define SPI_MINARRANGE_VALNAME "MinArrange" -#define SPI_SETSCREENSAVETIMEOUT_REGKEY "Control Panel\\Desktop" -#define SPI_SETSCREENSAVETIMEOUT_VALNAME "ScreenSaveTimeOut" -#define SPI_SETSCREENSAVEACTIVE_REGKEY "Control Panel\\Desktop" -#define SPI_SETSCREENSAVEACTIVE_VALNAME "ScreenSaveActive" -#define SPI_SETGRIDGRANULARITY_REGKEY "Control Panel\\Desktop" -#define SPI_SETGRIDGRANULARITY_VALNAME "GridGranularity" -#define SPI_SETKEYBOARDDELAY_REGKEY "Control Panel\\Keyboard" -#define SPI_SETKEYBOARDDELAY_VALNAME "KeyboardDelay" -#define SPI_SETICONTITLEWRAP_REGKEY1 "Control Panel\\Desktop\\WindowMetrics" -#define SPI_SETICONTITLEWRAP_REGKEY2 "Control Panel\\Desktop" -#define SPI_SETICONTITLEWRAP_VALNAME "IconTitleWrap" -#define SPI_SETMENUDROPALIGNMENT_REGKEY1 "Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows" -#define SPI_SETMENUDROPALIGNMENT_REGKEY2 "Control Panel\\Desktop" -#define SPI_SETMENUDROPALIGNMENT_VALNAME "MenuDropAlignment" -#define SPI_SETDOUBLECLKWIDTH_REGKEY1 "Control Panel\\Mouse" -#define SPI_SETDOUBLECLKWIDTH_REGKEY2 "Control Panel\\Desktop" -#define SPI_SETDOUBLECLKWIDTH_VALNAME "DoubleClickWidth" -#define SPI_SETDOUBLECLKHEIGHT_REGKEY1 "Control Panel\\Mouse" -#define SPI_SETDOUBLECLKHEIGHT_REGKEY2 "Control Panel\\Desktop" -#define SPI_SETDOUBLECLKHEIGHT_VALNAME "DoubleClickHeight" -#define SPI_SETDOUBLECLICKTIME_REGKEY "Control Panel\\Mouse" -#define SPI_SETDOUBLECLICKTIME_VALNAME "DoubleClickSpeed" -#define SPI_SETMOUSEBUTTONSWAP_REGKEY "Control Panel\\Mouse" -#define SPI_SETMOUSEBUTTONSWAP_VALNAME "SwapMouseButtons" -#define SPI_SETWORKAREA_REGKEY "Control Panel\\Desktop" -#define SPI_SETWORKAREA_VALNAME "WINE_WorkArea" -#define SPI_SETSHOWSOUNDS_REGKEY "Control Panel\\Accessibility\\ShowSounds" -#define SPI_SETSHOWSOUNDS_VALNAME "On" -#define SPI_SETKEYBOARDPREF_REGKEY "Control Panel\\Accessibility\\Keyboard Preference" -#define SPI_SETKEYBOARDPREF_VALNAME "On" -#define SPI_SETKEYBOARDPREF_REGKEY_LEGACY "Control Panel\\Accessibility" -#define SPI_SETKEYBOARDPREF_VALNAME_LEGACY "Keyboard Preference" -#define SPI_SETSCREENREADER_REGKEY "Control Panel\\Accessibility\\Blind Access" -#define SPI_SETSCREENREADER_VALNAME "On" -#define SPI_SETSCREENREADER_REGKEY_LEGACY "Control Panel\\Accessibility" -#define SPI_SETSCREENREADER_VALNAME_LEGACY "Blind Access" -#define SPI_SETFONTSMOOTHING_REGKEY "Control Panel\\Desktop" -#define SPI_SETFONTSMOOTHING_VALNAME "FontSmoothing" -#define SPI_SETLOWPOWERACTIVE_REGKEY "Control Panel\\Desktop" -#define SPI_SETLOWPOWERACTIVE_VALNAME "LowPowerActive" -#define SPI_SETPOWEROFFACTIVE_REGKEY "Control Panel\\Desktop" -#define SPI_SETPOWEROFFACTIVE_VALNAME "PowerOffActive" -#define SPI_SETDRAGFULLWINDOWS_REGKEY "Control Panel\\Desktop" -#define SPI_SETDRAGFULLWINDOWS_VALNAME "DragFullWindows" -#define SPI_SETSNAPTODEFBUTTON_REGKEY "Control Panel\\Mouse" -#define SPI_SETSNAPTODEFBUTTON_VALNAME "SnapToDefaultButton" -#define SPI_SETMOUSEHOVERWIDTH_REGKEY "Control Panel\\Mouse" -#define SPI_SETMOUSEHOVERWIDTH_VALNAME "MouseHoverWidth" -#define SPI_SETMOUSEHOVERHEIGHT_REGKEY "Control Panel\\Mouse" -#define SPI_SETMOUSEHOVERHEIGHT_VALNAME "MouseHoverHeight" -#define SPI_SETMOUSEHOVERTIME_REGKEY "Control Panel\\Mouse" -#define SPI_SETMOUSEHOVERTIME_VALNAME "MouseHoverTime" -#define SPI_SETMOUSESCROLLCHARS_REGKEY "Control Panel\\Desktop" -#define SPI_SETMOUSESCROLLCHARS_VALNAME "WheelScrollChars" -#define SPI_SETMOUSESCROLLLINES_REGKEY "Control Panel\\Desktop" -#define SPI_SETMOUSESCROLLLINES_VALNAME "WheelScrollLines" -#define SPI_SETMENUSHOWDELAY_REGKEY "Control Panel\\Desktop" -#define SPI_SETMENUSHOWDELAY_VALNAME "MenuShowDelay" -#define SPI_SETDESKWALLPAPER_REGKEY "Control Panel\\Desktop" -#define SPI_SETDESKWALLPAPER_VALNAME "Wallpaper" - -/* volatile registry branch under CURRENT_USER_REGKEY for temporary values storage */ -#define WINE_CURRENT_USER_REGKEY "Wine" - -static HWND ghTestWnd; - -static DWORD WINAPI SysParamsThreadFunc( LPVOID lpParam ); -static LRESULT CALLBACK SysParamsTestWndProc( HWND hWnd, UINT msg, WPARAM wParam, - LPARAM lParam ); -static int change_counter; -static int change_setworkarea_param, change_iconverticalspacing_param; -static int change_last_param; -static int last_bpp; -static BOOL displaychange_ok = FALSE, displaychange_test_active = FALSE; -static HANDLE displaychange_sem = 0; - -static LRESULT CALLBACK SysParamsTestWndProc( HWND hWnd, UINT msg, WPARAM wParam, - LPARAM lParam ) -{ - switch (msg) { - - case WM_DISPLAYCHANGE: - ok(displaychange_ok, "Unexpected WM_DISPLAYCHANGE message\n"); - last_bpp = wParam; - displaychange_ok = FALSE; - ReleaseSemaphore(displaychange_sem, 1, 0); - break; - - case WM_SETTINGCHANGE: - if (change_counter>0) { - /* ignore these messages caused by resizing of toolbars */ - if( wParam == SPI_SETWORKAREA){ - change_setworkarea_param = 1; - break; - } else if( wParam == SPI_ICONVERTICALSPACING) { - change_iconverticalspacing_param = 1; - break; - } else if( displaychange_test_active) - break; - if( !change_last_param){ - change_last_param = wParam; - break; - } - ok(0,"too many changes counter=%d last change=%d\n", - change_counter,change_last_param); - change_counter++; - change_last_param = wParam; - break; - } - change_counter++; - change_last_param = change_setworkarea_param = change_iconverticalspacing_param =0; - if( wParam == SPI_SETWORKAREA) - change_setworkarea_param = 1; - else if( wParam == SPI_ICONVERTICALSPACING) - change_iconverticalspacing_param = 1; - else - change_last_param = wParam; - break; - - case WM_DESTROY: - PostQuitMessage( 0 ); - break; - - /* drop through */ - default: - return( DefWindowProcA( hWnd, msg, wParam, lParam ) ); - } - - return 0; -} - -/* -Performs testing for system parameters messages -params: - - system parameter id - - supposed value of the registry key -*/ -static void test_change_message( int action, int optional ) -{ - if (change_counter==0 && optional==1) - return; - ok( 1 == change_counter, - "Missed a message: change_counter=%d\n", change_counter ); - change_counter = 0; - ok( action == change_last_param || - ( change_setworkarea_param && action == SPI_SETWORKAREA) || - ( change_iconverticalspacing_param && action == SPI_ICONVERTICALSPACING), - "Wrong action got %d expected %d\n", change_last_param, action ); - change_last_param = 0; -} - -static BOOL test_error_msg ( int rc, const char *name ) -{ - DWORD last_error = GetLastError(); - - if (rc==0) - { - if (last_error==0xdeadbeef || last_error==ERROR_INVALID_SPI_VALUE || last_error==ERROR_INVALID_PARAMETER) - { - skip("%s not supported on this platform\n", name); - } - else if (last_error==ERROR_ACCESS_DENIED) - { - skip("%s does not have privileges to run\n", name); - } - else - { - trace("%s failed for reason: %d. Indicating test failure and skipping remainder of test\n",name,last_error); - ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,last_error); - } - return FALSE; - } - else - { - ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,last_error); - return TRUE; - } -} - -/* - * Tests the HKEY_CURRENT_USER subkey value. - * The value should contain string value. - * - * Params: - * lpsSubKey - subkey name - * lpsRegName - registry entry name - * lpsTestValue - value to test - */ -static void _test_reg_key( LPCSTR subKey1, LPCSTR subKey2, LPCSTR valName1, LPCSTR valName2, LPCSTR testValue, BOOL optional ) -{ - CHAR value[MAX_PATH]; - DWORD valueLen; - DWORD type; - HKEY hKey; - LONG rc; - int found=0; - - *value='\0'; - valueLen=sizeof(value); - RegOpenKeyA( HKEY_CURRENT_USER, subKey1, &hKey ); - rc=RegQueryValueExA( hKey, valName1, NULL, &type, (LPBYTE)value, &valueLen ); - RegCloseKey( hKey ); - if (rc==ERROR_SUCCESS) - { - ok( !strcmp( testValue, value ), - "Wrong value in registry: subKey=%s, valName=%s, testValue=%s, value=%s\n", - subKey1, valName1, testValue, value ); - found++; - } - else if (strict) - { - ok(0,"Missing registry entry: subKey=%s, valName=%s\n", - subKey1, valName1); - } - if (valName2) - { - *value='\0'; - valueLen=sizeof(value); - RegOpenKeyA( HKEY_CURRENT_USER, subKey1, &hKey ); - rc=RegQueryValueExA( hKey, valName2, NULL, &type, (LPBYTE)value, &valueLen ); - RegCloseKey( hKey ); - if (rc==ERROR_SUCCESS) - { - ok( !strcmp( testValue, value ), - "Wrong value in registry: subKey=%s, valName=%s, testValue=%s, value=%s\n", - subKey1, valName2, testValue, value ); - found++; - } - else if (strict) - { - ok( 0,"Missing registry entry: subKey=%s, valName=%s\n", - subKey1, valName2 ); - } - } - if (subKey2 && !strict) - { - *value='\0'; - valueLen=sizeof(value); - RegOpenKeyA( HKEY_CURRENT_USER, subKey2, &hKey ); - rc=RegQueryValueExA( hKey, valName1, NULL, &type, (LPBYTE)value, &valueLen ); - RegCloseKey( hKey ); - if (rc==ERROR_SUCCESS) - { - ok( !strcmp( testValue, value ), - "Wrong value in registry: subKey=%s, valName=%s, testValue=%s, value=%s\n", - subKey2, valName1, testValue, value ); - found++; - } - else if (strict) - { - ok( 0,"Missing registry entry: subKey=%s, valName=%s\n", - subKey2, valName1 ); - } - if (valName2) - { - *value='\0'; - valueLen=sizeof(value); - RegOpenKeyA( HKEY_CURRENT_USER, subKey2, &hKey ); - rc=RegQueryValueExA( hKey, valName2, NULL, &type, (LPBYTE)value, &valueLen ); - RegCloseKey( hKey ); - if (rc==ERROR_SUCCESS) - { - ok( !strcmp( testValue, value ), - "Wrong value in registry: subKey=%s, valName=%s, testValue=%s, value=%s\n", - subKey2, valName2, testValue, value ); - found++; - } - else if (strict) - { - ok( 0,"Missing registry entry: subKey=%s, valName=%s\n", - subKey2, valName2 ); - } - } - } - ok(found || optional, - "Missing registry values: %s or %s in keys: %s or %s\n", - valName1, (valName2?valName2:""), subKey1, (subKey2?subKey2:"") ); -} - -#define test_reg_key( subKey, valName, testValue ) \ - _test_reg_key( subKey, NULL, valName, NULL, testValue, FALSE ) -#define test_reg_key_optional( subKey, valName, testValue ) \ - _test_reg_key( subKey, NULL, valName, NULL, testValue, TRUE ) -#define test_reg_key_ex( subKey1, subKey2, valName, testValue ) \ - _test_reg_key( subKey1, subKey2, valName, NULL, testValue, FALSE ) -#define test_reg_key_ex2( subKey1, subKey2, valName1, valName2, testValue ) \ - _test_reg_key( subKey1, subKey2, valName1, valName2, testValue, FALSE ) -#define test_reg_key_ex2_optional( subKey1, subKey2, valName1, valName2, testValue ) \ - _test_reg_key( subKey1, subKey2, valName1, valName2, testValue, TRUE ) - -/* get a metric from the registry. If the value is negative - * it is assumed to be in twips and converted to pixels */ -static UINT metricfromreg( const char *keyname, const char *valname, int dpi) -{ - HKEY hkey; - char buf[64]; - DWORD ret; - DWORD size, type; - int value; - - RegOpenKeyA( HKEY_CURRENT_USER, keyname, &hkey ); - size = sizeof(buf); - ret=RegQueryValueExA( hkey, valname, NULL, &type, (LPBYTE)buf, &size ); - RegCloseKey( hkey ); - if( ret != ERROR_SUCCESS) return -1; - value = atoi( buf); - if( value < 0) - value = ( -value * dpi + 720) / 1440; - return value; -} - -typedef struct -{ - INT16 lfHeight; - INT16 lfWidth; - INT16 lfEscapement; - INT16 lfOrientation; - INT16 lfWeight; - BYTE lfItalic; - BYTE lfUnderline; - BYTE lfStrikeOut; - BYTE lfCharSet; - BYTE lfOutPrecision; - BYTE lfClipPrecision; - BYTE lfQuality; - BYTE lfPitchAndFamily; - CHAR lfFaceName[LF_FACESIZE]; -} LOGFONT16, *LPLOGFONT16; - -/* get logfont from the registry */ -static int lffromreg( const char *keyname, const char *valname, LOGFONTA *plf) -{ - HKEY hkey; - LOGFONTW lfw; - DWORD ret, size, type; - - RegOpenKeyA( HKEY_CURRENT_USER, keyname, &hkey ); - size = sizeof( lfw); - ret=RegQueryValueExA( hkey, valname, NULL, &type, (LPBYTE)&lfw, &size ); - RegCloseKey( hkey ); - ok( ret == ERROR_SUCCESS, "Key \"%s\" value \"%s\" not found\n", keyname, valname); - if( ret != ERROR_SUCCESS) - return FALSE; - if( size <= sizeof( LOGFONT16)) { - LOGFONT16 *plf16 = (LOGFONT16*) &lfw; - plf->lfHeight = plf16->lfHeight; - plf->lfWidth = plf16->lfWidth; - plf->lfEscapement = plf16->lfEscapement; - plf->lfOrientation = plf16->lfOrientation; - plf->lfWeight = plf16->lfWeight; - plf->lfItalic = plf16->lfItalic; - plf->lfUnderline = plf16->lfUnderline; - plf->lfStrikeOut = plf16->lfStrikeOut; - plf->lfCharSet = plf16->lfCharSet; - plf->lfOutPrecision = plf16->lfOutPrecision; - plf->lfClipPrecision = plf16->lfClipPrecision; - plf->lfQuality = plf16->lfQuality; - plf->lfPitchAndFamily = plf16->lfPitchAndFamily; - memcpy( plf->lfFaceName, plf16->lfFaceName, LF_FACESIZE ); - } else if( size <= sizeof( LOGFONTA)) { - plf = (LOGFONTA*) &lfw; - } else { - plf->lfHeight = lfw.lfHeight; - plf->lfWidth = lfw.lfWidth; - plf->lfEscapement = lfw.lfEscapement; - plf->lfOrientation = lfw.lfOrientation; - plf->lfWeight = lfw.lfWeight; - plf->lfItalic = lfw.lfItalic; - plf->lfUnderline = lfw.lfUnderline; - plf->lfStrikeOut = lfw.lfStrikeOut; - plf->lfCharSet = lfw.lfCharSet; - plf->lfOutPrecision = lfw.lfOutPrecision; - plf->lfClipPrecision = lfw.lfClipPrecision; - plf->lfQuality = lfw.lfQuality; - plf->lfPitchAndFamily = lfw.lfPitchAndFamily; - WideCharToMultiByte( CP_ACP, 0, lfw.lfFaceName, -1, plf->lfFaceName, - LF_FACESIZE, NULL, NULL); - - } - return TRUE; -} - -static void test_SPI_SETBEEP( void ) /* 2 */ -{ - BOOL rc; - BOOL old_b; - BOOL b; - BOOL curr_val; - - trace("testing SPI_{GET,SET}BEEP\n"); - SetLastError(0xdeadbeef); - rc=SystemParametersInfoA( SPI_GETBEEP, 0, &old_b, 0 ); - if (!test_error_msg(rc,"SPI_{GET,SET}BEEP")) - return; - - curr_val = TRUE; - rc=SystemParametersInfoA( SPI_SETBEEP, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); - if (!test_error_msg(rc,"SPI_SETBEEP")) return; - ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError()); - test_change_message( SPI_SETBEEP, 0 ); - test_reg_key( SPI_SETBEEP_REGKEY, - SPI_SETBEEP_VALNAME, - curr_val ? "Yes" : "No" ); - rc=SystemParametersInfoA( SPI_GETBEEP, 0, &b, 0 ); - ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError()); - eq( b, curr_val, "SPI_{GET,SET}BEEP", "%d" ); - rc=SystemParametersInfoW( SPI_GETBEEP, 0, &b, 0 ); - if (rc!=0 || GetLastError()!=ERROR_CALL_NOT_IMPLEMENTED) - { - ok(rc!=0,"SystemParametersInfoW: rc=%d err=%d\n",rc,GetLastError()); - eq( b, curr_val, "SystemParametersInfoW", "%d" ); - } - - /* is a message sent for the second change? */ - rc=SystemParametersInfoA( SPI_SETBEEP, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); - ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError()); - test_change_message( SPI_SETBEEP, 0 ); - - curr_val = FALSE; - rc=SystemParametersInfoW( SPI_SETBEEP, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); - if (rc==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) - rc=SystemParametersInfoA( SPI_SETBEEP, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); - ok(rc!=0,"SystemParametersInfo: rc=%d err=%d\n",rc,GetLastError()); - test_change_message( SPI_SETBEEP, 0 ); - test_reg_key( SPI_SETBEEP_REGKEY, - SPI_SETBEEP_VALNAME, - curr_val ? "Yes" : "No" ); - rc=SystemParametersInfoA( SPI_GETBEEP, 0, &b, 0 ); - ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError()); - eq( b, curr_val, "SPI_{GET,SET}BEEP", "%d" ); - rc=SystemParametersInfoW( SPI_GETBEEP, 0, &b, 0 ); - if (rc!=0 || GetLastError()!=ERROR_CALL_NOT_IMPLEMENTED) - { - ok(rc!=0,"SystemParametersInfoW: rc=%d err=%d\n",rc,GetLastError()); - eq( b, curr_val, "SystemParametersInfoW", "%d" ); - } - ok( MessageBeep( MB_OK ), "Return value of MessageBeep when sound is disabled\n" ); - - rc=SystemParametersInfoA( SPI_SETBEEP, old_b, 0, SPIF_UPDATEINIFILE ); - ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError()); -} - -static const char *setmouse_valuenames[3] = { - SPI_SETMOUSE_VALNAME1, - SPI_SETMOUSE_VALNAME2, - SPI_SETMOUSE_VALNAME3 -}; - -/* - * Runs check for one setting of spi_setmouse. - */ -static BOOL run_spi_setmouse_test( int curr_val[], POINT *req_change, POINT *proj_change, int nchange ) -{ - BOOL rc; - INT mi[3]; - static int aw_turn = 0; - static BOOL w_implemented = 1; - - char buf[20]; - int i; - - aw_turn++; - rc=0; - if ((aw_turn % 2!=0) && (w_implemented)) - { - /* call unicode on odd (non even) calls */ - SetLastError(0xdeadbeef); - rc=SystemParametersInfoW( SPI_SETMOUSE, 0, curr_val, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); - if (rc==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) - { - w_implemented = 0; - trace("SystemParametersInfoW not supported on this platform\n"); - } - } - - if ((aw_turn % 2==0) || (!w_implemented)) - { - /* call ascii version on even calls or if unicode is not available */ - rc=SystemParametersInfoA( SPI_SETMOUSE, 0, curr_val, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); - } - if (!test_error_msg(rc,"SPI_SETMOUSE")) return FALSE; - - ok(rc!=0,"SystemParametersInfo: rc=%d err=%d\n",rc,GetLastError()); - test_change_message( SPI_SETMOUSE, 0 ); - for (i = 0; i < 3; i++) - { - sprintf( buf, "%d", curr_val[i] ); - test_reg_key( SPI_SETMOUSE_REGKEY, setmouse_valuenames[i], buf ); - } - - rc=SystemParametersInfoA( SPI_GETMOUSE, 0, mi, 0 ); - ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError()); - for (i = 0; i < 3; i++) - { - ok(mi[i] == curr_val[i], - "incorrect value for %d: %d != %d\n", i, mi[i], curr_val[i]); - } - - if (w_implemented) - { - rc=SystemParametersInfoW( SPI_GETMOUSE, 0, mi, 0 ); - ok(rc!=0,"SystemParametersInfoW: rc=%d err=%d\n",rc,GetLastError()); - for (i = 0; i < 3; i++) - { - ok(mi[i] == curr_val[i], - "incorrect value for %d: %d != %d\n", i, mi[i], curr_val[i]); - } - } - - if (0) - { - /* FIXME: this always fails for me - AJ */ - for (i = 0; i < nchange; i++) - { - POINT mv; - mouse_event( MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE, 0, 0, 0, 0 ); - mouse_event( MOUSEEVENTF_MOVE, req_change[i].x, req_change[i].y, 0, 0 ); - GetCursorPos( &mv ); - ok( proj_change[i].x == mv.x, "Projected dx and real dx comparison. May fail under high load.\n" ); - ok( proj_change[i].y == mv.y, "Projected dy equals real dy. May fail under high load.\n" ); - } - } - return TRUE; -} - -static void test_SPI_SETMOUSE( void ) /* 4 */ -{ - BOOL rc; - INT old_mi[3]; - - /* win nt default values - 6, 10, 1 */ - INT curr_val[3] = {6, 10, 1}; - - /* requested and projected mouse movements */ - POINT req_change[] = { {6, 6}, { 7, 6}, { 8, 6}, {10, 10}, {11, 10}, {100, 100} }; - POINT proj_change1[] = { {6, 6}, {14, 6}, {16, 6}, {20, 20}, {22, 20}, {200, 200} }; - POINT proj_change2[] = { {6, 6}, {14, 6}, {16, 6}, {20, 20}, {44, 20}, {400, 400} }; - POINT proj_change3[] = { {6, 6}, {14, 6}, {16, 6}, {20, 20}, {22, 20}, {200, 200} }; - POINT proj_change4[] = { {6, 6}, { 7, 6}, { 8, 6}, {10, 10}, {11, 10}, {100, 100} }; - POINT proj_change5[] = { {6, 6}, { 7, 6}, {16, 6}, {20, 20}, {22, 20}, {200, 200} }; - POINT proj_change6[] = { {6, 6}, {28, 6}, {32, 6}, {40, 40}, {44, 40}, {400, 400} }; - POINT proj_change7[] = { {6, 6}, {14, 6}, {32, 6}, {40, 40}, {44, 40}, {400, 400} }; - POINT proj_change8[] = { {6, 6}, {28, 6}, {32, 6}, {40, 40}, {44, 40}, {400, 400} }; - - int nchange = sizeof( req_change ) / sizeof( POINT ); - - trace("testing SPI_{GET,SET}MOUSE\n"); - SetLastError(0xdeadbeef); - rc=SystemParametersInfoA( SPI_GETMOUSE, 0, old_mi, 0 ); - if (!test_error_msg(rc,"SPI_{GET,SET}MOUSE")) - return; - - if (!run_spi_setmouse_test( curr_val, req_change, proj_change1, nchange )) return; - - /* acceleration change */ - curr_val[2] = 2; - run_spi_setmouse_test( curr_val, req_change, proj_change2, nchange ); - - /* acceleration change */ - curr_val[2] = 3; - run_spi_setmouse_test( curr_val, req_change, proj_change3, nchange ); - - /* acceleration change */ - curr_val[2] = 0; - run_spi_setmouse_test( curr_val, req_change, proj_change4, nchange ); - - /* threshold change */ - curr_val[2] = 1; - curr_val[0] = 7; - run_spi_setmouse_test( curr_val, req_change, proj_change5, nchange ); - - /* threshold change */ - curr_val[2] = 2; - curr_val[0] = 6; - curr_val[1] = 6; - run_spi_setmouse_test( curr_val, req_change, proj_change6, nchange ); - - /* threshold change */ - curr_val[1] = 7; - run_spi_setmouse_test( curr_val, req_change, proj_change7, nchange ); - - /* threshold change */ - curr_val[1] = 5; - run_spi_setmouse_test( curr_val, req_change, proj_change8, nchange ); - - rc=SystemParametersInfoA( SPI_SETMOUSE, 0, old_mi, SPIF_UPDATEINIFILE ); - ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError()); -} - -static BOOL test_setborder(UINT curr_val, int usesetborder, int dpi) -{ - BOOL rc; - UINT border, regval; - INT frame; - NONCLIENTMETRICSA ncm; - - ncm.cbSize = sizeof( ncm); - rc=SystemParametersInfo( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0); - ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError()); - if( usesetborder) { - rc=SystemParametersInfoA( SPI_SETBORDER, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); - if (!test_error_msg(rc,"SPI_SETBORDER")) return FALSE; - ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError()); - test_change_message( SPI_SETBORDER, 1 ); - } else { /* set non client metrics */ - ncm.iBorderWidth = curr_val; - rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, 0, &ncm, SPIF_UPDATEINIFILE| - SPIF_SENDCHANGE); - if (!test_error_msg(rc,"SPI_SETNONCLIENTMETRICS")) return FALSE; - ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError()); - test_change_message( SPI_SETNONCLIENTMETRICS, 1 ); - } - if( curr_val) { /* skip if 0, some windows versions return 0 others 1 */ - regval = metricfromreg( SPI_SETBORDER_REGKEY2, SPI_SETBORDER_VALNAME, dpi); - if( regval != curr_val) - regval = metricfromreg( SPI_SETBORDER_REGKEY, SPI_SETBORDER_VALNAME, dpi); - ok( regval==curr_val, "wrong value in registry %d, expected %d\n", regval, curr_val); - } - /* minimum border width is 1 */ - if (curr_val == 0) curr_val = 1; - /* should be the same as the non client metrics */ - rc=SystemParametersInfo( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0); - ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError()); - eq( (UINT)ncm.iBorderWidth, curr_val, "NonClientMetric.iBorderWidth", "%d"); - /* and from SPI_GETBORDER */ - rc=SystemParametersInfoA( SPI_GETBORDER, 0, &border, 0 ); - ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError()); - eq( border, curr_val, "SPI_{GET,SET}BORDER", "%d"); - /* test some SystemMetrics */ - frame = curr_val + GetSystemMetrics( SM_CXDLGFRAME ); - eq( frame, GetSystemMetrics( SM_CXFRAME ), "SM_CXFRAME", "%d" ); - eq( frame, GetSystemMetrics( SM_CYFRAME ), "SM_CYFRAME", "%d" ); - eq( frame, GetSystemMetrics( SM_CXSIZEFRAME ), "SM_CXSIZEFRAME", "%d" ); - eq( frame, GetSystemMetrics( SM_CYSIZEFRAME ), "SM_CYSIZEFRAME", "%d" ); - return TRUE; -} - -static void test_SPI_SETBORDER( void ) /* 6 */ -{ - BOOL rc; - UINT old_border; - NONCLIENTMETRICSA ncmsave; - INT CaptionWidth, - PaddedBorderWidth; - - ncmsave.cbSize = sizeof( ncmsave); - rc=SystemParametersInfo( SPI_GETNONCLIENTMETRICS, 0, &ncmsave, 0); - if( !rc) { - win_skip("SPI_GETNONCLIENTMETRICS is not available\n"); - return; - } - /* CaptionWidth from the registry may have different value of iCaptionWidth - * from the non client metrics (observed on WinXP). - * Fix this so we can safely restore settings with the nonclientmetrics */ - CaptionWidth = metricfromreg( - "Control Panel\\Desktop\\WindowMetrics","CaptionWidth", dpi); - ncmsave.iCaptionWidth = CaptionWidth; - - /* These tests hang when XFree86 4.0 for Windows is running (tested on - * WinNT, SP2, Cygwin/XFree 4.1.0. Skip the test when XFree86 is - * running. - */ - if (FindWindowA( NULL, "Cygwin/XFree86" )) - return; - - trace("testing SPI_{GET,SET}BORDER\n"); - - SetLastError(0xdeadbeef); - rc=SystemParametersInfoA( SPI_GETBORDER, 0, &old_border, 0 ); - if (!test_error_msg(rc,"SPI_{GET,SET}BORDER")) - return; - /* FIXME: include new PaddedBorderWidth parameter */ - PaddedBorderWidth = ncmsave.iBorderWidth - old_border; - if( PaddedBorderWidth){ - win_skip( "Cannot reliably restore border width yet (PaddedBorderWidth = %d)\n", - PaddedBorderWidth); - return; - } - /* This will restore sane values if the test hang previous run. */ - if ( old_border == 7 || old_border == 20 ) - old_border = 1; - - /* The SPI_SETBORDER seems to be buggy on Win9x/ME (looks like you need to - * do it twice to make the intended change). So skip parts of the tests on - * those platforms */ - if( !iswin9x) { - /* win2k3 fails if you set the same border twice, or if size is 0 */ - if (!test_setborder(2, 1, dpi)) return; - test_setborder(1, 1, dpi); - test_setborder(3, 1, dpi); - } - if (!test_setborder(1, 0, dpi)) return; - test_setborder(0, 0, dpi); - test_setborder(3, 0, dpi); - - rc=SystemParametersInfoA( SPI_SETNONCLIENTMETRICS, 0, &ncmsave, - SPIF_UPDATEINIFILE| SPIF_SENDCHANGE); - test_change_message( SPI_SETNONCLIENTMETRICS, 1 ); - ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n", - rc,GetLastError()); -} - -static void test_SPI_SETKEYBOARDSPEED( void ) /* 10 */ -{ - BOOL rc; - UINT old_speed; - const UINT vals[]={0,20,31}; - unsigned int i; - - trace("testing SPI_{GET,SET}KEYBOARDSPEED\n"); - SetLastError(0xdeadbeef); - rc=SystemParametersInfoA( SPI_GETKEYBOARDSPEED, 0, &old_speed, 0 ); - if (!test_error_msg(rc,"SPI_{GET,SET}KEYBOARDSPEED")) - return; - - for (i=0;i 100 ? 1 : 314; - im_cur.lfFont.lfItalic = !im_cur.lfFont.lfItalic; - im_cur.lfFont.lfStrikeOut = !im_cur.lfFont.lfStrikeOut; - im_cur.lfFont.lfUnderline = !im_cur.lfFont.lfUnderline; - im_cur.lfFont.lfCharSet = im_cur.lfFont.lfCharSet ? 0 : 1; - im_cur.lfFont.lfOutPrecision = im_cur.lfFont.lfOutPrecision == OUT_DEFAULT_PRECIS ? - OUT_TT_PRECIS : OUT_DEFAULT_PRECIS; - im_cur.lfFont.lfClipPrecision ^= CLIP_LH_ANGLES; - im_cur.lfFont.lfPitchAndFamily = im_cur.lfFont.lfPitchAndFamily ? 0 : 1; - im_cur.lfFont.lfQuality = im_cur.lfFont.lfQuality == DEFAULT_QUALITY ? - DRAFT_QUALITY : DEFAULT_QUALITY; - if( strcmp( im_cur.lfFont.lfFaceName, "MS Serif")) - strcpy( im_cur.lfFont.lfFaceName, "MS Serif"); - else - strcpy( im_cur.lfFont.lfFaceName, "MS Sans Serif"); - - rc=SystemParametersInfoA( SPI_SETICONMETRICS, sizeof(ICONMETRICSA), &im_cur, SPIF_UPDATEINIFILE ); - if (!test_error_msg(rc,"SPI_SETICONMETRICS")) return; - ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError()); - - rc=SystemParametersInfoA( SPI_GETICONMETRICS, sizeof(ICONMETRICSA), &im_new, FALSE ); - ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError()); - /* test GET <-> SETICONMETRICS */ - eq( im_new.iHorzSpacing, im_cur.iHorzSpacing, "iHorzSpacing", "%d" ); - eq( im_new.iVertSpacing, im_cur.iVertSpacing, "iVertSpacing", "%d" ); - eq( im_new.iTitleWrap, im_cur.iTitleWrap, "iTitleWrap", "%d" ); - eq( im_new.lfFont.lfHeight, im_cur.lfFont.lfHeight, "lfHeight", "%d" ); - eq( im_new.lfFont.lfWidth, im_cur.lfFont.lfWidth, "lfWidth", "%d" ); - eq( im_new.lfFont.lfEscapement, im_cur.lfFont.lfEscapement, "lfEscapement", "%d" ); - eq( im_new.lfFont.lfWeight, im_cur.lfFont.lfWeight, "lfWeight", "%d" ); - eq( im_new.lfFont.lfItalic, im_cur.lfFont.lfItalic, "lfItalic", "%d" ); - eq( im_new.lfFont.lfStrikeOut, im_cur.lfFont.lfStrikeOut, "lfStrikeOut", "%d" ); - eq( im_new.lfFont.lfUnderline, im_cur.lfFont.lfUnderline, "lfUnderline", "%d" ); - eq( im_new.lfFont.lfCharSet, im_cur.lfFont.lfCharSet, "lfCharSet", "%d" ); - eq( im_new.lfFont.lfOutPrecision, im_cur.lfFont.lfOutPrecision, "lfOutPrecision", "%d" ); - eq( im_new.lfFont.lfClipPrecision, im_cur.lfFont.lfClipPrecision, "lfClipPrecision", "%d" ); - eq( im_new.lfFont.lfPitchAndFamily, im_cur.lfFont.lfPitchAndFamily, "lfPitchAndFamily", "%d" ); - eq( im_new.lfFont.lfQuality, im_cur.lfFont.lfQuality, "lfQuality", "%d" ); - ok( !strcmp( im_new.lfFont.lfFaceName, im_cur.lfFont.lfFaceName), - "wrong facename \"%s\", should be \"%s\"\n", im_new.lfFont.lfFaceName, - im_cur.lfFont.lfFaceName); - /* test some system metrics */ - eq( GetSystemMetrics( SM_CXICONSPACING ), - im_new.iHorzSpacing, "iHorzSpacing", "%d" ); - eq( GetSystemMetrics( SM_CYICONSPACING ), - im_new.iVertSpacing, "iVertSpacing", "%d" ); - /* check some registry values */ - regval = metricfromreg( SPI_ICONHORIZONTALSPACING_REGKEY, SPI_ICONHORIZONTALSPACING_VALNAME, dpi); - ok( regval==im_cur.iHorzSpacing, "wrong value in registry %d, expected %d\n", regval, im_cur.iHorzSpacing); - regval = metricfromreg( SPI_ICONVERTICALSPACING_REGKEY, SPI_ICONVERTICALSPACING_VALNAME, dpi); - ok( regval==im_cur.iVertSpacing, "wrong value in registry %d, expected %d\n", regval, im_cur.iVertSpacing); - regval = metricfromreg( SPI_SETICONTITLEWRAP_REGKEY2, SPI_SETICONTITLEWRAP_VALNAME, dpi); - if( regval != im_cur.iTitleWrap) - regval = metricfromreg( SPI_SETICONTITLEWRAP_REGKEY1, SPI_SETICONTITLEWRAP_VALNAME, dpi); - ok( regval==im_cur.iTitleWrap, "wrong value in registry %d, expected %d\n", regval, im_cur.iTitleWrap); - /* test some values from other SPI_GETxxx calls */ - rc = SystemParametersInfoA( SPI_ICONHORIZONTALSPACING, 0, &spacing, 0 ); - ok( rc && spacing == im_cur.iHorzSpacing, - "SystemParametersInfoA( SPI_ICONHORIZONTALSPACING...) failed or returns wrong value %d instead of %d\n", - spacing, im_cur.iHorzSpacing); - rc = SystemParametersInfoA( SPI_ICONVERTICALSPACING, 0, &spacing, 0 ); - ok( rc && spacing == im_cur.iVertSpacing, - "SystemParametersInfoA( SPI_ICONVERTICALSPACING...) failed or returns wrong value %d instead of %d\n", - spacing, im_cur.iVertSpacing); - rc = SystemParametersInfoA( SPI_GETICONTITLEWRAP, 0, &wrap, 0 ); - ok( rc && wrap == im_cur.iTitleWrap, - "SystemParametersInfoA( SPI_GETICONTITLEWRAP...) failed or returns wrong value %d instead of %d\n", - wrap, im_cur.iTitleWrap); - /* restore old values */ - rc=SystemParametersInfoA( SPI_SETICONMETRICS, sizeof(ICONMETRICSA), &im_orig,SPIF_UPDATEINIFILE ); - ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError()); - - rc=SystemParametersInfoA( SPI_GETICONMETRICS, sizeof(ICONMETRICSA), &im_new, FALSE ); - ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError()); - - eq( im_new.iHorzSpacing, im_orig.iHorzSpacing, "iHorzSpacing", "%d" ); - eq( im_new.iVertSpacing, im_orig.iVertSpacing, "iVertSpacing", "%d" ); - eq( im_new.iTitleWrap, im_orig.iTitleWrap, "iTitleWrap", "%d" ); -} - -static void test_SPI_SETWORKAREA( void ) /* 47 */ -{ - BOOL rc; - RECT old_area; - RECT area; - RECT curr_val; - - trace("testing SPI_{GET,SET}WORKAREA\n"); - SetLastError(0xdeadbeef); - rc=SystemParametersInfoA(SPI_GETWORKAREA, 0, &old_area, 0); - if (!test_error_msg(rc,"SPI_{GET,SET}WORKAREA")) - return; - - /* Modify the work area only minimally as this causes the icons that - * fall outside it to be moved around thus requiring the user to - * reposition them manually one by one. - * Changing the work area by just one pixel should make this occurrence - * reasonably unlikely. - */ - curr_val.left = old_area.left; - curr_val.top = old_area.top; - curr_val.right = old_area.right-1; - curr_val.bottom = old_area.bottom-1; - rc=SystemParametersInfoA( SPI_SETWORKAREA, 0, &curr_val, - SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); - if (!test_error_msg(rc,"SPI_SETWORKAREA")) return; - ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError()); - rc=SystemParametersInfoA( SPI_GETWORKAREA, 0, &area, 0 ); - ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError()); - if( !EqualRect( &area, &curr_val)) /* no message if rect has not changed */ - test_change_message( SPI_SETWORKAREA, 0); - eq( area.left, curr_val.left, "left", "%d" ); - eq( area.top, curr_val.top, "top", "%d" ); - /* size may be rounded */ - ok( area.right >= curr_val.right - 16 && area.right < curr_val.right + 16, - "right: got %d instead of %d\n", area.right, curr_val.right ); - ok( area.bottom >= curr_val.bottom - 16 && area.bottom < curr_val.bottom + 16, - "bottom: got %d instead of %d\n", area.bottom, curr_val.bottom ); - curr_val = area; - rc=SystemParametersInfoA( SPI_SETWORKAREA, 0, &old_area, - SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ); - ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%d\n",rc,GetLastError()); - rc=SystemParametersInfoA( SPI_GETWORKAREA, 0, &area, 0 ); - ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError()); - if( !EqualRect( &area, &curr_val)) /* no message if rect has not changed */ - test_change_message( SPI_SETWORKAREA, 0 ); - eq( area.left, old_area.left, "left", "%d" ); - eq( area.top, old_area.top, "top", "%d" ); - /* size may be rounded */ - ok( area.right >= old_area.right - 16 && area.right < old_area.right + 16, - "right: got %d instead of %d\n", area.right, old_area.right ); - ok( area.bottom >= old_area.bottom - 16 && area.bottom < old_area.bottom + 16, - "bottom: got %d instead of %d\n", area.bottom, old_area.bottom ); -} - -static void test_SPI_SETSHOWSOUNDS( void ) /* 57 */ -{ - BOOL rc; - BOOL old_b; - const UINT vals[]={TRUE,FALSE}; - unsigned int i; - - trace("testing SPI_{GET,SET}SHOWSOUNDS\n"); - SetLastError(0xdeadbeef); - rc=SystemParametersInfoA( SPI_GETSHOWSOUNDS, 0, &old_b, 0 ); - /* SPI_{GET,SET}SHOWSOUNDS is completely broken on Win9x */ - if (!test_error_msg(rc,"SPI_{GET,SET}SHOWSOUNDS")) - return; - - for (i=0;itmHeight = -1; - if( psz) *psz = 10; - if( hfont) DeleteObject( hfont); - return; - } - GetTextMetricsA( hdc, ptm); - if( psz) - if( !(*psz = _GdiGetCharDimensions( hdc, ptm, NULL))) - *psz = 10; - SelectObject( hdc, hfontsav); - DeleteObject( hfont); -} - -static int gsm_error_ctr; - -#define ok_gsm( i, e)\ -{\ - int exp = (e);\ - int act = GetSystemMetrics( (i));\ - if( exp != act) gsm_error_ctr++;\ - ok( !( exp != act),"GetSystemMetrics(%s): expected %d actual %d\n", #i, exp,act);\ -} -#define ok_gsm_2( i, e1, e2)\ -{\ - int exp1 = (e1);\ - int exp2 = (e2);\ - int act = GetSystemMetrics( (i));\ - if( exp1 != act && exp2 != act) gsm_error_ctr++;\ - ok( !( exp1 != act && exp2 != act), "GetSystemMetrics(%s): expected %d or %d actual %d\n", #i, exp1, exp2, act);\ -} -#define ok_gsm_3( i, e1, e2, e3)\ -{\ - int exp1 = (e1);\ - int exp2 = (e2);\ - int exp3 = (e3);\ - int act = GetSystemMetrics( (i));\ - if( exp1 != act && exp2 != act && exp3 != act) gsm_error_ctr++;\ - ok( !( exp1 != act && exp2 != act && exp3 != act),"GetSystemMetrics(%s): expected %d or %d or %d actual %d\n", #i, exp1, exp2, exp3, act);\ -} - -static void test_GetSystemMetrics( void) -{ - TEXTMETRICA tmMenuFont; - UINT IconSpacing, IconVerticalSpacing; - BOOL rc; - - HDC hdc = CreateIC( "Display", 0, 0, 0); - UINT avcwCaption; - INT CaptionWidthfromreg; - MINIMIZEDMETRICS minim; - NONCLIENTMETRICS ncm; - SIZE screen; - - minim.cbSize = sizeof( minim); - ncm.cbSize = sizeof( ncm); - SystemParametersInfo( SPI_GETMINIMIZEDMETRICS, 0, &minim, 0); - rc = SystemParametersInfo( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0); - if( !rc) { - win_skip("SPI_GETNONCLIENTMETRICS is not available\n"); - return; - } - /* CaptionWidth from the registry may have different value of iCaptionWidth - * from the non client metrics (observed on WinXP) */ - CaptionWidthfromreg = metricfromreg( - "Control Panel\\Desktop\\WindowMetrics","CaptionWidth", dpi); - get_text_metr_size( hdc, &ncm.lfMenuFont, &tmMenuFont, NULL); - get_text_metr_size( hdc, &ncm.lfCaptionFont, NULL, &avcwCaption); - /* FIXME: use icon metric */ - if( !SystemParametersInfoA( SPI_ICONVERTICALSPACING, 0, &IconVerticalSpacing, 0)) - IconVerticalSpacing = 0; - if( !SystemParametersInfoA( SPI_ICONHORIZONTALSPACING, 0, &IconSpacing, 0 )) - IconSpacing = 0; - /* reset error counters */ - gsm_error_ctr = 0; - - /* the tests: */ - - /* SM_CXSCREEN, cannot test these two */ - /* SM_CYSCREEN */ - ok_gsm( SM_CXVSCROLL, ncm.iScrollWidth); - ok_gsm( SM_CYHSCROLL, ncm.iScrollWidth); - ok_gsm( SM_CYCAPTION, ncm.iCaptionHeight+1); - ok_gsm( SM_CXBORDER, 1); - ok_gsm( SM_CYBORDER, 1); - ok_gsm( SM_CXDLGFRAME, 3); - ok_gsm( SM_CYDLGFRAME, 3); - ok_gsm( SM_CYVTHUMB, ncm.iScrollHeight); - ok_gsm( SM_CXHTHUMB, ncm.iScrollHeight); - /* SM_CXICON */ - /* SM_CYICON */ - /* SM_CXCURSOR */ - /* SM_CYCURSOR */ - ok_gsm( SM_CYMENU, ncm.iMenuHeight + 1); - ok_gsm( SM_CXFULLSCREEN, - GetSystemMetrics( SM_CXMAXIMIZED) - 2 * GetSystemMetrics( SM_CXFRAME)); - ok_gsm( SM_CYFULLSCREEN, - GetSystemMetrics( SM_CYMAXIMIZED) - GetSystemMetrics( SM_CYMIN)); - /* SM_CYKANJIWINDOW */ - /* SM_MOUSEPRESENT */ - ok_gsm( SM_CYVSCROLL, ncm.iScrollHeight); - ok_gsm( SM_CXHSCROLL, ncm.iScrollHeight); - /* SM_DEBUG */ - /* SM_SWAPBUTTON */ - /* SM_RESERVED1 */ - /* SM_RESERVED2 */ - /* SM_RESERVED3 */ - /* SM_RESERVED4 */ - ok_gsm( SM_CXMIN, 3 * max( CaptionWidthfromreg >= 0 ? CaptionWidthfromreg : ncm.iCaptionWidth, 8) + - GetSystemMetrics( SM_CYSIZE) + 4 + 4 * avcwCaption + 2 * GetSystemMetrics( SM_CXFRAME)); - ok_gsm( SM_CYMIN, GetSystemMetrics( SM_CYCAPTION) + - 2 * GetSystemMetrics( SM_CYFRAME)); - ok_gsm_2( SM_CXSIZE, - ncm.iCaptionWidth, /* classic/standard windows style */ - GetSystemMetrics( SM_CYCAPTION) - 1 /* WinXP style */ - ); - ok_gsm( SM_CYSIZE, ncm.iCaptionHeight); - ok_gsm( SM_CXFRAME, ncm.iBorderWidth + 3); - ok_gsm( SM_CYFRAME, ncm.iBorderWidth + 3); - ok_gsm( SM_CXMINTRACK, GetSystemMetrics( SM_CXMIN)); - ok_gsm( SM_CYMINTRACK, GetSystemMetrics( SM_CYMIN)); - /* SM_CXDOUBLECLK */ - /* SM_CYDOUBLECLK */ - if( IconSpacing) ok_gsm( SM_CXICONSPACING, IconSpacing); - if( IconVerticalSpacing) ok_gsm( SM_CYICONSPACING, IconVerticalSpacing); - /* SM_MENUDROPALIGNMENT */ - /* SM_PENWINDOWS */ - /* SM_DBCSENABLED */ - /* SM_CMOUSEBUTTONS */ - /* SM_SECURE */ - ok_gsm( SM_CXEDGE, 2); - ok_gsm( SM_CYEDGE, 2); - /* sign-extension for iHorzGap/iVertGap is broken on Win9x */ - ok_gsm( SM_CXMINSPACING, GetSystemMetrics( SM_CXMINIMIZED) + (short)minim.iHorzGap ); - ok_gsm( SM_CYMINSPACING, GetSystemMetrics( SM_CYMINIMIZED) + (short)minim.iVertGap ); - /* SM_CXSMICON */ - /* SM_CYSMICON */ - ok_gsm( SM_CYSMCAPTION, ncm.iSmCaptionHeight + 1); - ok_gsm_3( SM_CXSMSIZE, - ncm.iSmCaptionWidth, /* classic/standard windows style */ - GetSystemMetrics( SM_CYSMCAPTION) - 1, /* WinXP style */ - smcxsmsize /* winXP seems to cache this value: setnonclientmetric - does not change it */ - ); - ok_gsm( SM_CYSMSIZE, GetSystemMetrics( SM_CYSMCAPTION) - 1); - ok_gsm( SM_CXMENUSIZE, ncm.iMenuWidth); - ok_gsm( SM_CYMENUSIZE, ncm.iMenuHeight); - /* SM_ARRANGE */ - ok_gsm( SM_CXMINIMIZED, minim.iWidth + 6); - ok_gsm( SM_CYMINIMIZED, GetSystemMetrics( SM_CYCAPTION) + 5); - screen.cx = GetSystemMetrics( SM_CXVIRTUALSCREEN ); - screen.cy = GetSystemMetrics( SM_CYVIRTUALSCREEN ); - if (!screen.cx || !screen.cy) /* not supported on NT4 */ - { - screen.cx = GetSystemMetrics( SM_CXSCREEN ); - screen.cy = GetSystemMetrics( SM_CYSCREEN ); - } - ok_gsm_2( SM_CXMAXTRACK, screen.cx + 4 + 2 * GetSystemMetrics(SM_CXFRAME), - screen.cx - 4 + 2 * GetSystemMetrics(SM_CXFRAME)); /* Vista */ - ok_gsm_2( SM_CYMAXTRACK, screen.cy + 4 + 2 * GetSystemMetrics(SM_CYFRAME), - screen.cy - 4 + 2 * GetSystemMetrics(SM_CYFRAME)); /* Vista */ - /* the next two cannot really be tested as they depend on (application) - * toolbars */ - /* SM_CXMAXIMIZED */ - /* SM_CYMAXIMIZED */ - /* SM_NETWORK */ - /* */ - /* */ - /* */ - /* SM_CLEANBOOT */ - /* SM_CXDRAG */ - /* SM_CYDRAG */ - /* SM_SHOWSOUNDS */ - ok_gsm( SM_CXMENUCHECK, - ((tmMenuFont.tmHeight + tmMenuFont.tmExternalLeading+1)/2)*2-1); - ok_gsm( SM_CYMENUCHECK, - ((tmMenuFont.tmHeight + tmMenuFont.tmExternalLeading+1)/2)*2-1); - /* SM_SLOWMACHINE */ - /* SM_MIDEASTENABLED */ - /* SM_MOUSEWHEELPRESENT */ - /* SM_XVIRTUALSCREEN */ - /* SM_YVIRTUALSCREEN */ - /* SM_CXVIRTUALSCREEN */ - /* SM_CYVIRTUALSCREEN */ - /* SM_CMONITORS */ - /* SM_SAMEDISPLAYFORMAT */ - /* SM_IMMENABLED */ - /* SM_CXFOCUSBORDER */ - /* SM_CYFOCUSBORDER */ - /* SM_TABLETPC */ - /* SM_MEDIACENTER */ - /* SM_CMETRICS */ - /* end of tests */ - if( gsm_error_ctr ) { /* if any errors where found */ - trace( "BorderWidth %d CaptionWidth %d CaptionHeight %d IconSpacing %d IconVerticalSpacing %d\n", - ncm.iBorderWidth, ncm.iCaptionWidth, ncm.iCaptionHeight, IconSpacing, IconVerticalSpacing); - trace( "MenuHeight %d MenuWidth %d ScrollHeight %d ScrollWidth %d SmCaptionHeight %d SmCaptionWidth %d\n", - ncm.iMenuHeight, ncm.iMenuWidth, ncm.iScrollHeight, ncm.iScrollWidth, ncm.iSmCaptionHeight, ncm.iSmCaptionWidth); - trace( "Captionfontchar width %d MenuFont %d,%d CaptionWidth from registry: %d screen %d,%d\n", - avcwCaption, tmMenuFont.tmHeight, tmMenuFont.tmExternalLeading, CaptionWidthfromreg, screen.cx, screen.cy); - } - ReleaseDC( 0, hdc); -} - -static void test_EnumDisplaySettings(void) -{ - DEVMODE devmode; - DWORD val; - HDC hdc; - DWORD num; - - memset(&devmode, 0, sizeof(devmode)); - /* Win95 doesn't handle ENUM_CURRENT_SETTINGS correctly */ - EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &devmode); - - hdc = GetDC(0); - val = GetDeviceCaps(hdc, BITSPIXEL); - ok(devmode.dmBitsPerPel == val || - broken(devmode.dmDeviceName[0] == 0), /* Win95 */ - "GetDeviceCaps(BITSPIXEL) returned %d, EnumDisplaySettings returned %d\n", - val, devmode.dmBitsPerPel); - - val = GetDeviceCaps(hdc, NUMCOLORS); - if(devmode.dmBitsPerPel <= 8) { - ok(val == 256, "Screen bpp is %d, NUMCOLORS returned %d\n", devmode.dmBitsPerPel, val); - } else { - ok(val == -1, "Screen bpp is %d, NUMCOLORS returned %d\n", devmode.dmBitsPerPel, val); - } - - ReleaseDC(0, hdc); - - num = 1; - while (1) { - SetLastError (0xdeadbeef); - if (!EnumDisplaySettings(NULL, num++, &devmode)) { - DWORD le = GetLastError(); - ok(le == ERROR_NO_MORE_FILES || - le == 0xdeadbeef, /* XP, 2003 */ - "Expected ERROR_NO_MORE_FILES or 0xdeadbeef, got %d\n", le); - break; - } - } -} - -static void test_GetSysColorBrush(void) -{ - HBRUSH hbr; - - SetLastError(0xdeadbeef); - hbr = GetSysColorBrush(-1); - ok(hbr == NULL, "Expected NULL brush\n"); - ok(GetLastError() == 0xdeadbeef, "Expected last error not set, got %x\n", GetLastError()); - /* greater than max index */ - hbr = GetSysColorBrush(COLOR_MENUBAR); - if (hbr) - { - SetLastError(0xdeadbeef); - hbr = GetSysColorBrush(COLOR_MENUBAR + 1); - ok(hbr == NULL, "Expected NULL brush\n"); - ok(GetLastError() == 0xdeadbeef, "Expected last error not set, got %x\n", GetLastError()); - } - else - win_skip("COLOR_MENUBAR unsupported\n"); -} - -START_TEST(sysparams) -{ - int argc; - char** argv; - WNDCLASSA wc; - MSG msg; - HANDLE hThread; - DWORD dwThreadId; - HANDLE hInstance, hdll; - - hdll = GetModuleHandleA("user32.dll"); - pChangeDisplaySettingsExA=(void*)GetProcAddress(hdll, "ChangeDisplaySettingsExA"); - - hInstance = GetModuleHandleA( NULL ); - hdc = GetDC(0); - dpi = GetDeviceCaps( hdc, LOGPIXELSY); - iswin9x = GetVersion() & 0x80000000; - - /* This test requires interactivity, if we don't have it, give up */ - if (!SystemParametersInfoA( SPI_SETBEEP, TRUE, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE ) && - GetLastError()==ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION) return; - - argc = winetest_get_mainargs(&argv); - strict=(argc >= 3 && strcmp(argv[2],"strict")==0); - trace("strict=%d\n",strict); - - trace("testing GetSystemMetrics with your current desktop settings\n"); - test_GetSystemMetrics( ); - trace("testing EnumDisplaySettings vs GetDeviceCaps\n"); - test_EnumDisplaySettings( ); - test_GetSysColorBrush( ); - - change_counter = 0; - change_last_param = 0; - - wc.lpszClassName = "SysParamsTestClass"; - wc.lpfnWndProc = SysParamsTestWndProc; - wc.style = CS_OWNDC | CS_VREDRAW | CS_HREDRAW; - wc.hInstance = hInstance; - wc.hIcon = LoadIconA( 0, IDI_APPLICATION ); - wc.hCursor = LoadCursorA( 0, IDC_ARROW ); - wc.hbrBackground = (HBRUSH)( COLOR_WINDOW + 1 ); - wc.lpszMenuName = 0; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - RegisterClassA( &wc ); - - ghTestWnd = CreateWindowA( "SysParamsTestClass", "Test System Parameters Application", - WS_OVERLAPPEDWINDOW, 0, 0, 100, 100, 0, 0, hInstance, NULL ); - - hThread = CreateThread( NULL, 0, SysParamsThreadFunc, 0, 0, &dwThreadId ); - assert( hThread ); - CloseHandle( hThread ); - - while( GetMessageA( &msg, 0, 0, 0 )) { - TranslateMessage( &msg ); - DispatchMessageA( &msg ); - } - ReleaseDC( 0, hdc); - -} diff --git a/rostests/winetests/user32/test_mono.bmp b/rostests/winetests/user32/test_mono.bmp deleted file mode 100644 index 0db4d811129..00000000000 Binary files a/rostests/winetests/user32/test_mono.bmp and /dev/null differ diff --git a/rostests/winetests/user32/testlist.c b/rostests/winetests/user32/testlist.c deleted file mode 100644 index 59f1cce2fb1..00000000000 --- a/rostests/winetests/user32/testlist.c +++ /dev/null @@ -1,61 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_broadcast(void); -extern void func_class(void); -extern void func_clipboard(void); -extern void func_combo(void); -extern void func_cursoricon(void); -extern void func_dce(void); -extern void func_dde(void); -extern void func_dialog(void); -extern void func_edit(void); -extern void func_generated(void); -extern void func_input(void); -extern void func_listbox(void); -extern void func_menu(void); -extern void func_monitor(void); -extern void func_msg(void); -extern void func_resource(void); -extern void func_scroll(void); -extern void func_static(void); -extern void func_sysparams(void); -extern void func_text(void); -extern void func_uitools(void); -extern void func_win(void); -extern void func_winstation(void); -extern void func_wsprintf(void); - -const struct test winetest_testlist[] = -{ - { "broadcast", func_broadcast }, - { "class", func_class }, - { "clipboard", func_clipboard }, - { "combo", func_combo }, - { "cursoricon", func_cursoricon }, - { "dce", func_dce }, - { "dde", func_dde }, - { "dialog", func_dialog }, - { "edit", func_edit }, - { "generated", func_generated }, - { "input", func_input }, - { "listbox", func_listbox }, - { "menu", func_menu }, - { "monitor", func_monitor }, - { "msg", func_msg }, - { "resource", func_resource }, - { "scroll", func_scroll }, - { "static", func_static }, - { "sysparams", func_sysparams }, - { "text", func_text }, - { "uitools", func_uitools }, - { "win", func_win }, - { "winstation", func_winstation }, - { "wsprintf", func_wsprintf }, - { 0, 0 } -}; diff --git a/rostests/winetests/user32/text.c b/rostests/winetests/user32/text.c deleted file mode 100755 index 1874b1572e0..00000000000 --- a/rostests/winetests/user32/text.c +++ /dev/null @@ -1,708 +0,0 @@ -/* - * DrawText tests - * - * Copyright (c) 2004 Zach Gorman - * Copyright 2007 Dmitry Timoshkov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -#include "wine/test.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winerror.h" - -#define MODIFIED(rect) (rect.left == 10 && rect.right != 100 && rect.top == 10 && rect.bottom != 100) -#define EMPTY(rect) (rect.left == rect.right && rect.bottom == rect.top) - -static void test_DrawTextCalcRect(void) -{ - HWND hwnd; - HDC hdc; - HFONT hFont, hOldFont; - LOGFONTA lf; - static CHAR text[] = "Example text for testing DrawText in " - "MM_HIENGLISH mode"; - static WCHAR textW[] = {'W','i','d','e',' ','c','h','a','r',' ', - 's','t','r','i','n','g','\0'}; - static CHAR emptystring[] = ""; - static WCHAR emptystringW[] = { 0 }; - INT textlen, textheight, heightcheck; - RECT rect = { 0, 0, 100, 0 }; - BOOL ret; - DRAWTEXTPARAMS dtp; - BOOL conform_xp = TRUE; - - /* Initialization */ - hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP, - 0, 0, 200, 200, 0, 0, 0, NULL); - ok(hwnd != 0, "CreateWindowExA error %u\n", GetLastError()); - hdc = GetDC(hwnd); - ok(hdc != 0, "GetDC error %u\n", GetLastError()); - trace("hdc %p\n", hdc); - textlen = lstrlenA(text); - - /* LOGFONT initialization */ - memset(&lf, 0, sizeof(lf)); - lf.lfCharSet = ANSI_CHARSET; - lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; - lf.lfWeight = FW_DONTCARE; - lf.lfHeight = 0; /* mapping mode dependent */ - lf.lfQuality = DEFAULT_QUALITY; - lstrcpyA(lf.lfFaceName, "Arial"); - - /* DrawText in MM_HIENGLISH with DT_CALCRECT */ - SetMapMode(hdc, MM_HIENGLISH); - lf.lfHeight = 100 * 9 / 72; /* 9 point */ - hFont = CreateFontIndirectA(&lf); - ok(hFont != 0, "CreateFontIndirectA error %u\n", - GetLastError()); - hOldFont = SelectObject(hdc, hFont); - - textheight = DrawTextA(hdc, text, textlen, &rect, DT_CALCRECT | - DT_EXTERNALLEADING | DT_WORDBREAK | DT_NOCLIP | DT_LEFT | - DT_NOPREFIX); - ok( textheight, "DrawTextA error %u\n", GetLastError()); - - trace("MM_HIENGLISH rect.bottom %d\n", rect.bottom); - ok(rect.bottom < 0, "In MM_HIENGLISH, DrawText with " - "DT_CALCRECT should return a negative rectangle bottom. " - "(bot=%d)\n", rect.bottom); - - SelectObject(hdc, hOldFont); - ret = DeleteObject(hFont); - ok( ret, "DeleteObject error %u\n", GetLastError()); - - - /* DrawText in MM_TEXT with DT_CALCRECT */ - SetMapMode(hdc, MM_TEXT); - lf.lfHeight = -MulDiv(9, GetDeviceCaps(hdc, - LOGPIXELSY), 72); /* 9 point */ - hFont = CreateFontIndirectA(&lf); - ok(hFont != 0, "CreateFontIndirectA error %u\n", - GetLastError()); - hOldFont = SelectObject(hdc, hFont); - - textheight = DrawTextA(hdc, text, textlen, &rect, DT_CALCRECT | - DT_EXTERNALLEADING | DT_WORDBREAK | DT_NOCLIP | DT_LEFT | - DT_NOPREFIX); - ok( textheight, "DrawTextA error %u\n", GetLastError()); - - trace("MM_TEXT rect.bottom %d\n", rect.bottom); - ok(rect.bottom > 0, "In MM_TEXT, DrawText with DT_CALCRECT " - "should return a positive rectangle bottom. (bot=%d)\n", - rect.bottom); - - /* empty or null text should in some cases calc an empty rectangle */ - - SetRect( &rect, 10,10, 100, 100); - heightcheck = textheight = DrawTextExA(hdc, text, 0, &rect, DT_CALCRECT, NULL ); - ok( !EMPTY(rect) && !MODIFIED(rect), - "rectangle should NOT be empty got %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - ok(textheight==0,"Got textheight from DrawTextExA\n"); - - SetRect( &rect, 10,10, 100, 100); - textheight = DrawTextA(hdc, text, 0, &rect, DT_CALCRECT); - ok( !EMPTY(rect) && !MODIFIED(rect), - "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", - rect.left, rect.top, rect.right, rect.bottom ); - if (conform_xp) - ok(textheight==0,"Got textheight from DrawTextA\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - - SetRect( &rect, 10,10, 100, 100); - SetLastError( 0); - heightcheck = textheight = DrawTextExA(hdc, emptystring, -1, &rect, DT_CALCRECT, NULL ); - ok( EMPTY(rect), - "rectangle should be empty got %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - ok(textheight!=0,"Failed to get textheight from DrawTextExA\n"); - - SetRect( &rect, 10,10, 100, 100); - textheight = DrawTextA(hdc, emptystring, -1, &rect, DT_CALCRECT); - ok( EMPTY(rect), - "rectangle should be empty got %d,%d-%d,%d\n", - rect.left, rect.top, rect.right, rect.bottom ); - ok(textheight!=0,"Failed to get textheight from DrawTextA\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - - SetRect( &rect, 10,10, 100, 100); - SetLastError( 0); - heightcheck = textheight = DrawTextExA(hdc, NULL, -1, &rect, DT_CALCRECT, NULL ); - ok( EMPTY(rect) || !MODIFIED(rect), - "rectangle should be empty or not modified got %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - if (!textheight) /* Windows NT 4 */ - { - if (conform_xp) - win_skip("XP conformity failed, skipping XP tests. Probably winNT\n"); - conform_xp = FALSE; - } - else - ok(textheight!=0,"Failed to get textheight from DrawTextExA\n"); - - SetRect( &rect, 10,10, 100, 100); - textheight = DrawTextA(hdc, NULL, -1, &rect, DT_CALCRECT); - ok( EMPTY(rect) || !MODIFIED(rect), - "rectangle should be empty or NOT modified got %d,%d-%d,%d\n", - rect.left, rect.top, rect.right, rect.bottom ); - if (conform_xp) - ok(textheight!=0,"Failed to get textheight from DrawTextA\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - - SetRect( &rect, 10,10, 100, 100); - heightcheck = textheight = DrawTextExA(hdc, NULL, 0, &rect, DT_CALCRECT, NULL ); - ok( !EMPTY(rect) && !MODIFIED(rect), - "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - if (conform_xp) - ok(textheight==0,"Got textheight from DrawTextExA\n"); - - SetRect( &rect, 10,10, 100, 100); - textheight = DrawTextA(hdc, NULL, 0, &rect, DT_CALCRECT); - ok( !EMPTY(rect) && !MODIFIED(rect), - "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", - rect.left, rect.top, rect.right, rect.bottom ); - if (conform_xp) - ok(textheight==0,"Got textheight from DrawTextA\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - - /* DT_SINGLELINE tests */ - - SetRect( &rect, 10,10, 100, 100); - heightcheck = textheight = DrawTextExA(hdc, text, 0, &rect, DT_CALCRECT|DT_SINGLELINE, NULL ); - ok( !EMPTY(rect) && !MODIFIED(rect), - "rectangle should NOT be empty got %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - if (conform_xp) - ok(textheight==0,"Got textheight from DrawTextExA\n"); - - SetRect( &rect, 10,10, 100, 100); - textheight = DrawTextA(hdc, text, 0, &rect, DT_CALCRECT|DT_SINGLELINE); - ok( !EMPTY(rect) && !MODIFIED(rect), - "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", - rect.left, rect.top, rect.right, rect.bottom ); - if (conform_xp) - ok(textheight==0,"Got textheight from DrawTextA\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - - SetRect( &rect, 10,10, 100, 100); - SetLastError( 0); - heightcheck = textheight = DrawTextExA(hdc, emptystring, -1, &rect, DT_CALCRECT|DT_SINGLELINE, NULL ); - ok( !EMPTY(rect) && MODIFIED(rect), - "rectangle should be modified got %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - ok(textheight!=0,"Failed to get textheight from DrawTextExA\n"); - - SetRect( &rect, 10,10, 100, 100); - textheight = DrawTextA(hdc, emptystring, -1, &rect, DT_CALCRECT|DT_SINGLELINE); - ok( !EMPTY(rect) && MODIFIED (rect), - "rectangle should be modified got %d,%d-%d,%d\n", - rect.left, rect.top, rect.right, rect.bottom ); - ok(textheight!=0,"Failed to get textheight from DrawTextA\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - - SetRect( &rect, 10,10, 100, 100); - SetLastError( 0); - heightcheck = textheight = DrawTextExA(hdc, NULL, -1, &rect, DT_CALCRECT|DT_SINGLELINE, NULL ); - ok( (!EMPTY(rect) && MODIFIED(rect)) || !MODIFIED(rect), - "rectangle should be modified got %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - if (conform_xp) - ok(textheight!=0,"Failed to get textheight from DrawTextExA\n"); - - SetRect( &rect, 10,10, 100, 100); - textheight = DrawTextA(hdc, NULL, -1, &rect, DT_CALCRECT|DT_SINGLELINE); - ok( (!EMPTY(rect) && MODIFIED(rect)) || !MODIFIED(rect), - "rectangle should be modified got %d,%d-%d,%d\n", - rect.left, rect.top, rect.right, rect.bottom ); - if (conform_xp) - ok(textheight!=0,"Failed to get textheight from DrawTextA\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - - SetRect( &rect, 10,10, 100, 100); - heightcheck = textheight = DrawTextExA(hdc, NULL, 0, &rect, DT_CALCRECT|DT_SINGLELINE, NULL ); - ok( !EMPTY(rect) && !MODIFIED(rect), - "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - if (conform_xp) - ok(textheight==0,"Got textheight from DrawTextExA\n"); - - SetRect( &rect, 10,10, 100, 100); - textheight = DrawTextA(hdc, NULL, 0, &rect, DT_CALCRECT|DT_SINGLELINE); - ok( !EMPTY(rect) && !MODIFIED(rect), - "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", - rect.left, rect.top, rect.right, rect.bottom ); - if (conform_xp) - ok(textheight==0,"Got textheight from DrawTextA\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - - /* further tests with 0 count, NULL and empty strings */ - heightcheck = textheight = DrawTextA(hdc, text, 0, &rect, 0); - if (conform_xp) - ok(textheight==0,"Got textheight from DrawTextA\n"); - textheight = DrawTextExA(hdc, text, 0, &rect, 0, NULL ); - if (conform_xp) - ok(textheight==0,"Got textheight from DrawTextExA\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - heightcheck = textheight = DrawTextA(hdc, emptystring, 0, &rect, 0); - if (conform_xp) - ok(textheight==0,"Got textheight from DrawTextA\n"); - textheight = DrawTextExA(hdc, emptystring, 0, &rect, 0, NULL ); - if (conform_xp) - ok(textheight==0,"Got textheight from DrawTextExA\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - heightcheck = textheight = DrawTextA(hdc, NULL, 0, &rect, 0); - if (conform_xp) - ok(textheight==0,"Got textheight from DrawTextA\n"); - textheight = DrawTextExA(hdc, NULL, 0, &rect, 0, NULL ); - if (conform_xp) - ok(textheight==0,"Got textheight from DrawTextExA\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - heightcheck = textheight = DrawTextA(hdc, emptystring, -1, &rect, 0); - ok(textheight!=0,"Failed to get textheight from DrawTextA\n"); - textheight = DrawTextExA(hdc, emptystring, -1, &rect, 0, NULL ); - ok(textheight!=0,"Failed to get textheight from DrawTextExA\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - heightcheck = textheight = DrawTextA(hdc, NULL, -1, &rect, 0); - if (conform_xp) - ok(textheight!=0,"Failed to get textheight from DrawTextA\n"); - textheight = DrawTextExA(hdc, NULL, -1, &rect, 0, NULL ); - if (conform_xp) - ok(textheight!=0,"Failed to get textheight from DrawTextExA\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - heightcheck = textheight = DrawTextA(hdc, NULL, 10, &rect, 0); - ok(textheight==0,"Got textheight from DrawTextA\n"); - textheight = DrawTextExA(hdc, NULL, 10, &rect, 0, NULL ); - ok(textheight==0,"Got textheight from DrawTextA\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - - - /* invalid dtp size test */ - dtp.cbSize = -1; /* Invalid */ - dtp.uiLengthDrawn = 1337; - textheight = DrawTextExA(hdc, text, 0, &rect, 0, &dtp); - ok(textheight==0,"Got textheight from DrawTextExA\n"); - ok(dtp.uiLengthDrawn==1337, "invalid dtp.uiLengthDrawn = %i\n",dtp.uiLengthDrawn); - dtp.uiLengthDrawn = 1337; - textheight = DrawTextExA(hdc, emptystring, 0, &rect, 0, &dtp); - ok(textheight==0,"Got textheight from DrawTextExA\n"); - ok(dtp.uiLengthDrawn==1337, "invalid dtp.uiLengthDrawn = %i\n",dtp.uiLengthDrawn); - dtp.uiLengthDrawn = 1337; - textheight = DrawTextExA(hdc, NULL, 0, &rect, 0, &dtp); - ok(textheight==0,"Got textheight from DrawTextExA\n"); - ok(dtp.uiLengthDrawn==1337, "invalid dtp.uiLengthDrawn = %i\n",dtp.uiLengthDrawn); - dtp.uiLengthDrawn = 1337; - textheight = DrawTextExA(hdc, emptystring, -1, &rect, 0, &dtp); - ok(textheight==0,"Got textheight from DrawTextExA\n"); - ok(dtp.uiLengthDrawn==1337, "invalid dtp.uiLengthDrawn = %i\n",dtp.uiLengthDrawn); - dtp.uiLengthDrawn = 1337; - textheight = DrawTextExA(hdc, NULL, -1, &rect, 0, &dtp); - ok(textheight==0,"Got textheight from DrawTextExA\n"); - ok(dtp.uiLengthDrawn==1337, "invalid dtp.uiLengthDrawn = %i\n",dtp.uiLengthDrawn); - - /* Margin calculations */ - dtp.cbSize = sizeof(dtp); - dtp.iLeftMargin = 0; - dtp.iRightMargin = 0; - SetRect( &rect, 0, 0, 0, 0); - DrawTextExA(hdc, text, -1, &rect, DT_CALCRECT, &dtp); - textlen = rect.right; /* Width without margin */ - dtp.iLeftMargin = 8; - SetRect( &rect, 0, 0, 0, 0); - DrawTextExA(hdc, text, -1, &rect, DT_CALCRECT, &dtp); - ok(rect.right==dtp.iLeftMargin+textlen ,"Incorrect left margin calculated rc(%d,%d)\n", rect.left, rect.right); - dtp.iLeftMargin = 0; - dtp.iRightMargin = 8; - SetRect( &rect, 0, 0, 0, 0); - DrawTextExA(hdc, text, -1, &rect, DT_CALCRECT, &dtp); - ok(rect.right==dtp.iRightMargin+textlen ,"Incorrect right margin calculated rc(%d,%d)\n", rect.left, rect.right); - - /* Wide char versions */ - SetRect( &rect, 10,10, 100, 100); - SetLastError( 0); - heightcheck = textheight = DrawTextExW(hdc, textW, 0, &rect, DT_CALCRECT, NULL ); - if( GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) { - ok( !EMPTY(rect) && !MODIFIED(rect), - "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", - rect.left, rect.top, rect.right, rect.bottom ); - ok(textheight!=0,"Failed to get textheight from DrawTextExW\n"); - - SetRect( &rect, 10,10, 100, 100); - textheight = DrawTextW(hdc, textW, 0, &rect, DT_CALCRECT); - ok( !EMPTY(rect) && !MODIFIED(rect), - "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", - rect.left, rect.top, rect.right, rect.bottom ); - ok(textheight!=0,"Failed to get textheight from DrawTextW\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - - SetRect( &rect, 10,10, 100, 100); - heightcheck = textheight = DrawTextExW(hdc, emptystringW, -1, &rect, DT_CALCRECT, NULL ); - ok( EMPTY(rect), - "rectangle should be empty got %d,%d-%d,%d\n", - rect.left, rect.top, rect.right, rect.bottom ); - ok(textheight!=0,"Failed to get textheight from DrawTextExW\n"); - - SetRect( &rect, 10,10, 100, 100); - textheight = DrawTextW(hdc, emptystringW, -1, &rect, DT_CALCRECT); - ok( EMPTY(rect), - "rectangle should be empty got %d,%d-%d,%d\n", - rect.left, rect.top, rect.right, rect.bottom ); - ok(textheight!=0,"Failed to get textheight from DrawTextW\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - - SetRect( &rect, 10,10, 100, 100); - heightcheck = textheight = DrawTextExW(hdc, NULL, 0, &rect, DT_CALCRECT, NULL ); - ok( !EMPTY(rect) && !MODIFIED(rect), - "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", - rect.left, rect.top, rect.right, rect.bottom ); - if (textheight) /* windows 2000 */ - { - if (conform_xp) - win_skip("XP conformity failed, skipping XP tests. Probably win 2000\n"); - conform_xp = FALSE; - } - else - ok(textheight==0,"Got textheight from DrawTextExW\n"); - - SetRect( &rect, 10,10, 100, 100); - textheight = DrawTextW(hdc, NULL, 0, &rect, DT_CALCRECT); - ok( !EMPTY(rect) && !MODIFIED(rect), - "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", - rect.left, rect.top, rect.right, rect.bottom ); - if (conform_xp) - ok(textheight==0,"Got textheight from DrawTextW\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - - if (conform_xp) { - /* Crashes on NT4 */ - SetRect( &rect, 10,10, 100, 100); - heightcheck = textheight = DrawTextExW(hdc, NULL, -1, &rect, DT_CALCRECT, NULL ); - ok( !EMPTY(rect) && !MODIFIED(rect), - "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", - rect.left, rect.top, rect.right, rect.bottom ); - ok(textheight==0,"Got textheight from DrawTextExW\n"); - - SetRect( &rect, 10,10, 100, 100); - textheight = DrawTextW(hdc, NULL, -1, &rect, DT_CALCRECT); - ok( !EMPTY(rect) && !MODIFIED(rect), - "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", - rect.left, rect.top, rect.right, rect.bottom ); - ok(textheight==0,"Got textheight from DrawTextW\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - } - - - /* DT_SINGLELINE tests */ - - heightcheck = textheight = DrawTextExW(hdc, textW, 0, &rect, DT_CALCRECT|DT_SINGLELINE, NULL ); - ok( !EMPTY(rect) && !MODIFIED(rect), - "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", - rect.left, rect.top, rect.right, rect.bottom ); - ok(textheight!=0,"Failed to get textheight from DrawTextExW\n"); - - SetRect( &rect, 10,10, 100, 100); - textheight = DrawTextW(hdc, textW, 0, &rect, DT_CALCRECT|DT_SINGLELINE); - ok( !EMPTY(rect) && !MODIFIED(rect), - "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", - rect.left, rect.top, rect.right, rect.bottom ); - ok(textheight!=0,"Failed to get textheight from DrawTextW\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - - SetRect( &rect, 10,10, 100, 100); - heightcheck = textheight = DrawTextExW(hdc, emptystringW, -1, &rect, DT_CALCRECT|DT_SINGLELINE, NULL ); - ok( !EMPTY(rect) && MODIFIED(rect), - "rectangle should be modified got %d,%d-%d,%d\n", - rect.left, rect.top, rect.right, rect.bottom ); - ok(textheight!=0,"Failed to get textheight from DrawTextExW\n"); - - SetRect( &rect, 10,10, 100, 100); - textheight = DrawTextW(hdc, emptystringW, -1, &rect, DT_CALCRECT|DT_SINGLELINE); - ok( !EMPTY(rect) && MODIFIED(rect), - "rectangle should be modified got %d,%d-%d,%d\n", - rect.left, rect.top, rect.right, rect.bottom ); - ok(textheight!=0,"Failed to get textheight from DrawTextW\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - - if (conform_xp) { - /* Crashes on NT4 */ - SetRect( &rect, 10,10, 100, 100); - heightcheck = textheight = DrawTextExW(hdc, NULL, -1, &rect, DT_CALCRECT|DT_SINGLELINE, NULL ); - ok( !EMPTY(rect) && !MODIFIED(rect), - "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", - rect.left, rect.top, rect.right, rect.bottom ); - ok(textheight==0,"Got textheight from DrawTextExW\n"); - - SetRect( &rect, 10,10, 100, 100); - textheight = DrawTextW(hdc, NULL, -1, &rect, DT_CALCRECT|DT_SINGLELINE); - ok( !EMPTY(rect) && !MODIFIED(rect), - "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", - rect.left, rect.top, rect.right, rect.bottom ); - ok(textheight==0,"Got textheight from DrawTextW\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - } - - SetRect( &rect, 10,10, 100, 100); - heightcheck = textheight = DrawTextExW(hdc, NULL, 0, &rect, DT_CALCRECT|DT_SINGLELINE, NULL ); - ok( !EMPTY(rect) && !MODIFIED(rect), - "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", - rect.left, rect.top, rect.right, rect.bottom ); - if (conform_xp) - ok(textheight==0,"Got textheight from DrawTextExW\n"); - - SetRect( &rect, 10,10, 100, 100); - textheight = DrawTextW(hdc, NULL, 0, &rect, DT_CALCRECT|DT_SINGLELINE); - ok( !EMPTY(rect) && !MODIFIED(rect), - "rectangle should NOT be empty and NOT modified got %d,%d-%d,%d\n", - rect.left, rect.top, rect.right, rect.bottom ); - if (conform_xp) - ok(textheight==0,"Got textheight from DrawTextW\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - - /* further tests with NULL and empty strings */ - heightcheck = textheight = DrawTextW(hdc, textW, 0, &rect, 0); - ok(textheight!=0,"Failed to get textheight from DrawTextW\n"); - textheight = DrawTextExW(hdc, textW, 0, &rect, 0, NULL ); - ok(textheight!=0,"Failed to get textheight from DrawTextExW\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - heightcheck = textheight = DrawTextW(hdc, emptystringW, 0, &rect, 0); - ok(textheight!=0,"Failed to get textheight from DrawTextW\n"); - textheight = DrawTextExW(hdc, emptystringW, 0, &rect, 0, NULL ); - ok(textheight!=0,"Failed to get textheight from DrawTextExW\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - heightcheck = textheight = DrawTextW(hdc, NULL, 0, &rect, 0); - if (conform_xp) - ok(textheight==0,"Got textheight from DrawTextW\n"); - textheight = DrawTextExW(hdc, NULL, 0, &rect, 0, NULL ); - if (conform_xp) - ok(textheight==0,"Got textheight from DrawTextExW\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - heightcheck = textheight = DrawTextW(hdc, emptystringW, -1, &rect, 0); - ok(textheight!=0,"Failed to get textheight from DrawTextW\n"); - textheight = DrawTextExW(hdc, emptystringW, -1, &rect, 0, NULL ); - ok(textheight!=0,"Failed to get textheight from DrawTextExW\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - if (conform_xp) { - /* Crashes on NT4 */ - heightcheck = textheight = DrawTextW(hdc, NULL, -1, &rect, 0); - ok(textheight==0,"Got textheight from DrawTextW\n"); - textheight = DrawTextExW(hdc, NULL, -1, &rect, 0, NULL ); - ok(textheight==0,"Got textheight from DrawTextExW\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - heightcheck = textheight = DrawTextW(hdc, NULL, 10, &rect, 0); - ok(textheight==0,"Got textheight from DrawTextW\n"); - textheight = DrawTextExW(hdc, NULL, 10, &rect, 0, NULL ); - ok(textheight==0,"Got textheight from DrawTextW\n"); - ok(textheight == heightcheck,"DrawTextEx and DrawText differ in return\n"); - } - - dtp.cbSize = -1; /* Invalid */ - dtp.uiLengthDrawn = 1337; - textheight = DrawTextExW(hdc, textW, 0, &rect, 0, &dtp); - ok(textheight!=0,"Failed to get textheight from DrawTextExW\n"); - ok(dtp.uiLengthDrawn==1337, "invalid dtp.uiLengthDrawn = %i\n",dtp.uiLengthDrawn); - dtp.uiLengthDrawn = 1337; - textheight = DrawTextExW(hdc, emptystringW, 0, &rect, 0, &dtp); - if (conform_xp) - ok(textheight==0,"Got textheight from DrawTextExW\n"); - ok(dtp.uiLengthDrawn==1337, "invalid dtp.uiLengthDrawn = %i\n",dtp.uiLengthDrawn); - dtp.uiLengthDrawn = 1337; - textheight = DrawTextExW(hdc, NULL, 0, &rect, 0, &dtp); - if (conform_xp) - ok(textheight==0,"Got textheight from DrawTextExW\n"); - ok(dtp.uiLengthDrawn==1337, "invalid dtp.uiLengthDrawn = %i\n",dtp.uiLengthDrawn); - dtp.uiLengthDrawn = 1337; - textheight = DrawTextExW(hdc, emptystringW, -1, &rect, 0, &dtp); - ok(textheight==0,"Got textheight from DrawTextExW\n"); - ok(dtp.uiLengthDrawn==1337, "invalid dtp.uiLengthDrawn = %i\n",dtp.uiLengthDrawn); - if (conform_xp) { - /* Crashes on NT4 */ - dtp.uiLengthDrawn = 1337; - textheight = DrawTextExW(hdc, NULL, -1, &rect, 0, &dtp); - ok(textheight==0,"Got textheight from DrawTextExW\n"); - ok(dtp.uiLengthDrawn==1337, "invalid dtp.uiLengthDrawn = %i\n",dtp.uiLengthDrawn); - } - } - - /* More test cases from bug 12226 */ - SetRect(&rect, 0, 0, 0, 0); - textheight = DrawTextA(hdc, emptystring, -1, &rect, DT_CALCRECT | DT_LEFT | DT_SINGLELINE); - ok(textheight, "DrawTextA error %u\n", GetLastError()); - ok(0 == rect.left, "expected 0, got %d\n", rect.left); - ok(0 == rect.right, "expected 0, got %d\n", rect.right); - ok(0 == rect.top, "expected 0, got %d\n", rect.top); - ok(rect.bottom, "rect.bottom should not be 0\n"); - - SetRect(&rect, 0, 0, 0, 0); - textheight = DrawTextW(hdc, emptystringW, -1, &rect, DT_CALCRECT | DT_LEFT | DT_SINGLELINE); - if (!textheight && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip( "DrawTextW not implemented\n" ); - } - else - { - ok(textheight, "DrawTextW error %u\n", GetLastError()); - ok(0 == rect.left, "expected 0, got %d\n", rect.left); - ok(0 == rect.right, "expected 0, got %d\n", rect.right); - ok(0 == rect.top, "expected 0, got %d\n", rect.top); - ok(rect.bottom, "rect.bottom should not be 0\n"); - } - - SelectObject(hdc, hOldFont); - ret = DeleteObject(hFont); - ok( ret, "DeleteObject error %u\n", GetLastError()); - - /* Clean up */ - ret = ReleaseDC(hwnd, hdc); - ok( ret, "ReleaseDC error %u\n", GetLastError()); - ret = DestroyWindow(hwnd); - ok( ret, "DestroyWindow error %u\n", GetLastError()); -} - -/* replace tabs by \t */ -static void strfmt( const char *str, char *strout) -{ - unsigned int i,j ; - for(i=0,j=0;i<=strlen(str);i++,j++) - if((strout[j]=str[i])=='\t') { - strout[j++]='\\'; - strout[j]='t'; - } -} - - -#define TABTEST( tabval, tabcount, string, _exp) \ -{ int i,x_act, x_exp; char strdisp[64];\ - for(i=0;i<8;i++) tabs[i]=(i+1)*(tabval); \ - extent = GetTabbedTextExtentA( hdc, string, strlen( string), (tabcount), tabs); \ - strfmt( string, strdisp); \ - /* trace( "Extent is %08lx\n", extent); */\ - x_act = LOWORD( extent); \ - x_exp = (_exp); \ - ok( x_act == x_exp, "Test case \"%s\". Text extent is %d, expected %d tab %d tabcount %d\n", \ - strdisp, x_act, x_exp, tabval, tabcount); \ -} \ - - -static void test_TabbedText(void) -{ - HWND hwnd; - HDC hdc; - BOOL ret; - TEXTMETRICA tm; - DWORD extent; - INT tabs[8], cx, cy, tab, tabcount,t,align; - - /* Initialization */ - hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP, - 0, 0, 200, 200, 0, 0, 0, NULL); - ok(hwnd != 0, "CreateWindowExA error %u\n", GetLastError()); - hdc = GetDC(hwnd); - ok(hdc != 0, "GetDC error %u\n", GetLastError()); - - ret = GetTextMetricsA( hdc, &tm); - ok( ret, "GetTextMetrics error %u\n", GetLastError()); - - extent = GetTabbedTextExtentA( hdc, "x", 0, 1, tabs); - ok( extent == 0, "GetTabbedTextExtentA returned non-zero on nCount == 0\n"); - - extent = GetTabbedTextExtentA( hdc, "x", 1, 1, tabs); - cx = LOWORD( extent); - cy = HIWORD( extent); - trace( "cx is %d cy is %d\n", cx, cy); - - align=1; - for( t=-1; t<=1; t++) { /* slightly adjust the 4 char tabstop, to - catch the one off errors */ - tab = (cx *4 + t); - /* test the special case tabcount =1 and the general array (80 of tabs */ - for( tabcount = 1; tabcount <= 8; tabcount +=7) { - TABTEST( align * tab, tabcount, "\t", tab) - TABTEST( align * tab, tabcount, "xxx\t", tab) - TABTEST( align * tab, tabcount, "\tx", tab+cx) - TABTEST( align * tab, tabcount, "\t\t", tab*2) - TABTEST( align * tab, tabcount, "\tx\t", tab*2) - TABTEST( align * tab, tabcount, "x\tx", tab+cx) - TABTEST( align * tab, tabcount, "xx\tx", tab+cx) - TABTEST( align * tab, tabcount, "xxx\tx", tab+cx) - TABTEST( align * tab, tabcount, "xxxx\tx", t>0 ? tab + cx : 2*tab+cx) - TABTEST( align * tab, tabcount, "xxxxx\tx", 2*tab+cx) - } - } - align=-1; - for( t=-1; t<=1; t++) { /* slightly adjust the 4 char tabstop, to - catch the one off errors */ - tab = (cx *4 + t); - /* test the special case tabcount =1 and the general array (8) of tabs */ - for( tabcount = 1; tabcount <= 8; tabcount +=7) { - TABTEST( align * tab, tabcount, "\t", tab) - TABTEST( align * tab, tabcount, "xxx\t", tab) - TABTEST( align * tab, tabcount, "\tx", tab) - TABTEST( align * tab, tabcount, "\t\t", tab*2) - TABTEST( align * tab, tabcount, "\tx\t", tab*2) - TABTEST( align * tab, tabcount, "x\tx", tab) - TABTEST( align * tab, tabcount, "xx\tx", tab) - TABTEST( align * tab, tabcount, "xxx\tx", 4 * cx >= tab ? 2*tab :tab) - TABTEST( align * tab, tabcount, "xxxx\tx", 2*tab) - TABTEST( align * tab, tabcount, "xxxxx\tx", 2*tab) - } - } - - ReleaseDC( hwnd, hdc ); - DestroyWindow( hwnd ); -} - -static void test_DrawState(void) -{ - static const char text[] = "Sample text string"; - HWND hwnd; - HDC hdc; - BOOL ret; - - hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP, - 0, 0, 200, 200, 0, 0, 0, NULL); - assert(hwnd); - - hdc = GetDC(hwnd); - assert(hdc); - - SetLastError(0xdeadbeef); - ret = DrawState(hdc, GetStockObject(DKGRAY_BRUSH), NULL, (LPARAM)text, strlen(text), - 0, 0, 10, 10, DST_TEXT); - ok(ret, "DrawState error %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = DrawState(hdc, GetStockObject(DKGRAY_BRUSH), NULL, (LPARAM)text, 0, - 0, 0, 10, 10, DST_TEXT); - ok(ret, "DrawState error %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = DrawState(hdc, GetStockObject(DKGRAY_BRUSH), NULL, 0, strlen(text), - 0, 0, 10, 10, DST_TEXT); - ok(!ret || broken(ret) /* win98 */, "DrawState succeeded\n"); - ok(GetLastError() == 0xdeadbeef, "not expected error %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = DrawState(hdc, GetStockObject(DKGRAY_BRUSH), NULL, 0, 0, - 0, 0, 10, 10, DST_TEXT); - ok(!ret || broken(ret) /* win98 */, "DrawState succeeded\n"); - ok(GetLastError() == 0xdeadbeef, "not expected error %u\n", GetLastError()); - - ReleaseDC(hwnd, hdc); - DestroyWindow(hwnd); -} - -START_TEST(text) -{ - test_TabbedText(); - test_DrawTextCalcRect(); - test_DrawState(); -} diff --git a/rostests/winetests/user32/uitools.c b/rostests/winetests/user32/uitools.c deleted file mode 100644 index c3f55083c05..00000000000 --- a/rostests/winetests/user32/uitools.c +++ /dev/null @@ -1,69 +0,0 @@ -/* Unit test suite for user interface functions - * - * Copyright 2009 Nikolay Sivov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "wine/test.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" - -static void test_FillRect(void) -{ - HDC hdc, hdcmem; - DWORD bits[64]; - HBITMAP hbmp, oldhbmp; - COLORREF col; - HBRUSH old_brush; - RECT r; - - /* fill bitmap data with white */ - memset(bits, 0xff, sizeof(bits)); - - hdc = GetDC(0); - ok( hdc != NULL, "CreateDC rets %p\n", hdc); - /* create a memory dc */ - hdcmem = CreateCompatibleDC(hdc); - ok(hdcmem != NULL, "CreateCompatibleDC rets %p\n", hdcmem); - /* test monochrome bitmap: should always work */ - hbmp = CreateBitmap(32, 32, 1, 1, bits); - ok(hbmp != NULL, "CreateBitmap returns %p\n", hbmp); - oldhbmp = SelectObject(hdcmem, hbmp); - ok(oldhbmp != NULL, "SelectObject returned NULL\n"); /* a memdc always has a bitmap selected */ - col = GetPixel(hdcmem, 0, 0); - ok( col == 0xffffff, "GetPixel returned %08x, expected 0xffffff\n", col); - - /* select black brush */ - old_brush = SelectObject(hdcmem, GetStockObject(BLACK_BRUSH)); - r.left = r.top = 0; - r.right = r.bottom = 5; - FillRect(hdcmem, &r, 0); - SelectObject(hdcmem, old_brush); - /* bitmap filled with last selected brush */ - col = GetPixel(hdcmem, 0, 0); - ok(col == 0, "GetPixel returned %08x, expected 0\n", col); - - SelectObject(hdcmem, oldhbmp); - DeleteObject(hbmp); - DeleteDC(hdcmem); - ReleaseDC(0, hdc); -} - -START_TEST(uitools) -{ - test_FillRect(); -} diff --git a/rostests/winetests/user32/user32.rbuild b/rostests/winetests/user32/user32.rbuild deleted file mode 100644 index 39fbf77488f..00000000000 --- a/rostests/winetests/user32/user32.rbuild +++ /dev/null @@ -1,37 +0,0 @@ - - - - . - include/reactos/wine - - ntdll - user32 - gdi32 - advapi32 - broadcast.c - class.c - clipboard.c - combo.c - cursoricon.c - dce.c - dde.c - dialog.c - edit.c - generated.c - input.c - listbox.c - menu.c - monitor.c - msg.c - resource.c - scroll.c - static.c - sysparams.c - text.c - uitools.c - win.c - winstation.c - wsprintf.c - testlist.c - resource.rc - diff --git a/rostests/winetests/user32/win.c b/rostests/winetests/user32/win.c deleted file mode 100644 index 365f6ef3f40..00000000000 --- a/rostests/winetests/user32/win.c +++ /dev/null @@ -1,6713 +0,0 @@ -/* - * Unit tests for window handling - * - * Copyright 2002 Bill Medland - * Copyright 2002 Alexandre Julliard - * Copyright 2003 Dmitry Timoshkov - * - * 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 - */ - -/* To get ICON_SMALL2 with the MSVC headers */ -//#define _WIN32_WINNT 0x0501 - -#include -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" - -#include "wine/test.h" - -#ifndef SPI_GETDESKWALLPAPER -#define SPI_GETDESKWALLPAPER 0x0073 -#endif - -#define LONG_PTR INT_PTR -#define ULONG_PTR UINT_PTR - -void dump_region(HRGN hrgn); - -static HWND (WINAPI *pGetAncestor)(HWND,UINT); -static BOOL (WINAPI *pGetWindowInfo)(HWND,WINDOWINFO*); -static UINT (WINAPI *pGetWindowModuleFileNameA)(HWND,LPSTR,UINT); -static BOOL (WINAPI *pGetLayeredWindowAttributes)(HWND,COLORREF*,BYTE*,DWORD*); -static BOOL (WINAPI *pSetLayeredWindowAttributes)(HWND,COLORREF,BYTE,DWORD); -static BOOL (WINAPI *pUpdateLayeredWindow)(HWND,HDC,POINT*,SIZE*,HDC,POINT*,COLORREF,BLENDFUNCTION*,DWORD); -static BOOL (WINAPI *pGetMonitorInfoA)(HMONITOR,LPMONITORINFO); -static HMONITOR (WINAPI *pMonitorFromPoint)(POINT,DWORD); -static int (WINAPI *pGetWindowRgnBox)(HWND,LPRECT); -static BOOL (WINAPI *pGetGUIThreadInfo)(DWORD, GUITHREADINFO*); -static BOOL (WINAPI *pGetProcessDefaultLayout)( DWORD *layout ); -static BOOL (WINAPI *pSetProcessDefaultLayout)( DWORD layout ); -static BOOL (WINAPI *pFlashWindowEx)( PFLASHWINFO pfwi ); -static DWORD (WINAPI *pSetLayout)(HDC hdc, DWORD layout); -static DWORD (WINAPI *pGetLayout)(HDC hdc); -static BOOL (WINAPI *pMirrorRgn)(HWND hwnd, HRGN hrgn); - -static BOOL test_lbuttondown_flag; -static HWND hwndMessage; -static HWND hwndMain, hwndMain2; -static HHOOK hhook; - -static const char* szAWRClass = "Winsize"; -static HMENU hmenu; -static DWORD our_pid; - -static BOOL is_win9x = FALSE; - -#define COUNTOF(arr) (sizeof(arr)/sizeof(arr[0])) - -static void dump_minmax_info( const MINMAXINFO *minmax ) -{ - trace("Reserved=%d,%d MaxSize=%d,%d MaxPos=%d,%d MinTrack=%d,%d MaxTrack=%d,%d\n", - minmax->ptReserved.x, minmax->ptReserved.y, - minmax->ptMaxSize.x, minmax->ptMaxSize.y, - minmax->ptMaxPosition.x, minmax->ptMaxPosition.y, - minmax->ptMinTrackSize.x, minmax->ptMinTrackSize.y, - minmax->ptMaxTrackSize.x, minmax->ptMaxTrackSize.y); -} - -/* try to make sure pending X events have been processed before continuing */ -static void flush_events( BOOL remove_messages ) -{ - MSG msg; - int diff = 200; - int min_timeout = 100; - DWORD time = GetTickCount() + diff; - - while (diff > 0) - { - if (MsgWaitForMultipleObjects( 0, NULL, FALSE, min_timeout, QS_ALLINPUT ) == WAIT_TIMEOUT) break; - if (remove_messages) - while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg ); - diff = time - GetTickCount(); - min_timeout = 50; - } -} - -/* check the values returned by the various parent/owner functions on a given window */ -static void check_parents( HWND hwnd, HWND ga_parent, HWND gwl_parent, HWND get_parent, - HWND gw_owner, HWND ga_root, HWND ga_root_owner ) -{ - HWND res; - - if (pGetAncestor) - { - res = pGetAncestor( hwnd, GA_PARENT ); - ok( res == ga_parent, "Wrong result for GA_PARENT %p expected %p\n", res, ga_parent ); - } - res = (HWND)GetWindowLongPtrA( hwnd, GWLP_HWNDPARENT ); - ok( res == gwl_parent, "Wrong result for GWL_HWNDPARENT %p expected %p\n", res, gwl_parent ); - res = GetParent( hwnd ); - ok( res == get_parent, "Wrong result for GetParent %p expected %p\n", res, get_parent ); - res = GetWindow( hwnd, GW_OWNER ); - ok( res == gw_owner, "Wrong result for GW_OWNER %p expected %p\n", res, gw_owner ); - if (pGetAncestor) - { - res = pGetAncestor( hwnd, GA_ROOT ); - ok( res == ga_root, "Wrong result for GA_ROOT %p expected %p\n", res, ga_root ); - res = pGetAncestor( hwnd, GA_ROOTOWNER ); - ok( res == ga_root_owner, "Wrong result for GA_ROOTOWNER %p expected %p\n", res, ga_root_owner ); - } -} - -#define check_wnd_state(a,b,c,d) check_wnd_state_(__FILE__,__LINE__,a,b,c,d) -static void check_wnd_state_(const char *file, int line, - HWND active, HWND foreground, HWND focus, HWND capture) -{ - ok_(file, line)(active == GetActiveWindow(), "GetActiveWindow() = %p\n", GetActiveWindow()); - /* only check foreground if it belongs to the current thread */ - /* foreground can be moved to a different app pretty much at any time */ - if (foreground && GetForegroundWindow() && - GetWindowThreadProcessId(GetForegroundWindow(), NULL) == GetCurrentThreadId()) - ok_(file, line)(foreground == GetForegroundWindow(), "GetForegroundWindow() = %p\n", GetForegroundWindow()); - ok_(file, line)(focus == GetFocus(), "GetFocus() = %p\n", GetFocus()); - ok_(file, line)(capture == GetCapture(), "GetCapture() = %p\n", GetCapture()); -} - -/* same as above but without capture test */ -#define check_active_state(a,b,c) check_active_state_(__FILE__,__LINE__,a,b,c) -static void check_active_state_(const char *file, int line, - HWND active, HWND foreground, HWND focus) -{ - ok_(file, line)(active == GetActiveWindow(), "GetActiveWindow() = %p\n", GetActiveWindow()); - /* only check foreground if it belongs to the current thread */ - /* foreground can be moved to a different app pretty much at any time */ - if (foreground && GetForegroundWindow() && - GetWindowThreadProcessId(GetForegroundWindow(), NULL) == GetCurrentThreadId()) - ok_(file, line)(foreground == GetForegroundWindow(), "GetForegroundWindow() = %p\n", GetForegroundWindow()); - ok_(file, line)(focus == GetFocus(), "GetFocus() = %p\n", GetFocus()); -} - -static BOOL ignore_message( UINT message ) -{ - /* these are always ignored */ - return (message >= 0xc000 || - message == WM_GETICON || - message == WM_GETOBJECT || - message == WM_TIMECHANGE || - message == WM_DEVICECHANGE); -} - -static BOOL CALLBACK EnumChildProc( HWND hwndChild, LPARAM lParam) -{ - (*(LPINT)lParam)++; - trace("EnumChildProc on %p\n", hwndChild); - if (*(LPINT)lParam > 1) return FALSE; - return TRUE; -} - -/* will search for the given window */ -static BOOL CALLBACK EnumChildProc1( HWND hwndChild, LPARAM lParam) -{ - trace("EnumChildProc1 on %p\n", hwndChild); - if ((HWND)lParam == hwndChild) return FALSE; - return TRUE; -} - -static HWND create_tool_window( LONG style, HWND parent ) -{ - HWND ret = CreateWindowExA(0, "ToolWindowClass", "Tool window 1", style, - 0, 0, 100, 100, parent, 0, 0, NULL ); - ok( ret != 0, "Creation failed\n" ); - return ret; -} - -/* test parent and owner values for various combinations */ -static void test_parent_owner(void) -{ - LONG style; - HWND test, owner, ret; - HWND desktop = GetDesktopWindow(); - HWND child = create_tool_window( WS_CHILD, hwndMain ); - INT numChildren; - - trace( "main window %p main2 %p desktop %p child %p\n", hwndMain, hwndMain2, desktop, child ); - - /* child without parent, should fail */ - SetLastError(0xdeadbeef); - test = CreateWindowExA(0, "ToolWindowClass", "Tool window 1", - WS_CHILD, 0, 0, 100, 100, 0, 0, 0, NULL ); - ok( !test, "WS_CHILD without parent created\n" ); - ok( GetLastError() == ERROR_TLW_WITH_WSCHILD || - broken(GetLastError() == 0xdeadbeef), /* win9x */ - "CreateWindowExA error %u\n", GetLastError() ); - - /* desktop window */ - check_parents( desktop, 0, 0, 0, 0, 0, 0 ); - style = GetWindowLongA( desktop, GWL_STYLE ); - ok( !SetWindowLongA( desktop, GWL_STYLE, WS_POPUP ), "Set GWL_STYLE on desktop succeeded\n" ); - ok( !SetWindowLongA( desktop, GWL_STYLE, 0 ), "Set GWL_STYLE on desktop succeeded\n" ); - ok( GetWindowLongA( desktop, GWL_STYLE ) == style, "Desktop style changed\n" ); - - /* normal child window */ - test = create_tool_window( WS_CHILD, hwndMain ); - trace( "created child %p\n", test ); - check_parents( test, hwndMain, hwndMain, hwndMain, 0, hwndMain, hwndMain ); - SetWindowLongA( test, GWL_STYLE, 0 ); - check_parents( test, hwndMain, hwndMain, 0, 0, hwndMain, test ); - SetWindowLongA( test, GWL_STYLE, WS_POPUP ); - check_parents( test, hwndMain, hwndMain, 0, 0, hwndMain, test ); - SetWindowLongA( test, GWL_STYLE, WS_POPUP|WS_CHILD ); - check_parents( test, hwndMain, hwndMain, 0, 0, hwndMain, test ); - SetWindowLongA( test, GWL_STYLE, WS_CHILD ); - DestroyWindow( test ); - - /* normal child window with WS_MAXIMIZE */ - test = create_tool_window( WS_CHILD | WS_MAXIMIZE, hwndMain ); - DestroyWindow( test ); - - /* normal child window with WS_THICKFRAME */ - test = create_tool_window( WS_CHILD | WS_THICKFRAME, hwndMain ); - DestroyWindow( test ); - - /* popup window with WS_THICKFRAME */ - test = create_tool_window( WS_POPUP | WS_THICKFRAME, hwndMain ); - DestroyWindow( test ); - - /* child of desktop */ - test = create_tool_window( WS_CHILD, desktop ); - trace( "created child of desktop %p\n", test ); - check_parents( test, desktop, 0, desktop, 0, test, desktop ); - SetWindowLongA( test, GWL_STYLE, WS_POPUP ); - check_parents( test, desktop, 0, 0, 0, test, test ); - SetWindowLongA( test, GWL_STYLE, 0 ); - check_parents( test, desktop, 0, 0, 0, test, test ); - DestroyWindow( test ); - - /* child of desktop with WS_MAXIMIZE */ - test = create_tool_window( WS_CHILD | WS_MAXIMIZE, desktop ); - DestroyWindow( test ); - - /* child of desktop with WS_MINIMIZE */ - test = create_tool_window( WS_CHILD | WS_MINIMIZE, desktop ); - DestroyWindow( test ); - - /* child of child */ - test = create_tool_window( WS_CHILD, child ); - trace( "created child of child %p\n", test ); - check_parents( test, child, child, child, 0, hwndMain, hwndMain ); - SetWindowLongA( test, GWL_STYLE, 0 ); - check_parents( test, child, child, 0, 0, hwndMain, test ); - SetWindowLongA( test, GWL_STYLE, WS_POPUP ); - check_parents( test, child, child, 0, 0, hwndMain, test ); - DestroyWindow( test ); - - /* child of child with WS_MAXIMIZE */ - test = create_tool_window( WS_CHILD | WS_MAXIMIZE, child ); - DestroyWindow( test ); - - /* child of child with WS_MINIMIZE */ - test = create_tool_window( WS_CHILD | WS_MINIMIZE, child ); - DestroyWindow( test ); - - /* not owned top-level window */ - test = create_tool_window( 0, 0 ); - trace( "created top-level %p\n", test ); - check_parents( test, desktop, 0, 0, 0, test, test ); - SetWindowLongA( test, GWL_STYLE, WS_POPUP ); - check_parents( test, desktop, 0, 0, 0, test, test ); - SetWindowLongA( test, GWL_STYLE, WS_CHILD ); - check_parents( test, desktop, 0, desktop, 0, test, desktop ); - DestroyWindow( test ); - - /* not owned top-level window with WS_MAXIMIZE */ - test = create_tool_window( WS_MAXIMIZE, 0 ); - DestroyWindow( test ); - - /* owned top-level window */ - test = create_tool_window( 0, hwndMain ); - trace( "created owned top-level %p\n", test ); - check_parents( test, desktop, hwndMain, 0, hwndMain, test, test ); - SetWindowLongA( test, GWL_STYLE, WS_POPUP ); - check_parents( test, desktop, hwndMain, hwndMain, hwndMain, test, hwndMain ); - SetWindowLongA( test, GWL_STYLE, WS_CHILD ); - check_parents( test, desktop, hwndMain, desktop, hwndMain, test, desktop ); - DestroyWindow( test ); - - /* owned top-level window with WS_MAXIMIZE */ - test = create_tool_window( WS_MAXIMIZE, hwndMain ); - DestroyWindow( test ); - - /* not owned popup */ - test = create_tool_window( WS_POPUP, 0 ); - trace( "created popup %p\n", test ); - check_parents( test, desktop, 0, 0, 0, test, test ); - SetWindowLongA( test, GWL_STYLE, WS_CHILD ); - check_parents( test, desktop, 0, desktop, 0, test, desktop ); - SetWindowLongA( test, GWL_STYLE, 0 ); - check_parents( test, desktop, 0, 0, 0, test, test ); - DestroyWindow( test ); - - /* not owned popup with WS_MAXIMIZE */ - test = create_tool_window( WS_POPUP | WS_MAXIMIZE, 0 ); - DestroyWindow( test ); - - /* owned popup */ - test = create_tool_window( WS_POPUP, hwndMain ); - trace( "created owned popup %p\n", test ); - check_parents( test, desktop, hwndMain, hwndMain, hwndMain, test, hwndMain ); - SetWindowLongA( test, GWL_STYLE, WS_CHILD ); - check_parents( test, desktop, hwndMain, desktop, hwndMain, test, desktop ); - SetWindowLongA( test, GWL_STYLE, 0 ); - check_parents( test, desktop, hwndMain, 0, hwndMain, test, test ); - DestroyWindow( test ); - - /* owned popup with WS_MAXIMIZE */ - test = create_tool_window( WS_POPUP | WS_MAXIMIZE, hwndMain ); - DestroyWindow( test ); - - /* top-level window owned by child (same as owned by top-level) */ - test = create_tool_window( 0, child ); - trace( "created top-level owned by child %p\n", test ); - check_parents( test, desktop, hwndMain, 0, hwndMain, test, test ); - DestroyWindow( test ); - - /* top-level window owned by child (same as owned by top-level) with WS_MAXIMIZE */ - test = create_tool_window( WS_MAXIMIZE, child ); - DestroyWindow( test ); - - /* popup owned by desktop (same as not owned) */ - test = create_tool_window( WS_POPUP, desktop ); - trace( "created popup owned by desktop %p\n", test ); - check_parents( test, desktop, 0, 0, 0, test, test ); - DestroyWindow( test ); - - /* popup owned by desktop (same as not owned) with WS_MAXIMIZE */ - test = create_tool_window( WS_POPUP | WS_MAXIMIZE, desktop ); - DestroyWindow( test ); - - /* popup owned by child (same as owned by top-level) */ - test = create_tool_window( WS_POPUP, child ); - trace( "created popup owned by child %p\n", test ); - check_parents( test, desktop, hwndMain, hwndMain, hwndMain, test, hwndMain ); - DestroyWindow( test ); - - /* popup owned by child (same as owned by top-level) with WS_MAXIMIZE */ - test = create_tool_window( WS_POPUP | WS_MAXIMIZE, child ); - DestroyWindow( test ); - - /* not owned popup with WS_CHILD (same as WS_POPUP only) */ - test = create_tool_window( WS_POPUP | WS_CHILD, 0 ); - trace( "created WS_CHILD popup %p\n", test ); - check_parents( test, desktop, 0, 0, 0, test, test ); - DestroyWindow( test ); - - /* not owned popup with WS_CHILD | WS_MAXIMIZE (same as WS_POPUP only) */ - test = create_tool_window( WS_POPUP | WS_CHILD | WS_MAXIMIZE, 0 ); - DestroyWindow( test ); - - /* owned popup with WS_CHILD (same as WS_POPUP only) */ - test = create_tool_window( WS_POPUP | WS_CHILD, hwndMain ); - trace( "created owned WS_CHILD popup %p\n", test ); - check_parents( test, desktop, hwndMain, hwndMain, hwndMain, test, hwndMain ); - DestroyWindow( test ); - - /* owned popup with WS_CHILD (same as WS_POPUP only) with WS_MAXIMIZE */ - test = create_tool_window( WS_POPUP | WS_CHILD | WS_MAXIMIZE, hwndMain ); - DestroyWindow( test ); - - /******************** parent changes *************************/ - trace( "testing parent changes\n" ); - - /* desktop window */ - check_parents( desktop, 0, 0, 0, 0, 0, 0 ); - if (0) - { - /* this test succeeds on NT but crashes on win9x systems */ - ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, (LONG_PTR)hwndMain2 ); - ok( !ret, "Set GWL_HWNDPARENT succeeded on desktop\n" ); - check_parents( desktop, 0, 0, 0, 0, 0, 0 ); - ok( !SetParent( desktop, hwndMain ), "SetParent succeeded on desktop\n" ); - check_parents( desktop, 0, 0, 0, 0, 0, 0 ); - } - /* normal child window */ - test = create_tool_window( WS_CHILD, hwndMain ); - trace( "created child %p\n", test ); - - ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, (LONG_PTR)hwndMain2 ); - ok( ret == hwndMain, "GWL_HWNDPARENT return value %p expected %p\n", ret, hwndMain ); - check_parents( test, hwndMain2, hwndMain2, hwndMain2, 0, hwndMain2, hwndMain2 ); - - ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, (LONG_PTR)child ); - ok( ret == hwndMain2, "GWL_HWNDPARENT return value %p expected %p\n", ret, hwndMain2 ); - check_parents( test, child, child, child, 0, hwndMain, hwndMain ); - - ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, (LONG_PTR)desktop ); - ok( ret == child, "GWL_HWNDPARENT return value %p expected %p\n", ret, child ); - check_parents( test, desktop, 0, desktop, 0, test, desktop ); - - /* window is now child of desktop so GWLP_HWNDPARENT changes owner from now on */ - if (!is_win9x) - { - ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, (LONG_PTR)test ); - ok( ret == 0, "GWL_HWNDPARENT return value %p expected 0\n", ret ); - check_parents( test, desktop, 0, desktop, 0, test, desktop ); - } - else - win_skip("Test creates circular window tree under Win9x/WinMe\n" ); - - ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, (LONG_PTR)child ); - ok( ret == 0, "GWL_HWNDPARENT return value %p expected 0\n", ret ); - check_parents( test, desktop, child, desktop, child, test, desktop ); - - ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, 0 ); - ok( ret == child, "GWL_HWNDPARENT return value %p expected %p\n", ret, child ); - check_parents( test, desktop, 0, desktop, 0, test, desktop ); - DestroyWindow( test ); - - /* not owned top-level window */ - test = create_tool_window( 0, 0 ); - trace( "created top-level %p\n", test ); - - ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, (LONG_PTR)hwndMain2 ); - ok( ret == 0, "GWL_HWNDPARENT return value %p expected 0\n", ret ); - check_parents( test, desktop, hwndMain2, 0, hwndMain2, test, test ); - - ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, (LONG_PTR)child ); - ok( ret == hwndMain2, "GWL_HWNDPARENT return value %p expected %p\n", ret, hwndMain2 ); - check_parents( test, desktop, child, 0, child, test, test ); - - ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, 0 ); - ok( ret == child, "GWL_HWNDPARENT return value %p expected %p\n", ret, child ); - check_parents( test, desktop, 0, 0, 0, test, test ); - DestroyWindow( test ); - - /* not owned popup */ - test = create_tool_window( WS_POPUP, 0 ); - trace( "created popup %p\n", test ); - - ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, (LONG_PTR)hwndMain2 ); - ok( ret == 0, "GWL_HWNDPARENT return value %p expected 0\n", ret ); - check_parents( test, desktop, hwndMain2, hwndMain2, hwndMain2, test, hwndMain2 ); - - ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, (LONG_PTR)child ); - ok( ret == hwndMain2, "GWL_HWNDPARENT return value %p expected %p\n", ret, hwndMain2 ); - check_parents( test, desktop, child, child, child, test, hwndMain ); - - ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, 0 ); - ok( ret == child, "GWL_HWNDPARENT return value %p expected %p\n", ret, child ); - check_parents( test, desktop, 0, 0, 0, test, test ); - DestroyWindow( test ); - - /* normal child window */ - test = create_tool_window( WS_CHILD, hwndMain ); - trace( "created child %p\n", test ); - - ret = SetParent( test, desktop ); - ok( ret == hwndMain, "SetParent return value %p expected %p\n", ret, hwndMain ); - check_parents( test, desktop, 0, desktop, 0, test, desktop ); - - ret = SetParent( test, child ); - ok( ret == desktop, "SetParent return value %p expected %p\n", ret, desktop ); - check_parents( test, child, child, child, 0, hwndMain, hwndMain ); - - ret = SetParent( test, hwndMain2 ); - ok( ret == child, "SetParent return value %p expected %p\n", ret, child ); - check_parents( test, hwndMain2, hwndMain2, hwndMain2, 0, hwndMain2, hwndMain2 ); - DestroyWindow( test ); - - /* not owned top-level window */ - test = create_tool_window( 0, 0 ); - trace( "created top-level %p\n", test ); - - ret = SetParent( test, child ); - ok( ret == desktop, "SetParent return value %p expected %p\n", ret, desktop ); - check_parents( test, child, child, 0, 0, hwndMain, test ); - - if (!is_win9x) - { - ShowWindow( test, SW_SHOW ); - ret = SetParent( test, test ); - ok( ret == NULL, "SetParent return value %p expected %p\n", ret, NULL ); - ok( GetWindowLongA( test, GWL_STYLE ) & WS_VISIBLE, "window is not visible after SetParent\n" ); - check_parents( test, child, child, 0, 0, hwndMain, test ); - } - else - win_skip( "Test crashes on Win9x/WinMe\n" ); - DestroyWindow( test ); - - /* owned popup */ - test = create_tool_window( WS_POPUP, hwndMain2 ); - trace( "created owned popup %p\n", test ); - - ret = SetParent( test, child ); - ok( ret == desktop, "SetParent return value %p expected %p\n", ret, desktop ); - check_parents( test, child, child, hwndMain2, hwndMain2, hwndMain, hwndMain2 ); - - ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, (ULONG_PTR)hwndMain ); - ok( ret == child, "GWL_HWNDPARENT return value %p expected %p\n", ret, child ); - check_parents( test, hwndMain, hwndMain, hwndMain2, hwndMain2, hwndMain, hwndMain2 ); - DestroyWindow( test ); - - /**************** test owner destruction *******************/ - - /* owned child popup */ - owner = create_tool_window( 0, 0 ); - test = create_tool_window( WS_POPUP, owner ); - trace( "created owner %p and popup %p\n", owner, test ); - ret = SetParent( test, child ); - ok( ret == desktop, "SetParent return value %p expected %p\n", ret, desktop ); - check_parents( test, child, child, owner, owner, hwndMain, owner ); - /* window is now child of 'child' but owned by 'owner' */ - DestroyWindow( owner ); - ok( IsWindow(test), "Window %p destroyed by owner destruction\n", test ); - /* Win98 doesn't pass this test. It doesn't allow a destroyed owner, - * while Win95, Win2k, WinXP do. - */ - /*check_parents( test, child, child, owner, owner, hwndMain, owner );*/ - ok( !IsWindow(owner), "Owner %p not destroyed\n", owner ); - DestroyWindow(test); - - /* owned top-level popup */ - owner = create_tool_window( 0, 0 ); - test = create_tool_window( WS_POPUP, owner ); - trace( "created owner %p and popup %p\n", owner, test ); - check_parents( test, desktop, owner, owner, owner, test, owner ); - DestroyWindow( owner ); - ok( !IsWindow(test), "Window %p not destroyed by owner destruction\n", test ); - - /* top-level popup owned by child */ - owner = create_tool_window( WS_CHILD, hwndMain2 ); - test = create_tool_window( WS_POPUP, 0 ); - trace( "created owner %p and popup %p\n", owner, test ); - ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, (ULONG_PTR)owner ); - ok( ret == 0, "GWL_HWNDPARENT return value %p expected 0\n", ret ); - check_parents( test, desktop, owner, owner, owner, test, hwndMain2 ); - DestroyWindow( owner ); - ok( IsWindow(test), "Window %p destroyed by owner destruction\n", test ); - ok( !IsWindow(owner), "Owner %p not destroyed\n", owner ); - /* Win98 doesn't pass this test. It doesn't allow a destroyed owner, - * while Win95, Win2k, WinXP do. - */ - /*check_parents( test, desktop, owner, owner, owner, test, owner );*/ - DestroyWindow(test); - - /* final cleanup */ - DestroyWindow(child); - - - owner = create_tool_window( WS_OVERLAPPED, 0 ); - test = create_tool_window( WS_POPUP, desktop ); - - ok( !GetWindow( test, GW_OWNER ), "Wrong owner window\n" ); - numChildren = 0; - ok( !EnumChildWindows( owner, EnumChildProc, (LPARAM)&numChildren ), - "EnumChildWindows should have returned FALSE\n" ); - ok( numChildren == 0, "numChildren should be 0 got %d\n", numChildren ); - - SetWindowLongA( test, GWL_STYLE, (GetWindowLongA( test, GWL_STYLE ) & ~WS_POPUP) | WS_CHILD ); - ret = SetParent( test, owner ); - ok( ret == desktop, "SetParent return value %p expected %p\n", ret, desktop ); - - numChildren = 0; - ok( EnumChildWindows( owner, EnumChildProc, (LPARAM)&numChildren ), - "EnumChildWindows should have returned TRUE\n" ); - ok( numChildren == 1, "numChildren should be 1 got %d\n", numChildren ); - - child = create_tool_window( WS_CHILD, owner ); - numChildren = 0; - ok( !EnumChildWindows( owner, EnumChildProc, (LPARAM)&numChildren ), - "EnumChildWindows should have returned FALSE\n" ); - ok( numChildren == 2, "numChildren should be 2 got %d\n", numChildren ); - DestroyWindow( child ); - - child = create_tool_window( WS_VISIBLE | WS_OVERLAPPEDWINDOW, owner ); - ok( GetWindow( child, GW_OWNER ) == owner, "Wrong owner window\n" ); - numChildren = 0; - ok( EnumChildWindows( owner, EnumChildProc, (LPARAM)&numChildren ), - "EnumChildWindows should have returned TRUE\n" ); - ok( numChildren == 1, "numChildren should be 1 got %d\n", numChildren ); - - ret = SetParent( child, owner ); - ok( GetWindow( child, GW_OWNER ) == owner, "Wrong owner window\n" ); - ok( ret == desktop, "SetParent return value %p expected %p\n", ret, desktop ); - numChildren = 0; - ok( !EnumChildWindows( owner, EnumChildProc, (LPARAM)&numChildren ), - "EnumChildWindows should have returned FALSE\n" ); - ok( numChildren == 2, "numChildren should be 2 got %d\n", numChildren ); - - ret = SetParent( child, NULL ); - ok( GetWindow( child, GW_OWNER ) == owner, "Wrong owner window\n" ); - ok( ret == owner, "SetParent return value %p expected %p\n", ret, owner ); - numChildren = 0; - ok( EnumChildWindows( owner, EnumChildProc, (LPARAM)&numChildren ), - "EnumChildWindows should have returned TRUE\n" ); - ok( numChildren == 1, "numChildren should be 1 got %d\n", numChildren ); - - /* even GW_OWNER == owner it's still a desktop's child */ - ok( !EnumChildWindows( desktop, EnumChildProc1, (LPARAM)child ), - "EnumChildWindows should have found %p and returned FALSE\n", child ); - - DestroyWindow( child ); - child = create_tool_window( WS_VISIBLE | WS_OVERLAPPEDWINDOW, NULL ); - - ok( !EnumChildWindows( desktop, EnumChildProc1, (LPARAM)child ), - "EnumChildWindows should have found %p and returned FALSE\n", child ); - - DestroyWindow( child ); - DestroyWindow( test ); - DestroyWindow( owner ); -} - -static BOOL CALLBACK enum_proc( HWND hwnd, LPARAM lParam) -{ - (*(LPINT)lParam)++; - if (*(LPINT)lParam > 2) return FALSE; - return TRUE; -} -static DWORD CALLBACK enum_thread( void *arg ) -{ - INT count; - HWND hwnd[3]; - BOOL ret; - MSG msg; - - if (pGetGUIThreadInfo) - { - GUITHREADINFO info; - info.cbSize = sizeof(info); - ret = pGetGUIThreadInfo( GetCurrentThreadId(), &info ); - ok( ret || broken(!ret), /* win9x */ - "GetGUIThreadInfo failed without message queue\n" ); - SetLastError( 0xdeadbeef ); - info.cbSize = sizeof(info) + 1; - ret = pGetGUIThreadInfo( GetCurrentThreadId(), &info ); - ok( !ret, "GetGUIThreadInfo succeeded with wrong size\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER || - broken(GetLastError() == 0xdeadbeef), /* win9x */ - "wrong error %u\n", GetLastError() ); - } - - PeekMessage( &msg, 0, 0, 0, PM_NOREMOVE ); /* make sure we have a message queue */ - - count = 0; - ret = EnumThreadWindows( GetCurrentThreadId(), enum_proc, (LPARAM)&count ); - ok( ret, "EnumThreadWindows should have returned TRUE\n" ); - ok( count == 0, "count should be 0 got %d\n", count ); - - hwnd[0] = CreateWindowExA(0, "ToolWindowClass", "Tool window 1", WS_POPUP, - 0, 0, 100, 100, 0, 0, 0, NULL ); - count = 0; - ret = EnumThreadWindows( GetCurrentThreadId(), enum_proc, (LPARAM)&count ); - ok( ret, "EnumThreadWindows should have returned TRUE\n" ); - if (count != 2) /* Vista gives us two windows for the price of one */ - { - ok( count == 1, "count should be 1 got %d\n", count ); - hwnd[2] = CreateWindowExA(0, "ToolWindowClass", "Tool window 2", WS_POPUP, - 0, 0, 100, 100, 0, 0, 0, NULL ); - } - else hwnd[2] = 0; - - hwnd[1] = CreateWindowExA(0, "ToolWindowClass", "Tool window 3", WS_POPUP, - 0, 0, 100, 100, 0, 0, 0, NULL ); - count = 0; - ret = EnumThreadWindows( GetCurrentThreadId(), enum_proc, (LPARAM)&count ); - ok( !ret, "EnumThreadWindows should have returned FALSE\n" ); - ok( count == 3, "count should be 3 got %d\n", count ); - - if (hwnd[2]) DestroyWindow(hwnd[2]); - DestroyWindow(hwnd[1]); - DestroyWindow(hwnd[0]); - return 0; -} - -/* test EnumThreadWindows in a separate thread */ -static void test_enum_thread_windows(void) -{ - DWORD id; - HANDLE handle = CreateThread( NULL, 0, enum_thread, 0, 0, &id ); - ok( !WaitForSingleObject( handle, 10000 ), "wait failed\n" ); - CloseHandle( handle ); -} - -static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - switch (msg) - { - case WM_GETMINMAXINFO: - { - MINMAXINFO* minmax = (MINMAXINFO *)lparam; - - trace("WM_GETMINMAXINFO: hwnd %p, %08lx, %08lx\n", hwnd, wparam, lparam); - dump_minmax_info( minmax ); - SetWindowLongPtrA(hwnd, GWLP_USERDATA, 0x20031021); - break; - } - case WM_WINDOWPOSCHANGING: - { - WINDOWPOS *winpos = (WINDOWPOS *)lparam; - trace("main: WM_WINDOWPOSCHANGING %p after %p, x %d, y %d, cx %d, cy %d flags %08x\n", - winpos->hwnd, winpos->hwndInsertAfter, - winpos->x, winpos->y, winpos->cx, winpos->cy, winpos->flags); - if (!(winpos->flags & SWP_NOMOVE)) - { - ok(winpos->x >= -32768 && winpos->x <= 32767, "bad winpos->x %d\n", winpos->x); - ok(winpos->y >= -32768 && winpos->y <= 32767, "bad winpos->y %d\n", winpos->y); - } - /* Win9x does not fixup cx/xy for WM_WINDOWPOSCHANGING */ - if (!(winpos->flags & SWP_NOSIZE) && !is_win9x) - { - ok((winpos->cx >= 0 && winpos->cx <= 32767) || - winpos->cx == 32768, /* win7 doesn't truncate */ - "bad winpos->cx %d\n", winpos->cx); - ok((winpos->cy >= 0 && winpos->cy <= 32767) || - winpos->cy == 40000, /* win7 doesn't truncate */ - "bad winpos->cy %d\n", winpos->cy); - } - break; - } - case WM_WINDOWPOSCHANGED: - { - RECT rc1, rc2; - WINDOWPOS *winpos = (WINDOWPOS *)lparam; - trace("main: WM_WINDOWPOSCHANGED %p after %p, x %d, y %d, cx %d, cy %d flags %08x\n", - winpos->hwnd, winpos->hwndInsertAfter, - winpos->x, winpos->y, winpos->cx, winpos->cy, winpos->flags); - ok(winpos->x >= -32768 && winpos->x <= 32767, "bad winpos->x %d\n", winpos->x); - ok(winpos->y >= -32768 && winpos->y <= 32767, "bad winpos->y %d\n", winpos->y); - - ok((winpos->cx >= 0 && winpos->cx <= 32767) || - winpos->cx == 32768, /* win7 doesn't truncate */ - "bad winpos->cx %d\n", winpos->cx); - ok((winpos->cy >= 0 && winpos->cy <= 32767) || - winpos->cy == 40000, /* win7 doesn't truncate */ - "bad winpos->cy %d\n", winpos->cy); - - GetWindowRect(hwnd, &rc1); - SetRect(&rc2, winpos->x, winpos->y, winpos->x + winpos->cx, winpos->y + winpos->cy); - /* note: winpos coordinates are relative to parent */ - MapWindowPoints(GetParent(hwnd), 0, (LPPOINT)&rc2, 2); - if (0) - { - /* Uncomment this once the test succeeds in all cases */ - ok(EqualRect(&rc1, &rc2), "rects do not match (%d,%d-%d,%d) / (%d,%d-%d,%d)\n", - rc1.left, rc1.top, rc1.right, rc1.bottom, rc2.left, rc2.top, rc2.right, rc2.bottom ); - - GetClientRect(hwnd, &rc2); - DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc1); - MapWindowPoints(0, hwnd, (LPPOINT)&rc1, 2); - ok(EqualRect(&rc1, &rc2), "rects do not match (%d,%d-%d,%d) / (%d,%d-%d,%d)\n", - rc1.left, rc1.top, rc1.right, rc1.bottom, rc2.left, rc2.top, rc2.right, rc2.bottom ); - } - break; - } - case WM_NCCREATE: - { - BOOL got_getminmaxinfo = GetWindowLongPtrA(hwnd, GWLP_USERDATA) == 0x20031021; - CREATESTRUCTA *cs = (CREATESTRUCTA *)lparam; - - trace("WM_NCCREATE: hwnd %p, parent %p, style %08x\n", hwnd, cs->hwndParent, cs->style); - if (got_getminmaxinfo) - trace("%p got WM_GETMINMAXINFO\n", hwnd); - - if ((cs->style & WS_THICKFRAME) || !(cs->style & (WS_POPUP | WS_CHILD))) - ok(got_getminmaxinfo, "main: WM_GETMINMAXINFO should have been received before WM_NCCREATE\n"); - else - ok(!got_getminmaxinfo, "main: WM_GETMINMAXINFO should NOT have been received before WM_NCCREATE\n"); - break; - } - case WM_COMMAND: - if (test_lbuttondown_flag) - { - ShowWindow((HWND)wparam, SW_SHOW); - flush_events( FALSE ); - } - break; - } - - return DefWindowProcA(hwnd, msg, wparam, lparam); -} - -static LRESULT WINAPI tool_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - switch (msg) - { - case WM_GETMINMAXINFO: - { - MINMAXINFO* minmax = (MINMAXINFO *)lparam; - - trace("hwnd %p, WM_GETMINMAXINFO, %08lx, %08lx\n", hwnd, wparam, lparam); - dump_minmax_info( minmax ); - SetWindowLongPtrA(hwnd, GWLP_USERDATA, 0x20031021); - break; - } - case WM_NCCREATE: - { - BOOL got_getminmaxinfo = GetWindowLongPtrA(hwnd, GWLP_USERDATA) == 0x20031021; - CREATESTRUCTA *cs = (CREATESTRUCTA *)lparam; - - trace("WM_NCCREATE: hwnd %p, parent %p, style %08x\n", hwnd, cs->hwndParent, cs->style); - if (got_getminmaxinfo) - trace("%p got WM_GETMINMAXINFO\n", hwnd); - - if ((cs->style & WS_THICKFRAME) || !(cs->style & (WS_POPUP | WS_CHILD))) - ok(got_getminmaxinfo, "tool: WM_GETMINMAXINFO should have been received before WM_NCCREATE\n"); - else - ok(!got_getminmaxinfo, "tool: WM_GETMINMAXINFO should NOT have been received before WM_NCCREATE\n"); - break; - } - } - - return DefWindowProcA(hwnd, msg, wparam, lparam); -} - -static BOOL RegisterWindowClasses(void) -{ - WNDCLASSA cls; - - cls.style = CS_DBLCLKS; - cls.lpfnWndProc = main_window_procA; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(0); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "MainWindowClass"; - - if(!RegisterClassA(&cls)) return FALSE; - - cls.style = 0; - cls.lpfnWndProc = tool_window_procA; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(0); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "ToolWindowClass"; - - if(!RegisterClassA(&cls)) return FALSE; - - return TRUE; -} - -static void verify_window_info(const char *hook, HWND hwnd, const WINDOWINFO *info) -{ - RECT rcWindow, rcClient; - DWORD status; - - ok(IsWindow(hwnd), "bad window handle %p in hook %s\n", hwnd, hook); - - GetWindowRect(hwnd, &rcWindow); - ok(EqualRect(&rcWindow, &info->rcWindow), "wrong rcWindow for %p in hook %s\n", hwnd, hook); - - GetClientRect(hwnd, &rcClient); - /* translate to screen coordinates */ - MapWindowPoints(hwnd, 0, (LPPOINT)&rcClient, 2); - ok(EqualRect(&rcClient, &info->rcClient), "wrong rcClient for %p in hook %s\n", hwnd, hook); - - ok(info->dwStyle == (DWORD)GetWindowLongA(hwnd, GWL_STYLE), - "wrong dwStyle: %08x != %08x for %p in hook %s\n", - info->dwStyle, GetWindowLongA(hwnd, GWL_STYLE), hwnd, hook); - /* Windows reports some undocumented exstyles in WINDOWINFO, but - * doesn't return them in GetWindowLong(hwnd, GWL_EXSTYLE). - */ - ok((info->dwExStyle & ~0xe0000800) == (DWORD)GetWindowLongA(hwnd, GWL_EXSTYLE), - "wrong dwExStyle: %08x != %08x for %p in hook %s\n", - info->dwExStyle, GetWindowLongA(hwnd, GWL_EXSTYLE), hwnd, hook); - status = (GetActiveWindow() == hwnd) ? WS_ACTIVECAPTION : 0; - if (GetForegroundWindow()) - ok(info->dwWindowStatus == status, "wrong dwWindowStatus: %04x != %04x active %p fg %p in hook %s\n", - info->dwWindowStatus, status, GetActiveWindow(), GetForegroundWindow(), hook); - - /* win2k and XP return broken border info in GetWindowInfo most of - * the time, so there is no point in testing it. - */ -#if 0 - UINT border; - ok(info->cxWindowBorders == (unsigned)(rcClient.left - rcWindow.left), - "wrong cxWindowBorders %d != %d\n", info->cxWindowBorders, rcClient.left - rcWindow.left); - border = min(rcWindow.bottom - rcClient.bottom, rcClient.top - rcWindow.top); - ok(info->cyWindowBorders == border, - "wrong cyWindowBorders %d != %d\n", info->cyWindowBorders, border); -#endif - ok(info->atomWindowType == GetClassLongA(hwnd, GCW_ATOM), "wrong atomWindowType for %p in hook %s\n", - hwnd, hook); - ok(info->wCreatorVersion == 0x0400 /* NT4, Win2000, XP, Win2003 */ || - info->wCreatorVersion == 0x0500 /* Vista */, - "wrong wCreatorVersion %04x for %p in hook %s\n", info->wCreatorVersion, hwnd, hook); -} - -static void FixedAdjustWindowRectEx(RECT* rc, LONG style, BOOL menu, LONG exstyle) -{ - AdjustWindowRectEx(rc, style, menu, exstyle); - /* AdjustWindowRectEx does not include scroll bars */ - if (style & WS_VSCROLL) - { - if(exstyle & WS_EX_LEFTSCROLLBAR) - rc->left -= GetSystemMetrics(SM_CXVSCROLL); - else - rc->right += GetSystemMetrics(SM_CXVSCROLL); - } - if (style & WS_HSCROLL) - rc->bottom += GetSystemMetrics(SM_CYHSCROLL); -} - -static void test_nonclient_area(HWND hwnd) -{ - DWORD style, exstyle; - RECT rc_window, rc_client, rc; - BOOL menu; - LRESULT ret; - - style = GetWindowLongA(hwnd, GWL_STYLE); - exstyle = GetWindowLongA(hwnd, GWL_EXSTYLE); - menu = !(style & WS_CHILD) && GetMenu(hwnd) != 0; - - GetWindowRect(hwnd, &rc_window); - GetClientRect(hwnd, &rc_client); - - /* avoid some cases when things go wrong */ - if (IsRectEmpty(&rc_window) || IsRectEmpty(&rc_client) || - rc_window.right > 32768 || rc_window.bottom > 32768) return; - - CopyRect(&rc, &rc_client); - MapWindowPoints(hwnd, 0, (LPPOINT)&rc, 2); - FixedAdjustWindowRectEx(&rc, style, menu, exstyle); - - ok(EqualRect(&rc, &rc_window), - "window rect does not match: style:exstyle=0x%08x:0x%08x, menu=%d, win=(%d,%d)-(%d,%d), calc=(%d,%d)-(%d,%d)\n", - style, exstyle, menu, rc_window.left, rc_window.top, rc_window.right, rc_window.bottom, - rc.left, rc.top, rc.right, rc.bottom); - - - CopyRect(&rc, &rc_window); - DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc); - MapWindowPoints(0, hwnd, (LPPOINT)&rc, 2); - ok(EqualRect(&rc, &rc_client), - "client rect does not match: style:exstyle=0x%08x:0x%08x, menu=%d client=(%d,%d)-(%d,%d), calc=(%d,%d)-(%d,%d)\n", - style, exstyle, menu, rc_client.left, rc_client.top, rc_client.right, rc_client.bottom, - rc.left, rc.top, rc.right, rc.bottom); - - /* NULL rectangle shouldn't crash */ - ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, 0); - ok(ret == 0, "NULL rectangle returned %ld instead of 0\n", ret); - - /* Win9x doesn't like WM_NCCALCSIZE with synthetic data and crashes */; - if (is_win9x) - return; - - /* and now test AdjustWindowRectEx and WM_NCCALCSIZE on synthetic data */ - SetRect(&rc_client, 0, 0, 250, 150); - CopyRect(&rc_window, &rc_client); - MapWindowPoints(hwnd, 0, (LPPOINT)&rc_window, 2); - FixedAdjustWindowRectEx(&rc_window, style, menu, exstyle); - - CopyRect(&rc, &rc_window); - DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc); - MapWindowPoints(0, hwnd, (LPPOINT)&rc, 2); - ok(EqualRect(&rc, &rc_client), - "synthetic rect does not match: style:exstyle=0x%08x:0x%08x, menu=%d, client=(%d,%d)-(%d,%d), calc=(%d,%d)-(%d,%d)\n", - style, exstyle, menu, rc_client.left, rc_client.top, rc_client.right, rc_client.bottom, - rc.left, rc.top, rc.right, rc.bottom); -} - -static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam) -{ - static const char *CBT_code_name[10] = { - "HCBT_MOVESIZE", - "HCBT_MINMAX", - "HCBT_QS", - "HCBT_CREATEWND", - "HCBT_DESTROYWND", - "HCBT_ACTIVATE", - "HCBT_CLICKSKIPPED", - "HCBT_KEYSKIPPED", - "HCBT_SYSCOMMAND", - "HCBT_SETFOCUS" }; - const char *code_name = (nCode >= 0 && nCode <= HCBT_SETFOCUS) ? CBT_code_name[nCode] : "Unknown"; - HWND hwnd = (HWND)wParam; - - switch (nCode) - { - case HCBT_CREATEWND: - { - static const RECT rc_null; - RECT rc; - LONG style; - CBT_CREATEWNDA *createwnd = (CBT_CREATEWNDA *)lParam; - ok(createwnd->hwndInsertAfter == HWND_TOP, "hwndInsertAfter should be always HWND_TOP\n"); - - if (pGetWindowInfo) - { - WINDOWINFO info; - info.cbSize = sizeof(WINDOWINFO); - ok(pGetWindowInfo(hwnd, &info), "GetWindowInfo should not fail\n"); - verify_window_info(code_name, hwnd, &info); - } - - /* WS_VISIBLE should be turned off yet */ - style = createwnd->lpcs->style & ~WS_VISIBLE; - ok(style == GetWindowLongA(hwnd, GWL_STYLE), - "style of hwnd and style in the CREATESTRUCT do not match: %08x != %08x\n", - GetWindowLongA(hwnd, GWL_STYLE), style); - - if (0) - { - /* Uncomment this once the test succeeds in all cases */ - if ((style & (WS_CHILD|WS_POPUP)) == WS_CHILD) - { - ok(GetParent(hwnd) == hwndMessage, - "wrong result from GetParent %p: message window %p\n", - GetParent(hwnd), hwndMessage); - } - else - ok(!GetParent(hwnd), "GetParent should return 0 at this point\n"); - - ok(!GetWindow(hwnd, GW_OWNER), "GW_OWNER should be set to 0 at this point\n"); - } - if (0) - { - /* while NT assigns GW_HWNDFIRST/LAST some values at this point, - * Win9x still has them set to 0. - */ - ok(GetWindow(hwnd, GW_HWNDFIRST) != 0, "GW_HWNDFIRST should not be set to 0 at this point\n"); - ok(GetWindow(hwnd, GW_HWNDLAST) != 0, "GW_HWNDLAST should not be set to 0 at this point\n"); - } - ok(!GetWindow(hwnd, GW_HWNDPREV), "GW_HWNDPREV should be set to 0 at this point\n"); - ok(!GetWindow(hwnd, GW_HWNDNEXT), "GW_HWNDNEXT should be set to 0 at this point\n"); - - if (0) - { - /* Uncomment this once the test succeeds in all cases */ - if (pGetAncestor) - { - ok(pGetAncestor(hwnd, GA_PARENT) == hwndMessage, "GA_PARENT should be set to hwndMessage at this point\n"); - ok(pGetAncestor(hwnd, GA_ROOT) == hwnd, - "GA_ROOT is set to %p, expected %p\n", pGetAncestor(hwnd, GA_ROOT), hwnd); - - if ((style & (WS_CHILD|WS_POPUP)) == WS_CHILD) - ok(pGetAncestor(hwnd, GA_ROOTOWNER) == hwndMessage, - "GA_ROOTOWNER should be set to hwndMessage at this point\n"); - else - ok(pGetAncestor(hwnd, GA_ROOTOWNER) == hwnd, - "GA_ROOTOWNER is set to %p, expected %p\n", pGetAncestor(hwnd, GA_ROOTOWNER), hwnd); - } - - ok(GetWindowRect(hwnd, &rc), "GetWindowRect failed\n"); - ok(EqualRect(&rc, &rc_null), "window rect should be set to 0 HCBT_CREATEWND\n"); - ok(GetClientRect(hwnd, &rc), "GetClientRect failed\n"); - ok(EqualRect(&rc, &rc_null), "client rect should be set to 0 on HCBT_CREATEWND\n"); - } - break; - } - case HCBT_MOVESIZE: - case HCBT_MINMAX: - case HCBT_ACTIVATE: - if (pGetWindowInfo && IsWindow(hwnd)) - { - WINDOWINFO info; - - /* Win98 actually does check the info.cbSize and doesn't allow - * it to be anything except sizeof(WINDOWINFO), while Win95, Win2k, - * WinXP do not check it at all. - */ - info.cbSize = sizeof(WINDOWINFO); - ok(pGetWindowInfo(hwnd, &info), "GetWindowInfo should not fail\n"); - verify_window_info(code_name, hwnd, &info); - } - break; - /* window state is undefined */ - case HCBT_SETFOCUS: - case HCBT_DESTROYWND: - break; - default: - break; - } - - return CallNextHookEx(hhook, nCode, wParam, lParam); -} - -static void test_shell_window(void) -{ - BOOL ret; - DWORD error; - HMODULE hinst, hUser32; - BOOL (WINAPI*SetShellWindow)(HWND); - HWND hwnd1, hwnd2, hwnd3, hwnd4, hwnd5; - HWND shellWindow, nextWnd; - - if (is_win9x) - { - win_skip("Skipping shell window test on Win9x\n"); - return; - } - - shellWindow = GetShellWindow(); - hinst = GetModuleHandle(0); - hUser32 = GetModuleHandleA("user32"); - - SetShellWindow = (void *)GetProcAddress(hUser32, "SetShellWindow"); - - trace("previous shell window: %p\n", shellWindow); - - if (shellWindow) { - DWORD pid; - HANDLE hProcess; - - GetWindowThreadProcessId(shellWindow, &pid); - hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid); - if (!hProcess) - { - skip( "cannot get access to shell process\n" ); - return; - } - - SetLastError(0xdeadbeef); - ret = DestroyWindow(shellWindow); - error = GetLastError(); - - ok(!ret, "DestroyWindow(shellWindow)\n"); - /* passes on Win XP, but not on Win98 */ - ok(error==ERROR_ACCESS_DENIED || error == 0xdeadbeef, - "got %u after DestroyWindow(shellWindow)\n", error); - - /* close old shell instance */ - ret = TerminateProcess(hProcess, 0); - ok(ret, "termination of previous shell process failed: GetLastError()=%d\n", GetLastError()); - WaitForSingleObject(hProcess, INFINITE); /* wait for termination */ - CloseHandle(hProcess); - } - - hwnd1 = CreateWindowEx(0, TEXT("#32770"), TEXT("TEST1"), WS_OVERLAPPEDWINDOW/*|WS_VISIBLE*/, 100, 100, 300, 200, 0, 0, hinst, 0); - trace("created window 1: %p\n", hwnd1); - - ret = SetShellWindow(hwnd1); - ok(ret, "first call to SetShellWindow(hwnd1)\n"); - shellWindow = GetShellWindow(); - ok(shellWindow==hwnd1, "wrong shell window: %p\n", shellWindow); - - ret = SetShellWindow(hwnd1); - ok(!ret, "second call to SetShellWindow(hwnd1)\n"); - - ret = SetShellWindow(0); - error = GetLastError(); - /* passes on Win XP, but not on Win98 - ok(!ret, "reset shell window by SetShellWindow(0)\n"); - ok(error==ERROR_INVALID_WINDOW_HANDLE, "ERROR_INVALID_WINDOW_HANDLE after SetShellWindow(0)\n"); */ - - ret = SetShellWindow(hwnd1); - /* passes on Win XP, but not on Win98 - ok(!ret, "third call to SetShellWindow(hwnd1)\n"); */ - - SetWindowLong(hwnd1, GWL_EXSTYLE, GetWindowLong(hwnd1,GWL_EXSTYLE)|WS_EX_TOPMOST); - ret = GetWindowLong(hwnd1,GWL_EXSTYLE)&WS_EX_TOPMOST? TRUE: FALSE; - ok(!ret, "SetWindowExStyle(hwnd1, WS_EX_TOPMOST)\n"); - - ret = DestroyWindow(hwnd1); - ok(ret, "DestroyWindow(hwnd1)\n"); - - hwnd2 = CreateWindowEx(WS_EX_TOPMOST, TEXT("#32770"), TEXT("TEST2"), WS_OVERLAPPEDWINDOW/*|WS_VISIBLE*/, 150, 250, 300, 200, 0, 0, hinst, 0); - trace("created window 2: %p\n", hwnd2); - ret = SetShellWindow(hwnd2); - ok(!ret, "SetShellWindow(hwnd2) with WS_EX_TOPMOST\n"); - - hwnd3 = CreateWindowEx(0, TEXT("#32770"), TEXT("TEST3"), WS_OVERLAPPEDWINDOW/*|WS_VISIBLE*/, 200, 400, 300, 200, 0, 0, hinst, 0); - trace("created window 3: %p\n", hwnd3); - - hwnd4 = CreateWindowEx(0, TEXT("#32770"), TEXT("TEST4"), WS_OVERLAPPEDWINDOW/*|WS_VISIBLE*/, 250, 500, 300, 200, 0, 0, hinst, 0); - trace("created window 4: %p\n", hwnd4); - - nextWnd = GetWindow(hwnd4, GW_HWNDNEXT); - ok(nextWnd==hwnd3, "wrong next window for hwnd4: %p - expected hwnd3\n", nextWnd); - - ret = SetShellWindow(hwnd4); - ok(ret, "SetShellWindow(hwnd4)\n"); - shellWindow = GetShellWindow(); - ok(shellWindow==hwnd4, "wrong shell window: %p - expected hwnd4\n", shellWindow); - - nextWnd = GetWindow(hwnd4, GW_HWNDNEXT); - ok(nextWnd==0, "wrong next window for hwnd4: %p - expected 0\n", nextWnd); - - ret = SetWindowPos(hwnd4, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE); - ok(ret, "SetWindowPos(hwnd4, HWND_TOPMOST)\n"); - - ret = SetWindowPos(hwnd4, hwnd3, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE); - ok(ret, "SetWindowPos(hwnd4, hwnd3\n"); - - ret = SetShellWindow(hwnd3); - ok(!ret, "SetShellWindow(hwnd3)\n"); - shellWindow = GetShellWindow(); - ok(shellWindow==hwnd4, "wrong shell window: %p - expected hwnd4\n", shellWindow); - - hwnd5 = CreateWindowEx(0, TEXT("#32770"), TEXT("TEST5"), WS_OVERLAPPEDWINDOW/*|WS_VISIBLE*/, 300, 600, 300, 200, 0, 0, hinst, 0); - trace("created window 5: %p\n", hwnd5); - ret = SetWindowPos(hwnd4, hwnd5, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE); - ok(ret, "SetWindowPos(hwnd4, hwnd5)\n"); - - todo_wine - { - nextWnd = GetWindow(hwnd4, GW_HWNDNEXT); - ok(nextWnd==0, "wrong next window for hwnd4 after SetWindowPos(): %p - expected 0\n", nextWnd); - } - - /* destroy test windows */ - DestroyWindow(hwnd2); - DestroyWindow(hwnd3); - DestroyWindow(hwnd4); - DestroyWindow(hwnd5); -} - -/************** MDI test ****************/ - -static char mdi_lParam_test_message[] = "just a test string"; - -static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id) -{ - MDICREATESTRUCTA mdi_cs; - HWND mdi_child; - INT_PTR id; - static const WCHAR classW[] = {'M','D','I','_','c','h','i','l','d','_','C','l','a','s','s','_','1',0}; - static const WCHAR titleW[] = {'M','D','I',' ','c','h','i','l','d',0}; - BOOL isWin9x = FALSE; - - mdi_cs.szClass = "MDI_child_Class_1"; - mdi_cs.szTitle = "MDI child"; - mdi_cs.hOwner = GetModuleHandle(0); - mdi_cs.x = CW_USEDEFAULT; - mdi_cs.y = CW_USEDEFAULT; - mdi_cs.cx = CW_USEDEFAULT; - mdi_cs.cy = CW_USEDEFAULT; - mdi_cs.style = 0; - mdi_cs.lParam = (LPARAM)mdi_lParam_test_message; - mdi_child = (HWND)SendMessageA(mdi_client, WM_MDICREATE, 0, (LPARAM)&mdi_cs); - ok(mdi_child != 0, "MDI child creation failed\n"); - id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == first_id, "wrong child id %ld\n", id); - SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); - ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n"); - - mdi_cs.style = 0x7fffffff; /* without WS_POPUP */ - mdi_child = (HWND)SendMessageA(mdi_client, WM_MDICREATE, 0, (LPARAM)&mdi_cs); - ok(mdi_child != 0, "MDI child creation failed\n"); - id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == first_id, "wrong child id %ld\n", id); - SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); - ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n"); - - mdi_cs.style = 0xffffffff; /* with WS_POPUP */ - mdi_child = (HWND)SendMessageA(mdi_client, WM_MDICREATE, 0, (LPARAM)&mdi_cs); - if (GetWindowLongA(mdi_client, GWL_STYLE) & MDIS_ALLCHILDSTYLES) - { - ok(!mdi_child, "MDI child with WS_POPUP and with MDIS_ALLCHILDSTYLES should fail\n"); - } - else - { - ok(mdi_child != 0, "MDI child creation failed\n"); - id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == first_id, "wrong child id %ld\n", id); - SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); - ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n"); - } - - /* test MDICREATESTRUCT A<->W mapping */ - /* MDICREATESTRUCTA and MDICREATESTRUCTW have the same layout */ - mdi_cs.style = 0; - mdi_cs.szClass = (LPCSTR)classW; - mdi_cs.szTitle = (LPCSTR)titleW; - SetLastError(0xdeadbeef); - mdi_child = (HWND)SendMessageW(mdi_client, WM_MDICREATE, 0, (LPARAM)&mdi_cs); - if (!mdi_child) - { - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - isWin9x = TRUE; - else - ok(mdi_child != 0, "MDI child creation failed\n"); - } - else - { - id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == first_id, "wrong child id %ld\n", id); - SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); - ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n"); - } - - mdi_child = CreateMDIWindowA("MDI_child_Class_1", "MDI child", - 0, - CW_USEDEFAULT, CW_USEDEFAULT, - CW_USEDEFAULT, CW_USEDEFAULT, - mdi_client, GetModuleHandle(0), - (LPARAM)mdi_lParam_test_message); - ok(mdi_child != 0, "MDI child creation failed\n"); - id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == first_id, "wrong child id %ld\n", id); - SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); - ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n"); - - mdi_child = CreateMDIWindowA("MDI_child_Class_1", "MDI child", - 0x7fffffff, /* without WS_POPUP */ - CW_USEDEFAULT, CW_USEDEFAULT, - CW_USEDEFAULT, CW_USEDEFAULT, - mdi_client, GetModuleHandle(0), - (LPARAM)mdi_lParam_test_message); - ok(mdi_child != 0, "MDI child creation failed\n"); - id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == first_id, "wrong child id %ld\n", id); - SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); - ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n"); - - mdi_child = CreateMDIWindowA("MDI_child_Class_1", "MDI child", - 0xffffffff, /* with WS_POPUP */ - CW_USEDEFAULT, CW_USEDEFAULT, - CW_USEDEFAULT, CW_USEDEFAULT, - mdi_client, GetModuleHandle(0), - (LPARAM)mdi_lParam_test_message); - if (GetWindowLongA(mdi_client, GWL_STYLE) & MDIS_ALLCHILDSTYLES) - { - ok(!mdi_child, "MDI child with WS_POPUP and with MDIS_ALLCHILDSTYLES should fail\n"); - } - else - { - ok(mdi_child != 0, "MDI child creation failed\n"); - id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == first_id, "wrong child id %ld\n", id); - SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); - ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n"); - } - - /* test MDICREATESTRUCT A<->W mapping */ - SetLastError(0xdeadbeef); - mdi_child = CreateMDIWindowW(classW, titleW, - 0, - CW_USEDEFAULT, CW_USEDEFAULT, - CW_USEDEFAULT, CW_USEDEFAULT, - mdi_client, GetModuleHandle(0), - (LPARAM)mdi_lParam_test_message); - if (!mdi_child) - { - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - isWin9x = TRUE; - else - ok(mdi_child != 0, "MDI child creation failed\n"); - } - else - { - id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == first_id, "wrong child id %ld\n", id); - SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); - ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n"); - } - - mdi_child = CreateWindowExA(WS_EX_MDICHILD, "MDI_child_Class_1", "MDI child", - 0, - CW_USEDEFAULT, CW_USEDEFAULT, - CW_USEDEFAULT, CW_USEDEFAULT, - mdi_client, 0, GetModuleHandle(0), - mdi_lParam_test_message); - ok(mdi_child != 0, "MDI child creation failed\n"); - id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == first_id, "wrong child id %ld\n", id); - SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); - ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n"); - - mdi_child = CreateWindowExA(WS_EX_MDICHILD, "MDI_child_Class_1", "MDI child", - 0x7fffffff, /* without WS_POPUP */ - CW_USEDEFAULT, CW_USEDEFAULT, - CW_USEDEFAULT, CW_USEDEFAULT, - mdi_client, 0, GetModuleHandle(0), - mdi_lParam_test_message); - ok(mdi_child != 0, "MDI child creation failed\n"); - id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == first_id, "wrong child id %ld\n", id); - SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); - ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n"); - - mdi_child = CreateWindowExA(WS_EX_MDICHILD, "MDI_child_Class_1", "MDI child", - 0xffffffff, /* with WS_POPUP */ - CW_USEDEFAULT, CW_USEDEFAULT, - CW_USEDEFAULT, CW_USEDEFAULT, - mdi_client, 0, GetModuleHandle(0), - mdi_lParam_test_message); - if (GetWindowLongA(mdi_client, GWL_STYLE) & MDIS_ALLCHILDSTYLES) - { - ok(!mdi_child, "MDI child with WS_POPUP and with MDIS_ALLCHILDSTYLES should fail\n"); - } - else - { - ok(mdi_child != 0, "MDI child creation failed\n"); - id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == first_id, "wrong child id %ld\n", id); - SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); - ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n"); - } - - /* test MDICREATESTRUCT A<->W mapping */ - SetLastError(0xdeadbeef); - mdi_child = CreateWindowExW(WS_EX_MDICHILD, classW, titleW, - 0, - CW_USEDEFAULT, CW_USEDEFAULT, - CW_USEDEFAULT, CW_USEDEFAULT, - mdi_client, 0, GetModuleHandle(0), - mdi_lParam_test_message); - if (!mdi_child) - { - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - isWin9x = TRUE; - else - ok(mdi_child != 0, "MDI child creation failed\n"); - } - else - { - id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == first_id, "wrong child id %ld\n", id); - SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); - ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n"); - } - - /* This test fails on Win9x */ - if (!isWin9x) - { - mdi_child = CreateWindowExA(WS_EX_MDICHILD, "MDI_child_Class_2", "MDI child", - WS_CHILD, - CW_USEDEFAULT, CW_USEDEFAULT, - CW_USEDEFAULT, CW_USEDEFAULT, - parent, 0, GetModuleHandle(0), - mdi_lParam_test_message); - ok(!mdi_child, "WS_EX_MDICHILD with a not MDIClient parent should fail\n"); - } - - mdi_child = CreateWindowExA(0, "MDI_child_Class_2", "MDI child", - WS_CHILD, /* without WS_POPUP */ - CW_USEDEFAULT, CW_USEDEFAULT, - CW_USEDEFAULT, CW_USEDEFAULT, - mdi_client, 0, GetModuleHandle(0), - mdi_lParam_test_message); - ok(mdi_child != 0, "MDI child creation failed\n"); - id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == 0, "wrong child id %ld\n", id); - DestroyWindow(mdi_child); - - mdi_child = CreateWindowExA(0, "MDI_child_Class_2", "MDI child", - WS_CHILD | WS_POPUP, /* with WS_POPUP */ - CW_USEDEFAULT, CW_USEDEFAULT, - CW_USEDEFAULT, CW_USEDEFAULT, - mdi_client, 0, GetModuleHandle(0), - mdi_lParam_test_message); - ok(mdi_child != 0, "MDI child creation failed\n"); - id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == 0, "wrong child id %ld\n", id); - DestroyWindow(mdi_child); - - /* maximized child */ - mdi_child = CreateWindowExA(0, "MDI_child_Class_2", "MDI child", - WS_CHILD | WS_MAXIMIZE, - CW_USEDEFAULT, CW_USEDEFAULT, - CW_USEDEFAULT, CW_USEDEFAULT, - mdi_client, 0, GetModuleHandle(0), - mdi_lParam_test_message); - ok(mdi_child != 0, "MDI child creation failed\n"); - id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == 0, "wrong child id %ld\n", id); - DestroyWindow(mdi_child); - - trace("Creating maximized child with a caption\n"); - mdi_child = CreateWindowExA(0, "MDI_child_Class_2", "MDI child", - WS_CHILD | WS_MAXIMIZE | WS_CAPTION, - CW_USEDEFAULT, CW_USEDEFAULT, - CW_USEDEFAULT, CW_USEDEFAULT, - mdi_client, 0, GetModuleHandle(0), - mdi_lParam_test_message); - ok(mdi_child != 0, "MDI child creation failed\n"); - id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == 0, "wrong child id %ld\n", id); - DestroyWindow(mdi_child); - - trace("Creating maximized child with a caption and a thick frame\n"); - mdi_child = CreateWindowExA(0, "MDI_child_Class_2", "MDI child", - WS_CHILD | WS_MAXIMIZE | WS_CAPTION | WS_THICKFRAME, - CW_USEDEFAULT, CW_USEDEFAULT, - CW_USEDEFAULT, CW_USEDEFAULT, - mdi_client, 0, GetModuleHandle(0), - mdi_lParam_test_message); - ok(mdi_child != 0, "MDI child creation failed\n"); - id = GetWindowLongPtrA(mdi_child, GWLP_ID); - ok(id == 0, "wrong child id %ld\n", id); - DestroyWindow(mdi_child); -} - -/********************************************************************** - * MDI_ChildGetMinMaxInfo (copied from windows/mdi.c) - * - * Note: The rule here is that client rect of the maximized MDI child - * is equal to the client rect of the MDI client window. - */ -static void MDI_ChildGetMinMaxInfo( HWND client, HWND hwnd, MINMAXINFO* lpMinMax ) -{ - RECT rect; - - GetClientRect( client, &rect ); - AdjustWindowRectEx( &rect, GetWindowLongA( hwnd, GWL_STYLE ), - 0, GetWindowLongA( hwnd, GWL_EXSTYLE )); - - rect.right -= rect.left; - rect.bottom -= rect.top; - lpMinMax->ptMaxSize.x = rect.right; - lpMinMax->ptMaxSize.y = rect.bottom; - - lpMinMax->ptMaxPosition.x = rect.left; - lpMinMax->ptMaxPosition.y = rect.top; - - trace("max rect (%d,%d - %d, %d)\n", - rect.left, rect.top, rect.right, rect.bottom); -} - -static LRESULT WINAPI mdi_child_wnd_proc_1(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - switch (msg) - { - case WM_NCCREATE: - case WM_CREATE: - { - CREATESTRUCTA *cs = (CREATESTRUCTA *)lparam; - MDICREATESTRUCTA *mdi_cs = cs->lpCreateParams; - - ok(cs->dwExStyle & WS_EX_MDICHILD, "WS_EX_MDICHILD should be set\n"); - ok(mdi_cs->lParam == (LPARAM)mdi_lParam_test_message, "wrong mdi_cs->lParam\n"); - - ok(!lstrcmpA(cs->lpszClass, "MDI_child_Class_1"), "wrong class name\n"); - ok(!lstrcmpA(cs->lpszClass, mdi_cs->szClass), "class name does not match\n"); - ok(!lstrcmpA(cs->lpszName, "MDI child"), "wrong title\n"); - ok(!lstrcmpA(cs->lpszName, mdi_cs->szTitle), "title does not match\n"); - ok(cs->hInstance == mdi_cs->hOwner, "%p != %p\n", cs->hInstance, mdi_cs->hOwner); - - /* MDICREATESTRUCT should have original values */ - ok(mdi_cs->style == 0 || mdi_cs->style == 0x7fffffff || mdi_cs->style == 0xffffffff, - "mdi_cs->style does not match (%08x)\n", mdi_cs->style); - ok(mdi_cs->x == CW_USEDEFAULT, "%d != CW_USEDEFAULT\n", mdi_cs->x); - ok(mdi_cs->y == CW_USEDEFAULT, "%d != CW_USEDEFAULT\n", mdi_cs->y); - ok(mdi_cs->cx == CW_USEDEFAULT, "%d != CW_USEDEFAULT\n", mdi_cs->cx); - ok(mdi_cs->cy == CW_USEDEFAULT, "%d != CW_USEDEFAULT\n", mdi_cs->cy); - - /* CREATESTRUCT should have fixed values */ - ok(cs->x != CW_USEDEFAULT, "%d == CW_USEDEFAULT\n", cs->x); - ok(cs->y != CW_USEDEFAULT, "%d == CW_USEDEFAULT\n", cs->y); - - /* cx/cy == CW_USEDEFAULT are translated to NOT zero values */ - ok(cs->cx != CW_USEDEFAULT && cs->cx != 0, "%d == CW_USEDEFAULT\n", cs->cx); - ok(cs->cy != CW_USEDEFAULT && cs->cy != 0, "%d == CW_USEDEFAULT\n", cs->cy); - - ok(!(cs->style & WS_POPUP), "WS_POPUP is not allowed\n"); - - if (GetWindowLongA(cs->hwndParent, GWL_STYLE) & MDIS_ALLCHILDSTYLES) - { - LONG style = mdi_cs->style | WS_CHILD | WS_CLIPSIBLINGS; - ok(cs->style == style, - "cs->style does not match (%08x)\n", cs->style); - } - else - { - LONG style = mdi_cs->style; - style &= ~WS_POPUP; - style |= WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CAPTION | - WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX; - ok(cs->style == style, - "cs->style does not match (%08x)\n", cs->style); - } - break; - } - - case WM_GETMINMAXINFO: - { - HWND client = GetParent(hwnd); - RECT rc; - MINMAXINFO *minmax = (MINMAXINFO *)lparam; - MINMAXINFO my_minmax; - LONG style, exstyle; - - style = GetWindowLongA(hwnd, GWL_STYLE); - exstyle = GetWindowLongA(hwnd, GWL_EXSTYLE); - - GetWindowRect(client, &rc); - trace("MDI client %p window size = (%d x %d)\n", client, rc.right-rc.left, rc.bottom-rc.top); - GetClientRect(client, &rc); - trace("MDI client %p client size = (%d x %d)\n", client, rc.right, rc.bottom); - trace("screen size: %d x %d\n", GetSystemMetrics(SM_CXSCREEN), - GetSystemMetrics(SM_CYSCREEN)); - - GetClientRect(client, &rc); - if ((style & WS_CAPTION) == WS_CAPTION) - style &= ~WS_BORDER; /* WS_CAPTION = WS_DLGFRAME | WS_BORDER */ - AdjustWindowRectEx(&rc, style, 0, exstyle); - trace("MDI child: calculated max window size = (%d x %d)\n", rc.right-rc.left, rc.bottom-rc.top); - dump_minmax_info( minmax ); - - ok(minmax->ptMaxSize.x == rc.right - rc.left, "default width of maximized child %d != %d\n", - minmax->ptMaxSize.x, rc.right - rc.left); - ok(minmax->ptMaxSize.y == rc.bottom - rc.top, "default height of maximized child %d != %d\n", - minmax->ptMaxSize.y, rc.bottom - rc.top); - - DefMDIChildProcA(hwnd, msg, wparam, lparam); - - trace("DefMDIChildProc returned:\n"); - dump_minmax_info( minmax ); - - MDI_ChildGetMinMaxInfo(client, hwnd, &my_minmax); - ok(minmax->ptMaxSize.x == my_minmax.ptMaxSize.x, "default width of maximized child %d != %d\n", - minmax->ptMaxSize.x, my_minmax.ptMaxSize.x); - ok(minmax->ptMaxSize.y == my_minmax.ptMaxSize.y, "default height of maximized child %d != %d\n", - minmax->ptMaxSize.y, my_minmax.ptMaxSize.y); - - return 1; - } - - case WM_MDIACTIVATE: - { - HWND active, client = GetParent(hwnd); - /*trace("%p WM_MDIACTIVATE %08x %08lx\n", hwnd, wparam, lparam);*/ - active = (HWND)SendMessageA(client, WM_MDIGETACTIVE, 0, 0); - if (hwnd == (HWND)lparam) /* if we are being activated */ - ok (active == (HWND)lparam, "new active %p != active %p\n", (HWND)lparam, active); - else - ok (active == (HWND)wparam, "old active %p != active %p\n", (HWND)wparam, active); - break; - } - } - return DefMDIChildProcA(hwnd, msg, wparam, lparam); -} - -static LRESULT WINAPI mdi_child_wnd_proc_2(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - switch (msg) - { - case WM_NCCREATE: - case WM_CREATE: - { - CREATESTRUCTA *cs = (CREATESTRUCTA *)lparam; - - trace("%s: x %d, y %d, cx %d, cy %d\n", (msg == WM_NCCREATE) ? "WM_NCCREATE" : "WM_CREATE", - cs->x, cs->y, cs->cx, cs->cy); - - ok(!(cs->dwExStyle & WS_EX_MDICHILD), "WS_EX_MDICHILD should not be set\n"); - ok(cs->lpCreateParams == mdi_lParam_test_message, "wrong cs->lpCreateParams\n"); - - ok(!lstrcmpA(cs->lpszClass, "MDI_child_Class_2"), "wrong class name\n"); - ok(!lstrcmpA(cs->lpszName, "MDI child"), "wrong title\n"); - - /* CREATESTRUCT should have fixed values */ - /* For some reason Win9x doesn't translate cs->x from CW_USEDEFAULT, - while NT does. */ - /*ok(cs->x != CW_USEDEFAULT, "%d == CW_USEDEFAULT\n", cs->x);*/ - ok(cs->y != CW_USEDEFAULT, "%d == CW_USEDEFAULT\n", cs->y); - - /* cx/cy == CW_USEDEFAULT are translated to 0 */ - /* For some reason Win98 doesn't translate cs->cx from CW_USEDEFAULT, - while Win95, Win2k, WinXP do. */ - /*ok(cs->cx == 0, "%d != 0\n", cs->cx);*/ - ok(cs->cy == 0, "%d != 0\n", cs->cy); - break; - } - - case WM_GETMINMAXINFO: - { - HWND parent = GetParent(hwnd); - RECT rc; - MINMAXINFO *minmax = (MINMAXINFO *)lparam; - LONG style, exstyle; - - style = GetWindowLongA(hwnd, GWL_STYLE); - exstyle = GetWindowLongA(hwnd, GWL_EXSTYLE); - - GetClientRect(parent, &rc); - trace("WM_GETMINMAXINFO: parent %p client size = (%d x %d)\n", parent, rc.right, rc.bottom); - - GetClientRect(parent, &rc); - if ((style & WS_CAPTION) == WS_CAPTION) - style &= ~WS_BORDER; /* WS_CAPTION = WS_DLGFRAME | WS_BORDER */ - AdjustWindowRectEx(&rc, style, 0, exstyle); - dump_minmax_info( minmax ); - - ok(minmax->ptMaxSize.x == rc.right - rc.left, "default width of maximized child %d != %d\n", - minmax->ptMaxSize.x, rc.right - rc.left); - ok(minmax->ptMaxSize.y == rc.bottom - rc.top, "default height of maximized child %d != %d\n", - minmax->ptMaxSize.y, rc.bottom - rc.top); - break; - } - - case WM_WINDOWPOSCHANGED: - { - WINDOWPOS *winpos = (WINDOWPOS *)lparam; - RECT rc1, rc2; - - GetWindowRect(hwnd, &rc1); - SetRect(&rc2, winpos->x, winpos->y, winpos->x + winpos->cx, winpos->y + winpos->cy); - /* note: winpos coordinates are relative to parent */ - MapWindowPoints(GetParent(hwnd), 0, (LPPOINT)&rc2, 2); - ok(EqualRect(&rc1, &rc2), "rects do not match, window=(%d,%d)-(%d,%d) pos=(%d,%d)-(%d,%d)\n", - rc1.left, rc1.top, rc1.right, rc1.bottom, - rc2.left, rc2.top, rc2.right, rc2.bottom); - GetWindowRect(hwnd, &rc1); - GetClientRect(hwnd, &rc2); - DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc1); - MapWindowPoints(0, hwnd, (LPPOINT)&rc1, 2); - ok(EqualRect(&rc1, &rc2), "rects do not match, window=(%d,%d)-(%d,%d) client=(%d,%d)-(%d,%d)\n", - rc1.left, rc1.top, rc1.right, rc1.bottom, - rc2.left, rc2.top, rc2.right, rc2.bottom); - } - /* fall through */ - case WM_WINDOWPOSCHANGING: - { - WINDOWPOS *winpos = (WINDOWPOS *)lparam; - WINDOWPOS my_winpos = *winpos; - - trace("%s: %p after %p, x %d, y %d, cx %d, cy %d flags %08x\n", - (msg == WM_WINDOWPOSCHANGING) ? "WM_WINDOWPOSCHANGING" : "WM_WINDOWPOSCHANGED", - winpos->hwnd, winpos->hwndInsertAfter, - winpos->x, winpos->y, winpos->cx, winpos->cy, winpos->flags); - - DefWindowProcA(hwnd, msg, wparam, lparam); - - ok(!memcmp(&my_winpos, winpos, sizeof(WINDOWPOS)), - "DefWindowProc should not change WINDOWPOS: %p after %p, x %d, y %d, cx %d, cy %d flags %08x\n", - winpos->hwnd, winpos->hwndInsertAfter, - winpos->x, winpos->y, winpos->cx, winpos->cy, winpos->flags); - - return 1; - } - } - return DefWindowProcA(hwnd, msg, wparam, lparam); -} - -static LRESULT WINAPI mdi_main_wnd_procA(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - static HWND mdi_client; - - switch (msg) - { - case WM_CREATE: - { - CLIENTCREATESTRUCT client_cs; - RECT rc; - - GetClientRect(hwnd, &rc); - - client_cs.hWindowMenu = 0; - client_cs.idFirstChild = 1; - - /* MDIClient without MDIS_ALLCHILDSTYLES */ - mdi_client = CreateWindowExA(0, "mdiclient", - NULL, - WS_CHILD /*| WS_VISIBLE*/, - /* tests depend on a not zero MDIClient size */ - 0, 0, rc.right, rc.bottom, - hwnd, 0, GetModuleHandle(0), - &client_cs); - assert(mdi_client); - test_MDI_create(hwnd, mdi_client, client_cs.idFirstChild); - DestroyWindow(mdi_client); - - /* MDIClient with MDIS_ALLCHILDSTYLES */ - mdi_client = CreateWindowExA(0, "mdiclient", - NULL, - WS_CHILD | MDIS_ALLCHILDSTYLES /*| WS_VISIBLE*/, - /* tests depend on a not zero MDIClient size */ - 0, 0, rc.right, rc.bottom, - hwnd, 0, GetModuleHandle(0), - &client_cs); - assert(mdi_client); - test_MDI_create(hwnd, mdi_client, client_cs.idFirstChild); - DestroyWindow(mdi_client); - break; - } - - case WM_WINDOWPOSCHANGED: - { - WINDOWPOS *winpos = (WINDOWPOS *)lparam; - RECT rc1, rc2; - - GetWindowRect(hwnd, &rc1); - trace("window: (%d,%d)-(%d,%d)\n", rc1.left, rc1.top, rc1.right, rc1.bottom); - SetRect(&rc2, winpos->x, winpos->y, winpos->x + winpos->cx, winpos->y + winpos->cy); - /* note: winpos coordinates are relative to parent */ - MapWindowPoints(GetParent(hwnd), 0, (LPPOINT)&rc2, 2); - trace("pos: (%d,%d)-(%d,%d)\n", rc2.left, rc2.top, rc2.right, rc2.bottom); - ok(EqualRect(&rc1, &rc2), "rects do not match\n"); - - GetWindowRect(hwnd, &rc1); - GetClientRect(hwnd, &rc2); - DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc1); - MapWindowPoints(0, hwnd, (LPPOINT)&rc1, 2); - ok(EqualRect(&rc1, &rc2), "rects do not match\n"); - } - /* fall through */ - case WM_WINDOWPOSCHANGING: - { - WINDOWPOS *winpos = (WINDOWPOS *)lparam; - WINDOWPOS my_winpos = *winpos; - - trace("%s\n", (msg == WM_WINDOWPOSCHANGING) ? "WM_WINDOWPOSCHANGING" : "WM_WINDOWPOSCHANGED"); - trace("%p after %p, x %d, y %d, cx %d, cy %d flags %08x\n", - winpos->hwnd, winpos->hwndInsertAfter, - winpos->x, winpos->y, winpos->cx, winpos->cy, winpos->flags); - - DefWindowProcA(hwnd, msg, wparam, lparam); - - trace("%p after %p, x %d, y %d, cx %d, cy %d flags %08x\n", - winpos->hwnd, winpos->hwndInsertAfter, - winpos->x, winpos->y, winpos->cx, winpos->cy, winpos->flags); - - ok(!memcmp(&my_winpos, winpos, sizeof(WINDOWPOS)), - "DefWindowProc should not change WINDOWPOS values\n"); - - return 1; - } - - case WM_CLOSE: - PostQuitMessage(0); - break; - } - return DefFrameProcA(hwnd, mdi_client, msg, wparam, lparam); -} - -static BOOL mdi_RegisterWindowClasses(void) -{ - WNDCLASSA cls; - - cls.style = 0; - cls.lpfnWndProc = mdi_main_wnd_procA; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(0); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "MDI_parent_Class"; - if(!RegisterClassA(&cls)) return FALSE; - - cls.lpfnWndProc = mdi_child_wnd_proc_1; - cls.lpszClassName = "MDI_child_Class_1"; - if(!RegisterClassA(&cls)) return FALSE; - - cls.lpfnWndProc = mdi_child_wnd_proc_2; - cls.lpszClassName = "MDI_child_Class_2"; - if(!RegisterClassA(&cls)) return FALSE; - - return TRUE; -} - -static void test_mdi(void) -{ - HWND mdi_hwndMain; - /*MSG msg;*/ - - if (!mdi_RegisterWindowClasses()) assert(0); - - mdi_hwndMain = CreateWindowExA(0, "MDI_parent_Class", "MDI parent window", - WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | - WS_MAXIMIZEBOX /*| WS_VISIBLE*/, - 100, 100, CW_USEDEFAULT, CW_USEDEFAULT, - GetDesktopWindow(), 0, - GetModuleHandle(0), NULL); - assert(mdi_hwndMain); -/* - while(GetMessage(&msg, 0, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } -*/ - DestroyWindow(mdi_hwndMain); -} - -static void test_icons(void) -{ - WNDCLASSEXA cls; - HWND hwnd; - HICON icon = LoadIconA(0, IDI_APPLICATION); - HICON icon2 = LoadIconA(0, IDI_QUESTION); - HICON small_icon = LoadImageA(0, IDI_APPLICATION, IMAGE_ICON, - GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED ); - HICON res; - - cls.cbSize = sizeof(cls); - cls.style = 0; - cls.lpfnWndProc = DefWindowProcA; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = 0; - cls.hIcon = LoadIconA(0, IDI_HAND); - cls.hIconSm = small_icon; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "IconWindowClass"; - - RegisterClassExA(&cls); - - hwnd = CreateWindowExA(0, "IconWindowClass", "icon test", 0, - 100, 100, CW_USEDEFAULT, CW_USEDEFAULT, 0, 0, NULL, NULL); - assert( hwnd ); - - res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_BIG, 0 ); - ok( res == 0, "wrong big icon %p/0\n", res ); - res = (HICON)SendMessageA( hwnd, WM_SETICON, ICON_BIG, (LPARAM)icon ); - ok( res == 0, "wrong previous big icon %p/0\n", res ); - res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_BIG, 0 ); - ok( res == icon, "wrong big icon after set %p/%p\n", res, icon ); - res = (HICON)SendMessageA( hwnd, WM_SETICON, ICON_BIG, (LPARAM)icon2 ); - ok( res == icon, "wrong previous big icon %p/%p\n", res, icon ); - res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_BIG, 0 ); - ok( res == icon2, "wrong big icon after set %p/%p\n", res, icon2 ); - - res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_SMALL, 0 ); - ok( res == 0, "wrong small icon %p/0\n", res ); - /* this test is XP specific */ - /*res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_SMALL2, 0 ); - ok( res != 0, "wrong small icon %p\n", res );*/ - res = (HICON)SendMessageA( hwnd, WM_SETICON, ICON_SMALL, (LPARAM)icon ); - ok( res == 0, "wrong previous small icon %p/0\n", res ); - res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_SMALL, 0 ); - ok( res == icon, "wrong small icon after set %p/%p\n", res, icon ); - /* this test is XP specific */ - /*res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_SMALL2, 0 ); - ok( res == icon, "wrong small icon after set %p/%p\n", res, icon );*/ - res = (HICON)SendMessageA( hwnd, WM_SETICON, ICON_SMALL, (LPARAM)small_icon ); - ok( res == icon, "wrong previous small icon %p/%p\n", res, icon ); - res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_SMALL, 0 ); - ok( res == small_icon, "wrong small icon after set %p/%p\n", res, small_icon ); - /* this test is XP specific */ - /*res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_SMALL2, 0 ); - ok( res == small_icon, "wrong small icon after set %p/%p\n", res, small_icon );*/ - - /* make sure the big icon hasn't changed */ - res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_BIG, 0 ); - ok( res == icon2, "wrong big icon after set %p/%p\n", res, icon2 ); - - DestroyWindow( hwnd ); -} - -static LRESULT WINAPI nccalcsize_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - if (msg == WM_NCCALCSIZE) - { - RECT *rect = (RECT *)lparam; - /* first time around increase the rectangle, next time decrease it */ - if (rect->left == 100) InflateRect( rect, 10, 10 ); - else InflateRect( rect, -10, -10 ); - return 0; - } - return DefWindowProc( hwnd, msg, wparam, lparam ); -} - -static void test_SetWindowPos(HWND hwnd, HWND hwnd2) -{ - RECT orig_win_rc, rect; - LONG_PTR old_proc; - HWND hwnd_grandchild, hwnd_child, hwnd_child2; - HWND hwnd_desktop; - RECT rc1, rc2; - BOOL ret; - - SetRect(&rect, 111, 222, 333, 444); - ok(!GetWindowRect(0, &rect), "GetWindowRect succeeded\n"); - ok(rect.left == 111 && rect.top == 222 && rect.right == 333 && rect.bottom == 444, - "wrong window rect %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - - SetRect(&rect, 111, 222, 333, 444); - ok(!GetClientRect(0, &rect), "GetClientRect succeeded\n"); - ok(rect.left == 111 && rect.top == 222 && rect.right == 333 && rect.bottom == 444, - "wrong window rect %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - - GetWindowRect(hwnd, &orig_win_rc); - - old_proc = SetWindowLongPtr( hwnd, GWLP_WNDPROC, (ULONG_PTR)nccalcsize_proc ); - ret = SetWindowPos(hwnd, 0, 100, 100, 0, 0, SWP_NOZORDER|SWP_FRAMECHANGED); - ok(ret, "Got %d\n", ret); - GetWindowRect( hwnd, &rect ); - ok( rect.left == 100 && rect.top == 100 && rect.right == 100 && rect.bottom == 100, - "invalid window rect %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - GetClientRect( hwnd, &rect ); - MapWindowPoints( hwnd, 0, (POINT *)&rect, 2 ); - ok( rect.left == 90 && rect.top == 90 && rect.right == 110 && rect.bottom == 110, - "invalid client rect %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - - ret = SetWindowPos(hwnd, 0, 200, 200, 0, 0, SWP_NOZORDER|SWP_FRAMECHANGED); - ok(ret, "Got %d\n", ret); - GetWindowRect( hwnd, &rect ); - ok( rect.left == 200 && rect.top == 200 && rect.right == 200 && rect.bottom == 200, - "invalid window rect %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - GetClientRect( hwnd, &rect ); - MapWindowPoints( hwnd, 0, (POINT *)&rect, 2 ); - ok( rect.left == 210 && rect.top == 210 && rect.right == 190 && rect.bottom == 190, - "invalid client rect %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - - ret = SetWindowPos(hwnd, 0, orig_win_rc.left, orig_win_rc.top, - orig_win_rc.right, orig_win_rc.bottom, 0); - ok(ret, "Got %d\n", ret); - SetWindowLongPtr( hwnd, GWLP_WNDPROC, old_proc ); - - /* Win9x truncates coordinates to 16-bit irrespectively */ - if (!is_win9x) - { - ret = SetWindowPos(hwnd, 0, -32769, -40000, -32769, -90000, SWP_NOMOVE); - ok(ret, "Got %d\n", ret); - ret = SetWindowPos(hwnd, 0, 32768, 40000, 32768, 40000, SWP_NOMOVE); - ok(ret, "Got %d\n", ret); - - ret = SetWindowPos(hwnd, 0, -32769, -40000, -32769, -90000, SWP_NOSIZE); - ok(ret, "Got %d\n", ret); - ret = SetWindowPos(hwnd, 0, 32768, 40000, 32768, 40000, SWP_NOSIZE); - ok(ret, "Got %d\n", ret); - } - - ret = SetWindowPos(hwnd, 0, orig_win_rc.left, orig_win_rc.top, - orig_win_rc.right, orig_win_rc.bottom, 0); - ok(ret, "Got %d\n", ret); - - ok(!(GetWindowLong(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST), "WS_EX_TOPMOST should not be set\n"); - ret = SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE); - ok(ret, "Got %d\n", ret); - ok(GetWindowLong(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST, "WS_EX_TOPMOST should be set\n"); - ret = SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE); - ok(ret, "Got %d\n", ret); - ok(GetWindowLong(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST, "WS_EX_TOPMOST should be set\n"); - ret = SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE); - ok(ret, "Got %d\n", ret); - ok(!(GetWindowLong(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST), "WS_EX_TOPMOST should not be set\n"); - - hwnd_desktop = GetDesktopWindow(); - ok(!!hwnd_desktop, "Failed to get hwnd_desktop window (%d).\n", GetLastError()); - hwnd_child = create_tool_window(WS_VISIBLE|WS_CHILD, hwnd); - ok(!!hwnd_child, "Failed to create child window (%d)\n", GetLastError()); - hwnd_grandchild = create_tool_window(WS_VISIBLE|WS_CHILD, hwnd_child); - ok(!!hwnd_child, "Failed to create child window (%d)\n", GetLastError()); - hwnd_child2 = create_tool_window(WS_VISIBLE|WS_CHILD, hwnd); - ok(!!hwnd_child2, "Failed to create second child window (%d)\n", GetLastError()); - - ret = SetWindowPos(hwnd, hwnd2, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); - ok(ret, "Got %d\n", ret); - check_active_state(hwnd, hwnd, hwnd); - - ret = SetWindowPos(hwnd2, hwnd, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); - ok(ret, "Got %d\n", ret); - check_active_state(hwnd2, hwnd2, hwnd2); - - /* Returns TRUE also for windows that are not siblings */ - ret = SetWindowPos(hwnd_child, hwnd2, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); - ok(ret, "Got %d\n", ret); - check_active_state(hwnd2, hwnd2, hwnd2); - - ret = SetWindowPos(hwnd2, hwnd_child, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); - ok(ret, "Got %d\n", ret); - check_active_state(hwnd2, hwnd2, hwnd2); - - /* Does not seem to do anything even without passing flags, still returns TRUE */ - GetWindowRect(hwnd_child, &rc1); - ret = SetWindowPos(hwnd_child, hwnd2 , 1, 2, 3, 4, 0); - ok(ret, "Got %d\n", ret); - GetWindowRect(hwnd_child, &rc2); - ok(rc1.left == rc2.left && rc1.top == rc2.top && - rc1.right == rc2.right && rc1.bottom == rc2.bottom, - "(%d, %d, %d, %d) != (%d, %d, %d, %d)\n", - rc1.left, rc1.top, rc1.right, rc1.bottom, rc2.left, rc2.top, rc2.right, rc2.bottom); - check_active_state(hwnd2, hwnd2, hwnd2); - - /* Same thing the other way around. */ - GetWindowRect(hwnd2, &rc1); - ret = SetWindowPos(hwnd2, hwnd_child, 1, 2, 3, 4, 0); - ok(ret, "Got %d\n", ret); - GetWindowRect(hwnd2, &rc2); - ok(rc1.left == rc2.left && rc1.top == rc2.top && - rc1.right == rc2.right && rc1.bottom == rc2.bottom, - "(%d, %d, %d, %d) != (%d, %d, %d, %d)\n", - rc1.left, rc1.top, rc1.right, rc1.bottom, rc2.left, rc2.top, rc2.right, rc2.bottom); - check_active_state(hwnd2, hwnd2, hwnd2); - - /* .. and with these windows. */ - GetWindowRect(hwnd_grandchild, &rc1); - ret = SetWindowPos(hwnd_grandchild, hwnd_child2, 1, 2, 3, 4, 0); - ok(ret, "Got %d\n", ret); - GetWindowRect(hwnd_grandchild, &rc2); - ok(rc1.left == rc2.left && rc1.top == rc2.top && - rc1.right == rc2.right && rc1.bottom == rc2.bottom, - "(%d, %d, %d, %d) != (%d, %d, %d, %d)\n", - rc1.left, rc1.top, rc1.right, rc1.bottom, rc2.left, rc2.top, rc2.right, rc2.bottom); - check_active_state(hwnd2, hwnd2, hwnd2); - - /* Add SWP_NOZORDER and it will be properly resized. */ - GetWindowRect(hwnd_grandchild, &rc1); - ret = SetWindowPos(hwnd_grandchild, hwnd_child2, 1, 2, 3, 4, SWP_NOZORDER); - ok(ret, "Got %d\n", ret); - GetWindowRect(hwnd_grandchild, &rc2); - ok((rc1.left+1) == rc2.left && (rc1.top+2) == rc2.top && - (rc1.left+4) == rc2.right && (rc1.top+6) == rc2.bottom, - "(%d, %d, %d, %d) != (%d, %d, %d, %d)\n", - rc1.left+1, rc1.top+2, rc1.left+4, rc1.top+6, rc2.left, rc2.top, rc2.right, rc2.bottom); - check_active_state(hwnd2, hwnd2, hwnd2); - - /* Given a sibling window, the window is properly resized. */ - GetWindowRect(hwnd_child, &rc1); - ret = SetWindowPos(hwnd_child, hwnd_child2, 1, 2, 3, 4, 0); - ok(ret, "Got %d\n", ret); - GetWindowRect(hwnd_child, &rc2); - ok((rc1.left+1) == rc2.left && (rc1.top+2) == rc2.top && - (rc1.left+4) == rc2.right && (rc1.top+6) == rc2.bottom, - "(%d, %d, %d, %d) != (%d, %d, %d, %d)\n", - rc1.left+1, rc1.top+2, rc1.left+4, rc1.top+6, rc2.left, rc2.top, rc2.right, rc2.bottom); - check_active_state(hwnd2, hwnd2, hwnd2); - - /* Involving the desktop window changes things. */ - ret = SetWindowPos(hwnd_child, hwnd_desktop, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); - ok(!ret, "Got %d\n", ret); - check_active_state(hwnd2, hwnd2, hwnd2); - - GetWindowRect(hwnd_child, &rc1); - ret = SetWindowPos(hwnd_child, hwnd_desktop, 0, 0, 0, 0, 0); - ok(!ret, "Got %d\n", ret); - GetWindowRect(hwnd_child, &rc2); - ok(rc1.top == rc2.top && rc1.left == rc2.left && - rc1.bottom == rc2.bottom && rc1.right == rc2.right, - "(%d, %d, %d, %d) != (%d, %d, %d, %d)\n", - rc1.top, rc1.left, rc1.bottom, rc1.right, rc2.top, rc2.left, rc2.bottom, rc2.right); - check_active_state(hwnd2, hwnd2, hwnd2); - - ret = SetWindowPos(hwnd_desktop, hwnd_child, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); - ok(!ret, "Got %d\n", ret); - check_active_state(hwnd2, hwnd2, hwnd2); - - ret = SetWindowPos(hwnd_desktop, hwnd, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); - ok(!ret, "Got %d\n", ret); - check_active_state(hwnd2, hwnd2, hwnd2); - - ret = SetWindowPos(hwnd, hwnd_desktop, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); - ok(!ret, "Got %d\n", ret); - check_active_state(hwnd2, hwnd2, hwnd2); - - DestroyWindow(hwnd_grandchild); - DestroyWindow(hwnd_child); - DestroyWindow(hwnd_child2); -} - -static void test_SetMenu(HWND parent) -{ - HWND child; - HMENU hMenu, ret; - BOOL retok; - DWORD style; - - hMenu = CreateMenu(); - assert(hMenu); - - ok(SetMenu(parent, hMenu), "SetMenu on a top level window should not fail\n"); - if (0) - { - /* fails on (at least) Wine, NT4, XP SP2 */ - test_nonclient_area(parent); - } - ret = GetMenu(parent); - ok(ret == hMenu, "unexpected menu id %p\n", ret); - /* test whether we can destroy a menu assigned to a window */ - retok = DestroyMenu(hMenu); - ok( retok, "DestroyMenu error %d\n", GetLastError()); - retok = IsMenu(hMenu); - ok(!retok || broken(retok) /* nt4 */, "menu handle should be not valid after DestroyMenu\n"); - ret = GetMenu(parent); - /* This test fails on Win9x */ - if (!is_win9x) - ok(ret == hMenu, "unexpected menu id %p\n", ret); - ok(SetMenu(parent, 0), "SetMenu(0) on a top level window should not fail\n"); - test_nonclient_area(parent); - - hMenu = CreateMenu(); - assert(hMenu); - - /* parent */ - ret = GetMenu(parent); - ok(ret == 0, "unexpected menu id %p\n", ret); - - ok(!SetMenu(parent, (HMENU)20), "SetMenu with invalid menu handle should fail\n"); - test_nonclient_area(parent); - ret = GetMenu(parent); - ok(ret == 0, "unexpected menu id %p\n", ret); - - ok(SetMenu(parent, hMenu), "SetMenu on a top level window should not fail\n"); - if (0) - { - /* fails on (at least) Wine, NT4, XP SP2 */ - test_nonclient_area(parent); - } - ret = GetMenu(parent); - ok(ret == hMenu, "unexpected menu id %p\n", ret); - - ok(SetMenu(parent, 0), "SetMenu(0) on a top level window should not fail\n"); - test_nonclient_area(parent); - ret = GetMenu(parent); - ok(ret == 0, "unexpected menu id %p\n", ret); - - /* child */ - child = CreateWindowExA(0, "static", NULL, WS_CHILD, 0, 0, 0, 0, parent, (HMENU)10, 0, NULL); - assert(child); - - ret = GetMenu(child); - ok(ret == (HMENU)10, "unexpected menu id %p\n", ret); - - ok(!SetMenu(child, (HMENU)20), "SetMenu with invalid menu handle should fail\n"); - test_nonclient_area(child); - ret = GetMenu(child); - ok(ret == (HMENU)10, "unexpected menu id %p\n", ret); - - ok(!SetMenu(child, hMenu), "SetMenu on a child window should fail\n"); - test_nonclient_area(child); - ret = GetMenu(child); - ok(ret == (HMENU)10, "unexpected menu id %p\n", ret); - - ok(!SetMenu(child, 0), "SetMenu(0) on a child window should fail\n"); - test_nonclient_area(child); - ret = GetMenu(child); - ok(ret == (HMENU)10, "unexpected menu id %p\n", ret); - - style = GetWindowLong(child, GWL_STYLE); - SetWindowLong(child, GWL_STYLE, style | WS_POPUP); - ok(SetMenu(child, hMenu), "SetMenu on a popup child window should not fail\n"); - ok(SetMenu(child, 0), "SetMenu on a popup child window should not fail\n"); - SetWindowLong(child, GWL_STYLE, style); - - SetWindowLong(child, GWL_STYLE, style | WS_OVERLAPPED); - ok(!SetMenu(child, hMenu), "SetMenu on a overlapped child window should fail\n"); - SetWindowLong(child, GWL_STYLE, style); - - DestroyWindow(child); - DestroyMenu(hMenu); -} - -static void test_window_tree(HWND parent, const DWORD *style, const int *order, int total) -{ - HWND child[5], hwnd; - INT_PTR i; - - assert(total <= 5); - - hwnd = GetWindow(parent, GW_CHILD); - ok(!hwnd, "have to start without children to perform the test\n"); - - for (i = 0; i < total; i++) - { - if (style[i] & DS_CONTROL) - { - child[i] = CreateWindowExA(0, MAKEINTATOM(32770), "", style[i] & ~WS_VISIBLE, - 0,0,0,0, parent, (HMENU)i, 0, NULL); - if (style[i] & WS_VISIBLE) - ShowWindow(child[i], SW_SHOW); - - SetWindowPos(child[i], HWND_BOTTOM, 0,0,10,10, SWP_NOACTIVATE); - } - else - child[i] = CreateWindowExA(0, "static", "", style[i], 0,0,10,10, - parent, (HMENU)i, 0, NULL); - trace("child[%ld] = %p\n", i, child[i]); - ok(child[i] != 0, "CreateWindowEx failed to create child window\n"); - } - - hwnd = GetWindow(parent, GW_CHILD); - ok(hwnd != 0, "GetWindow(GW_CHILD) failed\n"); - ok(hwnd == GetWindow(child[total - 1], GW_HWNDFIRST), "GW_HWNDFIRST is wrong\n"); - ok(child[order[total - 1]] == GetWindow(child[0], GW_HWNDLAST), "GW_HWNDLAST is wrong\n"); - - for (i = 0; i < total; i++) - { - trace("hwnd[%ld] = %p\n", i, hwnd); - ok(child[order[i]] == hwnd, "Z order of child #%ld is wrong\n", i); - - hwnd = GetWindow(hwnd, GW_HWNDNEXT); - } - - for (i = 0; i < total; i++) - ok(DestroyWindow(child[i]), "DestroyWindow failed\n"); -} - -static void test_children_zorder(HWND parent) -{ - const DWORD simple_style[5] = { WS_CHILD, WS_CHILD, WS_CHILD, WS_CHILD, - WS_CHILD }; - const int simple_order[5] = { 0, 1, 2, 3, 4 }; - - const DWORD complex_style[5] = { WS_CHILD, WS_CHILD | WS_MAXIMIZE, - WS_CHILD | WS_VISIBLE, WS_CHILD, - WS_CHILD | WS_MAXIMIZE | WS_VISIBLE }; - const int complex_order_1[1] = { 0 }; - const int complex_order_2[2] = { 1, 0 }; - const int complex_order_3[3] = { 1, 0, 2 }; - const int complex_order_4[4] = { 1, 0, 2, 3 }; - const int complex_order_5[5] = { 4, 1, 0, 2, 3 }; - const DWORD complex_style_6[3] = { WS_CHILD | WS_VISIBLE, - WS_CHILD | WS_CLIPSIBLINGS | DS_CONTROL | WS_VISIBLE, - WS_CHILD | WS_VISIBLE }; - const int complex_order_6[3] = { 0, 1, 2 }; - - /* simple WS_CHILD */ - test_window_tree(parent, simple_style, simple_order, 5); - - /* complex children styles */ - test_window_tree(parent, complex_style, complex_order_1, 1); - test_window_tree(parent, complex_style, complex_order_2, 2); - test_window_tree(parent, complex_style, complex_order_3, 3); - test_window_tree(parent, complex_style, complex_order_4, 4); - test_window_tree(parent, complex_style, complex_order_5, 5); - - /* another set of complex children styles */ - test_window_tree(parent, complex_style_6, complex_order_6, 3); -} - -#define check_z_order(hwnd, next, prev, owner, topmost) \ - check_z_order_debug((hwnd), (next), (prev), (owner), (topmost), \ - __FILE__, __LINE__) - -static void check_z_order_debug(HWND hwnd, HWND next, HWND prev, HWND owner, - BOOL topmost, const char *file, int line) -{ - HWND test; - DWORD ex_style; - - test = GetWindow(hwnd, GW_HWNDNEXT); - /* skip foreign windows */ - while (test && test != next && - (GetWindowThreadProcessId(test, NULL) != our_pid || - UlongToHandle(GetWindowLongPtr(test, GWLP_HINSTANCE)) != GetModuleHandle(0) || - GetWindow(test, GW_OWNER) == next)) - { - /*trace("skipping next %p (%p)\n", test, UlongToHandle(GetWindowLongPtr(test, GWLP_HINSTANCE)));*/ - test = GetWindow(test, GW_HWNDNEXT); - } - ok_(file, line)(next == test, "%p: expected next %p, got %p\n", hwnd, next, test); - - test = GetWindow(hwnd, GW_HWNDPREV); - /* skip foreign windows */ - while (test && test != prev && - (GetWindowThreadProcessId(test, NULL) != our_pid || - UlongToHandle(GetWindowLongPtr(test, GWLP_HINSTANCE)) != GetModuleHandle(0) || - GetWindow(test, GW_OWNER) == hwnd)) - { - /*trace("skipping prev %p (%p)\n", test, UlongToHandle(GetWindowLongPtr(test, GWLP_HINSTANCE)));*/ - test = GetWindow(test, GW_HWNDPREV); - } - ok_(file, line)(prev == test, "%p: expected prev %p, got %p\n", hwnd, prev, test); - - test = GetWindow(hwnd, GW_OWNER); - ok_(file, line)(owner == test, "%p: expected owner %p, got %p\n", hwnd, owner, test); - - ex_style = GetWindowLong(hwnd, GWL_EXSTYLE); - ok_(file, line)(!(ex_style & WS_EX_TOPMOST) == !topmost, "%p: expected %stopmost\n", - hwnd, topmost ? "" : "NOT "); -} - -static void test_popup_zorder(HWND hwnd_D, HWND hwnd_E, DWORD style) -{ - HWND hwnd_A, hwnd_B, hwnd_C, hwnd_F; - - trace("hwnd_D %p, hwnd_E %p\n", hwnd_D, hwnd_E); - - SetWindowPos(hwnd_E, hwnd_D, 0,0,0,0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE); - - check_z_order(hwnd_D, hwnd_E, 0, 0, FALSE); - check_z_order(hwnd_E, 0, hwnd_D, 0, FALSE); - - hwnd_F = CreateWindowEx(0, "MainWindowClass", "Owner window", - WS_OVERLAPPED | WS_CAPTION, - 100, 100, 100, 100, - 0, 0, GetModuleHandle(0), NULL); - trace("hwnd_F %p\n", hwnd_F); - check_z_order(hwnd_F, hwnd_D, 0, 0, FALSE); - - SetWindowPos(hwnd_F, hwnd_E, 0,0,0,0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE); - check_z_order(hwnd_F, 0, hwnd_E, 0, FALSE); - check_z_order(hwnd_E, hwnd_F, hwnd_D, 0, FALSE); - check_z_order(hwnd_D, hwnd_E, 0, 0, FALSE); - - hwnd_C = CreateWindowEx(0, "MainWindowClass", NULL, - style, - 100, 100, 100, 100, - hwnd_F, 0, GetModuleHandle(0), NULL); - trace("hwnd_C %p\n", hwnd_C); - check_z_order(hwnd_F, 0, hwnd_E, 0, FALSE); - check_z_order(hwnd_E, hwnd_F, hwnd_D, 0, FALSE); - check_z_order(hwnd_D, hwnd_E, hwnd_C, 0, FALSE); - check_z_order(hwnd_C, hwnd_D, 0, hwnd_F, FALSE); - - hwnd_B = CreateWindowEx(WS_EX_TOPMOST, "MainWindowClass", NULL, - style, - 100, 100, 100, 100, - hwnd_F, 0, GetModuleHandle(0), NULL); - trace("hwnd_B %p\n", hwnd_B); - check_z_order(hwnd_F, 0, hwnd_E, 0, FALSE); - check_z_order(hwnd_E, hwnd_F, hwnd_D, 0, FALSE); - check_z_order(hwnd_D, hwnd_E, hwnd_C, 0, FALSE); - check_z_order(hwnd_C, hwnd_D, hwnd_B, hwnd_F, FALSE); - check_z_order(hwnd_B, hwnd_C, 0, hwnd_F, TRUE); - - hwnd_A = CreateWindowEx(WS_EX_TOPMOST, "MainWindowClass", NULL, - style, - 100, 100, 100, 100, - 0, 0, GetModuleHandle(0), NULL); - trace("hwnd_A %p\n", hwnd_A); - check_z_order(hwnd_F, 0, hwnd_E, 0, FALSE); - check_z_order(hwnd_E, hwnd_F, hwnd_D, 0, FALSE); - check_z_order(hwnd_D, hwnd_E, hwnd_C, 0, FALSE); - check_z_order(hwnd_C, hwnd_D, hwnd_B, hwnd_F, FALSE); - check_z_order(hwnd_B, hwnd_C, hwnd_A, hwnd_F, TRUE); - check_z_order(hwnd_A, hwnd_B, 0, 0, TRUE); - - trace("A %p B %p C %p D %p E %p F %p\n", hwnd_A, hwnd_B, hwnd_C, hwnd_D, hwnd_E, hwnd_F); - - /* move hwnd_F and its popups up */ - SetWindowPos(hwnd_F, HWND_TOP, 0,0,0,0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE); - check_z_order(hwnd_E, 0, hwnd_D, 0, FALSE); - check_z_order(hwnd_D, hwnd_E, hwnd_F, 0, FALSE); - check_z_order(hwnd_F, hwnd_D, hwnd_C, 0, FALSE); - check_z_order(hwnd_C, hwnd_F, hwnd_B, hwnd_F, FALSE); - check_z_order(hwnd_B, hwnd_C, hwnd_A, hwnd_F, TRUE); - check_z_order(hwnd_A, hwnd_B, 0, 0, TRUE); - - /* move hwnd_F and its popups down */ -#if 0 /* enable once Wine is fixed to pass this test */ - SetWindowPos(hwnd_F, HWND_BOTTOM, 0,0,0,0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE); - check_z_order(hwnd_F, 0, hwnd_C, 0, FALSE); - check_z_order(hwnd_C, hwnd_F, hwnd_B, hwnd_F, FALSE); - check_z_order(hwnd_B, hwnd_C, hwnd_E, hwnd_F, FALSE); - check_z_order(hwnd_E, hwnd_B, hwnd_D, 0, FALSE); - check_z_order(hwnd_D, hwnd_E, hwnd_A, 0, FALSE); - check_z_order(hwnd_A, hwnd_D, 0, 0, TRUE); -#endif - - /* make hwnd_C owned by a topmost window */ - DestroyWindow( hwnd_C ); - hwnd_C = CreateWindowEx(0, "MainWindowClass", NULL, - style, - 100, 100, 100, 100, - hwnd_A, 0, GetModuleHandle(0), NULL); - trace("hwnd_C %p\n", hwnd_C); - check_z_order(hwnd_E, 0, hwnd_D, 0, FALSE); - check_z_order(hwnd_D, hwnd_E, hwnd_F, 0, FALSE); - check_z_order(hwnd_F, hwnd_D, hwnd_B, 0, FALSE); - check_z_order(hwnd_B, hwnd_F, hwnd_A, hwnd_F, TRUE); - check_z_order(hwnd_A, hwnd_B, hwnd_C, 0, TRUE); - check_z_order(hwnd_C, hwnd_A, 0, hwnd_A, TRUE); - - DestroyWindow(hwnd_A); - DestroyWindow(hwnd_B); - DestroyWindow(hwnd_C); - DestroyWindow(hwnd_F); -} - -static void test_vis_rgn( HWND hwnd ) -{ - RECT win_rect, rgn_rect; - HRGN hrgn = CreateRectRgn( 0, 0, 0, 0 ); - HDC hdc; - - ShowWindow(hwnd,SW_SHOW); - hdc = GetDC( hwnd ); - ok( GetRandomRgn( hdc, hrgn, SYSRGN ) != 0, "GetRandomRgn failed\n" ); - GetWindowRect( hwnd, &win_rect ); - GetRgnBox( hrgn, &rgn_rect ); - if (is_win9x) - { - trace("win9x, mapping to screen coords\n"); - MapWindowPoints( hwnd, 0, (POINT *)&rgn_rect, 2 ); - } - trace("win: %d,%d-%d,%d\n", win_rect.left, win_rect.top, win_rect.right, win_rect.bottom ); - trace("rgn: %d,%d-%d,%d\n", rgn_rect.left, rgn_rect.top, rgn_rect.right, rgn_rect.bottom ); - ok( win_rect.left <= rgn_rect.left, "rgn left %d not inside win rect %d\n", - rgn_rect.left, win_rect.left ); - ok( win_rect.top <= rgn_rect.top, "rgn top %d not inside win rect %d\n", - rgn_rect.top, win_rect.top ); - ok( win_rect.right >= rgn_rect.right, "rgn right %d not inside win rect %d\n", - rgn_rect.right, win_rect.right ); - ok( win_rect.bottom >= rgn_rect.bottom, "rgn bottom %d not inside win rect %d\n", - rgn_rect.bottom, win_rect.bottom ); - ReleaseDC( hwnd, hdc ); -} - -static LRESULT WINAPI set_focus_on_activate_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) -{ - if (msg == WM_ACTIVATE && LOWORD(wp) == WA_ACTIVE) - { - HWND child = GetWindow(hwnd, GW_CHILD); - ok(child != 0, "couldn't find child window\n"); - SetFocus(child); - ok(GetFocus() == child, "Focus should be on child %p\n", child); - return 0; - } - return DefWindowProc(hwnd, msg, wp, lp); -} - -static void test_SetFocus(HWND hwnd) -{ - HWND child, child2; - WNDPROC old_wnd_proc; - - /* check if we can set focus to non-visible windows */ - - ShowWindow(hwnd, SW_SHOW); - SetFocus(0); - SetFocus(hwnd); - ok( GetFocus() == hwnd, "Failed to set focus to visible window %p\n", hwnd ); - ok( GetWindowLong(hwnd,GWL_STYLE) & WS_VISIBLE, "Window %p not visible\n", hwnd ); - ShowWindow(hwnd, SW_HIDE); - SetFocus(0); - SetFocus(hwnd); - ok( GetFocus() == hwnd, "Failed to set focus to invisible window %p\n", hwnd ); - ok( !(GetWindowLong(hwnd,GWL_STYLE) & WS_VISIBLE), "Window %p still visible\n", hwnd ); - child = CreateWindowExA(0, "static", NULL, WS_CHILD, 0, 0, 0, 0, hwnd, 0, 0, NULL); - assert(child); - SetFocus(child); - ok( GetFocus() == child, "Failed to set focus to invisible child %p\n", child ); - ok( !(GetWindowLong(child,GWL_STYLE) & WS_VISIBLE), "Child %p is visible\n", child ); - ShowWindow(child, SW_SHOW); - ok( GetWindowLong(child,GWL_STYLE) & WS_VISIBLE, "Child %p is not visible\n", child ); - ok( GetFocus() == child, "Focus no longer on child %p\n", child ); - ShowWindow(child, SW_HIDE); - ok( !(GetWindowLong(child,GWL_STYLE) & WS_VISIBLE), "Child %p is visible\n", child ); - ok( GetFocus() == hwnd, "Focus should be on parent %p, not %p\n", hwnd, GetFocus() ); - ShowWindow(child, SW_SHOW); - child2 = CreateWindowExA(0, "static", NULL, WS_CHILD, 0, 0, 0, 0, child, 0, 0, NULL); - assert(child2); - ShowWindow(child2, SW_SHOW); - SetFocus(child2); - ShowWindow(child, SW_HIDE); - ok( !(GetWindowLong(child,GWL_STYLE) & WS_VISIBLE), "Child %p is visible\n", child ); - ok( GetFocus() == child2, "Focus should be on %p, not %p\n", child2, GetFocus() ); - ShowWindow(child, SW_SHOW); - SetFocus(child); - ok( GetFocus() == child, "Focus should be on child %p\n", child ); - SetWindowPos(child,0,0,0,0,0,SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_HIDEWINDOW); - ok( GetFocus() == child, "Focus should still be on child %p\n", child ); - - ShowWindow(child, SW_HIDE); - SetFocus(hwnd); - ok( GetFocus() == hwnd, "Focus should be on parent %p, not %p\n", hwnd, GetFocus() ); - SetWindowPos(child,0,0,0,0,0,SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_SHOWWINDOW); - ok( GetFocus() == hwnd, "Focus should still be on parent %p, not %p\n", hwnd, GetFocus() ); - ShowWindow(child, SW_HIDE); - ok( GetFocus() == hwnd, "Focus should still be on parent %p, not %p\n", hwnd, GetFocus() ); - - ShowWindow(hwnd, SW_SHOW); - ShowWindow(child, SW_SHOW); - SetFocus(child); - ok( GetFocus() == child, "Focus should be on child %p\n", child ); - EnableWindow(hwnd, FALSE); - ok( GetFocus() == child, "Focus should still be on child %p\n", child ); - EnableWindow(hwnd, TRUE); - - ok( GetActiveWindow() == hwnd, "parent window %p should be active\n", hwnd); - ShowWindow(hwnd, SW_SHOWMINIMIZED); - ok( GetActiveWindow() == hwnd, "parent window %p should be active\n", hwnd); -todo_wine - ok( GetFocus() != child, "Focus should not be on child %p\n", child ); - ok( GetFocus() != hwnd, "Focus should not be on parent %p\n", hwnd ); - ShowWindow(hwnd, SW_RESTORE); - ok( GetActiveWindow() == hwnd, "parent window %p should be active\n", hwnd); - ok( GetFocus() == hwnd, "Focus should be on parent %p\n", hwnd ); - ShowWindow(hwnd, SW_SHOWMINIMIZED); - ok( GetActiveWindow() == hwnd, "parent window %p should be active\n", hwnd); - ok( GetFocus() != child, "Focus should not be on child %p\n", child ); -todo_wine - ok( GetFocus() != hwnd, "Focus should not be on parent %p\n", hwnd ); - old_wnd_proc = (WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)set_focus_on_activate_proc); - ShowWindow(hwnd, SW_RESTORE); - ok( GetActiveWindow() == hwnd, "parent window %p should be active\n", hwnd); -todo_wine - ok( GetFocus() == child, "Focus should be on child %p, not %p\n", child, GetFocus() ); - - SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)old_wnd_proc); - - DestroyWindow( child2 ); - DestroyWindow( child ); -} - -static void test_SetActiveWindow(HWND hwnd) -{ - HWND hwnd2; - - flush_events( TRUE ); - ShowWindow(hwnd, SW_HIDE); - SetFocus(0); - SetActiveWindow(0); - check_wnd_state(0, 0, 0, 0); - - /*trace("testing SetActiveWindow %p\n", hwnd);*/ - - ShowWindow(hwnd, SW_SHOW); - check_wnd_state(hwnd, hwnd, hwnd, 0); - - hwnd2 = SetActiveWindow(0); - ok(hwnd2 == hwnd, "SetActiveWindow returned %p instead of %p\n", hwnd2, hwnd); - if (!GetActiveWindow()) /* doesn't always work on vista */ - { - check_wnd_state(0, 0, 0, 0); - hwnd2 = SetActiveWindow(hwnd); - ok(hwnd2 == 0, "SetActiveWindow returned %p instead of 0\n", hwnd2); - } - check_wnd_state(hwnd, hwnd, hwnd, 0); - - SetWindowPos(hwnd,0,0,0,0,0,SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE|SWP_HIDEWINDOW); - check_wnd_state(hwnd, hwnd, hwnd, 0); - - SetWindowPos(hwnd,0,0,0,0,0,SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE|SWP_SHOWWINDOW); - check_wnd_state(hwnd, hwnd, hwnd, 0); - - ShowWindow(hwnd, SW_HIDE); - check_wnd_state(0, 0, 0, 0); - - /*trace("testing SetActiveWindow on an invisible window %p\n", hwnd);*/ - SetActiveWindow(hwnd); - check_wnd_state(hwnd, hwnd, hwnd, 0); - - ShowWindow(hwnd, SW_SHOW); - check_wnd_state(hwnd, hwnd, hwnd, 0); - - hwnd2 = CreateWindowExA(0, "static", NULL, WS_POPUP|WS_VISIBLE, 0, 0, 0, 0, hwnd, 0, 0, NULL); - check_wnd_state(hwnd2, hwnd2, hwnd2, 0); - - DestroyWindow(hwnd2); - check_wnd_state(hwnd, hwnd, hwnd, 0); - - hwnd2 = CreateWindowExA(0, "static", NULL, WS_POPUP|WS_VISIBLE, 0, 0, 0, 0, hwnd, 0, 0, NULL); - check_wnd_state(hwnd2, hwnd2, hwnd2, 0); - - SetWindowPos(hwnd2,0,0,0,0,0,SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE|SWP_HIDEWINDOW); - check_wnd_state(hwnd2, hwnd2, hwnd2, 0); - - DestroyWindow(hwnd2); - check_wnd_state(hwnd, hwnd, hwnd, 0); -} - -struct create_window_thread_params -{ - HWND window; - HANDLE window_created; - HANDLE test_finished; -}; - -static DWORD WINAPI create_window_thread(void *param) -{ - struct create_window_thread_params *p = param; - DWORD res; - BOOL ret; - - p->window = CreateWindowA("static", NULL, WS_POPUP | WS_VISIBLE, 0, 0, 0, 0, 0, 0, 0, 0); - - ret = SetEvent(p->window_created); - ok(ret, "SetEvent failed, last error %#x.\n", GetLastError()); - - res = WaitForSingleObject(p->test_finished, INFINITE); - ok(res == WAIT_OBJECT_0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); - - DestroyWindow(p->window); - return 0; -} - -static void test_SetForegroundWindow(HWND hwnd) -{ - struct create_window_thread_params thread_params; - HANDLE thread; - DWORD res, tid; - BOOL ret; - HWND hwnd2; - MSG msg; - - flush_events( TRUE ); - ShowWindow(hwnd, SW_HIDE); - SetFocus(0); - SetActiveWindow(0); - check_wnd_state(0, 0, 0, 0); - - /*trace("testing SetForegroundWindow %p\n", hwnd);*/ - - ShowWindow(hwnd, SW_SHOW); - check_wnd_state(hwnd, hwnd, hwnd, 0); - - hwnd2 = SetActiveWindow(0); - ok(hwnd2 == hwnd, "SetActiveWindow(0) returned %p instead of %p\n", hwnd2, hwnd); - if (GetActiveWindow() == hwnd) /* doesn't always work on vista */ - check_wnd_state(hwnd, hwnd, hwnd, 0); - else - check_wnd_state(0, 0, 0, 0); - - ret = SetForegroundWindow(hwnd); - if (!ret) - { - skip( "SetForegroundWindow not working\n" ); - return; - } - check_wnd_state(hwnd, hwnd, hwnd, 0); - - SetLastError(0xdeadbeef); - ret = SetForegroundWindow(0); - ok(!ret, "SetForegroundWindow returned TRUE instead of FALSE\n"); - ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE || - broken(GetLastError() == 0xdeadbeef), /* win9x */ - "got error %d expected ERROR_INVALID_WINDOW_HANDLE\n", GetLastError()); - check_wnd_state(hwnd, hwnd, hwnd, 0); - - SetWindowPos(hwnd,0,0,0,0,0,SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE|SWP_HIDEWINDOW); - check_wnd_state(hwnd, hwnd, hwnd, 0); - - SetWindowPos(hwnd,0,0,0,0,0,SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE|SWP_SHOWWINDOW); - check_wnd_state(hwnd, hwnd, hwnd, 0); - - hwnd2 = GetForegroundWindow(); - ok(hwnd2 == hwnd, "Wrong foreground window %p\n", hwnd2); - ret = SetForegroundWindow( GetDesktopWindow() ); - ok(ret, "SetForegroundWindow(desktop) error: %d\n", GetLastError()); - hwnd2 = GetForegroundWindow(); - ok(hwnd2 != hwnd, "Wrong foreground window %p\n", hwnd2); - - ShowWindow(hwnd, SW_HIDE); - check_wnd_state(0, 0, 0, 0); - - /*trace("testing SetForegroundWindow on an invisible window %p\n", hwnd);*/ - ret = SetForegroundWindow(hwnd); - ok(ret || broken(!ret), /* win98 */ "SetForegroundWindow returned FALSE instead of TRUE\n"); - check_wnd_state(hwnd, hwnd, hwnd, 0); - - ShowWindow(hwnd, SW_SHOW); - check_wnd_state(hwnd, hwnd, hwnd, 0); - - hwnd2 = CreateWindowExA(0, "static", NULL, WS_POPUP|WS_VISIBLE, 0, 0, 0, 0, hwnd, 0, 0, NULL); - check_wnd_state(hwnd2, hwnd2, hwnd2, 0); - - DestroyWindow(hwnd2); - check_wnd_state(hwnd, hwnd, hwnd, 0); - - hwnd2 = CreateWindowExA(0, "static", NULL, WS_POPUP|WS_VISIBLE, 0, 0, 0, 0, hwnd, 0, 0, NULL); - check_wnd_state(hwnd2, hwnd2, hwnd2, 0); - - SetWindowPos(hwnd2,0,0,0,0,0,SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE|SWP_HIDEWINDOW); - check_wnd_state(hwnd2, hwnd2, hwnd2, 0); - - DestroyWindow(hwnd2); - check_wnd_state(hwnd, hwnd, hwnd, 0); - - hwnd2 = CreateWindowA("static", NULL, WS_POPUP | WS_VISIBLE, 0, 0, 0, 0, 0, 0, 0, 0); - check_wnd_state(hwnd2, hwnd2, hwnd2, 0); - - thread_params.window_created = CreateEvent(NULL, FALSE, FALSE, NULL); - ok(!!thread_params.window_created, "CreateEvent failed, last error %#x.\n", GetLastError()); - thread_params.test_finished = CreateEvent(NULL, FALSE, FALSE, NULL); - ok(!!thread_params.test_finished, "CreateEvent failed, last error %#x.\n", GetLastError()); - thread = CreateThread(NULL, 0, create_window_thread, &thread_params, 0, &tid); - ok(!!thread, "Failed to create thread, last error %#x.\n", GetLastError()); - res = WaitForSingleObject(thread_params.window_created, INFINITE); - ok(res == WAIT_OBJECT_0, "Wait failed (%#x), last error %#x.\n", res, GetLastError()); - check_wnd_state(hwnd2, thread_params.window, hwnd2, 0); - - SetForegroundWindow(hwnd2); - check_wnd_state(hwnd2, hwnd2, hwnd2, 0); - - while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessage(&msg); - if (0) check_wnd_state(hwnd2, hwnd2, hwnd2, 0); - todo_wine ok(GetActiveWindow() == hwnd2, "Expected active window %p, got %p.\n", hwnd2, GetActiveWindow()); - todo_wine ok(GetFocus() == hwnd2, "Expected focus window %p, got %p.\n", hwnd2, GetFocus()); - - SetEvent(thread_params.test_finished); - WaitForSingleObject(thread, INFINITE); - CloseHandle(thread_params.test_finished); - CloseHandle(thread_params.window_created); - CloseHandle(thread); - DestroyWindow(hwnd2); -} - -static WNDPROC old_button_proc; - -static LRESULT WINAPI button_hook_proc(HWND button, UINT msg, WPARAM wparam, LPARAM lparam) -{ - LRESULT ret; - USHORT key_state; - - key_state = GetKeyState(VK_LBUTTON); - ok(!(key_state & 0x8000), "VK_LBUTTON should not be pressed, state %04x\n", key_state); - - ret = CallWindowProcA(old_button_proc, button, msg, wparam, lparam); - - if (msg == WM_LBUTTONDOWN) - { - HWND hwnd, capture; - - check_wnd_state(button, button, button, button); - - hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP, 0, 0, 10, 10, 0, 0, 0, NULL); - assert(hwnd); - trace("hwnd %p\n", hwnd); - - check_wnd_state(button, button, button, button); - - ShowWindow(hwnd, SW_SHOWNOACTIVATE); - - check_wnd_state(button, button, button, button); - - DestroyWindow(hwnd); - - hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP, 0, 0, 10, 10, 0, 0, 0, NULL); - assert(hwnd); - trace("hwnd %p\n", hwnd); - - check_wnd_state(button, button, button, button); - - /* button wnd proc should release capture on WM_KILLFOCUS if it does - * match internal button state. - */ - SendMessage(button, WM_KILLFOCUS, 0, 0); - check_wnd_state(button, button, button, 0); - - ShowWindow(hwnd, SW_SHOW); - check_wnd_state(hwnd, hwnd, hwnd, 0); - - capture = SetCapture(hwnd); - ok(capture == 0, "SetCapture() = %p\n", capture); - - check_wnd_state(hwnd, hwnd, hwnd, hwnd); - - DestroyWindow(hwnd); - - check_wnd_state(button, 0, button, 0); - } - - return ret; -} - -static void test_capture_1(void) -{ - HWND button, capture; - - capture = GetCapture(); - ok(capture == 0, "GetCapture() = %p\n", capture); - - button = CreateWindowExA(0, "button", NULL, WS_POPUP | WS_VISIBLE, 0, 0, 10, 10, 0, 0, 0, NULL); - assert(button); - trace("button %p\n", button); - - old_button_proc = (WNDPROC)SetWindowLongPtrA(button, GWLP_WNDPROC, (LONG_PTR)button_hook_proc); - - SendMessageA(button, WM_LBUTTONDOWN, 0, 0); - - capture = SetCapture(button); - ok(capture == 0, "SetCapture() = %p\n", capture); - check_wnd_state(button, 0, button, button); - - DestroyWindow(button); - /* old active window test depends on previously executed window - * activation tests, and fails under NT4. - check_wnd_state(oldActive, 0, oldFocus, 0);*/ -} - -static void test_capture_2(void) -{ - HWND button, hwnd, capture, oldFocus, oldActive; - - oldFocus = GetFocus(); - oldActive = GetActiveWindow(); - check_wnd_state(oldActive, 0, oldFocus, 0); - - button = CreateWindowExA(0, "button", NULL, WS_POPUP | WS_VISIBLE, 0, 0, 10, 10, 0, 0, 0, NULL); - assert(button); - trace("button %p\n", button); - - check_wnd_state(button, button, button, 0); - - capture = SetCapture(button); - ok(capture == 0, "SetCapture() = %p\n", capture); - - check_wnd_state(button, button, button, button); - - /* button wnd proc should ignore WM_KILLFOCUS if it doesn't match - * internal button state. - */ - SendMessage(button, WM_KILLFOCUS, 0, 0); - check_wnd_state(button, button, button, button); - - hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP, 0, 0, 10, 10, 0, 0, 0, NULL); - assert(hwnd); - trace("hwnd %p\n", hwnd); - - check_wnd_state(button, button, button, button); - - ShowWindow(hwnd, SW_SHOWNOACTIVATE); - - check_wnd_state(button, button, button, button); - - DestroyWindow(hwnd); - - hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP, 0, 0, 10, 10, 0, 0, 0, NULL); - assert(hwnd); - trace("hwnd %p\n", hwnd); - - check_wnd_state(button, button, button, button); - - ShowWindow(hwnd, SW_SHOW); - - check_wnd_state(hwnd, hwnd, hwnd, button); - - capture = SetCapture(hwnd); - ok(capture == button, "SetCapture() = %p\n", capture); - - check_wnd_state(hwnd, hwnd, hwnd, hwnd); - - DestroyWindow(hwnd); - check_wnd_state(button, button, button, 0); - - DestroyWindow(button); - check_wnd_state(oldActive, 0, oldFocus, 0); -} - -static void test_capture_3(HWND hwnd1, HWND hwnd2) -{ - BOOL ret; - - ShowWindow(hwnd1, SW_HIDE); - ShowWindow(hwnd2, SW_HIDE); - - ok(!IsWindowVisible(hwnd1), "%p should be invisible\n", hwnd1); - ok(!IsWindowVisible(hwnd2), "%p should be invisible\n", hwnd2); - - SetCapture(hwnd1); - check_wnd_state(0, 0, 0, hwnd1); - - SetCapture(hwnd2); - check_wnd_state(0, 0, 0, hwnd2); - - ShowWindow(hwnd1, SW_SHOW); - check_wnd_state(hwnd1, hwnd1, hwnd1, hwnd2); - - ret = ReleaseCapture(); - ok (ret, "releasecapture did not return TRUE.\n"); - ret = ReleaseCapture(); - ok (ret, "releasecapture did not return TRUE after second try.\n"); -} - -static LRESULT CALLBACK test_capture_4_proc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - GUITHREADINFO gti; - HWND cap_wnd, cap_wnd2, set_cap_wnd; - BOOL status; - switch (msg) - { - case WM_CAPTURECHANGED: - - /* now try to release capture from menu. this should fail */ - if (pGetGUIThreadInfo) - { - memset(>i, 0, sizeof(GUITHREADINFO)); - gti.cbSize = sizeof(GUITHREADINFO); - status = pGetGUIThreadInfo(GetCurrentThreadId(), >i); - ok(status, "GetGUIThreadInfo() failed!\n"); - ok(gti.flags & GUI_INMENUMODE, "Thread info incorrect (flags=%08X)!\n", gti.flags); - } - cap_wnd = GetCapture(); - - /* check that re-setting the capture for the menu fails */ - set_cap_wnd = SetCapture(cap_wnd); - ok(!set_cap_wnd || broken(set_cap_wnd == cap_wnd), /* nt4 */ - "SetCapture should have failed!\n"); - if (set_cap_wnd) - { - DestroyWindow(hWnd); - break; - } - - /* check that SetCapture fails for another window and that it does not touch the error code */ - set_cap_wnd = SetCapture(hWnd); - ok(!set_cap_wnd, "SetCapture should have failed!\n"); - - /* check that ReleaseCapture fails and does not touch the error code */ - status = ReleaseCapture(); - ok(!status, "ReleaseCapture should have failed!\n"); - - /* check that thread info did not change */ - if (pGetGUIThreadInfo) - { - memset(>i, 0, sizeof(GUITHREADINFO)); - gti.cbSize = sizeof(GUITHREADINFO); - status = pGetGUIThreadInfo(GetCurrentThreadId(), >i); - ok(status, "GetGUIThreadInfo() failed!\n"); - ok(gti.flags & GUI_INMENUMODE, "Thread info incorrect (flags=%08X)!\n", gti.flags); - } - - /* verify that no capture change took place */ - cap_wnd2 = GetCapture(); - ok(cap_wnd2 == cap_wnd, "Capture changed!\n"); - - /* we are done. kill the window */ - DestroyWindow(hWnd); - break; - - default: - return( DefWindowProcA( hWnd, msg, wParam, lParam ) ); - } - return 0; -} - -/* Test that no-one can mess around with the current capture while a menu is open */ -static void test_capture_4(void) -{ - BOOL ret; - HMENU hmenu; - HWND hwnd; - WNDCLASSA wclass; - HINSTANCE hInstance = GetModuleHandleA( NULL ); - ATOM aclass; - - if (!pGetGUIThreadInfo) - { - win_skip("GetGUIThreadInfo is not available\n"); - return; - } - wclass.lpszClassName = "TestCapture4Class"; - wclass.style = CS_HREDRAW | CS_VREDRAW; - wclass.lpfnWndProc = test_capture_4_proc; - wclass.hInstance = hInstance; - wclass.hIcon = LoadIconA( 0, IDI_APPLICATION ); - wclass.hCursor = LoadCursorA( NULL, IDC_ARROW ); - wclass.hbrBackground = (HBRUSH)( COLOR_WINDOW + 1 ); - wclass.lpszMenuName = 0; - wclass.cbClsExtra = 0; - wclass.cbWndExtra = 0; - aclass = RegisterClassA( &wclass ); - ok( aclass, "RegisterClassA failed with error %d\n", GetLastError()); - hwnd = CreateWindowA( wclass.lpszClassName, "MenuTest", - WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, - 400, 200, NULL, NULL, hInstance, NULL); - ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError()); - if (!hwnd) return; - hmenu = CreatePopupMenu(); - - ret = AppendMenuA( hmenu, MF_STRING, 1, "winetest2"); - ok( ret, "AppendMenuA has failed!\n"); - - /* set main window to have initial capture */ - SetCapture(hwnd); - - if (is_win9x) - { - win_skip("TrackPopupMenu test crashes on Win9x/WinMe\n"); - } - else - { - /* create popup (it will self-destruct) */ - ret = TrackPopupMenu(hmenu, TPM_RETURNCMD, 100, 100, 0, hwnd, NULL); - ok( ret == 0, "TrackPopupMenu returned %d expected zero\n", ret); - } - - /* clean up */ - DestroyMenu(hmenu); - DestroyWindow(hwnd); -} - -/* PeekMessage wrapper that ignores the messages we don't care about */ -static BOOL peek_message( MSG *msg ) -{ - BOOL ret; - do - { - ret = PeekMessageA(msg, 0, 0, 0, PM_REMOVE); - } while (ret && (msg->message == WM_TIMER || ignore_message(msg->message))); - return ret; -} - -static void test_keyboard_input(HWND hwnd) -{ - MSG msg; - BOOL ret; - - flush_events( TRUE ); - SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_SHOWWINDOW); - UpdateWindow(hwnd); - flush_events( TRUE ); - - ok(GetActiveWindow() == hwnd, "wrong active window %p\n", GetActiveWindow()); - - SetFocus(hwnd); - ok(GetFocus() == hwnd, "wrong focus window %p\n", GetFocus()); - - flush_events( TRUE ); - - PostMessageA(hwnd, WM_KEYDOWN, 0, 0); - ret = peek_message(&msg); - ok( ret, "no message available\n"); - ok(msg.hwnd == hwnd && msg.message == WM_KEYDOWN, "hwnd %p message %04x\n", msg.hwnd, msg.message); - ret = peek_message(&msg); - ok( !ret, "message %04x available\n", msg.message); - - ok(GetFocus() == hwnd, "wrong focus window %p\n", GetFocus()); - - PostThreadMessageA(GetCurrentThreadId(), WM_KEYDOWN, 0, 0); - ret = peek_message(&msg); - ok(ret, "no message available\n"); - ok(!msg.hwnd && msg.message == WM_KEYDOWN, "hwnd %p message %04x\n", msg.hwnd, msg.message); - ret = peek_message(&msg); - ok( !ret, "message %04x available\n", msg.message); - - ok(GetFocus() == hwnd, "wrong focus window %p\n", GetFocus()); - - keybd_event(VK_SPACE, 0, 0, 0); - if (!peek_message(&msg)) - { - skip( "keybd_event didn't work, skipping keyboard test\n" ); - return; - } - ok(msg.hwnd == hwnd && msg.message == WM_KEYDOWN, "hwnd %p message %04x\n", msg.hwnd, msg.message); - ret = peek_message(&msg); - ok( !ret, "message %04x available\n", msg.message); - - SetFocus(0); - ok(GetFocus() == 0, "wrong focus window %p\n", GetFocus()); - - flush_events( TRUE ); - - PostMessageA(hwnd, WM_KEYDOWN, 0, 0); - ret = peek_message(&msg); - ok(ret, "no message available\n"); - ok(msg.hwnd == hwnd && msg.message == WM_KEYDOWN, "hwnd %p message %04x\n", msg.hwnd, msg.message); - ret = peek_message(&msg); - ok( !ret, "message %04x available\n", msg.message); - - ok(GetFocus() == 0, "wrong focus window %p\n", GetFocus()); - - PostThreadMessageA(GetCurrentThreadId(), WM_KEYDOWN, 0, 0); - ret = peek_message(&msg); - ok(ret, "no message available\n"); - ok(!msg.hwnd && msg.message == WM_KEYDOWN, "hwnd %p message %04x\n", msg.hwnd, msg.message); - ret = peek_message(&msg); - ok( !ret, "message %04x available\n", msg.message); - - ok(GetFocus() == 0, "wrong focus window %p\n", GetFocus()); - - keybd_event(VK_SPACE, 0, 0, 0); - ret = peek_message(&msg); - ok(ret, "no message available\n"); - ok(msg.hwnd == hwnd && msg.message == WM_SYSKEYDOWN, "hwnd %p message %04x\n", msg.hwnd, msg.message); - ret = peek_message(&msg); - ok( !ret, "message %04x available\n", msg.message); -} - -static BOOL wait_for_message( MSG *msg ) -{ - BOOL ret; - - for (;;) - { - ret = peek_message(msg); - if (ret) - { - if (msg->message == WM_PAINT) DispatchMessage(msg); - else break; - } - else if (MsgWaitForMultipleObjects( 0, NULL, FALSE, 100, QS_ALLINPUT ) == WAIT_TIMEOUT) break; - } - if (!ret) msg->message = 0; - return ret; -} - -static void test_mouse_input(HWND hwnd) -{ - RECT rc; - POINT pt; - int x, y; - HWND popup; - MSG msg; - BOOL ret; - LRESULT res; - - ShowWindow(hwnd, SW_SHOWNORMAL); - UpdateWindow(hwnd); - SetWindowPos( hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE ); - - GetWindowRect(hwnd, &rc); - trace("main window %p: (%d,%d)-(%d,%d)\n", hwnd, rc.left, rc.top, rc.right, rc.bottom); - - popup = CreateWindowExA(0, "MainWindowClass", NULL, WS_POPUP, - rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, - hwnd, 0, 0, NULL); - assert(popup != 0); - ShowWindow(popup, SW_SHOW); - UpdateWindow(popup); - SetWindowPos( popup, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE ); - - GetWindowRect(popup, &rc); - trace("popup window %p: (%d,%d)-(%d,%d)\n", popup, rc.left, rc.top, rc.right, rc.bottom); - - x = rc.left + (rc.right - rc.left) / 2; - y = rc.top + (rc.bottom - rc.top) / 2; - trace("setting cursor to (%d,%d)\n", x, y); - - SetCursorPos(x, y); - GetCursorPos(&pt); - if (x != pt.x || y != pt.y) - { - skip( "failed to set mouse position, skipping mouse input tests\n" ); - goto done; - } - - flush_events( TRUE ); - - /* Check that setting the same position may generate WM_MOUSEMOVE */ - SetCursorPos(x, y); - msg.message = 0; - ret = peek_message(&msg); - if (ret) - { - ok(msg.hwnd == popup && msg.message == WM_MOUSEMOVE, "hwnd %p message %04x\n", - msg.hwnd, msg.message); - ok(msg.pt.x == x && msg.pt.y == y, "wrong message coords (%d,%d)/(%d,%d)\n", - x, y, msg.pt.x, msg.pt.y); - } - - /* force the system to update its internal queue mouse position, - * otherwise it won't generate relative mouse movements below. - */ - mouse_event(MOUSEEVENTF_MOVE, -1, -1, 0, 0); - flush_events( TRUE ); - - msg.message = 0; - mouse_event(MOUSEEVENTF_MOVE, 1, 1, 0, 0); - flush_events( FALSE ); - /* FIXME: SetCursorPos in Wine generates additional WM_MOUSEMOVE message */ - while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) - { - if (msg.message == WM_TIMER || ignore_message(msg.message)) continue; - ok(msg.hwnd == popup && msg.message == WM_MOUSEMOVE, - "hwnd %p message %04x\n", msg.hwnd, msg.message); - DispatchMessage(&msg); - } - ret = peek_message(&msg); - ok( !ret, "message %04x available\n", msg.message); - - mouse_event(MOUSEEVENTF_MOVE, -1, -1, 0, 0); - ShowWindow(popup, SW_HIDE); - ret = wait_for_message( &msg ); - if (ret) - ok(msg.hwnd == hwnd && msg.message == WM_MOUSEMOVE, "hwnd %p message %04x\n", msg.hwnd, msg.message); - flush_events( TRUE ); - - mouse_event(MOUSEEVENTF_MOVE, 1, 1, 0, 0); - ShowWindow(hwnd, SW_HIDE); - ret = wait_for_message( &msg ); - ok( !ret, "message %04x available\n", msg.message); - flush_events( TRUE ); - - /* test mouse clicks */ - - ShowWindow(hwnd, SW_SHOW); - SetWindowPos( hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE ); - flush_events( TRUE ); - ShowWindow(popup, SW_SHOW); - SetWindowPos( popup, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE ); - flush_events( TRUE ); - - mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); - mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); - mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); - mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); - - ret = wait_for_message( &msg ); - if (!ret) - { - skip( "simulating mouse click doesn't work, skipping mouse button tests\n" ); - goto done; - } - if (msg.message == WM_MOUSEMOVE) /* win2k has an extra WM_MOUSEMOVE here */ - { - ret = wait_for_message( &msg ); - ok(ret, "no message available\n"); - } - - ok(msg.hwnd == popup && msg.message == WM_LBUTTONDOWN, "hwnd %p/%p message %04x\n", - msg.hwnd, popup, msg.message); - - ret = wait_for_message( &msg ); - ok(ret, "no message available\n"); - ok(msg.hwnd == popup && msg.message == WM_LBUTTONUP, "hwnd %p/%p message %04x\n", - msg.hwnd, popup, msg.message); - - ret = wait_for_message( &msg ); - ok(ret, "no message available\n"); - ok(msg.hwnd == popup && msg.message == WM_LBUTTONDBLCLK, "hwnd %p/%p message %04x\n", - msg.hwnd, popup, msg.message); - - ret = wait_for_message( &msg ); - ok(ret, "no message available\n"); - ok(msg.hwnd == popup && msg.message == WM_LBUTTONUP, "hwnd %p/%p message %04x\n", - msg.hwnd, popup, msg.message); - - ret = peek_message(&msg); - ok(!ret, "message %04x available\n", msg.message); - - ShowWindow(popup, SW_HIDE); - flush_events( TRUE ); - - mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); - mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); - mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); - mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); - - ret = wait_for_message( &msg ); - ok(ret, "no message available\n"); - ok(msg.hwnd == hwnd && msg.message == WM_LBUTTONDOWN, "hwnd %p/%p message %04x\n", - msg.hwnd, hwnd, msg.message); - ret = wait_for_message( &msg ); - ok(ret, "no message available\n"); - ok(msg.hwnd == hwnd && msg.message == WM_LBUTTONUP, "hwnd %p/%p message %04x\n", - msg.hwnd, hwnd, msg.message); - - test_lbuttondown_flag = TRUE; - SendMessageA(hwnd, WM_COMMAND, (WPARAM)popup, 0); - test_lbuttondown_flag = FALSE; - - ret = wait_for_message( &msg ); - ok(ret, "no message available\n"); - ok(msg.hwnd == popup && msg.message == WM_LBUTTONDOWN, "hwnd %p/%p message %04x\n", - msg.hwnd, popup, msg.message); - ok(peek_message(&msg), "no message available\n"); - ok(msg.hwnd == popup && msg.message == WM_LBUTTONUP, "hwnd %p/%p message %04x\n", - msg.hwnd, popup, msg.message); - ok(peek_message(&msg), "no message available\n"); - - /* Test WM_MOUSEACTIVATE */ -#define TEST_MOUSEACTIVATE(A,B) \ - res = SendMessageA(hwnd, WM_MOUSEACTIVATE, (WPARAM)hwnd, (LPARAM)MAKELRESULT(A,0)); \ - ok(res == B, "WM_MOUSEACTIVATE for %s returned %ld\n", #A, res); - - TEST_MOUSEACTIVATE(HTERROR,MA_ACTIVATE); - TEST_MOUSEACTIVATE(HTTRANSPARENT,MA_ACTIVATE); - TEST_MOUSEACTIVATE(HTNOWHERE,MA_ACTIVATE); - TEST_MOUSEACTIVATE(HTCLIENT,MA_ACTIVATE); - TEST_MOUSEACTIVATE(HTCAPTION,MA_ACTIVATE); - TEST_MOUSEACTIVATE(HTSYSMENU,MA_ACTIVATE); - TEST_MOUSEACTIVATE(HTSIZE,MA_ACTIVATE); - TEST_MOUSEACTIVATE(HTMENU,MA_ACTIVATE); - TEST_MOUSEACTIVATE(HTHSCROLL,MA_ACTIVATE); - TEST_MOUSEACTIVATE(HTVSCROLL,MA_ACTIVATE); - TEST_MOUSEACTIVATE(HTMINBUTTON,MA_ACTIVATE); - TEST_MOUSEACTIVATE(HTMAXBUTTON,MA_ACTIVATE); - TEST_MOUSEACTIVATE(HTLEFT,MA_ACTIVATE); - TEST_MOUSEACTIVATE(HTRIGHT,MA_ACTIVATE); - TEST_MOUSEACTIVATE(HTTOP,MA_ACTIVATE); - TEST_MOUSEACTIVATE(HTTOPLEFT,MA_ACTIVATE); - TEST_MOUSEACTIVATE(HTTOPRIGHT,MA_ACTIVATE); - TEST_MOUSEACTIVATE(HTBOTTOM,MA_ACTIVATE); - TEST_MOUSEACTIVATE(HTBOTTOMLEFT,MA_ACTIVATE); - TEST_MOUSEACTIVATE(HTBOTTOMRIGHT,MA_ACTIVATE); - TEST_MOUSEACTIVATE(HTBORDER,MA_ACTIVATE); - TEST_MOUSEACTIVATE(HTOBJECT,MA_ACTIVATE); - TEST_MOUSEACTIVATE(HTCLOSE,MA_ACTIVATE); - TEST_MOUSEACTIVATE(HTHELP,MA_ACTIVATE); - -done: - /* Clear any messages left behind by WM_MOUSEACTIVATE tests */ - flush_events( TRUE ); - - DestroyWindow(popup); -} - -static void test_validatergn(HWND hwnd) -{ - HWND child; - RECT rc, rc2; - HRGN rgn; - int ret; - child = CreateWindowExA(0, "static", NULL, WS_CHILD| WS_VISIBLE, 10, 10, 10, 10, hwnd, 0, 0, NULL); - ShowWindow(hwnd, SW_SHOW); - UpdateWindow( hwnd); - /* test that ValidateRect validates children*/ - InvalidateRect( child, NULL, 1); - GetWindowRect( child, &rc); - MapWindowPoints( NULL, hwnd, (POINT*) &rc, 2); - ret = GetUpdateRect( child, &rc2, 0); - ok( ret == 1, "Expected GetUpdateRect to return non-zero, got %d\n", ret); - ok( rc2.right > rc2.left && rc2.bottom > rc2.top, - "Update rectangle is empty!\n"); - ValidateRect( hwnd, &rc); - ret = GetUpdateRect( child, &rc2, 0); - ok( !ret, "Expected GetUpdateRect to return zero, got %d\n", ret); - ok( rc2.left == 0 && rc2.top == 0 && rc2.right == 0 && rc2.bottom == 0, - "Update rectangle %d,%d-%d,%d is not empty!\n", rc2.left, rc2.top, - rc2.right, rc2.bottom); - - /* now test ValidateRgn */ - InvalidateRect( child, NULL, 1); - GetWindowRect( child, &rc); - MapWindowPoints( NULL, hwnd, (POINT*) &rc, 2); - rgn = CreateRectRgnIndirect( &rc); - ValidateRgn( hwnd, rgn); - ret = GetUpdateRect( child, &rc2, 0); - ok( !ret, "Expected GetUpdateRect to return zero, got %d\n", ret); - ok( rc2.left == 0 && rc2.top == 0 && rc2.right == 0 && rc2.bottom == 0, - "Update rectangle %d,%d-%d,%d is not empty!\n", rc2.left, rc2.top, - rc2.right, rc2.bottom); - - DeleteObject( rgn); - DestroyWindow( child ); -} - -static void nccalchelper(HWND hwnd, INT x, INT y, RECT *prc) -{ - RECT rc; - MoveWindow( hwnd, 0, 0, x, y, 0); - GetWindowRect( hwnd, prc); - rc = *prc; - DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)prc); - trace("window rect is %d,%d - %d,%d, nccalc rect is %d,%d - %d,%d\n", - rc.left,rc.top,rc.right,rc.bottom, prc->left,prc->top,prc->right,prc->bottom); -} - -static void test_nccalcscroll(HWND parent) -{ - RECT rc1; - INT sbheight = GetSystemMetrics( SM_CYHSCROLL); - INT sbwidth = GetSystemMetrics( SM_CXVSCROLL); - HWND hwnd = CreateWindowExA(0, "static", NULL, - WS_CHILD| WS_VISIBLE | WS_VSCROLL | WS_HSCROLL , - 10, 10, 200, 200, parent, 0, 0, NULL); - ShowWindow( parent, SW_SHOW); - UpdateWindow( parent); - - /* test window too low for a horizontal scroll bar */ - nccalchelper( hwnd, 100, sbheight, &rc1); - ok( rc1.bottom - rc1.top == sbheight, "Height should be %d size is %d,%d - %d,%d\n", - sbheight, rc1.left, rc1.top, rc1.right, rc1.bottom); - - /* test window just high enough for a horizontal scroll bar */ - nccalchelper( hwnd, 100, sbheight + 1, &rc1); - ok( rc1.bottom - rc1.top == 1, "Height should be %d size is %d,%d - %d,%d\n", - 1, rc1.left, rc1.top, rc1.right, rc1.bottom); - - /* test window too narrow for a vertical scroll bar */ - nccalchelper( hwnd, sbwidth - 1, 100, &rc1); - ok( rc1.right - rc1.left == sbwidth - 1 , "Width should be %d size is %d,%d - %d,%d\n", - sbwidth - 1, rc1.left, rc1.top, rc1.right, rc1.bottom); - - /* test window just wide enough for a vertical scroll bar */ - nccalchelper( hwnd, sbwidth, 100, &rc1); - ok( rc1.right - rc1.left == 0, "Width should be %d size is %d,%d - %d,%d\n", - 0, rc1.left, rc1.top, rc1.right, rc1.bottom); - - /* same test, but with client edge: not enough width */ - SetWindowLong( hwnd, GWL_EXSTYLE, WS_EX_CLIENTEDGE | GetWindowLong( hwnd, GWL_EXSTYLE)); - nccalchelper( hwnd, sbwidth, 100, &rc1); - ok( rc1.right - rc1.left == sbwidth - 2 * GetSystemMetrics(SM_CXEDGE), - "Width should be %d size is %d,%d - %d,%d\n", - sbwidth - 2 * GetSystemMetrics(SM_CXEDGE), rc1.left, rc1.top, rc1.right, rc1.bottom); - - DestroyWindow( hwnd); -} - -static void test_SetParent(void) -{ - HWND desktop = GetDesktopWindow(); - HMENU hMenu; - HWND ret, parent, child1, child2, child3, child4, sibling, popup; - BOOL bret; - - parent = CreateWindowExA(0, "static", NULL, WS_OVERLAPPEDWINDOW, - 100, 100, 200, 200, 0, 0, 0, NULL); - assert(parent != 0); - child1 = CreateWindowExA(0, "static", NULL, WS_CHILD, - 0, 0, 50, 50, parent, 0, 0, NULL); - assert(child1 != 0); - child2 = CreateWindowExA(0, "static", NULL, WS_POPUP, - 0, 0, 50, 50, child1, 0, 0, NULL); - assert(child2 != 0); - child3 = CreateWindowExA(0, "static", NULL, WS_CHILD, - 0, 0, 50, 50, child2, 0, 0, NULL); - assert(child3 != 0); - child4 = CreateWindowExA(0, "static", NULL, WS_POPUP, - 0, 0, 50, 50, child3, 0, 0, NULL); - assert(child4 != 0); - - trace("parent %p, child1 %p, child2 %p, child3 %p, child4 %p\n", - parent, child1, child2, child3, child4); - - check_parents(parent, desktop, 0, 0, 0, parent, parent); - check_parents(child1, parent, parent, parent, 0, parent, parent); - check_parents(child2, desktop, parent, parent, parent, child2, parent); - check_parents(child3, child2, child2, child2, 0, child2, parent); - check_parents(child4, desktop, child2, child2, child2, child4, parent); - - ok(!IsChild(desktop, parent), "wrong parent/child %p/%p\n", desktop, parent); - ok(!IsChild(desktop, child1), "wrong parent/child %p/%p\n", desktop, child1); - ok(!IsChild(desktop, child2), "wrong parent/child %p/%p\n", desktop, child2); - ok(!IsChild(desktop, child3), "wrong parent/child %p/%p\n", desktop, child3); - ok(!IsChild(desktop, child4), "wrong parent/child %p/%p\n", desktop, child4); - - ok(IsChild(parent, child1), "wrong parent/child %p/%p\n", parent, child1); - ok(!IsChild(desktop, child2), "wrong parent/child %p/%p\n", desktop, child2); - ok(!IsChild(parent, child2), "wrong parent/child %p/%p\n", parent, child2); - ok(!IsChild(child1, child2), "wrong parent/child %p/%p\n", child1, child2); - ok(!IsChild(parent, child3), "wrong parent/child %p/%p\n", parent, child3); - ok(IsChild(child2, child3), "wrong parent/child %p/%p\n", child2, child3); - ok(!IsChild(parent, child4), "wrong parent/child %p/%p\n", parent, child4); - ok(!IsChild(child3, child4), "wrong parent/child %p/%p\n", child3, child4); - ok(!IsChild(desktop, child4), "wrong parent/child %p/%p\n", desktop, child4); - - if (!is_win9x) /* Win9x doesn't survive this test */ - { - ok(!SetParent(parent, child1), "SetParent should fail\n"); - ok(!SetParent(child2, child3), "SetParent should fail\n"); - ok(SetParent(child1, parent) != 0, "SetParent should not fail\n"); - ret = SetParent(parent, child2); - todo_wine ok( !ret || broken( ret != 0 ), "SetParent should fail\n"); - if (ret) /* nt4, win2k */ - { - ret = SetParent(parent, child3); - ok(ret != 0, "SetParent should not fail\n"); - ret = SetParent(child2, parent); - ok(!ret, "SetParent should fail\n"); - ret = SetParent(parent, child4); - ok(ret != 0, "SetParent should not fail\n"); - check_parents(parent, child4, child4, 0, 0, child4, parent); - check_parents(child1, parent, parent, parent, 0, child4, parent); - check_parents(child2, desktop, parent, parent, parent, child2, parent); - check_parents(child3, child2, child2, child2, 0, child2, parent); - check_parents(child4, desktop, child2, child2, child2, child4, parent); - } - else - { - ret = SetParent(parent, child3); - ok(ret != 0, "SetParent should not fail\n"); - ret = SetParent(child2, parent); - ok(!ret, "SetParent should fail\n"); - ret = SetParent(parent, child4); - ok(!ret, "SetParent should fail\n"); - check_parents(parent, child3, child3, 0, 0, child2, parent); - check_parents(child1, parent, parent, parent, 0, child2, parent); - check_parents(child2, desktop, parent, parent, parent, child2, parent); - check_parents(child3, child2, child2, child2, 0, child2, parent); - check_parents(child4, desktop, child2, child2, child2, child4, parent); - } - } - else - skip("Win9x/WinMe crash\n"); - - hMenu = CreateMenu(); - sibling = CreateWindowExA(0, "static", NULL, WS_OVERLAPPEDWINDOW, - 100, 100, 200, 200, 0, hMenu, 0, NULL); - assert(sibling != 0); - - ok(SetParent(sibling, parent) != 0, "SetParent should not fail\n"); - ok(GetMenu(sibling) == hMenu, "SetParent should not remove menu\n"); - - ok(DestroyWindow(parent), "DestroyWindow() failed\n"); - - ok(!IsWindow(parent), "parent still exists\n"); - ok(!IsWindow(sibling), "sibling still exists\n"); - ok(!IsWindow(child1), "child1 still exists\n"); - ok(!IsWindow(child2), "child2 still exists\n"); - ok(!IsWindow(child3), "child3 still exists\n"); - ok(!IsWindow(child4), "child4 still exists\n"); - - parent = CreateWindowExA(0, "static", NULL, WS_OVERLAPPEDWINDOW, - 100, 100, 200, 200, 0, 0, 0, NULL); - assert(parent != 0); - child1 = CreateWindowExA(0, "static", NULL, WS_CHILD, - 0, 0, 50, 50, parent, 0, 0, NULL); - assert(child1 != 0); - popup = CreateWindowExA(0, "static", NULL, WS_POPUP, - 0, 0, 50, 50, 0, 0, 0, NULL); - assert(popup != 0); - - trace("parent %p, child %p, popup %p\n", parent, child1, popup); - - check_parents(parent, desktop, 0, 0, 0, parent, parent); - check_parents(child1, parent, parent, parent, 0, parent, parent); - check_parents(popup, desktop, 0, 0, 0, popup, popup); - - SetActiveWindow(parent); - SetFocus(parent); - check_active_state(parent, 0, parent); - - ret = SetParent(popup, child1); - ok(ret == desktop, "expected %p, got %p\n", desktop, ret); - check_parents(popup, child1, child1, 0, 0, parent, popup); -todo_wine - check_active_state(popup, 0, popup); - - SetActiveWindow(parent); - SetFocus(parent); - check_active_state(parent, 0, parent); - - bret = SetForegroundWindow(popup); -todo_wine { - ok(bret || broken(!bret), "SetForegroundWindow() failed\n"); - if (!bret) - check_active_state(popup, 0, popup); - else - check_active_state(popup, popup, popup); - } - - ok(DestroyWindow(parent), "DestroyWindow() failed\n"); - - ok(!IsWindow(parent), "parent still exists\n"); - ok(!IsWindow(child1), "child1 still exists\n"); - ok(!IsWindow(popup), "popup still exists\n"); -} - -static LRESULT WINAPI StyleCheckProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - LPCREATESTRUCT lpcs; - LPSTYLESTRUCT lpss; - - switch (msg) - { - case WM_NCCREATE: - case WM_CREATE: - lpcs = (LPCREATESTRUCT)lparam; - lpss = lpcs->lpCreateParams; - if (lpss) - { - if ((lpcs->dwExStyle & WS_EX_DLGMODALFRAME) || - ((!(lpcs->dwExStyle & WS_EX_STATICEDGE)) && - (lpcs->style & (WS_DLGFRAME | WS_THICKFRAME)))) - ok(lpcs->dwExStyle & WS_EX_WINDOWEDGE, "Window should have WS_EX_WINDOWEDGE style\n"); - else - ok(!(lpcs->dwExStyle & WS_EX_WINDOWEDGE), "Window shouldn't have WS_EX_WINDOWEDGE style\n"); - - ok((lpss->styleOld & ~WS_EX_WINDOWEDGE) == (lpcs->dwExStyle & ~WS_EX_WINDOWEDGE), - "Ex style (0x%08lx) should match what the caller passed to CreateWindowEx (0x%08lx)\n", - (lpss->styleOld & ~WS_EX_WINDOWEDGE), (lpcs->dwExStyle & ~WS_EX_WINDOWEDGE)); - - ok(lpss->styleNew == lpcs->style, - "Style (0x%08x) should match what the caller passed to CreateWindowEx (0x%08x)\n", - lpss->styleNew, lpcs->style); - } - break; - } - return DefWindowProc(hwnd, msg, wparam, lparam); -} - -static ATOM atomStyleCheckClass; - -static void register_style_check_class(void) -{ - WNDCLASS wc = - { - 0, - StyleCheckProc, - 0, - 0, - GetModuleHandle(NULL), - NULL, - LoadCursor(NULL, IDC_ARROW), - (HBRUSH)(COLOR_BTNFACE+1), - NULL, - TEXT("WineStyleCheck"), - }; - - atomStyleCheckClass = RegisterClass(&wc); -} - -static void check_window_style(DWORD dwStyleIn, DWORD dwExStyleIn, DWORD dwStyleOut, DWORD dwExStyleOut) -{ - DWORD dwActualStyle; - DWORD dwActualExStyle; - STYLESTRUCT ss; - HWND hwnd; - HWND hwndParent = NULL; - - ss.styleNew = dwStyleIn; - ss.styleOld = dwExStyleIn; - - if (dwStyleIn & WS_CHILD) - { - hwndParent = CreateWindowEx(0, MAKEINTATOM(atomStyleCheckClass), NULL, - WS_OVERLAPPEDWINDOW, 0, 0, 0, 0, NULL, NULL, NULL, NULL); - } - - hwnd = CreateWindowEx(dwExStyleIn, MAKEINTATOM(atomStyleCheckClass), NULL, - dwStyleIn, 0, 0, 0, 0, hwndParent, NULL, NULL, &ss); - assert(hwnd); - - flush_events( TRUE ); - - dwActualStyle = GetWindowLong(hwnd, GWL_STYLE); - dwActualExStyle = GetWindowLong(hwnd, GWL_EXSTYLE); - ok((dwActualStyle == dwStyleOut) && (dwActualExStyle == dwExStyleOut), - "Style (0x%08x) should really be 0x%08x and/or Ex style (0x%08x) should really be 0x%08x\n", - dwActualStyle, dwStyleOut, dwActualExStyle, dwExStyleOut); - - /* try setting the styles explicitly */ - SetWindowLong( hwnd, GWL_EXSTYLE, dwExStyleIn ); - SetWindowLong( hwnd, GWL_STYLE, dwStyleIn ); - dwActualStyle = GetWindowLong(hwnd, GWL_STYLE); - dwActualExStyle = GetWindowLong(hwnd, GWL_EXSTYLE); - /* WS_CLIPSIBLINGS can't be reset on top-level windows */ - if (dwStyleIn & WS_CHILD) dwStyleOut = dwStyleIn; - else dwStyleOut = dwStyleIn | WS_CLIPSIBLINGS; - /* WS_EX_WINDOWEDGE can't always be changed */ - if ((dwExStyleIn & WS_EX_DLGMODALFRAME) || (dwStyleIn & WS_THICKFRAME)) - dwExStyleOut = dwExStyleIn | WS_EX_WINDOWEDGE; - else if (dwStyleIn & (WS_CHILD | WS_POPUP)) - dwExStyleOut = dwExStyleIn & ~WS_EX_WINDOWEDGE; - else - dwExStyleOut = dwExStyleIn; - ok((dwActualStyle == dwStyleOut) && (dwActualExStyle == dwExStyleOut), - "%08x/%08x: Style (0x%08x) should really be 0x%08x and/or Ex style (0x%08x) should really be 0x%08x\n", - dwStyleIn, dwExStyleIn, dwActualStyle, dwStyleOut, dwActualExStyle, dwExStyleOut); - - DestroyWindow(hwnd); - if (hwndParent) DestroyWindow(hwndParent); -} - -/* tests what window styles the window manager automatically adds */ -static void test_window_styles(void) -{ - register_style_check_class(); - - check_window_style(0, 0, WS_CLIPSIBLINGS|WS_CAPTION, WS_EX_WINDOWEDGE); - check_window_style(WS_OVERLAPPEDWINDOW, 0, WS_CLIPSIBLINGS|WS_OVERLAPPEDWINDOW, WS_EX_WINDOWEDGE); - check_window_style(WS_CHILD, 0, WS_CHILD, 0); - check_window_style(WS_CHILD, WS_EX_WINDOWEDGE, WS_CHILD, 0); - check_window_style(0, WS_EX_TOOLWINDOW, WS_CLIPSIBLINGS|WS_CAPTION, WS_EX_WINDOWEDGE|WS_EX_TOOLWINDOW); - check_window_style(WS_POPUP, 0, WS_POPUP|WS_CLIPSIBLINGS, 0); - check_window_style(WS_POPUP, WS_EX_WINDOWEDGE, WS_POPUP|WS_CLIPSIBLINGS, 0); - check_window_style(WS_CHILD, WS_EX_DLGMODALFRAME, WS_CHILD, WS_EX_WINDOWEDGE|WS_EX_DLGMODALFRAME); - check_window_style(WS_CHILD, WS_EX_DLGMODALFRAME|WS_EX_STATICEDGE, WS_CHILD, WS_EX_STATICEDGE|WS_EX_WINDOWEDGE|WS_EX_DLGMODALFRAME); - check_window_style(WS_CAPTION, WS_EX_STATICEDGE, WS_CLIPSIBLINGS|WS_CAPTION, WS_EX_STATICEDGE|WS_EX_WINDOWEDGE); - check_window_style(0, WS_EX_APPWINDOW, WS_CLIPSIBLINGS|WS_CAPTION, WS_EX_APPWINDOW|WS_EX_WINDOWEDGE); - - if (pGetLayeredWindowAttributes) - { - check_window_style(0, WS_EX_LAYERED, WS_CLIPSIBLINGS|WS_CAPTION, WS_EX_LAYERED|WS_EX_WINDOWEDGE); - check_window_style(0, WS_EX_LAYERED|WS_EX_TRANSPARENT, WS_CLIPSIBLINGS|WS_CAPTION, WS_EX_LAYERED|WS_EX_TRANSPARENT|WS_EX_WINDOWEDGE); - check_window_style(0, WS_EX_LAYERED|WS_EX_TRANSPARENT|WS_EX_TOOLWINDOW, WS_CLIPSIBLINGS|WS_CAPTION, - WS_EX_LAYERED|WS_EX_TRANSPARENT|WS_EX_TOOLWINDOW|WS_EX_WINDOWEDGE); - } -} - -static void test_scrollwindow( HWND hwnd) -{ - HDC hdc; - RECT rc, rc2, rc3; - COLORREF colr; - - ShowWindow( hwnd, SW_SHOW); - UpdateWindow( hwnd); - flush_events( TRUE ); - GetClientRect( hwnd, &rc); - hdc = GetDC( hwnd); - /* test ScrollWindow(Ex) with no clip rectangle */ - /* paint the lower half of the window black */ - rc2 = rc; - rc2.top = ( rc2.top + rc2.bottom) / 2; - FillRect( hdc, &rc2, GetStockObject(BLACK_BRUSH)); - /* paint the upper half of the window white */ - rc2.bottom = rc2.top; - rc2.top =0; - FillRect( hdc, &rc2, GetStockObject(WHITE_BRUSH)); - /* scroll lower half up */ - rc2 = rc; - rc2.top = ( rc2.top + rc2.bottom) / 2; - ScrollWindowEx( hwnd, 0, - rc2.top, &rc2, NULL, NULL, NULL, SW_ERASE); - flush_events(FALSE); - /* expected: black should have scrolled to the upper half */ - colr = GetPixel( hdc, (rc2.left+rc2.right)/ 2, rc2.bottom / 4 ); - ok ( colr == 0, "pixel should be black, color is %08x\n", colr); - /* Repeat that test of ScrollWindow(Ex) now with clip rectangle */ - /* paint the lower half of the window black */ - rc2 = rc; - rc2.top = ( rc2.top + rc2.bottom) / 2; - FillRect( hdc, &rc2, GetStockObject(BLACK_BRUSH)); - /* paint the upper half of the window white */ - rc2.bottom = rc2.top; - rc2.top =0; - FillRect( hdc, &rc2, GetStockObject(WHITE_BRUSH)); - /* scroll lower half up */ - rc2 = rc; - rc2.top = ( rc2.top + rc2.bottom) / 2; - rc3 = rc; - rc3.left = rc3.right / 4; - rc3.right -= rc3.right / 4; - ScrollWindowEx( hwnd, 0, - rc2.top, &rc2, &rc3, NULL, NULL, SW_ERASE); - flush_events(FALSE); - /* expected: black should have scrolled to the upper half */ - colr = GetPixel( hdc, (rc2.left+rc2.right)/ 2, rc2.bottom / 4 ); - ok ( colr == 0, "pixel should be black, color is %08x\n", colr); - - /* clean up */ - ReleaseDC( hwnd, hdc); -} - -static void test_scrollvalidate( HWND parent) -{ - HDC hdc; - HRGN hrgn=CreateRectRgn(0,0,0,0); - HRGN exprgn, tmprgn, clipping; - RECT rc, rcu, cliprc; - /* create two overlapping child windows. The visual region - * of hwnd1 is clipped by the overlapping part of - * hwnd2 because of the WS_CLIPSIBLING style */ - HWND hwnd1, hwnd2; - - clipping = CreateRectRgn(0,0,0,0); - tmprgn = CreateRectRgn(0,0,0,0); - exprgn = CreateRectRgn(0,0,0,0); - hwnd2 = CreateWindowExA(0, "static", NULL, - WS_CHILD| WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER , - 75, 30, 100, 100, parent, 0, 0, NULL); - hwnd1 = CreateWindowExA(0, "static", NULL, - WS_CHILD| WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER , - 25, 50, 100, 100, parent, 0, 0, NULL); - ShowWindow( parent, SW_SHOW); - UpdateWindow( parent); - GetClientRect( hwnd1, &rc); - cliprc=rc; - SetRectRgn( clipping, 10, 10, 90, 90); - hdc = GetDC( hwnd1); - /* for a visual touch */ - TextOut( hdc, 0,10, "0123456789", 10); - ScrollDC( hdc, -10, -5, &rc, &cliprc, hrgn, &rcu); - if (winetest_debug > 0) dump_region(hrgn); - /* create a region with what is expected */ - SetRectRgn( exprgn, 39,0,49,74); - SetRectRgn( tmprgn, 88,79,98,93); - CombineRgn( exprgn, exprgn, tmprgn, RGN_OR); - SetRectRgn( tmprgn, 0,93,98,98); - CombineRgn( exprgn, exprgn, tmprgn, RGN_OR); - ok( EqualRgn( exprgn, hrgn), "wrong update region\n"); - trace("update rect is %d,%d - %d,%d\n", - rcu.left,rcu.top,rcu.right,rcu.bottom); - /* now with clipping region */ - SelectClipRgn( hdc, clipping); - ScrollDC( hdc, -10, -5, &rc, &cliprc, hrgn, &rcu); - if (winetest_debug > 0) dump_region(hrgn); - /* create a region with what is expected */ - SetRectRgn( exprgn, 39,10,49,74); - SetRectRgn( tmprgn, 80,79,90,85); - CombineRgn( exprgn, exprgn, tmprgn, RGN_OR); - SetRectRgn( tmprgn, 10,85,90,90); - CombineRgn( exprgn, exprgn, tmprgn, RGN_OR); - ok( EqualRgn( exprgn, hrgn), "wrong update region\n"); - trace("update rect is %d,%d - %d,%d\n", - rcu.left,rcu.top,rcu.right,rcu.bottom); - ReleaseDC( hwnd1, hdc); - - /* test scrolling a window with an update region */ - DestroyWindow( hwnd2); - ValidateRect( hwnd1, NULL); - SetRect( &rc, 40,40, 50,50); - InvalidateRect( hwnd1, &rc, 1); - GetClientRect( hwnd1, &rc); - cliprc=rc; - ScrollWindowEx( hwnd1, -10, 0, &rc, &cliprc, hrgn, &rcu, - SW_SCROLLCHILDREN | SW_INVALIDATE); - if (winetest_debug > 0) dump_region(hrgn); - SetRectRgn( exprgn, 88,0,98,98); - SetRectRgn( tmprgn, 30, 40, 50, 50); - CombineRgn( exprgn, exprgn, tmprgn, RGN_OR); - ok( EqualRgn( exprgn, hrgn), "wrong update region\n"); - - /* clear an update region */ - UpdateWindow( hwnd1 ); - - SetRect( &rc, 0,40, 100,60); - SetRect( &cliprc, 0,0, 100,100); - ScrollWindowEx( hwnd1, 0, -25, &rc, &cliprc, hrgn, &rcu, SW_INVALIDATE); - if (winetest_debug > 0) dump_region( hrgn ); - SetRectRgn( exprgn, 0, 40, 98, 60 ); - ok( EqualRgn( exprgn, hrgn), "wrong update region in excessive scroll\n"); - - /* now test ScrollWindowEx with a combination of - * WS_CLIPCHILDREN style and SW_SCROLLCHILDREN flag */ - /* make hwnd2 the child of hwnd1 */ - hwnd2 = CreateWindowExA(0, "static", NULL, - WS_CHILD| WS_VISIBLE | WS_BORDER , - 50, 50, 100, 100, hwnd1, 0, 0, NULL); - SetWindowLong( hwnd1, GWL_STYLE, GetWindowLong( hwnd1, GWL_STYLE) & ~WS_CLIPSIBLINGS); - GetClientRect( hwnd1, &rc); - cliprc=rc; - - /* WS_CLIPCHILDREN and SW_SCROLLCHILDREN */ - SetWindowLong( hwnd1, GWL_STYLE, GetWindowLong( hwnd1, GWL_STYLE) | WS_CLIPCHILDREN ); - ValidateRect( hwnd1, NULL); - ValidateRect( hwnd2, NULL); - ScrollWindowEx( hwnd1, -10, -10, &rc, &cliprc, hrgn, &rcu, - SW_SCROLLCHILDREN | SW_INVALIDATE); - if (winetest_debug > 0) dump_region(hrgn); - SetRectRgn( exprgn, 88,0,98,88); - SetRectRgn( tmprgn, 0,88,98,98); - CombineRgn( exprgn, exprgn, tmprgn, RGN_OR); - ok( EqualRgn( exprgn, hrgn), "wrong update region\n"); - - /* SW_SCROLLCHILDREN */ - SetWindowLong( hwnd1, GWL_STYLE, GetWindowLong( hwnd1, GWL_STYLE) & ~WS_CLIPCHILDREN ); - ValidateRect( hwnd1, NULL); - ValidateRect( hwnd2, NULL); - ScrollWindowEx( hwnd1, -10, -10, &rc, &cliprc, hrgn, &rcu, SW_SCROLLCHILDREN | SW_INVALIDATE); - if (winetest_debug > 0) dump_region(hrgn); - /* expected region is the same as in previous test */ - ok( EqualRgn( exprgn, hrgn), "wrong update region\n"); - - /* no SW_SCROLLCHILDREN */ - SetWindowLong( hwnd1, GWL_STYLE, GetWindowLong( hwnd1, GWL_STYLE) & ~WS_CLIPCHILDREN ); - ValidateRect( hwnd1, NULL); - ValidateRect( hwnd2, NULL); - ScrollWindowEx( hwnd1, -10, -10, &rc, &cliprc, hrgn, &rcu, SW_INVALIDATE); - if (winetest_debug > 0) dump_region(hrgn); - /* expected region is the same as in previous test */ - ok( EqualRgn( exprgn, hrgn), "wrong update region\n"); - - /* WS_CLIPCHILDREN and no SW_SCROLLCHILDREN */ - SetWindowLong( hwnd1, GWL_STYLE, GetWindowLong( hwnd1, GWL_STYLE) | WS_CLIPCHILDREN ); - ValidateRect( hwnd1, NULL); - ValidateRect( hwnd2, NULL); - ScrollWindowEx( hwnd1, -10, -10, &rc, &cliprc, hrgn, &rcu, SW_INVALIDATE); - if (winetest_debug > 0) dump_region(hrgn); - SetRectRgn( exprgn, 88,0,98,20); - SetRectRgn( tmprgn, 20,20,98,30); - CombineRgn( exprgn, exprgn, tmprgn, RGN_OR); - SetRectRgn( tmprgn, 20,30,30,88); - CombineRgn( exprgn, exprgn, tmprgn, RGN_OR); - SetRectRgn( tmprgn, 0,88,30,98); - CombineRgn( exprgn, exprgn, tmprgn, RGN_OR); - ok( EqualRgn( exprgn, hrgn), "wrong update region\n"); - - /* clean up */ - DeleteObject( hrgn); - DeleteObject( exprgn); - DeleteObject( tmprgn); - DestroyWindow( hwnd1); - DestroyWindow( hwnd2); -} - -/* couple of tests of return values of scrollbar functions - * called on a scrollbarless window */ -static void test_scroll(void) -{ - BOOL ret; - INT min, max; - SCROLLINFO si; - HWND hwnd = CreateWindowExA(0, "Static", "Wine test window", - WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP, - 100, 100, 200, 200, 0, 0, 0, NULL); - /* horizontal */ - ret = GetScrollRange( hwnd, SB_HORZ, &min, &max); - if (!ret) /* win9x */ - { - win_skip( "GetScrollRange doesn't work\n" ); - DestroyWindow( hwnd); - return; - } - ok( min == 0, "minimum scroll pos is %d (should be zero)\n", min); - ok( max == 0, "maximum scroll pos is %d (should be zero)\n", min); - si.cbSize = sizeof( si); - si.fMask = SIF_PAGE; - si.nPage = 0xdeadbeef; - ret = GetScrollInfo( hwnd, SB_HORZ, &si); - ok( !ret, "GetScrollInfo returns %d (should be zero)\n", ret); - ok( si.nPage == 0xdeadbeef, "unexpected value for nPage is %d\n", si.nPage); - /* vertical */ - ret = GetScrollRange( hwnd, SB_VERT, &min, &max); - ok( ret, "GetScrollRange returns FALSE\n"); - ok( min == 0, "minimum scroll pos is %d (should be zero)\n", min); - ok( max == 0, "maximum scroll pos is %d (should be zero)\n", min); - si.cbSize = sizeof( si); - si.fMask = SIF_PAGE; - si.nPage = 0xdeadbeef; - ret = GetScrollInfo( hwnd, SB_VERT, &si); - ok( !ret, "GetScrollInfo returns %d (should be zero)\n", ret); - ok( si.nPage == 0xdeadbeef, "unexpected value for nPage is %d\n", si.nPage); - /* clean up */ - DestroyWindow( hwnd); -} - -static void test_scrolldc( HWND parent) -{ - HDC hdc; - HRGN exprgn, tmprgn, hrgn; - RECT rc, rc2, rcu, cliprc; - HWND hwnd1; - COLORREF colr; - - hrgn = CreateRectRgn(0,0,0,0); - tmprgn = CreateRectRgn(0,0,0,0); - exprgn = CreateRectRgn(0,0,0,0); - - hwnd1 = CreateWindowExA(0, "static", NULL, - WS_CHILD| WS_VISIBLE, - 25, 50, 100, 100, parent, 0, 0, NULL); - ShowWindow( parent, SW_SHOW); - UpdateWindow( parent); - flush_events( TRUE ); - GetClientRect( hwnd1, &rc); - hdc = GetDC( hwnd1); - /* paint the upper half of the window black */ - rc2 = rc; - rc2.bottom = ( rc.top + rc.bottom) /2; - FillRect( hdc, &rc2, GetStockObject(BLACK_BRUSH)); - /* clip region is the lower half */ - cliprc=rc; - cliprc.top = (rc.top + rc.bottom) /2; - /* test whether scrolled pixels are properly clipped */ - colr = GetPixel( hdc, (rc.left+rc.right)/2, ( rc.top + rc.bottom) /2 - 1); - ok ( colr == 0, "pixel should be black, color is %08x\n", colr); - /* this scroll should not cause any visible changes */ - ScrollDC( hdc, 5, -20, &rc, &cliprc, hrgn, &rcu); - colr = GetPixel( hdc, (rc.left+rc.right)/2, ( rc.top + rc.bottom) /2 - 1); - ok ( colr == 0, "pixel should be black, color is %08x\n", colr); - /* test with NULL clip rect */ - ScrollDC( hdc, 20, -20, &rc, NULL, hrgn, &rcu); - /*FillRgn(hdc, hrgn, GetStockObject(WHITE_BRUSH));*/ - trace("update rect: %d,%d - %d,%d\n", - rcu.left, rcu.top, rcu.right, rcu.bottom); - if (winetest_debug > 0) dump_region(hrgn); - SetRect(&rc2, 0, 0, 100, 100); - ok(EqualRect(&rcu, &rc2), "rects do not match (%d,%d-%d,%d) / (%d,%d-%d,%d)\n", - rcu.left, rcu.top, rcu.right, rcu.bottom, rc2.left, rc2.top, rc2.right, rc2.bottom); - - SetRectRgn( exprgn, 0, 0, 20, 80); - SetRectRgn( tmprgn, 0, 80, 100, 100); - CombineRgn(exprgn, exprgn, tmprgn, RGN_OR); - if (winetest_debug > 0) dump_region(exprgn); - ok(EqualRgn(exprgn, hrgn), "wrong update region\n"); - /* test clip rect > scroll rect */ - FillRect( hdc, &rc, GetStockObject(WHITE_BRUSH)); - rc2=rc; - InflateRect( &rc2, -(rc.right-rc.left)/4, -(rc.bottom-rc.top)/4); - FillRect( hdc, &rc2, GetStockObject(BLACK_BRUSH)); - ScrollDC( hdc, 10, 10, &rc2, &rc, hrgn, &rcu); - SetRectRgn( exprgn, 25, 25, 75, 35); - SetRectRgn( tmprgn, 25, 35, 35, 75); - CombineRgn(exprgn, exprgn, tmprgn, RGN_OR); - ok(EqualRgn(exprgn, hrgn), "wrong update region\n"); - trace("update rect: %d,%d - %d,%d\n", - rcu.left, rcu.top, rcu.right, rcu.bottom); - if (winetest_debug > 0) dump_region(hrgn); - - /* clean up */ - DeleteObject(hrgn); - DeleteObject(exprgn); - DeleteObject(tmprgn); - DestroyWindow(hwnd1); -} - -static void test_params(void) -{ - HWND hwnd; - INT rc; - - ok(!IsWindow(0), "IsWindow(0)\n"); - ok(!IsWindow(HWND_BROADCAST), "IsWindow(HWND_BROADCAST)\n"); - ok(!IsWindow(HWND_TOPMOST), "IsWindow(HWND_TOPMOST)\n"); - - /* Just a param check */ - if (pGetMonitorInfoA) - { - SetLastError(0xdeadbeef); - rc = GetWindowText(hwndMain2, NULL, 1024); - ok( rc==0, "GetWindowText: rc=%d err=%d\n",rc,GetLastError()); - } - else - { - /* Skips actually on Win95 and NT4 */ - win_skip("Test would crash on Win95\n"); - } - - SetLastError(0xdeadbeef); - hwnd=CreateWindow("LISTBOX", "TestList", - (LBS_STANDARD & ~LBS_SORT), - 0, 0, 100, 100, - NULL, (HMENU)1, NULL, 0); - - ok(!hwnd || broken(hwnd != NULL), /* w2k3 sp2 */ - "CreateWindow with invalid menu handle should fail\n"); - if (!hwnd) - ok(GetLastError() == ERROR_INVALID_MENU_HANDLE || /* NT */ - GetLastError() == 0xdeadbeef, /* Win9x */ - "wrong last error value %d\n", GetLastError()); -} - -static void test_AWRwindow(LPCSTR class, LONG style, LONG exStyle, BOOL menu) -{ - HWND hwnd = 0; - - hwnd = CreateWindowEx(exStyle, class, class, style, - 110, 100, - 225, 200, - 0, - menu ? hmenu : 0, - 0, 0); - if (!hwnd) { - trace("Failed to create window class=%s, style=0x%08x, exStyle=0x%08x\n", class, style, exStyle); - return; - } - ShowWindow(hwnd, SW_SHOW); - - test_nonclient_area(hwnd); - - SetMenu(hwnd, 0); - DestroyWindow(hwnd); -} - -static BOOL AWR_init(void) -{ - WNDCLASS class; - - class.style = CS_HREDRAW | CS_VREDRAW; - class.lpfnWndProc = DefWindowProcA; - class.cbClsExtra = 0; - class.cbWndExtra = 0; - class.hInstance = 0; - class.hIcon = LoadIcon (0, IDI_APPLICATION); - class.hCursor = LoadCursor (0, IDC_ARROW); - class.hbrBackground = 0; - class.lpszMenuName = 0; - class.lpszClassName = szAWRClass; - - if (!RegisterClass (&class)) { - ok(FALSE, "RegisterClass failed\n"); - return FALSE; - } - - hmenu = CreateMenu(); - if (!hmenu) - return FALSE; - ok(hmenu != 0, "Failed to create menu\n"); - ok(AppendMenu(hmenu, MF_STRING, 1, "Test!"), "Failed to create menu item\n"); - - return TRUE; -} - - -static void test_AWR_window_size(BOOL menu) -{ - LONG styles[] = { - WS_POPUP, - WS_MAXIMIZE, WS_BORDER, WS_DLGFRAME, - WS_SYSMENU, - WS_THICKFRAME, - WS_MINIMIZEBOX, WS_MAXIMIZEBOX, - WS_HSCROLL, WS_VSCROLL - }; - LONG exStyles[] = { - WS_EX_CLIENTEDGE, - WS_EX_TOOLWINDOW, WS_EX_WINDOWEDGE, - WS_EX_APPWINDOW, -#if 0 - /* These styles have problems on (at least) WinXP (SP2) and Wine */ - WS_EX_DLGMODALFRAME, - WS_EX_STATICEDGE, -#endif - }; - - int i; - - /* A exhaustive check of all the styles takes too long - * so just do a (hopefully representative) sample - */ - for (i = 0; i < COUNTOF(styles); ++i) - test_AWRwindow(szAWRClass, styles[i], 0, menu); - for (i = 0; i < COUNTOF(exStyles); ++i) { - test_AWRwindow(szAWRClass, WS_POPUP, exStyles[i], menu); - test_AWRwindow(szAWRClass, WS_THICKFRAME, exStyles[i], menu); - } -} -#undef COUNTOF - -#define SHOWSYSMETRIC(SM) trace(#SM "=%d\n", GetSystemMetrics(SM)) - -static void test_AdjustWindowRect(void) -{ - if (!AWR_init()) - return; - - SHOWSYSMETRIC(SM_CYCAPTION); - SHOWSYSMETRIC(SM_CYSMCAPTION); - SHOWSYSMETRIC(SM_CYMENU); - SHOWSYSMETRIC(SM_CXEDGE); - SHOWSYSMETRIC(SM_CYEDGE); - SHOWSYSMETRIC(SM_CXVSCROLL); - SHOWSYSMETRIC(SM_CYHSCROLL); - SHOWSYSMETRIC(SM_CXFRAME); - SHOWSYSMETRIC(SM_CYFRAME); - SHOWSYSMETRIC(SM_CXDLGFRAME); - SHOWSYSMETRIC(SM_CYDLGFRAME); - SHOWSYSMETRIC(SM_CXBORDER); - SHOWSYSMETRIC(SM_CYBORDER); - - test_AWR_window_size(FALSE); - test_AWR_window_size(TRUE); - - DestroyMenu(hmenu); -} -#undef SHOWSYSMETRIC - - -/* Global variables to trigger exit from loop */ -static int redrawComplete, WMPAINT_count; - -static LRESULT WINAPI redraw_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - switch (msg) - { - case WM_PAINT: - trace("doing WM_PAINT %d\n", WMPAINT_count); - WMPAINT_count++; - if (WMPAINT_count > 10 && redrawComplete == 0) { - PAINTSTRUCT ps; - BeginPaint(hwnd, &ps); - EndPaint(hwnd, &ps); - return 1; - } - return 0; - } - return DefWindowProc(hwnd, msg, wparam, lparam); -} - -/* Ensure we exit from RedrawNow regardless of invalidated area */ -static void test_redrawnow(void) -{ - WNDCLASSA cls; - HWND hwndMain; - - cls.style = CS_DBLCLKS; - cls.lpfnWndProc = redraw_window_procA; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(0); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "RedrawWindowClass"; - - if(!RegisterClassA(&cls)) { - trace("Register failed %d\n", GetLastError()); - return; - } - - hwndMain = CreateWindowA("RedrawWindowClass", "Main Window", WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, 0, 100, 100, NULL, NULL, 0, NULL); - - ok( WMPAINT_count == 0, "Multiple unexpected WM_PAINT calls %d\n", WMPAINT_count); - ShowWindow(hwndMain, SW_SHOW); - ok( WMPAINT_count == 0, "Multiple unexpected WM_PAINT calls %d\n", WMPAINT_count); - RedrawWindow(hwndMain, NULL,NULL,RDW_UPDATENOW | RDW_ALLCHILDREN); - ok( WMPAINT_count == 1 || broken(WMPAINT_count == 0), /* sometimes on win9x */ - "Multiple unexpected WM_PAINT calls %d\n", WMPAINT_count); - redrawComplete = TRUE; - ok( WMPAINT_count < 10, "RedrawWindow (RDW_UPDATENOW) never completed (%d)\n", WMPAINT_count); - - /* clean up */ - DestroyWindow( hwndMain); -} - -struct parentdc_stat { - RECT client; - RECT clip; - RECT paint; -}; - -struct parentdc_test { - struct parentdc_stat main, main_todo; - struct parentdc_stat child1, child1_todo; - struct parentdc_stat child2, child2_todo; -}; - -static LRESULT WINAPI parentdc_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - RECT rc; - PAINTSTRUCT ps; - - struct parentdc_stat *t = (struct parentdc_stat *)GetWindowLongPtrA(hwnd, GWLP_USERDATA); - - switch (msg) - { - case WM_PAINT: - GetClientRect(hwnd, &rc); - CopyRect(&t->client, &rc); - GetWindowRect(hwnd, &rc); - trace("WM_PAINT: hwnd %p, client rect (%d,%d)-(%d,%d), window rect (%d,%d)-(%d,%d)\n", hwnd, - t->client.left, t->client.top, t->client.right, t->client.bottom, - rc.left, rc.top, rc.right, rc.bottom); - BeginPaint(hwnd, &ps); - CopyRect(&t->paint, &ps.rcPaint); - GetClipBox(ps.hdc, &rc); - CopyRect(&t->clip, &rc); - trace("clip rect (%d,%d)-(%d,%d), paint rect (%d,%d)-(%d,%d)\n", - rc.left, rc.top, rc.right, rc.bottom, - ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.right, ps.rcPaint.bottom); - EndPaint(hwnd, &ps); - return 0; - } - return DefWindowProc(hwnd, msg, wparam, lparam); -} - -static void zero_parentdc_stat(struct parentdc_stat *t) -{ - SetRectEmpty(&t->client); - SetRectEmpty(&t->clip); - SetRectEmpty(&t->paint); -} - -static void zero_parentdc_test(struct parentdc_test *t) -{ - zero_parentdc_stat(&t->main); - zero_parentdc_stat(&t->child1); - zero_parentdc_stat(&t->child2); -} - -#define parentdc_field_ok(t, w, r, f, got) \ - ok (t.w.r.f==got.w.r.f, "window " #w ", rect " #r ", field " #f \ - ": expected %d, got %d\n", \ - t.w.r.f, got.w.r.f) - -#define parentdc_todo_field_ok(t, w, r, f, got) \ - if (t.w##_todo.r.f) todo_wine { parentdc_field_ok(t, w, r, f, got); } \ - else parentdc_field_ok(t, w, r, f, got) - -#define parentdc_rect_ok(t, w, r, got) \ - parentdc_todo_field_ok(t, w, r, left, got); \ - parentdc_todo_field_ok(t, w, r, top, got); \ - parentdc_todo_field_ok(t, w, r, right, got); \ - parentdc_todo_field_ok(t, w, r, bottom, got); - -#define parentdc_win_ok(t, w, got) \ - parentdc_rect_ok(t, w, client, got); \ - parentdc_rect_ok(t, w, clip, got); \ - parentdc_rect_ok(t, w, paint, got); - -#define parentdc_ok(t, got) \ - parentdc_win_ok(t, main, got); \ - parentdc_win_ok(t, child1, got); \ - parentdc_win_ok(t, child2, got); - -static void test_csparentdc(void) -{ - WNDCLASSA clsMain, cls; - HWND hwndMain, hwnd1, hwnd2; - RECT rc; - - struct parentdc_test test_answer; - -#define nothing_todo {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}} - const struct parentdc_test test1 = - { - {{0, 0, 150, 150}, {0, 0, 150, 150}, {0, 0, 150, 150}}, nothing_todo, - {{0, 0, 40, 40}, {-20, -20, 130, 130}, {0, 0, 40, 40}}, {{0, 0, 0, 0}, {1, 1, 1, 1}, {0, 0, 0, 0}}, - {{0, 0, 40, 40}, {-40, -40, 110, 110}, {0, 0, 40, 40}}, {{0, 0, 0, 0}, {1, 1, 1, 1}, {0, 0, 0, 0}}, - }; - - const struct parentdc_test test2 = - { - {{0, 0, 150, 150}, {0, 0, 50, 50}, {0, 0, 50, 50}}, nothing_todo, - {{0, 0, 40, 40}, {-20, -20, 30, 30}, {0, 0, 30, 30}}, {{0, 0, 0, 0}, {1, 1, 0, 0}, {0, 0, 0, 0}}, - {{0, 0, 40, 40}, {-40, -40, 10, 10}, {0, 0, 10, 10}}, {{0, 0, 0, 0}, {1, 1, 0, 0}, {0, 0, 0, 0}}, - }; - - const struct parentdc_test test3 = - { - {{0, 0, 150, 150}, {0, 0, 10, 10}, {0, 0, 10, 10}}, nothing_todo, - {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, nothing_todo, - {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, nothing_todo, - }; - - const struct parentdc_test test4 = - { - {{0, 0, 150, 150}, {40, 40, 50, 50}, {40, 40, 50, 50}}, nothing_todo, - {{0, 0, 40, 40}, {20, 20, 30, 30}, {20, 20, 30, 30}}, nothing_todo, - {{0, 0, 40, 40}, {0, 0, 10, 10}, {0, 0, 10, 10}}, nothing_todo, - }; - - const struct parentdc_test test5 = - { - {{0, 0, 150, 150}, {20, 20, 60, 60}, {20, 20, 60, 60}}, nothing_todo, - {{0, 0, 40, 40}, {-20, -20, 130, 130}, {0, 0, 40, 40}}, {{0, 0, 0, 0}, {1, 1, 1, 1}, {0, 0, 0, 0}}, - {{0, 0, 40, 40}, {-20, -20, 20, 20}, {0, 0, 20, 20}}, {{0, 0, 0, 0}, {1, 1, 0, 0}, {0, 0, 0, 0}}, - }; - - const struct parentdc_test test6 = - { - {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, nothing_todo, - {{0, 0, 40, 40}, {0, 0, 10, 10}, {0, 0, 10, 10}}, nothing_todo, - {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, nothing_todo, - }; - - const struct parentdc_test test7 = - { - {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, nothing_todo, - {{0, 0, 40, 40}, {-20, -20, 130, 130}, {0, 0, 40, 40}}, {{0, 0, 0, 0}, {1, 1, 1, 1}, {0, 0, 0, 0}}, - {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, nothing_todo, - }; -#undef nothing_todo - - clsMain.style = CS_DBLCLKS; - clsMain.lpfnWndProc = parentdc_window_procA; - clsMain.cbClsExtra = 0; - clsMain.cbWndExtra = 0; - clsMain.hInstance = GetModuleHandleA(0); - clsMain.hIcon = 0; - clsMain.hCursor = LoadCursorA(0, IDC_ARROW); - clsMain.hbrBackground = GetStockObject(WHITE_BRUSH); - clsMain.lpszMenuName = NULL; - clsMain.lpszClassName = "ParentDcMainWindowClass"; - - if(!RegisterClassA(&clsMain)) { - trace("Register failed %d\n", GetLastError()); - return; - } - - cls.style = CS_DBLCLKS | CS_PARENTDC; - cls.lpfnWndProc = parentdc_window_procA; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(0); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "ParentDcWindowClass"; - - if(!RegisterClassA(&cls)) { - trace("Register failed %d\n", GetLastError()); - return; - } - - SetRect(&rc, 0, 0, 150, 150); - AdjustWindowRectEx(&rc, WS_OVERLAPPEDWINDOW, FALSE, 0); - hwndMain = CreateWindowA("ParentDcMainWindowClass", "Main Window", WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, 0, rc.right - rc.left, rc.bottom - rc.top, NULL, NULL, 0, NULL); - SetWindowLongPtrA(hwndMain, GWLP_USERDATA, (DWORD_PTR)&test_answer.main); - hwnd1 = CreateWindowA("ParentDcWindowClass", "Child Window 1", WS_CHILD, - 20, 20, 40, 40, hwndMain, NULL, 0, NULL); - SetWindowLongPtrA(hwnd1, GWLP_USERDATA, (DWORD_PTR)&test_answer.child1); - hwnd2 = CreateWindowA("ParentDcWindowClass", "Child Window 2", WS_CHILD, - 40, 40, 40, 40, hwndMain, NULL, 0, NULL); - SetWindowLongPtrA(hwnd2, GWLP_USERDATA, (DWORD_PTR)&test_answer.child2); - ShowWindow(hwndMain, SW_SHOW); - ShowWindow(hwnd1, SW_SHOW); - ShowWindow(hwnd2, SW_SHOW); - SetWindowPos(hwndMain, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE); - flush_events( TRUE ); - - zero_parentdc_test(&test_answer); - InvalidateRect(hwndMain, NULL, TRUE); - flush_events( TRUE ); - parentdc_ok(test1, test_answer); - - zero_parentdc_test(&test_answer); - SetRect(&rc, 0, 0, 50, 50); - InvalidateRect(hwndMain, &rc, TRUE); - flush_events( TRUE ); - parentdc_ok(test2, test_answer); - - zero_parentdc_test(&test_answer); - SetRect(&rc, 0, 0, 10, 10); - InvalidateRect(hwndMain, &rc, TRUE); - flush_events( TRUE ); - parentdc_ok(test3, test_answer); - - zero_parentdc_test(&test_answer); - SetRect(&rc, 40, 40, 50, 50); - InvalidateRect(hwndMain, &rc, TRUE); - flush_events( TRUE ); - parentdc_ok(test4, test_answer); - - zero_parentdc_test(&test_answer); - SetRect(&rc, 20, 20, 60, 60); - InvalidateRect(hwndMain, &rc, TRUE); - flush_events( TRUE ); - parentdc_ok(test5, test_answer); - - zero_parentdc_test(&test_answer); - SetRect(&rc, 0, 0, 10, 10); - InvalidateRect(hwnd1, &rc, TRUE); - flush_events( TRUE ); - parentdc_ok(test6, test_answer); - - zero_parentdc_test(&test_answer); - SetRect(&rc, -5, -5, 65, 65); - InvalidateRect(hwnd1, &rc, TRUE); - flush_events( TRUE ); - parentdc_ok(test7, test_answer); - - DestroyWindow(hwndMain); - DestroyWindow(hwnd1); - DestroyWindow(hwnd2); -} - -static LRESULT WINAPI def_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - return DefWindowProcA(hwnd, msg, wparam, lparam); -} - -static LRESULT WINAPI def_window_procW(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - return DefWindowProcW(hwnd, msg, wparam, lparam); -} - -static void test_IsWindowUnicode(void) -{ - static const char ansi_class_nameA[] = "ansi class name"; - static const WCHAR ansi_class_nameW[] = {'a','n','s','i',' ','c','l','a','s','s',' ','n','a','m','e',0}; - static const char unicode_class_nameA[] = "unicode class name"; - static const WCHAR unicode_class_nameW[] = {'u','n','i','c','o','d','e',' ','c','l','a','s','s',' ','n','a','m','e',0}; - WNDCLASSA classA; - WNDCLASSW classW; - HWND hwnd; - - memset(&classW, 0, sizeof(classW)); - classW.hInstance = GetModuleHandleA(0); - classW.lpfnWndProc = def_window_procW; - classW.lpszClassName = unicode_class_nameW; - if (!RegisterClassW(&classW)) return; /* this catches Win9x as well */ - - memset(&classA, 0, sizeof(classA)); - classA.hInstance = GetModuleHandleA(0); - classA.lpfnWndProc = def_window_procA; - classA.lpszClassName = ansi_class_nameA; - assert(RegisterClassA(&classA)); - - /* unicode class: window proc */ - hwnd = CreateWindowExW(0, unicode_class_nameW, NULL, WS_POPUP, - 0, 0, 100, 100, GetDesktopWindow(), 0, 0, NULL); - assert(hwnd); - - ok(IsWindowUnicode(hwnd), "IsWindowUnicode expected to return TRUE\n"); - SetWindowLongPtrA(hwnd, GWLP_WNDPROC, (ULONG_PTR)def_window_procA); - ok(!IsWindowUnicode(hwnd), "IsWindowUnicode expected to return FALSE\n"); - SetWindowLongPtrW(hwnd, GWLP_WNDPROC, (ULONG_PTR)def_window_procW); - ok(IsWindowUnicode(hwnd), "IsWindowUnicode expected to return TRUE\n"); - - DestroyWindow(hwnd); - - hwnd = CreateWindowExA(0, unicode_class_nameA, NULL, WS_POPUP, - 0, 0, 100, 100, GetDesktopWindow(), 0, 0, NULL); - assert(hwnd); - - ok(IsWindowUnicode(hwnd), "IsWindowUnicode expected to return TRUE\n"); - SetWindowLongPtrA(hwnd, GWLP_WNDPROC, (ULONG_PTR)def_window_procA); - ok(!IsWindowUnicode(hwnd), "IsWindowUnicode expected to return FALSE\n"); - SetWindowLongPtrW(hwnd, GWLP_WNDPROC, (ULONG_PTR)def_window_procW); - ok(IsWindowUnicode(hwnd), "IsWindowUnicode expected to return TRUE\n"); - - DestroyWindow(hwnd); - - /* ansi class: window proc */ - hwnd = CreateWindowExW(0, ansi_class_nameW, NULL, WS_POPUP, - 0, 0, 100, 100, GetDesktopWindow(), 0, 0, NULL); - assert(hwnd); - - ok(!IsWindowUnicode(hwnd), "IsWindowUnicode expected to return FALSE\n"); - SetWindowLongPtrW(hwnd, GWLP_WNDPROC, (ULONG_PTR)def_window_procW); - ok(IsWindowUnicode(hwnd), "IsWindowUnicode expected to return TRUE\n"); - SetWindowLongPtrA(hwnd, GWLP_WNDPROC, (ULONG_PTR)def_window_procA); - ok(!IsWindowUnicode(hwnd), "IsWindowUnicode expected to return FALSE\n"); - - DestroyWindow(hwnd); - - hwnd = CreateWindowExA(0, ansi_class_nameA, NULL, WS_POPUP, - 0, 0, 100, 100, GetDesktopWindow(), 0, 0, NULL); - assert(hwnd); - - ok(!IsWindowUnicode(hwnd), "IsWindowUnicode expected to return FALSE\n"); - SetWindowLongPtrW(hwnd, GWLP_WNDPROC, (ULONG_PTR)def_window_procW); - ok(IsWindowUnicode(hwnd), "IsWindowUnicode expected to return TRUE\n"); - SetWindowLongPtrA(hwnd, GWLP_WNDPROC, (ULONG_PTR)def_window_procA); - ok(!IsWindowUnicode(hwnd), "IsWindowUnicode expected to return FALSE\n"); - - DestroyWindow(hwnd); - - /* unicode class: class proc */ - hwnd = CreateWindowExW(0, unicode_class_nameW, NULL, WS_POPUP, - 0, 0, 100, 100, GetDesktopWindow(), 0, 0, NULL); - assert(hwnd); - - ok(IsWindowUnicode(hwnd), "IsWindowUnicode expected to return TRUE\n"); - SetClassLongPtrA(hwnd, GCLP_WNDPROC, (ULONG_PTR)def_window_procA); - ok(IsWindowUnicode(hwnd), "IsWindowUnicode expected to return TRUE\n"); - /* do not restore class window proc back to unicode */ - - DestroyWindow(hwnd); - - hwnd = CreateWindowExA(0, unicode_class_nameA, NULL, WS_POPUP, - 0, 0, 100, 100, GetDesktopWindow(), 0, 0, NULL); - assert(hwnd); - - ok(!IsWindowUnicode(hwnd), "IsWindowUnicode expected to return FALSE\n"); - SetClassLongPtrW(hwnd, GCLP_WNDPROC, (ULONG_PTR)def_window_procW); - ok(!IsWindowUnicode(hwnd), "IsWindowUnicode expected to return FALSE\n"); - - DestroyWindow(hwnd); - - /* ansi class: class proc */ - hwnd = CreateWindowExW(0, ansi_class_nameW, NULL, WS_POPUP, - 0, 0, 100, 100, GetDesktopWindow(), 0, 0, NULL); - assert(hwnd); - - ok(!IsWindowUnicode(hwnd), "IsWindowUnicode expected to return FALSE\n"); - SetClassLongPtrW(hwnd, GCLP_WNDPROC, (ULONG_PTR)def_window_procW); - ok(!IsWindowUnicode(hwnd), "IsWindowUnicode expected to return FALSE\n"); - /* do not restore class window proc back to ansi */ - - DestroyWindow(hwnd); - - hwnd = CreateWindowExA(0, ansi_class_nameA, NULL, WS_POPUP, - 0, 0, 100, 100, GetDesktopWindow(), 0, 0, NULL); - assert(hwnd); - - ok(IsWindowUnicode(hwnd), "IsWindowUnicode expected to return TRUE\n"); - SetClassLongPtrA(hwnd, GCLP_WNDPROC, (ULONG_PTR)def_window_procA); - ok(IsWindowUnicode(hwnd), "IsWindowUnicode expected to return TRUE\n"); - - DestroyWindow(hwnd); -} - -static LRESULT CALLBACK minmax_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) -{ - MINMAXINFO *minmax; - - if (msg != WM_GETMINMAXINFO) - return DefWindowProc(hwnd, msg, wp, lp); - - minmax = (MINMAXINFO *)lp; - - if ((GetWindowLong(hwnd, GWL_STYLE) & WS_CHILD)) - { - minmax->ptReserved.x = 0; - minmax->ptReserved.y = 0; - minmax->ptMaxSize.x = 400; - minmax->ptMaxSize.y = 400; - minmax->ptMaxPosition.x = 300; - minmax->ptMaxPosition.y = 300; - minmax->ptMaxTrackSize.x = 200; - minmax->ptMaxTrackSize.y = 200; - minmax->ptMinTrackSize.x = 100; - minmax->ptMinTrackSize.y = 100; - } - else - DefWindowProc(hwnd, msg, wp, lp); - return 1; -} - -static int expected_cx, expected_cy; -static RECT expected_rect, broken_rect; - -static LRESULT CALLBACK winsizes_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) -{ - switch(msg) - { - case WM_GETMINMAXINFO: - { - RECT rect; - GetWindowRect( hwnd, &rect ); - ok( !rect.left && !rect.top && !rect.right && !rect.bottom, - "wrong rect %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - return DefWindowProc(hwnd, msg, wp, lp); - } - case WM_NCCREATE: - case WM_CREATE: - { - CREATESTRUCTA *cs = (CREATESTRUCTA *)lp; - RECT rect; - GetWindowRect( hwnd, &rect ); - trace( "hwnd %p msg %x size %dx%d rect %d,%d-%d,%d\n", - hwnd, msg, cs->cx, cs->cy, rect.left, rect.top, rect.right, rect.bottom ); - ok( cs->cx == expected_cx || broken(cs->cx == (short)expected_cx), - "wrong x size %d/%d\n", cs->cx, expected_cx ); - ok( cs->cy == expected_cy || broken(cs->cy == (short)expected_cy), - "wrong y size %d/%d\n", cs->cy, expected_cy ); - ok( (rect.right - rect.left == expected_rect.right - expected_rect.left && - rect.bottom - rect.top == expected_rect.bottom - expected_rect.top) || - (rect.right - rect.left == min( 65535, expected_rect.right - expected_rect.left ) && - rect.bottom - rect.top == min( 65535, expected_rect.bottom - expected_rect.top )) || - broken( rect.right - rect.left == broken_rect.right - broken_rect.left && - rect.bottom - rect.top == broken_rect.bottom - broken_rect.top) || - broken( rect.right - rect.left == (short)broken_rect.right - (short)broken_rect.left && - rect.bottom - rect.top == (short)broken_rect.bottom - (short)broken_rect.top), - "wrong rect %d,%d-%d,%d / %d,%d-%d,%d\n", - rect.left, rect.top, rect.right, rect.bottom, - expected_rect.left, expected_rect.top, expected_rect.right, expected_rect.bottom ); - return DefWindowProc(hwnd, msg, wp, lp); - } - case WM_NCCALCSIZE: - { - RECT rect, *r = (RECT *)lp; - GetWindowRect( hwnd, &rect ); - ok( !memcmp( &rect, r, sizeof(rect) ), - "passed rect %d,%d-%d,%d doesn't match window rect %d,%d-%d,%d\n", - r->left, r->top, r->right, r->bottom, rect.left, rect.top, rect.right, rect.bottom ); - return DefWindowProc(hwnd, msg, wp, lp); - } - default: - return DefWindowProc(hwnd, msg, wp, lp); - } -} - -static void test_CreateWindow(void) -{ - WNDCLASS cls; - HWND hwnd, parent; - HMENU hmenu; - RECT rc, rc_minmax; - MINMAXINFO minmax; - BOOL res; - -#define expect_menu(window, menu) \ - SetLastError(0xdeadbeef); \ - res = (GetMenu(window) == (HMENU)menu); \ - ok(res, "GetMenu error %d\n", GetLastError()) - -#define expect_style(window, style)\ - ok((ULONG)GetWindowLong(window, GWL_STYLE) == (style), "expected style %x != %x\n", (LONG)(style), GetWindowLong(window, GWL_STYLE)) - -#define expect_ex_style(window, ex_style)\ - ok((ULONG)GetWindowLong(window, GWL_EXSTYLE) == (ex_style), "expected ex_style %x != %x\n", (LONG)(ex_style), GetWindowLong(window, GWL_EXSTYLE)) - -#define expect_gle_broken_9x(gle)\ - ok(GetLastError() == gle ||\ - broken(GetLastError() == 0xdeadbeef),\ - "IsMenu set error %d\n", GetLastError()) - - hmenu = CreateMenu(); - assert(hmenu != 0); - parent = GetDesktopWindow(); - assert(parent != 0); - - SetLastError(0xdeadbeef); - res = IsMenu(hmenu); - ok(res, "IsMenu error %d\n", GetLastError()); - - /* WS_CHILD */ - SetLastError(0xdeadbeef); - hwnd = CreateWindowEx(WS_EX_APPWINDOW, "static", NULL, WS_CHILD, - 0, 0, 100, 100, parent, (HMENU)1, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); - expect_menu(hwnd, 1); - expect_style(hwnd, WS_CHILD); - expect_ex_style(hwnd, WS_EX_APPWINDOW); - DestroyWindow(hwnd); - - SetLastError(0xdeadbeef); - hwnd = CreateWindowEx(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_CAPTION, - 0, 0, 100, 100, parent, (HMENU)1, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); - expect_menu(hwnd, 1); - expect_style(hwnd, WS_CHILD | WS_CAPTION); - expect_ex_style(hwnd, WS_EX_APPWINDOW | WS_EX_WINDOWEDGE); - DestroyWindow(hwnd); - - SetLastError(0xdeadbeef); - hwnd = CreateWindowEx(0, "static", NULL, WS_CHILD, - 0, 0, 100, 100, parent, (HMENU)1, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); - expect_menu(hwnd, 1); - expect_style(hwnd, WS_CHILD); - expect_ex_style(hwnd, 0); - DestroyWindow(hwnd); - - SetLastError(0xdeadbeef); - hwnd = CreateWindowEx(0, "static", NULL, WS_CHILD | WS_CAPTION, - 0, 0, 100, 100, parent, (HMENU)1, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); - expect_menu(hwnd, 1); - expect_style(hwnd, WS_CHILD | WS_CAPTION); - expect_ex_style(hwnd, WS_EX_WINDOWEDGE); - DestroyWindow(hwnd); - - /* WS_POPUP */ - SetLastError(0xdeadbeef); - hwnd = CreateWindowEx(WS_EX_APPWINDOW, "static", NULL, WS_POPUP, - 0, 0, 100, 100, parent, hmenu, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); - expect_menu(hwnd, hmenu); - expect_style(hwnd, WS_POPUP | WS_CLIPSIBLINGS); - expect_ex_style(hwnd, WS_EX_APPWINDOW); - DestroyWindow(hwnd); - SetLastError(0xdeadbeef); - ok(!IsMenu(hmenu), "IsMenu should fail\n"); - expect_gle_broken_9x(ERROR_INVALID_MENU_HANDLE); - - hmenu = CreateMenu(); - assert(hmenu != 0); - SetLastError(0xdeadbeef); - hwnd = CreateWindowEx(WS_EX_APPWINDOW, "static", NULL, WS_POPUP | WS_CAPTION, - 0, 0, 100, 100, parent, hmenu, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); - expect_menu(hwnd, hmenu); - expect_style(hwnd, WS_POPUP | WS_CAPTION | WS_CLIPSIBLINGS); - expect_ex_style(hwnd, WS_EX_APPWINDOW | WS_EX_WINDOWEDGE); - DestroyWindow(hwnd); - SetLastError(0xdeadbeef); - ok(!IsMenu(hmenu), "IsMenu should fail\n"); - expect_gle_broken_9x(ERROR_INVALID_MENU_HANDLE); - - hmenu = CreateMenu(); - assert(hmenu != 0); - SetLastError(0xdeadbeef); - hwnd = CreateWindowEx(0, "static", NULL, WS_POPUP, - 0, 0, 100, 100, parent, hmenu, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); - expect_menu(hwnd, hmenu); - expect_style(hwnd, WS_POPUP | WS_CLIPSIBLINGS); - expect_ex_style(hwnd, 0); - DestroyWindow(hwnd); - SetLastError(0xdeadbeef); - ok(!IsMenu(hmenu), "IsMenu should fail\n"); - expect_gle_broken_9x(ERROR_INVALID_MENU_HANDLE); - - hmenu = CreateMenu(); - assert(hmenu != 0); - SetLastError(0xdeadbeef); - hwnd = CreateWindowEx(0, "static", NULL, WS_POPUP | WS_CAPTION, - 0, 0, 100, 100, parent, hmenu, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); - expect_menu(hwnd, hmenu); - expect_style(hwnd, WS_POPUP | WS_CAPTION | WS_CLIPSIBLINGS); - expect_ex_style(hwnd, WS_EX_WINDOWEDGE); - DestroyWindow(hwnd); - SetLastError(0xdeadbeef); - ok(!IsMenu(hmenu), "IsMenu should fail\n"); - expect_gle_broken_9x(ERROR_INVALID_MENU_HANDLE); - - /* WS_CHILD | WS_POPUP */ - SetLastError(0xdeadbeef); - hwnd = CreateWindowEx(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_POPUP, - 0, 0, 100, 100, parent, (HMENU)1, 0, NULL); - ok(!hwnd || broken(hwnd != 0 /* Win9x */), "CreateWindowEx should fail\n"); - expect_gle_broken_9x(ERROR_INVALID_MENU_HANDLE); - if (hwnd) - DestroyWindow(hwnd); - - hmenu = CreateMenu(); - assert(hmenu != 0); - SetLastError(0xdeadbeef); - hwnd = CreateWindowEx(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_POPUP, - 0, 0, 100, 100, parent, hmenu, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); - expect_menu(hwnd, hmenu); - expect_style(hwnd, WS_CHILD | WS_POPUP | WS_CLIPSIBLINGS); - expect_ex_style(hwnd, WS_EX_APPWINDOW); - DestroyWindow(hwnd); - SetLastError(0xdeadbeef); - ok(!IsMenu(hmenu), "IsMenu should fail\n"); - expect_gle_broken_9x(ERROR_INVALID_MENU_HANDLE); - - SetLastError(0xdeadbeef); - hwnd = CreateWindowEx(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_POPUP | WS_CAPTION, - 0, 0, 100, 100, parent, (HMENU)1, 0, NULL); - ok(!hwnd || broken(hwnd != 0 /* Win9x */), "CreateWindowEx should fail\n"); - expect_gle_broken_9x(ERROR_INVALID_MENU_HANDLE); - if (hwnd) - DestroyWindow(hwnd); - - hmenu = CreateMenu(); - assert(hmenu != 0); - SetLastError(0xdeadbeef); - hwnd = CreateWindowEx(WS_EX_APPWINDOW, "static", NULL, WS_CHILD | WS_POPUP | WS_CAPTION, - 0, 0, 100, 100, parent, hmenu, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); - expect_menu(hwnd, hmenu); - expect_style(hwnd, WS_CHILD | WS_POPUP | WS_CAPTION | WS_CLIPSIBLINGS); - expect_ex_style(hwnd, WS_EX_APPWINDOW | WS_EX_WINDOWEDGE); - DestroyWindow(hwnd); - SetLastError(0xdeadbeef); - ok(!IsMenu(hmenu), "IsMenu should fail\n"); - expect_gle_broken_9x(ERROR_INVALID_MENU_HANDLE); - - SetLastError(0xdeadbeef); - hwnd = CreateWindowEx(0, "static", NULL, WS_CHILD | WS_POPUP, - 0, 0, 100, 100, parent, (HMENU)1, 0, NULL); - ok(!hwnd || broken(hwnd != 0 /* Win9x */), "CreateWindowEx should fail\n"); - expect_gle_broken_9x(ERROR_INVALID_MENU_HANDLE); - if (hwnd) - DestroyWindow(hwnd); - - hmenu = CreateMenu(); - assert(hmenu != 0); - SetLastError(0xdeadbeef); - hwnd = CreateWindowEx(0, "static", NULL, WS_CHILD | WS_POPUP, - 0, 0, 100, 100, parent, hmenu, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); - expect_menu(hwnd, hmenu); - expect_style(hwnd, WS_CHILD | WS_POPUP | WS_CLIPSIBLINGS); - expect_ex_style(hwnd, 0); - DestroyWindow(hwnd); - SetLastError(0xdeadbeef); - ok(!IsMenu(hmenu), "IsMenu should fail\n"); - expect_gle_broken_9x(ERROR_INVALID_MENU_HANDLE); - - SetLastError(0xdeadbeef); - hwnd = CreateWindowEx(0, "static", NULL, WS_CHILD | WS_POPUP | WS_CAPTION, - 0, 0, 100, 100, parent, (HMENU)1, 0, NULL); - ok(!hwnd || broken(hwnd != 0 /* Win9x */), "CreateWindowEx should fail\n"); - expect_gle_broken_9x(ERROR_INVALID_MENU_HANDLE); - if (hwnd) - DestroyWindow(hwnd); - - hmenu = CreateMenu(); - assert(hmenu != 0); - SetLastError(0xdeadbeef); - hwnd = CreateWindowEx(0, "static", NULL, WS_CHILD | WS_POPUP | WS_CAPTION, - 0, 0, 100, 100, parent, hmenu, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); - expect_menu(hwnd, hmenu); - expect_style(hwnd, WS_CHILD | WS_POPUP | WS_CAPTION | WS_CLIPSIBLINGS); - expect_ex_style(hwnd, WS_EX_WINDOWEDGE); - DestroyWindow(hwnd); - SetLastError(0xdeadbeef); - ok(!IsMenu(hmenu), "IsMenu should fail\n"); - expect_gle_broken_9x(ERROR_INVALID_MENU_HANDLE); - - /* test child window sizing */ - cls.style = 0; - cls.lpfnWndProc = minmax_wnd_proc; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandle(0); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "MinMax_WndClass"; - RegisterClass(&cls); - - SetLastError(0xdeadbeef); - parent = CreateWindowEx(0, "MinMax_WndClass", NULL, WS_CAPTION | WS_SYSMENU | WS_THICKFRAME, - 0, 0, 100, 100, 0, 0, 0, NULL); - ok(parent != 0, "CreateWindowEx error %d\n", GetLastError()); - expect_menu(parent, 0); - expect_style(parent, WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_CLIPSIBLINGS); - expect_ex_style(parent, WS_EX_WINDOWEDGE); - - memset(&minmax, 0, sizeof(minmax)); - SendMessage(parent, WM_GETMINMAXINFO, 0, (LPARAM)&minmax); - SetRect(&rc_minmax, 0, 0, minmax.ptMaxSize.x, minmax.ptMaxSize.y); - ok(IsRectEmpty(&rc_minmax), "ptMaxSize is not empty\n"); - SetRect(&rc_minmax, 0, 0, minmax.ptMaxTrackSize.x, minmax.ptMaxTrackSize.y); - ok(IsRectEmpty(&rc_minmax), "ptMaxTrackSize is not empty\n"); - - GetWindowRect(parent, &rc); - ok(!IsRectEmpty(&rc), "parent window rect is empty\n"); - GetClientRect(parent, &rc); - ok(!IsRectEmpty(&rc), "parent client rect is empty\n"); - - InflateRect(&rc, 200, 200); - trace("creating child with rect (%d,%d-%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom); - - SetLastError(0xdeadbeef); - hwnd = CreateWindowEx(0, "MinMax_WndClass", NULL, WS_CHILD | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME, - rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, - parent, (HMENU)1, 0, NULL); - ok(hwnd != 0, "CreateWindowEx error %d\n", GetLastError()); - expect_menu(hwnd, 1); - expect_style(hwnd, WS_CHILD | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME); - expect_ex_style(hwnd, WS_EX_WINDOWEDGE); - - memset(&minmax, 0, sizeof(minmax)); - SendMessage(hwnd, WM_GETMINMAXINFO, 0, (LPARAM)&minmax); - SetRect(&rc_minmax, 0, 0, minmax.ptMaxTrackSize.x, minmax.ptMaxTrackSize.y); - - GetWindowRect(hwnd, &rc); - OffsetRect(&rc, -rc.left, -rc.top); - ok(EqualRect(&rc, &rc_minmax), "rects don't match: (%d,%d-%d,%d) and (%d,%d-%d,%d)\n", - rc.left, rc.top, rc.right, rc.bottom, - rc_minmax.left, rc_minmax.top, rc_minmax.right, rc_minmax.bottom); - DestroyWindow(hwnd); - - cls.lpfnWndProc = winsizes_wnd_proc; - cls.lpszClassName = "Sizes_WndClass"; - RegisterClass(&cls); - - expected_cx = expected_cy = 200000; - SetRect( &expected_rect, 0, 0, 200000, 200000 ); - broken_rect = expected_rect; - hwnd = CreateWindowExA(0, "Sizes_WndClass", NULL, WS_CHILD, 300000, 300000, 200000, 200000, parent, 0, 0, NULL); - ok( hwnd != 0, "creation failed err %u\n", GetLastError()); - GetClientRect( hwnd, &rc ); - ok( rc.right == 200000 || rc.right == 65535 || broken(rc.right == (short)200000), - "invalid rect right %u\n", rc.right ); - ok( rc.bottom == 200000 || rc.bottom == 65535 || broken(rc.bottom == (short)200000), - "invalid rect bottom %u\n", rc.bottom ); - DestroyWindow(hwnd); - - expected_cx = expected_cy = -10; - SetRect( &expected_rect, 0, 0, 0, 0 ); - SetRect( &broken_rect, 0, 0, -10, -10 ); - hwnd = CreateWindowExA(0, "Sizes_WndClass", NULL, WS_CHILD, -20, -20, -10, -10, parent, 0, 0, NULL); - ok( hwnd != 0, "creation failed err %u\n", GetLastError()); - GetClientRect( hwnd, &rc ); - ok( rc.right == 0, "invalid rect right %u\n", rc.right ); - ok( rc.bottom == 0, "invalid rect bottom %u\n", rc.bottom ); - DestroyWindow(hwnd); - - expected_cx = expected_cy = -200000; - SetRect( &expected_rect, 0, 0, 0, 0 ); - SetRect( &broken_rect, 0, 0, -200000, -200000 ); - hwnd = CreateWindowExA(0, "Sizes_WndClass", NULL, WS_CHILD, -300000, -300000, -200000, -200000, parent, 0, 0, NULL); - ok( hwnd != 0, "creation failed err %u\n", GetLastError()); - GetClientRect( hwnd, &rc ); - ok( rc.right == 0, "invalid rect right %u\n", rc.right ); - ok( rc.bottom == 0, "invalid rect bottom %u\n", rc.bottom ); - DestroyWindow(hwnd); - - /* we need a parent at 0,0 so that child coordinates match */ - DestroyWindow(parent); - parent = CreateWindowEx(0, "MinMax_WndClass", NULL, WS_POPUP, 0, 0, 100, 100, 0, 0, 0, NULL); - ok(parent != 0, "CreateWindowEx error %d\n", GetLastError()); - - expected_cx = 100; - expected_cy = 0x7fffffff; - SetRect( &expected_rect, 10, 10, 110, 0x7fffffff ); - SetRect( &broken_rect, 10, 10, 110, 0x7fffffffU + 10 ); - hwnd = CreateWindowExA(0, "Sizes_WndClass", NULL, WS_CHILD, 10, 10, 100, 0x7fffffff, parent, 0, 0, NULL); - ok( hwnd != 0, "creation failed err %u\n", GetLastError()); - GetClientRect( hwnd, &rc ); - ok( rc.right == 100, "invalid rect right %u\n", rc.right ); - ok( rc.bottom == 0x7fffffff - 10 || rc.bottom ==65535 || broken(rc.bottom == 0), - "invalid rect bottom %u\n", rc.bottom ); - DestroyWindow(hwnd); - - expected_cx = 0x7fffffff; - expected_cy = 0x7fffffff; - SetRect( &expected_rect, 20, 10, 0x7fffffff, 0x7fffffff ); - SetRect( &broken_rect, 20, 10, 0x7fffffffU + 20, 0x7fffffffU + 10 ); - hwnd = CreateWindowExA(0, "Sizes_WndClass", NULL, WS_CHILD, 20, 10, 0x7fffffff, 0x7fffffff, parent, 0, 0, NULL); - ok( hwnd != 0, "creation failed err %u\n", GetLastError()); - GetClientRect( hwnd, &rc ); - ok( rc.right == 0x7fffffff - 20 || rc.right == 65535 || broken(rc.right == 0), - "invalid rect right %u\n", rc.right ); - ok( rc.bottom == 0x7fffffff - 10 || rc.right == 65535 || broken(rc.bottom == 0), - "invalid rect bottom %u\n", rc.bottom ); - DestroyWindow(hwnd); - - /* top level window */ - expected_cx = expected_cy = 200000; - SetRect( &expected_rect, 0, 0, GetSystemMetrics(SM_CXMAXTRACK), GetSystemMetrics(SM_CYMAXTRACK) ); - hwnd = CreateWindowExA(0, "Sizes_WndClass", NULL, WS_OVERLAPPEDWINDOW, 300000, 300000, 200000, 200000, 0, 0, 0, NULL); - ok( hwnd != 0, "creation failed err %u\n", GetLastError()); - GetClientRect( hwnd, &rc ); - ok( rc.right <= expected_cx, "invalid rect right %u\n", rc.right ); - ok( rc.bottom <= expected_cy, "invalid rect bottom %u\n", rc.bottom ); - DestroyWindow(hwnd); - - if (pGetLayout && pSetLayout) - { - HDC hdc = GetDC( parent ); - pSetLayout( hdc, LAYOUT_RTL ); - if (pGetLayout( hdc )) - { - ReleaseDC( parent, hdc ); - DestroyWindow( parent ); - SetLastError( 0xdeadbeef ); - parent = CreateWindowEx(WS_EX_APPWINDOW | WS_EX_LAYOUTRTL, "static", NULL, WS_POPUP, - 0, 0, 100, 100, 0, 0, 0, NULL); - ok( parent != 0, "creation failed err %u\n", GetLastError()); - expect_ex_style( parent, WS_EX_APPWINDOW | WS_EX_LAYOUTRTL ); - hwnd = CreateWindowExA(0, "static", NULL, WS_CHILD, 0, 0, 20, 20, parent, 0, 0, NULL); - ok( hwnd != 0, "creation failed err %u\n", GetLastError()); - expect_ex_style( hwnd, WS_EX_LAYOUTRTL ); - DestroyWindow( hwnd ); - hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP, 0, 0, 20, 20, parent, 0, 0, NULL); - ok( hwnd != 0, "creation failed err %u\n", GetLastError()); - expect_ex_style( hwnd, 0 ); - DestroyWindow( hwnd ); - SetWindowLongW( parent, GWL_EXSTYLE, WS_EX_APPWINDOW | WS_EX_LAYOUTRTL | WS_EX_NOINHERITLAYOUT ); - hwnd = CreateWindowExA(0, "static", NULL, WS_CHILD, 0, 0, 20, 20, parent, 0, 0, NULL); - ok( hwnd != 0, "creation failed err %u\n", GetLastError()); - expect_ex_style( hwnd, 0 ); - DestroyWindow( hwnd ); - - if (pGetProcessDefaultLayout && pSetProcessDefaultLayout) - { - DWORD layout; - - SetLastError( 0xdeadbeef ); - ok( !pGetProcessDefaultLayout( NULL ), "GetProcessDefaultLayout succeeded\n" ); - ok( GetLastError() == ERROR_NOACCESS, "wrong error %u\n", GetLastError() ); - SetLastError( 0xdeadbeef ); - ok( pGetProcessDefaultLayout( &layout ), - "GetProcessDefaultLayout failed err %u\n", GetLastError ()); - ok( layout == 0, "GetProcessDefaultLayout wrong layout %x\n", layout ); - SetLastError( 0xdeadbeef ); - ok( pSetProcessDefaultLayout( 7 ), - "SetProcessDefaultLayout failed err %u\n", GetLastError ()); - ok( pGetProcessDefaultLayout( &layout ), - "GetProcessDefaultLayout failed err %u\n", GetLastError ()); - ok( layout == 7, "GetProcessDefaultLayout wrong layout %x\n", layout ); - SetLastError( 0xdeadbeef ); - ok( pSetProcessDefaultLayout( LAYOUT_RTL ), - "SetProcessDefaultLayout failed err %u\n", GetLastError ()); - ok( pGetProcessDefaultLayout( &layout ), - "GetProcessDefaultLayout failed err %u\n", GetLastError ()); - ok( layout == LAYOUT_RTL, "GetProcessDefaultLayout wrong layout %x\n", layout ); - hwnd = CreateWindowEx(WS_EX_APPWINDOW, "static", NULL, WS_POPUP, - 0, 0, 100, 100, 0, 0, 0, NULL); - ok( hwnd != 0, "creation failed err %u\n", GetLastError()); - expect_ex_style( hwnd, WS_EX_APPWINDOW | WS_EX_LAYOUTRTL ); - DestroyWindow( hwnd ); - hwnd = CreateWindowEx(WS_EX_APPWINDOW, "static", NULL, WS_POPUP, - 0, 0, 100, 100, parent, 0, 0, NULL); - ok( hwnd != 0, "creation failed err %u\n", GetLastError()); - expect_ex_style( hwnd, WS_EX_APPWINDOW ); - DestroyWindow( hwnd ); - pSetProcessDefaultLayout( 0 ); - } - else win_skip( "SetProcessDefaultLayout not supported\n" ); - } - else win_skip( "SetLayout not supported\n" ); - } - else win_skip( "SetLayout not available\n" ); - - DestroyWindow(parent); - - UnregisterClass("MinMax_WndClass", GetModuleHandle(0)); - UnregisterClass("Sizes_WndClass", GetModuleHandle(0)); - -#undef expect_gle_broken_9x -#undef expect_menu -#undef expect_style -#undef expect_ex_style -} - -/* function that remembers whether the system the test is running on sets the - * last error for user32 functions to make the tests stricter */ -static int check_error(DWORD actual, DWORD expected) -{ - static int sets_last_error = -1; - if (sets_last_error == -1) - sets_last_error = (actual != 0xdeadbeef); - return (!sets_last_error && (actual == 0xdeadbeef)) || (actual == expected); -} - -static void test_SetWindowLong(void) -{ - LONG_PTR retval; - WNDPROC old_window_procW; - - SetLastError(0xdeadbeef); - retval = SetWindowLongPtr(NULL, GWLP_WNDPROC, 0); - ok(!retval, "SetWindowLongPtr on invalid window handle should have returned 0 instead of 0x%lx\n", retval); - ok(check_error(GetLastError(), ERROR_INVALID_WINDOW_HANDLE), - "SetWindowLongPtr should have set error to ERROR_INVALID_WINDOW_HANDLE instead of %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - retval = SetWindowLongPtr(hwndMain, 0xdeadbeef, 0); - ok(!retval, "SetWindowLongPtr on invalid index should have returned 0 instead of 0x%lx\n", retval); - ok(check_error(GetLastError(), ERROR_INVALID_INDEX), - "SetWindowLongPtr should have set error to ERROR_INVALID_INDEX instead of %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - retval = SetWindowLongPtr(hwndMain, GWLP_WNDPROC, 0); - ok((WNDPROC)retval == main_window_procA || broken(!retval), /* win9x */ - "SetWindowLongPtr on invalid window proc should have returned address of main_window_procA instead of 0x%lx\n", retval); - ok(GetLastError() == 0xdeadbeef, "SetWindowLongPtr shouldn't have set the last error, instead of setting it to %d\n", GetLastError()); - retval = GetWindowLongPtr(hwndMain, GWLP_WNDPROC); - ok((WNDPROC)retval == main_window_procA, - "SetWindowLongPtr on invalid window proc shouldn't have changed the value returned by GetWindowLongPtr, instead of changing it to 0x%lx\n", retval); - ok(!IsWindowUnicode(hwndMain), "hwndMain shouldn't be Unicode\n"); - - old_window_procW = (WNDPROC)GetWindowLongPtrW(hwndMain, GWLP_WNDPROC); - SetLastError(0xdeadbeef); - retval = SetWindowLongPtrW(hwndMain, GWLP_WNDPROC, 0); - if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) - { - ok(GetLastError() == 0xdeadbeef, "SetWindowLongPtr shouldn't have set the last error, instead of setting it to %d\n", GetLastError()); - ok(retval != 0, "SetWindowLongPtr error %d\n", GetLastError()); - ok((WNDPROC)retval == old_window_procW, - "SetWindowLongPtr on invalid window proc shouldn't have changed the value returned by GetWindowLongPtr, instead of changing it to 0x%lx\n", retval); - ok(IsWindowUnicode(hwndMain), "hwndMain should now be Unicode\n"); - - /* set it back to ANSI */ - SetWindowLongPtr(hwndMain, GWLP_WNDPROC, 0); - } -} - -static void test_ShowWindow(void) -{ - HWND hwnd; - DWORD style; - RECT rcMain, rc, rcMinimized; - LPARAM ret; - - SetRect(&rcMain, 120, 120, 210, 210); - - hwnd = CreateWindowEx(0, "MainWindowClass", NULL, - WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | - WS_MAXIMIZEBOX | WS_POPUP, - rcMain.left, rcMain.top, - rcMain.right - rcMain.left, rcMain.bottom - rcMain.top, - 0, 0, 0, NULL); - assert(hwnd); - - style = GetWindowLong(hwnd, GWL_STYLE); - ok(!(style & WS_DISABLED), "window should not be disabled\n"); - ok(!(style & WS_VISIBLE), "window should not be visible\n"); - ok(!(style & WS_MINIMIZE), "window should not be minimized\n"); - ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); - GetWindowRect(hwnd, &rc); - ok(EqualRect(&rcMain, &rc), "expected (%d,%d)-(%d,%d), got (%d,%d)-(%d,%d)\n", - rcMain.left, rcMain.top, rcMain.right, rcMain.bottom, - rc.left, rc.top, rc.right, rc.bottom); - - ret = ShowWindow(hwnd, SW_SHOW); - ok(!ret, "not expected ret: %lu\n", ret); - style = GetWindowLong(hwnd, GWL_STYLE); - ok(!(style & WS_DISABLED), "window should not be disabled\n"); - ok(style & WS_VISIBLE, "window should be visible\n"); - ok(!(style & WS_MINIMIZE), "window should not be minimized\n"); - ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); - GetWindowRect(hwnd, &rc); - ok(EqualRect(&rcMain, &rc), "expected (%d,%d)-(%d,%d), got (%d,%d)-(%d,%d)\n", - rcMain.left, rcMain.top, rcMain.right, rcMain.bottom, - rc.left, rc.top, rc.right, rc.bottom); - - ret = ShowWindow(hwnd, SW_MINIMIZE); - ok(ret, "not expected ret: %lu\n", ret); - style = GetWindowLong(hwnd, GWL_STYLE); - ok(!(style & WS_DISABLED), "window should not be disabled\n"); - ok(style & WS_VISIBLE, "window should be visible\n"); - ok(style & WS_MINIMIZE, "window should be minimized\n"); - ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); - GetWindowRect(hwnd, &rcMinimized); - ok(!EqualRect(&rcMain, &rcMinimized), "rects shouldn't match\n"); - /* shouldn't be able to resize minimized windows */ - ret = SetWindowPos(hwnd, 0, 0, 0, - (rcMinimized.right - rcMinimized.left) * 2, - (rcMinimized.bottom - rcMinimized.top) * 2, - SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER); - ok(ret, "not expected ret: %lu\n", ret); - GetWindowRect(hwnd, &rc); - ok(EqualRect(&rc, &rcMinimized), "rects should match\n"); - - ShowWindow(hwnd, SW_RESTORE); - ok(ret, "not expected ret: %lu\n", ret); - style = GetWindowLong(hwnd, GWL_STYLE); - ok(!(style & WS_DISABLED), "window should not be disabled\n"); - ok(style & WS_VISIBLE, "window should be visible\n"); - ok(!(style & WS_MINIMIZE), "window should not be minimized\n"); - ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); - GetWindowRect(hwnd, &rc); - ok(EqualRect(&rcMain, &rc), "expected (%d,%d)-(%d,%d), got (%d,%d)-(%d,%d)\n", - rcMain.left, rcMain.top, rcMain.right, rcMain.bottom, - rc.left, rc.top, rc.right, rc.bottom); - - ret = EnableWindow(hwnd, FALSE); - ok(!ret, "not expected ret: %lu\n", ret); - style = GetWindowLong(hwnd, GWL_STYLE); - ok(style & WS_DISABLED, "window should be disabled\n"); - - ret = DefWindowProc(hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0); - ok(!ret, "not expected ret: %lu\n", ret); - style = GetWindowLong(hwnd, GWL_STYLE); - ok(style & WS_DISABLED, "window should be disabled\n"); - ok(style & WS_VISIBLE, "window should be visible\n"); - ok(!(style & WS_MINIMIZE), "window should not be minimized\n"); - ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); - GetWindowRect(hwnd, &rc); - ok(EqualRect(&rcMain, &rc), "expected (%d,%d)-(%d,%d), got (%d,%d)-(%d,%d)\n", - rcMain.left, rcMain.top, rcMain.right, rcMain.bottom, - rc.left, rc.top, rc.right, rc.bottom); - - ret = DefWindowProc(hwnd, WM_SYSCOMMAND, SC_MAXIMIZE, 0); - ok(!ret, "not expected ret: %lu\n", ret); - style = GetWindowLong(hwnd, GWL_STYLE); - ok(style & WS_DISABLED, "window should be disabled\n"); - ok(style & WS_VISIBLE, "window should be visible\n"); - ok(!(style & WS_MINIMIZE), "window should not be minimized\n"); - ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); - GetWindowRect(hwnd, &rc); - ok(EqualRect(&rcMain, &rc), "expected (%d,%d)-(%d,%d), got (%d,%d)-(%d,%d)\n", - rcMain.left, rcMain.top, rcMain.right, rcMain.bottom, - rc.left, rc.top, rc.right, rc.bottom); - - ret = ShowWindow(hwnd, SW_MINIMIZE); - ok(ret, "not expected ret: %lu\n", ret); - style = GetWindowLong(hwnd, GWL_STYLE); - ok(style & WS_DISABLED, "window should be disabled\n"); - ok(style & WS_VISIBLE, "window should be visible\n"); - ok(style & WS_MINIMIZE, "window should be minimized\n"); - ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); - GetWindowRect(hwnd, &rc); - ok(!EqualRect(&rcMain, &rc), "rects shouldn't match\n"); - - ret = DefWindowProc(hwnd, WM_SYSCOMMAND, SC_RESTORE, 0); - ok(!ret, "not expected ret: %lu\n", ret); - style = GetWindowLong(hwnd, GWL_STYLE); - ok(style & WS_DISABLED, "window should be disabled\n"); - ok(style & WS_VISIBLE, "window should be visible\n"); - ok(style & WS_MINIMIZE, "window should be minimized\n"); - ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); - GetWindowRect(hwnd, &rc); - ok(!EqualRect(&rcMain, &rc), "rects shouldn't match\n"); - - ret = ShowWindow(hwnd, SW_RESTORE); - ok(ret, "not expected ret: %lu\n", ret); - style = GetWindowLong(hwnd, GWL_STYLE); - ok(style & WS_DISABLED, "window should be disabled\n"); - ok(style & WS_VISIBLE, "window should be visible\n"); - ok(!(style & WS_MINIMIZE), "window should not be minimized\n"); - ok(!(style & WS_MAXIMIZE), "window should not be maximized\n"); - GetWindowRect(hwnd, &rc); - ok(EqualRect(&rcMain, &rc), "expected (%d,%d)-(%d,%d), got (%d,%d)-(%d,%d)\n", - rcMain.left, rcMain.top, rcMain.right, rcMain.bottom, - rc.left, rc.top, rc.right, rc.bottom); - - ret = DefWindowProc(hwnd, WM_SYSCOMMAND, SC_CLOSE, 0); - ok(!ret, "not expected ret: %lu\n", ret); - ok(IsWindow(hwnd), "window should exist\n"); - - ret = EnableWindow(hwnd, TRUE); - ok(ret, "not expected ret: %lu\n", ret); - - ret = DefWindowProc(hwnd, WM_SYSCOMMAND, SC_CLOSE, 0); - ok(!ret, "not expected ret: %lu\n", ret); - ok(!IsWindow(hwnd), "window should not exist\n"); -} - -static void test_gettext(void) -{ - WNDCLASS cls; - LPCSTR clsname = "gettexttest"; - HWND hwnd; - LRESULT r; - - memset( &cls, 0, sizeof cls ); - cls.lpfnWndProc = DefWindowProc; - cls.lpszClassName = clsname; - cls.hInstance = GetModuleHandle(NULL); - - if (!RegisterClass( &cls )) return; - - hwnd = CreateWindow( clsname, "test text", WS_OVERLAPPED, 0, 0, 10, 10, 0, NULL, NULL, NULL); - ok( hwnd != NULL, "window was null\n"); - - r = SendMessage( hwnd, WM_GETTEXT, 0x10, 0x1000); - ok( r == 0, "settext should return zero\n"); - - r = SendMessage( hwnd, WM_GETTEXT, 0x10000, 0); - ok( r == 0, "settext should return zero (%ld)\n", r); - - r = SendMessage( hwnd, WM_GETTEXT, 0xff000000, 0x1000); - ok( r == 0, "settext should return zero (%ld)\n", r); - - r = SendMessage( hwnd, WM_GETTEXT, 0x1000, 0xff000000); - ok( r == 0, "settext should return zero (%ld)\n", r); - - DestroyWindow(hwnd); - UnregisterClass( clsname, NULL ); -} - - -static void test_GetUpdateRect(void) -{ - MSG msg; - BOOL ret, parent_wm_paint, grandparent_wm_paint; - RECT rc1, rc2; - HWND hgrandparent, hparent, hchild; - WNDCLASSA cls; - static const char classNameA[] = "GetUpdateRectClass"; - - hgrandparent = CreateWindowA("static", "grandparent", WS_OVERLAPPEDWINDOW, - 0, 0, 100, 100, NULL, NULL, 0, NULL); - - hparent = CreateWindowA("static", "parent", WS_CHILD|WS_VISIBLE, - 0, 0, 100, 100, hgrandparent, NULL, 0, NULL); - - hchild = CreateWindowA("static", "child", WS_CHILD|WS_VISIBLE, - 10, 10, 30, 30, hparent, NULL, 0, NULL); - - ShowWindow(hgrandparent, SW_SHOW); - UpdateWindow(hgrandparent); - flush_events( TRUE ); - - ShowWindow(hchild, SW_HIDE); - SetRect(&rc2, 0, 0, 0, 0); - ret = GetUpdateRect(hgrandparent, &rc1, FALSE); - ok(!ret, "GetUpdateRect returned not empty region\n"); - ok(EqualRect(&rc1, &rc2), "rects do not match (%d,%d,%d,%d) / (%d,%d,%d,%d)\n", - rc1.left, rc1.top, rc1.right, rc1.bottom, - rc2.left, rc2.top, rc2.right, rc2.bottom); - - SetRect(&rc2, 10, 10, 40, 40); - ret = GetUpdateRect(hparent, &rc1, FALSE); - ok(ret, "GetUpdateRect returned empty region\n"); - ok(EqualRect(&rc1, &rc2), "rects do not match (%d,%d,%d,%d) / (%d,%d,%d,%d)\n", - rc1.left, rc1.top, rc1.right, rc1.bottom, - rc2.left, rc2.top, rc2.right, rc2.bottom); - - parent_wm_paint = FALSE; - grandparent_wm_paint = FALSE; - while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) - { - if (msg.message == WM_PAINT) - { - if (msg.hwnd == hgrandparent) grandparent_wm_paint = TRUE; - if (msg.hwnd == hparent) parent_wm_paint = TRUE; - } - DispatchMessage(&msg); - } - ok(parent_wm_paint, "WM_PAINT should have been received in parent\n"); - ok(!grandparent_wm_paint, "WM_PAINT should NOT have been received in grandparent\n"); - - DestroyWindow(hgrandparent); - - cls.style = 0; - cls.lpfnWndProc = DefWindowProcA; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(0); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = classNameA; - - if(!RegisterClassA(&cls)) { - trace("Register failed %d\n", GetLastError()); - return; - } - - hgrandparent = CreateWindowA(classNameA, "grandparent", WS_OVERLAPPEDWINDOW, - 0, 0, 100, 100, NULL, NULL, 0, NULL); - - hparent = CreateWindowA(classNameA, "parent", WS_CHILD|WS_VISIBLE, - 0, 0, 100, 100, hgrandparent, NULL, 0, NULL); - - hchild = CreateWindowA(classNameA, "child", WS_CHILD|WS_VISIBLE, - 10, 10, 30, 30, hparent, NULL, 0, NULL); - - ShowWindow(hgrandparent, SW_SHOW); - UpdateWindow(hgrandparent); - flush_events( TRUE ); - - ret = GetUpdateRect(hgrandparent, &rc1, FALSE); - ok(!ret, "GetUpdateRect returned not empty region\n"); - - ShowWindow(hchild, SW_HIDE); - - SetRect(&rc2, 0, 0, 0, 0); - ret = GetUpdateRect(hgrandparent, &rc1, FALSE); - ok(!ret, "GetUpdateRect returned not empty region\n"); - ok(EqualRect(&rc1, &rc2), "rects do not match (%d,%d,%d,%d) / (%d,%d,%d,%d)\n", - rc1.left, rc1.top, rc1.right, rc1.bottom, - rc2.left, rc2.top, rc2.right, rc2.bottom); - - SetRect(&rc2, 10, 10, 40, 40); - ret = GetUpdateRect(hparent, &rc1, FALSE); - ok(ret, "GetUpdateRect returned empty region\n"); - ok(EqualRect(&rc1, &rc2), "rects do not match (%d,%d,%d,%d) / (%d,%d,%d,%d)\n", - rc1.left, rc1.top, rc1.right, rc1.bottom, - rc2.left, rc2.top, rc2.right, rc2.bottom); - - parent_wm_paint = FALSE; - grandparent_wm_paint = FALSE; - while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) - { - if (msg.message == WM_PAINT) - { - if (msg.hwnd == hgrandparent) grandparent_wm_paint = TRUE; - if (msg.hwnd == hparent) parent_wm_paint = TRUE; - } - DispatchMessage(&msg); - } - ok(parent_wm_paint, "WM_PAINT should have been received in parent\n"); - ok(!grandparent_wm_paint, "WM_PAINT should NOT have been received in grandparent\n"); - - DestroyWindow(hgrandparent); -} - - -static LRESULT CALLBACK TestExposedRegion_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - if(msg == WM_PAINT) - { - PAINTSTRUCT ps; - RECT updateRect; - DWORD waitResult; - HWND win; - const int waitTime = 2000; - - BeginPaint(hwnd, &ps); - - /* create and destroy window to create an exposed region on this window */ - win = CreateWindowA("static", "win", WS_VISIBLE, - 10,10,50,50, NULL, NULL, 0, NULL); - DestroyWindow(win); - - waitResult = MsgWaitForMultipleObjects( 0, NULL, FALSE, waitTime, QS_PAINT ); - - ValidateRect(hwnd, NULL); - EndPaint(hwnd, &ps); - - if(waitResult != WAIT_TIMEOUT) - { - GetUpdateRect(hwnd, &updateRect, FALSE); - ok(IsRectEmpty(&updateRect), "Exposed rect should be empty\n"); - } - - return 1; - } - return DefWindowProc(hwnd, msg, wParam, lParam); -} - -static void test_Expose(void) -{ - WNDCLASSA cls; - HWND mw; - - memset(&cls, 0, sizeof(WNDCLASSA)); - cls.lpfnWndProc = TestExposedRegion_WndProc; - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszClassName = "TestExposeClass"; - RegisterClassA(&cls); - - mw = CreateWindowA("TestExposeClass", "MainWindow", WS_VISIBLE|WS_OVERLAPPEDWINDOW, - 0, 0, 200, 100, NULL, NULL, 0, NULL); - - UpdateWindow(mw); - DestroyWindow(mw); -} - -static LRESULT CALLBACK TestNCRedraw_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - static UINT ncredrawflags; - PAINTSTRUCT ps; - - switch(msg) - { - case WM_CREATE: - ncredrawflags = *(UINT *) (((CREATESTRUCT *)lParam)->lpCreateParams); - return 0; - case WM_NCPAINT: - RedrawWindow(hwnd, NULL, NULL, ncredrawflags); - break; - case WM_PAINT: - BeginPaint(hwnd, &ps); - EndPaint(hwnd, &ps); - return 0; - } - return DefWindowProc(hwnd, msg, wParam, lParam); -} - -static void run_NCRedrawLoop(UINT flags) -{ - HWND hwnd; - MSG msg; - - UINT loopcount = 0; - - hwnd = CreateWindowA("TestNCRedrawClass", "MainWindow", - WS_OVERLAPPEDWINDOW, 0, 0, 200, 100, - NULL, NULL, 0, &flags); - ShowWindow(hwnd, SW_SHOW); - UpdateWindow(hwnd); - flush_events( FALSE ); - while(PeekMessage(&msg, hwnd, 0, 0, PM_REMOVE) != 0) - { - if (msg.message == WM_PAINT) loopcount++; - if (loopcount >= 100) break; - TranslateMessage(&msg); - DispatchMessage(&msg); - MsgWaitForMultipleObjects(0, NULL, FALSE, 100, QS_ALLINPUT); - } - if (flags == (RDW_INVALIDATE | RDW_FRAME)) - todo_wine ok(loopcount < 100, "Detected infinite WM_PAINT loop (%x).\n", flags); - else - ok(loopcount < 100, "Detected infinite WM_PAINT loop (%x).\n", flags); - DestroyWindow(hwnd); -} - -static void test_NCRedraw(void) -{ - WNDCLASSA wndclass; - - wndclass.lpszClassName = "TestNCRedrawClass"; - wndclass.style = CS_HREDRAW | CS_VREDRAW; - wndclass.lpfnWndProc = TestNCRedraw_WndProc; - wndclass.cbClsExtra = 0; - wndclass.cbWndExtra = 0; - wndclass.hInstance = 0; - wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION); - wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); - wndclass.hbrBackground = GetStockObject(WHITE_BRUSH); - wndclass.lpszMenuName = NULL; - - RegisterClassA(&wndclass); - - run_NCRedrawLoop(RDW_INVALIDATE | RDW_FRAME); - run_NCRedrawLoop(RDW_INVALIDATE); -} - -static void test_GetWindowModuleFileName(void) -{ - HWND hwnd; - HINSTANCE hinst; - UINT ret1, ret2; - char buf1[MAX_PATH], buf2[MAX_PATH]; - - if (!pGetWindowModuleFileNameA) - { - win_skip("GetWindowModuleFileNameA is not available\n"); - return; - } - - hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP, 0,0,0,0, 0, 0, 0, NULL); - assert(hwnd); - - hinst = (HINSTANCE)GetWindowLongPtr(hwnd, GWLP_HINSTANCE); - ok(hinst == 0 || broken(hinst == GetModuleHandle(0)), /* win9x */ "expected 0, got %p\n", hinst); - - buf1[0] = 0; - SetLastError(0xdeadbeef); - ret1 = GetModuleFileName(hinst, buf1, sizeof(buf1)); - ok(ret1, "GetModuleFileName error %u\n", GetLastError()); - - buf2[0] = 0; - SetLastError(0xdeadbeef); - ret2 = pGetWindowModuleFileNameA(hwnd, buf2, sizeof(buf2)); - ok(ret2 || broken(!ret2), /* nt4 sp 3 */ - "GetWindowModuleFileNameA error %u\n", GetLastError()); - - if (ret2) - { - ok(ret1 == ret2 || broken(ret2 == ret1 + 1), /* win98 */ "%u != %u\n", ret1, ret2); - ok(!strcmp(buf1, buf2), "%s != %s\n", buf1, buf2); - } - hinst = GetModuleHandle(0); - - SetLastError(0xdeadbeef); - ret2 = GetModuleFileName(hinst, buf2, ret1 - 2); - ok(ret2 == ret1 - 2 || broken(ret2 == ret1 - 3), /* win98 */ - "expected %u, got %u\n", ret1 - 2, ret2); - ok(GetLastError() == 0xdeadbeef /* XP */ || - GetLastError() == ERROR_INSUFFICIENT_BUFFER, /* win2k3, vista */ - "expected 0xdeadbeef or ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret2 = GetModuleFileName(hinst, buf2, 0); - ok(!ret2, "GetModuleFileName should return 0\n"); - ok(GetLastError() == 0xdeadbeef /* XP */ || - GetLastError() == ERROR_INSUFFICIENT_BUFFER, /* win2k3, vista */ - "expected 0xdeadbeef or ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret2 = pGetWindowModuleFileNameA(hwnd, buf2, ret1 - 2); - ok(ret2 == ret1 - 2 || broken(ret2 == ret1 - 3) /* win98 */ || broken(!ret2), /* nt4 sp3 */ - "expected %u, got %u\n", ret1 - 2, ret2); - ok(GetLastError() == 0xdeadbeef /* XP */ || - GetLastError() == ERROR_INSUFFICIENT_BUFFER, /* win2k3, vista */ - "expected 0xdeadbeef or ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret2 = pGetWindowModuleFileNameA(hwnd, buf2, 0); - ok(!ret2, "expected 0, got %u\n", ret2); - ok(GetLastError() == 0xdeadbeef /* XP */ || - GetLastError() == ERROR_INSUFFICIENT_BUFFER, /* win2k3, vista */ - "expected 0xdeadbeef or ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError()); - - DestroyWindow(hwnd); - - buf2[0] = 0; - hwnd = (HWND)0xdeadbeef; - SetLastError(0xdeadbeef); - ret1 = pGetWindowModuleFileNameA(hwnd, buf1, sizeof(buf1)); - ok(!ret1, "expected 0, got %u\n", ret1); - ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE || broken(GetLastError() == 0xdeadbeef), /* win9x */ - "expected ERROR_INVALID_WINDOW_HANDLE, got %u\n", GetLastError()); - - hwnd = FindWindow("Shell_TrayWnd", NULL); - ok(IsWindow(hwnd) || broken(!hwnd), "got invalid tray window %p\n", hwnd); - SetLastError(0xdeadbeef); - ret1 = pGetWindowModuleFileNameA(hwnd, buf1, sizeof(buf1)); - ok(!ret1 || broken(ret1), /* win98 */ "expected 0, got %u\n", ret1); - - if (!ret1) /* inter-process GetWindowModuleFileName works on win9x, so don't test the desktop there */ - { - ret1 = GetModuleFileName(0, buf1, sizeof(buf1)); - hwnd = GetDesktopWindow(); - ok(IsWindow(hwnd), "got invalid desktop window %p\n", hwnd); - SetLastError(0xdeadbeef); - ret2 = pGetWindowModuleFileNameA(hwnd, buf2, sizeof(buf2)); - ok(!ret2 || - ret1 == ret2 || /* vista */ - broken(ret2), /* some win98 return user.exe as file name */ - "expected 0 or %u, got %u %s\n", ret1, ret2, buf2); - } -} - -static void test_hwnd_message(void) -{ - static const WCHAR mainwindowclassW[] = {'M','a','i','n','W','i','n','d','o','w','C','l','a','s','s',0}; - static const WCHAR message_windowW[] = {'m','e','s','s','a','g','e',' ','w','i','n','d','o','w',0}; - - HWND parent = 0, hwnd, found; - RECT rect; - - /* HWND_MESSAGE is not supported below w2k, but win9x return != 0 - on CreateWindowExA and crash later in the test. - Use UNICODE here to fail on win9x */ - hwnd = CreateWindowExW(0, mainwindowclassW, message_windowW, WS_CAPTION | WS_VISIBLE, - 100, 100, 200, 200, HWND_MESSAGE, 0, 0, NULL); - if (!hwnd) - { - win_skip("CreateWindowExW with parent HWND_MESSAGE failed\n"); - return; - } - - ok( !GetParent(hwnd), "GetParent should return 0 for message only windows\n" ); - if (pGetAncestor) - { - char buffer[100]; - HWND root, desktop = GetDesktopWindow(); - - parent = pGetAncestor(hwnd, GA_PARENT); - ok(parent != 0, "GetAncestor(GA_PARENT) should not return 0 for message windows\n"); - ok(parent != desktop, "GetAncestor(GA_PARENT) should not return desktop for message windows\n"); - root = pGetAncestor(hwnd, GA_ROOT); - ok(root == hwnd, "GetAncestor(GA_ROOT) should return hwnd for message windows\n"); - ok( !pGetAncestor(parent, GA_PARENT) || broken(pGetAncestor(parent, GA_PARENT) != 0), /* win2k */ - "parent shouldn't have parent %p\n", pGetAncestor(parent, GA_PARENT) ); - trace("parent %p root %p desktop %p\n", parent, root, desktop); - if (!GetClassNameA( parent, buffer, sizeof(buffer) )) buffer[0] = 0; - ok( !lstrcmpi( buffer, "Message" ), "wrong parent class '%s'\n", buffer ); - GetWindowRect( parent, &rect ); - ok( rect.left == 0 && rect.right == 100 && rect.top == 0 && rect.bottom == 100, - "wrong parent rect %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - } - GetWindowRect( hwnd, &rect ); - ok( rect.left == 100 && rect.right == 300 && rect.top == 100 && rect.bottom == 300, - "wrong window rect %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom ); - - /* test FindWindow behavior */ - - found = FindWindowExA( 0, 0, 0, "message window" ); - ok( found == hwnd, "didn't find message window %p/%p\n", found, hwnd ); - SetLastError(0xdeadbeef); - found = FindWindowExA( GetDesktopWindow(), 0, 0, "message window" ); - ok( found == 0, "found message window %p/%p\n", found, hwnd ); - ok( GetLastError() == 0xdeadbeef, "expected deadbeef, got %d\n", GetLastError() ); - if (parent) - { - found = FindWindowExA( parent, 0, 0, "message window" ); - ok( found == hwnd, "didn't find message window %p/%p\n", found, hwnd ); - } - - /* test IsChild behavior */ - - if (parent) ok( !IsChild( parent, hwnd ), "HWND_MESSAGE is child of top window\n" ); - - /* test IsWindowVisible behavior */ - - ok( !IsWindowVisible( hwnd ), "HWND_MESSAGE window is visible\n" ); - if (parent) ok( !IsWindowVisible( parent ), "HWND_MESSAGE parent is visible\n" ); - - DestroyWindow(hwnd); -} - -static void test_layered_window(void) -{ - HWND hwnd; - COLORREF key = 0; - BYTE alpha = 0; - DWORD flags = 0; - POINT pt = { 0, 0 }; - SIZE sz = { 200, 200 }; - HDC hdc; - HBITMAP hbm; - BOOL ret; - - if (!pGetLayeredWindowAttributes || !pSetLayeredWindowAttributes || !pUpdateLayeredWindow) - { - win_skip( "layered windows not supported\n" ); - return; - } - - hdc = CreateCompatibleDC( 0 ); - hbm = CreateCompatibleBitmap( hdc, 200, 200 ); - SelectObject( hdc, hbm ); - - hwnd = CreateWindowExA(0, "MainWindowClass", "message window", WS_CAPTION, - 100, 100, 200, 200, 0, 0, 0, NULL); - assert( hwnd ); - SetLastError( 0xdeadbeef ); - ret = pUpdateLayeredWindow( hwnd, 0, NULL, &sz, hdc, &pt, 0, NULL, ULW_OPAQUE ); - ok( !ret, "UpdateLayeredWindow should fail on non-layered window\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError() ); - ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags ); - ok( !ret, "GetLayeredWindowAttributes should fail on non-layered window\n" ); - ret = pSetLayeredWindowAttributes( hwnd, 0, 0, LWA_ALPHA ); - ok( !ret, "SetLayeredWindowAttributes should fail on non-layered window\n" ); - SetWindowLong( hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED ); - ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags ); - ok( !ret, "GetLayeredWindowAttributes should fail on layered but not initialized window\n" ); - ret = pUpdateLayeredWindow( hwnd, 0, NULL, &sz, hdc, &pt, 0, NULL, ULW_OPAQUE ); - ok( ret, "UpdateLayeredWindow should succeed on layered window\n" ); - ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags ); - ok( !ret, "GetLayeredWindowAttributes should fail on layered but not initialized window\n" ); - ret = pSetLayeredWindowAttributes( hwnd, 0x123456, 44, LWA_ALPHA ); - ok( ret, "SetLayeredWindowAttributes should succeed on layered window\n" ); - ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags ); - ok( ret, "GetLayeredWindowAttributes should succeed on layered window\n" ); - ok( key == 0x123456 || key == 0, "wrong color key %x\n", key ); - ok( alpha == 44, "wrong alpha %u\n", alpha ); - ok( flags == LWA_ALPHA, "wrong flags %x\n", flags ); - SetLastError( 0xdeadbeef ); - ret = pUpdateLayeredWindow( hwnd, 0, NULL, &sz, hdc, &pt, 0, NULL, ULW_OPAQUE ); - ok( !ret, "UpdateLayeredWindow should fail on layered but initialized window\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError() ); - - /* clearing WS_EX_LAYERED resets attributes */ - SetWindowLong( hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) & ~WS_EX_LAYERED ); - SetLastError( 0xdeadbeef ); - ret = pUpdateLayeredWindow( hwnd, 0, NULL, &sz, hdc, &pt, 0, NULL, ULW_OPAQUE ); - ok( !ret, "UpdateLayeredWindow should fail on non-layered window\n" ); - ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags ); - ok( !ret, "GetLayeredWindowAttributes should fail on no longer layered window\n" ); - SetWindowLong( hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED ); - ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags ); - ok( !ret, "GetLayeredWindowAttributes should fail on layered but not initialized window\n" ); - ret = pUpdateLayeredWindow( hwnd, 0, NULL, &sz, hdc, &pt, 0, NULL, ULW_OPAQUE ); - ok( ret, "UpdateLayeredWindow should succeed on layered window\n" ); - ret = pSetLayeredWindowAttributes( hwnd, 0x654321, 22, LWA_COLORKEY | LWA_ALPHA ); - ok( ret, "SetLayeredWindowAttributes should succeed on layered window\n" ); - ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags ); - ok( ret, "GetLayeredWindowAttributes should succeed on layered window\n" ); - ok( key == 0x654321, "wrong color key %x\n", key ); - ok( alpha == 22, "wrong alpha %u\n", alpha ); - ok( flags == (LWA_COLORKEY | LWA_ALPHA), "wrong flags %x\n", flags ); - SetLastError( 0xdeadbeef ); - ret = pUpdateLayeredWindow( hwnd, 0, NULL, &sz, hdc, &pt, 0, NULL, ULW_OPAQUE ); - ok( !ret, "UpdateLayeredWindow should fail on layered but initialized window\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError() ); - - ret = pSetLayeredWindowAttributes( hwnd, 0x888888, 33, LWA_COLORKEY ); - ok( ret, "SetLayeredWindowAttributes should succeed on layered window\n" ); - alpha = 0; - ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags ); - ok( ret, "GetLayeredWindowAttributes should succeed on layered window\n" ); - ok( key == 0x888888, "wrong color key %x\n", key ); - /* alpha not changed on vista if LWA_ALPHA is not set */ - ok( alpha == 22 || alpha == 33, "wrong alpha %u\n", alpha ); - ok( flags == LWA_COLORKEY, "wrong flags %x\n", flags ); - - /* color key may or may not be changed without LWA_COLORKEY */ - ret = pSetLayeredWindowAttributes( hwnd, 0x999999, 44, 0 ); - ok( ret, "SetLayeredWindowAttributes should succeed on layered window\n" ); - alpha = 0; - ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags ); - ok( ret, "GetLayeredWindowAttributes should succeed on layered window\n" ); - ok( key == 0x888888 || key == 0x999999, "wrong color key %x\n", key ); - ok( alpha == 22 || alpha == 44, "wrong alpha %u\n", alpha ); - ok( flags == 0, "wrong flags %x\n", flags ); - - /* default alpha and color key is 0 */ - SetWindowLong( hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) & ~WS_EX_LAYERED ); - SetWindowLong( hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED ); - ret = pSetLayeredWindowAttributes( hwnd, 0x222222, 55, 0 ); - ok( ret, "SetLayeredWindowAttributes should succeed on layered window\n" ); - ret = pGetLayeredWindowAttributes( hwnd, &key, &alpha, &flags ); - ok( ret, "GetLayeredWindowAttributes should succeed on layered window\n" ); - ok( key == 0 || key == 0x222222, "wrong color key %x\n", key ); - ok( alpha == 0 || alpha == 55, "wrong alpha %u\n", alpha ); - ok( flags == 0, "wrong flags %x\n", flags ); - - DestroyWindow( hwnd ); - DeleteDC( hdc ); - DeleteObject( hbm ); -} - -static MONITORINFO mi; - -static LRESULT CALLBACK fullscreen_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) -{ - switch (msg) - { - case WM_NCCREATE: - { - CREATESTRUCTA *cs = (CREATESTRUCTA *)lp; - trace("WM_NCCREATE: rect %d,%d-%d,%d\n", cs->x, cs->y, cs->cx, cs->cy); - ok(cs->x == mi.rcMonitor.left && cs->y == mi.rcMonitor.top && - cs->cx == mi.rcMonitor.right && cs->cy == mi.rcMonitor.bottom, - "expected %d,%d-%d,%d, got %d,%d-%d,%d\n", - mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom, - cs->x, cs->y, cs->cx, cs->cy); - break; - } - case WM_GETMINMAXINFO: - { - MINMAXINFO *minmax = (MINMAXINFO *)lp; - dump_minmax_info(minmax); - ok(minmax->ptMaxPosition.x <= mi.rcMonitor.left, "%d <= %d\n", minmax->ptMaxPosition.x, mi.rcMonitor.left); - ok(minmax->ptMaxPosition.y <= mi.rcMonitor.top, "%d <= %d\n", minmax->ptMaxPosition.y, mi.rcMonitor.top); - ok(minmax->ptMaxSize.x >= mi.rcMonitor.right, "%d >= %d\n", minmax->ptMaxSize.x, mi.rcMonitor.right); - ok(minmax->ptMaxSize.y >= mi.rcMonitor.bottom, "%d >= %d\n", minmax->ptMaxSize.y, mi.rcMonitor.bottom); - break; - } - } - return DefWindowProc(hwnd, msg, wp, lp); -} - -static void test_fullscreen(void) -{ - static const DWORD t_style[] = { - WS_OVERLAPPED, WS_POPUP, WS_CHILD, WS_THICKFRAME, WS_DLGFRAME - }; - static const DWORD t_ex_style[] = { - 0, WS_EX_APPWINDOW, WS_EX_TOOLWINDOW - }; - WNDCLASS cls; - HWND hwnd; - int i, j; - POINT pt; - RECT rc; - HMONITOR hmon; - LRESULT ret; - - if (!pGetMonitorInfoA || !pMonitorFromPoint) - { - win_skip("GetMonitorInfoA or MonitorFromPoint are not available on this platform\n"); - return; - } - - pt.x = pt.y = 0; - SetLastError(0xdeadbeef); - hmon = pMonitorFromPoint(pt, MONITOR_DEFAULTTOPRIMARY); - ok(hmon != 0, "MonitorFromPoint error %u\n", GetLastError()); - - mi.cbSize = sizeof(mi); - SetLastError(0xdeadbeef); - ret = pGetMonitorInfoA(hmon, &mi); - ok(ret, "GetMonitorInfo error %u\n", GetLastError()); - trace("monitor (%d,%d-%d,%d), work (%d,%d-%d,%d)\n", - mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom, - mi.rcWork.left, mi.rcWork.top, mi.rcWork.right, mi.rcWork.bottom); - - cls.style = 0; - cls.lpfnWndProc = fullscreen_wnd_proc; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandle(0); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "fullscreen_class"; - RegisterClass(&cls); - - for (i = 0; i < sizeof(t_style)/sizeof(t_style[0]); i++) - { - DWORD style, ex_style; - - /* avoid a WM interaction */ - assert(!(t_style[i] & WS_VISIBLE)); - - for (j = 0; j < sizeof(t_ex_style)/sizeof(t_ex_style[0]); j++) - { - int fixup; - - style = t_style[i]; - ex_style = t_ex_style[j]; - - hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style, - mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom, - GetDesktopWindow(), 0, GetModuleHandle(0), NULL); - ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style); - GetWindowRect(hwnd, &rc); - trace("%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); - ok(rc.left <= mi.rcMonitor.left && rc.top <= mi.rcMonitor.top && - rc.right >= mi.rcMonitor.right && rc.bottom >= mi.rcMonitor.bottom, - "%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); - DestroyWindow(hwnd); - - style = t_style[i] | WS_MAXIMIZE; - hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style, - mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom, - GetDesktopWindow(), 0, GetModuleHandle(0), NULL); - ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style); - GetWindowRect(hwnd, &rc); - trace("%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); - ok(rc.left <= mi.rcMonitor.left && rc.top <= mi.rcMonitor.top && - rc.right >= mi.rcMonitor.right && rc.bottom >= mi.rcMonitor.bottom, - "%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); - DestroyWindow(hwnd); - - style = t_style[i] | WS_MAXIMIZE | WS_CAPTION; - hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style, - mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom, - GetDesktopWindow(), 0, GetModuleHandle(0), NULL); - ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style); - GetWindowRect(hwnd, &rc); - trace("%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); - ok(rc.left <= mi.rcMonitor.left && rc.top <= mi.rcMonitor.top && - rc.right >= mi.rcMonitor.right && rc.bottom >= mi.rcMonitor.bottom, - "%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); - DestroyWindow(hwnd); - - style = t_style[i] | WS_CAPTION | WS_MAXIMIZEBOX; - hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style, - mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom, - GetDesktopWindow(), 0, GetModuleHandle(0), NULL); - ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style); - GetWindowRect(hwnd, &rc); - trace("%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); - ok(rc.left <= mi.rcMonitor.left && rc.top <= mi.rcMonitor.top && - rc.right >= mi.rcMonitor.right && rc.bottom >= mi.rcMonitor.bottom, - "%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); - DestroyWindow(hwnd); - - style = t_style[i] | WS_MAXIMIZE | WS_CAPTION | WS_MAXIMIZEBOX; - hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style, - mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom, - GetDesktopWindow(), 0, GetModuleHandle(0), NULL); - ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style); - GetWindowRect(hwnd, &rc); - trace("%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); - /* Windows makes a maximized window slightly larger (to hide the borders?) */ - fixup = min(abs(rc.left), abs(rc.top)); - InflateRect(&rc, -fixup, -fixup); - ok(rc.left >= mi.rcWork.left && rc.top <= mi.rcWork.top && - rc.right <= mi.rcWork.right && rc.bottom <= mi.rcWork.bottom, - "%#x/%#x: window rect %d,%d-%d,%d must be in %d,%d-%d,%d\n", - ex_style, style, rc.left, rc.top, rc.right, rc.bottom, - mi.rcWork.left, mi.rcWork.top, mi.rcWork.right, mi.rcWork.bottom); - DestroyWindow(hwnd); - - style = t_style[i] | WS_MAXIMIZE | WS_MAXIMIZEBOX; - hwnd = CreateWindowExA(ex_style, "fullscreen_class", NULL, style, - mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom, - GetDesktopWindow(), 0, GetModuleHandle(0), NULL); - ok(hwnd != 0, "%d: CreateWindowExA(%#x/%#x) failed\n", i, ex_style, style); - GetWindowRect(hwnd, &rc); - trace("%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); - /* Windows makes a maximized window slightly larger (to hide the borders?) */ - fixup = min(abs(rc.left), abs(rc.top)); - InflateRect(&rc, -fixup, -fixup); - if (style & (WS_CHILD | WS_POPUP)) - ok(rc.left <= mi.rcMonitor.left && rc.top <= mi.rcMonitor.top && - rc.right >= mi.rcMonitor.right && rc.bottom >= mi.rcMonitor.bottom, - "%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); - else - ok(rc.left >= mi.rcWork.left && rc.top <= mi.rcWork.top && - rc.right <= mi.rcWork.right && rc.bottom <= mi.rcWork.bottom, - "%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom); - DestroyWindow(hwnd); - } - } - - UnregisterClass("fullscreen_class", GetModuleHandle(0)); -} - -static BOOL test_thick_child_got_minmax; -static const char * test_thick_child_name; -static LONG test_thick_child_style; -static LONG test_thick_child_exStyle; - -static LRESULT WINAPI test_thick_child_size_winproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - MINMAXINFO* minmax; - int expectedMinTrackX; - int expectedMinTrackY; - int actualMinTrackX; - int actualMinTrackY; - int expectedMaxTrackX; - int expectedMaxTrackY; - int actualMaxTrackX; - int actualMaxTrackY; - int expectedMaxSizeX; - int expectedMaxSizeY; - int actualMaxSizeX; - int actualMaxSizeY; - int expectedPosX; - int expectedPosY; - int actualPosX; - int actualPosY; - LONG adjustedStyle; - RECT rect; - switch (msg) - { - case WM_GETMINMAXINFO: - { - minmax = (MINMAXINFO *)lparam; - trace("hwnd %p, WM_GETMINMAXINFO, %08lx, %08lx\n", hwnd, wparam, lparam); - dump_minmax_info( minmax ); - - test_thick_child_got_minmax = TRUE; - - - adjustedStyle = test_thick_child_style; - if ((adjustedStyle & WS_CAPTION) == WS_CAPTION) - adjustedStyle &= ~WS_BORDER; /* WS_CAPTION = WS_DLGFRAME | WS_BORDER */ - GetClientRect(GetParent(hwnd), &rect); - AdjustWindowRectEx(&rect, adjustedStyle, FALSE, test_thick_child_exStyle); - - if (test_thick_child_style & (WS_DLGFRAME | WS_BORDER)) - { - expectedMinTrackX = GetSystemMetrics(SM_CXMINTRACK); - expectedMinTrackY = GetSystemMetrics(SM_CYMINTRACK); - } - else - { - expectedMinTrackX = -2 * rect.left; - expectedMinTrackY = -2 * rect.top; - } - actualMinTrackX = minmax->ptMinTrackSize.x; - actualMinTrackY = minmax->ptMinTrackSize.y; - - ok(actualMinTrackX == expectedMinTrackX && actualMinTrackY == expectedMinTrackY, - "expected minTrack %dx%d, actual minTrack %dx%d for %s\n", - expectedMinTrackX, expectedMinTrackY, actualMinTrackX, actualMinTrackY, - test_thick_child_name); - - actualMaxTrackX = minmax->ptMaxTrackSize.x; - actualMaxTrackY = minmax->ptMaxTrackSize.y; - expectedMaxTrackX = GetSystemMetrics(SM_CXMAXTRACK); - expectedMaxTrackY = GetSystemMetrics(SM_CYMAXTRACK); - ok(actualMaxTrackX == expectedMaxTrackX && actualMaxTrackY == expectedMaxTrackY, - "expected maxTrack %dx%d, actual maxTrack %dx%d for %s\n", - expectedMaxTrackX, expectedMaxTrackY, actualMaxTrackX, actualMaxTrackY, - test_thick_child_name); - - expectedMaxSizeX = rect.right - rect.left; - expectedMaxSizeY = rect.bottom - rect.top; - actualMaxSizeX = minmax->ptMaxSize.x; - actualMaxSizeY = minmax->ptMaxSize.y; - - ok(actualMaxSizeX == expectedMaxSizeX && actualMaxSizeY == expectedMaxSizeY, - "expected maxSize %dx%d, actual maxSize %dx%d for %s\n", - expectedMaxSizeX, expectedMaxSizeY, actualMaxSizeX, actualMaxSizeY, - test_thick_child_name); - - - expectedPosX = rect.left; - expectedPosY = rect.top; - actualPosX = minmax->ptMaxPosition.x; - actualPosY = minmax->ptMaxPosition.y; - ok(actualPosX == expectedPosX && actualPosY == expectedPosY, - "expected maxPosition (%d/%d), actual maxPosition (%d/%d) for %s\n", - expectedPosX, expectedPosY, actualPosX, actualPosY, test_thick_child_name); - - break; - } - } - - return DefWindowProcA(hwnd, msg, wparam, lparam); -} - -#define NUMBER_OF_THICK_CHILD_TESTS 16 -static void test_thick_child_size(HWND parentWindow) -{ - BOOL success; - RECT childRect; - RECT adjustedParentRect; - HWND childWindow; - LONG childWidth; - LONG childHeight; - LONG expectedWidth; - LONG expectedHeight; - WNDCLASSA cls; - LPCTSTR className = "THICK_CHILD_CLASS"; - int i; - LONG adjustedStyle; - static const LONG styles[NUMBER_OF_THICK_CHILD_TESTS] = { - WS_CHILD | WS_VISIBLE | WS_THICKFRAME, - WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_DLGFRAME, - WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_DLGFRAME | WS_BORDER, - WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_BORDER, - WS_CHILD | WS_VISIBLE | WS_THICKFRAME, - WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_DLGFRAME, - WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_DLGFRAME | WS_BORDER, - WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_BORDER, - WS_CHILD | WS_VISIBLE | WS_THICKFRAME, - WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_DLGFRAME, - WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_DLGFRAME | WS_BORDER, - WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_BORDER, - WS_CHILD | WS_VISIBLE | WS_THICKFRAME, - WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_DLGFRAME, - WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_DLGFRAME | WS_BORDER, - WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_BORDER, - }; - - static const LONG exStyles[NUMBER_OF_THICK_CHILD_TESTS] = { - 0, - 0, - 0, - 0, - WS_EX_DLGMODALFRAME, - WS_EX_DLGMODALFRAME, - WS_EX_DLGMODALFRAME, - WS_EX_DLGMODALFRAME, - WS_EX_STATICEDGE, - WS_EX_STATICEDGE, - WS_EX_STATICEDGE, - WS_EX_STATICEDGE, - WS_EX_STATICEDGE | WS_EX_DLGMODALFRAME, - WS_EX_STATICEDGE | WS_EX_DLGMODALFRAME, - WS_EX_STATICEDGE | WS_EX_DLGMODALFRAME, - WS_EX_STATICEDGE | WS_EX_DLGMODALFRAME, - }; - static const char *styleName[NUMBER_OF_THICK_CHILD_TESTS] = { - "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME", - "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_DLGFRAME", - "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_DLGFRAME | WS_BORDER", - "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_BORDER", - "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME, exstyle= WS_EX_DLGMODALFRAME", - "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_DLGFRAME exstyle= WS_EX_DLGMODALFRAME", - "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_DLGFRAME | WS_BORDER exstyle= WS_EX_DLGMODALFRAME", - "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_BORDER exstyle= WS_EX_DLGMODALFRAME", - "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME exstyle= WS_EX_STATICEDGE", - "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_DLGFRAME exstyle= WS_EX_STATICEDGE", - "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_DLGFRAME | WS_BORDER exstyle= WS_EX_STATICEDGE", - "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_BORDER exstyle= WS_EX_STATICEDGE", - "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME, exstyle= WS_EX_STATICEDGE | WS_EX_DLGMODALFRAME", - "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_DLGFRAME exstyle= WS_EX_STATICEDGE | WS_EX_DLGMODALFRAME", - "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_DLGFRAME | WS_BORDER exstyle= WS_EX_STATICEDGE | WS_EX_DLGMODALFRAME", - "style=WS_CHILD | WS_VISIBLE | WS_THICKFRAME | WS_BORDER exstyle= WS_EX_STATICEDGE | WS_EX_DLGMODALFRAME", - }; - - cls.style = 0; - cls.lpfnWndProc = test_thick_child_size_winproc; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(0); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = className; - SetLastError(0xdeadbeef); - success = RegisterClassA(&cls); - ok(success,"RegisterClassA failed, error: %u\n", GetLastError()); - - for(i = 0; i < NUMBER_OF_THICK_CHILD_TESTS; i++) - { - test_thick_child_name = styleName[i]; - test_thick_child_style = styles[i]; - test_thick_child_exStyle = exStyles[i]; - test_thick_child_got_minmax = FALSE; - - SetLastError(0xdeadbeef); - childWindow = CreateWindowEx( exStyles[i], className, "", styles[i], 0, 0, 0, 0, parentWindow, 0, GetModuleHandleA(0), NULL ); - ok(childWindow != NULL, "Failed to create child window, error: %u\n", GetLastError()); - - ok(test_thick_child_got_minmax, "Got no WM_GETMINMAXINFO\n"); - - SetLastError(0xdeadbeef); - success = GetWindowRect(childWindow, &childRect); - ok(success,"GetWindowRect call failed, error: %u\n", GetLastError()); - childWidth = childRect.right - childRect.left; - childHeight = childRect.bottom - childRect.top; - - adjustedStyle = styles[i]; - if ((adjustedStyle & WS_CAPTION) == WS_CAPTION) - adjustedStyle &= ~WS_BORDER; /* WS_CAPTION = WS_DLGFRAME | WS_BORDER */ - GetClientRect(GetParent(childWindow), &adjustedParentRect); - AdjustWindowRectEx(&adjustedParentRect, adjustedStyle, FALSE, test_thick_child_exStyle); - - - if (test_thick_child_style & (WS_DLGFRAME | WS_BORDER)) - { - expectedWidth = GetSystemMetrics(SM_CXMINTRACK); - expectedHeight = GetSystemMetrics(SM_CYMINTRACK); - } - else - { - expectedWidth = -2 * adjustedParentRect.left; - expectedHeight = -2 * adjustedParentRect.top; - } - - ok((childWidth == expectedWidth) && (childHeight == expectedHeight), - "size of window (%s) is wrong: expected size %dx%d != actual size %dx%d\n", - test_thick_child_name, expectedWidth, expectedHeight, childWidth, childHeight); - - SetLastError(0xdeadbeef); - success = DestroyWindow(childWindow); - ok(success,"DestroyWindow call failed, error: %u\n", GetLastError()); - } - ok(UnregisterClass(className, GetModuleHandleA(0)),"UnregisterClass call failed\n"); -} - -static void test_handles( HWND full_hwnd ) -{ - HWND hwnd = full_hwnd; - BOOL ret; - RECT rect; - - SetLastError( 0xdeadbeef ); - ret = GetWindowRect( hwnd, &rect ); - ok( ret, "GetWindowRect failed for %p err %u\n", hwnd, GetLastError() ); - -#ifdef _WIN64 - if ((ULONG_PTR)full_hwnd >> 32) - hwnd = (HWND)((ULONG_PTR)full_hwnd & ~0u); - else - hwnd = (HWND)((ULONG_PTR)full_hwnd | ((ULONG_PTR)~0u << 32)); - SetLastError( 0xdeadbeef ); - ret = GetWindowRect( hwnd, &rect ); - ok( ret, "GetWindowRect failed for %p err %u\n", hwnd, GetLastError() ); - - hwnd = (HWND)(((ULONG_PTR)full_hwnd & ~0u) | ((ULONG_PTR)0x1234 << 32)); - SetLastError( 0xdeadbeef ); - ret = GetWindowRect( hwnd, &rect ); - ok( ret, "GetWindowRect failed for %p err %u\n", hwnd, GetLastError() ); - - hwnd = (HWND)(((ULONG_PTR)full_hwnd & 0xffff) | ((ULONG_PTR)0x9876 << 16)); - SetLastError( 0xdeadbeef ); - ret = GetWindowRect( hwnd, &rect ); - ok( !ret, "GetWindowRect succeeded for %p\n", hwnd ); - ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %u\n", GetLastError() ); - - hwnd = (HWND)(((ULONG_PTR)full_hwnd & 0xffff) | ((ULONG_PTR)0x12345678 << 16)); - SetLastError( 0xdeadbeef ); - ret = GetWindowRect( hwnd, &rect ); - ok( !ret, "GetWindowRect succeeded for %p\n", hwnd ); - ok( GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "wrong error %u\n", GetLastError() ); -#endif -} - -static void test_winregion(void) -{ - HWND hwnd; - RECT r; - int ret, width; - HRGN hrgn; - - if (!pGetWindowRgnBox) - { - win_skip("GetWindowRgnBox not supported\n"); - return; - } - - hwnd = CreateWindowExA(0, "static", NULL, WS_VISIBLE, 10, 10, 10, 10, NULL, 0, 0, NULL); - /* NULL prect */ - SetLastError(0xdeadbeef); - ret = pGetWindowRgnBox(hwnd, NULL); - ok( ret == ERROR, "Expected ERROR, got %d\n", ret); - ok( GetLastError() == 0xdeadbeef, "Expected , got %d\n", GetLastError()); - - hrgn = CreateRectRgn(2, 3, 10, 15); - ok( hrgn != NULL, "Region creation failed\n"); - if (hrgn) - { - SetWindowRgn(hwnd, hrgn, FALSE); - - SetLastError(0xdeadbeef); - ret = pGetWindowRgnBox(hwnd, NULL); - ok( ret == ERROR, "Expected ERROR, got %d\n", ret); - ok( GetLastError() == 0xdeadbeef, "Expected , got %d\n", GetLastError()); - - r.left = r.top = r.right = r.bottom = 0; - ret = pGetWindowRgnBox(hwnd, &r); - ok( ret == SIMPLEREGION, "Expected SIMPLEREGION, got %d\n", ret); - ok( r.left == 2 && r.top == 3 && r.right == 10 && r.bottom == 15, - "Expected (2,3,10,15), got (%d,%d,%d,%d)\n", r.left, r.top, - r.right, r.bottom); - if (pMirrorRgn) - { - hrgn = CreateRectRgn(2, 3, 10, 15); - ret = pMirrorRgn( hwnd, hrgn ); - ok( ret == TRUE, "MirrorRgn failed %u\n", ret ); - r.left = r.top = r.right = r.bottom = 0; - GetWindowRect( hwnd, &r ); - width = r.right - r.left; - r.left = r.top = r.right = r.bottom = 0; - ret = GetRgnBox( hrgn, &r ); - ok( ret == SIMPLEREGION, "GetRgnBox failed %u\n", ret ); - ok( r.left == width - 10 && r.top == 3 && r.right == width - 2 && r.bottom == 15, - "Wrong rectangle (%d,%d,%d,%d) for width %d\n", r.left, r.top, r.right, r.bottom, width ); - } - else win_skip( "MirrorRgn not supported\n" ); - } - DestroyWindow(hwnd); -} - -static void test_rtl_layout(void) -{ - HWND parent, child; - RECT r; - POINT pt; - - if (!pSetProcessDefaultLayout) - { - win_skip( "SetProcessDefaultLayout not supported\n" ); - return; - } - - parent = CreateWindowExA(WS_EX_LAYOUTRTL, "static", NULL, WS_POPUP, 100, 100, 300, 300, NULL, 0, 0, NULL); - child = CreateWindowExA(0, "static", NULL, WS_CHILD, 10, 10, 20, 20, parent, 0, 0, NULL); - - GetWindowRect( parent, &r ); - ok( r.left == 100 && r.right == 400, "wrong rect %d,%d - %d,%d\n", r.left, r.top, r.right, r.bottom ); - GetClientRect( parent, &r ); - ok( r.left == 0 && r.right == 300, "wrong rect %d,%d - %d,%d\n", r.left, r.top, r.right, r.bottom ); - GetClientRect( child, &r ); - ok( r.left == 0 && r.right == 20, "wrong rect %d,%d - %d,%d\n", r.left, r.top, r.right, r.bottom ); - MapWindowPoints( child, parent, (POINT *)&r, 2 ); - ok( r.left == 10 && r.right == 30, "wrong rect %d,%d - %d,%d\n", r.left, r.top, r.right, r.bottom ); - GetWindowRect( child, &r ); - ok( r.left == 370 && r.right == 390, "wrong rect %d,%d - %d,%d\n", r.left, r.top, r.right, r.bottom ); - MapWindowPoints( NULL, parent, (POINT *)&r, 2 ); - ok( r.left == 10 && r.right == 30, "wrong rect %d,%d - %d,%d\n", r.left, r.top, r.right, r.bottom ); - GetWindowRect( child, &r ); - MapWindowPoints( NULL, parent, (POINT *)&r, 1 ); - MapWindowPoints( NULL, parent, (POINT *)&r + 1, 1 ); - ok( r.left == 30 && r.right == 10, "wrong rect %d,%d - %d,%d\n", r.left, r.top, r.right, r.bottom ); - pt.x = pt.y = 12; - MapWindowPoints( child, parent, &pt, 1 ); - ok( pt.x == 22 && pt.y == 22, "wrong point %d,%d\n", pt.x, pt.y ); - SetWindowPos( parent, 0, 0, 0, 250, 250, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE ); - GetWindowRect( parent, &r ); - ok( r.left == 100 && r.right == 350, "wrong rect %d,%d - %d,%d\n", r.left, r.top, r.right, r.bottom ); - GetWindowRect( child, &r ); - ok( r.left == 320 && r.right == 340, "wrong rect %d,%d - %d,%d\n", r.left, r.top, r.right, r.bottom ); - SetWindowLongW( parent, GWL_EXSTYLE, 0 ); - GetWindowRect( child, &r ); - ok( r.left == 320 && r.right == 340, "wrong rect %d,%d - %d,%d\n", r.left, r.top, r.right, r.bottom ); - MapWindowPoints( NULL, parent, (POINT *)&r, 2 ); - ok( r.left == 220 && r.right == 240, "wrong rect %d,%d - %d,%d\n", r.left, r.top, r.right, r.bottom ); - SetWindowLongW( parent, GWL_EXSTYLE, WS_EX_LAYOUTRTL ); - GetWindowRect( child, &r ); - ok( r.left == 320 && r.right == 340, "wrong rect %d,%d - %d,%d\n", r.left, r.top, r.right, r.bottom ); - MapWindowPoints( NULL, parent, (POINT *)&r, 2 ); - ok( r.left == 10 && r.right == 30, "wrong rect %d,%d - %d,%d\n", r.left, r.top, r.right, r.bottom ); - SetWindowPos( child, 0, 0, 0, 30, 30, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE ); - GetWindowRect( child, &r ); - ok( r.left == 310 && r.right == 340, "wrong rect %d,%d - %d,%d\n", r.left, r.top, r.right, r.bottom ); - MapWindowPoints( NULL, parent, (POINT *)&r, 2 ); - ok( r.left == 10 && r.right == 40, "wrong rect %d,%d - %d,%d\n", r.left, r.top, r.right, r.bottom ); - DestroyWindow( child ); - DestroyWindow( parent ); -} - -static void test_FlashWindowEx(void) -{ - HWND hwnd; - FLASHWINFO finfo; - BOOL ret; - - if (!pFlashWindowEx) - { - win_skip( "FlashWindowEx not supported\n" ); - return; - } - - hwnd = CreateWindowExA( 0, "MainWindowClass", "FlashWindow", WS_POPUP, - 0, 0, 0, 0, 0, 0, 0, NULL ); - ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() ); - - finfo.cbSize = sizeof(FLASHWINFO); - finfo.dwFlags = FLASHW_TIMER; - finfo.uCount = 3; - finfo.dwTimeout = 200; - finfo.hwnd = NULL; - SetLastError(0xdeadbeef); - ret = pFlashWindowEx(&finfo); - todo_wine ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "FlashWindowEx returned with %d\n", GetLastError()); - - finfo.hwnd = hwnd; - SetLastError(0xdeadbeef); - ret = pFlashWindowEx(NULL); - todo_wine ok(!ret && GetLastError() == ERROR_NOACCESS, - "FlashWindowEx returned with %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = pFlashWindowEx(&finfo); - todo_wine ok(!ret, "FlashWindowEx succeeded\n"); - - finfo.cbSize = sizeof(FLASHWINFO) - 1; - SetLastError(0xdeadbeef); - ret = pFlashWindowEx(&finfo); - todo_wine ok(!ret && GetLastError()==ERROR_INVALID_PARAMETER, - "FlashWindowEx succeeded\n"); - - finfo.cbSize = sizeof(FLASHWINFO) + 1; - SetLastError(0xdeadbeef); - ret = pFlashWindowEx(&finfo); - todo_wine ok(!ret && GetLastError()==ERROR_INVALID_PARAMETER, - "FlashWindowEx succeeded\n"); - finfo.cbSize = sizeof(FLASHWINFO); - - DestroyWindow( hwnd ); - - SetLastError(0xdeadbeef); - ret = pFlashWindowEx(&finfo); - todo_wine ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "FlashWindowEx returned with %d\n", GetLastError()); - - ok(finfo.cbSize == sizeof(FLASHWINFO), "FlashWindowEx modified cdSize to %x\n", finfo.cbSize); - ok(finfo.hwnd == hwnd, "FlashWindowEx modified hwnd to %p\n", finfo.hwnd); - ok(finfo.dwFlags == FLASHW_TIMER, "FlashWindowEx modified dwFlags to %x\n", finfo.dwFlags); - ok(finfo.uCount == 3, "FlashWindowEx modified uCount to %x\n", finfo.uCount); - ok(finfo.dwTimeout == 200, "FlashWindowEx modified dwTimeout to %x\n", finfo.dwTimeout); - - hwnd = CreateWindowExA( 0, "MainWindowClass", "FlashWindow", WS_VISIBLE | WS_POPUPWINDOW, - 0, 0, 0, 0, 0, 0, 0, NULL ); - ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() ); - finfo.hwnd = hwnd; - - SetLastError(0xdeadbeef); - ret = pFlashWindowEx(NULL); - todo_wine ok(!ret && GetLastError() == ERROR_NOACCESS, - "FlashWindowEx returned with %d\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = pFlashWindowEx(&finfo); - todo_wine ok(!ret, "FlashWindowEx succeeded\n"); - - ok(finfo.cbSize == sizeof(FLASHWINFO), "FlashWindowEx modified cdSize to %x\n", finfo.cbSize); - ok(finfo.hwnd == hwnd, "FlashWindowEx modified hwnd to %p\n", finfo.hwnd); - ok(finfo.dwFlags == FLASHW_TIMER, "FlashWindowEx modified dwFlags to %x\n", finfo.dwFlags); - ok(finfo.uCount == 3, "FlashWindowEx modified uCount to %x\n", finfo.uCount); - ok(finfo.dwTimeout == 200, "FlashWindowEx modified dwTimeout to %x\n", finfo.dwTimeout); - - finfo.dwFlags = FLASHW_STOP; - SetLastError(0xdeadbeef); - ret = pFlashWindowEx(&finfo); - ok(ret, "FlashWindowEx failed with %d\n", GetLastError()); - - DestroyWindow( hwnd ); -} - -static void test_FindWindowEx(void) -{ - HWND hwnd, found; - CHAR title[1]; - - hwnd = CreateWindowExA( 0, "MainWindowClass", "caption", WS_POPUP, 0,0,0,0, 0, 0, 0, NULL ); - ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() ); - - title[0] = 0; - - found = FindWindowExA( 0, 0, "MainWindowClass", title ); - ok( found == NULL, "expected a NULL hwnd\n" ); - found = FindWindowExA( 0, 0, "MainWindowClass", NULL ); - ok( found == hwnd, "found is %p, expected a valid hwnd\n", found ); - - DestroyWindow( hwnd ); - - hwnd = CreateWindowExA( 0, "MainWindowClass", NULL, WS_POPUP, 0,0,0,0, 0, 0, 0, NULL ); - ok( hwnd != 0, "CreateWindowExA error %d\n", GetLastError() ); - - found = FindWindowExA( 0, 0, "MainWindowClass", title ); - ok( found == hwnd, "found is %p, expected a valid hwnd\n", found ); - found = FindWindowExA( 0, 0, "MainWindowClass", NULL ); - ok( found == hwnd, "found is %p, expected a valid hwnd\n", found ); - - DestroyWindow( hwnd ); - - /* test behaviour with a window title that is an empty character */ - found = FindWindowExA( 0, 0, "Shell_TrayWnd", title ); - ok( found != NULL, "found is NULL, expected a valid hwnd\n" ); - found = FindWindowExA( 0, 0, "Shell_TrayWnd", NULL ); - ok( found != NULL, "found is NULL, expected a valid hwnd\n" ); -} - -static void test_GetLastActivePopup(void) -{ - HWND hwndOwner, hwndPopup1, hwndPopup2; - - hwndOwner = CreateWindowExA(0, "MainWindowClass", NULL, - WS_VISIBLE | WS_POPUPWINDOW, - 100, 100, 200, 200, - NULL, 0, GetModuleHandle(0), NULL); - hwndPopup1 = CreateWindowExA(0, "MainWindowClass", NULL, - WS_VISIBLE | WS_POPUPWINDOW, - 100, 100, 200, 200, - hwndOwner, 0, GetModuleHandle(0), NULL); - hwndPopup2 = CreateWindowExA(0, "MainWindowClass", NULL, - WS_VISIBLE | WS_POPUPWINDOW, - 100, 100, 200, 200, - hwndPopup1, 0, GetModuleHandle(0), NULL); - ok( GetLastActivePopup(hwndOwner) == hwndPopup2, "wrong last active popup\n" ); - DestroyWindow( hwndPopup2 ); - DestroyWindow( hwndPopup1 ); - DestroyWindow( hwndOwner ); -} - -START_TEST(win) -{ - HMODULE user32 = GetModuleHandleA( "user32.dll" ); - HMODULE gdi32 = GetModuleHandleA("gdi32.dll"); - pGetAncestor = (void *)GetProcAddress( user32, "GetAncestor" ); - pGetWindowInfo = (void *)GetProcAddress( user32, "GetWindowInfo" ); - pGetWindowModuleFileNameA = (void *)GetProcAddress( user32, "GetWindowModuleFileNameA" ); - pGetLayeredWindowAttributes = (void *)GetProcAddress( user32, "GetLayeredWindowAttributes" ); - pSetLayeredWindowAttributes = (void *)GetProcAddress( user32, "SetLayeredWindowAttributes" ); - pUpdateLayeredWindow = (void *)GetProcAddress( user32, "UpdateLayeredWindow" ); - pGetMonitorInfoA = (void *)GetProcAddress( user32, "GetMonitorInfoA" ); - pMonitorFromPoint = (void *)GetProcAddress( user32, "MonitorFromPoint" ); - pGetWindowRgnBox = (void *)GetProcAddress( user32, "GetWindowRgnBox" ); - pGetGUIThreadInfo = (void *)GetProcAddress( user32, "GetGUIThreadInfo" ); - pGetProcessDefaultLayout = (void *)GetProcAddress( user32, "GetProcessDefaultLayout" ); - pSetProcessDefaultLayout = (void *)GetProcAddress( user32, "SetProcessDefaultLayout" ); - pFlashWindowEx = (void *)GetProcAddress( user32, "FlashWindowEx" ); - pGetLayout = (void *)GetProcAddress( gdi32, "GetLayout" ); - pSetLayout = (void *)GetProcAddress( gdi32, "SetLayout" ); - pMirrorRgn = (void *)GetProcAddress( gdi32, "MirrorRgn" ); - - if (!RegisterWindowClasses()) assert(0); - - SetLastError(0xdeafbeef); - GetWindowLongPtrW(GetDesktopWindow(), GWLP_WNDPROC); - is_win9x = (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED); - - hhook = SetWindowsHookExA(WH_CBT, cbt_hook_proc, 0, GetCurrentThreadId()); - if (!hhook) win_skip( "Cannot set CBT hook, skipping some tests\n" ); - - /* make sure that these tests are executed first */ - test_FindWindowEx(); - test_SetParent(); - - hwndMain = CreateWindowExA(/*WS_EX_TOOLWINDOW*/ 0, "MainWindowClass", "Main window", - WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | - WS_MAXIMIZEBOX | WS_POPUP, - 100, 100, 200, 200, - 0, 0, GetModuleHandle(0), NULL); - hwndMain2 = CreateWindowExA(/*WS_EX_TOOLWINDOW*/ 0, "MainWindowClass", "Main window 2", - WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | - WS_MAXIMIZEBOX | WS_POPUP, - 100, 100, 200, 200, - 0, 0, GetModuleHandle(0), NULL); - assert( hwndMain ); - assert( hwndMain2 ); - - our_pid = GetWindowThreadProcessId(hwndMain, NULL); - - /* Add the tests below this line */ - test_thick_child_size(hwndMain); - test_fullscreen(); - test_hwnd_message(); - test_nonclient_area(hwndMain); - test_params(); - test_GetWindowModuleFileName(); - test_capture_1(); - test_capture_2(); - test_capture_3(hwndMain, hwndMain2); - test_capture_4(); - test_rtl_layout(); - test_FlashWindowEx(); - - test_CreateWindow(); - test_parent_owner(); - test_enum_thread_windows(); - - test_mdi(); - test_icons(); - test_SetWindowPos(hwndMain, hwndMain2); - test_SetMenu(hwndMain); - test_SetFocus(hwndMain); - test_SetActiveWindow(hwndMain); - test_NCRedraw(); - - test_children_zorder(hwndMain); - test_popup_zorder(hwndMain2, hwndMain, WS_POPUP); - test_popup_zorder(hwndMain2, hwndMain, 0); - test_GetLastActivePopup(); - test_keyboard_input(hwndMain); - test_mouse_input(hwndMain); - test_validatergn(hwndMain); - test_nccalcscroll( hwndMain); - test_scrollwindow( hwndMain); - test_scrollvalidate( hwndMain); - test_scrolldc( hwndMain); - test_scroll(); - test_IsWindowUnicode(); - test_vis_rgn(hwndMain); - - test_AdjustWindowRect(); - test_window_styles(); - test_redrawnow(); - test_csparentdc(); - test_SetWindowLong(); - test_ShowWindow(); - if (0) test_gettext(); /* crashes on NT4 */ - test_GetUpdateRect(); - test_Expose(); - test_layered_window(); - - if(!winetest_interactive) - skip("skipping test_SetForegroundWindow, Hangs on WaitForSingleObject line 2771\n"); - else - test_SetForegroundWindow(hwndMain); - if(!winetest_interactive) - skip("bug 5957: skipping test_shell_window, it crashes ros/win7 explorer\n"); - else - test_shell_window(); - test_handles( hwndMain ); - test_winregion(); - - /* add the tests above this line */ - if (hhook) UnhookWindowsHookEx(hhook); - - DestroyWindow(hwndMain2); - DestroyWindow(hwndMain); -} diff --git a/rostests/winetests/user32/winstation.c b/rostests/winetests/user32/winstation.c deleted file mode 100755 index 30eeff14ead..00000000000 --- a/rostests/winetests/user32/winstation.c +++ /dev/null @@ -1,389 +0,0 @@ -/* - * Unit tests for window stations and desktops - * - * Copyright 2002 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 - */ - -#include "wine/test.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winnls.h" - -#define DESKTOP_ALL_ACCESS 0x01ff - -static void print_object( HANDLE obj ) -{ - char buffer[100]; - DWORD size; - - strcpy( buffer, "foobar" ); - if (!GetUserObjectInformationA( obj, UOI_NAME, buffer, sizeof(buffer), &size )) - trace( "could not get info for %p\n", obj ); - else - trace( "obj %p name '%s'\n", obj, buffer ); - strcpy( buffer, "foobar" ); - if (!GetUserObjectInformationA( obj, UOI_TYPE, buffer, sizeof(buffer), &size )) - trace( "could not get type for %p\n", obj ); - else - trace( "obj %p type '%s'\n", obj, buffer ); -} - -static void register_class(void) -{ - WNDCLASSA cls; - - cls.style = CS_DBLCLKS; - cls.lpfnWndProc = DefWindowProcA; - cls.cbClsExtra = 0; - cls.cbWndExtra = 0; - cls.hInstance = GetModuleHandleA(0); - cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, IDC_ARROW); - cls.hbrBackground = GetStockObject(WHITE_BRUSH); - cls.lpszMenuName = NULL; - cls.lpszClassName = "WinStationClass"; - RegisterClassA(&cls); -} - -static HDESK initial_desktop; - -static DWORD CALLBACK thread( LPVOID arg ) -{ - HDESK d1, d2; - HWND hwnd = CreateWindowExA(0,"WinStationClass","test",WS_POPUP,0,0,100,100,GetDesktopWindow(),0,0,0); - ok( hwnd != 0, "CreateWindow failed\n" ); - d1 = GetThreadDesktop(GetCurrentThreadId()); - trace( "thread %p desktop: %p\n", arg, d1 ); - ok( d1 == initial_desktop, "thread %p doesn't use initial desktop\n", arg ); - - SetLastError( 0xdeadbeef ); - ok( !CloseHandle( d1 ), "CloseHandle succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %d\n", GetLastError() ); - SetLastError( 0xdeadbeef ); - ok( !CloseDesktop( d1 ), "CloseDesktop succeeded\n" ); - ok( GetLastError() == ERROR_BUSY || broken(GetLastError() == 0xdeadbeef), /* wow64 */ - "bad last error %d\n", GetLastError() ); - print_object( d1 ); - d2 = CreateDesktop( "foobar2", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL ); - trace( "created desktop %p\n", d2 ); - ok( d2 != 0, "CreateDesktop failed\n" ); - - SetLastError( 0xdeadbeef ); - ok( !SetThreadDesktop( d2 ), "set thread desktop succeeded with existing window\n" ); - ok( GetLastError() == ERROR_BUSY || broken(GetLastError() == 0xdeadbeef), /* wow64 */ - "bad last error %d\n", GetLastError() ); - - DestroyWindow( hwnd ); - ok( SetThreadDesktop( d2 ), "set thread desktop failed\n" ); - d1 = GetThreadDesktop(GetCurrentThreadId()); - ok( d1 == d2, "GetThreadDesktop did not return set desktop %p/%p\n", d1, d2 ); - print_object( d2 ); - if (arg < (LPVOID)5) - { - HANDLE hthread = CreateThread( NULL, 0, thread, (char *)arg + 1, 0, NULL ); - Sleep(1000); - WaitForSingleObject( hthread, INFINITE ); - CloseHandle( hthread ); - } - return 0; -} - -static void test_handles(void) -{ - HWINSTA w1, w2, w3; - HDESK d1, d2, d3; - HANDLE hthread; - DWORD id, flags, le; - ATOM atom; - char buffer[20]; - - /* win stations */ - - w1 = GetProcessWindowStation(); - ok( GetProcessWindowStation() == w1, "GetProcessWindowStation returned different handles\n" ); - ok( !CloseWindowStation(w1), "closing process win station succeeded\n" ); - SetLastError( 0xdeadbeef ); - ok( !CloseHandle(w1), "closing process win station handle succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %d\n", GetLastError() ); - print_object( w1 ); - - flags = 0; - ok( GetHandleInformation( w1, &flags ), "GetHandleInformation failed\n" ); - ok( !(flags & HANDLE_FLAG_PROTECT_FROM_CLOSE) || - broken(flags & HANDLE_FLAG_PROTECT_FROM_CLOSE), /* set on nt4 */ - "handle %p PROTECT_FROM_CLOSE set\n", w1 ); - - ok( DuplicateHandle( GetCurrentProcess(), w1, GetCurrentProcess(), (PHANDLE)&w2, 0, - TRUE, DUPLICATE_SAME_ACCESS ), "DuplicateHandle failed\n" ); - ok( CloseWindowStation(w2), "closing dup win station failed\n" ); - - ok( DuplicateHandle( GetCurrentProcess(), w1, GetCurrentProcess(), (PHANDLE)&w2, 0, - TRUE, DUPLICATE_SAME_ACCESS ), "DuplicateHandle failed\n" ); - ok( CloseHandle(w2), "closing dup win station handle failed\n" ); - - w2 = CreateWindowStation("WinSta0", 0, WINSTA_ALL_ACCESS, NULL ); - le = GetLastError(); - ok( w2 != 0 || le == ERROR_ACCESS_DENIED, "CreateWindowStation failed (%u)\n", le ); - if (w2 != 0) - { - ok( w2 != w1, "CreateWindowStation returned default handle\n" ); - SetLastError( 0xdeadbeef ); - ok( !CloseDesktop( (HDESK)w2 ), "CloseDesktop succeeded on win station\n" ); - ok( GetLastError() == ERROR_INVALID_HANDLE || broken(GetLastError() == 0xdeadbeef), /* wow64 */ - "bad last error %d\n", GetLastError() ); - ok( CloseWindowStation( w2 ), "CloseWindowStation failed\n" ); - - w2 = CreateWindowStation("WinSta0", 0, WINSTA_ALL_ACCESS, NULL ); - ok( CloseHandle( w2 ), "CloseHandle failed\n" ); - } - else if (le == ERROR_ACCESS_DENIED) - win_skip( "Not enough privileges for CreateWindowStation\n" ); - - w2 = OpenWindowStation("winsta0", TRUE, WINSTA_ALL_ACCESS ); - ok( w2 != 0, "OpenWindowStation failed\n" ); - ok( w2 != w1, "OpenWindowStation returned default handle\n" ); - ok( CloseWindowStation( w2 ), "CloseWindowStation failed\n" ); - - w2 = OpenWindowStation("dummy name", TRUE, WINSTA_ALL_ACCESS ); - ok( !w2, "open dummy win station succeeded\n" ); - - CreateMutexA( NULL, 0, "foobar" ); - w2 = CreateWindowStation("foobar", 0, WINSTA_ALL_ACCESS, NULL ); - le = GetLastError(); - ok( w2 != 0 || le == ERROR_ACCESS_DENIED, "create foobar station failed (%u)\n", le ); - - if (w2 != 0) - { - w3 = OpenWindowStation("foobar", TRUE, WINSTA_ALL_ACCESS ); - ok( w3 != 0, "open foobar station failed\n" ); - ok( w3 != w2, "open foobar station returned same handle\n" ); - ok( CloseWindowStation( w2 ), "CloseWindowStation failed\n" ); - ok( CloseWindowStation( w3 ), "CloseWindowStation failed\n" ); - - w3 = OpenWindowStation("foobar", TRUE, WINSTA_ALL_ACCESS ); - ok( !w3, "open foobar station succeeded\n" ); - - w2 = CreateWindowStation("foobar1", 0, WINSTA_ALL_ACCESS, NULL ); - ok( w2 != 0, "create foobar station failed\n" ); - w3 = CreateWindowStation("foobar2", 0, WINSTA_ALL_ACCESS, NULL ); - ok( w3 != 0, "create foobar station failed\n" ); - ok( GetHandleInformation( w2, &flags ), "GetHandleInformation failed\n" ); - ok( GetHandleInformation( w3, &flags ), "GetHandleInformation failed\n" ); - - SetProcessWindowStation( w2 ); - atom = GlobalAddAtomA("foo"); - ok( GlobalGetAtomNameA( atom, buffer, sizeof(buffer) ) == 3, "GlobalGetAtomName failed\n" ); - ok( !lstrcmpiA( buffer, "foo" ), "bad atom value %s\n", buffer ); - - ok( !CloseWindowStation( w2 ), "CloseWindowStation succeeded\n" ); - ok( GetHandleInformation( w2, &flags ), "GetHandleInformation failed\n" ); - - SetProcessWindowStation( w3 ); - ok( GetHandleInformation( w2, &flags ), "GetHandleInformation failed\n" ); - ok( CloseWindowStation( w2 ), "CloseWindowStation failed\n" ); - ok( GlobalGetAtomNameA( atom, buffer, sizeof(buffer) ) == 3, "GlobalGetAtomName failed\n" ); - ok( !lstrcmpiA( buffer, "foo" ), "bad atom value %s\n", buffer ); - } - else if (le == ERROR_ACCESS_DENIED) - win_skip( "Not enough privileges for CreateWindowStation\n" ); - - /* desktops */ - d1 = GetThreadDesktop(GetCurrentThreadId()); - initial_desktop = d1; - ok( GetThreadDesktop(GetCurrentThreadId()) == d1, - "GetThreadDesktop returned different handles\n" ); - - flags = 0; - ok( GetHandleInformation( d1, &flags ), "GetHandleInformation failed\n" ); - ok( !(flags & HANDLE_FLAG_PROTECT_FROM_CLOSE), "handle %p PROTECT_FROM_CLOSE set\n", d1 ); - - SetLastError( 0xdeadbeef ); - ok( !CloseDesktop(d1), "closing thread desktop succeeded\n" ); - ok( GetLastError() == ERROR_BUSY || broken(GetLastError() == 0xdeadbeef), /* wow64 */ - "bad last error %d\n", GetLastError() ); - - SetLastError( 0xdeadbeef ); - if (CloseHandle( d1 )) /* succeeds on nt4 */ - { - win_skip( "NT4 desktop handle management is completely different\n" ); - return; - } - ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %d\n", GetLastError() ); - - ok( DuplicateHandle( GetCurrentProcess(), d1, GetCurrentProcess(), (PHANDLE)&d2, 0, - TRUE, DUPLICATE_SAME_ACCESS ), "DuplicateHandle failed\n" ); - ok( CloseDesktop(d2), "closing dup desktop failed\n" ); - - ok( DuplicateHandle( GetCurrentProcess(), d1, GetCurrentProcess(), (PHANDLE)&d2, 0, - TRUE, DUPLICATE_SAME_ACCESS ), "DuplicateHandle failed\n" ); - ok( CloseHandle(d2), "closing dup desktop handle failed\n" ); - - d2 = OpenDesktop( "dummy name", 0, TRUE, DESKTOP_ALL_ACCESS ); - ok( !d2, "open dummy desktop succeeded\n" ); - - d2 = CreateDesktop( "foobar", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL ); - ok( d2 != 0, "create foobar desktop failed\n" ); - SetLastError( 0xdeadbeef ); - ok( !CloseWindowStation( (HWINSTA)d2 ), "CloseWindowStation succeeded on desktop\n" ); - ok( GetLastError() == ERROR_INVALID_HANDLE || broken(GetLastError() == 0xdeadbeef), /* wow64 */ - "bad last error %d\n", GetLastError() ); - - SetLastError( 0xdeadbeef ); - d3 = CreateDesktop( "foobar", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL ); - ok( d3 != 0, "create foobar desktop again failed\n" ); - ok( GetLastError() == 0xdeadbeef, "bad last error %d\n", GetLastError() ); - ok( CloseDesktop( d3 ), "CloseDesktop failed\n" ); - - d3 = OpenDesktop( "foobar", 0, TRUE, DESKTOP_ALL_ACCESS ); - ok( d3 != 0, "open foobar desktop failed\n" ); - ok( d3 != d2, "open foobar desktop returned same handle\n" ); - ok( CloseDesktop( d2 ), "CloseDesktop failed\n" ); - ok( CloseDesktop( d3 ), "CloseDesktop failed\n" ); - - d3 = OpenDesktop( "foobar", 0, TRUE, DESKTOP_ALL_ACCESS ); - ok( !d3, "open foobar desktop succeeded\n" ); - - ok( !CloseHandle(d1), "closing thread desktop handle succeeded\n" ); - d2 = GetThreadDesktop(GetCurrentThreadId()); - ok( d1 == d2, "got different handles after close\n" ); - - register_class(); - trace( "thread 1 desktop: %p\n", d1 ); - print_object( d1 ); - hthread = CreateThread( NULL, 0, thread, (LPVOID)2, 0, &id ); - Sleep(1000); - trace( "get other thread desktop: %p\n", GetThreadDesktop(id) ); - WaitForSingleObject( hthread, INFINITE ); - CloseHandle( hthread ); -} - -/* Enumeration tests */ - -static BOOL CALLBACK window_station_callbackA(LPSTR winsta, LPARAM lp) -{ - trace("window_station_callbackA called with argument %s\n", winsta); - return lp; -} - -static BOOL CALLBACK open_window_station_callbackA(LPSTR winsta, LPARAM lp) -{ - HWINSTA hwinsta; - - trace("open_window_station_callbackA called with argument %s\n", winsta); - hwinsta = OpenWindowStationA(winsta, FALSE, WINSTA_ENUMERATE); - ok(hwinsta != NULL, "Could not open desktop %s!\n", winsta); - if (hwinsta) - CloseWindowStation(hwinsta); - return lp; -} - -static void test_enumstations(void) -{ - BOOL ret; - - if (0) /* Crashes instead */ - { - SetLastError(0xbabefeed); - ret = EnumWindowStationsA(NULL, 0); - ok(!ret, "EnumWindowStationsA returned successfully!\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "LastError is set to %08x\n", GetLastError()); - } - - SetLastError(0xdeadbeef); - ret = EnumWindowStationsA(open_window_station_callbackA, 0x12345); - ok(ret == 0x12345, "EnumWindowStationsA returned %x\n", ret); - ok(GetLastError() == 0xdeadbeef, "LastError is set to %08x\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = EnumWindowStationsA(window_station_callbackA, 0); - ok(!ret, "EnumWindowStationsA returned %x\n", ret); - ok(GetLastError() == 0xdeadbeef, "LastError is set to %08x\n", GetLastError()); -} - -static BOOL CALLBACK desktop_callbackA(LPSTR desktop, LPARAM lp) -{ - trace("desktop_callbackA called with argument %s\n", desktop); - return lp; -} - -static BOOL CALLBACK open_desktop_callbackA(LPSTR desktop, LPARAM lp) -{ - HDESK hdesk; - static int once; - - trace("open_desktop_callbackA called with argument %s\n", desktop); - /* Only try to open one desktop */ - if (once++) - return lp; - - hdesk = OpenDesktopA(desktop, 0, FALSE, DESKTOP_ENUMERATE); - ok(hdesk != NULL, "Could not open desktop %s!\n", desktop); - if (hdesk) - CloseDesktop(hdesk); - return lp; -} - -static void test_enumdesktops(void) -{ - BOOL ret; - - if (0) /* Crashes instead */ - { - SetLastError(0xbabefeed); - ret = EnumDesktopsA(GetProcessWindowStation(), NULL, 0); - ok(!ret, "EnumDesktopsA returned successfully!\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "LastError is set to %08x\n", GetLastError()); - } - - SetLastError(0xdeadbeef); - ret = EnumDesktopsA(NULL, desktop_callbackA, 0x12345); - ok(ret == 0x12345, "EnumDesktopsA returned %x\n", ret); - ok(GetLastError() == 0xdeadbeef, "LastError is set to %08x\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = EnumDesktopsA(GetProcessWindowStation(), open_desktop_callbackA, 0x12345); - ok(ret == 0x12345, "EnumDesktopsA returned %x\n", ret); - ok(GetLastError() == 0xdeadbeef, "LastError is set to %08x\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = EnumDesktopsA(INVALID_HANDLE_VALUE, desktop_callbackA, 0x12345); - ok(!ret, "EnumDesktopsA returned %x\n", ret); - ok(GetLastError() == ERROR_INVALID_HANDLE, "LastError is set to %08x\n", GetLastError()); - - SetLastError(0xdeadbeef); - ret = EnumDesktopsA(GetProcessWindowStation(), desktop_callbackA, 0); - ok(!ret, "EnumDesktopsA returned %x\n", ret); - ok(GetLastError() == 0xdeadbeef, "LastError is set to %08x\n", GetLastError()); -} - -START_TEST(winstation) -{ - /* Check whether this platform supports WindowStation calls */ - - SetLastError( 0xdeadbeef ); - GetProcessWindowStation(); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - skip("WindowStation calls not supported on this platform\n"); - return; - } - - test_enumstations(); - test_enumdesktops(); - test_handles(); -} diff --git a/rostests/winetests/user32/wsprintf.c b/rostests/winetests/user32/wsprintf.c deleted file mode 100755 index 5370df4636a..00000000000 --- a/rostests/winetests/user32/wsprintf.c +++ /dev/null @@ -1,157 +0,0 @@ - /* Unit test suite for the wsprintf functions - * - * Copyright 2002 Bill Medland - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -#include "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "winnls.h" - -static const struct -{ - const char *fmt; - ULONGLONG value; - const char *res; -} i64_formats[] = -{ - { "%I64X", ((ULONGLONG)0x12345 << 32) | 0x67890a, "123450067890A" }, - { "%I32X", ((ULONGLONG)0x12345 << 32) | 0x67890a, "67890A" }, - { "%I64d", (ULONGLONG)543210 * 1000000, "543210000000" }, - { "%I64X", (LONGLONG)-0x12345, "FFFFFFFFFFFEDCBB" }, - { "%I32x", (LONGLONG)-0x12345, "fffedcbb" }, - { "%I64u", (LONGLONG)-123, "18446744073709551493" }, - { "%Id", (LONGLONG)-12345, "-12345" }, -#ifdef _WIN64 - { "%Ix", ((ULONGLONG)0x12345 << 32) | 0x67890a, "123450067890a" }, - { "%Ix", (LONGLONG)-0x12345, "fffffffffffedcbb" }, - { "%p", (LONGLONG)-0x12345, "FFFFFFFFFFFEDCBB" }, -#else - { "%Ix", ((ULONGLONG)0x12345 << 32) | 0x67890a, "67890a" }, - { "%Ix", (LONGLONG)-0x12345, "fffedcbb" }, - { "%p", (LONGLONG)-0x12345, "FFFEDCBB" }, -#endif -}; - -static void wsprintfATest(void) -{ - char buf[25]; - unsigned int i; - int rc; - - rc=wsprintfA(buf, "%010ld", -1); - ok(rc == 10, "wsprintfA length failure: rc=%d error=%d\n",rc,GetLastError()); - ok((lstrcmpA(buf, "-000000001") == 0), - "wsprintfA zero padded negative value failure: buf=[%s]\n",buf); - rc = wsprintfA(buf, "%I64X", (ULONGLONG)0); - if (rc == 4 && !lstrcmpA(buf, "I64X")) - { - win_skip( "I64 formats not supported\n" ); - return; - } - for (i = 0; i < sizeof(i64_formats)/sizeof(i64_formats[0]); i++) - { - rc = wsprintfA(buf, i64_formats[i].fmt, i64_formats[i].value); - ok(rc == strlen(i64_formats[i].res), "%u: wsprintfA length failure: rc=%d\n", i, rc); - ok(!strcmp(buf, i64_formats[i].res), "%u: wrong result [%s]\n", i, buf); - } -} - -static void wsprintfWTest(void) -{ - static const WCHAR fmt_010ld[] = {'%','0','1','0','l','d','\0'}; - static const WCHAR res_010ld[] = {'-','0','0','0','0','0','0','0','0','1', '\0'}; - static const WCHAR fmt_I64x[] = {'%','I','6','4','x',0}; - WCHAR buf[25], fmt[25], res[25]; - unsigned int i; - int rc; - - rc=wsprintfW(buf, fmt_010ld, -1); - if (rc==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("wsprintfW is not implemented\n"); - return; - } - ok(rc == 10, "wsPrintfW length failure: rc=%d error=%d\n",rc,GetLastError()); - ok((lstrcmpW(buf, res_010ld) == 0), - "wsprintfW zero padded negative value failure\n"); - rc = wsprintfW(buf, fmt_I64x, (ULONGLONG)0 ); - if (rc == 4 && !lstrcmpW(buf, fmt_I64x + 1)) - { - win_skip( "I64 formats not supported\n" ); - return; - } - for (i = 0; i < sizeof(i64_formats)/sizeof(i64_formats[0]); i++) - { - MultiByteToWideChar( CP_ACP, 0, i64_formats[i].fmt, -1, fmt, sizeof(fmt)/sizeof(WCHAR) ); - MultiByteToWideChar( CP_ACP, 0, i64_formats[i].res, -1, res, sizeof(res)/sizeof(WCHAR) ); - rc = wsprintfW(buf, fmt, i64_formats[i].value); - ok(rc == lstrlenW(res), "%u: wsprintfW length failure: rc=%d\n", i, rc); - ok(!lstrcmpW(buf, res), "%u: wrong result [%s]\n", i, wine_dbgstr_w(buf)); - } -} - -/* Test if the CharUpper / CharLower functions return true 16 bit results, - if the input is a 16 bit input value. */ - -static void CharUpperTest(void) -{ - INT_PTR i,out,failed; - - failed = 0; - for (i=0;i<256;i++) - { - out = (INT_PTR)CharUpper((LPTSTR)i); - /* printf("%0x ",out); */ - if ((out >> 16) != 0) - { - failed = 1; - break; - } - } - ok(!failed,"CharUpper failed - 16bit input (0x%0lx) returned 32bit result (0x%0lx)\n",i,out); -} - -static void CharLowerTest(void) -{ - INT_PTR i,out,failed; - - failed = 0; - for (i=0;i<256;i++) - { - out = (INT_PTR)CharLower((LPTSTR)i); - /* printf("%0x ",out); */ - if ((out >> 16) != 0) - { - failed = 1; - break; - } - } - ok(!failed,"CharLower failed - 16bit input (0x%0lx) returned 32bit result (0x%0lx)\n",i,out); -} - - -START_TEST(wsprintf) -{ - wsprintfATest(); - wsprintfWTest(); - CharUpperTest(); - CharLowerTest(); -} diff --git a/rostests/winetests/userenv/CMakeLists.txt b/rostests/winetests/userenv/CMakeLists.txt deleted file mode 100644 index 48a9354186a..00000000000 --- a/rostests/winetests/userenv/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(userenv_winetest userenv.c testlist.c) -target_link_libraries(userenv_winetest wine) -set_module_type(userenv_winetest win32cui) -add_importlibs(userenv_winetest userenv advapi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET userenv_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/userenv/testlist.c b/rostests/winetests/userenv/testlist.c deleted file mode 100644 index 1c6517a0eff..00000000000 --- a/rostests/winetests/userenv/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_userenv(void); - -const struct test winetest_testlist[] = -{ - { "userenv", func_userenv }, - { 0, 0 } -}; diff --git a/rostests/winetests/userenv/userenv.c b/rostests/winetests/userenv/userenv.c deleted file mode 100644 index c61958f143d..00000000000 --- a/rostests/winetests/userenv/userenv.c +++ /dev/null @@ -1,211 +0,0 @@ -/* - * Unit test suite for userenv functions - * - * Copyright 2008 Google (Lei Zhang) - * - * 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 "windef.h" -#include "winbase.h" -#include "winnls.h" - -#include "userenv.h" - -#include "wine/test.h" - -#define expect(EXPECTED,GOT) ok((GOT)==(EXPECTED), "Expected %d, got %d\n", (EXPECTED), (GOT)) -#define expect_env(EXPECTED,GOT,VAR) ok((GOT)==(EXPECTED), "Expected %d, got %d for %s (%d)\n", (EXPECTED), (GOT), (VAR), j) - -struct profile_item -{ - const char * name; - const int todo[4]; -}; - -/* Helper function for retrieving environment variables */ -static BOOL get_env(const WCHAR * env, const char * var, char ** result) -{ - const WCHAR * p = env; - int envlen, varlen, buflen; - char buf[256]; - - if (!env || !var || !result) return FALSE; - - varlen = strlen(var); - do - { - if (!WideCharToMultiByte( CP_ACP, 0, p, -1, buf, sizeof(buf), NULL, NULL )) buf[sizeof(buf)-1] = 0; - envlen = strlen(buf); - if (CompareStringA(GetThreadLocale(), NORM_IGNORECASE|LOCALE_USE_CP_ACP, buf, min(envlen, varlen), var, varlen) == CSTR_EQUAL) - { - if (buf[varlen] == '=') - { - buflen = strlen(buf); - *result = HeapAlloc(GetProcessHeap(), 0, buflen + 1); - if (!*result) return FALSE; - memcpy(*result, buf, buflen + 1); - return TRUE; - } - } - while (*p) p++; - p++; - } while (*p); - return FALSE; -} - -static void test_create_env(void) -{ - BOOL r; - HANDLE htok; - WCHAR * env[4]; - char * st; - int i, j; - - static const struct profile_item common_vars[] = { - { "ComSpec", { 1, 1, 0, 0 } }, - { "COMPUTERNAME", { 1, 1, 1, 1 } }, - { "NUMBER_OF_PROCESSORS", { 1, 1, 0, 0 } }, - { "OS", { 1, 1, 0, 0 } }, - { "PROCESSOR_ARCHITECTURE", { 1, 1, 0, 0 } }, - { "PROCESSOR_IDENTIFIER", { 1, 1, 0, 0 } }, - { "PROCESSOR_LEVEL", { 1, 1, 0, 0 } }, - { "PROCESSOR_REVISION", { 1, 1, 0, 0 } }, - { "SystemDrive", { 1, 1, 0, 0 } }, - { "SystemRoot", { 1, 1, 0, 0 } }, - { "windir", { 1, 1, 0, 0 } } - }; - static const struct profile_item common_post_nt4_vars[] = { - { "ALLUSERSPROFILE", { 1, 1, 0, 0 } }, - { "TEMP", { 1, 1, 0, 0 } }, - { "TMP", { 1, 1, 0, 0 } }, - { "CommonProgramFiles", { 1, 1, 0, 0 } }, - { "ProgramFiles", { 1, 1, 0, 0 } } - }; - static const struct profile_item htok_vars[] = { - { "PATH", { 1, 1, 0, 0 } }, - { "USERPROFILE", { 1, 1, 0, 0 } } - }; - - r = SetEnvironmentVariableA("WINE_XYZZY", "ZZYZX"); - expect(TRUE, r); - - if (0) - { - /* Crashes on NT4 */ - r = CreateEnvironmentBlock(NULL, NULL, FALSE); - expect(FALSE, r); - } - - r = OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY|TOKEN_DUPLICATE, &htok); - expect(TRUE, r); - - if (0) - { - /* Crashes on NT4 */ - r = CreateEnvironmentBlock(NULL, htok, FALSE); - expect(FALSE, r); - } - - r = CreateEnvironmentBlock((LPVOID) &env[0], NULL, FALSE); - expect(TRUE, r); - - r = CreateEnvironmentBlock((LPVOID) &env[1], htok, FALSE); - expect(TRUE, r); - - r = CreateEnvironmentBlock((LPVOID) &env[2], NULL, TRUE); - expect(TRUE, r); - - r = CreateEnvironmentBlock((LPVOID) &env[3], htok, TRUE); - expect(TRUE, r); - - /* Test for common environment variables (NT4 and higher) */ - for (i = 0; i < sizeof(common_vars)/sizeof(common_vars[0]); i++) - { - for (j = 0; j < 4; j++) - { - r = get_env(env[j], common_vars[i].name, &st); - if (common_vars[i].todo[j]) - todo_wine expect_env(TRUE, r, common_vars[i].name); - else - expect_env(TRUE, r, common_vars[i].name); - if (r) HeapFree(GetProcessHeap(), 0, st); - } - } - - /* Test for common environment variables (post NT4) */ - if (!GetEnvironmentVariableA("ALLUSERSPROFILE", NULL, 0)) - { - win_skip("Some environment variables are not present on NT4\n"); - } - else - { - for (i = 0; i < sizeof(common_post_nt4_vars)/sizeof(common_post_nt4_vars[0]); i++) - { - for (j = 0; j < 4; j++) - { - r = get_env(env[j], common_post_nt4_vars[i].name, &st); - if (common_post_nt4_vars[i].todo[j]) - todo_wine expect_env(TRUE, r, common_post_nt4_vars[i].name); - else - expect_env(TRUE, r, common_post_nt4_vars[i].name); - if (r) HeapFree(GetProcessHeap(), 0, st); - } - } - } - - /* Test for environment variables with values that depends on htok */ - for (i = 0; i < sizeof(htok_vars)/sizeof(htok_vars[0]); i++) - { - for (j = 0; j < 4; j++) - { - r = get_env(env[j], htok_vars[i].name, &st); - if (htok_vars[i].todo[j]) - todo_wine expect_env(TRUE, r, htok_vars[i].name); - else - expect_env(TRUE, r, htok_vars[i].name); - if (r) HeapFree(GetProcessHeap(), 0, st); - } - } - - r = get_env(env[0], "WINE_XYZZY", &st); - expect(FALSE, r); - - r = get_env(env[1], "WINE_XYZZY", &st); - expect(FALSE, r); - - r = get_env(env[2], "WINE_XYZZY", &st); - expect(TRUE, r); - if (r) HeapFree(GetProcessHeap(), 0, st); - - r = get_env(env[3], "WINE_XYZZY", &st); - expect(TRUE, r); - if (r) HeapFree(GetProcessHeap(), 0, st); - - for (i = 0; i < sizeof(env) / sizeof(env[0]); i++) - { - r = DestroyEnvironmentBlock(env[i]); - expect(TRUE, r); - } -} - -START_TEST(userenv) -{ - test_create_env(); -} diff --git a/rostests/winetests/userenv/userenv.rbuild b/rostests/winetests/userenv/userenv.rbuild deleted file mode 100644 index 1b14029ad23..00000000000 --- a/rostests/winetests/userenv/userenv.rbuild +++ /dev/null @@ -1,10 +0,0 @@ - - . - - userenv.c - testlist.c - wine - userenv - advapi32 - ntdll - diff --git a/rostests/winetests/usp10/CMakeLists.txt b/rostests/winetests/usp10/CMakeLists.txt deleted file mode 100644 index fac0f79dca6..00000000000 --- a/rostests/winetests/usp10/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(usp10_winetest usp10.c testlist.c) -target_link_libraries(usp10_winetest wine) -set_module_type(usp10_winetest win32cui) -add_importlibs(usp10_winetest usp10 user32 gdi32 msvcrt kernel32 ntdll) -add_cd_file(TARGET usp10_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/usp10/testlist.c b/rostests/winetests/usp10/testlist.c deleted file mode 100644 index 84d72c0a176..00000000000 --- a/rostests/winetests/usp10/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_usp10(void); - -const struct test winetest_testlist[] = -{ - { "usp10", func_usp10 }, - { 0, 0 } -}; diff --git a/rostests/winetests/usp10/usp10.c b/rostests/winetests/usp10/usp10.c deleted file mode 100644 index efc0569d3be..00000000000 --- a/rostests/winetests/usp10/usp10.c +++ /dev/null @@ -1,1757 +0,0 @@ -/* - * Tests for usp10 dll - * - * Copyright 2006 Jeff Latimer - * Copyright 2006 Hans Leidekker - * Copyright 2010 CodeWeavers, Aric Stewart - * - * 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: - * Uniscribe allows for processing of complex scripts such as joining - * and filtering characters and bi-directional text with custom line breaks. - */ - -#include -#include - -#include -#include -#include - -typedef struct _itemTest { - char todo_flag[4]; - int iCharPos; - int fRTL; - int fLayoutRTL; - int uBidiLevel; -} itemTest; - -static inline void _test_items_ok(LPCWSTR string, DWORD cchString, - SCRIPT_CONTROL *Control, SCRIPT_STATE *State, - DWORD nItems, const itemTest* items, BOOL nItemsToDo) -{ - HRESULT hr; - int x, outnItems; - SCRIPT_ITEM outpItems[15]; - - hr = ScriptItemize(string, cchString, 15, Control, State, outpItems, &outnItems); - winetest_ok(!hr, "ScriptItemize should return S_OK not %08x\n", hr); - if (nItemsToDo) - todo_wine winetest_ok(outnItems == nItems, "Wrong number of items\n"); - else - winetest_ok(outnItems == nItems, "Wrong number of items\n"); - for (x = 0; x <= outnItems; x++) - { - if (items[x].todo_flag[0]) - todo_wine winetest_ok(outpItems[x].iCharPos == items[x].iCharPos, "%i:Wrong CharPos\n",x); - else - winetest_ok(outpItems[x].iCharPos == items[x].iCharPos, "%i:Wrong CharPos (%i)\n",x,outpItems[x].iCharPos); - - if (items[x].todo_flag[1]) - todo_wine winetest_ok(outpItems[x].a.fRTL == items[x].fRTL, "%i:Wrong fRTL\n",x); - else - winetest_ok(outpItems[x].a.fRTL == items[x].fRTL, "%i:Wrong fRTL(%i)\n",x,outpItems[x].a.fRTL); - if (items[x].todo_flag[2]) - todo_wine winetest_ok(outpItems[x].a.fLayoutRTL == items[x].fLayoutRTL, "%i:Wrong fLayoutRTL\n",x); - else - winetest_ok(outpItems[x].a.fLayoutRTL == items[x].fLayoutRTL, "%i:Wrong fLayoutRTL(%i)\n",x,outpItems[x].a.fLayoutRTL); - if (items[x].todo_flag[3]) - todo_wine winetest_ok(outpItems[x].a.s.uBidiLevel == items[x].uBidiLevel, "%i:Wrong BidiLevel\n",x); - else - winetest_ok(outpItems[x].a.s.uBidiLevel == items[x].uBidiLevel, "%i:Wrong BidiLevel(%i)\n",x,outpItems[x].a.s.uBidiLevel); - } -} - -#define test_items_ok(a,b,c,d,e,f,g) (winetest_set_location(__FILE__,__LINE__), 0) ? 0 : _test_items_ok(a,b,c,d,e,f,g) - - -static void test_ScriptItemize( void ) -{ - static const WCHAR test1[] = {'t', 'e', 's', 't',0}; - static const itemTest t11[2] = {{{0,0,0,0},0,0,0,0},{{0,0,0,0},4,0,0,0}}; - static const itemTest t12[2] = {{{0,0,0,0},0,0,0,2},{{0,0,0,0},4,0,0,0}}; - - /* Arabic, English*/ - static const WCHAR test2[] = {'1','2','3','-','5','2',0x064a,0x064f,0x0633,0x0627,0x0648,0x0650,0x064a,'7','1','.',0}; - static const itemTest t21[7] = {{{0,0,0,0},0,0,0,0},{{0,0,0,0},3,0,0,0},{{0,0,0,0},4,0,0,0},{{0,0,0,0},6,1,1,1},{{0,0,0,0},13,0,0,0},{{0,0,0,0},15,0,0,0},{{0,0,0,0},16,0,0,0}}; - static const itemTest t22[5] = {{{0,0,0,1},0,0,0,2},{{0,0,0,0},6,1,1,1},{{0,0,1,0},13,0,1,2},{{0,0,0,0},15,0,0,0},{{0,0,0,0},16,0,0,0}}; - static const itemTest t23[5] = {{{0,0,1,0},0,0,1,2},{{0,0,0,0},6,1,1,1},{{0,0,1,0},13,0,1,2},{{0,0,0,0},15,1,1,1},{{0,0,0,0},16,0,0,0}}; - - /* Thai */ - static const WCHAR test3[] = -{0x0e04,0x0e27,0x0e32,0x0e21,0x0e1e,0x0e22,0x0e32,0x0e22,0x0e32, 0x0e21 -,0x0e2d,0x0e22,0x0e39,0x0e48,0x0e17,0x0e35,0x0e48,0x0e44,0x0e2b,0x0e19 -,0x0e04,0x0e27,0x0e32,0x0e21,0x0e2a, 0x0e33,0x0e40,0x0e23,0x0e47,0x0e08, - 0x0e2d,0x0e22,0x0e39,0x0e48,0x0e17,0x0e35,0x0e48,0x0e19,0x0e31,0x0e48,0x0e19,0}; - - static const itemTest t31[2] = {{{0,0,0,0},0,0,0,0},{{0,0,0,0},41,0,0,0}}; - static const itemTest t32[2] = {{{0,0,0,0},0,0,0,2},{{0,0,0,0},41,0,0,0}}; - - static const WCHAR test4[] = {'1','2','3','-','5','2',' ','i','s',' ','7','1','.',0}; - - static const itemTest t41[6] = {{{0,0,0,0},0,0,0,0},{{0,0,0,0},3,0,0,0},{{0,0,0,0},4,0,0,0},{{0,0,0,0},7,0,0,0},{{0,0,0,0},10,0,0,0},{{0,0,0,0},12,0,0,0}}; - static const itemTest t42[5] = {{{0,0,1,0},0,0,1,2},{{0,0,0,0},6,1,1,1},{{0,0,0,0},7,0,0,2},{{1,0,0,1},10,0,0,2},{{1,0,0,0},12,0,0,0}}; - - /* Arabic */ - static const WCHAR test5[] = -{0x0627,0x0644,0x0635,0x0651,0x0650,0x062d,0x0629,0x064f,' ',0x062a,0x064e, -0x0627,0x062c,0x064c,' ',0x0639,0x064e,0x0644,0x0649,' ', -0x0631,0x064f,0x0624,0x0648,0x0633,0x0650,' ',0x0627,0x0644 -,0x0623,0x0635,0x0650,0x062d,0x0651,0x064e,0x0627,0x0621,0x0650,0}; - static const itemTest t51[2] = {{{0,0,0,0},0,1,1,1},{{0,0,0,0},38,0,0,0}}; - - /* Hebrew */ - static const WCHAR test6[] = {0x05e9, 0x05dc, 0x05d5, 0x05dd, '.',0}; - static const itemTest t61[3] = {{{0,0,0,0},0,1,1,1},{{0,0,0,0},4,0,0,0},{{0,0,0,0},5,0,0,0}}; - static const itemTest t62[3] = {{{0,0,0,0},0,1,1,1},{{0,0,0,0},4,1,1,1},{{0,0,0,0},5,0,0,0}}; - static const WCHAR test7[] = {'p','a','r','t',' ','o','n','e',' ',0x05d7, 0x05dc, 0x05e7, ' ', 0x05e9, 0x05ea, 0x05d9, 0x05d9, 0x05dd, ' ','p','a','r','t',' ','t','h','r','e','e', 0}; - static const itemTest t71[4] = {{{0,0,0,0},0,0,0,0},{{0,0,0,0},9,1,1,1},{{0,0,0,0},19,0,0,0},{{0,0,0,0},29,0,0,0}}; - static const itemTest t72[4] = {{{0,0,0,0},0,0,0,0},{{0,0,0,0},9,1,1,1},{{0,0,0,0},18,0,0,0},{{0,0,0,0},29,0,0,0}}; - static const itemTest t73[4] = {{{0,0,0,0},0,0,0,2},{{0,0,0,0},8,1,1,1},{{0,0,0,0},19,0,0,2},{{0,0,0,0},29,0,0,0}}; - static const WCHAR test8[] = {0x0633, 0x0644, 0x0627, 0x0645,0}; - static const itemTest t81[2] = {{{0,0,0,0},0,1,1,1},{{0,0,0,0},4,0,0,0}}; - - /* Syriac (Like Arabic )*/ - static const WCHAR test9[] = {0x0710, 0x0712, 0x0712, 0x0714, '.',0}; - static const itemTest t91[3] = {{{0,0,0,0},0,1,1,1},{{0,0,0,0},4,0,0,0},{{0,0,0,0},5,0,0,0}}; - static const itemTest t92[3] = {{{0,0,0,0},0,1,1,1},{{0,0,0,0},4,1,1,1},{{0,0,0,0},5,0,0,0}}; - - static const WCHAR test10[] = {0x0717, 0x0718, 0x071a, 0x071b,0}; - static const itemTest t101[2] = {{{0,0,0,0},0,1,1,1},{{0,0,0,0},4,0,0,0}}; - - SCRIPT_ITEM items[15]; - SCRIPT_CONTROL Control; - SCRIPT_STATE State; - HRESULT hr; - int nItems; - - memset(&Control, 0, sizeof(Control)); - memset(&State, 0, sizeof(State)); - - hr = ScriptItemize(NULL, 4, 10, &Control, &State, items, NULL); - ok (hr == E_INVALIDARG, "ScriptItemize should return E_INVALIDARG if pwcInChars is NULL\n"); - - hr = ScriptItemize(test1, 4, 10, &Control, &State, NULL, NULL); - ok (hr == E_INVALIDARG, "ScriptItemize should return E_INVALIDARG if pItems is NULL\n"); - - hr = ScriptItemize(test1, 4, 1, &Control, &State, items, NULL); - ok (hr == E_INVALIDARG, "ScriptItemize should return E_INVALIDARG if cMaxItems < 2.\n"); - - hr = ScriptItemize(test1, 0, 10, NULL, NULL, items, &nItems); - ok (hr == E_INVALIDARG, "ScriptItemize should return E_INVALIDARG if cInChars is 0\n"); - - test_items_ok(test1,4,NULL,NULL,1,t11,FALSE); - test_items_ok(test2,16,NULL,NULL,6,t21,FALSE); - test_items_ok(test3,41,NULL,NULL,1,t31,FALSE); - test_items_ok(test4,12,NULL,NULL,5,t41,FALSE); - test_items_ok(test5,38,NULL,NULL,1,t51,FALSE); - test_items_ok(test6,5,NULL,NULL,2,t61,FALSE); - test_items_ok(test7,29,NULL,NULL,3,t71,FALSE); - test_items_ok(test8,4,NULL,NULL,1,t81,FALSE); - test_items_ok(test9,5,NULL,NULL,2,t91,FALSE); - test_items_ok(test10,4,NULL,NULL,1,t101,FALSE); - - State.uBidiLevel = 0; - test_items_ok(test1,4,&Control,&State,1,t11,FALSE); - test_items_ok(test2,16,&Control,&State,4,t22,FALSE); - test_items_ok(test3,41,&Control,&State,1,t31,FALSE); - test_items_ok(test4,12,&Control,&State,5,t41,FALSE); - test_items_ok(test5,38,&Control,&State,1,t51,FALSE); - test_items_ok(test6,5,&Control,&State,2,t61,FALSE); - test_items_ok(test7,29,&Control,&State,3,t72,FALSE); - test_items_ok(test8,4,&Control,&State,1,t81,FALSE); - test_items_ok(test9,5,&Control,&State,2,t91,FALSE); - test_items_ok(test10,4,&Control,&State,1,t101,FALSE); - - State.uBidiLevel = 1; - test_items_ok(test1,4,&Control,&State,1,t12,FALSE); - test_items_ok(test2,16,&Control,&State,4,t23,FALSE); - test_items_ok(test3,41,&Control,&State,1,t32,FALSE); - test_items_ok(test4,12,&Control,&State,4,t42,TRUE); - test_items_ok(test5,38,&Control,&State,1,t51,FALSE); - test_items_ok(test6,5,&Control,&State,2,t62,FALSE); - test_items_ok(test7,29,&Control,&State,3,t73,FALSE); - test_items_ok(test8,4,&Control,&State,1,t81,FALSE); - test_items_ok(test9,5,&Control,&State,2,t92,FALSE); - test_items_ok(test10,4,&Control,&State,1,t101,FALSE); -} - - -static void test_ScriptShape(HDC hdc) -{ - static const WCHAR test1[] = {'w', 'i', 'n', 'e',0}; - static const WCHAR test2[] = {0x202B, 'i', 'n', 0x202C,0}; - HRESULT hr; - SCRIPT_CACHE sc = NULL; - WORD glyphs[4], glyphs2[4], logclust[4]; - SCRIPT_VISATTR attrs[4]; - SCRIPT_ITEM items[2]; - int nb; - - hr = ScriptItemize(test1, 4, 2, NULL, NULL, items, NULL); - ok(!hr, "ScriptItemize should return S_OK not %08x\n", hr); - ok(items[0].a.fNoGlyphIndex == FALSE, "fNoGlyphIndex TRUE\n"); - - hr = ScriptShape(hdc, &sc, test1, 4, 4, &items[0].a, glyphs, NULL, NULL, &nb); - ok(hr == E_INVALIDARG, "ScriptShape should return E_INVALIDARG not %08x\n", hr); - - hr = ScriptShape(hdc, &sc, test1, 4, 4, &items[0].a, glyphs, NULL, attrs, NULL); - ok(hr == E_INVALIDARG, "ScriptShape should return E_INVALIDARG not %08x\n", hr); - - hr = ScriptShape(NULL, &sc, test1, 4, 4, &items[0].a, glyphs, NULL, attrs, &nb); - ok(hr == E_PENDING, "ScriptShape should return E_PENDING not %08x\n", hr); - - hr = ScriptShape(hdc, &sc, test1, 4, 4, &items[0].a, glyphs, NULL, attrs, &nb); - ok(broken(hr == S_OK) || - hr == E_INVALIDARG || /* Vista, W2K8 */ - hr == E_FAIL, /* WIN7 */ - "ScriptShape should return E_FAIL or E_INVALIDARG, not %08x\n", hr); - ok(items[0].a.fNoGlyphIndex == FALSE, "fNoGlyphIndex TRUE\n"); - - hr = ScriptShape(hdc, &sc, test1, 4, 4, &items[0].a, glyphs, logclust, attrs, &nb); - ok(!hr, "ScriptShape should return S_OK not %08x\n", hr); - ok(items[0].a.fNoGlyphIndex == FALSE, "fNoGlyphIndex TRUE\n"); - - - memset(glyphs,-1,sizeof(glyphs)); - memset(logclust,-1,sizeof(logclust)); - memset(attrs,-1,sizeof(attrs)); - hr = ScriptShape(NULL, &sc, test1, 4, 4, &items[0].a, glyphs, logclust, attrs, &nb); - ok(!hr, "ScriptShape should return S_OK not %08x\n", hr); - ok(nb == 4, "Wrong number of items\n"); - ok(logclust[0] == 0, "clusters out of order\n"); - ok(logclust[1] == 1, "clusters out of order\n"); - ok(logclust[2] == 2, "clusters out of order\n"); - ok(logclust[3] == 3, "clusters out of order\n"); - ok(attrs[0].uJustification == SCRIPT_JUSTIFY_CHARACTER, "uJustification incorrect\n"); - ok(attrs[1].uJustification == SCRIPT_JUSTIFY_CHARACTER, "uJustification incorrect\n"); - ok(attrs[2].uJustification == SCRIPT_JUSTIFY_CHARACTER, "uJustification incorrect\n"); - ok(attrs[3].uJustification == SCRIPT_JUSTIFY_CHARACTER, "uJustification incorrect\n"); - ok(attrs[0].fClusterStart == 1, "fClusterStart incorrect\n"); - ok(attrs[1].fClusterStart == 1, "fClusterStart incorrect\n"); - ok(attrs[2].fClusterStart == 1, "fClusterStart incorrect\n"); - ok(attrs[3].fClusterStart == 1, "fClusterStart incorrect\n"); - ok(attrs[0].fDiacritic == 0, "fDiacritic incorrect\n"); - ok(attrs[1].fDiacritic == 0, "fDiacritic incorrect\n"); - ok(attrs[2].fDiacritic == 0, "fDiacritic incorrect\n"); - ok(attrs[3].fDiacritic == 0, "fDiacritic incorrect\n"); - ok(attrs[0].fZeroWidth == 0, "fZeroWidth incorrect\n"); - ok(attrs[1].fZeroWidth == 0, "fZeroWidth incorrect\n"); - ok(attrs[2].fZeroWidth == 0, "fZeroWidth incorrect\n"); - ok(attrs[3].fZeroWidth == 0, "fZeroWidth incorrect\n"); - - ScriptFreeCache(&sc); - sc = NULL; - - memset(glyphs2,-1,sizeof(glyphs2)); - memset(logclust,-1,sizeof(logclust)); - memset(attrs,-1,sizeof(attrs)); - hr = ScriptShape(hdc, &sc, test2, 4, 4, &items[0].a, glyphs2, logclust, attrs, &nb); - ok(hr == S_OK, "ScriptShape should return S_OK not %08x\n", hr); - ok(nb == 4, "Wrong number of items\n"); - ok(glyphs2[0] == 0 || broken(glyphs2[0] == 0x80), "Incorrect glyph for 0x202B\n"); - ok(glyphs2[3] == 0 || broken(glyphs2[3] == 0x80), "Incorrect glyph for 0x202C\n"); - ok(logclust[0] == 0, "clusters out of order\n"); - ok(logclust[1] == 1, "clusters out of order\n"); - ok(logclust[2] == 2, "clusters out of order\n"); - ok(logclust[3] == 3, "clusters out of order\n"); - ok(attrs[0].uJustification == SCRIPT_JUSTIFY_CHARACTER, "uJustification incorrect\n"); - ok(attrs[1].uJustification == SCRIPT_JUSTIFY_CHARACTER, "uJustification incorrect\n"); - ok(attrs[2].uJustification == SCRIPT_JUSTIFY_CHARACTER, "uJustification incorrect\n"); - ok(attrs[3].uJustification == SCRIPT_JUSTIFY_CHARACTER, "uJustification incorrect\n"); - ok(attrs[0].fClusterStart == 1, "fClusterStart incorrect\n"); - ok(attrs[1].fClusterStart == 1, "fClusterStart incorrect\n"); - ok(attrs[2].fClusterStart == 1, "fClusterStart incorrect\n"); - ok(attrs[3].fClusterStart == 1, "fClusterStart incorrect\n"); - ok(attrs[0].fDiacritic == 0, "fDiacritic incorrect\n"); - ok(attrs[1].fDiacritic == 0, "fDiacritic incorrect\n"); - ok(attrs[2].fDiacritic == 0, "fDiacritic incorrect\n"); - ok(attrs[3].fDiacritic == 0, "fDiacritic incorrect\n"); - ok(attrs[0].fZeroWidth == 0, "fZeroWidth incorrect\n"); - ok(attrs[1].fZeroWidth == 0, "fZeroWidth incorrect\n"); - ok(attrs[2].fZeroWidth == 0, "fZeroWidth incorrect\n"); - ok(attrs[3].fZeroWidth == 0, "fZeroWidth incorrect\n"); - - /* modify LTR to RTL */ - items[0].a.fRTL = 1; - memset(glyphs2,-1,sizeof(glyphs2)); - memset(logclust,-1,sizeof(logclust)); - memset(attrs,-1,sizeof(attrs)); - hr = ScriptShape(hdc, &sc, test1, 4, 4, &items[0].a, glyphs2, logclust, attrs, &nb); - ok(!hr, "ScriptShape should return S_OK not %08x\n", hr); - ok(nb == 4, "Wrong number of items\n"); - ok(glyphs2[0] == glyphs[3], "Glyphs not reordered properly\n"); - ok(glyphs2[1] == glyphs[2], "Glyphs not reordered properly\n"); - ok(glyphs2[2] == glyphs[1], "Glyphs not reordered properly\n"); - ok(glyphs2[3] == glyphs[0], "Glyphs not reordered properly\n"); - ok(logclust[0] == 3, "clusters out of order\n"); - ok(logclust[1] == 2, "clusters out of order\n"); - ok(logclust[2] == 1, "clusters out of order\n"); - ok(logclust[3] == 0, "clusters out of order\n"); - ok(attrs[0].uJustification == SCRIPT_JUSTIFY_CHARACTER, "uJustification incorrect\n"); - ok(attrs[1].uJustification == SCRIPT_JUSTIFY_CHARACTER, "uJustification incorrect\n"); - ok(attrs[2].uJustification == SCRIPT_JUSTIFY_CHARACTER, "uJustification incorrect\n"); - ok(attrs[3].uJustification == SCRIPT_JUSTIFY_CHARACTER, "uJustification incorrect\n"); - ok(attrs[0].fClusterStart == 1, "fClusterStart incorrect\n"); - ok(attrs[1].fClusterStart == 1, "fClusterStart incorrect\n"); - ok(attrs[2].fClusterStart == 1, "fClusterStart incorrect\n"); - ok(attrs[3].fClusterStart == 1, "fClusterStart incorrect\n"); - ok(attrs[0].fDiacritic == 0, "fDiacritic incorrect\n"); - ok(attrs[1].fDiacritic == 0, "fDiacritic incorrect\n"); - ok(attrs[2].fDiacritic == 0, "fDiacritic incorrect\n"); - ok(attrs[3].fDiacritic == 0, "fDiacritic incorrect\n"); - ok(attrs[0].fZeroWidth == 0, "fZeroWidth incorrect\n"); - ok(attrs[1].fZeroWidth == 0, "fZeroWidth incorrect\n"); - ok(attrs[2].fZeroWidth == 0, "fZeroWidth incorrect\n"); - ok(attrs[3].fZeroWidth == 0, "fZeroWidth incorrect\n"); - - ScriptFreeCache(&sc); -} - -static void test_ScriptPlace(HDC hdc) -{ - static const WCHAR test1[] = {'t', 'e', 's', 't',0}; - BOOL ret; - HRESULT hr; - SCRIPT_CACHE sc = NULL; - WORD glyphs[4], logclust[4]; - SCRIPT_VISATTR attrs[4]; - SCRIPT_ITEM items[2]; - int nb, widths[4]; - GOFFSET offset[4]; - ABC abc[4]; - - hr = ScriptItemize(test1, 4, 2, NULL, NULL, items, NULL); - ok(!hr, "ScriptItemize should return S_OK not %08x\n", hr); - ok(items[0].a.fNoGlyphIndex == FALSE, "fNoGlyphIndex TRUE\n"); - - hr = ScriptShape(hdc, &sc, test1, 4, 4, &items[0].a, glyphs, logclust, attrs, &nb); - ok(!hr, "ScriptShape should return S_OK not %08x\n", hr); - ok(items[0].a.fNoGlyphIndex == FALSE, "fNoGlyphIndex TRUE\n"); - - hr = ScriptPlace(hdc, &sc, glyphs, 4, NULL, &items[0].a, widths, NULL, NULL); - ok(hr == E_INVALIDARG, "ScriptPlace should return E_INVALIDARG not %08x\n", hr); - - hr = ScriptPlace(NULL, &sc, glyphs, 4, attrs, &items[0].a, widths, NULL, NULL); - ok(broken(hr == E_PENDING) || - hr == E_INVALIDARG || /* Vista, W2K8 */ - hr == E_FAIL, /* WIN7 */ - "ScriptPlace should return E_FAIL or E_INVALIDARG, not %08x\n", hr); - - hr = ScriptPlace(NULL, &sc, glyphs, 4, attrs, &items[0].a, widths, offset, NULL); - ok(hr == E_PENDING, "ScriptPlace should return E_PENDING not %08x\n", hr); - - hr = ScriptPlace(NULL, &sc, glyphs, 4, attrs, &items[0].a, widths, NULL, abc); - ok(broken(hr == E_PENDING) || - hr == E_INVALIDARG || /* Vista, W2K8 */ - hr == E_FAIL, /* WIN7 */ - "ScriptPlace should return E_FAIL or E_INVALIDARG, not %08x\n", hr); - - hr = ScriptPlace(hdc, &sc, glyphs, 4, attrs, &items[0].a, widths, offset, NULL); - ok(!hr, "ScriptPlace should return S_OK not %08x\n", hr); - ok(items[0].a.fNoGlyphIndex == FALSE, "fNoGlyphIndex TRUE\n"); - - ret = ExtTextOutW(hdc, 1, 1, 0, NULL, glyphs, 4, widths); - ok(ret, "ExtTextOutW should return TRUE\n"); - - ScriptFreeCache(&sc); -} - -static void test_ScriptItemIzeShapePlace(HDC hdc, unsigned short pwOutGlyphs[256]) -{ - HRESULT hr; - int iMaxProps; - const SCRIPT_PROPERTIES **ppSp; - - int cInChars; - int cMaxItems; - SCRIPT_ITEM pItem[255]; - int pcItems; - WCHAR TestItem1[] = {'T', 'e', 's', 't', 'a', 0}; - WCHAR TestItem2[] = {'T', 'e', 's', 't', 'b', 0}; - WCHAR TestItem3[] = {'T', 'e', 's', 't', 'c',' ','1','2','3',' ',' ','e','n','d',0}; - WCHAR TestItem4[] = {'T', 'e', 's', 't', 'd',' ',0x0684,0x0694,0x06a4,' ',' ','\r','\n','e','n','d',0}; - WCHAR TestItem5[] = {0x0684,'T','e','s','t','e',' ',0x0684,0x0694,0x06a4,' ',' ','e','n','d',0}; - WCHAR TestItem6[] = {'T', 'e', 's', 't', 'f',' ',' ',' ','\r','\n','e','n','d',0}; - - SCRIPT_CACHE psc; - int cChars; - int cMaxGlyphs; - unsigned short pwOutGlyphs1[256]; - unsigned short pwOutGlyphs2[256]; - unsigned short pwLogClust[256]; - SCRIPT_VISATTR psva[256]; - int pcGlyphs; - int piAdvance[256]; - GOFFSET pGoffset[256]; - ABC pABC[256]; - int cnt; - - /* Start testing usp10 functions */ - /* This test determines that the pointer returned by ScriptGetProperties is valid - * by checking a known value in the table */ - hr = ScriptGetProperties(&ppSp, &iMaxProps); - trace("number of script properties %d\n", iMaxProps); - ok (iMaxProps > 0, "Number of scripts returned should not be 0\n"); - if (iMaxProps > 0) - ok( ppSp[5]->langid == 9, "Langid[5] not = to 9\n"); /* Check a known value to ensure */ - /* ptrs work */ - - /* This is a valid test that will cause parsing to take place */ - cInChars = 5; - cMaxItems = 255; - hr = ScriptItemize(TestItem1, cInChars, cMaxItems, NULL, NULL, pItem, &pcItems); - ok (hr == 0, "ScriptItemize should return 0, returned %08x\n", hr); - /* This test is for the interim operation of ScriptItemize where only one SCRIPT_ITEM is * - * returned. */ - ok (pcItems > 0, "The number of SCRIPT_ITEMS should be greater than 0\n"); - if (pcItems > 0) - ok (pItem[0].iCharPos == 0 && pItem[1].iCharPos == cInChars, - "Start pos not = 0 (%d) or end pos not = %d (%d)\n", - pItem[0].iCharPos, cInChars, pItem[1].iCharPos); - - /* It would appear that we have a valid SCRIPT_ANALYSIS and can continue - * ie. ScriptItemize has succeeded and that pItem has been set */ - cInChars = 5; - cMaxItems = 255; - if (hr == 0) { - psc = NULL; /* must be null on first call */ - cChars = cInChars; - cMaxGlyphs = cInChars; - hr = ScriptShape(NULL, &psc, TestItem1, cChars, - cMaxGlyphs, &pItem[0].a, - pwOutGlyphs1, pwLogClust, psva, &pcGlyphs); - ok (hr == E_PENDING, "If psc is NULL (%08x) the E_PENDING should be returned\n", hr); - cMaxGlyphs = 4; - hr = ScriptShape(hdc, &psc, TestItem1, cChars, - cMaxGlyphs, &pItem[0].a, - pwOutGlyphs1, pwLogClust, psva, &pcGlyphs); - ok (hr == E_OUTOFMEMORY, "If not enough output area cChars (%d) is > than CMaxGlyphs " - "(%d) but not E_OUTOFMEMORY\n", - cChars, cMaxGlyphs); - cMaxGlyphs = 256; - hr = ScriptShape(hdc, &psc, TestItem1, cChars, - cMaxGlyphs, &pItem[0].a, - pwOutGlyphs1, pwLogClust, psva, &pcGlyphs); - ok (hr == 0, "ScriptShape should return 0 not (%08x)\n", hr); - ok (psc != NULL, "psc should not be null and have SCRIPT_CACHE buffer address\n"); - ok (pcGlyphs == cChars, "Chars in (%d) should equal Glyphs out (%d)\n", cChars, pcGlyphs); - if (hr ==0) { - hr = ScriptPlace(hdc, &psc, pwOutGlyphs1, pcGlyphs, psva, &pItem[0].a, piAdvance, - pGoffset, pABC); - ok (hr == 0, "ScriptPlace should return 0 not (%08x)\n", hr); - hr = ScriptPlace(NULL, &psc, pwOutGlyphs1, pcGlyphs, psva, &pItem[0].a, piAdvance, - pGoffset, pABC); - ok (hr == 0, "ScriptPlace should return 0 not (%08x)\n", hr); - for (cnt=0; cnt < pcGlyphs; cnt++) - pwOutGlyphs[cnt] = pwOutGlyphs1[cnt]; /* Send to next function */ - } - - /* This test will check to make sure that SCRIPT_CACHE is reused and that not translation * - * takes place if fNoGlyphIndex is set. */ - - cInChars = 5; - cMaxItems = 255; - hr = ScriptItemize(TestItem2, cInChars, cMaxItems, NULL, NULL, pItem, &pcItems); - ok (hr == 0, "ScriptItemize should return 0, returned %08x\n", hr); - /* This test is for the interim operation of ScriptItemize where only one SCRIPT_ITEM is * - * returned. */ - ok (pItem[0].iCharPos == 0 && pItem[1].iCharPos == cInChars, - "Start pos not = 0 (%d) or end pos not = %d (%d)\n", - pItem[0].iCharPos, cInChars, pItem[1].iCharPos); - /* It would appear that we have a valid SCRIPT_ANALYSIS and can continue */ - if (hr == 0) { - cChars = cInChars; - cMaxGlyphs = 256; - pItem[0].a.fNoGlyphIndex = 1; /* say no translate */ - hr = ScriptShape(NULL, &psc, TestItem2, cChars, - cMaxGlyphs, &pItem[0].a, - pwOutGlyphs2, pwLogClust, psva, &pcGlyphs); - ok (hr != E_PENDING, "If psc should not be NULL (%08x) and the E_PENDING should be returned\n", hr); - ok (hr == 0, "ScriptShape should return 0 not (%08x)\n", hr); - ok (psc != NULL, "psc should not be null and have SCRIPT_CACHE buffer address\n"); - ok (pcGlyphs == cChars, "Chars in (%d) should equal Glyphs out (%d)\n", cChars, pcGlyphs); - for (cnt=0; cnt < cChars && TestItem2[cnt] == pwOutGlyphs2[cnt]; cnt++) {} - ok (cnt == cChars, "Translation to place when told not to. WCHAR %d - %04x != %04x\n", - cnt, TestItem2[cnt], pwOutGlyphs2[cnt]); - if (hr ==0) { - hr = ScriptPlace(hdc, &psc, pwOutGlyphs2, pcGlyphs, psva, &pItem[0].a, piAdvance, - pGoffset, pABC); - ok (hr == 0, "ScriptPlace should return 0 not (%08x)\n", hr); - } - } - hr = ScriptFreeCache( &psc); - ok (!psc, "psc is not null after ScriptFreeCache\n"); - - } - - /* This is a valid test that will cause parsing to take place and create 3 script_items */ - cInChars = (sizeof(TestItem3)/2)-1; - cMaxItems = 255; - hr = ScriptItemize(TestItem3, cInChars, cMaxItems, NULL, NULL, pItem, &pcItems); - ok (hr == 0, "ScriptItemize should return 0, returned %08x\n", hr); - if (hr == 0) - { - ok (pcItems == 3, "The number of SCRIPT_ITEMS should be 3 not %d\n", pcItems); - if (pcItems > 2) - { - ok (pItem[0].iCharPos == 0 && pItem[1].iCharPos == 6, - "Start pos [0] not = 0 (%d) or end pos [1] not = %d\n", - pItem[0].iCharPos, pItem[1].iCharPos); - ok (pItem[1].iCharPos == 6 && pItem[2].iCharPos == 11, - "Start pos [1] not = 6 (%d) or end pos [2] not = 11 (%d)\n", - pItem[1].iCharPos, pItem[2].iCharPos); - ok (pItem[2].iCharPos == 11 && pItem[3].iCharPos == cInChars, - "Start pos [2] not = 11 (%d) or end [3] pos not = 14 (%d), cInChars = %d\n", - pItem[2].iCharPos, pItem[3].iCharPos, cInChars); - } - } - - /* This is a valid test that will cause parsing to take place and create 5 script_items */ - cInChars = (sizeof(TestItem4)/2)-1; - cMaxItems = 255; - hr = ScriptItemize(TestItem4, cInChars, cMaxItems, NULL, NULL, pItem, &pcItems); - ok (hr == 0, "ScriptItemize should return 0, returned %08x\n", hr); - if (hr == 0) - { - ok (pcItems == 5, "The number of SCRIPT_ITEMS should be 5 not %d\n", pcItems); - if (pcItems > 4) - { - ok (pItem[0].iCharPos == 0 && pItem[1].iCharPos == 6, - "Start pos [0] not = 0 (%d) or end pos [1] not = %d\n", - pItem[0].iCharPos, pItem[1].iCharPos); - ok (pItem[0].a.s.uBidiLevel == 0, "Should have been bidi=0 not %d\n", - pItem[0].a.s.uBidiLevel); - ok (pItem[1].iCharPos == 6 && pItem[2].iCharPos == 11, - "Start pos [1] not = 6 (%d) or end pos [2] not = 11 (%d)\n", - pItem[1].iCharPos, pItem[2].iCharPos); - ok (pItem[1].a.s.uBidiLevel == 1, "Should have been bidi=1 not %d\n", - pItem[1].a.s.uBidiLevel); - ok (pItem[2].iCharPos == 11 && pItem[3].iCharPos == 12, - "Start pos [2] not = 11 (%d) or end [3] pos not = 12 (%d)\n", - pItem[2].iCharPos, pItem[3].iCharPos); - ok (pItem[2].a.s.uBidiLevel == 0, "Should have been bidi=0 not %d\n", - pItem[2].a.s.uBidiLevel); - ok (pItem[3].iCharPos == 12 && pItem[4].iCharPos == 13, - "Start pos [3] not = 12 (%d) or end [4] pos not = 13 (%d)\n", - pItem[3].iCharPos, pItem[4].iCharPos); - ok (pItem[3].a.s.uBidiLevel == 0, "Should have been bidi=0 not %d\n", - pItem[3].a.s.uBidiLevel); - ok (pItem[4].iCharPos == 13 && pItem[5].iCharPos == cInChars, - "Start pos [4] not = 13 (%d) or end [5] pos not = 16 (%d), cInChars = %d\n", - pItem[4].iCharPos, pItem[5].iCharPos, cInChars); - } - } - - /* - * This test is for when the first unicode character requires bidi support - */ - cInChars = (sizeof(TestItem5)-1)/sizeof(WCHAR); - hr = ScriptItemize(TestItem5, cInChars, cMaxItems, NULL, NULL, pItem, &pcItems); - ok (hr == 0, "ScriptItemize should return 0, returned %08x\n", hr); - ok (pcItems == 4, "There should have been 4 items, found %d\n", pcItems); - ok (pItem[0].a.s.uBidiLevel == 1, "The first character should have been bidi=1 not %d\n", - pItem[0].a.s.uBidiLevel); - - /* This test checks to make sure that the test to see if there are sufficient buffers to store * - * the pointer to the last char works. Note that windows often needs a greater number of * - * SCRIPT_ITEMS to process a string than is returned in pcItems. */ - cInChars = (sizeof(TestItem6)/2)-1; - cMaxItems = 4; - hr = ScriptItemize(TestItem6, cInChars, cMaxItems, NULL, NULL, pItem, &pcItems); - ok (hr == E_OUTOFMEMORY, "ScriptItemize should return E_OUTOFMEMORY, returned %08x\n", hr); - -} - -static void test_ScriptGetCMap(HDC hdc, unsigned short pwOutGlyphs[256]) -{ - HRESULT hr; - SCRIPT_CACHE psc = NULL; - int cInChars; - int cChars; - unsigned short pwOutGlyphs2[256]; - unsigned short pwOutGlyphs3[256]; - DWORD dwFlags; - int cnt; - - static const WCHAR TestItem1[] = {'T', 'e', 's', 't', 'a', 0}; - static const WCHAR TestItem2[] = {0x202B, 'i', 'n', 0x202C,0}; - static const WCHAR TestItem3[] = {'a','b','c','d','(','<','{','[',0x2039,0}; - static const WCHAR TestItem3b[] = {'a','b','c','d',')','>','}',']',0x203A,0}; - - /* Check to make sure that SCRIPT_CACHE gets allocated ok */ - dwFlags = 0; - cInChars = cChars = 5; - /* Some sanity checks for ScriptGetCMap */ - - hr = ScriptGetCMap(NULL, NULL, NULL, 0, 0, NULL); - ok( hr == E_INVALIDARG, "(NULL,NULL,NULL,0,0,NULL), " - "expected E_INVALIDARG, got %08x\n", hr); - - hr = ScriptGetCMap(NULL, NULL, TestItem1, cInChars, dwFlags, pwOutGlyphs3); - ok( hr == E_INVALIDARG, "(NULL,NULL,TestItem1, cInChars, dwFlags, pwOutGlyphs3), " - "expected E_INVALIDARG, got %08x\n", hr); - - /* Set psc to NULL, to be able to check if a pointer is returned in psc */ - psc = NULL; - hr = ScriptGetCMap(NULL, &psc, TestItem1, cInChars, 0, pwOutGlyphs3); - ok( hr == E_PENDING, "(NULL,&psc,NULL,0,0,NULL), expected E_PENDING, " - "got %08x\n", hr); - ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc); - - /* Set psc to NULL but add hdc, to be able to check if a pointer is returned in psc */ - psc = NULL; - hr = ScriptGetCMap(hdc, &psc, TestItem1, cInChars, 0, pwOutGlyphs3); - ok( hr == S_OK, "ScriptGetCMap(NULL,&psc,NULL,0,0,NULL), expected S_OK, " - "got %08x\n", hr); - ok( psc != NULL, "ScritpGetCMap expected psc to be not NULL\n"); - ScriptFreeCache( &psc); - - /* Set psc to NULL, to be able to check if a pointer is returned in psc */ - psc = NULL; - hr = ScriptGetCMap(NULL, &psc, TestItem1, cInChars, dwFlags, pwOutGlyphs3); - ok( hr == E_PENDING, "(NULL,&psc,), expected E_PENDING, got %08x\n", hr); - ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc); - /* Check to see if the results are the same as those returned by ScriptShape */ - hr = ScriptGetCMap(hdc, &psc, TestItem1, cInChars, dwFlags, pwOutGlyphs3); - ok (hr == 0, "ScriptGetCMap should return 0 not (%08x)\n", hr); - ok (psc != NULL, "psc should not be null and have SCRIPT_CACHE buffer address\n"); - for (cnt=0; cnt < cChars && pwOutGlyphs[cnt] == pwOutGlyphs3[cnt]; cnt++) {} - ok (cnt == cInChars, "Translation not correct. WCHAR %d - %04x != %04x\n", - cnt, pwOutGlyphs[cnt], pwOutGlyphs3[cnt]); - - hr = ScriptFreeCache( &psc); - ok (!psc, "psc is not null after ScriptFreeCache\n"); - - cInChars = cChars = 4; - hr = ScriptGetCMap(hdc, &psc, TestItem2, cInChars, dwFlags, pwOutGlyphs3); - ok (hr == S_FALSE, "ScriptGetCMap should return S_FALSE not (%08x)\n", hr); - ok (psc != NULL, "psc should not be null and have SCRIPT_CACHE buffer address\n"); - ok(pwOutGlyphs3[0] == 0 || broken(pwOutGlyphs3[0] == 0x80), "Glyph 0 should be default glyph\n"); - ok(pwOutGlyphs3[3] == 0 || broken(pwOutGlyphs3[0] == 0x80), "Glyph 0 should be default glyph\n"); - - - cInChars = cChars = 9; - hr = ScriptGetCMap(hdc, &psc, TestItem3b, cInChars, dwFlags, pwOutGlyphs2); - ok (hr == S_OK, "ScriptGetCMap should return S_OK not (%08x)\n", hr); - ok (psc != NULL, "psc should not be null and have SCRIPT_CACHE buffer address\n"); - - cInChars = cChars = 9; - dwFlags = SGCM_RTL; - hr = ScriptGetCMap(hdc, &psc, TestItem3, cInChars, dwFlags, pwOutGlyphs3); - ok (hr == S_OK, "ScriptGetCMap should return S_OK not (%08x)\n", hr); - ok (psc != NULL, "psc should not be null and have SCRIPT_CACHE buffer address\n"); - ok(pwOutGlyphs3[0] == pwOutGlyphs2[0], "glyph incorrectly altered\n"); - ok(pwOutGlyphs3[1] == pwOutGlyphs2[1], "glyph incorreclty altered\n"); - ok(pwOutGlyphs3[2] == pwOutGlyphs2[2], "glyph incorreclty altered\n"); - ok(pwOutGlyphs3[3] == pwOutGlyphs2[3], "glyph incorreclty altered\n"); - ok(pwOutGlyphs3[4] == pwOutGlyphs2[4], "glyph not mirrored correctly\n"); - ok(pwOutGlyphs3[5] == pwOutGlyphs2[5], "glyph not mirrored correctly\n"); - ok(pwOutGlyphs3[6] == pwOutGlyphs2[6], "glyph not mirrored correctly\n"); - ok(pwOutGlyphs3[7] == pwOutGlyphs2[7], "glyph not mirrored correctly\n"); - ok(pwOutGlyphs3[8] == pwOutGlyphs2[8], "glyph not mirrored correctly\n"); - - hr = ScriptFreeCache( &psc); - ok (!psc, "psc is not null after ScriptFreeCache\n"); -} - -static void test_ScriptGetFontProperties(HDC hdc) -{ - HRESULT hr; - SCRIPT_CACHE psc,old_psc; - SCRIPT_FONTPROPERTIES sfp; - - /* Some sanity checks for ScriptGetFontProperties */ - - hr = ScriptGetFontProperties(NULL,NULL,NULL); - ok( hr == E_INVALIDARG, "(NULL,NULL,NULL), expected E_INVALIDARG, got %08x\n", hr); - - hr = ScriptGetFontProperties(NULL,NULL,&sfp); - ok( hr == E_INVALIDARG, "(NULL,NULL,&sfp), expected E_INVALIDARG, got %08x\n", hr); - - /* Set psc to NULL, to be able to check if a pointer is returned in psc */ - psc = NULL; - hr = ScriptGetFontProperties(NULL,&psc,NULL); - ok( hr == E_INVALIDARG, "(NULL,&psc,NULL), expected E_INVALIDARG, got %08x\n", hr); - ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc); - - /* Set psc to NULL, to be able to check if a pointer is returned in psc */ - psc = NULL; - hr = ScriptGetFontProperties(NULL,&psc,&sfp); - ok( hr == E_PENDING, "(NULL,&psc,&sfp), expected E_PENDING, got %08x\n", hr); - ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc); - - hr = ScriptGetFontProperties(hdc,NULL,NULL); - ok( hr == E_INVALIDARG, "(hdc,NULL,NULL), expected E_INVALIDARG, got %08x\n", hr); - - hr = ScriptGetFontProperties(hdc,NULL,&sfp); - ok( hr == E_INVALIDARG, "(hdc,NULL,&sfp), expected E_INVALIDARG, got %08x\n", hr); - - /* Set psc to NULL, to be able to check if a pointer is returned in psc */ - psc = NULL; - hr = ScriptGetFontProperties(hdc,&psc,NULL); - ok( hr == E_INVALIDARG, "(hdc,&psc,NULL), expected E_INVALIDARG, got %08x\n", hr); - ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc); - - /* Pass an invalid sfp */ - psc = NULL; - sfp.cBytes = sizeof(SCRIPT_FONTPROPERTIES) - 1; - hr = ScriptGetFontProperties(hdc,&psc,&sfp); - ok( hr == E_INVALIDARG, "(hdc,&psc,&sfp) invalid, expected E_INVALIDARG, got %08x\n", hr); - ok( psc != NULL, "Expected a pointer in psc, got NULL\n"); - ScriptFreeCache(&psc); - ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc); - - /* Give it the correct cBytes, we don't care about what's coming back */ - sfp.cBytes = sizeof(SCRIPT_FONTPROPERTIES); - psc = NULL; - hr = ScriptGetFontProperties(hdc,&psc,&sfp); - ok( hr == S_OK, "(hdc,&psc,&sfp) partly initialized, expected S_OK, got %08x\n", hr); - ok( psc != NULL, "Expected a pointer in psc, got NULL\n"); - - /* Save the psc pointer */ - old_psc = psc; - /* Now a NULL hdc again */ - hr = ScriptGetFontProperties(NULL,&psc,&sfp); - ok( hr == S_OK, "(NULL,&psc,&sfp), expected S_OK, got %08x\n", hr); - ok( psc == old_psc, "Expected psc not to be changed, was %p is now %p\n", old_psc, psc); - ScriptFreeCache(&psc); - ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc); -} - -static void test_ScriptTextOut(HDC hdc) -{ - HRESULT hr; - - int cInChars; - int cMaxItems; - SCRIPT_ITEM pItem[255]; - int pcItems; - WCHAR TestItem1[] = {'T', 'e', 's', 't', 'a', 0}; - - SCRIPT_CACHE psc; - int cChars; - int cMaxGlyphs; - unsigned short pwOutGlyphs1[256]; - WORD pwLogClust[256]; - SCRIPT_VISATTR psva[256]; - int pcGlyphs; - int piAdvance[256]; - GOFFSET pGoffset[256]; - ABC pABC[256]; - RECT rect; - int piX; - int iCP = 1; - BOOL fTrailing = FALSE; - SCRIPT_LOGATTR *psla; - SCRIPT_LOGATTR sla[256]; - - /* This is a valid test that will cause parsing to take place */ - cInChars = 5; - cMaxItems = 255; - hr = ScriptItemize(TestItem1, cInChars, cMaxItems, NULL, NULL, pItem, &pcItems); - ok (hr == 0, "ScriptItemize should return 0, returned %08x\n", hr); - /* This test is for the interim operation of ScriptItemize where only one SCRIPT_ITEM is * - * returned. */ - ok (pcItems > 0, "The number of SCRIPT_ITEMS should be greater than 0\n"); - if (pcItems > 0) - ok (pItem[0].iCharPos == 0 && pItem[1].iCharPos == cInChars, - "Start pos not = 0 (%d) or end pos not = %d (%d)\n", - pItem[0].iCharPos, cInChars, pItem[1].iCharPos); - - /* It would appear that we have a valid SCRIPT_ANALYSIS and can continue - * ie. ScriptItemize has succeeded and that pItem has been set */ - cInChars = 5; - cMaxItems = 255; - if (hr == 0) { - psc = NULL; /* must be null on first call */ - cChars = cInChars; - cMaxGlyphs = cInChars; - cMaxGlyphs = 256; - hr = ScriptShape(hdc, &psc, TestItem1, cChars, - cMaxGlyphs, &pItem[0].a, - pwOutGlyphs1, pwLogClust, psva, &pcGlyphs); - ok (hr == 0, "ScriptShape should return 0 not (%08x)\n", hr); - ok (psc != NULL, "psc should not be null and have SCRIPT_CACHE buffer address\n"); - ok (pcGlyphs == cChars, "Chars in (%d) should equal Glyphs out (%d)\n", cChars, pcGlyphs); - if (hr ==0) { - /* Note hdc is needed as glyph info is not yet in psc */ - hr = ScriptPlace(hdc, &psc, pwOutGlyphs1, pcGlyphs, psva, &pItem[0].a, piAdvance, - pGoffset, pABC); - ok (hr == 0, "Should return 0 not (%08x)\n", hr); - ScriptFreeCache(&psc); /* Get rid of psc for next test set */ - ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc); - - hr = ScriptTextOut(NULL, NULL, 0, 0, 0, NULL, NULL, NULL, 0, NULL, 0, NULL, NULL, NULL); - ok (hr == E_INVALIDARG, "Should return 0 not (%08x)\n", hr); - - hr = ScriptTextOut(NULL, NULL, 0, 0, 0, NULL, &pItem[0].a, NULL, 0, pwOutGlyphs1, pcGlyphs, - piAdvance, NULL, pGoffset); - ok( hr == E_INVALIDARG, "(NULL,NULL,TestItem1, cInChars, dwFlags, pwOutGlyphs3), " - "expected E_INVALIDARG, got %08x\n", hr); - - /* Set psc to NULL, to be able to check if a pointer is returned in psc */ - psc = NULL; - hr = ScriptTextOut(NULL, &psc, 0, 0, 0, NULL, NULL, NULL, 0, NULL, 0, - NULL, NULL, NULL); - ok( hr == E_INVALIDARG, "(NULL,&psc,NULL,0,0,0,NULL,), expected E_INVALIDARG, " - "got %08x\n", hr); - ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc); - - /* hdc is required for this one rather than the usual optional */ - psc = NULL; - hr = ScriptTextOut(NULL, &psc, 0, 0, 0, NULL, &pItem[0].a, NULL, 0, pwOutGlyphs1, pcGlyphs, - piAdvance, NULL, pGoffset); - ok( hr == E_INVALIDARG, "(NULL,&psc,), expected E_INVALIDARG, got %08x\n", hr); - ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc); - - /* Set that it returns 0 status */ - hr = ScriptTextOut(hdc, &psc, 0, 0, 0, NULL, &pItem[0].a, NULL, 0, pwOutGlyphs1, pcGlyphs, - piAdvance, NULL, pGoffset); - ok (hr == 0, "ScriptTextOut should return 0 not (%08x)\n", hr); - - /* Test Rect Rgn is acceptable */ - rect.top = 10; - rect.bottom = 20; - rect.left = 10; - rect.right = 40; - hr = ScriptTextOut(hdc, &psc, 0, 0, 0, &rect, &pItem[0].a, NULL, 0, pwOutGlyphs1, pcGlyphs, - piAdvance, NULL, pGoffset); - ok (hr == 0, "ScriptTextOut should return 0 not (%08x)\n", hr); - - iCP = 1; - hr = ScriptCPtoX(iCP, fTrailing, cChars, pcGlyphs, (const WORD *) &pwLogClust, - (const SCRIPT_VISATTR *) &psva, (const int *)&piAdvance, &pItem[0].a, &piX); - ok(hr == S_OK, "ScriptCPtoX Stub should return S_OK not %08x\n", hr); - - psla = (SCRIPT_LOGATTR *)&sla; - hr = ScriptBreak(TestItem1, cChars, &pItem[0].a, psla); - ok(hr == S_OK, "ScriptBreak Stub should return S_OK not %08x\n", hr); - - /* Clean up and go */ - ScriptFreeCache(&psc); - ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc); - } - } -} - -static void test_ScriptTextOut2(HDC hdc) -{ -/* Intent is to validate that the HDC passed into ScriptTextOut is - * used instead of the (possibly) invalid cached one - */ - HRESULT hr; - - HDC hdc1, hdc2; - int cInChars; - int cMaxItems; - SCRIPT_ITEM pItem[255]; - int pcItems; - WCHAR TestItem1[] = {'T', 'e', 's', 't', 'a', 0}; - - SCRIPT_CACHE psc; - int cChars; - int cMaxGlyphs; - unsigned short pwOutGlyphs1[256]; - WORD pwLogClust[256]; - SCRIPT_VISATTR psva[256]; - int pcGlyphs; - int piAdvance[256]; - GOFFSET pGoffset[256]; - ABC pABC[256]; - - /* Create an extra DC that will be used until the ScriptTextOut */ - hdc1 = CreateCompatibleDC(hdc); - ok (hdc1 != 0, "CreateCompatibleDC failed to create a DC\n"); - hdc2 = CreateCompatibleDC(hdc); - ok (hdc2 != 0, "CreateCompatibleDC failed to create a DC\n"); - - /* This is a valid test that will cause parsing to take place */ - cInChars = 5; - cMaxItems = 255; - hr = ScriptItemize(TestItem1, cInChars, cMaxItems, NULL, NULL, pItem, &pcItems); - ok (hr == 0, "ScriptItemize should return 0, returned %08x\n", hr); - /* This test is for the interim operation of ScriptItemize where only one SCRIPT_ITEM is * - * returned. */ - ok (pcItems > 0, "The number of SCRIPT_ITEMS should be greater than 0\n"); - if (pcItems > 0) - ok (pItem[0].iCharPos == 0 && pItem[1].iCharPos == cInChars, - "Start pos not = 0 (%d) or end pos not = %d (%d)\n", - pItem[0].iCharPos, cInChars, pItem[1].iCharPos); - - /* It would appear that we have a valid SCRIPT_ANALYSIS and can continue - * ie. ScriptItemize has succeeded and that pItem has been set */ - cInChars = 5; - cMaxItems = 255; - if (hr == 0) { - psc = NULL; /* must be null on first call */ - cChars = cInChars; - cMaxGlyphs = cInChars; - cMaxGlyphs = 256; - hr = ScriptShape(hdc2, &psc, TestItem1, cChars, - cMaxGlyphs, &pItem[0].a, - pwOutGlyphs1, pwLogClust, psva, &pcGlyphs); - ok (hr == 0, "ScriptShape should return 0 not (%08x)\n", hr); - ok (psc != NULL, "psc should not be null and have SCRIPT_CACHE buffer address\n"); - ok (pcGlyphs == cChars, "Chars in (%d) should equal Glyphs out (%d)\n", cChars, pcGlyphs); - if (hr ==0) { - /* Note hdc is needed as glyph info is not yet in psc */ - hr = ScriptPlace(hdc2, &psc, pwOutGlyphs1, pcGlyphs, psva, &pItem[0].a, piAdvance, - pGoffset, pABC); - ok (hr == 0, "Should return 0 not (%08x)\n", hr); - - /* key part!!! cached dc is being deleted */ - hr = DeleteDC(hdc2); - ok(hr == 1, "DeleteDC should return 1 not %08x\n", hr); - - /* At this point the cached hdc (hdc2) has been destroyed, - * however, we are passing in a *real* hdc (the original hdc). - * The text should be written to that DC - */ - hr = ScriptTextOut(hdc1, &psc, 0, 0, 0, NULL, &pItem[0].a, NULL, 0, pwOutGlyphs1, pcGlyphs, - piAdvance, NULL, pGoffset); - ok (hr == 0, "ScriptTextOut should return 0 not (%08x)\n", hr); - ok (psc != NULL, "psc should not be null and have SCRIPT_CACHE buffer address\n"); - - DeleteDC(hdc1); - - /* Clean up and go */ - ScriptFreeCache(&psc); - ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc); - } - } -} - -static void test_ScriptTextOut3(HDC hdc) -{ - HRESULT hr; - - int cInChars; - int cMaxItems; - SCRIPT_ITEM pItem[255]; - int pcItems; - WCHAR TestItem1[] = {' ','\r', 0}; - - SCRIPT_CACHE psc; - int cChars; - int cMaxGlyphs; - unsigned short pwOutGlyphs1[256]; - WORD pwLogClust[256]; - SCRIPT_VISATTR psva[256]; - int pcGlyphs; - int piAdvance[256]; - GOFFSET pGoffset[256]; - ABC pABC[256]; - RECT rect; - - /* This is to ensure that non exisiting glyphs are translated into a valid glyph number */ - cInChars = 2; - cMaxItems = 255; - hr = ScriptItemize(TestItem1, cInChars, cMaxItems, NULL, NULL, pItem, &pcItems); - ok (hr == 0, "ScriptItemize should return 0, returned %08x\n", hr); - /* This test is for the interim operation of ScriptItemize where only one SCRIPT_ITEM is * - * returned. */ - ok (pcItems > 0, "The number of SCRIPT_ITEMS should be greater than 0\n"); - if (pcItems > 0) - ok (pItem[0].iCharPos == 0 && pItem[2].iCharPos == cInChars, - "Start pos not = 0 (%d) or end pos not = %d (%d)\n", - pItem[0].iCharPos, cInChars, pItem[2].iCharPos); - - /* It would appear that we have a valid SCRIPT_ANALYSIS and can continue - * ie. ScriptItemize has succeeded and that pItem has been set */ - cInChars = 2; - cMaxItems = 255; - if (hr == 0) { - psc = NULL; /* must be null on first call */ - cChars = cInChars; - cMaxGlyphs = cInChars; - cMaxGlyphs = 256; - hr = ScriptShape(hdc, &psc, TestItem1, cChars, - cMaxGlyphs, &pItem[0].a, - pwOutGlyphs1, pwLogClust, psva, &pcGlyphs); - ok (hr == 0, "ScriptShape should return 0 not (%08x)\n", hr); - ok (psc != NULL, "psc should not be null and have SCRIPT_CACHE buffer address\n"); - ok (pcGlyphs == cChars, "Chars in (%d) should equal Glyphs out (%d)\n", cChars, pcGlyphs); - if (hr ==0) { - /* Note hdc is needed as glyph info is not yet in psc */ - hr = ScriptPlace(hdc, &psc, pwOutGlyphs1, pcGlyphs, psva, &pItem[0].a, piAdvance, - pGoffset, pABC); - ok (hr == 0, "Should return 0 not (%08x)\n", hr); - - /* Test Rect Rgn is acceptable */ - rect.top = 10; - rect.bottom = 20; - rect.left = 10; - rect.right = 40; - hr = ScriptTextOut(hdc, &psc, 0, 0, 0, &rect, &pItem[0].a, NULL, 0, pwOutGlyphs1, pcGlyphs, - piAdvance, NULL, pGoffset); - ok (hr == 0, "ScriptTextOut should return 0 not (%08x)\n", hr); - - } - /* Clean up and go */ - ScriptFreeCache(&psc); - ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc); - } -} - -static void test_ScriptXtoX(void) -/**************************************************************************************** - * This routine tests the ScriptXtoCP and ScriptCPtoX functions using static variables * - ****************************************************************************************/ -{ - static const WCHAR test[] = {'t', 'e', 's', 't',0}; - SCRIPT_ITEM items[2]; - int iX, iCP; - int cChars; - int cGlyphs; - WORD pwLogClust[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - SCRIPT_VISATTR psva[10]; - int piAdvance[10] = {200, 190, 210, 180, 170, 204, 189, 195, 212, 203}; - int piCP, piX; - int piTrailing; - BOOL fTrailing; - HRESULT hr; - - hr = ScriptItemize(test, lstrlenW(test), sizeof(items)/sizeof(items[0]), NULL, NULL, items, NULL); - ok(!hr, "ScriptItemize should return S_OK not %08x\n", hr); - - iX = -1; - cChars = 10; - cGlyphs = 10; - hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &items[0].a, &piCP, &piTrailing); - ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr); - if (piTrailing) - ok(piCP == -1, "Negative iX should return piCP=-1 not %d\n", piCP); - else /* win2k3 */ - ok(piCP == 10, "Negative iX should return piCP=10 not %d\n", piCP); - - iX = 1954; - cChars = 10; - cGlyphs = 10; - hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &items[0].a, &piCP, &piTrailing); - ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr); - if (piTrailing) /* win2k3 */ - ok(piCP == -1, "Negative iX should return piCP=-1 not %d\n", piCP); - else - ok(piCP == 10, "Negative iX should return piCP=10 not %d\n", piCP); - - iX = 779; - cChars = 10; - cGlyphs = 10; - hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &items[0].a, &piCP, &piTrailing); - ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr); - ok(piCP == 3 || - piCP == -1, /* win2k3 */ - "iX=%d should return piCP=3 or piCP=-1 not %d\n", iX, piCP); - ok(piTrailing == 1, "iX=%d should return piTrailing=1 not %d\n", iX, piTrailing); - - iX = 780; - cChars = 10; - cGlyphs = 10; - hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &items[0].a, &piCP, &piTrailing); - ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr); - ok(piCP == 3 || - piCP == -1, /* win2k3 */ - "iX=%d should return piCP=3 or piCP=-1 not %d\n", iX, piCP); - ok(piTrailing == 1, "iX=%d should return piTrailing=1 not %d\n", iX, piTrailing); - - iX = 868; - cChars = 10; - cGlyphs = 10; - hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &items[0].a, &piCP, &piTrailing); - ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr); - ok(piCP == 4 || - piCP == -1, /* win2k3 */ - "iX=%d should return piCP=4 or piCP=-1 not %d\n", iX, piCP); - - iX = 0; - cChars = 10; - cGlyphs = 10; - hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &items[0].a, &piCP, &piTrailing); - ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr); - ok(piCP == 0 || - piCP == 10, /* win2k3 */ - "iX=%d should return piCP=0 piCP=10 not %d\n", iX, piCP); - - iX = 195; - cChars = 10; - cGlyphs = 10; - hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &items[0].a, &piCP, &piTrailing); - ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr); - ok(piCP == 0, "iX=%d should return piCP=0 not %d\n", iX, piCP); - - iX = 196; - cChars = 10; - cGlyphs = 10; - hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &items[0].a, &piCP, &piTrailing); - ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr); - ok(piCP == 1 || - piCP == 0, /* win2k3 */ - "iX=%d should return piCP=1 or piCP=0 not %d\n", iX, piCP); - - iCP=5; - fTrailing = FALSE; - cChars = 10; - cGlyphs = 10; - hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClust, psva, piAdvance, &items[0].a, &piX); - ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr); - ok(piX == 976 || - piX == 100, /* win2k3 */ - "iCP=%d should return piX=976 or piX=100 not %d\n", iCP, piX); - - iCP=5; - fTrailing = TRUE; - cChars = 10; - cGlyphs = 10; - hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClust, psva, piAdvance, &items[0].a, &piX); - ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr); - ok(piX == 1171 || - piX == 80, /* win2k3 */ - "iCP=%d should return piX=1171 or piX=80 not %d\n", iCP, piX); - - iCP=6; - fTrailing = FALSE; - cChars = 10; - cGlyphs = 10; - hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClust, psva, piAdvance, &items[0].a, &piX); - ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr); - ok(piX == 1171 || - piX == 80, /* win2k3 */ - "iCP=%d should return piX=1171 or piX=80 not %d\n", iCP, piX); - - iCP=11; - fTrailing = FALSE; - cChars = 10; - cGlyphs = 10; - hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClust, psva, piAdvance, &items[0].a, &piX); - ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr); - ok(piX == 1953 || - piX == 0, /* win2k3 */ - "iCP=%d should return piX=1953 or piX=0 not %d\n", iCP, piX); - - iCP=11; - fTrailing = TRUE; - cChars = 10; - cGlyphs = 10; - hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClust, psva, piAdvance, &items[0].a, &piX); - ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr); - ok(piX == 1953 || - piX == 0, /* win2k3 */ - "iCP=%d should return piX=1953 or piX=0 not %d\n", iCP, piX); -} - -static void test_ScriptString(HDC hdc) -{ -/******************************************************************************************* - * - * This set of tests are for the string functions of uniscribe. The ScriptStringAnalyse - * function allocates memory pointed to by the SCRIPT_STRING_ANALYSIS ssa pointer. This - * memory if freed by ScriptStringFree. There needs to be a valid hdc for this as - * ScriptStringAnalyse calls ScriptSItemize, ScriptShape and ScriptPlace which require it. - * - */ - - HRESULT hr; - WCHAR teststr[] = {'T','e','s','t','1',' ','a','2','b','3', '\0'}; - int len = (sizeof(teststr) / sizeof(WCHAR)) - 1; - int Glyphs = len * 2 + 16; - int Charset; - DWORD Flags = SSA_GLYPHS; - int ReqWidth = 100; - SCRIPT_CONTROL Control; - SCRIPT_STATE State; - const int Dx[5] = {10, 10, 10, 10, 10}; - SCRIPT_TABDEF Tabdef; - const BYTE InClass = 0; - SCRIPT_STRING_ANALYSIS ssa = NULL; - - int X = 10; - int Y = 100; - UINT Options = 0; - const RECT rc = {0, 50, 100, 100}; - int MinSel = 0; - int MaxSel = 0; - BOOL Disabled = FALSE; - const int *clip_len; - int i; - UINT *order; - - - Charset = -1; /* this flag indicates unicode input */ - /* Test without hdc to get E_PENDING */ - hr = ScriptStringAnalyse( NULL, teststr, len, Glyphs, Charset, Flags, - ReqWidth, &Control, &State, Dx, &Tabdef, - &InClass, &ssa); - ok(hr == E_PENDING, "ScriptStringAnalyse Stub should return E_PENDING not %08x\n", hr); - - /* test with hdc, this should be a valid test */ - hr = ScriptStringAnalyse( hdc, teststr, len, Glyphs, Charset, Flags, - ReqWidth, &Control, &State, Dx, &Tabdef, - &InClass, &ssa); - ok(hr == S_OK, "ScriptStringAnalyse should return S_OK not %08x\n", hr); - ScriptStringFree(&ssa); - - /* test makes sure that a call with a valid pssa still works */ - hr = ScriptStringAnalyse( hdc, teststr, len, Glyphs, Charset, Flags, - ReqWidth, &Control, &State, Dx, &Tabdef, - &InClass, &ssa); - ok(hr == S_OK, "ScriptStringAnalyse should return S_OK not %08x\n", hr); - ok(ssa != NULL, "ScriptStringAnalyse pssa should not be NULL\n"); - - if (hr == S_OK) - { - hr = ScriptStringOut(ssa, X, Y, Options, &rc, MinSel, MaxSel, Disabled); - ok(hr == S_OK, "ScriptStringOut should return S_OK not %08x\n", hr); - } - - clip_len = ScriptString_pcOutChars(ssa); - ok(*clip_len == len, "ScriptString_pcOutChars failed, got %d, expected %d\n", *clip_len, len); - - order = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, *clip_len * sizeof(UINT)); - hr = ScriptStringGetOrder(ssa, order); - ok(hr == S_OK, "ScriptStringGetOrder failed, got %08x, expected S_OK\n", hr); - - for (i = 0; i < *clip_len; i++) ok(order[i] == i, "%d: got %d expected %d\n", i, order[i], i); - HeapFree(GetProcessHeap(), 0, order); - - hr = ScriptStringFree(&ssa); - ok(hr == S_OK, "ScriptStringFree should return S_OK not %08x\n", hr); -} - -static void test_ScriptStringXtoCP_CPtoX(HDC hdc) -{ -/***************************************************************************************** - * - * This test is for the ScriptStringXtoCP and ScriptStringXtoCP functions. Due to the - * nature of the fonts between Windows and Wine, the test is implemented by generating - * values using one one function then checking the output of the second. In this way - * the validity of the functions is established using Windows as a base and confirming - * similar behaviour in wine. - */ - - HRESULT hr; - WCHAR teststr1[] = {'T', 'e', 's', 't', 'e', 'a', 'b', ' ', 'a', '\0'}; - void *String = (WCHAR *) &teststr1; /* ScriptStringAnalysis needs void */ - int String_len = (sizeof(teststr1)/sizeof(WCHAR))-1; - int Glyphs = String_len * 2 + 16; /* size of buffer as recommended */ - int Charset = -1; /* unicode */ - DWORD Flags = SSA_GLYPHS; - int ReqWidth = 100; - SCRIPT_CONTROL Control; - SCRIPT_STATE State; - SCRIPT_TABDEF Tabdef; - const BYTE InClass = 0; - SCRIPT_STRING_ANALYSIS ssa = NULL; - - int Ch; /* Character position in string */ - int iTrailing; - int Cp; /* Character position in string */ - int X; - BOOL fTrailing; - - /* Test with hdc, this should be a valid test - * Here we generate an SCRIPT_STRING_ANALYSIS that will be used as input to the - * following character positions to X and X to character position functions. - */ - memset(&Control, 0, sizeof(SCRIPT_CONTROL)); - memset(&State, 0, sizeof(SCRIPT_STATE)); - memset(&Tabdef, 0, sizeof(SCRIPT_TABDEF)); - - hr = ScriptStringAnalyse( hdc, String, String_len, Glyphs, Charset, Flags, - ReqWidth, &Control, &State, NULL, &Tabdef, - &InClass, &ssa); - ok(hr == S_OK || - hr == E_INVALIDARG, /* NT */ - "ScriptStringAnalyse should return S_OK or E_INVALIDARG not %08x\n", hr); - - if (hr == S_OK) - { - ok(ssa != NULL, "ScriptStringAnalyse ssa should not be NULL\n"); - - /* - * Loop to generate character positions to provide starting positions for the - * ScriptStringCPtoX and ScriptStringXtoCP functions - */ - for (Cp = 0; Cp < String_len; Cp++) - { - /* The fTrailing flag is used to indicate whether the X being returned is at - * the beginning or the end of the character. What happens here is that if - * fTrailing indicates the end of the character, ie. FALSE, then ScriptStringXtoCP - * returns the beginning of the next character and iTrailing is FALSE. So for this - * loop iTrailing will be FALSE in both cases. - */ - fTrailing = FALSE; - hr = ScriptStringCPtoX(ssa, Cp, fTrailing, &X); - ok(hr == S_OK, "ScriptStringCPtoX should return S_OK not %08x\n", hr); - hr = ScriptStringXtoCP(ssa, X, &Ch, &iTrailing); - ok(hr == S_OK, "ScriptStringXtoCP should return S_OK not %08x\n", hr); - ok(Cp == Ch, "ScriptStringXtoCP should return Ch = %d not %d for X = %d\n", Cp, Ch, X); - ok(iTrailing == FALSE, "ScriptStringXtoCP should return iTrailing = 0 not %d for X = %d\n", - iTrailing, X); - fTrailing = TRUE; - hr = ScriptStringCPtoX(ssa, Cp, fTrailing, &X); - ok(hr == S_OK, "ScriptStringCPtoX should return S_OK not %08x\n", hr); - hr = ScriptStringXtoCP(ssa, X, &Ch, &iTrailing); - ok(hr == S_OK, "ScriptStringXtoCP should return S_OK not %08x\n", hr); - - /* - * Check that character position returned by ScriptStringXtoCP in Ch matches the - * one input to ScriptStringCPtoX. This means that the Cp to X position and back - * again works - */ - ok(Cp + 1 == Ch, "ScriptStringXtoCP should return Ch = %d not %d for X = %d\n", Cp + 1, Ch, X); - ok(iTrailing == FALSE, "ScriptStringXtoCP should return iTrailing = 0 not %d for X = %d\n", - iTrailing, X); - } - /* - * This test is to check that if the X position is just inside the trailing edge of the - * character then iTrailing will indicate the trailing edge, ie. TRUE - */ - fTrailing = TRUE; - Cp = 3; - hr = ScriptStringCPtoX(ssa, Cp, fTrailing, &X); - ok(hr == S_OK, "ScriptStringCPtoX should return S_OK not %08x\n", hr); - X--; /* put X just inside the trailing edge */ - hr = ScriptStringXtoCP(ssa, X, &Ch, &iTrailing); - ok(hr == S_OK, "ScriptStringXtoCP should return S_OK not %08x\n", hr); - ok(Cp == Ch, "ScriptStringXtoCP should return Ch = %d not %d for X = %d\n", Cp, Ch, X); - ok(iTrailing == TRUE, "ScriptStringXtoCP should return iTrailing = 1 not %d for X = %d\n", - iTrailing, X); - - /* - * This test is to check that if the X position is just outside the trailing edge of the - * character then iTrailing will indicate the leading edge, ie. FALSE, and Ch will indicate - * the next character, ie. Cp + 1 - */ - fTrailing = TRUE; - Cp = 3; - hr = ScriptStringCPtoX(ssa, Cp, fTrailing, &X); - ok(hr == S_OK, "ScriptStringCPtoX should return S_OK not %08x\n", hr); - X++; /* put X just outside the trailing edge */ - hr = ScriptStringXtoCP(ssa, X, &Ch, &iTrailing); - ok(hr == S_OK, "ScriptStringXtoCP should return S_OK not %08x\n", hr); - ok(Cp + 1 == Ch, "ScriptStringXtoCP should return Ch = %d not %d for X = %d\n", Cp + 1, Ch, X); - ok(iTrailing == FALSE, "ScriptStringXtoCP should return iTrailing = 0 not %d for X = %d\n", - iTrailing, X); - - /* - * This test is to check that if the X position is just outside the leading edge of the - * character then iTrailing will indicate the trailing edge, ie. TRUE, and Ch will indicate - * the next character down , ie. Cp - 1 - */ - fTrailing = FALSE; - Cp = 3; - hr = ScriptStringCPtoX(ssa, Cp, fTrailing, &X); - ok(hr == S_OK, "ScriptStringCPtoX should return S_OK not %08x\n", hr); - X--; /* put X just outside the leading edge */ - hr = ScriptStringXtoCP(ssa, X, &Ch, &iTrailing); - ok(hr == S_OK, "ScriptStringXtoCP should return S_OK not %08x\n", hr); - ok(Cp - 1 == Ch, "ScriptStringXtoCP should return Ch = %d not %d for X = %d\n", Cp - 1, Ch, X); - ok(iTrailing == TRUE, "ScriptStringXtoCP should return iTrailing = 1 not %d for X = %d\n", - iTrailing, X); - - /* - * Cleanup the SSA for the next round of tests - */ - hr = ScriptStringFree(&ssa); - ok(hr == S_OK, "ScriptStringFree should return S_OK not %08x\n", hr); - - /* - * Test to see that exceeding the number of chars returns E_INVALIDARG. First - * generate an SSA for the subsequent tests. - */ - hr = ScriptStringAnalyse( hdc, String, String_len, Glyphs, Charset, Flags, - ReqWidth, &Control, &State, NULL, &Tabdef, - &InClass, &ssa); - ok(hr == S_OK, "ScriptStringAnalyse should return S_OK not %08x\n", hr); - - /* - * When ScriptStringCPtoX is called with a character position Cp that exceeds the - * string length, return E_INVALIDARG. This also invalidates the ssa so a - * ScriptStringFree should also fail. - */ - fTrailing = FALSE; - Cp = String_len + 1; - hr = ScriptStringCPtoX(ssa, Cp, fTrailing, &X); - ok(hr == E_INVALIDARG, "ScriptStringCPtoX should return E_INVALIDARG not %08x\n", hr); - - ScriptStringFree(&ssa); - } -} - -static void test_ScriptCacheGetHeight(HDC hdc) -{ - HRESULT hr; - SCRIPT_CACHE sc = NULL; - LONG height; - - hr = ScriptCacheGetHeight(NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08x\n", hr); - - hr = ScriptCacheGetHeight(NULL, &sc, NULL); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08x\n", hr); - - hr = ScriptCacheGetHeight(NULL, &sc, &height); - ok(hr == E_PENDING, "expected E_PENDING, got 0x%08x\n", hr); - - height = 0; - - hr = ScriptCacheGetHeight(hdc, &sc, &height); - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); - ok(height > 0, "expected height > 0\n"); - - ScriptFreeCache(&sc); -} - -static void test_ScriptGetGlyphABCWidth(HDC hdc) -{ - HRESULT hr; - SCRIPT_CACHE sc = NULL; - ABC abc; - - hr = ScriptGetGlyphABCWidth(NULL, NULL, 'a', NULL); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08x\n", hr); - - hr = ScriptGetGlyphABCWidth(NULL, &sc, 'a', NULL); - ok(broken(hr == E_PENDING) || - hr == E_INVALIDARG, /* WIN7 */ - "expected E_INVALIDARG, got 0x%08x\n", hr); - - hr = ScriptGetGlyphABCWidth(NULL, &sc, 'a', &abc); - ok(hr == E_PENDING, "expected E_PENDING, got 0x%08x\n", hr); - - if (0) { /* crashes on WinXP */ - hr = ScriptGetGlyphABCWidth(hdc, &sc, 'a', NULL); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08x\n", hr); - } - - hr = ScriptGetGlyphABCWidth(hdc, &sc, 'a', &abc); - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); - - ScriptFreeCache(&sc); -} - -static void test_ScriptLayout(void) -{ - HRESULT hr; - static const BYTE levels[][10] = - { - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, - { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }, - { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 }, - - { 0, 0, 0, 0, 0, 1, 1, 1, 1, 1}, - { 1, 1, 1, 2, 2, 2, 1, 1, 1, 1 }, - { 2, 2, 2, 1, 1, 1, 2, 2, 2, 2 }, - { 0, 0, 1, 1, 2, 2, 1, 1, 0, 0 }, - { 1, 1, 2, 2, 3, 3, 2, 2, 1, 1 }, - - { 0, 0, 1, 1, 2, 2, 1, 1, 0, 1 }, - { 1, 0, 1, 2, 2, 1, 2, 1, 0, 1 }, - }; - static const int expect_l2v[][10] = - { - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }, - { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }, - { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, - - { 0, 1, 2, 3, 4, 9, 8 ,7 ,6, 5}, -/**/ { 9, 8, 7, 4, 5, 6, 3 ,2 ,1, 0}, -/**/ { 7, 8, 9, 6, 5, 4, 0 ,1 ,2, 3}, - { 0, 1, 7, 6, 4, 5, 3 ,2 ,8, 9}, - { 9, 8, 2, 3, 5, 4, 6 ,7 ,1, 0}, - - { 0, 1, 7, 6, 4, 5, 3 ,2 ,8, 9}, -/**/ { 0, 1, 7, 5, 6, 4, 3 ,2 ,8, 9}, - }; - static const int expect_v2l[][10] = - { - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }, - { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }, - { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, - - { 0, 1, 2, 3, 4, 9, 8 ,7 ,6, 5}, - { 9, 8, 7, 6, 3, 4, 5 ,2 ,1, 0}, - { 6, 7, 8, 9, 5, 4, 3 ,0 ,1, 2}, - { 0, 1, 7, 6, 4, 5, 3 ,2 ,8, 9}, - { 9, 8, 2, 3, 5, 4, 6 ,7 ,1, 0}, - - { 0, 1, 7, 6, 4, 5, 3 ,2 ,8, 9}, - { 0, 1, 7, 6, 5, 3, 4 ,2 ,8, 9}, - }; - - int i, j, vistolog[sizeof(levels[0])], logtovis[sizeof(levels[0])]; - - hr = ScriptLayout(sizeof(levels[0]), NULL, vistolog, logtovis); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08x\n", hr); - - hr = ScriptLayout(sizeof(levels[0]), levels[0], NULL, NULL); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08x\n", hr); - - for (i = 0; i < sizeof(levels)/sizeof(levels[0]); i++) - { - hr = ScriptLayout(sizeof(levels[0]), levels[i], vistolog, logtovis); - ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); - - for (j = 0; j < sizeof(levels[i]); j++) - { - ok(expect_v2l[i][j] == vistolog[j], - "failure: levels[%d][%d] = %d, vistolog[%d] = %d\n", - i, j, levels[i][j], j, vistolog[j] ); - } - - for (j = 0; j < sizeof(levels[i]); j++) - { - ok(expect_l2v[i][j] == logtovis[j], - "failure: levels[%d][%d] = %d, logtovis[%d] = %d\n", - i, j, levels[i][j], j, logtovis[j] ); - } - } -} - -static BOOL CALLBACK enum_proc(LGRPID group, LCID lcid, LPSTR locale, LONG_PTR lparam) -{ - HRESULT hr; - SCRIPT_DIGITSUBSTITUTE sds; - SCRIPT_CONTROL sc; - SCRIPT_STATE ss; - LCID lcid_old; - - if (!IsValidLocale(lcid, LCID_INSTALLED)) return TRUE; - - memset(&sds, 0, sizeof(sds)); - memset(&sc, 0, sizeof(sc)); - memset(&ss, 0, sizeof(ss)); - - lcid_old = GetThreadLocale(); - if (!SetThreadLocale(lcid)) return TRUE; - - hr = ScriptRecordDigitSubstitution(lcid, &sds); - ok(hr == S_OK, "ScriptRecordDigitSubstitution failed: 0x%08x\n", hr); - - hr = ScriptApplyDigitSubstitution(&sds, &sc, &ss); - ok(hr == S_OK, "ScriptApplyDigitSubstitution failed: 0x%08x\n", hr); - - SetThreadLocale(lcid_old); - return TRUE; -} - -static void test_digit_substitution(void) -{ - BOOL ret; - unsigned int i; - static const LGRPID groups[] = - { - LGRPID_WESTERN_EUROPE, - LGRPID_CENTRAL_EUROPE, - LGRPID_BALTIC, - LGRPID_GREEK, - LGRPID_CYRILLIC, - LGRPID_TURKISH, - LGRPID_JAPANESE, - LGRPID_KOREAN, - LGRPID_TRADITIONAL_CHINESE, - LGRPID_SIMPLIFIED_CHINESE, - LGRPID_THAI, - LGRPID_HEBREW, - LGRPID_ARABIC, - LGRPID_VIETNAMESE, - LGRPID_INDIC, - LGRPID_GEORGIAN, - LGRPID_ARMENIAN - }; - HMODULE hKernel32; - static BOOL (WINAPI * pEnumLanguageGroupLocalesA)(LANGGROUPLOCALE_ENUMPROCA,LGRPID,DWORD,LONG_PTR); - - hKernel32 = GetModuleHandleA("kernel32.dll"); - pEnumLanguageGroupLocalesA = (void*)GetProcAddress(hKernel32, "EnumLanguageGroupLocalesA"); - - if (!pEnumLanguageGroupLocalesA) - { - win_skip("EnumLanguageGroupLocalesA not available on this platform\n"); - return; - } - - for (i = 0; i < sizeof(groups)/sizeof(groups[0]); i++) - { - ret = pEnumLanguageGroupLocalesA(enum_proc, groups[i], 0, 0); - if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("EnumLanguageGroupLocalesA not implemented on this platform\n"); - break; - } - - ok(ret, "EnumLanguageGroupLocalesA failed unexpectedly: %u\n", GetLastError()); - } -} - -static void test_ScriptGetProperties(void) -{ - const SCRIPT_PROPERTIES **props; - HRESULT hr; - int num; - - hr = ScriptGetProperties(NULL, NULL); - ok(hr == E_INVALIDARG, "ScriptGetProperties succeeded\n"); - - hr = ScriptGetProperties(NULL, &num); - ok(hr == S_OK, "ScriptGetProperties failed: 0x%08x\n", hr); - - hr = ScriptGetProperties(&props, NULL); - ok(hr == S_OK, "ScriptGetProperties failed: 0x%08x\n", hr); - - hr = ScriptGetProperties(&props, &num); - ok(hr == S_OK, "ScriptGetProperties failed: 0x%08x\n", hr); -} - -static void test_ScriptBreak(void) -{ - static const WCHAR test[] = {' ','\r','\n',0}; - SCRIPT_ITEM items[4]; - SCRIPT_LOGATTR la; - HRESULT hr; - - hr = ScriptItemize(test, 3, 4, NULL, NULL, items, NULL); - ok(!hr, "ScriptItemize should return S_OK not %08x\n", hr); - - memset(&la, 0, sizeof(la)); - hr = ScriptBreak(test, 1, &items[0].a, &la); - ok(!hr, "ScriptBreak should return S_OK not %08x\n", hr); - - ok(!la.fSoftBreak, "fSoftBreak set\n"); - ok(la.fWhiteSpace, "fWhiteSpace not set\n"); - ok(la.fCharStop, "fCharStop not set\n"); - ok(!la.fWordStop, "fWordStop set\n"); - ok(!la.fInvalid, "fInvalid set\n"); - ok(!la.fReserved, "fReserved set\n"); - - memset(&la, 0, sizeof(la)); - hr = ScriptBreak(test + 1, 1, &items[1].a, &la); - ok(!hr, "ScriptBreak should return S_OK not %08x\n", hr); - - ok(!la.fSoftBreak, "fSoftBreak set\n"); - ok(!la.fWhiteSpace, "fWhiteSpace set\n"); - ok(la.fCharStop, "fCharStop not set\n"); - ok(!la.fWordStop, "fWordStop set\n"); - ok(!la.fInvalid, "fInvalid set\n"); - ok(!la.fReserved, "fReserved set\n"); - - memset(&la, 0, sizeof(la)); - hr = ScriptBreak(test + 2, 1, &items[2].a, &la); - ok(!hr, "ScriptBreak should return S_OK not %08x\n", hr); - - ok(!la.fSoftBreak, "fSoftBreak set\n"); - ok(!la.fWhiteSpace, "fWhiteSpace set\n"); - ok(la.fCharStop, "fCharStop not set\n"); - ok(!la.fWordStop, "fWordStop set\n"); - ok(!la.fInvalid, "fInvalid set\n"); - ok(!la.fReserved, "fReserved set\n"); -} - -static void test_newlines(void) -{ - static const WCHAR test1[] = {'t','e','x','t','\r','t','e','x','t',0}; - static const WCHAR test2[] = {'t','e','x','t','\n','t','e','x','t',0}; - static const WCHAR test3[] = {'t','e','x','t','\r','\n','t','e','x','t',0}; - static const WCHAR test4[] = {'t','e','x','t','\n','\r','t','e','x','t',0}; - static const WCHAR test5[] = {'1','2','3','4','\n','\r','1','2','3','4',0}; - SCRIPT_ITEM items[5]; - HRESULT hr; - int count; - - count = 0; - hr = ScriptItemize(test1, lstrlenW(test1), 5, NULL, NULL, items, &count); - ok(hr == S_OK, "ScriptItemize failed: 0x%08x\n", hr); - ok(count == 3, "got %d expected 3\n", count); - - count = 0; - hr = ScriptItemize(test2, lstrlenW(test2), 5, NULL, NULL, items, &count); - ok(hr == S_OK, "ScriptItemize failed: 0x%08x\n", hr); - ok(count == 3, "got %d expected 3\n", count); - - count = 0; - hr = ScriptItemize(test3, lstrlenW(test3), 5, NULL, NULL, items, &count); - ok(hr == S_OK, "ScriptItemize failed: 0x%08x\n", hr); - ok(count == 4, "got %d expected 4\n", count); - - count = 0; - hr = ScriptItemize(test4, lstrlenW(test4), 5, NULL, NULL, items, &count); - ok(hr == S_OK, "ScriptItemize failed: 0x%08x\n", hr); - ok(count == 4, "got %d expected 4\n", count); - - count = 0; - hr = ScriptItemize(test5, lstrlenW(test5), 5, NULL, NULL, items, &count); - ok(hr == S_OK, "ScriptItemize failed: 0x%08x\n", hr); - ok(count == 4, "got %d expected 4\n", count); -} - -START_TEST(usp10) -{ - HWND hwnd; - HDC hdc; - LOGFONTA lf; - HFONT hfont; - - unsigned short pwOutGlyphs[256]; - - /* We need a valid HDC to drive a lot of Script functions which requires the following * - * to set up for the tests. */ - hwnd = CreateWindowExA(0, "static", "", WS_POPUP, 0,0,100,100, - 0, 0, 0, NULL); - assert(hwnd != 0); - ShowWindow(hwnd, SW_SHOW); - UpdateWindow(hwnd); - - hdc = GetDC(hwnd); /* We now have a hdc */ - ok( hdc != NULL, "HDC failed to be created %p\n", hdc); - - memset(&lf, 0, sizeof(LOGFONTA)); - lstrcpyA(lf.lfFaceName, "Tahoma"); - lf.lfHeight = 10; - lf.lfWeight = 3; - lf.lfWidth = 10; - - hfont = SelectObject(hdc, CreateFontIndirectA(&lf)); - ok(hfont != NULL, "SelectObject failed: %p\n", hfont); - - test_ScriptItemize(); - test_ScriptItemIzeShapePlace(hdc,pwOutGlyphs); - test_ScriptGetCMap(hdc, pwOutGlyphs); - test_ScriptCacheGetHeight(hdc); - test_ScriptGetGlyphABCWidth(hdc); - test_ScriptShape(hdc); - test_ScriptPlace(hdc); - - test_ScriptGetFontProperties(hdc); - test_ScriptTextOut(hdc); - test_ScriptTextOut2(hdc); - test_ScriptTextOut3(hdc); - test_ScriptXtoX(); - test_ScriptString(hdc); - test_ScriptStringXtoCP_CPtoX(hdc); - - test_ScriptLayout(); - test_digit_substitution(); - test_ScriptGetProperties(); - test_ScriptBreak(); - test_newlines(); - - ReleaseDC(hwnd, hdc); - DestroyWindow(hwnd); -} diff --git a/rostests/winetests/usp10/usp10.rbuild b/rostests/winetests/usp10/usp10.rbuild deleted file mode 100644 index 94457b5edd8..00000000000 --- a/rostests/winetests/usp10/usp10.rbuild +++ /dev/null @@ -1,15 +0,0 @@ - - - - - . - - usp10.c - testlist.c - wine - usp10 - user32 - gdi32 - ntdll - - diff --git a/rostests/winetests/uxtheme/CMakeLists.txt b/rostests/winetests/uxtheme/CMakeLists.txt deleted file mode 100644 index fe60e586a89..00000000000 --- a/rostests/winetests/uxtheme/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -add_executable(uxtheme_winetest system.c testlist.c) -target_link_libraries(uxtheme_winetest wine) -set_module_type(uxtheme_winetest win32cui) -add_importlibs(uxtheme_winetest user32 msvcrt kernel32 ntdll) -add_cd_file(TARGET uxtheme_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/uxtheme/system.c b/rostests/winetests/uxtheme/system.c deleted file mode 100644 index ad277a08192..00000000000 --- a/rostests/winetests/uxtheme/system.c +++ /dev/null @@ -1,510 +0,0 @@ -/* Unit test suite for uxtheme API functions - * - * Copyright 2006 Paul Vriens - * - * 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 "windows.h" -#include "vfwmsgs.h" -#include "uxtheme.h" - -#include "wine/test.h" - -static HRESULT (WINAPI * pCloseThemeData)(HTHEME); -static HRESULT (WINAPI * pGetCurrentThemeName)(LPWSTR, int, LPWSTR, int, LPWSTR, int); -static HTHEME (WINAPI * pGetWindowTheme)(HWND); -static BOOL (WINAPI * pIsAppThemed)(VOID); -static BOOL (WINAPI * pIsThemeActive)(VOID); -static BOOL (WINAPI * pIsThemePartDefined)(HTHEME, int, int); -static HTHEME (WINAPI * pOpenThemeData)(HWND, LPCWSTR); -static HRESULT (WINAPI * pSetWindowTheme)(HWND, LPCWSTR, LPCWSTR); - -static HMODULE hUxtheme = 0; - -#define UXTHEME_GET_PROC(func) \ - p ## func = (void*)GetProcAddress(hUxtheme, #func); \ - if(!p ## func) { \ - trace("GetProcAddress(%s) failed\n", #func); \ - FreeLibrary(hUxtheme); \ - return FALSE; \ - } - -static BOOL InitFunctionPtrs(void) -{ - hUxtheme = LoadLibraryA("uxtheme.dll"); - if(!hUxtheme) { - trace("Could not load uxtheme.dll\n"); - return FALSE; - } - if (hUxtheme) - { - UXTHEME_GET_PROC(CloseThemeData) - UXTHEME_GET_PROC(GetCurrentThemeName) - UXTHEME_GET_PROC(GetWindowTheme) - UXTHEME_GET_PROC(IsAppThemed) - UXTHEME_GET_PROC(IsThemeActive) - UXTHEME_GET_PROC(IsThemePartDefined) - UXTHEME_GET_PROC(OpenThemeData) - UXTHEME_GET_PROC(SetWindowTheme) - } - /* The following functions should be available, if not return FALSE. The Vista functions will - * be checked (at some point in time) within the single tests if needed. All used functions for - * now are present on WinXP, W2K3 and Wine. - */ - if (!pCloseThemeData || !pGetCurrentThemeName || - !pGetWindowTheme || !pIsAppThemed || - !pIsThemeActive || !pIsThemePartDefined || - !pOpenThemeData || !pSetWindowTheme) - return FALSE; - - return TRUE; -} - -static void test_IsThemed(void) -{ - BOOL bThemeActive; - BOOL bAppThemed; - BOOL bTPDefined; - - SetLastError(0xdeadbeef); - bThemeActive = pIsThemeActive(); - trace("Theming is %s\n", (bThemeActive) ? "active" : "inactive"); - - /* This test is not themed */ - SetLastError(0xdeadbeef); - bAppThemed = pIsAppThemed(); - - if (bThemeActive) - todo_wine - ok( bAppThemed == FALSE, "Expected FALSE as this test executable is not (yet) themed.\n"); - else - /* Although Wine currently returns FALSE, the logic behind it is wrong. It is not a todo_wine though in the testing sense */ - ok( bAppThemed == FALSE, "Expected FALSE as this test executable is not (yet) themed.\n"); - - ok( GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got 0x%08x\n", - GetLastError()); - - SetLastError(0xdeadbeef); - bTPDefined = pIsThemePartDefined(NULL, 0 , 0); - ok( bTPDefined == FALSE, "Expected FALSE\n"); - ok( GetLastError() == E_HANDLE, - "Expected E_HANDLE, got 0x%08x\n", - GetLastError()); -} - -static void test_GetWindowTheme(void) -{ - HTHEME hTheme; - HWND hWnd; - BOOL bDestroyed; - - SetLastError(0xdeadbeef); - hTheme = pGetWindowTheme(NULL); - ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - todo_wine - ok( GetLastError() == E_HANDLE, - "Expected E_HANDLE, got 0x%08x\n", - GetLastError()); - - /* Only do the bare minimum to get a valid hwnd */ - hWnd = CreateWindowExA(0, "static", "", WS_POPUP, 0,0,100,100,0, 0, 0, NULL); - if (!hWnd) return; - - SetLastError(0xdeadbeef); - hTheme = pGetWindowTheme(hWnd); - ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - ok( GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got 0x%08x\n", - GetLastError()); - - bDestroyed = DestroyWindow(hWnd); - if (!bDestroyed) - trace("Window %p couldn't be destroyed : 0x%08x\n", - hWnd, GetLastError()); -} - -static void test_SetWindowTheme(void) -{ - HRESULT hRes; - HWND hWnd; - BOOL bDestroyed; - - SetLastError(0xdeadbeef); - hRes = pSetWindowTheme(NULL, NULL, NULL); - todo_wine - { - ok( hRes == E_HANDLE, "Expected E_HANDLE, got 0x%08x\n", hRes); - ok( GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got 0x%08x\n", - GetLastError()); - } - - /* Only do the bare minimum to get a valid hwnd */ - hWnd = CreateWindowExA(0, "static", "", WS_POPUP, 0,0,100,100,0, 0, 0, NULL); - if (!hWnd) return; - - SetLastError(0xdeadbeef); - hRes = pSetWindowTheme(hWnd, NULL, NULL); - ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes); - ok( GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got 0x%08x\n", - GetLastError()); - - bDestroyed = DestroyWindow(hWnd); - if (!bDestroyed) - trace("Window %p couldn't be destroyed : 0x%08x\n", - hWnd, GetLastError()); -} - -static void test_OpenThemeData(void) -{ - HTHEME hTheme, hTheme2; - HWND hWnd; - BOOL bThemeActive; - HRESULT hRes; - BOOL bDestroyed; - BOOL bTPDefined; - - WCHAR szInvalidClassList[] = {'D','E','A','D','B','E','E','F', 0 }; - WCHAR szButtonClassList[] = {'B','u','t','t','o','n', 0 }; - WCHAR szButtonClassList2[] = {'b','U','t','T','o','N', 0 }; - WCHAR szClassList[] = {'B','u','t','t','o','n',';','L','i','s','t','B','o','x', 0 }; - - bThemeActive = pIsThemeActive(); - - /* All NULL */ - SetLastError(0xdeadbeef); - hTheme = pOpenThemeData(NULL, NULL); - ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - todo_wine - ok( GetLastError() == E_POINTER, - "Expected GLE() to be E_POINTER, got 0x%08x\n", - GetLastError()); - - /* A NULL hWnd and an invalid classlist */ - SetLastError(0xdeadbeef); - hTheme = pOpenThemeData(NULL, szInvalidClassList); - ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - todo_wine - ok( GetLastError() == E_PROP_ID_UNSUPPORTED, - "Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n", - GetLastError()); - - SetLastError(0xdeadbeef); - hTheme = pOpenThemeData(NULL, szClassList); - if (bThemeActive) - { - ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - todo_wine - ok( GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got 0x%08x\n", - GetLastError()); - } - else - { - ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - todo_wine - ok( GetLastError() == E_PROP_ID_UNSUPPORTED, - "Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n", - GetLastError()); - } - - /* Only do the bare minimum to get a valid hdc */ - hWnd = CreateWindowExA(0, "static", "", WS_POPUP, 0,0,100,100,0, 0, 0, NULL); - if (!hWnd) return; - - SetLastError(0xdeadbeef); - hTheme = pOpenThemeData(hWnd, NULL); - ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - todo_wine - ok( GetLastError() == E_POINTER, - "Expected GLE() to be E_POINTER, got 0x%08x\n", - GetLastError()); - - SetLastError(0xdeadbeef); - hTheme = pOpenThemeData(hWnd, szInvalidClassList); - ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - todo_wine - ok( GetLastError() == E_PROP_ID_UNSUPPORTED, - "Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n", - GetLastError()); - - if (!bThemeActive) - { - SetLastError(0xdeadbeef); - hTheme = pOpenThemeData(hWnd, szButtonClassList); - ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - todo_wine - ok( GetLastError() == E_PROP_ID_UNSUPPORTED, - "Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n", - GetLastError()); - skip("No active theme, skipping rest of OpenThemeData tests\n"); - return; - } - - /* Only do the next checks if we have an active theme */ - - SetLastError(0xdeadbeef); - hTheme = pOpenThemeData(hWnd, szButtonClassList); - ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - todo_wine - ok( GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got 0x%08x\n", - GetLastError()); - - /* Test with bUtToN instead of Button */ - SetLastError(0xdeadbeef); - hTheme = pOpenThemeData(hWnd, szButtonClassList2); - ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - todo_wine - ok( GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got 0x%08x\n", - GetLastError()); - - SetLastError(0xdeadbeef); - hTheme = pOpenThemeData(hWnd, szClassList); - ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - todo_wine - ok( GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got 0x%08x\n", - GetLastError()); - - /* GetWindowTheme should return the last handle opened by OpenThemeData */ - SetLastError(0xdeadbeef); - hTheme2 = pGetWindowTheme(hWnd); - ok( hTheme == hTheme2, "Expected the same HTHEME handle (%p<->%p)\n", - hTheme, hTheme2); - ok( GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got 0x%08x\n", - GetLastError()); - - SetLastError(0xdeadbeef); - hRes = pCloseThemeData(hTheme); - ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes); - ok( GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got 0x%08x\n", - GetLastError()); - - /* Close a second time */ - SetLastError(0xdeadbeef); - hRes = pCloseThemeData(hTheme); - ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes); - ok( GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got 0x%08x\n", - GetLastError()); - - /* See if closing makes a difference for GetWindowTheme */ - SetLastError(0xdeadbeef); - hTheme2 = NULL; - hTheme2 = pGetWindowTheme(hWnd); - ok( hTheme == hTheme2, "Expected the same HTHEME handle (%p<->%p)\n", - hTheme, hTheme2); - ok( GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got 0x%08x\n", - GetLastError()); - - SetLastError(0xdeadbeef); - bTPDefined = pIsThemePartDefined(hTheme, 0 , 0); - todo_wine - { - ok( bTPDefined == FALSE, "Expected FALSE\n"); - ok( GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got 0x%08x\n", - GetLastError()); - } - - bDestroyed = DestroyWindow(hWnd); - if (!bDestroyed) - trace("Window %p couldn't be destroyed : 0x%08x\n", - hWnd, GetLastError()); -} - -static void test_GetCurrentThemeName(void) -{ - BOOL bThemeActive; - HRESULT hRes; - WCHAR currentTheme[MAX_PATH]; - WCHAR currentColor[MAX_PATH]; - WCHAR currentSize[MAX_PATH]; - - bThemeActive = pIsThemeActive(); - - /* All NULLs */ - SetLastError(0xdeadbeef); - hRes = pGetCurrentThemeName(NULL, 0, NULL, 0, NULL, 0); - if (bThemeActive) - ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes); - else - ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes); - ok( GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got 0x%08x\n", - GetLastError()); - - /* Number of characters given is 0 */ - SetLastError(0xdeadbeef); - hRes = pGetCurrentThemeName(currentTheme, 0, NULL, 0, NULL, 0); - if (bThemeActive) - ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes); - else - ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes); - ok( GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got 0x%08x\n", - GetLastError()); - - /* When the number of characters given is too small (not 0, see above), GetCurrentThemeName returns 0x8007007a. - * The only definition I found was in strsafe.h: - * - * #define STRSAFE_E_INSUFFICIENT_BUFFER ((HRESULT)0x8007007AL) // 0x7A = 122L = ERROR_INSUFFICIENT_BUFFER - */ - SetLastError(0xdeadbeef); - hRes = pGetCurrentThemeName(currentTheme, 2, NULL, 0, NULL, 0); - if (bThemeActive) - todo_wine - ok(hRes == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), "Expected HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), got 0x%08x\n", hRes); - else - ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes); - ok( GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got 0x%08x\n", - GetLastError()); - - /* The same is true if the number of characters is too small for Color and/or Size */ - SetLastError(0xdeadbeef); - hRes = pGetCurrentThemeName(currentTheme, sizeof(currentTheme) / sizeof(WCHAR), - currentColor, 2, - currentSize, sizeof(currentSize) / sizeof(WCHAR)); - if (bThemeActive) - todo_wine - ok(hRes == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), "Expected HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), got 0x%08x\n", hRes); - else - ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes); - ok( GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got 0x%08x\n", - GetLastError()); - - /* Given number of characters is correct */ - SetLastError(0xdeadbeef); - hRes = pGetCurrentThemeName(currentTheme, sizeof(currentTheme) / sizeof(WCHAR), NULL, 0, NULL, 0); - if (bThemeActive) - ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes); - else - ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes); - ok( GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got 0x%08x\n", - GetLastError()); - - /* Given number of characters for the theme name is too large */ - SetLastError(0xdeadbeef); - hRes = pGetCurrentThemeName(currentTheme, sizeof(currentTheme), NULL, 0, NULL, 0); - if (bThemeActive) - ok( hRes == E_POINTER || hRes == S_OK, "Expected E_POINTER or S_OK, got 0x%08x\n", hRes); - else - ok( hRes == E_PROP_ID_UNSUPPORTED || - hRes == E_POINTER, /* win2k3 */ - "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes); - ok( GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got 0x%08x\n", - GetLastError()); - - /* The too large case is only for the theme name, not for color name or size name */ - SetLastError(0xdeadbeef); - hRes = pGetCurrentThemeName(currentTheme, sizeof(currentTheme) / sizeof(WCHAR), - currentColor, sizeof(currentTheme), - currentSize, sizeof(currentSize) / sizeof(WCHAR)); - if (bThemeActive) - ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes); - else - ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes); - ok( GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got 0x%08x\n", - GetLastError()); - - SetLastError(0xdeadbeef); - hRes = pGetCurrentThemeName(currentTheme, sizeof(currentTheme) / sizeof(WCHAR), - currentColor, sizeof(currentTheme) / sizeof(WCHAR), - currentSize, sizeof(currentSize)); - if (bThemeActive) - ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes); - else - ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes); - ok( GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got 0x%08x\n", - GetLastError()); - - /* Correct call */ - SetLastError(0xdeadbeef); - hRes = pGetCurrentThemeName(currentTheme, sizeof(currentTheme) / sizeof(WCHAR), - currentColor, sizeof(currentColor) / sizeof(WCHAR), - currentSize, sizeof(currentSize) / sizeof(WCHAR)); - if (bThemeActive) - ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes); - else - ok( hRes == E_PROP_ID_UNSUPPORTED, "Expected E_PROP_ID_UNSUPPORTED, got 0x%08x\n", hRes); - ok( GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got 0x%08x\n", - GetLastError()); -} - -static void test_CloseThemeData(void) -{ - HRESULT hRes; - - SetLastError(0xdeadbeef); - hRes = pCloseThemeData(NULL); - ok( hRes == E_HANDLE, "Expected E_HANDLE, got 0x%08x\n", hRes); - ok( GetLastError() == 0xdeadbeef, - "Expected 0xdeadbeef, got 0x%08x\n", - GetLastError()); -} - -START_TEST(system) -{ - if(!InitFunctionPtrs()) - return; - - /* No real functional tests will be done (yet). The current tests - * only show input/return behaviour - */ - - /* IsThemeActive, IsAppThemed and IsThemePartDefined*/ - trace("Starting test_IsThemed()\n"); - test_IsThemed(); - - /* GetWindowTheme */ - trace("Starting test_GetWindowTheme()\n"); - test_GetWindowTheme(); - - /* SetWindowTheme */ - trace("Starting test_SetWindowTheme()\n"); - test_SetWindowTheme(); - - /* OpenThemeData, a bit more functional now */ - trace("Starting test_OpenThemeData()\n"); - test_OpenThemeData(); - - /* GetCurrentThemeName */ - trace("Starting test_GetCurrentThemeName()\n"); - test_GetCurrentThemeName(); - - /* CloseThemeData */ - trace("Starting test_CloseThemeData()\n"); - test_CloseThemeData(); - - FreeLibrary(hUxtheme); -} diff --git a/rostests/winetests/uxtheme/testlist.c b/rostests/winetests/uxtheme/testlist.c deleted file mode 100644 index 1b651a6f1f7..00000000000 --- a/rostests/winetests/uxtheme/testlist.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_system(void); - -const struct test winetest_testlist[] = -{ - { "system", func_system }, - { 0, 0 } -}; diff --git a/rostests/winetests/uxtheme/uxtheme.rbuild b/rostests/winetests/uxtheme/uxtheme.rbuild deleted file mode 100644 index 8876207bb33..00000000000 --- a/rostests/winetests/uxtheme/uxtheme.rbuild +++ /dev/null @@ -1,13 +0,0 @@ - - - - - . - - system.c - testlist.c - wine - user32 - ntdll - - diff --git a/rostests/winetests/version/CMakeLists.txt b/rostests/winetests/version/CMakeLists.txt deleted file mode 100644 index 10a61df6e50..00000000000 --- a/rostests/winetests/version/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ - -add_definitions( - -D__ROS_LONG64__ - -D_DLL -D__USE_CRTIMP) - -list(APPEND SOURCE - info.c - install.c - version.rc - testlist.c) - -add_executable(version_winetest ${SOURCE}) -target_link_libraries(version_winetest wine) -set_module_type(version_winetest win32cui) -add_importlibs(version_winetest version msvcrt kernel32 ntdll) -add_cd_file(TARGET version_winetest DESTINATION reactos/bin FOR all) diff --git a/rostests/winetests/version/info.c b/rostests/winetests/version/info.c deleted file mode 100644 index edf607c9120..00000000000 --- a/rostests/winetests/version/info.c +++ /dev/null @@ -1,588 +0,0 @@ -/* - * Copyright (C) 2004 Stefan Leichter - * - * 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 "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "winver.h" -#include "wine/test.h" - -#define MY_LAST_ERROR ((DWORD)-1) -#define EXPECT_BAD_PATH__NOT_FOUND \ - ok( (ERROR_PATH_NOT_FOUND == GetLastError()) || \ - (ERROR_RESOURCE_DATA_NOT_FOUND == GetLastError()) || \ - (ERROR_FILE_NOT_FOUND == GetLastError()) || \ - (ERROR_BAD_PATHNAME == GetLastError()) || \ - (ERROR_SUCCESS == GetLastError()), \ - "Last error wrong! ERROR_RESOURCE_DATA_NOT_FOUND/ERROR_BAD_PATHNAME (98)/" \ - "ERROR_PATH_NOT_FOUND (NT4)/ERROR_FILE_NOT_FOUND (2k3) " \ - "ERROR_SUCCESS (2k) expected, got %u\n", GetLastError()); -#define EXPECT_INVALID__NOT_FOUND \ - ok( (ERROR_PATH_NOT_FOUND == GetLastError()) || \ - (ERROR_RESOURCE_DATA_NOT_FOUND == GetLastError()) || \ - (ERROR_FILE_NOT_FOUND == GetLastError()) || \ - (ERROR_INVALID_PARAMETER == GetLastError()) || \ - (ERROR_SUCCESS == GetLastError()), \ - "Last error wrong! ERROR_RESOURCE_DATA_NOT_FOUND/ERROR_INVALID_PARAMETER (98)/" \ - "ERROR_PATH_NOT_FOUND (NT4)/ERROR_FILE_NOT_FOUND (2k3) " \ - "ERROR_SUCCESS (2k) expected, got %u\n", GetLastError()); - -static void create_file(const CHAR *name) -{ - HANDLE file; - DWORD written; - - file = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "Failure to open file %s\n", name); - WriteFile(file, name, strlen(name), &written, NULL); - WriteFile(file, "\n", strlen("\n"), &written, NULL); - CloseHandle(file); -} - -static void test_info_size(void) -{ DWORD hdl, retval; - char mypath[MAX_PATH] = ""; - - SetLastError(MY_LAST_ERROR); - retval = GetFileVersionInfoSizeA( NULL, NULL); - ok( !retval, - "GetFileVersionInfoSizeA result wrong! 0L expected, got 0x%08x\n", - retval); - EXPECT_INVALID__NOT_FOUND; - - hdl = 0x55555555; - SetLastError(MY_LAST_ERROR); - retval = GetFileVersionInfoSizeA( NULL, &hdl); - ok( !retval, - "GetFileVersionInfoSizeA result wrong! 0L expected, got 0x%08x\n", - retval); - EXPECT_INVALID__NOT_FOUND; - ok( hdl == 0L, - "Handle wrong! 0L expected, got 0x%08x\n", hdl); - - SetLastError(MY_LAST_ERROR); - retval = GetFileVersionInfoSizeA( "", NULL); - ok( !retval, - "GetFileVersionInfoSizeA result wrong! 0L expected, got 0x%08x\n", - retval); - EXPECT_BAD_PATH__NOT_FOUND; - - hdl = 0x55555555; - SetLastError(MY_LAST_ERROR); - retval = GetFileVersionInfoSizeA( "", &hdl); - ok( !retval, - "GetFileVersionInfoSizeA result wrong! 0L expected, got 0x%08x\n", - retval); - EXPECT_BAD_PATH__NOT_FOUND; - ok( hdl == 0L, - "Handle wrong! 0L expected, got 0x%08x\n", hdl); - - SetLastError(MY_LAST_ERROR); - retval = GetFileVersionInfoSizeA( "kernel32.dll", NULL); - ok( retval, - "GetFileVersionInfoSizeA result wrong! <> 0L expected, got 0x%08x\n", - retval); - ok((NO_ERROR == GetLastError()) || (MY_LAST_ERROR == GetLastError()), - "Last error wrong! NO_ERROR/0x%08x (NT4) expected, got %u\n", - MY_LAST_ERROR, GetLastError()); - - hdl = 0x55555555; - SetLastError(MY_LAST_ERROR); - retval = GetFileVersionInfoSizeA( "kernel32.dll", &hdl); - ok( retval, - "GetFileVersionInfoSizeA result wrong! <> 0L expected, got 0x%08x\n", - retval); - ok((NO_ERROR == GetLastError()) || (MY_LAST_ERROR == GetLastError()), - "Last error wrong! NO_ERROR/0x%08x (NT4) expected, got %u\n", - MY_LAST_ERROR, GetLastError()); - ok( hdl == 0L, - "Handle wrong! 0L expected, got 0x%08x\n", hdl); - - SetLastError(MY_LAST_ERROR); - retval = GetFileVersionInfoSizeA( "notexist.dll", NULL); - ok( !retval, - "GetFileVersionInfoSizeA result wrong! 0L expected, got 0x%08x\n", - retval); - ok( (ERROR_FILE_NOT_FOUND == GetLastError()) || - (ERROR_RESOURCE_DATA_NOT_FOUND == GetLastError()) || - (MY_LAST_ERROR == GetLastError()) || - (ERROR_SUCCESS == GetLastError()), /* win2k */ - "Last error wrong! ERROR_FILE_NOT_FOUND/ERROR_RESOURCE_DATA_NOT_FOUND " - "(XP)/0x%08x (NT4) expected, got %u\n", MY_LAST_ERROR, GetLastError()); - - /* test a currently loaded executable */ - if(GetModuleFileNameA(NULL, mypath, MAX_PATH)) { - hdl = 0x55555555; - SetLastError(MY_LAST_ERROR); - retval = GetFileVersionInfoSizeA( mypath, &hdl); - ok( retval, - "GetFileVersionInfoSizeA result wrong! <> 0L expected, got 0x%08x\n", - retval); - ok((NO_ERROR == GetLastError()) || (MY_LAST_ERROR == GetLastError()), - "Last error wrong! NO_ERROR/0x%08x (NT4) expected, got %u\n", - MY_LAST_ERROR, GetLastError()); - ok( hdl == 0L, - "Handle wrong! 0L expected, got 0x%08x\n", hdl); - } - else - trace("skipping GetModuleFileNameA(NULL,..) failed\n"); - - /* test a not loaded executable */ - if(GetSystemDirectoryA(mypath, MAX_PATH)) { - lstrcatA(mypath, "\\regsvr32.exe"); - - if(INVALID_FILE_ATTRIBUTES == GetFileAttributesA(mypath)) - trace("GetFileAttributesA(%s) failed\n", mypath); - else { - hdl = 0x55555555; - SetLastError(MY_LAST_ERROR); - retval = GetFileVersionInfoSizeA( mypath, &hdl); - ok( retval, - "GetFileVersionInfoSizeA result wrong! <> 0L expected, got 0x%08x\n", - retval); - ok((NO_ERROR == GetLastError()) || (MY_LAST_ERROR == GetLastError()), - "Last error wrong! NO_ERROR/0x%08x (NT4) expected, got %u\n", - MY_LAST_ERROR, GetLastError()); - ok( hdl == 0L, - "Handle wrong! 0L expected, got 0x%08x\n", hdl); - } - } - else - trace("skipping GetSystemDirectoryA(mypath,..) failed\n"); - - create_file("test.txt"); - - /* no version info */ - SetLastError(0xdeadbeef); - hdl = 0xcafe; - retval = GetFileVersionInfoSizeA("test.txt", &hdl); - ok(retval == 0, "Expected 0, got %d\n", retval); - ok(hdl == 0, "Expected 0, got %d\n", hdl); - ok(GetLastError() == ERROR_RESOURCE_DATA_NOT_FOUND || - GetLastError() == ERROR_BAD_FORMAT || /* win9x */ - GetLastError() == ERROR_SUCCESS, /* win2k */ - "Expected ERROR_RESOURCE_DATA_NOT_FOUND, got %d\n", GetLastError()); - - DeleteFileA("test.txt"); -} - -static void VersionDwordLong2String(DWORDLONG Version, LPSTR lpszVerString) -{ - WORD a, b, c, d; - - a = (WORD)(Version >> 48); - b = (WORD)((Version >> 32) & 0xffff); - c = (WORD)((Version >> 16) & 0xffff); - d = (WORD)(Version & 0xffff); - - sprintf(lpszVerString, "%d.%d.%d.%d", a, b, c, d); - - return; -} - -static void test_info(void) -{ - DWORD hdl, retval; - PVOID pVersionInfo = NULL; - BOOL boolret; - VS_FIXEDFILEINFO *pFixedVersionInfo; - UINT uiLength; - char VersionString[MAX_PATH]; - static CHAR backslash[] = "\\"; - DWORDLONG dwlVersion; - - hdl = 0x55555555; - SetLastError(MY_LAST_ERROR); - retval = GetFileVersionInfoSizeA( "kernel32.dll", &hdl); - ok( retval, - "GetFileVersionInfoSizeA result wrong! <> 0L expected, got 0x%08x\n", - retval); - ok((NO_ERROR == GetLastError()) || (MY_LAST_ERROR == GetLastError()), - "Last error wrong! NO_ERROR/0x%08x (NT4) expected, got %u\n", - MY_LAST_ERROR, GetLastError()); - ok( hdl == 0L, - "Handle wrong! 0L expected, got 0x%08x\n", hdl); - - if ( retval == 0 || hdl != 0) - return; - - pVersionInfo = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, retval ); - ok(pVersionInfo != 0, "HeapAlloc failed\n" ); - if (pVersionInfo == 0) - return; - - if (0) - { - /* this test crashes on WinNT4 - */ - boolret = GetFileVersionInfoA( "kernel32.dll", 0, retval, 0); - ok (!boolret, "GetFileVersionInfoA should have failed: GetLastError = %u\n", GetLastError()); - ok ((GetLastError() == ERROR_INVALID_DATA) || (GetLastError() == ERROR_BAD_PATHNAME) || - (GetLastError() == NO_ERROR), - "Last error wrong! ERROR_INVALID_DATA/ERROR_BAD_PATHNAME (ME)/" - "NO_ERROR (95) expected, got %u\n", - GetLastError()); - } - - boolret = GetFileVersionInfoA( "kernel32.dll", 0, retval, pVersionInfo ); - ok (boolret, "GetFileVersionInfoA failed: GetLastError = %u\n", GetLastError()); - if (!boolret) - goto cleanup; - - boolret = VerQueryValueA( pVersionInfo, NULL, (LPVOID *)&pFixedVersionInfo, &uiLength ); - ok (boolret || GetLastError() == NO_ERROR /* Win98 */, - "VerQueryValueA failed: GetLastError = %u\n", GetLastError()); - - boolret = VerQueryValueA( pVersionInfo, "", (LPVOID *)&pFixedVersionInfo, &uiLength ); - ok (boolret, "VerQueryValueA failed: GetLastError = %u\n", GetLastError()); - - boolret = VerQueryValueA( pVersionInfo, backslash, (LPVOID *)&pFixedVersionInfo, &uiLength ); - ok (boolret, "VerQueryValueA failed: GetLastError = %u\n", GetLastError()); - if (!boolret) - goto cleanup; - - dwlVersion = (((DWORDLONG)pFixedVersionInfo->dwFileVersionMS) << 32) + - pFixedVersionInfo->dwFileVersionLS; - - VersionDwordLong2String(dwlVersion, VersionString); - - trace("kernel32.dll version: %s\n", VersionString); - - if (0) - { - /* this test crashes on WinNT4 - */ - boolret = VerQueryValueA( pVersionInfo, backslash, (LPVOID *)&pFixedVersionInfo, 0); - ok (boolret, "VerQueryValue failed: GetLastError = %u\n", GetLastError()); - } - -cleanup: - HeapFree( GetProcessHeap(), 0, pVersionInfo); -} - -static void test_32bit_win(void) -{ - DWORD hdlA, retvalA; - DWORD hdlW, retvalW = 0; - BOOL retA,retW; - PVOID pVersionInfoA = NULL; - PVOID pVersionInfoW = NULL; - char *pBufA; - WCHAR *pBufW; - UINT uiLengthA, uiLengthW; - char mypathA[MAX_PATH]; - WCHAR mypathW[MAX_PATH]; - char rootA[] = "\\"; - WCHAR rootW[] = { '\\', 0 }; - WCHAR emptyW[] = { 0 }; - char varfileinfoA[] = "\\VarFileInfo\\Translation"; - WCHAR varfileinfoW[] = { '\\','V','a','r','F','i','l','e','I','n','f','o', - '\\','T','r','a','n','s','l','a','t','i','o','n', 0 }; - char WineVarFileInfoA[] = { 0x09, 0x04, 0xE4, 0x04 }; - char FileDescriptionA[] = "\\StringFileInfo\\040904E4\\FileDescription"; - WCHAR FileDescriptionW[] = { '\\','S','t','r','i','n','g','F','i','l','e','I','n','f','o', - '\\','0','4','0','9','0','4','E','4', - '\\','F','i','l','e','D','e','s','c','r','i','p','t','i','o','n', 0 }; - char WineFileDescriptionA[] = "FileDescription"; - WCHAR WineFileDescriptionW[] = { 'F','i','l','e','D','e','s','c','r','i','p','t','i','o','n', 0 }; - BOOL is_unicode_enabled = TRUE; - - /* A copy from dlls/version/info.c */ - typedef struct - { - WORD wLength; - WORD wValueLength; - WORD wType; - WCHAR szKey[1]; -#if 0 /* variable length structure */ - /* DWORD aligned */ - BYTE Value[]; - /* DWORD aligned */ - VS_VERSION_INFO_STRUCT32 Children[]; -#endif - } VS_VERSION_INFO_STRUCT32; - - /* If we call GetFileVersionInfoA on a system that supports Unicode, NT/W2K/XP/W2K3 (by default) and Wine, - * the versioninfo will contain Unicode strings. - * Part of the test is to call both the A and W versions, which should have the same Version Information - * for some requests, on systems that support both calls. - */ - - /* First get the versioninfo via the W versions */ - SetLastError(0xdeadbeef); - GetModuleFileNameW(NULL, mypathW, MAX_PATH); - if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("GetModuleFileNameW not existing on this platform, skipping comparison between A- and W-calls\n"); - is_unicode_enabled = FALSE; - } - - if (is_unicode_enabled) - { - retvalW = GetFileVersionInfoSizeW( mypathW, &hdlW); - pVersionInfoW = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, retvalW ); - retW = GetFileVersionInfoW( mypathW, 0, retvalW, pVersionInfoW ); - } - - GetModuleFileNameA(NULL, mypathA, MAX_PATH); - retvalA = GetFileVersionInfoSizeA( mypathA, &hdlA); - pVersionInfoA = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, retvalA ); - retA = GetFileVersionInfoA( mypathA, 0, retvalA, pVersionInfoA ); - - if (is_unicode_enabled) - { - ok( retvalA == retvalW, "The size of the struct should be the same for both A/W calls, it is (%d) vs. (%d)\n", - retvalA, retvalW); - ok( !memcmp(pVersionInfoA, pVersionInfoW, retvalA), "Both structs should be the same, they aren't\n"); - } - - /* The structs on Windows are bigger than just the struct for the basic information. The total struct - * contains also an empty part, which is used for converted strings. The converted strings are a result - * of calling VerQueryValueA on a 32bit resource and calling VerQueryValueW on a 16bit resource. - * The first WORD of the structure (wLength) shows the size of the base struct. The total struct size depends - * on the Windows version: - * - * 16bits resource (numbers are from a sample app): - * - * Windows Version Retrieved with A/W wLength StructSize - * ==================================================================================== - * Win98 A 0x01B4 (436) 436 - * NT4 A/W 0x01B4 (436) 2048 ??? - * W2K/XP/W2K3 A/W 0x01B4 (436) 1536 which is (436 - sizeof(VS_FIXEDFILEINFO)) * 4 - * - * 32bits resource (numbers are from this test executable version_crosstest.exe): - * Windows Version Retrieved with A/W wLength StructSize - * ============================================================= - * Win98 A 0x01E0 (480) 848 (structure data doesn't seem correct) - * NT4 A/W 0x0350 (848) 1272 (848 * 1.5) - * W2K/XP/W2K3 A/W 0x0350 (848) 1700 which is (848 * 2) + 4 - * - * Wine will follow the implementation (eventually) of W2K/XP/W2K3 - */ - - /* Now some tests for the above (only if we are unicode enabled) */ - - if (is_unicode_enabled) - { - VS_VERSION_INFO_STRUCT32 *vvis = pVersionInfoW; - ok ( retvalW == ((vvis->wLength * 2) + 4) || retvalW == (vvis->wLength * 1.5), - "Structure is not of the correct size\n"); - } - - /* Although the 32bit resource structures contain Unicode strings, VerQueryValueA will always return normal strings, - * VerQueryValueW will always return Unicode ones. (That means everything returned for StringFileInfo requests). - */ - - /* Get the VS_FIXEDFILEINFO information, this must be the same for both A- and W-Calls */ - - retA = VerQueryValueA( pVersionInfoA, rootA, (LPVOID *)&pBufA, &uiLengthA ); - ok (retA, "VerQueryValueA failed: GetLastError = %u\n", GetLastError()); - ok ( uiLengthA == sizeof(VS_FIXEDFILEINFO), "Size (%d) doesn't match the size of the VS_FIXEDFILEINFO struct\n", uiLengthA); - - if (is_unicode_enabled) - { - if(0) - { /* This causes Vista and w2k8 to crash */ - retW = VerQueryValueW( pVersionInfoW, NULL, (LPVOID *)&pBufW, &uiLengthW ); - ok (retW, "VerQueryValueW failed: GetLastError = %u\n", GetLastError()); - } - - retW = VerQueryValueW( pVersionInfoW, emptyW, (LPVOID *)&pBufW, &uiLengthW ); - ok (retW, "VerQueryValueW failed: GetLastError = %u\n", GetLastError()); - - retW = VerQueryValueW( pVersionInfoW, rootW, (LPVOID *)&pBufW, &uiLengthW ); - ok (retW, "VerQueryValueW failed: GetLastError = %u\n", GetLastError()); - ok ( uiLengthA == sizeof(VS_FIXEDFILEINFO), "Size (%d) doesn't match the size of the VS_FIXEDFILEINFO struct\n", uiLengthA); - - ok( uiLengthA == uiLengthW, "The size of VS_FIXEDFILEINFO should be the same for both A/W calls, it is (%d) vs. (%d)\n", - uiLengthA, uiLengthW); - ok( !memcmp(pBufA, pBufW, uiLengthA), "Both values should be the same, they aren't\n"); - } - - /* Get some VarFileInfo information, this must be the same for both A- and W-Calls */ - - retA = VerQueryValueA( pVersionInfoA, varfileinfoA, (LPVOID *)&pBufA, &uiLengthA ); - ok (retA, "VerQueryValueA failed: GetLastError = %u\n", GetLastError()); - ok( !memcmp(pBufA, WineVarFileInfoA, uiLengthA), "The VarFileInfo should have matched 0904e404 (non case sensitive)\n"); - - if (is_unicode_enabled) - { - retW = VerQueryValueW( pVersionInfoW, varfileinfoW, (LPVOID *)&pBufW, &uiLengthW ); - ok (retW, "VerQueryValueW failed: GetLastError = %u\n", GetLastError()); - ok( uiLengthA == uiLengthW, "The size of the VarFileInfo information should be the same for both A/W calls, it is (%d) vs. (%d)\n", - uiLengthA, uiLengthW); - ok( !memcmp(pBufA, pBufW, uiLengthA), "Both values should be the same, they aren't\n"); - } - - /* Get some StringFileInfo information, this will be ANSI for A-Calls and Unicode for W-Calls */ - - retA = VerQueryValueA( pVersionInfoA, FileDescriptionA, (LPVOID *)&pBufA, &uiLengthA ); - ok (retA, "VerQueryValueA failed: GetLastError = %u\n", GetLastError()); - ok( !lstrcmpA(WineFileDescriptionA, pBufA), "expected '%s' got '%s'\n", - WineFileDescriptionA, pBufA); - - /* Test a second time */ - retA = VerQueryValueA( pVersionInfoA, FileDescriptionA, (LPVOID *)&pBufA, &uiLengthA ); - ok (retA, "VerQueryValueA failed: GetLastError = %u\n", GetLastError()); - ok( !lstrcmpA(WineFileDescriptionA, pBufA), "expected '%s' got '%s'\n", - WineFileDescriptionA, pBufA); - - if (is_unicode_enabled) - { - retW = VerQueryValueW( pVersionInfoW, FileDescriptionW, (LPVOID *)&pBufW, &uiLengthW ); - ok (retW, "VerQueryValueW failed: GetLastError = %u\n", GetLastError()); - ok( !lstrcmpW(WineFileDescriptionW, pBufW), "FileDescription should have been '%s'\n", WineFileDescriptionA); - } - - HeapFree( GetProcessHeap(), 0, pVersionInfoA); - if (is_unicode_enabled) - HeapFree( GetProcessHeap(), 0, pVersionInfoW); -} - -static void test_VerQueryValue(void) -{ - static const char * const value_name[] = { - "Product", "CompanyName", "FileDescription", "Internal", - "ProductVersion", "InternalName", "File", "LegalCopyright", - "FileVersion", "Legal", "OriginalFilename", "ProductName", - "Company", "Original" }; - char *ver, *p; - UINT len, ret, translation, i; - char buf[MAX_PATH]; - - ret = GetModuleFileName(NULL, buf, sizeof(buf)); - assert(ret); - - SetLastError(0xdeadbeef); - len = GetFileVersionInfoSize(buf, NULL); - ok(len, "GetFileVersionInfoSize(%s) error %u\n", buf, GetLastError()); - - ver = HeapAlloc(GetProcessHeap(), 0, len); - assert(ver); - - SetLastError(0xdeadbeef); - ret = GetFileVersionInfo(buf, 0, len, ver); - ok(ret, "GetFileVersionInfo error %u\n", GetLastError()); - - p = (char *)0xdeadbeef; - len = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = VerQueryValue(ver, "\\VarFileInfo\\Translation", (LPVOID*)&p, &len); - ok(ret, "VerQueryValue error %u\n", GetLastError()); - ok(len == 4, "VerQueryValue returned %u, expected 4\n", len); - - translation = *(UINT *)p; - translation = MAKELONG(HIWORD(translation), LOWORD(translation)); - - p = (char *)0xdeadbeef; - len = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = VerQueryValue(ver, "String", (LPVOID*)&p, &len); - ok(!ret, "VerQueryValue should fail\n"); - ok(GetLastError() == ERROR_RESOURCE_TYPE_NOT_FOUND || - GetLastError() == 0xdeadbeef /* Win9x, NT4, W2K */, - "VerQueryValue returned %u\n", GetLastError()); - ok(p == (char *)0xdeadbeef, "expected 0xdeadbeef got %p\n", p); - ok(len == 0 || - len == 0xbeef, /* win9x */ - "expected 0 got %x\n", len); - - p = (char *)0xdeadbeef; - len = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = VerQueryValue(ver, "StringFileInfo", (LPVOID*)&p, &len); - ok(ret, "VerQueryValue error %u\n", GetLastError()); -todo_wine ok(len == 0, "VerQueryValue returned %u, expected 0\n", len); - ok(p != (char *)0xdeadbeef, "not expected 0xdeadbeef\n"); - - p = (char *)0xdeadbeef; - len = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = VerQueryValue(ver, "\\StringFileInfo", (LPVOID*)&p, &len); - ok(ret, "VerQueryValue error %u\n", GetLastError()); -todo_wine ok(len == 0, "VerQueryValue returned %u, expected 0\n", len); - ok(p != (char *)0xdeadbeef, "not expected 0xdeadbeef\n"); - - p = (char *)0xdeadbeef; - len = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = VerQueryValue(ver, "\\\\StringFileInfo", (LPVOID*)&p, &len); - ok(ret, "VerQueryValue error %u\n", GetLastError()); -todo_wine ok(len == 0, "VerQueryValue returned %u, expected 0\n", len); - ok(p != (char *)0xdeadbeef, "not expected 0xdeadbeef\n"); - - p = (char *)0xdeadbeef; - len = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = VerQueryValue(ver, "\\StringFileInfo\\\\", (LPVOID*)&p, &len); - ok(ret, "VerQueryValue error %u\n", GetLastError()); -todo_wine ok(len == 0, "VerQueryValue returned %u, expected 0\n", len); - ok(p != (char *)0xdeadbeef, "not expected 0xdeadbeef\n"); - - sprintf(buf, "\\StringFileInfo\\%08x", translation); - p = (char *)0xdeadbeef; - len = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = VerQueryValue(ver, buf, (LPVOID*)&p, &len); - ok(ret, "VerQueryValue error %u\n", GetLastError()); -todo_wine ok(len == 0, "VerQueryValue returned %u, expected 0\n", len); - ok(p != (char *)0xdeadbeef, "not expected 0xdeadbeef\n"); - - for (i = 0; i < sizeof(value_name)/sizeof(value_name[0]); i++) - { - sprintf(buf, "\\StringFileInfo\\%08x\\%s", translation, value_name[i]); - p = (char *)0xdeadbeef; - len = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = VerQueryValue(ver, buf, (LPVOID*)&p, &len); - ok(ret, "VerQueryValue(%s) error %u\n", buf, GetLastError()); - ok(len == strlen(value_name[i]) + 1, "VerQueryValue returned %u\n", len); - ok(!strcmp(value_name[i], p), "expected \"%s\", got \"%s\"\n", - value_name[i], p); - - /* test partial value names */ - len = lstrlen(buf); - buf[len - 2] = 0; - p = (char *)0xdeadbeef; - len = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = VerQueryValue(ver, buf, (LPVOID*)&p, &len); - ok(!ret, "VerQueryValue(%s) succeeded\n", buf); - ok(GetLastError() == ERROR_RESOURCE_TYPE_NOT_FOUND || - GetLastError() == 0xdeadbeef /* Win9x, NT4, W2K */, - "VerQueryValue returned %u\n", GetLastError()); - ok(p == (char *)0xdeadbeef, "expected 0xdeadbeef got %p\n", p); - ok(len == 0 || - len == 0xbeef, /* win9x */ - "expected 0 or 0xbeef, got %x\n", len); - } - - HeapFree(GetProcessHeap(), 0, ver); -} - -START_TEST(info) -{ - test_info_size(); - test_info(); - test_32bit_win(); - test_VerQueryValue(); -} diff --git a/rostests/winetests/version/install.c b/rostests/winetests/version/install.c deleted file mode 100644 index 6fc19bbe08e..00000000000 --- a/rostests/winetests/version/install.c +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Copyright (C) 2005 Stefan Leichter - * - * 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 "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "winver.h" - -static void test_find_file(void) -{ - DWORD ret; - UINT dwCur, dwOut ; - char appdir[MAX_PATH]; - char curdir[MAX_PATH]; - char filename[MAX_PATH]; - char outBuf[MAX_PATH]; - char windir[MAX_PATH]; - static CHAR empty[] = "", - regedit[] = "regedit", - regedit_exe[] = "regedit.exe"; - - memset(appdir, 0, MAX_PATH); - memset(windir, 0, MAX_PATH); - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - memset(curdir, 0, MAX_PATH); - memset(outBuf, 0, MAX_PATH); - ret = VerFindFileA(0, regedit, empty, empty, curdir, &dwCur, outBuf, &dwOut); - switch(ret) { - case 0L: - ok(dwCur == 1, "Wrong length of buffer for current location: " - "got %d(%s) expected 1\n", dwCur, curdir); - ok(dwOut == 1, "Wrong length of buffer for the recommended installation location: " - "got %d(%s) expected 1\n", dwOut, outBuf); - break; - case VFF_BUFFTOOSMALL: - ok(dwCur == MAX_PATH, "Wrong length of buffer for current location: " - "got %d(%s) expected MAX_PATH\n", dwCur, curdir); - ok(dwOut == MAX_PATH, "Wrong length of buffer for the recommended installation location: " - "got %d(%s) expected MAX_PATH\n", dwOut, outBuf); - break; - default: - ok(0, "Got unexpected return value %x\n", ret); - } - - if(!GetWindowsDirectoryA(windir, MAX_PATH)) - trace("GetWindowsDirectoryA failed\n"); - else { - sprintf(appdir, "%s\\regedit.exe", windir); - if(INVALID_FILE_ATTRIBUTES == GetFileAttributesA(appdir)) - trace("GetFileAttributesA(%s) failed\n", appdir); - else { - dwCur=MAX_PATH; - dwOut=MAX_PATH; - memset(curdir, 0, MAX_PATH); - memset(outBuf, 0, MAX_PATH); - ret = VerFindFileA(0, regedit_exe, empty, empty, curdir, &dwCur, outBuf, &dwOut); - switch(ret) { - case VFF_CURNEDEST: - ok(dwCur == 1 + strlen(windir), "Wrong length of buffer for current location: " - "got %d(%s) expected %d\n", dwCur, curdir, lstrlenA(windir)+1); - ok(dwOut == 1, "Wrong length of buffer for the recommended installation location: " - "got %d(%s) expected 1\n", dwOut, outBuf); - break; - case VFF_BUFFTOOSMALL: - ok(dwCur == MAX_PATH, "Wrong length of buffer for current location: " - "got %d(%s) expected MAX_PATH\n", dwCur, curdir); - ok(dwOut == MAX_PATH, "Wrong length of buffer for the recommended installation location: " - "got %d(%s) expected MAX_PATH\n", dwOut, outBuf); - break; - default: - todo_wine ok(0, "Got unexpected return value %x\n", ret); - } - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - memset(curdir, 0, MAX_PATH); - memset(outBuf, 0, MAX_PATH); - ret = VerFindFileA(0, regedit_exe, NULL, NULL, curdir, &dwCur, outBuf, &dwOut); - switch(ret) { - case VFF_CURNEDEST: - ok(dwCur == 1 + strlen(windir), "Wrong length of buffer for current location: " - "got %d(%s) expected %d\n", dwCur, curdir, lstrlenA(windir)+1); - ok(dwOut == 1, "Wrong length of buffer for the recommended installation location: " - "got %d(%s) expected 1\n", dwOut, outBuf); - break; - case VFF_BUFFTOOSMALL: - ok(dwCur == MAX_PATH, "Wrong length of buffer for current location: " - "got %d(%s) expected MAX_PATH\n", dwCur, curdir); - ok(dwOut == MAX_PATH, "Wrong length of buffer for the recommended installation location: " - "got %d(%s) expected MAX_PATH\n", dwOut, outBuf); - break; - default: - todo_wine ok(0, "Got unexpected return value %x\n", ret); - } - } - } - if(!GetModuleFileNameA(NULL, filename, MAX_PATH) || - !GetSystemDirectoryA(windir, MAX_PATH) || - !GetTempPathA(MAX_PATH, appdir)) - trace("GetModuleFileNameA, GetSystemDirectoryA or GetTempPathA failed\n"); - else { - char *p = strrchr(filename, '\\'); - if(p) { - *(p++) ='\0'; - SetCurrentDirectoryA(filename); - memmove(filename, p, 1 + strlen(p)); - } - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - memset(outBuf, 0, MAX_PATH); - memset(curdir, 0, MAX_PATH); - ret = VerFindFileA(0, filename, NULL, NULL, curdir, &dwCur, outBuf, &dwOut); - switch(ret) { - case VFF_CURNEDEST: - ok(dwOut == 1, "Wrong length of buffer for the recommended installation location" - "got %d(%s) expected 1\n", dwOut, outBuf); - break; - case VFF_BUFFTOOSMALL: - ok(dwOut == MAX_PATH, "Wrong length of buffer for the recommended installation location" - "got %d(%s) expected MAX_PATH\n", dwOut, outBuf); - break; - default: - todo_wine ok(0, "Got unexpected return value %x\n", ret); - } - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - memset(outBuf, 0, MAX_PATH); - memset(curdir, 0, MAX_PATH); - ret = VerFindFileA(VFFF_ISSHAREDFILE, filename, NULL, appdir, curdir, &dwCur, outBuf, &dwOut); - todo_wine ok(VFF_CURNEDEST == ret, "Wrong return value got %x expected VFF_CURNEDEST\n", ret); - ok(dwOut == 1 + strlen(windir), "Wrong length of buffer for current location: " - "got %d(%s) expected %d\n", dwOut, outBuf, lstrlenA(windir)+1); - - dwCur=MAX_PATH; - dwOut=MAX_PATH; - memset(outBuf, 0, MAX_PATH); - memset(curdir, 0, MAX_PATH); - ret = VerFindFileA(0, filename, NULL, appdir, curdir, &dwCur, outBuf, &dwOut); - todo_wine ok(VFF_CURNEDEST == ret, "Wrong return value got %x expected VFF_CURNEDEST\n", ret); - ok(dwOut == 1 + strlen(appdir), "Wrong length of buffer for current location: " - "got %d(%s) expected %d\n", dwOut, outBuf, lstrlenA(appdir)+1); - } -} - -static void test_install_file(void) -{ - CHAR tmpname[MAX_PATH]; - UINT size = MAX_PATH; - DWORD rc; - static const CHAR szSrcFileName[] = "nofile.txt"; - static const CHAR szDestFileName[] = "nofile2.txt"; - static const CHAR szSrcDir[] = "D:\\oes\\not\\exist"; - static const CHAR szDestDir[] = "D:\\oes\\not\\exist\\either"; - static const CHAR szCurDir[] = "C:\\"; - - /* testing Invalid Parameters */ - memset(tmpname,0,sizeof(tmpname)); - rc = VerInstallFileA(0x0, NULL, NULL, NULL, NULL, NULL, tmpname, &size); - ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08x/\'%s\'\n",rc,tmpname); - memset(tmpname,0,sizeof(tmpname)); - size = MAX_PATH; - rc = VerInstallFileA(0x0, szSrcFileName, NULL, NULL, NULL, NULL, tmpname, &size); - ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08x/\'%s\'\n",rc,tmpname); - memset(tmpname,0,sizeof(tmpname)); - size = MAX_PATH; - rc = VerInstallFileA(0x0, szSrcFileName, szDestFileName, NULL, NULL, NULL, tmpname, &size); - ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08x/\'%s\'\n",rc,tmpname); - memset(tmpname,0,sizeof(tmpname)); - size = MAX_PATH; - rc = VerInstallFileA(0x0, szSrcFileName, szDestFileName, szSrcDir, NULL, NULL, tmpname, &size); - ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08x/\'%s\'\n",rc,tmpname); - - /* Source file does not exist*/ - - memset(tmpname,0,sizeof(tmpname)); - size = MAX_PATH; - rc = VerInstallFileA(0x0, szSrcFileName, szDestFileName, szSrcDir, szDestDir, NULL, tmpname, &size); - ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08x/\'%s\'\n",rc,tmpname); - memset(tmpname,0,sizeof(tmpname)); - size = MAX_PATH; - rc = VerInstallFileA(0x0, szSrcFileName, szDestFileName, szSrcDir, szDestDir, szCurDir, tmpname, &size); - ok (rc == 0x10000 && tmpname[0]==0," expected return 0x10000 and no tempname, got %08x/\'%s\'\n",rc,tmpname); -} - -START_TEST(install) -{ - test_find_file(); - test_install_file(); -} diff --git a/rostests/winetests/version/testlist.c b/rostests/winetests/version/testlist.c deleted file mode 100644 index c73df287383..00000000000 --- a/rostests/winetests/version/testlist.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Automatically generated file; DO NOT EDIT!! */ - -#define WIN32_LEAN_AND_MEAN -#include - -#define STANDALONE -#include "wine/test.h" - -extern void func_info(void); -extern void func_install(void); - -const struct test winetest_testlist[] = -{ - { "info", func_info }, - { "install", func_install }, - { 0, 0 } -}; diff --git a/rostests/winetests/version/version.rbuild b/rostests/winetests/version/version.rbuild deleted file mode 100644 index b46ca7e68ab..00000000000 --- a/rostests/winetests/version/version.rbuild +++ /dev/null @@ -1,15 +0,0 @@ - - - - - . - - info.c - install.c - version.rc - testlist.c - wine - version - ntdll - - diff --git a/rostests/winetests/version/version.rc b/rostests/winetests/version/version.rc deleted file mode 100644 index c754e0c35a7..00000000000 --- a/rostests/winetests/version/version.rc +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2005 Mike McCormack - * - * 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 "windef.h" -#include "winbase.h" -#include "winver.h" - -VS_VERSION_INFO VERSIONINFO -FILEVERSION 1,0,0,0 -PRODUCTVERSION 1,0,0,0 -FILEFLAGSMASK 63 -FILEFLAGS 0 -FILEOS VOS_UNKNOWN -FILETYPE VFT_APP -FILESUBTYPE VFT2_UNKNOWN -{ - BLOCK "StringFileInfo" - { - BLOCK "040904E4" /* LANG_ENGLISH/SUBLANG_DEFAULT, CP1252 */ - { - /* list of strings that partially match in arbitrary order */ - VALUE "Product", "Product" - VALUE "CompanyName", "CompanyName" - VALUE "FileDescription", "FileDescription" - VALUE "Internal", "Internal" - VALUE "ProductVersion", "ProductVersion" - VALUE "InternalName", "InternalName" - VALUE "File", "File" - VALUE "LegalCopyright", "LegalCopyright" - VALUE "FileVersion", "FileVersion" - VALUE "Legal", "Legal" - VALUE "OriginalFilename", "OriginalFilename" - VALUE "ProductName", "ProductName" - VALUE "Company", "Company" - VALUE "Original", "Original" - } - } - BLOCK "VarFileInfo" - { - VALUE "Translation", 0x0409,1252 /* LANG_ENGLISH/SUBLANG_DEFAULT, CP1252 */ - } -} diff --git a/rostests/winetests/winetest/config.h b/rostests/winetests/winetest/config.h deleted file mode 100644 index 949acf8a401..00000000000 --- a/rostests/winetests/winetest/config.h +++ /dev/null @@ -1,949 +0,0 @@ -/* include/config.h. Generated by configure. */ -/* include/config.h.in. Generated from configure.ac by autoheader. */ - -#define __WINE_CONFIG_H - -/* Specifies the compiler flag that forces a short wchar_t */ -#define CC_FLAG_SHORT_WCHAR "-fshort-wchar" - -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. - */ -/* #undef CRAY_STACKSEG_END */ - -/* Define to 1 if using `alloca.c'. */ -/* #undef C_ALLOCA */ - -/* Define to 1 if you have `alloca', as a function or macro. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define if you have ALSA 1.x including devel headers */ -/* #undef HAVE_ALSA */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ALSA_ASOUNDLIB_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARPA_INET_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARPA_NAMESER_H */ - -/* Define if you have ARTS sound server */ -/* #undef HAVE_ARTS */ - -/* Define if the assembler keyword .size is accepted */ -/* #undef HAVE_ASM_DOT_SIZE */ - -/* Define to 1 if you have the